From 6fd7ef2bbf1f941c8dee302ffdeb44e603148723 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 7 Feb 2014 02:19:48 +0100
Subject: [PATCH 0001/1819] Also switch the (unused) verification code to low-s
 instead of even-s.

a81cd968 introduced a malleability breaker for signatures
(using an even value for S). In e0e14e43 this was changed to
the lower of two potential values, rather than the even one.
Only the signing code was changed though, the (for now unused)
verification code wasn't adapted.
---
 src/key.cpp                  | 72 +++++++++++++++++++++++++-----------
 src/key.h                    |  3 ++
 src/script.cpp               |  9 +++--
 src/script.h                 |  2 +-
 src/test/canonical_tests.cpp | 17 +++++++++
 5 files changed, 78 insertions(+), 25 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index b57b7c506c25..2199996cf3df 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -332,30 +332,60 @@ class CECKey {
     }
 };
 
+int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) {
+    while (c1len > c2len) {
+        if (*c1)
+            return 1;
+        c1++;
+        c1len--;
+    }
+    while (c2len > c1len) {
+        if (*c2)
+            return -1;
+        c2++;
+        c2len--;
+    }
+    while (c1len > 0) {
+        if (*c1 > *c2)
+            return 1;
+        if (*c2 > *c1)
+            return -1;
+        c1++;
+        c2++;
+        c1len--;
+    }
+    return 0;
+}
+
+// Order of secp256k1's generator minus 1.
+const unsigned char vchMaxModOrder[32] = {
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+    0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
+    0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
+};
+
+// Half of the order of secp256k1's generator minus 1.
+const unsigned char vchMaxModHalfOrder[32] = {
+    0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D,
+    0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0
+};
+
+const unsigned char vchZero[0] = {};
+
+
 }; // end of anonymous namespace
 
 bool CKey::Check(const unsigned char *vch) {
-    // Do not convert to OpenSSL's data structures for range-checking keys,
-    // it's easy enough to do directly.
-    static const unsigned char vchMax[32] = {
-        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
-        0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
-        0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
-    };
-    bool fIsZero = true;
-    for (int i=0; i<32 && fIsZero; i++)
-        if (vch[i] != 0)
-            fIsZero = false;
-    if (fIsZero)
-        return false;
-    for (int i=0; i<32; i++) {
-        if (vch[i] < vchMax[i])
-            return true;
-        if (vch[i] > vchMax[i])
-            return false;
-    }
-    return true;
+    return CompareBigEndian(vch, 32, vchZero, 0) > 0 &&
+           CompareBigEndian(vch, 32, vchMaxModOrder, 32) <= 0;
+}
+
+bool CKey::CheckSignatureElement(const unsigned char *vch, int len, bool half) {
+    return CompareBigEndian(vch, len, vchZero, 0) > 0 &&
+           CompareBigEndian(vch, len, half ? vchMaxModHalfOrder : vchMaxModOrder, 32) <= 0;
 }
 
 void CKey::MakeNewKey(bool fCompressedIn) {
diff --git a/src/key.h b/src/key.h
index cf1165d3d026..37a06810b4e9 100644
--- a/src/key.h
+++ b/src/key.h
@@ -269,6 +269,9 @@ class CKey {
 
     // Load private key and check that public key matches.
     bool Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck);
+
+    // Check whether an element of a signature (r or s) is valid.
+    static bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
 };
 
 struct CExtPubKey {
diff --git a/src/script.cpp b/src/script.cpp
index 810ba16d28f4..84a2a629e886 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -296,9 +296,12 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
     if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80))
         return error("Non-canonical signature: S value excessively padded");
 
-    if (flags & SCRIPT_VERIFY_EVEN_S) {
-        if (S[nLenS-1] & 1)
-            return error("Non-canonical signature: S value odd");
+    if (flags & SCRIPT_VERIFY_LOW_S) {
+        // If the S value is above the order of the curve divided by two, its
+        // complement modulo the order could have been used instead, which is
+        // one byte shorter when encoded correctly.
+        if (!CKey::CheckSignatureElement(S, nLenS, true))
+            return error("Non-canonical signature: S value is unnecessarily high");
     }
 
     return true;
diff --git a/src/script.h b/src/script.h
index 657ac0b388bf..b96bbc45c3c5 100644
--- a/src/script.h
+++ b/src/script.h
@@ -40,7 +40,7 @@ enum
     SCRIPT_VERIFY_NONE      = 0,
     SCRIPT_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
     SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
-    SCRIPT_VERIFY_EVEN_S    = (1U << 2), // enforce even S values in signatures (depends on STRICTENC)
+    SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC)
     SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
 };
 
diff --git a/src/test/canonical_tests.cpp b/src/test/canonical_tests.cpp
index c521f2cf9c5f..c38d9db57a86 100644
--- a/src/test/canonical_tests.cpp
+++ b/src/test/canonical_tests.cpp
@@ -89,4 +89,21 @@ BOOST_AUTO_TEST_CASE(script_noncanon)
     }
 }
 
+BOOST_AUTO_TEST_CASE(script_signstrict)
+{
+    for (int i=0; i<100; i++) {
+        CKey key;
+        key.MakeNewKey(i & 1);
+        std::vector<unsigned char> sig;
+        uint256 hash = GetRandHash();
+
+        BOOST_CHECK(key.Sign(hash, sig)); // Generate a random signature.
+        BOOST_CHECK(key.GetPubKey().Verify(hash, sig)); // Check it.
+        sig.push_back(0x01); // Append a sighash type.
+
+        BOOST_CHECK(IsCanonicalSignature(sig, SCRIPT_VERIFY_STRICTENC | SCRIPT_VERIFY_LOW_S));
+        BOOST_CHECK(IsCanonicalSignature_OpenSSL(sig));
+    }
+}
+
 BOOST_AUTO_TEST_SUITE_END()

From b41e5947735097d12eb795f2d1dc9c79ff391aba Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Wed, 12 Mar 2014 20:07:51 -0400
Subject: [PATCH 0002/1819] Fix script test handling of empty scripts

Previously an empty script would evaluate to OP_0
---
 src/test/data/script_invalid.json | 10 ++++++++++
 src/test/data/script_valid.json   | 12 ++++++++++++
 src/test/script_tests.cpp         |  6 +++++-
 3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 8cb365a46fcc..609c89be068f 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -1,8 +1,18 @@
 [
+["", "DEPTH",   "Test the test: we should have an empty stack after scriptSig evaluation"],
+["  ", "DEPTH", "and multiple spaces should not change that."],
+["   ", "DEPTH"],
+["    ", "DEPTH"],
+
 ["", ""],
 ["", "NOP"],
+["", "NOP DEPTH"],
 ["NOP", ""],
+["NOP", "DEPTH"],
 ["NOP","NOP"],
+["NOP","NOP DEPTH"],
+
+["DEPTH", ""],
 
 ["0x4c01","0x01 NOP", "PUSHDATA1 with not enough bytes"],
 ["0x4d0200ff","0x01 NOP", "PUSHDATA2 with not enough bytes"],
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 3b4c191865c9..c50767071a31 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -1,4 +1,16 @@
 [
+["", "DEPTH 0 EQUAL",   "Test the test: we should have an empty stack after scriptSig evaluation"],
+["  ", "DEPTH 0 EQUAL", "and multiple spaces should not change that."],
+["   ", "DEPTH 0 EQUAL"],
+["    ", "DEPTH 0 EQUAL"],
+["1 2", "2 EQUALVERIFY 1 EQUAL", "Similarly whitespace around and between symbols"],
+["1  2", "2 EQUALVERIFY 1 EQUAL"],
+["  1  2", "2 EQUALVERIFY 1 EQUAL"],
+["1  2  ", "2 EQUALVERIFY 1 EQUAL"],
+["  1  2  ", "2 EQUALVERIFY 1 EQUAL"],
+
+["1", ""],
+
 ["0x01 0x0b", "11 EQUAL", "push 1 byte"],
 ["0x02 0x417a", "'Az' EQUAL"],
 ["0x4b 0x417a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a",
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index dd1b61304773..f9ca65653b8b 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -63,7 +63,11 @@ ParseScript(string s)
 
     BOOST_FOREACH(string w, words)
     {
-        if (all(w, is_digit()) ||
+        if (w.size() == 0)
+        {
+            // Empty string, ignore. (boost::split given '' will return one word)
+        }
+        else if (all(w, is_digit()) ||
             (starts_with(w, "-") && all(string(w.begin()+1, w.end()), is_digit())))
         {
             // Number

From d3a33fc869d23fb13c010a6e9995bdf6574a621e Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Wed, 12 Mar 2014 21:18:07 -0400
Subject: [PATCH 0003/1819] Test CHECKMULTISIG with m == 0 and n == 0

---
 src/test/data/script_invalid.json | 16 ++++++++
 src/test/data/script_valid.json   | 64 +++++++++++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 609c89be068f..c2824cb6f770 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -331,6 +331,22 @@
 ["NOP", "HASH160 1"],
 ["NOP", "HASH256 1"],
 
+["",
+"0 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG",
+"202 CHECKMULTISIGS, fails due to 201 op limit"],
+
+["1",
+"0 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY"],
+
+["",
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG",
+"Fails due to 201 sig op limit"],
+
+["1",
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY"],
+
+
+
 ["NOP 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "Tests for Script.IsPushOnly()"],
 ["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
 
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index c50767071a31..162e5c3abdc3 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -414,6 +414,70 @@
 ["NOP", "NOP9 1"],
 ["NOP", "NOP10 1"],
 
+["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
+["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Zero sigs means no sigs are checked"],
+["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+
+["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
+["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Zero sigs means no sigs are checked"],
+["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+
+["", "0 0 'a' 'b' 2 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Test from up to 20 pubkeys, all not checked"],
+["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 2 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+
+["",
+"0 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG",
+"nOpCount is incremented by the number of keys evaluated in addition to the usual one op per op. In this case we have zero keys, so we can execute 201 CHECKMULTISIGS"],
+
+["1",
+"0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY"],
+
+["",
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG",
+"Even though there are no signatures being checked nOpCount is incremented by the number of keys."],
+
+["1",
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY"],
+
 ["0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "Very basic P2SH"],
 ["0x4c 0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
 

From 75ebced4992aab97b63c1a0842faf7dc37b86768 Mon Sep 17 00:00:00 2001
From: Alon Muroch <alonmuroch@gmail.com>
Date: Mon, 10 Mar 2014 19:23:19 +0100
Subject: [PATCH 0004/1819] added many rpc wallet tests

deleted the empty no throw test in rpc_wallet_tests line 65

fixed some comments

starting verify tests

finished verify message tests

changed some comments
---
 src/test/rpc_wallet_tests.cpp | 87 +++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp
index af34e496e2b4..ac6d8ad8f087 100644
--- a/src/test/rpc_wallet_tests.cpp
+++ b/src/test/rpc_wallet_tests.cpp
@@ -67,6 +67,31 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
 
     LOCK(pwalletMain->cs_wallet);
 
+    CPubKey demoPubkey = pwalletMain->GenerateNewKey();
+	CBitcoinAddress demoAddress = CBitcoinAddress(CTxDestination(demoPubkey.GetID()));
+	Value retValue;
+	string strAccount = "walletDemoAccount";
+	string strPurpose = "receive";
+	BOOST_CHECK_NO_THROW({ /*Initialize Wallet with an account */
+		CWalletDB walletdb(pwalletMain->strWalletFile);
+		CAccount account;
+		account.vchPubKey = demoPubkey;
+		pwalletMain->SetAddressBook(account.vchPubKey.GetID(), strAccount, strPurpose);
+		walletdb.WriteAccount(strAccount, account);
+	});
+
+
+	/*********************************
+	 * 			setaccount
+	 *********************************/
+	BOOST_CHECK_NO_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ nullaccount"));
+	BOOST_CHECK_THROW(CallRPC("setaccount"), runtime_error);
+	/* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X (33 chars) is an illegal address (should be 34 chars) */
+	BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X nullaccount"), runtime_error);
+
+    /*********************************
+     * 			listunspent
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("listunspent"));
     BOOST_CHECK_THROW(CallRPC("listunspent string"), runtime_error);
     BOOST_CHECK_THROW(CallRPC("listunspent 0 string"), runtime_error);
@@ -75,6 +100,9 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     BOOST_CHECK_NO_THROW(r=CallRPC("listunspent 0 1 []"));
     BOOST_CHECK(r.get_array().empty());
 
+    /*********************************
+	 * 		listreceivedbyaddress
+	 *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaddress"));
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaddress 0"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaddress not_int"), runtime_error);
@@ -82,12 +110,71 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaddress 0 true"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaddress 0 true extra"), runtime_error);
 
+    /*********************************
+	 * 		listreceivedbyaccount
+	 *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaccount"));
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaccount 0"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaccount not_int"), runtime_error);
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaccount 0 not_bool"), runtime_error);
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaccount 0 true"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaccount 0 true extra"), runtime_error);
+
+    /*********************************
+	 * 		getrawchangeaddress
+	 *********************************/
+    BOOST_CHECK_NO_THROW(CallRPC("getrawchangeaddress"));
+
+    /*********************************
+	 * 		getnewaddress
+	 *********************************/
+    BOOST_CHECK_NO_THROW(CallRPC("getnewaddress"));
+    BOOST_CHECK_NO_THROW(CallRPC("getnewaddress getnewaddress_demoaccount"));
+
+    /*********************************
+	 * 		getaccountaddress
+	 *********************************/
+    BOOST_CHECK_NO_THROW(CallRPC("getaccountaddress \"\""));
+	BOOST_CHECK_NO_THROW(CallRPC("getaccountaddress accountThatDoesntExists")); // Should generate a new account
+	BOOST_CHECK_NO_THROW(retValue = CallRPC("getaccountaddress " + strAccount));
+	BOOST_CHECK(CBitcoinAddress(retValue.get_str()).Get() == demoAddress.Get());
+
+	/*********************************
+	 * 			getaccount
+	 *********************************/
+	BOOST_CHECK_THROW(CallRPC("getaccount"), runtime_error);
+	BOOST_CHECK_NO_THROW(CallRPC("getaccount " + demoAddress.ToString()));
+
+	/*********************************
+	 * 	signmessage + verifymessage
+	 *********************************/
+	BOOST_CHECK_NO_THROW(retValue = CallRPC("signmessage " + demoAddress.ToString() + " mymessage"));
+	BOOST_CHECK_THROW(CallRPC("signmessage"), runtime_error);
+	/* Should throw error because this address is not loaded in the wallet */
+	BOOST_CHECK_THROW(CallRPC("signmessage 1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ mymessage"), runtime_error);
+
+	/* missing arguments */
+	BOOST_CHECK_THROW(CallRPC("verifymessage "+ demoAddress.ToString()), runtime_error);
+	BOOST_CHECK_THROW(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str()), runtime_error);
+	/* Illegal address */
+	BOOST_CHECK_THROW(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X " + retValue.get_str() + " mymessage"), runtime_error);
+	/* wrong address */
+	BOOST_CHECK(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ " + retValue.get_str() + " mymessage").get_bool() == false);
+	/* Correct address and signature but wrong message */
+	BOOST_CHECK(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str() + " wrongmessage").get_bool() == false);
+	/* Correct address, message and signature*/
+	BOOST_CHECK(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str() + " mymessage").get_bool() == true);
+
+	/*********************************
+	 * 		getaddressesbyaccount
+	 *********************************/
+	BOOST_CHECK_THROW(CallRPC("getaddressesbyaccount"), runtime_error);
+	BOOST_CHECK_NO_THROW(retValue = CallRPC("getaddressesbyaccount " + strAccount));
+	Array arr = retValue.get_array();
+	BOOST_CHECK(arr.size() > 0);
+	BOOST_CHECK(CBitcoinAddress(arr[0].get_str()).Get() == demoAddress.Get());
+
 }
 
+
 BOOST_AUTO_TEST_SUITE_END()

From 3f9a01995e8d43c492eba8e1a08571705bceaef1 Mon Sep 17 00:00:00 2001
From: Alon Muroch <alonmuroch@gmail.com>
Date: Tue, 25 Mar 2014 14:33:44 +0100
Subject: [PATCH 0005/1819] added list/get received by address/ account tests

fixed some annotations and cleaned a bit

received by tests

d
---
 qa/rpc-tests/receivedby.py | 225 +++++++++++++++++++++++++++++++++++++
 1 file changed, 225 insertions(+)
 create mode 100755 qa/rpc-tests/receivedby.py

diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
new file mode 100755
index 000000000000..7f2d79b3c1b4
--- /dev/null
+++ b/qa/rpc-tests/receivedby.py
@@ -0,0 +1,225 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Exercise the listtransactions API
+
+# Add python-bitcoinrpc to module search path:
+
+import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
+
+import json
+import shutil
+import subprocess
+import tempfile
+import traceback
+
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+def get_sub_array_from_array(object_array, to_match):
+    '''
+        Finds and returns a sub array from an array of arrays.
+        to_match should be a unique idetifier of a sub array
+    '''
+    num_matched = 0
+    for item in object_array:
+        all_match = True
+        for key,value in to_match.items():
+            if item[key] != value:
+                all_match = False
+        if not all_match:
+            continue
+        return item
+    return []
+
+def check_array_result(object_array, to_match, expected, should_not_find = False):
+    """
+        Pass in array of JSON objects, a dictionary with key/value pairs
+        to match against, and another dictionary with expected key/value
+        pairs.
+        If the should_not_find flag is true, to_match should not be found in object_array
+        """
+    if should_not_find == True:
+        expected = { }
+    num_matched = 0
+    for item in object_array:
+        all_match = True
+        for key,value in to_match.items():
+            if item[key] != value:
+                all_match = False
+        if not all_match:
+            continue
+        for key,value in expected.items():
+            if item[key] != value:
+                raise AssertionError("%s : expected %s=%s"%(str(item), str(key), str(value)))
+            num_matched = num_matched+1
+    if num_matched == 0 and should_not_find != True:
+        raise AssertionError("No objects matched %s"%(str(to_match)))
+    if num_matched > 0 and should_not_find == True:
+        raise AssertionError("Objects was matched %s"%(str(to_match)))
+
+def run_test(nodes):
+    '''
+        listreceivedbyaddress Test
+    '''
+    # Send from node 0 to 1
+    addr = nodes[1].getnewaddress()
+    txid = nodes[0].sendtoaddress(addr, 0.1)
+    sync_mempools(nodes)
+    
+    #Check not listed in listreceivedbyaddress because has 0 confirmations
+    check_array_result(nodes[1].listreceivedbyaddress(),
+                       {"address":addr},
+                       { },
+                       True)
+    #Bury Tx under 10 block so it will be returned by listreceivedbyaddress
+    nodes[1].setgenerate(True, 10)
+    sync_blocks(nodes)
+    check_array_result(nodes[1].listreceivedbyaddress(),
+                       {"address":addr},
+                       {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
+    #With min confidence < 10
+    check_array_result(nodes[1].listreceivedbyaddress(5),
+                       {"address":addr},
+                       {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
+    #With min confidence > 10, should not find Tx
+    check_array_result(nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True)
+
+    #Empty Tx
+    addr = nodes[1].getnewaddress()
+    check_array_result(nodes[1].listreceivedbyaddress(0,True),
+                       {"address":addr},
+                       {"address":addr, "account":"", "amount":0, "confirmations":0, "txids":[]})
+
+    '''
+        getreceivedbyaddress Test
+    '''
+    # Send from node 0 to 1
+    addr = nodes[1].getnewaddress()
+    txid = nodes[0].sendtoaddress(addr, 0.1)
+    sync_mempools(nodes)
+
+    #Check balance is 0 because of 0 confirmations
+    balance = nodes[1].getreceivedbyaddress(addr)
+    if balance != Decimal("0.0"):
+        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+    #Check balance is 0.1
+    balance = nodes[1].getreceivedbyaddress(addr,0)
+    if balance != Decimal("0.1"):
+        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+    #Bury Tx under 10 block so it will be returned by the default getreceivedbyaddress
+    nodes[1].setgenerate(True, 10)
+    sync_blocks(nodes)
+    balance = nodes[1].getreceivedbyaddress(addr)
+    if balance != Decimal("0.1"):
+        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+    '''
+        listreceivedbyaccount + getreceivedbyaccount Test
+    '''
+    #set pre-state
+    addrArr = nodes[1].getnewaddress()
+    account = nodes[1].getaccount(addrArr)
+    received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(),{"account":account})
+    if len(received_by_account_json) == 0:
+        raise AssertionError("No accounts found in node")
+    balance_by_account = rec_by_accountArr = nodes[1].getreceivedbyaccount(account)
+
+    txid = nodes[0].sendtoaddress(addr, 0.1)
+
+    # listreceivedbyaccount should return received_by_account_json because of 0 confirmations
+    check_array_result(nodes[1].listreceivedbyaccount(),
+                   {"account":account},
+                   received_by_account_json)
+
+    # getreceivedbyaddress should return same balance because of 0 confirmations
+    balance = nodes[1].getreceivedbyaccount(account)
+    if balance != balance_by_account:
+        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
+
+    nodes[1].setgenerate(True, 10)
+    sync_blocks(nodes)
+    # listreceivedbyaccount should return updated account balance
+    check_array_result(nodes[1].listreceivedbyaccount(),
+                       {"account":account},
+                       {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("0.1"))})
+
+    # getreceivedbyaddress should return updates balance
+    balance = nodes[1].getreceivedbyaccount(account)
+    if balance != balance_by_account + Decimal("0.1"):
+        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
+
+    #Create a new account named "mynewaccount" that has a 0 balance
+    nodes[1].getaccountaddress("mynewaccount")
+    received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(0,True),{"account":"mynewaccount"})
+    if len(received_by_account_json) == 0:
+        raise AssertionError("No accounts found in node")
+
+    # Test includeempty of listreceivedbyaccount
+    if received_by_account_json["amount"] != Decimal("0.0"):
+        raise AssertionError("Wrong balance returned by listreceivedbyaccount, %0.2f"%(received_by_account_json["amount"]))
+
+    # Test getreceivedbyaccount for 0 amount accounts
+    balance = nodes[1].getreceivedbyaccount("mynewaccount")
+    if balance != Decimal("0.0"):
+        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
+
+def main():
+    import optparse
+
+    parser = optparse.OptionParser(usage="%prog [options]")
+    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
+                      help="Leave bitcoinds and test.* datadir on exit or error")
+    parser.add_option("--srcdir", dest="srcdir", default="../../src",
+                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
+    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
+                      help="Root directory for datadirs")
+    (options, args) = parser.parse_args()
+
+    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
+
+    check_json_precision()
+
+    success = False
+    nodes = []
+    try:
+        print("Initializing test directory "+options.tmpdir)
+        if not os.path.isdir(options.tmpdir):
+            os.makedirs(options.tmpdir)
+        initialize_chain(options.tmpdir)
+
+        nodes = start_nodes(2, options.tmpdir)
+        connect_nodes(nodes[1], 0)
+        sync_blocks(nodes)
+
+        run_test(nodes)
+
+        success = True
+
+    except AssertionError as e:
+        print("Assertion failed: "+e.message)
+    except Exception as e:
+        print("Unexpected exception caught during testing: "+str(e))
+        traceback.print_tb(sys.exc_info()[2])
+
+    if not options.nocleanup:
+        print("Cleaning up")
+        stop_nodes(nodes)
+        wait_bitcoinds()
+        shutil.rmtree(options.tmpdir)
+
+    if success:
+        print("Tests successful")
+        sys.exit(0)
+    else:
+        print("Failed")
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()

From 48d8eb1847d4218ee24ec1c27c73b90e03b1f007 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 26 Mar 2014 15:50:29 -0400
Subject: [PATCH 0006/1819] script: add CScriptNum class

This class holds an int64_t and replaces the use of CBigInt for script
integrals.
---
 src/script.h | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 149 insertions(+)

diff --git a/src/script.h b/src/script.h
index 657ac0b388bf..9bc06b2e0751 100644
--- a/src/script.h
+++ b/src/script.h
@@ -25,6 +25,155 @@ class CTransaction;
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
 
+class scriptnum_error : public std::runtime_error
+{
+public:
+    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
+};
+
+class CScriptNum
+{
+// Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
+// The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
+// but results may overflow (and are valid as long as they are not used in a subsequent
+// numeric operation). CScriptNum enforces those semantics by storing results as
+// an int64 and allowing out-of-range values to be returned as a vector of bytes but
+// throwing an exception if arithmetic is done or the result is interpreted as an integer.
+public:
+
+    explicit CScriptNum(const int64_t& n)
+    {
+        m_value = n;
+    }
+
+    explicit CScriptNum(const std::vector<unsigned char>& vch)
+    {
+        if (vch.size() > nMaxNumSize)
+            throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow");
+        m_value = set_vch(vch);
+    }
+
+    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
+    inline bool operator!=(const int64_t& rhs) const    { return m_value != rhs; }
+    inline bool operator<=(const int64_t& rhs) const    { return m_value <= rhs; }
+    inline bool operator< (const int64_t& rhs) const    { return m_value <  rhs; }
+    inline bool operator>=(const int64_t& rhs) const    { return m_value >= rhs; }
+    inline bool operator> (const int64_t& rhs) const    { return m_value >  rhs; }
+
+    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
+    inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
+    inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
+    inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
+    inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
+    inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
+
+    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
+    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
+    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
+    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
+
+    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
+    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
+
+    inline CScriptNum operator-()                         const
+    {
+        assert(m_value != std::numeric_limits<int64_t>::min());
+        return CScriptNum(-m_value);
+    }
+
+    inline CScriptNum& operator=( const int64_t& rhs)
+    {
+        m_value = rhs;
+        return *this;
+    }
+
+    inline CScriptNum& operator+=( const int64_t& rhs)
+    {
+        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
+                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
+        m_value += rhs;
+        return *this;
+    }
+
+    inline CScriptNum& operator-=( const int64_t& rhs)
+    {
+        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
+                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
+        m_value -= rhs;
+        return *this;
+    }
+
+    int getint() const
+    {
+        if (m_value > std::numeric_limits<int>::max())
+            return std::numeric_limits<int>::max();
+        else if (m_value < std::numeric_limits<int>::min())
+            return std::numeric_limits<int>::min();
+        return m_value;
+    }
+
+    std::vector<unsigned char> getvch() const
+    {
+        return serialize(m_value);
+    }
+
+    static std::vector<unsigned char> serialize(const int64_t& value)
+    {
+        if(value == 0)
+            return std::vector<unsigned char>();
+
+        std::vector<unsigned char> result;
+        const bool neg = value < 0;
+        uint64_t absvalue = neg ? -value : value;
+
+        while(absvalue)
+        {
+            result.push_back(absvalue & 0xff);
+            absvalue >>= 8;
+        }
+
+
+//    - If the most significant byte is >= 0x80 and the value is positive, push a
+//    new zero-byte to make the significant byte < 0x80 again.
+
+//    - If the most significant byte is >= 0x80 and the value is negative, push a
+//    new 0x80 byte that will be popped off when converting to an integral.
+
+//    - If the most significant byte is < 0x80 and the value is negative, add
+//    0x80 to it, since it will be subtracted and interpreted as a negative when
+//    converting to an integral.
+
+        if (result.back() & 0x80)
+            result.push_back(neg ? 0x80 : 0);
+        else if (neg)
+            result.back() |= 0x80;
+
+        return result;
+    }
+
+    static const size_t nMaxNumSize = 4;
+
+private:
+    static int64_t set_vch(const std::vector<unsigned char>& vch)
+    {
+      if (vch.empty())
+          return 0;
+
+      int64_t result = 0;
+      for (size_t i = 0; i != vch.size(); ++i)
+          result |= static_cast<int64_t>(vch[i]) << 8*i;
+
+      // If the input vector's most significant byte is 0x80, remove it from
+      // the result's msb and return a negative.
+      if (vch.back() & 0x80)
+          return -(result & ~(0x80 << (8 * (vch.size() - 1))));
+
+      return result;
+    }
+
+    int64_t m_value;
+};
+
 /** Signature hash types/flags */
 enum
 {

From 27bff74e39c4c2951a709114e0d565568a0554fa Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 26 Mar 2014 15:55:35 -0400
Subject: [PATCH 0007/1819] script: switch to CScriptNum usage for scripts

---
 src/script.cpp | 44 +++++++++++++++++--------------------------
 src/script.h   | 51 +++++++++++---------------------------------------
 2 files changed, 28 insertions(+), 67 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index 810ba16d28f4..25180e0bbb9e 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -25,22 +25,13 @@ typedef vector<unsigned char> valtype;
 static const valtype vchFalse(0);
 static const valtype vchZero(0);
 static const valtype vchTrue(1, 1);
-static const CBigNum bnZero(0);
-static const CBigNum bnOne(1);
-static const CBigNum bnFalse(0);
-static const CBigNum bnTrue(1);
-static const size_t nMaxNumSize = 4;
+static const CScriptNum bnZero(0);
+static const CScriptNum bnOne(1);
+static const CScriptNum bnFalse(0);
+static const CScriptNum bnTrue(1);
 
 bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
 
-CBigNum CastToBigNum(const valtype& vch)
-{
-    if (vch.size() > nMaxNumSize)
-        throw runtime_error("CastToBigNum() : overflow");
-    // Get rid of extra leading zeros
-    return CBigNum(CBigNum(vch).getvch());
-}
-
 bool CastToBool(const valtype& vch)
 {
     for (unsigned int i = 0; i < vch.size(); i++)
@@ -306,7 +297,6 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
 
 bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
 {
-    CAutoBN_CTX pctx;
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
     CScript::const_iterator pbegincodehash = script.begin();
@@ -380,7 +370,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                 case OP_16:
                 {
                     // ( -- value)
-                    CBigNum bn((int)opcode - (int)(OP_1 - 1));
+                    CScriptNum bn((int)opcode - (int)(OP_1 - 1));
                     stack.push_back(bn.getvch());
                 }
                 break;
@@ -556,7 +546,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                 case OP_DEPTH:
                 {
                     // -- stacksize
-                    CBigNum bn(stack.size());
+                    CScriptNum bn(stack.size());
                     stack.push_back(bn.getvch());
                 }
                 break;
@@ -606,7 +596,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
                     if (stack.size() < 2)
                         return false;
-                    int n = CastToBigNum(stacktop(-1)).getint();
+                    int n = CScriptNum(stacktop(-1)).getint();
                     popstack(stack);
                     if (n < 0 || n >= (int)stack.size())
                         return false;
@@ -654,7 +644,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     // (in -- in size)
                     if (stack.size() < 1)
                         return false;
-                    CBigNum bn(stacktop(-1).size());
+                    CScriptNum bn(stacktop(-1).size());
                     stack.push_back(bn.getvch());
                 }
                 break;
@@ -705,7 +695,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     // (in -- out)
                     if (stack.size() < 1)
                         return false;
-                    CBigNum bn = CastToBigNum(stacktop(-1));
+                    CScriptNum bn(stacktop(-1));
                     switch (opcode)
                     {
                     case OP_1ADD:       bn += bnOne; break;
@@ -738,9 +728,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     // (x1 x2 -- out)
                     if (stack.size() < 2)
                         return false;
-                    CBigNum bn1 = CastToBigNum(stacktop(-2));
-                    CBigNum bn2 = CastToBigNum(stacktop(-1));
-                    CBigNum bn;
+                    CScriptNum bn1(stacktop(-2));
+                    CScriptNum bn2(stacktop(-1));
+                    CScriptNum bn(0);
                     switch (opcode)
                     {
                     case OP_ADD:
@@ -783,9 +773,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     // (x min max -- out)
                     if (stack.size() < 3)
                         return false;
-                    CBigNum bn1 = CastToBigNum(stacktop(-3));
-                    CBigNum bn2 = CastToBigNum(stacktop(-2));
-                    CBigNum bn3 = CastToBigNum(stacktop(-1));
+                    CScriptNum bn1(stacktop(-3));
+                    CScriptNum bn2(stacktop(-2));
+                    CScriptNum bn3(stacktop(-1));
                     bool fValue = (bn2 <= bn1 && bn1 < bn3);
                     popstack(stack);
                     popstack(stack);
@@ -882,7 +872,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     if ((int)stack.size() < i)
                         return false;
 
-                    int nKeysCount = CastToBigNum(stacktop(-i)).getint();
+                    int nKeysCount = CScriptNum(stacktop(-i)).getint();
                     if (nKeysCount < 0 || nKeysCount > 20)
                         return false;
                     nOpCount += nKeysCount;
@@ -893,7 +883,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     if ((int)stack.size() < i)
                         return false;
 
-                    int nSigsCount = CastToBigNum(stacktop(-i)).getint();
+                    int nSigsCount = CScriptNum(stacktop(-i)).getint();
                     if (nSigsCount < 0 || nSigsCount > nKeysCount)
                         return false;
                     int isig = ++i;
diff --git a/src/script.h b/src/script.h
index 9bc06b2e0751..7781ea61c792 100644
--- a/src/script.h
+++ b/src/script.h
@@ -374,7 +374,7 @@ const char* GetOpName(opcodetype opcode);
 inline std::string ValueString(const std::vector<unsigned char>& vch)
 {
     if (vch.size() <= 4)
-        return strprintf("%d", CBigNum(vch).getint());
+        return strprintf("%d", CScriptNum(vch).getint());
     else
         return HexStr(vch);
 }
@@ -410,26 +410,10 @@ class CScript : public std::vector<unsigned char>
         }
         else
         {
-            CBigNum bn(n);
-            *this << bn.getvch();
+            *this << CScriptNum::serialize(n);
         }
         return *this;
     }
-
-    CScript& push_uint64(uint64_t n)
-    {
-        if (n >= 1 && n <= 16)
-        {
-            push_back(n + (OP_1 - 1));
-        }
-        else
-        {
-            CBigNum bn(n);
-            *this << bn.getvch();
-        }
-        return *this;
-    }
-
 public:
     CScript() { }
     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
@@ -452,35 +436,16 @@ class CScript : public std::vector<unsigned char>
     }
 
 
-    //explicit CScript(char b) is not portable.  Use 'signed char' or 'unsigned char'.
-    explicit CScript(signed char b)        { operator<<(b); }
-    explicit CScript(short b)              { operator<<(b); }
-    explicit CScript(int b)                { operator<<(b); }
-    explicit CScript(long b)               { operator<<(b); }
-    explicit CScript(long long b)          { operator<<(b); }
-    explicit CScript(unsigned char b)      { operator<<(b); }
-    explicit CScript(unsigned int b)       { operator<<(b); }
-    explicit CScript(unsigned short b)     { operator<<(b); }
-    explicit CScript(unsigned long b)      { operator<<(b); }
-    explicit CScript(unsigned long long b) { operator<<(b); }
+    CScript(int64_t b)        { operator<<(b); }
 
     explicit CScript(opcodetype b)     { operator<<(b); }
     explicit CScript(const uint256& b) { operator<<(b); }
+    explicit CScript(const CScriptNum& b) { operator<<(b); }
     explicit CScript(const CBigNum& b) { operator<<(b); }
     explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
 
 
-    //CScript& operator<<(char b) is not portable.  Use 'signed char' or 'unsigned char'.
-    CScript& operator<<(signed char b)        { return push_int64(b); }
-    CScript& operator<<(short b)              { return push_int64(b); }
-    CScript& operator<<(int b)                { return push_int64(b); }
-    CScript& operator<<(long b)               { return push_int64(b); }
-    CScript& operator<<(long long b)          { return push_int64(b); }
-    CScript& operator<<(unsigned char b)      { return push_uint64(b); }
-    CScript& operator<<(unsigned int b)       { return push_uint64(b); }
-    CScript& operator<<(unsigned short b)     { return push_uint64(b); }
-    CScript& operator<<(unsigned long b)      { return push_uint64(b); }
-    CScript& operator<<(unsigned long long b) { return push_uint64(b); }
+    CScript& operator<<(int64_t b) { return push_int64(b); }
 
     CScript& operator<<(opcodetype opcode)
     {
@@ -518,6 +483,12 @@ class CScript : public std::vector<unsigned char>
         return *this;
     }
 
+    CScript& operator<<(const CScriptNum& b)
+    {
+        *this << b.getvch();
+        return *this;
+    }
+
     CScript& operator<<(const std::vector<unsigned char>& b)
     {
         if (b.size() < OP_PUSHDATA1)

From 4f497cd97da4f9c88790a5f4e97926804669dfca Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 26 Mar 2014 15:56:45 -0400
Subject: [PATCH 0008/1819] script: switch outside users to CScriptNum

---
 src/chainparams.cpp | 2 +-
 src/miner.cpp       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index b52774ee20b8..eb56800b92fb 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -125,7 +125,7 @@ class CMainParams : public CChainParams {
         CTransaction txNew;
         txNew.vin.resize(1);
         txNew.vout.resize(1);
-        txNew.vin[0].scriptSig = CScript() << 486604799 << CBigNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
+        txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
         txNew.vout[0].nValue = 50 * COIN;
         txNew.vout[0].scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
         genesis.vtx.push_back(txNew);
diff --git a/src/miner.cpp b/src/miner.cpp
index 3351908e6577..f21ee0c3a897 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -355,7 +355,7 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
     }
     ++nExtraNonce;
     unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
-    pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CBigNum(nExtraNonce)) + COINBASE_FLAGS;
+    pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
     assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100);
 
     pblock->hashMerkleRoot = pblock->BuildMerkleTree();

From 05e3ecffa495c0905b88cfc92b23bb519b7fe70b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 26 Mar 2014 15:57:21 -0400
Subject: [PATCH 0009/1819] script: remove bignum dependency

---
 src/script.cpp | 1 -
 src/script.h   | 8 --------
 2 files changed, 9 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index 25180e0bbb9e..81d275445375 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -5,7 +5,6 @@
 
 #include "script.h"
 
-#include "bignum.h"
 #include "core.h"
 #include "hash.h"
 #include "key.h"
diff --git a/src/script.h b/src/script.h
index 7781ea61c792..1742ce81f810 100644
--- a/src/script.h
+++ b/src/script.h
@@ -6,7 +6,6 @@
 #ifndef H_BITCOIN_SCRIPT
 #define H_BITCOIN_SCRIPT
 
-#include "bignum.h"
 #include "key.h"
 #include "util.h"
 
@@ -441,7 +440,6 @@ class CScript : public std::vector<unsigned char>
     explicit CScript(opcodetype b)     { operator<<(b); }
     explicit CScript(const uint256& b) { operator<<(b); }
     explicit CScript(const CScriptNum& b) { operator<<(b); }
-    explicit CScript(const CBigNum& b) { operator<<(b); }
     explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
 
 
@@ -477,12 +475,6 @@ class CScript : public std::vector<unsigned char>
         return *this;
     }
 
-    CScript& operator<<(const CBigNum& b)
-    {
-        *this << b.getvch();
-        return *this;
-    }
-
     CScript& operator<<(const CScriptNum& b)
     {
         *this << b.getvch();

From 90320d67779be5c97061380c035d3fe51b7ce74b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 22 Apr 2014 00:10:33 -0400
Subject: [PATCH 0010/1819] script: add additional script tests

---
 src/test/data/script_invalid.json |  3 +++
 src/test/data/script_valid.json   | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 8cb365a46fcc..fdceb1ffa920 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -257,7 +257,10 @@
 ["1","0xba", "0xba == OP_NOP10 + 1"],
 
 ["2147483648", "1ADD 1", "We cannot do math on 5-byte integers"],
+["2147483648", "NEGATE 1", "We cannot do math on 5-byte integers"],
 ["-2147483648", "1ADD 1", "Because we use a sign bit, -2147483648 is also 5 bytes"],
+["2147483647", "1ADD 1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
+["2147483648", "1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
 
 ["1", "1 ENDIF", "ENDIF without IF"],
 ["1", "IF 1", "IF without ENDIF"],
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 3b4c191865c9..67b985e355a8 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -97,6 +97,9 @@
 ["8388608", "SIZE 4 EQUAL"],
 ["2147483647", "SIZE 4 EQUAL"],
 ["2147483648", "SIZE 5 EQUAL"],
+["549755813887", "SIZE 5 EQUAL"],
+["549755813888", "SIZE 6 EQUAL"],
+["9223372036854775807", "SIZE 8 EQUAL"],
 ["-1", "SIZE 1 EQUAL"],
 ["-127", "SIZE 1 EQUAL"],
 ["-128", "SIZE 2 EQUAL"],
@@ -106,6 +109,9 @@
 ["-8388608", "SIZE 4 EQUAL"],
 ["-2147483647", "SIZE 4 EQUAL"],
 ["-2147483648", "SIZE 5 EQUAL"],
+["-549755813887", "SIZE 5 EQUAL"],
+["-549755813888", "SIZE 6 EQUAL"],
+["-9223372036854775807", "SIZE 8 EQUAL"],
 ["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL"],
 
 
@@ -306,6 +312,9 @@
 ["8388608", "0x04 0x00008000 EQUAL"],
 ["2147483647", "0x04 0xFFFFFF7F EQUAL"],
 ["2147483648", "0x05 0x0000008000 EQUAL"],
+["549755813887", "0x05 0xFFFFFFFF7F EQUAL"],
+["549755813888", "0x06 0xFFFFFFFF7F EQUAL"],
+["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL"],
 ["-1", "0x01 0x81 EQUAL", "Numbers are little-endian with the MSB being a sign bit"],
 ["-127", "0x01 0xFF EQUAL"],
 ["-128", "0x02 0x8080 EQUAL"],
@@ -315,6 +324,10 @@
 ["-8388608", "0x04 0x00008080 EQUAL"],
 ["-2147483647", "0x04 0xFFFFFFFF EQUAL"],
 ["-2147483648", "0x05 0x0000008080 EQUAL"],
+["-4294967295", "0x05 0xFFFFFFFF80 EQUAL"],
+["-549755813887", "0x05 0xFFFFFFFFFF EQUAL"],
+["-549755813888", "0x06 0x000000008080 EQUAL"],
+["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL"],
 
 ["2147483647", "1ADD 2147483648 EQUAL", "We can do math on 4-byte integers, and compare 5-byte ones"],
 ["2147483647", "1ADD 1"],

From b1fdd5475d9040445d7655730f262f214ea87c5f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 22 Apr 2014 00:11:39 -0400
Subject: [PATCH 0011/1819] script: Add test for CScriptNum

Because this class replaces some usages of CBigNum, tests have been added to
verify that they function the same way. The only difference in their usage is
the handling of out-of-range numbers.

While operands are constrained to [-0x7FFFFFFF,0x7FFFFFFF], the results may
overflow. The overflowing result is technically unbounded, but in practice
it can be no bigger than the result of an operation on two operands. This
implementation limits them to the size of an int64.

CBigNum was unaware of this constraint, so it allowed for unbounded results,
which were then checked before use. CScriptNum asserts if an arithmetic
operation will overflow an int64_t, since scripts are not able to reach those
numbers anyway. Additionally, CScriptNum will throw an exception when
constructed from a vector containing more than 4 bytes This mimics the previous
CastToBigNum behavior.
---
 src/test/Makefile.am         |   1 +
 src/test/scriptnum_tests.cpp | 196 +++++++++++++++++++++++++++++++++++
 2 files changed, 197 insertions(+)
 create mode 100644 src/test/scriptnum_tests.cpp

diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index b375ba1306d7..e12f4904f14c 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -61,6 +61,7 @@ test_bitcoin_SOURCES = \
   transaction_tests.cpp \
   uint256_tests.cpp \
   util_tests.cpp \
+  scriptnum_tests.cpp \
   sighash_tests.cpp \
   $(JSON_TEST_FILES) $(RAW_TEST_FILES)
 
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp
new file mode 100644
index 000000000000..cd194cc4d983
--- /dev/null
+++ b/src/test/scriptnum_tests.cpp
@@ -0,0 +1,196 @@
+// Copyright (c) 2012-2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "bignum.h"
+#include "script.h"
+#include <boost/test/unit_test.hpp>
+#include <limits.h>
+#include <stdint.h>
+BOOST_AUTO_TEST_SUITE(scriptnum_tests)
+
+static const int64_t values[] = \
+{ 0, 1, CHAR_MIN, CHAR_MAX, UCHAR_MAX, SHRT_MIN, USHRT_MAX, INT_MIN, INT_MAX, UINT_MAX, LONG_MIN, LONG_MAX };
+static const int64_t offsets[] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000};
+
+static bool verify(const CBigNum& bignum, const CScriptNum& scriptnum)
+{
+    return bignum.getvch() == scriptnum.getvch() && bignum.getint() == scriptnum.getint();
+}
+
+static void CheckCreateVch(const int64_t& num)
+{
+    CBigNum bignum(num);
+    CScriptNum scriptnum(num);
+    BOOST_CHECK(verify(bignum, scriptnum));
+
+    CBigNum bignum2(bignum.getvch());
+    CScriptNum scriptnum2(scriptnum.getvch());
+    BOOST_CHECK(verify(bignum2, scriptnum2));
+
+    CBigNum bignum3(scriptnum2.getvch());
+    CScriptNum scriptnum3(bignum2.getvch());
+    BOOST_CHECK(verify(bignum3, scriptnum3));
+}
+
+static void CheckCreateInt(const int64_t& num)
+{
+    CBigNum bignum(num);
+    CScriptNum scriptnum(num);
+    BOOST_CHECK(verify(bignum, scriptnum));
+    BOOST_CHECK(verify(bignum.getint(), CScriptNum(scriptnum.getint())));
+    BOOST_CHECK(verify(scriptnum.getint(), CScriptNum(bignum.getint())));
+    BOOST_CHECK(verify(CBigNum(scriptnum.getint()).getint(), CScriptNum(CScriptNum(bignum.getint()).getint())));
+}
+
+
+static void CheckAdd(const int64_t& num1, const int64_t& num2)
+{
+    const CBigNum bignum1(num1);
+    const CBigNum bignum2(num2);
+    const CScriptNum scriptnum1(num1);
+    const CScriptNum scriptnum2(num2);
+    CBigNum bignum3(num1);
+    CBigNum bignum4(num1);
+    CScriptNum scriptnum3(num1);
+    CScriptNum scriptnum4(num1);
+
+    // int64_t overflow is undefined.
+    bool invalid = (((num2 > 0) && (num1 > (std::numeric_limits<int64_t>::max() - num2))) ||
+                    ((num2 < 0) && (num1 < (std::numeric_limits<int64_t>::min() - num2))));
+    if (!invalid)
+    {
+        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum1 + scriptnum2));
+        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum1 + num2));
+        BOOST_CHECK(verify(bignum1 + bignum2, scriptnum2 + num1));
+    }
+}
+
+static void CheckNegate(const int64_t& num)
+{
+    const CBigNum bignum(num);
+    const CScriptNum scriptnum(num);
+
+    // -INT64_MIN is undefined
+    if (num != std::numeric_limits<int64_t>::min())
+        BOOST_CHECK(verify(-bignum, -scriptnum));
+}
+
+static void CheckSubtract(const int64_t& num1, const int64_t& num2)
+{
+    const CBigNum bignum1(num1);
+    const CBigNum bignum2(num2);
+    const CScriptNum scriptnum1(num1);
+    const CScriptNum scriptnum2(num2);
+    bool invalid = false;
+
+    // int64_t overflow is undefined.
+    invalid = ((num2 > 0 && num1 < std::numeric_limits<int64_t>::min() + num2) ||
+               (num2 < 0 && num1 > std::numeric_limits<int64_t>::max() + num2));
+    if (!invalid)
+    {
+        BOOST_CHECK(verify(bignum1 - bignum2, scriptnum1 - scriptnum2));
+        BOOST_CHECK(verify(bignum1 - bignum2, scriptnum1 - num2));
+    }
+
+    invalid = ((num1 > 0 && num2 < std::numeric_limits<int64_t>::min() + num1) ||
+               (num1 < 0 && num2 > std::numeric_limits<int64_t>::max() + num1));
+    if (!invalid)
+    {
+        BOOST_CHECK(verify(bignum2 - bignum1, scriptnum2 - scriptnum1));
+        BOOST_CHECK(verify(bignum2 - bignum1, scriptnum2 - num1));
+    }
+}
+
+static void CheckCompare(const int64_t& num1, const int64_t& num2)
+{
+    const CBigNum bignum1(num1);
+    const CBigNum bignum2(num2);
+    const CScriptNum scriptnum1(num1);
+    const CScriptNum scriptnum2(num2);
+
+    BOOST_CHECK((bignum1 == bignum1) == (scriptnum1 == scriptnum1));
+    BOOST_CHECK((bignum1 != bignum1) ==  (scriptnum1 != scriptnum1));
+    BOOST_CHECK((bignum1 < bignum1) ==  (scriptnum1 < scriptnum1));
+    BOOST_CHECK((bignum1 > bignum1) ==  (scriptnum1 > scriptnum1));
+    BOOST_CHECK((bignum1 >= bignum1) ==  (scriptnum1 >= scriptnum1));
+    BOOST_CHECK((bignum1 <= bignum1) ==  (scriptnum1 <= scriptnum1));
+
+    BOOST_CHECK((bignum1 == bignum1) == (scriptnum1 == num1));
+    BOOST_CHECK((bignum1 != bignum1) ==  (scriptnum1 != num1));
+    BOOST_CHECK((bignum1 < bignum1) ==  (scriptnum1 < num1));
+    BOOST_CHECK((bignum1 > bignum1) ==  (scriptnum1 > num1));
+    BOOST_CHECK((bignum1 >= bignum1) ==  (scriptnum1 >= num1));
+    BOOST_CHECK((bignum1 <= bignum1) ==  (scriptnum1 <= num1));
+
+    BOOST_CHECK((bignum1 == bignum2) ==  (scriptnum1 == scriptnum2));
+    BOOST_CHECK((bignum1 != bignum2) ==  (scriptnum1 != scriptnum2));
+    BOOST_CHECK((bignum1 < bignum2) ==  (scriptnum1 < scriptnum2));
+    BOOST_CHECK((bignum1 > bignum2) ==  (scriptnum1 > scriptnum2));
+    BOOST_CHECK((bignum1 >= bignum2) ==  (scriptnum1 >= scriptnum2));
+    BOOST_CHECK((bignum1 <= bignum2) ==  (scriptnum1 <= scriptnum2));
+
+    BOOST_CHECK((bignum1 == bignum2) ==  (scriptnum1 == num2));
+    BOOST_CHECK((bignum1 != bignum2) ==  (scriptnum1 != num2));
+    BOOST_CHECK((bignum1 < bignum2) ==  (scriptnum1 < num2));
+    BOOST_CHECK((bignum1 > bignum2) ==  (scriptnum1 > num2));
+    BOOST_CHECK((bignum1 >= bignum2) ==  (scriptnum1 >= num2));
+    BOOST_CHECK((bignum1 <= bignum2) ==  (scriptnum1 <= num2));
+}
+
+static void RunCreate(const int64_t& num)
+{
+    CheckCreateInt(num);
+    CScriptNum scriptnum(num);
+    if (scriptnum.getvch().size() <= CScriptNum::nMaxNumSize)
+        CheckCreateVch(num);
+    else
+    {
+        BOOST_CHECK_THROW (CheckCreateVch(num), scriptnum_error);
+    }
+}
+
+static void RunOperators(const int64_t& num1, const int64_t& num2)
+{
+    CheckAdd(num1, num2);
+    CheckSubtract(num1, num2);
+    CheckNegate(num1);
+    CheckCompare(num1, num2);
+}
+
+BOOST_AUTO_TEST_CASE(creation)
+{
+    for(size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i)
+    {
+        for(size_t j = 0; j < sizeof(offsets) / sizeof(offsets[0]); ++j)
+        {
+            RunCreate(values[i]);
+            RunCreate(values[i] + offsets[j]);
+            RunCreate(values[i] - offsets[j]);
+        }
+    }
+}
+
+BOOST_AUTO_TEST_CASE(operators)
+{
+    for(size_t i = 0; i < sizeof(values) / sizeof(values[0]); ++i)
+    {
+        for(size_t j = 0; j < sizeof(offsets) / sizeof(offsets[0]); ++j)
+        {
+            RunOperators(values[i], values[i]);
+            RunOperators(values[i], -values[i]);
+            RunOperators(values[i], values[j]);
+            RunOperators(values[i], -values[j]);
+            RunOperators(values[i] + values[j], values[j]);
+            RunOperators(values[i] + values[j], -values[j]);
+            RunOperators(values[i] - values[j], values[j]);
+            RunOperators(values[i] - values[j], -values[j]);
+            RunOperators(values[i] + values[j], values[i] + values[j]);
+            RunOperators(values[i] + values[j], values[i] - values[j]);
+            RunOperators(values[i] - values[j], values[i] + values[j]);
+            RunOperators(values[i] - values[j], values[i] - values[j]);
+        }
+    }
+}
+
+BOOST_AUTO_TEST_SUITE_END()

From f457347053029d6a0248036a1ffeb7127108fd6d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 11 Mar 2014 17:36:21 +0100
Subject: [PATCH 0012/1819] Split up CheckBlock in a block and header version

---
 src/main.cpp | 26 +++++++++++++++++---------
 src/main.h   |  1 +
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 7a6d4b39de27..66800cc22452 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2288,16 +2288,8 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
 }
 
 
-bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bool fCheckMerkleRoot)
+bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW)
 {
-    // These are checks that are independent of context
-    // that can be verified before saving an orphan block.
-
-    // Size limits
-    if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
-        return state.DoS(100, error("CheckBlock() : size limits failed"),
-                         REJECT_INVALID, "bad-blk-length");
-
     // Check proof of work matches claimed amount
     if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits))
         return state.DoS(50, error("CheckBlock() : proof of work failed"),
@@ -2308,6 +2300,22 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         return state.Invalid(error("CheckBlock() : block timestamp too far in the future"),
                              REJECT_INVALID, "time-too-new");
 
+    return true;
+}
+
+bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bool fCheckMerkleRoot)
+{
+    // These are checks that are independent of context
+    // that can be verified before saving an orphan block.
+
+    if (!CheckBlockHeader(block, state, fCheckPOW))
+        return false;
+
+    // Size limits
+    if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
+        return state.DoS(100, error("CheckBlock() : size limits failed"),
+                         REJECT_INVALID, "bad-blk-length");
+
     // First transaction must be coinbase, the rest must not be
     if (block.vtx.empty() || !block.vtx[0].IsCoinBase())
         return state.DoS(100, error("CheckBlock() : first tx is not coinbase"),
diff --git a/src/main.h b/src/main.h
index aff20d0379f6..8e3f1d95cecb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -603,6 +603,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos& pos);
 
 // Context-independent validity checks
+bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
 bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
 
 // Store block on disk

From 942b33a19d3aa96326acc044c1834c48beff777c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 13 Mar 2014 03:48:27 +0100
Subject: [PATCH 0013/1819] Split AcceptBlockHeader from AcceptBlock.

Also modify some connection logic to deal with non-full blocks in the index.
---
 src/main.cpp | 200 +++++++++++++++++++++++++++++++++++----------------
 src/main.h   |  26 ++++++-
 2 files changed, 162 insertions(+), 64 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 66800cc22452..05f13dfda6ad 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1849,8 +1849,13 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     if (fJustCheck)
         return true;
 
+    // Correct transaction counts.
+    pindex->nTx = block.vtx.size();
+    if (pindex->pprev)
+        pindex->nChainTx = pindex->pprev->nChainTx + block.vtx.size();
+
     // Write undo information to disk
-    if (pindex->GetUndoPos().IsNull() || (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_SCRIPTS)
+    if (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS))
     {
         if (pindex->GetUndoPos().IsNull()) {
             CDiskBlockPos pos;
@@ -1864,7 +1869,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
             pindex->nStatus |= BLOCK_HAVE_UNDO;
         }
 
-        pindex->nStatus = (pindex->nStatus & ~BLOCK_VALID_MASK) | BLOCK_VALID_SCRIPTS;
+        pindex->RaiseValidity(BLOCK_VALID_SCRIPTS);
 
         CDiskBlockIndex blockindex(pindex);
         if (!pblocktree->WriteBlockIndex(blockindex))
@@ -2058,10 +2063,11 @@ void static FindMostWorkChain() {
         CBlockIndex *pindexTest = pindexNew;
         bool fInvalidAncestor = false;
         while (pindexTest && !chainActive.Contains(pindexTest)) {
-            if (pindexTest->nStatus & BLOCK_FAILED_MASK) {
+            if (!pindexTest->IsValid(BLOCK_VALID_TRANSACTIONS) || !(pindexTest->nStatus & BLOCK_HAVE_DATA)) {
                 // Candidate has an invalid ancestor, remove entire chain from the set.
                 if (pindexBestInvalid == NULL || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
-                    pindexBestInvalid = pindexNew;                CBlockIndex *pindexFailed = pindexNew;
+                    pindexBestInvalid = pindexNew;
+                CBlockIndex *pindexFailed = pindexNew;
                 while (pindexTest != pindexFailed) {
                     pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
                     setBlockIndexValid.erase(pindexFailed);
@@ -2135,12 +2141,14 @@ bool ActivateBestChain(CValidationState &state) {
     return true;
 }
 
-bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos& pos)
+
+CBlockIndex* AddToBlockIndex(CBlockHeader& block)
 {
     // Check for duplicate
     uint256 hash = block.GetHash();
-    if (mapBlockIndex.count(hash))
-        return state.Invalid(error("AddToBlockIndex() : %s already exists", hash.ToString()), 0, "duplicate");
+    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(hash);
+    if (it != mapBlockIndex.end())
+        return it->second;
 
     // Construct new block index object
     CBlockIndex* pindexNew = new CBlockIndex(block);
@@ -2157,14 +2165,38 @@ bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos
         pindexNew->pprev = (*miPrev).second;
         pindexNew->nHeight = pindexNew->pprev->nHeight + 1;
     }
-    pindexNew->nTx = block.vtx.size();
     pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork().getuint256();
-    pindexNew->nChainTx = (pindexNew->pprev ? pindexNew->pprev->nChainTx : 0) + pindexNew->nTx;
+    pindexNew->RaiseValidity(BLOCK_VALID_TREE);
+
+    return pindexNew;
+}
+
+
+// Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS).
+bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
+{
+    pindexNew->nTx = block.vtx.size();
+    if (pindexNew->pprev) {
+        // Not the genesis block.
+        if (pindexNew->pprev->nChainTx) {
+            // This parent's block's total number transactions is known, so compute outs.
+            pindexNew->nChainTx = pindexNew->pprev->nChainTx + pindexNew->nTx;
+        } else {
+            // The total number of transactions isn't known yet.
+            // We will compute it when the block is connected.
+            pindexNew->nChainTx = 0;
+        }
+    } else {
+        // Genesis block.
+        pindexNew->nChainTx = pindexNew->nTx;
+    }
     pindexNew->nFile = pos.nFile;
     pindexNew->nDataPos = pos.nPos;
     pindexNew->nUndoPos = 0;
-    pindexNew->nStatus = BLOCK_VALID_TRANSACTIONS | BLOCK_HAVE_DATA;
-    setBlockIndexValid.insert(pindexNew);
+    pindexNew->nStatus |= BLOCK_HAVE_DATA;
+
+    if (pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS))
+        setBlockIndexValid.insert(pindexNew);
 
     if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
         return state.Abort(_("Failed to write block index"));
@@ -2292,14 +2324,35 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
 {
     // Check proof of work matches claimed amount
     if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits))
-        return state.DoS(50, error("CheckBlock() : proof of work failed"),
+        return state.DoS(50, error("CheckBlockHeader() : proof of work failed"),
                          REJECT_INVALID, "high-hash");
 
     // Check timestamp
     if (block.GetBlockTime() > GetAdjustedTime() + 2 * 60 * 60)
-        return state.Invalid(error("CheckBlock() : block timestamp too far in the future"),
+        return state.Invalid(error("CheckBlockHeader() : block timestamp too far in the future"),
                              REJECT_INVALID, "time-too-new");
 
+    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
+    if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
+    {
+        // Extra checks to prevent "fill up memory by spamming with bogus blocks"
+        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->nTime;
+        if (deltaTime < 0)
+        {
+            return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
+                             REJECT_CHECKPOINT, "time-too-old");
+        }
+        CBigNum bnNewBlock;
+        bnNewBlock.SetCompact(block.nBits);
+        CBigNum bnRequired;
+        bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
+        if (bnNewBlock > bnRequired)
+        {
+            return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
+                             REJECT_INVALID, "bad-diffbits");
+        }
+    }
+
     return true;
 }
 
@@ -2362,13 +2415,18 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     return true;
 }
 
-bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
+bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex** ppindex)
 {
     AssertLockHeld(cs_main);
     // Check for duplicate
     uint256 hash = block.GetHash();
-    if (mapBlockIndex.count(hash))
-        return state.Invalid(error("AcceptBlock() : block already in mapBlockIndex"), 0, "duplicate");
+    std::map<uint256, CBlockIndex*>::iterator miSelf = mapBlockIndex.find(hash);
+    CBlockIndex *pindex = NULL;
+    if (miSelf != mapBlockIndex.end()) {
+        pindex = miSelf->second;
+        if (pindex->nStatus & BLOCK_FAILED_MASK)
+            return state.Invalid(error("AcceptBlock() : block is marked invalid"), 0, "duplicate");
+    }
 
     // Get prev block index
     CBlockIndex* pindexPrev = NULL;
@@ -2390,12 +2448,6 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
             return state.Invalid(error("AcceptBlock() : block's timestamp is too early"),
                                  REJECT_INVALID, "time-too-old");
 
-        // Check that all transactions are finalized
-        BOOST_FOREACH(const CTransaction& tx, block.vtx)
-            if (!IsFinalTx(tx, nHeight, block.GetBlockTime()))
-                return state.DoS(10, error("AcceptBlock() : contains a non-final transaction"),
-                                 REJECT_INVALID, "bad-txns-nonfinal");
-
         // Check that the block chain matches the known block chain up to a checkpoint
         if (!Checkpoints::CheckBlock(nHeight, hash))
             return state.DoS(100, error("AcceptBlock() : rejected by checkpoint lock-in at %d", nHeight),
@@ -2416,18 +2468,57 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
                                      REJECT_OBSOLETE, "bad-version");
             }
         }
-        // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
-        if (block.nVersion >= 2)
+    }
+
+    if (pindex == NULL)
+        pindex = AddToBlockIndex(block);
+
+    if (ppindex)
+        *ppindex = pindex;
+
+    return true;
+}
+
+bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex, CDiskBlockPos* dbp)
+{
+    AssertLockHeld(cs_main);
+
+    CBlockIndex *&pindex = *ppindex;
+
+    if (!AcceptBlockHeader(block, state, &pindex))
+        return false;
+
+    if (!CheckBlock(block, state)) {
+        if (state.Invalid() && !state.CorruptionPossible()) {
+            pindex->nStatus |= BLOCK_FAILED_VALID;
+        }
+        return false;
+    }
+
+    int nHeight = pindex->nHeight;
+    uint256 hash = pindex->GetBlockHash();
+
+    // Check that all transactions are finalized
+    BOOST_FOREACH(const CTransaction& tx, block.vtx)
+        if (!IsFinalTx(tx, nHeight, block.GetBlockTime())) {
+            pindex->nStatus |= BLOCK_FAILED_VALID;
+            return state.DoS(10, error("AcceptBlock() : contains a non-final transaction"),
+                             REJECT_INVALID, "bad-txns-nonfinal");
+        }
+
+    // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
+    if (block.nVersion >= 2)
+    {
+        // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
+        if ((!TestNet() && CBlockIndex::IsSuperMajority(2, pindex->pprev, 750, 1000)) ||
+            (TestNet() && CBlockIndex::IsSuperMajority(2, pindex->pprev, 51, 100)))
         {
-            // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
-            if ((!TestNet() && CBlockIndex::IsSuperMajority(2, pindexPrev, 750, 1000)) ||
-                (TestNet() && CBlockIndex::IsSuperMajority(2, pindexPrev, 51, 100)))
-            {
-                CScript expect = CScript() << nHeight;
-                if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
-                    !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin()))
-                    return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase"),
-                                     REJECT_INVALID, "bad-cb-height");
+            CScript expect = CScript() << nHeight;
+            if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
+                !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
+                pindex->nStatus |= BLOCK_FAILED_VALID;
+                return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase"),
+                                 REJECT_INVALID, "bad-cb-height");
             }
         }
     }
@@ -2443,8 +2534,8 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp)
         if (dbp == NULL)
             if (!WriteBlockToDisk(block, blockPos))
                 return state.Abort(_("Failed to write block"));
-        if (!AddToBlockIndex(block, state, blockPos))
-            return error("AcceptBlock() : AddToBlockIndex failed");
+        if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
+            return error("AcceptBlock() : ReceivedBlockTransactions failed");
     } catch(std::runtime_error &e) {
         return state.Abort(_("System error: ") + e.what());
     }
@@ -2514,30 +2605,9 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
     if (!CheckBlock(*pblock, state))
         return error("ProcessBlock() : CheckBlock FAILED");
 
-    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
-    if (pcheckpoint && pblock->hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
-    {
-        // Extra checks to prevent "fill up memory by spamming with bogus blocks"
-        int64_t deltaTime = pblock->GetBlockTime() - pcheckpoint->nTime;
-        if (deltaTime < 0)
-        {
-            return state.DoS(100, error("ProcessBlock() : block with timestamp before last checkpoint"),
-                             REJECT_CHECKPOINT, "time-too-old");
-        }
-        CBigNum bnNewBlock;
-        bnNewBlock.SetCompact(pblock->nBits);
-        CBigNum bnRequired;
-        bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
-        if (bnNewBlock > bnRequired)
-        {
-            return state.DoS(100, error("ProcessBlock() : block with too little proof-of-work"),
-                             REJECT_INVALID, "bad-diffbits");
-        }
-    }
-
-
-    // If we don't already have its previous block, shunt it off to holding area until we get it
-    if (pblock->hashPrevBlock != 0 && !mapBlockIndex.count(pblock->hashPrevBlock))
+    // If we don't already have its previous block (with full data), shunt it off to holding area until we get it
+    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(pblock->hashPrevBlock);
+    if (pblock->hashPrevBlock != 0 && (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)))
     {
         LogPrintf("ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString());
 
@@ -2562,7 +2632,9 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
     }
 
     // Store to disk
-    if (!AcceptBlock(*pblock, state, dbp))
+    CBlockIndex *pindex = NULL;
+    bool ret = AcceptBlock(*pblock, state, &pindex, dbp);
+    if (!ret)
         return error("ProcessBlock() : AcceptBlock FAILED");
 
     // Recursively process any orphan blocks that depended on this one
@@ -2583,7 +2655,8 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
             block.BuildMerkleTree();
             // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan resolution (that is, feeding people an invalid block based on LegitBlockX in order to get anyone relaying LegitBlockX banned)
             CValidationState stateDummy;
-            if (AcceptBlock(block, stateDummy))
+            CBlockIndex *pindexChild = NULL;
+            if (AcceptBlock(block, stateDummy, &pindexChild))
                 vWorkQueue.push_back(mi->second->hashBlock);
             mapOrphanBlocks.erase(mi->second->hashBlock);
             delete mi->second;
@@ -2846,7 +2919,7 @@ bool static LoadBlockIndexDB()
         CBlockIndex* pindex = item.second;
         pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + pindex->GetBlockWork().getuint256();
         pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
-        if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TRANSACTIONS && !(pindex->nStatus & BLOCK_FAILED_MASK))
+        if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS))
             setBlockIndexValid.insert(pindex);
         if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork))
             pindexBestInvalid = pindex;
@@ -2993,7 +3066,8 @@ bool InitBlockIndex() {
                 return error("LoadBlockIndex() : FindBlockPos failed");
             if (!WriteBlockToDisk(block, blockPos))
                 return error("LoadBlockIndex() : writing genesis block to disk failed");
-            if (!AddToBlockIndex(block, state, blockPos))
+            CBlockIndex *pindex = AddToBlockIndex(block);
+            if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
                 return error("LoadBlockIndex() : genesis block not accepted");
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
diff --git a/src/main.h b/src/main.h
index 8e3f1d95cecb..77a6fbe9dcdd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -608,7 +608,8 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = t
 
 // Store block on disk
 // if dbp is provided, the file is known to already reside on disk
-bool AcceptBlock(CBlock& block, CValidationState& state, CDiskBlockPos* dbp = NULL);
+bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex **pindex, CDiskBlockPos* dbp = NULL);
+bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex **ppindex= NULL);
 
 
 
@@ -866,6 +867,29 @@ class CBlockIndex
     {
         LogPrintf("%s\n", ToString().c_str());
     }
+
+    // Check whether this block index entry is valid up to the passed validity level.
+    bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
+    {
+        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
+        if (nStatus & BLOCK_FAILED_MASK)
+            return false;
+        return ((nStatus & BLOCK_VALID_MASK) >= nUpTo);
+    }
+
+    // Raise the validity level of this block index entry.
+    // Returns true if the validity was changed.
+    bool RaiseValidity(enum BlockStatus nUpTo)
+    {
+        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
+        if (nStatus & BLOCK_FAILED_MASK)
+            return false;
+        if ((nStatus & BLOCK_VALID_MASK) < nUpTo) {
+            nStatus = (nStatus & ~BLOCK_VALID_MASK) | nUpTo;
+            return true;
+        }
+        return false;
+    }
 };
 
 

From 68aa01e51fb9673ff2739825529a3fee36df79b4 Mon Sep 17 00:00:00 2001
From: Ian Carroll <him@ian.sh>
Date: Mon, 28 Apr 2014 19:36:28 -0400
Subject: [PATCH 0014/1819] Fixes error

---
 contrib/macdeploy/macdeployqtplus | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 5c310df1fce9..b0d85171dab5 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -17,7 +17,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-import subprocess, sys, re, os, shutil, stat, os.path
+import subprocess, sys, re, os, shutil, stat, os.path, time
 from string import Template
 from time import sleep
 from argparse import ArgumentParser
@@ -814,6 +814,7 @@ if config.dmg is not None:
 
         if verbose >= 2:
             print "+ Finalizing .dmg disk image +"
+            time.sleep(5)
         
         try:
             runHDIUtil("convert", dmg_name + ".temp", format="UDBZ", o=dmg_name + ".dmg", ov=True)

From 68f7d1d7af39a8ea6510f888e8e058e8e8faa007 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 17:31:46 -0400
Subject: [PATCH 0015/1819] Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS
 constants

---
 src/main.cpp              |  2 +-
 src/main.h                |  2 +-
 src/miner.cpp             |  5 ++++-
 src/rpcrawtransaction.cpp |  2 +-
 src/script.cpp            |  2 +-
 src/script.h              | 12 ++++++++++++
 6 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 40c713ce93af..cee9d027f551 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -945,7 +945,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 
         // Check against previous transactions
         // This is done last to help prevent CPU exhaustion denial-of-service attacks.
-        if (!CheckInputs(tx, state, view, true, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC))
+        if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS))
         {
             return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString());
         }
diff --git a/src/main.h b/src/main.h
index 825e577d1e3b..470f158287dc 100644
--- a/src/main.h
+++ b/src/main.h
@@ -309,7 +309,7 @@ inline bool AllowFree(double dPriority)
 // This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
 // instead of being performed inline.
 bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCache &view, bool fScriptChecks = true,
-                 unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC,
+                 unsigned int flags = STANDARD_SCRIPT_VERIFY_FLAGS,
                  std::vector<CScriptCheck> *pvChecks = NULL);
 
 // Apply the effects of this transaction on the UTXO set represented by view
diff --git a/src/miner.cpp b/src/miner.cpp
index 3351908e6577..12a5e7f8451d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -276,8 +276,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
                 continue;
 
+            // Note that flags: we don't want to set mempool/IsStandard()
+            // policy here, but we still have to ensure that the block we
+            // create only contains transactions that are valid in new blocks.
             CValidationState state;
-            if (!CheckInputs(tx, state, view, true, SCRIPT_VERIFY_P2SH))
+            if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS))
                 continue;
 
             CTxUndo txundo;
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 4b7dd617e070..70a5bdf29beb 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -722,7 +722,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS, 0))
             fComplete = false;
     }
 
diff --git a/src/script.cpp b/src/script.cpp
index 810ba16d28f4..dc0cd28bf8d5 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1670,7 +1670,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransa
     }
 
     // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0);
+    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
 }
 
 bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType)
diff --git a/src/script.h b/src/script.h
index 657ac0b388bf..0f26fb556dba 100644
--- a/src/script.h
+++ b/src/script.h
@@ -44,6 +44,18 @@ enum
     SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
 };
 
+// Mandatory script verification flags that all new blocks must comply with for
+// them to be valid. (but old blocks may not comply with) Currently just P2SH,
+// but in the future other flags may be added, such as a soft-fork to enforce
+// strict DER encoding.
+static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
+
+// Standard script verification flags that standard transactions will comply
+// with. However scripts violating these flags may still be present in valid
+// blocks and we must accept those blocks.
+static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
+                                                         SCRIPT_VERIFY_STRICTENC;
+
 enum txnouttype
 {
     TX_NONSTANDARD,

From 29c17498a5d030f9d0a78cead3fbd37965b3cd40 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 18:17:56 -0400
Subject: [PATCH 0016/1819] Let tx (in)valid tests use any SCRIPT_VERIFY flag

Previously only P2SH could be set.
---
 src/test/data/tx_invalid.json  | 34 +++++++++++-----------
 src/test/data/tx_valid.json    | 52 +++++++++++++++++-----------------
 src/test/transaction_tests.cpp | 49 ++++++++++++++++++++++++++++----
 3 files changed, 86 insertions(+), 49 deletions(-)

diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json
index faf40ef23d55..b9472ce00a49 100644
--- a/src/test/data/tx_invalid.json
+++ b/src/test/data/tx_invalid.json
@@ -2,79 +2,79 @@
 ["The following are deserialized transactions which are invalid."],
 ["They are in the form"],
 ["[[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"],
-["serializedTransaction, enforceP2SH]"],
+["serializedTransaction, verifyFlags]"],
 ["Objects that are only a single string (like this one) are ignored"],
 
 ["0e1b5688cf179cd9f7cbda1fac0090f6e684bbf8cd946660120197c3f3681809 but with extra junk appended to the end of the scriptPubKey"],
 [[["6ca7ec7b1847f6bdbd737176050e6a08d66ccd55bb94ad24f4018024107a5827", 0, "0x41 0x043b640e983c9690a14c039a2037ecc3467b27a0dcd58f19d76c7bc118d09fec45adc5370a1c5bf8067ca9f5557a4cf885fdb0fe0dcc9c3a7137226106fbc779a5 CHECKSIG VERIFY 1"]],
-"010000000127587a10248001f424ad94bb55cd6cd6086a0e05767173bdbdf647187beca76c000000004948304502201b822ad10d6adc1a341ae8835be3f70a25201bbff31f59cbb9c5353a5f0eca18022100ea7b2f7074e9aa9cf70aa8d0ffee13e6b45dddabf1ab961bda378bcdb778fa4701ffffffff0100f2052a010000001976a914fc50c5907d86fed474ba5ce8b12a66e0a4c139d888ac00000000", true],
+"010000000127587a10248001f424ad94bb55cd6cd6086a0e05767173bdbdf647187beca76c000000004948304502201b822ad10d6adc1a341ae8835be3f70a25201bbff31f59cbb9c5353a5f0eca18022100ea7b2f7074e9aa9cf70aa8d0ffee13e6b45dddabf1ab961bda378bcdb778fa4701ffffffff0100f2052a010000001976a914fc50c5907d86fed474ba5ce8b12a66e0a4c139d888ac00000000", "P2SH"],
 
 ["This is the nearly-standard transaction with CHECKSIGVERIFY 1 instead of CHECKSIG from tx_valid.json"],
 ["but with the signature duplicated in the scriptPubKey with a non-standard pushdata prefix"],
 ["See FindAndDelete, which will only remove if it uses the same pushdata prefix as is standard"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1 0x4c 0x47 0x3044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a01"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Same as above, but with the sig in the scriptSig also pushed with the same non-standard OP_PUSHDATA"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1 0x4c 0x47 0x3044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a01"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006b4c473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006b4c473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", "P2SH"],
 
 ["An invalid P2SH Transaction"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x7a052c840ba73af26755de42cf01cc9e0a49fef0 EQUAL"]],
-"010000000100010000000000000000000000000000000000000000000000000000000000000000000009085768617420697320ffffffff010000000000000000015100000000", true],
+"010000000100010000000000000000000000000000000000000000000000000000000000000000000009085768617420697320ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Tests for CheckTransaction()"],
 ["No inputs"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x7a052c840ba73af26755de42cf01cc9e0a49fef0 EQUAL"]],
-"0100000000010000000000000000015100000000", true],
+"0100000000010000000000000000015100000000", "P2SH"],
 
 ["No outputs"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x05ab9e14d983742513f0f451e105ffb4198d1dd4 EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022100f16703104aab4e4088317c862daec83440242411b039d14280e03dd33b487ab802201318a7be236672c5c56083eb7a5a195bc57a40af7923ff8545016cd3b571e2a601232103c40e5d339df3f30bf753e7e04450ae4ef76c9e45587d1d993bdc4cd06f0651c7acffffffff0000000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022100f16703104aab4e4088317c862daec83440242411b039d14280e03dd33b487ab802201318a7be236672c5c56083eb7a5a195bc57a40af7923ff8545016cd3b571e2a601232103c40e5d339df3f30bf753e7e04450ae4ef76c9e45587d1d993bdc4cd06f0651c7acffffffff0000000000", "P2SH"],
 
 ["Negative output"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xae609aca8061d77c5e111f6bb62501a6bbe2bfdb EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d4830450220063222cbb128731fc09de0d7323746539166544d6c1df84d867ccea84bcc8903022100bf568e8552844de664cd41648a031554327aa8844af34b4f27397c65b92c04de0123210243ec37dee0e2e053a9c976f43147e79bc7d9dc606ea51010af1ac80db6b069e1acffffffff01ffffffffffffffff015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d4830450220063222cbb128731fc09de0d7323746539166544d6c1df84d867ccea84bcc8903022100bf568e8552844de664cd41648a031554327aa8844af34b4f27397c65b92c04de0123210243ec37dee0e2e053a9c976f43147e79bc7d9dc606ea51010af1ac80db6b069e1acffffffff01ffffffffffffffff015100000000", "P2SH"],
 
 ["MAX_MONEY + 1 output"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x32afac281462b822adbec5094b8d4d337dd5bd6a EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010140075af0750700015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010140075af0750700015100000000", "P2SH"],
 
 ["MAX_MONEY output + 1 output"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xb558cbf4930954aa6a344363a15668d7477ae716 EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510001000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510001000000000000015100000000", "P2SH"],
 
 ["Duplicate inputs"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x236d0639db62b0773fd8ac34dc85ae19e9aba80a EQUAL"]],
-"01000000020001000000000000000000000000000000000000000000000000000000000000000000006c47304402204bb1197053d0d7799bf1b30cd503c44b58d6240cccbdc85b6fe76d087980208f02204beeed78200178ffc6c74237bb74b3f276bbb4098b5605d814304fe128bf1431012321039e8815e15952a7c3fada1905f8cf55419837133bd7756c0ef14fc8dfe50c0deaacffffffff0001000000000000000000000000000000000000000000000000000000000000000000006c47304402202306489afef52a6f62e90bf750bbcdf40c06f5c6b138286e6b6b86176bb9341802200dba98486ea68380f47ebb19a7df173b99e6bc9c681d6ccf3bde31465d1f16b3012321039e8815e15952a7c3fada1905f8cf55419837133bd7756c0ef14fc8dfe50c0deaacffffffff010000000000000000015100000000", true],
+"01000000020001000000000000000000000000000000000000000000000000000000000000000000006c47304402204bb1197053d0d7799bf1b30cd503c44b58d6240cccbdc85b6fe76d087980208f02204beeed78200178ffc6c74237bb74b3f276bbb4098b5605d814304fe128bf1431012321039e8815e15952a7c3fada1905f8cf55419837133bd7756c0ef14fc8dfe50c0deaacffffffff0001000000000000000000000000000000000000000000000000000000000000000000006c47304402202306489afef52a6f62e90bf750bbcdf40c06f5c6b138286e6b6b86176bb9341802200dba98486ea68380f47ebb19a7df173b99e6bc9c681d6ccf3bde31465d1f16b3012321039e8815e15952a7c3fada1905f8cf55419837133bd7756c0ef14fc8dfe50c0deaacffffffff010000000000000000015100000000", "P2SH"],
 
 ["Coinbase of size 1"],
 ["Note the input is just required to make the tester happy"],
 [[["0000000000000000000000000000000000000000000000000000000000000000", -1, "1"]],
-"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0151ffffffff010000000000000000015100000000", true],
+"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0151ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Coinbase of size 101"],
 ["Note the input is just required to make the tester happy"],
 [[["0000000000000000000000000000000000000000000000000000000000000000", -1, "1"]],
-"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff655151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151ffffffff010000000000000000015100000000", true],
+"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff655151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Null txin"],
 [[["0000000000000000000000000000000000000000000000000000000000000000", -1, "HASH160 0x14 0x02dae7dbbda56097959cba59b1989dd3e47937bf EQUAL"]],
-"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff6e49304602210086f39e028e46dafa8e1e3be63906465f4cf038fbe5ed6403dc3e74ae876e6431022100c4625c675cfc5c7e3a0e0d7eaec92ac24da20c73a88eb40d09253e51ac6def5201232103a183ddc41e84753aca47723c965d1b5c8b0e2b537963518355e6dd6cf8415e50acffffffff010000000000000000015100000000", true],
+"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff6e49304602210086f39e028e46dafa8e1e3be63906465f4cf038fbe5ed6403dc3e74ae876e6431022100c4625c675cfc5c7e3a0e0d7eaec92ac24da20c73a88eb40d09253e51ac6def5201232103a183ddc41e84753aca47723c965d1b5c8b0e2b537963518355e6dd6cf8415e50acffffffff010000000000000000015100000000", "P2SH"],
 
 ["Same as the transactions in valid with one input SIGHASH_ALL and one SIGHASH_ANYONECANPAY, but we set the _ANYONECANPAY sequence number, invalidating the SIGHASH_ALL signature"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"],
   ["0000000000000000000000000000000000000000000000000000000000000200", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"]],
- "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df10101000000000200000000000000000000000000000000000000000000000000000000000000000000484730440220201dc2d030e380e8f9cfb41b442d930fa5a685bb2c8db5906671f865507d0670022018d9e7a8d4c8d86a73c2a724ee38ef983ec249827e0e464841735955c707ece98101000000010100000000000000015100000000", true],
+ "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df10101000000000200000000000000000000000000000000000000000000000000000000000000000000484730440220201dc2d030e380e8f9cfb41b442d930fa5a685bb2c8db5906671f865507d0670022018d9e7a8d4c8d86a73c2a724ee38ef983ec249827e0e464841735955c707ece98101000000010100000000000000015100000000", "P2SH"],
 
 ["Incorrect signature order"],
 ["Note the input is just required to make the tester happy"],
 [[["b3da01dd4aae683c7aee4d5d8b52a540a508e1115f77cd7fa9a291243f501223", 0, "HASH160 0x14 0xb1ce99298d5f07364b57b1e5c9cc00be0b04a954 EQUAL"]],
-"01000000012312503f2491a2a97fcd775f11e108a540a5528b5d4dee7a3c68ae4add01dab300000000fdfe000048304502207aacee820e08b0b174e248abd8d7a34ed63b5da3abedb99934df9fddd65c05c4022100dfe87896ab5ee3df476c2655f9fbe5bd089dccbef3e4ea05b5d121169fe7f5f401483045022100f6649b0eddfdfd4ad55426663385090d51ee86c3481bdc6b0c18ea6c0ece2c0b0220561c315b07cffa6f7dd9df96dbae9200c2dee09bf93cc35ca05e6cdf613340aa014c695221031d11db38972b712a9fe1fc023577c7ae3ddb4a3004187d41c45121eecfdbb5b7210207ec36911b6ad2382860d32989c7b8728e9489d7bbc94a6b5509ef0029be128821024ea9fac06f666a4adc3fc1357b7bec1fd0bdece2b9d08579226a8ebde53058e453aeffffffff0180380100000000001976a914c9b99cddf847d10685a4fabaa0baf505f7c3dfab88ac00000000", true],
+"01000000012312503f2491a2a97fcd775f11e108a540a5528b5d4dee7a3c68ae4add01dab300000000fdfe000048304502207aacee820e08b0b174e248abd8d7a34ed63b5da3abedb99934df9fddd65c05c4022100dfe87896ab5ee3df476c2655f9fbe5bd089dccbef3e4ea05b5d121169fe7f5f401483045022100f6649b0eddfdfd4ad55426663385090d51ee86c3481bdc6b0c18ea6c0ece2c0b0220561c315b07cffa6f7dd9df96dbae9200c2dee09bf93cc35ca05e6cdf613340aa014c695221031d11db38972b712a9fe1fc023577c7ae3ddb4a3004187d41c45121eecfdbb5b7210207ec36911b6ad2382860d32989c7b8728e9489d7bbc94a6b5509ef0029be128821024ea9fac06f666a4adc3fc1357b7bec1fd0bdece2b9d08579226a8ebde53058e453aeffffffff0180380100000000001976a914c9b99cddf847d10685a4fabaa0baf505f7c3dfab88ac00000000", "P2SH"],
 
 ["Empty stack when we try to run CHECKSIG"],
 [[["ad503f72c18df5801ee64d76090afe4c607fb2b822e9b7b63c5826c50e22fc3b", 0, "0x21 0x027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5 CHECKSIG NOT"]],
-"01000000013bfc220ec526583cb6b7e922b8b27f604cfe0a09764de61e80f58dc1723f50ad0000000000ffffffff0101000000000000002321027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5ac00000000", true],
+"01000000013bfc220ec526583cb6b7e922b8b27f604cfe0a09764de61e80f58dc1723f50ad0000000000ffffffff0101000000000000002321027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5ac00000000", "P2SH"],
 
 ["Make diffs cleaner by leaving a comment here without comma at the end"]
 ]
diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json
index c206f7a7224e..ddcb12ff14f0 100644
--- a/src/test/data/tx_valid.json
+++ b/src/test/data/tx_valid.json
@@ -2,7 +2,7 @@
 ["The following are deserialized transactions which are valid."],
 ["They are in the form"],
 ["[[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"],
-["serializedTransaction, enforceP2SH]"],
+["serializedTransaction, verifyFlags]"],
 ["Objects that are only a single string (like this one) are ignored"],
 
 ["The following is 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
@@ -10,113 +10,113 @@
 ["See http://r6.ca/blog/20111119T211504Z.html"],
 ["It is also the first OP_CHECKMULTISIG transaction in standard form"],
 [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
-"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", true],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
 
 ["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
 ["It has an arbitrary extra byte stuffed into the signature at pos length - 2"],
 [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
-"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", true],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
 
 ["The following is c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73"],
 ["It is of interest because it contains a 0-sequence as well as a signature of SIGHASH type 0 (which is not a real type)"],
 [[["406b2b06bcd34d3c8733e6b79f7a394c8a431fbf4ff5ac705c93f4076bb77602", 0, "DUP HASH160 0x14 0xdc44b1164188067c3a32d4780f5996fa14a4f2d9 EQUALVERIFY CHECKSIG"]],
-"01000000010276b76b07f4935c70acf54fbf1f438a4c397a9fb7e633873c4dd3bc062b6b40000000008c493046022100d23459d03ed7e9511a47d13292d3430a04627de6235b6e51a40f9cd386f2abe3022100e7d25b080f0bb8d8d5f878bba7d54ad2fda650ea8d158a33ee3cbd11768191fd004104b0e2c879e4daf7b9ab68350228c159766676a14f5815084ba166432aab46198d4cca98fa3e9981d0a90b2effc514b76279476550ba3663fdcaff94c38420e9d5000000000100093d00000000001976a9149a7b0f3b80c6baaeedce0a0842553800f832ba1f88ac00000000", true],
+"01000000010276b76b07f4935c70acf54fbf1f438a4c397a9fb7e633873c4dd3bc062b6b40000000008c493046022100d23459d03ed7e9511a47d13292d3430a04627de6235b6e51a40f9cd386f2abe3022100e7d25b080f0bb8d8d5f878bba7d54ad2fda650ea8d158a33ee3cbd11768191fd004104b0e2c879e4daf7b9ab68350228c159766676a14f5815084ba166432aab46198d4cca98fa3e9981d0a90b2effc514b76279476550ba3663fdcaff94c38420e9d5000000000100093d00000000001976a9149a7b0f3b80c6baaeedce0a0842553800f832ba1f88ac00000000", "P2SH"],
 
 ["A nearly-standard transaction with CHECKSIGVERIFY 1 instead of CHECKSIG"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Same as above, but with the signature duplicated in the scriptPubKey with the proper pushdata prefix"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0x5b6462475454710f3c22f5fdf0b40704c92f25c3 EQUALVERIFY CHECKSIGVERIFY 1 0x47 0x3044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a01"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006a473044022067288ea50aa799543a536ff9306f8e1cba05b9c6b10951175b924f96732555ed022026d7b5265f38d21541519e4a1e55044d5b9e17e15cdbaf29ae3792e99e883e7a012103ba8c8b86dea131c22ab967e6dd99bdae8eff7a1f75a2c35f1f944109e3fe5e22ffffffff010000000000000000015100000000", "P2SH"],
 
 ["The following is f7fdd091fa6d8f5e7a8c2458f5c38faffff2d3f1406b6e4fe2c99dcc0d2d1cbb"],
 ["It caught a bug in the workaround for 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63 in an overly simple implementation"],
 [[["b464e85df2a238416f8bdae11d120add610380ea07f4ef19c5f9dfd472f96c3d", 0, "DUP HASH160 0x14 0xbef80ecf3a44500fda1bc92176e442891662aed2 EQUALVERIFY CHECKSIG"],
 ["b7978cc96e59a8b13e0865d3f95657561a7f725be952438637475920bac9eb21", 1, "DUP HASH160 0x14 0xbef80ecf3a44500fda1bc92176e442891662aed2 EQUALVERIFY CHECKSIG"]],
-"01000000023d6cf972d4dff9c519eff407ea800361dd0a121de1da8b6f4138a2f25de864b4000000008a4730440220ffda47bfc776bcd269da4832626ac332adfca6dd835e8ecd83cd1ebe7d709b0e022049cffa1cdc102a0b56e0e04913606c70af702a1149dc3b305ab9439288fee090014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff21ebc9ba20594737864352e95b727f1a565756f9d365083eb1a8596ec98c97b7010000008a4730440220503ff10e9f1e0de731407a4a245531c9ff17676eda461f8ceeb8c06049fa2c810220c008ac34694510298fa60b3f000df01caa244f165b727d4896eb84f81e46bcc4014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff01f0da5200000000001976a914857ccd42dded6df32949d4646dfa10a92458cfaa88ac00000000", true],
+"01000000023d6cf972d4dff9c519eff407ea800361dd0a121de1da8b6f4138a2f25de864b4000000008a4730440220ffda47bfc776bcd269da4832626ac332adfca6dd835e8ecd83cd1ebe7d709b0e022049cffa1cdc102a0b56e0e04913606c70af702a1149dc3b305ab9439288fee090014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff21ebc9ba20594737864352e95b727f1a565756f9d365083eb1a8596ec98c97b7010000008a4730440220503ff10e9f1e0de731407a4a245531c9ff17676eda461f8ceeb8c06049fa2c810220c008ac34694510298fa60b3f000df01caa244f165b727d4896eb84f81e46bcc4014104266abb36d66eb4218a6dd31f09bb92cf3cfa803c7ea72c1fc80a50f919273e613f895b855fb7465ccbc8919ad1bd4a306c783f22cd3227327694c4fa4c1c439affffffff01f0da5200000000001976a914857ccd42dded6df32949d4646dfa10a92458cfaa88ac00000000", "P2SH"],
 
 ["The following tests for the presence of a bug in the handling of SIGHASH_SINGLE"],
 ["It results in signing the constant 1, instead of something generated based on the transaction,"],
 ["when the input doing the signing has an index greater than the maximum output index"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0xe52b482f2faa8ecbf0db344f93c84ac908557f33 EQUALVERIFY CHECKSIG"], ["0000000000000000000000000000000000000000000000000000000000000200", 0, "1"]],
-"01000000020002000000000000000000000000000000000000000000000000000000000000000000000151ffffffff0001000000000000000000000000000000000000000000000000000000000000000000006b483045022100c9cdd08798a28af9d1baf44a6c77bcc7e279f47dc487c8c899911bc48feaffcc0220503c5c50ae3998a733263c5c0f7061b483e2b56c4c41b456e7d2f5a78a74c077032102d5c25adb51b61339d2b05315791e21bbe80ea470a49db0135720983c905aace0ffffffff010000000000000000015100000000", true],
+"01000000020002000000000000000000000000000000000000000000000000000000000000000000000151ffffffff0001000000000000000000000000000000000000000000000000000000000000000000006b483045022100c9cdd08798a28af9d1baf44a6c77bcc7e279f47dc487c8c899911bc48feaffcc0220503c5c50ae3998a733263c5c0f7061b483e2b56c4c41b456e7d2f5a78a74c077032102d5c25adb51b61339d2b05315791e21bbe80ea470a49db0135720983c905aace0ffffffff010000000000000000015100000000", "P2SH"],
 
 ["An invalid P2SH Transaction"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x7a052c840ba73af26755de42cf01cc9e0a49fef0 EQUAL"]],
-"010000000100010000000000000000000000000000000000000000000000000000000000000000000009085768617420697320ffffffff010000000000000000015100000000", false],
+"010000000100010000000000000000000000000000000000000000000000000000000000000000000009085768617420697320ffffffff010000000000000000015100000000", "NONE"],
 
 ["A valid P2SH Transaction using the standard transaction type put forth in BIP 16"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x8febbed40483661de6958d957412f82deed8e2f7 EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100c66c9cdf4c43609586d15424c54707156e316d88b0a1534c9e6b0d4f311406310221009c0fe51dbc9c4ab7cc25d3fdbeccf6679fe6827f08edf2b4a9f16ee3eb0e438a0123210338e8034509af564c62644c07691942e0c056752008a173c89f60ab2a88ac2ebfacffffffff010000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100c66c9cdf4c43609586d15424c54707156e316d88b0a1534c9e6b0d4f311406310221009c0fe51dbc9c4ab7cc25d3fdbeccf6679fe6827f08edf2b4a9f16ee3eb0e438a0123210338e8034509af564c62644c07691942e0c056752008a173c89f60ab2a88ac2ebfacffffffff010000000000000000015100000000", "P2SH"],
 
 ["Tests for CheckTransaction()"],
 ["MAX_MONEY output"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0x32afac281462b822adbec5094b8d4d337dd5bd6a EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010040075af0750700015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006e493046022100e1eadba00d9296c743cb6ecc703fd9ddc9b3cd12906176a226ae4c18d6b00796022100a71aef7d2874deff681ba6080f1b278bac7bb99c61b08a85f4311970ffe7f63f012321030c0588dc44d92bdcbf8e72093466766fdc265ead8db64517b0c542275b70fffbacffffffff010040075af0750700015100000000", "P2SH"],
 
 ["MAX_MONEY output + 0 output"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "HASH160 0x14 0xb558cbf4930954aa6a344363a15668d7477ae716 EQUAL"]],
-"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510000000000000000015100000000", true],
+"01000000010001000000000000000000000000000000000000000000000000000000000000000000006d483045022027deccc14aa6668e78a8c9da3484fbcd4f9dcc9bb7d1b85146314b21b9ae4d86022100d0b43dece8cfb07348de0ca8bc5b86276fa88f7f2138381128b7c36ab2e42264012321029bb13463ddd5d2cc05da6e84e37536cb9525703cfd8f43afdb414988987a92f6acffffffff020040075af075070001510000000000000000015100000000", "P2SH"],
 
 ["Coinbase of size 2"],
 ["Note the input is just required to make the tester happy"],
 [[["0000000000000000000000000000000000000000000000000000000000000000", -1, "1"]],
-"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff025151ffffffff010000000000000000015100000000", true],
+"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff025151ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Coinbase of size 100"],
 ["Note the input is just required to make the tester happy"],
 [[["0000000000000000000000000000000000000000000000000000000000000000", -1, "1"]],
-"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff6451515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151ffffffff010000000000000000015100000000", true],
+"01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff6451515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151ffffffff010000000000000000015100000000", "P2SH"],
 
 ["Simple transaction with first input is signed with SIGHASH_ALL, second with SIGHASH_ANYONECANPAY"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"],
   ["0000000000000000000000000000000000000000000000000000000000000200", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"]],
- "010000000200010000000000000000000000000000000000000000000000000000000000000000000049483045022100d180fd2eb9140aeb4210c9204d3f358766eb53842b2a9473db687fa24b12a3cc022079781799cd4f038b85135bbe49ec2b57f306b2bb17101b17f71f000fcab2b6fb01ffffffff0002000000000000000000000000000000000000000000000000000000000000000000004847304402205f7530653eea9b38699e476320ab135b74771e1c48b81a5d041e2ca84b9be7a802200ac8d1f40fb026674fe5a5edd3dea715c27baa9baca51ed45ea750ac9dc0a55e81ffffffff010100000000000000015100000000", true],
+ "010000000200010000000000000000000000000000000000000000000000000000000000000000000049483045022100d180fd2eb9140aeb4210c9204d3f358766eb53842b2a9473db687fa24b12a3cc022079781799cd4f038b85135bbe49ec2b57f306b2bb17101b17f71f000fcab2b6fb01ffffffff0002000000000000000000000000000000000000000000000000000000000000000000004847304402205f7530653eea9b38699e476320ab135b74771e1c48b81a5d041e2ca84b9be7a802200ac8d1f40fb026674fe5a5edd3dea715c27baa9baca51ed45ea750ac9dc0a55e81ffffffff010100000000000000015100000000", "P2SH"],
 
 ["Same as above, but we change the sequence number of the first input to check that SIGHASH_ANYONECANPAY is being followed"],
 [[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"],
   ["0000000000000000000000000000000000000000000000000000000000000200", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"]],
- "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df101010000000002000000000000000000000000000000000000000000000000000000000000000000004847304402205f7530653eea9b38699e476320ab135b74771e1c48b81a5d041e2ca84b9be7a802200ac8d1f40fb026674fe5a5edd3dea715c27baa9baca51ed45ea750ac9dc0a55e81ffffffff010100000000000000015100000000", true],
+ "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df101010000000002000000000000000000000000000000000000000000000000000000000000000000004847304402205f7530653eea9b38699e476320ab135b74771e1c48b81a5d041e2ca84b9be7a802200ac8d1f40fb026674fe5a5edd3dea715c27baa9baca51ed45ea750ac9dc0a55e81ffffffff010100000000000000015100000000", "P2SH"],
 
 ["afd9c17f8913577ec3509520bd6e5d63e9c0fd2a5f70c787993b097ba6ca9fae which has several SIGHASH_SINGLE signatures"],
 [[["63cfa5a09dc540bf63e53713b82d9ea3692ca97cd608c384f2aa88e51a0aac70", 0, "DUP HASH160 0x14 0xdcf72c4fd02f5a987cf9b02f2fabfcac3341a87d EQUALVERIFY CHECKSIG"],
  ["04e8d0fcf3846c6734477b98f0f3d4badfb78f020ee097a0be5fe347645b817d", 1, "DUP HASH160 0x14 0xdcf72c4fd02f5a987cf9b02f2fabfcac3341a87d EQUALVERIFY CHECKSIG"],
  ["ee1377aff5d0579909e11782e1d2f5f7b84d26537be7f5516dd4e43373091f3f", 1, "DUP HASH160 0x14 0xdcf72c4fd02f5a987cf9b02f2fabfcac3341a87d EQUALVERIFY CHECKSIG"]],
- "010000000370ac0a1ae588aaf284c308d67ca92c69a39e2db81337e563bf40c59da0a5cf63000000006a4730440220360d20baff382059040ba9be98947fd678fb08aab2bb0c172efa996fd8ece9b702201b4fb0de67f015c90e7ac8a193aeab486a1f587e0f54d0fb9552ef7f5ce6caec032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff7d815b6447e35fbea097e00e028fb7dfbad4f3f0987b4734676c84f3fcd0e804010000006b483045022100c714310be1e3a9ff1c5f7cacc65c2d8e781fc3a88ceb063c6153bf950650802102200b2d0979c76e12bb480da635f192cc8dc6f905380dd4ac1ff35a4f68f462fffd032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff3f1f097333e4d46d51f5e77b53264db8f7f5d2e18217e1099957d0f5af7713ee010000006c493046022100b663499ef73273a3788dea342717c2640ac43c5a1cf862c9e09b206fcb3f6bb8022100b09972e75972d9148f2bdd462e5cb69b57c1214b88fc55ca638676c07cfc10d8032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff0380841e00000000001976a914bfb282c70c4191f45b5a6665cad1682f2c9cfdfb88ac80841e00000000001976a9149857cc07bed33a5cf12b9c5e0500b675d500c81188ace0fd1c00000000001976a91443c52850606c872403c0601e69fa34b26f62db4a88ac00000000", true],
+ "010000000370ac0a1ae588aaf284c308d67ca92c69a39e2db81337e563bf40c59da0a5cf63000000006a4730440220360d20baff382059040ba9be98947fd678fb08aab2bb0c172efa996fd8ece9b702201b4fb0de67f015c90e7ac8a193aeab486a1f587e0f54d0fb9552ef7f5ce6caec032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff7d815b6447e35fbea097e00e028fb7dfbad4f3f0987b4734676c84f3fcd0e804010000006b483045022100c714310be1e3a9ff1c5f7cacc65c2d8e781fc3a88ceb063c6153bf950650802102200b2d0979c76e12bb480da635f192cc8dc6f905380dd4ac1ff35a4f68f462fffd032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff3f1f097333e4d46d51f5e77b53264db8f7f5d2e18217e1099957d0f5af7713ee010000006c493046022100b663499ef73273a3788dea342717c2640ac43c5a1cf862c9e09b206fcb3f6bb8022100b09972e75972d9148f2bdd462e5cb69b57c1214b88fc55ca638676c07cfc10d8032103579ca2e6d107522f012cd00b52b9a65fb46f0c57b9b8b6e377c48f526a44741affffffff0380841e00000000001976a914bfb282c70c4191f45b5a6665cad1682f2c9cfdfb88ac80841e00000000001976a9149857cc07bed33a5cf12b9c5e0500b675d500c81188ace0fd1c00000000001976a91443c52850606c872403c0601e69fa34b26f62db4a88ac00000000", "P2SH"],
 
  ["ddc454a1c0c35c188c98976b17670f69e586d9c0f3593ea879928332f0a069e7, which spends an input that pushes using a PUSHDATA1 that is negative when read as signed"],
  [[["c5510a5dd97a25f43175af1fe649b707b1df8e1a41489bac33a23087027a2f48", 0, "0x4c 0xae 0x606563686f2022553246736447566b58312b5a536e587574356542793066794778625456415675534a6c376a6a334878416945325364667657734f53474f36633338584d7439435c6e543249584967306a486956304f376e775236644546673d3d22203e20743b206f70656e73736c20656e63202d7061737320706173733a5b314a564d7751432d707269766b65792d6865785d202d64202d6165732d3235362d636263202d61202d696e207460 DROP DUP HASH160 0x14 0xbfd7436b6265aa9de506f8a994f881ff08cc2872 EQUALVERIFY CHECKSIG"]],
- "0100000001482f7a028730a233ac9b48411a8edfb107b749e61faf7531f4257ad95d0a51c5000000008b483045022100bf0bbae9bde51ad2b222e87fbf67530fbafc25c903519a1e5dcc52a32ff5844e022028c4d9ad49b006dd59974372a54291d5764be541574bb0c4dc208ec51f80b7190141049dd4aad62741dc27d5f267f7b70682eee22e7e9c1923b9c0957bdae0b96374569b460eb8d5b40d972e8c7c0ad441de3d94c4a29864b212d56050acb980b72b2bffffffff0180969800000000001976a914e336d0017a9d28de99d16472f6ca6d5a3a8ebc9988ac00000000", true],
+ "0100000001482f7a028730a233ac9b48411a8edfb107b749e61faf7531f4257ad95d0a51c5000000008b483045022100bf0bbae9bde51ad2b222e87fbf67530fbafc25c903519a1e5dcc52a32ff5844e022028c4d9ad49b006dd59974372a54291d5764be541574bb0c4dc208ec51f80b7190141049dd4aad62741dc27d5f267f7b70682eee22e7e9c1923b9c0957bdae0b96374569b460eb8d5b40d972e8c7c0ad441de3d94c4a29864b212d56050acb980b72b2bffffffff0180969800000000001976a914e336d0017a9d28de99d16472f6ca6d5a3a8ebc9988ac00000000", "P2SH"],
 
 ["Correct signature order"],
 ["Note the input is just required to make the tester happy"],
 [[["b3da01dd4aae683c7aee4d5d8b52a540a508e1115f77cd7fa9a291243f501223", 0, "HASH160 0x14 0xb1ce99298d5f07364b57b1e5c9cc00be0b04a954 EQUAL"]],
-"01000000012312503f2491a2a97fcd775f11e108a540a5528b5d4dee7a3c68ae4add01dab300000000fdfe0000483045022100f6649b0eddfdfd4ad55426663385090d51ee86c3481bdc6b0c18ea6c0ece2c0b0220561c315b07cffa6f7dd9df96dbae9200c2dee09bf93cc35ca05e6cdf613340aa0148304502207aacee820e08b0b174e248abd8d7a34ed63b5da3abedb99934df9fddd65c05c4022100dfe87896ab5ee3df476c2655f9fbe5bd089dccbef3e4ea05b5d121169fe7f5f4014c695221031d11db38972b712a9fe1fc023577c7ae3ddb4a3004187d41c45121eecfdbb5b7210207ec36911b6ad2382860d32989c7b8728e9489d7bbc94a6b5509ef0029be128821024ea9fac06f666a4adc3fc1357b7bec1fd0bdece2b9d08579226a8ebde53058e453aeffffffff0180380100000000001976a914c9b99cddf847d10685a4fabaa0baf505f7c3dfab88ac00000000", true],
+"01000000012312503f2491a2a97fcd775f11e108a540a5528b5d4dee7a3c68ae4add01dab300000000fdfe0000483045022100f6649b0eddfdfd4ad55426663385090d51ee86c3481bdc6b0c18ea6c0ece2c0b0220561c315b07cffa6f7dd9df96dbae9200c2dee09bf93cc35ca05e6cdf613340aa0148304502207aacee820e08b0b174e248abd8d7a34ed63b5da3abedb99934df9fddd65c05c4022100dfe87896ab5ee3df476c2655f9fbe5bd089dccbef3e4ea05b5d121169fe7f5f4014c695221031d11db38972b712a9fe1fc023577c7ae3ddb4a3004187d41c45121eecfdbb5b7210207ec36911b6ad2382860d32989c7b8728e9489d7bbc94a6b5509ef0029be128821024ea9fac06f666a4adc3fc1357b7bec1fd0bdece2b9d08579226a8ebde53058e453aeffffffff0180380100000000001976a914c9b99cddf847d10685a4fabaa0baf505f7c3dfab88ac00000000", "P2SH"],
 
 ["cc60b1f899ec0a69b7c3f25ddf32c4524096a9c5b01cbd84c6d0312a0c478984, which is a fairly strange transaction which relies on OP_CHECKSIG returning 0 when checking a completely invalid sig of length 0"],
 [[["cbebc4da731e8995fe97f6fadcd731b36ad40e5ecb31e38e904f6e5982fa09f7", 0, "0x2102085c6600657566acc2d6382a47bc3f324008d2aa10940dd7705a48aa2a5a5e33ac7c2103f5d0fb955f95dd6be6115ce85661db412ec6a08abcbfce7da0ba8297c6cc0ec4ac7c5379a820d68df9e32a147cffa36193c6f7c43a1c8c69cda530e1c6db354bfabdcfefaf3c875379a820f531f3041d3136701ea09067c53e7159c8f9b2746a56c3d82966c54bbc553226879a5479827701200122a59a5379827701200122a59a6353798277537982778779679a68"]],
-"0100000001f709fa82596e4f908ee331cb5e0ed46ab331d7dcfaf697fe95891e73dac4ebcb000000008c20ca42095840735e89283fec298e62ac2ddea9b5f34a8cbb7097ad965b87568100201b1b01dc829177da4a14551d2fc96a9db00c6501edfa12f22cd9cefd335c227f483045022100a9df60536df5733dd0de6bc921fab0b3eee6426501b43a228afa2c90072eb5ca02201c78b74266fac7d1db5deff080d8a403743203f109fbcabf6d5a760bf87386d20100ffffffff01c075790000000000232103611f9a45c18f28f06f19076ad571c344c82ce8fcfe34464cf8085217a2d294a6ac00000000", true],
+"0100000001f709fa82596e4f908ee331cb5e0ed46ab331d7dcfaf697fe95891e73dac4ebcb000000008c20ca42095840735e89283fec298e62ac2ddea9b5f34a8cbb7097ad965b87568100201b1b01dc829177da4a14551d2fc96a9db00c6501edfa12f22cd9cefd335c227f483045022100a9df60536df5733dd0de6bc921fab0b3eee6426501b43a228afa2c90072eb5ca02201c78b74266fac7d1db5deff080d8a403743203f109fbcabf6d5a760bf87386d20100ffffffff01c075790000000000232103611f9a45c18f28f06f19076ad571c344c82ce8fcfe34464cf8085217a2d294a6ac00000000", "P2SH"],
 
 ["Empty pubkey"],
 [[["229257c295e7f555421c1bfec8538dd30a4b5c37c1c8810bbe83cafa7811652c", 0, "0x00 CHECKSIG NOT"]],
-"01000000012c651178faca83be0b81c8c1375c4b0ad38d53c8fe1b1c4255f5e795c25792220000000049483045022100d6044562284ac76c985018fc4a90127847708c9edb280996c507b28babdc4b2a02203d74eca3f1a4d1eea7ff77b528fde6d5dc324ec2dbfdb964ba885f643b9704cd01ffffffff010100000000000000232102c2410f8891ae918cab4ffc4bb4a3b0881be67c7a1e7faa8b5acf9ab8932ec30cac00000000", true],
+"01000000012c651178faca83be0b81c8c1375c4b0ad38d53c8fe1b1c4255f5e795c25792220000000049483045022100d6044562284ac76c985018fc4a90127847708c9edb280996c507b28babdc4b2a02203d74eca3f1a4d1eea7ff77b528fde6d5dc324ec2dbfdb964ba885f643b9704cd01ffffffff010100000000000000232102c2410f8891ae918cab4ffc4bb4a3b0881be67c7a1e7faa8b5acf9ab8932ec30cac00000000", "P2SH"],
 
 ["Empty signature"],
 [[["9ca93cfd8e3806b9d9e2ba1cf64e3cc6946ee0119670b1796a09928d14ea25f7", 0, "0x21 0x028a1d66975dbdf97897e3a4aef450ebeb5b5293e4a0b4a6d3a2daaa0b2b110e02 CHECKSIG NOT"]],
-"0100000001f725ea148d92096a79b1709611e06e94c63c4ef61cbae2d9b906388efd3ca99c000000000100ffffffff0101000000000000002321028a1d66975dbdf97897e3a4aef450ebeb5b5293e4a0b4a6d3a2daaa0b2b110e02ac00000000", true],
+"0100000001f725ea148d92096a79b1709611e06e94c63c4ef61cbae2d9b906388efd3ca99c000000000100ffffffff0101000000000000002321028a1d66975dbdf97897e3a4aef450ebeb5b5293e4a0b4a6d3a2daaa0b2b110e02ac00000000", "P2SH"],
 
 [[["444e00ed7840d41f20ecd9c11d3f91982326c731a02f3c05748414a4fa9e59be", 0, "1 0x00 0x21 0x02136b04758b0b6e363e7a6fbe83aaf527a153db2b060d36cc29f7f8309ba6e458 2 CHECKMULTISIG"]],
-"0100000001be599efaa4148474053c2fa031c7262398913f1dc1d9ec201fd44078ed004e44000000004900473044022022b29706cb2ed9ef0cb3c97b72677ca2dfd7b4160f7b4beb3ba806aa856c401502202d1e52582412eba2ed474f1f437a427640306fd3838725fab173ade7fe4eae4a01ffffffff010100000000000000232103ac4bba7e7ca3e873eea49e08132ad30c7f03640b6539e9b59903cf14fd016bbbac00000000", true],
+"0100000001be599efaa4148474053c2fa031c7262398913f1dc1d9ec201fd44078ed004e44000000004900473044022022b29706cb2ed9ef0cb3c97b72677ca2dfd7b4160f7b4beb3ba806aa856c401502202d1e52582412eba2ed474f1f437a427640306fd3838725fab173ade7fe4eae4a01ffffffff010100000000000000232103ac4bba7e7ca3e873eea49e08132ad30c7f03640b6539e9b59903cf14fd016bbbac00000000", "P2SH"],
 
 [[["e16abbe80bf30c080f63830c8dbf669deaef08957446e95940227d8c5e6db612", 0, "1 0x21 0x03905380c7013e36e6e19d305311c1b81fce6581f5ee1c86ef0627c68c9362fc9f 0x00 2 CHECKMULTISIG"]],
-"010000000112b66d5e8c7d224059e946749508efea9d66bf8d0c83630f080cf30be8bb6ae100000000490047304402206ffe3f14caf38ad5c1544428e99da76ffa5455675ec8d9780fac215ca17953520220779502985e194d84baa36b9bd40a0dbd981163fa191eb884ae83fc5bd1c86b1101ffffffff010100000000000000232103905380c7013e36e6e19d305311c1b81fce6581f5ee1c86ef0627c68c9362fc9fac00000000", true],
+"010000000112b66d5e8c7d224059e946749508efea9d66bf8d0c83630f080cf30be8bb6ae100000000490047304402206ffe3f14caf38ad5c1544428e99da76ffa5455675ec8d9780fac215ca17953520220779502985e194d84baa36b9bd40a0dbd981163fa191eb884ae83fc5bd1c86b1101ffffffff010100000000000000232103905380c7013e36e6e19d305311c1b81fce6581f5ee1c86ef0627c68c9362fc9fac00000000", "P2SH"],
 
 [[["ebbcf4bfce13292bd791d6a65a2a858d59adbf737e387e40370d4e64cc70efb0", 0, "2 0x21 0x033bcaa0a602f0d44cc9d5637c6e515b0471db514c020883830b7cefd73af04194 0x21 0x03a88b326f8767f4f192ce252afe33c94d25ab1d24f27f159b3cb3aa691ffe1423 2 CHECKMULTISIG NOT"]],
-"0100000001b0ef70cc644e0d37407e387e73bfad598d852a5aa6d691d72b2913cebff4bceb000000004a00473044022068cd4851fc7f9a892ab910df7a24e616f293bcb5c5fbdfbc304a194b26b60fba022078e6da13d8cb881a22939b952c24f88b97afd06b4c47a47d7f804c9a352a6d6d0100ffffffff0101000000000000002321033bcaa0a602f0d44cc9d5637c6e515b0471db514c020883830b7cefd73af04194ac00000000", true],
+"0100000001b0ef70cc644e0d37407e387e73bfad598d852a5aa6d691d72b2913cebff4bceb000000004a00473044022068cd4851fc7f9a892ab910df7a24e616f293bcb5c5fbdfbc304a194b26b60fba022078e6da13d8cb881a22939b952c24f88b97afd06b4c47a47d7f804c9a352a6d6d0100ffffffff0101000000000000002321033bcaa0a602f0d44cc9d5637c6e515b0471db514c020883830b7cefd73af04194ac00000000", "P2SH"],
 
 [[["ba4cd7ae2ad4d4d13ebfc8ab1d93a63e4a6563f25089a18bf0fc68f282aa88c1", 0, "2 0x21 0x037c615d761e71d38903609bf4f46847266edc2fb37532047d747ba47eaae5ffe1 0x21 0x02edc823cd634f2c4033d94f5755207cb6b60c4b1f1f056ad7471c47de5f2e4d50 2 CHECKMULTISIG NOT"]],
-"0100000001c188aa82f268fcf08ba18950f263654a3ea6931dabc8bf3ed1d4d42aaed74cba000000004b0000483045022100940378576e069aca261a6b26fb38344e4497ca6751bb10905c76bb689f4222b002204833806b014c26fd801727b792b1260003c55710f87c5adbd7a9cb57446dbc9801ffffffff0101000000000000002321037c615d761e71d38903609bf4f46847266edc2fb37532047d747ba47eaae5ffe1ac00000000", true],
+"0100000001c188aa82f268fcf08ba18950f263654a3ea6931dabc8bf3ed1d4d42aaed74cba000000004b0000483045022100940378576e069aca261a6b26fb38344e4497ca6751bb10905c76bb689f4222b002204833806b014c26fd801727b792b1260003c55710f87c5adbd7a9cb57446dbc9801ffffffff0101000000000000002321037c615d761e71d38903609bf4f46847266edc2fb37532047d747ba47eaae5ffe1ac00000000", "P2SH"],
 
 ["Make diffs cleaner by leaving a comment here without comma at the end"]
 ]
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 24647950c46f..9edc07ab16ef 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -13,16 +13,44 @@
 #include <map>
 #include <string>
 
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/split.hpp>
 #include <boost/test/unit_test.hpp>
 #include "json/json_spirit_writer_template.h"
 
 using namespace std;
 using namespace json_spirit;
+using namespace boost::algorithm;
 
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
 extern CScript ParseScript(string s);
 
+unsigned int ParseFlags(string strFlags){
+    unsigned int flags = 0;
+    vector<string> words;
+    split(words, strFlags, is_any_of(","));
+
+    // Note how NOCACHE is not included as it is a runtime-only flag.
+    static map<string, unsigned int> mapFlagNames;
+    if (mapFlagNames.size() == 0)
+    {
+        mapFlagNames["NONE"] = SCRIPT_VERIFY_NONE;
+        mapFlagNames["P2SH"] = SCRIPT_VERIFY_P2SH;
+        mapFlagNames["STRICTENC"] = SCRIPT_VERIFY_STRICTENC;
+        mapFlagNames["EVEN_S"] = SCRIPT_VERIFY_EVEN_S;
+    }
+
+    BOOST_FOREACH(string word, words)
+    {
+        if (!mapFlagNames.count(word))
+            BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
+        flags |= mapFlagNames[word];
+    }
+
+    return flags;
+}
+
 BOOST_AUTO_TEST_SUITE(transaction_tests)
 
 BOOST_AUTO_TEST_CASE(tx_valid)
@@ -30,8 +58,10 @@ BOOST_AUTO_TEST_CASE(tx_valid)
     // Read tests from test/data/tx_valid.json
     // Format is an array of arrays
     // Inner arrays are either [ "comment" ]
-    // or [[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"], serializedTransaction, enforceP2SH
+    // or [[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"], serializedTransaction, verifyFlags
     // ... where all scripts are stringified scripts.
+    //
+    // verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
     Array tests = read_json(std::string(json_tests::tx_valid, json_tests::tx_valid + sizeof(json_tests::tx_valid)));
 
     BOOST_FOREACH(Value& tv, tests)
@@ -40,7 +70,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
         string strTest = write_string(tv, false);
         if (test[0].type() == array_type)
         {
-            if (test.size() != 3 || test[1].type() != str_type || test[2].type() != bool_type)
+            if (test.size() != 3 || test[1].type() != str_type || test[2].type() != str_type)
             {
                 BOOST_ERROR("Bad test: " << strTest);
                 continue;
@@ -88,7 +118,10 @@ BOOST_AUTO_TEST_CASE(tx_valid)
                     break;
                 }
 
-                BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool() ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, 0), strTest);
+                unsigned int verify_flags = ParseFlags(test[2].get_str());
+                BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
+                                                 tx, i, verify_flags, 0),
+                                    strTest);
             }
         }
     }
@@ -99,8 +132,10 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
     // Read tests from test/data/tx_invalid.json
     // Format is an array of arrays
     // Inner arrays are either [ "comment" ]
-    // or [[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"], serializedTransaction, enforceP2SH
+    // or [[[prevout hash, prevout index, prevout scriptPubKey], [input 2], ...],"], serializedTransaction, verifyFlags
     // ... where all scripts are stringified scripts.
+    //
+    // verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
     Array tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid)));
 
     BOOST_FOREACH(Value& tv, tests)
@@ -109,7 +144,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
         string strTest = write_string(tv, false);
         if (test[0].type() == array_type)
         {
-            if (test.size() != 3 || test[1].type() != str_type || test[2].type() != bool_type)
+            if (test.size() != 3 || test[1].type() != str_type || test[2].type() != str_type)
             {
                 BOOST_ERROR("Bad test: " << strTest);
                 continue;
@@ -156,7 +191,9 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
                     break;
                 }
 
-                fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout], tx, i, test[2].get_bool() ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, 0);
+                unsigned int verify_flags = ParseFlags(test[2].get_str());
+                fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
+                                      tx, i, verify_flags, 0);
             }
 
             BOOST_CHECK_MESSAGE(!fValid, strTest);

From aa250f0453029afbf3c903899a3770c61e389468 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 5 May 2014 19:43:14 +0200
Subject: [PATCH 0017/1819] Remove NumBlocksOfPeers

Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
---
 src/main.cpp               | 11 -----------
 src/main.h                 |  2 --
 src/qt/bitcoingui.cpp      | 17 +++++------------
 src/qt/bitcoingui.h        |  2 +-
 src/qt/clientmodel.cpp     | 14 +++-----------
 src/qt/clientmodel.h       |  5 +----
 src/qt/forms/rpcconsole.ui | 33 +++++----------------------------
 src/qt/rpcconsole.cpp      |  8 +++-----
 src/qt/rpcconsole.h        |  2 +-
 9 files changed, 19 insertions(+), 75 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 40c713ce93af..46183bf4319d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -54,8 +54,6 @@ int64_t CTransaction::nMinTxFee = 10000;  // Override with -mintxfee
 /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
 int64_t CTransaction::nMinRelayTxFee = 1000;
 
-static CMedianFilter<int> cPeerBlockCounts(8, 0); // Amount of blocks that other nodes claim to have
-
 struct COrphanBlock {
     uint256 hashBlock;
     uint256 hashPrev;
@@ -1303,12 +1301,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     return true;
 }
 
-// Return maximum amount of blocks that other nodes claim to have
-int GetNumBlocksOfPeers()
-{
-    return std::max(cPeerBlockCounts.median(), Checkpoints::GetTotalBlocksEstimate());
-}
-
 bool IsInitialBlockDownload()
 {
     LOCK(cs_main);
@@ -3484,9 +3476,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), addrFrom.ToString(), pfrom->addr.ToString());
 
         AddTimeData(pfrom->addr, nTime);
-
-        LOCK(cs_main);
-        cPeerBlockCounts.input(pfrom->nStartingHeight);
     }
 
 
diff --git a/src/main.h b/src/main.h
index 825e577d1e3b..e459772e8851 100644
--- a/src/main.h
+++ b/src/main.h
@@ -160,8 +160,6 @@ void ThreadScriptCheck();
 bool CheckProofOfWork(uint256 hash, unsigned int nBits);
 /** Calculate the minimum amount of work a received block needs, without knowing its direct parent */
 unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
-/** Get the number of active peers */
-int GetNumBlocksOfPeers();
 /** Check whether we are doing an initial block download (synchronizing from disk or network) */
 bool IsInitialBlockDownload();
 /** Format a string that describes several potential problems detected by the core */
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index da7762282a41..e6190aec13c6 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -403,8 +403,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
         setNumConnections(clientModel->getNumConnections());
         connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
 
-        setNumBlocks(clientModel->getNumBlocks(), clientModel->getNumBlocksOfPeers());
-        connect(clientModel, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int)));
+        setNumBlocks(clientModel->getNumBlocks());
+        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
 
         // Receive and report messages from client model
         connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
@@ -617,7 +617,7 @@ void BitcoinGUI::setNumConnections(int count)
     labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count));
 }
 
-void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
+void BitcoinGUI::setNumBlocks(int count)
 {
     // Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
     statusBar()->clearMessage();
@@ -646,17 +646,10 @@ void BitcoinGUI::setNumBlocks(int count, int nTotalBlocks)
     QDateTime currentDate = QDateTime::currentDateTime();
     int secs = lastBlockDate.secsTo(currentDate);
 
-    if(count < nTotalBlocks)
-    {
-        tooltip = tr("Processed %1 of %2 (estimated) blocks of transaction history.").arg(count).arg(nTotalBlocks);
-    }
-    else
-    {
-        tooltip = tr("Processed %1 blocks of transaction history.").arg(count);
-    }
+    tooltip = tr("Processed %1 blocks of transaction history.").arg(count);
 
     // Set icon state: spinning if catching up, tick otherwise
-    if(secs < 90*60 && count >= nTotalBlocks)
+    if(secs < 90*60)
     {
         tooltip = tr("Up to date") + QString(".<br>") + tooltip;
         labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 0cc1ebc50297..b4675b95ac56 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -130,7 +130,7 @@ public slots:
     /** Set number of connections shown in the UI */
     void setNumConnections(int count);
     /** Set number of blocks shown in the UI */
-    void setNumBlocks(int count, int nTotalBlocks);
+    void setNumBlocks(int count);
 
     /** Notify the user of an event from the core network or transaction handling code.
        @param[in] title     the message box / notification title
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 3c0564c20818..d1f68ebd22a5 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -23,7 +23,7 @@ static const int64_t nClientStartupTime = GetTime();
 
 ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
     QObject(parent), optionsModel(optionsModel),
-    cachedNumBlocks(0), cachedNumBlocksOfPeers(0),
+    cachedNumBlocks(0),
     cachedReindexing(0), cachedImporting(0),
     numBlocksAtStartup(-1), pollTimer(0)
 {
@@ -101,19 +101,16 @@ void ClientModel::updateTimer()
     // Some quantities (such as number of blocks) change so fast that we don't want to be notified for each change.
     // Periodically check and update with a timer.
     int newNumBlocks = getNumBlocks();
-    int newNumBlocksOfPeers = getNumBlocksOfPeers();
 
     // check for changed number of blocks we have, number of blocks peers claim to have, reindexing state and importing state
-    if (cachedNumBlocks != newNumBlocks || cachedNumBlocksOfPeers != newNumBlocksOfPeers ||
+    if (cachedNumBlocks != newNumBlocks ||
         cachedReindexing != fReindex || cachedImporting != fImporting)
     {
         cachedNumBlocks = newNumBlocks;
-        cachedNumBlocksOfPeers = newNumBlocksOfPeers;
         cachedReindexing = fReindex;
         cachedImporting = fImporting;
 
-        // ensure we return the maximum of newNumBlocksOfPeers and newNumBlocks to not create weird displays in the GUI
-        emit numBlocksChanged(newNumBlocks, std::max(newNumBlocksOfPeers, newNumBlocks));
+        emit numBlocksChanged(newNumBlocks);
     }
 
     emit bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
@@ -166,11 +163,6 @@ enum BlockSource ClientModel::getBlockSource() const
     return BLOCK_SOURCE_NONE;
 }
 
-int ClientModel::getNumBlocksOfPeers() const
-{
-    return GetNumBlocksOfPeers();
-}
-
 QString ClientModel::getStatusBarWarnings() const
 {
     return QString::fromStdString(GetWarnings("statusbar"));
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index f29b695ea103..cab853d92db3 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -60,8 +60,6 @@ class ClientModel : public QObject
     bool inInitialBlockDownload() const;
     //! Return true if core is importing blocks
     enum BlockSource getBlockSource() const;
-    //! Return conservative estimate of total number of blocks, or 0 if unknown
-    int getNumBlocksOfPeers() const;
     //! Return warnings to be displayed in status bar
     QString getStatusBarWarnings() const;
 
@@ -75,7 +73,6 @@ class ClientModel : public QObject
     OptionsModel *optionsModel;
 
     int cachedNumBlocks;
-    int cachedNumBlocksOfPeers;
     bool cachedReindexing;
     bool cachedImporting;
 
@@ -88,7 +85,7 @@ class ClientModel : public QObject
 
 signals:
     void numConnectionsChanged(int count);
-    void numBlocksChanged(int count, int countOfPeers);
+    void numBlocksChanged(int count);
     void alertsChanged(const QString &warnings);
     void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
 
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 31d61ec4682b..fcb6bb60bb34 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -254,36 +254,13 @@
         </widget>
        </item>
        <item row="11" column="0">
-        <widget class="QLabel" name="label_4">
-         <property name="text">
-          <string>Estimated total blocks</string>
-         </property>
-        </widget>
-       </item>
-       <item row="11" column="1">
-        <widget class="QLabel" name="totalBlocks">
-         <property name="cursor">
-          <cursorShape>IBeamCursor</cursorShape>
-         </property>
-         <property name="text">
-          <string>N/A</string>
-         </property>
-         <property name="textFormat">
-          <enum>Qt::PlainText</enum>
-         </property>
-         <property name="textInteractionFlags">
-          <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-         </property>
-        </widget>
-       </item>
-       <item row="12" column="0">
         <widget class="QLabel" name="label_2">
          <property name="text">
           <string>Last block time</string>
          </property>
         </widget>
        </item>
-       <item row="12" column="1">
+       <item row="11" column="1">
         <widget class="QLabel" name="lastBlockTime">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -299,7 +276,7 @@
          </property>
         </widget>
        </item>
-       <item row="13" column="0">
+       <item row="12" column="0">
         <spacer name="verticalSpacer_2">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
@@ -312,7 +289,7 @@
          </property>
         </spacer>
        </item>
-       <item row="14" column="0">
+       <item row="13" column="0">
         <widget class="QLabel" name="labelDebugLogfile">
          <property name="font">
           <font>
@@ -325,7 +302,7 @@
          </property>
         </widget>
        </item>
-       <item row="15" column="0">
+       <item row="14" column="0">
         <widget class="QPushButton" name="openDebugLogfileButton">
          <property name="toolTip">
           <string>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</string>
@@ -338,7 +315,7 @@
          </property>
         </widget>
        </item>
-       <item row="16" column="0">
+       <item row="15" column="0">
         <spacer name="verticalSpacer">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index ba5871ae2b18..0a46a722e431 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -271,8 +271,8 @@ void RPCConsole::setClientModel(ClientModel *model)
         setNumConnections(model->getNumConnections());
         connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
 
-        setNumBlocks(model->getNumBlocks(), model->getNumBlocksOfPeers());
-        connect(model, SIGNAL(numBlocksChanged(int,int)), this, SLOT(setNumBlocks(int,int)));
+        setNumBlocks(model->getNumBlocks());
+        connect(model, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
 
         updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent());
         connect(model, SIGNAL(bytesChanged(quint64,quint64)), this, SLOT(updateTrafficStats(quint64, quint64)));
@@ -366,11 +366,9 @@ void RPCConsole::setNumConnections(int count)
     ui->numberOfConnections->setText(connections);
 }
 
-void RPCConsole::setNumBlocks(int count, int countOfPeers)
+void RPCConsole::setNumBlocks(int count)
 {
     ui->numberOfBlocks->setText(QString::number(count));
-    // If there is no current countOfPeers available display N/A instead of 0, which can't ever be true
-    ui->totalBlocks->setText(countOfPeers == 0 ? tr("N/A") : QString::number(countOfPeers));
     if(clientModel)
         ui->lastBlockTime->setText(clientModel->getLastBlockDate().toString());
 }
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index f7a777205004..091a6d294f39 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -52,7 +52,7 @@ public slots:
     /** Set number of connections shown in the UI */
     void setNumConnections(int count);
     /** Set number of blocks shown in the UI */
-    void setNumBlocks(int count, int countOfPeers);
+    void setNumBlocks(int count);
     /** Go forward or back in history */
     void browseHistory(int offset);
     /** Scroll console view to end */

From 783b182c8fa92674fa609b584c0b187469893ca4 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 6 May 2014 15:25:01 +0200
Subject: [PATCH 0018/1819] Remove dummy PRIszX macros for formatting

Size specifiers are no longer needed now that we use typesafe tinyformat
for string formatting, instead of the system's sprintf.

No functional changes.

This continues the work in #3735.
---
 src/core.cpp            |  4 ++--
 src/init.cpp            |  8 ++++----
 src/main.cpp            | 22 +++++++++++-----------
 src/miner.cpp           |  2 +-
 src/rpcmisc.cpp         |  2 +-
 src/rpcprotocol.cpp     |  2 +-
 src/test/util_tests.cpp | 12 ++++++------
 src/util.h              | 12 ------------
 src/wallet.cpp          |  2 +-
 src/walletdb.cpp        |  2 +-
 10 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index cbdd24e806fc..7651ce9957ed 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -140,7 +140,7 @@ double CTransaction::ComputePriority(double dPriorityInputs, unsigned int nTxSiz
 std::string CTransaction::ToString() const
 {
     std::string str;
-    str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%"PRIszu", vout.size=%"PRIszu", nLockTime=%u)\n",
+    str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
         GetHash().ToString().substr(0,10),
         nVersion,
         vin.size(),
@@ -269,7 +269,7 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMer
 
 void CBlock::print() const
 {
-    LogPrintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%"PRIszu")\n",
+    LogPrintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
         GetHash().ToString(),
         nVersion,
         hashPrevBlock.ToString(),
diff --git a/src/init.cpp b/src/init.cpp
index 77c32d0b4938..821ac4c875ad 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1078,12 +1078,12 @@ bool AppInit2(boost::thread_group& threadGroup)
     RandAddSeedPerfmon();
 
     //// debug print
-    LogPrintf("mapBlockIndex.size() = %"PRIszu"\n",   mapBlockIndex.size());
+    LogPrintf("mapBlockIndex.size() = %u\n",   mapBlockIndex.size());
     LogPrintf("nBestHeight = %d\n",                   chainActive.Height());
 #ifdef ENABLE_WALLET
-    LogPrintf("setKeyPool.size() = %"PRIszu"\n",      pwalletMain ? pwalletMain->setKeyPool.size() : 0);
-    LogPrintf("mapWallet.size() = %"PRIszu"\n",       pwalletMain ? pwalletMain->mapWallet.size() : 0);
-    LogPrintf("mapAddressBook.size() = %"PRIszu"\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
+    LogPrintf("setKeyPool.size() = %u\n",      pwalletMain ? pwalletMain->setKeyPool.size() : 0);
+    LogPrintf("mapWallet.size() = %u\n",       pwalletMain ? pwalletMain->mapWallet.size() : 0);
+    LogPrintf("mapAddressBook.size() = %u\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
 #endif
 
     StartNode(threadGroup);
diff --git a/src/main.cpp b/src/main.cpp
index 40c713ce93af..77418bbd15ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -432,7 +432,7 @@ bool AddOrphanTx(const CTransaction& tx)
     BOOST_FOREACH(const CTxIn& txin, tx.vin)
         mapOrphanTransactionsByPrev[txin.prevout.hash].insert(hash);
 
-    LogPrint("mempool", "stored orphan tx %s (mapsz %"PRIszu")\n", hash.ToString(),
+    LogPrint("mempool", "stored orphan tx %s (mapsz %u)\n", hash.ToString(),
         mapOrphanTransactions.size());
     return true;
 }
@@ -3044,7 +3044,7 @@ void PrintBlockTree()
         // print item
         CBlock block;
         ReadBlockFromDisk(block, pindex);
-        LogPrintf("%d (blk%05u.dat:0x%x)  %s  tx %"PRIszu"\n",
+        LogPrintf("%d (blk%05u.dat:0x%x)  %s  tx %u\n",
             pindex->nHeight,
             pindex->GetBlockPos().nFile, pindex->GetBlockPos().nPos,
             DateTimeStrFormat("%Y-%m-%d %H:%M:%S", block.GetBlockTime()),
@@ -3371,7 +3371,7 @@ void static ProcessGetData(CNode* pfrom)
 bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 {
     RandAddSeedPerfmon();
-    LogPrint("net", "received: %s (%"PRIszu" bytes)\n", strCommand, vRecv.size());
+    LogPrint("net", "received: %s (%u bytes)\n", strCommand, vRecv.size());
     if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
     {
         LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n");
@@ -3515,7 +3515,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (vAddr.size() > 1000)
         {
             Misbehaving(pfrom->GetId(), 20);
-            return error("message addr size() = %"PRIszu"", vAddr.size());
+            return error("message addr size() = %u", vAddr.size());
         }
 
         // Store the new addresses
@@ -3578,7 +3578,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (vInv.size() > MAX_INV_SZ)
         {
             Misbehaving(pfrom->GetId(), 20);
-            return error("message inv size() = %"PRIszu"", vInv.size());
+            return error("message inv size() = %u", vInv.size());
         }
 
         LOCK(cs_main);
@@ -3617,11 +3617,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (vInv.size() > MAX_INV_SZ)
         {
             Misbehaving(pfrom->GetId(), 20);
-            return error("message getdata size() = %"PRIszu"", vInv.size());
+            return error("message getdata size() = %u", vInv.size());
         }
 
         if (fDebug || (vInv.size() != 1))
-            LogPrint("net", "received getdata (%"PRIszu" invsz)\n", vInv.size());
+            LogPrint("net", "received getdata (%u invsz)\n", vInv.size());
 
         if ((fDebug && vInv.size() > 0) || (vInv.size() == 1))
             LogPrint("net", "received getdata for: %s\n", vInv[0].ToString());
@@ -3729,7 +3729,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             vEraseQueue.push_back(inv.hash);
 
 
-            LogPrint("mempool", "AcceptToMemoryPool: %s %s : accepted %s (poolsz %"PRIszu")\n",
+            LogPrint("mempool", "AcceptToMemoryPool: %s %s : accepted %s (poolsz %u)\n",
                 pfrom->addr.ToString(), pfrom->cleanSubVer,
                 tx.GetHash().ToString(),
                 mempool.mapTx.size());
@@ -3914,7 +3914,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         }
 
         if (!(sProblem.empty())) {
-            LogPrint("net", "pong %s %s: %s, %x expected, %x received, %"PRIszu" bytes\n",
+            LogPrint("net", "pong %s %s: %s, %x expected, %x received, %u bytes\n",
                 pfrom->addr.ToString(),
                 pfrom->cleanSubVer,
                 sProblem,
@@ -4049,7 +4049,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 bool ProcessMessages(CNode* pfrom)
 {
     //if (fDebug)
-    //    LogPrintf("ProcessMessages(%"PRIszu" messages)\n", pfrom->vRecvMsg.size());
+    //    LogPrintf("ProcessMessages(%u messages)\n", pfrom->vRecvMsg.size());
 
     //
     // Message format
@@ -4077,7 +4077,7 @@ bool ProcessMessages(CNode* pfrom)
         CNetMessage& msg = *it;
 
         //if (fDebug)
-        //    LogPrintf("ProcessMessages(message %u msgsz, %"PRIszu" bytes, complete:%s)\n",
+        //    LogPrintf("ProcessMessages(message %u msgsz, %u bytes, complete:%s)\n",
         //            msg.hdr.nMessageSize, msg.vRecv.size(),
         //            msg.complete() ? "Y" : "N");
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 3351908e6577..6bc6edf34f1b 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -528,7 +528,7 @@ void static BitcoinMiner(CWallet *pwallet)
         CBlock *pblock = &pblocktemplate->block;
         IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
 
-        LogPrintf("Running BitcoinMiner with %"PRIszu" transactions in block (%u bytes)\n", pblock->vtx.size(),
+        LogPrintf("Running BitcoinMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
                ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
 
         //
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index ae154f2ae4df..6964b97be36e 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -187,7 +187,7 @@ CScript _createmultisig(const Array& params)
     if ((int)keys.size() < nRequired)
         throw runtime_error(
             strprintf("not enough keys supplied "
-                      "(got %"PRIszu" keys, but need at least %d to redeem)", keys.size(), nRequired));
+                      "(got %u keys, but need at least %d to redeem)", keys.size(), nRequired));
     std::vector<CPubKey> pubkeys;
     pubkeys.resize(keys.size());
     for (unsigned int i = 0; i < keys.size(); i++)
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 652b14d187e7..5cbaa535ab88 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -92,7 +92,7 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
             "HTTP/1.1 %d %s\r\n"
             "Date: %s\r\n"
             "Connection: %s\r\n"
-            "Content-Length: %"PRIszu"\r\n"
+            "Content-Length: %u\r\n"
             "Content-Type: application/json\r\n"
             "Server: bitcoin-json-rpc/%s\r\n"
             "\r\n"
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index b8f107f644f2..44998cbda77c 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -321,15 +321,15 @@ BOOST_AUTO_TEST_CASE(strprintf_numbers)
 
     size_t st = 12345678; /* unsigned size_t test value */
     ssize_t sst = -12345678; /* signed size_t test value */
-    BOOST_CHECK(strprintf("%s %"PRIszd" %s", B, sst, E) == B" -12345678 "E);
-    BOOST_CHECK(strprintf("%s %"PRIszu" %s", B, st, E) == B" 12345678 "E);
-    BOOST_CHECK(strprintf("%s %"PRIszx" %s", B, st, E) == B" bc614e "E);
+    BOOST_CHECK(strprintf("%s %d %s", B, sst, E) == B" -12345678 "E);
+    BOOST_CHECK(strprintf("%s %u %s", B, st, E) == B" 12345678 "E);
+    BOOST_CHECK(strprintf("%s %x %s", B, st, E) == B" bc614e "E);
 
     ptrdiff_t pt = 87654321; /* positive ptrdiff_t test value */
     ptrdiff_t spt = -87654321; /* negative ptrdiff_t test value */
-    BOOST_CHECK(strprintf("%s %"PRIpdd" %s", B, spt, E) == B" -87654321 "E);
-    BOOST_CHECK(strprintf("%s %"PRIpdu" %s", B, pt, E) == B" 87654321 "E);
-    BOOST_CHECK(strprintf("%s %"PRIpdx" %s", B, pt, E) == B" 5397fb1 "E);
+    BOOST_CHECK(strprintf("%s %d %s", B, spt, E) == B" -87654321 "E);
+    BOOST_CHECK(strprintf("%s %u %s", B, pt, E) == B" 87654321 "E);
+    BOOST_CHECK(strprintf("%s %x %s", B, pt, E) == B" 5397fb1 "E);
 }
 #undef B
 #undef E
diff --git a/src/util.h b/src/util.h
index fbd841f7a8b9..55d9308ab62b 100644
--- a/src/util.h
+++ b/src/util.h
@@ -44,18 +44,6 @@ static const int64_t CENT = 1000000;
 #define UEND(a)             ((unsigned char*)&((&(a))[1]))
 #define ARRAYLEN(array)     (sizeof(array)/sizeof((array)[0]))
 
-/* Format characters for (s)size_t, ptrdiff_t.
- *
- * Define these as empty as the tinyformat-based formatting system is
- * type-safe, no special format characters are needed to specify sizes.
- */
-#define PRIszx    "x"
-#define PRIszu    "u"
-#define PRIszd    "d"
-#define PRIpdx    "x"
-#define PRIpdu    "u"
-#define PRIpdd    "d"
-
 // This is needed because the foreach macro can't get over the comma in pair<t1, t2>
 #define PAIRTYPE(t1, t2)    std::pair<t1, t2>
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 7cf23610968e..22df7a9ad82b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1638,7 +1638,7 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
             if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey())))
                 throw runtime_error("TopUpKeyPool() : writing generated key failed");
             setKeyPool.insert(nEnd);
-            LogPrintf("keypool added key %d, size=%"PRIszu"\n", nEnd, setKeyPool.size());
+            LogPrintf("keypool added key %d, size=%u\n", nEnd, setKeyPool.size());
         }
     }
     return true;
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 359a1cef61be..80e9dded5f6f 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -894,7 +894,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
         LogPrintf("Salvage(aggressive) found no records in %s.\n", newFilename);
         return false;
     }
-    LogPrintf("Salvage(aggressive) found %"PRIszu" records\n", salvagedData.size());
+    LogPrintf("Salvage(aggressive) found %u records\n", salvagedData.size());
 
     bool fSuccess = allOK;
     Db* pdbCopy = new Db(&dbenv.dbenv, 0);

From bdc83e8f450456c9f547f1c4eab43571bac631c2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 16 Nov 2013 01:54:29 +0100
Subject: [PATCH 0019/1819] [Qt] ensure payment request network matches client
 network

- replaces checks in SendCoinsDialog::handlePaymentRequest() that belong
  to PaymentServer (normal URIs are special cased, as only an isValid
  check is done on BTC addresses)
- prevents the client to handle payment requests that do not match the
  clients network and shows an error instead (mainly a problem with
  drag&drop payment requests onto the client window)
- includes some small comment changes also
---
 src/qt/paymentserver.cpp   | 81 ++++++++++++++++++++++++++++----------
 src/qt/sendcoinsdialog.cpp | 22 +----------
 2 files changed, 62 insertions(+), 41 deletions(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index ca6ae1799055..4c455856856d 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -178,6 +178,9 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
 // and the items in savedPaymentRequest will be handled
 // when uiReady() is called.
 //
+// Warning: ipcSendCommandLine() is called early in init,
+// so don't use "emit message()", but "QMessageBox::"!
+//
 bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
 {
     for (int i = 1; i < argc; i++)
@@ -411,7 +414,15 @@ void PaymentServer::handleURIOrFile(const QString& s)
         {
             SendCoinsRecipient recipient;
             if (GUIUtil::parseBitcoinURI(s, &recipient))
-                emit receivedPaymentRequest(recipient);
+            {
+                CBitcoinAddress address(recipient.address.toStdString());
+                if (!address.IsValid()) {
+                    emit message(tr("URI handling"), tr("Invalid payment address %1").arg(recipient.address),
+                        CClientUIInterface::MSG_ERROR);
+                }
+                else
+                    emit receivedPaymentRequest(recipient);
+            }
             else
                 emit message(tr("URI handling"),
                     tr("URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters."),
@@ -425,12 +436,14 @@ void PaymentServer::handleURIOrFile(const QString& s)
     {
         PaymentRequestPlus request;
         SendCoinsRecipient recipient;
-        if (readPaymentRequest(s, request) && processPaymentRequest(request, recipient))
-            emit receivedPaymentRequest(recipient);
-        else
+        if (!readPaymentRequest(s, request))
+        {
             emit message(tr("Payment request file handling"),
-                tr("Payment request file can not be read or processed! This can be caused by an invalid payment request file."),
+                tr("Payment request file can not be read! This can be caused by an invalid payment request file."),
                 CClientUIInterface::ICON_WARNING);
+        }
+        else if (processPaymentRequest(request, recipient))
+            emit receivedPaymentRequest(recipient);
 
         return;
     }
@@ -482,6 +495,35 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
     if (!optionsModel)
         return false;
 
+    if (request.IsInitialized()) {
+        const payments::PaymentDetails& details = request.getDetails();
+
+        // Payment request network matches client network?
+        if ((details.network() == "main" && TestNet()) ||
+            (details.network() == "test" && !TestNet()))
+        {
+            emit message(tr("Payment request rejected"), tr("Payment request network doesn't match client network."),
+                CClientUIInterface::MSG_ERROR);
+
+            return false;
+        }
+
+        // Expired payment request?
+        if (details.has_expires() && (int64_t)details.expires() < GetTime())
+        {
+            emit message(tr("Payment request rejected"), tr("Payment request has expired."),
+                CClientUIInterface::MSG_ERROR);
+
+            return false;
+        }
+    }
+    else {
+        emit message(tr("Payment request error"), tr("Payment request is not initialized."),
+            CClientUIInterface::MSG_ERROR);
+
+        return false;
+    }
+
     recipient.paymentRequest = request;
     recipient.message = GUIUtil::HtmlEscape(request.getDetails().memo());
 
@@ -497,11 +539,11 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
             // Append destination address
             addresses.append(QString::fromStdString(CBitcoinAddress(dest).ToString()));
         }
-        else if (!recipient.authenticatedMerchant.isEmpty()){
+        else if (!recipient.authenticatedMerchant.isEmpty()) {
             // Insecure payments to custom bitcoin addresses are not supported
             // (there is no good way to tell the user where they are paying in a way
             // they'd have a chance of understanding).
-            emit message(tr("Payment request error"),
+            emit message(tr("Payment request rejected"),
                 tr("Unverified payment requests to custom payment scripts are unsupported."),
                 CClientUIInterface::MSG_ERROR);
             return false;
@@ -510,11 +552,10 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
         // Extract and check amounts
         CTxOut txOut(sendingTo.second, sendingTo.first);
         if (txOut.IsDust(CTransaction::nMinRelayTxFee)) {
-            QString msg = tr("Requested payment amount of %1 is too small (considered dust).")
-                .arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second));
+            emit message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
+                .arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second)),
+                CClientUIInterface::MSG_ERROR);
 
-            qDebug() << "PaymentServer::processPaymentRequest : " << msg;
-            emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
             return false;
         }
 
@@ -581,8 +622,8 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
             refund_to->set_script(&s[0], s.size());
         }
         else {
-            // This should never happen, because sending coins should have just unlocked the wallet
-            // and refilled the keypool
+            // This should never happen, because sending coins should have
+            // just unlocked the wallet and refilled the keypool.
             qDebug() << "PaymentServer::fetchPaymentACK : Error getting refund key, refund_to not set";
         }
     }
@@ -594,7 +635,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
         netManager->post(netRequest, serData);
     }
     else {
-        // This should never happen, either:
+        // This should never happen, either.
         qDebug() << "PaymentServer::fetchPaymentACK : Error serializing payment message";
     }
 }
@@ -620,17 +661,15 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
     {
         PaymentRequestPlus request;
         SendCoinsRecipient recipient;
-        if (request.parse(data) && processPaymentRequest(request, recipient))
+        if (!request.parse(data))
         {
-            emit receivedPaymentRequest(recipient);
-        }
-        else
-        {
-            qDebug() << "PaymentServer::netRequestFinished : Error processing payment request";
+            qDebug() << "PaymentServer::netRequestFinished : Error parsing payment request";
             emit message(tr("Payment request error"),
-                tr("Payment request can not be parsed or processed!"),
+                tr("Payment request can not be parsed!"),
                 CClientUIInterface::MSG_ERROR);
         }
+        else if (processPaymentRequest(request, recipient))
+            emit receivedPaymentRequest(recipient);
 
         return;
     }
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 33621e54b029..23b8ef83e2c2 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -377,26 +377,8 @@ void SendCoinsDialog::pasteEntry(const SendCoinsRecipient &rv)
 
 bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
 {
-    QString strSendCoins = tr("Send Coins");
-    if (rv.paymentRequest.IsInitialized()) {
-        // Expired payment request?
-        const payments::PaymentDetails& details = rv.paymentRequest.getDetails();
-        if (details.has_expires() && (int64_t)details.expires() < GetTime())
-        {
-            emit message(strSendCoins, tr("Payment request expired"),
-                CClientUIInterface::MSG_WARNING);
-            return false;
-        }
-    }
-    else {
-        CBitcoinAddress address(rv.address.toStdString());
-        if (!address.IsValid()) {
-            emit message(strSendCoins, tr("Invalid payment address %1").arg(rv.address),
-                CClientUIInterface::MSG_WARNING);
-            return false;
-        }
-    }
-
+    // Just paste the entry, all pre-checks
+    // are done in paymentserver.cpp.
     pasteEntry(rv);
     return true;
 }

From 6380180821917c22ecfd89128ee60aae6f4cac33 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 17:36:35 -0400
Subject: [PATCH 0020/1819] Add rejection of non-null CHECKMULTISIG dummy
 values

This is a source of transaction mutability as the dummy value was
previously not checked and could be modified to something other than the
usual OP_0 value.
---
 src/script.cpp                 | 16 +++++++++++++++-
 src/script.h                   |  4 +++-
 src/test/data/tx_invalid.json  | 29 ++++++++++++++++++++++++++++-
 src/test/data/tx_valid.json    | 18 ++++++++++++++++--
 src/test/transaction_tests.cpp |  1 +
 5 files changed, 63 insertions(+), 5 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index dc0cd28bf8d5..a5cdc9712d98 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -934,8 +934,22 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                             fSuccess = false;
                     }
 
-                    while (i-- > 0)
+                    // Clean up stack of actual arguments
+                    while (i-- > 1)
                         popstack(stack);
+
+                    // A bug causes CHECKMULTISIG to consume one extra argument
+                    // whose contents were not checked in any way.
+                    //
+                    // Unfortunately this is a potential source of mutability,
+                    // so optionally verify it is exactly equal to zero prior
+                    // to removing it from the stack.
+                    if (stack.size() < 1)
+                        return false;
+                    if ((flags & SCRIPT_VERIFY_NULLDUMMY) && stacktop(-1).size())
+                        return error("CHECKMULTISIG dummy argument not null");
+                    popstack(stack);
+
                     stack.push_back(fSuccess ? vchTrue : vchFalse);
 
                     if (opcode == OP_CHECKMULTISIGVERIFY)
diff --git a/src/script.h b/src/script.h
index 0f26fb556dba..01779f550cbd 100644
--- a/src/script.h
+++ b/src/script.h
@@ -42,6 +42,7 @@ enum
     SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
     SCRIPT_VERIFY_EVEN_S    = (1U << 2), // enforce even S values in signatures (depends on STRICTENC)
     SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
+    SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
 };
 
 // Mandatory script verification flags that all new blocks must comply with for
@@ -54,7 +55,8 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
 // with. However scripts violating these flags may still be present in valid
 // blocks and we must accept those blocks.
 static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
-                                                         SCRIPT_VERIFY_STRICTENC;
+                                                         SCRIPT_VERIFY_STRICTENC |
+                                                         SCRIPT_VERIFY_NULLDUMMY;
 
 enum txnouttype
 {
diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json
index b9472ce00a49..638a705f9f3c 100644
--- a/src/test/data/tx_invalid.json
+++ b/src/test/data/tx_invalid.json
@@ -67,11 +67,38 @@
   ["0000000000000000000000000000000000000000000000000000000000000200", 0, "0x21 0x035e7f0d4d0841bcd56c39337ed086b1a633ee770c1ffdd94ac552a95ac2ce0efc CHECKSIG"]],
  "01000000020001000000000000000000000000000000000000000000000000000000000000000000004948304502203a0f5f0e1f2bdbcd04db3061d18f3af70e07f4f467cbc1b8116f267025f5360b022100c792b6e215afc5afc721a351ec413e714305cb749aae3d7fee76621313418df10101000000000200000000000000000000000000000000000000000000000000000000000000000000484730440220201dc2d030e380e8f9cfb41b442d930fa5a685bb2c8db5906671f865507d0670022018d9e7a8d4c8d86a73c2a724ee38ef983ec249827e0e464841735955c707ece98101000000010100000000000000015100000000", "P2SH"],
 
-["Incorrect signature order"],
+["CHECKMULTISIG with incorrect signature order"],
 ["Note the input is just required to make the tester happy"],
 [[["b3da01dd4aae683c7aee4d5d8b52a540a508e1115f77cd7fa9a291243f501223", 0, "HASH160 0x14 0xb1ce99298d5f07364b57b1e5c9cc00be0b04a954 EQUAL"]],
 "01000000012312503f2491a2a97fcd775f11e108a540a5528b5d4dee7a3c68ae4add01dab300000000fdfe000048304502207aacee820e08b0b174e248abd8d7a34ed63b5da3abedb99934df9fddd65c05c4022100dfe87896ab5ee3df476c2655f9fbe5bd089dccbef3e4ea05b5d121169fe7f5f401483045022100f6649b0eddfdfd4ad55426663385090d51ee86c3481bdc6b0c18ea6c0ece2c0b0220561c315b07cffa6f7dd9df96dbae9200c2dee09bf93cc35ca05e6cdf613340aa014c695221031d11db38972b712a9fe1fc023577c7ae3ddb4a3004187d41c45121eecfdbb5b7210207ec36911b6ad2382860d32989c7b8728e9489d7bbc94a6b5509ef0029be128821024ea9fac06f666a4adc3fc1357b7bec1fd0bdece2b9d08579226a8ebde53058e453aeffffffff0180380100000000001976a914c9b99cddf847d10685a4fabaa0baf505f7c3dfab88ac00000000", "P2SH"],
 
+
+["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
+["It is an OP_CHECKMULTISIG with the dummy value missing"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004847304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
+
+
+["CHECKMULTISIG SCRIPT_VERIFY_NULLDUMMY tests:"],
+
+["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
+["It is an OP_CHECKMULTISIG with the dummy value set to something other than an empty string"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004a010047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+
+["As above, but using a OP_1"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000495147304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+
+["As above, but using a OP_1NEGATE"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000494f47304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+
+["As above, but with the dummy byte missing"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004847304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+
+
 ["Empty stack when we try to run CHECKSIG"],
 [[["ad503f72c18df5801ee64d76090afe4c607fb2b822e9b7b63c5826c50e22fc3b", 0, "0x21 0x027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5 CHECKSIG NOT"]],
 "01000000013bfc220ec526583cb6b7e922b8b27f604cfe0a09764de61e80f58dc1723f50ad0000000000ffffffff0101000000000000002321027c3a97665bf283a102a587a62a30a0c102d4d3b141015e2cae6f64e2543113e5ac00000000", "P2SH"],
diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json
index ddcb12ff14f0..1f51d3ce55cc 100644
--- a/src/test/data/tx_valid.json
+++ b/src/test/data/tx_valid.json
@@ -13,9 +13,23 @@
 "0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000490047304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
 
 ["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
-["It has an arbitrary extra byte stuffed into the signature at pos length - 2"],
+["It is an OP_CHECKMULTISIG with an arbitrary extra byte stuffed into the signature at pos length - 2"],
+["The dummy byte is fine however, so the NULLDUMMY flag should be happy"],
 [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
-"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+
+["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
+["It is an OP_CHECKMULTISIG with the dummy value set to something other than an empty string"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004a01ff47304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
+
+["As above, but using a OP_1"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000495147304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
+
+["As above, but using a OP_1NEGATE"],
+[[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba26000000000494f47304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2b01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH"],
 
 ["The following is c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73"],
 ["It is of interest because it contains a 0-sequence as well as a signature of SIGHASH type 0 (which is not a real type)"],
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 9edc07ab16ef..40961cbae0fe 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -39,6 +39,7 @@ unsigned int ParseFlags(string strFlags){
         mapFlagNames["P2SH"] = SCRIPT_VERIFY_P2SH;
         mapFlagNames["STRICTENC"] = SCRIPT_VERIFY_STRICTENC;
         mapFlagNames["EVEN_S"] = SCRIPT_VERIFY_EVEN_S;
+        mapFlagNames["NULLDUMMY"] = SCRIPT_VERIFY_NULLDUMMY;
     }
 
     BOOST_FOREACH(string word, words)

From f80cffa213cce7d7f82aef7cf3a2f7308fbeb009 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 22:36:46 -0400
Subject: [PATCH 0021/1819] Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY
 fails

---
 src/main.cpp | 24 ++++++++++++++++++------
 src/script.h |  6 ++++++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index cee9d027f551..e8fb26de888a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1588,14 +1588,26 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCach
                     pvChecks->push_back(CScriptCheck());
                     check.swap(pvChecks->back());
                 } else if (!check()) {
-                    if (flags & SCRIPT_VERIFY_STRICTENC) {
-                        // For now, check whether the failure was caused by non-canonical
-                        // encodings or not; if so, don't trigger DoS protection.
-                        CScriptCheck check(coins, tx, i, flags & (~SCRIPT_VERIFY_STRICTENC), 0);
+                    if (flags & STANDARD_NOT_MANDATORY_VERIFY_FLAGS) {
+                        // Check whether the failure was caused by a
+                        // non-mandatory script verification check, such as
+                        // non-standard DER encodings or non-null dummy
+                        // arguments; if so, don't trigger DoS protection to
+                        // avoid splitting the network between upgraded and
+                        // non-upgraded nodes.
+                        CScriptCheck check(coins, tx, i,
+                                flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, 0);
                         if (check())
-                            return state.Invalid(false, REJECT_NONSTANDARD, "non-canonical");
+                            return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag");
                     }
-                    return state.DoS(100,false, REJECT_NONSTANDARD, "non-canonical");
+                    // Failures of other flags indicate a transaction that is
+                    // invalid in new blocks, e.g. a invalid P2SH. We DoS ban
+                    // such nodes as they are not following the protocol. That
+                    // said during an upgrade careful thought should be taken
+                    // as to the correct behavior - we may want to continue
+                    // peering with non-upgraded nodes even after a soft-fork
+                    // super-majority vote has passed.
+                    return state.DoS(100,false, REJECT_INVALID, "mandatory-script-verify-flag-failed");
                 }
             }
         }
diff --git a/src/script.h b/src/script.h
index 01779f550cbd..bbcdad159c0b 100644
--- a/src/script.h
+++ b/src/script.h
@@ -49,6 +49,9 @@ enum
 // them to be valid. (but old blocks may not comply with) Currently just P2SH,
 // but in the future other flags may be added, such as a soft-fork to enforce
 // strict DER encoding.
+//
+// Failing one of these tests may trigger a DoS ban - see CheckInputs() for
+// details.
 static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
 
 // Standard script verification flags that standard transactions will comply
@@ -58,6 +61,9 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY
                                                          SCRIPT_VERIFY_STRICTENC |
                                                          SCRIPT_VERIFY_NULLDUMMY;
 
+// For convenience, standard but not mandatory verify flags.
+static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
+
 enum txnouttype
 {
     TX_NONSTANDARD,

From 4d79098ad548874ca6e4c09d873fc2f481e6edb4 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 16:38:44 -0400
Subject: [PATCH 0022/1819] Increase IsStandard() scriptSig length

Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
Previously with the 500 byte scriptSig limit there were odd restrictions
where even a 1-of-12 P2SH could be spent in a standard transaction(1),
yet multisig scriptPubKey's requiring more signatures quickly ran out of
scriptSig space.

From a "stuff-data-in-the-blockchain" point of view not much has changed
as with the prior commit now only allowing the dummy value to be null
the newly allowed scriptSig space can only be used for signatures. In
any case, just using more outputs is trivial and doesn't cost much.

1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
   Mined by BTC Guild.
---
 src/main.cpp | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index e8fb26de888a..8ed811c1a91f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -515,10 +515,14 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
 
     BOOST_FOREACH(const CTxIn& txin, tx.vin)
     {
-        // Biggest 'standard' txin is a 3-signature 3-of-3 CHECKMULTISIG
-        // pay-to-script-hash, which is 3 ~80-byte signatures, 3
-        // ~65-byte public keys, plus a few script ops.
-        if (txin.scriptSig.size() > 500) {
+        // Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
+        // keys. (remember the 520 byte limit on redeemScript size) That works
+        // out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)=1624
+        // bytes of scriptSig, which we round off to 1650 bytes for some minor
+        // future-proofing. That's also enough to spend a 20-of-20
+        // CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not
+        // considered standard)
+        if (txin.scriptSig.size() > 1650) {
             reason = "scriptsig-size";
             return false;
         }

From 787ee0c91394b0ae16ca2500dbacf9349e65b6bc Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Mar 2014 22:43:15 -0400
Subject: [PATCH 0023/1819] Check redeemScript size does not exceed 520 byte
 limit

redeemScripts >520bytes can't be spent due to the
MAX_SCRIPT_ELEMENT_SIZE limit; previously the addmultisigaddress and
createmultisig RPC calls would let you violate that limit unknowingly.

Also made the wallet code itself check the redeemScript prior to adding
it to the wallet, which in the (rare) instance that a user has added an
invalid oversized redeemScript to their wallet causes an error on
startup. The affected key isn't added to the wallet; other keys are
unaffected.
---
 src/keystore.cpp  | 3 +++
 src/rpcmisc.cpp   | 9 +++++++--
 src/rpcwallet.cpp | 4 ++--
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/keystore.cpp b/src/keystore.cpp
index 46402ea25b74..594e0c61da9d 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -33,6 +33,9 @@ bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey)
 
 bool CBasicKeyStore::AddCScript(const CScript& redeemScript)
 {
+    if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
+        return error("CBasicKeyStore::AddCScript() : redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
+
     LOCK(cs_KeyStore);
     mapScripts[redeemScript.GetID()] = redeemScript;
     return true;
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index ae154f2ae4df..a2694d458acf 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -176,7 +176,7 @@ Value validateaddress(const Array& params, bool fHelp)
 //
 // Used by addmultisigaddress / createmultisig:
 //
-CScript _createmultisig(const Array& params)
+CScript _createmultisig_redeemScript(const Array& params)
 {
     int nRequired = params[0].get_int();
     const Array& keys = params[1].get_array();
@@ -228,6 +228,11 @@ CScript _createmultisig(const Array& params)
     }
     CScript result;
     result.SetMultisig(nRequired, pubkeys);
+
+    if (result.size() > MAX_SCRIPT_ELEMENT_SIZE)
+        throw runtime_error(
+                strprintf("redeemScript exceeds size limit: %d > %d", result.size(), MAX_SCRIPT_ELEMENT_SIZE));
+
     return result;
 }
 
@@ -263,7 +268,7 @@ Value createmultisig(const Array& params, bool fHelp)
     }
 
     // Construct using pay-to-script-hash:
-    CScript inner = _createmultisig(params);
+    CScript inner = _createmultisig_redeemScript(params);
     CScriptID innerID = inner.GetID();
     CBitcoinAddress address(innerID);
 
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index a5a7df08674f..e21881dbe93a 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -871,7 +871,7 @@ Value sendmany(const Array& params, bool fHelp)
 }
 
 // Defined in rpcmisc.cpp
-extern CScript _createmultisig(const Array& params);
+extern CScript _createmultisig_redeemScript(const Array& params);
 
 Value addmultisigaddress(const Array& params, bool fHelp)
 {
@@ -908,7 +908,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
         strAccount = AccountFromValue(params[2]);
 
     // Construct using pay-to-script-hash:
-    CScript inner = _createmultisig(params);
+    CScript inner = _createmultisig_redeemScript(params);
     CScriptID innerID = inner.GetID();
     pwalletMain->AddCScript(inner);
 

From e443ed2462b706650f51f08c8760dbf5047aa77f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 9 May 2014 16:33:37 +0200
Subject: [PATCH 0024/1819] Fix transaction tests

Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
---
 src/test/transaction_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 40961cbae0fe..feba5ee80e02 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -38,7 +38,7 @@ unsigned int ParseFlags(string strFlags){
         mapFlagNames["NONE"] = SCRIPT_VERIFY_NONE;
         mapFlagNames["P2SH"] = SCRIPT_VERIFY_P2SH;
         mapFlagNames["STRICTENC"] = SCRIPT_VERIFY_STRICTENC;
-        mapFlagNames["EVEN_S"] = SCRIPT_VERIFY_EVEN_S;
+        mapFlagNames["LOW_S"] = SCRIPT_VERIFY_LOW_S;
         mapFlagNames["NULLDUMMY"] = SCRIPT_VERIFY_NULLDUMMY;
     }
 

From eb2cbd754d0ed02ab1c3f0889b6ee1776abd5082 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 19 Apr 2014 23:02:47 +0200
Subject: [PATCH 0025/1819] Deduplicate shared code between uint160 and uint256

---
 src/uint256.h | 306 +++++++++++---------------------------------------
 1 file changed, 65 insertions(+), 241 deletions(-)

diff --git a/src/uint256.h b/src/uint256.h
index ba903bc8fc61..a3f783587550 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
@@ -19,17 +19,56 @@ inline signed char HexDigit(char c)
     return p_util_hexdigit[(unsigned char)c];
 }
 
-/** Base class without constructors for uint256 and uint160.
- * This makes the compiler let you use it in a union.
- */
+/** Template base class for unsigned big integers. */
 template<unsigned int BITS>
 class base_uint
 {
-protected:
+private:
     enum { WIDTH=BITS/32 };
     uint32_t pn[WIDTH];
 public:
 
+    base_uint()
+    {
+        for (int i = 0; i < WIDTH; i++)
+            pn[i] = 0;
+    }
+
+    base_uint(const base_uint& b)
+    {
+        for (int i = 0; i < WIDTH; i++)
+            pn[i] = b.pn[i];
+    }
+
+    base_uint& operator=(const base_uint& b)
+    {
+        for (int i = 0; i < WIDTH; i++)
+            pn[i] = b.pn[i];
+        return *this;
+    }
+
+    base_uint(uint64_t b)
+    {
+        pn[0] = (unsigned int)b;
+        pn[1] = (unsigned int)(b >> 32);
+        for (int i = 2; i < WIDTH; i++)
+            pn[i] = 0;
+    }
+
+    explicit base_uint(const std::string& str)
+    {
+        SetHex(str);
+    }
+
+    explicit base_uint(const std::vector<unsigned char>& vch)
+    {
+        if (vch.size() == sizeof(pn)) {
+            memcpy(pn, &vch[0], sizeof(pn));
+        } else {
+            *this = 0;
+        }
+    }
+
     bool operator!() const
     {
         for (int i = 0; i < WIDTH; i++)
@@ -292,7 +331,13 @@ class base_uint
         return (!(a == b));
     }
 
-
+    friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
+    friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
+    friend inline const base_uint operator|(const base_uint& a, const base_uint& b) { return base_uint(a) |= b; }
+    friend inline const base_uint operator&(const base_uint& a, const base_uint& b) { return base_uint(a) &= b; }
+    friend inline const base_uint operator^(const base_uint& a, const base_uint& b) { return base_uint(a) ^= b; }
+    friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
+    friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
 
     std::string GetHex() const
     {
@@ -373,263 +418,42 @@ class base_uint
         return pn[0] | (uint64_t)pn[1] << 32;
     }
 
-//    unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const
     unsigned int GetSerializeSize(int nType, int nVersion) const
     {
         return sizeof(pn);
     }
 
     template<typename Stream>
-//    void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const
     void Serialize(Stream& s, int nType, int nVersion) const
     {
         s.write((char*)pn, sizeof(pn));
     }
 
     template<typename Stream>
-//    void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION)
     void Unserialize(Stream& s, int nType, int nVersion)
     {
         s.read((char*)pn, sizeof(pn));
     }
-
-
-    friend class uint160;
-    friend class uint256;
 };
 
-typedef base_uint<160> base_uint160;
-typedef base_uint<256> base_uint256;
-
-
-
-//
-// uint160 and uint256 could be implemented as templates, but to keep
-// compile errors and debugging cleaner, they're copy and pasted.
-//
-
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uint160
-//
-
-/** 160-bit unsigned integer */
-class uint160 : public base_uint160
-{
+/** 160-bit unsigned big integer. */
+class uint160 : public base_uint<160> {
 public:
-    typedef base_uint160 basetype;
-
-    uint160()
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = 0;
-    }
-
-    uint160(const basetype& b)
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = b.pn[i];
-    }
-
-    uint160& operator=(const basetype& b)
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = b.pn[i];
-        return *this;
-    }
-
-    uint160(uint64_t b)
-    {
-        pn[0] = (unsigned int)b;
-        pn[1] = (unsigned int)(b >> 32);
-        for (int i = 2; i < WIDTH; i++)
-            pn[i] = 0;
-    }
-
-    uint160& operator=(uint64_t b)
-    {
-        pn[0] = (unsigned int)b;
-        pn[1] = (unsigned int)(b >> 32);
-        for (int i = 2; i < WIDTH; i++)
-            pn[i] = 0;
-        return *this;
-    }
-
-    explicit uint160(const std::string& str)
-    {
-        SetHex(str);
-    }
-
-    explicit uint160(const std::vector<unsigned char>& vch)
-    {
-        if (vch.size() == sizeof(pn))
-            memcpy(pn, &vch[0], sizeof(pn));
-        else
-            *this = 0;
-    }
+    uint160() {}
+    uint160(const base_uint<160>& b) : base_uint<160>(b) {}
+    uint160(uint64_t b) : base_uint<160>(b) {}
+    explicit uint160(const std::string& str) : base_uint<160>(str) {}
+    explicit uint160(const std::vector<unsigned char>& vch) : base_uint<160>(vch) {}
 };
 
-inline bool operator==(const uint160& a, uint64_t b)                         { return (base_uint160)a == b; }
-inline bool operator!=(const uint160& a, uint64_t b)                         { return (base_uint160)a != b; }
-inline const uint160 operator<<(const base_uint160& a, unsigned int shift)   { return uint160(a) <<= shift; }
-inline const uint160 operator>>(const base_uint160& a, unsigned int shift)   { return uint160(a) >>= shift; }
-inline const uint160 operator<<(const uint160& a, unsigned int shift)        { return uint160(a) <<= shift; }
-inline const uint160 operator>>(const uint160& a, unsigned int shift)        { return uint160(a) >>= shift; }
-
-inline const uint160 operator^(const base_uint160& a, const base_uint160& b) { return uint160(a) ^= b; }
-inline const uint160 operator&(const base_uint160& a, const base_uint160& b) { return uint160(a) &= b; }
-inline const uint160 operator|(const base_uint160& a, const base_uint160& b) { return uint160(a) |= b; }
-inline const uint160 operator+(const base_uint160& a, const base_uint160& b) { return uint160(a) += b; }
-inline const uint160 operator-(const base_uint160& a, const base_uint160& b) { return uint160(a) -= b; }
-
-inline bool operator<(const base_uint160& a, const uint160& b)               { return (base_uint160)a <  (base_uint160)b; }
-inline bool operator<=(const base_uint160& a, const uint160& b)              { return (base_uint160)a <= (base_uint160)b; }
-inline bool operator>(const base_uint160& a, const uint160& b)               { return (base_uint160)a >  (base_uint160)b; }
-inline bool operator>=(const base_uint160& a, const uint160& b)              { return (base_uint160)a >= (base_uint160)b; }
-inline bool operator==(const base_uint160& a, const uint160& b)              { return (base_uint160)a == (base_uint160)b; }
-inline bool operator!=(const base_uint160& a, const uint160& b)              { return (base_uint160)a != (base_uint160)b; }
-inline const uint160 operator^(const base_uint160& a, const uint160& b)      { return (base_uint160)a ^  (base_uint160)b; }
-inline const uint160 operator&(const base_uint160& a, const uint160& b)      { return (base_uint160)a &  (base_uint160)b; }
-inline const uint160 operator|(const base_uint160& a, const uint160& b)      { return (base_uint160)a |  (base_uint160)b; }
-inline const uint160 operator+(const base_uint160& a, const uint160& b)      { return (base_uint160)a +  (base_uint160)b; }
-inline const uint160 operator-(const base_uint160& a, const uint160& b)      { return (base_uint160)a -  (base_uint160)b; }
-
-inline bool operator<(const uint160& a, const base_uint160& b)               { return (base_uint160)a <  (base_uint160)b; }
-inline bool operator<=(const uint160& a, const base_uint160& b)              { return (base_uint160)a <= (base_uint160)b; }
-inline bool operator>(const uint160& a, const base_uint160& b)               { return (base_uint160)a >  (base_uint160)b; }
-inline bool operator>=(const uint160& a, const base_uint160& b)              { return (base_uint160)a >= (base_uint160)b; }
-inline bool operator==(const uint160& a, const base_uint160& b)              { return (base_uint160)a == (base_uint160)b; }
-inline bool operator!=(const uint160& a, const base_uint160& b)              { return (base_uint160)a != (base_uint160)b; }
-inline const uint160 operator^(const uint160& a, const base_uint160& b)      { return (base_uint160)a ^  (base_uint160)b; }
-inline const uint160 operator&(const uint160& a, const base_uint160& b)      { return (base_uint160)a &  (base_uint160)b; }
-inline const uint160 operator|(const uint160& a, const base_uint160& b)      { return (base_uint160)a |  (base_uint160)b; }
-inline const uint160 operator+(const uint160& a, const base_uint160& b)      { return (base_uint160)a +  (base_uint160)b; }
-inline const uint160 operator-(const uint160& a, const base_uint160& b)      { return (base_uint160)a -  (base_uint160)b; }
-
-inline bool operator<(const uint160& a, const uint160& b)                    { return (base_uint160)a <  (base_uint160)b; }
-inline bool operator<=(const uint160& a, const uint160& b)                   { return (base_uint160)a <= (base_uint160)b; }
-inline bool operator>(const uint160& a, const uint160& b)                    { return (base_uint160)a >  (base_uint160)b; }
-inline bool operator>=(const uint160& a, const uint160& b)                   { return (base_uint160)a >= (base_uint160)b; }
-inline bool operator==(const uint160& a, const uint160& b)                   { return (base_uint160)a == (base_uint160)b; }
-inline bool operator!=(const uint160& a, const uint160& b)                   { return (base_uint160)a != (base_uint160)b; }
-inline const uint160 operator^(const uint160& a, const uint160& b)           { return (base_uint160)a ^  (base_uint160)b; }
-inline const uint160 operator&(const uint160& a, const uint160& b)           { return (base_uint160)a &  (base_uint160)b; }
-inline const uint160 operator|(const uint160& a, const uint160& b)           { return (base_uint160)a |  (base_uint160)b; }
-inline const uint160 operator+(const uint160& a, const uint160& b)           { return (base_uint160)a +  (base_uint160)b; }
-inline const uint160 operator-(const uint160& a, const uint160& b)           { return (base_uint160)a -  (base_uint160)b; }
-
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uint256
-//
-
-/** 256-bit unsigned integer */
-class uint256 : public base_uint256
-{
+/** 256-bit unsigned big integer. */
+class uint256 : public base_uint<256> {
 public:
-    typedef base_uint256 basetype;
-
-    uint256()
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = 0;
-    }
-
-    uint256(const basetype& b)
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = b.pn[i];
-    }
-
-    uint256& operator=(const basetype& b)
-    {
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = b.pn[i];
-        return *this;
-    }
-
-    uint256(uint64_t b)
-    {
-        pn[0] = (unsigned int)b;
-        pn[1] = (unsigned int)(b >> 32);
-        for (int i = 2; i < WIDTH; i++)
-            pn[i] = 0;
-    }
-
-    uint256& operator=(uint64_t b)
-    {
-        pn[0] = (unsigned int)b;
-        pn[1] = (unsigned int)(b >> 32);
-        for (int i = 2; i < WIDTH; i++)
-            pn[i] = 0;
-        return *this;
-    }
-
-    explicit uint256(const std::string& str)
-    {
-        SetHex(str);
-    }
-
-    explicit uint256(const std::vector<unsigned char>& vch)
-    {
-        if (vch.size() == sizeof(pn))
-            memcpy(pn, &vch[0], sizeof(pn));
-        else
-            *this = 0;
-    }
+    uint256() {}
+    uint256(const base_uint<256>& b) : base_uint<256>(b) {}
+    uint256(uint64_t b) : base_uint<256>(b) {}
+    explicit uint256(const std::string& str) : base_uint<256>(str) {}
+    explicit uint256(const std::vector<unsigned char>& vch) : base_uint<256>(vch) {}
 };
 
-inline bool operator==(const uint256& a, uint64_t b)                          { return (base_uint256)a == b; }
-inline bool operator!=(const uint256& a, uint64_t b)                          { return (base_uint256)a != b; }
-inline const uint256 operator<<(const base_uint256& a, unsigned int shift)   { return uint256(a) <<= shift; }
-inline const uint256 operator>>(const base_uint256& a, unsigned int shift)   { return uint256(a) >>= shift; }
-inline const uint256 operator<<(const uint256& a, unsigned int shift)        { return uint256(a) <<= shift; }
-inline const uint256 operator>>(const uint256& a, unsigned int shift)        { return uint256(a) >>= shift; }
-
-inline const uint256 operator^(const base_uint256& a, const base_uint256& b) { return uint256(a) ^= b; }
-inline const uint256 operator&(const base_uint256& a, const base_uint256& b) { return uint256(a) &= b; }
-inline const uint256 operator|(const base_uint256& a, const base_uint256& b) { return uint256(a) |= b; }
-inline const uint256 operator+(const base_uint256& a, const base_uint256& b) { return uint256(a) += b; }
-inline const uint256 operator-(const base_uint256& a, const base_uint256& b) { return uint256(a) -= b; }
-
-inline bool operator<(const base_uint256& a, const uint256& b)          { return (base_uint256)a <  (base_uint256)b; }
-inline bool operator<=(const base_uint256& a, const uint256& b)         { return (base_uint256)a <= (base_uint256)b; }
-inline bool operator>(const base_uint256& a, const uint256& b)          { return (base_uint256)a >  (base_uint256)b; }
-inline bool operator>=(const base_uint256& a, const uint256& b)         { return (base_uint256)a >= (base_uint256)b; }
-inline bool operator==(const base_uint256& a, const uint256& b)         { return (base_uint256)a == (base_uint256)b; }
-inline bool operator!=(const base_uint256& a, const uint256& b)         { return (base_uint256)a != (base_uint256)b; }
-inline const uint256 operator^(const base_uint256& a, const uint256& b) { return (base_uint256)a ^  (base_uint256)b; }
-inline const uint256 operator&(const base_uint256& a, const uint256& b) { return (base_uint256)a &  (base_uint256)b; }
-inline const uint256 operator|(const base_uint256& a, const uint256& b) { return (base_uint256)a |  (base_uint256)b; }
-inline const uint256 operator+(const base_uint256& a, const uint256& b) { return (base_uint256)a +  (base_uint256)b; }
-inline const uint256 operator-(const base_uint256& a, const uint256& b) { return (base_uint256)a -  (base_uint256)b; }
-
-inline bool operator<(const uint256& a, const base_uint256& b)          { return (base_uint256)a <  (base_uint256)b; }
-inline bool operator<=(const uint256& a, const base_uint256& b)         { return (base_uint256)a <= (base_uint256)b; }
-inline bool operator>(const uint256& a, const base_uint256& b)          { return (base_uint256)a >  (base_uint256)b; }
-inline bool operator>=(const uint256& a, const base_uint256& b)         { return (base_uint256)a >= (base_uint256)b; }
-inline bool operator==(const uint256& a, const base_uint256& b)         { return (base_uint256)a == (base_uint256)b; }
-inline bool operator!=(const uint256& a, const base_uint256& b)         { return (base_uint256)a != (base_uint256)b; }
-inline const uint256 operator^(const uint256& a, const base_uint256& b) { return (base_uint256)a ^  (base_uint256)b; }
-inline const uint256 operator&(const uint256& a, const base_uint256& b) { return (base_uint256)a &  (base_uint256)b; }
-inline const uint256 operator|(const uint256& a, const base_uint256& b) { return (base_uint256)a |  (base_uint256)b; }
-inline const uint256 operator+(const uint256& a, const base_uint256& b) { return (base_uint256)a +  (base_uint256)b; }
-inline const uint256 operator-(const uint256& a, const base_uint256& b) { return (base_uint256)a -  (base_uint256)b; }
-
-inline bool operator<(const uint256& a, const uint256& b)               { return (base_uint256)a <  (base_uint256)b; }
-inline bool operator<=(const uint256& a, const uint256& b)              { return (base_uint256)a <= (base_uint256)b; }
-inline bool operator>(const uint256& a, const uint256& b)               { return (base_uint256)a >  (base_uint256)b; }
-inline bool operator>=(const uint256& a, const uint256& b)              { return (base_uint256)a >= (base_uint256)b; }
-inline bool operator==(const uint256& a, const uint256& b)              { return (base_uint256)a == (base_uint256)b; }
-inline bool operator!=(const uint256& a, const uint256& b)              { return (base_uint256)a != (base_uint256)b; }
-inline const uint256 operator^(const uint256& a, const uint256& b)      { return (base_uint256)a ^  (base_uint256)b; }
-inline const uint256 operator&(const uint256& a, const uint256& b)      { return (base_uint256)a &  (base_uint256)b; }
-inline const uint256 operator|(const uint256& a, const uint256& b)      { return (base_uint256)a |  (base_uint256)b; }
-inline const uint256 operator+(const uint256& a, const uint256& b)      { return (base_uint256)a +  (base_uint256)b; }
-inline const uint256 operator-(const uint256& a, const uint256& b)      { return (base_uint256)a -  (base_uint256)b; }
-
 #endif

From 4d480c8a3fe3c58eeb083ea544c6f9e991606692 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 19 Apr 2014 23:25:44 +0200
Subject: [PATCH 0026/1819] Exception instead of assigning 0 in case of wrong
 vector length

---
 src/test/uint256_tests.cpp | 10 +++++-----
 src/uint256.h              | 15 ++++++++++-----
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp
index 815babf1070c..8e4b63c8bc8c 100644
--- a/src/test/uint256_tests.cpp
+++ b/src/test/uint256_tests.cpp
@@ -160,11 +160,11 @@ BOOST_AUTO_TEST_CASE( basics ) // constructors, equality, inequality
     tmpS = ~R2S; BOOST_CHECK(tmpS == ~R2S);
     tmpS = ~MaxS; BOOST_CHECK(tmpS == ~MaxS);
 
-    // Wrong length must give 0
-    BOOST_CHECK(uint256(std::vector<unsigned char>(OneArray,OneArray+31)) == 0);
-    BOOST_CHECK(uint256(std::vector<unsigned char>(OneArray,OneArray+20)) == 0);
-    BOOST_CHECK(uint160(std::vector<unsigned char>(OneArray,OneArray+32)) == 0);
-    BOOST_CHECK(uint160(std::vector<unsigned char>(OneArray,OneArray+19)) == 0);
+    // Wrong length must throw exception.
+    BOOST_CHECK_THROW(uint256(std::vector<unsigned char>(OneArray,OneArray+31)), uint_error);
+    BOOST_CHECK_THROW(uint256(std::vector<unsigned char>(OneArray,OneArray+20)), uint_error);
+    BOOST_CHECK_THROW(uint160(std::vector<unsigned char>(OneArray,OneArray+32)), uint_error);
+    BOOST_CHECK_THROW(uint160(std::vector<unsigned char>(OneArray,OneArray+19)), uint_error);
 }
 
 void shiftArrayRight(unsigned char* to, const unsigned char* from, unsigned int arrayLength, unsigned int bitsToShift) 
diff --git a/src/uint256.h b/src/uint256.h
index a3f783587550..b6365bb36bc6 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -6,6 +6,8 @@
 #ifndef BITCOIN_UINT256_H
 #define BITCOIN_UINT256_H
 
+#include <assert.h>
+#include <stdexcept>
 #include <stdint.h>
 #include <stdio.h>
 #include <string>
@@ -19,6 +21,11 @@ inline signed char HexDigit(char c)
     return p_util_hexdigit[(unsigned char)c];
 }
 
+class uint_error : public std::runtime_error {
+public:
+    explicit uint_error(const std::string& str) : std::runtime_error(str) {}
+};
+
 /** Template base class for unsigned big integers. */
 template<unsigned int BITS>
 class base_uint
@@ -62,11 +69,9 @@ class base_uint
 
     explicit base_uint(const std::vector<unsigned char>& vch)
     {
-        if (vch.size() == sizeof(pn)) {
-            memcpy(pn, &vch[0], sizeof(pn));
-        } else {
-            *this = 0;
-        }
+        if (vch.size() != sizeof(pn))
+            throw uint_error("Converting vector of wrong size to base_uint");
+        memcpy(pn, &vch[0], sizeof(pn));
     }
 
     bool operator!() const

From a7031507e647da0723bf289dadba10ef1a50f278 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 20 Apr 2014 01:03:19 +0200
Subject: [PATCH 0027/1819] Add multiplication and division to uint160/uint256

---
 src/test/uint256_tests.cpp | 71 ++++++++++++++++++++++++++++++++++++++
 src/uint256.h              | 70 +++++++++++++++++++++++++++++++++++++
 2 files changed, 141 insertions(+)

diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp
index 8e4b63c8bc8c..226d737defd9 100644
--- a/src/test/uint256_tests.cpp
+++ b/src/test/uint256_tests.cpp
@@ -482,6 +482,77 @@ BOOST_AUTO_TEST_CASE( plusMinus )
 
 }
 
+BOOST_AUTO_TEST_CASE( multiply )
+{
+    BOOST_CHECK((R1L * R1L).ToString() == "62a38c0486f01e45879d7910a7761bf30d5237e9873f9bff3642a732c4d84f10");
+    BOOST_CHECK((R1L * R2L).ToString() == "de37805e9986996cfba76ff6ba51c008df851987d9dd323f0e5de07760529c40");
+    BOOST_CHECK((R1L * ZeroL) == ZeroL);
+    BOOST_CHECK((R1L * OneL) == R1L);
+    BOOST_CHECK((R1L * MaxL) == -R1L);
+    BOOST_CHECK((R2L * R1L) == (R1L * R2L));
+    BOOST_CHECK((R2L * R2L).ToString() == "ac8c010096767d3cae5005dec28bb2b45a1d85ab7996ccd3e102a650f74ff100");
+    BOOST_CHECK((R2L * ZeroL) == ZeroL);
+    BOOST_CHECK((R2L * OneL) == R2L);
+    BOOST_CHECK((R2L * MaxL) == -R2L);
+
+    BOOST_CHECK((R1S * R1S).ToString() == "a7761bf30d5237e9873f9bff3642a732c4d84f10");
+    BOOST_CHECK((R1S * R2S).ToString() == "ba51c008df851987d9dd323f0e5de07760529c40");
+    BOOST_CHECK((R1S * ZeroS) == ZeroS);
+    BOOST_CHECK((R1S * OneS) == R1S);
+    BOOST_CHECK((R1S * MaxS) == -R1S);
+    BOOST_CHECK((R2S * R1S) == (R1S * R2S));
+    BOOST_CHECK((R2S * R2S).ToString() == "c28bb2b45a1d85ab7996ccd3e102a650f74ff100");
+    BOOST_CHECK((R2S * ZeroS) == ZeroS);
+    BOOST_CHECK((R2S * OneS) == R2S);
+    BOOST_CHECK((R2S * MaxS) == -R2S);
+
+    BOOST_CHECK(MaxL * MaxL == OneL);
+    BOOST_CHECK(MaxS * MaxS == OneS);
+
+    BOOST_CHECK((R1L * 0) == 0);
+    BOOST_CHECK((R1L * 1) == R1L);
+    BOOST_CHECK((R1L * 3).ToString() == "7759b1c0ed14047f961ad09b20ff83687876a0181a367b813634046f91def7d4");
+    BOOST_CHECK((R2L * 0x87654321UL).ToString() == "23f7816e30c4ae2017257b7a0fa64d60402f5234d46e746b61c960d09a26d070");
+    BOOST_CHECK((R1S * 0) == 0);
+    BOOST_CHECK((R1S * 1) == R1S);
+    BOOST_CHECK((R1S * 7).ToString() == "f7a987f3c3bf758d927f202d7e795faeff084244");
+    BOOST_CHECK((R2S * 0xFFFFFFFFUL).ToString() == "1c6f6c930353e17f7d6127213bb18d2883e2cd90");
+}
+
+BOOST_AUTO_TEST_CASE( divide )
+{
+    uint256 D1L("AD7133AC1977FA2B7");
+    uint256 D2L("ECD751716");
+    BOOST_CHECK((R1L / D1L).ToString() == "00000000000000000b8ac01106981635d9ed112290f8895545a7654dde28fb3a");
+    BOOST_CHECK((R1L / D2L).ToString() == "000000000873ce8efec5b67150bad3aa8c5fcb70e947586153bf2cec7c37c57a");
+    BOOST_CHECK(R1L / OneL == R1L);
+    BOOST_CHECK(R1L / MaxL == ZeroL);
+    BOOST_CHECK(MaxL / R1L == 2);
+    BOOST_CHECK_THROW(R1L / ZeroL, uint_error);
+    BOOST_CHECK((R2L / D1L).ToString() == "000000000000000013e1665895a1cc981de6d93670105a6b3ec3b73141b3a3c5");
+    BOOST_CHECK((R2L / D2L).ToString() == "000000000e8f0abe753bb0afe2e9437ee85d280be60882cf0bd1aaf7fa3cc2c4");
+    BOOST_CHECK(R2L / OneL == R2L);
+    BOOST_CHECK(R2L / MaxL == ZeroL);
+    BOOST_CHECK(MaxL / R2L == 1);
+    BOOST_CHECK_THROW(R2L / ZeroL, uint_error);
+
+    uint160 D1S("D3C5EDCDEA54EB92679F0A4B4");
+    uint160 D2S("13037");
+    BOOST_CHECK((R1S / D1S).ToString() == "0000000000000000000000000db9af3beade6c02");
+    BOOST_CHECK((R1S / D2S).ToString() == "000098dfb6cc40ca592bf74366794f298ada205c");
+    BOOST_CHECK(R1S / OneS == R1S);
+    BOOST_CHECK(R1S / MaxS == ZeroS);
+    BOOST_CHECK(MaxS / R1S == 1);
+    BOOST_CHECK_THROW(R1S / ZeroS, uint_error);
+    BOOST_CHECK((R2S / D1S).ToString() == "0000000000000000000000000c5608e781182047");
+    BOOST_CHECK((R2S / D2S).ToString() == "00008966751b7187c3c67c1fda5cea7db2c1c069");
+    BOOST_CHECK(R2S / OneS == R2S);
+    BOOST_CHECK(R2S / MaxS == ZeroS);
+    BOOST_CHECK(MaxS / R2S == 1);
+    BOOST_CHECK_THROW(R2S / ZeroS, uint_error);
+}
+
+
 bool almostEqual(double d1, double d2) 
 {
     return fabs(d1-d2) <= 4*fabs(d1)*std::numeric_limits<double>::epsilon();
diff --git a/src/uint256.h b/src/uint256.h
index b6365bb36bc6..7b17694eb2d6 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -222,6 +222,57 @@ class base_uint
         return *this;
     }
 
+    base_uint& operator*=(uint32_t b32)
+    {
+        uint64_t carry = 0;
+        for (int i = 0; i < WIDTH; i++)
+        {
+            uint64_t n = carry + (uint64_t)b32 * pn[i];
+            pn[i] = n & 0xffffffff;
+            carry = n >> 32;
+        }
+        return *this;
+    }
+
+    base_uint& operator*=(const base_uint& b)
+    {
+        base_uint a = *this;
+        *this = 0;
+        for (int j = 0; j < WIDTH; j++) {
+            uint64_t carry = 0;
+            for (int i = 0; i + j < WIDTH; i++) {
+                uint64_t n = carry + pn[i + j] + (uint64_t)a.pn[j] * b.pn[i];
+                pn[i + j] = n & 0xffffffff;
+                carry = n >> 32;
+            }
+        }
+        return *this;
+    }
+
+    base_uint& operator/=(const base_uint& b)
+    {
+        base_uint div = b; // make a copy, so we can shift.
+        base_uint num = *this; // make a copy, so we can subtract.
+        *this = 0; // the quotient.
+        int num_bits = num.bits();
+        int div_bits = div.bits();
+        if (div_bits == 0)
+            throw uint_error("Division by zero");
+        if (div_bits > num_bits) // the result is certainly 0.
+            return *this;
+        int shift = num_bits - div_bits;
+        div <<= shift; // shift so that div and nun align.
+        while (shift >= 0) {
+            if (num >= div) {
+                num -= div;
+                pn[shift / 32] |= (1 << (shift & 31)); // set a bit of the result.
+            }
+            div >>= 1; // shift back.
+            shift--;
+        }
+        // num now contains the remainder of the division.
+        return *this;
+    }
 
     base_uint& operator++()
     {
@@ -338,11 +389,14 @@ class base_uint
 
     friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
     friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
+    friend inline const base_uint operator*(const base_uint& a, const base_uint& b) { return base_uint(a) *= b; }
+    friend inline const base_uint operator/(const base_uint& a, const base_uint& b) { return base_uint(a) /= b; }
     friend inline const base_uint operator|(const base_uint& a, const base_uint& b) { return base_uint(a) |= b; }
     friend inline const base_uint operator&(const base_uint& a, const base_uint& b) { return base_uint(a) &= b; }
     friend inline const base_uint operator^(const base_uint& a, const base_uint& b) { return base_uint(a) ^= b; }
     friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
     friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
+    friend inline const base_uint operator*(const base_uint& a, uint32_t b) { return base_uint(a) *= b; }
 
     std::string GetHex() const
     {
@@ -417,6 +471,22 @@ class base_uint
         return sizeof(pn);
     }
 
+    // Returns the position of the highest bit set plus one, or zero if the
+    // value is zero.
+    unsigned int bits() const
+    {
+        for (int pos = WIDTH-1; pos >= 0; pos--) {
+            if (pn[pos]) {
+                for (int bits = 31; bits > 0; bits--) {
+                    if (pn[pos] & 1<<bits)
+                        return 32*pos + bits + 1;
+                }
+                return 32*pos + 1;
+            }
+        }
+        return 0;
+    }
+
     uint64_t GetLow64() const
     {
         assert(WIDTH >= 2);

From df9eb5e14fa8072bc8a82b59e712c2ba36f13f4c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 20 Apr 2014 03:19:20 +0200
Subject: [PATCH 0028/1819] Move {Get,Set}Compact from bignum to uint256

---
 src/bignum.h               |  65 -------------------
 src/chainparams.cpp        |   4 +-
 src/chainparams.h          |   4 +-
 src/main.cpp               |  43 +++++++------
 src/main.h                 |  17 +++--
 src/miner.cpp              |   6 +-
 src/rpcmining.cpp          |   4 +-
 src/test/DoS_tests.cpp     |   4 +-
 src/test/bignum_tests.cpp  |  88 -------------------------
 src/test/uint256_tests.cpp | 129 +++++++++++++++++++++++++++++++++++++
 src/txdb.cpp               |   6 --
 src/txdb.h                 |   2 -
 src/uint256.h              |  70 ++++++++++++++++++++
 13 files changed, 243 insertions(+), 199 deletions(-)

diff --git a/src/bignum.h b/src/bignum.h
index 0259338b319d..6b77462d838b 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -269,71 +269,6 @@ class CBigNum : public BIGNUM
         return vch;
     }
 
-    // The "compact" format is a representation of a whole
-    // number N using an unsigned 32bit number similar to a
-    // floating point format.
-    // The most significant 8 bits are the unsigned exponent of base 256.
-    // This exponent can be thought of as "number of bytes of N".
-    // The lower 23 bits are the mantissa.
-    // Bit number 24 (0x800000) represents the sign of N.
-    // N = (-1^sign) * mantissa * 256^(exponent-3)
-    //
-    // Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().
-    // MPI uses the most significant bit of the first byte as sign.
-    // Thus 0x1234560000 is compact (0x05123456)
-    // and  0xc0de000000 is compact (0x0600c0de)
-    // (0x05c0de00) would be -0x40de000000
-    //
-    // Bitcoin only uses this "compact" format for encoding difficulty
-    // targets, which are unsigned 256bit quantities.  Thus, all the
-    // complexities of the sign bit and using base 256 are probably an
-    // implementation accident.
-    //
-    // This implementation directly uses shifts instead of going
-    // through an intermediate MPI representation.
-    CBigNum& SetCompact(unsigned int nCompact)
-    {
-        unsigned int nSize = nCompact >> 24;
-        bool fNegative     =(nCompact & 0x00800000) != 0;
-        unsigned int nWord = nCompact & 0x007fffff;
-        if (nSize <= 3)
-        {
-            nWord >>= 8*(3-nSize);
-            BN_set_word(this, nWord);
-        }
-        else
-        {
-            BN_set_word(this, nWord);
-            BN_lshift(this, this, 8*(nSize-3));
-        }
-        BN_set_negative(this, fNegative);
-        return *this;
-    }
-
-    unsigned int GetCompact() const
-    {
-        unsigned int nSize = BN_num_bytes(this);
-        unsigned int nCompact = 0;
-        if (nSize <= 3)
-            nCompact = BN_get_word(this) << 8*(3-nSize);
-        else
-        {
-            CBigNum bn;
-            BN_rshift(&bn, this, 8*(nSize-3));
-            nCompact = BN_get_word(&bn);
-        }
-        // The 0x00800000 bit denotes the sign.
-        // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.
-        if (nCompact & 0x00800000)
-        {
-            nCompact >>= 8;
-            nSize++;
-        }
-        nCompact |= nSize << 24;
-        nCompact |= (BN_is_negative(this) ? 0x00800000 : 0);
-        return nCompact;
-    }
-
     void SetHex(const std::string& str)
     {
         // skip 0x
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index eb56800b92fb..f5cf846a01b0 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -110,7 +110,7 @@ class CMainParams : public CChainParams {
         vAlertPubKey = ParseHex("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284");
         nDefaultPort = 8333;
         nRPCPort = 8332;
-        bnProofOfWorkLimit = CBigNum(~uint256(0) >> 32);
+        bnProofOfWorkLimit = ~uint256(0) >> 32;
         nSubsidyHalvingInterval = 210000;
 
         // Build the genesis block. Note that the output of the genesis coinbase cannot
@@ -233,7 +233,7 @@ class CRegTestParams : public CTestNetParams {
         pchMessageStart[2] = 0xb5;
         pchMessageStart[3] = 0xda;
         nSubsidyHalvingInterval = 150;
-        bnProofOfWorkLimit = CBigNum(~uint256(0) >> 1);
+        bnProofOfWorkLimit = ~uint256(0) >> 1;
         genesis.nTime = 1296688602;
         genesis.nBits = 0x207fffff;
         genesis.nNonce = 2;
diff --git a/src/chainparams.h b/src/chainparams.h
index 542afeaf92bd..f3f24efd9922 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -56,7 +56,7 @@ class CChainParams
     const MessageStartChars& MessageStart() const { return pchMessageStart; }
     const vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
     int GetDefaultPort() const { return nDefaultPort; }
-    const CBigNum& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
+    const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
     virtual const CBlock& GenesisBlock() const = 0;
     virtual bool RequireRPCPassword() const { return true; }
@@ -75,7 +75,7 @@ class CChainParams
     vector<unsigned char> vAlertPubKey;
     int nDefaultPort;
     int nRPCPort;
-    CBigNum bnProofOfWorkLimit;
+    uint256 bnProofOfWorkLimit;
     int nSubsidyHalvingInterval;
     string strDataDir;
     vector<CDNSSeedData> vSeeds;
diff --git a/src/main.cpp b/src/main.cpp
index a0f4f40cb13d..6a7bb9206c95 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1209,13 +1209,13 @@ static const int64_t nInterval = nTargetTimespan / nTargetSpacing;
 //
 unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
 {
-    const CBigNum &bnLimit = Params().ProofOfWorkLimit();
+    const uint256 &bnLimit = Params().ProofOfWorkLimit();
     // Testnet has min-difficulty blocks
     // after nTargetSpacing*2 time between blocks:
     if (TestNet() && nTime > nTargetSpacing*2)
         return bnLimit.GetCompact();
 
-    CBigNum bnResult;
+    uint256 bnResult;
     bnResult.SetCompact(nBase);
     while (nTime > 0 && bnResult < bnLimit)
     {
@@ -1274,8 +1274,10 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
         nActualTimespan = nTargetTimespan*4;
 
     // Retarget
-    CBigNum bnNew;
+    uint256 bnNew;
+    uint256 bnOld;
     bnNew.SetCompact(pindexLast->nBits);
+    bnOld = bnNew;
     bnNew *= nActualTimespan;
     bnNew /= nTargetTimespan;
 
@@ -1285,23 +1287,25 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
     /// debug print
     LogPrintf("GetNextWorkRequired RETARGET\n");
     LogPrintf("nTargetTimespan = %d    nActualTimespan = %d\n", nTargetTimespan, nActualTimespan);
-    LogPrintf("Before: %08x  %s\n", pindexLast->nBits, CBigNum().SetCompact(pindexLast->nBits).getuint256().ToString());
-    LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.getuint256().ToString());
+    LogPrintf("Before: %08x  %s\n", pindexLast->nBits, bnOld.ToString());
+    LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.ToString());
 
     return bnNew.GetCompact();
 }
 
 bool CheckProofOfWork(uint256 hash, unsigned int nBits)
 {
-    CBigNum bnTarget;
-    bnTarget.SetCompact(nBits);
+    bool fNegative;
+    bool fOverflow;
+    uint256 bnTarget;
+    bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
 
     // Check range
-    if (bnTarget <= 0 || bnTarget > Params().ProofOfWorkLimit())
+    if (fNegative || bnTarget == 0 || fOverflow || bnTarget > Params().ProofOfWorkLimit())
         return error("CheckProofOfWork() : nBits below minimum work");
 
     // Check proof of work matches claimed amount
-    if (hash > bnTarget.getuint256())
+    if (hash > bnTarget)
         return error("CheckProofOfWork() : hash doesn't match nBits");
 
     return true;
@@ -1346,7 +1350,7 @@ void CheckForkWarningConditions()
     if (pindexBestForkTip && chainActive.Height() - pindexBestForkTip->nHeight >= 72)
         pindexBestForkTip = NULL;
 
-    if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6).getuint256()))
+    if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6)))
     {
         if (!fLargeWorkForkFound)
         {
@@ -1402,7 +1406,7 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
     // We define it this way because it allows us to only store the highest fork tip (+ base) which meets
     // the 7-block condition and from this always have the most-likely-to-cause-warning fork
     if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) &&
-            pindexNewForkTip->nChainWork - pfork->nChainWork > (pfork->GetBlockWork() * 7).getuint256() &&
+            pindexNewForkTip->nChainWork - pfork->nChainWork > (pfork->GetBlockWork() * 7) &&
             chainActive.Height() - pindexNewForkTip->nHeight < 72)
     {
         pindexBestForkTip = pindexNewForkTip;
@@ -1436,10 +1440,6 @@ void static InvalidChainFound(CBlockIndex* pindexNew)
     if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
     {
         pindexBestInvalid = pindexNew;
-        // The current code doesn't actually read the BestInvalidWork entry in
-        // the block database anymore, as it is derived from the flags in block
-        // index entry. We only write it for backward compatibility.
-        pblocktree->WriteBestInvalidWork(CBigNum(pindexBestInvalid->nChainWork));
         uiInterface.NotifyBlocksChanged();
     }
     LogPrintf("InvalidChainFound: invalid block=%s  height=%d  log2_work=%.8g  date=%s\n",
@@ -2182,7 +2182,7 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
         pindexNew->pprev = (*miPrev).second;
         pindexNew->nHeight = pindexNew->pprev->nHeight + 1;
     }
-    pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork().getuint256();
+    pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork();
     pindexNew->RaiseValidity(BLOCK_VALID_TREE);
 
     return pindexNew;
@@ -2359,11 +2359,12 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
             return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
                              REJECT_CHECKPOINT, "time-too-old");
         }
-        CBigNum bnNewBlock;
-        bnNewBlock.SetCompact(block.nBits);
-        CBigNum bnRequired;
+        bool fOverflow = false;
+        uint256 bnNewBlock;
+        bnNewBlock.SetCompact(block.nBits, NULL, &fOverflow);
+        uint256 bnRequired;
         bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
-        if (bnNewBlock > bnRequired)
+        if (fOverflow || bnNewBlock > bnRequired)
         {
             return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
                              REJECT_INVALID, "bad-diffbits");
@@ -2934,7 +2935,7 @@ bool static LoadBlockIndexDB()
     BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight)
     {
         CBlockIndex* pindex = item.second;
-        pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + pindex->GetBlockWork().getuint256();
+        pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + pindex->GetBlockWork();
         pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
         if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS))
             setBlockIndexValid.insert(pindex);
diff --git a/src/main.h b/src/main.h
index c69e0d2a3c30..796a3031c971 100644
--- a/src/main.h
+++ b/src/main.h
@@ -10,7 +10,6 @@
 #include "bitcoin-config.h"
 #endif
 
-#include "bignum.h"
 #include "chainparams.h"
 #include "coins.h"
 #include "core.h"
@@ -816,13 +815,19 @@ class CBlockIndex
         return (int64_t)nTime;
     }
 
-    CBigNum GetBlockWork() const
+    uint256 GetBlockWork() const
     {
-        CBigNum bnTarget;
-        bnTarget.SetCompact(nBits);
-        if (bnTarget <= 0)
+        uint256 bnTarget;
+        bool fNegative;
+        bool fOverflow;
+        bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
+        if (fNegative || fOverflow || bnTarget == 0)
             return 0;
-        return (CBigNum(1)<<256) / (bnTarget+1);
+        // We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
+        // as it's too large for a uint256. However, as 2**256 is at least as large
+        // as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
+        // or ~bnTarget / (nTarget+1) + 1.
+        return (~bnTarget / (bnTarget + 1)) + 1;
     }
 
     bool CheckIndex() const
diff --git a/src/miner.cpp b/src/miner.cpp
index 01fc56601b28..50be4fad40ff 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -466,7 +466,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
 {
     uint256 hash = pblock->GetHash();
-    uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+    uint256 hashTarget = uint256().SetCompact(pblock->nBits);
 
     if (hash > hashTarget)
         return false;
@@ -552,7 +552,7 @@ void static BitcoinMiner(CWallet *pwallet)
         // Search
         //
         int64_t nStart = GetTime();
-        uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+        uint256 hashTarget = uint256().SetCompact(pblock->nBits);
         uint256 hashbuf[2];
         uint256& hash = *alignup<16>(hashbuf);
         while (true)
@@ -636,7 +636,7 @@ void static BitcoinMiner(CWallet *pwallet)
             {
                 // Changing pblock->nTime can change work required on testnet:
                 nBlockBits = ByteReverse(pblock->nBits);
-                hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+                hashTarget.SetCompact(pblock->nBits);
             }
         }
     } }
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 070cf1cb2a3a..cb903b585ab3 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -363,7 +363,7 @@ Value getwork(const Array& params, bool fHelp)
         char phash1[64];
         FormatHashBuffers(pblock, pmidstate, pdata, phash1);
 
-        uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+        uint256 hashTarget = uint256().SetCompact(pblock->nBits);
 
         Object result;
         result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated
@@ -559,7 +559,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     Object aux;
     aux.push_back(Pair("flags", HexStr(COINBASE_FLAGS.begin(), COINBASE_FLAGS.end())));
 
-    uint256 hashTarget = CBigNum().SetCompact(pblock->nBits).getuint256();
+    uint256 hashTarget = uint256().SetCompact(pblock->nBits);
 
     static Array aMutable;
     if (aMutable.empty())
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index d86cc7a290eb..897fb87e4622 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -106,9 +106,9 @@ static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2,
         return CheckNBits(nbits2, time2, nbits1, time1);
     int64_t deltaTime = time2-time1;
 
-    CBigNum required;
+    uint256 required;
     required.SetCompact(ComputeMinWork(nbits1, deltaTime));
-    CBigNum have;
+    uint256 have;
     have.SetCompact(nbits2);
     return (have <= required);
 }
diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
index d5ee8c9778c3..01967c768472 100644
--- a/src/test/bignum_tests.cpp
+++ b/src/test/bignum_tests.cpp
@@ -125,94 +125,6 @@ BOOST_AUTO_TEST_CASE(bignum_setint64)
 }
 
 
-BOOST_AUTO_TEST_CASE(bignum_SetCompact)
-{
-    CBigNum num;
-    num.SetCompact(0);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x00123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x01003456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x02000056);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x03000000);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x04000000);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x00923456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x01803456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x02800056);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x03800000);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-    
-    num.SetCompact(0x04800000);
-    BOOST_CHECK_EQUAL(num.GetHex(), "0");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
-
-    num.SetCompact(0x01123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "12");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x01120000U);
-
-    // Make sure that we don't generate compacts with the 0x00800000 bit set
-    num = 0x80;
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x02008000U);
-
-    num.SetCompact(0x01fedcba);
-    BOOST_CHECK_EQUAL(num.GetHex(), "-7e");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x01fe0000U);
-
-    num.SetCompact(0x02123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "1234");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x02123400U);
-
-    num.SetCompact(0x03123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "123456");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x03123456U);
-
-    num.SetCompact(0x04123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "12345600");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x04123456U);
-
-    num.SetCompact(0x04923456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "-12345600");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x04923456U);
-
-    num.SetCompact(0x05009234);
-    BOOST_CHECK_EQUAL(num.GetHex(), "92340000");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x05009234U);
-
-    num.SetCompact(0x20123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "1234560000000000000000000000000000000000000000000000000000000000");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0x20123456U);
-
-    num.SetCompact(0xff123456);
-    BOOST_CHECK_EQUAL(num.GetHex(), "123456000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
-    BOOST_CHECK_EQUAL(num.GetCompact(), 0xff123456U);
-}
-
 BOOST_AUTO_TEST_CASE(bignum_SetHex)
 {
     std::string hexStr = "deecf97fd890808b9cc0f1b6a3e7a60b400f52710e6ad075b1340755bfa58cc9";
diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp
index 226d737defd9..4b1a2ae58f4b 100644
--- a/src/test/uint256_tests.cpp
+++ b/src/test/uint256_tests.cpp
@@ -675,6 +675,135 @@ BOOST_AUTO_TEST_CASE( methods ) // GetHex SetHex begin() end() size() GetLow64 G
     }
 }
 
+BOOST_AUTO_TEST_CASE(bignum_SetCompact)
+{
+    uint256 num;
+    bool fNegative;
+    bool fOverflow;
+    num.SetCompact(0, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x00123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x01003456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x02000056, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x03000000, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x04000000, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x00923456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x01803456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x02800056, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x03800000, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x04800000, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x01123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000000012");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x01120000U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    // Make sure that we don't generate compacts with the 0x00800000 bit set
+    num = 0x80;
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x02008000U);
+
+    num.SetCompact(0x01fedcba, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "000000000000000000000000000000000000000000000000000000000000007e");
+    BOOST_CHECK_EQUAL(num.GetCompact(true), 0x01fe0000U);
+    BOOST_CHECK_EQUAL(fNegative, true);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x02123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000001234");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x02123400U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x03123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000000123456");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x03123456U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x04123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000012345600");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x04123456U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x04923456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000012345600");
+    BOOST_CHECK_EQUAL(num.GetCompact(true), 0x04923456U);
+    BOOST_CHECK_EQUAL(fNegative, true);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x05009234, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "0000000000000000000000000000000000000000000000000000000092340000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x05009234U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0x20123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(num.GetHex(), "1234560000000000000000000000000000000000000000000000000000000000");
+    BOOST_CHECK_EQUAL(num.GetCompact(), 0x20123456U);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, false);
+
+    num.SetCompact(0xff123456, &fNegative, &fOverflow);
+    BOOST_CHECK_EQUAL(fNegative, false);
+    BOOST_CHECK_EQUAL(fOverflow, true);
+}
+
+
 BOOST_AUTO_TEST_CASE( getmaxcoverage ) // some more tests just to get 100% coverage
 {
     // ~R1L give a base_uint<256>
diff --git a/src/txdb.cpp b/src/txdb.cpp
index cb92922a357d..4eab8525a5ce 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -73,12 +73,6 @@ bool CBlockTreeDB::WriteBlockIndex(const CDiskBlockIndex& blockindex)
     return Write(make_pair('b', blockindex.GetBlockHash()), blockindex);
 }
 
-bool CBlockTreeDB::WriteBestInvalidWork(const CBigNum& bnBestInvalidWork)
-{
-    // Obsolete; only written for backward compatibility.
-    return Write('I', bnBestInvalidWork);
-}
-
 bool CBlockTreeDB::WriteBlockFileInfo(int nFile, const CBlockFileInfo &info) {
     return Write(make_pair('f', nFile), info);
 }
diff --git a/src/txdb.h b/src/txdb.h
index 5eb5731db3d6..7257b0dd2176 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -14,7 +14,6 @@
 #include <utility>
 #include <vector>
 
-class CBigNum;
 class CCoins;
 class uint256;
 
@@ -52,7 +51,6 @@ class CBlockTreeDB : public CLevelDBWrapper
     void operator=(const CBlockTreeDB&);
 public:
     bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
-    bool WriteBestInvalidWork(const CBigNum& bnBestInvalidWork);
     bool ReadBlockFileInfo(int nFile, CBlockFileInfo &fileinfo);
     bool WriteBlockFileInfo(int nFile, const CBlockFileInfo &fileinfo);
     bool ReadLastBlockFile(int &nFile);
diff --git a/src/uint256.h b/src/uint256.h
index 7b17694eb2d6..10c6657c763a 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -529,6 +529,76 @@ class uint256 : public base_uint<256> {
     uint256(uint64_t b) : base_uint<256>(b) {}
     explicit uint256(const std::string& str) : base_uint<256>(str) {}
     explicit uint256(const std::vector<unsigned char>& vch) : base_uint<256>(vch) {}
+
+    // The "compact" format is a representation of a whole
+    // number N using an unsigned 32bit number similar to a
+    // floating point format.
+    // The most significant 8 bits are the unsigned exponent of base 256.
+    // This exponent can be thought of as "number of bytes of N".
+    // The lower 23 bits are the mantissa.
+    // Bit number 24 (0x800000) represents the sign of N.
+    // N = (-1^sign) * mantissa * 256^(exponent-3)
+    //
+    // Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().
+    // MPI uses the most significant bit of the first byte as sign.
+    // Thus 0x1234560000 is compact (0x05123456)
+    // and  0xc0de000000 is compact (0x0600c0de)
+    // (0x05c0de00) would be -0x40de000000
+    //
+    // Bitcoin only uses this "compact" format for encoding difficulty
+    // targets, which are unsigned 256bit quantities.  Thus, all the
+    // complexities of the sign bit and using base 256 are probably an
+    // implementation accident.
+    //
+    // This implementation directly uses shifts instead of going
+    // through an intermediate MPI representation.
+    uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL)
+    {
+        int nSize = nCompact >> 24;
+        uint32_t nWord = nCompact & 0x007fffff;
+        if (nSize <= 3)
+        {
+            nWord >>= 8*(3-nSize);
+            *this = nWord;
+        }
+        else
+        {
+            *this = nWord;
+            *this <<= 8*(nSize-3);
+        }
+        if (pfNegative)
+            *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
+        if (pfOverflow)
+            *pfOverflow = nWord != 0 && ((nSize > 34) ||
+                                         (nWord > 0xff && nSize > 33) ||
+                                         (nWord > 0xffff && nSize > 32));
+        return *this;
+    }
+
+    uint32_t GetCompact(bool fNegative = false) const
+    {
+        int nSize = (bits() + 7) / 8;
+        uint32_t nCompact = 0;
+        if (nSize <= 3)
+            nCompact = GetLow64() << 8*(3-nSize);
+        else
+        {
+            uint256 bn = *this >> 8*(nSize-3);
+            nCompact = bn.GetLow64();
+        }
+        // The 0x00800000 bit denotes the sign.
+        // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.
+        if (nCompact & 0x00800000)
+        {
+            nCompact >>= 8;
+            nSize++;
+        }
+        assert((nCompact & ~0x007fffff) == 0);
+        assert(nSize < 256);
+        nCompact |= nSize << 24;
+        nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0);
+        return nCompact;
+    }
 };
 
 #endif

From 397668ea63e148a92f68e9fae578595585616770 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 21 Apr 2014 08:28:43 +0200
Subject: [PATCH 0029/1819] Deduplicate uint* comparison operator logic

---
 src/uint256.h | 89 ++++++++++++---------------------------------------
 1 file changed, 20 insertions(+), 69 deletions(-)

diff --git a/src/uint256.h b/src/uint256.h
index 10c6657c763a..1acedd14bf68 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -308,85 +308,28 @@ class base_uint
         return ret;
     }
 
-
-    friend inline bool operator<(const base_uint& a, const base_uint& b)
-    {
-        for (int i = base_uint::WIDTH-1; i >= 0; i--)
-        {
-            if (a.pn[i] < b.pn[i])
-                return true;
-            else if (a.pn[i] > b.pn[i])
-                return false;
-        }
-        return false;
-    }
-
-    friend inline bool operator<=(const base_uint& a, const base_uint& b)
-    {
-        for (int i = base_uint::WIDTH-1; i >= 0; i--)
-        {
-            if (a.pn[i] < b.pn[i])
-                return true;
-            else if (a.pn[i] > b.pn[i])
-                return false;
+    int CompareTo(const base_uint& b) const {
+        for (int i = base_uint::WIDTH-1; i >= 0; i--) {
+            if (pn[i] < b.pn[i])
+                return -1;
+            if (pn[i] > b.pn[i])
+                return 1;
         }
-        return true;
-    }
-
-    friend inline bool operator>(const base_uint& a, const base_uint& b)
-    {
-        for (int i = base_uint::WIDTH-1; i >= 0; i--)
-        {
-            if (a.pn[i] > b.pn[i])
-                return true;
-            else if (a.pn[i] < b.pn[i])
-                return false;
-        }
-        return false;
+        return 0;
     }
 
-    friend inline bool operator>=(const base_uint& a, const base_uint& b)
-    {
-        for (int i = base_uint::WIDTH-1; i >= 0; i--)
-        {
-            if (a.pn[i] > b.pn[i])
-                return true;
-            else if (a.pn[i] < b.pn[i])
+    bool EqualTo(uint64_t b) const {
+        for (int i = base_uint::WIDTH-1; i >= 2; i--) {
+            if (pn[i])
                 return false;
         }
-        return true;
-    }
-
-    friend inline bool operator==(const base_uint& a, const base_uint& b)
-    {
-        for (int i = 0; i < base_uint::WIDTH; i++)
-            if (a.pn[i] != b.pn[i])
-                return false;
-        return true;
-    }
-
-    friend inline bool operator==(const base_uint& a, uint64_t b)
-    {
-        if (a.pn[0] != (unsigned int)b)
+        if (pn[1] != (b >> 32))
             return false;
-        if (a.pn[1] != (unsigned int)(b >> 32))
+        if (pn[0] != (b & 0xfffffffful))
             return false;
-        for (int i = 2; i < base_uint::WIDTH; i++)
-            if (a.pn[i] != 0)
-                return false;
         return true;
     }
 
-    friend inline bool operator!=(const base_uint& a, const base_uint& b)
-    {
-        return (!(a == b));
-    }
-
-    friend inline bool operator!=(const base_uint& a, uint64_t b)
-    {
-        return (!(a == b));
-    }
-
     friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
     friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
     friend inline const base_uint operator*(const base_uint& a, const base_uint& b) { return base_uint(a) *= b; }
@@ -397,6 +340,14 @@ class base_uint
     friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
     friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
     friend inline const base_uint operator*(const base_uint& a, uint32_t b) { return base_uint(a) *= b; }
+    friend inline bool operator==(const base_uint& a, const base_uint& b) { return a.CompareTo(b) == 0; }
+    friend inline bool operator!=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) != 0; }
+    friend inline bool operator>(const base_uint& a, const base_uint& b) { return a.CompareTo(b) > 0; }
+    friend inline bool operator<(const base_uint& a, const base_uint& b) { return a.CompareTo(b) < 0; }
+    friend inline bool operator>=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) >= 0; }
+    friend inline bool operator<=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) <= 0; }
+    friend inline bool operator==(const base_uint& a, uint64_t b) { return a.EqualTo(b); }
+    friend inline bool operator!=(const base_uint& a, uint64_t b) { return !a.EqualTo(b); }
 
     std::string GetHex() const
     {

From 0d4ea1cf8a349cf59795ac68645afe70e98c6b3a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sat, 3 May 2014 10:20:58 +0200
Subject: [PATCH 0030/1819] util: add parseint32 function with strict error
 reporting

None of the current integer parsing functions in util
check whether the result is valid and fits in the range
of the type. This is required for less sloppy error reporting.
---
 src/test/util_tests.cpp | 22 ++++++++++++++++++++++
 src/util.cpp            | 14 ++++++++++++++
 src/util.h              |  7 +++++++
 3 files changed, 43 insertions(+)

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index b8f107f644f2..7e7c05a59de8 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -342,4 +342,26 @@ BOOST_AUTO_TEST_CASE(gettime)
     BOOST_CHECK((GetTime() & ~0xFFFFFFFFLL) == 0);
 }
 
+BOOST_AUTO_TEST_CASE(test_ParseInt32)
+{
+    int32_t n;
+    // Valid values
+    BOOST_CHECK(ParseInt32("1234", NULL));
+    BOOST_CHECK(ParseInt32("0", &n) && n == 0);
+    BOOST_CHECK(ParseInt32("1234", &n) && n == 1234);
+    BOOST_CHECK(ParseInt32("01234", &n) && n == 1234); // no octal
+    BOOST_CHECK(ParseInt32("2147483647", &n) && n == 2147483647);
+    BOOST_CHECK(ParseInt32("-2147483648", &n) && n == -2147483648);
+    BOOST_CHECK(ParseInt32("-1234", &n) && n == -1234);
+    // Invalid values
+    BOOST_CHECK(!ParseInt32("1a", &n));
+    BOOST_CHECK(!ParseInt32("aap", &n));
+    BOOST_CHECK(!ParseInt32("0x1", &n)); // no hex
+    // Overflow and underflow
+    BOOST_CHECK(!ParseInt32("-2147483649", NULL));
+    BOOST_CHECK(!ParseInt32("2147483648", NULL));
+    BOOST_CHECK(!ParseInt32("-32482348723847471234", NULL));
+    BOOST_CHECK(!ParseInt32("32482348723847471234", NULL));
+}
+
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/util.cpp b/src/util.cpp
index a919b4b854c7..36ac23b1d530 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1427,3 +1427,17 @@ void RenameThread(const char* name)
 #endif
 }
 
+bool ParseInt32(const std::string& str, int32_t *out)
+{
+    char *endp = NULL;
+    errno = 0; // strtol will not set errno if valid
+    long int n = strtol(str.c_str(), &endp, 10);
+    if(out) *out = (int)n;
+    // Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow
+    // we still have to check that the returned value is within the range of an *int32_t*. On 64-bit
+    // platforms the size of these types may be different.
+    return endp && *endp == 0 && !errno &&
+        n >= std::numeric_limits<int32_t>::min() &&
+        n <= std::numeric_limits<int32_t>::max();
+}
+
diff --git a/src/util.h b/src/util.h
index fbd841f7a8b9..fa1e664c929f 100644
--- a/src/util.h
+++ b/src/util.h
@@ -256,6 +256,13 @@ inline int atoi(const std::string& str)
     return atoi(str.c_str());
 }
 
+/**
+ * Convert string to signed 32-bit integer with strict parse error feedback.
+ * @returns true if the entire string could be parsed as valid integer,
+ *   false if not the entire string could be parsed or when overflow or underflow occured.
+ */
+bool ParseInt32(const std::string& str, int32_t *out);
+
 inline int roundint(double d)
 {
     return (int)(d > 0 ? d + 0.5 : d - 0.5);

From d8642752992799b0695cf97ada03c56d0526830c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sat, 3 May 2014 10:25:58 +0200
Subject: [PATCH 0031/1819] Use new function parseint32 in SplitHostPort

Use the new function parseint32 in SplitHostPort instead of calling
strtol directly.
---
 src/netbase.cpp | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index ec275f738cea..4f7e3f6b7875 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -47,12 +47,10 @@ void SplitHostPort(std::string in, int &portOut, std::string &hostOut) {
     bool fBracketed = fHaveColon && (in[0]=='[' && in[colon-1]==']'); // if there is a colon, and in[0]=='[', colon is not 0, so in[colon-1] is safe
     bool fMultiColon = fHaveColon && (in.find_last_of(':',colon-1) != in.npos);
     if (fHaveColon && (colon==0 || fBracketed || !fMultiColon)) {
-        char *endp = NULL;
-        int n = strtol(in.c_str() + colon + 1, &endp, 10);
-        if (endp && *endp == 0 && n >= 0) {
+        int32_t n;
+        if (ParseInt32(in.substr(colon + 1), &n) && n > 0 && n < 0x10000) {
             in = in.substr(0, colon);
-            if (n > 0 && n < 0x10000)
-                portOut = n;
+            portOut = n;
         }
     }
     if (in.size()>0 && in[0] == '[' && in[in.size()-1] == ']')

From e16be73753d870c5ce77094d3a402bbe8e3bf542 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 28 Apr 2014 11:08:57 +0200
Subject: [PATCH 0032/1819] net: Add CSubNet class for subnet matching

---
 src/netbase.cpp            | 123 ++++++++++++++++++++++++++++++++++++-
 src/netbase.h              |  30 +++++++++
 src/test/netbase_tests.cpp |  37 +++++++++++
 3 files changed, 187 insertions(+), 3 deletions(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 4f7e3f6b7875..82a681281d22 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -546,6 +546,22 @@ void CNetAddr::SetIP(const CNetAddr& ipIn)
     memcpy(ip, ipIn.ip, sizeof(ip));
 }
 
+void CNetAddr::SetRaw(Network network, const uint8_t *ip_in)
+{
+    switch(network)
+    {
+        case NET_IPV4:
+            memcpy(ip, pchIPv4, 12);
+            memcpy(ip+12, ip_in, 4);
+            break;
+        case NET_IPV6:
+            memcpy(ip, ip_in, 16);
+            break;
+        default:
+            assert(!"invalid network");
+    }
+}
+
 static const unsigned char pchOnionCat[] = {0xFD,0x87,0xD8,0x7E,0xEB,0x43};
 
 bool CNetAddr::SetSpecial(const std::string &strName)
@@ -569,13 +585,12 @@ CNetAddr::CNetAddr()
 
 CNetAddr::CNetAddr(const struct in_addr& ipv4Addr)
 {
-    memcpy(ip,    pchIPv4, 12);
-    memcpy(ip+12, &ipv4Addr, 4);
+    SetRaw(NET_IPV4, (const uint8_t*)&ipv4Addr);
 }
 
 CNetAddr::CNetAddr(const struct in6_addr& ipv6Addr)
 {
-    memcpy(ip, &ipv6Addr, 16);
+    SetRaw(NET_IPV6, (const uint8_t*)&ipv6Addr);
 }
 
 CNetAddr::CNetAddr(const char *pszIp, bool fAllowLookup)
@@ -1120,3 +1135,105 @@ void CService::SetPort(unsigned short portIn)
 {
     port = portIn;
 }
+
+CSubNet::CSubNet():
+    valid(false)
+{
+    memset(netmask, 0, sizeof(netmask));
+}
+
+CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
+{
+    size_t slash = strSubnet.find_last_of('/');
+    std::vector<CNetAddr> vIP;
+
+    valid = true;
+    // Default to /32 (IPv4) or /128 (IPv6), i.e. match single address
+    memset(netmask, 255, sizeof(netmask));
+
+    std::string strAddress = strSubnet.substr(0, slash);
+    if (LookupHost(strAddress.c_str(), vIP, 1, fAllowLookup))
+    {
+        network = vIP[0];
+        if (slash != strSubnet.npos)
+        {
+            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;
+            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
+                {
+                    n += noffset;
+                    // Clear bits [n..127]
+                    for (; n < 128; ++n)
+                        netmask[n>>3] &= ~(1<<(n&7));
+                }
+                else
+                {
+                    valid = false;
+                }
+            }
+            else // If not a valid number, try full netmask syntax
+            {
+                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);
+                }
+                else
+                {
+                    valid = false;
+                }
+            }
+        }
+    }
+    else
+    {
+        valid = false;
+    }
+}
+
+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))
+            return false;
+    return true;
+}
+
+std::string CSubNet::ToString() const
+{
+    std::string strNetmask;
+    if (network.IsIPv4())
+        strNetmask = strprintf("%u.%u.%u.%u", netmask[12], netmask[13], netmask[14], netmask[15]);
+    else
+        strNetmask = strprintf("%x:%x:%x:%x:%x:%x:%x:%x",
+                         netmask[0] << 8 | netmask[1], netmask[2] << 8 | netmask[3],
+                         netmask[4] << 8 | netmask[5], netmask[6] << 8 | netmask[7],
+                         netmask[8] << 8 | netmask[9], netmask[10] << 8 | netmask[11],
+                         netmask[12] << 8 | netmask[13], netmask[14] << 8 | netmask[15]);
+    return network.ToString() + "/" + strNetmask;
+}
+
+bool CSubNet::IsValid() const
+{
+    return valid;
+}
+
+bool operator==(const CSubNet& a, const CSubNet& b)
+{
+    return a.valid == b.valid && a.network == b.network && !memcmp(a.netmask, b.netmask, 16);
+}
+
+bool operator!=(const CSubNet& a, const CSubNet& b)
+{
+    return !(a==b);
+}
diff --git a/src/netbase.h b/src/netbase.h
index 95b179576752..118f866d6c95 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -49,6 +49,13 @@ class CNetAddr
         explicit CNetAddr(const std::string &strIp, bool fAllowLookup = false);
         void Init();
         void SetIP(const CNetAddr& ip);
+
+        /**
+         * Set raw IPv4 or IPv6 address (in network byte order)
+         * @note Only NET_IPV4 and NET_IPV6 are allowed for network.
+         */
+        void SetRaw(Network network, const uint8_t *data);
+
         bool SetSpecial(const std::string &strName); // for Tor addresses
         bool IsIPv4() const;    // IPv4 mapped address (::FFFF:0:0/96, 0.0.0.0/0)
         bool IsIPv6() const;    // IPv6 address (not mapped IPv4, not Tor)
@@ -90,6 +97,29 @@ class CNetAddr
             )
 };
 
+class CSubNet
+{
+    protected:
+        /// Network (base) address
+        CNetAddr network;
+        /// Netmask, in network byte order
+        uint8_t netmask[16];
+        /// Is this value valid? (only used to signal parse errors)
+        bool valid;
+
+    public:
+        CSubNet();
+        explicit CSubNet(const std::string &strSubnet, bool fAllowLookup = false);
+
+        bool Match(const CNetAddr &addr) const;
+
+        std::string ToString() const;
+        bool IsValid() const;
+
+        friend bool operator==(const CSubNet& a, const CSubNet& b);
+        friend bool operator!=(const CSubNet& a, const CSubNet& b);
+};
+
 /** A combination of a network address (CNetAddr) and a (TCP) port */
 class CService : public CNetAddr
 {
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp
index 4321852d1119..c26e73838423 100644
--- a/src/test/netbase_tests.cpp
+++ b/src/test/netbase_tests.cpp
@@ -102,4 +102,41 @@ BOOST_AUTO_TEST_CASE(onioncat_test)
     BOOST_CHECK(addr1.IsRoutable());
 }
 
+BOOST_AUTO_TEST_CASE(subnet_test)
+{
+    BOOST_CHECK(CSubNet("1.2.3.0/24") == CSubNet("1.2.3.0/255.255.255.0"));
+    BOOST_CHECK(CSubNet("1.2.3.0/24") != CSubNet("1.2.4.0/255.255.255.0"));
+    BOOST_CHECK(CSubNet("1.2.3.0/24").Match(CNetAddr("1.2.3.4")));
+    BOOST_CHECK(!CSubNet("1.2.2.0/24").Match(CNetAddr("1.2.3.4")));
+    BOOST_CHECK(CSubNet("1.2.3.4").Match(CNetAddr("1.2.3.4")));
+    BOOST_CHECK(CSubNet("1.2.3.4/32").Match(CNetAddr("1.2.3.4")));
+    BOOST_CHECK(!CSubNet("1.2.3.4").Match(CNetAddr("5.6.7.8")));
+    BOOST_CHECK(!CSubNet("1.2.3.4/32").Match(CNetAddr("5.6.7.8")));
+    BOOST_CHECK(CSubNet("::ffff:127.0.0.1").Match(CNetAddr("127.0.0.1")));
+    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")));
+    // 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")));
+    // All-Matching IPv4 does not Match IPv6
+    BOOST_CHECK(!CSubNet("0.0.0.0/0").Match(CNetAddr("1:2:3:4:5:6:7:1234")));
+    // Invalid subnets Match nothing (not even invalid addresses)
+    BOOST_CHECK(!CSubNet().Match(CNetAddr("1.2.3.4")));
+    BOOST_CHECK(!CSubNet("").Match(CNetAddr("4.5.6.7")));
+    BOOST_CHECK(!CSubNet("bloop").Match(CNetAddr("0.0.0.0")));
+    BOOST_CHECK(!CSubNet("bloop").Match(CNetAddr("hab")));
+    // Check valid/invalid
+    BOOST_CHECK(CSubNet("1.2.3.0/0").IsValid());
+    BOOST_CHECK(!CSubNet("1.2.3.0/-1").IsValid());
+    BOOST_CHECK(CSubNet("1.2.3.0/32").IsValid());
+    BOOST_CHECK(!CSubNet("1.2.3.0/33").IsValid());
+    BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/0").IsValid());
+    BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/33").IsValid());
+    BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8/-1").IsValid());
+    BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8/128").IsValid());
+    BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8/129").IsValid());
+    BOOST_CHECK(!CSubNet("fuzzy").IsValid());
+}
+
 BOOST_AUTO_TEST_SUITE_END()

From ee21912510275c7a0ebeafd2ff553c1db4a4f460 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 28 Apr 2014 13:48:26 +0200
Subject: [PATCH 0033/1819] rpc: Use netmasks instead of wildcards for IP
 address matching

`-rpcallowip` currently has a wacky wildcard-based format. After this
commit it will accept the more standard format, for example:

- Ranges with netmask 127.0.0.0/255.255.255.0, ::/0
- Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112
- Loose IPs ::1, 127.0.0.1

Trying to use the old *?-based format will result in an error message at
launch.
---
 src/rpcserver.cpp | 63 ++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 49 insertions(+), 14 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index f78cb420f436..5740cca13a34 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -38,6 +38,7 @@ static map<string, boost::shared_ptr<deadline_timer> > deadlineTimers;
 static ssl::context* rpc_ssl_context = NULL;
 static boost::thread_group* rpc_worker_group = NULL;
 static boost::asio::io_service::work *rpc_dummy_work = NULL;
+static std::vector<CSubNet> rpc_allow_subnets; //!< List of subnets to allow RPC connections from
 
 void RPCTypeCheck(const Array& params,
                   const list<Value_type>& typesExpected,
@@ -358,25 +359,34 @@ void ErrorReply(std::ostream& stream, const Object& objError, const Value& id)
     stream << HTTPReply(nStatus, strReply, false) << std::flush;
 }
 
-bool ClientAllowed(const boost::asio::ip::address& address)
+// Convert boost::asio address to CNetAddr
+static CNetAddr BoostAsioToCNetAddr(boost::asio::ip::address address)
 {
+    CNetAddr netaddr;
     // Make sure that IPv4-compatible and IPv4-mapped IPv6 addresses are treated as IPv4 addresses
     if (address.is_v6()
      && (address.to_v6().is_v4_compatible()
       || address.to_v6().is_v4_mapped()))
-        return ClientAllowed(address.to_v6().to_v4());
-
-    if (address == asio::ip::address_v4::loopback()
-     || address == asio::ip::address_v6::loopback()
-     || (address.is_v4()
-         // Check whether IPv4 addresses match 127.0.0.0/8 (loopback subnet)
-      && (address.to_v4().to_ulong() & 0xff000000) == 0x7f000000))
-        return true;
-
-    const string strAddress = address.to_string();
-    const vector<string>& vAllow = mapMultiArgs["-rpcallowip"];
-    BOOST_FOREACH(string strAllow, vAllow)
-        if (WildcardMatch(strAddress, strAllow))
+        address = address.to_v6().to_v4();
+
+    if(address.is_v4())
+    {
+        boost::asio::ip::address_v4::bytes_type bytes = address.to_v4().to_bytes();
+        netaddr.SetRaw(NET_IPV4, &bytes[0]);
+    }
+    else
+    {
+        boost::asio::ip::address_v6::bytes_type bytes = address.to_v6().to_bytes();
+        netaddr.SetRaw(NET_IPV6, &bytes[0]);
+    }
+    return netaddr;
+}
+
+bool ClientAllowed(const boost::asio::ip::address& address)
+{
+    CNetAddr netaddr = BoostAsioToCNetAddr(address);
+    BOOST_FOREACH(const CSubNet &subnet, rpc_allow_subnets)
+        if (subnet.Match(netaddr))
             return true;
     return false;
 }
@@ -502,6 +512,31 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
 
 void StartRPCThreads()
 {
+    rpc_allow_subnets.clear();
+    rpc_allow_subnets.push_back(CSubNet("127.0.0.0/8")); // always allow IPv4 local subnet
+    rpc_allow_subnets.push_back(CSubNet("::1")); // always allow IPv6 localhost
+    if (mapMultiArgs.count("-rpcallowip"))
+    {
+        const vector<string>& vAllow = mapMultiArgs["-rpcallowip"];
+        BOOST_FOREACH(string strAllow, vAllow)
+        {
+            CSubNet subnet(strAllow);
+            if(!subnet.IsValid())
+            {
+                uiInterface.ThreadSafeMessageBox(
+                    strprintf("Invalid -rpcallowip subnet specification: %s", strAllow),
+                    "", CClientUIInterface::MSG_ERROR);
+                StartShutdown();
+                return;
+            }
+            rpc_allow_subnets.push_back(subnet);
+        }
+    }
+    std::string strAllowed;
+    BOOST_FOREACH(const CSubNet &subnet, rpc_allow_subnets)
+        strAllowed += subnet.ToString() + " ";
+    LogPrint("rpc", "Allowing RPC connections from: %s\n", strAllowed);
+
     strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
     if (((mapArgs["-rpcpassword"] == "") ||
          (mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) && Params().RequireRPCPassword())

From fdbd7075cab8d54f90c038e68afba868a9ff9f63 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 28 Apr 2014 13:48:57 +0200
Subject: [PATCH 0034/1819] Remove unused function WildcardMatch

No longer necessary after implementing netmask-based matching.
Also remove a longer-unused function `skipspaces`.
---
 src/test/util_tests.cpp | 11 -----------
 src/util.cpp            | 37 -------------------------------------
 src/util.h              |  9 ---------
 3 files changed, 57 deletions(-)

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 7e7c05a59de8..f4ca8c0539b3 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -165,17 +165,6 @@ BOOST_AUTO_TEST_CASE(util_GetArg)
     BOOST_CHECK_EQUAL(GetBoolArg("booltest4", false), true);
 }
 
-BOOST_AUTO_TEST_CASE(util_WildcardMatch)
-{
-    BOOST_CHECK(WildcardMatch("127.0.0.1", "*"));
-    BOOST_CHECK(WildcardMatch("127.0.0.1", "127.*"));
-    BOOST_CHECK(WildcardMatch("abcdef", "a?cde?"));
-    BOOST_CHECK(!WildcardMatch("abcdef", "a?cde??"));
-    BOOST_CHECK(WildcardMatch("abcdef", "a*f"));
-    BOOST_CHECK(!WildcardMatch("abcdef", "a*x"));
-    BOOST_CHECK(WildcardMatch("", "*"));
-}
-
 BOOST_AUTO_TEST_CASE(util_FormatMoney)
 {
     BOOST_CHECK_EQUAL(FormatMoney(0, false), "0.00");
diff --git a/src/util.cpp b/src/util.cpp
index 36ac23b1d530..00e29446d5a3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -889,43 +889,6 @@ string DecodeBase32(const string& str)
     return string((const char*)&vchRet[0], vchRet.size());
 }
 
-
-bool WildcardMatch(const char* psz, const char* mask)
-{
-    while (true)
-    {
-        switch (*mask)
-        {
-        case '\0':
-            return (*psz == '\0');
-        case '*':
-            return WildcardMatch(psz, mask+1) || (*psz && WildcardMatch(psz+1, mask));
-        case '?':
-            if (*psz == '\0')
-                return false;
-            break;
-        default:
-            if (*psz != *mask)
-                return false;
-            break;
-        }
-        psz++;
-        mask++;
-    }
-}
-
-bool WildcardMatch(const string& str, const string& mask)
-{
-    return WildcardMatch(str.c_str(), mask.c_str());
-}
-
-
-
-
-
-
-
-
 static std::string FormatException(std::exception* pex, const char* pszThread)
 {
 #ifdef WIN32
diff --git a/src/util.h b/src/util.h
index fa1e664c929f..011a40e540af 100644
--- a/src/util.h
+++ b/src/util.h
@@ -182,8 +182,6 @@ std::string DecodeBase32(const std::string& str);
 std::string EncodeBase32(const unsigned char* pch, size_t len);
 std::string EncodeBase32(const std::string& str);
 void ParseParameters(int argc, const char*const argv[]);
-bool WildcardMatch(const char* psz, const char* mask);
-bool WildcardMatch(const std::string& str, const std::string& mask);
 void FileCommit(FILE *fileout);
 bool TruncateFile(FILE *file, unsigned int length);
 int RaiseFileDescriptorLimit(int nMinFD);
@@ -348,13 +346,6 @@ inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
     return pszTime;
 }
 
-template<typename T>
-void skipspaces(T& it)
-{
-    while (isspace(*it))
-        ++it;
-}
-
 inline bool IsSwitchChar(char c)
 {
 #ifdef WIN32

From 21bf3d257b88c45e2bb0b47e36e73d7462760c2c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 28 Apr 2014 15:23:29 +0200
Subject: [PATCH 0035/1819] Add tests for BoostAsioToCNetAddr

---
 src/rpcserver.cpp      |  3 +--
 src/rpcserver.h        |  4 ++++
 src/test/rpc_tests.cpp | 16 ++++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 5740cca13a34..ac40ea7cf199 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -359,8 +359,7 @@ void ErrorReply(std::ostream& stream, const Object& objError, const Value& id)
     stream << HTTPReply(nStatus, strReply, false) << std::flush;
 }
 
-// Convert boost::asio address to CNetAddr
-static CNetAddr BoostAsioToCNetAddr(boost::asio::ip::address address)
+CNetAddr BoostAsioToCNetAddr(boost::asio::ip::address address)
 {
     CNetAddr netaddr;
     // Make sure that IPv4-compatible and IPv4-mapped IPv6 addresses are treated as IPv4 addresses
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 1092c691beed..e8cd2cd0fc03 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -19,6 +19,7 @@
 #include "json/json_spirit_writer_template.h"
 
 class CBlockIndex;
+class CNetAddr;
 
 /* Start RPC threads */
 void StartRPCThreads();
@@ -50,6 +51,9 @@ void RPCTypeCheck(const json_spirit::Object& o,
  */
 void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds);
 
+//! Convert boost::asio address to CNetAddr
+extern CNetAddr BoostAsioToCNetAddr(boost::asio::ip::address address);
+
 typedef json_spirit::Value(*rpcfn_type)(const json_spirit::Array& params, bool fHelp);
 
 class CRPCCommand
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 5bc38ce2de9a..107c0f06e752 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -6,6 +6,7 @@
 #include "rpcclient.h"
 
 #include "base58.h"
+#include "netbase.h"
 
 #include <boost/algorithm/string.hpp>
 #include <boost/test/unit_test.hpp>
@@ -138,4 +139,19 @@ BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values)
     BOOST_CHECK(AmountFromValue(ValueFromString("20999999.99999999")) == 2099999999999999LL);
 }
 
+BOOST_AUTO_TEST_CASE(rpc_boostasiotocnetaddr)
+{
+    // Check IPv4 addresses
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("1.2.3.4")).ToString(), "1.2.3.4");
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("127.0.0.1")).ToString(), "127.0.0.1");
+    // Check IPv6 addresses
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("::1")).ToString(), "::1");
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("123:4567:89ab:cdef:123:4567:89ab:cdef")).ToString(),
+                                         "123:4567:89ab:cdef:123:4567:89ab:cdef");
+    // v4 compatible must be interpreted as IPv4
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("::0:127.0.0.1")).ToString(), "127.0.0.1");
+    // v4 mapped must be interpreted as IPv4
+    BOOST_CHECK_EQUAL(BoostAsioToCNetAddr(boost::asio::ip::address::from_string("::ffff:127.0.0.1")).ToString(), "127.0.0.1");
+}
+
 BOOST_AUTO_TEST_SUITE_END()

From ccc84e0963dab2ee6276ccc9766c2c19b0ebb3e3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 9 May 2014 17:38:44 +0200
Subject: [PATCH 0036/1819] Reduce bignum.h now it is only needed for
 scriptnum_tests

---
 src/bignum.h              | 355 +-------------------------------------
 src/chainparams.h         |   1 -
 src/protocol.h            |   1 +
 src/test/DoS_tests.cpp    |   1 -
 src/test/Makefile.am      |   1 -
 src/test/bignum_tests.cpp | 136 ---------------
 6 files changed, 3 insertions(+), 492 deletions(-)
 delete mode 100644 src/test/bignum_tests.cpp

diff --git a/src/bignum.h b/src/bignum.h
index 6b77462d838b..b57800f37252 100644
--- a/src/bignum.h
+++ b/src/bignum.h
@@ -6,17 +6,14 @@
 #ifndef BITCOIN_BIGNUM_H
 #define BITCOIN_BIGNUM_H
 
-#include "serialize.h"
-#include "uint256.h"
-#include "version.h"
-
+#include <algorithm>
+#include <limits>
 #include <stdexcept>
 #include <stdint.h>
 #include <vector>
 
 #include <openssl/bn.h>
 
-/** Errors thrown by the bignum class */
 class bignum_error : public std::runtime_error
 {
 public:
@@ -24,34 +21,6 @@ class bignum_error : public std::runtime_error
 };
 
 
-/** RAII encapsulated BN_CTX (OpenSSL bignum context) */
-class CAutoBN_CTX
-{
-protected:
-    BN_CTX* pctx;
-    BN_CTX* operator=(BN_CTX* pnew) { return pctx = pnew; }
-
-public:
-    CAutoBN_CTX()
-    {
-        pctx = BN_CTX_new();
-        if (pctx == NULL)
-            throw bignum_error("CAutoBN_CTX : BN_CTX_new() returned NULL");
-    }
-
-    ~CAutoBN_CTX()
-    {
-        if (pctx != NULL)
-            BN_CTX_free(pctx);
-    }
-
-    operator BN_CTX*() { return pctx; }
-    BN_CTX& operator*() { return *pctx; }
-    BN_CTX** operator&() { return &pctx; }
-    bool operator!() { return (pctx == NULL); }
-};
-
-
 /** C++ wrapper for BIGNUM (OpenSSL bignum) */
 class CBigNum : public BIGNUM
 {
@@ -83,18 +52,7 @@ class CBigNum : public BIGNUM
         BN_clear_free(this);
     }
 
-    //CBigNum(char n) is not portable.  Use 'signed char' or 'unsigned char'.
-    CBigNum(signed char n)        { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
-    CBigNum(short n)              { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
-    CBigNum(int n)                { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
-    CBigNum(long n)               { BN_init(this); if (n >= 0) setulong(n); else setint64(n); }
     CBigNum(long long n)          { BN_init(this); setint64(n); }
-    CBigNum(unsigned char n)      { BN_init(this); setulong(n); }
-    CBigNum(unsigned short n)     { BN_init(this); setulong(n); }
-    CBigNum(unsigned int n)       { BN_init(this); setulong(n); }
-    CBigNum(unsigned long n)      { BN_init(this); setulong(n); }
-    CBigNum(unsigned long long n) { BN_init(this); setuint64(n); }
-    explicit CBigNum(uint256 n)   { BN_init(this); setuint256(n); }
 
     explicit CBigNum(const std::vector<unsigned char>& vch)
     {
@@ -102,22 +60,6 @@ class CBigNum : public BIGNUM
         setvch(vch);
     }
 
-    void setulong(unsigned long n)
-    {
-        if (!BN_set_word(this, n))
-            throw bignum_error("CBigNum conversion from unsigned long : BN_set_word failed");
-    }
-
-    unsigned long getulong() const
-    {
-        return BN_get_word(this);
-    }
-
-    unsigned int getuint() const
-    {
-        return BN_get_word(this);
-    }
-
     int getint() const
     {
         unsigned long n = BN_get_word(this);
@@ -172,76 +114,6 @@ class CBigNum : public BIGNUM
         BN_mpi2bn(pch, p - pch, this);
     }
 
-    void setuint64(uint64_t n)
-    {
-        unsigned char pch[sizeof(n) + 6];
-        unsigned char* p = pch + 4;
-        bool fLeadingZeroes = true;
-        for (int i = 0; i < 8; i++)
-        {
-            unsigned char c = (n >> 56) & 0xff;
-            n <<= 8;
-            if (fLeadingZeroes)
-            {
-                if (c == 0)
-                    continue;
-                if (c & 0x80)
-                    *p++ = 0;
-                fLeadingZeroes = false;
-            }
-            *p++ = c;
-        }
-        unsigned int nSize = p - (pch + 4);
-        pch[0] = (nSize >> 24) & 0xff;
-        pch[1] = (nSize >> 16) & 0xff;
-        pch[2] = (nSize >> 8) & 0xff;
-        pch[3] = (nSize) & 0xff;
-        BN_mpi2bn(pch, p - pch, this);
-    }
-
-    void setuint256(uint256 n)
-    {
-        unsigned char pch[sizeof(n) + 6];
-        unsigned char* p = pch + 4;
-        bool fLeadingZeroes = true;
-        unsigned char* pbegin = (unsigned char*)&n;
-        unsigned char* psrc = pbegin + sizeof(n);
-        while (psrc != pbegin)
-        {
-            unsigned char c = *(--psrc);
-            if (fLeadingZeroes)
-            {
-                if (c == 0)
-                    continue;
-                if (c & 0x80)
-                    *p++ = 0;
-                fLeadingZeroes = false;
-            }
-            *p++ = c;
-        }
-        unsigned int nSize = p - (pch + 4);
-        pch[0] = (nSize >> 24) & 0xff;
-        pch[1] = (nSize >> 16) & 0xff;
-        pch[2] = (nSize >> 8) & 0xff;
-        pch[3] = (nSize >> 0) & 0xff;
-        BN_mpi2bn(pch, p - pch, this);
-    }
-
-    uint256 getuint256() const
-    {
-        unsigned int nSize = BN_bn2mpi(this, NULL);
-        if (nSize < 4)
-            return 0;
-        std::vector<unsigned char> vch(nSize);
-        BN_bn2mpi(this, &vch[0]);
-        if (vch.size() > 4)
-            vch[4] &= 0x7f;
-        uint256 n = 0;
-        for (unsigned int i = 0, j = vch.size()-1; i < sizeof(n) && j >= 4; i++, j--)
-            ((unsigned char*)&n)[i] = vch[j];
-        return n;
-    }
-
     void setvch(const std::vector<unsigned char>& vch)
     {
         std::vector<unsigned char> vch2(vch.size() + 4);
@@ -269,188 +141,7 @@ class CBigNum : public BIGNUM
         return vch;
     }
 
-    void SetHex(const std::string& str)
-    {
-        // skip 0x
-        const char* psz = str.c_str();
-        while (isspace(*psz))
-            psz++;
-        bool fNegative = false;
-        if (*psz == '-')
-        {
-            fNegative = true;
-            psz++;
-        }
-        if (psz[0] == '0' && tolower(psz[1]) == 'x')
-            psz += 2;
-        while (isspace(*psz))
-            psz++;
-
-        // hex string to bignum
-        *this = 0;
-        int n;
-        while ((n = HexDigit(*psz)) != -1)
-        {
-            *this <<= 4;
-            *this += n;
-            ++psz;
-        }
-        if (fNegative)
-            *this = 0 - *this;
-    }
-
-    std::string ToString(int nBase=10) const
-    {
-        CAutoBN_CTX pctx;
-        CBigNum bnBase = nBase;
-        CBigNum bn0 = 0;
-        std::string str;
-        CBigNum bn = *this;
-        BN_set_negative(&bn, false);
-        CBigNum dv;
-        CBigNum rem;
-        if (BN_cmp(&bn, &bn0) == 0)
-            return "0";
-        while (BN_cmp(&bn, &bn0) > 0)
-        {
-            if (!BN_div(&dv, &rem, &bn, &bnBase, pctx))
-                throw bignum_error("CBigNum::ToString() : BN_div failed");
-            bn = dv;
-            unsigned int c = rem.getulong();
-            str += "0123456789abcdef"[c];
-        }
-        if (BN_is_negative(this))
-            str += "-";
-        reverse(str.begin(), str.end());
-        return str;
-    }
-
-    std::string GetHex() const
-    {
-        return ToString(16);
-    }
-
-    unsigned int GetSerializeSize(int nType=0, int nVersion=PROTOCOL_VERSION) const
-    {
-        return ::GetSerializeSize(getvch(), nType, nVersion);
-    }
-
-    template<typename Stream>
-    void Serialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION) const
-    {
-        ::Serialize(s, getvch(), nType, nVersion);
-    }
-
-    template<typename Stream>
-    void Unserialize(Stream& s, int nType=0, int nVersion=PROTOCOL_VERSION)
-    {
-        std::vector<unsigned char> vch;
-        ::Unserialize(s, vch, nType, nVersion);
-        setvch(vch);
-    }
-
-
-    bool operator!() const
-    {
-        return BN_is_zero(this);
-    }
-
-    CBigNum& operator+=(const CBigNum& b)
-    {
-        if (!BN_add(this, this, &b))
-            throw bignum_error("CBigNum::operator+= : BN_add failed");
-        return *this;
-    }
-
-    CBigNum& operator-=(const CBigNum& b)
-    {
-        *this = *this - b;
-        return *this;
-    }
-
-    CBigNum& operator*=(const CBigNum& b)
-    {
-        CAutoBN_CTX pctx;
-        if (!BN_mul(this, this, &b, pctx))
-            throw bignum_error("CBigNum::operator*= : BN_mul failed");
-        return *this;
-    }
-
-    CBigNum& operator/=(const CBigNum& b)
-    {
-        *this = *this / b;
-        return *this;
-    }
-
-    CBigNum& operator%=(const CBigNum& b)
-    {
-        *this = *this % b;
-        return *this;
-    }
-
-    CBigNum& operator<<=(unsigned int shift)
-    {
-        if (!BN_lshift(this, this, shift))
-            throw bignum_error("CBigNum:operator<<= : BN_lshift failed");
-        return *this;
-    }
-
-    CBigNum& operator>>=(unsigned int shift)
-    {
-        // Note: BN_rshift segfaults on 64-bit if 2^shift is greater than the number
-        //   if built on ubuntu 9.04 or 9.10, probably depends on version of OpenSSL
-        CBigNum a = 1;
-        a <<= shift;
-        if (BN_cmp(&a, this) > 0)
-        {
-            *this = 0;
-            return *this;
-        }
-
-        if (!BN_rshift(this, this, shift))
-            throw bignum_error("CBigNum:operator>>= : BN_rshift failed");
-        return *this;
-    }
-
-
-    CBigNum& operator++()
-    {
-        // prefix operator
-        if (!BN_add(this, this, BN_value_one()))
-            throw bignum_error("CBigNum::operator++ : BN_add failed");
-        return *this;
-    }
-
-    const CBigNum operator++(int)
-    {
-        // postfix operator
-        const CBigNum ret = *this;
-        ++(*this);
-        return ret;
-    }
-
-    CBigNum& operator--()
-    {
-        // prefix operator
-        CBigNum r;
-        if (!BN_sub(&r, this, BN_value_one()))
-            throw bignum_error("CBigNum::operator-- : BN_sub failed");
-        *this = r;
-        return *this;
-    }
-
-    const CBigNum operator--(int)
-    {
-        // postfix operator
-        const CBigNum ret = *this;
-        --(*this);
-        return ret;
-    }
-
-
     friend inline const CBigNum operator-(const CBigNum& a, const CBigNum& b);
-    friend inline const CBigNum operator/(const CBigNum& a, const CBigNum& b);
-    friend inline const CBigNum operator%(const CBigNum& a, const CBigNum& b);
 };
 
 
@@ -478,48 +169,6 @@ inline const CBigNum operator-(const CBigNum& a)
     return r;
 }
 
-inline const CBigNum operator*(const CBigNum& a, const CBigNum& b)
-{
-    CAutoBN_CTX pctx;
-    CBigNum r;
-    if (!BN_mul(&r, &a, &b, pctx))
-        throw bignum_error("CBigNum::operator* : BN_mul failed");
-    return r;
-}
-
-inline const CBigNum operator/(const CBigNum& a, const CBigNum& b)
-{
-    CAutoBN_CTX pctx;
-    CBigNum r;
-    if (!BN_div(&r, NULL, &a, &b, pctx))
-        throw bignum_error("CBigNum::operator/ : BN_div failed");
-    return r;
-}
-
-inline const CBigNum operator%(const CBigNum& a, const CBigNum& b)
-{
-    CAutoBN_CTX pctx;
-    CBigNum r;
-    if (!BN_mod(&r, &a, &b, pctx))
-        throw bignum_error("CBigNum::operator% : BN_div failed");
-    return r;
-}
-
-inline const CBigNum operator<<(const CBigNum& a, unsigned int shift)
-{
-    CBigNum r;
-    if (!BN_lshift(&r, &a, shift))
-        throw bignum_error("CBigNum:operator<< : BN_lshift failed");
-    return r;
-}
-
-inline const CBigNum operator>>(const CBigNum& a, unsigned int shift)
-{
-    CBigNum r = a;
-    r >>= shift;
-    return r;
-}
-
 inline bool operator==(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) == 0); }
 inline bool operator!=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) != 0); }
 inline bool operator<=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a, &b) <= 0); }
diff --git a/src/chainparams.h b/src/chainparams.h
index f3f24efd9922..5600b904ccdc 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -6,7 +6,6 @@
 #ifndef BITCOIN_CHAIN_PARAMS_H
 #define BITCOIN_CHAIN_PARAMS_H
 
-#include "bignum.h"
 #include "uint256.h"
 
 #include <vector>
diff --git a/src/protocol.h b/src/protocol.h
index 86e08ddcfa40..e6f105fe5c05 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -14,6 +14,7 @@
 #include "netbase.h"
 #include "serialize.h"
 #include "uint256.h"
+#include "version.h"
 
 #include <stdint.h>
 #include <string>
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 897fb87e4622..fb06fb343547 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -8,7 +8,6 @@
 
 
 
-#include "bignum.h"
 #include "keystore.h"
 #include "main.h"
 #include "net.h"
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index e12f4904f14c..fbc79cf996f1 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -37,7 +37,6 @@ test_bitcoin_SOURCES = \
   base32_tests.cpp \
   base58_tests.cpp \
   base64_tests.cpp \
-  bignum_tests.cpp \
   bloom_tests.cpp \
   canonical_tests.cpp \
   checkblock_tests.cpp \
diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
deleted file mode 100644
index 01967c768472..000000000000
--- a/src/test/bignum_tests.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) 2012-2014 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "bignum.h"
-
-#include <limits>
-#include <stdint.h>
-
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_SUITE(bignum_tests)
-
-// Unfortunately there's no standard way of preventing a function from being
-// inlined, so we define a macro for it.
-//
-// You should use it like this:
-//   NOINLINE void function() {...}
-#if defined(__GNUC__)
-// This also works and will be defined for any compiler implementing GCC
-// extensions, such as Clang and ICC.
-#define NOINLINE __attribute__((noinline))
-#elif defined(_MSC_VER)
-#define NOINLINE __declspec(noinline)
-#else
-// We give out a warning because it impacts the correctness of one bignum test.
-#warning You should define NOINLINE for your compiler.
-#define NOINLINE
-#endif
-
-// For the following test case, it is useful to use additional tools.
-//
-// The simplest one to use is the compiler flag -ftrapv, which detects integer
-// overflows and similar errors. However, due to optimizations and compilers
-// taking advantage of undefined behavior sometimes it may not actually detect
-// anything.
-//
-// You can also use compiler-based stack protection to possibly detect possible
-// stack buffer overruns.
-//
-// For more accurate diagnostics, you can use an undefined arithmetic operation
-// detector such as the clang's undefined behaviour checker.
-// See also: http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
-//
-// It might also be useful to use Google's AddressSanitizer to detect
-// stack buffer overruns, which valgrind can't currently detect.
-
-// Let's force this code not to be inlined, in order to actually
-// test a generic version of the function. This increases the chance
-// that -ftrapv will detect overflows.
-NOINLINE void mysetint64(CBigNum& num, int64_t n)
-{
-    num.setint64(n);
-}
-
-// For each number, we do 2 tests: one with inline code, then we reset the
-// value to 0, then the second one with a non-inlined function.
-BOOST_AUTO_TEST_CASE(bignum_setint64)
-{
-    int64_t n;
-
-    {
-        n = 0;
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "0");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "0");
-    }
-    {
-        n = 1;
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "1");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "1");
-    }
-    {
-        n = -1;
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "-1");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "-1");
-    }
-    {
-        n = 5;
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "5");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "5");
-    }
-    {
-        n = -5;
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "-5");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "-5");
-    }
-    {
-        n = std::numeric_limits<int64_t>::min();
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "-9223372036854775808");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "-9223372036854775808");
-    }
-    {
-        n = std::numeric_limits<int64_t>::max();
-        CBigNum num(n);
-        BOOST_CHECK(num.ToString() == "9223372036854775807");
-        num.setulong(0);
-        BOOST_CHECK(num.ToString() == "0");
-        mysetint64(num, n);
-        BOOST_CHECK(num.ToString() == "9223372036854775807");
-    }
-}
-
-
-BOOST_AUTO_TEST_CASE(bignum_SetHex)
-{
-    std::string hexStr = "deecf97fd890808b9cc0f1b6a3e7a60b400f52710e6ad075b1340755bfa58cc9";
-    CBigNum num;
-    num.SetHex(hexStr);
-    BOOST_CHECK_EQUAL(num.GetHex(), hexStr);
-}
-
-BOOST_AUTO_TEST_SUITE_END()

From 7cd0af7cc222d0694ce72e71458aef460698ee2c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 9 May 2014 17:56:16 +0200
Subject: [PATCH 0037/1819] Move bignum.h to test/

---
 src/Makefile.am         | 2 +-
 src/test/Makefile.am    | 1 +
 src/{ => test}/bignum.h | 0
 3 files changed, 2 insertions(+), 1 deletion(-)
 rename src/{ => test}/bignum.h (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 215d0319f926..a49ad587160b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,7 +28,7 @@ BITCOIN_CORE_H = \
   addrman.h \
   alert.h \
   allocators.h \
-  base58.h bignum.h \
+  base58.h \
   bloom.h \
   chainparams.h \
   checkpoints.h \
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index fbc79cf996f1..cde3a31e2fb7 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -32,6 +32,7 @@ endif
 test_bitcoin_LDADD += $(BDB_LIBS)
 
 test_bitcoin_SOURCES = \
+  bignum.h \
   alert_tests.cpp \
   allocator_tests.cpp \
   base32_tests.cpp \
diff --git a/src/bignum.h b/src/test/bignum.h
similarity index 100%
rename from src/bignum.h
rename to src/test/bignum.h

From 938b68984668445035b2505e1b7ec07649dd2bbc Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 9 May 2014 18:23:34 +0200
Subject: [PATCH 0038/1819] Squashed 'src/leveldb/' changes from
 9094c7f..7924331

42dcc7e Merge upstream LevelDB 1.17.
e353fbc Release LevelDB 1.17
269fc6c Release LevelDB 1.16
REVERT: 9094c7f Temporarily revert to writing .sst files instead of .ldb

git-subtree-dir: src/leveldb
git-subtree-split: 79243314e40ac31d79c68e5658a1d6a64800d50b
---
 Makefile                | 11 ++++++-----
 db/filename.cc          |  9 ++-------
 db/log_reader.cc        | 23 +++++++++++++++--------
 db/log_test.cc          | 40 +++++++++++++++++++++++++++++++++++-----
 db/repair.cc            |  1 -
 db/version_set.cc       | 14 --------------
 include/leveldb/c.h     |  1 -
 include/leveldb/db.h    |  2 +-
 include/leveldb/slice.h |  2 +-
 9 files changed, 60 insertions(+), 43 deletions(-)

diff --git a/Makefile b/Makefile
index 344ff2972a57..f8903b69e4b4 100644
--- a/Makefile
+++ b/Makefile
@@ -72,7 +72,7 @@ SHARED = $(SHARED1)
 else
 # Update db.h if you change these.
 SHARED_MAJOR = 1
-SHARED_MINOR = 15
+SHARED_MINOR = 17
 SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
 SHARED2 = $(SHARED1).$(SHARED_MAJOR)
 SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
@@ -190,19 +190,20 @@ PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms
 SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer
 DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer
 IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString)
+IOSARCH=-arch armv6 -arch armv7 -arch armv7s -arch arm64
 
 .cc.o:
 	mkdir -p ios-x86/$(dir $@)
-	$(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@
+	$(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
 	mkdir -p ios-arm/$(dir $@)
-	xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
+	xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
 	lipo ios-x86/$@ ios-arm/$@ -create -output $@
 
 .c.o:
 	mkdir -p ios-x86/$(dir $@)
-	$(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -c $< -o ios-x86/$@
+	$(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
 	mkdir -p ios-arm/$(dir $@)
-	xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk -arch armv6 -arch armv7 -c $< -o ios-arm/$@
+	xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
 	lipo ios-x86/$@ ios-arm/$@ -create -output $@
 
 else
diff --git a/db/filename.cc b/db/filename.cc
index 27d750697b09..da32946d9924 100644
--- a/db/filename.cc
+++ b/db/filename.cc
@@ -29,19 +29,14 @@ std::string LogFileName(const std::string& name, uint64_t number) {
   return MakeFileName(name, number, "log");
 }
 
-// TableFileName returns the filenames we usually write to, while
-// SSTTableFileName returns the alternative filenames we also try to read from
-// for backward compatibility. For now, swap them around.
-// TODO: when compatibility is no longer necessary, swap them back
-// (TableFileName to use "ldb" and SSTTableFileName to use "sst").
 std::string TableFileName(const std::string& name, uint64_t number) {
   assert(number > 0);
-  return MakeFileName(name, number, "sst");
+  return MakeFileName(name, number, "ldb");
 }
 
 std::string SSTTableFileName(const std::string& name, uint64_t number) {
   assert(number > 0);
-  return MakeFileName(name, number, "ldb");
+  return MakeFileName(name, number, "sst");
 }
 
 std::string DescriptorFileName(const std::string& dbname, uint64_t number) {
diff --git a/db/log_reader.cc b/db/log_reader.cc
index b35f115aadac..4919216d044f 100644
--- a/db/log_reader.cc
+++ b/db/log_reader.cc
@@ -133,7 +133,9 @@ bool Reader::ReadRecord(Slice* record, std::string* scratch) {
 
       case kEof:
         if (in_fragmented_record) {
-          ReportCorruption(scratch->size(), "partial record without end(3)");
+          // This can be caused by the writer dying immediately after
+          // writing a physical record but before completing the next; don't
+          // treat it as a corruption, just ignore the entire logical record.
           scratch->clear();
         }
         return false;
@@ -193,13 +195,12 @@ unsigned int Reader::ReadPhysicalRecord(Slice* result) {
           eof_ = true;
         }
         continue;
-      } else if (buffer_.size() == 0) {
-        // End of file
-        return kEof;
       } else {
-        size_t drop_size = buffer_.size();
+        // Note that if buffer_ is non-empty, we have a truncated header at the
+        // end of the file, which can be caused by the writer crashing in the
+        // middle of writing the header. Instead of considering this an error,
+        // just report EOF.
         buffer_.clear();
-        ReportCorruption(drop_size, "truncated record at end of file");
         return kEof;
       }
     }
@@ -213,8 +214,14 @@ unsigned int Reader::ReadPhysicalRecord(Slice* result) {
     if (kHeaderSize + length > buffer_.size()) {
       size_t drop_size = buffer_.size();
       buffer_.clear();
-      ReportCorruption(drop_size, "bad record length");
-      return kBadRecord;
+      if (!eof_) {
+        ReportCorruption(drop_size, "bad record length");
+        return kBadRecord;
+      }
+      // If the end of the file has been reached without reading |length| bytes
+      // of payload, assume the writer died in the middle of writing the record.
+      // Don't report a corruption.
+      return kEof;
     }
 
     if (type == kZeroType && length == 0) {
diff --git a/db/log_test.cc b/db/log_test.cc
index 4c5cf875733c..91d3caafc3bb 100644
--- a/db/log_test.cc
+++ b/db/log_test.cc
@@ -351,20 +351,32 @@ TEST(LogTest, BadRecordType) {
   ASSERT_EQ("OK", MatchError("unknown record type"));
 }
 
-TEST(LogTest, TruncatedTrailingRecord) {
+TEST(LogTest, TruncatedTrailingRecordIsIgnored) {
   Write("foo");
   ShrinkSize(4);   // Drop all payload as well as a header byte
   ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(kHeaderSize - 1, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("truncated record at end of file"));
+  // Truncated last record is ignored, not treated as an error.
+  ASSERT_EQ(0, DroppedBytes());
+  ASSERT_EQ("", ReportMessage());
 }
 
 TEST(LogTest, BadLength) {
+  const int kPayloadSize = kBlockSize - kHeaderSize;
+  Write(BigString("bar", kPayloadSize));
+  Write("foo");
+  // Least significant size byte is stored in header[4].
+  IncrementByte(4, 1);
+  ASSERT_EQ("foo", Read());
+  ASSERT_EQ(kBlockSize, DroppedBytes());
+  ASSERT_EQ("OK", MatchError("bad record length"));
+}
+
+TEST(LogTest, BadLengthAtEndIsIgnored) {
   Write("foo");
   ShrinkSize(1);
   ASSERT_EQ("EOF", Read());
-  ASSERT_EQ(kHeaderSize + 2, DroppedBytes());
-  ASSERT_EQ("OK", MatchError("bad record length"));
+  ASSERT_EQ(0, DroppedBytes());
+  ASSERT_EQ("", ReportMessage());
 }
 
 TEST(LogTest, ChecksumMismatch) {
@@ -415,6 +427,24 @@ TEST(LogTest, UnexpectedFirstType) {
   ASSERT_EQ("OK", MatchError("partial record without end"));
 }
 
+TEST(LogTest, MissingLastIsIgnored) {
+  Write(BigString("bar", kBlockSize));
+  // Remove the LAST block, including header.
+  ShrinkSize(14);
+  ASSERT_EQ("EOF", Read());
+  ASSERT_EQ("", ReportMessage());
+  ASSERT_EQ(0, DroppedBytes());
+}
+
+TEST(LogTest, PartialLastIsIgnored) {
+  Write(BigString("bar", kBlockSize));
+  // Cause a bad record length in the LAST block.
+  ShrinkSize(1);
+  ASSERT_EQ("EOF", Read());
+  ASSERT_EQ("", ReportMessage());
+  ASSERT_EQ(0, DroppedBytes());
+}
+
 TEST(LogTest, ErrorJoinsRecords) {
   // Consider two fragmented records:
   //    first(R1) last(R1) first(R2) last(R2)
diff --git a/db/repair.cc b/db/repair.cc
index 96c9b37af14c..7727fafc58e5 100644
--- a/db/repair.cc
+++ b/db/repair.cc
@@ -242,7 +242,6 @@ class Repairer {
   }
 
   void ExtractMetaData() {
-    std::vector<TableInfo> kept;
     for (size_t i = 0; i < table_numbers_.size(); i++) {
       ScanTable(table_numbers_[i]);
     }
diff --git a/db/version_set.cc b/db/version_set.cc
index 517edd3b18b7..aa83df55e4ce 100644
--- a/db/version_set.cc
+++ b/db/version_set.cc
@@ -54,20 +54,6 @@ static int64_t TotalFileSize(const std::vector<FileMetaData*>& files) {
   return sum;
 }
 
-namespace {
-std::string IntSetToString(const std::set<uint64_t>& s) {
-  std::string result = "{";
-  for (std::set<uint64_t>::const_iterator it = s.begin();
-       it != s.end();
-       ++it) {
-    result += (result.size() > 1) ? "," : "";
-    result += NumberToString(*it);
-  }
-  result += "}";
-  return result;
-}
-}  // namespace
-
 Version::~Version() {
   assert(refs_ == 0);
 
diff --git a/include/leveldb/c.h b/include/leveldb/c.h
index 1fa58866c395..1048fe3b8683 100644
--- a/include/leveldb/c.h
+++ b/include/leveldb/c.h
@@ -9,7 +9,6 @@
   Does not support:
   . getters for the option types
   . custom comparators that implement key shortening
-  . capturing post-write-snapshot
   . custom iter, db, env, cache implementations using just the C bindings
 
   Some conventions:
diff --git a/include/leveldb/db.h b/include/leveldb/db.h
index 5ffb29d52644..40851b2aa83d 100644
--- a/include/leveldb/db.h
+++ b/include/leveldb/db.h
@@ -14,7 +14,7 @@ namespace leveldb {
 
 // Update Makefile if you change these
 static const int kMajorVersion = 1;
-static const int kMinorVersion = 15;
+static const int kMinorVersion = 17;
 
 struct Options;
 struct ReadOptions;
diff --git a/include/leveldb/slice.h b/include/leveldb/slice.h
index 74ea8fa49af6..bc367986f7e8 100644
--- a/include/leveldb/slice.h
+++ b/include/leveldb/slice.h
@@ -94,7 +94,7 @@ inline bool operator!=(const Slice& x, const Slice& y) {
 }
 
 inline int Slice::compare(const Slice& b) const {
-  const int min_len = (size_ < b.size_) ? size_ : b.size_;
+  const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
   int r = memcmp(data_, b.data_, min_len);
   if (r == 0) {
     if (size_ < b.size_) r = -1;

From 90fd87376d4ccb1ce9eec703b756dd292bee8288 Mon Sep 17 00:00:00 2001
From: Matthew Bogosian <mtb19@columbia.edu>
Date: Fri, 9 May 2014 12:39:24 -0700
Subject: [PATCH 0039/1819] fixes #4163

---
 src/rpcwallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index e21881dbe93a..2479a1f87e25 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1747,7 +1747,7 @@ Value lockunspent(const Array& params, bool fHelp)
         throw runtime_error(
             "lockunspent unlock [{\"txid\":\"txid\",\"vout\":n},...]\n"
             "\nUpdates list of temporarily unspendable outputs.\n"
-            "Temporarily lock (lock=true) or unlock (lock=false) specified transaction outputs.\n"
+            "Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs.\n"
             "A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins.\n"
             "Locks are stored in memory only. Nodes start with zero locked outputs, and the locked output list\n"
             "is always cleared (by virtue of process exit) when a node stops or fails.\n"

From b641c9cd217f7789726bb25ab87cd35e2e5fcaad Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 10 May 2014 00:39:49 +0200
Subject: [PATCH 0040/1819] Fix addnode "onetry": Connect with
 OpenNetworkConnection

---
 src/net.cpp    | 3 ---
 src/net.h      | 1 +
 src/rpcnet.cpp | 2 +-
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 6bde1e79993f..9f7096f1335f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -41,9 +41,6 @@ using namespace boost;
 
 static const int MAX_OUTBOUND_CONNECTIONS = 8;
 
-bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
-
-
 //
 // Global state variables
 //
diff --git a/src/net.h b/src/net.h
index 729b1bcd5748..3a8cf1ac8fae 100644
--- a/src/net.h
+++ b/src/net.h
@@ -49,6 +49,7 @@ void AddressCurrentlyConnected(const CService& addr);
 CNode* FindNode(const CNetAddr& ip);
 CNode* FindNode(const CService& ip);
 CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL);
+bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
 void MapPort(bool fUseUPnP);
 unsigned short GetListenPort();
 bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 573d6cd3f670..0a2bfbac606a 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -166,7 +166,7 @@ Value addnode(const Array& params, bool fHelp)
     if (strCommand == "onetry")
     {
         CAddress addr;
-        ConnectNode(addr, strNode.c_str());
+        OpenNetworkConnection(addr, NULL, strNode.c_str());
         return Value::null;
     }
 

From f6b7c644c998799c10704be4a5b42d9cacc8a746 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 9 May 2014 23:42:20 +0200
Subject: [PATCH 0041/1819] Move base58.h implementation code to base58.cpp

---
 src/base58.cpp            | 183 +++++++++++++++++++++++++++
 src/base58.h              | 259 +++++---------------------------------
 src/test/base58_tests.cpp |   4 +-
 3 files changed, 219 insertions(+), 227 deletions(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index 0b08ee3d064a..597570388734 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -2,11 +2,18 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "base58.h"
+
+#include "hash.h"
+#include "uint256.h"
+
 #include <assert.h>
 #include <stdint.h>
 #include <string.h>
 #include <vector>
 #include <string>
+#include <boost/variant/apply_visitor.hpp>
+#include <boost/variant/static_visitor.hpp>
 
 /* All alphanumeric characters except for "0", "I", "O", and "l" */
 static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
@@ -89,3 +96,179 @@ std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
         str += pszBase58[*(it++)];
     return str;
 }
+
+std::string EncodeBase58(const std::vector<unsigned char>& vch) {
+    return EncodeBase58(&vch[0], &vch[0] + vch.size());
+}
+
+bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet) {
+    return DecodeBase58(str.c_str(), vchRet);
+}
+
+std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) {
+    // add 4-byte hash check to the end
+    std::vector<unsigned char> vch(vchIn);
+    uint256 hash = Hash(vch.begin(), vch.end());
+    vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
+    return EncodeBase58(vch);
+}
+
+bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet) {
+    if (!DecodeBase58(psz, vchRet))
+        return false;
+    if (vchRet.size() < 4)
+    {
+        vchRet.clear();
+        return false;
+    }
+    // re-calculate the checksum, insure it matches the included 4-byte checksum
+    uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
+    if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
+    {
+        vchRet.clear();
+        return false;
+    }
+    vchRet.resize(vchRet.size()-4);
+    return true;
+}
+
+bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet) {
+    return DecodeBase58Check(str.c_str(), vchRet);
+}
+
+CBase58Data::CBase58Data() {
+    vchVersion.clear();
+    vchData.clear();
+}
+
+void CBase58Data::SetData(const std::vector<unsigned char> &vchVersionIn, const void* pdata, size_t nSize) {
+    vchVersion = vchVersionIn;
+    vchData.resize(nSize);
+    if (!vchData.empty())
+        memcpy(&vchData[0], pdata, nSize);
+}
+
+void CBase58Data::SetData(const std::vector<unsigned char> &vchVersionIn, const unsigned char *pbegin, const unsigned char *pend) {
+    SetData(vchVersionIn, (void*)pbegin, pend - pbegin);
+}
+
+bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes) {
+    std::vector<unsigned char> vchTemp;
+    DecodeBase58Check(psz, vchTemp);
+    if (vchTemp.size() < nVersionBytes) {
+        vchData.clear();
+        vchVersion.clear();
+        return false;
+    }
+    vchVersion.assign(vchTemp.begin(), vchTemp.begin() + nVersionBytes);
+    vchData.resize(vchTemp.size() - nVersionBytes);
+    if (!vchData.empty())
+        memcpy(&vchData[0], &vchTemp[nVersionBytes], vchData.size());
+    OPENSSL_cleanse(&vchTemp[0], vchData.size());
+    return true;
+}
+
+bool CBase58Data::SetString(const std::string& str) {
+    return SetString(str.c_str());
+}
+
+std::string CBase58Data::ToString() const {
+    std::vector<unsigned char> vch = vchVersion;
+    vch.insert(vch.end(), vchData.begin(), vchData.end());
+    return EncodeBase58Check(vch);
+}
+
+int CBase58Data::CompareTo(const CBase58Data& b58) const {
+    if (vchVersion < b58.vchVersion) return -1;
+    if (vchVersion > b58.vchVersion) return  1;
+    if (vchData < b58.vchData)   return -1;
+    if (vchData > b58.vchData)   return  1;
+    return 0;
+}
+
+namespace {
+    class CBitcoinAddressVisitor : public boost::static_visitor<bool> {
+    private:
+        CBitcoinAddress *addr;
+    public:
+        CBitcoinAddressVisitor(CBitcoinAddress *addrIn) : addr(addrIn) { }
+
+        bool operator()(const CKeyID &id) const { return addr->Set(id); }
+        bool operator()(const CScriptID &id) const { return addr->Set(id); }
+        bool operator()(const CNoDestination &no) const { return false; }
+    };
+};
+
+bool CBitcoinAddress::Set(const CKeyID &id) {
+    SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);
+    return true;
+}
+
+bool CBitcoinAddress::Set(const CScriptID &id) {
+    SetData(Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS), &id, 20);
+    return true;
+}
+
+bool CBitcoinAddress::Set(const CTxDestination &dest) {
+    return boost::apply_visitor(CBitcoinAddressVisitor(this), dest);
+}
+
+bool CBitcoinAddress::IsValid() const {
+    bool fCorrectSize = vchData.size() == 20;
+    bool fKnownVersion = vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS) ||
+                         vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
+    return fCorrectSize && fKnownVersion;
+}
+
+CTxDestination CBitcoinAddress::Get() const {
+    if (!IsValid())
+        return CNoDestination();
+    uint160 id;
+    memcpy(&id, &vchData[0], 20);
+    if (vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS))
+        return CKeyID(id);
+    else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS))
+        return CScriptID(id);
+    else
+        return CNoDestination();
+}
+
+bool CBitcoinAddress::GetKeyID(CKeyID &keyID) const {
+    if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS))
+        return false;
+    uint160 id;
+    memcpy(&id, &vchData[0], 20);
+    keyID = CKeyID(id);
+    return true;
+}
+
+bool CBitcoinAddress::IsScript() const {
+    return IsValid() && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
+}
+
+void CBitcoinSecret::SetKey(const CKey& vchSecret) {
+    assert(vchSecret.IsValid());
+    SetData(Params().Base58Prefix(CChainParams::SECRET_KEY), vchSecret.begin(), vchSecret.size());
+    if (vchSecret.IsCompressed())
+        vchData.push_back(1);
+}
+
+CKey CBitcoinSecret::GetKey() {
+    CKey ret;
+    ret.Set(&vchData[0], &vchData[32], vchData.size() > 32 && vchData[32] == 1);
+    return ret;
+}
+
+bool CBitcoinSecret::IsValid() const {
+    bool fExpectedFormat = vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1);
+    bool fCorrectVersion = vchVersion == Params().Base58Prefix(CChainParams::SECRET_KEY);
+    return fExpectedFormat && fCorrectVersion;
+}
+
+bool CBitcoinSecret::SetString(const char* pszSecret) {
+    return CBase58Data::SetString(pszSecret) && IsValid();
+}
+
+bool CBitcoinSecret::SetString(const std::string& strSecret) {
+    return SetString(strSecret.c_str());
+}
diff --git a/src/base58.h b/src/base58.h
index 4fb436c5ed5e..70681f589a6a 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -15,17 +15,12 @@
 #define BITCOIN_BASE58_H
 
 #include "chainparams.h"
-#include "hash.h"
 #include "key.h"
 #include "script.h"
-#include "uint256.h"
 
 #include <string>
 #include <vector>
 
-#include <boost/variant/apply_visitor.hpp>
-#include <boost/variant/static_visitor.hpp>
-
 /**
  * Encode a byte sequence as a base58-encoded string.
  * pbegin and pend cannot be NULL, unless both are.
@@ -35,10 +30,7 @@ std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
 /**
  * Encode a byte vector as a base58-encoded string
  */
-inline std::string EncodeBase58(const std::vector<unsigned char>& vch)
-{
-    return EncodeBase58(&vch[0], &vch[0] + vch.size());
-}
+std::string EncodeBase58(const std::vector<unsigned char>& vch);
 
 /**
  * Decode a base58-encoded string (psz) into a byte vector (vchRet).
@@ -51,55 +43,24 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vchRet);
  * Decode a base58-encoded string (str) into a byte vector (vchRet).
  * return true if decoding is successful.
  */
-inline bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet)
-{
-    return DecodeBase58(str.c_str(), vchRet);
-}
+bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet);
 
 /**
  * Encode a byte vector into a base58-encoded string, including checksum
  */
-inline std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn)
-{
-    // add 4-byte hash check to the end
-    std::vector<unsigned char> vch(vchIn);
-    uint256 hash = Hash(vch.begin(), vch.end());
-    vch.insert(vch.end(), (unsigned char*)&hash, (unsigned char*)&hash + 4);
-    return EncodeBase58(vch);
-}
+std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn);
 
 /**
  * Decode a base58-encoded string (psz) that includes a checksum into a byte
  * vector (vchRet), return true if decoding is successful
  */
-inline bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
-{
-    if (!DecodeBase58(psz, vchRet))
-        return false;
-    if (vchRet.size() < 4)
-    {
-        vchRet.clear();
-        return false;
-    }
-    // re-calculate the checksum, insure it matches the included 4-byte checksum
-    uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
-    if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
-    {
-        vchRet.clear();
-        return false;
-    }
-    vchRet.resize(vchRet.size()-4);
-    return true;
-}
+inline bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet);
 
 /**
  * Decode a base58-encoded string (str) that includes a checksum into a byte
  * vector (vchRet), return true if decoding is successful
  */
-inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet)
-{
-    return DecodeBase58Check(str.c_str(), vchRet);
-}
+inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet);
 
 /**
  * Base class for all base58-encoded data
@@ -114,64 +75,15 @@ class CBase58Data
     typedef std::vector<unsigned char, zero_after_free_allocator<unsigned char> > vector_uchar;
     vector_uchar vchData;
 
-    CBase58Data()
-    {
-        vchVersion.clear();
-        vchData.clear();
-    }
-
-    void SetData(const std::vector<unsigned char> &vchVersionIn, const void* pdata, size_t nSize)
-    {
-        vchVersion = vchVersionIn;
-        vchData.resize(nSize);
-        if (!vchData.empty())
-            memcpy(&vchData[0], pdata, nSize);
-    }
-
-    void SetData(const std::vector<unsigned char> &vchVersionIn, const unsigned char *pbegin, const unsigned char *pend)
-    {
-        SetData(vchVersionIn, (void*)pbegin, pend - pbegin);
-    }
+    CBase58Data();
+    void SetData(const std::vector<unsigned char> &vchVersionIn, const void* pdata, size_t nSize);
+    void SetData(const std::vector<unsigned char> &vchVersionIn, const unsigned char *pbegin, const unsigned char *pend);
 
 public:
-    bool SetString(const char* psz, unsigned int nVersionBytes = 1)
-    {
-        std::vector<unsigned char> vchTemp;
-        DecodeBase58Check(psz, vchTemp);
-        if (vchTemp.size() < nVersionBytes)
-        {
-            vchData.clear();
-            vchVersion.clear();
-            return false;
-        }
-        vchVersion.assign(vchTemp.begin(), vchTemp.begin() + nVersionBytes);
-        vchData.resize(vchTemp.size() - nVersionBytes);
-        if (!vchData.empty())
-            memcpy(&vchData[0], &vchTemp[nVersionBytes], vchData.size());
-        OPENSSL_cleanse(&vchTemp[0], vchData.size());
-        return true;
-    }
-
-    bool SetString(const std::string& str)
-    {
-        return SetString(str.c_str());
-    }
-
-    std::string ToString() const
-    {
-        std::vector<unsigned char> vch = vchVersion;
-        vch.insert(vch.end(), vchData.begin(), vchData.end());
-        return EncodeBase58Check(vch);
-    }
-
-    int CompareTo(const CBase58Data& b58) const
-    {
-        if (vchVersion < b58.vchVersion) return -1;
-        if (vchVersion > b58.vchVersion) return  1;
-        if (vchData < b58.vchData)   return -1;
-        if (vchData > b58.vchData)   return  1;
-        return 0;
-    }
+    bool SetString(const char* psz, unsigned int nVersionBytes = 1);
+    bool SetString(const std::string& str);
+    std::string ToString() const;
+    int CompareTo(const CBase58Data& b58) const;
 
     bool operator==(const CBase58Data& b58) const { return CompareTo(b58) == 0; }
     bool operator<=(const CBase58Data& b58) const { return CompareTo(b58) <= 0; }
@@ -186,140 +98,37 @@ class CBase58Data
  * Script-hash-addresses have version 5 (or 196 testnet).
  * The data vector contains RIPEMD160(SHA256(cscript)), where cscript is the serialized redemption script.
  */
-class CBitcoinAddress;
-class CBitcoinAddressVisitor : public boost::static_visitor<bool>
-{
-private:
-    CBitcoinAddress *addr;
+class CBitcoinAddress : public CBase58Data {
 public:
-    CBitcoinAddressVisitor(CBitcoinAddress *addrIn) : addr(addrIn) { }
-    bool operator()(const CKeyID &id) const;
-    bool operator()(const CScriptID &id) const;
-    bool operator()(const CNoDestination &no) const;
+    bool Set(const CKeyID &id);
+    bool Set(const CScriptID &id);
+    bool Set(const CTxDestination &dest);
+    bool IsValid() const;
+
+    CBitcoinAddress() {}
+    CBitcoinAddress(const CTxDestination &dest) { Set(dest); }
+    CBitcoinAddress(const std::string& strAddress) { SetString(strAddress); }
+    CBitcoinAddress(const char* pszAddress) { SetString(pszAddress); }
+
+    CTxDestination Get() const;
+    bool GetKeyID(CKeyID &keyID) const;
+    bool IsScript() const;
 };
 
-class CBitcoinAddress : public CBase58Data
-{
-public:
-    bool Set(const CKeyID &id) {
-        SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);
-        return true;
-    }
-
-    bool Set(const CScriptID &id) {
-        SetData(Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS), &id, 20);
-        return true;
-    }
-
-    bool Set(const CTxDestination &dest)
-    {
-        return boost::apply_visitor(CBitcoinAddressVisitor(this), dest);
-    }
-
-    bool IsValid() const
-    {
-        bool fCorrectSize = vchData.size() == 20;
-        bool fKnownVersion = vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS) ||
-                             vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
-        return fCorrectSize && fKnownVersion;
-    }
-
-    CBitcoinAddress()
-    {
-    }
-
-    CBitcoinAddress(const CTxDestination &dest)
-    {
-        Set(dest);
-    }
-
-    CBitcoinAddress(const std::string& strAddress)
-    {
-        SetString(strAddress);
-    }
-
-    CBitcoinAddress(const char* pszAddress)
-    {
-        SetString(pszAddress);
-    }
-
-    CTxDestination Get() const {
-        if (!IsValid())
-            return CNoDestination();
-        uint160 id;
-        memcpy(&id, &vchData[0], 20);
-        if (vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS))
-            return CKeyID(id);
-        else if (vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS))
-            return CScriptID(id);
-        else
-            return CNoDestination();
-    }
-
-    bool GetKeyID(CKeyID &keyID) const {
-        if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS))
-            return false;
-        uint160 id;
-        memcpy(&id, &vchData[0], 20);
-        keyID = CKeyID(id);
-        return true;
-    }
-
-    bool IsScript() const {
-        return IsValid() && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
-    }
-};
-
-bool inline CBitcoinAddressVisitor::operator()(const CKeyID &id) const         { return addr->Set(id); }
-bool inline CBitcoinAddressVisitor::operator()(const CScriptID &id) const      { return addr->Set(id); }
-bool inline CBitcoinAddressVisitor::operator()(const CNoDestination &id) const { return false; }
-
 /**
  * A base58-encoded secret key
  */
 class CBitcoinSecret : public CBase58Data
 {
 public:
-    void SetKey(const CKey& vchSecret)
-    {
-        assert(vchSecret.IsValid());
-        SetData(Params().Base58Prefix(CChainParams::SECRET_KEY), vchSecret.begin(), vchSecret.size());
-        if (vchSecret.IsCompressed())
-            vchData.push_back(1);
-    }
-
-    CKey GetKey()
-    {
-        CKey ret;
-        ret.Set(&vchData[0], &vchData[32], vchData.size() > 32 && vchData[32] == 1);
-        return ret;
-    }
-
-    bool IsValid() const
-    {
-        bool fExpectedFormat = vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1);
-        bool fCorrectVersion = vchVersion == Params().Base58Prefix(CChainParams::SECRET_KEY);
-        return fExpectedFormat && fCorrectVersion;
-    }
-
-    bool SetString(const char* pszSecret)
-    {
-        return CBase58Data::SetString(pszSecret) && IsValid();
-    }
-
-    bool SetString(const std::string& strSecret)
-    {
-        return SetString(strSecret.c_str());
-    }
-
-    CBitcoinSecret(const CKey& vchSecret)
-    {
-        SetKey(vchSecret);
-    }
-
-    CBitcoinSecret()
-    {
-    }
+    void SetKey(const CKey& vchSecret);
+    CKey GetKey();
+    bool IsValid() const;
+    bool SetString(const char* pszSecret);
+    bool SetString(const std::string& strSecret);
+
+    CBitcoinSecret(const CKey& vchSecret) { SetKey(vchSecret); }
+    CBitcoinSecret() {}
 };
 
 template<typename K, int Size, CChainParams::Base58Type Type> class CBitcoinExtKeyBase : public CBase58Data
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 5689e6999593..b81a19cfd8ba 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -233,7 +233,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
                 continue;
             }
             CBitcoinAddress addrOut;
-            BOOST_CHECK_MESSAGE(boost::apply_visitor(CBitcoinAddressVisitor(&addrOut), dest), "encode dest: " + strTest);
+            BOOST_CHECK_MESSAGE(addrOut.Set(dest), "encode dest: " + strTest);
             BOOST_CHECK_MESSAGE(addrOut.ToString() == exp_base58string, "mismatch: " + strTest);
         }
     }
@@ -241,7 +241,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
     // Visiting a CNoDestination must fail
     CBitcoinAddress dummyAddr;
     CTxDestination nodest = CNoDestination();
-    BOOST_CHECK(!boost::apply_visitor(CBitcoinAddressVisitor(&dummyAddr), nodest));
+    BOOST_CHECK(!dummyAddr.Set(nodest));
 
     SelectParams(CChainParams::MAIN);
 }

From 7a0e84dd63ac98a92fd7aafd2d432f1da71eb8da Mon Sep 17 00:00:00 2001
From: Ashley Holman <dscvlt@gmail.com>
Date: Sun, 11 May 2014 00:30:18 -0500
Subject: [PATCH 0042/1819] ProcessGetData(): abort if a block file is missing
 from disk

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 379ca3ef7448..f90f0380161c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3373,7 +3373,7 @@ void static ProcessGetData(CNode* pfrom)
                 {
                     // Send block from disk
                     CBlock block;
-                    ReadBlockFromDisk(block, (*mi).second);
+                    assert(ReadBlockFromDisk(block, (*mi).second));
                     if (inv.type == MSG_BLOCK)
                         pfrom->PushMessage("block", block);
                     else // MSG_FILTERED_BLOCK)

From 283e405c063acfca304acbff505badcbbcb814c9 Mon Sep 17 00:00:00 2001
From: shshshsh <shshshsh@sdsdsdfsd.invalid>
Date: Sun, 11 May 2014 13:29:16 +0000
Subject: [PATCH 0043/1819] Switch stdout to line buffering

Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
---
 src/init.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index 77c32d0b4938..2c3bb02758c9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -25,6 +25,7 @@
 #endif
 
 #include <stdint.h>
+#include <stdio.h>
 
 #ifndef WIN32
 #include <signal.h>
@@ -530,6 +531,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     fServer = GetBoolArg("-server", false);
     fPrintToConsole = GetBoolArg("-printtoconsole", false);
     fLogTimestamps = GetBoolArg("-logtimestamps", true);
+    setvbuf(stdout, NULL, _IOLBF, 0);
 #ifdef ENABLE_WALLET
     bool fDisableWallet = GetBoolArg("-disablewallet", false);
 #endif

From 0a0cd345520382bd726fef50c62864715b03f164 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 7 May 2014 09:09:13 +0200
Subject: [PATCH 0044/1819] rpc: pass errors from async_accept

According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html),
the function signature of the handler must be:

    void handler(
      const boost::system::error_code& error // Result of operation.
    );

We were binding *all* the arguments, instead of all but the error,
resulting in nullary function that never got the error. Fix this
by adding an input argument substitution.
---
 src/rpcserver.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index ac40ea7cf199..44f329dd155d 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -466,7 +466,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
                 boost::ref(context),
                 fUseSSL,
                 conn,
-                boost::asio::placeholders::error));
+                _1));
 }
 
 
@@ -490,6 +490,8 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
     if (error)
     {
         delete conn;
+        // TODO: Actually handle errors
+        LogPrintf("%s: Error: %s\n", __func__, error.message());
     }
 
     // Restrict callers by IP.  It is important to

From 1a445225f6638839dec7cfc8822f1218c74c974f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 7 May 2014 09:24:44 +0200
Subject: [PATCH 0045/1819] rpc: Make sure conn object is always cleaned up

Make sure conn object always gets cleaned up by using a
`boost::shared_ptr`.

This makes valgrind happy - before this commit, one connection object
always leaked at shutdown, as well as can avoid other leaks, when
for example an exception happens.

Also add an explicit Close() to the !ClientAllowed path to make it similar
to the normal path (I'm not sure whether it is needed, but it
can't hurt).
---
 src/rpcserver.cpp | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 44f329dd155d..442bf5c9cbdf 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -444,7 +444,7 @@ template <typename Protocol, typename SocketAcceptorService>
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                              ssl::context& context,
                              bool fUseSSL,
-                             AcceptedConnection* conn,
+                             boost::shared_ptr< AcceptedConnection > conn,
                              const boost::system::error_code& error);
 
 /**
@@ -456,7 +456,7 @@ static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketA
                    const bool fUseSSL)
 {
     // Accept connection
-    AcceptedConnectionImpl<Protocol>* conn = new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL);
+    boost::shared_ptr< AcceptedConnectionImpl<Protocol> > conn(new AcceptedConnectionImpl<Protocol>(acceptor->get_io_service(), context, fUseSSL));
 
     acceptor->async_accept(
             conn->sslStream.lowest_layer(),
@@ -477,23 +477,20 @@ template <typename Protocol, typename SocketAcceptorService>
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                              ssl::context& context,
                              const bool fUseSSL,
-                             AcceptedConnection* conn,
+                             boost::shared_ptr< AcceptedConnection > conn,
                              const boost::system::error_code& error)
 {
     // Immediately start accepting new connections, except when we're cancelled or our socket is closed.
     if (error != asio::error::operation_aborted && acceptor->is_open())
         RPCListen(acceptor, context, fUseSSL);
 
-    AcceptedConnectionImpl<ip::tcp>* tcp_conn = dynamic_cast< AcceptedConnectionImpl<ip::tcp>* >(conn);
+    AcceptedConnectionImpl<ip::tcp>* tcp_conn = dynamic_cast< AcceptedConnectionImpl<ip::tcp>* >(conn.get());
 
-    // TODO: Actually handle errors
     if (error)
     {
-        delete conn;
         // TODO: Actually handle errors
         LogPrintf("%s: Error: %s\n", __func__, error.message());
     }
-
     // Restrict callers by IP.  It is important to
     // do this before starting client thread, to filter out
     // certain DoS and misbehaving clients.
@@ -502,12 +499,11 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
         // Only send a 403 if we're not using SSL to prevent a DoS during the SSL handshake.
         if (!fUseSSL)
             conn->stream() << HTTPReply(HTTP_FORBIDDEN, "", false) << std::flush;
-        delete conn;
+        conn->close();
     }
     else {
-        ServiceConnection(conn);
+        ServiceConnection(conn.get());
         conn->close();
-        delete conn;
     }
 }
 

From 381b25dfde013efae4e0360f82cd34e27662e743 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 7 May 2014 11:47:16 +0200
Subject: [PATCH 0046/1819] doc: remove mention of `-rpctimeout` from man page

That option hasn't existed for a long time.
---
 contrib/debian/manpages/bitcoin.conf.5 | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/contrib/debian/manpages/bitcoin.conf.5 b/contrib/debian/manpages/bitcoin.conf.5
index eef213149d53..7438b4b66ad7 100644
--- a/contrib/debian/manpages/bitcoin.conf.5
+++ b/contrib/debian/manpages/bitcoin.conf.5
@@ -37,9 +37,6 @@ You must set *rpcuser* to secure the JSON-RPC api.
 \fBrpcpassword=\fR\fI'password'\fR
 You must set *rpcpassword* to secure the JSON-RPC api.
 .TP
-\fBrpctimeout=\fR\fI'30'\fR
-How many seconds *bitcoin* will wait for a complete RPC HTTP request, after the HTTP connection is established.
-.TP
 \fBrpcallowip=\fR\fI'192.168.1.*'\fR
 By default, only RPC connections from localhost are allowed. Specify as many *rpcallowip=* settings as you like to allow connections from other hosts (and you may use * as a wildcard character).
 .TP

From cef44941e798c33f7334bf90a2dd531f9bada8c3 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 9 May 2014 10:01:50 +0200
Subject: [PATCH 0047/1819] rpc: keep track of acceptors, and cancel them in
 StopRPCThreads

Fixes #4156.

The problem is that the boost::asio::io_service destructor
waits for the acceptors to finish (on windows, and boost 1.55).

Fix this by keeping track of the acceptors and cancelling them before
stopping the event loops.
---
 src/rpcserver.cpp | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 442bf5c9cbdf..d4a229b092d9 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -39,6 +39,7 @@ static ssl::context* rpc_ssl_context = NULL;
 static boost::thread_group* rpc_worker_group = NULL;
 static boost::asio::io_service::work *rpc_dummy_work = NULL;
 static std::vector<CSubNet> rpc_allow_subnets; //!< List of subnets to allow RPC connections from
+static std::vector< boost::shared_ptr<ip::tcp::acceptor> > rpc_acceptors;
 
 void RPCTypeCheck(const Array& params,
                   const list<Value_type>& typesExpected,
@@ -593,12 +594,13 @@ void StartRPCThreads()
     asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
     ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", Params().RPCPort()));
     boost::system::error_code v6_only_error;
-    boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
 
     bool fListening = false;
     std::string strerr;
     try
     {
+        boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
+        rpc_acceptors.push_back(acceptor);
         acceptor->open(endpoint.protocol());
         acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
 
@@ -616,7 +618,6 @@ void StartRPCThreads()
     {
         strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s"), endpoint.port(), e.what());
     }
-
     try {
         // If dual IPv6/IPv4 failed (or we're opening loopback interfaces only), open IPv4 separately
         if (!fListening || loopback || v6_only_error)
@@ -624,7 +625,8 @@ void StartRPCThreads()
             bindAddress = loopback ? asio::ip::address_v4::loopback() : asio::ip::address_v4::any();
             endpoint.address(bindAddress);
 
-            acceptor.reset(new ip::tcp::acceptor(*rpc_io_service));
+            boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
+            rpc_acceptors.push_back(acceptor);
             acceptor->open(endpoint.protocol());
             acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
             acceptor->bind(endpoint);
@@ -668,7 +670,16 @@ void StopRPCThreads()
 {
     if (rpc_io_service == NULL) return;
 
+    // First, cancel all timers and acceptors
+    // This is not done automatically by ->stop(), and in some cases the destructor of
+    // asio::io_service can hang if this is skipped.
+    BOOST_FOREACH(const boost::shared_ptr<ip::tcp::acceptor> &acceptor, rpc_acceptors)
+        acceptor->cancel();
+    rpc_acceptors.clear();
+    BOOST_FOREACH(const PAIRTYPE(std::string, boost::shared_ptr<deadline_timer>) &timer, deadlineTimers)
+        timer.second->cancel();
     deadlineTimers.clear();
+
     rpc_io_service->stop();
     if (rpc_worker_group != NULL)
         rpc_worker_group->join_all();

From 9ec030622f6c12c75f98b6dcd0c18bd9ef1fc223 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Thu, 13 Mar 2014 02:45:33 -0400
Subject: [PATCH 0048/1819] Add CODESEPARATOR/FindAndDelete() tests

---
 src/test/data/tx_valid.json | 46 +++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json
index 1f51d3ce55cc..40275cd194fb 100644
--- a/src/test/data/tx_valid.json
+++ b/src/test/data/tx_valid.json
@@ -132,5 +132,51 @@
 [[["ba4cd7ae2ad4d4d13ebfc8ab1d93a63e4a6563f25089a18bf0fc68f282aa88c1", 0, "2 0x21 0x037c615d761e71d38903609bf4f46847266edc2fb37532047d747ba47eaae5ffe1 0x21 0x02edc823cd634f2c4033d94f5755207cb6b60c4b1f1f056ad7471c47de5f2e4d50 2 CHECKMULTISIG NOT"]],
 "0100000001c188aa82f268fcf08ba18950f263654a3ea6931dabc8bf3ed1d4d42aaed74cba000000004b0000483045022100940378576e069aca261a6b26fb38344e4497ca6751bb10905c76bb689f4222b002204833806b014c26fd801727b792b1260003c55710f87c5adbd7a9cb57446dbc9801ffffffff0101000000000000002321037c615d761e71d38903609bf4f46847266edc2fb37532047d747ba47eaae5ffe1ac00000000", "P2SH"],
 
+
+["OP_CODESEPARATOR tests"],
+
+["Test that SignatureHash() removes OP_CODESEPARATOR with FindAndDelete()"],
+[[["bc7fd132fcf817918334822ee6d9bd95c889099c96e07ca2c1eb2cc70db63224", 0, "CODESEPARATOR 0x21 0x038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041 CHECKSIG"]],
+"01000000012432b60dc72cebc1a27ce0969c0989c895bdd9e62e8234839117f8fc32d17fbc000000004a493046022100a576b52051962c25e642c0fd3d77ee6c92487048e5d90818bcf5b51abaccd7900221008204f8fb121be4ec3b24483b1f92d89b1b0548513a134e345c5442e86e8617a501ffffffff010000000000000000016a00000000", "P2SH"],
+[[["83e194f90b6ef21fa2e3a365b63794fb5daa844bdc9b25de30899fcfe7b01047", 0, "CODESEPARATOR CODESEPARATOR 0x21 0x038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041 CHECKSIG"]],
+"01000000014710b0e7cf9f8930de259bdc4b84aa5dfb9437b665a3e3a21ff26e0bf994e183000000004a493046022100a166121a61b4eeb19d8f922b978ff6ab58ead8a5a5552bf9be73dc9c156873ea02210092ad9bc43ee647da4f6652c320800debcf08ec20a094a0aaf085f63ecb37a17201ffffffff010000000000000000016a00000000", "P2SH"],
+
+["Hashed data starts at the CODESEPARATOR"],
+[[["326882a7f22b5191f1a0cc9962ca4b878cd969cf3b3a70887aece4d801a0ba5e", 0, "0x21 0x038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041 CODESEPARATOR CHECKSIG"]],
+"01000000015ebaa001d8e4ec7a88703a3bcf69d98c874bca6299cca0f191512bf2a7826832000000004948304502203bf754d1c6732fbf87c5dcd81258aefd30f2060d7bd8ac4a5696f7927091dad1022100f5bcb726c4cf5ed0ed34cc13dadeedf628ae1045b7cb34421bc60b89f4cecae701ffffffff010000000000000000016a00000000", "P2SH"],
+
+["But only if execution has reached it"],
+[[["a955032f4d6b0c9bfe8cad8f00a8933790b9c1dc28c82e0f48e75b35da0e4944", 0, "0x21 0x038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041 CHECKSIGVERIFY CODESEPARATOR 0x21 0x038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041 CHECKSIGVERIFY CODESEPARATOR 1"]],
+"010000000144490eda355be7480f2ec828dcc1b9903793a8008fad8cfe9b0c6b4d2f0355a900000000924830450221009c0a27f886a1d8cb87f6f595fbc3163d28f7a81ec3c4b252ee7f3ac77fd13ffa02203caa8dfa09713c8c4d7ef575c75ed97812072405d932bd11e6a1593a98b679370148304502201e3861ef39a526406bad1e20ecad06be7375ad40ddb582c9be42d26c3a0d7b240221009d0a3985e96522e59635d19cc4448547477396ce0ef17a58e7d74c3ef464292301ffffffff010000000000000000016a00000000", "P2SH"],
+
+["CHECKSIG is legal in scriptSigs"],
+[[["ccf7f4053a02e653c36ac75c891b7496d0dc5ce5214f6c913d9cf8f1329ebee0", 0, "DUP HASH160 0x14 0xee5a6aa40facefb2655ac23c0c28c57c65c41f9b EQUALVERIFY CHECKSIG"]],
+"0100000001e0be9e32f1f89c3d916c4f21e55cdcd096741b895cc76ac353e6023a05f4f7cc00000000d86149304602210086e5f736a2c3622ebb62bd9d93d8e5d76508b98be922b97160edc3dcca6d8c47022100b23c312ac232a4473f19d2aeb95ab7bdf2b65518911a0d72d50e38b5dd31dc820121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ac4730440220508fa761865c8abd81244a168392876ee1d94e8ed83897066b5e2df2400dad24022043f5ee7538e87e9c6aef7ef55133d3e51da7cc522830a9c4d736977a76ef755c0121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ffffffff010000000000000000016a00000000", "P2SH"],
+
+["Same semantics for OP_CODESEPARATOR"],
+[[["10c9f0effe83e97f80f067de2b11c6a00c3088a4bce42c5ae761519af9306f3c", 1, "DUP HASH160 0x14 0xee5a6aa40facefb2655ac23c0c28c57c65c41f9b EQUALVERIFY CHECKSIG"]],
+"01000000013c6f30f99a5161e75a2ce4bca488300ca0c6112bde67f0807fe983feeff0c91001000000e608646561646265656675ab61493046022100ce18d384221a731c993939015e3d1bcebafb16e8c0b5b5d14097ec8177ae6f28022100bcab227af90bab33c3fe0a9abfee03ba976ee25dc6ce542526e9b2e56e14b7f10121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ac493046022100c3b93edcc0fd6250eb32f2dd8a0bba1754b0f6c3be8ed4100ed582f3db73eba2022100bf75b5bd2eff4d6bf2bda2e34a40fcc07d4aa3cf862ceaa77b47b81eff829f9a01ab21038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ffffffff010000000000000000016a00000000", "P2SH"],
+
+["Signatures are removed from the script they are in by FindAndDelete() in the CHECKSIG code; even multiple instances of one signature can be removed."],
+[[["6056ebd549003b10cbbd915cea0d82209fe40b8617104be917a26fa92cbe3d6f", 0, "DUP HASH160 0x14 0xee5a6aa40facefb2655ac23c0c28c57c65c41f9b EQUALVERIFY CHECKSIG"]],
+"01000000016f3dbe2ca96fa217e94b1017860be49f20820dea5c91bdcb103b0049d5eb566000000000fd1d0147304402203989ac8f9ad36b5d0919d97fa0a7f70c5272abee3b14477dc646288a8b976df5022027d19da84a066af9053ad3d1d7459d171b7e3a80bc6c4ef7a330677a6be548140147304402203989ac8f9ad36b5d0919d97fa0a7f70c5272abee3b14477dc646288a8b976df5022027d19da84a066af9053ad3d1d7459d171b7e3a80bc6c4ef7a330677a6be548140121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ac47304402203757e937ba807e4a5da8534c17f9d121176056406a6465054bdd260457515c1a02200f02eccf1bec0f3a0d65df37889143c2e88ab7acec61a7b6f5aa264139141a2b0121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ffffffff010000000000000000016a00000000", "P2SH"],
+
+["That also includes ahead of the opcode being executed."],
+[[["5a6b0021a6042a686b6b94abc36b387bef9109847774e8b1e51eb8cc55c53921", 1, "DUP HASH160 0x14 0xee5a6aa40facefb2655ac23c0c28c57c65c41f9b EQUALVERIFY CHECKSIG"]],
+"01000000012139c555ccb81ee5b1e87477840991ef7b386bc3ab946b6b682a04a621006b5a01000000fdb40148304502201723e692e5f409a7151db386291b63524c5eb2030df652b1f53022fd8207349f022100b90d9bbf2f3366ce176e5e780a00433da67d9e5c79312c6388312a296a5800390148304502201723e692e5f409a7151db386291b63524c5eb2030df652b1f53022fd8207349f022100b90d9bbf2f3366ce176e5e780a00433da67d9e5c79312c6388312a296a5800390121038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f2204148304502201723e692e5f409a7151db386291b63524c5eb2030df652b1f53022fd8207349f022100b90d9bbf2f3366ce176e5e780a00433da67d9e5c79312c6388312a296a5800390175ac4830450220646b72c35beeec51f4d5bc1cbae01863825750d7f490864af354e6ea4f625e9c022100f04b98432df3a9641719dbced53393022e7249fb59db993af1118539830aab870148304502201723e692e5f409a7151db386291b63524c5eb2030df652b1f53022fd8207349f022100b90d9bbf2f3366ce176e5e780a00433da67d9e5c79312c6388312a296a580039017521038479a0fa998cd35259a2ef0a7a5c68662c1474f88ccb6d08a7677bbec7f22041ffffffff010000000000000000016a00000000", "P2SH"],
+
+["Finally CHECKMULTISIG removes all signatures prior to hashing the script containing those signatures. In conjunction with the SIGHASH_SINGLE bug this lets us test whether or not FindAndDelete() is actually present in scriptPubKey/redeemScript evaluation by including a signature of the digest 0x01 We can compute in advance for our pubkey, embed it it in the scriptPubKey, and then also using a normal SIGHASH_ALL signature. If FindAndDelete() wasn't run, the 'bugged' signature would still be in the hashed script, and the normal signature would fail."],
+
+["Here's an example on mainnet within a P2SH redeemScript. Remarkably it's a standard transaction in <0.9"],
+[[["b5b598de91787439afd5938116654e0b16b7a0d0f82742ba37564219c5afcbf9", 0, "DUP HASH160 0x14 0xf6f365c40f0739b61de827a44751e5e99032ed8f EQUALVERIFY CHECKSIG"],
+  ["ab9805c6d57d7070d9a42c5176e47bb705023e6b67249fb6760880548298e742", 0, "HASH160 0x14 0xd8dacdadb7462ae15cd906f1878706d0da8660e6 EQUAL"]],
+"0100000002f9cbafc519425637ba4227f8d0a0b7160b4e65168193d5af39747891de98b5b5000000006b4830450221008dd619c563e527c47d9bd53534a770b102e40faa87f61433580e04e271ef2f960220029886434e18122b53d5decd25f1f4acb2480659fea20aabd856987ba3c3907e0121022b78b756e2258af13779c1a1f37ea6800259716ca4b7f0b87610e0bf3ab52a01ffffffff42e7988254800876b69f24676b3e0205b77be476512ca4d970707dd5c60598ab00000000fd260100483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a53034930460221008431bdfa72bc67f9d41fe72e94c88fb8f359ffa30b33c72c121c5a877d922e1002210089ef5fc22dd8bfc6bf9ffdb01a9862d27687d424d1fefbab9e9c7176844a187a014c9052483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303210378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71210378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c7153aeffffffff01a08601000000000017a914d8dacdadb7462ae15cd906f1878706d0da8660e68700000000", "P2SH"],
+
+["Same idea, but with bare CHECKMULTISIG"],
+[[["ceafe58e0f6e7d67c0409fbbf673c84c166e3c5d3c24af58f7175b18df3bb3db", 0, "DUP HASH160 0x14 0xf6f365c40f0739b61de827a44751e5e99032ed8f EQUALVERIFY CHECKSIG"],
+  ["ceafe58e0f6e7d67c0409fbbf673c84c166e3c5d3c24af58f7175b18df3bb3db", 1, "2 0x48 0x3045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303 0x21 0x0378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71 0x21 0x0378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71 3 CHECKMULTISIG"]],
+"0100000002dbb33bdf185b17f758af243c5d3c6e164cc873f6bb9f40c0677d6e0f8ee5afce000000006b4830450221009627444320dc5ef8d7f68f35010b4c050a6ed0d96b67a84db99fda9c9de58b1e02203e4b4aaa019e012e65d69b487fdf8719df72f488fa91506a80c49a33929f1fd50121022b78b756e2258af13779c1a1f37ea6800259716ca4b7f0b87610e0bf3ab52a01ffffffffdbb33bdf185b17f758af243c5d3c6e164cc873f6bb9f40c0677d6e0f8ee5afce010000009300483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303483045022015bd0139bcccf990a6af6ec5c1c52ed8222e03a0d51c334df139968525d2fcd20221009f9efe325476eb64c3958e4713e9eefe49bf1d820ed58d2112721b134e2a1a5303ffffffff01a0860100000000001976a9149bc0bbdd3024da4d0c38ed1aecf5c68dd1d3fa1288ac00000000", "P2SH"],
+
+
 ["Make diffs cleaner by leaving a comment here without comma at the end"]
 ]

From cd01a5e18507c09eb6bbf159418e29c28fd3cadb Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 12 May 2014 12:24:22 +0200
Subject: [PATCH 0049/1819] Enable paranoid corruption checks in LevelDB >=
 1.16

---
 src/leveldbwrapper.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp
index 5b4a9c147b7e..9e849696a848 100644
--- a/src/leveldbwrapper.cpp
+++ b/src/leveldbwrapper.cpp
@@ -32,6 +32,11 @@ static leveldb::Options GetOptions(size_t nCacheSize) {
     options.filter_policy = leveldb::NewBloomFilterPolicy(10);
     options.compression = leveldb::kNoCompression;
     options.max_open_files = 64;
+    if (leveldb::kMajorVersion > 1 || (leveldb::kMajorVersion == 1 && leveldb::kMinorVersion >= 16)) {
+        // LevelDB versions before 1.16 consider short writes to be corruption. Only trigger error
+        // on corruption in later versions.
+        options.paranoid_checks = true;
+    }
     return options;
 }
 

From 8c93bf4c2857cdc01f0e5efca2becef08d2c5f1e Mon Sep 17 00:00:00 2001
From: Ashley Holman <dscvlt@gmail.com>
Date: Sun, 11 May 2014 07:05:04 -0500
Subject: [PATCH 0050/1819] LoadBlockIndexDB(): Require block db reindex if any
 blk*.dat files are missing.

---
 src/main.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index f90f0380161c..4b0e3af64981 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2941,6 +2941,24 @@ bool static LoadBlockIndexDB()
     if (pblocktree->ReadBlockFileInfo(nLastBlockFile, infoLastBlockFile))
         LogPrintf("LoadBlockIndexDB(): last block file info: %s\n", infoLastBlockFile.ToString());
 
+    // Check presence of blk files
+    LogPrintf("Checking all blk files are present...\n");
+    set<int> setBlkDataFiles;
+    BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex)
+    {
+        CBlockIndex* pindex = item.second;
+        if (pindex->nStatus & BLOCK_HAVE_DATA) {
+            setBlkDataFiles.insert(pindex->nFile);
+        }
+    }
+    for (std::set<int>::iterator it = setBlkDataFiles.begin(); it != setBlkDataFiles.end(); it++)
+    {
+        CDiskBlockPos pos(*it, 0);
+        if (!CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION)) {
+            return false;
+        }
+    }
+
     // Check whether we need to continue reindexing
     bool fReindexing = false;
     pblocktree->ReadReindexing(fReindexing);

From f25e3adf7d158283ef4bc1dd61df940c383dfebe Mon Sep 17 00:00:00 2001
From: Federico Bond <federicobond@gmail.com>
Date: Tue, 13 May 2014 01:39:42 -0300
Subject: [PATCH 0051/1819] Fix build in OS X 10.9

---
 src/test/bignum.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/bignum.h b/src/test/bignum.h
index b57800f37252..a75f5250fa89 100644
--- a/src/test/bignum.h
+++ b/src/test/bignum.h
@@ -10,6 +10,7 @@
 #include <limits>
 #include <stdexcept>
 #include <stdint.h>
+#include <string>
 #include <vector>
 
 #include <openssl/bn.h>

From 795b921dd22ec133a105404fe1b79c08a021768f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 13 May 2014 07:06:37 +0200
Subject: [PATCH 0052/1819] qt: periodic language update

Pull updated translations from Transifex.

Add mn (Mongolian) language.

Do not update English translation for now as we want to keep
compatibility with 0.9.
---
 src/qt/Makefile.am                   |    1 +
 src/qt/bitcoin.qrc                   |    1 +
 src/qt/locale/bitcoin_ach.ts         |   12 +-
 src/qt/locale/bitcoin_af_ZA.ts       |   12 +-
 src/qt/locale/bitcoin_ar.ts          |   12 +-
 src/qt/locale/bitcoin_be_BY.ts       |   12 +-
 src/qt/locale/bitcoin_bg.ts          |   12 +-
 src/qt/locale/bitcoin_bs.ts          |   12 +-
 src/qt/locale/bitcoin_ca.ts          |   12 +-
 src/qt/locale/bitcoin_ca@valencia.ts |   12 +-
 src/qt/locale/bitcoin_ca_ES.ts       |   12 +-
 src/qt/locale/bitcoin_cmn.ts         |   12 +-
 src/qt/locale/bitcoin_cs.ts          |  130 +-
 src/qt/locale/bitcoin_cy.ts          |   12 +-
 src/qt/locale/bitcoin_da.ts          |   20 +-
 src/qt/locale/bitcoin_de.ts          |   12 +-
 src/qt/locale/bitcoin_el_GR.ts       |   12 +-
 src/qt/locale/bitcoin_eo.ts          |   12 +-
 src/qt/locale/bitcoin_es.ts          |   16 +-
 src/qt/locale/bitcoin_es_CL.ts       |   12 +-
 src/qt/locale/bitcoin_es_DO.ts       |   12 +-
 src/qt/locale/bitcoin_es_MX.ts       |   12 +-
 src/qt/locale/bitcoin_es_UY.ts       |   12 +-
 src/qt/locale/bitcoin_et.ts          |   12 +-
 src/qt/locale/bitcoin_eu_ES.ts       |   12 +-
 src/qt/locale/bitcoin_fa.ts          |   12 +-
 src/qt/locale/bitcoin_fa_IR.ts       |   12 +-
 src/qt/locale/bitcoin_fi.ts          |   14 +-
 src/qt/locale/bitcoin_fr.ts          |   14 +-
 src/qt/locale/bitcoin_fr_CA.ts       |   12 +-
 src/qt/locale/bitcoin_gl.ts          |   12 +-
 src/qt/locale/bitcoin_gu_IN.ts       |   12 +-
 src/qt/locale/bitcoin_he.ts          |   12 +-
 src/qt/locale/bitcoin_hi_IN.ts       |   12 +-
 src/qt/locale/bitcoin_hr.ts          |   22 +-
 src/qt/locale/bitcoin_hu.ts          |   12 +-
 src/qt/locale/bitcoin_id_ID.ts       |   12 +-
 src/qt/locale/bitcoin_it.ts          |   15 +-
 src/qt/locale/bitcoin_ja.ts          |  190 +-
 src/qt/locale/bitcoin_ka.ts          |   12 +-
 src/qt/locale/bitcoin_kk_KZ.ts       |   12 +-
 src/qt/locale/bitcoin_ko_KR.ts       |   12 +-
 src/qt/locale/bitcoin_ky.ts          |   12 +-
 src/qt/locale/bitcoin_la.ts          |   12 +-
 src/qt/locale/bitcoin_lt.ts          |   12 +-
 src/qt/locale/bitcoin_lv_LV.ts       |   12 +-
 src/qt/locale/bitcoin_mn.ts          | 3375 ++++++++++++++++++++++++++
 src/qt/locale/bitcoin_ms_MY.ts       |   12 +-
 src/qt/locale/bitcoin_nb.ts          |   14 +-
 src/qt/locale/bitcoin_nl.ts          |   16 +-
 src/qt/locale/bitcoin_pam.ts         |   12 +-
 src/qt/locale/bitcoin_pl.ts          |   38 +-
 src/qt/locale/bitcoin_pt_BR.ts       |   12 +-
 src/qt/locale/bitcoin_pt_PT.ts       |   12 +-
 src/qt/locale/bitcoin_ro_RO.ts       |   12 +-
 src/qt/locale/bitcoin_ru.ts          |   14 +-
 src/qt/locale/bitcoin_sah.ts         |   12 +-
 src/qt/locale/bitcoin_sk.ts          |  344 +--
 src/qt/locale/bitcoin_sl_SI.ts       |   12 +-
 src/qt/locale/bitcoin_sq.ts          |   12 +-
 src/qt/locale/bitcoin_sr.ts          |   12 +-
 src/qt/locale/bitcoin_sv.ts          |   14 +-
 src/qt/locale/bitcoin_th_TH.ts       |   12 +-
 src/qt/locale/bitcoin_tr.ts          |   12 +-
 src/qt/locale/bitcoin_uk.ts          |   12 +-
 src/qt/locale/bitcoin_ur_PK.ts       |   12 +-
 src/qt/locale/bitcoin_uz@Cyrl.ts     |   12 +-
 src/qt/locale/bitcoin_vi.ts          |   12 +-
 src/qt/locale/bitcoin_vi_VN.ts       |   12 +-
 src/qt/locale/bitcoin_zh_CN.ts       |   12 +-
 src/qt/locale/bitcoin_zh_HK.ts       |   12 +-
 src/qt/locale/bitcoin_zh_TW.ts       |   12 +-
 72 files changed, 4414 insertions(+), 484 deletions(-)
 create mode 100644 src/qt/locale/bitcoin_mn.ts

diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index 8ec1ae258391..648971bd8fa4 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -57,6 +57,7 @@ QT_TS = \
   locale/bitcoin_la.ts \
   locale/bitcoin_lt.ts \
   locale/bitcoin_lv_LV.ts \
+  locale/bitcoin_mn.ts \
   locale/bitcoin_ms_MY.ts \
   locale/bitcoin_nb.ts \
   locale/bitcoin_nl.ts \
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index 75078581cecb..e1c739b022cb 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -130,6 +130,7 @@
         <file alias="la">locale/bitcoin_la.qm</file>
         <file alias="lt">locale/bitcoin_lt.qm</file>
         <file alias="lv_LV">locale/bitcoin_lv_LV.qm</file>
+        <file alias="mn">locale/bitcoin_mn.qm</file>
         <file alias="ms_MY">locale/bitcoin_ms_MY.qm</file>
         <file alias="nb">locale/bitcoin_nb.qm</file>
         <file alias="nl">locale/bitcoin_nl.qm</file>
diff --git a/src/qt/locale/bitcoin_ach.ts b/src/qt/locale/bitcoin_ach.ts
index cfe916093b71..de5619bfc070 100644
--- a/src/qt/locale/bitcoin_ach.ts
+++ b/src/qt/locale/bitcoin_ach.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ach" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ach" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index a1f1abde6968..80e4de010f7f 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="af_ZA" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="af_ZA" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index daf09183c47c..32b0d4b0fc44 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1041,6 +1041,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1343,7 +1351,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index f7beb808d1fb..c384aa6d2deb 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="be_BY" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="be_BY" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1344,7 +1352,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 6b94dc897894..367e223784a3 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1043,6 +1043,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1345,7 +1353,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_bs.ts b/src/qt/locale/bitcoin_bs.ts
index 01c37b027855..2ec28af777a4 100644
--- a/src/qt/locale/bitcoin_bs.ts
+++ b/src/qt/locale/bitcoin_bs.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 592cb337d547..c225967caca9 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 053cc82ebb85..b36d6b7d670b 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca@valencia" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca@valencia" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index f01e48a43570..5bf7fbfba721 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_cmn.ts b/src/qt/locale/bitcoin_cmn.ts
index 402ce7cb106d..696cbedd0a18 100644
--- a/src/qt/locale/bitcoin_cmn.ts
+++ b/src/qt/locale/bitcoin_cmn.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cmn" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="cmn" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index f77e7f34db76..ba4d2def3543 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -333,7 +333,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Načíst &amp;URI...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -433,7 +433,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Požaduj platby (generuje QR kódy a bitcoin: URI)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -441,15 +441,15 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Ukaž seznam použitých odesílacích adres a jejich označení</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Ukaž seznam použitých přijímacích adres a jejich označení</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Načti bitcoin: URI nebo platební požadavek</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
@@ -457,7 +457,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Seznam argumentů Bitcoinu pro příkazovou řádku získáš v nápovědě Bitcoinu Core.</translation>
+        <translation>Seznam argumentů Bitcoinu pro příkazovou řádku získáš v nápovědě Bitcoinu Core</translation>
     </message>
     <message>
         <source>Bitcoin client</source>
@@ -497,7 +497,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n roků</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -579,7 +579,7 @@ Adresa: %4
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Počet:</translation>
     </message>
     <message>
         <source>Bytes:</source>
@@ -599,11 +599,11 @@ Adresa: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Malý výstup:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Čistá částka:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -611,15 +611,15 @@ Adresa: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(od)označit všechny</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>Zobrazit jako strom</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Vypsat jako seznam</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -663,15 +663,15 @@ Adresa: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Zamkni neutracené</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Odemkni k utracení</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj počet</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -679,7 +679,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj čistou částku</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -691,7 +691,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj malý výstup</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -699,47 +699,47 @@ Adresa: %4
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>nejvyšší</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>vyšší</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>vysoká</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>vyšší střední</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>střední</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>nižší střední</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>nízká</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>nižší</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>nejnižší</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 zamčeno)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>žádná</translation>
     </message>
     <message>
         <source>Dust</source>
@@ -747,11 +747,11 @@ Adresa: %4
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>ano</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>ne</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
@@ -759,11 +759,11 @@ Adresa: %4
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>To znamená, že je vyžadován poplatek alespoň %1 za kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Může se lišit o +/– 1 bajt na každý vstup.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
@@ -1047,6 +1047,14 @@ Adresa: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP adresa proxy (např. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1181,7 +1189,7 @@ Adresa: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>žádná</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1189,7 +1197,7 @@ Adresa: %4
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>K aktivaci změn je potřeba restartovat klienta.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
@@ -1291,7 +1299,7 @@ Adresa: %4
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>Zdrojová URL platebního požadavku není platná: %1</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
@@ -1303,7 +1311,7 @@ Adresa: %4
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>Neověřené platební požadavky k uživatelským platebním skriptům nejsou podporované.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1349,7 +1357,7 @@ Adresa: %4
         <translation>Chyba: Neplatná kombinace -regtest a -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation>Bitcoin Core ještě bezpečně neskončil...</translation>
     </message>
     <message>
@@ -1614,15 +1622,15 @@ Adresa: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj &amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj &amp;adresu</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Ulož Obrázek...</translation>
+        <translation>&amp;Ulož obrázek...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1630,7 +1638,7 @@ Adresa: %4
     </message>
     <message>
         <source>Payment information</source>
-        <translation type="unfinished"/>
+        <translation>Informace o platbě</translation>
     </message>
     <message>
         <source>URI</source>
@@ -1712,11 +1720,11 @@ Adresa: %4
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Nedostatek prostředků!</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Počet:</translation>
     </message>
     <message>
         <source>Bytes:</source>
@@ -1736,11 +1744,11 @@ Adresa: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Malý výstup:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Čistá částka:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1792,7 +1800,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj počet</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1804,7 +1812,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj čistou částku</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -1816,7 +1824,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopíruj malý výstup</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -1824,7 +1832,7 @@ Adresa: %4
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Celková částka %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
@@ -1876,11 +1884,11 @@ Adresa: %4
     </message>
     <message>
         <source>added as transaction fee</source>
-        <translation type="unfinished"/>
+        <translation>přidán jako transakční poplatek</translation>
     </message>
     <message>
         <source>Payment request expired</source>
-        <translation type="unfinished"/>
+        <translation>Platební požadavek vypršel</translation>
     </message>
     <message>
         <source>Invalid payment address %1</source>
@@ -1911,7 +1919,7 @@ Adresa: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Vyber již použitou adresu</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
@@ -1955,7 +1963,7 @@ Adresa: %4
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>Komu:</translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -1993,7 +2001,7 @@ Adresa: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Vyber již použitou adresu</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -2823,7 +2831,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <translation>Připojit se přes SOCKS proxy</translation>
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2831,7 +2839,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti připojení:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2839,7 +2847,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti ladění/testování:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
@@ -2851,7 +2859,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>Nenačítat peněženku a vypnout její RPC volání</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -3035,7 +3043,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti peněženky:</translation>
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index b7624f07f27a..d2f41739cb1a 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 3d89d2e5c555..442a86b7c044 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -96,11 +96,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>Afsendelsesadresser</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>Modtagelsesadresser</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
@@ -325,11 +325,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Afsendelsesadresser...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Modtagelsesadresser...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -1047,6 +1047,14 @@ Adresse: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Adresse: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 7f7e505e1de3..888b48c251f4 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Adresse: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-Adresse des Proxies (z.B. IPv4: 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>Externe URLs (z.B. ein Block-Explorer), die im Kontextmenü des Transaktionsverlaufs eingefügt werden. In der URL wird %s durch den Transaktionshash ersetzt. Bei Angabe mehrerer URLs müssen diese durch &quot;|&quot; voneinander getrennt werden.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Externe Transaktions-URLs</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Aktive Kommandozeilenoptionen, die obige Konfiguration überschreiben:</translation>
@@ -1348,7 +1356,7 @@ Adresse: %4</translation>
         <translation>Fehler: Ungültige Kombination von -regtest und -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation>Bitcoin Core wurde noch nicht sicher beendet...</translation>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index d13b974b8ce5..687947e3b9ce 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1048,6 +1048,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1350,7 +1358,7 @@ Address: %4
         <translation>Σφάλμα: Άκυρος συνδυασμός των -regtest και -testnet</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 7f5dc3de2f04..8c2869abac49 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adreso: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Adreso: %4
         <translation>Eraro: nevalida kunigo de -regtest kaj -testnet</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 0bd60be10156..8ca8360ef632 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1050,6 +1050,14 @@ Dirección: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (p. ej. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Opciones activas de consola de comandos que tienen preferencia sobre las opciones antes mencionadas:</translation>
@@ -1352,8 +1360,8 @@ Dirección: %4
         <translation>Error: Combinación no válida de -regtest y -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin core no se ha cerrado de forma segura todavía...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2971,7 +2979,7 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importando...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index b63743e5d649..758a190f758f 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1050,6 +1050,14 @@ Dirección: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1352,7 +1360,7 @@ Dirección: %4</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 6fca8310179e..6944c3157f0d 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_DO" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_DO" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1050,6 +1050,14 @@ Dirección: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (ej. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1352,7 +1360,7 @@ Dirección: %4
         <translation>Error: Combinación no válida de -regtest y -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index 6920f2300b4f..9a39551d6be4 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_MX" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_MX" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Activar las opciones de linea de comando que sobre escriben las siguientes opciones:</translation>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index d94ad1c93823..03ecce46c0a0 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_UY" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_UY" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 8affc8a5d2ec..e6c27bf21c65 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Aadress: %4⏎</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1348,7 +1356,7 @@ Aadress: %4⏎</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index afa4d6c54029..1fce25d6daaa 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 805c7bb856fe..0dfbafb81186 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1344,7 +1352,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 18a0dca22410..3b82ffa5e5d7 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa_IR" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa_IR" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1041,6 +1041,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1343,7 +1351,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 942dad5411c9..ece70f60759d 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Osoite: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP osoite proxille (esim. IPv4: 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>Ulkopuoliset URL-osoitteet (esim. block explorer,) jotka esiintyvät siirrot-välilehdellä valikossa. %s URL-osoitteessa korvataan siirtotunnuksella. Useampi URL-osoite on eroteltu pystyviivalla |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Aktiiviset komentorivivalinnat jotka ohittavat ylläolevat valinnat:</translation>
@@ -1349,8 +1357,8 @@ Osoite: %4</translation>
         <translation>Virhe: Virheellinen yhdistelmä -regtest ja -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ei vielä sulkeutunut turvallisesti...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core ei ole vielä sulkeutunut turvallisesti...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index e0d5bbdbcdfe..05089f0416ca 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adresse : %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adresse IP du mandataire (par ex. IPv4 : 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>URL de tiers (par ex. un explorateur de blocs) apparaissant dans l&apos;onglet des transactions comme éléments du menu contextuel. %s dans l&apos;URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URL de transaction d&apos;un tiers</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Options actives de ligne de commande qui annulent les options ci-dessus :</translation>
@@ -1349,8 +1357,8 @@ Adresse : %4
         <translation>Erreur : combinaison invalide de -regtest et de -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ne s’est pas arrêté correctement...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core ne s&apos;est pas encore arrêté en toute sécurité...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index 0df3eb3edd41..ff22c2fd1c69 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_CA" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_CA" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1043,6 +1043,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1345,7 +1353,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index a1ee3545bfc6..ecf1fa222220 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Dirección: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Dirección: %4
         <translation>Erro: combinación inválida de -regtest e -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_gu_IN.ts b/src/qt/locale/bitcoin_gu_IN.ts
index 66b341545e4d..ed4a9265e4bc 100644
--- a/src/qt/locale/bitcoin_gu_IN.ts
+++ b/src/qt/locale/bitcoin_gu_IN.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 73378535a75e..ae13df452435 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="he" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="he" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1348,7 +1356,7 @@ Address: %4
         <translation>שגיאה: שילוב בלתי חוקי של regtest- ו testnet-.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index d27e26b871ce..3ccac8899e85 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1344,7 +1352,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index b5f1595515e0..bd2b773d2fea 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hr" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="hr" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Adresa:%4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1196,7 +1204,7 @@ Adresa:%4
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>Priložena proxy adresa je nevažeća.</translation>
     </message>
 </context>
 <context>
@@ -1207,7 +1215,7 @@ Adresa:%4
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
+        <translation>Prikazani podatci mogu biti zastarjeli. Vaš novčanik se automatski sinkronizira s Bitcoin mrežom kada je veza uspostavljena, ali taj proces još nije završen.</translation>
     </message>
     <message>
         <source>Wallet</source>
@@ -1344,7 +1352,7 @@ Adresa:%4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
@@ -1483,7 +1491,7 @@ Adresa:%4
     </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 type="unfinished"/>
+        <translation>Kako bi navigirali kroz povijest koristite strelice gore i dolje. &lt;b&gt;Ctrl-L&lt;/b&gt; kako bi očistili ekran.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -2466,7 +2474,7 @@ Adresa:%4
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation type="unfinished"/>
+        <translation>Prikaži detalje transakcije</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
@@ -2622,7 +2630,7 @@ Adresa:%4
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation type="unfinished"/>
+        <translation>Odaberi vlastitu javnu adresu</translation>
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index de57490847d2..3d8d45a61dd4 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Cím: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Cím: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index bd92878fed78..c4dee5f92d4e 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="id_ID" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="id_ID" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Alamat: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Alamat IP proxy (cth. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>pilihan perintah-baris aktif menimpa atas pilihan-pilihan: </translation>
@@ -1349,7 +1357,7 @@ Alamat: %4
         <translation>Gagal: Gabungan -regtest dan -testnet salah</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index b9ef5e4d0b9f..cb9fed1ab932 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1048,6 +1048,15 @@ Indirizzo: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Indirizzo IP del proxy (es: IPv4: 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>URL di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell&apos;URL è sostituito dall&apos;hash della transazione.
+Più URL vengono separati da una barra verticale |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URL di transazione di terze parti</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Opzioni command-line attive che sostituiscono i settaggi sopra elencati:</translation>
@@ -1350,8 +1359,8 @@ Indirizzo: %4
         <translation>Errore: combinazione di -regtest e -testnet non valida.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core non è ancora stato chiuso in modo sicuro ...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core non si è ancora chiuso con sicurezza...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index c7e4fe609163..5edfc0746a18 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -7,7 +7,7 @@
     </message>
     <message>
         <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;ビットコインコア&lt;/b&gt; バージョン</translation>
     </message>
     <message>
         <source>
@@ -29,7 +29,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>ビットコインコアの開発者</translation>
     </message>
     <message>
         <source>(%1-bit)</source>
@@ -128,7 +128,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>エクスポート失敗</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1.</source>
@@ -273,7 +273,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>ノード</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -325,15 +325,15 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>送金先アドレス一覧 (&amp;S)...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>受け取り用アドレス一覧 (&amp;R)...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>URI を開く (&amp;U)...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -437,7 +437,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>ビットコインコアについて (&amp;A)</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -453,7 +453,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>コマンドラインオプション (&amp;C)</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -493,11 +493,11 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 と %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>%n 年</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -579,11 +579,11 @@ Address: %4
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>数量:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>バイト:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -591,11 +591,11 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>優先度:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>手数料:</translation>
     </message>
     <message>
         <source>Low Output:</source>
@@ -603,7 +603,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>手数料差引後:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -615,11 +615,11 @@ Address: %4
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>ツリーモード</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>リストモード</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -635,7 +635,7 @@ Address: %4
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>検証数</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -643,7 +643,7 @@ Address: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>優先度</translation>
     </message>
     <message>
         <source>Copy address</source>
@@ -671,23 +671,23 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>数量をコピーする</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>手数料をコピーする</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>手数料差引後の値をコピーする</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>バイト数をコピーする</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>優先度をコピーする</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -771,7 +771,7 @@ Address: %4
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <translation>優先度が「中」未満の場合には、このラベルは赤くなります。</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
@@ -978,11 +978,11 @@ Address: %4
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>URI を開く</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>URI またはファイルから支払いリクエストを開く</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -990,11 +990,11 @@ Address: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>支払いリクエストファイルを選択してください</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>開きたい支払いリクエストファイルを選択してください</translation>
     </message>
 </context>
 <context>
@@ -1025,11 +1025,11 @@ Address: %4
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>データベースキャッシュのサイズ (&amp;D)</translation>
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
@@ -1045,6 +1045,14 @@ Address: %4
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>プロキシのIPアドレス (例えば IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
         <translation type="unfinished"/>
     </message>
     <message>
@@ -1069,15 +1077,15 @@ Address: %4
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>ウォレット (&amp;A)</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>エクスポート</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>コインコントロール機能を有効化する (&amp;C)</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>
@@ -1350,7 +1358,7 @@ Address: %4
         <translation>エラー：　-regtestと-testnetは一緒にするのは無効です。</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
@@ -1461,11 +1469,11 @@ Address: %4
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>入力:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>出力:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1497,31 +1505,31 @@ Address: %4
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <translation>%1 GB</translation>
     </message>
     <message>
         <source>%1 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 m</translation>
     </message>
     <message>
         <source>%1 h</source>
-        <translation type="unfinished"/>
+        <translation>%1 h</translation>
     </message>
     <message>
         <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 h %2 m</translation>
     </message>
 </context>
 <context>
@@ -1536,7 +1544,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <translation>メッセージ (&amp;M):</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
@@ -1600,7 +1608,7 @@ Address: %4
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>メッセージをコピーする</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1615,11 +1623,11 @@ Address: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>URI をコピーする (&amp;U)</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>アドレスをコピーする (&amp;A)</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
@@ -1627,7 +1635,7 @@ Address: %4
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>%1 への支払いリクエストを行う</translation>
     </message>
     <message>
         <source>Payment information</source>
@@ -1635,7 +1643,7 @@ Address: %4
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1701,27 +1709,27 @@ Address: %4
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>コインコントロール機能</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>入力...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>自動選択</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>残高不足です！</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>数量:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>バイト:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -1729,11 +1737,11 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>優先度:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>手数料:</translation>
     </message>
     <message>
         <source>Low Output:</source>
@@ -1741,7 +1749,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>手数料差引後:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1793,7 +1801,7 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>数量をコピーする</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1801,19 +1809,19 @@ Address: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>手数料をコピーする</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>手数料差引後の値をコピーする</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>バイト数をコピーする</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>優先度をコピーする</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -1956,7 +1964,7 @@ Address: %4
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>支払先:</translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -2125,7 +2133,7 @@ Address: %4
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>ビットコインコアの開発者</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2136,7 +2144,7 @@ Address: %4
     <name>TrafficGraphWidget</name>
     <message>
         <source>KB/s</source>
-        <translation type="unfinished"/>
+        <translation>KB/s</translation>
     </message>
 </context>
 <context>
@@ -2333,11 +2341,11 @@ Address: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>オフライン</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>未検証</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
@@ -2476,19 +2484,19 @@ Address: %4
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>トランザクション履歴をエクスポートする</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>エクスポートに失敗しました</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>トランザクション履歴を %1 へ保存する際にエラーが発生しました。</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>エクスポートに成功しました</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
@@ -2652,7 +2660,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>ビットコインコアRPCクライアントのバージョン</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2791,11 +2799,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(デフォルト: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(デフォルト: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2823,7 +2831,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <translation>SOCKS プロキシ経由で接続する</translation>
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2840,7 +2848,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>デバッグ／テスト用オプション:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
@@ -2932,11 +2940,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <translation>送信するトランザクションの1kBあたりの手数料</translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>この値未満の (中継) 手数料はゼロであるとみなす (デフォルト:</translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2944,7 +2952,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>セーフモードを矯正する (デフォルト: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2956,7 +2964,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; が与えられなかった場合には、すべてのデバッグ情報が出力されます。</translation>
     </message>
     <message>
         <source>Importing...</source>
@@ -2980,7 +2988,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>RPC クライアントのオプション:</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3028,7 +3036,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>RPC サーバが開始するのを待つ</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
@@ -3040,7 +3048,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>警告: 非推奨の引数 -debugnet は無視されました。-debug=net を使用してください</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
@@ -3080,11 +3088,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>署名キャッシュのサイズを &lt;n&gt; エントリーに制限する (デフォルト: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>ブロックの採掘時にトランザクションの優先度と1kBあたりの手数料をログに残す (デフォルト: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3116,11 +3124,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>RPC SSL オプション: (SSLのセットアップ手順はビットコインWikiを参照してください)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>RPCサーバのオプション:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index fd14152b04cc..fda2e97037a4 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ka" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ka" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>პროქსის IP-მისამართი (მაგ.: IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>საკომანდო სტრიქონის აქტიური ოპციები, რომლებიც გადაფარავენ ზემოთნაჩვენებს:</translation>
@@ -1349,7 +1357,7 @@ Address: %4
         <translation>შეცდომა: -regtest-ისა და -testnet-ის დაუშვებელი კომბინაცია.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index e35055ebd1cd..b913ba9858f1 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="kk_KZ" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="kk_KZ" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index c1584600cfa7..f5d2dddbe405 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko_KR" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko_KR" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>프록시 아이피 주소(예. IPv4: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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index 375e72d35922..d0db034e86d0 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ky" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ky" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 89f4be820264..425519514a31 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Inscriptio: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1348,7 +1356,7 @@ Inscriptio: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index 103cd5f53d93..a9898adb2b32 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1045,6 +1045,14 @@ Adresas: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1347,7 +1355,7 @@ Adresas: %4</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index 0db0b77a4783..c17f65e125ec 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="lv_LV" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="lv_LV" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Adrese: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1344,7 +1352,7 @@ Adrese: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
new file mode 100644
index 000000000000..e765931b2cd0
--- /dev/null
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -0,0 +1,3375 @@
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="mn" version="2.1">
+<context>
+    <name>AboutDialog</name>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>
+This is experimental software.
+
+Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copyright</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>AddressBookPage</name>
+    <message>
+        <source>Double-click to edit address or label</source>
+        <translation>Хаяг эсвэл шошгыг ѳѳрчлѳхийн тулд хоёр удаа дар</translation>
+    </message>
+    <message>
+        <source>Create a new address</source>
+        <translation>Шинэ хаяг нээх</translation>
+    </message>
+    <message>
+        <source>&amp;New</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy the currently selected address to the system clipboard</source>
+        <translation>Одоогоор сонгогдсон байгаа хаягуудыг сануулах</translation>
+    </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>Хаягийг &amp;Хуулбарлах</translation>
+    </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Delete</source>
+        <translation>&amp;Устгах</translation>
+    </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy &amp;Label</source>
+        <translation>&amp;Шошгыг хуулбарлах</translation>
+    </message>
+    <message>
+        <source>&amp;Edit</source>
+        <translation>&amp;Ѳѳрчлѳх</translation>
+    </message>
+    <message>
+        <source>Export Address List</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Таслалаар тусгаарлагдсан хүснэгтэн файл (.csv)</translation>
+    </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>There was an error trying to save the address list to %1.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>AddressTableModel</name>
+    <message>
+        <source>Label</source>
+        <translation>Шошго</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Хаяг</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(шошго алга)</translation>
+    </message>
+</context>
+<context>
+    <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter passphrase</source>
+        <translation>Нууц үгийг оруул</translation>
+    </message>
+    <message>
+        <source>New passphrase</source>
+        <translation>Шинэ нууц үг</translation>
+    </message>
+    <message>
+        <source>Repeat new passphrase</source>
+        <translation>Шинэ нууц үгийг давтана уу</translation>
+    </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Түрүйвчийн шинэ нууц үгийг оруул. &lt;br/&gt;&lt;b&gt;Дор хаяж 10 дурын үсэг/тоо бүхий&lt;/b&gt; эсвэл &lt;b&gt;дор хаяж 8 дурын үгнээс бүрдсэн&lt;/b&gt; нууц үгийг ашиглана уу. </translation>
+    </message>
+    <message>
+        <source>Encrypt wallet</source>
+        <translation>Түрүйвчийг цоожлох</translation>
+    </message>
+    <message>
+        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+        <translation>Энэ үйлдэлийг гүйцэтгэхийн тулд та нууц үгээрээ түрүйвчийн цоожийг тайлах хэрэгтэй</translation>
+    </message>
+    <message>
+        <source>Unlock wallet</source>
+        <translation>Түрүйвчийн цоожийг тайлах</translation>
+    </message>
+    <message>
+        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+        <translation>Энэ үйлдэлийг гүйцэтгэхийн тулд та эхлээд түрүйвчийн нууц үгийг оруулж цоожийг тайлах шаардлагтай.</translation>
+    </message>
+    <message>
+        <source>Decrypt wallet</source>
+        <translation>Түрүйвчийн цоожийг устгах</translation>
+    </message>
+    <message>
+        <source>Change passphrase</source>
+        <translation>Нууц үгийг солих</translation>
+    </message>
+    <message>
+        <source>Enter the old and new passphrase to the wallet.</source>
+        <translation>Түрүйвчийн хуучин болоод шинэ нууц үгсийг оруулна уу</translation>
+    </message>
+    <message>
+        <source>Confirm wallet encryption</source>
+        <translation>Түрүйвчийн цоожийг баталгаажуулах</translation>
+    </message>
+    <message>
+        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Are you sure you wish to encrypt your wallet?</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: The Caps Lock key is on!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wallet encrypted</source>
+        <translation>Түрүйвч цоожлогдлоо</translation>
+    </message>
+    <message>
+        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+        <translation>Цоожлолтын процесыг дуусгахын тулд Биткойн одоо хаагдана. Ѳѳрийн түрүйвчийг цоожлох нь таны биткойнуудыг компьютерийн вирус хулгайлахаас бүрэн сэргийлж чадахгүй гэдгийг санаарай.</translation>
+    </message>
+    <message>
+        <source>Wallet encryption failed</source>
+        <translation>Түрүйвчийн цоожлол амжилттай болсонгүй</translation>
+    </message>
+    <message>
+        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+        <translation>Түрүйвчийн цоожлол дотоод алдаанаас үүдэн амжилттай болсонгүй. Түрүйвч цоожлогдоогүй байна.</translation>
+    </message>
+    <message>
+        <source>The supplied passphrases do not match.</source>
+        <translation>Таны оруулсан нууц үг таарсангүй</translation>
+    </message>
+    <message>
+        <source>Wallet unlock failed</source>
+        <translation>Түрүйвчийн цоож тайлагдсангүй</translation>
+    </message>
+    <message>
+        <source>The passphrase entered for the wallet decryption was incorrect.</source>
+        <translation>Таны оруулсан түрүйвчийн цоожийг тайлах нууц үг буруу байна</translation>
+    </message>
+    <message>
+        <source>Wallet decryption failed</source>
+        <translation>Түрүйвчийн цоож амжилттай устгагдсангүй</translation>
+    </message>
+    <message>
+        <source>Wallet passphrase was successfully changed.</source>
+        <translation>Түрүйвчийн нууц үг амжилттай ѳѳр</translation>
+    </message>
+</context>
+<context>
+    <name>BitcoinGUI</name>
+    <message>
+        <source>Sign &amp;message...</source>
+        <translation>&amp;Зурвас хавсаргах...</translation>
+    </message>
+    <message>
+        <source>Synchronizing with network...</source>
+        <translation>Сүлжээтэй тааруулж байна...</translation>
+    </message>
+    <message>
+        <source>&amp;Overview</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Node</source>
+        <translation>Нод</translation>
+    </message>
+    <message>
+        <source>Show general overview of wallet</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Transactions</source>
+        <translation>Гүйлгээнүүд</translation>
+    </message>
+    <message>
+        <source>Browse transaction history</source>
+        <translation>Гүйлгээнүүдийн түүхийг харах</translation>
+    </message>
+    <message>
+        <source>E&amp;xit</source>
+        <translation>Гарах</translation>
+    </message>
+    <message>
+        <source>Quit application</source>
+        <translation>Програмаас Гарах</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin</source>
+        <translation>Биткойны мэдээллийг харуулах</translation>
+    </message>
+    <message>
+        <source>About &amp;Qt</source>
+        <translation>&amp;Клиентийн тухай</translation>
+    </message>
+    <message>
+        <source>Show information about Qt</source>
+        <translation>Клиентийн тухай мэдээллийг харуул</translation>
+    </message>
+    <message>
+        <source>&amp;Options...</source>
+        <translation>&amp;Сонголтууд...</translation>
+    </message>
+    <message>
+        <source>&amp;Encrypt Wallet...</source>
+        <translation>&amp;Түрүйвчийг цоожлох...</translation>
+    </message>
+    <message>
+        <source>&amp;Backup Wallet...</source>
+        <translation>&amp;Түрүйвчийг Жоорлох...</translation>
+    </message>
+    <message>
+        <source>&amp;Change Passphrase...</source>
+        <translation>&amp;Нууц Үгийг Солих...</translation>
+    </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Importing blocks from disk...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Reindexing blocks on disk...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Send coins to a Bitcoin address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Modify configuration options for Bitcoin</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Backup wallet to another location</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Түрүйвчийг цоожлох нууц үгийг солих</translation>
+    </message>
+    <message>
+        <source>&amp;Debug window</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Open debugging and diagnostic console</source>
+        <translation>Оношилгоо ба засварын консолыг онгойлго</translation>
+    </message>
+    <message>
+        <source>&amp;Verify message...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Биткойн</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Түрүйвч</translation>
+    </message>
+    <message>
+        <source>&amp;Send</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>&amp;Харуул / Нуу</translation>
+    </message>
+    <message>
+        <source>Show or hide the main Window</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
+    </message>
+    <message>
+        <source>&amp;Settings</source>
+        <translation>&amp;Тохиргоо</translation>
+    </message>
+    <message>
+        <source>&amp;Help</source>
+        <translation>&amp;Тусламж</translation>
+    </message>
+    <message>
+        <source>Tabs toolbar</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>[testnet]</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Command-line options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin client</source>
+        <translation>Биткойн клиент</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n active connection(s) to Bitcoin network</source>
+        <translation><numerusform>Биткойны сүлжээрүү %n идэвхитэй холболт байна </numerusform><numerusform>Биткойны сүлжээрүү %n идэвхитэй холболтууд байна </numerusform></translation>
+    </message>
+    <message>
+        <source>No block source available...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Processed %1 blocks of transaction history.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n цаг</numerusform><numerusform>%n цаг</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n ѳдѳр</numerusform><numerusform>%n ѳдрүүд</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation type="unfinished"/>
+    </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>%1 behind</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Last received block was generated %1 ago.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transactions after this will not yet be visible.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Алдаа</translation>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Up to date</source>
+        <translation>Шинэчлэгдсэн</translation>
+    </message>
+    <message>
+        <source>Catching up...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sent transaction</source>
+        <translation>Гадагшаа гүйлгээ</translation>
+    </message>
+    <message>
+        <source>Incoming transaction</source>
+        <translation>Дотогшоо гүйлгээ</translation>
+    </message>
+    <message>
+        <source>Date: %1
+Amount: %2
+Type: %3
+Address: %4
+</source>
+        <translation>Огноо: %1
+
+Хэмжээ: %2 
+
+Тѳрѳл: %3 
+
+Хаяг: %4
+</translation>
+    </message>
+    <message>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>Түрүйвч &lt;b&gt;цоожтой&lt;/b&gt; ба одоогоор цоож &lt;b&gt;онгорхой&lt;/b&gt; байна</translation>
+    </message>
+    <message>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>Түрүйвч &lt;b&gt;цоожтой&lt;/b&gt; ба одоогоор цоож &lt;b&gt;хаалттай&lt;/b&gt; байна</translation>
+    </message>
+    <message>
+        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    <message>
+        <source>Network Alert</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Control Address Selection</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Quantity:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Хэмжээ:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Тѳлбѳр:</translation>
+    </message>
+    <message>
+        <source>Low Output:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(un)select all</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Хаяг</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Огноо</translation>
+    </message>
+    <message>
+        <source>Confirmations</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Баталгаажлаа</translation>
+    </message>
+    <message>
+        <source>Priority</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Хаягийг санах</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Шошгыг санах</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
+    </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Lock unspent</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unlock unspent</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy quantity</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy after fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy bytes</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy priority</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy low output</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy change</source>
+        <translation>Ѳѳрчлѳлтийг санах</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>high</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>low</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>none</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Dust</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>no</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transactions with higher priority are more likely to get included into a block.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This means a fee of at least %1 is required.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This label turns red, if the change is smaller than %1.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(шошгогүй)</translation>
+    </message>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(change)</source>
+        <translation>(ѳѳрчлѳх)</translation>
+    </message>
+</context>
+<context>
+    <name>EditAddressDialog</name>
+    <message>
+        <source>Edit Address</source>
+        <translation>Хаягийг ѳѳрчлѳх</translation>
+    </message>
+    <message>
+        <source>&amp;Label</source>
+        <translation>&amp;Шошго</translation>
+    </message>
+    <message>
+        <source>The label associated with this address list entry</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Address</source>
+        <translation>&amp;Хаяг</translation>
+    </message>
+    <message>
+        <source>New receiving address</source>
+        <translation>Шинэ хүлээн авах хаяг</translation>
+    </message>
+    <message>
+        <source>New sending address</source>
+        <translation>Шинэ явуулах хаяг</translation>
+    </message>
+    <message>
+        <source>Edit receiving address</source>
+        <translation>Хүлээн авах хаягийг ѳѳрчлѳх</translation>
+    </message>
+    <message>
+        <source>Edit sending address</source>
+        <translation>Явуулах хаягийг ѳѳрчлѳх</translation>
+    </message>
+    <message>
+        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <translation>Таны оруулсан хаяг &quot;%1&quot; нь хаягийн бүртгэлд ѳмнѳ нь орсон байна</translation>
+    </message>
+    <message>
+        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Could not unlock wallet.</source>
+        <translation>Түрүйвчийн цоожийг тайлж чадсангүй</translation>
+    </message>
+    <message>
+        <source>New key generation failed.</source>
+        <translation>Шинэ түлхүүр амжилттай гарсангүй</translation>
+    </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    <message>
+        <source>A new data directory will be created.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>name</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Path already exists, and is not a directory.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot create data directory here.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core - Command-line options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>version</source>
+        <translation>хувилбар</translation>
+    </message>
+    <message>
+        <source>Usage:</source>
+        <translation>Хэрэглээ:</translation>
+    </message>
+    <message>
+        <source>command-line options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>UI options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Start minimized</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show splash screen on startup (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use the default data directory</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use a custom data directory:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Биткойн</translation>
+    </message>
+    <message>
+        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Алдаа</translation>
+    </message>
+    <message>
+        <source>GB of free space available</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(of %1GB needed)</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Open payment request from URI or file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>URI:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Select payment request file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>OptionsDialog</name>
+    <message>
+        <source>Options</source>
+        <translation>Сонголтууд</translation>
+    </message>
+    <message>
+        <source>&amp;Main</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Pay transaction &amp;fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Automatically start Bitcoin after logging in to the system.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Start Bitcoin on system login</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>MB</source>
+        <translation>МБ</translation>
+    </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>Биткойны сүлжээрүү SOCKS проксигоор холбогдох.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>проксигийн IP хаяг (жишээ нь: IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Active command-line options that override above options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Reset all client options to default.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Reset Options</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Network</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>W&amp;allet</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Expert</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Spend unconfirmed change</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Map port using &amp;UPnP</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Proxy &amp;IP:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Port:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Port of the proxy (e.g. 9050)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>SOCKS &amp;Version:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>SOCKS version of the proxy (e.g. 5)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Window</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show only a tray icon after minimizing the window.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Minimize to the tray instead of the taskbar</source>
+        <translation type="unfinished"/>
+    </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 Quit in the menu.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>M&amp;inimize on close</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Display</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>User Interface &amp;language:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Unit to show amounts in:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Display addresses in transaction list</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;OK</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Cancel</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>default</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>none</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Confirm options reset</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>Ѳѳрчлѳлтүүдийг идэвхижүүлхийн тулд клиентийг ахин эхлүүлэх шаардлагтай</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>Клиент унтрах гэж байна, яг унтраах уу?</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>Энэ ѳѳрчлѳлтийг оруулахын тулд кли1нт програмыг ахин эхлүүлэх шаардлагтай</translation>
+    </message>
+    <message>
+        <source>The supplied proxy address is invalid.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>OverviewPage</name>
+    <message>
+        <source>Form</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Түрүйвч</translation>
+    </message>
+    <message>
+        <source>Available:</source>
+        <translation>Хэрэглэж болох хэмжээ:</translation>
+    </message>
+    <message>
+        <source>Your current spendable balance</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Pending:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Immature:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Mined balance that has not yet matured</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Total:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Your current total balance</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Сүүлд хийгдсэн гүйлгээнүүд&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <source>out of sync</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>PaymentServer</name>
+    <message>
+        <source>URI handling</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request error</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Net manager warning</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Refund from %1</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error communicating with %1: %2</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request can not be parsed or processed!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bad response from server %1</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment acknowledged</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Network request error</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Биткойн</translation>
+    </message>
+    <message>
+        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: Invalid combination of -regtest and -testnet.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>QRImageWidget</name>
+    <message>
+        <source>&amp;Save Image...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Copy Image</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Save QR Code</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>PNG Image (*.png)</source>
+        <translation>PNG форматын зураг (*.png)</translation>
+    </message>
+</context>
+<context>
+    <name>RPCConsole</name>
+    <message>
+        <source>Client name</source>
+        <translation>Клиентийн нэр</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>Алга Байна</translation>
+    </message>
+    <message>
+        <source>Client version</source>
+        <translation>Клиентийн хувилбар</translation>
+    </message>
+    <message>
+        <source>&amp;Information</source>
+        <translation>&amp;Мэдээллэл</translation>
+    </message>
+    <message>
+        <source>Debug window</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>General</source>
+        <translation>Ерѳнхий</translation>
+    </message>
+    <message>
+        <source>Using OpenSSL version</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Startup time</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Network</source>
+        <translation>Сүлжээ</translation>
+    </message>
+    <message>
+        <source>Name</source>
+        <translation>Нэр</translation>
+    </message>
+    <message>
+        <source>Number of connections</source>
+        <translation>Холболтын тоо</translation>
+    </message>
+    <message>
+        <source>Block chain</source>
+        <translation>Блокийн цуваа</translation>
+    </message>
+    <message>
+        <source>Current number of blocks</source>
+        <translation>Одоогийн блокийн тоо</translation>
+    </message>
+    <message>
+        <source>Estimated total blocks</source>
+        <translation>Нийт блокийн барагцаа</translation>
+    </message>
+    <message>
+        <source>Last block time</source>
+        <translation>Сүүлийн блокийн хугацаа</translation>
+    </message>
+    <message>
+        <source>&amp;Open</source>
+        <translation>&amp;Нээх</translation>
+    </message>
+    <message>
+        <source>&amp;Console</source>
+        <translation>&amp;Консол</translation>
+    </message>
+    <message>
+        <source>&amp;Network Traffic</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Clear</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Totals</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>In:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Out:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Build date</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Debug log file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear console</source>
+        <translation>Консолыг цэвэрлэх</translation>
+    </message>
+    <message>
+        <source>Welcome to the Bitcoin RPC console.</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 B</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 KB</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 MB</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 GB</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1 h %2 m</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    <message>
+        <source>&amp;Amount:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Label:</source>
+        <translation>&amp;Шошго:</translation>
+    </message>
+    <message>
+        <source>&amp;Message:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>R&amp;euse an existing receiving address (not recommended)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Requested payments history</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Request payment</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show the selected request (does the same as double clicking an entry)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show</source>
+        <translation>Харуул</translation>
+    </message>
+    <message>
+        <source>Remove the selected entries from the list</source>
+        <translation>Сонгогдсон ѳгѳгдлүүдийг устгах</translation>
+    </message>
+    <message>
+        <source>Remove</source>
+        <translation>Устгах</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Шошгыг санах</translation>
+    </message>
+    <message>
+        <source>Copy message</source>
+        <translation>Зурвасыг санах</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
+    </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
+    <message>
+        <source>QR Code</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy &amp;URI</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy &amp;Address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Save Image...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Request payment to %1</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment information</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>URI</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Хаяг</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Шошго</translation>
+    </message>
+    <message>
+        <source>Message</source>
+        <translation>Зурвас</translation>
+    </message>
+    <message>
+        <source>Resulting URI too long, try to reduce the text for label / message.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error encoding URI into QR Code.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>RecentRequestsTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Огноо</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Шошго</translation>
+    </message>
+    <message>
+        <source>Message</source>
+        <translation>Зурвас</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(шошго алга)</translation>
+    </message>
+    <message>
+        <source>(no message)</source>
+        <translation>(зурвас алга)</translation>
+    </message>
+    <message>
+        <source>(no amount)</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>SendCoinsDialog</name>
+    <message>
+        <source>Send Coins</source>
+        <translation>Зоос явуулах</translation>
+    </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Inputs...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>automatically selected</source>
+        <translation>автоматаар сонгогдсон</translation>
+    </message>
+    <message>
+        <source>Insufficient funds!</source>
+        <translation>Таны дансны үлдэгдэл хүрэлцэхгүй байна!</translation>
+    </message>
+    <message>
+        <source>Quantity:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Хэмжээ:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Тѳлбѳр:</translation>
+    </message>
+    <message>
+        <source>Low Output:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Custom change address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Send to multiple recipients at once</source>
+        <translation>Нэгэн зэрэг олон хүлээн авагчруу явуулах</translation>
+    </message>
+    <message>
+        <source>Add &amp;Recipient</source>
+        <translation>&amp;Хүлээн авагчийг Нэмэх</translation>
+    </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
+    </message>
+    <message>
+        <source>Balance:</source>
+        <translation>Баланс:</translation>
+    </message>
+    <message>
+        <source>Confirm the send action</source>
+        <translation>Явуулах үйлдлийг баталгаажуулна уу</translation>
+    </message>
+    <message>
+        <source>S&amp;end</source>
+        <translation>Яв&amp;уул</translation>
+    </message>
+    <message>
+        <source>Confirm send coins</source>
+        <translation>Зоос явуулахыг баталгаажуулна уу</translation>
+    </message>
+    <message>
+        <source>%1 to %2</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy quantity</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
+    </message>
+    <message>
+        <source>Copy fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy after fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy bytes</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy priority</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy low output</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy change</source>
+        <translation>Ѳѳрчлѳлтийг санах</translation>
+    </message>
+    <message>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>Нийт дүн %1 (= %2)</translation>
+    </message>
+    <message>
+        <source>or</source>
+        <translation>эсвэл</translation>
+    </message>
+    <message>
+        <source>The recipient address is not valid, please recheck.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Тѳлѳх хэмжээ 0.-оос их байх ёстой</translation>
+    </message>
+    <message>
+        <source>The amount exceeds your balance.</source>
+        <translation>Энэ хэмжээ таны балансаас хэтэрсэн байна.</translation>
+    </message>
+    <message>
+        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+        <translation>Гүйлгээний тѳлбѳр %1-ийг тооцхоор нийт дүн нь таны балансаас хэтрээд байна.</translation>
+    </message>
+    <message>
+        <source>Duplicate address found, can only send to each address once per send operation.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction creation failed!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Анхаар:Буруу Биткойны хаяг байна</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(шошгогүй)</translation>
+    </message>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Are you sure you want to send?</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>added as transaction fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Payment request expired</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid payment address %1</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>SendCoinsEntry</name>
+    <message>
+        <source>A&amp;mount:</source>
+        <translation>Дүн:</translation>
+    </message>
+    <message>
+        <source>Pay &amp;To:</source>
+        <translation>Тѳлѳх &amp;хаяг:</translation>
+    </message>
+    <message>
+        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Энэ хаягийг ѳѳрийн бүртгэлдээ авахын тулд шошго оруул</translation>
+    </message>
+    <message>
+        <source>&amp;Label:</source>
+        <translation>&amp;Шошго:</translation>
+    </message>
+    <message>
+        <source>Choose previously used address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This is a normal payment.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
+    </message>
+    <message>
+        <source>Paste address from clipboard</source>
+        <translation>Копидсон хаягийг буулгах</translation>
+    </message>
+    <message>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
+    </message>
+    <message>
+        <source>Remove this entry</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message:</source>
+        <translation>Зурвас:</translation>
+    </message>
+    <message>
+        <source>This is a verified payment request.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter a label for this address to add it to the list of used addresses</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This is an unverified payment request.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Pay To:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Memo:</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>ShutdownWindow</name>
+    <message>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Биткойны цѳм хаагдаж байна...</translation>
+    </message>
+    <message>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>Энэ цонхыг хаагдтал компьютерээ бүү унтраагаарай</translation>
+    </message>
+</context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    <message>
+        <source>Signatures - Sign / Verify a Message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&amp;Sign Message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Choose previously used address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
+    </message>
+    <message>
+        <source>Paste address from clipboard</source>
+        <translation>Копидсон хаягийг буулгах</translation>
+    </message>
+    <message>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
+    </message>
+    <message>
+        <source>Enter the message you want to sign here</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Signature</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Copy the current signature to the system clipboard</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sign the message to prove you own this Bitcoin address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sign &amp;Message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Reset all sign message fields</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
+    </message>
+    <message>
+        <source>&amp;Verify Message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter the signing 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.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Verify &amp;Message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Reset all verify message fields</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The entered address is invalid.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Please check the address and try again.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The entered address does not refer to a key.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wallet unlock was cancelled.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Private key for the entered address is not available.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message signing failed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message signed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The signature could not be decoded.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Please check the signature and try again.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The signature did not match the message digest.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message verification failed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message verified.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>SplashScreen</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>[testnet]</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    <message>
+        <source>KB/s</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>TransactionDesc</name>
+    <message>
+        <source>Open until %1</source>
+        <translation>%1 хүртэл нээлттэй</translation>
+    </message>
+    <message>
+        <source>conflicted</source>
+        <translation>зѳрчилдлѳѳ</translation>
+    </message>
+    <message>
+        <source>%1/offline</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%1/unconfirmed</source>
+        <translation>%1/баталгаажаагүй</translation>
+    </message>
+    <message>
+        <source>%1 confirmations</source>
+        <translation>%1 баталгаажилтууд</translation>
+    </message>
+    <message>
+        <source>Status</source>
+        <translation type="unfinished"/>
+    </message>
+    <message numerus="yes">
+        <source>, broadcast through %n node(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Огноо</translation>
+    </message>
+    <message>
+        <source>Source</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Generated</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>From</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>To</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>own address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>label</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Credit</source>
+        <translation type="unfinished"/>
+    </message>
+    <message numerus="yes">
+        <source>matures in %n more block(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>not accepted</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Debit</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction fee</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Net amount</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Message</source>
+        <translation>Зурвас</translation>
+    </message>
+    <message>
+        <source>Comment</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction ID</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Merchant</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Debug information</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Inputs</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>true</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>false</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, хараахан амжилттай цацагдаагүй байна</translation>
+    </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>unknown</source>
+        <translation>үл мэдэгдэх</translation>
+    </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
+    <message>
+        <source>Transaction details</source>
+        <translation>Гүйлгээний мэдээллэл</translation>
+    </message>
+    <message>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Гүйлгээний дэлгэрэнгүйг энэ бичил цонх харуулж байна</translation>
+    </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Огноо</translation>
+    </message>
+    <message>
+        <source>Type</source>
+        <translation>Тѳрѳл</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Хаяг</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+    </message>
+    <message>
+        <source>Open until %1</source>
+        <translation>%1 хүртэл нээлттэй</translation>
+    </message>
+    <message>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Баталгаажлаа (%1 баталгаажилт)</translation>
+    </message>
+    <message>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Энэ блокийг аль ч нод хүлээн авсангүй ба ер нь зѳвшѳѳрѳгдѳхгүй байж мэднэ!</translation>
+    </message>
+    <message>
+        <source>Generated but not accepted</source>
+        <translation>Үүсгэгдсэн гэхдээ хүлээн авагдаагүй</translation>
+    </message>
+    <message>
+        <source>Offline</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unconfirmed</source>
+        <translation>Баталгаажаагүй</translation>
+    </message>
+    <message>
+        <source>Confirming (%1 of %2 recommended confirmations)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>Зѳрчилдлѳѳ</translation>
+    </message>
+    <message>
+        <source>Received with</source>
+        <translation>Хүлээн авсан хаяг</translation>
+    </message>
+    <message>
+        <source>Received from</source>
+        <translation>Хүлээн авагдсан хаяг</translation>
+    </message>
+    <message>
+        <source>Sent to</source>
+        <translation>Явуулсан хаяг</translation>
+    </message>
+    <message>
+        <source>Payment to yourself</source>
+        <translation>Ѳѳрлүүгээ хийсэн тѳлбѳр</translation>
+    </message>
+    <message>
+        <source>Mined</source>
+        <translation>Олборлогдсон</translation>
+    </message>
+    <message>
+        <source>(n/a)</source>
+        <translation>(алга байна)</translation>
+    </message>
+    <message>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Гүйлгээний байдал. Энд хулганыг авчирч баталгаажуулалтын тоог харна уу.</translation>
+    </message>
+    <message>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Гүйлгээг хүлээн авсан огноо ба цаг.</translation>
+    </message>
+    <message>
+        <source>Type of transaction.</source>
+        <translation>Гүйлгээний тѳрѳл</translation>
+    </message>
+    <message>
+        <source>Destination address of transaction.</source>
+        <translation>Гүйлгээг хүлээн авах хаяг</translation>
+    </message>
+    <message>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Балансаас авагдсан болон нэмэгдсэн хэмжээ.</translation>
+    </message>
+</context>
+<context>
+    <name>TransactionView</name>
+    <message>
+        <source>All</source>
+        <translation>Бүгд</translation>
+    </message>
+    <message>
+        <source>Today</source>
+        <translation>Ѳнѳѳдѳр</translation>
+    </message>
+    <message>
+        <source>This week</source>
+        <translation>Энэ долоо хоног</translation>
+    </message>
+    <message>
+        <source>This month</source>
+        <translation>Энэ сар</translation>
+    </message>
+    <message>
+        <source>Last month</source>
+        <translation>Ѳнгѳрсѳн сар</translation>
+    </message>
+    <message>
+        <source>This year</source>
+        <translation>Энэ жил</translation>
+    </message>
+    <message>
+        <source>Range...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Received with</source>
+        <translation>Хүлээн авсан хаяг</translation>
+    </message>
+    <message>
+        <source>Sent to</source>
+        <translation>Явуулсан хаяг</translation>
+    </message>
+    <message>
+        <source>To yourself</source>
+        <translation>Ѳѳрлүүгээ</translation>
+    </message>
+    <message>
+        <source>Mined</source>
+        <translation>Олборлогдсон</translation>
+    </message>
+    <message>
+        <source>Other</source>
+        <translation>Бусад</translation>
+    </message>
+    <message>
+        <source>Enter address or label to search</source>
+        <translation>Хайлт хийхийн тулд хаяг эсвэл шошгыг оруул</translation>
+    </message>
+    <message>
+        <source>Min amount</source>
+        <translation>Хамгийн бага хэмжээ</translation>
+    </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Хаягийг санах</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Шошгыг санах</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
+    </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Edit label</source>
+        <translation>Шошгыг ѳѳрчлѳх</translation>
+    </message>
+    <message>
+        <source>Show transaction details</source>
+        <translation>Гүйлгээний дэлгэрэнгүйг харуул</translation>
+    </message>
+    <message>
+        <source>Export Transaction History</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>There was an error trying to save the transaction history to %1.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Exporting Successful</source>
+        <translation type="unfinished"/>
+    </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>
+    <message>
+        <source>Confirmed</source>
+        <translation>Баталгаажлаа</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Огноо</translation>
+    </message>
+    <message>
+        <source>Type</source>
+        <translation>Тѳрѳл</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Шошго</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Хаяг</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
+    </message>
+    <message>
+        <source>ID</source>
+        <translation>Тодорхойлолт</translation>
+    </message>
+    <message>
+        <source>Range:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>to</source>
+        <translation>-рүү/руу</translation>
+    </message>
+</context>
+<context>
+    <name>WalletFrame</name>
+    <message>
+        <source>No wallet has been loaded.</source>
+        <translation>Ямар ч түрүйвч ачааллагдсангүй.</translation>
+    </message>
+</context>
+<context>
+    <name>WalletModel</name>
+    <message>
+        <source>Send Coins</source>
+        <translation>Зоос явуулах</translation>
+    </message>
+</context>
+<context>
+    <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Backup Wallet</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wallet Data (*.dat)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Backup Failed</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>There was an error trying to save the wallet data to %1.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>The wallet data was successfully saved to %1.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Backup Successful</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+<context>
+    <name>bitcoin-core</name>
+    <message>
+        <source>Usage:</source>
+        <translation>Хэрэглээ:</translation>
+    </message>
+    <message>
+        <source>List commands</source>
+        <translation>Үйлдлүүдийг жагсаах</translation>
+    </message>
+    <message>
+        <source>Get help for a command</source>
+        <translation>Үйлдэлд туслалцаа авах</translation>
+    </message>
+    <message>
+        <source>Options:</source>
+        <translation>Сонголтууд:</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Specify data directory</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>&lt;port&gt; дээрх холболтуудыг чагна (ѳгѳгдмѳл: 8333 эсвэл testnet: 18333)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Specify your own public address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core RPC client version</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use the test network</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>%s, you must set a rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
+        <translation type="unfinished"/>
+    </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>(default: wallet.dat)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Bitcoin Core Daemon</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Block creation options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Connect only to the specified node(s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Connect through SOCKS proxy</source>
+        <translation>SOCKS проксигоор холбогдох</translation>
+    </message>
+    <message>
+        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Connection options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Corrupted block database detected</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Debugging/Testing options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Do not load the wallet and disable wallet RPC calls</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Do you want to rebuild the block database now?</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error initializing block database</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error initializing wallet database environment %s!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error loading block database</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error opening block database</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: Disk space is low!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: Wallet locked, unable to create transaction!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error: system error: </source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to read block info</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to read block</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to sync block index</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write block index</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write block info</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write block</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write file info</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write to coin database</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write transaction index</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Failed to write undo data</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Fee per kB to add to transactions you send</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Force safe mode (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Generate coins (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Importing...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid -onion address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Not enough file descriptors available.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>RPC client options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: 4)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Specify wallet file (within data directory)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Usage (deprecated, use bitcoin-cli):</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Verifying blocks...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Verifying wallet...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wait for RPC server to start</source>
+        <translation>RPC серверийг эхэлтэл хүлээ</translation>
+    </message>
+    <message>
+        <source>Wallet %s resides outside data directory %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Wallet options:</source>
+        <translation>Түрүйвчийн сонголтууд:</translation>
+    </message>
+    <message>
+        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>You need to rebuild the database using -reindex to change -txindex</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Maintain a full transaction index (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Print block on startup, if found in block index</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>RPC server options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Send command to Bitcoin Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Show benchmark information (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Signing transaction failed</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (default: 5000)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Start Bitcoin Core Daemon</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>System error: </source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction amount too small</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction amounts must be positive</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Transaction too large</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: 0)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Username for JSON-RPC connections</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Warning: This version is obsolete, upgrade required!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>on startup</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>version</source>
+        <translation>хувилбар</translation>
+    </message>
+    <message>
+        <source>wallet.dat corrupt, salvage failed</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Password for JSON-RPC connections</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified IP address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Түрүйвчийг хамгийн сүүлийн үеийн форматруу шинэчлэх</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Rescan the block chain for missing wallet transactions</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Use OpenSSL (https) for JSON-RPC connections</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Server certificate file (default: server.cert)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Server private key (default: server.pem)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>This help message</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Loading addresses...</source>
+        <translation>Хаягуудыг ачааллаж байна...</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet corrupted</source>
+        <translation>wallet.dat-ыг ачааллахад алдаа гарлаа: Түрүйвч эвдэрсэн байна</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
+        <translation>wallet.dat-ыг ачааллахад алдаа гарлаа: Түрүйвч Биткойны шинэ хувилбарыг шаардаж байна</translation>
+    </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Error loading wallet.dat</source>
+        <translation>wallet.dat-ыг ачааллахад алдаа гарлаа</translation>
+    </message>
+    <message>
+        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <translation>Эдгээр прокси хаягнууд буруу байна: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Unknown -socks proxy version requested: %i</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Invalid amount</source>
+        <translation>Буруу хэмжээ</translation>
+    </message>
+    <message>
+        <source>Insufficient funds</source>
+        <translation>Таны дансны үлдэгдэл хүрэлцэхгүй байна</translation>
+    </message>
+    <message>
+        <source>Loading block index...</source>
+        <translation>Блокийн индексүүдийг ачааллаж байна...</translation>
+    </message>
+    <message>
+        <source>Add a node to connect to and attempt to keep the connection open</source>
+        <translation>Холболт хийхийн тулд мѳн холболтой онгорхой хадгалхын тулд шинэ нод нэм</translation>
+    </message>
+    <message>
+        <source>Loading wallet...</source>
+        <translation>Түрүйвчийг ачааллаж байна...</translation>
+    </message>
+    <message>
+        <source>Cannot downgrade wallet</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Cannot write default address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <source>Rescanning...</source>
+        <translation>Ахин уншиж байна...</translation>
+    </message>
+    <message>
+        <source>Done loading</source>
+        <translation>Ачааллаж дууслаа</translation>
+    </message>
+    <message>
+        <source>To use the %s option</source>
+        <translation>%s сонголтыг ашиглахын тулд</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Алдаа</translation>
+    </message>
+    <message>
+        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
+%s
+If the file does not exist, create it with owner-readable-only file permissions.</source>
+        <translation type="unfinished"/>
+    </message>
+</context>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index 9835a2e19f16..0f92a6d49fee 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ms_MY" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ms_MY" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 078bad7edc68..09ef29d871e1 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adresse: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-adressen til proxyen (f.eks. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Aktive kommandolinjevalg som overstyrer valgene ovenfor:</translation>
@@ -1349,8 +1357,8 @@ Adresse: %4
         <translation>Feil: Ugyldig kombinasjon av -regtest og -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core har annå ikke avsluttet på en sikker måte...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 0da46059b594..8cbbbdad7f19 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="nl" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="nl" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adres: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-adres van de proxy (bijv. IPv4: 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>Derde partijen URL&apos;s (bijvoorbeeld block explorer) dat in de transacties tab verschijnen als contextmenu elementen. %s in de URL is vervangen door transactie hash. Verscheidene URL&apos;s zijn gescheiden door een verticale streep |.  </translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Transactie-URLs van derde partijen</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Actieve commandoregelopties die bovenstaande opties overschrijven:</translation>
@@ -1349,8 +1357,8 @@ Adres: %4
         <translation>Fout: Ongeldige combinatie van -regtest en -testnet</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core is nog niet veilig uitgeschakeld...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2959,7 +2967,7 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importeren...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 4a5e0363a867..22f1b7ccc3cd 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pam" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pam" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1045,6 +1045,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1347,7 +1355,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index 06845bfc3b38..cbc08dd25d74 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adres: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adres IP serwera proxy (np. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1287,7 +1295,7 @@ Adres: %4
     </message>
     <message>
         <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Twoje aktywne proxy nie obsługuje SOCKS5, co jest wymagane dla żądania płatności przez proxy.</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
@@ -1349,8 +1357,8 @@ Adres: %4
         <translation>Błąd: Niepoprawna kombinacja -regtest i -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core jeszcze się nie wyłączył bezpiecznie…</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1555,7 +1563,7 @@ Adres: %4
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Użyj tego formularza do zażądania płatności. Wszystkie pola są &lt;b&gt;opcjonalne&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
@@ -2790,11 +2798,11 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(domyślnie: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(domyślnie: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2934,7 +2942,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Opłaty mniejsze niż to są uznawane za nieistniejące (przy przekazywaniu) (domyślnie:</translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2958,7 +2966,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importowanie…</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
@@ -3082,7 +3090,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Loguj priorytety transakcji i opłaty na kB podczas kopania bloków (domyślnie: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3106,7 +3114,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Wyświetlaj blok podczas uruchamiania, jeżeli znaleziono indeks bloków</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
@@ -3122,7 +3130,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Losowo ignoruje 1 z każdych &lt;n&gt; wiadomości sieciowych.</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
@@ -3130,7 +3138,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Uruchom wątek do okresowego zapisywania portfela (domyślnie: 1)</translation>
     </message>
     <message>
         <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3138,7 +3146,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Wyślij komendę do Bitcoin Core</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3218,7 +3226,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>podczas uruchamiania</translation>
     </message>
     <message>
         <source>version</source>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 94a87596ca98..ee1c2a7381d3 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Endereço: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço de IP do proxy (e.g. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Ativa as opções de linha de comando que sobrescreve as opções acima:</translation>
@@ -1348,7 +1356,7 @@ Endereço: %4</translation>
         <translation>Erro: Combinação inválida de-regtest e testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index d6dbbbf42aed..7a9595a6ddb7 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1046,6 +1046,14 @@ Endereço: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço IP do proxy (p.ex. IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Opções de linha de comandos ativas que se sobrepõem ás opções anteriores:</translation>
@@ -1348,7 +1356,7 @@ Endereço: %4</translation>
         <translation>Erro: Combinação inválida de -regtest e -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 0a310db98944..1d9d4cc9365b 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adresa: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Adresa: %4
         <translation>Eroare: combinație nevalidă de -regtest și -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index d9840a9c5e66..570c3a61e766 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-адрес прокси (например IPv4: 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>Сторонние URL (например, block explorer), которые отображаются на вкладке транзакций как пункты контекстного меню. %s в URL заменяется хэшем транзакции. URL отделяются друг от друга вертикальной чертой |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Сторонние URL транзакций.</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Активные опции командной строки, которые перекрывают вышеуказанные опции:</translation>
@@ -1349,8 +1357,8 @@ Address: %4
         <translation>Ошибка: неверная комбинация -regtest и -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core еще не готов к безопасному завершению...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core ещё не завершился безопасно...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts
index 5cdf9a93d74a..3bc3e65c6271 100644
--- a/src/qt/locale/bitcoin_sah.ts
+++ b/src/qt/locale/bitcoin_sah.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sah" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sah" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index b12462dbb2f0..d96e9d936678 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sk" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sk" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -63,7 +63,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Vymaž vybranú adresu zo zoznamu</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -79,11 +79,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Zvoľte adresu kam poslať coins</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Zvoľte adresu na ktorú prijať coins</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -99,11 +99,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Toto sú Vaše Bitcoin adresy pre posielanie platieb. Vždy skontrolujte množstvo a prijímaciu adresu pred poslaním coins.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Toto sú vaše Bitcoin adresy pre prijímanie platieb. Odporúča sa použiť novú prijímaciu adresu pre každú transakciu.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -127,7 +127,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Nastala chyba pri pokuse uložiť zoznam adries do %1.</translation>
     </message>
 </context>
 <context>
@@ -392,15 +392,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <translation>Zašifruj súkromné kľúče ktoré patria do vašej peňaženky</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <translation>Podpísať správu s vašou adresou Bitcoin aby ste preukázali že ju vlastníte</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>Overiť či správa bola podpísaná uvedenou Bitcoin adresou</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -428,7 +428,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Vyžiadať platbu (vygeneruje QR kód a bitcoin: URI)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -436,11 +436,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Zobraziť zoznam použitých adries odosielateľa a ich popisy</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Zobraziť zoznam použitých prijímacích adries a ich popisov</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
@@ -448,7 +448,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>Voľby príkazového riadku</translation>
+        <translation>Možnosti príkazového riadku</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -488,15 +488,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation> %1 a  %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%</numerusform><numerusform>%d)</numerusform><numerusform>%n rokov</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
-        <translation>%1 za</translation>
+        <translation>%1 pozadu</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
@@ -555,7 +555,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>Vyskytla sa neblahá chyba. Bitcoin nemôže daľej bezpečne pokračovať a vypne sa.</translation>
     </message>
 </context>
 <context>
@@ -569,7 +569,7 @@ Adresa: %4</translation>
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Coin Control výber adresy</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -593,11 +593,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Malá hodnota na výstupe:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Po poplatku:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -605,7 +605,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(ne)vybrať všetko</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -657,11 +657,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Uzamknúť neminuté</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Odomknúť neminuté</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -729,7 +729,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 zamknutých)</translation>
     </message>
     <message>
         <source>none</source>
@@ -777,7 +777,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <translation>Sumy pod 0.546 násobkom minimálneho poplatku pre prenos sú považované za prach.</translation>
     </message>
     <message>
         <source>This label turns red, if the change is smaller than %1.</source>
@@ -808,11 +808,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>Popis tejto položký v zozname adries je prázdny</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>Adresa spojená s týmto záznamom v adresári. Možno upravovať len pre odosielajúce adresy.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -863,7 +863,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Priečinok už existuje. Pridajte &quot;%1&quot; ak chcete vytvoriť nový priečinok tu.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
@@ -878,7 +878,7 @@ Adresa: %4</translation>
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Jadro Bitcoin - možnosti príkazového riadku</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
@@ -937,7 +937,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>Jadro Bitcoin stiahne zo siete a uloží kópiu Bitcoin blockchain. Aspoň %1GB dát bude uložených v tomto priečinku a časom porastie. Peňaženka bude tiež uložená v tomto priečinku.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -953,7 +953,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Predpísaný priečinok pre dáta &quot;%1&quot; nemôže byt vytvorený.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -976,7 +976,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Otvoriť požiadavku na zaplatenie z URI alebo súboru</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -984,11 +984,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Vyberte súbor s výzvou k platbe</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Vyberte ktorý súbor s výzvou k platbe otvoriť</translation>
     </message>
 </context>
 <context>
@@ -1003,7 +1003,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
+        <translation>Voliteľný transakčný poplatok za kB ktorý pomôže rýchlemu spracovaniu transakcie. Väčšina transakcií má 1 kB. Poplatok 0.01 je odporúčaný.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
@@ -1019,7 +1019,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>Veľkosť vyrovnávacej pamäti databázy</translation>
     </message>
     <message>
         <source>MB</source>
@@ -1031,15 +1031,23 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Pripojiť k Bitcoin sieti cez SOCKS proxy.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>Pripojiť sa cez SOCKS proxy (predvolené proxy)</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>IP adresy proxy (napr. IPv4: 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>URL tretích strán (napr. prehliadač blockchain) ktoré sa zobrazujú v záložke transakcií ako položky kontextového menu. %s v URL je nahradené hash-om transakcie. Viaceré URL sú oddelené zvislou čiarou |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URL transakcií s tretími stranami</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1063,15 +1071,15 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>Peňaženka</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Expert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Povoliť možnosti coin control</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>
@@ -1139,7 +1147,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
+        <translation>Tu sa dá nastaviť jazyk užívateľského rozhrania. Toto nastavenie bude účinné po reštartovaní Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
@@ -1147,11 +1155,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Zvoľte ako deliť bitcoin pri zobrazovaní pri platbách a užívateľskom rozhraní.</translation>
     </message>
     <message>
         <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
+        <translation>Či ukazovať Bitcoin adresy v zozname transakcií alebo nie.</translation>
     </message>
     <message>
         <source>&amp;Display addresses in transaction list</source>
@@ -1159,7 +1167,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Či zobrazovať možnosti &quot;Coin control&quot; alebo nie.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1179,19 +1187,19 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation type="unfinished"/>
+        <translation>Potvrdiť obnovenie možností</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Reštart klienta potrebný pre aktivovanie zmien.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>Klient bude vypnutý, chcete pokračovať?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Táto zmena by vyžadovala reštart klienta.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1206,7 +1214,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
+        <translation>Zobrazené informácie môžu byť neaktuápne. Vaša peňaženka sa automaticky synchronizuje so sieťou Bitcoin po nadviazaní spojenia ale tento proces ešte nieje ukončený.</translation>
     </message>
     <message>
         <source>Wallet</source>
@@ -1214,19 +1222,19 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Disponibilné:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Váš aktuálny disponibilný zostatok</translation>
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Čakajúce potvrdenie</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Suma transakcií ktoré ešte neboli potvrdené a ešte sa nepočítajú do disponibilného zostatku</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1234,7 +1242,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
+        <translation>Vytvorený zostatok ktorý ešte nedosiahol zrelosť</translation>
     </message>
     <message>
         <source>Total:</source>
@@ -1261,15 +1269,15 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
+        <translation>URI sa nedá rozložiť! To môže byť spôsobené neplatou Bitcoin adresou alebo zle upravenými vlastnosťami URI.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <translation>Požadovaná platba sumy  %1 je príliš malá (považovaná za prach).</translation>
     </message>
     <message>
         <source>Payment request error</source>
-        <translation type="unfinished"/>
+        <translation>Chyba pri vyžiadaní platby</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
@@ -1277,7 +1285,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Net manager warning</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie správcu siete</translation>
     </message>
     <message>
         <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
@@ -1297,15 +1305,15 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>Program nepodporuje neoverené platobné výzvy na vlastná skripty.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation type="unfinished"/>
+        <translation>Vrátenie z  %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
+        <translation>Chyba komunikácie s %1: %2 </translation>
     </message>
     <message>
         <source>Payment request can not be parsed or processed!</source>
@@ -1317,11 +1325,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
+        <translation>Platba potvrdená</translation>
     </message>
     <message>
         <source>Network request error</source>
-        <translation type="unfinished"/>
+        <translation>Chyba požiadavky siete</translation>
     </message>
 </context>
 <context>
@@ -1332,7 +1340,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Uvedený priečinok s dátami &quot;%1&quot; neexistuje.</translation>
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
@@ -1340,11 +1348,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Nesprávna kombinácia -regtest a -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Jadro Bitcoin sa ešte úspešne nevyplo ...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1478,15 +1486,15 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <translation>Vitajte v Bitcoin RPC konzole. Baník, pyčo!</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 type="unfinished"/>
+        <translation>Použi šipky hore a dolu pre navigáciu históriou a &lt;b&gt;Ctrl-L&lt;/b&gt; pre vyčistenie obrazovky.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
+        <translation>Napíš &lt;b&gt;help&lt;/b&gt; pre prehľad dostupných príkazov.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -1545,11 +1553,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Voliteľný popis ktorý sa pridá k tejto novej prijímajúcej adrese.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Použite tento formulár pre vyžiadanie platby. Všetky polia sú &lt;b&gt;voliteľné&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
@@ -1573,7 +1581,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Zobraz zvolenú požiadavku (urobí to isté ako dvoj-klik na záznam)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -1581,7 +1589,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Odstrániť zvolené záznamy zo zoznamu</translation>
     </message>
     <message>
         <source>Remove</source>
@@ -1694,7 +1702,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti &quot;Coin Control&quot;</translation>
     </message>
     <message>
         <source>Inputs...</source>
@@ -1730,11 +1738,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Malá hodnota na výstupe:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Po poplatku:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1854,7 +1862,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Nesprávna Bitcoin adresa</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1862,7 +1870,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Neznáma adresa pre výdavok</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1874,7 +1882,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Payment request expired</source>
-        <translation type="unfinished"/>
+        <translation>Vypršala platnosť požiadavky na platbu</translation>
     </message>
     <message>
         <source>Invalid payment address %1</source>
@@ -1933,7 +1941,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Toto je overená výzva k platbe.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
@@ -1945,7 +1953,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Toto je neoverená výzva k platbe.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -1953,7 +1961,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Poznámka:</translation>
     </message>
 </context>
 <context>
@@ -1964,14 +1972,14 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>Nevypínajte počítač kým toto okno nezmizne.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
+        <translation>Podpisy - Podpísať / Overiť správu</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
@@ -2011,7 +2019,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Kopírovať práve zvolenú adresu do systémového klipbordu</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
@@ -2023,7 +2031,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
+        <translation>Vynulovať všetky polia podpisu správy</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -2035,7 +2043,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
+        <translation>Vložte podpisovaciu adresu, správu (uistite sa, že kopírujete ukončenia riadkov, medzery, odrážky, atď. presne) a podpis pod to na overenie adresy. Buďte opatrní a nečítajte ako podpísané viac než je v samotnej podpísanej správe a môžete sa tak vyhnúť podvodu mitm útokom.</translation>
     </message>
     <message>
         <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2043,7 +2051,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Overím správy sa uistiť že bola podpísaná označenou Bitcoin adresou</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
@@ -2051,7 +2059,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
+        <translation>Obnoviť všetky polia v overiť správu</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2071,7 +2079,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
+        <translation>Vložená adresa nezodpovedá žiadnemu kľúcu.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
@@ -2079,7 +2087,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <translation>Súkromný kľúč pre vložená adresu nieje k dispozícii.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2099,7 +2107,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
+        <translation>Podpis sa nezhoduje so zhrnutím správy</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -2140,7 +2148,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>sporné</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -2160,7 +2168,7 @@ Adresa: %4</translation>
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>,</numerusform><numerusform>,</numerusform><numerusform>, vysielať cez %n nód</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2196,7 +2204,7 @@ Adresa: %4</translation>
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Dospeje o %n blokov</numerusform><numerusform>Dospeje o %n blokov</numerusform><numerusform>dospeje o %n blokov</numerusform></translation>
     </message>
     <message>
         <source>not accepted</source>
@@ -2302,7 +2310,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
+        <translation>Nezrelé (%1 potvrdení, bude k dispozícii po %2)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2326,19 +2334,19 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Offline</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Nepotvrdené</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation> Potvrdzuje sa ( %1 z  %2 odporúčaných potvrdení)</translation>
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>V rozpore</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2485,7 +2493,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>História transakciá bola úspešne uložená do %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2566,11 +2574,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Vyskytla sa chyba pri pokuse o uloženie dát peňaženky do %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Dáta peňaženky boli úspešne uložené do %1.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
@@ -2617,7 +2625,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
+        <translation>Pripojiť sa k nóde, získať adresy ďaľších počítačov v sieti a odpojit sa.</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2633,7 +2641,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Vyskytla sa chyba pri nastavovaní RPC portu %u pre počúvanie na IPv4: %s</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2645,7 +2653,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Verzia RPC klienta Jadra Bitcoin</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2657,7 +2665,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Prijať spojenia zvonku (predvolené: 1 ak žiadne -proxy alebo -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2679,11 +2687,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Vyskytla sa chyba pri nastavovaní RPC portu %u pre počúvanie na IPv6, vraciam sa späť ku IPv4: %s</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
+        <translation>Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
@@ -2691,7 +2699,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>Vstúpiť do regresného testovacieho módu, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené. Pre účely regresného testovania a vývoja aplikácie.</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
@@ -2711,7 +2719,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
+        <translation>Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID)</translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
@@ -2767,7 +2775,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: chyba pri čítaní wallet.dad! Všetky kľúče sú čitateľné ale transakčné dáta alebo záznamy v adresári môžu byť nesprávne.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
@@ -2775,11 +2783,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(predvolené: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(predvolené: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2787,7 +2795,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
+        <translation>Pokus zachrániť súkromné kľúče z poškodeného wallet.dat</translation>
     </message>
     <message>
         <source>Bitcoin Core Daemon</source>
@@ -2807,7 +2815,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <translation>Pripojiť cez SOCKS proxy</translation>
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2815,7 +2823,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti pripojenia:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2823,7 +2831,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti ladenia/testovania:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
@@ -2831,7 +2839,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <translation>Zisti vlastnú IP adresu (predvolené: 1 pri počúvaní/listening a žiadnej -externalip)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
@@ -2847,7 +2855,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <translation>Chyba spustenia databázového prostredia peňaženky %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2871,7 +2879,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <translation>Chyba počúvania na ktoromkoľvek porte. Použi -listen=0 ak toto chcete.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
@@ -2883,11 +2891,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhalo synchronizovanie zoznamu blokov</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhalo zapisovanie do zoznamu blokov</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
@@ -2907,11 +2915,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhal zápis zoznamu transakcií</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhalo zapisovanie </translation>
     </message>
     <message>
         <source>Fee per kB to add to transactions you send</source>
@@ -2923,7 +2931,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Nájsť počítače v bitcoin sieti použitím DNS vyhľadávania (predvolené: 1 okrem -connect)</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
@@ -2931,11 +2939,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vytvárať mince (predvolené: 0)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <translation>Koľko blokov skontrolovať pri spustení (predvolené: 288, 0 = všetky)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
@@ -2943,19 +2951,19 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Prebieha import ...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>Nesprávny alebo žiadny genesis blok nájdený. Nesprávny dátový priečinok alebo sieť?</translation>
     </message>
     <message>
         <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neplatná -onion adresa:  &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>Nedostatok kľúčových slov súboru.</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
@@ -2963,15 +2971,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti klienta RPC baník pyčo:</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <translation>Znovu vytvoriť zoznam blokov zo súčasných blk000??.dat súborov</translation>
     </message>
     <message>
         <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <translation>Zvoľte SOCKS verziu -proxy (4 alebo 5, predvolené 5)</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
@@ -2979,15 +2987,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť najväčšiu veľkosť bloku v bytoch (predvolené: %d)</translation>
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť množstvo vlákien na obsluhu RPC volaní (predvolené: 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <translation>Označ súbor peňaženky (v priečinku s dátami)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
@@ -2999,7 +3007,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <translation>Použitie (neodporúča sa, použite bitcoin-cli):</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3011,11 +3019,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>Čakanie na štart RPC servra</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>Peňaženka %s sa nachádza mimo dátového priečinka %s </translation>
     </message>
     <message>
         <source>Wallet options:</source>
@@ -3027,7 +3035,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>Potrebujete prebudovať databázu použitím -reindex zmeniť -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
@@ -3035,7 +3043,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>Neviem uzamknúť data adresár %s. Jadro Bitcoin je pravdepodobne už spustené.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -3055,11 +3063,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neplatná suma pre -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neplatná suma pre -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3075,7 +3083,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <translation>Maximálna veľkosť prijímacieho zásobníka pre jedno spojenie, &lt;n&gt;*1000 bytov (predvolené: 5000)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
@@ -3087,7 +3095,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <translation>Pripájať sa len k nódam v sieti &lt;net&gt; (IPv4, IPv6 alebo Tor)</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
@@ -3103,11 +3111,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti servra RPC:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Náhodne zahadzuj 1 z každých &lt;n&gt; sieťových správ</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
@@ -3115,7 +3123,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Mať spustené vlákno pravidelného čístenia peňaženky (predvolené: 1)</translation>
     </message>
     <message>
         <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3123,7 +3131,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Poslať príkaz Jadru Bitcoin</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3131,23 +3139,23 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť minimálnu veľkosť bloku v bytoch (predvolené: 0)</translation>
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaví DB_PRIVATE možnosť v db prostredí peňaženky (prednastavené: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <translation>Zobraziť všetky možnosti ladenia (použitie: --help --help-debug)</translation>
     </message>
     <message>
         <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Zobraziť porovnávacie informácie (prednastavené: 0)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <translation>Zmenšiť debug.log pri spustení klienta (predvolené: 1 ak bez -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
@@ -3159,7 +3167,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Štart služby Jadro Bitcoin</translation>
     </message>
     <message>
         <source>System error: </source>
@@ -3171,7 +3179,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>Hodnoty transakcie musia byť väčšie ako nula (pozitívne)</translation>
     </message>
     <message>
         <source>Transaction too large</source>
@@ -3203,7 +3211,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>pri štarte</translation>
     </message>
     <message>
         <source>version</source>
@@ -3259,7 +3267,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <translation>Nepodarilo sa spojiť s %s na tomto počítači (bind vrátil chybu %d, %s)</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
@@ -3291,19 +3299,19 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neznáma sieť upresnená v -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <translation>Neznáma verzia -socks proxy požadovaná: %i</translation>
     </message>
     <message>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nemožno rozriešiť -bind adress: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nemožno rozriešiť -externalip address: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index b966842d8550..1a46c6ae6c45 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sl_SI" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sl_SI" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1042,6 +1042,14 @@ Naslov: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1344,7 +1352,7 @@ Naslov: %4
         <translation>Napaka: Neveljavna kombinacija -regtest and -testnet</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 5d9e7b7168ac..65e37ff90392 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index 6549c53542d8..901eb59394d5 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 27a8c4d0e3cc..e98048e925d4 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1048,6 +1048,14 @@ Adress: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Proxyns IP-adress (t.ex.  IPv4: 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>Tredjeparts URL:er (t.ex. en block utforskare) som finns i transaktionstabben som ett menyval i sammanhanget. %s i URL:en ersätts med tansaktionshashen. Flera URL:er är separerade med vertikala streck |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Tredjeparts transaktions-URL:er</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Aktiva kommandoradsalternativ som överrider alternativen ovan:</translation>
@@ -1350,8 +1358,8 @@ Adress: %4
         <translation>Fel: Felaktig kombination av -regtest och -testnet.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core avslutades säkert...</translation>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <translation>Bitcoin Core avslutades inte ännu säkert...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index a26a128d9324..96c49b12d080 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="th_TH" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="th_TH" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index 07d6e68f1756..15ec92f98291 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Adres: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Vekil sunucusunun IP adresi (mesela IPv4: 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>Muameleler sekmesinde bağlam menüsü unsurları olarak görünen üçüncü taraf bağlantıları (mesela bir blok tarayıcısı). URL&apos;deki %s, muamele hash değeri ile değiştirilecektir. Birden çok bağlantılar düşey çubuklar | ile ayrılacaktır.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Üçüncü taraf muamele URL&apos;leri</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Yukarıdaki seçeneklerin yerine geçen faal komut satırı seçenekleri:</translation>
@@ -1349,7 +1357,7 @@ Adres: %4
         <translation>Hata: -regtest ve -testnet&apos;in geçersiz kombinasyonu.</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation>Bitcoin Çekirdeği henüz güvenli bir şekilde çıkış yapmamıştır...</translation>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index d78775319fa1..1e739395a263 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1047,6 +1047,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1349,7 +1357,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index 45b46e26890b..d9634f63e337 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index e4ce310e20a1..6ba4f6fa1bf9 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="uz@Cyrl" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="uz@Cyrl" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index 88e37b5ea209..0f9fc4f0f1d4 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index 743e7119d1e4..210272952363 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index a8859892d6e4..ea98c4e4b188 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1048,6 +1048,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>代理的 IP 地址 (例如 IPv4: 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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>有效的命令行参数覆盖上述选项:</translation>
@@ -1350,7 +1358,7 @@ Address: %4
         <translation>错误：无效的 -regtest 与 -testnet 结合体。</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts
index cf729a3f923e..835d0134d62c 100644
--- a/src/qt/locale/bitcoin_zh_HK.ts
+++ b/src/qt/locale/bitcoin_zh_HK.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_HK" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_HK" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1038,6 +1038,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"/>
     </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 type="unfinished"/>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation type="unfinished"/>
@@ -1340,7 +1348,7 @@ Address: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 4f7561ab9ef4..fccdf48abde7 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1,4 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.0">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.1">
 <context>
     <name>AboutDialog</name>
     <message>
@@ -1049,6 +1049,14 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>代理伺服器的網際網路位址(像是 IPv4 的 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>在交易頁籤的情境選單出現的第三方(比如說區塊探索網站)網址連結。網址中的 %s 會被取代為交易的雜湊值。可以用直線符號 | 來分隔多個連結。</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>
@@ -1351,7 +1359,7 @@ Address: %4
         <translation>錯誤: -regtest 和 -testnet 的使用組合無效。</translation>
     </message>
     <message>
-        <source>Bitcoin Core did&apos;t yet exit safely...</source>
+        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
         <translation>位元幣核心還沒有安全地結束...</translation>
     </message>
     <message>

From deb3572ab160221124dfa3e9c5c4e493529f59e4 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 17 Feb 2014 17:35:40 +0100
Subject: [PATCH 0053/1819] Add -rpcbind option to allow binding RPC port on a
 specific interface

Add -rpcbind command option to specify binding RPC service on one
or multiple specific interfaces.

Functionality if -rpcbind is not specified remains the same as before:

- If no -rpcallowip specified, bind on localhost
- If no -rpcbind specified, bind on any interface

Implements part of #3111.
---
 src/init.cpp      |  3 +-
 src/rpcserver.cpp | 95 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 62 insertions(+), 36 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 700770785501..766498876283 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -304,10 +304,11 @@ std::string HelpMessage(HelpMessageMode hmm)
 
     strUsage += "\n" + _("RPC server options:") + "\n";
     strUsage += "  -server                " + _("Accept command line and JSON-RPC commands") + "\n";
+    strUsage += "  -rpcbind=<addr>        " + _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)") + "\n";
     strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
     strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
     strUsage += "  -rpcport=<port>        " + _("Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)") + "\n";
-    strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified IP address") + "\n";
+    strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified IP address. This option can be specified multiple times") + "\n";
     strUsage += "  -rpcthreads=<n>        " + _("Set the number of threads to service RPC calls (default: 4)") + "\n";
 
     strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index d4a229b092d9..2534a9dcf41f 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -508,6 +508,14 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
     }
 }
 
+static ip::tcp::endpoint ParseEndpoint(const std::string &strEndpoint, int defaultPort)
+{
+    std::string addr;
+    int port = defaultPort;
+    SplitHostPort(strEndpoint, port, addr);
+    return ip::tcp::endpoint(asio::ip::address::from_string(addr), port);
+}
+
 void StartRPCThreads()
 {
     rpc_allow_subnets.clear();
@@ -589,57 +597,74 @@ void StartRPCThreads()
         SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
     }
 
-    // Try a dual IPv6/IPv4 socket, falling back to separate IPv4 and IPv6 sockets
-    const bool loopback = !mapArgs.count("-rpcallowip");
-    asio::ip::address bindAddress = loopback ? asio::ip::address_v6::loopback() : asio::ip::address_v6::any();
-    ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", Params().RPCPort()));
-    boost::system::error_code v6_only_error;
+    std::vector<ip::tcp::endpoint> vEndpoints;
+    bool bBindAny = false;
+    int defaultPort = GetArg("-rpcport", Params().RPCPort());
+    if (!mapArgs.count("-rpcallowip")) // Default to loopback if not allowing external IPs
+    {
+        vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v6::loopback(), defaultPort));
+        vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v4::loopback(), defaultPort));
+        if (mapArgs.count("-rpcbind"))
+        {
+            LogPrintf("WARNING: option -rpcbind was ignored because -rpcallowip was not specified, refusing to allow everyone to connect\n");
+        }
+    } else if (mapArgs.count("-rpcbind")) // Specific bind address
+    {
+        BOOST_FOREACH(const std::string &addr, mapMultiArgs["-rpcbind"])
+        {
+            try {
+                vEndpoints.push_back(ParseEndpoint(addr, defaultPort));
+            }
+            catch(boost::system::system_error &e)
+            {
+                uiInterface.ThreadSafeMessageBox(
+                    strprintf(_("Could not parse -rpcbind value %s as network address"), addr),
+                    "", CClientUIInterface::MSG_ERROR);
+                StartShutdown();
+                return;
+            }
+        }
+    } else { // No specific bind address specified, bind to any
+        vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v6::any(), defaultPort));
+        vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v4::any(), defaultPort));
+        // Prefer making the socket dual IPv6/IPv4 instead of binding
+        // to both addresses seperately.
+        bBindAny = true;
+    }
 
     bool fListening = false;
     std::string strerr;
-    try
+    BOOST_FOREACH(const ip::tcp::endpoint &endpoint, vEndpoints)
     {
+        asio::ip::address bindAddress = endpoint.address();
+        LogPrintf("Binding RPC on address %s port %i (IPv4+IPv6 bind any: %i)\n", bindAddress.to_string(), endpoint.port(), bBindAny);
+        boost::system::error_code v6_only_error;
         boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
         rpc_acceptors.push_back(acceptor);
-        acceptor->open(endpoint.protocol());
-        acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
-
-        // Try making the socket dual IPv6/IPv4 (if listening on the "any" address)
-        acceptor->set_option(boost::asio::ip::v6_only(loopback), v6_only_error);
-
-        acceptor->bind(endpoint);
-        acceptor->listen(socket_base::max_connections);
-
-        RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
-
-        fListening = true;
-    }
-    catch(boost::system::system_error &e)
-    {
-        strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s"), endpoint.port(), e.what());
-    }
-    try {
-        // If dual IPv6/IPv4 failed (or we're opening loopback interfaces only), open IPv4 separately
-        if (!fListening || loopback || v6_only_error)
-        {
-            bindAddress = loopback ? asio::ip::address_v4::loopback() : asio::ip::address_v4::any();
-            endpoint.address(bindAddress);
 
-            boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
-            rpc_acceptors.push_back(acceptor);
+        try {
             acceptor->open(endpoint.protocol());
             acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
+
+            // Try making the socket dual IPv6/IPv4 when listening on the IPv6 "any" address
+            acceptor->set_option(boost::asio::ip::v6_only(
+                !bBindAny || bindAddress != asio::ip::address_v6::any()), v6_only_error);
+
             acceptor->bind(endpoint);
             acceptor->listen(socket_base::max_connections);
 
             RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
 
             fListening = true;
+            // If dual IPv6/IPv4 bind succesful, skip binding to IPv4 separately
+            if(bBindAny && bindAddress == asio::ip::address_v6::any() && !v6_only_error)
+                break;
+        }
+        catch(boost::system::system_error &e)
+        {
+            LogPrintf("ERROR: Binding RPC on address %s port %i failed: %s\n", bindAddress.to_string(), endpoint.port(), e.what());
+            strerr = strprintf(_("An error occurred while setting up the RPC address %s port %u for listening: %s"), bindAddress.to_string(), endpoint.port(), e.what());
         }
-    }
-    catch(boost::system::system_error &e)
-    {
-        strerr = strprintf(_("An error occurred while setting up the RPC port %u for listening on IPv4: %s"), endpoint.port(), e.what());
     }
 
     if (!fListening) {

From f923c077547ceb8492e11001d571ba27145242ef Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 7 Apr 2014 16:22:59 +0200
Subject: [PATCH 0054/1819] Support IPv6 lookup in bitcoin-cli even when IPv6
 only bound on localhost

First query in the current way (intelligently determining which network
has a non-localhost interface). If this does not succeed, try plain
lookup.

Needed for testing.

Fixes #1827 by always allowing IPv6 to be used.
---
 src/rpcprotocol.h | 24 ++++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 8b3df1962142..11bdd171d9a1 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -103,11 +103,27 @@ class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidi
     }
     bool connect(const std::string& server, const std::string& port)
     {
-        boost::asio::ip::tcp::resolver resolver(stream.get_io_service());
-        boost::asio::ip::tcp::resolver::query query(server.c_str(), port.c_str());
-        boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query);
-        boost::asio::ip::tcp::resolver::iterator end;
+        using namespace boost::asio::ip;
+        tcp::resolver resolver(stream.get_io_service());
+        tcp::resolver::iterator endpoint_iterator;
+#if BOOST_VERSION >= 104300
+        try {
+#endif
+            // The default query (flags address_configured) tries IPv6 if
+            // non-localhost IPv6 configured, and IPv4 if non-localhost IPv4
+            // configured.
+            tcp::resolver::query query(server.c_str(), port.c_str());
+            endpoint_iterator = resolver.resolve(query);
+#if BOOST_VERSION >= 104300
+        } catch(boost::system::system_error &e)
+        {
+            // If we at first don't succeed, try blanket lookup (IPv4+IPv6 independent of configured interfaces)
+            tcp::resolver::query query(server.c_str(), port.c_str(), resolver_query_base::flags());
+            endpoint_iterator = resolver.resolve(query);
+        }
+#endif
         boost::system::error_code error = boost::asio::error::host_not_found;
+        tcp::resolver::iterator end;
         while (error && endpoint_iterator != end)
         {
             stream.lowest_layer().close();

From b5ad5e783d6f636d5ca5703919d05fd0119a34fc Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 7 Apr 2014 17:29:36 +0200
Subject: [PATCH 0055/1819] Add Python test for -rpcbind and -rpcallowip

Add a new test, `rpcbind_test.py`, that extensively tests the new
`-rpcbind` functionality.
---
 qa/rpc-tests/netutil.py      | 134 ++++++++++++++++++++++++++++++
 qa/rpc-tests/rpcbind_test.py | 152 +++++++++++++++++++++++++++++++++++
 qa/rpc-tests/util.py         |  32 +++++++-
 3 files changed, 314 insertions(+), 4 deletions(-)
 create mode 100644 qa/rpc-tests/netutil.py
 create mode 100755 qa/rpc-tests/rpcbind_test.py

diff --git a/qa/rpc-tests/netutil.py b/qa/rpc-tests/netutil.py
new file mode 100644
index 000000000000..9bea2e355e15
--- /dev/null
+++ b/qa/rpc-tests/netutil.py
@@ -0,0 +1,134 @@
+# Linux network utilities
+import sys
+import socket
+import fcntl
+import struct
+import array
+import os
+import binascii
+
+# Roughly based on http://voorloopnul.com/blog/a-python-netstat-in-less-than-100-lines-of-code/ by Ricardo Pascal
+STATE_ESTABLISHED = '01'
+STATE_SYN_SENT  = '02'
+STATE_SYN_RECV = '03'
+STATE_FIN_WAIT1 = '04'
+STATE_FIN_WAIT2 = '05'
+STATE_TIME_WAIT = '06'
+STATE_CLOSE = '07'
+STATE_CLOSE_WAIT = '08'
+STATE_LAST_ACK = '09'
+STATE_LISTEN = '0A'
+STATE_CLOSING = '0B'
+
+def get_socket_inodes(pid):
+    '''
+    Get list of socket inodes for process pid.
+    '''
+    base = '/proc/%i/fd' % pid
+    inodes = []
+    for item in os.listdir(base):
+        target = os.readlink(os.path.join(base, item))
+        if target.startswith('socket:'):
+            inodes.append(int(target[8:-1]))
+    return inodes
+
+def _remove_empty(array):
+    return [x for x in array if x !='']
+
+def _convert_ip_port(array):
+    host,port = array.split(':')
+    # convert host from mangled-per-four-bytes form as used by kernel
+    host = binascii.unhexlify(host)
+    host_out = ''
+    for x in range(0, len(host)/4):
+        (val,) = struct.unpack('=I', host[x*4:(x+1)*4])
+        host_out += '%08x' % val
+
+    return host_out,int(port,16)
+
+def netstat(typ='tcp'):
+    '''
+    Function to return a list with status of tcp connections at linux systems
+    To get pid of all network process running on system, you must run this script
+    as superuser
+    '''
+    with open('/proc/net/'+typ,'r') as f:
+        content = f.readlines()
+        content.pop(0)
+    result = []
+    for line in content:
+        line_array = _remove_empty(line.split(' '))     # Split lines and remove empty spaces.
+        tcp_id = line_array[0]
+        l_addr = _convert_ip_port(line_array[1])
+        r_addr = _convert_ip_port(line_array[2])
+        state = line_array[3]
+        inode = int(line_array[9])                      # Need the inode to match with process pid.
+        nline = [tcp_id, l_addr, r_addr, state, inode]
+        result.append(nline)
+    return result
+
+def get_bind_addrs(pid):
+    '''
+    Get bind addresses as (host,port) tuples for process pid.
+    '''
+    inodes = get_socket_inodes(pid)
+    bind_addrs = []
+    for conn in netstat('tcp') + netstat('tcp6'):
+        if conn[3] == STATE_LISTEN and conn[4] in inodes:
+            bind_addrs.append(conn[1])
+    return bind_addrs
+
+# from: http://code.activestate.com/recipes/439093/
+def all_interfaces():
+    '''
+    Return all interfaces that are up
+    '''
+    is_64bits = sys.maxsize > 2**32
+    struct_size = 40 if is_64bits else 32
+    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+    max_possible = 8 # initial value
+    while True:
+        bytes = max_possible * struct_size
+        names = array.array('B', '\0' * bytes)
+        outbytes = struct.unpack('iL', fcntl.ioctl(
+            s.fileno(),
+            0x8912,  # SIOCGIFCONF
+            struct.pack('iL', bytes, names.buffer_info()[0])
+        ))[0]
+        if outbytes == bytes:
+            max_possible *= 2
+        else:
+            break
+    namestr = names.tostring()
+    return [(namestr[i:i+16].split('\0', 1)[0],
+             socket.inet_ntoa(namestr[i+20:i+24]))
+            for i in range(0, outbytes, struct_size)]
+
+def addr_to_hex(addr):
+    '''
+    Convert string IPv4 or IPv6 address to binary address as returned by
+    get_bind_addrs.
+    Very naive implementation that certainly doesn't work for all IPv6 variants.
+    '''
+    if '.' in addr: # IPv4
+        addr = [int(x) for x in addr.split('.')]
+    elif ':' in addr: # IPv6
+        sub = [[], []] # prefix, suffix
+        x = 0
+        addr = addr.split(':')
+        for i,comp in enumerate(addr):
+            if comp == '':
+                if i == 0 or i == (len(addr)-1): # skip empty component at beginning or end
+                    continue
+                x += 1 # :: skips to suffix
+                assert(x < 2)
+            else: # two bytes per component
+                val = int(comp, 16)
+                sub[x].append(val >> 8)
+                sub[x].append(val & 0xff)
+        nullbytes = 16 - len(sub[0]) - len(sub[1])
+        assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
+        addr = sub[0] + ([0] * nullbytes) + sub[1]
+    else:
+        raise ValueError('Could not parse address %s' % addr)
+    return binascii.hexlify(bytearray(addr))
diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py
new file mode 100755
index 000000000000..a31f8d98ef7c
--- /dev/null
+++ b/qa/rpc-tests/rpcbind_test.py
@@ -0,0 +1,152 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Test for -rpcbind, as well as -rpcallowip and -rpcconnect
+
+# Add python-bitcoinrpc to module search path:
+import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
+
+import json
+import shutil
+import subprocess
+import tempfile
+import traceback
+
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+from netutil import *
+
+def run_bind_test(tmpdir, allow_ips, connect_to, addresses, expected):
+    '''
+    Start a node with requested rpcallowip and rpcbind parameters,
+    then try to connect, and check if the set of bound addresses
+    matches the expected set.
+    '''
+    expected = [(addr_to_hex(addr), port) for (addr, port) in expected]
+    base_args = ['-disablewallet', '-nolisten']
+    if allow_ips:
+        base_args += ['-rpcallowip=' + x for x in allow_ips]
+    binds = ['-rpcbind='+addr for addr in addresses]
+    nodes = start_nodes(1, tmpdir, [base_args + binds], connect_to)
+    try:
+        pid = bitcoind_processes[0].pid
+        assert_equal(set(get_bind_addrs(pid)), set(expected))
+    finally:
+        stop_nodes(nodes)
+        wait_bitcoinds()
+
+def run_allowip_test(tmpdir, allow_ips, rpchost):
+    '''
+    Start a node with rpcwallow IP, and request getinfo
+    at a non-localhost IP.
+    '''
+    base_args = ['-disablewallet', '-nolisten'] + ['-rpcallowip='+x for x in allow_ips]
+    nodes = start_nodes(1, tmpdir, [base_args])
+    try:
+        # connect to node through non-loopback interface
+        url = "http://rt:rt@%s:%d" % (rpchost, START_RPC_PORT,)
+        node = AuthServiceProxy(url)
+        node.getinfo()
+    finally:
+        node = None # make sure connection will be garbage collected and closed
+        stop_nodes(nodes)
+        wait_bitcoinds()
+
+
+def run_test(tmpdir):
+    assert(sys.platform == 'linux2') # due to OS-specific network stats queries, this test works only on Linux
+    # find the first non-loopback interface for testing
+    non_loopback_ip = None
+    for name,ip in all_interfaces():
+        if ip != '127.0.0.1':
+            non_loopback_ip = ip
+            break
+    if non_loopback_ip is None:
+        assert(not 'This test requires at least one non-loopback IPv4 interface')
+    print("Using interface %s for testing" % non_loopback_ip)
+
+    # check default without rpcallowip (IPv4 and IPv6 localhost)
+    run_bind_test(tmpdir, None, '127.0.0.1', [],
+        [('127.0.0.1', 11100), ('::1', 11100)])
+    # check default with rpcallowip (IPv6 any)
+    run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', [],
+        [('::0', 11100)])
+    # check only IPv4 localhost (explicit)
+    run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1'],
+        [('127.0.0.1', START_RPC_PORT)])
+    # check only IPv4 localhost (explicit) with alternative port
+    run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171'],
+        [('127.0.0.1', 32171)])
+    # check only IPv4 localhost (explicit) with multiple alternative ports on same host
+    run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171', '127.0.0.1:32172'],
+        [('127.0.0.1', 32171), ('127.0.0.1', 32172)])
+    # check only IPv6 localhost (explicit)
+    run_bind_test(tmpdir, ['[::1]'], '[::1]', ['[::1]'],
+        [('::1', 11100)])
+    # check both IPv4 and IPv6 localhost (explicit)
+    run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1', '[::1]'],
+        [('127.0.0.1', START_RPC_PORT), ('::1', START_RPC_PORT)])
+    # check only non-loopback interface
+    run_bind_test(tmpdir, [non_loopback_ip], non_loopback_ip, [non_loopback_ip],
+        [(non_loopback_ip, START_RPC_PORT)])
+
+    # Check that with invalid rpcallowip, we are denied
+    run_allowip_test(tmpdir, [non_loopback_ip], non_loopback_ip)
+    try:
+        run_allowip_test(tmpdir, ['1.1.1.1'], non_loopback_ip)
+        assert(not 'Connection not denied by rpcallowip as expected')
+    except ValueError:
+        pass
+
+def main():
+    import optparse
+
+    parser = optparse.OptionParser(usage="%prog [options]")
+    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
+                      help="Leave bitcoinds and test.* datadir on exit or error")
+    parser.add_option("--srcdir", dest="srcdir", default="../../src",
+                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
+    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
+                      help="Root directory for datadirs")
+    (options, args) = parser.parse_args()
+
+    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
+
+    check_json_precision()
+
+    success = False
+    nodes = []
+    try:
+        print("Initializing test directory "+options.tmpdir)
+        if not os.path.isdir(options.tmpdir):
+            os.makedirs(options.tmpdir)
+        initialize_chain(options.tmpdir)
+
+        run_test(options.tmpdir)
+
+        success = True
+
+    except AssertionError as e:
+        print("Assertion failed: "+e.message)
+    except Exception as e:
+        print("Unexpected exception caught during testing: "+str(e))
+        traceback.print_tb(sys.exc_info()[2])
+
+    if not options.nocleanup:
+        print("Cleaning up")
+        wait_bitcoinds()
+        shutil.rmtree(options.tmpdir)
+
+    if success:
+        print("Tests successful")
+        sys.exit(0)
+    else:
+        print("Failed")
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 1d0896a3fbee..40f4a1458f99 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -15,6 +15,7 @@
 import shutil
 import subprocess
 import time
+import re
 
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
@@ -112,20 +113,43 @@ def initialize_chain(test_dir):
         to_dir = os.path.join(test_dir,  "node"+str(i))
         shutil.copytree(from_dir, to_dir)
 
-def start_nodes(num_nodes, dir):
+def _rpchost_to_args(rpchost):
+    '''Convert optional IP:port spec to rpcconnect/rpcport args'''
+    if rpchost is None:
+        return []
+
+    match = re.match('(\[[0-9a-fA-f:]+\]|[^:]+)(?::([0-9]+))?$', rpchost)
+    if not match:
+        raise ValueError('Invalid RPC host spec ' + rpchost)
+
+    rpcconnect = match.group(1)
+    rpcport = match.group(2)
+
+    if rpcconnect.startswith('['): # remove IPv6 [...] wrapping
+        rpcconnect = rpcconnect[1:-1]
+
+    rv = ['-rpcconnect=' + rpcconnect]
+    if rpcport:
+        rv += ['-rpcport=' + rpcport]
+    return rv
+
+def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
     # Start bitcoinds, and wait for RPC interface to be up and running:
     devnull = open("/dev/null", "w+")
     for i in range(num_nodes):
         datadir = os.path.join(dir, "node"+str(i))
         args = [ "bitcoind", "-datadir="+datadir ]
+        if extra_args is not None:
+            args += extra_args[i]
         bitcoind_processes.append(subprocess.Popen(args))
-        subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
-                                  "-rpcwait", "getblockcount"], stdout=devnull)
+        subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
+                                  _rpchost_to_args(rpchost)  +
+                                  ["-rpcwait", "getblockcount"], stdout=devnull)
     devnull.close()
     # Create&return JSON-RPC connections
     rpc_connections = []
     for i in range(num_nodes):
-        url = "http://rt:rt@127.0.0.1:%d"%(START_RPC_PORT+i,)
+        url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', START_RPC_PORT+i,)
         rpc_connections.append(AuthServiceProxy(url))
     return rpc_connections
 

From 4b61a6a47895309ffb059f986a31c4931b8fe0b4 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Mon, 5 May 2014 20:08:13 +0200
Subject: [PATCH 0056/1819] switch from boost int types to <stdint.h>

---
 src/json/json_spirit_reader_template.h | 12 +++---
 src/json/json_spirit_value.h           | 31 ++++++++-------
 src/rpcblockchain.cpp                  | 14 +++----
 src/rpcclient.cpp                      | 52 +++++++++++++-------------
 src/rpcmining.cpp                      |  6 +--
 src/rpcmisc.cpp                        |  6 +--
 src/rpcnet.cpp                         | 16 ++++----
 src/rpcrawtransaction.cpp              | 12 +++---
 src/rpcwallet.cpp                      | 12 +++---
 9 files changed, 80 insertions(+), 81 deletions(-)

diff --git a/src/json/json_spirit_reader_template.h b/src/json/json_spirit_reader_template.h
index 4dec00e6c9b8..46f5892f62dd 100644
--- a/src/json/json_spirit_reader_template.h
+++ b/src/json/json_spirit_reader_template.h
@@ -33,8 +33,8 @@
 
 namespace json_spirit
 {
-    const spirit_namespace::int_parser < boost::int64_t >  int64_p  = spirit_namespace::int_parser < boost::int64_t  >();
-    const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >();
+    const spirit_namespace::int_parser < int64_t >  int64_p  = spirit_namespace::int_parser < int64_t  >();
+    const spirit_namespace::uint_parser< uint64_t > uint64_p = spirit_namespace::uint_parser< uint64_t >();
 
     template< class Iter_type >
     bool is_eq( Iter_type first, Iter_type last, const char* c_str )
@@ -270,12 +270,12 @@ namespace json_spirit
             add_to_current( Value_type() );
         }
 
-        void new_int( boost::int64_t i )
+        void new_int( int64_t i )
         {
             add_to_current( i );
         }
 
-        void new_uint64( boost::uint64_t ui )
+        void new_uint64( uint64_t ui )
         {
             add_to_current( ui );
         }
@@ -425,8 +425,8 @@ namespace json_spirit
                 typedef boost::function< void( Char_type )            > Char_action;
                 typedef boost::function< void( Iter_type, Iter_type ) > Str_action;
                 typedef boost::function< void( double )               > Real_action;
-                typedef boost::function< void( boost::int64_t )       > Int_action;
-                typedef boost::function< void( boost::uint64_t )      > Uint64_action;
+                typedef boost::function< void( int64_t )       > Int_action;
+                typedef boost::function< void( uint64_t )      > Uint64_action;
 
                 Char_action   begin_obj  ( boost::bind( &Semantic_actions_t::begin_obj,   &self.actions_, _1 ) );
                 Char_action   end_obj    ( boost::bind( &Semantic_actions_t::end_obj,     &self.actions_, _1 ) );
diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h
index 7e83a2a7e3e6..88c0e1f7364d 100644
--- a/src/json/json_spirit_value.h
+++ b/src/json/json_spirit_value.h
@@ -17,7 +17,6 @@
 #include <sstream>
 #include <stdexcept>
 #include <boost/config.hpp> 
-#include <boost/cstdint.hpp> 
 #include <boost/shared_ptr.hpp> 
 #include <boost/variant.hpp> 
 
@@ -45,8 +44,8 @@ namespace json_spirit
         Value_impl( const Array&       value );
         Value_impl( bool               value );
         Value_impl( int                value );
-        Value_impl( boost::int64_t     value );
-        Value_impl( boost::uint64_t    value );
+        Value_impl( int64_t     value );
+        Value_impl( uint64_t    value );
         Value_impl( double             value );
 
         Value_impl( const Value_impl& other );
@@ -65,8 +64,8 @@ namespace json_spirit
         const Array&       get_array()  const;
         bool               get_bool()   const;
         int                get_int()    const;
-        boost::int64_t     get_int64()  const;
-        boost::uint64_t    get_uint64() const;
+        int64_t     get_int64()  const;
+        uint64_t    get_uint64() const;
         double             get_real()   const;
 
         Object& get_obj();
@@ -83,7 +82,7 @@ namespace json_spirit
 
         typedef boost::variant< String_type, 
                                 boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >, 
-                                bool, boost::int64_t, double > Variant;
+                                bool, int64_t, double > Variant;
 
         Value_type type_;
         Variant v_;
@@ -258,13 +257,13 @@ namespace json_spirit
     template< class Config >
     Value_impl< Config >::Value_impl( int value )
     :   type_( int_type )
-    ,   v_( static_cast< boost::int64_t >( value ) )
+    ,   v_( static_cast< int64_t >( value ) )
     ,   is_uint64_( false )
     {
     }
 
     template< class Config >
-    Value_impl< Config >::Value_impl( boost::int64_t value )
+    Value_impl< Config >::Value_impl( int64_t value )
     :   type_( int_type )
     ,   v_( value )
     ,   is_uint64_( false )
@@ -272,9 +271,9 @@ namespace json_spirit
     }
 
     template< class Config >
-    Value_impl< Config >::Value_impl( boost::uint64_t value )
+    Value_impl< Config >::Value_impl( uint64_t value )
     :   type_( int_type )
-    ,   v_( static_cast< boost::int64_t >( value ) )
+    ,   v_( static_cast< int64_t >( value ) )
     ,   is_uint64_( true )
     {
     }
@@ -390,19 +389,19 @@ namespace json_spirit
     }
     
     template< class Config >
-    boost::int64_t Value_impl< Config >::get_int64() const
+    int64_t Value_impl< Config >::get_int64() const
     {
         check_type(  int_type );
 
-        return boost::get< boost::int64_t >( v_ );
+        return boost::get< int64_t >( v_ );
     }
     
     template< class Config >
-    boost::uint64_t Value_impl< Config >::get_uint64() const
+    uint64_t Value_impl< Config >::get_uint64() const
     {
         check_type(  int_type );
 
-        return static_cast< boost::uint64_t >( get_int64() );
+        return static_cast< uint64_t >( get_int64() );
     }
 
     template< class Config >
@@ -481,13 +480,13 @@ namespace json_spirit
         }
        
         template< class Value > 
-        boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > )
+        int64_t get_value( const Value& value, Type_to_type< int64_t > )
         {
             return value.get_int64();
         }
        
         template< class Value > 
-        boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > )
+        uint64_t get_value( const Value& value, Type_to_type< uint64_t > )
         {
             return value.get_uint64();
         }
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 1ed8a8e866e0..0a0fff41d71d 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -64,8 +64,8 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
     BOOST_FOREACH(const CTransaction&tx, block.vtx)
         txs.push_back(tx.GetHash().GetHex());
     result.push_back(Pair("tx", txs));
-    result.push_back(Pair("time", (boost::int64_t)block.GetBlockTime()));
-    result.push_back(Pair("nonce", (boost::uint64_t)block.nNonce));
+    result.push_back(Pair("time", (int64_t)block.GetBlockTime()));
+    result.push_back(Pair("nonce", (uint64_t)block.nNonce));
     result.push_back(Pair("bits", HexBits(block.nBits)));
     result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
     result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));
@@ -175,7 +175,7 @@ Value getrawmempool(const Array& params, bool fHelp)
             Object info;
             info.push_back(Pair("size", (int)e.GetTxSize()));
             info.push_back(Pair("fee", ValueFromAmount(e.GetFee())));
-            info.push_back(Pair("time", (boost::int64_t)e.GetTime()));
+            info.push_back(Pair("time", (int64_t)e.GetTime()));
             info.push_back(Pair("height", (int)e.GetHeight()));
             info.push_back(Pair("startingpriority", e.GetPriority(e.GetHeight())));
             info.push_back(Pair("currentpriority", e.GetPriority(chainActive.Height())));
@@ -315,11 +315,11 @@ Value gettxoutsetinfo(const Array& params, bool fHelp)
 
     CCoinsStats stats;
     if (pcoinsTip->GetStats(stats)) {
-        ret.push_back(Pair("height", (boost::int64_t)stats.nHeight));
+        ret.push_back(Pair("height", (int64_t)stats.nHeight));
         ret.push_back(Pair("bestblock", stats.hashBlock.GetHex()));
-        ret.push_back(Pair("transactions", (boost::int64_t)stats.nTransactions));
-        ret.push_back(Pair("txouts", (boost::int64_t)stats.nTransactionOutputs));
-        ret.push_back(Pair("bytes_serialized", (boost::int64_t)stats.nSerializedSize));
+        ret.push_back(Pair("transactions", (int64_t)stats.nTransactions));
+        ret.push_back(Pair("txouts", (int64_t)stats.nTransactionOutputs));
+        ret.push_back(Pair("bytes_serialized", (int64_t)stats.nSerializedSize));
         ret.push_back(Pair("hash_serialized", stats.hashSerialized.GetHex()));
         ret.push_back(Pair("total_amount", ValueFromAmount(stats.nTotalAmount)));
     }
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 8620a87297ae..4f3c39ce9bd4 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -128,53 +128,53 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
     if (strMethod == "stop"                   && n > 0) ConvertTo<bool>(params[0]);
     if (strMethod == "getaddednodeinfo"       && n > 0) ConvertTo<bool>(params[0]);
     if (strMethod == "setgenerate"            && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "setgenerate"            && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "getnetworkhashps"       && n > 0) ConvertTo<boost::int64_t>(params[0]);
-    if (strMethod == "getnetworkhashps"       && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "setgenerate"            && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "getnetworkhashps"       && n > 0) ConvertTo<int64_t>(params[0]);
+    if (strMethod == "getnetworkhashps"       && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "sendtoaddress"          && n > 1) ConvertTo<double>(params[1]);
     if (strMethod == "settxfee"               && n > 0) ConvertTo<double>(params[0]);
-    if (strMethod == "getreceivedbyaddress"   && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "getreceivedbyaccount"   && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "listreceivedbyaddress"  && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "getreceivedbyaddress"   && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "getreceivedbyaccount"   && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "listreceivedbyaddress"  && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "listreceivedbyaddress"  && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "listreceivedbyaccount"  && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "listreceivedbyaccount"  && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "listreceivedbyaccount"  && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "getbalance"             && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "getblockhash"           && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "getbalance"             && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "getblockhash"           && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "move"                   && n > 2) ConvertTo<double>(params[2]);
-    if (strMethod == "move"                   && n > 3) ConvertTo<boost::int64_t>(params[3]);
+    if (strMethod == "move"                   && n > 3) ConvertTo<int64_t>(params[3]);
     if (strMethod == "sendfrom"               && n > 2) ConvertTo<double>(params[2]);
-    if (strMethod == "sendfrom"               && n > 3) ConvertTo<boost::int64_t>(params[3]);
-    if (strMethod == "listtransactions"       && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "listtransactions"       && n > 2) ConvertTo<boost::int64_t>(params[2]);
-    if (strMethod == "listaccounts"           && n > 0) ConvertTo<boost::int64_t>(params[0]);
-    if (strMethod == "walletpassphrase"       && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "sendfrom"               && n > 3) ConvertTo<int64_t>(params[3]);
+    if (strMethod == "listtransactions"       && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "listtransactions"       && n > 2) ConvertTo<int64_t>(params[2]);
+    if (strMethod == "listaccounts"           && n > 0) ConvertTo<int64_t>(params[0]);
+    if (strMethod == "walletpassphrase"       && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "getblocktemplate"       && n > 0) ConvertTo<Object>(params[0]);
-    if (strMethod == "listsinceblock"         && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "listsinceblock"         && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "sendmany"               && n > 1) ConvertTo<Object>(params[1]);
-    if (strMethod == "sendmany"               && n > 2) ConvertTo<boost::int64_t>(params[2]);
-    if (strMethod == "addmultisigaddress"     && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "sendmany"               && n > 2) ConvertTo<int64_t>(params[2]);
+    if (strMethod == "addmultisigaddress"     && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "addmultisigaddress"     && n > 1) ConvertTo<Array>(params[1]);
-    if (strMethod == "createmultisig"         && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "createmultisig"         && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "createmultisig"         && n > 1) ConvertTo<Array>(params[1]);
-    if (strMethod == "listunspent"            && n > 0) ConvertTo<boost::int64_t>(params[0]);
-    if (strMethod == "listunspent"            && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "listunspent"            && n > 0) ConvertTo<int64_t>(params[0]);
+    if (strMethod == "listunspent"            && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "listunspent"            && n > 2) ConvertTo<Array>(params[2]);
     if (strMethod == "getblock"               && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "getrawtransaction"      && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "getrawtransaction"      && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "createrawtransaction"   && n > 0) ConvertTo<Array>(params[0]);
     if (strMethod == "createrawtransaction"   && n > 1) ConvertTo<Object>(params[1]);
     if (strMethod == "signrawtransaction"     && n > 1) ConvertTo<Array>(params[1], true);
     if (strMethod == "signrawtransaction"     && n > 2) ConvertTo<Array>(params[2], true);
     if (strMethod == "sendrawtransaction"     && n > 1) ConvertTo<bool>(params[1], true);
-    if (strMethod == "gettxout"               && n > 1) ConvertTo<boost::int64_t>(params[1]);
+    if (strMethod == "gettxout"               && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "gettxout"               && n > 2) ConvertTo<bool>(params[2]);
     if (strMethod == "lockunspent"            && n > 0) ConvertTo<bool>(params[0]);
     if (strMethod == "lockunspent"            && n > 1) ConvertTo<Array>(params[1]);
     if (strMethod == "importprivkey"          && n > 2) ConvertTo<bool>(params[2]);
-    if (strMethod == "verifychain"            && n > 0) ConvertTo<boost::int64_t>(params[0]);
-    if (strMethod == "verifychain"            && n > 1) ConvertTo<boost::int64_t>(params[1]);
-    if (strMethod == "keypoolrefill"          && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "verifychain"            && n > 0) ConvertTo<int64_t>(params[0]);
+    if (strMethod == "verifychain"            && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "keypoolrefill"          && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "getrawmempool"          && n > 0) ConvertTo<bool>(params[0]);
 
     return params;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index cb903b585ab3..23876c603dec 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -88,7 +88,7 @@ Value GetNetworkHashPS(int lookup, int height) {
     uint256 workDiff = pb->nChainWork - pb0->nChainWork;
     int64_t timeDiff = maxTime - minTime;
 
-    return (boost::int64_t)(workDiff.getdouble() / timeDiff);
+    return (int64_t)(workDiff.getdouble() / timeDiff);
 }
 
 Value getnetworkhashps(const Array& params, bool fHelp)
@@ -226,8 +226,8 @@ Value gethashespersec(const Array& params, bool fHelp)
         );
 
     if (GetTimeMillis() - nHPSTimerStart > 8000)
-        return (boost::int64_t)0;
-    return (boost::int64_t)dHashesPerSec;
+        return (int64_t)0;
+    return (int64_t)dHashesPerSec;
 }
 #endif
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 2564a3f1a662..0dd98fd76511 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -69,18 +69,18 @@ Value getinfo(const Array& params, bool fHelp)
     }
 #endif
     obj.push_back(Pair("blocks",        (int)chainActive.Height()));
-    obj.push_back(Pair("timeoffset",    (boost::int64_t)GetTimeOffset()));
+    obj.push_back(Pair("timeoffset",    (int64_t)GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
     obj.push_back(Pair("testnet",       TestNet()));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
-        obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime()));
+        obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
         obj.push_back(Pair("keypoolsize",   (int)pwalletMain->GetKeyPoolSize()));
     }
     if (pwalletMain && pwalletMain->IsCrypted())
-        obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime));
+        obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
     obj.push_back(Pair("paytxfee",      ValueFromAmount(nTransactionFee)));
 #endif
     obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::nMinRelayTxFee)));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 573d6cd3f670..1dc70840ca21 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -116,11 +116,11 @@ Value getpeerinfo(const Array& params, bool fHelp)
         if (!(stats.addrLocal.empty()))
             obj.push_back(Pair("addrlocal", stats.addrLocal));
         obj.push_back(Pair("services", strprintf("%08x", stats.nServices)));
-        obj.push_back(Pair("lastsend", (boost::int64_t)stats.nLastSend));
-        obj.push_back(Pair("lastrecv", (boost::int64_t)stats.nLastRecv));
-        obj.push_back(Pair("bytessent", (boost::int64_t)stats.nSendBytes));
-        obj.push_back(Pair("bytesrecv", (boost::int64_t)stats.nRecvBytes));
-        obj.push_back(Pair("conntime", (boost::int64_t)stats.nTimeConnected));
+        obj.push_back(Pair("lastsend", (int64_t)stats.nLastSend));
+        obj.push_back(Pair("lastrecv", (int64_t)stats.nLastRecv));
+        obj.push_back(Pair("bytessent", (int64_t)stats.nSendBytes));
+        obj.push_back(Pair("bytesrecv", (int64_t)stats.nRecvBytes));
+        obj.push_back(Pair("conntime", (int64_t)stats.nTimeConnected));
         obj.push_back(Pair("pingtime", stats.dPingTime));
         if (stats.dPingWait > 0.0)
             obj.push_back(Pair("pingwait", stats.dPingWait));
@@ -328,9 +328,9 @@ Value getnettotals(const Array& params, bool fHelp)
        );
 
     Object obj;
-    obj.push_back(Pair("totalbytesrecv", static_cast< boost::uint64_t>(CNode::GetTotalBytesRecv())));
-    obj.push_back(Pair("totalbytessent", static_cast<boost::uint64_t>(CNode::GetTotalBytesSent())));
-    obj.push_back(Pair("timemillis", static_cast<boost::int64_t>(GetTimeMillis())));
+    obj.push_back(Pair("totalbytesrecv", static_cast< uint64_t>(CNode::GetTotalBytesRecv())));
+    obj.push_back(Pair("totalbytessent", static_cast<uint64_t>(CNode::GetTotalBytesSent())));
+    obj.push_back(Pair("timemillis", static_cast<int64_t>(GetTimeMillis())));
     return obj;
 }
 
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 50734a5c1178..dee7daeb2a98 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -55,7 +55,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
 {
     entry.push_back(Pair("txid", tx.GetHash().GetHex()));
     entry.push_back(Pair("version", tx.nVersion));
-    entry.push_back(Pair("locktime", (boost::int64_t)tx.nLockTime));
+    entry.push_back(Pair("locktime", (int64_t)tx.nLockTime));
     Array vin;
     BOOST_FOREACH(const CTxIn& txin, tx.vin)
     {
@@ -65,13 +65,13 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
         else
         {
             in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
-            in.push_back(Pair("vout", (boost::int64_t)txin.prevout.n));
+            in.push_back(Pair("vout", (int64_t)txin.prevout.n));
             Object o;
             o.push_back(Pair("asm", txin.scriptSig.ToString()));
             o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
             in.push_back(Pair("scriptSig", o));
         }
-        in.push_back(Pair("sequence", (boost::int64_t)txin.nSequence));
+        in.push_back(Pair("sequence", (int64_t)txin.nSequence));
         vin.push_back(in);
     }
     entry.push_back(Pair("vin", vin));
@@ -81,7 +81,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
         const CTxOut& txout = tx.vout[i];
         Object out;
         out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
-        out.push_back(Pair("n", (boost::int64_t)i));
+        out.push_back(Pair("n", (int64_t)i));
         Object o;
         ScriptPubKeyToJSON(txout.scriptPubKey, o, true);
         out.push_back(Pair("scriptPubKey", o));
@@ -99,8 +99,8 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
             if (chainActive.Contains(pindex))
             {
                 entry.push_back(Pair("confirmations", 1 + chainActive.Height() - pindex->nHeight));
-                entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
-                entry.push_back(Pair("blocktime", (boost::int64_t)pindex->nTime));
+                entry.push_back(Pair("time", (int64_t)pindex->nTime));
+                entry.push_back(Pair("blocktime", (int64_t)pindex->nTime));
             }
             else
                 entry.push_back(Pair("confirmations", 0));
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 2479a1f87e25..c61035ab3557 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -49,7 +49,7 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     {
         entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex()));
         entry.push_back(Pair("blockindex", wtx.nIndex));
-        entry.push_back(Pair("blocktime", (boost::int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
+        entry.push_back(Pair("blocktime", (int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
     }
     uint256 hash = wtx.GetHash();
     entry.push_back(Pair("txid", hash.GetHex()));
@@ -57,8 +57,8 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
         conflicts.push_back(conflict.GetHex());
     entry.push_back(Pair("walletconflicts", conflicts));
-    entry.push_back(Pair("time", (boost::int64_t)wtx.GetTxTime()));
-    entry.push_back(Pair("timereceived", (boost::int64_t)wtx.nTimeReceived));
+    entry.push_back(Pair("time", (int64_t)wtx.GetTxTime()));
+    entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
     BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
         entry.push_back(Pair(item.first, item.second));
 }
@@ -1167,7 +1167,7 @@ void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Ar
         Object entry;
         entry.push_back(Pair("account", acentry.strAccount));
         entry.push_back(Pair("category", "move"));
-        entry.push_back(Pair("time", (boost::int64_t)acentry.nTime));
+        entry.push_back(Pair("time", (int64_t)acentry.nTime));
         entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit)));
         entry.push_back(Pair("otheraccount", acentry.strOtherAccount));
         entry.push_back(Pair("comment", acentry.strComment));
@@ -1912,9 +1912,9 @@ Value getwalletinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
     obj.push_back(Pair("balance",       ValueFromAmount(pwalletMain->GetBalance())));
     obj.push_back(Pair("txcount",       (int)pwalletMain->mapWallet.size()));
-    obj.push_back(Pair("keypoololdest", (boost::int64_t)pwalletMain->GetOldestKeyPoolTime()));
+    obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
     obj.push_back(Pair("keypoolsize",   (int)pwalletMain->GetKeyPoolSize()));
     if (pwalletMain->IsCrypted())
-        obj.push_back(Pair("unlocked_until", (boost::int64_t)nWalletUnlockTime));
+        obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
     return obj;
 }

From 3e74ac22d5298f3259115848db5ac96e00d74e4a Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Mon, 5 May 2014 21:15:33 +0200
Subject: [PATCH 0057/1819] json_spirit: #include <stdint.h>

---
 src/json/json_spirit_value.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h
index 88c0e1f7364d..13cc89210c6f 100644
--- a/src/json/json_spirit_value.h
+++ b/src/json/json_spirit_value.h
@@ -16,6 +16,7 @@
 #include <cassert>
 #include <sstream>
 #include <stdexcept>
+#include <stdint.h>
 #include <boost/config.hpp> 
 #include <boost/shared_ptr.hpp> 
 #include <boost/variant.hpp> 

From d56e30ca898469cf5988b0fc9847ec79b43be49c Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 6 May 2014 14:58:43 +0200
Subject: [PATCH 0058/1819] removed a few unnecessary casts

---
 src/rpcblockchain.cpp |  4 ++--
 src/rpcmisc.cpp       |  6 +++---
 src/rpcnet.cpp        | 18 +++++++++---------
 src/rpcwallet.cpp     |  8 ++++----
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 0a0fff41d71d..a303b5d3eff2 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -64,7 +64,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
     BOOST_FOREACH(const CTransaction&tx, block.vtx)
         txs.push_back(tx.GetHash().GetHex());
     result.push_back(Pair("tx", txs));
-    result.push_back(Pair("time", (int64_t)block.GetBlockTime()));
+    result.push_back(Pair("time", block.GetBlockTime()));
     result.push_back(Pair("nonce", (uint64_t)block.nNonce));
     result.push_back(Pair("bits", HexBits(block.nBits)));
     result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
@@ -175,7 +175,7 @@ Value getrawmempool(const Array& params, bool fHelp)
             Object info;
             info.push_back(Pair("size", (int)e.GetTxSize()));
             info.push_back(Pair("fee", ValueFromAmount(e.GetFee())));
-            info.push_back(Pair("time", (int64_t)e.GetTime()));
+            info.push_back(Pair("time", e.GetTime()));
             info.push_back(Pair("height", (int)e.GetHeight()));
             info.push_back(Pair("startingpriority", e.GetPriority(e.GetHeight())));
             info.push_back(Pair("currentpriority", e.GetPriority(chainActive.Height())));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 0dd98fd76511..27d6d61a36f2 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -69,18 +69,18 @@ Value getinfo(const Array& params, bool fHelp)
     }
 #endif
     obj.push_back(Pair("blocks",        (int)chainActive.Height()));
-    obj.push_back(Pair("timeoffset",    (int64_t)GetTimeOffset()));
+    obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
     obj.push_back(Pair("testnet",       TestNet()));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
-        obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
+        obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
         obj.push_back(Pair("keypoolsize",   (int)pwalletMain->GetKeyPoolSize()));
     }
     if (pwalletMain && pwalletMain->IsCrypted())
-        obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
+        obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
     obj.push_back(Pair("paytxfee",      ValueFromAmount(nTransactionFee)));
 #endif
     obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::nMinRelayTxFee)));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 1dc70840ca21..024f6a09de0d 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -116,11 +116,11 @@ Value getpeerinfo(const Array& params, bool fHelp)
         if (!(stats.addrLocal.empty()))
             obj.push_back(Pair("addrlocal", stats.addrLocal));
         obj.push_back(Pair("services", strprintf("%08x", stats.nServices)));
-        obj.push_back(Pair("lastsend", (int64_t)stats.nLastSend));
-        obj.push_back(Pair("lastrecv", (int64_t)stats.nLastRecv));
-        obj.push_back(Pair("bytessent", (int64_t)stats.nSendBytes));
-        obj.push_back(Pair("bytesrecv", (int64_t)stats.nRecvBytes));
-        obj.push_back(Pair("conntime", (int64_t)stats.nTimeConnected));
+        obj.push_back(Pair("lastsend", stats.nLastSend));
+        obj.push_back(Pair("lastrecv", stats.nLastRecv));
+        obj.push_back(Pair("bytessent", stats.nSendBytes));
+        obj.push_back(Pair("bytesrecv", stats.nRecvBytes));
+        obj.push_back(Pair("conntime", stats.nTimeConnected));
         obj.push_back(Pair("pingtime", stats.dPingTime));
         if (stats.dPingWait > 0.0)
             obj.push_back(Pair("pingwait", stats.dPingWait));
@@ -328,9 +328,9 @@ Value getnettotals(const Array& params, bool fHelp)
        );
 
     Object obj;
-    obj.push_back(Pair("totalbytesrecv", static_cast< uint64_t>(CNode::GetTotalBytesRecv())));
-    obj.push_back(Pair("totalbytessent", static_cast<uint64_t>(CNode::GetTotalBytesSent())));
-    obj.push_back(Pair("timemillis", static_cast<int64_t>(GetTimeMillis())));
+    obj.push_back(Pair("totalbytesrecv", CNode::GetTotalBytesRecv()));
+    obj.push_back(Pair("totalbytessent", CNode::GetTotalBytesSent()));
+    obj.push_back(Pair("timemillis", GetTimeMillis()));
     return obj;
 }
 
@@ -365,7 +365,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
     Object obj;
     obj.push_back(Pair("version",       (int)CLIENT_VERSION));
     obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
-    obj.push_back(Pair("timeoffset",    (boost::int64_t)GetTimeOffset()));
+    obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::nMinRelayTxFee)));
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index c61035ab3557..a8f267d7fc4b 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -57,7 +57,7 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
         conflicts.push_back(conflict.GetHex());
     entry.push_back(Pair("walletconflicts", conflicts));
-    entry.push_back(Pair("time", (int64_t)wtx.GetTxTime()));
+    entry.push_back(Pair("time", wtx.GetTxTime()));
     entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
     BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
         entry.push_back(Pair(item.first, item.second));
@@ -1167,7 +1167,7 @@ void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Ar
         Object entry;
         entry.push_back(Pair("account", acentry.strAccount));
         entry.push_back(Pair("category", "move"));
-        entry.push_back(Pair("time", (int64_t)acentry.nTime));
+        entry.push_back(Pair("time", acentry.nTime));
         entry.push_back(Pair("amount", ValueFromAmount(acentry.nCreditDebit)));
         entry.push_back(Pair("otheraccount", acentry.strOtherAccount));
         entry.push_back(Pair("comment", acentry.strComment));
@@ -1912,9 +1912,9 @@ Value getwalletinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));
     obj.push_back(Pair("balance",       ValueFromAmount(pwalletMain->GetBalance())));
     obj.push_back(Pair("txcount",       (int)pwalletMain->mapWallet.size()));
-    obj.push_back(Pair("keypoololdest", (int64_t)pwalletMain->GetOldestKeyPoolTime()));
+    obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
     obj.push_back(Pair("keypoolsize",   (int)pwalletMain->GetKeyPoolSize()));
     if (pwalletMain->IsCrypted())
-        obj.push_back(Pair("unlocked_until", (int64_t)nWalletUnlockTime));
+        obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
     return obj;
 }

From be54b87f22f10bf84bc25d9e29bf1eed596dc764 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 11:11:02 +0200
Subject: [PATCH 0059/1819] remove ParseString(...) which is never used

---
 src/util.cpp | 20 --------------------
 src/util.h   |  1 -
 2 files changed, 21 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 00e29446d5a3..205af738d5d3 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -303,26 +303,6 @@ int LogPrintStr(const std::string &str)
     return ret;
 }
 
-void ParseString(const string& str, char c, vector<string>& v)
-{
-    if (str.empty())
-        return;
-    string::size_type i1 = 0;
-    string::size_type i2;
-    while (true)
-    {
-        i2 = str.find(c, i1);
-        if (i2 == str.npos)
-        {
-            v.push_back(str.substr(i1));
-            return;
-        }
-        v.push_back(str.substr(i1, i2-i1));
-        i1 = i2+1;
-    }
-}
-
-
 string FormatMoney(int64_t n, bool fPlus)
 {
     // Note: not using straight sprintf here because we do NOT want
diff --git a/src/util.h b/src/util.h
index 27a08716dda9..52ca6e579b1c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -153,7 +153,6 @@ static inline bool error(const char* format)
 
 void LogException(std::exception* pex, const char* pszThread);
 void PrintExceptionContinue(std::exception* pex, const char* pszThread);
-void ParseString(const std::string& str, char c, std::vector<std::string>& v);
 std::string FormatMoney(int64_t n, bool fPlus=false);
 bool ParseMoney(const std::string& str, int64_t& nRet);
 bool ParseMoney(const char* pszIn, int64_t& nRet);

From 5248ff40997c64cc0fde7aaa67cf94dd38b14899 Mon Sep 17 00:00:00 2001
From: Stuart Cardall <developer@it-offshore.co.uk>
Date: Tue, 13 May 2014 10:15:00 +0000
Subject: [PATCH 0060/1819] SetupEnvironment() - clean commit

---
 src/bitcoin-cli.cpp |  2 ++
 src/bitcoind.cpp    |  2 ++
 src/qt/bitcoin.cpp  |  2 ++
 src/util.cpp        | 16 ++++++++++++++++
 src/util.h          |  1 +
 5 files changed, 23 insertions(+)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index ca6950a162e8..ce9e7a4027fd 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -58,6 +58,8 @@ static bool AppInitRPC(int argc, char* argv[])
 
 int main(int argc, char* argv[])
 {
+    SetupEnvironment();
+
     try
     {
         if(!AppInitRPC(argc, argv))
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 17aa0c9d4bae..78c8b2ba0ec1 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -172,6 +172,8 @@ bool AppInit(int argc, char* argv[])
 
 int main(int argc, char* argv[])
 {
+    SetupEnvironment();
+
     bool fRet = false;
 
     // Connect bitcoind signal handlers
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 31716ab8259d..45d7a52889a7 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -459,6 +459,8 @@ WId BitcoinApplication::getMainWinId() const
 #ifndef BITCOIN_QT_TEST
 int main(int argc, char *argv[])
 {
+    SetupEnvironment();
+
     /// 1. Parse command-line options. These take precedence over anything else.
     // Command-line options take precedence:
     ParseParameters(argc, argv);
diff --git a/src/util.cpp b/src/util.cpp
index 00e29446d5a3..2e8500eeae2d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1404,3 +1404,19 @@ bool ParseInt32(const std::string& str, int32_t *out)
         n <= std::numeric_limits<int32_t>::max();
 }
 
+void SetupEnvironment()
+{
+    #ifndef WIN32
+    try
+    {
+	#if BOOST_FILESYSTEM_VERSION == 3
+            boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
+	#else				          // boost filesystem v2
+            std::locale();                      // Raises runtime error if current locale is invalid
+	#endif
+    } catch(std::runtime_error &e)
+    {
+        setenv("LC_ALL", "C", 1); // Force C locale
+    }
+    #endif
+}
diff --git a/src/util.h b/src/util.h
index 27a08716dda9..b252295e7669 100644
--- a/src/util.h
+++ b/src/util.h
@@ -106,6 +106,7 @@ extern volatile bool fReopenDebugLog;
 
 void RandAddSeed();
 void RandAddSeedPerfmon();
+void SetupEnvironment();
 
 /* Return true if log accepts specified category */
 bool LogAcceptCategory(const char* category);

From 122549f6dee5f4d4daf7091d6302c38ba13ffb01 Mon Sep 17 00:00:00 2001
From: David Hill <dhill@conformal.com>
Date: Tue, 13 May 2014 16:38:36 -0400
Subject: [PATCH 0061/1819] Fix incorrect checkpoint data for testnet3

---
 src/checkpoints.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 9ab8b6844322..926949e06a3c 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -66,8 +66,8 @@ namespace Checkpoints
         ;
     static const CCheckpointData dataTestnet = {
         &mapCheckpointsTestnet,
-        1338180505,
-        16341,
+        1337966069,
+        1488,
         300
     };
 

From c6e36b0492dc870c49dafbfb7aa76e28202f8ef0 Mon Sep 17 00:00:00 2001
From: Federico Bond <federicobond@gmail.com>
Date: Thu, 15 May 2014 03:27:35 -0300
Subject: [PATCH 0062/1819] Fix NameError in macdeploy script

---
 contrib/macdeploy/macdeployqtplus | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 5c310df1fce9..599713fbbb90 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -580,7 +580,7 @@ try:
 except RuntimeError as e:
     if verbose >= 1:
         sys.stderr.write("Error: %s\n" % str(e))
-    sys.exit(ret)
+    sys.exit(1)
 
 # ------------------------------------------------
 
@@ -593,7 +593,7 @@ if config.plugins:
     except RuntimeError as e:
         if verbose >= 1:
             sys.stderr.write("Error: %s\n" % str(e))
-        sys.exit(ret)
+        sys.exit(1)
 
 # ------------------------------------------------
 

From 7007402956579ace12d45cdcfae908802d3d6b6d Mon Sep 17 00:00:00 2001
From: Roy Badami <roy@gnomon.org.uk>
Date: Fri, 9 May 2014 23:50:09 +0100
Subject: [PATCH 0063/1819] Implement SI-style (thin space) thoudands separator

---
 src/qt/bitcoinamountfield.cpp    | 49 +++++++++++++++++++++++++++--
 src/qt/bitcoinunits.cpp          | 39 +++++++++++++++++++----
 src/qt/bitcoinunits.h            | 53 ++++++++++++++++++++++++++++++--
 src/qt/overviewpage.cpp          | 10 +++---
 src/qt/sendcoinsdialog.cpp       |  8 ++---
 src/qt/transactiondesc.cpp       | 24 +++++++--------
 src/qt/transactiontablemodel.cpp | 10 +++---
 src/qt/transactiontablemodel.h   |  4 ++-
 src/qt/transactionview.cpp       | 21 +++++++++++++
 src/qt/transactionview.h         |  3 ++
 10 files changed, 184 insertions(+), 37 deletions(-)

diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 25ad0c66af1d..e047c278b7ef 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -14,6 +14,51 @@
 #include <QKeyEvent>
 #include <qmath.h> // for qPow()
 
+// QDoubleSpinBox that shows SI-style thin space thousands separators
+class AmountSpinBox: public QDoubleSpinBox
+{
+public:
+    explicit AmountSpinBox(QWidget *parent):
+        QDoubleSpinBox(parent)
+    {
+    }
+    QString textFromValue(double value) const
+    {
+        QStringList parts = QDoubleSpinBox::textFromValue(value).split(".");
+        QString quotient_str = parts[0];
+        QString remainder_str;
+        if(parts.size() > 1)
+            remainder_str = parts[1];
+
+        // Code duplication between here and BitcoinUnits::format
+        // TODO: Figure out how to share this code
+        QChar thin_sp(THIN_SP_CP);
+        int q_size = quotient_str.size();
+        if (q_size > 4)
+            for (int i = 3; i < q_size; i += 3)
+                quotient_str.insert(q_size - i, thin_sp);
+
+        int r_size = remainder_str.size();
+        if (r_size > 4)
+            for (int i = 3, adj = 0; i < r_size; i += 3, adj++)
+                remainder_str.insert(i + adj, thin_sp);
+
+        if(remainder_str.isEmpty())
+            return quotient_str;
+        else
+            return quotient_str + QString(".") + remainder_str;
+    }
+    QValidator::State validate (QString &text, int &pos) const
+    {
+        QString s(BitcoinUnits::removeSpaces(text));
+        return QDoubleSpinBox::validate(s, pos);
+    }
+    double valueFromText(const QString& text) const
+    {
+        return QDoubleSpinBox::valueFromText(BitcoinUnits::removeSpaces(text));
+    }
+};
+
 BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
     QWidget(parent),
     amount(0),
@@ -21,7 +66,7 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
 {
     nSingleStep = 100000; // satoshis
 
-    amount = new QDoubleSpinBox(this);
+    amount = new AmountSpinBox(this);
     amount->setLocale(QLocale::c());
     amount->installEventFilter(this);
     amount->setMaximumWidth(170);
@@ -52,7 +97,7 @@ void BitcoinAmountField::setText(const QString &text)
     if (text.isEmpty())
         amount->clear();
     else
-        amount->setValue(text.toDouble());
+        amount->setValue(BitcoinUnits::removeSpaces(text).toDouble());
 }
 
 void BitcoinAmountField::clear()
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 2fed443cf2a6..1b5eaa2dc5f5 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -50,8 +50,8 @@ QString BitcoinUnits::description(int unit)
     switch(unit)
     {
     case BTC: return QString("Bitcoins");
-    case mBTC: return QString("Milli-Bitcoins (1 / 1,000)");
-    case uBTC: return QString("Micro-Bitcoins (1 / 1,000,000)");
+    case mBTC: return QString("Milli-Bitcoins (1 / 1" THIN_SP_UTF8 "000)");
+    case uBTC: return QString("Micro-Bitcoins (1 / 1" THIN_SP_UTF8 "000" THIN_SP_UTF8 "000)");
     default: return QString("???");
     }
 }
@@ -100,7 +100,7 @@ int BitcoinUnits::decimals(int unit)
     }
 }
 
-QString BitcoinUnits::format(int unit, qint64 n, bool fPlus)
+QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle separators, bool fAlign)
 {
     // Note: not using straight sprintf here because we do NOT want
     // localized number formatting.
@@ -119,6 +119,23 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus)
     for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i)
         ++nTrim;
     remainder_str.chop(nTrim);
+    if (fAlign)
+        remainder_str.append(QString(QChar(FIGURE_SP_CP)).repeated(nTrim));
+
+    // Use SI-stule separators as these are locale indendent and can't be
+    // confused with the decimal marker.  Rule is to use a thin space every
+    // three digits on *both* sides of the decimal point - but only if there
+    // are five or more digits
+    QChar thin_sp(THIN_SP_CP);
+    int q_size = quotient_str.size();
+    if (separators == separatorAlways || (separators == separatorStandard && q_size > 4))
+        for (int i = 3; i < q_size; i += 3)
+            quotient_str.insert(q_size - i, thin_sp);
+
+    int r_size = remainder_str.size();
+    if (separators == separatorAlways || (separators == separatorStandard && r_size > 4))
+        for (int i = 3, adj = 0; i < r_size ; i += 3, adj++)
+            remainder_str.insert(i + adj, thin_sp);
 
     if (n < 0)
         quotient_str.insert(0, '-');
@@ -127,17 +144,27 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus)
     return quotient_str + QString(".") + remainder_str;
 }
 
-QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign)
+QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators, bool fAlign)
 {
-    return format(unit, amount, plussign) + QString(" ") + name(unit);
+    return format(unit, amount, plussign, separators, fAlign) + QString(" ") + name(unit);
 }
 
+QString BitcoinUnits::formatHtmlWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
+{
+    QString str(formatWithUnit(unit, amount, plussign, separators));
+    str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
+    return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
+}
+
+
 bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out)
 {
     if(!valid(unit) || value.isEmpty())
         return false; // Refuse to parse invalid unit or empty string
     int num_decimals = decimals(unit);
-    QStringList parts = value.split(".");
+
+    // Ignore spaces and thin spaces when parsing
+    QStringList parts = removeSpaces(value).split(".");
 
     if(parts.size() > 2)
     {
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 46517fc07b7f..a3017b9a8b3a 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -8,6 +8,37 @@
 #include <QAbstractListModel>
 #include <QString>
 
+// U+2009 THIN SPACE = UTF-8 E2 80 89
+#define REAL_THIN_SP_CP 0x2009
+#define REAL_THIN_SP_UTF8 "\xE2\x80\x89"
+#define REAL_THIN_SP_HTML "&thinsp;"
+
+// U+200A HAIR SPACE = UTF-8 E2 80 8A
+#define HAIR_SP_CP 0x200A
+#define HAIR_SP_UTF8 "\xE2\x80\x8A"
+#define HAIR_SP_HTML "&#8202;"
+
+// U+2006 SIX-PER-EM SPACE = UTF-8 E2 80 86
+#define SIXPEREM_SP_CP 0x2006
+#define SIXPEREM_SP_UTF8 "\xE2\x80\x86"
+#define SIXPEREM_SP_HTML "&#8198;"
+
+// U+2007 FIGURE SPACE = UTF-8 E2 80 87
+#define FIGURE_SP_CP 0x2007
+#define FIGURE_SP_UTF8 "\xE2\x80\x87"
+#define FIGURE_SP_HTML "&#8199;"
+
+// QMessageBox seems to have a bug whereby it doesn't display thin/hair spaces
+// correctly.  Workaround is to display a space in a small font.  If you
+// change this, please test that it doesn't cause the parent span to start
+// wrapping.
+#define HTML_HACK_SP "<span style='white-space: nowrap; font-size: 6pt'> </span>"
+
+// Define THIN_SP_* variables to be our preferred type of thin space
+#define THIN_SP_CP   REAL_THIN_SP_CP
+#define THIN_SP_UTF8 REAL_THIN_SP_UTF8
+#define THIN_SP_HTML HTML_HACK_SP
+
 /** Bitcoin unit definitions. Encapsulates parsing and formatting
    and serves as list model for drop-down selection boxes.
 */
@@ -28,6 +59,13 @@ class BitcoinUnits: public QAbstractListModel
         uBTC
     };
 
+    enum SeparatorStyle
+    {
+        separatorNever,
+        separatorStandard,
+        separatorAlways
+    };
+
     //! @name Static API
     //! Unit conversion and formatting
     ///@{
@@ -49,9 +87,10 @@ class BitcoinUnits: public QAbstractListModel
     //! Number of decimals left
     static int decimals(int unit);
     //! Format as string
-    static QString format(int unit, qint64 amount, bool plussign=false);
+    static QString format(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard, bool fAlign=false);
     //! Format as string (with unit)
-    static QString formatWithUnit(int unit, qint64 amount, bool plussign=false);
+    static QString formatWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard, bool fAlign=false);
+    static QString formatHtmlWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Parse string to coin amount
     static bool parse(int unit, const QString &value, qint64 *val_out);
     ///@}
@@ -67,6 +106,16 @@ class BitcoinUnits: public QAbstractListModel
     QVariant data(const QModelIndex &index, int role) const;
     ///@}
 
+    static QString removeSpaces(QString text)
+    {
+        text.remove(' ');
+        text.remove(QChar(THIN_SP_CP));
+#if (THIN_SP_CP != REAL_THIN_SP_CP)
+        text.remove(QChar(REAL_THIN_SP_CP));
+#endif
+        return text;
+    }
+
 private:
     QList<BitcoinUnits::Unit> unitlist;
 };
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1a9d1de571d9..311563d94612 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -72,7 +72,7 @@ class TxViewDelegate : public QAbstractItemDelegate
             foreground = option.palette.color(QPalette::Text);
         }
         painter->setPen(foreground);
-        QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true);
+        QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true, BitcoinUnits::separatorAlways, true);
         if(!confirmed)
         {
             amountText = QString("[") + amountText + QString("]");
@@ -141,10 +141,10 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
     currentBalance = balance;
     currentUnconfirmedBalance = unconfirmedBalance;
     currentImmatureBalance = immatureBalance;
-    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
-    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance));
-    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance));
-    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance));
+    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways, true));
+    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance, false, BitcoinUnits::separatorAlways, true));
+    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance, false, BitcoinUnits::separatorAlways, true));
+    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways, true));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 33621e54b029..f432c4add63b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -142,7 +142,7 @@ void SendCoinsDialog::on_sendButton_clicked()
     foreach(const SendCoinsRecipient &rcp, recipients)
     {
         // generate bold amount string
-        QString amount = "<b>" + BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount);
+        QString amount = "<b>" + BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), rcp.amount);
         amount.append("</b>");
         // generate monospace address string
         QString address = "<span style='font-family: monospace;'>" + rcp.address;
@@ -210,7 +210,7 @@ void SendCoinsDialog::on_sendButton_clicked()
     {
         // append fee string if a fee is required
         questionString.append("<hr /><span style='color:#aa0000;'>");
-        questionString.append(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee));
+        questionString.append(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee));
         questionString.append("</span> ");
         questionString.append(tr("added as transaction fee"));
     }
@@ -222,10 +222,10 @@ void SendCoinsDialog::on_sendButton_clicked()
     foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
     {
         if(u != model->getOptionsModel()->getDisplayUnit())
-            alternativeUnits.append(BitcoinUnits::formatWithUnit(u, totalAmount));
+            alternativeUnits.append(BitcoinUnits::formatHtmlWithUnit(u, totalAmount));
     }
     questionString.append(tr("Total Amount %1 (= %2)")
-        .arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))
+        .arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))
         .arg(alternativeUnits.join(" " + tr("or") + " ")));
 
     QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"),
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 45fb3d40c2ae..0bb93035cc03 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -138,7 +138,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
             nUnmatured += wallet->GetCredit(txout);
         strHTML += "<b>" + tr("Credit") + ":</b> ";
         if (wtx.IsInMainChain())
-            strHTML += BitcoinUnits::formatWithUnit(unit, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
+            strHTML += BitcoinUnits::formatHtmlWithUnit(unit, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
         else
             strHTML += "(" + tr("not accepted") + ")";
         strHTML += "<br>";
@@ -148,7 +148,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
         //
         // Credit
         //
-        strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nNet) + "<br>";
+        strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nNet) + "<br>";
     }
     else
     {
@@ -184,7 +184,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
                     }
                 }
 
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -txout.nValue) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -txout.nValue) + "<br>";
             }
 
             if (fAllToMe)
@@ -192,13 +192,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
                 // Payment to self
                 int64_t nChange = wtx.GetChange();
                 int64_t nValue = nCredit - nChange;
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -nValue) + "<br>";
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nValue) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nValue) + "<br>";
+                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
             }
 
             int64_t nTxFee = nDebit - wtx.GetValueOut();
             if (nTxFee > 0)
-                strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -nTxFee) + "<br>";
+                strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
         }
         else
         {
@@ -207,14 +207,14 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
             //
             BOOST_FOREACH(const CTxIn& txin, wtx.vin)
                 if (wallet->IsMine(txin))
-                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
+                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
             BOOST_FOREACH(const CTxOut& txout, wtx.vout)
                 if (wallet->IsMine(txout))
-                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
+                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
         }
     }
 
-    strHTML += "<b>" + tr("Net amount") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nNet, true) + "<br>";
+    strHTML += "<b>" + tr("Net amount") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nNet, true) + "<br>";
 
     //
     // Message
@@ -260,10 +260,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
         strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
             if(wallet->IsMine(txin))
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             if(wallet->IsMine(txout))
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
+                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
 
         strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
         strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
@@ -289,7 +289,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
                             strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + " ";
                         strHTML += QString::fromStdString(CBitcoinAddress(address).ToString());
                     }
-                    strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatWithUnit(unit, vout.nValue);
+                    strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatHtmlWithUnit(unit, vout.nValue);
                     strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) ? tr("true") : tr("false")) + "</li>";
                 }
             }
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 8cf2b0a1b1e4..c0f7edd87190 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -5,7 +5,6 @@
 #include "transactiontablemodel.h"
 
 #include "addresstablemodel.h"
-#include "bitcoinunits.h"
 #include "guiconstants.h"
 #include "guiutil.h"
 #include "optionsmodel.h"
@@ -425,9 +424,9 @@ QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
     return QVariant();
 }
 
-QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed) const
+QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators, bool fAlign) const
 {
-    QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit);
+    QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit, false, separators, fAlign);
     if(showUnconfirmed)
     {
         if(!wtx->status.countsForBalance)
@@ -512,7 +511,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         case ToAddress:
             return formatTxToAddress(rec, false);
         case Amount:
-            return formatTxAmount(rec);
+            return formatTxAmount(rec, true, BitcoinUnits::separatorAlways, true);
         }
         break;
     case Qt::EditRole:
@@ -569,7 +568,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case ConfirmedRole:
         return rec->status.countsForBalance;
     case FormattedAmountRole:
-        return formatTxAmount(rec, false);
+	// Used for copy/export, so don't include separators
+        return formatTxAmount(rec, false, BitcoinUnits::separatorNever);
     case StatusRole:
         return rec->status.status;
     }
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 333e6bc6ed58..9ee375d7875f 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -8,6 +8,8 @@
 #include <QAbstractTableModel>
 #include <QStringList>
 
+#include "bitcoinunits.h"
+
 class TransactionRecord;
 class TransactionTablePriv;
 class WalletModel;
@@ -78,7 +80,7 @@ class TransactionTableModel : public QAbstractTableModel
     QString formatTxDate(const TransactionRecord *wtx) const;
     QString formatTxType(const TransactionRecord *wtx) const;
     QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const;
-    QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true) const;
+    QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard, bool fAlign=false) const;
     QString formatTooltip(const TransactionRecord *rec) const;
     QVariant txStatusDecoration(const TransactionRecord *wtx) const;
     QVariant txAddressDecoration(const TransactionRecord *wtx) const;
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index d4d29416caff..98914fc2d0cd 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -123,6 +123,8 @@ TransactionView::TransactionView(QWidget *parent) :
     view->setTabKeyNavigation(false);
     view->setContextMenuPolicy(Qt::CustomContextMenu);
 
+    view->installEventFilter(this);
+
     transactionView = view;
 
     // Actions
@@ -480,3 +482,22 @@ void TransactionView::resizeEvent(QResizeEvent* event)
     QWidget::resizeEvent(event);
     columnResizingFixer->stretchColumnWidth(TransactionTableModel::ToAddress);
 }
+
+// Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
+bool TransactionView::eventFilter(QObject *obj, QEvent *event)
+{
+    if (event->type() == QEvent::KeyPress)
+    {
+        QKeyEvent *ke = static_cast<QKeyEvent *>(event);
+        if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
+        {
+            QModelIndex i = this->transactionView->currentIndex();
+            if (i.isValid() && i.column() == TransactionTableModel::Amount)
+            {
+                 GUIUtil::setClipboard(i.data(TransactionTableModel::FormattedAmountRole).toString());
+                 return true;
+            }
+        }
+    }
+    return QWidget::eventFilter(obj, event);
+}
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index 7a89fa11caea..618efbc5658a 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -8,6 +8,7 @@
 #include "guiutil.h"
 
 #include <QWidget>
+#include <QKeyEvent>
 
 class TransactionFilterProxy;
 class WalletModel;
@@ -78,6 +79,8 @@ class TransactionView : public QWidget
 
     virtual void resizeEvent(QResizeEvent* event);
 
+    bool eventFilter(QObject *obj, QEvent *event);
+
 private slots:
     void contextualMenu(const QPoint &);
     void dateRangeChanged();

From 0b78ba8ad69d55817f2b62c631a71b5ac32549f1 Mon Sep 17 00:00:00 2001
From: Huang Le <4tarhl@gmail.com>
Date: Tue, 20 May 2014 01:22:33 +0800
Subject: [PATCH 0064/1819] Remove fDaemon flag checking on return from main(),
 which is useless and looks really strange.

---
 src/bitcoind.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 78c8b2ba0ec1..9b535c2e6b98 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -174,15 +174,8 @@ int main(int argc, char* argv[])
 {
     SetupEnvironment();
 
-    bool fRet = false;
-
     // Connect bitcoind signal handlers
     noui_connect();
 
-    fRet = AppInit(argc, argv);
-
-    if (fRet && fDaemon)
-        return 0;
-
-    return (fRet ? 0 : 1);
+    return (AppInit(argc, argv) ? 0 : 1);
 }

From 0a59723ff6218d545438e8e0f3083fc1d1b98bd4 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Tue, 20 May 2014 12:15:56 +0800
Subject: [PATCH 0065/1819] Remove extraneous c_str

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index f7c53052e10e..7bb3bdb70cb3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4445,7 +4445,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             uint256 hash = state.vBlocksToDownload.front();
             vGetData.push_back(CInv(MSG_BLOCK, hash));
             MarkBlockAsInFlight(pto->GetId(), hash);
-            LogPrint("net", "Requesting block %s from %s\n", hash.ToString().c_str(), state.name.c_str());
+            LogPrint("net", "Requesting block %s from %s\n", hash.ToString(), state.name);
             if (vGetData.size() >= 1000)
             {
                 pto->PushMessage("getdata", vGetData);

From 0e31e5631c279353564f6407b8950b1224cf5b9f Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 20:48:34 +0200
Subject: [PATCH 0066/1819] remove CWallet::AddReserveKey which is never used

---
 src/wallet.cpp | 15 ---------------
 src/wallet.h   |  1 -
 2 files changed, 16 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index fa7aecddb66f..89604f96acac 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1671,21 +1671,6 @@ void CWallet::ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool)
     }
 }
 
-int64_t CWallet::AddReserveKey(const CKeyPool& keypool)
-{
-    {
-        LOCK2(cs_main, cs_wallet);
-        CWalletDB walletdb(strWalletFile);
-
-        int64_t nIndex = 1 + *(--setKeyPool.end());
-        if (!walletdb.WritePool(nIndex, keypool))
-            throw runtime_error("AddReserveKey() : writing added key failed");
-        setKeyPool.insert(nIndex);
-        return nIndex;
-    }
-    return -1;
-}
-
 void CWallet::KeepKey(int64_t nIndex)
 {
     // Remove from key pool
diff --git a/src/wallet.h b/src/wallet.h
index b2c06d3f6185..5e9af191cc0b 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -263,7 +263,6 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     bool NewKeyPool();
     bool TopUpKeyPool(unsigned int kpSize = 0);
-    int64_t AddReserveKey(const CKeyPool& keypool);
     void ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool);
     void KeepKey(int64_t nIndex);
     void ReturnKey(int64_t nIndex);

From f4057cb749f4c0d04bf936805ff8aa5678b9c6f2 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 20:58:25 +0200
Subject: [PATCH 0067/1819] remove CTransaction::IsNewerThan which is never
 used

---
 src/core.cpp | 29 -----------------------------
 src/core.h   |  1 -
 2 files changed, 30 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 7651ce9957ed..aadcb44b9865 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -77,35 +77,6 @@ uint256 CTransaction::GetHash() const
     return SerializeHash(*this);
 }
 
-bool CTransaction::IsNewerThan(const CTransaction& old) const
-{
-    if (vin.size() != old.vin.size())
-        return false;
-    for (unsigned int i = 0; i < vin.size(); i++)
-        if (vin[i].prevout != old.vin[i].prevout)
-            return false;
-
-    bool fNewer = false;
-    unsigned int nLowest = std::numeric_limits<unsigned int>::max();
-    for (unsigned int i = 0; i < vin.size(); i++)
-    {
-        if (vin[i].nSequence != old.vin[i].nSequence)
-        {
-            if (vin[i].nSequence <= nLowest)
-            {
-                fNewer = false;
-                nLowest = vin[i].nSequence;
-            }
-            if (old.vin[i].nSequence < nLowest)
-            {
-                fNewer = true;
-                nLowest = old.vin[i].nSequence;
-            }
-        }
-    }
-    return fNewer;
-}
-
 int64_t CTransaction::GetValueOut() const
 {
     int64_t nValueOut = 0;
diff --git a/src/core.h b/src/core.h
index 5eb953610d0a..ba7f69111917 100644
--- a/src/core.h
+++ b/src/core.h
@@ -219,7 +219,6 @@ class CTransaction
     }
 
     uint256 GetHash() const;
-    bool IsNewerThan(const CTransaction& old) const;
 
     // Return sum of txouts.
     int64_t GetValueOut() const;

From 595f691d0acd871ecaba323d888a3632805c1828 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 21:00:16 +0200
Subject: [PATCH 0068/1819] remove LogException( ) which is never used

---
 src/util.cpp | 6 ------
 src/util.h   | 2 --
 2 files changed, 8 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index aa3adf89ece4..d99e6a7bfbd1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -885,12 +885,6 @@ static std::string FormatException(std::exception* pex, const char* pszThread)
             "UNKNOWN EXCEPTION       \n%s in %s       \n", pszModule, pszThread);
 }
 
-void LogException(std::exception* pex, const char* pszThread)
-{
-    std::string message = FormatException(pex, pszThread);
-    LogPrintf("\n%s", message);
-}
-
 void PrintExceptionContinue(std::exception* pex, const char* pszThread)
 {
     std::string message = FormatException(pex, pszThread);
diff --git a/src/util.h b/src/util.h
index 97185073e0d7..dc0c3a8caead 100644
--- a/src/util.h
+++ b/src/util.h
@@ -151,8 +151,6 @@ static inline bool error(const char* format)
     return false;
 }
 
-
-void LogException(std::exception* pex, const char* pszThread);
 void PrintExceptionContinue(std::exception* pex, const char* pszThread);
 std::string FormatMoney(int64_t n, bool fPlus=false);
 bool ParseMoney(const std::string& str, int64_t& nRet);

From 5bd4adca716738a4de35aed2ccad874d3301fefc Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 21:02:17 +0200
Subject: [PATCH 0069/1819] remove LookupHostNumeric( ) which is never used

---
 src/netbase.cpp | 5 -----
 src/netbase.h   | 1 -
 2 files changed, 6 deletions(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 82a681281d22..c72d777e3de7 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -123,11 +123,6 @@ bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nM
     return LookupIntern(strHost.c_str(), vIP, nMaxSolutions, fAllowLookup);
 }
 
-bool LookupHostNumeric(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions)
-{
-    return LookupHost(pszName, vIP, nMaxSolutions, false);
-}
-
 bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault, bool fAllowLookup, unsigned int nMaxSolutions)
 {
     if (pszName[0] == 0)
diff --git a/src/netbase.h b/src/netbase.h
index 118f866d6c95..35547b266053 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -173,7 +173,6 @@ bool IsProxy(const CNetAddr &addr);
 bool SetNameProxy(CService addrProxy, int nSocksVersion = 5);
 bool HaveNameProxy();
 bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true);
-bool LookupHostNumeric(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0);
 bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);
 bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0);
 bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);

From 28b6c1def57360ca5a05745faafaec53910f5e88 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 21:37:47 +0200
Subject: [PATCH 0070/1819] remove GetMedianTime( ) which is never used

---
 src/main.cpp | 13 -------------
 src/main.h   |  2 --
 2 files changed, 15 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c54fa65233a5..126b4ada51d5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2575,19 +2575,6 @@ bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, uns
     return (nFound >= nRequired);
 }
 
-int64_t CBlockIndex::GetMedianTime() const
-{
-    AssertLockHeld(cs_main);
-    const CBlockIndex* pindex = this;
-    for (int i = 0; i < nMedianTimeSpan/2; i++)
-    {
-        if (!chainActive.Next(pindex))
-            return GetBlockTime();
-        pindex = chainActive.Next(pindex);
-    }
-    return pindex->GetMedianTimePast();
-}
-
 void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
 {
     AssertLockHeld(cs_main);
diff --git a/src/main.h b/src/main.h
index f47c9ee8252a..25f70e7ad46f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -849,8 +849,6 @@ class CBlockIndex
         return pbegin[(pend - pbegin)/2];
     }
 
-    int64_t GetMedianTime() const;
-
     /**
      * Returns true if there are nRequired or more blocks of minVersion or above
      * in the last nToCheck blocks, starting at pstart and going backwards.

From f40dbeedde3a6a73c13b0241258cf23248db1de1 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Tue, 13 May 2014 21:41:51 +0200
Subject: [PATCH 0071/1819] remove CPubKey::VerifyCompact( ) which is never
 used

---
 src/key.cpp | 15 ---------------
 src/key.h   |  4 ----
 2 files changed, 19 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 2199996cf3df..aa24f0a62274 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -485,21 +485,6 @@ bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned cha
     return true;
 }
 
-bool CPubKey::VerifyCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) const {
-    if (!IsValid())
-        return false;
-    if (vchSig.size() != 65)
-        return false;
-    CECKey key;
-    if (!key.Recover(hash, &vchSig[1], (vchSig[0] - 27) & ~4))
-        return false;
-    CPubKey pubkeyRec;
-    key.GetPubKey(pubkeyRec, IsCompressed());
-    if (*this != pubkeyRec)
-        return false;
-    return true;
-}
-
 bool CPubKey::IsFullyValid() const {
     if (!IsValid())
         return false;
diff --git a/src/key.h b/src/key.h
index 37a06810b4e9..983775fd2310 100644
--- a/src/key.h
+++ b/src/key.h
@@ -156,10 +156,6 @@ class CPubKey {
     // If this public key is not fully valid, the return value will be false.
     bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const;
 
-    // Verify a compact signature (~65 bytes).
-    // See CKey::SignCompact.
-    bool VerifyCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) const;
-
     // Recover a public key from a compact signature.
     bool RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig);
 

From d16f6f87e1c15bd686e0e74ddb671da95a916c6d Mon Sep 17 00:00:00 2001
From: Federico Bond <federicobond@gmail.com>
Date: Thu, 15 May 2014 03:22:42 -0300
Subject: [PATCH 0072/1819] Remove unused imports in macdeploy script

---
 contrib/macdeploy/README.md       |  4 ----
 contrib/macdeploy/macdeployqtplus | 11 -----------
 2 files changed, 15 deletions(-)

diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md
index 5f0611f20cd5..0aa57b477713 100644
--- a/contrib/macdeploy/README.md
+++ b/contrib/macdeploy/README.md
@@ -1,9 +1,5 @@
 ### MacDeploy ###
 
-You will need the appscript package for the fancy disk image creation to work:
-
-	sudo easy_install appscript
-
 For Snow Leopard (which uses [Python 2.6](http://www.python.org/download/releases/2.6/)), you will need the param_parser package:
 	
 	sudo easy_install argparse
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 5c310df1fce9..4bfaadffd73a 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -19,7 +19,6 @@
 
 import subprocess, sys, re, os, shutil, stat, os.path
 from string import Template
-from time import sleep
 from argparse import ArgumentParser
 
 # This is ported from the original macdeployqt with modifications
@@ -488,16 +487,6 @@ if len(config.fancy) == 1:
             sys.stderr.write("Error: Could not import plistlib which is required for fancy disk images.\n")
         sys.exit(1)
     
-    if verbose >= 3:
-        print "Fancy: Importing appscript..."
-    try:
-        import appscript
-    except ImportError:
-        if verbose >= 1:
-            sys.stderr.write("Error: Could not import appscript which is required for fancy disk images.\n")
-            sys.stderr.write("Please install it e.g. with \"sudo easy_install appscript\".\n")
-        sys.exit(1)
-    
     p = config.fancy[0]
     if verbose >= 3:
         print "Fancy: Loading \"%s\"..." % p

From d4e1c61212c3f28f80c7184aca81f5d118fad460 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 5 May 2014 21:06:14 +0200
Subject: [PATCH 0073/1819] add DEFAULT_UPNP constant in net

- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
---
 src/net.cpp             | 4 +---
 src/net.h               | 6 ++++++
 src/qt/optionsmodel.cpp | 6 +-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 6bde1e79993f..7cabfef09996 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1736,10 +1736,8 @@ void StartNode(boost::thread_group& threadGroup)
     else
         threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "dnsseed", &ThreadDNSAddressSeed));
 
-#ifdef USE_UPNP
     // Map ports with UPnP
-    MapPort(GetBoolArg("-upnp", USE_UPNP));
-#endif
+    MapPort(GetBoolArg("-upnp", DEFAULT_UPNP));
 
     // Send and receive from sockets, accept connections
     threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "net", &ThreadSocketHandler));
diff --git a/src/net.h b/src/net.h
index 729b1bcd5748..21b8dd242f61 100644
--- a/src/net.h
+++ b/src/net.h
@@ -38,6 +38,12 @@ namespace boost {
 
 /** The maximum number of entries in an 'inv' protocol message */
 static const unsigned int MAX_INV_SZ = 50000;
+/** -upnp default */
+#ifdef USE_UPNP
+static const bool DEFAULT_UPNP = USE_UPNP;
+#else
+static const bool DEFAULT_UPNP = false;
+#endif
 
 inline unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); }
 inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); }
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index e87a1d97e754..051098315ded 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -106,11 +106,7 @@ void OptionsModel::Init()
 
     // Network
     if (!settings.contains("fUseUPnP"))
-#ifdef USE_UPNP
-        settings.setValue("fUseUPnP", true);
-#else
-        settings.setValue("fUseUPnP", false);
-#endif
+        settings.setValue("fUseUPnP", DEFAULT_UPNP);
     if (!SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool()))
         addOverriddenOption("-upnp");
 

From 305ccaa27551efa33fcaf637e76310654738f428 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 20 May 2014 21:45:12 +0200
Subject: [PATCH 0074/1819] Add missing LOCK(cs_main)

---
 src/main.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index c54fa65233a5..a1fe6c07bcd3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3488,7 +3488,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         return true;
     }
 
-    State(pfrom->GetId())->nLastBlockProcess = GetTimeMicros();
+    {
+        LOCK(cs_main);
+        State(pfrom->GetId())->nLastBlockProcess = GetTimeMicros();
+    }
 
 
 

From f701da8f707726e4097e17234cdd7b55255c1077 Mon Sep 17 00:00:00 2001
From: Kosta Zertsekel <zertsekel@gmail.com>
Date: Mon, 19 May 2014 13:42:57 +0300
Subject: [PATCH 0075/1819] Doc: Always use absolute paths

---
 doc/build-unix.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index ab5fbad521c9..1d75c206e534 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -2,6 +2,16 @@ UNIX BUILD NOTES
 ====================
 Some notes on how to build Bitcoin in Unix. 
 
+Note
+---------------------
+Always use absolute paths to configure and compile bitcoin and the dependencies,
+for example, when specifying the the path of the dependency:
+
+	../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
+
+Here BDB_PREFIX must absolute path - it is defined using $(pwd) which ensures
+the usage of the absolute path.
+
 To Build
 ---------------------
 

From 1a97b22b9c8ca6f1c3c7e3285e1b98893691d421 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 13 May 2014 19:23:22 -0400
Subject: [PATCH 0076/1819] gitian: Add OSX build descriptors

Github-Pull: #4185
Rebased-By: Wladimir J. van der Laan
Rebased-From: bb5da27, 2288206, 7fe8fe6, f76db78, ebcf375, fa1ed7c, 397e9b8
---
 .../gitian-descriptors/gitian-osx-bitcoin.yml |  65 ++++++
 .../gitian-descriptors/gitian-osx-depends.yml | 160 +++++++++++++++
 .../gitian-descriptors/gitian-osx-native.yml  | 179 ++++++++++++++++
 contrib/gitian-descriptors/gitian-osx-qt.yml  | 192 ++++++++++++++++++
 doc/README_osx.txt                            |  71 +++++++
 doc/release-process.md                        |  49 +++--
 6 files changed, 699 insertions(+), 17 deletions(-)
 create mode 100644 contrib/gitian-descriptors/gitian-osx-bitcoin.yml
 create mode 100644 contrib/gitian-descriptors/gitian-osx-depends.yml
 create mode 100644 contrib/gitian-descriptors/gitian-osx-native.yml
 create mode 100644 contrib/gitian-descriptors/gitian-osx-qt.yml
 create mode 100644 doc/README_osx.txt

diff --git a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
new file mode 100644
index 000000000000..aea4b93a1f80
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
@@ -0,0 +1,65 @@
+---
+name: "bitcoin"
+suites:
+- "precise"
+architectures:
+- "i386"
+packages:
+- "git-core"
+- "automake"
+- "faketime"
+- "bsdmainutils"
+- "pkg-config"
+- "p7zip-full"
+
+reference_datetime: "2013-06-01 00:00:00"
+remotes:
+- "url": "https://github.com/bitcoin/bitcoin.git"
+  "dir": "bitcoin"
+files:
+- "osx-native-depends-r2.tar.gz"
+- "osx-depends-r2.tar.gz"
+- "osx-depends-qt-5.2.1-r2.tar.gz"
+- "MacOSX10.6.pkg"
+
+script: |
+
+  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
+
+  HOST=x86_64-apple-darwin11
+  PREFIX=`pwd`/osx-cross-depends/prefix
+  SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.6.sdk
+  NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix
+  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+
+  export SOURCES_PATH=`pwd`
+
+  mkdir osx-cross-depends
+
+  cd osx-cross-depends
+  mkdir -p SDKs
+  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+  cd ..
+
+  tar -C osx-cross-depends -xf osx-native-depends-r2.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-r2.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r2.tar.gz
+  export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
+
+  cd bitcoin
+
+  export ZERO_AR_DATE=1
+  export QT_RCC_TEST=1
+  ./autogen.sh
+  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode
+  make dist
+  mkdir -p distsrc
+  cd distsrc
+  tar --strip-components=1 -xf ../bitcoin-*.tar*
+  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig"  --disable-dependency-tracking --disable-maintainer-mode
+  make $MAKEOPTS
+  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
+  export FAKETIME=$REFERENCE_DATETIME
+  export TZ=UTC
+  make deploy
+  dmg dmg Bitcoin-Qt.dmg $OUTDIR/Bitcoin-Qt.dmg
diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml
new file mode 100644
index 000000000000..8e91a30ded94
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx-depends.yml
@@ -0,0 +1,160 @@
+---
+name: "osx-depends"
+suites:
+- "precise"
+architectures:
+- "i386"
+packages:
+- "git-core"
+- "automake"
+- "p7zip-full"
+
+reference_datetime: "2013-06-01 00:00:00"
+remotes: []
+files:
+- "boost_1_55_0.tar.bz2"
+- "db-4.8.30.NC.tar.gz"
+- "miniupnpc-1.9.tar.gz"
+- "openssl-1.0.1g.tar.gz"
+- "protobuf-2.5.0.tar.bz2"
+- "qrencode-3.4.3.tar.bz2"
+- "MacOSX10.6.pkg"
+- "osx-native-depends-r2.tar.gz"
+
+script: |
+
+  echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | sha256sum -c
+  echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz" | sha256sum -c
+  echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz" | sha256sum -c
+  echo "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028  openssl-1.0.1g.tar.gz" | sha256sum -c
+  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
+  echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
+  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
+
+  REVISION=r2
+  export SOURCES_PATH=`pwd`
+  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export PATH=$HOME:$PATH
+  export SOURCES_PATH=`pwd`
+  export ZERO_AR_DATE=1
+
+  mkdir -p osx-cross-depends/build
+  cd osx-cross-depends
+
+  PREFIX=`pwd`/prefix
+  NATIVEPREFIX=`pwd`/native-prefix
+  BUILD_BASE=`pwd`/build
+  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  HOST=x86_64-apple-darwin11
+  MIN_VERSION=10.6
+
+  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
+  INT_CXXFLAGS="${INT_CFLAGS}"
+  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
+  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
+  INT_CPPFLAGS="-I${PREFIX}/include"
+  INT_CC=clang
+  INT_CXX=clang++
+  INT_OBJC=clang
+  INT_OBJCXX=clang++
+  INT_AR=${HOST}-ar
+  INT_RANLIB=${HOST}-ranlib
+  INT_LIBTOOL=${HOST}-libtool
+  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
+
+  export PATH=${NATIVEPREFIX}/bin:${PATH}
+
+  mkdir -p ${NATIVEPREFIX}/bin
+  mkdir -p ${NATIVEPREFIX}/lib
+  mkdir -p ${PREFIX}/bin
+  mkdir -p ${PREFIX}/lib
+  mkdir -p ${BUILD_BASE}
+
+  mkdir -p ${SDK}
+  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+
+  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
+
+  # bdb
+  SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz
+  BUILD_DIR=${BUILD_BASE}/db-4.8.30.NC
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ${BUILD_DIR}/dbinc/atomic.h
+  pushd ${BUILD_DIR}
+  cd build_unix;
+  ../dist/configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}"
+  make $MAKEOPTS libdb.a libdb_cxx.a
+  make  install_lib install_include
+  popd
+
+  # openssl
+  SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1g.tar.gz
+  BUILD_DIR=${BUILD_BASE}/openssl-1.0.1g
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+  sed -ie "s|cc:|${INT_CC}:|" ${BUILD_DIR}/Configure
+  sed -ie "s|\(-arch [_a-zA-Z0-9]*\)|\1 --sysroot ${SDK}  -target ${HOST} -msse2|" ${BUILD_DIR}/Configure
+  AR="${INT_AR}" RANLIB="${INT_RANLIB}" ./Configure --prefix=${PREFIX} --openssldir=${PREFIX}/etc/openssl zlib shared no-krb5 darwin64-x86_64-cc ${INT_LDFLAGS} ${INT_CLANG_LDFLAGS} ${INT_CPPFLAGS}
+  sed -i "s|engines apps test|engines|" ${BUILD_DIR}/Makefile
+  sed -i "/define DATE/d" ${BUILD_DIR}/crypto/Makefile
+  make -j1 build_libs libcrypto.pc libssl.pc openssl.pc
+  make -j1 install_sw
+  popd
+
+  #libminiupnpc
+  SOURCE_FILE=${SOURCES_PATH}/miniupnpc-1.9.tar.gz
+  BUILD_DIR=${BUILD_BASE}/miniupnpc-1.9
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+  CFLAGS="${INT_CFLAGS} ${INT_CPPFLAGS}" make $MAKEOPTS OS=Darwin CC="${INT_CC}" AR="${INT_AR}" libminiupnpc.a
+  install -d ${PREFIX}/include/miniupnpc
+  install *.h ${PREFIX}/include/miniupnpc
+  install libminiupnpc.a  ${PREFIX}/lib
+  popd
+
+  # qrencode
+  SOURCE_FILE=${SOURCES_PATH}/qrencode-3.4.3.tar.bz2
+  BUILD_DIR=${BUILD_BASE}/qrencode-3.4.3
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+
+  # m4 folder is not included in the stable release, which can confuse aclocal
+  # if its timestamp ends up being earlier than configure.ac when extracted
+  touch aclocal.m4
+  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --disable-shared -without-tools --disable-sdltest --disable-dependency-tracking
+  make $MAKEOPTS
+  make install
+  popd
+
+  # libprotobuf
+  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
+  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
+
+  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --enable-shared=no --disable-dependency-tracking --with-protoc=${NATIVEPREFIX}/bin/protoc
+  cd src
+  make $MAKEOPTS libprotobuf.la
+  make install-libLTLIBRARIES install-nobase_includeHEADERS
+  cd ..
+  make install-pkgconfigDATA
+  popd
+
+  # boost
+  SOURCE_FILE=${SOURCES_PATH}/boost_1_55_0.tar.bz2
+  BUILD_DIR=${BUILD_BASE}/boost_1_55_0
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+  ./bootstrap.sh --with-libraries=chrono,filesystem,program_options,system,thread,test
+  echo "using darwin : : ${INT_CXX} : <cxxflags>\"${INT_CFLAGS} ${INT_CPPFLAGS}\" <linkflags>\"${INT_LDFLAGS} ${INT_CLANG_LDFLAGS}\" <archiver>\"${INT_LIBTOOL}\" <striper>\"${INT_STRIP}\" : ;" > "user-config.jam"
+  ./b2 -d2 --layout=tagged --build-type=complete --prefix="${PREFIX}" --toolset=darwin-4.2.1 --user-config=user-config.jam variant=release threading=multi link=static install
+  popd
+
+  export GZIP="-9n"
+  find prefix | sort | tar --no-recursion -czf osx-depends-${REVISION}.tar.gz -T -
+
+  mv osx-depends-${REVISION}.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-native.yml b/contrib/gitian-descriptors/gitian-osx-native.yml
new file mode 100644
index 000000000000..6040e5ac5b27
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx-native.yml
@@ -0,0 +1,179 @@
+---
+name: "osx-native"
+suites:
+- "precise"
+architectures:
+- "i386"
+packages:
+- "git-core"
+- "automake"
+- "faketime"
+- "libssl-dev"
+- "libbz2-dev"
+- "libz-dev"
+- "cmake"
+- "libcap-dev"
+- "p7zip-full"
+- "uuid-dev"
+
+reference_datetime: "2013-06-01 00:00:00"
+remotes: []
+files:
+- "10cc648683617cca8bcbeae507888099b41b530c.tar.gz"
+- "cctools-809.tar.gz"
+- "dyld-195.5.tar.gz"
+- "ld64-127.2.tar.gz"
+- "protobuf-2.5.0.tar.bz2"
+- "MacOSX10.6.pkg"
+- "cdrkit-1.1.11.tar.gz"
+- "libdmg-hfsplus-v0.1.tar.gz"
+- "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz"
+- "cdrkit-deterministic.patch"
+
+
+script: |
+
+  echo "18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca  10cc648683617cca8bcbeae507888099b41b530c.tar.gz" | sha256sum -c
+  echo "03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad  cctools-809.tar.gz" | sha256sum -c
+  echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c  dyld-195.5.tar.gz" | sha256sum -c
+  echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142  ld64-127.2.tar.gz" | sha256sum -c
+  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
+  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
+  echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da  cdrkit-1.1.11.tar.gz" | sha256sum -c
+  echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3  libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c
+  echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff  clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c
+  echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f  cdrkit-deterministic.patch" | sha256sum -c
+
+
+  REVISION=r2
+  export REFERENCE_DATETIME
+  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export FAKETIME=$REFERENCE_DATETIME
+  export TZ=UTC
+
+  REAL_AR=`which ar`
+  REAL_RANLIB=`which ranlib`
+  REAL_DATE=`which date`
+
+  echo '#!/bin/bash' > $HOME/ar
+  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
+  echo "$REAL_AR \"\$@\"" >> $HOME/ar
+
+  echo '#!/bin/bash' > $HOME/ranlib
+  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ranlib
+  echo "$REAL_RANLIB \"\$@\"" >> $HOME/ranlib
+
+  echo '#!/bin/bash' > $HOME/date
+  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/date
+  echo "$REAL_DATE \"\$@\"" >> $HOME/date
+
+  chmod +x $HOME/ar $HOME/ranlib $HOME/date
+
+
+  export PATH=$HOME:$PATH
+  export SOURCES_PATH=`pwd`
+
+  mkdir -p osx-cross-depends/build
+  cd osx-cross-depends
+
+  NATIVEPREFIX=`pwd`/native-prefix
+  BUILD_BASE=`pwd`/build
+  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  HOST=x86_64-apple-darwin11
+  MIN_VERSION=10.6
+
+  CFLAGS=""
+  CXXFLAGS="${CFLAGS}"
+  LDFLAGS="-L${NATIVEPREFIX}/lib"
+
+  export PATH=${NATIVEPREFIX}/bin:${PATH}
+
+  mkdir -p ${NATIVEPREFIX}/bin
+  mkdir -p ${NATIVEPREFIX}/lib
+
+  mkdir -p ${SDK}
+  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+
+  #  Clang
+  SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+  BUILD_DIR=${BUILD_BASE}/clang+llvm-3.2-x86-linux-ubuntu-12.04
+
+  mkdir -p ${NATIVEPREFIX}/lib/clang/3.2/include
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  cp ${BUILD_DIR}/bin/clang ${NATIVEPREFIX}/bin/
+  cp ${BUILD_DIR}/bin/clang++ ${NATIVEPREFIX}/bin/
+  cp ${BUILD_DIR}/lib/libLTO.so ${NATIVEPREFIX}/lib/
+  cp ${BUILD_DIR}/lib/clang/3.2/include/* ${NATIVEPREFIX}/lib/clang/3.2/include
+
+  # cctools
+  SOURCE_FILE=${SOURCES_PATH}/10cc648683617cca8bcbeae507888099b41b530c.tar.gz
+  BUILD_DIR=${BUILD_BASE}/toolchain4-10cc648683617cca8bcbeae507888099b41b530c
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  mkdir -p ${BUILD_DIR}/sdks
+  pushd ${BUILD_DIR}/sdks;
+  ln -sf ${SDK} MacOSX10.6.sdk
+  ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz
+  ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz
+  ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz
+
+  tar -C ${BUILD_DIR} -xf ${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+  #   Hack in the use of our llvm headers rather than grabbing the old llvm-gcc.
+  sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
+  sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
+  sed -i "s|\${LLVM_CLANG_DIR}/llvmCore/include/llvm-c|\${LLVM_CLANG_DIR}/include/llvm-c \${LLVM_CLANG_DIR}/include/llvm |" ${BUILD_DIR}/cctools2odcctools/extract.sh
+
+  sed -i "s|fAC_INIT|AC_INIT|" ${BUILD_DIR}/cctools2odcctools/files/configure.ac
+  sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac
+
+  cd ${BUILD_DIR}/cctools2odcctools
+  ./extract.sh --osxver 10.6
+  cd odcctools-809
+  ./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK}
+
+  #   The 'PC' define in sparc/reg.h conflicts but doesn't get used anyway. Just rename it.
+  sed -i "s|define\tPC|define\tPC_|"  ${BUILD_DIR}/cctools2odcctools/odcctools-809/include/architecture/sparc/reg.h
+  make $MAKEOPTS
+  make install
+  popd
+
+  # protoc
+  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
+  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
+
+  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
+  pushd ${BUILD_DIR};
+  ./configure --enable-shared=no --disable-dependency-tracking --prefix=${NATIVEPREFIX}
+  make $MAKEOPTS
+  cp ${BUILD_DIR}/src/protoc ${NATIVEPREFIX}/bin/
+  popd
+
+  # cdrkit
+  SOURCE_FILE=${SOURCES_PATH}/cdrkit-1.1.11.tar.gz
+  BUILD_DIR=${BUILD_BASE}/cdrkit-1.1.11
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  pushd ${BUILD_DIR}
+  patch -p1 < ${SOURCES_PATH}/cdrkit-deterministic.patch
+  cmake -DCMAKE_INSTALL_PREFIX=${NATIVEPREFIX}
+  make $MAKEOPTS genisoimage
+  make -C genisoimage install
+  popd
+
+  # libdmg-hfsplus
+  SOURCE_FILE=${SOURCES_PATH}/libdmg-hfsplus-v0.1.tar.gz
+  BUILD_DIR=${BUILD_BASE}/libdmg-hfsplus-libdmg-hfsplus-v0.1
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+  mkdir -p ${BUILD_DIR}/build
+  pushd ${BUILD_DIR}/build
+  cmake -DCMAKE_INSTALL_PREFIX:PATH=${NATIVEPREFIX}/bin ..
+  make $MAKEOPTS
+  make install
+  popd
+
+  rm -rf native-prefix/docs
+
+  export GZIP="-9n"
+  find native-prefix | sort | tar --no-recursion -czf osx-native-depends-$REVISION.tar.gz -T -
+  mv osx-native-depends-$REVISION.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml
new file mode 100644
index 000000000000..d0be016e68a4
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx-qt.yml
@@ -0,0 +1,192 @@
+---
+name: "osx-qt"
+suites:
+- "precise"
+architectures:
+- "i386"
+packages:
+- "git-core"
+- "automake"
+- "p7zip-full"
+
+reference_datetime: "2013-06-01 00:00:00"
+remotes: []
+files:
+- "qt-everywhere-opensource-src-5.2.1.tar.gz"
+- "osx-native-depends-r2.tar.gz"
+- "osx-depends-r2.tar.gz"
+- "MacOSX10.6.pkg"
+
+script: |
+
+  echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1  qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
+  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
+
+  REVISION=r2
+  export SOURCES_PATH=`pwd`
+  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export ZERO_AR_DATE=1
+
+  export TZ=UTC
+
+  REAL_DATE=`which date`
+  echo '#!/bin/bash' > $HOME/date
+  echo "$REAL_DATE -d \"${REFERENCE_DATETIME}\" \"\$@\"" >> $HOME/date
+
+  chmod +x $HOME/date
+  export PATH=$HOME:$PATH
+
+  mkdir -p osx-cross-depends/build
+  cd osx-cross-depends
+
+  PREFIX=`pwd`/prefix
+  NATIVEPREFIX=`pwd`/native-prefix
+  BUILD_BASE=`pwd`/build
+  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  HOST=x86_64-apple-darwin11
+  MIN_VERSION=10.6
+
+  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
+  INT_CXXFLAGS="${INT_CFLAGS}"
+  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
+  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
+  INT_CPPFLAGS="-I${PREFIX}/include"
+  INT_CC=clang
+  INT_CXX=clang++
+  INT_OBJC=clang
+  INT_OBJCXX=clang++
+  INT_AR=${HOST}-ar
+  INT_RANLIB=${HOST}-ranlib
+  INT_LIBTOOL=${HOST}-libtool
+  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
+
+  export PATH=${NATIVEPREFIX}/bin:${PATH}
+
+  mkdir -p ${NATIVEPREFIX}/bin
+  mkdir -p ${NATIVEPREFIX}/lib
+  mkdir -p ${PREFIX}/bin
+  mkdir -p ${PREFIX}/lib
+  mkdir -p ${BUILD_BASE}
+
+  mkdir -p ${SDK}
+  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+
+  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
+
+
+  mkdir -p SDKs
+  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+
+  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
+  export PATH=`pwd`/native-prefix/bin:$PATH
+  tar xf /home/ubuntu/build/osx-depends-r2.tar.gz
+
+  SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
+  BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
+
+
+  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
+
+  # Install our mkspec. All files are pulled from the macx-clang spec, except for
+  # our custom qmake.conf
+  SPECFILE=${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/qmake.conf
+
+  mkdir -p ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux
+  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.lib ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
+  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.app ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
+  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/qplatformdefs.h ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
+
+  cat > ${SPECFILE} <<ENDCONF
+ 
+  MAKEFILE_GENERATOR      = UNIX
+  CONFIG                 += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
+  QMAKE_INCREMENTAL_STYLE = sublib
+
+  include(../common/macx.conf)
+  include(../common/gcc-base-mac.conf)
+  include(../common/clang.conf)
+  include(../common/clang-mac.conf)
+
+  QMAKE_XCODE_VERSION=4.3
+  QMAKE_XCODE_DEVELOPER_PATH=/Developer
+
+  QMAKE_MACOSX_DEPLOYMENT_TARGET = ${MIN_VERSION}
+
+  QMAKE_MAC_SDK=macosx
+  QMAKE_MAC_SDK.macosx.path = ${SDK}
+  QMAKE_MAC_SDK.macosx.platform_name = macosx
+  QMAKE_MAC_SDK_PATH=${SDK}
+
+  QMAKE_CFLAGS += -target ${HOST}
+  QMAKE_OBJECTIVE_CFLAGS += -target ${HOST}
+  QMAKE_CXXFLAGS += -target ${HOST}
+
+  QMAKE_LFLAGS += -target ${HOST}
+  QMAKE_AR = ${HOST}-ar cq
+  QMAKE_RANLIB=${HOST}-ranlib
+  QMAKE_LIBTOOL=${HOST}-libtool
+  QMAKE_INSTALL_NAME_TOOL=${HOST}-install_name_tool
+
+  load(qt_config)
+ 
+  ENDCONF
+
+  pushd ${BUILD_DIR}
+  ./configure -release -opensource -openssl-linked \
+  -no-audio-backend  -no-javascript-jit -no-sql-sqlite -no-sql-tds \
+  -no-cups -no-iconv -no-dbus -no-gif -no-audio-backend -no-freetype \
+  -no-javascript-jit -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch \
+  -no-dbus -no-gif -no-sm -nomake examples -no-feature-style-plastique \
+  -no-xcb -no-qml-debug -no-pch -no-nis \
+  -no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif \
+  -no-feature-style-windowsmobile -no-feature-style-windowsce \
+  -no-feature-style-cleanlooks \
+  -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql \
+  -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
+  -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport \
+  -skip qtdeclarative -skip qtmultimedia -skip qtimageformats \
+  -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns \
+  -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity \
+  -skip qtwinextras -skip qtscript \
+  -prefix ${PREFIX} -bindir ${NATIVEPREFIX}/bin \
+  -confirm-license -xplatform macx-clang-linux -v ${INT_LDFLAGS}
+
+  # RCC's output is sorted using each file entry's hash as the key. Unfortunately,
+  # the hash function uses a random seed for each run so the results aren't
+  # deterministic. This leads to static resources being defined in a random order,
+  # which in-turn means that object files are not predictable.
+  # Fortunately, this upsets Qt's unit tests as well, so they've added the
+  # QT_RCC_TEST environment variable to set a pre-defined seed. Here, do the same
+  # thing for the same reason.
+  QT_RCC_TEST=1 make $MAKEOPTS module-qtbase-make_first
+
+
+  make $MAKEOPTS module-qttranslations-make_first
+  make $MAKEOPTS module-qttools-make_first
+  make $MAKEOPTS -C qtbase
+  make -C qtbase install
+  make -C qttranslations install
+  make -C qttools/src/linguist install
+  popd
+
+  # This file should not be installed to the destination. It's native and
+  # non-deterministic. Remove it.
+  # See: https://bugreports.qt-project.org/browse/QTBUG-31393
+  rm -f ${PREFIX}/lib/libQt5Bootstrap.a
+
+  rm -f ${PREFIX}/lib/Qt*.framework/Qt*.prl
+  pushd ${PREFIX}/include
+  ln -sf ../lib/QtNetwork.framework/Headers/ QtNetwork
+  ln -sf ../lib/QtWidgets.framework/Headers/ QtWidgets
+  ln -sf ../lib/QtGui.framework/Headers/ QtGui
+  ln -sf ../lib/QtCore.framework/Headers/ QtCore
+  ln -sf ../lib/QtTest.framework/Headers/ QtTest
+  popd
+
+  rm -f ${PREFIX}/lib/*.la
+  find ${PREFIX}/lib -name "*.prl" -delete
+
+  export GZIP="-9n"
+  find native-prefix prefix | sort | tar --no-recursion -czf osx-depends-qt-5.2.1-${REVISION}.tar.gz -T -
+
+  mv osx-depends-qt-5.2.1-${REVISION}.tar.gz $OUTDIR
diff --git a/doc/README_osx.txt b/doc/README_osx.txt
new file mode 100644
index 000000000000..6eae4f5cf18b
--- /dev/null
+++ b/doc/README_osx.txt
@@ -0,0 +1,71 @@
+Deterministic OSX Dmg Notes.
+
+Working OSX DMG's are created in Linux by combining a recent clang,
+the Apple's binutils (ld, ar, etc), and DMG authoring tools.
+
+Apple uses clang extensively for development and has upstreamed the necessary
+functionality so that a vanilla clang can take advantage. It supports the use
+of -F, -target, -mmacosx-version-min, and --sysroot, which are all necessary
+when building for OSX. A pre-compiled version of 3.2 is used because it was not
+available in the Precise repositories at the time this work was started. In the
+future, it can be switched to use system packages instead.
+
+Apple's version of binutils (called cctools) contains lots of functionality
+missing in the FSF's binutils. In addition to extra linker options for
+frameworks and sysroots, several other tools are needed as well such as
+install_name_tool, lipo, and nmedit. These do not build under linux, so they
+have been patched to do so. The work here was used as a starting point:
+https://github.com/mingwandroid/toolchain4
+
+In order to build a working toolchain, the following source packages are needed
+from Apple: cctools, dyld, and ld64.
+
+Beware. This part is ugly. Very very very ugly. In the future, this should be
+broken out into a new repository and cleaned up. Additionally, the binaries
+only work when built as x86 and not x86_64. This is an especially nasty
+limitation because it must be linked with the toolchain's libLTO.so, meaning
+that the entire toolchain must be x86. Gitian x86_64 should not be used until
+this has been fixed, because it would mean that several native dependencies
+(openssl, libuuid, etc) would need to be built as x86 first.
+
+These tools inject timestamps by default, which produce non-deterministic
+binaries. The ZERO_AR_DATE environment variable is used to disable that.
+
+This version of cctools has been patched to use the current version of clang's
+headers and and its libLTO.so rather than those from llvmgcc, as it was
+originally done in toolchain4.
+
+To complicate things further, all builds must target an Apple SDK. These SDKs
+are free to download, but not redistributable.
+To obtain it, register for a developer account, then download xcode_3.2.6_and_ios_sdk_4.3.dmg:
+https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
+This file is several gigabytes in size, but only a single .pkg file inside is
+needed (MacOSX10.6.pkg). From Linux, 7-zip can be used to extract this file.
+The DMG can then be discarded.
+
+The gitian descriptors build 2 sets of files: Linux tools, then Apple binaries
+which are created using these tools. The build process has been designed to
+avoid including the SDK's files in Gitian's outputs. All interim tarballs are
+fully deterministic and may be freely redistributed.
+
+genisoimage is used to create the initial DMG. It is not deterministic as-is,
+so it has been patched. A system genisoimage will work fine, but it will not
+be deterministic because the file-order will change between invocations.
+The patch can be seen here:
+https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff
+No effort was made to fix this cleanly, so it likely leaks memory badly. But
+it's only used for a single invocation, so that's no real concern.
+
+genisoimage cannot compress DMGs, so afterwards, the 'dmg' tool from the
+libdmg-hfsplus project is used to compress it. There are several bugs in this
+tool and its maintainer has seemingly abandoned the project. It has been forked
+and is available (with fixes) here: https://github.com/theuni/libdmg-hfsplus .
+
+The 'dmg' tool has the ability to create DMG's from scratch as well, but this
+functionality is broken. Only the compression feature is currently used.
+Ideally, the creation could be fixed and genisoimage would no longer be necessary.
+
+Background images and other features can be added to DMG files by inserting a
+.DS_Store before creation. The easiest way to create this file is to build a
+DMG without one, move it to a device running OSX, customize the layout, then
+grab the .DS_Store file for later use. That is the approach taken here.
diff --git a/doc/release-process.md b/doc/release-process.md
index b93c1637486f..be00cb809224 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -33,10 +33,18 @@ Release Process
 	git checkout v${VERSION}
 	popd
 	pushd ./gitian-builder
+        mkdir -p inputs; cd inputs/
+
+ Register and download the Apple SDK (see OSX Readme for details)
+        visit https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
+ 
+ Extract MacOSX10.6.pkg using 7zip
+        7z e -y xcode_3.2.6_and_ios_sdk_4.3.dmg 5.hfs
+        7z -y e 5.hfs "Xcode and iOS SDK/Packages/MacOSX10.6.pkg"
+        rm 5.hfs
 
  Fetch and build inputs: (first time, or when dependency versions change)
 
-	mkdir -p inputs; cd inputs/
 	wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz' -O miniupnpc-1.9.tar.gz
 	wget 'https://www.openssl.org/source/openssl-1.0.1g.tar.gz'
 	wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
@@ -49,6 +57,16 @@ Release Process
 	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
 	wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
 	wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
+	wget 'https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz'
+	wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
+	wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
+	wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
+	wget 'http://cdrkit.org/releases/cdrkit-1.1.11.tar.gz'
+	wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
+	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O \
+	     clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+        wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O \
+	     cdrkit-deterministic.patch
 	cd ..
 	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml
 	mv build/out/boost-*.zip inputs/
@@ -64,6 +82,12 @@ Release Process
 	mv build/out/qt-*.zip inputs/
 	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/protobuf-win.yml
 	mv build/out/protobuf-*.zip inputs/
+	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-native.yml
+	mv build/out/osx-*.tar.gz inputs/
+	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-depends.yml
+	mv build/out/osx-*.tar.gz inputs/
+	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-qt.yml
+	mv build/out/osx-*.tar.gz inputs/
 
  The expected SHA256 hashes of the intermediate inputs are:
 
@@ -96,13 +120,19 @@ Release Process
 	zip -r bitcoin-${VERSION}-win-gitian.zip *
 	mv bitcoin-${VERSION}-win-gitian.zip ../../../
 	popd
+        ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+        ./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+	pushd build/out
+	mv Bitcoin-Qt.dmg ../../../
+	popd
 	popd
 
   Build output expected:
 
   1. linux 32-bit and 64-bit binaries + source (bitcoin-${VERSION}-linux-gitian.zip)
   2. windows 32-bit and 64-bit binaries + installer + source (bitcoin-${VERSION}-win-gitian.zip)
-  3. Gitian signatures (in gitian.sigs/${VERSION}[-win]/(your gitian key)/
+  3. OSX installer (Bitcoin-Qt.dmg)
+  4. Gitian signatures (in gitian.sigs/${VERSION}[-win|-osx]/(your gitian key)/
 
 repackage gitian builds for release as stand-alone zip/tar/installer exe
 
@@ -119,21 +149,6 @@ repackage gitian builds for release as stand-alone zip/tar/installer exe
 	zip -r bitcoin-${VERSION}-win.zip bitcoin-${VERSION}-win
 	rm -rf bitcoin-${VERSION}-win
 
-**Perform Mac build:**
-
-  OSX binaries are created by Gavin Andresen on a 64-bit, OSX 10.6 machine.
-
-	./autogen.sh
-        SDK=$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
-        CXXFLAGS="-mmacosx-version-min=10.6 -isysroot $SDK" ./configure --enable-upnp-default
-	make
-	export QTDIR=/opt/local/share/qt4  # needed to find translations/qt_*.qm files
-	T=$(contrib/qt_translations.py $QTDIR/translations src/qt/locale)
-        export CODESIGNARGS='--keychain ...path_to_keychain --sign "Developer ID Application: BITCOIN FOUNDATION, INC., THE"'
-	python2.7 contrib/macdeploy/macdeployqtplus Bitcoin-Qt.app -sign -add-qt-tr $T -dmg -fancy contrib/macdeploy/fancy.plist
-
- Build output expected: Bitcoin-Qt.dmg
-
 ###Next steps:
 
 * Code-sign Windows -setup.exe (in a Windows virtual machine using signtool)

From 6fcdad787f1fb381a3a0fe6b1a1e45477426dccb Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 21 May 2014 12:27:37 +0200
Subject: [PATCH 0077/1819] qt: Periodic language update

---
 src/qt/locale/bitcoin_af_ZA.ts |   2 +-
 src/qt/locale/bitcoin_ar.ts    | 443 +++++++++++++++++----------------
 src/qt/locale/bitcoin_cs.ts    |  18 +-
 src/qt/locale/bitcoin_da.ts    |  88 +++----
 src/qt/locale/bitcoin_es.ts    |   9 +-
 src/qt/locale/bitcoin_fi.ts    |   2 +-
 src/qt/locale/bitcoin_ja.ts    |   8 +-
 src/qt/locale/bitcoin_ko_KR.ts |  68 ++---
 src/qt/locale/bitcoin_lt.ts    |   6 +-
 src/qt/locale/bitcoin_lv_LV.ts | 289 ++++++++++-----------
 src/qt/locale/bitcoin_nb.ts    |   6 +-
 src/qt/locale/bitcoin_pl.ts    |   8 +-
 src/qt/locale/bitcoin_sk.ts    | 207 ++++++++-------
 13 files changed, 588 insertions(+), 566 deletions(-)

diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index 80e4de010f7f..6e8395e58948 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1898,7 +1898,7 @@ Address: %4
     </message>
     <message>
         <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die adres waarheen die betaling gestuur moet word (b.v. 1H7wyVL5HCNoVFyyBJSDojwyxcCChU7TPA)</translation>
+        <translation>Die adres waarheen die betaling gestuur moet word (b.v. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index 32b0d4b0fc44..5877cc35d9c9 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -20,7 +20,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Copyright</source>
-        <translation type="unfinished"/>
+        <translation>الحقوق محفوظة</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
@@ -35,7 +35,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>أنقر على الماوس مرتين لتعديل العنوان</translation>
+        <translation>أنقر بالماوس مرتين لتعديل العنوان او الوصف</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -43,7 +43,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;جديد</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -51,11 +51,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;نسخ</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;اغلاق</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -63,7 +63,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>حذف العنوان المحدد من القائمة</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -71,7 +71,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;تصدير</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -79,23 +79,23 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>اختر العنوان الذي سترسل له العملات</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>اختر العنوان الذي تستقبل عليه العملات</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;اختر</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>ارسال العناوين</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>استقبال العناوين</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
@@ -107,7 +107,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>نسخ &amp;الوصف</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
@@ -115,7 +115,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>تصدير قائمة العناوين</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -123,7 +123,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>فشل التصدير</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1.</source>
@@ -157,15 +157,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>عبارة مرور جديدة</translation>
+        <translation>كلمة مرور جديدة</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>ادخل الجملة السرية مرة أخرى</translation>
+        <translation>ادخل كلمة المرور الجديدة مرة أخرى</translation>
     </message>
     <message>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>أدخل عبارة مرور جديدة إلى المحفظة. الرجاء استخدام عبارة مرور تتكون من10  حروف عشوائية على الاقل, أو أكثر من 7 كلمات </translation>
+        <translation>أدخل كلمة مرور جديدة للمحفظة. &lt;br/&gt;الرجاء استخدام كلمة مرور تتكون &lt;b&gt;من 10 حروف عشوائية على الاقل&lt;/b&gt;, أو &lt;b&gt;أكثر من 7 كلمات&lt;/b&gt;. </translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -173,7 +173,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>هذه العملية تحتاج عبارة المرور محفظتك لفتحها</translation>
+        <translation>هذه العملية تحتاج كلمة مرور محفظتك لفتحها</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -181,7 +181,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>هذه العملية تحتاج عبارة المرور محفظتك فك تشفيرها</translation>
+        <translation>هذه العملية تحتاج كلمة مرور محفظتك لفك تشفيرها </translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -189,15 +189,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation>تغيير عبارة المرور</translation>
+        <translation>تغيير كلمة المرور</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>أدخل عبارة المرور القديمة والجديدة إلى المحفظة.</translation>
+        <translation>أدخل كلمة المرور القديمة والجديدة للمحفظة.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>تأكيد التشفير المحفظة</translation>
+        <translation>تأكيد تشفير المحفظة</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
@@ -213,7 +213,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>تحذير: مفتاح الحروف الكبيرة مفعل</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
@@ -229,12 +229,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>شل تشفير المحفظة بسبب خطأ داخلي. لم يتم تشفير محفظتك.</translation>
+        <translation>فشل تشفير المحفظة بسبب خطأ داخلي. لم يتم تشفير محفظتك.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation>عبارتي المرور ليستا متطابقتان
-</translation>
+        <translation>كلمتي المرور ليستا متطابقتان</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
@@ -242,8 +241,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>عبارة المرور التي تم إدخالها لفك شفرة المحفظة غير صحيحة.
-</translation>
+        <translation>كلمة المرور التي تم إدخالها لفك تشفير المحفظة غير صحيحة.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
@@ -262,11 +260,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>مزامنة مع شبكة ...</translation>
+        <translation>مزامنة مع الشبكة ...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation>نظرة عامة</translation>
+        <translation>&amp;نظرة عامة</translation>
     </message>
     <message>
         <source>Node</source>
@@ -278,11 +276,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation>المعاملات</translation>
+        <translation>&amp;المعاملات</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>تصفح التاريخ المعاملات</translation>
+        <translation>تصفح سجل المعاملات</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
@@ -294,7 +292,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show information about Bitcoin</source>
-        <translation>  إظهار المزيد معلومات حول Bitcoin</translation>
+        <translation>  إظهار معلومات حول بت كوين</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
@@ -306,19 +304,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>خيارات ...</translation>
+        <translation>&amp;خيارات ...</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;تشفير المحفظة</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;نسخ احتياط للمحفظة</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;تغيير كلمة المرور</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
@@ -330,7 +328,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>افتح &amp;URI...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -354,11 +352,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>تغيير عبارة المرور المستخدمة لتشفير المحفظة</translation>
+        <translation>تغيير كلمة المرور المستخدمة لتشفير المحفظة</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;نافذة المعالجة</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
@@ -366,7 +364,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;التحقق من الرسالة...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -378,19 +376,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <translation>%ارسل</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>&amp;استقبل</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <translation>&amp;عرض / اخفاء</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <translation>عرض او اخفاء النافذة الرئيسية</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
@@ -406,15 +404,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;File</source>
-        <translation>ملف</translation>
+        <translation>&amp;ملف</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation>الاعدادات</translation>
+        <translation>&amp;الاعدادات</translation>
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation>مساعدة</translation>
+        <translation>&amp;مساعدة</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
@@ -458,7 +456,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Bitcoin client</source>
-        <translation>عميل بتكوين</translation>
+        <translation>عميل بت كوين</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -478,15 +476,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n يوم</numerusform><numerusform>%n يوم</numerusform><numerusform>%n يوم</numerusform><numerusform>%n أيام</numerusform><numerusform>%n أيام</numerusform><numerusform>%n ايام</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
@@ -514,15 +512,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>تحذير</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>معلومات</translation>
     </message>
     <message>
         <source>Up to date</source>
-        <translation>محين</translation>
+        <translation>محدث</translation>
     </message>
     <message>
         <source>Catching up...</source>
@@ -534,7 +532,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>المعاملات واردة</translation>
+        <translation>المعاملات الواردة</translation>
     </message>
     <message>
         <source>Date: %1
@@ -542,15 +540,19 @@ Amount: %2
 Type: %3
 Address: %4
 </source>
-        <translation type="unfinished"/>
+        <translation>التاريخ : 1% 
+القيمة: 2% 
+النوع: 3% 
+العنوان: 4%
+</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>المحفظة مشفرة و مفتوحة حاليا</translation>
+        <translation>المحفظة &lt;b&gt;مشفرة&lt;/b&gt; و &lt;b&gt;مفتوحة&lt;/b&gt; حاليا</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>المحفظة مشفرة و مقفلة حاليا</translation>
+        <translation>المحفظة &lt;b&gt;مشفرة&lt;/b&gt; و &lt;b&gt;مقفلة&lt;/b&gt; حاليا</translation>
     </message>
     <message>
         <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
@@ -561,7 +563,7 @@ Address: %4
     <name>ClientModel</name>
     <message>
         <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <translation>تنبيه من الشبكة</translation>
     </message>
 </context>
 <context>
@@ -572,7 +574,7 @@ Address: %4
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>الكمية:</translation>
     </message>
     <message>
         <source>Bytes:</source>
@@ -580,7 +582,7 @@ Address: %4
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>القيمة</translation>
     </message>
     <message>
         <source>Priority:</source>
@@ -588,7 +590,7 @@ Address: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>رسوم :</translation>
     </message>
     <message>
         <source>Low Output:</source>
@@ -628,7 +630,7 @@ Address: %4
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>تأكيد</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -636,11 +638,11 @@ Address: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>أفضلية</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation>  انسخ عنوان</translation>
+        <translation>  انسخ العنوان</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -648,11 +650,11 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>نسخ الكمية</translation>
+        <translation>نسخ القيمة</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>نسخ رقم المعاملة</translation>
     </message>
     <message>
         <source>Lock unspent</source>
@@ -664,15 +666,15 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الكمية</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الرسوم</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>نسخ بعد الرسوم</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -680,7 +682,7 @@ Address: %4
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الافضلية</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -688,19 +690,19 @@ Address: %4
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>نسخ التغييرات</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>الاعلى</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>اعلى</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>عالي</translation>
     </message>
     <message>
         <source>medium-high</source>
@@ -716,7 +718,7 @@ Address: %4
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>منخفض</translation>
     </message>
     <message>
         <source>lower</source>
@@ -732,7 +734,7 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>لا شيء</translation>
     </message>
     <message>
         <source>Dust</source>
@@ -803,7 +805,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>&amp;وصف</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
@@ -815,11 +817,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Address</source>
-        <translation>العنوان</translation>
+        <translation>&amp;العنوان</translation>
     </message>
     <message>
         <source>New receiving address</source>
-        <translation>عنوان تلقي جديد</translation>
+        <translation>عنوان أستلام جديد</translation>
     </message>
     <message>
         <source>New sending address</source>
@@ -827,8 +829,7 @@ Address: %4
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation>تعديل عنوان التلقي
-</translation>
+        <translation>تعديل عنوان الأستلام</translation>
     </message>
     <message>
         <source>Edit sending address</source>
@@ -855,11 +856,11 @@ Address: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>سيتم انشاء دليل بيانات جديد</translation>
     </message>
     <message>
         <source>name</source>
-        <translation type="unfinished"/>
+        <translation>الاسم</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
@@ -871,7 +872,7 @@ Address: %4
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>لا يمكن انشاء دليل بيانات هنا .</translation>
     </message>
 </context>
 <context>
@@ -925,7 +926,7 @@ Address: %4
     <name>Intro</name>
     <message>
         <source>Welcome</source>
-        <translation type="unfinished"/>
+        <translation>أهلا</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
@@ -941,11 +942,11 @@ Address: %4
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>استخدام دليل البانات الافتراضي</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>استخدام دليل بيانات مخصص:</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -961,11 +962,11 @@ Address: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <translation>قيقا بايت مساحة متاحة</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>( بحاجة الى 1%قيقا بايت )</translation>
     </message>
 </context>
 <context>
@@ -984,11 +985,11 @@ Address: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>حدد ملف طلب الدفع</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>حدد ملف طلب الدفع لفتحه</translation>
     </message>
 </context>
 <context>
@@ -999,7 +1000,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation>الرئيسي</translation>
+        <translation>&amp;الرئيسي</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
@@ -1007,7 +1008,7 @@ Address: %4
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
+        <translation>ادفع &amp;رسوم المعاملة</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
@@ -1023,7 +1024,7 @@ Address: %4
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>م ب</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
@@ -1047,7 +1048,7 @@ Address: %4
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>عنوان النطاق للطرف الثالث</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1059,11 +1060,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
+        <translation>&amp;استعادة الخيارات</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation type="unfinished"/>
+        <translation>&amp;الشبكة</translation>
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
@@ -1071,11 +1072,11 @@ Address: %4
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>&amp;محفظة</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>تصدير</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
@@ -1099,15 +1100,15 @@ Address: %4
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
+        <translation>بروكسي &amp;اي بي:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;المنفذ:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
+        <translation>منفذ البروكسي (مثلا 9050)</translation>
     </message>
     <message>
         <source>SOCKS &amp;Version:</source>
@@ -1139,11 +1140,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation type="unfinished"/>
+        <translation>&amp;عرض</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
+        <translation>واجهة المستخدم &amp;اللغة:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
@@ -1183,11 +1184,11 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>لا شيء</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation type="unfinished"/>
+        <translation>تأكيد استعادة الخيارات</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
@@ -1230,7 +1231,7 @@ Address: %4
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>معلق:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1246,11 +1247,11 @@ Address: %4
     </message>
     <message>
         <source>Total:</source>
-        <translation type="unfinished"/>
+        <translation>المجموع:</translation>
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation type="unfinished"/>
+        <translation>رصيدك الكلي الحالي</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
@@ -1321,7 +1322,7 @@ Address: %4
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
+        <translation>استجابة سيئة من الملقم٪ 1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
@@ -1363,15 +1364,15 @@ Address: %4
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;حفظ الصورة</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;نسخ الصورة</translation>
     </message>
     <message>
         <source>Save QR Code</source>
-        <translation type="unfinished"/>
+        <translation>حفظ رمز الاستجابة السريعة QR</translation>
     </message>
     <message>
         <source>PNG Image (*.png)</source>
@@ -1402,7 +1403,7 @@ Address: %4
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>عام</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1410,7 +1411,7 @@ Address: %4
     </message>
     <message>
         <source>Startup time</source>
-        <translation type="unfinished"/>
+        <translation>وقت البدء</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1450,23 +1451,23 @@ Address: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>&amp;حركة مرور الشبكة</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>&amp;مسح</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
+        <translation>المجاميع</translation>
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>داخل:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>خارج:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1490,7 +1491,7 @@ Address: %4
     </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 type="unfinished"/>
+        <translation>استخدم اسهم الاعلى و الاسفل للتنقل بين السجلات و &lt;b&gt;Ctrl-L&lt;/b&gt;  لمسح الشاشة</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1498,46 +1499,46 @@ Address: %4
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>1% بايت</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>1% كيلو بايت</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>1% ميقا بايت</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <translation>1% قيقا بايت</translation>
     </message>
     <message>
         <source>%1 m</source>
-        <translation type="unfinished"/>
+        <translation>1% دقيقة</translation>
     </message>
     <message>
         <source>%1 h</source>
-        <translation type="unfinished"/>
+        <translation>1% ساعة</translation>
     </message>
     <message>
         <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <translation>1% ساعة 2% دقيقة</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;القيمة</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;الوصف:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;رسالة:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
@@ -1565,15 +1566,15 @@ Address: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>مسح كل حقول النموذج المطلوبة</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation type="unfinished"/>
+        <translation>مسح</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>سجل طلبات الدفع</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
@@ -1585,7 +1586,7 @@ Address: %4
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
+        <translation>عرض</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
@@ -1593,7 +1594,7 @@ Address: %4
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>ازل</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -1605,26 +1606,26 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>نسخ الكمية</translation>
+        <translation>نسخ القيمة</translation>
     </message>
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
         <source>QR Code</source>
-        <translation type="unfinished"/>
+        <translation>رمز كيو ار</translation>
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>نسخ  &amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>نسخ &amp;العنوان</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;حفظ الصورة</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1636,7 +1637,7 @@ Address: %4
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation> URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1652,7 +1653,7 @@ Address: %4
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>رسالة</translation>
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
@@ -1675,7 +1676,7 @@ Address: %4
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>رسالة</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -1687,7 +1688,7 @@ Address: %4
     </message>
     <message>
         <source>(no message)</source>
-        <translation type="unfinished"/>
+        <translation>( لا رسائل )</translation>
     </message>
     <message>
         <source>(no amount)</source>
@@ -1710,7 +1711,7 @@ Address: %4
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>اختيار تلقائيا</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1718,7 +1719,7 @@ Address: %4
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>الكمية :</translation>
     </message>
     <message>
         <source>Bytes:</source>
@@ -1726,15 +1727,15 @@ Address: %4
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>القيمة :</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>افضلية :</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>رسوم :</translation>
     </message>
     <message>
         <source>Low Output:</source>
@@ -1742,11 +1743,11 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>بعد الرسوم :</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <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>
@@ -1762,7 +1763,7 @@ Address: %4
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
+        <translation>أضافة &amp;مستلم</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
@@ -1782,7 +1783,7 @@ Address: %4
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ارسال</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
@@ -1790,23 +1791,23 @@ Address: %4
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>1% الى 2%</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الكمية </translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>نسخ الكمية</translation>
+        <translation>نسخ القيمة</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الرسوم</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>نسخ بعد الرسوم</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -1814,7 +1815,7 @@ Address: %4
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>نسخ الافضلية</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -1822,15 +1823,15 @@ Address: %4
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>نسخ التعديل</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>مجموع المبلغ %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>أو</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1842,11 +1843,11 @@ Address: %4
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
+        <translation>القيمة تتجاوز رصيدك</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
+        <translation>المجموع يتجاوز رصيدك عندما يتم اضافة 1% رسوم العملية</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -1897,7 +1898,7 @@ Address: %4
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation>ادفع الى </translation>
+        <translation>ادفع &amp;الى :</translation>
     </message>
     <message>
         <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1909,7 +1910,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;وصف :</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -1925,7 +1926,7 @@ Address: %4
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>انسخ العنوان من لوحة المفاتيح</translation>
+        <translation>الصق العنوان من لوحة المفاتيح</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1972,7 +1973,7 @@ Address: %4
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>لا توقف عمل الكمبيوتر حتى تختفي هذه النافذة</translation>
     </message>
 </context>
 <context>
@@ -1983,7 +1984,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;توقيع الرسالة</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
@@ -2011,11 +2012,11 @@ Address: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
+        <translation>ادخل الرسالة التي تريد توقيعها هنا</translation>
     </message>
     <message>
         <source>Signature</source>
-        <translation type="unfinished"/>
+        <translation>التوقيع</translation>
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
@@ -2023,11 +2024,11 @@ Address: %4
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>وقع الرسالة لتثبت انك تمتلك عنوان البت كوين هذا</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>توقيع $الرسالة</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
@@ -2039,7 +2040,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;تحقق رسالة</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
@@ -2055,7 +2056,7 @@ Address: %4
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>تحقق &amp;الرسالة</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
@@ -2067,7 +2068,7 @@ Address: %4
     </message>
     <message>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
+        <translation>اضغط  &quot;توقيع الرسالة&quot; لتوليد التوقيع</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2083,7 +2084,7 @@ Address: %4
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
+        <translation>تم الغاء عملية فتح المحفظة</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
@@ -2103,7 +2104,7 @@ Address: %4
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
+        <translation>فضلا تاكد من التوقيع وحاول مرة اخرى</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
@@ -2148,7 +2149,7 @@ Address: %4
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>يتعارض</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -2196,7 +2197,7 @@ Address: %4
     </message>
     <message>
         <source>label</source>
-        <translation type="unfinished"/>
+        <translation>علامة</translation>
     </message>
     <message>
         <source>Credit</source>
@@ -2216,7 +2217,7 @@ Address: %4
     </message>
     <message>
         <source>Transaction fee</source>
-        <translation>رسوم التحويل</translation>
+        <translation>رسوم المعاملة</translation>
     </message>
     <message>
         <source>Net amount</source>
@@ -2224,7 +2225,7 @@ Address: %4
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>رسالة </translation>
     </message>
     <message>
         <source>Comment</source>
@@ -2236,7 +2237,7 @@ Address: %4
     </message>
     <message>
         <source>Merchant</source>
-        <translation type="unfinished"/>
+        <translation>تاجر</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
@@ -2268,7 +2269,7 @@ Address: %4
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation>لم يتم حتى الآن البث بنجاح</translation>
+        <translation>,  لم يتم حتى الآن البث بنجاح</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2421,7 +2422,7 @@ Address: %4
     </message>
     <message>
         <source>Range...</source>
-        <translation>v</translation>
+        <translation>المدى...</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2449,7 +2450,7 @@ Address: %4
     </message>
     <message>
         <source>Min amount</source>
-        <translation type="unfinished"/>
+        <translation>الحد الأدنى</translation>
     </message>
     <message>
         <source>Copy address</source>
@@ -2465,7 +2466,7 @@ Address: %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>نسخ رقم العملية</translation>
     </message>
     <message>
         <source>Edit label</source>
@@ -2473,7 +2474,7 @@ Address: %4
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation type="unfinished"/>
+        <translation>عرض تفاصيل المعاملة</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
@@ -2481,7 +2482,7 @@ Address: %4
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>فشل التصدير</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
@@ -2489,7 +2490,7 @@ Address: %4
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation>نجح الاستخراج</translation>
+        <translation>نجح التصدير</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
@@ -2529,7 +2530,7 @@ Address: %4
     </message>
     <message>
         <source>Range:</source>
-        <translation type="unfinished"/>
+        <translation>المدى:</translation>
     </message>
     <message>
         <source>to</source>
@@ -2554,7 +2555,7 @@ Address: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;تصدير</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -2562,7 +2563,7 @@ Address: %4
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation type="unfinished"/>
+        <translation>نسخ احتياط للمحفظة</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
@@ -2570,7 +2571,7 @@ Address: %4
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation type="unfinished"/>
+        <translation>فشل النسخ الاحتياطي</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
@@ -2582,7 +2583,7 @@ Address: %4
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation type="unfinished"/>
+        <translation>نجاح  النسخ الاحتياطي</translation>
     </message>
 </context>
 <context>
@@ -2613,7 +2614,7 @@ Address: %4
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation>حدد موقع مجلد المعلومات او data directory</translation>
+        <translation>حدد مجلد المعلومات</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
@@ -2867,15 +2868,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <translation>تحذير: مساحة القرص منخفضة</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <translation>تحذير: المحفظة مغلقة , لا تستطيع تنفيذ المعاملة</translation>
     </message>
     <message>
         <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <translation>خطأ: خطأ في النظام:</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
@@ -2959,7 +2960,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>عنوان اونيون غير صحيح : &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -3015,7 +3016,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <translation>التحقق من المحفظة ...</translation>
     </message>
     <message>
         <source>Wait for RPC server to start</source>
@@ -3027,7 +3028,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <translation>خيارات المحفظة :</translation>
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
@@ -3059,7 +3060,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>معلومات</translation>
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
@@ -3159,7 +3160,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <translation>فشل توقيع المعاملة</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
@@ -3171,19 +3172,19 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>System error: </source>
-        <translation type="unfinished"/>
+        <translation>خطأ في النظام :</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <translation>قيمة العملية صغيره جدا</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>يجب ان يكون قيمة العملية بالموجب</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <translation>المعاملة طويلة جدا</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
@@ -3199,11 +3200,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>تحذير</translation>
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <translation>تحذير : هذا الاصدار قديم , يتطلب التحديث</translation>
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
@@ -3239,7 +3240,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
+        <translation>تحديث المحفظة للنسخة الاخيرة</translation>
     </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
@@ -3259,7 +3260,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <translation>المفتاح الخاص بالسيرفر (default: server.pem)</translation>
     </message>
     <message>
         <source>This help message</source>
@@ -3295,7 +3296,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>عنوان البروكسي غير صحيح : &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
@@ -3319,11 +3320,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid amount</source>
-        <translation type="unfinished"/>
+        <translation>قيمة غير صحيحة</translation>
     </message>
     <message>
         <source>Insufficient funds</source>
-        <translation type="unfinished"/>
+        <translation>اموال غير كافية</translation>
     </message>
     <message>
         <source>Loading block index...</source>
@@ -3343,7 +3344,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>لايمكن كتابة العنوان الافتراضي</translation>
     </message>
     <message>
         <source>Rescanning...</source>
@@ -3355,7 +3356,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <translation>لاستخدام %s الخيار</translation>
     </message>
     <message>
         <source>Error</source>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index ba4d2def3543..6cc783b59ea6 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1571,7 +1571,7 @@ Adresa: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Smaže všechny pole formuláře.</translation>
     </message>
     <message>
         <source>Clear</source>
@@ -1599,7 +1599,7 @@ Adresa: %4
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>Odstranit</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -1712,11 +1712,11 @@ Adresa: %4
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>Vstupy...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>automaticky vybrané</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1772,7 +1772,7 @@ Adresa: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Smaže všechny pole formuláře.</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1880,7 +1880,7 @@ Adresa: %4
     </message>
     <message>
         <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
+        <translation>Opravdu chcete odeslat %1?</translation>
     </message>
     <message>
         <source>added as transaction fee</source>
@@ -1947,7 +1947,7 @@ Adresa: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Toto je ověřený požadavek k platbě.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
@@ -1959,7 +1959,7 @@ Adresa: %4
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Toto je neověřený požadavek k platbě.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -3127,7 +3127,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti RPC serveru:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 442a86b7c044..57957014971f 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -52,7 +52,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Kopier den valgte adresse til systemets udklipsholder</translation>
+        <translation>Kopiér den valgte adresse til systemets udklipsholder</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -64,7 +64,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>Kopier adresse</translation>
+        <translation>Kopiér adresse</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
@@ -112,11 +112,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Kopier mærkat</translation>
+        <translation>Kopiér mærkat</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation>Rediger</translation>
+        <translation>Redigér</translation>
     </message>
     <message>
         <source>Export Address List</source>
@@ -174,7 +174,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Krypter tegnebog</translation>
+        <translation>Kryptér tegnebog</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
@@ -190,7 +190,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation>Dekrypter tegnebog</translation>
+        <translation>Dekryptér tegnebog</translation>
     </message>
     <message>
         <source>Change passphrase</source>
@@ -261,11 +261,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>Underskriv besked...</translation>
+        <translation>Underskriv besked …</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>Synkroniserer med netværk...</translation>
+        <translation>Synkroniserer med netværk …</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
@@ -309,19 +309,19 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>Indstillinger...</translation>
+        <translation>Indstillinger …</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>Krypter tegnebog...</translation>
+        <translation>Kryptér tegnebog …</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>Sikkerhedskopier tegnebog...</translation>
+        <translation>Sikkerhedskopiér tegnebog …</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>Skift adgangskode...</translation>
+        <translation>Skift adgangskode …</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
@@ -349,7 +349,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation>Rediger konfigurationsindstillinger af Bitcoin</translation>
+        <translation>Redigér konfigurationsindstillinger for Bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
@@ -369,7 +369,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>Verificér besked...</translation>
+        <translation>Verificér besked …</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -413,7 +413,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation>Indstillinger</translation>
+        <translation>Opsætning</translation>
     </message>
     <message>
         <source>&amp;Help</source>
@@ -465,7 +465,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n aktiv(e) forbindelse(r) til Bitcoin-netværket</numerusform><numerusform>%n aktiv(e) forbindelse(r) til Bitcoin-netværket</numerusform></translation>
+        <translation><numerusform>%n aktiv forbindelse til Bitcoin-netværket</numerusform><numerusform>%n aktive forbindelser til Bitcoin-netværket</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
@@ -529,7 +529,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>Indhenter...</translation>
+        <translation>Indhenter …</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -806,7 +806,7 @@ Adresse: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Rediger adresse</translation>
+        <translation>Redigér adresse</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -834,11 +834,11 @@ Adresse: %4
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation>Rediger modtagelsesadresse</translation>
+        <translation>Redigér modtagelsesadresse</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation>Rediger afsendelsesadresse</translation>
+        <translation>Redigér afsendelsesadresse</translation>
     </message>
     <message>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
@@ -1017,11 +1017,11 @@ Adresse: %4
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Start Bitcoin automatisk, når der logges ind på systemet</translation>
+        <translation>Start Bitcoin automatisk, når der logges ind på systemet.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>Start Bitcoin, når systemet startes</translation>
+        <translation>Start Bitcoin ved systemlogin</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
@@ -1097,11 +1097,11 @@ Adresse: %4
     </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>Åbn Bitcoin-klientens port på routeren automatisk. Dette virker kun, når din router understøtter UPnP og UPnP er aktiveret.</translation>
+        <translation>Åbn automatisk Bitcoin-klientens port på routeren. Dette virker kun, når din router understøtter UPnP, og UPnP er aktiveret.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>Konfigurer port vha. UPnP</translation>
+        <translation>Konfigurér port vha. UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1113,7 +1113,7 @@ Adresse: %4
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Porten på proxyen (f.eks. 9050)</translation>
+        <translation>Port for proxyen (fx 9050)</translation>
     </message>
     <message>
         <source>SOCKS &amp;Version:</source>
@@ -1121,7 +1121,7 @@ Adresse: %4
     </message>
     <message>
         <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS-version af proxyen (f.eks. 5)</translation>
+        <translation>SOCKS-version for proxyen (fx 5)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
@@ -1416,7 +1416,7 @@ Adresse: %4
     </message>
     <message>
         <source>Startup time</source>
-        <translation>Opstartstid</translation>
+        <translation>Opstartstidspunkt</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1492,11 +1492,11 @@ Adresse: %4
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Velkommen til Bitcoin RPC-konsollen</translation>
+        <translation>Velkommen til Bitcoin RPC-konsollen.</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>Brug op og ned-piletasterne til at navigere historikken og &lt;b&gt;Ctrl-L&lt;/b&gt; til at rydde skærmen.</translation>
+        <translation>Brug op- og ned-piletasterne til at navigere i historikken og &lt;b&gt;Ctrl-L&lt;/b&gt; til at rydde skærmen.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1852,11 +1852,11 @@ Adresse: %4
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Totalen overstiger din saldo, når %1 transaktionsgebyr er inkluderet.</translation>
+        <translation>Totalen overstiger din saldo, når transaktionsgebyret på %1 er inkluderet.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Duplikeret adresse fundet. Du kan kun sende til hver adresse en gang pr. afsendelse.</translation>
+        <translation>Duplikeret adresse fundet. Du kan kun sende til hver adresse én gang pr. afsendelse.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -2396,7 +2396,7 @@ Adresse: %4
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
-        <translation>Beløb fjernet eller tilføjet balance.</translation>
+        <translation>Beløb trukket fra eller tilføjet balance.</translation>
     </message>
 </context>
 <context>
@@ -2427,7 +2427,7 @@ Adresse: %4
     </message>
     <message>
         <source>Range...</source>
-        <translation>Interval...</translation>
+        <translation>Interval …</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2459,15 +2459,15 @@ Adresse: %4
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Kopier adresse</translation>
+        <translation>Kopiér adresse</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Kopier mærkat</translation>
+        <translation>Kopiér mærkat</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Kopier beløb</translation>
+        <translation>Kopiér beløb</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
@@ -2475,7 +2475,7 @@ Adresse: %4
     </message>
     <message>
         <source>Edit label</source>
-        <translation>Rediger mærkat</translation>
+        <translation>Redigér mærkat</translation>
     </message>
     <message>
         <source>Show transaction details</source>
@@ -2631,7 +2631,7 @@ Adresse: %4
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Forbind til en knude for at modtage adresse, og afbryd</translation>
+        <translation>Forbind til en knude for at modtage adresser på andre knuder, og afbryd derefter</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2655,7 +2655,7 @@ Adresse: %4
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>Accepter kommandolinje- og JSON-RPC-kommandoer</translation>
+        <translation>Acceptér kommandolinje- og JSON-RPC-kommandoer</translation>
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
@@ -2663,7 +2663,7 @@ Adresse: %4
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation>Kør i baggrunden som en service, og accepter kommandoer</translation>
+        <translation>Kør i baggrunden som en service, og acceptér kommandoer</translation>
     </message>
     <message>
         <source>Use the test network</source>
@@ -3291,7 +3291,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation>Indlæser adresser...</translation>
+        <translation>Indlæser adresser …</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
@@ -3343,7 +3343,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>Indlæser blokindeks...</translation>
+        <translation>Indlæser blokindeks …</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
@@ -3351,7 +3351,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation>Indlæser tegnebog...</translation>
+        <translation>Indlæser tegnebog …</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
@@ -3363,7 +3363,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation>Genindlæser...</translation>
+        <translation>Genindlæser …</translation>
     </message>
     <message>
         <source>Done loading</source>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 8ca8360ef632..1ed40a77c28b 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -320,7 +320,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>%Guardar copia del monedero...</translation>
+        <translation>&amp;Guardar copia del monedero...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
@@ -1052,11 +1052,11 @@ Dirección: %4
     </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 type="unfinished"/>
+        <translation>URLs de terceros (por ejemplo, un explorador de bloques) que aparecen en la pestaña de transacciones como items del menú contextual. El %s en la URL es reemplazado por el hash de la transacción. Se pueden separar múltiples URLs por una barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URLs de transacciones de terceros</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1977,8 +1977,7 @@ Dirección: %4
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation>Bitcoin Core se está cerrando...
-</translation>
+        <translation>Bitcoin Core se está cerrando...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index ece70f60759d..dc723595908e 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1053,7 +1053,7 @@ Osoite: %4</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>Kolmannen osapuolen rahansiirto URL:t</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index 5edfc0746a18..d3a6cece8759 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -611,7 +611,7 @@ Address: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>すべて選択/選択解除</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -739,7 +739,7 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>なし</translation>
     </message>
     <message>
         <source>Dust</source>
@@ -1189,7 +1189,7 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>なし</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1425,7 +1425,7 @@ Address: %4
     </message>
     <message>
         <source>Name</source>
-        <translation type="unfinished"/>
+        <translation>名前</translation>
     </message>
     <message>
         <source>Number of connections</source>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index f5d2dddbe405..fb013f4c1dbf 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -48,7 +48,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>새 항목(N)</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -60,7 +60,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>닫기 (L)</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -76,7 +76,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;내보내기</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -92,7 +92,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>선택하기 (H)</translation>
     </message>
     <message>
         <source>Sending addresses</source>
@@ -108,7 +108,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>비트코인을 받을 수 있는 계좌 주소입니다. 매 거래마다 새로운 주소 사용을 권장합니다. </translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -401,11 +401,11 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <translation>지갑 주소가 자신 소유의 것인지 증명하기 위해 비트코인 주소에 서명할 수 있습니다.</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 주소의 전자 서명 확인을 위해 첨부된 메시지가 있을 경우 이를 검증할 수 있습니다.</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -441,11 +441,11 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>한번 이상 사용된 보내는 주소와 주소 제목의 목록을 보여줍니다.</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>한번 이상 사용된 받는 주소와 주소 제목의 목록을 보여줍니다.</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
@@ -814,7 +814,7 @@ Address: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>현재 선택된 주소 필드의 제목입니다. </translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
@@ -869,7 +869,7 @@ Address: %4
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>폴더가 이미 존재합니다. 새로운 폴더 생성을 원한다면 %1 명령어를 추가하세요. </translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
@@ -1275,7 +1275,7 @@ Address: %4
     </message>
     <message>
         <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
+        <translation>URI의 파싱에 문제가 발생했습니다. 잘못된 비트코인 주소나 URI 파라미터 구성에 오류가 존재할 수 있습니다.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1358,7 +1358,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 코어가 아직 안전하게 종료되지 않았습니다.</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1563,7 +1563,7 @@ Address: %4
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>지급을 요청하기 위해 아래 형식을 사용하세요. 입력값은 &lt;b&gt;선택 사항&lt;/b&gt; 입니다.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
@@ -1907,7 +1907,7 @@ Address: %4
     </message>
     <message>
         <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>비트코인을 송금할 지갑 주소 입력하기 (예 : 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
@@ -2049,7 +2049,7 @@ Address: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
+        <translation>메시지를 검증하기 위해 아래 칸에 각각 지갑 주소와 메시지, 전자서명을 입력하세요. (메시지 원본의 띄어쓰기, 들여쓰기, 행 나눔 등이 정확하게 입력되어야 하므로 원본을 복사해서 입력하세요) 이 기능은 메시지 검증이 주 목적이며, 네트워크 침입자에 의해 변조되지 않도록 전자서명 해독에 불필요한 시간을 소모하지 마세요. </translation>
     </message>
     <message>
         <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2174,7 +2174,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>%n 노드를 거쳐 전파합니다.</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2278,7 +2278,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>%n 개의 추가 블럭을 읽습니다.</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -2320,7 +2320,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>%n 개의 추가 블럭을 읽습니다.</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -2560,7 +2560,7 @@ Address: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;내보내기</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -2721,7 +2721,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
+        <translation>오류 : 해당 거래는 송금액, 다중 거래, 최근 수령한 금액의 사용 등의 이유로 최소 %s 이상의 송금 수수료가 필요합니다.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2753,7 +2753,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
+        <translation>이 빌드 버전은 정식 출시 전 테스트의 목적이며, 예기치 않은 위험과 오류가 발생할 수 있습니다. 채굴과 상점용 소프트웨어로 사용하는 것을 권하지 않습니다.</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
@@ -2773,7 +2773,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>경고 : 모든 네트워크가 동의해야 하나, 일부 채굴자들에게 문제가 있는 것으로 보입니다. </translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
@@ -2781,11 +2781,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>경고 : wallet.dat 파일을 읽는 중 에러가 발생했습니다. 주소 키는 모두 정확하게 로딩되었으나 거래 데이터와 주소록 필드에서 누락이나 오류가 존재할 수 있습니다. </translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
+        <translation>경고 : wallet.dat가 손상되어 데이터가 복구되었습니다. 원래의 wallet.dat 파일은 %s 후에 wallet.{timestamp}.bak 이름으로 저장됩니다. 잔액과 거래 내역이 정확하지 않다면 백업 파일로 부터 복원해야 합니다. </translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2957,7 +2957,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>들여오기 중...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
@@ -2969,7 +2969,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>사용 가능한 파일 디스크립터-File Descriptor-가 부족합니다. </translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
@@ -2981,7 +2981,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <translation>현재의 blk000??.dat 파일들로부터 블록체인 색인을 재구성합니다.</translation>
     </message>
     <message>
         <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
@@ -2997,7 +2997,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>원격 프로시져 호출 서비스를 위한 쓰레드 개수를 설정합니다 (기본값 : 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
@@ -3041,11 +3041,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>-txindex를 바꾸기 위해서는 -reindex를 사용해서 데이터베이스를 재구성해야 합니다. </translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
-        <translation>외부 blk000??.dat 파일에서 블록 가져오기</translation>
+        <translation>외부 blk000??.dat 파일에서 블록을 가져옵니다.</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
@@ -3069,11 +3069,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>노드로 전달하기 위한 최저 거래 수수료가 부족합니다. - minrelaytxfee=&lt;amount&gt;: &apos;%s&apos; -</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>최저 거래 수수료가 부족합니다. -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3173,7 +3173,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 코어의 데몬 프로그램을 실행합니다.</translation>
     </message>
     <message>
         <source>System error: </source>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index a9898adb2b32..c74fd8ab3bd6 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1490,7 +1490,7 @@ Adresas: %4</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <translation>Sveiki atvykę į Bitcoin RPC konsolę.</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>
@@ -2633,7 +2633,7 @@ Adresas: %4</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation type="unfinished"/>
+        <translation>Nurodykite savo nuosavą viešą adresą</translation>
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
@@ -3347,7 +3347,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>Negalima parašyti įprasto adreso</translation>
     </message>
     <message>
         <source>Rescanning...</source>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index c17f65e125ec..299e4d55e02e 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -16,7 +16,12 @@ This is experimental software.
 Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
+        <translation>
+Šī ir eksperimentālā programmatūra.
+
+Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datni COPYING vai http://www.opensource.org/licenses/mit-license.php.
+
+Šis produkts ietver programmatūru, ko izstrādājis OpenSSL Project izmantošanai OpenSSL Toolkit (http://www.openssl.org/) un šifrēšanas programmatūru no Eric Young (eay@cryptsoft.com) un UPnP programmatūru no Thomas Bernard.</translation>
     </message>
     <message>
         <source>Copyright</source>
@@ -28,7 +33,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>(%1-bit)</source>
-        <translation type="unfinished"/>
+        <translation>(%1-biti)</translation>
     </message>
 </context>
 <context>
@@ -63,7 +68,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Izdzēst iezīmētās adreses no saraksta</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -79,11 +84,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Izvēlies adresi uz kuru sūtīt bitcoins</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Izvēlies adresi ar kuru saņemt bitcoins</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -201,11 +206,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Brīdinājums: Ja tu nošifrē savu maciņu un pazaudē paroli, tu &lt;b&gt;PAZAUDĒSI VISAS SAVAS BITCOINS&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
+        <translation>Vai tu tiešām vēlies šifrēt savu maciņu?</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>
@@ -249,7 +254,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <translation>Maciņa parole tika veiksmīgi nomainīta.</translation>
     </message>
 </context>
 <context>
@@ -268,7 +273,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Node</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -304,31 +309,31 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>&amp;Iespējas</translation>
+        <translation>&amp;Iespējas...</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>Š&amp;ifrēt maciņu...</translation>
+        <translation>Šifrēt &amp;maciņu...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Izveidot maciņa rezerves kopiju</translation>
+        <translation>&amp;Maciņa Rezerves Kopija...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>&amp;Mainīt paroli</translation>
+        <translation>Mainīt &amp;Paroli...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;Adrešu sūtīšana...</translation>
+        <translation>&amp;Sūtīšanas adreses...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>Adrešu &amp;saņemšana...</translation>
+        <translation>Saņemšanas &amp;adreses...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation>Atvērt &amp;URI</translation>
+        <translation>Atvērt &amp;URI...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -356,7 +361,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>&amp;Debug logs</translation>
+        <translation>&amp;Atkļūdošanas logs</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
@@ -388,7 +393,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <translation>Parādīt vai paslēpt galveno Logu</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
@@ -428,7 +433,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Pieprasīt maksājumus (izveido QR kodu un bitcoin: URIs)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -496,7 +501,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <translation>%1 aizmugurē</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
@@ -556,7 +561,7 @@ Adrese: %4
     </message>
     <message>
         <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>Radās fatāla kļūda. Bitcoin Core nevar vairs droši turpināt un tiks izslēgta.</translation>
     </message>
 </context>
 <context>
@@ -594,7 +599,7 @@ Adrese: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Zema Izeja:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -606,7 +611,7 @@ Adrese: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>iezīmēt visus</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -658,11 +663,11 @@ Adrese: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Aizslēgt neiztērēto</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Atslēgt neiztērēto</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -686,7 +691,7 @@ Adrese: %4
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopēt zemo izeju</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -730,7 +735,7 @@ Adrese: %4
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 aizslēgts)</translation>
     </message>
     <message>
         <source>none</source>
@@ -738,7 +743,7 @@ Adrese: %4
     </message>
     <message>
         <source>Dust</source>
-        <translation type="unfinished"/>
+        <translation>Putekļi</translation>
     </message>
     <message>
         <source>yes</source>
@@ -856,7 +861,7 @@ Adrese: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Tiks izveidota jauna datu mape.</translation>
     </message>
     <message>
         <source>name</source>
@@ -868,11 +873,11 @@ Adrese: %4
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>Šāds ceļš jau pastāv un tā nav mape.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Šeit nevar izveidot datu mapi.</translation>
     </message>
 </context>
 <context>
@@ -942,11 +947,11 @@ Adrese: %4
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Izmantot noklusēto datu mapi</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Izmantot pielāgotu datu mapi:</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -1020,7 +1025,7 @@ Adrese: %4
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Datubāzes kešatmiņas izmērs</translation>
     </message>
     <message>
         <source>MB</source>
@@ -1028,19 +1033,19 @@ Adrese: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Skriptu &amp;pārbaudes pavedienu skaits</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Savienoties ar Bitcoin tīklu caur SOCKS starpniekserveri.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Savienoties caur SOCKS starpniekserveri (noklusējuma starpniekserveris)</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>Starpniekservera IP adrese (piem. IPv4: 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>
@@ -1048,19 +1053,19 @@ Adrese: %4
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>Trešo personu transakciju URLs</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Aktīvās komandrindas opcijas, kuras pārspēko šos iestatījumus:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
+        <translation>Atiestatīt visus klienta iestatījumus uz noklusējumu.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Atiestatīt Iestatījumus.</translation>
     </message>
     <message>
         <source>&amp;Network</source>
@@ -1100,7 +1105,7 @@ Adrese: %4
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation>Proxy &amp;IP:</translation>
+        <translation>Starpniekservera &amp;IP:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
@@ -1108,7 +1113,7 @@ Adrese: %4
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Proxy ports (piem. 9050)</translation>
+        <translation>Starpniekservera ports (piem. 9050)</translation>
     </message>
     <message>
         <source>SOCKS &amp;Version:</source>
@@ -1116,7 +1121,7 @@ Adrese: %4
     </message>
     <message>
         <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>proxy SOCKS versija (piem. 5)</translation>
+        <translation>Starpniekservera SOCKS versija (piem. 5)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
@@ -1172,7 +1177,7 @@ Adrese: %4
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation>&amp;OK</translation>
+        <translation>&amp;Labi</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
@@ -1184,11 +1189,11 @@ Adrese: %4
     </message>
     <message>
         <source>none</source>
-        <translation>neviens</translation>
+        <translation>neviena</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation type="unfinished"/>
+        <translation>Apstiprināt iestatījumu atiestatīšanu</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
@@ -1196,7 +1201,7 @@ Adrese: %4
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>Klients tiks izslēgts, vai vēlaties turpināt?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
@@ -1204,7 +1209,7 @@ Adrese: %4
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>Norādītā proxy adrese nav derīga.</translation>
+        <translation>Norādītā starpniekservera adrese nav derīga.</translation>
     </message>
 </context>
 <context>
@@ -1231,11 +1236,11 @@ Adrese: %4
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Neizšķirts:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Kopējā apstiprināmo transakciju vērtība, vēl nav ieskaitīta tērējamajā bilancē</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1247,7 +1252,7 @@ Adrese: %4
     </message>
     <message>
         <source>Total:</source>
-        <translation>Kopā:</translation>
+        <translation>Kopsumma:</translation>
     </message>
     <message>
         <source>Your current total balance</source>
@@ -1266,7 +1271,7 @@ Adrese: %4
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
-        <translation type="unfinished"/>
+        <translation>URI apstrāde</translation>
     </message>
     <message>
         <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
@@ -1278,11 +1283,11 @@ Adrese: %4
     </message>
     <message>
         <source>Payment request error</source>
-        <translation type="unfinished"/>
+        <translation>Maksājumu pieprasījuma kļūda</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
+        <translation>Nevar palaist Bitcoin: nospied-lai-maksātu apstrādātāju</translation>
     </message>
     <message>
         <source>Net manager warning</source>
@@ -1310,7 +1315,7 @@ Adrese: %4
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation type="unfinished"/>
+        <translation>Atmaksa no %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
@@ -1326,11 +1331,11 @@ Adrese: %4
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
+        <translation>Maksājums atzīts</translation>
     </message>
     <message>
         <source>Network request error</source>
-        <translation type="unfinished"/>
+        <translation>Tīkla pieprasījuma kļūda</translation>
     </message>
 </context>
 <context>
@@ -1353,7 +1358,7 @@ Adrese: %4
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core vel neizgāja droši...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1399,11 +1404,11 @@ Adrese: %4
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
+        <translation>Atkļūdošanas logs</translation>
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Vispārējs</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1463,11 +1468,11 @@ Adrese: %4
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>Ie.:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Iz.:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1475,7 +1480,7 @@ Adrese: %4
     </message>
     <message>
         <source>Debug log file</source>
-        <translation type="unfinished"/>
+        <translation>Atkļūdošanas žurnāla datne</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
@@ -1546,7 +1551,7 @@ Adrese: %4
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Atkārtoti izmantot esošo saņemšanas adresi (nav ieteicams)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
@@ -1582,7 +1587,7 @@ Adrese: %4
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Parādīt atlasītos pieprasījumus (tas pats, kas dubultklikšķis uz ieraksta)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -1590,7 +1595,7 @@ Adrese: %4
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Noņemt atlasītos ierakstus no saraksta.</translation>
     </message>
     <message>
         <source>Remove</source>
@@ -1625,7 +1630,7 @@ Adrese: %4
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Saglabāt Attēlu</translation>
+        <translation>&amp;Saglabāt Attēlu...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1707,15 +1712,15 @@ Adrese: %4
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>Ieejas...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>automātiski atlasīts</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Nepietiekami līdzekļi!</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -1739,7 +1744,7 @@ Adrese: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Zema Izeja:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -1819,7 +1824,7 @@ Adrese: %4
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopēt zemās izejas</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -1835,7 +1840,7 @@ Adrese: %4
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
+        <translation>Saņēmēja adrese ir nepareiza, lūdzu pārbaudi.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
@@ -1863,7 +1868,7 @@ Adrese: %4
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Brīdinājums: Nederīga Bitcoin adrese</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1871,7 +1876,7 @@ Adrese: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
+        <translation>Brīdinājums: Nezināma atlikuma adrese</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1887,7 +1892,7 @@ Adrese: %4
     </message>
     <message>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <translation>Nederīga maksājuma adrese %1</translation>
     </message>
 </context>
 <context>
@@ -1914,7 +1919,7 @@ Adrese: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Izvēlies iepriekš izmantoto adresi</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
@@ -1962,7 +1967,7 @@ Adrese: %4
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Memo:</translation>
     </message>
 </context>
 <context>
@@ -1973,7 +1978,7 @@ Adrese: %4
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>Neizslēdziet datoru kamēr šis logs nepazūd.</translation>
     </message>
 </context>
 <context>
@@ -1992,11 +1997,11 @@ Adrese: %4
     </message>
     <message>
         <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Adrese ar kuru parakstīt ziņojumu (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Izvēlies iepriekš izmantoto adresi</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -2012,7 +2017,7 @@ Adrese: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
+        <translation>Šeit ievadi ziņojumu kuru vēlies parakstīt</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -2020,11 +2025,11 @@ Adrese: %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Kopēt parakstu uz sistēmas starpliktuvi</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Parakstīt ziņojumu lai pierādītu, ka esi šīs Bitcoin adreses īpašnieks.</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
@@ -2032,7 +2037,7 @@ Adrese: %4
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
+        <translation>Atiestatīt visus laukus</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -2048,7 +2053,7 @@ Adrese: %4
     </message>
     <message>
         <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Adrese ar kādu ziņojums tika parakstīts (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2060,7 +2065,7 @@ Adrese: %4
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
+        <translation>Atiestatīt visus laukus</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2072,23 +2077,23 @@ Adrese: %4
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>Ievadītā adrese ir nederīga.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Lūdzu pārbaudi adresi un mēģini vēlreiz.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
+        <translation>Ievadītā adrese neattiecas uz atslēgu.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
+        <translation>Maciņa atslēgšana tika atcelta.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <translation>Privātā atslēga priekš ievadītās adreses nav pieejama.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2104,11 +2109,11 @@ Adrese: %4
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Lūdzu pārbaudi parakstu un mēģini vēlreiz.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
+        <translation>Paraksts neatbilda ziņojuma apkopojumam.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -2149,7 +2154,7 @@ Adrese: %4
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>pretrunā</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -2181,7 +2186,7 @@ Adrese: %4
     </message>
     <message>
         <source>Generated</source>
-        <translation type="unfinished"/>
+        <translation>Ģenerēts</translation>
     </message>
     <message>
         <source>From</source>
@@ -2193,15 +2198,15 @@ Adrese: %4
     </message>
     <message>
         <source>own address</source>
-        <translation type="unfinished"/>
+        <translation>paša adrese</translation>
     </message>
     <message>
         <source>label</source>
-        <translation type="unfinished"/>
+        <translation>etiķete</translation>
     </message>
     <message>
         <source>Credit</source>
-        <translation type="unfinished"/>
+        <translation>Kredīts</translation>
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
@@ -2209,11 +2214,11 @@ Adrese: %4
     </message>
     <message>
         <source>not accepted</source>
-        <translation type="unfinished"/>
+        <translation>nav pieņemts</translation>
     </message>
     <message>
         <source>Debit</source>
-        <translation type="unfinished"/>
+        <translation>Debets</translation>
     </message>
     <message>
         <source>Transaction fee</source>
@@ -2237,7 +2242,7 @@ Adrese: %4
     </message>
     <message>
         <source>Merchant</source>
-        <translation type="unfinished"/>
+        <translation>Tirgotājs</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
@@ -2245,7 +2250,7 @@ Adrese: %4
     </message>
     <message>
         <source>Debug information</source>
-        <translation type="unfinished"/>
+        <translation>Atkļūdošanas informācija</translation>
     </message>
     <message>
         <source>Transaction</source>
@@ -2253,7 +2258,7 @@ Adrese: %4
     </message>
     <message>
         <source>Inputs</source>
-        <translation type="unfinished"/>
+        <translation>Ieejas</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -2273,7 +2278,7 @@ Adrese: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Atvērts vel %n blokus</numerusform><numerusform>Atvērts vel %n bloku</numerusform><numerusform>Atvērts vel %n blokus</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -2315,7 +2320,7 @@ Adrese: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Atvērts vel %n blokus</numerusform><numerusform>Atvērts vel %n bloku</numerusform><numerusform>Atvērts vel %n blokus</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -2347,7 +2352,7 @@ Adrese: %4
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>Pretrunā</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2494,7 +2499,7 @@ Adrese: %4
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Transakciju vēsture tika veiksmīgi saglabāta uz %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2555,7 +2560,7 @@ Adrese: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Eksportēt...</translation>
+        <translation>&amp;Eksportēt</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -2654,7 +2659,7 @@ Adrese: %4
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core RPC klienta versija</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2764,7 +2769,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
+        <translation>Brīdinājums: Lūdzu pārbaudi vai tava datora datums un laiks ir pareizs! Ja pulkstenis ir nepareizs, Bitcoin Core nestrādās pareizi.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
@@ -2784,11 +2789,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(noklusējums: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(noklusējums: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2796,7 +2801,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
+        <translation>Mēģināt atgūt privātās atslēgas no bojāta wallet.dat</translation>
     </message>
     <message>
         <source>Bitcoin Core Daemon</source>
@@ -2812,11 +2817,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
+        <translation>Savienoties tikai ar norādītajām nodēm.</translation>
     </message>
     <message>
         <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <translation>Savienoties caur SOCKS starpniekserveri</translation>
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2824,7 +2829,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Savienojuma iestatījumi:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2832,7 +2837,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Atkļūdošanas/Testēšanas iestatījumi:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
@@ -2860,7 +2865,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <translation>Kļūda ielādējot bloku datubāzi</translation>
     </message>
     <message>
         <source>Error opening block database</source>
@@ -2868,15 +2873,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <translation>Kļūda: Zema diska vieta!</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <translation>Kļūda: Maciņš ir aizslēgts, nevar izveidot transakciju!</translation>
     </message>
     <message>
         <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <translation>Kļūda: sistēmas kļūda:</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
@@ -2932,11 +2937,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Atrast pīrus izmantojot DNS uzmeklēšanu (noklusējums: 1 ja nav -connect)</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Piespiest drošo režīmu (noklusējums: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2952,7 +2957,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importē...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
@@ -3000,7 +3005,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Tērēt neapstiprinātu atlikumu kad sūta transakcijas (noklusējums: 1)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
@@ -3020,7 +3025,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>Uzgaidi līdz RPC serveris palaižas</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
@@ -3040,7 +3045,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <translation>Importēt blokus no ārējās blk000??.dat datnes</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
@@ -3112,7 +3117,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>RPC servera iestatījumi:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
@@ -3132,7 +3137,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Sūtīt komandu uz Bitcoin Core</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3152,7 +3157,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Rādīt etalonuzdevuma informāciju (noklusējums: 0)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3160,7 +3165,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <translation>Transakcijas parakstīšana neizdevās</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
@@ -3168,19 +3173,19 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Sākt Bitcoin Core Procesu</translation>
     </message>
     <message>
         <source>System error: </source>
-        <translation type="unfinished"/>
+        <translation>Sistēmas kļūda:</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <translation>Transakcijas summa ir pārāk maza</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>Transakcijas summai ir jābūt pozitīvai</translation>
     </message>
     <message>
         <source>Transaction too large</source>
@@ -3204,7 +3209,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <translation>Brīdinājums: Šī versija ir novecojusi, nepieciešams atjauninājums!</translation>
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
@@ -3212,7 +3217,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>startēšanas laikā</translation>
     </message>
     <message>
         <source>version</source>
@@ -3220,7 +3225,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>wallet.dat ir bojāts, glābšana neizdevās</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
@@ -3304,7 +3309,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Pieprasīta nezināma -socks proxy versija: %i</translation>
+        <translation>Pieprasīta nezināma -socks starpniekservera versija: %i</translation>
     </message>
     <message>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 09ef29d871e1..1267ad65b9b9 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1049,11 +1049,11 @@ Adresse: %4
     </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 type="unfinished"/>
+        <translation>Tredjepart URLer (f. eks. en blokkutforsker) som dukker opp i transaksjonsfanen som kontekst meny elementer. %s i URLen er erstattet med transaksjonen sin hash. Flere URLer er separert av en vertikal linje |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>Tredjepart transaksjon URLer</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1358,7 +1358,7 @@ Adresse: %4
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core har ennå ikke avsluttet på en sikker måte...</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index cbc08dd25d74..6bc177076b7a 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -739,7 +739,7 @@ Adres: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>żaden</translation>
     </message>
     <message>
         <source>Dust</source>
@@ -1189,7 +1189,7 @@ Adres: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>żaden</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -2340,7 +2340,7 @@ Adres: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Offline</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
@@ -3182,7 +3182,7 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Uruchom serwer Bitcoin Core</translation>
     </message>
     <message>
         <source>System error: </source>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index d96e9d936678..bce535fad736 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -16,7 +16,12 @@ This is experimental software.
 Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
+        <translation>
+Toto je experimentálny softvér.
+
+Distribuovaný pod MIT/X11 softvérovou licenciou, viď sprevádzajúci súbor COPYING alebo http://www.opensource.org/licenses/mit-license.php.
+
+Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v OpenSSL Toolkit (http://www.openssl.org/) a kryptografický softvér napísaný Ericom Youngom (eay@cryptsoft.com) a UPnP softvér napísaný Thomasom Bernardom.</translation>
     </message>
     <message>
         <source>Copyright</source>
@@ -28,7 +33,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>(%1-bit)</source>
-        <translation type="unfinished"/>
+        <translation>(%1-bit)</translation>
     </message>
 </context>
 <context>
@@ -209,7 +214,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </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 type="unfinished"/>
+        <translation>DÔLEŽITÉ: Všetky doterajšie záložné kópie peňaženky ktoré ste zhotovili by mali byť nahradené novým zašifrovaným súborom s peňaženkou. Z bezpečnostných dôvodov sa predchádzajúce kópie nezašifrovanej peňaženky stanú neužitočné keď začnete používať novú zašifrovanú peňaženku.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -320,11 +325,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Posielajúca adresa ...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Prijímajúca adresa...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -444,7 +449,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Otvoriť bitcoin URI alebo výzvu k platbe</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
@@ -452,7 +457,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Zobraziť pomocnú správu od Bitcoin Jadra pre získanie zoznamu dostupných možností príkazového riadku</translation>
     </message>
     <message>
         <source>Bitcoin client</source>
@@ -673,7 +678,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopírovať za poplatok</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -685,7 +690,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopírovať malý výstup.</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -749,31 +754,31 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Tento popis zčervená ak veľkosť transakcie presiahne 1000 bytov.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>To znamená že požadovaný poplatok je aspoň  %1  za kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Môže sa pohybovať +/- 1 bajt pre vstup.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Transakcie s vysokou prioritou sa pravdepodobnejsie dostanú do bloku.</translation>
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <translation>Tento popis zčervenie ak je priorita nižčia ako &quot;medium&quot;.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Tento popis zčervenie ak ktorýkoľvek príjemca dostane sumu menšiu ako %1.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <translation>To znamená že je požadovaný poplatok aspoň %1.</translation>
     </message>
     <message>
         <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
@@ -781,7 +786,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Tento popis zžervenie ak výdavok je menší než %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -910,7 +915,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť koreňový certifikát pre výzvy na platbu (prednastavené: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -918,7 +923,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Zvoľte dátový priečinok pri štarte (prednastavené: 0)</translation>
     </message>
 </context>
 <context>
@@ -933,7 +938,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Keďže spúštate program prvý krát, môžte si vybrať kde bude Bitcoin Jadro ukladať svoje dáta.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
@@ -1027,7 +1032,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Počet skript overujucich vlákien</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
@@ -1051,7 +1056,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Aktévne možnosti príkazového riadku ktoré prepíšu možnosti vyššie:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1067,7 +1072,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = auto, &lt;0 = nechať toľko jadier voľných)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
@@ -1083,11 +1088,11 @@ Adresa: %4</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 type="unfinished"/>
+        <translation>Ak vypnete míňanie nepotvrdeného výdavku tak výdavok z transakcie bude možné použiť až keď daná transakcia bude mať aspoň jedno potvrdenie. Toto má vplyv aj na výpočet vášho zostatku.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>Minúť nepotvrdený výdavok</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>
@@ -1281,7 +1286,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
+        <translation>Nedá sa spustiť obslužný program bitcoin: click-to-pay zaplatiť kliknutím</translation>
     </message>
     <message>
         <source>Net manager warning</source>
@@ -1289,19 +1294,19 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Vaše aktívne proxy nepodporuje SOCKS5, ktoré je potrebné pre vyzvu na zaplatenie cez proxy.</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>URL pre stiahnutie výzvy na zaplatenie je neplatné: %1</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
+        <translation>Obsluha súboru s požiadavkou na platbu</translation>
     </message>
     <message>
         <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
+        <translation>Súbor s výzvou na zaplatenie sa nedá čítať alebo spracovať! To môže byť spôsobené aj neplatným súborom s výzvou.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1317,7 +1322,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
+        <translation>Požiadavka na platbu nemôže byť analyzovaná alebo spracovaná!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1344,7 +1349,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Nedá sa rozlúštit súbor s nastaveniami: %1. Používajte výlučne kľúč=hodnota syntax.</translation>
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
@@ -1478,7 +1483,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <translation>Otvoriť Bitcoin log súbor pre ladenie z aktuálneho dátového adresára. Toto môže trvať niekoľko sekúnd pre veľké súbory.</translation>
     </message>
     <message>
         <source>Clear console</source>
@@ -1541,15 +1546,15 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Znovu použiť jednu z už použitých adries pre prijímanie. Znovu používanie adries je sporná otázka bezpečnosti aj súkromia. Používajte to len v prípade ak znovu generujete výzvu na zaplatenie ktorú ste už vyrobili v minulosti.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>Znovu použiť jestvujúcu prijímaciu adresu (neodporúča sa)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Pridať voliteľnú správu k výzve na zaplatenie, ktorá sa zobrazí keď bude výzva otvorená. Poznámka: Správa nebude poslaná s platbou cez sieť Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
@@ -1561,7 +1566,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Voliteľná požadovaná suma. Nechajte prázdne alebo nulu ak nepožadujete určitú sumu.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
@@ -1750,7 +1755,7 @@ Adresa: %4</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 type="unfinished"/>
+        <translation>Ak aktivované ale adresa pre výdavok je prázdna alebo neplatná, výdavok bude poslaný na novovytvorenú adresu.</translation>
     </message>
     <message>
         <source>Custom change address</source>
@@ -1806,7 +1811,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopírovať za poplatok</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -1818,7 +1823,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopírovať nízky výstup</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -1858,7 +1863,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>Transakcia bola zamietnutá! Toto sa môže stať ak niektoré coins vo vašej peňaženke už boli minuté, ako keď použijete kópiu wallet.dat a coins boli minuté z kópie ale neoznačené ako minuté tu.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
@@ -1945,11 +1950,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Vložte popis pre túto adresu aby sa uložila do zoznamu použitých adries</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Správa ktorá bola pripojená k bitcoin: URI a ktorá bude uložená s transakcou pre Vaše potreby. Poznámka: Táto správa nebude poslaná cez sieť Bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
@@ -2240,7 +2245,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <translation>Vytvorené coins musia dospieť %1 blokov kým môžu byť minuté. Keď vytvoríte tento blok, bude rozoslaný do siete aby bol akceptovaný do reťaze blokov. Ak sa nedostane reťaze, jeho stav sa zmení na &quot;zamietnutý&quot; a nebude sa dať minúť. Toto sa môže občas stať ak iná nóda vytvorí blok približne v tom istom čase.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2272,7 +2277,7 @@ Adresa: %4</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Otvoriť pre %n viac blok</numerusform><numerusform>Otvoriť pre %n viac blokov </numerusform><numerusform>Otvoriť pre %n viac blokov </numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -2314,7 +2319,7 @@ Adresa: %4</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Otvorené pre ešte %1 blok</numerusform><numerusform>Otvorené pre %n viac blokov </numerusform><numerusform>Otvorené pre %n blokov</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -2485,7 +2490,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Vyskytla sa chyba pri pokuse o uloženie histórie transakcií do %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
@@ -2679,11 +2684,21 @@ If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
 for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
 </source>
-        <translation type="unfinished"/>
+        <translation>%s, musíte nastaviť rpcpassword heslo v súbore nastavení:
+%s
+Odporúča sa používať nasledujúce náhodné heslo:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(nemusíte si pamätať toto heslo)
+Užívateľské meno a heslo NESMÚ byť rovnaké.
+Ak súbor neexistuje, vytvorte ho s prístupovým právom owner-readable-only čitateľné len pre majiteľa.
+Tiež sa odporúča nastaviť alertnotify aby ste boli upozorňovaní na problémy;
+napríklad: alertnotify=echo %%s | mail -s &quot;Bitcoin Výstraha&quot; admin@foo.com
+</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
+        <translation>Prijateľlné šifry (prednastavené: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
@@ -2695,7 +2710,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <translation>Priebežne obmedzuj transakcie bez poplatku na &lt;n&gt;*1000 bajtov za minútu (prednastavené: 15)</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
@@ -2703,19 +2718,19 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
+        <translation>Vojsť do režimu regresného testovania, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené.</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Zlyhalo počúvanie prichádzajúcich spojení (listen vrátil chybu %d)</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>Transakcia bola zamietnutá! Toto sa môže stať ak niektoré coins vo vašej peňaženke už boli minuté, ako keď použijete kópiu wallet.dat a coins boli minuté z kópie ale neoznačené ako minuté tu.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
+        <translation>Chyba: Táto transakcia vyžaduje transakčný poplatok aspoň %s kvôli svojej sume, komplexite alebo použitiu nedávno prijatých prostriedkov.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2723,39 +2738,39 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Poplatky menšie než toto sa považujú za nulové (pre vytvorenie transakcie) (prednastavené:</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Odložiť aktivitu databázy spoločnej pamäti do logu na disku každých &lt;n&gt; megabajtov (prednastavené: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>Ako dôkladne sú overované bloky -checkblocks (0-4, prednastavené: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>V tomto režime -getproclimit kontroluje koľko blokov sa vytvorí okamžite.</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 type="unfinished"/>
+        <translation>Nastaviť počeť vlákien overujúcich skripty (%u až %d, 0 = auto, &lt;0 = nechať toľkoto jadier voľných, prednastavené: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť obmedzenie pre procesor keď je zapnuté generovanie (-1 = bez obmedzenia, prednastavené: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
+        <translation>Toto je pred-testovacia verzia - použitie je na vlastné riziko - nepoužívajte na tvorbu bitcoin ani obchodovanie.</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>Nepodarilo sa pripojiť na %s na tomto počítači. Bitcoin Jadro je už pravdepodobne spustené.</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>Použite rozdielne SOCKS5 proxy pre dosiahnutie peer-ov cez Tor skryté služby (prednastavené: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
@@ -2763,15 +2778,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Skontroluj či je na počítači nastavený správny čas a dátum. Ak sú hodiny nastavené nesprávne, Bitcoin nebude správne pracovať.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Javí sa že sieť sieť úplne nesúhlasí! Niektorí mineri zjavne majú ťažkosti.
+
+The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Zjavne sa úplne nezhodujeme s našimi peer-mi! Možno potrebujete prejsť na novšiu verziu alebo ostatné nódy potrebujú vyššiu verziu.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2779,7 +2796,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: wallet.dat je poškodený, údaje úspešne získané! Pôvodný wallet.dat uložený ako wallet.{timestamp}.bak v %s; ak váš zostatok alebo transakcie niesu správne, mali by ste súbor obnoviť zo zálohy.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2799,7 +2816,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Démon Jadro Bitcoin</translation>
     </message>
     <message>
         <source>Block creation options:</source>
@@ -2807,7 +2824,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <translation>Vyčistiť zoznam transakcií peňaženky (diagnostický nástroj; zahŕňa -rescan)</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
@@ -2819,7 +2836,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Pripojiť ku JSON-RPC na &lt;port&gt; (prednastavené: 8332 alebo testnet: 18332)</translation>
     </message>
     <message>
         <source>Connection options:</source>
@@ -2835,7 +2852,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vypnúť bezpečný režim, vypnúť udalosť skutočný bezpečný režim (prednastavené: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
@@ -2843,7 +2860,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>Nenahrat peňaženku a zablokovať volania RPC.</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2907,11 +2924,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhalo zapisovanie informácié o súbore</translation>
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <translation>Zlyhalo zapisovanie do databázy coins</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
@@ -2927,7 +2944,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Poplatky menšie než toto sa považujú za nulové (pre preposielanie) (prednastavené:</translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2935,7 +2952,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vnútiť bezpečný režim (prenastavené: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2947,7 +2964,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Ak nie je uvedená &lt;category&gt;, na výstupe zobrazuj všetky informácie pre ladenie.</translation>
     </message>
     <message>
         <source>Importing...</source>
@@ -2967,7 +2984,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Na začiatok logu pre ladenie vlož dátum a čas (prednastavené: 1)</translation>
     </message>
     <message>
         <source>RPC client options:</source>
@@ -2983,7 +3000,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d na %d, prednatavené: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
@@ -2999,11 +3016,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Míňať nepotvrdený výdavok pri odosielaní (prednastavené: 1)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>Toto je mienené nástrojom pre regresné testovania a vývoj programu.</translation>
     </message>
     <message>
         <source>Usage (deprecated, use bitcoin-cli):</source>
@@ -3031,7 +3048,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Varovanie: Zastaralý parameter -debugnet bol ignorovaný, použite -debug=net</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
@@ -3047,15 +3064,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>Vykonať príkaz keď po prijatí patričné varovanie alebo vidíme veľmi dlhé rozdvojenie siete (%s v cmd je nahradené správou)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Výstup informácií pre ladenie (prednastavené: 0, uvádzanie &lt;category&gt; je voliteľné)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Nastaviť najväčšiu veľkosť vysoká-dôležitosť/nízke-poplatky transakcií v bajtoch (prednastavené: %d)</translation>
     </message>
     <message>
         <source>Information</source>
@@ -3071,15 +3088,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Obmedziť veľkosť pomocnej pamäti pre podpisy na &lt;n&gt; vstupov (prednastavené: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Zaznamenávať dôležitosť transakcií a poplatky za kB ak hľadáme bloky (prednastavené: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Udržiavaj úplný zoznam transakcií (prednastavené: 0)</translation>
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
@@ -3087,11 +3104,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <translation>Maximálna veľkosť vysielacieho zásobníka pre jedno spojenie, &lt;n&gt;*1000 bytov (predvolené: 1000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Akceptuj iba kontrolné body zhodné s blockchain (prednastavené: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
@@ -3099,15 +3116,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Vytlač blok pri spustení, ak nájdený v zozname blokov</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vytlačiť strom blokov pri spustení (prednastavené: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti RPC SSL: (Pozri v Bitcoin Wiki pokyny pre SSL nastavenie)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
@@ -3119,7 +3136,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Náhodne premiešaj 1 z každých &lt;n&gt; sieťových správ</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
@@ -3207,7 +3224,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <translation>Zmazať všetky transakcie z peňaženky...</translation>
     </message>
     <message>
         <source>on startup</source>

From 79d06dc6e07103b31b530f71b7187ea82c34266b Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Wed, 21 May 2014 18:50:46 +0800
Subject: [PATCH 0078/1819] Remove redundant c_str

---
 src/addrman.h        |  4 ++--
 src/init.cpp         |  2 +-
 src/leveldbwrapper.h |  4 ++--
 src/main.h           | 12 ++++++------
 src/net.h            |  2 +-
 src/script.h         |  2 +-
 src/wallet.h         |  4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index e2b0cb1093d9..5328a93b451b 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -420,7 +420,7 @@ class CAddrMan
             Check();
         }
         if (fRet)
-            LogPrint("addrman", "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort().c_str(), source.ToString().c_str(), nTried, nNew);
+            LogPrint("addrman", "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort().c_str(), source.ToString(), nTried, nNew);
         return fRet;
     }
 
@@ -436,7 +436,7 @@ class CAddrMan
             Check();
         }
         if (nAdd)
-            LogPrint("addrman", "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString().c_str(), nTried, nNew);
+            LogPrint("addrman", "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString(), nTried, nNew);
         return nAdd > 0;
     }
 
diff --git a/src/init.cpp b/src/init.cpp
index 766498876283..bc4924b48dca 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -914,7 +914,7 @@ bool AppInit2(boost::thread_group& threadGroup)
         for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
         {
             uint256 hash = (*mi).first;
-            if (strncmp(hash.ToString().c_str(), strMatch.c_str(), strMatch.size()) == 0)
+            if (boost::algorithm::starts_with(hash.ToString(), strMatch))
             {
                 CBlockIndex* pindex = (*mi).second;
                 CBlock block;
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 53e9e439bdd7..043a56bf38a4 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -93,7 +93,7 @@ class CLevelDBWrapper
         if (!status.ok()) {
             if (status.IsNotFound())
                 return false;
-            LogPrintf("LevelDB read failure: %s\n", status.ToString().c_str());
+            LogPrintf("LevelDB read failure: %s\n", status.ToString());
             HandleError(status);
         }
         try {
@@ -122,7 +122,7 @@ class CLevelDBWrapper
         if (!status.ok()) {
             if (status.IsNotFound())
                 return false;
-            LogPrintf("LevelDB read failure: %s\n", status.ToString().c_str());
+            LogPrintf("LevelDB read failure: %s\n", status.ToString());
             HandleError(status);
         }
         return true;
diff --git a/src/main.h b/src/main.h
index f47c9ee8252a..1dc48c0af8a4 100644
--- a/src/main.h
+++ b/src/main.h
@@ -862,13 +862,13 @@ class CBlockIndex
     {
         return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)",
             pprev, nHeight,
-            hashMerkleRoot.ToString().c_str(),
-            GetBlockHash().ToString().c_str());
+            hashMerkleRoot.ToString(),
+            GetBlockHash().ToString());
     }
 
     void print() const
     {
-        LogPrintf("%s\n", ToString().c_str());
+        LogPrintf("%s\n", ToString());
     }
 
     // Check whether this block index entry is valid up to the passed validity level.
@@ -953,14 +953,14 @@ class CDiskBlockIndex : public CBlockIndex
         std::string str = "CDiskBlockIndex(";
         str += CBlockIndex::ToString();
         str += strprintf("\n                hashBlock=%s, hashPrev=%s)",
-            GetBlockHash().ToString().c_str(),
-            hashPrev.ToString().c_str());
+            GetBlockHash().ToString(),
+            hashPrev.ToString());
         return str;
     }
 
     void print() const
     {
-        LogPrintf("%s\n", ToString().c_str());
+        LogPrintf("%s\n", ToString());
     }
 };
 
diff --git a/src/net.h b/src/net.h
index 729b1bcd5748..58a8fa739ba0 100644
--- a/src/net.h
+++ b/src/net.h
@@ -430,7 +430,7 @@ class CNode
             nRequestTime = it->second;
         else
             nRequestTime = 0;
-        LogPrint("net", "askfor %s   %d (%s)\n", inv.ToString().c_str(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str());
+        LogPrint("net", "askfor %s   %d (%s)\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str());
 
         // Make sure not to reuse time indexes to keep things in the same order
         int64_t nNow = GetTimeMicros() - 1000000;
diff --git a/src/script.h b/src/script.h
index 0d8a8544bd33..aed2b7a6ad09 100644
--- a/src/script.h
+++ b/src/script.h
@@ -722,7 +722,7 @@ class CScript : public std::vector<unsigned char>
 
     void print() const
     {
-        LogPrintf("%s\n", ToString().c_str());
+        LogPrintf("%s\n", ToString());
     }
 
     CScriptID GetID() const
diff --git a/src/wallet.h b/src/wallet.h
index b2c06d3f6185..81dfbba9cbd9 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -720,12 +720,12 @@ class COutput
 
     std::string ToString() const
     {
-        return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString().c_str(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
+        return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
     }
 
     void print() const
     {
-        LogPrintf("%s\n", ToString().c_str());
+        LogPrintf("%s\n", ToString());
     }
 };
 

From a48355dc44e8b86c2fc9f8b7973ac9e81a295be7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 22 May 2014 13:05:04 +0200
Subject: [PATCH 0079/1819] Remove forward declaration for non-existent class
 CCoinsDB

Found by stephenreed on #bitcoin.dev.
---
 src/main.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/main.h b/src/main.h
index f47c9ee8252a..6f39b6e89d68 100644
--- a/src/main.h
+++ b/src/main.h
@@ -102,7 +102,6 @@ extern unsigned int nCoinCacheSize;
 static const uint64_t nMinDiskSpace = 52428800;
 
 
-class CCoinsDB;
 class CBlockTreeDB;
 struct CDiskBlockPos;
 class CTxUndo;

From d90491a766e7ab5e9cc0a6207fe8ad88a803dfb1 Mon Sep 17 00:00:00 2001
From: LongShao007 <007longshao@gmail.com>
Date: Thu, 22 May 2014 21:41:59 +0800
Subject: [PATCH 0080/1819] Update test_main.cpp
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

i think should delete （#include "bitcoin-config.h"）。
---
 src/qt/test/test_main.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index a2adb0032733..220da28cfef3 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -1,4 +1,3 @@
-#include "bitcoin-config.h"
 #if defined(HAVE_CONFIG_H)
 #include "bitcoin-config.h"
 #endif

From a60838d09aed4d976e9343e8329d61afff204435 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 8 May 2014 14:15:19 +0200
Subject: [PATCH 0081/1819] Replace non-threadsafe strerror

Log the name of the error as well as the error code if a network problem
happens. This makes network troubleshooting more convenient.

Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
---
 configure.ac    |  2 ++
 src/net.cpp     | 24 ++++++++++++------------
 src/netbase.cpp | 41 +++++++++++++++++++++++++++++++++++++----
 src/netbase.h   |  2 ++
 4 files changed, 53 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6a8afe6e4452..3a8d33a5a010 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,6 +303,8 @@ INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
 # they also need to be passed down to any subprojects. Pull the results out of
 # the cache and add them to CPPFLAGS.
 AC_SYS_LARGEFILE
+# detect POSIX or GNU variant of strerror_r
+AC_FUNC_STRERROR_R
 
 if test x$ac_cv_sys_file_offset_bits != x &&
    test x$ac_cv_sys_file_offset_bits != xno &&
diff --git a/src/net.cpp b/src/net.cpp
index 6bde1e79993f..4cbd26a56372 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -178,7 +178,7 @@ bool RecvLine(SOCKET hSocket, string& strLine)
             {
                 // socket error
                 int nErr = WSAGetLastError();
-                LogPrint("net", "recv failed: %d\n", nErr);
+                LogPrint("net", "recv failed: %s\n", NetworkErrorString(nErr));
                 return false;
             }
         }
@@ -489,10 +489,10 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
 #ifdef WIN32
         u_long nOne = 1;
         if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR)
-            LogPrintf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %d\n", WSAGetLastError());
+            LogPrintf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %s\n", NetworkErrorString(WSAGetLastError()));
 #else
         if (fcntl(hSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
-            LogPrintf("ConnectSocket() : fcntl non-blocking setting failed, error %d\n", errno);
+            LogPrintf("ConnectSocket() : fcntl non-blocking setting failed, error %s\n", NetworkErrorString(errno));
 #endif
 
         // Add node
@@ -736,7 +736,7 @@ void SocketSendData(CNode *pnode)
                 int nErr = WSAGetLastError();
                 if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS)
                 {
-                    LogPrintf("socket send error %d\n", nErr);
+                    LogPrintf("socket send error %s\n", NetworkErrorString(nErr));
                     pnode->CloseSocketDisconnect();
                 }
             }
@@ -896,7 +896,7 @@ void ThreadSocketHandler()
             if (have_fds)
             {
                 int nErr = WSAGetLastError();
-                LogPrintf("socket select error %d\n", nErr);
+                LogPrintf("socket select error %s\n", NetworkErrorString(nErr));
                 for (unsigned int i = 0; i <= hSocketMax; i++)
                     FD_SET(i, &fdsetRecv);
             }
@@ -933,7 +933,7 @@ void ThreadSocketHandler()
             {
                 int nErr = WSAGetLastError();
                 if (nErr != WSAEWOULDBLOCK)
-                    LogPrintf("socket error accept failed: %d\n", nErr);
+                    LogPrintf("socket error accept failed: %s\n", NetworkErrorString(nErr));
             }
             else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS)
             {
@@ -1007,7 +1007,7 @@ void ThreadSocketHandler()
                             if (nErr != WSAEWOULDBLOCK && nErr != WSAEMSGSIZE && nErr != WSAEINTR && nErr != WSAEINPROGRESS)
                             {
                                 if (!pnode->fDisconnect)
-                                    LogPrintf("socket recv error %d\n", nErr);
+                                    LogPrintf("socket recv error %s\n", NetworkErrorString(nErr));
                                 pnode->CloseSocketDisconnect();
                             }
                         }
@@ -1585,7 +1585,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
     SOCKET hListenSocket = socket(((struct sockaddr*)&sockaddr)->sa_family, SOCK_STREAM, IPPROTO_TCP);
     if (hListenSocket == INVALID_SOCKET)
     {
-        strError = strprintf("Error: Couldn't open socket for incoming connections (socket returned error %d)", WSAGetLastError());
+        strError = strprintf("Error: Couldn't open socket for incoming connections (socket returned error %s)", NetworkErrorString(WSAGetLastError()));
         LogPrintf("%s\n", strError);
         return false;
     }
@@ -1609,7 +1609,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
     if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
 #endif
     {
-        strError = strprintf("Error: Couldn't set properties on socket for incoming connections (error %d)", WSAGetLastError());
+        strError = strprintf("Error: Couldn't set properties on socket for incoming connections (error %s)", NetworkErrorString(WSAGetLastError()));
         LogPrintf("%s\n", strError);
         return false;
     }
@@ -1638,7 +1638,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
         if (nErr == WSAEADDRINUSE)
             strError = strprintf(_("Unable to bind to %s on this computer. Bitcoin Core is probably already running."), addrBind.ToString());
         else
-            strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %d, %s)"), addrBind.ToString(), nErr, strerror(nErr));
+            strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr));
         LogPrintf("%s\n", strError);
         return false;
     }
@@ -1647,7 +1647,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
     // Listen for incoming connections
     if (listen(hListenSocket, SOMAXCONN) == SOCKET_ERROR)
     {
-        strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %d)"), WSAGetLastError());
+        strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %s)"), NetworkErrorString(WSAGetLastError()));
         LogPrintf("%s\n", strError);
         return false;
     }
@@ -1785,7 +1785,7 @@ class CNetCleanup
         BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket)
             if (hListenSocket != INVALID_SOCKET)
                 if (closesocket(hListenSocket) == SOCKET_ERROR)
-                    LogPrintf("closesocket(hListenSocket) failed with error %d\n", WSAGetLastError());
+                    LogPrintf("closesocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
 
         // clean up some globals (to help leak detection)
         BOOST_FOREACH(CNode *pnode, vNodes)
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 82a681281d22..e24a0a195c19 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -361,7 +361,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
             }
             if (nRet == SOCKET_ERROR)
             {
-                LogPrintf("select() for %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
+                LogPrintf("select() for %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
                 closesocket(hSocket);
                 return false;
             }
@@ -372,13 +372,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
             if (getsockopt(hSocket, SOL_SOCKET, SO_ERROR, &nRet, &nRetSize) == SOCKET_ERROR)
 #endif
             {
-                LogPrintf("getsockopt() for %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
+                LogPrintf("getsockopt() for %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
                 closesocket(hSocket);
                 return false;
             }
             if (nRet != 0)
             {
-                LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString(), strerror(nRet));
+                LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString(), NetworkErrorString(nRet));
                 closesocket(hSocket);
                 return false;
             }
@@ -389,7 +389,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
         else
 #endif
         {
-            LogPrintf("connect() to %s failed: %i\n", addrConnect.ToString(), WSAGetLastError());
+            LogPrintf("connect() to %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
             closesocket(hSocket);
             return false;
         }
@@ -1237,3 +1237,36 @@ bool operator!=(const CSubNet& a, const CSubNet& b)
 {
     return !(a==b);
 }
+
+#ifdef WIN32
+std::string NetworkErrorString(int err)
+{
+    char buf[256];
+    buf[0] = 0;
+    if(FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK,
+            NULL, err, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+            buf, sizeof(buf), NULL))
+    {
+        return strprintf("%s (%d)", buf, err);
+    }
+    else
+    {
+        return strprintf("Unknown error (%d)", err);
+    }
+}
+#else
+std::string NetworkErrorString(int err)
+{
+    char buf[256];
+    const char *s = buf;
+    buf[0] = 0;
+    /* Too bad there are two incompatible implementations of the
+     * thread-safe strerror. */
+#ifdef STRERROR_R_CHAR_P /* GNU variant can return a pointer outside the passed buffer */
+    s = strerror_r(err, buf, sizeof(buf));
+#else /* POSIX variant always returns message in buffer */
+    (void) strerror_r(err, buf, sizeof(buf));
+#endif
+    return strprintf("%s (%d)", s, err);
+}
+#endif
diff --git a/src/netbase.h b/src/netbase.h
index 118f866d6c95..5fd8be4aca1a 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -179,5 +179,7 @@ bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault =
 bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);
 bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout);
 bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
+/** Return readable error string for a network error code */
+std::string NetworkErrorString(int err);
 
 #endif

From 4665b1ab6f45bd35e3ffe2434395c81e5acbb91b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 23 May 2014 09:49:01 +0200
Subject: [PATCH 0082/1819] doc: Clarify wording about testing in README.md

Weaken and clarify the wording a bit, it currently implies that we get
more pull requests than we can ever handle which discourages
contribution.
---
 README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 3e9ec2598066..ddeaf988ee0a 100644
--- a/README.md
+++ b/README.md
@@ -49,8 +49,8 @@ Testing
 -------
 
 Testing and code review is the bottleneck for development; we get more pull
-requests than we can review and test. Please be patient and help out, and
-remember this is a security-critical project where any mistake might cost people
+requests than we can review and test on short notice. Please be patient and help out by testing
+other people's pull requests, and remember this is a security-critical project where any mistake might cost people
 lots of money.
 
 ### Automated Testing

From 3e8ac6af9a993e262d1160fb2e6e1e1f1d5d19f2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 8 May 2014 18:01:10 +0200
Subject: [PATCH 0083/1819] Replace non-threadsafe gmtime and setlocale

Make DateTimeStrFormat use boost::posix_time.

Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
---
 src/rpcprotocol.cpp     | 10 +---------
 src/test/util_tests.cpp |  4 +---
 src/util.cpp            | 12 ++++++++++++
 src/util.h              |  9 +--------
 4 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 5cbaa535ab88..2718f81783c3 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -51,15 +51,7 @@ string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeader
 
 static string rfc1123Time()
 {
-    char buffer[64];
-    time_t now;
-    time(&now);
-    struct tm* now_gmt = gmtime(&now);
-    string locale(setlocale(LC_TIME, NULL));
-    setlocale(LC_TIME, "C"); // we want POSIX (aka "C") weekday/month strings
-    strftime(buffer, sizeof(buffer), "%a, %d %b %Y %H:%M:%S +0000", now_gmt);
-    setlocale(LC_TIME, locale.c_str());
-    return string(buffer);
+    return DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", GetTime());
 }
 
 string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 3811569c0a98..0e53a57593e2 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -108,13 +108,11 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
 
 BOOST_AUTO_TEST_CASE(util_DateTimeStrFormat)
 {
-/*These are platform-dependant and thus removed to avoid useless test failures
     BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 0), "1970-01-01 00:00:00");
     BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 0x7FFFFFFF), "2038-01-19 03:14:07");
-    // Formats used within Bitcoin
     BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M:%S", 1317425777), "2011-09-30 23:36:17");
     BOOST_CHECK_EQUAL(DateTimeStrFormat("%Y-%m-%d %H:%M", 1317425777), "2011-09-30 23:36");
-*/
+    BOOST_CHECK_EQUAL(DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", 1317425777), "Fri, 30 Sep 2011 23:36:17 +0000");
 }
 
 BOOST_AUTO_TEST_CASE(util_ParseParameters)
diff --git a/src/util.cpp b/src/util.cpp
index aa3adf89ece4..f7ceb3e95ce6 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -14,6 +14,8 @@
 
 #include <stdarg.h>
 
+#include <boost/date_time/posix_time/posix_time.hpp>
+
 #ifndef WIN32
 // for posix_fallocate
 #ifdef __linux_
@@ -1400,3 +1402,13 @@ void SetupEnvironment()
     }
     #endif
 }
+
+std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
+{
+    // std::locale takes ownership of the pointer
+    std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat));
+    std::stringstream ss;
+    ss.imbue(loc);
+    ss << boost::posix_time::from_time_t(nTime);
+    return ss.str();
+}
diff --git a/src/util.h b/src/util.h
index 97185073e0d7..9e899b508463 100644
--- a/src/util.h
+++ b/src/util.h
@@ -325,14 +325,7 @@ inline int64_t GetTimeMicros()
             boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
 }
 
-inline std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
-{
-    time_t n = nTime;
-    struct tm* ptmTime = gmtime(&n);
-    char pszTime[200];
-    strftime(pszTime, sizeof(pszTime), pszFormat, ptmTime);
-    return pszTime;
-}
+std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
 
 inline bool IsSwitchChar(char c)
 {

From c47f5379bd25195d1e08638294f9ffbb5b1df0a8 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Fri, 23 May 2014 10:30:38 -0400
Subject: [PATCH 0084/1819] Add Tips and Tricks section to README

---
 README.md | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/README.md b/README.md
index 3e9ec2598066..98edf87ee082 100644
--- a/README.md
+++ b/README.md
@@ -81,3 +81,38 @@ Periodically the translations are pulled from Transifex and merged into the git
 
 **Important**: We do not accept translation changes as github pull request because the next
 pull from Transifex would automatically overwrite them again.
+
+Development tips and tricks
+---------------------------
+
+**compiling for debugging**
+
+Run configure with the --enable-debug option, then make. Or run configure with
+CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need.
+
+**debug.log**
+
+If the code is behaving strangely, take a look in the debug.log file in the data directory;
+error and debugging message are written there.
+
+The -debug=... command-line option controls debugging; running with just -debug will turn
+on all categories (and give you a very large debug.log file).
+
+The Qt code routes qDebug() output to debug.log under category "qt": run with -debug=qt
+to see it.
+
+**testnet and regtest modes**
+
+Run with the -testnet option to run with "play bitcoins" on the test network, if you
+are testing multi-machine code that needs to operate across the internet.
+
+If you are testing something that can run on one machine, run with the -regtest option.
+In regression test mode blocks can be created on-demand; see qa/rpc-tests/ for tests
+that run in -regest mode.
+
+**DEBUG_LOCKORDER**
+
+Bitcoin Core is a multithreaded application, and deadlocks or other multithreading bugs
+can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure
+CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of what locks
+are held, and adds warning to the debug.log file if inconsistencies are detected.

From a8a0db6f210c879396417d4eace8b188ca9a199a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 23 May 2014 17:54:57 +0200
Subject: [PATCH 0085/1819] qt: Periodic language update

Last-minute language update before release 0.9.2.
---
 src/qt/locale/bitcoin_da.ts    | 166 ++++++++++++++++-----------------
 src/qt/locale/bitcoin_id_ID.ts |  72 +++++++-------
 src/qt/locale/bitcoin_ko_KR.ts |  74 +++++++--------
 src/qt/locale/bitcoin_ro_RO.ts |   6 +-
 4 files changed, 159 insertions(+), 159 deletions(-)

diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 57957014971f..b13b38a878a8 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -25,7 +25,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Copyright</source>
-        <translation>Copyright</translation>
+        <translation>Ophavsret</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
@@ -76,7 +76,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>Eksporter</translation>
+        <translation>Eksportér</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -214,7 +214,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </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>VIGTIGT: Enhver tidligere sikkerhedskopi, som du har lavet af tegnebogsfilen, bør blive erstattet af den nyligt genererede, krypterede tegnebogsfil. Af sikkerhedsmæssige årsager vil tidligere sikkerhedskopier af den ikke-krypterede tegnebogsfil blive ubrugelig i det øjeblik, du starter med at anvende den nye, krypterede tegnebog.</translation>
+        <translation>VIGTIGT: Enhver tidligere sikkerhedskopi, som du har lavet af tegnebogsfilen, bør blive erstattet af den nyligt genererede, krypterede tegnebogsfil. Af sikkerhedsmæssige årsager vil tidligere sikkerhedskopier af den ikke-krypterede tegnebogsfil blive ubrugelige i det øjeblik, du starter med at anvende den nye, krypterede tegnebog.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -337,11 +337,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation>Importerer blokke fra disken...</translation>
+        <translation>Importerer blokke fra disken …</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation>Genindekserer blokke på disken...</translation>
+        <translation>Genindekserer blokke på disken …</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
@@ -397,7 +397,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Krypter de private nøgler, der hører til din tegnebog</translation>
+        <translation>Kryptér de private nøgler, der hører til din tegnebog</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
@@ -405,7 +405,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Verificér beskeder for at sikre, at de er underskrevet med de(n) angivne Bitcoin-adresse(r)</translation>
+        <translation>Verificér beskeder for at sikre, at de er underskrevet med de angivne Bitcoin-adresser</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -469,7 +469,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>Ingen blokkilde tilgængelig...</translation>
+        <translation>Ingen blokkilde tilgængelig …</translation>
     </message>
     <message>
         <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
@@ -861,7 +861,7 @@ Adresse: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>En ny datamappe vil blive oprettet.</translation>
     </message>
     <message>
         <source>name</source>
@@ -869,15 +869,15 @@ Adresse: %4
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Mappe eksisterer allerede. Tilføj %1, hvis du vil oprette en ny mappe her.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>Sti eksisterer allerede og er ikke en mappe.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Kan ikke oprette en mappe her.</translation>
     </message>
 </context>
 <context>
@@ -947,11 +947,11 @@ Adresse: %4
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Brug standardmappen for data</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Brug tilpasset mappe for data:</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -967,11 +967,11 @@ Adresse: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <translation>GB fri plads tilgængelig</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>(ud af %1 GB behøvet)</translation>
     </message>
 </context>
 <context>
@@ -1133,15 +1133,15 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>Minimer til statusfeltet i stedet for proceslinjen</translation>
+        <translation>Minimér til statusfeltet i stedet for proceslinjen</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 Quit in the menu.</source>
-        <translation>Minimer i stedet for at afslutte programmet, når vinduet lukkes. Når denne indstilling er valgt, vil programmet kun blive lukket, når du har valgt Afslut i menuen.</translation>
+        <translation>Minimér i stedet for at afslutte programmet, når vinduet lukkes. Når denne indstilling er valgt, vil programmet kun blive lukket, når du har valgt Afslut i menuen.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation>Minimer ved lukning</translation>
+        <translation>Minimér ved lukning</translation>
     </message>
     <message>
         <source>&amp;Display</source>
@@ -1149,11 +1149,11 @@ Adresse: %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>Brugergrænsefladesprog:</translation>
+        <translation>Sprog for brugergrænseflade:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>Brugergrænsefladesproget kan angives her. Denne indstilling træder først i kraft, når Bitcoin genstartes.</translation>
+        <translation>Sproget for brugergrænsefladen kan angives her. Denne indstilling træder først i kraft, når Bitcoin genstartes.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
@@ -1161,7 +1161,7 @@ Adresse: %4
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Vælg den standard underopdelingsenhed, som skal vises i brugergrænsefladen og ved afsendelse af bitcoins.</translation>
+        <translation>Vælg standard for underopdeling af enhed, som skal vises i brugergrænsefladen og ved afsendelse af bitcoins.</translation>
     </message>
     <message>
         <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
@@ -1181,7 +1181,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation>Annuller</translation>
+        <translation>Annullér</translation>
     </message>
     <message>
         <source>default</source>
@@ -1209,7 +1209,7 @@ Adresse: %4
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>Ugyldig proxy-adresse</translation>
+        <translation>Den angivne proxy-adresse er ugyldig.</translation>
     </message>
 </context>
 <context>
@@ -1240,7 +1240,7 @@ Adresse: %4
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Total transaktioner, som ikke er blevet bekræftet endnu, og som ikke endnu er en del af den nuværende saldo</translation>
+        <translation>Total saldo for transaktioner, som ikke er blevet bekræftet endnu, og som ikke endnu er en del af den tilgængelige saldo</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1283,7 +1283,7 @@ Adresse: %4
     </message>
     <message>
         <source>Payment request error</source>
-        <translation>Fejl i betalingsforespørgelse</translation>
+        <translation>Fejl i betalingsforespørgsel</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
@@ -1335,7 +1335,7 @@ Adresse: %4
     </message>
     <message>
         <source>Network request error</source>
-        <translation type="unfinished"/>
+        <translation>Fejl i netværksforespørgsel</translation>
     </message>
 </context>
 <context>
@@ -1346,7 +1346,7 @@ Adresse: %4
     </message>
     <message>
         <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
+        <translation>Fejl: Angivet datamappe &quot;%1&quot; eksisterer ikke.</translation>
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
@@ -1354,7 +1354,7 @@ Adresse: %4
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <translation>Fejl: Ugyldig kombination af -regtest og -testnet.</translation>
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
@@ -1362,7 +1362,7 @@ Adresse: %4
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Indtast en Bitcoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Indtast en Bitcoin-adresse (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
 </context>
 <context>
@@ -1484,7 +1484,7 @@ Adresse: %4
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Åbn Bitcoin-fejlsøgningslogfilen fra det nuværende datakatalog. Dette kan tage nogle få sekunder for en store logfiler.</translation>
+        <translation>Åbn Bitcoin-fejlsøgningslogfilen fra den nuværende datamappe. Dette kan tage nogle få sekunder for store logfiler.</translation>
     </message>
     <message>
         <source>Clear console</source>
@@ -1880,7 +1880,7 @@ Adresse: %4
     </message>
     <message>
         <source>Are you sure you want to send?</source>
-        <translation>Er du sikker på at du vil sende?</translation>
+        <translation>Er du sikker på, at du vil sende?</translation>
     </message>
     <message>
         <source>added as transaction fee</source>
@@ -1888,7 +1888,7 @@ Adresse: %4
     </message>
     <message>
         <source>Payment request expired</source>
-        <translation>Betalingsforespørgsel udløb</translation>
+        <translation>Betalingsforespørgsel udløbet</translation>
     </message>
     <message>
         <source>Invalid payment address %1</source>
@@ -1907,7 +1907,7 @@ Adresse: %4
     </message>
     <message>
         <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som betalingen skal sendes til (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Bitcoin-adressen som betalingen skal sendes til (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
@@ -1997,7 +1997,7 @@ Adresse: %4
     </message>
     <message>
         <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som beskeden skal underskrives med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Bitcoin-adressen som beskeden skal underskrives med (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2017,7 +2017,7 @@ Adresse: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation>Indtast beskeden, du ønsker at underskrive</translation>
+        <translation>Indtast her beskeden, du ønsker at underskrive</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -2025,7 +2025,7 @@ Adresse: %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>Kopier den nuværende underskrift til systemets udklipsholder</translation>
+        <translation>Kopiér den nuværende underskrift til systemets udklipsholder</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
@@ -2049,11 +2049,11 @@ Adresse: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Indtast den underskrevne adresse, beskeden (inkluder linjeskift, mellemrum mv. nøjagtigt, som de fremgår) og underskriften for at verificére beskeden. Vær forsigtig med ikke at lægge mere i underskriften end besked selv, så du undgår at blive narret af et man-in-the-middle-angreb.</translation>
+        <translation>Indtast herunder den underskrivende adresse, beskeden (inkludér linjeskift, mellemrum mv. nøjagtigt, som de fremgår) og underskriften for at verificere beskeden. Vær forsigtig med ikke at lægge mere i underskriften end besked selv, så du undgår at blive narret af et man-in-the-middle-angreb.</translation>
     </message>
     <message>
         <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som beskeden er underskrevet med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Bitcoin-adressen som beskeden er underskrevet med (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2069,7 +2069,7 @@ Adresse: %4
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Indtast en Bitcoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Indtast en Bitcoin-adresse (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
     </message>
     <message>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
@@ -2081,7 +2081,7 @@ Adresse: %4
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Tjek venligst adressen, og forsøg igen.</translation>
+        <translation>Tjek venligst adressen og forsøg igen.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
@@ -2117,11 +2117,11 @@ Adresse: %4
     </message>
     <message>
         <source>Message verification failed.</source>
-        <translation>Verificéring af besked mislykkedes.</translation>
+        <translation>Verificering af besked mislykkedes.</translation>
     </message>
     <message>
         <source>Message verified.</source>
-        <translation>Besked verificéret.</translation>
+        <translation>Besked verificeret.</translation>
     </message>
 </context>
 <context>
@@ -2136,7 +2136,7 @@ Adresse: %4
     </message>
     <message>
         <source>[testnet]</source>
-        <translation>[testnet]</translation>
+        <translation>[testnetværk]</translation>
     </message>
 </context>
 <context>
@@ -2174,7 +2174,7 @@ Adresse: %4
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, transmitteret igennem %n knude(r)</numerusform><numerusform>, transmitteret igennem %n knude(r)</numerusform></translation>
+        <translation><numerusform>, transmitteret igennem %n knude</numerusform><numerusform>, transmitteret igennem %n knuder</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2210,7 +2210,7 @@ Adresse: %4
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
-        <translation><numerusform>modner efter yderligere %n blok(ke)</numerusform><numerusform>modner efter yderligere %n blok(ke)</numerusform></translation>
+        <translation><numerusform>modner efter yderligere %n blok</numerusform><numerusform>modner efter yderligere %n blokke</numerusform></translation>
     </message>
     <message>
         <source>not accepted</source>
@@ -2238,7 +2238,7 @@ Adresse: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>Transaktionens ID</translation>
+        <translation>Transaktions-ID</translation>
     </message>
     <message>
         <source>Merchant</source>
@@ -2471,7 +2471,7 @@ Adresse: %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Kopier transaktionens ID</translation>
+        <translation>Kopiér transaktions-ID</translation>
     </message>
     <message>
         <source>Edit label</source>
@@ -2560,7 +2560,7 @@ Adresse: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>Eksporter</translation>
+        <translation>Eksportér</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -2568,7 +2568,7 @@ Adresse: %4
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation>Sikkerhedskopier tegnebog</translation>
+        <translation>Sikkerhedskopiér tegnebog</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
@@ -2576,7 +2576,7 @@ Adresse: %4
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation>Foretagelse af sikkerhedskopi fejlede</translation>
+        <translation>Sikkerhedskopiering mislykkedes</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
@@ -2588,7 +2588,7 @@ Adresse: %4
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation>Sikkerhedskopieret problemfri</translation>
+        <translation>Sikkerhedskopiering problemfri</translation>
     </message>
 </context>
 <context>
@@ -2619,7 +2619,7 @@ Adresse: %4
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation>Angiv datakatalog</translation>
+        <translation>Angiv datamappe</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
@@ -2671,7 +2671,7 @@ Adresse: %4
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Accepter forbindelser udefra (standard: 1 hvis hverken -proxy eller -connect)</translation>
+        <translation>Acceptér forbindelser udefra (standard: 1 hvis hverken -proxy eller -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2694,7 +2694,7 @@ rpcpassword=%s
 Brugernavnet og adgangskode MÅ IKKE være det samme.
 Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed.
 Det anbefales også at angive alertnotify, så du påmindes om problemer;
-f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
 </translation>
     </message>
     <message>
@@ -2731,7 +2731,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fejl: Denne transaktion kræver et transaktionsgebyr på minimum %s pga. dens størrelse, kompleksitet eller anvendelse af nyligt modtagne bitcoins!</translation>
+        <translation>Fejl: Denne transaktion kræver et transaktionsgebyr på minimum %s pga. dens beløb, kompleksitet eller anvendelse af nyligt modtagne bitcoins!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2783,11 +2783,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>Advarsel: Netværket ser ikke ud til at være fuldt ud enige! Enkelte minere ser ud til at opleve problemer.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Advarsel: Vi ser ikke ud til at være fuldt ud enige med andre noder! Du kan være nødt til at opgradere, eller andre noder kan være nødt til at opgradere.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2795,7 +2795,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Advarsel: wallet.dat ødelagt, data reddet! Oprindelig wallet.net gemt som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaktioner er forkert, bør du genskabe fra en sikkerhedskopi.</translation>
+        <translation>Advarsel: wallet.dat ødelagt, data reddet! Oprindelig wallet.dat gemt som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaktioner er forkert, bør du genskabe fra en sikkerhedskopi.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2947,7 +2947,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Find ligeværdige ved DNS-opslag (standard: 1 hvis ikke -connect)</translation>
+        <translation>Find andre knuder ved DNS-opslag (standard: 1 hvis ikke -connect)</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
@@ -2955,11 +2955,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
-        <translation>Generer bitcoins (standard: 0)</translation>
+        <translation>Generér bitcoins (standard: 0)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Antal blokke som tjekkes ved opstart (0=alle, standard: 288)</translation>
+        <translation>Antal blokke som tjekkes ved opstart (standard: 288, 0=alle)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
@@ -2971,7 +2971,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>Ukorrekt eller ingen tilblivelsesblok fundet. Forkert datamappe for netværk?</translation>
     </message>
     <message>
         <source>Invalid -onion address: &apos;%s&apos;</source>
@@ -3011,7 +3011,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <translation>Angiv tegnebogsfil (inden for datamappe)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
@@ -3027,11 +3027,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Verifying blocks...</source>
-        <translation>Verificerer blokke...</translation>
+        <translation>Verificerer blokke …</translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
-        <translation>Verificerer tegnebog...</translation>
+        <translation>Verificerer tegnebog …</translation>
     </message>
     <message>
         <source>Wait for RPC server to start</source>
@@ -3039,7 +3039,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>Tegnebog %1 findes uden for datamappe %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
@@ -3051,7 +3051,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex for at ændre -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
@@ -3063,7 +3063,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>Udfør kommando, når en relevant alarm modtages eller vi ser en virkelig lang udsplitning (%s i cmd erstattes af besked)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
@@ -3079,11 +3079,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb til -minrelaytxfee=&lt;beløb&gt;:&apos;%s&apos;</translation>
+        <translation>Ugyldigt beløb til -minrelaytxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb til -mintxfee=&lt;beløb&gt;:&apos;%s&apos;</translation>
+        <translation>Ugyldigt beløb til -mintxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3099,15 +3099,15 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksimum for modtagelsesbuffer pr. forbindelse, &lt;n&gt;*1000 bytes (standard: 5000)</translation>
+        <translation>Maksimum for modtagelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: 5000)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksimum for afsendelsesbuffer pr. forbindelse, &lt;n&gt;*1000 bytes (standard: 1000)</translation>
+        <translation>Maksimum for afsendelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: 1000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Accepter kun blokkæde, som matcher indbyggede kontrolposter (standard: 1)</translation>
+        <translation>Acceptér kun blokkæde, som matcher indbyggede kontrolposter (standard: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
@@ -3155,7 +3155,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Angiv minimumsblokstørrelse i bytes (standard: 0)</translation>
+        <translation>Angiv minimumsblokstørrelse i byte (standard: 0)</translation>
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
@@ -3203,11 +3203,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Forsøg at bruge UPnP til at konfigurere den lyttende port (standard: 0)</translation>
+        <translation>Brug UPnP til at konfigurere den lyttende port (standard: 0)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Forsøg at bruge UPnP til at konfigurere den lyttende port (standard: 1 når lytter)</translation>
+        <translation>Brug UPnP til at konfigurere den lyttende port (standard: 1 under lytning)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
@@ -3311,11 +3311,11 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ugyldig -proxy adresse: &apos;%s&apos;</translation>
+        <translation>Ugyldig -proxy adresse: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Ukendt netværk anført i -onlynet: &apos;%s&apos;</translation>
+        <translation>Ukendt netværk anført i -onlynet: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Unknown -socks proxy version requested: %i</source>
@@ -3323,15 +3323,15 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kan ikke finde -bind adressen: &apos;%s&apos;</translation>
+        <translation>Kan ikke finde -bind adressen: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kan ikke finde -externalip adressen: &apos;%s&apos;</translation>
+        <translation>Kan ikke finde -externalip adressen: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3381,7 +3381,7 @@ f.eks.: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
 %s
 If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Du skal angive rpcpassword=&lt;password&gt; i konfigurationsfilen:
+        <translation>Du skal angive rpcpassword=&lt;adgangskode&gt; i konfigurationsfilen:
 %s
 Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed.</translation>
     </message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index c4dee5f92d4e..2b9685f6a0f4 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -433,7 +433,7 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Permintaan pembayaran (membangkitkan kode QR dan bitcoin: URIs)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -473,7 +473,7 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
     </message>
     <message>
         <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>Proses % 1 dar i% 2 (perkiraan) blok catatan transaksi</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
@@ -509,7 +509,7 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <translation>Transaksi setelah ini tidak akan ditampilkan</translation>
     </message>
     <message>
         <source>Error</source>
@@ -561,7 +561,7 @@ Alamat: %4
     </message>
     <message>
         <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>Terjadi kesalahan fatal. Bitcoin tidak bisa lagi meneruskan dengan aman dan akan berhenti.</translation>
     </message>
 </context>
 <context>
@@ -611,15 +611,15 @@ Alamat: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(Tidak)memilih semua</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>mode pohon</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Mode daftar</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -663,11 +663,11 @@ Alamat: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Kunci terpakai.</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Membuka kunci terpakai</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -1350,7 +1350,7 @@ Alamat: %4
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <translation>Kesalahan: Tidak dapat memproses pengaturan berkas: %1. Hanya menggunakan kunci= nilai sintak.</translation>
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
@@ -1408,7 +1408,7 @@ Alamat: %4
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Umum</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1460,7 +1460,7 @@ Alamat: %4
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Kosongkan</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1504,31 +1504,31 @@ Alamat: %4
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <translation>%1 GB</translation>
     </message>
     <message>
         <source>%1 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 menit</translation>
     </message>
     <message>
         <source>%1 h</source>
-        <translation type="unfinished"/>
+        <translation>%1 Jam</translation>
     </message>
     <message>
         <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 Jam %2 menit</translation>
     </message>
 </context>
 <context>
@@ -1551,7 +1551,7 @@ Alamat: %4
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>Gunakan lagi alamat penerima yang ada (tidak disarankan)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
@@ -1716,7 +1716,7 @@ Alamat: %4
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>Pemilihan otomatis</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1947,7 +1947,7 @@ Alamat: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Permintaan pembayaran terverifikasi.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
@@ -1959,7 +1959,7 @@ Alamat: %4
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Permintaan pembayaran tidak terverifikasi.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -2005,7 +2005,7 @@ Alamat: %4
     </message>
     <message>
         <source>Alt+A</source>
-        <translation>Alt+J</translation>
+        <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
@@ -2726,7 +2726,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
+        <translation>Jalankan perintah ketika perubahan transaksi dompet (%s di cmd digantikan oleh TxID)</translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
@@ -2790,11 +2790,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(pengaturan awal: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(pengaturan awal: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2830,7 +2830,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Pilih koneksi:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2858,11 +2858,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <translation>Kesalahan menginisialisasi database blok</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <translation>Kesalahan menginisialisasi dompet pada database%s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2958,7 +2958,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>mengimpor...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
@@ -2970,7 +2970,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>Deskripsi berkas tidak tersedia dengan cukup.</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
@@ -2978,7 +2978,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Pilihan RPC klien:</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -2998,7 +2998,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>Mengatur jumlah urutan untuk layanan panggilan RPC (pengaturan awal: 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
@@ -3174,11 +3174,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Memulai Bitcoin Core Daemon</translation>
     </message>
     <message>
         <source>System error: </source>
-        <translation type="unfinished"/>
+        <translation>Kesalahan sistem:</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index fb013f4c1dbf..8e2b681ba9ba 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -33,7 +33,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>(%1-bit)</source>
-        <translation type="unfinished"/>
+        <translation>(%1-비트)</translation>
     </message>
 </context>
 <context>
@@ -611,7 +611,7 @@ Address: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>모두 선택(하지 않음)</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -663,11 +663,11 @@ Address: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>비트코인이 사용되지 않은 주소를 잠금 처리합니다.</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>비트코인이 사용되지 않은 주소를 잠금 해제합니다. </translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -767,7 +767,7 @@ Address: %4
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>우선 순위가 높은 거래의 경우 블럭에 포함될 가능성이 더 많습니다.</translation>
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
@@ -779,11 +779,11 @@ Address: %4
     </message>
     <message>
         <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <translation>최소 %1의 거래 수수료가 필요하다는 뜻입니다. </translation>
     </message>
     <message>
         <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <translation>노드 릴레이를 위한 최저 수수료의 0.546배보다 낮은 거래는 먼지 거래로 표현됩니다.</translation>
     </message>
     <message>
         <source>This label turns red, if the change is smaller than %1.</source>
@@ -916,7 +916,7 @@ Address: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>지불 요청을 위해 SSL 최상위 인증을 설정합니다. (기본값: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -939,11 +939,11 @@ Address: %4
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>프로그램이 처음으로 실행되고 있습니다. 비트코인 코어가 어디에 데이터를 저장할지 선택할 수 있습니다. </translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 코어가 블럭체인의 복사본을 다운로드 저장합니다. 적어도 %1GB의 데이터가 이 폴더에 저장되며 시간이 경과할수록 점차 증가합니다. 그리고 지갑 또한 이 폴더에 저장됩니다. </translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -959,7 +959,7 @@ Address: %4
     </message>
     <message>
         <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <translation>오류 : 별도 정의한 폴더명 &quot;%1&quot; 생성에 실패했습니다. </translation>
     </message>
     <message>
         <source>Error</source>
@@ -1033,7 +1033,7 @@ Address: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>스크립트 인증 쓰레드의 개수</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
@@ -1081,11 +1081,11 @@ Address: %4
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>전문가</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>코인 상세 제어기능을 활성화합니다 - &amp;C</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>
@@ -1173,7 +1173,7 @@ Address: %4
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>코인 상세 제어기능에 대한 표시 여부를 선택할 수 있습니다.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1197,7 +1197,7 @@ Address: %4
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>변경 사항을 적용하기 위해서는 프로그램이 종료 후 재시작되어야 합니다.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
@@ -1205,7 +1205,7 @@ Address: %4
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>이 변경 사항 적용을 위해 프로그램 재시작이 필요합니다. </translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1279,7 +1279,7 @@ Address: %4
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <translation>요청한 금액 %1의 양이 너무 적습니다. (스팸성 거래로 간주)</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1295,7 +1295,7 @@ Address: %4
     </message>
     <message>
         <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <translation>현재의 프록시가 SOCKS5를 지원하지 않아 지불 요청을 수행할 수 없습니다. </translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
@@ -1547,11 +1547,11 @@ Address: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>이전에 사용된 수취용 주소를 사용할려고 합니다. 주소의 재사용은 보안과 개인정보 보호 측면에서 문제를 초래할 수 있습니다. 이전 지불 요청을 재생성하는 경우가 아니라면 주소 재사용을 권하지 않습니다.  </translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>현재의 수취용 주소를 재사용합니다만 권장하지는 않습니다. (R&amp;)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
@@ -1567,7 +1567,7 @@ Address: %4
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>요청할 금액 입력칸으로 선택 사항입니다. 빈 칸으로 두거나 특정 금액이 필요하지 않는 경우 0을 입력하세요. </translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
@@ -1951,7 +1951,7 @@ Address: %4
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>사용된 주소 목록에 새 주소를 추가하기 위해 제목을 입력합니다. </translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
@@ -1963,7 +1963,7 @@ Address: %4
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>송금할 대상 : </translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -2246,7 +2246,7 @@ Address: %4
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <translation>신규 채굴된 코인이 사용되기 위해서는 %1 개의 블럭이 경과되어야 합니다. 블럭을 생성할 때 블럭체인에 추가되도록 네트워크에 전파되는 과정을 거치는데, 블럭체인에 포함되지 못하고 실패한다면 해당 블럭의 상태는 &apos;미승인&apos;으로 표현되고 비트코인 또한 사용될 수 없습니다. 이 현상은 다른 노드가 비슷한 시간대에 동시에 블럭을 생성할 때 종종 발생할 수 있습니다. </translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2316,7 +2316,7 @@ Address: %4
     </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
+        <translation>충분히 숙성되지 않은 상태 (%1 승인, %2 후에 사용 가능합니다)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2348,7 +2348,7 @@ Address: %4
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>승인 중 (권장되는 승인 회수 %2 대비 현재 승인 수 %1)</translation>
     </message>
     <message>
         <source>Conflicted</source>
@@ -2580,7 +2580,7 @@ Address: %4
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>지갑 데이터를 %1 폴더에 저장하는 동안 오류가 발생했습니다. </translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
@@ -2659,7 +2659,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 코어 RPC 클라이언트 버전</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2729,7 +2729,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>해당 금액보다 적은 수수료는 수수료 면제로 간주됩니다. (거래 생성의 목적)(기본값:</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
@@ -2789,11 +2789,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(기본값: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(기본값: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2829,7 +2829,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>연결 설정 : </translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2837,7 +2837,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>디버그 및 테스트 설정</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
@@ -2929,11 +2929,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <translation>송금 거래시 추가되는 KB 당 수수료입니다. </translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>해당 금액보다 적은 수수료는 수수료 면제로 간주됩니다. (릴레이 목적)(기본값:</translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2941,7 +2941,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>안전 모드로 강제 진입하는 기능입니다.(기본값: 0) </translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 1d9d4cc9365b..d09c40f62e91 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -795,7 +795,7 @@ Adresa: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>restul de la %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
@@ -1587,7 +1587,7 @@ Adresa: %4
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Arata cererea selectata (acelas lucru ca si dublu-click pe o inregistrare)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -3008,7 +3008,7 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>Stabileste numarul de thread-uri care servesc apeluri RPC (implicit: 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>

From cdb36eff9f060330a1727dec82299f255459aa2d Mon Sep 17 00:00:00 2001
From: Federico Bond <federicobond@gmail.com>
Date: Fri, 23 May 2014 13:58:12 -0300
Subject: [PATCH 0086/1819] Fix warning when compiling in OS X

---
 src/qt/notificator.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index 38a029dbe5b4..3d588cd31712 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -28,8 +28,10 @@
 #endif
 
 
+#ifdef USE_DBUS
 // https://wiki.ubuntu.com/NotificationDevelopmentGuidelines recommends at least 128
 const int FREEDESKTOP_NOTIFICATION_ICON_SIZE = 128;
+#endif
 
 Notificator::Notificator(const QString &programName, QSystemTrayIcon *trayicon, QWidget *parent) :
     QObject(parent),

From e832f5e39b3237368b8774cea2c21ac8529c5cbf Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 23 May 2014 20:35:49 +0200
Subject: [PATCH 0087/1819] doc: Add historical release notes for 0.9.1

---
 doc/release-notes/release-notes-0.9.1.md | 53 ++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 doc/release-notes/release-notes-0.9.1.md

diff --git a/doc/release-notes/release-notes-0.9.1.md b/doc/release-notes/release-notes-0.9.1.md
new file mode 100644
index 000000000000..0552053d27b8
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.1.md
@@ -0,0 +1,53 @@
+Bitcoin Core version 0.9.1 is now available from:
+
+  https://bitcoin.org/bin/0.9.1/
+
+This is a security update. It is recommended to upgrade to this release
+as soon as possible.
+
+It is especially important to upgrade if you currently have version
+0.9.0 installed and are using the graphical interface OR you are using
+bitcoind from any pre-0.9.1 version, and have enabled SSL for RPC and
+have configured allowip to allow rpc connections from potentially
+hostile hosts.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+If you are upgrading from version 0.7.2 or earlier, the first time you run
+0.9.1 your blockchain files will be re-indexed, which will take anywhere from 
+30 minutes to several hours, depending on the speed of your machine.
+
+0.9.1 Release notes
+=======================
+
+No code changes were made between 0.9.0 and 0.9.1. Only the dependencies were changed.
+
+- Upgrade OpenSSL to 1.0.1g. This release fixes the following vulnerabilities which can
+  affect the Bitcoin Core software:
+
+  - CVE-2014-0160 ("heartbleed")
+    A missing bounds check in the handling of the TLS heartbeat extension can
+    be used to reveal up to 64k of memory to a connected client or server.
+
+  - CVE-2014-0076
+    The Montgomery ladder implementation in OpenSSL does not ensure that
+    certain swap operations have a constant-time behavior, which makes it
+    easier for local users to obtain ECDSA nonces via a FLUSH+RELOAD cache
+    side-channel attack.
+
+- Add statically built executables to Linux build
+
+Credits
+--------
+
+Credits go to the OpenSSL team for fixing the vulnerabilities quickly.

From e9df7f87574b32d70aec2dad5f8d84a68c618dee Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Sat, 24 May 2014 11:12:47 -0400
Subject: [PATCH 0088/1819] Qt: Fix monospace font in osx 10.9

The "Monospace" hint was added in Qt 4.8, and it works as intended as opposed
to "TypeWriter" which fails to load a font.
---
 src/qt/guiutil.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 7b264d27c71c..49c0867450da 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -76,7 +76,11 @@ QString dateTimeStr(qint64 nTime)
 QFont bitcoinAddressFont()
 {
     QFont font("Monospace");
+#if QT_VERSION >= 0x040800
+    font.setStyleHint(QFont::Monospace);
+#else
     font.setStyleHint(QFont::TypeWriter);
+#endif
     return font;
 }
 

From 2869b1349b2cce3ac8fa8a39e0df65e4201c438a Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Sat, 24 May 2014 11:11:42 -0400
Subject: [PATCH 0089/1819] release: Bump the OSX SDK to 10.7 for gitian builds

This fixes the display on Retina Macbooks. It also moves us away from depending
on the ancient XCode3 sdk.
---
 .../gitian-descriptors/gitian-osx-bitcoin.yml | 25 ++++++++-----------
 .../gitian-descriptors/gitian-osx-depends.yml | 15 ++++++-----
 .../gitian-descriptors/gitian-osx-native.yml  | 15 ++++++-----
 contrib/gitian-descriptors/gitian-osx-qt.yml  | 24 +++++++-----------
 doc/README_osx.txt                            | 14 +++++++----
 doc/release-process.md                        |  8 +++---
 6 files changed, 45 insertions(+), 56 deletions(-)

diff --git a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
index aea4b93a1f80..e29047d6101a 100644
--- a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+++ b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
@@ -17,33 +17,28 @@ remotes:
 - "url": "https://github.com/bitcoin/bitcoin.git"
   "dir": "bitcoin"
 files:
-- "osx-native-depends-r2.tar.gz"
-- "osx-depends-r2.tar.gz"
-- "osx-depends-qt-5.2.1-r2.tar.gz"
-- "MacOSX10.6.pkg"
+- "osx-native-depends-r3.tar.gz"
+- "osx-depends-r3.tar.gz"
+- "osx-depends-qt-5.2.1-r3.tar.gz"
+- "MacOSX10.7.sdk.tar.gz"
 
 script: |
 
-  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
-
   HOST=x86_64-apple-darwin11
   PREFIX=`pwd`/osx-cross-depends/prefix
-  SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.6.sdk
+  SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.7.sdk
   NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
 
   export SOURCES_PATH=`pwd`
 
-  mkdir osx-cross-depends
+  mkdir -p osx-cross-depends/SDKs
 
-  cd osx-cross-depends
-  mkdir -p SDKs
-  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
-  cd ..
+  tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
 
-  tar -C osx-cross-depends -xf osx-native-depends-r2.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-r2.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r2.tar.gz
+  tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-r3.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r3.tar.gz
   export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
 
   cd bitcoin
diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml
index 8e91a30ded94..adc86e5cb4e8 100644
--- a/contrib/gitian-descriptors/gitian-osx-depends.yml
+++ b/contrib/gitian-descriptors/gitian-osx-depends.yml
@@ -18,8 +18,8 @@ files:
 - "openssl-1.0.1g.tar.gz"
 - "protobuf-2.5.0.tar.bz2"
 - "qrencode-3.4.3.tar.bz2"
-- "MacOSX10.6.pkg"
-- "osx-native-depends-r2.tar.gz"
+- "MacOSX10.7.sdk.tar.gz"
+- "osx-native-depends-r3.tar.gz"
 
 script: |
 
@@ -29,9 +29,8 @@ script: |
   echo "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028  openssl-1.0.1g.tar.gz" | sha256sum -c
   echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
   echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
-  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
 
-  REVISION=r2
+  REVISION=r3
   export SOURCES_PATH=`pwd`
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
   export PATH=$HOME:$PATH
@@ -44,7 +43,7 @@ script: |
   PREFIX=`pwd`/prefix
   NATIVEPREFIX=`pwd`/native-prefix
   BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  SDK=`pwd`/SDKs/MacOSX10.7.sdk
   HOST=x86_64-apple-darwin11
   MIN_VERSION=10.6
 
@@ -70,10 +69,10 @@ script: |
   mkdir -p ${PREFIX}/lib
   mkdir -p ${BUILD_BASE}
 
-  mkdir -p ${SDK}
-  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+  mkdir -p SDKs
+  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
 
-  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
+  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
 
   # bdb
   SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz
diff --git a/contrib/gitian-descriptors/gitian-osx-native.yml b/contrib/gitian-descriptors/gitian-osx-native.yml
index 6040e5ac5b27..a753ad704ffe 100644
--- a/contrib/gitian-descriptors/gitian-osx-native.yml
+++ b/contrib/gitian-descriptors/gitian-osx-native.yml
@@ -24,7 +24,7 @@ files:
 - "dyld-195.5.tar.gz"
 - "ld64-127.2.tar.gz"
 - "protobuf-2.5.0.tar.bz2"
-- "MacOSX10.6.pkg"
+- "MacOSX10.7.sdk.tar.gz"
 - "cdrkit-1.1.11.tar.gz"
 - "libdmg-hfsplus-v0.1.tar.gz"
 - "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz"
@@ -38,14 +38,13 @@ script: |
   echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c  dyld-195.5.tar.gz" | sha256sum -c
   echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142  ld64-127.2.tar.gz" | sha256sum -c
   echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
   echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da  cdrkit-1.1.11.tar.gz" | sha256sum -c
   echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3  libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c
   echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff  clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c
   echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f  cdrkit-deterministic.patch" | sha256sum -c
 
 
-  REVISION=r2
+  REVISION=r3
   export REFERENCE_DATETIME
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
   export FAKETIME=$REFERENCE_DATETIME
@@ -78,7 +77,7 @@ script: |
 
   NATIVEPREFIX=`pwd`/native-prefix
   BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  SDK=`pwd`/SDKs/MacOSX10.7.sdk
   HOST=x86_64-apple-darwin11
   MIN_VERSION=10.6
 
@@ -91,8 +90,8 @@ script: |
   mkdir -p ${NATIVEPREFIX}/bin
   mkdir -p ${NATIVEPREFIX}/lib
 
-  mkdir -p ${SDK}
-  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+  mkdir -p SDKs
+  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
 
   #  Clang
   SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
@@ -112,7 +111,7 @@ script: |
   tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
   mkdir -p ${BUILD_DIR}/sdks
   pushd ${BUILD_DIR}/sdks;
-  ln -sf ${SDK} MacOSX10.6.sdk
+  ln -sf ${SDK} MacOSX10.7.sdk
   ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz
   ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz
   ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz
@@ -127,7 +126,7 @@ script: |
   sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac
 
   cd ${BUILD_DIR}/cctools2odcctools
-  ./extract.sh --osxver 10.6
+  ./extract.sh --osxver 10.7
   cd odcctools-809
   ./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK}
 
diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml
index d0be016e68a4..b57908dbd9be 100644
--- a/contrib/gitian-descriptors/gitian-osx-qt.yml
+++ b/contrib/gitian-descriptors/gitian-osx-qt.yml
@@ -13,16 +13,15 @@ reference_datetime: "2013-06-01 00:00:00"
 remotes: []
 files:
 - "qt-everywhere-opensource-src-5.2.1.tar.gz"
-- "osx-native-depends-r2.tar.gz"
-- "osx-depends-r2.tar.gz"
-- "MacOSX10.6.pkg"
+- "osx-native-depends-r3.tar.gz"
+- "osx-depends-r3.tar.gz"
+- "MacOSX10.7.sdk.tar.gz"
 
 script: |
 
   echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1  qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
-  echo "a2ccf2299de4e0bb88bd17a3355f02b747575b97492c7c2f5b789a64ccc4cbd6  MacOSX10.6.pkg" | sha256sum -c
 
-  REVISION=r2
+  REVISION=r3
   export SOURCES_PATH=`pwd`
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
   export ZERO_AR_DATE=1
@@ -42,7 +41,7 @@ script: |
   PREFIX=`pwd`/prefix
   NATIVEPREFIX=`pwd`/native-prefix
   BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.6.sdk
+  SDK=`pwd`/SDKs/MacOSX10.7.sdk
   HOST=x86_64-apple-darwin11
   MIN_VERSION=10.6
 
@@ -68,18 +67,13 @@ script: |
   mkdir -p ${PREFIX}/lib
   mkdir -p ${BUILD_BASE}
 
-  mkdir -p ${SDK}
-  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
-
-  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
-
-
   mkdir -p SDKs
-  7z -bd -so -y e ${SOURCES_PATH}/MacOSX10.6.pkg Payload | gzip -d -c | cpio -i
+  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
+
+  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
 
-  tar xf /home/ubuntu/build/osx-native-depends-r2.tar.gz
   export PATH=`pwd`/native-prefix/bin:$PATH
-  tar xf /home/ubuntu/build/osx-depends-r2.tar.gz
+  tar xf /home/ubuntu/build/osx-depends-r3.tar.gz
 
   SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
   BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
diff --git a/doc/README_osx.txt b/doc/README_osx.txt
index 6eae4f5cf18b..2be56c15926c 100644
--- a/doc/README_osx.txt
+++ b/doc/README_osx.txt
@@ -37,11 +37,15 @@ originally done in toolchain4.
 
 To complicate things further, all builds must target an Apple SDK. These SDKs
 are free to download, but not redistributable.
-To obtain it, register for a developer account, then download xcode_3.2.6_and_ios_sdk_4.3.dmg:
-https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
-This file is several gigabytes in size, but only a single .pkg file inside is
-needed (MacOSX10.6.pkg). From Linux, 7-zip can be used to extract this file.
-The DMG can then be discarded.
+To obtain it, register for a developer account, then download xcode4630916281a.dmg:
+https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
+This file is several gigabytes in size, but only a single directory inside is
+needed: Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
+
+Unfortunately, the usual linux tools (7zip, hpmount, loopback mount) are incapable of opening this file.
+To create a tarball suitable for gitian input, mount the dmg in OSX, then create it with:
+  $ tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
+
 
 The gitian descriptors build 2 sets of files: Linux tools, then Apple binaries
 which are created using these tools. The build process has been designed to
diff --git a/doc/release-process.md b/doc/release-process.md
index be00cb809224..6d08c4849699 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -36,12 +36,10 @@ Release Process
         mkdir -p inputs; cd inputs/
 
  Register and download the Apple SDK (see OSX Readme for details)
-        visit https://developer.apple.com/devcenter/download.action?path=/Developer_Tools/xcode_3.2.6_and_ios_sdk_4.3__final/xcode_3.2.6_and_ios_sdk_4.3.dmg
+	visit https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
  
- Extract MacOSX10.6.pkg using 7zip
-        7z e -y xcode_3.2.6_and_ios_sdk_4.3.dmg 5.hfs
-        7z -y e 5.hfs "Xcode and iOS SDK/Packages/MacOSX10.6.pkg"
-        rm 5.hfs
+ Using a Mac, create a tarball for the 10.7 SDK
+	tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
 
  Fetch and build inputs: (first time, or when dependency versions change)
 

From b90711cabffa8bf83ddee98cfc179c0aef5732ef Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Wed, 28 May 2014 01:38:40 +0200
Subject: [PATCH 0090/1819] [Qt] Fix Transaction details shows wrong To:

---
 src/qt/transactiondesc.cpp       | 33 +++++++++++++-------------------
 src/qt/transactiondesc.h         |  3 ++-
 src/qt/transactiontablemodel.cpp |  2 +-
 3 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 45fb3d40c2ae..0cfcb048c889 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -42,7 +42,7 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
     }
 }
 
-QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int unit)
+QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec, int unit)
 {
     QString strHTML;
 
@@ -86,26 +86,19 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
         if (nNet > 0)
         {
             // Credit
-            BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+            if (CBitcoinAddress(rec->address).IsValid())
             {
-                if (wallet->IsMine(txout))
+                CTxDestination address = CBitcoinAddress(rec->address).Get();
+                if (wallet->mapAddressBook.count(address))
                 {
-                    CTxDestination address;
-                    if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
-                    {
-                        if (wallet->mapAddressBook.count(address))
-                        {
-                            strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
-                            strHTML += "<b>" + tr("To") + ":</b> ";
-                            strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString());
-                            if (!wallet->mapAddressBook[address].name.empty())
-                                strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
-                            else
-                                strHTML += " (" + tr("own address") + ")";
-                            strHTML += "<br>";
-                        }
-                    }
-                    break;
+                    strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
+                    strHTML += "<b>" + tr("To") + ":</b> ";
+                    strHTML += GUIUtil::HtmlEscape(rec->address);
+                    if (!wallet->mapAddressBook[address].name.empty())
+                        strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
+                    else
+                        strHTML += " (" + tr("own address") + ")";
+                    strHTML += "<br>";
                 }
             }
         }
@@ -224,7 +217,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int u
     if (wtx.mapValue.count("comment") && !wtx.mapValue["comment"].empty())
         strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
 
-    strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), vout) + "<br>";
+    strHTML += "<b>" + tr("Transaction ID") + ":</b> " + TransactionRecord::formatSubTxId(wtx.GetHash(), rec->idx) + "<br>";
 
     // Message from normal bitcoin:URI (bitcoin:123...?message=example)
     foreach (const PAIRTYPE(string, string)& r, wtx.vOrderForm)
diff --git a/src/qt/transactiondesc.h b/src/qt/transactiondesc.h
index 92d093b3eb4f..f5a1328a71ae 100644
--- a/src/qt/transactiondesc.h
+++ b/src/qt/transactiondesc.h
@@ -8,6 +8,7 @@
 #include <QObject>
 #include <QString>
 
+class TransactionRecord;
 class CWallet;
 class CWalletTx;
 
@@ -18,7 +19,7 @@ class TransactionDesc: public QObject
     Q_OBJECT
 
 public:
-    static QString toHTML(CWallet *wallet, CWalletTx &wtx, int vout, int unit);
+    static QString toHTML(CWallet *wallet, CWalletTx &wtx, TransactionRecord *rec, int unit);
 
 private:
     TransactionDesc() {}
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 8cf2b0a1b1e4..b9fcd0d6b093 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -222,7 +222,7 @@ class TransactionTablePriv
             std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(rec->hash);
             if(mi != wallet->mapWallet.end())
             {
-                return TransactionDesc::toHTML(wallet, mi->second, rec->idx, unit);
+                return TransactionDesc::toHTML(wallet, mi->second, rec, unit);
             }
         }
         return QString("");

From d2b82dd7d8cdc87555d1983e47fe10a7b92f2d87 Mon Sep 17 00:00:00 2001
From: Mathy Vanvoorden <mathy@vanvoorden.be>
Date: Fri, 9 May 2014 12:52:08 +0200
Subject: [PATCH 0091/1819] Spelling fix in comment

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 3704a6a
---
 src/qt/bitcoingui.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index e6190aec13c6..68ae8b4668ec 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -188,7 +188,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
 
     connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(show()));
 
-    // prevents an oben debug window from becoming stuck/unusable on client shutdown
+    // prevents an open debug window from becoming stuck/unusable on client shutdown
     connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
 
     // Install event filter to be able to catch status tip events (QEvent::StatusTip)

From 066d9a53c79db63b019e38be7995440f9fcfe7ff Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Thu, 29 May 2014 05:21:58 +0200
Subject: [PATCH 0092/1819] [Qt] Fix Start bitcoin on system login

---
 src/qt/guiutil.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 49c0867450da..183fcac4a0d9 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -574,7 +574,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
     return true;
 }
 
-#elif defined(LINUX)
+#elif defined(Q_OS_LINUX)
 
 // Follow the Desktop Application Autostart Spec:
 //  http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html

From 53a088154ce4e1fc483afa120a9063811dd0e7ea Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 29 May 2014 12:33:17 +0200
Subject: [PATCH 0093/1819] rename fNoListen to fListen and move to net

- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
---
 src/init.cpp | 4 ++--
 src/main.cpp | 4 ++--
 src/net.cpp  | 3 ++-
 src/net.h    | 1 +
 src/util.cpp | 1 -
 src/util.h   | 1 -
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index bc4924b48dca..06ad84af250a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -732,12 +732,12 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     // see Step 2: parameter interactions for more information about these
-    fNoListen = !GetBoolArg("-listen", true);
+    fListen = GetBoolArg("-listen", true);
     fDiscover = GetBoolArg("-discover", true);
     fNameLookup = GetBoolArg("-dns", true);
 
     bool fBound = false;
-    if (!fNoListen) {
+    if (fListen) {
         if (mapArgs.count("-bind")) {
             BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) {
                 CService addrBind;
diff --git a/src/main.cpp b/src/main.cpp
index 18c00d90acb7..5f61a13782b7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3550,7 +3550,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (!pfrom->fInbound)
         {
             // Advertise our address
-            if (!fNoListen && !IsInitialBlockDownload())
+            if (fListen && !IsInitialBlockDownload())
             {
                 CAddress addr = GetLocalAddress(&pfrom->addr);
                 if (addr.IsRoutable())
@@ -4318,7 +4318,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
                         pnode->setAddrKnown.clear();
 
                     // Rebroadcast our address
-                    if (!fNoListen)
+                    if (fListen)
                     {
                         CAddress addr = GetLocalAddress(&pnode->addr);
                         if (addr.IsRoutable())
diff --git a/src/net.cpp b/src/net.cpp
index c2dde970404a..ef6674011b15 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -45,6 +45,7 @@ static const int MAX_OUTBOUND_CONNECTIONS = 8;
 // Global state variables
 //
 bool fDiscover = true;
+bool fListen = true;
 uint64_t nLocalServices = NODE_NETWORK;
 CCriticalSection cs_mapLocalHost;
 map<CNetAddr, LocalServiceInfo> mapLocalHost;
@@ -96,7 +97,7 @@ unsigned short GetListenPort()
 // find 'best' local address for a particular peer
 bool GetLocal(CService& addr, const CNetAddr *paddrPeer)
 {
-    if (fNoListen)
+    if (!fListen)
         return false;
 
     int nBestScore = -1;
diff --git a/src/net.h b/src/net.h
index ac90ef25ef00..55502ed8934f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -105,6 +105,7 @@ CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL);
 
 
 extern bool fDiscover;
+extern bool fListen;
 extern uint64_t nLocalServices;
 extern uint64_t nLocalHostNonce;
 extern CAddrMan addrman;
diff --git a/src/util.cpp b/src/util.cpp
index 336ef31725a1..d106b03230c4 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -94,7 +94,6 @@ bool fPrintToDebugLog = true;
 bool fDaemon = false;
 bool fServer = false;
 string strMiscWarning;
-bool fNoListen = false;
 bool fLogTimestamps = false;
 volatile bool fReopenDebugLog = false;
 CClientUIInterface uiInterface;
diff --git a/src/util.h b/src/util.h
index ffcb20d82266..b09f9bb15ec1 100644
--- a/src/util.h
+++ b/src/util.h
@@ -100,7 +100,6 @@ extern bool fPrintToConsole;
 extern bool fPrintToDebugLog;
 extern bool fServer;
 extern std::string strMiscWarning;
-extern bool fNoListen;
 extern bool fLogTimestamps;
 extern volatile bool fReopenDebugLog;
 

From 58bfa79f0e277c34b20279c2fef56ec9c1ca2479 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 29 May 2014 12:13:02 -0400
Subject: [PATCH 0094/1819] gitian: Add cfields to gitian download scripts

---
 contrib/gitian-downloader/cfields-key.php     | 52 +++++++++++++++++++
 .../gitian-downloader/linux-download-config   |  3 ++
 .../gitian-downloader/win32-download-config   |  3 ++
 3 files changed, 58 insertions(+)
 create mode 100644 contrib/gitian-downloader/cfields-key.php

diff --git a/contrib/gitian-downloader/cfields-key.php b/contrib/gitian-downloader/cfields-key.php
new file mode 100644
index 000000000000..6b0bd240ba4c
--- /dev/null
+++ b/contrib/gitian-downloader/cfields-key.php
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.12 (GNU/Linux)
+
+mQINBFOHTh4BEADdKsRvmNhX+B+bcPsgMkp8ztwJA5g/rmrOlHQpKOOf4P2tAr6w
+FmXCChWF9Iq3pDFQ0t0iq5rgisFPyrGVT/VToMmH+/PSLTyIdAlgkRYDMAPsMAFV
+MaADH4yiAgJ3cdXtysjaNQV5O25ypqq6/obUjZJD5Enn6b/UgHe2+7LTmTNsskOx
+5s/WPPht79EY1kM4JQfmDx68CsmqeSAlT6yeO3RQcLn/l46cfXiwzMO4h1hsZS1r
+pgciRp0EHK9uAjF2rjqt8v4SDxwyTnwfpBBulzvH9mBf+HRXWzoTMR4sC/oOZext
+hKAH/ex47BxN3HU3ftNhCK2c1xcU1UOGSjbf0RdbwuSCxxa7mktEDumvOxAk9EBB
++PDPv7jO1FBK3rsJdscYQIL0AiRyO49VfNLARa34OqUi8pOAxKBQ9plO02W1gp7a
+DVBPI05TZ46Y8dTR2Bc1raAgOyxnXM7jfiQG2gSULiKAJAI4HwOiodaiiHAxDaIo
+a3mtsmfN25TZUQuA0I0BvHbJvLRlVnyZm3XVOcwReKJpZJV4qRhd3XNrERZdz6ZK
+cAZnyC/X+Uzo4HfnVSsJk1GpIa4seYyrVCFfHMiAA6SkgAUFbV26KCOv4rNR2GlV
+l2fVhu1RKOEUJ8nRcEqf93SehRVYdI67LepIPgmIwi0KG4HhoTbIHDAKWQARAQAB
+tCtDb3J5IEZpZWxkcyA8Y2ZpZWxkc0BiaXRjb2luZm91bmRhdGlvbi5vcmc+iQI4
+BBMBAgAiBQJTh04eAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAcJJH/
+6w73cBTiEADIGZSueBFmaOTJCgasKGguHns/n8P94EQBZr07rrgN99Rzp85WvDUN
+Qa72wj3GNcAffN7aZlIWv4g+fjyr9AzHekjI/7iwwSYIfjfTR/xRUW7czRfKAOrK
+iwpEzgv440i7PBvkS/AhNdUNkm+cJvaQUej/F2/O52qDLEpHuzvjAUUWlSeF9/oO
+AjM9dfC24L5k5cVwQvH9noxk3EyuE7BuiGE5a+kKiORrtxiHeUG6GYQxuqrPucLU
+fI67ETyXa0YSpYm5/O65BKMTMpmkMvv1JC2kqqsYTrO5p158CrKzq2xvpuG4ABsb
+9KwICUGW31Ndr6TXwQJFa1b7VK4G1g6M1DFkVTOLJnEyOwgYxsXrV5QFpzpAOAji
+6KcxNGeow1avAFYbqjjLgu9UNuq6b8du13hjkQxVs2NAP1Kd/u2ADwxQHMhZGVEC
+9LIcLVSP9ShY6fR8m6fwSlJfpiV81uLNVD8KIyvp+pYTQ/FnxoPhPIwalYquBZKi
+0u38igW75IzZ0fYvJgTumE/8ofSVkutVtrQb21eJclVrJGMNweTlJcJhAWdKkjDC
+e6mSj8GItKV1ef+eusXSzs/wPyTaqgkELvvAOZdwUq3kobQErE5HOuPEOvcwuY96
+DcxLexirCGW5wCUq7Db0c0dUjQwzzb5OTW2jdnPVR0qxi29TnOJ2aLkCDQRTh04e
+ARAAuJKpI6NTCQrjEqe9AYywN8676+fPS5bqXkyb/iub6MXeQdwpH0K42lXAaYMq
+ow/0aLlvGWCHuJJGozoOWpTzQ+VPbhpdARoLCop5fYTpy8Q17ubLeeODDtr6jtDN
+lmg+9PBIErIVUnUS2wNZuJRVsfwlLaU3T2v8kQnQ6AEbl/QwyWW9nB8rAWBu6Hvs
+VdtcBmtHSr9xAGBGfW6rSVhTitikR4lWJPdNJxI3pLaswpLIUIQ1rssKO4glljcp
+C6nhMvRkDLvDFvDP9QnmwY/A4ch5S6ANPrhOjQuu9njjQ+/ImrJTjAXqHwg5KdTc
+NKxufgvi9elOQ422o0No3yKdRoRA4kdcUmqA9gNZDyX0ZTd17aNqc42Zt3aYLJ11
+bLZZp0qnfhkmhbsBZZtaLNkuF+RGPWysxY7KPMm+nHn6f3Wpr18E+T02wi02r4nS
+HOQI+gppDqy3Vq3ZZNoUZynctiLZVHkqi+WYXqfD2tEn8UJKpht7jrZlNgkHFgT7
+T0/U4+JmaQ/HltE+IexAIH0GP0Jt6hmRoZimdoy8Q8NY5t/fn9CQNJm5InrHvooN
+aFmZMvzGTGiTqBqnA/7k9FCUEG98LK11MsIssY8YE/F6HD69R3ISyRvhUbpFvhD8
+c6zOkEKngTWvyRevrDrDz2yoZ1+T1X350+92rbEc/8WyutcAEQEAAYkCHwQYAQIA
+CQUCU4dOHgIbDAAKCRAcJJH/6w73cAakEACv4EUEjtFjqnGB0Lru5FKs1obWcf37
+c4a5yYvOw58dkEZ9hsq34qWGLT128n6R24KEG+3O4CbplAD5Kt2eAPracbPHMAn8
+TGmC+KjiGlBR5xCY9dD0fn5EbRWOa+Fdcj1DpneaqMl9vLnBbqGp7pa/MwSOc+FB
+0Ms2rcGJJMNHgITfP22eCf6pvf/xq7kKbUJ3Kjqdc2hWlRMjC/OOeITdrgycfDk/
+AOzLNqk5q7bYOxna6rWDLGSkCATyQKaBTVK7wRd1VrIhI4vfFqy+BWYXyXJ0pxjS
+eaCDwbWHX/KW+0qLsmHxFMAyHJPjs8LEwK/DRbmWhe1HzPcBKmpyjqlkuxPjAdSl
+hP4+IBvVNLf2Kh3uFHehk9A6oCYZGe3lLfQnOxIantXF7IROTmiZZsb+08w6cIXE
++r6kWG6vP2aCVtzYNfY+2p5xfg3yMxcxENJki1WSCOq6WVf9IWFzSJu+0+eazD3L
+3QpZoSX5VvT6x05C0Ay1ert0Q5MyF84Eh8mDqL4PhpWtQhZMp8SG4jqFVgrhM4sl
+vWGYXGns4tbnNPiiksjBD8TTvG3+mt48sNJIpHThjdWJSZjllYG7jV8oi7HrX8M2
+LOwWWLYxHkqi9wpmrWHSmniex6ABozcqrb+EgSMnHuSd7glmOJxHToJIudJbKG5D
+MrD0ofsytfy1LQ==
+=DE4h
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/contrib/gitian-downloader/linux-download-config b/contrib/gitian-downloader/linux-download-config
index b5e0561aa3be..f5e6382b846d 100644
--- a/contrib/gitian-downloader/linux-download-config
+++ b/contrib/gitian-downloader/linux-download-config
@@ -37,3 +37,6 @@ signers:
   E944AE667CF960B1004BC32FCA662BE18B877A60:
     name: "Andreas Schildbach"
     key: aschildbach
+  C060A6635913D98A3587D7DB1C2491FFEB0EF770:
+    name: "Cory Fields"
+    key: "cfields"
diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config
index 5d56db863ead..06c164180d50 100644
--- a/contrib/gitian-downloader/win32-download-config
+++ b/contrib/gitian-downloader/win32-download-config
@@ -37,3 +37,6 @@ signers:
   E944AE667CF960B1004BC32FCA662BE18B877A60:
     name: "Andreas Schildbach"
     key: aschildbach
+  C060A6635913D98A3587D7DB1C2491FFEB0EF770:
+    name: "Cory Fields"
+    key: "cfields"

From b5ef85c7a22f6aa67d2241936f083c6c81702fb1 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 29 May 2014 18:17:34 +0200
Subject: [PATCH 0095/1819] No references to centralized databases in help
 text.

---
 src/rpcwallet.cpp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index a8f267d7fc4b..e3b35dbb044c 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -318,7 +318,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
             "                             to which you're sending the transaction. This is not part of the \n"
             "                             transaction, just kept in your wallet.\n"
             "\nResult:\n"
-            "\"transactionid\"  (string) The transaction id. (view at https://blockchain.info/tx/[transactionid])\n"
+            "\"transactionid\"  (string) The transaction id.\n"
             "\nExamples:\n"
             + HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1")
             + HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"")
@@ -747,7 +747,7 @@ Value sendfrom(const Array& params, bool fHelp)
             "                                     to which you're sending the transaction. This is not part of the transaction, \n"
             "                                     it is just kept in your wallet.\n"
             "\nResult:\n"
-            "\"transactionid\"        (string) The transaction id. (view at https://blockchain.info/tx/[transactionid])\n"
+            "\"transactionid\"        (string) The transaction id.\n"
             "\nExamples:\n"
             "\nSend 0.01 btc from the default account to the address, must have at least 1 confirmation\n"
             + HelpExampleCli("sendfrom", "\"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
@@ -807,7 +807,7 @@ Value sendmany(const Array& params, bool fHelp)
             "4. \"comment\"             (string, optional) A comment\n"
             "\nResult:\n"
             "\"transactionid\"          (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
-            "                                    the number of addresses. See https://blockchain.info/tx/[transactionid]\n"
+            "                                    the number of addresses.\n"
             "\nExamples:\n"
             "\nSend two amounts to two different addresses:\n"
             + HelpExampleCli("sendmany", "\"tabby\" \"{\\\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\\\":0.01,\\\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\\\":0.02}\"") +
@@ -1209,8 +1209,7 @@ Value listtransactions(const Array& params, bool fHelp)
             "                                          category of transactions.\n"
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive'\n"
             "                                          category of transactions.\n"
-            "    \"txid\": \"transactionid\", (string) The transaction id (see https://blockchain.info/tx/[transactionid]. Available \n"
-            "                                          for 'send' and 'receive' category of transactions.\n"
+            "    \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
             "                                          for 'send' and 'receive' category of transactions.\n"
@@ -1375,7 +1374,7 @@ Value listsinceblock(const Array& params, bool fHelp)
             "    \"blockhash\": \"hashvalue\",     (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
             "    \"blocktime\": xxx,         (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
-            "    \"txid\": \"transactionid\",  (string) The transaction id (see https://blockchain.info/tx/[transactionid]. Available for 'send' and 'receive' category of transactions.\n"
+            "    \"txid\": \"transactionid\",  (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
             "    \"comment\": \"...\",       (string) If a comment is associated with the transaction.\n"
@@ -1447,7 +1446,7 @@ Value gettransaction(const Array& params, bool fHelp)
             "  \"blockhash\" : \"hash\",  (string) The block hash\n"
             "  \"blockindex\" : xx,       (numeric) The block index\n"
             "  \"blocktime\" : ttt,       (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n"
-            "  \"txid\" : \"transactionid\",   (string) The transaction id, see also https://blockchain.info/tx/[transactionid]\n"
+            "  \"txid\" : \"transactionid\",   (string) The transaction id.\n"
             "  \"time\" : ttt,            (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"timereceived\" : ttt,    (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"details\" : [\n"

From 21790821da80f885049095c72086968e0d5e5a08 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 29 May 2014 12:51:14 -0400
Subject: [PATCH 0096/1819] Fix name of Cory's pgp key

---
 contrib/gitian-downloader/{cfields-key.php => cfields-key.pgp} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename contrib/gitian-downloader/{cfields-key.php => cfields-key.pgp} (100%)

diff --git a/contrib/gitian-downloader/cfields-key.php b/contrib/gitian-downloader/cfields-key.pgp
similarity index 100%
rename from contrib/gitian-downloader/cfields-key.php
rename to contrib/gitian-downloader/cfields-key.pgp

From c21c74bec43a693283fecbdfb62fee4523317a81 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 29 May 2014 15:30:46 -0400
Subject: [PATCH 0097/1819] osx: Fix missing dock menu with qt5

Qt5 Removed the qt_mac_set_dock_menu function and left no replacement. It was
later re-added and deprecated for backwards-compatibility.

Qt5.2 adds the non-deprecated QMenu::setAsDockMenu(). Use that when possible.
---
 src/qt/macdockiconhandler.mm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index 64291c9188aa..74fb64ace300 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -62,6 +62,8 @@ - (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAp
     this->setMainWindow(NULL);
 #if QT_VERSION < 0x050000
     qt_mac_set_dock_menu(this->m_dockMenu);
+#elif QT_VERSION >= 0x050200
+    this->m_dockMenu->setAsDockMenu();
 #endif
     [pool release];
 }

From 5823449e2d7f76fa1f24fed881a8a5041b34b6bf Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Fri, 30 May 2014 12:01:20 +0200
Subject: [PATCH 0098/1819] Limit number of known addresses per peer

---
 src/mruset.h | 1 +
 src/net.h    | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mruset.h b/src/mruset.h
index c36a0c8f3799..c1c08b02888d 100644
--- a/src/mruset.h
+++ b/src/mruset.h
@@ -32,6 +32,7 @@ template <typename T> class mruset
     bool empty() const { return set.empty(); }
     iterator find(const key_type& k) const { return set.find(k); }
     size_type count(const key_type& k) const { return set.count(k); }
+    void clear() { set.clear(); queue.clear(); }
     bool inline friend operator==(const mruset<T>& a, const mruset<T>& b) { return a.set == b.set; }
     bool inline friend operator==(const mruset<T>& a, const std::set<T>& b) { return a.set == b; }
     bool inline friend operator<(const mruset<T>& a, const mruset<T>& b) { return a.set < b.set; }
diff --git a/src/net.h b/src/net.h
index ac90ef25ef00..d3346873bc81 100644
--- a/src/net.h
+++ b/src/net.h
@@ -262,7 +262,7 @@ class CNode
 
     // flood relay
     std::vector<CAddress> vAddrToSend;
-    std::set<CAddress> setAddrKnown;
+    mruset<CAddress> setAddrKnown;
     bool fGetAddr;
     std::set<uint256> setKnown;
 
@@ -278,7 +278,7 @@ class CNode
     int64_t nPingUsecTime;
     bool fPingQueued;
 
-    CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : ssSend(SER_NETWORK, INIT_PROTO_VERSION)
+    CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), setAddrKnown(5000)
     {
         nServices = 0;
         hSocket = hSocketIn;

From 09a54a65c0d05fe93c4a31603eca8a9a76ff6526 Mon Sep 17 00:00:00 2001
From: Huang Le <4tarhl@gmail.com>
Date: Fri, 30 May 2014 23:44:44 +0800
Subject: [PATCH 0099/1819] Use pnode->nLastRecv as sync score directly

NodeSyncScore() should find the node which we recv data most recently, so put a negative sign to pnode->nLastRecv is indeed wrong.

Also change the return value type to int64_t.

Signed-off-by: Huang Le <4tarhl@gmail.com>
---
 src/net.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index c2dde970404a..b0e6699ed21e 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1455,13 +1455,13 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
 
 // for now, use a very simple selection metric: the node from which we received
 // most recently
-double static NodeSyncScore(const CNode *pnode) {
-    return -pnode->nLastRecv;
+static int64_t NodeSyncScore(const CNode *pnode) {
+    return pnode->nLastRecv;
 }
 
 void static StartSync(const vector<CNode*> &vNodes) {
     CNode *pnodeNewSync = NULL;
-    double dBestScore = 0;
+    int64_t nBestScore = 0;
 
     int nBestHeight = g_signals.GetHeight().get_value_or(0);
 
@@ -1473,10 +1473,10 @@ void static StartSync(const vector<CNode*> &vNodes) {
             (pnode->nStartingHeight > (nBestHeight - 144)) &&
             (pnode->nVersion < NOBLKS_VERSION_START || pnode->nVersion >= NOBLKS_VERSION_END)) {
             // if ok, compare node's score with the best so far
-            double dScore = NodeSyncScore(pnode);
-            if (pnodeNewSync == NULL || dScore > dBestScore) {
+            int64_t nScore = NodeSyncScore(pnode);
+            if (pnodeNewSync == NULL || nScore > nBestScore) {
                 pnodeNewSync = pnode;
-                dBestScore = dScore;
+                nBestScore = nScore;
             }
         }
     }

From aab2c0fd7e7f629b20192ab9f05b281e5783cacc Mon Sep 17 00:00:00 2001
From: Huang Le <4tarhl@gmail.com>
Date: Sat, 31 May 2014 01:23:53 +0800
Subject: [PATCH 0100/1819] Remove template matching params from GetOpName()

Since they are not real opcodes, being reported as OP_UNKNOWN is less confusing for human-readable decoding.

Signed-off-by: Huang Le <4tarhl@gmail.com>
---
 src/script.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index ac6d4b316f23..381e84d0b7ac 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -208,14 +208,13 @@ const char* GetOpName(opcodetype opcode)
     case OP_NOP9                   : return "OP_NOP9";
     case OP_NOP10                  : return "OP_NOP10";
 
+    case OP_INVALIDOPCODE          : return "OP_INVALIDOPCODE";
 
+    // Note:
+    //  The template matching params OP_SMALLDATA/etc are defined in opcodetype enum
+    //  as kind of implementation hack, they are *NOT* real opcodes.  If found in real
+    //  Script, just let the default: case deal with them.
 
-    // template matching params
-    case OP_PUBKEYHASH             : return "OP_PUBKEYHASH";
-    case OP_PUBKEY                 : return "OP_PUBKEY";
-    case OP_SMALLDATA              : return "OP_SMALLDATA";
-
-    case OP_INVALIDOPCODE          : return "OP_INVALIDOPCODE";
     default:
         return "OP_UNKNOWN";
     }

From cb7a3edc3d60311752e8f76c0302ffd0a1fd0eb9 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 31 May 2014 12:04:34 +0200
Subject: [PATCH 0101/1819] remove dup of extern int nConnectTimeout; in
 netbase

---
 src/netbase.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/netbase.h b/src/netbase.h
index f5a64cb51fda..23cfb1f15856 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -17,6 +17,7 @@
 #include <vector>
 
 extern int nConnectTimeout;
+extern bool fNameLookup;
 
 #ifdef WIN32
 // In MSVC, this is defined as a macro, undefine it to prevent a compile and link error
@@ -33,9 +34,6 @@ enum Network
     NET_MAX,
 };
 
-extern int nConnectTimeout;
-extern bool fNameLookup;
-
 /** IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) */
 class CNetAddr
 {

From 223a6f7800c67696c01cf142e263a6593fa56e55 Mon Sep 17 00:00:00 2001
From: Andreas Schildbach <andreas@schildbach.de>
Date: Sun, 1 Jun 2014 15:25:21 +0200
Subject: [PATCH 0102/1819] Fix stray uppercase A in tx_valid.json.

---
 src/test/data/tx_valid.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json
index 1f51d3ce55cc..0757496c8935 100644
--- a/src/test/data/tx_valid.json
+++ b/src/test/data/tx_valid.json
@@ -16,7 +16,7 @@
 ["It is an OP_CHECKMULTISIG with an arbitrary extra byte stuffed into the signature at pos length - 2"],
 ["The dummy byte is fine however, so the NULLDUMMY flag should be happy"],
 [[["60a20bd93aa49ab4b28d514ec10b06e1829ce6818ec06cd3aabd013ebcdc4bb1", 0, "1 0x41 0x04cc71eb30d653c0c3163990c47b976f3fb3f37cccdcbedb169a1dfef58bbfbfaff7d8a473e7e2e6d317b87bafe8bde97e3cf8f065dec022b51d11fcdd0d348ac4 0x41 0x0461cbdcc5409fb4b4d42b51d33381354d80e550078cb532a34bfa2fcfdeb7d76519aecc62770f5b0e4ef8551946d8a540911abe3e7854a26f39f58b25c15342af 2 OP_CHECKMULTISIG"]],
-"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004A0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
+"0100000001b14bdcbc3e01bdaad36cc08e81e69c82e1060bc14e518db2b49aa43ad90ba260000000004a0048304402203f16c6f40162ab686621ef3000b04e75418a0c0cb2d8aebeac894ae360ac1e780220ddc15ecdfc3507ac48e1681a33eb60996631bf6bf5bc0a0682c4db743ce7ca2bab01ffffffff0140420f00000000001976a914660d4ef3a743e3e696ad990364e555c271ad504b88ac00000000", "P2SH,NULLDUMMY"],
 
 ["The following is a tweaked form of 23b397edccd3740a74adb603c9756370fafcde9bcc4483eb271ecad09a94dd63"],
 ["It is an OP_CHECKMULTISIG with the dummy value set to something other than an empty string"],

From 11ef78f1150f6b10a97f4f4e9b508308ac7581d9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sun, 1 Jun 2014 16:25:02 +0200
Subject: [PATCH 0103/1819] Periodic language update

Pull updated translations from Transifex before 0.9.2
---
 src/qt/locale/bitcoin_da.ts    | 566 ++++++++++++++++-----------------
 src/qt/locale/bitcoin_ko_KR.ts |  74 ++---
 src/qt/locale/bitcoin_nb.ts    |   6 +-
 src/qt/locale/bitcoin_zh_CN.ts |  82 ++---
 4 files changed, 365 insertions(+), 363 deletions(-)

diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index b13b38a878a8..a0514035fd70 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -3,11 +3,11 @@
     <name>AboutDialog</name>
     <message>
         <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Om Bitcoin Core</translation>
     </message>
     <message>
         <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</translation>
     </message>
     <message>
         <source>
@@ -29,11 +29,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Udviklerne af Bitcoin Core</translation>
     </message>
     <message>
         <source>(%1-bit)</source>
-        <translation type="unfinished"/>
+        <translation>(%1-bit)</translation>
     </message>
 </context>
 <context>
@@ -48,7 +48,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;New</source>
-        <translation>&amp;Ny</translation>
+        <translation>Ny</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -56,11 +56,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation>&amp;Kopiér</translation>
+        <translation>Kopiér</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>Luk</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -84,15 +84,15 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Vælg adresse at sende bitcoins til</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Vælg adresse at modtage bitcoins med</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>Vælg</translation>
     </message>
     <message>
         <source>Sending addresses</source>
@@ -108,7 +108,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Dette er dine Bitcoin-adresser til at modtage betalinger med. Det anbefales are bruge en ny modtagelsesadresse for hver transaktion.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -120,7 +120,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Eksportér adresseliste</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -128,11 +128,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Eksport mislykkedes</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>En fejl opstod under gemning af adresseliste til %1.</translation>
     </message>
 </context>
 <context>
@@ -273,7 +273,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Knude</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -325,15 +325,15 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;Afsendelsesadresser...</translation>
+        <translation>Afsendelsesadresser …</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>&amp;Modtagelsesadresser...</translation>
+        <translation>Modtagelsesadresser …</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Åbn URI …</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -433,31 +433,31 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Forespørg betalinger (genererer QR-koder og &quot;bitcoin:&quot;-URI&apos;er)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Om Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Vis listen over brugte afsendelsesadresser og -mærkater</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Vis listen over brugte modtagelsesadresser og -mærkater</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Åbn en &quot;bitcoin:&quot;-URI eller betalingsforespørgsel</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for kommandolinje</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Vis Bitcoin Core hjælpebesked for at få en liste over mulige tilvalg for Bitcoin kommandolinje</translation>
     </message>
     <message>
         <source>Bitcoin client</source>
@@ -493,11 +493,11 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 og %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n år</numerusform><numerusform>%n år</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -575,15 +575,15 @@ Adresse: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Adressevalg for coin-styring</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Mængde:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Byte:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -591,35 +591,35 @@ Adresse: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritet:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Gebyr:</translation>
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Lavt output:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Efter gebyr:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Byttepenge:</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(af)vælg alle</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>Trætilstand</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Listetilstand</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -635,7 +635,7 @@ Adresse: %4
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>Bekræftelser</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -643,151 +643,151 @@ Adresse: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>Prioritet</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Kopier adresse</translation>
+        <translation>Kopiér adresse</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Kopier mærkat</translation>
+        <translation>Kopiér mærkat</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Kopier beløb</translation>
+        <translation>Kopiér beløb</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Kopier transaktionens ID</translation>
+        <translation>Kopiér transaktions-ID</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Fastlås ubrugte</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Lås ubrugte op</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér mængde</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér gebyr</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér efter-gebyr</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér byte</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér prioritet</translation>
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér lavt output</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér byttepenge</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>højest</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>højere</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>højt</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>mellemhøj</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>medium</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>mellemlav</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>lav</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>lavere</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>lavest</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 fastlåst)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>ingen</translation>
     </message>
     <message>
         <source>Dust</source>
-        <translation type="unfinished"/>
+        <translation>Støv</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>ja</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>nej</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Dette mærkat bliver rødt, hvis transaktionsstørrelsen er større end 1000 byte.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>Dette betyder, at et gebyr på mindst %1 pr. kB er nødvendigt.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Kan variere ±1 byte pr. input.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Transaktioner med højere prioritet har højere sansynlighed for at blive inkluderet i en blok.</translation>
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <translation>Dette mærkat bliver rødt, hvis prioriteten er mindre end &quot;medium&quot;.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Dette mærkat bliver rødt, hvis mindst én modtager et beløb mindre end %1.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <translation>Dette betyder, at et gebyr på mindst %1 er nødvendigt.</translation>
     </message>
     <message>
         <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <translation>Beløb under 0,546 gange det minimale videreførselsgebyr vises som støv.</translation>
     </message>
     <message>
         <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Dette mærkat bliver rødt, hvis byttepengene er mindre end %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -795,11 +795,11 @@ Adresse: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>byttepenge fra %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(byttepange)</translation>
     </message>
 </context>
 <context>
@@ -814,11 +814,11 @@ Adresse: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>Mærkatet, der er associeret med denne indgang i adresselisten</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>Adressen, der er associeret med denne indgang i adresselisten. Denne kan kune ændres for afsendelsesadresser.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -884,7 +884,7 @@ Adresse: %4
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core – tilvalg for kommandolinje</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
@@ -908,7 +908,7 @@ Adresse: %4
     </message>
     <message>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Angiv sprog, f.eks &quot;de_DE&quot; (standard: systemlokalitet)</translation>
+        <translation>Angiv sprog, fx &quot;da_DK&quot; (standard: systemlokalitet)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -916,15 +916,15 @@ Adresse: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Sæt SSL-rodcertifikater for betalingsforespørgsel (standard: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>Vis opstartsbillede ved start (standard: 1)</translation>
+        <translation>Vis opstartsbillede ved opstart (standard: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vælg datamappe ved opstart (standard: 0)</translation>
     </message>
 </context>
 <context>
@@ -935,15 +935,15 @@ Adresse: %4
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <translation>Velkommen til Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Siden dette er første gang, programmet startes, kan du vælge, hvor Bitcoin Core skal gemme sin data.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core vil downloade og gemme et kopi af Bitcoin-blokkæden. Mindst %1 GB data vil blive gemt i denne mappe, og den vil vokse over tid. Tegnebogen vil også blive gemt i denne mappe.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -959,7 +959,7 @@ Adresse: %4
     </message>
     <message>
         <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <translation>Fejl: Angivet datamappe &quot;%1&quot; kan ikke oprettes.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -978,23 +978,23 @@ Adresse: %4
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>Åbn URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Åbn betalingsforespørgsel fra URI eller fil</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Vælg fil for betalingsforespørgsel</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Vælg fil for betalingsforespørgsel til åbning</translation>
     </message>
 </context>
 <context>
@@ -1025,39 +1025,39 @@ Adresse: %4
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>Størrelsen på databasens cache</translation>
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Antallet af scriptverificeringstråde</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Forbind til Bitcoin-netværket gennem en SOCKS-proxy.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>Forbind gennem SOCKS-proxy (standard-proxy):</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>IP-adresse for proxyen (fx IPv4: 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 type="unfinished"/>
+        <translation>Tredjeparts-URL&apos;er (fx et blokhåndteringsværktøj), der vises i transaktionsfanen som genvejsmenupunkter. %s i URL&apos;en erstattes med transaktionens hash. Flere URL&apos;er separeres med en lodret streg |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>Tredjeparts-transaktions-URL&apos;er</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Aktuelle tilvalg for kommandolinjen, der tilsidesætter ovenstående tilvalg:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1073,27 +1073,27 @@ Adresse: %4
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = auto, &lt;0 = efterlad så mange kerner fri)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>Tegnebog</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Ekspert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Slå egenskaber for coin-styring til</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 type="unfinished"/>
+        <translation>Hvis du slår brug af ubekræftede byttepenge fra, kan byttepengene fra en transaktion ikke bruges, før pågældende transaktion har mindst én bekræftelse. Dette påvirker også måden hvorpå din saldo beregnes.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>Brug ubekræftede byttepenge</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>
@@ -1173,7 +1173,7 @@ Adresse: %4
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Hvorvidt egenskaber for coin-styring skal vises eller ej.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1189,7 +1189,7 @@ Adresse: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>ingeningen</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1197,15 +1197,15 @@ Adresse: %4
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Genstart af klienten er nødvendig for at aktivere ændringer.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>Klienten vil blive lukket ned; vil du fortsætte?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Denne ændring vil kræve en genstart af klienten.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1228,7 +1228,7 @@ Adresse: %4
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Tilgængelig:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
@@ -1236,7 +1236,7 @@ Adresse: %4
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Uafgjort:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1279,7 +1279,7 @@ Adresse: %4
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <translation>Forespurgt betalingsbeløb på %1 er for lille (regnes som støv).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1291,27 +1291,27 @@ Adresse: %4
     </message>
     <message>
         <source>Net manager warning</source>
-        <translation type="unfinished"/>
+        <translation>Net-håndterings-advarsel</translation>
     </message>
     <message>
         <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Din aktuelle proxy understøtter ikke SOCKS5, hvilket kræves for betalingsforespørgsler via proxy.</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>Betalingsforespørgslens hentnings-URL er ugyldig: %1</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
+        <translation>Filhåndtering for betalingsanmodninger</translation>
     </message>
     <message>
         <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
+        <translation>Betalingsanmodningsfil kan ikke indlæses eller bearbejdes! Dette kan skyldes en ugyldig betalingsanmodningsfil.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>Ikke-verificerede betalingsforespørgsler for tilpassede betalings-scripts understøttes ikke.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1319,19 +1319,19 @@ Adresse: %4
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
+        <translation>Fejl under kommunikation med %1: %2</translation>
     </message>
     <message>
         <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
+        <translation>Betalingsanmodning kan ikke fortolkes eller bearbejdes!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
+        <translation>Fejlagtigt svar fra server %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
+        <translation>Betaling anerkendt</translation>
     </message>
     <message>
         <source>Network request error</source>
@@ -1350,7 +1350,7 @@ Adresse: %4
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <translation>Fejl: Kan ikke fortolke konfigurationsfil: %1. Brug kun syntaksen nøgle=værdi.</translation>
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
@@ -1358,7 +1358,7 @@ Adresse: %4
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core blev ikke afsluttet på sikker vis …</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -1369,11 +1369,11 @@ Adresse: %4
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Gem foto...</translation>
+        <translation>Gem billede …</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation>&amp;Kopiér foto</translation>
+        <translation>Kopiér foto</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1381,7 +1381,7 @@ Adresse: %4
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
+        <translation>PNG-billede (*.png)</translation>
     </message>
 </context>
 <context>
@@ -1404,11 +1404,11 @@ Adresse: %4
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
+        <translation>Fejlsøgningsvindue</translation>
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Generelt</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1456,23 +1456,23 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>Netværkstrafik</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>Ryd</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
+        <translation>Totaler</translation>
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>Indkommende:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation>Ud:</translation>
+        <translation>Udgående:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1535,7 +1535,7 @@ Adresse: %4
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation>&amp;Mængde:</translation>
+        <translation>Beløb:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1543,35 +1543,35 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation>&amp;Besked:</translation>
+        <translation>Besked:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Genbrug en af de tidligere brugte modtagelsesadresser. Genbrug af adresser har indflydelse på sikkerhed og privatliv. Brug ikke dette med mindre du genskaber en betalingsforespørgsel fra tidligere.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>Genbrug en eksisterende modtagelsesadresse (anbefales ikke)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>En valgfri besked, der føjes til betalingsanmodningen, og som vil vises, når anmodningen åbnes. Bemærk: Beskeden vil ikke sendes med betalingen over Bitcoin-netværket.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Et valgfrit mærkat, der associeres med den nye modtagelsesadresse.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Brug denne formular for at anmode om betalinger. Alle felter er &lt;b&gt;valgfri&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Et valgfrit beløb til anmodning. Lad dette felt være tomt eller indeholde nul for at anmode om et ikke-specifikt beløb.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Ryd alle fælter af formen.</translation>
+        <translation>Ryd alle felter af formen.</translation>
     </message>
     <message>
         <source>Clear</source>
@@ -1579,35 +1579,35 @@ Adresse: %4
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>Historik over betalingsanmodninger</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation>&amp;Anmod betaling</translation>
+        <translation>Anmod om betaling</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Vis den valgte forespørgsel (gør det samme som dobbeltklik på en indgang)</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
+        <translation>Vis</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Fjern de valgte indgange fra listen</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>Fjern</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Kopier mærkat</translation>
+        <translation>Kopiér mærkat</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér besked</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1618,23 +1618,23 @@ Adresse: %4
     <name>ReceiveRequestDialog</name>
     <message>
         <source>QR Code</source>
-        <translation>QR Kode</translation>
+        <translation>QR-kode</translation>
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Kopiér &amp;URL</translation>
+        <translation>Kopiér URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>Kopiér &amp;Adresse</translation>
+        <translation>Kopiér adresse</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Gem foto...</translation>
+        <translation>Gem billede …</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>Anmod om betaling til %1</translation>
     </message>
     <message>
         <source>Payment information</source>
@@ -1666,7 +1666,7 @@ Adresse: %4
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Fejl ved kodning fra URI til QR-kode</translation>
+        <translation>Fejl ved kodning fra URI til QR-kode.</translation>
     </message>
 </context>
 <context>
@@ -1693,11 +1693,11 @@ Adresse: %4
     </message>
     <message>
         <source>(no message)</source>
-        <translation type="unfinished"/>
+        <translation>(ingen besked)</translation>
     </message>
     <message>
         <source>(no amount)</source>
-        <translation type="unfinished"/>
+        <translation>(intet beløb)</translation>
     </message>
 </context>
 <context>
@@ -1708,27 +1708,27 @@ Adresse: %4
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>Egenskaber for coin-styring</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>Inputs …</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>valgt automatisk</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Utilstrækkelige midler!</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Mængde:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Byte:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -1736,31 +1736,31 @@ Adresse: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritet:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Gebyr:</translation>
     </message>
     <message>
         <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Lavt output:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Efter gebyr:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Byttepenge:</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 type="unfinished"/>
+        <translation>Hvis dette aktiveres, men byttepengeadressen er tom eller ugyldig, vil byttepenge blive sendt til en nygenereret adresse.</translation>
     </message>
     <message>
         <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Tilpasset byttepengeadresse</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
@@ -1772,7 +1772,7 @@ Adresse: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Ryd alle fælter af formen.</translation>
+        <translation>Ryd alle felter af formen.</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1796,11 +1796,11 @@ Adresse: %4
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 til %2</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér mængde</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1808,35 +1808,35 @@ Adresse: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér gebyr</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér efter-gebyr</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér byte</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér prioritet</translation>
     </message>
     <message>
         <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér lavt output</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Kopiér byttepenge</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Totalbeløb %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>eller</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1860,15 +1860,15 @@ Adresse: %4
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
+        <translation>Oprettelse af transaktion mislykkedes!</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>Transaktionen blev afvist! Dette kan ske, hvis nogle af dine bitcoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine bitcoins er blevet brugt i kopien, men ikke er markeret som brugt her.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Advarsel: Ugyldig Bitcoin-adresse</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1876,7 +1876,7 @@ Adresse: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
+        <translation>Advarsel: Ukendt byttepengeadresse</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1892,7 +1892,7 @@ Adresse: %4
     </message>
     <message>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <translation>Ugyldig betalingsadresse %1</translation>
     </message>
 </context>
 <context>
@@ -1919,11 +1919,11 @@ Adresse: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Vælg tidligere brugt adresse</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
+        <translation>Dette er en normal betaling.</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1939,7 +1939,7 @@ Adresse: %4
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Fjern denne indgang</translation>
     </message>
     <message>
         <source>Message:</source>
@@ -1947,38 +1947,38 @@ Adresse: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Dette er en verificeret betalingsforespørgsel.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Indtast et mærkat for denne adresse for at føje den til listen over brugte adresser</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>En besked, som blev føjet til &quot;bitcon:&quot;-URI&apos;en, som vil gemmes med transaktionen til din reference. Bemærk: Denne besked vil ikke blive sendt over Bitcoin-netværket.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Dette er en ikke-verificeret betalingsforespørgsel.</translation>
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>Betal til:</translation>
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Memo:</translation>
     </message>
 </context>
 <context>
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core lukker ned …</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>Luk ikke computeren ned, før dette vindue forsvinder.</translation>
     </message>
 </context>
 <context>
@@ -2001,7 +2001,7 @@ Adresse: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Vælg tidligere brugt adresse</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -2132,7 +2132,7 @@ Adresse: %4
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Udviklerne af Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2154,7 +2154,7 @@ Adresse: %4
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>konflikt</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -2242,11 +2242,11 @@ Adresse: %4
     </message>
     <message>
         <source>Merchant</source>
-        <translation type="unfinished"/>
+        <translation>Forretningsdrivende</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <translation>Udvundne bitcoins skal modne %1 blokke, før de kan bruges. Da du genererede denne blok, blev den udsendt til netværket for at blive føjet til blokkæden. Hvis det ikke lykkes at få den i kæden, vil dens tilstand ændres til &quot;ikke accepteret&quot;, og den vil ikke kunne bruges. Dette kan ske nu og da, hvis en anden knude udvinder en blok inden for nogle få sekunder fra din.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2316,7 +2316,7 @@ Adresse: %4
     </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
+        <translation>Umoden (%1 bekræftelser; vil være tilgængelig efter %2)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2340,19 +2340,19 @@ Adresse: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Offline</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Ubekræftet</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Bekræfter (%1 af %2 anbefalede bekræftelser)</translation>
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>Konflikt</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2483,23 +2483,23 @@ Adresse: %4
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>Historik for eksport af transaktioner</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Eksport mislykkedes</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>En fejl opstod under gemning af transaktionshistorik til %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>Eksport problemfri</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Transaktionshistorikken blev gemt til %1 med succes.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2546,7 +2546,7 @@ Adresse: %4
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <translation>Ingen tegnebog er indlæst.</translation>
     </message>
 </context>
 <context>
@@ -2580,11 +2580,11 @@ Adresse: %4
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Der skete en fejl under gemning af tegnebogsdata til %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Tegnebogsdata blev gemt til %1 med succes.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
@@ -2659,7 +2659,7 @@ Adresse: %4
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core RPC-klient-version</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2699,7 +2699,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
+        <translation>Accepterede krypteringer (standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
@@ -2711,19 +2711,19 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <translation>Rate-begræns kontinuerligt frie transaktioner til &lt;n&gt;*1000 byte i minuttet (standard:15)</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme. Dette er tiltænkt til testværktøjer for regression of programudvikling.</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
+        <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme.</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Fejl: Lytning efter indkommende forbindelser mislykkedes (lytning returnerede fejl %d)</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
@@ -2739,27 +2739,27 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Gebyrer mindre end dette opfattes som nul-gebyr (for oprettelse af transaktioner) (standard:</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Flyt databaseaktivitet fra hukommelsespulje til disklog hver &lt;n&gt; megabytes (standard: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>Hvor gennemarbejdet blokverificeringen for -checkblocks er (0-4; standard: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>I denne tilstand styrer -genproclimit hvor mange blokke, der genereres med det samme.</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 type="unfinished"/>
+        <translation>Sæt antallet af scriptverificeringstråde (%u til %d, 0 = auto, &lt;0 = efterlad det antal kernet fri, standard: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Sæt processorbegrænsning for når generering er slået til (-1 = ubegrænset, standard: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
@@ -2767,11 +2767,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>Ikke i stand til at tildele til %s på denne computer. Bitcoin Core kører sansynligvis allerede.</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>Brug separat SOCS5-proxy for at nå andre knuder via Tor skjulte tjenester (standard: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
@@ -2799,15 +2799,15 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(standard: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(standard: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <translation>&lt;kategori&gt; kan være:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
@@ -2815,7 +2815,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core-tjeneste</translation>
     </message>
     <message>
         <source>Block creation options:</source>
@@ -2823,7 +2823,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <translation>Ryd liste over transaktioner i tegnebog (diagnoseværktøj; medfører -rescan)</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
@@ -2831,15 +2831,15 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <translation>Forbind gennem SOCKS-proxy</translation>
     </message>
     <message>
         <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Forbind til JSON-RPC på &lt;port&gt; (standard: 8332 eller testnetværk: 18332)</translation>
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for forbindelser:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2847,11 +2847,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for fejlfinding/test:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Slå sikker tilstand fra, tilsidesæt hændelser fra sikker tilstand (standard: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
@@ -2859,7 +2859,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>Indlæs ikke tegnebogen og slå tegnebogs-RPC-kald fra</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2939,11 +2939,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <translation>Føj gebyr pr. kB til transaktioner, du sender</translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Gebyrer mindre end dette opfattes som nul-gebyr (for videreførsler) (standard:</translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2951,7 +2951,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Gennemtving sikker tilstand (standard: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2963,11 +2963,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Hvis &lt;kategori&gt; ikke angives, udskriv al fejlsøgningsinformation.</translation>
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importerer …</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
@@ -2975,7 +2975,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Ugyldig -onion adresse: &quot;%s&quot;</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2983,11 +2983,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Føj tidsstempel foran fejlsøgningsoutput (standard: 1)</translation>
     </message>
     <message>
         <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for RPC-klient:</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -2995,15 +2995,15 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <translation>Vælg SOCKS-version for -proxy (4 eller 5, standard: 5)</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Sæt maksimum blokstørrelse i byte (standard: %d)</translation>
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
@@ -3015,15 +3015,15 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Brug ubekræftede byttepenge under afsendelse af transaktioner (standard: 1)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>This is intended for regression testing tools and app development.</translation>
     </message>
     <message>
         <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <translation>Brug (forældet, brug bitcoin-cli):</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3035,7 +3035,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>Vent på opstart af RPC-server</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
@@ -3043,11 +3043,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for tegnebog:</translation>
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Advarsel: Forældet argument -debugnet ignoreret; brug -debug=net</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
@@ -3059,7 +3059,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>Kan ikke opnå en lås på datamappe %s. Bitcoin Core kører sansynligvis allerede.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -3067,11 +3067,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Udskriv fejlsøgningsinformation (standard: 0, angivelse af &lt;kategori&gt; er valgfri)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Sæt maksimumstørrelse for højprioritet/lavgebyr-transaktioner i byte (standard: %d)</translation>
     </message>
     <message>
         <source>Information</source>
@@ -3087,11 +3087,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Begræns størrelsen på signaturcache til &lt;n&gt; indgange (standard: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Prioritet for transaktionslog og gebyr pr. kB under udvinding af blokke (standard: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3115,31 +3115,31 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Udskriv blok under opstart, hvis den findes i blokindeks</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Udskriv bloktræ under startop (standard: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for RPC SSL: (se Bitcoin Wiki for instruktioner i SSL-opstart)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Tilvalg for RPC-server:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Drop tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Slør tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Kør en tråd for at rydde tegnebog periodisk (standard: 1)</translation>
     </message>
     <message>
         <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3147,7 +3147,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Send kommando til Bitcoin Core</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3159,15 +3159,15 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Sætter DB_PRIVATE-flaget i tegnebogens db-miljø (standard: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <translation>Vis alle tilvalg for fejlsøgning (brug: --help -help-debug)</translation>
     </message>
     <message>
         <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vis information om ydelsesmåling (standard: 0)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3183,7 +3183,7 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Start Bitcoin Core-tjeneste</translation>
     </message>
     <message>
         <source>System error: </source>
@@ -3223,11 +3223,11 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <translation>Zapper alle transaktioner fra tegnebog …</translation>
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>under opstart</translation>
     </message>
     <message>
         <source>version</source>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index 8e2b681ba9ba..ce30a8603d8e 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -40,7 +40,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>주소 또는 표를 편집하기 위해 더블클릭 하시오</translation>
+        <translation>지갑 주소나 제목을 수정하려면 더블클릭하세요.</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -755,7 +755,7 @@ Address: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>만약 거래 양이 1000bytes 보다 크면 제목이 빨간색으로 변합니다</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
@@ -771,11 +771,11 @@ Address: %4
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <translation>우선권이 중간보다 작으면 제목이 빨간색으로 변합니다. </translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>만약 수령인이 받은 액수가 잔고의 1%보다 작으면 이 제목이 빨간색으로 변합니다.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 is required.</source>
@@ -787,7 +787,7 @@ Address: %4
     </message>
     <message>
         <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>만약 잔돈이 1%보다 작다면 제목이 빨간색으로 변합니다</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1053,7 +1053,7 @@ Address: %4
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>제 3자 거래 URLs</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1093,7 +1093,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <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>
@@ -1303,7 +1303,7 @@ Address: %4
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
+        <translation>지불이 파일 처리를 요청합니다</translation>
     </message>
     <message>
         <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
@@ -1354,7 +1354,7 @@ Address: %4
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <translation>오류: 잘못된 -regtest 와 -testnet의 조합입니다.</translation>
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
@@ -1460,7 +1460,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>&amp;지우기</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1712,7 +1712,7 @@ Address: %4
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>입력...</translation>
     </message>
     <message>
         <source>automatically selected</source>
@@ -1864,7 +1864,7 @@ Address: %4
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>거래가 거부되었습니다. 몇몇 코인들이 지갑에서 이미 사용된 경우, 예를 들어 코인을 이미 사용한  wallet.dat를 복사해서 사용한 경우 지금 지갑에 기록이 안되있어 이런 일이 생길 수 있습니다.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
@@ -2651,7 +2651,7 @@ Address: %4
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>포트 &lt;port&gt;을 통해 JSON-RPC 연결 (기본값: 8332 또는 testnet: 18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
@@ -2693,7 +2693,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>IPv6 연결을 위해 RPC port %u 설정 중 오류가 발생했습니다. IPv4: %s 환경으로 돌아갑니다.</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
@@ -2717,7 +2717,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>에러: 거래가 거부되었습니다! 이런 일이 생길 수 있습니다 만약 몇개의 코인들을 지갑에서 이미 사용했다면요, 예를 들어 만약 당신이 wallet.dat를 복사해서 사용했거나 코인들을 사용 후에 복사했다면 여기선 표시가 안되서 사용할 수 없습니다
+
+-번역은 했으나 약간 이상한점이 있어서 수정해야함-</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
@@ -2725,7 +2727,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
+        <translation>지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다)</translation>
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
@@ -2841,7 +2843,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>안전 모드를 비활성화하고 안전 모드의 이벤트가 발생하더라도 무시합니다. (기본값: 0, 비활성화)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
@@ -2861,7 +2863,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <translation>지갑 데이터베이스 환경 초기화하는데 오류</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2961,7 +2963,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>올바르지 않거나 생성된 블록을 찾을 수 없습니다. 잘못된 네트워크 자료 디렉토리?</translation>
     </message>
     <message>
         <source>Invalid -onion address: &apos;%s&apos;</source>
@@ -3053,7 +3055,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>이 사항과 관련있는 경고가 발생하거나 아주 긴 포크가 발생했을 때 명령어를 실행해 주세요. (cmd 명령어 목록에서 %s는 메시지로 대체됩니다) </translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
@@ -3061,7 +3063,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>최대 크기를 최우선으로 설정 / 바이트당 최소 수수료로 거래(기본값: %d)</translation>
     </message>
     <message>
         <source>Information</source>
@@ -3077,11 +3079,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>&lt;n&gt;번 째 순서에서 전자서명 캐쉬의 용량을 제한합니다. (기본값: 50000) </translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>블럭을 채굴할 때 kB당 거래 우선 순위와 수수료를 로그에 남깁니다. (기본값: 0, 비활성화)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3089,11 +3091,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <translation>최대 연결마다 1000bytes 버퍼를 받는다. (기본값: 5000)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <translation>최대 연결 마다 1000bytes 버퍼를 보낸다.(기본값: 1000) </translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
@@ -3101,27 +3103,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <translation>노드가 있는 네트워크에만 접속 합니다(IPv4, IPv6 또는 Tor)</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>블럭 색인을 발견하면 구동 시 블럭을 출력합니다.</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>구동 시 블럭 트리를 출력합니다. (기본값: 0, 비활성화)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>RPC SSL 옵션: (비트코인 위키의 SSL 설정 설명서 참고)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>RPC 서버 설정</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>모든 네트워크 메시지 마다 무작위로 1이 떨어진다</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
@@ -3137,7 +3139,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>비트코인 코어로 명령 보내기</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3149,15 +3151,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>전자지갑 데이터베이스 환경에 DB_PRIVATE 플래그를 설정합니다. (기본값: 1, 활성화)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <translation>모든 디버그 설정 보기(설정: --help -help-debug)</translation>
     </message>
     <message>
         <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>벤치마크 정보 보기(기본값: 0)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3217,7 +3219,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>구동 중</translation>
     </message>
     <message>
         <source>version</source>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 1267ad65b9b9..9e38c69c6096 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -599,7 +599,7 @@ Adresse: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation>Lav Utdata:</translation>
+        <translation>Svake Utdata:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -1744,7 +1744,7 @@ Adresse: %4
     </message>
     <message>
         <source>Low Output:</source>
-        <translation>Svak Utdata:</translation>
+        <translation>Svake Utdata:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -2730,7 +2730,7 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Feil: Denne transaksjonen trenger en gebyr på minst %s på grunn av beløpet, kompleksiteten eller bruk av allerede mottatte penger!</translation>
+        <translation>Feil: Denne transaksjonen trenger et gebyr på minst %s på grunn av beløpet, kompleksiteten eller bruk av allerede mottatte penger!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index ea98c4e4b188..b87d27fe12f6 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -917,7 +917,7 @@ Address: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>设置SSL根证书的付款请求(默认：-系统-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -1050,11 +1050,11 @@ Address: %4
     </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 type="unfinished"/>
+        <translation>出现在交易的选项卡的上下文菜单项的第三方网址 (例如：区块链接查询) 。 %s的URL被替换为交易哈希。多个的URL需要竖线 | 分隔。</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>第三方交易网址</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1074,7 +1074,7 @@ Address: %4
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = 自动, &lt;0 = 离开很多免费的核心)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
@@ -1086,7 +1086,7 @@ Address: %4
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>启动货币 &amp;控制功能</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>
@@ -1094,7 +1094,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <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>
@@ -1351,7 +1351,7 @@ Address: %4
     </message>
     <message>
         <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <translation>错误: 无法解析配置文件: %1. 只有钥匙=重要的私匙.</translation>
     </message>
     <message>
         <source>Error: Invalid combination of -regtest and -testnet.</source>
@@ -1359,7 +1359,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <translation>比特币核心钱包没有安全退出....</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
@@ -2667,7 +2667,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>比特币核心钱包RPC客户端版本</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2722,7 +2722,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <translation>自由交易不断的速率限制为&lt;n&gt;*1000 字节每分钟(默认值:15)</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
@@ -2734,7 +2734,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>错误: 监听接收连接失败 (监听错误 %d)</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
@@ -2750,27 +2750,27 @@ rpcpassword=%s
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>比这手续费更小的被认为零手续费 (交易产生) (默认:</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>从缓冲池清理磁盘数据库活动日志每&lt;n&gt;兆字节 (默认值: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>如何有效的验证checkblocks区块(0-4, 默认值: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>在-genproclimit这种模式下控制产出多少区块</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 type="unfinished"/>
+        <translation>设置脚本验证的程序 (%u 到 %d, 0 = 自动, &lt;0 = 保留自由的核心, 默认值: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>设置处理器生成的限制 (-1 = 无限, 默认值: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
@@ -2778,7 +2778,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>无法 %s的绑定到电脑上，比特币核心钱包可能已经在运行。</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
@@ -2810,11 +2810,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(默认值: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(默认: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2850,7 +2850,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>连接选项：</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -2858,11 +2858,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>调试/测试选项：</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>禁止使用安全模式，重新写入一个真正的安全模式日志(默认值: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
@@ -2954,7 +2954,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <translation>比这手续费更小的被认为零手续费 (中继) (默认值: </translation>
     </message>
     <message>
         <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
@@ -2962,7 +2962,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>强制安全模式(默认值: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -3010,7 +3010,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>设置以MB为单位的数据库缓存大小(%d 到 %d, 默认值: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
@@ -3070,7 +3070,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>无法获取数据目录的 %s. 比特币核心钱包可能已经在运行.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -3098,11 +3098,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>签名缓冲大小限制每&lt;n&gt; 条目 (默认值: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>开采区块时，日志优先级和手续费每KB (默认值: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3126,15 +3126,15 @@ rpcpassword=%s
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>如果在搜索区块中找到，请启动打印区块</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation>启动时打印块树 (默认: 0)</translation>
+        <translation>启动时打印区块树 (默认值: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>RPC SSL选项：(见有关比特币设置用于SSL说明的维基百科)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
@@ -3142,15 +3142,15 @@ rpcpassword=%s
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>随机每1个丢失测试&lt;n&gt;网络信息</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>随机每1个模拟测试&lt;n&gt;网络信息</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>运行一个程序，定时清理钱包 (默认值：1)</translation>
     </message>
     <message>
         <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3158,7 +3158,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>发送指令到比特币核心钱包</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3170,15 +3170,15 @@ rpcpassword=%s
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>设置DB_PRIVATE钱包标志DB环境 (默认值: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <translation>显示所有调试选项 (用法: --帮助 -帮助调试)</translation>
     </message>
     <message>
         <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>显示标准信息 (默认值: 0)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3194,7 +3194,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>开启比特币核心钱包守护进程</translation>
     </message>
     <message>
         <source>System error: </source>
@@ -3238,7 +3238,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>启动中</translation>
     </message>
     <message>
         <source>version</source>

From 516053c349f8abde09597962f4dd3958a2825177 Mon Sep 17 00:00:00 2001
From: Tawanda Kembo <tawanda@zimstay.com>
Date: Thu, 22 May 2014 13:19:51 +0200
Subject: [PATCH 0104/1819] Make links on 'About Bitcoin Core' into clickable
 (squashed 5 comits into one)

Made the following links clickable:
http://www.opensource.org/licenses/mit-license.php
http://www.openssl.org/
eay@cryptsoft.com

(Squashed commits into one commit as suggested by @laanwj)

Replaced label with text browser on About Bitcoin Core Screen

So that the links on the About screen can be clickable

Replaced html property with text property

I have now removed unnecessary html so this should make life easier for
translators and you @Diapolo :). What do you think?

The size of the window needs to change

The size of the window needs to change when you make links clickable.
Thanks  for pointing that out @laanwj

Using the https://www.openssl.org over the http link

Using the https://www.openssl.org over the http link as suggested by
@Diapolo
---
 src/qt/forms/aboutdialog.ui | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui
index 3ab4675bf3ee..fec63f737ae1 100644
--- a/src/qt/forms/aboutdialog.ui
+++ b/src/qt/forms/aboutdialog.ui
@@ -110,9 +110,12 @@
         <string>
 This is experimental software.
 
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
+Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;a href=&quot;http://www.opensource.org/licenses/mit-license.php&quot;&gt;http://www.opensource.org/licenses/mit-license.php&lt;/a&gt;.
 
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</string>
+This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (&lt;a href=&quot;https://www.openssl.org/&quot;&gt;https://www.openssl.org/&lt;/a&gt;) and cryptographic software written by Eric Young (&lt;a href=&quot;mailto:eay@cryptsoft.com&quot;&gt;eay@cryptsoft.com&lt;/a&gt;) and UPnP software written by Thomas Bernard.</string>
+       </property>
+       <property name="textFormat">
+        <enum>Qt::RichText</enum>
        </property>
        <property name="wordWrap">
         <bool>true</bool>

From 386e732a5f6a6f5bc2cdfd0136027475b16af7c7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 2 Jun 2014 09:14:23 +0200
Subject: [PATCH 0105/1819] gitian: make linux qt intermediate deterministic

A qt installation date snuck into the host utils (lrelease etc)
This doesn't affect the end product, so no dependency version bump.

It also doesn't explain why gavin's and mine build is different
---
 contrib/gitian-descriptors/qt-linux.yml | 1 +
 doc/release-process.md                  | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/gitian-descriptors/qt-linux.yml b/contrib/gitian-descriptors/qt-linux.yml
index 1462df32890d..b163b4bb8c1f 100644
--- a/contrib/gitian-descriptors/qt-linux.yml
+++ b/contrib/gitian-descriptors/qt-linux.yml
@@ -40,6 +40,7 @@ script: |
   tar xzf qt-everywhere-opensource-src-4.6.4.tar.gz
   cd qt-everywhere-opensource-src-4.6.4
   QTBUILDDIR=$(pwd)
+  sed 's/TODAY=`date +%Y-%m-%d`/TODAY=2011-01-30/' -i configure
 
   # Need to build 4.6-versioned host utilities as well (lrelease/qrc/lupdate/...)
   ./configure -prefix $INSTALLPREFIX -confirm-license -release -opensource -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs
diff --git a/doc/release-process.md b/doc/release-process.md
index 6d08c4849699..10c03de1625b 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -93,8 +93,8 @@ Release Process
     571789867d172500fa96d63d0ba8c5b1e1a3d6f44f720eddf2f93665affc88b3  bitcoin-deps-linux64-gitian-r5.zip
     f29b7d9577417333fb56e023c2977f5726a7c297f320b175a4108cf7cd4c2d29  boost-linux32-1.55.0-gitian-r1.zip
     88232451c4104f7eb16e469ac6474fd1231bd485687253f7b2bdf46c0781d535  boost-linux64-1.55.0-gitian-r1.zip
-    74ec2d301cf1a9d03b194153f545102ba45dad02b390485212fe6717de486361  qt-linux32-4.6.4-gitian-r1.tar.gz
-    01d0477e299467f09280f15424781154e2b1ea4072c5edb16e044c234954fd9a  qt-linux64-4.6.4-gitian-r1.tar.gz
+    57e57dbdadc818cd270e7e00500a5e1085b3bcbdef69a885f0fb7573a8d987e1  qt-linux32-4.6.4-gitian-r1.tar.gz
+    60eb4b9c5779580b7d66529efa5b2836ba1a70edde2a0f3f696d647906a826be  qt-linux64-4.6.4-gitian-r1.tar.gz
     60dc2d3b61e9c7d5dbe2f90d5955772ad748a47918ff2d8b74e8db9b1b91c909  boost-win32-1.55.0-gitian-r6.zip
     f65fcaf346bc7b73bc8db3a8614f4f6bee2f61fcbe495e9881133a7c2612a167  boost-win64-1.55.0-gitian-r6.zip
     97e62002d338885336bb24e7cbb9471491294bd8857af7a83d18c0961f864ec0  bitcoin-deps-win32-gitian-r11.zip

From 1411a51feffe327956350417079104f573caeb5d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 2 Jun 2014 11:01:02 +0200
Subject: [PATCH 0106/1819] doc: Update hash in release process for new windows
 deps intermediate

This was forgotten in 25d4911.
---
 doc/release-process.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 10c03de1625b..60b93b7680c4 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -97,8 +97,8 @@ Release Process
     60eb4b9c5779580b7d66529efa5b2836ba1a70edde2a0f3f696d647906a826be  qt-linux64-4.6.4-gitian-r1.tar.gz
     60dc2d3b61e9c7d5dbe2f90d5955772ad748a47918ff2d8b74e8db9b1b91c909  boost-win32-1.55.0-gitian-r6.zip
     f65fcaf346bc7b73bc8db3a8614f4f6bee2f61fcbe495e9881133a7c2612a167  boost-win64-1.55.0-gitian-r6.zip
-    97e62002d338885336bb24e7cbb9471491294bd8857af7a83d18c0961f864ec0  bitcoin-deps-win32-gitian-r11.zip
-    ee3ea2d5aac1a67ea6bfbea2c04068a7c0940616ce48ee4f37c264bb9d4438ef  bitcoin-deps-win64-gitian-r11.zip
+    acd59690a49dfbad6b436379843fe4ad1857ad91c603d52506690bc55f2a01a4  bitcoin-deps-win32-gitian-r12.zip
+    a3e5a62fcdad81f758e41848035e6a27be390981a14d590f2cf2509f87417a42  bitcoin-deps-win64-gitian-r12.zip
     963e3e5e85879010a91143c90a711a5d1d5aba992e38672cdf7b54e42c56b2f1  qt-win32-5.2.0-gitian-r3.zip
     751c579830d173ef3e6f194e83d18b92ebef6df03289db13ab77a52b6bc86ef0  qt-win64-5.2.0-gitian-r3.zip
     e2e403e1a08869c7eed4d4293bce13d51ec6a63592918b90ae215a0eceb44cb4  protobuf-win32-2.5.0-gitian-r4.zip

From 91855f279d27c3772b70c6e491684ed74684685e Mon Sep 17 00:00:00 2001
From: tm314159 <tm314159@users.noreply.github.com>
Date: Mon, 2 Jun 2014 11:32:33 -0700
Subject: [PATCH 0107/1819] Properly initialize CWallet::nTimeFirstKey

---
 src/wallet.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/wallet.h b/src/wallet.h
index 96074151ad2d..d9d071c2b96f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -151,6 +151,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         nOrderPosNext = 0;
         nNextResend = 0;
         nLastResend = 0;
+        nTimeFirstKey = 0;
     }
     CWallet(std::string strWalletFileIn)
     {

From 65f78a111ff52c2212cc0a423662e7a41d1206dd Mon Sep 17 00:00:00 2001
From: Ashley Holman <dscvlt@gmail.com>
Date: Fri, 23 May 2014 12:09:59 -0500
Subject: [PATCH 0108/1819] Qt: Add GUI view of peer information. #4133

---
 src/qt/Makefile.am         |   3 +
 src/qt/clientmodel.cpp     |   9 +-
 src/qt/clientmodel.h       |   3 +
 src/qt/forms/rpcconsole.ui | 275 +++++++++++++++++++++++++++++++++++++
 src/qt/guiutil.cpp         |  48 +++++++
 src/qt/guiutil.h           |   6 +
 src/qt/peertablemodel.cpp  | 238 ++++++++++++++++++++++++++++++++
 src/qt/peertablemodel.h    |  79 +++++++++++
 src/qt/rpcconsole.cpp      | 192 ++++++++++++++++++++++++--
 src/qt/rpcconsole.h        |  29 ++++
 10 files changed, 870 insertions(+), 12 deletions(-)
 create mode 100644 src/qt/peertablemodel.cpp
 create mode 100644 src/qt/peertablemodel.h

diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index 648971bd8fa4..1d85113d7820 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -126,6 +126,7 @@ QT_MOC_CPP = \
   moc_optionsdialog.cpp \
   moc_optionsmodel.cpp \
   moc_overviewpage.cpp \
+  moc_peertablemodel.cpp \
   moc_paymentserver.cpp \
   moc_qvalidatedlineedit.cpp \
   moc_qvaluecombobox.cpp \
@@ -191,6 +192,7 @@ BITCOIN_QT_H = \
   overviewpage.h \
   paymentrequestplus.h \
   paymentserver.h \
+  peertablemodel.h \
   qvalidatedlineedit.h \
   qvaluecombobox.h \
   receivecoinsdialog.h \
@@ -294,6 +296,7 @@ BITCOIN_QT_CPP += \
   overviewpage.cpp \
   paymentrequestplus.cpp \
   paymentserver.cpp \
+  peertablemodel.cpp \
   receivecoinsdialog.cpp \
   receiverequestdialog.cpp \
   recentrequeststablemodel.cpp \
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index d1f68ebd22a5..ce773e0f822d 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -5,6 +5,7 @@
 #include "clientmodel.h"
 
 #include "guiconstants.h"
+#include "peertablemodel.h"
 
 #include "alert.h"
 #include "chainparams.h"
@@ -22,11 +23,12 @@
 static const int64_t nClientStartupTime = GetTime();
 
 ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
-    QObject(parent), optionsModel(optionsModel),
+    QObject(parent), optionsModel(optionsModel), peerTableModel(0),
     cachedNumBlocks(0),
     cachedReindexing(0), cachedImporting(0),
     numBlocksAtStartup(-1), pollTimer(0)
 {
+    peerTableModel = new PeerTableModel(this);
     pollTimer = new QTimer(this);
     connect(pollTimer, SIGNAL(timeout()), this, SLOT(updateTimer()));
     pollTimer->start(MODEL_UPDATE_DELAY);
@@ -173,6 +175,11 @@ OptionsModel *ClientModel::getOptionsModel()
     return optionsModel;
 }
 
+PeerTableModel *ClientModel::getPeerTableModel()
+{
+    return peerTableModel;
+}
+
 QString ClientModel::formatFullVersion() const
 {
     return QString::fromStdString(FormatFullVersion());
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index cab853d92db3..c18d30178b9b 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -9,6 +9,7 @@
 
 class AddressTableModel;
 class OptionsModel;
+class PeerTableModel;
 class TransactionTableModel;
 
 class CWallet;
@@ -42,6 +43,7 @@ class ClientModel : public QObject
     ~ClientModel();
 
     OptionsModel *getOptionsModel();
+    PeerTableModel *getPeerTableModel();
 
     //! Return number of connections, default is in- and outbound (total)
     int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
@@ -71,6 +73,7 @@ class ClientModel : public QObject
 
 private:
     OptionsModel *optionsModel;
+    PeerTableModel *peerTableModel;
 
     int cachedNumBlocks;
     bool cachedReindexing;
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index fcb6bb60bb34..bf737d9b9967 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -652,6 +652,281 @@
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="tab_peers">
+      <attribute name="title">
+       <string>&amp;Peers</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="1">
+        <widget class="QLabel" name="peerHeading">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>Select a peer to view detailed information.</string>
+         </property>
+         <property name="margin">
+          <number>3</number>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="0" rowspan="2">
+        <widget class="QTableView" name="peerWidget">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="horizontalScrollBarPolicy">
+          <enum>Qt::ScrollBarAlwaysOff</enum>
+         </property>
+         <property name="editTriggers">
+          <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
+         </property>
+         <property name="sortingEnabled">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QWidget" name="detailWidget" native="true">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <layout class="QGridLayout" name="gridLayout_3">
+          <property name="leftMargin">
+           <number>3</number>
+          </property>
+          <item row="12" column="0">
+           <widget class="QLabel" name="label_21">
+            <property name="text">
+             <string>Version:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="11" column="1">
+           <widget class="QLabel" name="peerPingTime">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="0">
+           <widget class="QLabel" name="label_19">
+            <property name="text">
+             <string>Last Receive:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="14" column="0">
+           <widget class="QLabel" name="label_28">
+            <property name="text">
+             <string>User Agent:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="12" column="1">
+           <widget class="QLabel" name="peerVersion">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="8" column="1">
+           <widget class="QLabel" name="peerConnTime">
+            <property name="minimumSize">
+             <size>
+              <width>160</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="11" column="0">
+           <widget class="QLabel" name="label_26">
+            <property name="text">
+             <string>Ping Time:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="5" column="1">
+           <widget class="QLabel" name="peerLastRecv">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="8" column="0">
+           <widget class="QLabel" name="label_22">
+            <property name="text">
+             <string>Connection Time:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="6" column="1">
+           <widget class="QLabel" name="peerBytesSent">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="14" column="1">
+           <widget class="QLabel" name="peerSubversion">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="15" column="0">
+           <widget class="QLabel" name="label_29">
+            <property name="text">
+             <string>Starting Height:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="7" column="1">
+           <widget class="QLabel" name="peerBytesRecv">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="6" column="0">
+           <widget class="QLabel" name="label_18">
+            <property name="text">
+             <string>Bytes Sent:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="7" column="0">
+           <widget class="QLabel" name="label_20">
+            <property name="text">
+             <string>Bytes Received:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="15" column="1">
+           <widget class="QLabel" name="peerHeight">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="16" column="0">
+           <widget class="QLabel" name="label_24">
+            <property name="text">
+             <string>Ban Score:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="16" column="1">
+           <widget class="QLabel" name="peerBanScore">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="17" column="0">
+           <widget class="QLabel" name="label_23">
+            <property name="text">
+             <string>Direction:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="17" column="1">
+           <widget class="QLabel" name="peerDirection">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="19" column="0">
+           <widget class="QLabel" name="label_25">
+            <property name="text">
+             <string>Sync Node:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="19" column="1">
+           <widget class="QLabel" name="peerSyncNode">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="0">
+           <widget class="QLabel" name="label_15">
+            <property name="text">
+             <string>Last Send:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="0">
+           <widget class="QLabel" name="label_4">
+            <property name="text">
+             <string>Services:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="0">
+           <widget class="QLabel" name="label_27">
+            <property name="text">
+             <string>IP Address/port:</string>
+            </property>
+           </widget>
+          </item>
+          <item row="3" column="1">
+           <widget class="QLabel" name="peerLastSend">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="2" column="1">
+           <widget class="QLabel" name="peerServices">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="1" column="1">
+           <widget class="QLabel" name="peerAddr">
+            <property name="text">
+             <string>N/A</string>
+            </property>
+           </widget>
+          </item>
+          <item row="20" column="0">
+           <widget class="QWidget" name="widget" native="true">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
   </layout>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 7b264d27c71c..851c0130ed41 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -11,6 +11,7 @@
 
 #include "core.h"
 #include "init.h"
+#include "protocol.h"
 #include "util.h"
 
 #ifdef WIN32
@@ -750,4 +751,51 @@ QString boostPathToQString(const boost::filesystem::path &path)
 }
 #endif
 
+QString formatDurationStr(int secs)
+{
+    QStringList strList;
+    int days = secs / 86400;
+    int hours = (secs % 86400) / 3600;
+    int mins = (secs % 3600) / 60;
+    int seconds = secs % 60;
+
+    if (days)
+        strList.append(QString(QObject::tr("%1 d")).arg(days));
+    if (hours)
+        strList.append(QString(QObject::tr("%1 h")).arg(hours));
+    if (mins)
+        strList.append(QString(QObject::tr("%1 m")).arg(mins));
+    if (seconds || (!days && !hours && !mins))
+        strList.append(QString(QObject::tr("%1 s")).arg(seconds));
+
+    return strList.join(" ");
+}
+
+QString formatServicesStr(uint64_t mask)
+{
+    QStringList strList;
+
+    // Just scan the last 8 bits for now.
+    for (int i=0; i < 8; i++) {
+        uint64_t check = 1 << i;
+        if (mask & check)
+        {
+            switch (check)
+            {
+            case NODE_NETWORK:
+                strList.append(QObject::tr("NETWORK"));
+                break;
+            default:
+                strList.append(QString("%1[%2]").arg(QObject::tr("UNKNOWN")).arg(check));
+            }
+        }
+    }
+
+    if (strList.size())
+        return strList.join(" & ");
+    else
+        return QObject::tr("None");
+
+}
+
 } // namespace GUIUtil
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 4f9416d1afec..ea6b7de8724a 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -173,6 +173,12 @@ namespace GUIUtil
     /* Convert OS specific boost path to QString through UTF-8 */
     QString boostPathToQString(const boost::filesystem::path &path);
 
+    /* Convert seconds into a QString with days, hours, mins, secs */
+    QString formatDurationStr(int secs);
+
+    /* Format CNodeStats.nServices bitmask into a user-readable string */
+    QString formatServicesStr(uint64_t mask);
+
 } // namespace GUIUtil
 
 #endif // GUIUTIL_H
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
new file mode 100644
index 000000000000..fba9d84e7727
--- /dev/null
+++ b/src/qt/peertablemodel.cpp
@@ -0,0 +1,238 @@
+// Copyright (c) 2011-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "peertablemodel.h"
+
+#include "clientmodel.h"
+
+#include "net.h"
+#include "sync.h"
+
+#include <QDebug>
+#include <QList>
+#include <QTimer>
+
+bool NodeLessThan::operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const
+{
+    const CNodeStats *pLeft = &(left.nodestats);
+    const CNodeStats *pRight = &(right.nodestats);
+
+    if (order == Qt::DescendingOrder)
+        std::swap(pLeft, pRight);
+
+    switch(column)
+    {
+    case PeerTableModel::Address:
+        return pLeft->addrName.compare(pRight->addrName) < 0;
+    case PeerTableModel::Subversion:
+        return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0;
+    case PeerTableModel::Height:
+        return pLeft->nStartingHeight < pRight->nStartingHeight;
+    }
+
+    return false;
+}
+
+// private implementation
+class PeerTablePriv
+{
+public:
+    /** Local cache of peer information */
+    QList<CNodeCombinedStats> cachedNodeStats;
+    /** Column to sort nodes by */
+    int sortColumn;
+    /** Order (ascending or descending) to sort nodes by */
+    Qt::SortOrder sortOrder;
+    /** Index of rows by node ID */
+    std::map<NodeId, int> mapNodeRows;
+
+    /** Pull a full list of peers from vNodes into our cache */
+    void refreshPeers() {
+        TRY_LOCK(cs_vNodes, lockNodes);
+        {
+            if (!lockNodes)
+            {
+                // skip the refresh if we can't immediately get the lock
+                return;
+            }
+            cachedNodeStats.clear();
+#if QT_VERSION >= 0x040700
+            cachedNodeStats.reserve(vNodes.size());
+#endif
+            BOOST_FOREACH(CNode* pnode, vNodes)
+            {
+                CNodeCombinedStats stats;
+                stats.statestats.nMisbehavior = -1;
+                pnode->copyStats(stats.nodestats);
+                cachedNodeStats.append(stats);
+            }
+        }
+
+        // if we can, retrieve the CNodeStateStats for each node.
+        TRY_LOCK(cs_main, lockMain);
+        {
+            if (lockMain)
+            {
+                BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
+                {
+                    GetNodeStateStats(stats.nodestats.nodeid, stats.statestats);
+                }
+            }
+        }
+
+
+        if (sortColumn >= 0)
+            // sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily)
+            qStableSort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder));
+
+        // build index map
+        mapNodeRows.clear();
+        int row = 0;
+        BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
+        {
+            mapNodeRows.insert(std::pair<NodeId, int>(stats.nodestats.nodeid, row++));
+        }
+    }
+
+    int size()
+    {
+        return cachedNodeStats.size();
+    }
+
+    CNodeCombinedStats *index(int idx)
+    {
+        if(idx >= 0 && idx < cachedNodeStats.size()) {
+            return &cachedNodeStats[idx];
+        }
+        else
+        {
+            return 0;
+        }
+    }
+
+};
+
+PeerTableModel::PeerTableModel(ClientModel *parent) :
+    QAbstractTableModel(parent),clientModel(parent),timer(0)
+{
+    columns << tr("Address") << tr("User Agent") << tr("Start Height");
+    priv = new PeerTablePriv();
+    // default to unsorted
+    priv->sortColumn = -1;
+
+    // set up timer for auto refresh
+    timer = new QTimer();
+    connect(timer, SIGNAL(timeout()), SLOT(refresh()));
+
+    // load initial data
+    refresh();
+}
+
+void PeerTableModel::startAutoRefresh(int msecs)
+{
+    timer->setInterval(1000);
+    timer->start();
+}
+
+void PeerTableModel::stopAutoRefresh()
+{
+    timer->stop();
+}
+
+int PeerTableModel::rowCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    return priv->size();
+}
+
+int PeerTableModel::columnCount(const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    return 3;
+}
+
+QVariant PeerTableModel::data(const QModelIndex &index, int role) const
+{
+    if(!index.isValid())
+        return QVariant();
+
+    CNodeCombinedStats *rec = static_cast<CNodeCombinedStats*>(index.internalPointer());
+
+    if(role == Qt::DisplayRole)
+    {
+        switch(index.column())
+        {
+        case Address:
+            return QVariant(rec->nodestats.addrName.c_str());
+        case Subversion:
+            return QVariant(rec->nodestats.cleanSubVer.c_str());
+        case Height:
+            return rec->nodestats.nStartingHeight;
+        }
+    }
+    return QVariant();
+}
+
+QVariant PeerTableModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+    if(orientation == Qt::Horizontal)
+    {
+        if(role == Qt::DisplayRole && section < columns.size())
+        {
+            return columns[section];
+        }
+    }
+    return QVariant();
+}
+
+Qt::ItemFlags PeerTableModel::flags(const QModelIndex &index) const
+{
+    if(!index.isValid())
+        return 0;
+
+    Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+    return retval;
+}
+
+QModelIndex PeerTableModel::index(int row, int column, const QModelIndex &parent) const
+{
+    Q_UNUSED(parent);
+    CNodeCombinedStats *data = priv->index(row);
+
+    if (data)
+    {
+        return createIndex(row, column, data);
+    }
+    else
+    {
+        return QModelIndex();
+    }
+}
+
+const CNodeCombinedStats *PeerTableModel::getNodeStats(int idx) {
+    return priv->index(idx);
+}
+
+void PeerTableModel::refresh()
+{
+    emit layoutAboutToBeChanged();
+    priv->refreshPeers();
+    emit layoutChanged();
+}
+
+int PeerTableModel::getRowByNodeId(NodeId nodeid)
+{
+    std::map<NodeId, int>::iterator it = priv->mapNodeRows.find(nodeid);
+    if (it == priv->mapNodeRows.end())
+        return -1;
+
+    return it->second;
+}
+
+void PeerTableModel::sort(int column, Qt::SortOrder order)
+{
+    priv->sortColumn = column;
+    priv->sortOrder = order;
+    refresh();
+}
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
new file mode 100644
index 000000000000..d947e21240f9
--- /dev/null
+++ b/src/qt/peertablemodel.h
@@ -0,0 +1,79 @@
+// Copyright (c) 2011-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef PEERTABLEMODEL_H
+#define PEERTABLEMODEL_H
+
+#include "main.h"
+#include "net.h"
+
+#include <QAbstractTableModel>
+#include <QStringList>
+
+class PeerTablePriv;
+class ClientModel;
+
+class QTimer;
+
+struct CNodeCombinedStats {
+    CNodeStats nodestats;
+    CNodeStateStats statestats;
+};
+
+class NodeLessThan
+{
+public:
+    NodeLessThan(int nColumn, Qt::SortOrder fOrder):
+        column(nColumn), order(fOrder) {}
+    bool operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const;
+
+private:
+    int column;
+    Qt::SortOrder order;
+};
+
+/**
+   Qt model providing information about connected peers, similar to the
+   "getpeerinfo" RPC call. Used by the rpc console UI.
+ */
+class PeerTableModel : public QAbstractTableModel
+{
+    Q_OBJECT
+
+public:
+    explicit PeerTableModel(ClientModel *parent = 0);
+    const CNodeCombinedStats *getNodeStats(int idx);
+    int getRowByNodeId(NodeId nodeid);
+    void startAutoRefresh(int msecs);
+    void stopAutoRefresh();
+
+    enum ColumnIndex {
+        Address = 0,
+        Subversion = 1,
+        Height = 2
+    };
+
+    /** @name Methods overridden from QAbstractTableModel
+        @{*/
+    int rowCount(const QModelIndex &parent) const;
+    int columnCount(const QModelIndex &parent) const;
+    QVariant data(const QModelIndex &index, int role) const;
+    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+    QModelIndex index(int row, int column, const QModelIndex &parent) const;
+    Qt::ItemFlags flags(const QModelIndex &index) const;
+    void sort(int column, Qt::SortOrder order);
+    /*@}*/
+
+public slots:
+    void refresh();
+
+private:
+    ClientModel *clientModel;
+    QStringList columns;
+    PeerTablePriv *priv;
+    QTimer *timer;
+
+};
+
+#endif // PEERTABLEMODEL_H
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 0a46a722e431..ed048cf3cc60 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -7,6 +7,10 @@
 
 #include "clientmodel.h"
 #include "guiutil.h"
+#include "peertablemodel.h"
+
+#include "main.h"
+#include "util.h"
 
 #include "rpcserver.h"
 #include "rpcclient.h"
@@ -195,6 +199,10 @@ RPCConsole::RPCConsole(QWidget *parent) :
     clientModel(0),
     historyPtr(0)
 {
+    detailNodeStats = CNodeCombinedStats();
+    detailNodeStats.nodestats.nodeid = -1;
+    detailNodeStats.statestats.nMisbehavior = -1;
+
     ui->setupUi(this);
     GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
 
@@ -214,6 +222,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
 
     startExecutor();
     setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
+    ui->detailWidget->hide();
 
     clear();
 }
@@ -277,6 +286,23 @@ void RPCConsole::setClientModel(ClientModel *model)
         updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent());
         connect(model, SIGNAL(bytesChanged(quint64,quint64)), this, SLOT(updateTrafficStats(quint64, quint64)));
 
+        // set up peer table
+        ui->peerWidget->setModel(model->getPeerTableModel());
+        ui->peerWidget->verticalHeader()->hide();
+        ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
+        ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
+        ui->peerWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+        ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);
+        columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(ui->peerWidget, MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH);
+
+        // connect the peerWidget's selection model to our peerSelected() handler
+        QItemSelectionModel *peerSelectModel = ui->peerWidget->selectionModel();
+        connect(peerSelectModel,
+                SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+                this,
+                SLOT(peerSelected(const QItemSelection &, const QItemSelection &)));
+        connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged()));
+
         // Provide initial values
         ui->clientVersion->setText(model->formatFullVersion());
         ui->clientName->setText(model->clientName());
@@ -474,17 +500,7 @@ QString RPCConsole::FormatBytes(quint64 bytes)
 void RPCConsole::setTrafficGraphRange(int mins)
 {
     ui->trafficGraph->setGraphRangeMins(mins);
-    if(mins < 60) {
-        ui->lblGraphRange->setText(QString(tr("%1 m")).arg(mins));
-    } else {
-        int hours = mins / 60;
-        int minsLeft = mins % 60;
-        if(minsLeft == 0) {
-            ui->lblGraphRange->setText(QString(tr("%1 h")).arg(hours));
-        } else {
-            ui->lblGraphRange->setText(QString(tr("%1 h %2 m")).arg(hours).arg(minsLeft));
-        }
-    }
+    ui->lblGraphRange->setText(GUIUtil::formatDurationStr(mins * 60));
 }
 
 void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
@@ -492,3 +508,157 @@ void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
     ui->lblBytesIn->setText(FormatBytes(totalBytesIn));
     ui->lblBytesOut->setText(FormatBytes(totalBytesOut));
 }
+
+void RPCConsole::peerSelected(const QItemSelection &selected, const QItemSelection &deselected)
+{
+    if (selected.indexes().isEmpty())
+        return;
+
+    // mark the cached banscore as unknown
+    detailNodeStats.statestats.nMisbehavior = -1;
+
+    const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(selected.indexes().first().row());
+
+    if (stats)
+    {
+        detailNodeStats.nodestats.nodeid = stats->nodestats.nodeid;
+        updateNodeDetail(stats);
+        ui->detailWidget->show();
+        ui->detailWidget->setDisabled(false);
+    }
+}
+
+void RPCConsole::peerLayoutChanged()
+{
+    const CNodeCombinedStats *stats = NULL;
+    bool fUnselect = false, fReselect = false, fDisconnected = false;
+
+    if (detailNodeStats.nodestats.nodeid == -1)
+        // no node selected yet
+        return;
+
+    // find the currently selected row
+    int selectedRow;
+    QModelIndexList selectedModelIndex = ui->peerWidget->selectionModel()->selectedIndexes();
+    if (selectedModelIndex.isEmpty())
+        selectedRow = -1;
+    else
+        selectedRow = selectedModelIndex.first().row();
+
+    // check if our detail node has a row in the table (it may not necessarily
+    // be at selectedRow since its position can change after a layout change)
+    int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(detailNodeStats.nodestats.nodeid);
+
+    if (detailNodeRow < 0)
+    {
+        // detail node dissapeared from table (node disconnected)
+        fUnselect = true;
+        fDisconnected = true;
+        detailNodeStats.nodestats.nodeid = 0;
+    }
+    else
+    {
+        if (detailNodeRow != selectedRow)
+        {
+            // detail node moved position
+            fUnselect = true;
+            fReselect = true;
+        }
+
+        // get fresh stats on the detail node.
+        stats = clientModel->getPeerTableModel()->getNodeStats(detailNodeRow);
+    }
+
+    if (fUnselect && selectedRow >= 0)
+    {
+        ui->peerWidget->selectionModel()->select(QItemSelection(selectedModelIndex.first(), selectedModelIndex.last()),
+                                                 QItemSelectionModel::Deselect);
+    }
+
+    if (fReselect)
+    {
+        ui->peerWidget->selectRow(detailNodeRow);
+    }
+
+    if (stats)
+        updateNodeDetail(stats);
+
+    if (fDisconnected)
+    {
+        ui->peerHeading->setText(QString(tr("Peer Disconnected")));
+        ui->detailWidget->setDisabled(true);
+        QDateTime dt = QDateTime::fromTime_t(detailNodeStats.nodestats.nLastSend);
+        if (detailNodeStats.nodestats.nLastSend)
+            ui->peerLastSend->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
+        dt.setTime_t(detailNodeStats.nodestats.nLastRecv);
+        if (detailNodeStats.nodestats.nLastRecv)
+            ui->peerLastRecv->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
+        dt.setTime_t(detailNodeStats.nodestats.nTimeConnected);
+        ui->peerConnTime->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
+    }
+}
+
+void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats)
+{
+    CNodeStats stats = combinedStats->nodestats;
+
+    // keep a copy of timestamps, used to display dates upon disconnect
+    detailNodeStats.nodestats.nLastSend = stats.nLastSend;
+    detailNodeStats.nodestats.nLastRecv = stats.nLastRecv;
+    detailNodeStats.nodestats.nTimeConnected = stats.nTimeConnected;
+
+    // update the detail ui with latest node information
+    ui->peerHeading->setText(QString("<b>%1</b>").arg(tr("Node Detail")));
+    ui->peerAddr->setText(QString(stats.addrName.c_str()));
+    ui->peerServices->setText(GUIUtil::formatServicesStr(stats.nServices));
+    ui->peerLastSend->setText(stats.nLastSend ? GUIUtil::formatDurationStr(GetTime() - stats.nLastSend) : tr("never"));
+    ui->peerLastRecv->setText(stats.nLastRecv ? GUIUtil::formatDurationStr(GetTime() - stats.nLastRecv) : tr("never"));
+    ui->peerBytesSent->setText(FormatBytes(stats.nSendBytes));
+    ui->peerBytesRecv->setText(FormatBytes(stats.nRecvBytes));
+    ui->peerConnTime->setText(GUIUtil::formatDurationStr(GetTime() - stats.nTimeConnected));
+    ui->peerPingTime->setText(stats.dPingTime == 0 ? tr("N/A") : QString(tr("%1 secs")).arg(QString::number(stats.dPingTime, 'f', 3)));
+    ui->peerVersion->setText(QString("%1").arg(stats.nVersion));
+    ui->peerSubversion->setText(QString(stats.cleanSubVer.c_str()));
+    ui->peerDirection->setText(stats.fInbound ? tr("Inbound") : tr("Outbound"));
+    ui->peerHeight->setText(QString("%1").arg(stats.nStartingHeight));
+    ui->peerSyncNode->setText(stats.fSyncNode ? tr("Yes") : tr("No"));
+
+    // if we can, display the peer's ban score
+    CNodeStateStats statestats = combinedStats->statestats;
+    if (statestats.nMisbehavior >= 0)
+    {
+        // we have a new nMisbehavor value - update the cache
+        detailNodeStats.statestats.nMisbehavior = statestats.nMisbehavior;
+    }
+
+    // pull the ban score from cache.  -1 means it hasn't been retrieved yet (lock busy).
+    if (detailNodeStats.statestats.nMisbehavior >= 0)
+        ui->peerBanScore->setText(QString("%1").arg(detailNodeStats.statestats.nMisbehavior));
+    else
+        ui->peerBanScore->setText(tr("Fetching..."));
+}
+
+void RPCConsole::resizeEvent(QResizeEvent *event)
+{
+    QWidget::resizeEvent(event);
+    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
+}
+
+void RPCConsole::showEvent(QShowEvent *event)
+{
+    QWidget::showEvent(event);
+
+    // peerWidget needs a resize in case the dialog has non-default geometry
+    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
+
+    // start the PeerTableModel refresh timer
+    clientModel->getPeerTableModel()->startAutoRefresh(1000);
+}
+
+void RPCConsole::hideEvent(QHideEvent *event)
+{
+    QWidget::hideEvent(event);
+
+    // stop PeerTableModel auto refresh
+    clientModel->getPeerTableModel()->stopAutoRefresh();
+}
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 091a6d294f39..c17d5397ecef 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -5,10 +5,18 @@
 #ifndef RPCCONSOLE_H
 #define RPCCONSOLE_H
 
+#include "guiutil.h"
+#include "net.h"
+
+#include "peertablemodel.h"
+
 #include <QDialog>
 
 class ClientModel;
 
+class QItemSelection;
+class CNodeCombinedStats;
+
 namespace Ui {
     class RPCConsole;
 }
@@ -35,6 +43,19 @@ class RPCConsole: public QDialog
 protected:
     virtual bool eventFilter(QObject* obj, QEvent *event);
 
+private:
+    /** show detailed information on ui about selected node */
+    void updateNodeDetail(const CNodeCombinedStats *combinedStats);
+
+    enum ColumnWidths
+    {
+        ADDRESS_COLUMN_WIDTH = 250,
+        MINIMUM_COLUMN_WIDTH = 120
+    };
+
+    /** track the node that we are currently viewing detail on in the peers tab */
+    CNodeCombinedStats detailNodeStats;
+
 private slots:
     void on_lineEdit_returnPressed();
     void on_tabWidget_currentChanged(int index);
@@ -44,6 +65,9 @@ private slots:
     void on_sldGraphRange_valueChanged(int value);
     /** update traffic statistics */
     void updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut);
+    void resizeEvent(QResizeEvent *event);
+    void showEvent(QShowEvent *event);
+    void hideEvent(QHideEvent *event);
 
 public slots:
     void clear();
@@ -57,6 +81,10 @@ public slots:
     void browseHistory(int offset);
     /** Scroll console view to end */
     void scrollToEnd();
+    /** Handle selection of peer in peers list */
+    void peerSelected(const QItemSelection &selected, const QItemSelection &deselected);
+    /** Handle updated peer information */
+    void peerLayoutChanged();
 
 signals:
     // For RPC command executor
@@ -70,6 +98,7 @@ public slots:
     Ui::RPCConsole *ui;
     ClientModel *clientModel;
     QStringList history;
+    GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
     int historyPtr;
 
     void startExecutor();

From bbe1925ce3e627fd405d83e3c947e1f430a1d720 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 3 Jun 2014 14:42:20 +0200
Subject: [PATCH 0109/1819] [Qt] style police and small addition in rpcconsole

- fix spaces, indentation and coding style glitches
---
 src/qt/clientmodel.cpp          |  4 +++-
 src/qt/guiutil.cpp              |  3 +--
 src/qt/guiutil.h                |  1 -
 src/qt/peertablemodel.cpp       |  2 --
 src/qt/peertablemodel.h         |  7 ++++---
 src/qt/receiverequestdialog.cpp |  2 +-
 src/qt/receiverequestdialog.h   |  4 +++-
 src/qt/rpcconsole.cpp           | 15 ++++++++-------
 src/qt/rpcconsole.h             |  8 +++++---
 src/qt/transactiondesc.h        |  1 +
 10 files changed, 26 insertions(+), 21 deletions(-)

diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index ce773e0f822d..1c008428a37e 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -23,7 +23,9 @@
 static const int64_t nClientStartupTime = GetTime();
 
 ClientModel::ClientModel(OptionsModel *optionsModel, QObject *parent) :
-    QObject(parent), optionsModel(optionsModel), peerTableModel(0),
+    QObject(parent),
+    optionsModel(optionsModel),
+    peerTableModel(0),
     cachedNumBlocks(0),
     cachedReindexing(0), cachedImporting(0),
     numBlocksAtStartup(-1), pollTimer(0)
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 62db0487fc88..1922d228c545 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -780,7 +780,7 @@ QString formatServicesStr(uint64_t mask)
     QStringList strList;
 
     // Just scan the last 8 bits for now.
-    for (int i=0; i < 8; i++) {
+    for (int i = 0; i < 8; i++) {
         uint64_t check = 1 << i;
         if (mask & check)
         {
@@ -799,7 +799,6 @@ QString formatServicesStr(uint64_t mask)
         return strList.join(" & ");
     else
         return QObject::tr("None");
-
 }
 
 } // namespace GUIUtil
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index ea6b7de8724a..45c78b4e1475 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -178,7 +178,6 @@ namespace GUIUtil
 
     /* Format CNodeStats.nServices bitmask into a user-readable string */
     QString formatServicesStr(uint64_t mask);
-
 } // namespace GUIUtil
 
 #endif // GUIUTIL_H
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index fba9d84e7727..db5ce639b1b8 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -81,7 +81,6 @@ class PeerTablePriv
             }
         }
 
-
         if (sortColumn >= 0)
             // sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily)
             qStableSort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder));
@@ -110,7 +109,6 @@ class PeerTablePriv
             return 0;
         }
     }
-
 };
 
 PeerTableModel::PeerTableModel(ClientModel *parent) :
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index d947e21240f9..385bf0e0c189 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -11,10 +11,12 @@
 #include <QAbstractTableModel>
 #include <QStringList>
 
-class PeerTablePriv;
 class ClientModel;
+class PeerTablePriv;
 
+QT_BEGIN_NAMESPACE
 class QTimer;
+QT_END_NAMESPACE
 
 struct CNodeCombinedStats {
     CNodeStats nodestats;
@@ -24,7 +26,7 @@ struct CNodeCombinedStats {
 class NodeLessThan
 {
 public:
-    NodeLessThan(int nColumn, Qt::SortOrder fOrder):
+    NodeLessThan(int nColumn, Qt::SortOrder fOrder) :
         column(nColumn), order(fOrder) {}
     bool operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const;
 
@@ -73,7 +75,6 @@ public slots:
     QStringList columns;
     PeerTablePriv *priv;
     QTimer *timer;
-
 };
 
 #endif // PEERTABLEMODEL_H
diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
index 062638f2bc47..d8dad15c0d50 100644
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -13,10 +13,10 @@
 
 #include <QClipboard>
 #include <QDrag>
+#include <QMenu>
 #include <QMimeData>
 #include <QMouseEvent>
 #include <QPixmap>
-#include <QMenu>
 #if QT_VERSION < 0x050000
 #include <QUrl>
 #endif
diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h
index 5614ac635a22..9b78e495c364 100644
--- a/src/qt/receiverequestdialog.h
+++ b/src/qt/receiverequestdialog.h
@@ -11,10 +11,12 @@
 #include <QImage>
 #include <QLabel>
 
+class OptionsModel;
+
 namespace Ui {
     class ReceiveRequestDialog;
 }
-class OptionsModel;
+
 QT_BEGIN_NAMESPACE
 class QMenu;
 QT_END_NAMESPACE
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index ed048cf3cc60..3b7d37ff3919 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -10,10 +10,9 @@
 #include "peertablemodel.h"
 
 #include "main.h"
-#include "util.h"
-
 #include "rpcserver.h"
 #include "rpcclient.h"
+#include "util.h"
 
 #include "json/json_spirit_value.h"
 #include <openssl/crypto.h>
@@ -297,10 +296,8 @@ void RPCConsole::setClientModel(ClientModel *model)
 
         // connect the peerWidget's selection model to our peerSelected() handler
         QItemSelectionModel *peerSelectModel = ui->peerWidget->selectionModel();
-        connect(peerSelectModel,
-                SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
-                this,
-                SLOT(peerSelected(const QItemSelection &, const QItemSelection &)));
+        connect(peerSelectModel, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+             this, SLOT(peerSelected(const QItemSelection &, const QItemSelection &)));
         connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged()));
 
         // Provide initial values
@@ -511,6 +508,8 @@ void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
 
 void RPCConsole::peerSelected(const QItemSelection &selected, const QItemSelection &deselected)
 {
+    Q_UNUSED(deselected);
+
     if (selected.indexes().isEmpty())
         return;
 
@@ -638,6 +637,8 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats)
         ui->peerBanScore->setText(tr("Fetching..."));
 }
 
+// We override the virtual resizeEvent of the QWidget to adjust tables column
+// sizes as the tables width is proportional to the dialogs width.
 void RPCConsole::resizeEvent(QResizeEvent *event)
 {
     QWidget::resizeEvent(event);
@@ -651,7 +652,7 @@ void RPCConsole::showEvent(QShowEvent *event)
     // peerWidget needs a resize in case the dialog has non-default geometry
     columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
 
-    // start the PeerTableModel refresh timer
+    // start PeerTableModel auto refresh
     clientModel->getPeerTableModel()->startAutoRefresh(1000);
 }
 
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index c17d5397ecef..3fee34d00ef8 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -6,16 +6,18 @@
 #define RPCCONSOLE_H
 
 #include "guiutil.h"
-#include "net.h"
-
 #include "peertablemodel.h"
 
+#include "net.h"
+
 #include <QDialog>
 
 class ClientModel;
+class CNodeCombinedStats;
 
+QT_BEGIN_NAMESPACE
 class QItemSelection;
-class CNodeCombinedStats;
+QT_END_NAMESPACE
 
 namespace Ui {
     class RPCConsole;
diff --git a/src/qt/transactiondesc.h b/src/qt/transactiondesc.h
index f5a1328a71ae..4bd429321069 100644
--- a/src/qt/transactiondesc.h
+++ b/src/qt/transactiondesc.h
@@ -9,6 +9,7 @@
 #include <QString>
 
 class TransactionRecord;
+
 class CWallet;
 class CWalletTx;
 

From 06a91d9698762fe56fca3bd33484bddc9f020405 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Fri, 23 May 2014 18:04:09 +0200
Subject: [PATCH 0110/1819] VerifyDB progress

---
 src/init.cpp            |  2 +-
 src/main.cpp            | 14 +++++++++++++-
 src/main.h              | 11 +++++++++--
 src/qt/bitcoingui.cpp   | 27 +++++++++++++++++++++++++++
 src/qt/bitcoingui.h     |  5 +++++
 src/qt/clientmodel.cpp  | 10 ++++++++++
 src/qt/clientmodel.h    |  3 +++
 src/qt/splashscreen.cpp |  2 ++
 src/rpcblockchain.cpp   |  2 +-
 src/ui_interface.h      |  3 +++
 10 files changed, 74 insertions(+), 5 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index bc4924b48dca..840a07d610b0 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -858,7 +858,7 @@ bool AppInit2(boost::thread_group& threadGroup)
                 }
 
                 uiInterface.InitMessage(_("Verifying blocks..."));
-                if (!VerifyDB(GetArg("-checklevel", 3),
+                if (!CVerifyDB().VerifyDB(GetArg("-checklevel", 3),
                               GetArg("-checkblocks", 288))) {
                     strLoadError = _("Corrupted block database detected");
                     break;
diff --git a/src/main.cpp b/src/main.cpp
index 18c00d90acb7..30fa9c6d7039 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2968,7 +2968,17 @@ bool static LoadBlockIndexDB()
     return true;
 }
 
-bool VerifyDB(int nCheckLevel, int nCheckDepth)
+CVerifyDB::CVerifyDB()
+{
+    uiInterface.ShowProgress(_("Verifying blocks..."), 0);
+}
+
+CVerifyDB::~CVerifyDB()
+{
+    uiInterface.ShowProgress("", 100);
+}
+
+bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
 {
     LOCK(cs_main);
     if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
@@ -2989,6 +2999,7 @@ bool VerifyDB(int nCheckLevel, int nCheckDepth)
     for (CBlockIndex* pindex = chainActive.Tip(); pindex && pindex->pprev; pindex = pindex->pprev)
     {
         boost::this_thread::interruption_point();
+        uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100)))));
         if (pindex->nHeight < chainActive.Height()-nCheckDepth)
             break;
         CBlock block;
@@ -3028,6 +3039,7 @@ bool VerifyDB(int nCheckLevel, int nCheckDepth)
         CBlockIndex *pindex = pindexState;
         while (pindex != chainActive.Tip()) {
             boost::this_thread::interruption_point();
+            uiInterface.ShowProgress(_("Verifying blocks..."), std::max(1, std::min(99, 100 - (int)(((double)(chainActive.Height() - pindex->nHeight)) / (double)nCheckDepth * 50))));
             pindex = chainActive.Next(pindex);
             CBlock block;
             if (!ReadBlockFromDisk(block, pindex))
diff --git a/src/main.h b/src/main.h
index 8a05eb60d220..42cf4a0861fa 100644
--- a/src/main.h
+++ b/src/main.h
@@ -144,8 +144,6 @@ bool InitBlockIndex();
 bool LoadBlockIndex();
 /** Unload database information */
 void UnloadBlockIndex();
-/** Verify consistency of the block and coin databases */
-bool VerifyDB(int nCheckLevel, int nCheckDepth);
 /** Print the loaded block tree */
 void PrintBlockTree();
 /** Process protocol messages received from a given node */
@@ -1024,6 +1022,15 @@ class CValidationState {
     std::string GetRejectReason() const { return strRejectReason; }
 };
 
+/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
+class CVerifyDB {
+public:
+
+    CVerifyDB();
+    ~CVerifyDB();
+    bool VerifyDB(int nCheckLevel, int nCheckDepth);
+};
+
 /** An in-memory indexed chain of blocks. */
 class CChain {
 private:
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 68ae8b4668ec..3469f990ac7b 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -40,6 +40,7 @@
 #include <QMessageBox>
 #include <QMimeData>
 #include <QProgressBar>
+#include <QProgressDialog>
 #include <QSettings>
 #include <QStackedWidget>
 #include <QStatusBar>
@@ -409,6 +410,9 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
         // Receive and report messages from client model
         connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
 
+        // Show progress dialog
+        connect(clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
+
         rpcConsole->setClientModel(clientModel);
 #ifdef ENABLE_WALLET
         if(walletFrame)
@@ -949,6 +953,29 @@ void BitcoinGUI::detectShutdown()
     }
 }
 
+void BitcoinGUI::showProgress(const QString &title, int nProgress)
+{
+    if (nProgress == 0)
+    {
+        progressDialog = new QProgressDialog(title, "", 0, 100);
+        progressDialog->setWindowModality(Qt::ApplicationModal);
+        progressDialog->setMinimumDuration(0);
+        progressDialog->setCancelButton(0);
+        progressDialog->setAutoClose(false);
+        progressDialog->setValue(0);
+    }
+    else if (nProgress == 100)
+    {
+        if (progressDialog)
+        {
+            progressDialog->close();
+            progressDialog->deleteLater();
+        }
+    }
+    else if (progressDialog)
+        progressDialog->setValue(nProgress);
+}
+
 static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
 {
     bool modal = (style & CClientUIInterface::MODAL);
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index b4675b95ac56..275fa35f3942 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -26,6 +26,7 @@ QT_BEGIN_NAMESPACE
 class QAction;
 class QLabel;
 class QProgressBar;
+class QProgressDialog;
 QT_END_NAMESPACE
 
 /**
@@ -73,6 +74,7 @@ class BitcoinGUI : public QMainWindow
     QLabel *labelBlocksIcon;
     QLabel *progressBarLabel;
     QProgressBar *progressBar;
+    QProgressDialog *progressDialog;
 
     QMenuBar *appMenuBar;
     QAction *overviewAction;
@@ -191,6 +193,9 @@ private slots:
 
     /** called by a timer to check if fRequestShutdown has been set **/
     void detectShutdown();
+
+    /** Show progress dialog e.g. for verifychain */
+    void showProgress(const QString &title, int nProgress);
 };
 
 #endif // BITCOINGUI_H
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index ce773e0f822d..656c8bd11384 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -206,6 +206,14 @@ QString ClientModel::formatClientStartupTime() const
 }
 
 // Handlers for core signals
+static void ShowProgress(ClientModel *clientmodel, const std::string &title, int nProgress)
+{
+    // emits signal "showProgress"
+    QMetaObject::invokeMethod(clientmodel, "showProgress", Qt::QueuedConnection,
+                              Q_ARG(QString, QString::fromStdString(title)),
+                              Q_ARG(int, nProgress));
+}
+
 static void NotifyBlocksChanged(ClientModel *clientmodel)
 {
     // This notification is too frequent. Don't trigger a signal.
@@ -230,6 +238,7 @@ static void NotifyAlertChanged(ClientModel *clientmodel, const uint256 &hash, Ch
 void ClientModel::subscribeToCoreSignals()
 {
     // Connect signals to client
+    uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
     uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this));
     uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
     uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
@@ -238,6 +247,7 @@ void ClientModel::subscribeToCoreSignals()
 void ClientModel::unsubscribeFromCoreSignals()
 {
     // Disconnect signals from client
+    uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
     uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this));
     uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
     uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index c18d30178b9b..9c9a35b6547d 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -95,6 +95,9 @@ class ClientModel : public QObject
     //! Fired when a message should be reported to the user
     void message(const QString &title, const QString &message, unsigned int style);
 
+    // Show progress dialog e.g. for verifychain
+    void showProgress(const QString &title, int nProgress);
+
 public slots:
     void updateTimer();
     void updateNumConnections(int numConnections);
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 7c79b0efd0fd..1162e2d87f5a 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -129,6 +129,7 @@ void SplashScreen::subscribeToCoreSignals()
 {
     // Connect signals to client
     uiInterface.InitMessage.connect(boost::bind(InitMessage, this, _1));
+    uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
 #ifdef ENABLE_WALLET
     uiInterface.LoadWallet.connect(boost::bind(ConnectWallet, this, _1));
 #endif
@@ -138,6 +139,7 @@ void SplashScreen::unsubscribeFromCoreSignals()
 {
     // Disconnect signals from client
     uiInterface.InitMessage.disconnect(boost::bind(InitMessage, this, _1));
+    uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
 #ifdef ENABLE_WALLET
     if(pwalletMain)
         pwalletMain->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index a303b5d3eff2..ff5057b526f2 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -427,7 +427,7 @@ Value verifychain(const Array& params, bool fHelp)
     if (params.size() > 1)
         nCheckDepth = params[1].get_int();
 
-    return VerifyDB(nCheckLevel, nCheckDepth);
+    return CVerifyDB().VerifyDB(nCheckLevel, nCheckDepth);
 }
 
 Value getblockchaininfo(const Array& params, bool fHelp)
diff --git a/src/ui_interface.h b/src/ui_interface.h
index 7b655ac9517e..e1a3e04e12f1 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -94,6 +94,9 @@ class CClientUIInterface
 
     /** A wallet has been loaded. */
     boost::signals2::signal<void (CWallet* wallet)> LoadWallet;
+
+    /** Show progress e.g. for verifychain */
+    boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
 };
 
 extern CClientUIInterface uiInterface;

From a98b8707dc5606a5c119a123b1b66d5e7ab5a815 Mon Sep 17 00:00:00 2001
From: Giuseppe Mazzotta <gdm85@users.noreply.github.com>
Date: Tue, 3 Jun 2014 11:40:24 +0200
Subject: [PATCH 0111/1819] Some documentation fixes + link to my Docker/LXC
 guide

I added a link to my guide about using docker containers + LXC (I am planning to maintain this at work
for future bitcoin versions), then I mentioned other virtualization options (KVM, LXC).
This commit includes a fix issue for documentation issue #4269 that consists in telling users to
checkout correct bitcoin version before using the gitian descriptors (otherwise all hell can break loose).
Also, I replaced URL for Debian 7.4 ISO with a correct one and added link to official Debian ISO sources.
---
 doc/gitian-building.md | 43 +++++++++++++++++++++---------------------
 1 file changed, 22 insertions(+), 21 deletions(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 544bbc12c160..378a45eda539 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -34,19 +34,22 @@ Table of Contents
 - [Signing externally](#signing-externally)
 - [Uploading signatures](#uploading-signatures)
 
-Create a new VirtualBox VM
----------------------------
+Preparing the Gitian builder host
+---------------------------------
 
-The first step is to create a new Virtual Machine, which will be explained in
-this section.  This VM will be used to do the Gitian builds. In this guide it
-will be explained how to set up the environment, and how to get the builds
-started.
+The first step is to prepare the host environment that will be used to perform the Gitian builds.
+In this guide it is explained how to set up the environment, and how to get the builds started.
 
-Debian Linux was chosen as the host distribution because it has a lightweight install (in
-contrast to Ubuntu) and is readily available. We here show the steps for
-VirtualBox [1], but any kind of virtualization can be used. You can also install
-on actual hardware instead of using a VM, in this case you can skip this section.
+Debian Linux was chosen as the host distribution because it has a lightweight install (in contrast to Ubuntu) and is readily available.
+Any kind of virtualization can be used, for example:
+- [VirtualBox](https://www.virtualbox.org/), covered by this guide
+- [KVM](http://www.linux-kvm.org/page/Main_Page)
+- [LXC](https://linuxcontainers.org/), see also [Gitian host docker container](https://github.com/gdm85/tenku/tree/master/docker/gitian-bitcoin-host/README.md).
 
+You can also install on actual hardware instead of using virtualization.
+
+Create a new VirtualBox VM
+---------------------------
 In the VirtualBox GUI click "Create" and choose the following parameters in the wizard:
 
 ![](gitian-building/create_vm_page1.png)
@@ -74,11 +77,11 @@ In the VirtualBox GUI click "Create" and choose the following parameters in the
 - Disk size: at least 40GB; as low as 20GB *may* be possible, but better to err on the safe side 
 - Push the `Create` button
 
-Get the [Debian 7.4 net installer](http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-cd/debian-7.4.0-amd64-netinst.iso).
+Get the [Debian 7.4 net installer](http://ftp.at.debian.org/debian-jigdo/current/amd64/iso-cd/debian-7.4.0-amd64-netinst.iso) (a more recent minor version should also work, see also [Debian Network installation](https://www.debian.org/CD/netinst/)).
 This DVD image can be validated using a SHA256 hashing tool, for example on
 Unixy OSes by entering the following in a terminal:
 
-    echo "b712a141bc60269db217d3b3e456179bd6b181645f90e4aac9c42ed63de492e9  /home/orion/Downloads/debian-7.4.0-amd64-netinst.iso" | sha256sum -c
+    echo "b712a141bc60269db217d3b3e456179bd6b181645f90e4aac9c42ed63de492e9  debian-7.4.0-amd64-netinst.iso" | sha256sum -c
     # (must return OK)
 
 After creating the VM, we need to configure it. 
@@ -106,8 +109,6 @@ Then start the VM. On the first launch you will be asked for a CD or DVD image.
 
 ![](gitian-building/select_startup_disk.png)
 
-[1] https://www.virtualbox.org/
-
 Installing Debian
 ------------------
 
@@ -279,11 +280,14 @@ cd ..
 
 **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
 
-Clone the git repositories for bitcoin and gitian,
+Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you are willing to build.
 
 ```bash
 git clone https://github.com/devrandom/gitian-builder.git
 git clone https://github.com/bitcoin/bitcoin
+cd bitcoin
+git checkout v${VERSION}
+cd ..
 ```
 
 Setting up gitian images
@@ -402,9 +406,6 @@ gitian build.
 Uploading signatures
 ---------------------
 
-After building and signing you can push your signatures (both the `.assert` and
-`.assert.sig` files) to the
-[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or
-if not possible create a pull request. You can also mail the files to me
-(laanwj@gmail.com) and I'll commit them.
-
+After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
+[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if not possible create a pull
+request. You can also mail the files to me (laanwj@gmail.com) and I'll commit them.

From d04fd3e2afaf9cdab21aa8f3abb5a5a2c48118cc Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 3 Jun 2014 12:55:33 -0400
Subject: [PATCH 0112/1819] CWallet: fix nTimeFirstKey init, by making
 constructor init common code

Don't repeat yourself etc.
---
 src/wallet.h | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/wallet.h b/src/wallet.h
index d9d071c2b96f..8e2917188a33 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -143,27 +143,26 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     CWallet()
     {
-        nWalletVersion = FEATURE_BASE;
-        nWalletMaxVersion = FEATURE_BASE;
-        fFileBacked = false;
-        nMasterKeyMaxID = 0;
-        pwalletdbEncryption = NULL;
-        nOrderPosNext = 0;
-        nNextResend = 0;
-        nLastResend = 0;
-        nTimeFirstKey = 0;
+        SetNull();
     }
     CWallet(std::string strWalletFileIn)
     {
-        nWalletVersion = FEATURE_BASE;
-        nWalletMaxVersion = FEATURE_BASE;
+        SetNull();
+
         strWalletFile = strWalletFileIn;
         fFileBacked = true;
+    }
+    void SetNull()
+    {
+        nWalletVersion = FEATURE_BASE;
+        nWalletMaxVersion = FEATURE_BASE;
+        fFileBacked = false;
         nMasterKeyMaxID = 0;
         pwalletdbEncryption = NULL;
         nOrderPosNext = 0;
         nNextResend = 0;
         nLastResend = 0;
+        nTimeFirstKey = 0;
     }
 
     std::map<uint256, CWalletTx> mapWallet;

From 4a09e1df51267c6d2dec219c6f96a24b716cc251 Mon Sep 17 00:00:00 2001
From: Andrew Poelstra <asp11@sfu.ca>
Date: Mon, 2 Jun 2014 16:21:03 -0700
Subject: [PATCH 0113/1819] key.cpp: fail with a friendlier message on missing
 ssl EC support

Previously if bitcoind is linked with an OpenSSL which is compiled
without EC support, this is seen as an assertion failure "pKey !=
NULL" at key.cpp:134, which occurs after several seconds. It is an
esoteric piece of knowledge to interpret this as "oops, I linked
with the wrong OpenSSL", and because of the delay it may not even
be noticed.

The new output is

: OpenSSL appears to lack support for elliptic curve cryptography. For
more information, visit
https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries
: Initialization sanity check failed. Bitcoin Core is shutting down.

which occurs immediately after attempted startup.

This also blocks in an InitSanityCheck() function which currently only
checks for EC support but should eventually do more. See #4081.
---
 src/init.cpp | 21 +++++++++++++++++++++
 src/key.cpp  | 12 ++++++++++++
 src/key.h    |  3 +++
 3 files changed, 36 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index bc4924b48dca..b66231ff2ce6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -11,6 +11,7 @@
 
 #include "addrman.h"
 #include "checkpoints.h"
+#include "key.h"
 #include "main.h"
 #include "miner.h"
 #include "net.h"
@@ -385,6 +386,23 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
     }
 }
 
+/** Sanity checks
+ *  Ensure that Bitcoin is running in a usable environment with all
+ *  necessary library support.
+ */
+bool InitSanityCheck(void)
+{
+    if(!ECC_InitSanityCheck()) {
+        InitError("OpenSSL appears to lack support for elliptic curve cryptography. For more "
+                  "information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries");
+        return false;
+    }
+
+    // TODO: remaining sanity checks, see #4081
+
+    return true;
+}
+
 /** Initialize bitcoin.
  *  @pre Parameters should be parsed and config file should be read.
  */
@@ -586,6 +604,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     strWalletFile = GetArg("-wallet", "wallet.dat");
 #endif
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
+    // Sanity check
+    if (!InitSanityCheck())
+        return InitError(_("Initialization sanity check failed. Bitcoin Core is shutting down."));
 
     std::string strDataDir = GetDataDir().string();
 #ifdef ENABLE_WALLET
diff --git a/src/key.cpp b/src/key.cpp
index aa24f0a62274..4747beffb4ed 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -631,3 +631,15 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int nChild) const {
     out.nChild = nChild;
     return pubkey.Derive(out.pubkey, out.vchChainCode, nChild, vchChainCode);
 }
+
+bool ECC_InitSanityCheck() {
+    EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
+    if(pkey == NULL)
+        return false;
+    EC_KEY_free(pkey);
+
+    // TODO Is there more EC functionality that could be missing?
+    return true;
+}
+
+
diff --git a/src/key.h b/src/key.h
index 983775fd2310..11dc65de8ccb 100644
--- a/src/key.h
+++ b/src/key.h
@@ -306,4 +306,7 @@ struct CExtKey {
     void SetMaster(const unsigned char *seed, unsigned int nSeedLen);
 };
 
+/** Check that required EC support is available at runtime */
+bool ECC_InitSanityCheck(void);
+
 #endif

From 71aaff393f06378150612fc618b6c3f84c1d2066 Mon Sep 17 00:00:00 2001
From: Kosta Zertsekel <zertsekel@gmail.com>
Date: Wed, 4 Jun 2014 07:36:45 +0300
Subject: [PATCH 0114/1819] Remove double-dash parameters from mapArgs

Should be merged after pull request #4281
("Add `-version` option to get just the version #4281"),
because is changed "--help" to "-help".

Checked that grep of 'mapArgs.count("--' returned only
three places that are fixed by pull request #4281.
---
 src/util.cpp | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 205af738d5d3..752ebb7bf12d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -459,6 +459,7 @@ void ParseParameters(int argc, const char* const argv[])
 {
     mapArgs.clear();
     mapMultiArgs.clear();
+
     for (int i = 1; i < argc; i++)
     {
         std::string str(argv[i]);
@@ -474,9 +475,15 @@ void ParseParameters(int argc, const char* const argv[])
         if (boost::algorithm::starts_with(str, "/"))
             str = "-" + str.substr(1);
 #endif
+
         if (str[0] != '-')
             break;
 
+        // Interpret --foo as -foo.
+        // If both --foo and -foo are set, the last takes effect.
+        if (str.length() > 1 && str[1] == '-')
+            str = str.substr(1);
+
         mapArgs[str] = strValue;
         mapMultiArgs[str].push_back(strValue);
     }
@@ -484,19 +491,8 @@ void ParseParameters(int argc, const char* const argv[])
     // New 0.6 features:
     BOOST_FOREACH(const PAIRTYPE(string,string)& entry, mapArgs)
     {
-        string name = entry.first;
-
-        //  interpret --foo as -foo (as long as both are not set)
-        if (name.find("--") == 0)
-        {
-            std::string singleDash(name.begin()+1, name.end());
-            if (mapArgs.count(singleDash) == 0)
-                mapArgs[singleDash] = entry.second;
-            name = singleDash;
-        }
-
         // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set
-        InterpretNegativeSetting(name, mapArgs);
+        InterpretNegativeSetting(entry.first, mapArgs);
     }
 }
 

From 1712adbe0b084b6907b82db350a51ab44f8c3117 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 7 Mar 2014 17:59:30 -0800
Subject: [PATCH 0115/1819] Add MiningRequiresPeers chain parameter

---
 src/chainparams.cpp | 1 +
 src/chainparams.h   | 2 ++
 src/miner.cpp       | 5 +++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f5cf846a01b0..ff104e7c8450 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -246,6 +246,7 @@ class CRegTestParams : public CTestNetParams {
     }
 
     virtual bool RequireRPCPassword() const { return false; }
+    virtual bool MiningRequiresPeers() const { return false; }
     virtual Network NetworkID() const { return CChainParams::REGTEST; }
 };
 static CRegTestParams regTestParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index 5600b904ccdc..a73279fe67a2 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -59,6 +59,8 @@ class CChainParams
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
     virtual const CBlock& GenesisBlock() const = 0;
     virtual bool RequireRPCPassword() const { return true; }
+    /* Make miner wait to have peers to avoid wasting work */
+    virtual bool MiningRequiresPeers() const { return true; }
     const string& DataDir() const { return strDataDir; }
     virtual Network NetworkID() const = 0;
     const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
diff --git a/src/miner.cpp b/src/miner.cpp
index 94fc8e38885e..3d46a0d83e82 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -512,7 +512,7 @@ void static BitcoinMiner(CWallet *pwallet)
     unsigned int nExtraNonce = 0;
 
     try { while (true) {
-        if (Params().NetworkID() != CChainParams::REGTEST) {
+        if (Params().MiningRequiresPeers()) {
             // Busy-wait for the network to come online so we don't waste time mining
             // on an obsolete chain. In regtest mode we expect to fly solo.
             while (vNodes.empty())
@@ -620,7 +620,8 @@ void static BitcoinMiner(CWallet *pwallet)
 
             // Check for stop or if block needs to be rebuilt
             boost::this_thread::interruption_point();
-            if (vNodes.empty() && Params().NetworkID() != CChainParams::REGTEST)
+            // Regtest mode doesn't require peers
+            if (vNodes.empty() && Params().MiningRequiresPeers())
                 break;
             if (nBlockNonce >= 0xffff0000)
                 break;

From bfa9a1a638d69ec3edc2473eef5f2eee43af5a9d Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sun, 9 Mar 2014 13:36:55 -0700
Subject: [PATCH 0116/1819] Add MineBlocksOnDemand chain parameter

---
 src/chainparams.cpp | 1 +
 src/chainparams.h   | 3 +++
 src/miner.cpp       | 5 ++---
 src/rpcmining.cpp   | 2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index ff104e7c8450..d7205fa5cbb9 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -247,6 +247,7 @@ class CRegTestParams : public CTestNetParams {
 
     virtual bool RequireRPCPassword() const { return false; }
     virtual bool MiningRequiresPeers() const { return false; }
+    virtual bool MineBlocksOnDemand() const { return true; }
     virtual Network NetworkID() const { return CChainParams::REGTEST; }
 };
 static CRegTestParams regTestParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index a73279fe67a2..d76b1a22806c 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -62,6 +62,9 @@ class CChainParams
     /* Make miner wait to have peers to avoid wasting work */
     virtual bool MiningRequiresPeers() const { return true; }
     const string& DataDir() const { return strDataDir; }
+    /* Make miner stop after a block is found. In RPC, don't return
+     * until nGenProcLimit blocks are generated */
+    virtual bool MineBlocksOnDemand() const { return false; }
     virtual Network NetworkID() const = 0;
     const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char> &Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
diff --git a/src/miner.cpp b/src/miner.cpp
index 3d46a0d83e82..e980fdc42d3d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -580,9 +580,8 @@ void static BitcoinMiner(CWallet *pwallet)
                     CheckWork(pblock, *pwallet, reservekey);
                     SetThreadPriority(THREAD_PRIORITY_LOWEST);
 
-                    // In regression test mode, stop mining after a block is found. This
-                    // allows developers to controllably generate a block on demand.
-                    if (Params().NetworkID() == CChainParams::REGTEST)
+                    // In regression test mode, stop mining after a block is found.
+                    if (Params().MineBlocksOnDemand())
                         throw boost::thread_interrupted();
 
                     break;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 23876c603dec..70adae146732 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -174,7 +174,7 @@ Value setgenerate(const Array& params, bool fHelp)
     }
 
     // -regtest mode: don't return until nGenProcLimit blocks are generated
-    if (fGenerate && Params().NetworkID() == CChainParams::REGTEST)
+    if (fGenerate && Params().MineBlocksOnDemand())
     {
         int nHeightStart = 0;
         int nHeightEnd = 0;

From 2595b9ac23735649f4601c27924821641611696e Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 7 Mar 2014 22:47:56 -0800
Subject: [PATCH 0117/1819] Add DefaultMinerThreads chain parameter

---
 src/chainparams.cpp | 2 ++
 src/chainparams.h   | 3 +++
 src/miner.cpp       | 5 +++--
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index d7205fa5cbb9..64723978bb84 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -112,6 +112,7 @@ class CMainParams : public CChainParams {
         nRPCPort = 8332;
         bnProofOfWorkLimit = ~uint256(0) >> 32;
         nSubsidyHalvingInterval = 210000;
+        nMinerThreads = 0;
 
         // Build the genesis block. Note that the output of the genesis coinbase cannot
         // be spent as it did not originally exist in the database.
@@ -233,6 +234,7 @@ class CRegTestParams : public CTestNetParams {
         pchMessageStart[2] = 0xb5;
         pchMessageStart[3] = 0xda;
         nSubsidyHalvingInterval = 150;
+        nMinerThreads = 1;
         bnProofOfWorkLimit = ~uint256(0) >> 1;
         genesis.nTime = 1296688602;
         genesis.nBits = 0x207fffff;
diff --git a/src/chainparams.h b/src/chainparams.h
index d76b1a22806c..f331d956fe77 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -57,6 +57,8 @@ class CChainParams
     int GetDefaultPort() const { return nDefaultPort; }
     const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
+    /* Used if GenerateBitcoins is called with a negative number of threads */
+    int DefaultMinerThreads() const { return nMinerThreads; }
     virtual const CBlock& GenesisBlock() const = 0;
     virtual bool RequireRPCPassword() const { return true; }
     /* Make miner wait to have peers to avoid wasting work */
@@ -82,6 +84,7 @@ class CChainParams
     uint256 bnProofOfWorkLimit;
     int nSubsidyHalvingInterval;
     string strDataDir;
+    int nMinerThreads;
     vector<CDNSSeedData> vSeeds;
     std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
 };
diff --git a/src/miner.cpp b/src/miner.cpp
index e980fdc42d3d..44c2faaa4c1f 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -652,8 +652,9 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
     static boost::thread_group* minerThreads = NULL;
 
     if (nThreads < 0) {
-        if (Params().NetworkID() == CChainParams::REGTEST)
-            nThreads = 1;
+        // In regtest threads defaults to 1
+        if (Params().DefaultMinerThreads())
+            nThreads = Params().DefaultMinerThreads();
         else
             nThreads = boost::thread::hardware_concurrency();
     }

From cb9bd83bba86e73e3720110ce47600b6f895573c Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sun, 9 Mar 2014 18:35:41 -0700
Subject: [PATCH 0118/1819] Add DefaultCheckMemPool chain parameter

---
 src/chainparams.cpp | 1 +
 src/chainparams.h   | 2 ++
 src/init.cpp        | 3 ++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 64723978bb84..75a14c6013d1 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -250,6 +250,7 @@ class CRegTestParams : public CTestNetParams {
     virtual bool RequireRPCPassword() const { return false; }
     virtual bool MiningRequiresPeers() const { return false; }
     virtual bool MineBlocksOnDemand() const { return true; }
+    virtual bool DefaultCheckMemPool() const { return true; }
     virtual Network NetworkID() const { return CChainParams::REGTEST; }
 };
 static CRegTestParams regTestParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index f331d956fe77..bc982ee04013 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -63,6 +63,8 @@ class CChainParams
     virtual bool RequireRPCPassword() const { return true; }
     /* Make miner wait to have peers to avoid wasting work */
     virtual bool MiningRequiresPeers() const { return true; }
+    /* Default value for -checkmempool argument */
+    virtual bool DefaultCheckMemPool() const { return false; }
     const string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
diff --git a/src/init.cpp b/src/init.cpp
index 840a07d610b0..a225c3f964c4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -517,7 +517,8 @@ bool AppInit2(boost::thread_group& threadGroup)
         InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
 
     fBenchmark = GetBoolArg("-benchmark", false);
-    mempool.setSanityCheck(GetBoolArg("-checkmempool", RegTest()));
+    // Checkmempool defaults to true in regtest mode
+    mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultCheckMemPool()));
     Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
 
     // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency

From 8d26721498eb608b1ee5fd4d10083739a77b5905 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 7 Mar 2014 23:06:22 -0800
Subject: [PATCH 0119/1819] Get rid of RegTest()

---
 src/chainparams.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/src/chainparams.h b/src/chainparams.h
index bc982ee04013..f0c90bf50f3f 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -111,8 +111,4 @@ inline bool TestNet() {
     return Params().NetworkID() == CChainParams::TESTNET;
 }
 
-inline bool RegTest() {
-    return Params().NetworkID() == CChainParams::REGTEST;
-}
-
 #endif

From d754f34e8d470d5d89e2bc31ff1ab60ae5889266 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 19:52:26 +0100
Subject: [PATCH 0120/1819] Move majority constants to chainparams

---
 src/chainparams.cpp |  9 +++++++++
 src/chainparams.h   |  8 ++++++++
 src/main.cpp        | 34 ++++++++++++++--------------------
 src/main.h          |  5 +++--
 4 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 75a14c6013d1..86d80629eb3f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -112,6 +112,9 @@ class CMainParams : public CChainParams {
         nRPCPort = 8332;
         bnProofOfWorkLimit = ~uint256(0) >> 32;
         nSubsidyHalvingInterval = 210000;
+        nEnforceBlockUpgradeMajority = 750;
+        nRejectBlockOutdatedMajority = 950;
+        nToCheckBlockUpgradeMajority = 1000;
         nMinerThreads = 0;
 
         // Build the genesis block. Note that the output of the genesis coinbase cannot
@@ -199,6 +202,9 @@ class CTestNetParams : public CMainParams {
         vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a");
         nDefaultPort = 18333;
         nRPCPort = 18332;
+        nEnforceBlockUpgradeMajority = 51;
+        nRejectBlockOutdatedMajority = 75;
+        nToCheckBlockUpgradeMajority = 100;
         strDataDir = "testnet3";
 
         // Modify the testnet genesis block so the timestamp is valid for a later start.
@@ -234,6 +240,9 @@ class CRegTestParams : public CTestNetParams {
         pchMessageStart[2] = 0xb5;
         pchMessageStart[3] = 0xda;
         nSubsidyHalvingInterval = 150;
+        nEnforceBlockUpgradeMajority = 750;
+        nRejectBlockOutdatedMajority = 950;
+        nToCheckBlockUpgradeMajority = 1000;
         nMinerThreads = 1;
         bnProofOfWorkLimit = ~uint256(0) >> 1;
         genesis.nTime = 1296688602;
diff --git a/src/chainparams.h b/src/chainparams.h
index f0c90bf50f3f..f400907d73c5 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -57,6 +57,11 @@ class CChainParams
     int GetDefaultPort() const { return nDefaultPort; }
     const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
+    /* Used to check majorities for block version upgrade */
+    int EnforceBlockUpgradeMajority() const { return nEnforceBlockUpgradeMajority; }
+    int RejectBlockOutdatedMajority() const { return nRejectBlockOutdatedMajority; }
+    int ToCheckBlockUpgradeMajority() const { return nToCheckBlockUpgradeMajority; }
+
     /* Used if GenerateBitcoins is called with a negative number of threads */
     int DefaultMinerThreads() const { return nMinerThreads; }
     virtual const CBlock& GenesisBlock() const = 0;
@@ -85,6 +90,9 @@ class CChainParams
     int nRPCPort;
     uint256 bnProofOfWorkLimit;
     int nSubsidyHalvingInterval;
+    int nEnforceBlockUpgradeMajority;
+    int nRejectBlockOutdatedMajority;
+    int nToCheckBlockUpgradeMajority;
     string strDataDir;
     int nMinerThreads;
     vector<CDNSSeedData> vSeeds;
diff --git a/src/main.cpp b/src/main.cpp
index 30fa9c6d7039..e6519864d849 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2469,14 +2469,11 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
             return state.DoS(100, error("AcceptBlock() : forked chain older than last checkpoint (height %d)", nHeight));
 
         // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
-        if (block.nVersion < 2)
+        if (block.nVersion < 2 && 
+            CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
         {
-            if ((!TestNet() && CBlockIndex::IsSuperMajority(2, pindexPrev, 950, 1000)) ||
-                (TestNet() && CBlockIndex::IsSuperMajority(2, pindexPrev, 75, 100)))
-            {
-                return state.Invalid(error("AcceptBlock() : rejected nVersion=1 block"),
-                                     REJECT_OBSOLETE, "bad-version");
-            }
+            return state.Invalid(error("AcceptBlock() : rejected nVersion=1 block"),
+                                 REJECT_OBSOLETE, "bad-version");
         }
     }
 
@@ -2517,19 +2514,15 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
         }
 
     // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
-    if (block.nVersion >= 2)
+    // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
+    if (block.nVersion >= 2 && 
+        CBlockIndex::IsSuperMajority(2, pindex->pprev, Params().EnforceBlockUpgradeMajority()))
     {
-        // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
-        if ((!TestNet() && CBlockIndex::IsSuperMajority(2, pindex->pprev, 750, 1000)) ||
-            (TestNet() && CBlockIndex::IsSuperMajority(2, pindex->pprev, 51, 100)))
-        {
-            CScript expect = CScript() << nHeight;
-            if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
-                !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
-                pindex->nStatus |= BLOCK_FAILED_VALID;
-                return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase"),
-                                 REJECT_INVALID, "bad-cb-height");
-            }
+        CScript expect = CScript() << nHeight;
+        if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
+            !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
+            pindex->nStatus |= BLOCK_FAILED_VALID;
+            return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase"), REJECT_INVALID, "bad-cb-height");
         }
     }
 
@@ -2563,8 +2556,9 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
     return true;
 }
 
-bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired, unsigned int nToCheck)
+bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired)
 {
+    unsigned int nToCheck = Params().ToCheckBlockUpgradeMajority();
     unsigned int nFound = 0;
     for (unsigned int i = 0; i < nToCheck && nFound < nRequired && pstart != NULL; i++)
     {
diff --git a/src/main.h b/src/main.h
index 42cf4a0861fa..58515b44b919 100644
--- a/src/main.h
+++ b/src/main.h
@@ -848,10 +848,11 @@ class CBlockIndex
 
     /**
      * Returns true if there are nRequired or more blocks of minVersion or above
-     * in the last nToCheck blocks, starting at pstart and going backwards.
+     * in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart 
+     * and going backwards.
      */
     static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart,
-                                unsigned int nRequired, unsigned int nToCheck);
+                                unsigned int nRequired);
 
     std::string ToString() const
     {

From 21913a9ac9525547ebe18619748abb18a2ca8cdf Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 20:09:12 +0100
Subject: [PATCH 0121/1819] Add AllowMinDifficultyBlocks chain parameter

---
 src/chainparams.cpp | 2 ++
 src/chainparams.h   | 2 ++
 src/main.cpp        | 6 +++---
 src/miner.cpp       | 2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 86d80629eb3f..c43de2e72d73 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -224,6 +224,8 @@ class CTestNetParams : public CMainParams {
         base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
         base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
     }
+
+    virtual bool AllowMinDifficultyBlocks() const { return true; }
     virtual Network NetworkID() const { return CChainParams::TESTNET; }
 };
 static CTestNetParams testNetParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index f400907d73c5..e1ce86550c24 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -70,6 +70,8 @@ class CChainParams
     virtual bool MiningRequiresPeers() const { return true; }
     /* Default value for -checkmempool argument */
     virtual bool DefaultCheckMemPool() const { return false; }
+    /* Allow mining of a min-difficulty block */
+    virtual bool AllowMinDifficultyBlocks() const { return false; }
     const string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
diff --git a/src/main.cpp b/src/main.cpp
index e6519864d849..7d0a57657b51 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1210,7 +1210,7 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
     const uint256 &bnLimit = Params().ProofOfWorkLimit();
     // Testnet has min-difficulty blocks
     // after nTargetSpacing*2 time between blocks:
-    if (TestNet() && nTime > nTargetSpacing*2)
+    if (Params().AllowMinDifficultyBlocks() && nTime > nTargetSpacing*2)
         return bnLimit.GetCompact();
 
     uint256 bnResult;
@@ -1238,7 +1238,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
     // Only change once per interval
     if ((pindexLast->nHeight+1) % nInterval != 0)
     {
-        if (TestNet())
+        if (Params().AllowMinDifficultyBlocks())
         {
             // Special difficulty rule for testnet:
             // If the new block's timestamp is more than 2* 10 minutes
@@ -1468,7 +1468,7 @@ void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev)
     block.nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
 
     // Updating time can change work required on testnet:
-    if (TestNet())
+    if (Params().AllowMinDifficultyBlocks())
         block.nBits = GetNextWorkRequired(pindexPrev, &block);
 }
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 44c2faaa4c1f..708b9248f315 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -632,7 +632,7 @@ void static BitcoinMiner(CWallet *pwallet)
             // Update nTime every few seconds
             UpdateTime(*pblock, pindexPrev);
             nBlockTime = ByteReverse(pblock->nTime);
-            if (TestNet())
+            if (Params().AllowMinDifficultyBlocks())
             {
                 // Changing pblock->nTime can change work required on testnet:
                 nBlockBits = ByteReverse(pblock->nBits);

From cfeb8235fda44aa71fb99ce583c2c2049105ad5a Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 20:19:48 +0100
Subject: [PATCH 0122/1819] Add RequireStandard chain parameter

---
 src/chainparams.cpp | 2 ++
 src/chainparams.h   | 2 ++
 src/main.cpp        | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index c43de2e72d73..f10599690f9e 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -226,6 +226,7 @@ class CTestNetParams : public CMainParams {
     }
 
     virtual bool AllowMinDifficultyBlocks() const { return true; }
+    virtual bool RequireStandard() const { return false; }
     virtual Network NetworkID() const { return CChainParams::TESTNET; }
 };
 static CTestNetParams testNetParams;
@@ -262,6 +263,7 @@ class CRegTestParams : public CTestNetParams {
     virtual bool MiningRequiresPeers() const { return false; }
     virtual bool MineBlocksOnDemand() const { return true; }
     virtual bool DefaultCheckMemPool() const { return true; }
+    virtual bool RequireStandard() const { return false; }
     virtual Network NetworkID() const { return CChainParams::REGTEST; }
 };
 static CRegTestParams regTestParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index e1ce86550c24..881eb2294dca 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -72,6 +72,8 @@ class CChainParams
     virtual bool DefaultCheckMemPool() const { return false; }
     /* Allow mining of a min-difficulty block */
     virtual bool AllowMinDifficultyBlocks() const { return false; }
+    /* Make standard checks */
+    virtual bool RequireStandard() const { return true; }
     const string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
diff --git a/src/main.cpp b/src/main.cpp
index 7d0a57657b51..2f24beecc687 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -833,7 +833,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 
     // Rather not work on nonstandard transactions (unless -testnet/-regtest)
     string reason;
-    if (Params().NetworkID() == CChainParams::MAIN && !IsStandardTx(tx, reason))
+    if (Params().RequireStandard() && !IsStandardTx(tx, reason))
         return state.DoS(0,
                          error("AcceptToMemoryPool : nonstandard transaction: %s", reason),
                          REJECT_NONSTANDARD, reason);
@@ -894,7 +894,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         }
 
         // Check for non-standard pay-to-script-hash in inputs
-        if (Params().NetworkID() == CChainParams::MAIN && !AreInputsStandard(tx, view))
+        if (Params().RequireStandard() && !AreInputsStandard(tx, view))
             return error("AcceptToMemoryPool: : nonstandard transaction input");
 
         // Note: if you modify this code to accept non-standard transactions, then

From 6fc0fa63d9eb6bdfcdfd2fd9792d23059c763534 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 20:20:43 +0100
Subject: [PATCH 0123/1819] Add RPCisTestNet chain parameter

---
 src/chainparams.cpp | 1 +
 src/chainparams.h   | 2 ++
 src/rpcmining.cpp   | 2 +-
 src/rpcmisc.cpp     | 2 +-
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f10599690f9e..109ee02b0a01 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -227,6 +227,7 @@ class CTestNetParams : public CMainParams {
 
     virtual bool AllowMinDifficultyBlocks() const { return true; }
     virtual bool RequireStandard() const { return false; }
+    virtual bool RPCisTestNet() const { return true; }
     virtual Network NetworkID() const { return CChainParams::TESTNET; }
 };
 static CTestNetParams testNetParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index 881eb2294dca..3849d33aca64 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -74,6 +74,8 @@ class CChainParams
     virtual bool AllowMinDifficultyBlocks() const { return false; }
     /* Make standard checks */
     virtual bool RequireStandard() const { return true; }
+    /* Make standard checks */
+    virtual bool RPCisTestNet() const { return false; }
     const string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 70adae146732..edf91023dced 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -265,7 +265,7 @@ Value getmininginfo(const Array& params, bool fHelp)
     obj.push_back(Pair("genproclimit",     (int)GetArg("-genproclimit", -1)));
     obj.push_back(Pair("networkhashps",    getnetworkhashps(params, false)));
     obj.push_back(Pair("pooledtx",         (uint64_t)mempool.size()));
-    obj.push_back(Pair("testnet",          TestNet()));
+    obj.push_back(Pair("testnet",          Params().RPCisTestNet()));
 #ifdef ENABLE_WALLET
     obj.push_back(Pair("generate",         getgenerate(params, false)));
     obj.push_back(Pair("hashespersec",     gethashespersec(params, false)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 27d6d61a36f2..a1793e2e435d 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -73,7 +73,7 @@ Value getinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
-    obj.push_back(Pair("testnet",       TestNet()));
+    obj.push_back(Pair("testnet",       Params().RPCisTestNet()));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
         obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));

From a3d946ebdc2eebef9ccdc2c883f8abfebcf0f653 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 20:22:14 +0100
Subject: [PATCH 0124/1819] Get rid of TestNet()

---
 src/bitcoin-cli.cpp | 2 +-
 src/bitcoind.cpp    | 2 +-
 src/chainparams.h   | 5 -----
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index ce9e7a4027fd..29efdfa82169 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -33,7 +33,7 @@ static bool AppInitRPC(int argc, char* argv[])
         fprintf(stderr,"Error reading configuration file: %s\n", e.what());
         return false;
     }
-    // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause)
+    // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
     if (!SelectParamsFromCommandLine()) {
         fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
         return false;
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 9b535c2e6b98..704332c39ba9 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -77,7 +77,7 @@ bool AppInit(int argc, char* argv[])
             fprintf(stderr,"Error reading configuration file: %s\n", e.what());
             return false;
         }
-        // Check for -testnet or -regtest parameter (TestNet() calls are only valid after this clause)
+        // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
         if (!SelectParamsFromCommandLine()) {
             fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
             return false;
diff --git a/src/chainparams.h b/src/chainparams.h
index 3849d33aca64..653ca20f0178 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -120,9 +120,4 @@ void SelectParams(CChainParams::Network network);
  */
 bool SelectParamsFromCommandLine();
 
-inline bool TestNet() {
-    // Note: it's deliberate that this returns "false" for regression test mode.
-    return Params().NetworkID() == CChainParams::TESTNET;
-}
-
 #endif

From c8c52de3a05b617bc399e2dd45901e74237b7fc1 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 4 Jun 2014 12:51:29 +0200
Subject: [PATCH 0125/1819] Replace virtual methods with static attributes,
 chainparams.h depends on protocol.h instead of the other way around

---
 src/alert.cpp       |  1 +
 src/chainparams.cpp | 51 +++++++++++++++++++++++----------------------
 src/chainparams.h   | 38 ++++++++++++++++++++-------------
 src/protocol.cpp    |  1 +
 src/protocol.h      |  3 ++-
 5 files changed, 53 insertions(+), 41 deletions(-)

diff --git a/src/alert.cpp b/src/alert.cpp
index 99164d63e599..638f0d7a1c1d 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -5,6 +5,7 @@
 
 #include "alert.h"
 
+#include "chainparams.h"
 #include "key.h"
 #include "net.h"
 #include "ui_interface.h"
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 109ee02b0a01..3f4d7f7064b6 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -6,8 +6,6 @@
 #include "chainparams.h"
 
 #include "assert.h"
-#include "core.h"
-#include "protocol.h"
 #include "util.h"
 
 #include <boost/assign/list_of.hpp>
@@ -100,6 +98,7 @@ unsigned int pnSeed[] =
 class CMainParams : public CChainParams {
 public:
     CMainParams() {
+        networkID = CChainParams::MAIN;
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
         // a large 4-byte int at any alignment.
@@ -171,27 +170,25 @@ class CMainParams : public CChainParams {
             addr.nTime = GetTime() - GetRand(nOneWeek) - nOneWeek;
             vFixedSeeds.push_back(addr);
         }
-    }
-
-    virtual const CBlock& GenesisBlock() const { return genesis; }
-    virtual Network NetworkID() const { return CChainParams::MAIN; }
 
-    virtual const vector<CAddress>& FixedSeeds() const {
-        return vFixedSeeds;
+        fRequireRPCPassword = true;
+        fMiningRequiresPeers = true;
+        fDefaultCheckMemPool = false;
+        fAllowMinDifficultyBlocks = false;
+        fRequireStandard = true;
+        fRPCisTestNet = false;
+        fMineBlocksOnDemand = false;
     }
-protected:
-    CBlock genesis;
-    vector<CAddress> vFixedSeeds;
 };
 static CMainParams mainParams;
 
-
 //
 // Testnet (v3)
 //
 class CTestNetParams : public CMainParams {
 public:
     CTestNetParams() {
+        networkID = CChainParams::TESTNET;
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
         // a large 4-byte int at any alignment.
@@ -223,22 +220,25 @@ class CTestNetParams : public CMainParams {
         base58Prefixes[SECRET_KEY]     = list_of(239);
         base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
         base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
-    }
 
-    virtual bool AllowMinDifficultyBlocks() const { return true; }
-    virtual bool RequireStandard() const { return false; }
-    virtual bool RPCisTestNet() const { return true; }
-    virtual Network NetworkID() const { return CChainParams::TESTNET; }
+        fRequireRPCPassword = true;
+        fMiningRequiresPeers = true;
+        fDefaultCheckMemPool = false;
+        fAllowMinDifficultyBlocks = true;
+        fRequireStandard = false;
+        fRPCisTestNet = true;
+        fMineBlocksOnDemand = false;
+    }
 };
 static CTestNetParams testNetParams;
 
-
 //
 // Regression test
 //
 class CRegTestParams : public CTestNetParams {
 public:
     CRegTestParams() {
+        networkID = CChainParams::REGTEST;
         pchMessageStart[0] = 0xfa;
         pchMessageStart[1] = 0xbf;
         pchMessageStart[2] = 0xb5;
@@ -258,14 +258,15 @@ class CRegTestParams : public CTestNetParams {
         assert(hashGenesisBlock == uint256("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
 
         vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
-    }
 
-    virtual bool RequireRPCPassword() const { return false; }
-    virtual bool MiningRequiresPeers() const { return false; }
-    virtual bool MineBlocksOnDemand() const { return true; }
-    virtual bool DefaultCheckMemPool() const { return true; }
-    virtual bool RequireStandard() const { return false; }
-    virtual Network NetworkID() const { return CChainParams::REGTEST; }
+        fRequireRPCPassword = false;
+        fMiningRequiresPeers = false;
+        fDefaultCheckMemPool = true;
+        fAllowMinDifficultyBlocks = true;
+        fRequireStandard = false;
+        fRPCisTestNet = true;
+        fMineBlocksOnDemand = true;
+    }
 };
 static CRegTestParams regTestParams;
 
diff --git a/src/chainparams.h b/src/chainparams.h
index 653ca20f0178..988e3ac3a49d 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -7,17 +7,15 @@
 #define BITCOIN_CHAIN_PARAMS_H
 
 #include "uint256.h"
+#include "core.h"
+#include "protocol.h"
 
 #include <vector>
 
 using namespace std;
 
-#define MESSAGE_START_SIZE 4
 typedef unsigned char MessageStartChars[MESSAGE_START_SIZE];
 
-class CAddress;
-class CBlock;
-
 struct CDNSSeedData {
     string name, host;
     CDNSSeedData(const string &strName, const string &strHost) : name(strName), host(strHost) {}
@@ -64,26 +62,26 @@ class CChainParams
 
     /* Used if GenerateBitcoins is called with a negative number of threads */
     int DefaultMinerThreads() const { return nMinerThreads; }
-    virtual const CBlock& GenesisBlock() const = 0;
-    virtual bool RequireRPCPassword() const { return true; }
+    const CBlock& GenesisBlock() const { return genesis; };
+    bool RequireRPCPassword() const { return fRequireRPCPassword; }
     /* Make miner wait to have peers to avoid wasting work */
-    virtual bool MiningRequiresPeers() const { return true; }
+    bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
     /* Default value for -checkmempool argument */
-    virtual bool DefaultCheckMemPool() const { return false; }
+    bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
     /* Allow mining of a min-difficulty block */
-    virtual bool AllowMinDifficultyBlocks() const { return false; }
+    bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /* Make standard checks */
-    virtual bool RequireStandard() const { return true; }
+    bool RequireStandard() const { return fRequireStandard; }
     /* Make standard checks */
-    virtual bool RPCisTestNet() const { return false; }
+    bool RPCisTestNet() const { return fRPCisTestNet; }
     const string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
-    virtual bool MineBlocksOnDemand() const { return false; }
-    virtual Network NetworkID() const = 0;
+    bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
+    Network NetworkID() const { return networkID; }
     const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
-    const std::vector<unsigned char> &Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
-    virtual const vector<CAddress>& FixedSeeds() const = 0;
+    const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
+    const vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
     int RPCPort() const { return nRPCPort; }
 protected:
     CChainParams() {}
@@ -103,6 +101,16 @@ class CChainParams
     int nMinerThreads;
     vector<CDNSSeedData> vSeeds;
     std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
+    Network networkID;
+    CBlock genesis;
+    vector<CAddress> vFixedSeeds;
+    bool fRequireRPCPassword;
+    bool fMiningRequiresPeers;
+    bool fDefaultCheckMemPool;
+    bool fAllowMinDifficultyBlocks;
+    bool fRequireStandard;
+    bool fRPCisTestNet;
+    bool fMineBlocksOnDemand;
 };
 
 /**
diff --git a/src/protocol.cpp b/src/protocol.cpp
index c77a92f02066..87b2f238735c 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -5,6 +5,7 @@
 
 #include "protocol.h"
 
+#include "chainparams.h"
 #include "util.h"
 
 #ifndef WIN32
diff --git a/src/protocol.h b/src/protocol.h
index e6f105fe5c05..6de5d05a723c 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -10,7 +10,6 @@
 #ifndef __INCLUDED_PROTOCOL_H__
 #define __INCLUDED_PROTOCOL_H__
 
-#include "chainparams.h"
 #include "netbase.h"
 #include "serialize.h"
 #include "uint256.h"
@@ -19,6 +18,8 @@
 #include <stdint.h>
 #include <string>
 
+#define MESSAGE_START_SIZE 4
+
 /** Message header.
  * (4) message start.
  * (12) command.

From 2871889e834b664bcaa3fdb3ecb6c5cdc751afb1 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 4 Jun 2014 12:52:15 +0200
Subject: [PATCH 0126/1819] net.h was using std namespace through chainparams.h
 included in protocol.h

---
 src/net.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/net.h b/src/net.h
index d3346873bc81..d50cd92dbacf 100644
--- a/src/net.h
+++ b/src/net.h
@@ -129,7 +129,7 @@ struct LocalServiceInfo {
 };
 
 extern CCriticalSection cs_mapLocalHost;
-extern map<CNetAddr, LocalServiceInfo> mapLocalHost;
+extern std::map<CNetAddr, LocalServiceInfo> mapLocalHost;
 
 class CNodeStats
 {

From 7b45d943b29a443f1ac808c9ee4eeed6df0db9cc Mon Sep 17 00:00:00 2001
From: shshshsh <shshshsh@sdsdsdfsd.invalid>
Date: Fri, 30 May 2014 12:35:23 +0000
Subject: [PATCH 0127/1819] Make max number of orphan blocks kept in memory a
 startup parameter (fixes #4253)

---
 src/init.cpp | 1 +
 src/main.cpp | 2 +-
 src/main.h   | 4 ++--
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index bc4924b48dca..995f2700cf14 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -206,6 +206,7 @@ std::string HelpMessage(HelpMessageMode hmm)
     strUsage += "  -dbcache=<n>           " + strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache) + "\n";
     strUsage += "  -keypool=<n>           " + _("Set key pool size to <n> (default: 100)") + "\n";
     strUsage += "  -loadblock=<file>      " + _("Imports blocks from external blk000??.dat file") + " " + _("on startup") + "\n";
+    strUsage += "  -maxorphanblocks=<n>   " + strprintf(_("Keep at most <n> unconnectable blocks in memory (default: %u)"), DEFAULT_MAX_ORPHAN_BLOCKS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
     strUsage += "  -pid=<file>            " + _("Specify pid file (default: bitcoind.pid)") + "\n";
     strUsage += "  -reindex               " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n";
diff --git a/src/main.cpp b/src/main.cpp
index 18c00d90acb7..5cb6e706bb03 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1160,7 +1160,7 @@ uint256 static GetOrphanRoot(const uint256& hash)
 // Remove a random orphan block (which does not have any dependent orphans).
 void static PruneOrphanBlocks()
 {
-    if (mapOrphanBlocksByPrev.size() <= MAX_ORPHAN_BLOCKS)
+    if (mapOrphanBlocksByPrev.size() <= (size_t)std::max((int64_t)0, GetArg("-maxorphanblocks", DEFAULT_MAX_ORPHAN_BLOCKS)))
         return;
 
     // Pick a random orphan block.
diff --git a/src/main.h b/src/main.h
index 8a05eb60d220..26f66630aec0 100644
--- a/src/main.h
+++ b/src/main.h
@@ -45,8 +45,8 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 /** The maximum number of orphan transactions kept in memory */
 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
-/** The maximum number of orphan blocks kept in memory */
-static const unsigned int MAX_ORPHAN_BLOCKS = 750;
+/** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
+static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 750;
 /** The maximum size of a blk?????.dat file (since 0.8) */
 static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
 /** The pre-allocation chunk size for blk?????.dat files (since 0.8) */

From f0a83fc256023f68cc046bd096de69f16ce9d394 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 4 Jun 2014 15:25:58 +0200
Subject: [PATCH 0128/1819] Use Params().NetworkID() instead of TestNet() from
 the payment protocol

---
 src/qt/paymentserver.cpp | 14 ++++++++++++--
 src/qt/paymentserver.h   |  1 +
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 4c455856856d..20551591c3a7 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -490,6 +490,17 @@ bool PaymentServer::readPaymentRequest(const QString& filename, PaymentRequestPl
     return request.parse(data);
 }
 
+std::string PaymentServer::mapNetworkIdToName(CChainParams::Network networkId)
+{
+    if (networkId == CChainParams::MAIN)
+        return "main";
+    if (networkId == CChainParams::TESTNET)
+        return "test";
+    if (networkId == CChainParams::REGTEST)
+        return "regtest";
+    return "";
+}
+
 bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient)
 {
     if (!optionsModel)
@@ -499,8 +510,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
         const payments::PaymentDetails& details = request.getDetails();
 
         // Payment request network matches client network?
-        if ((details.network() == "main" && TestNet()) ||
-            (details.network() == "test" && !TestNet()))
+        if (details.network() != mapNetworkIdToName(Params().NetworkID()))
         {
             emit message(tr("Payment request rejected"), tr("Payment request network doesn't match client network."),
                 CClientUIInterface::MSG_ERROR);
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index d84d09c57d6c..d6949a47cee5 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -118,6 +118,7 @@ private slots:
 
 private:
     static bool readPaymentRequest(const QString& filename, PaymentRequestPlus& request);
+    std::string mapNetworkIdToName(CChainParams::Network networkId);
     bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);
     void fetchRequest(const QUrl& url);
 

From 4a48a0671d2e02ba2a86af98282a452f23546b9e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 4 Jun 2014 12:27:44 +0200
Subject: [PATCH 0129/1819] Remove side effect in assertion in ProcessGetData

A side-effect was introduced into an assertion in 7a0e84d. This commit
fixes that.
---
 src/main.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 30fa9c6d7039..e71d2d0cbca8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3390,7 +3390,8 @@ void static ProcessGetData(CNode* pfrom)
                 {
                     // Send block from disk
                     CBlock block;
-                    assert(ReadBlockFromDisk(block, (*mi).second));
+                    if (!ReadBlockFromDisk(block, (*mi).second))
+                        assert(!"cannot load block from disk");
                     if (inv.type == MSG_BLOCK)
                         pfrom->PushMessage("block", block);
                     else // MSG_FILTERED_BLOCK)

From 5bd02cf715dcb44cfc797c0d1fb94b80350b6489 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 4 Jun 2014 21:19:22 +0200
Subject: [PATCH 0130/1819] log used config file to debug.log on startup

---
 src/init.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/init.cpp b/src/init.cpp
index 6a21dee6346c..96f7f7b3c8a6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -614,6 +614,7 @@ bool AppInit2(boost::thread_group& threadGroup)
         LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
     LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
     LogPrintf("Using data directory %s\n", strDataDir);
+    LogPrintf("Using config file %s\n", GetConfigFile().string());
     LogPrintf("Using at most %i connections (%i file descriptors available)\n", nMaxConnections, nFD);
     std::ostringstream strErrors;
 

From fe6bff2eaec35c3dc292af883a6e82397e440c22 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 4 Jun 2014 22:00:59 +0200
Subject: [PATCH 0131/1819] [Qt] add BerkeleyDB version info to RPCConsole

- to match info function between debug.log and RPCConsole
---
 src/qt/forms/rpcconsole.ui | 60 +++++++++++++++++++++++++++-----------
 src/qt/rpcconsole.cpp      | 10 ++++++-
 2 files changed, 52 insertions(+), 18 deletions(-)

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index bf737d9b9967..1e574e852716 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -113,13 +113,39 @@
         </widget>
        </item>
        <item row="4" column="0">
+        <widget class="QLabel" name="label_berkeleyDBVersion">
+         <property name="text">
+          <string>Using BerkeleyDB version</string>
+         </property>
+         <property name="indent">
+          <number>10</number>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="1">
+        <widget class="QLabel" name="berkeleyDBVersion">
+         <property name="cursor">
+          <cursorShape>IBeamCursor</cursorShape>
+         </property>
+         <property name="text">
+          <string>N/A</string>
+         </property>
+         <property name="textFormat">
+          <enum>Qt::PlainText</enum>
+         </property>
+         <property name="textInteractionFlags">
+          <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="0">
         <widget class="QLabel" name="label_12">
          <property name="text">
           <string>Build date</string>
          </property>
         </widget>
        </item>
-       <item row="4" column="1">
+       <item row="5" column="1">
         <widget class="QLabel" name="buildDate">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -135,14 +161,14 @@
          </property>
         </widget>
        </item>
-       <item row="5" column="0">
+       <item row="6" column="0">
         <widget class="QLabel" name="label_13">
          <property name="text">
           <string>Startup time</string>
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
+       <item row="6" column="1">
         <widget class="QLabel" name="startupTime">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -158,7 +184,7 @@
          </property>
         </widget>
        </item>
-       <item row="6" column="0">
+       <item row="7" column="0">
         <widget class="QLabel" name="label_11">
          <property name="font">
           <font>
@@ -171,14 +197,14 @@
          </property>
         </widget>
        </item>
-       <item row="7" column="0">
+       <item row="8" column="0">
         <widget class="QLabel" name="label_8">
          <property name="text">
           <string>Name</string>
          </property>
         </widget>
        </item>
-       <item row="7" column="1">
+       <item row="8" column="1">
         <widget class="QLabel" name="networkName">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -194,14 +220,14 @@
          </property>
         </widget>
        </item>
-       <item row="8" column="0">
+       <item row="9" column="0">
         <widget class="QLabel" name="label_7">
          <property name="text">
           <string>Number of connections</string>
          </property>
         </widget>
        </item>
-       <item row="8" column="1">
+       <item row="9" column="1">
         <widget class="QLabel" name="numberOfConnections">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -217,7 +243,7 @@
          </property>
         </widget>
        </item>
-       <item row="9" column="0">
+       <item row="10" column="0">
         <widget class="QLabel" name="label_10">
          <property name="font">
           <font>
@@ -230,14 +256,14 @@
          </property>
         </widget>
        </item>
-       <item row="10" column="0">
+       <item row="11" column="0">
         <widget class="QLabel" name="label_3">
          <property name="text">
           <string>Current number of blocks</string>
          </property>
         </widget>
        </item>
-       <item row="10" column="1">
+       <item row="11" column="1">
         <widget class="QLabel" name="numberOfBlocks">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -253,14 +279,14 @@
          </property>
         </widget>
        </item>
-       <item row="11" column="0">
+       <item row="12" column="0">
         <widget class="QLabel" name="label_2">
          <property name="text">
           <string>Last block time</string>
          </property>
         </widget>
        </item>
-       <item row="11" column="1">
+       <item row="12" column="1">
         <widget class="QLabel" name="lastBlockTime">
          <property name="cursor">
           <cursorShape>IBeamCursor</cursorShape>
@@ -276,7 +302,7 @@
          </property>
         </widget>
        </item>
-       <item row="12" column="0">
+       <item row="13" column="0">
         <spacer name="verticalSpacer_2">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
@@ -289,7 +315,7 @@
          </property>
         </spacer>
        </item>
-       <item row="13" column="0">
+       <item row="14" column="0">
         <widget class="QLabel" name="labelDebugLogfile">
          <property name="font">
           <font>
@@ -302,7 +328,7 @@
          </property>
         </widget>
        </item>
-       <item row="14" column="0">
+       <item row="15" column="0">
         <widget class="QPushButton" name="openDebugLogfileButton">
          <property name="toolTip">
           <string>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</string>
@@ -315,7 +341,7 @@
          </property>
         </widget>
        </item>
-       <item row="15" column="0">
+       <item row="16" column="0">
         <spacer name="verticalSpacer">
          <property name="orientation">
           <enum>Qt::Vertical</enum>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 3b7d37ff3919..6a8bce25d413 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -15,7 +15,9 @@
 #include "util.h"
 
 #include "json/json_spirit_value.h"
+#include <db_cxx.h>
 #include <openssl/crypto.h>
+
 #include <QKeyEvent>
 #include <QScrollBar>
 #include <QThread>
@@ -216,8 +218,14 @@ RPCConsole::RPCConsole(QWidget *parent) :
     connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
     connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
 
-    // set OpenSSL version label
+    // set library version labels
     ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
+#ifdef ENABLE_WALLET
+    ui->berkeleyDBVersion->setText(DbEnv::version(0, 0, 0));
+#else
+    ui->label_berkeleyDBVersion->hide();
+    ui->berkeleyDBVersion->hide();
+#endif
 
     startExecutor();
     setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);

From a92aded70ec2346c3f07ff1cf8eb97101a76912f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 5 Jun 2014 07:00:16 +0200
Subject: [PATCH 0132/1819] Fix GUI build with `--disable-wallet`

fe6bff2 and 65f78a1 broke it. Minor build changes.
---
 src/qt/Makefile.am    | 2 +-
 src/qt/rpcconsole.cpp | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
index 1d85113d7820..d527f790ef30 100644
--- a/src/qt/Makefile.am
+++ b/src/qt/Makefile.am
@@ -276,6 +276,7 @@ BITCOIN_QT_CPP = \
   notificator.cpp \
   optionsdialog.cpp \
   optionsmodel.cpp \
+  peertablemodel.cpp \
   qvalidatedlineedit.cpp \
   qvaluecombobox.cpp \
   rpcconsole.cpp \
@@ -296,7 +297,6 @@ BITCOIN_QT_CPP += \
   overviewpage.cpp \
   paymentrequestplus.cpp \
   paymentserver.cpp \
-  peertablemodel.cpp \
   receivecoinsdialog.cpp \
   receiverequestdialog.cpp \
   recentrequeststablemodel.cpp \
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 6a8bce25d413..0d3e11f4aca9 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -15,7 +15,9 @@
 #include "util.h"
 
 #include "json/json_spirit_value.h"
+#ifdef ENABLE_WALLET
 #include <db_cxx.h>
+#endif
 #include <openssl/crypto.h>
 
 #include <QKeyEvent>

From 7d4dda7630a67ae1aacfc799ed743e69562a41df Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 5 Jun 2014 14:52:07 +0200
Subject: [PATCH 0133/1819] Remove global strWalletFile

As it says on the tin. There is no need to have this variable be
global, it's only used in AppInit2.
---
 src/init.cpp | 3 +--
 src/init.h   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 96f7f7b3c8a6..d924bd293bb5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -40,7 +40,6 @@ using namespace std;
 using namespace boost;
 
 #ifdef ENABLE_WALLET
-std::string strWalletFile;
 CWallet* pwalletMain;
 #endif
 
@@ -584,7 +583,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
 
-    strWalletFile = GetArg("-wallet", "wallet.dat");
+    std::string strWalletFile = GetArg("-wallet", "wallet.dat");
 #endif
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
 
diff --git a/src/init.h b/src/init.h
index 2f5692305535..4a967bea3710 100644
--- a/src/init.h
+++ b/src/init.h
@@ -14,7 +14,6 @@ namespace boost {
     class thread_group;
 };
 
-extern std::string strWalletFile;
 extern CWallet* pwalletMain;
 
 void StartShutdown();

From 6e7c4d17d8abb4b1c8b91504699ce6970e01a1fb Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 5 Jun 2014 15:44:35 +0200
Subject: [PATCH 0134/1819] gitian: upgrade OpenSSL to 1.0.1h

Upgrade for https://www.openssl.org/news/secadv_20140605.txt

Just in case - there is no vulnerability that affects ecdsa signing or
verification.

The MITM attack vulnerability (CVE-2014-0224) may have some effect on
our usage of SSL/TLS.

As long as payment requests are signed (which is the common case), usage
of the payment protocol should also not be affected.

The TLS usage in RPC may be at risk for MITM attacks. If you have
`-rpcssl` enabled, be sure to update OpenSSL as soon as possible.
---
 contrib/gitian-descriptors/deps-linux.yml         | 10 +++++-----
 contrib/gitian-descriptors/deps-win.yml           | 10 +++++-----
 contrib/gitian-descriptors/gitian-linux.yml       |  6 +++---
 contrib/gitian-descriptors/gitian-osx-bitcoin.yml |  8 ++++----
 contrib/gitian-descriptors/gitian-osx-depends.yml | 10 +++++-----
 contrib/gitian-descriptors/gitian-osx-qt.yml      |  6 +++---
 contrib/gitian-descriptors/gitian-win.yml         |  6 +++---
 contrib/gitian-descriptors/qt-win.yml             |  6 +++---
 doc/release-process.md                            | 10 +++++-----
 9 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/contrib/gitian-descriptors/deps-linux.yml b/contrib/gitian-descriptors/deps-linux.yml
index af10461b8325..82212221334a 100644
--- a/contrib/gitian-descriptors/deps-linux.yml
+++ b/contrib/gitian-descriptors/deps-linux.yml
@@ -16,7 +16,7 @@ packages:
 reference_datetime: "2013-06-01 00:00:00"
 remotes: []
 files:
-- "openssl-1.0.1g.tar.gz"
+- "openssl-1.0.1h.tar.gz"
 - "miniupnpc-1.9.tar.gz"
 - "qrencode-3.4.3.tar.bz2"
 - "protobuf-2.5.0.tar.bz2"
@@ -30,15 +30,15 @@ script: |
   export TZ=UTC
   export LIBRARY_PATH="$STAGING/lib"
   # Integrity Check
-  echo "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028  openssl-1.0.1g.tar.gz"  | sha256sum -c
+  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz"  | sha256sum -c
   echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz"   | sha256sum -c
   echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
   echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
   echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz"    | sha256sum -c
 
   #
-  tar xzf openssl-1.0.1g.tar.gz
-  cd openssl-1.0.1g
+  tar xzf openssl-1.0.1h.tar.gz
+  cd openssl-1.0.1h
   #   need -fPIC to avoid relocation error in 64 bit builds
   ./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
   #   need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
@@ -95,4 +95,4 @@ script: |
   done
   #
   cd $STAGING
-  find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r5.zip
+  find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip
diff --git a/contrib/gitian-descriptors/deps-win.yml b/contrib/gitian-descriptors/deps-win.yml
index 17ac413d80e8..fabc2949ebb3 100644
--- a/contrib/gitian-descriptors/deps-win.yml
+++ b/contrib/gitian-descriptors/deps-win.yml
@@ -14,7 +14,7 @@ packages:
 reference_datetime: "2011-01-30 00:00:00"
 remotes: []
 files:
-- "openssl-1.0.1g.tar.gz"
+- "openssl-1.0.1h.tar.gz"
 - "db-4.8.30.NC.tar.gz"
 - "miniupnpc-1.9.tar.gz"
 - "zlib-1.2.8.tar.gz"
@@ -28,7 +28,7 @@ script: |
   INDIR=$HOME/build
   TEMPDIR=$HOME/tmp
   # Input Integrity Check
-  echo "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028  openssl-1.0.1g.tar.gz"  | sha256sum -c
+  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz"  | sha256sum -c
   echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz"    | sha256sum -c
   echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz"   | sha256sum -c
   echo "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d  zlib-1.2.8.tar.gz"      | sha256sum -c
@@ -48,8 +48,8 @@ script: |
     mkdir -p $INSTALLPREFIX $BUILDDIR
     cd $BUILDDIR
     #
-    tar xzf $INDIR/openssl-1.0.1g.tar.gz
-    cd openssl-1.0.1g
+    tar xzf $INDIR/openssl-1.0.1h.tar.gz
+    cd openssl-1.0.1h
     if [ "$BITS" == "32" ]; then
       OPENSSL_TGT=mingw
     else
@@ -124,5 +124,5 @@ script: |
     done
     #
     cd $INSTALLPREFIX
-    find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r12.zip
+    find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r13.zip
   done # for BITS in
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index bb59e1cecbbd..65a6c3c1e9c0 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -25,8 +25,8 @@ remotes:
 - "url": "https://github.com/bitcoin/bitcoin.git"
   "dir": "bitcoin"
 files:
-- "bitcoin-deps-linux32-gitian-r5.zip"
-- "bitcoin-deps-linux64-gitian-r5.zip"
+- "bitcoin-deps-linux32-gitian-r6.zip"
+- "bitcoin-deps-linux64-gitian-r6.zip"
 - "boost-linux32-1.55.0-gitian-r1.zip"
 - "boost-linux64-1.55.0-gitian-r1.zip"
 - "qt-linux32-4.6.4-gitian-r1.tar.gz"
@@ -43,7 +43,7 @@ script: |
   #
   mkdir -p $STAGING
   cd $STAGING
-  unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r5.zip
+  unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip
   unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
   tar -zxf ../build/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz
   cd ../build
diff --git a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
index e29047d6101a..44b5de9be3fb 100644
--- a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+++ b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
@@ -18,8 +18,8 @@ remotes:
   "dir": "bitcoin"
 files:
 - "osx-native-depends-r3.tar.gz"
-- "osx-depends-r3.tar.gz"
-- "osx-depends-qt-5.2.1-r3.tar.gz"
+- "osx-depends-r4.tar.gz"
+- "osx-depends-qt-5.2.1-r4.tar.gz"
 - "MacOSX10.7.sdk.tar.gz"
 
 script: |
@@ -37,8 +37,8 @@ script: |
   tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
 
   tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-r3.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r3.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-r4.tar.gz
+  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r4.tar.gz
   export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
 
   cd bitcoin
diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml
index adc86e5cb4e8..07a021cf0c59 100644
--- a/contrib/gitian-descriptors/gitian-osx-depends.yml
+++ b/contrib/gitian-descriptors/gitian-osx-depends.yml
@@ -15,7 +15,7 @@ files:
 - "boost_1_55_0.tar.bz2"
 - "db-4.8.30.NC.tar.gz"
 - "miniupnpc-1.9.tar.gz"
-- "openssl-1.0.1g.tar.gz"
+- "openssl-1.0.1h.tar.gz"
 - "protobuf-2.5.0.tar.bz2"
 - "qrencode-3.4.3.tar.bz2"
 - "MacOSX10.7.sdk.tar.gz"
@@ -26,11 +26,11 @@ script: |
   echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | sha256sum -c
   echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz" | sha256sum -c
   echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz" | sha256sum -c
-  echo "53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028  openssl-1.0.1g.tar.gz" | sha256sum -c
+  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz" | sha256sum -c
   echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
   echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
 
-  REVISION=r3
+  REVISION=r4
   export SOURCES_PATH=`pwd`
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
   export PATH=$HOME:$PATH
@@ -88,8 +88,8 @@ script: |
   popd
 
   # openssl
-  SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1g.tar.gz
-  BUILD_DIR=${BUILD_BASE}/openssl-1.0.1g
+  SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1h.tar.gz
+  BUILD_DIR=${BUILD_BASE}/openssl-1.0.1h
 
   tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
   pushd ${BUILD_DIR}
diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml
index b57908dbd9be..5e0ad9222a85 100644
--- a/contrib/gitian-descriptors/gitian-osx-qt.yml
+++ b/contrib/gitian-descriptors/gitian-osx-qt.yml
@@ -14,14 +14,14 @@ remotes: []
 files:
 - "qt-everywhere-opensource-src-5.2.1.tar.gz"
 - "osx-native-depends-r3.tar.gz"
-- "osx-depends-r3.tar.gz"
+- "osx-depends-r4.tar.gz"
 - "MacOSX10.7.sdk.tar.gz"
 
 script: |
 
   echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1  qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
 
-  REVISION=r3
+  REVISION=r4
   export SOURCES_PATH=`pwd`
   export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
   export ZERO_AR_DATE=1
@@ -73,7 +73,7 @@ script: |
   tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
 
   export PATH=`pwd`/native-prefix/bin:$PATH
-  tar xf /home/ubuntu/build/osx-depends-r3.tar.gz
+  tar xf /home/ubuntu/build/osx-depends-r4.tar.gz
 
   SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
   BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 2191fb36c76b..245f15ccab87 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -26,8 +26,8 @@ files:
 - "qt-win64-5.2.0-gitian-r3.zip"
 - "boost-win32-1.55.0-gitian-r6.zip"
 - "boost-win64-1.55.0-gitian-r6.zip"
-- "bitcoin-deps-win32-gitian-r12.zip"
-- "bitcoin-deps-win64-gitian-r12.zip"
+- "bitcoin-deps-win32-gitian-r13.zip"
+- "bitcoin-deps-win64-gitian-r13.zip"
 - "protobuf-win32-2.5.0-gitian-r4.zip"
 - "protobuf-win64-2.5.0-gitian-r4.zip"
 script: |
@@ -61,7 +61,7 @@ script: |
     cd $STAGING
     unzip $INDIR/qt-win${BITS}-5.2.0-gitian-r3.zip
     unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip
-    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r12.zip
+    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
     unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip
     if [ "$NEEDDIST" == "1" ]; then
       # Make source code archive which is architecture independent so it only needs to be done once
diff --git a/contrib/gitian-descriptors/qt-win.yml b/contrib/gitian-descriptors/qt-win.yml
index 8f24492b531f..7000c7005118 100644
--- a/contrib/gitian-descriptors/qt-win.yml
+++ b/contrib/gitian-descriptors/qt-win.yml
@@ -15,8 +15,8 @@ reference_datetime: "2011-01-30 00:00:00"
 remotes: []
 files:
 - "qt-everywhere-opensource-src-5.2.0.tar.gz"
-- "bitcoin-deps-win32-gitian-r12.zip"
-- "bitcoin-deps-win64-gitian-r12.zip"
+- "bitcoin-deps-win32-gitian-r13.zip"
+- "bitcoin-deps-win64-gitian-r13.zip"
 script: |
   # Defines
   export TZ=UTC
@@ -48,7 +48,7 @@ script: |
     #
     # Need mingw-compiled openssl from bitcoin-deps:
     cd $DEPSDIR
-    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r12.zip
+    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
     #
     cd $BUILDDIR
     #
diff --git a/doc/release-process.md b/doc/release-process.md
index 60b93b7680c4..5b96e537537a 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -44,7 +44,7 @@ Release Process
  Fetch and build inputs: (first time, or when dependency versions change)
 
 	wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz' -O miniupnpc-1.9.tar.gz
-	wget 'https://www.openssl.org/source/openssl-1.0.1g.tar.gz'
+	wget 'https://www.openssl.org/source/openssl-1.0.1h.tar.gz'
 	wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
 	wget 'http://zlib.net/zlib-1.2.8.tar.gz'
 	wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz'
@@ -89,16 +89,16 @@ Release Process
 
  The expected SHA256 hashes of the intermediate inputs are:
 
-    35c3dfd8b9362f59e81b51881b295232e3bc9e286f1add193b59d486d9ac4a5c  bitcoin-deps-linux32-gitian-r5.zip
-    571789867d172500fa96d63d0ba8c5b1e1a3d6f44f720eddf2f93665affc88b3  bitcoin-deps-linux64-gitian-r5.zip
+    46710f673467e367738d8806e45b4cb5931aaeea61f4b6b55a68eea56d5006c5  bitcoin-deps-linux32-gitian-r6.zip
+    f03be39fb26670243d3a659e64d18e19d03dec5c11e9912011107768390b5268  bitcoin-deps-linux64-gitian-r6.zip
     f29b7d9577417333fb56e023c2977f5726a7c297f320b175a4108cf7cd4c2d29  boost-linux32-1.55.0-gitian-r1.zip
     88232451c4104f7eb16e469ac6474fd1231bd485687253f7b2bdf46c0781d535  boost-linux64-1.55.0-gitian-r1.zip
     57e57dbdadc818cd270e7e00500a5e1085b3bcbdef69a885f0fb7573a8d987e1  qt-linux32-4.6.4-gitian-r1.tar.gz
     60eb4b9c5779580b7d66529efa5b2836ba1a70edde2a0f3f696d647906a826be  qt-linux64-4.6.4-gitian-r1.tar.gz
     60dc2d3b61e9c7d5dbe2f90d5955772ad748a47918ff2d8b74e8db9b1b91c909  boost-win32-1.55.0-gitian-r6.zip
     f65fcaf346bc7b73bc8db3a8614f4f6bee2f61fcbe495e9881133a7c2612a167  boost-win64-1.55.0-gitian-r6.zip
-    acd59690a49dfbad6b436379843fe4ad1857ad91c603d52506690bc55f2a01a4  bitcoin-deps-win32-gitian-r12.zip
-    a3e5a62fcdad81f758e41848035e6a27be390981a14d590f2cf2509f87417a42  bitcoin-deps-win64-gitian-r12.zip
+    70de248cd0dd7e7476194129e818402e974ca9c5751cbf591644dc9f332d3b59  bitcoin-deps-win32-gitian-r13.zip
+    9eace4c76f639f4f3580a478eee4f50246e1bbb5ccdcf37a158261a5a3fa3e65  bitcoin-deps-win64-gitian-r13.zip
     963e3e5e85879010a91143c90a711a5d1d5aba992e38672cdf7b54e42c56b2f1  qt-win32-5.2.0-gitian-r3.zip
     751c579830d173ef3e6f194e83d18b92ebef6df03289db13ab77a52b6bc86ef0  qt-win64-5.2.0-gitian-r3.zip
     e2e403e1a08869c7eed4d4293bce13d51ec6a63592918b90ae215a0eceb44cb4  protobuf-win32-2.5.0-gitian-r4.zip

From 65e8ba4dbed519a3be6d497063c3441550c4b3d6 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 28 May 2014 13:38:41 -0400
Subject: [PATCH 0135/1819] build: Switch to non-recursive make

Build logic moves from individual Makefile.am's to include files, which
the main src/Makefile.am includes. This avoids having to manage a gigantic
single Makefile.

TODO: Move the rules from the old Makefile.include to where they actually
belong and nuke the old file.
---
 configure.ac                |   5 +-
 src/Makefile.am             |  21 +-
 src/Makefile.include        |  17 +-
 src/Makefile.qt.include     | 387 ++++++++++++++++++++++++++++++++++++
 src/Makefile.qttest.include |  52 +++++
 src/Makefile.test.include   |  87 ++++++++
 6 files changed, 550 insertions(+), 19 deletions(-)
 create mode 100644 src/Makefile.qt.include
 create mode 100644 src/Makefile.qttest.include
 create mode 100644 src/Makefile.test.include

diff --git a/configure.ac b/configure.ac
index 3a8d33a5a010..d8521ad3ad5f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -666,6 +666,9 @@ AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
 AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
 AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
 AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes])
+AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests == xyes])
+AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt == xyes])
+AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
 AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
 AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
 AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
@@ -695,7 +698,7 @@ AC_SUBST(LEVELDB_TARGET_FLAGS)
 AC_SUBST(BUILD_TEST)
 AC_SUBST(BUILD_QT)
 AC_SUBST(BUILD_TEST_QT)
-AC_CONFIG_FILES([Makefile src/Makefile src/test/Makefile src/qt/Makefile src/qt/test/Makefile share/setup.nsi share/qt/Info.plist])
+AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
 AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index a49ad587160b..e7d121b4d6e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -11,6 +11,7 @@ noinst_LIBRARIES += libbitcoin_wallet.a
 endif
 
 bin_PROGRAMS =
+TESTS =
 
 if BUILD_BITCOIND
   bin_PROGRAMS += bitcoind
@@ -20,8 +21,6 @@ if BUILD_BITCOIN_CLI
   bin_PROGRAMS += bitcoin-cli
 endif
 
-SUBDIRS = . $(BUILD_QT) $(BUILD_TEST)
-DIST_SUBDIRS = . qt test
 .PHONY: FORCE
 # bitcoin core #
 BITCOIN_CORE_H = \
@@ -188,16 +187,24 @@ leveldb/%.a:
 	  CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
 	  OPT="$(CXXFLAGS) $(CPPFLAGS)"
 
-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
-	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
-	@cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
-
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
 DISTCLEANFILES = obj/build.h
 
-EXTRA_DIST = leveldb Makefile.include
+EXTRA_DIST = leveldb
 
 clean-local:
 	-$(MAKE) -C leveldb clean
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
+
+if ENABLE_TESTS
+include Makefile.test.include
+endif
+
+if ENABLE_QT
+include Makefile.qt.include
+endif
+
+if ENABLE_QT_TESTS
+include Makefile.qttest.include
+endif
diff --git a/src/Makefile.include b/src/Makefile.include
index 2fc6cd777515..d3d3d6385abc 100644
--- a/src/Makefile.include
+++ b/src/Makefile.include
@@ -12,23 +12,18 @@ AM_CPPFLAGS =  $(INCLUDES) \
 AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
 AM_LDFLAGS = $(PTHREAD_CFLAGS)
 
-LIBBITCOIN_SERVER=$(top_builddir)/src/libbitcoin_server.a
-LIBBITCOIN_WALLET=$(top_builddir)/src/libbitcoin_wallet.a
-LIBBITCOIN_COMMON=$(top_builddir)/src/libbitcoin_common.a
-LIBBITCOIN_CLI=$(top_builddir)/src/libbitcoin_cli.a
-LIBBITCOINQT=$(top_builddir)/src/qt/libbitcoinqt.a
-
-$(LIBBITCOIN):
-	$(MAKE) -C $(top_builddir)/src $(@F)
+LIBBITCOIN_SERVER=libbitcoin_server.a
+LIBBITCOIN_WALLET=libbitcoin_wallet.a
+LIBBITCOIN_COMMON=libbitcoin_common.a
+LIBBITCOIN_CLI=libbitcoin_cli.a
+LIBBITCOINQT=qt/libbitcoinqt.a
 
 if EMBEDDED_LEVELDB
 $(LIBLEVELDB) $(LIBMEMENV):
 	$(MAKE) -C $(top_builddir)/src leveldb/$(@F)
+$(LIBLEVELDB): $(LIBMEMENV)
 endif
 
-$(LIBBITCOINQT):
-	$(MAKE) -C $(top_builddir)/src/qt $(@F)
-
 .mm.o:
 	$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	  $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
new file mode 100644
index 000000000000..dcb3f37f508b
--- /dev/null
+++ b/src/Makefile.qt.include
@@ -0,0 +1,387 @@
+AM_CPPFLAGS += -I$(top_srcdir)/src \
+  -I$(top_builddir)/src/qt \
+  -I$(top_builddir)/src/qt/forms \
+  $(PROTOBUF_CFLAGS) \
+  $(QR_CFLAGS)
+bin_PROGRAMS += qt/bitcoin-qt
+noinst_LIBRARIES += qt/libbitcoinqt.a
+
+# bitcoin qt core #
+QT_TS = \
+  qt/locale/bitcoin_ach.ts \
+  qt/locale/bitcoin_af_ZA.ts \
+  qt/locale/bitcoin_ar.ts \
+  qt/locale/bitcoin_be_BY.ts \
+  qt/locale/bitcoin_bg.ts \
+  qt/locale/bitcoin_bs.ts \
+  qt/locale/bitcoin_ca_ES.ts \
+  qt/locale/bitcoin_ca.ts \
+  qt/locale/bitcoin_ca@valencia.ts \
+  qt/locale/bitcoin_cmn.ts \
+  qt/locale/bitcoin_cs.ts \
+  qt/locale/bitcoin_cy.ts \
+  qt/locale/bitcoin_da.ts \
+  qt/locale/bitcoin_de.ts \
+  qt/locale/bitcoin_el_GR.ts \
+  qt/locale/bitcoin_en.ts \
+  qt/locale/bitcoin_eo.ts \
+  qt/locale/bitcoin_es_CL.ts \
+  qt/locale/bitcoin_es_DO.ts \
+  qt/locale/bitcoin_es_MX.ts \
+  qt/locale/bitcoin_es.ts \
+  qt/locale/bitcoin_es_UY.ts \
+  qt/locale/bitcoin_et.ts \
+  qt/locale/bitcoin_eu_ES.ts \
+  qt/locale/bitcoin_fa_IR.ts \
+  qt/locale/bitcoin_fa.ts \
+  qt/locale/bitcoin_fi.ts \
+  qt/locale/bitcoin_fr_CA.ts \
+  qt/locale/bitcoin_fr.ts \
+  qt/locale/bitcoin_gl.ts \
+  qt/locale/bitcoin_gu_IN.ts \
+  qt/locale/bitcoin_he.ts \
+  qt/locale/bitcoin_hi_IN.ts \
+  qt/locale/bitcoin_hr.ts \
+  qt/locale/bitcoin_hu.ts \
+  qt/locale/bitcoin_id_ID.ts \
+  qt/locale/bitcoin_it.ts \
+  qt/locale/bitcoin_ja.ts \
+  qt/locale/bitcoin_ka.ts \
+  qt/locale/bitcoin_kk_KZ.ts \
+  qt/locale/bitcoin_ko_KR.ts \
+  qt/locale/bitcoin_ky.ts \
+  qt/locale/bitcoin_la.ts \
+  qt/locale/bitcoin_lt.ts \
+  qt/locale/bitcoin_lv_LV.ts \
+  qt/locale/bitcoin_mn.ts \
+  qt/locale/bitcoin_ms_MY.ts \
+  qt/locale/bitcoin_nb.ts \
+  qt/locale/bitcoin_nl.ts \
+  qt/locale/bitcoin_pam.ts \
+  qt/locale/bitcoin_pl.ts \
+  qt/locale/bitcoin_pt_BR.ts \
+  qt/locale/bitcoin_pt_PT.ts \
+  qt/locale/bitcoin_ro_RO.ts \
+  qt/locale/bitcoin_ru.ts \
+  qt/locale/bitcoin_sah.ts \
+  qt/locale/bitcoin_sk.ts \
+  qt/locale/bitcoin_sl_SI.ts \
+  qt/locale/bitcoin_sq.ts \
+  qt/locale/bitcoin_sr.ts \
+  qt/locale/bitcoin_sv.ts \
+  qt/locale/bitcoin_th_TH.ts \
+  qt/locale/bitcoin_tr.ts \
+  qt/locale/bitcoin_uk.ts \
+  qt/locale/bitcoin_ur_PK.ts \
+  qt/locale/bitcoin_uz@Cyrl.ts \
+  qt/locale/bitcoin_vi.ts \
+  qt/locale/bitcoin_vi_VN.ts \
+  qt/locale/bitcoin_zh_CN.ts \
+  qt/locale/bitcoin_zh_HK.ts \
+  qt/locale/bitcoin_zh_TW.ts
+
+QT_FORMS_UI = \
+  qt/forms/aboutdialog.ui \
+  qt/forms/addressbookpage.ui \
+  qt/forms/askpassphrasedialog.ui \
+  qt/forms/coincontroldialog.ui \
+  qt/forms/editaddressdialog.ui \
+  qt/forms/helpmessagedialog.ui \
+  qt/forms/intro.ui \
+  qt/forms/openuridialog.ui \
+  qt/forms/optionsdialog.ui \
+  qt/forms/overviewpage.ui \
+  qt/forms/receivecoinsdialog.ui \
+  qt/forms/receiverequestdialog.ui \
+  qt/forms/rpcconsole.ui \
+  qt/forms/sendcoinsdialog.ui \
+  qt/forms/sendcoinsentry.ui \
+  qt/forms/signverifymessagedialog.ui \
+  qt/forms/transactiondescdialog.ui
+
+QT_MOC_CPP = \
+  qt/moc_addressbookpage.cpp \
+  qt/moc_addresstablemodel.cpp \
+  qt/moc_askpassphrasedialog.cpp \
+  qt/moc_bitcoinaddressvalidator.cpp \
+  qt/moc_bitcoinamountfield.cpp \
+  qt/moc_bitcoingui.cpp \
+  qt/moc_bitcoinunits.cpp \
+  qt/moc_clientmodel.cpp \
+  qt/moc_coincontroldialog.cpp \
+  qt/moc_coincontroltreewidget.cpp \
+  qt/moc_csvmodelwriter.cpp \
+  qt/moc_editaddressdialog.cpp \
+  qt/moc_guiutil.cpp \
+  qt/moc_intro.cpp \
+  qt/moc_macdockiconhandler.cpp \
+  qt/moc_macnotificationhandler.cpp \
+  qt/moc_monitoreddatamapper.cpp \
+  qt/moc_notificator.cpp \
+  qt/moc_openuridialog.cpp \
+  qt/moc_optionsdialog.cpp \
+  qt/moc_optionsmodel.cpp \
+  qt/moc_overviewpage.cpp \
+  qt/moc_peertablemodel.cpp \
+  qt/moc_paymentserver.cpp \
+  qt/moc_qvalidatedlineedit.cpp \
+  qt/moc_qvaluecombobox.cpp \
+  qt/moc_receivecoinsdialog.cpp \
+  qt/moc_receiverequestdialog.cpp \
+  qt/moc_recentrequeststablemodel.cpp \
+  qt/moc_rpcconsole.cpp \
+  qt/moc_sendcoinsdialog.cpp \
+  qt/moc_sendcoinsentry.cpp \
+  qt/moc_signverifymessagedialog.cpp \
+  qt/moc_splashscreen.cpp \
+  qt/moc_trafficgraphwidget.cpp \
+  qt/moc_transactiondesc.cpp \
+  qt/moc_transactiondescdialog.cpp \
+  qt/moc_transactionfilterproxy.cpp \
+  qt/moc_transactiontablemodel.cpp \
+  qt/moc_transactionview.cpp \
+  qt/moc_utilitydialog.cpp \
+  qt/moc_walletframe.cpp \
+  qt/moc_walletmodel.cpp \
+  qt/moc_walletview.cpp
+
+BITCOIN_MM = \
+  qt/macdockiconhandler.mm \
+  qt/macnotificationhandler.mm
+
+QT_MOC = \
+  qt/bitcoin.moc \
+  qt/intro.moc \
+  qt/overviewpage.moc \
+  qt/rpcconsole.moc
+
+QT_QRC_CPP = qt/qrc_bitcoin.cpp
+QT_QRC = qt/bitcoin.qrc
+
+PROTOBUF_CC = qt/paymentrequest.pb.cc
+PROTOBUF_H = qt/paymentrequest.pb.h
+PROTOBUF_PROTO = qt/paymentrequest.proto
+
+BITCOIN_QT_H = \
+  qt/addressbookpage.h \
+  qt/addresstablemodel.h \
+  qt/askpassphrasedialog.h \
+  qt/bitcoinaddressvalidator.h \
+  qt/bitcoinamountfield.h \
+  qt/bitcoingui.h \
+  qt/bitcoinunits.h \
+  qt/clientmodel.h \
+  qt/coincontroldialog.h \
+  qt/coincontroltreewidget.h \
+  qt/csvmodelwriter.h \
+  qt/editaddressdialog.h \
+  qt/guiconstants.h \
+  qt/guiutil.h \
+  qt/intro.h \
+  qt/macdockiconhandler.h \
+  qt/macnotificationhandler.h \
+  qt/monitoreddatamapper.h \
+  qt/notificator.h \
+  qt/openuridialog.h \
+  qt/optionsdialog.h \
+  qt/optionsmodel.h \
+  qt/overviewpage.h \
+  qt/paymentrequestplus.h \
+  qt/paymentserver.h \
+  qt/peertablemodel.h \
+  qt/qvalidatedlineedit.h \
+  qt/qvaluecombobox.h \
+  qt/receivecoinsdialog.h \
+  qt/receiverequestdialog.h \
+  qt/recentrequeststablemodel.h \
+  qt/rpcconsole.h \
+  qt/sendcoinsdialog.h \
+  qt/sendcoinsentry.h \
+  qt/signverifymessagedialog.h \
+  qt/splashscreen.h \
+  qt/trafficgraphwidget.h \
+  qt/transactiondesc.h \
+  qt/transactiondescdialog.h \
+  qt/transactionfilterproxy.h \
+  qt/transactionrecord.h \
+  qt/transactiontablemodel.h \
+  qt/transactionview.h \
+  qt/utilitydialog.h \
+  qt/walletframe.h \
+  qt/walletmodel.h \
+  qt/walletmodeltransaction.h \
+  qt/walletview.h \
+  qt/winshutdownmonitor.h
+
+RES_ICONS = \
+  qt/res/icons/add.png \
+  qt/res/icons/address-book.png \
+  qt/res/icons/bitcoin.ico \
+  qt/res/icons/bitcoin.png \
+  qt/res/icons/bitcoin_testnet.ico \
+  qt/res/icons/bitcoin_testnet.png \
+  qt/res/icons/clock1.png \
+  qt/res/icons/clock2.png \
+  qt/res/icons/clock3.png \
+  qt/res/icons/clock4.png \
+  qt/res/icons/clock5.png \
+  qt/res/icons/configure.png \
+  qt/res/icons/connect0_16.png \
+  qt/res/icons/connect1_16.png \
+  qt/res/icons/connect2_16.png \
+  qt/res/icons/connect3_16.png \
+  qt/res/icons/connect4_16.png \
+  qt/res/icons/debugwindow.png \
+  qt/res/icons/edit.png \
+  qt/res/icons/editcopy.png \
+  qt/res/icons/editpaste.png \
+  qt/res/icons/export.png \
+  qt/res/icons/filesave.png \
+  qt/res/icons/history.png \
+  qt/res/icons/key.png \
+  qt/res/icons/lock_closed.png \
+  qt/res/icons/lock_open.png \
+  qt/res/icons/overview.png \
+  qt/res/icons/qrcode.png \
+  qt/res/icons/quit.png \
+  qt/res/icons/receive.png \
+  qt/res/icons/remove.png \
+  qt/res/icons/send.png \
+  qt/res/icons/synced.png \
+  qt/res/icons/toolbar.png \
+  qt/res/icons/toolbar_testnet.png \
+  qt/res/icons/transaction0.png \
+  qt/res/icons/transaction2.png \
+  qt/res/icons/transaction_conflicted.png \
+  qt/res/icons/tx_inout.png \
+  qt/res/icons/tx_input.png \
+  qt/res/icons/tx_output.png \
+  qt/res/icons/tx_mined.png
+
+BITCOIN_QT_CPP = \
+  qt/bitcoinaddressvalidator.cpp \
+  qt/bitcoinamountfield.cpp \
+  qt/bitcoingui.cpp \
+  qt/bitcoinunits.cpp \
+  qt/clientmodel.cpp \
+  qt/csvmodelwriter.cpp \
+  qt/guiutil.cpp \
+  qt/intro.cpp \
+  qt/monitoreddatamapper.cpp \
+  qt/notificator.cpp \
+  qt/optionsdialog.cpp \
+  qt/optionsmodel.cpp \
+  qt/peertablemodel.cpp \
+  qt/qvalidatedlineedit.cpp \
+  qt/qvaluecombobox.cpp \
+  qt/rpcconsole.cpp \
+  qt/splashscreen.cpp \
+  qt/trafficgraphwidget.cpp \
+  qt/utilitydialog.cpp \
+  qt/winshutdownmonitor.cpp
+
+if ENABLE_WALLET
+BITCOIN_QT_CPP += \
+  qt/addressbookpage.cpp \
+  qt/addresstablemodel.cpp \
+  qt/askpassphrasedialog.cpp \
+  qt/coincontroldialog.cpp \
+  qt/coincontroltreewidget.cpp \
+  qt/editaddressdialog.cpp \
+  qt/openuridialog.cpp \
+  qt/overviewpage.cpp \
+  qt/paymentrequestplus.cpp \
+  qt/paymentserver.cpp \
+  qt/receivecoinsdialog.cpp \
+  qt/receiverequestdialog.cpp \
+  qt/recentrequeststablemodel.cpp \
+  qt/sendcoinsdialog.cpp \
+  qt/sendcoinsentry.cpp \
+  qt/signverifymessagedialog.cpp \
+  qt/transactiondesc.cpp \
+  qt/transactiondescdialog.cpp \
+  qt/transactionfilterproxy.cpp \
+  qt/transactionrecord.cpp \
+  qt/transactiontablemodel.cpp \
+  qt/transactionview.cpp \
+  qt/walletframe.cpp \
+  qt/walletmodel.cpp \
+  qt/walletmodeltransaction.cpp \
+  qt/walletview.cpp
+endif
+
+RES_IMAGES = \
+  qt/res/images/about.png \
+  qt/res/images/splash.png \
+  qt/res/images/splash_testnet.png
+
+RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
+
+BITCOIN_RC = qt/res/bitcoin-qt-res.rc
+
+qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
+  -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
+qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
+  $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
+
+nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
+  $(PROTOBUF_H) $(QT_QRC_CPP)
+
+# forms/foo.h -> forms/ui_foo.h
+QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
+
+# Most files will depend on the forms and moc files as includes. Generate them
+# before anything else.
+$(QT_MOC): $(QT_FORMS_H)
+$(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) : | $(QT_MOC)
+
+#Generating these with a half-written protobuf header leads to wacky results.
+#This makes sure it's done.
+$(QT_MOC): $(PROTOBUF_H)
+$(QT_MOC_CPP): $(PROTOBUF_H)
+
+# bitcoin-qt binary #
+qt_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
+  -I$(top_srcdir)/src/qt/forms
+qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
+if TARGET_DARWIN
+  qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
+endif
+if TARGET_WINDOWS
+  qt_bitcoin_qt_SOURCES += $(BITCOIN_RC)
+endif
+qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
+if ENABLE_WALLET
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
+endif
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+
+#locale/foo.ts -> locale/foo.qm
+QT_QM=$(QT_TS:.ts=.qm)
+
+.SECONDARY: $(QT_QM)
+
+qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
+	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
+	@cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
+
+translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
+	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
+	@QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
+
+$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
+	@cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
+	  echo error: could not build $@
+	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
+	$(SED) -e '/^\*\*.*by:/d' $@  > $@.n && mv $@{.n,}
+
+CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno
+
+CLEANFILES += $(CLEAN_QT)
+
+bitcoin_qt_clean: FORCE
+	rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT)
+
+bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
new file mode 100644
index 000000000000..0d08a636e90a
--- /dev/null
+++ b/src/Makefile.qttest.include
@@ -0,0 +1,52 @@
+AM_CPPFLAGS += -I$(top_srcdir)/src \
+  -I$(top_srcdir)/src/qt \
+  -I$(top_builddir)/src/qt \
+  $(PROTOBUF_CFLAGS) \
+    $(QR_CFLAGS)
+bin_PROGRAMS += qt/test/test_bitcoin-qt
+TESTS += qt/test/test_bitcoin-qt
+
+TEST_QT_MOC_CPP = qt/test/moc_uritests.cpp
+
+if ENABLE_WALLET
+TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp
+endif
+
+TEST_QT_H = \
+  qt/test/uritests.h \
+  qt/test/paymentrequestdata.h \
+  qt/test/paymentservertests.h
+
+qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
+
+qt_test_test_bitcoin_qt_SOURCES = \
+  qt/test/test_main.cpp \
+  qt/test/uritests.cpp \
+  $(TEST_QT_H)
+if ENABLE_WALLET
+qt_test_test_bitcoin_qt_SOURCES += \
+  qt/test/paymentservertests.cpp
+endif
+
+nodist_qt_test_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
+
+qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
+if ENABLE_WALLET
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
+endif
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
+  $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
+  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+
+CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
+
+CLEANFILES += $(CLEAN_BITCOIN_QT_TEST)
+
+test_bitcoin_qt : qt/test/test_bitcoin-qt$(EXEEXT)
+
+test_bitcoin_qt_check : qt/test/test_bitcoin-qt$(EXEEXT) FORCE
+	$(MAKE) check-TESTS TESTS=$^
+
+test_bitcoin_qt_clean: FORCE
+	rm -f $(CLEAN_BITCOIN_QT_TEST) $(qt_test_test_bitcoin_qt_OBJECTS)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
new file mode 100644
index 000000000000..4a70b0f9e941
--- /dev/null
+++ b/src/Makefile.test.include
@@ -0,0 +1,87 @@
+AM_CPPFLAGS += -I$(top_builddir)/src/test/
+
+TESTS += test/test_bitcoin
+bin_PROGRAMS += test/test_bitcoin
+TEST_SRCDIR = test
+TEST_BINARY=test/test_bitcoin$(EXEEXT)
+
+JSON_TEST_FILES = \
+  test/data/script_valid.json \
+  test/data/base58_keys_valid.json \
+  test/data/sig_canonical.json \
+  test/data/sig_noncanonical.json \
+  test/data/base58_encode_decode.json \
+  test/data/base58_keys_invalid.json \
+  test/data/script_invalid.json \
+  test/data/tx_invalid.json \
+  test/data/tx_valid.json \
+  test/data/sighash.json
+
+RAW_TEST_FILES = test/data/alertTests.raw
+
+GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
+
+BITCOIN_TESTS =\
+  test/bignum.h \
+  test/alert_tests.cpp \
+  test/allocator_tests.cpp \
+  test/base32_tests.cpp \
+  test/base58_tests.cpp \
+  test/base64_tests.cpp \
+  test/bloom_tests.cpp \
+  test/canonical_tests.cpp \
+  test/checkblock_tests.cpp \
+  test/Checkpoints_tests.cpp \
+  test/compress_tests.cpp \
+  test/DoS_tests.cpp \
+  test/getarg_tests.cpp \
+  test/key_tests.cpp \
+  test/main_tests.cpp \
+  test/miner_tests.cpp \
+  test/mruset_tests.cpp \
+  test/multisig_tests.cpp \
+  test/netbase_tests.cpp \
+  test/pmt_tests.cpp \
+  test/rpc_tests.cpp \
+  test/script_P2SH_tests.cpp \
+  test/script_tests.cpp \
+  test/serialize_tests.cpp \
+  test/sigopcount_tests.cpp \
+  test/test_bitcoin.cpp \
+  test/transaction_tests.cpp \
+  test/uint256_tests.cpp \
+  test/util_tests.cpp \
+  test/scriptnum_tests.cpp \
+  test/sighash_tests.cpp
+
+if ENABLE_WALLET
+BITCOIN_TESTS += \
+  test/accounting_tests.cpp \
+  test/wallet_tests.cpp \
+  test/rpc_wallet_tests.cpp
+endif
+
+test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
+test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+  $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+if ENABLE_WALLET
+test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
+endif
+test_test_bitcoin_LDADD += $(BDB_LIBS)
+
+nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
+
+$(BITCOIN_TESTS): $(GENERATED_TEST_FILES)
+
+CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
+
+CLEANFILES += $(CLEAN_BITCOIN_TEST)
+
+bitcoin_test: $(TEST_BINARY)
+
+bitcoin_test_check: $(TEST_BINARY) FORCE
+	$(MAKE) check-TESTS TESTS=$^
+
+bitcoin_test_clean : FORCE
+	rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)

From be4e9aeb148420317109d173d7fb3bc56b37f434 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 28 May 2014 13:40:35 -0400
Subject: [PATCH 0136/1819] build: delete old Makefile.am's

---
 src/qt/Makefile.am      | 382 ----------------------------------------
 src/qt/test/Makefile.am |  46 -----
 src/test/Makefile.am    |  77 --------
 3 files changed, 505 deletions(-)
 delete mode 100644 src/qt/Makefile.am
 delete mode 100644 src/qt/test/Makefile.am
 delete mode 100644 src/test/Makefile.am

diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
deleted file mode 100644
index d527f790ef30..000000000000
--- a/src/qt/Makefile.am
+++ /dev/null
@@ -1,382 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src \
-  -I$(top_builddir)/src/qt \
-  -I$(top_builddir)/src/qt/forms \
-  $(PROTOBUF_CFLAGS) \
-  $(QR_CFLAGS)
-bin_PROGRAMS = bitcoin-qt
-noinst_LIBRARIES = libbitcoinqt.a
-SUBDIRS = . $(BUILD_TEST_QT)
-DIST_SUBDIRS = . test
-
-# bitcoin qt core #
-QT_TS = \
-  locale/bitcoin_ach.ts \
-  locale/bitcoin_af_ZA.ts \
-  locale/bitcoin_ar.ts \
-  locale/bitcoin_be_BY.ts \
-  locale/bitcoin_bg.ts \
-  locale/bitcoin_bs.ts \
-  locale/bitcoin_ca_ES.ts \
-  locale/bitcoin_ca.ts \
-  locale/bitcoin_ca@valencia.ts \
-  locale/bitcoin_cmn.ts \
-  locale/bitcoin_cs.ts \
-  locale/bitcoin_cy.ts \
-  locale/bitcoin_da.ts \
-  locale/bitcoin_de.ts \
-  locale/bitcoin_el_GR.ts \
-  locale/bitcoin_en.ts \
-  locale/bitcoin_eo.ts \
-  locale/bitcoin_es_CL.ts \
-  locale/bitcoin_es_DO.ts \
-  locale/bitcoin_es_MX.ts \
-  locale/bitcoin_es.ts \
-  locale/bitcoin_es_UY.ts \
-  locale/bitcoin_et.ts \
-  locale/bitcoin_eu_ES.ts \
-  locale/bitcoin_fa_IR.ts \
-  locale/bitcoin_fa.ts \
-  locale/bitcoin_fi.ts \
-  locale/bitcoin_fr_CA.ts \
-  locale/bitcoin_fr.ts \
-  locale/bitcoin_gl.ts \
-  locale/bitcoin_gu_IN.ts \
-  locale/bitcoin_he.ts \
-  locale/bitcoin_hi_IN.ts \
-  locale/bitcoin_hr.ts \
-  locale/bitcoin_hu.ts \
-  locale/bitcoin_id_ID.ts \
-  locale/bitcoin_it.ts \
-  locale/bitcoin_ja.ts \
-  locale/bitcoin_ka.ts \
-  locale/bitcoin_kk_KZ.ts \
-  locale/bitcoin_ko_KR.ts \
-  locale/bitcoin_ky.ts \
-  locale/bitcoin_la.ts \
-  locale/bitcoin_lt.ts \
-  locale/bitcoin_lv_LV.ts \
-  locale/bitcoin_mn.ts \
-  locale/bitcoin_ms_MY.ts \
-  locale/bitcoin_nb.ts \
-  locale/bitcoin_nl.ts \
-  locale/bitcoin_pam.ts \
-  locale/bitcoin_pl.ts \
-  locale/bitcoin_pt_BR.ts \
-  locale/bitcoin_pt_PT.ts \
-  locale/bitcoin_ro_RO.ts \
-  locale/bitcoin_ru.ts \
-  locale/bitcoin_sah.ts \
-  locale/bitcoin_sk.ts \
-  locale/bitcoin_sl_SI.ts \
-  locale/bitcoin_sq.ts \
-  locale/bitcoin_sr.ts \
-  locale/bitcoin_sv.ts \
-  locale/bitcoin_th_TH.ts \
-  locale/bitcoin_tr.ts \
-  locale/bitcoin_uk.ts \
-  locale/bitcoin_ur_PK.ts \
-  locale/bitcoin_uz@Cyrl.ts \
-  locale/bitcoin_vi.ts \
-  locale/bitcoin_vi_VN.ts \
-  locale/bitcoin_zh_CN.ts \
-  locale/bitcoin_zh_HK.ts \
-  locale/bitcoin_zh_TW.ts
-
-QT_FORMS_UI = \
-  forms/aboutdialog.ui \
-  forms/addressbookpage.ui \
-  forms/askpassphrasedialog.ui \
-  forms/coincontroldialog.ui \
-  forms/editaddressdialog.ui \
-  forms/helpmessagedialog.ui \
-  forms/intro.ui \
-  forms/openuridialog.ui \
-  forms/optionsdialog.ui \
-  forms/overviewpage.ui \
-  forms/receivecoinsdialog.ui \
-  forms/receiverequestdialog.ui \
-  forms/rpcconsole.ui \
-  forms/sendcoinsdialog.ui \
-  forms/sendcoinsentry.ui \
-  forms/signverifymessagedialog.ui \
-  forms/transactiondescdialog.ui
-
-QT_MOC_CPP = \
-  moc_addressbookpage.cpp \
-  moc_addresstablemodel.cpp \
-  moc_askpassphrasedialog.cpp \
-  moc_bitcoinaddressvalidator.cpp \
-  moc_bitcoinamountfield.cpp \
-  moc_bitcoingui.cpp \
-  moc_bitcoinunits.cpp \
-  moc_clientmodel.cpp \
-  moc_coincontroldialog.cpp \
-  moc_coincontroltreewidget.cpp \
-  moc_csvmodelwriter.cpp \
-  moc_editaddressdialog.cpp \
-  moc_guiutil.cpp \
-  moc_intro.cpp \
-  moc_macdockiconhandler.cpp \
-  moc_macnotificationhandler.cpp \
-  moc_monitoreddatamapper.cpp \
-  moc_notificator.cpp \
-  moc_openuridialog.cpp \
-  moc_optionsdialog.cpp \
-  moc_optionsmodel.cpp \
-  moc_overviewpage.cpp \
-  moc_peertablemodel.cpp \
-  moc_paymentserver.cpp \
-  moc_qvalidatedlineedit.cpp \
-  moc_qvaluecombobox.cpp \
-  moc_receivecoinsdialog.cpp \
-  moc_receiverequestdialog.cpp \
-  moc_recentrequeststablemodel.cpp \
-  moc_rpcconsole.cpp \
-  moc_sendcoinsdialog.cpp \
-  moc_sendcoinsentry.cpp \
-  moc_signverifymessagedialog.cpp \
-  moc_splashscreen.cpp \
-  moc_trafficgraphwidget.cpp \
-  moc_transactiondesc.cpp \
-  moc_transactiondescdialog.cpp \
-  moc_transactionfilterproxy.cpp \
-  moc_transactiontablemodel.cpp \
-  moc_transactionview.cpp \
-  moc_utilitydialog.cpp \
-  moc_walletframe.cpp \
-  moc_walletmodel.cpp \
-  moc_walletview.cpp
-
-BITCOIN_MM = \
-  macdockiconhandler.mm \
-  macnotificationhandler.mm
-
-QT_MOC = \
-  bitcoin.moc \
-  intro.moc \
-  overviewpage.moc \
-  rpcconsole.moc
-
-QT_QRC_CPP = qrc_bitcoin.cpp
-QT_QRC = bitcoin.qrc
-
-PROTOBUF_CC = paymentrequest.pb.cc
-PROTOBUF_H = paymentrequest.pb.h
-PROTOBUF_PROTO = paymentrequest.proto
-
-BITCOIN_QT_H = \
-  addressbookpage.h \
-  addresstablemodel.h \
-  askpassphrasedialog.h \
-  bitcoinaddressvalidator.h \
-  bitcoinamountfield.h \
-  bitcoingui.h \
-  bitcoinunits.h \
-  clientmodel.h \
-  coincontroldialog.h \
-  coincontroltreewidget.h \
-  csvmodelwriter.h \
-  editaddressdialog.h \
-  guiconstants.h \
-  guiutil.h \
-  intro.h \
-  macdockiconhandler.h \
-  macnotificationhandler.h \
-  monitoreddatamapper.h \
-  notificator.h \
-  openuridialog.h \
-  optionsdialog.h \
-  optionsmodel.h \
-  overviewpage.h \
-  paymentrequestplus.h \
-  paymentserver.h \
-  peertablemodel.h \
-  qvalidatedlineedit.h \
-  qvaluecombobox.h \
-  receivecoinsdialog.h \
-  receiverequestdialog.h \
-  recentrequeststablemodel.h \
-  rpcconsole.h \
-  sendcoinsdialog.h \
-  sendcoinsentry.h \
-  signverifymessagedialog.h \
-  splashscreen.h \
-  trafficgraphwidget.h \
-  transactiondesc.h \
-  transactiondescdialog.h \
-  transactionfilterproxy.h \
-  transactionrecord.h \
-  transactiontablemodel.h \
-  transactionview.h \
-  utilitydialog.h \
-  walletframe.h \
-  walletmodel.h \
-  walletmodeltransaction.h \
-  walletview.h \
-  winshutdownmonitor.h
-
-RES_ICONS = \
-  res/icons/add.png \
-  res/icons/address-book.png \
-  res/icons/bitcoin.ico \
-  res/icons/bitcoin.png \
-  res/icons/bitcoin_testnet.ico \
-  res/icons/bitcoin_testnet.png \
-  res/icons/clock1.png \
-  res/icons/clock2.png \
-  res/icons/clock3.png \
-  res/icons/clock4.png \
-  res/icons/clock5.png \
-  res/icons/configure.png \
-  res/icons/connect0_16.png \
-  res/icons/connect1_16.png \
-  res/icons/connect2_16.png \
-  res/icons/connect3_16.png \
-  res/icons/connect4_16.png \
-  res/icons/debugwindow.png \
-  res/icons/edit.png \
-  res/icons/editcopy.png \
-  res/icons/editpaste.png \
-  res/icons/export.png \
-  res/icons/filesave.png \
-  res/icons/history.png \
-  res/icons/key.png \
-  res/icons/lock_closed.png \
-  res/icons/lock_open.png \
-  res/icons/overview.png \
-  res/icons/qrcode.png \
-  res/icons/quit.png \
-  res/icons/receive.png \
-  res/icons/remove.png \
-  res/icons/send.png \
-  res/icons/synced.png \
-  res/icons/toolbar.png \
-  res/icons/toolbar_testnet.png \
-  res/icons/transaction0.png \
-  res/icons/transaction2.png \
-  res/icons/transaction_conflicted.png \
-  res/icons/tx_inout.png \
-  res/icons/tx_input.png \
-  res/icons/tx_output.png \
-  res/icons/tx_mined.png
-
-BITCOIN_QT_CPP = \
-  bitcoin.cpp \
-  bitcoinaddressvalidator.cpp \
-  bitcoinamountfield.cpp \
-  bitcoingui.cpp \
-  bitcoinunits.cpp \
-  clientmodel.cpp \
-  csvmodelwriter.cpp \
-  guiutil.cpp \
-  intro.cpp \
-  monitoreddatamapper.cpp \
-  notificator.cpp \
-  optionsdialog.cpp \
-  optionsmodel.cpp \
-  peertablemodel.cpp \
-  qvalidatedlineedit.cpp \
-  qvaluecombobox.cpp \
-  rpcconsole.cpp \
-  splashscreen.cpp \
-  trafficgraphwidget.cpp \
-  utilitydialog.cpp \
-  winshutdownmonitor.cpp
-
-if ENABLE_WALLET
-BITCOIN_QT_CPP += \
-  addressbookpage.cpp \
-  addresstablemodel.cpp \
-  askpassphrasedialog.cpp \
-  coincontroldialog.cpp \
-  coincontroltreewidget.cpp \
-  editaddressdialog.cpp \
-  openuridialog.cpp \
-  overviewpage.cpp \
-  paymentrequestplus.cpp \
-  paymentserver.cpp \
-  receivecoinsdialog.cpp \
-  receiverequestdialog.cpp \
-  recentrequeststablemodel.cpp \
-  sendcoinsdialog.cpp \
-  sendcoinsentry.cpp \
-  signverifymessagedialog.cpp \
-  transactiondesc.cpp \
-  transactiondescdialog.cpp \
-  transactionfilterproxy.cpp \
-  transactionrecord.cpp \
-  transactiontablemodel.cpp \
-  transactionview.cpp \
-  walletframe.cpp \
-  walletmodel.cpp \
-  walletmodeltransaction.cpp \
-  walletview.cpp
-endif
-
-RES_IMAGES = \
-  res/images/about.png \
-  res/images/splash.png \
-  res/images/splash_testnet.png
-
-RES_MOVIES = $(wildcard res/movies/spinner-*.png)
-
-BITCOIN_RC = res/bitcoin-qt-res.rc
-
-libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
-libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
-  $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
-
-nodist_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
-  $(PROTOBUF_H) $(QT_QRC_CPP)
-
-BUILT_SOURCES = $(nodist_libbitcoinqt_a_SOURCES)
-
-#Generating these with a half-written protobuf header leads to wacky results.
-#This makes sure it's done.
-$(QT_MOC): $(PROTOBUF_H)
-$(QT_MOC_CPP): $(PROTOBUF_H)
-
-# bitcoin-qt binary #
-bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(top_srcdir)/src/qt/forms
-bitcoin_qt_SOURCES = bitcoin.cpp
-if TARGET_DARWIN
-  bitcoin_qt_SOURCES += $(BITCOIN_MM)
-endif
-if TARGET_WINDOWS
-  bitcoin_qt_SOURCES += $(BITCOIN_RC)
-endif
-bitcoin_qt_LDADD = libbitcoinqt.a $(LIBBITCOIN_SERVER)
-if ENABLE_WALLET
-bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
-endif
-bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
-bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
-
-# forms/foo.h -> forms/ui_foo.h
-QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
-
-#locale/foo.ts -> locale/foo.qm
-QT_QM=$(QT_TS:.ts=.qm)
-
-.PHONY: FORCE
-.SECONDARY: $(QT_QM)
-
-bitcoinstrings.cpp: FORCE
-	$(MAKE) -C $(top_srcdir)/src qt/bitcoinstrings.cpp
-
-translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
-	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
-	@QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts locale/bitcoin_en.ts
-
-$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
-	@cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
-	  echo error: could not build $@
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@  > $@.n && mv $@{.n,}
-
-CLEANFILES = $(BUILT_SOURCES) $(QT_QM) $(QT_FORMS_H) *.gcda *.gcno
diff --git a/src/qt/test/Makefile.am b/src/qt/test/Makefile.am
deleted file mode 100644
index 2461b5ff4d4d..000000000000
--- a/src/qt/test/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src \
-  -I$(top_srcdir)/src/qt \
-  -I$(top_builddir)/src/qt \
-  $(PROTOBUF_CFLAGS) \
-    $(QR_CFLAGS)
-bin_PROGRAMS = test_bitcoin-qt
-TESTS = test_bitcoin-qt
-
-TEST_QT_MOC_CPP = moc_uritests.cpp
-
-if ENABLE_WALLET
-TEST_QT_MOC_CPP += moc_paymentservertests.cpp
-endif
-
-TEST_QT_H = \
-  uritests.h \
-  paymentrequestdata.h \
-  paymentservertests.h
-
-BUILT_SOURCES = $(TEST_QT_MOC_CPP)
-
-test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
-
-test_bitcoin_qt_SOURCES = \
-  test_main.cpp \
-  uritests.cpp \
-  $(TEST_QT_H)
-if ENABLE_WALLET
-test_bitcoin_qt_SOURCES += \
-  paymentservertests.cpp
-endif
-
-nodist_test_bitcoin_qt_SOURCES = $(TEST_QT_MOC_CPP)
-
-test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
-if ENABLE_WALLET
-test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
-endif
-test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
-  $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
-  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
-test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
-
-CLEANFILES = $(BUILT_SOURCES) *.gcda *.gcno
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
deleted file mode 100644
index cde3a31e2fb7..000000000000
--- a/src/test/Makefile.am
+++ /dev/null
@@ -1,77 +0,0 @@
-include $(top_srcdir)/src/Makefile.include
-
-AM_CPPFLAGS += -I$(top_srcdir)/src
-
-bin_PROGRAMS = test_bitcoin
-
-TESTS = test_bitcoin
-
-JSON_TEST_FILES = \
-  data/script_valid.json \
-  data/base58_keys_valid.json \
-  data/sig_canonical.json \
-  data/sig_noncanonical.json \
-  data/base58_encode_decode.json \
-  data/base58_keys_invalid.json \
-  data/script_invalid.json \
-  data/tx_invalid.json \
-  data/tx_valid.json \
-  data/sighash.json
-
-RAW_TEST_FILES = data/alertTests.raw
-
-BUILT_SOURCES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
-
-# test_bitcoin binary #
-test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
-test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
-if ENABLE_WALLET
-test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
-endif
-test_bitcoin_LDADD += $(BDB_LIBS)
-
-test_bitcoin_SOURCES = \
-  bignum.h \
-  alert_tests.cpp \
-  allocator_tests.cpp \
-  base32_tests.cpp \
-  base58_tests.cpp \
-  base64_tests.cpp \
-  bloom_tests.cpp \
-  canonical_tests.cpp \
-  checkblock_tests.cpp \
-  Checkpoints_tests.cpp \
-  compress_tests.cpp \
-  DoS_tests.cpp \
-  getarg_tests.cpp \
-  key_tests.cpp \
-  main_tests.cpp \
-  miner_tests.cpp \
-  mruset_tests.cpp \
-  multisig_tests.cpp \
-  netbase_tests.cpp \
-  pmt_tests.cpp \
-  rpc_tests.cpp \
-  script_P2SH_tests.cpp \
-  script_tests.cpp \
-  serialize_tests.cpp \
-  sigopcount_tests.cpp \
-  test_bitcoin.cpp \
-  transaction_tests.cpp \
-  uint256_tests.cpp \
-  util_tests.cpp \
-  scriptnum_tests.cpp \
-  sighash_tests.cpp \
-  $(JSON_TEST_FILES) $(RAW_TEST_FILES)
-
-if ENABLE_WALLET
-test_bitcoin_SOURCES += \
-   accounting_tests.cpp \
-   wallet_tests.cpp \
-   rpc_wallet_tests.cpp
-endif
-
-nodist_test_bitcoin_SOURCES = $(BUILT_SOURCES)
-
-CLEANFILES = *.gcda *.gcno $(BUILT_SOURCES)

From 8b09ef7b6370800a1a9fd6f067abf1aaab5d6cfa Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 28 May 2014 13:41:35 -0400
Subject: [PATCH 0137/1819] build: add stub makefiles for easier subdir builds

---
 src/qt/Makefile      | 9 +++++++++
 src/qt/test/Makefile | 6 ++++++
 src/test/Makefile    | 6 ++++++
 3 files changed, 21 insertions(+)
 create mode 100644 src/qt/Makefile
 create mode 100644 src/qt/test/Makefile
 create mode 100644 src/test/Makefile

diff --git a/src/qt/Makefile b/src/qt/Makefile
new file mode 100644
index 000000000000..b9dcf0c59922
--- /dev/null
+++ b/src/qt/Makefile
@@ -0,0 +1,9 @@
+.PHONY: FORCE
+all: FORCE
+	$(MAKE) -C .. bitcoin_qt test_bitcoin_qt
+clean: FORCE
+	$(MAKE) -C .. bitcoin_qt_clean test_bitcoin_qt_clean
+check: FORCE
+	$(MAKE) -C .. test_bitcoin_qt_check
+bitcoin-qt bitcoin-qt.exe: FORCE
+	 $(MAKE) -C .. bitcoin_qt
diff --git a/src/qt/test/Makefile b/src/qt/test/Makefile
new file mode 100644
index 000000000000..a02f86b62ac9
--- /dev/null
+++ b/src/qt/test/Makefile
@@ -0,0 +1,6 @@
+all:
+	$(MAKE) -C ../../ test_bitcoin_qt
+clean:
+	$(MAKE) -C ../../ test_bitcoin_qt_clean
+check:
+	$(MAKE) -C ../../ test_bitcoin_qt_check
diff --git a/src/test/Makefile b/src/test/Makefile
new file mode 100644
index 000000000000..87bf73fec98d
--- /dev/null
+++ b/src/test/Makefile
@@ -0,0 +1,6 @@
+all:
+	$(MAKE) -C .. bitcoin_test
+clean:
+	$(MAKE) -C .. bitcoin_test_clean
+check:
+	$(MAKE) -C .. bitcoin_test_check

From 6b9f0d5554b75fcc24cbce10e16872df3e103226 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 4 Jun 2014 17:13:03 -0400
Subject: [PATCH 0138/1819] build: nuke Makefile.include from orbit

Rules and targets no longer need to be shared between subdirectories, so
this is no longer needed.
---
 src/Makefile.am           | 48 ++++++++++++++++++++-----
 src/Makefile.include      | 74 ---------------------------------------
 src/Makefile.qt.include   | 21 +++++++++++
 src/Makefile.test.include | 16 +++++++++
 4 files changed, 76 insertions(+), 83 deletions(-)
 delete mode 100644 src/Makefile.include

diff --git a/src/Makefile.am b/src/Makefile.am
index e7d121b4d6e4..b3e713b9ad5a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,27 @@
-include Makefile.include
+AM_CPPFLAGS =  $(INCLUDES) \
+  -I$(top_builddir)/src/obj \
+  $(BDB_CPPFLAGS) \
+  $(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
+AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
+AM_LDFLAGS = $(PTHREAD_CFLAGS)
 
 AM_CPPFLAGS += -I$(builddir)
 
+if EMBEDDED_LEVELDB
+LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include
+LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv
+LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a
+LIBMEMENV  += $(top_builddir)/src/leveldb/libmemenv.a
+
+# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
+$(LIBLEVELDB): $(LIBMEMENV)
+
+$(LIBLEVELDB) $(LIBMEMENV):
+	@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
+	  CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
+          OPT="$(CXXFLAGS) $(CPPFLAGS)"
+endif
+
 noinst_LIBRARIES = \
   libbitcoin_server.a \
   libbitcoin_common.a \
@@ -179,14 +199,6 @@ if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
 
-# NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
-leveldb/libleveldb.a: leveldb/libmemenv.a
-
-leveldb/%.a:
-	@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
-	  CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
-	  OPT="$(CXXFLAGS) $(CPPFLAGS)"
-
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
 DISTCLEANFILES = obj/build.h
@@ -197,6 +209,24 @@ clean-local:
 	-$(MAKE) -C leveldb clean
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
 
+.rc.o:
+	@test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \
+	  echo error: could not build $@
+
+.mm.o:
+	$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	  $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
+
+%.pb.cc %.pb.h: %.proto
+	test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)  || \
+	  echo error: could not build $@
+
+LIBBITCOIN_SERVER=libbitcoin_server.a
+LIBBITCOIN_WALLET=libbitcoin_wallet.a
+LIBBITCOIN_COMMON=libbitcoin_common.a
+LIBBITCOIN_CLI=libbitcoin_cli.a
+LIBBITCOINQT=qt/libbitcoinqt.a
+
 if ENABLE_TESTS
 include Makefile.test.include
 endif
diff --git a/src/Makefile.include b/src/Makefile.include
deleted file mode 100644
index d3d3d6385abc..000000000000
--- a/src/Makefile.include
+++ /dev/null
@@ -1,74 +0,0 @@
-if EMBEDDED_LEVELDB
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv
-LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a
-LIBMEMENV  += $(top_builddir)/src/leveldb/libmemenv.a
-endif
-
-AM_CPPFLAGS =  $(INCLUDES) \
-  -I$(top_builddir)/src/obj \
-  $(BDB_CPPFLAGS) \
-  $(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
-AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
-AM_LDFLAGS = $(PTHREAD_CFLAGS)
-
-LIBBITCOIN_SERVER=libbitcoin_server.a
-LIBBITCOIN_WALLET=libbitcoin_wallet.a
-LIBBITCOIN_COMMON=libbitcoin_common.a
-LIBBITCOIN_CLI=libbitcoin_cli.a
-LIBBITCOINQT=qt/libbitcoinqt.a
-
-if EMBEDDED_LEVELDB
-$(LIBLEVELDB) $(LIBMEMENV):
-	$(MAKE) -C $(top_builddir)/src leveldb/$(@F)
-$(LIBLEVELDB): $(LIBMEMENV)
-endif
-
-.mm.o:
-	$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-	  $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
-
-.rc.o:
-	@test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \
-          echo error: could not build $@
-
-ui_%.h: %.ui
-	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
-	@test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
-	$(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-
-%.moc: %.cpp
-	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-
-moc_%.cpp: %.h
-	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-
-%.qm: %.ts
-	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
-	@test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \
-	 echo error: could not build $(abs_builddir)/$@
-
-%.pb.cc %.pb.h: %.proto
-	test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)  || \
-	  echo error: could not build $@
-
-%.json.h: %.json
-	@$(MKDIR_P) $(@D)
-	@echo "namespace json_tests{" > $@
-	@echo "static unsigned const char $(*F)[] = {" >> $@
-	@$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
-	@echo "};};" >> $@
-	@echo "Generated $@"
-
-%.raw.h: %.raw
-	@$(MKDIR_P) $(@D)
-	@echo "namespace alert_tests{" > $@
-	@echo "static unsigned const char $(*F)[] = {" >> $@
-	@$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
-	@echo "};};" >> $@
-	@echo "Generated $@"
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index dcb3f37f508b..0cef2d2e6f7e 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -385,3 +385,24 @@ bitcoin_qt_clean: FORCE
 	rm -f $(CLEAN_QT) $(qt_libbitcoinqt_a_OBJECTS) $(qt_bitcoin_qt_OBJECTS) qt/bitcoin-qt$(EXEEXT) $(LIBBITCOINQT)
 
 bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
+
+ui_%.h: %.ui
+	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
+	@test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
+	$(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
+	$(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
+
+%.moc: %.cpp
+	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
+	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
+	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
+
+moc_%.cpp: %.h
+	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
+	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
+	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
+
+%.qm: %.ts
+	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
+	@test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \
+	  echo error: could not build $(abs_builddir)/$@
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 4a70b0f9e941..14288ee218e1 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -85,3 +85,19 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
 
 bitcoin_test_clean : FORCE
 	rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
+%.json.h: %.json
+	@$(MKDIR_P) $(@D)
+	@echo "namespace json_tests{" > $@
+	@echo "static unsigned const char $(*F)[] = {" >> $@
+	@$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
+	@echo "};};" >> $@
+	@echo "Generated $@"
+
+%.raw.h: %.raw
+	@$(MKDIR_P) $(@D)
+	@echo "namespace alert_tests{" > $@
+	@echo "static unsigned const char $(*F)[] = {" >> $@
+	@$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x  ,//g' >> $@
+	@echo "};};" >> $@
+	@echo "Generated $@"

From 70c71c50ce552c0358679653c04d7cc72a40222c Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 5 Jun 2014 14:17:50 -0400
Subject: [PATCH 0139/1819] build: Tidy up file generation output

- Some file generation was still noisy, silence it.
- AM_V_GEN is used rather than @ so that 'make V=1' works as intended
- Cut down on file copies and moves when using sed, use pipes instead
- Avoid the use of top_ and abs_ dirs where possible
---
 src/Makefile.am         | 10 +++++-----
 src/Makefile.qt.include | 34 +++++++++++++++-------------------
 2 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index b3e713b9ad5a..ce12ddcdbd49 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -210,16 +210,16 @@ clean-local:
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
 
 .rc.o:
-	@test -f $(WINDRES) && $(WINDRES) -i $< -o $@ || \
-	  echo error: could not build $@
+	@test -f $(WINDRES)
+	$(AM_V_GEN) $(WINDRES) -i $< -o $@
 
 .mm.o:
-	$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	  $(CPPFLAGS) $(AM_CXXFLAGS) $(QT_INCLUDES) $(CXXFLAGS)  -c -o $@ $<
 
 %.pb.cc %.pb.h: %.proto
-	test -f $(PROTOC) && $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)  || \
-	  echo error: could not build $@
+	@test -f $(PROTOC)
+	$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
 
 LIBBITCOIN_SERVER=libbitcoin_server.a
 LIBBITCOIN_WALLET=libbitcoin_wallet.a
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 0cef2d2e6f7e..a25699e392f9 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -365,17 +365,16 @@ QT_QM=$(QT_TS:.ts=.qm)
 
 qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
 	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
-	@cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
+	$(AM_V_GEN) cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
 
 translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
 	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
-	@QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
 
 $(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
-	@cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
-	  echo error: could not build $@
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@  > $@.n && mv $@{.n,}
+	@test -f $(RCC)
+	$(AM_V_GEN) cd $(srcdir); QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
+	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $(abs_builddir)/$@
 
 CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno
 
@@ -387,22 +386,19 @@ bitcoin_qt_clean: FORCE
 bitcoin_qt : qt/bitcoin-qt$(EXEEXT)
 
 ui_%.h: %.ui
-	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
-	@test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
-	$(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
+	@test -f $(UIC)
+	@$(MKDIR_P) $(@D)
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(UIC) -o $@ $< || (echo "Error creating $@"; false)
 
 %.moc: %.cpp
-	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
+	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
 
 moc_%.cpp: %.h
-	QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-	$(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-	$(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) $< | \
+	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
 
 %.qm: %.ts
-	@test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
-	@test -f $(LRELEASE) && QT_SELECT=$(QT_SELECT) $(LRELEASE) $(abs_srcdir)/$< -qm $(abs_builddir)/$@ || \
-	  echo error: could not build $(abs_builddir)/$@
+	@test -f $(LRELEASE)
+	@$(MKDIR_P) $(@D)
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LRELEASE) -silent $< -qm $@

From 56c157d5e087e3976ae05cad2dc08a1fcd9a2400 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 5 Jun 2014 14:22:54 -0400
Subject: [PATCH 0140/1819] build: avoid the use of top_ and abs_ dir paths

Using them has the side effect of confusing the dependency-tracking logic.
---
 src/Makefile.am             | 14 +++++++-------
 src/Makefile.qt.include     | 10 +++++-----
 src/Makefile.qttest.include |  6 +++---
 src/Makefile.test.include   |  2 +-
 src/m4/bitcoin_qt.m4        |  2 +-
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index ce12ddcdbd49..cb1c88883bb8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS =  $(INCLUDES) \
-  -I$(top_builddir)/src/obj \
+  -I$(builddir)/obj \
   $(BDB_CPPFLAGS) \
   $(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
 AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
@@ -8,10 +8,10 @@ AM_LDFLAGS = $(PTHREAD_CFLAGS)
 AM_CPPFLAGS += -I$(builddir)
 
 if EMBEDDED_LEVELDB
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/include
-LEVELDB_CPPFLAGS += -I$(top_srcdir)/src/leveldb/helpers/memenv
-LIBLEVELDB += $(top_builddir)/src/leveldb/libleveldb.a
-LIBMEMENV  += $(top_builddir)/src/leveldb/libmemenv.a
+LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
+LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv
+LIBLEVELDB += $(builddir)/leveldb/libleveldb.a
+LIBMEMENV  += $(builddir)/leveldb/libmemenv.a
 
 # NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race
 $(LIBLEVELDB): $(LIBMEMENV)
@@ -101,7 +101,7 @@ JSON_H = \
   json/json_spirit_writer_template.h
 
 obj/build.h: FORCE
-	@$(MKDIR_P) $(abs_top_builddir)/src/obj
+	@$(MKDIR_P) $(builddir)/obj
 	@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
 	  $(abs_top_srcdir)
 version.o: obj/build.h
@@ -164,7 +164,7 @@ libbitcoin_cli_a_SOURCES = \
   rpcclient.cpp \
   $(BITCOIN_CORE_H)
 
-nodist_libbitcoin_common_a_SOURCES = $(top_srcdir)/src/obj/build.h
+nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
 #
 
 # bitcoind binary #
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index a25699e392f9..f434118abbd2 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -1,6 +1,6 @@
-AM_CPPFLAGS += -I$(top_srcdir)/src \
-  -I$(top_builddir)/src/qt \
-  -I$(top_builddir)/src/qt/forms \
+AM_CPPFLAGS += -I$(srcdir) \
+  -I$(builddir)/qt \
+  -I$(builddir)/qt/forms \
   $(PROTOBUF_CFLAGS) \
   $(QR_CFLAGS)
 bin_PROGRAMS += qt/bitcoin-qt
@@ -320,7 +320,7 @@ RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
 BITCOIN_RC = qt/res/bitcoin-qt-res.rc
 
 qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(top_srcdir)/src/qt/forms $(QT_DBUS_INCLUDES)
+  -I$(srcdir)/qt/forms $(QT_DBUS_INCLUDES)
 qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
   $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
 
@@ -342,7 +342,7 @@ $(QT_MOC_CPP): $(PROTOBUF_H)
 
 # bitcoin-qt binary #
 qt_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(top_srcdir)/src/qt/forms
+  -I$(srcdir)/qt/forms
 qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
 if TARGET_DARWIN
   qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 0d08a636e90a..09e61cf57c9f 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -1,6 +1,6 @@
-AM_CPPFLAGS += -I$(top_srcdir)/src \
-  -I$(top_srcdir)/src/qt \
-  -I$(top_builddir)/src/qt \
+AM_CPPFLAGS += -I$(srcdir) \
+  -I$(srcdir)/qt \
+  -I$(builddir)/qt \
   $(PROTOBUF_CFLAGS) \
     $(QR_CFLAGS)
 bin_PROGRAMS += qt/test/test_bitcoin-qt
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 14288ee218e1..1e4bd4ca8cd7 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -1,4 +1,4 @@
-AM_CPPFLAGS += -I$(top_builddir)/src/test/
+AM_CPPFLAGS += -I$(builddir)/test/
 
 TESTS += test/test_bitcoin
 bin_PROGRAMS += test/test_bitcoin
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index e71ecd7172dd..244b03a5c25f 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -100,7 +100,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt${bitcoin_qt_got_major_vers} lrelease${bitcoin_qt_got_major_vers} lrelease], $qt_bin_path)
   BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt${bitcoin_qt_got_major_vers} lupdate${bitcoin_qt_got_major_vers} lupdate],$qt_bin_path, yes)
 
-  MOC_DEFS='-DHAVE_CONFIG_H -I$(top_srcdir)/src'
+  MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
   case $host in
     *darwin*)
      BITCOIN_QT_CHECK([

From f4d81129f0858685c33e79f74084f2931b8c21b4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 5 Jun 2014 15:24:48 -0400
Subject: [PATCH 0141/1819] build: quit abusing AM_CPPFLAGS

Now that the build is non-recursive, adding to AM_CPPFLAGS means adding to
_all_ cppflags.

Logical groups of includes have been added instead, and are used individually
by various targets.
---
 src/Makefile.am             | 16 +++++++++-------
 src/Makefile.qt.include     | 18 +++++++++---------
 src/Makefile.qttest.include |  8 ++------
 src/Makefile.test.include   |  4 +---
 4 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index cb1c88883bb8..58a50adec6a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,11 +1,6 @@
-AM_CPPFLAGS =  $(INCLUDES) \
-  -I$(builddir)/obj \
-  $(BDB_CPPFLAGS) \
-  $(BOOST_CPPFLAGS) $(BOOST_INCLUDES)
-AM_CPPFLAGS += $(LEVELDB_CPPFLAGS)
+AM_CPPFLAGS =  $(INCLUDES)
 AM_LDFLAGS = $(PTHREAD_CFLAGS)
 
-AM_CPPFLAGS += -I$(builddir)
 
 if EMBEDDED_LEVELDB
 LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -22,11 +17,14 @@ $(LIBLEVELDB) $(LIBMEMENV):
           OPT="$(CXXFLAGS) $(CPPFLAGS)"
 endif
 
+BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
+
 noinst_LIBRARIES = \
   libbitcoin_server.a \
   libbitcoin_common.a \
   libbitcoin_cli.a
 if ENABLE_WALLET
+BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
 noinst_LIBRARIES += libbitcoin_wallet.a
 endif
 
@@ -106,6 +104,7 @@ obj/build.h: FORCE
 	  $(abs_top_srcdir)
 version.o: obj/build.h
 
+libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_server_a_SOURCES = \
   addrman.cpp \
   alert.cpp \
@@ -130,6 +129,7 @@ libbitcoin_server_a_SOURCES = \
   $(JSON_H) \
   $(BITCOIN_CORE_H)
 
+libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_wallet_a_SOURCES = \
   db.cpp \
   crypter.cpp \
@@ -139,6 +139,7 @@ libbitcoin_wallet_a_SOURCES = \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
 
+libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
   base58.cpp \
   allocators.cpp \
@@ -184,8 +185,8 @@ if TARGET_WINDOWS
 bitcoind_SOURCES += bitcoind-res.rc
 endif
 
-AM_CPPFLAGS += $(BDB_CPPFLAGS)
 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
+bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
@@ -193,6 +194,7 @@ bitcoin_cli_LDADD = \
   libbitcoin_common.a \
   $(BOOST_LIBS)
 bitcoin_cli_SOURCES = bitcoin-cli.cpp
+bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
 if TARGET_WINDOWS
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index f434118abbd2..749b976c4430 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -1,8 +1,3 @@
-AM_CPPFLAGS += -I$(srcdir) \
-  -I$(builddir)/qt \
-  -I$(builddir)/qt/forms \
-  $(PROTOBUF_CFLAGS) \
-  $(QR_CFLAGS)
 bin_PROGRAMS += qt/bitcoin-qt
 noinst_LIBRARIES += qt/libbitcoinqt.a
 
@@ -319,8 +314,12 @@ RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
 
 BITCOIN_RC = qt/res/bitcoin-qt-res.rc
 
-qt_libbitcoinqt_a_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(srcdir)/qt/forms $(QT_DBUS_INCLUDES)
+BITCOIN_QT_INCLUDES = -I$(builddir)/qt -I$(srcdir)/qt -I$(srcdir)/qt/forms \
+  -I$(builddir)/qt/forms
+
+qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+  $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
+
 qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
   $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
 
@@ -341,8 +340,9 @@ $(QT_MOC): $(PROTOBUF_H)
 $(QT_MOC_CPP): $(PROTOBUF_H)
 
 # bitcoin-qt binary #
-qt_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) \
-  -I$(srcdir)/qt/forms
+qt_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+  $(QT_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
+
 qt_bitcoin_qt_SOURCES = qt/bitcoin.cpp
 if TARGET_DARWIN
   qt_bitcoin_qt_SOURCES += $(BITCOIN_MM)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 09e61cf57c9f..e0b49d02408a 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -1,8 +1,3 @@
-AM_CPPFLAGS += -I$(srcdir) \
-  -I$(srcdir)/qt \
-  -I$(builddir)/qt \
-  $(PROTOBUF_CFLAGS) \
-    $(QR_CFLAGS)
 bin_PROGRAMS += qt/test/test_bitcoin-qt
 TESTS += qt/test/test_bitcoin-qt
 
@@ -17,7 +12,8 @@ TEST_QT_H = \
   qt/test/paymentrequestdata.h \
   qt/test/paymentservertests.h
 
-qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(QT_INCLUDES) $(QT_TEST_INCLUDES)
+qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
+  $(QT_INCLUDES) $(QT_TEST_INCLUDES)
 
 qt_test_test_bitcoin_qt_SOURCES = \
   qt/test/test_main.cpp \
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 1e4bd4ca8cd7..988830260cd5 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -1,5 +1,3 @@
-AM_CPPFLAGS += -I$(builddir)/test/
-
 TESTS += test/test_bitcoin
 bin_PROGRAMS += test/test_bitcoin
 TEST_SRCDIR = test
@@ -62,7 +60,7 @@ BITCOIN_TESTS += \
 endif
 
 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
-test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(TESTDEFS)
+test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
 test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
 if ENABLE_WALLET

From efe6888407186b8a468f357fa7084c0a8c3de503 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 5 Jun 2014 15:51:05 -0400
Subject: [PATCH 0142/1819] build: fix version dependency

---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 58a50adec6a3..3016be47b944 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,7 +102,7 @@ obj/build.h: FORCE
 	@$(MKDIR_P) $(builddir)/obj
 	@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
 	  $(abs_top_srcdir)
-version.o: obj/build.h
+libbitcoin_common_a-version.$(OBJEXT): obj/build.h
 
 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_server_a_SOURCES = \

From b917555b04b501efe22990eedadc59ae8baa2519 Mon Sep 17 00:00:00 2001
From: Ashley Holman <dscvlt@gmail.com>
Date: Fri, 6 Jun 2014 02:24:59 -0500
Subject: [PATCH 0143/1819] qt: PeerTableModel: Fix potential deadlock. #4296

---
 src/qt/peertablemodel.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index fba9d84e7727..859d82f40c21 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -49,8 +49,8 @@ class PeerTablePriv
 
     /** Pull a full list of peers from vNodes into our cache */
     void refreshPeers() {
-        TRY_LOCK(cs_vNodes, lockNodes);
         {
+            TRY_LOCK(cs_vNodes, lockNodes);
             if (!lockNodes)
             {
                 // skip the refresh if we can't immediately get the lock
@@ -70,8 +70,8 @@ class PeerTablePriv
         }
 
         // if we can, retrieve the CNodeStateStats for each node.
-        TRY_LOCK(cs_main, lockMain);
         {
+            TRY_LOCK(cs_main, lockMain);
             if (lockMain)
             {
                 BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)

From c6cb21d17ab8097b6a425d37e48c955fbb0e9f0c Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 10 Apr 2014 14:14:18 -0400
Subject: [PATCH 0144/1819] Type-safe CFeeRate class

Use CFeeRate instead of an int64_t for quantities that are
fee-per-size.

Helps prevent unit-conversion mismatches between the wallet,
relaying, and mining code.
---
 src/core.cpp                 | 19 ++++++++++++++++
 src/core.h                   | 37 +++++++++++++++++++++++++------
 src/init.cpp                 | 14 ++++++------
 src/main.cpp                 | 30 +++++++++-----------------
 src/miner.cpp                | 42 +++++++++++++++++++-----------------
 src/qt/coincontroldialog.cpp | 29 ++++++-------------------
 src/qt/guiutil.cpp           |  2 +-
 src/qt/optionsdialog.cpp     |  4 ++--
 src/qt/optionsmodel.cpp      | 21 ++++++++++--------
 src/qt/paymentserver.cpp     |  2 +-
 src/qt/walletmodel.cpp       |  6 ------
 src/rpcmisc.cpp              |  4 ++--
 src/rpcnet.cpp               |  2 +-
 src/rpcwallet.cpp            |  2 +-
 src/wallet.cpp               | 22 ++++++-------------
 src/wallet.h                 |  2 +-
 16 files changed, 123 insertions(+), 115 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index aadcb44b9865..6039986e6c64 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -72,6 +72,25 @@ void CTxOut::print() const
     LogPrintf("%s\n", ToString());
 }
 
+CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
+{
+    if (nSize > 0)
+        nSatoshisPerK = nFeePaid*1000/nSize;
+    else
+        nSatoshisPerK = 0;
+}
+
+int64_t CFeeRate::GetFee(size_t nSize)
+{
+    return nSatoshisPerK*nSize / 1000;
+}
+
+std::string CFeeRate::ToString() const
+{
+    std::string result = FormatMoney(nSatoshisPerK) + " BTC/kB";
+    return result;
+}
+
 uint256 CTransaction::GetHash() const
 {
     return SerializeHash(*this);
diff --git a/src/core.h b/src/core.h
index ba7f69111917..9fccffc4b29e 100644
--- a/src/core.h
+++ b/src/core.h
@@ -112,6 +112,28 @@ class CTxIn
 
 
 
+/** Type-safe wrapper class to for fee rates
+ * (how much to pay based on transaction size)
+ */
+class CFeeRate
+{
+private:
+    int64_t nSatoshisPerK; // unit is satoshis-per-1,000-bytes
+public:
+    explicit CFeeRate(int64_t _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
+    CFeeRate(int64_t nFeePaid, size_t nSize);
+    CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
+
+    int64_t GetFee(size_t size); // unit returned is satoshis
+    int64_t GetFeePerK() { return GetFee(1000); } // satoshis-per-1000-bytes
+
+    friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
+    friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
+    friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
+
+    std::string ToString() const;
+};
+
 
 /** An output of a transaction.  It contains the public key that the next input
  * must be able to sign with to claim it.
@@ -148,17 +170,18 @@ class CTxOut
 
     uint256 GetHash() const;
 
-    bool IsDust(int64_t nMinRelayTxFee) const
+    bool IsDust(CFeeRate minRelayTxFee) const
     {
-        // "Dust" is defined in terms of CTransaction::nMinRelayTxFee,
+        // "Dust" is defined in terms of CTransaction::minRelayTxFee,
         // which has units satoshis-per-kilobyte.
         // If you'd pay more than 1/3 in fees
         // to spend something, then we consider it dust.
         // A typical txout is 34 bytes big, and will
-        // need a CTxIn of at least 148 bytes to spend,
+        // need a CTxIn of at least 148 bytes to spend:
         // so dust is a txout less than 546 satoshis 
-        // with default nMinRelayTxFee.
-        return ((nValue*1000)/(3*((int)GetSerializeSize(SER_DISK,0)+148)) < nMinRelayTxFee);
+        // with default minRelayTxFee.
+        size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
+        return (nValue < 3*minRelayTxFee.GetFee(nSize));
     }
 
     friend bool operator==(const CTxOut& a, const CTxOut& b)
@@ -183,8 +206,8 @@ class CTxOut
 class CTransaction
 {
 public:
-    static int64_t nMinTxFee;
-    static int64_t nMinRelayTxFee;
+    static CFeeRate minTxFee;
+    static CFeeRate minRelayTxFee;
     static const int CURRENT_VERSION=1;
     int nVersion;
     std::vector<CTxIn> vin;
diff --git a/src/init.cpp b/src/init.cpp
index d924bd293bb5..1aad679b3b47 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -281,8 +281,8 @@ std::string HelpMessage(HelpMessageMode hmm)
         strUsage += "  -limitfreerelay=<n>    " + _("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:15)") + "\n";
         strUsage += "  -maxsigcachesize=<n>   " + _("Limit size of signature cache to <n> entries (default: 50000)") + "\n";
     }
-    strUsage += "  -mintxfee=<amt>        " + _("Fees smaller than this are considered zero fee (for transaction creation) (default:") + " " + FormatMoney(CTransaction::nMinTxFee) + ")" + "\n";
-    strUsage += "  -minrelaytxfee=<amt>   " + _("Fees smaller than this are considered zero fee (for relaying) (default:") + " " + FormatMoney(CTransaction::nMinRelayTxFee) + ")" + "\n";
+    strUsage += "  -mintxfee=<amt>        " + _("Fees smaller than this are considered zero fee (for transaction creation) (default:") + " " + FormatMoney(CTransaction::minTxFee.GetFeePerK()) + ")" + "\n";
+    strUsage += "  -minrelaytxfee=<amt>   " + _("Fees smaller than this are considered zero fee (for relaying) (default:") + " " + FormatMoney(CTransaction::minRelayTxFee.GetFeePerK()) + ")" + "\n";
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
@@ -560,7 +560,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     {
         int64_t n = 0;
         if (ParseMoney(mapArgs["-mintxfee"], n) && n > 0)
-            CTransaction::nMinTxFee = n;
+            CTransaction::minTxFee = CFeeRate(n);
         else
             return InitError(strprintf(_("Invalid amount for -mintxfee=<amount>: '%s'"), mapArgs["-mintxfee"]));
     }
@@ -568,7 +568,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     {
         int64_t n = 0;
         if (ParseMoney(mapArgs["-minrelaytxfee"], n) && n > 0)
-            CTransaction::nMinRelayTxFee = n;
+            CTransaction::minRelayTxFee = CFeeRate(n);
         else
             return InitError(strprintf(_("Invalid amount for -minrelaytxfee=<amount>: '%s'"), mapArgs["-minrelaytxfee"]));
     }
@@ -576,10 +576,12 @@ bool AppInit2(boost::thread_group& threadGroup)
 #ifdef ENABLE_WALLET
     if (mapArgs.count("-paytxfee"))
     {
-        if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
+        int64_t nFeePerK = 0;
+        if (!ParseMoney(mapArgs["-paytxfee"], nFeePerK))
             return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"]));
-        if (nTransactionFee > nHighTransactionFeeWarning)
+        if (nFeePerK > nHighTransactionFeeWarning)
             InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
+        payTxFee = CFeeRate(nFeePerK, 1000);
     }
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
 
diff --git a/src/main.cpp b/src/main.cpp
index 8e63e4213f66..9d6c01d64e99 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -50,9 +50,9 @@ bool fTxIndex = false;
 unsigned int nCoinCacheSize = 5000;
 
 /** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
-int64_t CTransaction::nMinTxFee = 10000;  // Override with -mintxfee
+CFeeRate CTransaction::minTxFee = CFeeRate(10000);  // Override with -mintxfee
 /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
-int64_t CTransaction::nMinRelayTxFee = 1000;
+CFeeRate CTransaction::minRelayTxFee = CFeeRate(1000);
 
 struct COrphanBlock {
     uint256 hashBlock;
@@ -543,7 +543,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
         }
         if (whichType == TX_NULL_DATA)
             nDataOut++;
-        else if (txout.IsDust(CTransaction::nMinRelayTxFee)) {
+        else if (txout.IsDust(CTransaction::minRelayTxFee)) {
             reason = "dust";
             return false;
         }
@@ -783,10 +783,10 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
 
 int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
 {
-    // Base fee is either nMinTxFee or nMinRelayTxFee
-    int64_t nBaseFee = (mode == GMF_RELAY) ? tx.nMinRelayTxFee : tx.nMinTxFee;
+    // Base fee is either minTxFee or minRelayTxFee
+    CFeeRate baseFeeRate = (mode == GMF_RELAY) ? tx.minRelayTxFee : tx.minTxFee;
 
-    int64_t nMinFee = (1 + (int64_t)nBytes / 1000) * nBaseFee;
+    int64_t nMinFee = baseFeeRate.GetFee(nBytes);
 
     if (fAllowFree)
     {
@@ -800,16 +800,6 @@ int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree,
             nMinFee = 0;
     }
 
-    // This code can be removed after enough miners have upgraded to version 0.9.
-    // Until then, be safe when sending and require a fee if any output
-    // is less than CENT:
-    if (nMinFee < nBaseFee && mode == GMF_SEND)
-    {
-        BOOST_FOREACH(const CTxOut& txout, tx.vout)
-            if (txout.nValue < CENT)
-                nMinFee = nBaseFee;
-    }
-
     if (!MoneyRange(nMinFee))
         nMinFee = MAX_MONEY;
     return nMinFee;
@@ -916,10 +906,10 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
                                       hash.ToString(), nFees, txMinFee),
                              REJECT_INSUFFICIENTFEE, "insufficient fee");
 
-        // Continuously rate-limit free transactions
+        // Continuously rate-limit free (really, very-low-fee)transactions
         // This mitigates 'penny-flooding' -- sending thousands of free transactions just to
         // be annoying or make others' transactions take longer to confirm.
-        if (fLimitFree && nFees < CTransaction::nMinRelayTxFee)
+        if (fLimitFree && nFees < CTransaction::minRelayTxFee.GetFee(nSize))
         {
             static CCriticalSection csFreeLimiter;
             static double dFreeCount;
@@ -940,10 +930,10 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
             dFreeCount += nSize;
         }
 
-        if (fRejectInsaneFee && nFees > CTransaction::nMinRelayTxFee * 10000)
+        if (fRejectInsaneFee && nFees > CTransaction::minRelayTxFee.GetFee(nSize) * 10000)
             return error("AcceptToMemoryPool: : insane fees %s, %d > %d",
                          hash.ToString(),
-                         nFees, CTransaction::nMinRelayTxFee * 10000);
+                         nFees, CTransaction::minRelayTxFee.GetFee(nSize) * 10000);
 
         // Check against previous transactions
         // This is done last to help prevent CPU exhaustion denial-of-service attacks.
diff --git a/src/miner.cpp b/src/miner.cpp
index 94fc8e38885e..4e131c088b8b 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -52,25 +52,30 @@ void SHA256Transform(void* pstate, void* pinput, const void* pinit)
         ((uint32_t*)pstate)[i] = ctx.h[i];
 }
 
-// Some explaining would be appreciated
+//
+// Unconfirmed transactions in the memory pool often depend on other
+// transactions in the memory pool. When we select transactions from the
+// pool, we select by highest priority or fee rate, so we might consider
+// transactions that depend on transactions that aren't yet in the block.
+// The COrphan class keeps track of these 'temporary orphans' while
+// CreateBlock is figuring out which transactions to include.
+//
 class COrphan
 {
 public:
     const CTransaction* ptx;
     set<uint256> setDependsOn;
     double dPriority;
-    double dFeePerKb;
+    CFeeRate feeRate;
 
-    COrphan(const CTransaction* ptxIn)
+    COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
     {
-        ptx = ptxIn;
-        dPriority = dFeePerKb = 0;
     }
 
     void print() const
     {
-        LogPrintf("COrphan(hash=%s, dPriority=%.1f, dFeePerKb=%.1f)\n",
-               ptx->GetHash().ToString(), dPriority, dFeePerKb);
+        LogPrintf("COrphan(hash=%s, dPriority=%.1f, fee=%s)\n",
+                  ptx->GetHash().ToString(), dPriority, feeRate.ToString());
         BOOST_FOREACH(uint256 hash, setDependsOn)
             LogPrintf("   setDependsOn %s\n", hash.ToString());
     }
@@ -80,8 +85,8 @@ class COrphan
 uint64_t nLastBlockTx = 0;
 uint64_t nLastBlockSize = 0;
 
-// We want to sort transactions by priority and fee, so:
-typedef boost::tuple<double, double, const CTransaction*> TxPriority;
+// We want to sort transactions by priority and fee rate, so:
+typedef boost::tuple<double, CFeeRate, const CTransaction*> TxPriority;
 class TxPriorityCompare
 {
     bool byFee;
@@ -210,18 +215,15 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
             dPriority = tx.ComputePriority(dPriority, nTxSize);
 
-            // This is a more accurate fee-per-kilobyte than is used by the client code, because the
-            // client code rounds up the size to the nearest 1K. That's good, because it gives an
-            // incentive to create smaller transactions.
-            double dFeePerKb =  double(nTotalIn-tx.GetValueOut()) / (double(nTxSize)/1000.0);
+            CFeeRate feeRate(nTotalIn-tx.GetValueOut(), nTxSize);
 
             if (porphan)
             {
                 porphan->dPriority = dPriority;
-                porphan->dFeePerKb = dFeePerKb;
+                porphan->feeRate = feeRate;
             }
             else
-                vecPriority.push_back(TxPriority(dPriority, dFeePerKb, &mi->second.GetTx()));
+                vecPriority.push_back(TxPriority(dPriority, feeRate, &mi->second.GetTx()));
         }
 
         // Collect transactions into block
@@ -237,7 +239,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         {
             // Take highest priority transaction off the priority queue:
             double dPriority = vecPriority.front().get<0>();
-            double dFeePerKb = vecPriority.front().get<1>();
+            CFeeRate feeRate = vecPriority.front().get<1>();
             const CTransaction& tx = *(vecPriority.front().get<2>());
 
             std::pop_heap(vecPriority.begin(), vecPriority.end(), comparer);
@@ -254,7 +256,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 continue;
 
             // Skip free transactions if we're past the minimum block size:
-            if (fSortedByFee && (dFeePerKb < CTransaction::nMinRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
+            if (fSortedByFee && (feeRate < CTransaction::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
                 continue;
 
             // Prioritize by fee once past the priority size or we run out of high-priority
@@ -298,8 +300,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
             if (fPrintPriority)
             {
-                LogPrintf("priority %.1f feeperkb %.1f txid %s\n",
-                       dPriority, dFeePerKb, tx.GetHash().ToString());
+                LogPrintf("priority %.1f fee %s txid %s\n",
+                          dPriority, feeRate.ToString(), tx.GetHash().ToString());
             }
 
             // Add transactions that depend on this one to the priority queue
@@ -312,7 +314,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                         porphan->setDependsOn.erase(hash);
                         if (porphan->setDependsOn.empty())
                         {
-                            vecPriority.push_back(TxPriority(porphan->dPriority, porphan->dFeePerKb, porphan->ptx));
+                            vecPriority.push_back(TxPriority(porphan->dPriority, porphan->feeRate, porphan->ptx));
                             std::push_heap(vecPriority.begin(), vecPriority.end(), comparer);
                         }
                     }
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index dc9d2afe2704..e27f1bff97bc 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -453,7 +453,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
             CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
             txDummy.vout.push_back(txout);
-            if (txout.IsDust(CTransaction::nMinRelayTxFee))
+            if (txout.IsDust(CTransaction::minRelayTxFee))
                fDust = true;
         }
     }
@@ -525,7 +525,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority);
 
         // Fee
-        int64_t nFee = nTransactionFee * (1 + (int64_t)nBytes / 1000);
+        int64_t nFee = payTxFee.GetFee(nBytes);
 
         // Min Fee
         int64_t nMinFee = GetMinFee(txDummy, nBytes, AllowFree(dPriority), GMF_SEND);
@@ -536,26 +536,11 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         {
             nChange = nAmount - nPayFee - nPayAmount;
 
-            // if sub-cent change is required, the fee must be raised to at least CTransaction::nMinTxFee
-            if (nPayFee < CTransaction::nMinTxFee && nChange > 0 && nChange < CENT)
-            {
-                if (nChange < CTransaction::nMinTxFee) // change < 0.0001 => simply move all change to fees
-                {
-                    nPayFee += nChange;
-                    nChange = 0;
-                }
-                else
-                {
-                    nChange = nChange + nPayFee - CTransaction::nMinTxFee;
-                    nPayFee = CTransaction::nMinTxFee;
-                }
-            }
-
             // Never create dust outputs; if we would, just add the dust to the fee.
             if (nChange > 0 && nChange < CENT)
             {
                 CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0));
-                if (txout.IsDust(CTransaction::nMinRelayTxFee))
+                if (txout.IsDust(CTransaction::minRelayTxFee))
                 {
                     nPayFee += nChange;
                     nChange = 0;
@@ -610,19 +595,19 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
     // tool tips
     QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
-    toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)) + "<br /><br />";
+    toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK())) + "<br /><br />";
     toolTip1 += tr("Can vary +/- 1 byte per input.");
 
     QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
     toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
-    toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee));
+    toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
 
     QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
-    toolTip3 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)) + "<br /><br />";
+    toolTip3 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK())) + "<br /><br />";
     toolTip3 += tr("Amounts below 0.546 times the minimum relay fee are shown as dust.");
 
     QString toolTip4 = tr("This label turns red, if the change is smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
-    toolTip4 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee));
+    toolTip4 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
 
     l5->setToolTip(toolTip1);
     l6->setToolTip(toolTip2);
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 1922d228c545..4fe98251d98e 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -210,7 +210,7 @@ bool isDust(const QString& address, qint64 amount)
     CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
     CScript script; script.SetDestination(dest);
     CTxOut txOut(amount, script);
-    return txOut.IsDust(CTransaction::nMinRelayTxFee);
+    return txOut.IsDust(CTransaction::minRelayTxFee);
 }
 
 QString HtmlEscape(const QString& str, bool fMultiLine)
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 96464d2cc015..1cbf5f88106d 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -14,7 +14,7 @@
 #include "monitoreddatamapper.h"
 #include "optionsmodel.h"
 
-#include "main.h" // for CTransaction::nMinTxFee and MAX_SCRIPTCHECK_THREADS
+#include "main.h" // for CTransaction::minTxFee and MAX_SCRIPTCHECK_THREADS
 #include "netbase.h"
 #include "txdb.h" // for -dbcache defaults
 
@@ -101,7 +101,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
 #endif
 
     ui->unit->setModel(new BitcoinUnits(this));
-    ui->transactionFee->setSingleStep(CTransaction::nMinTxFee);
+    ui->transactionFee->setSingleStep(CTransaction::minTxFee.GetFeePerK());
 
     /* Widget-to-option mapper */
     mapper = new MonitoredDataMapper(this);
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 051098315ded..f3a5f37bb389 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -94,7 +94,7 @@ void OptionsModel::Init()
 #ifdef ENABLE_WALLET
     if (!settings.contains("nTransactionFee"))
         settings.setValue("nTransactionFee", (qint64)DEFAULT_TRANSACTION_FEE);
-    nTransactionFee = settings.value("nTransactionFee").toLongLong(); // if -paytxfee is set, this will be overridden later in init.cpp
+    payTxFee = CFeeRate(settings.value("nTransactionFee").toLongLong()); // if -paytxfee is set, this will be overridden later in init.cpp
     if (mapArgs.count("-paytxfee"))
         addOverriddenOption("-paytxfee");
 
@@ -187,15 +187,16 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
             return settings.value("nSocksVersion", 5);
 
 #ifdef ENABLE_WALLET
-        case Fee:
-            // Attention: Init() is called before nTransactionFee is set in AppInit2()!
+        case Fee: {
+            // Attention: Init() is called before payTxFee is set in AppInit2()!
             // To ensure we can change the fee on-the-fly update our QSetting when
             // opening OptionsDialog, which queries Fee via the mapper.
-            if (nTransactionFee != settings.value("nTransactionFee").toLongLong())
-                settings.setValue("nTransactionFee", (qint64)nTransactionFee);
-            // Todo: Consider to revert back to use just nTransactionFee here, if we don't want
+            if (!(payTxFee == CFeeRate(settings.value("nTransactionFee").toLongLong(), 1000)))
+                settings.setValue("nTransactionFee", (qint64)payTxFee.GetFeePerK());
+            // Todo: Consider to revert back to use just payTxFee here, if we don't want
             // -paytxfee to update our QSettings!
             return settings.value("nTransactionFee");
+        }
         case SpendZeroConfChange:
             return settings.value("bSpendZeroConfChange");
 #endif
@@ -284,12 +285,14 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
         }
         break;
 #ifdef ENABLE_WALLET
-        case Fee: // core option - can be changed on-the-fly
+        case Fee: { // core option - can be changed on-the-fly
             // Todo: Add is valid check  and warn via message, if not
-            nTransactionFee = value.toLongLong();
-            settings.setValue("nTransactionFee", (qint64)nTransactionFee);
+            qint64 nTransactionFee = value.toLongLong();
+            payTxFee = CFeeRate(nTransactionFee, 1000);
+            settings.setValue("nTransactionFee", nTransactionFee);
             emit transactionFeeChanged(nTransactionFee);
             break;
+        }
         case SpendZeroConfChange:
             if (settings.value("bSpendZeroConfChange") != value) {
                 settings.setValue("bSpendZeroConfChange", value);
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 4c455856856d..6165731d223e 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -551,7 +551,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
 
         // Extract and check amounts
         CTxOut txOut(sendingTo.second, sendingTo.first);
-        if (txOut.IsDust(CTransaction::nMinRelayTxFee)) {
+        if (txOut.IsDust(CTransaction::minRelayTxFee)) {
             emit message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
                 .arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second)),
                 CClientUIInterface::MSG_ERROR);
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 37d82ec0633c..87ff3db58437 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -231,12 +231,6 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
         return AmountExceedsBalance;
     }
 
-    if((total + nTransactionFee) > nBalance)
-    {
-        transaction.setTransactionFee(nTransactionFee);
-        return SendCoinsReturn(AmountWithFeeExceedsBalance);
-    }
-
     {
         LOCK2(cs_main, wallet->cs_wallet);
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 27d6d61a36f2..9802445fcb20 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -81,9 +81,9 @@ Value getinfo(const Array& params, bool fHelp)
     }
     if (pwalletMain && pwalletMain->IsCrypted())
         obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
-    obj.push_back(Pair("paytxfee",      ValueFromAmount(nTransactionFee)));
+    obj.push_back(Pair("paytxfee",      ValueFromAmount(payTxFee.GetFeePerK())));
 #endif
-    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::nMinRelayTxFee)));
+    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::minRelayTxFee.GetFeePerK())));
     obj.push_back(Pair("errors",        GetWarnings("statusbar")));
     return obj;
 }
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 63eed09b640b..0eca55a472cc 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -368,7 +368,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
-    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::nMinRelayTxFee)));
+    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::minRelayTxFee.GetFeePerK())));
     Array localAddresses;
     {
         LOCK(cs_mapLocalHost);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index e3b35dbb044c..f376ab6b636c 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1883,7 +1883,7 @@ Value settxfee(const Array& params, bool fHelp)
     if (params[0].get_real() != 0.0)
         nAmount = AmountFromValue(params[0]);        // rejects 0.0 amounts
 
-    nTransactionFee = nAmount;
+    payTxFee = CFeeRate(nAmount, 1000);
     return true;
 }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 89604f96acac..ef0b442e1a18 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -16,7 +16,7 @@
 using namespace std;
 
 // Settings
-int64_t nTransactionFee = DEFAULT_TRANSACTION_FEE;
+CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 bool bSpendZeroConfChange = true;
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1233,7 +1233,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
     {
         LOCK2(cs_main, cs_wallet);
         {
-            nFeeRet = nTransactionFee;
+            nFeeRet = payTxFee.GetFeePerK();
             while (true)
             {
                 wtxNew.vin.clear();
@@ -1246,7 +1246,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend)
                 {
                     CTxOut txout(s.second, s.first);
-                    if (txout.IsDust(CTransaction::nMinRelayTxFee))
+                    if (txout.IsDust(CTransaction::minRelayTxFee))
                     {
                         strFailReason = _("Transaction amount too small");
                         return false;
@@ -1272,16 +1272,6 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 }
 
                 int64_t nChange = nValueIn - nValue - nFeeRet;
-                // The following if statement should be removed once enough miners
-                // have upgraded to the 0.9 GetMinFee() rules. Until then, this avoids
-                // creating free transactions that have change outputs less than
-                // CENT bitcoins.
-                if (nFeeRet < CTransaction::nMinTxFee && nChange > 0 && nChange < CENT)
-                {
-                    int64_t nMoveToFee = min(nChange, CTransaction::nMinTxFee - nFeeRet);
-                    nChange -= nMoveToFee;
-                    nFeeRet += nMoveToFee;
-                }
 
                 if (nChange > 0)
                 {
@@ -1317,7 +1307,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
 
                     // Never create dust outputs; if we would, just
                     // add the dust to the fee.
-                    if (newTxOut.IsDust(CTransaction::nMinRelayTxFee))
+                    if (newTxOut.IsDust(CTransaction::minRelayTxFee))
                     {
                         nFeeRet += nChange;
                         reservekey.ReturnKey();
@@ -1355,7 +1345,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 dPriority = wtxNew.ComputePriority(dPriority, nBytes);
 
                 // Check that enough fee is included
-                int64_t nPayFee = nTransactionFee * (1 + (int64_t)nBytes / 1000);
+                int64_t nPayFee = payTxFee.GetFee(nBytes);
                 bool fAllowFree = AllowFree(dPriority);
                 int64_t nMinFee = GetMinFee(wtxNew, nBytes, fAllowFree, GMF_SEND);
                 if (nFeeRet < max(nPayFee, nMinFee))
@@ -1464,7 +1454,7 @@ string CWallet::SendMoneyToDestination(const CTxDestination& address, int64_t nV
     // Check amount
     if (nValue <= 0)
         return _("Invalid amount");
-    if (nValue + nTransactionFee > GetBalance())
+    if (nValue > GetBalance())
         return _("Insufficient funds");
 
     // Parse Bitcoin address
diff --git a/src/wallet.h b/src/wallet.h
index 8e2917188a33..274c31157c0a 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -24,7 +24,7 @@
 #include <vector>
 
 // Settings
-extern int64_t nTransactionFee;
+extern CFeeRate payTxFee;
 extern bool bSpendZeroConfChange;
 
 // -paytxfee default

From 0193fb82a6fe443e5434f2c2af3b252409c19b25 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Fri, 14 Mar 2014 12:19:52 -0400
Subject: [PATCH 0145/1819] Allow multiple regression tests to run at once

Choose ports at startup based on PID, so multiple regression tests
can run on the same system at the same time.
---
 qa/rpc-tests/util.py | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 40f4a1458f99..eab526daf365 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -20,8 +20,10 @@
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
 
-START_P2P_PORT=11000
-START_RPC_PORT=11100
+def p2p_port(n):
+    return 11000 + n + os.getpid()%999
+def rpc_port(n):
+    return 12000 + n + os.getpid()%999
 
 def check_json_precision():
     """Make sure json library being used does not lose precision converting BTC values"""
@@ -58,6 +60,17 @@ def sync_mempools(rpc_connections):
 
 bitcoind_processes = []
 
+def initialize_datadir(dir, n):
+    datadir = os.path.join(dir, "node"+str(n))
+    if not os.path.isdir(datadir):
+        os.makedirs(datadir)
+    with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
+        f.write("regtest=1\n");
+        f.write("rpcuser=rt\n");
+        f.write("rpcpassword=rt\n");
+        f.write("port="+str(p2p_port(n))+"\n");
+        f.write("rpcport="+str(rpc_port(n))+"\n");
+
 def initialize_chain(test_dir):
     """
     Create (or copy from cache) a 200-block-long chain and
@@ -69,17 +82,10 @@ def initialize_chain(test_dir):
         devnull = open("/dev/null", "w+")
         # Create cache directories, run bitcoinds:
         for i in range(4):
-            datadir = os.path.join("cache", "node"+str(i))
-            os.makedirs(datadir)
-            with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
-                f.write("regtest=1\n");
-                f.write("rpcuser=rt\n");
-                f.write("rpcpassword=rt\n");
-                f.write("port="+str(START_P2P_PORT+i)+"\n");
-                f.write("rpcport="+str(START_RPC_PORT+i)+"\n");
+            initialize_datadir("cache", i)
             args = [ "bitcoind", "-keypool=1", "-datadir="+datadir ]
             if i > 0:
-                args.append("-connect=127.0.0.1:"+str(START_P2P_PORT))
+                args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
             bitcoind_processes.append(subprocess.Popen(args))
             subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
                                     "-rpcwait", "getblockcount"], stdout=devnull)
@@ -87,7 +93,7 @@ def initialize_chain(test_dir):
         rpcs = []
         for i in range(4):
             try:
-                url = "http://rt:rt@127.0.0.1:%d"%(START_RPC_PORT+i,)
+                url = "http://rt:rt@127.0.0.1:%d"%(rpc_port(i),)
                 rpcs.append(AuthServiceProxy(url))
             except:
                 sys.stderr.write("Error connecting to "+url+"\n")
@@ -112,6 +118,7 @@ def initialize_chain(test_dir):
         from_dir = os.path.join("cache", "node"+str(i))
         to_dir = os.path.join(test_dir,  "node"+str(i))
         shutil.copytree(from_dir, to_dir)
+        initialize_datadir(test_dir, i) # Overwrite port/rpcport in bitcoin.conf
 
 def _rpchost_to_args(rpchost):
     '''Convert optional IP:port spec to rpcconnect/rpcport args'''
@@ -138,7 +145,7 @@ def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
     devnull = open("/dev/null", "w+")
     for i in range(num_nodes):
         datadir = os.path.join(dir, "node"+str(i))
-        args = [ "bitcoind", "-datadir="+datadir ]
+        args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
         if extra_args is not None:
             args += extra_args[i]
         bitcoind_processes.append(subprocess.Popen(args))
@@ -149,7 +156,7 @@ def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
     # Create&return JSON-RPC connections
     rpc_connections = []
     for i in range(num_nodes):
-        url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', START_RPC_PORT+i,)
+        url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
         rpc_connections.append(AuthServiceProxy(url))
     return rpc_connections
 
@@ -168,7 +175,7 @@ def wait_bitcoinds():
     del bitcoind_processes[:]
 
 def connect_nodes(from_connection, node_num):
-    ip_port = "127.0.0.1:"+str(START_P2P_PORT+node_num)
+    ip_port = "127.0.0.1:"+str(p2p_port(node_num))
     from_connection.addnode(ip_port, "onetry")
 
 def assert_equal(thing1, thing2):

From 171ca7745e77c9f78f26556457fe64e5b2004a75 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Mon, 17 Mar 2014 08:19:54 -0400
Subject: [PATCH 0146/1819] estimatefee / estimatepriority RPC methods

New RPC methods: return an estimate of the fee (or priority) a
transaction needs to be likely to confirm in a given number of
blocks.

Mike Hearn created the first version of this method for estimating fees.
It works as follows:

For transactions that took 1 to N (I picked N=25) blocks to confirm,
keep N buckets with at most 100 entries in each recording the
fees-per-kilobyte paid by those transactions.

(separate buckets are kept for transactions that confirmed because
they are high-priority)

The buckets are filled as blocks are found, and are saved/restored
in a new fee_estiamtes.dat file in the data directory.

A few variations on Mike's initial scheme:

To estimate the fee needed for a transaction to confirm in X buckets,
all of the samples in all of the buckets are used and a median of
all of the data is used to make the estimate. For example, imagine
25 buckets each containing the full 100 entries. Those 2,500 samples
are sorted, and the estimate of the fee needed to confirm in the very
next block is the 50'th-highest-fee-entry in that sorted list; the
estimate of the fee needed to confirm in the next two blocks is the
150'th-highest-fee-entry, etc.

That algorithm has the nice property that estimates of how much fee
you need to pay to get confirmed in block N will always be greater
than or equal to the estimate for block N+1. It would clearly be wrong
to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay
12 uBTC and it will take LONGER".

A single block will not contribute more than 10 entries to any one
bucket, so a single miner and a large block cannot overwhelm
the estimates.
---
 doc/release-notes.md      |  19 ++
 qa/rpc-tests/smartfees.py | 142 +++++++++++++++
 qa/rpc-tests/util.py      | 143 +++++++++++++--
 src/core.h                |   3 +
 src/init.cpp              |  14 ++
 src/main.cpp              |  10 +-
 src/main.h                |   7 -
 src/rpcclient.cpp         |   2 +
 src/rpcmining.cpp         |  61 +++++++
 src/rpcserver.cpp         |   2 +
 src/rpcserver.h           |   2 +
 src/txmempool.cpp         | 370 ++++++++++++++++++++++++++++++++++++++
 src/txmempool.h           |  23 +++
 13 files changed, 767 insertions(+), 31 deletions(-)
 create mode 100755 qa/rpc-tests/smartfees.py

diff --git a/doc/release-notes.md b/doc/release-notes.md
index f16eec32a29e..9272d427cdc9 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,2 +1,21 @@
 (note: this is a temporary file, to be added-to by anybody, and moved to
 release-notes at release time)
+
+New RPC methods
+===============
+
+Fee/Priority estimation
+-----------------------
+
+estimatefee nblocks : Returns approximate fee-per-1,000-bytes needed for
+a transaction to be confirmed within nblocks. Returns -1 if not enough
+transactions have been observed to compute a good estimate.
+
+estimatepriority nblocks : Returns approximate priority needed for
+a zero-fee transaction to confirm within nblocks. Returns -1 if not
+enough free transactions have been observed to compute a good
+estimate.
+
+Statistics used to estimate fees and priorities are saved in the
+data directory in the 'fee_estimates.dat' file just before
+program shutdown, and are read in at startup.
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
new file mode 100755
index 000000000000..e8abbfba194e
--- /dev/null
+++ b/qa/rpc-tests/smartfees.py
@@ -0,0 +1,142 @@
+#!/usr/bin/env python
+
+#
+# Test fee estimation code
+#
+
+# Add python-bitcoinrpc to module search path:
+import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
+
+import json
+import random
+import shutil
+import subprocess
+import tempfile
+import traceback
+
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+
+def run_test(nodes, test_dir):
+    nodes.append(start_node(0, test_dir,
+                            ["-debug=mempool", "-debug=estimatefee"]))
+    # Node1 mines small-but-not-tiny blocks, and allows free transactions.
+    # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
+    # so blockmaxsize of 2,000 is really just 1,000 bytes (room enough for
+    # 6 or 7 transactions)
+    nodes.append(start_node(1, test_dir,
+                            ["-blockprioritysize=1500", "-blockmaxsize=2000",
+                             "-debug=mempool", "-debug=estimatefee"]))
+    connect_nodes(nodes[1], 0)
+
+    # Node2 is a stingy miner, that
+    # produces very small blocks (room for only 3 or so transactions)
+    node2args = [ "-blockprioritysize=0", "-blockmaxsize=1500",
+                             "-debug=mempool", "-debug=estimatefee"]
+    nodes.append(start_node(2, test_dir, node2args))
+    connect_nodes(nodes[2], 0)
+
+    sync_blocks(nodes)
+
+    # Prime the memory pool with pairs of transactions
+    # (high-priority, random fee and zero-priority, random fee)
+    min_fee = Decimal("0.001")
+    fees_per_kb = [];
+    for i in range(12):
+        (txid, txhex, fee) = random_zeropri_transaction(nodes, Decimal("1.1"),
+                                                        min_fee, min_fee, 20)
+        tx_kbytes = (len(txhex)/2)/1000.0
+        fees_per_kb.append(float(fee)/tx_kbytes)
+
+    # Mine blocks with node2 until the memory pool clears:
+    count_start = nodes[2].getblockcount()
+    while len(nodes[2].getrawmempool()) > 0:
+        nodes[2].setgenerate(True, 1)
+        sync_blocks(nodes)
+
+    all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+    print("Fee estimates, super-stingy miner: "+str([str(e) for e in all_estimates]))
+
+    # Estimates should be within the bounds of what transactions fees actually were:
+    delta = 1.0e-6 # account for rounding error
+    for e in filter(lambda x: x >= 0, all_estimates):
+        if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
+            raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
+
+    # Generate transactions while mining 30 more blocks, this time with node1:
+    for i in range(30):
+        for j in range(random.randrange(6-4,6+4)):
+            (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"),
+                                                    Decimal("0.0"), min_fee, 20)
+            tx_kbytes = (len(txhex)/2)/1000.0
+            fees_per_kb.append(float(fee)/tx_kbytes)
+        nodes[1].setgenerate(True, 1)
+        sync_blocks(nodes)
+
+    all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+    print("Fee estimates, more generous miner: "+str([ str(e) for e in all_estimates]))
+    for e in filter(lambda x: x >= 0, all_estimates):
+        if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
+            raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
+
+    # Finish by mining a normal-sized block:
+    while len(nodes[0].getrawmempool()) > 0:
+        nodes[0].setgenerate(True, 1)
+        sync_blocks(nodes)
+
+    final_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+    print("Final fee estimates: "+str([ str(e) for e in final_estimates]))
+
+def main():
+    import optparse
+
+    parser = optparse.OptionParser(usage="%prog [options]")
+    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
+                      help="Leave bitcoinds and test.* datadir on exit or error")
+    parser.add_option("--srcdir", dest="srcdir", default="../../src",
+                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
+    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
+                      help="Root directory for datadirs")
+    (options, args) = parser.parse_args()
+
+    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
+
+    check_json_precision()
+
+    success = False
+    nodes = []
+    try:
+        print("Initializing test directory "+options.tmpdir)
+        print("  node0 running at: 127.0.0.1:%d"%(p2p_port(0)))
+        if not os.path.isdir(options.tmpdir):
+            os.makedirs(options.tmpdir)
+        initialize_chain(options.tmpdir)
+
+        run_test(nodes, options.tmpdir)
+
+        success = True
+
+    except AssertionError as e:
+        print("Assertion failed: "+e.message)
+    except Exception as e:
+        print("Unexpected exception caught during testing: "+str(e))
+        traceback.print_tb(sys.exc_info()[2])
+
+    if not options.nocleanup:
+        print("Cleaning up")
+        stop_nodes(nodes)
+        wait_bitcoinds()
+        shutil.rmtree(options.tmpdir)
+
+    if success:
+        print("Tests successful")
+        sys.exit(0)
+    else:
+        print("Failed")
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index eab526daf365..eded098c7c95 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -12,6 +12,7 @@
 
 from decimal import Decimal
 import json
+import random
 import shutil
 import subprocess
 import time
@@ -70,6 +71,7 @@ def initialize_datadir(dir, n):
         f.write("rpcpassword=rt\n");
         f.write("port="+str(p2p_port(n))+"\n");
         f.write("rpcport="+str(rpc_port(n))+"\n");
+    return datadir
 
 def initialize_chain(test_dir):
     """
@@ -82,7 +84,7 @@ def initialize_chain(test_dir):
         devnull = open("/dev/null", "w+")
         # Create cache directories, run bitcoinds:
         for i in range(4):
-            initialize_datadir("cache", i)
+            datadir=initialize_datadir("cache", i)
             args = [ "bitcoind", "-keypool=1", "-datadir="+datadir ]
             if i > 0:
                 args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
@@ -140,25 +142,28 @@ def _rpchost_to_args(rpchost):
         rv += ['-rpcport=' + rpcport]
     return rv
 
-def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
-    # Start bitcoinds, and wait for RPC interface to be up and running:
+def start_node(i, dir, extra_args=None, rpchost=None):
+    """
+    Start a bitcoind and return RPC connection to it
+    """
+    datadir = os.path.join(dir, "node"+str(i))
+    args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
+    if extra_args is not None: args.extend(extra_args)
+    bitcoind_processes.append(subprocess.Popen(args))
     devnull = open("/dev/null", "w+")
-    for i in range(num_nodes):
-        datadir = os.path.join(dir, "node"+str(i))
-        args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
-        if extra_args is not None:
-            args += extra_args[i]
-        bitcoind_processes.append(subprocess.Popen(args))
-        subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
-                                  _rpchost_to_args(rpchost)  +
-                                  ["-rpcwait", "getblockcount"], stdout=devnull)
+    subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
+                          _rpchost_to_args(rpchost)  +
+                          ["-rpcwait", "getblockcount"], stdout=devnull)
     devnull.close()
-    # Create&return JSON-RPC connections
-    rpc_connections = []
-    for i in range(num_nodes):
-        url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
-        rpc_connections.append(AuthServiceProxy(url))
-    return rpc_connections
+    url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
+    return AuthServiceProxy(url)
+
+def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
+    """
+    Start multiple bitcoinds, return RPC connections to them
+    """
+    if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
+    return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
 
 def debug_log(dir, n_node):
     return os.path.join(dir, "node"+str(n_node), "regtest", "debug.log")
@@ -178,6 +183,108 @@ def connect_nodes(from_connection, node_num):
     ip_port = "127.0.0.1:"+str(p2p_port(node_num))
     from_connection.addnode(ip_port, "onetry")
 
+def find_output(node, txid, amount):
+    """
+    Return index to output of txid with value amount
+    Raises exception if there is none.
+    """
+    txdata = node.getrawtransaction(txid, 1)
+    for i in range(len(txdata["vout"])):
+        if txdata["vout"][i]["value"] == amount:
+            return i
+    raise RuntimeError("find_output txid %s : %s not found"%(txid,str(amount)))
+
+def gather_inputs(from_node, amount_needed):
+    """
+    Return a random set of unspent txouts that are enough to pay amount_needed
+    """
+    utxo = from_node.listunspent(1)
+    random.shuffle(utxo)
+    inputs = []
+    total_in = Decimal("0.00000000")
+    while total_in < amount_needed and len(utxo) > 0:
+        t = utxo.pop()
+        total_in += t["amount"]
+        inputs.append({ "txid" : t["txid"], "vout" : t["vout"], "address" : t["address"] } )
+    if total_in < amount_needed:
+        raise RuntimeError("Insufficient funds: need %d, have %d"%(amount+fee*2, total_in))
+    return (total_in, inputs)
+
+def make_change(from_node, amount_in, amount_out, fee):
+    """
+    Create change output(s), return them
+    """
+    outputs = {}
+    amount = amount_out+fee
+    change = amount_in - amount
+    if change > amount*2:
+        # Create an extra change output to break up big inputs
+        outputs[from_node.getnewaddress()] = float(change/2)
+        change = change/2
+    if change > 0:
+        outputs[from_node.getnewaddress()] = float(change)
+    return outputs
+
+def send_zeropri_transaction(from_node, to_node, amount, fee):
+    """
+    Create&broadcast a zero-priority transaction.
+    Returns (txid, hex-encoded-txdata)
+    Ensures transaction is zero-priority by first creating a send-to-self,
+    then using it's output
+    """
+
+    # Create a send-to-self with confirmed inputs:
+    self_address = from_node.getnewaddress()
+    (total_in, inputs) = gather_inputs(from_node, amount+fee*2)
+    outputs = make_change(from_node, total_in, amount+fee, fee)
+    outputs[self_address] = float(amount+fee)
+
+    self_rawtx = from_node.createrawtransaction(inputs, outputs)
+    self_signresult = from_node.signrawtransaction(self_rawtx)
+    self_txid = from_node.sendrawtransaction(self_signresult["hex"], True)
+
+    vout = find_output(from_node, self_txid, amount+fee)
+    # Now immediately spend the output to create a 1-input, 1-output
+    # zero-priority transaction:
+    inputs = [ { "txid" : self_txid, "vout" : vout } ]
+    outputs = { to_node.getnewaddress() : float(amount) }
+
+    rawtx = from_node.createrawtransaction(inputs, outputs)
+    signresult = from_node.signrawtransaction(rawtx)
+    txid = from_node.sendrawtransaction(signresult["hex"], True)
+
+    return (txid, signresult["hex"])
+
+def random_zeropri_transaction(nodes, amount, min_fee, fee_increment, fee_variants):
+    """
+    Create a random zero-priority transaction.
+    Returns (txid, hex-encoded-transaction-data, fee)
+    """
+    from_node = random.choice(nodes)
+    to_node = random.choice(nodes)
+    fee = min_fee + fee_increment*random.randint(0,fee_variants)
+    (txid, txhex) = send_zeropri_transaction(from_node, to_node, amount, fee)
+    return (txid, txhex, fee)
+
+def random_transaction(nodes, amount, min_fee, fee_increment, fee_variants):
+    """
+    Create a random transaction.
+    Returns (txid, hex-encoded-transaction-data, fee)
+    """
+    from_node = random.choice(nodes)
+    to_node = random.choice(nodes)
+    fee = min_fee + fee_increment*random.randint(0,fee_variants)
+
+    (total_in, inputs) = gather_inputs(from_node, amount+fee)
+    outputs = make_change(from_node, total_in, amount, fee)
+    outputs[to_node.getnewaddress()] = float(amount)
+
+    rawtx = from_node.createrawtransaction(inputs, outputs)
+    signresult = from_node.signrawtransaction(rawtx)
+    txid = from_node.sendrawtransaction(signresult["hex"], True)
+
+    return (txid, signresult["hex"], fee)
+
 def assert_equal(thing1, thing2):
     if thing1 != thing2:
         raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
diff --git a/src/core.h b/src/core.h
index 9fccffc4b29e..0e5912934962 100644
--- a/src/core.h
+++ b/src/core.h
@@ -120,6 +120,7 @@ class CFeeRate
 private:
     int64_t nSatoshisPerK; // unit is satoshis-per-1,000-bytes
 public:
+    CFeeRate() : nSatoshisPerK(0) { }
     explicit CFeeRate(int64_t _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
     CFeeRate(int64_t nFeePaid, size_t nSize);
     CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
@@ -132,6 +133,8 @@ class CFeeRate
     friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
 
     std::string ToString() const;
+
+    IMPLEMENT_SERIALIZE( READWRITE(nSatoshisPerK); )
 };
 
 
diff --git a/src/init.cpp b/src/init.cpp
index 1aad679b3b47..aca5e0c9aa92 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -59,6 +59,7 @@ enum BindFlags {
     BF_REPORT_ERROR = (1U << 1)
 };
 
+static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -121,6 +122,14 @@ void Shutdown()
 #endif
     StopNode();
     UnregisterNodeSignals(GetNodeSignals());
+
+    boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
+    CAutoFile est_fileout = CAutoFile(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
+    if (est_fileout)
+        mempool.WriteFeeEstimates(est_fileout);
+    else
+        LogPrintf("failed to write fee estimates");
+
     {
         LOCK(cs_main);
 #ifdef ENABLE_WALLET
@@ -933,6 +942,11 @@ bool AppInit2(boost::thread_group& threadGroup)
         return false;
     }
 
+    boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
+    CAutoFile est_filein = CAutoFile(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
+    if (est_filein)
+        mempool.ReadFeeEstimates(est_filein);
+
     // ********************************************************* Step 8: load wallet
 #ifdef ENABLE_WALLET
     if (fDisableWallet) {
diff --git a/src/main.cpp b/src/main.cpp
index 9d6c01d64e99..429473d8f8ac 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -851,6 +851,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         CCoinsView dummy;
         CCoinsViewCache view(dummy);
 
+        int64_t nValueIn = 0;
         {
         LOCK(pool.cs);
         CCoinsViewMemPool viewMemPool(*pcoinsTip, pool);
@@ -879,6 +880,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Bring the best block into scope
         view.GetBestBlock();
 
+        nValueIn = view.GetValueIn(tx);
+
         // we have all inputs cached now, so switch back to dummy, so we don't need to keep lock on mempool
         view.SetBackend(dummy);
         }
@@ -891,7 +894,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // you should add code here to check that the transaction does a
         // reasonable number of ECDSA signature verifications.
 
-        int64_t nValueIn = view.GetValueIn(tx);
         int64_t nValueOut = tx.GetValueOut();
         int64_t nFees = nValueIn-nValueOut;
         double dPriority = view.GetPriority(tx, chainActive.Height());
@@ -2017,11 +2019,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
         return false;
     // Remove conflicting transactions from the mempool.
     list<CTransaction> txConflicted;
-    BOOST_FOREACH(const CTransaction &tx, block.vtx) {
-        list<CTransaction> unused;
-        mempool.remove(tx, unused);
-        mempool.removeConflicts(tx, txConflicted);
-    }
+    mempool.removeForBlock(block.vtx, pindexNew->nHeight, txConflicted);
     mempool.check(pcoinsTip);
     // Update chainActive & related variables.
     UpdateTip(pindexNew);
diff --git a/src/main.h b/src/main.h
index 3fccd32a29f8..23c866037616 100644
--- a/src/main.h
+++ b/src/main.h
@@ -292,13 +292,6 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx);
 unsigned int GetP2SHSigOpCount(const CTransaction& tx, CCoinsViewCache& mapInputs);
 
 
-inline bool AllowFree(double dPriority)
-{
-    // Large (in bytes) low-priority (new, small-coin) transactions
-    // need a fee.
-    return dPriority > COIN * 144 / 250;
-}
-
 // Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
 // This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
 // instead of being performed inline.
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 4f3c39ce9bd4..b89a95ad119c 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -176,6 +176,8 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
     if (strMethod == "verifychain"            && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "keypoolrefill"          && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "getrawmempool"          && n > 0) ConvertTo<bool>(params[0]);
+    if (strMethod == "estimatefee"            && n > 0) ConvertTo<boost::int64_t>(params[0]);
+    if (strMethod == "estimatepriority"       && n > 0) ConvertTo<boost::int64_t>(params[0]);
 
     return params;
 }
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 23876c603dec..dd148c6af1a0 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -15,6 +15,7 @@
 #endif
 #include <stdint.h>
 
+#include <boost/assign/list_of.hpp>
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_value.h"
 
@@ -626,3 +627,63 @@ Value submitblock(const Array& params, bool fHelp)
 
     return Value::null;
 }
+
+Value estimatefee(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "estimatefee nblocks\n"
+            "\nEstimates the approximate fee per kilobyte\n"
+            "needed for a transaction to get confirmed\n"
+            "within nblocks blocks.\n"
+            "\nArguments:\n"
+            "1. nblocks     (numeric)\n"
+            "\nResult:\n"
+            "n :    (numeric) estimated fee-per-kilobyte\n"
+            "\n"
+            "-1.0 is returned if not enough transactions and\n"
+            "blocks have been observed to make an estimate.\n"
+            "\nExample:\n"
+            + HelpExampleCli("estimatefee", "6")
+            );
+
+    RPCTypeCheck(params, boost::assign::list_of(int_type));
+
+    int nBlocks = params[0].get_int();
+    if (nBlocks < 1)
+        nBlocks = 1;
+
+    CFeeRate feeRate = mempool.estimateFee(nBlocks);
+    if (feeRate == CFeeRate(0))
+        return -1.0;
+
+    return ValueFromAmount(feeRate.GetFeePerK());
+}
+
+Value estimatepriority(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "estimatepriority nblocks\n"
+            "\nEstimates the approximate priority\n"
+            "a zero-fee transaction needs to get confirmed\n"
+            "within nblocks blocks.\n"
+            "\nArguments:\n"
+            "1. nblocks     (numeric)\n"
+            "\nResult:\n"
+            "n :    (numeric) estimated priority\n"
+            "\n"
+            "-1.0 is returned if not enough transactions and\n"
+            "blocks have been observed to make an estimate.\n"
+            "\nExample:\n"
+            + HelpExampleCli("estimatepriority", "6")
+            );
+
+    RPCTypeCheck(params, boost::assign::list_of(int_type));
+
+    int nBlocks = params[0].get_int();
+    if (nBlocks < 1)
+        nBlocks = 1;
+
+    return mempool.estimatePriority(nBlocks);
+}
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 2534a9dcf41f..72a7fe83ef76 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -268,6 +268,8 @@ static const CRPCCommand vRPCCommands[] =
     { "createmultisig",         &createmultisig,         true,      true ,      false },
     { "validateaddress",        &validateaddress,        true,      false,      false }, /* uses wallet if enabled */
     { "verifymessage",          &verifymessage,          false,     false,      false },
+    { "estimatefee",            &estimatefee,            true,      true,       false },
+    { "estimatepriority",       &estimatepriority,       true,      true,       false },
 
 #ifdef ENABLE_WALLET
     /* Wallet */
diff --git a/src/rpcserver.h b/src/rpcserver.h
index e8cd2cd0fc03..73e8b9426c4e 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -133,6 +133,8 @@ extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool f
 extern json_spirit::Value getwork(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value estimatefee(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value estimatepriority(const json_spirit::Array& params, bool fHelp);
 
 extern json_spirit::Value getnewaddress(const json_spirit::Array& params, bool fHelp); // in rpcwallet.cpp
 extern json_spirit::Value getaccountaddress(const json_spirit::Array& params, bool fHelp);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 64c9eac73dcb..4bf01d4848b1 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -6,6 +6,8 @@
 #include "core.h"
 #include "txmempool.h"
 
+#include <boost/circular_buffer.hpp>
+
 using namespace std;
 
 CTxMemPoolEntry::CTxMemPoolEntry()
@@ -35,12 +37,311 @@ CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
     return dResult;
 }
 
+//
+// Keep track of fee/priority for transactions confirmed within N blocks
+//
+class CBlockAverage
+{
+private:
+    boost::circular_buffer<CFeeRate> feeSamples;
+    boost::circular_buffer<double> prioritySamples;
+
+    template<typename T> std::vector<T> buf2vec(boost::circular_buffer<T> buf) const
+    {
+        std::vector<T> vec(buf.begin(), buf.end());
+        return vec;
+    }
+
+public:
+    CBlockAverage() : feeSamples(100), prioritySamples(100) { }
+
+    void RecordFee(const CFeeRate& feeRate) {
+        feeSamples.push_back(feeRate);
+    }
+
+    void RecordPriority(double priority) {
+        prioritySamples.push_back(priority);
+    }
+
+    size_t FeeSamples() const { return feeSamples.size(); }
+    size_t GetFeeSamples(std::vector<CFeeRate>& insertInto) const
+    {
+        BOOST_FOREACH(const CFeeRate& f, feeSamples)
+            insertInto.push_back(f);
+        return feeSamples.size();
+    }
+    size_t PrioritySamples() const { return prioritySamples.size(); }
+    size_t GetPrioritySamples(std::vector<double>& insertInto) const
+    {
+        BOOST_FOREACH(double d, prioritySamples)
+            insertInto.push_back(d);
+        return prioritySamples.size();
+    }
+
+    // Used as belt-and-suspenders check when reading to detect
+    // file corruption
+    bool AreSane(const std::vector<CFeeRate>& vecFee)
+    {
+        BOOST_FOREACH(CFeeRate fee, vecFee)
+        {
+            if (fee < CFeeRate(0))
+                return false;
+            if (fee.GetFee(1000) > CTransaction::minRelayTxFee.GetFee(1000) * 10000)
+                return false;
+        }
+        return true;
+    }
+    bool AreSane(const std::vector<double> vecPriority)
+    {
+        BOOST_FOREACH(double priority, vecPriority)
+        {
+            if (priority < 0)
+                return false;
+        }
+        return true;
+    }
+
+    void Write(CAutoFile& fileout) const
+    {
+        std::vector<CFeeRate> vecFee = buf2vec(feeSamples);
+        fileout << vecFee;
+        std::vector<double> vecPriority = buf2vec(prioritySamples);
+        fileout << vecPriority;
+    }
+
+    void Read(CAutoFile& filein) {
+        std::vector<CFeeRate> vecFee;
+        filein >> vecFee;
+        if (AreSane(vecFee))
+            feeSamples.insert(feeSamples.end(), vecFee.begin(), vecFee.end());
+        else
+            throw runtime_error("Corrupt fee value in estimates file.");
+        std::vector<double> vecPriority;
+        filein >> vecPriority;
+        if (AreSane(vecPriority))
+            prioritySamples.insert(prioritySamples.end(), vecPriority.begin(), vecPriority.end());
+        else
+            throw runtime_error("Corrupt priority value in estimates file.");
+        if (feeSamples.size() + prioritySamples.size() > 0)
+            LogPrint("estimatefee", "Read %d fee samples and %d priority samples\n",
+                     feeSamples.size(), prioritySamples.size());
+    }
+};
+
+class CMinerPolicyEstimator
+{
+private:
+    // Records observed averages transactions that confirmed within one block, two blocks,
+    // three blocks etc.
+    std::vector<CBlockAverage> history;
+    std::vector<CFeeRate> sortedFeeSamples;
+    std::vector<double> sortedPrioritySamples;
+
+    int nBestSeenHeight;
+
+    // nBlocksAgo is 0 based, i.e. transactions that confirmed in the highest seen block are
+    // nBlocksAgo == 0, transactions in the block before that are nBlocksAgo == 1 etc.
+    void seenTxConfirm(CFeeRate feeRate, double dPriority, int nBlocksAgo)
+    {
+        // Last entry records "everything else".
+        int nBlocksTruncated = min(nBlocksAgo, (int) history.size() - 1);
+        assert(nBlocksTruncated >= 0);
+
+        // We need to guess why the transaction was included in a block-- either
+        // because it is high-priority or because it has sufficient fees.
+        bool sufficientFee = (feeRate > CTransaction::minRelayTxFee);
+        bool sufficientPriority = AllowFree(dPriority);
+        const char* assignedTo = "unassigned";
+        if (sufficientFee && !sufficientPriority)
+        {
+            history[nBlocksTruncated].RecordFee(feeRate);
+            assignedTo = "fee";
+        }
+        else if (sufficientPriority && !sufficientFee)
+        {
+            history[nBlocksTruncated].RecordPriority(dPriority);
+            assignedTo = "priority";
+        }
+        else
+        {
+            // Neither or both fee and priority sufficient to get confirmed:
+            // don't know why they got confirmed.
+        }
+        LogPrint("estimatefee", "Seen TX confirm: %s : %s fee/%g priority, took %d blocks\n",
+                 assignedTo, feeRate.ToString(), dPriority, nBlocksAgo);
+    }
+
+public:
+    CMinerPolicyEstimator(int nEntries) : nBestSeenHeight(0)
+    {
+        history.resize(nEntries);
+    }
+
+    void seenBlock(const std::vector<CTxMemPoolEntry>& entries, int nBlockHeight)
+    {
+        if (nBlockHeight <= nBestSeenHeight)
+        {
+            // Ignore side chains and re-orgs; assuming they are random
+            // they don't affect the estimate.
+            // And if an attacker can re-org the chain at will, then
+            // you've got much bigger problems than "attacker can influence
+            // transaction fees."
+            return;
+        }
+        nBestSeenHeight = nBlockHeight;
+
+        // Fill up the history buckets based on how long transactions took
+        // to confirm.
+        std::vector<std::vector<const CTxMemPoolEntry*> > entriesByConfirmations;
+        entriesByConfirmations.resize(history.size());
+        BOOST_FOREACH(const CTxMemPoolEntry& entry, entries)
+        {
+            // How many blocks did it take for miners to include this transaction?
+            int delta = nBlockHeight - entry.GetHeight();
+            if (delta <= 0)
+            {
+                // Re-org made us lose height, this should only happen if we happen
+                // to re-org on a difficulty transition point: very rare!
+                continue;
+            }
+            if ((delta-1) >= (int)history.size())
+                delta = history.size(); // Last bucket is catch-all
+            entriesByConfirmations[delta-1].push_back(&entry);
+        }
+        for (size_t i = 0; i < entriesByConfirmations.size(); i++)
+        {
+            std::vector<const CTxMemPoolEntry*> &e = entriesByConfirmations.at(i);
+            // Insert at most 10 random entries per bucket, otherwise a single block
+            // can dominate an estimate:
+            if (e.size() > 10) {
+                std::random_shuffle(e.begin(), e.end());
+                e.resize(10);
+            }
+            BOOST_FOREACH(const CTxMemPoolEntry* entry, e)
+            {
+                // Fees are stored and reported as BTC-per-kb:
+                CFeeRate feeRate(entry->GetFee(), entry->GetTxSize());
+                double dPriority = entry->GetPriority(entry->GetHeight()); // Want priority when it went IN
+                seenTxConfirm(feeRate, dPriority, i);
+            }
+        }
+        for (size_t i = 0; i < history.size(); i++) {
+            if (history[i].FeeSamples() + history[i].PrioritySamples() > 0)
+                LogPrint("estimatefee", "estimates: for confirming within %d blocks based on %d/%d samples, fee=%s, prio=%g\n", 
+                         i,
+                         history[i].FeeSamples(), history[i].PrioritySamples(),
+                         estimateFee(i+1).ToString(), estimatePriority(i+1));
+        }
+        sortedFeeSamples.clear();
+        sortedPrioritySamples.clear();
+    }
+
+    // Can return CFeeRate(0) if we don't have any data for that many blocks back. nBlocksToConfirm is 1 based.
+    CFeeRate estimateFee(int nBlocksToConfirm)
+    {
+        nBlocksToConfirm--;
+
+        if (nBlocksToConfirm < 0 || nBlocksToConfirm >= (int)history.size())
+            return CFeeRate(0);
+
+        if (sortedFeeSamples.size() == 0)
+        {
+            for (size_t i = 0; i < history.size(); i++)
+                history.at(i).GetFeeSamples(sortedFeeSamples);
+            std::sort(sortedFeeSamples.begin(), sortedFeeSamples.end(),
+                      std::greater<CFeeRate>());
+        }
+        if (sortedFeeSamples.size() == 0)
+            return CFeeRate(0);
+
+        int nBucketSize = history.at(nBlocksToConfirm).FeeSamples();
+
+        // Estimates should not increase as number of confirmations goes up,
+        // but the estimates are noisy because confirmations happen discretely
+        // in blocks. To smooth out the estimates, use all samples in the history
+        // and use the nth highest where n is (number of samples in previous bucket +
+        // half the samples in nBlocksToConfirm bucket):
+        size_t nPrevSize = 0;
+        for (int i = 0; i < nBlocksToConfirm; i++)
+            nPrevSize += history.at(i).FeeSamples();
+        size_t index = min(nPrevSize + nBucketSize/2, sortedFeeSamples.size()-1);
+        return sortedFeeSamples[index];
+    }
+    double estimatePriority(int nBlocksToConfirm)
+    {
+        nBlocksToConfirm--;
+
+        if (nBlocksToConfirm < 0 || nBlocksToConfirm >= (int)history.size())
+            return -1;
+
+        if (sortedPrioritySamples.size() == 0)
+        {
+            for (size_t i = 0; i < history.size(); i++)
+                history.at(i).GetPrioritySamples(sortedPrioritySamples);
+            std::sort(sortedPrioritySamples.begin(), sortedPrioritySamples.end(),
+                      std::greater<double>());
+        }
+        if (sortedPrioritySamples.size() == 0)
+            return -1.0;
+
+        int nBucketSize = history.at(nBlocksToConfirm).PrioritySamples();
+
+        // Estimates should not increase as number of confirmations needed goes up,
+        // but the estimates are noisy because confirmations happen discretely
+        // in blocks. To smooth out the estimates, use all samples in the history
+        // and use the nth highest where n is (number of samples in previous buckets +
+        // half the samples in nBlocksToConfirm bucket).
+        size_t nPrevSize = 0;
+        for (int i = 0; i < nBlocksToConfirm; i++)
+            nPrevSize += history.at(i).PrioritySamples();
+        size_t index = min(nPrevSize + nBucketSize/2, sortedFeeSamples.size()-1);
+        return sortedPrioritySamples[index];
+    }
+
+    void Write(CAutoFile& fileout) const
+    {
+        fileout << nBestSeenHeight;
+        fileout << history.size();
+        BOOST_FOREACH(const CBlockAverage& entry, history)
+        {
+            entry.Write(fileout);
+        }
+    }
+
+    void Read(CAutoFile& filein)
+    {
+        filein >> nBestSeenHeight;
+        size_t numEntries;
+        filein >> numEntries;
+        history.clear();
+        for (size_t i = 0; i < numEntries; i++)
+        {
+            CBlockAverage entry;
+            entry.Read(filein);
+            history.push_back(entry);
+        }
+    }
+};
+
+
 CTxMemPool::CTxMemPool()
 {
     // Sanity checks off by default for performance, because otherwise
     // accepting transactions becomes O(N^2) where N is the number
     // of transactions in the pool
     fSanityCheck = false;
+
+    // 25 blocks is a compromise between using a lot of disk/memory and
+    // trying to give accurate estimates to people who might be willing
+    // to wait a day or two to save a fraction of a penny in fees.
+    // Confirmation times for very-low-fee transactions that take more
+    // than an hour or three to confirm are highly variable.
+    minerPolicyEstimator = new CMinerPolicyEstimator(25);
+}
+
+CTxMemPool::~CTxMemPool()
+{
+    delete minerPolicyEstimator;
 }
 
 void CTxMemPool::pruneSpent(const uint256 &hashTx, CCoins &coins)
@@ -128,6 +429,28 @@ void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>
     }
 }
 
+// Called when a block is connected. Removes from mempool and updates the miner fee estimator.
+void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
+                                std::list<CTransaction>& conflicts)
+{
+    LOCK(cs);
+    std::vector<CTxMemPoolEntry> entries;
+    BOOST_FOREACH(const CTransaction& tx, vtx)
+    {
+        uint256 hash = tx.GetHash();
+        if (mapTx.count(hash))
+            entries.push_back(mapTx[hash]);
+    }
+    minerPolicyEstimator->seenBlock(entries, nBlockHeight);
+    BOOST_FOREACH(const CTransaction& tx, vtx)
+    {
+        std::list<CTransaction> dummy;
+        remove(tx, dummy, false);
+        removeConflicts(tx, conflicts);
+    }
+}
+
+
 void CTxMemPool::clear()
 {
     LOCK(cs);
@@ -195,6 +518,53 @@ bool CTxMemPool::lookup(uint256 hash, CTransaction& result) const
     return true;
 }
 
+CFeeRate CTxMemPool::estimateFee(int nBlocks) const
+{
+    LOCK(cs);
+    return minerPolicyEstimator->estimateFee(nBlocks);
+}
+double CTxMemPool::estimatePriority(int nBlocks) const
+{
+    LOCK(cs);
+    return minerPolicyEstimator->estimatePriority(nBlocks);
+}
+
+bool
+CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const
+{
+    try {
+        LOCK(cs);
+        fileout << 99900; // version required to read: 0.9.99 or later
+        fileout << CLIENT_VERSION; // version that wrote the file
+        minerPolicyEstimator->Write(fileout);
+    }
+    catch (std::exception &e) {
+        LogPrintf("CTxMemPool::WriteFeeEstimates() : unable to write policy estimator data (non-fatal)");
+        return false;
+    }
+    return true;
+}
+
+bool
+CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
+{
+    try {
+        int nVersionRequired, nVersionThatWrote;
+        filein >> nVersionRequired >> nVersionThatWrote;
+        if (nVersionRequired > CLIENT_VERSION)
+            return error("CTxMemPool::ReadFeeEstimates() : up-version (%d) fee estimate file", nVersionRequired);
+
+        LOCK(cs);
+        minerPolicyEstimator->Read(filein);
+    }
+    catch (std::exception &e) {
+        LogPrintf("CTxMemPool::ReadFeeEstimates() : unable to read policy estimator data (non-fatal)");
+        return false;
+    }
+    return true;
+}
+
+
 CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
 
 bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) {
diff --git a/src/txmempool.h b/src/txmempool.h
index 4509e95778c9..b2915aa842bd 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -11,6 +11,13 @@
 #include "core.h"
 #include "sync.h"
 
+inline bool AllowFree(double dPriority)
+{
+    // Large (in bytes) low-priority (new, small-coin) transactions
+    // need a fee.
+    return dPriority > COIN * 144 / 250;
+}
+
 /** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */
 static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
 
@@ -41,6 +48,8 @@ class CTxMemPoolEntry
     unsigned int GetHeight() const { return nHeight; }
 };
 
+class CMinerPolicyEstimator;
+
 /*
  * CTxMemPool stores valid-according-to-the-current-best-chain
  * transactions that may be included in the next block.
@@ -56,6 +65,7 @@ class CTxMemPool
 private:
     bool fSanityCheck; // Normally false, true if -checkmempool or -regtest
     unsigned int nTransactionsUpdated;
+    CMinerPolicyEstimator* minerPolicyEstimator;
 
 public:
     mutable CCriticalSection cs;
@@ -63,6 +73,7 @@ class CTxMemPool
     std::map<COutPoint, CInPoint> mapNextTx;
 
     CTxMemPool();
+    ~CTxMemPool();
 
     /*
      * If sanity-checking is turned on, check makes sure the pool is
@@ -76,6 +87,8 @@ class CTxMemPool
     bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry);
     void remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive = false);
     void removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed);
+    void removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
+                        std::list<CTransaction>& conflicts);
     void clear();
     void queryHashes(std::vector<uint256>& vtxid);
     void pruneSpent(const uint256& hash, CCoins &coins);
@@ -95,6 +108,16 @@ class CTxMemPool
     }
 
     bool lookup(uint256 hash, CTransaction& result) const;
+
+    // Estimate fee rate needed to get into the next
+    // nBlocks
+    CFeeRate estimateFee(int nBlocks) const;
+    // Estimate priority needed to get into the next
+    // nBlocks
+    double estimatePriority(int nBlocks) const;
+    // Write/Read estimates to disk
+    bool WriteFeeEstimates(CAutoFile& fileout) const;
+    bool ReadFeeEstimates(CAutoFile& filein);
 };
 
 /** CCoinsView that brings transactions from a memorypool into view.

From db41541bc2e679a5c98ab380837c985e0252ab43 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 6 Jun 2014 19:28:34 +0200
Subject: [PATCH 0147/1819] qt: Periodic translation update

---
 src/qt/locale/bitcoin_el_GR.ts | 147 +++++++++++++++++----------------
 src/qt/locale/bitcoin_sl_SI.ts |  38 +++++----
 src/qt/locale/bitcoin_th_TH.ts |  96 ++++++++++-----------
 3 files changed, 142 insertions(+), 139 deletions(-)

diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 687947e3b9ce..e957a0088eba 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -3,11 +3,11 @@
     <name>AboutDialog</name>
     <message>
         <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Σχετικά με το Bitcoin Core</translation>
     </message>
     <message>
         <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; έκδοση</translation>
     </message>
     <message>
         <source>
@@ -29,11 +29,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Οι προγραμματιστές του Bitcoin Core</translation>
     </message>
     <message>
         <source>(%1-bit)</source>
-        <translation type="unfinished"/>
+        <translation>(%1-bit)</translation>
     </message>
 </context>
 <context>
@@ -128,11 +128,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Η εξαγωγή απέτυχε</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Παρουσιάστηκε σφάλμα κατά την αποθήκευση της λίστας πορτοφολιών στο %1.</translation>
     </message>
 </context>
 <context>
@@ -438,7 +438,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Σχετικά με το Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -494,11 +494,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 και %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n έτος</numerusform><numerusform>%n έτη</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -608,11 +608,11 @@ Address: %4
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Ρέστα:</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(από)επιλογή όλων</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -672,7 +672,7 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή ποσότητας</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -684,11 +684,11 @@ Address: %4
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή των byte</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή προτεραιότητας</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -696,51 +696,51 @@ Address: %4
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή των ρέστων</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>ύψιστη</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>υψηλότερη</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>ψηλή</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>μεσαία-ψηλή</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>μεσαία</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>μεσαία-χαμηλή</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>χαμηλή</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>χαμηλότερη</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>χαμηλότατη</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 κλειδωμένο)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>κανένα</translation>
     </message>
     <message>
         <source>Dust</source>
@@ -796,11 +796,12 @@ Address: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>ρέστα από %1 (%2) </translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(ρέστα)
+</translation>
     </message>
 </context>
 <context>
@@ -815,7 +816,7 @@ Address: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>Η ετικέτα που συνδέεται με αυτήν την καταχώρηση στο βιβλίο διευθύνσεων</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
@@ -936,11 +937,11 @@ Address: %4
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <translation>Καλώς ήρθατε στο Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Καθώς αυτή είναι η πρώτη φορά που εκκινείται το πρόγραμμα, μπορείτε να διαλέξετε πού θα αποθηκεύει το Bitcoin Core τα δεδομένα του.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
@@ -1030,7 +1031,7 @@ Address: %4
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
@@ -1082,7 +1083,7 @@ Address: %4
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Έμπειρος</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
@@ -1190,7 +1191,7 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>κανένα</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1198,7 +1199,7 @@ Address: %4
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Χρειάζεται επανεκκίνηση του προγράμματος για να ενεργοποιηθούν οι αλλαγές.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
@@ -1229,7 +1230,7 @@ Address: %4
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Διαθέσιμο:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
@@ -1370,11 +1371,11 @@ Address: %4
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Αποθήκευση εικόνας...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Αντιγραφή εικόνας</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1409,7 +1410,7 @@ Address: %4
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Γενικά</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1425,7 +1426,7 @@ Address: %4
     </message>
     <message>
         <source>Name</source>
-        <translation type="unfinished"/>
+        <translation>Όνομα</translation>
     </message>
     <message>
         <source>Number of connections</source>
@@ -1457,11 +1458,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Κίνηση δικτύου</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Εκκαθάριση</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1536,7 +1537,7 @@ Address: %4
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Ποσό:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1544,7 +1545,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Μήνυμα:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
@@ -1584,7 +1585,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Αίτηση πληρωμής</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
@@ -1608,7 +1609,7 @@ Address: %4
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή μηνύματος</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1631,7 +1632,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Αποθήκευση εικόνας...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1698,7 +1699,7 @@ Address: %4
     </message>
     <message>
         <source>(no amount)</source>
-        <translation type="unfinished"/>
+        <translation>(κανένα ποσό)</translation>
     </message>
 </context>
 <context>
@@ -1717,7 +1718,7 @@ Address: %4
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>επιλεγμένο αυτόματα</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1753,7 +1754,7 @@ Address: %4
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <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>
@@ -1801,7 +1802,7 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή ποσότητας</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1817,11 +1818,11 @@ Address: %4
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή των byte</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή προτεραιότητας</translation>
     </message>
     <message>
         <source>Copy low output</source>
@@ -1829,15 +1830,15 @@ Address: %4
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Αντιγραφή των ρέστων</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Ολικό Ποσό %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>ή</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1940,7 +1941,7 @@ Address: %4
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Αφαίρεση αυτής της καταχώρησης</translation>
     </message>
     <message>
         <source>Message:</source>
@@ -1975,11 +1976,11 @@ Address: %4
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>Το Bitcoin Core τερματίζεται...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>Μην απενεργοποιήσετε τον υπολογιστή μέχρι να κλείσει αυτό το παράθυρο.</translation>
     </message>
 </context>
 <context>
@@ -2133,7 +2134,7 @@ Address: %4
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Οι προγραμματιστές του Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2341,11 +2342,11 @@ Address: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Offline</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Ανεπιβεβαίωτες</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
@@ -2484,19 +2485,19 @@ Address: %4
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>Εξαγωγή Ιστορικού Συναλλαγών</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Η Εξαγωγή Απέτυχε</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Yπήρξε σφάλμα κατά την προσπάθεια αποθήκευσης του ιστορικού συναλλαγών στο %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>Επιτυχής εξαγωγή</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
@@ -2547,7 +2548,7 @@ Address: %4
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <translation>Δεν έχει φορτωθεί πορτοφόλι</translation>
     </message>
 </context>
 <context>
@@ -2585,7 +2586,7 @@ Address: %4
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Τα δεδομένα πορτοφολιού αποθηκεύτηκαν με επιτυχία στο %1.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
@@ -2801,11 +2802,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(προεπιλογή: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(προεπιλογή: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2841,7 +2842,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Επιλογές σύνδεσης:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
@@ -3045,7 +3046,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <translation>Επιλογές πορτοφολιού:</translation>
     </message>
     <message>
         <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
@@ -3229,7 +3230,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
+        <translation>κατά την εκκίνηση</translation>
     </message>
     <message>
         <source>version</source>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 1a46c6ae6c45..2ad31e911bae 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -344,7 +344,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Spremeni konfiguracijo nastavitev za Bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
@@ -1144,7 +1144,7 @@ Naslov: %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
+        <translation>Vmesnik uporabnika &amp;jezik:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
@@ -1487,11 +1487,11 @@ Naslov: %4
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <translation>Dobrodošli na Bitcoin RPC konzoli.</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 type="unfinished"/>
+        <translation>Uporabi puščice za gor in dol za navigacijo po zgodovini in &lt;b&gt;Ctrl-L&lt;/b&gt; za izbris izpisa na ekranu.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1847,7 +1847,7 @@ Naslov: %4
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
+        <translation>Celotni znesek presega vaše stanje, ko je zaračunana 1% provizija.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -2626,7 +2626,7 @@ Naslov: %4
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
+        <translation>Povežite se z vozliščem za pridobitev naslovov uporabnikov in nato prekinite povezavo.</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2638,7 +2638,7 @@ Naslov: %4
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
+        <translation>Število sekund za težavo pri vzpostavitvi povezave med uporabniki (privzeto: 86400)</translation>
     </message>
     <message>
         <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
@@ -3268,11 +3268,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <translation>Nemogoče je povezati s/z %s na tem računalniku (povezava je vrnila napaka %d, %s)</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <translation>Omogoči DNS poizvedbe za -addnode, -seednode in -connect.</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
@@ -3296,27 +3296,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neveljaven -proxy naslov: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neznano omrežje določeno v -onlynet: &apos;%s&apos;.</translation>
     </message>
     <message>
         <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <translation>Neznano -socks zahtevan zastopnik različice: %i</translation>
     </message>
     <message>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nemogoče rešiti -bind naslova: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nemogoče rešiti -externalip naslova: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Neveljavna količina za -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3344,7 +3344,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>Ni mogoče zapisati privzetega naslova</translation>
     </message>
     <message>
         <source>Rescanning...</source>
@@ -3356,7 +3356,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <translation>Za uporabo %s opcije</translation>
     </message>
     <message>
         <source>Error</source>
@@ -3366,7 +3366,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
 %s
 If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
+        <translation>Potrebno je nastaviti rpcpassword=&lt;password&gt; v nastavitveni datoteki:
+%s
+Če datoteka ne obstaja jo ustvarite z dovoljenjem, da jo lahko bere samo uporabnik.</translation>
     </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index 96c49b12d080..54e15a75e00a 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -35,7 +35,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>ดับเบิลคลิก เพื่อแก้ไขที่อยู่ หรือชื่อ</translation>
+        <translation>ดับเบิ้ลคลิก เพื่อแก้ไขที่อยู่ หรือชื่อ</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -75,7 +75,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>ลบ</translation>
+        <translation>&amp;ลบ</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -119,7 +119,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
+        <translation>คั่นไฟล์ด้วยเครื่องหมายจุลภาค (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
@@ -165,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>ใส่รหัสผ่านใหม่ให้กับกระเป๋าเงิน. &lt;br/&gt; กรุณาใช้รหัสผ่านของ &lt;b&gt; 10 หรือแบบสุ่มมากกว่าตัวอักษร &lt;/ b&gt; หรือ &lt;b&gt; แปดหรือมากกว่าคำ &lt;/ b&gt;</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -173,7 +173,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>การดำเนินการนี้ต้องมีรหัสผ่านกระเป๋าเงินของคุณเพื่อปลดล็อคกระเป๋าเงิน</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -181,7 +181,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>การดำเนินการนี้ต้องมีรหัสผ่านกระเป๋าเงินของคุณในการถอดรหัสกระเป๋าเงิน</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -229,7 +229,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
+        <translation>กระเป๋าเงินเข้ารหัสล้มเหลวเนื่องจากข้อผิดพลาดภายใน กระเป๋าเงินของคุณไม่ได้เข้ารหัส</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -237,15 +237,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
+        <translation>ปลดล็อคกระเป๋าเงินล้มเหลว</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>ป้อนรหัสผ่านสำหรับการถอดรหัสกระเป๋าเงินไม่ถูกต้อง</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
+        <translation>ถอดรหัสกระเป๋าเงินล้มเหลว</translation>
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
@@ -260,11 +260,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
+        <translation>กำลังทำข้อมูลให้ตรงกันกับเครือข่าย ...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ภาพรวม</translation>
     </message>
     <message>
         <source>Node</source>
@@ -272,15 +272,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
+        <translation>แสดงภาพรวมทั่วไปของกระเป๋าเงิน</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
+        <translation>&amp;การทำรายการ</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation type="unfinished"/>
+        <translation>เรียกดูประวัติการทำธุรกรรม</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
@@ -288,11 +288,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Quit application</source>
-        <translation type="unfinished"/>
+        <translation>ออกจากโปรแกรม</translation>
     </message>
     <message>
         <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>แสดงข้อมูลเกี่ยวกับ Bitcoin</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
@@ -304,7 +304,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ตัวเลือก...</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
@@ -352,7 +352,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
+        <translation>เปลี่ยนรหัสผ่านที่ใช้สำหรับการเข้ารหัสกระเป๋าเงิน</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
@@ -404,23 +404,23 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ไฟล์</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <translation>&amp;การตั้งค่า</translation>
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ช่วยเหลือ</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <translation>แถบเครื่องมือ</translation>
     </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
@@ -460,7 +460,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>%n ที่ใช้งานการเชื่อมต่อกับเครือข่าย Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
@@ -520,19 +520,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Up to date</source>
-        <translation type="unfinished"/>
+        <translation>ทันสมัย</translation>
     </message>
     <message>
         <source>Catching up...</source>
-        <translation type="unfinished"/>
+        <translation>จับได้...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
-        <translation type="unfinished"/>
+        <translation>รายการที่ส่ง</translation>
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation type="unfinished"/>
+        <translation>การทำรายการขาเข้า</translation>
     </message>
     <message>
         <source>Date: %1
@@ -544,11 +544,11 @@ Address: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>ระเป๋าเงินถูก &lt;b&gt;เข้ารหัส&lt;/b&gt; และในขณะนี้ &lt;b&gt;ปลดล็อคแล้ว&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>กระเป๋าเงินถูก &lt;b&gt;เข้ารหัส&lt;/b&gt; และในปัจจุบัน &lt;b&gt;ล็อค &lt;/b&gt;</translation>
     </message>
     <message>
         <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
@@ -797,11 +797,11 @@ Address: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation type="unfinished"/>
+        <translation>แก้ไขที่อยู่</translation>
     </message>
     <message>
         <source>&amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ชื่อ</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
@@ -813,27 +813,27 @@ Address: %4
     </message>
     <message>
         <source>&amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>&amp;ที่อยู่</translation>
     </message>
     <message>
         <source>New receiving address</source>
-        <translation type="unfinished"/>
+        <translation>ที่อยู่ผู้รับใหม่</translation>
     </message>
     <message>
         <source>New sending address</source>
-        <translation type="unfinished"/>
+        <translation>ที่อยู่ผู้ส่งใหม่</translation>
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation type="unfinished"/>
+        <translation>แก้ไขที่อยู่ผู้รับ</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation type="unfinished"/>
+        <translation>แก้ไขที่อยู่ผู้ส่ง</translation>
     </message>
     <message>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
+        <translation>ป้อนที่อยู่ &quot;%1&quot; ที่มีอยู่แล้วในสมุดที่อยู่</translation>
     </message>
     <message>
         <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
@@ -841,11 +841,11 @@ Address: %4
     </message>
     <message>
         <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
+        <translation>ไม่สามารถปลดล็อคกระเป๋าเงิน</translation>
     </message>
     <message>
         <source>New key generation failed.</source>
-        <translation type="unfinished"/>
+        <translation>สร้างกุญแจใหม่ล้มเหลว</translation>
     </message>
 </context>
 <context>
@@ -992,7 +992,7 @@ Address: %4
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
-        <translation type="unfinished"/>
+        <translation>ตัวเลือก</translation>
     </message>
     <message>
         <source>&amp;Main</source>
@@ -1207,7 +1207,7 @@ Address: %4
     <name>OverviewPage</name>
     <message>
         <source>Form</source>
-        <translation type="unfinished"/>
+        <translation>รูป</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
@@ -1251,7 +1251,7 @@ Address: %4
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;รายการทำธุรกรรมล่าสุด&lt;/b&gt;</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1695,7 +1695,7 @@ Address: %4
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>ส่งเหรียญ</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
@@ -2127,7 +2127,7 @@ Address: %4
     </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
@@ -2494,7 +2494,7 @@ Address: %4
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
+        <translation>คั่นไฟล์ด้วยเครื่องหมายจุลภาค (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2544,7 +2544,7 @@ Address: %4
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>ส่งเหรียญ</translation>
     </message>
 </context>
 <context>

From dff0e3b9152e66ae569c4f45608677eee11e5351 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 7 Jun 2014 01:22:08 +0200
Subject: [PATCH 0148/1819] [Qt] Improve rpc console history behavior

---
 src/qt/rpcconsole.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 0d3e11f4aca9..199050cc5713 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -415,8 +415,8 @@ void RPCConsole::on_lineEdit_returnPressed()
     {
         message(CMD_REQUEST, cmd);
         emit cmdRequest(cmd);
-        // Truncate history from current position
-        history.erase(history.begin() + historyPtr, history.end());
+        // Remove command, if already in history
+        history.removeOne(cmd);
         // Append command to history
         history.append(cmd);
         // Enforce maximum history size

From 02bec4b268fa32153f26a5f4c089d4f92d887186 Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Sat, 7 Jun 2014 12:57:58 +0100
Subject: [PATCH 0149/1819] Fix compiler warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes the following compiler warning

```
miner.cpp: In constructor ‘COrphan::COrphan(const CTransaction*)’:
miner.cpp:69:14: warning: ‘COrphan::feeRate’ will be initialized after [-Wreorder]
     CFeeRate feeRate;
              ^
miner.cpp:68:12: warning:   ‘double COrphan::dPriority’ [-Wreorder]
     double dPriority;
            ^
miner.cpp:71:5: warning:   when initialized here [-Wreorder]
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
```
---
 src/miner.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 4e131c088b8b..ddd277a9bb7d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -65,8 +65,8 @@ class COrphan
 public:
     const CTransaction* ptx;
     set<uint256> setDependsOn;
-    double dPriority;
     CFeeRate feeRate;
+    double dPriority;
 
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
     {

From 95a93836d8ab3e5f2412503dfafdf54db4f8c1ee Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 8 Jun 2014 01:05:53 +0200
Subject: [PATCH 0150/1819] [Qt] Remove CENT-fee-rule from coin control
 completely

---
 src/qt/coincontroldialog.cpp      | 24 ++++++------------------
 src/qt/forms/coincontroldialog.ui |  2 +-
 src/qt/forms/sendcoinsdialog.ui   |  2 +-
 src/qt/sendcoinsdialog.cpp        |  4 ++--
 4 files changed, 10 insertions(+), 22 deletions(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index e27f1bff97bc..42d6da7d371a 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -71,7 +71,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
     QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
     QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
     QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
-    QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this);
+    QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
     QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
 
     connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(clipboardQuantity()));
@@ -309,7 +309,7 @@ void CoinControlDialog::clipboardPriority()
     GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
 }
 
-// copy label "Low output" to clipboard
+// copy label "Dust" to clipboard
 void CoinControlDialog::clipboardLowOutput()
 {
     GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());
@@ -439,7 +439,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
     // nPayAmount
     qint64 nPayAmount = 0;
-    bool fLowOutput = false;
     bool fDust = false;
     CTransaction txDummy;
     foreach(const qint64 &amount, CoinControlDialog::payAmounts)
@@ -448,9 +447,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
         if (amount > 0)
         {
-            if (amount < CENT)
-                fLowOutput = true;
-
             CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
             txDummy.vout.push_back(txout);
             if (txout.IsDust(CTransaction::minRelayTxFee))
@@ -571,7 +567,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     QLabel *l7 = dialog->findChild<QLabel *>("labelCoinControlLowOutput");
     QLabel *l8 = dialog->findChild<QLabel *>("labelCoinControlChange");
 
-    // enable/disable "low output" and "change"
+    // enable/disable "dust" and "change"
     dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setEnabled(nPayAmount > 0);
     dialog->findChild<QLabel *>("labelCoinControlLowOutput")    ->setEnabled(nPayAmount > 0);
     dialog->findChild<QLabel *>("labelCoinControlChangeText")   ->setEnabled(nPayAmount > 0);
@@ -584,14 +580,13 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     l4->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nAfterFee));      // After Fee
     l5->setText(((nBytes > 0) ? "~" : "") + QString::number(nBytes));        // Bytes
     l6->setText(sPriorityLabel);                                             // Priority
-    l7->setText((fLowOutput ? (fDust ? tr("Dust") : tr("yes")) : tr("no"))); // Low Output / Dust
+    l7->setText(fDust ? tr("yes") : tr("no"));                               // Dust
     l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange));        // Change
 
     // turn labels "red"
     l5->setStyleSheet((nBytes >= 1000) ? "color:red;" : "");                            // Bytes >= 1000
     l6->setStyleSheet((dPriority > 0 && !AllowFree(dPriority)) ? "color:red;" : "");    // Priority < "medium"
-    l7->setStyleSheet((fLowOutput) ? "color:red;" : "");                                // Low Output = "yes"
-    l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : "");             // Change < 0.01BTC
+    l7->setStyleSheet((fDust) ? "color:red;" : "");                                     // Dust = "yes"
 
     // tool tips
     QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
@@ -602,21 +597,14 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
     toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
 
-    QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
-    toolTip3 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK())) + "<br /><br />";
-    toolTip3 += tr("Amounts below 0.546 times the minimum relay fee are shown as dust.");
-
-    QString toolTip4 = tr("This label turns red, if the change is smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)) + "<br /><br />";
-    toolTip4 += tr("This means a fee of at least %1 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
+    QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minRelayTxFee.GetFee(546)));
 
     l5->setToolTip(toolTip1);
     l6->setToolTip(toolTip2);
     l7->setToolTip(toolTip3);
-    l8->setToolTip(toolTip4);
     dialog->findChild<QLabel *>("labelCoinControlBytesText")    ->setToolTip(l5->toolTip());
     dialog->findChild<QLabel *>("labelCoinControlPriorityText") ->setToolTip(l6->toolTip());
     dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
-    dialog->findChild<QLabel *>("labelCoinControlChangeText")   ->setToolTip(l8->toolTip());
 
     // Insufficient funds
     QLabel *label = dialog->findChild<QLabel *>("labelCoinControlInsuffFunds");
diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index cd1c0ffa18cc..67ea3a9d8c53 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -225,7 +225,7 @@
           </font>
          </property>
          <property name="text">
-          <string>Low Output:</string>
+          <string>Dust:</string>
          </property>
         </widget>
        </item>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 4cb1670c79a3..a631b04670ed 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -417,7 +417,7 @@
                   </font>
                  </property>
                  <property name="text">
-                  <string>Low Output:</string>
+                  <string>Dust:</string>
                  </property>
                 </widget>
                </item>
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 23b8ef83e2c2..b7d74d703940 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -53,7 +53,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     QAction *clipboardAfterFeeAction = new QAction(tr("Copy after fee"), this);
     QAction *clipboardBytesAction = new QAction(tr("Copy bytes"), this);
     QAction *clipboardPriorityAction = new QAction(tr("Copy priority"), this);
-    QAction *clipboardLowOutputAction = new QAction(tr("Copy low output"), this);
+    QAction *clipboardLowOutputAction = new QAction(tr("Copy dust"), this);
     QAction *clipboardChangeAction = new QAction(tr("Copy change"), this);
     connect(clipboardQuantityAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardQuantity()));
     connect(clipboardAmountAction, SIGNAL(triggered()), this, SLOT(coinControlClipboardAmount()));
@@ -478,7 +478,7 @@ void SendCoinsDialog::coinControlClipboardPriority()
     GUIUtil::setClipboard(ui->labelCoinControlPriority->text());
 }
 
-// Coin Control: copy label "Low output" to clipboard
+// Coin Control: copy label "Dust" to clipboard
 void SendCoinsDialog::coinControlClipboardLowOutput()
 {
     GUIUtil::setClipboard(ui->labelCoinControlLowOutput->text());

From 16be392975c5c74425821688a8051433cd34b126 Mon Sep 17 00:00:00 2001
From: sandakersmann <sandakersmann@users.noreply.github.com>
Date: Sun, 8 Jun 2014 17:37:53 +0200
Subject: [PATCH 0151/1819] Update translation_process.md

Qt changed to Bitcoin Core
---
 doc/translation_process.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/translation_process.md b/doc/translation_process.md
index 2f0845a8775b..61a0a0ffed98 100644
--- a/doc/translation_process.md
+++ b/doc/translation_process.md
@@ -1,7 +1,7 @@
 Translations
 ============
 
-The Qt GUI can be easily translated into other languages. Here's how we
+The Bitcoin Core GUI can be easily translated into other languages. Here's how we
 handle those translations.
 
 Files and Folders

From 7a9e0b6460037b72376af293dc87acafe4fca831 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 9 Jun 2014 01:27:56 +0200
Subject: [PATCH 0152/1819] Move checkpoint based heuristic checks to
 AcceptBlockHeader

---
 src/main.cpp | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 429473d8f8ac..cf8c436dedf6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2329,28 +2329,6 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
         return state.Invalid(error("CheckBlockHeader() : block timestamp too far in the future"),
                              REJECT_INVALID, "time-too-new");
 
-    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
-    if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
-    {
-        // Extra checks to prevent "fill up memory by spamming with bogus blocks"
-        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->nTime;
-        if (deltaTime < 0)
-        {
-            return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
-                             REJECT_CHECKPOINT, "time-too-old");
-        }
-        bool fOverflow = false;
-        uint256 bnNewBlock;
-        bnNewBlock.SetCompact(block.nBits, NULL, &fOverflow);
-        uint256 bnRequired;
-        bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
-        if (fOverflow || bnNewBlock > bnRequired)
-        {
-            return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
-                             REJECT_INVALID, "bad-diffbits");
-        }
-    }
-
     return true;
 }
 
@@ -2426,6 +2404,28 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
             return state.Invalid(error("AcceptBlock() : block is marked invalid"), 0, "duplicate");
     }
 
+    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
+    if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
+    {
+        // Extra checks to prevent "fill up memory by spamming with bogus blocks"
+        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->nTime;
+        if (deltaTime < 0)
+        {
+            return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
+                             REJECT_CHECKPOINT, "time-too-old");
+        }
+        bool fOverflow = false;
+        uint256 bnNewBlock;
+        bnNewBlock.SetCompact(block.nBits, NULL, &fOverflow);
+        uint256 bnRequired;
+        bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
+        if (fOverflow || bnNewBlock > bnRequired)
+        {
+            return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
+                             REJECT_INVALID, "bad-diffbits");
+        }
+    }
+
     // Get prev block index
     CBlockIndex* pindexPrev = NULL;
     int nHeight = 0;

From 77339e5aec4da99f727b80829f9697357b4cec45 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 6 May 2014 00:54:10 +0200
Subject: [PATCH 0153/1819] Get rid of the static chainMostWork (optimization)

---
 src/main.cpp | 56 +++++++++++++++++++++++++---------------------------
 src/main.h   |  6 +++---
 2 files changed, 30 insertions(+), 32 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 429473d8f8ac..806f1c20db2c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -40,7 +40,6 @@ CTxMemPool mempool;
 
 map<uint256, CBlockIndex*> mapBlockIndex;
 CChain chainActive;
-CChain chainMostWork;
 int64_t nTimeBestReceived = 0;
 int nScriptCheckThreads = 0;
 bool fImporting = false;
@@ -398,6 +397,12 @@ CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const {
     return Genesis();
 }
 
+CBlockIndex *CChain::FindFork(CBlockIndex *pindex) const {
+    while (pindex && !Contains(pindex))
+        pindex = pindex->pprev;
+    return pindex;
+}
+
 CCoinsViewCache *pcoinsTip = NULL;
 CBlockTreeDB *pblocktree = NULL;
 
@@ -2035,23 +2040,17 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     return true;
 }
 
-// Make chainMostWork correspond to the chain with the most work in it, that isn't
+// Return the tip of the chain with the most work in it, that isn't
 // known to be invalid (it's however far from certain to be valid).
-void static FindMostWorkChain() {
-    CBlockIndex *pindexNew = NULL;
-
-    // In case the current best is invalid, do not consider it.
-    while (chainMostWork.Tip() && (chainMostWork.Tip()->nStatus & BLOCK_FAILED_MASK)) {
-        setBlockIndexValid.erase(chainMostWork.Tip());
-        chainMostWork.SetTip(chainMostWork.Tip()->pprev);
-    }
-
+static CBlockIndex* FindMostWorkChain() {
     do {
+        CBlockIndex *pindexNew = NULL;
+
         // Find the best candidate header.
         {
             std::set<CBlockIndex*, CBlockIndexWorkComparator>::reverse_iterator it = setBlockIndexValid.rbegin();
             if (it == setBlockIndexValid.rend())
-                return;
+                return NULL;
             pindexNew = *it;
         }
 
@@ -2075,18 +2074,9 @@ void static FindMostWorkChain() {
             }
             pindexTest = pindexTest->pprev;
         }
-        if (fInvalidAncestor)
-            continue;
-
-        break;
+        if (!fInvalidAncestor)
+            return pindexNew;
     } while(true);
-
-    // Check whether it's actually an improvement.
-    if (chainMostWork.Tip() && !CBlockIndexWorkComparator()(chainMostWork.Tip(), pindexNew))
-        return;
-
-    // We have a new best.
-    chainMostWork.SetTip(pindexNew);
 }
 
 // Try to activate to the most-work chain (thereby connecting it).
@@ -2095,26 +2085,34 @@ bool ActivateBestChain(CValidationState &state) {
     CBlockIndex *pindexOldTip = chainActive.Tip();
     bool fComplete = false;
     while (!fComplete) {
-        FindMostWorkChain();
+        CBlockIndex *pindexMostWork = FindMostWorkChain();
+        CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
         fComplete = true;
 
         // Check whether we have something to do.
-        if (chainMostWork.Tip() == NULL) break;
+        if (pindexMostWork == NULL) break;
 
         // Disconnect active blocks which are no longer in the best chain.
-        while (chainActive.Tip() && !chainMostWork.Contains(chainActive.Tip())) {
+        while (chainActive.Tip() && chainActive.Tip() != pindexFork) {
             if (!DisconnectTip(state))
                 return false;
         }
 
+        // Build list of new blocks to connect.
+        std::vector<CBlockIndex*> vpindexToConnect;
+        vpindexToConnect.reserve(pindexMostWork->nHeight - (pindexFork ? pindexFork->nHeight : -1));
+        while (pindexMostWork && pindexMostWork != pindexFork) {
+            vpindexToConnect.push_back(pindexMostWork);
+            pindexMostWork = pindexMostWork->pprev;
+        }
+
         // Connect new blocks.
-        while (!chainActive.Contains(chainMostWork.Tip())) {
-            CBlockIndex *pindexConnect = chainMostWork[chainActive.Height() + 1];
+        BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
             if (!ConnectTip(state, pindexConnect)) {
                 if (state.IsInvalid()) {
                     // The block violates a consensus rule.
                     if (!state.CorruptionPossible())
-                        InvalidChainFound(chainMostWork.Tip());
+                        InvalidChainFound(vpindexToConnect.back());
                     fComplete = false;
                     state = CValidationState();
                     break;
diff --git a/src/main.h b/src/main.h
index 23c866037616..98155989a36e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1079,14 +1079,14 @@ class CChain {
 
     /** Find the last common block between this chain and a locator. */
     CBlockIndex *FindFork(const CBlockLocator &locator) const;
+
+    /** Find the last common block between this chain and a block index entry. */
+    CBlockIndex *FindFork(CBlockIndex *pindex) const;
 };
 
 /** The currently-connected chain of blocks. */
 extern CChain chainActive;
 
-/** The currently best known chain of headers (some of which may be invalid). */
-extern CChain chainMostWork;
-
 /** Global variable that points to the active CCoinsView (protected by cs_main) */
 extern CCoinsViewCache *pcoinsTip;
 

From 4e0eed88acdd41826868c151373068bfad18b84d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 6 May 2014 01:23:13 +0200
Subject: [PATCH 0154/1819] Allow ActivateBestChain to release its lock on
 cs_main

---
 src/main.cpp | 92 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 55 insertions(+), 37 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 806f1c20db2c..860487dece85 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2079,47 +2079,43 @@ static CBlockIndex* FindMostWorkChain() {
     } while(true);
 }
 
-// Try to activate to the most-work chain (thereby connecting it).
-bool ActivateBestChain(CValidationState &state) {
-    LOCK(cs_main);
+// Try to make some progress towards making pindexMostWork the active block.
+static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork) {
+    AssertLockHeld(cs_main);
     CBlockIndex *pindexOldTip = chainActive.Tip();
-    bool fComplete = false;
-    while (!fComplete) {
-        CBlockIndex *pindexMostWork = FindMostWorkChain();
-        CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
-        fComplete = true;
-
-        // Check whether we have something to do.
-        if (pindexMostWork == NULL) break;
+    CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
 
-        // Disconnect active blocks which are no longer in the best chain.
-        while (chainActive.Tip() && chainActive.Tip() != pindexFork) {
-            if (!DisconnectTip(state))
-                return false;
-        }
+    // Disconnect active blocks which are no longer in the best chain.
+    while (chainActive.Tip() && chainActive.Tip() != pindexFork) {
+        if (!DisconnectTip(state))
+            return false;
+    }
 
-        // Build list of new blocks to connect.
-        std::vector<CBlockIndex*> vpindexToConnect;
-        vpindexToConnect.reserve(pindexMostWork->nHeight - (pindexFork ? pindexFork->nHeight : -1));
-        while (pindexMostWork && pindexMostWork != pindexFork) {
-            vpindexToConnect.push_back(pindexMostWork);
-            pindexMostWork = pindexMostWork->pprev;
-        }
+    // Build list of new blocks to connect.
+    std::vector<CBlockIndex*> vpindexToConnect;
+    vpindexToConnect.reserve(pindexMostWork->nHeight - (pindexFork ? pindexFork->nHeight : -1));
+    while (pindexMostWork && pindexMostWork != pindexFork) {
+        vpindexToConnect.push_back(pindexMostWork);
+        pindexMostWork = pindexMostWork->pprev;
+    }
 
-        // Connect new blocks.
-        BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
-            if (!ConnectTip(state, pindexConnect)) {
-                if (state.IsInvalid()) {
-                    // The block violates a consensus rule.
-                    if (!state.CorruptionPossible())
-                        InvalidChainFound(vpindexToConnect.back());
-                    fComplete = false;
-                    state = CValidationState();
-                    break;
-                } else {
-                    // A system error occurred (disk space, database error, ...).
-                    return false;
-                }
+    // Connect new blocks.
+    BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
+        if (!ConnectTip(state, pindexConnect)) {
+            if (state.IsInvalid()) {
+                // The block violates a consensus rule.
+                if (!state.CorruptionPossible())
+                    InvalidChainFound(vpindexToConnect.back());
+                state = CValidationState();
+                break;
+            } else {
+                // A system error occurred (disk space, database error, ...).
+                return false;
+            }
+        } else {
+            if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
+                // We're in a better position than we were. Return temporarily to release the lock.
+                break;
             }
         }
     }
@@ -2136,6 +2132,28 @@ bool ActivateBestChain(CValidationState &state) {
     return true;
 }
 
+bool ActivateBestChain(CValidationState &state) {
+    do {
+        boost::this_thread::interruption_point();
+
+        LOCK(cs_main);
+
+        // Check whether we're done (this could be avoided after the first run,
+        // but that's not worth optimizing.
+        CBlockIndex *pindexMostWork = FindMostWorkChain();
+        if (pindexMostWork == NULL || pindexMostWork == chainActive.Tip())
+            return true;
+
+        if (!ActivateBestChainStep(state, pindexMostWork))
+            return false;
+
+        // Check whether we're done now.
+        if (pindexMostWork == chainActive.Tip())
+            return true;
+    } while(true);
+
+    return true;
+}
 
 CBlockIndex* AddToBlockIndex(CBlockHeader& block)
 {

From 202e01941c087e0b06a7c18ce344a53ce94e1350 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 7 May 2014 16:45:33 +0200
Subject: [PATCH 0155/1819] Move all post-chaintip-change notifications to
 ActivateBestChain

---
 src/main.cpp | 100 +++++++++++++++++++++++++--------------------------
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 860487dece85..0d79246a11da 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1895,6 +1895,11 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     for (unsigned int i = 0; i < block.vtx.size(); i++)
         g_signals.SyncTransaction(block.GetTxHash(i), block.vtx[i], &block);
 
+    // Watch for changes to the previous coinbase transaction.
+    static uint256 hashPrevBestCoinBase;
+    g_signals.UpdatedTransaction(hashPrevBestCoinBase);
+    hashPrevBestCoinBase = block.GetTxHash(0);
+
     return true;
 }
 
@@ -2082,6 +2087,7 @@ static CBlockIndex* FindMostWorkChain() {
 // Try to make some progress towards making pindexMostWork the active block.
 static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork) {
     AssertLockHeld(cs_main);
+    bool fInvalidFound = false;
     CBlockIndex *pindexOldTip = chainActive.Tip();
     CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
 
@@ -2107,6 +2113,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
                 if (!state.CorruptionPossible())
                     InvalidChainFound(vpindexToConnect.back());
                 state = CValidationState();
+                fInvalidFound = true;
                 break;
             } else {
                 // A system error occurred (disk space, database error, ...).
@@ -2120,37 +2127,59 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
         }
     }
 
-    if (chainActive.Tip() != pindexOldTip) {
-        std::string strCmd = GetArg("-blocknotify", "");
-        if (!IsInitialBlockDownload() && !strCmd.empty())
-        {
-            boost::replace_all(strCmd, "%s", chainActive.Tip()->GetBlockHash().GetHex());
-            boost::thread t(runCommand, strCmd); // thread runs free
-        }
-    }
+    // Callbacks/notifications for a new best chain.
+    if (fInvalidFound)
+        CheckForkWarningConditionsOnNewFork(vpindexToConnect.back());
+    else
+        CheckForkWarningConditions();
+
+    if (!pblocktree->Flush())
+        return state.Abort(_("Failed to sync block index"));
 
     return true;
 }
 
 bool ActivateBestChain(CValidationState &state) {
+    CBlockIndex *pindexNewTip = NULL;
+    CBlockIndex *pindexMostWork = NULL;
     do {
         boost::this_thread::interruption_point();
 
-        LOCK(cs_main);
+        bool fInitialDownload;
+        {
+            LOCK(cs_main);
+            pindexMostWork = FindMostWorkChain();
 
-        // Check whether we're done (this could be avoided after the first run,
-        // but that's not worth optimizing.
-        CBlockIndex *pindexMostWork = FindMostWorkChain();
-        if (pindexMostWork == NULL || pindexMostWork == chainActive.Tip())
-            return true;
+            // Whether we have anything to do at all.
+            if (pindexMostWork == NULL || pindexMostWork == chainActive.Tip())
+                return true;
 
-        if (!ActivateBestChainStep(state, pindexMostWork))
-            return false;
+            if (!ActivateBestChainStep(state, pindexMostWork))
+                return false;
 
-        // Check whether we're done now.
-        if (pindexMostWork == chainActive.Tip())
-            return true;
-    } while(true);
+            pindexNewTip = chainActive.Tip();
+            fInitialDownload = IsInitialBlockDownload();
+        }
+        // When we reach this point, we switched to a new tip (stored in pindexNewTip).
+
+        // Notifications/callbacks that can run without cs_main
+        if (!fInitialDownload) {
+            uint256 hashNewTip = pindexNewTip->GetBlockHash();
+            // Relay inventory, but don't relay old inventory during initial block download.
+            int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
+            LOCK(cs_vNodes);
+            BOOST_FOREACH(CNode* pnode, vNodes)
+                if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
+                    pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
+
+            std::string strCmd = GetArg("-blocknotify", "");
+            if (!strCmd.empty()) {
+                boost::replace_all(strCmd, "%s", hashNewTip.GetHex());
+                boost::thread t(runCommand, strCmd); // thread runs free
+            }
+        }
+        uiInterface.NotifyBlocksChanged();
+    } while(pindexMostWork != chainActive.Tip());
 
     return true;
 }
@@ -2215,26 +2244,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
         return state.Abort(_("Failed to write block index"));
 
     // New best?
-    if (!ActivateBestChain(state))
-        return false;
-
-    LOCK(cs_main);
-    if (pindexNew == chainActive.Tip())
-    {
-        // Clear fork warning if its no longer applicable
-        CheckForkWarningConditions();
-        // Notify UI to display prev block's coinbase if it was ours
-        static uint256 hashPrevBestCoinBase;
-        g_signals.UpdatedTransaction(hashPrevBestCoinBase);
-        hashPrevBestCoinBase = block.GetTxHash(0);
-    } else
-        CheckForkWarningConditionsOnNewFork(pindexNew);
-
-    if (!pblocktree->Flush())
-        return state.Abort(_("Failed to sync block index"));
-
-    uiInterface.NotifyBlocksChanged();
-    return true;
+    return ActivateBestChain(state);
 }
 
 
@@ -2554,16 +2564,6 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
         return state.Abort(_("System error: ") + e.what());
     }
 
-    // Relay inventory, but don't relay old inventory during initial block download
-    int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
-    if (chainActive.Tip()->GetBlockHash() == hash)
-    {
-        LOCK(cs_vNodes);
-        BOOST_FOREACH(CNode* pnode, vNodes)
-            if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
-                pnode->PushInventory(CInv(MSG_BLOCK, hash));
-    }
-
     return true;
 }
 

From 18e72167ddfeaea95253b62994c6d64b55b35005 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 7 May 2014 17:10:35 +0200
Subject: [PATCH 0156/1819] Push cs_mains down in ProcessBlock

---
 src/main.cpp      | 28 +++++++++++++++++-----------
 src/miner.cpp     | 24 ++++++++++++------------
 src/rpcserver.cpp |  2 +-
 3 files changed, 30 insertions(+), 24 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0d79246a11da..16d1cba6efc4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2243,8 +2243,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
     if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
         return state.Abort(_("Failed to write block index"));
 
-    // New best?
-    return ActivateBestChain(state);
+    return true;
 }
 
 
@@ -2520,7 +2519,6 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
     }
 
     int nHeight = pindex->nHeight;
-    uint256 hash = pindex->GetBlockHash();
 
     // Check that all transactions are finalized
     BOOST_FOREACH(const CTransaction& tx, block.vtx)
@@ -2593,10 +2591,11 @@ void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
 
 bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
 {
-    AssertLockHeld(cs_main);
-
     // Check for duplicate
     uint256 hash = pblock->GetHash();
+
+    {
+    LOCK(cs_main);
     if (mapBlockIndex.count(hash))
         return state.Invalid(error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString()), 0, "duplicate");
     if (mapOrphanBlocks.count(hash))
@@ -2665,7 +2664,11 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
         mapOrphanBlocksByPrev.erase(hashPrev);
     }
 
-    LogPrintf("ProcessBlock: ACCEPTED\n");
+    }
+
+    if (!ActivateBestChain(state))
+        return error("ProcessBlock() : ActivateBestChain failed");
+
     return true;
 }
 
@@ -3101,6 +3104,8 @@ bool InitBlockIndex() {
             CBlockIndex *pindex = AddToBlockIndex(block);
             if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
                 return error("LoadBlockIndex() : genesis block not accepted");
+            if (!ActivateBestChain(state))
+                return error("LoadBlockIndex() : genesis block cannot be activated");
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
         }
@@ -3230,7 +3235,6 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
 
                 // process block
                 if (nBlockPos >= nStartByte) {
-                    LOCK(cs_main);
                     if (dbp)
                         dbp->nPos = nBlockPos;
                     CValidationState state;
@@ -3919,10 +3923,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         CInv inv(MSG_BLOCK, block.GetHash());
         pfrom->AddInventoryKnown(inv);
 
-        LOCK(cs_main);
-        // Remember who we got this block from.
-        mapBlockSource[inv.hash] = pfrom->GetId();
-        MarkBlockAsReceived(inv.hash, pfrom->GetId());
+        {
+            LOCK(cs_main);
+            // Remember who we got this block from.
+            mapBlockSource[inv.hash] = pfrom->GetId();
+            MarkBlockAsReceived(inv.hash, pfrom->GetId());
+        }
 
         CValidationState state;
         ProcessBlock(state, pfrom, &block);
diff --git a/src/miner.cpp b/src/miner.cpp
index ddd277a9bb7d..baaa22c8f3c6 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -484,22 +484,22 @@ bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
         LOCK(cs_main);
         if (pblock->hashPrevBlock != chainActive.Tip()->GetBlockHash())
             return error("BitcoinMiner : generated block is stale");
+    }
 
-        // Remove key from key pool
-        reservekey.KeepKey();
-
-        // Track how many getdata requests this block gets
-        {
-            LOCK(wallet.cs_wallet);
-            wallet.mapRequestCount[pblock->GetHash()] = 0;
-        }
+    // Remove key from key pool
+    reservekey.KeepKey();
 
-        // Process this block the same as if we had received it from another node
-        CValidationState state;
-        if (!ProcessBlock(state, NULL, pblock))
-            return error("BitcoinMiner : ProcessBlock, block not accepted");
+    // Track how many getdata requests this block gets
+    {
+        LOCK(wallet.cs_wallet);
+        wallet.mapRequestCount[pblock->GetHash()] = 0;
     }
 
+    // Process this block the same as if we had received it from another node
+    CValidationState state;
+    if (!ProcessBlock(state, NULL, pblock))
+        return error("BitcoinMiner : ProcessBlock, block not accepted");
+
     return true;
 }
 
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 72a7fe83ef76..d4ceb7f995f7 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -254,7 +254,7 @@ static const CRPCCommand vRPCCommands[] =
     { "getblocktemplate",       &getblocktemplate,       true,      false,      false },
     { "getmininginfo",          &getmininginfo,          true,      false,      false },
     { "getnetworkhashps",       &getnetworkhashps,       true,      false,      false },
-    { "submitblock",            &submitblock,            false,     false,      false },
+    { "submitblock",            &submitblock,            false,     true,       false },
 
     /* Raw transactions */
     { "createrawtransaction",   &createrawtransaction,   false,     false,      false },

From f1920e86063d0ed008c6028d8223b0e21889bf75 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 15 Oct 2013 00:34:20 +0200
Subject: [PATCH 0157/1819] Ping automatically every 2 minutes
 (unconditionally)

... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
---
 src/main.cpp | 13 ++++++-------
 src/net.cpp  | 18 +++++++++++-------
 src/net.h    | 13 ++++++++++---
 3 files changed, 27 insertions(+), 17 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5d1ff94f5dee..dd33f443bfee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4296,8 +4296,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             // RPC ping request by user
             pingSend = true;
         }
-        if (pto->nLastSend && GetTime() - pto->nLastSend > 30 * 60 && pto->vSendMsg.empty()) {
-            // Ping automatically sent as a keepalive
+        if (pto->nPingNonceSent == 0 && pto->nPingUsecStart + PING_INTERVAL * 1000000 < GetTimeMicros()) {
+            // Ping automatically sent as a latency probe & keepalive.
             pingSend = true;
         }
         if (pingSend) {
@@ -4305,15 +4305,14 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             while (nonce == 0) {
                 RAND_bytes((unsigned char*)&nonce, sizeof(nonce));
             }
-            pto->nPingNonceSent = nonce;
             pto->fPingQueued = false;
+            pto->nPingUsecStart = GetTimeMicros();
             if (pto->nVersion > BIP0031_VERSION) {
-                // Take timestamp as close as possible before transmitting ping
-                pto->nPingUsecStart = GetTimeMicros();
+                pto->nPingNonceSent = nonce;
                 pto->PushMessage("ping", nonce);
             } else {
-                // Peer is too old to support ping command with nonce, pong will never arrive, disable timing
-                pto->nPingUsecStart = 0;
+                // Peer is too old to support ping command with nonce, pong will never arrive.
+                pto->nPingNonceSent = 0;
                 pto->PushMessage("ping");
             }
         }
diff --git a/src/net.cpp b/src/net.cpp
index 479f77c46962..fe6e9337ae36 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1028,23 +1028,27 @@ void ThreadSocketHandler()
             //
             // Inactivity checking
             //
-            if (pnode->vSendMsg.empty())
-                pnode->nLastSendEmpty = GetTime();
-            if (GetTime() - pnode->nTimeConnected > 60)
+            int64_t nTime = GetTime();
+            if (nTime - pnode->nTimeConnected > 60)
             {
                 if (pnode->nLastRecv == 0 || pnode->nLastSend == 0)
                 {
                     LogPrint("net", "socket no message in first 60 seconds, %d %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0);
                     pnode->fDisconnect = true;
                 }
-                else if (GetTime() - pnode->nLastSend > 90*60 && GetTime() - pnode->nLastSendEmpty > 90*60)
+                else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL)
                 {
-                    LogPrintf("socket not sending\n");
+                    LogPrintf("socket sending timeout: %is\n", nTime - pnode->nLastSend);
                     pnode->fDisconnect = true;
                 }
-                else if (GetTime() - pnode->nLastRecv > 90*60)
+                else if (nTime - pnode->nLastRecv > (pnode->nVersion > BIP0031_VERSION ? TIMEOUT_INTERVAL : 90*60))
                 {
-                    LogPrintf("socket inactivity timeout\n");
+                    LogPrintf("socket receive timeout: %is\n", nTime - pnode->nLastRecv);
+                    pnode->fDisconnect = true;
+                }
+                else if (pnode->nPingNonceSent && pnode->nPingUsecStart + TIMEOUT_INTERVAL * 1000000 < GetTimeMicros())
+                {
+                    LogPrintf("ping timeout: %fs\n", 0.000001 * (GetTimeMicros() - pnode->nPingUsecStart));
                     pnode->fDisconnect = true;
                 }
             }
diff --git a/src/net.h b/src/net.h
index 9fcdbf802bd7..7a77e55a14c4 100644
--- a/src/net.h
+++ b/src/net.h
@@ -28,6 +28,7 @@
 #include <boost/signals2/signal.hpp>
 #include <openssl/rand.h>
 
+
 class CAddrMan;
 class CBlockIndex;
 class CNode;
@@ -36,6 +37,10 @@ namespace boost {
     class thread_group;
 }
 
+/** Time between pings automatically sent out for latency probing and keepalive (in seconds). */
+static const int PING_INTERVAL = 2 * 60;
+/** Time after which to disconnect, after waiting for a ping response (or inactivity). */
+static const int TIMEOUT_INTERVAL = 20 * 60;
 /** The maximum number of entries in an 'inv' protocol message */
 static const unsigned int MAX_INV_SZ = 50000;
 /** -upnp default */
@@ -217,7 +222,6 @@ class CNode
 
     int64_t nLastSend;
     int64_t nLastRecv;
-    int64_t nLastSendEmpty;
     int64_t nTimeConnected;
     CAddress addr;
     std::string addrName;
@@ -273,10 +277,14 @@ class CNode
     CCriticalSection cs_inventory;
     std::multimap<int64_t, CInv> mapAskFor;
 
-    // Ping time measurement
+    // Ping time measurement:
+    // The pong reply we're expecting, or 0 if no pong expected.
     uint64_t nPingNonceSent;
+    // Time (in usec) the last ping was sent, or 0 if no ping was ever sent.
     int64_t nPingUsecStart;
+    // Last measured round-trip time.
     int64_t nPingUsecTime;
+    // Whether a ping is requested.
     bool fPingQueued;
 
     CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), setAddrKnown(5000)
@@ -288,7 +296,6 @@ class CNode
         nLastRecv = 0;
         nSendBytes = 0;
         nRecvBytes = 0;
-        nLastSendEmpty = GetTime();
         nTimeConnected = GetTime();
         addr = addrIn;
         addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;

From 6dd5edb7de7f5f9aeac71b676c71186405a15376 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 10 Jun 2014 15:01:23 +0200
Subject: [PATCH 0158/1819] Remove unused Print/PrintHex functions

You can just use HexStr(script) or script.ToString() for debugging, no
need for these extra functions.
---
 src/script.cpp |  4 ----
 src/script.h   | 11 -----------
 src/util.h     | 11 -----------
 3 files changed, 26 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index 381e84d0b7ac..11cdfef950ad 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -838,10 +838,6 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     valtype& vchSig    = stacktop(-2);
                     valtype& vchPubKey = stacktop(-1);
 
-                    ////// debug print
-                    //PrintHex(vchSig.begin(), vchSig.end(), "sig: %s\n");
-                    //PrintHex(vchPubKey.begin(), vchPubKey.end(), "pubkey: %s\n");
-
                     // Subset of script starting at the most recent codeseparator
                     CScript scriptCode(pbegincodehash, pend);
 
diff --git a/src/script.h b/src/script.h
index aed2b7a6ad09..a282e7dc04db 100644
--- a/src/script.h
+++ b/src/script.h
@@ -691,12 +691,6 @@ class CScript : public std::vector<unsigned char>
     void SetDestination(const CTxDestination& address);
     void SetMultisig(int nRequired, const std::vector<CPubKey>& keys);
 
-
-    void PrintHex() const
-    {
-        LogPrintf("CScript(%s)\n", HexStr(begin(), end(), true).c_str());
-    }
-
     std::string ToString() const
     {
         std::string str;
@@ -720,11 +714,6 @@ class CScript : public std::vector<unsigned char>
         return str;
     }
 
-    void print() const
-    {
-        LogPrintf("%s\n", ToString());
-    }
-
     CScriptID GetID() const
     {
         return CScriptID(Hash160(*this));
diff --git a/src/util.h b/src/util.h
index b09f9bb15ec1..e070365790cc 100644
--- a/src/util.h
+++ b/src/util.h
@@ -286,17 +286,6 @@ inline std::string HexStr(const T& vch, bool fSpaces=false)
     return HexStr(vch.begin(), vch.end(), fSpaces);
 }
 
-template<typename T>
-void PrintHex(const T pbegin, const T pend, const char* pszFormat="%s", bool fSpaces=true)
-{
-    LogPrintf(pszFormat, HexStr(pbegin, pend, fSpaces).c_str());
-}
-
-inline void PrintHex(const std::vector<unsigned char>& vch, const char* pszFormat="%s", bool fSpaces=true)
-{
-    LogPrintf(pszFormat, HexStr(vch, fSpaces).c_str());
-}
-
 inline int64_t GetPerformanceCounter()
 {
     int64_t nCounter = 0;

From ac14bcc1f12d2407516bcdfef57b2740df48381b Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 10 May 2014 14:54:20 +0200
Subject: [PATCH 0159/1819] small formatting, indentation and comment fixes

- contains zero code changes
---
 src/main.cpp          |  9 +++------
 src/main.h            |  1 -
 src/miner.cpp         |  1 -
 src/miner.h           |  3 ++-
 src/rpcblockchain.cpp |  4 ++--
 src/rpcmining.cpp     |  2 ++
 src/util.cpp          | 22 ++++++++++++----------
 7 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5d1ff94f5dee..f53d20fbb462 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1985,7 +1985,7 @@ bool static DisconnectTip(CValidationState &state) {
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
         // ignore validation errors in resurrected transactions
         list<CTransaction> removed;
-        CValidationState stateDummy; 
+        CValidationState stateDummy;
         if (!tx.IsCoinBase())
             if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
                 mempool.remove(tx, removed, true);
@@ -2213,7 +2213,6 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
     return pindexNew;
 }
 
-
 // Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS).
 bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
 {
@@ -2246,7 +2245,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
     return true;
 }
 
-
 bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false)
 {
     bool fUpdatedLast = false;
@@ -2341,7 +2339,6 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
     return true;
 }
 
-
 bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW)
 {
     // Check proof of work matches claimed amount
@@ -4455,8 +4452,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         // in flight for over two minutes, since we first had a chance to
         // process an incoming block.
         int64_t nNow = GetTimeMicros();
-        if (!pto->fDisconnect && state.nBlocksInFlight && 
-            state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 && 
+        if (!pto->fDisconnect && state.nBlocksInFlight &&
+            state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
             state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
             LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name.c_str());
             pto->fDisconnect = true;
diff --git a/src/main.h b/src/main.h
index 4ef38000849f..e0cbbd25c302 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1019,7 +1019,6 @@ class CValidationState {
 /** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
 class CVerifyDB {
 public:
-
     CVerifyDB();
     ~CVerifyDB();
     bool VerifyDB(int nCheckLevel, int nCheckDepth);
diff --git a/src/miner.cpp b/src/miner.cpp
index 68abc4a6ef7e..a0a728fb81be 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -677,4 +677,3 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
 }
 
 #endif
-
diff --git a/src/miner.h b/src/miner.h
index 26151f6cd5bd..dcd61d8fd9ea 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -10,11 +10,12 @@
 
 class CBlock;
 class CBlockIndex;
-struct CBlockTemplate;
 class CReserveKey;
 class CScript;
 class CWallet;
 
+struct CBlockTemplate;
+
 /** Run the miner threads */
 void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads);
 /** Generate a new block, without valid proof-of-work */
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index ff5057b526f2..5e0173dcf242 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -3,10 +3,10 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "rpcserver.h"
+#include "checkpoints.h"
 #include "main.h"
+#include "rpcserver.h"
 #include "sync.h"
-#include "checkpoints.h"
 
 #include <stdint.h>
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 837f5336c45f..3caf7d89fe7c 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -13,9 +13,11 @@
 #include "db.h"
 #include "wallet.h"
 #endif
+
 #include <stdint.h>
 
 #include <boost/assign/list_of.hpp>
+
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_value.h"
 
diff --git a/src/util.cpp b/src/util.cpp
index d106b03230c4..cccf2df48407 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -962,13 +962,15 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 void ClearDatadirCache()
 {
     std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
-              boost::filesystem::path());
+        boost::filesystem::path());
 }
 
 boost::filesystem::path GetConfigFile()
 {
     boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
-    if (!pathConfigFile.is_complete()) pathConfigFile = GetDataDir(false) / pathConfigFile;
+    if (!pathConfigFile.is_complete())
+        pathConfigFile = GetDataDir(false) / pathConfigFile;
+
     return pathConfigFile;
 }
 
@@ -1028,9 +1030,9 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
 #endif /* WIN32 */
 }
 
-
-// Ignores exceptions thrown by boost's create_directory if the requested directory exists.
-//   Specifically handles case where path p exists, but it wasn't possible for the user to write to the parent directory.
+// Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
+// Specifically handles case where path p exists, but it wasn't possible for the user to
+// write to the parent directory.
 bool TryCreateDirectory(const boost::filesystem::path& p)
 {
     try
@@ -1381,19 +1383,19 @@ bool ParseInt32(const std::string& str, int32_t *out)
 
 void SetupEnvironment()
 {
-    #ifndef WIN32
+#ifndef WIN32
     try
     {
-	#if BOOST_FILESYSTEM_VERSION == 3
+#if BOOST_FILESYSTEM_VERSION == 3
             boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
-	#else				          // boost filesystem v2
+#else // boost filesystem v2
             std::locale();                      // Raises runtime error if current locale is invalid
-	#endif
+#endif
     } catch(std::runtime_error &e)
     {
         setenv("LC_ALL", "C", 1); // Force C locale
     }
-    #endif
+#endif
 }
 
 std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)

From 1c24187b51c1b8ebbc0295a57d5509effc845984 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 10 Jun 2014 18:34:35 +0200
Subject: [PATCH 0160/1819] remove unused UPnP code from main.h

---
 src/main.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/main.h b/src/main.h
index 4ef38000849f..d907bdbaffe7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -66,12 +66,6 @@ static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128;
 /** Timeout in seconds before considering a block download peer unresponsive. */
 static const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60;
 
-#ifdef USE_UPNP
-static const int fHaveUPnP = true;
-#else
-static const int fHaveUPnP = false;
-#endif
-
 /** "reject" message codes **/
 static const unsigned char REJECT_MALFORMED = 0x01;
 static const unsigned char REJECT_INVALID = 0x10;

From 699fe635c6f829e06739e096b0997976e2030ddf Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 10 Jun 2014 19:33:12 +0200
Subject: [PATCH 0161/1819] remove wrong ; in chainparams.h and order includes

---
 src/chainparams.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.h b/src/chainparams.h
index 988e3ac3a49d..8370cc569092 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -6,9 +6,9 @@
 #ifndef BITCOIN_CHAIN_PARAMS_H
 #define BITCOIN_CHAIN_PARAMS_H
 
-#include "uint256.h"
 #include "core.h"
 #include "protocol.h"
+#include "uint256.h"
 
 #include <vector>
 
@@ -62,7 +62,7 @@ class CChainParams
 
     /* Used if GenerateBitcoins is called with a negative number of threads */
     int DefaultMinerThreads() const { return nMinerThreads; }
-    const CBlock& GenesisBlock() const { return genesis; };
+    const CBlock& GenesisBlock() const { return genesis; }
     bool RequireRPCPassword() const { return fRequireRPCPassword; }
     /* Make miner wait to have peers to avoid wasting work */
     bool MiningRequiresPeers() const { return fMiningRequiresPeers; }

From 38e324af8693eb0c3d4bf22df9cbb73667f195ce Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 10 Jun 2014 15:43:02 -0400
Subject: [PATCH 0162/1819] build: qt: split locale resources. Fixes
 non-deterministic distcheck

The rcc tool is quirky and only honors files in the same directory as the qrc.
When doing an out-of-tree build (as 'make distcheck' does), the generated
translation files end up in a different path, so rcc can't find them.

Split them up so that rcc is run twice: once for static source files and once
for generated files.
---
 src/Makefile.qt.include   | 18 +++++++---
 src/qt/bitcoin.cpp        |  1 +
 src/qt/bitcoin.qrc        | 73 -------------------------------------
 src/qt/bitcoin_locale.qrc | 75 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 78 deletions(-)
 create mode 100644 src/qt/bitcoin_locale.qrc

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 749b976c4430..72c7486258f9 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -152,6 +152,8 @@ QT_MOC = \
 
 QT_QRC_CPP = qt/qrc_bitcoin.cpp
 QT_QRC = qt/bitcoin.qrc
+QT_QRC_LOCALE_CPP = qt/qrc_bitcoin_locale.cpp
+QT_QRC_LOCALE = qt/bitcoin_locale.qrc
 
 PROTOBUF_CC = qt/paymentrequest.pb.cc
 PROTOBUF_H = qt/paymentrequest.pb.h
@@ -321,10 +323,10 @@ qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
   $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
 
 qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
-  $(QT_QRC) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
+  $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
 
 nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
-  $(PROTOBUF_H) $(QT_QRC_CPP)
+  $(PROTOBUF_H) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP)
 
 # forms/foo.h -> forms/ui_foo.h
 QT_FORMS_H=$(join $(dir $(QT_FORMS_UI)),$(addprefix ui_, $(notdir $(QT_FORMS_UI:.ui=.h))))
@@ -371,10 +373,16 @@ translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP)
 	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
 	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
 
-$(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
+$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
 	@test -f $(RCC)
-	$(AM_V_GEN) cd $(srcdir); QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
-	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $(abs_builddir)/$@
+	@test -f $(@D)/$(<F) || cp -f $< $(@D)
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin_locale $(@D)/$(<F) | \
+	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
+
+$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
+	@test -f $(RCC)
+	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin $< | \
+	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
 
 CLEAN_QT = $(nodist_qt_libbitcoinqt_a_SOURCES) $(QT_QM) $(QT_FORMS_H) qt/*.gcda qt/*.gcno
 
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 45d7a52889a7..2be8191eb57e 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -475,6 +475,7 @@ int main(int argc, char *argv[])
 #endif
 
     Q_INIT_RESOURCE(bitcoin);
+    Q_INIT_RESOURCE(bitcoin_locale);
     BitcoinApplication app(argc, argv);
 #if QT_VERSION > 0x050100
     // Generate high-dpi pixmaps
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index e1c739b022cb..f38200c7f7b6 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -84,77 +84,4 @@
         <file alias="spinner-033">res/movies/spinner-033.png</file>
         <file alias="spinner-034">res/movies/spinner-034.png</file>
     </qresource>
-    <qresource prefix="/translations">
-        <file alias="ach">locale/bitcoin_ach.qm</file>
-        <file alias="af_ZA">locale/bitcoin_af_ZA.qm</file>
-        <file alias="ar">locale/bitcoin_ar.qm</file>
-        <file alias="be_BY">locale/bitcoin_be_BY.qm</file>
-        <file alias="bg">locale/bitcoin_bg.qm</file>
-        <file alias="bs">locale/bitcoin_bs.qm</file>
-        <file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
-        <file alias="ca">locale/bitcoin_ca.qm</file>
-        <file alias="ca@valencia">locale/bitcoin_ca@valencia.qm</file>
-        <file alias="cmn">locale/bitcoin_cmn.qm</file>
-        <file alias="cs">locale/bitcoin_cs.qm</file>
-        <file alias="cy">locale/bitcoin_cy.qm</file>
-        <file alias="da">locale/bitcoin_da.qm</file>
-        <file alias="de">locale/bitcoin_de.qm</file>
-        <file alias="el_GR">locale/bitcoin_el_GR.qm</file>
-        <file alias="en">locale/bitcoin_en.qm</file>
-        <file alias="eo">locale/bitcoin_eo.qm</file>
-        <file alias="es_CL">locale/bitcoin_es_CL.qm</file>
-        <file alias="es_DO">locale/bitcoin_es_DO.qm</file>
-        <file alias="es_MX">locale/bitcoin_es_MX.qm</file>
-        <file alias="es">locale/bitcoin_es.qm</file>
-        <file alias="es_UY">locale/bitcoin_es_UY.qm</file>
-        <file alias="et">locale/bitcoin_et.qm</file>
-        <file alias="eu_ES">locale/bitcoin_eu_ES.qm</file>
-        <file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
-        <file alias="fa">locale/bitcoin_fa.qm</file>
-        <file alias="fi">locale/bitcoin_fi.qm</file>
-        <file alias="fr_CA">locale/bitcoin_fr_CA.qm</file>
-        <file alias="fr">locale/bitcoin_fr.qm</file>
-        <file alias="gl">locale/bitcoin_gl.qm</file>
-        <file alias="gu_IN">locale/bitcoin_gu_IN.qm</file>
-        <file alias="he">locale/bitcoin_he.qm</file>
-        <file alias="hi_IN">locale/bitcoin_hi_IN.qm</file>
-        <file alias="hr">locale/bitcoin_hr.qm</file>
-        <file alias="hu">locale/bitcoin_hu.qm</file>
-        <file alias="id_ID">locale/bitcoin_id_ID.qm</file>
-        <file alias="it">locale/bitcoin_it.qm</file>
-        <file alias="ja">locale/bitcoin_ja.qm</file>
-        <file alias="ka">locale/bitcoin_ka.qm</file>
-        <file alias="kk_KZ">locale/bitcoin_kk_KZ.qm</file>
-        <file alias="ko_KR">locale/bitcoin_ko_KR.qm</file>
-        <file alias="ky">locale/bitcoin_ky.qm</file>
-        <file alias="la">locale/bitcoin_la.qm</file>
-        <file alias="lt">locale/bitcoin_lt.qm</file>
-        <file alias="lv_LV">locale/bitcoin_lv_LV.qm</file>
-        <file alias="mn">locale/bitcoin_mn.qm</file>
-        <file alias="ms_MY">locale/bitcoin_ms_MY.qm</file>
-        <file alias="nb">locale/bitcoin_nb.qm</file>
-        <file alias="nl">locale/bitcoin_nl.qm</file>
-        <file alias="pam">locale/bitcoin_pam.qm</file>
-        <file alias="pl">locale/bitcoin_pl.qm</file>
-        <file alias="pt_BR">locale/bitcoin_pt_BR.qm</file>
-        <file alias="pt_PT">locale/bitcoin_pt_PT.qm</file>
-        <file alias="ro_RO">locale/bitcoin_ro_RO.qm</file>
-        <file alias="ru">locale/bitcoin_ru.qm</file>
-        <file alias="sah">locale/bitcoin_sah.qm</file>
-        <file alias="sk">locale/bitcoin_sk.qm</file>
-        <file alias="sl_SI">locale/bitcoin_sl_SI.qm</file>
-        <file alias="sq">locale/bitcoin_sq.qm</file>
-        <file alias="sr">locale/bitcoin_sr.qm</file>
-        <file alias="sv">locale/bitcoin_sv.qm</file>
-        <file alias="th_TH">locale/bitcoin_th_TH.qm</file>
-        <file alias="tr">locale/bitcoin_tr.qm</file>
-        <file alias="uk">locale/bitcoin_uk.qm</file>
-        <file alias="ur_PK">locale/bitcoin_ur_PK.qm</file>
-        <file alias="uz@Cyrl">locale/bitcoin_uz@Cyrl.qm</file>
-        <file alias="vi">locale/bitcoin_vi.qm</file>
-        <file alias="vi_VN">locale/bitcoin_vi_VN.qm</file>
-        <file alias="zh_CN">locale/bitcoin_zh_CN.qm</file>
-        <file alias="zh_HK">locale/bitcoin_zh_HK.qm</file>
-        <file alias="zh_TW">locale/bitcoin_zh_TW.qm</file>
-    </qresource>
 </RCC>
diff --git a/src/qt/bitcoin_locale.qrc b/src/qt/bitcoin_locale.qrc
new file mode 100644
index 000000000000..b70a10739704
--- /dev/null
+++ b/src/qt/bitcoin_locale.qrc
@@ -0,0 +1,75 @@
+<!DOCTYPE RCC><RCC version="1.0">
+    <qresource prefix="/translations">
+        <file alias="ach">locale/bitcoin_ach.qm</file>
+        <file alias="af_ZA">locale/bitcoin_af_ZA.qm</file>
+        <file alias="ar">locale/bitcoin_ar.qm</file>
+        <file alias="be_BY">locale/bitcoin_be_BY.qm</file>
+        <file alias="bg">locale/bitcoin_bg.qm</file>
+        <file alias="bs">locale/bitcoin_bs.qm</file>
+        <file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
+        <file alias="ca">locale/bitcoin_ca.qm</file>
+        <file alias="ca@valencia">locale/bitcoin_ca@valencia.qm</file>
+        <file alias="cmn">locale/bitcoin_cmn.qm</file>
+        <file alias="cs">locale/bitcoin_cs.qm</file>
+        <file alias="cy">locale/bitcoin_cy.qm</file>
+        <file alias="da">locale/bitcoin_da.qm</file>
+        <file alias="de">locale/bitcoin_de.qm</file>
+        <file alias="el_GR">locale/bitcoin_el_GR.qm</file>
+        <file alias="en">locale/bitcoin_en.qm</file>
+        <file alias="eo">locale/bitcoin_eo.qm</file>
+        <file alias="es_CL">locale/bitcoin_es_CL.qm</file>
+        <file alias="es_DO">locale/bitcoin_es_DO.qm</file>
+        <file alias="es_MX">locale/bitcoin_es_MX.qm</file>
+        <file alias="es">locale/bitcoin_es.qm</file>
+        <file alias="es_UY">locale/bitcoin_es_UY.qm</file>
+        <file alias="et">locale/bitcoin_et.qm</file>
+        <file alias="eu_ES">locale/bitcoin_eu_ES.qm</file>
+        <file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
+        <file alias="fa">locale/bitcoin_fa.qm</file>
+        <file alias="fi">locale/bitcoin_fi.qm</file>
+        <file alias="fr_CA">locale/bitcoin_fr_CA.qm</file>
+        <file alias="fr">locale/bitcoin_fr.qm</file>
+        <file alias="gl">locale/bitcoin_gl.qm</file>
+        <file alias="gu_IN">locale/bitcoin_gu_IN.qm</file>
+        <file alias="he">locale/bitcoin_he.qm</file>
+        <file alias="hi_IN">locale/bitcoin_hi_IN.qm</file>
+        <file alias="hr">locale/bitcoin_hr.qm</file>
+        <file alias="hu">locale/bitcoin_hu.qm</file>
+        <file alias="id_ID">locale/bitcoin_id_ID.qm</file>
+        <file alias="it">locale/bitcoin_it.qm</file>
+        <file alias="ja">locale/bitcoin_ja.qm</file>
+        <file alias="ka">locale/bitcoin_ka.qm</file>
+        <file alias="kk_KZ">locale/bitcoin_kk_KZ.qm</file>
+        <file alias="ko_KR">locale/bitcoin_ko_KR.qm</file>
+        <file alias="ky">locale/bitcoin_ky.qm</file>
+        <file alias="la">locale/bitcoin_la.qm</file>
+        <file alias="lt">locale/bitcoin_lt.qm</file>
+        <file alias="lv_LV">locale/bitcoin_lv_LV.qm</file>
+        <file alias="mn">locale/bitcoin_mn.qm</file>
+        <file alias="ms_MY">locale/bitcoin_ms_MY.qm</file>
+        <file alias="nb">locale/bitcoin_nb.qm</file>
+        <file alias="nl">locale/bitcoin_nl.qm</file>
+        <file alias="pam">locale/bitcoin_pam.qm</file>
+        <file alias="pl">locale/bitcoin_pl.qm</file>
+        <file alias="pt_BR">locale/bitcoin_pt_BR.qm</file>
+        <file alias="pt_PT">locale/bitcoin_pt_PT.qm</file>
+        <file alias="ro_RO">locale/bitcoin_ro_RO.qm</file>
+        <file alias="ru">locale/bitcoin_ru.qm</file>
+        <file alias="sah">locale/bitcoin_sah.qm</file>
+        <file alias="sk">locale/bitcoin_sk.qm</file>
+        <file alias="sl_SI">locale/bitcoin_sl_SI.qm</file>
+        <file alias="sq">locale/bitcoin_sq.qm</file>
+        <file alias="sr">locale/bitcoin_sr.qm</file>
+        <file alias="sv">locale/bitcoin_sv.qm</file>
+        <file alias="th_TH">locale/bitcoin_th_TH.qm</file>
+        <file alias="tr">locale/bitcoin_tr.qm</file>
+        <file alias="uk">locale/bitcoin_uk.qm</file>
+        <file alias="ur_PK">locale/bitcoin_ur_PK.qm</file>
+        <file alias="uz@Cyrl">locale/bitcoin_uz@Cyrl.qm</file>
+        <file alias="vi">locale/bitcoin_vi.qm</file>
+        <file alias="vi_VN">locale/bitcoin_vi_VN.qm</file>
+        <file alias="zh_CN">locale/bitcoin_zh_CN.qm</file>
+        <file alias="zh_HK">locale/bitcoin_zh_HK.qm</file>
+        <file alias="zh_TW">locale/bitcoin_zh_TW.qm</file>
+    </qresource>
+</RCC>

From 77a055d04979dc2b3ec4064e99c69259a4216f12 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 10 Jun 2014 22:26:50 -0400
Subject: [PATCH 0163/1819] build: Add a top-level forwarding target for src/*
 objects

Fixes #3955. It's hackish, but seems to always function as expected. Examples:

make src/bitcoind
make src/qt/bitcoin-qt
make src/libbitcoin.a
---
 Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 04f8368dd7ab..719af42ac780 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I src/m4
 SUBDIRS = src
-.PHONY: deploy
+.PHONY: deploy FORCE
 
 GZIP_ENV="-9n"
 
@@ -53,8 +53,8 @@ $(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
 	@test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
 	  echo error: could not build $@
 
-$(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN):
-	make -C $(dir $@) $(notdir $@)
+$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
+	$(MAKE) -C src $(patsubst src/%,%,$@)
 
 $(OSX_APP)/Contents/PkgInfo:
 	$(MKDIR_P) $(@D)

From 68ba85fd750e94861440ef15047d571d6b518217 Mon Sep 17 00:00:00 2001
From: Giuseppe Mazzotta <gdm85@users.noreply.github.com>
Date: Tue, 10 Jun 2014 11:43:27 +0200
Subject: [PATCH 0164/1819] Updated Debian example bitcoin.conf with config
 from wiki + removed some cruft and updated comments

---
 contrib/debian/examples/bitcoin.conf | 95 ++++++++++++++++++----------
 1 file changed, 63 insertions(+), 32 deletions(-)

diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf
index 10ec36ae7ebe..0aa8674af9c8 100644
--- a/contrib/debian/examples/bitcoin.conf
+++ b/contrib/debian/examples/bitcoin.conf
@@ -1,79 +1,110 @@
-# bitcoin.conf configuration file. Lines beginning with # are comments.
-
-
+##
+## bitcoin.conf configuration file. Lines beginning with # are comments.
+##
+ 
 # Network-related settings:
 
 # Run on the test network instead of the real bitcoin network.
-#testnet=1
+#testnet=0
+
+# Run a regression test network
+#regtest=0
 
 # Connect via a socks4 proxy
 #proxy=127.0.0.1:9050
 
+##############################################################
+##            Quick Primer on addnode vs connect            ##
+##  Let's say for instance you use addnode=4.2.2.4          ##
+##  addnode will connect you to and tell you about the      ##
+##    nodes connected to 4.2.2.4.  In addition it will tell ##
+##    the other nodes connected to it that you exist so     ##
+##    they can connect to you.                              ##
+##  connect will not do the above when you 'connect' to it. ##
+##    It will *only* connect you to 4.2.2.4 and no one else.##
+##                                                          ##
+##  So if you're behind a firewall, or have other problems  ##
+##  finding nodes, add some using 'addnode'.                ##
+##                                                          ##
+##  If you want to stay private, use 'connect' to only      ##
+##  connect to "trusted" nodes.                             ##
+##                                                          ##
+##  If you run multiple nodes on a LAN, there's no need for ##
+##  all of them to open lots of connections.  Instead       ##
+##  'connect' them all to one node that is port forwarded   ##
+##  and has lots of connections.                            ##
+##       Thanks goes to [Noodle] on Freenode.               ##
+##############################################################
+
 # Use as many addnode= settings as you like to connect to specific peers
 #addnode=69.164.218.197
 #addnode=10.0.0.2:8333
 
-# ... or use as many connect= settings as you like to connect ONLY
-# to specific peers:
+# Alternatively use as many connect= settings as you like to connect ONLY to specific peers
 #connect=69.164.218.197
 #connect=10.0.0.1:8333
 
+# Listening mode, enabled by default except when 'connect' is being used
+#listen=1
+
 # Maximum number of inbound+outbound connections.
 #maxconnections=
 
-
+#
 # JSON-RPC options (for controlling a running Bitcoin/bitcoind process)
+#
 
-# server=1 tells Bitcoin to accept JSON-RPC commands.
-#server=1
+# server=1 tells Bitcoin-QT and bitcoind to accept JSON-RPC commands
+#server=0
 
 # You must set rpcuser and rpcpassword to secure the JSON-RPC api
 #rpcuser=Ulysseys
-#rpcpassword=YourSuperGreatPasswordNumber_385593
+#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
+
+# How many seconds bitcoin will wait for a complete RPC HTTP request.
+# after the HTTP connection is established. 
+#rpctimeout=30
 
-# By default, only RPC connections from localhost are allowed.  Specify
-# as many rpcallowip= settings as you like to allow connections from
-# other hosts (and you may use * as a wildcard character):
-#rpcallowip=10.1.1.34
-#rpcallowip=192.168.1.*
+# By default, only RPC connections from localhost are allowed.
+# Specify as many rpcallowip= settings as you like to allow connections from other hosts,
+# either as a single IPv4/IPv6 or with a subnet specification.
+
+# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED,
+# because the rpcpassword is transmitted over the network unencrypted.
+
+# server=1 tells Bitcoin-QT to accept JSON-RPC commands.
+# it is also read by bitcoind to determine if RPC should be enabled 
+#rpcallowip=10.1.1.34/255.255.255.0
+#rpcallowip=1.2.3.4/24
+#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96
 
 # Listen for RPC connections on this TCP port:
-rpcport=8332
+#rpcport=8332
 
 # You can use Bitcoin or bitcoind to send commands to Bitcoin/bitcoind
 # running on another host using this option:
-rpcconnect=127.0.0.1
+#rpcconnect=127.0.0.1
 
 # Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
 # with Bitcoin -server or bitcoind
 #rpcssl=1
 
 # OpenSSL settings used when rpcssl=1
-rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
-rpcsslcertificatechainfile=server.cert
-rpcsslprivatekeyfile=server.pem
+#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
+#rpcsslcertificatechainfile=server.cert
+#rpcsslprivatekeyfile=server.pem
 
 
 # Miscellaneous options
 
-# Set gen=1 to attempt to generate bitcoins
-gen=0
-
-# Use SSE instructions to try to generate bitcoins faster.
-#4way=1
-
 # Pre-generate this many public/private key pairs, so wallet backups will be valid for
 # both prior transactions and several dozen future transactions.
-keypool=100
+#keypool=100
 
 # Pay an optional transaction fee every time you send bitcoins.  Transactions with fees
 # are more likely than free transactions to be included in generated blocks, so may
 # be validated sooner.
-paytxfee=0.00
-
-# Allow direct connections for the 'pay via IP address' feature.
-#allowreceivebyip=1
-
+#paytxfee=0.00
 
 # User interface options
 

From 56b07d2dcdec336173b866210c535439b03416a1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 29 May 2014 13:02:22 +0200
Subject: [PATCH 0165/1819] [Qt] allow setting listen via GUI

- add DEFAULT_LISTEN in net.h and use in the code (shared
  setting between core and GUI)

Important: This makes it obvious, that we need to re-think the
settings/options handling, as GUI settings are processed before
any parameter-interaction (which is mostly important for network
stuff) in AppInit2()!
---
 src/init.cpp                  |  2 +-
 src/net.h                     |  2 ++
 src/qt/forms/optionsdialog.ui | 10 ++++++++++
 src/qt/optionsdialog.cpp      |  2 ++
 src/qt/optionsmodel.cpp       | 13 +++++++++++++
 src/qt/optionsmodel.h         |  1 +
 6 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 1d86cf087d69..528c3df0648f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -766,7 +766,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     // see Step 2: parameter interactions for more information about these
-    fListen = GetBoolArg("-listen", true);
+    fListen = GetBoolArg("-listen", DEFAULT_LISTEN);
     fDiscover = GetBoolArg("-discover", true);
     fNameLookup = GetBoolArg("-dns", true);
 
diff --git a/src/net.h b/src/net.h
index 9fcdbf802bd7..11744aa7c4ab 100644
--- a/src/net.h
+++ b/src/net.h
@@ -38,6 +38,8 @@ namespace boost {
 
 /** The maximum number of entries in an 'inv' protocol message */
 static const unsigned int MAX_INV_SZ = 50000;
+/** -listen default */
+static const bool DEFAULT_LISTEN = true;
 /** -upnp default */
 #ifdef USE_UPNP
 static const bool DEFAULT_UPNP = USE_UPNP;
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 0103842e029d..0c5b8895aae1 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -242,6 +242,16 @@
          </property>
         </widget>
        </item>
+       <item>
+        <widget class="QCheckBox" name="allowIncoming">
+         <property name="toolTip">
+          <string>Accept connections from outside</string>
+         </property>
+         <property name="text">
+          <string>Allow incoming connections</string>
+         </property>
+        </widget>
+       </item>
        <item>
         <widget class="QCheckBox" name="connectSocks">
          <property name="toolTip">
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 1cbf5f88106d..abfd4123e0f5 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -151,6 +151,7 @@ void OptionsDialog::setModel(OptionsModel *model)
     /* Wallet */
     connect(ui->spendZeroConfChange, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));
     /* Network */
+    connect(ui->allowIncoming, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));
     connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));
     /* Display */
     connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning()));
@@ -171,6 +172,7 @@ void OptionsDialog::setMapper()
 
     /* Network */
     mapper->addMapping(ui->mapPortUpnp, OptionsModel::MapPortUPnP);
+    mapper->addMapping(ui->allowIncoming, OptionsModel::Listen);
 
     mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
     mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index f3a5f37bb389..4dafd9d2afab 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -110,6 +110,11 @@ void OptionsModel::Init()
     if (!SoftSetBoolArg("-upnp", settings.value("fUseUPnP").toBool()))
         addOverriddenOption("-upnp");
 
+    if (!settings.contains("fListen"))
+        settings.setValue("fListen", DEFAULT_LISTEN);
+    if (!SoftSetBoolArg("-listen", settings.value("fListen").toBool()))
+        addOverriddenOption("-listen");
+
     if (!settings.contains("fUseProxy"))
         settings.setValue("fUseProxy", false);
     if (!settings.contains("addrProxy"))
@@ -214,6 +219,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
             return settings.value("nDatabaseCache");
         case ThreadsScriptVerif:
             return settings.value("nThreadsScriptVerif");
+        case Listen:
+            return settings.value("fListen");
         default:
             return QVariant();
         }
@@ -339,6 +346,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
                 setRestartRequired(true);
             }
             break;
+        case Listen:
+            if (settings.value("fListen") != value) {
+                settings.setValue("fListen", value);
+                setRestartRequired(true);
+            }
+            break;
         default:
             break;
         }
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index f05e3e92de16..2596682d07a4 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -42,6 +42,7 @@ class OptionsModel : public QAbstractListModel
         ThreadsScriptVerif,     // int
         DatabaseCache,          // int
         SpendZeroConfChange,    // bool
+        Listen,                 // bool
         OptionIDRowCount,
     };
 

From 4aaa01783d4e3592db456fb2db05207c3c278244 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 11 Jun 2014 12:16:26 +0200
Subject: [PATCH 0166/1819] rework help messages for fee-related options

- mention the units and show the default for -paytxfee
---
 src/init.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 1d86cf087d69..b85078832f74 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -253,7 +253,7 @@ std::string HelpMessage(HelpMessageMode hmm)
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
-    strUsage += "  -paytxfee=<amt>        " + _("Fee per kB to add to transactions you send") + "\n";
+    strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -spendzeroconfchange   " + _("Spend unconfirmed change when sending transactions (default: 1)") + "\n";
@@ -291,8 +291,8 @@ std::string HelpMessage(HelpMessageMode hmm)
         strUsage += "  -limitfreerelay=<n>    " + _("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:15)") + "\n";
         strUsage += "  -maxsigcachesize=<n>   " + _("Limit size of signature cache to <n> entries (default: 50000)") + "\n";
     }
-    strUsage += "  -mintxfee=<amt>        " + _("Fees smaller than this are considered zero fee (for transaction creation) (default:") + " " + FormatMoney(CTransaction::minTxFee.GetFeePerK()) + ")" + "\n";
-    strUsage += "  -minrelaytxfee=<amt>   " + _("Fees smaller than this are considered zero fee (for relaying) (default:") + " " + FormatMoney(CTransaction::minRelayTxFee.GetFeePerK()) + ")" + "\n";
+    strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CTransaction::minTxFee.GetFeePerK())) + "\n";
+    strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(CTransaction::minRelayTxFee.GetFeePerK())) + "\n";
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {

From 5bd6c31bd63261f16d3d1b40512a8bb51b28abcf Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 24 May 2014 11:14:52 +0200
Subject: [PATCH 0167/1819] small cleanup of net

- remove an unneded else in ConnectNode()
- make 0 a double and change to 0.0 in ConnectNode()
- rename strDest to pszDest in OpenNetworkConnection()
- remove an unneded call to our REF() macro in BindListenPort()
- small style cleanups and removal of unneeded new-lines
---
 src/net.cpp | 26 +++++++++++---------------
 src/net.h   |  4 ++--
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 479f77c46962..07a2848e9c52 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -469,11 +469,10 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
         }
     }
 
-
     /// debug print
     LogPrint("net", "trying connection %s lastseen=%.1fhrs\n",
         pszDest ? pszDest : addrConnect.ToString(),
-        pszDest ? 0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0);
+        pszDest ? 0.0 : (double)(GetAdjustedTime() - addrConnect.nTime)/3600.0);
 
     // Connect
     SOCKET hSocket;
@@ -505,10 +504,8 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
         pnode->nTimeConnected = GetTime();
         return pnode;
     }
-    else
-    {
-        return NULL;
-    }
+
+    return NULL;
 }
 
 void CNode::CloseSocketDisconnect()
@@ -535,7 +532,6 @@ void CNode::Cleanup()
 {
 }
 
-
 void CNode::PushVersion()
 {
     int nBestHeight = g_signals.GetHeight().get_value_or(0);
@@ -1425,21 +1421,22 @@ void ThreadOpenAddedConnections()
 }
 
 // if successful, this moves the passed grant to the constructed node
-bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound, const char *strDest, bool fOneShot)
+bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot)
 {
     //
     // Initiate outbound network connection
     //
     boost::this_thread::interruption_point();
-    if (!strDest)
+    if (!pszDest) {
         if (IsLocal(addrConnect) ||
             FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
             FindNode(addrConnect.ToStringIPPort().c_str()))
             return false;
-    if (strDest && FindNode(strDest))
+    }
+	if (pszDest && FindNode(pszDest))
         return false;
 
-    CNode* pnode = ConnectNode(addrConnect, strDest);
+    CNode* pnode = ConnectNode(addrConnect, pszDest);
     boost::this_thread::interruption_point();
 
     if (!pnode)
@@ -1575,7 +1572,7 @@ bool BindListenPort(const CService &addrBind, string& strError)
     socklen_t len = sizeof(sockaddr);
     if (!addrBind.GetSockAddr((struct sockaddr*)&sockaddr, &len))
     {
-        strError = strprintf("Error: bind address family for %s not supported", addrBind.ToString());
+        strError = strprintf("Error: Bind address family for %s not supported", addrBind.ToString());
         LogPrintf("%s\n", strError);
         return false;
     }
@@ -1769,9 +1766,8 @@ bool StopNode()
 class CNetCleanup
 {
 public:
-    CNetCleanup()
-    {
-    }
+    CNetCleanup() {}
+
     ~CNetCleanup()
     {
         // Close sockets
diff --git a/src/net.h b/src/net.h
index 9fcdbf802bd7..df7555d476f6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -54,11 +54,11 @@ bool GetMyExternalIP(CNetAddr& ipRet);
 void AddressCurrentlyConnected(const CService& addr);
 CNode* FindNode(const CNetAddr& ip);
 CNode* FindNode(const CService& ip);
-CNode* ConnectNode(CAddress addrConnect, const char *strDest = NULL);
+CNode* ConnectNode(CAddress addrConnect, const char *pszDest = NULL);
 bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
 void MapPort(bool fUseUPnP);
 unsigned short GetListenPort();
-bool BindListenPort(const CService &bindAddr, std::string& strError=REF(std::string()));
+bool BindListenPort(const CService &bindAddr, std::string& strError);
 void StartNode(boost::thread_group& threadGroup);
 bool StopNode();
 void SocketSendData(CNode *pnode);

From 634bd61b76c9d03d7ce7dfab4e4a48f4b70f282a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 11 Jun 2014 12:39:09 +0200
Subject: [PATCH 0168/1819] convert an if into an else if in
 OpenNetworkConnection()

---
 src/net.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 07a2848e9c52..ac0da26de95b 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1432,8 +1432,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
             FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
             FindNode(addrConnect.ToStringIPPort().c_str()))
             return false;
-    }
-	if (pszDest && FindNode(pszDest))
+    } else if (FindNode(pszDest))
         return false;
 
     CNode* pnode = ConnectNode(addrConnect, pszDest);

From 96b733e99694e74dcd38b16112655f7e1ea2d43b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 3 Jun 2014 16:12:19 +0200
Subject: [PATCH 0169/1819] Add `-version` option to get just the version

Adds a `-version` or `--version` option to print just the version
of the program for bitcoind, bitcoin-cli and bitcoin-qt.

Also make it that `-help` can be used to display the help (as well as
existing `--help`). Up to now, `-help` was the only option that didn't
work with either one or two dashes.
---
 src/bitcoin-cli.cpp      | 18 ++++++++++--------
 src/bitcoind.cpp         | 27 +++++++++++++++------------
 src/qt/bitcoin.cpp       |  4 ++--
 src/qt/bitcoingui.cpp    |  2 +-
 src/qt/utilitydialog.cpp | 19 ++++++++++---------
 src/qt/utilitydialog.h   |  5 +----
 6 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 29efdfa82169..0bb71329f5fe 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -39,16 +39,18 @@ static bool AppInitRPC(int argc, char* argv[])
         return false;
     }
 
-    if (argc<2 || mapArgs.count("-?") || mapArgs.count("--help"))
+    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
     {
-        // First part of help message is specific to RPC client
-        std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n\n" +
-            _("Usage:") + "\n" +
-              "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
-              "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
-              "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
+        std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
+        if (!mapArgs.count("-version"))
+        {
+            strUsage += "\n" + _("Usage:") + "\n" +
+                  "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
+                  "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
+                  "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
 
-        strUsage += "\n" + HelpMessageCli(true);
+            strUsage += "\n" + HelpMessageCli(true);
+        }
 
         fprintf(stdout, "%s", strUsage.c_str());
         return false;
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 704332c39ba9..99dc9d726dfe 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -83,19 +83,22 @@ bool AppInit(int argc, char* argv[])
             return false;
         }
 
-        if (mapArgs.count("-?") || mapArgs.count("--help"))
+        if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
         {
-            // First part of help message is specific to bitcoind / RPC client
-            std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n\n" +
-                _("Usage:") + "\n" +
-                  "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n" +
-                _("Usage (deprecated, use bitcoin-cli):") + "\n" +
-                  "  bitcoind [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
-                  "  bitcoind [options] help                " + _("List commands") + "\n" +
-                  "  bitcoind [options] help <command>      " + _("Get help for a command") + "\n";
-
-            strUsage += "\n" + HelpMessage(HMM_BITCOIND);
-            strUsage += "\n" + HelpMessageCli(false);
+            std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
+
+            if (!mapArgs.count("-version"))
+            {
+                strUsage += "\n" + _("Usage:") + "\n" +
+                      "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n" +
+                    _("Usage (deprecated, use bitcoin-cli):") + "\n" +
+                      "  bitcoind [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
+                      "  bitcoind [options] help                " + _("List commands") + "\n" +
+                      "  bitcoind [options] help <command>      " + _("Get help for a command") + "\n";
+
+                strUsage += "\n" + HelpMessage(HMM_BITCOIND);
+                strUsage += "\n" + HelpMessageCli(false);
+            }
 
             fprintf(stdout, "%s", strUsage.c_str());
             return false;
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 2be8191eb57e..387f6ede4be8 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -503,9 +503,9 @@ int main(int argc, char *argv[])
 
     // Show help message immediately after parsing command-line options (for "-lang") and setting locale,
     // but before showing splash screen.
-    if (mapArgs.count("-?") || mapArgs.count("--help"))
+    if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
     {
-        HelpMessageDialog help(NULL);
+        HelpMessageDialog help(NULL, mapArgs.count("-version"));
         help.showOrPrint();
         return 1;
     }
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 3469f990ac7b..847a3ab8f103 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -556,7 +556,7 @@ void BitcoinGUI::aboutClicked()
 
 void BitcoinGUI::showHelpMessageClicked()
 {
-    HelpMessageDialog *help = new HelpMessageDialog(this);
+    HelpMessageDialog *help = new HelpMessageDialog(this, false);
     help->setAttribute(Qt::WA_DeleteOnClose);
     help->show();
 }
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 01b710e87666..435c6a43685e 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -57,21 +57,20 @@ void AboutDialog::on_buttonBox_accepted()
 }
 
 /** "Help message" dialog box */
-HelpMessageDialog::HelpMessageDialog(QWidget *parent) :
+HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool versionOnly) :
     QDialog(parent),
     ui(new Ui::HelpMessageDialog)
 {
     ui->setupUi(this);
     GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);
 
-    header = tr("Bitcoin Core") + " " + tr("version") + " " +
-        QString::fromStdString(FormatFullVersion()) + "\n\n" +
-        tr("Usage:") + "\n" +
+    QString version = tr("Bitcoin Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
+    QString header = tr("Usage:") + "\n" +
         "  bitcoin-qt [" + tr("command-line options") + "]                     " + "\n";
 
-    coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
+    QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
 
-    uiOptions = tr("UI options") + ":\n" +
+    QString uiOptions = tr("UI options") + ":\n" +
         "  -choosedatadir            " + tr("Choose data directory on startup (default: 0)") + "\n" +
         "  -lang=<lang>              " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
         "  -min                      " + tr("Start minimized") + "\n" +
@@ -81,7 +80,10 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent) :
     ui->helpMessageLabel->setFont(GUIUtil::bitcoinAddressFont());
 
     // Set help message text
-    ui->helpMessageLabel->setText(header + "\n" + coreOptions + "\n" + uiOptions);
+    if(versionOnly)
+        ui->helpMessageLabel->setText(version);
+    else
+        ui->helpMessageLabel->setText(version + "\n" + header + "\n" + coreOptions + "\n" + uiOptions);
 }
 
 HelpMessageDialog::~HelpMessageDialog()
@@ -93,8 +95,7 @@ HelpMessageDialog::~HelpMessageDialog()
 void HelpMessageDialog::printToConsole()
 {
     // On other operating systems, the expected action is to print the message to the console.
-    QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions + "\n";
-    fprintf(stdout, "%s", strUsage.toStdString().c_str());
+    fprintf(stdout, "%s\n", qPrintable(ui->helpMessageLabel->text()));
 }
 
 void HelpMessageDialog::showOrPrint()
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
index 874daf6a7f9c..cc2342016925 100644
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -40,7 +40,7 @@ class HelpMessageDialog : public QDialog
     Q_OBJECT
 
 public:
-    explicit HelpMessageDialog(QWidget *parent);
+    explicit HelpMessageDialog(QWidget *parent, bool versionOnly);
     ~HelpMessageDialog();
 
     void printToConsole();
@@ -48,9 +48,6 @@ class HelpMessageDialog : public QDialog
 
 private:
     Ui::HelpMessageDialog *ui;
-    QString header;
-    QString coreOptions;
-    QString uiOptions;
 
 private slots:
     void on_okButton_accepted();

From 97789d374c40f4f7fc8feb19c1235ca09ad2e06e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 10 Jun 2014 16:02:29 +0200
Subject: [PATCH 0170/1819] util: Add function FormatParagraph to format
 paragraph to fixed-width

This is to be used for the `-version` and `-help` messages.
---
 src/test/util_tests.cpp | 11 +++++++++++
 src/util.cpp            | 35 +++++++++++++++++++++++++++++++++++
 src/util.h              |  5 +++++
 3 files changed, 51 insertions(+)

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 0e53a57593e2..0b071361d819 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -351,4 +351,15 @@ BOOST_AUTO_TEST_CASE(test_ParseInt32)
     BOOST_CHECK(!ParseInt32("32482348723847471234", NULL));
 }
 
+BOOST_AUTO_TEST_CASE(test_FormatParagraph)
+{
+    BOOST_CHECK_EQUAL(FormatParagraph("", 79, 0), "");
+    BOOST_CHECK_EQUAL(FormatParagraph("test", 79, 0), "test");
+    BOOST_CHECK_EQUAL(FormatParagraph(" test", 79, 0), "test");
+    BOOST_CHECK_EQUAL(FormatParagraph("test test", 79, 0), "test test");
+    BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 0), "test\ntest");
+    BOOST_CHECK_EQUAL(FormatParagraph("testerde test ", 4, 0), "testerde\ntest");
+    BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n    test");
+}
+
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/util.cpp b/src/util.cpp
index cccf2df48407..3e3dabb678ac 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1407,3 +1407,38 @@ std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
     ss << boost::posix_time::from_time_t(nTime);
     return ss.str();
 }
+
+std::string FormatParagraph(const std::string in, size_t width, size_t indent)
+{
+    std::stringstream out;
+    size_t col = 0;
+    size_t ptr = 0;
+    while(ptr < in.size())
+    {
+        // Find beginning of next word
+        ptr = in.find_first_not_of(' ', ptr);
+        if (ptr == std::string::npos)
+            break;
+        // Find end of next word
+        size_t endword = in.find_first_of(' ', ptr);
+        if (endword == std::string::npos)
+            endword = in.size();
+        // Add newline and indentation if this wraps over the allowed width
+        if (col > 0)
+        {
+            if ((col + endword - ptr) > width)
+            {
+                out << '\n';
+                for(size_t i=0; i<indent; ++i)
+                    out << ' ';
+                col = 0;
+            } else
+                out << ' ';
+        }
+        // Append word
+        out << in.substr(ptr, endword - ptr);
+        col += endword - ptr;
+        ptr = endword;
+    }
+    return out.str();
+}
diff --git a/src/util.h b/src/util.h
index e070365790cc..da1810a3d35c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -286,6 +286,11 @@ inline std::string HexStr(const T& vch, bool fSpaces=false)
     return HexStr(vch.begin(), vch.end(), fSpaces);
 }
 
+/** Format a paragraph of text to a fixed width, adding spaces for
+ * indentation to any added line.
+ */
+std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0);
+
 inline int64_t GetPerformanceCounter()
 {
     int64_t nCounter = 0;

From f3790472f0efca258670342050801ec17c1bb1bb Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 11 Jun 2014 14:56:08 +0200
Subject: [PATCH 0171/1819] remove unused code from getblockchaininfo()

---
 src/rpcblockchain.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5e0173dcf242..2a21fb462abc 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -450,9 +450,6 @@ Value getblockchaininfo(const Array& params, bool fHelp)
             + HelpExampleRpc("getblockchaininfo", "")
         );
 
-    proxyType proxy;
-    GetProxy(NET_IPV4, proxy);
-
     Object obj;
     std::string chain = Params().DataDir();
     if(chain.empty())

From c30329adfaa6d3e1e7150b05b69c4691248300b1 Mon Sep 17 00:00:00 2001
From: Andreas Schildbach <andreas@schildbach.de>
Date: Thu, 12 Jun 2014 00:36:53 +0200
Subject: [PATCH 0172/1819] Add testnet DNS seed of Alex Kotenko.

---
 src/chainparams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 3f4d7f7064b6..1749dd6ff99a 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -212,6 +212,7 @@ class CTestNetParams : public CMainParams {
 
         vFixedSeeds.clear();
         vSeeds.clear();
+        vSeeds.push_back(CDNSSeedData("alexykot.me", "testnet-seed.alexykot.me"));
         vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));
         vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));
 

From 88df548dde280efac8eb33520f8192885455bc03 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 11 Jun 2014 23:20:37 -0400
Subject: [PATCH 0173/1819] base58: add paranoid return value checks

---
 src/base58.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index 597570388734..1bd64684e58c 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -114,9 +114,8 @@ std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) {
 }
 
 bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet) {
-    if (!DecodeBase58(psz, vchRet))
-        return false;
-    if (vchRet.size() < 4)
+    if (!DecodeBase58(psz, vchRet) ||
+        (vchRet.size() < 4))
     {
         vchRet.clear();
         return false;
@@ -154,8 +153,8 @@ void CBase58Data::SetData(const std::vector<unsigned char> &vchVersionIn, const
 
 bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes) {
     std::vector<unsigned char> vchTemp;
-    DecodeBase58Check(psz, vchTemp);
-    if (vchTemp.size() < nVersionBytes) {
+    bool rc58 = DecodeBase58Check(psz, vchTemp);
+    if ((!rc58) || (vchTemp.size() < nVersionBytes)) {
         vchData.clear();
         vchVersion.clear();
         return false;

From f5ae6c98260fdd3c0ca203ce67c6467d9cdaea95 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 11 Jun 2014 12:23:49 +0200
Subject: [PATCH 0174/1819] add NetworkIDString() to chainparams

- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
  and functions
---
 src/chainparams.cpp      |  3 +++
 src/chainparams.h        |  3 +++
 src/qt/clientmodel.cpp   |  8 --------
 src/qt/clientmodel.h     |  2 --
 src/qt/paymentserver.cpp | 13 +------------
 src/qt/paymentserver.h   |  1 -
 src/qt/rpcconsole.cpp    |  2 +-
 src/rpcblockchain.cpp    | 15 ++++++---------
 8 files changed, 14 insertions(+), 33 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 1749dd6ff99a..47136eeeea89 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -99,6 +99,7 @@ class CMainParams : public CChainParams {
 public:
     CMainParams() {
         networkID = CChainParams::MAIN;
+        strNetworkID = "main";
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
         // a large 4-byte int at any alignment.
@@ -189,6 +190,7 @@ class CTestNetParams : public CMainParams {
 public:
     CTestNetParams() {
         networkID = CChainParams::TESTNET;
+        strNetworkID = "test";
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
         // a large 4-byte int at any alignment.
@@ -240,6 +242,7 @@ class CRegTestParams : public CTestNetParams {
 public:
     CRegTestParams() {
         networkID = CChainParams::REGTEST;
+        strNetworkID = "regtest";
         pchMessageStart[0] = 0xfa;
         pchMessageStart[1] = 0xbf;
         pchMessageStart[2] = 0xb5;
diff --git a/src/chainparams.h b/src/chainparams.h
index 8370cc569092..6e09a2cba309 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -79,6 +79,8 @@ class CChainParams
      * until nGenProcLimit blocks are generated */
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
     Network NetworkID() const { return networkID; }
+    /* Return the BIP70 network string (main, test or regtest) */
+    std::string NetworkIDString() const { return strNetworkID; }
     const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
     const vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
@@ -102,6 +104,7 @@ class CChainParams
     vector<CDNSSeedData> vSeeds;
     std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
     Network networkID;
+    std::string strNetworkID;
     CBlock genesis;
     vector<CAddress> vFixedSeeds;
     bool fRequireRPCPassword;
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 403b03378f9f..9c9565be6782 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -142,14 +142,6 @@ void ClientModel::updateAlert(const QString &hash, int status)
     emit alertsChanged(getStatusBarWarnings());
 }
 
-QString ClientModel::getNetworkName() const
-{
-    QString netname(QString::fromStdString(Params().DataDir()));
-    if(netname.isEmpty())
-        netname = "main";
-    return netname;
-}
-
 bool ClientModel::inInitialBlockDownload() const
 {
     return IsInitialBlockDownload();
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 9c9a35b6547d..c7bd60bd4131 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -56,8 +56,6 @@ class ClientModel : public QObject
     double getVerificationProgress() const;
     QDateTime getLastBlockDate() const;
 
-    //! Return network (main, testnet3, regtest)
-    QString getNetworkName() const;
     //! Return true if core is doing initial block download
     bool inInitialBlockDownload() const;
     //! Return true if core is importing blocks
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 9241f9dc3c2a..eb6ab879aafc 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -490,17 +490,6 @@ bool PaymentServer::readPaymentRequest(const QString& filename, PaymentRequestPl
     return request.parse(data);
 }
 
-std::string PaymentServer::mapNetworkIdToName(CChainParams::Network networkId)
-{
-    if (networkId == CChainParams::MAIN)
-        return "main";
-    if (networkId == CChainParams::TESTNET)
-        return "test";
-    if (networkId == CChainParams::REGTEST)
-        return "regtest";
-    return "";
-}
-
 bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient)
 {
     if (!optionsModel)
@@ -510,7 +499,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
         const payments::PaymentDetails& details = request.getDetails();
 
         // Payment request network matches client network?
-        if (details.network() != mapNetworkIdToName(Params().NetworkID()))
+        if (details.network() != Params().NetworkIDString())
         {
             emit message(tr("Payment request rejected"), tr("Payment request network doesn't match client network."),
                 CClientUIInterface::MSG_ERROR);
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index d6949a47cee5..d84d09c57d6c 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -118,7 +118,6 @@ private slots:
 
 private:
     static bool readPaymentRequest(const QString& filename, PaymentRequestPlus& request);
-    std::string mapNetworkIdToName(CChainParams::Network networkId);
     bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);
     void fetchRequest(const QUrl& url);
 
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 199050cc5713..f7491f4a42cc 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -316,7 +316,7 @@ void RPCConsole::setClientModel(ClientModel *model)
         ui->buildDate->setText(model->formatBuildDate());
         ui->startupTime->setText(model->formatClientStartupTime());
 
-        ui->networkName->setText(model->getNetworkName());
+        ui->networkName->setText(QString::fromStdString(Params().NetworkIDString()));
     }
 }
 
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 2a21fb462abc..0fabc86872a9 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -451,14 +451,11 @@ Value getblockchaininfo(const Array& params, bool fHelp)
         );
 
     Object obj;
-    std::string chain = Params().DataDir();
-    if(chain.empty())
-        chain = "main";
-    obj.push_back(Pair("chain",         chain));
-    obj.push_back(Pair("blocks",        (int)chainActive.Height()));
-    obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex()));
-    obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
-    obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(chainActive.Tip())));
-    obj.push_back(Pair("chainwork",     chainActive.Tip()->nChainWork.GetHex()));
+    obj.push_back(Pair("chain",                 Params().NetworkIDString()));
+    obj.push_back(Pair("blocks",                (int)chainActive.Height()));
+    obj.push_back(Pair("bestblockhash",         chainActive.Tip()->GetBlockHash().GetHex()));
+    obj.push_back(Pair("difficulty",            (double)GetDifficulty()));
+    obj.push_back(Pair("verificationprogress",  Checkpoints::GuessVerificationProgress(chainActive.Tip())));
+    obj.push_back(Pair("chainwork",             chainActive.Tip()->nChainWork.GetHex()));
     return obj;
 }

From e5ee8f016ebb1db1bac3c4d0dd895249a4a17a1d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 12 Jun 2014 13:52:15 +0200
Subject: [PATCH 0175/1819] Remove -beta suffix

It conflicts with our normal naming of releases/builds. Fixes #4221.
---
 src/version.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/version.cpp b/src/version.cpp
index 51e34aa9c911..d86caa3ac2e2 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -12,7 +12,7 @@
 const std::string CLIENT_NAME("Satoshi");
 
 // Client version number
-#define CLIENT_VERSION_SUFFIX   "-beta"
+#define CLIENT_VERSION_SUFFIX   ""
 
 
 // The following part of the code determines the CLIENT_BUILD variable.

From 18116b06c177acb97ad1051a0d5da92251adf2dc Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 10 Jun 2014 09:42:42 +0200
Subject: [PATCH 0176/1819] Ignore too-long redeemScripts while loading wallet

This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
---
 src/wallet.cpp | 16 ++++++++++++++++
 src/wallet.h   |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index ef0b442e1a18..400c966a950a 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -128,6 +128,22 @@ bool CWallet::AddCScript(const CScript& redeemScript)
     return CWalletDB(strWalletFile).WriteCScript(Hash160(redeemScript), redeemScript);
 }
 
+bool CWallet::LoadCScript(const CScript& redeemScript)
+{
+    /* A sanity check was added in pull #3843 to avoid adding redeemScripts
+     * that never can be redeemed. However, old wallets may still contain
+     * these. Do not add them to the wallet and warn. */
+    if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
+    {
+        std::string strAddr = CBitcoinAddress(redeemScript.GetID()).ToString();
+        LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i which exceeds maximum size %i thus can never be redeemed. Do not use address %s.\n",
+            __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr);
+        return true;
+    }
+
+    return CCryptoKeyStore::AddCScript(redeemScript);
+}
+
 bool CWallet::Unlock(const SecureString& strWalletPassphrase)
 {
     CCrypter crypter;
diff --git a/src/wallet.h b/src/wallet.h
index 274c31157c0a..7df656fc25fd 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -211,7 +211,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
     bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
     bool AddCScript(const CScript& redeemScript);
-    bool LoadCScript(const CScript& redeemScript) { return CCryptoKeyStore::AddCScript(redeemScript); }
+    bool LoadCScript(const CScript& redeemScript);
 
     /// Adds a destination data tuple to the store, and saves it to disk
     bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value);

From 45615af26fe374fa996c116984a05f0a632a0e79 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 10 Jun 2014 16:02:46 +0200
Subject: [PATCH 0177/1819] Add 'about' information to `-version` output

Adds a copyright and attribution message to the `-version` output
(the same as shown in the About dialog in the GUI).

Move the message to a function LicenseInfo in init.cpp.
---
 src/bitcoind.cpp            |  6 +++-
 src/init.cpp                | 13 ++++++-
 src/init.h                  |  3 ++
 src/qt/forms/aboutdialog.ui | 70 +++----------------------------------
 src/qt/utilitydialog.cpp    | 20 +++++++----
 5 files changed, 38 insertions(+), 74 deletions(-)

diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 99dc9d726dfe..b7d8ee7f9013 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -87,7 +87,11 @@ bool AppInit(int argc, char* argv[])
         {
             std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
 
-            if (!mapArgs.count("-version"))
+            if (mapArgs.count("-version"))
+            {
+                strUsage += LicenseInfo();
+            }
+            else
             {
                 strUsage += "\n" + _("Usage:") + "\n" +
                       "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n" +
diff --git a/src/init.cpp b/src/init.cpp
index 528c3df0648f..39453da9c8d3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -195,7 +195,6 @@ bool static Bind(const CService &addr, unsigned int flags) {
     return true;
 }
 
-// Core-specific options shared between UI, daemon and RPC client
 std::string HelpMessage(HelpMessageMode hmm)
 {
     string strUsage = _("Options:") + "\n";
@@ -330,6 +329,18 @@ std::string HelpMessage(HelpMessageMode hmm)
     return strUsage;
 }
 
+std::string LicenseInfo()
+{
+    return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
+           "\n" +
+           FormatParagraph(_("This is experimental software.")) + "\n" +
+           "\n" +
+           FormatParagraph(_("Distributed under the MIT/X11 software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
+           "\n" +
+           FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) +
+           "\n";
+}
+
 struct CImportingNow
 {
     CImportingNow() {
diff --git a/src/init.h b/src/init.h
index 4a967bea3710..52daa4761600 100644
--- a/src/init.h
+++ b/src/init.h
@@ -28,6 +28,9 @@ enum HelpMessageMode
     HMM_BITCOIN_QT
 };
 
+/** Help for options shared between UI and daemon (for -help) */
 std::string HelpMessage(HelpMessageMode mode);
+/** Returns licensing information (for -version) */
+std::string LicenseInfo();
 
 #endif
diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui
index fec63f737ae1..51dabf2c3076 100644
--- a/src/qt/forms/aboutdialog.ui
+++ b/src/qt/forms/aboutdialog.ui
@@ -43,76 +43,14 @@
       </spacer>
      </item>
      <item>
-      <layout class="QHBoxLayout" name="horizontalLayout">
-       <item>
-        <widget class="QLabel" name="label">
-         <property name="cursor">
-          <cursorShape>IBeamCursor</cursorShape>
-         </property>
-         <property name="text">
-          <string>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</string>
-         </property>
-         <property name="textInteractionFlags">
-          <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <widget class="QLabel" name="versionLabel">
-         <property name="cursor">
-          <cursorShape>IBeamCursor</cursorShape>
-         </property>
-         <property name="text">
-          <string notr="true">0.3.666-beta</string>
-         </property>
-         <property name="textInteractionFlags">
-          <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <spacer name="horizontalSpacer">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>40</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-      </layout>
-     </item>
-     <item>
-      <widget class="QLabel" name="copyrightLabel">
-       <property name="cursor">
-        <cursorShape>IBeamCursor</cursorShape>
-       </property>
-       <property name="text">
-        <string notr="true">Copyright &amp;copy; 2009-YYYY The Bitcoin Core developers</string>
-       </property>
-       <property name="textFormat">
-        <enum>Qt::RichText</enum>
-       </property>
-       <property name="textInteractionFlags">
-        <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QLabel" name="label_2">
+      <widget class="QLabel" name="versionLabel">
        <property name="cursor">
         <cursorShape>IBeamCursor</cursorShape>
        </property>
        <property name="text">
-        <string>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;a href=&quot;http://www.opensource.org/licenses/mit-license.php&quot;&gt;http://www.opensource.org/licenses/mit-license.php&lt;/a&gt;.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (&lt;a href=&quot;https://www.openssl.org/&quot;&gt;https://www.openssl.org/&lt;/a&gt;) and cryptographic software written by Eric Young (&lt;a href=&quot;mailto:eay@cryptsoft.com&quot;&gt;eay@cryptsoft.com&lt;/a&gt;) and UPnP software written by Thomas Bernard.</string>
+        <string notr="true">
+(placeholder for version message)
+        </string>
        </property>
        <property name="textFormat">
         <enum>Qt::RichText</enum>
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 435c6a43685e..a34ebd3a3772 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -16,6 +16,7 @@
 #include "util.h"
 
 #include <QLabel>
+#include <QRegExp>
 #include <QVBoxLayout>
 
 /** "About" dialog box */
@@ -24,16 +25,13 @@ AboutDialog::AboutDialog(QWidget *parent) :
     ui(new Ui::AboutDialog)
 {
     ui->setupUi(this);
-
-    // Set current copyright year
-    ui->copyrightLabel->setText(tr("Copyright") + QString(" &copy; 2009-%1 ").arg(COPYRIGHT_YEAR) + tr("The Bitcoin Core developers"));
 }
 
 void AboutDialog::setModel(ClientModel *model)
 {
     if(model)
     {
-        QString version = model->formatFullVersion();
+        QString version = tr("Bitcoin Core") + " " + tr("version") + " " + model->formatFullVersion();
         /* On x86 add a bit specifier to the version so that users can distinguish between
          * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
          */
@@ -42,7 +40,17 @@ void AboutDialog::setModel(ClientModel *model)
 #elif defined(__i386__ )
         version += " " + tr("(%1-bit)").arg(32);
 #endif
-        ui->versionLabel->setText(version);
+
+        /// HTML-format the license message from the core
+        QString licenseInfo = QString::fromStdString(LicenseInfo());
+        // Make URLs clickable
+        QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
+        uri.setMinimal(true); // use non-greedy matching
+        licenseInfo = licenseInfo.replace(uri, "<a href=\"\\1\">\\1</a>");
+        // Replace newlines with HTML breaks
+        licenseInfo = licenseInfo.replace("\n\n", "<br><br>");
+
+        ui->versionLabel->setText(version + "<br><br>" + licenseInfo);
     }
 }
 
@@ -81,7 +89,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool versionOnly) :
 
     // Set help message text
     if(versionOnly)
-        ui->helpMessageLabel->setText(version);
+        ui->helpMessageLabel->setText(version + "\n" + QString::fromStdString(LicenseInfo()));
     else
         ui->helpMessageLabel->setText(version + "\n" + header + "\n" + coreOptions + "\n" + uiOptions);
 }

From 5c97aae6da813ce4873651b31f75b26ea6f1352f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 11 Jun 2014 21:44:47 +0200
Subject: [PATCH 0178/1819] qt: Unify AboutDialog and HelpMessageDialog

They share so much code and functionality that they may as well
be one class.
---
 src/Makefile.qt.include           |   1 -
 src/qt/bitcoingui.cpp             |   3 +-
 src/qt/forms/aboutdialog.ui       | 130 ------------------------------
 src/qt/forms/helpmessagedialog.ui |   7 +-
 src/qt/utilitydialog.cpp          | 109 +++++++++++--------------
 src/qt/utilitydialog.h            |  22 +----
 6 files changed, 49 insertions(+), 223 deletions(-)
 delete mode 100644 src/qt/forms/aboutdialog.ui

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 72c7486258f9..647434e1efc7 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -76,7 +76,6 @@ QT_TS = \
   qt/locale/bitcoin_zh_TW.ts
 
 QT_FORMS_UI = \
-  qt/forms/aboutdialog.ui \
   qt/forms/addressbookpage.ui \
   qt/forms/askpassphrasedialog.ui \
   qt/forms/coincontroldialog.ui \
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 847a3ab8f103..30f5ec8939b5 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -549,8 +549,7 @@ void BitcoinGUI::aboutClicked()
     if(!clientModel)
         return;
 
-    AboutDialog dlg(this);
-    dlg.setModel(clientModel);
+    HelpMessageDialog dlg(this, true);
     dlg.exec();
 }
 
diff --git a/src/qt/forms/aboutdialog.ui b/src/qt/forms/aboutdialog.ui
deleted file mode 100644
index 51dabf2c3076..000000000000
--- a/src/qt/forms/aboutdialog.ui
+++ /dev/null
@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>AboutDialog</class>
- <widget class="QDialog" name="AboutDialog">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>593</width>
-    <height>319</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>About Bitcoin Core</string>
-  </property>
-  <layout class="QHBoxLayout" name="horizontalLayout_2">
-   <item>
-    <widget class="QLabel" name="label_4">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Ignored">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="pixmap">
-      <pixmap resource="../bitcoin.qrc">:/images/about</pixmap>
-     </property>
-    </widget>
-   </item>
-   <item>
-    <layout class="QVBoxLayout" name="verticalLayout_2">
-     <item>
-      <spacer name="verticalSpacer_2">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QLabel" name="versionLabel">
-       <property name="cursor">
-        <cursorShape>IBeamCursor</cursorShape>
-       </property>
-       <property name="text">
-        <string notr="true">
-(placeholder for version message)
-        </string>
-       </property>
-       <property name="textFormat">
-        <enum>Qt::RichText</enum>
-       </property>
-       <property name="wordWrap">
-        <bool>true</bool>
-       </property>
-       <property name="textInteractionFlags">
-        <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="verticalSpacer">
-       <property name="orientation">
-        <enum>Qt::Vertical</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>20</width>
-         <height>40</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <widget class="QDialogButtonBox" name="buttonBox">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="standardButtons">
-        <set>QDialogButtonBox::Ok</set>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-  </layout>
- </widget>
- <resources>
-  <include location="../bitcoin.qrc"/>
- </resources>
- <connections>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>AboutDialog</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>rejected()</signal>
-   <receiver>AboutDialog</receiver>
-   <slot>reject()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>20</x>
-     <y>20</y>
-    </hint>
-   </hints>
-  </connection>
- </connections>
-</ui>
diff --git a/src/qt/forms/helpmessagedialog.ui b/src/qt/forms/helpmessagedialog.ui
index f68fea7e6410..d8ab27c238b1 100644
--- a/src/qt/forms/helpmessagedialog.ui
+++ b/src/qt/forms/helpmessagedialog.ui
@@ -16,7 +16,7 @@
    </font>
   </property>
   <property name="windowTitle">
-   <string>Bitcoin Core - Command-line options</string>
+   <string notr="true">Bitcoin Core - Command-line options</string>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout_2">
    <item>
@@ -54,11 +54,6 @@
         <layout class="QVBoxLayout" name="verticalLayout_2">
          <item>
           <widget class="QLabel" name="helpMessageLabel">
-           <property name="font">
-            <font>
-             <family>Terminal</family>
-            </font>
-           </property>
            <property name="cursor">
             <cursorShape>IBeamCursor</cursorShape>
            </property>
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index a34ebd3a3772..eb647d017080 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -4,7 +4,6 @@
 
 #include "utilitydialog.h"
 
-#include "ui_aboutdialog.h"
 #include "ui_helpmessagedialog.h"
 
 #include "bitcoingui.h"
@@ -19,81 +18,63 @@
 #include <QRegExp>
 #include <QVBoxLayout>
 
-/** "About" dialog box */
-AboutDialog::AboutDialog(QWidget *parent) :
+/** "Help message" or "About" dialog box */
+HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
     QDialog(parent),
-    ui(new Ui::AboutDialog)
+    ui(new Ui::HelpMessageDialog)
 {
     ui->setupUi(this);
-}
+    GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);
 
-void AboutDialog::setModel(ClientModel *model)
-{
-    if(model)
-    {
-        QString version = tr("Bitcoin Core") + " " + tr("version") + " " + model->formatFullVersion();
-        /* On x86 add a bit specifier to the version so that users can distinguish between
-         * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
-         */
+    QString version = tr("Bitcoin Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
+    /* On x86 add a bit specifier to the version so that users can distinguish between
+     * 32 and 64 bit builds. On other architectures, 32/64 bit may be more ambigious.
+     */
 #if defined(__x86_64__)
-        version += " " + tr("(%1-bit)").arg(64);
+    version += " " + tr("(%1-bit)").arg(64);
 #elif defined(__i386__ )
-        version += " " + tr("(%1-bit)").arg(32);
+    version += " " + tr("(%1-bit)").arg(32);
 #endif
 
+    if (about)
+    {
+        setWindowTitle(tr("About Bitcoin Core"));
+
         /// HTML-format the license message from the core
         QString licenseInfo = QString::fromStdString(LicenseInfo());
+        QString licenseInfoHTML = licenseInfo;
         // Make URLs clickable
         QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
         uri.setMinimal(true); // use non-greedy matching
-        licenseInfo = licenseInfo.replace(uri, "<a href=\"\\1\">\\1</a>");
+        licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
         // Replace newlines with HTML breaks
-        licenseInfo = licenseInfo.replace("\n\n", "<br><br>");
-
-        ui->versionLabel->setText(version + "<br><br>" + licenseInfo);
+        licenseInfoHTML.replace("\n\n", "<br><br>");
+
+        ui->helpMessageLabel->setTextFormat(Qt::RichText);
+        ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
+        text = version + "\n" + licenseInfo;
+        ui->helpMessageLabel->setText(version + "<br><br>" + licenseInfoHTML);
+        ui->helpMessageLabel->setWordWrap(true);
+    } else {
+        setWindowTitle(tr("Command-line options"));
+        QString header = tr("Usage:") + "\n" +
+            "  bitcoin-qt [" + tr("command-line options") + "]                     " + "\n";
+
+        QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
+
+        QString uiOptions = tr("UI options") + ":\n" +
+            "  -choosedatadir            " + tr("Choose data directory on startup (default: 0)") + "\n" +
+            "  -lang=<lang>              " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
+            "  -min                      " + tr("Start minimized") + "\n" +
+            "  -rootcertificates=<file>  " + tr("Set SSL root certificates for payment request (default: -system-)") + "\n" +
+            "  -splash                   " + tr("Show splash screen on startup (default: 1)");
+
+        ui->helpMessageLabel->setFont(GUIUtil::bitcoinAddressFont());
+        text = version + "\n" + header + "\n" + coreOptions + "\n" + uiOptions;
+        ui->helpMessageLabel->setText(text);
     }
 }
 
-AboutDialog::~AboutDialog()
-{
-    delete ui;
-}
-
-void AboutDialog::on_buttonBox_accepted()
-{
-    close();
-}
-
-/** "Help message" dialog box */
-HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool versionOnly) :
-    QDialog(parent),
-    ui(new Ui::HelpMessageDialog)
-{
-    ui->setupUi(this);
-    GUIUtil::restoreWindowGeometry("nHelpMessageDialogWindow", this->size(), this);
-
-    QString version = tr("Bitcoin Core") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion());
-    QString header = tr("Usage:") + "\n" +
-        "  bitcoin-qt [" + tr("command-line options") + "]                     " + "\n";
-
-    QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
-
-    QString uiOptions = tr("UI options") + ":\n" +
-        "  -choosedatadir            " + tr("Choose data directory on startup (default: 0)") + "\n" +
-        "  -lang=<lang>              " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" +
-        "  -min                      " + tr("Start minimized") + "\n" +
-        "  -rootcertificates=<file>  " + tr("Set SSL root certificates for payment request (default: -system-)") + "\n" +
-        "  -splash                   " + tr("Show splash screen on startup (default: 1)");
-
-    ui->helpMessageLabel->setFont(GUIUtil::bitcoinAddressFont());
-
-    // Set help message text
-    if(versionOnly)
-        ui->helpMessageLabel->setText(version + "\n" + QString::fromStdString(LicenseInfo()));
-    else
-        ui->helpMessageLabel->setText(version + "\n" + header + "\n" + coreOptions + "\n" + uiOptions);
-}
-
 HelpMessageDialog::~HelpMessageDialog()
 {
     GUIUtil::saveWindowGeometry("nHelpMessageDialogWindow", this);
@@ -103,17 +84,17 @@ HelpMessageDialog::~HelpMessageDialog()
 void HelpMessageDialog::printToConsole()
 {
     // On other operating systems, the expected action is to print the message to the console.
-    fprintf(stdout, "%s\n", qPrintable(ui->helpMessageLabel->text()));
+    fprintf(stdout, "%s\n", qPrintable(text));
 }
 
 void HelpMessageDialog::showOrPrint()
 {
 #if defined(WIN32)
-        // On Windows, show a message box, as there is no stderr/stdout in windowed applications
-        exec();
+    // On Windows, show a message box, as there is no stderr/stdout in windowed applications
+    exec();
 #else
-        // On other operating systems, print help text to console
-        printToConsole();
+    // On other operating systems, print help text to console
+    printToConsole();
 #endif
 }
 
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
index cc2342016925..154bb70b8bb6 100644
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -12,35 +12,16 @@ class BitcoinGUI;
 class ClientModel;
 
 namespace Ui {
-    class AboutDialog;
     class HelpMessageDialog;
 }
 
-/** "About" dialog box */
-class AboutDialog : public QDialog
-{
-    Q_OBJECT
-
-public:
-    explicit AboutDialog(QWidget *parent);
-    ~AboutDialog();
-
-    void setModel(ClientModel *model);
-
-private:
-    Ui::AboutDialog *ui;
-
-private slots:
-    void on_buttonBox_accepted();
-};
-
 /** "Help message" dialog box */
 class HelpMessageDialog : public QDialog
 {
     Q_OBJECT
 
 public:
-    explicit HelpMessageDialog(QWidget *parent, bool versionOnly);
+    explicit HelpMessageDialog(QWidget *parent, bool about);
     ~HelpMessageDialog();
 
     void printToConsole();
@@ -48,6 +29,7 @@ class HelpMessageDialog : public QDialog
 
 private:
     Ui::HelpMessageDialog *ui;
+    QString text;
 
 private slots:
     void on_okButton_accepted();

From 33cc907dfbfb5925a6315dd8e6ccc5f66a9b3198 Mon Sep 17 00:00:00 2001
From: kevin <bit.kevin@gmail.com>
Date: Sun, 15 Jun 2014 15:35:53 +0800
Subject: [PATCH 0179/1819] Add DNS seed of open-nodes.org

---
 src/chainparams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 1749dd6ff99a..18d6a6360345 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -148,6 +148,7 @@ class CMainParams : public CChainParams {
         vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org"));
         vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com"));
         vSeeds.push_back(CDNSSeedData("bitnodes.io", "seed.bitnodes.io"));
+        vSeeds.push_back(CDNSSeedData("open-nodes.org", "seeds.bitcoin.open-nodes.org"));
         vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org"));
 
         base58Prefixes[PUBKEY_ADDRESS] = list_of(0);

From 0cafb630254c6459ea02f6fc47e1c37bb81a1238 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Thu, 12 Jun 2014 22:26:46 -0400
Subject: [PATCH 0180/1819] bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib
 constant

A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
---
 src/bitcoin-cli.cpp | 8 ++++----
 src/rpcclient.cpp   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 0bb71329f5fe..0c7d6fe5ac4e 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -65,17 +65,17 @@ int main(int argc, char* argv[])
     try
     {
         if(!AppInitRPC(argc, argv))
-            return abs(RPC_MISC_ERROR);
+            return EXIT_FAILURE;
     }
     catch (std::exception& e) {
         PrintExceptionContinue(&e, "AppInitRPC()");
-        return abs(RPC_MISC_ERROR);
+        return EXIT_FAILURE;
     } catch (...) {
         PrintExceptionContinue(NULL, "AppInitRPC()");
-        return abs(RPC_MISC_ERROR);
+        return EXIT_FAILURE;
     }
 
-    int ret = abs(RPC_MISC_ERROR);
+    int ret = EXIT_FAILURE;
     try
     {
         ret = CommandLineRPC(argc, argv);
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index b89a95ad119c..1a5b3f7412e1 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -234,7 +234,7 @@ int CommandLineRPC(int argc, char *argv[])
     }
     catch (std::exception& e) {
         strPrint = string("error: ") + e.what();
-        nRet = abs(RPC_MISC_ERROR);
+        nRet = EXIT_FAILURE;
     }
     catch (...) {
         PrintExceptionContinue(NULL, "CommandLineRPC()");

From b750cf1fb9b6529ab1761b22947677ca78a2c626 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 26 May 2014 11:38:44 +0200
Subject: [PATCH 0181/1819] Remove cli functionality from bitcoind

As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
---
 src/Makefile.am     |   1 -
 src/bitcoin-cli.cpp | 158 ++++++++++++++++++++++++++++++++++++++-
 src/bitcoind.cpp    |  12 +--
 src/rpcclient.cpp   | 175 --------------------------------------------
 src/rpcclient.h     |  10 ---
 5 files changed, 160 insertions(+), 196 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 3016be47b944..0a76829197d4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -171,7 +171,6 @@ nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
 # bitcoind binary #
 bitcoind_LDADD = \
   libbitcoin_server.a \
-  libbitcoin_cli.a \
   libbitcoin_common.a \
   $(LIBLEVELDB) \
   $(LIBMEMENV)
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 0c7d6fe5ac4e..c7327fd7c933 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -12,6 +12,32 @@
 
 #include <boost/filesystem/operations.hpp>
 
+using namespace boost;
+using namespace boost::asio;
+using namespace json_spirit;
+
+std::string HelpMessageCli()
+{
+    string strUsage;
+    strUsage += _("Options:") + "\n";
+    strUsage += "  -?                     " + _("This help message") + "\n";
+    strUsage += "  -conf=<file>           " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
+    strUsage += "  -datadir=<dir>         " + _("Specify data directory") + "\n";
+    strUsage += "  -testnet               " + _("Use the test network") + "\n";
+    strUsage += "  -regtest               " + _("Enter regression test mode, which uses a special chain in which blocks can be "
+                                                "solved instantly. This is intended for regression testing tools and app development.") + "\n";
+    strUsage += "  -rpcconnect=<ip>       " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n";
+    strUsage += "  -rpcport=<port>        " + _("Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)") + "\n";
+    strUsage += "  -rpcwait               " + _("Wait for RPC server to start") + "\n";
+    strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
+    strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
+
+    strUsage += "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
+    strUsage += "  -rpcssl                " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
+
+    return strUsage;
+}
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // Start
@@ -49,7 +75,7 @@ static bool AppInitRPC(int argc, char* argv[])
                   "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
                   "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
 
-            strUsage += "\n" + HelpMessageCli(true);
+            strUsage += "\n" + HelpMessageCli();
         }
 
         fprintf(stdout, "%s", strUsage.c_str());
@@ -58,6 +84,136 @@ static bool AppInitRPC(int argc, char* argv[])
     return true;
 }
 
+Object CallRPC(const string& strMethod, const Array& params)
+{
+    if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "")
+        throw runtime_error(strprintf(
+            _("You must set rpcpassword=<password> in the configuration file:\n%s\n"
+              "If the file does not exist, create it with owner-readable-only file permissions."),
+                GetConfigFile().string().c_str()));
+
+    // Connect to localhost
+    bool fUseSSL = GetBoolArg("-rpcssl", false);
+    asio::io_service io_service;
+    ssl::context context(io_service, ssl::context::sslv23);
+    context.set_options(ssl::context::no_sslv2);
+    asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
+    SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
+    iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
+
+    bool fWait = GetBoolArg("-rpcwait", false); // -rpcwait means try until server has started
+    do {
+        bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(Params().RPCPort())));
+        if (fConnected) break;
+        if (fWait)
+            MilliSleep(1000);
+        else
+            throw runtime_error("couldn't connect to server");
+    } while (fWait);
+
+    // HTTP basic authentication
+    string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]);
+    map<string, string> mapRequestHeaders;
+    mapRequestHeaders["Authorization"] = string("Basic ") + strUserPass64;
+
+    // Send request
+    string strRequest = JSONRPCRequest(strMethod, params, 1);
+    string strPost = HTTPPost(strRequest, mapRequestHeaders);
+    stream << strPost << std::flush;
+
+    // Receive HTTP reply status
+    int nProto = 0;
+    int nStatus = ReadHTTPStatus(stream, nProto);
+
+    // Receive HTTP reply message headers and body
+    map<string, string> mapHeaders;
+    string strReply;
+    ReadHTTPMessage(stream, mapHeaders, strReply, nProto);
+
+    if (nStatus == HTTP_UNAUTHORIZED)
+        throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
+    else if (nStatus >= 400 && nStatus != HTTP_BAD_REQUEST && nStatus != HTTP_NOT_FOUND && nStatus != HTTP_INTERNAL_SERVER_ERROR)
+        throw runtime_error(strprintf("server returned HTTP error %d", nStatus));
+    else if (strReply.empty())
+        throw runtime_error("no response from server");
+
+    // Parse reply
+    Value valReply;
+    if (!read_string(strReply, valReply))
+        throw runtime_error("couldn't parse reply from server");
+    const Object& reply = valReply.get_obj();
+    if (reply.empty())
+        throw runtime_error("expected reply to have result, error and id properties");
+
+    return reply;
+}
+
+int CommandLineRPC(int argc, char *argv[])
+{
+    string strPrint;
+    int nRet = 0;
+    try
+    {
+        // Skip switches
+        while (argc > 1 && IsSwitchChar(argv[1][0]))
+        {
+            argc--;
+            argv++;
+        }
+
+        // Method
+        if (argc < 2)
+            throw runtime_error("too few parameters");
+        string strMethod = argv[1];
+
+        // Parameters default to strings
+        std::vector<std::string> strParams(&argv[2], &argv[argc]);
+        Array params = RPCConvertValues(strMethod, strParams);
+
+        // Execute
+        Object reply = CallRPC(strMethod, params);
+
+        // Parse reply
+        const Value& result = find_value(reply, "result");
+        const Value& error  = find_value(reply, "error");
+
+        if (error.type() != null_type)
+        {
+            // Error
+            strPrint = "error: " + write_string(error, false);
+            int code = find_value(error.get_obj(), "code").get_int();
+            nRet = abs(code);
+        }
+        else
+        {
+            // Result
+            if (result.type() == null_type)
+                strPrint = "";
+            else if (result.type() == str_type)
+                strPrint = result.get_str();
+            else
+                strPrint = write_string(result, true);
+        }
+    }
+    catch (boost::thread_interrupted) {
+        throw;
+    }
+    catch (std::exception& e) {
+        strPrint = string("error: ") + e.what();
+        nRet = EXIT_FAILURE;
+    }
+    catch (...) {
+        PrintExceptionContinue(NULL, "CommandLineRPC()");
+        throw;
+    }
+
+    if (strPrint != "")
+    {
+        fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
+    }
+    return nRet;
+}
+
 int main(int argc, char* argv[])
 {
     SetupEnvironment();
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index b7d8ee7f9013..880955481b0e 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -4,7 +4,6 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "rpcserver.h"
-#include "rpcclient.h"
 #include "init.h"
 #include "main.h"
 #include "noui.h"
@@ -94,14 +93,9 @@ bool AppInit(int argc, char* argv[])
             else
             {
                 strUsage += "\n" + _("Usage:") + "\n" +
-                      "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n" +
-                    _("Usage (deprecated, use bitcoin-cli):") + "\n" +
-                      "  bitcoind [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
-                      "  bitcoind [options] help                " + _("List commands") + "\n" +
-                      "  bitcoind [options] help <command>      " + _("Get help for a command") + "\n";
+                      "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n";
 
                 strUsage += "\n" + HelpMessage(HMM_BITCOIND);
-                strUsage += "\n" + HelpMessageCli(false);
             }
 
             fprintf(stdout, "%s", strUsage.c_str());
@@ -116,8 +110,8 @@ bool AppInit(int argc, char* argv[])
 
         if (fCommandLine)
         {
-            int ret = CommandLineRPC(argc, argv);
-            exit(ret);
+            fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
+            exit(1);
         }
 #ifndef WIN32
         fDaemon = GetBoolArg("-daemon", false);
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 1a5b3f7412e1..3a06e330162e 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -12,86 +12,9 @@
 
 #include <stdint.h>
 
-#include <boost/algorithm/string.hpp>
-#include <boost/asio.hpp>
-#include <boost/asio/ssl.hpp>
-#include <boost/bind.hpp>
-#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
-#include <boost/iostreams/concepts.hpp>
-#include <boost/iostreams/stream.hpp>
-#include <boost/shared_ptr.hpp>
-#include "json/json_spirit_writer_template.h"
-
 using namespace std;
-using namespace boost;
-using namespace boost::asio;
 using namespace json_spirit;
 
-Object CallRPC(const string& strMethod, const Array& params)
-{
-    if (mapArgs["-rpcuser"] == "" && mapArgs["-rpcpassword"] == "")
-        throw runtime_error(strprintf(
-            _("You must set rpcpassword=<password> in the configuration file:\n%s\n"
-              "If the file does not exist, create it with owner-readable-only file permissions."),
-                GetConfigFile().string().c_str()));
-
-    // Connect to localhost
-    bool fUseSSL = GetBoolArg("-rpcssl", false);
-    asio::io_service io_service;
-    ssl::context context(io_service, ssl::context::sslv23);
-    context.set_options(ssl::context::no_sslv2);
-    asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
-    SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
-    iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
-
-    bool fWait = GetBoolArg("-rpcwait", false); // -rpcwait means try until server has started
-    do {
-        bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(Params().RPCPort())));
-        if (fConnected) break;
-        if (fWait)
-            MilliSleep(1000);
-        else
-            throw runtime_error("couldn't connect to server");
-    } while (fWait);
-
-    // HTTP basic authentication
-    string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]);
-    map<string, string> mapRequestHeaders;
-    mapRequestHeaders["Authorization"] = string("Basic ") + strUserPass64;
-
-    // Send request
-    string strRequest = JSONRPCRequest(strMethod, params, 1);
-    string strPost = HTTPPost(strRequest, mapRequestHeaders);
-    stream << strPost << std::flush;
-
-    // Receive HTTP reply status
-    int nProto = 0;
-    int nStatus = ReadHTTPStatus(stream, nProto);
-
-    // Receive HTTP reply message headers and body
-    map<string, string> mapHeaders;
-    string strReply;
-    ReadHTTPMessage(stream, mapHeaders, strReply, nProto);
-
-    if (nStatus == HTTP_UNAUTHORIZED)
-        throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
-    else if (nStatus >= 400 && nStatus != HTTP_BAD_REQUEST && nStatus != HTTP_NOT_FOUND && nStatus != HTTP_INTERNAL_SERVER_ERROR)
-        throw runtime_error(strprintf("server returned HTTP error %d", nStatus));
-    else if (strReply.empty())
-        throw runtime_error("no response from server");
-
-    // Parse reply
-    Value valReply;
-    if (!read_string(strReply, valReply))
-        throw runtime_error("couldn't parse reply from server");
-    const Object& reply = valReply.get_obj();
-    if (reply.empty())
-        throw runtime_error("expected reply to have result, error and id properties");
-
-    return reply;
-}
-
 template<typename T>
 void ConvertTo(Value& value, bool fAllowNull=false)
 {
@@ -182,101 +105,3 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
     return params;
 }
 
-int CommandLineRPC(int argc, char *argv[])
-{
-    string strPrint;
-    int nRet = 0;
-    try
-    {
-        // Skip switches
-        while (argc > 1 && IsSwitchChar(argv[1][0]))
-        {
-            argc--;
-            argv++;
-        }
-
-        // Method
-        if (argc < 2)
-            throw runtime_error("too few parameters");
-        string strMethod = argv[1];
-
-        // Parameters default to strings
-        std::vector<std::string> strParams(&argv[2], &argv[argc]);
-        Array params = RPCConvertValues(strMethod, strParams);
-
-        // Execute
-        Object reply = CallRPC(strMethod, params);
-
-        // Parse reply
-        const Value& result = find_value(reply, "result");
-        const Value& error  = find_value(reply, "error");
-
-        if (error.type() != null_type)
-        {
-            // Error
-            strPrint = "error: " + write_string(error, false);
-            int code = find_value(error.get_obj(), "code").get_int();
-            nRet = abs(code);
-        }
-        else
-        {
-            // Result
-            if (result.type() == null_type)
-                strPrint = "";
-            else if (result.type() == str_type)
-                strPrint = result.get_str();
-            else
-                strPrint = write_string(result, true);
-        }
-    }
-    catch (boost::thread_interrupted) {
-        throw;
-    }
-    catch (std::exception& e) {
-        strPrint = string("error: ") + e.what();
-        nRet = EXIT_FAILURE;
-    }
-    catch (...) {
-        PrintExceptionContinue(NULL, "CommandLineRPC()");
-        throw;
-    }
-
-    if (strPrint != "")
-    {
-        fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
-    }
-    return nRet;
-}
-
-std::string HelpMessageCli(bool mainProgram)
-{
-    string strUsage;
-    if(mainProgram)
-    {
-        strUsage += _("Options:") + "\n";
-        strUsage += "  -?                     " + _("This help message") + "\n";
-        strUsage += "  -conf=<file>           " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
-        strUsage += "  -datadir=<dir>         " + _("Specify data directory") + "\n";
-        strUsage += "  -testnet               " + _("Use the test network") + "\n";
-        strUsage += "  -regtest               " + _("Enter regression test mode, which uses a special chain in which blocks can be "
-                                                    "solved instantly. This is intended for regression testing tools and app development.") + "\n";
-    } else {
-        strUsage += _("RPC client options:") + "\n";
-    }
-
-    strUsage += "  -rpcconnect=<ip>       " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n";
-    strUsage += "  -rpcport=<port>        " + _("Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)") + "\n";
-    strUsage += "  -rpcwait               " + _("Wait for RPC server to start") + "\n";
-
-    if(mainProgram)
-    {
-        strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
-        strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
-
-        strUsage += "\n" + _("SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
-        strUsage += "  -rpcssl                " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
-    }
-
-    return strUsage;
-}
-
diff --git a/src/rpcclient.h b/src/rpcclient.h
index e101d22ec569..840890e34b40 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -10,16 +10,6 @@
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_writer_template.h"
 
-int CommandLineRPC(int argc, char *argv[]);
-
 json_spirit::Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams);
 
-/** Show help message for bitcoin-cli.
- * The mainProgram argument is used to determine whether to show this message as main program
- * (and include some common options) or as sub-header of another help message.
- *
- * @note the argument can be removed once bitcoin-cli functionality is removed from bitcoind
- */
-std::string HelpMessageCli(bool mainProgram);
-
 #endif

From 676301879755588cb32ed6cd95a84f4da1d4f83f Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 12 Jun 2014 14:29:18 +0200
Subject: [PATCH 0182/1819] [Qt] rename In:/Out: to Received/Sent in traffic
 tab

- collides with In:/Out: used for displaying number of
  connections when translating
---
 src/qt/forms/rpcconsole.ui | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 1e574e852716..7158b65c2d30 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -559,7 +559,7 @@
               <item>
                <widget class="QLabel" name="label_16">
                 <property name="text">
-                 <string>In:</string>
+                 <string>Received</string>
                 </property>
                </widget>
               </item>
@@ -639,7 +639,7 @@
               <item>
                <widget class="QLabel" name="label_17">
                 <property name="text">
-                 <string>Out:</string>
+                 <string>Sent</string>
                 </property>
                </widget>
               </item>

From 1569353b8aa535f086833acb6223650972c89790 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 7 May 2014 18:10:48 +0000
Subject: [PATCH 0183/1819] Add `-stopafterblockimport` option

Stop after importing blocks. This can be useful for development
and trouble shooting.
---
 src/init.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index 39453da9c8d3..0a0b479fa2ea 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -273,6 +273,7 @@ std::string HelpMessage(HelpMessageMode hmm)
         strUsage += "  -dropmessagestest=<n>  " + _("Randomly drop 1 of every <n> network messages") + "\n";
         strUsage += "  -fuzzmessagestest=<n>  " + _("Randomly fuzz 1 of every <n> network messages") + "\n";
         strUsage += "  -flushwallet           " + _("Run a thread to flush wallet periodically (default: 1)") + "\n";
+        strUsage += "  -stopafterblockimport  " + _("Stop running after importing blocks from disk (default: 0)") + "\n";
     }
     strUsage += "  -debug=<category>      " + _("Output debugging information (default: 0, supplying <category> is optional)") + "\n";
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
@@ -404,6 +405,11 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
             LogPrintf("Warning: Could not open blocks file %s\n", path.string());
         }
     }
+
+    if (GetBoolArg("-stopafterblockimport", false)) {
+        LogPrintf("Stopping after block import\n");
+        StartShutdown();
+    }
 }
 
 /** Sanity checks

From 09eb201b1b3ed808e5167245149f5635d4eaf6f9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 16 Jun 2014 16:30:38 +0200
Subject: [PATCH 0184/1819] Remove `using namespace std` from header file

It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
---
 src/bitcoin-cli.cpp           |  1 +
 src/chainparams.cpp           |  1 +
 src/chainparams.h             | 22 ++++++++++------------
 src/miner.cpp                 |  2 ++
 src/qt/paymentrequestplus.cpp |  1 +
 src/qt/paymentrequestplus.h   |  2 +-
 src/qt/paymentserver.cpp      |  1 +
 src/qt/transactiondesc.cpp    |  2 ++
 src/qt/walletmodel.cpp        |  2 ++
 9 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index c7327fd7c933..40b45415c4c5 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -12,6 +12,7 @@
 
 #include <boost/filesystem/operations.hpp>
 
+using namespace std;
 using namespace boost;
 using namespace boost::asio;
 using namespace json_spirit;
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 47136eeeea89..6b2cfa1d1ff0 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -10,6 +10,7 @@
 
 #include <boost/assign/list_of.hpp>
 
+using namespace std;
 using namespace boost::assign;
 
 //
diff --git a/src/chainparams.h b/src/chainparams.h
index 6e09a2cba309..28a51cbb0c2c 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -12,13 +12,11 @@
 
 #include <vector>
 
-using namespace std;
-
 typedef unsigned char MessageStartChars[MESSAGE_START_SIZE];
 
 struct CDNSSeedData {
-    string name, host;
-    CDNSSeedData(const string &strName, const string &strHost) : name(strName), host(strHost) {}
+    std::string name, host;
+    CDNSSeedData(const std::string &strName, const std::string &strHost) : name(strName), host(strHost) {}
 };
 
 /**
@@ -51,7 +49,7 @@ class CChainParams
 
     const uint256& HashGenesisBlock() const { return hashGenesisBlock; }
     const MessageStartChars& MessageStart() const { return pchMessageStart; }
-    const vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
+    const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
     int GetDefaultPort() const { return nDefaultPort; }
     const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
@@ -74,16 +72,16 @@ class CChainParams
     bool RequireStandard() const { return fRequireStandard; }
     /* Make standard checks */
     bool RPCisTestNet() const { return fRPCisTestNet; }
-    const string& DataDir() const { return strDataDir; }
+    const std::string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
     Network NetworkID() const { return networkID; }
     /* Return the BIP70 network string (main, test or regtest) */
     std::string NetworkIDString() const { return strNetworkID; }
-    const vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
+    const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
-    const vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
+    const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
     int RPCPort() const { return nRPCPort; }
 protected:
     CChainParams() {}
@@ -91,7 +89,7 @@ class CChainParams
     uint256 hashGenesisBlock;
     MessageStartChars pchMessageStart;
     // Raw pub key bytes for the broadcast alert signing key.
-    vector<unsigned char> vAlertPubKey;
+    std::vector<unsigned char> vAlertPubKey;
     int nDefaultPort;
     int nRPCPort;
     uint256 bnProofOfWorkLimit;
@@ -99,14 +97,14 @@ class CChainParams
     int nEnforceBlockUpgradeMajority;
     int nRejectBlockOutdatedMajority;
     int nToCheckBlockUpgradeMajority;
-    string strDataDir;
+    std::string strDataDir;
     int nMinerThreads;
-    vector<CDNSSeedData> vSeeds;
+    std::vector<CDNSSeedData> vSeeds;
     std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
     Network networkID;
     std::string strNetworkID;
     CBlock genesis;
-    vector<CAddress> vFixedSeeds;
+    std::vector<CAddress> vFixedSeeds;
     bool fRequireRPCPassword;
     bool fMiningRequiresPeers;
     bool fDefaultCheckMemPool;
diff --git a/src/miner.cpp b/src/miner.cpp
index a0a728fb81be..87779efbbdd4 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -11,6 +11,8 @@
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
+
+using namespace std;
 //////////////////////////////////////////////////////////////////////////////
 //
 // BitcoinMiner
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index e369734a9869..464f995eb633 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -17,6 +17,7 @@
 #include <QDebug>
 #include <QSslCertificate>
 
+using namespace std;
 
 class SSLVerifyError : public std::runtime_error
 {
diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h
index 8c126b1fada8..3c4861a4d4bd 100644
--- a/src/qt/paymentrequestplus.h
+++ b/src/qt/paymentrequestplus.h
@@ -24,7 +24,7 @@ class PaymentRequestPlus
     PaymentRequestPlus() { }
 
     bool parse(const QByteArray& data);
-    bool SerializeToString(string* output) const;
+    bool SerializeToString(std::string* output) const;
 
     bool IsInitialized() const;
     QString getPKIType() const;
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index eb6ab879aafc..49923a1afc78 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -44,6 +44,7 @@
 #include <QUrlQuery>
 #endif
 
+using namespace std;
 using namespace boost;
 
 const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 0cfcb048c889..61da3373fddd 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -18,6 +18,8 @@
 #include <stdint.h>
 #include <string>
 
+using namespace std;
+
 QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
 {
     AssertLockHeld(cs_main);
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 87ff3db58437..2f633a26c86c 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -24,6 +24,8 @@
 #include <QSet>
 #include <QTimer>
 
+using namespace std;
+
 WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
     QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
     transactionTableModel(0),

From 77cbd4623e171ee9c48ada8a421295ed2c8e6c7c Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Fri, 14 Feb 2014 18:27:15 +0100
Subject: [PATCH 0185/1819] Let -zapwallettxes recover transaction meta data

---
 qa/rpc-tests/util.sh          |   8 ++
 qa/rpc-tests/zapwallettxes.sh | 161 ++++++++++++++++++++++++++++++++++
 src/init.cpp                  |  34 ++++++-
 src/wallet.cpp                |   4 +-
 src/wallet.h                  |   2 +-
 src/walletdb.cpp              |  10 ++-
 src/walletdb.h                |   4 +-
 7 files changed, 212 insertions(+), 11 deletions(-)
 create mode 100755 qa/rpc-tests/zapwallettxes.sh

diff --git a/qa/rpc-tests/util.sh b/qa/rpc-tests/util.sh
index 1e7bd6a7eedb..b726ef627fac 100644
--- a/qa/rpc-tests/util.sh
+++ b/qa/rpc-tests/util.sh
@@ -38,6 +38,10 @@ function AssertEqual {
   if (( $( echo "$1 == $2" | bc ) == 0 ))
   then
     echoerr "AssertEqual: $1 != $2"
+    declare -f CleanUp > /dev/null 2>&1
+    if [[ $? -eq 0 ]] ; then
+        CleanUp
+    fi
     exit 1
   fi
 }
@@ -49,6 +53,10 @@ function CheckBalance {
   if (( $( echo "$B == $EXPECT" | bc ) == 0 ))
   then
     echoerr "bad balance: $B (expected $2)"
+    declare -f CleanUp > /dev/null 2>&1
+    if [[ $? -eq 0 ]] ; then
+        CleanUp
+    fi
     exit 1
   fi
 }
diff --git a/qa/rpc-tests/zapwallettxes.sh b/qa/rpc-tests/zapwallettxes.sh
new file mode 100755
index 000000000000..bc52a7dacd20
--- /dev/null
+++ b/qa/rpc-tests/zapwallettxes.sh
@@ -0,0 +1,161 @@
+#!/usr/bin/env bash
+
+# Test -zapwallettxes=<mode>
+
+if [ $# -lt 1 ]; then
+        echo "Usage: $0 path_to_binaries"
+        echo "e.g. $0 ../../src"
+        exit 1
+fi
+
+set -f
+
+BITCOIND=${1}/bitcoind
+CLI=${1}/bitcoin-cli
+
+DIR="${BASH_SOURCE%/*}"
+SENDANDWAIT="${DIR}/send.sh"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. "$DIR/util.sh"
+
+D=$(mktemp -d test.XXXXX)
+
+D1=${D}/node1
+CreateDataDir "$D1" port=11000 rpcport=11001
+B1ARGS="-datadir=$D1"
+$BITCOIND $B1ARGS &
+B1PID=$!
+
+D2=${D}/node2
+CreateDataDir "$D2" port=11010 rpcport=11011
+B2ARGS="-datadir=$D2"
+$BITCOIND $B2ARGS &
+B2PID=$!
+
+function CleanUp {
+$CLI $B2ARGS stop > /dev/null 2>&1
+wait $B2PID
+$CLI $B1ARGS stop > /dev/null 2>&1
+wait $B1PID
+
+rm -rf $D
+}
+
+# 110 blocks, 10 mature == 500 XBT
+$CLI $B1ARGS setgenerate true 110
+$CLI $B2ARGS setgenerate true 110
+
+CheckBalance "$B1ARGS" 500
+CheckBalance "$B2ARGS" 500
+
+# Send 10 XBT
+TXID1_DEFAULT=$($CLI $B1ARGS sendtoaddress "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 10)
+TXID2_DEFAULT=$($CLI $B2ARGS sendtoaddress "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 10)
+
+CheckBalance $B1ARGS 490
+CheckBalance $B2ARGS 490
+
+# Move 10 XBT to testaccount
+TMP=$($CLI $B1ARGS move "" "testaccount" 10)
+TMP=$($CLI $B2ARGS move "" "testaccount" 10)
+
+CheckBalance $B1ARGS 10 "testaccount"
+CheckBalance $B2ARGS 10 "testaccount"
+
+# Send 1 XBT from testaccount
+TXID1_TESTACCOUNT=$($CLI $B1ARGS sendfrom "testaccount" "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 1)
+TXID2_TESTACCOUNT=$($CLI $B2ARGS sendfrom "testaccount" "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 1)
+
+CheckBalance $B1ARGS 9 "testaccount"
+CheckBalance $B2ARGS 9 "testaccount"
+
+CheckBalance $B1ARGS 489
+CheckBalance $B2ARGS 489
+
+# Confirm transactions
+$CLI $B1ARGS setgenerate true 1
+$CLI $B2ARGS setgenerate true 1
+
+# Create unconfirmed transaction
+TXID1_UNCONFIRMED=$($CLI $B1ARGS sendtoaddress "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 1)
+TXID2_UNCONFIRMED=$($CLI $B2ARGS sendtoaddress "mrhz5ZgSF3C1BSdyCKt3gEdhKoRL5BNfJV" 1)
+
+# check balance (we created another 50 and spent 1 in the meantime)
+CheckBalance $B1ARGS 538
+CheckBalance $B2ARGS 538
+
+# Safety check, if unconfirmed transactions are there
+$CLI $B1ARGS gettransaction $TXID1_UNCONFIRMED > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "gettransaction1_1: $TXID1_UNCONFIRMED failed"
+    CleanUp
+    exit 1
+fi
+$CLI $B2ARGS gettransaction $TXID2_UNCONFIRMED > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "gettransaction2_1: $TXID2_UNCONFIRMED failed"
+    CleanUp
+    exit 1
+fi
+
+# stop nodes
+$CLI $B2ARGS stop > /dev/null 2>&1
+wait $B2PID
+$CLI $B1ARGS stop > /dev/null 2>&1
+wait $B1PID
+
+# restart nodes with -zapwallettxes
+$BITCOIND -zapwallettxes=1 $B1ARGS &
+B1PID=$!
+$BITCOIND -zapwallettxes=2 $B2ARGS &
+B2PID=$!
+
+# check if confirmed transactions are there
+$CLI $B1ARGS gettransaction $TXID1_DEFAULT > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "check confirmed transaction 1: $TXID1_DEFAULT failed"
+    CleanUp
+    exit 1
+fi
+$CLI $B2ARGS gettransaction $TXID2_DEFAULT > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "check confirmed transaction 2: $TXID2_DEFAULT failed"
+    CleanUp
+    exit 1
+fi
+$CLI $B1ARGS gettransaction $TXID1_TESTACCOUNT > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "check confirmed transaction 3: $TXID1_TESTACCOUNT failed"
+    CleanUp
+    exit 1
+fi
+$CLI $B2ARGS gettransaction $TXID2_TESTACCOUNT > /dev/null 2>&1
+if [[ $? -ne 0 ]] ; then
+    echoerr "check confirmed transaction 4: $TXID2_TESTACCOUNT failed"
+    CleanUp
+    exit 1
+fi
+
+# check if unconfirmed transaction is gone
+$CLI $B1ARGS gettransaction $TXID1_UNCONFIRMED > /dev/null 2>&1
+if [[ $? -eq 0 ]] ; then
+    echoerr "check unconfirmed transaction 1: $TXID1_UNCONFIRMED failed"
+    CleanUp
+    exit 1
+fi
+$CLI $B2ARGS gettransaction $TXID2_UNCONFIRMED > /dev/null 2>&1
+if [[ $? -eq 0 ]] ; then
+    echoerr "check unconfirmed transaction 2: $TXID2_UNCONFIRMED failed"
+    CleanUp
+    exit 1
+fi
+
+# check zapwallet mode 1, testaccount balance must be 9 (keeping transaction metadata)
+CheckBalance $B1ARGS 9 "testaccount"
+
+# check zapwallet mode 2, testaccount balance must be 10 (dropping transaction metadata)
+CheckBalance $B2ARGS 10 "testaccount"
+
+echo "Tests successful, cleaning up"
+CleanUp
+exit 0
diff --git a/src/init.cpp b/src/init.cpp
index 39453da9c8d3..b9af16a156a1 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -259,7 +259,8 @@ std::string HelpMessage(HelpMessageMode hmm)
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + _("(default: wallet.dat)") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
-    strUsage += "  -zapwallettxes         " + _("Clear list of wallet transactions (diagnostic tool; implies -rescan)") + "\n";
+    strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup") + "\n";
+    strUsage += "                         " + _("(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
 
     strUsage += "\n" + _("Debugging/Testing options:") + "\n";
@@ -529,7 +530,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     // -zapwallettx implies a rescan
     if (GetBoolArg("-zapwallettxes", false)) {
         if (SoftSetBoolArg("-rescan", true))
-            LogPrintf("AppInit2 : parameter interaction: -zapwallettxes=1 -> setting -rescan=1\n");
+            LogPrintf("AppInit2 : parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n");
     }
 
     // Make sure enough file descriptors are available
@@ -986,11 +987,15 @@ bool AppInit2(boost::thread_group& threadGroup)
         pwalletMain = NULL;
         LogPrintf("Wallet disabled!\n");
     } else {
+
+        // needed to restore wallet transaction meta data after -zapwallettxes
+        std::vector<CWalletTx> vWtx;
+
         if (GetBoolArg("-zapwallettxes", false)) {
             uiInterface.InitMessage(_("Zapping all transactions from wallet..."));
 
             pwalletMain = new CWallet(strWalletFile);
-            DBErrors nZapWalletRet = pwalletMain->ZapWalletTx();
+            DBErrors nZapWalletRet = pwalletMain->ZapWalletTx(vWtx);
             if (nZapWalletRet != DB_LOAD_OK) {
                 uiInterface.InitMessage(_("Error loading wallet.dat: Wallet corrupted"));
                 return false;
@@ -1085,6 +1090,29 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf(" rescan      %15dms\n", GetTimeMillis() - nStart);
             pwalletMain->SetBestChain(chainActive.GetLocator());
             nWalletDBUpdated++;
+
+            // Restore wallet transaction metadata after -zapwallettxes=1
+            if (GetBoolArg("-zapwallettxes", false) && GetArg("-zapwallettxes", "1") != "2")
+            {
+                BOOST_FOREACH(const CWalletTx& wtxOld, vWtx)
+                {
+                    uint256 hash = wtxOld.GetHash();
+                    std::map<uint256, CWalletTx>::iterator mi = pwalletMain->mapWallet.find(hash);
+                    if (mi != pwalletMain->mapWallet.end())
+                    {
+                        const CWalletTx* copyFrom = &wtxOld;
+                        CWalletTx* copyTo = &mi->second;
+                        copyTo->mapValue = copyFrom->mapValue;
+                        copyTo->vOrderForm = copyFrom->vOrderForm;
+                        copyTo->nTimeReceived = copyFrom->nTimeReceived;
+                        copyTo->nTimeSmart = copyFrom->nTimeSmart;
+                        copyTo->fFromMe = copyFrom->fFromMe;
+                        copyTo->strFromAccount = copyFrom->strFromAccount;
+                        copyTo->nOrderPos = copyFrom->nOrderPos;
+                        copyTo->WriteToDisk();
+                    }
+                }
+            }
         }
     } // (!fDisableWallet)
 #else // ENABLE_WALLET
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 400c966a950a..36e40b1fc8c9 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1511,11 +1511,11 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
 }
 
 
-DBErrors CWallet::ZapWalletTx()
+DBErrors CWallet::ZapWalletTx(std::vector<CWalletTx>& vWtx)
 {
     if (!fFileBacked)
         return DB_LOAD_OK;
-    DBErrors nZapWalletTxRet = CWalletDB(strWalletFile,"cr+").ZapWalletTx(this);
+    DBErrors nZapWalletTxRet = CWalletDB(strWalletFile,"cr+").ZapWalletTx(this, vWtx);
     if (nZapWalletTxRet == DB_NEED_REWRITE)
     {
         if (CDB::Rewrite(strWalletFile, "\x04pool"))
diff --git a/src/wallet.h b/src/wallet.h
index 7df656fc25fd..b168116f49c7 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -341,7 +341,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     void SetBestChain(const CBlockLocator& loc);
 
     DBErrors LoadWallet(bool& fFirstRunRet);
-    DBErrors ZapWalletTx();
+    DBErrors ZapWalletTx(std::vector<CWalletTx>& vWtx);
 
     bool SetAddressBook(const CTxDestination& address, const std::string& strName, const std::string& purpose);
 
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 80e9dded5f6f..3ce2ef019c54 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -680,7 +680,7 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
     return result;
 }
 
-DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
+DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash, vector<CWalletTx>& vWtx)
 {
     pwallet->vchDefaultKey = CPubKey();
     CWalletScanState wss;
@@ -725,7 +725,11 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
                 uint256 hash;
                 ssKey >> hash;
 
+                CWalletTx wtx;
+                ssValue >> wtx;
+
                 vTxHash.push_back(hash);
+                vWtx.push_back(wtx);
             }
         }
         pcursor->close();
@@ -743,11 +747,11 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash)
     return result;
 }
 
-DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet)
+DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx)
 {
     // build list of wallet TXs
     vector<uint256> vTxHash;
-    DBErrors err = FindWalletTx(pwallet, vTxHash);
+    DBErrors err = FindWalletTx(pwallet, vTxHash, vWtx);
     if (err != DB_LOAD_OK)
         return err;
 
diff --git a/src/walletdb.h b/src/walletdb.h
index 3bfb43605047..8eb716acbb9c 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -122,8 +122,8 @@ class CWalletDB : public CDB
 
     DBErrors ReorderTransactions(CWallet*);
     DBErrors LoadWallet(CWallet* pwallet);
-    DBErrors FindWalletTx(CWallet* pwallet, std::vector<uint256>& vTxHash);
-    DBErrors ZapWalletTx(CWallet* pwallet);
+    DBErrors FindWalletTx(CWallet* pwallet, std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx);
+    DBErrors ZapWalletTx(CWallet* pwallet, std::vector<CWalletTx>& vWtx);
     static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys);
     static bool Recover(CDBEnv& dbenv, std::string filename);
 };

From b3c912d93a2d1cf98f894c28adaf94204174c6d7 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Wed, 11 Jun 2014 13:58:16 +0200
Subject: [PATCH 0186/1819] [Qt] Change Coin control labels and tooltips
 because of non-rounding fees

---
 src/qt/coincontroldialog.cpp | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 42d6da7d371a..f6e757f457f7 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -521,7 +521,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority);
 
         // Fee
-        int64_t nFee = payTxFee.GetFee(nBytes);
+        int64_t nFee = payTxFee.GetFee(max((unsigned int)1000, nBytes));
 
         // Min Fee
         int64_t nMinFee = GetMinFee(txDummy, nBytes, AllowFree(dPriority), GMF_SEND);
@@ -582,6 +582,13 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     l6->setText(sPriorityLabel);                                             // Priority
     l7->setText(fDust ? tr("yes") : tr("no"));                               // Dust
     l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange));        // Change
+    if (nPayFee > 0)
+    {
+        l3->setText("~" + l3->text());
+        l4->setText("~" + l4->text());
+        if (nChange > 0)
+            l8->setText("~" + l8->text());
+    }
 
     // turn labels "red"
     l5->setStyleSheet((nBytes >= 1000) ? "color:red;" : "");                            // Bytes >= 1000
@@ -599,12 +606,22 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
     QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minRelayTxFee.GetFee(546)));
 
+    // how many satoshis the estimated fee can vary per byte we guess wrong
+    double dFeeVary = (double)std::max(CTransaction::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
+    QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
+
+    l3->setToolTip(toolTip4);
+    l4->setToolTip(toolTip4);
     l5->setToolTip(toolTip1);
     l6->setToolTip(toolTip2);
     l7->setToolTip(toolTip3);
+    l8->setToolTip(toolTip4);
+    dialog->findChild<QLabel *>("labelCoinControlFeeText")      ->setToolTip(l3->toolTip());
+    dialog->findChild<QLabel *>("labelCoinControlAfterFeeText") ->setToolTip(l4->toolTip());
     dialog->findChild<QLabel *>("labelCoinControlBytesText")    ->setToolTip(l5->toolTip());
     dialog->findChild<QLabel *>("labelCoinControlPriorityText") ->setToolTip(l6->toolTip());
     dialog->findChild<QLabel *>("labelCoinControlLowOutputText")->setToolTip(l7->toolTip());
+    dialog->findChild<QLabel *>("labelCoinControlChangeText")   ->setToolTip(l8->toolTip());
 
     // Insufficient funds
     QLabel *label = dialog->findChild<QLabel *>("labelCoinControlInsuffFunds");

From 11404af34c5e3d5aa334e1cfd8edee82fb9dc9a4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 13 Jun 2014 19:18:13 -0400
Subject: [PATCH 0187/1819] sanity: autoconf check for sys/select.h

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index d8521ad3ad5f..81a32f9fb759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,7 +368,7 @@ if test x$TARGET_OS = xdarwin; then
   AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
 fi
 
-AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h])
+AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h])
 
 dnl Check for MSG_NOSIGNAL
 AC_MSG_CHECKING(for MSG_NOSIGNAL)

From 679240d0e92f71b38cefd23e3d99e8ebf63c2508 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 13 Jun 2014 19:19:35 -0400
Subject: [PATCH 0188/1819] sanity: add libc/stdlib sanity checks

These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
---
 src/Makefile.am               |  5 ++-
 src/compat/glibc_sanity.cpp   | 61 +++++++++++++++++++++++++++++++++++
 src/compat/glibcxx_sanity.cpp | 61 +++++++++++++++++++++++++++++++++++
 src/compat/sanity.h           |  7 ++++
 4 files changed, 133 insertions(+), 1 deletion(-)
 create mode 100644 src/compat/glibc_sanity.cpp
 create mode 100644 src/compat/glibcxx_sanity.cpp
 create mode 100644 src/compat/sanity.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 0a76829197d4..e1542203f8e7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -85,7 +85,8 @@ BITCOIN_CORE_H = \
   util.h \
   version.h \
   walletdb.h \
-  wallet.h
+  wallet.h \
+  compat/sanity.h
 
 JSON_H = \
   json/json_spirit.h \
@@ -154,6 +155,8 @@ libbitcoin_common_a_SOURCES = \
   sync.cpp \
   util.cpp \
   version.cpp \
+  compat/glibc_sanity.cpp \
+  compat/glibcxx_sanity.cpp \
   $(BITCOIN_CORE_H)
 
 if GLIBC_BACK_COMPAT
diff --git a/src/compat/glibc_sanity.cpp b/src/compat/glibc_sanity.cpp
new file mode 100644
index 000000000000..1f64df9e3370
--- /dev/null
+++ b/src/compat/glibc_sanity.cpp
@@ -0,0 +1,61 @@
+#include "bitcoin-config.h"
+
+#include <cstddef>
+#if defined(HAVE_SYS_SELECT_H)
+#include <sys/select.h>
+#endif
+
+extern "C" void* memcpy(void* a, const void* b, size_t c);
+void* memcpy_int(void* a, const void* b, size_t c)
+{
+  return memcpy(a,b,c);
+}
+
+namespace {
+// trigger: Use the memcpy_int wrapper which calls our internal memcpy.
+//   A direct call to memcpy may be optimized away by the compiler.
+// test: Fill an array with a sequence of integers. memcpy to a new empty array.
+//   Verify that the arrays are equal. Use an odd size to decrease the odds of
+//   the call being optimized away.
+template <unsigned int T>
+bool sanity_test_memcpy()
+{
+    unsigned int memcpy_test[T];
+    unsigned int memcpy_verify[T] = {};
+    for (unsigned int i = 0; i != T; ++i)
+        memcpy_test[i] = i;
+
+    memcpy_int(memcpy_verify,memcpy_test,sizeof(memcpy_test));
+
+    for (unsigned int i = 0; i != T; ++i)
+    {
+        if(memcpy_verify[i] != i)
+            return false;
+    }
+    return true;
+}
+
+#if defined(HAVE_SYS_SELECT_H)
+// trigger: Call FD_SET to trigger __fdelt_chk. FORTIFY_SOURCE must be defined
+//   as >0 and optimizations must be set to at least -O2.
+// test: Add a file descriptor to an empty fd_set. Verify that it has been
+//   correctly added.
+bool sanity_test_fdelt()
+{
+    fd_set fds;
+    FD_ZERO(&fds);
+    FD_SET(0, &fds);
+    return FD_ISSET(0,&fds);
+}
+#endif
+
+} // anon namespace
+
+bool glibc_sanity_test()
+{
+#if defined(HAVE_SYS_SELECT_H)
+    if (!sanity_test_fdelt())
+        return false;
+#endif
+    return sanity_test_memcpy<1025>();
+}
diff --git a/src/compat/glibcxx_sanity.cpp b/src/compat/glibcxx_sanity.cpp
new file mode 100644
index 000000000000..2ff70948fd70
--- /dev/null
+++ b/src/compat/glibcxx_sanity.cpp
@@ -0,0 +1,61 @@
+#include <locale>
+#include <list>
+#include <stdexcept>
+
+namespace{
+
+// trigger: use ctype<char>::widen to trigger ctype<char>::_M_widen_init().
+// test: convert a char from narrow to wide and back. Verify that the result
+//   matches the original.
+bool sanity_test_widen(char testchar)
+{
+    const std::ctype<char>& test(std::use_facet< std::ctype<char> >(std::locale()));
+    return test.narrow(test.widen(testchar),'b') == testchar;
+}
+
+// trigger: use list::push_back and list::pop_back to trigger _M_hook and
+//   _M_unhook.
+// test: Push a sequence of integers into a list. Pop them off and verify that
+//   they match the original sequence.
+bool sanity_test_list(unsigned int size)
+{
+    std::list<unsigned int> test;
+    for (unsigned int i = 0; i != size; ++i)
+        test.push_back(i+1);
+
+    if (test.size() != size)
+        return false;
+
+    while (!test.empty())
+    {
+        if(test.back() != test.size())
+            return false;
+        test.pop_back();
+    }
+    return true;
+}
+
+} // anon namespace
+
+// trigger: string::at(x) on an empty string to trigger __throw_out_of_range_fmt.
+// test: force std::string to throw an out_of_range exception. Verify that
+//   it's caught correctly.
+bool sanity_test_range_fmt()
+{
+    std::string test;
+    try
+    {
+        test.at(1);
+    }
+    catch (const std::out_of_range&)
+    {
+        return true;
+    }
+    catch (...){}
+    return false;
+}
+
+bool glibcxx_sanity_test()
+{
+    return sanity_test_widen('a') && sanity_test_list(100) && sanity_test_range_fmt();
+}
diff --git a/src/compat/sanity.h b/src/compat/sanity.h
new file mode 100644
index 000000000000..a221f69dfcb9
--- /dev/null
+++ b/src/compat/sanity.h
@@ -0,0 +1,7 @@
+#ifndef BITCON_COMPAT_SANITY_H
+#define BITCON_COMPAT_SANITY_H
+
+bool glibc_sanity_test();
+bool glibcxx_sanity_test();
+
+#endif

From 92a6220711b3f98c3daad8a8dcdf13f09ce484fd Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 13 Jun 2014 19:23:01 -0400
Subject: [PATCH 0189/1819] sanity: hook up sanity checks

---
 src/init.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 39453da9c8d3..f3df3cb375c6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -31,6 +31,7 @@
 #ifndef WIN32
 #include <signal.h>
 #endif
+#include "compat/sanity.h"
 
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/filesystem.hpp>
@@ -417,8 +418,8 @@ bool InitSanityCheck(void)
                   "information, visit https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries");
         return false;
     }
-
-    // TODO: remaining sanity checks, see #4081
+    if (!glibc_sanity_test() || !glibcxx_sanity_test())
+        return false;
 
     return true;
 }

From 7ad720d89020837ba1831055d8ee4eb955075f89 Mon Sep 17 00:00:00 2001
From: dllud <david.ludovino@gmail.com>
Date: Tue, 17 Jun 2014 04:22:47 +0100
Subject: [PATCH 0190/1819] Added encryptwallet call to bitrpc.py

This was the only call requiring password input which was still missing. Much useful to avoid leaving a plain text passphrase in the shell log.
---
 contrib/bitrpc/bitrpc.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/contrib/bitrpc/bitrpc.py b/contrib/bitrpc/bitrpc.py
index a84d7e34ddb4..02577b1b6aab 100644
--- a/contrib/bitrpc/bitrpc.py
+++ b/contrib/bitrpc/bitrpc.py
@@ -22,6 +22,18 @@
         print access.backupwallet(path)
     except:
         print "\n---An error occurred---\n"
+        
+elif cmd == "encryptwallet":
+    try:
+        pwd = getpass.getpass(prompt="Enter passphrase: ")
+        pwd2 = getpass.getpass(prompt="Repeat passphrase: ")
+        if pwd == pwd2:
+            access.encryptwallet(pwd)
+            print "\n---Wallet encrypted. Server stopping, restart to run with encrypted wallet---\n"
+        else:
+            print "\n---Passphrases do not match---\n"
+    except:
+        print "\n---An error occurred---\n"
 
 elif cmd == "getaccount":
     try:

From 1020f599f33d47812a5ed73366fd266a25fef32d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 17 Jun 2014 09:13:52 +0200
Subject: [PATCH 0191/1819] add comment to HelpMessage() to ensure alphabetical
 ordering

- also rename hmm to mode, to be consistent between .h and .cpp
---
 src/init.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 39453da9c8d3..dd5e4cf3b0e4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -195,8 +195,9 @@ bool static Bind(const CService &addr, unsigned int flags) {
     return true;
 }
 
-std::string HelpMessage(HelpMessageMode hmm)
+std::string HelpMessage(HelpMessageMode mode)
 {
+    // When adding new options to the categories, please keep and ensure alphabetical ordering.
     string strUsage = _("Options:") + "\n";
     strUsage += "  -?                     " + _("This help message") + "\n";
     strUsage += "  -alertnotify=<cmd>     " + _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)") + "\n";
@@ -204,7 +205,7 @@ std::string HelpMessage(HelpMessageMode hmm)
     strUsage += "  -checkblocks=<n>       " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n";
     strUsage += "  -checklevel=<n>        " + _("How thorough the block verification of -checkblocks is (0-4, default: 3)") + "\n";
     strUsage += "  -conf=<file>           " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
-    if (hmm == HMM_BITCOIND)
+    if (mode == HMM_BITCOIND)
     {
 #if !defined(WIN32)
         strUsage += "  -daemon                " + _("Run in the background as a daemon and accept commands") + "\n";
@@ -278,7 +279,7 @@ std::string HelpMessage(HelpMessageMode hmm)
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:");
     strUsage +=                                 " addrman, alert, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below
-    if (hmm == HMM_BITCOIN_QT)
+    if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
     strUsage += "  -gen                   " + _("Generate coins (default: 0)") + "\n";

From b82b7ec3dcbeda9e9f5de9bac05cc63c492e662e Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Thu, 12 Jun 2014 13:48:31 +0200
Subject: [PATCH 0192/1819] Get rid of Params().RPCisTestNet()

---
 src/chainparams.cpp | 3 ---
 src/chainparams.h   | 3 ---
 src/rpcmining.cpp   | 2 +-
 src/rpcmisc.cpp     | 2 +-
 4 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 6b2cfa1d1ff0..31eac62d48fa 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -178,7 +178,6 @@ class CMainParams : public CChainParams {
         fDefaultCheckMemPool = false;
         fAllowMinDifficultyBlocks = false;
         fRequireStandard = true;
-        fRPCisTestNet = false;
         fMineBlocksOnDemand = false;
     }
 };
@@ -230,7 +229,6 @@ class CTestNetParams : public CMainParams {
         fDefaultCheckMemPool = false;
         fAllowMinDifficultyBlocks = true;
         fRequireStandard = false;
-        fRPCisTestNet = true;
         fMineBlocksOnDemand = false;
     }
 };
@@ -269,7 +267,6 @@ class CRegTestParams : public CTestNetParams {
         fDefaultCheckMemPool = true;
         fAllowMinDifficultyBlocks = true;
         fRequireStandard = false;
-        fRPCisTestNet = true;
         fMineBlocksOnDemand = true;
     }
 };
diff --git a/src/chainparams.h b/src/chainparams.h
index 28a51cbb0c2c..c0a6ebda6b3f 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -70,8 +70,6 @@ class CChainParams
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
-    /* Make standard checks */
-    bool RPCisTestNet() const { return fRPCisTestNet; }
     const std::string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
@@ -110,7 +108,6 @@ class CChainParams
     bool fDefaultCheckMemPool;
     bool fAllowMinDifficultyBlocks;
     bool fRequireStandard;
-    bool fRPCisTestNet;
     bool fMineBlocksOnDemand;
 };
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 3caf7d89fe7c..e18e44c5ef7d 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -268,7 +268,7 @@ Value getmininginfo(const Array& params, bool fHelp)
     obj.push_back(Pair("genproclimit",     (int)GetArg("-genproclimit", -1)));
     obj.push_back(Pair("networkhashps",    getnetworkhashps(params, false)));
     obj.push_back(Pair("pooledtx",         (uint64_t)mempool.size()));
-    obj.push_back(Pair("testnet",          Params().RPCisTestNet()));
+    obj.push_back(Pair("testnet",          Params().NetworkID() == CChainParams::TESTNET));
 #ifdef ENABLE_WALLET
     obj.push_back(Pair("generate",         getgenerate(params, false)));
     obj.push_back(Pair("hashespersec",     gethashespersec(params, false)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 77e0e09ec3d0..5181aa23d8d7 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -73,7 +73,7 @@ Value getinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
-    obj.push_back(Pair("testnet",       Params().RPCisTestNet()));
+    obj.push_back(Pair("testnet",       Params().NetworkID() == CChainParams::TESTNET));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
         obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));

From f6984e814134d2383e1353ce8aa951649f5fcbd2 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Thu, 12 Jun 2014 14:52:12 +0200
Subject: [PATCH 0193/1819] Add "chain" to getmininginfo, improve help in
 getblockchaininfo

---
 src/rpcblockchain.cpp | 2 +-
 src/rpcmining.cpp     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 0fabc86872a9..580c6bd5bafc 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -438,7 +438,7 @@ Value getblockchaininfo(const Array& params, bool fHelp)
             "Returns an object containing various state info regarding block chain processing.\n"
             "\nResult:\n"
             "{\n"
-            "  \"chain\": \"xxxx\",        (string) current chain (main, testnet3, regtest)\n"
+            "  \"chain\": \"xxxx\",        (string) current network name as defined in BIP70 (main, test, regtest)\n"
             "  \"blocks\": xxxxxx,         (numeric) the current number of blocks processed in the server\n"
             "  \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"
             "  \"difficulty\": xxxxxx,     (numeric) the current difficulty\n"
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index e18e44c5ef7d..57a51c0fde33 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -253,6 +253,7 @@ Value getmininginfo(const Array& params, bool fHelp)
             "  \"hashespersec\": n          (numeric) The hashes per second of the generation, or 0 if no generation.\n"
             "  \"pooledtx\": n              (numeric) The size of the mem pool\n"
             "  \"testnet\": true|false      (boolean) If using testnet or not\n"
+            "  \"chain\": \"xxxx\",         (string) current network name as defined in BIP70 (main, test, regtest)\n"
             "}\n"
             "\nExamples:\n"
             + HelpExampleCli("getmininginfo", "")
@@ -269,6 +270,7 @@ Value getmininginfo(const Array& params, bool fHelp)
     obj.push_back(Pair("networkhashps",    getnetworkhashps(params, false)));
     obj.push_back(Pair("pooledtx",         (uint64_t)mempool.size()));
     obj.push_back(Pair("testnet",          Params().NetworkID() == CChainParams::TESTNET));
+    obj.push_back(Pair("chain",            Params().NetworkIDString()));
 #ifdef ENABLE_WALLET
     obj.push_back(Pair("generate",         getgenerate(params, false)));
     obj.push_back(Pair("hashespersec",     gethashespersec(params, false)));

From 33e5b4291036bbdad075f4a549491af72d8a0618 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 17 Jun 2014 09:09:12 +0200
Subject: [PATCH 0194/1819] rpc: Ignore and log errors during cancel

Cancelling the RPC acceptors can sometimes result in an error about
a bad file descriptor.

As this is the shutdown sequence we need to continue nevertheless,
ignore these errors, log a warning and proceed.

Fixes #4352.
---
 src/rpcserver.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index d4ceb7f995f7..2f7f5cc2ad26 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -700,11 +700,20 @@ void StopRPCThreads()
     // First, cancel all timers and acceptors
     // This is not done automatically by ->stop(), and in some cases the destructor of
     // asio::io_service can hang if this is skipped.
+    boost::system::error_code ec;
     BOOST_FOREACH(const boost::shared_ptr<ip::tcp::acceptor> &acceptor, rpc_acceptors)
-        acceptor->cancel();
+    {
+        acceptor->cancel(ec);
+        if (ec)
+            LogPrintf("%s: Warning: %s when cancelling acceptor", __func__, ec.message());
+    }
     rpc_acceptors.clear();
     BOOST_FOREACH(const PAIRTYPE(std::string, boost::shared_ptr<deadline_timer>) &timer, deadlineTimers)
-        timer.second->cancel();
+    {
+        timer.second->cancel(ec);
+        if (ec)
+            LogPrintf("%s: Warning: %s when cancelling timer", __func__, ec.message());
+    }
     deadlineTimers.clear();
 
     rpc_io_service->stop();

From 6afa49329de860c080cdfd9b1c65afe313a43860 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 19 Jun 2014 08:19:07 +0200
Subject: [PATCH 0195/1819] rpc: Add acceptors only when listening succeeded

---
 src/rpcserver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 2f7f5cc2ad26..56b5f2de0bf3 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -642,7 +642,6 @@ void StartRPCThreads()
         LogPrintf("Binding RPC on address %s port %i (IPv4+IPv6 bind any: %i)\n", bindAddress.to_string(), endpoint.port(), bBindAny);
         boost::system::error_code v6_only_error;
         boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
-        rpc_acceptors.push_back(acceptor);
 
         try {
             acceptor->open(endpoint.protocol());
@@ -658,6 +657,7 @@ void StartRPCThreads()
             RPCListen(acceptor, *rpc_ssl_context, fUseSSL);
 
             fListening = true;
+            rpc_acceptors.push_back(acceptor);
             // If dual IPv6/IPv4 bind succesful, skip binding to IPv4 separately
             if(bBindAny && bindAddress == asio::ip::address_v6::any() && !v6_only_error)
                 break;

From ea3acaf383ade60d39643b786db5b6942b8b7991 Mon Sep 17 00:00:00 2001
From: Pavel Vasin <rat4vier@gmail.com>
Date: Fri, 20 Jun 2014 16:32:57 +0400
Subject: [PATCH 0196/1819] AvailableCoins: acquire cs_main mutex

It's required when called from WalletModel
---
 src/wallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 400c966a950a..3176cf893ae2 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1028,7 +1028,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
     vCoins.clear();
 
     {
-        LOCK(cs_wallet);
+        LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
         {
             const uint256& wtxid = it->first;

From fc0c07eb64f4bc22377c35d13c71de9e2ede8861 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 21 Jun 2014 14:26:21 +0200
Subject: [PATCH 0197/1819] small cleanup in src/compat .h and .cpp

- add license header
- fix include guards
- fix indentation
---
 src/compat/glibc_compat.cpp   | 17 +++++++++---
 src/compat/glibc_sanity.cpp   |  8 +++++-
 src/compat/glibcxx_compat.cpp | 50 ++++++++++++++++++++---------------
 src/compat/glibcxx_sanity.cpp |  6 ++++-
 src/compat/sanity.h           |  6 ++++-
 5 files changed, 58 insertions(+), 29 deletions(-)

diff --git a/src/compat/glibc_compat.cpp b/src/compat/glibc_compat.cpp
index 5b73e6051a8e..bb870c01f8b3 100644
--- a/src/compat/glibc_compat.cpp
+++ b/src/compat/glibc_compat.cpp
@@ -1,19 +1,28 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
 #include "bitcoin-config.h"
+#endif
+
 #include <cstddef>
+#if defined(HAVE_SYS_SELECT_H)
 #include <sys/select.h>
+#endif
 
 // Prior to GLIBC_2.14, memcpy was aliased to memmove.
 extern "C" void* memmove(void* a, const void* b, size_t c);
 extern "C" void* memcpy(void* a, const void* b, size_t c)
 {
-  return memmove(a, b, c);
+    return memmove(a, b, c);
 }
 
 extern "C" void __chk_fail (void) __attribute__((__noreturn__));
 extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
 {
-  if (a >= FD_SETSIZE)
-    __chk_fail ();
-  return a / __NFDBITS;
+    if (a >= FD_SETSIZE)
+        __chk_fail ();
+    return a / __NFDBITS;
 }
 extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
diff --git a/src/compat/glibc_sanity.cpp b/src/compat/glibc_sanity.cpp
index 1f64df9e3370..6e5bae8a48f1 100644
--- a/src/compat/glibc_sanity.cpp
+++ b/src/compat/glibc_sanity.cpp
@@ -1,4 +1,10 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
 #include "bitcoin-config.h"
+#endif
 
 #include <cstddef>
 #if defined(HAVE_SYS_SELECT_H)
@@ -8,7 +14,7 @@
 extern "C" void* memcpy(void* a, const void* b, size_t c);
 void* memcpy_int(void* a, const void* b, size_t c)
 {
-  return memcpy(a,b,c);
+    return memcpy(a,b,c);
 }
 
 namespace {
diff --git a/src/compat/glibcxx_compat.cpp b/src/compat/glibcxx_compat.cpp
index e91376f81847..417166aedae8 100644
--- a/src/compat/glibcxx_compat.cpp
+++ b/src/compat/glibcxx_compat.cpp
@@ -1,49 +1,55 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include <cstddef>
 #include <istream>
 #include <stdexcept>
 #include <typeinfo>
 
 #ifndef _GLIBCXX_USE_NOEXCEPT
-    #define _GLIBCXX_USE_NOEXCEPT throw()
+#define _GLIBCXX_USE_NOEXCEPT throw()
 #endif
 
 namespace std {
 
 const char* bad_exception::what() const throw()
 {
-  return "std::bad_exception";
+    return "std::bad_exception";
 }
 
 const char* bad_cast::what() const throw()
 {
-  return "std::bad_cast";
+    return "std::bad_cast";
 }
 
 const char* bad_alloc::what() const throw()
 {
-  return "std::bad_alloc";
+    return "std::bad_alloc";
 }
 
 namespace __detail
 {
 struct _List_node_base
 {
-  void _M_hook(std::__detail::_List_node_base* const __position) throw () __attribute__((used))
-  {
-    _M_next = __position;
-    _M_prev = __position->_M_prev;
-    __position->_M_prev->_M_next = this;
-    __position->_M_prev = this;
-  }
-  void _M_unhook() __attribute__((used))
-  {
-    _List_node_base* const __next_node = _M_next;
-    _List_node_base* const __prev_node = _M_prev;
-    __prev_node->_M_next = __next_node;
-    __next_node->_M_prev = __prev_node;
-  }
-  _List_node_base* _M_next;
-  _List_node_base* _M_prev;
+    void _M_hook(std::__detail::_List_node_base* const __position) throw () __attribute__((used))
+    {
+        _M_next = __position;
+        _M_prev = __position->_M_prev;
+        __position->_M_prev->_M_next = this;
+        __position->_M_prev = this;
+    }
+
+    void _M_unhook() __attribute__((used))
+    {
+        _List_node_base* const __next_node = _M_next;
+        _List_node_base* const __prev_node = _M_prev;
+        __prev_node->_M_next = __next_node;
+        __next_node->_M_prev = __prev_node;
+    }
+
+    _List_node_base* _M_next;
+    _List_node_base* _M_prev;
 };
 } // namespace detail
 
@@ -61,8 +67,8 @@ out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT { }
 // Used with permission.
 // See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d
 
-void
-ctype<char>::_M_widen_init() const {
+void ctype<char>::_M_widen_init() const
+{
     char __tmp[sizeof(_M_widen)];
     for (unsigned __i = 0; __i < sizeof(_M_widen); ++__i)
         __tmp[__i] = __i;
diff --git a/src/compat/glibcxx_sanity.cpp b/src/compat/glibcxx_sanity.cpp
index 2ff70948fd70..cd8da4fd675d 100644
--- a/src/compat/glibcxx_sanity.cpp
+++ b/src/compat/glibcxx_sanity.cpp
@@ -1,5 +1,9 @@
-#include <locale>
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include <list>
+#include <locale>
 #include <stdexcept>
 
 namespace{
diff --git a/src/compat/sanity.h b/src/compat/sanity.h
index a221f69dfcb9..e7df44307a1a 100644
--- a/src/compat/sanity.h
+++ b/src/compat/sanity.h
@@ -1,7 +1,11 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCON_COMPAT_SANITY_H
 #define BITCON_COMPAT_SANITY_H
 
 bool glibc_sanity_test();
 bool glibcxx_sanity_test();
 
-#endif
+#endif // BITCON_COMPAT_SANITY_H

From 806fd19ecba0d58bf238a7b6f78e080da03eb9c7 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 21 Jun 2014 17:00:38 +0200
Subject: [PATCH 0198/1819] Allocate receive buffers in on the fly

---
 src/net.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/net.cpp b/src/net.cpp
index 757a06aaed33..707f58f8a623 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -678,7 +678,6 @@ int CNetMessage::readHeader(const char *pch, unsigned int nBytes)
 
     // switch state to reading message data
     in_data = true;
-    vRecv.resize(hdr.nMessageSize);
 
     return nCopy;
 }
@@ -688,6 +687,11 @@ int CNetMessage::readData(const char *pch, unsigned int nBytes)
     unsigned int nRemaining = hdr.nMessageSize - nDataPos;
     unsigned int nCopy = std::min(nRemaining, nBytes);
 
+    if (vRecv.size() < nDataPos + nCopy) {
+        // Allocate up to 256 KiB ahead, but never more than the total message size.
+        vRecv.resize(std::min(hdr.nMessageSize, nDataPos + nCopy + 256 * 1024));
+    }
+
     memcpy(&vRecv[nDataPos], pch, nCopy);
     nDataPos += nCopy;
 

From 99ddc6cb706e825e54da244a10d4d6389fc5eaae Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Fri, 6 Jun 2014 03:15:55 -0400
Subject: [PATCH 0199/1819] Add nLocalServices info to RPC getinfo

Also show full 64 bits of services. Previously service bits >32 that
were advertised just didn't show up at all.
---
 src/rpcnet.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 0eca55a472cc..6fc86eedfbfa 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -80,7 +80,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "  {\n"
             "    \"addr\":\"host:port\",      (string) The ip address and port of the peer\n"
             "    \"addrlocal\":\"ip:port\",   (string) local address\n"
-            "    \"services\":\"00000001\",   (string) The services\n"
+            "    \"services\":\"xxxxxxxxxxxxxxxx\",   (string) The services offered\n"
             "    \"lastsend\": ttt,           (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n"
             "    \"lastrecv\": ttt,           (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n"
             "    \"bytessent\": n,            (numeric) The total bytes sent\n"
@@ -115,7 +115,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
         obj.push_back(Pair("addr", stats.addrName));
         if (!(stats.addrLocal.empty()))
             obj.push_back(Pair("addrlocal", stats.addrLocal));
-        obj.push_back(Pair("services", strprintf("%08x", stats.nServices)));
+        obj.push_back(Pair("services", strprintf("%016x", stats.nServices)));
         obj.push_back(Pair("lastsend", stats.nLastSend));
         obj.push_back(Pair("lastrecv", stats.nLastRecv));
         obj.push_back(Pair("bytessent", stats.nSendBytes));
@@ -344,6 +344,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "{\n"
             "  \"version\": xxxxx,           (numeric) the server version\n"
             "  \"protocolversion\": xxxxx,   (numeric) the protocol version\n"
+            "  \"localservices\": \"xxxxxxxxxxxxxxxx\",   (string) the services we offer to the network\n"
             "  \"timeoffset\": xxxxx,        (numeric) the time offset\n"
             "  \"connections\": xxxxx,       (numeric) the number of connections\n"
             "  \"proxy\": \"host:port\",     (string, optional) the proxy used by the server\n"
@@ -365,6 +366,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
     Object obj;
     obj.push_back(Pair("version",       (int)CLIENT_VERSION));
     obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
+    obj.push_back(Pair("localservices",       strprintf("%016x", nLocalServices)));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));

From 38405ac1411ce73f6945f296980d559e2949027f Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sat, 21 Jun 2014 09:05:24 -0400
Subject: [PATCH 0200/1819] Add comment regarding experimental-use service bits

As per mailing list discussion.
---
 src/protocol.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/protocol.h b/src/protocol.h
index 6de5d05a723c..1f23274299b7 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -64,6 +64,14 @@ class CMessageHeader
 enum
 {
     NODE_NETWORK = (1 << 0),
+
+    // Bits 24-31 are reserved for temporary experiments. Just pick a bit that
+    // isn't getting used, or one not being used much, and notify the
+    // bitcoin-development mailing list. Remember that service bits are just
+    // unauthenticated advertisements, so your code must be robust against
+    // collisions and other cases where nodes may be advertising a service they
+    // do not actually support. Other service bits should be allocated via the
+    // BIP process.
 };
 
 /** A CService with information about it as peer */

From 977cdadea8a77eed04f1f0fd341ba9dedc3fa783 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 20 Apr 2014 17:36:25 +0200
Subject: [PATCH 0201/1819] Add a built-in SHA256/SHA512 implementation.

This also moves the HMAC-SHA512 implementation to sha2.cpp.
---
 src/Makefile.am                             |   2 +
 src/Makefile.test.include                   |   2 +
 src/hash.cpp                                |  41 --
 src/hash.h                                  |  10 -
 src/key.cpp                                 |  19 +-
 src/sha2.cpp                                | 428 ++++++++++++++++++++
 src/sha2.h                                  |  54 +++
 src/test/{hmac_tests.cpp => sha2_tests.cpp} |  56 ++-
 8 files changed, 536 insertions(+), 76 deletions(-)
 create mode 100644 src/sha2.cpp
 create mode 100644 src/sha2.h
 rename src/test/{hmac_tests.cpp => sha2_tests.cpp} (53%)

diff --git a/src/Makefile.am b/src/Makefile.am
index e1542203f8e7..4e94d47066bb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,7 @@ BITCOIN_CORE_H = \
   rpcserver.h \
   script.h \
   serialize.h \
+  sha2.h \
   sync.h \
   threadsafety.h \
   tinyformat.h \
@@ -152,6 +153,7 @@ libbitcoin_common_a_SOURCES = \
   protocol.cpp \
   rpcprotocol.cpp \
   script.cpp \
+  sha2.cpp \
   sync.cpp \
   util.cpp \
   version.cpp \
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 988830260cd5..93723309afd5 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -33,6 +33,7 @@ BITCOIN_TESTS =\
   test/compress_tests.cpp \
   test/DoS_tests.cpp \
   test/getarg_tests.cpp \
+  test/hash_tests.cpp \
   test/key_tests.cpp \
   test/main_tests.cpp \
   test/miner_tests.cpp \
@@ -44,6 +45,7 @@ BITCOIN_TESTS =\
   test/script_P2SH_tests.cpp \
   test/script_tests.cpp \
   test/serialize_tests.cpp \
+  test/sha2_tests.cpp \
   test/sigopcount_tests.cpp \
   test/test_bitcoin.cpp \
   test/transaction_tests.cpp \
diff --git a/src/hash.cpp b/src/hash.cpp
index 7b054bd1545d..bddd8abf38d0 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -56,44 +56,3 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
 
     return h1;
 }
-
-int HMAC_SHA512_Init(HMAC_SHA512_CTX *pctx, const void *pkey, size_t len)
-{
-    unsigned char key[128];
-    if (len <= 128)
-    {
-        memcpy(key, pkey, len);
-        memset(key + len, 0, 128-len);
-    }
-    else
-    {
-        SHA512_CTX ctxKey;
-        SHA512_Init(&ctxKey);
-        SHA512_Update(&ctxKey, pkey, len);
-        SHA512_Final(key, &ctxKey);
-        memset(key + 64, 0, 64);
-    }
-
-    for (int n=0; n<128; n++)
-        key[n] ^= 0x5c;
-    SHA512_Init(&pctx->ctxOuter);
-    SHA512_Update(&pctx->ctxOuter, key, 128);
-
-    for (int n=0; n<128; n++)
-        key[n] ^= 0x5c ^ 0x36;
-    SHA512_Init(&pctx->ctxInner);
-    return SHA512_Update(&pctx->ctxInner, key, 128);
-}
-
-int HMAC_SHA512_Update(HMAC_SHA512_CTX *pctx, const void *pdata, size_t len)
-{
-    return SHA512_Update(&pctx->ctxInner, pdata, len);
-}
-
-int HMAC_SHA512_Final(unsigned char *pmd, HMAC_SHA512_CTX *pctx)
-{
-    unsigned char buf[64];
-    SHA512_Final(buf, &pctx->ctxInner);
-    SHA512_Update(&pctx->ctxOuter, buf, 64);
-    return SHA512_Final(pmd, &pctx->ctxOuter);
-}
diff --git a/src/hash.h b/src/hash.h
index 7dbf1b64484c..718b627a78dc 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -126,14 +126,4 @@ inline uint160 Hash160(const std::vector<unsigned char>& vch)
 
 unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
 
-typedef struct
-{
-    SHA512_CTX ctxInner;
-    SHA512_CTX ctxOuter;
-} HMAC_SHA512_CTX;
-
-int HMAC_SHA512_Init(HMAC_SHA512_CTX *pctx, const void *pkey, size_t len);
-int HMAC_SHA512_Update(HMAC_SHA512_CTX *pctx, const void *pdata, size_t len);
-int HMAC_SHA512_Final(unsigned char *pmd, HMAC_SHA512_CTX *pctx);
-
 #endif
diff --git a/src/key.cpp b/src/key.cpp
index 4747beffb4ed..0685948922eb 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -4,6 +4,8 @@
 
 #include "key.h"
 
+#include "sha2.h"
+
 #include <openssl/bn.h>
 #include <openssl/ecdsa.h>
 #include <openssl/obj_mac.h>
@@ -510,12 +512,10 @@ void static BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, un
     num[1] = (nChild >> 16) & 0xFF;
     num[2] = (nChild >>  8) & 0xFF;
     num[3] = (nChild >>  0) & 0xFF;
-    HMAC_SHA512_CTX ctx;
-    HMAC_SHA512_Init(&ctx, chainCode, 32);
-    HMAC_SHA512_Update(&ctx, &header, 1);
-    HMAC_SHA512_Update(&ctx, data, 32);
-    HMAC_SHA512_Update(&ctx, num, 4);
-    HMAC_SHA512_Final(output, &ctx);
+    CHMAC_SHA512(chainCode, 32).Write(&header, 1)
+                               .Write(data, 32)
+                               .Write(num, 4)
+                               .Finalize(output);
 }
 
 bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
@@ -562,13 +562,10 @@ bool CExtKey::Derive(CExtKey &out, unsigned int nChild) const {
 }
 
 void CExtKey::SetMaster(const unsigned char *seed, unsigned int nSeedLen) {
-    static const char hashkey[] = {'B','i','t','c','o','i','n',' ','s','e','e','d'};
-    HMAC_SHA512_CTX ctx;
-    HMAC_SHA512_Init(&ctx, hashkey, sizeof(hashkey));
-    HMAC_SHA512_Update(&ctx, seed, nSeedLen);
+    static const unsigned char hashkey[] = {'B','i','t','c','o','i','n',' ','s','e','e','d'};
     unsigned char out[64];
     LockObject(out);
-    HMAC_SHA512_Final(out, &ctx);
+    CHMAC_SHA512(hashkey, sizeof(hashkey)).Write(seed, nSeedLen).Finalize(out);
     key.Set(&out[0], &out[32], true);
     memcpy(vchChainCode, &out[32], 32);
     UnlockObject(out);
diff --git a/src/sha2.cpp b/src/sha2.cpp
new file mode 100644
index 000000000000..c9beaf220bcd
--- /dev/null
+++ b/src/sha2.cpp
@@ -0,0 +1,428 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "sha2.h"
+
+#include <string.h>
+
+// Internal implementation code.
+namespace {
+
+/** Read 4 bytes, and interpret them as a 32-bit unsigned big-endian integer. */
+uint32_t inline ReadBE32(const unsigned char *data) {
+    return ((uint32_t)data[0] << 24 | (uint32_t)data[1] << 16 | (uint32_t)data[2] << 8 | (uint32_t)data[3]);
+}
+
+/** Write a 32-bit unsigned big-endian integer. */
+void inline WriteBE32(unsigned char *data, uint32_t x) {
+    data[0] = x >> 24;
+    data[1] = x >> 16;
+    data[2] = x >> 8;
+    data[3] = x;
+}
+
+/** Read 8 bytes, and interpret them as a 64-bit unsigned big-endian integer. */
+uint64_t inline ReadBE64(const unsigned char *data) {
+    return ((uint64_t)data[0] << 56 | (uint64_t)data[1] << 48 | (uint64_t)data[2] << 40 | (uint64_t)data[3] << 32 |
+            (uint64_t)data[4] << 24 | (uint64_t)data[5] << 16 | (uint64_t)data[6] << 8  | (uint64_t)data[7]);
+}
+
+/** Write a 64-bit unsigned big-endian integer. */
+void inline WriteBE64(unsigned char *data, uint64_t x) {
+    data[0] = x >> 56;
+    data[1] = x >> 48;
+    data[2] = x >> 40;
+    data[3] = x >> 32;
+    data[4] = x >> 24;
+    data[5] = x >> 16;
+    data[6] = x >> 8;
+    data[7] = x;
+}
+
+/// Internal SHA-256 implementation.
+namespace sha256 {
+
+uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
+uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
+uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
+uint32_t inline Sigma1(uint32_t x) { return (x >> 6 | x << 26) ^ (x >> 11 | x << 21) ^ (x >> 25 | x << 7); }
+uint32_t inline sigma0(uint32_t x) { return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3); }
+uint32_t inline sigma1(uint32_t x) { return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); }
+
+/** One round of SHA-256. */
+void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t &d,
+                  uint32_t e, uint32_t f, uint32_t g, uint32_t &h,
+                  uint32_t k, uint32_t w) {
+    uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
+    uint32_t t2 = Sigma0(a) + Maj(a, b, c);
+    d += t1;
+    h = t1 + t2;
+}
+
+/** Initialize SHA-256 state. */
+void inline Initialize(uint32_t *s) {
+    s[0] = 0x6a09e667ul;
+    s[1] = 0xbb67ae85ul;
+    s[2] = 0x3c6ef372ul;
+    s[3] = 0xa54ff53aul;
+    s[4] = 0x510e527ful;
+    s[5] = 0x9b05688cul;
+    s[6] = 0x1f83d9abul;
+    s[7] = 0x5be0cd19ul;
+}
+
+/** Perform one SHA-256 transformation, processing a 64-byte chunk. */
+void Transform(uint32_t *s, const unsigned char *chunk) {
+    uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
+    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
+
+    Round(a, b, c, d, e, f, g, h, 0x428a2f98,  w0 = ReadBE32(chunk + 0));
+    Round(h, a, b, c, d, e, f, g, 0x71374491,  w1 = ReadBE32(chunk + 4));
+    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf,  w2 = ReadBE32(chunk + 8));
+    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5,  w3 = ReadBE32(chunk + 12));
+    Round(e, f, g, h, a, b, c, d, 0x3956c25b,  w4 = ReadBE32(chunk + 16));
+    Round(d, e, f, g, h, a, b, c, 0x59f111f1,  w5 = ReadBE32(chunk + 20));
+    Round(c, d, e, f, g, h, a, b, 0x923f82a4,  w6 = ReadBE32(chunk + 24));
+    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5,  w7 = ReadBE32(chunk + 28));
+    Round(a, b, c, d, e, f, g, h, 0xd807aa98,  w8 = ReadBE32(chunk + 32));
+    Round(h, a, b, c, d, e, f, g, 0x12835b01,  w9 = ReadBE32(chunk + 36));
+    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = ReadBE32(chunk + 40));
+    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = ReadBE32(chunk + 44));
+    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = ReadBE32(chunk + 48));
+    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = ReadBE32(chunk + 52));
+    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = ReadBE32(chunk + 56));
+    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = ReadBE32(chunk + 60));
+
+    Round(a, b, c, d, e, f, g, h, 0xe49b69c1,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0xefbe4786,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x240ca1cc,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x2de92c6f,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x4a7484aa,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x76f988da,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0x983e5152,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0xa831c66d,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x27b70a85,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0x2e1b2138,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x53380d13,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x650a7354,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x766a0abb,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x81c2c92e,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x92722c85,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0xa81a664b,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x19a4c116,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0x1e376c08,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x2748774c,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x391c0cb3,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x682e6ff3,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0x748f82ee,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0x78a5636f,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14  + sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15  + sigma1(w13) +  w8 + sigma0( w0));
+
+    s[0] += a;
+    s[1] += b;
+    s[2] += c;
+    s[3] += d;
+    s[4] += e;
+    s[5] += f;
+    s[6] += g;
+    s[7] += h;
+}
+
+}  // namespace sha256
+
+/// Internal SHA-512 implementation.
+namespace sha512 {
+
+uint64_t inline Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); }
+uint64_t inline Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); }
+uint64_t inline Sigma0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); }
+uint64_t inline Sigma1(uint64_t x) { return (x >> 14 | x << 50) ^ (x >> 18 | x << 46) ^ (x >> 41 | x << 23); }
+uint64_t inline sigma0(uint64_t x) { return (x >> 1 | x << 63) ^ (x >> 8 | x << 56) ^ (x >> 7); }
+uint64_t inline sigma1(uint64_t x) { return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); }
+
+/** One round of SHA-512. */
+void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t &d,
+                  uint64_t e, uint64_t f, uint64_t g, uint64_t &h,
+                  uint64_t k, uint64_t w) {
+    uint64_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
+    uint64_t t2 = Sigma0(a) + Maj(a, b, c);
+    d += t1;
+    h = t1 + t2;
+}
+
+/** Initialize SHA-256 state. */
+void inline Initialize(uint64_t *s) {
+    s[0] = 0x6a09e667f3bcc908ull;
+    s[1] = 0xbb67ae8584caa73bull;
+    s[2] = 0x3c6ef372fe94f82bull;
+    s[3] = 0xa54ff53a5f1d36f1ull;
+    s[4] = 0x510e527fade682d1ull;
+    s[5] = 0x9b05688c2b3e6c1full;
+    s[6] = 0x1f83d9abfb41bd6bull;
+    s[7] = 0x5be0cd19137e2179ull;
+}
+
+/** Perform one SHA-512 transformation, processing a 128-byte chunk. */
+void Transform(uint64_t *s, const unsigned char *chunk) {
+    uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
+    uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
+
+    Round(a, b, c, d, e, f, g, h, 0x428a2f98d728ae22ull,  w0 = ReadBE64(chunk + 0));
+    Round(h, a, b, c, d, e, f, g, 0x7137449123ef65cdull,  w1 = ReadBE64(chunk + 8));
+    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcfec4d3b2full,  w2 = ReadBE64(chunk + 16));
+    Round(f, g, h, a, b, c, d, e, 0xe9b5dba58189dbbcull,  w3 = ReadBE64(chunk + 24));
+    Round(e, f, g, h, a, b, c, d, 0x3956c25bf348b538ull,  w4 = ReadBE64(chunk + 32));
+    Round(d, e, f, g, h, a, b, c, 0x59f111f1b605d019ull,  w5 = ReadBE64(chunk + 40));
+    Round(c, d, e, f, g, h, a, b, 0x923f82a4af194f9bull,  w6 = ReadBE64(chunk + 48));
+    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5da6d8118ull,  w7 = ReadBE64(chunk + 56));
+    Round(a, b, c, d, e, f, g, h, 0xd807aa98a3030242ull,  w8 = ReadBE64(chunk + 64));
+    Round(h, a, b, c, d, e, f, g, 0x12835b0145706fbeull,  w9 = ReadBE64(chunk + 72));
+    Round(g, h, a, b, c, d, e, f, 0x243185be4ee4b28cull, w10 = ReadBE64(chunk + 80));
+    Round(f, g, h, a, b, c, d, e, 0x550c7dc3d5ffb4e2ull, w11 = ReadBE64(chunk + 88));
+    Round(e, f, g, h, a, b, c, d, 0x72be5d74f27b896full, w12 = ReadBE64(chunk + 96));
+    Round(d, e, f, g, h, a, b, c, 0x80deb1fe3b1696b1ull, w13 = ReadBE64(chunk + 104));
+    Round(c, d, e, f, g, h, a, b, 0x9bdc06a725c71235ull, w14 = ReadBE64(chunk + 112));
+    Round(b, c, d, e, f, g, h, a, 0xc19bf174cf692694ull, w15 = ReadBE64(chunk + 120));
+
+    Round(a, b, c, d, e, f, g, h, 0xe49b69c19ef14ad2ull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0xefbe4786384f25e3ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x0fc19dc68b8cd5b5ull,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x240ca1cc77ac9c65ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x2de92c6f592b0275ull,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x4a7484aa6ea6e483ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dcbd41fbd4ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x76f988da831153b5ull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0x983e5152ee66dfabull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0xa831c66d2db43210ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xb00327c898fb213full, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xbf597fc7beef0ee4ull, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd5a79147930aa725ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x06ca6351e003826full, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x142929670a0e6e70ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x27b70a8546d22ffcull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0x2e1b21385c26c926ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc5ac42aedull,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x53380d139d95b3dfull,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x650a73548baf63deull,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x766a0abb3c77b2a8ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x81c2c92e47edaee6ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x92722c851482353bull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a14cf10364ull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0xa81a664bbc423001ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xc24b8b70d0f89791ull, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xc76c51a30654be30ull, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd69906245565a910ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xf40e35855771202aull, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x19a4c116b8d2d0c8ull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0x1e376c085141ab53ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0x2748774cdf8eeb99ull,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5e19b48a8ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x391c0cb3c5c95a63ull,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4ae3418acbull,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f7763e373ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x682e6ff3d6b2b8a3ull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0x748f82ee5defb2fcull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0x78a5636f43172f60ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x84c87814a1f0ab72ull, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x8cc702081a6439ecull, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x90befffa23631e28ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0xc67178f2e372532bull, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    Round(a, b, c, d, e, f, g, h, 0xca273eceea26619cull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
+    Round(h, a, b, c, d, e, f, g, 0xd186b8c721c0c207ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
+    Round(g, h, a, b, c, d, e, f, 0xeada7dd6cde0eb1eull,  w2 += sigma1( w0) + w11 + sigma0( w3));
+    Round(f, g, h, a, b, c, d, e, 0xf57d4f7fee6ed178ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
+    Round(e, f, g, h, a, b, c, d, 0x06f067aa72176fbaull,  w4 += sigma1( w2) + w13 + sigma0( w5));
+    Round(d, e, f, g, h, a, b, c, 0x0a637dc5a2c898a6ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
+    Round(c, d, e, f, g, h, a, b, 0x113f9804bef90daeull,  w6 += sigma1( w4) + w15 + sigma0( w7));
+    Round(b, c, d, e, f, g, h, a, 0x1b710b35131c471bull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
+    Round(a, b, c, d, e, f, g, h, 0x28db77f523047d84ull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
+    Round(h, a, b, c, d, e, f, g, 0x32caab7b40c72493ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x3c9ebe0a15c9bebcull, w10 += sigma1( w8) +  w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1( w9) +  w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) +  w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 += sigma1(w12) +  w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
+
+    s[0] += a;
+    s[1] += b;
+    s[2] += c;
+    s[3] += d;
+    s[4] += e;
+    s[5] += f;
+    s[6] += g;
+    s[7] += h;
+}
+
+}  // namespace sha512
+
+}  // namespace
+
+
+////// SHA-256
+
+CSHA256::CSHA256() : bytes(0) {
+    sha256::Initialize(s);
+}
+
+CSHA256& CSHA256::Write(const unsigned char *data, size_t len) {
+    const unsigned char *end = data + len;
+    size_t bufsize = bytes % 64;
+    if (bufsize && bufsize + len >= 64) {
+        // Fill the buffer, and process it.
+        memcpy(buf + bufsize, data, 64 - bufsize);
+        bytes += 64 - bufsize;
+        data += 64 - bufsize;
+        sha256::Transform(s, buf);
+        bufsize = 0;
+    }
+    while (end >= data + 64) {
+        // Process full chunks directly from the source.
+        sha256::Transform(s, data);
+        bytes += 64;
+        data += 64;
+    }
+    if (end > data) {
+        // Fill the buffer with what remains.
+        memcpy(buf + bufsize, data, end - data);
+        bytes += end - data;
+    }
+    return *this;
+}
+
+void CSHA256::Finalize(unsigned char *hash) {
+    static const unsigned char pad[64] = {0x80};
+    unsigned char sizedesc[8];
+    WriteBE64(sizedesc, bytes << 3);
+    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
+    Write(sizedesc, 8);
+    WriteBE32(hash, s[0]);
+    WriteBE32(hash+4, s[1]);
+    WriteBE32(hash+8, s[2]);
+    WriteBE32(hash+12, s[3]);
+    WriteBE32(hash+16, s[4]);
+    WriteBE32(hash+20, s[5]);
+    WriteBE32(hash+24, s[6]);
+    WriteBE32(hash+28, s[7]);
+}
+
+CSHA256& CSHA256::Reset() {
+    bytes = 0;
+    sha256::Initialize(s);
+    return *this;
+}
+
+////// SHA-512
+
+CSHA512::CSHA512() : bytes(0) {
+    sha512::Initialize(s);
+}
+
+CSHA512& CSHA512::Write(const unsigned char *data, size_t len) {
+    const unsigned char *end = data + len;
+    size_t bufsize = bytes % 128;
+    if (bufsize && bufsize + len >= 128) {
+        // Fill the buffer, and process it.
+        memcpy(buf + bufsize, data, 128 - bufsize);
+        bytes += 128 - bufsize;
+        data += 128 - bufsize;
+        sha512::Transform(s, buf);
+        bufsize = 0;
+    }
+    while (end >= data + 128) {
+        // Process full chunks directly from the source.
+        sha512::Transform(s, data);
+        data += 128;
+        bytes += 128;
+    }
+    if (end > data) {
+        // Fill the buffer with what remains.
+        memcpy(buf + bufsize, data, end - data);
+        bytes += end - data;
+    }
+    return *this;
+}
+
+void CSHA512::Finalize(unsigned char *hash) {
+    static const unsigned char pad[128] = {0x80};
+    unsigned char sizedesc[16] = {0x00};
+    WriteBE64(sizedesc+8, bytes << 3);
+    Write(pad, 1 + ((239 - (bytes % 128)) % 128));
+    Write(sizedesc, 16);
+    WriteBE64(hash, s[0]);
+    WriteBE64(hash+8, s[1]);
+    WriteBE64(hash+16, s[2]);
+    WriteBE64(hash+24, s[3]);
+    WriteBE64(hash+32, s[4]);
+    WriteBE64(hash+40, s[5]);
+    WriteBE64(hash+48, s[6]);
+    WriteBE64(hash+56, s[7]);
+}
+
+CSHA512& CSHA512::Reset() {
+    bytes = 0;
+    sha512::Initialize(s);
+    return *this;
+}
+
+////// HMAC-SHA-512
+
+CHMAC_SHA512::CHMAC_SHA512(const unsigned char *key, size_t keylen) {
+    unsigned char rkey[128];
+    if (keylen <= 128) {
+        memcpy(rkey, key, keylen);
+        memset(rkey + keylen, 0, 128 - keylen);
+    } else {
+        CSHA512().Write(key, keylen).Finalize(rkey);
+        memset(rkey + 64, 0, 64);
+    }
+
+    for (int n=0; n<128; n++)
+        rkey[n] ^= 0x5c;
+    outer.Write(rkey, 128);
+
+    for (int n=0; n<128; n++)
+        rkey[n] ^= 0x5c ^ 0x36;
+    inner.Write(rkey, 128);
+}
+
+void CHMAC_SHA512::Finalize(unsigned char *hash) {
+    unsigned char temp[64];
+    inner.Finalize(temp);
+    outer.Write(temp, 64).Finalize(hash);
+}
diff --git a/src/sha2.h b/src/sha2.h
new file mode 100644
index 000000000000..001bfc647cde
--- /dev/null
+++ b/src/sha2.h
@@ -0,0 +1,54 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SHA2_H
+#define BITCOIN_SHA2_H
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for SHA-256. */
+class CSHA256 {
+private:
+    uint32_t s[8];
+    unsigned char buf[64];
+    size_t bytes;
+
+public:
+    CSHA256();
+    CSHA256& Write(const unsigned char *data, size_t len);
+    void Finalize(unsigned char *hash);
+    CSHA256& Reset();
+};
+
+/** A hasher class for SHA-512. */
+class CSHA512 {
+private:
+    uint64_t s[8];
+    unsigned char buf[128];
+    size_t bytes;
+
+public:
+    CSHA512();
+    CSHA512& Write(const unsigned char *data, size_t len);
+    void Finalize(unsigned char *hash);
+    CSHA512& Reset();
+};
+
+/** A hasher class for HMAC-SHA-512. */
+class CHMAC_SHA512 {
+private:
+    CSHA512 outer;
+    CSHA512 inner;
+
+public:
+    CHMAC_SHA512(const unsigned char *key, size_t keylen);
+    CHMAC_SHA512& Write(const unsigned char *data, size_t len) {
+        inner.Write(data, len);
+        return *this;
+    }
+    void Finalize(unsigned char *hash);
+};
+
+#endif
diff --git a/src/test/hmac_tests.cpp b/src/test/sha2_tests.cpp
similarity index 53%
rename from src/test/hmac_tests.cpp
rename to src/test/sha2_tests.cpp
index 780ce480cea5..516b942ad323 100644
--- a/src/test/hmac_tests.cpp
+++ b/src/test/sha2_tests.cpp
@@ -1,15 +1,49 @@
-// Copyright (c) 2013 The Bitcoin Core developers
+// Copyright (c) 2014 The Bitcoin Core developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "hash.h"
+#include "sha2.h"
 #include "util.h"
 
+#include <vector>
+
 #include <boost/test/unit_test.hpp>
 
-using namespace std;
+BOOST_AUTO_TEST_SUITE(sha2_tests)
+
+void SHA256TestVector(const std::string &in, const std::string &out) {
+    std::vector<unsigned char> hash;
+    hash.resize(32);
+    CSHA256().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
+    BOOST_CHECK_EQUAL(HexStr(hash), out);
+}
+
+void SHA512TestVector(const std::string &in, const std::string &out) {
+    std::vector<unsigned char> hash;
+    hash.resize(64);
+    CSHA512().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
+    BOOST_CHECK_EQUAL(HexStr(hash), out);
+}
 
-BOOST_AUTO_TEST_SUITE(hmac_tests)
+BOOST_AUTO_TEST_CASE(sha256_testvectors) {
+    SHA256TestVector("", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+    SHA256TestVector("abc", "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad");
+    SHA256TestVector("message digest", "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650");
+    SHA256TestVector("secure hash algorithm", "f30ceb2bb2829e79e4ca9753d35a8ecc00262d164cc077080295381cbd643f0d");
+    SHA256TestVector("SHA256 is considered to be safe", "6819d915c73f4d1e77e4e1b52d1fa0f9cf9beaead3939f15874bd988e2a23630");
+    SHA256TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1");
+    SHA256TestVector("For this sample, this 63-byte string will be used as input data", "f08a78cbbaee082b052ae0708f32fa1e50c5c421aa772ba5dbb406a2ea6be342");
+    SHA256TestVector("This is exactly 64 bytes long, not counting the terminating byte", "ab64eff7e88e2e46165e29f2bce41826bd4c7b3552f6b382a9e7d3af47c245f8");
+    SHA256TestVector("As Bitcoin relies on 80 byte header hashes, we want to have an example for that.", "7406e8de7d6e4fffc573daef05aefb8806e7790f55eab5576f31349743cca743");
+}
+
+BOOST_AUTO_TEST_CASE(sha512_testvectors) {
+    SHA512TestVector("abc", "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f");
+    SHA512TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445");
+    SHA512TestVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909");
+    SHA512TestVector(std::string(1000000, 'a'), "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b");
+    SHA512TestVector("", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+}
 
 typedef struct {
     const char *pszKey;
@@ -111,18 +145,12 @@ BOOST_AUTO_TEST_CASE(hmacsha512_testvectors)
 {
     for (unsigned int n=0; n<sizeof(vtest)/sizeof(vtest[0]); n++)
     {
-        vector<unsigned char> vchKey  = ParseHex(vtest[n].pszKey);
-        vector<unsigned char> vchData = ParseHex(vtest[n].pszData);
-        vector<unsigned char> vchMAC  = ParseHex(vtest[n].pszMAC);
+        std::vector<unsigned char> vchKey  = ParseHex(vtest[n].pszKey);
+        std::vector<unsigned char> vchData = ParseHex(vtest[n].pszData);
+        std::vector<unsigned char> vchMAC  = ParseHex(vtest[n].pszMAC);
         unsigned char vchTemp[64];
-
-        HMAC_SHA512_CTX ctx;
-        HMAC_SHA512_Init(&ctx, &vchKey[0], vchKey.size());
-        HMAC_SHA512_Update(&ctx, &vchData[0], vchData.size());
-        HMAC_SHA512_Final(&vchTemp[0], &ctx);
-
+        CHMAC_SHA512(&vchKey[0], vchKey.size()).Write(&vchData[0], vchData.size()).Finalize(&vchTemp[0]);
         BOOST_CHECK(memcmp(&vchTemp[0], &vchMAC[0], 64) == 0);
-
     }
 }
 

From 7b4737c87805b464cd47d01a9d814df5e41b8255 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 26 Apr 2014 19:26:34 +0200
Subject: [PATCH 0202/1819] Switch script.cpp and hash.cpp to use sha2.cpp
 instead of OpenSSL.

---
 src/hash.h     | 174 +++++++++++++++++++++++++++++--------------------
 src/miner.cpp  |   3 +
 src/script.cpp |  15 ++---
 3 files changed, 111 insertions(+), 81 deletions(-)

diff --git a/src/hash.h b/src/hash.h
index 718b627a78dc..9e7a67550fb6 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -6,6 +6,7 @@
 #ifndef BITCOIN_HASH_H
 #define BITCOIN_HASH_H
 
+#include "sha2.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "version.h"
@@ -13,48 +14,127 @@
 #include <vector>
 
 #include <openssl/ripemd.h>
-#include <openssl/sha.h>
 
+/** A hasher class for Bitcoin's 256-bit hash (double SHA-256). */
+class CHash256 {
+private:
+    CSHA256 sha;
+public:
+    void Finalize(unsigned char *hash) {
+        unsigned char buf[32];
+        sha.Finalize(buf);
+        sha.Reset().Write(buf, 32).Finalize(hash);
+    }
+
+    CHash256& Write(const unsigned char *data, size_t len) {
+        sha.Write(data, len);
+        return *this;
+    }
+
+    CHash256& Reset() {
+        sha.Reset();
+        return *this;
+    }
+};
+
+/** A hasher class for Bitcoin's 160-bit hash (SHA-256 + RIPEMD-160). */
+class CHash160 {
+private:
+    CSHA256 sha;
+public:
+    void Finalize(unsigned char *hash) {
+        unsigned char buf[32];
+        sha.Finalize(buf);
+        RIPEMD160(buf, 32, hash);
+    }
+
+    CHash160& Write(const unsigned char *data, size_t len) {
+        sha.Write(data, len);
+        return *this;
+    }
+
+    CHash160& Reset() {
+        sha.Reset();
+        return *this;
+    }
+};
+
+/** Compute the 256-bit hash of an object. */
 template<typename T1>
 inline uint256 Hash(const T1 pbegin, const T1 pend)
 {
-    static unsigned char pblank[1];
-    uint256 hash1;
-    SHA256((pbegin == pend ? pblank : (unsigned char*)&pbegin[0]), (pend - pbegin) * sizeof(pbegin[0]), (unsigned char*)&hash1);
-    uint256 hash2;
-    SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
-    return hash2;
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(pbegin == pend ? pblank : (const unsigned char*)&pbegin[0], (pend - pbegin) * sizeof(pbegin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 256-bit hash of the concatenation of two objects. */
+template<typename T1, typename T2>
+inline uint256 Hash(const T1 p1begin, const T1 p1end,
+                    const T2 p2begin, const T2 p2end) {
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
+              .Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 256-bit hash of the concatenation of three objects. */
+template<typename T1, typename T2, typename T3>
+inline uint256 Hash(const T1 p1begin, const T1 p1end,
+                    const T2 p2begin, const T2 p2end,
+                    const T3 p3begin, const T3 p3end) {
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
+              .Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
+              .Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 160-bit hash an object. */
+template<typename T1>
+inline uint160 Hash160(const T1 pbegin, const T1 pend)
+{
+    static unsigned char pblank[1] = {};
+    uint160 result;
+    CHash160().Write(pbegin == pend ? pblank : (const unsigned char*)&pbegin[0], (pend - pbegin) * sizeof(pbegin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 160-bit hash of a vector. */
+inline uint160 Hash160(const std::vector<unsigned char>& vch)
+{
+    return Hash160(vch.begin(), vch.end());
 }
 
+/** A writer stream (for serialization) that computes a 256-bit hash. */
 class CHashWriter
 {
 private:
-    SHA256_CTX ctx;
+    CHash256 ctx;
 
 public:
     int nType;
     int nVersion;
 
-    void Init() {
-        SHA256_Init(&ctx);
-    }
-
-    CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {
-        Init();
-    }
+    CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {}
 
     CHashWriter& write(const char *pch, size_t size) {
-        SHA256_Update(&ctx, pch, size);
+        ctx.Write((const unsigned char*)pch, size);
         return (*this);
     }
 
     // invalidates the object
     uint256 GetHash() {
-        uint256 hash1;
-        SHA256_Final((unsigned char*)&hash1, &ctx);
-        uint256 hash2;
-        SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
-        return hash2;
+        uint256 result;
+        ctx.Finalize((unsigned char*)&result);
+        return result;
     }
 
     template<typename T>
@@ -65,41 +145,7 @@ class CHashWriter
     }
 };
 
-
-template<typename T1, typename T2>
-inline uint256 Hash(const T1 p1begin, const T1 p1end,
-                    const T2 p2begin, const T2 p2end)
-{
-    static unsigned char pblank[1];
-    uint256 hash1;
-    SHA256_CTX ctx;
-    SHA256_Init(&ctx);
-    SHA256_Update(&ctx, (p1begin == p1end ? pblank : (unsigned char*)&p1begin[0]), (p1end - p1begin) * sizeof(p1begin[0]));
-    SHA256_Update(&ctx, (p2begin == p2end ? pblank : (unsigned char*)&p2begin[0]), (p2end - p2begin) * sizeof(p2begin[0]));
-    SHA256_Final((unsigned char*)&hash1, &ctx);
-    uint256 hash2;
-    SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
-    return hash2;
-}
-
-template<typename T1, typename T2, typename T3>
-inline uint256 Hash(const T1 p1begin, const T1 p1end,
-                    const T2 p2begin, const T2 p2end,
-                    const T3 p3begin, const T3 p3end)
-{
-    static unsigned char pblank[1];
-    uint256 hash1;
-    SHA256_CTX ctx;
-    SHA256_Init(&ctx);
-    SHA256_Update(&ctx, (p1begin == p1end ? pblank : (unsigned char*)&p1begin[0]), (p1end - p1begin) * sizeof(p1begin[0]));
-    SHA256_Update(&ctx, (p2begin == p2end ? pblank : (unsigned char*)&p2begin[0]), (p2end - p2begin) * sizeof(p2begin[0]));
-    SHA256_Update(&ctx, (p3begin == p3end ? pblank : (unsigned char*)&p3begin[0]), (p3end - p3begin) * sizeof(p3begin[0]));
-    SHA256_Final((unsigned char*)&hash1, &ctx);
-    uint256 hash2;
-    SHA256((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
-    return hash2;
-}
-
+/** Compute the 256-bit hash of an object's serialization. */
 template<typename T>
 uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
 {
@@ -108,22 +154,6 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL
     return ss.GetHash();
 }
 
-template<typename T1>
-inline uint160 Hash160(const T1 pbegin, const T1 pend)
-{
-    static unsigned char pblank[1];
-    uint256 hash1;
-    SHA256((pbegin == pend ? pblank : (unsigned char*)&pbegin[0]), (pend - pbegin) * sizeof(pbegin[0]), (unsigned char*)&hash1);
-    uint160 hash2;
-    RIPEMD160((unsigned char*)&hash1, sizeof(hash1), (unsigned char*)&hash2);
-    return hash2;
-}
-
-inline uint160 Hash160(const std::vector<unsigned char>& vch)
-{
-    return Hash160(vch.begin(), vch.end());
-}
-
 unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
 
 #endif
diff --git a/src/miner.cpp b/src/miner.cpp
index 87779efbbdd4..c48c9f0521ba 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -12,7 +12,10 @@
 #include "wallet.h"
 #endif
 
+#include <openssl/sha.h>
+
 using namespace std;
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // BitcoinMiner
diff --git a/src/script.cpp b/src/script.cpp
index 11cdfef950ad..f20c0bcca3d8 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -9,10 +9,13 @@
 #include "hash.h"
 #include "key.h"
 #include "keystore.h"
+#include "sha2.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
 
+#include <openssl/sha.h>
+
 #include <boost/foreach.hpp>
 #include <boost/tuple/tuple.hpp>
 #include <boost/tuple/tuple_comparison.hpp>
@@ -805,17 +808,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     else if (opcode == OP_SHA1)
                         SHA1(&vch[0], vch.size(), &vchHash[0]);
                     else if (opcode == OP_SHA256)
-                        SHA256(&vch[0], vch.size(), &vchHash[0]);
+                        CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_HASH160)
-                    {
-                        uint160 hash160 = Hash160(vch);
-                        memcpy(&vchHash[0], &hash160, sizeof(hash160));
-                    }
+                        CHash160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_HASH256)
-                    {
-                        uint256 hash = Hash(vch.begin(), vch.end());
-                        memcpy(&vchHash[0], &hash, sizeof(hash));
-                    }
+                        CHash256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     popstack(stack);
                     stack.push_back(vchHash);
                 }

From cf0c47b2698a3e23654d9fd24f6b2ef9689bde3d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 28 Apr 2014 12:52:32 +0200
Subject: [PATCH 0203/1819] Remove getwork() RPC call

---
 src/init.cpp      |   3 -
 src/rpcmining.cpp | 159 ----------------------------------------------
 src/rpcserver.cpp |   3 +-
 src/rpcserver.h   |   1 -
 4 files changed, 1 insertion(+), 165 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 6eab273526cb..12d2d1bb4428 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -116,7 +116,6 @@ void Shutdown()
     RenameThread("bitcoin-shutoff");
     mempool.AddTransactionsUpdated(1);
     StopRPCThreads();
-    ShutdownRPCMining();
 #ifdef ENABLE_WALLET
     if (pwalletMain)
         bitdb.Flush(false);
@@ -1148,8 +1147,6 @@ bool AppInit2(boost::thread_group& threadGroup)
 #endif
 
     StartNode(threadGroup);
-    // InitRPCMining is needed here so getwork/getblocktemplate in the GUI debug console works properly.
-    InitRPCMining();
     if (fServer)
         StartRPCThreads();
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 57a51c0fde33..a1410f0e4139 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -24,36 +24,6 @@
 using namespace json_spirit;
 using namespace std;
 
-#ifdef ENABLE_WALLET
-// Key used by getwork miners.
-// Allocated in InitRPCMining, free'd in ShutdownRPCMining
-static CReserveKey* pMiningKey = NULL;
-
-void InitRPCMining()
-{
-    if (!pwalletMain)
-        return;
-
-    // getwork/getblocktemplate mining rewards paid here:
-    pMiningKey = new CReserveKey(pwalletMain);
-}
-
-void ShutdownRPCMining()
-{
-    if (!pMiningKey)
-        return;
-
-    delete pMiningKey; pMiningKey = NULL;
-}
-#else
-void InitRPCMining()
-{
-}
-void ShutdownRPCMining()
-{
-}
-#endif
-
 // Return average network hashes per second based on the last 'lookup' blocks,
 // or from the last difficulty change if 'lookup' is nonpositive.
 // If 'height' is nonnegative, compute the estimate at the time when a given block was found.
@@ -131,9 +101,6 @@ Value getgenerate(const Array& params, bool fHelp)
             + HelpExampleRpc("getgenerate", "")
         );
 
-    if (!pMiningKey)
-        return false;
-
     return GetBoolArg("-gen", false);
 }
 
@@ -279,132 +246,6 @@ Value getmininginfo(const Array& params, bool fHelp)
 }
 
 
-#ifdef ENABLE_WALLET
-Value getwork(const Array& params, bool fHelp)
-{
-    if (fHelp || params.size() > 1)
-        throw runtime_error(
-            "getwork ( \"data\" )\n"
-            "\nIf 'data' is not specified, it returns the formatted hash data to work on.\n"
-            "If 'data' is specified, tries to solve the block and returns true if it was successful.\n"
-            "\nArguments:\n"
-            "1. \"data\"       (string, optional) The hex encoded data to solve\n"
-            "\nResult (when 'data' is not specified):\n"
-            "{\n"
-            "  \"midstate\" : \"xxxx\",   (string) The precomputed hash state after hashing the first half of the data (DEPRECATED)\n" // deprecated
-            "  \"data\" : \"xxxxx\",      (string) The block data\n"
-            "  \"hash1\" : \"xxxxx\",     (string) The formatted hash buffer for second hash (DEPRECATED)\n" // deprecated
-            "  \"target\" : \"xxxx\"      (string) The little endian hash target\n"
-            "}\n"
-            "\nResult (when 'data' is specified):\n"
-            "true|false       (boolean) If solving the block specified in the 'data' was successfull\n"
-            "\nExamples:\n"
-            + HelpExampleCli("getwork", "")
-            + HelpExampleRpc("getwork", "")
-        );
-
-    if (vNodes.empty())
-        throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Bitcoin is not connected!");
-
-    if (IsInitialBlockDownload())
-        throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Bitcoin is downloading blocks...");
-
-    typedef map<uint256, pair<CBlock*, CScript> > mapNewBlock_t;
-    static mapNewBlock_t mapNewBlock;    // FIXME: thread safety
-    static vector<CBlockTemplate*> vNewBlockTemplate;
-
-    if (params.size() == 0)
-    {
-        // Update block
-        static unsigned int nTransactionsUpdatedLast;
-        static CBlockIndex* pindexPrev;
-        static int64_t nStart;
-        static CBlockTemplate* pblocktemplate;
-        if (pindexPrev != chainActive.Tip() ||
-            (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60))
-        {
-            if (pindexPrev != chainActive.Tip())
-            {
-                // Deallocate old blocks since they're obsolete now
-                mapNewBlock.clear();
-                BOOST_FOREACH(CBlockTemplate* pblocktemplate, vNewBlockTemplate)
-                    delete pblocktemplate;
-                vNewBlockTemplate.clear();
-            }
-
-            // Clear pindexPrev so future getworks make a new block, despite any failures from here on
-            pindexPrev = NULL;
-
-            // Store the pindexBest used before CreateNewBlock, to avoid races
-            nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
-            CBlockIndex* pindexPrevNew = chainActive.Tip();
-            nStart = GetTime();
-
-            // Create new block
-            pblocktemplate = CreateNewBlockWithKey(*pMiningKey);
-            if (!pblocktemplate)
-                throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory");
-            vNewBlockTemplate.push_back(pblocktemplate);
-
-            // Need to update only after we know CreateNewBlock succeeded
-            pindexPrev = pindexPrevNew;
-        }
-        CBlock* pblock = &pblocktemplate->block; // pointer for convenience
-
-        // Update nTime
-        UpdateTime(*pblock, pindexPrev);
-        pblock->nNonce = 0;
-
-        // Update nExtraNonce
-        static unsigned int nExtraNonce = 0;
-        IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
-
-        // Save
-        mapNewBlock[pblock->hashMerkleRoot] = make_pair(pblock, pblock->vtx[0].vin[0].scriptSig);
-
-        // Pre-build hash buffers
-        char pmidstate[32];
-        char pdata[128];
-        char phash1[64];
-        FormatHashBuffers(pblock, pmidstate, pdata, phash1);
-
-        uint256 hashTarget = uint256().SetCompact(pblock->nBits);
-
-        Object result;
-        result.push_back(Pair("midstate", HexStr(BEGIN(pmidstate), END(pmidstate)))); // deprecated
-        result.push_back(Pair("data",     HexStr(BEGIN(pdata), END(pdata))));
-        result.push_back(Pair("hash1",    HexStr(BEGIN(phash1), END(phash1)))); // deprecated
-        result.push_back(Pair("target",   HexStr(BEGIN(hashTarget), END(hashTarget))));
-        return result;
-    }
-    else
-    {
-        // Parse parameters
-        vector<unsigned char> vchData = ParseHex(params[0].get_str());
-        if (vchData.size() != 128)
-            throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
-        CBlock* pdata = (CBlock*)&vchData[0];
-
-        // Byte reverse
-        for (int i = 0; i < 128/4; i++)
-            ((unsigned int*)pdata)[i] = ByteReverse(((unsigned int*)pdata)[i]);
-
-        // Get saved block
-        if (!mapNewBlock.count(pdata->hashMerkleRoot))
-            return false;
-        CBlock* pblock = mapNewBlock[pdata->hashMerkleRoot].first;
-
-        pblock->nTime = pdata->nTime;
-        pblock->nNonce = pdata->nNonce;
-        pblock->vtx[0].vin[0].scriptSig = mapNewBlock[pdata->hashMerkleRoot].second;
-        pblock->hashMerkleRoot = pblock->BuildMerkleTree();
-
-        assert(pwalletMain != NULL);
-        return CheckWork(pblock, *pwalletMain, *pMiningKey);
-    }
-}
-#endif
-
 Value getblocktemplate(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() > 1)
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 56b5f2de0bf3..93da81e42959 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -315,7 +315,6 @@ static const CRPCCommand vRPCCommands[] =
     /* Wallet-enabled mining */
     { "getgenerate",            &getgenerate,            true,      false,      false },
     { "gethashespersec",        &gethashespersec,        true,      false,      false },
-    { "getwork",                &getwork,                true,      false,      true  },
     { "setgenerate",            &setgenerate,            true,      true,       false },
 #endif // ENABLE_WALLET
 };
@@ -772,7 +771,7 @@ void JSONRequest::parse(const Value& valRequest)
     if (valMethod.type() != str_type)
         throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string");
     strMethod = valMethod.get_str();
-    if (strMethod != "getwork" && strMethod != "getblocktemplate")
+    if (strMethod != "getblocktemplate")
         LogPrint("rpc", "ThreadRPCServer method=%s\n", strMethod);
 
     // Parse params
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 73e8b9426c4e..527154238505 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -130,7 +130,6 @@ extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHe
 extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value gethashespersec(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp);
-extern json_spirit::Value getwork(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value estimatefee(const json_spirit::Array& params, bool fHelp);

From 85aab2a08824a83a535e6dfee4c150b25ebaf9de Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 27 Apr 2014 23:34:02 +0200
Subject: [PATCH 0204/1819] Switch miner.cpp to use sha2 instead of OpenSSL.

---
 src/miner.cpp            | 162 +++++++--------------------------------
 src/miner.h              |   4 -
 src/test/miner_tests.cpp |  28 -------
 3 files changed, 29 insertions(+), 165 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index c48c9f0521ba..7efca7cfff85 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -6,14 +6,13 @@
 #include "miner.h"
 
 #include "core.h"
+#include "hash.h"
 #include "main.h"
 #include "net.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
 
-#include <openssl/sha.h>
-
 using namespace std;
 
 //////////////////////////////////////////////////////////////////////////////
@@ -21,42 +20,6 @@ using namespace std;
 // BitcoinMiner
 //
 
-int static FormatHashBlocks(void* pbuffer, unsigned int len)
-{
-    unsigned char* pdata = (unsigned char*)pbuffer;
-    unsigned int blocks = 1 + ((len + 8) / 64);
-    unsigned char* pend = pdata + 64 * blocks;
-    memset(pdata + len, 0, 64 * blocks - len);
-    pdata[len] = 0x80;
-    unsigned int bits = len * 8;
-    pend[-1] = (bits >> 0) & 0xff;
-    pend[-2] = (bits >> 8) & 0xff;
-    pend[-3] = (bits >> 16) & 0xff;
-    pend[-4] = (bits >> 24) & 0xff;
-    return blocks;
-}
-
-static const unsigned int pSHA256InitState[8] =
-{0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
-
-void SHA256Transform(void* pstate, void* pinput, const void* pinit)
-{
-    SHA256_CTX ctx;
-    unsigned char data[64];
-
-    SHA256_Init(&ctx);
-
-    for (int i = 0; i < 16; i++)
-        ((uint32_t*)data)[i] = ByteReverse(((uint32_t*)pinput)[i]);
-
-    for (int i = 0; i < 8; i++)
-        ctx.h[i] = ((uint32_t*)pinit)[i];
-
-    SHA256_Update(&ctx, data, sizeof(data));
-    for (int i = 0; i < 8; i++)
-        ((uint32_t*)pstate)[i] = ctx.h[i];
-}
-
 //
 // Unconfirmed transactions in the memory pool often depend on other
 // transactions in the memory pool. When we select transactions from the
@@ -372,51 +335,6 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
 }
 
 
-void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1)
-{
-    //
-    // Pre-build hash buffers
-    //
-    struct
-    {
-        struct unnamed2
-        {
-            int nVersion;
-            uint256 hashPrevBlock;
-            uint256 hashMerkleRoot;
-            unsigned int nTime;
-            unsigned int nBits;
-            unsigned int nNonce;
-        }
-        block;
-        unsigned char pchPadding0[64];
-        uint256 hash1;
-        unsigned char pchPadding1[64];
-    }
-    tmp;
-    memset(&tmp, 0, sizeof(tmp));
-
-    tmp.block.nVersion       = pblock->nVersion;
-    tmp.block.hashPrevBlock  = pblock->hashPrevBlock;
-    tmp.block.hashMerkleRoot = pblock->hashMerkleRoot;
-    tmp.block.nTime          = pblock->nTime;
-    tmp.block.nBits          = pblock->nBits;
-    tmp.block.nNonce         = pblock->nNonce;
-
-    FormatHashBlocks(&tmp.block, sizeof(tmp.block));
-    FormatHashBlocks(&tmp.hash1, sizeof(tmp.hash1));
-
-    // Byte swap all the input buffer
-    for (unsigned int i = 0; i < sizeof(tmp)/4; i++)
-        ((unsigned int*)&tmp)[i] = ByteReverse(((unsigned int*)&tmp)[i]);
-
-    // Precalc the first half of the first hash, which stays constant
-    SHA256Transform(pmidstate, &tmp.block, pSHA256InitState);
-
-    memcpy(pdata, &tmp.block, 128);
-    memcpy(phash1, &tmp.hash1, 64);
-}
-
 #ifdef ENABLE_WALLET
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -427,34 +345,33 @@ int64_t nHPSTimerStart = 0;
 
 //
 // ScanHash scans nonces looking for a hash with at least some zero bits.
-// It operates on big endian data.  Caller does the byte reversing.
-// All input buffers are 16-byte aligned.  nNonce is usually preserved
-// between calls, but periodically or if nNonce is 0xffff0000 or above,
-// the block is rebuilt and nNonce starts over at zero.
+// The nonce is usually preserved between calls, but periodically or if the
+// nonce is 0xffff0000 or above, the block is rebuilt and nNonce starts over at
+// zero.
 //
-unsigned int static ScanHash_CryptoPP(char* pmidstate, char* pdata, char* phash1, char* phash, unsigned int& nHashesDone)
-{
-    unsigned int& nNonce = *(unsigned int*)(pdata + 12);
-    for (;;)
-    {
-        // Crypto++ SHA256
-        // Hash pdata using pmidstate as the starting state into
-        // pre-formatted buffer phash1, then hash phash1 into phash
+bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phash) {
+    // Write the first 76 bytes of the block header to a double-SHA256 state.
+    CHash256 hasher;
+    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+    ss << *pblock;
+    assert(ss.size() == 80);
+    hasher.Write((unsigned char*)&ss[0], 76);
+
+    for (;;) {
         nNonce++;
-        SHA256Transform(phash1, pdata, pmidstate);
-        SHA256Transform(phash, phash1, pSHA256InitState);
+
+        // Write the last 4 bytes of the block header (the nonce) to a copy of
+        // the double-SHA256 state, and compute the result.
+        CHash256(hasher).Write((unsigned char*)&nNonce, 4).Finalize((unsigned char*)phash);
 
         // Return the nonce if the hash has at least some zero bits,
         // caller will check if it has enough to reach the target
-        if (((unsigned short*)phash)[14] == 0)
-            return nNonce;
+        if (((uint16_t*)phash)[15] == 0)
+            return true;
 
         // If nothing found after trying for a while, return -1
         if ((nNonce & 0xffff) == 0)
-        {
-            nHashesDone = 0xffff+1;
-            return (unsigned int) -1;
-        }
+            return false;
         if ((nNonce & 0xfff) == 0)
             boost::this_thread::interruption_point();
     }
@@ -541,46 +458,27 @@ void static BitcoinMiner(CWallet *pwallet)
         LogPrintf("Running BitcoinMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
                ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
 
-        //
-        // Pre-build hash buffers
-        //
-        char pmidstatebuf[32+16]; char* pmidstate = alignup<16>(pmidstatebuf);
-        char pdatabuf[128+16];    char* pdata     = alignup<16>(pdatabuf);
-        char phash1buf[64+16];    char* phash1    = alignup<16>(phash1buf);
-
-        FormatHashBuffers(pblock, pmidstate, pdata, phash1);
-
-        unsigned int& nBlockTime = *(unsigned int*)(pdata + 64 + 4);
-        unsigned int& nBlockBits = *(unsigned int*)(pdata + 64 + 8);
-        unsigned int& nBlockNonce = *(unsigned int*)(pdata + 64 + 12);
-
-
         //
         // Search
         //
         int64_t nStart = GetTime();
         uint256 hashTarget = uint256().SetCompact(pblock->nBits);
-        uint256 hashbuf[2];
-        uint256& hash = *alignup<16>(hashbuf);
+        uint256 hash;
+        uint32_t nNonce = 0;
+        uint32_t nOldNonce = 0;
         while (true)
         {
-            unsigned int nHashesDone = 0;
-            unsigned int nNonceFound;
-
-            // Crypto++ SHA256
-            nNonceFound = ScanHash_CryptoPP(pmidstate, pdata + 64, phash1,
-                                            (char*)&hash, nHashesDone);
+            bool fFound = ScanHash(pblock, nNonce, &hash);
+            uint32_t nHashesDone = nNonce - nOldNonce;
+            nOldNonce = nNonce;
 
             // Check if something found
-            if (nNonceFound != (unsigned int) -1)
+            if (fFound)
             {
-                for (unsigned int i = 0; i < sizeof(hash)/4; i++)
-                    ((unsigned int*)&hash)[i] = ByteReverse(((unsigned int*)&hash)[i]);
-
                 if (hash <= hashTarget)
                 {
                     // Found a solution
-                    pblock->nNonce = ByteReverse(nNonceFound);
+                    pblock->nNonce = nNonce;
                     assert(hash == pblock->GetHash());
 
                     SetThreadPriority(THREAD_PRIORITY_NORMAL);
@@ -629,7 +527,7 @@ void static BitcoinMiner(CWallet *pwallet)
             // Regtest mode doesn't require peers
             if (vNodes.empty() && Params().MiningRequiresPeers())
                 break;
-            if (nBlockNonce >= 0xffff0000)
+            if (nNonce >= 0xffff0000)
                 break;
             if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60)
                 break;
@@ -638,11 +536,9 @@ void static BitcoinMiner(CWallet *pwallet)
 
             // Update nTime every few seconds
             UpdateTime(*pblock, pindexPrev);
-            nBlockTime = ByteReverse(pblock->nTime);
             if (Params().AllowMinDifficultyBlocks())
             {
                 // Changing pblock->nTime can change work required on testnet:
-                nBlockBits = ByteReverse(pblock->nBits);
                 hashTarget.SetCompact(pblock->nBits);
             }
         }
diff --git a/src/miner.h b/src/miner.h
index dcd61d8fd9ea..1fa499dc5b9f 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -23,12 +23,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn);
 CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
 /** Modify the extranonce in a block */
 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
-/** Do mining precalculation */
-void FormatHashBuffers(CBlock* pblock, char* pmidstate, char* pdata, char* phash1);
 /** Check mined block */
 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
-/** Base sha256 mining transform */
-void SHA256Transform(void* pstate, void* pinput, const void* pinit);
 
 extern double dHashesPerSec;
 extern int64_t nHPSTimerStart;
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index b72ba0293fd9..bff6de41a326 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -9,8 +9,6 @@
 
 #include <boost/test/unit_test.hpp>
 
-extern void SHA256Transform(void* pstate, void* pinput, const void* pinit);
-
 BOOST_AUTO_TEST_SUITE(miner_tests)
 
 static
@@ -259,30 +257,4 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
 
 }
 
-BOOST_AUTO_TEST_CASE(sha256transform_equality)
-{
-    unsigned int pSHA256InitState[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19};
-
-
-    // unsigned char pstate[32];
-    unsigned char pinput[64];
-
-    int i;
-
-    for (i = 0; i < 32; i++) {
-        pinput[i] = i;
-        pinput[i+32] = 0;
-    }
-
-    uint256 hash;
-
-    SHA256Transform(&hash, pinput, pSHA256InitState);
-
-    BOOST_TEST_MESSAGE(hash.GetHex());
-
-    uint256 hash_reference("0x2df5e1c65ef9f8cde240d23cae2ec036d31a15ec64bc68f64be242b1da6631f3");
-
-    BOOST_CHECK(hash == hash_reference);
-}
-
 BOOST_AUTO_TEST_SUITE_END()

From 1cc344ce42d8dddd6356c89ef3ceb58418676816 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 28 Apr 2014 03:09:13 +0200
Subject: [PATCH 0205/1819] Add built-in SHA-1 implementation.

---
 src/Makefile.am           |   2 +
 src/Makefile.test.include |   1 +
 src/script.cpp            |   5 +-
 src/sha1.cpp              | 205 ++++++++++++++++++++++++++++++++++++++
 src/sha1.h                |  25 +++++
 src/test/sha1_tests.cpp   |  27 +++++
 6 files changed, 262 insertions(+), 3 deletions(-)
 create mode 100644 src/sha1.cpp
 create mode 100644 src/sha1.h
 create mode 100644 src/test/sha1_tests.cpp

diff --git a/src/Makefile.am b/src/Makefile.am
index 4e94d47066bb..67b069bde146 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -76,6 +76,7 @@ BITCOIN_CORE_H = \
   script.h \
   serialize.h \
   sha2.h \
+  sha1.h \
   sync.h \
   threadsafety.h \
   tinyformat.h \
@@ -153,6 +154,7 @@ libbitcoin_common_a_SOURCES = \
   protocol.cpp \
   rpcprotocol.cpp \
   script.cpp \
+  sha1.cpp \
   sha2.cpp \
   sync.cpp \
   util.cpp \
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 93723309afd5..7cf441bd6cb2 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -45,6 +45,7 @@ BITCOIN_TESTS =\
   test/script_P2SH_tests.cpp \
   test/script_tests.cpp \
   test/serialize_tests.cpp \
+  test/sha1_tests.cpp \
   test/sha2_tests.cpp \
   test/sigopcount_tests.cpp \
   test/test_bitcoin.cpp \
diff --git a/src/script.cpp b/src/script.cpp
index f20c0bcca3d8..facf3044d6be 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -9,13 +9,12 @@
 #include "hash.h"
 #include "key.h"
 #include "keystore.h"
+#include "sha1.h"
 #include "sha2.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
 
-#include <openssl/sha.h>
-
 #include <boost/foreach.hpp>
 #include <boost/tuple/tuple.hpp>
 #include <boost/tuple/tuple_comparison.hpp>
@@ -806,7 +805,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     if (opcode == OP_RIPEMD160)
                         RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
                     else if (opcode == OP_SHA1)
-                        SHA1(&vch[0], vch.size(), &vchHash[0]);
+                        CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_SHA256)
                         CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_HASH160)
diff --git a/src/sha1.cpp b/src/sha1.cpp
new file mode 100644
index 000000000000..0a7007754483
--- /dev/null
+++ b/src/sha1.cpp
@@ -0,0 +1,205 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "sha1.h"
+
+#include <string.h>
+
+// Internal implementation code.
+namespace {
+
+/** Read 4 bytes, and interpret them as a 32-bit unsigned big-endian integer. */
+uint32_t inline ReadBE32(const unsigned char *data) {
+    return ((uint32_t)data[0] << 24 | (uint32_t)data[1] << 16 | (uint32_t)data[2] << 8 | (uint32_t)data[3]);
+}
+
+/** Write a 32-bit unsigned big-endian integer. */
+void inline WriteBE32(unsigned char *data, uint32_t x) {
+    data[0] = x >> 24;
+    data[1] = x >> 16;
+    data[2] = x >> 8;
+    data[3] = x;
+}
+
+/// Internal SHA-1 implementation.
+namespace sha1 {
+
+/** One round of SHA-1. */
+void inline Round(uint32_t a, uint32_t &b, uint32_t c, uint32_t d, uint32_t &e,
+                  uint32_t f, uint32_t k, uint32_t w) {
+    e += ((a << 5) | (a >> 27)) + f + k + w;
+    b = (b << 30) | (b >> 2);
+}
+
+uint32_t inline f1(uint32_t b, uint32_t c, uint32_t d) { return d ^ (b & (c ^ d)); }
+uint32_t inline f2(uint32_t b, uint32_t c, uint32_t d) { return b ^ c ^ d; }
+uint32_t inline f3(uint32_t b, uint32_t c, uint32_t d) { return (b & c) | (d & (b | c)); }
+
+uint32_t inline left(uint32_t x) { return (x << 1) | (x >> 31); }
+
+/** Initialize SHA-1 state. */
+void inline Initialize(uint32_t *s) {
+    s[0] = 0x67452301ul;
+    s[1] = 0xEFCDAB89ul;
+    s[2] = 0x98BADCFEul;
+    s[3] = 0x10325476ul;
+    s[4] = 0xC3D2E1F0ul;
+}
+
+const uint32_t k1 = 0x5A827999ul;
+const uint32_t k2 = 0x6ED9EBA1ul;
+const uint32_t k3 = 0x8F1BBCDCul;
+const uint32_t k4 = 0xCA62C1D6ul;
+
+/** Perform a SHA-1 transformation, processing a 64-byte chunk. */
+void Transform(uint32_t *s, const unsigned char *chunk) {
+    uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4];
+    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
+
+    Round(a, b, c, d, e, f1(b, c, d), k1, w0  = ReadBE32(chunk +  0));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w1  = ReadBE32(chunk +  4));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w2  = ReadBE32(chunk +  8));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w3  = ReadBE32(chunk + 12));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w4  = ReadBE32(chunk + 16));
+    Round(a, b, c, d, e, f1(b, c, d), k1, w5  = ReadBE32(chunk + 20));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w6  = ReadBE32(chunk + 24));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w7  = ReadBE32(chunk + 28));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w8  = ReadBE32(chunk + 32));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w9  = ReadBE32(chunk + 36));
+    Round(a, b, c, d, e, f1(b, c, d), k1, w10 = ReadBE32(chunk + 40));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w11 = ReadBE32(chunk + 44));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w12 = ReadBE32(chunk + 48));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w13 = ReadBE32(chunk + 52));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w14 = ReadBE32(chunk + 56));
+    Round(a, b, c, d, e, f1(b, c, d), k1, w15 = ReadBE32(chunk + 60));
+
+    Round(e, a, b, c, d, f1(a, b, c), k1, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w8  = left(w8  ^ w5  ^ w0  ^ w10));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w9  = left(w9  ^ w6  ^ w1  ^ w11));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w10 = left(w10 ^ w7  ^ w2  ^ w12));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w11 = left(w11 ^ w8  ^ w3  ^ w13));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w12 = left(w12 ^ w9  ^ w4  ^ w14));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w13 = left(w13 ^ w10 ^ w5  ^ w15));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
+
+    Round(d, e, a, b, c, f2(e, a, b), k2, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w8  = left(w8  ^ w5  ^ w0  ^ w10));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w9  = left(w9  ^ w6  ^ w1  ^ w11));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w10 = left(w10 ^ w7  ^ w2  ^ w12));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w11 = left(w11 ^ w8  ^ w3  ^ w13));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w12 = left(w12 ^ w9  ^ w4  ^ w14));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w13 = left(w13 ^ w10 ^ w5  ^ w15));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
+
+    Round(c, d, e, a, b, f3(d, e, a), k3, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w8  = left(w8  ^ w5  ^ w0  ^ w10));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w9  = left(w9  ^ w6  ^ w1  ^ w11));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w10 = left(w10 ^ w7  ^ w2  ^ w12));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w11 = left(w11 ^ w8  ^ w3  ^ w13));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w12 = left(w12 ^ w9  ^ w4  ^ w14));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w13 = left(w13 ^ w10 ^ w5  ^ w15));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
+
+    Round(b, c, d, e, a, f2(c, d, e), k4, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
+    Round(b, c, d, e, a, f2(c, d, e), k4, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w8  = left(w8  ^ w5  ^ w0  ^ w10));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w9  = left(w9  ^ w6  ^ w1  ^ w11));
+    Round(b, c, d, e, a, f2(c, d, e), k4, w10 = left(w10 ^ w7  ^ w2  ^ w12));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w11 = left(w11 ^ w8  ^ w3  ^ w13));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w12 = left(w12 ^ w9  ^ w4  ^ w14));
+    Round(d, e, a, b, c, f2(e, a, b), k4,       left(w13 ^ w10 ^ w5  ^ w15));
+    Round(c, d, e, a, b, f2(d, e, a), k4,       left(w14 ^ w11 ^ w6  ^ w0 ));
+    Round(b, c, d, e, a, f2(c, d, e), k4,       left(w15 ^ w12 ^ w7  ^ w1 ));
+
+    s[0] += a;
+    s[1] += b;
+    s[2] += c;
+    s[3] += d;
+    s[4] += e;
+}
+
+}  // namespace sha1
+
+}  // namespace
+
+////// SHA1
+
+CSHA1::CSHA1() : bytes(0) {
+    sha1::Initialize(s);
+}
+
+CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
+    const unsigned char *end = data + len;
+    size_t bufsize = bytes % 64;
+    if (bufsize && bufsize + len >= 64) {
+        // Fill the buffer, and process it.
+        memcpy(buf + bufsize, data, 64 - bufsize);
+        bytes += 64 - bufsize;
+        data += 64 - bufsize;
+        sha1::Transform(s, buf);
+        bufsize = 0;
+    }
+    while (end >= data + 64) {
+        // Process full chunks directly from the source.
+        sha1::Transform(s, data);
+        bytes += 64;
+        data += 64;
+    }
+    if (end > data) {
+        // Fill the buffer with what remains.
+        memcpy(buf + bufsize, data, end - data);
+        bytes += end - data;
+    }
+    return *this;
+}
+
+void CSHA1::Finalize(unsigned char *hash) {
+    static const unsigned char pad[64] = {0x80};
+    unsigned char sizedesc[8];
+    WriteBE32(sizedesc, bytes >> 29);
+    WriteBE32(sizedesc+4, bytes << 3);
+    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
+    Write(sizedesc, 8);
+    WriteBE32(hash, s[0]);
+    WriteBE32(hash+4, s[1]);
+    WriteBE32(hash+8, s[2]);
+    WriteBE32(hash+12, s[3]);
+    WriteBE32(hash+16, s[4]);
+}
+
+CSHA1& CSHA1::Reset() {
+    bytes = 0;
+    sha1::Initialize(s);
+    return *this;
+}
diff --git a/src/sha1.h b/src/sha1.h
new file mode 100644
index 000000000000..6efde78a5b78
--- /dev/null
+++ b/src/sha1.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SHA1_H
+#define BITCOIN_SHA1_H
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for SHA1. */
+class CSHA1 {
+private:
+    uint32_t s[5];
+    unsigned char buf[64];
+    size_t bytes;
+
+public:
+    CSHA1();
+    CSHA1& Write(const unsigned char *data, size_t len);
+    void Finalize(unsigned char *hash);
+    CSHA1& Reset();
+};
+
+#endif
diff --git a/src/test/sha1_tests.cpp b/src/test/sha1_tests.cpp
new file mode 100644
index 000000000000..bae17c5d4a4d
--- /dev/null
+++ b/src/test/sha1_tests.cpp
@@ -0,0 +1,27 @@
+// Copyright (c) 2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "sha1.h"
+#include "util.h"
+
+#include <vector>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_SUITE(sha1_tests)
+
+void SHA1TestVector(const std::string &in, const std::string &out) {
+    std::vector<unsigned char> hash;
+    hash.resize(20);
+    CSHA1().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
+    BOOST_CHECK_EQUAL(HexStr(hash), out);
+}
+
+BOOST_AUTO_TEST_CASE(sha1_testvectors) {
+    SHA1TestVector("abc", "a9993e364706816aba3e25717850c26c9cd0d89d");
+    SHA1TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983e441c3bd26ebaae4aa1f95129e5e54670f1");
+    SHA1TestVector(std::string(1000000, 'a'), "34aa973cd4c4daa4f61eeb2bdbad27316534016f");
+}
+
+BOOST_AUTO_TEST_SUITE_END()

From 13b5dfef64bbb77d583b2acc59e2b33f89645308 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 28 Apr 2014 12:20:15 +0200
Subject: [PATCH 0206/1819] Move crypto implementations to src/crypto/

---
 src/Makefile.am           | 8 ++++----
 src/{ => crypto}/sha1.cpp | 2 +-
 src/{ => crypto}/sha1.h   | 0
 src/{ => crypto}/sha2.cpp | 2 +-
 src/{ => crypto}/sha2.h   | 0
 src/hash.h                | 2 +-
 src/key.cpp               | 2 +-
 src/script.cpp            | 4 ++--
 src/test/sha1_tests.cpp   | 2 +-
 src/test/sha2_tests.cpp   | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)
 rename src/{ => crypto}/sha1.cpp (99%)
 rename src/{ => crypto}/sha1.h (100%)
 rename src/{ => crypto}/sha2.cpp (99%)
 rename src/{ => crypto}/sha2.h (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 67b069bde146..bc65119a92bf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,8 +75,8 @@ BITCOIN_CORE_H = \
   rpcserver.h \
   script.h \
   serialize.h \
-  sha2.h \
-  sha1.h \
+  crypto/sha2.h \
+  crypto/sha1.h \
   sync.h \
   threadsafety.h \
   tinyformat.h \
@@ -154,8 +154,8 @@ libbitcoin_common_a_SOURCES = \
   protocol.cpp \
   rpcprotocol.cpp \
   script.cpp \
-  sha1.cpp \
-  sha2.cpp \
+  crypto/sha1.cpp \
+  crypto/sha2.cpp \
   sync.cpp \
   util.cpp \
   version.cpp \
diff --git a/src/sha1.cpp b/src/crypto/sha1.cpp
similarity index 99%
rename from src/sha1.cpp
rename to src/crypto/sha1.cpp
index 0a7007754483..4b2e3e19d112 100644
--- a/src/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "sha1.h"
+#include "crypto/sha1.h"
 
 #include <string.h>
 
diff --git a/src/sha1.h b/src/crypto/sha1.h
similarity index 100%
rename from src/sha1.h
rename to src/crypto/sha1.h
diff --git a/src/sha2.cpp b/src/crypto/sha2.cpp
similarity index 99%
rename from src/sha2.cpp
rename to src/crypto/sha2.cpp
index c9beaf220bcd..0d0c32883ff9 100644
--- a/src/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "sha2.h"
+#include "crypto/sha2.h"
 
 #include <string.h>
 
diff --git a/src/sha2.h b/src/crypto/sha2.h
similarity index 100%
rename from src/sha2.h
rename to src/crypto/sha2.h
diff --git a/src/hash.h b/src/hash.h
index 9e7a67550fb6..318399c3345f 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -6,7 +6,7 @@
 #ifndef BITCOIN_HASH_H
 #define BITCOIN_HASH_H
 
-#include "sha2.h"
+#include "crypto/sha2.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "version.h"
diff --git a/src/key.cpp b/src/key.cpp
index 0685948922eb..96b1ac439c3d 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -4,7 +4,7 @@
 
 #include "key.h"
 
-#include "sha2.h"
+#include "crypto/sha2.h"
 
 #include <openssl/bn.h>
 #include <openssl/ecdsa.h>
diff --git a/src/script.cpp b/src/script.cpp
index facf3044d6be..c6574a6ee892 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -9,8 +9,8 @@
 #include "hash.h"
 #include "key.h"
 #include "keystore.h"
-#include "sha1.h"
-#include "sha2.h"
+#include "crypto/sha1.h"
+#include "crypto/sha2.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
diff --git a/src/test/sha1_tests.cpp b/src/test/sha1_tests.cpp
index bae17c5d4a4d..88f2da0bbb93 100644
--- a/src/test/sha1_tests.cpp
+++ b/src/test/sha1_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "sha1.h"
+#include "crypto/sha1.h"
 #include "util.h"
 
 #include <vector>
diff --git a/src/test/sha2_tests.cpp b/src/test/sha2_tests.cpp
index 516b942ad323..1e48c973cfb5 100644
--- a/src/test/sha2_tests.cpp
+++ b/src/test/sha2_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "sha2.h"
+#include "crypto/sha2.h"
 #include "util.h"
 
 #include <vector>

From a5bc9c09177420bd1c6a1f9ece9ecfbe80c453fe Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 1 May 2014 00:43:31 +0200
Subject: [PATCH 0207/1819] Add built-in RIPEMD-160 implementation

---
 src/Makefile.am          |   2 +
 src/crypto/ripemd160.cpp | 217 +++++++++++++++++++++++++++++++++++++++
 src/crypto/ripemd160.h   |  25 +++++
 src/hash.h               |   5 +-
 src/script.cpp           |   3 +-
 5 files changed, 248 insertions(+), 4 deletions(-)
 create mode 100644 src/crypto/ripemd160.cpp
 create mode 100644 src/crypto/ripemd160.h

diff --git a/src/Makefile.am b/src/Makefile.am
index bc65119a92bf..d583a79032fe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,6 +77,7 @@ BITCOIN_CORE_H = \
   serialize.h \
   crypto/sha2.h \
   crypto/sha1.h \
+  crypto/ripemd160.h \
   sync.h \
   threadsafety.h \
   tinyformat.h \
@@ -156,6 +157,7 @@ libbitcoin_common_a_SOURCES = \
   script.cpp \
   crypto/sha1.cpp \
   crypto/sha2.cpp \
+  crypto/ripemd160.cpp \
   sync.cpp \
   util.cpp \
   version.cpp \
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
new file mode 100644
index 000000000000..aa6874fa85f5
--- /dev/null
+++ b/src/crypto/ripemd160.cpp
@@ -0,0 +1,217 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/ripemd160.h"
+
+#include <string.h>
+
+// Internal implementation code.
+namespace {
+
+/** Read 4 bytes, and interpret them as a 32-bit unsigned little-endian integer. */
+uint32_t inline ReadLE32(const unsigned char *data) {
+    return ((uint32_t)data[0] | (uint32_t)data[1] << 8 | (uint32_t)data[2] << 16 | (uint32_t)data[3] << 24);
+}
+
+/** Write a 32-bit unsigned little-endian integer. */
+void inline WriteLE32(unsigned char *data, uint32_t x) {
+    data[0] = x;
+    data[1] = x >> 8;
+    data[2] = x >> 16;
+    data[3] = x >> 24;
+}
+
+/// Internal RIPEMD-160 implementation.
+namespace ripemd160 {
+
+uint32_t inline f1(uint32_t x, uint32_t y, uint32_t z) { return x ^ y ^ z; }
+uint32_t inline f2(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (~x & z); }
+uint32_t inline f3(uint32_t x, uint32_t y, uint32_t z) { return (x | ~y) ^ z; }
+uint32_t inline f4(uint32_t x, uint32_t y, uint32_t z) { return (x & z) | (y & ~z); }
+uint32_t inline f5(uint32_t x, uint32_t y, uint32_t z) { return x ^ (y | ~z); }
+
+/** Initialize RIPEMD-160 state. */
+void inline Initialize(uint32_t *s) {
+    s[0] = 0x67452301ul;
+    s[1] = 0xEFCDAB89ul;
+    s[2] = 0x98BADCFEul;
+    s[3] = 0x10325476ul;
+    s[4] = 0xC3D2E1F0ul;
+}
+
+uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32-i)); }
+
+void inline Round(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r) {
+    a = rol(a + f + x + k, r) + e;
+    c = rol(c, 10);
+}
+
+void inline R11(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x,            0, r); }
+void inline R21(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x5A827999ul, r); }
+void inline R31(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6ED9EBA1ul, r); }
+void inline R41(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x8F1BBCDCul, r); }
+void inline R51(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0xA953FD4Eul, r); }
+
+void inline R12(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0x50A28BE6ul, r); }
+void inline R22(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x5C4DD124ul, r); }
+void inline R32(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6D703EF3ul, r); }
+void inline R42(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x7A6D76E9ul, r); }
+void inline R52(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x,            0, r); }
+
+/** Perform a RIPEMD-160 transformation, processing a 64-byte chunk. */
+void Transform(uint32_t *s, const unsigned char *chunk) {
+    uint32_t a1 = s[0], b1 = s[1], c1 = s[2], d1 = s[3], e1 = s[4];
+    uint32_t a2 = a1  , b2 = b1  , c2 = c1  , d2 = d1  , e2 = e1  ;
+    uint32_t w0  = ReadLE32(chunk +  0), w1  = ReadLE32(chunk +  4), w2  = ReadLE32(chunk +  8), w3  = ReadLE32(chunk + 12);
+    uint32_t w4  = ReadLE32(chunk + 16), w5  = ReadLE32(chunk + 20), w6  = ReadLE32(chunk + 24), w7  = ReadLE32(chunk + 28);
+    uint32_t w8  = ReadLE32(chunk + 32), w9  = ReadLE32(chunk + 36), w10 = ReadLE32(chunk + 40), w11 = ReadLE32(chunk + 44);
+    uint32_t w12 = ReadLE32(chunk + 48), w13 = ReadLE32(chunk + 52), w14 = ReadLE32(chunk + 56), w15 = ReadLE32(chunk + 60);
+
+    R11(a1, b1, c1, d1, e1, w0 , 11); R12(a2, b2, c2, d2, e2, w5 ,  8);
+    R11(e1, a1, b1, c1, d1, w1 , 14); R12(e2, a2, b2, c2, d2, w14,  9);
+    R11(d1, e1, a1, b1, c1, w2 , 15); R12(d2, e2, a2, b2, c2, w7 ,  9);
+    R11(c1, d1, e1, a1, b1, w3 , 12); R12(c2, d2, e2, a2, b2, w0 , 11);
+    R11(b1, c1, d1, e1, a1, w4 ,  5); R12(b2, c2, d2, e2, a2, w9 , 13);
+    R11(a1, b1, c1, d1, e1, w5 ,  8); R12(a2, b2, c2, d2, e2, w2 , 15);
+    R11(e1, a1, b1, c1, d1, w6 ,  7); R12(e2, a2, b2, c2, d2, w11, 15);
+    R11(d1, e1, a1, b1, c1, w7 ,  9); R12(d2, e2, a2, b2, c2, w4 ,  5);
+    R11(c1, d1, e1, a1, b1, w8 , 11); R12(c2, d2, e2, a2, b2, w13,  7);
+    R11(b1, c1, d1, e1, a1, w9 , 13); R12(b2, c2, d2, e2, a2, w6 ,  7);
+    R11(a1, b1, c1, d1, e1, w10, 14); R12(a2, b2, c2, d2, e2, w15,  8);
+    R11(e1, a1, b1, c1, d1, w11, 15); R12(e2, a2, b2, c2, d2, w8 , 11);
+    R11(d1, e1, a1, b1, c1, w12,  6); R12(d2, e2, a2, b2, c2, w1 , 14);
+    R11(c1, d1, e1, a1, b1, w13,  7); R12(c2, d2, e2, a2, b2, w10, 14);
+    R11(b1, c1, d1, e1, a1, w14,  9); R12(b2, c2, d2, e2, a2, w3 , 12);
+    R11(a1, b1, c1, d1, e1, w15,  8); R12(a2, b2, c2, d2, e2, w12,  6);
+
+    R21(e1, a1, b1, c1, d1, w7 ,  7); R22(e2, a2, b2, c2, d2, w6 ,  9);
+    R21(d1, e1, a1, b1, c1, w4 ,  6); R22(d2, e2, a2, b2, c2, w11, 13);
+    R21(c1, d1, e1, a1, b1, w13,  8); R22(c2, d2, e2, a2, b2, w3 , 15);
+    R21(b1, c1, d1, e1, a1, w1 , 13); R22(b2, c2, d2, e2, a2, w7 ,  7);
+    R21(a1, b1, c1, d1, e1, w10, 11); R22(a2, b2, c2, d2, e2, w0 , 12);
+    R21(e1, a1, b1, c1, d1, w6 ,  9); R22(e2, a2, b2, c2, d2, w13,  8);
+    R21(d1, e1, a1, b1, c1, w15,  7); R22(d2, e2, a2, b2, c2, w5 ,  9);
+    R21(c1, d1, e1, a1, b1, w3 , 15); R22(c2, d2, e2, a2, b2, w10, 11);
+    R21(b1, c1, d1, e1, a1, w12,  7); R22(b2, c2, d2, e2, a2, w14,  7);
+    R21(a1, b1, c1, d1, e1, w0 , 12); R22(a2, b2, c2, d2, e2, w15,  7);
+    R21(e1, a1, b1, c1, d1, w9 , 15); R22(e2, a2, b2, c2, d2, w8 , 12);
+    R21(d1, e1, a1, b1, c1, w5 ,  9); R22(d2, e2, a2, b2, c2, w12,  7);
+    R21(c1, d1, e1, a1, b1, w2 , 11); R22(c2, d2, e2, a2, b2, w4 ,  6);
+    R21(b1, c1, d1, e1, a1, w14,  7); R22(b2, c2, d2, e2, a2, w9 , 15);
+    R21(a1, b1, c1, d1, e1, w11, 13); R22(a2, b2, c2, d2, e2, w1 , 13);
+    R21(e1, a1, b1, c1, d1, w8 , 12); R22(e2, a2, b2, c2, d2, w2 , 11);
+
+    R31(d1, e1, a1, b1, c1, w3 , 11); R32(d2, e2, a2, b2, c2, w15,  9);
+    R31(c1, d1, e1, a1, b1, w10, 13); R32(c2, d2, e2, a2, b2, w5 ,  7);
+    R31(b1, c1, d1, e1, a1, w14,  6); R32(b2, c2, d2, e2, a2, w1 , 15);
+    R31(a1, b1, c1, d1, e1, w4 ,  7); R32(a2, b2, c2, d2, e2, w3 , 11);
+    R31(e1, a1, b1, c1, d1, w9 , 14); R32(e2, a2, b2, c2, d2, w7 ,  8);
+    R31(d1, e1, a1, b1, c1, w15,  9); R32(d2, e2, a2, b2, c2, w14,  6);
+    R31(c1, d1, e1, a1, b1, w8 , 13); R32(c2, d2, e2, a2, b2, w6 ,  6);
+    R31(b1, c1, d1, e1, a1, w1 , 15); R32(b2, c2, d2, e2, a2, w9 , 14);
+    R31(a1, b1, c1, d1, e1, w2 , 14); R32(a2, b2, c2, d2, e2, w11, 12);
+    R31(e1, a1, b1, c1, d1, w7 ,  8); R32(e2, a2, b2, c2, d2, w8 , 13);
+    R31(d1, e1, a1, b1, c1, w0 , 13); R32(d2, e2, a2, b2, c2, w12,  5);
+    R31(c1, d1, e1, a1, b1, w6 ,  6); R32(c2, d2, e2, a2, b2, w2 , 14);
+    R31(b1, c1, d1, e1, a1, w13,  5); R32(b2, c2, d2, e2, a2, w10, 13);
+    R31(a1, b1, c1, d1, e1, w11, 12); R32(a2, b2, c2, d2, e2, w0 , 13);
+    R31(e1, a1, b1, c1, d1, w5 ,  7); R32(e2, a2, b2, c2, d2, w4 ,  7);
+    R31(d1, e1, a1, b1, c1, w12,  5); R32(d2, e2, a2, b2, c2, w13,  5);
+
+    R41(c1, d1, e1, a1, b1, w1 , 11); R42(c2, d2, e2, a2, b2, w8 , 15);
+    R41(b1, c1, d1, e1, a1, w9 , 12); R42(b2, c2, d2, e2, a2, w6 ,  5);
+    R41(a1, b1, c1, d1, e1, w11, 14); R42(a2, b2, c2, d2, e2, w4 ,  8);
+    R41(e1, a1, b1, c1, d1, w10, 15); R42(e2, a2, b2, c2, d2, w1 , 11);
+    R41(d1, e1, a1, b1, c1, w0 , 14); R42(d2, e2, a2, b2, c2, w3 , 14);
+    R41(c1, d1, e1, a1, b1, w8 , 15); R42(c2, d2, e2, a2, b2, w11, 14);
+    R41(b1, c1, d1, e1, a1, w12,  9); R42(b2, c2, d2, e2, a2, w15,  6);
+    R41(a1, b1, c1, d1, e1, w4 ,  8); R42(a2, b2, c2, d2, e2, w0 , 14);
+    R41(e1, a1, b1, c1, d1, w13,  9); R42(e2, a2, b2, c2, d2, w5 ,  6);
+    R41(d1, e1, a1, b1, c1, w3 , 14); R42(d2, e2, a2, b2, c2, w12,  9);
+    R41(c1, d1, e1, a1, b1, w7 ,  5); R42(c2, d2, e2, a2, b2, w2 , 12);
+    R41(b1, c1, d1, e1, a1, w15,  6); R42(b2, c2, d2, e2, a2, w13,  9);
+    R41(a1, b1, c1, d1, e1, w14,  8); R42(a2, b2, c2, d2, e2, w9 , 12);
+    R41(e1, a1, b1, c1, d1, w5 ,  6); R42(e2, a2, b2, c2, d2, w7 ,  5);
+    R41(d1, e1, a1, b1, c1, w6 ,  5); R42(d2, e2, a2, b2, c2, w10, 15);
+    R41(c1, d1, e1, a1, b1, w2 , 12); R42(c2, d2, e2, a2, b2, w14,  8);
+
+    R51(b1, c1, d1, e1, a1, w4 ,  9); R52(b2, c2, d2, e2, a2, w12,  8);
+    R51(a1, b1, c1, d1, e1, w0 , 15); R52(a2, b2, c2, d2, e2, w15,  5);
+    R51(e1, a1, b1, c1, d1, w5 ,  5); R52(e2, a2, b2, c2, d2, w10, 12);
+    R51(d1, e1, a1, b1, c1, w9 , 11); R52(d2, e2, a2, b2, c2, w4 ,  9);
+    R51(c1, d1, e1, a1, b1, w7 ,  6); R52(c2, d2, e2, a2, b2, w1 , 12);
+    R51(b1, c1, d1, e1, a1, w12,  8); R52(b2, c2, d2, e2, a2, w5 ,  5);
+    R51(a1, b1, c1, d1, e1, w2 , 13); R52(a2, b2, c2, d2, e2, w8 , 14);
+    R51(e1, a1, b1, c1, d1, w10, 12); R52(e2, a2, b2, c2, d2, w7 ,  6);
+    R51(d1, e1, a1, b1, c1, w14,  5); R52(d2, e2, a2, b2, c2, w6 ,  8);
+    R51(c1, d1, e1, a1, b1, w1 , 12); R52(c2, d2, e2, a2, b2, w2 , 13);
+    R51(b1, c1, d1, e1, a1, w3 , 13); R52(b2, c2, d2, e2, a2, w13,  6);
+    R51(a1, b1, c1, d1, e1, w8 , 14); R52(a2, b2, c2, d2, e2, w14,  5);
+    R51(e1, a1, b1, c1, d1, w11, 11); R52(e2, a2, b2, c2, d2, w0 , 15);
+    R51(d1, e1, a1, b1, c1, w6 ,  8); R52(d2, e2, a2, b2, c2, w3 , 13);
+    R51(c1, d1, e1, a1, b1, w15,  5); R52(c2, d2, e2, a2, b2, w9 , 11);
+    R51(b1, c1, d1, e1, a1, w13,  6); R52(b2, c2, d2, e2, a2, w11, 11);
+
+    uint32_t t = s[0];
+    s[0] = s[1] + c1 + d2;
+    s[1] = s[2] + d1 + e2;
+    s[2] = s[3] + e1 + a2;
+    s[3] = s[4] + a1 + b2;
+    s[4] = t    + b1 + c2;
+}
+
+}  // namespace ripemd160
+
+}  // namespace
+
+////// RIPEMD160
+
+CRIPEMD160::CRIPEMD160() : bytes(0) {
+    ripemd160::Initialize(s);
+}
+
+CRIPEMD160& CRIPEMD160::Write(const unsigned char *data, size_t len) {
+    const unsigned char *end = data + len;
+    size_t bufsize = bytes % 64;
+    if (bufsize && bufsize + len >= 64) {
+        // Fill the buffer, and process it.
+        memcpy(buf + bufsize, data, 64 - bufsize);
+        bytes += 64 - bufsize;
+        data += 64 - bufsize;
+        ripemd160::Transform(s, buf);
+        bufsize = 0;
+    }
+    while (end >= data + 64) {
+        // Process full chunks directly from the source.
+        ripemd160::Transform(s, data);
+        bytes += 64;
+        data += 64;
+    }
+    if (end > data) {
+        // Fill the buffer with what remains.
+        memcpy(buf + bufsize, data, end - data);
+        bytes += end - data;
+    }
+    return *this;
+}
+
+void CRIPEMD160::Finalize(unsigned char *hash) {
+    static const unsigned char pad[64] = {0x80};
+    unsigned char sizedesc[8];
+    WriteLE32(sizedesc, bytes << 3);
+    WriteLE32(sizedesc+4, bytes >> 29);
+    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
+    Write(sizedesc, 8);
+    WriteLE32(hash, s[0]);
+    WriteLE32(hash+4, s[1]);
+    WriteLE32(hash+8, s[2]);
+    WriteLE32(hash+12, s[3]);
+    WriteLE32(hash+16, s[4]);
+}
+
+CRIPEMD160& CRIPEMD160::Reset() {
+    bytes = 0;
+    ripemd160::Initialize(s);
+    return *this;
+}
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
new file mode 100644
index 000000000000..cab1d0bb46ea
--- /dev/null
+++ b/src/crypto/ripemd160.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_RIPEMD160_H
+#define BITCOIN_RIPEMD160_H
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for RIPEMD-160. */
+class CRIPEMD160 {
+private:
+    uint32_t s[5];
+    unsigned char buf[64];
+    size_t bytes;
+
+public:
+    CRIPEMD160();
+    CRIPEMD160& Write(const unsigned char *data, size_t len);
+    void Finalize(unsigned char *hash);
+    CRIPEMD160& Reset();
+};
+
+#endif
diff --git a/src/hash.h b/src/hash.h
index 318399c3345f..39d42eefe26f 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -7,14 +7,13 @@
 #define BITCOIN_HASH_H
 
 #include "crypto/sha2.h"
+#include "crypto/ripemd160.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "version.h"
 
 #include <vector>
 
-#include <openssl/ripemd.h>
-
 /** A hasher class for Bitcoin's 256-bit hash (double SHA-256). */
 class CHash256 {
 private:
@@ -45,7 +44,7 @@ class CHash160 {
     void Finalize(unsigned char *hash) {
         unsigned char buf[32];
         sha.Finalize(buf);
-        RIPEMD160(buf, 32, hash);
+        CRIPEMD160().Write(buf, 32).Finalize(hash);
     }
 
     CHash160& Write(const unsigned char *data, size_t len) {
diff --git a/src/script.cpp b/src/script.cpp
index c6574a6ee892..b383a00a6ec8 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -11,6 +11,7 @@
 #include "keystore.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
+#include "crypto/ripemd160.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
@@ -803,7 +804,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     valtype& vch = stacktop(-1);
                     valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
                     if (opcode == OP_RIPEMD160)
-                        RIPEMD160(&vch[0], vch.size(), &vchHash[0]);
+                        CRIPEMD160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_SHA1)
                         CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
                     else if (opcode == OP_SHA256)

From 7ecd9739d9439624399a4882a9f196ccf0c7ba4a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 3 May 2014 01:04:18 +0200
Subject: [PATCH 0208/1819] Move {Read,Write}{LE,BE}{32,64} to common.h and use
 builtins if possible

---
 src/Makefile.am          |  1 +
 src/crypto/common.h      | 46 ++++++++++++++++++++++++++++++++++++++++
 src/crypto/ripemd160.cpp | 17 ++-------------
 src/crypto/sha1.cpp      | 17 ++-------------
 src/crypto/sha2.cpp      | 32 +---------------------------
 5 files changed, 52 insertions(+), 61 deletions(-)
 create mode 100644 src/crypto/common.h

diff --git a/src/Makefile.am b/src/Makefile.am
index d583a79032fe..01655b7011db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,7 @@ BITCOIN_CORE_H = \
   rpcserver.h \
   script.h \
   serialize.h \
+  crypto/common.h \
   crypto/sha2.h \
   crypto/sha1.h \
   crypto/ripemd160.h \
diff --git a/src/crypto/common.h b/src/crypto/common.h
new file mode 100644
index 000000000000..e1bcd3ae1142
--- /dev/null
+++ b/src/crypto/common.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_CRYPTO_COMMON_H
+#define BITCOIN_CRYPTO_COMMON_H
+
+#include <stdint.h>
+
+#ifdef WIN32
+uint32_t static inline ReadLE32(const unsigned char *ptr) { return *((uint32_t*)ptr); }
+uint64_t static inline ReadLE64(const unsigned char *ptr) { return *((uint64_t*)ptr); }
+
+void static inline WriteLE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = x; }
+void static inline WriteLE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = x; }
+
+uint32_t static inline ReadBE32(const unsigned char *ptr) {
+    return ((uint32_t)ptr[0] << 24 | (uint32_t)ptr[1] << 16 | (uint32_t)ptr[2] << 8 | (uint32_t)ptr[3]);
+}
+
+uint64_t static inline ReadBE64(const unsigned char *ptr) {
+    return ((uint64_t)ptr[0] << 56 | (uint64_t)ptr[1] << 48 | (uint64_t)ptr[2] << 40 | (uint64_t)ptr[3] << 32 |
+            (uint64_t)ptr[4] << 24 | (uint64_t)ptr[5] << 16 | (uint64_t)ptr[6] << 8 | (uint64_t)ptr[7]);
+}
+
+void static inline WriteBE32(unsigned char *ptr, uint32_t x) {
+    ptr[0] = x >> 24; ptr[1] = x >> 16; ptr[2] = x >> 8; ptr[3] = x;
+}
+
+void static inline WriteBE64(unsigned char *ptr, uint64_t x) {
+    ptr[0] = x >> 56; ptr[1] = x >> 48; ptr[2] = x >> 40; ptr[3] = x >> 32;
+    ptr[4] = x >> 24; ptr[5] = x >> 16; ptr[6] = x >> 8; ptr[7] = x;
+}
+#else
+#  include <endian.h>
+uint32_t static inline ReadLE32(const unsigned char *ptr) { return le32toh(*((uint32_t*)ptr)); }
+uint64_t static inline ReadLE64(const unsigned char *ptr) { return le64toh(*((uint64_t*)ptr)); }
+void static inline WriteLE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = htole32(x); }
+void static inline WriteLE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = htole64(x); }
+
+uint32_t static inline ReadBE32(const unsigned char *ptr) { return be32toh(*((uint32_t*)ptr)); }
+uint64_t static inline ReadBE64(const unsigned char *ptr) { return be64toh(*((uint64_t*)ptr)); }
+void static inline WriteBE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = htobe32(x); }
+void static inline WriteBE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = htobe64(x); }
+#endif
+#endif
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
index aa6874fa85f5..c5e6e2d69678 100644
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -4,24 +4,12 @@
 
 #include "crypto/ripemd160.h"
 
+#include "crypto/common.h"
 #include <string.h>
 
 // Internal implementation code.
 namespace {
 
-/** Read 4 bytes, and interpret them as a 32-bit unsigned little-endian integer. */
-uint32_t inline ReadLE32(const unsigned char *data) {
-    return ((uint32_t)data[0] | (uint32_t)data[1] << 8 | (uint32_t)data[2] << 16 | (uint32_t)data[3] << 24);
-}
-
-/** Write a 32-bit unsigned little-endian integer. */
-void inline WriteLE32(unsigned char *data, uint32_t x) {
-    data[0] = x;
-    data[1] = x >> 8;
-    data[2] = x >> 16;
-    data[3] = x >> 24;
-}
-
 /// Internal RIPEMD-160 implementation.
 namespace ripemd160 {
 
@@ -199,8 +187,7 @@ CRIPEMD160& CRIPEMD160::Write(const unsigned char *data, size_t len) {
 void CRIPEMD160::Finalize(unsigned char *hash) {
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
-    WriteLE32(sizedesc, bytes << 3);
-    WriteLE32(sizedesc+4, bytes >> 29);
+    WriteLE64(sizedesc, bytes << 3);
     Write(pad, 1 + ((119 - (bytes % 64)) % 64));
     Write(sizedesc, 8);
     WriteLE32(hash, s[0]);
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
index 4b2e3e19d112..e0f32b7d1d10 100644
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -4,24 +4,12 @@
 
 #include "crypto/sha1.h"
 
+#include "crypto/common.h"
 #include <string.h>
 
 // Internal implementation code.
 namespace {
 
-/** Read 4 bytes, and interpret them as a 32-bit unsigned big-endian integer. */
-uint32_t inline ReadBE32(const unsigned char *data) {
-    return ((uint32_t)data[0] << 24 | (uint32_t)data[1] << 16 | (uint32_t)data[2] << 8 | (uint32_t)data[3]);
-}
-
-/** Write a 32-bit unsigned big-endian integer. */
-void inline WriteBE32(unsigned char *data, uint32_t x) {
-    data[0] = x >> 24;
-    data[1] = x >> 16;
-    data[2] = x >> 8;
-    data[3] = x;
-}
-
 /// Internal SHA-1 implementation.
 namespace sha1 {
 
@@ -187,8 +175,7 @@ CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
 void CSHA1::Finalize(unsigned char *hash) {
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
-    WriteBE32(sizedesc, bytes >> 29);
-    WriteBE32(sizedesc+4, bytes << 3);
+    WriteBE64(sizedesc, bytes << 3);
     Write(pad, 1 + ((119 - (bytes % 64)) % 64));
     Write(sizedesc, 8);
     WriteBE32(hash, s[0]);
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp
index 0d0c32883ff9..77f35f38d804 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -4,42 +4,12 @@
 
 #include "crypto/sha2.h"
 
+#include "crypto/common.h"
 #include <string.h>
 
 // Internal implementation code.
 namespace {
 
-/** Read 4 bytes, and interpret them as a 32-bit unsigned big-endian integer. */
-uint32_t inline ReadBE32(const unsigned char *data) {
-    return ((uint32_t)data[0] << 24 | (uint32_t)data[1] << 16 | (uint32_t)data[2] << 8 | (uint32_t)data[3]);
-}
-
-/** Write a 32-bit unsigned big-endian integer. */
-void inline WriteBE32(unsigned char *data, uint32_t x) {
-    data[0] = x >> 24;
-    data[1] = x >> 16;
-    data[2] = x >> 8;
-    data[3] = x;
-}
-
-/** Read 8 bytes, and interpret them as a 64-bit unsigned big-endian integer. */
-uint64_t inline ReadBE64(const unsigned char *data) {
-    return ((uint64_t)data[0] << 56 | (uint64_t)data[1] << 48 | (uint64_t)data[2] << 40 | (uint64_t)data[3] << 32 |
-            (uint64_t)data[4] << 24 | (uint64_t)data[5] << 16 | (uint64_t)data[6] << 8  | (uint64_t)data[7]);
-}
-
-/** Write a 64-bit unsigned big-endian integer. */
-void inline WriteBE64(unsigned char *data, uint64_t x) {
-    data[0] = x >> 56;
-    data[1] = x >> 48;
-    data[2] = x >> 40;
-    data[3] = x >> 32;
-    data[4] = x >> 24;
-    data[5] = x >> 16;
-    data[6] = x >> 8;
-    data[7] = x;
-}
-
 /// Internal SHA-256 implementation.
 namespace sha256 {
 

From 3820e01eb9ad0e502e92ebc44cb4623cf4f3d4c4 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Sat, 31 May 2014 22:01:42 +0200
Subject: [PATCH 0209/1819] Extend and move all crypto tests to
 crypto_tests.cpp

---
 src/Makefile.test.include |   3 +-
 src/test/crypto_tests.cpp | 202 ++++++++++++++++++++++++++++++++++++++
 src/test/sha1_tests.cpp   |  27 -----
 src/test/sha2_tests.cpp   | 157 -----------------------------
 4 files changed, 203 insertions(+), 186 deletions(-)
 create mode 100644 src/test/crypto_tests.cpp
 delete mode 100644 src/test/sha1_tests.cpp
 delete mode 100644 src/test/sha2_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 7cf441bd6cb2..02fb3ba5feeb 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -31,6 +31,7 @@ BITCOIN_TESTS =\
   test/checkblock_tests.cpp \
   test/Checkpoints_tests.cpp \
   test/compress_tests.cpp \
+  test/crypto_tests.cpp \
   test/DoS_tests.cpp \
   test/getarg_tests.cpp \
   test/hash_tests.cpp \
@@ -45,8 +46,6 @@ BITCOIN_TESTS =\
   test/script_P2SH_tests.cpp \
   test/script_tests.cpp \
   test/serialize_tests.cpp \
-  test/sha1_tests.cpp \
-  test/sha2_tests.cpp \
   test/sigopcount_tests.cpp \
   test/test_bitcoin.cpp \
   test/transaction_tests.cpp \
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
new file mode 100644
index 000000000000..d425f082c3ac
--- /dev/null
+++ b/src/test/crypto_tests.cpp
@@ -0,0 +1,202 @@
+// Copyright (c) 2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/ripemd160.h"
+#include "crypto/sha1.h"
+#include "crypto/sha2.h"
+#include "util.h"
+
+#include <vector>
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_AUTO_TEST_SUITE(crypto_tests)
+
+template<typename Hasher, typename In, typename Out>
+void TestVector(const Hasher &h, const In &in, const Out &out) {
+    Out hash;
+    hash.resize(out.size());
+    {
+        // Test that writing the whole input string at once works.
+        Hasher(h).Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
+        BOOST_CHECK(hash == out);
+    }
+    for (int i=0; i<32; i++) {
+        // Test that writing the string broken up in random pieces works.
+        Hasher hasher(h);
+        size_t pos = 0;
+        while (pos < in.size()) {
+            size_t len = insecure_rand() % ((in.size() - pos + 1) / 2 + 1);
+            hasher.Write((unsigned char*)&in[pos], len);
+            pos += len;
+            if (pos > 0 && pos + 2 * out.size() > in.size()) {
+                // Test that writing the rest at once to a copy of a hasher works.
+                Hasher(hasher).Write((unsigned char*)&in[pos], in.size() - pos).Finalize(&hash[0]);
+                BOOST_CHECK(hash == out);
+            }
+        }
+        hasher.Finalize(&hash[0]);
+        BOOST_CHECK(hash == out);
+    }
+}
+
+void TestSHA1(const std::string &in, const std::string &hexout) { TestVector(CSHA1(), in, ParseHex(hexout));}
+void TestSHA256(const std::string &in, const std::string &hexout) { TestVector(CSHA256(), in, ParseHex(hexout));}
+void TestSHA512(const std::string &in, const std::string &hexout) { TestVector(CSHA512(), in, ParseHex(hexout));}
+void TestRIPEMD160(const std::string &in, const std::string &hexout) { TestVector(CRIPEMD160(), in, ParseHex(hexout));}
+
+void TestHMACSHA512(const std::string &hexkey, const std::string &hexin, const std::string &hexout) {
+    std::vector<unsigned char> key = ParseHex(hexkey);
+    TestVector(CHMAC_SHA512(&key[0], key.size()), ParseHex(hexin), ParseHex(hexout));
+}
+
+std::string LongTestString(void) {
+    std::string ret;
+    for (int i=0; i<200000; i++) {
+        ret += (unsigned char)(i);
+        ret += (unsigned char)(i >> 4);
+        ret += (unsigned char)(i >> 8);
+        ret += (unsigned char)(i >> 12);
+        ret += (unsigned char)(i >> 16);
+    }
+    return ret;
+}
+
+const std::string test1 = LongTestString();
+
+BOOST_AUTO_TEST_CASE(ripemd160_testvectors) {
+    TestRIPEMD160("", "9c1185a5c5e9fc54612808977ee8f548b2258d31");
+    TestRIPEMD160("abc", "8eb208f7e05d987a9b044a8e98c6b087f15a0bfc");
+    TestRIPEMD160("message digest", "5d0689ef49d2fae572b881b123a85ffa21595f36");
+    TestRIPEMD160("secure hash algorithm", "20397528223b6a5f4cbc2808aba0464e645544f9");
+    TestRIPEMD160("RIPEMD160 is considered to be safe", "a7d78608c7af8a8e728778e81576870734122b66");
+    TestRIPEMD160("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+                  "12a053384a9c0c88e405a06c27dcf49ada62eb2b");
+    TestRIPEMD160("For this sample, this 63-byte string will be used as input data",
+                  "de90dbfee14b63fb5abf27c2ad4a82aaa5f27a11");
+    TestRIPEMD160("This is exactly 64 bytes long, not counting the terminating byte",
+                  "eda31d51d3a623b81e19eb02e24ff65d27d67b37");
+    TestRIPEMD160(std::string(1000000, 'a'), "52783243c1697bdbe16d37f97f68f08325dc1528");
+    TestRIPEMD160(test1, "464243587bd146ea835cdf57bdae582f25ec45f1");
+}
+
+BOOST_AUTO_TEST_CASE(sha1_testvectors) {
+    TestSHA1("", "da39a3ee5e6b4b0d3255bfef95601890afd80709");
+    TestSHA1("abc", "a9993e364706816aba3e25717850c26c9cd0d89d");
+    TestSHA1("message digest", "c12252ceda8be8994d5fa0290a47231c1d16aae3");
+    TestSHA1("secure hash algorithm", "d4d6d2f0ebe317513bbd8d967d89bac5819c2f60");
+    TestSHA1("SHA1 is considered to be safe", "f2b6650569ad3a8720348dd6ea6c497dee3a842a");
+    TestSHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+             "84983e441c3bd26ebaae4aa1f95129e5e54670f1");
+    TestSHA1("For this sample, this 63-byte string will be used as input data",
+             "4f0ea5cd0585a23d028abdc1a6684e5a8094dc49");
+    TestSHA1("This is exactly 64 bytes long, not counting the terminating byte",
+             "fb679f23e7d1ce053313e66e127ab1b444397057");
+    TestSHA1(std::string(1000000, 'a'), "34aa973cd4c4daa4f61eeb2bdbad27316534016f");
+    TestSHA1(test1, "b7755760681cbfd971451668f32af5774f4656b5");
+}
+
+BOOST_AUTO_TEST_CASE(sha256_testvectors) {
+    TestSHA256("", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
+    TestSHA256("abc", "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad");
+    TestSHA256("message digest",
+               "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650");
+    TestSHA256("secure hash algorithm",
+               "f30ceb2bb2829e79e4ca9753d35a8ecc00262d164cc077080295381cbd643f0d");
+    TestSHA256("SHA256 is considered to be safe",
+               "6819d915c73f4d1e77e4e1b52d1fa0f9cf9beaead3939f15874bd988e2a23630");
+    TestSHA256("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1");
+    TestSHA256("For this sample, this 63-byte string will be used as input data",
+               "f08a78cbbaee082b052ae0708f32fa1e50c5c421aa772ba5dbb406a2ea6be342");
+    TestSHA256("This is exactly 64 bytes long, not counting the terminating byte",
+               "ab64eff7e88e2e46165e29f2bce41826bd4c7b3552f6b382a9e7d3af47c245f8");
+    TestSHA256("As Bitcoin relies on 80 byte header hashes, we want to have an example for that.",
+               "7406e8de7d6e4fffc573daef05aefb8806e7790f55eab5576f31349743cca743");
+    TestSHA256(std::string(1000000, 'a'),
+               "cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0");
+    TestSHA256(test1, "a316d55510b49662420f49d145d42fb83f31ef8dc016aa4e32df049991a91e26");
+}
+
+BOOST_AUTO_TEST_CASE(sha512_testvectors) {
+    TestSHA512("",
+               "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce"
+               "47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
+    TestSHA512("abc",
+               "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a"
+               "2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f");
+    TestSHA512("message digest",
+               "107dbf389d9e9f71a3a95f6c055b9251bc5268c2be16d6c13492ea45b0199f33"
+               "09e16455ab1e96118e8a905d5597b72038ddb372a89826046de66687bb420e7c");
+    TestSHA512("secure hash algorithm",
+               "7746d91f3de30c68cec0dd693120a7e8b04d8073cb699bdce1a3f64127bca7a3"
+               "d5db502e814bb63c063a7a5043b2df87c61133395f4ad1edca7fcf4b30c3236e");
+    TestSHA512("SHA512 is considered to be safe",
+               "099e6468d889e1c79092a89ae925a9499b5408e01b66cb5b0a3bd0dfa51a9964"
+               "6b4a3901caab1318189f74cd8cf2e941829012f2449df52067d3dd5b978456c2");
+    TestSHA512("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c335"
+               "96fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445");
+    TestSHA512("For this sample, this 63-byte string will be used as input data",
+               "b3de4afbc516d2478fe9b518d063bda6c8dd65fc38402dd81d1eb7364e72fb6e"
+               "6663cf6d2771c8f5a6da09601712fb3d2a36c6ffea3e28b0818b05b0a8660766");
+    TestSHA512("This is exactly 64 bytes long, not counting the terminating byte",
+               "70aefeaa0e7ac4f8fe17532d7185a289bee3b428d950c14fa8b713ca09814a38"
+               "7d245870e007a80ad97c369d193e41701aa07f3221d15f0e65a1ff970cedf030");
+    TestSHA512("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno"
+               "ijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+               "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018"
+               "501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909");
+    TestSHA512(std::string(1000000, 'a'),
+               "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973eb"
+               "de0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b");
+    TestSHA512(test1,
+               "40cac46c147e6131c5193dd5f34e9d8bb4951395f27b08c558c65ff4ba2de594"
+               "37de8c3ef5459d76a52cedc02dc499a3c9ed9dedbfb3281afd9653b8a112fafc");
+}
+
+BOOST_AUTO_TEST_CASE(hmac_sha512_testvectors) {
+    // test cases 1, 2, 3, 4, 6 and 7 of RFC 4231
+    TestHMACSHA512("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
+                   "4869205468657265",
+                   "87aa7cdea5ef619d4ff0b4241a1d6cb02379f4e2ce4ec2787ad0b30545e17cde"
+                   "daa833b7d6b8a702038b274eaea3f4e4be9d914eeb61f1702e696c203a126854");
+    TestHMACSHA512("4a656665",
+                   "7768617420646f2079612077616e7420666f72206e6f7468696e673f",
+                   "164b7a7bfcf819e2e395fbe73b56e0a387bd64222e831fd610270cd7ea250554"
+                   "9758bf75c05a994a6d034f65f8f0e6fdcaeab1a34d4a6b4b636e070a38bce737");
+    TestHMACSHA512("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+                   "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
+                   "dddddddddddddddddddddddddddddddddddd",
+                   "fa73b0089d56a284efb0f0756c890be9b1b5dbdd8ee81a3655f83e33b2279d39"
+                   "bf3e848279a722c806b485a47e67c807b946a337bee8942674278859e13292fb");
+    TestHMACSHA512("0102030405060708090a0b0c0d0e0f10111213141516171819",
+                   "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"
+                   "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
+                   "b0ba465637458c6990e5a8c5f61d4af7e576d97ff94b872de76f8050361ee3db"
+                   "a91ca5c11aa25eb4d679275cc5788063a5f19741120c4f2de2adebeb10a298dd");
+    TestHMACSHA512("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaa",
+                   "54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a"
+                   "65204b6579202d2048617368204b6579204669727374",
+                   "80b24263c7c1a3ebb71493c1dd7be8b49b46d1f41b4aeec1121b013783f8f352"
+                   "6b56d037e05f2598bd0fd2215d6a1e5295e64f73f63f0aec8b915a985d786598");
+    TestHMACSHA512("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaa",
+                   "5468697320697320612074657374207573696e672061206c6172676572207468"
+                   "616e20626c6f636b2d73697a65206b657920616e642061206c61726765722074"
+                   "68616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565"
+                   "647320746f20626520686173686564206265666f7265206265696e6720757365"
+                   "642062792074686520484d414320616c676f726974686d2e",
+                   "e37b6a775dc87dbaa4dfa9f96e5e3ffddebd71f8867289865df5a32d20cdc944"
+                   "b6022cac3c4982b10d5eeb55c3e4de15134676fb6de0446065c97440fa8c6a58");
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/sha1_tests.cpp b/src/test/sha1_tests.cpp
deleted file mode 100644
index 88f2da0bbb93..000000000000
--- a/src/test/sha1_tests.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2014 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "crypto/sha1.h"
-#include "util.h"
-
-#include <vector>
-
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_SUITE(sha1_tests)
-
-void SHA1TestVector(const std::string &in, const std::string &out) {
-    std::vector<unsigned char> hash;
-    hash.resize(20);
-    CSHA1().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
-    BOOST_CHECK_EQUAL(HexStr(hash), out);
-}
-
-BOOST_AUTO_TEST_CASE(sha1_testvectors) {
-    SHA1TestVector("abc", "a9993e364706816aba3e25717850c26c9cd0d89d");
-    SHA1TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "84983e441c3bd26ebaae4aa1f95129e5e54670f1");
-    SHA1TestVector(std::string(1000000, 'a'), "34aa973cd4c4daa4f61eeb2bdbad27316534016f");
-}
-
-BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/sha2_tests.cpp b/src/test/sha2_tests.cpp
deleted file mode 100644
index 1e48c973cfb5..000000000000
--- a/src/test/sha2_tests.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2014 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "crypto/sha2.h"
-#include "util.h"
-
-#include <vector>
-
-#include <boost/test/unit_test.hpp>
-
-BOOST_AUTO_TEST_SUITE(sha2_tests)
-
-void SHA256TestVector(const std::string &in, const std::string &out) {
-    std::vector<unsigned char> hash;
-    hash.resize(32);
-    CSHA256().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
-    BOOST_CHECK_EQUAL(HexStr(hash), out);
-}
-
-void SHA512TestVector(const std::string &in, const std::string &out) {
-    std::vector<unsigned char> hash;
-    hash.resize(64);
-    CSHA512().Write((unsigned char*)&in[0], in.size()).Finalize(&hash[0]);
-    BOOST_CHECK_EQUAL(HexStr(hash), out);
-}
-
-BOOST_AUTO_TEST_CASE(sha256_testvectors) {
-    SHA256TestVector("", "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855");
-    SHA256TestVector("abc", "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad");
-    SHA256TestVector("message digest", "f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650");
-    SHA256TestVector("secure hash algorithm", "f30ceb2bb2829e79e4ca9753d35a8ecc00262d164cc077080295381cbd643f0d");
-    SHA256TestVector("SHA256 is considered to be safe", "6819d915c73f4d1e77e4e1b52d1fa0f9cf9beaead3939f15874bd988e2a23630");
-    SHA256TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1");
-    SHA256TestVector("For this sample, this 63-byte string will be used as input data", "f08a78cbbaee082b052ae0708f32fa1e50c5c421aa772ba5dbb406a2ea6be342");
-    SHA256TestVector("This is exactly 64 bytes long, not counting the terminating byte", "ab64eff7e88e2e46165e29f2bce41826bd4c7b3552f6b382a9e7d3af47c245f8");
-    SHA256TestVector("As Bitcoin relies on 80 byte header hashes, we want to have an example for that.", "7406e8de7d6e4fffc573daef05aefb8806e7790f55eab5576f31349743cca743");
-}
-
-BOOST_AUTO_TEST_CASE(sha512_testvectors) {
-    SHA512TestVector("abc", "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f");
-    SHA512TestVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445");
-    SHA512TestVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909");
-    SHA512TestVector(std::string(1000000, 'a'), "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973ebde0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b");
-    SHA512TestVector("", "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e");
-}
-
-typedef struct {
-    const char *pszKey;
-    const char *pszData;
-    const char *pszMAC;
-} testvec_t;
-
-// test cases 1, 2, 3, 4, 6 and 7 of RFC 4231
-static const testvec_t vtest[] = {
-    {
-        "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b"
-        "0b0b0b0b",
-        "4869205468657265",
-        "87aa7cdea5ef619d4ff0b4241a1d6cb0"
-        "2379f4e2ce4ec2787ad0b30545e17cde"
-        "daa833b7d6b8a702038b274eaea3f4e4"
-        "be9d914eeb61f1702e696c203a126854"
-    },
-    {
-        "4a656665",
-        "7768617420646f2079612077616e7420"
-        "666f72206e6f7468696e673f",
-        "164b7a7bfcf819e2e395fbe73b56e0a3"
-        "87bd64222e831fd610270cd7ea250554"
-        "9758bf75c05a994a6d034f65f8f0e6fd"
-        "caeab1a34d4a6b4b636e070a38bce737"
-    },
-    {
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaa",
-        "dddddddddddddddddddddddddddddddd"
-        "dddddddddddddddddddddddddddddddd"
-        "dddddddddddddddddddddddddddddddd"
-        "dddd",
-        "fa73b0089d56a284efb0f0756c890be9"
-        "b1b5dbdd8ee81a3655f83e33b2279d39"
-        "bf3e848279a722c806b485a47e67c807"
-        "b946a337bee8942674278859e13292fb"
-    },
-    {
-        "0102030405060708090a0b0c0d0e0f10"
-        "111213141516171819",
-        "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"
-        "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"
-        "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"
-        "cdcd",
-        "b0ba465637458c6990e5a8c5f61d4af7"
-        "e576d97ff94b872de76f8050361ee3db"
-        "a91ca5c11aa25eb4d679275cc5788063"
-        "a5f19741120c4f2de2adebeb10a298dd"
-    },
-    {
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaa",
-        "54657374205573696e67204c61726765"
-        "72205468616e20426c6f636b2d53697a"
-        "65204b6579202d2048617368204b6579"
-        "204669727374",
-        "80b24263c7c1a3ebb71493c1dd7be8b4"
-        "9b46d1f41b4aeec1121b013783f8f352"
-        "6b56d037e05f2598bd0fd2215d6a1e52"
-        "95e64f73f63f0aec8b915a985d786598"
-    },
-    {
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
-        "aaaaaa",
-        "54686973206973206120746573742075"
-        "73696e672061206c6172676572207468"
-        "616e20626c6f636b2d73697a65206b65"
-        "7920616e642061206c61726765722074"
-        "68616e20626c6f636b2d73697a652064"
-        "6174612e20546865206b6579206e6565"
-        "647320746f2062652068617368656420"
-        "6265666f7265206265696e6720757365"
-        "642062792074686520484d414320616c"
-        "676f726974686d2e",
-        "e37b6a775dc87dbaa4dfa9f96e5e3ffd"
-        "debd71f8867289865df5a32d20cdc944"
-        "b6022cac3c4982b10d5eeb55c3e4de15"
-        "134676fb6de0446065c97440fa8c6a58"
-    }
-};
-
-BOOST_AUTO_TEST_CASE(hmacsha512_testvectors)
-{
-    for (unsigned int n=0; n<sizeof(vtest)/sizeof(vtest[0]); n++)
-    {
-        std::vector<unsigned char> vchKey  = ParseHex(vtest[n].pszKey);
-        std::vector<unsigned char> vchData = ParseHex(vtest[n].pszData);
-        std::vector<unsigned char> vchMAC  = ParseHex(vtest[n].pszMAC);
-        unsigned char vchTemp[64];
-        CHMAC_SHA512(&vchKey[0], vchKey.size()).Write(&vchData[0], vchData.size()).Finalize(&vchTemp[0]);
-        BOOST_CHECK(memcmp(&vchTemp[0], &vchMAC[0], 64) == 0);
-    }
-}
-
-BOOST_AUTO_TEST_SUITE_END()

From 54372482a8ffa363f5dd9ff1c80141a168109ed5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 9 Jun 2014 14:58:30 -0400
Subject: [PATCH 0210/1819] build: move bitcoin-config.h to its own directory

This allows us to include its path without making other header includes valid.
---
 configure.ac      | 2 +-
 src/Makefile.am   | 4 +++-
 src/config/.empty | 0
 3 files changed, 4 insertions(+), 2 deletions(-)
 create mode 100644 src/config/.empty

diff --git a/configure.ac b/configure.ac
index 81a32f9fb759..0caf653cadd4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,7 +111,7 @@ AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[spec
 
 
 AC_CONFIG_SRCDIR([src])
-AC_CONFIG_HEADERS([src/bitcoin-config.h])
+AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
 
 dnl Checks for programs.
 AC_PROG_CXX
diff --git a/src/Makefile.am b/src/Makefile.am
index 01655b7011db..c666fb7662b9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -17,7 +17,8 @@ $(LIBLEVELDB) $(LIBMEMENV):
           OPT="$(CXXFLAGS) $(CPPFLAGS)"
 endif
 
-BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
+BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
+BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BITCOIN_CONFIG_INCLUDES) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
 
 noinst_LIBRARIES = \
   libbitcoin_server.a \
@@ -219,6 +220,7 @@ EXTRA_DIST = leveldb
 clean-local:
 	-$(MAKE) -C leveldb clean
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
+	-rm -f config.h
 
 .rc.o:
 	@test -f $(WINDRES)
diff --git a/src/config/.empty b/src/config/.empty
new file mode 100644
index 000000000000..e69de29bb2d1

From f2647cc0e997198d7ac7f3fe3d843e941b57dda8 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 9 Jun 2014 15:05:28 -0400
Subject: [PATCH 0211/1819] crypto: explicitly check for byte read/write
 functions

Don't depend on hard-coded platform lists
---
 configure.ac        |  7 +++-
 src/crypto/common.h | 79 ++++++++++++++++++++++++++++++++++++---------
 2 files changed, 69 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0caf653cadd4..811ef1dd806e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -368,7 +368,12 @@ if test x$TARGET_OS = xdarwin; then
   AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
 fi
 
-AC_CHECK_HEADERS([stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h])
+AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h])
+
+AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, htobe64],,,
+		[#if HAVE_ENDIAN_H
+                 #include <endian.h>
+                 #endif])
 
 dnl Check for MSG_NOSIGNAL
 AC_MSG_CHECKING(for MSG_NOSIGNAL)
diff --git a/src/crypto/common.h b/src/crypto/common.h
index e1bcd3ae1142..8f675a16c5be 100644
--- a/src/crypto/common.h
+++ b/src/crypto/common.h
@@ -5,42 +5,89 @@
 #ifndef BITCOIN_CRYPTO_COMMON_H
 #define BITCOIN_CRYPTO_COMMON_H
 
+#if defined(HAVE_CONFIG_H)
+#include "bitcoin-config.h"
+#endif
 #include <stdint.h>
+#if defined(HAVE_ENDIAN_H)
+#include <endian.h>
+#endif
+
+uint32_t static inline ReadLE32(const unsigned char *ptr) {
+#if HAVE_DECL_LE32TOH == 1
+    return le32toh(*((uint32_t*)ptr));
+#elif !defined(WORDS_BIGENDIAN)
+    return *((uint32_t*)ptr);
+#else
+    return ((uint32_t)ptr[3] << 24 | (uint32_t)ptr[2] << 16 | (uint32_t)ptr[1] << 8 | (uint32_t)ptr[0]);
+#endif
+}
+
+uint64_t static inline ReadLE64(const unsigned char *ptr) {
 
-#ifdef WIN32
-uint32_t static inline ReadLE32(const unsigned char *ptr) { return *((uint32_t*)ptr); }
-uint64_t static inline ReadLE64(const unsigned char *ptr) { return *((uint64_t*)ptr); }
+#if HAVE_DECL_LE64TOH == 1
+    return le64toh(*((uint64_t*)ptr));
+#elif !defined(WORDS_BIGENDIAN)
+    return *((uint64_t*)ptr);
+#else
+    return ((uint64_t)ptr[7] << 56 | (uint64_t)ptr[6] << 48 | (uint64_t)ptr[5] << 40 | (uint64_t)ptr[4] << 32 |
+            (uint64_t)ptr[3] << 24 | (uint64_t)ptr[2] << 16 | (uint64_t)ptr[1] << 8 | (uint64_t)ptr[0]);
+#endif
+}
 
-void static inline WriteLE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = x; }
-void static inline WriteLE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = x; }
+void static inline WriteLE32(unsigned char *ptr, uint32_t x) {
+#if HAVE_DECL_HTOLE32 == 1
+    *((uint32_t*)ptr) = htole32(x);
+#elif !defined(WORDS_BIGENDIAN)
+    *((uint32_t*)ptr) = x;
+#else
+    ptr[3] = x >> 24; ptr[2] = x >> 16; ptr[1] = x >> 8; ptr[0] = x;
+#endif
+}
+
+void static inline WriteLE64(unsigned char *ptr, uint64_t x) {
+#if HAVE_DECL_HTOLE64 == 1
+    *((uint64_t*)ptr) = htole64(x);
+#elif !defined(WORDS_BIGENDIAN)
+    *((uint64_t*)ptr) = x;
+#else
+    ptr[7] = x >> 56; ptr[6] = x >> 48; ptr[5] = x >> 40; ptr[4] = x >> 32;
+    ptr[3] = x >> 24; ptr[2] = x >> 16; ptr[1] = x >> 8; ptr[0] = x;
+#endif
+}
 
 uint32_t static inline ReadBE32(const unsigned char *ptr) {
+#if HAVE_DECL_BE32TOH == 1
+    return be32toh(*((uint32_t*)ptr));
+#else
     return ((uint32_t)ptr[0] << 24 | (uint32_t)ptr[1] << 16 | (uint32_t)ptr[2] << 8 | (uint32_t)ptr[3]);
+#endif
 }
 
 uint64_t static inline ReadBE64(const unsigned char *ptr) {
+#if HAVE_DECL_BE64TOH == 1
+    return be64toh(*((uint64_t*)ptr));
+#else
     return ((uint64_t)ptr[0] << 56 | (uint64_t)ptr[1] << 48 | (uint64_t)ptr[2] << 40 | (uint64_t)ptr[3] << 32 |
             (uint64_t)ptr[4] << 24 | (uint64_t)ptr[5] << 16 | (uint64_t)ptr[6] << 8 | (uint64_t)ptr[7]);
+#endif
 }
 
 void static inline WriteBE32(unsigned char *ptr, uint32_t x) {
+#if HAVE_DECL_HTOBE32 == 1
+    *((uint32_t*)ptr) = htobe32(x);
+#else
     ptr[0] = x >> 24; ptr[1] = x >> 16; ptr[2] = x >> 8; ptr[3] = x;
+#endif
 }
 
 void static inline WriteBE64(unsigned char *ptr, uint64_t x) {
+#if HAVE_DECL_HTOBE64 == 1
+    *((uint64_t*)ptr) = htobe64(x);
+#else
     ptr[0] = x >> 56; ptr[1] = x >> 48; ptr[2] = x >> 40; ptr[3] = x >> 32;
     ptr[4] = x >> 24; ptr[5] = x >> 16; ptr[6] = x >> 8; ptr[7] = x;
+#endif
 }
-#else
-#  include <endian.h>
-uint32_t static inline ReadLE32(const unsigned char *ptr) { return le32toh(*((uint32_t*)ptr)); }
-uint64_t static inline ReadLE64(const unsigned char *ptr) { return le64toh(*((uint64_t*)ptr)); }
-void static inline WriteLE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = htole32(x); }
-void static inline WriteLE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = htole64(x); }
 
-uint32_t static inline ReadBE32(const unsigned char *ptr) { return be32toh(*((uint32_t*)ptr)); }
-uint64_t static inline ReadBE64(const unsigned char *ptr) { return be64toh(*((uint64_t*)ptr)); }
-void static inline WriteBE32(unsigned char *ptr, uint32_t x) { *((uint32_t*)ptr) = htobe32(x); }
-void static inline WriteBE64(unsigned char *ptr, uint64_t x) { *((uint64_t*)ptr) = htobe64(x); }
-#endif
 #endif

From 4791b99e2dea0593775a8c75f62c8406d340191e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 9 Jun 2014 15:17:27 -0400
Subject: [PATCH 0212/1819] crypto: create a separate lib for crypto functions

This lib has no dependencies on other bitcoin functionality. Attempting to
use bitcoin headers will result in a failure to compile.
---
 src/Makefile.am             | 23 +++++++++++++++--------
 src/Makefile.qt.include     |  2 +-
 src/Makefile.qttest.include |  2 +-
 src/Makefile.test.include   |  2 +-
 4 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index c666fb7662b9..3948ca078089 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,7 +23,8 @@ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BITCOIN_CONFIG_INCLUDES) $(BO
 noinst_LIBRARIES = \
   libbitcoin_server.a \
   libbitcoin_common.a \
-  libbitcoin_cli.a
+  libbitcoin_cli.a \
+  crypto/libbitcoin_crypto.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
 noinst_LIBRARIES += libbitcoin_wallet.a
@@ -76,10 +77,6 @@ BITCOIN_CORE_H = \
   rpcserver.h \
   script.h \
   serialize.h \
-  crypto/common.h \
-  crypto/sha2.h \
-  crypto/sha1.h \
-  crypto/ripemd160.h \
   sync.h \
   threadsafety.h \
   tinyformat.h \
@@ -145,6 +142,16 @@ libbitcoin_wallet_a_SOURCES = \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
 
+crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
+crypto_libbitcoin_crypto_a_SOURCES = \
+  crypto/sha1.cpp \
+  crypto/sha2.cpp \
+  crypto/ripemd160.cpp \
+  crypto/common.h \
+  crypto/sha2.h \
+  crypto/sha1.h \
+  crypto/ripemd160.h
+
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
   base58.cpp \
@@ -157,9 +164,6 @@ libbitcoin_common_a_SOURCES = \
   protocol.cpp \
   rpcprotocol.cpp \
   script.cpp \
-  crypto/sha1.cpp \
-  crypto/sha2.cpp \
-  crypto/ripemd160.cpp \
   sync.cpp \
   util.cpp \
   version.cpp \
@@ -183,6 +187,7 @@ nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
 bitcoind_LDADD = \
   libbitcoin_server.a \
   libbitcoin_common.a \
+  crypto/libbitcoin_crypto.a \
   $(LIBLEVELDB) \
   $(LIBMEMENV)
 if ENABLE_WALLET
@@ -202,6 +207,7 @@ bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
 bitcoin_cli_LDADD = \
   libbitcoin_cli.a \
   libbitcoin_common.a \
+  crypto/libbitcoin_crypto.a \
   $(BOOST_LIBS)
 bitcoin_cli_SOURCES = bitcoin-cli.cpp
 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
@@ -238,6 +244,7 @@ LIBBITCOIN_SERVER=libbitcoin_server.a
 LIBBITCOIN_WALLET=libbitcoin_wallet.a
 LIBBITCOIN_COMMON=libbitcoin_common.a
 LIBBITCOIN_CLI=libbitcoin_cli.a
+LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
 LIBBITCOINQT=qt/libbitcoinqt.a
 
 if ENABLE_TESTS
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 647434e1efc7..091138dc38f0 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -355,7 +355,7 @@ qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
 
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index e0b49d02408a..0aa31a406d8a 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -30,7 +30,7 @@ qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) \
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 02fb3ba5feeb..64f997f4b5a2 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -63,7 +63,7 @@ endif
 
 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
-test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBLEVELDB) $(LIBMEMENV) \
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
 if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)

From a0495bb68c6eff9c732d458bacab10490d6452b4 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Thu, 12 Jun 2014 13:34:29 +0200
Subject: [PATCH 0213/1819] Add <Hasher>::OUTPUT_SIZE

---
 src/crypto/ripemd160.cpp  |  2 +-
 src/crypto/ripemd160.h    |  4 +++-
 src/crypto/sha1.cpp       |  2 +-
 src/crypto/sha1.h         |  4 +++-
 src/crypto/sha2.cpp       |  6 +++---
 src/crypto/sha2.h         | 12 +++++++++---
 src/hash.h                | 16 ++++++++++------
 src/test/crypto_tests.cpp |  1 +
 8 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
index c5e6e2d69678..24bd318d43e6 100644
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -184,7 +184,7 @@ CRIPEMD160& CRIPEMD160::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CRIPEMD160::Finalize(unsigned char *hash) {
+void CRIPEMD160::Finalize(unsigned char hash[OUTPUT_SIZE]) {
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteLE64(sizedesc, bytes << 3);
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index cab1d0bb46ea..44bd4879a509 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -16,9 +16,11 @@ class CRIPEMD160 {
     size_t bytes;
 
 public:
+    static const size_t OUTPUT_SIZE = 20;
+
     CRIPEMD160();
     CRIPEMD160& Write(const unsigned char *data, size_t len);
-    void Finalize(unsigned char *hash);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CRIPEMD160& Reset();
 };
 
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
index e0f32b7d1d10..304401a50fa6 100644
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -172,7 +172,7 @@ CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA1::Finalize(unsigned char *hash) {
+void CSHA1::Finalize(unsigned char hash[OUTPUT_SIZE]) {
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteBE64(sizedesc, bytes << 3);
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index 6efde78a5b78..b16f2c88ce7c 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -16,9 +16,11 @@ class CSHA1 {
     size_t bytes;
 
 public:
+    static const size_t OUTPUT_SIZE = 20;
+
     CSHA1();
     CSHA1& Write(const unsigned char *data, size_t len);
-    void Finalize(unsigned char *hash);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA1& Reset();
 };
 
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp
index 77f35f38d804..99a251cb1274 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -295,7 +295,7 @@ CSHA256& CSHA256::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA256::Finalize(unsigned char *hash) {
+void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE]) {
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteBE64(sizedesc, bytes << 3);
@@ -348,7 +348,7 @@ CSHA512& CSHA512::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA512::Finalize(unsigned char *hash) {
+void CSHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) {
     static const unsigned char pad[128] = {0x80};
     unsigned char sizedesc[16] = {0x00};
     WriteBE64(sizedesc+8, bytes << 3);
@@ -391,7 +391,7 @@ CHMAC_SHA512::CHMAC_SHA512(const unsigned char *key, size_t keylen) {
     inner.Write(rkey, 128);
 }
 
-void CHMAC_SHA512::Finalize(unsigned char *hash) {
+void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) {
     unsigned char temp[64];
     inner.Finalize(temp);
     outer.Write(temp, 64).Finalize(hash);
diff --git a/src/crypto/sha2.h b/src/crypto/sha2.h
index 001bfc647cde..088d5e194c73 100644
--- a/src/crypto/sha2.h
+++ b/src/crypto/sha2.h
@@ -16,9 +16,11 @@ class CSHA256 {
     size_t bytes;
 
 public:
+    static const size_t OUTPUT_SIZE = 32;
+
     CSHA256();
     CSHA256& Write(const unsigned char *data, size_t len);
-    void Finalize(unsigned char *hash);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA256& Reset();
 };
 
@@ -30,9 +32,11 @@ class CSHA512 {
     size_t bytes;
 
 public:
+    static const size_t OUTPUT_SIZE = 64;
+
     CSHA512();
     CSHA512& Write(const unsigned char *data, size_t len);
-    void Finalize(unsigned char *hash);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA512& Reset();
 };
 
@@ -43,12 +47,14 @@ class CHMAC_SHA512 {
     CSHA512 inner;
 
 public:
+    static const size_t OUTPUT_SIZE = 64;
+
     CHMAC_SHA512(const unsigned char *key, size_t keylen);
     CHMAC_SHA512& Write(const unsigned char *data, size_t len) {
         inner.Write(data, len);
         return *this;
     }
-    void Finalize(unsigned char *hash);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
 };
 
 #endif
diff --git a/src/hash.h b/src/hash.h
index 39d42eefe26f..f2a0ebfe1f25 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -19,10 +19,12 @@ class CHash256 {
 private:
     CSHA256 sha;
 public:
-    void Finalize(unsigned char *hash) {
-        unsigned char buf[32];
+    static const size_t OUTPUT_SIZE = CSHA256::OUTPUT_SIZE;
+
+    void Finalize(unsigned char hash[OUTPUT_SIZE]) {
+        unsigned char buf[sha.OUTPUT_SIZE];
         sha.Finalize(buf);
-        sha.Reset().Write(buf, 32).Finalize(hash);
+        sha.Reset().Write(buf, sha.OUTPUT_SIZE).Finalize(hash);
     }
 
     CHash256& Write(const unsigned char *data, size_t len) {
@@ -41,10 +43,12 @@ class CHash160 {
 private:
     CSHA256 sha;
 public:
-    void Finalize(unsigned char *hash) {
-        unsigned char buf[32];
+    static const size_t OUTPUT_SIZE = CRIPEMD160::OUTPUT_SIZE;
+
+    void Finalize(unsigned char hash[OUTPUT_SIZE]) {
+        unsigned char buf[sha.OUTPUT_SIZE];
         sha.Finalize(buf);
-        CRIPEMD160().Write(buf, 32).Finalize(hash);
+        CRIPEMD160().Write(buf, sha.OUTPUT_SIZE).Finalize(hash);
     }
 
     CHash160& Write(const unsigned char *data, size_t len) {
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index d425f082c3ac..7bd98fa381e1 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -16,6 +16,7 @@ BOOST_AUTO_TEST_SUITE(crypto_tests)
 template<typename Hasher, typename In, typename Out>
 void TestVector(const Hasher &h, const In &in, const Out &out) {
     Out hash;
+    BOOST_CHECK(out.size() == h.OUTPUT_SIZE);
     hash.resize(out.size());
     {
         // Test that writing the whole input string at once works.

From 040c2d3f5748fc41f80207d771a0a8c10ec79ba9 Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Sat, 21 Jun 2014 21:57:50 +0100
Subject: [PATCH 0214/1819] Fix formatting

---
 doc/release-process.md | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 5b96e537537a..9cdc43b9bea7 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -50,8 +50,7 @@ Release Process
 	wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz'
 	wget 'https://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.bz2'
 	wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
-	wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O \ 
-	     boost-mingw-gas-cross-compile-2013-03-03.patch
+	wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O boost-mingw-gas-cross-compile-2013-03-03.patch
 	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
 	wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
 	wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
@@ -61,10 +60,8 @@ Release Process
 	wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
 	wget 'http://cdrkit.org/releases/cdrkit-1.1.11.tar.gz'
 	wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
-	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O \
-	     clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-        wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O \
-	     cdrkit-deterministic.patch
+	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+	wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O cdrkit-deterministic.patch
 	cd ..
 	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml
 	mv build/out/boost-*.zip inputs/

From 4949004d68dc08382df2c34ae519c1b1cfd60f1a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 7 Jun 2014 13:53:27 +0200
Subject: [PATCH 0215/1819] Add CMutableTransaction and make CTransaction
 immutable.

In addition, introduce a cached hash inside CTransaction, to prevent
recalculating it over and over again.
---
 src/chainparams.cpp            |  2 +-
 src/core.cpp                   | 25 ++++++++-
 src/core.h                     | 93 ++++++++++++++++++++++------------
 src/miner.cpp                  | 18 ++++---
 src/qt/coincontroldialog.cpp   |  2 +-
 src/rpcrawtransaction.cpp      | 10 ++--
 src/script.cpp                 |  6 +--
 src/script.h                   |  5 +-
 src/test/DoS_tests.cpp         | 12 ++---
 src/test/accounting_tests.cpp  | 12 ++++-
 src/test/miner_tests.cpp       | 12 +++--
 src/test/multisig_tests.cpp    |  8 +--
 src/test/pmt_tests.cpp         |  4 +-
 src/test/script_P2SH_tests.cpp | 18 +++----
 src/test/script_tests.cpp      | 12 ++---
 src/test/sighash_tests.cpp     |  6 +--
 src/test/transaction_tests.cpp | 14 ++---
 src/test/wallet_tests.cpp      | 10 ++--
 src/wallet.cpp                 | 18 ++++---
 19 files changed, 181 insertions(+), 106 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 31eac62d48fa..afbae6fc5727 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -127,7 +127,7 @@ class CMainParams : public CChainParams {
         //     CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
         //   vMerkleTree: 4a5e1e
         const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
-        CTransaction txNew;
+        CMutableTransaction txNew;
         txNew.vin.resize(1);
         txNew.vout.resize(1);
         txNew.vin[0].scriptSig = CScript() << 486604799 << CScriptNum(4) << vector<unsigned char>((const unsigned char*)pszTimestamp, (const unsigned char*)pszTimestamp + strlen(pszTimestamp));
diff --git a/src/core.cpp b/src/core.cpp
index 6039986e6c64..6c5ee1c0f873 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -91,11 +91,34 @@ std::string CFeeRate::ToString() const
     return result;
 }
 
-uint256 CTransaction::GetHash() const
+CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
+CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {}
+
+uint256 CMutableTransaction::GetHash() const
 {
     return SerializeHash(*this);
 }
 
+void CTransaction::UpdateHash() const
+{
+    *const_cast<uint256*>(&hash) = SerializeHash(*this);
+}
+
+CTransaction::CTransaction() : hash(0), nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0) { }
+
+CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {
+    UpdateHash();
+}
+
+CTransaction& CTransaction::operator=(const CTransaction &tx) {
+    *const_cast<int*>(&nVersion) = tx.nVersion;
+    *const_cast<std::vector<CTxIn>*>(&vin) = tx.vin;
+    *const_cast<std::vector<CTxOut>*>(&vout) = tx.vout;
+    *const_cast<unsigned int*>(&nLockTime) = tx.nLockTime;
+    *const_cast<uint256*>(&hash) = tx.hash;
+    return *this;
+}
+
 int64_t CTransaction::GetValueOut() const
 {
     int64_t nValueOut = 0;
diff --git a/src/core.h b/src/core.h
index 0e5912934962..1a20145ccf72 100644
--- a/src/core.h
+++ b/src/core.h
@@ -203,49 +203,59 @@ class CTxOut
 };
 
 
+struct CMutableTransaction;
+
 /** The basic transaction that is broadcasted on the network and contained in
  * blocks.  A transaction can contain multiple inputs and outputs.
  */
 class CTransaction
 {
+private:
+    /** Memory only. */
+    const uint256 hash;
+    void UpdateHash() const;
+
 public:
     static CFeeRate minTxFee;
     static CFeeRate minRelayTxFee;
     static const int CURRENT_VERSION=1;
-    int nVersion;
-    std::vector<CTxIn> vin;
-    std::vector<CTxOut> vout;
-    unsigned int nLockTime;
 
-    CTransaction()
-    {
-        SetNull();
-    }
+    // The local variables are made const to prevent unintended modification
+    // without updating the cached hash value. However, CTransaction is not
+    // actually immutable; deserialization and assignment are implemented,
+    // and bypass the constness. This is safe, as they update the entire
+    // structure, including the hash.
+    const int nVersion;
+    const std::vector<CTxIn> vin;
+    const std::vector<CTxOut> vout;
+    const unsigned int nLockTime;
 
-    IMPLEMENT_SERIALIZE
-    (
-        READWRITE(this->nVersion);
+    /** Construct a CTransaction that qualifies as IsNull() */
+    CTransaction();
+
+    /** Convert a CMutableTransaction into a CTransaction. */
+    CTransaction(const CMutableTransaction &tx);
+
+    CTransaction& operator=(const CTransaction& tx);
+
+    IMPLEMENT_SERIALIZE(
+        READWRITE(*const_cast<int*>(&this->nVersion));
         nVersion = this->nVersion;
-        READWRITE(vin);
-        READWRITE(vout);
-        READWRITE(nLockTime);
+        READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
+        READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
+        READWRITE(*const_cast<unsigned int*>(&nLockTime));
+        if (fRead)
+            UpdateHash();
     )
 
-    void SetNull()
-    {
-        nVersion = CTransaction::CURRENT_VERSION;
-        vin.clear();
-        vout.clear();
-        nLockTime = 0;
+    bool IsNull() const {
+        return vin.empty() && vout.empty();
     }
 
-    bool IsNull() const
-    {
-        return (vin.empty() && vout.empty());
+    const uint256& GetHash() const {
+        return hash;
     }
 
-    uint256 GetHash() const;
-
     // Return sum of txouts.
     int64_t GetValueOut() const;
     // GetValueIn() is a method on CCoinsViewCache, because
@@ -261,22 +271,43 @@ class CTransaction
 
     friend bool operator==(const CTransaction& a, const CTransaction& b)
     {
-        return (a.nVersion  == b.nVersion &&
-                a.vin       == b.vin &&
-                a.vout      == b.vout &&
-                a.nLockTime == b.nLockTime);
+        return a.hash == b.hash;
     }
 
     friend bool operator!=(const CTransaction& a, const CTransaction& b)
     {
-        return !(a == b);
+        return a.hash != b.hash;
     }
 
-
     std::string ToString() const;
     void print() const;
 };
 
+/** A mutable version of CTransaction. */
+struct CMutableTransaction
+{
+    int nVersion;
+    std::vector<CTxIn> vin;
+    std::vector<CTxOut> vout;
+    unsigned int nLockTime;
+
+    CMutableTransaction();
+    CMutableTransaction(const CTransaction& tx);
+
+    IMPLEMENT_SERIALIZE(
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(vin);
+        READWRITE(vout);
+        READWRITE(nLockTime);
+    )
+
+    /** Compute the hash of this CMutableTransaction. This is computed on the
+     * fly, as opposed to GetHash() in CTransaction, which uses a cached result.
+     */
+    uint256 GetHash() const;
+};
+
 /** wrapper for CTxOut that provides a more compact serialization */
 class CTxOutCompressor
 {
diff --git a/src/miner.cpp b/src/miner.cpp
index 7efca7cfff85..37cdc7d840db 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -86,14 +86,14 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     CBlock *pblock = &pblocktemplate->block; // pointer for convenience
 
     // Create coinbase tx
-    CTransaction txNew;
+    CMutableTransaction txNew;
     txNew.vin.resize(1);
     txNew.vin[0].prevout.SetNull();
     txNew.vout.resize(1);
     txNew.vout[0].scriptPubKey = scriptPubKeyIn;
 
-    // Add our coinbase tx as first transaction
-    pblock->vtx.push_back(txNew);
+    // Add dummy coinbase tx as first transaction
+    pblock->vtx.push_back(CTransaction());
     pblocktemplate->vTxFees.push_back(-1); // updated at end
     pblocktemplate->vTxSigOps.push_back(-1); // updated at end
 
@@ -294,7 +294,10 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         nLastBlockSize = nBlockSize;
         LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
 
-        pblock->vtx[0].vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
+        // Compute final coinbase transaction.
+        txNew.vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
+        txNew.vin[0].scriptSig = CScript() << OP_0 << OP_0;
+        pblock->vtx[0] = txNew;
         pblocktemplate->vTxFees[0] = -nFees;
 
         // Fill in header
@@ -302,7 +305,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         UpdateTime(*pblock, pindexPrev);
         pblock->nBits          = GetNextWorkRequired(pindexPrev, pblock);
         pblock->nNonce         = 0;
-        pblock->vtx[0].vin[0].scriptSig = CScript() << OP_0 << OP_0;
         pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
 
         CBlockIndex indexDummy(*pblock);
@@ -328,9 +330,11 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
     }
     ++nExtraNonce;
     unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
-    pblock->vtx[0].vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
-    assert(pblock->vtx[0].vin[0].scriptSig.size() <= 100);
+    CMutableTransaction txCoinbase(pblock->vtx[0]);
+    txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
+    assert(txCoinbase.vin[0].scriptSig.size() <= 100);
 
+    pblock->vtx[0] = txCoinbase;
     pblock->hashMerkleRoot = pblock->BuildMerkleTree();
 }
 
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 42d6da7d371a..52bdf9673116 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -440,7 +440,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     // nPayAmount
     qint64 nPayAmount = 0;
     bool fDust = false;
-    CTransaction txDummy;
+    CMutableTransaction txDummy;
     foreach(const qint64 &amount, CoinControlDialog::payAmounts)
     {
         nPayAmount += amount;
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index dee7daeb2a98..1b5d494beb55 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -349,7 +349,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
     Array inputs = params[0].get_array();
     Object sendTo = params[1].get_obj();
 
-    CTransaction rawTx;
+    CMutableTransaction rawTx;
 
     BOOST_FOREACH(const Value& input, inputs)
     {
@@ -554,11 +554,11 @@ Value signrawtransaction(const Array& params, bool fHelp)
 
     vector<unsigned char> txData(ParseHexV(params[0], "argument 1"));
     CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
-    vector<CTransaction> txVariants;
+    vector<CMutableTransaction> txVariants;
     while (!ssData.empty())
     {
         try {
-            CTransaction tx;
+            CMutableTransaction tx;
             ssData >> tx;
             txVariants.push_back(tx);
         }
@@ -572,7 +572,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
 
     // mergedTx will end up with all the signatures; it
     // starts as a clone of the rawtx:
-    CTransaction mergedTx(txVariants[0]);
+    CMutableTransaction mergedTx(txVariants[0]);
     bool fComplete = true;
 
     // Fetch previous transactions (inputs):
@@ -713,7 +713,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
             SignSignature(keystore, prevPubKey, mergedTx, i, nHashType);
 
         // ... and merge in other signatures:
-        BOOST_FOREACH(const CTransaction& txv, txVariants)
+        BOOST_FOREACH(const CMutableTransaction& txv, txVariants)
         {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
diff --git a/src/script.cpp b/src/script.cpp
index b383a00a6ec8..c83d26885a6a 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1636,7 +1636,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
 }
 
 
-bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType)
+bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
 {
     assert(nIn < txTo.vin.size());
     CTxIn& txin = txTo.vin[nIn];
@@ -1671,7 +1671,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransa
     return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
 }
 
-bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType)
+bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
 {
     assert(nIn < txTo.vin.size());
     CTxIn& txin = txTo.vin[nIn];
@@ -1689,7 +1689,7 @@ static CScript PushAll(const vector<valtype>& values)
     return result;
 }
 
-static CScript CombineMultisig(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction& txTo, unsigned int nIn,
                                const vector<valtype>& vSolutions,
                                vector<valtype>& sigs1, vector<valtype>& sigs2)
 {
diff --git a/src/script.h b/src/script.h
index a282e7dc04db..bd6574627aaa 100644
--- a/src/script.h
+++ b/src/script.h
@@ -20,6 +20,7 @@
 class CCoins;
 class CKeyStore;
 class CTransaction;
+class CMutableTransaction;
 
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
@@ -805,8 +806,8 @@ bool IsMine(const CKeyStore& keystore, const CTxDestination &dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
-bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
-bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
+bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
+bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 
 // Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index fb06fb343547..3a45844411f2 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -167,7 +167,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
     // 50 orphan transactions:
     for (int i = 0; i < 50; i++)
     {
-        CTransaction tx;
+        CMutableTransaction tx;
         tx.vin.resize(1);
         tx.vin[0].prevout.n = 0;
         tx.vin[0].prevout.hash = GetRandHash();
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
     {
         CTransaction txPrev = RandomOrphan();
 
-        CTransaction tx;
+        CMutableTransaction tx;
         tx.vin.resize(1);
         tx.vin[0].prevout.n = 0;
         tx.vin[0].prevout.hash = txPrev.GetHash();
@@ -201,7 +201,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
     {
         CTransaction txPrev = RandomOrphan();
 
-        CTransaction tx;
+        CMutableTransaction tx;
         tx.vout.resize(1);
         tx.vout[0].nValue = 1*CENT;
         tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
@@ -242,10 +242,10 @@ BOOST_AUTO_TEST_CASE(DoS_checkSig)
 
     // 100 orphan transactions:
     static const int NPREV=100;
-    CTransaction orphans[NPREV];
+    CMutableTransaction orphans[NPREV];
     for (int i = 0; i < NPREV; i++)
     {
-        CTransaction& tx = orphans[i];
+        CMutableTransaction& tx = orphans[i];
         tx.vin.resize(1);
         tx.vin[0].prevout.n = 0;
         tx.vin[0].prevout.hash = GetRandHash();
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE(DoS_checkSig)
     }
 
     // Create a transaction that depends on orphans:
-    CTransaction tx;
+    CMutableTransaction tx;
     tx.vout.resize(1);
     tx.vout[0].nValue = 1*CENT;
     tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp
index e2a75da349df..4bee0f6b6e26 100644
--- a/src/test/accounting_tests.cpp
+++ b/src/test/accounting_tests.cpp
@@ -83,13 +83,21 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
 
 
     wtx.mapValue["comment"] = "y";
-    --wtx.nLockTime;  // Just to change the hash :)
+    {
+        CMutableTransaction tx(wtx);
+        --tx.nLockTime;  // Just to change the hash :)
+        *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+    }
     pwalletMain->AddToWallet(wtx);
     vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
     vpwtx[1]->nTimeReceived = (unsigned int)1333333336;
 
     wtx.mapValue["comment"] = "x";
-    --wtx.nLockTime;  // Just to change the hash :)
+    {
+        CMutableTransaction tx(wtx);
+        --tx.nLockTime;  // Just to change the hash :)
+        *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+    }
     pwalletMain->AddToWallet(wtx);
     vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
     vpwtx[2]->nTimeReceived = (unsigned int)1333333329;
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index bff6de41a326..47977cf29540 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
 {
     CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
     CBlockTemplate *pblocktemplate;
-    CTransaction tx,tx2;
+    CMutableTransaction tx,tx2;
     CScript script;
     uint256 hash;
 
@@ -68,10 +68,12 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
         CBlock *pblock = &pblocktemplate->block; // pointer for convenience
         pblock->nVersion = 1;
         pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
-        pblock->vtx[0].vin[0].scriptSig = CScript();
-        pblock->vtx[0].vin[0].scriptSig.push_back(blockinfo[i].extranonce);
-        pblock->vtx[0].vin[0].scriptSig.push_back(chainActive.Height());
-        pblock->vtx[0].vout[0].scriptPubKey = CScript();
+        CMutableTransaction txCoinbase(pblock->vtx[0]);
+        txCoinbase.vin[0].scriptSig = CScript();
+        txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce);
+        txCoinbase.vin[0].scriptSig.push_back(chainActive.Height());
+        txCoinbase.vout[0].scriptPubKey = CScript();
+        pblock->vtx[0] = CTransaction(txCoinbase);
         if (txFirst.size() < 2)
             txFirst.push_back(new CTransaction(pblock->vtx[0]));
         pblock->hashMerkleRoot = pblock->BuildMerkleTree();
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 3775abd63346..452cf084a744 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -55,13 +55,13 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     CScript escrow;
     escrow << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
 
-    CTransaction txFrom;  // Funding transaction
+    CMutableTransaction txFrom;  // Funding transaction
     txFrom.vout.resize(3);
     txFrom.vout[0].scriptPubKey = a_and_b;
     txFrom.vout[1].scriptPubKey = a_or_b;
     txFrom.vout[2].scriptPubKey = escrow;
 
-    CTransaction txTo[3]; // Spending transaction
+    CMutableTransaction txTo[3]; // Spending transaction
     for (int i = 0; i < 3; i++)
     {
         txTo[i].vin.resize(1);
@@ -270,13 +270,13 @@ BOOST_AUTO_TEST_CASE(multisig_Sign)
     CScript escrow;
     escrow << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
 
-    CTransaction txFrom;  // Funding transaction
+    CMutableTransaction txFrom;  // Funding transaction
     txFrom.vout.resize(3);
     txFrom.vout[0].scriptPubKey = a_and_b;
     txFrom.vout[1].scriptPubKey = a_or_b;
     txFrom.vout[2].scriptPubKey = escrow;
 
-    CTransaction txTo[3]; // Spending transaction
+    CMutableTransaction txTo[3]; // Spending transaction
     for (int i = 0; i < 3; i++)
     {
         txTo[i].vin.resize(1);
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index 7d7e6681dfa5..9dce4daac6c9 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -36,9 +36,9 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
         // build a block with some dummy transactions
         CBlock block;
         for (unsigned int j=0; j<nTx; j++) {
-            CTransaction tx;
+            CMutableTransaction tx;
             tx.nLockTime = rand(); // actual transaction data doesn't matter; just make the nLockTime's unique
-            block.vtx.push_back(tx);
+            block.vtx.push_back(CTransaction(tx));
         }
 
         // calculate actual merkle root and height
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 9b1290e0ea07..a75593a8b290 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -30,11 +30,11 @@ static bool
 Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict)
 {
     // Create dummy to/from transactions:
-    CTransaction txFrom;
+    CMutableTransaction txFrom;
     txFrom.vout.resize(1);
     txFrom.vout[0].scriptPubKey = scriptPubKey;
 
-    CTransaction txTo;
+    CMutableTransaction txTo;
     txTo.vin.resize(1);
     txTo.vout.resize(1);
     txTo.vin[0].prevout.n = 0;
@@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(sign)
         evalScripts[i].SetDestination(standardScripts[i].GetID());
     }
 
-    CTransaction txFrom;  // Funding transaction:
+    CMutableTransaction txFrom;  // Funding transaction:
     string reason;
     txFrom.vout.resize(8);
     for (int i = 0; i < 4; i++)
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(sign)
     }
     BOOST_CHECK(IsStandardTx(txFrom, reason));
 
-    CTransaction txTo[8]; // Spending transactions
+    CMutableTransaction txTo[8]; // Spending transactions
     for (int i = 0; i < 8; i++)
     {
         txTo[i].vin.resize(1);
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(set)
         keystore.AddCScript(inner[i]);
     }
 
-    CTransaction txFrom;  // Funding transaction:
+    CMutableTransaction txFrom;  // Funding transaction:
     string reason;
     txFrom.vout.resize(4);
     for (int i = 0; i < 4; i++)
@@ -183,7 +183,7 @@ BOOST_AUTO_TEST_CASE(set)
     }
     BOOST_CHECK(IsStandardTx(txFrom, reason));
 
-    CTransaction txTo[4]; // Spending transactions
+    CMutableTransaction txTo[4]; // Spending transactions
     for (int i = 0; i < 4; i++)
     {
         txTo[i].vin.resize(1);
@@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
         keys.push_back(key[i].GetPubKey());
     }
 
-    CTransaction txFrom;
+    CMutableTransaction txFrom;
     txFrom.vout.resize(6);
 
     // First three are standard:
@@ -299,7 +299,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 
     coins.SetCoins(txFrom.GetHash(), CCoins(txFrom, 0));
 
-    CTransaction txTo;
+    CMutableTransaction txTo;
     txTo.vout.resize(1);
     txTo.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
 
@@ -326,7 +326,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
         txTo.vin[i].scriptSig = t;
     }
 
-    CTransaction txToNonStd;
+    CMutableTransaction txToNonStd;
     txToNonStd.vout.resize(1);
     txToNonStd.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
     txToNonStd.vout[0].nValue = 1000;
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 29d518d707f2..cba582e941a7 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -240,11 +240,11 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     CScript scriptPubKey12;
     scriptPubKey12 << OP_1 << key1.GetPubKey() << key2.GetPubKey() << OP_2 << OP_CHECKMULTISIG;
 
-    CTransaction txFrom12;
+    CMutableTransaction txFrom12;
     txFrom12.vout.resize(1);
     txFrom12.vout[0].scriptPubKey = scriptPubKey12;
 
-    CTransaction txTo12;
+    CMutableTransaction txTo12;
     txTo12.vin.resize(1);
     txTo12.vout.resize(1);
     txTo12.vin[0].prevout.n = 0;
@@ -274,11 +274,11 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     CScript scriptPubKey23;
     scriptPubKey23 << OP_2 << key1.GetPubKey() << key2.GetPubKey() << key3.GetPubKey() << OP_3 << OP_CHECKMULTISIG;
 
-    CTransaction txFrom23;
+    CMutableTransaction txFrom23;
     txFrom23.vout.resize(1);
     txFrom23.vout[0].scriptPubKey = scriptPubKey23;
 
-    CTransaction txTo23;
+    CMutableTransaction txTo23;
     txTo23.vin.resize(1);
     txTo23.vout.resize(1);
     txTo23.vin[0].prevout.n = 0;
@@ -345,11 +345,11 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
         keystore.AddKey(key);
     }
 
-    CTransaction txFrom;
+    CMutableTransaction txFrom;
     txFrom.vout.resize(1);
     txFrom.vout[0].scriptPubKey.SetDestination(keys[0].GetPubKey().GetID());
     CScript& scriptPubKey = txFrom.vout[0].scriptPubKey;
-    CTransaction txTo;
+    CMutableTransaction txTo;
     txTo.vin.resize(1);
     txTo.vout.resize(1);
     txTo.vin[0].prevout.n = 0;
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 353fd60f7b8a..423ae4a789fd 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -28,7 +28,7 @@ uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, un
         printf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn);
         return 1;
     }
-    CTransaction txTmp(txTo);
+    CMutableTransaction txTmp(txTo);
 
     // In case concatenating two scripts ends up with two codeseparators,
     // or an extra one at the end, this prevents all those possible incompatibilities.
@@ -90,7 +90,7 @@ void static RandomScript(CScript &script) {
         script << oplist[insecure_rand() % (sizeof(oplist)/sizeof(oplist[0]))];
 }
 
-void static RandomTransaction(CTransaction &tx, bool fSingle) {
+void static RandomTransaction(CMutableTransaction &tx, bool fSingle) {
     tx.nVersion = insecure_rand();
     tx.vin.clear();
     tx.vout.clear();
@@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(sighash_test)
     #endif
     for (int i=0; i<nRandomTests; i++) {
         int nHashType = insecure_rand();
-        CTransaction txTo;
+        CMutableTransaction txTo;
         RandomTransaction(txTo, (nHashType & 0x1f) == SIGHASH_SINGLE);
         CScript scriptCode;
         RandomScript(scriptCode);
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index feba5ee80e02..238033f407b0 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE(basic_transaction_tests)
     unsigned char ch[] = {0x01, 0x00, 0x00, 0x00, 0x01, 0x6b, 0xff, 0x7f, 0xcd, 0x4f, 0x85, 0x65, 0xef, 0x40, 0x6d, 0xd5, 0xd6, 0x3d, 0x4f, 0xf9, 0x4f, 0x31, 0x8f, 0xe8, 0x20, 0x27, 0xfd, 0x4d, 0xc4, 0x51, 0xb0, 0x44, 0x74, 0x01, 0x9f, 0x74, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x49, 0x30, 0x46, 0x02, 0x21, 0x00, 0xda, 0x0d, 0xc6, 0xae, 0xce, 0xfe, 0x1e, 0x06, 0xef, 0xdf, 0x05, 0x77, 0x37, 0x57, 0xde, 0xb1, 0x68, 0x82, 0x09, 0x30, 0xe3, 0xb0, 0xd0, 0x3f, 0x46, 0xf5, 0xfc, 0xf1, 0x50, 0xbf, 0x99, 0x0c, 0x02, 0x21, 0x00, 0xd2, 0x5b, 0x5c, 0x87, 0x04, 0x00, 0x76, 0xe4, 0xf2, 0x53, 0xf8, 0x26, 0x2e, 0x76, 0x3e, 0x2d, 0xd5, 0x1e, 0x7f, 0xf0, 0xbe, 0x15, 0x77, 0x27, 0xc4, 0xbc, 0x42, 0x80, 0x7f, 0x17, 0xbd, 0x39, 0x01, 0x41, 0x04, 0xe6, 0xc2, 0x6e, 0xf6, 0x7d, 0xc6, 0x10, 0xd2, 0xcd, 0x19, 0x24, 0x84, 0x78, 0x9a, 0x6c, 0xf9, 0xae, 0xa9, 0x93, 0x0b, 0x94, 0x4b, 0x7e, 0x2d, 0xb5, 0x34, 0x2b, 0x9d, 0x9e, 0x5b, 0x9f, 0xf7, 0x9a, 0xff, 0x9a, 0x2e, 0xe1, 0x97, 0x8d, 0xd7, 0xfd, 0x01, 0xdf, 0xc5, 0x22, 0xee, 0x02, 0x28, 0x3d, 0x3b, 0x06, 0xa9, 0xd0, 0x3a, 0xcf, 0x80, 0x96, 0x96, 0x8d, 0x7d, 0xbb, 0x0f, 0x91, 0x78, 0xff, 0xff, 0xff, 0xff, 0x02, 0x8b, 0xa7, 0x94, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xba, 0xde, 0xec, 0xfd, 0xef, 0x05, 0x07, 0x24, 0x7f, 0xc8, 0xf7, 0x42, 0x41, 0xd7, 0x3b, 0xc0, 0x39, 0x97, 0x2d, 0x7b, 0x88, 0xac, 0x40, 0x94, 0xa8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xc1, 0x09, 0x32, 0x48, 0x3f, 0xec, 0x93, 0xed, 0x51, 0xf5, 0xfe, 0x95, 0xe7, 0x25, 0x59, 0xf2, 0xcc, 0x70, 0x43, 0xf9, 0x88, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00};
     vector<unsigned char> vch(ch, ch + sizeof(ch) -1);
     CDataStream stream(vch, SER_DISK, CLIENT_VERSION);
-    CTransaction tx;
+    CMutableTransaction tx;
     stream >> tx;
     CValidationState state;
     BOOST_CHECK_MESSAGE(CheckTransaction(tx, state) && state.IsValid(), "Simple deserialized transaction should be valid.");
@@ -224,10 +224,10 @@ BOOST_AUTO_TEST_CASE(basic_transaction_tests)
 // paid to a TX_PUBKEY, the second 21 and 22 CENT outputs
 // paid to a TX_PUBKEYHASH.
 //
-static std::vector<CTransaction>
+static std::vector<CMutableTransaction>
 SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsView & coinsRet)
 {
-    std::vector<CTransaction> dummyTransactions;
+    std::vector<CMutableTransaction> dummyTransactions;
     dummyTransactions.resize(2);
 
     // Add some keys to the keystore:
@@ -261,9 +261,9 @@ BOOST_AUTO_TEST_CASE(test_Get)
     CBasicKeyStore keystore;
     CCoinsView coinsDummy;
     CCoinsViewCache coins(coinsDummy);
-    std::vector<CTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
+    std::vector<CMutableTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
 
-    CTransaction t1;
+    CMutableTransaction t1;
     t1.vin.resize(3);
     t1.vin[0].prevout.hash = dummyTransactions[0].GetHash();
     t1.vin[0].prevout.n = 1;
@@ -296,9 +296,9 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
     CBasicKeyStore keystore;
     CCoinsView coinsDummy;
     CCoinsViewCache coins(coinsDummy);
-    std::vector<CTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
+    std::vector<CMutableTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
 
-    CTransaction t;
+    CMutableTransaction t;
     t.vin.resize(1);
     t.vin[0].prevout.hash = dummyTransactions[0].GetHash();
     t.vin[0].prevout.n = 1;
diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp
index 1993358826a2..86a83f516396 100644
--- a/src/test/wallet_tests.cpp
+++ b/src/test/wallet_tests.cpp
@@ -31,16 +31,18 @@ static vector<COutput> vCoins;
 static void add_coin(int64_t nValue, int nAge = 6*24, bool fIsFromMe = false, int nInput=0)
 {
     static int nextLockTime = 0;
-    CTransaction tx;
+    CMutableTransaction tx;
     tx.nLockTime = nextLockTime++;        // so all transactions get different hashes
     tx.vout.resize(nInput+1);
     tx.vout[nInput].nValue = nValue;
+    if (fIsFromMe) {
+        // IsFromMe() returns (GetDebit() > 0), and GetDebit() is 0 if vin.empty(),
+        // so stop vin being empty, and cache a non-zero Debit to fake out IsFromMe()
+        tx.vin.resize(1);
+    }
     CWalletTx* wtx = new CWalletTx(&wallet, tx);
     if (fIsFromMe)
     {
-        // IsFromMe() returns (GetDebit() > 0), and GetDebit() is 0 if vin.empty(),
-        // so stop vin being empty, and cache a non-zero Debit to fake out IsFromMe()
-        wtx->vin.resize(1);
         wtx->fDebitCached = true;
         wtx->nDebitCached = 1;
     }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3176cf893ae2..0e0a0e87d381 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1245,6 +1245,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
     }
 
     wtxNew.BindWallet(this);
+    CMutableTransaction txNew;
 
     {
         LOCK2(cs_main, cs_wallet);
@@ -1252,8 +1253,8 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
             nFeeRet = payTxFee.GetFeePerK();
             while (true)
             {
-                wtxNew.vin.clear();
-                wtxNew.vout.clear();
+                txNew.vin.clear();
+                txNew.vout.clear();
                 wtxNew.fFromMe = true;
 
                 int64_t nTotalValue = nValue + nFeeRet;
@@ -1267,7 +1268,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                         strFailReason = _("Transaction amount too small");
                         return false;
                     }
-                    wtxNew.vout.push_back(txout);
+                    txNew.vout.push_back(txout);
                 }
 
                 // Choose coins to use
@@ -1331,8 +1332,8 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                     else
                     {
                         // Insert change txn at random position:
-                        vector<CTxOut>::iterator position = wtxNew.vout.begin()+GetRandInt(wtxNew.vout.size()+1);
-                        wtxNew.vout.insert(position, newTxOut);
+                        vector<CTxOut>::iterator position = txNew.vout.begin()+GetRandInt(txNew.vout.size()+1);
+                        txNew.vout.insert(position, newTxOut);
                     }
                 }
                 else
@@ -1340,17 +1341,20 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
 
                 // Fill vin
                 BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
-                    wtxNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second));
+                    txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second));
 
                 // Sign
                 int nIn = 0;
                 BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
-                    if (!SignSignature(*this, *coin.first, wtxNew, nIn++))
+                    if (!SignSignature(*this, *coin.first, txNew, nIn++))
                     {
                         strFailReason = _("Signing transaction failed");
                         return false;
                     }
 
+                // Embed the constructed transaction data in wtxNew.
+                *static_cast<CTransaction*>(&wtxNew) = CTransaction(txNew);
+
                 // Limit size
                 unsigned int nBytes = ::GetSerializeSize(*(CTransaction*)&wtxNew, SER_NETWORK, PROTOCOL_VERSION);
                 if (nBytes >= MAX_STANDARD_TX_SIZE)

From d38da59bf68fbb37535e2579bfb7355a16baed0e Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 9 Jun 2014 10:02:00 +0200
Subject: [PATCH 0216/1819] Code simplifications after CTransaction::GetHash()
 caching

---
 src/bloom.cpp             |  3 +-
 src/bloom.h               |  2 +-
 src/core.h                |  6 ----
 src/main.cpp              | 59 ++++++++++++++++++---------------------
 src/main.h                |  6 ++--
 src/miner.cpp             |  4 +--
 src/net.cpp               | 10 +++----
 src/net.h                 |  4 +--
 src/rpcrawtransaction.cpp |  6 ++--
 src/test/bloom_tests.cpp  | 26 ++++++++---------
 src/wallet.cpp            | 15 +++++-----
 src/wallet.h              |  4 +--
 12 files changed, 67 insertions(+), 78 deletions(-)

diff --git a/src/bloom.cpp b/src/bloom.cpp
index 1bfcbd406f4f..26e366179cad 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -99,7 +99,7 @@ bool CBloomFilter::IsWithinSizeConstraints() const
     return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;
 }
 
-bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx, const uint256& hash)
+bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx)
 {
     bool fFound = false;
     // Match if the filter contains the hash of tx
@@ -108,6 +108,7 @@ bool CBloomFilter::IsRelevantAndUpdate(const CTransaction& tx, const uint256& ha
         return true;
     if (isEmpty)
         return false;
+    const uint256& hash = tx.GetHash();
     if (contains(hash))
         fFound = true;
 
diff --git a/src/bloom.h b/src/bloom.h
index 75e3f38c55cc..956bead87f87 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -83,7 +83,7 @@ class CBloomFilter
     bool IsWithinSizeConstraints() const;
 
     // Also adds any outputs which match the filter to the filter (to match their spending txes)
-    bool IsRelevantAndUpdate(const CTransaction& tx, const uint256& hash);
+    bool IsRelevantAndUpdate(const CTransaction& tx);
 
     // Checks for empty and full filters to avoid wasting cpu
     void UpdateEmptyFull();
diff --git a/src/core.h b/src/core.h
index 1a20145ccf72..27fda95552fd 100644
--- a/src/core.h
+++ b/src/core.h
@@ -496,12 +496,6 @@ class CBlock : public CBlockHeader
 
     uint256 BuildMerkleTree() const;
 
-    const uint256 &GetTxHash(unsigned int nIndex) const {
-        assert(vMerkleTree.size() > 0); // BuildMerkleTree must have been called first
-        assert(nIndex < vtx.size());
-        return vMerkleTree[nIndex];
-    }
-
     std::vector<uint256> GetMerkleBranch(int nIndex) const;
     static uint256 CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMerkleBranch, int nIndex);
     void print() const;
diff --git a/src/main.cpp b/src/main.cpp
index 006ec7cabc01..d3f04b95fa79 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -130,8 +130,8 @@ namespace {
 
 namespace {
 struct CMainSignals {
-    // Notifies listeners of updated transaction data (passing hash, transaction, and optionally the block it is found in.
-    boost::signals2::signal<void (const uint256 &, const CTransaction &, const CBlock *)> SyncTransaction;
+    // Notifies listeners of updated transaction data (transaction, and optionally the block it is found in.
+    boost::signals2::signal<void (const CTransaction &, const CBlock *)> SyncTransaction;
     // Notifies listeners of an erased transaction (currently disabled, requires transaction replacement).
     boost::signals2::signal<void (const uint256 &)> EraseTransaction;
     // Notifies listeners of an updated transaction without new data (for now: a coinbase potentially becoming visible).
@@ -146,7 +146,7 @@ struct CMainSignals {
 }
 
 void RegisterWallet(CWalletInterface* pwalletIn) {
-    g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2, _3));
+    g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
     g_signals.EraseTransaction.connect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
     g_signals.UpdatedTransaction.connect(boost::bind(&CWalletInterface::UpdatedTransaction, pwalletIn, _1));
     g_signals.SetBestChain.connect(boost::bind(&CWalletInterface::SetBestChain, pwalletIn, _1));
@@ -160,7 +160,7 @@ void UnregisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SetBestChain.disconnect(boost::bind(&CWalletInterface::SetBestChain, pwalletIn, _1));
     g_signals.UpdatedTransaction.disconnect(boost::bind(&CWalletInterface::UpdatedTransaction, pwalletIn, _1));
     g_signals.EraseTransaction.disconnect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
-    g_signals.SyncTransaction.disconnect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2, _3));
+    g_signals.SyncTransaction.disconnect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
 }
 
 void UnregisterAllWallets() {
@@ -172,8 +172,8 @@ void UnregisterAllWallets() {
     g_signals.SyncTransaction.disconnect_all_slots();
 }
 
-void SyncWithWallets(const uint256 &hash, const CTransaction &tx, const CBlock *pblock) {
-    g_signals.SyncTransaction(hash, tx, pblock);
+void SyncWithWallets(const CTransaction &tx, const CBlock *pblock) {
+    g_signals.SyncTransaction(tx, pblock);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -952,7 +952,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         pool.addUnchecked(hash, entry);
     }
 
-    g_signals.SyncTransaction(hash, tx, NULL);
+    g_signals.SyncTransaction(tx, NULL);
 
     return true;
 }
@@ -1479,7 +1479,7 @@ void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev)
 
 
 
-void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight, const uint256 &txhash)
+void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)
 {
     bool ret;
     // mark inputs spent
@@ -1494,7 +1494,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
     }
 
     // add outputs
-    ret = inputs.SetCoins(txhash, CCoins(tx, nHeight));
+    ret = inputs.SetCoins(tx.GetHash(), CCoins(tx, nHeight));
     assert(ret);
 }
 
@@ -1767,8 +1767,8 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
                           !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) ||
                            (pindex->nHeight==91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721")));
     if (fEnforceBIP30) {
-        for (unsigned int i = 0; i < block.vtx.size(); i++) {
-            uint256 hash = block.GetTxHash(i);
+        BOOST_FOREACH(const CTransaction& tx, block.vtx) {
+            const uint256& hash = tx.GetHash();
             if (view.HaveCoins(hash) && !view.GetCoins(hash).IsPruned())
                 return state.DoS(100, error("ConnectBlock() : tried to overwrite transaction"),
                                  REJECT_INVALID, "bad-txns-BIP30");
@@ -1829,11 +1829,11 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
         }
 
         CTxUndo txundo;
-        UpdateCoins(tx, state, view, txundo, pindex->nHeight, block.GetTxHash(i));
+        UpdateCoins(tx, state, view, txundo, pindex->nHeight);
         if (!tx.IsCoinBase())
             blockundo.vtxundo.push_back(txundo);
 
-        vPos.push_back(std::make_pair(block.GetTxHash(i), pos));
+        vPos.push_back(std::make_pair(tx.GetHash(), pos));
         pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);
     }
     int64_t nTime = GetTimeMicros() - nStart;
@@ -1892,13 +1892,13 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     assert(ret);
 
     // Watch for transactions paying to me
-    for (unsigned int i = 0; i < block.vtx.size(); i++)
-        g_signals.SyncTransaction(block.GetTxHash(i), block.vtx[i], &block);
+    BOOST_FOREACH(const CTransaction& tx, block.vtx)
+        g_signals.SyncTransaction(tx, &block);
 
     // Watch for changes to the previous coinbase transaction.
     static uint256 hashPrevBestCoinBase;
     g_signals.UpdatedTransaction(hashPrevBestCoinBase);
-    hashPrevBestCoinBase = block.GetTxHash(0);
+    hashPrevBestCoinBase = block.vtx[0].GetHash();
 
     return true;
 }
@@ -1996,7 +1996,7 @@ bool static DisconnectTip(CValidationState &state) {
     // Let wallets know transactions went from 1-confirmed to
     // 0-confirmed or conflicted:
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
-        SyncWithWallets(tx.GetHash(), tx, NULL);
+        SyncWithWallets(tx, NULL);
     }
     return true;
 }
@@ -2036,11 +2036,11 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     // Tell wallet about transactions that went from mempool
     // to conflicted:
     BOOST_FOREACH(const CTransaction &tx, txConflicted) {
-        SyncWithWallets(tx.GetHash(), tx, NULL);
+        SyncWithWallets(tx, NULL);
     }
     // ... and about transactions that got confirmed:
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
-        SyncWithWallets(tx.GetHash(), tx, &block);
+        SyncWithWallets(tx, &block);
     }
     return true;
 }
@@ -2381,16 +2381,11 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         if (!CheckTransaction(tx, state))
             return error("CheckBlock() : CheckTransaction failed");
 
-    // Build the merkle tree already. We need it anyway later, and it makes the
-    // block cache the transaction hashes, which means they don't need to be
-    // recalculated many times during this block's validation.
-    block.BuildMerkleTree();
-
     // Check for duplicate txids. This is caught by ConnectInputs(),
     // but catching it earlier avoids a potential DoS attack:
     set<uint256> uniqueTx;
-    for (unsigned int i = 0; i < block.vtx.size(); i++) {
-        uniqueTx.insert(block.GetTxHash(i));
+    BOOST_FOREACH(const CTransaction &tx, block.vtx) {
+        uniqueTx.insert(tx.GetHash());
     }
     if (uniqueTx.size() != block.vtx.size())
         return state.DoS(100, error("CheckBlock() : duplicate transaction"),
@@ -2406,7 +2401,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                          REJECT_INVALID, "bad-blk-sigops", true);
 
     // Check merkle root
-    if (fCheckMerkleRoot && block.hashMerkleRoot != block.vMerkleTree.back())
+    if (fCheckMerkleRoot && block.hashMerkleRoot != block.BuildMerkleTree())
         return state.DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"),
                          REJECT_INVALID, "bad-txnmrklroot", true);
 
@@ -2682,8 +2677,8 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
 
     for (unsigned int i = 0; i < block.vtx.size(); i++)
     {
-        uint256 hash = block.vtx[i].GetHash();
-        if (filter.IsRelevantAndUpdate(block.vtx[i], hash))
+        const uint256& hash = block.vtx[i].GetHash();
+        if (filter.IsRelevantAndUpdate(block.vtx[i]))
         {
             vMatch.push_back(true);
             vMatchedTxn.push_back(make_pair(i, hash));
@@ -3832,7 +3827,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
         {
             mempool.check(pcoinsTip);
-            RelayTransaction(tx, inv.hash);
+            RelayTransaction(tx);
             mapAlreadyAskedFor.erase(inv);
             vWorkQueue.push_back(inv.hash);
             vEraseQueue.push_back(inv.hash);
@@ -3862,7 +3857,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
                     if (AcceptToMemoryPool(mempool, stateDummy, orphanTx, true, &fMissingInputs2))
                     {
                         LogPrint("mempool", "   accepted orphan tx %s\n", orphanHash.ToString());
-                        RelayTransaction(orphanTx, orphanHash);
+                        RelayTransaction(orphanTx);
                         mapAlreadyAskedFor.erase(CInv(MSG_TX, orphanHash));
                         vWorkQueue.push_back(orphanHash);
                         vEraseQueue.push_back(orphanHash);
@@ -3947,7 +3942,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             CTransaction tx;
             bool fInMemPool = mempool.lookup(hash, tx);
             if (!fInMemPool) continue; // another thread removed since queryHashes, maybe...
-            if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(tx, hash)) ||
+            if ((pfrom->pfilter && pfrom->pfilter->IsRelevantAndUpdate(tx)) ||
                (!pfrom->pfilter))
                 vInv.push_back(inv);
             if (vInv.size() == MAX_INV_SZ) {
diff --git a/src/main.h b/src/main.h
index 5a0aedcde18e..7071f0094ffa 100644
--- a/src/main.h
+++ b/src/main.h
@@ -113,7 +113,7 @@ void UnregisterWallet(CWalletInterface* pwalletIn);
 /** Unregister all wallets from core */
 void UnregisterAllWallets();
 /** Push an updated transaction to all registered wallets */
-void SyncWithWallets(const uint256 &hash, const CTransaction& tx, const CBlock* pblock = NULL);
+void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL);
 
 /** Register with a network node to receive its signals */
 void RegisterNodeSignals(CNodeSignals& nodeSignals);
@@ -294,7 +294,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCach
                  std::vector<CScriptCheck> *pvChecks = NULL);
 
 // Apply the effects of this transaction on the UTXO set represented by view
-void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight, const uint256 &txhash);
+void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight);
 
 // Context-independent validity checks
 bool CheckTransaction(const CTransaction& tx, CValidationState& state);
@@ -1129,7 +1129,7 @@ class CMerkleBlock
 
 class CWalletInterface {
 protected:
-    virtual void SyncTransaction(const uint256 &hash, const CTransaction &tx, const CBlock *pblock) =0;
+    virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) =0;
     virtual void EraseFromWallet(const uint256 &hash) =0;
     virtual void SetBestChain(const CBlockLocator &locator) =0;
     virtual void UpdatedTransaction(const uint256 &hash) =0;
diff --git a/src/miner.cpp b/src/miner.cpp
index 37cdc7d840db..63ce1250678b 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -254,8 +254,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 continue;
 
             CTxUndo txundo;
-            uint256 hash = tx.GetHash();
-            UpdateCoins(tx, state, view, txundo, pindexPrev->nHeight+1, hash);
+            const uint256& hash = tx.GetHash();
+            UpdateCoins(tx, state, view, txundo, pindexPrev->nHeight+1);
 
             // Added
             pblock->vtx.push_back(tx);
diff --git a/src/net.cpp b/src/net.cpp
index 757a06aaed33..fe6b07aa942c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1808,17 +1808,17 @@ instance_of_cnetcleanup;
 
 
 
-void RelayTransaction(const CTransaction& tx, const uint256& hash)
+void RelayTransaction(const CTransaction& tx)
 {
     CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
     ss.reserve(10000);
     ss << tx;
-    RelayTransaction(tx, hash, ss);
+    RelayTransaction(tx, ss);
 }
 
-void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss)
+void RelayTransaction(const CTransaction& tx, const CDataStream& ss)
 {
-    CInv inv(MSG_TX, hash);
+    CInv inv(MSG_TX, tx.GetHash());
     {
         LOCK(cs_mapRelay);
         // Expire old relay messages
@@ -1840,7 +1840,7 @@ void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataSt
         LOCK(pnode->cs_filter);
         if (pnode->pfilter)
         {
-            if (pnode->pfilter->IsRelevantAndUpdate(tx, hash))
+            if (pnode->pfilter->IsRelevantAndUpdate(tx))
                 pnode->PushInventory(inv);
         } else
             pnode->PushInventory(inv);
diff --git a/src/net.h b/src/net.h
index 14d578a72a21..eec92f340c51 100644
--- a/src/net.h
+++ b/src/net.h
@@ -726,8 +726,8 @@ class CNode
 
 
 class CTransaction;
-void RelayTransaction(const CTransaction& tx, const uint256& hash);
-void RelayTransaction(const CTransaction& tx, const uint256& hash, const CDataStream& ss);
+void RelayTransaction(const CTransaction& tx);
+void RelayTransaction(const CTransaction& tx, const CDataStream& ss);
 
 /** Access to the (IP) address database (peers.dat) */
 class CAddrDB
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 1b5d494beb55..9771f8e68501 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -770,7 +770,7 @@ Value sendrawtransaction(const Array& params, bool fHelp)
     catch (std::exception &e) {
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
     }
-    uint256 hashTx = tx.GetHash();
+    const uint256 &hashTx = tx.GetHash();
 
     CCoinsViewCache &view = *pcoinsTip;
     CCoins existingCoins;
@@ -780,7 +780,7 @@ Value sendrawtransaction(const Array& params, bool fHelp)
         // push to local node and sync with wallets
         CValidationState state;
         if (AcceptToMemoryPool(mempool, state, tx, false, NULL, !fOverrideFees))
-            SyncWithWallets(hashTx, tx, NULL);
+            SyncWithWallets(tx, NULL);
         else {
             if(state.IsInvalid())
                 throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
@@ -790,7 +790,7 @@ Value sendrawtransaction(const Array& params, bool fHelp)
     } else if (fHaveChain) {
         throw JSONRPCError(RPC_TRANSACTION_ALREADY_IN_CHAIN, "transaction already in block chain");
     }
-    RelayTransaction(tx, hashTx);
+    RelayTransaction(tx);
 
     return hashTx.GetHex();
 }
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index abedd3093ce1..b56d998be29c 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -118,33 +118,33 @@ BOOST_AUTO_TEST_CASE(bloom_match)
 
     CBloomFilter filter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(uint256("0xb4749f017444b051c44dfd2720e88f314ff94f3dd6d56d40ef65854fcd7fff6b"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match tx hash");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match tx hash");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     // byte-reversed tx hash
     filter.insert(ParseHex("6bff7fcd4f8565ef406dd5d63d4ff94f318fe82027fd4dc451b04474019f74b4"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match manually serialized tx hash");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match manually serialized tx hash");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(ParseHex("30450220070aca44506c5cef3a16ed519d7c3c39f8aab192c4e1c90d065f37b8a4af6141022100a8e160b856c2d43d27d8fba71e5aef6405b8643ac4cb7cb3c462aced7f14711a01"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match input signature");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match input signature");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(ParseHex("046d11fee51b0e60666d5049a9101a72741df480b96ee26488a4d3466b95c9a40ac5eeef87e10a5cd336c19a84565f80fa6c547957b7700ff4dfbdefe76036c339"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match input pub key");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match input pub key");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(ParseHex("04943fdd508053c75000106d3bc6e2754dbcff19"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match output address");
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(spendingTx, spendingTx.GetHash()), "Simple Bloom filter didn't add output");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match output address");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(spendingTx), "Simple Bloom filter didn't add output");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(ParseHex("a266436d2965547608b9e15d9032a7b9d64fa431"));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match output address");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match output address");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(COutPoint(uint256("0x90c122d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 0));
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match COutPoint");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match COutPoint");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     COutPoint prevOutPoint(uint256("0x90c122d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 0);
@@ -154,23 +154,23 @@ BOOST_AUTO_TEST_CASE(bloom_match)
         memcpy(&data[32], &prevOutPoint.n, sizeof(unsigned int));
         filter.insert(data);
     }
-    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter didn't match manually serialized COutPoint");
+    BOOST_CHECK_MESSAGE(filter.IsRelevantAndUpdate(tx), "Simple Bloom filter didn't match manually serialized COutPoint");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(uint256("00000009e784f32f62ef849763d4f45b98e07ba658647343b915ff832b110436"));
-    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter matched random tx hash");
+    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched random tx hash");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(ParseHex("0000006d2965547608b9e15d9032a7b9d64fa431"));
-    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter matched random address");
+    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched random address");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(COutPoint(uint256("0x90c122d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 1));
-    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter matched COutPoint for an output we didn't care about");
+    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched COutPoint for an output we didn't care about");
 
     filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
     filter.insert(COutPoint(uint256("0x000000d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 0));
-    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx, tx.GetHash()), "Simple Bloom filter matched COutPoint for an output we didn't care about");
+    BOOST_CHECK_MESSAGE(!filter.IsRelevantAndUpdate(tx), "Simple Bloom filter matched COutPoint for an output we didn't care about");
 }
 
 BOOST_AUTO_TEST_CASE(merkle_block_1)
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 0e0a0e87d381..7664d6c25c94 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -603,11 +603,11 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
 // Add a transaction to the wallet, or update it.
 // pblock is optional, but should be provided if the transaction is known to be in a block.
 // If fUpdate is true, existing transactions will be updated.
-bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate)
+bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate)
 {
     {
         AssertLockHeld(cs_wallet);
-        bool fExisted = mapWallet.count(hash);
+        bool fExisted = mapWallet.count(tx.GetHash());
         if (fExisted && !fUpdate) return false;
         if (fExisted || IsMine(tx) || IsFromMe(tx))
         {
@@ -621,10 +621,10 @@ bool CWallet::AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction&
     return false;
 }
 
-void CWallet::SyncTransaction(const uint256 &hash, const CTransaction& tx, const CBlock* pblock)
+void CWallet::SyncTransaction(const CTransaction& tx, const CBlock* pblock)
 {
     LOCK2(cs_main, cs_wallet);
-    if (!AddToWalletIfInvolvingMe(hash, tx, pblock, true))
+    if (!AddToWalletIfInvolvingMe(tx, pblock, true))
         return; // Not one of ours
 
     // If a transaction changes 'conflicted' state, that changes the balance
@@ -870,7 +870,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
             ReadBlockFromDisk(block, pindex);
             BOOST_FOREACH(CTransaction& tx, block.vtx)
             {
-                if (AddToWalletIfInvolvingMe(tx.GetHash(), tx, &block, fUpdate))
+                if (AddToWalletIfInvolvingMe(tx, &block, fUpdate))
                     ret++;
             }
             pindex = chainActive.Next(pindex);
@@ -909,9 +909,8 @@ void CWalletTx::RelayWalletTransaction()
     if (!IsCoinBase())
     {
         if (GetDepthInMainChain() == 0) {
-            uint256 hash = GetHash();
-            LogPrintf("Relaying wtx %s\n", hash.ToString());
-            RelayTransaction((CTransaction)*this, hash);
+            LogPrintf("Relaying wtx %s\n", GetHash().ToString());
+            RelayTransaction((CTransaction)*this);
         }
     }
 }
diff --git a/src/wallet.h b/src/wallet.h
index 7df656fc25fd..424799b14e42 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -244,8 +244,8 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     void MarkDirty();
     bool AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet=false);
-    void SyncTransaction(const uint256 &hash, const CTransaction& tx, const CBlock* pblock);
-    bool AddToWalletIfInvolvingMe(const uint256 &hash, const CTransaction& tx, const CBlock* pblock, bool fUpdate);
+    void SyncTransaction(const CTransaction& tx, const CBlock* pblock);
+    bool AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate);
     void EraseFromWallet(const uint256 &hash);
     int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false);
     void ReacceptWalletTransactions();

From 0655fac0b11c7fa1992f50537887728a0878a5eb Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 10 May 2014 14:47:16 +0200
Subject: [PATCH 0217/1819] miner: indentation fixes, remove for (;;)

- change a for (;;) into while (true), as we nowhere else use the first
- init nNonceFound to 0
- fix indentation in BitcoinMiner try/catch block
---
 src/miner.cpp | 199 +++++++++++++++++++++++++-------------------------
 1 file changed, 101 insertions(+), 98 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 7efca7cfff85..3daf823fd884 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -49,7 +49,6 @@ class COrphan
     }
 };
 
-
 uint64_t nLastBlockTx = 0;
 uint64_t nLastBlockSize = 0;
 
@@ -58,8 +57,10 @@ typedef boost::tuple<double, CFeeRate, const CTransaction*> TxPriority;
 class TxPriorityCompare
 {
     bool byFee;
+
 public:
     TxPriorityCompare(bool _byFee) : byFee(_byFee) { }
+
     bool operator()(const TxPriority& a, const TxPriority& b)
     {
         if (byFee)
@@ -114,6 +115,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
     // Collect memory pool transactions into the block
     int64_t nFees = 0;
+
     {
         LOCK2(cs_main, mempool.cs);
         CBlockIndex* pindexPrev = chainActive.Tip();
@@ -269,7 +271,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             if (fPrintPriority)
             {
                 LogPrintf("priority %.1f fee %s txid %s\n",
-                          dPriority, feeRate.ToString(), tx.GetHash().ToString());
+                    dPriority, feeRate.ToString(), tx.GetHash().ToString());
             }
 
             // Add transactions that depend on this one to the priority queue
@@ -334,7 +336,6 @@ void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int&
     pblock->hashMerkleRoot = pblock->BuildMerkleTree();
 }
 
-
 #ifdef ENABLE_WALLET
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -349,7 +350,8 @@ int64_t nHPSTimerStart = 0;
 // nonce is 0xffff0000 or above, the block is rebuilt and nNonce starts over at
 // zero.
 //
-bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phash) {
+bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phash)
+{
     // Write the first 76 bytes of the block header to a double-SHA256 state.
     CHash256 hasher;
     CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -357,7 +359,7 @@ bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phas
     assert(ss.size() == 80);
     hasher.Write((unsigned char*)&ss[0], 76);
 
-    for (;;) {
+    while (true) {
         nNonce++;
 
         // Write the last 4 bytes of the block header (the nonce) to a copy of
@@ -435,114 +437,115 @@ void static BitcoinMiner(CWallet *pwallet)
     CReserveKey reservekey(pwallet);
     unsigned int nExtraNonce = 0;
 
-    try { while (true) {
-        if (Params().MiningRequiresPeers()) {
-            // Busy-wait for the network to come online so we don't waste time mining
-            // on an obsolete chain. In regtest mode we expect to fly solo.
-            while (vNodes.empty())
-                MilliSleep(1000);
-        }
-
-        //
-        // Create new block
-        //
-        unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
-        CBlockIndex* pindexPrev = chainActive.Tip();
-
-        auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
-        if (!pblocktemplate.get())
-            return;
-        CBlock *pblock = &pblocktemplate->block;
-        IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
-
-        LogPrintf("Running BitcoinMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
-               ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
-
-        //
-        // Search
-        //
-        int64_t nStart = GetTime();
-        uint256 hashTarget = uint256().SetCompact(pblock->nBits);
-        uint256 hash;
-        uint32_t nNonce = 0;
-        uint32_t nOldNonce = 0;
-        while (true)
-        {
-            bool fFound = ScanHash(pblock, nNonce, &hash);
-            uint32_t nHashesDone = nNonce - nOldNonce;
-            nOldNonce = nNonce;
+    try {
+        while (true) {
+            if (Params().MiningRequiresPeers()) {
+                // Busy-wait for the network to come online so we don't waste time mining
+                // on an obsolete chain. In regtest mode we expect to fly solo.
+                while (vNodes.empty())
+                    MilliSleep(1000);
+            }
 
-            // Check if something found
-            if (fFound)
-            {
-                if (hash <= hashTarget)
+            //
+            // Create new block
+            //
+            unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
+            CBlockIndex* pindexPrev = chainActive.Tip();
+
+            auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
+            if (!pblocktemplate.get())
+                return;
+            CBlock *pblock = &pblocktemplate->block;
+            IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
+
+            LogPrintf("Running BitcoinMiner with %u transactions in block (%u bytes)\n", pblock->vtx.size(),
+                ::GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION));
+
+            //
+            // Search
+            //
+            int64_t nStart = GetTime();
+            uint256 hashTarget = uint256().SetCompact(pblock->nBits);
+            uint256 hash;
+            uint32_t nNonce = 0;
+            uint32_t nOldNonce = 0;
+            while (true) {
+                bool fFound = ScanHash(pblock, nNonce, &hash);
+                uint32_t nHashesDone = nNonce - nOldNonce;
+                nOldNonce = nNonce;
+
+                // Check if something found
+                if (fFound)
                 {
-                    // Found a solution
-                    pblock->nNonce = nNonce;
-                    assert(hash == pblock->GetHash());
+                    if (hash <= hashTarget)
+                    {
+                        // Found a solution
+                        pblock->nNonce = nNonce;
+                        assert(hash == pblock->GetHash());
 
-                    SetThreadPriority(THREAD_PRIORITY_NORMAL);
-                    CheckWork(pblock, *pwallet, reservekey);
-                    SetThreadPriority(THREAD_PRIORITY_LOWEST);
+                        SetThreadPriority(THREAD_PRIORITY_NORMAL);
+                        CheckWork(pblock, *pwallet, reservekey);
+                        SetThreadPriority(THREAD_PRIORITY_LOWEST);
 
-                    // In regression test mode, stop mining after a block is found.
-                    if (Params().MineBlocksOnDemand())
-                        throw boost::thread_interrupted();
+                        // In regression test mode, stop mining after a block is found.
+                        if (Params().MineBlocksOnDemand())
+                            throw boost::thread_interrupted();
 
-                    break;
+                        break;
+                    }
                 }
-            }
 
-            // Meter hashes/sec
-            static int64_t nHashCounter;
-            if (nHPSTimerStart == 0)
-            {
-                nHPSTimerStart = GetTimeMillis();
-                nHashCounter = 0;
-            }
-            else
-                nHashCounter += nHashesDone;
-            if (GetTimeMillis() - nHPSTimerStart > 4000)
-            {
-                static CCriticalSection cs;
+                // Meter hashes/sec
+                static int64_t nHashCounter;
+                if (nHPSTimerStart == 0)
                 {
-                    LOCK(cs);
-                    if (GetTimeMillis() - nHPSTimerStart > 4000)
+                    nHPSTimerStart = GetTimeMillis();
+                    nHashCounter = 0;
+                }
+                else
+                    nHashCounter += nHashesDone;
+                if (GetTimeMillis() - nHPSTimerStart > 4000)
+                {
+                    static CCriticalSection cs;
                     {
-                        dHashesPerSec = 1000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart);
-                        nHPSTimerStart = GetTimeMillis();
-                        nHashCounter = 0;
-                        static int64_t nLogTime;
-                        if (GetTime() - nLogTime > 30 * 60)
+                        LOCK(cs);
+                        if (GetTimeMillis() - nHPSTimerStart > 4000)
                         {
-                            nLogTime = GetTime();
-                            LogPrintf("hashmeter %6.0f khash/s\n", dHashesPerSec/1000.0);
+                            dHashesPerSec = 1000.0 * nHashCounter / (GetTimeMillis() - nHPSTimerStart);
+                            nHPSTimerStart = GetTimeMillis();
+                            nHashCounter = 0;
+                            static int64_t nLogTime;
+                            if (GetTime() - nLogTime > 30 * 60)
+                            {
+                                nLogTime = GetTime();
+                                LogPrintf("hashmeter %6.0f khash/s\n", dHashesPerSec/1000.0);
+                            }
                         }
                     }
                 }
-            }
 
-            // Check for stop or if block needs to be rebuilt
-            boost::this_thread::interruption_point();
-            // Regtest mode doesn't require peers
-            if (vNodes.empty() && Params().MiningRequiresPeers())
-                break;
-            if (nNonce >= 0xffff0000)
-                break;
-            if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60)
-                break;
-            if (pindexPrev != chainActive.Tip())
-                break;
-
-            // Update nTime every few seconds
-            UpdateTime(*pblock, pindexPrev);
-            if (Params().AllowMinDifficultyBlocks())
-            {
-                // Changing pblock->nTime can change work required on testnet:
-                hashTarget.SetCompact(pblock->nBits);
+                // Check for stop or if block needs to be rebuilt
+                boost::this_thread::interruption_point();
+                // Regtest mode doesn't require peers
+                if (vNodes.empty() && Params().MiningRequiresPeers())
+                    break;
+                if (nNonce >= 0xffff0000)
+                    break;
+                if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLast && GetTime() - nStart > 60)
+                    break;
+                if (pindexPrev != chainActive.Tip())
+                    break;
+
+                // Update nTime every few seconds
+                UpdateTime(*pblock, pindexPrev);
+                if (Params().AllowMinDifficultyBlocks())
+                {
+                    // Changing pblock->nTime can change work required on testnet:
+                    hashTarget.SetCompact(pblock->nBits);
+                }
             }
         }
-    } }
+    }
     catch (boost::thread_interrupted)
     {
         LogPrintf("BitcoinMiner terminated\n");
@@ -577,4 +580,4 @@ void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)
         minerThreads->create_thread(boost::bind(&BitcoinMiner, pwallet));
 }
 
-#endif
+#endif // ENABLE_WALLET

From 2831a03b798e0eea724250a6ba15cb637800354d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 22 Jun 2014 14:51:38 +0200
Subject: [PATCH 0218/1819] remove unused CNode::Cleanup()

---
 src/net.cpp | 5 -----
 src/net.h   | 2 --
 2 files changed, 7 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 757a06aaed33..ad0c63434057 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -528,10 +528,6 @@ void CNode::CloseSocketDisconnect()
         pnodeSync = NULL;
 }
 
-void CNode::Cleanup()
-{
-}
-
 void CNode::PushVersion()
 {
     int nBestHeight = g_signals.GetHeight().get_value_or(0);
@@ -773,7 +769,6 @@ void ThreadSocketHandler()
 
                     // close socket and cleanup
                     pnode->CloseSocketDisconnect();
-                    pnode->Cleanup();
 
                     // hold in disconnected pool until all refs are released
                     if (pnode->fNetworkNode || pnode->fInbound)
diff --git a/src/net.h b/src/net.h
index 14d578a72a21..ace9dd895d18 100644
--- a/src/net.h
+++ b/src/net.h
@@ -693,8 +693,6 @@ class CNode
     void Subscribe(unsigned int nChannel, unsigned int nHops=0);
     void CancelSubscribe(unsigned int nChannel);
     void CloseSocketDisconnect();
-    void Cleanup();
-
 
     // Denial-of-service detection/prevention
     // The idea is to detect peers that are behaving

From 3dc1464f0a87e26f3aa39c446eb4d102a8c84dc2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 22 Jun 2014 14:52:38 +0200
Subject: [PATCH 0219/1819] add missing vhListenSocket.clear(); to
 CNetCleanup()

---
 src/net.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/net.cpp b/src/net.cpp
index ad0c63434057..e082980b04ca 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1784,6 +1784,7 @@ class CNetCleanup
             delete pnode;
         vNodes.clear();
         vNodesDisconnected.clear();
+        vhListenSocket.clear();
         delete semOutbound;
         semOutbound = NULL;
         delete pnodeLocalHost;

From b612bde521e42632e24735623b7cd715096a61a5 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 23 Jun 2014 08:06:52 +0200
Subject: [PATCH 0220/1819] remove unneded class CNodeCombinedStats; from
 rpcconsole.cpp

- also 2 small style fixes
---
 src/qt/rpcconsole.cpp | 3 ++-
 src/qt/rpcconsole.h   | 1 -
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index f7491f4a42cc..e1f40ddd0980 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -231,6 +231,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
 
     startExecutor();
     setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
+
     ui->detailWidget->hide();
 
     clear();
@@ -581,7 +582,7 @@ void RPCConsole::peerLayoutChanged()
     if (fUnselect && selectedRow >= 0)
     {
         ui->peerWidget->selectionModel()->select(QItemSelection(selectedModelIndex.first(), selectedModelIndex.last()),
-                                                 QItemSelectionModel::Deselect);
+            QItemSelectionModel::Deselect);
     }
 
     if (fReselect)
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 3fee34d00ef8..3aeff3eace9b 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -13,7 +13,6 @@
 #include <QDialog>
 
 class ClientModel;
-class CNodeCombinedStats;
 
 QT_BEGIN_NAMESPACE
 class QItemSelection;

From fa126effc2a03e22708960344e62fc21259deb23 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 5 Jun 2014 10:10:52 +0200
Subject: [PATCH 0221/1819] Avoid undefined behavior using CFlatData in CScript
 serialization

`&vch[vch.size()]` and even `&vch[0]` on vectors can cause assertion
errors with VC in debug mode. This is the problem mentioned in #4239.
The deeper problem with this is that we rely on undefined behavior.

- Add `begin_ptr` and `end_ptr` functions that get the beginning and end
  pointer of vector in a reliable way that copes with empty vectors and
  doesn't reference outside the vector
(see https://stackoverflow.com/questions/1339470/how-to-get-the-address-of-the-stdvector-buffer-start-most-elegantly/1339767#1339767).
- Add a convenience constructor to CFlatData that wraps a vector.

I added `begin_ptr` and `end_ptr` as separate functions as I imagine
they will be useful in more places.
---
 src/script.h    |  8 ++++----
 src/serialize.h | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/src/script.h b/src/script.h
index bd6574627aaa..ea988f0e407c 100644
--- a/src/script.h
+++ b/src/script.h
@@ -770,12 +770,12 @@ class CScriptCompressor
     void Serialize(Stream &s, int nType, int nVersion) const {
         std::vector<unsigned char> compr;
         if (Compress(compr)) {
-            s << CFlatData(&compr[0], &compr[compr.size()]);
+            s << CFlatData(compr);
             return;
         }
         unsigned int nSize = script.size() + nSpecialScripts;
         s << VARINT(nSize);
-        s << CFlatData(&script[0], &script[script.size()]);
+        s << CFlatData(script);
     }
 
     template<typename Stream>
@@ -784,13 +784,13 @@ class CScriptCompressor
         s >> VARINT(nSize);
         if (nSize < nSpecialScripts) {
             std::vector<unsigned char> vch(GetSpecialSize(nSize), 0x00);
-            s >> REF(CFlatData(&vch[0], &vch[vch.size()]));
+            s >> REF(CFlatData(vch));
             Decompress(nSize, vch);
             return;
         }
         nSize -= nSpecialScripts;
         script.resize(nSize);
-        s >> REF(CFlatData(&script[0], &script[script.size()]));
+        s >> REF(CFlatData(script));
     }
 };
 
diff --git a/src/serialize.h b/src/serialize.h
index 1341746592b5..5ac85554c6db 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -37,6 +37,34 @@ inline T& REF(const T& val)
     return const_cast<T&>(val);
 }
 
+/** Get begin pointer of vector (non-const version).
+ * @note These functions avoid the undefined case of indexing into an empty
+ * vector, as well as that of indexing after the end of the vector.
+ */
+template <class T, class TAl>
+inline T* begin_ptr(std::vector<T,TAl>& v)
+{
+    return v.empty() ? NULL : &v[0];
+}
+/** Get begin pointer of vector (const version) */
+template <class T, class TAl>
+inline const T* begin_ptr(const std::vector<T,TAl>& v)
+{
+    return v.empty() ? NULL : &v[0];
+}
+/** Get end pointer of vector (non-const version) */
+template <class T, class TAl>
+inline T* end_ptr(std::vector<T,TAl>& v)
+{
+    return v.empty() ? NULL : (&v[0] + v.size());
+}
+/** Get end pointer of vector (const version) */
+template <class T, class TAl>
+inline const T* end_ptr(const std::vector<T,TAl>& v)
+{
+    return v.empty() ? NULL : (&v[0] + v.size());
+}
+
 /////////////////////////////////////////////////////////////////
 //
 // Templates for serializing to anything that looks like a stream,
@@ -318,6 +346,12 @@ class CFlatData
     char* pend;
 public:
     CFlatData(void* pbeginIn, void* pendIn) : pbegin((char*)pbeginIn), pend((char*)pendIn) { }
+    template <class T, class TAl>
+    explicit CFlatData(std::vector<T,TAl> &v)
+    {
+        pbegin = (char*)begin_ptr(v);
+        pend = (char*)end_ptr(v);
+    }
     char* begin() { return pbegin; }
     const char* begin() const { return pbegin; }
     char* end() { return pend; }

From fcb0a1bb9cea0e627152e544b0701c039cc3f60e Mon Sep 17 00:00:00 2001
From: daniel <arowser@gmail.com>
Date: Tue, 27 May 2014 11:44:55 +0800
Subject: [PATCH 0222/1819] change "char pch[200000]" to "new char[200000]"

---
 src/util.cpp | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 30590912ff03..1480b2ebf88c 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -168,15 +168,14 @@ void RandAddSeedPerfmon()
 #ifdef WIN32
     // Don't need this on Linux, OpenSSL automatically uses /dev/urandom
     // Seed with the entire set of perfmon data
-    unsigned char pdata[250000];
-    memset(pdata, 0, sizeof(pdata));
-    unsigned long nSize = sizeof(pdata);
-    long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, pdata, &nSize);
+    std::vector <unsigned char> vData(250000,0);
+    unsigned long nSize = vData.size();
+    long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
     RegCloseKey(HKEY_PERFORMANCE_DATA);
     if (ret == ERROR_SUCCESS)
     {
-        RAND_add(pdata, nSize, nSize/100.0);
-        OPENSSL_cleanse(pdata, nSize);
+        RAND_add(begin_ptr(vData), nSize, nSize/100.0);
+        OPENSSL_cleanse(begin_ptr(vData), nSize);
         LogPrint("rand", "RandAddSeed() %lu bytes\n", nSize);
     }
 #endif
@@ -1141,15 +1140,15 @@ void ShrinkDebugFile()
     if (file && boost::filesystem::file_size(pathLog) > 10 * 1000000)
     {
         // Restart the file with some of the end
-        char pch[200000];
-        fseek(file, -sizeof(pch), SEEK_END);
-        int nBytes = fread(pch, 1, sizeof(pch), file);
+        std::vector <char> vch(200000,0);
+        fseek(file, -vch.size(), SEEK_END);
+        int nBytes = fread(begin_ptr(vch), 1, vch.size(), file);
         fclose(file);
 
         file = fopen(pathLog.string().c_str(), "w");
         if (file)
         {
-            fwrite(pch, 1, nBytes, file);
+            fwrite(begin_ptr(vch), 1, nBytes, file);
             fclose(file);
         }
     }

From 17db9767c469629bd338942afa776cd8ad185b04 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 23 Jun 2014 12:04:17 +0200
Subject: [PATCH 0223/1819] doc: Remove unused section from release-process.md

It is outdated information. If we ever resurrect gitian-downloader it
can be brought back from history and updated.
---
 doc/release-process.md | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 9cdc43b9bea7..affe6ed13a0c 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -177,34 +177,6 @@ Commit your signature to gitian.sigs:
 
 ### After 3 or more people have gitian-built, repackage gitian-signed zips:
 
-From a directory containing bitcoin source, gitian.sigs and gitian zips
-
-	export VERSION=(new version, e.g. 0.8.0)
-	mkdir bitcoin-${VERSION}-linux-gitian
-	pushd bitcoin-${VERSION}-linux-gitian
-	unzip ../bitcoin-${VERSION}-linux-gitian.zip
-	mkdir gitian
-	cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/
-	for signer in $(ls ../gitian.sigs/${VERSION}/); do
-	 cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert
-	 cp ../gitian.sigs/${VERSION}/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig
-	done
-	zip -r bitcoin-${VERSION}-linux-gitian.zip *
-	cp bitcoin-${VERSION}-linux-gitian.zip ../
-	popd
-	mkdir bitcoin-${VERSION}-win-gitian
-	pushd bitcoin-${VERSION}-win-gitian
-	unzip ../bitcoin-${VERSION}-win-gitian.zip
-	mkdir gitian
-	cp ../bitcoin/contrib/gitian-downloader/*.pgp ./gitian/
-	for signer in $(ls ../gitian.sigs/${VERSION}-win/); do
-	 cp ../gitian.sigs/${VERSION}-win/${signer}/bitcoin-build.assert ./gitian/${signer}-build.assert
-	 cp ../gitian.sigs/${VERSION}-win/${signer}/bitcoin-build.assert.sig ./gitian/${signer}-build.assert.sig
-	done
-	zip -r bitcoin-${VERSION}-win-gitian.zip *
-	cp bitcoin-${VERSION}-win-gitian.zip ../
-	popd
-
 - Upload gitian zips to SourceForge
 
 - Announce the release:

From 6a5c124b849ac1e9e5cfb99e72ae483eeb3e8cad Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 21 May 2014 15:22:42 +0200
Subject: [PATCH 0224/1819] [Qt] don't allow translation of our example btc
 address

---
 src/qt/forms/sendcoinsentry.ui          | 2 +-
 src/qt/forms/signverifymessagedialog.ui | 4 ++--
 src/qt/guiutil.cpp                      | 4 +++-
 src/qt/signverifymessagedialog.cpp      | 1 -
 4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/qt/forms/sendcoinsentry.ui b/src/qt/forms/sendcoinsentry.ui
index e77de0d9b84c..9d829970f0f2 100644
--- a/src/qt/forms/sendcoinsentry.ui
+++ b/src/qt/forms/sendcoinsentry.ui
@@ -51,7 +51,7 @@
       <item>
        <widget class="QValidatedLineEdit" name="payTo">
         <property name="toolTip">
-         <string>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
+         <string>The Bitcoin address to send the payment to</string>
         </property>
        </widget>
       </item>
diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui
index aa271b4f2a32..53573ec821c6 100644
--- a/src/qt/forms/signverifymessagedialog.ui
+++ b/src/qt/forms/signverifymessagedialog.ui
@@ -45,7 +45,7 @@
          <item>
           <widget class="QValidatedLineEdit" name="addressIn_SM">
            <property name="toolTip">
-            <string>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
+            <string>The Bitcoin address to sign the message with</string>
            </property>
           </widget>
          </item>
@@ -255,7 +255,7 @@
          <item>
           <widget class="QValidatedLineEdit" name="addressIn_VM">
            <property name="toolTip">
-            <string>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</string>
+            <string>The Bitcoin address the message was signed with</string>
            </property>
           </widget>
          </item>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 4fe98251d98e..81b905425274 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -91,7 +91,9 @@ void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent)
 
     widget->setFont(bitcoinAddressFont());
 #if QT_VERSION >= 0x040700
-    widget->setPlaceholderText(QObject::tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
+    // We don't want translators to use own addresses in translations
+    // and this is the only place, where this address is supplied.
+    widget->setPlaceholderText(QObject::tr("Enter a Bitcoin address (e.g. %1)").arg("1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L"));
 #endif
     widget->setValidator(new BitcoinAddressEntryValidator(parent));
     widget->setCheckValidator(new BitcoinAddressCheckValidator(parent));
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index 3e56412c7c06..d4d021e21c1c 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -27,7 +27,6 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
 
 #if QT_VERSION >= 0x040700
     ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
-    ui->addressIn_VM->setPlaceholderText(tr("Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)"));
 #endif
 
     GUIUtil::setupAddressWidget(ui->addressIn_SM, this);

From be873f64540d3c0b1227920eb466097ed738f452 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 23 Jun 2014 14:35:35 +0200
Subject: [PATCH 0225/1819] Issue warning if collecting RandSeed data failed

---
 src/util.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/util.cpp b/src/util.cpp
index 1480b2ebf88c..794608957181 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -176,7 +176,14 @@ void RandAddSeedPerfmon()
     {
         RAND_add(begin_ptr(vData), nSize, nSize/100.0);
         OPENSSL_cleanse(begin_ptr(vData), nSize);
-        LogPrint("rand", "RandAddSeed() %lu bytes\n", nSize);
+        LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
+    } else {
+        static bool warned = false; // Warn only once
+        if (!warned)
+        {
+            LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
+            warned = true;
+        }
     }
 #endif
 }

From 3b1295e98878840c94db62223d1bc202d71a7366 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 23 Jun 2014 17:41:52 +0200
Subject: [PATCH 0226/1819] qa/rpc_tests: Wait for handshake to complete in
 connect_nodes

This avoids a race condition in which the connection was
made but the version handshake is not completed yet. In that
case transactions won't be broadcasted to a peer yet, and
the nodes will wait forever for their mempools to sync.
---
 qa/rpc-tests/util.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index eded098c7c95..27c9f778f63d 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -182,6 +182,10 @@ def wait_bitcoinds():
 def connect_nodes(from_connection, node_num):
     ip_port = "127.0.0.1:"+str(p2p_port(node_num))
     from_connection.addnode(ip_port, "onetry")
+    # poll until version handshake complete to avoid race conditions
+    # with transaction relaying
+    while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()):
+        time.sleep(0.1)
 
 def find_output(node, txid, amount):
     """

From f3967bcc50ea95510f12a86e90dec4c8c78fff3b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 23 Jun 2014 14:04:24 -0400
Subject: [PATCH 0227/1819] build: fix build weirdness after 54372482.

bitcoin-config.h moved, but the old file is likely to still exist when
reconfiguring or switching branches. This would've caused files to not rebuild
correctly, and other strange problems.

Make the path explicit so that the old one cannot be found.

Core libs use config/bitcoin-config.h.

Libs (like crypto) which don't want access to bitcoin's headers continue
to use -Iconfig and #include bitcoin-config.h.
---
 src/Makefile.am                 | 2 +-
 src/clientversion.h             | 2 +-
 src/compat/glibc_compat.cpp     | 2 +-
 src/compat/glibc_sanity.cpp     | 2 +-
 src/init.cpp                    | 2 +-
 src/main.h                      | 2 +-
 src/net.cpp                     | 2 +-
 src/netbase.h                   | 2 +-
 src/qt/addressbookpage.cpp      | 2 +-
 src/qt/bitcoin.cpp              | 2 +-
 src/qt/bitcoingui.h             | 2 +-
 src/qt/notificator.h            | 2 +-
 src/qt/optionsdialog.cpp        | 2 +-
 src/qt/optionsmodel.cpp         | 2 +-
 src/qt/receiverequestdialog.cpp | 2 +-
 src/qt/test/test_main.cpp       | 2 +-
 src/util.h                      | 2 +-
 17 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 3948ca078089..5ecded442c15 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,7 @@ $(LIBLEVELDB) $(LIBMEMENV):
 endif
 
 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
-BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BITCOIN_CONFIG_INCLUDES) $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
+BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
 
 noinst_LIBRARIES = \
   libbitcoin_server.a \
diff --git a/src/clientversion.h b/src/clientversion.h
index 29b4aa37642c..a30bbff06b11 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -2,7 +2,7 @@
 #define CLIENTVERSION_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #else
 //
 // client versioning and copyright year
diff --git a/src/compat/glibc_compat.cpp b/src/compat/glibc_compat.cpp
index bb870c01f8b3..22f82e4259b9 100644
--- a/src/compat/glibc_compat.cpp
+++ b/src/compat/glibc_compat.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include <cstddef>
diff --git a/src/compat/glibc_sanity.cpp b/src/compat/glibc_sanity.cpp
index 6e5bae8a48f1..d93602e0fe07 100644
--- a/src/compat/glibc_sanity.cpp
+++ b/src/compat/glibc_sanity.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include <cstddef>
diff --git a/src/init.cpp b/src/init.cpp
index 12d2d1bb4428..ff7a9011a527 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "init.h"
diff --git a/src/main.h b/src/main.h
index 7071f0094ffa..27041a0026bd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -7,7 +7,7 @@
 #define BITCOIN_MAIN_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "chainparams.h"
diff --git a/src/net.cpp b/src/net.cpp
index 71e3e57fa746..811df4333488 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "net.h"
diff --git a/src/netbase.h b/src/netbase.h
index 23cfb1f15856..40a3d2567651 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -6,7 +6,7 @@
 #define BITCOIN_NETBASE_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "compat.h"
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 2dc56a510768..5df8f197291d 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "addressbookpage.h"
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 387f6ede4be8..76dddb103cb4 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "bitcoingui.h"
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 275fa35f3942..e7a842df9976 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -6,7 +6,7 @@
 #define BITCOINGUI_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include <QMainWindow>
diff --git a/src/qt/notificator.h b/src/qt/notificator.h
index abab986992a6..3395e6435098 100644
--- a/src/qt/notificator.h
+++ b/src/qt/notificator.h
@@ -6,7 +6,7 @@
 #define NOTIFICATOR_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include <QIcon>
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index abfd4123e0f5..12d54dff6450 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "optionsdialog.h"
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 4dafd9d2afab..6d985abaf8ea 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "optionsmodel.h"
diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
index d8dad15c0d50..cc2f00916f2b 100644
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -22,7 +22,7 @@
 #endif
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h" /* for USE_QRCODE */
+#include "config/bitcoin-config.h" /* for USE_QRCODE */
 #endif
 
 #ifdef USE_QRCODE
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index 220da28cfef3..03a2381c0665 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -1,5 +1,5 @@
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #ifdef ENABLE_WALLET
diff --git a/src/util.h b/src/util.h
index da1810a3d35c..5eb6f0382635 100644
--- a/src/util.h
+++ b/src/util.h
@@ -7,7 +7,7 @@
 #define BITCOIN_UTIL_H
 
 #if defined(HAVE_CONFIG_H)
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "compat.h"

From 7f3b4e95695d50a4970e6eb91faa956ab276f161 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 17 Jun 2014 14:18:13 -0400
Subject: [PATCH 0228/1819] Relax IsStandard rules for pay-to-script-hash
 transactions

Relax the AreInputsStandard() tests for P2SH transactions --
allow any Script in a P2SH transaction to be relayed/mined,
as long as it has 15 or fewer signature operations.

Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247

I don't have an easy way to test this, but the code changes are
straightforward and I've updated the AreInputsStandard unit tests.
---
 src/main.cpp                   |  43 ++++++------
 src/main.h                     |   2 +
 src/test/script_P2SH_tests.cpp | 118 ++++++++++++++++++++-------------
 3 files changed, 97 insertions(+), 66 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index d3f04b95fa79..ecabd9ec2cd5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -582,15 +582,13 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
 }
 
 //
-// Check transaction inputs, and make sure any
-// pay-to-script-hash transactions are evaluating IsStandard scripts
+// Check transaction inputs to mitigate two
+// potential denial-of-service attacks:
 //
-// Why bother? To avoid denial-of-service attacks; an attacker
-// can submit a standard HASH... OP_EQUAL transaction,
-// which will get accepted into blocks. The redemption
-// script can be anything; an attacker could use a very
-// expensive-to-check-upon-redemption script like:
-//   DUP CHECKSIG DROP ... repeated 100 times... OP_1
+// 1. scriptSigs with extra data stuffed into them,
+//    not consumed by scriptPubKey (or P2SH script)
+// 2. P2SH scripts with a crazy number of expensive
+//    CHECKSIG/CHECKMULTISIG operations
 //
 bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs)
 {
@@ -614,8 +612,9 @@ bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs)
         // Transactions with extra stuff in their scriptSigs are
         // non-standard. Note that this EvalScript() call will
         // be quick, because if there are any operations
-        // beside "push data" in the scriptSig the
-        // IsStandard() call returns false
+        // beside "push data" in the scriptSig
+        // IsStandard() will have already returned false
+        // and this method isn't called.
         vector<vector<unsigned char> > stack;
         if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false, 0))
             return false;
@@ -627,16 +626,20 @@ bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs)
             CScript subscript(stack.back().begin(), stack.back().end());
             vector<vector<unsigned char> > vSolutions2;
             txnouttype whichType2;
-            if (!Solver(subscript, whichType2, vSolutions2))
-                return false;
-            if (whichType2 == TX_SCRIPTHASH)
-                return false;
-
-            int tmpExpected;
-            tmpExpected = ScriptSigArgsExpected(whichType2, vSolutions2);
-            if (tmpExpected < 0)
-                return false;
-            nArgsExpected += tmpExpected;
+            if (Solver(subscript, whichType2, vSolutions2))
+            {
+                int tmpExpected = ScriptSigArgsExpected(whichType2, vSolutions2);
+                if (tmpExpected < 0)
+                    return false;
+                nArgsExpected += tmpExpected;
+            }
+            else
+            {
+                // Any other Script with less than 15 sigops OK:
+                unsigned int sigops = subscript.GetSigOpCount(true);
+                // ... extra data left on the stack after execution is OK, too:
+                return (sigops <= MAX_P2SH_SIGOPS);
+            }
         }
 
         if (stack.size() != (unsigned int)nArgsExpected)
diff --git a/src/main.h b/src/main.h
index 27041a0026bd..ff1f742d1e42 100644
--- a/src/main.h
+++ b/src/main.h
@@ -43,6 +43,8 @@ static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000;
 static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 /** The maximum allowed number of signature check operations in a block (network rule) */
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
+/** Maxiumum number of signature check operations in an IsStandard() P2SH script */
+static const unsigned int MAX_P2SH_SIGOPS = 15;
 /** The maximum number of orphan transactions kept in memory */
 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
 /** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index a75593a8b290..6ae2b9cf64f8 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -256,46 +256,61 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     CCoinsView coinsDummy;
     CCoinsViewCache coins(coinsDummy);
     CBasicKeyStore keystore;
-    CKey key[3];
+    CKey key[6];
     vector<CPubKey> keys;
-    for (int i = 0; i < 3; i++)
+    for (int i = 0; i < 6; i++)
     {
         key[i].MakeNewKey(true);
         keystore.AddKey(key[i]);
-        keys.push_back(key[i].GetPubKey());
     }
+    for (int i = 0; i < 3; i++)
+        keys.push_back(key[i].GetPubKey());
 
     CMutableTransaction txFrom;
-    txFrom.vout.resize(6);
+    txFrom.vout.resize(7);
 
     // First three are standard:
     CScript pay1; pay1.SetDestination(key[0].GetPubKey().GetID());
     keystore.AddCScript(pay1);
-    CScript payScriptHash1; payScriptHash1.SetDestination(pay1.GetID());
     CScript pay1of3; pay1of3.SetMultisig(1, keys);
 
-    txFrom.vout[0].scriptPubKey = payScriptHash1;
+    txFrom.vout[0].scriptPubKey.SetDestination(pay1.GetID()); // P2SH (OP_CHECKSIG)
     txFrom.vout[0].nValue = 1000;
-    txFrom.vout[1].scriptPubKey = pay1;
+    txFrom.vout[1].scriptPubKey = pay1; // ordinary OP_CHECKSIG
     txFrom.vout[1].nValue = 2000;
-    txFrom.vout[2].scriptPubKey = pay1of3;
+    txFrom.vout[2].scriptPubKey = pay1of3; // ordinary OP_CHECKMULTISIG
     txFrom.vout[2].nValue = 3000;
 
-    // Last three non-standard:
-    CScript empty;
-    keystore.AddCScript(empty);
-    txFrom.vout[3].scriptPubKey = empty;
+    // vout[3] is complicated 1-of-3 AND 2-of-3
+    // ... that is OK if wrapped in P2SH:
+    CScript oneAndTwo;
+    oneAndTwo << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey();
+    oneAndTwo << OP_3 << OP_CHECKMULTISIGVERIFY;
+    oneAndTwo << OP_2 << key[3].GetPubKey() << key[4].GetPubKey() << key[5].GetPubKey();
+    oneAndTwo << OP_3 << OP_CHECKMULTISIG;
+    keystore.AddCScript(oneAndTwo);
+    txFrom.vout[3].scriptPubKey.SetDestination(oneAndTwo.GetID());
     txFrom.vout[3].nValue = 4000;
-    // Can't use SetPayToScriptHash, it checks for the empty Script. So:
-    txFrom.vout[4].scriptPubKey << OP_HASH160 << Hash160(empty) << OP_EQUAL;
+
+    // vout[4] is max sigops:
+    CScript fifteenSigops; fifteenSigops << OP_1;
+    for (int i = 0; i < MAX_P2SH_SIGOPS; i++)
+        fifteenSigops << key[i%3].GetPubKey();
+    fifteenSigops << OP_15 << OP_CHECKMULTISIG;
+    keystore.AddCScript(fifteenSigops);
+    txFrom.vout[4].scriptPubKey.SetDestination(fifteenSigops.GetID());
     txFrom.vout[4].nValue = 5000;
-    CScript oneOfEleven;
-    oneOfEleven << OP_1;
-    for (int i = 0; i < 11; i++)
-        oneOfEleven << key[0].GetPubKey();
-    oneOfEleven << OP_11 << OP_CHECKMULTISIG;
-    txFrom.vout[5].scriptPubKey.SetDestination(oneOfEleven.GetID());
-    txFrom.vout[5].nValue = 6000;
+
+    // vout[5/6] are non-standard because they exceed MAX_P2SH_SIGOPS
+    CScript sixteenSigops; sixteenSigops << OP_16 << OP_CHECKMULTISIG;
+    keystore.AddCScript(sixteenSigops);
+    txFrom.vout[5].scriptPubKey.SetDestination(fifteenSigops.GetID());
+    txFrom.vout[5].nValue = 5000;
+    CScript twentySigops; twentySigops << OP_CHECKMULTISIG;
+    keystore.AddCScript(twentySigops);
+    txFrom.vout[6].scriptPubKey.SetDestination(twentySigops.GetID());
+    txFrom.vout[6].nValue = 6000;
+
 
     coins.SetCoins(txFrom.GetHash(), CCoins(txFrom, 0));
 
@@ -303,19 +318,24 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     txTo.vout.resize(1);
     txTo.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
 
-    txTo.vin.resize(3);
-    txTo.vin[0].prevout.n = 0;
-    txTo.vin[0].prevout.hash = txFrom.GetHash();
+    txTo.vin.resize(5);
+    for (int i = 0; i < 5; i++)
+    {
+        txTo.vin[i].prevout.n = i;
+        txTo.vin[i].prevout.hash = txFrom.GetHash();
+    }
     BOOST_CHECK(SignSignature(keystore, txFrom, txTo, 0));
-    txTo.vin[1].prevout.n = 1;
-    txTo.vin[1].prevout.hash = txFrom.GetHash();
     BOOST_CHECK(SignSignature(keystore, txFrom, txTo, 1));
-    txTo.vin[2].prevout.n = 2;
-    txTo.vin[2].prevout.hash = txFrom.GetHash();
     BOOST_CHECK(SignSignature(keystore, txFrom, txTo, 2));
+    // SignSignature doesn't know how to sign these. We're
+    // not testing validating signatures, so just create
+    // dummy signatures that DO include the correct P2SH scripts:
+    txTo.vin[3].scriptSig << OP_11 << OP_11 << static_cast<vector<unsigned char> >(oneAndTwo);
+    txTo.vin[4].scriptSig << static_cast<vector<unsigned char> >(fifteenSigops);
 
     BOOST_CHECK(::AreInputsStandard(txTo, coins));
-    BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txTo, coins), 1U);
+    // 22 P2SH sigops for all inputs (1 for vin[0], 6 for vin[3], 15 for vin[4]
+    BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txTo, coins), 22U);
 
     // Make sure adding crap to the scriptSigs makes them non-standard:
     for (int i = 0; i < 3; i++)
@@ -326,23 +346,29 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
         txTo.vin[i].scriptSig = t;
     }
 
-    CMutableTransaction txToNonStd;
-    txToNonStd.vout.resize(1);
-    txToNonStd.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
-    txToNonStd.vout[0].nValue = 1000;
-    txToNonStd.vin.resize(2);
-    txToNonStd.vin[0].prevout.n = 4;
-    txToNonStd.vin[0].prevout.hash = txFrom.GetHash();
-    txToNonStd.vin[0].scriptSig << Serialize(empty);
-    txToNonStd.vin[1].prevout.n = 5;
-    txToNonStd.vin[1].prevout.hash = txFrom.GetHash();
-    txToNonStd.vin[1].scriptSig << OP_0 << Serialize(oneOfEleven);
-
-    BOOST_CHECK(!::AreInputsStandard(txToNonStd, coins));
-    BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txToNonStd, coins), 11U);
-
-    txToNonStd.vin[0].scriptSig.clear();
-    BOOST_CHECK(!::AreInputsStandard(txToNonStd, coins));
+    CMutableTransaction txToNonStd1;
+    txToNonStd1.vout.resize(1);
+    txToNonStd1.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
+    txToNonStd1.vout[0].nValue = 1000;
+    txToNonStd1.vin.resize(1);
+    txToNonStd1.vin[0].prevout.n = 5;
+    txToNonStd1.vin[0].prevout.hash = txFrom.GetHash();
+    txToNonStd1.vin[0].scriptSig << static_cast<vector<unsigned char> >(sixteenSigops);
+
+    BOOST_CHECK(!::AreInputsStandard(txToNonStd1, coins));
+    BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txToNonStd1, coins), 16U);
+
+    CMutableTransaction txToNonStd2;
+    txToNonStd2.vout.resize(1);
+    txToNonStd2.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
+    txToNonStd2.vout[0].nValue = 1000;
+    txToNonStd2.vin.resize(1);
+    txToNonStd2.vin[0].prevout.n = 6;
+    txToNonStd2.vin[0].prevout.hash = txFrom.GetHash();
+    txToNonStd2.vin[0].scriptSig << static_cast<vector<unsigned char> >(twentySigops);
+
+    BOOST_CHECK(!::AreInputsStandard(txToNonStd2, coins));
+    BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txToNonStd2, coins), 20U);
 }
 
 BOOST_AUTO_TEST_SUITE_END()

From df852d2bcc6573a3fcb3e59f82f7ea4dfa11290e Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Mon, 10 Mar 2014 08:46:53 -0700
Subject: [PATCH 0229/1819] Refactor proof of work related functions out of
 main

---
 src/Makefile.am        |   2 +
 src/main.cpp           | 113 +------------------------------------
 src/main.h             |  10 ----
 src/miner.cpp          |   1 +
 src/pow.cpp            | 123 +++++++++++++++++++++++++++++++++++++++++
 src/pow.h              |  23 ++++++++
 src/rpcmining.cpp      |   1 +
 src/test/DoS_tests.cpp |   1 +
 src/txdb.cpp           |   5 +-
 9 files changed, 155 insertions(+), 124 deletions(-)
 create mode 100644 src/pow.cpp
 create mode 100644 src/pow.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 5ecded442c15..7e7fa0c3caec 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -71,6 +71,7 @@ BITCOIN_CORE_H = \
   netbase.h \
   net.h \
   noui.h \
+  pow.h \
   protocol.h \
   rpcclient.h \
   rpcprotocol.h \
@@ -121,6 +122,7 @@ libbitcoin_server_a_SOURCES = \
   miner.cpp \
   net.cpp \
   noui.cpp \
+  pow.cpp \
   rpcblockchain.cpp \
   rpcmining.cpp \
   rpcmisc.cpp \
diff --git a/src/main.cpp b/src/main.cpp
index d3f04b95fa79..ea47601081bd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -12,6 +12,7 @@
 #include "checkqueue.h"
 #include "init.h"
 #include "net.h"
+#include "pow.h"
 #include "txdb.h"
 #include "txmempool.h"
 #include "ui_interface.h"
@@ -1194,118 +1195,6 @@ int64_t GetBlockValue(int nHeight, int64_t nFees)
     return nSubsidy + nFees;
 }
 
-static const int64_t nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
-static const int64_t nTargetSpacing = 10 * 60;
-static const int64_t nInterval = nTargetTimespan / nTargetSpacing;
-
-//
-// minimum amount of work that could possibly be required nTime after
-// minimum work required was nBase
-//
-unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
-{
-    const uint256 &bnLimit = Params().ProofOfWorkLimit();
-    // Testnet has min-difficulty blocks
-    // after nTargetSpacing*2 time between blocks:
-    if (Params().AllowMinDifficultyBlocks() && nTime > nTargetSpacing*2)
-        return bnLimit.GetCompact();
-
-    uint256 bnResult;
-    bnResult.SetCompact(nBase);
-    while (nTime > 0 && bnResult < bnLimit)
-    {
-        // Maximum 400% adjustment...
-        bnResult *= 4;
-        // ... in best-case exactly 4-times-normal target time
-        nTime -= nTargetTimespan*4;
-    }
-    if (bnResult > bnLimit)
-        bnResult = bnLimit;
-    return bnResult.GetCompact();
-}
-
-unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
-{
-    unsigned int nProofOfWorkLimit = Params().ProofOfWorkLimit().GetCompact();
-
-    // Genesis block
-    if (pindexLast == NULL)
-        return nProofOfWorkLimit;
-
-    // Only change once per interval
-    if ((pindexLast->nHeight+1) % nInterval != 0)
-    {
-        if (Params().AllowMinDifficultyBlocks())
-        {
-            // Special difficulty rule for testnet:
-            // If the new block's timestamp is more than 2* 10 minutes
-            // then allow mining of a min-difficulty block.
-            if (pblock->nTime > pindexLast->nTime + nTargetSpacing*2)
-                return nProofOfWorkLimit;
-            else
-            {
-                // Return the last non-special-min-difficulty-rules-block
-                const CBlockIndex* pindex = pindexLast;
-                while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nProofOfWorkLimit)
-                    pindex = pindex->pprev;
-                return pindex->nBits;
-            }
-        }
-        return pindexLast->nBits;
-    }
-
-    // Go back by what we want to be 14 days worth of blocks
-    const CBlockIndex* pindexFirst = pindexLast;
-    for (int i = 0; pindexFirst && i < nInterval-1; i++)
-        pindexFirst = pindexFirst->pprev;
-    assert(pindexFirst);
-
-    // Limit adjustment step
-    int64_t nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
-    LogPrintf("  nActualTimespan = %d  before bounds\n", nActualTimespan);
-    if (nActualTimespan < nTargetTimespan/4)
-        nActualTimespan = nTargetTimespan/4;
-    if (nActualTimespan > nTargetTimespan*4)
-        nActualTimespan = nTargetTimespan*4;
-
-    // Retarget
-    uint256 bnNew;
-    uint256 bnOld;
-    bnNew.SetCompact(pindexLast->nBits);
-    bnOld = bnNew;
-    bnNew *= nActualTimespan;
-    bnNew /= nTargetTimespan;
-
-    if (bnNew > Params().ProofOfWorkLimit())
-        bnNew = Params().ProofOfWorkLimit();
-
-    /// debug print
-    LogPrintf("GetNextWorkRequired RETARGET\n");
-    LogPrintf("nTargetTimespan = %d    nActualTimespan = %d\n", nTargetTimespan, nActualTimespan);
-    LogPrintf("Before: %08x  %s\n", pindexLast->nBits, bnOld.ToString());
-    LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.ToString());
-
-    return bnNew.GetCompact();
-}
-
-bool CheckProofOfWork(uint256 hash, unsigned int nBits)
-{
-    bool fNegative;
-    bool fOverflow;
-    uint256 bnTarget;
-    bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
-
-    // Check range
-    if (fNegative || bnTarget == 0 || fOverflow || bnTarget > Params().ProofOfWorkLimit())
-        return error("CheckProofOfWork() : nBits below minimum work");
-
-    // Check proof of work matches claimed amount
-    if (hash > bnTarget)
-        return error("CheckProofOfWork() : hash doesn't match nBits");
-
-    return true;
-}
-
 bool IsInitialBlockDownload()
 {
     LOCK(cs_main);
diff --git a/src/main.h b/src/main.h
index 27041a0026bd..9858bcfd69cf 100644
--- a/src/main.h
+++ b/src/main.h
@@ -146,10 +146,6 @@ bool ProcessMessages(CNode* pfrom);
 bool SendMessages(CNode* pto, bool fSendTrickle);
 /** Run an instance of the script checking thread */
 void ThreadScriptCheck();
-/** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
-bool CheckProofOfWork(uint256 hash, unsigned int nBits);
-/** Calculate the minimum amount of work a received block needs, without knowing its direct parent */
-unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
 /** 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 */
@@ -159,7 +155,6 @@ bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, b
 /** Find the best known block, and make it the tip of the block chain */
 bool ActivateBestChain(CValidationState &state);
 int64_t GetBlockValue(int nHeight, int64_t nFees);
-unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock);
 
 void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev);
 
@@ -812,11 +807,6 @@ class CBlockIndex
         return (~bnTarget / (bnTarget + 1)) + 1;
     }
 
-    bool CheckIndex() const
-    {
-        return CheckProofOfWork(GetBlockHash(), nBits);
-    }
-
     enum { nMedianTimeSpan=11 };
 
     int64_t GetMedianTimePast() const
diff --git a/src/miner.cpp b/src/miner.cpp
index 63ce1250678b..2a4f8cfa5211 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -9,6 +9,7 @@
 #include "hash.h"
 #include "main.h"
 #include "net.h"
+#include "pow.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
diff --git a/src/pow.cpp b/src/pow.cpp
new file mode 100644
index 000000000000..274a5d6f98a1
--- /dev/null
+++ b/src/pow.cpp
@@ -0,0 +1,123 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "pow.h"
+
+#include "chainparams.h"
+#include "core.h"
+#include "main.h"
+#include "uint256.h"
+
+static const int64_t nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+static const int64_t nTargetSpacing = 10 * 60;
+static const int64_t nInterval = nTargetTimespan / nTargetSpacing;
+
+unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
+{
+    unsigned int nProofOfWorkLimit = Params().ProofOfWorkLimit().GetCompact();
+
+    // Genesis block
+    if (pindexLast == NULL)
+        return nProofOfWorkLimit;
+
+    // Only change once per interval
+    if ((pindexLast->nHeight+1) % nInterval != 0)
+    {
+        if (Params().AllowMinDifficultyBlocks())
+        {
+            // Special difficulty rule for testnet:
+            // If the new block's timestamp is more than 2* 10 minutes
+            // then allow mining of a min-difficulty block.
+            if (pblock->nTime > pindexLast->nTime + nTargetSpacing*2)
+                return nProofOfWorkLimit;
+            else
+            {
+                // Return the last non-special-min-difficulty-rules-block
+                const CBlockIndex* pindex = pindexLast;
+                while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nProofOfWorkLimit)
+                    pindex = pindex->pprev;
+                return pindex->nBits;
+            }
+        }
+        return pindexLast->nBits;
+    }
+
+    // Go back by what we want to be 14 days worth of blocks
+    const CBlockIndex* pindexFirst = pindexLast;
+    for (int i = 0; pindexFirst && i < nInterval-1; i++)
+        pindexFirst = pindexFirst->pprev;
+    assert(pindexFirst);
+
+    // Limit adjustment step
+    int64_t nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
+    LogPrintf("  nActualTimespan = %d  before bounds\n", nActualTimespan);
+    if (nActualTimespan < nTargetTimespan/4)
+        nActualTimespan = nTargetTimespan/4;
+    if (nActualTimespan > nTargetTimespan*4)
+        nActualTimespan = nTargetTimespan*4;
+
+    // Retarget
+    uint256 bnNew;
+    uint256 bnOld;
+    bnNew.SetCompact(pindexLast->nBits);
+    bnOld = bnNew;
+    bnNew *= nActualTimespan;
+    bnNew /= nTargetTimespan;
+
+    if (bnNew > Params().ProofOfWorkLimit())
+        bnNew = Params().ProofOfWorkLimit();
+
+    /// debug print
+    LogPrintf("GetNextWorkRequired RETARGET\n");
+    LogPrintf("nTargetTimespan = %d    nActualTimespan = %d\n", nTargetTimespan, nActualTimespan);
+    LogPrintf("Before: %08x  %s\n", pindexLast->nBits, bnOld.ToString());
+    LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.ToString());
+
+    return bnNew.GetCompact();
+}
+
+bool CheckProofOfWork(uint256 hash, unsigned int nBits)
+{
+    bool fNegative;
+    bool fOverflow;
+    uint256 bnTarget;
+    bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
+
+    // Check range
+    if (fNegative || bnTarget == 0 || fOverflow || bnTarget > Params().ProofOfWorkLimit())
+        return error("CheckProofOfWork() : nBits below minimum work");
+
+    // Check proof of work matches claimed amount
+    if (hash > bnTarget)
+        return error("CheckProofOfWork() : hash doesn't match nBits");
+
+    return true;
+}
+
+//
+// minimum amount of work that could possibly be required nTime after
+// minimum work required was nBase
+//
+unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
+{
+    const uint256 &bnLimit = Params().ProofOfWorkLimit();
+    // Testnet has min-difficulty blocks
+    // after nTargetSpacing*2 time between blocks:
+    if (Params().AllowMinDifficultyBlocks() && nTime > nTargetSpacing*2)
+        return bnLimit.GetCompact();
+
+    uint256 bnResult;
+    bnResult.SetCompact(nBase);
+    while (nTime > 0 && bnResult < bnLimit)
+    {
+        // Maximum 400% adjustment...
+        bnResult *= 4;
+        // ... in best-case exactly 4-times-normal target time
+        nTime -= nTargetTimespan*4;
+    }
+    if (bnResult > bnLimit)
+        bnResult = bnLimit;
+    return bnResult.GetCompact();
+}
diff --git a/src/pow.h b/src/pow.h
new file mode 100644
index 000000000000..0ce5b48766a8
--- /dev/null
+++ b/src/pow.h
@@ -0,0 +1,23 @@
+
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_POW_H
+#define BITCOIN_POW_H
+
+#include <stdint.h>
+
+class CBlockIndex;
+class CBlockHeader;
+class uint256;
+
+unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock);
+
+/** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
+bool CheckProofOfWork(uint256 hash, unsigned int nBits);
+/** Calculate the minimum amount of work a received block needs, without knowing its direct parent */
+unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
+
+#endif
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index a1410f0e4139..f60070eb5bd2 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -9,6 +9,7 @@
 #include "net.h"
 #include "main.h"
 #include "miner.h"
+#include "pow.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
 #include "wallet.h"
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 3a45844411f2..d512053051a1 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -11,6 +11,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "net.h"
+#include "pow.h"
 #include "script.h"
 #include "serialize.h"
 
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 4eab8525a5ce..92137f71ff19 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -6,6 +6,7 @@
 #include "txdb.h"
 
 #include "core.h"
+#include "pow.h"
 #include "uint256.h"
 
 #include <stdint.h>
@@ -212,8 +213,8 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
                 pindexNew->nStatus        = diskindex.nStatus;
                 pindexNew->nTx            = diskindex.nTx;
 
-                if (!pindexNew->CheckIndex())
-                    return error("LoadBlockIndex() : CheckIndex failed: %s", pindexNew->ToString());
+                if (!CheckProofOfWork(pindexNew->GetBlockHash(), pindexNew->nBits))
+                    return error("LoadBlockIndex() : CheckProofOfWork failed: %s", pindexNew->ToString());
 
                 pcursor->Next();
             } else {

From fd704c7b2c5ab8b24b1829f000b829d7156b8b3c Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 22 Mar 2014 18:29:34 +0100
Subject: [PATCH 0230/1819] move pow constants to chainparams

---
 src/chainparams.cpp |  7 +++++++
 src/chainparams.h   |  5 +++++
 src/pow.cpp         | 30 +++++++++++++-----------------
 3 files changed, 25 insertions(+), 17 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index afbae6fc5727..eb56af750e1e 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -117,6 +117,8 @@ class CMainParams : public CChainParams {
         nRejectBlockOutdatedMajority = 950;
         nToCheckBlockUpgradeMajority = 1000;
         nMinerThreads = 0;
+        nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+        nTargetSpacing = 10 * 60;
 
         // Build the genesis block. Note that the output of the genesis coinbase cannot
         // be spent as it did not originally exist in the database.
@@ -204,6 +206,9 @@ class CTestNetParams : public CMainParams {
         nEnforceBlockUpgradeMajority = 51;
         nRejectBlockOutdatedMajority = 75;
         nToCheckBlockUpgradeMajority = 100;
+        nMinerThreads = 0;
+        nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+        nTargetSpacing = 10 * 60;
         strDataDir = "testnet3";
 
         // Modify the testnet genesis block so the timestamp is valid for a later start.
@@ -251,6 +256,8 @@ class CRegTestParams : public CTestNetParams {
         nRejectBlockOutdatedMajority = 950;
         nToCheckBlockUpgradeMajority = 1000;
         nMinerThreads = 1;
+        nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+        nTargetSpacing = 10 * 60;
         bnProofOfWorkLimit = ~uint256(0) >> 1;
         genesis.nTime = 1296688602;
         genesis.nBits = 0x207fffff;
diff --git a/src/chainparams.h b/src/chainparams.h
index c0a6ebda6b3f..e9774bbfa2f2 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -70,6 +70,9 @@ class CChainParams
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
+    int64_t TargetTimespan() const { return nTargetTimespan; }
+    int64_t TargetSpacing() const { return nTargetSpacing; }
+    int64_t Interval() const { return nTargetTimespan / nTargetSpacing; }
     const std::string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
@@ -95,6 +98,8 @@ class CChainParams
     int nEnforceBlockUpgradeMajority;
     int nRejectBlockOutdatedMajority;
     int nToCheckBlockUpgradeMajority;
+    int64_t nTargetTimespan;
+    int64_t nTargetSpacing;
     std::string strDataDir;
     int nMinerThreads;
     std::vector<CDNSSeedData> vSeeds;
diff --git a/src/pow.cpp b/src/pow.cpp
index 274a5d6f98a1..952250decdab 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -10,10 +10,6 @@
 #include "main.h"
 #include "uint256.h"
 
-static const int64_t nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
-static const int64_t nTargetSpacing = 10 * 60;
-static const int64_t nInterval = nTargetTimespan / nTargetSpacing;
-
 unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
 {
     unsigned int nProofOfWorkLimit = Params().ProofOfWorkLimit().GetCompact();
@@ -23,20 +19,20 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
         return nProofOfWorkLimit;
 
     // Only change once per interval
-    if ((pindexLast->nHeight+1) % nInterval != 0)
+    if ((pindexLast->nHeight+1) % Params().Interval() != 0)
     {
         if (Params().AllowMinDifficultyBlocks())
         {
             // Special difficulty rule for testnet:
             // If the new block's timestamp is more than 2* 10 minutes
             // then allow mining of a min-difficulty block.
-            if (pblock->nTime > pindexLast->nTime + nTargetSpacing*2)
+            if (pblock->nTime > pindexLast->nTime + Params().TargetSpacing()*2)
                 return nProofOfWorkLimit;
             else
             {
                 // Return the last non-special-min-difficulty-rules-block
                 const CBlockIndex* pindex = pindexLast;
-                while (pindex->pprev && pindex->nHeight % nInterval != 0 && pindex->nBits == nProofOfWorkLimit)
+                while (pindex->pprev && pindex->nHeight % Params().Interval() != 0 && pindex->nBits == nProofOfWorkLimit)
                     pindex = pindex->pprev;
                 return pindex->nBits;
             }
@@ -46,17 +42,17 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
 
     // Go back by what we want to be 14 days worth of blocks
     const CBlockIndex* pindexFirst = pindexLast;
-    for (int i = 0; pindexFirst && i < nInterval-1; i++)
+    for (int i = 0; pindexFirst && i < Params().Interval()-1; i++)
         pindexFirst = pindexFirst->pprev;
     assert(pindexFirst);
 
     // Limit adjustment step
     int64_t nActualTimespan = pindexLast->GetBlockTime() - pindexFirst->GetBlockTime();
     LogPrintf("  nActualTimespan = %d  before bounds\n", nActualTimespan);
-    if (nActualTimespan < nTargetTimespan/4)
-        nActualTimespan = nTargetTimespan/4;
-    if (nActualTimespan > nTargetTimespan*4)
-        nActualTimespan = nTargetTimespan*4;
+    if (nActualTimespan < Params().TargetTimespan()/4)
+        nActualTimespan = Params().TargetTimespan()/4;
+    if (nActualTimespan > Params().TargetTimespan()*4)
+        nActualTimespan = Params().TargetTimespan()*4;
 
     // Retarget
     uint256 bnNew;
@@ -64,14 +60,14 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
     bnNew.SetCompact(pindexLast->nBits);
     bnOld = bnNew;
     bnNew *= nActualTimespan;
-    bnNew /= nTargetTimespan;
+    bnNew /= Params().TargetTimespan();
 
     if (bnNew > Params().ProofOfWorkLimit())
         bnNew = Params().ProofOfWorkLimit();
 
     /// debug print
     LogPrintf("GetNextWorkRequired RETARGET\n");
-    LogPrintf("nTargetTimespan = %d    nActualTimespan = %d\n", nTargetTimespan, nActualTimespan);
+    LogPrintf("Params().TargetTimespan() = %d    nActualTimespan = %d\n", Params().TargetTimespan(), nActualTimespan);
     LogPrintf("Before: %08x  %s\n", pindexLast->nBits, bnOld.ToString());
     LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.ToString());
 
@@ -104,8 +100,8 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
 {
     const uint256 &bnLimit = Params().ProofOfWorkLimit();
     // Testnet has min-difficulty blocks
-    // after nTargetSpacing*2 time between blocks:
-    if (Params().AllowMinDifficultyBlocks() && nTime > nTargetSpacing*2)
+    // after Params().TargetSpacing()*2 time between blocks:
+    if (Params().AllowMinDifficultyBlocks() && nTime > Params().TargetSpacing()*2)
         return bnLimit.GetCompact();
 
     uint256 bnResult;
@@ -115,7 +111,7 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
         // Maximum 400% adjustment...
         bnResult *= 4;
         // ... in best-case exactly 4-times-normal target time
-        nTime -= nTargetTimespan*4;
+        nTime -= Params().TargetTimespan()*4;
     }
     if (bnResult > bnLimit)
         bnResult = bnLimit;

From 6dc90ed8fa34db164fac956eed600b2ba66640a0 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 22 Jun 2014 20:17:15 +0200
Subject: [PATCH 0231/1819] replace 3 separate calls to WSAGetLastError() with
 1

---
 src/netbase.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 4aa7367f390f..3c50174e7597 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -337,8 +337,9 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
 
     if (connect(hSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR)
     {
+        int nErr = WSAGetLastError();
         // WSAEINVAL is here because some legacy version of winsock uses it
-        if (WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK || WSAGetLastError() == WSAEINVAL)
+        if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL)
         {
             struct timeval timeout;
             timeout.tv_sec  = nTimeout / 1000;

From 1c750dbd40e23be1f17cf74cd73041a1050dc98d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 5 May 2014 20:32:56 +0200
Subject: [PATCH 0232/1819] remove -tor compatibility code (only allow -onion)

- exit, if -tor option is found and give error to user
---
 src/init.cpp | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index ff7a9011a527..585e4ca89a2e 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -560,6 +560,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     // Check for -debugnet (deprecated)
     if (GetBoolArg("-debugnet", false))
         InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
+    // Check for -tor - as this is a privacy risk to continue, exit here
+    if (GetBoolArg("-tor", false))
+        return InitError(_("Error: Unsupported argument -tor found, use -onion."));
 
     fBenchmark = GetBoolArg("-benchmark", false);
     // Checkmempool defaults to true in regtest mode
@@ -766,19 +769,15 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     // -onion can override normal proxy, -noonion disables tor entirely
-    // -tor here is a temporary backwards compatibility measure
-    if (mapArgs.count("-tor"))
-        printf("Notice: option -tor has been replaced with -onion and will be removed in a later version.\n");
     if (!(mapArgs.count("-onion") && mapArgs["-onion"] == "0") &&
-        !(mapArgs.count("-tor") && mapArgs["-tor"] == "0") &&
-         (fProxy || mapArgs.count("-onion") || mapArgs.count("-tor"))) {
+        (fProxy || mapArgs.count("-onion"))) {
         CService addrOnion;
-        if (!mapArgs.count("-onion") && !mapArgs.count("-tor"))
+        if (!mapArgs.count("-onion"))
             addrOnion = addrProxy;
         else
-            addrOnion = mapArgs.count("-onion")?CService(mapArgs["-onion"], 9050):CService(mapArgs["-tor"], 9050);
+            addrOnion = CService(mapArgs["-onion"], 9050);
         if (!addrOnion.IsValid())
-            return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs.count("-onion")?mapArgs["-onion"]:mapArgs["-tor"]));
+            return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs["-onion"]));
         SetProxy(NET_TOR, addrOnion, 5);
         SetReachable(NET_TOR);
     }

From 5fbb4c9b58e0ed960d19436bb951b76cae398212 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 16:36:14 +0200
Subject: [PATCH 0233/1819] [Qt] fix links in about window not opening

- closes #4402
---
 src/qt/forms/helpmessagedialog.ui | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qt/forms/helpmessagedialog.ui b/src/qt/forms/helpmessagedialog.ui
index d8ab27c238b1..81dbd90b12d7 100644
--- a/src/qt/forms/helpmessagedialog.ui
+++ b/src/qt/forms/helpmessagedialog.ui
@@ -60,6 +60,9 @@
            <property name="textFormat">
             <enum>Qt::PlainText</enum>
            </property>
+           <property name="openExternalLinks">
+            <bool>true</bool>
+           </property>
            <property name="textInteractionFlags">
             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
            </property>

From e9f2460c587e1a7116e6af671bf9987d8825bfb0 Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Tue, 24 Jun 2014 18:06:52 +0100
Subject: [PATCH 0234/1819] Add dependencies for Mac OSX gitian builds

---
 doc/release-process.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/release-process.md b/doc/release-process.md
index affe6ed13a0c..d12b41772e35 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -52,6 +52,7 @@ Release Process
 	wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
 	wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O boost-mingw-gas-cross-compile-2013-03-03.patch
 	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
+	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz'
 	wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
 	wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
 	wget 'https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz'
@@ -100,6 +101,10 @@ Release Process
     751c579830d173ef3e6f194e83d18b92ebef6df03289db13ab77a52b6bc86ef0  qt-win64-5.2.0-gitian-r3.zip
     e2e403e1a08869c7eed4d4293bce13d51ec6a63592918b90ae215a0eceb44cb4  protobuf-win32-2.5.0-gitian-r4.zip
     a0999037e8b0ef9ade13efd88fee261ba401f5ca910068b7e0cd3262ba667db0  protobuf-win64-2.5.0-gitian-r4.zip
+    512bc0622c883e2e0f4cbc3fedfd8c2402d06c004ce6fb32303cc2a6f405b6df  osx-native-depends-r3.tar.gz
+    927e4b222be6d590b4bc2fc185872a5d0ca5c322adb983764d3ed84be6bdbc81  osx-depends-r4.tar.gz
+    ec95abef1df2b096a970359787c01d8c45e2a4475b7ae34e12c022634fbdba8a  osx-depends-qt-5.2.1-r4.tar.gz
+
 
  Build bitcoind and bitcoin-qt on Linux32, Linux64, and Win32:
   

From e3aedbae9be362d11c420a917959156adf73e2f3 Mon Sep 17 00:00:00 2001
From: Whit J <whitj00@users.noreply.github.com>
Date: Tue, 24 Jun 2014 17:23:05 -0700
Subject: [PATCH 0235/1819] Consistent lettering

---
 src/qt/askpassphrasedialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 2a6d6abc35bf..a448d5a9a051 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -37,7 +37,7 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
         case Encrypt: // Ask passphrase x2
             ui->passLabel1->hide();
             ui->passEdit1->hide();
-            ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>."));
+            ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
             setWindowTitle(tr("Encrypt wallet"));
             break;
         case Unlock: // Ask passphrase

From b79f59b9952b071128d42759cc06425dffe041d0 Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Tue, 24 Jun 2014 23:52:05 +0100
Subject: [PATCH 0236/1819] Update .gitignore

Removing old file ignores so they show up in `git status`
---
 .gitignore | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 85ddf3871f25..564fe68fd9b1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,10 +13,10 @@ autom4te.cache/
 config.log
 config.status
 configure
-src/bitcoin-config.h
-src/bitcoin-config.h.in
+src/config/bitcoin-config.h
+src/config/bitcoin-config.h.in
+src/config/stamp-h1
 src/build-aux/
-src/stamp-h1
 share/setup.nsi
 share/qt/Info.plist
 

From 14f888ca804386b111b07e8988753d67f507ba30 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 19 Jun 2014 15:08:37 +0200
Subject: [PATCH 0237/1819] Move network-time related functions to
 timedata.cpp/h

The network time-offset-mangement functions from util.cpp are moved to
timedata.(cpp|h). This breaks the dependency of util on netbase.
---
 src/Makefile.am              |  2 +
 src/addrman.h                |  1 +
 src/alert.cpp                |  1 +
 src/qt/transactiondesc.cpp   |  1 +
 src/qt/transactionrecord.cpp |  1 +
 src/rpcmisc.cpp              |  1 +
 src/rpcnet.cpp               |  1 +
 src/rpcwallet.cpp            |  1 +
 src/timedata.cpp             | 91 ++++++++++++++++++++++++++++++++++++
 src/timedata.h               | 17 +++++++
 src/util.cpp                 | 77 ------------------------------
 src/util.h                   |  4 --
 src/wallet.cpp               |  1 +
 13 files changed, 118 insertions(+), 81 deletions(-)
 create mode 100644 src/timedata.cpp
 create mode 100644 src/timedata.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 7e7fa0c3caec..cd54b0496ac2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -80,6 +80,7 @@ BITCOIN_CORE_H = \
   serialize.h \
   sync.h \
   threadsafety.h \
+  timedata.h \
   tinyformat.h \
   txdb.h \
   txmempool.h \
@@ -129,6 +130,7 @@ libbitcoin_server_a_SOURCES = \
   rpcnet.cpp \
   rpcrawtransaction.cpp \
   rpcserver.cpp \
+  timedata.cpp \
   txdb.cpp \
   txmempool.cpp \
   $(JSON_H) \
diff --git a/src/addrman.h b/src/addrman.h
index 5328a93b451b..c4c296560eab 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -8,6 +8,7 @@
 #include "netbase.h"
 #include "protocol.h"
 #include "sync.h"
+#include "timedata.h"
 #include "util.h"
 
 #include <map>
diff --git a/src/alert.cpp b/src/alert.cpp
index 638f0d7a1c1d..258a2b52c4f7 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -8,6 +8,7 @@
 #include "chainparams.h"
 #include "key.h"
 #include "net.h"
+#include "timedata.h"
 #include "ui_interface.h"
 #include "util.h"
 
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 61da3373fddd..e48dbcac9dc3 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -12,6 +12,7 @@
 #include "main.h"
 #include "paymentserver.h"
 #include "transactionrecord.h"
+#include "timedata.h"
 #include "ui_interface.h"
 #include "wallet.h"
 
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 5a3728f49883..eec2b57e8c1a 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -5,6 +5,7 @@
 #include "transactionrecord.h"
 
 #include "base58.h"
+#include "timedata.h"
 #include "wallet.h"
 
 #include <stdint.h>
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 5181aa23d8d7..2694e2bcf194 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -9,6 +9,7 @@
 #include "net.h"
 #include "netbase.h"
 #include "rpcserver.h"
+#include "timedata.h"
 #include "util.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 6fc86eedfbfa..a54872ccc470 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -9,6 +9,7 @@
 #include "netbase.h"
 #include "protocol.h"
 #include "sync.h"
+#include "timedata.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index f376ab6b636c..4f27cef087a9 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -8,6 +8,7 @@
 #include "init.h"
 #include "net.h"
 #include "netbase.h"
+#include "timedata.h"
 #include "util.h"
 #include "wallet.h"
 #include "walletdb.h"
diff --git a/src/timedata.cpp b/src/timedata.cpp
new file mode 100644
index 000000000000..8a095d26dcaa
--- /dev/null
+++ b/src/timedata.cpp
@@ -0,0 +1,91 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "timedata.h"
+
+#include "netbase.h"
+#include "sync.h"
+#include "ui_interface.h"
+#include "util.h"
+
+#include <boost/foreach.hpp>
+
+using namespace std;
+
+static CCriticalSection cs_nTimeOffset;
+static int64_t nTimeOffset = 0;
+
+//
+// "Never go to sea with two chronometers; take one or three."
+// Our three time sources are:
+//  - System clock
+//  - Median of other nodes clocks
+//  - The user (asking the user to fix the system clock if the first two disagree)
+//
+//
+int64_t GetTimeOffset()
+{
+    LOCK(cs_nTimeOffset);
+    return nTimeOffset;
+}
+
+int64_t GetAdjustedTime()
+{
+    return GetTime() + GetTimeOffset();
+}
+
+void AddTimeData(const CNetAddr& ip, int64_t nTime)
+{
+    int64_t nOffsetSample = nTime - GetTime();
+
+    LOCK(cs_nTimeOffset);
+    // Ignore duplicates
+    static set<CNetAddr> setKnown;
+    if (!setKnown.insert(ip).second)
+        return;
+
+    // Add data
+    static CMedianFilter<int64_t> vTimeOffsets(200,0);
+    vTimeOffsets.input(nOffsetSample);
+    LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
+    if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1)
+    {
+        int64_t nMedian = vTimeOffsets.median();
+        std::vector<int64_t> vSorted = vTimeOffsets.sorted();
+        // Only let other nodes change our time by so much
+        if (abs64(nMedian) < 70 * 60)
+        {
+            nTimeOffset = nMedian;
+        }
+        else
+        {
+            nTimeOffset = 0;
+
+            static bool fDone;
+            if (!fDone)
+            {
+                // If nobody has a time different than ours but within 5 minutes of ours, give a warning
+                bool fMatch = false;
+                BOOST_FOREACH(int64_t nOffset, vSorted)
+                    if (nOffset != 0 && abs64(nOffset) < 5 * 60)
+                        fMatch = true;
+
+                if (!fMatch)
+                {
+                    fDone = true;
+                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly.");
+                    strMiscWarning = strMessage;
+                    LogPrintf("*** %s\n", strMessage);
+                    uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
+                }
+            }
+        }
+        if (fDebug) {
+            BOOST_FOREACH(int64_t n, vSorted)
+                LogPrintf("%+d  ", n);
+            LogPrintf("|  ");
+        }
+        LogPrintf("nTimeOffset = %+d  (%+d minutes)\n", nTimeOffset, nTimeOffset/60);
+    }
+}
diff --git a/src/timedata.h b/src/timedata.h
new file mode 100644
index 000000000000..0e7bdc2c1f06
--- /dev/null
+++ b/src/timedata.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_TIMEDATA_H
+#define BITCOIN_TIMEDATA_H
+
+#include <stdint.h>
+
+class CNetAddr;
+
+/* Functions to keep track of adjusted P2P time */
+int64_t GetTimeOffset();
+int64_t GetAdjustedTime();
+void AddTimeData(const CNetAddr& ip, int64_t nTime);
+
+#endif
diff --git a/src/util.cpp b/src/util.cpp
index 30590912ff03..a19c015da68a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6,7 +6,6 @@
 #include "util.h"
 
 #include "chainparams.h"
-#include "netbase.h"
 #include "sync.h"
 #include "ui_interface.h"
 #include "uint256.h"
@@ -1157,13 +1156,6 @@ void ShrinkDebugFile()
         fclose(file);
 }
 
-//
-// "Never go to sea with two chronometers; take one or three."
-// Our three time sources are:
-//  - System clock
-//  - Median of other nodes clocks
-//  - The user (asking the user to fix the system clock if the first two disagree)
-//
 static int64_t nMockTime = 0;  // For unit testing
 
 int64_t GetTime()
@@ -1178,75 +1170,6 @@ void SetMockTime(int64_t nMockTimeIn)
     nMockTime = nMockTimeIn;
 }
 
-static CCriticalSection cs_nTimeOffset;
-static int64_t nTimeOffset = 0;
-
-int64_t GetTimeOffset()
-{
-    LOCK(cs_nTimeOffset);
-    return nTimeOffset;
-}
-
-int64_t GetAdjustedTime()
-{
-    return GetTime() + GetTimeOffset();
-}
-
-void AddTimeData(const CNetAddr& ip, int64_t nTime)
-{
-    int64_t nOffsetSample = nTime - GetTime();
-
-    LOCK(cs_nTimeOffset);
-    // Ignore duplicates
-    static set<CNetAddr> setKnown;
-    if (!setKnown.insert(ip).second)
-        return;
-
-    // Add data
-    static CMedianFilter<int64_t> vTimeOffsets(200,0);
-    vTimeOffsets.input(nOffsetSample);
-    LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
-    if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1)
-    {
-        int64_t nMedian = vTimeOffsets.median();
-        std::vector<int64_t> vSorted = vTimeOffsets.sorted();
-        // Only let other nodes change our time by so much
-        if (abs64(nMedian) < 70 * 60)
-        {
-            nTimeOffset = nMedian;
-        }
-        else
-        {
-            nTimeOffset = 0;
-
-            static bool fDone;
-            if (!fDone)
-            {
-                // If nobody has a time different than ours but within 5 minutes of ours, give a warning
-                bool fMatch = false;
-                BOOST_FOREACH(int64_t nOffset, vSorted)
-                    if (nOffset != 0 && abs64(nOffset) < 5 * 60)
-                        fMatch = true;
-
-                if (!fMatch)
-                {
-                    fDone = true;
-                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly.");
-                    strMiscWarning = strMessage;
-                    LogPrintf("*** %s\n", strMessage);
-                    uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
-                }
-            }
-        }
-        if (fDebug) {
-            BOOST_FOREACH(int64_t n, vSorted)
-                LogPrintf("%+d  ", n);
-            LogPrintf("|  ");
-        }
-        LogPrintf("nTimeOffset = %+d  (%+d minutes)\n", nTimeOffset, nTimeOffset/60);
-    }
-}
-
 uint32_t insecure_rand_Rz = 11;
 uint32_t insecure_rand_Rw = 11;
 void seed_insecure_rand(bool fDeterministic)
diff --git a/src/util.h b/src/util.h
index 5eb6f0382635..6057c72e6691 100644
--- a/src/util.h
+++ b/src/util.h
@@ -32,7 +32,6 @@
 #include <boost/filesystem/path.hpp>
 #include <boost/thread.hpp>
 
-class CNetAddr;
 class uint256;
 
 static const int64_t COIN = 100000000;
@@ -191,11 +190,8 @@ uint64_t GetRand(uint64_t nMax);
 uint256 GetRandHash();
 int64_t GetTime();
 void SetMockTime(int64_t nMockTimeIn);
-int64_t GetAdjustedTime();
-int64_t GetTimeOffset();
 std::string FormatFullVersion();
 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
-void AddTimeData(const CNetAddr& ip, int64_t nTime);
 void runCommand(std::string strCommand);
 
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index e74980e9e7d4..f6fd6e958d3b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -9,6 +9,7 @@
 #include "checkpoints.h"
 #include "coincontrol.h"
 #include "net.h"
+#include "timedata.h"
 
 #include <boost/algorithm/string/replace.hpp>
 #include <openssl/rand.h>

From 84ce18ca9339901f65d77a5821eb65f771316558 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 19 Jun 2014 15:10:04 +0200
Subject: [PATCH 0238/1819] Remove unnecessary dependencies for bitcoin-cli

This commit removes all the unnecessary dependencies (key, core,
netbase, sync, ...) from bitcoin-cli.

To do this it shards the chain parameters into BaseParams, which
contains just the RPC port and data directory (as used by utils and
bitcoin-cli) and Params, with the rest.
---
 src/Makefile.am                    | 58 +++++++++++++------
 src/Makefile.qt.include            |  4 +-
 src/Makefile.qttest.include        |  2 +-
 src/Makefile.test.include          |  2 +-
 src/bitcoin-cli.cpp                |  9 ++-
 src/chainparams.cpp                | 36 ++++--------
 src/chainparams.h                  | 19 ++----
 src/chainparamsbase.cpp            | 93 ++++++++++++++++++++++++++++++
 src/chainparamsbase.h              | 52 +++++++++++++++++
 src/checkpoints.cpp                |  4 +-
 src/qt/bitcoin.cpp                 |  2 +-
 src/qt/paymentserver.cpp           |  8 +--
 src/qt/test/paymentservertests.cpp |  1 +
 src/rpcmining.cpp                  |  2 +-
 src/rpcmisc.cpp                    |  2 +-
 src/rpcserver.cpp                  |  2 +-
 src/test/base58_tests.cpp          | 12 ++--
 src/test/test_bitcoin.cpp          |  1 +
 src/util.cpp                       | 12 ++--
 19 files changed, 232 insertions(+), 89 deletions(-)
 create mode 100644 src/chainparamsbase.cpp
 create mode 100644 src/chainparamsbase.h

diff --git a/src/Makefile.am b/src/Makefile.am
index cd54b0496ac2..2d2ae2a4c1cb 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,10 +20,19 @@ endif
 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
 BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
 
+LIBBITCOIN_SERVER=libbitcoin_server.a
+LIBBITCOIN_WALLET=libbitcoin_wallet.a
+LIBBITCOIN_COMMON=libbitcoin_common.a
+LIBBITCOIN_CLI=libbitcoin_cli.a
+LIBBITCOIN_UTIL=libbitcoin_util.a
+LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+LIBBITCOINQT=qt/libbitcoinqt.a
+
 noinst_LIBRARIES = \
   libbitcoin_server.a \
   libbitcoin_common.a \
   libbitcoin_cli.a \
+  libbitcoin_util.a \
   crypto/libbitcoin_crypto.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
@@ -50,6 +59,7 @@ BITCOIN_CORE_H = \
   base58.h \
   bloom.h \
   chainparams.h \
+  chainparamsbase.h \
   checkpoints.h \
   checkqueue.h \
   clientversion.h \
@@ -107,8 +117,9 @@ obj/build.h: FORCE
 	@$(MKDIR_P) $(builddir)/obj
 	@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
 	  $(abs_top_srcdir)
-libbitcoin_common_a-version.$(OBJEXT): obj/build.h
+libbitcoin_util_a-version.$(OBJEXT): obj/build.h
 
+# server: shared between bitcoind and bitcoin-qt
 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_server_a_SOURCES = \
   addrman.cpp \
@@ -136,6 +147,8 @@ libbitcoin_server_a_SOURCES = \
   $(JSON_H) \
   $(BITCOIN_CORE_H)
 
+# wallet: shared between bitcoind and bitcoin-qt, but only linked
+# when wallet enabled
 libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_wallet_a_SOURCES = \
   db.cpp \
@@ -146,6 +159,7 @@ libbitcoin_wallet_a_SOURCES = \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
 
+# crypto primitives library
 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
 crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha1.cpp \
@@ -156,6 +170,7 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha1.h \
   crypto/ripemd160.h
 
+# common: shared between bitcoind, and bitcoin-qt and non-server tools
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
   base58.cpp \
@@ -166,8 +181,16 @@ libbitcoin_common_a_SOURCES = \
   key.cpp \
   netbase.cpp \
   protocol.cpp \
-  rpcprotocol.cpp \
   script.cpp \
+  $(BITCOIN_CORE_H)
+
+# util: shared between all executables.
+# This library *must* be included to make sure that the glibc
+# backward-compatibility objects and their sanity checks are linked.
+libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
+libbitcoin_util_a_SOURCES = \
+  chainparamsbase.cpp \
+  rpcprotocol.cpp \
   sync.cpp \
   util.cpp \
   version.cpp \
@@ -176,22 +199,24 @@ libbitcoin_common_a_SOURCES = \
   $(BITCOIN_CORE_H)
 
 if GLIBC_BACK_COMPAT
-libbitcoin_common_a_SOURCES += compat/glibc_compat.cpp
-libbitcoin_common_a_SOURCES += compat/glibcxx_compat.cpp
+libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
+libbitcoin_util_a_SOURCES += compat/glibcxx_compat.cpp
 endif
 
+# cli: shared between bitcoin-cli and bitcoin-qt
 libbitcoin_cli_a_SOURCES = \
   rpcclient.cpp \
   $(BITCOIN_CORE_H)
 
-nodist_libbitcoin_common_a_SOURCES = $(srcdir)/obj/build.h
+nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
 #
 
 # bitcoind binary #
 bitcoind_LDADD = \
-  libbitcoin_server.a \
-  libbitcoin_common.a \
-  crypto/libbitcoin_crypto.a \
+  $(LIBBITCOIN_SERVER) \
+  $(LIBBITCOIN_COMMON) \
+  $(LIBBITCOIN_UTIL) \
+  $(LIBBITCOIN_CRYPTO) \
   $(LIBLEVELDB) \
   $(LIBMEMENV)
 if ENABLE_WALLET
@@ -209,11 +234,13 @@ bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
-  libbitcoin_cli.a \
-  libbitcoin_common.a \
-  crypto/libbitcoin_crypto.a \
+  $(LIBBITCOIN_CLI) \
+  $(LIBBITCOIN_COMMON) \
+  $(LIBBITCOIN_UTIL) \
+  $(LIBBITCOIN_CRYPTO) \
   $(BOOST_LIBS)
-bitcoin_cli_SOURCES = bitcoin-cli.cpp
+bitcoin_cli_SOURCES = \
+  bitcoin-cli.cpp
 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
@@ -244,13 +271,6 @@ clean-local:
 	@test -f $(PROTOC)
 	$(AM_V_GEN) $(PROTOC) --cpp_out=$(@D) --proto_path=$(abspath $(<D) $<)
 
-LIBBITCOIN_SERVER=libbitcoin_server.a
-LIBBITCOIN_WALLET=libbitcoin_wallet.a
-LIBBITCOIN_COMMON=libbitcoin_common.a
-LIBBITCOIN_CLI=libbitcoin_cli.a
-LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
-LIBBITCOINQT=qt/libbitcoinqt.a
-
 if ENABLE_TESTS
 include Makefile.test.include
 endif
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 091138dc38f0..9df0779ba35c 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -355,7 +355,7 @@ qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
 
@@ -364,7 +364,7 @@ QT_QM=$(QT_TS:.ts=.qm)
 
 .SECONDARY: $(QT_QM)
 
-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES)
+qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES) $(libbitcoin_util_a_SOURCES)
 	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
 	$(AM_V_GEN) cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
 
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 0aa31a406d8a..a509f237553b 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -30,7 +30,7 @@ qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) \
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 64f997f4b5a2..4dab1773f4a8 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -63,7 +63,7 @@ endif
 
 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
-test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
 if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 40b45415c4c5..db39df4b17d9 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -8,7 +8,7 @@
 #include "rpcclient.h"
 #include "rpcprotocol.h"
 #include "ui_interface.h" /* for _(...) */
-#include "chainparams.h"
+#include "chainparamsbase.h"
 
 #include <boost/filesystem/operations.hpp>
 
@@ -60,12 +60,11 @@ static bool AppInitRPC(int argc, char* argv[])
         fprintf(stderr,"Error reading configuration file: %s\n", e.what());
         return false;
     }
-    // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
-    if (!SelectParamsFromCommandLine()) {
+    // Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
+    if (!SelectBaseParamsFromCommandLine()) {
         fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
         return false;
     }
-
     if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
     {
         std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
@@ -104,7 +103,7 @@ Object CallRPC(const string& strMethod, const Array& params)
 
     bool fWait = GetBoolArg("-rpcwait", false); // -rpcwait means try until server has started
     do {
-        bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(Params().RPCPort())));
+        bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(BaseParams().RPCPort())));
         if (fConnected) break;
         if (fWait)
             MilliSleep(1000);
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index eb56af750e1e..63067a153d00 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -99,7 +99,7 @@ unsigned int pnSeed[] =
 class CMainParams : public CChainParams {
 public:
     CMainParams() {
-        networkID = CChainParams::MAIN;
+        networkID = CBaseChainParams::MAIN;
         strNetworkID = "main";
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
@@ -110,7 +110,6 @@ class CMainParams : public CChainParams {
         pchMessageStart[3] = 0xd9;
         vAlertPubKey = ParseHex("04fc9702847840aaf195de8442ebecedf5b095cdbb9bc716bda9110971b28a49e0ead8564ff0db22209e0374782c093bb899692d524e9d6a6956e7c5ecbcd68284");
         nDefaultPort = 8333;
-        nRPCPort = 8332;
         bnProofOfWorkLimit = ~uint256(0) >> 32;
         nSubsidyHalvingInterval = 210000;
         nEnforceBlockUpgradeMajority = 750;
@@ -191,7 +190,7 @@ static CMainParams mainParams;
 class CTestNetParams : public CMainParams {
 public:
     CTestNetParams() {
-        networkID = CChainParams::TESTNET;
+        networkID = CBaseChainParams::TESTNET;
         strNetworkID = "test";
         // The message start string is designed to be unlikely to occur in normal data.
         // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
@@ -202,14 +201,12 @@ class CTestNetParams : public CMainParams {
         pchMessageStart[3] = 0x07;
         vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a");
         nDefaultPort = 18333;
-        nRPCPort = 18332;
         nEnforceBlockUpgradeMajority = 51;
         nRejectBlockOutdatedMajority = 75;
         nToCheckBlockUpgradeMajority = 100;
         nMinerThreads = 0;
         nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
         nTargetSpacing = 10 * 60;
-        strDataDir = "testnet3";
 
         // Modify the testnet genesis block so the timestamp is valid for a later start.
         genesis.nTime = 1296688602;
@@ -245,7 +242,7 @@ static CTestNetParams testNetParams;
 class CRegTestParams : public CTestNetParams {
 public:
     CRegTestParams() {
-        networkID = CChainParams::REGTEST;
+        networkID = CBaseChainParams::REGTEST;
         strNetworkID = "regtest";
         pchMessageStart[0] = 0xfa;
         pchMessageStart[1] = 0xbf;
@@ -264,7 +261,6 @@ class CRegTestParams : public CTestNetParams {
         genesis.nNonce = 2;
         hashGenesisBlock = genesis.GetHash();
         nDefaultPort = 18444;
-        strDataDir = "regtest";
         assert(hashGenesisBlock == uint256("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
 
         vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
@@ -279,21 +275,23 @@ class CRegTestParams : public CTestNetParams {
 };
 static CRegTestParams regTestParams;
 
-static CChainParams *pCurrentParams = &mainParams;
+static CChainParams *pCurrentParams = 0;
 
 const CChainParams &Params() {
+    assert(pCurrentParams);
     return *pCurrentParams;
 }
 
-void SelectParams(CChainParams::Network network) {
+void SelectParams(CBaseChainParams::Network network) {
+    SelectBaseParams(network);
     switch (network) {
-        case CChainParams::MAIN:
+        case CBaseChainParams::MAIN:
             pCurrentParams = &mainParams;
             break;
-        case CChainParams::TESTNET:
+        case CBaseChainParams::TESTNET:
             pCurrentParams = &testNetParams;
             break;
-        case CChainParams::REGTEST:
+        case CBaseChainParams::REGTEST:
             pCurrentParams = &regTestParams;
             break;
         default:
@@ -303,19 +301,9 @@ void SelectParams(CChainParams::Network network) {
 }
 
 bool SelectParamsFromCommandLine() {
-    bool fRegTest = GetBoolArg("-regtest", false);
-    bool fTestNet = GetBoolArg("-testnet", false);
-
-    if (fTestNet && fRegTest) {
+    if (!SelectBaseParamsFromCommandLine())
         return false;
-    }
 
-    if (fRegTest) {
-        SelectParams(CChainParams::REGTEST);
-    } else if (fTestNet) {
-        SelectParams(CChainParams::TESTNET);
-    } else {
-        SelectParams(CChainParams::MAIN);
-    }
+    SelectParams(BaseParams().NetworkID());
     return true;
 }
diff --git a/src/chainparams.h b/src/chainparams.h
index e9774bbfa2f2..446256ba82a7 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -7,6 +7,7 @@
 #define BITCOIN_CHAIN_PARAMS_H
 
 #include "core.h"
+#include "chainparamsbase.h"
 #include "protocol.h"
 #include "uint256.h"
 
@@ -29,14 +30,6 @@ struct CDNSSeedData {
 class CChainParams
 {
 public:
-    enum Network {
-        MAIN,
-        TESTNET,
-        REGTEST,
-
-        MAX_NETWORK_TYPES
-    };
-
     enum Base58Type {
         PUBKEY_ADDRESS,
         SCRIPT_ADDRESS,
@@ -73,17 +66,15 @@ class CChainParams
     int64_t TargetTimespan() const { return nTargetTimespan; }
     int64_t TargetSpacing() const { return nTargetSpacing; }
     int64_t Interval() const { return nTargetTimespan / nTargetSpacing; }
-    const std::string& DataDir() const { return strDataDir; }
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
-    Network NetworkID() const { return networkID; }
+    CBaseChainParams::Network NetworkID() const { return networkID; }
     /* Return the BIP70 network string (main, test or regtest) */
     std::string NetworkIDString() const { return strNetworkID; }
     const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
     const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
-    int RPCPort() const { return nRPCPort; }
 protected:
     CChainParams() {}
 
@@ -92,7 +83,6 @@ class CChainParams
     // Raw pub key bytes for the broadcast alert signing key.
     std::vector<unsigned char> vAlertPubKey;
     int nDefaultPort;
-    int nRPCPort;
     uint256 bnProofOfWorkLimit;
     int nSubsidyHalvingInterval;
     int nEnforceBlockUpgradeMajority;
@@ -100,11 +90,10 @@ class CChainParams
     int nToCheckBlockUpgradeMajority;
     int64_t nTargetTimespan;
     int64_t nTargetSpacing;
-    std::string strDataDir;
     int nMinerThreads;
     std::vector<CDNSSeedData> vSeeds;
     std::vector<unsigned char> base58Prefixes[MAX_BASE58_TYPES];
-    Network networkID;
+    CBaseChainParams::Network networkID;
     std::string strNetworkID;
     CBlock genesis;
     std::vector<CAddress> vFixedSeeds;
@@ -123,7 +112,7 @@ class CChainParams
 const CChainParams &Params();
 
 /** Sets the params returned by Params() to those for the given network. */
-void SelectParams(CChainParams::Network network);
+void SelectParams(CBaseChainParams::Network network);
 
 /**
  * Looks for -regtest or -testnet and then calls SelectParams as appropriate.
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
new file mode 100644
index 000000000000..19a9e72cc965
--- /dev/null
+++ b/src/chainparamsbase.cpp
@@ -0,0 +1,93 @@
+// Copyright (c) 2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "chainparamsbase.h"
+
+#include "assert.h"
+#include "util.h"
+
+#include <boost/assign/list_of.hpp>
+
+using namespace boost::assign;
+
+//
+// Main network
+//
+
+class CBaseMainParams : public CBaseChainParams {
+public:
+    CBaseMainParams() {
+        networkID = CBaseChainParams::MAIN;
+        nRPCPort = 8332;
+    }
+};
+static CBaseMainParams mainParams;
+
+//
+// Testnet (v3)
+//
+class CBaseTestNetParams : public CBaseMainParams {
+public:
+    CBaseTestNetParams() {
+        networkID = CBaseChainParams::TESTNET;
+        nRPCPort = 18332;
+        strDataDir = "testnet3";
+    }
+};
+static CBaseTestNetParams testNetParams;
+
+//
+// Regression test
+//
+class CBaseRegTestParams : public CBaseTestNetParams {
+public:
+    CBaseRegTestParams() {
+        networkID = CBaseChainParams::REGTEST;
+        strDataDir = "regtest";
+    }
+};
+static CBaseRegTestParams regTestParams;
+
+static CBaseChainParams *pCurrentBaseParams = 0;
+
+const CBaseChainParams &BaseParams() {
+    assert(pCurrentBaseParams);
+    return *pCurrentBaseParams;
+}
+
+void SelectBaseParams(CBaseChainParams::Network network) {
+    switch (network) {
+        case CBaseChainParams::MAIN:
+            pCurrentBaseParams = &mainParams;
+            break;
+        case CBaseChainParams::TESTNET:
+            pCurrentBaseParams = &testNetParams;
+            break;
+        case CBaseChainParams::REGTEST:
+            pCurrentBaseParams = &regTestParams;
+            break;
+        default:
+            assert(false && "Unimplemented network");
+            return;
+    }
+}
+
+bool SelectBaseParamsFromCommandLine() {
+    bool fRegTest = GetBoolArg("-regtest", false);
+    bool fTestNet = GetBoolArg("-testnet", false);
+
+    if (fTestNet && fRegTest) {
+        return false;
+    }
+
+    if (fRegTest) {
+        SelectBaseParams(CBaseChainParams::REGTEST);
+    } else if (fTestNet) {
+        SelectBaseParams(CBaseChainParams::TESTNET);
+    } else {
+        SelectBaseParams(CBaseChainParams::MAIN);
+    }
+    return true;
+}
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
new file mode 100644
index 000000000000..4a3b26890946
--- /dev/null
+++ b/src/chainparamsbase.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_CHAIN_PARAMS_BASE_H
+#define BITCOIN_CHAIN_PARAMS_BASE_H
+
+#include <vector>
+#include <string>
+
+/**
+ * CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind)
+ * of a given instance of the Bitcoin system.
+ */
+class CBaseChainParams
+{
+public:
+    enum Network {
+        MAIN,
+        TESTNET,
+        REGTEST,
+
+        MAX_NETWORK_TYPES
+    };
+
+    const std::string& DataDir() const { return strDataDir; }
+    int RPCPort() const { return nRPCPort; }
+    Network NetworkID() const { return networkID; }
+protected:
+    CBaseChainParams() {}
+
+    int nRPCPort;
+    std::string strDataDir;
+    Network networkID;
+};
+
+/**
+ * Return the currently selected parameters. This won't change after app startup
+ * outside of the unit tests.
+ */
+const CBaseChainParams &BaseParams();
+
+/** Sets the params returned by Params() to those for the given network. */
+void SelectBaseParams(CBaseChainParams::Network network);
+
+/**
+ * Looks for -regtest or -testnet and then calls SelectParams as appropriate.
+ * Returns false if an invalid combination is given.
+ */
+bool SelectBaseParamsFromCommandLine();
+
+#endif
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 926949e06a3c..75ac418916a4 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -83,9 +83,9 @@ namespace Checkpoints
     };
 
     const CCheckpointData &Checkpoints() {
-        if (Params().NetworkID() == CChainParams::TESTNET)
+        if (Params().NetworkID() == CBaseChainParams::TESTNET)
             return dataTestnet;
-        else if (Params().NetworkID() == CChainParams::MAIN)
+        else if (Params().NetworkID() == CBaseChainParams::MAIN)
             return data;
         else
             return dataRegtest;
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 76dddb103cb4..89305e9f3500 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -546,7 +546,7 @@ int main(int argc, char *argv[])
     if (!PaymentServer::ipcParseCommandLine(argc, argv))
         exit(0);
 #endif
-    bool isaTestNet = Params().NetworkID() != CChainParams::MAIN;
+    bool isaTestNet = Params().NetworkID() != CBaseChainParams::MAIN;
     // Allow for separate UI settings for testnets
     if (isaTestNet)
         QApplication::setApplicationName(QAPP_APP_NAME_TESTNET);
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 49923a1afc78..fbb11617fe59 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -199,10 +199,10 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             {
                 CBitcoinAddress address(r.address.toStdString());
 
-                SelectParams(CChainParams::MAIN);
+                SelectParams(CBaseChainParams::MAIN);
                 if (!address.IsValid())
                 {
-                    SelectParams(CChainParams::TESTNET);
+                    SelectParams(CBaseChainParams::TESTNET);
                 }
             }
         }
@@ -214,9 +214,9 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             if (readPaymentRequest(arg, request))
             {
                 if (request.getDetails().network() == "main")
-                    SelectParams(CChainParams::MAIN);
+                    SelectParams(CBaseChainParams::MAIN);
                 else
-                    SelectParams(CChainParams::TESTNET);
+                    SelectParams(CBaseChainParams::TESTNET);
             }
         }
         else
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index 7dee7a9cda47..e92a7d2b1a4d 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -56,6 +56,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
 
 void PaymentServerTests::paymentServerTests()
 {
+    SelectParams(CBaseChainParams::MAIN);
     OptionsModel optionsModel;
     PaymentServer* server = new PaymentServer(NULL, false);
     X509_STORE* caStore = X509_STORE_new();
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index f60070eb5bd2..0072557f876a 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -237,7 +237,7 @@ Value getmininginfo(const Array& params, bool fHelp)
     obj.push_back(Pair("genproclimit",     (int)GetArg("-genproclimit", -1)));
     obj.push_back(Pair("networkhashps",    getnetworkhashps(params, false)));
     obj.push_back(Pair("pooledtx",         (uint64_t)mempool.size()));
-    obj.push_back(Pair("testnet",          Params().NetworkID() == CChainParams::TESTNET));
+    obj.push_back(Pair("testnet",          Params().NetworkID() == CBaseChainParams::TESTNET));
     obj.push_back(Pair("chain",            Params().NetworkIDString()));
 #ifdef ENABLE_WALLET
     obj.push_back(Pair("generate",         getgenerate(params, false)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 2694e2bcf194..a300de26800d 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -74,7 +74,7 @@ Value getinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
-    obj.push_back(Pair("testnet",       Params().NetworkID() == CChainParams::TESTNET));
+    obj.push_back(Pair("testnet",       Params().NetworkID() == CBaseChainParams::TESTNET));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
         obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 93da81e42959..c5d09cf577ec 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -600,7 +600,7 @@ void StartRPCThreads()
 
     std::vector<ip::tcp::endpoint> vEndpoints;
     bool bBindAny = false;
-    int defaultPort = GetArg("-rpcport", Params().RPCPort());
+    int defaultPort = GetArg("-rpcport", BaseParams().RPCPort());
     if (!mapArgs.count("-rpcallowip")) // Default to loopback if not allowing external IPs
     {
         vEndpoints.push_back(ip::tcp::endpoint(asio::ip::address_v6::loopback(), defaultPort));
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index b81a19cfd8ba..0ac3e9a36353 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -142,9 +142,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
         bool isPrivkey = find_value(metadata, "isPrivkey").get_bool();
         bool isTestnet = find_value(metadata, "isTestnet").get_bool();
         if (isTestnet)
-            SelectParams(CChainParams::TESTNET);
+            SelectParams(CBaseChainParams::TESTNET);
         else
-            SelectParams(CChainParams::MAIN);
+            SelectParams(CBaseChainParams::MAIN);
         if(isPrivkey)
         {
             bool isCompressed = find_value(metadata, "isCompressed").get_bool();
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
             BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest);
         }
     }
-    SelectParams(CChainParams::MAIN);
+    SelectParams(CBaseChainParams::MAIN);
 }
 
 // Goal: check that generated keys match test vectors
@@ -198,9 +198,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
         bool isPrivkey = find_value(metadata, "isPrivkey").get_bool();
         bool isTestnet = find_value(metadata, "isTestnet").get_bool();
         if (isTestnet)
-            SelectParams(CChainParams::TESTNET);
+            SelectParams(CBaseChainParams::TESTNET);
         else
-            SelectParams(CChainParams::MAIN);
+            SelectParams(CBaseChainParams::MAIN);
         if(isPrivkey)
         {
             bool isCompressed = find_value(metadata, "isCompressed").get_bool();
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
     CTxDestination nodest = CNoDestination();
     BOOST_CHECK(!dummyAddr.Set(nodest));
 
-    SelectParams(CChainParams::MAIN);
+    SelectParams(CBaseChainParams::MAIN);
 }
 
 // Goal: check that base58 parsing code is robust against a variety of corrupted data
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 2d993e24dbdc..8cae0a4c34fa 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -31,6 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
+        SelectParams(CBaseChainParams::MAIN);
         noui_connect();
 #ifdef ENABLE_WALLET
         bitdb.MakeMock();
diff --git a/src/util.cpp b/src/util.cpp
index a19c015da68a..7a0e2cc8002b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -5,7 +5,7 @@
 
 #include "util.h"
 
-#include "chainparams.h"
+#include "chainparamsbase.h"
 #include "sync.h"
 #include "ui_interface.h"
 #include "uint256.h"
@@ -918,7 +918,7 @@ boost::filesystem::path GetDefaultDataDir()
 #endif
 }
 
-static boost::filesystem::path pathCached[CChainParams::MAX_NETWORK_TYPES+1];
+static boost::filesystem::path pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1];
 static CCriticalSection csPathCached;
 
 const boost::filesystem::path &GetDataDir(bool fNetSpecific)
@@ -927,8 +927,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
     LOCK(csPathCached);
 
-    int nNet = CChainParams::MAX_NETWORK_TYPES;
-    if (fNetSpecific) nNet = Params().NetworkID();
+    int nNet = CBaseChainParams::MAX_NETWORK_TYPES;
+    if (fNetSpecific) nNet = BaseParams().NetworkID();
 
     fs::path &path = pathCached[nNet];
 
@@ -947,7 +947,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
         path = GetDefaultDataDir();
     }
     if (fNetSpecific)
-        path /= Params().DataDir();
+        path /= BaseParams().DataDir();
 
     fs::create_directories(path);
 
@@ -956,7 +956,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
 void ClearDatadirCache()
 {
-    std::fill(&pathCached[0], &pathCached[CChainParams::MAX_NETWORK_TYPES+1],
+    std::fill(&pathCached[0], &pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1],
         boost::filesystem::path());
 }
 

From 75c82d4923174a126e1b87be6a43f274d2cc4c9b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 25 Jun 2014 10:03:00 +0200
Subject: [PATCH 0239/1819] Move coins.cpp and keystore.cpp to
 libbitcoin_common

Prepare for introduction of `bitcoin-tx` tool.
---
 src/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 2d2ae2a4c1cb..3643e60201dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -126,9 +126,7 @@ libbitcoin_server_a_SOURCES = \
   alert.cpp \
   bloom.cpp \
   checkpoints.cpp \
-  coins.cpp \
   init.cpp \
-  keystore.cpp \
   leveldbwrapper.cpp \
   main.cpp \
   miner.cpp \
@@ -173,12 +171,14 @@ crypto_libbitcoin_crypto_a_SOURCES = \
 # common: shared between bitcoind, and bitcoin-qt and non-server tools
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
-  base58.cpp \
   allocators.cpp \
+  base58.cpp \
   chainparams.cpp \
+  coins.cpp \
   core.cpp \
   hash.cpp \
   key.cpp \
+  keystore.cpp \
   netbase.cpp \
   protocol.cpp \
   script.cpp \

From 8969828d069e4e55108618a493749535edc12ec7 Mon Sep 17 00:00:00 2001
From: gubatron <gubatron@gmail.com>
Date: Sat, 7 Jun 2014 02:20:22 -0400
Subject: [PATCH 0240/1819] [Qt] New status bar Unit Display Control and
 related changes.

- New status bar control shows the current Unit of Display.
  When clicked (left,or right button) it shows a context menu
  that allows the user to switch the current Unit of Display (BTC, mBTC, uBTC)
- Recent Requests and Transaction Table headers are now updated when
  unit of display is changed, because their "Amount" column now displays the
  current unit of display.
- Takes care of issue #3970 Units in transaction export csv file.
- Small refactors for reusability.
- Demo Video https://www.youtube.com/watch?v=wwcr0Yh68go&list=UUG3jF2hgofmLWP0tRPisQAQ
- changes after Diapolo's feedback. Have not been able to build after last pool, issues with boost on MacOSX, will test on Ubuntu these changes.
- removed return statement on switch
- renamed onDisplayUnitsChanged(int) to updateDisplayUnit(int)
- now getAmountColumnTitle(int unit) takes a simple unit parameter. moved to BitcoinUnits.
---
 src/qt/bitcoingui.cpp               | 78 +++++++++++++++++++++++++++++
 src/qt/bitcoingui.h                 | 37 ++++++++++++++
 src/qt/bitcoinunits.cpp             | 10 ++++
 src/qt/bitcoinunits.h               |  2 +
 src/qt/optionsmodel.cpp             | 17 +++++--
 src/qt/optionsmodel.h               |  2 +
 src/qt/recentrequeststablemodel.cpp | 27 +++++++++-
 src/qt/recentrequeststablemodel.h   |  6 +++
 src/qt/transactiontablemodel.cpp    | 11 +++-
 src/qt/transactiontablemodel.h      |  2 +
 src/qt/transactionview.cpp          |  2 +-
 11 files changed, 187 insertions(+), 7 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 30f5ec8939b5..f2fb8c877e0f 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -28,6 +28,7 @@
 
 #include <iostream>
 
+#include <QAction>
 #include <QApplication>
 #include <QDateTime>
 #include <QDesktopWidget>
@@ -39,6 +40,7 @@
 #include <QMenuBar>
 #include <QMessageBox>
 #include <QMimeData>
+#include <QPoint>
 #include <QProgressBar>
 #include <QProgressDialog>
 #include <QSettings>
@@ -49,6 +51,8 @@
 #include <QToolBar>
 #include <QVBoxLayout>
 
+
+
 #if QT_VERSION < 0x050000
 #include <QUrl>
 #include <QTextDocument>
@@ -156,10 +160,13 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
     frameBlocksLayout->setContentsMargins(3,0,3,0);
     frameBlocksLayout->setSpacing(3);
+    unitDisplayControl = new UnitDisplayStatusBarControl();
     labelEncryptionIcon = new QLabel();
     labelConnectionsIcon = new QLabel();
     labelBlocksIcon = new QLabel();
     frameBlocksLayout->addStretch();
+    frameBlocksLayout->addWidget(unitDisplayControl);
+    frameBlocksLayout->addStretch();
     frameBlocksLayout->addWidget(labelEncryptionIcon);
     frameBlocksLayout->addStretch();
     frameBlocksLayout->addWidget(labelConnectionsIcon);
@@ -420,6 +427,8 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
             walletFrame->setClientModel(clientModel);
         }
 #endif
+
+        this->unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
     }
 }
 
@@ -1000,3 +1009,72 @@ void BitcoinGUI::unsubscribeFromCoreSignals()
     // Disconnect signals from client
     uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
 }
+
+UnitDisplayStatusBarControl::UnitDisplayStatusBarControl():QLabel()
+{
+    optionsModel = 0;
+    createContextMenu();
+    setStyleSheet("font:11pt; color: #333333");
+    setToolTip(tr("Unit to show amounts in. Click to select another unit."));
+}
+
+/** So that it responds to left-button clicks */
+void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
+{
+    onDisplayUnitsClicked(event->pos());
+}
+
+/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
+void UnitDisplayStatusBarControl::createContextMenu()
+{
+    menu = new QMenu();
+    foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
+    {
+        QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
+        menuAction->setData(QVariant(u));
+        menu->addAction(menuAction);
+    }
+    connect(menu,SIGNAL(triggered(QAction*)),this,SLOT(onMenuSelection(QAction*)));
+
+    // what happens on right click.
+    setContextMenuPolicy(Qt::CustomContextMenu);
+    connect(this,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(onDisplayUnitsClicked(const QPoint&)));
+}
+
+/** Lets the control know about the Options Model (and its signals) */
+void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
+{
+    if (optionsModel)
+    {
+        this->optionsModel = optionsModel;
+
+        // be aware of a display unit change reported by the OptionsModel object.
+        connect(optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));
+
+        // initialize the display units label with the current value in the model.
+        updateDisplayUnit(optionsModel->getDisplayUnit());
+    }
+}
+
+/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
+void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
+{
+    setText(BitcoinUnits::name(newUnits));
+}
+
+/** Shows context menu with Display Unit options by the mouse coordinates */
+void UnitDisplayStatusBarControl::onDisplayUnitsClicked(const QPoint& point)
+{
+    QPoint globalPos = mapToGlobal(point);
+    menu->exec(globalPos);
+}
+
+/** Tells underlying optionsModel to update its current display unit. */
+void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
+{
+    if (action)
+    {
+        optionsModel->setDisplayUnit(action->data());
+    }
+}
+
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index e7a842df9976..705e629a6975 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -9,12 +9,16 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include <QLabel>
 #include <QMainWindow>
 #include <QMap>
+#include <QMenu>
+#include <QPoint>
 #include <QSystemTrayIcon>
 
 class ClientModel;
 class Notificator;
+class OptionsModel;
 class RPCConsole;
 class SendCoinsRecipient;
 class WalletFrame;
@@ -22,9 +26,13 @@ class WalletModel;
 
 class CWallet;
 
+class UnitDisplayStatusBarControl;
+
 QT_BEGIN_NAMESPACE
 class QAction;
 class QLabel;
+class QMenu;
+class QPoint;
 class QProgressBar;
 class QProgressDialog;
 QT_END_NAMESPACE
@@ -69,6 +77,7 @@ class BitcoinGUI : public QMainWindow
     ClientModel *clientModel;
     WalletFrame *walletFrame;
 
+    UnitDisplayStatusBarControl *unitDisplayControl;
     QLabel *labelEncryptionIcon;
     QLabel *labelConnectionsIcon;
     QLabel *labelBlocksIcon;
@@ -198,4 +207,32 @@ private slots:
     void showProgress(const QString &title, int nProgress);
 };
 
+class UnitDisplayStatusBarControl : public QLabel
+{
+    Q_OBJECT
+
+public:
+    explicit UnitDisplayStatusBarControl();
+    /** Lets the control know about the Options Model (and its signals) */
+    void setOptionsModel(OptionsModel *optionsModel);
+
+protected:
+    /** So that it responds to left-button clicks */
+    void mousePressEvent(QMouseEvent *event);
+
+private:
+    OptionsModel *optionsModel;
+    QMenu* menu;
+    /** Shows context menu with Display Unit options by the mouse coordinates */
+    void onDisplayUnitsClicked(const QPoint& point);
+    /** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
+    void createContextMenu();
+
+private slots:
+    /** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
+    void updateDisplayUnit(int newUnits);
+    /** Tells underlying optionsModel to update its current display unit. */
+    void onMenuSelection(QAction* action);
+};
+
 #endif // BITCOINGUI_H
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 2fed443cf2a6..4ba6aba55129 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -169,6 +169,16 @@ bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out)
     return ok;
 }
 
+QString BitcoinUnits::getAmountColumnTitle(int unit)
+{
+    QString amountTitle = QObject::tr("Amount");
+    if (BitcoinUnits::valid(unit))
+    {
+        amountTitle += " ("+BitcoinUnits::name(unit) + ")";
+    }
+    return amountTitle;
+}
+
 int BitcoinUnits::rowCount(const QModelIndex &parent) const
 {
     Q_UNUSED(parent);
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 46517fc07b7f..451b52ee21e0 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -54,6 +54,8 @@ class BitcoinUnits: public QAbstractListModel
     static QString formatWithUnit(int unit, qint64 amount, bool plussign=false);
     //! Parse string to coin amount
     static bool parse(int unit, const QString &value, qint64 *val_out);
+    //! Gets title for amount column including current display unit if optionsModel reference available */
+    static QString getAmountColumnTitle(int unit);
     ///@}
 
     //! @name AbstractListModel implementation
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 6d985abaf8ea..09553a258765 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -308,9 +308,7 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
             break;
 #endif
         case DisplayUnit:
-            nDisplayUnit = value.toInt();
-            settings.setValue("nDisplayUnit", nDisplayUnit);
-            emit displayUnitChanged(nDisplayUnit);
+            setDisplayUnit(value);
             break;
         case DisplayAddresses:
             bDisplayAddresses = value.toBool();
@@ -356,11 +354,24 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
             break;
         }
     }
+
     emit dataChanged(index, index);
 
     return successful;
 }
 
+/** Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal */
+void OptionsModel::setDisplayUnit(const QVariant &value)
+{
+    if (!value.isNull())
+    {
+        QSettings settings;
+        nDisplayUnit = value.toInt();
+        settings.setValue("nDisplayUnit", nDisplayUnit);
+        emit displayUnitChanged(nDisplayUnit);
+    }
+}
+
 bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const
 {
     // Directly query current base proxy, because
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 2596682d07a4..89c2ec745305 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -52,6 +52,8 @@ class OptionsModel : public QAbstractListModel
     int rowCount(const QModelIndex & parent = QModelIndex()) const;
     QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const;
     bool setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
+    /** Updates current unit in memory, settings and emits displayUnitChanged(newUnit) signal */
+    void setDisplayUnit(const QVariant &value);
 
     /* Explicit getters */
     bool getMinimizeToTray() { return fMinimizeToTray; }
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 844d62518cef..b5a998f9f539 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -21,7 +21,9 @@ RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel
         addNewRequest(request);
 
     /* These columns must match the indices in the ColumnIndex enumeration */
-    columns << tr("Date") << tr("Label") << tr("Message") << tr("Amount");
+    columns << tr("Date") << tr("Label") << tr("Message") << getAmountTitle();
+
+    connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 }
 
 RecentRequestsTableModel::~RecentRequestsTableModel()
@@ -101,6 +103,24 @@ QVariant RecentRequestsTableModel::headerData(int section, Qt::Orientation orien
     return QVariant();
 }
 
+/** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
+void RecentRequestsTableModel::updateAmountColumnTitle()
+{
+    columns[Amount] = getAmountTitle();
+    emit headerDataChanged(Qt::Horizontal,Amount,Amount);
+}
+
+/** Gets title for amount column including current display unit if optionsModel reference available. */
+QString RecentRequestsTableModel::getAmountTitle()
+{
+    QString amountTitle = tr("Amount");
+    if (this->walletModel->getOptionsModel() != NULL)
+    {
+        amountTitle += " ("+BitcoinUnits::name(this->walletModel->getOptionsModel()->getDisplayUnit()) + ")";
+    }
+    return amountTitle;
+}
+
 QModelIndex RecentRequestsTableModel::index(int row, int column, const QModelIndex &parent) const
 {
     Q_UNUSED(parent);
@@ -185,6 +205,11 @@ void RecentRequestsTableModel::sort(int column, Qt::SortOrder order)
     emit dataChanged(index(0, 0, QModelIndex()), index(list.size() - 1, NUMBER_OF_COLUMNS - 1, QModelIndex()));
 }
 
+void RecentRequestsTableModel::updateDisplayUnit()
+{
+    updateAmountColumnTitle();
+}
+
 bool RecentRequestEntryLessThan::operator()(RecentRequestEntry &left, RecentRequestEntry &right) const
 {
     RecentRequestEntry *pLeft = &left;
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index d4cc5078aac8..4f0b241259de 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -91,12 +91,18 @@ class RecentRequestsTableModel: public QAbstractTableModel
 
 public slots:
     void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
+    void updateDisplayUnit();
 
 private:
     WalletModel *walletModel;
     QStringList columns;
     QList<RecentRequestEntry> list;
     int64_t nReceiveRequestsMaxId;
+
+    /** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
+    void updateAmountColumnTitle();
+    /** Gets title for amount column including current display unit if optionsModel reference available. */
+    QString getAmountTitle();
 };
 
 #endif
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index b9fcd0d6b093..e34238d805c6 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -235,8 +235,7 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren
         walletModel(parent),
         priv(new TransactionTablePriv(wallet, this))
 {
-    columns << QString() << tr("Date") << tr("Type") << tr("Address") << tr("Amount");
-
+    columns << QString() << tr("Date") << tr("Type") << tr("Address") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
     priv->refreshWallet();
 
     connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
@@ -247,6 +246,13 @@ TransactionTableModel::~TransactionTableModel()
     delete priv;
 }
 
+/** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
+void TransactionTableModel::updateAmountColumnTitle()
+{
+    columns[Amount] = BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
+    emit headerDataChanged(Qt::Horizontal,Amount,Amount);
+}
+
 void TransactionTableModel::updateTransaction(const QString &hash, int status)
 {
     uint256 updated;
@@ -624,5 +630,6 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex
 void TransactionTableModel::updateDisplayUnit()
 {
     // emit dataChanged to update Amount column with the current unit
+    updateAmountColumnTitle();
     emit dataChanged(index(0, Amount), index(priv->size()-1, Amount));
 }
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 333e6bc6ed58..e8b6ed065d42 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -87,6 +87,8 @@ public slots:
     void updateTransaction(const QString &hash, int status);
     void updateConfirmations();
     void updateDisplayUnit();
+    /** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
+    void updateAmountColumnTitle();
 
     friend class TransactionTablePriv;
 };
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index d4d29416caff..d6d210a561f6 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -309,7 +309,7 @@ void TransactionView::exportClicked()
     writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
     writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
     writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole);
-    writer.addColumn(tr("Amount"), 0, TransactionTableModel::FormattedAmountRole);
+    writer.addColumn(BitcoinUnits::getAmountColumnTitle(model->getOptionsModel()->getDisplayUnit()), 0, TransactionTableModel::FormattedAmountRole);
     writer.addColumn(tr("ID"), 0, TransactionTableModel::TxIDRole);
 
     if(!writer.write()) {

From a90689ff9880cc76668d04beda5a5d97f2f4a76b Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 25 Jun 2014 14:21:29 -0400
Subject: [PATCH 0241/1819] Remove timing-based signature cache unit test

Two changes:

First removes a unit test that fails in my development environment
(OSX, compiled -g3 with clang).

sipa says that's not terribly surprising; the CMutableTransaction change
makes signing a little more expensive but verification quicker. The unit
test timed sign+verify-uncached versus verify-cached-five-times.

He also says the test will be invalid when libsec256kp1 is integrated
(because validation is super-optimized over signing).

core.h change fixes a compiler warning (clang -Wall : CMutableTransaction defined
as struct, declared as class in script.h).
---
 src/script.h           |  2 +-
 src/test/DoS_tests.cpp | 87 ------------------------------------------
 2 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/src/script.h b/src/script.h
index ea988f0e407c..7ab471f6e63b 100644
--- a/src/script.h
+++ b/src/script.h
@@ -20,7 +20,7 @@
 class CCoins;
 class CKeyStore;
 class CTransaction;
-class CMutableTransaction;
+struct CMutableTransaction;
 
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index d512053051a1..5e17555e7a8f 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -231,91 +231,4 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
     BOOST_CHECK(mapOrphanTransactionsByPrev.empty());
 }
 
-BOOST_AUTO_TEST_CASE(DoS_checkSig)
-{
-    // Test signature caching code (see key.cpp Verify() methods)
-
-    CKey key;
-    key.MakeNewKey(true);
-    CBasicKeyStore keystore;
-    keystore.AddKey(key);
-    unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
-
-    // 100 orphan transactions:
-    static const int NPREV=100;
-    CMutableTransaction orphans[NPREV];
-    for (int i = 0; i < NPREV; i++)
-    {
-        CMutableTransaction& tx = orphans[i];
-        tx.vin.resize(1);
-        tx.vin[0].prevout.n = 0;
-        tx.vin[0].prevout.hash = GetRandHash();
-        tx.vin[0].scriptSig << OP_1;
-        tx.vout.resize(1);
-        tx.vout[0].nValue = 1*CENT;
-        tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
-
-        AddOrphanTx(tx);
-    }
-
-    // Create a transaction that depends on orphans:
-    CMutableTransaction tx;
-    tx.vout.resize(1);
-    tx.vout[0].nValue = 1*CENT;
-    tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
-    tx.vin.resize(NPREV);
-    for (unsigned int j = 0; j < tx.vin.size(); j++)
-    {
-        tx.vin[j].prevout.n = 0;
-        tx.vin[j].prevout.hash = orphans[j].GetHash();
-    }
-    // Creating signatures primes the cache:
-    boost::posix_time::ptime mst1 = boost::posix_time::microsec_clock::local_time();
-    for (unsigned int j = 0; j < tx.vin.size(); j++)
-        BOOST_CHECK(SignSignature(keystore, orphans[j], tx, j));
-    boost::posix_time::ptime mst2 = boost::posix_time::microsec_clock::local_time();
-    boost::posix_time::time_duration msdiff = mst2 - mst1;
-    long nOneValidate = msdiff.total_milliseconds();
-    if (fDebug) printf("DoS_Checksig sign: %ld\n", nOneValidate);
-
-    // ... now validating repeatedly should be quick:
-    // 2.8GHz machine, -g build: Sign takes ~760ms,
-    // uncached Verify takes ~250ms, cached Verify takes ~50ms
-    // (for 100 single-signature inputs)
-    mst1 = boost::posix_time::microsec_clock::local_time();
-    for (unsigned int i = 0; i < 5; i++)
-        for (unsigned int j = 0; j < tx.vin.size(); j++)
-            BOOST_CHECK(VerifySignature(CCoins(orphans[j], MEMPOOL_HEIGHT), tx, j, flags, SIGHASH_ALL));
-    mst2 = boost::posix_time::microsec_clock::local_time();
-    msdiff = mst2 - mst1;
-    long nManyValidate = msdiff.total_milliseconds();
-    if (fDebug) printf("DoS_Checksig five: %ld\n", nManyValidate);
-
-    BOOST_CHECK_MESSAGE(nManyValidate < nOneValidate, "Signature cache timing failed");
-
-    // Empty a signature, validation should fail:
-    CScript save = tx.vin[0].scriptSig;
-    tx.vin[0].scriptSig = CScript();
-    BOOST_CHECK(!VerifySignature(CCoins(orphans[0], MEMPOOL_HEIGHT), tx, 0, flags, SIGHASH_ALL));
-    tx.vin[0].scriptSig = save;
-
-    // Swap signatures, validation should fail:
-    std::swap(tx.vin[0].scriptSig, tx.vin[1].scriptSig);
-    BOOST_CHECK(!VerifySignature(CCoins(orphans[0], MEMPOOL_HEIGHT), tx, 0, flags, SIGHASH_ALL));
-    BOOST_CHECK(!VerifySignature(CCoins(orphans[1], MEMPOOL_HEIGHT), tx, 1, flags, SIGHASH_ALL));
-    std::swap(tx.vin[0].scriptSig, tx.vin[1].scriptSig);
-
-    // Exercise -maxsigcachesize code:
-    mapArgs["-maxsigcachesize"] = "10";
-    // Generate a new, different signature for vin[0] to trigger cache clear:
-    CScript oldSig = tx.vin[0].scriptSig;
-    BOOST_CHECK(SignSignature(keystore, orphans[0], tx, 0));
-    BOOST_CHECK(tx.vin[0].scriptSig != oldSig);
-    for (unsigned int j = 0; j < tx.vin.size(); j++)
-        BOOST_CHECK(VerifySignature(CCoins(orphans[j], MEMPOOL_HEIGHT), tx, j, flags, SIGHASH_ALL));
-    mapArgs.erase("-maxsigcachesize");
-
-    LimitOrphanTxSize(0);
-}
-
 BOOST_AUTO_TEST_SUITE_END()

From e10dcf27b4fb324a85b5650c7acd2ea5a52e822f Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 14:17:43 +0200
Subject: [PATCH 0242/1819] ensure clean and consistent "namespace" usage

- remove some missplaced ;
- ensure end of a namespace is clearly visible
- use same formatting when using namespace
---
 src/base58.cpp      |  4 +++-
 src/checkpoints.cpp |  7 ++++---
 src/checkpoints.h   |  7 ++++---
 src/init.h          |  2 +-
 src/key.cpp         |  3 +--
 src/main.cpp        | 11 +++++++----
 src/net.h           |  3 +--
 src/script.cpp      |  5 +++--
 src/util.cpp        |  3 ++-
 9 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index 1bd64684e58c..c9e91beef1d5 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -186,6 +186,7 @@ int CBase58Data::CompareTo(const CBase58Data& b58) const {
 }
 
 namespace {
+
     class CBitcoinAddressVisitor : public boost::static_visitor<bool> {
     private:
         CBitcoinAddress *addr;
@@ -196,7 +197,8 @@ namespace {
         bool operator()(const CScriptID &id) const { return addr->Set(id); }
         bool operator()(const CNoDestination &no) const { return false; }
     };
-};
+
+} // anon namespace
 
 bool CBitcoinAddress::Set(const CKeyID &id) {
     SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 75ac418916a4..80479b47fbcc 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -12,8 +12,8 @@
 #include <boost/assign/list_of.hpp> // for 'map_list_of()'
 #include <boost/foreach.hpp>
 
-namespace Checkpoints
-{
+namespace Checkpoints {
+
     typedef std::map<int, uint256> MapCheckpoints;
 
     // How many times we expect transactions after the last checkpoint to
@@ -161,4 +161,5 @@ namespace Checkpoints
         }
         return NULL;
     }
-}
+
+} // namespace Checkpoints
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 1b4aacee20ad..2cf8d41b9d6e 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -13,8 +13,8 @@ class uint256;
 /** Block-chain checkpoints are compiled-in sanity checks.
  * They are updated every release or three.
  */
-namespace Checkpoints
-{
+namespace Checkpoints {
+
     // Returns true if block passes checkpoint checks
     bool CheckBlock(int nHeight, const uint256& hash);
 
@@ -27,6 +27,7 @@ namespace Checkpoints
     double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks = true);
 
     extern bool fEnabled;
-}
+
+} //namespace Checkpoints
 
 #endif
diff --git a/src/init.h b/src/init.h
index 52daa4761600..626525c9adb5 100644
--- a/src/init.h
+++ b/src/init.h
@@ -12,7 +12,7 @@ class CWallet;
 
 namespace boost {
     class thread_group;
-};
+} // namespace boost
 
 extern CWallet* pwalletMain;
 
diff --git a/src/key.cpp b/src/key.cpp
index 96b1ac439c3d..784085da3441 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -377,8 +377,7 @@ const unsigned char vchMaxModHalfOrder[32] = {
 
 const unsigned char vchZero[0] = {};
 
-
-}; // end of anonymous namespace
+} // anon namespace
 
 bool CKey::Check(const unsigned char *vch) {
     return CompareBigEndian(vch, 32, vchZero, 0) > 0 &&
diff --git a/src/main.cpp b/src/main.cpp
index ea47601081bd..98322599641e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,6 +72,7 @@ const string strMessageMagic = "Bitcoin Signed Message:\n";
 
 // Internal stuff
 namespace {
+
     struct CBlockIndexWorkComparator
     {
         bool operator()(CBlockIndex *pa, CBlockIndex *pb) {
@@ -120,7 +121,8 @@ namespace {
     };
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
     map<uint256, pair<NodeId, list<uint256>::iterator> > mapBlocksToDownload;
-}
+
+} // anon namespace
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -130,6 +132,7 @@ namespace {
 // These functions dispatch to one or all registered wallets
 
 namespace {
+
 struct CMainSignals {
     // Notifies listeners of updated transaction data (transaction, and optionally the block it is found in.
     boost::signals2::signal<void (const CTransaction &, const CBlock *)> SyncTransaction;
@@ -144,7 +147,8 @@ struct CMainSignals {
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
 } g_signals;
-}
+
+} // anon namespace
 
 void RegisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
@@ -274,7 +278,6 @@ void MarkBlockAsReceived(const uint256 &hash, NodeId nodeFrom = -1) {
             state->nLastBlockReceive = GetTimeMicros();
         mapBlocksInFlight.erase(itInFlight);
     }
-
 }
 
 // Requires cs_main.
@@ -310,7 +313,7 @@ void MarkBlockAsInFlight(NodeId nodeid, const uint256 &hash) {
     mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
 }
 
-}
+} // anon namespace
 
 bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
     LOCK(cs_main);
diff --git a/src/net.h b/src/net.h
index 41dc618571de..2ee798d46807 100644
--- a/src/net.h
+++ b/src/net.h
@@ -28,14 +28,13 @@
 #include <boost/signals2/signal.hpp>
 #include <openssl/rand.h>
 
-
 class CAddrMan;
 class CBlockIndex;
 class CNode;
 
 namespace boost {
     class thread_group;
-}
+} // namespace boost
 
 /** Time between pings automatically sent out for latency probing and keepalive (in seconds). */
 static const int PING_INTERVAL = 2 * 60;
diff --git a/src/script.cpp b/src/script.cpp
index c83d26885a6a..dfba4da46e29 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -974,6 +974,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
 
 
 namespace {
+
 /** Wrapper that serializes like CTransaction, but with the modifications
  *  required for the signature hash done in-place
  */
@@ -1066,7 +1067,8 @@ class CTransactionSignatureSerializer {
         ::Serialize(s, txTo.nLockTime, nType, nVersion);
     }
 };
-}
+
+} // anon namespace
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
 {
@@ -1092,7 +1094,6 @@ uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsig
     return ss.GetHash();
 }
 
-
 // Valid signature cache, to avoid doing expensive ECDSA signature checking
 // twice for every transaction (once when accepted into memory pool, and
 // again when accepted into the block chain)
diff --git a/src/util.cpp b/src/util.cpp
index 7a0e2cc8002b..7efcc577cf59 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -77,11 +77,12 @@
 // See also: http://stackoverflow.com/questions/10020179/compilation-fail-in-boost-librairies-program-options
 //           http://clang.debian.net/status.php?version=3.0&key=CANNOT_FIND_FUNCTION
 namespace boost {
+
     namespace program_options {
         std::string to_internal(const std::string&);
     }
-}
 
+} // namespace boost
 
 using namespace std;
 

From 9e9ca2b6710a0a0e600b9412b54d22b6b1f706b2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 09:03:18 +0200
Subject: [PATCH 0243/1819] small cleanup of #ifdefs in BindListenPort()

- SO_NOSIGPIPE isn't available on WIN32 so merge the 2 non-WIN32 blocks
- use predefined names from header for IPV6_PROTECTION_LEVEL and
  PROTECTION_LEVEL_UNRESTRICTED
---
 src/net.cpp | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 811df4333488..8f47489c8b24 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -36,6 +36,17 @@
 #define MSG_NOSIGNAL 0
 #endif
 
+// Fix for ancient MinGW versions, that don't have defined these in ws2tcpip.h.
+// Todo: Can be removed when our pull-tester is upgraded to a modern MinGW version.
+#ifdef WIN32
+#ifndef PROTECTION_LEVEL_UNRESTRICTED
+#define PROTECTION_LEVEL_UNRESTRICTED 10
+#endif
+#ifndef IPV6_PROTECTION_LEVEL
+#define IPV6_PROTECTION_LEVEL 23
+#endif
+#endif
+
 using namespace std;
 using namespace boost;
 
@@ -1587,18 +1598,16 @@ bool BindListenPort(const CService &addrBind, string& strError)
         return false;
     }
 
+#ifndef WIN32
 #ifdef SO_NOSIGPIPE
     // Different way of disabling SIGPIPE on BSD
     setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int));
 #endif
-
-#ifndef WIN32
     // Allow binding if the port is still in TIME_WAIT state after
-    // the program was closed and restarted.  Not an issue on windows.
+    // the program was closed and restarted. Not an issue on windows!
     setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
 #endif
 
-
 #ifdef WIN32
     // Set to non-blocking, incoming connections will also inherit this
     if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR)
@@ -1622,10 +1631,8 @@ bool BindListenPort(const CService &addrBind, string& strError)
 #endif
 #endif
 #ifdef WIN32
-        int nProtLevel = 10 /* PROTECTION_LEVEL_UNRESTRICTED */;
-        int nParameterId = 23 /* IPV6_PROTECTION_LEVEl */;
-        // this call is allowed to fail
-        setsockopt(hListenSocket, IPPROTO_IPV6, nParameterId, (const char*)&nProtLevel, sizeof(int));
+        int nProtLevel = PROTECTION_LEVEL_UNRESTRICTED;
+        setsockopt(hListenSocket, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, (const char*)&nProtLevel, sizeof(int));
 #endif
     }
 

From 5d59921237ecb5a301ac37e0b97eb9c371a43d11 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 09:09:45 +0200
Subject: [PATCH 0244/1819] add missing BOOST_FOREACH indentation in
 ThreadSocketHandler()

---
 src/net.cpp | 81 +++++++++++++++++++++++++++--------------------------
 1 file changed, 41 insertions(+), 40 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 8f47489c8b24..934c45ca4cc3 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -827,7 +827,6 @@ void ThreadSocketHandler()
             uiInterface.NotifyNumConnectionsChanged(nPrevNodeCount);
         }
 
-
         //
         // Find which sockets have data to receive
         //
@@ -849,6 +848,7 @@ void ThreadSocketHandler()
             hSocketMax = max(hSocketMax, hListenSocket);
             have_fds = true;
         }
+
         {
             LOCK(cs_vNodes);
             BOOST_FOREACH(CNode* pnode, vNodes)
@@ -909,58 +909,59 @@ void ThreadSocketHandler()
             MilliSleep(timeout.tv_usec/1000);
         }
 
-
         //
         // Accept new connections
         //
         BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket)
-        if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv))
         {
-            struct sockaddr_storage sockaddr;
-            socklen_t len = sizeof(sockaddr);
-            SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len);
-            CAddress addr;
-            int nInbound = 0;
-
-            if (hSocket != INVALID_SOCKET)
-                if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))
-                    LogPrintf("Warning: Unknown socket family\n");
-
+            if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv))
             {
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes)
-                    if (pnode->fInbound)
-                        nInbound++;
-            }
+                struct sockaddr_storage sockaddr;
+                socklen_t len = sizeof(sockaddr);
+                SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len);
+                CAddress addr;
+                int nInbound = 0;
+
+                if (hSocket != INVALID_SOCKET)
+                    if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))
+                        LogPrintf("Warning: Unknown socket family\n");
 
-            if (hSocket == INVALID_SOCKET)
-            {
-                int nErr = WSAGetLastError();
-                if (nErr != WSAEWOULDBLOCK)
-                    LogPrintf("socket error accept failed: %s\n", NetworkErrorString(nErr));
-            }
-            else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS)
-            {
-                closesocket(hSocket);
-            }
-            else if (CNode::IsBanned(addr))
-            {
-                LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
-                closesocket(hSocket);
-            }
-            else
-            {
-                LogPrint("net", "accepted connection %s\n", addr.ToString());
-                CNode* pnode = new CNode(hSocket, addr, "", true);
-                pnode->AddRef();
                 {
                     LOCK(cs_vNodes);
-                    vNodes.push_back(pnode);
+                    BOOST_FOREACH(CNode* pnode, vNodes)
+                        if (pnode->fInbound)
+                            nInbound++;
+                }
+
+                if (hSocket == INVALID_SOCKET)
+                {
+                    int nErr = WSAGetLastError();
+                    if (nErr != WSAEWOULDBLOCK)
+                        LogPrintf("socket error accept failed: %s\n", NetworkErrorString(nErr));
+                }
+                else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS)
+                {
+                    closesocket(hSocket);
+                }
+                else if (CNode::IsBanned(addr))
+                {
+                    LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
+                    closesocket(hSocket);
+                }
+                else
+                {
+                    LogPrint("net", "accepted connection %s\n", addr.ToString());
+                    CNode* pnode = new CNode(hSocket, addr, "", true);
+                    pnode->AddRef();
+
+                    {
+                        LOCK(cs_vNodes);
+                        vNodes.push_back(pnode);
+                    }
                 }
             }
         }
 
-
         //
         // Service each socket
         //

From cf04d83624e2ca66d094b6026e48bdf86693d7de Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 14:41:26 +0200
Subject: [PATCH 0245/1819] add OpenSSL RAND_cleanup() on OpenSSL shutdown

- to securely erase the memory used by the PNRG
- also rework 2 comments in OpenSSL init
---
 src/util.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 7a0e2cc8002b..5c1ed23b73a5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -121,15 +121,17 @@ class CInit
         CRYPTO_set_locking_callback(locking_callback);
 
 #ifdef WIN32
-        // Seed random number generator with screen scrape and other hardware sources
+        // Seed OpenSSL PRNG with current contents of the screen
         RAND_screen();
 #endif
 
-        // Seed random number generator with performance counter
+        // Seed OpenSSL PRNG with performance counter
         RandAddSeed();
     }
     ~CInit()
     {
+        // Securely erase the memory used by the PRNG
+        RAND_cleanup();
         // Shutdown OpenSSL library multithreading support
         CRYPTO_set_locking_callback(NULL);
         for (int i = 0; i < CRYPTO_num_locks(); i++)

From 86fe1b864b109869659f140af07047163637a673 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 26 Jun 2014 11:49:51 +0200
Subject: [PATCH 0246/1819] update coding.md to reflect changes by pull

- also mention alphabetical include ordering
---
 doc/coding.md | 75 ++++++++++++++++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 27 deletions(-)

diff --git a/doc/coding.md b/doc/coding.md
index 69388c9ce254..2f332e92f0e9 100644
--- a/doc/coding.md
+++ b/doc/coding.md
@@ -4,44 +4,65 @@ Coding
 Please be consistent with the existing coding style.
 
 Block style:
-
-	bool Function(char* psz, int n)
-	{
-	    // Comment summarising what this section of code does
-	    for (int i = 0; i < n; i++)
-	    {
-	        // When something fails, return early
-	        if (!Something())
-	            return false;
-	        ...
-	    }
-	
-	    // Success return is usually at the end
-	    return true;
-	}
-
+```c++
+    bool Function(char* psz, int n)
+    {
+        // Comment summarising what this section of code does
+        for (int i = 0; i < n; i++)
+        {
+            // When something fails, return early
+            if (!Something())
+                return false;
+            ...
+        }
+
+        // Success return is usually at the end
+        return true;
+    }
+```
 - ANSI/Allman block style
 - 4 space indenting, no tabs
 - No extra spaces inside parenthesis; please don't do ( this )
 - No space after function names, one space after if, for and while
+- Includes need to be ordered alphabetically, separate own and foreign headers with a new-line (example key.cpp):
+```c++
+#include "key.h"
+
+#include "crypto/sha2.h"
+#include "util.h"
 
+#include <openssl/foo.h>
+```
+- Class or struct keywords in header files need to be ordered alphabetically:
+```c++
+class CAlpha;
+class CBeta;
+```
+- When using namespace keyword use the following form:
+```c++
+namespace Foo {
+
+...
+
+} // Foo
+```
 Variable names begin with the type in lowercase, like nSomeVariable.
 Please don't put the first word of the variable name in lowercase like
 someVariable.
 
 Common types:
 
-	n       integer number: short, unsigned short, int, unsigned int, int64, uint64, sometimes char if used as a number
-	d       double, float
-	f       flag
-	hash    uint256
-	p       pointer or array, one p for each level of indirection
-	psz     pointer to null terminated string
-	str     string object
-	v       vector or similar list objects
-	map     map or multimap
-	set     set or multiset
-	bn      CBigNum
+    n       integer number: short, unsigned short, int, unsigned int, int64, uint64, sometimes char if used as a number
+    d       double, float
+    f       flag
+    hash    uint256
+    p       pointer or array, one p for each level of indirection
+    psz     pointer to null terminated string
+    str     string object
+    v       vector or similar list objects
+    map     map or multimap
+    set     set or multiset
+    bn      CBigNum
 
 Doxygen comments
 -----------------

From 2a72d4591f5adf25fcb4d0433b390ba6c37f57a9 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Wed, 11 Jul 2012 18:52:41 +0000
Subject: [PATCH 0247/1819] JSON-RPC method: prioritisetransaction <txid>
 <priority delta> <priority tx fee>

Accepts the transaction into mined blocks at a higher (or lower) priority
---
 src/main.cpp      | 10 ++++++++++
 src/miner.cpp     | 14 +++++++++++---
 src/rpcclient.cpp |  2 ++
 src/rpcmining.cpp | 14 ++++++++++++++
 src/rpcserver.cpp |  1 +
 src/rpcserver.h   |  1 +
 src/txmempool.cpp | 29 +++++++++++++++++++++++++++++
 src/txmempool.h   |  6 ++++++
 8 files changed, 74 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ea47601081bd..e06c519ee28c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -789,6 +789,16 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
 
 int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
 {
+    {
+        LOCK(mempool.cs);
+        uint256 hash = tx.GetHash();
+        double dPriorityDelta = 0;
+        int64_t nFeeDelta = 0;
+        mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
+        if (dPriorityDelta > 0 || nFeeDelta > 0)
+            return 0;
+    }
+
     // Base fee is either minTxFee or minRelayTxFee
     CFeeRate baseFeeRate = (mode == GMF_RELAY) ? tx.minRelayTxFee : tx.minTxFee;
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 19b4694357db..69e53756e087 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -3,6 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include <inttypes.h>
+
 #include "miner.h"
 
 #include "core.h"
@@ -186,6 +188,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             unsigned int nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
             dPriority = tx.ComputePriority(dPriority, nTxSize);
 
+            uint256 hash = tx.GetHash();
+            mempool.ApplyDeltas(hash, dPriority, nTotalIn);
+
             CFeeRate feeRate(nTotalIn-tx.GetValueOut(), nTxSize);
 
             if (porphan)
@@ -227,10 +232,14 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 continue;
 
             // Skip free transactions if we're past the minimum block size:
-            if (fSortedByFee && (feeRate < CTransaction::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
+            const uint256& hash = tx.GetHash();
+            double dPriorityDelta = 0;
+            int64_t nFeeDelta = 0;
+            mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
+            if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < CTransaction::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
                 continue;
 
-            // Prioritize by fee once past the priority size or we run out of high-priority
+            // Prioritise by fee once past the priority size or we run out of high-priority
             // transactions:
             if (!fSortedByFee &&
                 ((nBlockSize + nTxSize >= nBlockPrioritySize) || !AllowFree(dPriority)))
@@ -257,7 +266,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 continue;
 
             CTxUndo txundo;
-            const uint256& hash = tx.GetHash();
             UpdateCoins(tx, state, view, txundo, pindexPrev->nHeight+1);
 
             // Added
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 3a06e330162e..30881b9b1a57 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -72,6 +72,8 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
     if (strMethod == "listtransactions"       && n > 2) ConvertTo<int64_t>(params[2]);
     if (strMethod == "listaccounts"           && n > 0) ConvertTo<int64_t>(params[0]);
     if (strMethod == "walletpassphrase"       && n > 1) ConvertTo<int64_t>(params[1]);
+    if (strMethod == "prioritisetransaction"  && n > 1) ConvertTo<double>(params[1]);
+    if (strMethod == "prioritisetransaction"  && n > 2) ConvertTo<int64_t>(params[2]);
     if (strMethod == "getblocktemplate"       && n > 0) ConvertTo<Object>(params[0]);
     if (strMethod == "listsinceblock"         && n > 1) ConvertTo<int64_t>(params[1]);
     if (strMethod == "sendmany"               && n > 1) ConvertTo<Object>(params[1]);
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 0072557f876a..98caf704eecc 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -247,6 +247,20 @@ Value getmininginfo(const Array& params, bool fHelp)
 }
 
 
+Value prioritisetransaction(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 3)
+        throw runtime_error(
+            "prioritisetransaction <txid> <priority delta> <fee delta>\n"
+            "Accepts the transaction into mined blocks at a higher (or lower) priority");
+
+    uint256 hash;
+    hash.SetHex(params[0].get_str());
+    mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), params[2].get_int64());
+    return true;
+}
+
+
 Value getblocktemplate(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() > 1)
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c5d09cf577ec..6552de8c49cc 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -254,6 +254,7 @@ static const CRPCCommand vRPCCommands[] =
     { "getblocktemplate",       &getblocktemplate,       true,      false,      false },
     { "getmininginfo",          &getmininginfo,          true,      false,      false },
     { "getnetworkhashps",       &getnetworkhashps,       true,      false,      false },
+    { "prioritisetransaction",  &prioritisetransaction,  true,      false,      false },
     { "submitblock",            &submitblock,            false,     true,       false },
 
     /* Raw transactions */
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 527154238505..1966a65b50b5 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -130,6 +130,7 @@ extern json_spirit::Value setgenerate(const json_spirit::Array& params, bool fHe
 extern json_spirit::Value getnetworkhashps(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value gethashespersec(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getmininginfo(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value prioritisetransaction(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblocktemplate(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value submitblock(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value estimatefee(const json_spirit::Array& params, bool fHelp);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 4bf01d4848b1..52f82ef040cc 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -447,6 +447,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i
         std::list<CTransaction> dummy;
         remove(tx, dummy, false);
         removeConflicts(tx, conflicts);
+        ClearPrioritisation(tx.GetHash());
     }
 }
 
@@ -564,6 +565,34 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
     return true;
 }
 
+void CTxMemPool::PrioritiseTransaction(const uint256 hash, const string strHash, double dPriorityDelta, int64_t nFeeDelta)
+{
+    {
+        LOCK(cs);
+        std::pair<double, int64_t> &deltas = mapDeltas[hash];
+        deltas.first += dPriorityDelta;
+        deltas.second += nFeeDelta;
+    }
+    LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash.c_str(), dPriorityDelta, nFeeDelta);
+}
+
+void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta)
+{
+    LOCK(cs);
+    std::map<uint256, std::pair<double, int64_t> >::iterator pos = mapDeltas.find(hash);
+    if (pos == mapDeltas.end())
+        return;
+    const std::pair<double, int64_t> &deltas = pos->second;
+    dPriorityDelta += deltas.first;
+    nFeeDelta += deltas.second;
+}
+
+void CTxMemPool::ClearPrioritisation(const uint256 hash)
+{
+    LOCK(cs);
+    mapDeltas.erase(hash);
+}
+
 
 CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
 
diff --git a/src/txmempool.h b/src/txmempool.h
index b2915aa842bd..f7dbb126a0ee 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -71,6 +71,7 @@ class CTxMemPool
     mutable CCriticalSection cs;
     std::map<uint256, CTxMemPoolEntry> mapTx;
     std::map<COutPoint, CInPoint> mapNextTx;
+    std::map<uint256, std::pair<double, int64_t> > mapDeltas;
 
     CTxMemPool();
     ~CTxMemPool();
@@ -95,6 +96,11 @@ class CTxMemPool
     unsigned int GetTransactionsUpdated() const;
     void AddTransactionsUpdated(unsigned int n);
 
+    /** Affect CreateNewBlock prioritisation of transactions */
+    void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, int64_t nFeeDelta);
+    void ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta);
+    void ClearPrioritisation(const uint256 hash);
+
     unsigned long size()
     {
         LOCK(cs);

From 8ae973c00cfb02161bb2c2a6c839e510cd409278 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 24 Jun 2014 15:27:37 +0200
Subject: [PATCH 0248/1819] Allocate more space if necessary in
 RandSeedAddPerfMon

Currently we use a fixed buffer of 250000 bytes to request
HKEY_PERFORMANCE_DATA. In many cases this is not enough, causing the
entropy collection to be skipped.

Use a loop that grows the buffer as specified in the RegQueryValueEx
documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724911%28v=vs.85%29.aspx

(as the size of the performance data can differ for every call, the
normal solution of requesting the size then allocating that can't work)
---
 src/util.cpp | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 794608957181..a96963689a93 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -169,8 +169,17 @@ void RandAddSeedPerfmon()
     // Don't need this on Linux, OpenSSL automatically uses /dev/urandom
     // Seed with the entire set of perfmon data
     std::vector <unsigned char> vData(250000,0);
-    unsigned long nSize = vData.size();
-    long ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
+    long ret = 0;
+    unsigned long nSize = 0;
+    const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
+    while (true)
+    {
+        nSize = vData.size();
+        ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
+        if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
+            break;
+        vData.resize(std::max((vData.size()*3)/2, nMaxSize)); // Grow size of buffer exponentially
+    }
     RegCloseKey(HKEY_PERFORMANCE_DATA);
     if (ret == ERROR_SUCCESS)
     {

From e44fea55ea73f46bc9460597c7001e77acb58db7 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 21 Feb 2014 04:06:12 +0000
Subject: [PATCH 0249/1819] Add an option to allow users to disable
 relaying/mining data carrier transactions

---
 src/init.cpp   | 2 ++
 src/script.cpp | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index a03629d07a38..c7170b0f2dbe 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -309,6 +309,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -shrinkdebugfile       " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n";
     strUsage += "  -testnet               " + _("Use the test network") + "\n";
 
+    strUsage += "\n" + _("Node relay options:") + "\n";
+    strUsage += "  -datacarrier           " + _("Relay and mine data carrier transactions (default: 1)") + "\n";
     strUsage += "\n" + _("Block creation options:") + "\n";
     strUsage += "  -blockminsize=<n>      " + _("Set minimum block size in bytes (default: 0)") + "\n";
     strUsage += "  -blockmaxsize=<n>      " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";
diff --git a/src/script.cpp b/src/script.cpp
index c83d26885a6a..bc4705abe7c0 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1208,7 +1208,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
         mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG));
 
         // Empty, provably prunable, data-carrying output
-        mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
+        if (GetBoolArg("-datacarrier", true))
+            mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
         mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
     }
 

From e5f0247bb6f696a5abfb22cf7739574086b3b3f5 Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Thu, 26 Jun 2014 15:51:07 +0100
Subject: [PATCH 0250/1819] Simplify build instructions

---
 doc/build-unix.md | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index 1d75c206e534..9d4b662d0752 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -61,10 +61,8 @@ Dependency Build Instructions: Ubuntu & Debian
 ----------------------------------------------
 Build requirements:
 
-	sudo apt-get install build-essential
-	sudo apt-get install libtool autotools-dev autoconf
-	sudo apt-get install libssl-dev
-
+	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
+	
 for Ubuntu 12.04 and later:
 
 	sudo apt-get install libboost-all-dev
@@ -95,8 +93,7 @@ To enable the change run
 
 for other Ubuntu & Debian:
 
-	sudo apt-get install libdb4.8-dev
-	sudo apt-get install libdb4.8++-dev
+	sudo apt-get install libdb4.8-dev libdb4.8++-dev
 
 Optional:
 

From caf6150e9785da408f1e603ae70eae25b5202d98 Mon Sep 17 00:00:00 2001
From: Huang Le <4tarhl@gmail.com>
Date: Fri, 27 Jun 2014 02:55:39 +0800
Subject: [PATCH 0251/1819] Use async name resolving to improve net thread
 responsiveness

In the LookupIntern(), things changed are:

  1. Call getaddrinfo_a() instead of getaddrinfo() if available, the former is a sync version of the latter;
  2. Try using inet_pton()/inet_addr() to convert the input text to a network addr structure at first, if success the extra name resolving thread inside getaddrinfo_a() could be avoided;
  3.  An interruption point added in the waiting loop for return from getaddrinfo_a(), which completes the improve for thread responsiveness.

A easy way to see the effect is to kick off a 'bitcoind stop' immediately after 'bitcoind -daemon', before the change it would take several, or even tens of, minutes on a bad network situation to wait for the running bitcoind to exit, now it costs only seconds.

Signed-off-by: Huang Le <4tarhl@gmail.com>
---
 configure.ac    |  2 ++
 src/netbase.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 811ef1dd806e..3abf94f1365b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -369,6 +369,8 @@ if test x$TARGET_OS = xdarwin; then
 fi
 
 AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h])
+AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
+AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
 
 AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, htobe64],,,
 		[#if HAVE_ENDIAN_H
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 3c50174e7597..f47b0f356382 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -3,6 +3,18 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#ifdef HAVE_CONFIG_H
+#include "bitcoin-config.h"
+#endif
+
+#ifdef HAVE_INET_PTON
+#include <arpa/inet.h>
+#endif
+
+#ifdef HAVE_GETADDRINFO_A
+#include <netdb.h>
+#endif
+
 #include "netbase.h"
 
 #include "hash.h"
@@ -71,9 +83,30 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
         }
     }
 
+#ifdef HAVE_GETADDRINFO_A
+    struct in_addr ipv4_addr;
+#ifdef HAVE_INET_PTON
+    if (inet_pton(AF_INET, pszName, &ipv4_addr) > 0) {
+        vIP.push_back(CNetAddr(ipv4_addr));
+        return true;
+    }
+
+    struct in6_addr ipv6_addr;
+    if (inet_pton(AF_INET6, pszName, &ipv6_addr) > 0) {
+        vIP.push_back(CNetAddr(ipv6_addr));
+        return true;
+    }
+#else
+    ipv4_addr.s_addr = inet_addr(pszName);
+    if (ipv4_addr.s_addr != INADDR_NONE) {
+        vIP.push_back(CNetAddr(ipv4_addr));
+        return true;
+    }
+#endif
+#endif
+
     struct addrinfo aiHint;
     memset(&aiHint, 0, sizeof(struct addrinfo));
-
     aiHint.ai_socktype = SOCK_STREAM;
     aiHint.ai_protocol = IPPROTO_TCP;
     aiHint.ai_family = AF_UNSPEC;
@@ -82,8 +115,33 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
 #else
     aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
 #endif
+
     struct addrinfo *aiRes = NULL;
+#ifdef HAVE_GETADDRINFO_A
+    struct gaicb gcb, *query = &gcb;
+    memset(query, 0, sizeof(struct gaicb));
+    gcb.ar_name = pszName;
+    gcb.ar_request = &aiHint;
+    int nErr = getaddrinfo_a(GAI_NOWAIT, &query, 1, NULL);
+    if (nErr)
+        return false;
+
+    do {
+        // Should set the timeout limit to a resonable value to avoid
+        // generating unnecessary checking call during the polling loop,
+        // while it can still response to stop request quick enough.
+        // 2 seconds looks fine in our situation.
+        struct timespec ts = { 2, 0 };
+        gai_suspend(&query, 1, &ts);
+        boost::this_thread::interruption_point();
+
+        nErr = gai_error(query);
+        if (0 == nErr)
+            aiRes = query->ar_result;
+    } while (nErr == EAI_INPROGRESS);
+#else
     int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes);
+#endif
     if (nErr)
         return false;
 

From c598f2acdb281823f39c17f3dbfb079e17cb14a1 Mon Sep 17 00:00:00 2001
From: Whit J <whitj00@users.noreply.github.com>
Date: Thu, 26 Jun 2014 18:31:40 -0700
Subject: [PATCH 0252/1819] Fixed captitalization in bitcoin-cli-res.rc

---
 src/bitcoin-cli-res.rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bitcoin-cli-res.rc b/src/bitcoin-cli-res.rc
index f8bfb3a88138..a4a0c47ea52d 100644
--- a/src/bitcoin-cli-res.rc
+++ b/src/bitcoin-cli-res.rc
@@ -5,7 +5,7 @@
 #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
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core developers"
+#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
 
 VS_VERSION_INFO VERSIONINFO
 FILEVERSION     VER_FILEVERSION

From e35b37b1b8252c3d3f66001ba1efccd263307add Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Thu, 26 Jun 2014 22:12:36 -0400
Subject: [PATCH 0253/1819] RPC client: Simplify command line
 string-to-JSON-value conversion code

By default, all command line parameters are converted into JSON string
values.  There is no need to manually specify the incoming type.

A binary decision "parse as string or JSON?" is all that's necessary.

Convert to a simple class, initialized at runtime startup, which offers
a quick lookup to answer "parse as JSON?" conversion question.

Future parameter conversions need only to indicate the method name
and zero-based index of the parameter needing JSON parsing.
---
 src/rpcclient.cpp | 183 ++++++++++++++++++++++++++--------------------
 1 file changed, 104 insertions(+), 79 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 30881b9b1a57..501940a73026 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -3,6 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include <set>
 #include "rpcclient.h"
 
 #include "rpcprotocol.h"
@@ -15,94 +16,118 @@
 using namespace std;
 using namespace json_spirit;
 
-template<typename T>
-void ConvertTo(Value& value, bool fAllowNull=false)
+class CRPCConvertParam
 {
-    if (fAllowNull && value.type() == null_type)
-        return;
-    if (value.type() == str_type)
-    {
-        // reinterpret string as unquoted json value
-        Value value2;
-        string strJSON = value.get_str();
-        if (!read_string(strJSON, value2))
-            throw runtime_error(string("Error parsing JSON:")+strJSON);
-        ConvertTo<T>(value2, fAllowNull);
-        value = value2;
+public:
+    std::string methodName;            // method whose params want conversion
+    int paramIdx;                      // 0-based idx of param to convert
+};
+
+static const CRPCConvertParam vRPCConvertParams[] =
+{
+    { "stop", 0 },
+    { "getaddednodeinfo", 0 },
+    { "setgenerate", 0 },
+    { "setgenerate", 1 },
+    { "getnetworkhashps", 0 },
+    { "getnetworkhashps", 1 },
+    { "sendtoaddress", 1 },
+    { "settxfee", 0 },
+    { "getreceivedbyaddress", 1 },
+    { "getreceivedbyaccount", 1 },
+    { "listreceivedbyaddress", 0 },
+    { "listreceivedbyaddress", 1 },
+    { "listreceivedbyaccount", 0 },
+    { "listreceivedbyaccount", 1 },
+    { "getbalance", 1 },
+    { "getblockhash", 0 },
+    { "move", 2 },
+    { "move", 3 },
+    { "sendfrom", 2 },
+    { "sendfrom", 3 },
+    { "listtransactions", 1 },
+    { "listtransactions", 2 },
+    { "listaccounts", 0 },
+    { "walletpassphrase", 1 },
+    { "getblocktemplate", 0 },
+    { "listsinceblock", 1 },
+    { "sendmany", 1 },
+    { "sendmany", 2 },
+    { "addmultisigaddress", 0 },
+    { "addmultisigaddress", 1 },
+    { "createmultisig", 0 },
+    { "createmultisig", 1 },
+    { "listunspent", 0 },
+    { "listunspent", 1 },
+    { "listunspent", 2 },
+    { "getblock", 1 },
+    { "getrawtransaction", 1 },
+    { "createrawtransaction", 0 },
+    { "createrawtransaction", 1 },
+    { "signrawtransaction", 1 },
+    { "signrawtransaction", 2 },
+    { "sendrawtransaction", 1 },
+    { "gettxout", 1 },
+    { "gettxout", 2 },
+    { "lockunspent", 0 },
+    { "lockunspent", 1 },
+    { "importprivkey", 2 },
+    { "verifychain", 0 },
+    { "verifychain", 1 },
+    { "keypoolrefill", 0 },
+    { "getrawmempool", 0 },
+    { "estimatefee", 0 },
+    { "estimatepriority", 0 },
+};
+
+class CRPCConvertTable
+{
+private:
+    std::set<std::pair<std::string, int> > members;
+
+public:
+    CRPCConvertTable();
+
+    bool convert(const std::string& method, int idx) {
+        return (members.count(std::make_pair(method, idx)) > 0);
     }
-    else
-    {
-        value = value.get_value<T>();
+};
+
+CRPCConvertTable::CRPCConvertTable()
+{
+    const unsigned int n_elem =
+        (sizeof(vRPCConvertParams) / sizeof(vRPCConvertParams[0]));
+
+    for (unsigned int i = 0; i < n_elem; i++) {
+        members.insert(std::make_pair(vRPCConvertParams[i].methodName,
+                                      vRPCConvertParams[i].paramIdx));
     }
 }
 
+static CRPCConvertTable rpcCvtTable;
+
 // Convert strings to command-specific RPC representation
 Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
 {
     Array params;
-    BOOST_FOREACH(const std::string &param, strParams)
-        params.push_back(param);
-
-    int n = params.size();
-
-    //
-    // Special case non-string parameter types
-    //
-    if (strMethod == "stop"                   && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "getaddednodeinfo"       && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "setgenerate"            && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "setgenerate"            && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "getnetworkhashps"       && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "getnetworkhashps"       && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "sendtoaddress"          && n > 1) ConvertTo<double>(params[1]);
-    if (strMethod == "settxfee"               && n > 0) ConvertTo<double>(params[0]);
-    if (strMethod == "getreceivedbyaddress"   && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "getreceivedbyaccount"   && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "listreceivedbyaddress"  && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "listreceivedbyaddress"  && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "listreceivedbyaccount"  && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "listreceivedbyaccount"  && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "getbalance"             && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "getblockhash"           && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "move"                   && n > 2) ConvertTo<double>(params[2]);
-    if (strMethod == "move"                   && n > 3) ConvertTo<int64_t>(params[3]);
-    if (strMethod == "sendfrom"               && n > 2) ConvertTo<double>(params[2]);
-    if (strMethod == "sendfrom"               && n > 3) ConvertTo<int64_t>(params[3]);
-    if (strMethod == "listtransactions"       && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "listtransactions"       && n > 2) ConvertTo<int64_t>(params[2]);
-    if (strMethod == "listaccounts"           && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "walletpassphrase"       && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "prioritisetransaction"  && n > 1) ConvertTo<double>(params[1]);
-    if (strMethod == "prioritisetransaction"  && n > 2) ConvertTo<int64_t>(params[2]);
-    if (strMethod == "getblocktemplate"       && n > 0) ConvertTo<Object>(params[0]);
-    if (strMethod == "listsinceblock"         && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "sendmany"               && n > 1) ConvertTo<Object>(params[1]);
-    if (strMethod == "sendmany"               && n > 2) ConvertTo<int64_t>(params[2]);
-    if (strMethod == "addmultisigaddress"     && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "addmultisigaddress"     && n > 1) ConvertTo<Array>(params[1]);
-    if (strMethod == "createmultisig"         && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "createmultisig"         && n > 1) ConvertTo<Array>(params[1]);
-    if (strMethod == "listunspent"            && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "listunspent"            && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "listunspent"            && n > 2) ConvertTo<Array>(params[2]);
-    if (strMethod == "getblock"               && n > 1) ConvertTo<bool>(params[1]);
-    if (strMethod == "getrawtransaction"      && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "createrawtransaction"   && n > 0) ConvertTo<Array>(params[0]);
-    if (strMethod == "createrawtransaction"   && n > 1) ConvertTo<Object>(params[1]);
-    if (strMethod == "signrawtransaction"     && n > 1) ConvertTo<Array>(params[1], true);
-    if (strMethod == "signrawtransaction"     && n > 2) ConvertTo<Array>(params[2], true);
-    if (strMethod == "sendrawtransaction"     && n > 1) ConvertTo<bool>(params[1], true);
-    if (strMethod == "gettxout"               && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "gettxout"               && n > 2) ConvertTo<bool>(params[2]);
-    if (strMethod == "lockunspent"            && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "lockunspent"            && n > 1) ConvertTo<Array>(params[1]);
-    if (strMethod == "importprivkey"          && n > 2) ConvertTo<bool>(params[2]);
-    if (strMethod == "verifychain"            && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "verifychain"            && n > 1) ConvertTo<int64_t>(params[1]);
-    if (strMethod == "keypoolrefill"          && n > 0) ConvertTo<int64_t>(params[0]);
-    if (strMethod == "getrawmempool"          && n > 0) ConvertTo<bool>(params[0]);
-    if (strMethod == "estimatefee"            && n > 0) ConvertTo<boost::int64_t>(params[0]);
-    if (strMethod == "estimatepriority"       && n > 0) ConvertTo<boost::int64_t>(params[0]);
+
+    for (unsigned int idx = 0; idx < strParams.size(); idx++) {
+        const std::string& strVal = strParams[idx];
+
+        // insert string value directly
+        if (!rpcCvtTable.convert(strMethod, idx)) {
+            params.push_back(strVal);
+        }
+
+        // parse string as JSON, insert bool/number/object/etc. value
+        else {
+            Value jVal;
+            if (!read_string(strVal, jVal))
+                throw runtime_error(string("Error parsing JSON:")+strVal);
+            params.push_back(jVal);
+        }
+
+    }
 
     return params;
 }

From c912e22db08d0a44ad6fd027c09bbdf79c34dbbc Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 4 Jun 2014 11:24:43 -0400
Subject: [PATCH 0254/1819] RPC cleanup: Improve HTTP server replies

1) support varying content types
2) support only sending the header
3) properly deliver error message as content, if HTTP error
4) move AcceptedConnection class to header, for wider use
---
 src/rpcprotocol.cpp | 17 ++++++++++++++---
 src/rpcprotocol.h   | 14 +++++++++++++-
 src/rpcserver.cpp   | 10 ----------
 3 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 2718f81783c3..bfa799f84f9d 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -54,7 +54,8 @@ static string rfc1123Time()
     return DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", GetTime());
 }
 
-string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
+string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
+                 bool headersOnly, const char *contentType)
 {
     if (nStatus == HTTP_UNAUTHORIZED)
         return strprintf("HTTP/1.0 401 Authorization Required\r\n"
@@ -73,6 +74,7 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
             "</HEAD>\r\n"
             "<BODY><H1>401 Unauthorized.</H1></BODY>\r\n"
             "</HTML>\r\n", rfc1123Time(), FormatFullVersion());
+
     const char *cStatus;
          if (nStatus == HTTP_OK) cStatus = "OK";
     else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request";
@@ -80,12 +82,19 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
     else if (nStatus == HTTP_NOT_FOUND) cStatus = "Not Found";
     else if (nStatus == HTTP_INTERNAL_SERVER_ERROR) cStatus = "Internal Server Error";
     else cStatus = "";
+
+    bool useInternalContent = false;
+    if (nStatus != HTTP_OK) {
+        contentType = "text/plain";
+        useInternalContent = true;
+    }
+
     return strprintf(
             "HTTP/1.1 %d %s\r\n"
             "Date: %s\r\n"
             "Connection: %s\r\n"
             "Content-Length: %u\r\n"
-            "Content-Type: application/json\r\n"
+            "Content-Type: %s\r\n"
             "Server: bitcoin-json-rpc/%s\r\n"
             "\r\n"
             "%s",
@@ -94,8 +103,10 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive)
         rfc1123Time(),
         keepalive ? "keep-alive" : "close",
         strMsg.size(),
+        contentType,
         FormatFullVersion(),
-        strMsg);
+        headersOnly ? "" :
+	    useInternalContent ? cStatus : strMsg.c_str());
 }
 
 bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 11bdd171d9a1..8d415efb1b82 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -71,6 +71,16 @@ enum RPCErrorCode
     RPC_WALLET_ALREADY_UNLOCKED     = -17, // Wallet is already unlocked
 };
 
+class AcceptedConnection
+{
+public:
+    virtual ~AcceptedConnection() {}
+
+    virtual std::iostream& stream() = 0;
+    virtual std::string peer_address_to_string() const = 0;
+    virtual void close() = 0;
+};
+
 //
 // IOStream device that speaks SSL but can also speak non-SSL
 //
@@ -141,7 +151,9 @@ class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidi
 };
 
 std::string HTTPPost(const std::string& strMsg, const std::map<std::string,std::string>& mapRequestHeaders);
-std::string HTTPReply(int nStatus, const std::string& strMsg, bool keepalive);
+std::string HTTPReply(int nStatus, const std::string& strMsg, bool keepalive,
+                      bool headerOnly = false,
+                      const char *contentType = "application/json");
 bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
                          std::string& http_method, std::string& http_uri);
 int ReadHTTPStatus(std::basic_istream<char>& stream, int &proto);
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 6552de8c49cc..b85b17c8120c 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -393,16 +393,6 @@ bool ClientAllowed(const boost::asio::ip::address& address)
     return false;
 }
 
-class AcceptedConnection
-{
-public:
-    virtual ~AcceptedConnection() {}
-
-    virtual std::iostream& stream() = 0;
-    virtual std::string peer_address_to_string() const = 0;
-    virtual void close() = 0;
-};
-
 template <typename Protocol>
 class AcceptedConnectionImpl : public AcceptedConnection
 {

From 854d013012c2d457d5296227d212b053cbea5239 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 4 Jun 2014 11:38:33 -0400
Subject: [PATCH 0255/1819] RPC code movement: separate out JSON-RPC execution
 logic from HTTP server logic

---
 src/rpcserver.cpp | 129 ++++++++++++++++++++++++++--------------------
 1 file changed, 72 insertions(+), 57 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index b85b17c8120c..49bc05e5d697 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -809,6 +809,71 @@ static string JSONRPCExecBatch(const Array& vReq)
     return write_string(Value(ret), false) + "\n";
 }
 
+static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
+                            string& strRequest,
+                            map<string, string>& mapHeaders,
+                            bool fRun)
+{
+    // Check authorization
+    if (mapHeaders.count("authorization") == 0)
+    {
+        conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
+        return false;
+    }
+
+    if (!HTTPAuthorized(mapHeaders))
+    {
+        LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string());
+        /* Deter brute-forcing short passwords.
+           If this results in a DoS the user really
+           shouldn't have their RPC port exposed. */
+        if (mapArgs["-rpcpassword"].size() < 20)
+            MilliSleep(250);
+
+        conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
+        return false;
+    }
+
+    JSONRequest jreq;
+    try
+    {
+        // Parse request
+        Value valRequest;
+        if (!read_string(strRequest, valRequest))
+            throw JSONRPCError(RPC_PARSE_ERROR, "Parse error");
+
+        string strReply;
+
+        // singleton request
+        if (valRequest.type() == obj_type) {
+            jreq.parse(valRequest);
+
+            Value result = tableRPC.execute(jreq.strMethod, jreq.params);
+
+            // Send reply
+            strReply = JSONRPCReply(result, Value::null, jreq.id);
+
+        // array of requests
+        } else if (valRequest.type() == array_type)
+            strReply = JSONRPCExecBatch(valRequest.get_array());
+        else
+            throw JSONRPCError(RPC_PARSE_ERROR, "Top-level object parse error");
+
+        conn->stream() << HTTPReply(HTTP_OK, strReply, fRun) << std::flush;
+    }
+    catch (Object& objError)
+    {
+        ErrorReply(conn->stream(), objError, jreq.id);
+        return false;
+    }
+    catch (std::exception& e)
+    {
+        ErrorReply(conn->stream(), JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
+        return false;
+    }
+    return true;
+}
+
 void ServiceConnection(AcceptedConnection *conn)
 {
     bool fRun = true;
@@ -825,67 +890,17 @@ void ServiceConnection(AcceptedConnection *conn)
         // Read HTTP message headers and body
         ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto);
 
-        if (strURI != "/") {
-            conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
-            break;
-        }
-
-        // Check authorization
-        if (mapHeaders.count("authorization") == 0)
-        {
-            conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
-            break;
-        }
-        if (!HTTPAuthorized(mapHeaders))
-        {
-            LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string());
-            /* Deter brute-forcing short passwords.
-               If this results in a DoS the user really
-               shouldn't have their RPC port exposed. */
-            if (mapArgs["-rpcpassword"].size() < 20)
-                MilliSleep(250);
-
-            conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
-            break;
-        }
+        // HTTP Keep-Alive is false; close connection immediately
         if (mapHeaders["connection"] == "close")
             fRun = false;
 
-        JSONRequest jreq;
-        try
-        {
-            // Parse request
-            Value valRequest;
-            if (!read_string(strRequest, valRequest))
-                throw JSONRPCError(RPC_PARSE_ERROR, "Parse error");
-
-            string strReply;
-
-            // singleton request
-            if (valRequest.type() == obj_type) {
-                jreq.parse(valRequest);
-
-                Value result = tableRPC.execute(jreq.strMethod, jreq.params);
-
-                // Send reply
-                strReply = JSONRPCReply(result, Value::null, jreq.id);
-
-            // array of requests
-            } else if (valRequest.type() == array_type)
-                strReply = JSONRPCExecBatch(valRequest.get_array());
-            else
-                throw JSONRPCError(RPC_PARSE_ERROR, "Top-level object parse error");
-
-            conn->stream() << HTTPReply(HTTP_OK, strReply, fRun) << std::flush;
-        }
-        catch (Object& objError)
-        {
-            ErrorReply(conn->stream(), objError, jreq.id);
-            break;
+        if (strURI == "/") {
+            if (!HTTPReq_JSONRPC(conn, strRequest, mapHeaders, fRun))
+                break;
         }
-        catch (std::exception& e)
-        {
-            ErrorReply(conn->stream(), JSONRPCError(RPC_PARSE_ERROR, e.what()), jreq.id);
+
+        else {
+            conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
             break;
         }
     }

From ed5769f536f663a8deb8e8b7a68681cebaa52bdd Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Fri, 27 Jun 2014 00:10:53 -0400
Subject: [PATCH 0256/1819] Move AcceptedConnection class to rpcserver.h.

Also, add parens to HTTPReply() to assist readability.
---
 src/rpcprotocol.cpp |  4 ++--
 src/rpcprotocol.h   | 10 ----------
 src/rpcserver.h     | 10 ++++++++++
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index bfa799f84f9d..2cb4a35c4b3d 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -105,8 +105,8 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
         strMsg.size(),
         contentType,
         FormatFullVersion(),
-        headersOnly ? "" :
-	    useInternalContent ? cStatus : strMsg.c_str());
+        (headersOnly ? "" :
+            (useInternalContent ? cStatus : strMsg.c_str())));
 }
 
 bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 8d415efb1b82..f1317e9c2811 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -71,16 +71,6 @@ enum RPCErrorCode
     RPC_WALLET_ALREADY_UNLOCKED     = -17, // Wallet is already unlocked
 };
 
-class AcceptedConnection
-{
-public:
-    virtual ~AcceptedConnection() {}
-
-    virtual std::iostream& stream() = 0;
-    virtual std::string peer_address_to_string() const = 0;
-    virtual void close() = 0;
-};
-
 //
 // IOStream device that speaks SSL but can also speak non-SSL
 //
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 1966a65b50b5..fcd293663ffe 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -21,6 +21,16 @@
 class CBlockIndex;
 class CNetAddr;
 
+class AcceptedConnection
+{
+public:
+    virtual ~AcceptedConnection() {}
+
+    virtual std::iostream& stream() = 0;
+    virtual std::string peer_address_to_string() const = 0;
+    virtual void close() = 0;
+};
+
 /* Start RPC threads */
 void StartRPCThreads();
 /* Alternative to StartRPCThreads for the GUI, when no server is

From 49d86c7477ba1dbbbd08f452d0e7d710b22bad92 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 27 Jun 2014 10:05:46 +0200
Subject: [PATCH 0257/1819] rpc-tests: Fix rpcbind_test after 0193fb8

Port number for RPC is no longer static as multiple tests could be
running at once.
---
 qa/rpc-tests/rpcbind_test.py | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py
index a31f8d98ef7c..a823404e0046 100755
--- a/qa/rpc-tests/rpcbind_test.py
+++ b/qa/rpc-tests/rpcbind_test.py
@@ -39,7 +39,7 @@ def run_bind_test(tmpdir, allow_ips, connect_to, addresses, expected):
         stop_nodes(nodes)
         wait_bitcoinds()
 
-def run_allowip_test(tmpdir, allow_ips, rpchost):
+def run_allowip_test(tmpdir, allow_ips, rpchost, rpcport):
     '''
     Start a node with rpcwallow IP, and request getinfo
     at a non-localhost IP.
@@ -48,7 +48,7 @@ def run_allowip_test(tmpdir, allow_ips, rpchost):
     nodes = start_nodes(1, tmpdir, [base_args])
     try:
         # connect to node through non-loopback interface
-        url = "http://rt:rt@%s:%d" % (rpchost, START_RPC_PORT,)
+        url = "http://rt:rt@%s:%d" % (rpchost, rpcport,)
         node = AuthServiceProxy(url)
         node.getinfo()
     finally:
@@ -69,15 +69,17 @@ def run_test(tmpdir):
         assert(not 'This test requires at least one non-loopback IPv4 interface')
     print("Using interface %s for testing" % non_loopback_ip)
 
+    defaultport = rpc_port(0)
+
     # check default without rpcallowip (IPv4 and IPv6 localhost)
     run_bind_test(tmpdir, None, '127.0.0.1', [],
-        [('127.0.0.1', 11100), ('::1', 11100)])
+        [('127.0.0.1', defaultport), ('::1', defaultport)])
     # check default with rpcallowip (IPv6 any)
     run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', [],
-        [('::0', 11100)])
+        [('::0', defaultport)])
     # check only IPv4 localhost (explicit)
     run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1'],
-        [('127.0.0.1', START_RPC_PORT)])
+        [('127.0.0.1', defaultport)])
     # check only IPv4 localhost (explicit) with alternative port
     run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1:32171', ['127.0.0.1:32171'],
         [('127.0.0.1', 32171)])
@@ -86,18 +88,18 @@ def run_test(tmpdir):
         [('127.0.0.1', 32171), ('127.0.0.1', 32172)])
     # check only IPv6 localhost (explicit)
     run_bind_test(tmpdir, ['[::1]'], '[::1]', ['[::1]'],
-        [('::1', 11100)])
+        [('::1', defaultport)])
     # check both IPv4 and IPv6 localhost (explicit)
     run_bind_test(tmpdir, ['127.0.0.1'], '127.0.0.1', ['127.0.0.1', '[::1]'],
-        [('127.0.0.1', START_RPC_PORT), ('::1', START_RPC_PORT)])
+        [('127.0.0.1', defaultport), ('::1', defaultport)])
     # check only non-loopback interface
     run_bind_test(tmpdir, [non_loopback_ip], non_loopback_ip, [non_loopback_ip],
-        [(non_loopback_ip, START_RPC_PORT)])
+        [(non_loopback_ip, defaultport)])
 
     # Check that with invalid rpcallowip, we are denied
-    run_allowip_test(tmpdir, [non_loopback_ip], non_loopback_ip)
+    run_allowip_test(tmpdir, [non_loopback_ip], non_loopback_ip, defaultport)
     try:
-        run_allowip_test(tmpdir, ['1.1.1.1'], non_loopback_ip)
+        run_allowip_test(tmpdir, ['1.1.1.1'], non_loopback_ip, defaultport)
         assert(not 'Connection not denied by rpcallowip as expected')
     except ValueError:
         pass

From 40a158e100c517c73d9a75434e48cfe904ea00cc Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 27 Jun 2014 11:13:25 +0200
Subject: [PATCH 0258/1819] minor code format fix in rpc-related files

---
 src/rpcmisc.cpp   | 2 +-
 src/rpcserver.cpp | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index a300de26800d..5b470516a102 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -22,10 +22,10 @@
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_value.h"
 
-using namespace std;
 using namespace boost;
 using namespace boost::assign;
 using namespace json_spirit;
+using namespace std;
 
 Value getinfo(const Array& params, bool fHelp)
 {
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 49bc05e5d697..54043458d5f6 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -25,10 +25,10 @@
 #include <boost/shared_ptr.hpp>
 #include "json/json_spirit_writer_template.h"
 
-using namespace std;
 using namespace boost;
 using namespace boost::asio;
 using namespace json_spirit;
+using namespace std;
 
 static std::string strRPCUserColonPass;
 
@@ -897,9 +897,7 @@ void ServiceConnection(AcceptedConnection *conn)
         if (strURI == "/") {
             if (!HTTPReq_JSONRPC(conn, strRequest, mapHeaders, fRun))
                 break;
-        }
-
-        else {
+        } else {
             conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
             break;
         }

From 33c62c9c0b25998beb361e6f42e1fd0beebcf05b Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 27 Jun 2014 15:09:41 +0200
Subject: [PATCH 0259/1819] set shutdown title to main window title

- this ensures we don't show Bitcoin-Qt as that is still our
  internal application name
- fixes #4427
---
 src/qt/utilitydialog.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index eb647d017080..5fb0da145dea 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -117,6 +117,7 @@ void ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
         tr("Bitcoin Core is shutting down...") + "<br /><br />" +
         tr("Do not shut down the computer until this window disappears.")));
     shutdownWindow->setLayout(layout);
+    shutdownWindow->setWindowTitle(window->windowTitle());
 
     // Center shutdown window at where main window was
     const QPoint global = window->mapToGlobal(window->rect().center());

From 8fbf03995df9a2003be603be1a930bc3373d56e0 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Wed, 25 Jun 2014 16:21:29 -0700
Subject: [PATCH 0260/1819] CBloomFilter::clear() method

---
 src/bloom.cpp            | 7 +++++++
 src/bloom.h              | 2 ++
 src/test/bloom_tests.cpp | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/bloom.cpp b/src/bloom.cpp
index 26e366179cad..85a2ddc1892b 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -94,6 +94,13 @@ bool CBloomFilter::contains(const uint256& hash) const
     return contains(data);
 }
 
+void CBloomFilter::clear()
+{
+    vData.assign(vData.size(),0);
+    isFull = false;
+    isEmpty = true;
+}
+
 bool CBloomFilter::IsWithinSizeConstraints() const
 {
     return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;
diff --git a/src/bloom.h b/src/bloom.h
index 956bead87f87..d0caf9e9fafb 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -78,6 +78,8 @@ class CBloomFilter
     bool contains(const COutPoint& outpoint) const;
     bool contains(const uint256& hash) const;
 
+    void clear();
+
     // True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
     // (catch a filter which was just deserialized which was too big)
     bool IsWithinSizeConstraints() const;
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index b56d998be29c..5c6c7d85882d 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -45,6 +45,10 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
         expected[i] = (char)vch[i];
 
     BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
+
+    BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+    filter.clear();
+    BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
 }
 
 BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)

From d640a3ceab4f4372c2a0f738c1286cfde4b41b50 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Wed, 25 Jun 2014 23:41:44 -0700
Subject: [PATCH 0261/1819] Relay double-spends, subject to anti-DOS

Allows network wallets and other clients to see transactions that respend
a prevout already spent in an unconfirmed transaction in this node's mempool.

Knowledge of an attempted double-spend is of interest to recipients of the
first spend.  In some cases, it will allow these recipients to withhold
goods or services upon being alerted of a double-spend that deprives them
of payment.

As before, respends are not added to the mempool.

Anti-Denial-of-Service-Attack provisions:
 - Use a bloom filter to relay only one respend per mempool prevout
 - Rate-limit respend relays to a default of 100 thousand bytes/minute
 - Define tx2.IsEquivalentTo(tx1): equality when scriptSigs are not considered
 - Do not relay these equivalent transactions

Remove an unused variable declaration in txmempool.cpp.
---
 src/core.cpp      |  16 ++++++++
 src/core.h        |   3 ++
 src/init.cpp      |   1 +
 src/main.cpp      | 100 +++++++++++++++++++++++++++++++++++++++-------
 src/main.h        |   3 ++
 src/txmempool.cpp |   1 -
 6 files changed, 109 insertions(+), 15 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 6c5ee1c0f873..ca2862452970 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -119,6 +119,22 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) {
     return *this;
 }
 
+bool CTransaction::IsEquivalentTo(const CTransaction& tx) const
+{
+    if (nVersion   != tx.nVersion   ||
+        nLockTime  != tx.nLockTime  ||
+        vin.size() != tx.vin.size() ||
+        vout       != tx.vout)
+        return false;
+    for (unsigned int i = 0; i < vin.size(); i++)
+    {
+        if (vin[i].nSequence != tx.vin[i].nSequence ||
+            vin[i].prevout   != tx.vin[i].prevout)
+            return false;
+    }
+    return true;
+}
+
 int64_t CTransaction::GetValueOut() const
 {
     int64_t nValueOut = 0;
diff --git a/src/core.h b/src/core.h
index 27fda95552fd..8606831575a6 100644
--- a/src/core.h
+++ b/src/core.h
@@ -256,6 +256,9 @@ class CTransaction
         return hash;
     }
 
+    // True if only scriptSigs are different
+    bool IsEquivalentTo(const CTransaction& tx) const;
+
     // Return sum of txouts.
     int64_t GetValueOut() const;
     // GetValueIn() is a method on CCoinsViewCache, because
diff --git a/src/init.cpp b/src/init.cpp
index c7170b0f2dbe..bd732753e49c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1175,6 +1175,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("mapAddressBook.size() = %u\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
 #endif
 
+    RegisterInternalSignals();
     StartNode(threadGroup);
     if (fServer)
         StartRPCThreads();
diff --git a/src/main.cpp b/src/main.cpp
index d86fd3a24d35..48237c1b5402 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -7,6 +7,7 @@
 
 #include "addrman.h"
 #include "alert.h"
+#include "bloom.h"
 #include "chainparams.h"
 #include "checkpoints.h"
 #include "checkqueue.h"
@@ -122,6 +123,10 @@ namespace {
     map<uint256, pair<NodeId, list<uint256>::iterator> > mapBlocksToDownload;
 }
 
+// Forward reference functions defined here:
+static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
+static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // dispatching functions
@@ -143,9 +148,24 @@ struct CMainSignals {
     boost::signals2::signal<void (const uint256 &)> Inventory;
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
+    // Notifies listeners of detection of a double-spent transaction. Arguments are outpoint that is
+    // double-spent, first transaction seen, double-spend transaction, and whether the second double-spend
+    // transaction was first seen in a block.
+    // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
+    // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
+    boost::signals2::signal<void (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 }
 
+void RegisterInternalSignals() {
+    static CBloomFilter doubleSpendFilter;
+    seed_insecure_rand();
+    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
+
+    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayDoubleSpend, _1, _2, _3, doubleSpendFilter));
+}
+
+
 void RegisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
     g_signals.EraseTransaction.connect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
@@ -824,6 +844,22 @@ int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree,
     return nMinFee;
 }
 
+// Exponentially limit the rate of nSize flow to nLimit.  nLimit unit is thousands-per-minute.
+bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsigned int nSize)
+{
+    static CCriticalSection csLimiter;
+    int64_t nNow = GetTime();
+
+    LOCK(csLimiter);
+
+    // Use an exponentially decaying ~10-minute window:
+    dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
+    nLastTime = nNow;
+    if (dCount >= nLimit*10*1000)
+        return true;
+    dCount += nSize;
+    return false;
+}
 
 bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
                         bool* pfMissingInputs, bool fRejectInsaneFee)
@@ -858,9 +894,10 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     for (unsigned int i = 0; i < tx.vin.size(); i++)
     {
         COutPoint outpoint = tx.vin[i].prevout;
-        if (pool.mapNextTx.count(outpoint))
+        // Does tx conflict with a member of the pool, and is it not equivalent to that member?
+        if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
         {
-            // Disable replacement feature for now
+            g_signals.DetectedDoubleSpend(outpoint, tx, false);
             return false;
         }
     }
@@ -932,23 +969,15 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // be annoying or make others' transactions take longer to confirm.
         if (fLimitFree && nFees < CTransaction::minRelayTxFee.GetFee(nSize))
         {
-            static CCriticalSection csFreeLimiter;
             static double dFreeCount;
-            static int64_t nLastTime;
-            int64_t nNow = GetTime();
-
-            LOCK(csFreeLimiter);
+            static int64_t nLastFreeTime;
+            static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
 
-            // Use an exponentially decaying ~10-minute window:
-            dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
-            nLastTime = nNow;
-            // -limitfreerelay unit is thousand-bytes-per-minute
-            // At default rate it would take over a month to fill 1GB
-            if (dFreeCount >= GetArg("-limitfreerelay", 15)*10*1000)
+        	if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
                 return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
                                  REJECT_INSUFFICIENTFEE, "insufficient priority");
+
             LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
-            dFreeCount += nSize;
         }
 
         if (fRejectInsaneFee && nFees > CTransaction::minRelayTxFee.GetFee(nSize) * 10000)
@@ -971,6 +1000,49 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
+static void
+RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+{
+    // Relaying double-spend attempts to our peers lets them detect when
+    // somebody might be trying to cheat them. However, blindly relaying
+    // every double-spend across the entire network gives attackers
+    // a denial-of-service attack: just generate a stream of double-spends
+    // re-spending the same (limited) set of outpoints owned by the attacker.
+    // So, we use a bloom filter and only relay (at most) the first double
+    // spend for each outpoint. False-positives ("we have already relayed")
+    // are OK, because if the peer doesn't hear about the double-spend
+    // from us they are very likely to hear about it from another peer, since
+    // each peer uses a different, randomized bloom filter.
+
+    if (fInBlock || filter.contains(outPoint)) return;
+
+    // Apply an independent rate limit to double-spend relays
+    static double dRespendCount;
+    static int64_t nLastRespendTime;
+    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
+    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
+
+    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
+    {
+        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
+        return;
+    }
+
+    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
+
+    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
+    // insertions
+    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
+        filter.clear();
+
+    filter.insert(outPoint);
+
+    RelayTransaction(doubleSpend);
+
+    // Share conflict with wallet
+    g_signals.SyncTransaction(doubleSpend, NULL);
+}
+
 
 int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
 {
diff --git a/src/main.h b/src/main.h
index 0332db216342..c7f3dc43889f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -108,6 +108,9 @@ struct CNodeStateStats;
 
 struct CBlockTemplate;
 
+/** Set up internal signal handlers **/
+void RegisterInternalSignals();
+
 /** Register a wallet to receive updates from core */
 void RegisterWallet(CWalletInterface* pwalletIn);
 /** Unregister a wallet from core */
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 52f82ef040cc..97a426dd355a 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -415,7 +415,6 @@ void CTxMemPool::remove(const CTransaction &tx, std::list<CTransaction>& removed
 void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
 {
     // Remove transactions which depend on inputs of tx, recursively
-    list<CTransaction> result;
     LOCK(cs);
     BOOST_FOREACH(const CTxIn &txin, tx.vin) {
         std::map<COutPoint, CInPoint>::iterator it = mapNextTx.find(txin.prevout);

From ada5a067c75f19a724cc054286ecf2254e5dbe8f Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Thu, 26 Jun 2014 18:31:05 -0700
Subject: [PATCH 0262/1819] UI to alert of respend attempt affecting wallet.

Respend transactions that conflict with transactions already in the
wallet are added to it.  They are not displayed unless they also involve
the wallet, or get into a block.  If they do not involve the wallet,
they continue not to affect balance.

Transactions that involve the wallet, and have conflicting non-equivalent
transactions, are highlighted in red.  When the conflict first occurs, a
modal dialog is thrown.

CWallet::SyncMetaData is changed to sync only to equivalent transactions.

When a conflict is added to the wallet, counter nConflictsReceived is
incremented.  This acts like a change in active block height for the
purpose of triggering UI updates.
---
 src/qt/guiconstants.h             |  4 ++++
 src/qt/transactionfilterproxy.cpp |  4 ++--
 src/qt/transactionrecord.cpp      | 10 +++++++---
 src/qt/transactionrecord.h        | 13 ++++++++++--
 src/qt/transactiontablemodel.cpp  | 18 ++++++++++++-----
 src/qt/walletmodel.cpp            |  8 ++++++++
 src/ui_interface.h                |  3 ++-
 src/wallet.cpp                    | 33 +++++++++++++++++++++++++------
 src/wallet.h                      | 15 ++++++++++++--
 9 files changed, 87 insertions(+), 21 deletions(-)

diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 5ae4bc833de8..44e361e1e50b 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -23,6 +23,10 @@ static const int STATUSBAR_ICONSIZE = 16;
 #define COLOR_NEGATIVE QColor(255, 0, 0)
 /* Transaction list -- bare address (without label) */
 #define COLOR_BAREADDRESS QColor(140, 140, 140)
+/* Transaction list -- has conflicting transactions */
+#define COLOR_HASCONFLICTING Qt::white;
+/* Transaction list -- has conflicting transactions - background */
+#define COLOR_HASCONFLICTING_BG QColor(192, 0, 0)
 
 /* Tooltips longer than this (in characters) are converted into rich text,
    so that they can be word-wrapped.
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index f9546fddb5ed..7293029787a6 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -24,7 +24,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
     typeFilter(ALL_TYPES),
     minAmount(0),
     limitRows(-1),
-    showInactive(true)
+    showInactive(false)
 {
 }
 
@@ -39,7 +39,7 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
     qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
     int status = index.data(TransactionTableModel::StatusRole).toInt();
 
-    if(!showInactive && status == TransactionStatus::Conflicted)
+    if(!showInactive && status == TransactionStatus::Conflicted && type == TransactionRecord::Other)
         return false;
     if(!(TYPE(type) & typeFilter))
         return false;
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index eec2b57e8c1a..21f1b7356f79 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -170,6 +170,8 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
     status.depth = wtx.GetDepthInMainChain();
     status.cur_num_blocks = chainActive.Height();
 
+    status.hasConflicting = false;
+
     if (!IsFinalTx(wtx, chainActive.Height() + 1))
     {
         if (wtx.nLockTime < LOCKTIME_THRESHOLD)
@@ -213,6 +215,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
         if (status.depth < 0)
         {
             status.status = TransactionStatus::Conflicted;
+            status.hasConflicting = !(wtx.GetConflicts(false).empty());
         }
         else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
         {
@@ -221,6 +224,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
         else if (status.depth == 0)
         {
             status.status = TransactionStatus::Unconfirmed;
+            status.hasConflicting = !(wtx.GetConflicts(false).empty());
         }
         else if (status.depth < RecommendedNumConfirmations)
         {
@@ -231,13 +235,13 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
             status.status = TransactionStatus::Confirmed;
         }
     }
-
 }
 
-bool TransactionRecord::statusUpdateNeeded()
+bool TransactionRecord::statusUpdateNeeded(int64_t nConflictsReceived)
 {
     AssertLockHeld(cs_main);
-    return status.cur_num_blocks != chainActive.Height();
+    return (status.cur_num_blocks != chainActive.Height() ||
+            status.cur_num_conflicts != nConflictsReceived);
 }
 
 QString TransactionRecord::getTxID() const
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index af6fd403b3f5..4c2847144a2b 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -20,7 +20,8 @@ class TransactionStatus
 public:
     TransactionStatus():
         countsForBalance(false), sortKey(""),
-        matures_in(0), status(Offline), depth(0), open_for(0), cur_num_blocks(-1)
+        matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
+        cur_num_conflicts(-1)
     { }
 
     enum Status {
@@ -51,6 +52,10 @@ class TransactionStatus
     /** @name Reported status
        @{*/
     Status status;
+
+    // Has conflicting transactions spending same prevout
+    bool hasConflicting;
+
     qint64 depth;
     qint64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number
                       of additional blocks that need to be mined before
@@ -59,6 +64,10 @@ class TransactionStatus
 
     /** Current number of blocks (to know whether cached status is still valid) */
     int cur_num_blocks;
+
+    /** Number of conflicts received into wallet as of last status update */
+    int64_t cur_num_conflicts;
+
 };
 
 /** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has
@@ -133,7 +142,7 @@ class TransactionRecord
 
     /** Return whether a status update is needed.
      */
-    bool statusUpdateNeeded();
+    bool statusUpdateNeeded(int64_t nConflictsReceived);
 };
 
 #endif // TRANSACTIONRECORD_H
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index b9fcd0d6b093..eb5c3abdbca5 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -168,8 +168,7 @@ class TransactionTablePriv
                 parent->endRemoveRows();
                 break;
             case CT_UPDATED:
-                // Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
-                // visible transactions.
+                emit parent->dataChanged(parent->index(lowerIndex, parent->Status), parent->index(upperIndex-1, parent->Amount));
                 break;
             }
         }
@@ -190,20 +189,21 @@ class TransactionTablePriv
             // stuck if the core is holding the locks for a longer time - for
             // example, during a wallet rescan.
             //
-            // If a status update is needed (blocks came in since last check),
-            //  update the status of this transaction from the wallet. Otherwise,
+            // If a status update is needed (blocks or conflicts came in since last check),
+            // update the status of this transaction from the wallet. Otherwise,
             // simply re-use the cached status.
             TRY_LOCK(cs_main, lockMain);
             if(lockMain)
             {
                 TRY_LOCK(wallet->cs_wallet, lockWallet);
-                if(lockWallet && rec->statusUpdateNeeded())
+                if(lockWallet && rec->statusUpdateNeeded(wallet->nConflictsReceived))
                 {
                     std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(rec->hash);
 
                     if(mi != wallet->mapWallet.end())
                     {
                         rec->updateStatus(mi->second);
+                        rec->status.cur_num_conflicts = wallet->nConflictsReceived;
                     }
                 }
             }
@@ -363,6 +363,8 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
         return tr("Payment to yourself");
     case TransactionRecord::Generated:
         return tr("Mined");
+    case TransactionRecord::Other:
+        return tr("Other");
     default:
         return QString();
     }
@@ -535,7 +537,13 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         return formatTooltip(rec);
     case Qt::TextAlignmentRole:
         return column_alignments[index.column()];
+    case Qt::BackgroundColorRole:
+    	if (rec->status.hasConflicting)
+            return COLOR_HASCONFLICTING_BG;
+    	break;
     case Qt::ForegroundRole:
+        if (rec->status.hasConflicting)
+            return COLOR_HASCONFLICTING;
         // Non-confirmed (but not immature) as transactions are grey
         if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature)
         {
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 2f633a26c86c..3d6f2ab9ba4e 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -138,6 +138,14 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
+	if (status == CT_GOT_CONFLICT)
+	{
+	    emit message(tr("Conflict Received"),
+	    	         tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
+	          		CClientUIInterface::MSG_WARNING);
+		return;
+	}
+
     if(transactionTableModel)
         transactionTableModel->updateTransaction(hash, status);
 
diff --git a/src/ui_interface.h b/src/ui_interface.h
index e1a3e04e12f1..e9fcd91d41c0 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -21,7 +21,8 @@ enum ChangeType
 {
     CT_NEW,
     CT_UPDATED,
-    CT_DELETED
+    CT_DELETED,
+    CT_GOT_CONFLICT
 };
 
 /** Signals for UI communication. */
diff --git a/src/wallet.cpp b/src/wallet.cpp
index f6fd6e958d3b..79cc5ba3c96e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -256,7 +256,7 @@ bool CWallet::SetMaxVersion(int nVersion)
     return true;
 }
 
-set<uint256> CWallet::GetConflicts(const uint256& txid) const
+set<uint256> CWallet::GetConflicts(const uint256& txid, bool includeEquivalent) const
 {
     set<uint256> result;
     AssertLockHeld(cs_wallet);
@@ -274,7 +274,8 @@ set<uint256> CWallet::GetConflicts(const uint256& txid) const
             continue;  // No conflict if zero or one spends
         range = mapTxSpends.equal_range(txin.prevout);
         for (TxSpends::const_iterator it = range.first; it != range.second; ++it)
-            result.insert(it->second);
+            if (includeEquivalent || !wtx.IsEquivalentTo(mapWallet.at(it->second)))
+                result.insert(it->second);
     }
     return result;
 }
@@ -303,6 +304,7 @@ void CWallet::SyncMetaData(pair<TxSpends::iterator, TxSpends::iterator> range)
         const uint256& hash = it->second;
         CWalletTx* copyTo = &mapWallet[hash];
         if (copyFrom == copyTo) continue;
+        if (!copyFrom->IsEquivalentTo(*copyTo)) continue;
         copyTo->mapValue = copyFrom->mapValue;
         copyTo->vOrderForm = copyFrom->vOrderForm;
         // fTimeReceivedIsTxTime not copied on purpose
@@ -588,6 +590,20 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
         // Notify UI of new or updated transaction
         NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
 
+        // Notifications for existing transactions that now have conflicts with this one
+        if (fInsertedNew)
+        {
+            BOOST_FOREACH(const uint256& conflictHash, wtxIn.GetConflicts(false))
+            {
+                CWalletTx& txConflict = mapWallet[conflictHash];
+                NotifyTransactionChanged(this, conflictHash, CT_UPDATED); //Updates UI table
+                if (IsFromMe(txConflict) || IsMine(txConflict))
+                {
+                    NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT);  //Throws dialog
+                }
+            }
+        }
+
         // notify an external script when a wallet transaction comes in or is updated
         std::string strCmd = GetArg("-walletnotify", "");
 
@@ -610,7 +626,12 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
         AssertLockHeld(cs_wallet);
         bool fExisted = mapWallet.count(tx.GetHash());
         if (fExisted && !fUpdate) return false;
-        if (fExisted || IsMine(tx) || IsFromMe(tx))
+
+        bool fIsConflicting = IsConflicting(tx);
+        if (fIsConflicting)
+        	nConflictsReceived++;
+
+        if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
         {
             CWalletTx wtx(this,tx);
             // Get merkle branch if transaction was found in a block
@@ -896,7 +917,7 @@ void CWallet::ReacceptWalletTransactions()
 
         int nDepth = wtx.GetDepthInMainChain();
 
-        if (!wtx.IsCoinBase() && nDepth < 0)
+        if (!wtx.IsCoinBase() && nDepth < 0 && (IsMine(wtx) || IsFromMe(wtx)))
         {
             // Try to add to memory pool
             LOCK(mempool.cs);
@@ -916,13 +937,13 @@ void CWalletTx::RelayWalletTransaction()
     }
 }
 
-set<uint256> CWalletTx::GetConflicts() const
+set<uint256> CWalletTx::GetConflicts(bool includeEquivalent) const
 {
     set<uint256> result;
     if (pwallet != NULL)
     {
         uint256 myHash = GetHash();
-        result = pwallet->GetConflicts(myHash);
+        result = pwallet->GetConflicts(myHash, includeEquivalent);
         result.erase(myHash);
     }
     return result;
diff --git a/src/wallet.h b/src/wallet.h
index 8494ce9a34a1..1c2512d67819 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -141,6 +141,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     MasterKeyMap mapMasterKeys;
     unsigned int nMasterKeyMaxID;
 
+    // Increment to cause UI refresh, similar to new block
+    int64_t nConflictsReceived;
+
     CWallet()
     {
         SetNull();
@@ -163,6 +166,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         nNextResend = 0;
         nLastResend = 0;
         nTimeFirstKey = 0;
+        nConflictsReceived = 0;
     }
 
     std::map<uint256, CWalletTx> mapWallet;
@@ -305,6 +309,13 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     {
         return (GetDebit(tx) > 0);
     }
+    bool IsConflicting(const CTransaction& tx) const
+    {
+  	    BOOST_FOREACH(const CTxIn& txin, tx.vin)
+    	    if (mapTxSpends.count(txin.prevout))
+    	        return true;
+   	    return false;
+    }
     int64_t GetDebit(const CTransaction& tx) const
     {
         int64_t nDebit = 0;
@@ -377,7 +388,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     int GetVersion() { LOCK(cs_wallet); return nWalletVersion; }
 
     // Get wallet transactions that conflict with given transaction (spend same outputs)
-    std::set<uint256> GetConflicts(const uint256& txid) const;
+    std::set<uint256> GetConflicts(const uint256& txid, bool includeEquivalent) const;
 
     /** Address book entry changed.
      * @note called with lock cs_wallet held.
@@ -699,7 +710,7 @@ class CWalletTx : public CMerkleTx
 
     void RelayWalletTransaction();
 
-    std::set<uint256> GetConflicts() const;
+    std::set<uint256> GetConflicts(bool includeEquivalent=true) const;
 };
 
 

From 9004798e62e987ddf50030b17fa1881b63dd5e45 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Thu, 26 Jun 2014 18:31:40 -0700
Subject: [PATCH 0263/1819] Add -respendnotify option and new RPC data

-respendnotify=<cmd> Execute command when a network tx respends wallet
tx input (%s=respend TxID, %t=wallet TxID)

Add respendsobserved array to gettransaction, listtransactions, and
listsinceblock RPCs.  This omits the malleated clones that are included
in the walletconflicts array.

Add RPC help for respendsobserved and walletconflicts (help was missing
for the latter).
---
 contrib/debian/manpages/bitcoin-qt.1 |  3 +++
 src/init.cpp                         |  1 +
 src/rpcwallet.cpp                    | 22 ++++++++++++++++++++++
 src/wallet.cpp                       |  8 ++++++++
 4 files changed, 34 insertions(+)

diff --git a/contrib/debian/manpages/bitcoin-qt.1 b/contrib/debian/manpages/bitcoin-qt.1
index cd478b1875cb..25a423f9c425 100644
--- a/contrib/debian/manpages/bitcoin-qt.1
+++ b/contrib/debian/manpages/bitcoin-qt.1
@@ -139,6 +139,9 @@ Execute command when the best block changes (%s in cmd is replaced by block hash
 \fB\-walletnotify=\fR<cmd>
 Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
 .TP
+\fB\-respendnotify=\fR<cmd>
+Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)
+.TP
 \fB\-alertnotify=\fR<cmd>
 Execute command when a relevant alert is received (%s in cmd is replaced by message)
 .TP
diff --git a/src/init.cpp b/src/init.cpp
index bd732753e49c..3d0c03328f35 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -260,6 +260,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + _("(default: wallet.dat)") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
+    strUsage += "  -respendnotify=<cmd>   " + _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)") + "\n";
     strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup") + "\n";
     strUsage += "                         " + _("(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 4f27cef087a9..38e96133b4c9 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -58,6 +58,10 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
         conflicts.push_back(conflict.GetHex());
     entry.push_back(Pair("walletconflicts", conflicts));
+    Array respends;
+    BOOST_FOREACH(const uint256& respend, wtx.GetConflicts(false))
+        respends.push_back(respend.GetHex());
+    entry.push_back(Pair("respendsobserved", respends));
     entry.push_back(Pair("time", wtx.GetTxTime()));
     entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
     BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
@@ -1211,6 +1215,12 @@ Value listtransactions(const Array& params, bool fHelp)
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive'\n"
             "                                          category of transactions.\n"
             "    \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
+            "    \"walletconflicts\" : [\n"
+            "        \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
+            "    ],\n"
+            "    \"respendsobserved\" : [\n"
+            "        \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
+            "    ],\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
             "                                          for 'send' and 'receive' category of transactions.\n"
@@ -1376,6 +1386,12 @@ Value listsinceblock(const Array& params, bool fHelp)
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
             "    \"blocktime\": xxx,         (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
             "    \"txid\": \"transactionid\",  (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
+            "    \"walletconflicts\" : [\n"
+            "        \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
+            "    ],\n"
+            "    \"respendsobserved\" : [\n"
+            "        \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
+            "    ],\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
             "    \"comment\": \"...\",       (string) If a comment is associated with the transaction.\n"
@@ -1448,6 +1464,12 @@ Value gettransaction(const Array& params, bool fHelp)
             "  \"blockindex\" : xx,       (numeric) The block index\n"
             "  \"blocktime\" : ttt,       (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"txid\" : \"transactionid\",   (string) The transaction id.\n"
+            "  \"walletconflicts\" : [\n"
+            "      \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
+            "  ],\n"
+            "  \"respendsobserved\" : [\n"
+            "      \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
+            "  ],\n"
             "  \"time\" : ttt,            (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"timereceived\" : ttt,    (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"details\" : [\n"
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 79cc5ba3c96e..91910c6ea96a 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -600,6 +600,14 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
                 if (IsFromMe(txConflict) || IsMine(txConflict))
                 {
                     NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT);  //Throws dialog
+                    // external respend notify
+                    std::string strCmd = GetArg("-respendnotify", "");
+                    if (!strCmd.empty())
+                    {
+                        boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
+                        boost::replace_all(strCmd, "%t", conflictHash.GetHex());
+                        boost::thread t(runCommand, strCmd); // thread runs free
+                    }
                 }
             }
         }

From 9fa53dd3bdc6f62b16a7c2b970449c8c35f4c41b Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Fri, 27 Jun 2014 07:49:27 -0700
Subject: [PATCH 0264/1819] Add release notes entry

---
 doc/release-notes.md | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 9272d427cdc9..e68e12310ea6 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -19,3 +19,49 @@ estimate.
 Statistics used to estimate fees and priorities are saved in the
 data directory in the 'fee_estimates.dat' file just before
 program shutdown, and are read in at startup.
+
+Double-Spend Relay and Alerts
+=============================
+VERY IMPORTANT: *It has never been safe, and remains unsafe, to rely*
+*on unconfirmed transactions.*
+
+Relay
+-----
+When an attempt is seen on the network to spend the same unspent funds
+more than once, it is no longer ignored.  Instead, it is broadcast, to
+serve as an alert.  This broadcast is subject to protections against
+denial-of-service attacks.
+
+Wallets and other bitcoin services should alert their users to
+double-spends that affect them.  Merchants and other users may have
+enough time to withhold goods or services when payment becomes
+uncertain, until confirmation.
+
+Bitcoin Core Wallet Alerts
+--------------------------
+The Bitcoin Core wallet now makes respend attempts visible in several
+ways.
+
+If you are online, and a respend affecting one of your wallet
+transactions is seen, a notification is immediately issued to the
+command registered with `-respendnotify=<cmd>`.  Additionally, if
+using the GUI:
+ - An alert box is immediately displayed.
+ - The affected wallet transaction is highlighted in red until it is
+   confirmed (and it may never be confirmed).
+
+A `respendsobserved` array is added to `gettransaction`, `listtransactions`,
+and `listsinceblock` RPC results.
+
+Warning
+-------
+*If you rely on an unconfirmed transaction, these change do VERY*
+*LITTLE to protect you from a malicious double-spend, because:*
+
+ - You may learn about the respend too late to avoid doing whatever
+   you were being paid for
+ - Using other relay rules, a double-spender can craft his crime to
+   resist broadcast
+ - Miners can choose which conflicting spend to confirm, and some
+   miners may not confirmg the first acceptable spend they see
+

From 7a19efe04069d9a1e251cdc94b25184f76d9d901 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Fri, 27 Jun 2014 16:47:33 -0700
Subject: [PATCH 0265/1819] Formatting, spelling, comment fixes.

---
 doc/release-notes.md             |  2 +-
 src/main.cpp                     |  6 ++----
 src/qt/transactionrecord.h       | 13 ++++++++++---
 src/qt/transactiontablemodel.cpp |  4 ++--
 src/qt/walletmodel.cpp           | 14 +++++++-------
 src/wallet.cpp                   |  2 +-
 6 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index e68e12310ea6..3a4079e437e8 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -63,5 +63,5 @@ Warning
  - Using other relay rules, a double-spender can craft his crime to
    resist broadcast
  - Miners can choose which conflicting spend to confirm, and some
-   miners may not confirmg the first acceptable spend they see
+   miners may not confirm the first acceptable spend they see
 
diff --git a/src/main.cpp b/src/main.cpp
index 48237c1b5402..df810f575ffb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -852,7 +852,6 @@ bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsig
 
     LOCK(csLimiter);
 
-    // Use an exponentially decaying ~10-minute window:
     dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
     nLastTime = nNow;
     if (dCount >= nLimit*10*1000)
@@ -973,7 +972,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
             static int64_t nLastFreeTime;
             static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
 
-        	if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
+            if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
                 return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
                                  REJECT_INSUFFICIENTFEE, "insufficient priority");
 
@@ -1000,8 +999,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
-static void
-RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
 {
     // Relaying double-spend attempts to our peers lets them detect when
     // somebody might be trying to cheat them. However, blindly relaying
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 4c2847144a2b..37679cebfaf7 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -19,10 +19,17 @@ class TransactionStatus
 {
 public:
     TransactionStatus():
-        countsForBalance(false), sortKey(""),
-        matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
+        countsForBalance(false),
+        sortKey(""),
+        matures_in(0),
+        status(Offline),
+        hasConflicting(false),
+        depth(0),
+        open_for(0),
+        cur_num_blocks(-1),
         cur_num_conflicts(-1)
-    { }
+    {
+    }
 
     enum Status {
         Confirmed,          /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index eb5c3abdbca5..d7f4c043cfee 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -538,9 +538,9 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case Qt::TextAlignmentRole:
         return column_alignments[index.column()];
     case Qt::BackgroundColorRole:
-    	if (rec->status.hasConflicting)
+        if (rec->status.hasConflicting)
             return COLOR_HASCONFLICTING_BG;
-    	break;
+        break;
     case Qt::ForegroundRole:
         if (rec->status.hasConflicting)
             return COLOR_HASCONFLICTING;
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 3d6f2ab9ba4e..defc815def6c 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -138,13 +138,13 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
-	if (status == CT_GOT_CONFLICT)
-	{
-	    emit message(tr("Conflict Received"),
-	    	         tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
-	          		CClientUIInterface::MSG_WARNING);
-		return;
-	}
+    if (status == CT_GOT_CONFLICT)
+    {
+        emit message(tr("Conflict Received"),
+                     tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
+                     CClientUIInterface::MSG_WARNING);
+        return;
+    }
 
     if(transactionTableModel)
         transactionTableModel->updateTransaction(hash, status);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 91910c6ea96a..daca7ac04b3d 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -637,7 +637,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
 
         bool fIsConflicting = IsConflicting(tx);
         if (fIsConflicting)
-        	nConflictsReceived++;
+            nConflictsReceived++;
 
         if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
         {

From 0dd5d3a00906d8a0f16d6eac62b63c9bb2da1391 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Tue, 1 Apr 2014 13:02:04 +0800
Subject: [PATCH 0266/1819] Show only one zero instead of many when getblocks
 request received with a hashStop of uint256(0)

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index d86fd3a24d35..590714b1fcf0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3652,7 +3652,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (pindex)
             pindex = chainActive.Next(pindex);
         int nLimit = 500;
-        LogPrint("net", "getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString(), nLimit);
+        LogPrint("net", "getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop==uint256(0) ? "end" : hashStop.ToString(), nLimit);
         for (; pindex; pindex = chainActive.Next(pindex))
         {
             if (pindex->GetBlockHash() == hashStop)

From 6ecf3edfee13f47a920ea6ea7b42b96d0bbbd5fd Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Fri, 27 Jun 2014 11:03:24 +0700
Subject: [PATCH 0267/1819] Display unknown commands received.

---
 src/main.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/main.cpp b/src/main.cpp
index d86fd3a24d35..3ffdd63923ec 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4041,6 +4041,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
     else
     {
         // Ignore unknown commands for extensibility
+        LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id);
     }
 
 

From 3f1ea918a87f7d4cbb6a4e7504e284365e66902e Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 28 Jun 2014 14:38:37 +0800
Subject: [PATCH 0268/1819] doc: Add historical release notes for 0.9.2

Also includes 0.9.2.1
---
 doc/release-notes/release-notes-0.9.2.1.md | 207 +++++++++++++++++++++
 doc/release-notes/release-notes-0.9.2.md   | 207 +++++++++++++++++++++
 2 files changed, 414 insertions(+)
 create mode 100644 doc/release-notes/release-notes-0.9.2.1.md
 create mode 100644 doc/release-notes/release-notes-0.9.2.md

diff --git a/doc/release-notes/release-notes-0.9.2.1.md b/doc/release-notes/release-notes-0.9.2.1.md
new file mode 100644
index 000000000000..3168ad1a5ad7
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.2.1.md
@@ -0,0 +1,207 @@
+Bitcoin Core version 0.9.2.1 is now available from:
+
+  https://bitcoin.org/bin/0.9.2.1/
+
+This is a new minor version release, bringing mostly bug fixes and some minor
+improvements. OpenSSL has been updated because of a security issue (CVE-2014-0224).
+Upgrading to this release is recommended.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+If you are upgrading from version 0.7.2 or earlier, the first time you run
+0.9.2.1 your blockchain files will be re-indexed, which will take anywhere from 
+30 minutes to several hours, depending on the speed of your machine.
+
+Downgrading warnings
+--------------------
+
+The 'chainstate' for this release is not always compatible with previous
+releases, so if you run 0.9.x and then decide to switch back to a
+0.8.x release you might get a blockchain validation error when starting the
+old release (due to 'pruned outputs' being omitted from the index of
+unspent transaction outputs).
+
+Running the old release with the -reindex option will rebuild the chainstate
+data structures and correct the problem.
+
+Also, the first time you run a 0.8.x release on a 0.9 wallet it will rescan
+the blockchain for missing spent coins, which will take a long time (tens
+of minutes on a typical machine).
+
+Important changes
+==================
+
+Gitian OSX build
+-----------------
+
+The deterministic build system that was already used for Windows and Linux
+builds is now used for OSX as well. Although the resulting executables have
+been tested quite a bit, there could be possible regressions. Be sure to report
+these on the Github bug tracker mentioned above.
+
+Compatibility of Linux build
+-----------------------------
+
+For Linux we now build against Qt 4.6, and filter the symbols for libstdc++ and glibc.
+This brings back compatibility with
+
+- Debian 6+ / Tails
+- Ubuntu 10.04
+- CentOS 6.5
+
+0.9.2 - 0.9.2.1 Release notes
+=======================
+
+The OpenSSL dependency in the gitian builds has been upgraded to 1.0.1h because of CVE-2014-0224.
+
+RPC:
+
+- Add `getwalletinfo`, `getblockchaininfo` and `getnetworkinfo` calls (will replace hodge-podge `getinfo` at some point)
+- Add a `relayfee` field to `getnetworkinfo`
+- Fix RPC related shutdown hangs and leaks
+- Always show syncnode in `getpeerinfo`
+- `sendrawtransaction`: report the reject code and reason, and make it possible to re-send transactions that are already in the mempool
+- `getmininginfo` show right genproclimit
+
+Command-line options:
+
+- Fix `-printblocktree` output
+- Show error message if ReadConfigFile fails
+
+Block-chain handling and storage:
+
+- Fix for GetBlockValue() after block 13,440,000 (BIP42)
+- Upgrade leveldb to 1.17
+
+Protocol and network code:
+
+- Per-peer block download tracking and stalled download detection
+- Add new DNS seed from bitnodes.io
+- Prevent socket leak in ThreadSocketHandler and correct some proxy related socket leaks
+- Use pnode->nLastRecv as sync score (was the wrong way around)
+
+Wallet:
+
+- Make GetAvailableCredit run GetHash() only once per transaction (performance improvement)
+- Lower paytxfee warning threshold from 0.25 BTC to 0.01 BTC
+- Fix importwallet nTimeFirstKey (trigger necessary rescans)
+- Log BerkeleyDB version at startup
+- CWallet init fix
+
+Build system:
+
+- Add OSX build descriptors to gitian
+- Fix explicit --disable-qt-dbus
+- Don't require db_cxx.h when compiling with wallet disabled and GUI enabled
+- Improve missing boost error reporting
+- Upgrade miniupnpc version to 1.9
+- gitian-linux: --enable-glibc-back-compat for binary compatibility with old distributions
+- gitian: don't export any symbols from executable
+- gitian: build against Qt 4.6
+- devtools: add script to check symbols from Linux gitian executables
+- Remove build-time no-IPv6 setting
+
+GUI:
+
+- Fix various coin control visual issues
+- Show number of in/out connections in debug console
+- Show weeks as well as years behind for long timespans behind
+- Enable and disable the Show and Remove buttons for requested payments history based on whether any entry is selected.
+- Show also value for options overridden on command line in options dialog
+- Fill in label from address book also for URIs
+- Fixes feel when resizing the last column on tables (issue #2862)
+- Fix ESC in disablewallet mode
+- Add expert section to wallet tab in optionsdialog
+- Do proper boost::path conversion (fixes unicode in datadir)
+- Only override -datadir if different from the default (fixes -datadir in config file)
+- Show rescan progress at start-up
+- Show importwallet progress
+- Get required locks upfront in polling functions (avoids hanging on locks)
+- Catch Windows shutdown events while client is running
+- Optionally add third party links to transaction context menu
+- Check for !pixmap() before trying to export QR code (avoids crashes when no QR code could be generated)
+- Fix "Start bitcoin on system login"
+
+Miscellaneous:
+
+- Replace non-threadsafe C functions (gmtime, strerror and setlocale)
+- Add missing cs_main and wallet locks
+- Avoid exception at startup when system locale not recognized
+- Changed bitrpc.py's raw_input to getpass for passwords to conceal characters during command line input
+- devtools: add a script to fetch and postprocess translations
+
+Credits
+--------
+
+Thanks to everyone who contributed to this release:
+
+- Addy Yeow
+- Altoidnerd
+- Andrea D'Amore
+- Andreas Schildbach
+- Bardi Harborow
+- Brandon Dahler
+- Bryan Bishop
+- Chris Beams
+- Christian von Roques
+- Cory Fields
+- Cozz Lovan
+- daniel
+- Daniel Newton
+- David A. Harding
+- ditto-b
+- duanemoody
+- Eric S. Bullington
+- Fabian Raetz
+- Gavin Andresen
+- Gregory Maxwell
+- gubatron
+- Haakon Nilsen
+- harry
+- Hector Jusforgues
+- Isidoro Ghezzi
+- Jeff Garzik
+- Johnathan Corgan
+- jtimon
+- Kamil Domanski
+- langerhans
+- Luke Dashjr
+- Manuel Araoz
+- Mark Friedenbach
+- Matt Corallo
+- Matthew Bogosian
+- Meeh
+- Michael Ford
+- Michagogo
+- Mikael Wikman
+- Mike Hearn
+- olalonde
+- paveljanik
+- peryaudo
+- Philip Kaufmann
+- philsong
+- Pieter Wuille
+- R E Broadley
+- richierichrawr
+- Rune K. Svendsen
+- rxl
+- shshshsh
+- Simon de la Rouviere
+- Stuart Cardall
+- super3
+- Telepatheic
+- Thomas Zander
+- Torstein Husebø
+- Warren Togami
+- Wladimir J. van der Laan
+- Yoichi Hirai
diff --git a/doc/release-notes/release-notes-0.9.2.md b/doc/release-notes/release-notes-0.9.2.md
new file mode 100644
index 000000000000..a2749e549f76
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.2.md
@@ -0,0 +1,207 @@
+Bitcoin Core version 0.9.2 is now available from:
+
+  https://bitcoin.org/bin/0.9.2/
+
+This is a new minor version release, bringing mostly bug fixes and some minor
+improvements. OpenSSL has been updated because of a security issue (CVE-2014-0224).
+Upgrading to this release is recommended.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+If you are upgrading from version 0.7.2 or earlier, the first time you run
+0.9.2 your blockchain files will be re-indexed, which will take anywhere from 
+30 minutes to several hours, depending on the speed of your machine.
+
+Downgrading warnings
+--------------------
+
+The 'chainstate' for this release is not always compatible with previous
+releases, so if you run 0.9.x and then decide to switch back to a
+0.8.x release you might get a blockchain validation error when starting the
+old release (due to 'pruned outputs' being omitted from the index of
+unspent transaction outputs).
+
+Running the old release with the -reindex option will rebuild the chainstate
+data structures and correct the problem.
+
+Also, the first time you run a 0.8.x release on a 0.9 wallet it will rescan
+the blockchain for missing spent coins, which will take a long time (tens
+of minutes on a typical machine).
+
+Important changes
+==================
+
+Gitian OSX build
+-----------------
+
+The deterministic build system that was already used for Windows and Linux
+builds is now used for OSX as well. Although the resulting executables have
+been tested quite a bit, there could be possible regressions. Be sure to report
+these on the Github bug tracker mentioned above.
+
+Compatibility of Linux build
+-----------------------------
+
+For Linux we now build against Qt 4.6, and filter the symbols for libstdc++ and glibc.
+This brings back compatibility with
+
+- Debian 6+ / Tails
+- Ubuntu 10.04
+- CentOS 6.5
+
+0.9.2 Release notes
+=======================
+
+The OpenSSL dependency in the gitian builds has been upgraded to 1.0.1h because of CVE-2014-0224.
+
+RPC:
+
+- Add `getwalletinfo`, `getblockchaininfo` and `getnetworkinfo` calls (will replace hodge-podge `getinfo` at some point)
+- Add a `relayfee` field to `getnetworkinfo`
+- Fix RPC related shutdown hangs and leaks
+- Always show syncnode in `getpeerinfo`
+- `sendrawtransaction`: report the reject code and reason, and make it possible to re-send transactions that are already in the mempool
+- `getmininginfo` show right genproclimit
+
+Command-line options:
+
+- Fix `-printblocktree` output
+- Show error message if ReadConfigFile fails
+
+Block-chain handling and storage:
+
+- Fix for GetBlockValue() after block 13,440,000 (BIP42)
+- Upgrade leveldb to 1.17
+
+Protocol and network code:
+
+- Per-peer block download tracking and stalled download detection
+- Add new DNS seed from bitnodes.io
+- Prevent socket leak in ThreadSocketHandler and correct some proxy related socket leaks
+- Use pnode->nLastRecv as sync score (was the wrong way around)
+
+Wallet:
+
+- Make GetAvailableCredit run GetHash() only once per transaction (performance improvement)
+- Lower paytxfee warning threshold from 0.25 BTC to 0.01 BTC
+- Fix importwallet nTimeFirstKey (trigger necessary rescans)
+- Log BerkeleyDB version at startup
+- CWallet init fix
+
+Build system:
+
+- Add OSX build descriptors to gitian
+- Fix explicit --disable-qt-dbus
+- Don't require db_cxx.h when compiling with wallet disabled and GUI enabled
+- Improve missing boost error reporting
+- Upgrade miniupnpc version to 1.9
+- gitian-linux: --enable-glibc-back-compat for binary compatibility with old distributions
+- gitian: don't export any symbols from executable
+- gitian: build against Qt 4.6
+- devtools: add script to check symbols from Linux gitian executables
+- Remove build-time no-IPv6 setting
+
+GUI:
+
+- Fix various coin control visual issues
+- Show number of in/out connections in debug console
+- Show weeks as well as years behind for long timespans behind
+- Enable and disable the Show and Remove buttons for requested payments history based on whether any entry is selected.
+- Show also value for options overridden on command line in options dialog
+- Fill in label from address book also for URIs
+- Fixes feel when resizing the last column on tables (issue #2862)
+- Fix ESC in disablewallet mode
+- Add expert section to wallet tab in optionsdialog
+- Do proper boost::path conversion (fixes unicode in datadir)
+- Only override -datadir if different from the default (fixes -datadir in config file)
+- Show rescan progress at start-up
+- Show importwallet progress
+- Get required locks upfront in polling functions (avoids hanging on locks)
+- Catch Windows shutdown events while client is running
+- Optionally add third party links to transaction context menu
+- Check for !pixmap() before trying to export QR code (avoids crashes when no QR code could be generated)
+- Fix "Start bitcoin on system login"
+
+Miscellaneous:
+
+- Replace non-threadsafe C functions (gmtime, strerror and setlocale)
+- Add missing cs_main and wallet locks
+- Avoid exception at startup when system locale not recognized
+- Changed bitrpc.py's raw_input to getpass for passwords to conceal characters during command line input
+- devtools: add a script to fetch and postprocess translations
+
+Credits
+--------
+
+Thanks to everyone who contributed to this release:
+
+- Addy Yeow
+- Altoidnerd
+- Andrea D'Amore
+- Andreas Schildbach
+- Bardi Harborow
+- Brandon Dahler
+- Bryan Bishop
+- Chris Beams
+- Christian von Roques
+- Cory Fields
+- Cozz Lovan
+- daniel
+- Daniel Newton
+- David A. Harding
+- ditto-b
+- duanemoody
+- Eric S. Bullington
+- Fabian Raetz
+- Gavin Andresen
+- Gregory Maxwell
+- gubatron
+- Haakon Nilsen
+- harry
+- Hector Jusforgues
+- Isidoro Ghezzi
+- Jeff Garzik
+- Johnathan Corgan
+- jtimon
+- Kamil Domanski
+- langerhans
+- Luke Dashjr
+- Manuel Araoz
+- Mark Friedenbach
+- Matt Corallo
+- Matthew Bogosian
+- Meeh
+- Michael Ford
+- Michagogo
+- Mikael Wikman
+- Mike Hearn
+- olalonde
+- paveljanik
+- peryaudo
+- Philip Kaufmann
+- philsong
+- Pieter Wuille
+- R E Broadley
+- richierichrawr
+- Rune K. Svendsen
+- rxl
+- shshshsh
+- Simon de la Rouviere
+- Stuart Cardall
+- super3
+- Telepatheic
+- Thomas Zander
+- Torstein Husebø
+- Warren Togami
+- Wladimir J. van der Laan
+- Yoichi Hirai

From 92ddf2c0dd59de514337381999c392f35c1cdf1b Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 28 Jun 2014 16:43:07 +0800
Subject: [PATCH 0269/1819] Update OS X build instructions

Update OpenSSL version
Homebrew is now the preferred dependancy manager
---
 doc/build-osx.md | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index 0de5c792e9a7..1e38326d8639 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -22,7 +22,7 @@ Xcode 4.3 or later, you'll need to install its command line tools. This can
 be done in `Xcode > Preferences > Downloads > Components` and generally must
 be re-done or updated every time Xcode is updated.
 
-There's an assumption that you already have `git` installed, as well. If
+There's also an assumption that you already have `git` installed. If
 not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
 (OS X 10.7+) or
 [Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
@@ -30,11 +30,8 @@ available via Homebrew or MacPorts.
 
 You will also need to install [Homebrew](http://brew.sh)
 or [MacPorts](https://www.macports.org/) in order to install library
-dependencies. It's largely a religious decision which to choose, but, as of
-December 2012, MacPorts is a little easier because you can just install the
-dependencies immediately - no other work required. If you're unsure, read
-the instructions through first in order to assess what you want to do.
-Homebrew is a little more popular among those newer to OS X.
+dependencies. It's largely a religious decision which to choose, however, Homebrew
+is now used for building release versions.
 
 The installation of the actual dependencies is covered in the Instructions
 sections below.
@@ -44,8 +41,6 @@ Instructions: MacPorts
 
 ### Install dependencies
 
-Installing the dependencies using MacPorts is very straightforward.
-
     sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake
 
 Optional: install Qt4
@@ -80,7 +75,7 @@ Note: After you have installed the dependencies, you should check that the Homeb
 
         openssl version
 
-into Terminal. You should see OpenSSL 1.0.1f 6 Jan 2014.
+into Terminal. You should see OpenSSL 1.0.1h 5 Jun 2014.
 
 If not, you can ensure that the Homebrew OpenSSL is correctly linked by running
 
@@ -103,7 +98,7 @@ PATH.
         ./configure
         make
 
-3.  It is a good idea to build and run the unit tests, too:
+3.  It is also a good idea to build and run the unit tests:
 
         make check
 
@@ -131,7 +126,7 @@ For MacPorts, that means editing your macports.conf and setting
 ... and then uninstalling and re-installing, or simply rebuilding, all ports.
 
 As of December 2012, the `boost` port does not obey `macosx_deployment_target`.
-Download `http://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
+Download `https://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
 for a fix.
 
 Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
@@ -149,13 +144,14 @@ commands:
     echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
     chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
 
-When next you run it, it will start downloading the blockchain, but it won't
+The next time you run it, it will start downloading the blockchain, but it won't
 output anything while it's doing this. This process may take several hours;
 you can monitor its process by looking at the debug.log file, like this:
 
     tail -f $HOME/Library/Application\ Support/Bitcoin/debug.log
 
 Other commands:
+-------
 
     ./bitcoind -daemon # to start the bitcoin daemon.
     ./bitcoin-cli --help  # for a list of command-line options.

From 645d497aa0010525441ce409e8e6d327a157ab39 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 27 Jun 2014 13:28:08 +0200
Subject: [PATCH 0270/1819] Replace HexBits with strprintf

---
 src/rpcblockchain.cpp |  2 +-
 src/rpcmining.cpp     |  2 +-
 src/rpcserver.cpp     | 10 ----------
 src/rpcserver.h       |  1 -
 4 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 580c6bd5bafc..a67f266a1347 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -66,7 +66,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
     result.push_back(Pair("tx", txs));
     result.push_back(Pair("time", block.GetBlockTime()));
     result.push_back(Pair("nonce", (uint64_t)block.nNonce));
-    result.push_back(Pair("bits", HexBits(block.nBits)));
+    result.push_back(Pair("bits", strprintf("%08x", block.nBits)));
     result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
     result.push_back(Pair("chainwork", blockindex->nChainWork.GetHex()));
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 98caf704eecc..db60ef359269 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -443,7 +443,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS));
     result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE));
     result.push_back(Pair("curtime", (int64_t)pblock->nTime));
-    result.push_back(Pair("bits", HexBits(pblock->nBits)));
+    result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
     result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
 
     return result;
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 54043458d5f6..6a87c8bf9998 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -97,16 +97,6 @@ Value ValueFromAmount(int64_t amount)
     return (double)amount / (double)COIN;
 }
 
-std::string HexBits(unsigned int nBits)
-{
-    union {
-        int32_t nBits;
-        char cBits[4];
-    } uBits;
-    uBits.nBits = htonl((int32_t)nBits);
-    return HexStr(BEGIN(uBits.cBits), END(uBits.cBits));
-}
-
 uint256 ParseHashV(const Value& v, string strName)
 {
     string strHex;
diff --git a/src/rpcserver.h b/src/rpcserver.h
index fcd293663ffe..01e77163c4de 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -116,7 +116,6 @@ extern int64_t nWalletUnlockTime;
 extern int64_t AmountFromValue(const json_spirit::Value& value);
 extern json_spirit::Value ValueFromAmount(int64_t amount);
 extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
-extern std::string HexBits(unsigned int nBits);
 extern std::string HelpRequiringPassphrase();
 extern std::string HelpExampleCli(std::string methodname, std::string args);
 extern std::string HelpExampleRpc(std::string methodname, std::string args);

From d618965eb8163544d97a213b1c0e3f629c59669b Mon Sep 17 00:00:00 2001
From: Drak <drak@zikula.org>
Date: Sat, 28 Jun 2014 12:41:19 +0100
Subject: [PATCH 0271/1819] Add note about PPA to build instructions

---
 doc/build-unix.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index 9d4b662d0752..0f381d56c561 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -91,7 +91,7 @@ To enable the change run
 
 	sudo apt-get update
 
-for other Ubuntu & Debian:
+for other Debian & Ubuntu (with ppa):
 
 	sudo apt-get install libdb4.8-dev libdb4.8++-dev
 

From 675bcd5892bc6f8997e999fb2c7a7e70e449063e Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 28 Jun 2014 20:57:46 +0800
Subject: [PATCH 0272/1819] Correct comment for 15-of-15 p2sh script size

The original comment forgets to account for the script push which will
need an OP_PUSHDATA2 + 2-bytes for the 513 script bytes.

props davecgh
fixes #4224
---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 590714b1fcf0..86f9a04a3dcc 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -488,7 +488,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
     // Treat non-final transactions as non-standard to prevent a specific type
     // of double-spend attack, as well as DoS attacks. (if the transaction
     // can't be mined, the attacker isn't expending resources broadcasting it)
-    // Basically we don't want to propagate transactions that can't included in
+    // Basically we don't want to propagate transactions that can't be included in
     // the next block.
     //
     // However, IsFinalTx() is confusing... Without arguments, it uses
@@ -521,7 +521,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
     {
         // Biggest 'standard' txin is a 15-of-15 P2SH multisig with compressed
         // keys. (remember the 520 byte limit on redeemScript size) That works
-        // out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)=1624
+        // out to a (15*(33+1))+3=513 byte redeemScript, 513+1+15*(73+1)+3=1627
         // bytes of scriptSig, which we round off to 1650 bytes for some minor
         // future-proofing. That's also enough to spend a 20-of-20
         // CHECKMULTISIG scriptPubKey, though such a scriptPubKey is not

From de79aaa7a9ad07664461ee8735299aa68c630969 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 28 Jun 2014 17:35:22 +0200
Subject: [PATCH 0273/1819] Move non-trivial uint256.h methods to uint256.cpp

---
 src/Makefile.am |   1 +
 src/uint256.cpp | 292 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/uint256.h   | 262 +++----------------------------------------
 src/util.cpp    |   5 +
 src/util.h      |   1 +
 5 files changed, 316 insertions(+), 245 deletions(-)
 create mode 100644 src/uint256.cpp

diff --git a/src/Makefile.am b/src/Makefile.am
index 3643e60201dc..9c7b294d3544 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -192,6 +192,7 @@ libbitcoin_util_a_SOURCES = \
   chainparamsbase.cpp \
   rpcprotocol.cpp \
   sync.cpp \
+  uint256.cpp \
   util.cpp \
   version.cpp \
   compat/glibc_sanity.cpp \
diff --git a/src/uint256.cpp b/src/uint256.cpp
new file mode 100644
index 000000000000..3392f1e9bcc0
--- /dev/null
+++ b/src/uint256.cpp
@@ -0,0 +1,292 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "uint256.h"
+#include "util.h"
+
+#include <stdio.h>
+#include <string.h>
+
+template<unsigned int BITS>
+base_uint<BITS>::base_uint(const std::string& str)
+{
+    SetHex(str);
+}
+
+template<unsigned int BITS>
+base_uint<BITS>::base_uint(const std::vector<unsigned char>& vch)
+{
+    if (vch.size() != sizeof(pn))
+        throw uint_error("Converting vector of wrong size to base_uint");
+    memcpy(pn, &vch[0], sizeof(pn));
+}
+
+template<unsigned int BITS>
+base_uint<BITS>& base_uint<BITS>::operator<<=(unsigned int shift)
+{
+    base_uint<BITS> a(*this);
+    for (int i = 0; i < WIDTH; i++)
+        pn[i] = 0;
+    int k = shift / 32;
+    shift = shift % 32;
+    for (int i = 0; i < WIDTH; i++) {
+        if (i+k+1 < WIDTH && shift != 0)
+            pn[i+k+1] |= (a.pn[i] >> (32-shift));
+        if (i+k < WIDTH)
+            pn[i+k] |= (a.pn[i] << shift);
+    }
+    return *this;
+}
+
+template<unsigned int BITS>
+base_uint<BITS>& base_uint<BITS>::operator>>=(unsigned int shift)
+{
+    base_uint<BITS> a(*this);
+    for (int i = 0; i < WIDTH; i++)
+        pn[i] = 0;
+    int k = shift / 32;
+    shift = shift % 32;
+    for (int i = 0; i < WIDTH; i++) {
+        if (i-k-1 >= 0 && shift != 0)
+            pn[i-k-1] |= (a.pn[i] << (32-shift));
+        if (i-k >= 0)
+            pn[i-k] |= (a.pn[i] >> shift);
+    }
+    return *this;
+}
+
+template<unsigned int BITS>
+base_uint<BITS>& base_uint<BITS>::operator*=(uint32_t b32)
+{
+    uint64_t carry = 0;
+    for (int i = 0; i < WIDTH; i++) {
+        uint64_t n = carry + (uint64_t)b32 * pn[i];
+        pn[i] = n & 0xffffffff;
+        carry = n >> 32;
+    }
+    return *this;
+}
+
+template<unsigned int BITS>
+base_uint<BITS>& base_uint<BITS>::operator*=(const base_uint& b)
+{
+    base_uint<BITS> a = *this;
+    *this = 0;
+    for (int j = 0; j < WIDTH; j++) {
+        uint64_t carry = 0;
+        for (int i = 0; i + j < WIDTH; i++) {
+            uint64_t n = carry + pn[i + j] + (uint64_t)a.pn[j] * b.pn[i];
+            pn[i + j] = n & 0xffffffff;
+            carry = n >> 32;
+        }
+    }
+    return *this;
+}
+
+template<unsigned int BITS>
+base_uint<BITS>& base_uint<BITS>::operator/=(const base_uint& b)
+{
+    base_uint<BITS> div = b; // make a copy, so we can shift.
+    base_uint<BITS> num = *this; // make a copy, so we can subtract.
+    *this = 0; // the quotient.
+    int num_bits = num.bits();
+    int div_bits = div.bits();
+    if (div_bits == 0)
+        throw uint_error("Division by zero");
+    if (div_bits > num_bits) // the result is certainly 0.
+        return *this;
+    int shift = num_bits - div_bits;
+    div <<= shift; // shift so that div and nun align.
+    while (shift >= 0) {
+        if (num >= div) {
+            num -= div;
+            pn[shift / 32] |= (1 << (shift & 31)); // set a bit of the result.
+        }
+        div >>= 1; // shift back.
+        shift--;
+    }
+    // num now contains the remainder of the division.
+    return *this;
+}
+
+template<unsigned int BITS>
+int base_uint<BITS>::CompareTo(const base_uint<BITS>& b) const {
+    for (int i = WIDTH-1; i >= 0; i--) {
+        if (pn[i] < b.pn[i])
+            return -1;
+        if (pn[i] > b.pn[i])
+            return 1;
+    }
+    return 0;
+}
+
+template<unsigned int BITS>
+bool base_uint<BITS>::EqualTo(uint64_t b) const {
+    for (int i = WIDTH-1; i >= 2; i--) {
+        if (pn[i])
+            return false;
+    }
+    if (pn[1] != (b >> 32))
+        return false;
+    if (pn[0] != (b & 0xfffffffful))
+        return false;
+    return true;
+}
+
+template<unsigned int BITS>
+double base_uint<BITS>::getdouble() const
+{
+    double ret = 0.0;
+    double fact = 1.0;
+    for (int i = 0; i < WIDTH; i++) {
+        ret += fact * pn[i];
+        fact *= 4294967296.0;
+    }
+    return ret;
+}
+
+template<unsigned int BITS>
+std::string base_uint<BITS>::GetHex() const
+{
+    char psz[sizeof(pn)*2 + 1];
+    for (unsigned int i = 0; i < sizeof(pn); i++)
+        sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
+    return std::string(psz, psz + sizeof(pn)*2);
+}
+
+template<unsigned int BITS>
+void base_uint<BITS>::SetHex(const char* psz)
+{
+    memset(pn,0,sizeof(pn));
+
+    // skip leading spaces
+    while (isspace(*psz))
+        psz++;
+
+    // skip 0x
+    if (psz[0] == '0' && tolower(psz[1]) == 'x')
+        psz += 2;
+
+    // hex string to uint
+    const char* pbegin = psz;
+    while (::HexDigit(*psz) != -1)
+        psz++;
+    psz--;
+    unsigned char* p1 = (unsigned char*)pn;
+    unsigned char* pend = p1 + WIDTH * 4;
+    while (psz >= pbegin && p1 < pend) {
+        *p1 = ::HexDigit(*psz--);
+        if (psz >= pbegin) {
+            *p1 |= ((unsigned char)::HexDigit(*psz--) << 4);
+            p1++;
+        }
+    }
+}
+
+template<unsigned int BITS>
+void base_uint<BITS>::SetHex(const std::string& str)
+{
+    SetHex(str.c_str());
+}
+
+template<unsigned int BITS>
+std::string base_uint<BITS>::ToString() const
+{
+    return (GetHex());
+}
+
+template<unsigned int BITS>
+unsigned int base_uint<BITS>::bits() const
+{
+    for (int pos = WIDTH-1; pos >= 0; pos--) {
+        if (pn[pos]) {
+            for (int bits = 31; bits > 0; bits--) {
+                if (pn[pos] & 1<<bits)
+                    return 32*pos + bits + 1;
+            }
+            return 32*pos + 1;
+        }
+    }
+    return 0;
+}
+
+// Explicit instantiations for base_uint<160>
+template base_uint<160>::base_uint(const std::string&);
+template base_uint<160>::base_uint(const std::vector<unsigned char>&);
+template base_uint<160>& base_uint<160>::operator<<=(unsigned int);
+template base_uint<160>& base_uint<160>::operator>>=(unsigned int);
+template base_uint<160>& base_uint<160>::operator*=(uint32_t b32);
+template base_uint<160>& base_uint<160>::operator*=(const base_uint<160>& b);
+template base_uint<160>& base_uint<160>::operator/=(const base_uint<160>& b);
+template int base_uint<160>::CompareTo(const base_uint<160>&) const;
+template bool base_uint<160>::EqualTo(uint64_t) const;
+template double base_uint<160>::getdouble() const;
+template std::string base_uint<160>::GetHex() const;
+template std::string base_uint<160>::ToString() const;
+template void base_uint<160>::SetHex(const char*);
+template void base_uint<160>::SetHex(const std::string&);
+template unsigned int base_uint<160>::bits() const;
+
+// Explicit instantiations for base_uint<256>
+template base_uint<256>::base_uint(const std::string&);
+template base_uint<256>::base_uint(const std::vector<unsigned char>&);
+template base_uint<256>& base_uint<256>::operator<<=(unsigned int);
+template base_uint<256>& base_uint<256>::operator>>=(unsigned int);
+template base_uint<256>& base_uint<256>::operator*=(uint32_t b32);
+template base_uint<256>& base_uint<256>::operator*=(const base_uint<256>& b);
+template base_uint<256>& base_uint<256>::operator/=(const base_uint<256>& b);
+template int base_uint<256>::CompareTo(const base_uint<256>&) const;
+template bool base_uint<256>::EqualTo(uint64_t) const;
+template double base_uint<256>::getdouble() const;
+template std::string base_uint<256>::GetHex() const;
+template std::string base_uint<256>::ToString() const;
+template void base_uint<256>::SetHex(const char*);
+template void base_uint<256>::SetHex(const std::string&);
+template unsigned int base_uint<256>::bits() const;
+
+// This implementation directly uses shifts instead of going
+// through an intermediate MPI representation.
+uint256& uint256::SetCompact(uint32_t nCompact, bool *pfNegative, bool *pfOverflow)
+{
+    int nSize = nCompact >> 24;
+    uint32_t nWord = nCompact & 0x007fffff;
+    if (nSize <= 3) {
+        nWord >>= 8*(3-nSize);
+        *this = nWord;
+    } else {
+        *this = nWord;
+        *this <<= 8*(nSize-3);
+    }
+    if (pfNegative)
+        *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
+    if (pfOverflow)
+        *pfOverflow = nWord != 0 && ((nSize > 34) ||
+                                     (nWord > 0xff && nSize > 33) ||
+                                     (nWord > 0xffff && nSize > 32));
+    return *this;
+}
+
+uint32_t uint256::GetCompact(bool fNegative) const
+{
+    int nSize = (bits() + 7) / 8;
+    uint32_t nCompact = 0;
+    if (nSize <= 3) {
+        nCompact = GetLow64() << 8*(3-nSize);
+    } else {
+        uint256 bn = *this >> 8*(nSize-3);
+        nCompact = bn.GetLow64();
+    }
+    // The 0x00800000 bit denotes the sign.
+    // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.
+    if (nCompact & 0x00800000) {
+        nCompact >>= 8;
+        nSize++;
+    }
+    assert((nCompact & ~0x007fffff) == 0);
+    assert(nSize < 256);
+    nCompact |= nSize << 24;
+    nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0);
+    return nCompact;
+}
diff --git a/src/uint256.h b/src/uint256.h
index 1acedd14bf68..82db7758c936 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -9,18 +9,9 @@
 #include <assert.h>
 #include <stdexcept>
 #include <stdint.h>
-#include <stdio.h>
 #include <string>
-#include <string.h>
 #include <vector>
 
-extern const signed char p_util_hexdigit[256]; // defined in util.cpp
-
-inline signed char HexDigit(char c)
-{
-    return p_util_hexdigit[(unsigned char)c];
-}
-
 class uint_error : public std::runtime_error {
 public:
     explicit uint_error(const std::string& str) : std::runtime_error(str) {}
@@ -62,17 +53,8 @@ class base_uint
             pn[i] = 0;
     }
 
-    explicit base_uint(const std::string& str)
-    {
-        SetHex(str);
-    }
-
-    explicit base_uint(const std::vector<unsigned char>& vch)
-    {
-        if (vch.size() != sizeof(pn))
-            throw uint_error("Converting vector of wrong size to base_uint");
-        memcpy(pn, &vch[0], sizeof(pn));
-    }
+    explicit base_uint(const std::string& str);
+    explicit base_uint(const std::vector<unsigned char>& vch);
 
     bool operator!() const
     {
@@ -99,16 +81,7 @@ class base_uint
         return ret;
     }
 
-    double getdouble() const
-    {
-        double ret = 0.0;
-        double fact = 1.0;
-        for (int i = 0; i < WIDTH; i++) {
-            ret += fact * pn[i];
-            fact *= 4294967296.0;
-        }
-        return ret;
-    }
+    double getdouble() const;
 
     base_uint& operator=(uint64_t b)
     {
@@ -154,39 +127,8 @@ class base_uint
         return *this;
     }
 
-    base_uint& operator<<=(unsigned int shift)
-    {
-        base_uint a(*this);
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = 0;
-        int k = shift / 32;
-        shift = shift % 32;
-        for (int i = 0; i < WIDTH; i++)
-        {
-            if (i+k+1 < WIDTH && shift != 0)
-                pn[i+k+1] |= (a.pn[i] >> (32-shift));
-            if (i+k < WIDTH)
-                pn[i+k] |= (a.pn[i] << shift);
-        }
-        return *this;
-    }
-
-    base_uint& operator>>=(unsigned int shift)
-    {
-        base_uint a(*this);
-        for (int i = 0; i < WIDTH; i++)
-            pn[i] = 0;
-        int k = shift / 32;
-        shift = shift % 32;
-        for (int i = 0; i < WIDTH; i++)
-        {
-            if (i-k-1 >= 0 && shift != 0)
-                pn[i-k-1] |= (a.pn[i] << (32-shift));
-            if (i-k >= 0)
-                pn[i-k] |= (a.pn[i] >> shift);
-        }
-        return *this;
-    }
+    base_uint& operator<<=(unsigned int shift);
+    base_uint& operator>>=(unsigned int shift);
 
     base_uint& operator+=(const base_uint& b)
     {
@@ -222,57 +164,9 @@ class base_uint
         return *this;
     }
 
-    base_uint& operator*=(uint32_t b32)
-    {
-        uint64_t carry = 0;
-        for (int i = 0; i < WIDTH; i++)
-        {
-            uint64_t n = carry + (uint64_t)b32 * pn[i];
-            pn[i] = n & 0xffffffff;
-            carry = n >> 32;
-        }
-        return *this;
-    }
-
-    base_uint& operator*=(const base_uint& b)
-    {
-        base_uint a = *this;
-        *this = 0;
-        for (int j = 0; j < WIDTH; j++) {
-            uint64_t carry = 0;
-            for (int i = 0; i + j < WIDTH; i++) {
-                uint64_t n = carry + pn[i + j] + (uint64_t)a.pn[j] * b.pn[i];
-                pn[i + j] = n & 0xffffffff;
-                carry = n >> 32;
-            }
-        }
-        return *this;
-    }
-
-    base_uint& operator/=(const base_uint& b)
-    {
-        base_uint div = b; // make a copy, so we can shift.
-        base_uint num = *this; // make a copy, so we can subtract.
-        *this = 0; // the quotient.
-        int num_bits = num.bits();
-        int div_bits = div.bits();
-        if (div_bits == 0)
-            throw uint_error("Division by zero");
-        if (div_bits > num_bits) // the result is certainly 0.
-            return *this;
-        int shift = num_bits - div_bits;
-        div <<= shift; // shift so that div and nun align.
-        while (shift >= 0) {
-            if (num >= div) {
-                num -= div;
-                pn[shift / 32] |= (1 << (shift & 31)); // set a bit of the result.
-            }
-            div >>= 1; // shift back.
-            shift--;
-        }
-        // num now contains the remainder of the division.
-        return *this;
-    }
+    base_uint& operator*=(uint32_t b32);
+    base_uint& operator*=(const base_uint& b);
+    base_uint& operator/=(const base_uint& b);
 
     base_uint& operator++()
     {
@@ -308,27 +202,8 @@ class base_uint
         return ret;
     }
 
-    int CompareTo(const base_uint& b) const {
-        for (int i = base_uint::WIDTH-1; i >= 0; i--) {
-            if (pn[i] < b.pn[i])
-                return -1;
-            if (pn[i] > b.pn[i])
-                return 1;
-        }
-        return 0;
-    }
-
-    bool EqualTo(uint64_t b) const {
-        for (int i = base_uint::WIDTH-1; i >= 2; i--) {
-            if (pn[i])
-                return false;
-        }
-        if (pn[1] != (b >> 32))
-            return false;
-        if (pn[0] != (b & 0xfffffffful))
-            return false;
-        return true;
-    }
+    int CompareTo(const base_uint& b) const;
+    bool EqualTo(uint64_t b) const;
 
     friend inline const base_uint operator+(const base_uint& a, const base_uint& b) { return base_uint(a) += b; }
     friend inline const base_uint operator-(const base_uint& a, const base_uint& b) { return base_uint(a) -= b; }
@@ -349,53 +224,10 @@ class base_uint
     friend inline bool operator==(const base_uint& a, uint64_t b) { return a.EqualTo(b); }
     friend inline bool operator!=(const base_uint& a, uint64_t b) { return !a.EqualTo(b); }
 
-    std::string GetHex() const
-    {
-        char psz[sizeof(pn)*2 + 1];
-        for (unsigned int i = 0; i < sizeof(pn); i++)
-            sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
-        return std::string(psz, psz + sizeof(pn)*2);
-    }
-
-    void SetHex(const char* psz)
-    {
-        memset(pn,0,sizeof(pn));
-
-        // skip leading spaces
-        while (isspace(*psz))
-            psz++;
-
-        // skip 0x
-        if (psz[0] == '0' && tolower(psz[1]) == 'x')
-            psz += 2;
-
-        // hex string to uint
-        const char* pbegin = psz;
-        while (::HexDigit(*psz) != -1)
-            psz++;
-        psz--;
-        unsigned char* p1 = (unsigned char*)pn;
-        unsigned char* pend = p1 + WIDTH * 4;
-        while (psz >= pbegin && p1 < pend)
-        {
-            *p1 = ::HexDigit(*psz--);
-            if (psz >= pbegin)
-            {
-                *p1 |= ((unsigned char)::HexDigit(*psz--) << 4);
-                p1++;
-            }
-        }
-    }
-
-    void SetHex(const std::string& str)
-    {
-        SetHex(str.c_str());
-    }
-
-    std::string ToString() const
-    {
-        return (GetHex());
-    }
+    std::string GetHex() const;
+    void SetHex(const char* psz);
+    void SetHex(const std::string& str);
+    std::string ToString() const;
 
     unsigned char* begin()
     {
@@ -424,19 +256,7 @@ class base_uint
 
     // Returns the position of the highest bit set plus one, or zero if the
     // value is zero.
-    unsigned int bits() const
-    {
-        for (int pos = WIDTH-1; pos >= 0; pos--) {
-            if (pn[pos]) {
-                for (int bits = 31; bits > 0; bits--) {
-                    if (pn[pos] & 1<<bits)
-                        return 32*pos + bits + 1;
-                }
-                return 32*pos + 1;
-            }
-        }
-        return 0;
-    }
+    unsigned int bits() const;
 
     uint64_t GetLow64() const
     {
@@ -500,56 +320,8 @@ class uint256 : public base_uint<256> {
     // targets, which are unsigned 256bit quantities.  Thus, all the
     // complexities of the sign bit and using base 256 are probably an
     // implementation accident.
-    //
-    // This implementation directly uses shifts instead of going
-    // through an intermediate MPI representation.
-    uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL)
-    {
-        int nSize = nCompact >> 24;
-        uint32_t nWord = nCompact & 0x007fffff;
-        if (nSize <= 3)
-        {
-            nWord >>= 8*(3-nSize);
-            *this = nWord;
-        }
-        else
-        {
-            *this = nWord;
-            *this <<= 8*(nSize-3);
-        }
-        if (pfNegative)
-            *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
-        if (pfOverflow)
-            *pfOverflow = nWord != 0 && ((nSize > 34) ||
-                                         (nWord > 0xff && nSize > 33) ||
-                                         (nWord > 0xffff && nSize > 32));
-        return *this;
-    }
-
-    uint32_t GetCompact(bool fNegative = false) const
-    {
-        int nSize = (bits() + 7) / 8;
-        uint32_t nCompact = 0;
-        if (nSize <= 3)
-            nCompact = GetLow64() << 8*(3-nSize);
-        else
-        {
-            uint256 bn = *this >> 8*(nSize-3);
-            nCompact = bn.GetLow64();
-        }
-        // The 0x00800000 bit denotes the sign.
-        // Thus, if it is already set, divide the mantissa by 256 and increase the exponent.
-        if (nCompact & 0x00800000)
-        {
-            nCompact >>= 8;
-            nSize++;
-        }
-        assert((nCompact & ~0x007fffff) == 0);
-        assert(nSize < 256);
-        nCompact |= nSize << 24;
-        nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0);
-        return nCompact;
-    }
+    uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL);
+    uint32_t GetCompact(bool fNegative = false) const;
 };
 
 #endif
diff --git a/src/util.cpp b/src/util.cpp
index 9e4b2b787eef..e67c0dfd8ac2 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -419,6 +419,11 @@ const signed char p_util_hexdigit[256] =
   -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
   -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, };
 
+signed char HexDigit(char c)
+{
+    return p_util_hexdigit[(unsigned char)c];
+}
+
 bool IsHex(const string& str)
 {
     BOOST_FOREACH(char c, str)
diff --git a/src/util.h b/src/util.h
index 6057c72e6691..707b8f2d7604 100644
--- a/src/util.h
+++ b/src/util.h
@@ -156,6 +156,7 @@ bool ParseMoney(const char* pszIn, int64_t& nRet);
 std::string SanitizeString(const std::string& str);
 std::vector<unsigned char> ParseHex(const char* psz);
 std::vector<unsigned char> ParseHex(const std::string& str);
+signed char HexDigit(char c);
 bool IsHex(const std::string& str);
 std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL);
 std::string DecodeBase64(const std::string& str);

From 16f33f163d4e2c10320a96a22bbab71c9a0df195 Mon Sep 17 00:00:00 2001
From: kazcw <keziahw@gmail.com>
Date: Sat, 28 Jun 2014 18:14:36 -0700
Subject: [PATCH 0274/1819] fix RPC error replies

After pull #4288, RPC messages indicating errors have a Content-Length unrelated
to their actual contents, rendering bitcoin-cli and curl unable to decode the
reply.

This patch sets the Content-Length field based on the actual content returned.

Additionally, pull #4288 clobbered the error descriptions provided in
ErrorReply, which bitcoin-cli relies upon; this patch moves #4288 http-error
descriptions to an HTTPError method, allowing HTTPReply to pass content on
unchanged.
---
 src/rpcprotocol.cpp | 42 +++++++++++++++++++++++-------------------
 src/rpcprotocol.h   |  2 ++
 src/rpcserver.cpp   |  8 ++++----
 3 files changed, 29 insertions(+), 23 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 2cb4a35c4b3d..dd8692e802b5 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -54,8 +54,19 @@ static string rfc1123Time()
     return DateTimeStrFormat("%a, %d %b %Y %H:%M:%S +0000", GetTime());
 }
 
-string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
-                 bool headersOnly, const char *contentType)
+static const char *httpStatusDescription(int nStatus)
+{
+    switch (nStatus) {
+        case HTTP_OK: return "OK";
+        case HTTP_BAD_REQUEST: return "Bad Request";
+        case HTTP_FORBIDDEN: return "Forbidden";
+        case HTTP_NOT_FOUND: return "Not Found";
+        case HTTP_INTERNAL_SERVER_ERROR: return "Internal Server Error";
+        default: return "";
+    }
+}
+
+string HTTPError(int nStatus, bool keepalive, bool headersOnly)
 {
     if (nStatus == HTTP_UNAUTHORIZED)
         return strprintf("HTTP/1.0 401 Authorization Required\r\n"
@@ -75,20 +86,13 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
             "<BODY><H1>401 Unauthorized.</H1></BODY>\r\n"
             "</HTML>\r\n", rfc1123Time(), FormatFullVersion());
 
-    const char *cStatus;
-         if (nStatus == HTTP_OK) cStatus = "OK";
-    else if (nStatus == HTTP_BAD_REQUEST) cStatus = "Bad Request";
-    else if (nStatus == HTTP_FORBIDDEN) cStatus = "Forbidden";
-    else if (nStatus == HTTP_NOT_FOUND) cStatus = "Not Found";
-    else if (nStatus == HTTP_INTERNAL_SERVER_ERROR) cStatus = "Internal Server Error";
-    else cStatus = "";
-
-    bool useInternalContent = false;
-    if (nStatus != HTTP_OK) {
-        contentType = "text/plain";
-        useInternalContent = true;
-    }
+    return HTTPReply(nStatus, httpStatusDescription(nStatus), keepalive,
+                     headersOnly, "text/plain");
+}
 
+string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
+                 bool headersOnly, const char *contentType)
+{
     return strprintf(
             "HTTP/1.1 %d %s\r\n"
             "Date: %s\r\n"
@@ -99,14 +103,14 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
             "\r\n"
             "%s",
         nStatus,
-        cStatus,
+        httpStatusDescription(nStatus),
         rfc1123Time(),
         keepalive ? "keep-alive" : "close",
-        strMsg.size(),
+        (headersOnly ? 0 : strMsg.size()),
         contentType,
         FormatFullVersion(),
-        (headersOnly ? "" :
-            (useInternalContent ? cStatus : strMsg.c_str())));
+        (headersOnly ? "" : strMsg.c_str())
+        );
 }
 
 bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index f1317e9c2811..5627077bfbf4 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -141,6 +141,8 @@ class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidi
 };
 
 std::string HTTPPost(const std::string& strMsg, const std::map<std::string,std::string>& mapRequestHeaders);
+std::string HTTPError(int nStatus, bool keepalive,
+                      bool headerOnly = false);
 std::string HTTPReply(int nStatus, const std::string& strMsg, bool keepalive,
                       bool headerOnly = false,
                       const char *contentType = "application/json");
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 6a87c8bf9998..f47b3385da6e 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -481,7 +481,7 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol,
     {
         // Only send a 403 if we're not using SSL to prevent a DoS during the SSL handshake.
         if (!fUseSSL)
-            conn->stream() << HTTPReply(HTTP_FORBIDDEN, "", false) << std::flush;
+            conn->stream() << HTTPError(HTTP_FORBIDDEN, false) << std::flush;
         conn->close();
     }
     else {
@@ -807,7 +807,7 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
     // Check authorization
     if (mapHeaders.count("authorization") == 0)
     {
-        conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
+        conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush;
         return false;
     }
 
@@ -820,7 +820,7 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
         if (mapArgs["-rpcpassword"].size() < 20)
             MilliSleep(250);
 
-        conn->stream() << HTTPReply(HTTP_UNAUTHORIZED, "", false) << std::flush;
+        conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush;
         return false;
     }
 
@@ -888,7 +888,7 @@ void ServiceConnection(AcceptedConnection *conn)
             if (!HTTPReq_JSONRPC(conn, strRequest, mapHeaders, fRun))
                 break;
         } else {
-            conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
+            conn->stream() << HTTPError(HTTP_NOT_FOUND, false) << std::flush;
             break;
         }
     }

From ffebc1be43751050c0b35d7140ba127783708d13 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 29 Jun 2014 13:20:19 +0800
Subject: [PATCH 0275/1819] Update verify.sh script to point to bitcoin.org

Now that downloads are no longer hosted on Sourceforge, update the
script to retrieve the binaries and signature file from bitcoin.org.
---
 contrib/verifysfbinaries/README.md | 2 +-
 contrib/verifysfbinaries/verify.sh | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/verifysfbinaries/README.md b/contrib/verifysfbinaries/README.md
index f646d1efd1b3..8c038865bdaf 100644
--- a/contrib/verifysfbinaries/README.md
+++ b/contrib/verifysfbinaries/README.md
@@ -1,5 +1,5 @@
 ### Verify SF Binaries ###
-This script attempts to download the signature file `SHA256SUMS.asc` from SourceForge.
+This script attempts to download the signature file `SHA256SUMS.asc` from https://bitcoin.org.
 
 It first checks if the signature passes, and then downloads the files specified in the file, and checks if the hashes of these files match those that are specified in the signature file.
 
diff --git a/contrib/verifysfbinaries/verify.sh b/contrib/verifysfbinaries/verify.sh
index e92295661cc4..3eb46938835c 100755
--- a/contrib/verifysfbinaries/verify.sh
+++ b/contrib/verifysfbinaries/verify.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-###   This script attempts to download the signature file SHA256SUMS.asc from SourceForge
+###   This script attempts to download the signature file SHA256SUMS.asc from bitcoin.org
 ###   It first checks if the signature passes, and then downloads the files specified in
 ###   the file, and checks if the hashes of these files match those that are specified
 ###   in the signature file.
@@ -18,11 +18,11 @@ WORKINGDIR="/tmp/bitcoin"
 TMPFILE="hashes.tmp"
 
 #this URL is used if a version number is not specified as an argument to the script
-SIGNATUREFILE="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/bitcoin-0.9.0rc1/SHA256SUMS.asc"
+SIGNATUREFILE="https://bitcoin.org/bin/0.9.2.1/SHA256SUMS.asc"
 
 SIGNATUREFILENAME="SHA256SUMS.asc"
 RCSUBDIR="test/"
-BASEDIR="http://downloads.sourceforge.net/project/bitcoin/Bitcoin/"
+BASEDIR="https://bitcoin.org/bin/"
 VERSIONPREFIX="bitcoin-"
 RCVERSIONSTRING="rc"
 
@@ -62,7 +62,7 @@ WGETOUT=$(wget -N "$BASEDIR$SIGNATUREFILENAME" 2>&1)
 #and then see if wget completed successfully
 if [ $? -ne 0 ]; then
    echo "Error: couldn't fetch signature file. Have you specified the version number in the following format?"
-   echo "[bitcoin-]<version>-[rc[0-9]] (example: bitcoin-0.7.1-rc1)"
+   echo "[bitcoin-]<version>-[rc[0-9]] (example: bitcoin-0.9.2-rc1)"
    echo "wget output:"
    echo "$WGETOUT"|sed 's/^/\t/g'
    exit 2

From aa815647005bc8467f467c35a9e617794446cd64 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 23 Jun 2014 00:00:26 +0200
Subject: [PATCH 0276/1819] Track peers' available blocks

---
 src/main.cpp   | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 src/main.h     |  1 +
 src/rpcnet.cpp |  1 +
 3 files changed, 48 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 336a5a9a86b3..dc6843128238 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -207,6 +207,10 @@ struct CNodeState {
     std::string name;
     // List of asynchronously-determined block rejections to notify this peer about.
     std::vector<CBlockReject> rejects;
+    // The best known block we know this peer has announced.
+    CBlockIndex *pindexBestKnownBlock;
+    // The hash of the last unknown block this peer has announced.
+    uint256 hashLastUnknownBlock;
     list<QueuedBlock> vBlocksInFlight;
     int nBlocksInFlight;
     list<uint256> vBlocksToDownload;
@@ -217,6 +221,8 @@ struct CNodeState {
     CNodeState() {
         nMisbehavior = 0;
         fShouldBan = false;
+        pindexBestKnownBlock = NULL;
+        hashLastUnknownBlock = uint256(0);
         nBlocksToDownload = 0;
         nBlocksInFlight = 0;
         nLastBlockReceive = 0;
@@ -313,6 +319,39 @@ void MarkBlockAsInFlight(NodeId nodeid, const uint256 &hash) {
     mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
 }
 
+/** Check whether the last unknown block a peer advertized is not yet known. */
+void ProcessBlockAvailability(NodeId nodeid) {
+    CNodeState *state = State(nodeid);
+    assert(state != NULL);
+
+    if (state->hashLastUnknownBlock != 0) {
+        map<uint256, CBlockIndex*>::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock);
+        if (itOld != mapBlockIndex.end() && itOld->second->nChainWork > 0) {
+            if (state->pindexBestKnownBlock == NULL || itOld->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
+                state->pindexBestKnownBlock = itOld->second;
+            state->hashLastUnknownBlock = uint256(0);
+        }
+    }
+}
+
+/** Update tracking information about which blocks a peer is assumed to have. */
+void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
+    CNodeState *state = State(nodeid);
+    assert(state != NULL);
+
+    ProcessBlockAvailability(nodeid);
+
+    map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(hash);
+    if (it != mapBlockIndex.end() && it->second->nChainWork > 0) {
+        // An actually better block was announced.
+        if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
+            state->pindexBestKnownBlock = it->second;
+    } else {
+        // An unknown block was announced; just assume that the latest one is the best one.
+        state->hashLastUnknownBlock = hash;
+    }
+}
+
 } // anon namespace
 
 bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
@@ -321,6 +360,7 @@ bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
     if (state == NULL)
         return false;
     stats.nMisbehavior = state->nMisbehavior;
+    stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1;
     return true;
 }
 
@@ -3613,6 +3653,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
                 PushGetBlocks(pfrom, chainActive.Tip(), GetOrphanRoot(inv.hash));
             }
 
+            if (inv.type == MSG_BLOCK)
+                UpdateBlockAvailability(pfrom->GetId(), inv.hash);
+
             // Track requests for our stuff
             g_signals.Inventory(inv.hash);
         }
@@ -4359,6 +4402,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             pto->fDisconnect = true;
         }
 
+        // Update knowledge of peer's block availability.
+        ProcessBlockAvailability(pto->GetId());
+
         //
         // Message: getdata (blocks)
         //
diff --git a/src/main.h b/src/main.h
index 0332db216342..9487078b7491 100644
--- a/src/main.h
+++ b/src/main.h
@@ -185,6 +185,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 
 struct CNodeStateStats {
     int nMisbehavior;
+    int nSyncHeight;
 };
 
 struct CDiskBlockPos
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index a54872ccc470..2d7abb2d5872 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -134,6 +134,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
         obj.push_back(Pair("startingheight", stats.nStartingHeight));
         if (fStateStats) {
             obj.push_back(Pair("banscore", statestats.nMisbehavior));
+            obj.push_back(Pair("syncheight", statestats.nSyncHeight));
         }
         obj.push_back(Pair("syncnode", stats.fSyncNode));
 

From c9a0918330f31dcb1d5e86b56af63c3f521d3cf2 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Wed, 25 Jun 2014 00:56:47 +0200
Subject: [PATCH 0277/1819] Add a skiplist to the CBlockIndex structure.

This allows fast (O(log n)) access to far predecessor blocks.
Use it to speed up CChain::FindFork and CChain::GetLocator.
---
 src/main.cpp | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 src/main.h   | 12 ++++++++++-
 2 files changed, 69 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index dc6843128238..41125cb57732 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -414,8 +414,11 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
             break;
         // Exponentially larger steps back, plus the genesis block.
         int nHeight = std::max(pindex->nHeight - nStep, 0);
+        // Jump back quickly to the same height as the chain.
+        if (pindex->nHeight > nHeight)
+            pindex = pindex->GetAncestor(nHeight);
         // In case pindex is not in this chain, iterate pindex->pprev to find blocks.
-        while (pindex->nHeight > nHeight && !Contains(pindex))
+        while (!Contains(pindex))
             pindex = pindex->pprev;
         // If pindex is in this chain, use direct height-based access.
         if (pindex->nHeight > nHeight)
@@ -442,6 +445,8 @@ CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const {
 }
 
 CBlockIndex *CChain::FindFork(CBlockIndex *pindex) const {
+    if (pindex->nHeight > Height())
+        pindex = pindex->GetAncestor(Height());
     while (pindex && !Contains(pindex))
         pindex = pindex->pprev;
     return pindex;
@@ -2151,6 +2156,7 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
     {
         pindexNew->pprev = (*miPrev).second;
         pindexNew->nHeight = pindexNew->pprev->nHeight + 1;
+        pindexNew->BuildSkip();
     }
     pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork();
     pindexNew->RaiseValidity(BLOCK_VALID_TREE);
@@ -2508,6 +2514,55 @@ bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, uns
     return (nFound >= nRequired);
 }
 
+/** Turn the lowest '1' bit in the binary representation of a number into a '0'. */
+int static inline InvertLowestOne(int n) { return n & (n - 1); }
+
+/** Compute what height to jump back to with the CBlockIndex::pskip pointer. */
+int static inline GetSkipHeight(int height) {
+    if (height < 2)
+        return 0;
+
+    // Determine which height to jump back to. Any number strictly lower than height is acceptable,
+    // but the following expression seems to perform well in simulations (max 110 steps to go back
+    // up to 2**18 blocks).
+    return (height & 1) ? InvertLowestOne(InvertLowestOne(height - 1)) + 1 : InvertLowestOne(height);
+}
+
+CBlockIndex* CBlockIndex::GetAncestor(int height)
+{
+    if (height > nHeight || height < 0)
+        return NULL;
+
+    CBlockIndex* pindexWalk = this;
+    int heightWalk = nHeight;
+    while (heightWalk > height) {
+        int heightSkip = GetSkipHeight(heightWalk);
+        int heightSkipPrev = GetSkipHeight(heightWalk - 1);
+        if (heightSkip == height ||
+            (heightSkip > height && !(heightSkipPrev < heightSkip - 2 &&
+                                      heightSkipPrev >= height))) {
+            // Only follow pskip if pprev->pskip isn't better than pskip->pprev.
+            pindexWalk = pindexWalk->pskip;
+            heightWalk = heightSkip;
+        } else {
+            pindexWalk = pindexWalk->pprev;
+            heightWalk--;
+        }
+    }
+    return pindexWalk;
+}
+
+const CBlockIndex* CBlockIndex::GetAncestor(int height) const
+{
+    return const_cast<CBlockIndex*>(this)->GetAncestor(height);
+}
+
+void CBlockIndex::BuildSkip()
+{
+    if (pprev)
+        pskip = pprev->GetAncestor(GetSkipHeight(nHeight));
+}
+
 void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
 {
     AssertLockHeld(cs_main);
@@ -2858,6 +2913,8 @@ bool static LoadBlockIndexDB()
             setBlockIndexValid.insert(pindex);
         if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork))
             pindexBestInvalid = pindex;
+        if (pindex->pprev)
+            pindex->BuildSkip();
     }
 
     // Load block file info
diff --git a/src/main.h b/src/main.h
index 9487078b7491..1af86b065fa2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -677,6 +677,9 @@ class CBlockIndex
     // pointer to the index of the predecessor of this block
     CBlockIndex* pprev;
 
+    // pointer to the index of some further predecessor of this block
+    CBlockIndex* pskip;
+
     // height of the entry in the chain. The genesis block has height 0
     int nHeight;
 
@@ -716,6 +719,7 @@ class CBlockIndex
     {
         phashBlock = NULL;
         pprev = NULL;
+        pskip = NULL;
         nHeight = 0;
         nFile = 0;
         nDataPos = 0;
@@ -737,6 +741,7 @@ class CBlockIndex
     {
         phashBlock = NULL;
         pprev = NULL;
+        pskip = NULL;
         nHeight = 0;
         nFile = 0;
         nDataPos = 0;
@@ -869,9 +874,14 @@ class CBlockIndex
         }
         return false;
     }
-};
 
+    // Build the skiplist pointer for this entry.
+    void BuildSkip();
 
+    // Efficiently find an ancestor of this block.
+    CBlockIndex* GetAncestor(int height);
+    const CBlockIndex* GetAncestor(int height) const;
+};
 
 /** Used to marshal pointers into hashes for db storage. */
 class CDiskBlockIndex : public CBlockIndex

From 236982c2b6de619f0744c9c17ea7208b64a4afb3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 29 Jun 2014 15:26:58 +0200
Subject: [PATCH 0278/1819] Add skiplist unit tests

---
 src/Makefile.test.include   |  1 +
 src/test/skiplist_tests.cpp | 45 +++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+)
 create mode 100644 src/test/skiplist_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 4dab1773f4a8..8685452c7b7e 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -47,6 +47,7 @@ BITCOIN_TESTS =\
   test/script_tests.cpp \
   test/serialize_tests.cpp \
   test/sigopcount_tests.cpp \
+  test/skiplist_tests.cpp \
   test/test_bitcoin.cpp \
   test/transaction_tests.cpp \
   test/uint256_tests.cpp \
diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp
new file mode 100644
index 000000000000..ea301685c917
--- /dev/null
+++ b/src/test/skiplist_tests.cpp
@@ -0,0 +1,45 @@
+// Copyright (c) 2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <boost/test/unit_test.hpp>
+#include <vector>
+#include "main.h"
+#include "util.h"
+
+
+#define SKIPLIST_LENGTH 300000
+
+BOOST_AUTO_TEST_SUITE(skiplist_tests)
+
+BOOST_AUTO_TEST_CASE(skiplist_test)
+{
+    std::vector<CBlockIndex> vIndex(SKIPLIST_LENGTH);
+
+    for (int i=0; i<SKIPLIST_LENGTH; i++) {
+        vIndex[i].nHeight = i;
+        vIndex[i].pprev = (i == 0) ? NULL : &vIndex[i - 1];
+        vIndex[i].BuildSkip();
+    }
+
+    for (int i=0; i<SKIPLIST_LENGTH; i++) {
+        if (i > 0) {
+            BOOST_CHECK(vIndex[i].pskip == &vIndex[vIndex[i].pskip->nHeight]);
+            BOOST_CHECK(vIndex[i].pskip->nHeight < i);
+        } else {
+            BOOST_CHECK(vIndex[i].pskip == NULL);
+        }
+    }
+
+    for (int i=0; i < 1000; i++) {
+        int from = insecure_rand() % (SKIPLIST_LENGTH - 1);
+        int to = insecure_rand() % (from + 1);
+
+        BOOST_CHECK(vIndex[SKIPLIST_LENGTH - 1].GetAncestor(from) == &vIndex[from]);
+        BOOST_CHECK(vIndex[from].GetAncestor(to) == &vIndex[to]);
+        BOOST_CHECK(vIndex[from].GetAncestor(0) == &vIndex[0]);
+    }
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+

From 77888d68d5b78d442a18073c663478bae35da246 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 30 Jun 2014 15:43:01 +0200
Subject: [PATCH 0279/1819] Fix the build for Qt5

Merging #3883 broke the Qt5 build, define the color in the standard
way.
---
 src/qt/guiconstants.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 44e361e1e50b..696761e234bb 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -24,7 +24,7 @@ static const int STATUSBAR_ICONSIZE = 16;
 /* Transaction list -- bare address (without label) */
 #define COLOR_BAREADDRESS QColor(140, 140, 140)
 /* Transaction list -- has conflicting transactions */
-#define COLOR_HASCONFLICTING Qt::white;
+#define COLOR_HASCONFLICTING QColor(255, 255, 255)
 /* Transaction list -- has conflicting transactions - background */
 #define COLOR_HASCONFLICTING_BG QColor(192, 0, 0)
 

From 3faf1f8294065eaabe2d6d24f2fe04ee4dfd6ae2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 30 Jun 2014 16:37:59 +0200
Subject: [PATCH 0280/1819] test: Fix warning about integer signedness in P2SH
 tests

---
 src/test/script_P2SH_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 6ae2b9cf64f8..a1dc17ba36e9 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -294,7 +294,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 
     // vout[4] is max sigops:
     CScript fifteenSigops; fifteenSigops << OP_1;
-    for (int i = 0; i < MAX_P2SH_SIGOPS; i++)
+    for (unsigned i = 0; i < MAX_P2SH_SIGOPS; i++)
         fifteenSigops << key[i%3].GetPubKey();
     fifteenSigops << OP_15 << OP_CHECKMULTISIG;
     keystore.AddCScript(fifteenSigops);

From 9a6497ed0798055d2117547e82a1569a4017d2f2 Mon Sep 17 00:00:00 2001
From: Trevin Hofmann <trevinhofmann@gmail.com>
Date: Tue, 1 Jul 2014 00:05:24 -0500
Subject: [PATCH 0281/1819] http to https, 2013 to 2014

---
 COPYING   | 2 +-
 README.md | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/COPYING b/COPYING
index c410baa6a0fc..6219bd75a649 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2013 Bitcoin Developers
+Copyright (c) 2009-2014 Bitcoin Developers
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 102aa562011b..7c2fe12f3a52 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 Bitcoin Core integration/staging tree
 =====================================
 
-http://www.bitcoin.org
+https://www.bitcoin.org
 
 Copyright (c) 2009-2014 Bitcoin Core Developers
 
@@ -15,7 +15,7 @@ out collectively by the network. Bitcoin Core is the name of open source
 software which enables the use of this currency.
 
 For more information, as well as an immediately useable, binary version of
-the Bitcoin Core software, see http://www.bitcoin.org/en/download.
+the Bitcoin Core software, see https://www.bitcoin.org/en/download.
 
 License
 -------

From 8d9cc7d743583f6cb72d224af458fa5f470b00e8 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 27 Jun 2014 14:51:46 +0200
Subject: [PATCH 0282/1819] fix copyright string in two of our *.rc files

- also make comment about rc-files in clientversion.h generic

Merges #4429.
---
 src/bitcoin-cli-res.rc       | 1 -
 src/bitcoind-res.rc          | 1 -
 src/clientversion.h          | 5 ++++-
 src/qt/res/bitcoin-qt-res.rc | 1 -
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bitcoin-cli-res.rc b/src/bitcoin-cli-res.rc
index a4a0c47ea52d..b1aa1b0e167e 100644
--- a/src/bitcoin-cli-res.rc
+++ b/src/bitcoin-cli-res.rc
@@ -5,7 +5,6 @@
 #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
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
 
 VS_VERSION_INFO VERSIONINFO
 FILEVERSION     VER_FILEVERSION
diff --git a/src/bitcoind-res.rc b/src/bitcoind-res.rc
index dc5c56b79764..2e6d75449507 100644
--- a/src/bitcoind-res.rc
+++ b/src/bitcoind-res.rc
@@ -5,7 +5,6 @@
 #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
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core developers"
 
 VS_VERSION_INFO VERSIONINFO
 FILEVERSION     VER_FILEVERSION
diff --git a/src/clientversion.h b/src/clientversion.h
index a30bbff06b11..6c718a9f7978 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -8,7 +8,7 @@
 // client versioning and copyright year
 //
 
-// These need to be macros, as version.cpp's and bitcoin-qt.rc's voodoo requires it
+// These need to be macros, as version.cpp's and bitcoin*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR       0
 #define CLIENT_VERSION_MINOR       9
 #define CLIENT_VERSION_REVISION    99
@@ -28,4 +28,7 @@
 #define STRINGIZE(X) DO_STRINGIZE(X)
 #define DO_STRINGIZE(X) #X
 
+// Copyright string used in Windows .rc files
+#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
+
 #endif // CLIENTVERSION_H
diff --git a/src/qt/res/bitcoin-qt-res.rc b/src/qt/res/bitcoin-qt-res.rc
index ee23ae9b78e7..809235be5f9c 100644
--- a/src/qt/res/bitcoin-qt-res.rc
+++ b/src/qt/res/bitcoin-qt-res.rc
@@ -8,7 +8,6 @@ IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico"
 #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
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin developers"
 
 VS_VERSION_INFO VERSIONINFO
 FILEVERSION     VER_FILEVERSION

From dd638dd712861a2fc419fe9b2b064ae303b074e6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 25 Jun 2014 13:45:29 +0200
Subject: [PATCH 0283/1819] typedef std::map<uint256, CCoins> to CCoinsMap

This makes it possible to switch to a more efficient map type
without changing all occurences manually.

Merges half of #4413.
---
 src/coins.cpp | 16 ++++++++--------
 src/coins.h   | 11 ++++++-----
 src/txdb.cpp  |  4 ++--
 src/txdb.h    |  2 +-
 4 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 86b2a6ef178b..13a4ea95cdab 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -55,7 +55,7 @@ bool CCoinsView::SetCoins(const uint256 &txid, const CCoins &coins) { return fal
 bool CCoinsView::HaveCoins(const uint256 &txid) { return false; }
 uint256 CCoinsView::GetBestBlock() { return uint256(0); }
 bool CCoinsView::SetBestBlock(const uint256 &hashBlock) { return false; }
-bool CCoinsView::BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock) { return false; }
+bool CCoinsView::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
 bool CCoinsView::GetStats(CCoinsStats &stats) { return false; }
 
 
@@ -66,7 +66,7 @@ bool CCoinsViewBacked::HaveCoins(const uint256 &txid) { return base->HaveCoins(t
 uint256 CCoinsViewBacked::GetBestBlock() { return base->GetBestBlock(); }
 bool CCoinsViewBacked::SetBestBlock(const uint256 &hashBlock) { return base->SetBestBlock(hashBlock); }
 void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
-bool CCoinsViewBacked::BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
+bool CCoinsViewBacked::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
 bool CCoinsViewBacked::GetStats(CCoinsStats &stats) { return base->GetStats(stats); }
 
 CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hashBlock(0) { }
@@ -83,20 +83,20 @@ bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) {
     return false;
 }
 
-std::map<uint256,CCoins>::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
-    std::map<uint256,CCoins>::iterator it = cacheCoins.lower_bound(txid);
+CCoinsMap::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
+    CCoinsMap::iterator it = cacheCoins.lower_bound(txid);
     if (it != cacheCoins.end() && it->first == txid)
         return it;
     CCoins tmp;
     if (!base->GetCoins(txid,tmp))
         return cacheCoins.end();
-    std::map<uint256,CCoins>::iterator ret = cacheCoins.insert(it, std::make_pair(txid, CCoins()));
+    CCoinsMap::iterator ret = cacheCoins.insert(it, std::make_pair(txid, CCoins()));
     tmp.swap(ret->second);
     return ret;
 }
 
 CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) {
-    std::map<uint256,CCoins>::iterator it = FetchCoins(txid);
+    CCoinsMap::iterator it = FetchCoins(txid);
     assert(it != cacheCoins.end());
     return it->second;
 }
@@ -121,8 +121,8 @@ bool CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
     return true;
 }
 
-bool CCoinsViewCache::BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlockIn) {
-    for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
+bool CCoinsViewCache::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
+    for (CCoinsMap::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
         cacheCoins[it->first] = it->second;
     hashBlock = hashBlockIn;
     return true;
diff --git a/src/coins.h b/src/coins.h
index 0ad28524a14d..c57a5ec722a9 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -239,6 +239,7 @@ class CCoins
     }
 };
 
+typedef std::map<uint256,CCoins> CCoinsMap;
 
 struct CCoinsStats
 {
@@ -275,7 +276,7 @@ class CCoinsView
     virtual bool SetBestBlock(const uint256 &hashBlock);
 
     // Do a bulk modification (multiple SetCoins + one SetBestBlock)
-    virtual bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock);
+    virtual bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Calculate statistics about the unspent transaction output set
     virtual bool GetStats(CCoinsStats &stats);
@@ -299,7 +300,7 @@ class CCoinsViewBacked : public CCoinsView
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
     void SetBackend(CCoinsView &viewIn);
-    bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats);
 };
 
@@ -309,7 +310,7 @@ class CCoinsViewCache : public CCoinsViewBacked
 {
 protected:
     uint256 hashBlock;
-    std::map<uint256,CCoins> cacheCoins;
+    CCoinsMap cacheCoins;
 
 public:
     CCoinsViewCache(CCoinsView &baseIn, bool fDummy = false);
@@ -320,7 +321,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     bool HaveCoins(const uint256 &txid);
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
-    bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Return a modifiable reference to a CCoins. Check HaveCoins first.
     // Many methods explicitly require a CCoinsViewCache because of this method, to reduce
@@ -352,7 +353,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     const CTxOut &GetOutputFor(const CTxIn& input);
 
 private:
-    std::map<uint256,CCoins>::iterator FetchCoins(const uint256 &txid);
+    CCoinsMap::iterator FetchCoins(const uint256 &txid);
 };
 
 #endif
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 92137f71ff19..52cd96283e2d 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -54,11 +54,11 @@ bool CCoinsViewDB::SetBestBlock(const uint256 &hashBlock) {
     return db.WriteBatch(batch);
 }
 
-bool CCoinsViewDB::BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock) {
+bool CCoinsViewDB::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) {
     LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size());
 
     CLevelDBBatch batch;
-    for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
+    for (CCoinsMap::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
         BatchWriteCoins(batch, it->first, it->second);
     if (hashBlock != uint256(0))
         BatchWriteHashBestChain(batch, hashBlock);
diff --git a/src/txdb.h b/src/txdb.h
index 7257b0dd2176..7d670c25423f 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -37,7 +37,7 @@ class CCoinsViewDB : public CCoinsView
     bool HaveCoins(const uint256 &txid);
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
-    bool BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats);
 };
 

From d95ba75825d3b417d03cd2cce6bb944d5a679040 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 1 Jul 2014 14:57:45 +0200
Subject: [PATCH 0284/1819] qt: Log messages with type>QtDebugMsg as non-debug

More important messages should end up in the log no matter
if -debug=qt is set.
---
 src/qt/bitcoin.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 89305e9f3500..569facb499be 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -126,15 +126,15 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
 #if QT_VERSION < 0x050000
 void DebugMessageHandler(QtMsgType type, const char *msg)
 {
-    Q_UNUSED(type);
-    LogPrint("qt", "GUI: %s\n", msg);
+    const char *category = (type == QtDebugMsg) ? "qt" : NULL;
+    LogPrint(category, "GUI: %s\n", msg);
 }
 #else
 void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
 {
-    Q_UNUSED(type);
     Q_UNUSED(context);
-    LogPrint("qt", "GUI: %s\n", qPrintable(msg));
+    const char *category = (type == QtDebugMsg) ? "qt" : NULL;
+    LogPrint(category, "GUI: %s\n", QString::toStdString(msg));
 }
 #endif
 

From 33fdd99288fd257d6b5a3797a0a68aff649a3a71 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 1 Jul 2014 15:21:17 +0200
Subject: [PATCH 0285/1819] qt: Change serious messages from qDebug to qWarning

By changing the logging stream for warnings from qDebug to qWarning,
these will always be logged to debug.log.
---
 src/qt/addresstablemodel.cpp     |  6 +++---
 src/qt/paymentrequestplus.cpp    | 22 +++++++++++-----------
 src/qt/paymentserver.cpp         | 24 ++++++++++++------------
 src/qt/transactiontablemodel.cpp |  6 +++---
 src/qt/winshutdownmonitor.cpp    |  6 +++---
 5 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index dfbd445ce348..8d5284d5e9ff 100644
--- a/src/qt/addresstablemodel.cpp
+++ b/src/qt/addresstablemodel.cpp
@@ -114,7 +114,7 @@ class AddressTablePriv
         case CT_NEW:
             if(inModel)
             {
-                qDebug() << "AddressTablePriv::updateEntry : Warning: Got CT_NEW, but entry is already in model";
+                qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_NEW, but entry is already in model";
                 break;
             }
             parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex);
@@ -124,7 +124,7 @@ class AddressTablePriv
         case CT_UPDATED:
             if(!inModel)
             {
-                qDebug() << "AddressTablePriv::updateEntry : Warning: Got CT_UPDATED, but entry is not in model";
+                qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_UPDATED, but entry is not in model";
                 break;
             }
             lower->type = newEntryType;
@@ -134,7 +134,7 @@ class AddressTablePriv
         case CT_DELETED:
             if(!inModel)
             {
-                qDebug() << "AddressTablePriv::updateEntry : Warning: Got CT_DELETED, but entry is not in model";
+                qWarning() << "AddressTablePriv::updateEntry : Warning: Got CT_DELETED, but entry is not in model";
                 break;
             }
             parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1);
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index 464f995eb633..acce42e20376 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -29,18 +29,18 @@ bool PaymentRequestPlus::parse(const QByteArray& data)
 {
     bool parseOK = paymentRequest.ParseFromArray(data.data(), data.size());
     if (!parseOK) {
-        qDebug() << "PaymentRequestPlus::parse : Error parsing payment request";
+        qWarning() << "PaymentRequestPlus::parse : Error parsing payment request";
         return false;
     }
     if (paymentRequest.payment_details_version() > 1) {
-        qDebug() << "PaymentRequestPlus::parse : Received up-version payment details, version=" << paymentRequest.payment_details_version();
+        qWarning() << "PaymentRequestPlus::parse : Received up-version payment details, version=" << paymentRequest.payment_details_version();
         return false;
     }
 
     parseOK = details.ParseFromString(paymentRequest.serialized_payment_details());
     if (!parseOK)
     {
-        qDebug() << "PaymentRequestPlus::parse : Error parsing payment details";
+        qWarning() << "PaymentRequestPlus::parse : Error parsing payment details";
         paymentRequest.Clear();
         return false;
     }
@@ -80,17 +80,17 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
         digestAlgorithm = EVP_sha1();
     }
     else if (paymentRequest.pki_type() == "none") {
-        qDebug() << "PaymentRequestPlus::getMerchant : Payment request: pki_type == none";
+        qWarning() << "PaymentRequestPlus::getMerchant : Payment request: pki_type == none";
         return false;
     }
     else {
-        qDebug() << "PaymentRequestPlus::getMerchant : Payment request: unknown pki_type " << QString::fromStdString(paymentRequest.pki_type());
+        qWarning() << "PaymentRequestPlus::getMerchant : Payment request: unknown pki_type " << QString::fromStdString(paymentRequest.pki_type());
         return false;
     }
 
     payments::X509Certificates certChain;
     if (!certChain.ParseFromString(paymentRequest.pki_data())) {
-        qDebug() << "PaymentRequestPlus::getMerchant : Payment request: error parsing pki_data";
+        qWarning() << "PaymentRequestPlus::getMerchant : Payment request: error parsing pki_data";
         return false;
     }
 
@@ -100,12 +100,12 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
         QByteArray certData(certChain.certificate(i).data(), certChain.certificate(i).size());
         QSslCertificate qCert(certData, QSsl::Der);
         if (currentTime < qCert.effectiveDate() || currentTime > qCert.expiryDate()) {
-            qDebug() << "PaymentRequestPlus::getMerchant : Payment request: certificate expired or not yet active: " << qCert;
+            qWarning() << "PaymentRequestPlus::getMerchant : Payment request: certificate expired or not yet active: " << qCert;
             return false;
         }
 #if QT_VERSION >= 0x050000
         if (qCert.isBlacklisted()) {
-            qDebug() << "PaymentRequestPlus::getMerchant : Payment request: certificate blacklisted: " << qCert;
+            qWarning() << "PaymentRequestPlus::getMerchant : Payment request: certificate blacklisted: " << qCert;
             return false;
         }
 #endif
@@ -115,7 +115,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
             certs.push_back(cert);
     }
     if (certs.empty()) {
-        qDebug() << "PaymentRequestPlus::getMerchant : Payment request: empty certificate chain";
+        qWarning() << "PaymentRequestPlus::getMerchant : Payment request: empty certificate chain";
         return false;
     }
 
@@ -131,7 +131,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
     // load the signing cert into it and verify.
     X509_STORE_CTX *store_ctx = X509_STORE_CTX_new();
     if (!store_ctx) {
-        qDebug() << "PaymentRequestPlus::getMerchant : Payment request: error creating X509_STORE_CTX";
+        qWarning() << "PaymentRequestPlus::getMerchant : Payment request: error creating X509_STORE_CTX";
         return false;
     }
 
@@ -183,7 +183,7 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
     catch (SSLVerifyError& err)
     {
         fResult = false;
-        qDebug() << "PaymentRequestPlus::getMerchant : SSL error: " << err.what();
+        qWarning() << "PaymentRequestPlus::getMerchant : SSL error: " << err.what();
     }
 
     if (website)
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index fbb11617fe59..2049d65073dc 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -90,7 +90,7 @@ static QList<QString> savedPaymentRequests;
 
 static void ReportInvalidCertificate(const QSslCertificate& cert)
 {
-    qDebug() << "ReportInvalidCertificate : Payment server found an invalid certificate: " << cert.subjectInfo(QSslCertificate::CommonName);
+    qWarning() << "ReportInvalidCertificate : Payment server found an invalid certificate: " << cert.subjectInfo(QSslCertificate::CommonName);
 }
 
 //
@@ -161,7 +161,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
             continue;
         }
     }
-    qDebug() << "PaymentServer::LoadRootCAs : Loaded " << nRootCerts << " root certificates";
+    qWarning() << "PaymentServer::LoadRootCAs : Loaded " << nRootCerts << " root certificates";
 
     // Project for another day:
     // Fetch certificate revocation lists, and add them to certStore.
@@ -223,7 +223,7 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
         {
             // Printing to debug.log is about the best we can do here, the
             // GUI hasn't started yet so we can't pop up a message box.
-            qDebug() << "PaymentServer::ipcSendCommandLine : Payment request file does not exist: " << arg;
+            qWarning() << "PaymentServer::ipcSendCommandLine : Payment request file does not exist: " << arg;
         }
     }
     return true;
@@ -403,7 +403,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
             }
             else
             {
-                qDebug() << "PaymentServer::handleURIOrFile : Invalid URL: " << fetchUrl;
+                qWarning() << "PaymentServer::handleURIOrFile : Invalid URL: " << fetchUrl;
                 emit message(tr("URI handling"),
                     tr("Payment request fetch URL is invalid: %1").arg(fetchUrl.toString()),
                     CClientUIInterface::ICON_WARNING);
@@ -476,13 +476,13 @@ bool PaymentServer::readPaymentRequest(const QString& filename, PaymentRequestPl
     QFile f(filename);
     if (!f.open(QIODevice::ReadOnly))
     {
-        qDebug() << "PaymentServer::readPaymentRequest : Failed to open " << filename;
+        qWarning() << "PaymentServer::readPaymentRequest : Failed to open " << filename;
         return false;
     }
 
     if (f.size() > MAX_PAYMENT_REQUEST_SIZE)
     {
-        qDebug() << "PaymentServer::readPaymentRequest : " << filename << " too large";
+        qWarning() << "PaymentServer::readPaymentRequest : " << filename << " too large";
         return false;
     }
 
@@ -624,7 +624,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
         else {
             // This should never happen, because sending coins should have
             // just unlocked the wallet and refilled the keypool.
-            qDebug() << "PaymentServer::fetchPaymentACK : Error getting refund key, refund_to not set";
+            qWarning() << "PaymentServer::fetchPaymentACK : Error getting refund key, refund_to not set";
         }
     }
 
@@ -636,7 +636,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
     }
     else {
         // This should never happen, either.
-        qDebug() << "PaymentServer::fetchPaymentACK : Error serializing payment message";
+        qWarning() << "PaymentServer::fetchPaymentACK : Error serializing payment message";
     }
 }
 
@@ -649,7 +649,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
             .arg(reply->request().url().toString())
             .arg(reply->errorString());
 
-        qDebug() << "PaymentServer::netRequestFinished : " << msg;
+        qWarning() << "PaymentServer::netRequestFinished : " << msg;
         emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
         return;
     }
@@ -663,7 +663,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
         SendCoinsRecipient recipient;
         if (!request.parse(data))
         {
-            qDebug() << "PaymentServer::netRequestFinished : Error parsing payment request";
+            qWarning() << "PaymentServer::netRequestFinished : Error parsing payment request";
             emit message(tr("Payment request error"),
                 tr("Payment request can not be parsed!"),
                 CClientUIInterface::MSG_ERROR);
@@ -681,7 +681,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
             QString msg = tr("Bad response from server %1")
                 .arg(reply->request().url().toString());
 
-            qDebug() << "PaymentServer::netRequestFinished : " << msg;
+            qWarning() << "PaymentServer::netRequestFinished : " << msg;
             emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
         }
         else
@@ -697,7 +697,7 @@ void PaymentServer::reportSslErrors(QNetworkReply* reply, const QList<QSslError>
 
     QString errString;
     foreach (const QSslError& err, errs) {
-        qDebug() << "PaymentServer::reportSslErrors : " << err;
+        qWarning() << "PaymentServer::reportSslErrors : " << err;
         errString += err.errorString() + "\n";
     }
     emit message(tr("Network request error"), errString, CClientUIInterface::MSG_ERROR);
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index d7f4c043cfee..a935752246bf 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -130,12 +130,12 @@ class TransactionTablePriv
             case CT_NEW:
                 if(inModel)
                 {
-                    qDebug() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is already in model";
+                    qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is already in model";
                     break;
                 }
                 if(!inWallet)
                 {
-                    qDebug() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is not in wallet";
+                    qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is not in wallet";
                     break;
                 }
                 if(showTransaction)
@@ -159,7 +159,7 @@ class TransactionTablePriv
             case CT_DELETED:
                 if(!inModel)
                 {
-                    qDebug() << "TransactionTablePriv::updateWallet : Warning: Got CT_DELETED, but transaction is not in model";
+                    qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_DELETED, but transaction is not in model";
                     break;
                 }
                 // Removed -- remove entire transaction from table
diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp
index b7526f0ae4ec..f8f9bf45b30f 100644
--- a/src/qt/winshutdownmonitor.cpp
+++ b/src/qt/winshutdownmonitor.cpp
@@ -45,13 +45,13 @@ void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, c
     typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
     PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
     if (shutdownBRCreate == NULL) {
-        qDebug() << "registerShutdownBlockReason : GetProcAddress for ShutdownBlockReasonCreate failed";
+        qWarning() << "registerShutdownBlockReason : GetProcAddress for ShutdownBlockReasonCreate failed";
         return;
     }
 
     if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
-        qDebug() << "registerShutdownBlockReason : Successfully registered: " + strReason;
+        qWarning() << "registerShutdownBlockReason : Successfully registered: " + strReason;
     else
-        qDebug() << "registerShutdownBlockReason : Failed to register: " + strReason;
+        qWarning() << "registerShutdownBlockReason : Failed to register: " + strReason;
 }
 #endif

From b150b09edcd3b6b7ca5f26ca6ebee92bbad97089 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 6 Jun 2014 10:23:34 -0400
Subject: [PATCH 0286/1819] secp256k1: add libtool as a dependency

---
 autogen.sh                                        | 3 +++
 configure.ac                                      | 1 +
 contrib/debian/control                            | 1 +
 contrib/gitian-descriptors/gitian-osx-bitcoin.yml | 1 +
 doc/build-osx.md                                  | 4 ++--
 5 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 5b883a6a4c07..50b85bcba063 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -2,4 +2,7 @@
 set -e
 srcdir="$(dirname $0)"
 cd "$srcdir"
+if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
+  export LIBTOOLIZE="${GLIBTOOLIZE}"
+fi
 autoreconf --install --force
diff --git a/configure.ac b/configure.ac
index 811ef1dd806e..925ac41ad4d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,6 +9,7 @@ define(_COPYRIGHT_YEAR, 2014)
 AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
 AC_CONFIG_AUX_DIR([src/build-aux])
 AC_CONFIG_MACRO_DIR([src/m4])
+LT_INIT([disable-shared])
 AC_CANONICAL_HOST
 AH_TOP([#ifndef BITCOIN_CONFIG_H])
 AH_TOP([#define BITCOIN_CONFIG_H])
diff --git a/contrib/debian/control b/contrib/debian/control
index 9e006a707011..a04e88d4e175 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -6,6 +6,7 @@ Uploaders: Micah Anderson <micah@debian.org>
 Build-Depends: debhelper,
  devscripts,
  automake,
+ libtool,
  bash-completion,
  libboost-system-dev (>> 1.35) | libboost-system1.35-dev,
  libdb4.8++-dev,
diff --git a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
index 44b5de9be3fb..bc3d561c3570 100644
--- a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+++ b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
@@ -11,6 +11,7 @@ packages:
 - "bsdmainutils"
 - "pkg-config"
 - "p7zip-full"
+- "libtool"
 
 reference_datetime: "2013-06-01 00:00:00"
 remotes:
diff --git a/doc/build-osx.md b/doc/build-osx.md
index 1e38326d8639..bc42723b1255 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -41,7 +41,7 @@ Instructions: MacPorts
 
 ### Install dependencies
 
-    sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake
+    sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake libtool
 
 Optional: install Qt4
 
@@ -69,7 +69,7 @@ Instructions: Homebrew
 
 #### Install dependencies using Homebrew
 
-        brew install autoconf automake berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt
+        brew install autoconf automake libtool berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt
 
 Note: After you have installed the dependencies, you should check that the Homebrew installed version of OpenSSL is the one available for compilation. You can check this by typing
 

From 556682663547f9a9ede69fc4f924b50c531d92b3 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 6 Jun 2014 10:57:28 -0400
Subject: [PATCH 0287/1819] secp256k1: Add build-side changes for libsecp256k1

Note: This is added to our existing automake targets rather than as a
libtool-style lib. The switch to libtool-style targets can come later if it
proves to not add any complications.
---
 Makefile.am                 |  1 +
 configure.ac                |  1 +
 src/Makefile.am             | 20 +++++++++++++++++++-
 src/Makefile.qt.include     |  3 +++
 src/Makefile.qttest.include |  3 +++
 src/Makefile.test.include   |  5 +++++
 src/secp256k1/.empty        |  0
 7 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 src/secp256k1/.empty

diff --git a/Makefile.am b/Makefile.am
index 719af42ac780..3a6a6b6d8853 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,7 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
 
 dist-hook:
 	-$(MAKE) -C $(top_distdir)/src/leveldb clean
+	-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
 	-$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
 
 distcheck-hook:
diff --git a/configure.ac b/configure.ac
index 925ac41ad4d4..2a4636e360de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -680,6 +680,7 @@ AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
 AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
 AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
 AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
+AM_CONDITIONAL([USE_LIBSECP256K1],[test x$use_libsecp256k1 = xyes])
 
 AC_DEFINE(CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MAJOR, [Major version])
 AC_DEFINE(CLIENT_VERSION_MINOR, _CLIENT_VERSION_MINOR, [Minor version])
diff --git a/src/Makefile.am b/src/Makefile.am
index 9c7b294d3544..e2a62c9699ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,10 @@
 AM_CPPFLAGS =  $(INCLUDES)
 AM_LDFLAGS = $(PTHREAD_CFLAGS)
 
+if USE_LIBSECP256K1
+secp256k1/libsecp256k1.la: $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+	@$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
+endif
 
 if EMBEDDED_LEVELDB
 LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -20,6 +24,10 @@ endif
 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
 BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
 
+if USE_LIBSECP256K1
+BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
+endif
+
 LIBBITCOIN_SERVER=libbitcoin_server.a
 LIBBITCOIN_WALLET=libbitcoin_wallet.a
 LIBBITCOIN_COMMON=libbitcoin_common.a
@@ -220,6 +228,11 @@ bitcoind_LDADD = \
   $(LIBBITCOIN_CRYPTO) \
   $(LIBLEVELDB) \
   $(LIBMEMENV)
+
+if USE_LIBSECP256K1
+  bitcoind_LDADD += secp256k1/libsecp256k1.la
+endif
+
 if ENABLE_WALLET
 bitcoind_LDADD += libbitcoin_wallet.a
 endif
@@ -242,6 +255,10 @@ bitcoin_cli_LDADD = \
   $(BOOST_LIBS)
 bitcoin_cli_SOURCES = \
   bitcoin-cli.cpp
+
+if USE_LIBSECP256K1
+  bitcoin_cli_LDADD += secp256k1/libsecp256k1.la
+endif
 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
@@ -253,10 +270,11 @@ CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
 DISTCLEANFILES = obj/build.h
 
-EXTRA_DIST = leveldb
+EXTRA_DIST = leveldb secp256k1
 
 clean-local:
 	-$(MAKE) -C leveldb clean
+	-$(MAKE) -C secp256k1 clean
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
 	-rm -f config.h
 
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 9df0779ba35c..4563bb356581 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -357,6 +357,9 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+if USE_LIBSECP256K1
+  qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
+endif
 qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
 
 #locale/foo.ts -> locale/foo.qm
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index a509f237553b..7e10ce5a9639 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -33,6 +33,9 @@ endif
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+if USE_LIBSECP256K1
+  qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
+endif
 qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 8685452c7b7e..12b90adca3e7 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -69,6 +69,11 @@ test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_CO
 if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
+
+if USE_LIBSECP256K1
+  test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la
+endif
+
 test_test_bitcoin_LDADD += $(BDB_LIBS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
diff --git a/src/secp256k1/.empty b/src/secp256k1/.empty
new file mode 100644
index 000000000000..e69de29bb2d1

From fda3fed18aedc4bfc8ccffe89d8d2cabb12677ab Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 6 Jun 2014 01:26:27 +0200
Subject: [PATCH 0288/1819] libsecp256k1 integration

---
 src/key.cpp | 130 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 119 insertions(+), 11 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 784085da3441..3c4fa77e727f 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -5,15 +5,34 @@
 #include "key.h"
 
 #include "crypto/sha2.h"
+#include <openssl/rand.h>
 
+#ifdef USE_SECP256K1
+#include <secp256k1.h>
+#else
 #include <openssl/bn.h>
 #include <openssl/ecdsa.h>
 #include <openssl/obj_mac.h>
-#include <openssl/rand.h>
+#endif
 
 // anonymous namespace with local implementation code (OpenSSL interaction)
 namespace {
 
+#ifdef USE_SECP256K1
+#include <secp256k1.h>
+class CSecp256k1Init {
+public:
+    CSecp256k1Init() {
+        secp256k1_start();
+    }
+    ~CSecp256k1Init() {
+        secp256k1_stop();
+    }
+};
+static CSecp256k1Init instance_of_csecp256k1;
+
+#else
+
 // Generate a private key from just the secret parameter
 int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
 {
@@ -334,6 +353,8 @@ class CECKey {
     }
 };
 
+#endif
+
 int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) {
     while (c1len > c2len) {
         if (*c1)
@@ -398,10 +419,15 @@ void CKey::MakeNewKey(bool fCompressedIn) {
 }
 
 bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
+#ifdef USE_SECP256K1
+    if (!secp256k1_ecdsa_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
+        return false;
+#else
     CECKey key;
     if (!key.SetPrivKey(privkey))
         return false;
     key.GetSecretBytes(vch);
+#endif
     fCompressed = fCompressedIn;
     fValid = true;
     return true;
@@ -409,99 +435,167 @@ bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
 
 CPrivKey CKey::GetPrivKey() const {
     assert(fValid);
+    CPrivKey privkey;
+#ifdef USE_SECP256K1
+    privkey.resize(279);
+    int privkeylen = 279;
+    int ret = secp256k1_ecdsa_privkey_export(begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
+    assert(ret);
+    privkey.resize(privkeylen);
+#else
     CECKey key;
     key.SetSecretBytes(vch);
-    CPrivKey privkey;
     key.GetPrivKey(privkey, fCompressed);
+#endif
     return privkey;
 }
 
 CPubKey CKey::GetPubKey() const {
     assert(fValid);
+    CPubKey pubkey;
+#ifdef USE_SECP256K1
+    int clen = 65;
+    int ret = secp256k1_ecdsa_pubkey_create((unsigned char*)pubkey.begin(), &clen, begin(), fCompressed);
+    assert(ret);
+    assert(pubkey.IsValid());
+    assert((int)pubkey.size() == clen);
+#else
     CECKey key;
     key.SetSecretBytes(vch);
-    CPubKey pubkey;
     key.GetPubKey(pubkey, fCompressed);
+#endif
     return pubkey;
 }
 
 bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     if (!fValid)
         return false;
+#ifdef USE_SECP256K1
+    vchSig.resize(72);
+    int nSigLen = 72;
+    CKey nonce;
+    do {
+        nonce.MakeNewKey(true);
+        if (secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), nonce.begin()))
+            break;
+    } while(true);
+    vchSig.resize(nSigLen);
+    return true;
+#else
     CECKey key;
     key.SetSecretBytes(vch);
     return key.Sign(hash, vchSig);
+#endif
 }
 
 bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     if (!fValid)
         return false;
-    CECKey key;
-    key.SetSecretBytes(vch);
     vchSig.resize(65);
     int rec = -1;
+#ifdef USE_SECP256K1
+    CKey nonce;
+    do {
+        nonce.MakeNewKey(true);
+        if (secp256k1_ecdsa_sign_compact((const unsigned char*)&hash, 32, &vchSig[1], begin(), nonce.begin(), &rec))
+            break;
+    } while(true);
+#else
+    CECKey key;
+    key.SetSecretBytes(vch);
     if (!key.SignCompact(hash, &vchSig[1], rec))
         return false;
+#endif
     assert(rec != -1);
     vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);
     return true;
 }
 
 bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
+#ifdef USE_SECP256K1
+    if (!secp256k1_ecdsa_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
+        return false;
+#else
     CECKey key;
     if (!key.SetPrivKey(privkey, fSkipCheck))
         return false;
-    
     key.GetSecretBytes(vch);
+#endif
     fCompressed = vchPubKey.IsCompressed();
     fValid = true;
-    
+
     if (fSkipCheck)
         return true;
-    
+
     if (GetPubKey() != vchPubKey)
         return false;
-    
+
     return true;
 }
 
 bool CPubKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const {
     if (!IsValid())
         return false;
+#ifdef USE_SECP256K1
+    if (secp256k1_ecdsa_verify((const unsigned char*)&hash, 32, &vchSig[0], vchSig.size(), begin(), size()) != 1)
+        return false;
+#else
     CECKey key;
     if (!key.SetPubKey(*this))
         return false;
     if (!key.Verify(hash, vchSig))
         return false;
+#endif
     return true;
 }
 
 bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
     if (vchSig.size() != 65)
         return false;
+    int recid = (vchSig[0] - 27) & 3;
+    bool fComp = (vchSig[0] - 27) & 4;
+#ifdef USE_SECP256K1
+    int pubkeylen = 65;
+    if (!secp256k1_ecdsa_recover_compact((const unsigned char*)&hash, 32, &vchSig[1], (unsigned char*)begin(), &pubkeylen, fComp, recid))
+        return false;
+    assert((int)size() == pubkeylen);
+#else
     CECKey key;
-    if (!key.Recover(hash, &vchSig[1], (vchSig[0] - 27) & ~4))
+    if (!key.Recover(hash, &vchSig[1], recid))
         return false;
-    key.GetPubKey(*this, (vchSig[0] - 27) & 4);
+    key.GetPubKey(*this, fComp);
+#endif
     return true;
 }
 
 bool CPubKey::IsFullyValid() const {
     if (!IsValid())
         return false;
+#ifdef USE_SECP256K1
+    if (!secp256k1_ecdsa_pubkey_verify(begin(), size()))
+        return false;
+#else
     CECKey key;
     if (!key.SetPubKey(*this))
         return false;
+#endif
     return true;
 }
 
 bool CPubKey::Decompress() {
     if (!IsValid())
         return false;
+#ifdef USE_SECP256K1
+    int clen = size();
+    int ret = secp256k1_ecdsa_pubkey_decompress((unsigned char*)begin(), &clen);
+    assert(ret);
+    assert(clen == (int)size());
+#else
     CECKey key;
     if (!key.SetPubKey(*this))
         return false;
     key.GetPubKey(*this, false);
+#endif
     return true;
 }
 
@@ -531,7 +625,12 @@ bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild
         BIP32Hash(cc, nChild, 0, begin(), out);
     }
     memcpy(ccChild, out+32, 32);
+#ifdef USE_SECP256K1
+    memcpy((unsigned char*)keyChild.begin(), begin(), 32);
+    bool ret = secp256k1_ecdsa_privkey_tweak_add((unsigned char*)keyChild.begin(), out);
+#else
     bool ret = CECKey::TweakSecret((unsigned char*)keyChild.begin(), begin(), out);
+#endif
     UnlockObject(out);
     keyChild.fCompressed = true;
     keyChild.fValid = ret;
@@ -545,10 +644,15 @@ bool CPubKey::Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned i
     unsigned char out[64];
     BIP32Hash(cc, nChild, *begin(), begin()+1, out);
     memcpy(ccChild, out+32, 32);
+#ifdef USE_SECP256K1
+    pubkeyChild = *this;
+    bool ret = secp256k1_ecdsa_pubkey_tweak_add((unsigned char*)pubkeyChild.begin(), pubkeyChild.size(), out);
+#else
     CECKey key;
     bool ret = key.SetPubKey(*this);
     ret &= key.TweakPublic(out);
     key.GetPubKey(pubkeyChild, true);
+#endif
     return ret;
 }
 
@@ -629,6 +733,9 @@ bool CExtPubKey::Derive(CExtPubKey &out, unsigned int nChild) const {
 }
 
 bool ECC_InitSanityCheck() {
+#ifdef USE_SECP256K1
+    return true;
+#else
     EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
     if(pkey == NULL)
         return false;
@@ -636,6 +743,7 @@ bool ECC_InitSanityCheck() {
 
     // TODO Is there more EC functionality that could be missing?
     return true;
+#endif
 }
 
 

From 462ad223d65bf9a37b4617c4c318279f257258d9 Mon Sep 17 00:00:00 2001
From: Micha <michagogo@server.fake>
Date: Tue, 1 Jul 2014 19:29:44 +0300
Subject: [PATCH 0289/1819] Clean up release-process.md after OS X gitian
 changes

This is PR #4271, but with the changes to the descriptors, both the names of the
files and the names of the intermediate build artifact archives, removed.
This also closes #3775 if it goes in, because it covers the changes in
that PR.
---
 doc/release-process.md | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index d12b41772e35..324b8c43ab00 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -33,16 +33,21 @@ Release Process
 	git checkout v${VERSION}
 	popd
 	pushd ./gitian-builder
-        mkdir -p inputs; cd inputs/
 
- Register and download the Apple SDK (see OSX Readme for details)
-	visit https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
+ ###Fetch and build inputs: (first time, or when dependency versions change)
  
- Using a Mac, create a tarball for the 10.7 SDK
-	tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
+	mkdir -p inputs; cd inputs/
 
- Fetch and build inputs: (first time, or when dependency versions change)
+ Register and download the Apple SDK: (see OSX Readme for details)
+ 
+ https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.6.3/xcode4630916281a.dmg
+ 
+ Using a Mac, create a tarball for the 10.7 SDK and copy it to the inputs directory:
+ 
+	tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
 
+ Download remaining inputs, and build everything:
+ 
 	wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz' -O miniupnpc-1.9.tar.gz
 	wget 'https://www.openssl.org/source/openssl-1.0.1h.tar.gz'
 	wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
@@ -87,10 +92,10 @@ Release Process
 
  The expected SHA256 hashes of the intermediate inputs are:
 
-    46710f673467e367738d8806e45b4cb5931aaeea61f4b6b55a68eea56d5006c5  bitcoin-deps-linux32-gitian-r6.zip
-    f03be39fb26670243d3a659e64d18e19d03dec5c11e9912011107768390b5268  bitcoin-deps-linux64-gitian-r6.zip
     f29b7d9577417333fb56e023c2977f5726a7c297f320b175a4108cf7cd4c2d29  boost-linux32-1.55.0-gitian-r1.zip
     88232451c4104f7eb16e469ac6474fd1231bd485687253f7b2bdf46c0781d535  boost-linux64-1.55.0-gitian-r1.zip
+    46710f673467e367738d8806e45b4cb5931aaeea61f4b6b55a68eea56d5006c5  bitcoin-deps-linux32-gitian-r6.zip
+    f03be39fb26670243d3a659e64d18e19d03dec5c11e9912011107768390b5268  bitcoin-deps-linux64-gitian-r6.zip
     57e57dbdadc818cd270e7e00500a5e1085b3bcbdef69a885f0fb7573a8d987e1  qt-linux32-4.6.4-gitian-r1.tar.gz
     60eb4b9c5779580b7d66529efa5b2836ba1a70edde2a0f3f696d647906a826be  qt-linux64-4.6.4-gitian-r1.tar.gz
     60dc2d3b61e9c7d5dbe2f90d5955772ad748a47918ff2d8b74e8db9b1b91c909  boost-win32-1.55.0-gitian-r6.zip
@@ -106,10 +111,10 @@ Release Process
     ec95abef1df2b096a970359787c01d8c45e2a4475b7ae34e12c022634fbdba8a  osx-depends-qt-5.2.1-r4.tar.gz
 
 
- Build bitcoind and bitcoin-qt on Linux32, Linux64, and Win32:
+ Build Bitcoin Core for Linux, Windows, and OS X:
   
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
-	./bin/gsign --signer $SIGNER --release ${VERSION} --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
+	./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
 	pushd build/out
 	zip -r bitcoin-${VERSION}-linux-gitian.zip *
 	mv bitcoin-${VERSION}-linux-gitian.zip ../../../
@@ -132,7 +137,7 @@ Release Process
   1. linux 32-bit and 64-bit binaries + source (bitcoin-${VERSION}-linux-gitian.zip)
   2. windows 32-bit and 64-bit binaries + installer + source (bitcoin-${VERSION}-win-gitian.zip)
   3. OSX installer (Bitcoin-Qt.dmg)
-  4. Gitian signatures (in gitian.sigs/${VERSION}[-win|-osx]/(your gitian key)/
+  4. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx>/(your gitian key)/
 
 repackage gitian builds for release as stand-alone zip/tar/installer exe
 
@@ -172,8 +177,9 @@ repackage gitian builds for release as stand-alone zip/tar/installer exe
 Commit your signature to gitian.sigs:
 
 	pushd gitian.sigs
-	git add ${VERSION}/${SIGNER}
+	git add ${VERSION}-linux/${SIGNER}
 	git add ${VERSION}-win/${SIGNER}
+	git add ${VERSION}-osx/${SIGNER}
 	git commit -a
 	git push  # Assuming you can push to the gitian.sigs tree
 	popd

From 88dd3598d22197a22565e524cecdc08107cf76ac Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Tue, 1 Jul 2014 14:26:57 -0700
Subject: [PATCH 0290/1819] Check signatures before respend relay

Check that all inputs are completely valid before actually
relaying a double-spend.
---
 src/main.cpp | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 04d9523e26ed..1294e5b2ed8b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -127,7 +127,7 @@ namespace {
 
 // Forward reference functions defined here:
 static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
-static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
+static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -156,7 +156,7 @@ struct CMainSignals {
     // transaction was first seen in a block.
     // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
     // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
-    boost::signals2::signal<void (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
+    boost::signals2::signal<bool (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 
 } // anon namespace
@@ -166,7 +166,7 @@ void RegisterInternalSignals() {
     seed_insecure_rand();
     doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
 
-    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayDoubleSpend, _1, _2, _3, doubleSpendFilter));
+    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayableRespend, _1, _2, _3, doubleSpendFilter));
 }
 
 
@@ -936,6 +936,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         return false;
 
     // Check for conflicts with in-memory transactions
+    bool relayableRespend = false;
     {
     LOCK(pool.cs); // protect pool.mapNextTx
     for (unsigned int i = 0; i < tx.vin.size(); i++)
@@ -944,8 +945,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Does tx conflict with a member of the pool, and is it not equivalent to that member?
         if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
         {
-            g_signals.DetectedDoubleSpend(outpoint, tx, false);
-            return false;
+            relayableRespend = g_signals.DetectedDoubleSpend(outpoint, tx, false);
+            if (!relayableRespend)
+                return false;
         }
     }
     }
@@ -1038,16 +1040,24 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         {
             return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString());
         }
-        // Store transaction in memory
-        pool.addUnchecked(hash, entry);
+
+        if (relayableRespend)
+        {
+            RelayTransaction(tx);
+        }
+        else
+        {
+            // Store transaction in memory
+            pool.addUnchecked(hash, entry);
+        }
     }
 
     g_signals.SyncTransaction(tx, NULL);
 
-    return true;
+    return !relayableRespend;
 }
 
-static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
 {
     // Relaying double-spend attempts to our peers lets them detect when
     // somebody might be trying to cheat them. However, blindly relaying
@@ -1060,7 +1070,7 @@ static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doub
     // from us they are very likely to hear about it from another peer, since
     // each peer uses a different, randomized bloom filter.
 
-    if (fInBlock || filter.contains(outPoint)) return;
+    if (fInBlock || filter.contains(outPoint)) return false;
 
     // Apply an independent rate limit to double-spend relays
     static double dRespendCount;
@@ -1071,7 +1081,7 @@ static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doub
     if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
     {
         LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
-        return;
+        return false;
     }
 
     LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
@@ -1083,10 +1093,7 @@ static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doub
 
     filter.insert(outPoint);
 
-    RelayTransaction(doubleSpend);
-
-    // Share conflict with wallet
-    g_signals.SyncTransaction(doubleSpend, NULL);
+    return true;
 }
 
 

From 2882d594fed93dc5bde67ffa33624ab29f90ac8b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 2 Jul 2014 08:14:50 +0200
Subject: [PATCH 0291/1819] Fix the Qt5 build after d95ba75

Sorry, my own fault this time.
---
 src/qt/bitcoin.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 569facb499be..7c4af25edfe8 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -134,7 +134,7 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons
 {
     Q_UNUSED(context);
     const char *category = (type == QtDebugMsg) ? "qt" : NULL;
-    LogPrint(category, "GUI: %s\n", QString::toStdString(msg));
+    LogPrint(category, "GUI: %s\n", msg.toStdString());
 }
 #endif
 

From dd49e92fb0cae0dcdf0b2ea303da99c7814db473 Mon Sep 17 00:00:00 2001
From: Julian Haight <github@a.julianhaight.com>
Date: Wed, 2 Jul 2014 09:42:15 +0200
Subject: [PATCH 0292/1819] qt: fix 'opens in testnet mode when presented with
 a BIP-72 link with no fallback'

Passes tests:

```
$ ./bitcoin-qt 'bitcoin:?r=http://www.example.com/'
.. fixed the original problem - this launches mainnet.

$ ./bitcoin-qt 'bitcoin:mngeNQbTKnmaMbx8EXCYdwUbnt9JJD52cC'
.. launches testnet

$ ./bitcoin-qt -testnet 'bitcoin:1NXXeQRyMFFFRfyUix2o7mk1vhvk2Nxp78'
.. sanity check - launches mainnet.
```

Fixes #4355. Closes #4411.
---
 src/qt/paymentserver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 2049d65073dc..6ca90f0513d3 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -195,7 +195,7 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             savedPaymentRequests.append(arg);
 
             SendCoinsRecipient r;
-            if (GUIUtil::parseBitcoinURI(arg, &r))
+            if (GUIUtil::parseBitcoinURI(arg, &r) && !r.address.isEmpty())
             {
                 CBitcoinAddress address(r.address.toStdString());
 

From 9d5ad718cfdceb0975250ce8268eea400d6f582a Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Wed, 2 Jul 2014 16:32:02 +0800
Subject: [PATCH 0293/1819] Fix formatting in release-process.md

---
 doc/release-process.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 324b8c43ab00..c58838141196 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -23,7 +23,7 @@ Release Process
 
 * * *
 
-##perform gitian builds
+###perform gitian builds
 
  From a directory containing the bitcoin source, gitian-builder and gitian.sigs
   
@@ -34,7 +34,7 @@ Release Process
 	popd
 	pushd ./gitian-builder
 
- ###Fetch and build inputs: (first time, or when dependency versions change)
+###fetch and build inputs: (first time, or when dependency versions change)
  
 	mkdir -p inputs; cd inputs/
 

From 3f7a61fc0966bc63dfcafd231c449d922abb884c Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Wed, 2 Jul 2014 17:16:49 +0800
Subject: [PATCH 0294/1819] Update Gitian Build guide to include OSX

---
 doc/gitian-building.md | 35 +++++++++++++++++------------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 378a45eda539..b356a5d88d8d 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -4,8 +4,8 @@ Gitian building
 *Setup instructions for a gitian build of Bitcoin using a Debian VM or physical system.*
 
 Gitian is the deterministic build process that is used to build the Bitcoin
-Core executables [1]. It provides a way to be reasonably sure that the
-executables are really built from source on github. It also makes sure that
+Core executables. It provides a way to be reasonably sure that the
+executables are really built from source on GitHub. It also makes sure that
 the same, tested dependencies are used and statically built into the executable.
 
 Multiple developers build the source code by following a specific descriptor
@@ -17,9 +17,6 @@ More independent gitian builders are needed, which is why I wrote this
 guide. It is preferred to follow these steps yourself instead of using someone else's
 VM image to avoid 'contaminating' the build.
 
-[1] For all platforms except for MacOSX, at this point. Work for deterministic
-builds for Mac is under way here: https://github.com/theuni/osx-cross-depends .
-
 Table of Contents
 ------------------
 
@@ -38,7 +35,7 @@ Preparing the Gitian builder host
 ---------------------------------
 
 The first step is to prepare the host environment that will be used to perform the Gitian builds.
-In this guide it is explained how to set up the environment, and how to get the builds started.
+This guide explains how to set up the environment, and how to start the builds.
 
 Debian Linux was chosen as the host distribution because it has a lightweight install (in contrast to Ubuntu) and is readily available.
 Any kind of virtualization can be used, for example:
@@ -134,7 +131,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
 
 ![](gitian-building/debian_install_5_configure_the_network.png)
 
-- Choose a root password and enter it twice (and remember it for later) 
+- Choose a root password and enter it twice (remember it for later) 
 
 ![](gitian-building/debian_install_6a_set_up_root_password.png)
 
@@ -143,7 +140,7 @@ and proceed, just press `Enter`. To select a different button, press `Tab`.
 ![](gitian-building/debian_install_7_set_up_user_fullname.png)
 ![](gitian-building/debian_install_8_set_up_username.png)
 
-- Choose a user password and enter it twice (and remember it for later) 
+- Choose a user password and enter it twice (remember it for later) 
 
 ![](gitian-building/debian_install_9_user_password.png)
 
@@ -236,7 +233,7 @@ adduser debian sudo
 When you get a colorful screen with a question about the 'LXC directory', just
 go with the default (`/var/lib/lxc`).
 
-Then set up LXC and the rest with the following is a complex jumble of settings and workarounds:
+Then set up LXC and the rest with the following, which is a complex jumble of settings and workarounds:
 
 ```bash
 # the version of lxc-start in Debian 7.4 needs to run as root, so make sure
@@ -280,7 +277,7 @@ cd ..
 
 **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
 
-Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you are willing to build.
+Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you want to build.
 
 ```bash
 git clone https://github.com/devrandom/gitian-builder.git
@@ -319,10 +316,10 @@ you will find a list of `wget` commands that can be executed to get the dependen
 
 I needed to add `--no-check-certificate` to the OpenSSL wget line to make it work.
 Likely this is because the ca-certificates in Debian 7.4 is fairly old. This does not create a 
-security issue as the gitian descriptors check integrity of the input archives and refuse to work
+security issue as the gitian descriptors check the integrity of the input archives and refuse to work
 if any one is corrupted.
 
-After downloading the archives, execute the `gbuild` commends to build the dependencies.
+After downloading the archives, execute the `gbuild` commands to build the dependencies.
 This can take a long time, but only has to be done when the dependencies change, for example
 to upgrade the used version.
 
@@ -339,7 +336,7 @@ tail -f var/build.log
 Building Bitcoin
 ----------------
 
-To build Bitcoin (for Linux and/or Windows) just follow the steps under 'perform
+To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform
 gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
 
 Output from `gbuild` will look something like
@@ -372,7 +369,7 @@ can be inspected in `var/install.log` and `var/build.log`.
 Building an alternative repository
 -----------------------------------
 
-If you want to do a test build of a pull on github it can be useful to point
+If you want to do a test build of a pull on GitHub it can be useful to point
 the gitian builder at an alternative repository, using the same descriptors
 and inputs.
 
@@ -382,13 +379,14 @@ URL=https://github.com/laanwj/bitcoin.git
 COMMIT=2014_03_windows_unicode_path
 ./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
 ./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
+./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
 ```
 
 Signing externally
 -------------------
 
-If you want to do the PGP signing on another device that's possible too; just define `SIGNER` as mentioned
-and follow the steps in the build process as normally.
+If you want to do the PGP signing on another device that's also possible; just define `SIGNER` as mentioned
+and follow the steps in the build process as normal.
 
     gpg: skipped "laanwj": secret key not available
 
@@ -396,8 +394,9 @@ When you execute `gsign` you will get an error from GPG, which can be ignored. C
 in `gitian.sigs` to your signing machine and do
 
 ```bash
-    gpg --detach-sign ${VERSION}/${SIGNER}/bitcoin-build.assert
+    gpg --detach-sign ${VERSION}-linux/${SIGNER}/bitcoin-build.assert
     gpg --detach-sign ${VERSION}-win/${SIGNER}/bitcoin-build.assert
+    gpg --detach-sign ${VERSION}-osx/${SIGNER}/bitcoin-build.assert
 ```
 
 This will create the `.sig` files that can be committed together with the `.assert` files to assert your
@@ -407,5 +406,5 @@ Uploading signatures
 ---------------------
 
 After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
-[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if not possible create a pull
+[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if that's not possible create a pull
 request. You can also mail the files to me (laanwj@gmail.com) and I'll commit them.

From c8988460a2865b99ee96da6799d37ac6ccb79d4d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 26 Jul 2013 01:06:01 +0200
Subject: [PATCH 0295/1819] Add support for watch-only addresses

Changes:
* Add Add/Have WatchOnly methods to CKeyStore, and implementations
  in CBasicKeyStore.
* Add similar methods to CWallet, and support entries for it in
  CWalletDB.
* Make IsMine in script/wallet return a new enum 'isminetype',
  rather than a boolean. This allows distinguishing between
  spendable and unspendable coins.
* Add a field fSpendable to COutput (GetAvailableCoins' return type).
* Mark watchonly coins in listunspent as 'watchonly': true.
* Add 'watchonly' to validateaddress, suppressing script/pubkey/...
  in this case.

Based on a patch by Eric Lombrozo.

Conflicts:
	src/qt/walletmodel.cpp
	src/rpcserver.cpp
	src/wallet.cpp
---
 src/keystore.cpp          | 12 +++++++++
 src/keystore.h            | 19 ++++++++++++++
 src/qt/walletmodel.cpp    |  6 ++---
 src/rpcclient.cpp         |  1 +
 src/rpcdump.cpp           | 45 +++++++++++++++++++++++++++++++++
 src/rpcmisc.cpp           | 52 +++++++++++++++++++++++----------------
 src/rpcrawtransaction.cpp |  1 +
 src/rpcserver.cpp         |  1 +
 src/rpcserver.h           |  1 +
 src/script.cpp            | 52 +++++++++++++++++++++++++++++----------
 src/script.h              | 12 +++++++--
 src/test/wallet_tests.cpp |  2 +-
 src/wallet.cpp            | 35 ++++++++++++++++++++------
 src/wallet.h              | 14 ++++++++---
 src/walletdb.cpp          | 19 ++++++++++++++
 src/walletdb.h            |  3 +++
 16 files changed, 223 insertions(+), 52 deletions(-)

diff --git a/src/keystore.cpp b/src/keystore.cpp
index 594e0c61da9d..c2ea1ce5a994 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -59,3 +59,15 @@ bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut)
     return false;
 }
 
+bool CBasicKeyStore::AddWatchOnly(const CTxDestination &dest)
+{
+    LOCK(cs_KeyStore);
+    setWatchOnly.insert(dest);
+    return true;
+}
+
+bool CBasicKeyStore::HaveWatchOnly(const CTxDestination &dest) const
+{
+    LOCK(cs_KeyStore);
+    return setWatchOnly.count(dest) > 0;
+}
diff --git a/src/keystore.h b/src/keystore.h
index 79d8661aca97..90fc3a4c7b0b 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -8,11 +8,21 @@
 
 #include "key.h"
 #include "sync.h"
+#include "script.h"     // for CNoDestination
 
 #include <boost/signals2/signal.hpp>
+#include <boost/variant.hpp>
 
 class CScript;
 
+/** A txout script template with a specific destination. It is either:
+ *  * CNoDestination: no destination set
+ *  * CKeyID: TX_PUBKEYHASH destination
+ *  * CScriptID: TX_SCRIPTHASH destination
+ *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
+ */
+typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
+
 /** A virtual base class for key stores */
 class CKeyStore
 {
@@ -36,10 +46,15 @@ class CKeyStore
     virtual bool AddCScript(const CScript& redeemScript) =0;
     virtual bool HaveCScript(const CScriptID &hash) const =0;
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const =0;
+
+    // Support for Watch-only addresses
+    virtual bool AddWatchOnly(const CTxDestination &dest) =0;
+    virtual bool HaveWatchOnly(const CTxDestination &dest) const =0;
 };
 
 typedef std::map<CKeyID, CKey> KeyMap;
 typedef std::map<CScriptID, CScript > ScriptMap;
+typedef std::set<CTxDestination> WatchOnlySet;
 
 /** Basic key store, that keeps keys in an address->secret map */
 class CBasicKeyStore : public CKeyStore
@@ -47,6 +62,7 @@ class CBasicKeyStore : public CKeyStore
 protected:
     KeyMap mapKeys;
     ScriptMap mapScripts;
+    WatchOnlySet setWatchOnly;
 
 public:
     bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey);
@@ -88,6 +104,9 @@ class CBasicKeyStore : public CKeyStore
     virtual bool AddCScript(const CScript& redeemScript);
     virtual bool HaveCScript(const CScriptID &hash) const;
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const;
+
+    virtual bool AddWatchOnly(const CTxDestination &dest);
+    virtual bool HaveWatchOnly(const CTxDestination &dest) const;
 };
 
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index defc815def6c..d32e74b78a54 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -543,7 +543,7 @@ void WalletModel::getOutputs(const std::vector<COutPoint>& vOutpoints, std::vect
         if (!wallet->mapWallet.count(outpoint.hash)) continue;
         int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
         if (nDepth < 0) continue;
-        COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth);
+        COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
         vOutputs.push_back(out);
     }
 }
@@ -570,7 +570,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
         if (!wallet->mapWallet.count(outpoint.hash)) continue;
         int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
         if (nDepth < 0) continue;
-        COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth);
+        COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
         vCoins.push_back(out);
     }
 
@@ -581,7 +581,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
         while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0]))
         {
             if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break;
-            cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0);
+            cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true);
         }
 
         CTxDestination address;
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 501940a73026..76c99e7c9f7f 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -72,6 +72,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "lockunspent", 0 },
     { "lockunspent", 1 },
     { "importprivkey", 2 },
+    { "importaddress", 2 },
     { "verifychain", 0 },
     { "verifychain", 1 },
     { "keypoolrefill", 0 },
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 593e0d2b6be7..5b325c46eedb 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -133,6 +133,51 @@ Value importprivkey(const Array& params, bool fHelp)
     return Value::null;
 }
 
+Value importaddress(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() < 1 || params.size() > 3)
+        throw runtime_error(
+            "importaddress <address> [label] [rescan=true]\n"
+            "Adds an address that can be watched as if it were in your wallet but cannot be used to spend.");
+
+    CBitcoinAddress address(params[0].get_str());
+    if (!address.IsValid())
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
+    CTxDestination dest;
+    dest = address.Get();
+
+    string strLabel = "";
+    if (params.size() > 1)
+        strLabel = params[1].get_str();
+
+    // Whether to perform rescan after import
+    bool fRescan = true;
+    if (params.size() > 2)
+        fRescan = params[2].get_bool();
+
+    {
+        LOCK2(cs_main, pwalletMain->cs_wallet);
+
+        // Don't throw error in case an address is already there
+        if (pwalletMain->HaveWatchOnly(dest))
+            return Value::null;
+
+        pwalletMain->MarkDirty();
+        pwalletMain->SetAddressBook(dest, strLabel, "receive");
+
+        if (!pwalletMain->AddWatchOnly(dest))
+            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
+
+        if (fRescan)
+        {
+            pwalletMain->ScanForWalletTransactions(chainActive.Genesis(), true);
+            pwalletMain->ReacceptWalletTransactions();
+        }
+    }
+
+    return Value::null;
+}
+
 Value importwallet(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() != 1)
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 5b470516a102..e2de2dbcdb96 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -92,36 +92,45 @@ Value getinfo(const Array& params, bool fHelp)
 #ifdef ENABLE_WALLET
 class DescribeAddressVisitor : public boost::static_visitor<Object>
 {
+private:
+    isminetype mine;
+
 public:
+    DescribeAddressVisitor(isminetype mineIn) : mine(mineIn) {}
+
     Object operator()(const CNoDestination &dest) const { return Object(); }
 
     Object operator()(const CKeyID &keyID) const {
         Object obj;
         CPubKey vchPubKey;
-        pwalletMain->GetPubKey(keyID, vchPubKey);
         obj.push_back(Pair("isscript", false));
-        obj.push_back(Pair("pubkey", HexStr(vchPubKey)));
-        obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed()));
+        if (mine == MINE_SPENDABLE) {
+            pwalletMain->GetPubKey(keyID, vchPubKey);
+            obj.push_back(Pair("pubkey", HexStr(vchPubKey)));
+            obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed()));
+        }
         return obj;
     }
 
     Object operator()(const CScriptID &scriptID) const {
         Object obj;
         obj.push_back(Pair("isscript", true));
-        CScript subscript;
-        pwalletMain->GetCScript(scriptID, subscript);
-        std::vector<CTxDestination> addresses;
-        txnouttype whichType;
-        int nRequired;
-        ExtractDestinations(subscript, whichType, addresses, nRequired);
-        obj.push_back(Pair("script", GetTxnOutputType(whichType)));
-        obj.push_back(Pair("hex", HexStr(subscript.begin(), subscript.end())));
-        Array a;
-        BOOST_FOREACH(const CTxDestination& addr, addresses)
-            a.push_back(CBitcoinAddress(addr).ToString());
-        obj.push_back(Pair("addresses", a));
-        if (whichType == TX_MULTISIG)
-            obj.push_back(Pair("sigsrequired", nRequired));
+        if (mine == MINE_SPENDABLE) {
+            CScript subscript;
+            pwalletMain->GetCScript(scriptID, subscript);
+            std::vector<CTxDestination> addresses;
+            txnouttype whichType;
+            int nRequired;
+            ExtractDestinations(subscript, whichType, addresses, nRequired);
+            obj.push_back(Pair("script", GetTxnOutputType(whichType)));
+            obj.push_back(Pair("hex", HexStr(subscript.begin(), subscript.end())));
+            Array a;
+            BOOST_FOREACH(const CTxDestination& addr, addresses)
+                a.push_back(CBitcoinAddress(addr).ToString());
+            obj.push_back(Pair("addresses", a));
+            if (whichType == TX_MULTISIG)
+                obj.push_back(Pair("sigsrequired", nRequired));
+        }
         return obj;
     }
 };
@@ -161,10 +170,11 @@ Value validateaddress(const Array& params, bool fHelp)
         string currentAddress = address.ToString();
         ret.push_back(Pair("address", currentAddress));
 #ifdef ENABLE_WALLET
-        bool fMine = pwalletMain ? IsMine(*pwalletMain, dest) : false;
-        ret.push_back(Pair("ismine", fMine));
-        if (fMine) {
-            Object detail = boost::apply_visitor(DescribeAddressVisitor(), dest);
+        isminetype mine = pwalletMain ? IsMine(*pwalletMain, dest) : MINE_NO;
+        ret.push_back(Pair("ismine", mine != MINE_NO));
+        if (mine != MINE_NO) {
+            ret.push_back(Pair("watchonly", mine == MINE_WATCH_ONLY));
+            Object detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
             ret.insert(ret.end(), detail.begin(), detail.end());
         }
         if (pwalletMain && pwalletMain->mapAddressBook.count(dest))
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 9771f8e68501..da4bde3975bd 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -304,6 +304,7 @@ Value listunspent(const Array& params, bool fHelp)
         }
         entry.push_back(Pair("amount",ValueFromAmount(nValue)));
         entry.push_back(Pair("confirmations",out.nDepth));
+        entry.push_back(Pair("spendable", out.fSpendable));
         results.push_back(entry);
     }
 
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index f47b3385da6e..363403c69e8a 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -282,6 +282,7 @@ static const CRPCCommand vRPCCommands[] =
     { "getwalletinfo",          &getwalletinfo,          true,      false,      true },
     { "importprivkey",          &importprivkey,          false,     false,      true },
     { "importwallet",           &importwallet,           false,     false,      true },
+    { "importaddress",          &importaddress,          false,     false,      true },
     { "keypoolrefill",          &keypoolrefill,          true,      false,      true },
     { "listaccounts",           &listaccounts,           false,     false,      true },
     { "listaddressgroupings",   &listaddressgroupings,   false,     false,      true },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 01e77163c4de..e32eb975a1a6 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -131,6 +131,7 @@ extern json_spirit::Value getnettotals(const json_spirit::Array& params, bool fH
 
 extern json_spirit::Value dumpprivkey(const json_spirit::Array& params, bool fHelp); // in rpcdump.cpp
 extern json_spirit::Value importprivkey(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value importaddress(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value dumpwallet(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value importwallet(const json_spirit::Array& params, bool fHelp);
 
diff --git a/src/script.cpp b/src/script.cpp
index e1b69854084f..0ef0126255e8 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1456,36 +1456,57 @@ class CKeyStoreIsMineVisitor : public boost::static_visitor<bool>
     bool operator()(const CScriptID &scriptID) const { return keystore->HaveCScript(scriptID); }
 };
 
-bool IsMine(const CKeyStore &keystore, const CTxDestination &dest)
+isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
 {
-    return boost::apply_visitor(CKeyStoreIsMineVisitor(&keystore), dest);
+    if (boost::apply_visitor(CKeyStoreIsMineVisitor(&keystore), dest))
+        return MINE_SPENDABLE;
+    if (keystore.HaveWatchOnly(dest))
+        return MINE_WATCH_ONLY;
+    return MINE_NO;
 }
 
-bool IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
+isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
 {
     vector<valtype> vSolutions;
     txnouttype whichType;
-    if (!Solver(scriptPubKey, whichType, vSolutions))
-        return false;
+    if (!Solver(scriptPubKey, whichType, vSolutions)) {
+        if (keystore.HaveWatchOnly(scriptPubKey.GetID()))
+            return MINE_WATCH_ONLY;
+        return MINE_NO;
+    }
 
     CKeyID keyID;
     switch (whichType)
     {
     case TX_NONSTANDARD:
     case TX_NULL_DATA:
-        return false;
+        break;
     case TX_PUBKEY:
         keyID = CPubKey(vSolutions[0]).GetID();
-        return keystore.HaveKey(keyID);
+        if (keystore.HaveKey(keyID))
+            return MINE_SPENDABLE;
+        if (keystore.HaveWatchOnly(keyID))
+            return MINE_WATCH_ONLY;
+        break;
     case TX_PUBKEYHASH:
         keyID = CKeyID(uint160(vSolutions[0]));
-        return keystore.HaveKey(keyID);
+        if (keystore.HaveKey(keyID))
+            return MINE_SPENDABLE;
+        if (keystore.HaveWatchOnly(keyID))
+            return MINE_WATCH_ONLY;
+        break;
     case TX_SCRIPTHASH:
     {
+        CScriptID scriptID = CScriptID(uint160(vSolutions[0]));
         CScript subscript;
-        if (!keystore.GetCScript(CScriptID(uint160(vSolutions[0])), subscript))
-            return false;
-        return IsMine(keystore, subscript);
+        if (keystore.GetCScript(scriptID, subscript)) {
+            isminetype ret = IsMine(keystore, subscript);
+            if (ret)
+                return ret;
+        }
+        if (keystore.HaveWatchOnly(scriptID))
+            return MINE_WATCH_ONLY;
+        break;
     }
     case TX_MULTISIG:
     {
@@ -1495,10 +1516,15 @@ bool IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         // them) enable spend-out-from-under-you attacks, especially
         // in shared-wallet situations.
         vector<valtype> keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1);
-        return HaveKeys(keys, keystore) == keys.size();
+        if (HaveKeys(keys, keystore) == keys.size())
+            return MINE_SPENDABLE;
+        break;
     }
     }
-    return false;
+
+    if (keystore.HaveWatchOnly(scriptPubKey.GetID()))
+        return MINE_WATCH_ONLY;
+    return MINE_NO;
 }
 
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
diff --git a/src/script.h b/src/script.h
index 7ab471f6e63b..1db758094eaa 100644
--- a/src/script.h
+++ b/src/script.h
@@ -194,6 +194,14 @@ enum
     SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
 };
 
+/** IsMine() return codes */
+enum isminetype
+{
+    MINE_NO = 0,
+    MINE_WATCH_ONLY = 1,
+    MINE_SPENDABLE = 2,
+};
+
 // Mandatory script verification flags that all new blocks must comply with for
 // them to be valid. (but old blocks may not comply with) Currently just P2SH,
 // but in the future other flags may be added, such as a soft-fork to enforce
@@ -801,8 +809,8 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
 int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
 bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
-bool IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
-bool IsMine(const CKeyStore& keystore, const CTxDestination &dest);
+isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
+isminetype IsMine(const CKeyStore& keystore, const CTxDestination &dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp
index 86a83f516396..3887efbd0d98 100644
--- a/src/test/wallet_tests.cpp
+++ b/src/test/wallet_tests.cpp
@@ -46,7 +46,7 @@ static void add_coin(int64_t nValue, int nAge = 6*24, bool fIsFromMe = false, in
         wtx->fDebitCached = true;
         wtx->nDebitCached = 1;
     }
-    COutput output(wtx, nInput, nAge);
+    COutput output(wtx, nInput, nAge, true);
     vCoins.push_back(output);
 }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index daca7ac04b3d..3d679f4c564e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -145,6 +145,22 @@ bool CWallet::LoadCScript(const CScript& redeemScript)
     return CCryptoKeyStore::AddCScript(redeemScript);
 }
 
+bool CWallet::AddWatchOnly(const CTxDestination &dest)
+{
+    if (!CCryptoKeyStore::AddWatchOnly(dest))
+        return false;
+    nTimeFirstKey = 1; // No birthday information for watch-only keys.
+    if (!fFileBacked)
+        return true;
+    return CWalletDB(strWalletFile).WriteWatchOnly(dest);
+}
+
+bool CWallet::LoadWatchOnly(const CTxDestination &dest)
+{
+    LogPrintf("Loaded %s!\n", CBitcoinAddress(dest).ToString().c_str());
+    return CCryptoKeyStore::AddWatchOnly(dest);
+}
+
 bool CWallet::Unlock(const SecureString& strWalletPassphrase)
 {
     CCrypter crypter;
@@ -680,7 +696,7 @@ void CWallet::EraseFromWallet(const uint256 &hash)
 }
 
 
-bool CWallet::IsMine(const CTxIn &txin) const
+isminetype CWallet::IsMine(const CTxIn &txin) const
 {
     {
         LOCK(cs_wallet);
@@ -689,11 +705,10 @@ bool CWallet::IsMine(const CTxIn &txin) const
         {
             const CWalletTx& prev = (*mi).second;
             if (txin.prevout.n < prev.vout.size())
-                if (IsMine(prev.vout[txin.prevout.n]))
-                    return true;
+                return IsMine(prev.vout[txin.prevout.n]);
         }
     }
-    return false;
+    return MINE_NO;
 }
 
 int64_t CWallet::GetDebit(const CTxIn &txin) const
@@ -1051,7 +1066,7 @@ int64_t CWallet::GetImmatureBalance() const
     return nTotal;
 }
 
-// populate vCoins with vector of spendable COutputs
+// populate vCoins with vector of available COutputs.
 void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const
 {
     vCoins.clear();
@@ -1077,10 +1092,11 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
                 continue;
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
-                if (!(IsSpent(wtxid, i)) && IsMine(pcoin->vout[i]) &&
+                isminetype mine = IsMine(pcoin->vout[i]);
+                if (!(IsSpent(wtxid, i)) && mine != MINE_NO &&
                     !IsLockedCoin((*it).first, i) && pcoin->vout[i].nValue > 0 &&
                     (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
-                        vCoins.push_back(COutput(pcoin, i, nDepth));
+                        vCoins.push_back(COutput(pcoin, i, nDepth, mine & MINE_SPENDABLE));
             }
         }
     }
@@ -1147,8 +1163,11 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
 
     random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt);
 
-    BOOST_FOREACH(COutput output, vCoins)
+    BOOST_FOREACH(const COutput &output, vCoins)
     {
+        if (!output.fSpendable)
+            continue;
+
         const CWalletTx *pcoin = output.tx;
 
         if (output.nDepth < (pcoin->IsFromMe() ? nConfMine : nConfTheirs))
diff --git a/src/wallet.h b/src/wallet.h
index 1c2512d67819..ff6af3a6a8df 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -226,6 +226,11 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     /// Look up a destination data tuple in the store, return true if found false otherwise
     bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const;
 
+    // Adds a watch-only address to the store, and saves it to disk.
+    bool AddWatchOnly(const CTxDestination &dest);
+    // Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
+    bool LoadWatchOnly(const CTxDestination &dest);
+
     bool Unlock(const SecureString& strWalletPassphrase);
     bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
     bool EncryptWallet(const SecureString& strWalletPassphrase);
@@ -279,9 +284,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
-    bool IsMine(const CTxIn& txin) const;
+    isminetype IsMine(const CTxIn& txin) const;
     int64_t GetDebit(const CTxIn& txin) const;
-    bool IsMine(const CTxOut& txout) const
+    isminetype IsMine(const CTxOut& txout) const
     {
         return ::IsMine(*this, txout.scriptPubKey);
     }
@@ -722,10 +727,11 @@ class COutput
     const CWalletTx *tx;
     int i;
     int nDepth;
+    bool fSpendable;
 
-    COutput(const CWalletTx *txIn, int iIn, int nDepthIn)
+    COutput(const CWalletTx *txIn, int iIn, int nDepthIn, bool fSpendableIn)
     {
-        tx = txIn; i = iIn; nDepth = nDepthIn;
+        tx = txIn; i = iIn; nDepth = nDepthIn; fSpendable = fSpendableIn;
     }
 
     std::string ToString() const
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 3ce2ef019c54..9338d57097e5 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -112,6 +112,12 @@ bool CWalletDB::WriteCScript(const uint160& hash, const CScript& redeemScript)
     return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false);
 }
 
+bool CWalletDB::WriteWatchOnly(const CTxDestination &dest)
+{
+    nWalletDBUpdated++;
+    return Write(std::make_pair(std::string("watch"), CBitcoinAddress(dest).ToString()), '1');
+}
+
 bool CWalletDB::WriteBestBlock(const CBlockLocator& locator)
 {
     nWalletDBUpdated++;
@@ -404,6 +410,19 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
                     wss.fAnyUnordered = true;
             }
         }
+        else if (strType == "watch")
+        {
+            std::string strAddress;
+            ssKey >> strAddress;
+            char fYes;
+            ssValue >> fYes;
+            if (fYes == '1')
+                pwallet->LoadWatchOnly(CBitcoinAddress(strAddress).Get());
+
+            // Watch-only addresses have no birthday information for now,
+            // so set the wallet birthday to the beginning of time.
+            pwallet->nTimeFirstKey = 1;
+        }
         else if (strType == "key" || strType == "wkey")
         {
             CPubKey vchPubKey;
diff --git a/src/walletdb.h b/src/walletdb.h
index 8eb716acbb9c..3a6cb152a1bd 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -7,6 +7,7 @@
 
 #include "db.h"
 #include "key.h"
+#include "keystore.h"
 
 #include <list>
 #include <stdint.h>
@@ -93,6 +94,8 @@ class CWalletDB : public CDB
 
     bool WriteCScript(const uint160& hash, const CScript& redeemScript);
 
+    bool WriteWatchOnly(const CTxDestination &dest);
+
     bool WriteBestBlock(const CBlockLocator& locator);
     bool ReadBestBlock(CBlockLocator& locator);
 

From 2935b211033610d7ef0deef9bf1b344a5bac029f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 10 Dec 2013 15:27:53 +0100
Subject: [PATCH 0296/1819] qt: Hide unspendable outputs in coin control

---
 src/qt/walletmodel.cpp | 6 ++++--
 src/wallet.cpp         | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index d32e74b78a54..098d39e8a720 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -60,7 +60,8 @@ qint64 WalletModel::getBalance(const CCoinControl *coinControl) const
         std::vector<COutput> vCoins;
         wallet->AvailableCoins(vCoins, true, coinControl);
         BOOST_FOREACH(const COutput& out, vCoins)
-            nBalance += out.tx->vout[out.i].nValue;
+            if(out.fSpendable)
+                nBalance += out.tx->vout[out.i].nValue;
 
         return nBalance;
     }
@@ -585,7 +586,8 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
         }
 
         CTxDestination address;
-        if(!ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address)) continue;
+        if(!out.fSpendable || !ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address))
+            continue;
         mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out);
     }
 }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3d679f4c564e..40ace9c40b71 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1259,6 +1259,8 @@ bool CWallet::SelectCoins(int64_t nTargetValue, set<pair<const CWalletTx*,unsign
     {
         BOOST_FOREACH(const COutput& out, vCoins)
         {
+            if(!out.fSpendable)
+                continue;
             nValueRet += out.tx->vout[out.i].nValue;
             setCoinsRet.insert(make_pair(out.tx, out.i));
         }

From ffd40da361639faeef405c7e4a504a340d77aa5b Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Sat, 29 Mar 2014 05:15:28 +0100
Subject: [PATCH 0297/1819] Watchonly balances are shown separately in gui.

---
 src/qt/forms/overviewpage.ui | 533 +++++++++++++++++++++++------------
 src/qt/overviewpage.cpp      |  34 ++-
 src/qt/overviewpage.h        |   6 +-
 src/qt/sendcoinsdialog.cpp   |  13 +-
 src/qt/sendcoinsdialog.h     |   3 +-
 src/qt/transactiondesc.cpp   |  64 +++--
 src/qt/transactionrecord.cpp |  17 +-
 src/qt/walletmodel.cpp       |  27 +-
 src/qt/walletmodel.h         |   9 +-
 src/rpcdump.cpp              |   4 +-
 src/rpcmisc.cpp              |   2 +-
 src/script.h                 |   2 +
 src/wallet.cpp               |  53 +++-
 src/wallet.h                 |  71 ++++-
 14 files changed, 601 insertions(+), 237 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index e662912781c6..8784da5f3e6f 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>573</width>
+    <width>596</width>
     <height>342</height>
    </rect>
   </property>
@@ -46,204 +46,369 @@
           <item>
            <layout class="QHBoxLayout" name="horizontalLayout_4">
             <item>
-             <widget class="QLabel" name="label_5">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="text">
-               <string>Wallet</string>
-              </property>
-             </widget>
-            </item>
-            <item>
-             <widget class="QLabel" name="labelWalletStatus">
-              <property name="toolTip">
-               <string>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.</string>
-              </property>
-              <property name="styleSheet">
-               <string notr="true">QLabel { color: red; }</string>
-              </property>
-              <property name="text">
-               <string notr="true">(out of sync)</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-              </property>
-             </widget>
+             <layout class="QHBoxLayout" name="horizontalLayout_7">
+              <item>
+               <widget class="QLabel" name="label_5">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="text">
+                 <string>Wallet</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="labelWalletStatus">
+                <property name="toolTip">
+                 <string>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.</string>
+                </property>
+                <property name="styleSheet">
+                 <string notr="true">QLabel { color: red; }</string>
+                </property>
+                <property name="text">
+                 <string notr="true">(out of sync)</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+                </property>
+               </widget>
+              </item>
+             </layout>
             </item>
             <item>
-             <spacer name="horizontalSpacer_2">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-              <property name="sizeHint" stdset="0">
-               <size>
-                <width>40</width>
-                <height>20</height>
-               </size>
-              </property>
-             </spacer>
+             <layout class="QHBoxLayout" name="horizontalLayout_8">
+              <item>
+               <widget class="QLabel" name="labelWatchonly">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="text">
+                 <string>Watchonly:</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignCenter</set>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="horizontalSpacer_2">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+                <property name="sizeType">
+                 <enum>QSizePolicy::Preferred</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>40</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
             </item>
            </layout>
           </item>
           <item>
-          <layout class="QHBoxLayout" name="horizontalLayout_3">
-           <item>
-           <layout class="QFormLayout" name="formLayout_2">
-            <property name="fieldGrowthPolicy">
-             <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-            </property>
-            <property name="horizontalSpacing">
-             <number>12</number>
-            </property>
-            <property name="verticalSpacing">
-             <number>12</number>
-            </property>
-            <item row="0" column="0">
-             <widget class="QLabel" name="label">
-              <property name="text">
-               <string>Available:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="0" column="1">
-             <widget class="QLabel" name="labelBalance">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="cursor">
-               <cursorShape>IBeamCursor</cursorShape>
-              </property>
-              <property name="toolTip">
-               <string>Your current spendable balance</string>
-              </property>
-              <property name="text">
-               <string notr="true">0 BTC</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-              </property>
-              <property name="textInteractionFlags">
-               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="0">
-             <widget class="QLabel" name="label_3">
-              <property name="text">
-               <string>Pending:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="1" column="1">
-             <widget class="QLabel" name="labelUnconfirmed">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="cursor">
-               <cursorShape>IBeamCursor</cursorShape>
-              </property>
-              <property name="toolTip">
-               <string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
-              </property>
-              <property name="text">
-               <string notr="true">0 BTC</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-              </property>
-              <property name="textInteractionFlags">
-               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="0">
-             <widget class="QLabel" name="labelImmatureText">
-              <property name="text">
-               <string>Immature:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="2" column="1">
-             <widget class="QLabel" name="labelImmature">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="toolTip">
-               <string>Mined balance that has not yet matured</string>
-              </property>
-              <property name="text">
-               <string notr="true">0 BTC</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-              </property>
-              <property name="textInteractionFlags">
-               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-              </property>
-             </widget>
-            </item>
-            <item row="4" column="0">
-             <widget class="QLabel" name="labelTotalText">
-              <property name="text">
-               <string>Total:</string>
-              </property>
-             </widget>
-            </item>
-            <item row="4" column="1">
-             <widget class="QLabel" name="labelTotal">
-              <property name="font">
-               <font>
-                <weight>75</weight>
-                <bold>true</bold>
-               </font>
-              </property>
-              <property name="cursor">
-               <cursorShape>IBeamCursor</cursorShape>
-              </property>
-              <property name="toolTip">
-               <string>Your current total balance</string>
-              </property>
-              <property name="text">
-               <string notr="true">0 BTC</string>
-              </property>
-              <property name="alignment">
-               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-              </property>
-              <property name="textInteractionFlags">
-               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-              </property>
-             </widget>
+           <layout class="QHBoxLayout" name="horizontalLayout_3">
+            <item>
+             <layout class="QFormLayout" name="formLayout_2">
+              <property name="fieldGrowthPolicy">
+               <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+              </property>
+              <property name="horizontalSpacing">
+               <number>12</number>
+              </property>
+              <property name="verticalSpacing">
+               <number>12</number>
+              </property>
+              <item row="0" column="0">
+               <widget class="QLabel" name="label">
+                <property name="text">
+                 <string>Available:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="0" column="1">
+               <widget class="QLabel" name="labelBalance">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Your current spendable balance</string>
+                </property>
+                <property name="text">
+                 <string notr="true">0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="0">
+               <widget class="QLabel" name="label_3">
+                <property name="text">
+                 <string>Pending:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QLabel" name="labelUnconfirmed">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
+                </property>
+                <property name="text">
+                 <string notr="true">0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="0">
+               <widget class="QLabel" name="labelImmatureText">
+                <property name="text">
+                 <string>Immature:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="1">
+               <widget class="QLabel" name="labelImmature">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Mined balance that has not yet matured</string>
+                </property>
+                <property name="text">
+                 <string notr="true">0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0" colspan="2">
+               <widget class="Line" name="line">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item row="4" column="0">
+               <widget class="QLabel" name="labelTotalText">
+                <property name="text">
+                 <string>Total:</string>
+                </property>
+               </widget>
+              </item>
+              <item row="4" column="1">
+               <widget class="QLabel" name="labelTotal">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Your current total balance</string>
+                </property>
+                <property name="text">
+                 <string notr="true">0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+             </layout>
             </item>
-            <item row="3" column="0" colspan="2">
-             <widget class="Line" name="line">
-              <property name="orientation">
-               <enum>Qt::Horizontal</enum>
-              </property>
-             </widget>
+            <item>
+             <layout class="QFormLayout" name="formLayout">
+              <property name="fieldGrowthPolicy">
+               <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+              </property>
+              <property name="horizontalSpacing">
+               <number>12</number>
+              </property>
+              <property name="verticalSpacing">
+               <number>12</number>
+              </property>
+              <item row="0" column="1">
+               <widget class="QLabel" name="labelWatchAvailable">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Your current balance in watchonly addresses</string>
+                </property>
+                <property name="text">
+                 <string>0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="1" column="1">
+               <widget class="QLabel" name="labelWatchPending">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Unconfirmed transactions to watchonly addresses</string>
+                </property>
+                <property name="text">
+                 <string>0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="2" column="1">
+               <widget class="QLabel" name="labelWatchImmature">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Mined balance in watchonly addresses that has not yet matured</string>
+                </property>
+                <property name="text">
+                 <string>0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+              <item row="3" column="0" colspan="2">
+               <widget class="Line" name="lineWatchBalance">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="minimumSize">
+                 <size>
+                  <width>140</width>
+                  <height>0</height>
+                 </size>
+                </property>
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item row="4" column="1">
+               <widget class="QLabel" name="labelWatchTotal">
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="cursor">
+                 <cursorShape>IBeamCursor</cursorShape>
+                </property>
+                <property name="toolTip">
+                 <string>Current total balance in watchonly addresses</string>
+                </property>
+                <property name="text">
+                 <string>0 BTC</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="textInteractionFlags">
+                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+                </property>
+               </widget>
+              </item>
+             </layout>
             </item>
-           </layout>
-          </item>
             <item>
              <spacer name="horizontalSpacer_3">
               <property name="orientation">
                <enum>Qt::Horizontal</enum>
               </property>
+              <property name="sizeType">
+               <enum>QSizePolicy::Expanding</enum>
+              </property>
               <property name="sizeHint" stdset="0">
                <size>
-                <width>40</width>
+                <width>20</width>
                 <height>20</height>
                </size>
               </property>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1a9d1de571d9..1278f368cff0 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -103,6 +103,9 @@ OverviewPage::OverviewPage(QWidget *parent) :
     currentBalance(-1),
     currentUnconfirmedBalance(-1),
     currentImmatureBalance(-1),
+    currentWatchOnlyBalance(-1),
+    currentWatchUnconfBalance(-1),
+    currentWatchImmatureBalance(-1),
     txdelegate(new TxViewDelegate()),
     filter(0)
 {
@@ -135,22 +138,39 @@ OverviewPage::~OverviewPage()
     delete ui;
 }
 
-void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance)
+void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance, qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance)
 {
     int unit = walletModel->getOptionsModel()->getDisplayUnit();
     currentBalance = balance;
     currentUnconfirmedBalance = unconfirmedBalance;
     currentImmatureBalance = immatureBalance;
+    currentWatchOnlyBalance = watchOnlyBalance;
+    currentWatchUnconfBalance = watchUnconfBalance;
+    currentWatchImmatureBalance = watchImmatureBalance;
     ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
     ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance));
     ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance));
     ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance));
+    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance));
+    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(unit, watchUnconfBalance));
+    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(unit, watchImmatureBalance));
+    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users
     bool showImmature = immatureBalance != 0;
-    ui->labelImmature->setVisible(showImmature);
-    ui->labelImmatureText->setVisible(showImmature);
+    bool showWatchOnlyImmature = watchImmatureBalance != 0;
+    bool showWatchOnly = (watchOnlyBalance != 0 || watchUnconfBalance != 0 || showWatchOnlyImmature);
+
+    // for symmetry reasons also show immature label when the watchonly one is shown
+    ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);
+    ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
+    ui->labelWatchonly->setVisible(showWatchOnly);              // show Watchonly label
+    ui->lineWatchBalance->setVisible(showWatchOnly);            // show watchonly balance separator line
+    ui->labelWatchAvailable->setVisible(showWatchOnly);         // show watchonly available balance
+    ui->labelWatchImmature->setVisible(showWatchOnlyImmature);  // show watchonly immature balance
+    ui->labelWatchPending->setVisible(showWatchOnly);           // show watchonly pending balance
+    ui->labelWatchTotal->setVisible(showWatchOnly);             // show watchonly total balance
 }
 
 void OverviewPage::setClientModel(ClientModel *model)
@@ -182,8 +202,9 @@ void OverviewPage::setWalletModel(WalletModel *model)
         ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
 
         // Keep up to date with wallet
-        setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64)));
+        setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
+                   model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
+        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64, qint64, qint64)));
 
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
     }
@@ -197,7 +218,8 @@ void OverviewPage::updateDisplayUnit()
     if(walletModel && walletModel->getOptionsModel())
     {
         if(currentBalance != -1)
-            setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance);
+            setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance,
+                       currentWatchOnlyBalance, currentWatchUnconfBalance, currentWatchImmatureBalance);
 
         // Update txdelegate->unit with the current unit
         txdelegate->unit = walletModel->getOptionsModel()->getDisplayUnit();
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 2507a3fb3177..fe00106770ed 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -34,7 +34,8 @@ class OverviewPage : public QWidget
     void showOutOfSyncWarning(bool fShow);
 
 public slots:
-    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance);
+    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
+                    qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
 
 signals:
     void transactionClicked(const QModelIndex &index);
@@ -46,6 +47,9 @@ public slots:
     qint64 currentBalance;
     qint64 currentUnconfirmedBalance;
     qint64 currentImmatureBalance;
+    qint64 currentWatchOnlyBalance;
+    qint64 currentWatchUnconfBalance;
+    qint64 currentWatchImmatureBalance;
 
     TxViewDelegate *txdelegate;
     TransactionFilterProxy *filter;
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index b7d74d703940..6f10ed5b0b05 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -90,8 +90,9 @@ void SendCoinsDialog::setModel(WalletModel *model)
             }
         }
 
-        setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64)));
+        setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
+                   model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
+        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64, qint64, qint64)));
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
         // Coin Control
@@ -383,10 +384,14 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
     return true;
 }
 
-void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance)
+void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance, 
+                                 qint64 watchBalance, qint64 watchUnconfirmedBalance, qint64 watchImmatureBalance)
 {
     Q_UNUSED(unconfirmedBalance);
     Q_UNUSED(immatureBalance);
+    Q_UNUSED(watchBalance);
+    Q_UNUSED(watchUnconfirmedBalance);
+    Q_UNUSED(watchImmatureBalance);
 
     if(model && model->getOptionsModel())
     {
@@ -396,7 +401,7 @@ void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance, qint
 
 void SendCoinsDialog::updateDisplayUnit()
 {
-    setBalance(model->getBalance(), 0, 0);
+    setBalance(model->getBalance(), 0, 0, 0, 0, 0);
 }
 
 void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg)
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index fcae26c72066..6cdf4a00c8dd 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -47,7 +47,8 @@ public slots:
     void accept();
     SendCoinsEntry *addEntry();
     void updateTabsAndLabels();
-    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance);
+    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
+                    qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
 
 private:
     Ui::SendCoinsDialog *ui;
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index e48dbcac9dc3..76dc47318db5 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -89,19 +89,27 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         if (nNet > 0)
         {
             // Credit
-            if (CBitcoinAddress(rec->address).IsValid())
+            BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             {
-                CTxDestination address = CBitcoinAddress(rec->address).Get();
-                if (wallet->mapAddressBook.count(address))
+                if (wallet->IsMine(txout))
                 {
-                    strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
-                    strHTML += "<b>" + tr("To") + ":</b> ";
-                    strHTML += GUIUtil::HtmlEscape(rec->address);
-                    if (!wallet->mapAddressBook[address].name.empty())
-                        strHTML += " (" + tr("own address") + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
-                    else
-                        strHTML += " (" + tr("own address") + ")";
-                    strHTML += "<br>";
+                    if (CBitcoinAddress(rec->address).IsValid())
+                    {
+                        CTxDestination address = CBitcoinAddress(rec->address).Get();
+                        if (wallet->mapAddressBook.count(address))
+                        {
+                            strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
+                            strHTML += "<b>" + tr("To") + ":</b> ";
+                            strHTML += GUIUtil::HtmlEscape(rec->address);
+                            std::string addressOwned = wallet->IsMine(txout) == MINE_SPENDABLE ? "own address" : "watch-only";
+                            if (!wallet->mapAddressBook[address].name.empty())
+                                strHTML += " (" + tr(addressOwned.c_str()) + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
+                            else
+                                strHTML += " (" + tr(addressOwned.c_str()) + ")";
+                            strHTML += "<br>";
+                        }
+                    }
+                    break;
                 }
             }
         }
@@ -148,22 +156,33 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     }
     else
     {
-        bool fAllFromMe = true;
+        isminetype fAllFromMe = MINE_SPENDABLE;
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
-            fAllFromMe = fAllFromMe && wallet->IsMine(txin);
+        {
+            isminetype mine = wallet->IsMine(txin);
+            if(fAllFromMe > mine) fAllFromMe = mine;
+        }
 
-        bool fAllToMe = true;
+        isminetype fAllToMe = MINE_SPENDABLE;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
-            fAllToMe = fAllToMe && wallet->IsMine(txout);
+        {
+            isminetype mine = wallet->IsMine(txout);
+            if(fAllToMe > mine) fAllToMe = mine;
+        }
 
         if (fAllFromMe)
         {
+            if(fAllFromMe == MINE_WATCH_ONLY)
+                strHTML += "<b>" + tr("From") + ":</b> " + tr("watch-only") + "<br>";
+
             //
             // Debit
             //
             BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             {
-                if (wallet->IsMine(txout))
+                // Ignore change
+                isminetype toSelf = wallet->IsMine(txout);
+                if ((toSelf == MINE_SPENDABLE) && (fAllFromMe == MINE_SPENDABLE))
                     continue;
 
                 if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty())
@@ -176,11 +195,17 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                         if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].name.empty())
                             strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + " ";
                         strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString());
+                        if(toSelf == MINE_SPENDABLE)
+                            strHTML += " (own address)";
+                        else if(toSelf == MINE_WATCH_ONLY)
+                            strHTML += " (watch-only)";
                         strHTML += "<br>";
                     }
                 }
 
                 strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -txout.nValue) + "<br>";
+                if(toSelf)
+                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, txout.nValue) + "<br>";
             }
 
             if (fAllToMe)
@@ -188,8 +213,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                 // Payment to self
                 int64_t nChange = wtx.GetChange();
                 int64_t nValue = nCredit - nChange;
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -nValue) + "<br>";
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nValue) + "<br>";
+                strHTML += "<b>" + tr("Total debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -nValue) + "<br>";
+                strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, nValue) + "<br>";
             }
 
             int64_t nTxFee = nDebit - wtx.GetValueOut();
@@ -286,7 +311,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                         strHTML += QString::fromStdString(CBitcoinAddress(address).ToString());
                     }
                     strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatWithUnit(unit, vout.nValue);
-                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) ? tr("true") : tr("false")) + "</li>";
+                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & MINE_SPENDABLE ? tr("true") : tr("false")) + "</li>";
+                    strHTML = strHTML + " IsWatchOnly=" + (wallet->IsMine(vout) & MINE_WATCH_ONLY ? tr("true") : tr("false")) + "</li>";
                 }
             }
         }
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 21f1b7356f79..3d77d39893f5 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -45,7 +45,8 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
         //
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
         {
-            if(wallet->IsMine(txout))
+            isminetype mine = wallet->IsMine(txout);
+            if(mine)
             {
                 TransactionRecord sub(hash, nTime);
                 CTxDestination address;
@@ -75,13 +76,19 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
     }
     else
     {
-        bool fAllFromMe = true;
+        isminetype fAllFromMe = MINE_SPENDABLE;
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
-            fAllFromMe = fAllFromMe && wallet->IsMine(txin);
+        {
+            isminetype mine = wallet->IsMine(txin);
+            if(fAllFromMe > mine) fAllFromMe = mine;
+        }
 
-        bool fAllToMe = true;
+        isminetype fAllToMe = MINE_SPENDABLE;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
-            fAllToMe = fAllToMe && wallet->IsMine(txout);
+        {
+            isminetype mine = wallet->IsMine(txout);
+            if(fAllToMe > mine) fAllToMe = mine;
+        }
 
         if (fAllFromMe && fAllToMe)
         {
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 098d39e8a720..7317c3276655 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -79,6 +79,21 @@ qint64 WalletModel::getImmatureBalance() const
     return wallet->GetImmatureBalance();
 }
 
+qint64 WalletModel::getWatchBalance() const
+{
+    return wallet->GetWatchOnlyBalance();
+}
+
+qint64 WalletModel::getWatchUnconfirmedBalance() const
+{
+    return wallet->GetUnconfirmedWatchOnlyBalance();
+}
+
+qint64 WalletModel::getWatchImmatureBalance() const
+{
+    return wallet->GetImmatureWatchOnlyBalance();
+}
+
 int WalletModel::getNumTransactions() const
 {
     int numTransactions = 0;
@@ -127,13 +142,21 @@ void WalletModel::checkBalanceChanged()
     qint64 newBalance = getBalance();
     qint64 newUnconfirmedBalance = getUnconfirmedBalance();
     qint64 newImmatureBalance = getImmatureBalance();
+    qint64 newWatchOnlyBalance = getWatchBalance();
+    qint64 newWatchUnconfBalance = getWatchUnconfirmedBalance();
+    qint64 newWatchImmatureBalance = getWatchImmatureBalance();
 
-    if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)
+    if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance ||
+        cachedWatchOnlyBalance != newWatchOnlyBalance || cachedWatchUnconfBalance != newWatchUnconfBalance || cachedWatchImmatureBalance != newWatchImmatureBalance)
     {
         cachedBalance = newBalance;
         cachedUnconfirmedBalance = newUnconfirmedBalance;
         cachedImmatureBalance = newImmatureBalance;
-        emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance);
+        cachedWatchOnlyBalance = newWatchOnlyBalance;
+        cachedWatchUnconfBalance = newWatchUnconfBalance;
+        cachedWatchImmatureBalance = newWatchImmatureBalance;
+        emit balanceChanged(newBalance, newUnconfirmedBalance, newImmatureBalance,
+                            newWatchOnlyBalance, newWatchUnconfBalance, newWatchImmatureBalance);
     }
 }
 
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index ccf590aaed60..7ad54ff8e669 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -128,6 +128,9 @@ class WalletModel : public QObject
     qint64 getBalance(const CCoinControl *coinControl = NULL) const;
     qint64 getUnconfirmedBalance() const;
     qint64 getImmatureBalance() const;
+    qint64 getWatchBalance() const;
+    qint64 getWatchUnconfirmedBalance() const;
+    qint64 getWatchImmatureBalance() const;
     int getNumTransactions() const;
     EncryptionStatus getEncryptionStatus() const;
 
@@ -206,6 +209,9 @@ class WalletModel : public QObject
     qint64 cachedBalance;
     qint64 cachedUnconfirmedBalance;
     qint64 cachedImmatureBalance;
+    qint64 cachedWatchOnlyBalance;
+    qint64 cachedWatchUnconfBalance;
+    qint64 cachedWatchImmatureBalance;
     qint64 cachedNumTransactions;
     EncryptionStatus cachedEncryptionStatus;
     int cachedNumBlocks;
@@ -218,7 +224,8 @@ class WalletModel : public QObject
 
 signals:
     // Signal that balance in wallet changed
-    void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance);
+    void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
+                        qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
 
     // Number of transactions in wallet changed
     void numTransactionsChanged(int count);
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 5b325c46eedb..98af4695d62e 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -158,12 +158,14 @@ Value importaddress(const Array& params, bool fHelp)
     {
         LOCK2(cs_main, pwalletMain->cs_wallet);
 
+        // add to address book or update label
+        pwalletMain->SetAddressBook(dest, strLabel, "receive");
+
         // Don't throw error in case an address is already there
         if (pwalletMain->HaveWatchOnly(dest))
             return Value::null;
 
         pwalletMain->MarkDirty();
-        pwalletMain->SetAddressBook(dest, strLabel, "receive");
 
         if (!pwalletMain->AddWatchOnly(dest))
             throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index e2de2dbcdb96..3245f7d713a5 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -171,7 +171,7 @@ Value validateaddress(const Array& params, bool fHelp)
         ret.push_back(Pair("address", currentAddress));
 #ifdef ENABLE_WALLET
         isminetype mine = pwalletMain ? IsMine(*pwalletMain, dest) : MINE_NO;
-        ret.push_back(Pair("ismine", mine != MINE_NO));
+        ret.push_back(Pair("ismine", mine == MINE_SPENDABLE));
         if (mine != MINE_NO) {
             ret.push_back(Pair("watchonly", mine == MINE_WATCH_ONLY));
             Object detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
diff --git a/src/script.h b/src/script.h
index 1db758094eaa..56c7d01d4e5b 100644
--- a/src/script.h
+++ b/src/script.h
@@ -201,6 +201,8 @@ enum isminetype
     MINE_WATCH_ONLY = 1,
     MINE_SPENDABLE = 2,
 };
+/** used for bitflags of isminetype */
+typedef uint8_t isminefilter;
 
 // Mandatory script verification flags that all new blocks must comply with for
 // them to be valid. (but old blocks may not comply with) Currently just P2SH,
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 40ace9c40b71..d4e9fe9d18fa 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -738,7 +738,7 @@ bool CWallet::IsChange(const CTxOut& txout) const
     // a better way of identifying which outputs are 'the send' and which are
     // 'the change' will need to be implemented (maybe extend CWalletTx to remember
     // which output, if any, was change).
-    if (ExtractDestination(txout.scriptPubKey, address) && ::IsMine(*this, address))
+    if (ExtractDestination(txout.scriptPubKey, address) && ::IsMine(*this, address) == MINE_SPENDABLE)
     {
         LOCK(cs_wallet);
         if (!mapAddressBook.count(address))
@@ -793,7 +793,7 @@ int CWalletTx::GetRequestCount() const
 }
 
 void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
-                           list<pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, string& strSentAccount) const
+                           list<pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, string& strSentAccount, const isminefilter& filter) const
 {
     nFee = 0;
     listReceived.clear();
@@ -820,9 +820,9 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
             // Don't report 'change' txouts
             if (pwallet->IsChange(txout))
                 continue;
-            fIsMine = pwallet->IsMine(txout);
+            fIsMine = (pwallet->IsMine(txout) & filter);
         }
-        else if (!(fIsMine = pwallet->IsMine(txout)))
+        else if (!(fIsMine = (pwallet->IsMine(txout) & filter)))
             continue;
 
         // In either case, we need to get the destination address
@@ -1066,6 +1066,51 @@ int64_t CWallet::GetImmatureBalance() const
     return nTotal;
 }
 
+int64_t CWallet::GetWatchOnlyBalance() const
+{
+    int64_t nTotal = 0;
+    {
+        LOCK(cs_wallet);
+        for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
+        {
+            const CWalletTx* pcoin = &(*it).second;
+            if (pcoin->IsTrusted())
+                nTotal += pcoin->GetAvailableWatchOnlyCredit();
+        }
+    }
+    
+    return nTotal;
+}
+
+int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
+{
+    int64_t nTotal = 0;
+    {
+        LOCK(cs_wallet);
+        for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
+        {
+            const CWalletTx* pcoin = &(*it).second;
+            if (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && pcoin->GetDepthInMainChain() == 0))
+                nTotal += pcoin->GetAvailableWatchOnlyCredit();
+        }
+    }
+    return nTotal;
+}
+
+int64_t CWallet::GetImmatureWatchOnlyBalance() const
+{
+    int64_t nTotal = 0;
+    {
+        LOCK(cs_wallet);
+        for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
+        {
+            const CWalletTx* pcoin = &(*it).second;
+            nTotal += pcoin->GetImmatureWatchOnlyCredit();
+        }
+    }
+    return nTotal;
+}
+
 // populate vCoins with vector of available COutputs.
 void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const
 {
diff --git a/src/wallet.h b/src/wallet.h
index ff6af3a6a8df..355aa369737b 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -262,6 +262,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     int64_t GetBalance() const;
     int64_t GetUnconfirmedBalance() const;
     int64_t GetImmatureBalance() const;
+    int64_t GetWatchOnlyBalance() const;
+    int64_t GetUnconfirmedWatchOnlyBalance() const;
+    int64_t GetImmatureWatchOnlyBalance() const;
     bool CreateTransaction(const std::vector<std::pair<CScript, int64_t> >& vecSend,
                            CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
     bool CreateTransaction(CScript scriptPubKey, int64_t nValue,
@@ -290,11 +293,11 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     {
         return ::IsMine(*this, txout.scriptPubKey);
     }
-    int64_t GetCredit(const CTxOut& txout) const
+    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter = (MINE_WATCH_ONLY | MINE_SPENDABLE)) const
     {
         if (!MoneyRange(txout.nValue))
             throw std::runtime_error("CWallet::GetCredit() : value out of range");
-        return (IsMine(txout) ? txout.nValue : 0);
+        return ((IsMine(txout) & filter) ? txout.nValue : 0);
     }
     bool IsChange(const CTxOut& txout) const;
     int64_t GetChange(const CTxOut& txout) const
@@ -332,12 +335,12 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         }
         return nDebit;
     }
-    int64_t GetCredit(const CTransaction& tx) const
+    int64_t GetCredit(const CTransaction& tx, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
     {
         int64_t nCredit = 0;
         BOOST_FOREACH(const CTxOut& txout, tx.vout)
         {
-            nCredit += GetCredit(txout);
+            nCredit += GetCredit(txout, filter);
             if (!MoneyRange(nCredit))
                 throw std::runtime_error("CWallet::GetCredit() : value out of range");
         }
@@ -483,11 +486,15 @@ class CWalletTx : public CMerkleTx
     mutable bool fCreditCached;
     mutable bool fImmatureCreditCached;
     mutable bool fAvailableCreditCached;
+    mutable bool fImmatureWatchCreditCached;
+    mutable bool fAvailableWatchCreditCached;
     mutable bool fChangeCached;
     mutable int64_t nDebitCached;
     mutable int64_t nCreditCached;
     mutable int64_t nImmatureCreditCached;
     mutable int64_t nAvailableCreditCached;
+    mutable int64_t nImmatureWatchCreditCached;
+    mutable int64_t nAvailableWatchCreditCached;
     mutable int64_t nChangeCached;
 
     CWalletTx()
@@ -524,11 +531,15 @@ class CWalletTx : public CMerkleTx
         fCreditCached = false;
         fImmatureCreditCached = false;
         fAvailableCreditCached = false;
+        fImmatureWatchCreditCached = false;
+        fAvailableWatchCreditCached = false;
         fChangeCached = false;
         nDebitCached = 0;
         nCreditCached = 0;
         nImmatureCreditCached = 0;
         nAvailableCreditCached = 0;
+        nAvailableWatchCreditCached = 0;
+        nImmatureWatchCreditCached = 0;
         nChangeCached = 0;
         nOrderPos = -1;
     }
@@ -581,6 +592,8 @@ class CWalletTx : public CMerkleTx
     {
         fCreditCached = false;
         fAvailableCreditCached = false;
+        fAvailableWatchCreditCached = false;
+        fImmatureWatchCreditCached = false;
         fDebitCached = false;
         fChangeCached = false;
     }
@@ -622,7 +635,7 @@ class CWalletTx : public CMerkleTx
         {
             if (fUseCache && fImmatureCreditCached)
                 return nImmatureCreditCached;
-            nImmatureCreditCached = pwallet->GetCredit(*this);
+            nImmatureCreditCached = pwallet->GetCredit(*this, MINE_SPENDABLE);
             fImmatureCreditCached = true;
             return nImmatureCreditCached;
         }
@@ -649,7 +662,7 @@ class CWalletTx : public CMerkleTx
             if (!pwallet->IsSpent(hashTx, i))
             {
                 const CTxOut &txout = vout[i];
-                nCredit += pwallet->GetCredit(txout);
+                nCredit += pwallet->GetCredit(txout, MINE_SPENDABLE);
                 if (!MoneyRange(nCredit))
                     throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
             }
@@ -660,6 +673,48 @@ class CWalletTx : public CMerkleTx
         return nCredit;
     }
 
+    int64_t GetImmatureWatchOnlyCredit(const bool& fUseCache=true) const
+    {
+        if (IsCoinBase() && GetBlocksToMaturity() > 0 && IsInMainChain())
+        {
+            if (fUseCache && fImmatureWatchCreditCached)
+                return nImmatureWatchCreditCached;
+            nImmatureWatchCreditCached = pwallet->GetCredit(*this, MINE_WATCH_ONLY);
+            fImmatureWatchCreditCached = true;
+            return nImmatureWatchCreditCached;
+        }
+
+        return 0;
+    }
+
+    int64_t GetAvailableWatchOnlyCredit(const bool& fUseCache=true) const
+    {
+        if (pwallet == 0)
+            return 0;
+
+        // Must wait until coinbase is safely deep enough in the chain before valuing it
+        if (IsCoinBase() && GetBlocksToMaturity() > 0)
+            return 0;
+
+        if (fUseCache && fAvailableWatchCreditCached)
+            return nAvailableWatchCreditCached;
+
+        int64_t nCredit = 0;
+        for (unsigned int i = 0; i < vout.size(); i++)
+        {
+            if (!pwallet->IsSpent(GetHash(), i))
+            {
+                const CTxOut &txout = vout[i];
+                nCredit += pwallet->GetCredit(txout, MINE_WATCH_ONLY);
+                if (!MoneyRange(nCredit))
+                    throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
+            }
+        }
+
+        nAvailableWatchCreditCached = nCredit;
+        fAvailableWatchCreditCached = true;
+        return nCredit;
+    }
 
     int64_t GetChange() const
     {
@@ -671,7 +726,7 @@ class CWalletTx : public CMerkleTx
     }
 
     void GetAmounts(std::list<std::pair<CTxDestination, int64_t> >& listReceived,
-                    std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount) const;
+                    std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
 
     void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
                            int64_t& nSent, int64_t& nFee) const;
@@ -702,7 +757,7 @@ class CWalletTx : public CMerkleTx
             if (parent == NULL)
                 return false;
             const CTxOut& parentOut = parent->vout[txin.prevout.n];
-            if (!pwallet->IsMine(parentOut))
+            if (pwallet->IsMine(parentOut) != MINE_SPENDABLE)
                 return false;
         }
         return true;

From d2692f61164730322547871f2124de06ade0436b Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Sat, 5 Apr 2014 21:36:48 +0200
Subject: [PATCH 0298/1819] Watchonly transactions are marked in transaction
 history

---
 src/qt/transactionrecord.cpp     |  7 +++++++
 src/qt/transactionrecord.h       |  3 +++
 src/qt/transactiontablemodel.cpp | 11 +++++++----
 3 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 3d77d39893f5..1011363f3ef6 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -70,16 +70,19 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                     sub.type = TransactionRecord::Generated;
                 }
 
+                sub.involvesWatchAddress = mine == MINE_WATCH_ONLY;
                 parts.append(sub);
             }
         }
     }
     else
     {
+        bool involvesWatchAddress = false;
         isminetype fAllFromMe = MINE_SPENDABLE;
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
         {
             isminetype mine = wallet->IsMine(txin);
+            if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
             if(fAllFromMe > mine) fAllFromMe = mine;
         }
 
@@ -87,6 +90,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
         {
             isminetype mine = wallet->IsMine(txout);
+            if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
             if(fAllToMe > mine) fAllToMe = mine;
         }
 
@@ -97,6 +101,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
 
             parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
                             -(nDebit - nChange), nCredit - nChange));
+            parts.last().involvesWatchAddress = involvesWatchAddress;
         }
         else if (fAllFromMe)
         {
@@ -141,6 +146,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                 }
                 sub.debit = -nValue;
 
+                sub.involvesWatchAddress = involvesWatchAddress;
                 parts.append(sub);
             }
         }
@@ -150,6 +156,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
             // Mixed debit transaction, can't break down payees
             //
             parts.append(TransactionRecord(hash, nTime, TransactionRecord::Other, "", nNet, 0));
+            parts.last().involvesWatchAddress = involvesWatchAddress;
         }
     }
 
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 37679cebfaf7..d3cfa77d97be 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -137,6 +137,9 @@ class TransactionRecord
     /** Status: can change with block chain update */
     TransactionStatus status;
 
+    /** Whether the transaction was sent/received with a watch-only address */
+    bool involvesWatchAddress;
+
     /** Return the unique identifier for this transaction (part) */
     QString getTxID() const;
 
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index a935752246bf..c357d26a9d5f 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -390,19 +390,22 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
 
 QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
 {
+    // mark transactions involving watch-only addresses:
+    QString watchAddress = wtx->involvesWatchAddress ? " (w) " : "";
+
     switch(wtx->type)
     {
     case TransactionRecord::RecvFromOther:
-        return QString::fromStdString(wtx->address);
+        return QString::fromStdString(wtx->address) + watchAddress;
     case TransactionRecord::RecvWithAddress:
     case TransactionRecord::SendToAddress:
     case TransactionRecord::Generated:
-        return lookupAddress(wtx->address, tooltip);
+        return lookupAddress(wtx->address, tooltip) + watchAddress;
     case TransactionRecord::SendToOther:
-        return QString::fromStdString(wtx->address);
+        return QString::fromStdString(wtx->address) + watchAddress;
     case TransactionRecord::SendToSelf:
     default:
-        return tr("(n/a)");
+        return tr("(n/a)") + watchAddress;
     }
 }
 

From d4640d7d8c3ba373195d33ab75db9c8cb43f8806 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Tue, 8 Apr 2014 15:23:50 +0200
Subject: [PATCH 0299/1819] Added argument to getbalance to include watchonly
 addresses and fixed errors in balance calculation.

---
 src/rpcclient.cpp |  1 +
 src/rpcwallet.cpp | 23 +++++++++++++--------
 src/wallet.cpp    | 10 ++++-----
 src/wallet.h      | 52 +++++++++++++++++++++++++++++++++++++----------
 4 files changed, 62 insertions(+), 24 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 76c99e7c9f7f..ea5ca8e0f6f1 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -40,6 +40,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listreceivedbyaccount", 0 },
     { "listreceivedbyaccount", 1 },
     { "getbalance", 1 },
+    { "getbalance", 2 },
     { "getblockhash", 0 },
     { "move", 2 },
     { "move", 3 },
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 38e96133b4c9..79b438d4173e 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -557,7 +557,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
 }
 
 
-int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth)
+int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth, const isminefilter& filter = MINE_SPENDABLE)
 {
     int64_t nBalance = 0;
 
@@ -569,7 +569,7 @@ int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMi
             continue;
 
         int64_t nReceived, nSent, nFee;
-        wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee);
+        wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee, filter);
 
         if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth)
             nBalance += nReceived;
@@ -582,18 +582,18 @@ int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMi
     return nBalance;
 }
 
-int64_t GetAccountBalance(const string& strAccount, int nMinDepth)
+int64_t GetAccountBalance(const string& strAccount, int nMinDepth, const isminefilter& filter = MINE_SPENDABLE)
 {
     CWalletDB walletdb(pwalletMain->strWalletFile);
-    return GetAccountBalance(walletdb, strAccount, nMinDepth);
+    return GetAccountBalance(walletdb, strAccount, nMinDepth, filter);
 }
 
 
 Value getbalance(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() > 2)
+    if (fHelp || params.size() > 3)
         throw runtime_error(
-            "getbalance ( \"account\" minconf )\n"
+            "getbalance ( \"account\" minconf includeWatchonly )\n"
             "\nIf account is not specified, returns the server's total available balance.\n"
             "If account is specified, returns the balance in the account.\n"
             "Note that the account \"\" is not the same as leaving the parameter out.\n"
@@ -601,6 +601,7 @@ Value getbalance(const Array& params, bool fHelp)
             "\nArguments:\n"
             "1. \"account\"      (string, optional) The selected account, or \"*\" for entire wallet. It may be the default account using \"\".\n"
             "2. minconf          (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
+            "3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
             "\nResult:\n"
             "amount              (numeric) The total amount in btc received for this account.\n"
             "\nExamples:\n"
@@ -620,8 +621,14 @@ Value getbalance(const Array& params, bool fHelp)
         return  ValueFromAmount(pwalletMain->GetBalance());
 
     int nMinDepth = 1;
+    isminefilter filter = MINE_SPENDABLE;
     if (params.size() > 1)
+    {
         nMinDepth = params[1].get_int();
+        if(params.size() > 2)
+            if(params[2].get_bool())
+                filter = filter | MINE_WATCH_ONLY;
+    }
 
     if (params[0].get_str() == "*") {
         // Calculate total balance a different way from GetBalance()
@@ -638,7 +645,7 @@ Value getbalance(const Array& params, bool fHelp)
             string strSentAccount;
             list<pair<CTxDestination, int64_t> > listReceived;
             list<pair<CTxDestination, int64_t> > listSent;
-            wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount);
+            wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount, filter);
             if (wtx.GetDepthInMainChain() >= nMinDepth)
             {
                 BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived)
@@ -653,7 +660,7 @@ Value getbalance(const Array& params, bool fHelp)
 
     string strAccount = AccountFromValue(params[0]);
 
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth);
+    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, filter);
 
     return ValueFromAmount(nBalance);
 }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index d4e9fe9d18fa..3c9aa3306f8e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -711,7 +711,7 @@ isminetype CWallet::IsMine(const CTxIn &txin) const
     return MINE_NO;
 }
 
-int64_t CWallet::GetDebit(const CTxIn &txin) const
+int64_t CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
 {
     {
         LOCK(cs_wallet);
@@ -720,7 +720,7 @@ int64_t CWallet::GetDebit(const CTxIn &txin) const
         {
             const CWalletTx& prev = (*mi).second;
             if (txin.prevout.n < prev.vout.size())
-                if (IsMine(prev.vout[txin.prevout.n]))
+                if (IsMine(prev.vout[txin.prevout.n]) & filter)
                     return prev.vout[txin.prevout.n].nValue;
         }
     }
@@ -801,7 +801,7 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
     strSentAccount = strFromAccount;
 
     // Compute fee:
-    int64_t nDebit = GetDebit();
+    int64_t nDebit = GetDebit(filter);
     if (nDebit > 0) // debit>0 means we signed/sent this transaction
     {
         int64_t nValueOut = GetValueOut();
@@ -846,7 +846,7 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
 }
 
 void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nReceived,
-                                  int64_t& nSent, int64_t& nFee) const
+                                  int64_t& nSent, int64_t& nFee, const isminefilter& filter) const
 {
     nReceived = nSent = nFee = 0;
 
@@ -854,7 +854,7 @@ void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nReceived,
     string strSentAccount;
     list<pair<CTxDestination, int64_t> > listReceived;
     list<pair<CTxDestination, int64_t> > listSent;
-    GetAmounts(listReceived, listSent, allFee, strSentAccount);
+    GetAmounts(listReceived, listSent, allFee, strSentAccount, filter);
 
     if (strAccount == strSentAccount)
     {
diff --git a/src/wallet.h b/src/wallet.h
index 355aa369737b..b11e6c662e81 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -288,12 +288,12 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
     isminetype IsMine(const CTxIn& txin) const;
-    int64_t GetDebit(const CTxIn& txin) const;
+    int64_t GetDebit(const CTxIn& txin, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
     isminetype IsMine(const CTxOut& txout) const
     {
         return ::IsMine(*this, txout.scriptPubKey);
     }
-    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter = (MINE_WATCH_ONLY | MINE_SPENDABLE)) const
+    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter=(MINE_WATCH_ONLY|MINE_SPENDABLE)) const
     {
         if (!MoneyRange(txout.nValue))
             throw std::runtime_error("CWallet::GetCredit() : value out of range");
@@ -324,12 +324,12 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     	        return true;
    	    return false;
     }
-    int64_t GetDebit(const CTransaction& tx) const
+    int64_t GetDebit(const CTransaction& tx, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
     {
         int64_t nDebit = 0;
         BOOST_FOREACH(const CTxIn& txin, tx.vin)
         {
-            nDebit += GetDebit(txin);
+            nDebit += GetDebit(txin, filter);
             if (!MoneyRange(nDebit))
                 throw std::runtime_error("CWallet::GetDebit() : value out of range");
         }
@@ -486,6 +486,8 @@ class CWalletTx : public CMerkleTx
     mutable bool fCreditCached;
     mutable bool fImmatureCreditCached;
     mutable bool fAvailableCreditCached;
+    mutable bool fWatchDebitCached;
+    mutable bool fWatchCreditCached;
     mutable bool fImmatureWatchCreditCached;
     mutable bool fAvailableWatchCreditCached;
     mutable bool fChangeCached;
@@ -493,6 +495,8 @@ class CWalletTx : public CMerkleTx
     mutable int64_t nCreditCached;
     mutable int64_t nImmatureCreditCached;
     mutable int64_t nAvailableCreditCached;
+    mutable int64_t nWatchDebitCached;
+    mutable int64_t nWatchCreditCached;
     mutable int64_t nImmatureWatchCreditCached;
     mutable int64_t nAvailableWatchCreditCached;
     mutable int64_t nChangeCached;
@@ -531,6 +535,8 @@ class CWalletTx : public CMerkleTx
         fCreditCached = false;
         fImmatureCreditCached = false;
         fAvailableCreditCached = false;
+        fWatchDebitCached = false;
+        fWatchCreditCached = false;
         fImmatureWatchCreditCached = false;
         fAvailableWatchCreditCached = false;
         fChangeCached = false;
@@ -538,6 +544,8 @@ class CWalletTx : public CMerkleTx
         nCreditCached = 0;
         nImmatureCreditCached = 0;
         nAvailableCreditCached = 0;
+        nWatchDebitCached = 0;
+        nWatchCreditCached = 0;
         nAvailableWatchCreditCached = 0;
         nImmatureWatchCreditCached = 0;
         nChangeCached = 0;
@@ -592,6 +600,8 @@ class CWalletTx : public CMerkleTx
     {
         fCreditCached = false;
         fAvailableCreditCached = false;
+        fWatchDebitCached = false;
+        fWatchCreditCached = false;
         fAvailableWatchCreditCached = false;
         fImmatureWatchCreditCached = false;
         fDebitCached = false;
@@ -604,15 +614,35 @@ class CWalletTx : public CMerkleTx
         MarkDirty();
     }
 
-    int64_t GetDebit() const
+    int64_t GetDebit(const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
     {
         if (vin.empty())
             return 0;
-        if (fDebitCached)
-            return nDebitCached;
-        nDebitCached = pwallet->GetDebit(*this);
-        fDebitCached = true;
-        return nDebitCached;
+
+        int64_t debit = 0;
+        if(filter & MINE_SPENDABLE)
+        {
+            if (fDebitCached)
+                debit += nDebitCached;
+            else
+            {
+                nDebitCached = pwallet->GetDebit(*this, MINE_SPENDABLE);
+                fDebitCached = true;
+                debit += nDebitCached;
+            }
+        }
+        if(filter & MINE_WATCH_ONLY)
+        {
+            if(fWatchDebitCached)
+                debit += nWatchDebitCached;
+            else
+            {
+                nWatchDebitCached = pwallet->GetDebit(*this, MINE_WATCH_ONLY);
+                fWatchDebitCached = true;
+                debit += nWatchDebitCached;
+            }
+        }
+        return debit;
     }
 
     int64_t GetCredit(bool fUseCache=true) const
@@ -729,7 +759,7 @@ class CWalletTx : public CMerkleTx
                     std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
 
     void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
-                           int64_t& nSent, int64_t& nFee) const;
+                           int64_t& nSent, int64_t& nFee, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
 
     bool IsFromMe() const
     {

From 83f3543f20348aa718620314e7deb37bd0f71b90 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Tue, 8 Apr 2014 16:13:15 +0200
Subject: [PATCH 0300/1819] Added argument to listaccounts to include watchonly
 addresses

---
 src/rpcclient.cpp |  1 +
 src/rpcwallet.cpp | 17 ++++++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index ea5ca8e0f6f1..d96b47833f20 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -49,6 +49,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listtransactions", 1 },
     { "listtransactions", 2 },
     { "listaccounts", 0 },
+    { "listaccounts", 1 },
     { "walletpassphrase", 1 },
     { "getblocktemplate", 0 },
     { "listsinceblock", 1 },
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 79b438d4173e..d52a4bc5bb10 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1302,12 +1302,13 @@ Value listtransactions(const Array& params, bool fHelp)
 
 Value listaccounts(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() > 1)
+    if (fHelp || params.size() > 2)
         throw runtime_error(
-            "listaccounts ( minconf )\n"
+            "listaccounts ( minconf includeWatchonly)\n"
             "\nReturns Object that has account names as keys, account balances as values.\n"
             "\nArguments:\n"
-            "1. minconf     (numeric, optional, default=1) Only onclude transactions with at least this many confirmations\n"
+            "1. minconf          (numeric, optional, default=1) Only onclude transactions with at least this many confirmations\n"
+            "2. includeWatchonly (bool, optional, default=false) Include balances in watchonly addresses (see 'importaddress')\n"
             "\nResult:\n"
             "{                      (json object where keys are account names, and values are numeric balances\n"
             "  \"account\": x.xxx,  (numeric) The property name is the account name, and the value is the total balance for the account.\n"
@@ -1325,12 +1326,18 @@ Value listaccounts(const Array& params, bool fHelp)
         );
 
     int nMinDepth = 1;
+    isminefilter includeWatchonly = MINE_SPENDABLE;
     if (params.size() > 0)
+    {
         nMinDepth = params[0].get_int();
+        if(params.size() > 1)
+            if(params[1].get_bool())
+                includeWatchonly = includeWatchonly | MINE_WATCH_ONLY;
+    }
 
     map<string, int64_t> mapAccountBalances;
     BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwalletMain->mapAddressBook) {
-        if (IsMine(*pwalletMain, entry.first)) // This address belongs to me
+        if (IsMine(*pwalletMain, entry.first) & includeWatchonly) // This address belongs to me
             mapAccountBalances[entry.second.name] = 0;
     }
 
@@ -1344,7 +1351,7 @@ Value listaccounts(const Array& params, bool fHelp)
         int nDepth = wtx.GetDepthInMainChain();
         if (wtx.GetBlocksToMaturity() > 0 || nDepth < 0)
             continue;
-        wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount);
+        wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, includeWatchonly);
         mapAccountBalances[strSentAccount] -= nFee;
         BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent)
             mapAccountBalances[strSentAccount] -= s.second;

From 952877e01c1045298fd51d1152d96c304d4cf2a4 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Wed, 9 Apr 2014 17:20:07 +0200
Subject: [PATCH 0301/1819] Showing 'involvesWatchonly' property for
 transactions returned by 'listtransactions' and 'listsinceblock'. It is only
 appended when the transaction involves a watchonly address.

---
 src/rpcwallet.cpp | 5 +++++
 src/wallet.h      | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index d52a4bc5bb10..8de10c52f820 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1117,6 +1117,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
     wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount);
 
     bool fAllAccounts = (strAccount == string("*"));
+    bool involvesWatchonly = wtx.IsFromMe(MINE_WATCH_ONLY);
 
     // Sent
     if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))
@@ -1124,6 +1125,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
         BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent)
         {
             Object entry;
+            if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & MINE_WATCH_ONLY))
+                entry.push_back(Pair("involvesWatchonly", true));
             entry.push_back(Pair("account", strSentAccount));
             MaybePushAddress(entry, s.first);
             entry.push_back(Pair("category", "send"));
@@ -1146,6 +1149,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
             if (fAllAccounts || (account == strAccount))
             {
                 Object entry;
+                if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & MINE_WATCH_ONLY))
+                    entry.push_back(Pair("involvesWatchonly", true));
                 entry.push_back(Pair("account", account));
                 MaybePushAddress(entry, r.first);
                 if (wtx.IsCoinBase())
diff --git a/src/wallet.h b/src/wallet.h
index b11e6c662e81..3453d23d978f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -761,9 +761,9 @@ class CWalletTx : public CMerkleTx
     void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
                            int64_t& nSent, int64_t& nFee, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
 
-    bool IsFromMe() const
+    bool IsFromMe(const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
     {
-        return (GetDebit() > 0);
+        return (GetDebit(filter) > 0);
     }
 
     bool IsTrusted() const

From d7d5d23b77e204eccd4bf8a5608c1a499d5fc42f Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Tue, 8 Apr 2014 17:51:04 +0200
Subject: [PATCH 0302/1819] Added argument to listtransactions and
 listsinceblock to include watchonly addresses

---
 src/rpcclient.cpp |  3 ++-
 src/rpcwallet.cpp | 62 ++++++++++++++++++++++++++++++-----------------
 2 files changed, 42 insertions(+), 23 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index d96b47833f20..f329d517b360 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -48,11 +48,13 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "sendfrom", 3 },
     { "listtransactions", 1 },
     { "listtransactions", 2 },
+    { "listtransactions", 3 },
     { "listaccounts", 0 },
     { "listaccounts", 1 },
     { "walletpassphrase", 1 },
     { "getblocktemplate", 0 },
     { "listsinceblock", 1 },
+    { "listsinceblock", 2 },
     { "sendmany", 1 },
     { "sendmany", 2 },
     { "addmultisigaddress", 0 },
@@ -129,7 +131,6 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector<std::stri
                 throw runtime_error(string("Error parsing JSON:")+strVal);
             params.push_back(jVal);
         }
-
     }
 
     return params;
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 8de10c52f820..a9db442d4cf5 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1107,14 +1107,14 @@ static void MaybePushAddress(Object & entry, const CTxDestination &dest)
         entry.push_back(Pair("address", addr.ToString()));
 }
 
-void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret)
+void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret, const isminefilter& filter=MINE_SPENDABLE)
 {
     int64_t nFee;
     string strSentAccount;
     list<pair<CTxDestination, int64_t> > listReceived;
     list<pair<CTxDestination, int64_t> > listSent;
 
-    wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount);
+    wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
 
     bool fAllAccounts = (strAccount == string("*"));
     bool involvesWatchonly = wtx.IsFromMe(MINE_WATCH_ONLY);
@@ -1194,16 +1194,16 @@ void AcentryToJSON(const CAccountingEntry& acentry, const string& strAccount, Ar
 
 Value listtransactions(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() > 3)
+    if (fHelp || params.size() > 4)
         throw runtime_error(
-            "listtransactions ( \"account\" count from )\n"
+            "listtransactions ( \"account\" count from includeWatchonly)\n"
             "\nReturns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.\n"
             "\nArguments:\n"
             "1. \"account\"    (string, optional) The account name. If not included, it will list all transactions for all accounts.\n"
             "                                     If \"\" is set, it will list transactions for the default account.\n"
             "2. count          (numeric, optional, default=10) The number of transactions to return\n"
             "3. from           (numeric, optional, default=0) The number of transactions to skip\n"
-
+            "4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')\n"
             "\nResult:\n"
             "[\n"
             "  {\n"
@@ -1255,15 +1255,26 @@ Value listtransactions(const Array& params, bool fHelp)
         );
 
     string strAccount = "*";
-    if (params.size() > 0)
-        strAccount = params[0].get_str();
     int nCount = 10;
-    if (params.size() > 1)
-        nCount = params[1].get_int();
     int nFrom = 0;
-    if (params.size() > 2)
-        nFrom = params[2].get_int();
-
+    isminefilter filter = MINE_SPENDABLE;
+    if (params.size() > 0)
+    {
+        strAccount = params[0].get_str();
+        if (params.size() > 1)
+        {
+            nCount = params[1].get_int();
+            if (params.size() > 2)
+            {
+                nFrom = params[2].get_int();
+                if(params.size() > 3)
+                {
+                    if(params[3].get_bool())
+                        filter = filter | MINE_WATCH_ONLY;
+                }
+            }
+        }
+    }
     if (nCount < 0)
         throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count");
     if (nFrom < 0)
@@ -1279,7 +1290,7 @@ Value listtransactions(const Array& params, bool fHelp)
     {
         CWalletTx *const pwtx = (*it).second.first;
         if (pwtx != 0)
-            ListTransactions(*pwtx, strAccount, 0, true, ret);
+            ListTransactions(*pwtx, strAccount, 0, true, ret, filter);
         CAccountingEntry *const pacentry = (*it).second.second;
         if (pacentry != 0)
             AcentryToJSON(*pacentry, strAccount, ret);
@@ -1386,11 +1397,12 @@ Value listsinceblock(const Array& params, bool fHelp)
 {
     if (fHelp)
         throw runtime_error(
-            "listsinceblock ( \"blockhash\" target-confirmations )\n"
+            "listsinceblock ( \"blockhash\" target-confirmations includeWatchonly)\n"
             "\nGet all transactions in blocks since block [blockhash], or all transactions if omitted\n"
             "\nArguments:\n"
             "1. \"blockhash\"   (string, optional) The block hash to list transactions since\n"
             "2. target-confirmations:    (numeric, optional) The confirmations required, must be 1 or more\n"
+            "3. includeWatchonly:        (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')"
             "\nResult:\n"
             "{\n"
             "  \"transactions\": [\n"
@@ -1426,7 +1438,7 @@ Value listsinceblock(const Array& params, bool fHelp)
 
     CBlockIndex *pindex = NULL;
     int target_confirms = 1;
-
+    isminefilter filter = MINE_SPENDABLE;
     if (params.size() > 0)
     {
         uint256 blockId = 0;
@@ -1435,14 +1447,20 @@ Value listsinceblock(const Array& params, bool fHelp)
         std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(blockId);
         if (it != mapBlockIndex.end())
             pindex = it->second;
-    }
 
-    if (params.size() > 1)
-    {
-        target_confirms = params[1].get_int();
+        if (params.size() > 1)
+        {
+            target_confirms = params[1].get_int();
+
+            if (target_confirms < 1)
+                throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
 
-        if (target_confirms < 1)
-            throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
+            if(params.size() > 2)
+            {
+                if(params[2].get_bool())
+                    filter = filter | MINE_WATCH_ONLY;
+            }
+        }
     }
 
     int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1;
@@ -1454,7 +1472,7 @@ Value listsinceblock(const Array& params, bool fHelp)
         CWalletTx tx = (*it).second;
 
         if (depth == -1 || tx.GetDepthInMainChain() < depth)
-            ListTransactions(tx, "*", 0, true, transactions);
+            ListTransactions(tx, "*", 0, true, transactions, filter);
     }
 
     CBlockIndex *pblockLast = chainActive[chainActive.Height() + 1 - target_confirms];

From a5c6c5d6df887764ac07664aae842234c19bbf8d Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Tue, 29 Apr 2014 19:39:01 +0200
Subject: [PATCH 0303/1819] fixed tiny glitch and improved readability like
 laanwj suggested

---
 src/qt/transactiondesc.cpp |  6 ++--
 src/rpcmisc.cpp            |  4 +--
 src/rpcwallet.cpp          | 70 ++++++++++++++++----------------------
 src/wallet.cpp             |  6 ++--
 4 files changed, 37 insertions(+), 49 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 76dc47318db5..d94f066ed9a2 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -101,11 +101,11 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                             strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
                             strHTML += "<b>" + tr("To") + ":</b> ";
                             strHTML += GUIUtil::HtmlEscape(rec->address);
-                            std::string addressOwned = wallet->IsMine(txout) == MINE_SPENDABLE ? "own address" : "watch-only";
+                            QString addressOwned = wallet->IsMine(txout) == MINE_SPENDABLE ? tr("own address") : tr("watch-only");
                             if (!wallet->mapAddressBook[address].name.empty())
-                                strHTML += " (" + tr(addressOwned.c_str()) + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
+                                strHTML += " (" + addressOwned + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
                             else
-                                strHTML += " (" + tr(addressOwned.c_str()) + ")";
+                                strHTML += " (" + addressOwned + ")";
                             strHTML += "<br>";
                         }
                     }
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 3245f7d713a5..f0b4619b26e5 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -171,9 +171,9 @@ Value validateaddress(const Array& params, bool fHelp)
         ret.push_back(Pair("address", currentAddress));
 #ifdef ENABLE_WALLET
         isminetype mine = pwalletMain ? IsMine(*pwalletMain, dest) : MINE_NO;
-        ret.push_back(Pair("ismine", mine == MINE_SPENDABLE));
+        ret.push_back(Pair("ismine", (mine & MINE_SPENDABLE) ? true : false));
         if (mine != MINE_NO) {
-            ret.push_back(Pair("watchonly", mine == MINE_WATCH_ONLY));
+            ret.push_back(Pair("iswatchonly", (mine & MINE_WATCH_ONLY) ? true: false));
             Object detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
             ret.insert(ret.end(), detail.begin(), detail.end());
         }
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index a9db442d4cf5..e9a111f5230c 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -621,14 +621,12 @@ Value getbalance(const Array& params, bool fHelp)
         return  ValueFromAmount(pwalletMain->GetBalance());
 
     int nMinDepth = 1;
-    isminefilter filter = MINE_SPENDABLE;
     if (params.size() > 1)
-    {
         nMinDepth = params[1].get_int();
-        if(params.size() > 2)
-            if(params[2].get_bool())
-                filter = filter | MINE_WATCH_ONLY;
-    }
+    isminefilter filter = MINE_SPENDABLE;
+    if(params.size() > 2)
+        if(params[2].get_bool())
+            filter = filter | MINE_WATCH_ONLY;
 
     if (params[0].get_str() == "*") {
         // Calculate total balance a different way from GetBalance()
@@ -1255,26 +1253,19 @@ Value listtransactions(const Array& params, bool fHelp)
         );
 
     string strAccount = "*";
+    if (params.size() > 0)
+        strAccount = params[0].get_str();
     int nCount = 10;
+    if (params.size() > 1)
+        nCount = params[1].get_int();
     int nFrom = 0;
+    if (params.size() > 2)
+        nFrom = params[2].get_int();
     isminefilter filter = MINE_SPENDABLE;
-    if (params.size() > 0)
-    {
-        strAccount = params[0].get_str();
-        if (params.size() > 1)
-        {
-            nCount = params[1].get_int();
-            if (params.size() > 2)
-            {
-                nFrom = params[2].get_int();
-                if(params.size() > 3)
-                {
-                    if(params[3].get_bool())
-                        filter = filter | MINE_WATCH_ONLY;
-                }
-            }
-        }
-    }
+    if(params.size() > 3)
+        if(params[3].get_bool())
+            filter = filter | MINE_WATCH_ONLY;
+
     if (nCount < 0)
         throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count");
     if (nFrom < 0)
@@ -1342,14 +1333,12 @@ Value listaccounts(const Array& params, bool fHelp)
         );
 
     int nMinDepth = 1;
-    isminefilter includeWatchonly = MINE_SPENDABLE;
     if (params.size() > 0)
-    {
         nMinDepth = params[0].get_int();
-        if(params.size() > 1)
-            if(params[1].get_bool())
-                includeWatchonly = includeWatchonly | MINE_WATCH_ONLY;
-    }
+    isminefilter includeWatchonly = MINE_SPENDABLE;
+    if(params.size() > 1)
+        if(params[1].get_bool())
+            includeWatchonly = includeWatchonly | MINE_WATCH_ONLY;
 
     map<string, int64_t> mapAccountBalances;
     BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwalletMain->mapAddressBook) {
@@ -1439,6 +1428,7 @@ Value listsinceblock(const Array& params, bool fHelp)
     CBlockIndex *pindex = NULL;
     int target_confirms = 1;
     isminefilter filter = MINE_SPENDABLE;
+
     if (params.size() > 0)
     {
         uint256 blockId = 0;
@@ -1447,22 +1437,20 @@ Value listsinceblock(const Array& params, bool fHelp)
         std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(blockId);
         if (it != mapBlockIndex.end())
             pindex = it->second;
+    }
 
-        if (params.size() > 1)
-        {
-            target_confirms = params[1].get_int();
-
-            if (target_confirms < 1)
-                throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
+    if (params.size() > 1)
+    {
+        target_confirms = params[1].get_int();
 
-            if(params.size() > 2)
-            {
-                if(params[2].get_bool())
-                    filter = filter | MINE_WATCH_ONLY;
-            }
-        }
+        if (target_confirms < 1)
+            throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
     }
 
+    if(params.size() > 2)
+        if(params[2].get_bool())
+            filter = filter | MINE_WATCH_ONLY;
+
     int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1;
 
     Array transactions;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3c9aa3306f8e..4b480321ac22 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -811,7 +811,8 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
     // Sent/received.
     BOOST_FOREACH(const CTxOut& txout, vout)
     {
-        bool fIsMine;
+        isminetype fIsMine = pwallet->IsMine(txout);
+
         // Only need to handle txouts if AT LEAST one of these is true:
         //   1) they debit from us (sent)
         //   2) the output is to us (received)
@@ -820,9 +821,8 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
             // Don't report 'change' txouts
             if (pwallet->IsChange(txout))
                 continue;
-            fIsMine = (pwallet->IsMine(txout) & filter);
         }
-        else if (!(fIsMine = (pwallet->IsMine(txout) & filter)))
+        else if (!(fIsMine & filter))
             continue;
 
         // In either case, we need to get the destination address

From f87ba3df64bb5825f7e2f6a33c93cf5738682019 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Fri, 23 May 2014 00:58:15 +0200
Subject: [PATCH 0304/1819] added includeWatchonly argument to 'gettransaction'
 because it affects balance calculation

---
 src/rpcclient.cpp |  1 +
 src/rpcwallet.cpp | 10 ++++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index f329d517b360..b2387cb062fd 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -65,6 +65,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listunspent", 1 },
     { "listunspent", 2 },
     { "getblock", 1 },
+    { "gettransaction", 1},
     { "getrawtransaction", 1 },
     { "createrawtransaction", 0 },
     { "createrawtransaction", 1 },
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index e9a111f5230c..61bc0b22f498 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1475,12 +1475,13 @@ Value listsinceblock(const Array& params, bool fHelp)
 
 Value gettransaction(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() != 1)
+    if (fHelp || params.size() < 1 || params.size() > 2)
         throw runtime_error(
             "gettransaction \"txid\"\n"
             "\nGet detailed information about in-wallet transaction <txid>\n"
             "\nArguments:\n"
             "1. \"txid\"    (string, required) The transaction id\n"
+            "2. \"includeWatchonly\"    (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
             "\nResult:\n"
             "{\n"
             "  \"amount\" : x.xxx,        (numeric) The transaction amount in btc\n"
@@ -1517,6 +1518,11 @@ Value gettransaction(const Array& params, bool fHelp)
     uint256 hash;
     hash.SetHex(params[0].get_str());
 
+    isminefilter filter = MINE_SPENDABLE;
+    if(params.size() > 1)
+        if(params[1].get_bool())
+            filter = filter | MINE_WATCH_ONLY;
+
     Object entry;
     if (!pwalletMain->mapWallet.count(hash))
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
@@ -1534,7 +1540,7 @@ Value gettransaction(const Array& params, bool fHelp)
     WalletTxToJSON(wtx, entry);
 
     Array details;
-    ListTransactions(wtx, "*", 0, false, details);
+    ListTransactions(wtx, "*", 0, false, details, filter);
     entry.push_back(Pair("details", details));
 
     CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);

From 0fa2f8899adf8f9f0ead29ba5d708ead6c5d4eaf Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Sat, 31 May 2014 16:57:26 +0200
Subject: [PATCH 0305/1819] added includedWatchonly argument to
 listreceivedbyaddress/...account

---
 src/rpcclient.cpp |  3 ++-
 src/rpcwallet.cpp | 38 +++++++++++++++++++++++++++++++-------
 2 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index b2387cb062fd..5edeecf93309 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -37,8 +37,10 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "getreceivedbyaccount", 1 },
     { "listreceivedbyaddress", 0 },
     { "listreceivedbyaddress", 1 },
+    { "listreceivedbyaddress", 2 },
     { "listreceivedbyaccount", 0 },
     { "listreceivedbyaccount", 1 },
+    { "listreceivedbyaccount", 2 },
     { "getbalance", 1 },
     { "getbalance", 2 },
     { "getblockhash", 0 },
@@ -65,7 +67,6 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listunspent", 1 },
     { "listunspent", 2 },
     { "getblock", 1 },
-    { "gettransaction", 1},
     { "getrawtransaction", 1 },
     { "createrawtransaction", 0 },
     { "createrawtransaction", 1 },
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 61bc0b22f498..1cbaadd45cad 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -932,10 +932,12 @@ struct tallyitem
     int64_t nAmount;
     int nConf;
     vector<uint256> txids;
+    bool fIsWatchonly;
     tallyitem()
     {
         nAmount = 0;
         nConf = std::numeric_limits<int>::max();
+        fIsWatchonly = false;
     }
 };
 
@@ -951,6 +953,11 @@ Value ListReceived(const Array& params, bool fByAccounts)
     if (params.size() > 1)
         fIncludeEmpty = params[1].get_bool();
 
+    isminefilter filter = MINE_SPENDABLE;
+    if(params.size() > 2)
+        if(params[2].get_bool())
+            filter = filter | MINE_WATCH_ONLY;
+
     // Tally
     map<CBitcoinAddress, tallyitem> mapTally;
     for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
@@ -967,13 +974,19 @@ Value ListReceived(const Array& params, bool fByAccounts)
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
         {
             CTxDestination address;
-            if (!ExtractDestination(txout.scriptPubKey, address) || !IsMine(*pwalletMain, address))
+            if (!ExtractDestination(txout.scriptPubKey, address))
+                continue;
+
+            isminefilter mine = IsMine(*pwalletMain, address);
+            if(!mine & filter)
                 continue;
 
             tallyitem& item = mapTally[address];
             item.nAmount += txout.nValue;
             item.nConf = min(item.nConf, nDepth);
             item.txids.push_back(wtx.GetHash());
+            if (mine & MINE_WATCH_ONLY)
+                item.fIsWatchonly = true;
         }
     }
 
@@ -990,10 +1003,12 @@ Value ListReceived(const Array& params, bool fByAccounts)
 
         int64_t nAmount = 0;
         int nConf = std::numeric_limits<int>::max();
+        bool fIsWatchonly = false;
         if (it != mapTally.end())
         {
             nAmount = (*it).second.nAmount;
             nConf = (*it).second.nConf;
+            fIsWatchonly = (*it).second.fIsWatchonly;
         }
 
         if (fByAccounts)
@@ -1001,10 +1016,13 @@ Value ListReceived(const Array& params, bool fByAccounts)
             tallyitem& item = mapAccountTally[strAccount];
             item.nAmount += nAmount;
             item.nConf = min(item.nConf, nConf);
+            item.fIsWatchonly = fIsWatchonly;
         }
         else
         {
             Object obj;
+            if(fIsWatchonly)
+                obj.push_back(Pair("involvesWatchonly", true));
             obj.push_back(Pair("address",       address.ToString()));
             obj.push_back(Pair("account",       strAccount));
             obj.push_back(Pair("amount",        ValueFromAmount(nAmount)));
@@ -1029,6 +1047,8 @@ Value ListReceived(const Array& params, bool fByAccounts)
             int64_t nAmount = (*it).second.nAmount;
             int nConf = (*it).second.nConf;
             Object obj;
+            if((*it).second.fIsWatchonly)
+                obj.push_back(Pair("involvesWatchonly", true));
             obj.push_back(Pair("account",       (*it).first));
             obj.push_back(Pair("amount",        ValueFromAmount(nAmount)));
             obj.push_back(Pair("confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf)));
@@ -1041,17 +1061,19 @@ Value ListReceived(const Array& params, bool fByAccounts)
 
 Value listreceivedbyaddress(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() > 2)
+    if (fHelp || params.size() > 3)
         throw runtime_error(
-            "listreceivedbyaddress ( minconf includeempty )\n"
+            "listreceivedbyaddress ( minconf includeempty includeWatchonly)\n"
             "\nList balances by receiving address.\n"
             "\nArguments:\n"
             "1. minconf       (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
             "2. includeempty  (numeric, optional, dafault=false) Whether to include addresses that haven't received any payments.\n"
+            "3. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n"
 
             "\nResult:\n"
             "[\n"
             "  {\n"
+            "    \"involvesWatchonly\" : \"true\",    (bool) Only returned if imported addresses were involved in transaction\n"
             "    \"address\" : \"receivingaddress\",  (string) The receiving address\n"
             "    \"account\" : \"accountname\",       (string) The account of the receiving address. The default account is \"\".\n"
             "    \"amount\" : x.xxx,                  (numeric) The total amount in btc received by the address\n"
@@ -1063,7 +1085,7 @@ Value listreceivedbyaddress(const Array& params, bool fHelp)
             "\nExamples:\n"
             + HelpExampleCli("listreceivedbyaddress", "")
             + HelpExampleCli("listreceivedbyaddress", "6 true")
-            + HelpExampleRpc("listreceivedbyaddress", "6, true")
+            + HelpExampleRpc("listreceivedbyaddress", "6, true, true")
         );
 
     return ListReceived(params, false);
@@ -1071,17 +1093,19 @@ Value listreceivedbyaddress(const Array& params, bool fHelp)
 
 Value listreceivedbyaccount(const Array& params, bool fHelp)
 {
-    if (fHelp || params.size() > 2)
+    if (fHelp || params.size() > 3)
         throw runtime_error(
-            "listreceivedbyaccount ( minconf includeempty )\n"
+            "listreceivedbyaccount ( minconf includeempty includeWatchonly)\n"
             "\nList balances by account.\n"
             "\nArguments:\n"
             "1. minconf      (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
             "2. includeempty (boolean, optional, default=false) Whether to include accounts that haven't received any payments.\n"
+            "3. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n"
 
             "\nResult:\n"
             "[\n"
             "  {\n"
+            "    \"involvesWatchonly\" : \"true\",    (bool) Only returned if imported addresses were involved in transaction\n"
             "    \"account\" : \"accountname\",  (string) The account name of the receiving account\n"
             "    \"amount\" : x.xxx,             (numeric) The total amount received by addresses with this account\n"
             "    \"confirmations\" : n           (numeric) The number of confirmations of the most recent transaction included\n"
@@ -1092,7 +1116,7 @@ Value listreceivedbyaccount(const Array& params, bool fHelp)
             "\nExamples:\n"
             + HelpExampleCli("listreceivedbyaccount", "")
             + HelpExampleCli("listreceivedbyaccount", "6 true")
-            + HelpExampleRpc("listreceivedbyaccount", "6, true")
+            + HelpExampleRpc("listreceivedbyaccount", "6, true, true")
         );
 
     return ListReceived(params, true);

From d5087d1ba08142bdf135333a0da08ef0f5fc7ef0 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 9 Jun 2014 21:11:59 +0200
Subject: [PATCH 0306/1819] Use script matching rather than destination
 matching for watch-only.

This changes the keystore data format, wallet format and IsMine logic
to detect watch-only outputs based on direct script matching rather
than first trying to convert outputs to destinations (addresses).

The reason is that we don't know how the software that has the spending
keys works. It may support the same types of scripts as us, but that is
not guaranteed. Furthermore, it removes the ambiguity between addresses
used as identifiers for output scripts or identifiers for public keys.

One practical implication is that adding a normal pay-to-pubkey-hash
address via importaddress will not cause payments to the corresponding
full public key to be detected as IsMine. If that is wanted, add those
scripts directly (importaddress now also accepts any hex-encoded script).

Conflicts:
	src/wallet.cpp
---
 src/keystore.cpp |  4 ++--
 src/keystore.h   | 10 +++++-----
 src/rpcdump.cpp  | 23 +++++++++++++++--------
 src/script.cpp   | 22 +++++++---------------
 src/script.h     |  2 +-
 src/wallet.cpp   | 15 ++++++++-------
 src/wallet.h     |  4 ++--
 src/walletdb.cpp | 12 ++++++------
 src/walletdb.h   |  2 +-
 9 files changed, 47 insertions(+), 47 deletions(-)

diff --git a/src/keystore.cpp b/src/keystore.cpp
index c2ea1ce5a994..2a4c88d5656d 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -59,14 +59,14 @@ bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut)
     return false;
 }
 
-bool CBasicKeyStore::AddWatchOnly(const CTxDestination &dest)
+bool CBasicKeyStore::AddWatchOnly(const CScript &dest)
 {
     LOCK(cs_KeyStore);
     setWatchOnly.insert(dest);
     return true;
 }
 
-bool CBasicKeyStore::HaveWatchOnly(const CTxDestination &dest) const
+bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const
 {
     LOCK(cs_KeyStore);
     return setWatchOnly.count(dest) > 0;
diff --git a/src/keystore.h b/src/keystore.h
index 90fc3a4c7b0b..72411a1387c0 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -48,13 +48,13 @@ class CKeyStore
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const =0;
 
     // Support for Watch-only addresses
-    virtual bool AddWatchOnly(const CTxDestination &dest) =0;
-    virtual bool HaveWatchOnly(const CTxDestination &dest) const =0;
+    virtual bool AddWatchOnly(const CScript &dest) =0;
+    virtual bool HaveWatchOnly(const CScript &dest) const =0;
 };
 
 typedef std::map<CKeyID, CKey> KeyMap;
 typedef std::map<CScriptID, CScript > ScriptMap;
-typedef std::set<CTxDestination> WatchOnlySet;
+typedef std::set<CScript> WatchOnlySet;
 
 /** Basic key store, that keeps keys in an address->secret map */
 class CBasicKeyStore : public CKeyStore
@@ -105,8 +105,8 @@ class CBasicKeyStore : public CKeyStore
     virtual bool HaveCScript(const CScriptID &hash) const;
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const;
 
-    virtual bool AddWatchOnly(const CTxDestination &dest);
-    virtual bool HaveWatchOnly(const CTxDestination &dest) const;
+    virtual bool AddWatchOnly(const CScript &dest);
+    virtual bool HaveWatchOnly(const CScript &dest) const;
 };
 
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 98af4695d62e..e505d84b40d3 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -138,13 +138,19 @@ Value importaddress(const Array& params, bool fHelp)
     if (fHelp || params.size() < 1 || params.size() > 3)
         throw runtime_error(
             "importaddress <address> [label] [rescan=true]\n"
-            "Adds an address that can be watched as if it were in your wallet but cannot be used to spend.");
+            "Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.");
+
+    CScript script;
 
     CBitcoinAddress address(params[0].get_str());
-    if (!address.IsValid())
-        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
-    CTxDestination dest;
-    dest = address.Get();
+    if (address.IsValid()) {
+        script.SetDestination(address.Get());
+    } else if (IsHex(params[0].get_str())) {
+        std::vector<unsigned char> data(ParseHex(params[0].get_str()));
+        script = CScript(data.begin(), data.end());
+    } else {
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
+    }
 
     string strLabel = "";
     if (params.size() > 1)
@@ -159,15 +165,16 @@ Value importaddress(const Array& params, bool fHelp)
         LOCK2(cs_main, pwalletMain->cs_wallet);
 
         // add to address book or update label
-        pwalletMain->SetAddressBook(dest, strLabel, "receive");
+        if (address.IsValid())
+            pwalletMain->SetAddressBook(address.Get(), strLabel, "receive");
 
         // Don't throw error in case an address is already there
-        if (pwalletMain->HaveWatchOnly(dest))
+        if (pwalletMain->HaveWatchOnly(script))
             return Value::null;
 
         pwalletMain->MarkDirty();
 
-        if (!pwalletMain->AddWatchOnly(dest))
+        if (!pwalletMain->AddWatchOnly(script))
             throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
 
         if (fRescan)
diff --git a/src/script.cpp b/src/script.cpp
index 0ef0126255e8..89f752bd1fb1 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1456,13 +1456,11 @@ class CKeyStoreIsMineVisitor : public boost::static_visitor<bool>
     bool operator()(const CScriptID &scriptID) const { return keystore->HaveCScript(scriptID); }
 };
 
-isminetype IsMine(const CKeyStore &keystore, const CTxDestination &dest)
+isminetype IsMine(const CKeyStore &keystore, const CTxDestination& dest)
 {
-    if (boost::apply_visitor(CKeyStoreIsMineVisitor(&keystore), dest))
-        return MINE_SPENDABLE;
-    if (keystore.HaveWatchOnly(dest))
-        return MINE_WATCH_ONLY;
-    return MINE_NO;
+    CScript script;
+    script.SetDestination(dest);
+    return IsMine(keystore, script);
 }
 
 isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
@@ -1470,7 +1468,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
     vector<valtype> vSolutions;
     txnouttype whichType;
     if (!Solver(scriptPubKey, whichType, vSolutions)) {
-        if (keystore.HaveWatchOnly(scriptPubKey.GetID()))
+        if (keystore.HaveWatchOnly(scriptPubKey))
             return MINE_WATCH_ONLY;
         return MINE_NO;
     }
@@ -1485,15 +1483,11 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         keyID = CPubKey(vSolutions[0]).GetID();
         if (keystore.HaveKey(keyID))
             return MINE_SPENDABLE;
-        if (keystore.HaveWatchOnly(keyID))
-            return MINE_WATCH_ONLY;
         break;
     case TX_PUBKEYHASH:
         keyID = CKeyID(uint160(vSolutions[0]));
         if (keystore.HaveKey(keyID))
             return MINE_SPENDABLE;
-        if (keystore.HaveWatchOnly(keyID))
-            return MINE_WATCH_ONLY;
         break;
     case TX_SCRIPTHASH:
     {
@@ -1501,11 +1495,9 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         CScript subscript;
         if (keystore.GetCScript(scriptID, subscript)) {
             isminetype ret = IsMine(keystore, subscript);
-            if (ret)
+            if (ret == MINE_SPENDABLE)
                 return ret;
         }
-        if (keystore.HaveWatchOnly(scriptID))
-            return MINE_WATCH_ONLY;
         break;
     }
     case TX_MULTISIG:
@@ -1522,7 +1514,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
     }
     }
 
-    if (keystore.HaveWatchOnly(scriptPubKey.GetID()))
+    if (keystore.HaveWatchOnly(scriptPubKey))
         return MINE_WATCH_ONLY;
     return MINE_NO;
 }
diff --git a/src/script.h b/src/script.h
index 56c7d01d4e5b..edba5757e448 100644
--- a/src/script.h
+++ b/src/script.h
@@ -812,7 +812,7 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::v
 int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
 bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
-isminetype IsMine(const CKeyStore& keystore, const CTxDestination &dest);
+isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 4b480321ac22..445d98b90656 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -145,7 +145,7 @@ bool CWallet::LoadCScript(const CScript& redeemScript)
     return CCryptoKeyStore::AddCScript(redeemScript);
 }
 
-bool CWallet::AddWatchOnly(const CTxDestination &dest)
+bool CWallet::AddWatchOnly(const CScript &dest)
 {
     if (!CCryptoKeyStore::AddWatchOnly(dest))
         return false;
@@ -155,9 +155,8 @@ bool CWallet::AddWatchOnly(const CTxDestination &dest)
     return CWalletDB(strWalletFile).WriteWatchOnly(dest);
 }
 
-bool CWallet::LoadWatchOnly(const CTxDestination &dest)
+bool CWallet::LoadWatchOnly(const CScript &dest)
 {
-    LogPrintf("Loaded %s!\n", CBitcoinAddress(dest).ToString().c_str());
     return CCryptoKeyStore::AddWatchOnly(dest);
 }
 
@@ -729,17 +728,19 @@ int64_t CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
 
 bool CWallet::IsChange(const CTxOut& txout) const
 {
-    CTxDestination address;
-
     // TODO: fix handling of 'change' outputs. The assumption is that any
-    // payment to a TX_PUBKEYHASH that is mine but isn't in the address book
+    // payment to a script that is ours, but is not in the address book
     // is change. That assumption is likely to break when we implement multisignature
     // wallets that return change back into a multi-signature-protected address;
     // a better way of identifying which outputs are 'the send' and which are
     // 'the change' will need to be implemented (maybe extend CWalletTx to remember
     // which output, if any, was change).
-    if (ExtractDestination(txout.scriptPubKey, address) && ::IsMine(*this, address) == MINE_SPENDABLE)
+    if (::IsMine(*this, txout.scriptPubKey))
     {
+        CTxDestination address;
+        if (!ExtractDestination(txout.scriptPubKey, address))
+            return true;
+
         LOCK(cs_wallet);
         if (!mapAddressBook.count(address))
             return true;
diff --git a/src/wallet.h b/src/wallet.h
index 3453d23d978f..b44b73568ba4 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -227,9 +227,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const;
 
     // Adds a watch-only address to the store, and saves it to disk.
-    bool AddWatchOnly(const CTxDestination &dest);
+    bool AddWatchOnly(const CScript &dest);
     // Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
-    bool LoadWatchOnly(const CTxDestination &dest);
+    bool LoadWatchOnly(const CScript &dest);
 
     bool Unlock(const SecureString& strWalletPassphrase);
     bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 9338d57097e5..a95baf83d0dd 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -112,10 +112,10 @@ bool CWalletDB::WriteCScript(const uint160& hash, const CScript& redeemScript)
     return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false);
 }
 
-bool CWalletDB::WriteWatchOnly(const CTxDestination &dest)
+bool CWalletDB::WriteWatchOnly(const CScript &dest)
 {
     nWalletDBUpdated++;
-    return Write(std::make_pair(std::string("watch"), CBitcoinAddress(dest).ToString()), '1');
+    return Write(std::make_pair(std::string("watchs"), dest), '1');
 }
 
 bool CWalletDB::WriteBestBlock(const CBlockLocator& locator)
@@ -410,14 +410,14 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
                     wss.fAnyUnordered = true;
             }
         }
-        else if (strType == "watch")
+        else if (strType == "watchs")
         {
-            std::string strAddress;
-            ssKey >> strAddress;
+            CScript script;
+            ssKey >> script;
             char fYes;
             ssValue >> fYes;
             if (fYes == '1')
-                pwallet->LoadWatchOnly(CBitcoinAddress(strAddress).Get());
+                pwallet->LoadWatchOnly(script);
 
             // Watch-only addresses have no birthday information for now,
             // so set the wallet birthday to the beginning of time.
diff --git a/src/walletdb.h b/src/walletdb.h
index 3a6cb152a1bd..58b4571b16f2 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -94,7 +94,7 @@ class CWalletDB : public CDB
 
     bool WriteCScript(const uint160& hash, const CScript& redeemScript);
 
-    bool WriteWatchOnly(const CTxDestination &dest);
+    bool WriteWatchOnly(const CScript &script);
 
     bool WriteBestBlock(const CBlockLocator& locator);
     bool ReadBestBlock(CBlockLocator& locator);

From 80dda36a07d09f99be861fa5271d0da5bd4f07dc Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Thu, 19 Jun 2014 15:24:17 +0200
Subject: [PATCH 0307/1819] removed default argument values for ismine filter

---
 src/qt/transactiondesc.cpp   | 14 +++++++-------
 src/qt/transactionrecord.cpp |  2 +-
 src/rpcwallet.cpp            | 18 +++++++++---------
 src/wallet.cpp               |  4 ++--
 src/wallet.h                 | 25 +++++++++++++------------
 5 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index d94f066ed9a2..95c7fa758278 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -54,8 +54,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
 
     int64_t nTime = wtx.GetTxTime();
-    int64_t nCredit = wtx.GetCredit();
-    int64_t nDebit = wtx.GetDebit();
+    int64_t nCredit = wtx.GetCredit(MINE_SPENDABLE|MINE_WATCH_ONLY);
+    int64_t nDebit = wtx.GetDebit(MINE_SPENDABLE|MINE_WATCH_ONLY);
     int64_t nNet = nCredit - nDebit;
 
     strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
@@ -139,7 +139,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         //
         int64_t nUnmatured = 0;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
-            nUnmatured += wallet->GetCredit(txout);
+            nUnmatured += wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY);
         strHTML += "<b>" + tr("Credit") + ":</b> ";
         if (wtx.IsInMainChain())
             strHTML += BitcoinUnits::formatWithUnit(unit, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
@@ -228,10 +228,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
             //
             BOOST_FOREACH(const CTxIn& txin, wtx.vin)
                 if (wallet->IsMine(txin))
-                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
+                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
             BOOST_FOREACH(const CTxOut& txout, wtx.vout)
                 if (wallet->IsMine(txout))
-                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
+                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
         }
     }
 
@@ -281,10 +281,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
             if(wallet->IsMine(txin))
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin)) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             if(wallet->IsMine(txout))
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout)) + "<br>";
+                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
 
         strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
         strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 1011363f3ef6..49916fed55a1 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -33,7 +33,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
     QList<TransactionRecord> parts;
     int64_t nTime = wtx.GetTxTime();
     int64_t nCredit = wtx.GetCredit(true);
-    int64_t nDebit = wtx.GetDebit();
+    int64_t nDebit = wtx.GetDebit(MINE_SPENDABLE|MINE_WATCH_ONLY);
     int64_t nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash();
     std::map<std::string, std::string> mapValue = wtx.mapValue;
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 1cbaadd45cad..f745d25ab644 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -557,7 +557,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
 }
 
 
-int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth, const isminefilter& filter = MINE_SPENDABLE)
+int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth, const isminefilter& filter)
 {
     int64_t nBalance = 0;
 
@@ -582,7 +582,7 @@ int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMi
     return nBalance;
 }
 
-int64_t GetAccountBalance(const string& strAccount, int nMinDepth, const isminefilter& filter = MINE_SPENDABLE)
+int64_t GetAccountBalance(const string& strAccount, int nMinDepth, const isminefilter& filter)
 {
     CWalletDB walletdb(pwalletMain->strWalletFile);
     return GetAccountBalance(walletdb, strAccount, nMinDepth, filter);
@@ -786,7 +786,7 @@ Value sendfrom(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth);
+    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE);
     if (nAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
@@ -863,7 +863,7 @@ Value sendmany(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth);
+    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE);
     if (totalAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
@@ -1129,7 +1129,7 @@ static void MaybePushAddress(Object & entry, const CTxDestination &dest)
         entry.push_back(Pair("address", addr.ToString()));
 }
 
-void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret, const isminefilter& filter=MINE_SPENDABLE)
+void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret, const isminefilter& filter)
 {
     int64_t nFee;
     string strSentAccount;
@@ -1552,13 +1552,13 @@ Value gettransaction(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
     const CWalletTx& wtx = pwalletMain->mapWallet[hash];
 
-    int64_t nCredit = wtx.GetCredit();
-    int64_t nDebit = wtx.GetDebit();
+    int64_t nCredit = wtx.GetCredit(filter);
+    int64_t nDebit = wtx.GetDebit(filter);
     int64_t nNet = nCredit - nDebit;
-    int64_t nFee = (wtx.IsFromMe() ? wtx.GetValueOut() - nDebit : 0);
+    int64_t nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
 
     entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee)));
-    if (wtx.IsFromMe())
+    if (wtx.IsFromMe(filter))
         entry.push_back(Pair("fee", ValueFromAmount(nFee)));
 
     WalletTxToJSON(wtx, entry);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 445d98b90656..e996fca3d2d6 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1216,7 +1216,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
 
         const CWalletTx *pcoin = output.tx;
 
-        if (output.nDepth < (pcoin->IsFromMe() ? nConfMine : nConfTheirs))
+        if (output.nDepth < (pcoin->IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY) ? nConfMine : nConfTheirs))
             continue;
 
         int i = output.i;
@@ -1845,7 +1845,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
                 continue;
 
             int nDepth = pcoin->GetDepthInMainChain();
-            if (nDepth < (pcoin->IsFromMe() ? 0 : 1))
+            if (nDepth < (pcoin->IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY) ? 0 : 1))
                 continue;
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++)
diff --git a/src/wallet.h b/src/wallet.h
index b44b73568ba4..ac90de3c9cda 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -288,12 +288,12 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
     isminetype IsMine(const CTxIn& txin) const;
-    int64_t GetDebit(const CTxIn& txin, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
+    int64_t GetDebit(const CTxIn& txin, const isminefilter& filter) const;
     isminetype IsMine(const CTxOut& txout) const
     {
         return ::IsMine(*this, txout.scriptPubKey);
     }
-    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter=(MINE_WATCH_ONLY|MINE_SPENDABLE)) const
+    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter) const
     {
         if (!MoneyRange(txout.nValue))
             throw std::runtime_error("CWallet::GetCredit() : value out of range");
@@ -313,9 +313,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
                 return true;
         return false;
     }
-    bool IsFromMe(const CTransaction& tx) const
+    bool IsFromMe(const CTransaction& tx) const     // should probably be renamed to IsRelevantToMe
     {
-        return (GetDebit(tx) > 0);
+        return (GetDebit(tx, MINE_SPENDABLE|MINE_WATCH_ONLY) > 0);
     }
     bool IsConflicting(const CTransaction& tx) const
     {
@@ -324,7 +324,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     	        return true;
    	    return false;
     }
-    int64_t GetDebit(const CTransaction& tx, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
+    int64_t GetDebit(const CTransaction& tx, const isminefilter& filter) const
     {
         int64_t nDebit = 0;
         BOOST_FOREACH(const CTxIn& txin, tx.vin)
@@ -335,7 +335,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         }
         return nDebit;
     }
-    int64_t GetCredit(const CTransaction& tx, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
+    int64_t GetCredit(const CTransaction& tx, const isminefilter& filter) const
     {
         int64_t nCredit = 0;
         BOOST_FOREACH(const CTxOut& txout, tx.vout)
@@ -614,7 +614,8 @@ class CWalletTx : public CMerkleTx
         MarkDirty();
     }
 
-    int64_t GetDebit(const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
+    // filter decides which addresses will count towards the debit
+    int64_t GetDebit(const isminefilter& filter) const
     {
         if (vin.empty())
             return 0;
@@ -654,7 +655,7 @@ class CWalletTx : public CMerkleTx
         // GetBalance can assume transactions in mapWallet won't change
         if (fUseCache && fCreditCached)
             return nCreditCached;
-        nCreditCached = pwallet->GetCredit(*this);
+        nCreditCached = pwallet->GetCredit(*this, MINE_SPENDABLE|MINE_WATCH_ONLY);
         fCreditCached = true;
         return nCreditCached;
     }
@@ -756,12 +757,12 @@ class CWalletTx : public CMerkleTx
     }
 
     void GetAmounts(std::list<std::pair<CTxDestination, int64_t> >& listReceived,
-                    std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
+                    std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter) const;
 
     void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
-                           int64_t& nSent, int64_t& nFee, const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const;
+                           int64_t& nSent, int64_t& nFee, const isminefilter& filter) const;
 
-    bool IsFromMe(const isminefilter& filter=(MINE_SPENDABLE|MINE_WATCH_ONLY)) const
+    bool IsFromMe(const isminefilter& filter) const
     {
         return (GetDebit(filter) > 0);
     }
@@ -776,7 +777,7 @@ class CWalletTx : public CMerkleTx
             return true;
         if (nDepth < 0)
             return false;
-        if (!bSpendZeroConfChange || !IsFromMe()) // using wtx's cached debit
+        if (!bSpendZeroConfChange || !IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY)) // using wtx's cached debit
             return false;
 
         // Trusted if all inputs are from us and are in the mempool:

From 23b0506c91020f69092389cf8b25576dcdf4e17e Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Thu, 19 Jun 2014 01:42:39 +0200
Subject: [PATCH 0308/1819] Fixed some stuff in TransactionDesc

---
 src/qt/transactiondesc.cpp   | 32 +++++++++++++-------------------
 src/qt/transactionrecord.cpp |  6 +++---
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 95c7fa758278..faa2077ff70d 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -15,6 +15,7 @@
 #include "timedata.h"
 #include "ui_interface.h"
 #include "wallet.h"
+#include "script.h"
 
 #include <stdint.h>
 #include <string>
@@ -89,27 +90,20 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         if (nNet > 0)
         {
             // Credit
-            BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+            if (CBitcoinAddress(rec->address).IsValid())
             {
-                if (wallet->IsMine(txout))
+                CTxDestination address = CBitcoinAddress(rec->address).Get();
+                if (wallet->mapAddressBook.count(address))
                 {
-                    if (CBitcoinAddress(rec->address).IsValid())
-                    {
-                        CTxDestination address = CBitcoinAddress(rec->address).Get();
-                        if (wallet->mapAddressBook.count(address))
-                        {
-                            strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
-                            strHTML += "<b>" + tr("To") + ":</b> ";
-                            strHTML += GUIUtil::HtmlEscape(rec->address);
-                            QString addressOwned = wallet->IsMine(txout) == MINE_SPENDABLE ? tr("own address") : tr("watch-only");
-                            if (!wallet->mapAddressBook[address].name.empty())
-                                strHTML += " (" + addressOwned + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
-                            else
-                                strHTML += " (" + addressOwned + ")";
-                            strHTML += "<br>";
-                        }
-                    }
-                    break;
+                    strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
+                    strHTML += "<b>" + tr("To") + ":</b> ";
+                    strHTML += GUIUtil::HtmlEscape(rec->address);
+                    QString addressOwned = (::IsMine(*wallet, address) == MINE_SPENDABLE) ? tr("own address") : tr("watch-only");
+                    if (!wallet->mapAddressBook[address].name.empty())
+                        strHTML += " (" + addressOwned + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
+                    else
+                        strHTML += " (" + addressOwned + ")";
+                    strHTML += "<br>";
                 }
             }
         }
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 49916fed55a1..cce2fa3f81ae 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -52,6 +52,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                 CTxDestination address;
                 sub.idx = parts.size(); // sequence number
                 sub.credit = txout.nValue;
+                sub.involvesWatchAddress = mine == MINE_WATCH_ONLY;
                 if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
                 {
                     // Received by Bitcoin Address
@@ -70,7 +71,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                     sub.type = TransactionRecord::Generated;
                 }
 
-                sub.involvesWatchAddress = mine == MINE_WATCH_ONLY;
                 parts.append(sub);
             }
         }
@@ -101,7 +101,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
 
             parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
                             -(nDebit - nChange), nCredit - nChange));
-            parts.last().involvesWatchAddress = involvesWatchAddress;
+            parts.last().involvesWatchAddress = involvesWatchAddress;   // maybe pass to TransactionRecord as constructor argument
         }
         else if (fAllFromMe)
         {
@@ -115,6 +115,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                 const CTxOut& txout = wtx.vout[nOut];
                 TransactionRecord sub(hash, nTime);
                 sub.idx = parts.size();
+                sub.involvesWatchAddress = involvesWatchAddress;
 
                 if(wallet->IsMine(txout))
                 {
@@ -146,7 +147,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                 }
                 sub.debit = -nValue;
 
-                sub.involvesWatchAddress = involvesWatchAddress;
                 parts.append(sub);
             }
         }

From 519dd1c89afa2b7d0f2720eb70cd11de23d61006 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Fri, 20 Jun 2014 05:02:14 +0200
Subject: [PATCH 0309/1819] Added MINE_ALL = (spendable|watchonly)

---
 src/qt/transactiondesc.cpp   | 14 +++++++-------
 src/qt/transactionrecord.cpp |  2 +-
 src/script.h                 |  1 +
 src/wallet.cpp               |  4 ++--
 src/wallet.h                 |  6 +++---
 5 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index faa2077ff70d..7cfa5424f795 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -55,8 +55,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
 
     int64_t nTime = wtx.GetTxTime();
-    int64_t nCredit = wtx.GetCredit(MINE_SPENDABLE|MINE_WATCH_ONLY);
-    int64_t nDebit = wtx.GetDebit(MINE_SPENDABLE|MINE_WATCH_ONLY);
+    int64_t nCredit = wtx.GetCredit(MINE_ALL);
+    int64_t nDebit = wtx.GetDebit(MINE_ALL);
     int64_t nNet = nCredit - nDebit;
 
     strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
@@ -133,7 +133,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         //
         int64_t nUnmatured = 0;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
-            nUnmatured += wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY);
+            nUnmatured += wallet->GetCredit(txout, MINE_ALL);
         strHTML += "<b>" + tr("Credit") + ":</b> ";
         if (wtx.IsInMainChain())
             strHTML += BitcoinUnits::formatWithUnit(unit, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
@@ -222,10 +222,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
             //
             BOOST_FOREACH(const CTxIn& txin, wtx.vin)
                 if (wallet->IsMine(txin))
-                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
+                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_ALL)) + "<br>";
             BOOST_FOREACH(const CTxOut& txout, wtx.vout)
                 if (wallet->IsMine(txout))
-                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
+                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_ALL)) + "<br>";
         }
     }
 
@@ -275,10 +275,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
             if(wallet->IsMine(txin))
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_ALL)) + "<br>";
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             if(wallet->IsMine(txout))
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_SPENDABLE|MINE_WATCH_ONLY)) + "<br>";
+                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_ALL)) + "<br>";
 
         strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
         strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index cce2fa3f81ae..08092a5f1f42 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -33,7 +33,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
     QList<TransactionRecord> parts;
     int64_t nTime = wtx.GetTxTime();
     int64_t nCredit = wtx.GetCredit(true);
-    int64_t nDebit = wtx.GetDebit(MINE_SPENDABLE|MINE_WATCH_ONLY);
+    int64_t nDebit = wtx.GetDebit(MINE_ALL);
     int64_t nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash();
     std::map<std::string, std::string> mapValue = wtx.mapValue;
diff --git a/src/script.h b/src/script.h
index edba5757e448..790822625a3f 100644
--- a/src/script.h
+++ b/src/script.h
@@ -200,6 +200,7 @@ enum isminetype
     MINE_NO = 0,
     MINE_WATCH_ONLY = 1,
     MINE_SPENDABLE = 2,
+    MINE_ALL = MINE_WATCH_ONLY | MINE_SPENDABLE
 };
 /** used for bitflags of isminetype */
 typedef uint8_t isminefilter;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index e996fca3d2d6..2823e7fa34b4 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1216,7 +1216,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
 
         const CWalletTx *pcoin = output.tx;
 
-        if (output.nDepth < (pcoin->IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY) ? nConfMine : nConfTheirs))
+        if (output.nDepth < (pcoin->IsFromMe(MINE_ALL) ? nConfMine : nConfTheirs))
             continue;
 
         int i = output.i;
@@ -1845,7 +1845,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
                 continue;
 
             int nDepth = pcoin->GetDepthInMainChain();
-            if (nDepth < (pcoin->IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY) ? 0 : 1))
+            if (nDepth < (pcoin->IsFromMe(MINE_ALL) ? 0 : 1))
                 continue;
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++)
diff --git a/src/wallet.h b/src/wallet.h
index ac90de3c9cda..639f51e3cae1 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -315,7 +315,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     }
     bool IsFromMe(const CTransaction& tx) const     // should probably be renamed to IsRelevantToMe
     {
-        return (GetDebit(tx, MINE_SPENDABLE|MINE_WATCH_ONLY) > 0);
+        return (GetDebit(tx, MINE_ALL) > 0);
     }
     bool IsConflicting(const CTransaction& tx) const
     {
@@ -655,7 +655,7 @@ class CWalletTx : public CMerkleTx
         // GetBalance can assume transactions in mapWallet won't change
         if (fUseCache && fCreditCached)
             return nCreditCached;
-        nCreditCached = pwallet->GetCredit(*this, MINE_SPENDABLE|MINE_WATCH_ONLY);
+        nCreditCached = pwallet->GetCredit(*this, MINE_ALL);
         fCreditCached = true;
         return nCreditCached;
     }
@@ -777,7 +777,7 @@ class CWalletTx : public CMerkleTx
             return true;
         if (nDepth < 0)
             return false;
-        if (!bSpendZeroConfChange || !IsFromMe(MINE_SPENDABLE|MINE_WATCH_ONLY)) // using wtx's cached debit
+        if (!bSpendZeroConfChange || !IsFromMe(MINE_ALL)) // using wtx's cached debit
             return false;
 
         // Trusted if all inputs are from us and are in the mempool:

From f28707a845d4098fed55a6948887d60043fcfde7 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Sun, 22 Jun 2014 23:29:33 +0200
Subject: [PATCH 0310/1819] fixed bug in ListReceived()

---
 src/rpcwallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index f745d25ab644..560be0570af4 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -978,7 +978,7 @@ Value ListReceived(const Array& params, bool fByAccounts)
                 continue;
 
             isminefilter mine = IsMine(*pwalletMain, address);
-            if(!mine & filter)
+            if(!(mine & filter))
                 continue;
 
             tallyitem& item = mapTally[address];

From 53a2148f0c182b83da255972acb3110a74e9957a Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Mon, 23 Jun 2014 10:43:30 +0200
Subject: [PATCH 0311/1819] fixed bug where validateaddress doesn't display
 information

---
 src/rpcmisc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index f0b4619b26e5..56accc1b3abe 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -115,7 +115,7 @@ class DescribeAddressVisitor : public boost::static_visitor<Object>
     Object operator()(const CScriptID &scriptID) const {
         Object obj;
         obj.push_back(Pair("isscript", true));
-        if (mine == MINE_SPENDABLE) {
+        if (mine != MINE_NO) {
             CScript subscript;
             pwalletMain->GetCScript(scriptID, subscript);
             std::vector<CTxDestination> addresses;

From a3e192a3274817517671f624d5744297905e20d2 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Tue, 1 Jul 2014 11:00:22 +0200
Subject: [PATCH 0312/1819] replaced MINE_ with ISMINE_

---
 src/qt/transactiondesc.cpp   | 32 ++++++++++++++++----------------
 src/qt/transactionrecord.cpp | 12 ++++++------
 src/rpcmisc.cpp              | 12 ++++++------
 src/rpcwallet.cpp            | 36 ++++++++++++++++++------------------
 src/script.cpp               | 16 ++++++++--------
 src/script.h                 |  8 ++++----
 src/wallet.cpp               | 10 +++++-----
 src/wallet.h                 | 24 ++++++++++++------------
 8 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 7cfa5424f795..36e4d50e3001 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -55,8 +55,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
 
     int64_t nTime = wtx.GetTxTime();
-    int64_t nCredit = wtx.GetCredit(MINE_ALL);
-    int64_t nDebit = wtx.GetDebit(MINE_ALL);
+    int64_t nCredit = wtx.GetCredit(ISMINE_ALL);
+    int64_t nDebit = wtx.GetDebit(ISMINE_ALL);
     int64_t nNet = nCredit - nDebit;
 
     strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
@@ -98,7 +98,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                     strHTML += "<b>" + tr("From") + ":</b> " + tr("unknown") + "<br>";
                     strHTML += "<b>" + tr("To") + ":</b> ";
                     strHTML += GUIUtil::HtmlEscape(rec->address);
-                    QString addressOwned = (::IsMine(*wallet, address) == MINE_SPENDABLE) ? tr("own address") : tr("watch-only");
+                    QString addressOwned = (::IsMine(*wallet, address) == ISMINE_SPENDABLE) ? tr("own address") : tr("watch-only");
                     if (!wallet->mapAddressBook[address].name.empty())
                         strHTML += " (" + addressOwned + ", " + tr("label") + ": " + GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + ")";
                     else
@@ -133,7 +133,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         //
         int64_t nUnmatured = 0;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
-            nUnmatured += wallet->GetCredit(txout, MINE_ALL);
+            nUnmatured += wallet->GetCredit(txout, ISMINE_ALL);
         strHTML += "<b>" + tr("Credit") + ":</b> ";
         if (wtx.IsInMainChain())
             strHTML += BitcoinUnits::formatWithUnit(unit, nUnmatured)+ " (" + tr("matures in %n more block(s)", "", wtx.GetBlocksToMaturity()) + ")";
@@ -150,14 +150,14 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     }
     else
     {
-        isminetype fAllFromMe = MINE_SPENDABLE;
+        isminetype fAllFromMe = ISMINE_SPENDABLE;
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
         {
             isminetype mine = wallet->IsMine(txin);
             if(fAllFromMe > mine) fAllFromMe = mine;
         }
 
-        isminetype fAllToMe = MINE_SPENDABLE;
+        isminetype fAllToMe = ISMINE_SPENDABLE;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
         {
             isminetype mine = wallet->IsMine(txout);
@@ -166,7 +166,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
 
         if (fAllFromMe)
         {
-            if(fAllFromMe == MINE_WATCH_ONLY)
+            if(fAllFromMe == ISMINE_WATCH_ONLY)
                 strHTML += "<b>" + tr("From") + ":</b> " + tr("watch-only") + "<br>";
 
             //
@@ -176,7 +176,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
             {
                 // Ignore change
                 isminetype toSelf = wallet->IsMine(txout);
-                if ((toSelf == MINE_SPENDABLE) && (fAllFromMe == MINE_SPENDABLE))
+                if ((toSelf == ISMINE_SPENDABLE) && (fAllFromMe == ISMINE_SPENDABLE))
                     continue;
 
                 if (!wtx.mapValue.count("to") || wtx.mapValue["to"].empty())
@@ -189,9 +189,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                         if (wallet->mapAddressBook.count(address) && !wallet->mapAddressBook[address].name.empty())
                             strHTML += GUIUtil::HtmlEscape(wallet->mapAddressBook[address].name) + " ";
                         strHTML += GUIUtil::HtmlEscape(CBitcoinAddress(address).ToString());
-                        if(toSelf == MINE_SPENDABLE)
+                        if(toSelf == ISMINE_SPENDABLE)
                             strHTML += " (own address)";
-                        else if(toSelf == MINE_WATCH_ONLY)
+                        else if(toSelf == ISMINE_WATCH_ONLY)
                             strHTML += " (watch-only)";
                         strHTML += "<br>";
                     }
@@ -222,10 +222,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
             //
             BOOST_FOREACH(const CTxIn& txin, wtx.vin)
                 if (wallet->IsMine(txin))
-                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_ALL)) + "<br>";
+                    strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
             BOOST_FOREACH(const CTxOut& txout, wtx.vout)
                 if (wallet->IsMine(txout))
-                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_ALL)) + "<br>";
+                    strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, ISMINE_ALL)) + "<br>";
         }
     }
 
@@ -275,10 +275,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
             if(wallet->IsMine(txin))
-                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, MINE_ALL)) + "<br>";
+                strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             if(wallet->IsMine(txout))
-                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, MINE_ALL)) + "<br>";
+                strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatWithUnit(unit, wallet->GetCredit(txout, ISMINE_ALL)) + "<br>";
 
         strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
         strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
@@ -305,8 +305,8 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                         strHTML += QString::fromStdString(CBitcoinAddress(address).ToString());
                     }
                     strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatWithUnit(unit, vout.nValue);
-                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & MINE_SPENDABLE ? tr("true") : tr("false")) + "</li>";
-                    strHTML = strHTML + " IsWatchOnly=" + (wallet->IsMine(vout) & MINE_WATCH_ONLY ? tr("true") : tr("false")) + "</li>";
+                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & ISMINE_SPENDABLE ? tr("true") : tr("false")) + "</li>";
+                    strHTML = strHTML + " IsWatchOnly=" + (wallet->IsMine(vout) & ISMINE_WATCH_ONLY ? tr("true") : tr("false")) + "</li>";
                 }
             }
         }
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 08092a5f1f42..7d29c212b310 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -33,7 +33,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
     QList<TransactionRecord> parts;
     int64_t nTime = wtx.GetTxTime();
     int64_t nCredit = wtx.GetCredit(true);
-    int64_t nDebit = wtx.GetDebit(MINE_ALL);
+    int64_t nDebit = wtx.GetDebit(ISMINE_ALL);
     int64_t nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash();
     std::map<std::string, std::string> mapValue = wtx.mapValue;
@@ -52,7 +52,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                 CTxDestination address;
                 sub.idx = parts.size(); // sequence number
                 sub.credit = txout.nValue;
-                sub.involvesWatchAddress = mine == MINE_WATCH_ONLY;
+                sub.involvesWatchAddress = mine == ISMINE_WATCH_ONLY;
                 if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address))
                 {
                     // Received by Bitcoin Address
@@ -78,19 +78,19 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
     else
     {
         bool involvesWatchAddress = false;
-        isminetype fAllFromMe = MINE_SPENDABLE;
+        isminetype fAllFromMe = ISMINE_SPENDABLE;
         BOOST_FOREACH(const CTxIn& txin, wtx.vin)
         {
             isminetype mine = wallet->IsMine(txin);
-            if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
+            if(mine == ISMINE_WATCH_ONLY) involvesWatchAddress = true;
             if(fAllFromMe > mine) fAllFromMe = mine;
         }
 
-        isminetype fAllToMe = MINE_SPENDABLE;
+        isminetype fAllToMe = ISMINE_SPENDABLE;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
         {
             isminetype mine = wallet->IsMine(txout);
-            if(mine == MINE_WATCH_ONLY) involvesWatchAddress = true;
+            if(mine == ISMINE_WATCH_ONLY) involvesWatchAddress = true;
             if(fAllToMe > mine) fAllToMe = mine;
         }
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 56accc1b3abe..f51be2db2c48 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -104,7 +104,7 @@ class DescribeAddressVisitor : public boost::static_visitor<Object>
         Object obj;
         CPubKey vchPubKey;
         obj.push_back(Pair("isscript", false));
-        if (mine == MINE_SPENDABLE) {
+        if (mine == ISMINE_SPENDABLE) {
             pwalletMain->GetPubKey(keyID, vchPubKey);
             obj.push_back(Pair("pubkey", HexStr(vchPubKey)));
             obj.push_back(Pair("iscompressed", vchPubKey.IsCompressed()));
@@ -115,7 +115,7 @@ class DescribeAddressVisitor : public boost::static_visitor<Object>
     Object operator()(const CScriptID &scriptID) const {
         Object obj;
         obj.push_back(Pair("isscript", true));
-        if (mine != MINE_NO) {
+        if (mine != ISMINE_NO) {
             CScript subscript;
             pwalletMain->GetCScript(scriptID, subscript);
             std::vector<CTxDestination> addresses;
@@ -170,10 +170,10 @@ Value validateaddress(const Array& params, bool fHelp)
         string currentAddress = address.ToString();
         ret.push_back(Pair("address", currentAddress));
 #ifdef ENABLE_WALLET
-        isminetype mine = pwalletMain ? IsMine(*pwalletMain, dest) : MINE_NO;
-        ret.push_back(Pair("ismine", (mine & MINE_SPENDABLE) ? true : false));
-        if (mine != MINE_NO) {
-            ret.push_back(Pair("iswatchonly", (mine & MINE_WATCH_ONLY) ? true: false));
+        isminetype mine = pwalletMain ? IsMine(*pwalletMain, dest) : ISMINE_NO;
+        ret.push_back(Pair("ismine", (mine & ISMINE_SPENDABLE) ? true : false));
+        if (mine != ISMINE_NO) {
+            ret.push_back(Pair("iswatchonly", (mine & ISMINE_WATCH_ONLY) ? true: false));
             Object detail = boost::apply_visitor(DescribeAddressVisitor(mine), dest);
             ret.insert(ret.end(), detail.begin(), detail.end());
         }
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 560be0570af4..190c6b86b5d1 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -623,10 +623,10 @@ Value getbalance(const Array& params, bool fHelp)
     int nMinDepth = 1;
     if (params.size() > 1)
         nMinDepth = params[1].get_int();
-    isminefilter filter = MINE_SPENDABLE;
+    isminefilter filter = ISMINE_SPENDABLE;
     if(params.size() > 2)
         if(params[2].get_bool())
-            filter = filter | MINE_WATCH_ONLY;
+            filter = filter | ISMINE_WATCH_ONLY;
 
     if (params[0].get_str() == "*") {
         // Calculate total balance a different way from GetBalance()
@@ -786,7 +786,7 @@ Value sendfrom(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE);
+    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
     if (nAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
@@ -863,7 +863,7 @@ Value sendmany(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, MINE_SPENDABLE);
+    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
     if (totalAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
@@ -953,10 +953,10 @@ Value ListReceived(const Array& params, bool fByAccounts)
     if (params.size() > 1)
         fIncludeEmpty = params[1].get_bool();
 
-    isminefilter filter = MINE_SPENDABLE;
+    isminefilter filter = ISMINE_SPENDABLE;
     if(params.size() > 2)
         if(params[2].get_bool())
-            filter = filter | MINE_WATCH_ONLY;
+            filter = filter | ISMINE_WATCH_ONLY;
 
     // Tally
     map<CBitcoinAddress, tallyitem> mapTally;
@@ -985,7 +985,7 @@ Value ListReceived(const Array& params, bool fByAccounts)
             item.nAmount += txout.nValue;
             item.nConf = min(item.nConf, nDepth);
             item.txids.push_back(wtx.GetHash());
-            if (mine & MINE_WATCH_ONLY)
+            if (mine & ISMINE_WATCH_ONLY)
                 item.fIsWatchonly = true;
         }
     }
@@ -1139,7 +1139,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
     wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
 
     bool fAllAccounts = (strAccount == string("*"));
-    bool involvesWatchonly = wtx.IsFromMe(MINE_WATCH_ONLY);
+    bool involvesWatchonly = wtx.IsFromMe(ISMINE_WATCH_ONLY);
 
     // Sent
     if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))
@@ -1147,7 +1147,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
         BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent)
         {
             Object entry;
-            if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & MINE_WATCH_ONLY))
+            if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & ISMINE_WATCH_ONLY))
                 entry.push_back(Pair("involvesWatchonly", true));
             entry.push_back(Pair("account", strSentAccount));
             MaybePushAddress(entry, s.first);
@@ -1171,7 +1171,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
             if (fAllAccounts || (account == strAccount))
             {
                 Object entry;
-                if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & MINE_WATCH_ONLY))
+                if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & ISMINE_WATCH_ONLY))
                     entry.push_back(Pair("involvesWatchonly", true));
                 entry.push_back(Pair("account", account));
                 MaybePushAddress(entry, r.first);
@@ -1285,10 +1285,10 @@ Value listtransactions(const Array& params, bool fHelp)
     int nFrom = 0;
     if (params.size() > 2)
         nFrom = params[2].get_int();
-    isminefilter filter = MINE_SPENDABLE;
+    isminefilter filter = ISMINE_SPENDABLE;
     if(params.size() > 3)
         if(params[3].get_bool())
-            filter = filter | MINE_WATCH_ONLY;
+            filter = filter | ISMINE_WATCH_ONLY;
 
     if (nCount < 0)
         throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative count");
@@ -1359,10 +1359,10 @@ Value listaccounts(const Array& params, bool fHelp)
     int nMinDepth = 1;
     if (params.size() > 0)
         nMinDepth = params[0].get_int();
-    isminefilter includeWatchonly = MINE_SPENDABLE;
+    isminefilter includeWatchonly = ISMINE_SPENDABLE;
     if(params.size() > 1)
         if(params[1].get_bool())
-            includeWatchonly = includeWatchonly | MINE_WATCH_ONLY;
+            includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY;
 
     map<string, int64_t> mapAccountBalances;
     BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwalletMain->mapAddressBook) {
@@ -1451,7 +1451,7 @@ Value listsinceblock(const Array& params, bool fHelp)
 
     CBlockIndex *pindex = NULL;
     int target_confirms = 1;
-    isminefilter filter = MINE_SPENDABLE;
+    isminefilter filter = ISMINE_SPENDABLE;
 
     if (params.size() > 0)
     {
@@ -1473,7 +1473,7 @@ Value listsinceblock(const Array& params, bool fHelp)
 
     if(params.size() > 2)
         if(params[2].get_bool())
-            filter = filter | MINE_WATCH_ONLY;
+            filter = filter | ISMINE_WATCH_ONLY;
 
     int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1;
 
@@ -1542,10 +1542,10 @@ Value gettransaction(const Array& params, bool fHelp)
     uint256 hash;
     hash.SetHex(params[0].get_str());
 
-    isminefilter filter = MINE_SPENDABLE;
+    isminefilter filter = ISMINE_SPENDABLE;
     if(params.size() > 1)
         if(params[1].get_bool())
-            filter = filter | MINE_WATCH_ONLY;
+            filter = filter | ISMINE_WATCH_ONLY;
 
     Object entry;
     if (!pwalletMain->mapWallet.count(hash))
diff --git a/src/script.cpp b/src/script.cpp
index 89f752bd1fb1..238a25e72d7d 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1469,8 +1469,8 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
     txnouttype whichType;
     if (!Solver(scriptPubKey, whichType, vSolutions)) {
         if (keystore.HaveWatchOnly(scriptPubKey))
-            return MINE_WATCH_ONLY;
-        return MINE_NO;
+            return ISMINE_WATCH_ONLY;
+        return ISMINE_NO;
     }
 
     CKeyID keyID;
@@ -1482,12 +1482,12 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
     case TX_PUBKEY:
         keyID = CPubKey(vSolutions[0]).GetID();
         if (keystore.HaveKey(keyID))
-            return MINE_SPENDABLE;
+            return ISMINE_SPENDABLE;
         break;
     case TX_PUBKEYHASH:
         keyID = CKeyID(uint160(vSolutions[0]));
         if (keystore.HaveKey(keyID))
-            return MINE_SPENDABLE;
+            return ISMINE_SPENDABLE;
         break;
     case TX_SCRIPTHASH:
     {
@@ -1495,7 +1495,7 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         CScript subscript;
         if (keystore.GetCScript(scriptID, subscript)) {
             isminetype ret = IsMine(keystore, subscript);
-            if (ret == MINE_SPENDABLE)
+            if (ret == ISMINE_SPENDABLE)
                 return ret;
         }
         break;
@@ -1509,14 +1509,14 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         // in shared-wallet situations.
         vector<valtype> keys(vSolutions.begin()+1, vSolutions.begin()+vSolutions.size()-1);
         if (HaveKeys(keys, keystore) == keys.size())
-            return MINE_SPENDABLE;
+            return ISMINE_SPENDABLE;
         break;
     }
     }
 
     if (keystore.HaveWatchOnly(scriptPubKey))
-        return MINE_WATCH_ONLY;
-    return MINE_NO;
+        return ISMINE_WATCH_ONLY;
+    return ISMINE_NO;
 }
 
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
diff --git a/src/script.h b/src/script.h
index 790822625a3f..e36be2db9e33 100644
--- a/src/script.h
+++ b/src/script.h
@@ -197,10 +197,10 @@ enum
 /** IsMine() return codes */
 enum isminetype
 {
-    MINE_NO = 0,
-    MINE_WATCH_ONLY = 1,
-    MINE_SPENDABLE = 2,
-    MINE_ALL = MINE_WATCH_ONLY | MINE_SPENDABLE
+    ISMINE_NO = 0,
+    ISMINE_WATCH_ONLY = 1,
+    ISMINE_SPENDABLE = 2,
+    ISMINE_ALL = ISMINE_WATCH_ONLY | ISMINE_SPENDABLE
 };
 /** used for bitflags of isminetype */
 typedef uint8_t isminefilter;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 2823e7fa34b4..84b50c0f8cc0 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -707,7 +707,7 @@ isminetype CWallet::IsMine(const CTxIn &txin) const
                 return IsMine(prev.vout[txin.prevout.n]);
         }
     }
-    return MINE_NO;
+    return ISMINE_NO;
 }
 
 int64_t CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
@@ -1139,10 +1139,10 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
                 isminetype mine = IsMine(pcoin->vout[i]);
-                if (!(IsSpent(wtxid, i)) && mine != MINE_NO &&
+                if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO &&
                     !IsLockedCoin((*it).first, i) && pcoin->vout[i].nValue > 0 &&
                     (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
-                        vCoins.push_back(COutput(pcoin, i, nDepth, mine & MINE_SPENDABLE));
+                        vCoins.push_back(COutput(pcoin, i, nDepth, mine & ISMINE_SPENDABLE));
             }
         }
     }
@@ -1216,7 +1216,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
 
         const CWalletTx *pcoin = output.tx;
 
-        if (output.nDepth < (pcoin->IsFromMe(MINE_ALL) ? nConfMine : nConfTheirs))
+        if (output.nDepth < (pcoin->IsFromMe(ISMINE_ALL) ? nConfMine : nConfTheirs))
             continue;
 
         int i = output.i;
@@ -1845,7 +1845,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
                 continue;
 
             int nDepth = pcoin->GetDepthInMainChain();
-            if (nDepth < (pcoin->IsFromMe(MINE_ALL) ? 0 : 1))
+            if (nDepth < (pcoin->IsFromMe(ISMINE_ALL) ? 0 : 1))
                 continue;
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++)
diff --git a/src/wallet.h b/src/wallet.h
index 639f51e3cae1..8a51bf9821d8 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -315,7 +315,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     }
     bool IsFromMe(const CTransaction& tx) const     // should probably be renamed to IsRelevantToMe
     {
-        return (GetDebit(tx, MINE_ALL) > 0);
+        return (GetDebit(tx, ISMINE_ALL) > 0);
     }
     bool IsConflicting(const CTransaction& tx) const
     {
@@ -621,24 +621,24 @@ class CWalletTx : public CMerkleTx
             return 0;
 
         int64_t debit = 0;
-        if(filter & MINE_SPENDABLE)
+        if(filter & ISMINE_SPENDABLE)
         {
             if (fDebitCached)
                 debit += nDebitCached;
             else
             {
-                nDebitCached = pwallet->GetDebit(*this, MINE_SPENDABLE);
+                nDebitCached = pwallet->GetDebit(*this, ISMINE_SPENDABLE);
                 fDebitCached = true;
                 debit += nDebitCached;
             }
         }
-        if(filter & MINE_WATCH_ONLY)
+        if(filter & ISMINE_WATCH_ONLY)
         {
             if(fWatchDebitCached)
                 debit += nWatchDebitCached;
             else
             {
-                nWatchDebitCached = pwallet->GetDebit(*this, MINE_WATCH_ONLY);
+                nWatchDebitCached = pwallet->GetDebit(*this, ISMINE_WATCH_ONLY);
                 fWatchDebitCached = true;
                 debit += nWatchDebitCached;
             }
@@ -655,7 +655,7 @@ class CWalletTx : public CMerkleTx
         // GetBalance can assume transactions in mapWallet won't change
         if (fUseCache && fCreditCached)
             return nCreditCached;
-        nCreditCached = pwallet->GetCredit(*this, MINE_ALL);
+        nCreditCached = pwallet->GetCredit(*this, ISMINE_ALL);
         fCreditCached = true;
         return nCreditCached;
     }
@@ -666,7 +666,7 @@ class CWalletTx : public CMerkleTx
         {
             if (fUseCache && fImmatureCreditCached)
                 return nImmatureCreditCached;
-            nImmatureCreditCached = pwallet->GetCredit(*this, MINE_SPENDABLE);
+            nImmatureCreditCached = pwallet->GetCredit(*this, ISMINE_SPENDABLE);
             fImmatureCreditCached = true;
             return nImmatureCreditCached;
         }
@@ -693,7 +693,7 @@ class CWalletTx : public CMerkleTx
             if (!pwallet->IsSpent(hashTx, i))
             {
                 const CTxOut &txout = vout[i];
-                nCredit += pwallet->GetCredit(txout, MINE_SPENDABLE);
+                nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
                 if (!MoneyRange(nCredit))
                     throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
             }
@@ -710,7 +710,7 @@ class CWalletTx : public CMerkleTx
         {
             if (fUseCache && fImmatureWatchCreditCached)
                 return nImmatureWatchCreditCached;
-            nImmatureWatchCreditCached = pwallet->GetCredit(*this, MINE_WATCH_ONLY);
+            nImmatureWatchCreditCached = pwallet->GetCredit(*this, ISMINE_WATCH_ONLY);
             fImmatureWatchCreditCached = true;
             return nImmatureWatchCreditCached;
         }
@@ -736,7 +736,7 @@ class CWalletTx : public CMerkleTx
             if (!pwallet->IsSpent(GetHash(), i))
             {
                 const CTxOut &txout = vout[i];
-                nCredit += pwallet->GetCredit(txout, MINE_WATCH_ONLY);
+                nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY);
                 if (!MoneyRange(nCredit))
                     throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
             }
@@ -777,7 +777,7 @@ class CWalletTx : public CMerkleTx
             return true;
         if (nDepth < 0)
             return false;
-        if (!bSpendZeroConfChange || !IsFromMe(MINE_ALL)) // using wtx's cached debit
+        if (!bSpendZeroConfChange || !IsFromMe(ISMINE_ALL)) // using wtx's cached debit
             return false;
 
         // Trusted if all inputs are from us and are in the mempool:
@@ -788,7 +788,7 @@ class CWalletTx : public CMerkleTx
             if (parent == NULL)
                 return false;
             const CTxOut& parentOut = parent->vout[txin.prevout.n];
-            if (pwallet->IsMine(parentOut) != MINE_SPENDABLE)
+            if (pwallet->IsMine(parentOut) != ISMINE_SPENDABLE)
                 return false;
         }
         return true;

From 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Wed, 2 Jul 2014 09:27:29 -0700
Subject: [PATCH 0313/1819] Remove signal DoubleSpendDetected, use function

Also removes the need for forward reference to RelayableRespend.
---
 src/init.cpp |   2 +-
 src/main.cpp | 103 +++++++++++++++++++++++----------------------------
 src/main.h   |   4 +-
 3 files changed, 50 insertions(+), 59 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index da13218a940b..6c0898c036d4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1176,7 +1176,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("mapAddressBook.size() = %u\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
 #endif
 
-    RegisterInternalSignals();
+    InitRespendFilter();
     StartNode(threadGroup);
     if (fServer)
         StartRPCThreads();
diff --git a/src/main.cpp b/src/main.cpp
index 1294e5b2ed8b..7baf33c39f9b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -125,9 +125,14 @@ namespace {
 
 } // anon namespace
 
-// Forward reference functions defined here:
+// Bloom filter to limit respend relays to one
 static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
-static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
+static CBloomFilter doubleSpendFilter;
+void InitRespendFilter() {
+    seed_insecure_rand();
+    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
+}
+
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -151,24 +156,10 @@ struct CMainSignals {
     boost::signals2::signal<void (const uint256 &)> Inventory;
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
-    // Notifies listeners of detection of a double-spent transaction. Arguments are outpoint that is
-    // double-spent, first transaction seen, double-spend transaction, and whether the second double-spend
-    // transaction was first seen in a block.
-    // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
-    // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
-    boost::signals2::signal<bool (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 
 } // anon namespace
 
-void RegisterInternalSignals() {
-    static CBloomFilter doubleSpendFilter;
-    seed_insecure_rand();
-    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
-
-    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayableRespend, _1, _2, _3, doubleSpendFilter));
-}
-
 
 void RegisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
@@ -908,6 +899,45 @@ bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsig
     return false;
 }
 
+static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+{
+    // Relaying double-spend attempts to our peers lets them detect when
+    // somebody might be trying to cheat them. However, blindly relaying
+    // every double-spend across the entire network gives attackers
+    // a denial-of-service attack: just generate a stream of double-spends
+    // re-spending the same (limited) set of outpoints owned by the attacker.
+    // So, we use a bloom filter and only relay (at most) the first double
+    // spend for each outpoint. False-positives ("we have already relayed")
+    // are OK, because if the peer doesn't hear about the double-spend
+    // from us they are very likely to hear about it from another peer, since
+    // each peer uses a different, randomized bloom filter.
+
+    if (fInBlock || filter.contains(outPoint)) return false;
+
+    // Apply an independent rate limit to double-spend relays
+    static double dRespendCount;
+    static int64_t nLastRespendTime;
+    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
+    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
+
+    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
+    {
+        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
+        return false;
+    }
+
+    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
+
+    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
+    // insertions
+    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
+        filter.clear();
+
+    filter.insert(outPoint);
+
+    return true;
+}
+
 bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
                         bool* pfMissingInputs, bool fRejectInsaneFee)
 {
@@ -945,7 +975,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Does tx conflict with a member of the pool, and is it not equivalent to that member?
         if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
         {
-            relayableRespend = g_signals.DetectedDoubleSpend(outpoint, tx, false);
+            relayableRespend = RelayableRespend(outpoint, tx, false, doubleSpendFilter);
             if (!relayableRespend)
                 return false;
         }
@@ -1057,45 +1087,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return !relayableRespend;
 }
 
-static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
-{
-    // Relaying double-spend attempts to our peers lets them detect when
-    // somebody might be trying to cheat them. However, blindly relaying
-    // every double-spend across the entire network gives attackers
-    // a denial-of-service attack: just generate a stream of double-spends
-    // re-spending the same (limited) set of outpoints owned by the attacker.
-    // So, we use a bloom filter and only relay (at most) the first double
-    // spend for each outpoint. False-positives ("we have already relayed")
-    // are OK, because if the peer doesn't hear about the double-spend
-    // from us they are very likely to hear about it from another peer, since
-    // each peer uses a different, randomized bloom filter.
-
-    if (fInBlock || filter.contains(outPoint)) return false;
-
-    // Apply an independent rate limit to double-spend relays
-    static double dRespendCount;
-    static int64_t nLastRespendTime;
-    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
-    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
-
-    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
-    {
-        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
-        return false;
-    }
-
-    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
-
-    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
-    // insertions
-    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
-        filter.clear();
-
-    filter.insert(outPoint);
-
-    return true;
-}
-
 
 int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
 {
diff --git a/src/main.h b/src/main.h
index 19f446900809..26450bb7212c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -108,8 +108,8 @@ struct CNodeStateStats;
 
 struct CBlockTemplate;
 
-/** Set up internal signal handlers **/
-void RegisterInternalSignals();
+/** Initialize respend bloom filter **/
+void InitRespendFilter();
 
 /** Register a wallet to receive updates from core */
 void RegisterWallet(CWalletInterface* pwalletIn);

From 834e46e847188df513b8b57ab30fe9940f2b2dd0 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 2 Jul 2014 18:36:43 +0200
Subject: [PATCH 0314/1819] CBlockIndex()::SetNull() method to avoid code
 repetition

---
 src/main.h | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/main.h b/src/main.h
index 19f446900809..cc7dea75a1e4 100644
--- a/src/main.h
+++ b/src/main.h
@@ -718,7 +718,7 @@ class CBlockIndex
     // (memory only) Sequencial id assigned to distinguish order in which blocks are received.
     uint32_t nSequenceId;
 
-    CBlockIndex()
+    void SetNull()
     {
         phashBlock = NULL;
         pprev = NULL;
@@ -740,20 +740,14 @@ class CBlockIndex
         nNonce         = 0;
     }
 
+    CBlockIndex()
+    {
+        SetNull();
+    }
+
     CBlockIndex(CBlockHeader& block)
     {
-        phashBlock = NULL;
-        pprev = NULL;
-        pskip = NULL;
-        nHeight = 0;
-        nFile = 0;
-        nDataPos = 0;
-        nUndoPos = 0;
-        nChainWork = 0;
-        nTx = 0;
-        nChainTx = 0;
-        nStatus = 0;
-        nSequenceId = 0;
+        SetNull();
 
         nVersion       = block.nVersion;
         hashMerkleRoot = block.hashMerkleRoot;

From 4278b1df45d93d18dfa0a8ce8d6fd7ac9b5344a6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 3 Jul 2014 06:26:03 +0200
Subject: [PATCH 0315/1819] Clarify error message when invalid -rpcallowip

Also add to HelpMessage() what specifications are valid.
---
 src/init.cpp      | 2 +-
 src/rpcserver.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index da13218a940b..2dd141a73592 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -323,7 +323,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
     strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
     strUsage += "  -rpcport=<port>        " + _("Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)") + "\n";
-    strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified IP address. This option can be specified multiple times") + "\n";
+    strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times") + "\n";
     strUsage += "  -rpcthreads=<n>        " + _("Set the number of threads to service RPC calls (default: 4)") + "\n";
 
     strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index f47b3385da6e..5c4d30749744 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -512,7 +512,7 @@ void StartRPCThreads()
             if(!subnet.IsValid())
             {
                 uiInterface.ThreadSafeMessageBox(
-                    strprintf("Invalid -rpcallowip subnet specification: %s", strAllow),
+                    strprintf("Invalid -rpcallowip subnet specification: %s. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).", strAllow),
                     "", CClientUIInterface::MSG_ERROR);
                 StartShutdown();
                 return;

From b33d1f5ee512da5719b793b3867f75f1eea5cf52 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 27 May 2014 15:44:57 -0400
Subject: [PATCH 0316/1819] Use fee/priority estimates in wallet
 CreateTransaction

The wallet now uses the mempool fee estimator with a new
command-line option: -txconfirmtarget (default: 1) instead
of using hard-coded fees or priorities.

A new bitcoind that hasn't seen enough transactions to estimate
will fall back to the old hard-coded minimum priority or
transaction fee.

-paytxfee option overrides -txconfirmtarget.

Relaying and mining code isn't changed.

For Qt, the coin control dialog now uses priority estimates to
label transaction priority (instead of hard-coded constants);
unspent outputs were consistently labeled with a much higher
priority than is justified by the free transactions actually
being accepted into blocks.

I did not implement any GUI for setting -txconfirmtarget; I would
suggest getting rid of the "Pay transaction fee" GUI and replace
it with either "target number of confirmations" or maybe
a "faster confirmation <--> lower fee" slider or select box.
---
 doc/release-notes.md         | 20 +++++++++++++++
 src/core.h                   |  3 ++-
 src/init.cpp                 |  7 ++++++
 src/main.cpp                 | 13 +++-------
 src/main.h                   |  9 +------
 src/qt/coincontroldialog.cpp | 48 +++++++++++++++++++++---------------
 src/qt/coincontroldialog.h   |  3 ++-
 src/wallet.cpp               | 44 +++++++++++++++++++++++++++------
 src/wallet.h                 |  5 ++++
 9 files changed, 105 insertions(+), 47 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 3a4079e437e8..66059800b67b 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,6 +1,26 @@
 (note: this is a temporary file, to be added-to by anybody, and moved to
 release-notes at release time)
 
+Transaction fee changes
+=======================
+
+This release automatically estimates how high a transaction fee (or how
+high a priority) transactions require to be confirmed quickly. The default
+settings will create transactions that confirm quickly; see the new
+'txconfirmtarget' setting to control the tradeoff between fees and
+confirmation times.
+
+Prior releases used hard-coded fees (and priorities), and would
+sometimes create transactions that took a very long time to confirm.
+
+
+New Command Line Options
+========================
+
+-txconfirmtarget=n : create transactions that have enough fees (or priority)
+so they are likely to confirm within n blocks (default: 1). This setting
+is over-ridden by the -paytxfee option.
+
 New RPC methods
 ===============
 
diff --git a/src/core.h b/src/core.h
index 8606831575a6..d6e7ab870d90 100644
--- a/src/core.h
+++ b/src/core.h
@@ -131,7 +131,8 @@ class CFeeRate
     friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
     friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
     friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
-
+    friend bool operator<=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK <= b.nSatoshisPerK; }
+    friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
     std::string ToString() const;
 
     IMPLEMENT_SERIALIZE( READWRITE(nSatoshisPerK); )
diff --git a/src/init.cpp b/src/init.cpp
index 2dd141a73592..3ee0f2aa39c8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -254,6 +254,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
+    strUsage += "  -txconfirmtarget=<n>   " + _("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)") + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -spendzeroconfchange   " + _("Spend unconfirmed change when sending transactions (default: 1)") + "\n";
@@ -635,7 +636,13 @@ bool AppInit2(boost::thread_group& threadGroup)
         if (nFeePerK > nHighTransactionFeeWarning)
             InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
         payTxFee = CFeeRate(nFeePerK, 1000);
+        if (payTxFee < CTransaction::minRelayTxFee)
+        {
+            return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
+                                       mapArgs["-paytxfee"], CTransaction::minRelayTxFee.ToString()));
+        }
     }
+    nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
 
     std::string strWalletFile = GetArg("-wallet", "wallet.dat");
diff --git a/src/main.cpp b/src/main.cpp
index 04d9523e26ed..6be1a29c6cc8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -858,7 +858,7 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
     return true;
 }
 
-int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode)
+int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
 {
     {
         LOCK(mempool.cs);
@@ -870,10 +870,7 @@ int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree,
             return 0;
     }
 
-    // Base fee is either minTxFee or minRelayTxFee
-    CFeeRate baseFeeRate = (mode == GMF_RELAY) ? tx.minRelayTxFee : tx.minTxFee;
-
-    int64_t nMinFee = baseFeeRate.GetFee(nBytes);
+    int64_t nMinFee = tx.minRelayTxFee.GetFee(nBytes);
 
     if (fAllowFree)
     {
@@ -881,9 +878,7 @@ int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree,
         // * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000
         //   to be considered to fall into this category. We don't want to encourage sending
         //   multiple transactions instead of one big transaction to avoid fees.
-        // * If we are creating a transaction we allow transactions up to 1,000 bytes
-        //   to be considered safe and assume they can likely make it into this section.
-        if (nBytes < (mode == GMF_SEND ? 1000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
+        if (nBytes < (DEFAULT_BLOCK_PRIORITY_SIZE - 1000))
             nMinFee = 0;
     }
 
@@ -1005,7 +1000,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         unsigned int nSize = entry.GetTxSize();
 
         // Don't accept it if it can't get into a block
-        int64_t txMinFee = GetMinFee(tx, nSize, true, GMF_RELAY);
+        int64_t txMinFee = GetMinRelayFee(tx, nSize, true);
         if (fLimitFree && nFees < txMinFee)
             return state.DoS(0, error("AcceptToMemoryPool : not enough fees %s, %d < %d",
                                       hash.ToString(), nFees, txMinFee),
diff --git a/src/main.h b/src/main.h
index 19f446900809..e8df17dda005 100644
--- a/src/main.h
+++ b/src/main.h
@@ -245,14 +245,7 @@ struct CDiskTxPos : public CDiskBlockPos
 };
 
 
-
-enum GetMinFee_mode
-{
-    GMF_RELAY,
-    GMF_SEND,
-};
-
-int64_t GetMinFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree, enum GetMinFee_mode mode);
+int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
 
 //
 // Check transaction inputs, and make sure any
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index c6a6150392fe..73494f52ea32 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -16,6 +16,8 @@
 #include "main.h"
 #include "wallet.h"
 
+#include <boost/assign/list_of.hpp> // for 'map_list_of()'
+
 #include <QApplication>
 #include <QCheckBox>
 #include <QCursor>
@@ -400,23 +402,24 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
 }
 
 // return human readable label for priority number
-QString CoinControlDialog::getPriorityLabel(double dPriority)
+QString CoinControlDialog::getPriorityLabel(const CTxMemPool& pool, double dPriority)
 {
-    if (AllowFree(dPriority)) // at least medium
+    // confirmations -> textual description
+    typedef std::map<unsigned int, QString> PriorityDescription;
+    static PriorityDescription priorityDescriptions = boost::assign::map_list_of
+        (1, tr("highest"))(2, tr("higher"))(3, tr("high"))
+        (5, tr("medium-high"))(6, tr("medium"))
+        (10, tr("low-medium"))(15, tr("low"))
+        (20, tr("lower"));
+
+    BOOST_FOREACH(const PriorityDescription::value_type& i, priorityDescriptions)
     {
-        if      (AllowFree(dPriority / 1000000))  return tr("highest");
-        else if (AllowFree(dPriority / 100000))   return tr("higher");
-        else if (AllowFree(dPriority / 10000))    return tr("high");
-        else if (AllowFree(dPriority / 1000))     return tr("medium-high");
-        else                                      return tr("medium");
-    }
-    else
-    {
-        if      (AllowFree(dPriority * 10))   return tr("low-medium");
-        else if (AllowFree(dPriority * 100))  return tr("low");
-        else if (AllowFree(dPriority * 1000)) return tr("lower");
-        else                                  return tr("lowest");
+        double p = mempool.estimatePriority(i.first);
+        if (p > 0 && dPriority >= p) return i.second;
     }
+    // Note: if mempool hasn't accumulated enough history (estimatePriority
+    // returns -1) we're conservative and classify as "lowest"
+    return tr("lowest");
 }
 
 // shows count of locked unspent outputs
@@ -518,15 +521,20 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
         // Priority
         dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
-        sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority);
+        sPriorityLabel = CoinControlDialog::getPriorityLabel(mempool, dPriority);
 
         // Fee
         int64_t nFee = payTxFee.GetFee(max((unsigned int)1000, nBytes));
 
         // Min Fee
-        int64_t nMinFee = GetMinFee(txDummy, nBytes, AllowFree(dPriority), GMF_SEND);
+        nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+
+        double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
+        if (dPriorityNeeded <= 0) // Not enough mempool history: never send free
+            dPriorityNeeded = std::numeric_limits<double>::max();
 
-        nPayFee = max(nFee, nMinFee);
+        if (nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE && dPriority >= dPriorityNeeded)
+            nPayFee = 0;
 
         if (nPayAmount > 0)
         {
@@ -591,7 +599,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     }
 
     // turn labels "red"
-    l5->setStyleSheet((nBytes >= 1000) ? "color:red;" : "");                            // Bytes >= 1000
+    l5->setStyleSheet((nBytes >= MAX_FREE_TRANSACTION_CREATE_SIZE) ? "color:red;" : "");// Bytes >= 1000
     l6->setStyleSheet((dPriority > 0 && !AllowFree(dPriority)) ? "color:red;" : "");    // Priority < "medium"
     l7->setStyleSheet((fDust) ? "color:red;" : "");                                     // Dust = "yes"
 
@@ -732,7 +740,7 @@ void CoinControlDialog::updateView()
 
             // priority
             double dPriority = ((double)out.tx->vout[out.i].nValue  / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10
-            itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority));
+            itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(mempool, dPriority));
             itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " "));
             dPrioritySum += (double)out.tx->vout[out.i].nValue  * (out.nDepth+1);
             nInputSum    += nInputSize;
@@ -765,7 +773,7 @@ void CoinControlDialog::updateView()
             itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
             itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
             itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
-            itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum));
+            itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(mempool, dPrioritySum));
             itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " "));
         }
     }
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index 465e2a009d76..4f7422642fd1 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -19,6 +19,7 @@ namespace Ui {
 }
 class WalletModel;
 class CCoinControl;
+class CTxMemPool;
 
 class CoinControlDialog : public QDialog
 {
@@ -32,7 +33,7 @@ class CoinControlDialog : public QDialog
 
     // static because also called from sendcoinsdialog
     static void updateLabels(WalletModel*, QDialog*);
-    static QString getPriorityLabel(double);
+    static QString getPriorityLabel(const CTxMemPool& pool, double);
 
     static QList<qint64> payAmounts;
     static CCoinControl *coinControl;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index daca7ac04b3d..d9187e4be3d2 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -18,6 +18,7 @@ using namespace std;
 
 // Settings
 CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
+unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1273,6 +1274,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
         return false;
     }
 
+    wtxNew.fTimeReceivedIsTxTime = true;
     wtxNew.BindWallet(this);
     CMutableTransaction txNew;
 
@@ -1393,19 +1395,31 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 }
                 dPriority = wtxNew.ComputePriority(dPriority, nBytes);
 
-                // Check that enough fee is included
-                int64_t nPayFee = payTxFee.GetFee(nBytes);
-                bool fAllowFree = AllowFree(dPriority);
-                int64_t nMinFee = GetMinFee(wtxNew, nBytes, fAllowFree, GMF_SEND);
-                if (nFeeRet < max(nPayFee, nMinFee))
+                int64_t nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+
+                if (nFeeRet >= nFeeNeeded)
+                    break; // Done, enough fee included.
+
+                // Too big to send for free? Include more fee and try again:
+                if (nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE)
                 {
-                    nFeeRet = max(nPayFee, nMinFee);
+                    nFeeRet = nFeeNeeded;
                     continue;
                 }
 
-                wtxNew.fTimeReceivedIsTxTime = true;
+                // Not enough fee: enough priority?
+                double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
+                // Not enough mempool history to estimate: use hard-coded AllowFree.
+                if (dPriorityNeeded <= 0 && AllowFree(dPriority))
+                    break;
 
-                break;
+                // Small enough, and priority high enough, to send for free
+                if (dPriority >= dPriorityNeeded)
+                    break;
+
+                // Include more fee and try again.
+                nFeeRet = nFeeNeeded;
+                continue;
             }
         }
     }
@@ -1513,6 +1527,20 @@ string CWallet::SendMoneyToDestination(const CTxDestination& address, int64_t nV
     return SendMoney(scriptPubKey, nValue, wtxNew);
 }
 
+int64_t CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool)
+{
+    // payTxFee is user-set "I want to pay this much"
+    int64_t nFeeNeeded = payTxFee.GetFee(nTxBytes);
+    // User didn't set: use -txconfirmtarget to estimate...
+    if (nFeeNeeded == 0)
+        nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);
+    // ... unless we don't have enough mempool data, in which case fall
+    // back to a hard-coded fee
+    if (nFeeNeeded == 0)
+        nFeeNeeded = CTransaction::minTxFee.GetFee(nTxBytes);
+    return nFeeNeeded;
+}
+
 
 
 
diff --git a/src/wallet.h b/src/wallet.h
index 1c2512d67819..19a1b185237f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -25,12 +25,15 @@
 
 // Settings
 extern CFeeRate payTxFee;
+extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
 
 // -paytxfee default
 static const int64_t DEFAULT_TRANSACTION_FEE = 0;
 // -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
 static const int nHighTransactionFeeWarning = 0.01 * COIN;
+// Largest (in bytes) free transaction we're willing to create
+static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
 
 class CAccountingEntry;
 class CCoinControl;
@@ -265,6 +268,8 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     std::string SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew);
     std::string SendMoneyToDestination(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew);
 
+    static int64_t GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);
+
     bool NewKeyPool();
     bool TopUpKeyPool(unsigned int kpSize = 0);
     void ReserveKeyFromKeyPool(int64_t& nIndex, CKeyPool& keypool);

From 4b7b1bb1ac54e067d889170757a8c45f0baaae3d Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Mon, 23 Jun 2014 10:58:59 -0400
Subject: [PATCH 0317/1819] Sanity checks for estimates

Require at least 11 samples before giving fee/priority estimates.

And have wallet-created transactions go throught the fee-sanity-check
code path.
---
 src/main.cpp      | 4 ++--
 src/main.h        | 2 +-
 src/txmempool.cpp | 9 +++++++--
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 6be1a29c6cc8..d1ddf1600dcb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1129,10 +1129,10 @@ int CMerkleTx::GetBlocksToMaturity() const
 }
 
 
-bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree)
+bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectInsaneFee)
 {
     CValidationState state;
-    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL);
+    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectInsaneFee);
 }
 
 
diff --git a/src/main.h b/src/main.h
index e8df17dda005..4c7b7fd8d4cb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -452,7 +452,7 @@ class CMerkleTx : public CTransaction
     int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
     bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
     int GetBlocksToMaturity() const;
-    bool AcceptToMemoryPool(bool fLimitFree=true);
+    bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
 };
 
 
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 97a426dd355a..0a8ad96aace4 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -251,8 +251,13 @@ class CMinerPolicyEstimator
             std::sort(sortedFeeSamples.begin(), sortedFeeSamples.end(),
                       std::greater<CFeeRate>());
         }
-        if (sortedFeeSamples.size() == 0)
+        if (sortedFeeSamples.size() < 11)
+        {
+            // Eleven is Gavin's Favorite Number
+            // ... but we also take a maximum of 10 samples per block so eleven means
+            // we're getting samples from at least two different blocks
             return CFeeRate(0);
+        }
 
         int nBucketSize = history.at(nBlocksToConfirm).FeeSamples();
 
@@ -281,7 +286,7 @@ class CMinerPolicyEstimator
             std::sort(sortedPrioritySamples.begin(), sortedPrioritySamples.end(),
                       std::greater<double>());
         }
-        if (sortedPrioritySamples.size() == 0)
+        if (sortedPrioritySamples.size() < 11)
             return -1.0;
 
         int nBucketSize = history.at(nBlocksToConfirm).PrioritySamples();

From 13fc83c77bb9108c00dd7709ce17719edb763273 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 3 Jul 2014 14:25:32 -0400
Subject: [PATCH 0318/1819] Move fee policy out of core

---
 src/core.cpp                 |  2 +-
 src/core.h                   |  6 ++----
 src/init.cpp                 | 30 +++++++++++++++---------------
 src/main.cpp                 | 18 ++++++++----------
 src/main.h                   |  1 +
 src/miner.cpp                |  2 +-
 src/qt/coincontroldialog.cpp | 14 +++++++-------
 src/qt/guiutil.cpp           |  3 ++-
 src/qt/optionsdialog.cpp     |  9 +++++++--
 src/qt/paymentserver.cpp     |  2 +-
 src/rpcmisc.cpp              |  2 +-
 src/rpcnet.cpp               |  2 +-
 src/txmempool.cpp            | 26 +++++++++++++-------------
 src/txmempool.h              |  4 +++-
 src/wallet.cpp               |  9 ++++++---
 src/wallet.h                 |  1 +
 16 files changed, 70 insertions(+), 61 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index ca2862452970..47f3b2a015ae 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -80,7 +80,7 @@ CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
         nSatoshisPerK = 0;
 }
 
-int64_t CFeeRate::GetFee(size_t nSize)
+int64_t CFeeRate::GetFee(size_t nSize) const
 {
     return nSatoshisPerK*nSize / 1000;
 }
diff --git a/src/core.h b/src/core.h
index d6e7ab870d90..0387336c98fd 100644
--- a/src/core.h
+++ b/src/core.h
@@ -125,8 +125,8 @@ class CFeeRate
     CFeeRate(int64_t nFeePaid, size_t nSize);
     CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
 
-    int64_t GetFee(size_t size); // unit returned is satoshis
-    int64_t GetFeePerK() { return GetFee(1000); } // satoshis-per-1000-bytes
+    int64_t GetFee(size_t size) const; // unit returned is satoshis
+    int64_t GetFeePerK() const { return GetFee(1000); } // satoshis-per-1000-bytes
 
     friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
     friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
@@ -217,8 +217,6 @@ class CTransaction
     void UpdateHash() const;
 
 public:
-    static CFeeRate minTxFee;
-    static CFeeRate minRelayTxFee;
     static const int CURRENT_VERSION=1;
 
     // The local variables are made const to prevent unintended modification
diff --git a/src/init.cpp b/src/init.cpp
index 3ee0f2aa39c8..5afae3232746 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -253,15 +253,16 @@ std::string HelpMessage(HelpMessageMode mode)
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
+    strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
-    strUsage += "  -txconfirmtarget=<n>   " + _("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)") + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
+    strUsage += "  -respendnotify=<cmd>   " + _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -spendzeroconfchange   " + _("Spend unconfirmed change when sending transactions (default: 1)") + "\n";
+    strUsage += "  -txconfirmtarget=<n>   " + _("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)") + "\n";
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + _("(default: wallet.dat)") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
-    strUsage += "  -respendnotify=<cmd>   " + _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)") + "\n";
     strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup") + "\n";
     strUsage += "                         " + _("(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
@@ -295,8 +296,7 @@ std::string HelpMessage(HelpMessageMode mode)
         strUsage += "  -limitfreerelay=<n>    " + _("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:15)") + "\n";
         strUsage += "  -maxsigcachesize=<n>   " + _("Limit size of signature cache to <n> entries (default: 50000)") + "\n";
     }
-    strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CTransaction::minTxFee.GetFeePerK())) + "\n";
-    strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(CTransaction::minRelayTxFee.GetFeePerK())) + "\n";
+    strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
@@ -610,24 +610,24 @@ bool AppInit2(boost::thread_group& threadGroup)
     // a transaction spammer can cheaply fill blocks using
     // 1-satoshi-fee transactions. It should be set above the real
     // cost to you of processing a transaction.
-    if (mapArgs.count("-mintxfee"))
-    {
-        int64_t n = 0;
-        if (ParseMoney(mapArgs["-mintxfee"], n) && n > 0)
-            CTransaction::minTxFee = CFeeRate(n);
-        else
-            return InitError(strprintf(_("Invalid amount for -mintxfee=<amount>: '%s'"), mapArgs["-mintxfee"]));
-    }
     if (mapArgs.count("-minrelaytxfee"))
     {
         int64_t n = 0;
         if (ParseMoney(mapArgs["-minrelaytxfee"], n) && n > 0)
-            CTransaction::minRelayTxFee = CFeeRate(n);
+            ::minRelayTxFee = CFeeRate(n);
         else
             return InitError(strprintf(_("Invalid amount for -minrelaytxfee=<amount>: '%s'"), mapArgs["-minrelaytxfee"]));
     }
 
 #ifdef ENABLE_WALLET
+    if (mapArgs.count("-mintxfee"))
+    {
+        int64_t n = 0;
+        if (ParseMoney(mapArgs["-mintxfee"], n) && n > 0)
+            CWallet::minTxFee = CFeeRate(n);
+        else
+            return InitError(strprintf(_("Invalid amount for -mintxfee=<amount>: '%s'"), mapArgs["-mintxfee"]));
+    }
     if (mapArgs.count("-paytxfee"))
     {
         int64_t nFeePerK = 0;
@@ -636,10 +636,10 @@ bool AppInit2(boost::thread_group& threadGroup)
         if (nFeePerK > nHighTransactionFeeWarning)
             InitWarning(_("Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
         payTxFee = CFeeRate(nFeePerK, 1000);
-        if (payTxFee < CTransaction::minRelayTxFee)
+        if (payTxFee < ::minRelayTxFee)
         {
             return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
-                                       mapArgs["-paytxfee"], CTransaction::minRelayTxFee.ToString()));
+                                       mapArgs["-paytxfee"], ::minRelayTxFee.ToString()));
         }
     }
     nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
diff --git a/src/main.cpp b/src/main.cpp
index d1ddf1600dcb..54b926abdb85 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,8 +38,6 @@ using namespace boost;
 
 CCriticalSection cs_main;
 
-CTxMemPool mempool;
-
 map<uint256, CBlockIndex*> mapBlockIndex;
 CChain chainActive;
 int64_t nTimeBestReceived = 0;
@@ -50,10 +48,10 @@ bool fBenchmark = false;
 bool fTxIndex = false;
 unsigned int nCoinCacheSize = 5000;
 
-/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
-CFeeRate CTransaction::minTxFee = CFeeRate(10000);  // Override with -mintxfee
 /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
-CFeeRate CTransaction::minRelayTxFee = CFeeRate(1000);
+CFeeRate minRelayTxFee = CFeeRate(1000);
+
+CTxMemPool mempool(::minRelayTxFee);
 
 struct COrphanBlock {
     uint256 hashBlock;
@@ -617,7 +615,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
         }
         if (whichType == TX_NULL_DATA)
             nDataOut++;
-        else if (txout.IsDust(CTransaction::minRelayTxFee)) {
+        else if (txout.IsDust(::minRelayTxFee)) {
             reason = "dust";
             return false;
         }
@@ -870,7 +868,7 @@ int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
             return 0;
     }
 
-    int64_t nMinFee = tx.minRelayTxFee.GetFee(nBytes);
+    int64_t nMinFee = ::minRelayTxFee.GetFee(nBytes);
 
     if (fAllowFree)
     {
@@ -1009,7 +1007,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Continuously rate-limit free (really, very-low-fee)transactions
         // This mitigates 'penny-flooding' -- sending thousands of free transactions just to
         // be annoying or make others' transactions take longer to confirm.
-        if (fLimitFree && nFees < CTransaction::minRelayTxFee.GetFee(nSize))
+        if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
         {
             static double dFreeCount;
             static int64_t nLastFreeTime;
@@ -1022,10 +1020,10 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
             LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
         }
 
-        if (fRejectInsaneFee && nFees > CTransaction::minRelayTxFee.GetFee(nSize) * 10000)
+        if (fRejectInsaneFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000)
             return error("AcceptToMemoryPool: : insane fees %s, %d > %d",
                          hash.ToString(),
-                         nFees, CTransaction::minRelayTxFee.GetFee(nSize) * 10000);
+                         nFees, ::minRelayTxFee.GetFee(nSize) * 10000);
 
         // Check against previous transactions
         // This is done last to help prevent CPU exhaustion denial-of-service attacks.
diff --git a/src/main.h b/src/main.h
index 4c7b7fd8d4cb..961f2e78affd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -93,6 +93,7 @@ extern bool fBenchmark;
 extern int nScriptCheckThreads;
 extern bool fTxIndex;
 extern unsigned int nCoinCacheSize;
+extern CFeeRate minRelayTxFee;
 
 // Minimum disk space required - used in CheckDiskSpace()
 static const uint64_t nMinDiskSpace = 52428800;
diff --git a/src/miner.cpp b/src/miner.cpp
index 69e53756e087..17918a1280d9 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -236,7 +236,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             double dPriorityDelta = 0;
             int64_t nFeeDelta = 0;
             mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
-            if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < CTransaction::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
+            if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < ::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
                 continue;
 
             // Prioritise by fee once past the priority size or we run out of high-priority
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 73494f52ea32..e0a524a55e75 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -406,7 +406,7 @@ QString CoinControlDialog::getPriorityLabel(const CTxMemPool& pool, double dPrio
 {
     // confirmations -> textual description
     typedef std::map<unsigned int, QString> PriorityDescription;
-    static PriorityDescription priorityDescriptions = boost::assign::map_list_of
+    const static PriorityDescription priorityDescriptions = boost::assign::map_list_of
         (1, tr("highest"))(2, tr("higher"))(3, tr("high"))
         (5, tr("medium-high"))(6, tr("medium"))
         (10, tr("low-medium"))(15, tr("low"))
@@ -452,7 +452,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         {
             CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
             txDummy.vout.push_back(txout);
-            if (txout.IsDust(CTransaction::minRelayTxFee))
+            if (txout.IsDust(::minRelayTxFee))
                fDust = true;
         }
     }
@@ -544,7 +544,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
             if (nChange > 0 && nChange < CENT)
             {
                 CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0));
-                if (txout.IsDust(CTransaction::minRelayTxFee))
+                if (txout.IsDust(::minRelayTxFee))
                 {
                     nPayFee += nChange;
                     nChange = 0;
@@ -605,17 +605,17 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
     // tool tips
     QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
-    toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK())) + "<br /><br />";
+    toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />";
     toolTip1 += tr("Can vary +/- 1 byte per input.");
 
     QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
     toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
-    toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
+    toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK()));
 
-    QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minRelayTxFee.GetFee(546)));
+    QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
 
     // how many satoshis the estimated fee can vary per byte we guess wrong
-    double dFeeVary = (double)std::max(CTransaction::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
+    double dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
     QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
 
     l3->setToolTip(toolTip4);
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 81b905425274..60a131df7ef0 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -11,6 +11,7 @@
 
 #include "core.h"
 #include "init.h"
+#include "main.h"
 #include "protocol.h"
 #include "util.h"
 
@@ -212,7 +213,7 @@ bool isDust(const QString& address, qint64 amount)
     CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
     CScript script; script.SetDestination(dest);
     CTxOut txOut(amount, script);
-    return txOut.IsDust(CTransaction::minRelayTxFee);
+    return txOut.IsDust(::minRelayTxFee);
 }
 
 QString HtmlEscape(const QString& str, bool fMultiLine)
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 12d54dff6450..9502dba904f3 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -14,7 +14,10 @@
 #include "monitoreddatamapper.h"
 #include "optionsmodel.h"
 
-#include "main.h" // for CTransaction::minTxFee and MAX_SCRIPTCHECK_THREADS
+#include "main.h" // for MAX_SCRIPTCHECK_THREADS
+#ifdef ENABLE_WALLET
+#include "wallet.h" // for CWallet::minTxFee
+#endif
 #include "netbase.h"
 #include "txdb.h" // for -dbcache defaults
 
@@ -101,7 +104,9 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
 #endif
 
     ui->unit->setModel(new BitcoinUnits(this));
-    ui->transactionFee->setSingleStep(CTransaction::minTxFee.GetFeePerK());
+#ifdef ENABLE_WALLET
+    ui->transactionFee->setSingleStep(CWallet::minTxFee.GetFeePerK());
+#endif
 
     /* Widget-to-option mapper */
     mapper = new MonitoredDataMapper(this);
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 6ca90f0513d3..53db2c5cd963 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -551,7 +551,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
 
         // Extract and check amounts
         CTxOut txOut(sendingTo.second, sendingTo.first);
-        if (txOut.IsDust(CTransaction::minRelayTxFee)) {
+        if (txOut.IsDust(::minRelayTxFee)) {
             emit message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
                 .arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second)),
                 CClientUIInterface::MSG_ERROR);
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 5b470516a102..9ed6b52513ba 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -84,7 +84,7 @@ Value getinfo(const Array& params, bool fHelp)
         obj.push_back(Pair("unlocked_until", nWalletUnlockTime));
     obj.push_back(Pair("paytxfee",      ValueFromAmount(payTxFee.GetFeePerK())));
 #endif
-    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::minRelayTxFee.GetFeePerK())));
+    obj.push_back(Pair("relayfee",      ValueFromAmount(::minRelayTxFee.GetFeePerK())));
     obj.push_back(Pair("errors",        GetWarnings("statusbar")));
     return obj;
 }
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 2d7abb2d5872..cd3bd59f8f6e 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -372,7 +372,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
-    obj.push_back(Pair("relayfee",      ValueFromAmount(CTransaction::minRelayTxFee.GetFeePerK())));
+    obj.push_back(Pair("relayfee",      ValueFromAmount(::minRelayTxFee.GetFeePerK())));
     Array localAddresses;
     {
         LOCK(cs_mapLocalHost);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 0a8ad96aace4..a852de5da885 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -80,13 +80,13 @@ class CBlockAverage
 
     // Used as belt-and-suspenders check when reading to detect
     // file corruption
-    bool AreSane(const std::vector<CFeeRate>& vecFee)
+    bool AreSane(const std::vector<CFeeRate>& vecFee, const CFeeRate& minRelayFee)
     {
         BOOST_FOREACH(CFeeRate fee, vecFee)
         {
             if (fee < CFeeRate(0))
                 return false;
-            if (fee.GetFee(1000) > CTransaction::minRelayTxFee.GetFee(1000) * 10000)
+            if (fee.GetFeePerK() > minRelayFee.GetFeePerK() * 10000)
                 return false;
         }
         return true;
@@ -109,10 +109,10 @@ class CBlockAverage
         fileout << vecPriority;
     }
 
-    void Read(CAutoFile& filein) {
+    void Read(CAutoFile& filein, const CFeeRate& minRelayFee) {
         std::vector<CFeeRate> vecFee;
         filein >> vecFee;
-        if (AreSane(vecFee))
+        if (AreSane(vecFee, minRelayFee))
             feeSamples.insert(feeSamples.end(), vecFee.begin(), vecFee.end());
         else
             throw runtime_error("Corrupt fee value in estimates file.");
@@ -141,7 +141,7 @@ class CMinerPolicyEstimator
 
     // nBlocksAgo is 0 based, i.e. transactions that confirmed in the highest seen block are
     // nBlocksAgo == 0, transactions in the block before that are nBlocksAgo == 1 etc.
-    void seenTxConfirm(CFeeRate feeRate, double dPriority, int nBlocksAgo)
+    void seenTxConfirm(const CFeeRate& feeRate, const CFeeRate& minRelayFee, double dPriority, int nBlocksAgo)
     {
         // Last entry records "everything else".
         int nBlocksTruncated = min(nBlocksAgo, (int) history.size() - 1);
@@ -149,7 +149,7 @@ class CMinerPolicyEstimator
 
         // We need to guess why the transaction was included in a block-- either
         // because it is high-priority or because it has sufficient fees.
-        bool sufficientFee = (feeRate > CTransaction::minRelayTxFee);
+        bool sufficientFee = (feeRate > minRelayFee);
         bool sufficientPriority = AllowFree(dPriority);
         const char* assignedTo = "unassigned";
         if (sufficientFee && !sufficientPriority)
@@ -177,7 +177,7 @@ class CMinerPolicyEstimator
         history.resize(nEntries);
     }
 
-    void seenBlock(const std::vector<CTxMemPoolEntry>& entries, int nBlockHeight)
+    void seenBlock(const std::vector<CTxMemPoolEntry>& entries, int nBlockHeight, const CFeeRate minRelayFee)
     {
         if (nBlockHeight <= nBestSeenHeight)
         {
@@ -222,7 +222,7 @@ class CMinerPolicyEstimator
                 // Fees are stored and reported as BTC-per-kb:
                 CFeeRate feeRate(entry->GetFee(), entry->GetTxSize());
                 double dPriority = entry->GetPriority(entry->GetHeight()); // Want priority when it went IN
-                seenTxConfirm(feeRate, dPriority, i);
+                seenTxConfirm(feeRate, minRelayFee, dPriority, i);
             }
         }
         for (size_t i = 0; i < history.size(); i++) {
@@ -313,7 +313,7 @@ class CMinerPolicyEstimator
         }
     }
 
-    void Read(CAutoFile& filein)
+    void Read(CAutoFile& filein, const CFeeRate& minRelayFee)
     {
         filein >> nBestSeenHeight;
         size_t numEntries;
@@ -322,14 +322,14 @@ class CMinerPolicyEstimator
         for (size_t i = 0; i < numEntries; i++)
         {
             CBlockAverage entry;
-            entry.Read(filein);
+            entry.Read(filein, minRelayFee);
             history.push_back(entry);
         }
     }
 };
 
 
-CTxMemPool::CTxMemPool()
+CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) : minRelayFee(_minRelayFee)
 {
     // Sanity checks off by default for performance, because otherwise
     // accepting transactions becomes O(N^2) where N is the number
@@ -445,7 +445,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i
         if (mapTx.count(hash))
             entries.push_back(mapTx[hash]);
     }
-    minerPolicyEstimator->seenBlock(entries, nBlockHeight);
+    minerPolicyEstimator->seenBlock(entries, nBlockHeight, minRelayFee);
     BOOST_FOREACH(const CTransaction& tx, vtx)
     {
         std::list<CTransaction> dummy;
@@ -560,7 +560,7 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
             return error("CTxMemPool::ReadFeeEstimates() : up-version (%d) fee estimate file", nVersionRequired);
 
         LOCK(cs);
-        minerPolicyEstimator->Read(filein);
+        minerPolicyEstimator->Read(filein, minRelayFee);
     }
     catch (std::exception &e) {
         LogPrintf("CTxMemPool::ReadFeeEstimates() : unable to read policy estimator data (non-fatal)");
diff --git a/src/txmempool.h b/src/txmempool.h
index f7dbb126a0ee..41b2c52f39c7 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -67,13 +67,15 @@ class CTxMemPool
     unsigned int nTransactionsUpdated;
     CMinerPolicyEstimator* minerPolicyEstimator;
 
+    CFeeRate minRelayFee; // Passed to constructor to avoid dependency on main
+
 public:
     mutable CCriticalSection cs;
     std::map<uint256, CTxMemPoolEntry> mapTx;
     std::map<COutPoint, CInPoint> mapNextTx;
     std::map<uint256, std::pair<double, int64_t> > mapDeltas;
 
-    CTxMemPool();
+    CTxMemPool(const CFeeRate& _minRelayFee);
     ~CTxMemPool();
 
     /*
diff --git a/src/wallet.cpp b/src/wallet.cpp
index d9187e4be3d2..318a1388d20e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -21,6 +21,9 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
 
+/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
+CFeeRate CWallet::minTxFee = CFeeRate(10000);  // Override with -mintxfee
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // mapWallet
@@ -1294,7 +1297,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend)
                 {
                     CTxOut txout(s.second, s.first);
-                    if (txout.IsDust(CTransaction::minRelayTxFee))
+                    if (txout.IsDust(::minRelayTxFee))
                     {
                         strFailReason = _("Transaction amount too small");
                         return false;
@@ -1355,7 +1358,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
 
                     // Never create dust outputs; if we would, just
                     // add the dust to the fee.
-                    if (newTxOut.IsDust(CTransaction::minRelayTxFee))
+                    if (newTxOut.IsDust(::minRelayTxFee))
                     {
                         nFeeRet += nChange;
                         reservekey.ReturnKey();
@@ -1537,7 +1540,7 @@ int64_t CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
     // ... unless we don't have enough mempool data, in which case fall
     // back to a hard-coded fee
     if (nFeeNeeded == 0)
-        nFeeNeeded = CTransaction::minTxFee.GetFee(nTxBytes);
+        nFeeNeeded = minTxFee.GetFee(nTxBytes);
     return nFeeNeeded;
 }
 
diff --git a/src/wallet.h b/src/wallet.h
index 19a1b185237f..a5162bb83866 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -268,6 +268,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     std::string SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew);
     std::string SendMoneyToDestination(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew);
 
+    static CFeeRate minTxFee;
     static int64_t GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);
 
     bool NewKeyPool();

From 2e36866fecb7420cd73047a7aa762a6e5e225695 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Wed, 26 Feb 2014 17:55:04 -0800
Subject: [PATCH 0319/1819] Show nodeid instead of addresses (for anonymity)
 unless otherwise requested.

---
 src/init.cpp |  2 ++
 src/main.cpp | 34 +++++++++++++++++-----------------
 src/net.cpp  | 13 +++++++------
 src/net.h    |  9 +++++++--
 src/util.cpp |  1 +
 src/util.h   |  1 +
 6 files changed, 35 insertions(+), 25 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index da13218a940b..397ce6e065a9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -288,6 +288,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -gen                   " + _("Generate coins (default: 0)") + "\n";
     strUsage += "  -genproclimit=<n>      " + _("Set the processor limit for when generation is on (-1 = unlimited, default: -1)") + "\n";
     strUsage += "  -help-debug            " + _("Show all debugging options (usage: --help -help-debug)") + "\n";
+    strUsage += "  -logips                " + _("Include IP addresses in debug output (default: 0)") + "\n";
     strUsage += "  -logtimestamps         " + _("Prepend debug output with timestamp (default: 1)") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
@@ -585,6 +586,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     fServer = GetBoolArg("-server", false);
     fPrintToConsole = GetBoolArg("-printtoconsole", false);
     fLogTimestamps = GetBoolArg("-logtimestamps", true);
+    fLogIPs = GetBoolArg("-logips", false);
     setvbuf(stdout, NULL, _IOLBF, 0);
 #ifdef ENABLE_WALLET
     bool fDisableWallet = GetBoolArg("-disablewallet", false);
diff --git a/src/main.cpp b/src/main.cpp
index 04d9523e26ed..a461c5c613c2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3547,7 +3547,7 @@ void static ProcessGetData(CNode* pfrom)
 bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 {
     RandAddSeedPerfmon();
-    LogPrint("net", "received: %s (%u bytes)\n", strCommand, vRecv.size());
+    LogPrint("net", "received: %s (%u bytes) peer=%d\n", strCommand, vRecv.size(), pfrom->id);
     if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
     {
         LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n");
@@ -3579,7 +3579,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (pfrom->nVersion < MIN_PEER_PROTO_VERSION)
         {
             // disconnect from peers older than this proto version
-            LogPrintf("partner %s using obsolete version %i; disconnecting\n", pfrom->addr.ToString(), pfrom->nVersion);
+            LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, pfrom->nVersion);
             pfrom->PushMessage("reject", strCommand, REJECT_OBSOLETE,
                                strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION));
             pfrom->fDisconnect = true;
@@ -3660,7 +3660,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 
         pfrom->fSuccessfullyConnected = true;
 
-        LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), addrFrom.ToString(), pfrom->addr.ToString());
+        LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), pfrom->id);
 
         AddTimeData(pfrom->addr, nTime);
     }
@@ -3767,7 +3767,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             pfrom->AddInventoryKnown(inv);
 
             bool fAlreadyHave = AlreadyHave(inv);
-            LogPrint("net", "  got inventory: %s  %s\n", inv.ToString(), fAlreadyHave ? "have" : "new");
+            LogPrint("net", "got inv: %s  %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
 
             if (!fAlreadyHave) {
                 if (!fImporting && !fReindex) {
@@ -3800,10 +3800,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         }
 
         if (fDebug || (vInv.size() != 1))
-            LogPrint("net", "received getdata (%u invsz)\n", vInv.size());
+            LogPrint("net", "received getdata (%u invsz) peer=%d\n", vInv.size(), pfrom->id);
 
         if ((fDebug && vInv.size() > 0) || (vInv.size() == 1))
-            LogPrint("net", "received getdata for: %s\n", vInv[0].ToString());
+            LogPrint("net", "received getdata for: %s peer=%d\n", vInv[0].ToString(), pfrom->id);
 
         pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end());
         ProcessGetData(pfrom);
@@ -3825,7 +3825,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         if (pindex)
             pindex = chainActive.Next(pindex);
         int nLimit = 500;
-        LogPrint("net", "getblocks %d to %s limit %d\n", (pindex ? pindex->nHeight : -1), hashStop==uint256(0) ? "end" : hashStop.ToString(), nLimit);
+        LogPrint("net", "getblocks %d to %s limit %d from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop==uint256(0) ? "end" : hashStop.ToString(), nLimit, pfrom->id);
         for (; pindex; pindex = chainActive.Next(pindex))
         {
             if (pindex->GetBlockHash() == hashStop)
@@ -3908,8 +3908,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
             vEraseQueue.push_back(inv.hash);
 
 
-            LogPrint("mempool", "AcceptToMemoryPool: %s %s : accepted %s (poolsz %u)\n",
-                pfrom->addr.ToString(), pfrom->cleanSubVer,
+            LogPrint("mempool", "AcceptToMemoryPool: peer=%d %s : accepted %s (poolsz %u)\n",
+                pfrom->id, pfrom->cleanSubVer,
                 tx.GetHash().ToString(),
                 mempool.mapTx.size());
 
@@ -3962,8 +3962,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         int nDoS = 0;
         if (state.IsInvalid(nDoS))
         {
-            LogPrint("mempool", "%s from %s %s was not accepted into the memory pool: %s\n", tx.GetHash().ToString(),
-                pfrom->addr.ToString(), pfrom->cleanSubVer,
+            LogPrint("mempool", "%s from peer=%d %s was not accepted into the memory pool: %s\n", tx.GetHash().ToString(),
+                pfrom->id, pfrom->cleanSubVer,
                 state.GetRejectReason());
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
                                state.GetRejectReason(), inv.hash);
@@ -3978,7 +3978,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         CBlock block;
         vRecv >> block;
 
-        LogPrint("net", "received block %s\n", block.GetHash().ToString());
+        LogPrint("net", "received block %s peer=%d\n", block.GetHash().ToString(), pfrom->id);
         // block.print();
 
         CInv inv(MSG_BLOCK, block.GetHash());
@@ -4095,8 +4095,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
         }
 
         if (!(sProblem.empty())) {
-            LogPrint("net", "pong %s %s: %s, %x expected, %x received, %u bytes\n",
-                pfrom->addr.ToString(),
+            LogPrint("net", "pong peer=%d %s: %s, %x expected, %x received, %u bytes\n",
+                pfrom->id,
                 pfrom->cleanSubVer,
                 sProblem,
                 pfrom->nPingNonceSent,
@@ -4336,7 +4336,7 @@ bool ProcessMessages(CNode* pfrom)
         }
 
         if (!fRet)
-            LogPrintf("ProcessMessage(%s, %u bytes) FAILED\n", strCommand, nMessageSize);
+            LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", strCommand, nMessageSize, pfrom->id);
 
         break;
     }
@@ -4540,7 +4540,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             uint256 hash = state.vBlocksToDownload.front();
             vGetData.push_back(CInv(MSG_BLOCK, hash));
             MarkBlockAsInFlight(pto->GetId(), hash);
-            LogPrint("net", "Requesting block %s from %s\n", hash.ToString(), state.name);
+            LogPrint("net", "Requesting block %s peer=%d\n", hash.ToString(), pto->id);
             if (vGetData.size() >= 1000)
             {
                 pto->PushMessage("getdata", vGetData);
@@ -4557,7 +4557,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             if (!AlreadyHave(inv))
             {
                 if (fDebug)
-                    LogPrint("net", "sending getdata: %s\n", inv.ToString());
+                    LogPrint("net", "Requesting %s peer=%d\n", inv.ToString(), pto->id);
                 vGetData.push_back(inv);
                 if (vGetData.size() >= 1000)
                 {
diff --git a/src/net.cpp b/src/net.cpp
index 934c45ca4cc3..c7bdb83aad28 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -491,8 +491,6 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
     {
         addrman.Attempt(addrConnect);
 
-        LogPrint("net", "connected %s\n", pszDest ? pszDest : addrConnect.ToString());
-
         // Set to non-blocking
 #ifdef WIN32
         u_long nOne = 1;
@@ -513,6 +511,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
         }
 
         pnode->nTimeConnected = GetTime();
+
         return pnode;
     }
 
@@ -524,7 +523,7 @@ void CNode::CloseSocketDisconnect()
     fDisconnect = true;
     if (hSocket != INVALID_SOCKET)
     {
-        LogPrint("net", "disconnecting node %s\n", addrName);
+        LogPrint("net", "disconnecting peer=%d\n", id);
         closesocket(hSocket);
         hSocket = INVALID_SOCKET;
     }
@@ -548,7 +547,10 @@ void CNode::PushVersion()
     CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0)));
     CAddress addrMe = GetLocalAddress(&addr);
     RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
-    LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), addr.ToString());
+    if (fLogIPs)
+        LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id);
+    else
+        LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), id);
     PushMessage("version", PROTOCOL_VERSION, nLocalServices, nTime, addrYou, addrMe,
                 nLocalHostNonce, FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>()), nBestHeight, true);
 }
@@ -950,7 +952,6 @@ void ThreadSocketHandler()
                 }
                 else
                 {
-                    LogPrint("net", "accepted connection %s\n", addr.ToString());
                     CNode* pnode = new CNode(hSocket, addr, "", true);
                     pnode->AddRef();
 
@@ -1040,7 +1041,7 @@ void ThreadSocketHandler()
             {
                 if (pnode->nLastRecv == 0 || pnode->nLastSend == 0)
                 {
-                    LogPrint("net", "socket no message in first 60 seconds, %d %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0);
+                    LogPrint("net", "socket no message in first 60 seconds, %d %d from %d\n", pnode->nLastRecv != 0, pnode->nLastSend != 0, pnode->id);
                     pnode->fDisconnect = true;
                 }
                 else if (nTime - pnode->nLastSend > TIMEOUT_INTERVAL)
diff --git a/src/net.h b/src/net.h
index 2ee798d46807..3b169f442fa3 100644
--- a/src/net.h
+++ b/src/net.h
@@ -330,6 +330,11 @@ class CNode
             id = nLastNodeId++;
         }
 
+        if (fLogIPs)
+            LogPrint("net", "Added connection to %s peer=%d\n", addrName, id);
+        else
+            LogPrint("net", "Added connection peer=%d\n", id);
+
         // Be shy and don't send version until we hear
         if (hSocket != INVALID_SOCKET && !fInbound)
             PushVersion();
@@ -446,7 +451,7 @@ class CNode
             nRequestTime = it->second;
         else
             nRequestTime = 0;
-        LogPrint("net", "askfor %s   %d (%s)\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str());
+        LogPrint("net", "askfor %s  %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str(), id);
 
         // Make sure not to reuse time indexes to keep things in the same order
         int64_t nNow = GetTimeMicros() - 1000000;
@@ -514,7 +519,7 @@ class CNode
         assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum));
         memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], &nChecksum, sizeof(nChecksum));
 
-        LogPrint("net", "(%d bytes)\n", nSize);
+        LogPrint("net", "(%d bytes) peer=%d\n", nSize, id);
 
         std::deque<CSerializeData>::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData());
         ssSend.GetAndClear(*it);
diff --git a/src/util.cpp b/src/util.cpp
index 5a8f85ade78f..081484c37d99 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -95,6 +95,7 @@ bool fDaemon = false;
 bool fServer = false;
 string strMiscWarning;
 bool fLogTimestamps = false;
+bool fLogIPs = false;
 volatile bool fReopenDebugLog = false;
 CClientUIInterface uiInterface;
 
diff --git a/src/util.h b/src/util.h
index 707b8f2d7604..60db71bfd0a1 100644
--- a/src/util.h
+++ b/src/util.h
@@ -100,6 +100,7 @@ extern bool fPrintToDebugLog;
 extern bool fServer;
 extern std::string strMiscWarning;
 extern bool fLogTimestamps;
+extern bool fLogIPs;
 extern volatile bool fReopenDebugLog;
 
 void RandAddSeed();

From 81efcd76e644d52e2296fd95c594ab49b7b3fca5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 4 Jul 2014 08:15:59 +0200
Subject: [PATCH 0320/1819] Add libtool generated files to .gitignore

---
 .gitignore | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/.gitignore b/.gitignore
index 564fe68fd9b1..4169a2d96c1b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,13 @@ src/config/stamp-h1
 src/build-aux/
 share/setup.nsi
 share/qt/Info.plist
+# Libtool
+libtool
+src/m4/libtool.m4
+src/m4/ltoptions.m4
+src/m4/ltsugar.m4
+src/m4/ltversion.m4
+src/m4/lt~obsolete.m4
 
 src/qt/*.moc
 src/qt/moc_*.cpp

From 2ec5a3d212ac4b09e6c32d495f34ee3cdedc8c66 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 20 Jun 2014 15:21:30 +0200
Subject: [PATCH 0321/1819] rpc: Prevent easy memory exhaustion attack

Allocate memory for POST message data only as bytes come in, instead of
all at once at the beginning.

Fixes #4343.
---
 src/rpcprotocol.cpp | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index dd8692e802b5..9e18ca847e4e 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -25,6 +25,9 @@ using namespace boost;
 using namespace boost::asio;
 using namespace json_spirit;
 
+// Number of bytes to allocate and read at most at once in post data
+const size_t POST_READ_SIZE = 256 * 1024;
+
 //
 // HTTP protocol
 //
@@ -204,8 +207,17 @@ int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
     // Read message
     if (nLen > 0)
     {
-        vector<char> vch(nLen);
-        stream.read(&vch[0], nLen);
+        vector<char> vch;
+        size_t ptr = 0;
+        while (ptr < (size_t)nLen)
+        {
+            size_t bytes_to_read = std::min((size_t)nLen - ptr, POST_READ_SIZE);
+            vch.resize(ptr + bytes_to_read);
+            stream.read(&vch[ptr], bytes_to_read);
+            if (!stream) // Connection lost while reading
+                return HTTP_INTERNAL_SERVER_ERROR;
+            ptr += bytes_to_read;
+        }
         strMessageRet = string(vch.begin(), vch.end());
     }
 

From 3d0e92dc83a1aaa462124707388d79da7b2b59aa Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 4 Jul 2014 16:51:25 +0200
Subject: [PATCH 0322/1819] [Qt] remove dup includes in bitcoingui

---
 src/qt/bitcoingui.cpp | 5 -----
 src/qt/bitcoingui.h   | 6 +-----
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f2fb8c877e0f..b45d861b87a8 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -34,13 +34,10 @@
 #include <QDesktopWidget>
 #include <QDragEnterEvent>
 #include <QIcon>
-#include <QLabel>
 #include <QListWidget>
-#include <QMenu>
 #include <QMenuBar>
 #include <QMessageBox>
 #include <QMimeData>
-#include <QPoint>
 #include <QProgressBar>
 #include <QProgressDialog>
 #include <QSettings>
@@ -51,8 +48,6 @@
 #include <QToolBar>
 #include <QVBoxLayout>
 
-
-
 #if QT_VERSION < 0x050000
 #include <QUrl>
 #include <QTextDocument>
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 705e629a6975..30dd7ae31702 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -21,18 +21,14 @@ class Notificator;
 class OptionsModel;
 class RPCConsole;
 class SendCoinsRecipient;
+class UnitDisplayStatusBarControl;
 class WalletFrame;
 class WalletModel;
 
 class CWallet;
 
-class UnitDisplayStatusBarControl;
-
 QT_BEGIN_NAMESPACE
 class QAction;
-class QLabel;
-class QMenu;
-class QPoint;
 class QProgressBar;
 class QProgressDialog;
 QT_END_NAMESPACE

From 674c070e5d28bdf1e4e631abc157f6ea0b0b1698 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 14:33:38 +0200
Subject: [PATCH 0323/1819] [Qt] seed OpenSSL PNRG with Windows event data

- see https://bitcointalk.org/index.php?topic=113496.msg1228193#msg1228193
  for the initial suggestion for this
- also ensure consistent debug.log message format
---
 src/qt/winshutdownmonitor.cpp | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp
index f8f9bf45b30f..a06f42f66eb7 100644
--- a/src/qt/winshutdownmonitor.cpp
+++ b/src/qt/winshutdownmonitor.cpp
@@ -6,11 +6,14 @@
 
 #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
 #include "init.h"
+#include "util.h"
 
 #include <windows.h>
 
 #include <QDebug>
 
+#include <openssl/rand.h>
+
 // If we don't want a message to be processed by Qt, return true and set result to
 // the value that the window procedure should return. Otherwise return false.
 bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pMessage, long *pnResult)
@@ -19,6 +22,16 @@ bool WinShutdownMonitor::nativeEventFilter(const QByteArray &eventType, void *pM
 
        MSG *pMsg = static_cast<MSG *>(pMessage);
 
+       // Seed OpenSSL PRNG with Windows event data (e.g.  mouse movements and other user interactions)
+       if (RAND_event(pMsg->message, pMsg->wParam, pMsg->lParam) == 0) {
+            // Warn only once as this is performance-critical
+            static bool warned = false;
+            if (!warned) {
+                LogPrint("%s: OpenSSL RAND_event() failed to seed OpenSSL PRNG with enough data.\n", __func__);
+                warned = true;
+            }
+       }
+
        switch(pMsg->message)
        {
            case WM_QUERYENDSESSION:
@@ -45,13 +58,13 @@ void WinShutdownMonitor::registerShutdownBlockReason(const QString& strReason, c
     typedef BOOL (WINAPI *PSHUTDOWNBRCREATE)(HWND, LPCWSTR);
     PSHUTDOWNBRCREATE shutdownBRCreate = (PSHUTDOWNBRCREATE)GetProcAddress(GetModuleHandleA("User32.dll"), "ShutdownBlockReasonCreate");
     if (shutdownBRCreate == NULL) {
-        qWarning() << "registerShutdownBlockReason : GetProcAddress for ShutdownBlockReasonCreate failed";
+        qWarning() << "registerShutdownBlockReason: GetProcAddress for ShutdownBlockReasonCreate failed";
         return;
     }
 
     if (shutdownBRCreate(mainWinId, strReason.toStdWString().c_str()))
-        qWarning() << "registerShutdownBlockReason : Successfully registered: " + strReason;
+        qWarning() << "registerShutdownBlockReason: Successfully registered: " + strReason;
     else
-        qWarning() << "registerShutdownBlockReason : Failed to register: " + strReason;
+        qWarning() << "registerShutdownBlockReason: Failed to register: " + strReason;
 }
 #endif

From ad87bc4de10d8ff9934635f2a30078ccf531a124 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 5 Jul 2014 17:14:43 +0200
Subject: [PATCH 0324/1819] [Qt] Replace status bar unit icon with actual
 images

---
 src/Makefile.qt.include        |   5 ++++-
 src/qt/bitcoin.qrc             |   3 +++
 src/qt/bitcoingui.cpp          |   3 +--
 src/qt/bitcoinunits.cpp        |  11 +++++++++++
 src/qt/bitcoinunits.h          |   2 ++
 src/qt/res/icons/unit_btc.png  | Bin 0 -> 2107 bytes
 src/qt/res/icons/unit_mbtc.png | Bin 0 -> 2107 bytes
 src/qt/res/icons/unit_ubtc.png | Bin 0 -> 2107 bytes
 8 files changed, 21 insertions(+), 3 deletions(-)
 create mode 100644 src/qt/res/icons/unit_btc.png
 create mode 100644 src/qt/res/icons/unit_mbtc.png
 create mode 100644 src/qt/res/icons/unit_ubtc.png

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 4563bb356581..29279aff8137 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -252,7 +252,10 @@ RES_ICONS = \
   qt/res/icons/tx_inout.png \
   qt/res/icons/tx_input.png \
   qt/res/icons/tx_output.png \
-  qt/res/icons/tx_mined.png
+  qt/res/icons/tx_mined.png \
+  qt/res/icons/unit_btc.png \
+  qt/res/icons/unit_mbtc.png \
+  qt/res/icons/unit_ubtc.png
 
 BITCOIN_QT_CPP = \
   qt/bitcoinaddressvalidator.cpp \
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index f38200c7f7b6..357c6470d3b5 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -35,6 +35,9 @@
         <file alias="tx_input">res/icons/tx_input.png</file>
         <file alias="tx_output">res/icons/tx_output.png</file>
         <file alias="tx_inout">res/icons/tx_inout.png</file>
+        <file alias="unit_btc">res/icons/unit_btc.png</file>
+        <file alias="unit_mbtc">res/icons/unit_mbtc.png</file>
+        <file alias="unit_ubtc">res/icons/unit_ubtc.png</file>
         <file alias="lock_closed">res/icons/lock_closed.png</file>
         <file alias="lock_open">res/icons/lock_open.png</file>
         <file alias="key">res/icons/key.png</file>
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f2fb8c877e0f..89cad2ce492d 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1014,7 +1014,6 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl():QLabel()
 {
     optionsModel = 0;
     createContextMenu();
-    setStyleSheet("font:11pt; color: #333333");
     setToolTip(tr("Unit to show amounts in. Click to select another unit."));
 }
 
@@ -1059,7 +1058,7 @@ void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
 /** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
 void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
 {
-    setText(BitcoinUnits::name(newUnits));
+    setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(31,STATUSBAR_ICONSIZE));
 }
 
 /** Shows context menu with Display Unit options by the mouse coordinates */
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 4ba6aba55129..bbc9b2e5af93 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -34,6 +34,17 @@ bool BitcoinUnits::valid(int unit)
     }
 }
 
+QString BitcoinUnits::id(int unit)
+{
+    switch(unit)
+    {
+    case BTC: return QString("btc");
+    case mBTC: return QString("mbtc");
+    case uBTC: return QString("ubtc");
+    default: return QString("???");
+    }
+}
+
 QString BitcoinUnits::name(int unit)
 {
     switch(unit)
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 451b52ee21e0..da34ed89763a 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -36,6 +36,8 @@ class BitcoinUnits: public QAbstractListModel
     static QList<Unit> availableUnits();
     //! Is unit ID valid?
     static bool valid(int unit);
+    //! Identifier, e.g. for image names
+    static QString id(int unit);
     //! Short name
     static QString name(int unit);
     //! Longer description
diff --git a/src/qt/res/icons/unit_btc.png b/src/qt/res/icons/unit_btc.png
new file mode 100644
index 0000000000000000000000000000000000000000..ec3497435c9bd96caa594d5fa007a80efda05a04
GIT binary patch
diff --git a/src/qt/res/icons/unit_mbtc.png b/src/qt/res/icons/unit_mbtc.png
new file mode 100644
index 0000000000000000000000000000000000000000..32bf2f2ca05a4768fc8e280a1e4620e3daf42538
GIT binary patch
diff --git a/src/qt/res/icons/unit_ubtc.png b/src/qt/res/icons/unit_ubtc.png
new file mode 100644
index 0000000000000000000000000000000000000000..d5a154882b66ec85df4e7fa6a05d5e074bbdb4ff
GIT binary patch

From 1f740ddc4d8d9312dc62bca3bf0b6632b08ee6a9 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Sat, 5 Jul 2014 22:43:12 +0700
Subject: [PATCH 0325/1819] Remove unused variable

---
 src/qt/coincontroldialog.cpp | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index e0a524a55e75..c73cf416a889 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -523,9 +523,6 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
         sPriorityLabel = CoinControlDialog::getPriorityLabel(mempool, dPriority);
 
-        // Fee
-        int64_t nFee = payTxFee.GetFee(max((unsigned int)1000, nBytes));
-
         // Min Fee
         nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
 

From 3c85d2ec37c3725e407649e487fbeb2a36606d74 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 6 Jul 2014 13:37:32 +0200
Subject: [PATCH 0326/1819] Fix CChain::GetLocator

---
 src/main.cpp | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index b2773953d155..3de60ee3ecab 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -423,15 +423,13 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
             break;
         // Exponentially larger steps back, plus the genesis block.
         int nHeight = std::max(pindex->nHeight - nStep, 0);
-        // Jump back quickly to the same height as the chain.
-        if (pindex->nHeight > nHeight)
-            pindex = pindex->GetAncestor(nHeight);
-        // In case pindex is not in this chain, iterate pindex->pprev to find blocks.
-        while (!Contains(pindex))
-            pindex = pindex->pprev;
-        // If pindex is in this chain, use direct height-based access.
-        if (pindex->nHeight > nHeight)
+        if (Contains(pindex)) {
+            // Use O(1) CChain index if possible.
             pindex = (*this)[nHeight];
+        } else {
+            // Otherwise, use O(log n) skiplist.
+            pindex = pindex->GetAncestor(nHeight);
+        }
         if (vHave.size() > 10)
             nStep *= 2;
     }

From f4b00beae52f22fc6958855a85e1012387c3c33e Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 6 Jul 2014 14:40:31 +0200
Subject: [PATCH 0327/1819] Add CChain::GetLocator() unit test

---
 src/test/skiplist_tests.cpp | 56 +++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp
index ea301685c917..11762c6ea085 100644
--- a/src/test/skiplist_tests.cpp
+++ b/src/test/skiplist_tests.cpp
@@ -41,5 +41,61 @@ BOOST_AUTO_TEST_CASE(skiplist_test)
     }
 }
 
+BOOST_AUTO_TEST_CASE(getlocator_test)
+{
+    // Build a main chain 100000 blocks long.
+    std::vector<uint256> vHashMain(100000);
+    std::vector<CBlockIndex> vBlocksMain(100000);
+    for (unsigned int i=0; i<vBlocksMain.size(); i++) {
+        vHashMain[i] = i; // Set the hash equal to the height, so we can quickly check the distances.
+        vBlocksMain[i].nHeight = i;
+        vBlocksMain[i].pprev = i ? &vBlocksMain[i - 1] : NULL;
+        vBlocksMain[i].phashBlock = &vHashMain[i];
+        vBlocksMain[i].BuildSkip();
+        BOOST_CHECK_EQUAL((int)vBlocksMain[i].GetBlockHash().GetLow64(), vBlocksMain[i].nHeight);
+        BOOST_CHECK(vBlocksMain[i].pprev == NULL || vBlocksMain[i].nHeight == vBlocksMain[i].pprev->nHeight + 1);
+    }
+
+    // Build a branch that splits off at block 49999, 50000 blocks long.
+    std::vector<uint256> vHashSide(50000);
+    std::vector<CBlockIndex> vBlocksSide(50000);
+    for (unsigned int i=0; i<vBlocksSide.size(); i++) {
+        vHashSide[i] = i + 50000 + (uint256(1) << 128); // Add 1<<128 to the hashes, so GetLow64() still returns the height.
+        vBlocksSide[i].nHeight = i + 50000;
+        vBlocksSide[i].pprev = i ? &vBlocksSide[i - 1] : &vBlocksMain[49999];
+        vBlocksSide[i].phashBlock = &vHashSide[i];
+        vBlocksSide[i].BuildSkip();
+        BOOST_CHECK_EQUAL((int)vBlocksSide[i].GetBlockHash().GetLow64(), vBlocksSide[i].nHeight);
+        BOOST_CHECK(vBlocksSide[i].pprev == NULL || vBlocksSide[i].nHeight == vBlocksSide[i].pprev->nHeight + 1);
+    }
+
+    // Build a CChain for the main branch.
+    CChain chain;
+    chain.SetTip(&vBlocksMain.back());
+
+    // Test 100 random starting points for locators.
+    for (int n=0; n<100; n++) {
+        int r = insecure_rand() % 150000;
+        CBlockIndex* tip = (r < 100000) ? &vBlocksMain[r] : &vBlocksSide[r - 100000];
+        CBlockLocator locator = chain.GetLocator(tip);
+
+        // The first result must be the block itself, the last one must be genesis.
+        BOOST_CHECK(locator.vHave.front() == tip->GetBlockHash());
+        BOOST_CHECK(locator.vHave.back() == vBlocksMain[0].GetBlockHash());
+
+        // Entries 1 through 11 (inclusive) go back one step each.
+        for (unsigned int i = 1; i < 12 && i < locator.vHave.size() - 1; i++) {
+            BOOST_CHECK_EQUAL(locator.vHave[i].GetLow64(), tip->nHeight - i);
+        }
+
+        // The further ones (excluding the last one) go back with exponential steps.
+        unsigned int dist = 2;
+        for (unsigned int i = 12; i < locator.vHave.size() - 1; i++) {
+            BOOST_CHECK_EQUAL(locator.vHave[i - 1].GetLow64() - locator.vHave[i].GetLow64(), dist);
+            dist *= 2;
+        }
+    }
+}
+
 BOOST_AUTO_TEST_SUITE_END()
 

From 40f5cb878edd04b4be14f0d73ab706dc2e69124c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 6 Jul 2014 14:47:23 +0200
Subject: [PATCH 0328/1819] Send rejects and apply DoS scoring for errors in
 direct block validation.

75f51f2a introduced asynchronous processing for blocks, where reject messages
and DoS scoring could be applied outside of ProcessBlock, because block
validation may happen later.

However, some types of errors are still detected immediately (in particular,
CheckBlock violations), which need acting after ProcessBlock returns.
---
 src/main.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index b2773953d155..04af88ba4631 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3984,6 +3984,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 
         CValidationState state;
         ProcessBlock(state, pfrom, &block);
+        int nDoS;
+        if (state.IsInvalid(nDoS)) {
+            pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
+                               state.GetRejectReason(), inv.hash);
+            if (nDoS > 0) {
+                LOCK(cs_main);
+                Misbehaving(pfrom->GetId(), nDoS);
+            }
+        }
+
     }
 
 

From 9f4da19babf6989a639be29c70c1d2470c5829a6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 6 Jul 2014 16:06:46 +0200
Subject: [PATCH 0329/1819] Use pong receive time rather than processing time

---
 src/main.cpp | 6 +++---
 src/net.cpp  | 3 +++
 src/net.h    | 3 +++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 04d9523e26ed..7eb4190134ae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3544,7 +3544,7 @@ void static ProcessGetData(CNode* pfrom)
     }
 }
 
-bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
+bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived)
 {
     RandAddSeedPerfmon();
     LogPrint("net", "received: %s (%u bytes)\n", strCommand, vRecv.size());
@@ -4054,7 +4054,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
 
     else if (strCommand == "pong")
     {
-        int64_t pingUsecEnd = GetTimeMicros();
+        int64_t pingUsecEnd = nTimeReceived;
         uint64_t nonce = 0;
         size_t nAvail = vRecv.in_avail();
         bool bPingFinished = false;
@@ -4305,7 +4305,7 @@ bool ProcessMessages(CNode* pfrom)
         bool fRet = false;
         try
         {
-            fRet = ProcessMessage(pfrom, strCommand, vRecv);
+            fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime);
             boost::this_thread::interruption_point();
         }
         catch (std::ios_base::failure& e)
diff --git a/src/net.cpp b/src/net.cpp
index 934c45ca4cc3..fbf13b41cbac 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -653,6 +653,9 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes)
 
         pch += handled;
         nBytes -= handled;
+
+        if (msg.complete())
+            msg.nTime = GetTimeMicros();
     }
 
     return true;
diff --git a/src/net.h b/src/net.h
index 2ee798d46807..e85fc5f9b699 100644
--- a/src/net.h
+++ b/src/net.h
@@ -173,11 +173,14 @@ class CNetMessage {
     CDataStream vRecv;              // received message data
     unsigned int nDataPos;
 
+    int64_t nTime;                  // time (in microseconds) of message receipt.
+
     CNetMessage(int nTypeIn, int nVersionIn) : hdrbuf(nTypeIn, nVersionIn), vRecv(nTypeIn, nVersionIn) {
         hdrbuf.resize(24);
         in_data = false;
         nHdrPos = 0;
         nDataPos = 0;
+        nTime = 0;
     }
 
     bool complete() const

From 0127a9be14089b3f352ec349b2ecf4488234a4d8 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 11 Jun 2014 13:20:59 +0200
Subject: [PATCH 0330/1819] remove SOCKS4 support from core and GUI

- now we support SOCKS5 only
---
 src/init.cpp                  |  19 ++----
 src/netbase.cpp               | 120 ++++++++--------------------------
 src/netbase.h                 |   6 +-
 src/qt/forms/optionsdialog.ui |  20 ------
 src/qt/optionsdialog.cpp      |   8 ---
 src/qt/optionsmodel.cpp       |  28 ++------
 src/qt/paymentserver.cpp      |  14 ++--
 src/rpcmisc.cpp               |   2 +-
 src/rpcnet.cpp                |   2 +-
 9 files changed, 47 insertions(+), 172 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index c514facbbef2..a92d2aad67cf 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -238,9 +238,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -onion=<ip:port>       " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
     strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Tor)") + "\n";
     strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
-    strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS proxy") + "\n";
+    strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
     strUsage += "  -seednode=<ip>         " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n";
-    strUsage += "  -socks=<n>             " + _("Select SOCKS version for -proxy (4 or 5, default: 5)") + "\n";
     strUsage += "  -timeout=<n>           " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n";
 #ifdef USE_UPNP
 #if USE_UPNP
@@ -745,10 +744,6 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     RegisterNodeSignals(GetNodeSignals());
 
-    int nSocksVersion = GetArg("-socks", 5);
-    if (nSocksVersion != 4 && nSocksVersion != 5)
-        return InitError(strprintf(_("Unknown -socks proxy version requested: %i"), nSocksVersion));
-
     if (mapArgs.count("-onlynet")) {
         std::set<enum Network> nets;
         BOOST_FOREACH(std::string snet, mapMultiArgs["-onlynet"]) {
@@ -772,12 +767,10 @@ bool AppInit2(boost::thread_group& threadGroup)
             return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
 
         if (!IsLimited(NET_IPV4))
-            SetProxy(NET_IPV4, addrProxy, nSocksVersion);
-        if (nSocksVersion > 4) {
-            if (!IsLimited(NET_IPV6))
-                SetProxy(NET_IPV6, addrProxy, nSocksVersion);
-            SetNameProxy(addrProxy, nSocksVersion);
-        }
+            SetProxy(NET_IPV4, addrProxy);
+        if (!IsLimited(NET_IPV6))
+            SetProxy(NET_IPV6, addrProxy);
+        SetNameProxy(addrProxy);
         fProxy = true;
     }
 
@@ -791,7 +784,7 @@ bool AppInit2(boost::thread_group& threadGroup)
             addrOnion = CService(mapArgs["-onion"], 9050);
         if (!addrOnion.IsValid())
             return InitError(strprintf(_("Invalid -onion address: '%s'"), mapArgs["-onion"]));
-        SetProxy(NET_TOR, addrOnion, 5);
+        SetProxy(NET_TOR, addrOnion);
         SetReachable(NET_TOR);
     }
 
diff --git a/src/netbase.cpp b/src/netbase.cpp
index f47b0f356382..2567c4c780cc 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -37,7 +37,7 @@ using namespace std;
 
 // Settings
 static proxyType proxyInfo[NET_MAX];
-static proxyType nameproxyInfo;
+static CService nameProxy;
 static CCriticalSection cs_proxyInfos;
 int nConnectTimeout = 5000;
 bool fNameLookup = false;
@@ -214,50 +214,6 @@ bool LookupNumeric(const char *pszName, CService& addr, int portDefault)
     return Lookup(pszName, addr, portDefault, false);
 }
 
-bool static Socks4(const CService &addrDest, SOCKET& hSocket)
-{
-    LogPrintf("SOCKS4 connecting %s\n", addrDest.ToString());
-    if (!addrDest.IsIPv4())
-    {
-        closesocket(hSocket);
-        return error("Proxy destination is not IPv4");
-    }
-    char pszSocks4IP[] = "\4\1\0\0\0\0\0\0user";
-    struct sockaddr_in addr;
-    socklen_t len = sizeof(addr);
-    if (!addrDest.GetSockAddr((struct sockaddr*)&addr, &len) || addr.sin_family != AF_INET)
-    {
-        closesocket(hSocket);
-        return error("Cannot get proxy destination address");
-    }
-    memcpy(pszSocks4IP + 2, &addr.sin_port, 2);
-    memcpy(pszSocks4IP + 4, &addr.sin_addr, 4);
-    char* pszSocks4 = pszSocks4IP;
-    int nSize = sizeof(pszSocks4IP);
-
-    int ret = send(hSocket, pszSocks4, nSize, MSG_NOSIGNAL);
-    if (ret != nSize)
-    {
-        closesocket(hSocket);
-        return error("Error sending to proxy");
-    }
-    char pchRet[8];
-    if (recv(hSocket, pchRet, 8, 0) != 8)
-    {
-        closesocket(hSocket);
-        return error("Error reading proxy response");
-    }
-    if (pchRet[1] != 0x5a)
-    {
-        closesocket(hSocket);
-        if (pchRet[1] != 0x5b)
-            LogPrintf("ERROR: Proxy returned error %d\n", pchRet[1]);
-        return false;
-    }
-    LogPrintf("SOCKS4 connected %s\n", addrDest.ToString());
-    return true;
-}
-
 bool static Socks5(string strDest, int port, SOCKET& hSocket)
 {
     LogPrintf("SOCKS5 connecting %s\n", strDest);
@@ -468,53 +424,49 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
     return true;
 }
 
-bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion) {
+bool SetProxy(enum Network net, CService addrProxy) {
     assert(net >= 0 && net < NET_MAX);
-    if (nSocksVersion != 0 && nSocksVersion != 4 && nSocksVersion != 5)
-        return false;
-    if (nSocksVersion != 0 && !addrProxy.IsValid())
+    if (!addrProxy.IsValid())
         return false;
     LOCK(cs_proxyInfos);
-    proxyInfo[net] = std::make_pair(addrProxy, nSocksVersion);
+    proxyInfo[net] = addrProxy;
     return true;
 }
 
 bool GetProxy(enum Network net, proxyType &proxyInfoOut) {
     assert(net >= 0 && net < NET_MAX);
     LOCK(cs_proxyInfos);
-    if (!proxyInfo[net].second)
+    if (!proxyInfo[net].IsValid())
         return false;
     proxyInfoOut = proxyInfo[net];
     return true;
 }
 
-bool SetNameProxy(CService addrProxy, int nSocksVersion) {
-    if (nSocksVersion != 0 && nSocksVersion != 5)
-        return false;
-    if (nSocksVersion != 0 && !addrProxy.IsValid())
+bool SetNameProxy(CService addrProxy) {
+    if (!addrProxy.IsValid())
         return false;
     LOCK(cs_proxyInfos);
-    nameproxyInfo = std::make_pair(addrProxy, nSocksVersion);
+    nameProxy = addrProxy;
     return true;
 }
 
-bool GetNameProxy(proxyType &nameproxyInfoOut) {
+bool GetNameProxy(CService &nameProxyOut) {
     LOCK(cs_proxyInfos);
-    if (!nameproxyInfo.second)
+    if(!nameProxy.IsValid())
         return false;
-    nameproxyInfoOut = nameproxyInfo;
+    nameProxyOut = nameProxy;
     return true;
 }
 
 bool HaveNameProxy() {
     LOCK(cs_proxyInfos);
-    return nameproxyInfo.second != 0;
+    return nameProxy.IsValid();
 }
 
 bool IsProxy(const CNetAddr &addr) {
     LOCK(cs_proxyInfos);
     for (int i = 0; i < NET_MAX; i++) {
-        if (proxyInfo[i].second && (addr == (CNetAddr)proxyInfo[i].first))
+        if (addr == (CNetAddr)proxyInfo[i])
             return true;
     }
     return false;
@@ -523,31 +475,18 @@ bool IsProxy(const CNetAddr &addr) {
 bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout)
 {
     proxyType proxy;
-
-    // no proxy needed
+    // no proxy needed (none set for target network)
     if (!GetProxy(addrDest.GetNetwork(), proxy))
         return ConnectSocketDirectly(addrDest, hSocketRet, nTimeout);
 
     SOCKET hSocket = INVALID_SOCKET;
 
     // first connect to proxy server
-    if (!ConnectSocketDirectly(proxy.first, hSocket, nTimeout))
+    if (!ConnectSocketDirectly(proxy, hSocket, nTimeout))
         return false;
-
     // do socks negotiation
-    switch (proxy.second) {
-    case 4:
-        if (!Socks4(addrDest, hSocket))
-            return false;
-        break;
-    case 5:
-        if (!Socks5(addrDest.ToStringIP(), addrDest.GetPort(), hSocket))
-            return false;
-        break;
-    default:
-        closesocket(hSocket);
+    if (!Socks5(addrDest.ToStringIP(), addrDest.GetPort(), hSocket))
         return false;
-    }
 
     hSocketRet = hSocket;
     return true;
@@ -561,30 +500,25 @@ bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest
 
     SOCKET hSocket = INVALID_SOCKET;
 
-    proxyType nameproxy;
-    GetNameProxy(nameproxy);
+    CService nameProxy;
+    GetNameProxy(nameProxy);
 
-    CService addrResolved(CNetAddr(strDest, fNameLookup && !nameproxy.second), port);
+    CService addrResolved(CNetAddr(strDest, fNameLookup && !HaveNameProxy()), port);
     if (addrResolved.IsValid()) {
         addr = addrResolved;
         return ConnectSocket(addr, hSocketRet, nTimeout);
     }
+
     addr = CService("0.0.0.0:0");
-    if (!nameproxy.second)
+
+    if (!HaveNameProxy())
         return false;
-    if (!ConnectSocketDirectly(nameproxy.first, hSocket, nTimeout))
+    // first connect to name proxy server
+    if (!ConnectSocketDirectly(nameProxy, hSocket, nTimeout))
+        return false;
+    // do socks negotiation
+    if (!Socks5(strDest, (unsigned short)port, hSocket))
         return false;
-
-    switch(nameproxy.second) {
-        default:
-        case 4:
-            closesocket(hSocket);
-            return false;
-        case 5:
-            if (!Socks5(strDest, port, hSocket))
-                return false;
-            break;
-    }
 
     hSocketRet = hSocket;
     return true;
diff --git a/src/netbase.h b/src/netbase.h
index 40a3d2567651..ad1e23083483 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -161,14 +161,14 @@ class CService : public CNetAddr
             )
 };
 
-typedef std::pair<CService, int> proxyType;
+typedef CService proxyType;
 
 enum Network ParseNetwork(std::string net);
 void SplitHostPort(std::string in, int &portOut, std::string &hostOut);
-bool SetProxy(enum Network net, CService addrProxy, int nSocksVersion = 5);
+bool SetProxy(enum Network net, CService addrProxy);
 bool GetProxy(enum Network net, proxyType &proxyInfoOut);
 bool IsProxy(const CNetAddr &addr);
-bool SetNameProxy(CService addrProxy, int nSocksVersion = 5);
+bool SetNameProxy(CService addrProxy);
 bool HaveNameProxy();
 bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nMaxSolutions = 0, bool fAllowLookup = true);
 bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 0c5b8895aae1..1f535a4a629f 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -328,26 +328,6 @@
            </property>
           </widget>
          </item>
-         <item>
-          <widget class="QLabel" name="socksVersionLabel">
-           <property name="text">
-            <string>SOCKS &amp;Version:</string>
-           </property>
-           <property name="textFormat">
-            <enum>Qt::PlainText</enum>
-           </property>
-           <property name="buddy">
-            <cstring>socksVersion</cstring>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QValueComboBox" name="socksVersion">
-           <property name="toolTip">
-            <string>SOCKS version of the proxy (e.g. 5)</string>
-           </property>
-          </widget>
-         </item>
          <item>
           <spacer name="horizontalSpacer_1_Network">
            <property name="orientation">
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 9502dba904f3..597be40abdf6 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -52,15 +52,8 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
     ui->proxyPort->setEnabled(false);
     ui->proxyPort->setValidator(new QIntValidator(1, 65535, this));
 
-    /** SOCKS version is only selectable for default proxy and is always 5 for IPv6 and Tor */
-    ui->socksVersion->setEnabled(false);
-    ui->socksVersion->addItem("5", 5);
-    ui->socksVersion->addItem("4", 4);
-    ui->socksVersion->setCurrentIndex(0);
-
     connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyIp, SLOT(setEnabled(bool)));
     connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->proxyPort, SLOT(setEnabled(bool)));
-    connect(ui->connectSocks, SIGNAL(toggled(bool)), ui->socksVersion, SLOT(setEnabled(bool)));
 
     ui->proxyIp->installEventFilter(this);
 
@@ -182,7 +175,6 @@ void OptionsDialog::setMapper()
     mapper->addMapping(ui->connectSocks, OptionsModel::ProxyUse);
     mapper->addMapping(ui->proxyIp, OptionsModel::ProxyIP);
     mapper->addMapping(ui->proxyPort, OptionsModel::ProxyPort);
-    mapper->addMapping(ui->socksVersion, OptionsModel::ProxySocksVersion);
 
     /* Window */
 #ifndef Q_OS_MAC
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 09553a258765..f07e66bf04d8 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -122,11 +122,6 @@ void OptionsModel::Init()
     // Only try to set -proxy, if user has enabled fUseProxy
     if (settings.value("fUseProxy").toBool() && !SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()))
         addOverriddenOption("-proxy");
-    if (!settings.contains("nSocksVersion"))
-        settings.setValue("nSocksVersion", 5);
-    // Only try to set -socks, if user has enabled fUseProxy
-    if (settings.value("fUseProxy").toBool() && !SoftSetArg("-socks", settings.value("nSocksVersion").toString().toStdString()))
-        addOverriddenOption("-socks");
 
     // Display
     if (!settings.contains("language"))
@@ -188,8 +183,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
             QStringList strlIpPort = settings.value("addrProxy").toString().split(":", QString::SkipEmptyParts);
             return strlIpPort.at(1);
         }
-        case ProxySocksVersion:
-            return settings.value("nSocksVersion", 5);
 
 #ifdef ENABLE_WALLET
         case Fee: {
@@ -284,13 +277,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
             }
         }
         break;
-        case ProxySocksVersion: {
-            if (settings.value("nSocksVersion") != value) {
-                settings.setValue("nSocksVersion", value.toInt());
-                setRestartRequired(true);
-            }
-        }
-        break;
 #ifdef ENABLE_WALLET
         case Fee: { // core option - can be changed on-the-fly
             // Todo: Add is valid check  and warn via message, if not
@@ -378,20 +364,16 @@ bool OptionsModel::getProxySettings(QNetworkProxy& proxy) const
     // GUI settings can be overridden with -proxy.
     proxyType curProxy;
     if (GetProxy(NET_IPV4, curProxy)) {
-        if (curProxy.second == 5) {
-            proxy.setType(QNetworkProxy::Socks5Proxy);
-            proxy.setHostName(QString::fromStdString(curProxy.first.ToStringIP()));
-            proxy.setPort(curProxy.first.GetPort());
+        proxy.setType(QNetworkProxy::Socks5Proxy);
+        proxy.setHostName(QString::fromStdString(curProxy.ToStringIP()));
+        proxy.setPort(curProxy.GetPort());
 
-            return true;
-        }
-        else
-            return false;
+        return true;
     }
     else
         proxy.setType(QNetworkProxy::NoProxy);
 
-    return true;
+    return false;
 }
 
 void OptionsModel::setRestartRequired(bool fRequired)
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 53db2c5cd963..5471625a67e6 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -341,20 +341,14 @@ void PaymentServer::initNetManager()
 
     QNetworkProxy proxy;
 
-    // Query active proxy (fails if no SOCKS5 proxy)
+    // Query active SOCKS5 proxy
     if (optionsModel->getProxySettings(proxy)) {
-        if (proxy.type() == QNetworkProxy::Socks5Proxy) {
-            netManager->setProxy(proxy);
+        netManager->setProxy(proxy);
 
-            qDebug() << "PaymentServer::initNetManager : Using SOCKS5 proxy" << proxy.hostName() << ":" << proxy.port();
-        }
-        else
-            qDebug() << "PaymentServer::initNetManager : No active proxy server found.";
+        qDebug() << "PaymentServer::initNetManager : Using SOCKS5 proxy" << proxy.hostName() << ":" << proxy.port();
     }
     else
-        emit message(tr("Net manager warning"),
-            tr("Your active proxy doesn't support SOCKS5, which is required for payment requests via proxy."),
-            CClientUIInterface::MSG_WARNING);
+        qDebug() << "PaymentServer::initNetManager : No active proxy server found.";
 
     connect(netManager, SIGNAL(finished(QNetworkReply*)),
             this, SLOT(netRequestFinished(QNetworkReply*)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 9ed6b52513ba..1e84393025af 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -72,7 +72,7 @@ Value getinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("blocks",        (int)chainActive.Height()));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
-    obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
+    obj.push_back(Pair("proxy",         (proxy.IsValid() ? proxy.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
     obj.push_back(Pair("testnet",       Params().NetworkID() == CBaseChainParams::TESTNET));
 #ifdef ENABLE_WALLET
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index cd3bd59f8f6e..cf2c293caf09 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -371,7 +371,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("localservices",       strprintf("%016x", nLocalServices)));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
-    obj.push_back(Pair("proxy",         (proxy.first.IsValid() ? proxy.first.ToStringIPPort() : string())));
+    obj.push_back(Pair("proxy",         (proxy.IsValid() ? proxy.ToStringIPPort() : string())));
     obj.push_back(Pair("relayfee",      ValueFromAmount(::minRelayTxFee.GetFeePerK())));
     Array localAddresses;
     {

From a339a37b28176135c7fe5adbd3b50da77a45373d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 16 Jun 2014 08:48:32 +0200
Subject: [PATCH 0331/1819] error out, when we detect -socks argument

---
 src/init.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index a92d2aad67cf..db9247ef6f04 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -565,6 +565,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     // Check for -debugnet (deprecated)
     if (GetBoolArg("-debugnet", false))
         InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
+    // Check for -socks - as this is a privacy risk to continue, exit here
+    if (mapArgs.count("-socks"))
+        return InitError(_("Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
     // Check for -tor - as this is a privacy risk to continue, exit here
     if (GetBoolArg("-tor", false))
         return InitError(_("Error: Unsupported argument -tor found, use -onion."));

From e832ab7754732af7fd46ad7f16eef973e238c357 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Mon, 7 Jul 2014 09:34:43 +0200
Subject: [PATCH 0332/1819] Rename SendMoneyToDestination to SendMoney.

Get rid of SendMoney and replace it by the functionality of
SendMoneyToDestination.  This cleans up the code, since only
SendMoneyToDestination was actually used (SendMoney internally from this
routine).
---
 src/rpcwallet.cpp |  4 ++--
 src/wallet.cpp    | 37 ++++++++++++++++---------------------
 src/wallet.h      |  3 +--
 3 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 38e96133b4c9..639b21f120a0 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -346,7 +346,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
 
     EnsureWalletIsUnlocked();
 
-    string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx);
+    string strError = pwalletMain->SendMoney(address.Get(), nAmount, wtx);
     if (strError != "")
         throw JSONRPCError(RPC_WALLET_ERROR, strError);
 
@@ -786,7 +786,7 @@ Value sendfrom(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
     // Send
-    string strError = pwalletMain->SendMoneyToDestination(address.Get(), nAmount, wtx);
+    string strError = pwalletMain->SendMoney(address.Get(), nAmount, wtx);
     if (strError != "")
         throw JSONRPCError(RPC_WALLET_ERROR, strError);
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 318a1388d20e..ed1b178600fd 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1487,18 +1487,29 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
 
 
 
-string CWallet::SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew)
+string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew)
 {
-    CReserveKey reservekey(this);
-    int64_t nFeeRequired;
+    // Check amount
+    if (nValue <= 0)
+        return _("Invalid amount");
+    if (nValue > GetBalance())
+        return _("Insufficient funds");
 
+    string strError;
     if (IsLocked())
     {
-        string strError = _("Error: Wallet locked, unable to create transaction!");
+        strError = _("Error: Wallet locked, unable to create transaction!");
         LogPrintf("SendMoney() : %s", strError);
         return strError;
     }
-    string strError;
+
+    // Parse Bitcoin address
+    CScript scriptPubKey;
+    scriptPubKey.SetDestination(address);
+
+    // Create and send the transaction
+    CReserveKey reservekey(this);
+    int64_t nFeeRequired;
     if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
     {
         if (nValue + nFeeRequired > GetBalance())
@@ -1506,7 +1517,6 @@ string CWallet::SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNe
         LogPrintf("SendMoney() : %s\n", strError);
         return strError;
     }
-
     if (!CommitTransaction(wtxNew, reservekey))
         return _("Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
 
@@ -1515,21 +1525,6 @@ string CWallet::SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNe
 
 
 
-string CWallet::SendMoneyToDestination(const CTxDestination& address, int64_t nValue, CWalletTx& wtxNew)
-{
-    // Check amount
-    if (nValue <= 0)
-        return _("Invalid amount");
-    if (nValue > GetBalance())
-        return _("Insufficient funds");
-
-    // Parse Bitcoin address
-    CScript scriptPubKey;
-    scriptPubKey.SetDestination(address);
-
-    return SendMoney(scriptPubKey, nValue, wtxNew);
-}
-
 int64_t CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool)
 {
     // payTxFee is user-set "I want to pay this much"
diff --git a/src/wallet.h b/src/wallet.h
index a5162bb83866..62f13e4630f0 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -265,8 +265,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     bool CreateTransaction(CScript scriptPubKey, int64_t nValue,
                            CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
-    std::string SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew);
-    std::string SendMoneyToDestination(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew);
+    std::string SendMoney(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew);
 
     static CFeeRate minTxFee;
     static int64_t GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);

From 509030344c66d2a2e27e50a690c43d577e5b943b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 3 Jul 2014 07:31:50 +0200
Subject: [PATCH 0333/1819] qt: Pick translation messages only from necessary
 files

Utility libraries (common, util) as well as extra tools shouldn't be
parsed for translation messages, only the server and wallet part qualify
here.
---
 share/qt/extract_strings_qt.py |  5 ++-
 src/Makefile.qt.include        |  4 +-
 src/qt/bitcoinstrings.cpp      | 74 +++++++++++++++++++---------------
 3 files changed, 46 insertions(+), 37 deletions(-)

diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py
index e6afe3b48b57..d4bd58513884 100755
--- a/share/qt/extract_strings_qt.py
+++ b/share/qt/extract_strings_qt.py
@@ -7,8 +7,9 @@
 import glob
 import operator
 import os
+import sys
 
-OUT_CPP="src/qt/bitcoinstrings.cpp"
+OUT_CPP="qt/bitcoinstrings.cpp"
 EMPTY=['""']
 
 def parse_po(text):
@@ -47,7 +48,7 @@ def parse_po(text):
 
     return messages
 
-files = glob.glob('src/*.cpp') + glob.glob('src/*.h') 
+files = sys.argv[1:]
 
 # xgettext -n --keyword=_ $FILES
 XGETTEXT=os.getenv('XGETTEXT', 'xgettext')
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 4563bb356581..f2b6c2ccd672 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -367,9 +367,9 @@ QT_QM=$(QT_TS:.ts=.qm)
 
 .SECONDARY: $(QT_QM)
 
-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_cli_a_SOURCES) $(libbitcoin_util_a_SOURCES)
+qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
 	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
-	$(AM_V_GEN) cd $(top_srcdir); XGETTEXT=$(XGETTEXT) share/qt/extract_strings_qt.py
+	$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^
 
 translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
 	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 10b44bbc3fcf..b71754670863 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -22,31 +22,42 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "It is also recommended to set alertnotify so you are notified of problems;\n"
 "for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"(default: 1, 1 = keep tx meta data e.g. account owner and payment request "
+"information, 2 = drop tx meta data)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
 "3DES:@STRENGTH)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"An error occurred while setting up the RPC port %u for listening on IPv4: %s"),
+"Allow JSON-RPC connections from specified source. Valid for <ip> are a "
+"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
+"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"An error occurred while setting up the RPC port %u for listening on IPv6, "
-"falling back to IPv4: %s"),
+"An error occurred while setting up the RPC address %s port %u for listening: "
+"%s"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Bind to given address and always listen on it. Use [host]:port notation for "
 "IPv6"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Bind to given address to listen for JSON-RPC connections. Use [host]:port "
+"notation for IPv6. This option can be specified multiple times (default: "
+"bind to all interfaces)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Cannot obtain a lock on data directory %s. Bitcoin Core is probably already "
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Continuously rate-limit free transactions to <n>*1000 bytes per minute "
 "(default:15)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Enter regression test mode, which uses a special chain in which blocks can "
-"be solved instantly. This is intended for regression testing tools and app "
-"development."),
+"Delete all wallet transactions and only recover those part of the blockchain "
+"through -rescan on startup"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Distributed under the MIT/X11 software license, see the accompanying file "
+"COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Enter regression test mode, which uses a special chain in which blocks can "
 "be solved instantly."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Error: Listening for incoming connections failed (listen returned error %d)"),
+"Error: Listening for incoming connections failed (listen returned error %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: The transaction was rejected! This might happen if some of the coins "
 "in your wallet were already spent, such as if you used a copy of wallet.dat "
@@ -55,6 +66,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: This transaction requires a transaction fee of at least %s because of "
 "its amount, complexity, or use of recently received funds!"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Execute command when a network tx respends wallet tx input (%s=respend TxID, "
+"%t=wallet TxID)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Execute command when a relevant alert is received or we see a really long "
 "fork (%s in cmd is replaced by message)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -64,8 +78,11 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Execute command when the best block changes (%s in cmd is replaced by block "
 "hash)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Fees smaller than this are considered zero fee (for transaction creation) "
-"(default:"),
+"Fees (in BTC/Kb) smaller than this are considered zero fee for relaying "
+"(default: %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Fees (in BTC/Kb) smaller than this are considered zero fee for transaction "
+"creation (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Flush database activity from memory pool to disk log every <n> megabytes "
 "(default: 100)"),
@@ -93,6 +110,10 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"This product includes software developed by the OpenSSL Project for use in "
+"the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
+"written by Eric Young and UPnP software written by Thomas Bernard."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Unable to bind to %s on this computer. Bitcoin Core is probably already "
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -117,11 +138,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as "
 "wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect "
 "you should restore from a backup."),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
-"You must set rpcpassword=<password> in the configuration file:\n"
-"%s\n"
-"If the file does not exist, create it with owner-readable-only file "
-"permissions."),
 QT_TRANSLATE_NOOP("bitcoin-core", "(default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "(default: wallet.dat)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
@@ -129,22 +145,19 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Allow JSON-RPC connections from specified IP address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin Core Daemon"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Bitcoin Core RPC client version"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -externalip address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Clear list of wallet transactions (diagnostic tool; implies -rescan)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS proxy"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connection options:"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Corrupted block database detected"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Could not parse -rpcbind value %s as network address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Debugging/Testing options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Disable safemode, override a real safe mode event (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
@@ -160,6 +173,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires new
 QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unsupported argument -tor found, use -onion."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: system error: "),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
@@ -173,18 +187,17 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write file info"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write to coin database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write transaction index"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write undo data"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Fee per kB to add to transactions you send"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Fees smaller than this are considered zero fee (for relaying) (default:"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in BTC/kB) to add to transactions you send (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using DNS lookup (default: 1 unless -connect)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Get help for a command"),
 QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: 288, 0 = all)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "If <category> is not supplied, output all debugging information."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000??.dat file"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Information"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Bitcoin Core is shutting down."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"),
@@ -192,8 +205,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -minrelaytxfee=<amount>: '
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: 50000)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "List commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 8333 or testnet: 18333)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."),
@@ -203,6 +216,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Maintain a full transaction index (default: 0
 QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: 125)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
@@ -212,19 +226,16 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default:
 QT_TRANSLATE_NOOP("bitcoin-core", "Print block on startup, if found in block index"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Print block tree on startup (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "RPC client options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild block chain index from current blk000??.dat files"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Relay and mine data carrier transactions (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
-QT_TRANSLATE_NOOP("bitcoin-core", "SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Select SOCKS version for -proxy (4 or 5, default: 5)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Send command to Bitcoin Core"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Send commands to node running on <ip> (default: 127.0.0.1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"),
@@ -245,21 +256,20 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: bitcoind.pid)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: 1)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Start Bitcoin Core Daemon"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Stop running after importing blocks from disk (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "System error: "),
 QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
+QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is intended for regression testing tools and app development."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: 100)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %d, %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Usage (deprecated, use bitcoin-cli):"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Usage:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 1 when listening)"),
@@ -267,7 +277,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet..."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Wait for RPC server to start"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside data directory %s"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin to complete"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"),
@@ -277,6 +286,5 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade re
 QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "on startup"),
-QT_TRANSLATE_NOOP("bitcoin-core", "version"),
 QT_TRANSLATE_NOOP("bitcoin-core", "wallet.dat corrupt, salvage failed"),
 };

From 73ac7abd08a70adf22e24d0f5f7631e7f8b7c5bb Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 3 Jul 2014 07:45:16 +0200
Subject: [PATCH 0334/1819] Move ui_interface to bitcoin_server.a

There is no need for it in the utility libraries or tools.
Put it in init.cpp, and in the tests separately (as they can't link init).
---
 src/bitcoin-cli.cpp       | 3 ++-
 src/init.cpp              | 1 +
 src/qt/bitcoinstrings.cpp | 5 +++++
 src/test/test_bitcoin.cpp | 2 +-
 src/util.cpp              | 2 --
 5 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index db39df4b17d9..016b2f50f5bd 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -7,11 +7,12 @@
 #include "init.h"
 #include "rpcclient.h"
 #include "rpcprotocol.h"
-#include "ui_interface.h" /* for _(...) */
 #include "chainparamsbase.h"
 
 #include <boost/filesystem/operations.hpp>
 
+#define _(x) std::string(x) /* Keep the _() around in case gettext or such will be used later to translate non-UI */
+
 using namespace std;
 using namespace boost;
 using namespace boost::asio;
diff --git a/src/init.cpp b/src/init.cpp
index c514facbbef2..dcb71c4206cb 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -62,6 +62,7 @@ enum BindFlags {
 };
 
 static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
+CClientUIInterface uiInterface;
 
 //////////////////////////////////////////////////////////////////////////////
 //
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index b71754670863..e852c468a88d 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -89,6 +89,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "How thorough the block verification of -checkblocks is (0-4, default: 3)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"If paytxfee is not set, include enough fee so transactions are confirmed on "
+"average within n blocks (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "In this mode -genproclimit controls how many blocks are generated "
 "immediately."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -195,6 +198,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default:
 QT_TRANSLATE_NOOP("bitcoin-core", "If <category> is not supplied, output all debugging information."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000??.dat file"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Include IP addresses in debug output (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Information"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Bitcoin Core is shutting down."),
@@ -203,6 +207,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 8cae0a4c34fa..bcd2f75f553c 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -18,7 +18,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/test/unit_test.hpp>
 
-
+CClientUIInterface uiInterface;
 CWallet* pwalletMain;
 
 extern bool fPrintToConsole;
diff --git a/src/util.cpp b/src/util.cpp
index 081484c37d99..9adbbdec481b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -7,7 +7,6 @@
 
 #include "chainparamsbase.h"
 #include "sync.h"
-#include "ui_interface.h"
 #include "uint256.h"
 #include "version.h"
 
@@ -97,7 +96,6 @@ string strMiscWarning;
 bool fLogTimestamps = false;
 bool fLogIPs = false;
 volatile bool fReopenDebugLog = false;
-CClientUIInterface uiInterface;
 
 // Init OpenSSL library multithreading support
 static CCriticalSection** ppmutexOpenSSL;

From 209377a7cb5a9ea5d724faf94846ee5bacd289e7 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 28 Jun 2014 23:36:06 +0200
Subject: [PATCH 0335/1819] Use GetBlockTime() more

---
 src/checkpoints.cpp       |  2 +-
 src/main.cpp              |  8 ++++----
 src/pow.cpp               |  2 +-
 src/qt/clientmodel.cpp    |  2 +-
 src/rpcdump.cpp           |  6 +++---
 src/rpcmining.cpp         |  2 +-
 src/rpcrawtransaction.cpp |  4 ++--
 src/rpcwallet.cpp         |  2 +-
 src/wallet.cpp            | 10 +++++-----
 9 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 80479b47fbcc..4cab11db3d4b 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -127,7 +127,7 @@ namespace Checkpoints {
         } else {
             double nCheapBefore = data.nTransactionsLastCheckpoint;
             double nExpensiveBefore = pindex->nChainTx - data.nTransactionsLastCheckpoint;
-            double nExpensiveAfter = (nNow - pindex->nTime)/86400.0*data.fTransactionsPerDay;
+            double nExpensiveAfter = (nNow - pindex->GetBlockTime())/86400.0*data.fTransactionsPerDay;
             fWorkBefore = nCheapBefore + nExpensiveBefore*fSigcheckVerificationFactor;
             fWorkAfter = nExpensiveAfter*fSigcheckVerificationFactor;
         }
diff --git a/src/main.cpp b/src/main.cpp
index e08b79418464..4bc6e8e38d85 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1788,7 +1788,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 
     // BIP16 didn't become active until Apr 1 2012
     int64_t nBIP16SwitchTime = 1333238400;
-    bool fStrictPayToScriptHash = (pindex->nTime >= nBIP16SwitchTime);
+    bool fStrictPayToScriptHash = (pindex->GetBlockTime() >= nBIP16SwitchTime);
 
     unsigned int flags = SCRIPT_VERIFY_NOCACHE |
                          (fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE);
@@ -2437,7 +2437,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
     {
         // Extra checks to prevent "fill up memory by spamming with bogus blocks"
-        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->nTime;
+        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->GetBlockTime();
         if (deltaTime < 0)
         {
             return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
@@ -2548,7 +2548,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
         CDiskBlockPos blockPos;
         if (dbp != NULL)
             blockPos = *dbp;
-        if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, block.nTime, dbp != NULL))
+        if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, block.GetBlockTime(), dbp != NULL))
             return error("AcceptBlock() : FindBlockPos failed");
         if (dbp == NULL)
             if (!WriteBlockToDisk(block, blockPos))
@@ -3146,7 +3146,7 @@ bool InitBlockIndex() {
             unsigned int nBlockSize = ::GetSerializeSize(block, SER_DISK, CLIENT_VERSION);
             CDiskBlockPos blockPos;
             CValidationState state;
-            if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.nTime))
+            if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.GetBlockTime()))
                 return error("LoadBlockIndex() : FindBlockPos failed");
             if (!WriteBlockToDisk(block, blockPos))
                 return error("LoadBlockIndex() : writing genesis block to disk failed");
diff --git a/src/pow.cpp b/src/pow.cpp
index 952250decdab..c0d0a7ca20f2 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -26,7 +26,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
             // Special difficulty rule for testnet:
             // If the new block's timestamp is more than 2* 10 minutes
             // then allow mining of a min-difficulty block.
-            if (pblock->nTime > pindexLast->nTime + Params().TargetSpacing()*2)
+            if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + Params().TargetSpacing()*2)
                 return nProofOfWorkLimit;
             else
             {
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 9c9565be6782..4c21eb5594e1 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -85,7 +85,7 @@ QDateTime ClientModel::getLastBlockDate() const
     if (chainActive.Tip())
         return QDateTime::fromTime_t(chainActive.Tip()->GetBlockTime());
     else
-        return QDateTime::fromTime_t(Params().GenesisBlock().nTime); // Genesis block's time of current network
+        return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network
 }
 
 double ClientModel::getVerificationProgress() const
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 593e0d2b6be7..d20bfcf095a5 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -157,7 +157,7 @@ Value importwallet(const Array& params, bool fHelp)
     if (!file.is_open())
         throw JSONRPCError(RPC_INVALID_PARAMETER, "Cannot open wallet dump file");
 
-    int64_t nTimeBegin = chainActive.Tip()->nTime;
+    int64_t nTimeBegin = chainActive.Tip()->GetBlockTime();
 
     bool fGood = true;
 
@@ -215,7 +215,7 @@ Value importwallet(const Array& params, bool fHelp)
     pwalletMain->ShowProgress("", 100); // hide progress dialog in GUI
 
     CBlockIndex *pindex = chainActive.Tip();
-    while (pindex && pindex->pprev && pindex->nTime > nTimeBegin - 7200)
+    while (pindex && pindex->pprev && pindex->GetBlockTime() > nTimeBegin - 7200)
         pindex = pindex->pprev;
 
     if (!pwalletMain->nTimeFirstKey || nTimeBegin < pwalletMain->nTimeFirstKey)
@@ -301,7 +301,7 @@ Value dumpwallet(const Array& params, bool fHelp)
     file << strprintf("# Wallet dump created by Bitcoin %s (%s)\n", CLIENT_BUILD, CLIENT_DATE);
     file << strprintf("# * Created on %s\n", EncodeDumpTime(GetTime()));
     file << strprintf("# * Best block at time of backup was %i (%s),\n", chainActive.Height(), chainActive.Tip()->GetBlockHash().ToString());
-    file << strprintf("#   mined on %s\n", EncodeDumpTime(chainActive.Tip()->nTime));
+    file << strprintf("#   mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));
     file << "\n";
     for (std::vector<std::pair<int64_t, CKeyID> >::const_iterator it = vKeyBirth.begin(); it != vKeyBirth.end(); it++) {
         const CKeyID &keyid = it->second;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index db60ef359269..c7621dc137b5 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -442,7 +442,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     result.push_back(Pair("noncerange", "00000000ffffffff"));
     result.push_back(Pair("sigoplimit", (int64_t)MAX_BLOCK_SIGOPS));
     result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE));
-    result.push_back(Pair("curtime", (int64_t)pblock->nTime));
+    result.push_back(Pair("curtime", pblock->GetBlockTime()));
     result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
     result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
 
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 9771f8e68501..45a227d1dc7d 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -99,8 +99,8 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
             if (chainActive.Contains(pindex))
             {
                 entry.push_back(Pair("confirmations", 1 + chainActive.Height() - pindex->nHeight));
-                entry.push_back(Pair("time", (int64_t)pindex->nTime));
-                entry.push_back(Pair("blocktime", (int64_t)pindex->nTime));
+                entry.push_back(Pair("time", pindex->GetBlockTime()));
+                entry.push_back(Pair("blocktime", pindex->GetBlockTime()));
             }
             else
                 entry.push_back(Pair("confirmations", 0));
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 38e96133b4c9..6fd46fdcc5e4 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -50,7 +50,7 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     {
         entry.push_back(Pair("blockhash", wtx.hashBlock.GetHex()));
         entry.push_back(Pair("blockindex", wtx.nIndex));
-        entry.push_back(Pair("blocktime", (int64_t)(mapBlockIndex[wtx.hashBlock]->nTime)));
+        entry.push_back(Pair("blocktime", mapBlockIndex[wtx.hashBlock]->GetBlockTime()));
     }
     uint256 hash = wtx.GetHash();
     entry.push_back(Pair("txid", hash.GetHex()));
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 318a1388d20e..14235f310ba1 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -515,8 +515,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
             {
                 if (mapBlockIndex.count(wtxIn.hashBlock))
                 {
-                    unsigned int latestNow = wtx.nTimeReceived;
-                    unsigned int latestEntry = 0;
+                    int64_t latestNow = wtx.nTimeReceived;
+                    int64_t latestEntry = 0;
                     {
                         // Tolerate times up to the last timestamp in the wallet not more than 5 minutes into the future
                         int64_t latestTolerated = latestNow + 300;
@@ -547,7 +547,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
                         }
                     }
 
-                    unsigned int& blocktime = mapBlockIndex[wtxIn.hashBlock]->nTime;
+                    int64_t blocktime = mapBlockIndex[wtxIn.hashBlock]->GetBlockTime();
                     wtx.nTimeSmart = std::max(latestEntry, std::min(blocktime, latestNow));
                 }
                 else
@@ -889,7 +889,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
 
         // no need to read and scan block, if block was created before
         // our wallet birthday (as adjusted for block time variability)
-        while (pindex && nTimeFirstKey && (pindex->nTime < (nTimeFirstKey - 7200)))
+        while (pindex && nTimeFirstKey && (pindex->GetBlockTime() < (nTimeFirstKey - 7200)))
             pindex = chainActive.Next(pindex);
 
         ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
@@ -2092,7 +2092,7 @@ void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const {
 
     // Extract block timestamps for those keys
     for (std::map<CKeyID, CBlockIndex*>::const_iterator it = mapKeyFirstBlock.begin(); it != mapKeyFirstBlock.end(); it++)
-        mapKeyBirth[it->first] = it->second->nTime - 7200; // block times can be 2h off
+        mapKeyBirth[it->first] = it->second->GetBlockTime() - 7200; // block times can be 2h off
 }
 
 bool CWallet::AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value)

From 18c7ba8d999a9e6adf16b0a71f05acce66e9ae15 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Mon, 7 Jul 2014 16:32:38 +0800
Subject: [PATCH 0336/1819] Add translation mailing list to README.md

Link to the new translation mailing list from README.md
---
 README.md | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 7c2fe12f3a52..081af80dcf1f 100644
--- a/README.md
+++ b/README.md
@@ -76,12 +76,14 @@ Translations
 Changes to translations as well as new translations can be submitted to
 [Bitcoin Core's Transifex page](https://www.transifex.com/projects/p/bitcoin/).
 
-Periodically the translations are pulled from Transifex and merged into the git repository. See the
+Translations are periodically pulled from Transifex and merged into the git repository. See the
 [translation process](doc/translation_process.md) for details on how this works.
 
-**Important**: We do not accept translation changes as github pull request because the next
+**Important**: We do not accept translation changes as GitHub pull requests because the next
 pull from Transifex would automatically overwrite them again.
 
+Translators should also subscribe to the [mailing list](https://groups.google.com/forum/#!forum/bitcoin-translators).
+
 Development tips and tricks
 ---------------------------
 

From afe380ef0f1c70185fc7c50e1a75e589ff3382dd Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 7 Jul 2014 10:44:30 +0200
Subject: [PATCH 0337/1819] Fix the build for windows

Problem introduced in caf6150. Thanks to @drak for noticing. Fixes #4473.
---
 src/netbase.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 2567c4c780cc..175406322a95 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -7,10 +7,6 @@
 #include "bitcoin-config.h"
 #endif
 
-#ifdef HAVE_INET_PTON
-#include <arpa/inet.h>
-#endif
-
 #ifdef HAVE_GETADDRINFO_A
 #include <netdb.h>
 #endif
@@ -23,6 +19,9 @@
 #include "util.h"
 
 #ifndef WIN32
+#if HAVE_INET_PTON
+#include <arpa/inet.h>
+#endif
 #include <fcntl.h>
 #endif
 

From 109849e204f91d8b04b0e57da87e45b461096b50 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 7 Jul 2014 15:34:00 +0000
Subject: [PATCH 0338/1819] Bugfix: strerror_r can return an error, and if it
 does, POSIX does not specify the content of the buffer

---
 src/netbase.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index e24a0a195c19..40ae89957a71 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1265,7 +1265,8 @@ std::string NetworkErrorString(int err)
 #ifdef STRERROR_R_CHAR_P /* GNU variant can return a pointer outside the passed buffer */
     s = strerror_r(err, buf, sizeof(buf));
 #else /* POSIX variant always returns message in buffer */
-    (void) strerror_r(err, buf, sizeof(buf));
+    if (strerror_r(err, buf, sizeof(buf)))
+        buf[0] = 0;
 #endif
     return strprintf("%s (%d)", s, err);
 }

From 2227725fcb68cf70bc3b33e68d4288df6c4a219a Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 7 Jul 2014 15:42:59 +0000
Subject: [PATCH 0339/1819] test/bloom_tests: Use UL suffix for unsigned long
 number to ensure compatibility

---
 src/test/bloom_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 5c6c7d85882d..2cdafa4bdde7 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
 BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
 {
     // Same test as bloom_create_insert_serialize, but we add a nTweak of 100
-    CBloomFilter filter(3, 0.01, 2147483649, BLOOM_UPDATE_ALL);
+    CBloomFilter filter(3, 0.01, 2147483649UL, BLOOM_UPDATE_ALL);
 
     filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8"));
     BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");

From 2e4fee2ac4824570c1340a8f8fe2aed4580de879 Mon Sep 17 00:00:00 2001
From: Roy Badami <roy@gnomon.org.uk>
Date: Mon, 7 Jul 2014 21:00:58 +0100
Subject: [PATCH 0340/1819] Show bitcoin quantities with full precision, even
 in the presence of trailing zeros

---
 src/qt/bitcoinunits.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 1b5eaa2dc5f5..cf635e19418b 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -114,14 +114,6 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
     QString quotient_str = QString::number(quotient);
     QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0');
 
-    // Right-trim excess zeros after the decimal point
-    int nTrim = 0;
-    for (int i = remainder_str.size()-1; i>=2 && (remainder_str.at(i) == '0'); --i)
-        ++nTrim;
-    remainder_str.chop(nTrim);
-    if (fAlign)
-        remainder_str.append(QString(QChar(FIGURE_SP_CP)).repeated(nTrim));
-
     // Use SI-stule separators as these are locale indendent and can't be
     // confused with the decimal marker.  Rule is to use a thin space every
     // three digits on *both* sides of the decimal point - but only if there

From f7d70c603f3b2a664082e0829b92844233c46cb4 Mon Sep 17 00:00:00 2001
From: Roy Badami <roy@gnomon.org.uk>
Date: Mon, 7 Jul 2014 22:27:09 +0100
Subject: [PATCH 0341/1819] Remove unused fAlign argument from
 BitcoinUnits::format and friends

---
 src/qt/bitcoinunits.cpp          |  7 ++++---
 src/qt/bitcoinunits.h            |  4 ++--
 src/qt/overviewpage.cpp          | 18 +++++++++---------
 src/qt/transactiontablemodel.cpp |  6 +++---
 src/qt/transactiontablemodel.h   |  2 +-
 5 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 089abd862c07..64751c17832d 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -111,7 +111,7 @@ int BitcoinUnits::decimals(int unit)
     }
 }
 
-QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle separators, bool fAlign)
+QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle separators)
 {
     // Note: not using straight sprintf here because we do NOT want
     // localized number formatting.
@@ -147,9 +147,10 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
     return quotient_str + QString(".") + remainder_str;
 }
 
-QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators, bool fAlign)
+
+QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
 {
-    return format(unit, amount, plussign, separators, fAlign) + QString(" ") + name(unit);
+    return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
 }
 
 QString BitcoinUnits::formatHtmlWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index f8c679711f32..7fa24c854228 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -89,9 +89,9 @@ class BitcoinUnits: public QAbstractListModel
     //! Number of decimals left
     static int decimals(int unit);
     //! Format as string
-    static QString format(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard, bool fAlign=false);
+    static QString format(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Format as string (with unit)
-    static QString formatWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard, bool fAlign=false);
+    static QString formatWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     static QString formatHtmlWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Parse string to coin amount
     static bool parse(int unit, const QString &value, qint64 *val_out);
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index f51b0311bc36..1c700b37ffe5 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -72,7 +72,7 @@ class TxViewDelegate : public QAbstractItemDelegate
             foreground = option.palette.color(QPalette::Text);
         }
         painter->setPen(foreground);
-        QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true, BitcoinUnits::separatorAlways, true);
+        QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true, BitcoinUnits::separatorAlways);
         if(!confirmed)
         {
             amountText = QString("[") + amountText + QString("]");
@@ -147,14 +147,14 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
     currentWatchOnlyBalance = watchOnlyBalance;
     currentWatchUnconfBalance = watchUnconfBalance;
     currentWatchImmatureBalance = watchImmatureBalance;
-    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(unit, watchUnconfBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(unit, watchImmatureBalance, false, BitcoinUnits::separatorAlways, true));
-    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways, true));
+    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways));
+    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(unit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(unit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index fb21ddc46ded..cf4c90c7ffbb 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -435,9 +435,9 @@ QVariant TransactionTableModel::addressColor(const TransactionRecord *wtx) const
     return QVariant();
 }
 
-QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators, bool fAlign) const
+QString TransactionTableModel::formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed, BitcoinUnits::SeparatorStyle separators) const
 {
-    QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit, false, separators, fAlign);
+    QString str = BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->credit + wtx->debit, false, separators);
     if(showUnconfirmed)
     {
         if(!wtx->status.countsForBalance)
@@ -522,7 +522,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         case ToAddress:
             return formatTxToAddress(rec, false);
         case Amount:
-            return formatTxAmount(rec, true, BitcoinUnits::separatorAlways, true);
+            return formatTxAmount(rec, true, BitcoinUnits::separatorAlways);
         }
         break;
     case Qt::EditRole:
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 463e7bbff048..ad88d14a9039 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -80,7 +80,7 @@ class TransactionTableModel : public QAbstractTableModel
     QString formatTxDate(const TransactionRecord *wtx) const;
     QString formatTxType(const TransactionRecord *wtx) const;
     QString formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const;
-    QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard, bool fAlign=false) const;
+    QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard) const;
     QString formatTooltip(const TransactionRecord *rec) const;
     QVariant txStatusDecoration(const TransactionRecord *wtx) const;
     QVariant txAddressDecoration(const TransactionRecord *wtx) const;

From 7149499fd85d5adea23c9c3057944c3f2f69a2d2 Mon Sep 17 00:00:00 2001
From: Roy Badami <roy@gnomon.org.uk>
Date: Mon, 7 Jul 2014 22:28:11 +0100
Subject: [PATCH 0342/1819] Add comments re
 BitcoinUnits::formatWithUnit/formatHtmlWithUnit

---
 src/qt/bitcoinunits.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 64751c17832d..21aed235cf2b 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -148,6 +148,21 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
 }
 
 
+// TODO: Review all remaining calls to BitcoinUnits::formatWithUnit to
+// TODO: determine whether the output is used in a plain text context
+// TODO: or an HTML context (and replace with
+// TODO: BtcoinUnits::formatHtmlWithUnit in the latter case). Hopefully
+// TODO: there aren't instances where the result could be used in
+// TODO: either context.
+
+// NOTE: Using formatWithUnit in an HTML context risks wrapping
+// quantities at the thousands separator. More subtly, it also results
+// in a standard space rather than a thin space, due to a bug in Qt's
+// XML whitespace canonicalisation
+//
+// Please take care to use formatHtmlWithUnit instead, when
+// appropriate.
+
 QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
 {
     return format(unit, amount, plussign, separators) + QString(" ") + name(unit);

From d88af560111863c3e9c1ae855dcc287f04dffb02 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 5 Jul 2014 07:30:06 +0200
Subject: [PATCH 0343/1819] Fee fixes

---
 src/core.cpp                 |  7 ++++++-
 src/init.cpp                 |  3 ++-
 src/qt/coincontroldialog.cpp | 22 +++++++++++++++-------
 src/wallet.cpp               |  2 +-
 4 files changed, 24 insertions(+), 10 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 47f3b2a015ae..b56994ecf3d1 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -82,7 +82,12 @@ CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
 
 int64_t CFeeRate::GetFee(size_t nSize) const
 {
-    return nSatoshisPerK*nSize / 1000;
+    int64_t nFee = nSatoshisPerK*nSize / 1000;
+
+    if (nFee == 0 && nSatoshisPerK > 0)
+        nFee = nSatoshisPerK;
+
+    return nFee;
 }
 
 std::string CFeeRate::ToString() const
diff --git a/src/init.cpp b/src/init.cpp
index 880ccaca1d14..f9e568a207a9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -253,7 +253,8 @@ std::string HelpMessage(HelpMessageMode mode)
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
-    strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
+    if (GetBoolArg("-help-debug", false))
+        strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -respendnotify=<cmd>   " + _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)") + "\n";
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index c73cf416a889..b4ddda3eaaa0 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -419,6 +419,8 @@ QString CoinControlDialog::getPriorityLabel(const CTxMemPool& pool, double dPrio
     }
     // Note: if mempool hasn't accumulated enough history (estimatePriority
     // returns -1) we're conservative and classify as "lowest"
+    if (mempool.estimatePriority(nTxConfirmTarget) <= 0 && AllowFree(dPriority))
+        return ">=" + tr("medium");
     return tr("lowest");
 }
 
@@ -523,15 +525,21 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
         sPriorityLabel = CoinControlDialog::getPriorityLabel(mempool, dPriority);
 
+        // Voluntary Fee
+        nPayFee = payTxFee.GetFee(max((unsigned int)1000, nBytes));
+
         // Min Fee
-        nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+        if (nPayFee == 0)
+        {
+            nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
 
-        double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
-        if (dPriorityNeeded <= 0) // Not enough mempool history: never send free
-            dPriorityNeeded = std::numeric_limits<double>::max();
+            double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
+            if (dPriorityNeeded <= 0 && !AllowFree(dPriority)) // not enough mempool history: never send free
+                dPriorityNeeded = std::numeric_limits<double>::max();
 
-        if (nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE && dPriority >= dPriorityNeeded)
-            nPayFee = 0;
+            if (nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE && dPriority >= dPriorityNeeded)
+                nPayFee = 0;
+        }
 
         if (nPayAmount > 0)
         {
@@ -612,7 +620,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
 
     // how many satoshis the estimated fee can vary per byte we guess wrong
-    double dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
+    double dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), std::max(payTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK())) / 1000;
     QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
 
     l3->setToolTip(toolTip4);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index ea99b89a5ae1..a54494f93557 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1484,7 +1484,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                     break;
 
                 // Small enough, and priority high enough, to send for free
-                if (dPriority >= dPriorityNeeded)
+                if (dPriorityNeeded > 0 && dPriority >= dPriorityNeeded)
                     break;
 
                 // Include more fee and try again.

From 45abeb2112f604eeebdb15f7e7f7640e8c970a39 Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Tue, 8 Jul 2014 09:09:42 -0700
Subject: [PATCH 0344/1819] Update Debian packaging description for new
 bitcoin-cli

---
 contrib/debian/control | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/debian/control b/contrib/debian/control
index a04e88d4e175..ac635f43e0f1 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -39,8 +39,9 @@ Description: peer-to-peer network based digital currency - daemon
  Full transaction history is stored locally at each client.  This
  requires 20+ GB of space, slowly growing.
  .
- This package provides bitcoind, a combined daemon and CLI tool to
- interact with the daemon.
+
+ This package provides the daemon, bitcoind, and the CLI tool
+ bitcoin-cli to interact with the daemon.
 
 Package: bitcoin-qt
 Architecture: any

From 1b2bc71de158ae272933e74450836f43a1fe55fc Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 8 Jul 2014 14:31:13 -0400
Subject: [PATCH 0345/1819] Improved logging and Decimal support

---
 .../python-bitcoinrpc/bitcoinrpc/authproxy.py | 30 ++++++++++++++-----
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py b/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py
index c2e5406c2f10..bc7d655fdfe9 100644
--- a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py
+++ b/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py
@@ -39,8 +39,9 @@
 except ImportError:
     import httplib
 import base64
-import json
 import decimal
+import json
+import logging
 try:
     import urllib.parse as urlparse
 except ImportError:
@@ -50,6 +51,7 @@
 
 HTTP_TIMEOUT = 30
 
+log = logging.getLogger("BitcoinRPC")
 
 class JSONRPCException(Exception):
     def __init__(self, rpc_error):
@@ -57,7 +59,14 @@ def __init__(self, rpc_error):
         self.error = rpc_error
 
 
+def EncodeDecimal(o):
+    if isinstance(o, decimal.Decimal):
+        return round(o, 8)
+    raise TypeError(repr(o) + " is not JSON serializable")
+
 class AuthServiceProxy(object):
+    __id_count = 0
+
     def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connection=None):
         self.__service_url = service_url
         self.__service_name = service_name
@@ -66,7 +75,6 @@ def __init__(self, service_url, service_name=None, timeout=HTTP_TIMEOUT, connect
             port = 80
         else:
             port = self.__url.port
-        self.__id_count = 0
         (user, passwd) = (self.__url.username, self.__url.password)
         try:
             user = user.encode('utf8')
@@ -99,12 +107,14 @@ def __getattr__(self, name):
         return AuthServiceProxy(self.__service_url, name, connection=self.__conn)
 
     def __call__(self, *args):
-        self.__id_count += 1
+        AuthServiceProxy.__id_count += 1
 
+        log.debug("-%s-> %s %s"%(AuthServiceProxy.__id_count, self.__service_name,
+                                 json.dumps(args, default=EncodeDecimal)))
         postdata = json.dumps({'version': '1.1',
                                'method': self.__service_name,
                                'params': args,
-                               'id': self.__id_count})
+                               'id': AuthServiceProxy.__id_count}, default=EncodeDecimal)
         self.__conn.request('POST', self.__url.path, postdata,
                             {'Host': self.__url.hostname,
                              'User-Agent': USER_AGENT,
@@ -121,7 +131,8 @@ def __call__(self, *args):
             return response['result']
 
     def _batch(self, rpc_call_list):
-        postdata = json.dumps(list(rpc_call_list))
+        postdata = json.dumps(list(rpc_call_list), default=EncodeDecimal)
+        log.debug("--> "+postdata)
         self.__conn.request('POST', self.__url.path, postdata,
                             {'Host': self.__url.hostname,
                              'User-Agent': USER_AGENT,
@@ -136,5 +147,10 @@ def _get_response(self):
             raise JSONRPCException({
                 'code': -342, 'message': 'missing HTTP response from server'})
 
-        return json.loads(http_response.read().decode('utf8'),
-                          parse_float=decimal.Decimal)
+        responsedata = http_response.read().decode('utf8')
+        response = json.loads(responsedata, parse_float=decimal.Decimal)
+        if "error" in response and response["error"] is None:
+            log.debug("<-%s- %s"%(response["id"], json.dumps(response["result"], default=EncodeDecimal)))
+        else:
+            log.debug("<-- "+responsedata)
+        return response

From 9a427da116b9bf9b49e17590173b2848f4dbedf5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 8 Jul 2014 15:52:27 -0400
Subject: [PATCH 0346/1819] build: re-add AM_LDFLAGS where it's overridden

using _LDFLAGS replaces AM_LDFLAGS rather than adding to it.
---
 src/Makefile.qt.include     | 2 +-
 src/Makefile.qttest.include | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index d97c2d064a99..75b7b683dd1b 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -363,7 +363,7 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+qt_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 #locale/foo.ts -> locale/foo.qm
 QT_QM=$(QT_TS:.ts=.qm)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 7e10ce5a9639..51ce006fc13b 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -36,7 +36,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBIT
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_test_test_bitcoin_qt_LDFLAGS = $(QT_LDFLAGS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
 

From 575e70c0c6c14058e4fc6c37f4e4d52399b69432 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 8 Jul 2014 15:53:53 -0400
Subject: [PATCH 0347/1819] build: fix win32 static linking after libtool merge

Libtool eats the -static flag rather than passing it along to the compiler. To
get the same effect, -all-static is used instead.
---
 configure.ac    | 6 +++++-
 src/Makefile.am | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index dcaec0d4b05e..d3500b4d93e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,10 +193,13 @@ case $host in
      AC_CHECK_LIB([iphlpapi],      [main],, AC_MSG_ERROR(lib missing))
      AC_CHECK_LIB([crypt32],      [main],, AC_MSG_ERROR(lib missing))
 
-     AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"])
      AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"])
      AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"])
 
+     # -static is interpreted by libtool, where it has a different meaning.
+     # In libtool-speak, it's -all-static.
+     AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"; LIBTOOL_LDFLAGS="$LIBTOOL_LDFLAGS -all-static"])
+
      AC_PATH_PROG([MAKENSIS], [makensis], none)
      if test x$MAKENSIS = xnone; then
        AC_MSG_WARN("makensis not found. Cannot create installer.")
@@ -698,6 +701,7 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
 
+AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
 AC_SUBST(INCLUDES)
diff --git a/src/Makefile.am b/src/Makefile.am
index e2a62c9699ee..9b0b97b7acf7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS =  $(INCLUDES)
-AM_LDFLAGS = $(PTHREAD_CFLAGS)
+AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
 
 if USE_LIBSECP256K1
 secp256k1/libsecp256k1.la: $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)

From 509f926e80b3d24a6b6c6fbf535e4d4b97156a3c Mon Sep 17 00:00:00 2001
From: Ross Nicoll <jrn@jrn.me.uk>
Date: Mon, 2 Jun 2014 22:05:35 +0100
Subject: [PATCH 0348/1819] Payment request parsing on startup now only changes
 network if a valid network name is specified.

---
 src/qt/paymentserver.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 5471625a67e6..7c0c95c45932 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -214,9 +214,13 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             if (readPaymentRequest(arg, request))
             {
                 if (request.getDetails().network() == "main")
+                {
                     SelectParams(CBaseChainParams::MAIN);
-                else
+                }
+                else if (request.getDetails().network() == "test")
+                {
                     SelectParams(CBaseChainParams::TESTNET);
+                }
             }
         }
         else

From 00d1980b8fb8b834cb729b213834dfb38cb01bbf Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 27 Jun 2014 14:41:11 +0200
Subject: [PATCH 0349/1819] init.cpp: log fee estimates filename on error

- small changes to Shutdown(), buffer __func__, which is now used in
  all LogPrintf() calls and format for better readability
- order using namespace alpabetically
---
 src/init.cpp | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index f9e568a207a9..a1d75c96741c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -38,8 +38,8 @@
 #include <boost/interprocess/sync/file_lock.hpp>
 #include <openssl/crypto.h>
 
-using namespace std;
 using namespace boost;
+using namespace std;
 
 #ifdef ENABLE_WALLET
 CWallet* pwalletMain;
@@ -109,10 +109,11 @@ static CCoinsViewDB *pcoinsdbview;
 
 void Shutdown()
 {
-    LogPrintf("Shutdown : In progress...\n");
+    LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
     TRY_LOCK(cs_Shutdown, lockShutdown);
-    if (!lockShutdown) return;
+    if (!lockShutdown)
+        return;
 
     RenameThread("bitcoin-shutoff");
     mempool.AddTransactionsUpdated(1);
@@ -130,7 +131,7 @@ void Shutdown()
     if (est_fileout)
         mempool.WriteFeeEstimates(est_fileout);
     else
-        LogPrintf("failed to write fee estimates");
+        LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
 
     {
         LOCK(cs_main);
@@ -142,9 +143,12 @@ void Shutdown()
             pblocktree->Flush();
         if (pcoinsTip)
             pcoinsTip->Flush();
-        delete pcoinsTip; pcoinsTip = NULL;
-        delete pcoinsdbview; pcoinsdbview = NULL;
-        delete pblocktree; pblocktree = NULL;
+        delete pcoinsTip;
+        pcoinsTip = NULL;
+        delete pcoinsdbview;
+        pcoinsdbview = NULL;
+        delete pblocktree;
+        pblocktree = NULL;
     }
 #ifdef ENABLE_WALLET
     if (pwalletMain)
@@ -156,7 +160,7 @@ void Shutdown()
     if (pwalletMain)
         delete pwalletMain;
 #endif
-    LogPrintf("Shutdown : done\n");
+    LogPrintf("%s: done\n", __func__);
 }
 
 //
@@ -315,6 +319,7 @@ std::string HelpMessage(HelpMessageMode mode)
 
     strUsage += "\n" + _("Node relay options:") + "\n";
     strUsage += "  -datacarrier           " + _("Relay and mine data carrier transactions (default: 1)") + "\n";
+
     strUsage += "\n" + _("Block creation options:") + "\n";
     strUsage += "  -blockminsize=<n>      " + _("Set minimum block size in bytes (default: 0)") + "\n";
     strUsage += "  -blockmaxsize=<n>      " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";
@@ -564,9 +569,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), string("0")) != categories.end())
         fDebug = false;
 
-    // Check for -debugnet (deprecated)
+    // Check for -debugnet
     if (GetBoolArg("-debugnet", false))
-        InitWarning(_("Warning: Deprecated argument -debugnet ignored, use -debug=net"));
+        InitWarning(_("Warning: Unsupported argument -debugnet ignored, use -debug=net."));
     // Check for -socks - as this is a privacy risk to continue, exit here
     if (mapArgs.count("-socks"))
         return InitError(_("Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
@@ -994,6 +999,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
     CAutoFile est_filein = CAutoFile(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
+    // Allowed to fail as this file IS missing on first startup.
     if (est_filein)
         mempool.ReadFeeEstimates(est_filein);
 

From 001a53d7427dcbcceef3c6754d9cca19df6dafa1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 24 Jun 2014 14:27:32 +0200
Subject: [PATCH 0350/1819] add GetRandBytes() as wrapper for RAND_bytes()

- add a small wrapper in util around RAND_bytes() and replace with
  GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
---
 src/addrman.h     |  4 +---
 src/key.cpp       | 10 ++++------
 src/main.cpp      |  2 +-
 src/net.cpp       |  4 ++--
 src/rpcserver.cpp |  2 +-
 src/util.cpp      | 29 ++++++++++++++++-------------
 src/util.h        |  1 +
 src/wallet.cpp    |  9 +++++----
 8 files changed, 31 insertions(+), 30 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index c4c296560eab..c012e3deef8e 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -16,8 +16,6 @@
 #include <stdint.h>
 #include <vector>
 
-#include <openssl/rand.h>
-
 /** Extended statistics about a CAddress */
 class CAddrInfo : public CAddress
 {
@@ -384,7 +382,7 @@ class CAddrMan
     CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>())
     {
          nKey.resize(32);
-         RAND_bytes(&nKey[0], 32);
+         GetRandBytes(&nKey[0], 32);
 
          nIdCount = 0;
          nTried = 0;
diff --git a/src/key.cpp b/src/key.cpp
index 3c4fa77e727f..a253f8666abc 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -1,11 +1,11 @@
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "key.h"
 
 #include "crypto/sha2.h"
-#include <openssl/rand.h>
+#include "random.h"
 
 #ifdef USE_SECP256K1
 #include <secp256k1.h>
@@ -194,7 +194,7 @@ class CECKey {
         if (d2i_ECPrivateKey(&pkey, &pbegin, privkey.size())) {
             if(fSkipCheck)
                 return true;
-            
+
             // d2i_ECPrivateKey returns true if parsing succeeds.
             // This doesn't necessarily mean the key is valid.
             if (EC_KEY_check_key(pkey))
@@ -412,7 +412,7 @@ bool CKey::CheckSignatureElement(const unsigned char *vch, int len, bool half) {
 
 void CKey::MakeNewKey(bool fCompressedIn) {
     do {
-        RAND_bytes(vch, sizeof(vch));
+        GetRandBytes(vch, sizeof(vch));
     } while (!Check(vch));
     fValid = true;
     fCompressed = fCompressedIn;
@@ -745,5 +745,3 @@ bool ECC_InitSanityCheck() {
     return true;
 #endif
 }
-
-
diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..8225d73d8d9f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4370,7 +4370,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         if (pingSend) {
             uint64_t nonce = 0;
             while (nonce == 0) {
-                RAND_bytes((unsigned char*)&nonce, sizeof(nonce));
+                GetRandBytes((unsigned char*)&nonce, sizeof(nonce));
             }
             pto->fPingQueued = false;
             pto->nPingUsecStart = GetTimeMicros();
diff --git a/src/net.cpp b/src/net.cpp
index 6a660dc9bd93..0e663aea83a1 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -546,7 +546,7 @@ void CNode::PushVersion()
     int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
     CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0)));
     CAddress addrMe = GetLocalAddress(&addr);
-    RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
+    GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
     if (fLogIPs)
         LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id);
     else
@@ -1931,7 +1931,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
 {
     // Generate random temporary filename
     unsigned short randv = 0;
-    RAND_bytes((unsigned char *)&randv, sizeof(randv));
+    GetRandBytes((unsigned char*)&randv, sizeof(randv));
     std::string tmpfn = strprintf("peers.dat.%04x", randv);
 
     // serialize addresses, checksum data up to that point, then append csum
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 18fa07510142..e0c96d88fad4 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -531,7 +531,7 @@ void StartRPCThreads()
          (mapArgs["-rpcuser"] == mapArgs["-rpcpassword"])) && Params().RequireRPCPassword())
     {
         unsigned char rand_pwd[32];
-        RAND_bytes(rand_pwd, 32);
+        GetRandBytes(rand_pwd, 32);
         string strWhatAmI = "To use bitcoind";
         if (mapArgs.count("-server"))
             strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
diff --git a/src/util.cpp b/src/util.cpp
index 91ac8833d549..8f2a1bd73db2 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -69,6 +69,7 @@
 #include <boost/program_options/detail/config_file.hpp>
 #include <boost/program_options/parsers.hpp>
 #include <openssl/crypto.h>
+#include <openssl/err.h>
 #include <openssl/rand.h>
 
 // Work around clang compilation problem in Boost 1.46:
@@ -141,12 +142,14 @@ class CInit
 }
 instance_of_cinit;
 
-
-
-
-
-
-
+bool GetRandBytes(unsigned char *buf, int num)
+{
+    if (RAND_bytes(buf, num) == 0) {
+        LogPrint("rand", "%s : OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL));
+        return false;
+    }
+    return true;
+}
 
 void RandAddSeed()
 {
@@ -207,9 +210,9 @@ uint64_t GetRand(uint64_t nMax)
     // to give every possible output value an equal possibility
     uint64_t nRange = (std::numeric_limits<uint64_t>::max() / nMax) * nMax;
     uint64_t nRand = 0;
-    do
-        RAND_bytes((unsigned char*)&nRand, sizeof(nRand));
-    while (nRand >= nRange);
+    do {
+        GetRandBytes((unsigned char*)&nRand, sizeof(nRand));
+    } while (nRand >= nRange);
     return (nRand % nMax);
 }
 
@@ -221,7 +224,7 @@ int GetRandInt(int nMax)
 uint256 GetRandHash()
 {
     uint256 hash;
-    RAND_bytes((unsigned char*)&hash, sizeof(hash));
+    GetRandBytes((unsigned char*)&hash, sizeof(hash));
     return hash;
 }
 
@@ -1196,18 +1199,18 @@ uint32_t insecure_rand_Rz = 11;
 uint32_t insecure_rand_Rw = 11;
 void seed_insecure_rand(bool fDeterministic)
 {
-    //The seed values have some unlikely fixed points which we avoid.
+    // The seed values have some unlikely fixed points which we avoid.
     if(fDeterministic)
     {
         insecure_rand_Rz = insecure_rand_Rw = 11;
     } else {
         uint32_t tmp;
         do {
-            RAND_bytes((unsigned char*)&tmp, 4);
+            GetRandBytes((unsigned char*)&tmp, 4);
         } while(tmp == 0 || tmp == 0x9068ffffU);
         insecure_rand_Rz = tmp;
         do {
-            RAND_bytes((unsigned char*)&tmp, 4);
+            GetRandBytes((unsigned char*)&tmp, 4);
         } while(tmp == 0 || tmp == 0x464fffffU);
         insecure_rand_Rw = tmp;
     }
diff --git a/src/util.h b/src/util.h
index 60db71bfd0a1..d0108ee77fd3 100644
--- a/src/util.h
+++ b/src/util.h
@@ -103,6 +103,7 @@ extern bool fLogTimestamps;
 extern bool fLogIPs;
 extern volatile bool fReopenDebugLog;
 
+bool GetRandBytes(unsigned char *buf, int num);
 void RandAddSeed();
 void RandAddSeedPerfmon();
 void SetupEnvironment();
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a54494f93557..d61f01d096ea 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -12,7 +12,6 @@
 #include "timedata.h"
 
 #include <boost/algorithm/string/replace.hpp>
-#include <openssl/rand.h>
 
 using namespace std;
 
@@ -384,13 +383,15 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
     RandAddSeedPerfmon();
 
     vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE);
-    RAND_bytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE);
+    if (!GetRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE))
+        return false;
 
     CMasterKey kMasterKey;
-
     RandAddSeedPerfmon();
+
     kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE);
-    RAND_bytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE);
+    if (!GetRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE))
+        return false;
 
     CCrypter crypter;
     int64_t nStartTime = GetTimeMillis();

From 6354935c485d116e1965567561c197ab3fbc0e11 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 26 Jun 2014 14:41:53 +0200
Subject: [PATCH 0351/1819] move rand functions from util to new random.h/.cpp

---
 src/Makefile.am              |   6 +-
 src/addrman.h                |   1 +
 src/chainparams.cpp          |   1 +
 src/net.h                    |   2 +-
 src/random.cpp               | 140 +++++++++++++++++++++++++++++++++++
 src/random.h                 |  49 ++++++++++++
 src/script.cpp               |   8 +-
 src/test/canonical_tests.cpp |   8 +-
 src/test/crypto_tests.cpp    |   1 +
 src/test/mruset_tests.cpp    |   1 +
 src/test/sighash_tests.cpp   |  16 ++--
 src/test/skiplist_tests.cpp  |   7 +-
 src/test/test_bitcoin.cpp    |   4 +-
 src/test/util_tests.cpp      |   1 +
 src/util.cpp                 | 109 +--------------------------
 src/util.h                   |  51 -------------
 16 files changed, 220 insertions(+), 185 deletions(-)
 create mode 100644 src/random.cpp
 create mode 100644 src/random.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 9b0b97b7acf7..90e0a43bebd6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,6 +91,7 @@ BITCOIN_CORE_H = \
   noui.h \
   pow.h \
   protocol.h \
+  random.h \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
@@ -197,14 +198,15 @@ libbitcoin_common_a_SOURCES = \
 # backward-compatibility objects and their sanity checks are linked.
 libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_util_a_SOURCES = \
+  compat/glibc_sanity.cpp \
+  compat/glibcxx_sanity.cpp \
   chainparamsbase.cpp \
+  random.cpp \
   rpcprotocol.cpp \
   sync.cpp \
   uint256.cpp \
   util.cpp \
   version.cpp \
-  compat/glibc_sanity.cpp \
-  compat/glibcxx_sanity.cpp \
   $(BITCOIN_CORE_H)
 
 if GLIBC_BACK_COMPAT
diff --git a/src/addrman.h b/src/addrman.h
index c012e3deef8e..a0dc134c4069 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -7,6 +7,7 @@
 
 #include "netbase.h"
 #include "protocol.h"
+#include "random.h"
 #include "sync.h"
 #include "timedata.h"
 #include "util.h"
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 63067a153d00..50977dc06b01 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -6,6 +6,7 @@
 #include "chainparams.h"
 
 #include "assert.h"
+#include "random.h"
 #include "util.h"
 
 #include <boost/assign/list_of.hpp>
diff --git a/src/net.h b/src/net.h
index c2a041645525..21a2919f4a83 100644
--- a/src/net.h
+++ b/src/net.h
@@ -13,6 +13,7 @@
 #include "mruset.h"
 #include "netbase.h"
 #include "protocol.h"
+#include "random.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
@@ -26,7 +27,6 @@
 
 #include <boost/foreach.hpp>
 #include <boost/signals2/signal.hpp>
-#include <openssl/rand.h>
 
 class CAddrMan;
 class CBlockIndex;
diff --git a/src/random.cpp b/src/random.cpp
new file mode 100644
index 000000000000..4c7f150f755c
--- /dev/null
+++ b/src/random.cpp
@@ -0,0 +1,140 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "random.h"
+
+#ifdef WIN32
+#include "compat.h" // for Windows API
+#endif
+#include "util.h" // for LogPrint()
+
+#ifndef WIN32
+#include <sys/time.h>
+#endif
+#include <cstring> // for memset()
+
+#include <openssl/crypto.h>
+#include <openssl/err.h>
+#include <openssl/rand.h>
+
+static inline int64_t GetPerformanceCounter()
+{
+    int64_t nCounter = 0;
+#ifdef WIN32
+    QueryPerformanceCounter((LARGE_INTEGER*)&nCounter);
+#else
+    timeval t;
+    gettimeofday(&t, NULL);
+    nCounter = (int64_t)(t.tv_sec * 1000000 + t.tv_usec);
+#endif
+    return nCounter;
+}
+
+void RandAddSeed()
+{
+    // Seed with CPU performance counter
+    int64_t nCounter = GetPerformanceCounter();
+    RAND_add(&nCounter, sizeof(nCounter), 1.5);
+    memset(&nCounter, 0, sizeof(nCounter));
+}
+
+void RandAddSeedPerfmon()
+{
+    RandAddSeed();
+
+    // This can take up to 2 seconds, so only do it every 10 minutes
+    static int64_t nLastPerfmon;
+    if (GetTime() < nLastPerfmon + 10 * 60)
+        return;
+    nLastPerfmon = GetTime();
+
+#ifdef WIN32
+    // Don't need this on Linux, OpenSSL automatically uses /dev/urandom
+    // Seed with the entire set of perfmon data
+    std::vector <unsigned char> vData(250000,0);
+    long ret = 0;
+    unsigned long nSize = 0;
+    const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
+    while (true)
+    {
+        nSize = vData.size();
+        ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
+        if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
+            break;
+        vData.resize(std::max((vData.size()*3)/2, nMaxSize)); // Grow size of buffer exponentially
+    }
+    RegCloseKey(HKEY_PERFORMANCE_DATA);
+    if (ret == ERROR_SUCCESS)
+    {
+        RAND_add(begin_ptr(vData), nSize, nSize/100.0);
+        OPENSSL_cleanse(begin_ptr(vData), nSize);
+        LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
+    } else {
+        static bool warned = false; // Warn only once
+        if (!warned)
+        {
+            LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
+            warned = true;
+        }
+    }
+#endif
+}
+
+bool GetRandBytes(unsigned char *buf, int num)
+{
+    if (RAND_bytes(buf, num) != 1) {
+        LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL));
+        return false;
+    }
+    return true;
+}
+
+uint64_t GetRand(uint64_t nMax)
+{
+    if (nMax == 0)
+        return 0;
+
+    // The range of the random source must be a multiple of the modulus
+    // to give every possible output value an equal possibility
+    uint64_t nRange = (std::numeric_limits<uint64_t>::max() / nMax) * nMax;
+    uint64_t nRand = 0;
+    do {
+        GetRandBytes((unsigned char*)&nRand, sizeof(nRand));
+    } while (nRand >= nRange);
+    return (nRand % nMax);
+}
+
+int GetRandInt(int nMax)
+{
+    return GetRand(nMax);
+}
+
+uint256 GetRandHash()
+{
+    uint256 hash;
+    GetRandBytes((unsigned char*)&hash, sizeof(hash));
+    return hash;
+}
+
+uint32_t insecure_rand_Rz = 11;
+uint32_t insecure_rand_Rw = 11;
+void seed_insecure_rand(bool fDeterministic)
+{
+    // The seed values have some unlikely fixed points which we avoid.
+    if(fDeterministic)
+    {
+        insecure_rand_Rz = insecure_rand_Rw = 11;
+    } else {
+        uint32_t tmp;
+        do {
+            GetRandBytes((unsigned char*)&tmp, 4);
+        } while(tmp == 0 || tmp == 0x9068ffffU);
+        insecure_rand_Rz = tmp;
+        do {
+            GetRandBytes((unsigned char*)&tmp, 4);
+        } while(tmp == 0 || tmp == 0x464fffffU);
+        insecure_rand_Rw = tmp;
+    }
+}
diff --git a/src/random.h b/src/random.h
new file mode 100644
index 000000000000..a599b0847858
--- /dev/null
+++ b/src/random.h
@@ -0,0 +1,49 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_RANDOM_H
+#define BITCOIN_RANDOM_H
+
+#include "uint256.h"
+
+#include <stdint.h>
+
+/**
+ * Seed OpenSSL PRNG with additional entropy data
+ */
+void RandAddSeed();
+void RandAddSeedPerfmon();
+
+/**
+ * Functions to gather random data via the OpenSSL PRNG
+ */
+bool GetRandBytes(unsigned char *buf, int num);
+uint64_t GetRand(uint64_t nMax);
+int GetRandInt(int nMax);
+uint256 GetRandHash();
+
+/**
+ * Seed insecure_rand using the random pool.
+ * @param Deterministic Use a determinstic seed
+ */
+void seed_insecure_rand(bool fDeterministic = false);
+
+/**
+ * MWC RNG of George Marsaglia
+ * This is intended to be fast. It has a period of 2^59.3, though the
+ * least significant 16 bits only have a period of about 2^30.1.
+ *
+ * @return random value
+ */
+extern uint32_t insecure_rand_Rz;
+extern uint32_t insecure_rand_Rw;
+static inline uint32_t insecure_rand(void)
+{
+    insecure_rand_Rz = 36969 * (insecure_rand_Rz & 65535) + (insecure_rand_Rz >> 16);
+    insecure_rand_Rw = 18000 * (insecure_rand_Rw & 65535) + (insecure_rand_Rw >> 16);
+    return (insecure_rand_Rw << 16) + insecure_rand_Rz;
+}
+
+#endif // BITCOIN_RANDOM_H
diff --git a/src/script.cpp b/src/script.cpp
index 238a25e72d7d..39ae001db8da 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -5,13 +5,14 @@
 
 #include "script.h"
 
+#include "crypto/ripemd160.h"
+#include "crypto/sha1.h"
+#include "crypto/sha2.h"
 #include "core.h"
 #include "hash.h"
 #include "key.h"
 #include "keystore.h"
-#include "crypto/sha1.h"
-#include "crypto/sha2.h"
-#include "crypto/ripemd160.h"
+#include "random.h"
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
@@ -1097,7 +1098,6 @@ uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsig
 // Valid signature cache, to avoid doing expensive ECDSA signature checking
 // twice for every transaction (once when accepted into memory pool, and
 // again when accepted into the block chain)
-
 class CSignatureCache
 {
 private:
diff --git a/src/test/canonical_tests.cpp b/src/test/canonical_tests.cpp
index 23dd74296c7e..a9798623ea81 100644
--- a/src/test/canonical_tests.cpp
+++ b/src/test/canonical_tests.cpp
@@ -6,12 +6,11 @@
 // Unit tests for canonical signatures
 //
 
-
-
-#include "script.h"
-#include "util.h"
 #include "data/sig_noncanonical.json.h"
 #include "data/sig_canonical.json.h"
+#include "random.h"
+#include "script.h"
+#include "util.h"
 
 #include <boost/foreach.hpp>
 #include <boost/test/unit_test.hpp>
@@ -21,7 +20,6 @@
 using namespace std;
 using namespace json_spirit;
 
-
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
 
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index 7bd98fa381e1..a17278b80396 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -5,6 +5,7 @@
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
+#include "random.h"
 #include "util.h"
 
 #include <vector>
diff --git a/src/test/mruset_tests.cpp b/src/test/mruset_tests.cpp
index 60f11c147a0a..547cd1090c58 100644
--- a/src/test/mruset_tests.cpp
+++ b/src/test/mruset_tests.cpp
@@ -4,6 +4,7 @@
 
 #include "mruset.h"
 
+#include "random.h"
 #include "util.h"
 
 #include <set>
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 423ae4a789fd..b99797fccb11 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -2,15 +2,16 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <boost/test/unit_test.hpp>
-#include <iostream>
-
+#include "data/sighash.json.h"
 #include "main.h"
-#include "util.h"
+#include "random.h"
 #include "serialize.h"
+#include "util.h"
 #include "version.h"
-#include "data/sighash.json.h"
 
+#include <iostream>
+
+#include <boost/test/unit_test.hpp>
 #include "json/json_spirit_reader_template.h"
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_writer_template.h"
@@ -118,7 +119,7 @@ BOOST_AUTO_TEST_SUITE(sighash_tests)
 BOOST_AUTO_TEST_CASE(sighash_test)
 {
     seed_insecure_rand(false);
-  
+
     #if defined(PRINT_SIGHASH_JSON)
     std::cout << "[\n";
     std::cout << "\t[\"raw_transaction, script, input_index, hashType, signature_hash (result)\"],\n";
@@ -205,10 +206,9 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
           BOOST_ERROR("Bad test, couldn't deserialize data: " << strTest);
           continue;
         }
-        
+
         sh = SignatureHash(scriptCode, tx, nIn, nHashType);
         BOOST_CHECK_MESSAGE(sh.GetHex() == sigHashHex, strTest);
     }
 }
 BOOST_AUTO_TEST_SUITE_END()
-
diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp
index 11762c6ea085..a123f1d197fd 100644
--- a/src/test/skiplist_tests.cpp
+++ b/src/test/skiplist_tests.cpp
@@ -2,11 +2,13 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <boost/test/unit_test.hpp>
-#include <vector>
 #include "main.h"
+#include "random.h"
 #include "util.h"
 
+#include <vector>
+
+#include <boost/test/unit_test.hpp>
 
 #define SKIPLIST_LENGTH 300000
 
@@ -98,4 +100,3 @@ BOOST_AUTO_TEST_CASE(getlocator_test)
 }
 
 BOOST_AUTO_TEST_SUITE_END()
-
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index bcd2f75f553c..443b5853b205 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -4,9 +4,8 @@
 
 #define BOOST_TEST_MODULE Bitcoin Test Suite
 
-
-
 #include "main.h"
+#include "random.h"
 #include "txdb.h"
 #include "ui_interface.h"
 #include "util.h"
@@ -89,4 +88,3 @@ bool ShutdownRequested()
 {
   return false;
 }
-
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 0b071361d819..068b9f29c811 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -4,6 +4,7 @@
 
 #include "util.h"
 
+#include "random.h"
 #include "sync.h"
 
 #include <stdint.h>
diff --git a/src/util.cpp b/src/util.cpp
index 8f2a1bd73db2..ce31619ecabc 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6,6 +6,7 @@
 #include "util.h"
 
 #include "chainparamsbase.h"
+#include "random.h"
 #include "sync.h"
 #include "uint256.h"
 #include "version.h"
@@ -69,7 +70,6 @@
 #include <boost/program_options/detail/config_file.hpp>
 #include <boost/program_options/parsers.hpp>
 #include <openssl/crypto.h>
-#include <openssl/err.h>
 #include <openssl/rand.h>
 
 // Work around clang compilation problem in Boost 1.46:
@@ -142,92 +142,6 @@ class CInit
 }
 instance_of_cinit;
 
-bool GetRandBytes(unsigned char *buf, int num)
-{
-    if (RAND_bytes(buf, num) == 0) {
-        LogPrint("rand", "%s : OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL));
-        return false;
-    }
-    return true;
-}
-
-void RandAddSeed()
-{
-    // Seed with CPU performance counter
-    int64_t nCounter = GetPerformanceCounter();
-    RAND_add(&nCounter, sizeof(nCounter), 1.5);
-    memset(&nCounter, 0, sizeof(nCounter));
-}
-
-void RandAddSeedPerfmon()
-{
-    RandAddSeed();
-
-    // This can take up to 2 seconds, so only do it every 10 minutes
-    static int64_t nLastPerfmon;
-    if (GetTime() < nLastPerfmon + 10 * 60)
-        return;
-    nLastPerfmon = GetTime();
-
-#ifdef WIN32
-    // Don't need this on Linux, OpenSSL automatically uses /dev/urandom
-    // Seed with the entire set of perfmon data
-    std::vector <unsigned char> vData(250000,0);
-    long ret = 0;
-    unsigned long nSize = 0;
-    const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
-    while (true)
-    {
-        nSize = vData.size();
-        ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
-        if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
-            break;
-        vData.resize(std::max((vData.size()*3)/2, nMaxSize)); // Grow size of buffer exponentially
-    }
-    RegCloseKey(HKEY_PERFORMANCE_DATA);
-    if (ret == ERROR_SUCCESS)
-    {
-        RAND_add(begin_ptr(vData), nSize, nSize/100.0);
-        OPENSSL_cleanse(begin_ptr(vData), nSize);
-        LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
-    } else {
-        static bool warned = false; // Warn only once
-        if (!warned)
-        {
-            LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
-            warned = true;
-        }
-    }
-#endif
-}
-
-uint64_t GetRand(uint64_t nMax)
-{
-    if (nMax == 0)
-        return 0;
-
-    // The range of the random source must be a multiple of the modulus
-    // to give every possible output value an equal possibility
-    uint64_t nRange = (std::numeric_limits<uint64_t>::max() / nMax) * nMax;
-    uint64_t nRand = 0;
-    do {
-        GetRandBytes((unsigned char*)&nRand, sizeof(nRand));
-    } while (nRand >= nRange);
-    return (nRand % nMax);
-}
-
-int GetRandInt(int nMax)
-{
-    return GetRand(nMax);
-}
-
-uint256 GetRandHash()
-{
-    uint256 hash;
-    GetRandBytes((unsigned char*)&hash, sizeof(hash));
-    return hash;
-}
-
 // LogPrintf() has been broken a couple of times now
 // by well-meaning people adding mutexes in the most straightforward way.
 // It breaks because it may be called by global destructors during shutdown.
@@ -1195,27 +1109,6 @@ void SetMockTime(int64_t nMockTimeIn)
     nMockTime = nMockTimeIn;
 }
 
-uint32_t insecure_rand_Rz = 11;
-uint32_t insecure_rand_Rw = 11;
-void seed_insecure_rand(bool fDeterministic)
-{
-    // The seed values have some unlikely fixed points which we avoid.
-    if(fDeterministic)
-    {
-        insecure_rand_Rz = insecure_rand_Rw = 11;
-    } else {
-        uint32_t tmp;
-        do {
-            GetRandBytes((unsigned char*)&tmp, 4);
-        } while(tmp == 0 || tmp == 0x9068ffffU);
-        insecure_rand_Rz = tmp;
-        do {
-            GetRandBytes((unsigned char*)&tmp, 4);
-        } while(tmp == 0 || tmp == 0x464fffffU);
-        insecure_rand_Rw = tmp;
-    }
-}
-
 string FormatVersion(int nVersion)
 {
     if (nVersion%100 == 0)
diff --git a/src/util.h b/src/util.h
index d0108ee77fd3..db2005337b20 100644
--- a/src/util.h
+++ b/src/util.h
@@ -90,8 +90,6 @@ inline void MilliSleep(int64_t n)
 #endif
 }
 
-
-
 extern std::map<std::string, std::string> mapArgs;
 extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
 extern bool fDebug;
@@ -103,9 +101,6 @@ extern bool fLogTimestamps;
 extern bool fLogIPs;
 extern volatile bool fReopenDebugLog;
 
-bool GetRandBytes(unsigned char *buf, int num);
-void RandAddSeed();
-void RandAddSeedPerfmon();
 void SetupEnvironment();
 
 /* Return true if log accepts specified category */
@@ -188,23 +183,12 @@ boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
 #endif
 boost::filesystem::path GetTempPath();
 void ShrinkDebugFile();
-int GetRandInt(int nMax);
-uint64_t GetRand(uint64_t nMax);
-uint256 GetRandHash();
 int64_t GetTime();
 void SetMockTime(int64_t nMockTimeIn);
 std::string FormatFullVersion();
 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
 void runCommand(std::string strCommand);
 
-
-
-
-
-
-
-
-
 inline std::string i64tostr(int64_t n)
 {
     return strprintf("%d", n);
@@ -290,19 +274,6 @@ inline std::string HexStr(const T& vch, bool fSpaces=false)
  */
 std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0);
 
-inline int64_t GetPerformanceCounter()
-{
-    int64_t nCounter = 0;
-#ifdef WIN32
-    QueryPerformanceCounter((LARGE_INTEGER*)&nCounter);
-#else
-    timeval t;
-    gettimeofday(&t, NULL);
-    nCounter = (int64_t) t.tv_sec * 1000000 + t.tv_usec;
-#endif
-    return nCounter;
-}
-
 inline int64_t GetTimeMillis()
 {
     return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
@@ -371,28 +342,6 @@ bool SoftSetArg(const std::string& strArg, const std::string& strValue);
  */
 bool SoftSetBoolArg(const std::string& strArg, bool fValue);
 
-/**
- * MWC RNG of George Marsaglia
- * This is intended to be fast. It has a period of 2^59.3, though the
- * least significant 16 bits only have a period of about 2^30.1.
- *
- * @return random value
- */
-extern uint32_t insecure_rand_Rz;
-extern uint32_t insecure_rand_Rw;
-static inline uint32_t insecure_rand(void)
-{
-    insecure_rand_Rz = 36969 * (insecure_rand_Rz & 65535) + (insecure_rand_Rz >> 16);
-    insecure_rand_Rw = 18000 * (insecure_rand_Rw & 65535) + (insecure_rand_Rw >> 16);
-    return (insecure_rand_Rw << 16) + insecure_rand_Rz;
-}
-
-/**
- * Seed insecure_rand using the random pool.
- * @param Deterministic Use a determinstic seed
- */
-void seed_insecure_rand(bool fDeterministic=false);
-
 /**
  * Timing-attack-resistant comparison.
  * Takes time proportional to length

From 4eedf4ffeea6a3734f245f785a8d82d69634dccd Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 9 Jul 2014 09:43:55 +0200
Subject: [PATCH 0352/1819] make RandAddSeed() use OPENSSL_cleanse()

- removes the cstring include and is also used in RandAddSeedPerfmon()
---
 src/random.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/random.cpp b/src/random.cpp
index 4c7f150f755c..0d20d205ac64 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -13,7 +13,6 @@
 #ifndef WIN32
 #include <sys/time.h>
 #endif
-#include <cstring> // for memset()
 
 #include <openssl/crypto.h>
 #include <openssl/err.h>
@@ -37,7 +36,7 @@ void RandAddSeed()
     // Seed with CPU performance counter
     int64_t nCounter = GetPerformanceCounter();
     RAND_add(&nCounter, sizeof(nCounter), 1.5);
-    memset(&nCounter, 0, sizeof(nCounter));
+    OPENSSL_cleanse((void*)&nCounter, sizeof(nCounter));
 }
 
 void RandAddSeedPerfmon()

From e8097f7df164b4bf799963e5ab2539c36079187d Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 8 Jul 2014 12:07:23 -0400
Subject: [PATCH 0353/1819] Refactor common RPC test code to
 BitcoinTestFramework base class

Inspired by #3956, with a little more flexibility built in.

I didn't touch rpcbind_test.py, because it only runs on Linux.
---
 qa/rpc-tests/README.md           |   4 +-
 qa/rpc-tests/listtransactions.py | 183 +++++++-------------
 qa/rpc-tests/receivedby.py       | 281 ++++++++++++-------------------
 qa/rpc-tests/skeleton.py         |  83 ---------
 qa/rpc-tests/smartfees.py        | 195 ++++++++-------------
 qa/rpc-tests/test_framework.py   |  88 ++++++++++
 6 files changed, 334 insertions(+), 500 deletions(-)
 delete mode 100755 qa/rpc-tests/skeleton.py
 create mode 100755 qa/rpc-tests/test_framework.py

diff --git a/qa/rpc-tests/README.md b/qa/rpc-tests/README.md
index 616c0525f4cd..3e916a7688d3 100644
--- a/qa/rpc-tests/README.md
+++ b/qa/rpc-tests/README.md
@@ -6,8 +6,8 @@ Git subtree of [https://github.com/jgarzik/python-bitcoinrpc](https://github.com
 Changes to python-bitcoinrpc should be made upstream, and then
 pulled here using git subtree.
 
-### [skeleton.py](skeleton.py)
-Copy this to create new regression tests.
+### [test_framework.py](test_framework.py)
+Base class for new regression tests.
 
 ### [listtransactions.py](listtransactions.py)
 Tests for the listtransactions RPC call.
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index f16095c12583..50385b437208 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -5,17 +5,7 @@
 
 # Exercise the listtransactions API
 
-# Add python-bitcoinrpc to module search path:
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
-
-import json
-import shutil
-import subprocess
-import tempfile
-import traceback
-
+from test_framework import BitcoinTestFramework
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
 
@@ -41,116 +31,67 @@ def check_array_result(object_array, to_match, expected):
     if num_matched == 0:
         raise AssertionError("No objects matched %s"%(str(to_match)))
 
-def run_test(nodes):
-    # Simple send, 0 to 1:
-    txid = nodes[0].sendtoaddress(nodes[1].getnewaddress(), 0.1)
-    sync_mempools(nodes)
-    check_array_result(nodes[0].listtransactions(),
-                       {"txid":txid},
-                       {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":0})
-    check_array_result(nodes[1].listtransactions(),
-                       {"txid":txid},
-                       {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":0})
-    # mine a block, confirmations should change:
-    nodes[0].setgenerate(True, 1)
-    sync_blocks(nodes)
-    check_array_result(nodes[0].listtransactions(),
-                       {"txid":txid},
-                       {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":1})
-    check_array_result(nodes[1].listtransactions(),
-                       {"txid":txid},
-                       {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":1})
-
-    # send-to-self:
-    txid = nodes[0].sendtoaddress(nodes[0].getnewaddress(), 0.2)
-    check_array_result(nodes[0].listtransactions(),
-                       {"txid":txid, "category":"send"},
-                       {"amount":Decimal("-0.2")})
-    check_array_result(nodes[0].listtransactions(),
-                       {"txid":txid, "category":"receive"},
-                       {"amount":Decimal("0.2")})
-
-    # sendmany from node1: twice to self, twice to node2:
-    send_to = { nodes[0].getnewaddress() : 0.11, nodes[1].getnewaddress() : 0.22,
-                nodes[0].getaccountaddress("from1") : 0.33, nodes[1].getaccountaddress("toself") : 0.44 }
-    txid = nodes[1].sendmany("", send_to)
-    sync_mempools(nodes)
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"send","amount":Decimal("-0.11")},
-                       {"txid":txid} )
-    check_array_result(nodes[0].listtransactions(),
-                       {"category":"receive","amount":Decimal("0.11")},
-                       {"txid":txid} )
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"send","amount":Decimal("-0.22")},
-                       {"txid":txid} )
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"receive","amount":Decimal("0.22")},
-                       {"txid":txid} )
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"send","amount":Decimal("-0.33")},
-                       {"txid":txid} )
-    check_array_result(nodes[0].listtransactions(),
-                       {"category":"receive","amount":Decimal("0.33")},
-                       {"txid":txid, "account" : "from1"} )
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"send","amount":Decimal("-0.44")},
-                       {"txid":txid, "account" : ""} )
-    check_array_result(nodes[1].listtransactions(),
-                       {"category":"receive","amount":Decimal("0.44")},
-                       {"txid":txid, "account" : "toself"} )
-    
-
-def main():
-    import optparse
-
-    parser = optparse.OptionParser(usage="%prog [options]")
-    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
-                      help="Leave bitcoinds and test.* datadir on exit or error")
-    parser.add_option("--srcdir", dest="srcdir", default="../../src",
-                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
-    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
-                      help="Root directory for datadirs")
-    (options, args) = parser.parse_args()
-
-    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
-
-    check_json_precision()
-
-    success = False
-    nodes = []
-    try:
-        print("Initializing test directory "+options.tmpdir)
-        if not os.path.isdir(options.tmpdir):
-            os.makedirs(options.tmpdir)
-        initialize_chain(options.tmpdir)
-
-        nodes = start_nodes(2, options.tmpdir)
-        connect_nodes(nodes[1], 0)
+class ListTransactionsTest(BitcoinTestFramework):
+
+    def run_test(self, nodes):
+        # Simple send, 0 to 1:
+        txid = nodes[0].sendtoaddress(nodes[1].getnewaddress(), 0.1)
+        sync_mempools(nodes)
+        check_array_result(nodes[0].listtransactions(),
+                           {"txid":txid},
+                           {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":0})
+        check_array_result(nodes[1].listtransactions(),
+                           {"txid":txid},
+                           {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":0})
+        # mine a block, confirmations should change:
+        nodes[0].setgenerate(True, 1)
         sync_blocks(nodes)
-
-        run_test(nodes)
-
-        success = True
-
-    except AssertionError as e:
-        print("Assertion failed: "+e.message)
-    except Exception as e:
-        print("Unexpected exception caught during testing: "+str(e))
-        traceback.print_tb(sys.exc_info()[2])
-
-    if not options.nocleanup:
-        print("Cleaning up")
-        stop_nodes(nodes)
-        wait_bitcoinds()
-        shutil.rmtree(options.tmpdir)
-
-    if success:
-        print("Tests successful")
-        sys.exit(0)
-    else:
-        print("Failed")
-        sys.exit(1)
+        check_array_result(nodes[0].listtransactions(),
+                           {"txid":txid},
+                           {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":1})
+        check_array_result(nodes[1].listtransactions(),
+                           {"txid":txid},
+                           {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":1})
+
+        # send-to-self:
+        txid = nodes[0].sendtoaddress(nodes[0].getnewaddress(), 0.2)
+        check_array_result(nodes[0].listtransactions(),
+                           {"txid":txid, "category":"send"},
+                           {"amount":Decimal("-0.2")})
+        check_array_result(nodes[0].listtransactions(),
+                           {"txid":txid, "category":"receive"},
+                           {"amount":Decimal("0.2")})
+
+        # sendmany from node1: twice to self, twice to node2:
+        send_to = { nodes[0].getnewaddress() : 0.11, nodes[1].getnewaddress() : 0.22,
+                    nodes[0].getaccountaddress("from1") : 0.33, nodes[1].getaccountaddress("toself") : 0.44 }
+        txid = nodes[1].sendmany("", send_to)
+        sync_mempools(nodes)
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"send","amount":Decimal("-0.11")},
+                           {"txid":txid} )
+        check_array_result(nodes[0].listtransactions(),
+                           {"category":"receive","amount":Decimal("0.11")},
+                           {"txid":txid} )
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"send","amount":Decimal("-0.22")},
+                           {"txid":txid} )
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"receive","amount":Decimal("0.22")},
+                           {"txid":txid} )
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"send","amount":Decimal("-0.33")},
+                           {"txid":txid} )
+        check_array_result(nodes[0].listtransactions(),
+                           {"category":"receive","amount":Decimal("0.33")},
+                           {"txid":txid, "account" : "from1"} )
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"send","amount":Decimal("-0.44")},
+                           {"txid":txid, "account" : ""} )
+        check_array_result(nodes[1].listtransactions(),
+                           {"category":"receive","amount":Decimal("0.44")},
+                           {"txid":txid, "account" : "toself"} )
 
 if __name__ == '__main__':
-    main()
+    ListTransactionsTest().main()
+
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 7f2d79b3c1b4..61f5e0452b58 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -3,23 +3,13 @@
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-# Exercise the listtransactions API
-
-# Add python-bitcoinrpc to module search path:
-
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
-
-import json
-import shutil
-import subprocess
-import tempfile
-import traceback
+# Exercise the listreceivedbyaddress API
 
+from test_framework import BitcoinTestFramework
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
 
+
 def get_sub_array_from_array(object_array, to_match):
     '''
         Finds and returns a sub array from an array of arrays.
@@ -62,164 +52,115 @@ def check_array_result(object_array, to_match, expected, should_not_find = False
     if num_matched > 0 and should_not_find == True:
         raise AssertionError("Objects was matched %s"%(str(to_match)))
 
-def run_test(nodes):
-    '''
-        listreceivedbyaddress Test
-    '''
-    # Send from node 0 to 1
-    addr = nodes[1].getnewaddress()
-    txid = nodes[0].sendtoaddress(addr, 0.1)
-    sync_mempools(nodes)
-    
-    #Check not listed in listreceivedbyaddress because has 0 confirmations
-    check_array_result(nodes[1].listreceivedbyaddress(),
-                       {"address":addr},
-                       { },
-                       True)
-    #Bury Tx under 10 block so it will be returned by listreceivedbyaddress
-    nodes[1].setgenerate(True, 10)
-    sync_blocks(nodes)
-    check_array_result(nodes[1].listreceivedbyaddress(),
-                       {"address":addr},
-                       {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
-    #With min confidence < 10
-    check_array_result(nodes[1].listreceivedbyaddress(5),
-                       {"address":addr},
-                       {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
-    #With min confidence > 10, should not find Tx
-    check_array_result(nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True)
-
-    #Empty Tx
-    addr = nodes[1].getnewaddress()
-    check_array_result(nodes[1].listreceivedbyaddress(0,True),
-                       {"address":addr},
-                       {"address":addr, "account":"", "amount":0, "confirmations":0, "txids":[]})
-
-    '''
-        getreceivedbyaddress Test
-    '''
-    # Send from node 0 to 1
-    addr = nodes[1].getnewaddress()
-    txid = nodes[0].sendtoaddress(addr, 0.1)
-    sync_mempools(nodes)
-
-    #Check balance is 0 because of 0 confirmations
-    balance = nodes[1].getreceivedbyaddress(addr)
-    if balance != Decimal("0.0"):
-        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
-
-    #Check balance is 0.1
-    balance = nodes[1].getreceivedbyaddress(addr,0)
-    if balance != Decimal("0.1"):
-        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
-
-    #Bury Tx under 10 block so it will be returned by the default getreceivedbyaddress
-    nodes[1].setgenerate(True, 10)
-    sync_blocks(nodes)
-    balance = nodes[1].getreceivedbyaddress(addr)
-    if balance != Decimal("0.1"):
-        raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+class ReceivedByTest(BitcoinTestFramework):
 
-    '''
-        listreceivedbyaccount + getreceivedbyaccount Test
-    '''
-    #set pre-state
-    addrArr = nodes[1].getnewaddress()
-    account = nodes[1].getaccount(addrArr)
-    received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(),{"account":account})
-    if len(received_by_account_json) == 0:
-        raise AssertionError("No accounts found in node")
-    balance_by_account = rec_by_accountArr = nodes[1].getreceivedbyaccount(account)
-
-    txid = nodes[0].sendtoaddress(addr, 0.1)
-
-    # listreceivedbyaccount should return received_by_account_json because of 0 confirmations
-    check_array_result(nodes[1].listreceivedbyaccount(),
-                   {"account":account},
-                   received_by_account_json)
-
-    # getreceivedbyaddress should return same balance because of 0 confirmations
-    balance = nodes[1].getreceivedbyaccount(account)
-    if balance != balance_by_account:
-        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
-
-    nodes[1].setgenerate(True, 10)
-    sync_blocks(nodes)
-    # listreceivedbyaccount should return updated account balance
-    check_array_result(nodes[1].listreceivedbyaccount(),
-                       {"account":account},
-                       {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("0.1"))})
-
-    # getreceivedbyaddress should return updates balance
-    balance = nodes[1].getreceivedbyaccount(account)
-    if balance != balance_by_account + Decimal("0.1"):
-        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
-
-    #Create a new account named "mynewaccount" that has a 0 balance
-    nodes[1].getaccountaddress("mynewaccount")
-    received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(0,True),{"account":"mynewaccount"})
-    if len(received_by_account_json) == 0:
-        raise AssertionError("No accounts found in node")
-
-    # Test includeempty of listreceivedbyaccount
-    if received_by_account_json["amount"] != Decimal("0.0"):
-        raise AssertionError("Wrong balance returned by listreceivedbyaccount, %0.2f"%(received_by_account_json["amount"]))
-
-    # Test getreceivedbyaccount for 0 amount accounts
-    balance = nodes[1].getreceivedbyaccount("mynewaccount")
-    if balance != Decimal("0.0"):
-        raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
-
-def main():
-    import optparse
-
-    parser = optparse.OptionParser(usage="%prog [options]")
-    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
-                      help="Leave bitcoinds and test.* datadir on exit or error")
-    parser.add_option("--srcdir", dest="srcdir", default="../../src",
-                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
-    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
-                      help="Root directory for datadirs")
-    (options, args) = parser.parse_args()
-
-    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
-
-    check_json_precision()
-
-    success = False
-    nodes = []
-    try:
-        print("Initializing test directory "+options.tmpdir)
-        if not os.path.isdir(options.tmpdir):
-            os.makedirs(options.tmpdir)
-        initialize_chain(options.tmpdir)
-
-        nodes = start_nodes(2, options.tmpdir)
-        connect_nodes(nodes[1], 0)
+    def run_test(self, nodes):
+        '''
+        listreceivedbyaddress Test
+        '''
+        # Send from node 0 to 1
+        addr = nodes[1].getnewaddress()
+        txid = nodes[0].sendtoaddress(addr, 0.1)
+        sync_mempools(nodes)
+
+        #Check not listed in listreceivedbyaddress because has 0 confirmations
+        check_array_result(nodes[1].listreceivedbyaddress(),
+                           {"address":addr},
+                           { },
+                           True)
+        #Bury Tx under 10 block so it will be returned by listreceivedbyaddress
+        nodes[1].setgenerate(True, 10)
         sync_blocks(nodes)
-
-        run_test(nodes)
-
-        success = True
-
-    except AssertionError as e:
-        print("Assertion failed: "+e.message)
-    except Exception as e:
-        print("Unexpected exception caught during testing: "+str(e))
-        traceback.print_tb(sys.exc_info()[2])
-
-    if not options.nocleanup:
-        print("Cleaning up")
-        stop_nodes(nodes)
-        wait_bitcoinds()
-        shutil.rmtree(options.tmpdir)
-
-    if success:
-        print("Tests successful")
-        sys.exit(0)
-    else:
-        print("Failed")
-        sys.exit(1)
+        check_array_result(nodes[1].listreceivedbyaddress(),
+                           {"address":addr},
+                           {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
+        #With min confidence < 10
+        check_array_result(nodes[1].listreceivedbyaddress(5),
+                           {"address":addr},
+                           {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
+        #With min confidence > 10, should not find Tx
+        check_array_result(nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True)
+
+        #Empty Tx
+        addr = nodes[1].getnewaddress()
+        check_array_result(nodes[1].listreceivedbyaddress(0,True),
+                           {"address":addr},
+                           {"address":addr, "account":"", "amount":0, "confirmations":0, "txids":[]})
+
+        '''
+            getreceivedbyaddress Test
+        '''
+        # Send from node 0 to 1
+        addr = nodes[1].getnewaddress()
+        txid = nodes[0].sendtoaddress(addr, 0.1)
+        sync_mempools(nodes)
+
+        #Check balance is 0 because of 0 confirmations
+        balance = nodes[1].getreceivedbyaddress(addr)
+        if balance != Decimal("0.0"):
+            raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+        #Check balance is 0.1
+        balance = nodes[1].getreceivedbyaddress(addr,0)
+        if balance != Decimal("0.1"):
+            raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+        #Bury Tx under 10 block so it will be returned by the default getreceivedbyaddress
+        nodes[1].setgenerate(True, 10)
+        sync_blocks(nodes)
+        balance = nodes[1].getreceivedbyaddress(addr)
+        if balance != Decimal("0.1"):
+            raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
+
+        '''
+            listreceivedbyaccount + getreceivedbyaccount Test
+        '''
+        #set pre-state
+        addrArr = nodes[1].getnewaddress()
+        account = nodes[1].getaccount(addrArr)
+        received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(),{"account":account})
+        if len(received_by_account_json) == 0:
+            raise AssertionError("No accounts found in node")
+        balance_by_account = rec_by_accountArr = nodes[1].getreceivedbyaccount(account)
+
+        txid = nodes[0].sendtoaddress(addr, 0.1)
+
+        # listreceivedbyaccount should return received_by_account_json because of 0 confirmations
+        check_array_result(nodes[1].listreceivedbyaccount(),
+                           {"account":account},
+                           received_by_account_json)
+
+        # getreceivedbyaddress should return same balance because of 0 confirmations
+        balance = nodes[1].getreceivedbyaccount(account)
+        if balance != balance_by_account:
+            raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
+
+        nodes[1].setgenerate(True, 10)
+        sync_blocks(nodes)
+        # listreceivedbyaccount should return updated account balance
+        check_array_result(nodes[1].listreceivedbyaccount(),
+                           {"account":account},
+                           {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("0.1"))})
+
+        # getreceivedbyaddress should return updates balance
+        balance = nodes[1].getreceivedbyaccount(account)
+        if balance != balance_by_account + Decimal("0.1"):
+            raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
+
+        #Create a new account named "mynewaccount" that has a 0 balance
+        nodes[1].getaccountaddress("mynewaccount")
+        received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(0,True),{"account":"mynewaccount"})
+        if len(received_by_account_json) == 0:
+            raise AssertionError("No accounts found in node")
+
+        # Test includeempty of listreceivedbyaccount
+        if received_by_account_json["amount"] != Decimal("0.0"):
+            raise AssertionError("Wrong balance returned by listreceivedbyaccount, %0.2f"%(received_by_account_json["amount"]))
+
+        # Test getreceivedbyaccount for 0 amount accounts
+        balance = nodes[1].getreceivedbyaccount("mynewaccount")
+        if balance != Decimal("0.0"):
+            raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
 
 if __name__ == '__main__':
-    main()
+    ReceivedByTest().main()
diff --git a/qa/rpc-tests/skeleton.py b/qa/rpc-tests/skeleton.py
deleted file mode 100755
index 126b6bfaf41c..000000000000
--- a/qa/rpc-tests/skeleton.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-# Skeleton for python-based regression tests using
-# JSON-RPC
-
-
-# Add python-bitcoinrpc to module search path:
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
-
-import json
-import shutil
-import subprocess
-import tempfile
-import traceback
-
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
-
-
-def run_test(nodes):
-    # Replace this as appropriate
-    for node in nodes:
-        assert_equal(node.getblockcount(), 200)
-        assert_equal(node.getbalance(), 25*50)
-
-def main():
-    import optparse
-
-    parser = optparse.OptionParser(usage="%prog [options]")
-    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
-                      help="Leave bitcoinds and test.* datadir on exit or error")
-    parser.add_option("--srcdir", dest="srcdir", default="../../src",
-                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
-    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
-                      help="Root directory for datadirs")
-    (options, args) = parser.parse_args()
-
-    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
-
-    check_json_precision()
-
-    success = False
-    nodes = []
-    try:
-        print("Initializing test directory "+options.tmpdir)
-        if not os.path.isdir(options.tmpdir):
-            os.makedirs(options.tmpdir)
-        initialize_chain(options.tmpdir)
-
-        nodes = start_nodes(2, options.tmpdir)
-        connect_nodes(nodes[1], 0)
-        sync_blocks(nodes)
-
-        run_test(nodes)
-
-        success = True
-
-    except AssertionError as e:
-        print("Assertion failed: "+e.message)
-    except Exception as e:
-        print("Unexpected exception caught during testing: "+str(e))
-        traceback.print_tb(sys.exc_info()[2])
-
-    if not options.nocleanup:
-        print("Cleaning up")
-        stop_nodes(nodes)
-        wait_bitcoinds()
-        shutil.rmtree(options.tmpdir)
-
-    if success:
-        print("Tests successful")
-        sys.exit(0)
-    else:
-        print("Failed")
-        sys.exit(1)
-
-if __name__ == '__main__':
-    main()
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index e8abbfba194e..352a1de2d005 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -4,139 +4,86 @@
 # Test fee estimation code
 #
 
-# Add python-bitcoinrpc to module search path:
-import os
-import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
-
-import json
-import random
-import shutil
-import subprocess
-import tempfile
-import traceback
-
+from test_framework import BitcoinTestFramework
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
 
+class EstimateFeeTest(BitcoinTestFramework):
 
-def run_test(nodes, test_dir):
-    nodes.append(start_node(0, test_dir,
+    def setup_network(self, test_dir):
+        nodes = []
+        nodes.append(start_node(0, test_dir,
                             ["-debug=mempool", "-debug=estimatefee"]))
-    # Node1 mines small-but-not-tiny blocks, and allows free transactions.
-    # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
-    # so blockmaxsize of 2,000 is really just 1,000 bytes (room enough for
-    # 6 or 7 transactions)
-    nodes.append(start_node(1, test_dir,
-                            ["-blockprioritysize=1500", "-blockmaxsize=2000",
-                             "-debug=mempool", "-debug=estimatefee"]))
-    connect_nodes(nodes[1], 0)
-
-    # Node2 is a stingy miner, that
-    # produces very small blocks (room for only 3 or so transactions)
-    node2args = [ "-blockprioritysize=0", "-blockmaxsize=1500",
-                             "-debug=mempool", "-debug=estimatefee"]
-    nodes.append(start_node(2, test_dir, node2args))
-    connect_nodes(nodes[2], 0)
-
-    sync_blocks(nodes)
-
-    # Prime the memory pool with pairs of transactions
-    # (high-priority, random fee and zero-priority, random fee)
-    min_fee = Decimal("0.001")
-    fees_per_kb = [];
-    for i in range(12):
-        (txid, txhex, fee) = random_zeropri_transaction(nodes, Decimal("1.1"),
-                                                        min_fee, min_fee, 20)
-        tx_kbytes = (len(txhex)/2)/1000.0
-        fees_per_kb.append(float(fee)/tx_kbytes)
-
-    # Mine blocks with node2 until the memory pool clears:
-    count_start = nodes[2].getblockcount()
-    while len(nodes[2].getrawmempool()) > 0:
-        nodes[2].setgenerate(True, 1)
-        sync_blocks(nodes)
-
-    all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
-    print("Fee estimates, super-stingy miner: "+str([str(e) for e in all_estimates]))
-
-    # Estimates should be within the bounds of what transactions fees actually were:
-    delta = 1.0e-6 # account for rounding error
-    for e in filter(lambda x: x >= 0, all_estimates):
-        if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
-            raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
+        # Node1 mines small-but-not-tiny blocks, and allows free transactions.
+        # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
+        # so blockmaxsize of 2,000 is really just 1,000 bytes (room enough for
+        # 6 or 7 transactions)
+        nodes.append(start_node(1, test_dir,
+                                ["-blockprioritysize=1500", "-blockmaxsize=2000",
+                                 "-debug=mempool", "-debug=estimatefee"]))
+        connect_nodes(nodes[1], 0)
+
+        # Node2 is a stingy miner, that
+        # produces very small blocks (room for only 3 or so transactions)
+        node2args = [ "-blockprioritysize=0", "-blockmaxsize=1500",
+                      "-debug=mempool", "-debug=estimatefee"]
+        nodes.append(start_node(2, test_dir, node2args))
+        connect_nodes(nodes[2], 0)
 
-    # Generate transactions while mining 30 more blocks, this time with node1:
-    for i in range(30):
-        for j in range(random.randrange(6-4,6+4)):
-            (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"),
-                                                    Decimal("0.0"), min_fee, 20)
+        sync_blocks(nodes)
+        return nodes
+        
+
+    def run_test(self, nodes):
+        # Prime the memory pool with pairs of transactions
+        # (high-priority, random fee and zero-priority, random fee)
+        min_fee = Decimal("0.001")
+        fees_per_kb = [];
+        for i in range(12):
+            (txid, txhex, fee) = random_zeropri_transaction(nodes, Decimal("1.1"),
+                                                            min_fee, min_fee, 20)
             tx_kbytes = (len(txhex)/2)/1000.0
             fees_per_kb.append(float(fee)/tx_kbytes)
-        nodes[1].setgenerate(True, 1)
-        sync_blocks(nodes)
 
-    all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
-    print("Fee estimates, more generous miner: "+str([ str(e) for e in all_estimates]))
-    for e in filter(lambda x: x >= 0, all_estimates):
-        if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
-            raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
-
-    # Finish by mining a normal-sized block:
-    while len(nodes[0].getrawmempool()) > 0:
-        nodes[0].setgenerate(True, 1)
-        sync_blocks(nodes)
+        # Mine blocks with node2 until the memory pool clears:
+        count_start = nodes[2].getblockcount()
+        while len(nodes[2].getrawmempool()) > 0:
+            nodes[2].setgenerate(True, 1)
+            sync_blocks(nodes)
+
+        all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        print("Fee estimates, super-stingy miner: "+str([str(e) for e in all_estimates]))
+
+        # Estimates should be within the bounds of what transactions fees actually were:
+        delta = 1.0e-6 # account for rounding error
+        for e in filter(lambda x: x >= 0, all_estimates):
+            if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
+                raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
+
+        # Generate transactions while mining 30 more blocks, this time with node1:
+        for i in range(30):
+            for j in range(random.randrange(6-4,6+4)):
+                (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"),
+                                                        Decimal("0.0"), min_fee, 20)
+                tx_kbytes = (len(txhex)/2)/1000.0
+                fees_per_kb.append(float(fee)/tx_kbytes)
+            nodes[1].setgenerate(True, 1)
+            sync_blocks(nodes)
+
+        all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        print("Fee estimates, more generous miner: "+str([ str(e) for e in all_estimates]))
+        for e in filter(lambda x: x >= 0, all_estimates):
+            if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
+                raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
+
+        # Finish by mining a normal-sized block:
+        while len(nodes[0].getrawmempool()) > 0:
+            nodes[0].setgenerate(True, 1)
+            sync_blocks(nodes)
+
+        final_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        print("Final fee estimates: "+str([ str(e) for e in final_estimates]))
 
-    final_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
-    print("Final fee estimates: "+str([ str(e) for e in final_estimates]))
-
-def main():
-    import optparse
-
-    parser = optparse.OptionParser(usage="%prog [options]")
-    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
-                      help="Leave bitcoinds and test.* datadir on exit or error")
-    parser.add_option("--srcdir", dest="srcdir", default="../../src",
-                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
-    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
-                      help="Root directory for datadirs")
-    (options, args) = parser.parse_args()
-
-    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
-
-    check_json_precision()
-
-    success = False
-    nodes = []
-    try:
-        print("Initializing test directory "+options.tmpdir)
-        print("  node0 running at: 127.0.0.1:%d"%(p2p_port(0)))
-        if not os.path.isdir(options.tmpdir):
-            os.makedirs(options.tmpdir)
-        initialize_chain(options.tmpdir)
-
-        run_test(nodes, options.tmpdir)
-
-        success = True
-
-    except AssertionError as e:
-        print("Assertion failed: "+e.message)
-    except Exception as e:
-        print("Unexpected exception caught during testing: "+str(e))
-        traceback.print_tb(sys.exc_info()[2])
-
-    if not options.nocleanup:
-        print("Cleaning up")
-        stop_nodes(nodes)
-        wait_bitcoinds()
-        shutil.rmtree(options.tmpdir)
-
-    if success:
-        print("Tests successful")
-        sys.exit(0)
-    else:
-        print("Failed")
-        sys.exit(1)
 
 if __name__ == '__main__':
-    main()
+    EstimateFeeTest().main()
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
new file mode 100755
index 000000000000..a9b3d236b555
--- /dev/null
+++ b/qa/rpc-tests/test_framework.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Base class for RPC testing
+
+# Add python-bitcoinrpc to module search path:
+import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
+
+import shutil
+import tempfile
+import traceback
+
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+
+class BitcoinTestFramework(object):
+
+    # These may be over-ridden by subclasses:
+    def run_test(self, nodes):
+            assert_equal(node.getblockcount(), 200)
+            assert_equal(node.getbalance(), 25*50)
+
+    def add_options(self, parser):
+        pass
+
+    def setup_chain(self, tmp_directory):
+        print("Initializing test directory "+tmp_directory)
+        initialize_chain(tmp_directory)
+
+    def setup_network(self, tmp_directory):
+        nodes = start_nodes(2, tmp_directory)
+        connect_nodes(nodes[1], 0)
+        sync_blocks(nodes)
+        return nodes
+
+    def main(self):
+        import optparse
+
+        parser = optparse.OptionParser(usage="%prog [options]")
+        parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
+                          help="Leave bitcoinds and test.* datadir on exit or error")
+        parser.add_option("--srcdir", dest="srcdir", default="../../src",
+                          help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
+        parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
+                          help="Root directory for datadirs")
+        self.add_options(parser)
+        (self.options, self.args) = parser.parse_args()
+
+        os.environ['PATH'] = self.options.srcdir+":"+os.environ['PATH']
+
+        check_json_precision()
+
+        success = False
+        nodes = []
+        try:
+            if not os.path.isdir(self.options.tmpdir):
+                os.makedirs(self.options.tmpdir)
+            self.setup_chain(self.options.tmpdir)
+
+            nodes = self.setup_network(self.options.tmpdir)
+
+            self.run_test(nodes)
+
+            success = True
+
+        except AssertionError as e:
+            print("Assertion failed: "+e.message)
+        except Exception as e:
+            print("Unexpected exception caught during testing: "+str(e))
+            traceback.print_tb(sys.exc_info()[2])
+
+        if not self.options.nocleanup:
+            print("Cleaning up")
+            stop_nodes(nodes)
+            wait_bitcoinds()
+            shutil.rmtree(self.options.tmpdir)
+
+        if success:
+            print("Tests successful")
+            sys.exit(0)
+        else:
+            print("Failed")
+            sys.exit(1)

From f5a92bf9bd9e5547cb8b4c0084c7e23c36b49b70 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 8 Jul 2014 21:24:40 -0400
Subject: [PATCH 0354/1819] Print better errors, and add util stop_node()
 function.

---
 qa/rpc-tests/test_framework.py |  4 ++++
 qa/rpc-tests/util.py           | 15 ++++++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index a9b3d236b555..5a185566553f 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -68,8 +68,12 @@ def main(self):
 
             success = True
 
+        except JSONRPCException as e:
+            print("JSONRPC error: "+e.error['message'])
+            traceback.print_tb(sys.exc_info()[2])
         except AssertionError as e:
             print("Assertion failed: "+e.message)
+            traceback.print_tb(sys.exc_info()[2])
         except Exception as e:
             print("Unexpected exception caught during testing: "+str(e))
             traceback.print_tb(sys.exc_info()[2])
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 27c9f778f63d..0a7f26ffcd47 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -59,7 +59,7 @@ def sync_mempools(rpc_connections):
         time.sleep(1)
         
 
-bitcoind_processes = []
+bitcoind_processes = {}
 
 def initialize_datadir(dir, n):
     datadir = os.path.join(dir, "node"+str(n))
@@ -88,7 +88,7 @@ def initialize_chain(test_dir):
             args = [ "bitcoind", "-keypool=1", "-datadir="+datadir ]
             if i > 0:
                 args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
-            bitcoind_processes.append(subprocess.Popen(args))
+            bitcoind_processes[i] = subprocess.Popen(args)
             subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
                                     "-rpcwait", "getblockcount"], stdout=devnull)
         devnull.close()
@@ -149,7 +149,7 @@ def start_node(i, dir, extra_args=None, rpchost=None):
     datadir = os.path.join(dir, "node"+str(i))
     args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
     if extra_args is not None: args.extend(extra_args)
-    bitcoind_processes.append(subprocess.Popen(args))
+    bitcoind_processes[i] = subprocess.Popen(args)
     devnull = open("/dev/null", "w+")
     subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
                           _rpchost_to_args(rpchost)  +
@@ -168,6 +168,11 @@ def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
 def debug_log(dir, n_node):
     return os.path.join(dir, "node"+str(n_node), "regtest", "debug.log")
 
+def stop_node(node, i):
+    node.stop()
+    bitcoind_processes[i].wait()
+    del bitcoind_processes[i]
+
 def stop_nodes(nodes):
     for i in range(len(nodes)):
         nodes[i].stop()
@@ -175,9 +180,9 @@ def stop_nodes(nodes):
 
 def wait_bitcoinds():
     # Wait for all bitcoinds to cleanly exit
-    for bitcoind in bitcoind_processes:
+    for bitcoind in bitcoind_processes.values():
         bitcoind.wait()
-    del bitcoind_processes[:]
+    bitcoind_processes.clear()
 
 def connect_nodes(from_connection, node_num):
     ip_port = "127.0.0.1:"+str(p2p_port(node_num))

From 5734d4d1e6ee89361fc2484f5d33315397796c0d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 9 Jul 2014 17:42:50 +0200
Subject: [PATCH 0355/1819] Only remove actualy failed blocks from
 setBlockIndexValid

---
 src/main.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..913a1702eb82 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2073,7 +2073,7 @@ static CBlockIndex* FindMostWorkChain() {
         CBlockIndex *pindexTest = pindexNew;
         bool fInvalidAncestor = false;
         while (pindexTest && !chainActive.Contains(pindexTest)) {
-            if (!pindexTest->IsValid(BLOCK_VALID_TRANSACTIONS) || !(pindexTest->nStatus & BLOCK_HAVE_DATA)) {
+            if (pindexTest->nStatus & BLOCK_FAILED_MASK) {
                 // Candidate has an invalid ancestor, remove entire chain from the set.
                 if (pindexBestInvalid == NULL || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
                     pindexBestInvalid = pindexNew;
@@ -2083,6 +2083,7 @@ static CBlockIndex* FindMostWorkChain() {
                     setBlockIndexValid.erase(pindexFailed);
                     pindexFailed = pindexFailed->pprev;
                 }
+                setBlockIndexValid.erase(pindexTest);
                 fInvalidAncestor = true;
                 break;
             }

From dc942e6f276b9fabc21f06d11cd16871d4054f82 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 21 Jun 2014 13:34:36 +0200
Subject: [PATCH 0356/1819] Introduce whitelisted peers.

This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).

Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
  even if they were already in the mempool. This means that a node
  can function as a gateway for a local network, and that rebroadcasts
  from the local network will work as expected.

Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
---
 qa/pull-tester/run-bitcoind-for-test.sh.in |  2 +-
 src/init.cpp                               | 32 +++++++++---
 src/main.cpp                               | 19 +++++--
 src/net.cpp                                | 60 ++++++++++++++++------
 src/net.h                                  | 13 ++++-
 src/rpcnet.cpp                             |  1 +
 6 files changed, 99 insertions(+), 28 deletions(-)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index 391046ab85bf..ecc42e12b199 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -10,7 +10,7 @@ touch "$DATADIR/regtest/debug.log"
 tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
 WAITER=$!
 PORT=`expr $BASHPID + 10000`
-"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -regtest -rpcport=`expr $PORT + 1` &
+"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
 BITCOIND=$!
 
 #Install a watchdog.
diff --git a/src/init.cpp b/src/init.cpp
index a1d75c96741c..492070cbd901 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -58,7 +58,8 @@ CWallet* pwalletMain;
 enum BindFlags {
     BF_NONE         = 0,
     BF_EXPLICIT     = (1U << 0),
-    BF_REPORT_ERROR = (1U << 1)
+    BF_REPORT_ERROR = (1U << 1),
+    BF_WHITELIST    = (1U << 2),
 };
 
 static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
@@ -192,7 +193,7 @@ bool static Bind(const CService &addr, unsigned int flags) {
     if (!(flags & BF_EXPLICIT) && IsLimited(addr))
         return false;
     std::string strError;
-    if (!BindListenPort(addr, strError)) {
+    if (!BindListenPort(addr, strError, flags & BF_WHITELIST)) {
         if (flags & BF_REPORT_ERROR)
             return InitError(strError);
         return false;
@@ -253,6 +254,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -upnp                  " + _("Use UPnP to map the listening port (default: 0)") + "\n";
 #endif
 #endif
+    strUsage += "  -whitebind=<addr>      " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n";
+    strUsage += "  -whitelist=<netmask>   " + _("Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.") + "\n";
 
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
@@ -504,11 +507,11 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     // ********************************************************* Step 2: parameter interactions
 
-    if (mapArgs.count("-bind")) {
+    if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
         // when specifying an explicit binding address, you want to listen on it
         // even when -connect or -proxy is specified
         if (SoftSetBoolArg("-listen", true))
-            LogPrintf("AppInit2 : parameter interaction: -bind set -> setting -listen=1\n");
+            LogPrintf("AppInit2 : parameter interaction: -bind or -whitebind set -> setting -listen=1\n");
     }
 
     if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) {
@@ -552,7 +555,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     // Make sure enough file descriptors are available
-    int nBind = std::max((int)mapArgs.count("-bind"), 1);
+    int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
     nMaxConnections = GetArg("-maxconnections", 125);
     nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
     int nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS);
@@ -769,6 +772,15 @@ bool AppInit2(boost::thread_group& threadGroup)
         }
     }
 
+    if (mapArgs.count("-whitelist")) {
+        BOOST_FOREACH(const std::string& net, mapMultiArgs["-whitelist"]) {
+            CSubNet subnet(net);
+            if (!subnet.IsValid())
+                return InitError(strprintf(_("Invalid netmask specified in -whitelist: '%s'"), net));
+            CNode::AddWhitelistedRange(subnet);
+        }
+    }
+
     CService addrProxy;
     bool fProxy = false;
     if (mapArgs.count("-proxy")) {
@@ -805,13 +817,21 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     bool fBound = false;
     if (fListen) {
-        if (mapArgs.count("-bind")) {
+        if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
             BOOST_FOREACH(std::string strBind, mapMultiArgs["-bind"]) {
                 CService addrBind;
                 if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false))
                     return InitError(strprintf(_("Cannot resolve -bind address: '%s'"), strBind));
                 fBound |= Bind(addrBind, (BF_EXPLICIT | BF_REPORT_ERROR));
             }
+            BOOST_FOREACH(std::string strBind, mapMultiArgs["-whitebind"]) {
+                CService addrBind;
+                if (!Lookup(strBind.c_str(), addrBind, 0, false))
+                    return InitError(strprintf(_("Cannot resolve -whitebind address: '%s'"), strBind));
+                if (addrBind.GetPort() == 0)
+                    return InitError(strprintf(_("Need to specify a port with -whitebind: '%s'"), strBind));
+                fBound |= Bind(addrBind, (BF_EXPLICIT | BF_REPORT_ERROR | BF_WHITELIST));
+            }
         }
         else {
             struct in_addr inaddr_any;
diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..8c119507e64b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -210,7 +210,7 @@ struct CBlockReject {
 struct CNodeState {
     // Accumulated misbehaviour score for this peer.
     int nMisbehavior;
-    // Whether this peer should be disconnected and banned.
+    // Whether this peer should be disconnected and banned (unless whitelisted).
     bool fShouldBan;
     // String name of this peer (debugging/logging purposes).
     std::string name;
@@ -1425,7 +1425,8 @@ void Misbehaving(NodeId pnode, int howmuch)
         return;
 
     state->nMisbehavior += howmuch;
-    if (state->nMisbehavior >= GetArg("-banscore", 100))
+    int banscore = GetArg("-banscore", 100);
+    if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
     {
         LogPrintf("Misbehaving: %s (%d -> %d) BAN THRESHOLD EXCEEDED\n", state->name, state->nMisbehavior-howmuch, state->nMisbehavior);
         state->fShouldBan = true;
@@ -3947,6 +3948,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             unsigned int nEvicted = LimitOrphanTxSize(MAX_ORPHAN_TRANSACTIONS);
             if (nEvicted > 0)
                 LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
+        } else if (pfrom->fWhitelisted) {
+            // Always relay transactions received from whitelisted peers, even
+            // if they are already in the mempool (allowing the node to function
+            // as a gateway for nodes hidden behind it).
+            RelayTransaction(tx);
         }
         int nDoS = 0;
         if (state.IsInvalid(nDoS))
@@ -4440,11 +4446,14 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
 
         CNodeState &state = *State(pto->GetId());
         if (state.fShouldBan) {
-            if (pto->addr.IsLocal())
-                LogPrintf("Warning: not banning local node %s!\n", pto->addr.ToString());
+            if (pto->fWhitelisted)
+                LogPrintf("Warning: not punishing whitelisted peer %s!\n", pto->addr.ToString());
             else {
                 pto->fDisconnect = true;
-                CNode::Ban(pto->addr);
+                if (pto->addr.IsLocal())
+                    LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString());
+                else
+                    CNode::Ban(pto->addr);
             }
             state.fShouldBan = false;
         }
diff --git a/src/net.cpp b/src/net.cpp
index 6a660dc9bd93..6a6d9df6af5c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -50,7 +50,16 @@
 using namespace std;
 using namespace boost;
 
-static const int MAX_OUTBOUND_CONNECTIONS = 8;
+namespace {
+    const int MAX_OUTBOUND_CONNECTIONS = 8;
+
+    struct ListenSocket {
+        SOCKET socket;
+        bool whitelisted;
+
+        ListenSocket(SOCKET socket, bool whitelisted) : socket(socket), whitelisted(whitelisted) {}
+    };
+}
 
 //
 // Global state variables
@@ -65,7 +74,7 @@ static bool vfLimited[NET_MAX] = {};
 static CNode* pnodeLocalHost = NULL;
 static CNode* pnodeSync = NULL;
 uint64_t nLocalHostNonce = 0;
-static std::vector<SOCKET> vhListenSocket;
+static std::vector<ListenSocket> vhListenSocket;
 CAddrMan addrman;
 int nMaxConnections = 125;
 
@@ -593,6 +602,24 @@ bool CNode::Ban(const CNetAddr &addr) {
     return true;
 }
 
+
+std::vector<CSubNet> CNode::vWhitelistedRange;
+CCriticalSection CNode::cs_vWhitelistedRange;
+
+bool CNode::IsWhitelistedRange(const CNetAddr &addr) {
+    LOCK(cs_vWhitelistedRange);
+    BOOST_FOREACH(const CSubNet& subnet, vWhitelistedRange) {
+        if (subnet.Match(addr))
+            return true;
+    }
+    return false;
+}
+
+void CNode::AddWhitelistedRange(const CSubNet &subnet) {
+    LOCK(cs_vWhitelistedRange);
+    vWhitelistedRange.push_back(subnet);
+}
+
 #undef X
 #define X(name) stats.name = name
 void CNode::copyStats(CNodeStats &stats)
@@ -609,6 +636,7 @@ void CNode::copyStats(CNodeStats &stats)
     X(nStartingHeight);
     X(nSendBytes);
     X(nRecvBytes);
+    X(fWhitelisted);
     stats.fSyncNode = (this == pnodeSync);
 
     // It is common for nodes with good ping times to suddenly become lagged,
@@ -848,9 +876,9 @@ void ThreadSocketHandler()
         SOCKET hSocketMax = 0;
         bool have_fds = false;
 
-        BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket) {
-            FD_SET(hListenSocket, &fdsetRecv);
-            hSocketMax = max(hSocketMax, hListenSocket);
+        BOOST_FOREACH(const ListenSocket& hListenSocket, vhListenSocket) {
+            FD_SET(hListenSocket.socket, &fdsetRecv);
+            hSocketMax = max(hSocketMax, hListenSocket.socket);
             have_fds = true;
         }
 
@@ -917,13 +945,13 @@ void ThreadSocketHandler()
         //
         // Accept new connections
         //
-        BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket)
+        BOOST_FOREACH(const ListenSocket& hListenSocket, vhListenSocket)
         {
-            if (hListenSocket != INVALID_SOCKET && FD_ISSET(hListenSocket, &fdsetRecv))
+            if (hListenSocket.socket != INVALID_SOCKET && FD_ISSET(hListenSocket.socket, &fdsetRecv))
             {
                 struct sockaddr_storage sockaddr;
                 socklen_t len = sizeof(sockaddr);
-                SOCKET hSocket = accept(hListenSocket, (struct sockaddr*)&sockaddr, &len);
+                SOCKET hSocket = accept(hListenSocket.socket, (struct sockaddr*)&sockaddr, &len);
                 CAddress addr;
                 int nInbound = 0;
 
@@ -931,6 +959,7 @@ void ThreadSocketHandler()
                     if (!addr.SetSockAddr((const struct sockaddr*)&sockaddr))
                         LogPrintf("Warning: Unknown socket family\n");
 
+                bool whitelisted = hListenSocket.whitelisted || CNode::IsWhitelistedRange(addr);
                 {
                     LOCK(cs_vNodes);
                     BOOST_FOREACH(CNode* pnode, vNodes)
@@ -948,7 +977,7 @@ void ThreadSocketHandler()
                 {
                     closesocket(hSocket);
                 }
-                else if (CNode::IsBanned(addr))
+                else if (CNode::IsBanned(addr) && !whitelisted)
                 {
                     LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
                     closesocket(hSocket);
@@ -957,6 +986,7 @@ void ThreadSocketHandler()
                 {
                     CNode* pnode = new CNode(hSocket, addr, "", true);
                     pnode->AddRef();
+                    pnode->fWhitelisted = whitelisted;
 
                     {
                         LOCK(cs_vNodes);
@@ -1580,7 +1610,7 @@ void ThreadMessageHandler()
 
 
 
-bool BindListenPort(const CService &addrBind, string& strError)
+bool BindListenPort(const CService &addrBind, string& strError, bool fWhitelisted)
 {
     strError = "";
     int nOne = 1;
@@ -1661,9 +1691,9 @@ bool BindListenPort(const CService &addrBind, string& strError)
         return false;
     }
 
-    vhListenSocket.push_back(hListenSocket);
+    vhListenSocket.push_back(ListenSocket(hListenSocket, fWhitelisted));
 
-    if (addrBind.IsRoutable() && fDiscover)
+    if (addrBind.IsRoutable() && fDiscover && !fWhitelisted)
         AddLocal(addrBind, LOCAL_BIND);
 
     return true;
@@ -1788,9 +1818,9 @@ class CNetCleanup
         BOOST_FOREACH(CNode* pnode, vNodes)
             if (pnode->hSocket != INVALID_SOCKET)
                 closesocket(pnode->hSocket);
-        BOOST_FOREACH(SOCKET hListenSocket, vhListenSocket)
-            if (hListenSocket != INVALID_SOCKET)
-                if (closesocket(hListenSocket) == SOCKET_ERROR)
+        BOOST_FOREACH(ListenSocket& hListenSocket, vhListenSocket)
+            if (hListenSocket.socket != INVALID_SOCKET)
+                if (closesocket(hListenSocket.socket) == SOCKET_ERROR)
                     LogPrintf("closesocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
 
         // clean up some globals (to help leak detection)
diff --git a/src/net.h b/src/net.h
index c2a041645525..4e42a1eeb27f 100644
--- a/src/net.h
+++ b/src/net.h
@@ -64,7 +64,7 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest = NULL);
 bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);
 void MapPort(bool fUseUPnP);
 unsigned short GetListenPort();
-bool BindListenPort(const CService &bindAddr, std::string& strError);
+bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
 void StartNode(boost::thread_group& threadGroup);
 bool StopNode();
 void SocketSendData(CNode *pnode);
@@ -154,6 +154,7 @@ class CNodeStats
     uint64_t nSendBytes;
     uint64_t nRecvBytes;
     bool fSyncNode;
+    bool fWhitelisted;
     double dPingTime;
     double dPingWait;
     std::string addrLocal;
@@ -236,6 +237,7 @@ class CNode
     // store the sanitized version in cleanSubVer. The original should be used when dealing with
     // the network or wire types and the cleaned string used when displayed or logged.
     std::string strSubVer, cleanSubVer;
+    bool fWhitelisted; // This peer can bypass DoS banning.
     bool fOneShot;
     bool fClient;
     bool fInbound;
@@ -259,6 +261,11 @@ class CNode
     static std::map<CNetAddr, int64_t> setBanned;
     static CCriticalSection cs_setBanned;
 
+    // Whitelisted ranges. Any node connecting from these is automatically
+    // whitelisted (as well as those connecting to whitelisted binds).
+    static std::vector<CSubNet> vWhitelistedRange;
+    static CCriticalSection cs_vWhitelistedRange;
+
     // Basic fuzz-testing
     void Fuzz(int nChance); // modifies ssSend
 
@@ -305,6 +312,7 @@ class CNode
         addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
         nVersion = 0;
         strSubVer = "";
+        fWhitelisted = false;
         fOneShot = false;
         fClient = false; // set by version message
         fInbound = fInboundIn;
@@ -720,6 +728,9 @@ class CNode
     static bool Ban(const CNetAddr &ip);
     void copyStats(CNodeStats &stats);
 
+    static bool IsWhitelistedRange(const CNetAddr &ip);
+    static void AddWhitelistedRange(const CSubNet &subnet);
+
     // Network stats
     static void RecordBytesRecv(uint64_t bytes);
     static void RecordBytesSent(uint64_t bytes);
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index cf2c293caf09..680717930b11 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -137,6 +137,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             obj.push_back(Pair("syncheight", statestats.nSyncHeight));
         }
         obj.push_back(Pair("syncnode", stats.fSyncNode));
+        obj.push_back(Pair("whitelisted", stats.fWhitelisted));
 
         ret.push_back(obj);
     }

From 502972f16bae79cf025bf9b63ec8276bc4a236bb Mon Sep 17 00:00:00 2001
From: Federico Bond <federicobond@gmail.com>
Date: Wed, 9 Jul 2014 20:50:30 -0300
Subject: [PATCH 0357/1819] Fix Error: No file at
 @loader_path/libboost_system-mt.dylib

---
 contrib/macdeploy/macdeployqtplus | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index ce4169a4106d..fdad28018fa2 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -211,6 +211,7 @@ def getFrameworks(binaryPath, verbose):
     
     libraries = []
     for line in otoolLines:
+        line = line.replace("@loader_path", os.path.dirname(binaryPath))
         info = FrameworkInfo.fromOtoolLibraryLine(line.strip())
         if info is not None:
             if verbose >= 3:
@@ -307,7 +308,7 @@ def deployFrameworks(frameworks, bundlePath, binaryPath, strip, verbose, deploym
         if deploymentInfo.qtPath is None and framework.isQtFramework():
             deploymentInfo.detectQtPath(framework.frameworkDirectory)
         
-        if framework.installName.startswith("@executable_path"):
+        if framework.installName.startswith("@executable_path") or framework.installName.startswith(bundlePath):
             if verbose >= 2:
                 print framework.frameworkName, "already deployed, skipping."
             continue

From 954d2e7201fcea7a95c5a95be574a8c0a1f16ce1 Mon Sep 17 00:00:00 2001
From: Ruben Dario Ponticelli <rdponticelli@gmail.com>
Date: Wed, 9 Jul 2014 21:37:27 -0300
Subject: [PATCH 0358/1819] Avoid a segfault on getblock if it can't read a
 block from disk.

---
 src/rpcblockchain.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index a67f266a1347..253693e6248a 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -276,7 +276,9 @@ Value getblock(const Array& params, bool fHelp)
 
     CBlock block;
     CBlockIndex* pblockindex = mapBlockIndex[hash];
-    ReadBlockFromDisk(block, pblockindex);
+
+    if(!ReadBlockFromDisk(block, pblockindex))
+        throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
 
     if (!fVerbose)
     {

From b60be6be4a87cfe10bc32aefd8327df6c23d46e0 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Thu, 10 Jul 2014 10:06:43 -0700
Subject: [PATCH 0359/1819] Clean up RPCs that are disabled in safe-mode.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This removes some inconsistencies in what worked and didn't work in
 safemode. Now only RPCs involved in getting balances or sending
 funds are disabled.

Previously you could mine but not submit blocks— but we may need more
 blocks to resolve a fork that triggered safe mode in the first place,
 and the non-submission was not reliable since some miners submit
 blocks via multiple means. There were also a number of random commands
 disabled that had nothing to do with the blockchain like verifymessage.

Thanks to earlz for pointing out that there were some moderately cheap
 ways to maliciously trigger safe mode, which brought attention to
 the fact that safemode wasn't used in a very intelligent way.
---
 src/rpcserver.cpp | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 18fa07510142..48b87f513951 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -232,8 +232,8 @@ static const CRPCCommand vRPCCommands[] =
     { "getblockchaininfo",      &getblockchaininfo,      true,      false,      false },
     { "getbestblockhash",       &getbestblockhash,       true,      false,      false },
     { "getblockcount",          &getblockcount,          true,      false,      false },
-    { "getblock",               &getblock,               false,     false,      false },
-    { "getblockhash",           &getblockhash,           false,     false,      false },
+    { "getblock",               &getblock,               true,      false,      false },
+    { "getblockhash",           &getblockhash,           true,      false,      false },
     { "getdifficulty",          &getdifficulty,          true,      false,      false },
     { "getrawmempool",          &getrawmempool,          true,      false,      false },
     { "gettxout",               &gettxout,               true,      false,      false },
@@ -245,32 +245,32 @@ static const CRPCCommand vRPCCommands[] =
     { "getmininginfo",          &getmininginfo,          true,      false,      false },
     { "getnetworkhashps",       &getnetworkhashps,       true,      false,      false },
     { "prioritisetransaction",  &prioritisetransaction,  true,      false,      false },
-    { "submitblock",            &submitblock,            false,     true,       false },
+    { "submitblock",            &submitblock,            true,      true,       false },
 
     /* Raw transactions */
-    { "createrawtransaction",   &createrawtransaction,   false,     false,      false },
-    { "decoderawtransaction",   &decoderawtransaction,   false,     false,      false },
-    { "decodescript",           &decodescript,           false,     false,      false },
-    { "getrawtransaction",      &getrawtransaction,      false,     false,      false },
+    { "createrawtransaction",   &createrawtransaction,   true,      false,      false },
+    { "decoderawtransaction",   &decoderawtransaction,   true,      false,      false },
+    { "decodescript",           &decodescript,           true,      false,      false },
+    { "getrawtransaction",      &getrawtransaction,      true,      false,      false },
     { "sendrawtransaction",     &sendrawtransaction,     false,     false,      false },
     { "signrawtransaction",     &signrawtransaction,     false,     false,      false }, /* uses wallet if enabled */
 
     /* Utility functions */
     { "createmultisig",         &createmultisig,         true,      true ,      false },
     { "validateaddress",        &validateaddress,        true,      false,      false }, /* uses wallet if enabled */
-    { "verifymessage",          &verifymessage,          false,     false,      false },
+    { "verifymessage",          &verifymessage,          true,      false,      false },
     { "estimatefee",            &estimatefee,            true,      true,       false },
     { "estimatepriority",       &estimatepriority,       true,      true,       false },
 
 #ifdef ENABLE_WALLET
     /* Wallet */
-    { "addmultisigaddress",     &addmultisigaddress,     false,     false,      true },
+    { "addmultisigaddress",     &addmultisigaddress,     true,      false,      true },
     { "backupwallet",           &backupwallet,           true,      false,      true },
     { "dumpprivkey",            &dumpprivkey,            true,      false,      true },
     { "dumpwallet",             &dumpwallet,             true,      false,      true },
-    { "encryptwallet",          &encryptwallet,          false,     false,      true },
+    { "encryptwallet",          &encryptwallet,          true,      false,      true },
     { "getaccountaddress",      &getaccountaddress,      true,      false,      true },
-    { "getaccount",             &getaccount,             false,     false,      true },
+    { "getaccount",             &getaccount,             true,      false,      true },
     { "getaddressesbyaccount",  &getaddressesbyaccount,  true,      false,      true },
     { "getbalance",             &getbalance,             false,     false,      true },
     { "getnewaddress",          &getnewaddress,          true,      false,      true },
@@ -279,10 +279,10 @@ static const CRPCCommand vRPCCommands[] =
     { "getreceivedbyaddress",   &getreceivedbyaddress,   false,     false,      true },
     { "gettransaction",         &gettransaction,         false,     false,      true },
     { "getunconfirmedbalance",  &getunconfirmedbalance,  false,     false,      true },
-    { "getwalletinfo",          &getwalletinfo,          true,      false,      true },
-    { "importprivkey",          &importprivkey,          false,     false,      true },
-    { "importwallet",           &importwallet,           false,     false,      true },
-    { "importaddress",          &importaddress,          false,     false,      true },
+    { "getwalletinfo",          &getwalletinfo,          false,     false,      true },
+    { "importprivkey",          &importprivkey,          true,      false,      true },
+    { "importwallet",           &importwallet,           true,      false,      true },
+    { "importaddress",          &importaddress,          true,      false,      true },
     { "keypoolrefill",          &keypoolrefill,          true,      false,      true },
     { "listaccounts",           &listaccounts,           false,     false,      true },
     { "listaddressgroupings",   &listaddressgroupings,   false,     false,      true },
@@ -292,16 +292,16 @@ static const CRPCCommand vRPCCommands[] =
     { "listsinceblock",         &listsinceblock,         false,     false,      true },
     { "listtransactions",       &listtransactions,       false,     false,      true },
     { "listunspent",            &listunspent,            false,     false,      true },
-    { "lockunspent",            &lockunspent,            false,     false,      true },
+    { "lockunspent",            &lockunspent,            true,      false,      true },
     { "move",                   &movecmd,                false,     false,      true },
     { "sendfrom",               &sendfrom,               false,     false,      true },
     { "sendmany",               &sendmany,               false,     false,      true },
     { "sendtoaddress",          &sendtoaddress,          false,     false,      true },
     { "setaccount",             &setaccount,             true,      false,      true },
-    { "settxfee",               &settxfee,               false,     false,      true },
-    { "signmessage",            &signmessage,            false,     false,      true },
+    { "settxfee",               &settxfee,               true,      false,      true },
+    { "signmessage",            &signmessage,            true,      false,      true },
     { "walletlock",             &walletlock,             true,      false,      true },
-    { "walletpassphrasechange", &walletpassphrasechange, false,     false,      true },
+    { "walletpassphrasechange", &walletpassphrasechange, true,      false,      true },
     { "walletpassphrase",       &walletpassphrase,       true,      false,      true },
 
     /* Wallet-enabled mining */

From ff6a7af154f2151c93a06b7ee86c167603c5ac55 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 13 May 2012 04:43:24 +0000
Subject: [PATCH 0360/1819] getblocktemplate: longpolling support

---
 src/main.cpp      |  5 ++++
 src/main.h        |  2 ++
 src/rpcmining.cpp | 60 ++++++++++++++++++++++++++++++++++++++++++++++-
 src/rpcserver.cpp | 11 +++++++++
 src/rpcserver.h   |  2 ++
 src/sync.h        |  3 +++
 6 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..9e97a916829b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,6 +41,8 @@ CCriticalSection cs_main;
 map<uint256, CBlockIndex*> mapBlockIndex;
 CChain chainActive;
 int64_t nTimeBestReceived = 0;
+CWaitableCriticalSection csBestBlock;
+CConditionVariable cvBlockChange;
 int nScriptCheckThreads = 0;
 bool fImporting = false;
 bool fReindex = false;
@@ -1944,11 +1946,14 @@ void static UpdateTip(CBlockIndex *pindexNew) {
     // New best block
     nTimeBestReceived = GetTime();
     mempool.AddTransactionsUpdated(1);
+
     LogPrintf("UpdateTip: new best=%s  height=%d  log2_work=%.8g  tx=%lu  date=%s progress=%f\n",
       chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
       DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
       Checkpoints::GuessVerificationProgress(chainActive.Tip()));
 
+    cvBlockChange.notify_all();
+
     // Check the version of the last 100 blocks to see if we need to upgrade:
     if (!fIsInitialDownload)
     {
diff --git a/src/main.h b/src/main.h
index f6bac889beb9..a6834125719d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -87,6 +87,8 @@ extern uint64_t nLastBlockTx;
 extern uint64_t nLastBlockSize;
 extern const std::string strMessageMagic;
 extern int64_t nTimeBestReceived;
+extern CWaitableCriticalSection csBestBlock;
+extern CConditionVariable cvBlockChange;
 extern bool fImporting;
 extern bool fReindex;
 extern bool fBenchmark;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index c7621dc137b5..6f72ea740403 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -324,6 +324,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
          );
 
     std::string strMode = "template";
+    Value lpval = Value::null;
     if (params.size() > 0)
     {
         const Object& oparam = params[0].get_obj();
@@ -336,6 +337,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
         }
         else
             throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
+        lpval = find_value(oparam, "longpollid");
     }
 
     if (strMode != "template")
@@ -347,8 +349,63 @@ Value getblocktemplate(const Array& params, bool fHelp)
     if (IsInitialBlockDownload())
         throw JSONRPCError(RPC_CLIENT_IN_INITIAL_DOWNLOAD, "Bitcoin is downloading blocks...");
 
-    // Update block
     static unsigned int nTransactionsUpdatedLast;
+
+    if (lpval.type() != null_type)
+    {
+        // Wait to respond until either the best block changes, OR a minute has passed and there are more transactions
+        uint256 hashWatchedChain;
+        boost::system_time checktxtime;
+        unsigned int nTransactionsUpdatedLastLP;
+
+        if (lpval.type() == str_type)
+        {
+            // Format: <hashBestChain><nTransactionsUpdatedLast>
+            std::string lpstr = lpval.get_str();
+
+            hashWatchedChain.SetHex(lpstr.substr(0, 64));
+            nTransactionsUpdatedLastLP = atoi64(lpstr.substr(64));
+        }
+        else
+        {
+            // NOTE: Spec does not specify behaviour for non-string longpollid, but this makes testing easier
+            hashWatchedChain = chainActive.Tip()->GetBlockHash();
+            nTransactionsUpdatedLastLP = nTransactionsUpdatedLast;
+        }
+
+        // Release the wallet and main lock while waiting
+#ifdef ENABLE_WALLET
+        if(pwalletMain)
+            LEAVE_CRITICAL_SECTION(pwalletMain->cs_wallet);
+#endif
+        LEAVE_CRITICAL_SECTION(cs_main);
+        {
+            checktxtime = boost::get_system_time() + boost::posix_time::minutes(1);
+
+            boost::unique_lock<boost::mutex> lock(csBestBlock);
+            while (chainActive.Tip()->GetBlockHash() == hashWatchedChain && IsRPCRunning())
+            {
+                if (!cvBlockChange.timed_wait(lock, checktxtime))
+                {
+                    // Timeout: Check transactions for update
+                    if (mempool.GetTransactionsUpdated() != nTransactionsUpdatedLastLP)
+                        break;
+                    checktxtime += boost::posix_time::seconds(10);
+                }
+            }
+        }
+        ENTER_CRITICAL_SECTION(cs_main);
+#ifdef ENABLE_WALLET
+        if(pwalletMain)
+            ENTER_CRITICAL_SECTION(pwalletMain->cs_wallet);
+#endif
+
+        if (!IsRPCRunning())
+            throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Shutting down");
+        // TODO: Maybe recheck connections/IBD and (if something wrong) send an expires-immediately template to stop miners?
+    }
+
+    // Update block
     static CBlockIndex* pindexPrev;
     static int64_t nStart;
     static CBlockTemplate* pblocktemplate;
@@ -436,6 +493,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     result.push_back(Pair("transactions", transactions));
     result.push_back(Pair("coinbaseaux", aux));
     result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue));
+    result.push_back(Pair("longpollid", chainActive.Tip()->GetBlockHash().GetHex() + i64tostr(nTransactionsUpdatedLast)));
     result.push_back(Pair("target", hashTarget.GetHex()));
     result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1));
     result.push_back(Pair("mutable", aMutable));
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 18fa07510142..bb8e56c78548 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -32,6 +32,7 @@ using namespace std;
 
 static std::string strRPCUserColonPass;
 
+static bool fRPCRunning = false;
 // These are created by StartRPCThreads, destroyed in StopRPCThreads
 static asio::io_service* rpc_io_service = NULL;
 static map<string, boost::shared_ptr<deadline_timer> > deadlineTimers;
@@ -659,6 +660,7 @@ void StartRPCThreads()
     rpc_worker_group = new boost::thread_group();
     for (int i = 0; i < GetArg("-rpcthreads", 4); i++)
         rpc_worker_group->create_thread(boost::bind(&asio::io_service::run, rpc_io_service));
+    fRPCRunning = true;
 }
 
 void StartDummyRPCThread()
@@ -671,12 +673,15 @@ void StartDummyRPCThread()
         rpc_dummy_work = new asio::io_service::work(*rpc_io_service);
         rpc_worker_group = new boost::thread_group();
         rpc_worker_group->create_thread(boost::bind(&asio::io_service::run, rpc_io_service));
+        fRPCRunning = true;
     }
 }
 
 void StopRPCThreads()
 {
     if (rpc_io_service == NULL) return;
+    // Set this to false first, so that longpolling loops will exit when woken up
+    fRPCRunning = false;
 
     // First, cancel all timers and acceptors
     // This is not done automatically by ->stop(), and in some cases the destructor of
@@ -698,6 +703,7 @@ void StopRPCThreads()
     deadlineTimers.clear();
 
     rpc_io_service->stop();
+    cvBlockChange.notify_all();
     if (rpc_worker_group != NULL)
         rpc_worker_group->join_all();
     delete rpc_dummy_work; rpc_dummy_work = NULL;
@@ -706,6 +712,11 @@ void StopRPCThreads()
     delete rpc_io_service; rpc_io_service = NULL;
 }
 
+bool IsRPCRunning()
+{
+    return fRPCRunning;
+}
+
 void RPCRunHandler(const boost::system::error_code& err, boost::function<void(void)> func)
 {
     if (!err)
diff --git a/src/rpcserver.h b/src/rpcserver.h
index e32eb975a1a6..31badadd6d71 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -40,6 +40,8 @@ void StartRPCThreads();
 void StartDummyRPCThread();
 /* Stop RPC threads */
 void StopRPCThreads();
+/* Query whether RPC is running */
+bool IsRPCRunning();
 
 /*
   Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
diff --git a/src/sync.h b/src/sync.h
index 077ed59b8946..cd319e017157 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -84,6 +84,9 @@ typedef AnnotatedMixin<boost::recursive_mutex> CCriticalSection;
 /** Wrapped boost mutex: supports waiting but not recursive locking */
 typedef AnnotatedMixin<boost::mutex> CWaitableCriticalSection;
 
+/** Just a typedef for boost::condition_variable, can be wrapped later if desired */
+typedef boost::condition_variable CConditionVariable;
+
 #ifdef DEBUG_LOCKORDER
 void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false);
 void LeaveCritical();

From b45a6e8394e8c9e2886ae8b9aa0734996448ff37 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 11 Jul 2014 14:39:50 +0200
Subject: [PATCH 0361/1819] Add test for getblocktemplate longpolling

---
 qa/rpc-tests/getblocktemplate.py | 94 ++++++++++++++++++++++++++++++++
 qa/rpc-tests/util.py             |  4 +-
 2 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100755 qa/rpc-tests/getblocktemplate.py

diff --git a/qa/rpc-tests/getblocktemplate.py b/qa/rpc-tests/getblocktemplate.py
new file mode 100755
index 000000000000..8d97719ec346
--- /dev/null
+++ b/qa/rpc-tests/getblocktemplate.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Exercise the listtransactions API
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+
+def check_array_result(object_array, to_match, expected):
+    """
+    Pass in array of JSON objects, a dictionary with key/value pairs
+    to match against, and another dictionary with expected key/value
+    pairs.
+    """
+    num_matched = 0
+    for item in object_array:
+        all_match = True
+        for key,value in to_match.items():
+            if item[key] != value:
+                all_match = False
+        if not all_match:
+            continue
+        for key,value in expected.items():
+            if item[key] != value:
+                raise AssertionError("%s : expected %s=%s"%(str(item), str(key), str(value)))
+            num_matched = num_matched+1
+    if num_matched == 0:
+        raise AssertionError("No objects matched %s"%(str(to_match)))
+
+import threading
+
+class LongpollThread(threading.Thread):
+    def __init__(self, node):
+        threading.Thread.__init__(self)
+        # query current longpollid
+        templat = node.getblocktemplate()
+        self.longpollid = templat['longpollid']
+        # create a new connection to the node, we can't use the same
+        # connection from two threads
+        self.node = AuthServiceProxy(node.url, timeout=600)
+
+    def run(self):
+        self.node.getblocktemplate({'longpollid':self.longpollid})
+
+class GetBlockTemplateTest(BitcoinTestFramework):
+    '''
+    Test longpolling with getblocktemplate.
+    '''
+
+    def run_test(self, nodes):
+        print "Warning: this test will take about 70 seconds in the best case. Be patient."
+        nodes[0].setgenerate(True, 10)
+        templat = nodes[0].getblocktemplate()
+        longpollid = templat['longpollid']
+        # longpollid should not change between successive invocations if nothing else happens
+        templat2 = nodes[0].getblocktemplate()
+        assert(templat2['longpollid'] == longpollid)
+
+        # Test 1: test that the longpolling wait if we do nothing
+        thr = LongpollThread(nodes[0])
+        thr.start()
+        # check that thread still lives
+        thr.join(5)  # wait 5 seconds or until thread exits
+        assert(thr.is_alive())
+
+        # Test 2: test that longpoll will terminate if another node generates a block
+        nodes[1].setgenerate(True, 1)  # generate a block on another node
+        # check that thread will exit now that new transaction entered mempool
+        thr.join(5)  # wait 5 seconds or until thread exits
+        assert(not thr.is_alive())
+
+        # Test 3: test that longpoll will terminate if we generate a block ourselves
+        thr = LongpollThread(nodes[0])
+        thr.start()
+        nodes[0].setgenerate(True, 1)  # generate a block on another node
+        thr.join(5)  # wait 5 seconds or until thread exits
+        assert(not thr.is_alive())
+
+        # Test 4: test that introducing a new transaction into the mempool will terminate the longpoll
+        thr = LongpollThread(nodes[0])
+        thr.start()
+        # generate a random transaction and submit it
+        (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"), Decimal("0.0"), Decimal("0.001"), 20)
+        # after one minute, every 10 seconds the mempool is probed, so in 80 seconds it should have returned
+        thr.join(60 + 20)
+        assert(not thr.is_alive())
+
+if __name__ == '__main__':
+    GetBlockTemplateTest().main()
+
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 0a7f26ffcd47..fc7ae857760f 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -156,7 +156,9 @@ def start_node(i, dir, extra_args=None, rpchost=None):
                           ["-rpcwait", "getblockcount"], stdout=devnull)
     devnull.close()
     url = "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i))
-    return AuthServiceProxy(url)
+    proxy = AuthServiceProxy(url)
+    proxy.url = url # store URL on proxy for info
+    return proxy
 
 def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
     """

From 6c37f7fd78832442a26e56bd0787974927df4fb2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 16 Jun 2014 14:45:32 +0200
Subject: [PATCH 0362/1819] `getrawchangeaddress` should fail when keypool
 exhausted

An user on IRC reported an issue where `getrawchangeaddress`
keeps returning a single address when the keypool is exhausted.
In my opinion this is strange behaviour.

- Change CReserveKey to fail when running out of keys in the keypool.
- Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when
  unable to create an address.
- Add a Python RPC test for checking the keypool behaviour in combination
  with encrypted wallets.
---
 qa/rpc-tests/keypool.py | 132 ++++++++++++++++++++++++++++++++++++++++
 src/miner.cpp           |   3 +
 src/rpcwallet.cpp       |   2 +-
 src/wallet.cpp          |   6 +-
 4 files changed, 137 insertions(+), 6 deletions(-)
 create mode 100755 qa/rpc-tests/keypool.py

diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py
new file mode 100755
index 000000000000..86ad20de525d
--- /dev/null
+++ b/qa/rpc-tests/keypool.py
@@ -0,0 +1,132 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Exercise the wallet keypool, and interaction with wallet encryption/locking
+
+# Add python-bitcoinrpc to module search path:
+import os
+import sys
+sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
+
+import json
+import shutil
+import subprocess
+import tempfile
+import traceback
+
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+
+def check_array_result(object_array, to_match, expected):
+    """
+    Pass in array of JSON objects, a dictionary with key/value pairs
+    to match against, and another dictionary with expected key/value
+    pairs.
+    """
+    num_matched = 0
+    for item in object_array:
+        all_match = True
+        for key,value in to_match.items():
+            if item[key] != value:
+                all_match = False
+        if not all_match:
+            continue
+        for key,value in expected.items():
+            if item[key] != value:
+                raise AssertionError("%s : expected %s=%s"%(str(item), str(key), str(value)))
+            num_matched = num_matched+1
+    if num_matched == 0:
+        raise AssertionError("No objects matched %s"%(str(to_match)))
+
+def run_test(nodes, tmpdir):
+    # Encrypt wallet and wait to terminate
+    nodes[0].encryptwallet('test')
+    bitcoind_processes[0].wait()
+    # Restart node 0
+    nodes[0] = start_node(0, tmpdir)
+    # Keep creating keys
+    addr = nodes[0].getnewaddress()
+    try:
+        addr = nodes[0].getnewaddress()
+        raise AssertionError('Keypool should be exhausted after one address')
+    except JSONRPCException,e:
+        assert(e.error['code']==-12)
+
+    # put three new keys in the keypool
+    nodes[0].walletpassphrase('test', 12000)
+    nodes[0].keypoolrefill(3)
+    nodes[0].walletlock()
+
+    # drain the keys
+    addr = set()
+    addr.add(nodes[0].getrawchangeaddress())
+    addr.add(nodes[0].getrawchangeaddress())
+    addr.add(nodes[0].getrawchangeaddress())
+    addr.add(nodes[0].getrawchangeaddress())
+    # assert that four unique addresses were returned
+    assert(len(addr) == 4)
+    # the next one should fail
+    try:
+        addr = nodes[0].getrawchangeaddress()
+        raise AssertionError('Keypool should be exhausted after three addresses')
+    except JSONRPCException,e:
+        assert(e.error['code']==-12)
+
+
+def main():
+    import optparse
+
+    parser = optparse.OptionParser(usage="%prog [options]")
+    parser.add_option("--nocleanup", dest="nocleanup", default=False, action="store_true",
+                      help="Leave bitcoinds and test.* datadir on exit or error")
+    parser.add_option("--srcdir", dest="srcdir", default="../../src",
+                      help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
+    parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
+                      help="Root directory for datadirs")
+    (options, args) = parser.parse_args()
+
+    os.environ['PATH'] = options.srcdir+":"+os.environ['PATH']
+
+    check_json_precision()
+
+    success = False
+    nodes = []
+    try:
+        print("Initializing test directory "+options.tmpdir)
+        if not os.path.isdir(options.tmpdir):
+            os.makedirs(options.tmpdir)
+        initialize_chain(options.tmpdir)
+
+        nodes = start_nodes(1, options.tmpdir)
+
+        run_test(nodes, options.tmpdir)
+
+        success = True
+
+    except AssertionError as e:
+        print("Assertion failed: "+e.message)
+    except JSONRPCException as e:
+        print("JSONRPC error: "+e.error['message'])
+        traceback.print_tb(sys.exc_info()[2])
+    except Exception as e:
+        print("Unexpected exception caught during testing: "+str(sys.exc_info()[0]))
+        traceback.print_tb(sys.exc_info()[2])
+
+    if not options.nocleanup:
+        print("Cleaning up")
+        stop_nodes(nodes)
+        wait_bitcoinds()
+        shutil.rmtree(options.tmpdir)
+
+    if success:
+        print("Tests successful")
+        sys.exit(0)
+    else:
+        print("Failed")
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()
diff --git a/src/miner.cpp b/src/miner.cpp
index 17918a1280d9..ec56c7119267 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -467,7 +467,10 @@ void static BitcoinMiner(CWallet *pwallet)
 
             auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
             if (!pblocktemplate.get())
+            {
+                LogPrintf("Error in BitcoinMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n");
                 return;
+            }
             CBlock *pblock = &pblocktemplate->block;
             IncrementExtraNonce(pblock, pindexPrev, nExtraNonce);
 
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 1e4612906563..e8c62fd37b76 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -201,7 +201,7 @@ Value getrawchangeaddress(const Array& params, bool fHelp)
     CReserveKey reservekey(pwalletMain);
     CPubKey vchPubKey;
     if (!reservekey.GetReservedKey(vchPubKey))
-        throw JSONRPCError(RPC_WALLET_ERROR, "Error: Unable to obtain key for change");
+        throw JSONRPCError(RPC_WALLET_KEYPOOL_RAN_OUT, "Error: Keypool ran out, please call keypoolrefill first");
 
     reservekey.KeepKey();
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a54494f93557..8fdc5f4b20ec 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2010,11 +2010,7 @@ bool CReserveKey::GetReservedKey(CPubKey& pubkey)
         if (nIndex != -1)
             vchPubKey = keypool.vchPubKey;
         else {
-            if (pwallet->vchDefaultKey.IsValid()) {
-                LogPrintf("CReserveKey::GetReservedKey(): Warning: Using default key instead of a new key, top up your keypool!");
-                vchPubKey = pwallet->vchDefaultKey;
-            } else
-                return false;
+            return false;
         }
     }
     assert(vchPubKey.IsValid());

From 714a3e6505d986d064d3a34038a724ac1cad5308 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 9 Jul 2014 18:04:18 +0200
Subject: [PATCH 0363/1819] Only keep setBlockIndexValid entries that are
 possible improvements

---
 src/main.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..f8e9f163896c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -94,7 +94,9 @@ namespace {
     };
 
     CBlockIndex *pindexBestInvalid;
-    // may contain all CBlockIndex*'s that have validness >=BLOCK_VALID_TRANSACTIONS, and must contain those who aren't failed
+
+    // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
+    // as good as our current tip. Entries may be failed, though.
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
 
     CCriticalSection cs_LastBlockFile;
@@ -2129,6 +2131,15 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
                 return false;
             }
         } else {
+            // Delete all entries in setBlockIndexValid that are worse than our new current block.
+            // Note that we can't delete the current block itself, as we may need to return to it later in case a
+            // reorganization to a better block fails.
+            std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexValid.begin();
+            while (setBlockIndexValid.value_comp()(*it, chainActive.Tip())) {
+                setBlockIndexValid.erase(it++);
+            }
+            // Either the current tip or a successor of it we're working towards is left in setBlockIndexValid.
+            assert(!setBlockIndexValid.empty());
             if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
                 // We're in a better position than we were. Return temporarily to release the lock.
                 break;

From d4d3fbd828a477e8459169a097d5f1bfb69c2781 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 10 Jul 2014 17:35:22 +0200
Subject: [PATCH 0364/1819] Do not flush the cache after every block outside of
 IBD

---
 src/coins.cpp | 7 ++++++-
 src/main.cpp  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 13a4ea95cdab..3ab03e047f15 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -107,7 +107,12 @@ bool CCoinsViewCache::SetCoins(const uint256 &txid, const CCoins &coins) {
 }
 
 bool CCoinsViewCache::HaveCoins(const uint256 &txid) {
-    return FetchCoins(txid) != cacheCoins.end();
+    CCoinsMap::iterator it = FetchCoins(txid);
+    // We're using vtx.empty() instead of IsPruned here for performance reasons,
+    // as we only care about the case where an transaction was replaced entirely
+    // in a reorganization (which wipes vout entirely, as opposed to spending
+    // which just cleans individual outputs).
+    return (it != cacheCoins.end() && !it->second.vout.empty());
 }
 
 uint256 CCoinsViewCache::GetBestBlock() {
diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..80a6956d1902 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1915,7 +1915,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 // Update the on-disk chain state.
 bool static WriteChainState(CValidationState &state) {
     static int64_t nLastWrite = 0;
-    if (!IsInitialBlockDownload() || pcoinsTip->GetCacheSize() > nCoinCacheSize || GetTimeMicros() > nLastWrite + 600*1000000) {
+    if (pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
         // Typical CCoins structures on disk are around 100 bytes in size.
         // Pushing a new one to the database can cause it to be written
         // twice (once in the log, and once in the tables). This is already

From 6b407e4e56dc82a8591c668401add49b6d128c87 Mon Sep 17 00:00:00 2001
From: Zak Wilcox <iwilcox@iwilcox.me.uk>
Date: Sat, 12 Jul 2014 02:05:09 +0100
Subject: [PATCH 0365/1819] -datadir is now allowed in config files

---
 contrib/debian/manpages/bitcoin.conf.5 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/debian/manpages/bitcoin.conf.5 b/contrib/debian/manpages/bitcoin.conf.5
index 7438b4b66ad7..8a0078d5d58a 100644
--- a/contrib/debian/manpages/bitcoin.conf.5
+++ b/contrib/debian/manpages/bitcoin.conf.5
@@ -2,7 +2,7 @@
 .SH NAME
 bitcoin.conf \- bitcoin configuration file
 .SH SYNOPSIS
-All command-line options (except for '\-datadir' and '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
+All command-line options (except for '\-conf') may be specified in a configuration file, and all configuration file options may also be specified on the command line. Command-line options override values set in the configuration file.
 .TP
 The configuration file is a list of 'setting=value' pairs, one per line, with optional comments starting with the '#' character.
 .TP

From a7e1d503c404b59fc58ad6d4359ba8835d125bac Mon Sep 17 00:00:00 2001
From: Zak Wilcox <iwilcox@iwilcox.me.uk>
Date: Sat, 12 Jul 2014 06:43:41 +0100
Subject: [PATCH 0366/1819] In -? output: -keypool, -gen, -genproclimit depend
 on ENABLE_WALLET

---
 src/init.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index a1d75c96741c..3f068da89f91 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -218,7 +218,6 @@ std::string HelpMessage(HelpMessageMode mode)
     }
     strUsage += "  -datadir=<dir>         " + _("Specify data directory") + "\n";
     strUsage += "  -dbcache=<n>           " + strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache) + "\n";
-    strUsage += "  -keypool=<n>           " + _("Set key pool size to <n> (default: 100)") + "\n";
     strUsage += "  -loadblock=<file>      " + _("Imports blocks from external blk000??.dat file") + " " + _("on startup") + "\n";
     strUsage += "  -maxorphanblocks=<n>   " + strprintf(_("Keep at most <n> unconnectable blocks in memory (default: %u)"), DEFAULT_MAX_ORPHAN_BLOCKS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
@@ -257,6 +256,7 @@ std::string HelpMessage(HelpMessageMode mode)
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
+    strUsage += "  -keypool=<n>           " + _("Set key pool size to <n> (default: 100)") + "\n";
     if (GetBoolArg("-help-debug", false))
         strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
@@ -292,8 +292,10 @@ std::string HelpMessage(HelpMessageMode mode)
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
+#ifdef ENABLE_WALLET
     strUsage += "  -gen                   " + _("Generate coins (default: 0)") + "\n";
     strUsage += "  -genproclimit=<n>      " + _("Set the processor limit for when generation is on (-1 = unlimited, default: -1)") + "\n";
+#endif
     strUsage += "  -help-debug            " + _("Show all debugging options (usage: --help -help-debug)") + "\n";
     strUsage += "  -logips                " + _("Include IP addresses in debug output (default: 0)") + "\n";
     strUsage += "  -logtimestamps         " + _("Prepend debug output with timestamp (default: 1)") + "\n";

From 6265ecc87f766faad4b950ea0c89e77e0e7e076a Mon Sep 17 00:00:00 2001
From: Zak Wilcox <iwilcox@iwilcox.me.uk>
Date: Sat, 12 Jul 2014 09:21:02 +0100
Subject: [PATCH 0367/1819] Clarify that redeemScript is often optional

---
 src/rpcrawtransaction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 2306b1b8832a..1efe38e830af 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -523,7 +523,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
             "         \"txid\":\"id\",             (string, required) The transaction id\n"
             "         \"vout\":n,                  (numeric, required) The output number\n"
             "         \"scriptPubKey\": \"hex\",   (string, required) script key\n"
-            "         \"redeemScript\": \"hex\"    (string, required) redeem script\n"
+            "         \"redeemScript\": \"hex\"    (string, required for P2SH) redeem script\n"
             "       }\n"
             "       ,...\n"
             "    ]\n"

From 76fd7b8c2677dc145a67e86153d629b43d2a92e5 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 13 Jul 2014 06:27:29 +0200
Subject: [PATCH 0368/1819] [Qt] Fix segfault when launched with -disablewallet

---
 src/qt/bitcoingui.cpp | 11 +++++++----
 src/qt/rpcconsole.cpp | 29 ++++++++++++++++++++++++-----
 src/qt/rpcconsole.h   |  2 ++
 3 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 6b3aa2a2dfec..3ef04d96acc7 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -159,10 +159,13 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     labelEncryptionIcon = new QLabel();
     labelConnectionsIcon = new QLabel();
     labelBlocksIcon = new QLabel();
-    frameBlocksLayout->addStretch();
-    frameBlocksLayout->addWidget(unitDisplayControl);
-    frameBlocksLayout->addStretch();
-    frameBlocksLayout->addWidget(labelEncryptionIcon);
+    if(enableWallet)
+    {
+        frameBlocksLayout->addStretch();
+        frameBlocksLayout->addWidget(unitDisplayControl);
+        frameBlocksLayout->addStretch();
+        frameBlocksLayout->addWidget(labelEncryptionIcon);
+    }
     frameBlocksLayout->addStretch();
     frameBlocksLayout->addWidget(labelConnectionsIcon);
     frameBlocksLayout->addStretch();
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index e1f40ddd0980..9b67f8125f17 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -473,6 +473,10 @@ void RPCConsole::on_tabWidget_currentChanged(int index)
     {
         ui->lineEdit->setFocus();
     }
+    else if(ui->tabWidget->widget(index) == ui->tab_peers)
+    {
+        initPeerTable();
+    }
 }
 
 void RPCConsole::on_openDebugLogfileButton_clicked()
@@ -648,11 +652,27 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats)
         ui->peerBanScore->setText(tr("Fetching..."));
 }
 
+void RPCConsole::initPeerTable()
+{
+    if (!clientModel)
+        return;
+
+    // peerWidget needs a resize in case the dialog has non-default geometry
+    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
+
+    // start PeerTableModel auto refresh
+    clientModel->getPeerTableModel()->startAutoRefresh(1000);
+}
+
 // We override the virtual resizeEvent of the QWidget to adjust tables column
 // sizes as the tables width is proportional to the dialogs width.
 void RPCConsole::resizeEvent(QResizeEvent *event)
 {
     QWidget::resizeEvent(event);
+
+    if (!clientModel)
+        return;
+
     columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
 }
 
@@ -660,17 +680,16 @@ void RPCConsole::showEvent(QShowEvent *event)
 {
     QWidget::showEvent(event);
 
-    // peerWidget needs a resize in case the dialog has non-default geometry
-    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
-
-    // start PeerTableModel auto refresh
-    clientModel->getPeerTableModel()->startAutoRefresh(1000);
+    initPeerTable();
 }
 
 void RPCConsole::hideEvent(QHideEvent *event)
 {
     QWidget::hideEvent(event);
 
+    if (!clientModel)
+        return;
+
     // stop PeerTableModel auto refresh
     clientModel->getPeerTableModel()->stopAutoRefresh();
 }
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 3aeff3eace9b..94672b30cc09 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -47,6 +47,8 @@ class RPCConsole: public QDialog
 private:
     /** show detailed information on ui about selected node */
     void updateNodeDetail(const CNodeCombinedStats *combinedStats);
+    /** initialize peer table */
+    void initPeerTable();
 
     enum ColumnWidths
     {

From e3496da7307f3f8e38a27b861d8b496e10e6215b Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 13 Jul 2014 08:14:29 +0200
Subject: [PATCH 0369/1819] [Qt] Fix No such slot
 UnitDisplayStatusBarControl::onDisplayUnitsClicked

---
 src/qt/bitcoingui.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 6b3aa2a2dfec..80d9fbff02b3 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1012,7 +1012,7 @@ UnitDisplayStatusBarControl::UnitDisplayStatusBarControl():QLabel()
     setToolTip(tr("Unit to show amounts in. Click to select another unit."));
 }
 
-/** So that it responds to left-button clicks */
+/** So that it responds to button clicks */
 void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
 {
     onDisplayUnitsClicked(event->pos());
@@ -1029,10 +1029,6 @@ void UnitDisplayStatusBarControl::createContextMenu()
         menu->addAction(menuAction);
     }
     connect(menu,SIGNAL(triggered(QAction*)),this,SLOT(onMenuSelection(QAction*)));
-
-    // what happens on right click.
-    setContextMenuPolicy(Qt::CustomContextMenu);
-    connect(this,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(onDisplayUnitsClicked(const QPoint&)));
 }
 
 /** Lets the control know about the Options Model (and its signals) */

From 39cc4922fe30a93d10665d913e2e3d51fb94561a Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 13 Jul 2014 09:33:45 +0200
Subject: [PATCH 0370/1819] Fix Watchonly: cs_main lock not held

---
 src/wallet.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 8fdc5f4b20ec..560cbc10b96b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1075,7 +1075,7 @@ int64_t CWallet::GetWatchOnlyBalance() const
 {
     int64_t nTotal = 0;
     {
-        LOCK(cs_wallet);
+        LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
         {
             const CWalletTx* pcoin = &(*it).second;
@@ -1091,7 +1091,7 @@ int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
 {
     int64_t nTotal = 0;
     {
-        LOCK(cs_wallet);
+        LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
         {
             const CWalletTx* pcoin = &(*it).second;
@@ -1106,7 +1106,7 @@ int64_t CWallet::GetImmatureWatchOnlyBalance() const
 {
     int64_t nTotal = 0;
     {
-        LOCK(cs_wallet);
+        LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
         {
             const CWalletTx* pcoin = &(*it).second;

From 4fad8e6d831729efa1965fa2034e7e51d3d0a1be Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Thu, 8 May 2014 00:18:57 -0400
Subject: [PATCH 0371/1819] Reject transactions with excessive numbers of
 sigops

---
 src/main.cpp | 15 ++++++++++++---
 src/main.h   |  2 ++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index a9c080ffaeef..490b7f56feb4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1016,9 +1016,18 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         if (Params().RequireStandard() && !AreInputsStandard(tx, view))
             return error("AcceptToMemoryPool: : nonstandard transaction input");
 
-        // Note: if you modify this code to accept non-standard transactions, then
-        // you should add code here to check that the transaction does a
-        // reasonable number of ECDSA signature verifications.
+        // Check that the transaction doesn't have an excessive number of
+        // sigops, making it impossible to mine. Since the coinbase transaction
+        // itself can contain sigops MAX_TX_SIGOPS is less than
+        // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than
+        // merely non-standard transaction.
+        unsigned int nSigOps = GetLegacySigOpCount(tx);
+        nSigOps += GetP2SHSigOpCount(tx, view);
+        if (nSigOps > MAX_TX_SIGOPS)
+            return state.DoS(0,
+                             error("AcceptToMemoryPool : too many sigops %s, %d > %d",
+                                   hash.ToString(), nSigOps, MAX_TX_SIGOPS),
+                             REJECT_NONSTANDARD, "bad-txns-too-many-sigops");
 
         int64_t nValueOut = tx.GetValueOut();
         int64_t nFees = nValueIn-nValueOut;
diff --git a/src/main.h b/src/main.h
index f6bac889beb9..547e7305eadb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -45,6 +45,8 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 /** Maxiumum number of signature check operations in an IsStandard() P2SH script */
 static const unsigned int MAX_P2SH_SIGOPS = 15;
+/** The maximum number of sigops we're willing to relay/mine in a single tx */
+static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
 /** The maximum number of orphan transactions kept in memory */
 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
 /** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */

From cdf305eeb042eb67c5e53a8b04cf475578b0f8e8 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Sun, 13 Jul 2014 10:41:12 -0700
Subject: [PATCH 0372/1819] Set -discover=0 in regtest framework

The regtest framework is local, so often there is no need to
discover our external IP.  Setting -discover=0 in util.py works
around shutdown hang caused by GetExternalIP waiting in recv().
---
 qa/rpc-tests/util.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 0a7f26ffcd47..9d8e9d6a8c4a 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -85,7 +85,7 @@ def initialize_chain(test_dir):
         # Create cache directories, run bitcoinds:
         for i in range(4):
             datadir=initialize_datadir("cache", i)
-            args = [ "bitcoind", "-keypool=1", "-datadir="+datadir ]
+            args = [ "bitcoind", "-keypool=1", "-datadir="+datadir, "-discover=0" ]
             if i > 0:
                 args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
             bitcoind_processes[i] = subprocess.Popen(args)
@@ -147,7 +147,7 @@ def start_node(i, dir, extra_args=None, rpchost=None):
     Start a bitcoind and return RPC connection to it
     """
     datadir = os.path.join(dir, "node"+str(i))
-    args = [ "bitcoind", "-datadir="+datadir, "-keypool=1" ]
+    args = [ "bitcoind", "-datadir="+datadir, "-keypool=1", "-discover=0" ]
     if extra_args is not None: args.extend(extra_args)
     bitcoind_processes[i] = subprocess.Popen(args)
     devnull = open("/dev/null", "w+")

From 49d57125f953e3e909e5c61d42d66013df8d325e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 14 Jul 2014 10:46:06 +0200
Subject: [PATCH 0373/1819] qt: Ignore showNormalIfMinimized in initialization
 or shutdown

Also get rid of ui_interface flag NOSHOWGUI. It's up to the GUI to
decide this.

Fixes #4360.
---
 src/init.cpp          | 4 ++--
 src/qt/bitcoingui.cpp | 8 +++-----
 src/ui_interface.h    | 2 --
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 9daad6ac89a1..99df237b2a28 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -179,13 +179,13 @@ void HandleSIGHUP(int)
 
 bool static InitError(const std::string &str)
 {
-    uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR | CClientUIInterface::NOSHOWGUI);
+    uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_ERROR);
     return false;
 }
 
 bool static InitWarning(const std::string &str)
 {
-    uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING | CClientUIInterface::NOSHOWGUI);
+    uiInterface.ThreadSafeMessageBox(str, "", CClientUIInterface::MSG_WARNING);
     return true;
 }
 
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 80d9fbff02b3..c878417dd247 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -780,11 +780,7 @@ void BitcoinGUI::message(const QString &title, const QString &message, unsigned
         if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
             buttons = QMessageBox::Ok;
 
-        // Ensure we get users attention, but only if main window is visible
-        // as we don't want to pop up the main window for messages that happen before
-        // initialization is finished.
-        if(!(style & CClientUIInterface::NOSHOWGUI))
-            showNormalIfMinimized();
+        showNormalIfMinimized();
         QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
         int r = mBox.exec();
         if (ret != NULL)
@@ -921,6 +917,8 @@ void BitcoinGUI::setEncryptionStatus(int status)
 
 void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
 {
+    if(!clientModel)
+        return;
     // activateWindow() (sometimes) helps with keyboard focus on Windows
     if (isHidden())
     {
diff --git a/src/ui_interface.h b/src/ui_interface.h
index e9fcd91d41c0..a48ba237d2ca 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -63,8 +63,6 @@ class CClientUIInterface
 
         /** Force blocking, modal message box dialog (not just OS notification) */
         MODAL               = 0x10000000U,
-        /** Don't bring GUI to foreground. Use for messages during initialization */
-        NOSHOWGUI           = 0x20000000U,
 
         /** Predefined combinations for certain default usage cases */
         MSG_INFORMATION = ICON_INFORMATION,

From d512534cd71ebdb67bf0cb2a377dc7c2b06ba438 Mon Sep 17 00:00:00 2001
From: JaSK <temp@temp.temp>
Date: Sat, 12 Jul 2014 17:15:17 +0200
Subject: [PATCH 0374/1819] Fixed error in 'getbalance' when using watchonly
 addresses.

---
 src/wallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 8d27da9d40f0..a754c1cd5f93 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -845,7 +845,7 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
             listSent.push_back(make_pair(address, txout.nValue));
 
         // If we are receiving the output, add it as a "received" entry
-        if (fIsMine)
+        if (fIsMine & filter)
             listReceived.push_back(make_pair(address, txout.nValue));
     }
 

From bdd5b587fc7fd1b4dda479c4aad15c874b22e8f3 Mon Sep 17 00:00:00 2001
From: "Rune K. Svendsen" <runesvend@gmail.com>
Date: Wed, 4 Jun 2014 13:16:07 +0200
Subject: [PATCH 0375/1819] Add option to disable 077 umask (create new files
 with system default umask)

The option is only effective for either wallet-less builds or if
-disablewallet is specified as well.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 34d5fc0 4e1a196 bd4307b d53a33b 7e09b36
Github-Pull: #4286
---
 src/init.cpp | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 99df237b2a28..07960ee37b09 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -224,8 +224,12 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
     strUsage += "  -pid=<file>            " + _("Specify pid file (default: bitcoind.pid)") + "\n";
     strUsage += "  -reindex               " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n";
+#if !defined(WIN32)
+    strUsage += "  -sysperms              " + _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)") + "\n";
+#endif
     strUsage += "  -txindex               " + _("Maintain a full transaction index (default: 0)") + "\n";
 
+
     strUsage += "\n" + _("Connection options:") + "\n";
     strUsage += "  -addnode=<ip>          " + _("Add a node to connect to and attempt to keep the connection open") + "\n";
     strUsage += "  -banscore=<n>          " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n";
@@ -484,7 +488,15 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 #endif
 #ifndef WIN32
-    umask(077);
+
+    if (GetBoolArg("-sysperms", false)) {
+#ifdef ENABLE_WALLET
+        if (!GetBoolArg("-disablewallet", false))
+            return InitError("Error: -sysperms is not allowed in combination with enabled wallet functionality");
+#endif
+    } else {
+        umask(077);
+    }
 
     // Clean shutdown on SIGTERM
     struct sigaction sa;

From bc42503f6ab304608c321986a870795e45f5a016 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 9 Jul 2014 17:25:09 +0200
Subject: [PATCH 0376/1819] Use unordered_map for CCoinsViewCache with salted
 hash

---
 src/coins.cpp   |  8 ++++++--
 src/coins.h     | 15 ++++++++++++++-
 src/uint256.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++
 src/uint256.h   |  4 +++-
 4 files changed, 66 insertions(+), 4 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 13a4ea95cdab..e76d8c7ef2dc 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -4,6 +4,8 @@
 
 #include "coins.h"
 
+#include "random.h"
+
 #include <assert.h>
 
 // calculate number of bytes for the bitmask, and its number of non-zero bytes
@@ -69,6 +71,8 @@ void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
 bool CCoinsViewBacked::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
 bool CCoinsViewBacked::GetStats(CCoinsStats &stats) { return base->GetStats(stats); }
 
+CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
+
 CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hashBlock(0) { }
 
 bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) {
@@ -84,8 +88,8 @@ bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) {
 }
 
 CCoinsMap::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
-    CCoinsMap::iterator it = cacheCoins.lower_bound(txid);
-    if (it != cacheCoins.end() && it->first == txid)
+    CCoinsMap::iterator it = cacheCoins.find(txid);
+    if (it != cacheCoins.end())
         return it;
     CCoins tmp;
     if (!base->GetCoins(txid,tmp))
diff --git a/src/coins.h b/src/coins.h
index c57a5ec722a9..9f90fe6bd03f 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -13,6 +13,7 @@
 #include <stdint.h>
 
 #include <boost/foreach.hpp>
+#include <boost/unordered_map.hpp>
 
 /** pruned version of CTransaction: only retains metadata and unspent transaction outputs
  *
@@ -239,7 +240,19 @@ class CCoins
     }
 };
 
-typedef std::map<uint256,CCoins> CCoinsMap;
+class CCoinsKeyHasher
+{
+private:
+    uint256 salt;
+
+public:
+    CCoinsKeyHasher();
+    uint64_t operator()(const uint256& key) const {
+        return key.GetHash(salt);
+    }
+};
+
+typedef boost::unordered_map<uint256, CCoins, CCoinsKeyHasher> CCoinsMap;
 
 struct CCoinsStats
 {
diff --git a/src/uint256.cpp b/src/uint256.cpp
index 3392f1e9bcc0..08c05594fd97 100644
--- a/src/uint256.cpp
+++ b/src/uint256.cpp
@@ -290,3 +290,46 @@ uint32_t uint256::GetCompact(bool fNegative) const
     nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0);
     return nCompact;
 }
+
+static void inline HashMix(uint32_t& a, uint32_t& b, uint32_t& c)
+{
+    // Taken from lookup3, by Bob Jenkins.
+    a -= c; a ^= ((c <<  4) | (c >> 28)); c += b;
+    b -= a; b ^= ((a <<  6) | (a >> 26)); a += c;
+    c -= b; c ^= ((b <<  8) | (b >> 24)); b += a;
+    a -= c; a ^= ((c << 16) | (c >> 16)); c += b;
+    b -= a; b ^= ((a << 19) | (a >> 13)); a += c;
+    c -= b; c ^= ((b <<  4) | (b >> 28)); b += a;
+}
+
+static void inline HashFinal(uint32_t& a, uint32_t& b, uint32_t& c)
+{
+    // Taken from lookup3, by Bob Jenkins.
+    c ^= b; c -= ((b << 14) | (b >> 18));
+    a ^= c; a -= ((c << 11) | (c >> 21));
+    b ^= a; b -= ((a << 25) | (a >>  7));
+    c ^= b; c -= ((b << 16) | (b >> 16));
+    a ^= c; a -= ((c <<  4) | (c >> 28));
+    b ^= a; b -= ((a << 14) | (a >> 18));
+    c ^= b; c -= ((b << 24) | (b >>  8));
+}
+
+uint64_t uint256::GetHash(const uint256 &salt) const
+{
+    uint32_t a, b, c;
+    a = b = c = 0xdeadbeef + (WIDTH << 2);
+
+    a += pn[0] ^ salt.pn[0];
+    b += pn[1] ^ salt.pn[1];
+    c += pn[2] ^ salt.pn[2];
+    HashMix(a, b, c);
+    a += pn[3] ^ salt.pn[3];
+    b += pn[4] ^ salt.pn[4];
+    c += pn[5] ^ salt.pn[5];
+    HashMix(a, b, c);
+    a += pn[6] ^ salt.pn[6];
+    b += pn[7] ^ salt.pn[7];
+    HashFinal(a, b, c);
+
+    return ((((uint64_t)b) << 32) | c);
+}
diff --git a/src/uint256.h b/src/uint256.h
index 82db7758c936..ad0a56f447d1 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -21,7 +21,7 @@ class uint_error : public std::runtime_error {
 template<unsigned int BITS>
 class base_uint
 {
-private:
+protected:
     enum { WIDTH=BITS/32 };
     uint32_t pn[WIDTH];
 public:
@@ -322,6 +322,8 @@ class uint256 : public base_uint<256> {
     // implementation accident.
     uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL);
     uint32_t GetCompact(bool fNegative = false) const;
+
+    uint64_t GetHash(const uint256& salt) const;
 };
 
 #endif

From 43005cffa394afde08a80b28ac52f7821c96d841 Mon Sep 17 00:00:00 2001
From: kazcw <keziahw@gmail.com>
Date: Mon, 14 Jul 2014 18:24:21 -0700
Subject: [PATCH 0377/1819] Fix semantic typo in state.CorruptionPossible check

state.Invalid() is always false, check should be IsInvalid()

Broken since 942b33a
---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4f6b442f3a3c..830bcb5489c7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2517,7 +2517,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
         return false;
 
     if (!CheckBlock(block, state)) {
-        if (state.Invalid() && !state.CorruptionPossible()) {
+        if (state.IsInvalid() && !state.CorruptionPossible()) {
             pindex->nStatus |= BLOCK_FAILED_VALID;
         }
         return false;

From ebdcc360b65816f7ad7cdedce6a1114d5e014b7b Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Tue, 15 Jul 2014 02:11:55 +0200
Subject: [PATCH 0378/1819] Add helptexts for -whitelist and rpc
 prioritisetransaction and switch to bitcoin instead of satoshis

---
 src/init.cpp      |  1 +
 src/rpcclient.cpp |  2 ++
 src/rpcmining.cpp | 23 +++++++++++++++++++++--
 3 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 07960ee37b09..ca30abac90ea 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -259,6 +259,7 @@ std::string HelpMessage(HelpMessageMode mode)
 #endif
     strUsage += "  -whitebind=<addr>      " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n";
     strUsage += "  -whitelist=<netmask>   " + _("Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.") + "\n";
+    strUsage += "                         " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway") + "\n";
 
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 5edeecf93309..a0921453cc3c 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -85,6 +85,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "getrawmempool", 0 },
     { "estimatefee", 0 },
     { "estimatepriority", 0 },
+    { "prioritisetransaction", 1 },
+    { "prioritisetransaction", 2 },
 };
 
 class CRPCConvertTable
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 6f72ea740403..cbb4ab2f8bbb 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -252,11 +252,30 @@ Value prioritisetransaction(const Array& params, bool fHelp)
     if (fHelp || params.size() != 3)
         throw runtime_error(
             "prioritisetransaction <txid> <priority delta> <fee delta>\n"
-            "Accepts the transaction into mined blocks at a higher (or lower) priority");
+            "Accepts the transaction into mined blocks at a higher (or lower) priority\n"
+            "\nArguments:\n"
+            "1. \"txid\"       (string, required) The transaction id.\n"
+            "2. priority delta (numeric, required) The priority to add or subtract.\n"
+            "                  The transaction selection algorithm considers the tx as it would have a higher priority.\n"
+            "                  (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n"
+            "3. fee delta      (numeric, required) The absolute fee value to add or subtract in bitcoin.\n"
+            "                  The fee is not actually paid, only the algorithm for selecting transactions into a block\n"
+            "                  considers the transaction as it would have paid a higher (or lower) fee.\n"
+            "\nResult\n"
+            "true              (boolean) Returns true\n"
+            "\nExamples:\n"
+            + HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 0.00010000")
+            + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 0.00010000")
+        );
 
     uint256 hash;
     hash.SetHex(params[0].get_str());
-    mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), params[2].get_int64());
+
+    int64_t nAmount = 0;
+    if (params[2].get_real() != 0.0)
+        nAmount = AmountFromValue(params[2]);
+
+    mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), nAmount);
     return true;
 }
 

From 96ff9d64037bba25c080b4f26e64e7f01c6f34f1 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 15 Jul 2014 10:22:27 +0200
Subject: [PATCH 0379/1819] Can't log to debug log before chain params
 initialized

Add a function `AreBaseParamsConfigured` and use this to check
before writing to the debug log. This avoids assertions when the
application happens to log too early, which happens in the GUI.

Messages logged before the base parameters are configured can be
shown using `-printtoconsole`.
---
 src/chainparamsbase.cpp | 4 ++++
 src/chainparamsbase.h   | 6 ++++++
 src/util.cpp            | 2 +-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 19a9e72cc965..720e24c4a8b2 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -91,3 +91,7 @@ bool SelectBaseParamsFromCommandLine() {
     }
     return true;
 }
+
+bool AreBaseParamsConfigured() {
+    return pCurrentBaseParams != NULL;
+}
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 4a3b26890946..4398f6954805 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -49,4 +49,10 @@ void SelectBaseParams(CBaseChainParams::Network network);
  */
 bool SelectBaseParamsFromCommandLine();
 
+/**
+ * Return true if SelectBaseParamsFromCommandLine() has been called to select
+ * a network.
+ */
+bool AreBaseParamsConfigured();
+
 #endif
diff --git a/src/util.cpp b/src/util.cpp
index ce31619ecabc..d3fa5182f37a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -205,7 +205,7 @@ int LogPrintStr(const std::string &str)
         // print to console
         ret = fwrite(str.data(), 1, str.size(), stdout);
     }
-    else if (fPrintToDebugLog)
+    else if (fPrintToDebugLog && AreBaseParamsConfigured())
     {
         static bool fStartedNewLine = true;
         boost::call_once(&DebugPrintInit, debugPrintInitFlag);

From c715ff52c75398a3a65975f1d1b23834bd8426ee Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 15 Jul 2014 10:23:28 +0200
Subject: [PATCH 0380/1819] ui: Replace some LogPrintfs with qDebug()

These are relatively unimportant messages, so don't need to be logged
without -debug=ui.
---
 src/qt/bitcoin.cpp | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 7c4af25edfe8..6b1e50922e90 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -34,6 +34,7 @@
 
 #include <boost/filesystem/operations.hpp>
 #include <QApplication>
+#include <QDebug>
 #include <QLibraryInfo>
 #include <QLocale>
 #include <QMessageBox>
@@ -237,7 +238,7 @@ void BitcoinCore::initialize()
 {
     try
     {
-        LogPrintf("Running AppInit2 in thread\n");
+        qDebug() << __func__ << ": Running AppInit2 in thread";
         int rv = AppInit2(threadGroup);
         if(rv)
         {
@@ -258,11 +259,11 @@ void BitcoinCore::shutdown()
 {
     try
     {
-        LogPrintf("Running Shutdown in thread\n");
+        qDebug() << __func__ << ": Running Shutdown in thread";
         threadGroup.interrupt_all();
         threadGroup.join_all();
         Shutdown();
-        LogPrintf("Shutdown finished\n");
+        qDebug() << __func__ << ": Shutdown finished";
         emit shutdownResult(1);
     } catch (std::exception& e) {
         handleRunawayException(&e);
@@ -290,10 +291,10 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
 
 BitcoinApplication::~BitcoinApplication()
 {
-    LogPrintf("Stopping thread\n");
+    qDebug() << __func__ << ": Stopping thread";
     emit stopThread();
     coreThread->wait();
-    LogPrintf("Stopped thread\n");
+    qDebug() << __func__ << ": Stopped thread";
 
     delete window;
     window = 0;
@@ -355,13 +356,13 @@ void BitcoinApplication::startThread()
 
 void BitcoinApplication::requestInitialize()
 {
-    LogPrintf("Requesting initialize\n");
+    qDebug() << __func__ << ": Requesting initialize";
     emit requestedInitialize();
 }
 
 void BitcoinApplication::requestShutdown()
 {
-    LogPrintf("Requesting shutdown\n");
+    qDebug() << __func__ << ": Requesting shutdown";
     window->hide();
     window->setClientModel(0);
     pollShutdownTimer->stop();
@@ -383,7 +384,7 @@ void BitcoinApplication::requestShutdown()
 
 void BitcoinApplication::initializeResult(int retval)
 {
-    LogPrintf("Initialization result: %i\n", retval);
+    qDebug() << __func__ << ": Initialization result: " << retval;
     // Set exit result: 0 if successful, 1 if failure
     returnValue = retval ? 0 : 1;
     if(retval)
@@ -438,7 +439,7 @@ void BitcoinApplication::initializeResult(int retval)
 
 void BitcoinApplication::shutdownResult(int retval)
 {
-    LogPrintf("Shutdown result: %i\n", retval);
+    qDebug() << __func__ << ": Shutdown result: " << retval;
     quit(); // Exit main loop after shutdown finished
 }
 

From 1b4568cb0f00dd7a24575fe54c017e743c4e7d35 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Fri, 30 May 2014 00:54:00 +0200
Subject: [PATCH 0381/1819] Add vout to ListTransactions output

---
 src/rpcwallet.cpp | 57 ++++++++++++++++++++++++++---------------------
 src/wallet.cpp    | 32 +++++++++++++-------------
 src/wallet.h      | 10 +++++++--
 3 files changed, 56 insertions(+), 43 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index e8c62fd37b76..631f72d1a102 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -641,16 +641,16 @@ Value getbalance(const Array& params, bool fHelp)
 
             int64_t allFee;
             string strSentAccount;
-            list<pair<CTxDestination, int64_t> > listReceived;
-            list<pair<CTxDestination, int64_t> > listSent;
+            list<COutputEntry> listReceived;
+            list<COutputEntry> listSent;
             wtx.GetAmounts(listReceived, listSent, allFee, strSentAccount, filter);
             if (wtx.GetDepthInMainChain() >= nMinDepth)
             {
-                BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived)
-                    nBalance += r.second;
+                BOOST_FOREACH(const COutputEntry& r, listReceived)
+                    nBalance += r.amount;
             }
-            BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listSent)
-                nBalance -= r.second;
+            BOOST_FOREACH(const COutputEntry& s, listSent)
+                nBalance -= s.amount;
             nBalance -= allFee;
         }
         return  ValueFromAmount(nBalance);
@@ -1133,8 +1133,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
 {
     int64_t nFee;
     string strSentAccount;
-    list<pair<CTxDestination, int64_t> > listReceived;
-    list<pair<CTxDestination, int64_t> > listSent;
+    list<COutputEntry> listReceived;
+    list<COutputEntry> listSent;
 
     wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, filter);
 
@@ -1144,15 +1144,16 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
     // Sent
     if ((!listSent.empty() || nFee != 0) && (fAllAccounts || strAccount == strSentAccount))
     {
-        BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent)
+        BOOST_FOREACH(const COutputEntry& s, listSent)
         {
             Object entry;
-            if(involvesWatchonly || (::IsMine(*pwalletMain, s.first) & ISMINE_WATCH_ONLY))
+            if(involvesWatchonly || (::IsMine(*pwalletMain, s.destination) & ISMINE_WATCH_ONLY))
                 entry.push_back(Pair("involvesWatchonly", true));
             entry.push_back(Pair("account", strSentAccount));
-            MaybePushAddress(entry, s.first);
+            MaybePushAddress(entry, s.destination);
             entry.push_back(Pair("category", "send"));
-            entry.push_back(Pair("amount", ValueFromAmount(-s.second)));
+            entry.push_back(Pair("amount", ValueFromAmount(-s.amount)));
+            entry.push_back(Pair("vout", s.vout));
             entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
             if (fLong)
                 WalletTxToJSON(wtx, entry);
@@ -1163,18 +1164,18 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
     // Received
     if (listReceived.size() > 0 && wtx.GetDepthInMainChain() >= nMinDepth)
     {
-        BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived)
+        BOOST_FOREACH(const COutputEntry& r, listReceived)
         {
             string account;
-            if (pwalletMain->mapAddressBook.count(r.first))
-                account = pwalletMain->mapAddressBook[r.first].name;
+            if (pwalletMain->mapAddressBook.count(r.destination))
+                account = pwalletMain->mapAddressBook[r.destination].name;
             if (fAllAccounts || (account == strAccount))
             {
                 Object entry;
-                if(involvesWatchonly || (::IsMine(*pwalletMain, r.first) & ISMINE_WATCH_ONLY))
+                if(involvesWatchonly || (::IsMine(*pwalletMain, r.destination) & ISMINE_WATCH_ONLY))
                     entry.push_back(Pair("involvesWatchonly", true));
                 entry.push_back(Pair("account", account));
-                MaybePushAddress(entry, r.first);
+                MaybePushAddress(entry, r.destination);
                 if (wtx.IsCoinBase())
                 {
                     if (wtx.GetDepthInMainChain() < 1)
@@ -1188,7 +1189,8 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
                 {
                     entry.push_back(Pair("category", "receive"));
                 }
-                entry.push_back(Pair("amount", ValueFromAmount(r.second)));
+                entry.push_back(Pair("amount", ValueFromAmount(r.amount)));
+                entry.push_back(Pair("vout", r.vout));
                 if (fLong)
                     WalletTxToJSON(wtx, entry);
                 ret.push_back(entry);
@@ -1240,6 +1242,7 @@ Value listtransactions(const Array& params, bool fHelp)
             "    \"amount\": x.xxx,          (numeric) The amount in btc. This is negative for the 'send' category, and for the\n"
             "                                         'move' category for moves outbound. It is positive for the 'receive' category,\n"
             "                                         and for the 'move' category for inbound funds.\n"
+            "    \"vout\" : n,               (numeric) the vout value\n"
             "    \"fee\": x.xxx,             (numeric) The amount of the fee in btc. This is negative and only available for the \n"
             "                                         'send' category of transactions.\n"
             "    \"confirmations\": n,       (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
@@ -1375,22 +1378,22 @@ Value listaccounts(const Array& params, bool fHelp)
         const CWalletTx& wtx = (*it).second;
         int64_t nFee;
         string strSentAccount;
-        list<pair<CTxDestination, int64_t> > listReceived;
-        list<pair<CTxDestination, int64_t> > listSent;
+        list<COutputEntry> listReceived;
+        list<COutputEntry> listSent;
         int nDepth = wtx.GetDepthInMainChain();
         if (wtx.GetBlocksToMaturity() > 0 || nDepth < 0)
             continue;
         wtx.GetAmounts(listReceived, listSent, nFee, strSentAccount, includeWatchonly);
         mapAccountBalances[strSentAccount] -= nFee;
-        BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& s, listSent)
-            mapAccountBalances[strSentAccount] -= s.second;
+        BOOST_FOREACH(const COutputEntry& s, listSent)
+            mapAccountBalances[strSentAccount] -= s.amount;
         if (nDepth >= nMinDepth)
         {
-            BOOST_FOREACH(const PAIRTYPE(CTxDestination, int64_t)& r, listReceived)
-                if (pwalletMain->mapAddressBook.count(r.first))
-                    mapAccountBalances[pwalletMain->mapAddressBook[r.first].name] += r.second;
+            BOOST_FOREACH(const COutputEntry& r, listReceived)
+                if (pwalletMain->mapAddressBook.count(r.destination))
+                    mapAccountBalances[pwalletMain->mapAddressBook[r.destination].name] += r.amount;
                 else
-                    mapAccountBalances[""] += r.second;
+                    mapAccountBalances[""] += r.amount;
         }
     }
 
@@ -1424,6 +1427,7 @@ Value listsinceblock(const Array& params, bool fHelp)
             "    \"category\":\"send|receive\",     (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
             "    \"amount\": x.xxx,          (numeric) The amount in btc. This is negative for the 'send' category, and for the 'move' category for moves \n"
             "                                          outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
+            "    \"vout\" : n,               (numeric) the vout value\n"
             "    \"fee\": x.xxx,             (numeric) The amount of the fee in btc. This is negative and only available for the 'send' category of transactions.\n"
             "    \"confirmations\": n,       (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
             "    \"blockhash\": \"hashvalue\",     (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
@@ -1528,6 +1532,7 @@ Value gettransaction(const Array& params, bool fHelp)
             "      \"address\" : \"bitcoinaddress\",   (string) The bitcoin address involved in the transaction\n"
             "      \"category\" : \"send|receive\",    (string) The category, either 'send' or 'receive'\n"
             "      \"amount\" : x.xxx                  (numeric) The amount in btc\n"
+            "      \"vout\" : n,                       (numeric) the vout value\n"
             "    }\n"
             "    ,...\n"
             "  ],\n"
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a754c1cd5f93..89a260480e2b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -798,8 +798,8 @@ int CWalletTx::GetRequestCount() const
     return nRequests;
 }
 
-void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
-                           list<pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, string& strSentAccount, const isminefilter& filter) const
+void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
+                           list<COutputEntry>& listSent, int64_t& nFee, string& strSentAccount, const isminefilter& filter) const
 {
     nFee = 0;
     listReceived.clear();
@@ -815,10 +815,10 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
     }
 
     // Sent/received.
-    BOOST_FOREACH(const CTxOut& txout, vout)
+    for (int i = 0; i < vout.size(); ++i)
     {
+        const CTxOut& txout = vout[i];
         isminetype fIsMine = pwallet->IsMine(txout);
-
         // Only need to handle txouts if AT LEAST one of these is true:
         //   1) they debit from us (sent)
         //   2) the output is to us (received)
@@ -840,13 +840,15 @@ void CWalletTx::GetAmounts(list<pair<CTxDestination, int64_t> >& listReceived,
             address = CNoDestination();
         }
 
+        COutputEntry output = {address, txout.nValue, i};
+
         // If we are debited by the transaction, add the output as a "sent" entry
         if (nDebit > 0)
-            listSent.push_back(make_pair(address, txout.nValue));
+            listSent.push_back(output);
 
         // If we are receiving the output, add it as a "received" entry
         if (fIsMine & filter)
-            listReceived.push_back(make_pair(address, txout.nValue));
+            listReceived.push_back(output);
     }
 
 }
@@ -858,29 +860,29 @@ void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nReceived,
 
     int64_t allFee;
     string strSentAccount;
-    list<pair<CTxDestination, int64_t> > listReceived;
-    list<pair<CTxDestination, int64_t> > listSent;
+    list<COutputEntry> listReceived;
+    list<COutputEntry> listSent;
     GetAmounts(listReceived, listSent, allFee, strSentAccount, filter);
 
     if (strAccount == strSentAccount)
     {
-        BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& s, listSent)
-            nSent += s.second;
+        BOOST_FOREACH(const COutputEntry& s, listSent)
+            nSent += s.amount;
         nFee = allFee;
     }
     {
         LOCK(pwallet->cs_wallet);
-        BOOST_FOREACH(const PAIRTYPE(CTxDestination,int64_t)& r, listReceived)
+        BOOST_FOREACH(const COutputEntry& r, listReceived)
         {
-            if (pwallet->mapAddressBook.count(r.first))
+            if (pwallet->mapAddressBook.count(r.destination))
             {
-                map<CTxDestination, CAddressBookData>::const_iterator mi = pwallet->mapAddressBook.find(r.first);
+                map<CTxDestination, CAddressBookData>::const_iterator mi = pwallet->mapAddressBook.find(r.destination);
                 if (mi != pwallet->mapAddressBook.end() && (*mi).second.name == strAccount)
-                    nReceived += r.second;
+                    nReceived += r.amount;
             }
             else if (strAccount.empty())
             {
-                nReceived += r.second;
+                nReceived += r.amount;
             }
         }
     }
diff --git a/src/wallet.h b/src/wallet.h
index ab9550a98455..eaf9e9630923 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -467,6 +467,12 @@ static void WriteOrderPos(const int64_t& nOrderPos, mapValue_t& mapValue)
     mapValue["n"] = i64tostr(nOrderPos);
 }
 
+struct COutputEntry
+{
+    CTxDestination destination;
+    int64_t amount;
+    int vout;
+};
 
 /** A transaction with a bunch of additional info that only the owner cares about.
  * It includes any unrecorded transactions needed to link it back to the block chain.
@@ -761,8 +767,8 @@ class CWalletTx : public CMerkleTx
         return nChangeCached;
     }
 
-    void GetAmounts(std::list<std::pair<CTxDestination, int64_t> >& listReceived,
-                    std::list<std::pair<CTxDestination, int64_t> >& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter) const;
+    void GetAmounts(std::list<COutputEntry>& listReceived,
+                    std::list<COutputEntry>& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter) const;
 
     void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
                            int64_t& nSent, int64_t& nFee, const isminefilter& filter) const;

From c4a321f5c6f266bdf99d7f3557210994b5c75f96 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Tue, 15 Jul 2014 07:13:10 -0700
Subject: [PATCH 0382/1819] Add peerid to getpeerinfo to allow correlation with
 the logs.

This seems to have been missed in 3764.
---
 src/rpcnet.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 680717930b11..bd3609b0c9ba 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -79,6 +79,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "\nbResult:\n"
             "[\n"
             "  {\n"
+            "    \"id\": n,                   (numeric) Peer index\n"
             "    \"addr\":\"host:port\",      (string) The ip address and port of the peer\n"
             "    \"addrlocal\":\"ip:port\",   (string) local address\n"
             "    \"services\":\"xxxxxxxxxxxxxxxx\",   (string) The services offered\n"
@@ -113,6 +114,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
         Object obj;
         CNodeStateStats statestats;
         bool fStateStats = GetNodeStateStats(stats.nodeid, statestats);
+        obj.push_back(Pair("id", stats.nodeid));
         obj.push_back(Pair("addr", stats.addrName));
         if (!(stats.addrLocal.empty()))
             obj.push_back(Pair("addrlocal", stats.addrLocal));

From 33357b27a0f6e344e760caf87e96b577b4c25ad7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 15 Jul 2014 16:26:16 +0200
Subject: [PATCH 0383/1819] qt: Start core thread only when needed

Start the core thread only when needed for initialization
or shutdown.

Avoids a bit of overhead, and also avoids spamming two
log messages before logging is properly initialized.
---
 src/qt/bitcoin.cpp | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6b1e50922e90..43466663fa97 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -286,15 +286,17 @@ BitcoinApplication::BitcoinApplication(int &argc, char **argv):
     returnValue(0)
 {
     setQuitOnLastWindowClosed(false);
-    startThread();
 }
 
 BitcoinApplication::~BitcoinApplication()
 {
-    qDebug() << __func__ << ": Stopping thread";
-    emit stopThread();
-    coreThread->wait();
-    qDebug() << __func__ << ": Stopped thread";
+    if(coreThread)
+    {
+        qDebug() << __func__ << ": Stopping thread";
+        emit stopThread();
+        coreThread->wait();
+        qDebug() << __func__ << ": Stopped thread";
+    }
 
     delete window;
     window = 0;
@@ -337,6 +339,8 @@ void BitcoinApplication::createSplashScreen(bool isaTestNet)
 
 void BitcoinApplication::startThread()
 {
+    if(coreThread)
+        return;
     coreThread = new QThread(this);
     BitcoinCore *executor = new BitcoinCore();
     executor->moveToThread(coreThread);
@@ -357,12 +361,14 @@ void BitcoinApplication::startThread()
 void BitcoinApplication::requestInitialize()
 {
     qDebug() << __func__ << ": Requesting initialize";
+    startThread();
     emit requestedInitialize();
 }
 
 void BitcoinApplication::requestShutdown()
 {
     qDebug() << __func__ << ": Requesting shutdown";
+    startThread();
     window->hide();
     window->setClientModel(0);
     pollShutdownTimer->stop();

From 125fba1b482997f13b5eec6b24d634adda4f91e7 Mon Sep 17 00:00:00 2001
From: Trevin Hofmann <trevinhofmann@gmail.com>
Date: Tue, 15 Jul 2014 19:13:24 -0500
Subject: [PATCH 0384/1819] Add a new checkpoint at block 295,000

Block 295,000 seems to meet the criteria of a reasonable timestamp and
no strange transactions. 295,000 is the current block height in the
bootstrap.dat torrent provided by jgarzik.
---
 src/checkpoints.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 80479b47fbcc..3bf08435475b 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -51,11 +51,12 @@ namespace Checkpoints {
         (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
         (250000, uint256("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"))
         (279000, uint256("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"))
+        (295000, uint256("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))
         ;
     static const CCheckpointData data = {
         &mapCheckpoints,
-        1389047471, // * UNIX timestamp of last checkpoint block
-        30549816,   // * total number of transactions between genesis and last checkpoint
+        1397080064, // * UNIX timestamp of last checkpoint block
+        36544669,   // * total number of transactions between genesis and last checkpoint
                     //   (the tx=... number in the SetBestChain debug.log lines)
         60000.0     // * estimated number of transactions per day after checkpoint
     };

From 604ee2aa7d110439b4e59ecaa272b85ec41ab6a0 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Thu, 3 Jul 2014 15:28:38 +0700
Subject: [PATCH 0385/1819] Remove tx from AlreadyAskedFor list once we receive
 it, not when we process it.

---
 src/main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 442feea47182..0cbf3b07ff04 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3894,15 +3894,16 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         bool fMissingInputs = false;
         CValidationState state;
+
+        mapAlreadyAskedFor.erase(inv);
+
         if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
         {
             mempool.check(pcoinsTip);
             RelayTransaction(tx);
-            mapAlreadyAskedFor.erase(inv);
             vWorkQueue.push_back(inv.hash);
             vEraseQueue.push_back(inv.hash);
 
-
             LogPrint("mempool", "AcceptToMemoryPool: peer=%d %s : accepted %s (poolsz %u)\n",
                 pfrom->id, pfrom->cleanSubVer,
                 tx.GetHash().ToString(),
@@ -3928,7 +3929,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                     {
                         LogPrint("mempool", "   accepted orphan tx %s\n", orphanHash.ToString());
                         RelayTransaction(orphanTx);
-                        mapAlreadyAskedFor.erase(CInv(MSG_TX, orphanHash));
                         vWorkQueue.push_back(orphanHash);
                         vEraseQueue.push_back(orphanHash);
                     }

From b069750d3f27c96a83700a08a2bb819902268857 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 10 Jul 2014 20:16:58 +0200
Subject: [PATCH 0386/1819] Break up CAddrMan's IMPLEMENT_SERIALIZE

---
 src/addrman.h   | 260 ++++++++++++++++++++++++------------------------
 src/serialize.h |  29 ++++++
 2 files changed, 160 insertions(+), 129 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index a0dc134c4069..052d364655fe 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -245,140 +245,142 @@ class CAddrMan
     void Connected_(const CService &addr, int64_t nTime);
 
 public:
+    // serialized format:
+    // * version byte (currently 0)
+    // * nKey
+    // * nNew
+    // * nTried
+    // * number of "new" buckets
+    // * all nNew addrinfos in vvNew
+    // * all nTried addrinfos in vvTried
+    // * for each bucket:
+    //   * number of elements
+    //   * for each element: index
+    //
+    // Notice that vvTried, mapAddr and vVector are never encoded explicitly;
+    // they are instead reconstructed from the other information.
+    //
+    // vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change,
+    // otherwise it is reconstructed as well.
+    //
+    // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
+    // changes to the ADDRMAN_ parameters without breaking the on-disk structure.
+    //
+    // We don't use IMPLEMENT_SERIALIZE since the serialization and deserialization code has
+    // very little in common.
+    template<typename Stream>
+    void Serialize(Stream &s, int nType, int nVersionDummy) const
+    {
+        LOCK(cs);
+
+        unsigned char nVersion = 0;
+        s << nVersion;
+        s << nKey;
+        s << nNew;
+        s << nTried;
+
+        int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT;
+        s << nUBuckets;
+        std::map<int, int> mapUnkIds;
+        int nIds = 0;
+        for (std::map<int, CAddrInfo>::const_iterator it = mapInfo.begin(); it != mapInfo.end(); it++) {
+            if (nIds == nNew) break; // this means nNew was wrong, oh ow
+            mapUnkIds[(*it).first] = nIds;
+            const CAddrInfo &info = (*it).second;
+            if (info.nRefCount) {
+                s << info;
+                nIds++;
+            }
+        }
+        nIds = 0;
+        for (std::map<int, CAddrInfo>::const_iterator it = mapInfo.begin(); it != mapInfo.end(); it++) {
+            if (nIds == nTried) break; // this means nTried was wrong, oh ow
+            const CAddrInfo &info = (*it).second;
+            if (info.fInTried) {
+                s << info;
+                nIds++;
+            }
+        }
+        for (std::vector<std::set<int> >::const_iterator it = vvNew.begin(); it != vvNew.end(); it++) {
+            const std::set<int> &vNew = (*it);
+            int nSize = vNew.size();
+            s << nSize;
+            for (std::set<int>::const_iterator it2 = vNew.begin(); it2 != vNew.end(); it2++) {
+                int nIndex = mapUnkIds[*it2];
+                s << nIndex;
+            }
+        }
+    }
 
-    IMPLEMENT_SERIALIZE
-    (({
-        // serialized format:
-        // * version byte (currently 0)
-        // * nKey
-        // * nNew
-        // * nTried
-        // * number of "new" buckets
-        // * all nNew addrinfos in vvNew
-        // * all nTried addrinfos in vvTried
-        // * for each bucket:
-        //   * number of elements
-        //   * for each element: index
-        //
-        // Notice that vvTried, mapAddr and vVector are never encoded explicitly;
-        // they are instead reconstructed from the other information.
-        //
-        // vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change,
-        // otherwise it is reconstructed as well.
-        //
-        // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
-        // changes to the ADDRMAN_ parameters without breaking the on-disk structure.
-        {
-            LOCK(cs);
-            unsigned char nVersion = 0;
-            READWRITE(nVersion);
-            READWRITE(nKey);
-            READWRITE(nNew);
-            READWRITE(nTried);
-
-            CAddrMan *am = const_cast<CAddrMan*>(this);
-            if (fWrite)
-            {
-                int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT;
-                READWRITE(nUBuckets);
-                std::map<int, int> mapUnkIds;
-                int nIds = 0;
-                for (std::map<int, CAddrInfo>::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++)
-                {
-                    if (nIds == nNew) break; // this means nNew was wrong, oh ow
-                    mapUnkIds[(*it).first] = nIds;
-                    CAddrInfo &info = (*it).second;
-                    if (info.nRefCount)
-                    {
-                        READWRITE(info);
-                        nIds++;
-                    }
-                }
-                nIds = 0;
-                for (std::map<int, CAddrInfo>::iterator it = am->mapInfo.begin(); it != am->mapInfo.end(); it++)
-                {
-                    if (nIds == nTried) break; // this means nTried was wrong, oh ow
-                    CAddrInfo &info = (*it).second;
-                    if (info.fInTried)
-                    {
-                        READWRITE(info);
-                        nIds++;
-                    }
-                }
-                for (std::vector<std::set<int> >::iterator it = am->vvNew.begin(); it != am->vvNew.end(); it++)
-                {
-                    const std::set<int> &vNew = (*it);
-                    int nSize = vNew.size();
-                    READWRITE(nSize);
-                    for (std::set<int>::iterator it2 = vNew.begin(); it2 != vNew.end(); it2++)
-                    {
-                        int nIndex = mapUnkIds[*it2];
-                        READWRITE(nIndex);
-                    }
-                }
+    template<typename Stream>
+    void Unserialize(Stream& s, int nType, int nVersionDummy)
+    {
+        LOCK(cs);
+
+        unsigned char nVersion;
+        s >> nVersion;
+        s >> nKey;
+        s >> nNew;
+        s >> nTried;
+
+        int nUBuckets = 0;
+        s >> nUBuckets;
+        nIdCount = 0;
+        mapInfo.clear();
+        mapAddr.clear();
+        vRandom.clear();
+        vvTried = std::vector<std::vector<int> >(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0));
+        vvNew = std::vector<std::set<int> >(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>());
+        for (int n = 0; n < nNew; n++) {
+            CAddrInfo &info = mapInfo[n];
+            s >> info;
+            mapAddr[info] = n;
+            info.nRandomPos = vRandom.size();
+            vRandom.push_back(n);
+            if (nUBuckets != ADDRMAN_NEW_BUCKET_COUNT) {
+                vvNew[info.GetNewBucket(nKey)].insert(n);
+                info.nRefCount++;
+            }
+        }
+        nIdCount = nNew;
+        int nLost = 0;
+        for (int n = 0; n < nTried; n++) {
+            CAddrInfo info;
+            s >> info;
+            std::vector<int> &vTried = vvTried[info.GetTriedBucket(nKey)];
+            if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) {
+                info.nRandomPos = vRandom.size();
+                info.fInTried = true;
+                vRandom.push_back(nIdCount);
+                mapInfo[nIdCount] = info;
+                mapAddr[info] = nIdCount;
+                vTried.push_back(nIdCount);
+                nIdCount++;
             } else {
-                int nUBuckets = 0;
-                READWRITE(nUBuckets);
-                am->nIdCount = 0;
-                am->mapInfo.clear();
-                am->mapAddr.clear();
-                am->vRandom.clear();
-                am->vvTried = std::vector<std::vector<int> >(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0));
-                am->vvNew = std::vector<std::set<int> >(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>());
-                for (int n = 0; n < am->nNew; n++)
-                {
-                    CAddrInfo &info = am->mapInfo[n];
-                    READWRITE(info);
-                    am->mapAddr[info] = n;
-                    info.nRandomPos = vRandom.size();
-                    am->vRandom.push_back(n);
-                    if (nUBuckets != ADDRMAN_NEW_BUCKET_COUNT)
-                    {
-                        am->vvNew[info.GetNewBucket(am->nKey)].insert(n);
-                        info.nRefCount++;
-                    }
-                }
-                am->nIdCount = am->nNew;
-                int nLost = 0;
-                for (int n = 0; n < am->nTried; n++)
-                {
-                    CAddrInfo info;
-                    READWRITE(info);
-                    std::vector<int> &vTried = am->vvTried[info.GetTriedBucket(am->nKey)];
-                    if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE)
-                    {
-                        info.nRandomPos = vRandom.size();
-                        info.fInTried = true;
-                        am->vRandom.push_back(am->nIdCount);
-                        am->mapInfo[am->nIdCount] = info;
-                        am->mapAddr[info] = am->nIdCount;
-                        vTried.push_back(am->nIdCount);
-                        am->nIdCount++;
-                    } else {
-                        nLost++;
-                    }
-                }
-                am->nTried -= nLost;
-                for (int b = 0; b < nUBuckets; b++)
-                {
-                    std::set<int> &vNew = am->vvNew[b];
-                    int nSize = 0;
-                    READWRITE(nSize);
-                    for (int n = 0; n < nSize; n++)
-                    {
-                        int nIndex = 0;
-                        READWRITE(nIndex);
-                        CAddrInfo &info = am->mapInfo[nIndex];
-                        if (nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS)
-                        {
-                            info.nRefCount++;
-                            vNew.insert(nIndex);
-                        }
-                    }
+                nLost++;
+            }
+        }
+        nTried -= nLost;
+        for (int b = 0; b < nUBuckets; b++) {
+            std::set<int> &vNew = vvNew[b];
+            int nSize = 0;
+            s >> nSize;
+            for (int n = 0; n < nSize; n++) {
+                int nIndex = 0;
+                s >> nIndex;
+                CAddrInfo &info = mapInfo[nIndex];
+                if (nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS) {
+                    info.nRefCount++;
+                    vNew.insert(nIndex);
                 }
             }
         }
-    });)
+    }
+
+    unsigned int GetSerializeSize(int nType, int nVersion) const
+    {
+        return (CSizeComputer(nType, nVersion) << *this).size();
+    }
 
     CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>())
     {
diff --git a/src/serialize.h b/src/serialize.h
index 5ac85554c6db..f876efd9b5a4 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -830,6 +830,35 @@ struct ser_streamplaceholder
 
 typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
 
+class CSizeComputer
+{
+protected:
+    size_t nSize;
+
+public:
+    int nType;
+    int nVersion;
+
+    CSizeComputer(int nTypeIn, int nVersionIn) : nSize(0), nType(nTypeIn), nVersion(nVersionIn) {}
+
+    CSizeComputer& write(const char *psz, int nSize)
+    {
+        this->nSize += nSize;
+        return *this;
+    }
+
+    template<typename T>
+    CSizeComputer& operator<<(const T& obj)
+    {
+        ::Serialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+
+    size_t size() const {
+        return nSize;
+    }
+};
+
 /** Double ended buffer combining vector and stream-like interfaces.
  *
  * >> and << read and write unformatted data using the above serialization templates.

From 09c744c2a845f756adbcf8716c2365b63731f467 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Wed, 16 Jul 2014 21:46:01 +0200
Subject: [PATCH 0387/1819] Make sure CAutoFile for fees estimate goes out of
 scope

---
 src/init.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 07960ee37b09..b80d718f01de 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -127,12 +127,14 @@ void Shutdown()
     StopNode();
     UnregisterNodeSignals(GetNodeSignals());
 
-    boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
-    CAutoFile est_fileout = CAutoFile(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
-    if (est_fileout)
-        mempool.WriteFeeEstimates(est_fileout);
-    else
-        LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
+    {
+        boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
+        CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
+        if (est_fileout)
+            mempool.WriteFeeEstimates(est_fileout);
+        else
+            LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
+    }
 
     {
         LOCK(cs_main);

From 7de3f1cfd6a875bd3e7451e81ac3ab0ab69a9b6d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 17 Jul 2014 15:09:03 +0200
Subject: [PATCH 0388/1819] fix help message for RPC getpeerinfo

---
 src/rpcnet.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index bd3609b0c9ba..88e7c4ab07f7 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -98,8 +98,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"syncnode\" : true|false     (booleamn) if sync node\n"
             "  }\n"
             "  ,...\n"
-            "}\n"
-
+            "]\n"
             "\nExamples:\n"
             + HelpExampleCli("getpeerinfo", "")
             + HelpExampleRpc("getpeerinfo", "")

From 43f510d37d680ca4347878d2fb6f8b97b54e7611 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 10 Jul 2014 12:13:03 +0200
Subject: [PATCH 0389/1819] Convert closesocket 'compat wrapper' to function in
 netbase

Simpler alternative to #4348.

The current setup with closesocket() is strange. It poses
as a compatibility wrapper but adds functionality.

Rename it and make it a documented utility function in netbase.

Code movement only, zero effect on the functionality.
---
 src/compat.h    | 15 --------------
 src/net.cpp     | 19 +++++++++---------
 src/net.h       |  3 +--
 src/netbase.cpp | 53 ++++++++++++++++++++++++++++++-------------------
 src/netbase.h   |  2 ++
 5 files changed, 45 insertions(+), 47 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 8fbafb6cce16..1b3a60d11b97 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -59,19 +59,4 @@ typedef u_int SOCKET;
 #define SOCKET_ERROR        -1
 #endif
 
-inline int myclosesocket(SOCKET& hSocket)
-{
-    if (hSocket == INVALID_SOCKET)
-        return WSAENOTSOCK;
-#ifdef WIN32
-    int ret = closesocket(hSocket);
-#else
-    int ret = close(hSocket);
-#endif
-    hSocket = INVALID_SOCKET;
-    return ret;
-}
-#define closesocket(s)      myclosesocket(s)
-
-
 #endif
diff --git a/src/net.cpp b/src/net.cpp
index 3b3d91d65215..441bde3e9094 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -332,7 +332,7 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha
             {
                 if (!RecvLine(hSocket, strLine))
                 {
-                    closesocket(hSocket);
+                    CloseSocket(hSocket);
                     return false;
                 }
                 if (pszKeyword == NULL)
@@ -343,7 +343,7 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha
                     break;
                 }
             }
-            closesocket(hSocket);
+            CloseSocket(hSocket);
             if (strLine.find("<") != string::npos)
                 strLine = strLine.substr(0, strLine.find("<"));
             strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r"));
@@ -357,7 +357,7 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha
             return true;
         }
     }
-    closesocket(hSocket);
+    CloseSocket(hSocket);
     return error("GetMyExternalIP() : connection closed");
 }
 
@@ -533,8 +533,7 @@ void CNode::CloseSocketDisconnect()
     if (hSocket != INVALID_SOCKET)
     {
         LogPrint("net", "disconnecting peer=%d\n", id);
-        closesocket(hSocket);
-        hSocket = INVALID_SOCKET;
+        CloseSocket(hSocket);
     }
 
     // in case this fails, we'll empty the recv buffer when the CNode is deleted
@@ -975,12 +974,12 @@ void ThreadSocketHandler()
                 }
                 else if (nInbound >= nMaxConnections - MAX_OUTBOUND_CONNECTIONS)
                 {
-                    closesocket(hSocket);
+                    CloseSocket(hSocket);
                 }
                 else if (CNode::IsBanned(addr) && !whitelisted)
                 {
                     LogPrintf("connection from %s dropped (banned)\n", addr.ToString());
-                    closesocket(hSocket);
+                    CloseSocket(hSocket);
                 }
                 else
                 {
@@ -1817,11 +1816,11 @@ class CNetCleanup
         // Close sockets
         BOOST_FOREACH(CNode* pnode, vNodes)
             if (pnode->hSocket != INVALID_SOCKET)
-                closesocket(pnode->hSocket);
+                CloseSocket(pnode->hSocket);
         BOOST_FOREACH(ListenSocket& hListenSocket, vhListenSocket)
             if (hListenSocket.socket != INVALID_SOCKET)
-                if (closesocket(hListenSocket.socket) == SOCKET_ERROR)
-                    LogPrintf("closesocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
+                if (!CloseSocket(hListenSocket.socket))
+                    LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
 
         // clean up some globals (to help leak detection)
         BOOST_FOREACH(CNode *pnode, vNodes)
diff --git a/src/net.h b/src/net.h
index 866c9ae78300..f029a8d9357a 100644
--- a/src/net.h
+++ b/src/net.h
@@ -357,8 +357,7 @@ class CNode
     {
         if (hSocket != INVALID_SOCKET)
         {
-            closesocket(hSocket);
-            hSocket = INVALID_SOCKET;
+            CloseSocket(hSocket);
         }
         if (pfilter)
             delete pfilter;
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 067cfa024bd7..e9f3515456fc 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -218,7 +218,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     LogPrintf("SOCKS5 connecting %s\n", strDest);
     if (strDest.size() > 255)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Hostname too long");
     }
     char pszSocks5Init[] = "\5\1\0";
@@ -227,18 +227,18 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     ssize_t ret = send(hSocket, pszSocks5Init, nSize, MSG_NOSIGNAL);
     if (ret != nSize)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error sending to proxy");
     }
     char pchRet1[2];
     if (recv(hSocket, pchRet1, 2, 0) != 2)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error reading proxy response");
     }
     if (pchRet1[0] != 0x05 || pchRet1[1] != 0x00)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Proxy failed to initialize");
     }
     string strSocks5("\5\1");
@@ -250,23 +250,23 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     ret = send(hSocket, strSocks5.c_str(), strSocks5.size(), MSG_NOSIGNAL);
     if (ret != (ssize_t)strSocks5.size())
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error sending to proxy");
     }
     char pchRet2[4];
     if (recv(hSocket, pchRet2, 4, 0) != 4)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error reading proxy response");
     }
     if (pchRet2[0] != 0x05)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Proxy failed to accept request");
     }
     if (pchRet2[1] != 0x00)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         switch (pchRet2[1])
         {
             case 0x01: return error("Proxy error: general failure");
@@ -282,7 +282,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     }
     if (pchRet2[2] != 0x00)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error: malformed proxy response");
     }
     char pchRet3[256];
@@ -294,23 +294,23 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
         {
             ret = recv(hSocket, pchRet3, 1, 0) != 1;
             if (ret) {
-                closesocket(hSocket);
+                CloseSocket(hSocket);
                 return error("Error reading from proxy");
             }
             int nRecv = pchRet3[0];
             ret = recv(hSocket, pchRet3, nRecv, 0) != nRecv;
             break;
         }
-        default: closesocket(hSocket); return error("Error: malformed proxy response");
+        default: CloseSocket(hSocket); return error("Error: malformed proxy response");
     }
     if (ret)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error reading from proxy");
     }
     if (recv(hSocket, pchRet3, 2, 0) != 2)
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return error("Error reading from proxy");
     }
     LogPrintf("SOCKS5 connected %s\n", strDest);
@@ -344,7 +344,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
     if (fcntl(hSocket, F_SETFL, fFlags | O_NONBLOCK) == -1)
 #endif
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return false;
     }
 
@@ -365,13 +365,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
             if (nRet == 0)
             {
                 LogPrint("net", "connection to %s timeout\n", addrConnect.ToString());
-                closesocket(hSocket);
+                CloseSocket(hSocket);
                 return false;
             }
             if (nRet == SOCKET_ERROR)
             {
                 LogPrintf("select() for %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
-                closesocket(hSocket);
+                CloseSocket(hSocket);
                 return false;
             }
             socklen_t nRetSize = sizeof(nRet);
@@ -382,13 +382,13 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
 #endif
             {
                 LogPrintf("getsockopt() for %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
-                closesocket(hSocket);
+                CloseSocket(hSocket);
                 return false;
             }
             if (nRet != 0)
             {
                 LogPrintf("connect() to %s failed after select(): %s\n", addrConnect.ToString(), NetworkErrorString(nRet));
-                closesocket(hSocket);
+                CloseSocket(hSocket);
                 return false;
             }
         }
@@ -399,7 +399,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
 #endif
         {
             LogPrintf("connect() to %s failed: %s\n", addrConnect.ToString(), NetworkErrorString(WSAGetLastError()));
-            closesocket(hSocket);
+            CloseSocket(hSocket);
             return false;
         }
     }
@@ -415,7 +415,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
     if (fcntl(hSocket, F_SETFL, fFlags & ~O_NONBLOCK) == SOCKET_ERROR)
 #endif
     {
-        closesocket(hSocket);
+        CloseSocket(hSocket);
         return false;
     }
 
@@ -1258,3 +1258,16 @@ std::string NetworkErrorString(int err)
     return strprintf("%s (%d)", s, err);
 }
 #endif
+
+bool CloseSocket(SOCKET& hSocket)
+{
+    if (hSocket == INVALID_SOCKET)
+        return false;
+#ifdef WIN32
+    int ret = closesocket(hSocket);
+#else
+    int ret = close(hSocket);
+#endif
+    hSocket = INVALID_SOCKET;
+    return ret != SOCKET_ERROR;
+}
diff --git a/src/netbase.h b/src/netbase.h
index ad1e23083483..05221a5fde84 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -178,5 +178,7 @@ bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nCon
 bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
 /** Return readable error string for a network error code */
 std::string NetworkErrorString(int err);
+/** Close socket and set hSocket to INVALID_SOCKET */
+bool CloseSocket(SOCKET& hSocket);
 
 #endif

From eaedb59e0570558a528eac52f7fd89639911496e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 9 Jul 2014 11:00:00 +0200
Subject: [PATCH 0390/1819] net: add SetSocketNonBlocking() as OS independent
 wrapper

---
 src/net.cpp     | 19 +++-----------
 src/netbase.cpp | 70 +++++++++++++++++++++++++++++--------------------
 src/netbase.h   |  2 ++
 3 files changed, 47 insertions(+), 44 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 441bde3e9094..e0f0f14f2b51 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -501,14 +501,8 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
         addrman.Attempt(addrConnect);
 
         // Set to non-blocking
-#ifdef WIN32
-        u_long nOne = 1;
-        if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR)
-            LogPrintf("ConnectSocket() : ioctlsocket non-blocking setting failed, error %s\n", NetworkErrorString(WSAGetLastError()));
-#else
-        if (fcntl(hSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
-            LogPrintf("ConnectSocket() : fcntl non-blocking setting failed, error %s\n", NetworkErrorString(errno));
-#endif
+        if (!SetSocketNonBlocking(hSocket, true))
+            LogPrintf("ConnectNode: Setting socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
 
         // Add node
         CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false);
@@ -1642,14 +1636,9 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
     setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
 #endif
 
-#ifdef WIN32
     // Set to non-blocking, incoming connections will also inherit this
-    if (ioctlsocket(hListenSocket, FIONBIO, (u_long*)&nOne) == SOCKET_ERROR)
-#else
-    if (fcntl(hListenSocket, F_SETFL, O_NONBLOCK) == SOCKET_ERROR)
-#endif
-    {
-        strError = strprintf("Error: Couldn't set properties on socket for incoming connections (error %s)", NetworkErrorString(WSAGetLastError()));
+    if (!SetSocketNonBlocking(hListenSocket, true)) {
+        strError = strprintf("BindListenPort: Setting listening socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
         LogPrintf("%s\n", strError);
         return false;
     }
diff --git a/src/netbase.cpp b/src/netbase.cpp
index e9f3515456fc..af6d11f0e217 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -7,10 +7,6 @@
 #include "bitcoin-config.h"
 #endif
 
-#ifdef HAVE_GETADDRINFO_A
-#include <netdb.h>
-#endif
-
 #include "netbase.h"
 
 #include "hash.h"
@@ -18,6 +14,10 @@
 #include "uint256.h"
 #include "util.h"
 
+#ifdef HAVE_GETADDRINFO_A
+#include <netdb.h>
+#endif
+
 #ifndef WIN32
 #if HAVE_INET_PTON
 #include <arpa/inet.h>
@@ -331,22 +331,15 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
     SOCKET hSocket = socket(((struct sockaddr*)&sockaddr)->sa_family, SOCK_STREAM, IPPROTO_TCP);
     if (hSocket == INVALID_SOCKET)
         return false;
+
 #ifdef SO_NOSIGPIPE
     int set = 1;
     setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int));
 #endif
 
-#ifdef WIN32
-    u_long fNonblock = 1;
-    if (ioctlsocket(hSocket, FIONBIO, &fNonblock) == SOCKET_ERROR)
-#else
-    int fFlags = fcntl(hSocket, F_GETFL, 0);
-    if (fcntl(hSocket, F_SETFL, fFlags | O_NONBLOCK) == -1)
-#endif
-    {
-        CloseSocket(hSocket);
-        return false;
-    }
+    // Set to non-blocking
+    if (!SetSocketNonBlocking(hSocket, true))
+        return error("ConnectSocketDirectly: Setting socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
 
     if (connect(hSocket, (struct sockaddr*)&sockaddr, len) == SOCKET_ERROR)
     {
@@ -404,20 +397,10 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
         }
     }
 
-    // this isn't even strictly necessary
-    // CNode::ConnectNode immediately turns the socket back to non-blocking
-    // but we'll turn it back to blocking just in case
-#ifdef WIN32
-    fNonblock = 0;
-    if (ioctlsocket(hSocket, FIONBIO, &fNonblock) == SOCKET_ERROR)
-#else
-    fFlags = fcntl(hSocket, F_GETFL, 0);
-    if (fcntl(hSocket, F_SETFL, fFlags & ~O_NONBLOCK) == SOCKET_ERROR)
-#endif
-    {
-        CloseSocket(hSocket);
-        return false;
-    }
+    // This is required when using SOCKS5 proxy!
+    // CNode::ConnectNode turns the socket back to non-blocking.
+    if (!SetSocketNonBlocking(hSocket, false))
+        return error("ConnectSocketDirectly: Setting socket to blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
 
     hSocketRet = hSocket;
     return true;
@@ -1271,3 +1254,32 @@ bool CloseSocket(SOCKET& hSocket)
     hSocket = INVALID_SOCKET;
     return ret != SOCKET_ERROR;
 }
+
+bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking)
+{
+    if (fNonBlocking) {
+#ifdef WIN32
+        u_long nOne = 1;
+        if (ioctlsocket(hSocket, FIONBIO, &nOne) == SOCKET_ERROR) {
+#else
+        int fFlags = fcntl(hSocket, F_GETFL, 0);
+        if (fcntl(hSocket, F_SETFL, fFlags | O_NONBLOCK) == SOCKET_ERROR) {
+#endif
+            CloseSocket(hSocket);
+            return false;
+        }
+    } else {
+#ifdef WIN32
+        u_long nZero = 0;
+        if (ioctlsocket(hSocket, FIONBIO, &nZero) == SOCKET_ERROR) {
+#else
+        int fFlags = fcntl(hSocket, F_GETFL, 0);
+        if (fcntl(hSocket, F_SETFL, fFlags & ~O_NONBLOCK) == SOCKET_ERROR) {
+#endif
+            CloseSocket(hSocket);
+            return false;
+        }
+    }
+
+    return true;
+}
diff --git a/src/netbase.h b/src/netbase.h
index 05221a5fde84..7d83e3534479 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -180,5 +180,7 @@ bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest
 std::string NetworkErrorString(int err);
 /** Close socket and set hSocket to INVALID_SOCKET */
 bool CloseSocket(SOCKET& hSocket);
+/** Disable or enable blocking-mode for a socket */
+bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking);
 
 #endif

From c994d2e769239036626fe51c59daea4085fc3d54 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 17 Jul 2014 22:33:58 +0200
Subject: [PATCH 0391/1819] prevent SOCKET leak in BindListenPort()

- the call to CloseSocket() is placed after the WSAGetLastError(), because
  a CloseSocket() can trigger an error also, which we don't want for the
  logging in this two cases
---
 src/net.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/net.cpp b/src/net.cpp
index 441bde3e9094..b55cd72e868f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1678,6 +1678,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
         else
             strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr));
         LogPrintf("%s\n", strError);
+        CloseSocket(hListenSocket);
         return false;
     }
     LogPrintf("Bound to %s\n", addrBind.ToString());
@@ -1687,6 +1688,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
     {
         strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %s)"), NetworkErrorString(WSAGetLastError()));
         LogPrintf("%s\n", strError);
+        CloseSocket(hListenSocket);
         return false;
     }
 

From acd432b5b38464ef3ecb87f80b1bbebe9d7c2022 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 13 Jul 2014 10:19:56 +0200
Subject: [PATCH 0392/1819] [Qt] Prevent balloon-spam after rescan

---
 src/qt/walletmodel.cpp | 13 +++++++++++--
 src/qt/walletmodel.h   |  4 ++++
 src/qt/walletview.cpp  |  2 +-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 7317c3276655..7df8812ccdfd 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -35,6 +35,8 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
     cachedEncryptionStatus(Unencrypted),
     cachedNumBlocks(0)
 {
+    fProcessingQueuedTransactions = false;
+
     addressTableModel = new AddressTableModel(wallet, this);
     transactionTableModel = new TransactionTableModel(wallet, this);
     recentRequestsTableModel = new RecentRequestsTableModel(wallet, this);
@@ -492,8 +494,15 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int
     if (nProgress == 100)
     {
         fQueueNotifications = false;
-        BOOST_FOREACH(const PAIRTYPE(uint256, ChangeType)& notification, vQueueNotifications)
-            NotifyTransactionChanged(walletmodel, NULL, notification.first, notification.second);
+        if (vQueueNotifications.size() > 10) // prevent balloon spam, show maximum 10 balloons
+            QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
+        for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
+        {
+            if (vQueueNotifications.size() - i <= 10)
+                QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
+
+            NotifyTransactionChanged(walletmodel, NULL, vQueueNotifications[i].first, vQueueNotifications[i].second);
+        }
         std::vector<std::pair<uint256, ChangeType> >().swap(vQueueNotifications); // clear
     }
 }
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 7ad54ff8e669..2bb91d85a928 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -133,6 +133,7 @@ class WalletModel : public QObject
     qint64 getWatchImmatureBalance() const;
     int getNumTransactions() const;
     EncryptionStatus getEncryptionStatus() const;
+    bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
 
     // Check address for validity
     bool validateAddress(const QString &address);
@@ -196,6 +197,7 @@ class WalletModel : public QObject
 
 private:
     CWallet *wallet;
+    bool fProcessingQueuedTransactions;
 
     // Wallet has an options model for wallet-specific options
     // (transaction fee, for example)
@@ -256,6 +258,8 @@ public slots:
     void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
     /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
     void pollBalanceChanged();
+    /* Needed to update fProcessingQueuedTransactions through a QueuedConnection */
+    void setProcessingQueuedTransactions(bool value) { fProcessingQueuedTransactions = value; }
 };
 
 #endif // WALLETMODEL_H
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 1cef48344fc4..b40ddc0a2f25 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -137,7 +137,7 @@ void WalletView::setWalletModel(WalletModel *walletModel)
 void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
 {
     // Prevent balloon-spam when initial block download is in progress
-    if (!walletModel || !clientModel || clientModel->inInitialBlockDownload())
+    if (!walletModel || walletModel->processingQueuedTransactions() || !clientModel || clientModel->inInitialBlockDownload())
         return;
 
     TransactionTableModel *ttm = walletModel->getTransactionTableModel();

From 1e72d5c03335e472cf5b9207419d6125fed9aec4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 17 Jul 2014 22:03:27 -0400
Subject: [PATCH 0393/1819] build: silence false errors during make clean

---
 src/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 90e0a43bebd6..ff2374759251 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -276,7 +276,7 @@ EXTRA_DIST = leveldb secp256k1
 
 clean-local:
 	-$(MAKE) -C leveldb clean
-	-$(MAKE) -C secp256k1 clean
+	-$(MAKE) -C secp256k1 clean 2>/dev/null
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
 	-rm -f config.h
 

From ab123ad4d6da65800a1cf4cf45a7171d97a77254 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 3 Jun 2014 23:42:53 -0400
Subject: [PATCH 0394/1819] build: allow linux and osx to build against static
 qt5

This is the first part of a huge effort to rework the handling of dependencies.
To start, this change allows all supported platforms to build against a static
Qt. 5.2.1 and 5.3 have been successfully tested against osx64, win32, win64,
linux32, and linux64.

It also makes a small change to the windows config, to allow linking against
qt builds with or without built-in libjpeg/libpng/libpcre/libz.

The actual build processes to take advantage of these changes (for gitian and
pull-tester) are coming soon. Until then, this should be a no-op.
---
 configure.ac         |   3 ++
 src/m4/bitcoin_qt.m4 | 107 ++++++++++++++++++++++++-------------------
 src/qt/bitcoin.cpp   |   6 +++
 3 files changed, 70 insertions(+), 46 deletions(-)

diff --git a/configure.ac b/configure.ac
index d3500b4d93e4..b454ac515f69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -258,6 +258,9 @@ case $host in
 
      CPPFLAGS="$CPPFLAGS -DMAC_OSX"
      ;;
+   *linux*)
+     TARGET_OS=linux
+     ;;
    *)
      ;;
 esac
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 244b03a5c25f..3499a09b7ba9 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -94,6 +94,63 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
     BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])
   fi
 
+  dnl This is ugly and complicated. Yuck. Works as follows:
+  dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
+  dnl check a header to find out. When Qt is built statically, some plugins must
+  dnl be linked into the final binary as well. These plugins have changed between
+  dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
+  dnl plugin was added. Since we can't tell if Qt4 is static or not, it is
+  dnl assumed for windows builds.
+  dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
+  dnl results to QT_LIBS.
+  BITCOIN_QT_CHECK([
+  TEMP_CPPFLAGS=$CPPFLAGS
+  CPPFLAGS=$QT_INCLUDES
+  if test x$bitcoin_qt_got_major_vers == x5; then
+    _BITCOIN_QT_IS_STATIC
+    if test x$bitcoin_cv_static_qt == xyes; then
+      AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
+      if test x$qt_plugin_path != x; then
+        QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
+        if test x$bitcoin_qt_got_major_vers == x5; then
+          QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
+        else
+          QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
+        fi
+      fi
+      if test x$use_pkgconfig = xyes; then
+        PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
+      fi
+      _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
+      if test x$TARGET_OS == xwindows; then
+        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
+        AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
+      elif test x$TARGET_OS == xlinux; then
+        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static -lxcb])
+        AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
+      elif test x$TARGET_OS == xdarwin; then
+        if test x$use_pkgconfig = xyes; then
+          PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
+        fi
+        AX_CHECK_LINK_FLAG([[-framework IOKit]],[QT_LIBS="$QT_LIBS -framework IOKit"],[AC_MSG_ERROR(could not iokit framework)])
+        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin)],[-lqcocoa])
+        AC_DEFINE(QT_QPA_PLATFORM_COCOA, 1, [Define this symbol if the qt platform is cocoa])
+      fi
+    fi
+  else
+    if test x$TARGET_OS == xwindows; then
+      AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
+      _BITCOIN_QT_CHECK_STATIC_PLUGINS([
+         Q_IMPORT_PLUGIN(qcncodecs)
+         Q_IMPORT_PLUGIN(qjpcodecs)
+         Q_IMPORT_PLUGIN(qtwcodecs)
+         Q_IMPORT_PLUGIN(qkrcodecs)
+         Q_IMPORT_PLUGIN(AccessibleFactory)],
+         [-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
+    fi
+  fi
+  CPPFLAGS=$TEMP_CPPFLAGS
+  ])
   BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
   BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
   BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
@@ -303,26 +360,15 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
   ])
 
   BITCOIN_QT_CHECK([
-    LIBS=
-    if test x$qt_lib_path != x; then
-      LIBS="$LIBS -L$qt_lib_path"
-    fi
-    if test x$qt_plugin_path != x; then
-      LIBS="$LIBS -L$qt_plugin_path/accessible"
-      if test x$bitcoin_qt_got_major_vers == x5; then
-        LIBS="$LIBS -L$qt_plugin_path/platforms"
-      else
-        LIBS="$LIBS -L$qt_plugin_path/codecs"
-      fi
-    fi
-
     if test x$TARGET_OS == xwindows; then
       AC_CHECK_LIB([imm32],      [main],, BITCOIN_QT_FAIL(libimm32 not found))
     fi
   ])
 
-  BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,BITCOIN_QT_FAIL(zlib not found)))
-  BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,BITCOIN_QT_FAIL(png not found)))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([pcre] ,[main],,AC_MSG_WARN([libpcre not found. Assuming qt has it built-in])))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core]   ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui]    ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
@@ -332,37 +378,6 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
   QT_LIBS="$LIBS"
   LIBS="$TEMP_LIBS"
 
-  dnl This is ugly and complicated. Yuck. Works as follows:
-  dnl We can't discern whether Qt4 builds are static or not. For Qt5, we can
-  dnl check a header to find out. When Qt is built statically, some plugins must
-  dnl be linked into the final binary as well. These plugins have changed between
-  dnl Qt4 and Qt5. With Qt5, languages moved into core and the WindowsIntegration
-  dnl plugin was added. Since we can't tell if Qt4 is static or not, it is 
-  dnl assumed for all non-pkg-config builds.
-  dnl _BITCOIN_QT_CHECK_STATIC_PLUGINS does a quick link-check and appends the
-  dnl results to QT_LIBS.
-  BITCOIN_QT_CHECK([
-    if test x$bitcoin_qt_got_major_vers == x5; then
-      _BITCOIN_QT_IS_STATIC
-      if test x$bitcoin_cv_static_qt == xyes; then 
-        AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
-        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
-        if test x$TARGET_OS == xwindows; then
-          _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
-        fi
-      fi
-    else
-      AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
-      _BITCOIN_QT_CHECK_STATIC_PLUGINS([
-         Q_IMPORT_PLUGIN(qcncodecs)
-         Q_IMPORT_PLUGIN(qjpcodecs)
-         Q_IMPORT_PLUGIN(qtwcodecs)
-         Q_IMPORT_PLUGIN(qkrcodecs)
-         Q_IMPORT_PLUGIN(AccessibleFactory)],
-         [-lqcncodecs -lqjpcodecs -lqtwcodecs -lqkrcodecs -lqtaccessiblewidgets])
-    fi
-  ])
-
   BITCOIN_QT_CHECK([
     LIBS=
     if test x$qt_lib_path != x; then
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 43466663fa97..afd591efb213 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -53,7 +53,13 @@ Q_IMPORT_PLUGIN(qkrcodecs)
 Q_IMPORT_PLUGIN(qtaccessiblewidgets)
 #else
 Q_IMPORT_PLUGIN(AccessibleFactory)
+#if defined(QT_QPA_PLATFORM_XCB)
+Q_IMPORT_PLUGIN(QXcbIntegrationPlugin);
+#elif defined(QT_QPA_PLATFORM_WINDOWS)
 Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
+#elif defined(QT_QPA_PLATFORM_COCOA)
+Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
+#endif
 #endif
 #endif
 

From 2d89ea9781d25b887b7804ee0e5749fbe044f455 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 3 Jun 2014 23:43:36 -0400
Subject: [PATCH 0395/1819] build: fix whitespace in pkg-config variable

Useful for PKG_CONFIG="pkg-config --static"
---
 configure.ac         | 2 +-
 src/m4/bitcoin_qt.m4 | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index b454ac515f69..cedc34e52015 100644
--- a/configure.ac
+++ b/configure.ac
@@ -526,7 +526,7 @@ BITCOIN_QT_INIT
 
 if test x$use_pkgconfig = xyes; then
 
-  if test x$PKG_CONFIG == x; then
+  if test x"$PKG_CONFIG" == "x"; then
     AC_MSG_ERROR(pkg-config not found.)
   fi
 
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 3499a09b7ba9..9356aac37fbc 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -86,9 +86,6 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   fi
 
   if test x$use_pkgconfig = xyes; then
-    if test x$PKG_CONFIG == x; then
-      AC_MSG_ERROR(pkg-config not found.)
-    fi
     BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG([$2])])
   else
     BITCOIN_QT_CHECK([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG])

From ed02282bba468ec7224b7e836d3fe4543bf5ba1e Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 10:29:49 +0200
Subject: [PATCH 0396/1819] additional test for OP_SIZE in script_valid.json

---
 src/test/data/script_valid.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 7546a3b1fe4c..2827126f291f 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -126,6 +126,7 @@
 ["-9223372036854775807", "SIZE 8 EQUAL"],
 ["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL"],
 
+["42", "SIZE 1 EQUALVERIFY 42 EQUAL", "SIZE does not consume argument"],
 
 ["2 -2 ADD", "0 EQUAL"],
 ["2147483647 -2147483647 ADD", "0 EQUAL"],

From 0072d98849dd12de1599af894edbeee271fceb76 Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 10:53:09 +0200
Subject: [PATCH 0397/1819] script tests: BOOLAND, BOOLOR decode to integer

unlike other boolean checks, arguments >5 bytes invalidate the script
---
 src/test/data/script_invalid.json | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index d623e974b800..eaac747fd2b7 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -272,6 +272,9 @@
 ["2147483647", "1ADD 1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
 ["2147483648", "1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
 
+["2147483648 1", "BOOLOR 1", "We cannot do BOOLOR on 5-byte integers (but we can still do IF etc)"],
+["2147483648 1", "BOOLAND 1", "We cannot do BOOLAND on 5-byte integers"],
+
 ["1", "1 ENDIF", "ENDIF without IF"],
 ["1", "IF 1", "IF without ENDIF"],
 ["1 IF 1", "ENDIF", "IFs don't carry over"],

From 833ff161bc5e44ce59b16e0ce316818f8ae69d8a Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 10:54:04 +0200
Subject: [PATCH 0398/1819] script tests: values that overflow to 0 are true

---
 src/test/data/script_valid.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 2827126f291f..27778fb1d4d2 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -10,6 +10,7 @@
 ["  1  2  ", "2 EQUALVERIFY 1 EQUAL"],
 
 ["1", ""],
+["0x09 0x00000000 0x00000000 0x10", "", "equals zero when cast to Int64"],
 
 ["0x01 0x0b", "11 EQUAL", "push 1 byte"],
 ["0x02 0x417a", "'Az' EQUAL"],

From 4cac5dbf83a3069e9d25051f4c832c537a527495 Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 12:55:46 +0200
Subject: [PATCH 0399/1819] script tests: value with trailing 0x00 is true

---
 src/test/data/script_valid.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 27778fb1d4d2..af0326ad9210 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -10,6 +10,7 @@
 ["  1  2  ", "2 EQUALVERIFY 1 EQUAL"],
 
 ["1", ""],
+["0x02 0x01 0x00", "", "all bytes are significant, not only the last one"],
 ["0x09 0x00000000 0x00000000 0x10", "", "equals zero when cast to Int64"],
 
 ["0x01 0x0b", "11 EQUAL", "push 1 byte"],

From 5bb765507b394e1fe205355b0b9937d95f8a39e6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 18 Jul 2014 13:24:38 +0200
Subject: [PATCH 0400/1819] Fix a signed/unsigned warning introduced in 1b4568c

vout counter must be unsigned.
---
 src/wallet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 89a260480e2b..efefb71b6da1 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -815,7 +815,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
     }
 
     // Sent/received.
-    for (int i = 0; i < vout.size(); ++i)
+    for (unsigned int i = 0; i < vout.size(); ++i)
     {
         const CTxOut& txout = vout[i];
         isminetype fIsMine = pwallet->IsMine(txout);
@@ -840,7 +840,7 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
             address = CNoDestination();
         }
 
-        COutputEntry output = {address, txout.nValue, i};
+        COutputEntry output = {address, txout.nValue, (int)i};
 
         // If we are debited by the transaction, add the output as a "sent" entry
         if (nDebit > 0)

From 89101c6e78d1640dae06a2b978b752e69aa504a0 Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 15:41:45 +0200
Subject: [PATCH 0401/1819] script test: test case for 5-byte bools

---
 src/test/data/script_valid.json | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index af0326ad9210..082c65efed66 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -66,6 +66,7 @@
 ["0", "IF RETURN ENDIF 1", "RETURN only works if executed"],
 
 ["1 1", "VERIFY"],
+["1 0x05 0x01 0x00 0x00 0x00 0x00", "VERIFY", "values >4 bytes can be cast to boolean"],
 
 ["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL"],
 ["'gavin_was_here' TOALTSTACK 11 FROMALTSTACK", "'gavin_was_here' EQUALVERIFY 11 EQUAL"],

From 3da434a2ef9ac76a0ad4a33921773a9ac8f10ab7 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 16 Jul 2014 20:04:04 -0400
Subject: [PATCH 0402/1819] Introduce option to disable relay/mining of bare
 multisig scripts in TX outputs

First and foremost, this defaults to OFF.

This option lets a node consider such transactions non-standard,
meaning they will not be relayed or mined by default, but other miners
are free to mine these as usual.
---
 src/init.cpp | 6 +++++-
 src/main.cpp | 7 ++++++-
 src/main.h   | 1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b80d718f01de..031b9db4804c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -248,6 +248,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -maxsendbuffer=<n>     " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n";
     strUsage += "  -onion=<ip:port>       " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
     strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Tor)") + "\n";
+    strUsage += "  -permitbaremultisig    " + _("Relay non-P2SH multisig (default: 1)") + "\n";
     strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
     strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
     strUsage += "  -seednode=<ip>         " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n";
@@ -676,7 +677,10 @@ bool AppInit2(boost::thread_group& threadGroup)
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
 
     std::string strWalletFile = GetArg("-wallet", "wallet.dat");
-#endif
+#endif // ENABLE_WALLET
+
+    fIsBareMultisigStd = GetArg("-permitbaremultisig", true);
+
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
     // Sanity check
     if (!InitSanityCheck())
diff --git a/src/main.cpp b/src/main.cpp
index 766f0970f03f..dd9e76378e96 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,6 +48,7 @@ bool fImporting = false;
 bool fReindex = false;
 bool fBenchmark = false;
 bool fTxIndex = false;
+bool fIsBareMultisigStd = true;
 unsigned int nCoinCacheSize = 5000;
 
 /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
@@ -604,9 +605,13 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
             reason = "scriptpubkey";
             return false;
         }
+
         if (whichType == TX_NULL_DATA)
             nDataOut++;
-        else if (txout.IsDust(::minRelayTxFee)) {
+        else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
+            reason = "bare-multisig";
+            return false;
+        } else if (txout.IsDust(::minRelayTxFee)) {
             reason = "dust";
             return false;
         }
diff --git a/src/main.h b/src/main.h
index a6834125719d..20a83db60519 100644
--- a/src/main.h
+++ b/src/main.h
@@ -94,6 +94,7 @@ extern bool fReindex;
 extern bool fBenchmark;
 extern int nScriptCheckThreads;
 extern bool fTxIndex;
+extern bool fIsBareMultisigStd;
 extern unsigned int nCoinCacheSize;
 extern CFeeRate minRelayTxFee;
 

From d2d9dc063f8da87e02e588064f8ea9253e201907 Mon Sep 17 00:00:00 2001
From: Otto Allmendinger <otto.allmendinger@gmail.com>
Date: Fri, 18 Jul 2014 17:55:06 +0200
Subject: [PATCH 0403/1819] script tests: add tests for CHECKMULTISIG limits

---
 src/test/data/script_invalid.json | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index eaac747fd2b7..e3e1ccbf3c12 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -352,6 +352,9 @@
 "NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY"],
 
 
+["0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21", "21 CHECKMULTISIG 1", "nPubKeys > 20"],
+["0 'sig' 1 0", "CHECKMULTISIG 1", "nSigs > nPubKeys"],
+
 
 ["NOP 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "Tests for Script.IsPushOnly()"],
 ["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],

From 92b8587e1287cf52d753d3c31cf5ee7a32b34a9f Mon Sep 17 00:00:00 2001
From: elkingtowa <elkingtowa@gmail.com>
Date: Fri, 18 Jul 2014 15:04:54 -0400
Subject: [PATCH 0404/1819] Update README.md

Added two modifications to make the descriptions more clear.
---
 contrib/README.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/README.md b/contrib/README.md
index 92d0a343dbce..63b1875d3075 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -21,11 +21,11 @@ Construct a linear, no-fork, best version of the blockchain.
 
 ### [PyMiner](/contrib/pyminer) ###
 
-This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow.  The purpose is to provide a reference implementation of a miner, for study.
+This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow.  The purpose is to provide a reference implementation of a miner in order to study and develop other mining programs.
 
 ### [Qos](/contrib/qos) ###
 
-A Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
+A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
 
 ### [Seeds](/contrib/seeds) ###
 Utility to generate the pnSeed[] array that is compiled into the client.

From b9345f7d1c071fbbef75d79ac6a2ca8636c599e9 Mon Sep 17 00:00:00 2001
From: Whit J <whitj00@users.noreply.github.com>
Date: Mon, 14 Jul 2014 11:22:35 -0700
Subject: [PATCH 0405/1819] qt: Make error message for failed export a little
 friendlier

Closes #4528.
---
 src/qt/addressbookpage.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 5df8f197291d..f336d47e83ec 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -282,7 +282,7 @@ void AddressBookPage::on_exportButton_clicked()
 
     if(!writer.write()) {
         QMessageBox::critical(this, tr("Exporting Failed"),
-            tr("There was an error trying to save the address list to %1.").arg(filename));
+            tr("There was an error trying to save the address list to %1. Please try again.").arg(filename));
     }
 }
 

From 027dcdc792e006ea90afe90b7373ba5a111bd9bc Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 20 Jul 2014 04:17:02 +0200
Subject: [PATCH 0406/1819] [Qt] Fix thin space in URI

---
 src/qt/coincontroldialog.cpp        | 2 +-
 src/qt/guiutil.cpp                  | 2 +-
 src/qt/recentrequeststablemodel.cpp | 7 +++++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index b4ddda3eaaa0..7b30f8de090a 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -225,7 +225,7 @@ void CoinControlDialog::showMenu(const QPoint &point)
 // context menu action: copy amount
 void CoinControlDialog::copyAmount()
 {
-    GUIUtil::setClipboard(contextMenuItem->text(COLUMN_AMOUNT));
+    GUIUtil::setClipboard(BitcoinUnits::removeSpaces(contextMenuItem->text(COLUMN_AMOUNT)));
 }
 
 // context menu action: copy label
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 60a131df7ef0..33a50a078dad 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -187,7 +187,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
 
     if (info.amount)
     {
-        ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTC, info.amount));
+        ret += QString("?amount=%1").arg(BitcoinUnits::format(BitcoinUnits::BTC, info.amount, false, BitcoinUnits::separatorNever));
         paramCount++;
     }
 
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index b5a998f9f539..9e3976644ede 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -79,10 +79,17 @@ QVariant RecentRequestsTableModel::data(const QModelIndex &index, int role) cons
         case Amount:
             if (rec->recipient.amount == 0 && role == Qt::DisplayRole)
                 return tr("(no amount)");
+            else if (role == Qt::EditRole)
+                return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount, false, BitcoinUnits::separatorNever);
             else
                 return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), rec->recipient.amount);
         }
     }
+    else if (role == Qt::TextAlignmentRole)
+    {
+        if (index.column() == Amount)
+            return (int)(Qt::AlignRight|Qt::AlignVCenter);
+    }
     return QVariant();
 }
 

From 0de61e7585e14cb552e985934fc5ddfeb6e8bd67 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sun, 20 Jul 2014 13:49:58 +0200
Subject: [PATCH 0407/1819] qt: Move SplashFinished to after
 ClientModel/WalletModel creation

With a large wallet there was a noticable gap between hiding of the
splash and showing the main window.
---
 src/qt/bitcoin.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index afd591efb213..7bf531f53805 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -406,8 +406,6 @@ void BitcoinApplication::initializeResult(int retval)
         paymentServer->setOptionsModel(optionsModel);
 #endif
 
-        emit splashFinished(window);
-
         clientModel = new ClientModel(optionsModel);
         window->setClientModel(clientModel);
 
@@ -424,6 +422,8 @@ void BitcoinApplication::initializeResult(int retval)
         }
 #endif
 
+        emit splashFinished(window);
+
         // If -min option passed, start window minimized.
         if(GetBoolArg("-min", false))
         {

From 67cc8f25c267ea7cde765f566fa10bc248c15ea2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:07:53 +0200
Subject: [PATCH 0408/1819] Revert "Remove signal DoubleSpendDetected, use
 function"

This reverts commit 0da6b3fd187da3aa810aaa584d8bd197ad4fa2b9.
---
 src/init.cpp |   2 +-
 src/main.cpp | 103 ++++++++++++++++++++++++++++-----------------------
 src/main.h   |   4 +-
 3 files changed, 59 insertions(+), 50 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 031b9db4804c..323192ab7962 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1229,7 +1229,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("mapAddressBook.size() = %u\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
 #endif
 
-    InitRespendFilter();
+    RegisterInternalSignals();
     StartNode(threadGroup);
     if (fServer)
         StartRPCThreads();
diff --git a/src/main.cpp b/src/main.cpp
index dd9e76378e96..7ff1bdb2e789 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -126,14 +126,9 @@ namespace {
 
 } // anon namespace
 
-// Bloom filter to limit respend relays to one
+// Forward reference functions defined here:
 static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
-static CBloomFilter doubleSpendFilter;
-void InitRespendFilter() {
-    seed_insecure_rand();
-    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
-}
-
+static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -157,10 +152,24 @@ struct CMainSignals {
     boost::signals2::signal<void (const uint256 &)> Inventory;
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
+    // Notifies listeners of detection of a double-spent transaction. Arguments are outpoint that is
+    // double-spent, first transaction seen, double-spend transaction, and whether the second double-spend
+    // transaction was first seen in a block.
+    // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
+    // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
+    boost::signals2::signal<bool (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 
 } // anon namespace
 
+void RegisterInternalSignals() {
+    static CBloomFilter doubleSpendFilter;
+    seed_insecure_rand();
+    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
+
+    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayableRespend, _1, _2, _3, doubleSpendFilter));
+}
+
 
 void RegisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
@@ -897,45 +906,6 @@ bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsig
     return false;
 }
 
-static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
-{
-    // Relaying double-spend attempts to our peers lets them detect when
-    // somebody might be trying to cheat them. However, blindly relaying
-    // every double-spend across the entire network gives attackers
-    // a denial-of-service attack: just generate a stream of double-spends
-    // re-spending the same (limited) set of outpoints owned by the attacker.
-    // So, we use a bloom filter and only relay (at most) the first double
-    // spend for each outpoint. False-positives ("we have already relayed")
-    // are OK, because if the peer doesn't hear about the double-spend
-    // from us they are very likely to hear about it from another peer, since
-    // each peer uses a different, randomized bloom filter.
-
-    if (fInBlock || filter.contains(outPoint)) return false;
-
-    // Apply an independent rate limit to double-spend relays
-    static double dRespendCount;
-    static int64_t nLastRespendTime;
-    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
-    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
-
-    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
-    {
-        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
-        return false;
-    }
-
-    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
-
-    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
-    // insertions
-    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
-        filter.clear();
-
-    filter.insert(outPoint);
-
-    return true;
-}
-
 bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
                         bool* pfMissingInputs, bool fRejectInsaneFee)
 {
@@ -973,7 +943,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Does tx conflict with a member of the pool, and is it not equivalent to that member?
         if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
         {
-            relayableRespend = RelayableRespend(outpoint, tx, false, doubleSpendFilter);
+            relayableRespend = g_signals.DetectedDoubleSpend(outpoint, tx, false);
             if (!relayableRespend)
                 return false;
         }
@@ -1085,6 +1055,45 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return !relayableRespend;
 }
 
+static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+{
+    // Relaying double-spend attempts to our peers lets them detect when
+    // somebody might be trying to cheat them. However, blindly relaying
+    // every double-spend across the entire network gives attackers
+    // a denial-of-service attack: just generate a stream of double-spends
+    // re-spending the same (limited) set of outpoints owned by the attacker.
+    // So, we use a bloom filter and only relay (at most) the first double
+    // spend for each outpoint. False-positives ("we have already relayed")
+    // are OK, because if the peer doesn't hear about the double-spend
+    // from us they are very likely to hear about it from another peer, since
+    // each peer uses a different, randomized bloom filter.
+
+    if (fInBlock || filter.contains(outPoint)) return false;
+
+    // Apply an independent rate limit to double-spend relays
+    static double dRespendCount;
+    static int64_t nLastRespendTime;
+    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
+    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
+
+    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
+    {
+        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
+        return false;
+    }
+
+    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
+
+    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
+    // insertions
+    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
+        filter.clear();
+
+    filter.insert(outPoint);
+
+    return true;
+}
+
 
 int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
 {
diff --git a/src/main.h b/src/main.h
index 20a83db60519..33afa06fa829 100644
--- a/src/main.h
+++ b/src/main.h
@@ -112,8 +112,8 @@ struct CNodeStateStats;
 
 struct CBlockTemplate;
 
-/** Initialize respend bloom filter **/
-void InitRespendFilter();
+/** Set up internal signal handlers **/
+void RegisterInternalSignals();
 
 /** Register a wallet to receive updates from core */
 void RegisterWallet(CWalletInterface* pwalletIn);

From cd057bfd415815dd4fa219ef213640635d4b6d37 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:08:01 +0200
Subject: [PATCH 0409/1819] Revert "Check signatures before respend relay"

This reverts commit 88dd3598d22197a22565e524cecdc08107cf76ac.
---
 src/main.cpp | 37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 7ff1bdb2e789..f3819b14973a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -128,7 +128,7 @@ namespace {
 
 // Forward reference functions defined here:
 static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
-static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
+static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
 
 //////////////////////////////////////////////////////////////////////////////
 //
@@ -157,7 +157,7 @@ struct CMainSignals {
     // transaction was first seen in a block.
     // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
     // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
-    boost::signals2::signal<bool (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
+    boost::signals2::signal<void (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 
 } // anon namespace
@@ -167,7 +167,7 @@ void RegisterInternalSignals() {
     seed_insecure_rand();
     doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
 
-    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayableRespend, _1, _2, _3, doubleSpendFilter));
+    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayDoubleSpend, _1, _2, _3, doubleSpendFilter));
 }
 
 
@@ -934,7 +934,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         return false;
 
     // Check for conflicts with in-memory transactions
-    bool relayableRespend = false;
     {
     LOCK(pool.cs); // protect pool.mapNextTx
     for (unsigned int i = 0; i < tx.vin.size(); i++)
@@ -943,9 +942,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // Does tx conflict with a member of the pool, and is it not equivalent to that member?
         if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
         {
-            relayableRespend = g_signals.DetectedDoubleSpend(outpoint, tx, false);
-            if (!relayableRespend)
-                return false;
+            g_signals.DetectedDoubleSpend(outpoint, tx, false);
+            return false;
         }
     }
     }
@@ -1038,24 +1036,16 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         {
             return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString());
         }
-
-        if (relayableRespend)
-        {
-            RelayTransaction(tx);
-        }
-        else
-        {
-            // Store transaction in memory
-            pool.addUnchecked(hash, entry);
-        }
+        // Store transaction in memory
+        pool.addUnchecked(hash, entry);
     }
 
     g_signals.SyncTransaction(tx, NULL);
 
-    return !relayableRespend;
+    return true;
 }
 
-static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
 {
     // Relaying double-spend attempts to our peers lets them detect when
     // somebody might be trying to cheat them. However, blindly relaying
@@ -1068,7 +1058,7 @@ static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doub
     // from us they are very likely to hear about it from another peer, since
     // each peer uses a different, randomized bloom filter.
 
-    if (fInBlock || filter.contains(outPoint)) return false;
+    if (fInBlock || filter.contains(outPoint)) return;
 
     // Apply an independent rate limit to double-spend relays
     static double dRespendCount;
@@ -1079,7 +1069,7 @@ static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doub
     if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
     {
         LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
-        return false;
+        return;
     }
 
     LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
@@ -1091,7 +1081,10 @@ static bool RelayableRespend(const COutPoint& outPoint, const CTransaction& doub
 
     filter.insert(outPoint);
 
-    return true;
+    RelayTransaction(doubleSpend);
+
+    // Share conflict with wallet
+    g_signals.SyncTransaction(doubleSpend, NULL);
 }
 
 

From ad26dc9c314406034cef7684d4c9f9ec31d6347e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:08:07 +0200
Subject: [PATCH 0410/1819] Revert "Formatting, spelling, comment fixes."

This reverts commit 7a19efe04069d9a1e251cdc94b25184f76d9d901.
---
 doc/release-notes.md             |  2 +-
 src/main.cpp                     |  6 ++++--
 src/qt/transactionrecord.h       | 13 +++----------
 src/qt/transactiontablemodel.cpp |  4 ++--
 src/qt/walletmodel.cpp           | 14 +++++++-------
 src/wallet.cpp                   |  2 +-
 6 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 66059800b67b..31df2883cc2f 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -83,5 +83,5 @@ Warning
  - Using other relay rules, a double-spender can craft his crime to
    resist broadcast
  - Miners can choose which conflicting spend to confirm, and some
-   miners may not confirm the first acceptable spend they see
+   miners may not confirmg the first acceptable spend they see
 
diff --git a/src/main.cpp b/src/main.cpp
index f3819b14973a..d69c2d902729 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -898,6 +898,7 @@ bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsig
 
     LOCK(csLimiter);
 
+    // Use an exponentially decaying ~10-minute window:
     dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
     nLastTime = nNow;
     if (dCount >= nLimit*10*1000)
@@ -1018,7 +1019,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
             static int64_t nLastFreeTime;
             static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
 
-            if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
+		if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
                 return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
                                  REJECT_INSUFFICIENTFEE, "insufficient priority");
 
@@ -1045,7 +1046,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
-static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
+static void
+RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
 {
     // Relaying double-spend attempts to our peers lets them detect when
     // somebody might be trying to cheat them. However, blindly relaying
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index d3cfa77d97be..e6ff4ca080f0 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -19,17 +19,10 @@ class TransactionStatus
 {
 public:
     TransactionStatus():
-        countsForBalance(false),
-        sortKey(""),
-        matures_in(0),
-        status(Offline),
-        hasConflicting(false),
-        depth(0),
-        open_for(0),
-        cur_num_blocks(-1),
+        countsForBalance(false), sortKey(""),
+        matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
         cur_num_conflicts(-1)
-    {
-    }
+    { }
 
     enum Status {
         Confirmed,          /**< Have 6 or more confirmations (normal tx) or fully mature (mined tx) **/
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index cf4c90c7ffbb..6156a2ecd233 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -546,9 +546,9 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case Qt::TextAlignmentRole:
         return column_alignments[index.column()];
     case Qt::BackgroundColorRole:
-        if (rec->status.hasConflicting)
+	if (rec->status.hasConflicting)
             return COLOR_HASCONFLICTING_BG;
-        break;
+	break;
     case Qt::ForegroundRole:
         if (rec->status.hasConflicting)
             return COLOR_HASCONFLICTING;
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 7df8812ccdfd..3cbf35436c58 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -164,13 +164,13 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
-    if (status == CT_GOT_CONFLICT)
-    {
-        emit message(tr("Conflict Received"),
-                     tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
-                     CClientUIInterface::MSG_WARNING);
-        return;
-    }
+	if (status == CT_GOT_CONFLICT)
+	{
+	    emit message(tr("Conflict Received"),
+		         tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
+				CClientUIInterface::MSG_WARNING);
+		return;
+	}
 
     if(transactionTableModel)
         transactionTableModel->updateTransaction(hash, status);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index efefb71b6da1..f0ab70afb971 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -657,7 +657,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
 
         bool fIsConflicting = IsConflicting(tx);
         if (fIsConflicting)
-            nConflictsReceived++;
+		nConflictsReceived++;
 
         if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
         {

From 680f7252f0ca3d68ef286ae074acf480e75896fe Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:08:14 +0200
Subject: [PATCH 0411/1819] Revert "Add release notes entry"

This reverts commit 9fa53dd3bdc6f62b16a7c2b970449c8c35f4c41b.
---
 doc/release-notes.md | 46 --------------------------------------------
 1 file changed, 46 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 31df2883cc2f..967a39a0e7fa 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -39,49 +39,3 @@ estimate.
 Statistics used to estimate fees and priorities are saved in the
 data directory in the 'fee_estimates.dat' file just before
 program shutdown, and are read in at startup.
-
-Double-Spend Relay and Alerts
-=============================
-VERY IMPORTANT: *It has never been safe, and remains unsafe, to rely*
-*on unconfirmed transactions.*
-
-Relay
------
-When an attempt is seen on the network to spend the same unspent funds
-more than once, it is no longer ignored.  Instead, it is broadcast, to
-serve as an alert.  This broadcast is subject to protections against
-denial-of-service attacks.
-
-Wallets and other bitcoin services should alert their users to
-double-spends that affect them.  Merchants and other users may have
-enough time to withhold goods or services when payment becomes
-uncertain, until confirmation.
-
-Bitcoin Core Wallet Alerts
---------------------------
-The Bitcoin Core wallet now makes respend attempts visible in several
-ways.
-
-If you are online, and a respend affecting one of your wallet
-transactions is seen, a notification is immediately issued to the
-command registered with `-respendnotify=<cmd>`.  Additionally, if
-using the GUI:
- - An alert box is immediately displayed.
- - The affected wallet transaction is highlighted in red until it is
-   confirmed (and it may never be confirmed).
-
-A `respendsobserved` array is added to `gettransaction`, `listtransactions`,
-and `listsinceblock` RPC results.
-
-Warning
--------
-*If you rely on an unconfirmed transaction, these change do VERY*
-*LITTLE to protect you from a malicious double-spend, because:*
-
- - You may learn about the respend too late to avoid doing whatever
-   you were being paid for
- - Using other relay rules, a double-spender can craft his crime to
-   resist broadcast
- - Miners can choose which conflicting spend to confirm, and some
-   miners may not confirmg the first acceptable spend they see
-

From 39d3f2cb40a539fff1daba3d76a6c59e932d0f0a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:08:21 +0200
Subject: [PATCH 0412/1819] Revert "Add -respendnotify option and new RPC data"

This reverts commit 9004798e62e987ddf50030b17fa1881b63dd5e45.
---
 contrib/debian/manpages/bitcoin-qt.1 |  3 ---
 src/rpcwallet.cpp                    | 22 ----------------------
 src/wallet.cpp                       |  8 --------
 3 files changed, 33 deletions(-)

diff --git a/contrib/debian/manpages/bitcoin-qt.1 b/contrib/debian/manpages/bitcoin-qt.1
index 25a423f9c425..cd478b1875cb 100644
--- a/contrib/debian/manpages/bitcoin-qt.1
+++ b/contrib/debian/manpages/bitcoin-qt.1
@@ -139,9 +139,6 @@ Execute command when the best block changes (%s in cmd is replaced by block hash
 \fB\-walletnotify=\fR<cmd>
 Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
 .TP
-\fB\-respendnotify=\fR<cmd>
-Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)
-.TP
 \fB\-alertnotify=\fR<cmd>
 Execute command when a relevant alert is received (%s in cmd is replaced by message)
 .TP
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 631f72d1a102..5b83fe900ecd 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -58,10 +58,6 @@ void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
     BOOST_FOREACH(const uint256& conflict, wtx.GetConflicts())
         conflicts.push_back(conflict.GetHex());
     entry.push_back(Pair("walletconflicts", conflicts));
-    Array respends;
-    BOOST_FOREACH(const uint256& respend, wtx.GetConflicts(false))
-        respends.push_back(respend.GetHex());
-    entry.push_back(Pair("respendsobserved", respends));
     entry.push_back(Pair("time", wtx.GetTxTime()));
     entry.push_back(Pair("timereceived", (int64_t)wtx.nTimeReceived));
     BOOST_FOREACH(const PAIRTYPE(string,string)& item, wtx.mapValue)
@@ -1252,12 +1248,6 @@ Value listtransactions(const Array& params, bool fHelp)
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive'\n"
             "                                          category of transactions.\n"
             "    \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
-            "    \"walletconflicts\" : [\n"
-            "        \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
-            "    ],\n"
-            "    \"respendsobserved\" : [\n"
-            "        \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
-            "    ],\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (midnight Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
             "                                          for 'send' and 'receive' category of transactions.\n"
@@ -1434,12 +1424,6 @@ Value listsinceblock(const Array& params, bool fHelp)
             "    \"blockindex\": n,          (numeric) The block index containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
             "    \"blocktime\": xxx,         (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
             "    \"txid\": \"transactionid\",  (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
-            "    \"walletconflicts\" : [\n"
-            "        \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
-            "    ],\n"
-            "    \"respendsobserved\" : [\n"
-            "        \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
-            "    ],\n"
             "    \"time\": xxx,              (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
             "    \"timereceived\": xxx,      (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
             "    \"comment\": \"...\",       (string) If a comment is associated with the transaction.\n"
@@ -1518,12 +1502,6 @@ Value gettransaction(const Array& params, bool fHelp)
             "  \"blockindex\" : xx,       (numeric) The block index\n"
             "  \"blocktime\" : ttt,       (numeric) The time in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"txid\" : \"transactionid\",   (string) The transaction id.\n"
-            "  \"walletconflicts\" : [\n"
-            "      \"conflictid\",  (string) Ids of transactions, including equivalent clones, that re-spend a txid input.\n"
-            "  ],\n"
-            "  \"respendsobserved\" : [\n"
-            "      \"respendid\",  (string) Ids of transactions, NOT equivalent clones, that re-spend a txid input. \"Double-spends.\"\n"
-            "  ],\n"
             "  \"time\" : ttt,            (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"timereceived\" : ttt,    (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
             "  \"details\" : [\n"
diff --git a/src/wallet.cpp b/src/wallet.cpp
index f0ab70afb971..1fb4dba3086b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -620,14 +620,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
                 if (IsFromMe(txConflict) || IsMine(txConflict))
                 {
                     NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT);  //Throws dialog
-                    // external respend notify
-                    std::string strCmd = GetArg("-respendnotify", "");
-                    if (!strCmd.empty())
-                    {
-                        boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex());
-                        boost::replace_all(strCmd, "%t", conflictHash.GetHex());
-                        boost::thread t(runCommand, strCmd); // thread runs free
-                    }
                 }
             }
         }

From 3015e0bca6bc2cb8beb747873fdf7b80e74d679f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:09:46 +0200
Subject: [PATCH 0413/1819] Revert "UI to alert of respend attempt affecting
 wallet."

This reverts commit ada5a067c75f19a724cc054286ecf2254e5dbe8f.

Conflicts:
	src/qt/guiconstants.h
	src/wallet.h
---
 src/qt/guiconstants.h             |  4 ----
 src/qt/transactionfilterproxy.cpp |  4 ++--
 src/qt/transactionrecord.cpp      | 10 +++-------
 src/qt/transactionrecord.h        | 13 ++----------
 src/qt/transactiontablemodel.cpp  | 18 +++++------------
 src/qt/walletmodel.cpp            |  8 --------
 src/ui_interface.h                |  3 +--
 src/wallet.cpp                    | 33 ++++++-------------------------
 src/wallet.h                      | 15 ++------------
 9 files changed, 21 insertions(+), 87 deletions(-)

diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 696761e234bb..5ae4bc833de8 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -23,10 +23,6 @@ static const int STATUSBAR_ICONSIZE = 16;
 #define COLOR_NEGATIVE QColor(255, 0, 0)
 /* Transaction list -- bare address (without label) */
 #define COLOR_BAREADDRESS QColor(140, 140, 140)
-/* Transaction list -- has conflicting transactions */
-#define COLOR_HASCONFLICTING QColor(255, 255, 255)
-/* Transaction list -- has conflicting transactions - background */
-#define COLOR_HASCONFLICTING_BG QColor(192, 0, 0)
 
 /* Tooltips longer than this (in characters) are converted into rich text,
    so that they can be word-wrapped.
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index 7293029787a6..f9546fddb5ed 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -24,7 +24,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
     typeFilter(ALL_TYPES),
     minAmount(0),
     limitRows(-1),
-    showInactive(false)
+    showInactive(true)
 {
 }
 
@@ -39,7 +39,7 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
     qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
     int status = index.data(TransactionTableModel::StatusRole).toInt();
 
-    if(!showInactive && status == TransactionStatus::Conflicted && type == TransactionRecord::Other)
+    if(!showInactive && status == TransactionStatus::Conflicted)
         return false;
     if(!(TYPE(type) & typeFilter))
         return false;
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 7d29c212b310..d7bd25e08b4c 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -184,8 +184,6 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
     status.depth = wtx.GetDepthInMainChain();
     status.cur_num_blocks = chainActive.Height();
 
-    status.hasConflicting = false;
-
     if (!IsFinalTx(wtx, chainActive.Height() + 1))
     {
         if (wtx.nLockTime < LOCKTIME_THRESHOLD)
@@ -229,7 +227,6 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
         if (status.depth < 0)
         {
             status.status = TransactionStatus::Conflicted;
-            status.hasConflicting = !(wtx.GetConflicts(false).empty());
         }
         else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
         {
@@ -238,7 +235,6 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
         else if (status.depth == 0)
         {
             status.status = TransactionStatus::Unconfirmed;
-            status.hasConflicting = !(wtx.GetConflicts(false).empty());
         }
         else if (status.depth < RecommendedNumConfirmations)
         {
@@ -249,13 +245,13 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
             status.status = TransactionStatus::Confirmed;
         }
     }
+
 }
 
-bool TransactionRecord::statusUpdateNeeded(int64_t nConflictsReceived)
+bool TransactionRecord::statusUpdateNeeded()
 {
     AssertLockHeld(cs_main);
-    return (status.cur_num_blocks != chainActive.Height() ||
-            status.cur_num_conflicts != nConflictsReceived);
+    return status.cur_num_blocks != chainActive.Height();
 }
 
 QString TransactionRecord::getTxID() const
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index e6ff4ca080f0..626b7654c622 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -20,8 +20,7 @@ class TransactionStatus
 public:
     TransactionStatus():
         countsForBalance(false), sortKey(""),
-        matures_in(0), status(Offline), hasConflicting(false), depth(0), open_for(0), cur_num_blocks(-1),
-        cur_num_conflicts(-1)
+        matures_in(0), status(Offline), depth(0), open_for(0), cur_num_blocks(-1)
     { }
 
     enum Status {
@@ -52,10 +51,6 @@ class TransactionStatus
     /** @name Reported status
        @{*/
     Status status;
-
-    // Has conflicting transactions spending same prevout
-    bool hasConflicting;
-
     qint64 depth;
     qint64 open_for; /**< Timestamp if status==OpenUntilDate, otherwise number
                       of additional blocks that need to be mined before
@@ -64,10 +59,6 @@ class TransactionStatus
 
     /** Current number of blocks (to know whether cached status is still valid) */
     int cur_num_blocks;
-
-    /** Number of conflicts received into wallet as of last status update */
-    int64_t cur_num_conflicts;
-
 };
 
 /** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has
@@ -145,7 +136,7 @@ class TransactionRecord
 
     /** Return whether a status update is needed.
      */
-    bool statusUpdateNeeded(int64_t nConflictsReceived);
+    bool statusUpdateNeeded();
 };
 
 #endif // TRANSACTIONRECORD_H
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 6156a2ecd233..4825713b69b2 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -167,7 +167,8 @@ class TransactionTablePriv
                 parent->endRemoveRows();
                 break;
             case CT_UPDATED:
-                emit parent->dataChanged(parent->index(lowerIndex, parent->Status), parent->index(upperIndex-1, parent->Amount));
+                // Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
+                // visible transactions.
                 break;
             }
         }
@@ -188,21 +189,20 @@ class TransactionTablePriv
             // stuck if the core is holding the locks for a longer time - for
             // example, during a wallet rescan.
             //
-            // If a status update is needed (blocks or conflicts came in since last check),
-            // update the status of this transaction from the wallet. Otherwise,
+            // If a status update is needed (blocks came in since last check),
+            //  update the status of this transaction from the wallet. Otherwise,
             // simply re-use the cached status.
             TRY_LOCK(cs_main, lockMain);
             if(lockMain)
             {
                 TRY_LOCK(wallet->cs_wallet, lockWallet);
-                if(lockWallet && rec->statusUpdateNeeded(wallet->nConflictsReceived))
+                if(lockWallet && rec->statusUpdateNeeded())
                 {
                     std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(rec->hash);
 
                     if(mi != wallet->mapWallet.end())
                     {
                         rec->updateStatus(mi->second);
-                        rec->status.cur_num_conflicts = wallet->nConflictsReceived;
                     }
                 }
             }
@@ -368,8 +368,6 @@ QString TransactionTableModel::formatTxType(const TransactionRecord *wtx) const
         return tr("Payment to yourself");
     case TransactionRecord::Generated:
         return tr("Mined");
-    case TransactionRecord::Other:
-        return tr("Other");
     default:
         return QString();
     }
@@ -545,13 +543,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         return formatTooltip(rec);
     case Qt::TextAlignmentRole:
         return column_alignments[index.column()];
-    case Qt::BackgroundColorRole:
-	if (rec->status.hasConflicting)
-            return COLOR_HASCONFLICTING_BG;
-	break;
     case Qt::ForegroundRole:
-        if (rec->status.hasConflicting)
-            return COLOR_HASCONFLICTING;
         // Non-confirmed (but not immature) as transactions are grey
         if(!rec->status.countsForBalance && rec->status.status != TransactionStatus::Immature)
         {
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 3cbf35436c58..0ad123f39d4d 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -164,14 +164,6 @@ void WalletModel::checkBalanceChanged()
 
 void WalletModel::updateTransaction(const QString &hash, int status)
 {
-	if (status == CT_GOT_CONFLICT)
-	{
-	    emit message(tr("Conflict Received"),
-		         tr("WARNING: Transaction may never be confirmed. Its input was seen being spent by another transaction on the network. Wait for confirmation!"),
-				CClientUIInterface::MSG_WARNING);
-		return;
-	}
-
     if(transactionTableModel)
         transactionTableModel->updateTransaction(hash, status);
 
diff --git a/src/ui_interface.h b/src/ui_interface.h
index a48ba237d2ca..b3df2b5a8591 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -21,8 +21,7 @@ enum ChangeType
 {
     CT_NEW,
     CT_UPDATED,
-    CT_DELETED,
-    CT_GOT_CONFLICT
+    CT_DELETED
 };
 
 /** Signals for UI communication. */
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 1fb4dba3086b..7c04743c0f0b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -274,7 +274,7 @@ bool CWallet::SetMaxVersion(int nVersion)
     return true;
 }
 
-set<uint256> CWallet::GetConflicts(const uint256& txid, bool includeEquivalent) const
+set<uint256> CWallet::GetConflicts(const uint256& txid) const
 {
     set<uint256> result;
     AssertLockHeld(cs_wallet);
@@ -292,8 +292,7 @@ set<uint256> CWallet::GetConflicts(const uint256& txid, bool includeEquivalent)
             continue;  // No conflict if zero or one spends
         range = mapTxSpends.equal_range(txin.prevout);
         for (TxSpends::const_iterator it = range.first; it != range.second; ++it)
-            if (includeEquivalent || !wtx.IsEquivalentTo(mapWallet.at(it->second)))
-                result.insert(it->second);
+            result.insert(it->second);
     }
     return result;
 }
@@ -322,7 +321,6 @@ void CWallet::SyncMetaData(pair<TxSpends::iterator, TxSpends::iterator> range)
         const uint256& hash = it->second;
         CWalletTx* copyTo = &mapWallet[hash];
         if (copyFrom == copyTo) continue;
-        if (!copyFrom->IsEquivalentTo(*copyTo)) continue;
         copyTo->mapValue = copyFrom->mapValue;
         copyTo->vOrderForm = copyFrom->vOrderForm;
         // fTimeReceivedIsTxTime not copied on purpose
@@ -610,20 +608,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
         // Notify UI of new or updated transaction
         NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED);
 
-        // Notifications for existing transactions that now have conflicts with this one
-        if (fInsertedNew)
-        {
-            BOOST_FOREACH(const uint256& conflictHash, wtxIn.GetConflicts(false))
-            {
-                CWalletTx& txConflict = mapWallet[conflictHash];
-                NotifyTransactionChanged(this, conflictHash, CT_UPDATED); //Updates UI table
-                if (IsFromMe(txConflict) || IsMine(txConflict))
-                {
-                    NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT);  //Throws dialog
-                }
-            }
-        }
-
         // notify an external script when a wallet transaction comes in or is updated
         std::string strCmd = GetArg("-walletnotify", "");
 
@@ -646,12 +630,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
         AssertLockHeld(cs_wallet);
         bool fExisted = mapWallet.count(tx.GetHash());
         if (fExisted && !fUpdate) return false;
-
-        bool fIsConflicting = IsConflicting(tx);
-        if (fIsConflicting)
-		nConflictsReceived++;
-
-        if (fExisted || IsMine(tx) || IsFromMe(tx) || fIsConflicting)
+        if (fExisted || IsMine(tx) || IsFromMe(tx))
         {
             CWalletTx wtx(this,tx);
             // Get merkle branch if transaction was found in a block
@@ -940,7 +919,7 @@ void CWallet::ReacceptWalletTransactions()
 
         int nDepth = wtx.GetDepthInMainChain();
 
-        if (!wtx.IsCoinBase() && nDepth < 0 && (IsMine(wtx) || IsFromMe(wtx)))
+        if (!wtx.IsCoinBase() && nDepth < 0)
         {
             // Try to add to memory pool
             LOCK(mempool.cs);
@@ -960,13 +939,13 @@ void CWalletTx::RelayWalletTransaction()
     }
 }
 
-set<uint256> CWalletTx::GetConflicts(bool includeEquivalent) const
+set<uint256> CWalletTx::GetConflicts() const
 {
     set<uint256> result;
     if (pwallet != NULL)
     {
         uint256 myHash = GetHash();
-        result = pwallet->GetConflicts(myHash, includeEquivalent);
+        result = pwallet->GetConflicts(myHash);
         result.erase(myHash);
     }
     return result;
diff --git a/src/wallet.h b/src/wallet.h
index eaf9e9630923..73fcfa24e081 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -144,9 +144,6 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     MasterKeyMap mapMasterKeys;
     unsigned int nMasterKeyMaxID;
 
-    // Increment to cause UI refresh, similar to new block
-    int64_t nConflictsReceived;
-
     CWallet()
     {
         SetNull();
@@ -169,7 +166,6 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         nNextResend = 0;
         nLastResend = 0;
         nTimeFirstKey = 0;
-        nConflictsReceived = 0;
     }
 
     std::map<uint256, CWalletTx> mapWallet;
@@ -322,13 +318,6 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     {
         return (GetDebit(tx, ISMINE_ALL) > 0);
     }
-    bool IsConflicting(const CTransaction& tx) const
-    {
-  	    BOOST_FOREACH(const CTxIn& txin, tx.vin)
-    	    if (mapTxSpends.count(txin.prevout))
-    	        return true;
-   	    return false;
-    }
     int64_t GetDebit(const CTransaction& tx, const isminefilter& filter) const
     {
         int64_t nDebit = 0;
@@ -401,7 +390,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     int GetVersion() { LOCK(cs_wallet); return nWalletVersion; }
 
     // Get wallet transactions that conflict with given transaction (spend same outputs)
-    std::set<uint256> GetConflicts(const uint256& txid, bool includeEquivalent) const;
+    std::set<uint256> GetConflicts(const uint256& txid) const;
 
     /** Address book entry changed.
      * @note called with lock cs_wallet held.
@@ -812,7 +801,7 @@ class CWalletTx : public CMerkleTx
 
     void RelayWalletTransaction();
 
-    std::set<uint256> GetConflicts(bool includeEquivalent=true) const;
+    std::set<uint256> GetConflicts() const;
 };
 
 

From 98e84aae7ad1e4e18d2292f1ddeeb517432b4c42 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:09:55 +0200
Subject: [PATCH 0414/1819] Revert "Relay double-spends, subject to anti-DOS"

This reverts commit d640a3ceab4f4372c2a0f738c1286cfde4b41b50.
---
 src/core.cpp      |  16 --------
 src/core.h        |   3 --
 src/init.cpp      |   1 -
 src/main.cpp      | 100 +++++++---------------------------------------
 src/main.h        |   3 --
 src/txmempool.cpp |   1 +
 6 files changed, 15 insertions(+), 109 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index b56994ecf3d1..149b3532a18f 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -124,22 +124,6 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) {
     return *this;
 }
 
-bool CTransaction::IsEquivalentTo(const CTransaction& tx) const
-{
-    if (nVersion   != tx.nVersion   ||
-        nLockTime  != tx.nLockTime  ||
-        vin.size() != tx.vin.size() ||
-        vout       != tx.vout)
-        return false;
-    for (unsigned int i = 0; i < vin.size(); i++)
-    {
-        if (vin[i].nSequence != tx.vin[i].nSequence ||
-            vin[i].prevout   != tx.vin[i].prevout)
-            return false;
-    }
-    return true;
-}
-
 int64_t CTransaction::GetValueOut() const
 {
     int64_t nValueOut = 0;
diff --git a/src/core.h b/src/core.h
index 0387336c98fd..fb64e6c08e47 100644
--- a/src/core.h
+++ b/src/core.h
@@ -255,9 +255,6 @@ class CTransaction
         return hash;
     }
 
-    // True if only scriptSigs are different
-    bool IsEquivalentTo(const CTransaction& tx) const;
-
     // Return sum of txouts.
     int64_t GetValueOut() const;
     // GetValueIn() is a method on CCoinsViewCache, because
diff --git a/src/init.cpp b/src/init.cpp
index 323192ab7962..3488a8bedf80 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1229,7 +1229,6 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("mapAddressBook.size() = %u\n",  pwalletMain ? pwalletMain->mapAddressBook.size() : 0);
 #endif
 
-    RegisterInternalSignals();
     StartNode(threadGroup);
     if (fServer)
         StartRPCThreads();
diff --git a/src/main.cpp b/src/main.cpp
index d69c2d902729..84178b16e266 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -7,7 +7,6 @@
 
 #include "addrman.h"
 #include "alert.h"
-#include "bloom.h"
 #include "chainparams.h"
 #include "checkpoints.h"
 #include "checkqueue.h"
@@ -126,10 +125,6 @@ namespace {
 
 } // anon namespace
 
-// Forward reference functions defined here:
-static const unsigned int MAX_DOUBLESPEND_BLOOM = 1000;
-static void RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter);
-
 //////////////////////////////////////////////////////////////////////////////
 //
 // dispatching functions
@@ -152,25 +147,10 @@ struct CMainSignals {
     boost::signals2::signal<void (const uint256 &)> Inventory;
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
-    // Notifies listeners of detection of a double-spent transaction. Arguments are outpoint that is
-    // double-spent, first transaction seen, double-spend transaction, and whether the second double-spend
-    // transaction was first seen in a block.
-    // Note: only notifies if the previous transaction is in the memory pool; if previous transction was in a block,
-    // then the double-spend simply fails when we try to lookup the inputs in the current UTXO set.
-    boost::signals2::signal<void (const COutPoint&, const CTransaction&, bool)> DetectedDoubleSpend;
 } g_signals;
 
 } // anon namespace
 
-void RegisterInternalSignals() {
-    static CBloomFilter doubleSpendFilter;
-    seed_insecure_rand();
-    doubleSpendFilter = CBloomFilter(MAX_DOUBLESPEND_BLOOM, 0.01, insecure_rand(), BLOOM_UPDATE_NONE);
-
-    g_signals.DetectedDoubleSpend.connect(boost::bind(RelayDoubleSpend, _1, _2, _3, doubleSpendFilter));
-}
-
-
 void RegisterWallet(CWalletInterface* pwalletIn) {
     g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
     g_signals.EraseTransaction.connect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
@@ -890,22 +870,6 @@ int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
     return nMinFee;
 }
 
-// Exponentially limit the rate of nSize flow to nLimit.  nLimit unit is thousands-per-minute.
-bool RateLimitExceeded(double& dCount, int64_t& nLastTime, int64_t nLimit, unsigned int nSize)
-{
-    static CCriticalSection csLimiter;
-    int64_t nNow = GetTime();
-
-    LOCK(csLimiter);
-
-    // Use an exponentially decaying ~10-minute window:
-    dCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
-    nLastTime = nNow;
-    if (dCount >= nLimit*10*1000)
-        return true;
-    dCount += nSize;
-    return false;
-}
 
 bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
                         bool* pfMissingInputs, bool fRejectInsaneFee)
@@ -940,10 +904,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     for (unsigned int i = 0; i < tx.vin.size(); i++)
     {
         COutPoint outpoint = tx.vin[i].prevout;
-        // Does tx conflict with a member of the pool, and is it not equivalent to that member?
-        if (pool.mapNextTx.count(outpoint) && !tx.IsEquivalentTo(*pool.mapNextTx[outpoint].ptx))
+        if (pool.mapNextTx.count(outpoint))
         {
-            g_signals.DetectedDoubleSpend(outpoint, tx, false);
+            // Disable replacement feature for now
             return false;
         }
     }
@@ -1015,15 +978,23 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         // be annoying or make others' transactions take longer to confirm.
         if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
         {
+            static CCriticalSection csFreeLimiter;
             static double dFreeCount;
-            static int64_t nLastFreeTime;
-            static int64_t nFreeLimit = GetArg("-limitfreerelay", 15);
+            static int64_t nLastTime;
+            int64_t nNow = GetTime();
+
+            LOCK(csFreeLimiter);
 
-		if (RateLimitExceeded(dFreeCount, nLastFreeTime, nFreeLimit, nSize))
+            // Use an exponentially decaying ~10-minute window:
+            dFreeCount *= pow(1.0 - 1.0/600.0, (double)(nNow - nLastTime));
+            nLastTime = nNow;
+            // -limitfreerelay unit is thousand-bytes-per-minute
+            // At default rate it would take over a month to fill 1GB
+            if (dFreeCount >= GetArg("-limitfreerelay", 15)*10*1000)
                 return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
                                  REJECT_INSUFFICIENTFEE, "insufficient priority");
-
             LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
+            dFreeCount += nSize;
         }
 
         if (fRejectInsaneFee && nFees > ::minRelayTxFee.GetFee(nSize) * 10000)
@@ -1046,49 +1017,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
-static void
-RelayDoubleSpend(const COutPoint& outPoint, const CTransaction& doubleSpend, bool fInBlock, CBloomFilter& filter)
-{
-    // Relaying double-spend attempts to our peers lets them detect when
-    // somebody might be trying to cheat them. However, blindly relaying
-    // every double-spend across the entire network gives attackers
-    // a denial-of-service attack: just generate a stream of double-spends
-    // re-spending the same (limited) set of outpoints owned by the attacker.
-    // So, we use a bloom filter and only relay (at most) the first double
-    // spend for each outpoint. False-positives ("we have already relayed")
-    // are OK, because if the peer doesn't hear about the double-spend
-    // from us they are very likely to hear about it from another peer, since
-    // each peer uses a different, randomized bloom filter.
-
-    if (fInBlock || filter.contains(outPoint)) return;
-
-    // Apply an independent rate limit to double-spend relays
-    static double dRespendCount;
-    static int64_t nLastRespendTime;
-    static int64_t nRespendLimit = GetArg("-limitrespendrelay", 100);
-    unsigned int nSize = ::GetSerializeSize(doubleSpend, SER_NETWORK, PROTOCOL_VERSION);
-
-    if (RateLimitExceeded(dRespendCount, nLastRespendTime, nRespendLimit, nSize))
-    {
-        LogPrint("mempool", "Double-spend relay rejected by rate limiter\n");
-        return;
-    }
-
-    LogPrint("mempool", "Rate limit dRespendCount: %g => %g\n", dRespendCount, dRespendCount+nSize);
-
-    // Clear the filter on average every MAX_DOUBLE_SPEND_BLOOM
-    // insertions
-    if (insecure_rand()%MAX_DOUBLESPEND_BLOOM == 0)
-        filter.clear();
-
-    filter.insert(outPoint);
-
-    RelayTransaction(doubleSpend);
-
-    // Share conflict with wallet
-    g_signals.SyncTransaction(doubleSpend, NULL);
-}
-
 
 int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
 {
diff --git a/src/main.h b/src/main.h
index 33afa06fa829..5f231fa45b38 100644
--- a/src/main.h
+++ b/src/main.h
@@ -112,9 +112,6 @@ struct CNodeStateStats;
 
 struct CBlockTemplate;
 
-/** Set up internal signal handlers **/
-void RegisterInternalSignals();
-
 /** Register a wallet to receive updates from core */
 void RegisterWallet(CWalletInterface* pwalletIn);
 /** Unregister a wallet from core */
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index a852de5da885..ebb1369e31e7 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -420,6 +420,7 @@ void CTxMemPool::remove(const CTransaction &tx, std::list<CTransaction>& removed
 void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
 {
     // Remove transactions which depend on inputs of tx, recursively
+    list<CTransaction> result;
     LOCK(cs);
     BOOST_FOREACH(const CTxIn &txin, tx.vin) {
         std::map<COutPoint, CInPoint>::iterator it = mapNextTx.find(txin.prevout);

From 8f3f94a470cdc7195efdbafd45ea03e6c707d9c8 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 17 Jul 2014 14:10:02 +0200
Subject: [PATCH 0415/1819] Revert "CBloomFilter::clear() method"

This reverts commit 8fbf03995df9a2003be603be1a930bc3373d56e0.
---
 src/bloom.cpp            | 7 -------
 src/bloom.h              | 2 --
 src/test/bloom_tests.cpp | 4 ----
 3 files changed, 13 deletions(-)

diff --git a/src/bloom.cpp b/src/bloom.cpp
index 85a2ddc1892b..26e366179cad 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -94,13 +94,6 @@ bool CBloomFilter::contains(const uint256& hash) const
     return contains(data);
 }
 
-void CBloomFilter::clear()
-{
-    vData.assign(vData.size(),0);
-    isFull = false;
-    isEmpty = true;
-}
-
 bool CBloomFilter::IsWithinSizeConstraints() const
 {
     return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;
diff --git a/src/bloom.h b/src/bloom.h
index d0caf9e9fafb..956bead87f87 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -78,8 +78,6 @@ class CBloomFilter
     bool contains(const COutPoint& outpoint) const;
     bool contains(const uint256& hash) const;
 
-    void clear();
-
     // True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
     // (catch a filter which was just deserialized which was too big)
     bool IsWithinSizeConstraints() const;
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 2cdafa4bdde7..69de3b5bb192 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -45,10 +45,6 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
         expected[i] = (char)vch[i];
 
     BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
-
-    BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
-    filter.clear();
-    BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
 }
 
 BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)

From f469f79ff8f33c8d487d48cd6af83e1c73cf0a94 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 21 Jul 2014 15:00:42 +0200
Subject: [PATCH 0416/1819] remove an unneded .c_str() in
 OpenNetworkConnection()

---
 src/net.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/net.cpp b/src/net.cpp
index b55cd72e868f..5a48cb5562e9 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1478,7 +1478,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
     if (!pszDest) {
         if (IsLocal(addrConnect) ||
             FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
-            FindNode(addrConnect.ToStringIPPort().c_str()))
+            FindNode(addrConnect.ToStringIPPort()))
             return false;
     } else if (FindNode(pszDest))
         return false;

From 9c347313f7f504d602a9d744f1ad7aee4e3d6f9a Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Mon, 21 Jul 2014 11:50:07 -0700
Subject: [PATCH 0417/1819] CBloomFilter::clear() method

---
 src/bloom.cpp            | 7 +++++++
 src/bloom.h              | 2 ++
 src/test/bloom_tests.cpp | 4 ++++
 3 files changed, 13 insertions(+)

diff --git a/src/bloom.cpp b/src/bloom.cpp
index 26e366179cad..85a2ddc1892b 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -94,6 +94,13 @@ bool CBloomFilter::contains(const uint256& hash) const
     return contains(data);
 }
 
+void CBloomFilter::clear()
+{
+    vData.assign(vData.size(),0);
+    isFull = false;
+    isEmpty = true;
+}
+
 bool CBloomFilter::IsWithinSizeConstraints() const
 {
     return vData.size() <= MAX_BLOOM_FILTER_SIZE && nHashFuncs <= MAX_HASH_FUNCS;
diff --git a/src/bloom.h b/src/bloom.h
index 956bead87f87..d0caf9e9fafb 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -78,6 +78,8 @@ class CBloomFilter
     bool contains(const COutPoint& outpoint) const;
     bool contains(const uint256& hash) const;
 
+    void clear();
+
     // True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
     // (catch a filter which was just deserialized which was too big)
     bool IsWithinSizeConstraints() const;
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 69de3b5bb192..2cdafa4bdde7 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -45,6 +45,10 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
         expected[i] = (char)vch[i];
 
     BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
+
+    BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+    filter.clear();
+    BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
 }
 
 BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)

From afa71fb3e37c729fa18ab161e0f3c930976e26e2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 22 Jul 2014 08:58:49 +0200
Subject: [PATCH 0418/1819] Harmonize importprivkey and importaddress
 documentation

---
 src/rpcdump.cpp | 26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 4193f41b49f1..ff2361482b9f 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -72,16 +72,17 @@ Value importprivkey(const Array& params, bool fHelp)
             "\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
             "\nArguments:\n"
             "1. \"bitcoinprivkey\"   (string, required) The private key (see dumpprivkey)\n"
-            "2. \"label\"            (string, optional) an optional label\n"
+            "2. \"label\"            (string, optional, default=\"\") An optional label\n"
             "3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions\n"
+            "\nNote: This call can take minutes to complete if rescan is true.\n"
             "\nExamples:\n"
             "\nDump a private key\n"
             + HelpExampleCli("dumpprivkey", "\"myaddress\"") +
-            "\nImport the private key\n"
+            "\nImport the private key with rescan\n"
             + HelpExampleCli("importprivkey", "\"mykey\"") +
-            "\nImport using a label\n"
+            "\nImport using a label and without rescan\n"
             + HelpExampleCli("importprivkey", "\"mykey\" \"testing\" false") +
-            "\nAs a json rpc call\n"
+            "\nAs a JSON-RPC call\n"
             + HelpExampleRpc("importprivkey", "\"mykey\", \"testing\", false")
         );
 
@@ -137,8 +138,21 @@ Value importaddress(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() < 1 || params.size() > 3)
         throw runtime_error(
-            "importaddress <address> [label] [rescan=true]\n"
-            "Adds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.");
+            "importaddress \"address\" ( \"label\" rescan )\n"
+            "\nAdds an address or script (in hex) that can be watched as if it were in your wallet but cannot be used to spend.\n"
+            "\nArguments:\n"
+            "1. \"address\"          (string, required) The address\n"
+            "2. \"label\"            (string, optional, default=\"\") An optional label\n"
+            "3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions\n"
+            "\nNote: This call can take minutes to complete if rescan is true.\n"
+            "\nExamples:\n"
+            "\nImport an address with rescan\n"
+            + HelpExampleCli("importaddress", "\"myaddress\"") +
+            "\nImport using a label without rescan\n"
+            + HelpExampleCli("importaddress", "\"myaddress\" \"testing\" false") +
+            "\nAs a JSON-RPC call\n"
+            + HelpExampleRpc("importaddress", "\"myaddress\", \"testing\", false")
+        );
 
     CScript script;
 

From 460b32d7b1a2014dd490b15a360d062847f8efe9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 21 Jul 2014 17:34:08 -0400
Subject: [PATCH 0419/1819] build: fix broken boost chrono check on some
 platforms

If clock_gettime is implemented outside of libc (librt in this case), configure
would fail when testing boost. Since clock_gettime is not present on all OSs,
boost only uses it when it can. Check for it in librt and add it to LIBS if
found, but don't fail if it's not (since boost won't be expecting it in this
case).

Also, reverse the link order as necessary for static libs.

Note that it's possible that there are other similar cases for boost, which may
be handled the same way.
---
 configure.ac | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index cedc34e52015..719b06da67a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,6 +392,8 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
  [ AC_MSG_RESULT(no)]
 )
 
+AC_SEARCH_LIBS([clock_gettime],[rt])
+
 LEVELDB_CPPFLAGS=
 LIBLEVELDB=
 LIBMEMENV=
@@ -460,11 +462,8 @@ dnl after 1.56.
 dnl If neither is available, abort.
 dnl If sleep_for is used, boost_chrono becomes a requirement.
 if test x$ax_cv_boost_chrono = xyes; then
-dnl Allow passing extra needed dependency libraries for boost-chrono from static gitian build
-BOOST_CHRONO_LIB="$BOOST_CHRONO_LIB $BOOST_CHRONO_EXTRALIBS"
-
 TEMP_LIBS="$LIBS"
-LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
+LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS"
 TEMP_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
 AC_TRY_LINK([
@@ -486,7 +485,7 @@ fi
 
 if test x$boost_sleep != xyes; then
 TEMP_LIBS="$LIBS"
-LIBS="$LIBS $BOOST_LIBS"
+LIBS="$BOOST_LIBS $LIBS"
 TEMP_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
 AC_TRY_LINK([

From a7ec027311ae4b14d3ea4225a875caa5a83151bb Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 22 Jul 2014 09:01:51 -0400
Subject: [PATCH 0420/1819] gitian: remove unneeded option after last commit

---
 contrib/gitian-descriptors/gitian-linux.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 65a6c3c1e9c0..30b0227bdd0e 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -59,7 +59,7 @@ script: |
     local: *;
   };' > $LINKER_SCRIPT
   function do_configure {
-      ./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-qt-bindir=$STAGING/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib -Wl,--version-script=$LINKER_SCRIPT ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt" --enable-glibc-back-compat
+      ./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-qt-bindir=$STAGING/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib -Wl,--version-script=$LINKER_SCRIPT ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" --enable-glibc-back-compat
   }
   #
   cd bitcoin

From ad08d0b95bd8e35b74f5f36cfa3c48ae9583b28c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <sipa@ulyssis.org>
Date: Wed, 23 Jul 2014 15:28:45 +0200
Subject: [PATCH 0421/1819] Bugfix: make CCoinsViewMemPool support pruned
 entries in underlying cache

---
 src/txmempool.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index ebb1369e31e7..164e2741a29c 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -602,14 +602,15 @@ void CTxMemPool::ClearPrioritisation(const uint256 hash)
 CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
 
 bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) {
-    if (base->GetCoins(txid, coins))
-        return true;
+    // If an entry in the mempool exists, always return that one, as it's guaranteed to never
+    // conflict with the underlying cache, and it cannot have pruned entries (as it contains full)
+    // transactions. First checking the underlying cache risks returning a pruned entry instead.
     CTransaction tx;
     if (mempool.lookup(txid, tx)) {
         coins = CCoins(tx, MEMPOOL_HEIGHT);
         return true;
     }
-    return false;
+    return (base->GetCoins(txid, coins) && !coins.IsPruned());
 }
 
 bool CCoinsViewMemPool::HaveCoins(const uint256 &txid) {

From 91cce1732b73c4457e474c557aaa7f343c0dc8a2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 18 Jul 2014 16:31:13 +0200
Subject: [PATCH 0422/1819] qt: Use fixed-point arithmetic in amount spinbox

Fixes various issues and cleans up code

- Fixes issue #4500: Amount widget +/- has floating point rounding artifacts
- Amount box can now be emptied again, without clearing to 0

Also aligns the amount to the right, as in other places.
---
 src/Makefile.qt.include       |   1 +
 src/qt/bitcoinamountfield.cpp | 272 +++++++++++++++++++++-------------
 src/qt/bitcoinamountfield.h   |  14 +-
 src/qt/bitcoinunits.cpp       |   7 +
 src/qt/bitcoinunits.h         |   3 +
 src/qt/sendcoinsentry.cpp     |   9 +-
 6 files changed, 190 insertions(+), 116 deletions(-)

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 75b7b683dd1b..2772bc753ace 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -145,6 +145,7 @@ BITCOIN_MM = \
 
 QT_MOC = \
   qt/bitcoin.moc \
+  qt/bitcoinamountfield.moc \
   qt/intro.moc \
   qt/overviewpage.moc \
   qt/rpcconsole.moc
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index e047c278b7ef..64660390132e 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -9,63 +9,185 @@
 #include "qvaluecombobox.h"
 
 #include <QApplication>
-#include <QDoubleSpinBox>
+#include <QAbstractSpinBox>
 #include <QHBoxLayout>
 #include <QKeyEvent>
-#include <qmath.h> // for qPow()
+#include <QLineEdit>
 
-// QDoubleSpinBox that shows SI-style thin space thousands separators
-class AmountSpinBox: public QDoubleSpinBox
+/** QSpinBox that uses fixed-point numbers internally and uses our own
+ * formatting/parsing functions.
+ */
+class AmountSpinBox: public QAbstractSpinBox
 {
+    Q_OBJECT
 public:
     explicit AmountSpinBox(QWidget *parent):
-        QDoubleSpinBox(parent)
+        QAbstractSpinBox(parent),
+        currentUnit(BitcoinUnits::BTC),
+        singleStep(100000) // satoshis
     {
+        setAlignment(Qt::AlignRight);
+
+        connect(lineEdit(), SIGNAL(textEdited(QString)), this, SIGNAL(valueChanged()));
+    }
+
+    QValidator::State validate(QString &text, int &pos) const
+    {
+        if(text.isEmpty())
+            return QValidator::Intermediate;
+        bool valid = false;
+        parse(text, &valid);
+        /* Make sure we return Intermediate so that fixup() is called on defocus */
+        return valid ? QValidator::Intermediate : QValidator::Invalid;
+    }
+
+    void fixup(QString &input) const
+    {
+        bool valid = false;
+        qint64 val = parse(input, &valid);
+        if(valid)
+        {
+            input = BitcoinUnits::format(currentUnit, val, false, BitcoinUnits::separatorAlways);
+            lineEdit()->setText(input);
+        }
     }
-    QString textFromValue(double value) const
+
+    qint64 value(bool *valid_out=0) const
     {
-        QStringList parts = QDoubleSpinBox::textFromValue(value).split(".");
-        QString quotient_str = parts[0];
-        QString remainder_str;
-        if(parts.size() > 1)
-            remainder_str = parts[1];
-
-        // Code duplication between here and BitcoinUnits::format
-        // TODO: Figure out how to share this code
-        QChar thin_sp(THIN_SP_CP);
-        int q_size = quotient_str.size();
-        if (q_size > 4)
-            for (int i = 3; i < q_size; i += 3)
-                quotient_str.insert(q_size - i, thin_sp);
-
-        int r_size = remainder_str.size();
-        if (r_size > 4)
-            for (int i = 3, adj = 0; i < r_size; i += 3, adj++)
-                remainder_str.insert(i + adj, thin_sp);
-
-        if(remainder_str.isEmpty())
-            return quotient_str;
+        return parse(text(), valid_out);
+    }
+
+    void setValue(qint64 value)
+    {
+        lineEdit()->setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways));
+        emit valueChanged();
+    }
+
+    void stepBy(int steps)
+    {
+        bool valid = false;
+        qint64 val = value(&valid);
+        val = val + steps * singleStep;
+        val = qMin(qMax(val, Q_INT64_C(0)), BitcoinUnits::maxMoney());
+        setValue(val);
+    }
+
+    StepEnabled stepEnabled() const
+    {
+        StepEnabled rv = 0;
+        if(text().isEmpty()) // Allow step-up with empty field
+            return StepUpEnabled;
+        bool valid = false;
+        qint64 val = value(&valid);
+        if(valid)
+        {
+            if(val > 0)
+                rv |= StepDownEnabled;
+            if(val < BitcoinUnits::maxMoney())
+                rv |= StepUpEnabled;
+        }
+        return rv;
+    }
+
+    void setDisplayUnit(int unit)
+    {
+        bool valid = false;
+        qint64 val = value(&valid);
+
+        currentUnit = unit;
+
+        if(valid)
+            setValue(val);
         else
-            return quotient_str + QString(".") + remainder_str;
+            clear();
     }
-    QValidator::State validate (QString &text, int &pos) const
+
+    void setSingleStep(qint64 step)
     {
-        QString s(BitcoinUnits::removeSpaces(text));
-        return QDoubleSpinBox::validate(s, pos);
+        singleStep = step;
+    }
+
+    QSize minimumSizeHint() const
+    {
+        if(cachedMinimumSizeHint.isEmpty())
+        {
+            ensurePolished();
+
+            const QFontMetrics fm(fontMetrics());
+            int h = lineEdit()->minimumSizeHint().height();
+            int w = fm.width(BitcoinUnits::format(BitcoinUnits::BTC, BitcoinUnits::maxMoney(), false, BitcoinUnits::separatorAlways));
+            w += 2; // cursor blinking space
+
+            QStyleOptionSpinBox opt;
+            initStyleOption(&opt);
+            QSize hint(w, h);
+            QSize extra(35, 6);
+            opt.rect.setSize(hint + extra);
+            extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
+                                                    QStyle::SC_SpinBoxEditField, this).size();
+            // get closer to final result by repeating the calculation
+            opt.rect.setSize(hint + extra);
+            extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
+                                                    QStyle::SC_SpinBoxEditField, this).size();
+            hint += extra;
+
+            opt.rect = rect();
+
+            cachedMinimumSizeHint = style()->sizeFromContents(QStyle::CT_SpinBox, &opt, hint, this)
+                                    .expandedTo(QApplication::globalStrut());
+        }
+        return cachedMinimumSizeHint;
+    }
+private:
+    int currentUnit;
+    qint64 singleStep;
+    mutable QSize cachedMinimumSizeHint;
+
+    /**
+     * Parse a string into a number of base monetary units and
+     * return validity.
+     * @note Must return 0 if !valid.
+     */
+    qint64 parse(const QString &text, bool *valid_out=0) const
+    {
+        qint64 val = 0;
+        bool valid = BitcoinUnits::parse(currentUnit, text, &val);
+        if(valid)
+        {
+            if(val < 0 || val > BitcoinUnits::maxMoney())
+                valid = false;
+        }
+        if(valid_out)
+            *valid_out = valid;
+        return valid ? val : 0;
     }
-    double valueFromText(const QString& text) const
+
+protected:
+    bool event(QEvent *event)
     {
-        return QDoubleSpinBox::valueFromText(BitcoinUnits::removeSpaces(text));
+        if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)
+        {
+            QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+            if (keyEvent->key() == Qt::Key_Comma)
+            {
+                // Translate a comma into a period
+                QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count());
+                return QAbstractSpinBox::event(&periodKeyEvent);
+            }
+        }
+        return QAbstractSpinBox::event(event);
     }
+
+signals:
+    void valueChanged();
 };
 
+#include "bitcoinamountfield.moc"
+
 BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
     QWidget(parent),
-    amount(0),
-    currentUnit(-1)
+    amount(0)
 {
-    nSingleStep = 100000; // satoshis
-
     amount = new AmountSpinBox(this);
     amount->setLocale(QLocale::c());
     amount->installEventFilter(this);
@@ -85,21 +207,13 @@ BitcoinAmountField::BitcoinAmountField(QWidget *parent) :
     setFocusProxy(amount);
 
     // If one if the widgets changes, the combined content changes as well
-    connect(amount, SIGNAL(valueChanged(QString)), this, SIGNAL(textChanged()));
+    connect(amount, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));
     connect(unit, SIGNAL(currentIndexChanged(int)), this, SLOT(unitChanged(int)));
 
     // Set default based on configuration
     unitChanged(unit->currentIndex());
 }
 
-void BitcoinAmountField::setText(const QString &text)
-{
-    if (text.isEmpty())
-        amount->clear();
-    else
-        amount->setValue(BitcoinUnits::removeSpaces(text).toDouble());
-}
-
 void BitcoinAmountField::clear()
 {
     amount->clear();
@@ -108,16 +222,9 @@ void BitcoinAmountField::clear()
 
 bool BitcoinAmountField::validate()
 {
-    bool valid = true;
-    if (amount->value() == 0.0)
-        valid = false;
-    else if (!BitcoinUnits::parse(currentUnit, text(), 0))
-        valid = false;
-    else if (amount->value() > BitcoinUnits::maxAmount(currentUnit))
-        valid = false;
-
+    bool valid = false;
+    value(&valid);
     setValid(valid);
-
     return valid;
 }
 
@@ -129,14 +236,6 @@ void BitcoinAmountField::setValid(bool valid)
         amount->setStyleSheet(STYLE_INVALID);
 }
 
-QString BitcoinAmountField::text() const
-{
-    if (amount->text().isEmpty())
-        return QString();
-    else
-        return amount->text();
-}
-
 bool BitcoinAmountField::eventFilter(QObject *object, QEvent *event)
 {
     if (event->type() == QEvent::FocusIn)
@@ -144,17 +243,6 @@ bool BitcoinAmountField::eventFilter(QObject *object, QEvent *event)
         // Clear invalid flag on focus
         setValid(true);
     }
-    else if (event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)
-    {
-        QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
-        if (keyEvent->key() == Qt::Key_Comma)
-        {
-            // Translate a comma into a period
-            QKeyEvent periodKeyEvent(event->type(), Qt::Key_Period, keyEvent->modifiers(), ".", keyEvent->isAutoRepeat(), keyEvent->count());
-            QApplication::sendEvent(object, &periodKeyEvent);
-            return true;
-        }
-    }
     return QWidget::eventFilter(object, event);
 }
 
@@ -167,18 +255,12 @@ QWidget *BitcoinAmountField::setupTabChain(QWidget *prev)
 
 qint64 BitcoinAmountField::value(bool *valid_out) const
 {
-    qint64 val_out = 0;
-    bool valid = BitcoinUnits::parse(currentUnit, text(), &val_out);
-    if (valid_out)
-    {
-        *valid_out = valid;
-    }
-    return val_out;
+    return amount->value(valid_out);
 }
 
 void BitcoinAmountField::setValue(qint64 value)
 {
-    setText(BitcoinUnits::format(currentUnit, value));
+    amount->setValue(value);
 }
 
 void BitcoinAmountField::setReadOnly(bool fReadOnly)
@@ -195,28 +277,7 @@ void BitcoinAmountField::unitChanged(int idx)
     // Determine new unit ID
     int newUnit = unit->itemData(idx, BitcoinUnits::UnitRole).toInt();
 
-    // Parse current value and convert to new unit
-    bool valid = false;
-    qint64 currentValue = value(&valid);
-
-    currentUnit = newUnit;
-
-    // Set max length after retrieving the value, to prevent truncation
-    amount->setDecimals(BitcoinUnits::decimals(currentUnit));
-    amount->setMaximum(qPow(10, BitcoinUnits::amountDigits(currentUnit)) - qPow(10, -amount->decimals()));
-    amount->setSingleStep((double)nSingleStep / (double)BitcoinUnits::factor(currentUnit));
-
-    if (valid)
-    {
-        // If value was valid, re-place it in the widget with the new unit
-        setValue(currentValue);
-    }
-    else
-    {
-        // If current value is invalid, just clear field
-        setText("");
-    }
-    setValid(true);
+    amount->setDisplayUnit(newUnit);
 }
 
 void BitcoinAmountField::setDisplayUnit(int newUnit)
@@ -226,6 +287,5 @@ void BitcoinAmountField::setDisplayUnit(int newUnit)
 
 void BitcoinAmountField::setSingleStep(qint64 step)
 {
-    nSingleStep = step;
-    unitChanged(unit->currentIndex());
+    amount->setSingleStep(step);
 }
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 521a9ed561b3..c713f5d68736 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -8,17 +8,18 @@
 #include <QWidget>
 
 QT_BEGIN_NAMESPACE
-class QDoubleSpinBox;
 class QValueComboBox;
 QT_END_NAMESPACE
 
+class AmountSpinBox;
+
 /** Widget for entering bitcoin amounts.
   */
 class BitcoinAmountField: public QWidget
 {
     Q_OBJECT
 
-    Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY textChanged USER true)
+    Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY valueChanged USER true)
 
 public:
     explicit BitcoinAmountField(QWidget *parent = 0);
@@ -49,20 +50,15 @@ class BitcoinAmountField: public QWidget
     QWidget *setupTabChain(QWidget *prev);
 
 signals:
-    void textChanged();
+    void valueChanged();
 
 protected:
     /** Intercept focus-in event and ',' key presses */
     bool eventFilter(QObject *object, QEvent *event);
 
 private:
-    QDoubleSpinBox *amount;
+    AmountSpinBox *amount;
     QValueComboBox *unit;
-    int currentUnit;
-    qint64 nSingleStep;
-
-    void setText(const QString &text);
-    QString text() const;
 
 private slots:
     void unitChanged(int idx);
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 21aed235cf2b..0435ebc5dc54 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -4,6 +4,8 @@
 
 #include "bitcoinunits.h"
 
+#include "core.h"
+
 #include <QStringList>
 
 BitcoinUnits::BitcoinUnits(QObject *parent):
@@ -250,3 +252,8 @@ QVariant BitcoinUnits::data(const QModelIndex &index, int role) const
     }
     return QVariant();
 }
+
+qint64 BitcoinUnits::maxMoney()
+{
+    return MAX_MONEY;
+}
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 7fa24c854228..944b4ec5303b 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -120,6 +120,9 @@ class BitcoinUnits: public QAbstractListModel
         return text;
     }
 
+    //! Return maximum number of base units (Satoshis)
+    static qint64 maxMoney();
+
 private:
     QList<BitcoinUnits::Unit> unitlist;
 };
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index e0f56f8cd270..3c0b8881ff5a 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -72,7 +72,7 @@ void SendCoinsEntry::setModel(WalletModel *model)
     if (model && model->getOptionsModel())
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
-    connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged()));
+    connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
     connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
     connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
     connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
@@ -130,6 +130,13 @@ bool SendCoinsEntry::validate()
         retval = false;
     }
 
+    // Sending a zero amount is invalid
+    if (ui->payAmount->value(0) <= 0)
+    {
+        ui->payAmount->setValid(false);
+        retval = false;
+    }
+
     // Reject dust outputs:
     if (retval && GUIUtil::isDust(ui->payTo->text(), ui->payAmount->value())) {
         ui->payAmount->setValid(false);

From 2a05101efd41f4e86a0323f5e00dd040574bc170 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 18 Jul 2014 16:36:29 +0200
Subject: [PATCH 0423/1819] qt: Remove unused functions from BitcoinUnits

Remove two functions that are now unused.
---
 src/qt/bitcoinunits.cpp | 22 ----------------------
 src/qt/bitcoinunits.h   |  4 ----
 2 files changed, 26 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 0435ebc5dc54..6f506d3f2559 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -80,28 +80,6 @@ qint64 BitcoinUnits::factor(int unit)
     }
 }
 
-qint64 BitcoinUnits::maxAmount(int unit)
-{
-    switch(unit)
-    {
-    case BTC:  return Q_INT64_C(21000000);
-    case mBTC: return Q_INT64_C(21000000000);
-    case uBTC: return Q_INT64_C(21000000000000);
-    default:   return 0;
-    }
-}
-
-int BitcoinUnits::amountDigits(int unit)
-{
-    switch(unit)
-    {
-    case BTC: return 8; // 21,000,000 (# digits, without commas)
-    case mBTC: return 11; // 21,000,000,000
-    case uBTC: return 14; // 21,000,000,000,000
-    default: return 0;
-    }
-}
-
 int BitcoinUnits::decimals(int unit)
 {
     switch(unit)
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 944b4ec5303b..be9dca601235 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -82,10 +82,6 @@ class BitcoinUnits: public QAbstractListModel
     static QString description(int unit);
     //! Number of Satoshis (1e-8) per unit
     static qint64 factor(int unit);
-    //! Max amount per unit
-    static qint64 maxAmount(int unit);
-    //! Number of amount digits (to represent max number of coins)
-    static int amountDigits(int unit);
     //! Number of decimals left
     static int decimals(int unit);
     //! Format as string

From 29eaa316944477af538b75b439a49ee1a9fc2f2a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 22 Jul 2014 09:30:04 +0200
Subject: [PATCH 0424/1819] ui: Make sure sendcoinsentry signals only connected
 once

Move signal connections to constructor where possible.
---
 src/qt/sendcoinsentry.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 3c0b8881ff5a..52545c3857bc 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -34,6 +34,12 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
     GUIUtil::setupAddressWidget(ui->payTo, this);
     // just a label for displaying bitcoin address(es)
     ui->payTo_is->setFont(GUIUtil::bitcoinAddressFont());
+
+    // Connect signals
+    connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
+    connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+    connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+    connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
 }
 
 SendCoinsEntry::~SendCoinsEntry()
@@ -72,11 +78,6 @@ void SendCoinsEntry::setModel(WalletModel *model)
     if (model && model->getOptionsModel())
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
-    connect(ui->payAmount, SIGNAL(valueChanged()), this, SIGNAL(payAmountChanged()));
-    connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
-    connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
-    connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
-
     clear();
 }
 

From 59abcefc2eec7ede6f098dbcf7323aef6e746a4a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 24 Jul 2014 15:55:49 +0200
Subject: [PATCH 0425/1819] doc: remove any mention of SOCKS4

SOCKS4 support was removed in 0127a9b, as well as the `-socks=` option.
---
 contrib/debian/examples/bitcoin.conf | 2 +-
 contrib/debian/manpages/bitcoin-qt.1 | 5 +----
 contrib/debian/manpages/bitcoind.1   | 2 +-
 doc/tor.md                           | 5 -----
 4 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf
index 0aa8674af9c8..31cca981e0a2 100644
--- a/contrib/debian/examples/bitcoin.conf
+++ b/contrib/debian/examples/bitcoin.conf
@@ -10,7 +10,7 @@
 # Run a regression test network
 #regtest=0
 
-# Connect via a socks4 proxy
+# Connect via a SOCKS5 proxy
 #proxy=127.0.0.1:9050
 
 ##############################################################
diff --git a/contrib/debian/manpages/bitcoin-qt.1 b/contrib/debian/manpages/bitcoin-qt.1
index cd478b1875cb..a023582bc025 100644
--- a/contrib/debian/manpages/bitcoin-qt.1
+++ b/contrib/debian/manpages/bitcoin-qt.1
@@ -32,10 +32,7 @@ Set database cache size in megabytes (default: 25)
 Specify connection timeout in milliseconds (default: 5000)
 .TP
 \fB\-proxy=\fR<ip:port>
-Connect through socks proxy
-.TP
-\fB\-socks=\fR<n>
-Select the version of socks proxy to use (4\-5, default: 5)
+Connect through SOCKS5 proxy
 .TP
 \fB\-tor=\fR<ip:port>
 Use proxy to reach tor hidden services (default: same as \fB\-proxy\fR)
diff --git a/contrib/debian/manpages/bitcoind.1 b/contrib/debian/manpages/bitcoind.1
index 0c191b60436b..a1b17d6077f4 100644
--- a/contrib/debian/manpages/bitcoind.1
+++ b/contrib/debian/manpages/bitcoind.1
@@ -28,7 +28,7 @@ Start minimized
 Specify data directory
 .TP
 \fB\-proxy=\fR<ip:port>
-Connect through socks4 proxy
+Connect through SOCKS5 proxy
 .TP
 \fB\-addnode=\fR<ip>
 Add a node to connect to
diff --git a/doc/tor.md b/doc/tor.md
index b5eb91e12ef4..560f71fa27c3 100644
--- a/doc/tor.md
+++ b/doc/tor.md
@@ -13,11 +13,6 @@ configure Tor.
 The first step is running Bitcoin behind a Tor proxy. This will already make all
 outgoing connections be anonymized, but more is possible.
 
-	-socks=5        SOCKS5 supports connecting-to-hostname, which can be used instead
-	                of doing a (leaking) local DNS lookup. SOCKS5 is the default,
-	                but SOCKS4 does not support this. (SOCKS4a does, but isn't
-	                implemented).
-	
 	-proxy=ip:port  Set the proxy server. If SOCKS5 is selected (default), this proxy
 	                server will be used to try to reach .onion addresses as well.
 	

From ab651b2d62778d6194ad996d29e7d447f549fc38 Mon Sep 17 00:00:00 2001
From: paveljanik <Pavel@Janik.cz>
Date: Wed, 23 Jul 2014 22:47:18 +0200
Subject: [PATCH 0426/1819] Fix typos in comments (missing i's).

---
 src/allocators.h | 2 +-
 src/version.h    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/allocators.h b/src/allocators.h
index 7012ef7e2a24..be0be7ab9637 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -131,7 +131,7 @@ class MemoryPageLocker
  * Due to the unpredictable order of static initializers, we have to make sure the
  * LockedPageManager instance exists before any other STL-based objects that use
  * secure_allocator are created. So instead of having LockedPageManager also be
- * static-intialized, it is created on demand.
+ * static-initialized, it is created on demand.
  */
 class LockedPageManager: public LockedPageManagerBase<MemoryPageLocker>
 {
diff --git a/src/version.h b/src/version.h
index 3d1abacb94ca..85c5dbf8d7ba 100644
--- a/src/version.h
+++ b/src/version.h
@@ -28,7 +28,7 @@ extern const std::string CLIENT_DATE;
 
 static const int PROTOCOL_VERSION = 70002;
 
-// intial proto version, to be increased after version/verack negotiation
+// initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
 
 // disconnect from peers older than this proto version
@@ -45,7 +45,7 @@ static const int NOBLKS_VERSION_END = 32400;
 // BIP 0031, pong message, is enabled for all versions AFTER this one
 static const int BIP0031_VERSION = 60000;
 
-// "mempool" command, enhanced "getdata" behavior starts with this version:
+// "mempool" command, enhanced "getdata" behavior starts with this version
 static const int MEMPOOL_GD_VERSION = 60002;
 
 #endif

From 0430c30af118637819f70eaf3d10a77d910639e3 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 24 Jul 2014 16:29:41 +0200
Subject: [PATCH 0427/1819] Add missing FindNode prototype to net.h

Also make the argument a const std::string & instead of pass-by-value.
---
 src/net.cpp | 2 +-
 src/net.h   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/net.cpp b/src/net.cpp
index b55cd72e868f..329e0278ca2a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -456,7 +456,7 @@ CNode* FindNode(const CNetAddr& ip)
     return NULL;
 }
 
-CNode* FindNode(std::string addrName)
+CNode* FindNode(const std::string& addrName)
 {
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
diff --git a/src/net.h b/src/net.h
index f029a8d9357a..2d9325abf98a 100644
--- a/src/net.h
+++ b/src/net.h
@@ -59,6 +59,7 @@ bool RecvLine(SOCKET hSocket, std::string& strLine);
 bool GetMyExternalIP(CNetAddr& ipRet);
 void AddressCurrentlyConnected(const CService& addr);
 CNode* FindNode(const CNetAddr& ip);
+CNode* FindNode(const std::string& addrName);
 CNode* FindNode(const CService& ip);
 CNode* ConnectNode(CAddress addrConnect, const char *pszDest = NULL);
 bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false);

From 93659379bdedc29a87fe351ba2950a2c976aebd9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 24 Jul 2014 19:00:24 +0200
Subject: [PATCH 0428/1819] Add comment about never updating nTimeOffset past
 199 samples

Refer to issue #4521 for details.
---
 src/timedata.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/timedata.cpp b/src/timedata.cpp
index 8a095d26dcaa..6c3bd9a48dc9 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -49,6 +49,24 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime)
     static CMedianFilter<int64_t> vTimeOffsets(200,0);
     vTimeOffsets.input(nOffsetSample);
     LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
+
+    // There is a known issue here (see issue #4521):
+    //
+    // - The structure vTimeOffsets contains up to 200 elements, after which
+    // any new element added to it will not increase its size, replacing the
+    // oldest element.
+    //
+    // - The condition to update nTimeOffset includes checking whether the
+    // number of elements in vTimeOffsets is odd, which will never happen after
+    // there are 200 elements.
+    //
+    // But in this case the 'bug' is protective against some attacks, and may
+    // actually explain why we've never seen attacks which manipulate the
+    // clock offset.
+    //
+    // So we should hold off on fixing this and clean it up as part of
+    // a timing cleanup that strengthens it in a number of other ways.
+    //
     if (vTimeOffsets.size() >= 5 && vTimeOffsets.size() % 2 == 1)
     {
         int64_t nMedian = vTimeOffsets.median();

From 9192ca9e3341ed82d6324ee03c8a21504fd0163e Mon Sep 17 00:00:00 2001
From: Clinton Christian <Clinton.Christian@me.com>
Date: Mon, 7 Jul 2014 23:22:23 -0400
Subject: [PATCH 0429/1819] pyminer: Fix memory leak, refactor to be more
 pythonic, maintainable, and possibly faster

Pull #4483.

Note that pyminer is not currently functional due to the removal of
getwork in cf0c47b.
---
 contrib/pyminer/pyminer.py | 457 +++++++++++++++++++------------------
 1 file changed, 237 insertions(+), 220 deletions(-)

diff --git a/contrib/pyminer/pyminer.py b/contrib/pyminer/pyminer.py
index 0a2932d66e7c..706a10b39d11 100755
--- a/contrib/pyminer/pyminer.py
+++ b/contrib/pyminer/pyminer.py
@@ -5,248 +5,265 @@
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 #
 
+import sys
+from multiprocessing import Process
 import time
-import json
-import pprint
-import hashlib
 import struct
-import re
+import hashlib
 import base64
+import re
 import httplib
-import sys
-from multiprocessing import Process
+import json
 
 ERR_SLEEP = 15
 MAX_NONCE = 1000000L
 
 settings = {}
-pp = pprint.PrettyPrinter(indent=4)
+
 
 class BitcoinRPC:
-	OBJID = 1
-
-	def __init__(self, host, port, username, password):
-		authpair = "%s:%s" % (username, password)
-		self.authhdr = "Basic %s" % (base64.b64encode(authpair))
-		self.conn = httplib.HTTPConnection(host, port, False, 30)
-	def rpc(self, method, params=None):
-		self.OBJID += 1
-		obj = { 'version' : '1.1',
-			'method' : method,
-			'id' : self.OBJID }
-		if params is None:
-			obj['params'] = []
-		else:
-			obj['params'] = params
-		self.conn.request('POST', '/', json.dumps(obj),
-			{ 'Authorization' : self.authhdr,
-			  'Content-type' : 'application/json' })
-
-		resp = self.conn.getresponse()
-		if resp is None:
-			print "JSON-RPC: no response"
-			return None
-
-		body = resp.read()
-		resp_obj = json.loads(body)
-		if resp_obj is None:
-			print "JSON-RPC: cannot JSON-decode body"
-			return None
-		if 'error' in resp_obj and resp_obj['error'] != None:
-			return resp_obj['error']
-		if 'result' not in resp_obj:
-			print "JSON-RPC: no result in object"
-			return None
-
-		return resp_obj['result']
-	def getblockcount(self):
-		return self.rpc('getblockcount')
-	def getwork(self, data=None):
-		return self.rpc('getwork', data)
+    object_id = 1
+
+    def __init__(self, host, port, username, password):
+        authpair = "{0}:{1}".format(username, password)
+        self.authhdr = "Basic {0}".format(base64.b64encode(authpair))
+        self.conn = httplib.HTTPConnection(host, port, strict=False, timeout=30)
+
+    def rpc(self, method, params=None):
+        self.object_id += 1
+        obj = {'version' : '1.1',
+               'method' : method,
+               'id' : self.object_id,
+               'params' : params or []}
+
+        self.conn.request('POST', '/', json.dumps(obj),
+            { 'Authorization' : self.authhdr,
+              'Content-type' : 'application/json' })
+
+        resp = self.conn.getresponse()
+
+        if resp is None:
+            print("JSON-RPC: no response")
+            return None
+
+        body = resp.read()
+        resp_obj = json.loads(body)
+
+        if resp_obj is None:
+            print("JSON-RPC: cannot JSON-decode body")
+            return None
+
+        if 'error' in resp_obj and resp_obj['error'] != None:
+            return resp_obj['error']
+
+        if 'result' not in resp_obj:
+            print("JSON-RPC: no result in object")
+            return None
+
+        return resp_obj['result']
+
+    def getblockcount(self):
+        return self.rpc('getblockcount')
+
+    def getwork(self, data=None):
+        return self.rpc('getwork', data)
 
 def uint32(x):
-	return x & 0xffffffffL
+    return x & 0xffffffffL
 
 def bytereverse(x):
-	return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
-			(((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))
+    return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
+            (((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))
 
 def bufreverse(in_buf):
-	out_words = []
-	for i in range(0, len(in_buf), 4):
-		word = struct.unpack('@I', in_buf[i:i+4])[0]
-		out_words.append(struct.pack('@I', bytereverse(word)))
-	return ''.join(out_words)
+    out_words = []
+
+    for i in range(0, len(in_buf), 4):
+        word = struct.unpack('@I', in_buf[i:i+4])[0]
+        out_words.append(struct.pack('@I', bytereverse(word)))
+
+    return ''.join(out_words)
 
 def wordreverse(in_buf):
-	out_words = []
-	for i in range(0, len(in_buf), 4):
-		out_words.append(in_buf[i:i+4])
-	out_words.reverse()
-	return ''.join(out_words)
+    out_words = []
+
+    for i in range(0, len(in_buf), 4):
+        out_words.append(in_buf[i:i+4])
+
+    out_words.reverse()
+
+    return ''.join(out_words)
+
 
 class Miner:
-	def __init__(self, id):
-		self.id = id
-		self.max_nonce = MAX_NONCE
-
-	def work(self, datastr, targetstr):
-		# decode work data hex string to binary
-		static_data = datastr.decode('hex')
-		static_data = bufreverse(static_data)
-
-		# the first 76b of 80b do not change
-		blk_hdr = static_data[:76]
-
-		# decode 256-bit target value
-		targetbin = targetstr.decode('hex')
-		targetbin = targetbin[::-1]	# byte-swap and dword-swap
-		targetbin_str = targetbin.encode('hex')
-		target = long(targetbin_str, 16)
-
-		# pre-hash first 76b of block header
-		static_hash = hashlib.sha256()
-		static_hash.update(blk_hdr)
-
-		for nonce in xrange(self.max_nonce):
-
-			# encode 32-bit nonce value
-			nonce_bin = struct.pack("<I", nonce)
-
-			# hash final 4b, the nonce value
-			hash1_o = static_hash.copy()
-			hash1_o.update(nonce_bin)
-			hash1 = hash1_o.digest()
-
-			# sha256 hash of sha256 hash
-			hash_o = hashlib.sha256()
-			hash_o.update(hash1)
-			hash = hash_o.digest()
-
-			# quick test for winning solution: high 32 bits zero?
-			if hash[-4:] != '\0\0\0\0':
-				continue
-
-			# convert binary hash to 256-bit Python long
-			hash = bufreverse(hash)
-			hash = wordreverse(hash)
-
-			hash_str = hash.encode('hex')
-			l = long(hash_str, 16)
-
-			# proof-of-work test:  hash < target
-			if l < target:
-				print time.asctime(), "PROOF-OF-WORK found: %064x" % (l,)
-				return (nonce + 1, nonce_bin)
-			else:
-				print time.asctime(), "PROOF-OF-WORK false positive %064x" % (l,)
-#				return (nonce + 1, nonce_bin)
-
-		return (nonce + 1, None)
-
-	def submit_work(self, rpc, original_data, nonce_bin):
-		nonce_bin = bufreverse(nonce_bin)
-		nonce = nonce_bin.encode('hex')
-		solution = original_data[:152] + nonce + original_data[160:256]
-		param_arr = [ solution ]
-		result = rpc.getwork(param_arr)
-		print time.asctime(), "--> Upstream RPC result:", result
-
-	def iterate(self, rpc):
-		work = rpc.getwork()
-		if work is None:
-			time.sleep(ERR_SLEEP)
-			return
-		if 'data' not in work or 'target' not in work:
-			time.sleep(ERR_SLEEP)
-			return
-
-		time_start = time.time()
-
-		(hashes_done, nonce_bin) = self.work(work['data'],
-						     work['target'])
-
-		time_end = time.time()
-		time_diff = time_end - time_start
-
-		self.max_nonce = long(
-			(hashes_done * settings['scantime']) / time_diff)
-		if self.max_nonce > 0xfffffffaL:
-			self.max_nonce = 0xfffffffaL
-
-		if settings['hashmeter']:
-			print "HashMeter(%d): %d hashes, %.2f Khash/sec" % (
-			      self.id, hashes_done,
-			      (hashes_done / 1000.0) / time_diff)
-
-		if nonce_bin is not None:
-			self.submit_work(rpc, work['data'], nonce_bin)
-
-	def loop(self):
-		rpc = BitcoinRPC(settings['host'], settings['port'],
-				 settings['rpcuser'], settings['rpcpass'])
-		if rpc is None:
-			return
-
-		while True:
-			self.iterate(rpc)
+    def __init__(self, id):
+        self.id = id
+        self.max_nonce = MAX_NONCE
+
+    def work(self, datastr, targetstr):
+        # decode work data hex string to binary
+        static_data = datastr.decode('hex')
+        static_data = bufreverse(static_data)
+
+        # the first 76b of 80b do not change
+        blk_hdr = static_data[:76]
+
+        # decode 256-bit target value
+        targetbin = targetstr.decode('hex')
+        targetbin = targetbin[::-1]    # byte-swap and dword-swap
+        targetbin_str = targetbin.encode('hex')
+        target = long(targetbin_str, 16)
+
+        # pre-hash first 76b of block header
+        static_hash = hashlib.sha256()
+        static_hash.update(blk_hdr)
+
+        for nonce in xrange(self.max_nonce):
+
+            # encode 32-bit nonce value
+            nonce_bin = struct.pack("<I", nonce)
+
+            # hash final 4b, the nonce value
+            hash1_o = static_hash.copy()
+            hash1_o.update(nonce_bin)
+            hash1 = hash1_o.digest()
+
+            # sha256 hash of sha256 hash
+            hash_o = hashlib.sha256()
+            hash_o.update(hash1)
+            hash = hash_o.digest()
+
+            # quick test for winning solution: high 32 bits zero?
+            if hash[-4:] != '\0\0\0\0':
+                continue
+
+            # convert binary hash to 256-bit Python long
+            hash = bufreverse(hash)
+            hash = wordreverse(hash)
+
+            hash_str = hash.encode('hex')
+            long_hash = long(hash_str, 16)
+
+            # proof-of-work test:  hash < target
+            if long_hash < target:
+                print(time.asctime(), "PROOF-OF-WORK found: "
+                                      "{0:064x}".format(long_hash))
+                return (nonce + 1, nonce_bin)
+            else:
+                print(time.asctime(), "PROOF-OF-WORK false"
+                                      "positive {0:064x}".format(long_hash))
+
+        return (nonce + 1, None)
+
+    def submit_work(self, rpc, original_data, nonce_bin):
+        nonce_bin = bufreverse(nonce_bin)
+        nonce = nonce_bin.encode('hex')
+        solution = original_data[:152] + nonce + original_data[160:256]
+        param_arr = [ solution ]
+        result = rpc.getwork(param_arr)
+
+        print(time.asctime(), "--> Upstream RPC result:", result)
+
+    def iterate(self, rpc):
+        work = rpc.getwork()
+
+        if work is None:
+            time.sleep(ERR_SLEEP)
+            return
+
+        if 'data' not in work or 'target' not in work:
+            time.sleep(ERR_SLEEP)
+            return
+
+        time_start = time.time()
+
+        (hashes_done, nonce_bin) = self.work(work['data'],
+                             work['target'])
+
+        time_end = time.time()
+        time_diff = time_end - time_start
+
+        self.max_nonce = long(
+            (hashes_done * settings['scantime']) / time_diff)
+
+        if self.max_nonce > 0xfffffffaL:
+            self.max_nonce = 0xfffffffaL
+
+        if settings['hashmeter']:
+            print("HashMeter({:d}): {:d} hashes, {:.2f} Khash/sec".format(
+                  self.id, hashes_done, (hashes_done / 1000.0) / time_diff))
+
+        if nonce_bin is not None:
+            self.submit_work(rpc, work['data'], nonce_bin)
+
+    def loop(self):
+        rpc = BitcoinRPC(settings['host'], settings['port'],
+                 settings['rpcuser'], settings['rpcpass'])
+
+        if rpc is not None:
+
+            while True:
+                self.iterate(rpc)
+        
+        self.conn.close()
+
 
 def miner_thread(id):
-	miner = Miner(id)
-	miner.loop()
+    miner = Miner(id)
+    miner.loop()
 
 if __name__ == '__main__':
-	if len(sys.argv) != 2:
-		print "Usage: pyminer.py CONFIG-FILE"
-		sys.exit(1)
-
-	f = open(sys.argv[1])
-	for line in f:
-		# skip comment lines
-		m = re.search('^\s*#', line)
-		if m:
-			continue
-
-		# parse key=value lines
-		m = re.search('^(\w+)\s*=\s*(\S.*)$', line)
-		if m is None:
-			continue
-		settings[m.group(1)] = m.group(2)
-	f.close()
-
-	if 'host' not in settings:
-		settings['host'] = '127.0.0.1'
-	if 'port' not in settings:
-		settings['port'] = 8332
-	if 'threads' not in settings:
-		settings['threads'] = 1
-	if 'hashmeter' not in settings:
-		settings['hashmeter'] = 0
-	if 'scantime' not in settings:
-		settings['scantime'] = 30L
-	if 'rpcuser' not in settings or 'rpcpass' not in settings:
-		print "Missing username and/or password in cfg file"
-		sys.exit(1)
-
-	settings['port'] = int(settings['port'])
-	settings['threads'] = int(settings['threads'])
-	settings['hashmeter'] = int(settings['hashmeter'])
-	settings['scantime'] = long(settings['scantime'])
-
-	thr_list = []
-	for thr_id in range(settings['threads']):
-		p = Process(target=miner_thread, args=(thr_id,))
-		p.start()
-		thr_list.append(p)
-		time.sleep(1)			# stagger threads
-
-	print settings['threads'], "mining threads started"
-
-	print time.asctime(), "Miner Starts - %s:%s" % (settings['host'], settings['port'])
-	try:
-		for thr_proc in thr_list:
-			thr_proc.join()
-	except KeyboardInterrupt:
-		pass
-	print time.asctime(), "Miner Stops - %s:%s" % (settings['host'], settings['port'])
-
+    if len(sys.argv) != 2:
+        print("Usage: pyminer.py CONFIG-FILE")
+        sys.exit(1)
+
+    with open(sys.argv[1]) as f:
+
+        for line in f:
+            # skip comment lines
+            m = re.search('^\s*#', line)
+            if m:
+                continue
+
+            # parse key=value lines
+            m = re.search('^(\w+)\s*=\s*(\S.*)$', line)
+            if m is None:
+                continue
+
+            settings[m.group(1)] = m.group(2)
+
+    settings.setdefault('host', '127.0.0.1')
+    settings.setdefault('port', 8332)
+    settings.setdefault('threads', 1)
+    settings.setdefault('hashmeter', 0)
+    settings.setdefault('scantime', 30L)
+
+    if 'rpcuser' not in settings or 'rpcpass' not in settings:
+        print("Missing username and/or password in cfg file")
+        sys.exit(1)
+
+    settings['port'] = int(settings['port'])
+    settings['threads'] = int(settings['threads'])
+    settings['hashmeter'] = int(settings['hashmeter'])
+    settings['scantime'] = long(settings['scantime'])
+
+    thread_list = []
+
+    for thread_id in range(settings['threads']):
+        p = Process(target=miner_thread, args=(thread_id,))
+        p.start()
+        thread_list.append(p)
+        time.sleep(1) # stagger threads
+
+    print(settings['threads'], "mining threads started")
+
+    print(time.asctime(), "Miner Starts - {0}:{1}".format(settings['host'],
+                                                          settings['port']))
+    try:
+        for thread_process in thread_list:
+            thread_process.join()
+    except KeyboardInterrupt:
+        pass
+
+    print(time.asctime(), "Miner Stops - {0}:{1}".format(settings['host'],
+                                                         settings['port']))

From f65352a7d06e2cf6761115e1d91a2a585fd47796 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 25 Jul 2014 17:43:41 +0200
Subject: [PATCH 0430/1819] [Qt] small Qt-only include cleanup

---
 src/qt/optionsdialog.cpp         | 4 ++--
 src/qt/transactiondesc.cpp       | 2 +-
 src/qt/transactiontablemodel.cpp | 2 +-
 src/qt/transactiontablemodel.h   | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 597be40abdf6..0117d2e63359 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -15,11 +15,11 @@
 #include "optionsmodel.h"
 
 #include "main.h" // for MAX_SCRIPTCHECK_THREADS
+#include "netbase.h"
+#include "txdb.h" // for -dbcache defaults
 #ifdef ENABLE_WALLET
 #include "wallet.h" // for CWallet::minTxFee
 #endif
-#include "netbase.h"
-#include "txdb.h" // for -dbcache defaults
 
 #include <QDir>
 #include <QIntValidator>
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index ac1614efd03e..4f6e3169f5a2 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -11,11 +11,11 @@
 #include "db.h"
 #include "main.h"
 #include "paymentserver.h"
+#include "script.h"
 #include "transactionrecord.h"
 #include "timedata.h"
 #include "ui_interface.h"
 #include "wallet.h"
-#include "script.h"
 
 #include <stdint.h>
 #include <string>
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 4825713b69b2..7acb0e8871b4 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -577,7 +577,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case ConfirmedRole:
         return rec->status.countsForBalance;
     case FormattedAmountRole:
-	// Used for copy/export, so don't include separators
+        // Used for copy/export, so don't include separators
         return formatTxAmount(rec, false, BitcoinUnits::separatorNever);
     case StatusRole:
         return rec->status.status;
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index ad88d14a9039..2124d3dd1c7f 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -5,11 +5,11 @@
 #ifndef TRANSACTIONTABLEMODEL_H
 #define TRANSACTIONTABLEMODEL_H
 
+#include "bitcoinunits.h"
+
 #include <QAbstractTableModel>
 #include <QStringList>
 
-#include "bitcoinunits.h"
-
 class TransactionRecord;
 class TransactionTablePriv;
 class WalletModel;

From d70bc52ee31b8c4c87ee011625e7031c2dc89c0c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 26 Jul 2014 22:49:17 +0200
Subject: [PATCH 0431/1819] Rework block processing benchmark code

* Replace -benchmark (and the related fBenchmark) with a regular debug option, -debug=bench.
* Increase coverage and granularity of individual block processing steps.
* Add cummulative times.
---
 src/init.cpp |  7 ++++---
 src/main.cpp | 50 +++++++++++++++++++++++++++++++++++++-------------
 src/main.h   |  1 -
 3 files changed, 41 insertions(+), 17 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 3488a8bedf80..8b6567b5c417 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -285,7 +285,6 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "\n" + _("Debugging/Testing options:") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
-        strUsage += "  -benchmark             " + _("Show benchmark information (default: 0)") + "\n";
         strUsage += "  -checkpoints           " + _("Only accept block chain matching built-in checkpoints (default: 1)") + "\n";
         strUsage += "  -dblogsize=<n>         " + _("Flush database activity from memory pool to disk log every <n> megabytes (default: 100)") + "\n";
         strUsage += "  -disablesafemode       " + _("Disable safemode, override a real safe mode event (default: 0)") + "\n";
@@ -298,7 +297,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -debug=<category>      " + _("Output debugging information (default: 0, supplying <category> is optional)") + "\n";
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:");
-    strUsage +=                                 " addrman, alert, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below
+    strUsage +=                                 " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
@@ -599,7 +598,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (GetBoolArg("-tor", false))
         return InitError(_("Error: Unsupported argument -tor found, use -onion."));
 
-    fBenchmark = GetBoolArg("-benchmark", false);
+    if (GetBoolArg("-benchmark", false))
+        InitWarning(_("Warning: Unsupported argument -benchmark ignored, use -debug=bench."));
+
     // Checkmempool defaults to true in regtest mode
     mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultCheckMemPool()));
     Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
diff --git a/src/main.cpp b/src/main.cpp
index 06ce15b5b3da..85e0851895af 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -45,7 +45,6 @@ CConditionVariable cvBlockChange;
 int nScriptCheckThreads = 0;
 bool fImporting = false;
 bool fReindex = false;
-bool fBenchmark = false;
 bool fTxIndex = false;
 bool fIsBareMultisigStd = true;
 unsigned int nCoinCacheSize = 5000;
@@ -1680,6 +1679,12 @@ void ThreadScriptCheck() {
     scriptcheckqueue.Thread();
 }
 
+static int64_t nTimeVerify = 0;
+static int64_t nTimeConnect = 0;
+static int64_t nTimeIndex = 0;
+static int64_t nTimeCallbacks = 0;
+static int64_t nTimeTotal = 0;
+
 bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck)
 {
     AssertLockHeld(cs_main);
@@ -1735,7 +1740,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 
     CCheckQueueControl<CScriptCheck> control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL);
 
-    int64_t nStart = GetTimeMicros();
+    int64_t nTimeStart = GetTimeMicros();
     int64_t nFees = 0;
     int nInputs = 0;
     unsigned int nSigOps = 0;
@@ -1785,9 +1790,8 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
         vPos.push_back(std::make_pair(tx.GetHash(), pos));
         pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);
     }
-    int64_t nTime = GetTimeMicros() - nStart;
-    if (fBenchmark)
-        LogPrintf("- Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin)\n", (unsigned)block.vtx.size(), 0.001 * nTime, 0.001 * nTime / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * nTime / (nInputs-1));
+    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))
         return state.DoS(100,
@@ -1797,9 +1801,8 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 
     if (!control.Wait())
         return state.DoS(100, false);
-    int64_t nTime2 = GetTimeMicros() - nStart;
-    if (fBenchmark)
-        LogPrintf("- Verify %u txins: %.2fms (%.3fms/txin)\n", nInputs - 1, 0.001 * nTime2, nInputs <= 1 ? 0 : 0.001 * nTime2 / (nInputs-1));
+    int64_t nTime2 = GetTimeMicros(); nTimeVerify += nTime2 - nTimeStart;
+    LogPrint("bench", "    - Verify %u txins: %.2fms (%.3fms/txin) [%.2fs]\n", nInputs - 1, 0.001 * (nTime2 - nTimeStart), nInputs <= 1 ? 0 : 0.001 * (nTime2 - nTimeStart) / (nInputs-1), nTimeVerify * 0.000001);
 
     if (fJustCheck)
         return true;
@@ -1840,6 +1843,9 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     ret = view.SetBestBlock(pindex->GetBlockHash());
     assert(ret);
 
+    int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
+    LogPrint("bench", "    - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
+
     // Watch for transactions paying to me
     BOOST_FOREACH(const CTransaction& tx, block.vtx)
         g_signals.SyncTransaction(tx, &block);
@@ -1849,6 +1855,9 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     g_signals.UpdatedTransaction(hashPrevBestCoinBase);
     hashPrevBestCoinBase = block.vtx[0].GetHash();
 
+    int64_t nTime4 = GetTimeMicros(); nTimeCallbacks += nTime4 - nTime3;
+    LogPrint("bench", "    - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime4 - nTime3), nTimeCallbacks * 0.000001);
+
     return true;
 }
 
@@ -1928,8 +1937,7 @@ bool static DisconnectTip(CValidationState &state) {
             return error("DisconnectTip() : DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString());
         assert(view.Flush());
     }
-    if (fBenchmark)
-        LogPrintf("- Disconnect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
+    LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
     // Write the chain state to disk, if necessary.
     if (!WriteChainState(state))
         return false;
@@ -1953,16 +1961,25 @@ bool static DisconnectTip(CValidationState &state) {
     return true;
 }
 
+static int64_t nTimeReadFromDisk = 0;
+static int64_t nTimeConnectTotal = 0;
+static int64_t nTimeFlush = 0;
+static int64_t nTimeChainState = 0;
+static int64_t nTimePostConnect = 0;
+
 // Connect a new block to chainActive.
 bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     assert(pindexNew->pprev == chainActive.Tip());
     mempool.check(pcoinsTip);
     // Read block from disk.
+    int64_t nTime1 = GetTimeMicros();
     CBlock block;
     if (!ReadBlockFromDisk(block, pindexNew))
         return state.Abort(_("Failed to read block"));
     // Apply the block atomically to the chain state.
-    int64_t nStart = GetTimeMicros();
+    int64_t nTime2 = GetTimeMicros(); nTimeReadFromDisk += nTime2 - nTime1;
+    int64_t nTime3;
+    LogPrint("bench", "  - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001);
     {
         CCoinsViewCache view(*pcoinsTip, true);
         CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
@@ -1972,13 +1989,17 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
             return error("ConnectTip() : ConnectBlock %s failed", pindexNew->GetBlockHash().ToString());
         }
         mapBlockSource.erase(inv.hash);
+        nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
+        LogPrint("bench", "  - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
         assert(view.Flush());
     }
-    if (fBenchmark)
-        LogPrintf("- Connect: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
+    int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
+    LogPrint("bench", "  - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
     // Write the chain state to disk, if necessary.
     if (!WriteChainState(state))
         return false;
+    int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
+    LogPrint("bench", "  - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
     // Remove conflicting transactions from the mempool.
     list<CTransaction> txConflicted;
     mempool.removeForBlock(block.vtx, pindexNew->nHeight, txConflicted);
@@ -1994,6 +2015,9 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
         SyncWithWallets(tx, &block);
     }
+    int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
+    LogPrint("bench", "  - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
+    LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);
     return true;
 }
 
diff --git a/src/main.h b/src/main.h
index 5f231fa45b38..48ec86f6a892 100644
--- a/src/main.h
+++ b/src/main.h
@@ -91,7 +91,6 @@ extern CWaitableCriticalSection csBestBlock;
 extern CConditionVariable cvBlockChange;
 extern bool fImporting;
 extern bool fReindex;
-extern bool fBenchmark;
 extern int nScriptCheckThreads;
 extern bool fTxIndex;
 extern bool fIsBareMultisigStd;

From 17f15678d399275a093be496914c59b463929fe4 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Fri, 25 Jul 2014 21:21:10 -0400
Subject: [PATCH 0432/1819] Fixed a bug with index bounds checking

---
 src/txmempool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 164e2741a29c..0725441fba3f 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -299,7 +299,7 @@ class CMinerPolicyEstimator
         size_t nPrevSize = 0;
         for (int i = 0; i < nBlocksToConfirm; i++)
             nPrevSize += history.at(i).PrioritySamples();
-        size_t index = min(nPrevSize + nBucketSize/2, sortedFeeSamples.size()-1);
+        size_t index = min(nPrevSize + nBucketSize/2, sortedPrioritySamples.size()-1);
         return sortedPrioritySamples[index];
     }
 

From d817187bdbeacb2eb6bd23d7faa38e667770e7e6 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 28 Jul 2014 14:47:27 +0200
Subject: [PATCH 0433/1819] [Qt] remove ProxySocksVersion from OptionID

- we only support SOCKS5, so remove it
---
 src/qt/optionsmodel.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 89c2ec745305..9699f6eea637 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -32,7 +32,6 @@ class OptionsModel : public QAbstractListModel
         ProxyUse,               // bool
         ProxyIP,                // QString
         ProxyPort,              // int
-        ProxySocksVersion,      // int
         Fee,                    // qint64
         DisplayUnit,            // BitcoinUnits::Unit
         DisplayAddresses,       // bool

From 961ae93c85cee96c5dca3d44fbfb829243607f65 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Fri, 25 Jul 2014 21:29:54 -0400
Subject: [PATCH 0434/1819] Fix minor bug which only affected log messages.

---
 src/txmempool.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 0725441fba3f..a06de7a94738 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -225,6 +225,12 @@ class CMinerPolicyEstimator
                 seenTxConfirm(feeRate, minRelayFee, dPriority, i);
             }
         }
+
+        //After new samples are added, we have to clear the sorted lists,
+        //so they'll be resorted the next time someone asks for an estimate
+        sortedFeeSamples.clear();
+        sortedPrioritySamples.clear();
+
         for (size_t i = 0; i < history.size(); i++) {
             if (history[i].FeeSamples() + history[i].PrioritySamples() > 0)
                 LogPrint("estimatefee", "estimates: for confirming within %d blocks based on %d/%d samples, fee=%s, prio=%g\n", 
@@ -232,8 +238,6 @@ class CMinerPolicyEstimator
                          history[i].FeeSamples(), history[i].PrioritySamples(),
                          estimateFee(i+1).ToString(), estimatePriority(i+1));
         }
-        sortedFeeSamples.clear();
-        sortedPrioritySamples.clear();
     }
 
     // Can return CFeeRate(0) if we don't have any data for that many blocks back. nBlocksToConfirm is 1 based.

From f9de17ec2f3e22fe9d96557e328af836a3590660 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 28 Jul 2014 19:30:43 +0200
Subject: [PATCH 0435/1819] Add warning comment to getinfo

Warn that people should not add new information, or change current
information returned by getinfo.
---
 src/rpcmisc.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index cff795bdf497..bd992397b87b 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -27,6 +27,19 @@ using namespace boost::assign;
 using namespace json_spirit;
 using namespace std;
 
+/**
+ * @note Do not add or change anything in the information returned by this
+ * method. `getinfo` exists for backwards-compatibilty only. It combines
+ * information from wildly different sources in the program, which is a mess,
+ * and is thus planned to be deprecated eventually.
+ *
+ * Based on the source of the information, new information should be added to:
+ * - `getblockchaininfo`,
+ * - `getnetworkinfo` or
+ * - `getwalletinfo`
+ *
+ * Or alternatively, create a specific query method for the information.
+ **/
 Value getinfo(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() != 0)

From 2887bffcfdc138f53c60091ab2906790971c9af5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 9 Jul 2014 18:17:23 +0200
Subject: [PATCH 0436/1819] Update coding style and add .clang-format

---
 doc/coding.md     | 76 +++++++++++++++++++----------------------------
 src/.clang-format | 51 +++++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 45 deletions(-)
 create mode 100644 src/.clang-format

diff --git a/doc/coding.md b/doc/coding.md
index 2f332e92f0e9..ceed8c18b40f 100644
--- a/doc/coding.md
+++ b/doc/coding.md
@@ -1,29 +1,17 @@
 Coding
 ====================
 
-Please be consistent with the existing coding style.
-
-Block style:
-```c++
-    bool Function(char* psz, int n)
-    {
-        // Comment summarising what this section of code does
-        for (int i = 0; i < n; i++)
-        {
-            // When something fails, return early
-            if (!Something())
-                return false;
-            ...
-        }
-
-        // Success return is usually at the end
-        return true;
-    }
-```
-- ANSI/Allman block style
-- 4 space indenting, no tabs
-- No extra spaces inside parenthesis; please don't do ( this )
-- No space after function names, one space after if, for and while
+Various coding styles have been used during the history of the codebase,
+and the result is not very consistent. However, we're now trying to converge to
+a single style, so please use it in new code. Old code will be converted
+gradually.
+- Basic rules specified in src/.clang-format. Use a recent clang-format-3.5 to format automatically.
+  - Braces on new lines for namespaces, classes, functions, methods.
+  - Braces on the same line for everything else.
+  - 4 space indentation (no tabs) for every block except namespaces.
+  - No indentation for public/protected/private or for namespaces.
+  - No extra spaces inside parenthesis; don't do ( this )
+  - No space after function names; one space after if, for and while.
 - Includes need to be ordered alphabetically, separate own and foreign headers with a new-line (example key.cpp):
 ```c++
 #include "key.h"
@@ -38,31 +26,29 @@ Block style:
 class CAlpha;
 class CBeta;
 ```
-- When using namespace keyword use the following form:
-```c++
-namespace Foo {
 
-...
+Block style example:
+```c++
+namespace foo
+{
+class Class
+{
+    bool Function(char* psz, int n)
+    {
+        // Comment summarising what this section of code does
+        for (int i = 0; i < n; i++) {
+            // When something fails, return early
+            if (!Something())
+                return false;
+            ...
+        }
 
-} // Foo
+        // Success return is usually at the end
+        return true;
+    }
+}
+}
 ```
-Variable names begin with the type in lowercase, like nSomeVariable.
-Please don't put the first word of the variable name in lowercase like
-someVariable.
-
-Common types:
-
-    n       integer number: short, unsigned short, int, unsigned int, int64, uint64, sometimes char if used as a number
-    d       double, float
-    f       flag
-    hash    uint256
-    p       pointer or array, one p for each level of indirection
-    psz     pointer to null terminated string
-    str     string object
-    v       vector or similar list objects
-    map     map or multimap
-    set     set or multiset
-    bn      CBigNum
 
 Doxygen comments
 -----------------
diff --git a/src/.clang-format b/src/.clang-format
new file mode 100644
index 000000000000..226a15d185af
--- /dev/null
+++ b/src/.clang-format
@@ -0,0 +1,51 @@
+AccessModifierOffset: -4
+AlignEscapedNewlinesLeft: true
+AlignTrailingComments: true
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: false
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: true
+BinPackParameters: false
+BreakBeforeBinaryOperators: false
+BreakBeforeBraces: Linux
+BreakBeforeTernaryOperators: false
+BreakConstructorInitializersBeforeComma: false
+ColumnLimit:     0
+CommentPragmas:  '^ IWYU pragma:'
+ConstructorInitializerAllOnOneLineOrOnePerLine: false
+ConstructorInitializerIndentWidth: 4
+ContinuationIndentWidth: 4
+Cpp11BracedListStyle: true
+DerivePointerAlignment: false
+DisableFormat:   false
+ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH, BOOST_REVERSE_FOREACH ]
+IndentCaseLabels: false
+IndentFunctionDeclarationAfterType: false
+IndentWidth:     4
+KeepEmptyLinesAtTheStartOfBlocks: false
+Language:        Cpp
+MaxEmptyLinesToKeep: 2
+NamespaceIndentation: None
+ObjCSpaceAfterProperty: false
+ObjCSpaceBeforeProtocolList: false
+PenaltyBreakBeforeFirstCallParameter: 1
+PenaltyBreakComment: 300
+PenaltyBreakFirstLessLess: 120
+PenaltyBreakString: 1000
+PenaltyExcessCharacter: 1000000
+PenaltyReturnTypeOnItsOwnLine: 200
+PointerAlignment: Left
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: false
+SpacesBeforeTrailingComments: 1
+SpacesInAngles:  false
+SpacesInContainerLiterals: true
+SpacesInCStyleCastParentheses: false
+SpacesInParentheses: false
+Standard:        Cpp03
+TabWidth:        8
+UseTab:          Never

From 29203228710de3e180914c1d66f48dd7e41270a0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 29 Jul 2014 09:53:23 +0200
Subject: [PATCH 0437/1819] Remove hopelessly outdated build-msw.md

Anyone building bitcoind/-qt on windows is welcome to contribute
a new one. The current information in this document is outdated,
or otherwise mostly worthless.
---
 doc/build-msw.md | 83 ------------------------------------------------
 1 file changed, 83 deletions(-)
 delete mode 100644 doc/build-msw.md

diff --git a/doc/build-msw.md b/doc/build-msw.md
deleted file mode 100644
index 9e4eaee3f596..000000000000
--- a/doc/build-msw.md
+++ /dev/null
@@ -1,83 +0,0 @@
-WINDOWS BUILD NOTES
-===================
-
-
-Compilers Supported
--------------------
-TODO: What works?
-Note: releases are cross-compiled using mingw running on Linux.
-
-
-Dependencies
-------------
-Libraries you need to download separately and build:
-
-	name            default path               download
-	--------------------------------------------------------------------------------------------------------------------
-	OpenSSL         \openssl-1.0.1c-mgw        http://www.openssl.org/source/
-	Berkeley DB     \db-4.8.30.NC-mgw          http://www.oracle.com/technology/software/products/berkeley-db/index.html
-	Boost           \boost-1.50.0-mgw          http://www.boost.org/users/download/
-	miniupnpc       \miniupnpc-1.6-mgw         http://miniupnp.tuxfamily.org/files/
-
-Their licenses:
-
-	OpenSSL        Old BSD license with the problematic advertising requirement
-	Berkeley DB    New BSD license with additional requirement that linked software must be free open source
-	Boost          MIT-like license
-	miniupnpc      New (3-clause) BSD license
-
-Versions used in this release:
-
-	OpenSSL      1.0.1c
-	Berkeley DB  4.8.30.NC
-	Boost        1.50.0
-	miniupnpc    1.6
-
-
-OpenSSL
--------
-MSYS shell:
-
-un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
-change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
-
-	cd /c/openssl-1.0.1c-mgw
-	./config
-	make
-
-Berkeley DB
------------
-MSYS shell:
-
-	cd /c/db-4.8.30.NC-mgw/build_unix
-	sh ../dist/configure --enable-mingw --enable-cxx
-	make
-
-Boost
------
-MSYS shell:
-
-	downloaded boost jam 3.1.18
-	cd \boost-1.50.0-mgw
-	bjam toolset=gcc --build-type=complete stage
-
-MiniUPnPc
----------
-UPnP support is optional, make with `USE_UPNP=` to disable it.
-
-MSYS shell:
-
-	cd /c/miniupnpc-1.6-mgw
-	make -f Makefile.mingw
-	mkdir miniupnpc
-	cp *.h miniupnpc/
-
-Bitcoin
--------
-MSYS shell:
-
-	cd \bitcoin
-	sh autogen.sh
-	sh configure
-	mingw32-make
-	strip bitcoind.exe

From 403c1bf0fbff2c7cb20afbd4413f36267029deef Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 29 Jul 2014 09:58:14 +0200
Subject: [PATCH 0438/1819] contrib: remove getwork-based pyminer

As the `getwork` API doesn't exist anymore, currently this script is useless.

It would be nice to have a `getblocktemplate`-based Python example of a
miner, but there is no point in keeping this one around except to
confuse people.
---
 contrib/README.md                  |   4 -
 contrib/pyminer/README.md          |   8 -
 contrib/pyminer/example-config.cfg |  32 ----
 contrib/pyminer/pyminer.py         | 269 -----------------------------
 4 files changed, 313 deletions(-)
 delete mode 100644 contrib/pyminer/README.md
 delete mode 100644 contrib/pyminer/example-config.cfg
 delete mode 100755 contrib/pyminer/pyminer.py

diff --git a/contrib/README.md b/contrib/README.md
index 63b1875d3075..dae975e9efc2 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -19,10 +19,6 @@ Contains the script `github-merge.sh` for merging github pull requests securely
 ### [Linearize](/contrib/linearize) ###
 Construct a linear, no-fork, best version of the blockchain.
 
-### [PyMiner](/contrib/pyminer) ###
-
-This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow.  The purpose is to provide a reference implementation of a miner in order to study and develop other mining programs.
-
 ### [Qos](/contrib/qos) ###
 
 A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
diff --git a/contrib/pyminer/README.md b/contrib/pyminer/README.md
deleted file mode 100644
index 3b20f2fdeac1..000000000000
--- a/contrib/pyminer/README.md
+++ /dev/null
@@ -1,8 +0,0 @@
-### PyMiner ###
-
-This is a 'getwork' CPU mining client for Bitcoin. It is pure-python, and therefore very, very slow.  The purpose is to provide a reference implementation of a miner, for study.
-
-### Other Resources ###
-
-- [BitcoinTalk Thread](https://bitcointalk.org/index.php?topic=3546.0)
-- [Jgarzik Repo](https://github.com/jgarzik/pyminer)
\ No newline at end of file
diff --git a/contrib/pyminer/example-config.cfg b/contrib/pyminer/example-config.cfg
deleted file mode 100644
index 103e7c137259..000000000000
--- a/contrib/pyminer/example-config.cfg
+++ /dev/null
@@ -1,32 +0,0 @@
-
-#
-# RPC login details
-#
-host=127.0.0.1
-port=8332
-
-rpcuser=myusername
-rpcpass=mypass
-
-
-#
-# mining details
-#
-
-threads=4
-
-# periodic rate for requesting new work, if solution not found
-scantime=60
-
-
-#
-# misc.
-#
-
-# not really used right now
-logdir=/tmp/pyminer
-
-# set to 1, to enable hashmeter output
-hashmeter=0
-
-
diff --git a/contrib/pyminer/pyminer.py b/contrib/pyminer/pyminer.py
deleted file mode 100755
index 706a10b39d11..000000000000
--- a/contrib/pyminer/pyminer.py
+++ /dev/null
@@ -1,269 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (c) 2011 The Bitcoin developers
-# Distributed under the MIT/X11 software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-
-import sys
-from multiprocessing import Process
-import time
-import struct
-import hashlib
-import base64
-import re
-import httplib
-import json
-
-ERR_SLEEP = 15
-MAX_NONCE = 1000000L
-
-settings = {}
-
-
-class BitcoinRPC:
-    object_id = 1
-
-    def __init__(self, host, port, username, password):
-        authpair = "{0}:{1}".format(username, password)
-        self.authhdr = "Basic {0}".format(base64.b64encode(authpair))
-        self.conn = httplib.HTTPConnection(host, port, strict=False, timeout=30)
-
-    def rpc(self, method, params=None):
-        self.object_id += 1
-        obj = {'version' : '1.1',
-               'method' : method,
-               'id' : self.object_id,
-               'params' : params or []}
-
-        self.conn.request('POST', '/', json.dumps(obj),
-            { 'Authorization' : self.authhdr,
-              'Content-type' : 'application/json' })
-
-        resp = self.conn.getresponse()
-
-        if resp is None:
-            print("JSON-RPC: no response")
-            return None
-
-        body = resp.read()
-        resp_obj = json.loads(body)
-
-        if resp_obj is None:
-            print("JSON-RPC: cannot JSON-decode body")
-            return None
-
-        if 'error' in resp_obj and resp_obj['error'] != None:
-            return resp_obj['error']
-
-        if 'result' not in resp_obj:
-            print("JSON-RPC: no result in object")
-            return None
-
-        return resp_obj['result']
-
-    def getblockcount(self):
-        return self.rpc('getblockcount')
-
-    def getwork(self, data=None):
-        return self.rpc('getwork', data)
-
-def uint32(x):
-    return x & 0xffffffffL
-
-def bytereverse(x):
-    return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
-            (((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))
-
-def bufreverse(in_buf):
-    out_words = []
-
-    for i in range(0, len(in_buf), 4):
-        word = struct.unpack('@I', in_buf[i:i+4])[0]
-        out_words.append(struct.pack('@I', bytereverse(word)))
-
-    return ''.join(out_words)
-
-def wordreverse(in_buf):
-    out_words = []
-
-    for i in range(0, len(in_buf), 4):
-        out_words.append(in_buf[i:i+4])
-
-    out_words.reverse()
-
-    return ''.join(out_words)
-
-
-class Miner:
-    def __init__(self, id):
-        self.id = id
-        self.max_nonce = MAX_NONCE
-
-    def work(self, datastr, targetstr):
-        # decode work data hex string to binary
-        static_data = datastr.decode('hex')
-        static_data = bufreverse(static_data)
-
-        # the first 76b of 80b do not change
-        blk_hdr = static_data[:76]
-
-        # decode 256-bit target value
-        targetbin = targetstr.decode('hex')
-        targetbin = targetbin[::-1]    # byte-swap and dword-swap
-        targetbin_str = targetbin.encode('hex')
-        target = long(targetbin_str, 16)
-
-        # pre-hash first 76b of block header
-        static_hash = hashlib.sha256()
-        static_hash.update(blk_hdr)
-
-        for nonce in xrange(self.max_nonce):
-
-            # encode 32-bit nonce value
-            nonce_bin = struct.pack("<I", nonce)
-
-            # hash final 4b, the nonce value
-            hash1_o = static_hash.copy()
-            hash1_o.update(nonce_bin)
-            hash1 = hash1_o.digest()
-
-            # sha256 hash of sha256 hash
-            hash_o = hashlib.sha256()
-            hash_o.update(hash1)
-            hash = hash_o.digest()
-
-            # quick test for winning solution: high 32 bits zero?
-            if hash[-4:] != '\0\0\0\0':
-                continue
-
-            # convert binary hash to 256-bit Python long
-            hash = bufreverse(hash)
-            hash = wordreverse(hash)
-
-            hash_str = hash.encode('hex')
-            long_hash = long(hash_str, 16)
-
-            # proof-of-work test:  hash < target
-            if long_hash < target:
-                print(time.asctime(), "PROOF-OF-WORK found: "
-                                      "{0:064x}".format(long_hash))
-                return (nonce + 1, nonce_bin)
-            else:
-                print(time.asctime(), "PROOF-OF-WORK false"
-                                      "positive {0:064x}".format(long_hash))
-
-        return (nonce + 1, None)
-
-    def submit_work(self, rpc, original_data, nonce_bin):
-        nonce_bin = bufreverse(nonce_bin)
-        nonce = nonce_bin.encode('hex')
-        solution = original_data[:152] + nonce + original_data[160:256]
-        param_arr = [ solution ]
-        result = rpc.getwork(param_arr)
-
-        print(time.asctime(), "--> Upstream RPC result:", result)
-
-    def iterate(self, rpc):
-        work = rpc.getwork()
-
-        if work is None:
-            time.sleep(ERR_SLEEP)
-            return
-
-        if 'data' not in work or 'target' not in work:
-            time.sleep(ERR_SLEEP)
-            return
-
-        time_start = time.time()
-
-        (hashes_done, nonce_bin) = self.work(work['data'],
-                             work['target'])
-
-        time_end = time.time()
-        time_diff = time_end - time_start
-
-        self.max_nonce = long(
-            (hashes_done * settings['scantime']) / time_diff)
-
-        if self.max_nonce > 0xfffffffaL:
-            self.max_nonce = 0xfffffffaL
-
-        if settings['hashmeter']:
-            print("HashMeter({:d}): {:d} hashes, {:.2f} Khash/sec".format(
-                  self.id, hashes_done, (hashes_done / 1000.0) / time_diff))
-
-        if nonce_bin is not None:
-            self.submit_work(rpc, work['data'], nonce_bin)
-
-    def loop(self):
-        rpc = BitcoinRPC(settings['host'], settings['port'],
-                 settings['rpcuser'], settings['rpcpass'])
-
-        if rpc is not None:
-
-            while True:
-                self.iterate(rpc)
-        
-        self.conn.close()
-
-
-def miner_thread(id):
-    miner = Miner(id)
-    miner.loop()
-
-if __name__ == '__main__':
-    if len(sys.argv) != 2:
-        print("Usage: pyminer.py CONFIG-FILE")
-        sys.exit(1)
-
-    with open(sys.argv[1]) as f:
-
-        for line in f:
-            # skip comment lines
-            m = re.search('^\s*#', line)
-            if m:
-                continue
-
-            # parse key=value lines
-            m = re.search('^(\w+)\s*=\s*(\S.*)$', line)
-            if m is None:
-                continue
-
-            settings[m.group(1)] = m.group(2)
-
-    settings.setdefault('host', '127.0.0.1')
-    settings.setdefault('port', 8332)
-    settings.setdefault('threads', 1)
-    settings.setdefault('hashmeter', 0)
-    settings.setdefault('scantime', 30L)
-
-    if 'rpcuser' not in settings or 'rpcpass' not in settings:
-        print("Missing username and/or password in cfg file")
-        sys.exit(1)
-
-    settings['port'] = int(settings['port'])
-    settings['threads'] = int(settings['threads'])
-    settings['hashmeter'] = int(settings['hashmeter'])
-    settings['scantime'] = long(settings['scantime'])
-
-    thread_list = []
-
-    for thread_id in range(settings['threads']):
-        p = Process(target=miner_thread, args=(thread_id,))
-        p.start()
-        thread_list.append(p)
-        time.sleep(1) # stagger threads
-
-    print(settings['threads'], "mining threads started")
-
-    print(time.asctime(), "Miner Starts - {0}:{1}".format(settings['host'],
-                                                          settings['port']))
-    try:
-        for thread_process in thread_list:
-            thread_process.join()
-    except KeyboardInterrupt:
-        pass
-
-    print(time.asctime(), "Miner Stops - {0}:{1}".format(settings['host'],
-                                                         settings['port']))

From 2e7009d67b862cf822a1c70e181de6af659a3096 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 29 Jul 2014 11:04:46 -0400
Subject: [PATCH 0439/1819] Avoid querying DNS seeds, if we have open
 connections.

The goal is to increase independence and privacy.
---
 src/init.cpp |  3 ++-
 src/net.cpp  | 12 ++++++++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 127529382f71..14816f501620 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -240,7 +240,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -connect=<ip>          " + _("Connect only to the specified node(s)") + "\n";
     strUsage += "  -discover              " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n";
     strUsage += "  -dns                   " + _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)") + "\n";
-    strUsage += "  -dnsseed               " + _("Find peers using DNS lookup (default: 1 unless -connect)") + "\n";
+    strUsage += "  -dnsseed               " + _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)") + "\n";
+    strUsage += "  -forcednsseed          " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n";
     strUsage += "  -externalip=<ip>       " + _("Specify your own public address") + "\n";
     strUsage += "  -listen                " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n";
     strUsage += "  -maxconnections=<n>    " + _("Maintain at most <n> connections to peers (default: 125)") + "\n";
diff --git a/src/net.cpp b/src/net.cpp
index e004fbeb7383..62124514c8d3 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1221,6 +1221,18 @@ void MapPort(bool)
 
 void ThreadDNSAddressSeed()
 {
+    // goal: only query DNS seeds if address need is acute
+    if ((addrman.size() > 0) &&
+        (!GetBoolArg("-forcednsseed", false))) {
+        MilliSleep(11 * 1000);
+
+        LOCK(cs_vNodes);
+        if (vNodes.size() >= 2) {
+            LogPrintf("P2P peers available. Skipped DNS seeding.\n");
+            return;
+        }
+    }
+
     const vector<CDNSSeedData> &vSeeds = Params().DNSSeeds();
     int found = 0;
 

From ae775b5b311982a3d932a9e34ddc94ce597dcaaf Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 23 Jun 2014 23:10:24 -0400
Subject: [PATCH 0440/1819] Consolidate CTransaction hex encode/decode into
 core_io.h, core_{read,write}.cpp

---
 src/Makefile.am           |  3 +++
 src/core_io.h             | 14 ++++++++++++++
 src/core_read.cpp         | 25 +++++++++++++++++++++++++
 src/core_write.cpp        | 15 +++++++++++++++
 src/rpcmining.cpp         |  5 ++---
 src/rpcrawtransaction.cpp | 39 ++++++++++++---------------------------
 src/rpcwallet.cpp         |  5 ++---
 7 files changed, 73 insertions(+), 33 deletions(-)
 create mode 100644 src/core_io.h
 create mode 100644 src/core_read.cpp
 create mode 100644 src/core_write.cpp

diff --git a/src/Makefile.am b/src/Makefile.am
index ff2374759251..4e591464242b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -75,6 +75,7 @@ BITCOIN_CORE_H = \
   coins.h \
   compat.h \
   core.h \
+  core_io.h \
   crypter.h \
   db.h \
   hash.h \
@@ -185,6 +186,8 @@ libbitcoin_common_a_SOURCES = \
   chainparams.cpp \
   coins.cpp \
   core.cpp \
+  core_read.cpp \
+  core_write.cpp \
   hash.cpp \
   key.cpp \
   keystore.cpp \
diff --git a/src/core_io.h b/src/core_io.h
new file mode 100644
index 000000000000..257dac36271d
--- /dev/null
+++ b/src/core_io.h
@@ -0,0 +1,14 @@
+#ifndef __BITCOIN_CORE_IO_H__
+#define __BITCOIN_CORE_IO_H__
+
+#include <string>
+
+class CTransaction;
+
+// core_read.cpp
+extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
+
+// core_write.cpp
+extern std::string EncodeHexTx(const CTransaction& tx);
+
+#endif // __BITCOIN_CORE_IO_H__
diff --git a/src/core_read.cpp b/src/core_read.cpp
new file mode 100644
index 000000000000..937dcd9c122b
--- /dev/null
+++ b/src/core_read.cpp
@@ -0,0 +1,25 @@
+
+#include <vector>
+#include "core_io.h"
+#include "core.h"
+#include "serialize.h"
+
+using namespace std;
+
+bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
+{
+    if (!IsHex(strHexTx))
+        return false;
+
+    vector<unsigned char> txData(ParseHex(strHexTx));
+    CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
+    try {
+        ssData >> tx;
+    }
+    catch (std::exception &e) {
+        return false;
+    }
+
+    return true;
+}
+
diff --git a/src/core_write.cpp b/src/core_write.cpp
new file mode 100644
index 000000000000..960974df8935
--- /dev/null
+++ b/src/core_write.cpp
@@ -0,0 +1,15 @@
+
+#include "core_io.h"
+#include "core.h"
+#include "serialize.h"
+#include "util.h"
+
+using namespace std;
+
+string EncodeHexTx(const CTransaction& tx)
+{
+    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+    ssTx << tx;
+    return HexStr(ssTx.begin(), ssTx.end());
+}
+
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index cbb4ab2f8bbb..edab427cbfac 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -10,6 +10,7 @@
 #include "main.h"
 #include "miner.h"
 #include "pow.h"
+#include "core_io.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
 #include "wallet.h"
@@ -472,9 +473,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
 
         Object entry;
 
-        CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
-        ssTx << tx;
-        entry.push_back(Pair("data", HexStr(ssTx.begin(), ssTx.end())));
+        entry.push_back(Pair("data", EncodeHexTx(tx)));
 
         entry.push_back(Pair("hash", txHash.GetHex()));
 
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 1efe38e830af..a7aeb8f00b02 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -5,6 +5,7 @@
 
 #include "base58.h"
 #include "core.h"
+#include "core_io.h"
 #include "init.h"
 #include "keystore.h"
 #include "main.h"
@@ -182,9 +183,7 @@ Value getrawtransaction(const Array& params, bool fHelp)
     if (!GetTransaction(hash, tx, hashBlock, true))
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
 
-    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
-    ssTx << tx;
-    string strHex = HexStr(ssTx.begin(), ssTx.end());
+    string strHex = EncodeHexTx(tx);
 
     if (!fVerbose)
         return strHex;
@@ -388,9 +387,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
         rawTx.vout.push_back(out);
     }
 
-    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
-    ss << rawTx;
-    return HexStr(ss.begin(), ss.end());
+    return EncodeHexTx(rawTx);
 }
 
 Value decoderawtransaction(const Array& params, bool fHelp)
@@ -444,15 +441,12 @@ Value decoderawtransaction(const Array& params, bool fHelp)
             + HelpExampleRpc("decoderawtransaction", "\"hexstring\"")
         );
 
-    vector<unsigned char> txData(ParseHexV(params[0], "argument"));
-    CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
+    RPCTypeCheck(params, list_of(str_type));
+
     CTransaction tx;
-    try {
-        ssData >> tx;
-    }
-    catch (std::exception &e) {
+
+    if (!DecodeHexTx(tx, params[0].get_str()))
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
-    }
 
     Object result;
     TxToJSON(tx, 0, result);
@@ -723,9 +717,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
     }
 
     Object result;
-    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
-    ssTx << mergedTx;
-    result.push_back(Pair("hex", HexStr(ssTx.begin(), ssTx.end())));
+    result.push_back(Pair("hex", EncodeHexTx(mergedTx)));
     result.push_back(Pair("complete", fComplete));
 
     return result;
@@ -754,25 +746,18 @@ Value sendrawtransaction(const Array& params, bool fHelp)
             + HelpExampleRpc("sendrawtransaction", "\"signedhex\"")
         );
 
+    RPCTypeCheck(params, list_of(str_type)(bool_type));
 
     // parse hex string from parameter
-    vector<unsigned char> txData(ParseHexV(params[0], "parameter"));
-    CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
     CTransaction tx;
+    if (!DecodeHexTx(tx, params[0].get_str()))
+        throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
+    uint256 hashTx = tx.GetHash();
 
     bool fOverrideFees = false;
     if (params.size() > 1)
         fOverrideFees = params[1].get_bool();
 
-    // deserialize binary data stream
-    try {
-        ssData >> tx;
-    }
-    catch (std::exception &e) {
-        throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
-    }
-    const uint256 &hashTx = tx.GetHash();
-
     CCoinsViewCache &view = *pcoinsTip;
     CCoins existingCoins;
     bool fHaveMempool = mempool.exists(hashTx);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 5b83fe900ecd..667ca33ce1c0 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -4,6 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
+#include "core_io.h"
 #include "rpcserver.h"
 #include "init.h"
 #include "net.h"
@@ -1550,9 +1551,7 @@ Value gettransaction(const Array& params, bool fHelp)
     ListTransactions(wtx, "*", 0, false, details, filter);
     entry.push_back(Pair("details", details));
 
-    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
-    ssTx << static_cast<CTransaction>(wtx);
-    string strHex = HexStr(ssTx.begin(), ssTx.end());
+    string strHex = EncodeHexTx(static_cast<CTransaction>(wtx));
     entry.push_back(Pair("hex", strHex));
 
     return entry;

From b2aeaa79393608132104183eba117fcbf583148e Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 23 Jun 2014 23:16:33 -0400
Subject: [PATCH 0441/1819] Move ParseScript() helper, becoming accessible
 outside src/test/

---
 src/core_io.h                  |  2 +
 src/core_read.cpp              | 77 ++++++++++++++++++++++++++++++++++
 src/test/script_tests.cpp      | 71 +------------------------------
 src/test/transaction_tests.cpp |  2 +-
 4 files changed, 81 insertions(+), 71 deletions(-)

diff --git a/src/core_io.h b/src/core_io.h
index 257dac36271d..528c472803ed 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -3,9 +3,11 @@
 
 #include <string>
 
+class CScript;
 class CTransaction;
 
 // core_read.cpp
+extern CScript ParseScript(std::string s);
 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
 
 // core_write.cpp
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 937dcd9c122b..d5d3cca48027 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -3,8 +3,85 @@
 #include "core_io.h"
 #include "core.h"
 #include "serialize.h"
+#include "script.h"
+
+#include <boost/assign/list_of.hpp>
+#include <boost/algorithm/string/classification.hpp>
+#include <boost/algorithm/string/predicate.hpp>
+#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/replace.hpp>
 
 using namespace std;
+using namespace boost;
+using namespace boost::algorithm;
+
+CScript ParseScript(std::string s)
+{
+    CScript result;
+
+    static map<string, opcodetype> mapOpNames;
+
+    if (mapOpNames.size() == 0)
+    {
+        for (int op = 0; op <= OP_NOP10; op++)
+        {
+            // Allow OP_RESERVED to get into mapOpNames
+            if (op < OP_NOP && op != OP_RESERVED)
+                continue;
+
+            const char* name = GetOpName((opcodetype)op);
+            if (strcmp(name, "OP_UNKNOWN") == 0)
+                continue;
+            string strName(name);
+            mapOpNames[strName] = (opcodetype)op;
+            // Convenience: OP_ADD and just ADD are both recognized:
+            replace_first(strName, "OP_", "");
+            mapOpNames[strName] = (opcodetype)op;
+        }
+    }
+
+    vector<string> words;
+    split(words, s, is_any_of(" \t\n"), token_compress_on);
+
+    BOOST_FOREACH(string w, words)
+    {
+        if (w.size() == 0)
+        {
+            // Empty string, ignore. (boost::split given '' will return one word)
+        }
+        else if (all(w, is_digit()) ||
+            (starts_with(w, "-") && all(string(w.begin()+1, w.end()), is_digit())))
+        {
+            // Number
+            int64_t n = atoi64(w);
+            result << n;
+        }
+        else if (starts_with(w, "0x") && IsHex(string(w.begin()+2, w.end())))
+        {
+            // Raw hex data, inserted NOT pushed onto stack:
+            std::vector<unsigned char> raw = ParseHex(string(w.begin()+2, w.end()));
+            result.insert(result.end(), raw.begin(), raw.end());
+        }
+        else if (w.size() >= 2 && starts_with(w, "'") && ends_with(w, "'"))
+        {
+            // Single-quoted string, pushed as data. NOTE: this is poor-man's
+            // parsing, spaces/tabs/newlines in single-quoted strings won't work.
+            std::vector<unsigned char> value(w.begin()+1, w.end()-1);
+            result << value;
+        }
+        else if (mapOpNames.count(w))
+        {
+            // opcode, e.g. OP_ADD or ADD:
+            result << mapOpNames[w];
+        }
+        else
+        {
+            throw runtime_error("script parse error");
+        }
+    }
+
+    return result;
+}
 
 bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
 {
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index cba582e941a7..5e35875a8e4c 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -10,6 +10,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "core_io.h"
 
 #include <fstream>
 #include <stdint.h>
@@ -36,76 +37,6 @@ extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo
 
 static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
-CScript
-ParseScript(string s)
-{
-    CScript result;
-
-    static map<string, opcodetype> mapOpNames;
-
-    if (mapOpNames.size() == 0)
-    {
-        for (int op = 0; op <= OP_NOP10; op++)
-        {
-            // Allow OP_RESERVED to get into mapOpNames
-            if (op < OP_NOP && op != OP_RESERVED)
-                continue;
-
-            const char* name = GetOpName((opcodetype)op);
-            if (strcmp(name, "OP_UNKNOWN") == 0)
-                continue;
-            string strName(name);
-            mapOpNames[strName] = (opcodetype)op;
-            // Convenience: OP_ADD and just ADD are both recognized:
-            replace_first(strName, "OP_", "");
-            mapOpNames[strName] = (opcodetype)op;
-        }
-    }
-
-    vector<string> words;
-    split(words, s, is_any_of(" \t\n"), token_compress_on);
-
-    BOOST_FOREACH(string w, words)
-    {
-        if (w.size() == 0)
-        {
-            // Empty string, ignore. (boost::split given '' will return one word)
-        }
-        else if (all(w, is_digit()) ||
-            (starts_with(w, "-") && all(string(w.begin()+1, w.end()), is_digit())))
-        {
-            // Number
-            int64_t n = atoi64(w);
-            result << n;
-        }
-        else if (starts_with(w, "0x") && IsHex(string(w.begin()+2, w.end())))
-        {
-            // Raw hex data, inserted NOT pushed onto stack:
-            std::vector<unsigned char> raw = ParseHex(string(w.begin()+2, w.end()));
-            result.insert(result.end(), raw.begin(), raw.end());
-        }
-        else if (w.size() >= 2 && starts_with(w, "'") && ends_with(w, "'"))
-        {
-            // Single-quoted string, pushed as data. NOTE: this is poor-man's
-            // parsing, spaces/tabs/newlines in single-quoted strings won't work.
-            std::vector<unsigned char> value(w.begin()+1, w.end()-1);
-            result << value;
-        }
-        else if (mapOpNames.count(w))
-        {
-            // opcode, e.g. OP_ADD or ADD:
-            result << mapOpNames[w];
-        }
-        else
-        {
-            BOOST_ERROR("Parse error: " << s);
-            return CScript();
-        }
-    }
-
-    return result;
-}
-
 Array
 read_json(const std::string& jsondata)
 {
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 238033f407b0..03919e7c7d3f 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -9,6 +9,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script.h"
+#include "core_io.h"
 
 #include <map>
 #include <string>
@@ -24,7 +25,6 @@ using namespace boost::algorithm;
 
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
-extern CScript ParseScript(string s);
 
 unsigned int ParseFlags(string strFlags){
     unsigned int flags = 0;

From 2a5840096fd3b6235a4ff4b8488f8d4494414765 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 23 Jun 2014 19:32:54 -0400
Subject: [PATCH 0442/1819] core_read's ParseScript(): minor cleanups

- use .empty() rather than .size() == 0
- use a const_iterator rather than BOOST_FOREACH
- validate iterators before creating a string from them
---
 src/core_read.cpp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/core_read.cpp b/src/core_read.cpp
index d5d3cca48027..1ecd6db324cb 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -21,7 +21,7 @@ CScript ParseScript(std::string s)
 
     static map<string, opcodetype> mapOpNames;
 
-    if (mapOpNames.size() == 0)
+    if (mapOpNames.empty())
     {
         for (int op = 0; op <= OP_NOP10; op++)
         {
@@ -43,36 +43,36 @@ CScript ParseScript(std::string s)
     vector<string> words;
     split(words, s, is_any_of(" \t\n"), token_compress_on);
 
-    BOOST_FOREACH(string w, words)
+    for (std::vector<std::string>::const_iterator w = words.begin(); w != words.end(); ++w)
     {
-        if (w.size() == 0)
+        if (w->empty())
         {
             // Empty string, ignore. (boost::split given '' will return one word)
         }
-        else if (all(w, is_digit()) ||
-            (starts_with(w, "-") && all(string(w.begin()+1, w.end()), is_digit())))
+        else if (all(*w, is_digit()) ||
+            (starts_with(*w, "-") && all(string(w->begin()+1, w->end()), is_digit())))
         {
             // Number
-            int64_t n = atoi64(w);
+            int64_t n = atoi64(*w);
             result << n;
         }
-        else if (starts_with(w, "0x") && IsHex(string(w.begin()+2, w.end())))
+        else if (starts_with(*w, "0x") && (w->begin()+2 != w->end()) && IsHex(string(w->begin()+2, w->end())))
         {
             // Raw hex data, inserted NOT pushed onto stack:
-            std::vector<unsigned char> raw = ParseHex(string(w.begin()+2, w.end()));
+            std::vector<unsigned char> raw = ParseHex(string(w->begin()+2, w->end()));
             result.insert(result.end(), raw.begin(), raw.end());
         }
-        else if (w.size() >= 2 && starts_with(w, "'") && ends_with(w, "'"))
+        else if (w->size() >= 2 && starts_with(*w, "'") && ends_with(*w, "'"))
         {
             // Single-quoted string, pushed as data. NOTE: this is poor-man's
             // parsing, spaces/tabs/newlines in single-quoted strings won't work.
-            std::vector<unsigned char> value(w.begin()+1, w.end()-1);
+            std::vector<unsigned char> value(w->begin()+1, w->end()-1);
             result << value;
         }
-        else if (mapOpNames.count(w))
+        else if (mapOpNames.count(*w))
         {
             // opcode, e.g. OP_ADD or ADD:
-            result << mapOpNames[w];
+            result << mapOpNames[*w];
         }
         else
         {

From 3ce7e669e3f90b3099a969ea5ffe3fa2643f4ed8 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 25 Jun 2014 21:09:36 -0400
Subject: [PATCH 0443/1819] bitcoin-cli, rpcrawtransaction: harmonize "{"
 styling

---
 src/bitcoin-cli.cpp       | 31 +++++----------
 src/rpcrawtransaction.cpp | 81 +++++++++++++--------------------------
 2 files changed, 37 insertions(+), 75 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 016b2f50f5bd..3b991f9276b2 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -50,8 +50,7 @@ static bool AppInitRPC(int argc, char* argv[])
     // Parameters
     //
     ParseParameters(argc, argv);
-    if (!boost::filesystem::is_directory(GetDataDir(false)))
-    {
+    if (!boost::filesystem::is_directory(GetDataDir(false))) {
         fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
         return false;
     }
@@ -66,11 +65,9 @@ static bool AppInitRPC(int argc, char* argv[])
         fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
         return false;
     }
-    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
-    {
+    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
         std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
-        if (!mapArgs.count("-version"))
-        {
+        if (!mapArgs.count("-version")) {
             strUsage += "\n" + _("Usage:") + "\n" +
                   "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
                   "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
@@ -153,11 +150,9 @@ int CommandLineRPC(int argc, char *argv[])
 {
     string strPrint;
     int nRet = 0;
-    try
-    {
+    try {
         // Skip switches
-        while (argc > 1 && IsSwitchChar(argv[1][0]))
-        {
+        while (argc > 1 && IsSwitchChar(argv[1][0])) {
             argc--;
             argv++;
         }
@@ -178,15 +173,12 @@ int CommandLineRPC(int argc, char *argv[])
         const Value& result = find_value(reply, "result");
         const Value& error  = find_value(reply, "error");
 
-        if (error.type() != null_type)
-        {
+        if (error.type() != null_type) {
             // Error
             strPrint = "error: " + write_string(error, false);
             int code = find_value(error.get_obj(), "code").get_int();
             nRet = abs(code);
-        }
-        else
-        {
+        } else {
             // Result
             if (result.type() == null_type)
                 strPrint = "";
@@ -208,8 +200,7 @@ int CommandLineRPC(int argc, char *argv[])
         throw;
     }
 
-    if (strPrint != "")
-    {
+    if (strPrint != "") {
         fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
     }
     return nRet;
@@ -219,8 +210,7 @@ int main(int argc, char* argv[])
 {
     SetupEnvironment();
 
-    try
-    {
+    try {
         if(!AppInitRPC(argc, argv))
             return EXIT_FAILURE;
     }
@@ -233,8 +223,7 @@ int main(int argc, char* argv[])
     }
 
     int ret = EXIT_FAILURE;
-    try
-    {
+    try {
         ret = CommandLineRPC(argc, argv);
     }
     catch (std::exception& e) {
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index a7aeb8f00b02..763615120ae8 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -37,8 +37,7 @@ void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeH
     if (fIncludeHex)
         out.push_back(Pair("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end())));
 
-    if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired))
-    {
+    if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) {
         out.push_back(Pair("type", GetTxnOutputType(type)));
         return;
     }
@@ -58,13 +57,11 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
     entry.push_back(Pair("version", tx.nVersion));
     entry.push_back(Pair("locktime", (int64_t)tx.nLockTime));
     Array vin;
-    BOOST_FOREACH(const CTxIn& txin, tx.vin)
-    {
+    BOOST_FOREACH(const CTxIn& txin, tx.vin) {
         Object in;
         if (tx.IsCoinBase())
             in.push_back(Pair("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
-        else
-        {
+        else {
             in.push_back(Pair("txid", txin.prevout.hash.GetHex()));
             in.push_back(Pair("vout", (int64_t)txin.prevout.n));
             Object o;
@@ -77,8 +74,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
     }
     entry.push_back(Pair("vin", vin));
     Array vout;
-    for (unsigned int i = 0; i < tx.vout.size(); i++)
-    {
+    for (unsigned int i = 0; i < tx.vout.size(); i++) {
         const CTxOut& txout = tx.vout[i];
         Object out;
         out.push_back(Pair("value", ValueFromAmount(txout.nValue)));
@@ -90,15 +86,12 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
     }
     entry.push_back(Pair("vout", vout));
 
-    if (hashBlock != 0)
-    {
+    if (hashBlock != 0) {
         entry.push_back(Pair("blockhash", hashBlock.GetHex()));
         map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
-        if (mi != mapBlockIndex.end() && (*mi).second)
-        {
+        if (mi != mapBlockIndex.end() && (*mi).second) {
             CBlockIndex* pindex = (*mi).second;
-            if (chainActive.Contains(pindex))
-            {
+            if (chainActive.Contains(pindex)) {
                 entry.push_back(Pair("confirmations", 1 + chainActive.Height() - pindex->nHeight));
                 entry.push_back(Pair("time", pindex->GetBlockTime()));
                 entry.push_back(Pair("blocktime", pindex->GetBlockTime()));
@@ -244,11 +237,9 @@ Value listunspent(const Array& params, bool fHelp)
         nMaxDepth = params[1].get_int();
 
     set<CBitcoinAddress> setAddress;
-    if (params.size() > 2)
-    {
+    if (params.size() > 2) {
         Array inputs = params[2].get_array();
-        BOOST_FOREACH(Value& input, inputs)
-        {
+        BOOST_FOREACH(Value& input, inputs) {
             CBitcoinAddress address(input.get_str());
             if (!address.IsValid())
                 throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+input.get_str());
@@ -262,13 +253,11 @@ Value listunspent(const Array& params, bool fHelp)
     vector<COutput> vecOutputs;
     assert(pwalletMain != NULL);
     pwalletMain->AvailableCoins(vecOutputs, false);
-    BOOST_FOREACH(const COutput& out, vecOutputs)
-    {
+    BOOST_FOREACH(const COutput& out, vecOutputs) {
         if (out.nDepth < nMinDepth || out.nDepth > nMaxDepth)
             continue;
 
-        if (setAddress.size())
-        {
+        if (setAddress.size()) {
             CTxDestination address;
             if (!ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
                 continue;
@@ -283,18 +272,15 @@ Value listunspent(const Array& params, bool fHelp)
         entry.push_back(Pair("txid", out.tx->GetHash().GetHex()));
         entry.push_back(Pair("vout", out.i));
         CTxDestination address;
-        if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
-        {
+        if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, address)) {
             entry.push_back(Pair("address", CBitcoinAddress(address).ToString()));
             if (pwalletMain->mapAddressBook.count(address))
                 entry.push_back(Pair("account", pwalletMain->mapAddressBook[address].name));
         }
         entry.push_back(Pair("scriptPubKey", HexStr(pk.begin(), pk.end())));
-        if (pk.IsPayToScriptHash())
-        {
+        if (pk.IsPayToScriptHash()) {
             CTxDestination address;
-            if (ExtractDestination(pk, address))
-            {
+            if (ExtractDestination(pk, address)) {
                 const CScriptID& hash = boost::get<const CScriptID&>(address);
                 CScript redeemScript;
                 if (pwalletMain->GetCScript(hash, redeemScript))
@@ -351,8 +337,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
 
     CMutableTransaction rawTx;
 
-    BOOST_FOREACH(const Value& input, inputs)
-    {
+    BOOST_FOREACH(const Value& input, inputs) {
         const Object& o = input.get_obj();
 
         uint256 txid = ParseHashO(o, "txid");
@@ -369,8 +354,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
     }
 
     set<CBitcoinAddress> setAddress;
-    BOOST_FOREACH(const Pair& s, sendTo)
-    {
+    BOOST_FOREACH(const Pair& s, sendTo) {
         CBitcoinAddress address(s.name_);
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Bitcoin address: ")+s.name_);
@@ -550,8 +534,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
     vector<unsigned char> txData(ParseHexV(params[0], "argument 1"));
     CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
     vector<CMutableTransaction> txVariants;
-    while (!ssData.empty())
-    {
+    while (!ssData.empty()) {
         try {
             CMutableTransaction tx;
             ssData >> tx;
@@ -590,12 +573,10 @@ Value signrawtransaction(const Array& params, bool fHelp)
 
     bool fGivenKeys = false;
     CBasicKeyStore tempKeystore;
-    if (params.size() > 2 && params[2].type() != null_type)
-    {
+    if (params.size() > 2 && params[2].type() != null_type) {
         fGivenKeys = true;
         Array keys = params[2].get_array();
-        BOOST_FOREACH(Value k, keys)
-        {
+        BOOST_FOREACH(Value k, keys) {
             CBitcoinSecret vchSecret;
             bool fGood = vchSecret.SetString(k.get_str());
             if (!fGood)
@@ -610,11 +591,9 @@ Value signrawtransaction(const Array& params, bool fHelp)
 #endif
 
     // Add previous txouts given in the RPC call:
-    if (params.size() > 1 && params[1].type() != null_type)
-    {
+    if (params.size() > 1 && params[1].type() != null_type) {
         Array prevTxs = params[1].get_array();
-        BOOST_FOREACH(Value& p, prevTxs)
-        {
+        BOOST_FOREACH(Value& p, prevTxs) {
             if (p.type() != obj_type)
                 throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "expected object with {\"txid'\",\"vout\",\"scriptPubKey\"}");
 
@@ -649,12 +628,10 @@ Value signrawtransaction(const Array& params, bool fHelp)
 
             // if redeemScript given and not using the local wallet (private keys
             // given), add redeemScript to the tempKeystore so it can be signed:
-            if (fGivenKeys && scriptPubKey.IsPayToScriptHash())
-            {
+            if (fGivenKeys && scriptPubKey.IsPayToScriptHash()) {
                 RPCTypeCheck(prevOut, map_list_of("txid", str_type)("vout", int_type)("scriptPubKey", str_type)("redeemScript",str_type));
                 Value v = find_value(prevOut, "redeemScript");
-                if (!(v == Value::null))
-                {
+                if (!(v == Value::null)) {
                     vector<unsigned char> rsData(ParseHexV(v, "redeemScript"));
                     CScript redeemScript(rsData.begin(), rsData.end());
                     tempKeystore.AddCScript(redeemScript);
@@ -670,8 +647,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
 #endif
 
     int nHashType = SIGHASH_ALL;
-    if (params.size() > 3 && params[3].type() != null_type)
-    {
+    if (params.size() > 3 && params[3].type() != null_type) {
         static map<string, int> mapSigHashValues =
             boost::assign::map_list_of
             (string("ALL"), int(SIGHASH_ALL))
@@ -691,12 +667,10 @@ Value signrawtransaction(const Array& params, bool fHelp)
     bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE);
 
     // Sign what we can:
-    for (unsigned int i = 0; i < mergedTx.vin.size(); i++)
-    {
+    for (unsigned int i = 0; i < mergedTx.vin.size(); i++) {
         CTxIn& txin = mergedTx.vin[i];
         CCoins coins;
-        if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n))
-        {
+        if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n)) {
             fComplete = false;
             continue;
         }
@@ -708,8 +682,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
             SignSignature(keystore, prevPubKey, mergedTx, i, nHashType);
 
         // ... and merge in other signatures:
-        BOOST_FOREACH(const CMutableTransaction& txv, txVariants)
-        {
+        BOOST_FOREACH(const CMutableTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
         if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS, 0))

From cbe39a38526a6c17619d02cc697b80ebfd57203b Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 29 Jul 2014 11:12:44 -0400
Subject: [PATCH 0444/1819] Add "bitcoin-tx" command line utility and
 supporting modules.

This is a simple utility that provides command line manipulation of
a hex-encoded TX. The utility takes a hex string on the command line
as input, performs zero or more mutations, and outputs a hex string
to standard output.

This utility is also an intentional exercise of the "bitcoin library"
concept. It is designed to require minimal libraries, and works
entirely without need for any RPC or P2P communication.

See "bitcoin-tx --help" for command and options summary.
---
 .gitignore                      |   1 +
 src/Makefile.am                 |  23 ++
 src/Makefile.qt.include         |   2 +-
 src/Makefile.qttest.include     |   2 +-
 src/Makefile.test.include       |   2 +-
 src/bitcoin-tx.cpp              | 597 ++++++++++++++++++++++++++++++++
 src/core_io.h                   |   7 +
 src/core_read.cpp               |  25 ++
 src/core_write.cpp              |  74 ++++
 src/univalue/univalue.cpp       | 233 +++++++++++++
 src/univalue/univalue.h         | 157 +++++++++
 src/univalue/univalue_read.cpp  | 390 +++++++++++++++++++++
 src/univalue/univalue_write.cpp | 145 ++++++++
 13 files changed, 1655 insertions(+), 3 deletions(-)
 create mode 100644 src/bitcoin-tx.cpp
 create mode 100644 src/univalue/univalue.cpp
 create mode 100644 src/univalue/univalue.h
 create mode 100644 src/univalue/univalue_read.cpp
 create mode 100644 src/univalue/univalue_write.cpp

diff --git a/.gitignore b/.gitignore
index 4169a2d96c1b..e21ea92552a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
 src/bitcoin
 src/bitcoind
 src/bitcoin-cli
+src/bitcoin-tx
 src/test/test_bitcoin
 src/qt/test/test_bitcoin-qt
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 4e591464242b..2d84eeba1c97 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -34,6 +34,7 @@ LIBBITCOIN_COMMON=libbitcoin_common.a
 LIBBITCOIN_CLI=libbitcoin_cli.a
 LIBBITCOIN_UTIL=libbitcoin_util.a
 LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
 LIBBITCOINQT=qt/libbitcoinqt.a
 
 noinst_LIBRARIES = \
@@ -41,6 +42,7 @@ noinst_LIBRARIES = \
   libbitcoin_common.a \
   libbitcoin_cli.a \
   libbitcoin_util.a \
+  univalue/libbitcoin_univalue.a \
   crypto/libbitcoin_crypto.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
@@ -58,6 +60,8 @@ if BUILD_BITCOIN_CLI
   bin_PROGRAMS += bitcoin-cli
 endif
 
+bin_PROGRAMS += bitcoin-tx
+
 .PHONY: FORCE
 # bitcoin core #
 BITCOIN_CORE_H = \
@@ -178,6 +182,13 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha1.h \
   crypto/ripemd160.h
 
+# univalue JSON library
+univalue_libbitcoin_univalue_a_SOURCES = \
+  univalue/univalue.cpp \
+  univalue/univalue_read.cpp \
+  univalue/univalue_write.cpp \
+  univalue/univalue.h
+
 # common: shared between bitcoind, and bitcoin-qt and non-server tools
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
@@ -229,6 +240,7 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
 bitcoind_LDADD = \
   $(LIBBITCOIN_SERVER) \
   $(LIBBITCOIN_COMMON) \
+  $(LIBBITCOIN_UNIVALUE) \
   $(LIBBITCOIN_UTIL) \
   $(LIBBITCOIN_CRYPTO) \
   $(LIBLEVELDB) \
@@ -267,6 +279,17 @@ endif
 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
+# bitcoin-tx binary #
+bitcoin_tx_LDADD = \
+  $(LIBBITCOIN_UNIVALUE) \
+  $(LIBBITCOIN_COMMON) \
+  $(LIBBITCOIN_UTIL) \
+  $(LIBBITCOIN_CRYPTO) \
+  $(BOOST_LIBS)
+bitcoin_tx_SOURCES = bitcoin-tx.cpp
+bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
+#
+
 if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 2772bc753ace..2052264dc95c 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -359,7 +359,7 @@ qt_bitcoin_qt_LDADD = qt/libbitcoinqt.a $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
+qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 51ce006fc13b..d49b2240eaf6 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -30,7 +30,7 @@ qt_test_test_bitcoin_qt_LDADD = $(LIBBITCOINQT) $(LIBBITCOIN_SERVER)
 if ENABLE_WALLET
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
-qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) \
+qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
 if USE_LIBSECP256K1
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 12b90adca3e7..72451fba9af3 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -64,7 +64,7 @@ endif
 
 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
-test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBLEVELDB) $(LIBMEMENV) \
+test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
 if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
new file mode 100644
index 000000000000..299315424bb8
--- /dev/null
+++ b/src/bitcoin-tx.cpp
@@ -0,0 +1,597 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "base58.h"
+#include "util.h"
+#include "core.h"
+#include "main.h"         // for MAX_BLOCK_SIZE
+#include "keystore.h"
+#include "ui_interface.h" // for _(...)
+#include "univalue/univalue.h"
+#include "core_io.h"
+
+#include <stdio.h>
+#include <boost/assign/list_of.hpp>
+
+using namespace std;
+using namespace boost::assign;
+
+static bool fCreateBlank;
+static map<string,UniValue> registers;
+CClientUIInterface uiInterface;
+
+static bool AppInitRawTx(int argc, char* argv[])
+{
+    //
+    // Parameters
+    //
+    ParseParameters(argc, argv);
+
+    // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
+    if (!SelectParamsFromCommandLine()) {
+        fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
+        return false;
+    }
+
+    fCreateBlank = GetBoolArg("-create", false);
+
+    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
+    {
+        // First part of help message is specific to this utility
+        std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
+            _("Usage:") + "\n" +
+              "  bitcoin-tx [options] <hex-tx> [commands]  " + _("Update hex-encoded bitcoin transaction") + "\n" +
+              "  bitcoin-tx [options] -create [commands]   " + _("Create hex-encoded bitcoin transaction") + "\n" +
+              "\n";
+
+        fprintf(stdout, "%s", strUsage.c_str());
+
+        strUsage = _("Options:") + "\n";
+        strUsage += "  -?                      " + _("This help message") + "\n";
+        strUsage += "  -create                 " + _("Create new, empty TX.") + "\n";
+        strUsage += "  -json                   " + _("Select JSON output") + "\n";
+        strUsage += "  -regtest                " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
+        strUsage += "  -testnet                " + _("Use the test network") + "\n";
+        strUsage += "\n";
+
+        fprintf(stdout, "%s", strUsage.c_str());
+
+
+        strUsage = _("Commands:") + "\n";
+        strUsage += "  delin=N                " + _("Delete input N from TX") + "\n";
+        strUsage += "  delout=N               " + _("Delete output N from TX") + "\n";
+        strUsage += "  in=TXID:VOUT           " + _("Add input to TX") + "\n";
+        strUsage += "  locktime=N             " + _("Set TX lock time to N") + "\n";
+        strUsage += "  nversion=N             " + _("Set TX version to N") + "\n";
+        strUsage += "  outaddr=VALUE:ADDRESS  " + _("Add address-based output to TX") + "\n";
+        strUsage += "  outscript=VALUE:SCRIPT " + _("Add raw script output to TX") + "\n";
+        strUsage += "  sign=SIGHASH-FLAGS     " + _("Add zero or more signatures to transaction") + "\n";
+        strUsage += "      This command requires JSON registers:\n";
+        strUsage += "      prevtxs=JSON object\n";
+        strUsage += "      privatekeys=JSON object\n";
+        strUsage += "      See signrawtransaction docs for format of sighash flags, JSON objects.\n";
+        strUsage += "\n";
+        fprintf(stdout, "%s", strUsage.c_str());
+
+        strUsage = _("Register Commands:") + "\n";
+        strUsage += "  load=NAME:FILENAME     " + _("Load JSON file FILENAME into register NAME") + "\n";
+        strUsage += "  set=NAME:JSON-STRING   " + _("Set register NAME to given JSON-STRING") + "\n";
+        strUsage += "\n";
+        fprintf(stdout, "%s", strUsage.c_str());
+
+        return false;
+    }
+    return true;
+}
+
+static void RegisterSetJson(const string& key, const string& rawJson)
+{
+    UniValue val;
+    if (!val.read(rawJson)) {
+        string strErr = "Cannot parse JSON for key " + key;
+        throw runtime_error(strErr);
+    }
+
+    registers[key] = val;
+}
+
+static void RegisterSet(const string& strInput)
+{
+    // separate NAME:VALUE in string
+    size_t pos = strInput.find(':');
+    if ((pos == string::npos) ||
+        (pos == 0) ||
+        (pos == (strInput.size() - 1)))
+        throw runtime_error("Register input requires NAME:VALUE");
+
+    string key = strInput.substr(0, pos);
+    string valStr = strInput.substr(pos + 1, string::npos);
+
+    RegisterSetJson(key, valStr);
+}
+
+static void RegisterLoad(const string& strInput)
+{
+    // separate NAME:FILENAME in string
+    size_t pos = strInput.find(':');
+    if ((pos == string::npos) ||
+        (pos == 0) ||
+        (pos == (strInput.size() - 1)))
+        throw runtime_error("Register load requires NAME:FILENAME");
+
+    string key = strInput.substr(0, pos);
+    string filename = strInput.substr(pos + 1, string::npos);
+
+    FILE *f = fopen(filename.c_str(), "r");
+    if (!f) {
+        string strErr = "Cannot open file " + filename;
+        throw runtime_error(strErr);
+    }
+
+    // load file chunks into one big buffer
+    string valStr;
+    while ((!feof(f)) && (!ferror(f))) {
+        char buf[4096];
+        int bread = fread(buf, 1, sizeof(buf), f);
+        if (bread <= 0)
+            break;
+
+        valStr.insert(valStr.size(), buf, bread);
+    }
+
+    if (ferror(f)) {
+        string strErr = "Error reading file " + filename;
+        throw runtime_error(strErr);
+    }
+
+    fclose(f);
+
+    // evaluate as JSON buffer register
+    RegisterSetJson(key, valStr);
+}
+
+static void MutateTxVersion(CMutableTransaction& tx, const string& cmdVal)
+{
+    int64_t newVersion = atoi64(cmdVal);
+    if (newVersion < 1 || newVersion > CTransaction::CURRENT_VERSION)
+        throw runtime_error("Invalid TX version requested");
+
+    tx.nVersion = (int) newVersion;
+}
+
+static void MutateTxLocktime(CMutableTransaction& tx, const string& cmdVal)
+{
+    int64_t newLocktime = atoi64(cmdVal);
+    if (newLocktime < 0LL || newLocktime > 0xffffffffLL)
+        throw runtime_error("Invalid TX locktime requested");
+
+    tx.nLockTime = (unsigned int) newLocktime;
+}
+
+static void MutateTxAddInput(CMutableTransaction& tx, const string& strInput)
+{
+    // separate TXID:VOUT in string
+    size_t pos = strInput.find(':');
+    if ((pos == string::npos) ||
+        (pos == 0) ||
+        (pos == (strInput.size() - 1)))
+        throw runtime_error("TX input missing separator");
+
+    // extract and validate TXID
+    string strTxid = strInput.substr(0, pos);
+    if ((strTxid.size() != 64) || !IsHex(strTxid))
+        throw runtime_error("invalid TX input txid");
+    uint256 txid(strTxid);
+
+    static const unsigned int minTxOutSz = 9;
+    static const unsigned int maxVout = MAX_BLOCK_SIZE / minTxOutSz;
+
+    // extract and validate vout
+    string strVout = strInput.substr(pos + 1, string::npos);
+    int vout = atoi(strVout);
+    if ((vout < 0) || (vout > (int)maxVout))
+        throw runtime_error("invalid TX input vout");
+
+    // append to transaction input list
+    CTxIn txin(txid, vout);
+    tx.vin.push_back(txin);
+}
+
+static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
+{
+    // separate VALUE:ADDRESS in string
+    size_t pos = strInput.find(':');
+    if ((pos == string::npos) ||
+        (pos == 0) ||
+        (pos == (strInput.size() - 1)))
+        throw runtime_error("TX output missing separator");
+
+    // extract and validate VALUE
+    string strValue = strInput.substr(0, pos);
+    int64_t value;
+    if (!ParseMoney(strValue, value))
+        throw runtime_error("invalid TX output value");
+
+    // extract and validate ADDRESS
+    string strAddr = strInput.substr(pos + 1, string::npos);
+    CBitcoinAddress addr(strAddr);
+    if (!addr.IsValid())
+        throw runtime_error("invalid TX output address");
+
+    // build standard output script via SetDestination()
+    CScript scriptPubKey;
+    scriptPubKey.SetDestination(addr.Get());
+
+    // construct TxOut, append to transaction output list
+    CTxOut txout(value, scriptPubKey);
+    tx.vout.push_back(txout);
+}
+
+static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput)
+{
+    // separate VALUE:SCRIPT in string
+    size_t pos = strInput.find(':');
+    if ((pos == string::npos) ||
+        (pos == 0) ||
+        (pos == (strInput.size() - 1)))
+        throw runtime_error("TX output missing separator");
+
+    // extract and validate VALUE
+    string strValue = strInput.substr(0, pos);
+    int64_t value;
+    if (!ParseMoney(strValue, value))
+        throw runtime_error("invalid TX output value");
+
+    // extract and validate script
+    string strScript = strInput.substr(pos + 1, string::npos);
+    CScript scriptPubKey = ParseScript(strScript); // throws on err
+
+    // construct TxOut, append to transaction output list
+    CTxOut txout(value, scriptPubKey);
+    tx.vout.push_back(txout);
+}
+
+static void MutateTxDelInput(CMutableTransaction& tx, const string& strInIdx)
+{
+    // parse requested deletion index
+    int inIdx = atoi(strInIdx);
+    if (inIdx < 0 || inIdx >= (int)tx.vin.size()) {
+        string strErr = "Invalid TX input index '" + strInIdx + "'";
+        throw runtime_error(strErr.c_str());
+    }
+
+    // delete input from transaction
+    tx.vin.erase(tx.vin.begin() + inIdx);
+}
+
+static void MutateTxDelOutput(CMutableTransaction& tx, const string& strOutIdx)
+{
+    // parse requested deletion index
+    int outIdx = atoi(strOutIdx);
+    if (outIdx < 0 || outIdx >= (int)tx.vout.size()) {
+        string strErr = "Invalid TX output index '" + strOutIdx + "'";
+        throw runtime_error(strErr.c_str());
+    }
+
+    // delete output from transaction
+    tx.vout.erase(tx.vout.begin() + outIdx);
+}
+
+static const unsigned int N_SIGHASH_OPTS = 6;
+static const struct {
+    const char *flagStr;
+    int flags;
+} sighashOptions[N_SIGHASH_OPTS] = {
+    "ALL", SIGHASH_ALL,
+    "NONE", SIGHASH_NONE,
+    "SINGLE", SIGHASH_SINGLE,
+    "ALL|ANYONECANPAY", SIGHASH_ALL|SIGHASH_ANYONECANPAY,
+    "NONE|ANYONECANPAY", SIGHASH_NONE|SIGHASH_ANYONECANPAY,
+    "SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY,
+};
+
+static bool findSighashFlags(int& flags, const string& flagStr)
+{
+    flags = 0;
+
+    for (unsigned int i = 0; i < N_SIGHASH_OPTS; i++) {
+        if (flagStr == sighashOptions[i].flagStr) {
+            flags = sighashOptions[i].flags;
+            return true;
+        }
+    }
+
+    return false;
+}
+
+uint256 ParseHashUO(map<string,UniValue>& o, string strKey)
+{
+    if (!o.count(strKey))
+        return 0;
+    return ParseHashUV(o[strKey], strKey);
+}
+
+vector<unsigned char> ParseHexUO(map<string,UniValue>& o, string strKey)
+{
+    if (!o.count(strKey)) {
+        vector<unsigned char> emptyVec;
+        return emptyVec;
+    }
+    return ParseHexUV(o[strKey], strKey);
+}
+
+static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
+{
+    int nHashType = SIGHASH_ALL;
+
+    if (flagStr.size() > 0)
+        if (!findSighashFlags(nHashType, flagStr))
+            throw runtime_error("unknown sighash flag/sign option");
+
+    vector<CTransaction> txVariants;
+    txVariants.push_back(tx);
+
+    // mergedTx will end up with all the signatures; it
+    // starts as a clone of the raw tx:
+    CMutableTransaction mergedTx(txVariants[0]);
+    bool fComplete = true;
+    CCoinsView viewDummy;
+    CCoinsViewCache view(viewDummy);
+
+    if (!registers.count("privatekeys"))
+        throw runtime_error("privatekeys register variable must be set.");
+    bool fGivenKeys = false;
+    CBasicKeyStore tempKeystore;
+    UniValue keysObj = registers["privatekeys"];
+    fGivenKeys = true;
+
+    for (unsigned int kidx = 0; kidx < keysObj.count(); kidx++) {
+        if (!keysObj[kidx].isStr())
+            throw runtime_error("privatekey not a string");
+        CBitcoinSecret vchSecret;
+        bool fGood = vchSecret.SetString(keysObj[kidx].getValStr());
+        if (!fGood)
+            throw runtime_error("privatekey not valid");
+
+        CKey key = vchSecret.GetKey();
+        tempKeystore.AddKey(key);
+    }
+
+    // Add previous txouts given in the RPC call:
+    if (!registers.count("prevtxs"))
+        throw runtime_error("prevtxs register variable must be set.");
+    UniValue prevtxsObj = registers["privatekeys"];
+    {
+        for (unsigned int previdx = 0; previdx < prevtxsObj.count(); previdx++) {
+            UniValue prevOut = prevtxsObj[previdx];
+            if (!prevOut.isObject())
+                throw runtime_error("expected prevtxs internal object");
+
+            map<string,UniValue::VType> types = map_list_of("txid", UniValue::VSTR)("vout",UniValue::VNUM)("scriptPubKey",UniValue::VSTR);
+            if (!prevOut.checkObject(types))
+                throw runtime_error("prevtxs internal object typecheck fail");
+
+            uint256 txid = ParseHashUV(prevOut, "txid");
+
+            int nOut = atoi(prevOut["vout"].getValStr());
+            if (nOut < 0)
+                throw runtime_error("vout must be positive");
+
+            vector<unsigned char> pkData(ParseHexUV(prevOut, "scriptPubKey"));
+            CScript scriptPubKey(pkData.begin(), pkData.end());
+
+            CCoins coins;
+            if (view.GetCoins(txid, coins)) {
+                if (coins.IsAvailable(nOut) && coins.vout[nOut].scriptPubKey != scriptPubKey) {
+                    string err("Previous output scriptPubKey mismatch:\n");
+                    err = err + coins.vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
+                        scriptPubKey.ToString();
+                    throw runtime_error(err);
+                }
+                // what todo if txid is known, but the actual output isn't?
+            }
+            if ((unsigned int)nOut >= coins.vout.size())
+                coins.vout.resize(nOut+1);
+            coins.vout[nOut].scriptPubKey = scriptPubKey;
+            coins.vout[nOut].nValue = 0; // we don't know the actual output value
+            view.SetCoins(txid, coins);
+
+            // if redeemScript given and private keys given,
+            // add redeemScript to the tempKeystore so it can be signed:
+            if (fGivenKeys && scriptPubKey.IsPayToScriptHash() &&
+                prevOut.exists("redeemScript")) {
+                UniValue v = prevOut["redeemScript"];
+                vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
+                CScript redeemScript(rsData.begin(), rsData.end());
+                tempKeystore.AddCScript(redeemScript);
+            }
+        }
+    }
+
+    const CKeyStore& keystore = tempKeystore;
+
+    bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE);
+
+    // Sign what we can:
+    for (unsigned int i = 0; i < mergedTx.vin.size(); i++) {
+        CTxIn& txin = mergedTx.vin[i];
+        CCoins coins;
+        if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n)) {
+            fComplete = false;
+            continue;
+        }
+        const CScript& prevPubKey = coins.vout[txin.prevout.n].scriptPubKey;
+
+        txin.scriptSig.clear();
+        // Only sign SIGHASH_SINGLE if there's a corresponding output:
+        if (!fHashSingle || (i < mergedTx.vout.size()))
+            SignSignature(keystore, prevPubKey, mergedTx, i, nHashType);
+
+        // ... and merge in other signatures:
+        BOOST_FOREACH(const CTransaction& txv, txVariants) {
+            txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
+        }
+        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS, 0))
+            fComplete = false;
+    }
+
+    if (fComplete) {
+        // do nothing... for now
+        // perhaps store this for later optional JSON output
+    }
+
+    tx = mergedTx;
+}
+
+static void MutateTx(CMutableTransaction& tx, const string& command,
+                     const string& commandVal)
+{
+    if (command == "nversion")
+        MutateTxVersion(tx, commandVal);
+    else if (command == "locktime")
+        MutateTxLocktime(tx, commandVal);
+
+    else if (command == "delin")
+        MutateTxDelInput(tx, commandVal);
+    else if (command == "in")
+        MutateTxAddInput(tx, commandVal);
+
+    else if (command == "delout")
+        MutateTxDelOutput(tx, commandVal);
+    else if (command == "outaddr")
+        MutateTxAddOutAddr(tx, commandVal);
+    else if (command == "outscript")
+        MutateTxAddOutScript(tx, commandVal);
+
+    else if (command == "sign")
+        MutateTxSign(tx, commandVal);
+
+    else if (command == "load")
+        RegisterLoad(commandVal);
+
+    else if (command == "set")
+        RegisterSet(commandVal);
+
+    else
+        throw runtime_error("unknown command");
+}
+
+static void OutputTxJSON(const CTransaction& tx)
+{
+    UniValue entry(UniValue::VOBJ);
+    TxToUniv(tx, 0, entry);
+
+    string jsonOutput = entry.write(4);
+    fprintf(stdout, "%s\n", jsonOutput.c_str());
+}
+
+static void OutputTxHex(const CTransaction& tx)
+{
+    string strHex = EncodeHexTx(tx);
+
+    fprintf(stdout, "%s\n", strHex.c_str());
+}
+
+static void OutputTx(const CTransaction& tx)
+{
+    if (GetBoolArg("-json", false))
+        OutputTxJSON(tx);
+    else
+        OutputTxHex(tx);
+}
+
+static int CommandLineRawTx(int argc, char* argv[])
+{
+    string strPrint;
+    int nRet = 0;
+    try {
+        // Skip switches
+        while (argc > 1 && IsSwitchChar(argv[1][0])) {
+            argc--;
+            argv++;
+        }
+
+        CTransaction txDecodeTmp;
+        int startArg;
+
+        if (!fCreateBlank) {
+            // require at least one param
+            if (argc < 2)
+                throw runtime_error("too few parameters");
+
+            // param: hex-encoded bitcoin transaction
+            string strHexTx(argv[1]);
+
+            if (!DecodeHexTx(txDecodeTmp, strHexTx))
+                throw runtime_error("invalid transaction encoding");
+
+            startArg = 2;
+        } else
+            startArg = 1;
+
+        CMutableTransaction tx(txDecodeTmp);
+
+        for (int i = startArg; i < argc; i++) {
+            string arg = argv[i];
+            string key, value;
+            size_t eqpos = arg.find('=');
+            if (eqpos == string::npos)
+                key = arg;
+            else {
+                key = arg.substr(0, eqpos);
+                value = arg.substr(eqpos + 1);
+            }
+
+            MutateTx(tx, key, value);
+        }
+
+        OutputTx(tx);
+    }
+
+    catch (boost::thread_interrupted) {
+        throw;
+    }
+    catch (std::exception& e) {
+        strPrint = string("error: ") + e.what();
+        nRet = EXIT_FAILURE;
+    }
+    catch (...) {
+        PrintExceptionContinue(NULL, "CommandLineRawTx()");
+        throw;
+    }
+
+    if (strPrint != "") {
+        fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
+    }
+    return nRet;
+}
+
+int main(int argc, char* argv[])
+{
+    SetupEnvironment();
+
+    try {
+        if(!AppInitRawTx(argc, argv))
+            return EXIT_FAILURE;
+    }
+    catch (std::exception& e) {
+        PrintExceptionContinue(&e, "AppInitRawTx()");
+        return EXIT_FAILURE;
+    } catch (...) {
+        PrintExceptionContinue(NULL, "AppInitRawTx()");
+        return EXIT_FAILURE;
+    }
+
+    int ret = EXIT_FAILURE;
+    try {
+        ret = CommandLineRawTx(argc, argv);
+    }
+    catch (std::exception& e) {
+        PrintExceptionContinue(&e, "CommandLineRawTx()");
+    } catch (...) {
+        PrintExceptionContinue(NULL, "CommandLineRawTx()");
+    }
+    return ret;
+}
+
diff --git a/src/core_io.h b/src/core_io.h
index 528c472803ed..8a7d5805704c 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -3,14 +3,21 @@
 
 #include <string>
 
+class uint256;
 class CScript;
 class CTransaction;
+class UniValue;
 
 // core_read.cpp
 extern CScript ParseScript(std::string s);
 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
+extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
+extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
 
 // core_write.cpp
 extern std::string EncodeHexTx(const CTransaction& tx);
+extern void ScriptPubKeyToUniv(const CScript& scriptPubKey,
+                        UniValue& out, bool fIncludeHex);
+extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
 
 #endif // __BITCOIN_CORE_IO_H__
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 1ecd6db324cb..0f06bb6952d1 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -4,12 +4,14 @@
 #include "core.h"
 #include "serialize.h"
 #include "script.h"
+#include "util.h"
 
 #include <boost/assign/list_of.hpp>
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/replace.hpp>
+#include "univalue/univalue.h"
 
 using namespace std;
 using namespace boost;
@@ -100,3 +102,26 @@ bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
     return true;
 }
 
+uint256 ParseHashUV(const UniValue& v, const string& strName)
+{
+    string strHex;
+    if (v.isStr())
+        strHex = v.getValStr();
+    if (!IsHex(strHex)) // Note: IsHex("") is false
+        throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
+
+    uint256 result;
+    result.SetHex(strHex);
+    return result;
+}
+
+vector<unsigned char> ParseHexUV(const UniValue& v, const string& strName)
+{
+    string strHex;
+    if (v.isStr())
+        strHex = v.getValStr();
+    if (!IsHex(strHex))
+        throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
+    return ParseHex(strHex);
+}
+
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 960974df8935..2eb220779f06 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -1,8 +1,12 @@
 
+#include <vector>
 #include "core_io.h"
+#include "univalue/univalue.h"
+#include "script.h"
 #include "core.h"
 #include "serialize.h"
 #include "util.h"
+#include "base58.h"
 
 using namespace std;
 
@@ -13,3 +17,73 @@ string EncodeHexTx(const CTransaction& tx)
     return HexStr(ssTx.begin(), ssTx.end());
 }
 
+void ScriptPubKeyToUniv(const CScript& scriptPubKey,
+                        UniValue& out, bool fIncludeHex)
+{
+    txnouttype type;
+    vector<CTxDestination> addresses;
+    int nRequired;
+
+    out.pushKV("asm", scriptPubKey.ToString());
+    if (fIncludeHex)
+        out.pushKV("hex", HexStr(scriptPubKey.begin(), scriptPubKey.end()));
+
+    if (!ExtractDestinations(scriptPubKey, type, addresses, nRequired)) {
+        out.pushKV("type", GetTxnOutputType(type));
+        return;
+    }
+
+    out.pushKV("reqSigs", nRequired);
+    out.pushKV("type", GetTxnOutputType(type));
+
+    UniValue a(UniValue::VARR);
+    BOOST_FOREACH(const CTxDestination& addr, addresses)
+        a.push_back(CBitcoinAddress(addr).ToString());
+    out.pushKV("addresses", a);
+}
+
+void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
+{
+    entry.pushKV("txid", tx.GetHash().GetHex());
+    entry.pushKV("version", tx.nVersion);
+    entry.pushKV("locktime", (int64_t)tx.nLockTime);
+
+    UniValue vin(UniValue::VARR);
+    BOOST_FOREACH(const CTxIn& txin, tx.vin) {
+        UniValue in(UniValue::VOBJ);
+        if (tx.IsCoinBase())
+            in.pushKV("coinbase", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
+        else {
+            in.pushKV("txid", txin.prevout.hash.GetHex());
+            in.pushKV("vout", (int64_t)txin.prevout.n);
+            UniValue o(UniValue::VOBJ);
+            o.pushKV("asm", txin.scriptSig.ToString());
+            o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
+            in.pushKV("scriptSig", o);
+        }
+        in.pushKV("sequence", (int64_t)txin.nSequence);
+        vin.push_back(in);
+    }
+    entry.pushKV("vin", vin);
+
+    UniValue vout(UniValue::VARR);
+    for (unsigned int i = 0; i < tx.vout.size(); i++) {
+        const CTxOut& txout = tx.vout[i];
+
+        UniValue out(UniValue::VOBJ);
+
+        UniValue outValue(UniValue::VNUM, FormatMoney(txout.nValue));
+        out.pushKV("value", outValue);
+        out.pushKV("n", (int64_t)i);
+
+        UniValue o(UniValue::VOBJ);
+        ScriptPubKeyToUniv(txout.scriptPubKey, o, true);
+        out.pushKV("scriptPubKey", o);
+        vout.push_back(out);
+    }
+    entry.pushKV("vout", vout);
+
+    if (hashBlock != 0)
+        entry.pushKV("blockhash", hashBlock.GetHex());
+}
+
diff --git a/src/univalue/univalue.cpp b/src/univalue/univalue.cpp
new file mode 100644
index 000000000000..e577aa8ee49d
--- /dev/null
+++ b/src/univalue/univalue.cpp
@@ -0,0 +1,233 @@
+// Copyright 2014 BitPay Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <stdint.h>
+#include <ctype.h>
+#include <sstream>
+#include "univalue.h"
+
+using namespace std;
+
+static const UniValue nullValue;
+
+void UniValue::clear()
+{
+    typ = VNULL;
+    val.clear();
+    keys.clear();
+    values.clear();
+}
+
+bool UniValue::setNull()
+{
+    clear();
+    return true;
+}
+
+bool UniValue::setBool(bool val_)
+{
+    clear();
+    typ = VBOOL;
+    if (val_)
+        val = "1";
+    return true;
+}
+
+static bool validNumStr(const string& s)
+{
+    string tokenVal;
+    unsigned int consumed;
+    enum jtokentype tt = getJsonToken(tokenVal, consumed, s.c_str());
+    return (tt == JTOK_NUMBER);
+}
+
+bool UniValue::setNumStr(const string& val_)
+{
+    if (!validNumStr(val))
+        return false;
+
+    clear();
+    typ = VNUM;
+    val = val_;
+    return true;
+}
+
+bool UniValue::setInt(uint64_t val)
+{
+    string s;
+    ostringstream oss;
+
+    oss << val;
+
+    return setNumStr(oss.str());
+}
+
+bool UniValue::setInt(int64_t val)
+{
+    string s;
+    ostringstream oss;
+
+    oss << val;
+
+    return setNumStr(oss.str());
+}
+
+bool UniValue::setFloat(double val)
+{
+    string s;
+    ostringstream oss;
+
+    oss << val;
+
+    return setNumStr(oss.str());
+}
+
+bool UniValue::setStr(const string& val_)
+{
+    clear();
+    typ = VSTR;
+    val = val_;
+    return true;
+}
+
+bool UniValue::setArray()
+{
+    clear();
+    typ = VARR;
+    return true;
+}
+
+bool UniValue::setObject()
+{
+    clear();
+    typ = VOBJ;
+    return true;
+}
+
+bool UniValue::push_back(const UniValue& val)
+{
+    if (typ != VARR)
+        return false;
+
+    values.push_back(val);
+    return true;
+}
+
+bool UniValue::push_backV(const std::vector<UniValue>& vec)
+{
+    if (typ != VARR)
+        return false;
+
+    values.insert(values.end(), vec.begin(), vec.end());
+
+    return true;
+}
+
+bool UniValue::pushKV(const std::string& key, const UniValue& val)
+{
+    if (typ != VOBJ)
+        return false;
+
+    keys.push_back(key);
+    values.push_back(val);
+    return true;
+}
+
+bool UniValue::pushKVs(const UniValue& obj)
+{
+    if (typ != VOBJ || obj.typ != VOBJ)
+        return false;
+
+    for (unsigned int i = 0; i < obj.keys.size(); i++) {
+        keys.push_back(obj.keys[i]);
+        values.push_back(obj.values[i]);
+    }
+
+    return true;
+}
+
+bool UniValue::getArray(std::vector<UniValue>& arr)
+{
+    if (typ != VARR)
+        return false;
+
+    arr = values;
+    return true;
+}
+
+bool UniValue::getObject(std::map<std::string,UniValue>& obj)
+{
+    if (typ != VOBJ)
+        return false;
+
+    obj.clear();
+    for (unsigned int i = 0; i < keys.size(); i++) {
+        obj[keys[i]] = values[i];
+    }
+
+    return true;
+}
+
+int UniValue::findKey(const std::string& key) const
+{
+    for (unsigned int i = 0; i < keys.size(); i++) {
+        if (keys[i] == key)
+            return (int) i;
+    }
+
+    return -1;
+}
+
+bool UniValue::checkObject(const std::map<std::string,UniValue::VType>& t)
+{
+    for (std::map<std::string,UniValue::VType>::const_iterator it = t.begin();
+         it != t.end(); it++) {
+        int idx = findKey(it->first);
+        if (idx < 0)
+            return false;
+
+        if (values[idx].getType() != it->second)
+            return false;
+    }
+
+    return true;
+}
+
+const UniValue& UniValue::operator[](const std::string& key) const
+{
+    if (typ != VOBJ)
+        return nullValue;
+
+    int index = findKey(key);
+    if (index < 0)
+        return nullValue;
+
+    return values[index];
+}
+
+const UniValue& UniValue::operator[](unsigned int index) const
+{
+    if (typ != VOBJ && typ != VARR)
+        return nullValue;
+    if (index >= values.size())
+        return nullValue;
+
+    return values[index];
+}
+
+const char *uvTypeName(UniValue::VType t)
+{
+    switch (t) {
+    case UniValue::VNULL: return "null";
+    case UniValue::VBOOL: return "bool";
+    case UniValue::VOBJ: return "object";
+    case UniValue::VARR: return "array";
+    case UniValue::VSTR: return "string";
+    case UniValue::VNUM: return "number";
+    }
+
+    // not reached
+    return NULL;
+}
+
diff --git a/src/univalue/univalue.h b/src/univalue/univalue.h
new file mode 100644
index 000000000000..5e94b6ba238d
--- /dev/null
+++ b/src/univalue/univalue.h
@@ -0,0 +1,157 @@
+// Copyright 2014 BitPay Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef __UNIVALUE_H__
+#define __UNIVALUE_H__
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+#include <map>
+#include <cassert>
+
+class UniValue {
+public:
+    enum VType { VNULL, VOBJ, VARR, VSTR, VNUM, VBOOL, };
+
+    UniValue() { typ = VNULL; }
+    UniValue(UniValue::VType initialType, const std::string& initialStr = "") {
+        typ = initialType;
+        val = initialStr;
+    }
+    UniValue(uint64_t val_) {
+        setInt(val_);
+    }
+    UniValue(int64_t val_) {
+        setInt(val_);
+    }
+    UniValue(int val_) {
+        setInt(val_);
+    }
+    UniValue(double val_) {
+        setFloat(val_);
+    }
+    UniValue(const std::string& val_) {
+        setStr(val_);
+    }
+    UniValue(const char *val_) {
+        std::string s(val_);
+        setStr(s);
+    }
+    ~UniValue() {}
+
+    void clear();
+
+    bool setNull();
+    bool setBool(bool val);
+    bool setNumStr(const std::string& val);
+    bool setInt(uint64_t val);
+    bool setInt(int64_t val);
+    bool setInt(int val) { return setInt((int64_t)val); }
+    bool setFloat(double val);
+    bool setStr(const std::string& val);
+    bool setArray();
+    bool setObject();
+
+    enum VType getType() const { return typ; }
+    std::string getValStr() const { return val; }
+    bool empty() const { return (values.size() == 0); }
+
+    size_t count() const { return values.size(); }
+
+    bool getBool() const { return isTrue(); }
+    bool getArray(std::vector<UniValue>& arr);
+    bool getObject(std::map<std::string,UniValue>& obj);
+    bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes);
+    const UniValue& operator[](const std::string& key) const;
+    const UniValue& operator[](unsigned int index) const;
+    bool exists(const std::string& key) const { return (findKey(key) >= 0); }
+
+    bool isNull() const { return (typ == VNULL); }
+    bool isTrue() const { return (typ == VBOOL) && (val == "1"); }
+    bool isFalse() const { return (!isTrue()); }
+    bool isBool() const { return (typ == VBOOL); }
+    bool isStr() const { return (typ == VSTR); }
+    bool isNum() const { return (typ == VNUM); }
+    bool isArray() const { return (typ == VARR); }
+    bool isObject() const { return (typ == VOBJ); }
+
+    bool push_back(const UniValue& val);
+    bool push_back(const std::string& val_) {
+        UniValue tmpVal(VSTR, val_);
+        return push_back(tmpVal);
+    }
+    bool push_back(const char *val_) {
+        std::string s(val_);
+        return push_back(s);
+    }
+    bool push_backV(const std::vector<UniValue>& vec);
+
+    bool pushKV(const std::string& key, const UniValue& val);
+    bool pushKV(const std::string& key, const std::string& val) {
+        UniValue tmpVal(VSTR, val);
+        return pushKV(key, tmpVal);
+    }
+    bool pushKV(const std::string& key, const char *val_) {
+        std::string val(val_);
+        return pushKV(key, val);
+    }
+    bool pushKV(const std::string& key, int64_t val) {
+        UniValue tmpVal(val);
+        return pushKV(key, tmpVal);
+    }
+    bool pushKV(const std::string& key, uint64_t val) {
+        UniValue tmpVal(val);
+        return pushKV(key, tmpVal);
+    }
+    bool pushKV(const std::string& key, int val) {
+        UniValue tmpVal((int64_t)val);
+        return pushKV(key, tmpVal);
+    }
+    bool pushKV(const std::string& key, double val) {
+        UniValue tmpVal(val);
+        return pushKV(key, tmpVal);
+    }
+    bool pushKVs(const UniValue& obj);
+
+    std::string write(unsigned int prettyIndent = 0,
+                      unsigned int indentLevel = 0) const;
+
+    bool read(const char *raw);
+    bool read(const std::string& rawStr) {
+        return read(rawStr.c_str());
+    }
+
+private:
+    UniValue::VType typ;
+    std::string val;                       // numbers are stored as C++ strings
+    std::vector<std::string> keys;
+    std::vector<UniValue> values;
+
+    int findKey(const std::string& key) const;
+    void writeArray(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const;
+    void writeObject(unsigned int prettyIndent, unsigned int indentLevel, std::string& s) const;
+};
+
+enum jtokentype {
+    JTOK_ERR        = -1,
+    JTOK_NONE       = 0,                           // eof
+    JTOK_OBJ_OPEN,
+    JTOK_OBJ_CLOSE,
+    JTOK_ARR_OPEN,
+    JTOK_ARR_CLOSE,
+    JTOK_COLON,
+    JTOK_COMMA,
+    JTOK_KW_NULL,
+    JTOK_KW_TRUE,
+    JTOK_KW_FALSE,
+    JTOK_NUMBER,
+    JTOK_STRING,
+};
+
+extern enum jtokentype getJsonToken(std::string& tokenVal,
+                                    unsigned int& consumed, const char *raw);
+extern const char *uvTypeName(UniValue::VType t);
+
+#endif // __UNIVALUE_H__
diff --git a/src/univalue/univalue_read.cpp b/src/univalue/univalue_read.cpp
new file mode 100644
index 000000000000..405be3e81f86
--- /dev/null
+++ b/src/univalue/univalue_read.cpp
@@ -0,0 +1,390 @@
+// Copyright 2014 BitPay Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <string.h>
+#include <vector>
+#include <stdio.h>
+#include "univalue.h"
+
+using namespace std;
+
+// convert hexadecimal string to unsigned integer
+static const char *hatoui(const char *first, const char *last,
+                          unsigned int& out)
+{
+    unsigned int result = 0;
+    for (; first != last; ++first)
+    {
+        int digit;
+        if (isdigit(*first))
+            digit = *first - '0';
+
+        else if (*first >= 'a' && *first <= 'f')
+            digit = *first - 'a' + 10;
+
+        else if (*first >= 'A' && *first <= 'F')
+            digit = *first - 'A' + 10;
+
+        else
+            break;
+
+        result = 16 * result + digit;
+    }
+    out = result;
+
+    return first;
+}
+
+enum jtokentype getJsonToken(string& tokenVal, unsigned int& consumed,
+                            const char *raw)
+{
+    tokenVal.clear();
+    consumed = 0;
+
+    const char *rawStart = raw;
+
+    while ((*raw) && (isspace(*raw)))             // skip whitespace
+        raw++;
+
+    switch (*raw) {
+
+    case 0:
+        return JTOK_NONE;
+
+    case '{':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_OBJ_OPEN;
+    case '}':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_OBJ_CLOSE;
+    case '[':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_ARR_OPEN;
+    case ']':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_ARR_CLOSE;
+
+    case ':':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_COLON;
+    case ',':
+        raw++;
+        consumed = (raw - rawStart);
+        return JTOK_COMMA;
+
+    case 'n':
+    case 't':
+    case 'f':
+        if (!strncmp(raw, "null", 4)) {
+            raw += 4;
+            consumed = (raw - rawStart);
+            return JTOK_KW_NULL;
+        } else if (!strncmp(raw, "true", 4)) {
+            raw += 4;
+            consumed = (raw - rawStart);
+            return JTOK_KW_TRUE;
+        } else if (!strncmp(raw, "false", 5)) {
+            raw += 5;
+            consumed = (raw - rawStart);
+            return JTOK_KW_FALSE;
+        } else
+            return JTOK_ERR;
+
+    case '-':
+    case '0':
+    case '1':
+    case '2':
+    case '3':
+    case '4':
+    case '5':
+    case '6':
+    case '7':
+    case '8':
+    case '9': {
+        // part 1: int
+        string numStr;
+
+        const char *first = raw;
+
+        const char *firstDigit = first;
+        if (!isdigit(*firstDigit))
+            firstDigit++;
+        if ((*firstDigit == '0') && isdigit(firstDigit[1]))
+            return JTOK_ERR;
+
+        numStr += *raw;                       // copy first char
+        raw++;
+
+        if ((*first == '-') && (!isdigit(*raw)))
+            return JTOK_ERR;
+
+        while ((*raw) && isdigit(*raw)) {     // copy digits
+            numStr += *raw;
+            raw++;
+        }
+
+        // part 2: frac
+        if (*raw == '.') {
+            numStr += *raw;                   // copy .
+            raw++;
+
+            if (!isdigit(*raw))
+                return JTOK_ERR;
+            while ((*raw) && isdigit(*raw)) { // copy digits
+                numStr += *raw;
+                raw++;
+            }
+        }
+
+        // part 3: exp
+        if (*raw == 'e' || *raw == 'E') {
+            numStr += *raw;                   // copy E
+            raw++;
+
+            if (*raw == '-' || *raw == '+') { // copy +/-
+                numStr += *raw;
+                raw++;
+            }
+
+            if (!isdigit(*raw))
+                return JTOK_ERR;
+            while ((*raw) && isdigit(*raw)) { // copy digits
+                numStr += *raw;
+                raw++;
+            }
+        }
+
+        tokenVal = numStr;
+        consumed = (raw - rawStart);
+        return JTOK_NUMBER;
+        }
+
+    case '"': {
+        raw++;                                // skip "
+
+        string valStr;
+
+        while (*raw) {
+            if (*raw < 0x20)
+                return JTOK_ERR;
+
+            else if (*raw == '\\') {
+                raw++;                        // skip backslash
+
+                switch (*raw) {
+                case '"':  valStr += "\""; break;
+                case '\\': valStr += "\\"; break;
+                case '/':  valStr += "/"; break;
+                case 'b':  valStr += "\b"; break;
+                case 'f':  valStr += "\f"; break;
+                case 'n':  valStr += "\n"; break;
+                case 'r':  valStr += "\r"; break;
+                case 't':  valStr += "\t"; break;
+
+                case 'u': {
+                    char buf[4] = {0,0,0,0};
+                    char *last = &buf[0];
+                    unsigned int codepoint;
+                    if (hatoui(raw + 1, raw + 1 + 4, codepoint) !=
+                               raw + 1 + 4)
+                        return JTOK_ERR;
+
+                    if (codepoint <= 0x7f)
+                         *last = (char)codepoint;
+                    else if (codepoint <= 0x7FF) {
+                        *last++ = (char)(0xC0 | (codepoint >> 6));
+                        *last = (char)(0x80 | (codepoint & 0x3F));
+                    } else if (codepoint <= 0xFFFF) {
+                        *last++ = (char)(0xE0 | (codepoint >> 12));
+                        *last++ = (char)(0x80 | ((codepoint >> 6) & 0x3F));
+                        *last = (char)(0x80 | (codepoint & 0x3F));
+                    }
+
+                    valStr += buf;
+                    raw += 4;
+                    break;
+                    }
+                default:
+                    return JTOK_ERR;
+
+                }
+
+                raw++;                        // skip esc'd char
+            }
+
+            else if (*raw == '"') {
+                raw++;                        // skip "
+                break;                        // stop scanning
+            }
+
+            else {
+                valStr += *raw;
+                raw++;
+            }
+        }
+
+        tokenVal = valStr;
+        consumed = (raw - rawStart);
+        return JTOK_STRING;
+        }
+
+    default:
+        return JTOK_ERR;
+    }
+}
+
+bool UniValue::read(const char *raw)
+{
+    clear();
+
+    bool expectName = false;
+    bool expectColon = false;
+    vector<UniValue*> stack;
+
+    enum jtokentype tok = JTOK_NONE;
+    enum jtokentype last_tok = JTOK_NONE;
+    while (1) {
+        last_tok = tok;
+
+        string tokenVal;
+        unsigned int consumed;
+        tok = getJsonToken(tokenVal, consumed, raw);
+        if (tok == JTOK_NONE || tok == JTOK_ERR)
+            break;
+        raw += consumed;
+
+        switch (tok) {
+
+        case JTOK_OBJ_OPEN:
+        case JTOK_ARR_OPEN: {
+            VType utyp = (tok == JTOK_OBJ_OPEN ? VOBJ : VARR);
+            if (!stack.size()) {
+                if (utyp == VOBJ)
+                    setObject();
+                else
+                    setArray();
+                stack.push_back(this);
+            } else {
+                UniValue tmpVal(utyp);
+                UniValue *top = stack.back();
+                top->values.push_back(tmpVal);
+
+                UniValue *newTop = &(top->values.back());
+                stack.push_back(newTop);
+            }
+
+            if (utyp == VOBJ)
+                expectName = true;
+            break;
+            }
+
+        case JTOK_OBJ_CLOSE:
+        case JTOK_ARR_CLOSE: {
+            if (!stack.size() || expectColon || (last_tok == JTOK_COMMA))
+                return false;
+
+            VType utyp = (tok == JTOK_OBJ_CLOSE ? VOBJ : VARR);
+            UniValue *top = stack.back();
+            if (utyp != top->getType())
+                return false;
+
+            stack.pop_back();
+            expectName = false;
+            break;
+            }
+
+        case JTOK_COLON: {
+            if (!stack.size() || expectName || !expectColon)
+                return false;
+
+            UniValue *top = stack.back();
+            if (top->getType() != VOBJ)
+                return false;
+
+            expectColon = false;
+            break;
+            }
+
+        case JTOK_COMMA: {
+            if (!stack.size() || expectName || expectColon ||
+                (last_tok == JTOK_COMMA) || (last_tok == JTOK_ARR_OPEN))
+                return false;
+
+            UniValue *top = stack.back();
+            if (top->getType() == VOBJ)
+                expectName = true;
+            break;
+            }
+
+        case JTOK_KW_NULL:
+        case JTOK_KW_TRUE:
+        case JTOK_KW_FALSE: {
+            if (!stack.size() || expectName || expectColon)
+                return false;
+
+            UniValue tmpVal;
+            switch (tok) {
+            case JTOK_KW_NULL:
+                // do nothing more
+                break;
+            case JTOK_KW_TRUE:
+                tmpVal.setBool(true);
+                break;
+            case JTOK_KW_FALSE:
+                tmpVal.setBool(false);
+                break;
+            default: /* impossible */ break;
+            }
+
+            UniValue *top = stack.back();
+            top->values.push_back(tmpVal);
+
+            break;
+            }
+
+        case JTOK_NUMBER: {
+            if (!stack.size() || expectName || expectColon)
+                return false;
+
+            UniValue tmpVal(VNUM, tokenVal);
+            UniValue *top = stack.back();
+            top->values.push_back(tmpVal);
+
+            break;
+            }
+
+        case JTOK_STRING: {
+            if (!stack.size())
+                return false;
+
+            UniValue *top = stack.back();
+
+            if (expectName) {
+                top->keys.push_back(tokenVal);
+                expectName = false;
+                expectColon = true;
+            } else {
+                UniValue tmpVal(VSTR, tokenVal);
+                top->values.push_back(tmpVal);
+            }
+
+            break;
+            }
+
+        default:
+            return false;
+        }
+    }
+
+    if (stack.size() != 0)
+        return false;
+
+    return true;
+}
+
diff --git a/src/univalue/univalue_write.cpp b/src/univalue/univalue_write.cpp
new file mode 100644
index 000000000000..1818f5c6f9c5
--- /dev/null
+++ b/src/univalue/univalue_write.cpp
@@ -0,0 +1,145 @@
+// Copyright 2014 BitPay Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <ctype.h>
+#include <stdio.h>
+#include "univalue.h"
+
+// TODO: Using UTF8
+
+using namespace std;
+
+static bool initEscapes;
+static const char *escapes[256];
+
+static void initJsonEscape()
+{
+    escapes['"'] = "\\\"";
+    escapes['\\'] = "\\\\";
+    escapes['/'] = "\\/";
+    escapes['\b'] = "\\b";
+    escapes['\f'] = "\\f";
+    escapes['\n'] = "\\n";
+    escapes['\r'] = "\\r";
+    escapes['\t'] = "\\t";
+
+    initEscapes = true;
+}
+
+static string json_escape(const string& inS)
+{
+    if (!initEscapes)
+        initJsonEscape();
+
+    string outS;
+    outS.reserve(inS.size() * 2);
+
+    for (unsigned int i = 0; i < inS.size(); i++) {
+        unsigned char ch = inS[i];
+        const char *escStr = escapes[ch];
+
+        if (escStr)
+            outS += escStr;
+
+        else if (isprint(ch))
+            outS += ch;
+
+        else {
+            char tmpesc[16];
+            sprintf(tmpesc, "\\u%04x", ch);
+            outS += tmpesc;
+        }
+    }
+
+    return outS;
+}
+
+string UniValue::write(unsigned int prettyIndent,
+                       unsigned int indentLevel) const
+{
+    string s;
+    s.reserve(1024);
+
+    unsigned int modIndent = indentLevel;
+    if (modIndent == 0)
+        modIndent = 1;
+
+    switch (typ) {
+    case VNULL:
+        s += "null";
+        break;
+    case VOBJ:
+        writeObject(prettyIndent, modIndent, s);
+        break;
+    case VARR:
+        writeArray(prettyIndent, modIndent, s);
+        break;
+    case VSTR:
+        s += "\"" + json_escape(val) + "\"";
+        break;
+    case VNUM:
+        s += val;
+        break;
+    case VBOOL:
+        s += (val == "1" ? "true" : "false");
+        break;
+    }
+
+    return s;
+}
+
+static string spaceStr;
+
+static string indentStr(unsigned int prettyIndent, unsigned int indentLevel)
+{
+    unsigned int spaces = prettyIndent * indentLevel;
+    while (spaceStr.size() < spaces)
+        spaceStr += "                ";
+
+    return spaceStr.substr(0, spaces);
+}
+
+void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, string& s) const
+{
+    s += "[";
+    if (prettyIndent)
+        s += "\n";
+
+    for (unsigned int i = 0; i < values.size(); i++) {
+        if (prettyIndent)
+            s += indentStr(prettyIndent, indentLevel);
+        s += values[i].write(prettyIndent, indentLevel + 1);
+        if (i != (values.size() - 1))
+            s += ", ";
+        if (prettyIndent)
+            s += "\n";
+    }
+
+    if (prettyIndent)
+        s += indentStr(prettyIndent, indentLevel - 1);
+    s += "]";
+}
+
+void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel, string& s) const
+{
+    s += "{";
+    if (prettyIndent)
+        s += "\n";
+
+    for (unsigned int i = 0; i < keys.size(); i++) {
+        if (prettyIndent)
+            s += indentStr(prettyIndent, indentLevel);
+        s += "\"" + json_escape(keys[i]) + "\": ";
+        s += values[i].write(prettyIndent, indentLevel + 1);
+        if (i != (values.size() - 1))
+            s += ",";
+        if (prettyIndent)
+            s += "\n";
+    }
+
+    if (prettyIndent)
+        s += indentStr(prettyIndent, indentLevel - 1);
+    s += "}";
+}
+

From 6fd59ee897e9dc9b021440cbb738186dbf3a3e98 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 29 Jul 2014 11:24:26 -0400
Subject: [PATCH 0445/1819] script.h: set_vch() should shift a >32 bit value

Source: http://www.viva64.com/en/b/0268/
---
 src/script.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/script.h b/src/script.h
index e36be2db9e33..c74ae3759802 100644
--- a/src/script.h
+++ b/src/script.h
@@ -166,7 +166,7 @@ class CScriptNum
       // If the input vector's most significant byte is 0x80, remove it from
       // the result's msb and return a negative.
       if (vch.back() & 0x80)
-          return -(result & ~(0x80 << (8 * (vch.size() - 1))));
+          return -(result & ~(0x80ULL << (8 * (vch.size() - 1))));
 
       return result;
     }

From 6b5ee2e09263ab54c7111fc782fcb667a3eb86b3 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 29 Jul 2014 12:41:33 -0400
Subject: [PATCH 0446/1819] Update openssl.org URL to include https://

Suggested by whitj00.  Fixes #4595
---
 doc/README.md          | 2 +-
 doc/README_windows.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/README.md b/doc/README.md
index f5aeb34a3cd2..924f5a8a694c 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -72,5 +72,5 @@ The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/
 License
 ---------------------
 Distributed under the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php).
-This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](http://www.openssl.org/). This product includes
+This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes
 cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard.
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index 18fd4216f98f..368f2b45e1fb 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -5,7 +5,7 @@ Copyright (c) 2009-2014 Bitcoin Core Developers
 Distributed under the MIT/X11 software license, see the accompanying
 file COPYING or http://www.opensource.org/licenses/mit-license.php.
 This product includes software developed by the OpenSSL Project for use in
-the OpenSSL Toolkit (http://www.openssl.org/).  This product includes
+the OpenSSL Toolkit (https://www.openssl.org/).  This product includes
 cryptographic software written by Eric Young (eay@cryptsoft.com).
 
 

From 0c3e1019665edb6c456f9640307231863db2835f Mon Sep 17 00:00:00 2001
From: Aitor Pazos <mail@aitorpazos.es>
Date: Wed, 23 Jul 2014 20:10:01 +0200
Subject: [PATCH 0447/1819] Added systemd .service file in order to help
 distributions integrate bitcoind.

---
 contrib/systemd/bitcoind.service | 17 ++++++++++++
 doc/README.md                    |  1 +
 doc/systemd.md                   | 47 ++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+)
 create mode 100644 contrib/systemd/bitcoind.service
 create mode 100644 doc/systemd.md

diff --git a/contrib/systemd/bitcoind.service b/contrib/systemd/bitcoind.service
new file mode 100644
index 000000000000..edc81cc76317
--- /dev/null
+++ b/contrib/systemd/bitcoind.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Bitcoin's distributed currency daemon
+After=network.target
+
+[Service]
+User=bitcoind
+Group=bitcoind
+
+Type=forking
+PIDFile=/var/lib/bitcoind/bitcoind.pid
+ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid -conf=/etc/bitcoind.conf -datadir=/var/lib/bitcoind
+
+Restart=always
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/doc/README.md b/doc/README.md
index f5aeb34a3cd2..9c724ec1e9c7 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -68,6 +68,7 @@ The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/
 - [Assets Attribution](assets-attribution.md)
 - [Files](files.md)
 - [Tor Support](tor.md)
+- [Systemd](systemd.md)
 
 License
 ---------------------
diff --git a/doc/systemd.md b/doc/systemd.md
new file mode 100644
index 000000000000..96202c1532fb
--- /dev/null
+++ b/doc/systemd.md
@@ -0,0 +1,47 @@
+SYSTEMD SUPPORT IN BITCOIN
+==========================
+
+Packagers can find a .service file in this repo in order to integrate bitcoin's 
+daemon into systemd based distributions.
+
+bitcoind.service file is located in contrib/systemd/ folder.
+
+1. Users
+---------------------------------
+
+This .service file assumes bitcoind user and group exist in the system, so packager
+should make sure they are created on installation. 
+
+2. Files
+---------------------------------
+
+The .service file assumes several paths that might need to be adjusted according
+to packager's needs.
+
+Daemon's config file is assumed to be located at /etc/bitcoind.conf (you can
+use contrib/debian/examples/bitcoin.conf as an example). Once installed, users
+must edit the file in order to update at least these two 
+values: rpcuser and rpcpassword . Failing to do so will make the daemon fail 
+to boot. However, the message written to /var/lib/bitcoind/debug.log file is
+very helpful and no default values should be set:
+
+    YYYY-MM-DD HH:MM:DD Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
+    /etc/bitcoind.conf
+    It is recommended you use the following random password:
+    rpcuser=bitcoinrpc
+    rpcpassword=HdYZ5HGtAF7mx8aTw6uCATtD2maMAK4E12Ysp4YNZQcX
+    (you do not need to remember this password)
+    The username and password MUST NOT be the same.
+    If the file does not exist, create it with owner-readable-only file permissions.
+    It is also recommended to set alertnotify so you are notified of problems;
+    for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com
+
+Daemon's data and pid files will be stored in /var/lib/bitcoind directory, so it
+should be created on installation and make bitcoind user/group it's owner.
+
+3. Installing .service file
+---------------------------------
+
+Installing this .service file consists on just copying it to /usr/lib/systemd/system
+directory, followed by the command "systemctl daemon-reload" in order to update
+running systemd configuration.

From e59441f0863d20c6f205c4854a37507267183863 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Tue, 29 Jul 2014 00:09:57 -0400
Subject: [PATCH 0448/1819] Process fee estimate file into temporary vector
 first to let sanity checking complete.

---
 src/txmempool.cpp | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index a06de7a94738..29924fff09c2 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -206,7 +206,7 @@ class CMinerPolicyEstimator
             }
             if ((delta-1) >= (int)history.size())
                 delta = history.size(); // Last bucket is catch-all
-            entriesByConfirmations[delta-1].push_back(&entry);
+            entriesByConfirmations.at(delta-1).push_back(&entry);
         }
         for (size_t i = 0; i < entriesByConfirmations.size(); i++)
         {
@@ -319,16 +319,27 @@ class CMinerPolicyEstimator
 
     void Read(CAutoFile& filein, const CFeeRate& minRelayFee)
     {
-        filein >> nBestSeenHeight;
+        int nFileBestSeenHeight;
+        filein >> nFileBestSeenHeight;
         size_t numEntries;
         filein >> numEntries;
-        history.clear();
+        if (numEntries <= 0 || numEntries > 10000)
+            throw runtime_error("Corrupt estimates file.  Must have between 1 and 10k entires.");
+
+        std::vector<CBlockAverage> fileHistory;
+        
         for (size_t i = 0; i < numEntries; i++)
         {
             CBlockAverage entry;
             entry.Read(filein, minRelayFee);
-            history.push_back(entry);
+            fileHistory.push_back(entry);
         }
+
+        //Now that we've processed the entire fee estimate data file and not
+        //thrown any errors, we can copy it to our history
+        nBestSeenHeight = nFileBestSeenHeight;
+        history = fileHistory;
+        assert(history.size() > 0);
     }
 };
 

From f0c2915f66ade456c9d7847ea64fef09e1a12975 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Mon, 7 Jul 2014 07:40:40 +0200
Subject: [PATCH 0449/1819] Simplify and rename CheckWork to ProcessBlockFound

---
 src/miner.cpp | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index ec56c7119267..9408d2c5aac9 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -402,17 +402,8 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
     return CreateNewBlock(scriptPubKey);
 }
 
-bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
+bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
 {
-    uint256 hash = pblock->GetHash();
-    uint256 hashTarget = uint256().SetCompact(pblock->nBits);
-
-    if (hash > hashTarget)
-        return false;
-
-    //// debug print
-    LogPrintf("BitcoinMiner:\n");
-    LogPrintf("proof-of-work found  \n  hash: %s  \ntarget: %s\n", hash.GetHex(), hashTarget.GetHex());
     pblock->print();
     LogPrintf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue));
 
@@ -500,7 +491,9 @@ void static BitcoinMiner(CWallet *pwallet)
                         assert(hash == pblock->GetHash());
 
                         SetThreadPriority(THREAD_PRIORITY_NORMAL);
-                        CheckWork(pblock, *pwallet, reservekey);
+                        LogPrintf("BitcoinMiner:\n");
+                        LogPrintf("proof-of-work found  \n  hash: %s  \ntarget: %s\n", hash.GetHex(), hashTarget.GetHex());
+                        ProcessBlockFound(pblock, *pwallet, reservekey);
                         SetThreadPriority(THREAD_PRIORITY_LOWEST);
 
                         // In regression test mode, stop mining after a block is found.

From 60dc8e4208058814494b301c355a5996af9517a9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 30 Jul 2014 15:27:03 +0200
Subject: [PATCH 0450/1819] Allow -onlynet=onion to be used

Just an alias for onlynet=tor, but matches the new name
of the proxy option -onion= better.
---
 src/init.cpp    | 2 +-
 src/netbase.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b84c233b9956..a908169cd9aa 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -248,7 +248,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -maxreceivebuffer=<n>  " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n";
     strUsage += "  -maxsendbuffer=<n>     " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n";
     strUsage += "  -onion=<ip:port>       " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
-    strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Tor)") + "\n";
+    strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Onion)") + "\n";
     strUsage += "  -permitbaremultisig    " + _("Relay non-P2SH multisig (default: 1)") + "\n";
     strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
     strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
diff --git a/src/netbase.cpp b/src/netbase.cpp
index af6d11f0e217..f9f4755f7b80 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -47,7 +47,7 @@ enum Network ParseNetwork(std::string net) {
     boost::to_lower(net);
     if (net == "ipv4") return NET_IPV4;
     if (net == "ipv6") return NET_IPV6;
-    if (net == "tor")  return NET_TOR;
+    if (net == "tor" || net == "onion")  return NET_TOR;
     return NET_UNROUTABLE;
 }
 

From c91a9471be7a96311a7e1452a3624aa557bc185d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 30 Jul 2014 15:31:36 +0200
Subject: [PATCH 0451/1819] Add IsReachable(net) function

Allows other parts of the program to query for reachable
status of a network. Similar to IsLimited(net).
---
 src/net.cpp | 10 ++++++++--
 src/net.h   |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 62124514c8d3..27f71e45dc48 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -307,12 +307,18 @@ bool IsLocal(const CService& addr)
     return mapLocalHost.count(addr) > 0;
 }
 
+/** check whether a given network is one we can probably connect to */
+bool IsReachable(enum Network net)
+{
+    LOCK(cs_mapLocalHost);
+    return vfReachable[net] && !vfLimited[net];
+}
+
 /** check whether a given address is in a network we can probably connect to */
 bool IsReachable(const CNetAddr& addr)
 {
-    LOCK(cs_mapLocalHost);
     enum Network net = addr.GetNetwork();
-    return vfReachable[net] && !vfLimited[net];
+    return IsReachable(net);
 }
 
 bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet)
diff --git a/src/net.h b/src/net.h
index 2d9325abf98a..8656766e2695 100644
--- a/src/net.h
+++ b/src/net.h
@@ -106,6 +106,7 @@ bool AddLocal(const CNetAddr& addr, int nScore = LOCAL_NONE);
 bool SeenLocal(const CService& addr);
 bool IsLocal(const CService& addr);
 bool GetLocal(CService &addr, const CNetAddr *paddrPeer = NULL);
+bool IsReachable(enum Network net);
 bool IsReachable(const CNetAddr &addr);
 void SetReachable(enum Network net, bool fFlag = true);
 CAddress GetLocalAddress(const CNetAddr *paddrPeer = NULL);

From 075cf49e593025030c8b3572e606960f15de424e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 30 Jul 2014 15:32:36 +0200
Subject: [PATCH 0452/1819] Add GetNetworkName function

Returns the network name for an Network enum.
---
 src/netbase.cpp | 10 ++++++++++
 src/netbase.h   |  3 ++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index f9f4755f7b80..4e109a8bc916 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -51,6 +51,16 @@ enum Network ParseNetwork(std::string net) {
     return NET_UNROUTABLE;
 }
 
+std::string GetNetworkName(enum Network net) {
+    switch(net)
+    {
+    case NET_IPV4: return "ipv4";
+    case NET_IPV6: return "ipv6";
+    case NET_TOR: return "onion";
+    default: return "";
+    }
+}
+
 void SplitHostPort(std::string in, int &portOut, std::string &hostOut) {
     size_t colon = in.find_last_of(':');
     // if a : is found, and it either follows a [...], or no other : is in the string, treat it as port separator
diff --git a/src/netbase.h b/src/netbase.h
index 7d83e3534479..bd8dbf9695f0 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -26,7 +26,7 @@ extern bool fNameLookup;
 
 enum Network
 {
-    NET_UNROUTABLE,
+    NET_UNROUTABLE = 0,
     NET_IPV4,
     NET_IPV6,
     NET_TOR,
@@ -164,6 +164,7 @@ class CService : public CNetAddr
 typedef CService proxyType;
 
 enum Network ParseNetwork(std::string net);
+std::string GetNetworkName(enum Network net);
 void SplitHostPort(std::string in, int &portOut, std::string &hostOut);
 bool SetProxy(enum Network net, CService addrProxy);
 bool GetProxy(enum Network net, proxyType &proxyInfoOut);

From bd0aa105198d3cc12751dc4645877af70cac6258 Mon Sep 17 00:00:00 2001
From: Doug <doug@bitcoinarmory.com>
Date: Wed, 30 Jul 2014 16:04:40 -0400
Subject: [PATCH 0453/1819] Replace the temporary file hack currently used to
 change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution.

---
 src/qt/macdockiconhandler.mm | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index 74fb64ace300..a2ff148d9dad 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -6,7 +6,7 @@
 
 #include <QImageWriter>
 #include <QMenu>
-#include <QTemporaryFile>
+#include <QBuffer>
 #include <QWidget>
 
 #undef slots
@@ -95,14 +95,14 @@ - (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAp
         QSize size = icon.actualSize(QSize(128, 128));
         QPixmap pixmap = icon.pixmap(size);
 
-        // write temp file hack (could also be done through QIODevice [memory])
-        QTemporaryFile notificationIconFile;
-        if (!pixmap.isNull() && notificationIconFile.open()) {
-            QImageWriter writer(&notificationIconFile, "PNG");
+        // Write image into a R/W buffer from raw pixmap, then save the image.
+        QBuffer notificationBuffer;
+        if (!pixmap.isNull() && notificationBuffer.open(QIODevice::ReadWrite)) {
+            QImageWriter writer(&notificationBuffer, "PNG");
             if (writer.write(pixmap.toImage())) {
-                const char *cString = notificationIconFile.fileName().toUtf8().data();
-                NSString *macString = [NSString stringWithCString:cString encoding:NSUTF8StringEncoding];
-                image =  [[NSImage alloc] initWithContentsOfFile:macString];
+                NSData* macImgData = [NSData dataWithBytes:notificationBuffer.buffer().data()
+                                             length:notificationBuffer.buffer().size()];
+                image =  [[NSImage alloc] initWithData:macImgData];
             }
         }
 

From c7614f16d6d123ef182180a96fe43449e73db0b0 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 30 Jul 2014 23:25:30 -0400
Subject: [PATCH 0454/1819] univalue: remove unused methods getArray, getObject

---
 src/univalue/univalue.cpp | 22 ----------------------
 src/univalue/univalue.h   |  2 --
 2 files changed, 24 deletions(-)

diff --git a/src/univalue/univalue.cpp b/src/univalue/univalue.cpp
index e577aa8ee49d..afc208bffb97 100644
--- a/src/univalue/univalue.cpp
+++ b/src/univalue/univalue.cpp
@@ -147,28 +147,6 @@ bool UniValue::pushKVs(const UniValue& obj)
     return true;
 }
 
-bool UniValue::getArray(std::vector<UniValue>& arr)
-{
-    if (typ != VARR)
-        return false;
-
-    arr = values;
-    return true;
-}
-
-bool UniValue::getObject(std::map<std::string,UniValue>& obj)
-{
-    if (typ != VOBJ)
-        return false;
-
-    obj.clear();
-    for (unsigned int i = 0; i < keys.size(); i++) {
-        obj[keys[i]] = values[i];
-    }
-
-    return true;
-}
-
 int UniValue::findKey(const std::string& key) const
 {
     for (unsigned int i = 0; i < keys.size(); i++) {
diff --git a/src/univalue/univalue.h b/src/univalue/univalue.h
index 5e94b6ba238d..0a7bf3ccebac 100644
--- a/src/univalue/univalue.h
+++ b/src/univalue/univalue.h
@@ -61,8 +61,6 @@ class UniValue {
     size_t count() const { return values.size(); }
 
     bool getBool() const { return isTrue(); }
-    bool getArray(std::vector<UniValue>& arr);
-    bool getObject(std::map<std::string,UniValue>& obj);
     bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes);
     const UniValue& operator[](const std::string& key) const;
     const UniValue& operator[](unsigned int index) const;

From bdba2dd000f030b1dce3d2bc6caef84929438679 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 31 Jul 2014 09:05:13 +0200
Subject: [PATCH 0455/1819] qt: Remove an obscure option no-one cares about

Remove the "Display addresses" setting checkbox. It doesn't do what
the tooltip says, and seems kind of pointless in any case.

Fixes #4580.
---
 src/qt/forms/optionsdialog.ui    | 10 ----------
 src/qt/optionsdialog.cpp         |  1 -
 src/qt/optionsmodel.cpp          | 10 ----------
 src/qt/optionsmodel.h            |  3 ---
 src/qt/transactiontablemodel.cpp |  2 +-
 5 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 1f535a4a629f..47ed4c8bc6c4 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -451,16 +451,6 @@
          </item>
         </layout>
        </item>
-       <item>
-        <widget class="QCheckBox" name="displayAddresses">
-         <property name="toolTip">
-          <string>Whether to show Bitcoin addresses in the transaction list or not.</string>
-         </property>
-         <property name="text">
-          <string>&amp;Display addresses in transaction list</string>
-         </property>
-        </widget>
-       </item>
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_3_Display">
          <item>
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 0117d2e63359..fd1d446f9b89 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -185,7 +185,6 @@ void OptionsDialog::setMapper()
     /* Display */
     mapper->addMapping(ui->lang, OptionsModel::Language);
     mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
-    mapper->addMapping(ui->displayAddresses, OptionsModel::DisplayAddresses);
     mapper->addMapping(ui->thirdPartyTxUrls, OptionsModel::ThirdPartyTxUrls);
 }
 
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index f07e66bf04d8..99928ebe4df3 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -59,10 +59,6 @@ void OptionsModel::Init()
         settings.setValue("nDisplayUnit", BitcoinUnits::BTC);
     nDisplayUnit = settings.value("nDisplayUnit").toInt();
 
-    if (!settings.contains("bDisplayAddresses"))
-        settings.setValue("bDisplayAddresses", false);
-    bDisplayAddresses = settings.value("bDisplayAddresses", false).toBool();
-
     if (!settings.contains("strThirdPartyTxUrls"))
         settings.setValue("strThirdPartyTxUrls", "");
     strThirdPartyTxUrls = settings.value("strThirdPartyTxUrls", "").toString();
@@ -200,8 +196,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
 #endif
         case DisplayUnit:
             return nDisplayUnit;
-        case DisplayAddresses:
-            return bDisplayAddresses;
         case ThirdPartyTxUrls:
             return strThirdPartyTxUrls;
         case Language:
@@ -296,10 +290,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
         case DisplayUnit:
             setDisplayUnit(value);
             break;
-        case DisplayAddresses:
-            bDisplayAddresses = value.toBool();
-            settings.setValue("bDisplayAddresses", bDisplayAddresses);
-            break;
         case ThirdPartyTxUrls:
             if (strThirdPartyTxUrls != value.toString()) {
                 strThirdPartyTxUrls = value.toString();
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 9699f6eea637..80adab89c824 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -34,7 +34,6 @@ class OptionsModel : public QAbstractListModel
         ProxyPort,              // int
         Fee,                    // qint64
         DisplayUnit,            // BitcoinUnits::Unit
-        DisplayAddresses,       // bool
         ThirdPartyTxUrls,       // QString
         Language,               // QString
         CoinControlFeatures,    // bool
@@ -58,7 +57,6 @@ class OptionsModel : public QAbstractListModel
     bool getMinimizeToTray() { return fMinimizeToTray; }
     bool getMinimizeOnClose() { return fMinimizeOnClose; }
     int getDisplayUnit() { return nDisplayUnit; }
-    bool getDisplayAddresses() { return bDisplayAddresses; }
     QString getThirdPartyTxUrls() { return strThirdPartyTxUrls; }
     bool getProxySettings(QNetworkProxy& proxy) const;
     bool getCoinControlFeatures() { return fCoinControlFeatures; }
@@ -74,7 +72,6 @@ class OptionsModel : public QAbstractListModel
     bool fMinimizeOnClose;
     QString language;
     int nDisplayUnit;
-    bool bDisplayAddresses;
     QString strThirdPartyTxUrls;
     bool fCoinControlFeatures;
     /* settings that were overriden by command-line */
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 7acb0e8871b4..1647bc776f42 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -346,7 +346,7 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
     {
         description += label + QString(" ");
     }
-    if(label.isEmpty() || walletModel->getOptionsModel()->getDisplayAddresses() || tooltip)
+    if(label.isEmpty() || tooltip)
     {
         description += QString("(") + QString::fromStdString(address) + QString(")");
     }

From 84c5f77deb243a73c1c3d1b9950277e6ec99ec14 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 31 Jul 2014 15:01:56 +0200
Subject: [PATCH 0456/1819] English translation update

This is needed to add version 0.10.x on Transifex so that translation
can start.
---
 src/qt/bitcoinstrings.cpp   |   32 +-
 src/qt/locale/bitcoin_en.ts | 1258 ++++++++++++++++++++---------------
 2 files changed, 751 insertions(+), 539 deletions(-)

diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index e852c468a88d..9ac7f24867f2 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -38,6 +38,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Bind to given address and always listen on it. Use [host]:port notation for "
 "IPv6"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Bind to given address and whitelist peers connecting to it. Use [host]:port "
+"notation for IPv6"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Bind to given address to listen for JSON-RPC connections. Use [host]:port "
 "notation for IPv6. This option can be specified multiple times (default: "
 "bind to all interfaces)"),
@@ -48,6 +51,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Continuously rate-limit free transactions to <n>*1000 bytes per minute "
 "(default:15)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Create new files with system default permissions, instead of umask 077 (only "
+"effective with disabled wallet functionality)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Delete all wallet transactions and only recover those part of the blockchain "
 "through -rescan on startup"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -66,6 +72,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: This transaction requires a transaction fee of at least %s because of "
 "its amount, complexity, or use of recently received funds!"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Error: Unsupported argument -socks found. Setting SOCKS version isn't "
+"possible anymore, only SOCKS5 proxies are supported."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Execute command when a network tx respends wallet tx input (%s=respend TxID, "
 "%t=wallet TxID)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -102,6 +111,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Output debugging information (default: 0, supplying <category> is optional)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
+"unless -connect)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
@@ -141,6 +153,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as "
 "wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect "
 "you should restore from a backup."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Whitelist peers connecting from the given netmask or ip. Can be specified "
+"multiple times."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Whitelisted peers cannot be DoS banned and their transactions are always "
+"relayed, even if they are already in the mempool, useful e.g. for a gateway"),
 QT_TRANSLATE_NOOP("bitcoin-core", "(default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "(default: wallet.dat)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
@@ -148,14 +166,16 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -externalip address: '%s'"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -whitebind address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS proxy"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS5 proxy"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Connection options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"),
@@ -191,7 +211,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write to coin database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write transaction index"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write undo data"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in BTC/kB) to add to transactions you send (default: %s)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Find peers using DNS lookup (default: 1 unless -connect)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: 288, 0 = all)"),
@@ -210,6 +229,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'")
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: 50000)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 8333 or testnet: 18333)"),
@@ -221,6 +241,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Maintain a full transaction index (default: 0
 QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: 125)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
@@ -236,11 +257,11 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild block chain index from current blk000??.dat files"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Relay and mine data carrier transactions (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Relay non-P2SH multisig (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Select SOCKS version for -proxy (4 or 5, default: 5)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"),
@@ -251,7 +272,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: 0)"
 QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: 4)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Show benchmark information (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: bitcoin.conf)"),
@@ -272,7 +292,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -socks proxy version requested: %i"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"),
@@ -286,8 +305,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside data directory %s")
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin to complete"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Warning"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Deprecated argument -debugnet ignored, use -debug=net"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade required!"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Unsupported argument -benchmark ignored, use -debug=bench."),
+QT_TRANSLATE_NOOP("bitcoin-core", "Warning: Unsupported argument -debugnet ignored, use -debug=net."),
 QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "on startup"),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 4b541eabe9dc..6739ef002107 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1,50 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
 <TS version="2.1" language="en">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/aboutdialog.ui" line="+14"/>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+39"/>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+57"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="+29"/>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <location line="+0"/>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+12"/>
-        <location line="+2"/>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"></translation>
-    </message>
-</context>
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -164,7 +120,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <location line="+1"/>
-        <source>There was an error trying to save the address list to %1.</source>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
@@ -209,12 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Repeat new passphrase</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="+40"/>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location filename="../askpassphrasedialog.cpp" line="+41"/>
         <source>Encrypt wallet</source>
         <translation>Encrypt wallet</translation>
     </message>
@@ -281,7 +232,12 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Wallet encrypted</translation>
     </message>
     <message>
-        <location line="-56"/>
+        <location line="-135"/>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+79"/>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin 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.</translation>
     </message>
@@ -330,27 +286,27 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+294"/>
+        <location filename="../bitcoingui.cpp" line="+300"/>
         <source>Sign &amp;message...</source>
         <translation>Sign &amp;message...</translation>
     </message>
     <message>
-        <location line="+335"/>
+        <location line="+339"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location line="-407"/>
+        <location line="-411"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
     <message>
-        <location line="-136"/>
+        <location line="-142"/>
         <source>Node</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+137"/>
+        <location line="+143"/>
         <source>Show general overview of wallet</source>
         <translation>Show general overview of wallet</translation>
     </message>
@@ -426,7 +382,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+325"/>
+        <location line="+329"/>
         <source>Importing blocks from disk...</source>
         <translation>Importing blocks from disk...</translation>
     </message>
@@ -436,7 +392,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-409"/>
         <source>Send coins to a Bitcoin address</source>
         <translation>Send coins to a Bitcoin address</translation>
     </message>
@@ -471,17 +427,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>&amp;Verify message...</translation>
     </message>
     <message>
-        <location line="+440"/>
+        <location line="+437"/>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <location line="-652"/>
+        <location line="-655"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
     <message>
-        <location line="+145"/>
+        <location line="+151"/>
         <source>&amp;Send</source>
         <translation>&amp;Send</translation>
     </message>
@@ -537,18 +493,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Tabs toolbar</translation>
     </message>
     <message>
-        <location line="-283"/>
-        <location line="+375"/>
+        <location line="-289"/>
+        <location line="+386"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
     <message>
-        <location line="-400"/>
+        <location line="-411"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
     <message>
-        <location line="+162"/>
+        <location line="+168"/>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -584,13 +540,13 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+159"/>
+        <location line="+164"/>
         <location line="+5"/>
         <source>Bitcoin client</source>
         <translation>Bitcoin client</translation>
     </message>
     <message numerus="yes">
-        <location line="+142"/>
+        <location line="+141"/>
         <source>%n active connection(s) to Bitcoin network</source>
         <translation>
             <numerusform>%n active connection to Bitcoin network</numerusform>
@@ -603,17 +559,12 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>No block source available...</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Processed %1 of %2 (estimated) blocks of transaction history.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+10"/>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Processed %1 blocks of transaction history.</translation>
     </message>
     <message numerus="yes">
-        <location line="+27"/>
+        <location line="+26"/>
         <source>%n hour(s)</source>
         <translation>
             <numerusform>%n hour</numerusform>
@@ -691,7 +642,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Catching up...</translation>
     </message>
     <message>
-        <location line="+130"/>
+        <location line="+126"/>
         <source>Sent transaction</source>
         <translation>Sent transaction</translation>
     </message>
@@ -723,16 +674,11 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../bitcoin.cpp" line="+447"/>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+137"/>
+        <location filename="../clientmodel.cpp" line="+138"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -771,7 +717,7 @@ Address: %4
     </message>
     <message>
         <location line="+32"/>
-        <source>Low Output:</source>
+        <source>Dust:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -830,7 +776,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="+41"/>
+        <location filename="../coincontroldialog.cpp" line="+43"/>
         <source>Copy address</source>
         <translation type="unfinished">Copy address</translation>
     </message>
@@ -887,7 +833,7 @@ Address: %4
     </message>
     <message>
         <location line="+1"/>
-        <source>Copy low output</source>
+        <source>Copy dust</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -896,17 +842,17 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+332"/>
+        <location line="+333"/>
         <source>highest</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
         <source>higher</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
         <source>high</source>
         <translation type="unfinished"></translation>
     </message>
@@ -916,17 +862,18 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
+        <location line="+12"/>
         <source>medium</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="-11"/>
         <source>low-medium</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+0"/>
         <source>low</source>
         <translation type="unfinished"></translation>
     </message>
@@ -936,27 +883,27 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+11"/>
         <source>lowest</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+28"/>
         <source>none</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+141"/>
-        <source>Dust</source>
+        <location line="+162"/>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="-28"/>
         <source>yes</source>
         <translation type="unfinished"></translation>
     </message>
@@ -966,7 +913,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -997,23 +944,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <location line="+4"/>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-3"/>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+43"/>
+        <location line="+50"/>
         <location line="+61"/>
         <source>(no label)</source>
         <translation type="unfinished">(no label)</translation>
@@ -1128,12 +1059,7 @@ Address: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <location filename="../forms/helpmessagedialog.ui" line="+19"/>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="+24"/>
+        <location filename="../utilitydialog.cpp" line="+29"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -1143,7 +1069,23 @@ Address: %4
         <translation type="unfinished">version</translation>
     </message>
     <message>
+        <location line="+5"/>
         <location line="+2"/>
+        <source>(%1-bit)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>About Bitcoin Core</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Command-line options</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation type="unfinished">Usage:</translation>
     </message>
@@ -1318,6 +1260,16 @@ Address: %4
     </message>
     <message>
         <location line="+160"/>
+        <source>Accept connections from outside</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Allow incoming connections</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1332,7 +1284,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+194"/>
+        <location line="+174"/>
         <location line="+13"/>
         <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 type="unfinished"></translation>
@@ -1358,7 +1310,7 @@ Address: %4
         <translation>&amp;Reset Options</translation>
     </message>
     <message>
-        <location line="-337"/>
+        <location line="-327"/>
         <source>&amp;Network</source>
         <translation>&amp;Network</translation>
     </message>
@@ -1403,7 +1355,7 @@ Address: %4
         <translation>Map port using &amp;UPnP</translation>
     </message>
     <message>
-        <location line="+19"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
     </message>
@@ -1417,16 +1369,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port of the proxy (e.g. 9050)</translation>
     </message>
-    <message>
-        <location line="+7"/>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Version:</translation>
-    </message>
-    <message>
-        <location line="+13"/>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS version of the proxy (e.g. 5)</translation>
-    </message>
     <message>
         <location line="+36"/>
         <source>&amp;Window</source>
@@ -1488,12 +1430,12 @@ Address: %4
         <translation>&amp;Display addresses in transaction list</translation>
     </message>
     <message>
-        <location line="-262"/>
+        <location line="-252"/>
         <source>Whether to show coin control features or not.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+422"/>
+        <location line="+412"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
@@ -1503,17 +1445,17 @@ Address: %4
         <translation>&amp;Cancel</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+72"/>
+        <location filename="../optionsdialog.cpp" line="+68"/>
         <source>default</source>
         <translation>default</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+63"/>
         <source>none</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+82"/>
+        <location line="+83"/>
         <source>Confirm options reset</source>
         <translation>Confirm options reset</translation>
     </message>
@@ -1547,18 +1489,23 @@ Address: %4
         <translation>Form</translation>
     </message>
     <message>
-        <location line="+50"/>
-        <location line="+231"/>
+        <location line="+52"/>
+        <location line="+394"/>
         <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>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.</translation>
     </message>
     <message>
-        <location line="-238"/>
+        <location line="-401"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
     <message>
-        <location line="+51"/>
+        <location line="+33"/>
+        <source>Watchonly:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Available:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1583,12 +1530,12 @@ Address: %4
         <translation>Immature:</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+16"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Mined balance that has not yet matured</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+23"/>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
@@ -1598,12 +1545,40 @@ Address: %4
         <translation>Your current total balance</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+38"/>
+        <source>Your current balance in watchonly addresses</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+25"/>
+        <location line="+25"/>
+        <location line="+44"/>
+        <source>0 BTC</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-72"/>
+        <source>Unconfirmed transactions to watchonly addresses</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+25"/>
+        <source>Mined balance in watchonly addresses that has not yet matured</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+44"/>
+        <source>Current total balance in watchonly addresses</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+67"/>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Recent transactions&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="+120"/>
+        <location filename="../overviewpage.cpp" line="+123"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>out of sync</translation>
@@ -1612,68 +1587,91 @@ Address: %4
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="+403"/>
-        <location line="+13"/>
+        <location filename="../paymentserver.cpp" line="+405"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation type="unfinished">URI handling</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="-7"/>
+        <source>Invalid payment address %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
         <translation type="unfinished">URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</translation>
     </message>
     <message>
-        <location line="+96"/>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <location line="+14"/>
+        <source>Payment request file can not be read! This can be caused by an invalid payment request file.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-221"/>
-        <location line="+212"/>
-        <location line="+13"/>
-        <location line="+95"/>
-        <location line="+18"/>
-        <location line="+16"/>
-        <source>Payment request error</source>
+        <location line="+62"/>
+        <location line="+9"/>
+        <location line="+32"/>
+        <source>Payment request rejected</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-353"/>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <location line="-41"/>
+        <source>Payment request network doesn&apos;t match client network.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+58"/>
-        <source>Net manager warning</source>
+        <location line="+9"/>
+        <source>Payment request has expired.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
+        <location line="+7"/>
+        <source>Payment request is not initialized.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+52"/>
-        <source>Payment request fetch URL is invalid: %1</source>
+        <location line="+34"/>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Payment request file handling</source>
+        <location line="+113"/>
+        <source>Payment request can not be parsed!</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
+        <location line="-366"/>
+        <location line="+219"/>
+        <location line="+34"/>
+        <location line="+98"/>
+        <location line="+14"/>
+        <location line="+18"/>
+        <source>Payment request error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+73"/>
+        <location line="-382"/>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+105"/>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+34"/>
+        <source>Payment request file handling</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+105"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+59"/>
+        <location line="+58"/>
         <source>Refund from %1</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1683,12 +1681,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+24"/>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+11"/>
+        <location line="+33"/>
         <source>Bad response from server %1</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1703,39 +1696,70 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <location filename="../peertablemodel.cpp" line="+117"/>
+        <source>Address</source>
+        <translation type="unfinished">Address</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>User Agent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Start Height</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoin.cpp" line="+71"/>
-        <location line="+7"/>
-        <location line="+13"/>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <location filename="../bitcoinunits.cpp" line="+200"/>
+        <source>Amount</source>
+        <translation type="unfinished">Amount</translation>
     </message>
     <message>
-        <location line="-19"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: Specified data directory &quot;%1&quot; does not exist.</translation>
+        <location filename="../guiutil.cpp" line="+97"/>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+        <location line="+673"/>
+        <source>%1 d</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
+        <location line="+2"/>
+        <source>%1 h</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>%1 m</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>%1 s</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
+        <source>NETWORK</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+60"/>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
+        <location line="+3"/>
+        <source>UNKNOWN</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="+89"/>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished">Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <location line="+8"/>
+        <source>None</source>
+        <translation type="unfinished"></translation>
     </message>
 </context>
 <context>
@@ -1751,7 +1775,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+28"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation type="unfinished">Save QR Code</translation>
     </message>
@@ -1772,19 +1796,33 @@ Address: %4
         <location line="+10"/>
         <location line="+23"/>
         <location line="+26"/>
+        <location line="+26"/>
         <location line="+23"/>
         <location line="+23"/>
         <location line="+36"/>
         <location line="+23"/>
         <location line="+36"/>
         <location line="+23"/>
-        <location line="+23"/>
-        <location filename="../rpcconsole.cpp" line="+373"/>
+        <location line="+448"/>
+        <location line="+21"/>
+        <location line="+13"/>
+        <location line="+20"/>
+        <location line="+14"/>
+        <location line="+7"/>
+        <location line="+14"/>
+        <location line="+21"/>
+        <location line="+14"/>
+        <location line="+14"/>
+        <location line="+14"/>
+        <location line="+28"/>
+        <location line="+7"/>
+        <location line="+7"/>
+        <location filename="../rpcconsole.cpp" line="+633"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location line="-223"/>
+        <location line="-868"/>
         <source>Client version</source>
         <translation>Client version</translation>
     </message>
@@ -1808,6 +1846,11 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>Using OpenSSL version</translation>
     </message>
+    <message>
+        <location line="+26"/>
+        <source>Using BerkeleyDB version</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+49"/>
         <source>Startup time</source>
@@ -1839,12 +1882,97 @@ Address: %4
         <translation>Current number of blocks</translation>
     </message>
     <message>
-        <location line="+23"/>
-        <source>Estimated total blocks</source>
-        <translation>Estimated total blocks</translation>
+        <location line="+300"/>
+        <source>Received</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="+80"/>
+        <source>Sent</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <source>&amp;Peers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Select a peer to view detailed information.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+41"/>
+        <source>Version:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Last Receive:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>User Agent:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+27"/>
+        <source>Ping Time:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>Connection Time:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+21"/>
+        <source>Starting Height:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Bytes Sent:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Bytes Received:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Ban Score:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Direction:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Sync Node:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Last Send:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Services:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>IP Address/port:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-631"/>
         <source>Last block time</source>
         <translation>Last block time</translation>
     </message>
@@ -1874,24 +2002,22 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+64"/>
-        <location filename="../rpcconsole.cpp" line="-10"/>
+        <location filename="../rpcconsole.cpp" line="-236"/>
         <source>In:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+80"/>
-        <location filename="../rpcconsole.cpp" line="+1"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-521"/>
+        <location filename="../forms/rpcconsole.ui" line="-354"/>
         <source>Build date</source>
         <translation>Build date</translation>
     </message>
     <message>
-        <location line="+206"/>
+        <location line="+183"/>
         <source>Debug log file</source>
         <translation>Debug log file</translation>
     </message>
@@ -1921,7 +2047,7 @@ Address: %4
         <translation>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</translation>
     </message>
     <message>
-        <location line="+136"/>
+        <location line="+138"/>
         <source>%1 B</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1941,18 +2067,49 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>%1 m</source>
+        <location line="+93"/>
+        <source>Peer Disconnected</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
-        <source>%1 h</source>
+        <location line="+23"/>
+        <source>Node Detail</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <location line="+1"/>
+        <source>never</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>%1 secs</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Inbound</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>Outbound</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>%1 h %2 m</source>
+        <source>Yes</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>No</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Fetching...</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
@@ -2085,7 +2242,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="+56"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2148,12 +2305,12 @@ Address: %4
         <translation type="unfinished">Message</translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation type="unfinished">Amount</translation>
     </message>
     <message>
-        <location line="+38"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation type="unfinished">(no label)</translation>
     </message>
@@ -2172,8 +2329,7 @@ Address: %4
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+380"/>
-        <location line="+80"/>
+        <location filename="../sendcoinsdialog.cpp" line="+447"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
@@ -2223,12 +2379,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+32"/>
-        <source>Low Output:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+48"/>
+        <location line="+80"/>
         <source>After Fee:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2263,7 +2414,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-271"/>
+        <source>Dust:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+274"/>
         <source>Clear &amp;All</source>
         <translation>Clear &amp;All</translation>
     </message>
@@ -2283,7 +2439,7 @@ Address: %4
         <translation>S&amp;end</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-229"/>
+        <location filename="../sendcoinsdialog.cpp" line="-215"/>
         <source>Confirm send coins</source>
         <translation>Confirm send coins</translation>
     </message>
@@ -2296,7 +2452,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-121"/>
+        <location line="-122"/>
         <source>Copy quantity</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2326,17 +2482,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Copy low output</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Copy change</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+170"/>
+        <location line="+171"/>
         <source>Total Amount %1 (= %2)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2346,7 +2497,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+203"/>
+        <location line="+189"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>The recipient address is not valid, please recheck.</translation>
     </message>
@@ -2396,23 +2547,18 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-367"/>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+9"/>
-        <source>added as transaction fee</source>
+        <location line="-504"/>
+        <source>Copy dust</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+171"/>
-        <source>Payment request expired</source>
+        <location line="+151"/>
+        <source>Are you sure you want to send?</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>Invalid payment address %1</source>
+        <location line="+9"/>
+        <source>added as transaction fee</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
@@ -2430,18 +2576,13 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>Pay &amp;To:</translation>
     </message>
-    <message>
-        <location line="+18"/>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <location filename="../sendcoinsentry.cpp" line="+30"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Enter a label for this address to add it to your address book</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="+57"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+75"/>
         <source>&amp;Label:</source>
         <translation>&amp;Label:</translation>
     </message>
@@ -2456,7 +2597,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+50"/>
+        <location line="+33"/>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+17"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
@@ -2518,7 +2664,7 @@ Address: %4
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="+52"/>
+        <location filename="../utilitydialog.cpp" line="+51"/>
         <source>Bitcoin Core is shutting down...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2547,8 +2693,8 @@ Address: %4
     </message>
     <message>
         <location line="+18"/>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+7"/>
@@ -2620,8 +2766,8 @@ Address: %4
     </message>
     <message>
         <location line="+21"/>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+37"/>
@@ -2639,17 +2785,12 @@ Address: %4
         <translation>Reset all verify message fields</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="+30"/>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <location line="-1"/>
+        <location filename="../signverifymessagedialog.cpp" line="+29"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Click &quot;Sign Message&quot; to generate signature</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+83"/>
         <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>The entered address is invalid.</translation>
@@ -2744,7 +2885,7 @@ Address: %4
 <context>
     <name>TransactionDesc</name>
     <message>
-        <location filename="../transactiondesc.cpp" line="+29"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open until %1</source>
         <translation>Open until %1</translation>
     </message>
@@ -2798,39 +2939,45 @@ Address: %4
     </message>
     <message>
         <location line="+5"/>
-        <location line="+17"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>From</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <location line="+22"/>
-        <location line="+58"/>
+        <location line="-71"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>To</translation>
     </message>
     <message>
-        <location line="-77"/>
-        <location line="+2"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>own address</translation>
     </message>
     <message>
-        <location line="-2"/>
+        <location line="+0"/>
+        <location line="+69"/>
+        <source>watch-only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-67"/>
         <source>label</source>
         <translation>label</translation>
     </message>
     <message>
-        <location line="+37"/>
+        <location line="+34"/>
         <location line="+12"/>
-        <location line="+45"/>
-        <location line="+17"/>
+        <location line="+53"/>
+        <location line="+26"/>
         <location line="+53"/>
         <source>Credit</source>
         <translation>Credit</translation>
     </message>
     <message numerus="yes">
-        <location line="-125"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
         <translation>
             <numerusform>matures in %n more block</numerusform>
@@ -2843,15 +2990,24 @@ Address: %4
         <translation>not accepted</translation>
     </message>
     <message>
-        <location line="+44"/>
-        <location line="+8"/>
-        <location line="+15"/>
+        <location line="+59"/>
+        <location line="+25"/>
         <location line="+53"/>
         <source>Debit</source>
         <translation>Debit</translation>
     </message>
     <message>
-        <location line="-62"/>
+        <location line="-68"/>
+        <source>Total debit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Total credit</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Transaction fee</translation>
     </message>
@@ -2907,17 +3063,19 @@ Address: %4
         <translation>Amount</translation>
     </message>
     <message>
+        <location line="+1"/>
         <location line="+1"/>
         <source>true</source>
         <translation>true</translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>false</translation>
     </message>
     <message>
-        <location line="-230"/>
+        <location line="-242"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, has not been successfully broadcast yet</translation>
     </message>
@@ -2930,7 +3088,7 @@ Address: %4
         </translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+67"/>
         <source>unknown</source>
         <translation>unknown</translation>
     </message>
@@ -2951,7 +3109,7 @@ Address: %4
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="+238"/>
+        <location filename="../transactiontablemodel.cpp" line="+237"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
@@ -2966,12 +3124,7 @@ Address: %4
         <translation>Address</translation>
     </message>
     <message>
-        <location line="+0"/>
-        <source>Amount</source>
-        <translation>Amount</translation>
-    </message>
-    <message>
-        <location line="+70"/>
+        <location line="+76"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3049,12 +3202,12 @@ Address: %4
         <translation>Mined</translation>
     </message>
     <message>
-        <location line="+38"/>
+        <location line="+41"/>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
     </message>
     <message>
-        <location line="+192"/>
+        <location line="+193"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Transaction status. Hover over this field to show number of confirmations.</translation>
     </message>
@@ -3153,7 +3306,7 @@ Address: %4
         <translation>Min amount</translation>
     </message>
     <message>
-        <location line="+34"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copy address</translation>
     </message>
@@ -3238,12 +3391,7 @@ Address: %4
         <translation>Address</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Amount</source>
-        <translation>Amount</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
@@ -3258,6 +3406,14 @@ Address: %4
         <translation>to</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <location filename="../bitcoingui.cpp" line="+101"/>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation type="unfinished"></translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -3269,7 +3425,7 @@ Address: %4
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="+258"/>
+        <location filename="../walletmodel.cpp" line="+280"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
@@ -3320,27 +3476,12 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+262"/>
-        <source>Usage:</source>
-        <translation>Usage:</translation>
-    </message>
-    <message>
-        <location line="-66"/>
-        <source>List commands</source>
-        <translation>List commands</translation>
-    </message>
-    <message>
-        <location line="-15"/>
-        <source>Get help for a command</source>
-        <translation>Get help for a command</translation>
-    </message>
-    <message>
-        <location line="+28"/>
+        <location filename="../bitcoinstrings.cpp" line="+249"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location line="+32"/>
+        <location line="+28"/>
         <source>Specify configuration file (default: bitcoin.conf)</source>
         <translation>Specify configuration file (default: bitcoin.conf)</translation>
     </message>
@@ -3355,7 +3496,7 @@ Address: %4
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location line="-46"/>
+        <location line="-44"/>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
         <translation>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</translation>
     </message>
@@ -3365,62 +3506,52 @@ Address: %4
         <translation>Maintain at most &lt;n&gt; connections to peers (default: 125)</translation>
     </message>
     <message>
-        <location line="-58"/>
+        <location line="-62"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+101"/>
+        <location line="+103"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
         <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
     </message>
     <message>
-        <location line="-173"/>
+        <location line="-181"/>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
     </message>
     <message>
-        <location line="-52"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>An error occurred while setting up the RPC port %u for listening on IPv4: %s</translation>
-    </message>
-    <message>
-        <location line="+50"/>
+        <location line="-2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</translation>
     </message>
     <message>
-        <location line="+51"/>
+        <location line="+59"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+88"/>
+        <location line="+99"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
     <message>
-        <location line="+43"/>
+        <location line="+36"/>
         <source>Use the test network</source>
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location line="-137"/>
+        <location line="-134"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location line="-117"/>
+        <location line="-154"/>
         <source>%s, you must set a rpcpassword in the configuration file:
 %s
 It is recommended you use the following random password:
@@ -3445,42 +3576,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
 </translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+15"/>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+13"/>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+12"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+5"/>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation>
     </message>
@@ -3490,17 +3606,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+12"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+12"/>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3510,12 +3621,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+5"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+15"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3530,7 +3641,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3570,7 +3681,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+10"/>
         <source>(default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3591,46 +3702,26 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <location line="+1"/>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
         <source>Block creation options:</source>
         <translation>Block creation options:</translation>
     </message>
     <message>
-        <location line="+5"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+6"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Connect only to the specified node(s)</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Connection options:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Corrupted block database detected</source>
         <translation>Corrupted block database detected</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Debugging/Testing options:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3680,7 +3771,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error: Disk space is low!</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: Wallet locked, unable to create transaction!</translation>
     </message>
@@ -3745,22 +3836,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Failed to write undo data</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Find peers using DNS lookup (default: 1 unless -connect)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Force safe mode (default: 0)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3770,7 +3846,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Generate coins (default: 0)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>How many blocks to check at startup (default: 288, 0 = all)</translation>
     </message>
@@ -3785,17 +3861,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorrect or no genesis block found. Wrong datadir for network?</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+4"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+21"/>
         <source>Not enough file descriptors available.</source>
         <translation>Not enough file descriptors available.</translation>
     </message>
@@ -3805,22 +3881,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>RPC client options:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+7"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+10"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3835,7 +3901,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Set the number of threads to service RPC calls (default: 4)</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+9"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specify wallet file (within data directory)</translation>
     </message>
@@ -3845,17 +3911,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>This is intended for regression testing tools and app development.</source>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
+        <location line="+4"/>
+        <source>This is intended for regression testing tools and app development.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+14"/>
         <source>Verifying blocks...</source>
         <translation>Verifying blocks...</translation>
     </message>
@@ -3864,11 +3930,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Verifying wallet...</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
@@ -3880,12 +3941,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+5"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
@@ -3895,30 +3951,165 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-150"/>
+        <location line="-195"/>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+6"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</translation>
     </message>
     <message>
-        <location line="+25"/>
+        <location line="+9"/>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+11"/>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+2"/>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+103"/>
+        <location line="+11"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Information</source>
         <translation>Information</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+4"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
@@ -3929,13 +4120,28 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+3"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+5"/>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3954,6 +4160,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
@@ -3980,7 +4196,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3995,18 +4211,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <location line="+2"/>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</translation>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Send command to Bitcoin Core</source>
+        <location line="+3"/>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -4029,11 +4245,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -4050,17 +4261,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Specify connection timeout in milliseconds (default: 5000)</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+7"/>
         <source>System error: </source>
         <translation>System error: </translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
+        <source>This is experimental software.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Transaction amount too small</source>
         <translation>Transaction amount too small</translation>
     </message>
@@ -4075,7 +4286,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Transaction too large</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Use UPnP to map the listening port (default: 0)</translation>
     </message>
@@ -4090,29 +4306,34 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Username for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Warning</source>
         <translation>Warning</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Warning: This version is obsolete, upgrade required!</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Zapping all transactions from wallet...</source>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>on startup</source>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Zapping all transactions from wallet...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
-        <source>version</source>
-        <translation type="unfinished">version</translation>
+        <source>on startup</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4120,47 +4341,37 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>
     <message>
-        <location line="-71"/>
+        <location line="-64"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
-    <message>
-        <location line="-78"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Allow JSON-RPC connections from specified IP address</translation>
-    </message>
-    <message>
-        <location line="+95"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</translation>
-    </message>
     <message>
         <location line="-164"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+197"/>
+        <location line="+210"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
     <message>
-        <location line="-28"/>
+        <location line="-27"/>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
         <translation>Set key pool size to &lt;n&gt; (default: 100)</translation>
     </message>
     <message>
-        <location line="-12"/>
+        <location line="-8"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescan the block chain for missing wallet transactions</translation>
     </message>
     <message>
-        <location line="+43"/>
+        <location line="+36"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Use OpenSSL (https) for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-34"/>
+        <location line="-31"/>
         <source>Server certificate file (default: server.cert)</source>
         <translation>Server certificate file (default: server.cert)</translation>
     </message>
@@ -4170,27 +4381,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Server private key (default: server.pem)</translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+19"/>
         <source>This help message</source>
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Unable to bind to %s on this computer (bind returned error %d, %s)</translation>
-    </message>
-    <message>
-        <location line="-126"/>
+        <location line="-118"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location line="+67"/>
+        <location line="+68"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location line="-40"/>
+        <location line="-42"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
@@ -4200,12 +4406,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat: Wallet requires newer version of Bitcoin</translation>
     </message>
     <message>
-        <location line="+113"/>
+        <location line="+110"/>
         <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
         <translation>Wallet needed to be rewritten: restart Bitcoin to complete</translation>
     </message>
     <message>
-        <location line="-115"/>
+        <location line="-112"/>
         <source>Error loading wallet.dat</source>
         <translation>Error loading wallet.dat</translation>
     </message>
@@ -4220,12 +4426,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-1"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Unknown -socks proxy version requested: %i</translation>
-    </message>
-    <message>
-        <location line="-120"/>
+        <location line="-122"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4235,7 +4436,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot resolve -externalip address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+56"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
@@ -4245,63 +4446,54 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Invalid amount</translation>
     </message>
     <message>
-        <location line="-6"/>
+        <location line="-7"/>
         <source>Insufficient funds</source>
         <translation>Insufficient funds</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+13"/>
         <source>Loading block index...</source>
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location line="-69"/>
+        <location line="-70"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location line="+70"/>
+        <location line="+71"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="-63"/>
+        <location line="-66"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+4"/>
         <source>Cannot write default address</source>
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location line="+81"/>
+        <location line="+86"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location line="-68"/>
+        <location line="-73"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+100"/>
+        <location line="+101"/>
         <source>To use the %s option</source>
         <translation>To use the %s option</translation>
     </message>
     <message>
-        <location line="-92"/>
+        <location line="-93"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <location line="-41"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</translation>
-    </message>
 </context>
 </TS>

From 8b4616bab3d6badabbcce7d73baf4c74bf2fd854 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 31 Jul 2014 15:25:17 +0200
Subject: [PATCH 0457/1819] qt: Change transifex slug to new resource for
 0.10.x

Make sure that translations are pulled from the 0.10.x resource
https://www.transifex.com/projects/p/bitcoin/resource/qt-translation-010x/

Closes #4006.
---
 .tx/config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.tx/config b/.tx/config
index 655379de7947..472d27b46fe1 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,7 +1,7 @@
 [main]
 host = https://www.transifex.com
 
-[bitcoin.tx]
+[bitcoin.qt-translation-010x]
 file_filter = src/qt/locale/bitcoin_<lang>.ts
 source_file = src/qt/locale/bitcoin_en.ts
 source_lang = en

From bd26fee10bb2697340caf5e3f48922df0323f88e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 31 Jul 2014 16:56:14 +0200
Subject: [PATCH 0458/1819] qt: Update some messages after suggestions by
 translators

- *cannot* is more common, thus preferred to *can not*
- Use *Watch-only* instead of *Watchonly* as one word
---
 src/qt/forms/overviewpage.ui |  2 +-
 src/qt/intro.cpp             |  2 +-
 src/qt/locale/bitcoin_en.ts  | 46 ++++++++++++++++++------------------
 src/qt/paymentserver.cpp     |  6 ++---
 4 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index 8784da5f3e6f..c195afee9615 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -89,7 +89,7 @@
                  </font>
                 </property>
                 <property name="text">
-                 <string>Watchonly:</string>
+                 <string>Watch-only:</string>
                 </property>
                 <property name="alignment">
                  <set>Qt::AlignCenter</set>
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 3e99e941a688..13c260b7db3a 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -182,7 +182,7 @@ void Intro::pickDataDirectory()
                 break;
             } catch(fs::filesystem_error &e) {
                 QMessageBox::critical(0, tr("Bitcoin"),
-                    tr("Error: Specified data directory \"%1\" can not be created.").arg(dataDir));
+                    tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir));
                 /* fall through, back to choosing screen */
             }
         }
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 6739ef002107..96f7685112f7 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1164,8 +1164,8 @@ Address: %4
     </message>
     <message>
         <location line="+1"/>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished">Error: Specified data directory &quot;%1&quot; can not be created.</translation>
+        <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+24"/>
@@ -1501,7 +1501,7 @@ Address: %4
     </message>
     <message>
         <location line="+33"/>
-        <source>Watchonly:</source>
+        <source>Watch-only:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1599,17 +1599,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished">URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</translation>
-    </message>
-    <message>
-        <location line="+14"/>
-        <source>Payment request file can not be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+62"/>
+        <location line="+84"/>
         <location line="+9"/>
         <location line="+32"/>
         <source>Payment request rejected</source>
@@ -1636,12 +1626,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+113"/>
-        <source>Payment request can not be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="-366"/>
+        <location line="-253"/>
         <location line="+219"/>
         <location line="+34"/>
         <location line="+98"/>
@@ -1661,12 +1646,22 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+34"/>
+        <location line="+21"/>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
         <source>Payment request file handling</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+105"/>
+        <location line="+1"/>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+104"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1681,7 +1676,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+33"/>
+        <location line="+20"/>
+        <source>Payment request cannot be parsed!</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation type="unfinished"></translation>
     </message>
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 7c0c95c45932..76fd2733a52a 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -424,7 +424,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
             }
             else
                 emit message(tr("URI handling"),
-                    tr("URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters."),
+                    tr("URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters."),
                     CClientUIInterface::ICON_WARNING);
 
             return;
@@ -438,7 +438,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
         if (!readPaymentRequest(s, request))
         {
             emit message(tr("Payment request file handling"),
-                tr("Payment request file can not be read! This can be caused by an invalid payment request file."),
+                tr("Payment request file cannot be read! This can be caused by an invalid payment request file."),
                 CClientUIInterface::ICON_WARNING);
         }
         else if (processPaymentRequest(request, recipient))
@@ -663,7 +663,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
         {
             qWarning() << "PaymentServer::netRequestFinished : Error parsing payment request";
             emit message(tr("Payment request error"),
-                tr("Payment request can not be parsed!"),
+                tr("Payment request cannot be parsed!"),
                 CClientUIInterface::MSG_ERROR);
         }
         else if (processPaymentRequest(request, recipient))

From c0e9548b6305d315735ecd6dacc3c88acd6a6c7a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 31 Jul 2014 17:19:05 +0200
Subject: [PATCH 0459/1819] qt: more watchonly -> watch-only

---
 src/qt/forms/overviewpage.ui |  8 ++++----
 src/qt/locale/bitcoin_en.ts  | 22 +++++++++++-----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index c195afee9615..dcdf73af99b5 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -289,7 +289,7 @@
                  <cursorShape>IBeamCursor</cursorShape>
                 </property>
                 <property name="toolTip">
-                 <string>Your current balance in watchonly addresses</string>
+                 <string>Your current balance in watch-only addresses</string>
                 </property>
                 <property name="text">
                  <string>0 BTC</string>
@@ -314,7 +314,7 @@
                  <cursorShape>IBeamCursor</cursorShape>
                 </property>
                 <property name="toolTip">
-                 <string>Unconfirmed transactions to watchonly addresses</string>
+                 <string>Unconfirmed transactions to watch-only addresses</string>
                 </property>
                 <property name="text">
                  <string>0 BTC</string>
@@ -339,7 +339,7 @@
                  <cursorShape>IBeamCursor</cursorShape>
                 </property>
                 <property name="toolTip">
-                 <string>Mined balance in watchonly addresses that has not yet matured</string>
+                 <string>Mined balance in watch-only addresses that has not yet matured</string>
                 </property>
                 <property name="text">
                  <string>0 BTC</string>
@@ -383,7 +383,7 @@
                  <cursorShape>IBeamCursor</cursorShape>
                 </property>
                 <property name="toolTip">
-                 <string>Current total balance in watchonly addresses</string>
+                 <string>Current total balance in watch-only addresses</string>
                 </property>
                 <property name="text">
                  <string>0 BTC</string>
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 96f7685112f7..09f9e4841939 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1546,34 +1546,34 @@ Address: %4
     </message>
     <message>
         <location line="+38"/>
-        <source>Your current balance in watchonly addresses</source>
+        <source>Your current balance in watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <location line="+25"/>
         <location line="+25"/>
-        <location line="+44"/>
-        <source>0 BTC</source>
+        <source>Unconfirmed transactions to watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-72"/>
-        <source>Unconfirmed transactions to watchonly addresses</source>
+        <location line="+25"/>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+25"/>
-        <source>Mined balance in watchonly addresses that has not yet matured</source>
+        <location line="+44"/>
+        <source>Current total balance in watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
+        <location line="-91"/>
+        <location line="+25"/>
+        <location line="+25"/>
         <location line="+44"/>
-        <source>Current total balance in watchonly addresses</source>
+        <source>0 BTC</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+67"/>
+        <location line="+64"/>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Recent transactions&lt;/b&gt;</translation>
     </message>

From a67eef17236f71379e01bffed477674be9ee8f38 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 18 Jun 2014 16:29:51 -0400
Subject: [PATCH 0460/1819] test: redirect comparison tool output to stdout

Otherwise travis thinks the build has stalled.
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 3a6a6b6d8853..951d7581fb72 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -160,7 +160,7 @@ endif
 if USE_COMPARISON_TOOL
 check-local:
 	$(MKDIR_P) qa/tmp
-	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS)
+	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
 endif
 
 EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)

From 6548cc9f9073bf6602e17f62017af5c0e2bc3457 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 31 Jul 2014 14:04:53 -0400
Subject: [PATCH 0461/1819] test: don't let the port number exceed the legal
 range

---
 qa/pull-tester/run-bitcoind-for-test.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index ecc42e12b199..e186bd7a23b0 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -9,7 +9,7 @@ mkdir -p "$DATADIR"/regtest
 touch "$DATADIR/regtest/debug.log"
 tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
 WAITER=$!
-PORT=`expr $BASHPID + 10000`
+PORT=`expr 10000 + $BASHPID % 55536`
 "@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
 BITCOIND=$!
 

From 9fcb410195935edf75bbeccaeb8a37ae4d3e5a4e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 1 Aug 2014 07:51:24 +0200
Subject: [PATCH 0462/1819] qt: Remove '0 BTC' placeholder from translation

---
 src/qt/forms/overviewpage.ui |  8 ++++----
 src/qt/locale/bitcoin_en.ts  | 10 +---------
 2 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index dcdf73af99b5..df16295f77ef 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -292,7 +292,7 @@
                  <string>Your current balance in watch-only addresses</string>
                 </property>
                 <property name="text">
-                 <string>0 BTC</string>
+                 <string notr="true">0 BTC</string>
                 </property>
                 <property name="alignment">
                  <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -317,7 +317,7 @@
                  <string>Unconfirmed transactions to watch-only addresses</string>
                 </property>
                 <property name="text">
-                 <string>0 BTC</string>
+                 <string notr="true">0 BTC</string>
                 </property>
                 <property name="alignment">
                  <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -342,7 +342,7 @@
                  <string>Mined balance in watch-only addresses that has not yet matured</string>
                 </property>
                 <property name="text">
-                 <string>0 BTC</string>
+                 <string notr="true">0 BTC</string>
                 </property>
                 <property name="alignment">
                  <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -386,7 +386,7 @@
                  <string>Current total balance in watch-only addresses</string>
                 </property>
                 <property name="text">
-                 <string>0 BTC</string>
+                 <string notr="true">0 BTC</string>
                 </property>
                 <property name="alignment">
                  <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 09f9e4841939..143f705327d9 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1565,15 +1565,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-91"/>
-        <location line="+25"/>
-        <location line="+25"/>
-        <location line="+44"/>
-        <source>0 BTC</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+64"/>
+        <location line="+67"/>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Recent transactions&lt;/b&gt;</translation>
     </message>

From 283a3b88b6d971823741628ba25d10417a0c4121 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 1 Aug 2014 08:04:46 +0200
Subject: [PATCH 0463/1819] small ordering cleanup of init help message

---
 src/init.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b84c233b9956..b22a11bff755 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -231,7 +231,6 @@ std::string HelpMessage(HelpMessageMode mode)
 #endif
     strUsage += "  -txindex               " + _("Maintain a full transaction index (default: 0)") + "\n";
 
-
     strUsage += "\n" + _("Connection options:") + "\n";
     strUsage += "  -addnode=<ip>          " + _("Add a node to connect to and attempt to keep the connection open") + "\n";
     strUsage += "  -banscore=<n>          " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n";
@@ -241,8 +240,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -discover              " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n";
     strUsage += "  -dns                   " + _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)") + "\n";
     strUsage += "  -dnsseed               " + _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)") + "\n";
-    strUsage += "  -forcednsseed          " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n";
     strUsage += "  -externalip=<ip>       " + _("Specify your own public address") + "\n";
+    strUsage += "  -forcednsseed          " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n";
     strUsage += "  -listen                " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n";
     strUsage += "  -maxconnections=<n>    " + _("Maintain at most <n> connections to peers (default: 125)") + "\n";
     strUsage += "  -maxreceivebuffer=<n>  " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n";

From 1b73d36b2c71c92044012dc736215bf95f2e908b Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 1 Aug 2014 08:32:41 +0200
Subject: [PATCH 0464/1819] fix compilation error in core_io.h

- error: 'vector' in namespace 'std' does not name a type
- add <vector> include in core_io.h
- remove <vector> includes from core_read.cpp and core_write.cpp
---
 src/core_io.h      | 1 +
 src/core_read.cpp  | 1 -
 src/core_write.cpp | 1 -
 3 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/core_io.h b/src/core_io.h
index 8a7d5805704c..26a1293dfdb1 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -2,6 +2,7 @@
 #define __BITCOIN_CORE_IO_H__
 
 #include <string>
+#include <vector>
 
 class uint256;
 class CScript;
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 0f06bb6952d1..9022ffaf2b07 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -1,5 +1,4 @@
 
-#include <vector>
 #include "core_io.h"
 #include "core.h"
 #include "serialize.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 2eb220779f06..d9e31ed8cd19 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -1,5 +1,4 @@
 
-#include <vector>
 #include "core_io.h"
 #include "univalue/univalue.h"
 #include "script.h"

From 2b600992e8de0cc9a484e3bf25fe71ac50adadb7 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 1 Aug 2014 08:39:06 +0200
Subject: [PATCH 0465/1819] add license header to core_io.h,
 core_read/_write.cpp

---
 src/core_io.h      | 4 ++++
 src/core_read.cpp  | 3 +++
 src/core_write.cpp | 3 +++
 3 files changed, 10 insertions(+)

diff --git a/src/core_io.h b/src/core_io.h
index 26a1293dfdb1..adf74cce3284 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef __BITCOIN_CORE_IO_H__
 #define __BITCOIN_CORE_IO_H__
 
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 9022ffaf2b07..593eb2d03548 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -1,3 +1,6 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "core_io.h"
 #include "core.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index d9e31ed8cd19..37dd69f7b834 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -1,3 +1,6 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "core_io.h"
 #include "univalue/univalue.h"

From f5745fa52a66ab9ba976e06de4881e981d9aa6b4 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 1 Aug 2014 17:45:09 +0200
Subject: [PATCH 0466/1819] Declare SignatureHash() in script.h

---
 src/script.h                   | 1 +
 src/test/multisig_tests.cpp    | 2 --
 src/test/script_P2SH_tests.cpp | 3 ---
 src/test/script_tests.cpp      | 3 +--
 src/test/sighash_tests.cpp     | 3 +--
 5 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/src/script.h b/src/script.h
index e36be2db9e33..ea944b4996f6 100644
--- a/src/script.h
+++ b/src/script.h
@@ -809,6 +809,7 @@ bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int
 bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
 
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
+uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
 int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
 bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 452cf084a744..2a0466e92899 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -17,8 +17,6 @@ using namespace boost::assign;
 
 typedef vector<unsigned char> valtype;
 
-extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-
 BOOST_AUTO_TEST_SUITE(multisig_tests)
 
 CScript
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index a1dc17ba36e9..51ff1ffbc945 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -15,9 +15,6 @@
 
 using namespace std;
 
-// Test routines internal to script.cpp:
-extern uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-
 // Helpers:
 static std::vector<unsigned char>
 Serialize(const CScript& s)
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 5e35875a8e4c..bc9f31c07763 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -10,6 +10,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "script.h"
 #include "core_io.h"
 
 #include <fstream>
@@ -33,8 +34,6 @@ using namespace std;
 using namespace json_spirit;
 using namespace boost::algorithm;
 
-extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-
 static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
 Array
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index b99797fccb11..bff151cddaa8 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -6,6 +6,7 @@
 #include "main.h"
 #include "random.h"
 #include "serialize.h"
+#include "script.h"
 #include "util.h"
 #include "version.h"
 
@@ -19,8 +20,6 @@
 using namespace json_spirit;
 extern Array read_json(const std::string& jsondata);
 
-extern uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-
 // Old script.cpp SignatureHash function
 uint256 static SignatureHashOld(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
 {

From a60120e951ae94d0553c5515229432e016fb0657 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 24 Jul 2014 13:52:57 +0200
Subject: [PATCH 0467/1819] Add built-in seeds for .onion

This makes it possible for a node with `-onlynet=tor` to bootstrap
itself.

It also adds the base infrastructure for adding IPv6 seed nodes.

Also represent IPv4 fixed seed addresses in 16-byte format.
---
 share/seeds/generate-seeds.py | 132 +++++++
 share/seeds/nodes_main.txt    | 629 +++++++++++++++++++++++++++++++++
 share/seeds/nodes_test.txt    |   5 +
 src/Makefile.am               |   1 +
 src/chainparams.cpp           | 118 ++-----
 src/chainparamsseeds.h        | 638 ++++++++++++++++++++++++++++++++++
 6 files changed, 1432 insertions(+), 91 deletions(-)
 create mode 100755 share/seeds/generate-seeds.py
 create mode 100644 share/seeds/nodes_main.txt
 create mode 100644 share/seeds/nodes_test.txt
 create mode 100644 src/chainparamsseeds.h

diff --git a/share/seeds/generate-seeds.py b/share/seeds/generate-seeds.py
new file mode 100755
index 000000000000..6c1b4ed86012
--- /dev/null
+++ b/share/seeds/generate-seeds.py
@@ -0,0 +1,132 @@
+#!/usr/bin/python
+# Copyright (c) 2014 Wladmir J. van der Laan
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Script to generate list of seed nodes for chainparams.cpp.
+
+This script expects two text files in the directory that is passed as an
+argument:
+
+    nodes_main.txt
+    nodes_test.txt
+
+These files must consist of lines in the format 
+
+    <ip>
+    <ip>:<port>
+    [<ipv6>]
+    [<ipv6>]:<port>
+    <onion>.onion
+    0xDDBBCCAA (IPv4 little-endian old pnSeeds format)
+
+The output will be two data structures with the peers in binary format:
+
+   static SeedSpec6 pnSeed6_main[]={
+   ...
+   }
+   static SeedSpec6 pnSeed6_test[]={
+   ...
+   }
+
+These should be pasted into `src/chainparamsseeds.h`.
+'''
+from __future__ import print_function, division
+from base64 import b32decode
+from binascii import a2b_hex
+import sys, os
+import re
+
+# ipv4 in ipv6 prefix
+pchIPv4 = bytearray([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff])
+# tor-specific ipv6 prefix
+pchOnionCat = bytearray([0xFD,0x87,0xD8,0x7E,0xEB,0x43])
+
+def name_to_ipv6(addr):
+    if len(addr)>6 and addr.endswith('.onion'):
+        vchAddr = b32decode(addr[0:-6], True)
+        if len(vchAddr) != 16-len(pchOnionCat):
+            raise ValueError('Invalid onion %s' % s)
+        return pchOnionCat + vchAddr
+    elif '.' in addr: # IPv4
+        return pchIPv4 + bytearray((int(x) for x in addr.split('.')))
+    elif ':' in addr: # IPv6
+        sub = [[], []] # prefix, suffix
+        x = 0
+        addr = addr.split(':')
+        for i,comp in enumerate(addr):
+            if comp == '':
+                if i == 0 or i == (len(addr)-1): # skip empty component at beginning or end
+                    continue
+                x += 1 # :: skips to suffix
+                assert(x < 2)
+            else: # two bytes per component
+                val = int(comp, 16)
+                sub[x].append(val >> 8)
+                sub[x].append(val & 0xff)
+        nullbytes = 16 - len(sub[0]) - len(sub[1])
+        assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
+        return bytearray(sub[0] + ([0] * nullbytes) + sub[1])
+    elif addr.startswith('0x'): # IPv4-in-little-endian
+        return pchIPv4 + bytearray(reversed(a2b_hex(addr[2:])))
+    else:
+        raise ValueError('Could not parse address %s' % addr)
+
+def parse_spec(s, defaultport):
+    match = re.match('\[([0-9a-fA-F:]+)\](?::([0-9]+))?$', s)
+    if match: # ipv6
+        host = match.group(1)
+        port = match.group(2)
+    else:
+        (host,_,port) = s.partition(':')
+
+    if not port:
+        port = defaultport
+    else:
+        port = int(port)
+
+    host = name_to_ipv6(host)
+
+    return (host,port)
+
+def process_nodes(g, f, structname, defaultport):
+    g.write('static SeedSpec6 %s[] = {\n' % structname)
+    first = True
+    for line in f:
+        comment = line.find('#')
+        if comment != -1:
+            line = line[0:comment]
+        line = line.strip()
+        if not line:
+            continue
+        if not first:
+            g.write(',\n')
+        first = False
+
+        (host,port) = parse_spec(line, defaultport)
+        hoststr = ','.join(('0x%02x' % b) for b in host)
+        g.write('    {{%s}, %i}' % (hoststr, port))
+    g.write('\n};\n')
+
+def main():
+    if len(sys.argv)<2:
+        print(('Usage: %s <path_to_nodes_txt>' % sys.argv[0]), file=sys.stderr)
+        exit(1)
+    g = sys.stdout
+    indir = sys.argv[1]
+    g.write('#ifndef H_CHAINPARAMSSEEDS\n')
+    g.write('#define H_CHAINPARAMSSEEDS\n')
+    g.write('// List of fixed seed nodes for the bitcoin network\n')
+    g.write('// AUTOGENERATED by contrib/devtools/generate-seeds.py\n\n')
+    g.write('// Each line contains a 16-byte IPv6 address and a port.\n')
+    g.write('// IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
+    with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
+        process_nodes(g, f, 'pnSeed6_main', 8333)
+    g.write('\n')
+    with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
+        process_nodes(g, f, 'pnSeed6_test', 18333)
+    g.write('#endif\n')
+            
+if __name__ == '__main__':
+    main()
+
diff --git a/share/seeds/nodes_main.txt b/share/seeds/nodes_main.txt
new file mode 100644
index 000000000000..f2558cf3c4f2
--- /dev/null
+++ b/share/seeds/nodes_main.txt
@@ -0,0 +1,629 @@
+# List of fixed seed nodes for main network
+
+# IPv4 nodes (in old chainparams.cpp 0xDDCCBBAA format)
+#  n.b. when importing a new list, there is no need to use this format, just use IPv4 dotted addresses directly
+0x7e6a692e # 46.105.106.126
+0x7d04d1a2 # 162.209.4.125
+0x6c0c17d9 # 217.23.12.108
+0xdb330ab9 # 185.10.51.219
+0xc649c7c6 # 198.199.73.198
+0x7895484d # 77.72.149.120
+0x047109b0 # 176.9.113.4
+0xb90ca5bc # 188.165.12.185
+0xd130805f # 95.128.48.209
+0xbd074ea6 # 166.78.7.189
+0x578ff1c0 # 192.241.143.87
+0x286e09b0 # 176.9.110.40
+0xd4dcaf42 # 66.175.220.212
+0x529b6bb8 # 184.107.155.82
+0x635cc6c0 # 192.198.92.99
+0xedde892e # 46.137.222.237
+0xa976d9c7 # 199.217.118.169
+0xea91a4b8 # 184.164.145.234
+0x03fa4eb2 # 178.78.250.3
+0x6ca9008d # 141.0.169.108
+0xaf62c825 # 37.200.98.175
+0x93f3ba51 # 81.186.243.147
+0xc2c9efd5 # 213.239.201.194
+0x0ed5175e # 94.23.213.14
+0x487028bc # 188.40.112.72
+0x7297c225 # 37.194.151.114
+0x8af0c658 # 88.198.240.138
+0x2e57ba1f # 31.186.87.46
+0xd0098abc # 188.138.9.208
+0x46a8853e # 62.133.168.70
+0xcc92dc3e # 62.220.146.204
+0xeb6f1955 # 85.25.111.235
+0x8cce175e # 94.23.206.140
+0x237281ae # 174.129.114.35
+0x9d42795b # 91.121.66.157
+0x4f4f0905 # 5.9.79.79
+0xc50151d0 # 208.81.1.197
+0xb1ba90c6 # 198.144.186.177
+0xaed7175e # 94.23.215.174
+0x204de55b # 91.229.77.32
+0x4bb03245 # 69.50.176.75
+0x932b28bc # 188.40.43.147
+0x2dcce65b # 91.230.204.45
+0xe2708abc # 188.138.112.226
+0x1b08b8d5 # 213.184.8.27
+0x12a3dc5b # 91.220.163.18
+0x8a884c90 # 144.76.136.138
+0xa386a8b8 # 184.168.134.163
+0x18e417c6 # 198.23.228.24
+0x2e709ac3 # 195.154.112.46
+0xeb62e925 # 37.233.98.235
+0x6f6503ae # 174.3.101.111
+0x05d0814e # 78.129.208.5
+0x8a9ac545 # 69.197.154.138
+0x946fd65e # 94.214.111.148
+0x3f57495d # 93.73.87.63
+0x4a29c658 # 88.198.41.74
+0xad454c90 # 144.76.69.173
+0x15340905 # 5.9.52.21
+0x4c3f3b25 # 37.59.63.76
+0x01fe19b9 # 185.25.254.1
+0x5620595b # 91.89.32.86
+0x443c795b # 91.121.60.68
+0x44f24ac8 # 200.74.242.68
+0x0442464e # 78.70.66.4
+0xc8665882 # 130.88.102.200
+0xed3f3ec3 # 195.62.63.237
+0xf585bf5d # 93.191.133.245
+0x5dd141da # 218.65.209.93
+0xf93a084e # 78.8.58.249
+0x1264dd52 # 82.221.100.18
+0x0711c658 # 88.198.17.7
+0xf12e7bbe # 190.123.46.241
+0x5b02b740 # 64.183.2.91
+0x7d526dd5 # 213.109.82.125
+0x0cb04c90 # 144.76.176.12
+0x2abe1132 # 50.17.190.42
+0x61a39f58 # 88.159.163.97
+0x044a0618 # 24.6.74.4
+0xf3af7dce # 206.125.175.243
+0xb994c96d # 109.201.148.185
+0x361c5058 # 88.80.28.54
+0xca735d53 # 83.93.115.202
+0xeca743b0 # 176.67.167.236
+0xec790905 # 5.9.121.236
+0xc4d37845 # 69.120.211.196
+0xa1c4a2b2 # 178.162.196.161
+0x726fd453 # 83.212.111.114
+0x625cc6c0 # 192.198.92.98
+0x6c20132e # 46.19.32.108
+0xb7aa0c79 # 121.12.170.183
+0xc6ed983d # 61.152.237.198
+0x47e4cbc0 # 192.203.228.71
+0xa4ac75d4 # 212.117.172.164
+0xe2e59345 # 69.147.229.226
+0x4d784ad0 # 208.74.120.77
+0x18a5ec5e # 94.236.165.24
+0x481cc85b # 91.200.28.72
+0x7c6c2fd5 # 213.47.108.124
+0x5e4d6018 # 24.96.77.94
+0x5b4b6c18 # 24.108.75.91
+0xd99b4c90 # 144.76.155.217
+0xe63987dc # 220.135.57.230
+0xb817bb25 # 37.187.23.184
+0x141cfeb2 # 178.254.28.20
+0x5f005058 # 88.80.0.95
+0x0d987f47 # 71.127.152.13
+0x242a496d # 109.73.42.36
+0x3e519bc0 # 192.155.81.62
+0x02b2454b # 75.69.178.2
+0xdfaf3dc6 # 198.61.175.223
+0x888128bc # 188.40.129.136
+0x1165bb25 # 37.187.101.17
+0xabfeca5b # 91.202.254.171
+0x2ef63540 # 64.53.246.46
+0x5773c7c6 # 198.199.115.87
+0x1280dd52 # 82.221.128.18
+0x8ebcacd9 # 217.172.188.142
+0x81c439c6 # 198.57.196.129
+0x39fcfa45 # 69.250.252.57
+0x62177d41 # 65.125.23.98
+0xc975ed62 # 98.237.117.201
+0x05cff476 # 118.244.207.5
+0xdabda743 # 67.167.189.218
+0xaa1ac24e # 78.194.26.170
+0xe255a22e # 46.162.85.226
+0x88aac705 # 5.199.170.136
+0xe707c658 # 88.198.7.231
+0xa9e94b5e # 94.75.233.169
+0x2893484b # 75.72.147.40
+0x99512705 # 5.39.81.153
+0xd63970ca # 202.112.57.214
+0x45994f32 # 50.79.153.69
+0xe519a8ad # 173.168.25.229
+0x92e25f5d # 93.95.226.146
+0x8b84a9c1 # 193.169.132.139
+0x5eaa0a05 # 5.10.170.94
+0xa74de55b # 91.229.77.167
+0xb090ff62 # 98.255.144.176
+0x5eee326c # 108.50.238.94
+0xc331a679 # 121.166.49.195
+0xc1d9b72e # 46.183.217.193
+0x0c6ab982 # 130.185.106.12
+0x7362bb25 # 37.187.98.115
+0x4cfedd42 # 66.221.254.76
+0x1e09a032 # 50.160.9.30
+0xa4c34c5e # 94.76.195.164
+0x3777d9c7 # 199.217.119.55
+0x5edcf260 # 96.242.220.94
+0x3ce2b548 # 72.181.226.60
+0xd2ac0360 # 96.3.172.210
+0x2f80b992 # 146.185.128.47
+0x3e4cbb25 # 37.187.76.62
+0x3995e236 # 54.226.149.57
+0xd03977ae # 174.119.57.208
+0x953cf054 # 84.240.60.149
+0x3c654ed0 # 208.78.101.60
+0x74024c90 # 144.76.2.116
+0xa14f1155 # 85.17.79.161
+0x14ce0125 # 37.1.206.20
+0xc15ebb6a # 106.187.94.193
+0x2c08c452 # 82.196.8.44
+0xc7fd0652 # 82.6.253.199
+0x7604f8ce # 206.248.4.118
+0xffb38332 # 50.131.179.255
+0xa4c2efd5 # 213.239.194.164
+0xe9614018 # 24.64.97.233
+0xab49e557 # 87.229.73.171
+0x1648c052 # 82.192.72.22
+0x36024047 # 71.64.2.54
+0x0e8cffad # 173.255.140.14
+0x21918953 # 83.137.145.33
+0xb61f50ad # 173.80.31.182
+0x9b406b59 # 89.107.64.155
+0xaf282218 # 24.34.40.175
+0x7f1d164e # 78.22.29.127
+0x1f560da2 # 162.13.86.31
+0xe237be58 # 88.190.55.226
+0xbdeb1955 # 85.25.235.189
+0x6c0717d9 # 217.23.7.108
+0xdaf8ce62 # 98.206.248.218
+0x0f74246c # 108.36.116.15
+0xdee95243 # 67.82.233.222
+0xf23f1a56 # 86.26.63.242
+0x61bdf867 # 103.248.189.97
+0xd254c854 # 84.200.84.210
+0xc4422e4e # 78.46.66.196
+0xae0563c0 # 192.99.5.174
+0xbdb9a95f # 95.169.185.189
+0xa9eb32c6 # 198.50.235.169
+0xd9943950 # 80.57.148.217
+0x116add52 # 82.221.106.17
+0x73a54c90 # 144.76.165.115
+0xb36b525e # 94.82.107.179
+0xd734175e # 94.23.52.215
+0x333d7f76 # 118.127.61.51
+0x51431bc6 # 198.27.67.81
+0x084ae5cf # 207.229.74.8
+0xa60a236c # 108.35.10.166
+0x5c67692e # 46.105.103.92
+0x0177cf45 # 69.207.119.1
+0xa6683ac6 # 198.58.104.166
+0x7ff4ea47 # 71.234.244.127
+0x2192fab2 # 178.250.146.33
+0xa03a0f46 # 70.15.58.160
+0xfe3e39ae # 174.57.62.254
+0x2cce5fc1 # 193.95.206.44
+0xc8a6c148 # 72.193.166.200
+0x96fb7e4c # 76.126.251.150
+0x0a66c752 # 82.199.102.10
+0x6b4d2705 # 5.39.77.107
+0xeba0c118 # 24.193.160.235
+0x3ba0795b # 91.121.160.59
+0x1dccd23e # 62.210.204.29
+0x6912f3a2 # 162.243.18.105
+0x22f23c41 # 65.60.242.34
+0x65646b4a # 74.107.100.101
+0x8b9f8705 # 5.135.159.139
+0xeb9b9a95 # 149.154.155.235
+0x79fe6b4e # 78.107.254.121
+0x0536f447 # 71.244.54.5
+0x23224d61 # 97.77.34.35
+0x5d952ec6 # 198.46.149.93
+0x0cb4f736 # 54.247.180.12
+0xdc14be6d # 109.190.20.220
+0xb24609b0 # 176.9.70.178
+0xd3f79b62 # 98.155.247.211
+0x6518c836 # 54.200.24.101
+0x83a3cf42 # 66.207.163.131
+0x9b641fb0 # 176.31.100.155
+0x17fef1c0 # 192.241.254.23
+0xd508cc82 # 130.204.8.213
+0x91a4369b # 155.54.164.145
+0x39cb4a4c # 76.74.203.57
+0xbbc9536c # 108.83.201.187
+0xaf64c44a # 74.196.100.175
+0x605eca50 # 80.202.94.96
+0x0c6a6805 # 5.104.106.12
+0xd07e9d4e # 78.157.126.208
+0x78e6d3a2 # 162.211.230.120
+0x1b31eb6d # 109.235.49.27
+0xaa01feb2 # 178.254.1.170
+0x4603c236 # 54.194.3.70
+0x1ecba3b6 # 182.163.203.30
+0x0effe336 # 54.227.255.14
+0xc3fdcb36 # 54.203.253.195
+0xc290036f # 111.3.144.194
+0x4464692e # 46.105.100.68
+0x1aca7589 # 137.117.202.26
+0x59a9e52e # 46.229.169.89
+0x19aa7489 # 137.116.170.25
+0x2622c85e # 94.200.34.38
+0xa598d318 # 24.211.152.165
+0x438ec345 # 69.195.142.67
+0xc79619b9 # 185.25.150.199
+0xaf570360 # 96.3.87.175
+0x5098e289 # 137.226.152.80
+0x36add862 # 98.216.173.54
+0x83c1a2b2 # 178.162.193.131
+0x969d0905 # 5.9.157.150
+0xcf3d156c # 108.21.61.207
+0x49c1a445 # 69.164.193.73
+0xbd0b7562 # 98.117.11.189
+0x8fff1955 # 85.25.255.143
+0x1e51fe53 # 83.254.81.30
+0x28d6efd5 # 213.239.214.40
+0x2837cc62 # 98.204.55.40
+0x02f42d42 # 66.45.244.2
+0x070e3fb2 # 178.63.14.7
+0xbcb18705 # 5.135.177.188
+0x14a4e15b # 91.225.164.20
+0x82096844 # 68.104.9.130
+0xcfcb1c2e # 46.28.203.207
+0x37e27fc7 # 199.127.226.55
+0x07923748 # 72.55.146.7
+0x0c14bc2e # 46.188.20.12
+0x26100905 # 5.9.16.38
+0xcb7cd93e # 62.217.124.203
+0x3bc0d2c0 # 192.210.192.59
+0x97131b4c # 76.27.19.151
+0x6f1e5c17 # 23.92.30.111
+0xa7939f43 # 67.159.147.167
+0xb7a0bf58 # 88.191.160.183
+0xafa83a47 # 71.58.168.175
+0xcbb83f32 # 50.63.184.203
+0x5f321cb0 # 176.28.50.95
+0x52d6c3c7 # 199.195.214.82
+0xdeac5bc7 # 199.91.172.222
+0x2cf310cc # 204.16.243.44
+0x108a2bc3 # 195.43.138.16
+0x726fa14f # 79.161.111.114
+0x85bad2cc # 204.210.186.133
+0x459e4c90 # 144.76.158.69
+0x1a08b8d8 # 216.184.8.26
+0xcd7048c6 # 198.72.112.205
+0x6d5b4c90 # 144.76.91.109
+0xa66cfe7b # 123.254.108.166
+0xad730905 # 5.9.115.173
+0xdaac5bc7 # 199.91.172.218
+0x8417fd9f # 159.253.23.132
+0x41377432 # 50.116.55.65
+0x1f138632 # 50.134.19.31
+0x295a12b2 # 178.18.90.41
+0x7ac031b2 # 178.49.192.122
+0x3a87d295 # 149.210.135.58
+0xe219bc2e # 46.188.25.226
+0xf485d295 # 149.210.133.244
+0x137b6405 # 5.100.123.19
+0xcfffd9ad # 173.217.255.207
+0xafe20844 # 68.8.226.175
+0x32679a5f # 95.154.103.50
+0xa431c644 # 68.198.49.164
+0x0e5fce8c # 140.206.95.14
+0x305ef853 # 83.248.94.48
+0xad26ca32 # 50.202.38.173
+0xd9d21a54 # 84.26.210.217
+0xddd0d736 # 54.215.208.221
+0xc24ec0c7 # 199.192.78.194
+0x4aadcd5b # 91.205.173.74
+0x49109852 # 82.152.16.73
+0x9d6b3ac6 # 198.58.107.157
+0xf0aa1e8b # 139.30.170.240
+0xf1bfa343 # 67.163.191.241
+0x8a30c0ad # 173.192.48.138
+0x260f93d4 # 212.147.15.38
+0x2339e760 # 96.231.57.35
+0x8869959f # 159.149.105.136
+0xc207216c # 108.33.7.194
+0x29453448 # 72.52.69.41
+0xb651ec36 # 54.236.81.182
+0x45496259 # 89.98.73.69
+0xa23d1bcc # 204.27.61.162
+0xb39bcf43 # 67.207.155.179
+0xa1d29432 # 50.148.210.161
+0x3507c658 # 88.198.7.53
+0x4a88dd62 # 98.221.136.74
+0x27aff363 # 99.243.175.39
+0x7498ea6d # 109.234.152.116
+0x4a6785d5 # 213.133.103.74
+0x5e6d47c2 # 194.71.109.94
+0x3baba542 # 66.165.171.59
+0x045a37ae # 174.55.90.4
+0xa24dc0c7 # 199.192.77.162
+0xe981ea4d # 77.234.129.233
+0xed6ce217 # 23.226.108.237
+0x857214c6 # 198.20.114.133
+0x6b6c0464 # 100.4.108.107
+0x5a4945b8 # 184.69.73.90
+0x12f24742 # 66.71.242.18
+0xf35f42ad # 173.66.95.243
+0xfd0f5a4e # 78.90.15.253
+0xfb081556 # 86.21.8.251
+0xb24b5861 # 97.88.75.178
+0x2e114146 # 70.65.17.46
+0xb7780905 # 5.9.120.183
+0x33bb0e48 # 72.14.187.51
+0x39e26556 # 86.101.226.57
+0xa794484d # 77.72.148.167
+0x4225424d # 77.66.37.66
+0x3003795b # 91.121.3.48
+0x31c8cf44 # 68.207.200.49
+0xd65bad59 # 89.173.91.214
+0x127bc648 # 72.198.123.18
+0xf2bc4d4c # 76.77.188.242
+0x0273dc50 # 80.220.115.2
+0x4572d736 # 54.215.114.69
+0x064bf653 # 83.246.75.6
+0xcdcd126c # 108.18.205.205
+0x608281ae # 174.129.130.96
+0x4d130087 # 135.0.19.77
+0x1016f725 # 37.247.22.16
+0xba185fc0 # 192.95.24.186
+0x16c1a84f # 79.168.193.22
+0xfb697252 # 82.114.105.251
+0xa2942360 # 96.35.148.162
+0x53083b6c # 108.59.8.83
+0x0583f1c0 # 192.241.131.5
+0x2d5a2441 # 65.36.90.45
+0xc172aa43 # 67.170.114.193
+0xcd11cf36 # 54.207.17.205
+0x7b14ed62 # 98.237.20.123
+0x5c94f1c0 # 192.241.148.92
+0x7c23132e # 46.19.35.124
+0x39965a6f # 111.90.150.57
+0x7890e24e # 78.226.144.120
+0xa38ec447 # 71.196.142.163
+0xc187f1c0 # 192.241.135.193
+0xef80b647 # 71.182.128.239
+0xf20a7432 # 50.116.10.242
+0x7ad1d8d2 # 210.216.209.122
+0x869e2ec6 # 198.46.158.134
+0xccdb5c5d # 93.92.219.204
+0x9d11f636 # 54.246.17.157
+0x2161bb25 # 37.187.97.33
+0x7599f889 # 137.248.153.117
+0x2265ecad # 173.236.101.34
+0x0f4f0e55 # 85.14.79.15
+0x7d25854a # 74.133.37.125
+0xf857e360 # 96.227.87.248
+0xf83f3d6c # 108.61.63.248
+0x9cc93bb8 # 184.59.201.156
+0x02716857 # 87.104.113.2
+0x5dd8a177 # 119.161.216.93
+0x8adc6cd4 # 212.108.220.138
+0xe5613d46 # 70.61.97.229
+0x6a734f50 # 80.79.115.106
+0x2a5c3bae # 174.59.92.42
+0x4a04c3d1 # 209.195.4.74
+0xe4613d46 # 70.61.97.228
+0x8426f4bc # 188.244.38.132
+0x3e1b5fc0 # 192.95.27.62
+0x0d5a3c18 # 24.60.90.13
+0xd0f6d154 # 84.209.246.208
+0x21c7ff5e # 94.255.199.33
+0xeb3f3d6c # 108.61.63.235
+0x9da5edc0 # 192.237.165.157
+0x5d753b81 # 129.59.117.93
+0x0d8d53d4 # 212.83.141.13
+0x2613f018 # 24.240.19.38
+0x4443698d # 141.105.67.68
+0x8ca1edcd # 205.237.161.140
+0x10ed3f4e # 78.63.237.16
+0x789b403a # 58.64.155.120
+0x7b984a4b # 75.74.152.123
+0x964ebc25 # 37.188.78.150
+0x7520ee60 # 96.238.32.117
+0x4f4828bc # 188.40.72.79
+0x115c407d # 125.64.92.17
+0x32dd0667 # 103.6.221.50
+0xa741715e # 94.113.65.167
+0x1d3f3532 # 50.53.63.29
+0x817d1f56 # 86.31.125.129
+0x2f99a552 # 82.165.153.47
+0x6b2a5956 # 86.89.42.107
+0x8d4f4f05 # 5.79.79.141
+0xd23c1e17 # 23.30.60.210
+0x98993748 # 72.55.153.152
+0x2c92e536 # 54.229.146.44
+0x237ebdc3 # 195.189.126.35
+0xa762fb43 # 67.251.98.167
+0x32016b71 # 113.107.1.50
+0xd0e7cf79 # 121.207.231.208
+0x7d35bdd5 # 213.189.53.125
+0x53dac3d2 # 210.195.218.83
+0x31016b71 # 113.107.1.49
+0x7fb8f8ce # 206.248.184.127
+0x9a38c232 # 50.194.56.154
+0xefaa42ad # 173.66.170.239
+0x876b823d # 61.130.107.135
+0x18175347 # 71.83.23.24
+0xdb46597d # 125.89.70.219
+0xd2c168da # 218.104.193.210
+0xcd6fe9dc # 220.233.111.205
+0x45272e4e # 78.46.39.69
+0x8d4bca5b # 91.202.75.141
+0xa4043d47 # 71.61.4.164
+0xaab7aa47 # 71.170.183.170
+0x202881ae # 174.129.40.32
+0xa4aef160 # 96.241.174.164
+0xecd7e6bc # 188.230.215.236
+0x391359ad # 173.89.19.57
+0xd8cc9318 # 24.147.204.216
+0xbbeee52e # 46.229.238.187
+0x077067b0 # 176.103.112.7
+0xebd39d62 # 98.157.211.235
+0x0cedc547 # 71.197.237.12
+0x23d3e15e # 94.225.211.35
+0xa5a81318 # 24.19.168.165
+0x179a32c6 # 198.50.154.23
+0xe4d3483d # 61.72.211.228
+0x03680905 # 5.9.104.3
+0xe8018abc # 188.138.1.232
+0xdde9ef5b # 91.239.233.221
+0x438b8705 # 5.135.139.67
+0xb48224a0 # 160.36.130.180
+0xcbd69218 # 24.146.214.203
+0x9075795b # 91.121.117.144
+0xc6411c3e # 62.28.65.198
+0x03833f5c # 92.63.131.3
+0xf33f8b5e # 94.139.63.243
+0x495e464b # 75.70.94.73
+0x83c8e65b # 91.230.200.131
+0xac09cd25 # 37.205.9.172
+0xdaabc547 # 71.197.171.218
+0x7665a553 # 83.165.101.118
+0xc5263718 # 24.55.38.197
+0x2fd0c5cd # 205.197.208.47
+0x22224d61 # 97.77.34.34
+0x3e954048 # 72.64.149.62
+0xfaa37557 # 87.117.163.250
+0x36dbc658 # 88.198.219.54
+0xa81453d0 # 208.83.20.168
+0x5a941f5d # 93.31.148.90
+0xa598ea60 # 96.234.152.165
+0x65384ac6 # 198.74.56.101
+0x10aaa545 # 69.165.170.16
+0xaaab795b # 91.121.171.170
+0xdda7024c # 76.2.167.221
+0x0966f4c6 # 198.244.102.9
+0x68571c08 # 8.28.87.104
+0x8b40ee59 # 89.238.64.139
+0x33ac096c # 108.9.172.51
+0x844b4c4b # 75.76.75.132
+0xd392254d # 77.37.146.211
+0xba4d5a46 # 70.90.77.186
+0x63029653 # 83.150.2.99
+0xf655f636 # 54.246.85.246
+0xbe4c4bb1 # 177.75.76.190
+0x45dad036 # 54.208.218.69
+0x204bc052 # 82.192.75.32
+0x06c3a2b2 # 178.162.195.6
+0xf31fba6a # 106.186.31.243
+0xb21f09b0 # 176.9.31.178
+0x540d0751 # 81.7.13.84
+0xc7b46a57 # 87.106.180.199
+0x6a11795b # 91.121.17.106
+0x3d514045 # 69.64.81.61
+0x0318aa6d # 109.170.24.3
+0x30306ec3 # 195.110.48.48
+0x5c077432 # 50.116.7.92
+0x259ae46d # 109.228.154.37
+0x82bbd35f # 95.211.187.130
+0xae4222c0 # 192.34.66.174
+0x254415d4 # 212.21.68.37
+0xbd5f574b # 75.87.95.189
+0xd8fd175e # 94.23.253.216
+0x0a3f38c3 # 195.56.63.10
+0x2dce6bb8 # 184.107.206.45
+0xc201d058 # 88.208.1.194
+0x17fca5bc # 188.165.252.23
+0xe8453cca # 202.60.69.232
+0xd361f636 # 54.246.97.211
+0xa0d9edc0 # 192.237.217.160
+0x2f232e4e # 78.46.35.47
+0x134e116c # 108.17.78.19
+0x61ddc058 # 88.192.221.97
+0x05ba7283 # 131.114.186.5
+0xe1f7ed5b # 91.237.247.225
+0x040ec452 # 82.196.14.4
+0x4b672e4e # 78.46.103.75
+0xe4efa36d # 109.163.239.228
+0x47dca52e # 46.165.220.71
+0xe9332e4e # 78.46.51.233
+0xa3acb992 # 146.185.172.163
+0x24714c90 # 144.76.113.36
+0xa8cc8632 # 50.134.204.168
+0x26b1ce6d # 109.206.177.38
+0x264e53d4 # 212.83.78.38
+0xd3d2718c # 140.113.210.211
+0x225534ad # 173.52.85.34
+0xe289f3a2 # 162.243.137.226
+0x87341717 # 23.23.52.135
+0x9255ad4f # 79.173.85.146
+0x184bbb25 # 37.187.75.24
+0x885c7abc # 188.122.92.136
+0x3a6e9ac6 # 198.154.110.58
+0x1924185e # 94.24.36.25
+0xb73d4c90 # 144.76.61.183
+0x946d807a # 122.128.109.148
+0xa0d78e3f # 63.142.215.160
+0x5a16bb25 # 37.187.22.90
+0xcb09795b # 91.121.9.203
+0x8d0de657 # 87.230.13.141
+0x630b8b25 # 37.139.11.99
+0xe572c6cf # 207.198.114.229
+0x2b3f1118 # 24.17.63.43
+0x4242a91f # 31.169.66.66
+0x32990905 # 5.9.153.50
+0x058b0905 # 5.9.139.5
+0xe266fc60 # 96.252.102.226
+0xbe66c5b0 # 176.197.102.190
+0xcc98e46d # 109.228.152.204
+0x698c943e # 62.148.140.105
+0x44bd0cc3 # 195.12.189.68
+0x865c7abc # 188.122.92.134
+0x771764d3 # 211.100.23.119
+0x4675d655 # 85.214.117.70
+0x354e4826 # 38.72.78.53
+0xb67ac152 # 82.193.122.182
+0xaeccf285 # 133.242.204.174
+0xea625b4e # 78.91.98.234
+0xbcd6031f # 31.3.214.188
+0x5e81eb18 # 24.235.129.94
+0x74b347ce # 206.71.179.116
+0x3ca56ac1 # 193.106.165.60
+0x54ee4546 # 70.69.238.84
+0x38a8175e # 94.23.168.56
+0xa3c21155 # 85.17.194.163
+0x2f01576d # 109.87.1.47
+0x5d7ade50 # 80.222.122.93
+0xa003ae48 # 72.174.3.160
+0x2bc1d31f # 31.211.193.43
+0x13f5094c # 76.9.245.19
+0x7ab32648 # 72.38.179.122
+0x542e9fd5 # 213.159.46.84
+0x53136bc1 # 193.107.19.83
+0x7fdf51c0 # 192.81.223.127
+0x802197b2 # 178.151.33.128
+0xa2d2cc5b # 91.204.210.162
+0x6b5f4bc0 # 192.75.95.107
+
+# Onion nodes
+bitcoinostk4e4re.onion:8333
+5k4vwyy5stro33fb.onion:8333
+zy3kdqowmrb7xm7h.onion:8333
+e3tn727fywnioxrc.onion:8333
+kjy2eqzk4zwi5zd3.onion:8333
+pt2awtcs2ulm75ig.onion:8333
+td7tgof3imei3fm6.onion:8333
+czsbwh4pq4mh3izl.onion:8333
+xdnigz4qn5dbbw2t.onion:8333
+ymnsfdejmc74vcfb.onion:7033
+jxrvw5iqizppbgml.onion:8333
+bk5ejfe56xakvtkk.onion:8333
+szsm43ou7otwwyfv.onion:8333
+5ghqw4wj6hpgfvdg.onion:8333
+evolynhit7shzeet.onion:8333
+4crhf372poejlc44.onion:8333
+tfu4kqfhsw5slqp2.onion:8333
+i2r5tbaizb75h26f.onion:8333
+btcnet3utgzyz2bf.onion:8333
+vso3r6cmjoomhhgg.onion:8333
+pqosrh6wfaucet32.onion:8333
+zy3kdqowmrb7xm7h.onion:8333
+r4de4zf4lyniu4mx.onion:8444
diff --git a/share/seeds/nodes_test.txt b/share/seeds/nodes_test.txt
new file mode 100644
index 000000000000..71782836feb4
--- /dev/null
+++ b/share/seeds/nodes_test.txt
@@ -0,0 +1,5 @@
+# List of fixed seed nodes for testnet
+
+# Onion nodes
+thfsmmn2jbitcoin.onion
+it2pj4f7657g3rhi.onion
diff --git a/src/Makefile.am b/src/Makefile.am
index 2d84eeba1c97..727a88c3e7f6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -72,6 +72,7 @@ BITCOIN_CORE_H = \
   bloom.h \
   chainparams.h \
   chainparamsbase.h \
+  chainparamsseeds.h \
   checkpoints.h \
   checkqueue.h \
   clientversion.h \
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index fb1d05f83333..f32d4ed235d8 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -14,88 +14,34 @@
 using namespace std;
 using namespace boost::assign;
 
+struct SeedSpec6 {
+    uint8_t addr[16];
+    uint16_t port;
+};
+
+#include "chainparamsseeds.h"
+
 //
 // Main network
 //
 
-unsigned int pnSeed[] =
+// Convert the pnSeeds6 array into usable address objects.
+static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data, unsigned int count)
 {
-    0x7e6a692e, 0x7d04d1a2, 0x6c0c17d9, 0xdb330ab9, 0xc649c7c6, 0x7895484d, 0x047109b0, 0xb90ca5bc,
-    0xd130805f, 0xbd074ea6, 0x578ff1c0, 0x286e09b0, 0xd4dcaf42, 0x529b6bb8, 0x635cc6c0, 0xedde892e,
-    0xa976d9c7, 0xea91a4b8, 0x03fa4eb2, 0x6ca9008d, 0xaf62c825, 0x93f3ba51, 0xc2c9efd5, 0x0ed5175e,
-    0x487028bc, 0x7297c225, 0x8af0c658, 0x2e57ba1f, 0xd0098abc, 0x46a8853e, 0xcc92dc3e, 0xeb6f1955,
-    0x8cce175e, 0x237281ae, 0x9d42795b, 0x4f4f0905, 0xc50151d0, 0xb1ba90c6, 0xaed7175e, 0x204de55b,
-    0x4bb03245, 0x932b28bc, 0x2dcce65b, 0xe2708abc, 0x1b08b8d5, 0x12a3dc5b, 0x8a884c90, 0xa386a8b8,
-    0x18e417c6, 0x2e709ac3, 0xeb62e925, 0x6f6503ae, 0x05d0814e, 0x8a9ac545, 0x946fd65e, 0x3f57495d,
-    0x4a29c658, 0xad454c90, 0x15340905, 0x4c3f3b25, 0x01fe19b9, 0x5620595b, 0x443c795b, 0x44f24ac8,
-    0x0442464e, 0xc8665882, 0xed3f3ec3, 0xf585bf5d, 0x5dd141da, 0xf93a084e, 0x1264dd52, 0x0711c658,
-    0xf12e7bbe, 0x5b02b740, 0x7d526dd5, 0x0cb04c90, 0x2abe1132, 0x61a39f58, 0x044a0618, 0xf3af7dce,
-    0xb994c96d, 0x361c5058, 0xca735d53, 0xeca743b0, 0xec790905, 0xc4d37845, 0xa1c4a2b2, 0x726fd453,
-    0x625cc6c0, 0x6c20132e, 0xb7aa0c79, 0xc6ed983d, 0x47e4cbc0, 0xa4ac75d4, 0xe2e59345, 0x4d784ad0,
-    0x18a5ec5e, 0x481cc85b, 0x7c6c2fd5, 0x5e4d6018, 0x5b4b6c18, 0xd99b4c90, 0xe63987dc, 0xb817bb25,
-    0x141cfeb2, 0x5f005058, 0x0d987f47, 0x242a496d, 0x3e519bc0, 0x02b2454b, 0xdfaf3dc6, 0x888128bc,
-    0x1165bb25, 0xabfeca5b, 0x2ef63540, 0x5773c7c6, 0x1280dd52, 0x8ebcacd9, 0x81c439c6, 0x39fcfa45,
-    0x62177d41, 0xc975ed62, 0x05cff476, 0xdabda743, 0xaa1ac24e, 0xe255a22e, 0x88aac705, 0xe707c658,
-    0xa9e94b5e, 0x2893484b, 0x99512705, 0xd63970ca, 0x45994f32, 0xe519a8ad, 0x92e25f5d, 0x8b84a9c1,
-    0x5eaa0a05, 0xa74de55b, 0xb090ff62, 0x5eee326c, 0xc331a679, 0xc1d9b72e, 0x0c6ab982, 0x7362bb25,
-    0x4cfedd42, 0x1e09a032, 0xa4c34c5e, 0x3777d9c7, 0x5edcf260, 0x3ce2b548, 0xd2ac0360, 0x2f80b992,
-    0x3e4cbb25, 0x3995e236, 0xd03977ae, 0x953cf054, 0x3c654ed0, 0x74024c90, 0xa14f1155, 0x14ce0125,
-    0xc15ebb6a, 0x2c08c452, 0xc7fd0652, 0x7604f8ce, 0xffb38332, 0xa4c2efd5, 0xe9614018, 0xab49e557,
-    0x1648c052, 0x36024047, 0x0e8cffad, 0x21918953, 0xb61f50ad, 0x9b406b59, 0xaf282218, 0x7f1d164e,
-    0x1f560da2, 0xe237be58, 0xbdeb1955, 0x6c0717d9, 0xdaf8ce62, 0x0f74246c, 0xdee95243, 0xf23f1a56,
-    0x61bdf867, 0xd254c854, 0xc4422e4e, 0xae0563c0, 0xbdb9a95f, 0xa9eb32c6, 0xd9943950, 0x116add52,
-    0x73a54c90, 0xb36b525e, 0xd734175e, 0x333d7f76, 0x51431bc6, 0x084ae5cf, 0xa60a236c, 0x5c67692e,
-    0x0177cf45, 0xa6683ac6, 0x7ff4ea47, 0x2192fab2, 0xa03a0f46, 0xfe3e39ae, 0x2cce5fc1, 0xc8a6c148,
-    0x96fb7e4c, 0x0a66c752, 0x6b4d2705, 0xeba0c118, 0x3ba0795b, 0x1dccd23e, 0x6912f3a2, 0x22f23c41,
-    0x65646b4a, 0x8b9f8705, 0xeb9b9a95, 0x79fe6b4e, 0x0536f447, 0x23224d61, 0x5d952ec6, 0x0cb4f736,
-    0xdc14be6d, 0xb24609b0, 0xd3f79b62, 0x6518c836, 0x83a3cf42, 0x9b641fb0, 0x17fef1c0, 0xd508cc82,
-    0x91a4369b, 0x39cb4a4c, 0xbbc9536c, 0xaf64c44a, 0x605eca50, 0x0c6a6805, 0xd07e9d4e, 0x78e6d3a2,
-    0x1b31eb6d, 0xaa01feb2, 0x4603c236, 0x1ecba3b6, 0x0effe336, 0xc3fdcb36, 0xc290036f, 0x4464692e,
-    0x1aca7589, 0x59a9e52e, 0x19aa7489, 0x2622c85e, 0xa598d318, 0x438ec345, 0xc79619b9, 0xaf570360,
-    0x5098e289, 0x36add862, 0x83c1a2b2, 0x969d0905, 0xcf3d156c, 0x49c1a445, 0xbd0b7562, 0x8fff1955,
-    0x1e51fe53, 0x28d6efd5, 0x2837cc62, 0x02f42d42, 0x070e3fb2, 0xbcb18705, 0x14a4e15b, 0x82096844,
-    0xcfcb1c2e, 0x37e27fc7, 0x07923748, 0x0c14bc2e, 0x26100905, 0xcb7cd93e, 0x3bc0d2c0, 0x97131b4c,
-    0x6f1e5c17, 0xa7939f43, 0xb7a0bf58, 0xafa83a47, 0xcbb83f32, 0x5f321cb0, 0x52d6c3c7, 0xdeac5bc7,
-    0x2cf310cc, 0x108a2bc3, 0x726fa14f, 0x85bad2cc, 0x459e4c90, 0x1a08b8d8, 0xcd7048c6, 0x6d5b4c90,
-    0xa66cfe7b, 0xad730905, 0xdaac5bc7, 0x8417fd9f, 0x41377432, 0x1f138632, 0x295a12b2, 0x7ac031b2,
-    0x3a87d295, 0xe219bc2e, 0xf485d295, 0x137b6405, 0xcfffd9ad, 0xafe20844, 0x32679a5f, 0xa431c644,
-    0x0e5fce8c, 0x305ef853, 0xad26ca32, 0xd9d21a54, 0xddd0d736, 0xc24ec0c7, 0x4aadcd5b, 0x49109852,
-    0x9d6b3ac6, 0xf0aa1e8b, 0xf1bfa343, 0x8a30c0ad, 0x260f93d4, 0x2339e760, 0x8869959f, 0xc207216c,
-    0x29453448, 0xb651ec36, 0x45496259, 0xa23d1bcc, 0xb39bcf43, 0xa1d29432, 0x3507c658, 0x4a88dd62,
-    0x27aff363, 0x7498ea6d, 0x4a6785d5, 0x5e6d47c2, 0x3baba542, 0x045a37ae, 0xa24dc0c7, 0xe981ea4d,
-    0xed6ce217, 0x857214c6, 0x6b6c0464, 0x5a4945b8, 0x12f24742, 0xf35f42ad, 0xfd0f5a4e, 0xfb081556,
-    0xb24b5861, 0x2e114146, 0xb7780905, 0x33bb0e48, 0x39e26556, 0xa794484d, 0x4225424d, 0x3003795b,
-    0x31c8cf44, 0xd65bad59, 0x127bc648, 0xf2bc4d4c, 0x0273dc50, 0x4572d736, 0x064bf653, 0xcdcd126c,
-    0x608281ae, 0x4d130087, 0x1016f725, 0xba185fc0, 0x16c1a84f, 0xfb697252, 0xa2942360, 0x53083b6c,
-    0x0583f1c0, 0x2d5a2441, 0xc172aa43, 0xcd11cf36, 0x7b14ed62, 0x5c94f1c0, 0x7c23132e, 0x39965a6f,
-    0x7890e24e, 0xa38ec447, 0xc187f1c0, 0xef80b647, 0xf20a7432, 0x7ad1d8d2, 0x869e2ec6, 0xccdb5c5d,
-    0x9d11f636, 0x2161bb25, 0x7599f889, 0x2265ecad, 0x0f4f0e55, 0x7d25854a, 0xf857e360, 0xf83f3d6c,
-    0x9cc93bb8, 0x02716857, 0x5dd8a177, 0x8adc6cd4, 0xe5613d46, 0x6a734f50, 0x2a5c3bae, 0x4a04c3d1,
-    0xe4613d46, 0x8426f4bc, 0x3e1b5fc0, 0x0d5a3c18, 0xd0f6d154, 0x21c7ff5e, 0xeb3f3d6c, 0x9da5edc0,
-    0x5d753b81, 0x0d8d53d4, 0x2613f018, 0x4443698d, 0x8ca1edcd, 0x10ed3f4e, 0x789b403a, 0x7b984a4b,
-    0x964ebc25, 0x7520ee60, 0x4f4828bc, 0x115c407d, 0x32dd0667, 0xa741715e, 0x1d3f3532, 0x817d1f56,
-    0x2f99a552, 0x6b2a5956, 0x8d4f4f05, 0xd23c1e17, 0x98993748, 0x2c92e536, 0x237ebdc3, 0xa762fb43,
-    0x32016b71, 0xd0e7cf79, 0x7d35bdd5, 0x53dac3d2, 0x31016b71, 0x7fb8f8ce, 0x9a38c232, 0xefaa42ad,
-    0x876b823d, 0x18175347, 0xdb46597d, 0xd2c168da, 0xcd6fe9dc, 0x45272e4e, 0x8d4bca5b, 0xa4043d47,
-    0xaab7aa47, 0x202881ae, 0xa4aef160, 0xecd7e6bc, 0x391359ad, 0xd8cc9318, 0xbbeee52e, 0x077067b0,
-    0xebd39d62, 0x0cedc547, 0x23d3e15e, 0xa5a81318, 0x179a32c6, 0xe4d3483d, 0x03680905, 0xe8018abc,
-    0xdde9ef5b, 0x438b8705, 0xb48224a0, 0xcbd69218, 0x9075795b, 0xc6411c3e, 0x03833f5c, 0xf33f8b5e,
-    0x495e464b, 0x83c8e65b, 0xac09cd25, 0xdaabc547, 0x7665a553, 0xc5263718, 0x2fd0c5cd, 0x22224d61,
-    0x3e954048, 0xfaa37557, 0x36dbc658, 0xa81453d0, 0x5a941f5d, 0xa598ea60, 0x65384ac6, 0x10aaa545,
-    0xaaab795b, 0xdda7024c, 0x0966f4c6, 0x68571c08, 0x8b40ee59, 0x33ac096c, 0x844b4c4b, 0xd392254d,
-    0xba4d5a46, 0x63029653, 0xf655f636, 0xbe4c4bb1, 0x45dad036, 0x204bc052, 0x06c3a2b2, 0xf31fba6a,
-    0xb21f09b0, 0x540d0751, 0xc7b46a57, 0x6a11795b, 0x3d514045, 0x0318aa6d, 0x30306ec3, 0x5c077432,
-    0x259ae46d, 0x82bbd35f, 0xae4222c0, 0x254415d4, 0xbd5f574b, 0xd8fd175e, 0x0a3f38c3, 0x2dce6bb8,
-    0xc201d058, 0x17fca5bc, 0xe8453cca, 0xd361f636, 0xa0d9edc0, 0x2f232e4e, 0x134e116c, 0x61ddc058,
-    0x05ba7283, 0xe1f7ed5b, 0x040ec452, 0x4b672e4e, 0xe4efa36d, 0x47dca52e, 0xe9332e4e, 0xa3acb992,
-    0x24714c90, 0xa8cc8632, 0x26b1ce6d, 0x264e53d4, 0xd3d2718c, 0x225534ad, 0xe289f3a2, 0x87341717,
-    0x9255ad4f, 0x184bbb25, 0x885c7abc, 0x3a6e9ac6, 0x1924185e, 0xb73d4c90, 0x946d807a, 0xa0d78e3f,
-    0x5a16bb25, 0xcb09795b, 0x8d0de657, 0x630b8b25, 0xe572c6cf, 0x2b3f1118, 0x4242a91f, 0x32990905,
-    0x058b0905, 0xe266fc60, 0xbe66c5b0, 0xcc98e46d, 0x698c943e, 0x44bd0cc3, 0x865c7abc, 0x771764d3,
-    0x4675d655, 0x354e4826, 0xb67ac152, 0xaeccf285, 0xea625b4e, 0xbcd6031f, 0x5e81eb18, 0x74b347ce,
-    0x3ca56ac1, 0x54ee4546, 0x38a8175e, 0xa3c21155, 0x2f01576d, 0x5d7ade50, 0xa003ae48, 0x2bc1d31f,
-    0x13f5094c, 0x7ab32648, 0x542e9fd5, 0x53136bc1, 0x7fdf51c0, 0x802197b2, 0xa2d2cc5b, 0x6b5f4bc0,
-};
+    // It'll only connect to one or two seed nodes because once it connects,
+    // it'll get a pile of addresses with newer timestamps.
+    // Seed nodes are given a random 'last seen time' of between one and two
+    // weeks ago.
+    const int64_t nOneWeek = 7*24*60*60;
+    for (unsigned int i = 0; i < count; i++)
+    {
+        struct in6_addr ip;
+        memcpy(&ip, data[i].addr, sizeof(ip));
+        CAddress addr(CService(ip, data[i].port));
+        addr.nTime = GetTime() - GetRand(nOneWeek) - nOneWeek;
+        vSeedsOut.push_back(addr);
+    }
+}
 
 class CMainParams : public CChainParams {
 public:
@@ -161,20 +107,7 @@ class CMainParams : public CChainParams {
         base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
         base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
 
-        // Convert the pnSeeds array into usable address objects.
-        for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++)
-        {
-            // It'll only connect to one or two seed nodes because once it connects,
-            // it'll get a pile of addresses with newer timestamps.
-            // Seed nodes are given a random 'last seen time' of between one and two
-            // weeks ago.
-            const int64_t nOneWeek = 7*24*60*60;
-            struct in_addr ip;
-            memcpy(&ip, &pnSeed[i], sizeof(ip));
-            CAddress addr(CService(ip, GetDefaultPort()));
-            addr.nTime = GetTime() - GetRand(nOneWeek) - nOneWeek;
-            vFixedSeeds.push_back(addr);
-        }
+        convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
 
         fRequireRPCPassword = true;
         fMiningRequiresPeers = true;
@@ -189,6 +122,7 @@ static CMainParams mainParams;
 //
 // Testnet (v3)
 //
+
 class CTestNetParams : public CMainParams {
 public:
     CTestNetParams() {
@@ -228,6 +162,8 @@ class CTestNetParams : public CMainParams {
         base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
         base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
 
+        convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
+
         fRequireRPCPassword = true;
         fMiningRequiresPeers = true;
         fDefaultCheckMemPool = false;
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
new file mode 100644
index 000000000000..3f3278361eb6
--- /dev/null
+++ b/src/chainparamsseeds.h
@@ -0,0 +1,638 @@
+#ifndef H_CHAINPARAMSSEEDS
+#define H_CHAINPARAMSSEEDS
+// List of fixed seed nodes for the bitcoin network
+// AUTOGENERATED by contrib/devtools/generate-seeds.py
+
+// Each line contains a 16-byte IPv6 address and a port.
+// IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
+static SeedSpec6 pnSeed6_main[] = {
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x6a,0x7e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd1,0x04,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x0c,0x6c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x0a,0x33,0xdb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xc7,0x49,0xc6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x48,0x95,0x78}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x71,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0x0c,0xb9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x80,0x30,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa6,0x4e,0x07,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x8f,0x57}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x6e,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xaf,0xdc,0xd4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0x9b,0x52}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5c,0x63}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x89,0xde,0xed}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xd9,0x76,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0xa4,0x91,0xea}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x4e,0xfa,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0x00,0xa9,0x6c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc8,0x62,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xba,0xf3,0x93}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xc9,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xd5,0x0e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x70,0x48}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc2,0x97,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0xf0,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0x57,0x2e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x09,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x85,0xa8,0x46}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xdc,0x92,0xcc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0x6f,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xce,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x72,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x42,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x4f,0x4f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x51,0x01,0xc5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x90,0xba,0xb1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xd7,0xae}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe5,0x4d,0x20}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x32,0xb0,0x4b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x2b,0x93}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe6,0xcc,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x70,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xb8,0x08,0x1b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdc,0xa3,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x88,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0xa8,0x86,0xa3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x17,0xe4,0x18}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0x70,0x2e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xe9,0x62,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x03,0x65,0x6f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x81,0xd0,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xc5,0x9a,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xd6,0x6f,0x94}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x49,0x57,0x3f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x29,0x4a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x45,0xad}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x34,0x15}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x3b,0x3f,0x4c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0xfe,0x01}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x59,0x20,0x56}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x3c,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc8,0x4a,0xf2,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x46,0x42,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0x58,0x66,0xc8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x3e,0x3f,0xed}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xbf,0x85,0xf5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xda,0x41,0xd1,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x08,0x3a,0xf9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x64,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x11,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x7b,0x2e,0xf1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0xb7,0x02,0x5b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x6d,0x52,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xb0,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x11,0xbe,0x2a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x9f,0xa3,0x61}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x06,0x4a,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0x7d,0xaf,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xc9,0x94,0xb9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x50,0x1c,0x36}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x5d,0x73,0xca}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x43,0xa7,0xec}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x79,0xec}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x78,0xd3,0xc4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc4,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xd4,0x6f,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5c,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x20,0x6c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0x0c,0xaa,0xb7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x98,0xed,0xc6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xcb,0xe4,0x47}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x75,0xac,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x93,0xe5,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x4a,0x78,0x4d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xec,0xa5,0x18}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc8,0x1c,0x48}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x2f,0x6c,0x7c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x60,0x4d,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x6c,0x4b,0x5b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x9b,0xd9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdc,0x87,0x39,0xe6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x17,0xb8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x1c,0x14}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x50,0x00,0x5f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x7f,0x98,0x0d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0x2a,0x24}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x9b,0x51,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x45,0xb2,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3d,0xaf,0xdf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x81,0x88}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x65,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xca,0xfe,0xab}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x35,0xf6,0x2e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xc7,0x73,0x57}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x80,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xac,0xbc,0x8e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x39,0xc4,0x81}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xfa,0xfc,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x7d,0x17,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x75,0xc9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0xf4,0xcf,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa7,0xbd,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0xc2,0x1a,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa2,0x55,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0xaa,0x88}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x07,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4b,0xe9,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x48,0x93,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0x51,0x99}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x70,0x39,0xd6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4f,0x99,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xa8,0x19,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x5f,0xe2,0x92}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xa9,0x84,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x0a,0xaa,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe5,0x4d,0xa7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xff,0x90,0xb0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x32,0xee,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xa6,0x31,0xc3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xb7,0xd9,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xb9,0x6a,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x62,0x73}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xdd,0xfe,0x4c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xa0,0x09,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4c,0xc3,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xd9,0x77,0x37}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xf2,0xdc,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xb5,0xe2,0x3c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x03,0xac,0xd2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x80,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4c,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe2,0x95,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x77,0x39,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xf0,0x3c,0x95}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x4e,0x65,0x3c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x02,0x74}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x11,0x4f,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x01,0xce,0x14}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xbb,0x5e,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc4,0x08,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x06,0xfd,0xc7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0x04,0x76}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x83,0xb3,0xff}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xc2,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x40,0x61,0xe9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe5,0x49,0xab}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc0,0x48,0x16}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x40,0x02,0x36}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0x8c,0x0e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x89,0x91,0x21}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x50,0x1f,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x6b,0x40,0x9b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x22,0x28,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x16,0x1d,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0x0d,0x56,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xbe,0x37,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xeb,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x07,0x6c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xce,0xf8,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x24,0x74,0x0f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0x52,0xe9,0xde}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x1a,0x3f,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xf8,0xbd,0x61}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xc8,0x54,0xd2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x42,0xc4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x63,0x05,0xae}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xa9,0xb9,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x32,0xeb,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x39,0x94,0xd9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x6a,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xa5,0x73}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x52,0x6b,0xb3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0x34,0xd7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0x7f,0x3d,0x33}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x1b,0x43,0x51}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xe5,0x4a,0x08}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x23,0x0a,0xa6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x67,0x5c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xcf,0x77,0x01}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3a,0x68,0xa6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xea,0xf4,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfa,0x92,0x21}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x0f,0x3a,0xa0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x39,0x3e,0xfe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x5f,0xce,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc1,0xa6,0xc8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x7e,0xfb,0x96}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc7,0x66,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0x4d,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xc1,0xa0,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0xa0,0x3b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd2,0xcc,0x1d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x12,0x69}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x3c,0xf2,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x6b,0x64,0x65}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0x9f,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x9a,0x9b,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x6b,0xfe,0x79}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xf4,0x36,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x4d,0x22,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x2e,0x95,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf7,0xb4,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xbe,0x14,0xdc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x46,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x9b,0xf7,0xd3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xc8,0x18,0x65}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xcf,0xa3,0x83}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x1f,0x64,0x9b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0xfe,0x17}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xcc,0x08,0xd5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9b,0x36,0xa4,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x4a,0xcb,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x53,0xc9,0xbb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xc4,0x64,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xca,0x5e,0x60}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x68,0x6a,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x9d,0x7e,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd3,0xe6,0x78}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xeb,0x31,0x1b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x01,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xc2,0x03,0x46}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb6,0xa3,0xcb,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe3,0xff,0x0e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xcb,0xfd,0xc3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6f,0x03,0x90,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x64,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x75,0xca,0x1a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xa9,0x59}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x74,0xaa,0x19}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xc8,0x22,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xd3,0x98,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xc3,0x8e,0x43}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x96,0xc7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x03,0x57,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xe2,0x98,0x50}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xd8,0xad,0x36}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc1,0x83}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x9d,0x96}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x15,0x3d,0xcf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xa4,0xc1,0x49}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x75,0x0b,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xff,0x8f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x51,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xd6,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xcc,0x37,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x2d,0xf4,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3f,0x0e,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0xb1,0xbc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe1,0xa4,0x14}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x68,0x09,0x82}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcb,0xcf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x7f,0xe2,0x37}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x37,0x92,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xbc,0x14,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x10,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd9,0x7c,0xcb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xd2,0xc0,0x3b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x1b,0x13,0x97}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x5c,0x1e,0x6f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0x9f,0x93,0xa7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xbf,0xa0,0xb7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3a,0xa8,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x3f,0xb8,0xcb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x1c,0x32,0x5f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc3,0xd6,0x52}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x5b,0xac,0xde}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x10,0xf3,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x2b,0x8a,0x10}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa1,0x6f,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0xd2,0xba,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x9e,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xb8,0x08,0x1a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x48,0x70,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x5b,0x6d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7b,0xfe,0x6c,0xa6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x73,0xad}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x5b,0xac,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xfd,0x17,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x37,0x41}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x86,0x13,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x12,0x5a,0x29}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x31,0xc0,0x7a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0xd2,0x87,0x3a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xbc,0x19,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0xd2,0x85,0xf4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x64,0x7b,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd9,0xff,0xcf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x08,0xe2,0xaf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0x67,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xc6,0x31,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8c,0xce,0x5f,0x0e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf8,0x5e,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xca,0x26,0xad}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x1a,0xd2,0xd9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd7,0xd0,0xdd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc0,0x4e,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xcd,0xad,0x4a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x98,0x10,0x49}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3a,0x6b,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8b,0x1e,0xaa,0xf0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa3,0xbf,0xf1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xc0,0x30,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x93,0x0f,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xe7,0x39,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x95,0x69,0x88}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x21,0x07,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x34,0x45,0x29}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xec,0x51,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x62,0x49,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x1b,0x3d,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xcf,0x9b,0xb3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x94,0xd2,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x07,0x35}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xdd,0x88,0x4a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0xf3,0xaf,0x27}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xea,0x98,0x74}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x85,0x67,0x4a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x47,0x6d,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xa5,0xab,0x3b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x37,0x5a,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc0,0x4d,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xea,0x81,0xe9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe2,0x6c,0xed}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x14,0x72,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x64,0x04,0x6c,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x45,0x49,0x5a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x47,0xf2,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x42,0x5f,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x5a,0x0f,0xfd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x15,0x08,0xfb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x58,0x4b,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x41,0x11,0x2e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x78,0xb7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x0e,0xbb,0x33}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x65,0xe2,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x48,0x94,0xa7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x42,0x25,0x42}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x03,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xcf,0xc8,0x31}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xad,0x5b,0xd6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc6,0x7b,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x4d,0xbc,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xdc,0x73,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd7,0x72,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf6,0x4b,0x06}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x12,0xcd,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x82,0x60}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x87,0x00,0x13,0x4d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xf7,0x16,0x10}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x18,0xba}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa8,0xc1,0x16}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x72,0x69,0xfb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x23,0x94,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3b,0x08,0x53}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x83,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x24,0x5a,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xaa,0x72,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xcf,0x11,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x14,0x7b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x94,0x5c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x23,0x7c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6f,0x5a,0x96,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0xe2,0x90,0x78}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc4,0x8e,0xa3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x87,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xb6,0x80,0xef}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x0a,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0xd8,0xd1,0x7a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x2e,0x9e,0x86}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x5c,0xdb,0xcc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x11,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x61,0x21}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xf8,0x99,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xec,0x65,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x0e,0x4f,0x0f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x85,0x25,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xe3,0x57,0xf8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x3f,0xf8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x3b,0xc9,0x9c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x68,0x71,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xa1,0xd8,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x6c,0xdc,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x4f,0x73,0x6a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x3b,0x5c,0x2a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xc3,0x04,0x4a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xf4,0x26,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x1b,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x3c,0x5a,0x0d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd1,0xf6,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xff,0xc7,0x21}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x3f,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xed,0xa5,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x3b,0x75,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x53,0x8d,0x0d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xf0,0x13,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0x69,0x43,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcd,0xed,0xa1,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x3f,0xed,0x10}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x40,0x9b,0x78}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x4a,0x98,0x7b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbc,0x4e,0x96}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xee,0x20,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x48,0x4f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7d,0x40,0x5c,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x06,0xdd,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x71,0x41,0xa7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x35,0x3f,0x1d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x1f,0x7d,0x81}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa5,0x99,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x59,0x2a,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x4f,0x4f,0x8d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x1e,0x3c,0xd2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x37,0x99,0x98}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe5,0x92,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xbd,0x7e,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xfb,0x62,0xa7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x6b,0x01,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xcf,0xe7,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xbd,0x35,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0xc3,0xda,0x53}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x6b,0x01,0x31}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0xb8,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc2,0x38,0x9a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x42,0xaa,0xef}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x82,0x6b,0x87}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x53,0x17,0x18}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7d,0x59,0x46,0xdb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xda,0x68,0xc1,0xd2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdc,0xe9,0x6f,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x27,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xca,0x4b,0x8d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3d,0x04,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xaa,0xb7,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x28,0x20}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xf1,0xae,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe6,0xd7,0xec}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x59,0x13,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x93,0xcc,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xee,0xbb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x67,0x70,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x9d,0xd3,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc5,0xed,0x0c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe1,0xd3,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x13,0xa8,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x32,0x9a,0x17}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x48,0xd3,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x68,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x01,0xe8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xef,0xe9,0xdd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0x8b,0x43}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa0,0x24,0x82,0xb4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x92,0xd6,0xcb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x75,0x90}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x1c,0x41,0xc6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x3f,0x83,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x8b,0x3f,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x46,0x5e,0x49}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe6,0xc8,0x83}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xcd,0x09,0xac}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc5,0xab,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xa5,0x65,0x76}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x37,0x26,0xc5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcd,0xc5,0xd0,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x4d,0x22,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x40,0x95,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x75,0xa3,0xfa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0xdb,0x36}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x53,0x14,0xa8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x1f,0x94,0x5a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xea,0x98,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x4a,0x38,0x65}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xa5,0xaa,0x10}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0xab,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x02,0xa7,0xdd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xf4,0x66,0x09}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x08,0x1c,0x57,0x68}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xee,0x40,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x09,0xac,0x33}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x4c,0x4b,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x25,0x92,0xd3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x5a,0x4d,0xba}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x02,0x63}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x55,0xf6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb1,0x4b,0x4c,0xbe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd0,0xda,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc0,0x4b,0x20}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc3,0x06}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xba,0x1f,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x1f,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x07,0x0d,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x6a,0xb4,0xc7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x11,0x6a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x51,0x3d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xaa,0x18,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x6e,0x30,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x07,0x5c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x9a,0x25}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0xbb,0x82}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x22,0x42,0xae}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x15,0x44,0x25}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x57,0x5f,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xfd,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x38,0x3f,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0xce,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x01,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0xfc,0x17}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x45,0xe8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x61,0xd3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xed,0xd9,0xa0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x23,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x11,0x4e,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc0,0xdd,0x61}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x83,0x72,0xba,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xed,0xf7,0xe1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc4,0x0e,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x67,0x4b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xa3,0xef,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa5,0xdc,0x47}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x33,0xe9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0xac,0xa3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x71,0x24}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x86,0xcc,0xa8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xce,0xb1,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x53,0x4e,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8c,0x71,0xd2,0xd3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x34,0x55,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x89,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x17,0x34,0x87}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xad,0x55,0x92}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4b,0x18}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x88}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x9a,0x6e,0x3a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x18,0x24,0x19}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x3d,0xb7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x80,0x6d,0x94}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x8e,0xd7,0xa0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x16,0x5a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x09,0xcb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe6,0x0d,0x8d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x8b,0x0b,0x63}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xc6,0x72,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x11,0x3f,0x2b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xa9,0x42,0x42}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x99,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x8b,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xfc,0x66,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xc5,0x66,0xbe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x98,0xcc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x94,0x8c,0x69}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x0c,0xbd,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x86}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd3,0x64,0x17,0x77}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x75,0x46}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x26,0x48,0x4e,0x35}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc1,0x7a,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x85,0xf2,0xcc,0xae}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x5b,0x62,0xea}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x03,0xd6,0xbc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xeb,0x81,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0x47,0xb3,0x74}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6a,0xa5,0x3c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x45,0xee,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xa8,0x38}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x11,0xc2,0xa3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x57,0x01,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xde,0x7a,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xae,0x03,0xa0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xd3,0xc1,0x2b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x09,0xf5,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x26,0xb3,0x7a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x9f,0x2e,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6b,0x13,0x53}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x51,0xdf,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x97,0x21,0x80}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xcc,0xd2,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x4b,0x5f,0x6b}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0a,0x26,0x27,0x21,0xae,0x94,0xd5,0xc2,0x72,0x24}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xea,0xb9,0x5b,0x63,0x1d,0x94,0xe2,0xed,0xec,0xa1}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xce,0x36,0xa1,0xc1,0xd6,0x64,0x43,0xfb,0xb3,0xe7}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x26,0xe6,0xdf,0xeb,0xe5,0xc5,0x9a,0x87,0x5e,0x22}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x52,0x71,0xa2,0x43,0x2a,0xe6,0x6c,0x8e,0xe4,0x7b}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x7c,0xf4,0x0b,0x4c,0x52,0xd5,0x16,0xcf,0xf5,0x06}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x98,0xff,0x33,0x38,0xbb,0x43,0x08,0x8d,0x95,0x9e}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x16,0x64,0x1b,0x1f,0x8f,0x87,0x18,0x7d,0xa3,0x2b}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xb8,0xda,0x83,0x67,0x90,0x6f,0x46,0x10,0xdb,0x53}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xc3,0x1b,0x22,0x8c,0x89,0x60,0xbf,0xca,0x88,0xa1}, 7033},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x4d,0xe3,0x5b,0x75,0x10,0x46,0x5e,0xf0,0x99,0x8b}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0a,0xba,0x44,0x94,0x9d,0xf5,0xc0,0xaa,0xcd,0x4a}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x96,0x64,0xce,0x6d,0xd4,0xfb,0xa7,0x6b,0x60,0xb5}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xe9,0x8f,0x0b,0x72,0xc9,0xf1,0xde,0x62,0xd4,0x66}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x25,0x5c,0xbc,0x34,0xe8,0x9f,0xe4,0x7c,0x90,0x93}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xe0,0xa2,0x72,0xef,0xfa,0x7b,0x88,0x95,0x8b,0x9c}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x99,0x69,0xc5,0x40,0xa7,0x95,0xbb,0x25,0xc1,0xfa}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x46,0xa3,0xd9,0x84,0x08,0xc8,0x7f,0xd3,0xeb,0xc5}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0c,0xc4,0xd2,0x4f,0x74,0x99,0xb3,0x8c,0xe8,0x25}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xac,0x9d,0xb8,0xf8,0x4c,0x4b,0x9c,0xc3,0x9c,0xc6}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x7c,0x1d,0x28,0x9f,0xd6,0x28,0x28,0x22,0x4f,0x7a}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xce,0x36,0xa1,0xc1,0xd6,0x64,0x43,0xfb,0xb3,0xe7}, 8333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x8f,0x06,0x4e,0x64,0xbc,0x5e,0x1a,0x8a,0x71,0x97}, 8444}
+};
+
+static SeedSpec6 pnSeed6_test[] = {
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x99,0xcb,0x26,0x31,0xba,0x48,0x51,0x31,0x39,0x0d}, 18333},
+    {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x44,0xf4,0xf4,0xf0,0xbf,0xf7,0x7e,0x6d,0xc4,0xe8}, 18333}
+};
+#endif

From b33bd7a3be1cbcc8d255178307976b7762125b18 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Sun, 3 Aug 2014 18:12:19 +0200
Subject: [PATCH 0468/1819] Implement "getchaintips" RPC command to monitor
 blockchain forks.

Port over https://github.com/chronokings/huntercoin/pull/19 from
Huntercoin:  This implements a new RPC command "getchaintips" that can be
used to find all currently active chain heads.  This is similar to the
-printblocktree startup option, but it can be used without restarting
just via the RPC interface on a running daemon.
---
 qa/rpc-tests/getchaintips.py | 24 +++++++++++++
 src/main.cpp                 |  6 ++--
 src/main.h                   |  2 +-
 src/rpcblockchain.cpp        | 70 ++++++++++++++++++++++++++++++++++++
 src/rpcserver.cpp            |  1 +
 src/rpcserver.h              |  1 +
 6 files changed, 100 insertions(+), 4 deletions(-)
 create mode 100755 qa/rpc-tests/getchaintips.py

diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
new file mode 100755
index 000000000000..a83c4997436b
--- /dev/null
+++ b/qa/rpc-tests/getchaintips.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# Exercise the getchaintips API.
+
+# Since the test framework does not generate orphan blocks, we can
+# unfortunately not check for them!
+
+from test_framework import BitcoinTestFramework
+from util import assert_equal
+
+class GetChainTipsTest (BitcoinTestFramework):
+
+    def run_test (self, nodes):
+        res = nodes[0].getchaintips ()
+        assert_equal (len (res), 1)
+        res = res[0]
+        assert_equal (res['branchlen'], 0)
+        assert_equal (res['height'], 200)
+
+if __name__ == '__main__':
+    GetChainTipsTest ().main ()
diff --git a/src/main.cpp b/src/main.cpp
index 353cde0bd7cd..cf9318fedf71 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -444,7 +444,7 @@ CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const {
     return Genesis();
 }
 
-CBlockIndex *CChain::FindFork(CBlockIndex *pindex) const {
+const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
     if (pindex->nHeight > Height())
         pindex = pindex->GetAncestor(Height());
     while (pindex && !Contains(pindex))
@@ -2067,8 +2067,8 @@ static CBlockIndex* FindMostWorkChain() {
 static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork) {
     AssertLockHeld(cs_main);
     bool fInvalidFound = false;
-    CBlockIndex *pindexOldTip = chainActive.Tip();
-    CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
+    const CBlockIndex *pindexOldTip = chainActive.Tip();
+    const CBlockIndex *pindexFork = chainActive.FindFork(pindexMostWork);
 
     // Disconnect active blocks which are no longer in the best chain.
     while (chainActive.Tip() && chainActive.Tip() != pindexFork) {
diff --git a/src/main.h b/src/main.h
index 48ec86f6a892..a27020459ab2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1068,7 +1068,7 @@ class CChain {
     CBlockIndex *FindFork(const CBlockLocator &locator) const;
 
     /** Find the last common block between this chain and a block index entry. */
-    CBlockIndex *FindFork(CBlockIndex *pindex) const;
+    const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
 };
 
 /** The currently-connected chain of blocks. */
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 253693e6248a..1e5198b85cff 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -461,3 +461,73 @@ Value getblockchaininfo(const Array& params, bool fHelp)
     obj.push_back(Pair("chainwork",             chainActive.Tip()->nChainWork.GetHex()));
     return obj;
 }
+
+/* Comparison function for sorting the getchaintips heads.  */
+struct CompareBlocksByHeight
+{
+    bool operator()(const CBlockIndex* a, const CBlockIndex* b) const
+    {
+        /* Make sure that unequal blocks with the same height do not compare
+           equal.  Use the pointers themselves to make a distinction.  */
+
+        if (a->nHeight != b->nHeight)
+          return (a->nHeight > b->nHeight);
+
+        return a < b;
+    }
+};
+
+Value getchaintips(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 0)
+        throw runtime_error(
+            "getchaintips\n"
+            "Return information about all known tips in the block tree,"
+            " including the main chain as well as orphaned branches.\n"
+            "\nResult:\n"
+            "[\n"
+            "  {\n"
+            "    \"height\": xxxx,         (numeric) height of the chain tip\n"
+            "    \"hash\": \"xxxx\",         (string) block hash of the tip\n"
+            "    \"branchlen\": 0          (numeric) zero for main chain\n"
+            "  },\n"
+            "  {\n"
+            "    \"height\": xxxx,\n"
+            "    \"hash\": \"xxxx\",\n"
+            "    \"branchlen\": 1          (numeric) length of branch connecting the tip to the main chain\n"
+            "  }\n"
+            "]\n"
+            "\nExamples:\n"
+            + HelpExampleCli("getchaintips", "")
+            + HelpExampleRpc("getchaintips", "")
+        );
+
+    /* Build up a list of chain tips.  We start with the list of all
+       known blocks, and successively remove blocks that appear as pprev
+       of another block.  */
+    std::set<const CBlockIndex*, CompareBlocksByHeight> setTips;
+    BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex)
+        setTips.insert(item.second);
+    BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex)
+    {
+        const CBlockIndex* pprev = item.second->pprev;
+        if (pprev)
+            setTips.erase(pprev);
+    }
+
+    /* Construct the output array.  */
+    Array res;
+    BOOST_FOREACH(const CBlockIndex* block, setTips)
+    {
+        Object obj;
+        obj.push_back(Pair("height", block->nHeight));
+        obj.push_back(Pair("hash", block->phashBlock->GetHex()));
+
+        const int branchLen = block->nHeight - chainActive.FindFork(block)->nHeight;
+        obj.push_back(Pair("branchlen", branchLen));
+
+        res.push_back(obj);
+    }
+
+    return res;
+}
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 5deb6a4e08ba..716a7fba6a4b 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -235,6 +235,7 @@ static const CRPCCommand vRPCCommands[] =
     { "getblockcount",          &getblockcount,          true,      false,      false },
     { "getblock",               &getblock,               true,      false,      false },
     { "getblockhash",           &getblockhash,           true,      false,      false },
+    { "getchaintips",           &getchaintips,           true,      false,      false },
     { "getdifficulty",          &getdifficulty,          true,      false,      false },
     { "getrawmempool",          &getrawmempool,          true,      false,      false },
     { "gettxout",               &gettxout,               true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 31badadd6d71..176852ca8fc3 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -205,5 +205,6 @@ extern json_spirit::Value getblock(const json_spirit::Array& params, bool fHelp)
 extern json_spirit::Value gettxoutsetinfo(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
 
 #endif

From e1eb741e342ef25e510db6c06935afc4116abd74 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 4 Aug 2014 09:47:59 +0200
Subject: [PATCH 0469/1819] doc: Modernize steps to be followed after release

Remove old references to sourceforge, add what actually should be done
and provide some more details.
---
 doc/release-process.md | 60 ++++++++++++++++++++++++++----------------
 1 file changed, 37 insertions(+), 23 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index c58838141196..c5ead4199b61 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -156,24 +156,6 @@ repackage gitian builds for release as stand-alone zip/tar/installer exe
 
 ###Next steps:
 
-* Code-sign Windows -setup.exe (in a Windows virtual machine using signtool)
- Note: only Gavin has the code-signing keys currently.
-
-* upload builds to SourceForge
-
-* create SHA256SUMS for builds, and PGP-sign it
-
-* update bitcoin.org version
-  make sure all OS download links go to the right versions
-  
-* update download sizes on bitcoin.org/_templates/download.html
-
-* update forum version
-
-* update wiki download links
-
-* update wiki changelog: [https://en.bitcoin.it/wiki/Changelog](https://en.bitcoin.it/wiki/Changelog)
-
 Commit your signature to gitian.sigs:
 
 	pushd gitian.sigs
@@ -186,18 +168,50 @@ Commit your signature to gitian.sigs:
 
 -------------------------------------------------------------------------
 
-### After 3 or more people have gitian-built, repackage gitian-signed zips:
+### After 3 or more people have gitian-built and their results match:
 
-- Upload gitian zips to SourceForge
+- Perform code-signing.
 
-- Announce the release:
+    - Code-sign Windows -setup.exe (in a Windows virtual machine using signtool)
+
+    - Code-sign MacOSX .dmg
+
+  Note: only Gavin has the code-signing keys currently.
 
-  - Add the release to bitcoin.org: https://github.com/bitcoin/bitcoin.org/tree/master/_releases
+- Create `SHA256SUMS.asc` for builds, and PGP-sign it. This is done manually.
+  Include all the files to be uploaded. The file has `sha256sum` format with a
+  simple header at the top:
+
+```
+Hash: SHA256
+
+0060f7d38b98113ab912d4c184000291d7f026eaf77ca5830deec15059678f54  bitcoin-x.y.z-linux.tar.gz
+...
+```
+
+- Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
+
+- Update bitcoin.org version
+
+  - Make a pull request to add a file named `YYYY-MM-DD-vX.Y.Z.md` with the release notes
+  to https://github.com/bitcoin/bitcoin.org/tree/master/_releases
+   ([Example for 0.9.2.1](https://raw.githubusercontent.com/bitcoin/bitcoin.org/master/_releases/2014-06-19-v0.9.2.1.md)).
+
+  - After the pull request is merged, the website will automatically show the newest version, as well
+    as update the OS download links. Ping Saivann in case anything goes wrong
+
+- Announce the release:
 
   - Release sticky on bitcointalk: https://bitcointalk.org/index.php?board=1.0
 
   - Bitcoin-development mailing list
 
-  - Optionally reddit /r/Bitcoin, ...
+  - Update title of #bitcoin on Freenode IRC
+
+  - Optionally reddit /r/Bitcoin, ... but this will usually sort out itself
+
+- Notify BlueMatt so that he can start building [https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin](the PPAs)
+
+- Add release notes for the new version to the directory `doc/release-notes` in git master
 
 - Celebrate 

From 0a0878d43a2e7db9c41b20ba1d3eb714fd6806c4 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Mon, 21 Jul 2014 10:02:04 +0200
Subject: [PATCH 0470/1819] doc: Add new DNSseed policy

---
 doc/dnsseed-policy.md | 52 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 doc/dnsseed-policy.md

diff --git a/doc/dnsseed-policy.md b/doc/dnsseed-policy.md
new file mode 100644
index 000000000000..73e307f7cd1f
--- /dev/null
+++ b/doc/dnsseed-policy.md
@@ -0,0 +1,52 @@
+Expectations for DNS Seed operators
+====================================
+
+Bitcoin Core attempts to minimize the level of trust in DNS seeds,
+but DNS seeds still pose a small amount of risk for the network.
+Other implementations of Bitcoin software may also use the same
+seeds and may be more exposed. In light of this exposure this
+document establishes some basic expectations for the expectations
+for the operation of dnsseeds.
+
+0. A DNS seed operating organization or person is expected
+to follow good host security practices and maintain control of
+their serving infrastructure and not sell or transfer control of their
+DNS seed. Any hosting services contracted by the operator are
+equally expected to uphold these expectations.
+
+1. The DNS seed results must consist exclusively of fairly selected and
+functioning Bitcoin nodes from the public network to the best of the
+operators understanding and capability.
+
+2. For the avoidance of doubt, the results may be randomized but must not
+single-out any group of hosts to receive different results unless due to an
+urgent technical necessity and disclosed.
+
+3. The results may not be served with a DNS TTL of less than one minute.
+
+4. Any logging of DNS queries should be only that which is necessary
+for the operation of the service or urgent health of the Bitcoin
+network and must not be retained longer than necessary or disclosed
+to any third party.
+
+5. Information gathered as a result of the operators node-spidering
+(not from DNS queries) may be freely published or retained, but only
+if this data was not made more complete by biasing node connectivity
+(a violation of expectation (1)).
+
+6. Operators are encouraged, but not required, to publicly document the
+details of their operating practices.
+
+7. A reachable email contact address must be published for inquiries
+related to the DNS seed operation.
+
+If these expectations cannot be satisfied the operator should
+discontinue providing services and contact the active Bitcoin
+Core development team as well as posting on bitcoin-development.
+
+Behavior outside of these expectations may be reasonable in some
+situations but should be discussed in public in advance.
+
+See also
+----------
+- [bitcoin-seeder](https://github.com/sipa/bitcoin-seeder) is a reference implementation of a DNS seed.

From 2b410c2fe1cba1c606b89f005cfa0ee4810320cf Mon Sep 17 00:00:00 2001
From: pryds <thomas@pryds.eu>
Date: Fri, 1 Aug 2014 23:06:36 +0200
Subject: [PATCH 0471/1819] Typo, and a few "Bitcoin" -> "Bitcoin Core"

Github-Pull: #4619
---
 src/init.cpp                |  6 +--
 src/qt/bitcoinstrings.cpp   | 10 ++---
 src/qt/locale/bitcoin_en.ts | 74 ++++++++++++++++---------------------
 src/timedata.cpp            |  2 +-
 4 files changed, 41 insertions(+), 51 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b84c233b9956..0b621f373458 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -280,7 +280,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + _("(default: wallet.dat)") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
-    strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup") + "\n";
+    strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n";
     strUsage += "                         " + _("(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
 
@@ -1087,10 +1087,10 @@ bool AppInit2(boost::thread_group& threadGroup)
                 InitWarning(msg);
             }
             else if (nLoadWalletRet == DB_TOO_NEW)
-                strErrors << _("Error loading wallet.dat: Wallet requires newer version of Bitcoin") << "\n";
+                strErrors << _("Error loading wallet.dat: Wallet requires newer version of Bitcoin Core") << "\n";
             else if (nLoadWalletRet == DB_NEED_REWRITE)
             {
-                strErrors << _("Wallet needed to be rewritten: restart Bitcoin to complete") << "\n";
+                strErrors << _("Wallet needed to be rewritten: restart Bitcoin Core to complete") << "\n";
                 LogPrintf("%s", strErrors.str());
                 return InitError(strErrors.str());
             }
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 9ac7f24867f2..3b4b40aae307 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -54,8 +54,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Create new files with system default permissions, instead of umask 077 (only "
 "effective with disabled wallet functionality)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Delete all wallet transactions and only recover those part of the blockchain "
-"through -rescan on startup"),
+"Delete all wallet transactions and only recover those parts of the "
+"blockchain through -rescan on startup"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Distributed under the MIT/X11 software license, see the accompanying file "
 "COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
@@ -139,7 +139,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "pay if you send a transaction."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: Please check that your computer's date and time are correct! If "
-"your clock is wrong Bitcoin will not work properly."),
+"your clock is wrong Bitcoin Core will not work properly."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: The network does not appear to fully agree! Some miners appear to "
 "be experiencing issues."),
@@ -192,7 +192,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environmen
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Bitcoin"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Bitcoin Core"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
@@ -302,7 +302,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Verifying wallet..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet %s resides outside data directory %s"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin to complete"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoin Core to complete"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Warning"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete, upgrade required!"),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 143f705327d9..2c95b5bba609 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1284,7 +1284,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+174"/>
+        <location line="+164"/>
         <location line="+13"/>
         <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 type="unfinished"></translation>
@@ -1310,7 +1310,7 @@ Address: %4
         <translation>&amp;Reset Options</translation>
     </message>
     <message>
-        <location line="-327"/>
+        <location line="-317"/>
         <source>&amp;Network</source>
         <translation>&amp;Network</translation>
     </message>
@@ -1420,22 +1420,12 @@ Address: %4
         <translation>Choose the default subdivision unit to show in the interface and when sending coins.</translation>
     </message>
     <message>
-        <location line="+9"/>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Whether to show Bitcoin addresses in the transaction list or not.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Display addresses in transaction list</translation>
-    </message>
-    <message>
-        <location line="-252"/>
+        <location line="-240"/>
         <source>Whether to show coin control features or not.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+412"/>
+        <location line="+402"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
@@ -1455,7 +1445,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+83"/>
+        <location line="+82"/>
         <source>Confirm options reset</source>
         <translation>Confirm options reset</translation>
     </message>
@@ -3583,7 +3573,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3648,12 +3643,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
     </message>
@@ -3978,12 +3968,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Delete all wallet transactions and only recover those part of the blockchain through -rescan on startup</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4043,7 +4028,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+29"/>
+        <location line="+13"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin Core will not work properly.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
         <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4078,7 +4068,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+12"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4298,7 +4293,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Username for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Warning</source>
         <translation>Warning</translation>
     </message>
@@ -4393,17 +4393,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error loading wallet.dat: Wallet requires newer version of Bitcoin</translation>
-    </message>
-    <message>
-        <location line="+110"/>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Wallet needed to be rewritten: restart Bitcoin to complete</translation>
-    </message>
-    <message>
-        <location line="-112"/>
+        <location line="-1"/>
         <source>Error loading wallet.dat</source>
         <translation>Error loading wallet.dat</translation>
     </message>
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 6c3bd9a48dc9..4576786b965e 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -92,7 +92,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime)
                 if (!fMatch)
                 {
                     fDone = true;
-                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin will not work properly.");
+                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.");
                     strMiscWarning = strMessage;
                     LogPrintf("*** %s\n", strMessage);
                     uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);

From a5b2d9c82e985fa8df4457072b4fa30781f1d53a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 4 Jun 2014 12:06:18 +0200
Subject: [PATCH 0472/1819] [Qt] tweak new peers tab in console window

- remove starting height as table header and replace with ping time
- remove columnResizingFixer
- add local address (if available) in detailed node view (on top of the
  right view below the remote address)
- remove some .c_str() by using QString::fromStdString()
- rename Address to Address/Hostname
- rename secs to just s for ping time
- use MODEL_UPDATE_DELAY from guiconstants.h for the peer refresh time
- make PeerTableModel::columnCount() return no hard-coded value
- remove and cleanup dup private: section in RPCConsole header
- add new defaults for column sizes
- remove behaviour which keeps disconnected peers selected and also remove
  code which keeps track of last selected peer stats
- add sync height to detail view
- add some additional NULL pointer checks for clientModel in
  rpcconsole.cpp
---
 src/qt/forms/rpcconsole.ui | 364 +++++++++++++++++++++++++------------
 src/qt/guiutil.cpp         |   5 +
 src/qt/guiutil.h           |   3 +
 src/qt/peertablemodel.cpp  |  64 +++----
 src/qt/peertablemodel.h    |   9 +-
 src/qt/rpcconsole.cpp      | 155 ++++++----------
 src/qt/rpcconsole.h        |  29 ++-
 7 files changed, 359 insertions(+), 270 deletions(-)

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 7158b65c2d30..b9b90aa84635 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -428,7 +428,7 @@
        </item>
       </layout>
      </widget>
-     <widget class="QWidget" name="tab">
+     <widget class="QWidget" name="tab_nettraffic">
       <attribute name="title">
        <string>&amp;Network Traffic</string>
       </attribute>
@@ -683,6 +683,19 @@
        <string>&amp;Peers</string>
       </attribute>
       <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="0" rowspan="2">
+        <widget class="QTableView" name="peerWidget">
+         <property name="horizontalScrollBarPolicy">
+          <enum>Qt::ScrollBarAlwaysOff</enum>
+         </property>
+         <property name="sortingEnabled">
+          <bool>true</bool>
+         </property>
+         <attribute name="horizontalHeaderHighlightSections">
+          <bool>false</bool>
+         </attribute>
+        </widget>
+       </item>
        <item row="0" column="1">
         <widget class="QLabel" name="peerHeading">
          <property name="sizePolicy">
@@ -691,262 +704,377 @@
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="text">
-          <string>Select a peer to view detailed information.</string>
+         <property name="minimumSize">
+          <size>
+           <width>300</width>
+           <height>32</height>
+          </size>
          </property>
-         <property name="margin">
-          <number>3</number>
+         <property name="font">
+          <font>
+           <pointsize>10</pointsize>
+          </font>
          </property>
-        </widget>
-       </item>
-       <item row="0" column="0" rowspan="2">
-        <widget class="QTableView" name="peerWidget">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
+         <property name="cursor">
+          <cursorShape>IBeamCursor</cursorShape>
          </property>
-         <property name="horizontalScrollBarPolicy">
-          <enum>Qt::ScrollBarAlwaysOff</enum>
+         <property name="text">
+          <string>Select a peer to view detailed information.</string>
          </property>
-         <property name="editTriggers">
-          <set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
+         <property name="alignment">
+          <set>Qt::AlignHCenter|Qt::AlignTop</set>
          </property>
-         <property name="sortingEnabled">
+         <property name="wordWrap">
           <bool>true</bool>
          </property>
+         <property name="textInteractionFlags">
+          <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+         </property>
         </widget>
        </item>
        <item row="1" column="1">
         <widget class="QWidget" name="detailWidget" native="true">
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
+         <property name="minimumSize">
+          <size>
+           <width>300</width>
+           <height>0</height>
+          </size>
          </property>
          <layout class="QGridLayout" name="gridLayout_3">
-          <property name="leftMargin">
-           <number>3</number>
-          </property>
-          <item row="12" column="0">
-           <widget class="QLabel" name="label_21">
+          <item row="0" column="0">
+           <widget class="QLabel" name="label_23">
             <property name="text">
-             <string>Version:</string>
+             <string>Direction</string>
             </property>
            </widget>
           </item>
-          <item row="11" column="1">
-           <widget class="QLabel" name="peerPingTime">
+          <item row="0" column="2">
+           <widget class="QLabel" name="peerDirection">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="5" column="0">
-           <widget class="QLabel" name="label_19">
+          <item row="1" column="0">
+           <widget class="QLabel" name="label_21">
             <property name="text">
-             <string>Last Receive:</string>
+             <string>Version</string>
             </property>
            </widget>
           </item>
-          <item row="14" column="0">
-           <widget class="QLabel" name="label_28">
+          <item row="1" column="2">
+           <widget class="QLabel" name="peerVersion">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
-             <string>User Agent:</string>
+             <string>N/A</string>
+            </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
             </property>
            </widget>
           </item>
-          <item row="12" column="1">
-           <widget class="QLabel" name="peerVersion">
+          <item row="2" column="0">
+           <widget class="QLabel" name="label_28">
             <property name="text">
-             <string>N/A</string>
+             <string>User Agent</string>
             </property>
            </widget>
           </item>
-          <item row="8" column="1">
-           <widget class="QLabel" name="peerConnTime">
-            <property name="minimumSize">
-             <size>
-              <width>160</width>
-              <height>0</height>
-             </size>
+          <item row="2" column="2">
+           <widget class="QLabel" name="peerSubversion">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
             </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="11" column="0">
-           <widget class="QLabel" name="label_26">
+          <item row="3" column="0">
+           <widget class="QLabel" name="label_4">
             <property name="text">
-             <string>Ping Time:</string>
+             <string>Services</string>
             </property>
            </widget>
           </item>
-          <item row="5" column="1">
-           <widget class="QLabel" name="peerLastRecv">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+          <item row="3" column="2">
+           <widget class="QLabel" name="peerServices">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
             </property>
             <property name="text">
              <string>N/A</string>
             </property>
-           </widget>
-          </item>
-          <item row="8" column="0">
-           <widget class="QLabel" name="label_22">
-            <property name="text">
-             <string>Connection Time:</string>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
             </property>
            </widget>
           </item>
-          <item row="6" column="1">
-           <widget class="QLabel" name="peerBytesSent">
+          <item row="4" column="0">
+           <widget class="QLabel" name="label_25">
             <property name="text">
-             <string>N/A</string>
+             <string>Sync Node</string>
             </property>
            </widget>
           </item>
-          <item row="14" column="1">
-           <widget class="QLabel" name="peerSubversion">
+          <item row="4" column="2">
+           <widget class="QLabel" name="peerSyncNode">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="15" column="0">
+          <item row="5" column="0">
            <widget class="QLabel" name="label_29">
             <property name="text">
-             <string>Starting Height:</string>
+             <string>Starting Height</string>
             </property>
            </widget>
           </item>
-          <item row="7" column="1">
-           <widget class="QLabel" name="peerBytesRecv">
+          <item row="5" column="2">
+           <widget class="QLabel" name="peerHeight">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
           <item row="6" column="0">
-           <widget class="QLabel" name="label_18">
+           <widget class="QLabel" name="label_27">
             <property name="text">
-             <string>Bytes Sent:</string>
+             <string>Sync Height</string>
+            </property>
+           </widget>
+          </item>
+          <item row="6" column="2">
+           <widget class="QLabel" name="peerSyncHeight">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
+            <property name="text">
+             <string>N/A</string>
+            </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
             </property>
            </widget>
           </item>
           <item row="7" column="0">
-           <widget class="QLabel" name="label_20">
+           <widget class="QLabel" name="label_24">
             <property name="text">
-             <string>Bytes Received:</string>
+             <string>Ban Score</string>
             </property>
            </widget>
           </item>
-          <item row="15" column="1">
-           <widget class="QLabel" name="peerHeight">
+          <item row="7" column="2">
+           <widget class="QLabel" name="peerBanScore">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="16" column="0">
-           <widget class="QLabel" name="label_24">
+          <item row="8" column="0">
+           <widget class="QLabel" name="label_22">
             <property name="text">
-             <string>Ban Score:</string>
+             <string>Connection Time</string>
             </property>
            </widget>
           </item>
-          <item row="16" column="1">
-           <widget class="QLabel" name="peerBanScore">
+          <item row="8" column="2">
+           <widget class="QLabel" name="peerConnTime">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="17" column="0">
-           <widget class="QLabel" name="label_23">
+          <item row="9" column="0">
+           <widget class="QLabel" name="label_15">
             <property name="text">
-             <string>Direction:</string>
+             <string>Last Send</string>
             </property>
            </widget>
           </item>
-          <item row="17" column="1">
-           <widget class="QLabel" name="peerDirection">
+          <item row="9" column="2">
+           <widget class="QLabel" name="peerLastSend">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="19" column="0">
-           <widget class="QLabel" name="label_25">
+          <item row="10" column="0">
+           <widget class="QLabel" name="label_19">
             <property name="text">
-             <string>Sync Node:</string>
+             <string>Last Receive</string>
             </property>
            </widget>
           </item>
-          <item row="19" column="1">
-           <widget class="QLabel" name="peerSyncNode">
+          <item row="10" column="2">
+           <widget class="QLabel" name="peerLastRecv">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="3" column="0">
-           <widget class="QLabel" name="label_15">
+          <item row="11" column="0">
+           <widget class="QLabel" name="label_18">
             <property name="text">
-             <string>Last Send:</string>
+             <string>Bytes Sent</string>
             </property>
            </widget>
           </item>
-          <item row="2" column="0">
-           <widget class="QLabel" name="label_4">
+          <item row="11" column="2">
+           <widget class="QLabel" name="peerBytesSent">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
-             <string>Services:</string>
+             <string>N/A</string>
+            </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
             </property>
            </widget>
           </item>
-          <item row="1" column="0">
-           <widget class="QLabel" name="label_27">
+          <item row="12" column="0">
+           <widget class="QLabel" name="label_20">
             <property name="text">
-             <string>IP Address/port:</string>
+             <string>Bytes Received</string>
             </property>
            </widget>
           </item>
-          <item row="3" column="1">
-           <widget class="QLabel" name="peerLastSend">
+          <item row="12" column="2">
+           <widget class="QLabel" name="peerBytesRecv">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="2" column="1">
-           <widget class="QLabel" name="peerServices">
+          <item row="13" column="0">
+           <widget class="QLabel" name="label_26">
             <property name="text">
-             <string>N/A</string>
+             <string>Ping Time</string>
             </property>
            </widget>
           </item>
-          <item row="1" column="1">
-           <widget class="QLabel" name="peerAddr">
+          <item row="13" column="2">
+           <widget class="QLabel" name="peerPingTime">
+            <property name="cursor">
+             <cursorShape>IBeamCursor</cursorShape>
+            </property>
             <property name="text">
              <string>N/A</string>
             </property>
+            <property name="textFormat">
+             <enum>Qt::PlainText</enum>
+            </property>
+            <property name="textInteractionFlags">
+             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+            </property>
            </widget>
           </item>
-          <item row="20" column="0">
-           <widget class="QWidget" name="widget" native="true">
-            <property name="sizePolicy">
-             <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
+          <item row="14" column="1">
+           <spacer name="verticalSpacer_3">
+            <property name="orientation">
+             <enum>Qt::Vertical</enum>
             </property>
-           </widget>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>20</width>
+              <height>40</height>
+             </size>
+            </property>
+           </spacer>
           </item>
          </layout>
         </widget>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 33a50a078dad..6258c4160c7f 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -804,4 +804,9 @@ QString formatServicesStr(uint64_t mask)
         return QObject::tr("None");
 }
 
+QString formatPingTime(double dPingTime)
+{
+    return dPingTime == 0 ? QObject::tr("N/A") : QString(QObject::tr("%1 s")).arg(QString::number(dPingTime, 'f', 3));
+}
+
 } // namespace GUIUtil
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 45c78b4e1475..dd31d051ee98 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -178,6 +178,9 @@ namespace GUIUtil
 
     /* Format CNodeStats.nServices bitmask into a user-readable string */
     QString formatServicesStr(uint64_t mask);
+
+    /* Format a CNodeCombinedStats.dPingTime into a user-readable string or display N/A, if 0*/
+    QString formatPingTime(double dPingTime);
 } // namespace GUIUtil
 
 #endif // GUIUTIL_H
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 981d063c4990..4c650bdec91e 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -5,6 +5,8 @@
 #include "peertablemodel.h"
 
 #include "clientmodel.h"
+#include "guiconstants.h"
+#include "guiutil.h"
 
 #include "net.h"
 #include "sync.h"
@@ -15,8 +17,8 @@
 
 bool NodeLessThan::operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const
 {
-    const CNodeStats *pLeft = &(left.nodestats);
-    const CNodeStats *pRight = &(right.nodestats);
+    const CNodeStats *pLeft = &(left.nodeStats);
+    const CNodeStats *pRight = &(right.nodeStats);
 
     if (order == Qt::DescendingOrder)
         std::swap(pLeft, pRight);
@@ -27,8 +29,8 @@ bool NodeLessThan::operator()(const CNodeCombinedStats &left, const CNodeCombine
         return pLeft->addrName.compare(pRight->addrName) < 0;
     case PeerTableModel::Subversion:
         return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0;
-    case PeerTableModel::Height:
-        return pLeft->nStartingHeight < pRight->nStartingHeight;
+    case PeerTableModel::Ping:
+        return pLeft->dPingTime < pRight->dPingTime;
     }
 
     return false;
@@ -48,7 +50,8 @@ class PeerTablePriv
     std::map<NodeId, int> mapNodeRows;
 
     /** Pull a full list of peers from vNodes into our cache */
-    void refreshPeers() {
+    void refreshPeers()
+    {
         {
             TRY_LOCK(cs_vNodes, lockNodes);
             if (!lockNodes)
@@ -63,23 +66,17 @@ class PeerTablePriv
             BOOST_FOREACH(CNode* pnode, vNodes)
             {
                 CNodeCombinedStats stats;
-                stats.statestats.nMisbehavior = -1;
-                pnode->copyStats(stats.nodestats);
+                stats.nodeStateStats.nMisbehavior = 0;
+                stats.nodeStateStats.nSyncHeight = -1;
+                stats.fNodeStateStatsAvailable = false;
+                pnode->copyStats(stats.nodeStats);
                 cachedNodeStats.append(stats);
             }
         }
 
-        // if we can, retrieve the CNodeStateStats for each node.
-        {
-            TRY_LOCK(cs_main, lockMain);
-            if (lockMain)
-            {
-                BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
-                {
-                    GetNodeStateStats(stats.nodestats.nodeid, stats.statestats);
-                }
-            }
-        }
+        // Try to retrieve the CNodeStateStats for each node.
+        BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
+            stats.fNodeStateStatsAvailable = GetNodeStateStats(stats.nodeStats.nodeid, stats.nodeStateStats);
 
         if (sortColumn >= 0)
             // sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily)
@@ -89,9 +86,7 @@ class PeerTablePriv
         mapNodeRows.clear();
         int row = 0;
         BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
-        {
-            mapNodeRows.insert(std::pair<NodeId, int>(stats.nodestats.nodeid, row++));
-        }
+            mapNodeRows.insert(std::pair<NodeId, int>(stats.nodeStats.nodeid, row++));
     }
 
     int size()
@@ -103,18 +98,18 @@ class PeerTablePriv
     {
         if(idx >= 0 && idx < cachedNodeStats.size()) {
             return &cachedNodeStats[idx];
-        }
-        else
-        {
+        } else {
             return 0;
         }
     }
 };
 
 PeerTableModel::PeerTableModel(ClientModel *parent) :
-    QAbstractTableModel(parent),clientModel(parent),timer(0)
+    QAbstractTableModel(parent),
+    clientModel(parent),
+    timer(0)
 {
-    columns << tr("Address") << tr("User Agent") << tr("Start Height");
+    columns << tr("Address/Hostname") << tr("User Agent") << tr("Ping Time");
     priv = new PeerTablePriv();
     // default to unsorted
     priv->sortColumn = -1;
@@ -122,14 +117,14 @@ PeerTableModel::PeerTableModel(ClientModel *parent) :
     // set up timer for auto refresh
     timer = new QTimer();
     connect(timer, SIGNAL(timeout()), SLOT(refresh()));
+    timer->setInterval(MODEL_UPDATE_DELAY);
 
     // load initial data
     refresh();
 }
 
-void PeerTableModel::startAutoRefresh(int msecs)
+void PeerTableModel::startAutoRefresh()
 {
-    timer->setInterval(1000);
     timer->start();
 }
 
@@ -147,7 +142,7 @@ int PeerTableModel::rowCount(const QModelIndex &parent) const
 int PeerTableModel::columnCount(const QModelIndex &parent) const
 {
     Q_UNUSED(parent);
-    return 3;
+    return columns.length();;
 }
 
 QVariant PeerTableModel::data(const QModelIndex &index, int role) const
@@ -162,11 +157,11 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
         switch(index.column())
         {
         case Address:
-            return QVariant(rec->nodestats.addrName.c_str());
+            return QString::fromStdString(rec->nodeStats.addrName);
         case Subversion:
-            return QVariant(rec->nodestats.cleanSubVer.c_str());
-        case Height:
-            return rec->nodestats.nStartingHeight;
+            return QString::fromStdString(rec->nodeStats.cleanSubVer);
+        case Ping:
+            return GUIUtil::formatPingTime(rec->nodeStats.dPingTime);
         }
     }
     return QVariant();
@@ -208,7 +203,8 @@ QModelIndex PeerTableModel::index(int row, int column, const QModelIndex &parent
     }
 }
 
-const CNodeCombinedStats *PeerTableModel::getNodeStats(int idx) {
+const CNodeCombinedStats *PeerTableModel::getNodeStats(int idx)
+{
     return priv->index(idx);
 }
 
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index 385bf0e0c189..38f2662f8931 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -19,8 +19,9 @@ class QTimer;
 QT_END_NAMESPACE
 
 struct CNodeCombinedStats {
-    CNodeStats nodestats;
-    CNodeStateStats statestats;
+    CNodeStats nodeStats;
+    CNodeStateStats nodeStateStats;
+    bool fNodeStateStatsAvailable;
 };
 
 class NodeLessThan
@@ -47,13 +48,13 @@ class PeerTableModel : public QAbstractTableModel
     explicit PeerTableModel(ClientModel *parent = 0);
     const CNodeCombinedStats *getNodeStats(int idx);
     int getRowByNodeId(NodeId nodeid);
-    void startAutoRefresh(int msecs);
+    void startAutoRefresh();
     void stopAutoRefresh();
 
     enum ColumnIndex {
         Address = 0,
         Subversion = 1,
-        Height = 2
+        Ping = 2
     };
 
     /** @name Methods overridden from QAbstractTableModel
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 9b67f8125f17..11089b24971b 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -10,6 +10,7 @@
 #include "peertablemodel.h"
 
 #include "main.h"
+#include "chainparams.h"
 #include "rpcserver.h"
 #include "rpcclient.h"
 #include "util.h"
@@ -200,12 +201,9 @@ RPCConsole::RPCConsole(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::RPCConsole),
     clientModel(0),
-    historyPtr(0)
+    historyPtr(0),
+    cachedNodeid(-1)
 {
-    detailNodeStats = CNodeCombinedStats();
-    detailNodeStats.nodestats.nodeid = -1;
-    detailNodeStats.statestats.nMisbehavior = -1;
-
     ui->setupUi(this);
     GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
 
@@ -233,6 +231,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
     setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
 
     ui->detailWidget->hide();
+    ui->peerHeading->setText(tr("Select a peer to view detailed information."));
 
     clear();
 }
@@ -303,11 +302,11 @@ void RPCConsole::setClientModel(ClientModel *model)
         ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
         ui->peerWidget->setSelectionMode(QAbstractItemView::SingleSelection);
         ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);
-        columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(ui->peerWidget, MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH);
+        ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
+        ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
 
-        // connect the peerWidget's selection model to our peerSelected() handler
-        QItemSelectionModel *peerSelectModel = ui->peerWidget->selectionModel();
-        connect(peerSelectModel, SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
+        // connect the peerWidget selection model to our peerSelected() handler
+        connect(ui->peerWidget->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
              this, SLOT(peerSelected(const QItemSelection &, const QItemSelection &)));
         connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged()));
 
@@ -473,10 +472,6 @@ void RPCConsole::on_tabWidget_currentChanged(int index)
     {
         ui->lineEdit->setFocus();
     }
-    else if(ui->tabWidget->widget(index) == ui->tab_peers)
-    {
-        initPeerTable();
-    }
 }
 
 void RPCConsole::on_openDebugLogfileButton_clicked()
@@ -525,30 +520,24 @@ void RPCConsole::peerSelected(const QItemSelection &selected, const QItemSelecti
 {
     Q_UNUSED(deselected);
 
-    if (selected.indexes().isEmpty())
+    if (!clientModel || selected.indexes().isEmpty())
         return;
 
-    // mark the cached banscore as unknown
-    detailNodeStats.statestats.nMisbehavior = -1;
-
     const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(selected.indexes().first().row());
-
     if (stats)
-    {
-        detailNodeStats.nodestats.nodeid = stats->nodestats.nodeid;
         updateNodeDetail(stats);
-        ui->detailWidget->show();
-        ui->detailWidget->setDisabled(false);
-    }
 }
 
 void RPCConsole::peerLayoutChanged()
 {
+    if (!clientModel)
+        return;
+
     const CNodeCombinedStats *stats = NULL;
-    bool fUnselect = false, fReselect = false, fDisconnected = false;
+    bool fUnselect = false;
+    bool fReselect = false;
 
-    if (detailNodeStats.nodestats.nodeid == -1)
-        // no node selected yet
+    if (cachedNodeid == -1) // no node selected yet
         return;
 
     // find the currently selected row
@@ -561,14 +550,15 @@ void RPCConsole::peerLayoutChanged()
 
     // check if our detail node has a row in the table (it may not necessarily
     // be at selectedRow since its position can change after a layout change)
-    int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(detailNodeStats.nodestats.nodeid);
+    int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeid);
 
     if (detailNodeRow < 0)
     {
         // detail node dissapeared from table (node disconnected)
         fUnselect = true;
-        fDisconnected = true;
-        detailNodeStats.nodestats.nodeid = 0;
+        cachedNodeid = -1;
+        ui->detailWidget->hide();
+        ui->peerHeading->setText(tr("Select a peer to view detailed information."));
     }
     else
     {
@@ -596,91 +586,64 @@ void RPCConsole::peerLayoutChanged()
 
     if (stats)
         updateNodeDetail(stats);
-
-    if (fDisconnected)
-    {
-        ui->peerHeading->setText(QString(tr("Peer Disconnected")));
-        ui->detailWidget->setDisabled(true);
-        QDateTime dt = QDateTime::fromTime_t(detailNodeStats.nodestats.nLastSend);
-        if (detailNodeStats.nodestats.nLastSend)
-            ui->peerLastSend->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
-        dt.setTime_t(detailNodeStats.nodestats.nLastRecv);
-        if (detailNodeStats.nodestats.nLastRecv)
-            ui->peerLastRecv->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
-        dt.setTime_t(detailNodeStats.nodestats.nTimeConnected);
-        ui->peerConnTime->setText(dt.toString("yyyy-MM-dd hh:mm:ss"));
-    }
 }
 
-void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats)
+void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
 {
-    CNodeStats stats = combinedStats->nodestats;
-
-    // keep a copy of timestamps, used to display dates upon disconnect
-    detailNodeStats.nodestats.nLastSend = stats.nLastSend;
-    detailNodeStats.nodestats.nLastRecv = stats.nLastRecv;
-    detailNodeStats.nodestats.nTimeConnected = stats.nTimeConnected;
+    // Update cached nodeid
+    cachedNodeid = stats->nodeStats.nodeid;
 
     // update the detail ui with latest node information
-    ui->peerHeading->setText(QString("<b>%1</b>").arg(tr("Node Detail")));
-    ui->peerAddr->setText(QString(stats.addrName.c_str()));
-    ui->peerServices->setText(GUIUtil::formatServicesStr(stats.nServices));
-    ui->peerLastSend->setText(stats.nLastSend ? GUIUtil::formatDurationStr(GetTime() - stats.nLastSend) : tr("never"));
-    ui->peerLastRecv->setText(stats.nLastRecv ? GUIUtil::formatDurationStr(GetTime() - stats.nLastRecv) : tr("never"));
-    ui->peerBytesSent->setText(FormatBytes(stats.nSendBytes));
-    ui->peerBytesRecv->setText(FormatBytes(stats.nRecvBytes));
-    ui->peerConnTime->setText(GUIUtil::formatDurationStr(GetTime() - stats.nTimeConnected));
-    ui->peerPingTime->setText(stats.dPingTime == 0 ? tr("N/A") : QString(tr("%1 secs")).arg(QString::number(stats.dPingTime, 'f', 3)));
-    ui->peerVersion->setText(QString("%1").arg(stats.nVersion));
-    ui->peerSubversion->setText(QString(stats.cleanSubVer.c_str()));
-    ui->peerDirection->setText(stats.fInbound ? tr("Inbound") : tr("Outbound"));
-    ui->peerHeight->setText(QString("%1").arg(stats.nStartingHeight));
-    ui->peerSyncNode->setText(stats.fSyncNode ? tr("Yes") : tr("No"));
-
-    // if we can, display the peer's ban score
-    CNodeStateStats statestats = combinedStats->statestats;
-    if (statestats.nMisbehavior >= 0)
-    {
-        // we have a new nMisbehavor value - update the cache
-        detailNodeStats.statestats.nMisbehavior = statestats.nMisbehavior;
-    }
-
-    // pull the ban score from cache.  -1 means it hasn't been retrieved yet (lock busy).
-    if (detailNodeStats.statestats.nMisbehavior >= 0)
-        ui->peerBanScore->setText(QString("%1").arg(detailNodeStats.statestats.nMisbehavior));
-    else
+    QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName));
+    if (!stats->nodeStats.addrLocal.empty())
+        peerAddrDetails += "<br />" + tr("via %1").arg(QString::fromStdString(stats->nodeStats.addrLocal));
+    ui->peerHeading->setText(peerAddrDetails);
+    ui->peerServices->setText(GUIUtil::formatServicesStr(stats->nodeStats.nServices));
+    ui->peerLastSend->setText(stats->nodeStats.nLastSend ? GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nLastSend) : tr("never"));
+    ui->peerLastRecv->setText(stats->nodeStats.nLastRecv ? GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nLastRecv) : tr("never"));
+    ui->peerBytesSent->setText(FormatBytes(stats->nodeStats.nSendBytes));
+    ui->peerBytesRecv->setText(FormatBytes(stats->nodeStats.nRecvBytes));
+    ui->peerConnTime->setText(GUIUtil::formatDurationStr(GetTime() - stats->nodeStats.nTimeConnected));
+    ui->peerPingTime->setText(GUIUtil::formatPingTime(stats->nodeStats.dPingTime));
+    ui->peerVersion->setText(QString("%1").arg(stats->nodeStats.nVersion));
+    ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
+    ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
+    ui->peerHeight->setText(QString("%1").arg(stats->nodeStats.nStartingHeight));
+    ui->peerSyncNode->setText(stats->nodeStats.fSyncNode ? tr("Yes") : tr("No"));
+
+    // This check fails for example if the lock was busy and
+    // nodeStateStats couldn't be fetched.
+    if (stats->fNodeStateStatsAvailable) {
+        // Ban score is init to 0
+        ui->peerBanScore->setText(QString("%1").arg(stats->nodeStateStats.nMisbehavior));
+
+        // Sync height is init to -1
+        if (stats->nodeStateStats.nSyncHeight > -1)
+            ui->peerSyncHeight->setText(QString("%1").arg(stats->nodeStateStats.nSyncHeight));
+        else
+            ui->peerSyncHeight->setText(tr("Unknown"));
+    } else {
         ui->peerBanScore->setText(tr("Fetching..."));
-}
-
-void RPCConsole::initPeerTable()
-{
-    if (!clientModel)
-        return;
-
-    // peerWidget needs a resize in case the dialog has non-default geometry
-    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
+        ui->peerSyncHeight->setText(tr("Fetching..."));
+    }
 
-    // start PeerTableModel auto refresh
-    clientModel->getPeerTableModel()->startAutoRefresh(1000);
+    ui->detailWidget->show();
 }
 
-// We override the virtual resizeEvent of the QWidget to adjust tables column
-// sizes as the tables width is proportional to the dialogs width.
 void RPCConsole::resizeEvent(QResizeEvent *event)
 {
     QWidget::resizeEvent(event);
-
-    if (!clientModel)
-        return;
-
-    columnResizingFixer->stretchColumnWidth(PeerTableModel::Address);
 }
 
 void RPCConsole::showEvent(QShowEvent *event)
 {
     QWidget::showEvent(event);
 
-    initPeerTable();
+    if (!clientModel)
+        return;
+
+    // start PeerTableModel auto refresh
+    clientModel->getPeerTableModel()->startAutoRefresh();
 }
 
 void RPCConsole::hideEvent(QHideEvent *event)
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 94672b30cc09..64bb5c29b323 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -44,21 +44,6 @@ class RPCConsole: public QDialog
 protected:
     virtual bool eventFilter(QObject* obj, QEvent *event);
 
-private:
-    /** show detailed information on ui about selected node */
-    void updateNodeDetail(const CNodeCombinedStats *combinedStats);
-    /** initialize peer table */
-    void initPeerTable();
-
-    enum ColumnWidths
-    {
-        ADDRESS_COLUMN_WIDTH = 250,
-        MINIMUM_COLUMN_WIDTH = 120
-    };
-
-    /** track the node that we are currently viewing detail on in the peers tab */
-    CNodeCombinedStats detailNodeStats;
-
 private slots:
     void on_lineEdit_returnPressed();
     void on_tabWidget_currentChanged(int index);
@@ -96,15 +81,23 @@ public slots:
 
 private:
     static QString FormatBytes(quint64 bytes);
+    void startExecutor();
     void setTrafficGraphRange(int mins);
+    /** show detailed information on ui about selected node */
+    void updateNodeDetail(const CNodeCombinedStats *stats);
+
+    enum ColumnWidths
+    {
+        ADDRESS_COLUMN_WIDTH = 200,
+        SUBVERSION_COLUMN_WIDTH = 100,
+        PING_COLUMN_WIDTH = 80
+    };
 
     Ui::RPCConsole *ui;
     ClientModel *clientModel;
     QStringList history;
-    GUIUtil::TableViewLastColumnResizingFixer *columnResizingFixer;
     int historyPtr;
-
-    void startExecutor();
+    NodeId cachedNodeid;
 };
 
 #endif // RPCCONSOLE_H

From 488a61643908e8e872326a79e1143d1f377d412b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 4 Aug 2014 16:41:42 +0200
Subject: [PATCH 0473/1819] qt: Demote ReportInvalidCertificate message to
 qDebug

Too spammy.
---
 src/qt/paymentserver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 76fd2733a52a..a9f1566d62bf 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -90,7 +90,7 @@ static QList<QString> savedPaymentRequests;
 
 static void ReportInvalidCertificate(const QSslCertificate& cert)
 {
-    qWarning() << "ReportInvalidCertificate : Payment server found an invalid certificate: " << cert.subjectInfo(QSslCertificate::CommonName);
+    qDebug() << "ReportInvalidCertificate : Payment server found an invalid certificate: " << cert.subjectInfo(QSslCertificate::CommonName);
 }
 
 //

From 70b9d36a2c7b900a80323e33ddc06b14d28fe538 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Thu, 31 Jul 2014 11:43:50 -0400
Subject: [PATCH 0474/1819] Log "version" message IP addresses in client
 connect summary

The only other method of logging remote addresses is via

     -logips=1 -debug=net

which increases the logged activity by 100x or more.

Github-Pull: #4608
Amended-By: Wladimir J. van der Laan <laanwj@gmail.com>
---
 src/main.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index cf9318fedf71..ba521b6b19f2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3628,7 +3628,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         pfrom->fSuccessfullyConnected = true;
 
-        LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), pfrom->id);
+        string remoteAddr;
+        if (fLogIPs)
+            remoteAddr = ", peeraddr=" + pfrom->addr.ToString();
+
+        LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
+                  pfrom->cleanSubVer, pfrom->nVersion,
+                  pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
+                  remoteAddr);
 
         AddTimeData(pfrom->addr, nTime);
     }

From ead6737b87ee238aa0c7f81f9186c62f15ab8d67 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 4 Aug 2014 16:25:21 +0200
Subject: [PATCH 0475/1819] [Qt] format ping times in peers tab as ms

- also align ping times to the right
---
 src/qt/guiutil.cpp        | 2 +-
 src/qt/peertablemodel.cpp | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 6258c4160c7f..ed8390960869 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -806,7 +806,7 @@ QString formatServicesStr(uint64_t mask)
 
 QString formatPingTime(double dPingTime)
 {
-    return dPingTime == 0 ? QObject::tr("N/A") : QString(QObject::tr("%1 s")).arg(QString::number(dPingTime, 'f', 3));
+    return dPingTime == 0 ? QObject::tr("N/A") : QString(QObject::tr("%1 ms")).arg(QString::number((int)(dPingTime * 1000), 10));
 }
 
 } // namespace GUIUtil
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 4c650bdec91e..54b46867eade 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -152,8 +152,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
 
     CNodeCombinedStats *rec = static_cast<CNodeCombinedStats*>(index.internalPointer());
 
-    if(role == Qt::DisplayRole)
-    {
+    if (role == Qt::DisplayRole) {
         switch(index.column())
         {
         case Address:
@@ -163,7 +162,11 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
         case Ping:
             return GUIUtil::formatPingTime(rec->nodeStats.dPingTime);
         }
+    } else if (role == Qt::TextAlignmentRole) {
+        if (index.column() == Ping)
+            return (int)(Qt::AlignRight | Qt::AlignVCenter);
     }
+
     return QVariant();
 }
 

From a409467e1416098ccb4a70b80a1ef3a5bde7519a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 4 Aug 2014 21:09:38 +0200
Subject: [PATCH 0476/1819] more Bitcoin -> Bitcoin Core string changes

---
 src/qt/bitcoin.cpp    | 6 +++---
 src/qt/bitcoingui.cpp | 6 +++---
 src/qt/intro.cpp      | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 7bf531f53805..ea706d9f2565 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -531,14 +531,14 @@ int main(int argc, char *argv[])
     /// - Do not call GetDataDir(true) before this step finishes
     if (!boost::filesystem::is_directory(GetDataDir(false)))
     {
-        QMessageBox::critical(0, QObject::tr("Bitcoin"),
+        QMessageBox::critical(0, QObject::tr("Bitcoin Core"),
                               QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
         return 1;
     }
     try {
         ReadConfigFile(mapArgs, mapMultiArgs);
     } catch(std::exception &e) {
-        QMessageBox::critical(0, QObject::tr("Bitcoin"),
+        QMessageBox::critical(0, QObject::tr("Bitcoin Core"),
                               QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
         return false;
     }
@@ -551,7 +551,7 @@ int main(int argc, char *argv[])
 
     // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
     if (!SelectParamsFromCommandLine()) {
-        QMessageBox::critical(0, QObject::tr("Bitcoin"), QObject::tr("Error: Invalid combination of -regtest and -testnet."));
+        QMessageBox::critical(0, QObject::tr("Bitcoin Core"), QObject::tr("Error: Invalid combination of -regtest and -testnet."));
         return 1;
     }
 #ifdef ENABLE_WALLET
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 5fc2f500b5e1..e3257e859cad 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -272,7 +272,7 @@ void BitcoinGUI::createActions(bool fIsTestnet)
         aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Bitcoin Core"), this);
     else
         aboutAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&About Bitcoin Core"), this);
-    aboutAction->setStatusTip(tr("Show information about Bitcoin"));
+    aboutAction->setStatusTip(tr("Show information about Bitcoin Core"));
     aboutAction->setMenuRole(QAction::AboutRole);
 #if QT_VERSION < 0x050000
     aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
@@ -478,12 +478,12 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
 
     if (!fIsTestnet)
     {
-        trayIcon->setToolTip(tr("Bitcoin client"));
+        trayIcon->setToolTip(tr("Bitcoin Core client"));
         trayIcon->setIcon(QIcon(":/icons/toolbar"));
     }
     else
     {
-        trayIcon->setToolTip(tr("Bitcoin client") + " " + tr("[testnet]"));
+        trayIcon->setToolTip(tr("Bitcoin Core client") + " " + tr("[testnet]"));
         trayIcon->setIcon(QIcon(":/icons/toolbar_testnet"));
     }
 
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 13c260b7db3a..d469c9a0bd60 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -181,7 +181,7 @@ void Intro::pickDataDirectory()
                 TryCreateDirectory(GUIUtil::qstringToBoostPath(dataDir));
                 break;
             } catch(fs::filesystem_error &e) {
-                QMessageBox::critical(0, tr("Bitcoin"),
+                QMessageBox::critical(0, tr("Bitcoin Core"),
                     tr("Error: Specified data directory \"%1\" cannot be created.").arg(dataDir));
                 /* fall through, back to choosing screen */
             }

From 9ce0774aba7004c3f633fd57ed6707e759a9c7a9 Mon Sep 17 00:00:00 2001
From: ntrgn <ntrgnt@gmail.com>
Date: Tue, 5 Aug 2014 00:59:28 +0200
Subject: [PATCH 0477/1819] build: Fix windows configure when using
 --with-qt-libdir

fixes #4630

Github-Pull: #4633
---
 src/m4/bitcoin_qt.m4 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 9356aac37fbc..5017742cc207 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -357,6 +357,11 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
   ])
 
   BITCOIN_QT_CHECK([
+    LIBS=
+    if test x$qt_lib_path != x; then
+      LIBS="$LIBS -L$qt_lib_path"
+    fi
+
     if test x$TARGET_OS == xwindows; then
       AC_CHECK_LIB([imm32],      [main],, BITCOIN_QT_FAIL(libimm32 not found))
     fi

From e17151ad2a45599e8cad90552ffcd979730b7a32 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 6 Aug 2014 13:01:49 +0200
Subject: [PATCH 0478/1819] Avoid a copy in RPC output

Split up HTTPReply into HTTPReply and HTTPReplyHeader, so that
the message data can be streamed directly.

Also removes a c_str(), which would have prevented binary
output with NUL characters in it.
---
 src/rpcprotocol.cpp | 23 +++++++++++++++--------
 src/rpcprotocol.h   |  2 ++
 src/rpcserver.cpp   |  2 +-
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 9e18ca847e4e..48c6c68eb18c 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -93,8 +93,7 @@ string HTTPError(int nStatus, bool keepalive, bool headersOnly)
                      headersOnly, "text/plain");
 }
 
-string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
-                 bool headersOnly, const char *contentType)
+string HTTPReplyHeader(int nStatus, bool keepalive, size_t contentLength, const char *contentType)
 {
     return strprintf(
             "HTTP/1.1 %d %s\r\n"
@@ -103,17 +102,25 @@ string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
             "Content-Length: %u\r\n"
             "Content-Type: %s\r\n"
             "Server: bitcoin-json-rpc/%s\r\n"
-            "\r\n"
-            "%s",
+            "\r\n",
         nStatus,
         httpStatusDescription(nStatus),
         rfc1123Time(),
         keepalive ? "keep-alive" : "close",
-        (headersOnly ? 0 : strMsg.size()),
+        contentLength,
         contentType,
-        FormatFullVersion(),
-        (headersOnly ? "" : strMsg.c_str())
-        );
+        FormatFullVersion());
+}
+
+string HTTPReply(int nStatus, const string& strMsg, bool keepalive,
+                 bool headersOnly, const char *contentType)
+{
+    if (headersOnly)
+    {
+        return HTTPReplyHeader(nStatus, keepalive, 0, contentType);
+    } else {
+        return HTTPReplyHeader(nStatus, keepalive, strMsg.size(), contentType) + strMsg;
+    }
 }
 
 bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 5627077bfbf4..a088c379d346 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -143,6 +143,8 @@ class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidi
 std::string HTTPPost(const std::string& strMsg, const std::map<std::string,std::string>& mapRequestHeaders);
 std::string HTTPError(int nStatus, bool keepalive,
                       bool headerOnly = false);
+std::string HTTPReplyHeader(int nStatus, bool keepalive, size_t contentLength,
+                      const char *contentType = "application/json");
 std::string HTTPReply(int nStatus, const std::string& strMsg, bool keepalive,
                       bool headerOnly = false,
                       const char *contentType = "application/json");
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 716a7fba6a4b..d9a664dc54d0 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -862,7 +862,7 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
         else
             throw JSONRPCError(RPC_PARSE_ERROR, "Top-level object parse error");
 
-        conn->stream() << HTTPReply(HTTP_OK, strReply, fRun) << std::flush;
+        conn->stream() << HTTPReplyHeader(HTTP_OK, fRun, strReply.size()) << strReply << std::flush;
     }
     catch (Object& objError)
     {

From 733177ebd3ecf3a03c2acb6b244c8b3d1b4a3981 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 6 Aug 2014 13:03:58 +0200
Subject: [PATCH 0479/1819] Remove size limit in RPC client, keep it in server

The size limit makes a lot of sense for the server, as it never has to
accept very large data.

The client, however, can request arbitrary amounts of data with
`listtransactions` on a large wallet.

Fixes #4604.
---
 src/bitcoin-cli.cpp | 2 +-
 src/rpcprotocol.cpp | 4 ++--
 src/rpcprotocol.h   | 2 +-
 src/rpcserver.cpp   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 3b991f9276b2..0609adcab3cb 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -126,7 +126,7 @@ Object CallRPC(const string& strMethod, const Array& params)
     // Receive HTTP reply message headers and body
     map<string, string> mapHeaders;
     string strReply;
-    ReadHTTPMessage(stream, mapHeaders, strReply, nProto);
+    ReadHTTPMessage(stream, mapHeaders, strReply, nProto, std::numeric_limits<size_t>::max());
 
     if (nStatus == HTTP_UNAUTHORIZED)
         throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 48c6c68eb18c..643208b3b674 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -201,14 +201,14 @@ int ReadHTTPHeaders(std::basic_istream<char>& stream, map<string, string>& mapHe
 
 int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
                     string>& mapHeadersRet, string& strMessageRet,
-                    int nProto)
+                    int nProto, size_t max_size)
 {
     mapHeadersRet.clear();
     strMessageRet = "";
 
     // Read header
     int nLen = ReadHTTPHeaders(stream, mapHeadersRet);
-    if (nLen < 0 || nLen > (int)MAX_SIZE)
+    if (nLen < 0 || (size_t)nLen > max_size)
         return HTTP_INTERNAL_SERVER_ERROR;
 
     // Read message
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index a088c379d346..8f05c08482f0 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -153,7 +153,7 @@ bool ReadHTTPRequestLine(std::basic_istream<char>& stream, int &proto,
 int ReadHTTPStatus(std::basic_istream<char>& stream, int &proto);
 int ReadHTTPHeaders(std::basic_istream<char>& stream, std::map<std::string, std::string>& mapHeadersRet);
 int ReadHTTPMessage(std::basic_istream<char>& stream, std::map<std::string, std::string>& mapHeadersRet,
-                    std::string& strMessageRet, int nProto);
+                    std::string& strMessageRet, int nProto, size_t max_size);
 std::string JSONRPCRequest(const std::string& strMethod, const json_spirit::Array& params, const json_spirit::Value& id);
 json_spirit::Object JSONRPCReplyObj(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
 std::string JSONRPCReply(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index d9a664dc54d0..e7ed73310c36 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -891,7 +891,7 @@ void ServiceConnection(AcceptedConnection *conn)
             break;
 
         // Read HTTP message headers and body
-        ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto);
+        ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto, MAX_SIZE);
 
         // HTTP Keep-Alive is false; close connection immediately
         if (mapHeaders["connection"] == "close")

From e05d72055aee7937fc6e0cda8a25f4bde88a2a13 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 6 Aug 2014 16:11:45 +0200
Subject: [PATCH 0480/1819] qt: bitcoin_en update after 8d0d512

---
 src/qt/locale/bitcoin_en.ts | 175 +++++++++++++++++++-----------------
 1 file changed, 91 insertions(+), 84 deletions(-)

diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 2c95b5bba609..a527602b5a9d 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -331,12 +331,7 @@
         <translation>Quit application</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Show information about Bitcoin</source>
-        <translation>Show information about Bitcoin</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>About &amp;Qt</translation>
@@ -382,7 +377,13 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+329"/>
+        <location line="+168"/>
+        <location line="+5"/>
+        <source>Bitcoin Core client</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+156"/>
         <source>Importing blocks from disk...</source>
         <translation>Importing blocks from disk...</translation>
     </message>
@@ -447,7 +448,12 @@
         <translation>&amp;Receive</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="+33"/>
+        <source>Show information about Bitcoin Core</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
         <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Show / Hide</translation>
@@ -539,14 +545,8 @@
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+164"/>
-        <location line="+5"/>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin client</translation>
-    </message>
     <message numerus="yes">
-        <location line="+141"/>
+        <location line="+310"/>
         <source>%n active connection(s) to Bitcoin network</source>
         <translation>
             <numerusform>%n active connection to Bitcoin network</numerusform>
@@ -1159,8 +1159,8 @@ Address: %4
     </message>
     <message>
         <location filename="../intro.cpp" line="+82"/>
-        <source>Bitcoin</source>
-        <translation type="unfinished">Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation type="unfinished">Bitcoin Core</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1681,18 +1681,18 @@ Address: %4
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="+117"/>
-        <source>Address</source>
-        <translation type="unfinished">Address</translation>
+        <location filename="../peertablemodel.cpp" line="+112"/>
+        <source>User Agent</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+0"/>
-        <source>User Agent</source>
+        <source>Address/Hostname</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+0"/>
-        <source>Start Height</source>
+        <source>Ping Time</source>
         <translation type="unfinished"></translation>
     </message>
 </context>
@@ -1743,6 +1743,16 @@ Address: %4
         <source>None</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+5"/>
+        <source>N/A</source>
+        <translation type="unfinished">N/A</translation>
+    </message>
+    <message>
+        <location line="+0"/>
+        <source>%1 ms</source>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 <context>
     <name>QRImageWidget</name>
@@ -1785,26 +1795,25 @@ Address: %4
         <location line="+23"/>
         <location line="+36"/>
         <location line="+23"/>
-        <location line="+448"/>
-        <location line="+21"/>
-        <location line="+13"/>
-        <location line="+20"/>
-        <location line="+14"/>
-        <location line="+7"/>
-        <location line="+14"/>
-        <location line="+21"/>
-        <location line="+14"/>
-        <location line="+14"/>
-        <location line="+14"/>
-        <location line="+28"/>
-        <location line="+7"/>
-        <location line="+7"/>
-        <location filename="../rpcconsole.cpp" line="+633"/>
+        <location line="+462"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location line="-868"/>
+        <location line="-987"/>
         <source>Client version</source>
         <translation>Client version</translation>
     </message>
@@ -1879,82 +1888,84 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+39"/>
+        <location filename="../rpcconsole.cpp" line="+234"/>
+        <location line="+327"/>
         <source>Select a peer to view detailed information.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+41"/>
-        <source>Version:</source>
+        <location line="+25"/>
+        <source>Direction</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Last Receive:</source>
+        <location line="+23"/>
+        <source>Version</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>User Agent:</source>
+        <location line="+23"/>
+        <source>User Agent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+27"/>
-        <source>Ping Time:</source>
+        <location line="+23"/>
+        <source>Services</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
-        <source>Connection Time:</source>
+        <location line="+23"/>
+        <source>Sync Node</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+21"/>
-        <source>Starting Height:</source>
+        <location line="+23"/>
+        <source>Starting Height</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Bytes Sent:</source>
+        <location line="+23"/>
+        <source>Sync Height</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Bytes Received:</source>
+        <location line="+23"/>
+        <source>Ban Score</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Ban Score:</source>
+        <location line="+23"/>
+        <source>Connection Time</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Direction:</source>
+        <location line="+23"/>
+        <source>Last Send</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Sync Node:</source>
+        <location line="+23"/>
+        <source>Last Receive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
-        <source>Last Send:</source>
+        <location line="+23"/>
+        <source>Bytes Sent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Services:</source>
+        <location line="+23"/>
+        <source>Bytes Received</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>IP Address/port:</source>
+        <location line="+23"/>
+        <source>Ping Time</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-631"/>
+        <location line="-761"/>
         <source>Last block time</source>
         <translation>Last block time</translation>
     </message>
@@ -1984,7 +1995,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="-236"/>
+        <location filename="../rpcconsole.cpp" line="-165"/>
         <source>In:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2029,7 +2040,7 @@ Address: %4
         <translation>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</translation>
     </message>
     <message>
-        <location line="+138"/>
+        <location line="+134"/>
         <source>%1 B</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2049,13 +2060,8 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+93"/>
-        <source>Peer Disconnected</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+23"/>
-        <source>Node Detail</source>
+        <location line="+95"/>
+        <source>via %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -2065,12 +2071,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>%1 secs</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+7"/>
         <source>Inbound</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2090,7 +2091,13 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+12"/>
+        <source>Unknown</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
         <translation type="unfinished"></translation>
     </message>

From a98356fee8a44d7d1cb37f22c876fff8f244365e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 23 Jul 2014 01:00:55 -0400
Subject: [PATCH 0481/1819] build: don't let libtool insert rpath into binaries

---
 configure.ac | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/configure.ac b/configure.ac
index 719b06da67a9..c0ade515ec14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -717,3 +717,14 @@ AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
 AC_OUTPUT
+
+dnl Taken from https://wiki.debian.org/RpathIssue
+case $host in
+   *-*-linux-gnu)
+     AC_MSG_RESULT([Fixing libtool for -rpath problems.])
+     sed < libtool > libtool-2 \
+     's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
+     mv libtool-2 libtool
+     chmod 755 libtool
+   ;;
+esac

From eccd58567d91e6df6d49c4e1a65e5ef9c8869a36 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 6 Aug 2014 17:02:01 -0400
Subject: [PATCH 0482/1819] build: silence mingw fpic warning spew

---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index c0ade515ec14..0b2a429e021a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,7 +345,6 @@ fi
 if test x$use_hardening != xno; then
   AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])
   AX_CHECK_COMPILE_FLAG([-fstack-protector-all],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"])
-  AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
 
   AX_CHECK_PREPROC_FLAG([-D_FORTIFY_SOURCE=2],[
     AX_CHECK_PREPROC_FLAG([-U_FORTIFY_SOURCE],[
@@ -360,7 +359,8 @@ if test x$use_hardening != xno; then
   AX_CHECK_LINK_FLAG([[-Wl,-z,now]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -Wl,-z,now"])
 
   if test x$TARGET_OS != xwindows; then
-    # -pie will link successfully with MinGW, but it's unsupported and leads to undeterministic binaries
+    # All windows code is PIC, forcing it on just adds useless compile warnings
+    AX_CHECK_COMPILE_FLAG([-fPIE],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fPIE"])
     AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
   fi
 

From f8120f7e0f7194cb53d7626f3c401e2793361317 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 23 Jul 2014 01:01:38 -0400
Subject: [PATCH 0483/1819] build: Find the proper xcb/pcre dependencies

---
 src/m4/bitcoin_qt.m4 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 5017742cc207..6b2b93560d85 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -123,7 +123,8 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
         _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
         AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
       elif test x$TARGET_OS == xlinux; then
-        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static -lxcb])
+        PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
+        _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
         AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
       elif test x$TARGET_OS == xdarwin; then
         if test x$use_pkgconfig = xyes; then
@@ -370,7 +371,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
   BITCOIN_QT_CHECK(AC_CHECK_LIB([z] ,[main],,AC_MSG_WARN([zlib not found. Assuming qt has it built-in])))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([png] ,[main],,AC_MSG_WARN([libpng not found. Assuming qt has it built-in])))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([jpeg] ,[main],,AC_MSG_WARN([libjpeg not found. Assuming qt has it built-in])))
-  BITCOIN_QT_CHECK(AC_CHECK_LIB([pcre] ,[main],,AC_MSG_WARN([libpcre not found. Assuming qt has it built-in])))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([pcre16] ,[main],,AC_MSG_WARN([libpcre16 not found. Assuming qt has it built-in])))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core]   ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui]    ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))

From 71941ce580cac1f727bf19ba3226ca55e27d29fe Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 4 Aug 2014 14:37:33 -0400
Subject: [PATCH 0484/1819] build: teach macdeploy the -translations-dir
 argument, for use with static qt

When QT is linked statically, macdeploy can't infer its paths. While plugins
and frameworks don't need to be packaged, translations still do (for now).
---
 contrib/macdeploy/macdeployqtplus | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index eece81dd3d22..23b57a76b357 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -449,6 +449,7 @@ ap.add_argument("-sign", dest="sign", action="store_true", default=False, help="
 ap.add_argument("-dmg", nargs="?", const="", metavar="basename", help="create a .dmg disk image; if basename is not specified, a camel-cased version of the app name is used")
 ap.add_argument("-fancy", nargs=1, metavar="plist", default=[], help="make a fancy looking disk image using the given plist file with instructions; requires -dmg to work")
 ap.add_argument("-add-qt-tr", nargs=1, metavar="languages", default=[], help="add Qt translation files to the bundle's ressources; the language list must be separated with commas, not with whitespace")
+ap.add_argument("-translations-dir", nargs=1, metavar="path", default=None, help="Path to Qt's translation files")
 ap.add_argument("-add-resources", nargs="+", metavar="path", default=[], help="list of additional files or folders to be copied into the bundle's resources; must be the last argument")
 
 config = ap.parse_args()
@@ -467,6 +468,15 @@ if not os.path.exists(app_bundle):
 app_bundle_name = os.path.splitext(os.path.basename(app_bundle))[0]
 
 # ------------------------------------------------
+translations_dir = None
+if config.translations_dir and config.translations_dir[0]:
+    if os.path.exists(config.translations_dir[0]):
+        translations_dir = config.translations_dir[0]
+    else:
+        if verbose >= 1:
+            sys.stderr.write("Error: Could not find translation dir \"%s\"\n" % (translations_dir))
+        sys.exit(1)
+# ------------------------------------------------
 
 for p in config.add_resources:
     if verbose >= 3:
@@ -590,7 +600,14 @@ if config.plugins:
 if len(config.add_qt_tr) == 0:
     add_qt_tr = []
 else:
-    qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations")
+    if translations_dir is not None:
+        qt_tr_dir = translations_dir
+    else:
+        if deploymentInfo.qtPath is not None:
+            qt_tr_dir = os.path.join(deploymentInfo.qtPath, "translations")
+        else:
+            sys.stderr.write("Error: Could not find Qt translation path\n")
+            sys.exit(1)
     add_qt_tr = ["qt_%s.qm" % lng for lng in config.add_qt_tr[0].split(",")]
     for lng_file in add_qt_tr:
         p = os.path.join(qt_tr_dir, lng_file)

From d597219d6d95af1336dfc3d9a69e4578660fd191 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 4 Aug 2014 14:39:13 -0400
Subject: [PATCH 0485/1819] build: add --with-qt-translationdir to configure
 for use with static qt

---
 src/m4/bitcoin_qt.m4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 6b2b93560d85..4c1d40c394ce 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -62,6 +62,7 @@ AC_DEFUN([BITCOIN_QT_INIT],[
   AC_ARG_WITH([qt-incdir],[AS_HELP_STRING([--with-qt-incdir=INC_DIR],[specify qt include path (overridden by pkgconfig)])], [qt_include_path=$withval], [])
   AC_ARG_WITH([qt-libdir],[AS_HELP_STRING([--with-qt-libdir=LIB_DIR],[specify qt lib path (overridden by pkgconfig)])], [qt_lib_path=$withval], [])
   AC_ARG_WITH([qt-plugindir],[AS_HELP_STRING([--with-qt-plugindir=PLUGIN_DIR],[specify qt plugin path (overridden by pkgconfig)])], [qt_plugin_path=$withval], [])
+  AC_ARG_WITH([qt-translationdir],[AS_HELP_STRING([--with-qt-translationdir=PLUGIN_DIR],[specify qt translation path (overridden by pkgconfig)])], [qt_translation_path=$withval], [])
   AC_ARG_WITH([qt-bindir],[AS_HELP_STRING([--with-qt-bindir=BIN_DIR],[specify qt bin path])], [qt_bin_path=$withval], [])
 
   AC_ARG_WITH([qtdbus],
@@ -69,6 +70,8 @@ AC_DEFUN([BITCOIN_QT_INIT],[
     [enable DBus support (default is yes if qt is enabled and QtDBus is found)])],
     [use_dbus=$withval],
     [use_dbus=auto])
+
+  AC_SUBST(QT_TRANSLATION_DIR,$qt_translation_path)
 ])
 
 dnl Find the appropriate version of Qt libraries and includes.

From 206a7f9de6ad8fdd30ebc1a0cd812b891e005563 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 4 Aug 2014 14:40:19 -0400
Subject: [PATCH 0486/1819] build: hook up qt translations for static osx
 packaging

---
 Makefile.am | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 951d7581fb72..63a22a2cc178 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -83,11 +83,11 @@ OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lp
 
 if BUILD_DARWIN
 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
-	$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
+	$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
 
 else
 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
-	INSTALLNAMETOOL=$(INSTALLNAMETOOL)  OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
+	INSTALLNAMETOOL=$(INSTALLNAMETOOL)  OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -verbose 2
 	$(MKDIR_P) dist/.background
 	$(INSTALL) contrib/macdeploy/background.png dist/.background
 	$(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store

From d3434601baa8b2b8513ae08fcac99053860165ad Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 4 Aug 2014 17:35:33 -0400
Subject: [PATCH 0487/1819] build: Fix 'make deploy' when binaries haven't been
 built yet

---
 Makefile.am | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 63a22a2cc178..123a22525c1c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -103,6 +103,15 @@ if TARGET_WINDOWS
 deploy: $(BITCOIN_WIN_INSTALLER)
 endif
 
+$(BITCOIN_QT_BIN): FORCE
+	$(MAKE) -C src qt/$(@F)
+
+$(BITCOIND_BIN): FORCE
+	$(MAKE) -C src $(@F)
+
+$(BITCOIN_CLI_BIN): FORCE
+	$(MAKE) -C src $(@F)
+
 if USE_LCOV
 
 baseline.info:

From 6b271a3911b10a9d100341b8dc31ed92074a43c3 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 4 Aug 2014 19:11:46 -0400
Subject: [PATCH 0488/1819] build: fix race in 'make deploy' for windows

The binary builds can clobber eachother, so use a single subdir dependency
instead.
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 123a22525c1c..a64666a32b38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,7 +46,7 @@ distcheck-hook:
 distcleancheck:
 	@:
 
-$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
+$(BITCOIN_WIN_INSTALLER): all-recursive
 	$(MKDIR_P) $(top_builddir)/release
 	STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
 	STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release

From 6c23b082033b627f31170166c07ab35fa6be9343 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 5 Aug 2014 13:33:26 +0200
Subject: [PATCH 0489/1819] CCoinsKeyHasher::operator() should return size_t

It currently returns uint64_t, which on older boost (at least 1.46) causes
test failures on 32-bit systems.

This problem was introduced in bc42503.

Fixes #4634.
---
 src/coins.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/coins.h b/src/coins.h
index 9f90fe6bd03f..ff60288163b2 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -247,7 +247,10 @@ class CCoinsKeyHasher
 
 public:
     CCoinsKeyHasher();
-    uint64_t operator()(const uint256& key) const {
+    // This *must* return size_t. With Boost 1.46 on 32-bit systems the
+    // unordered_map will behave unpredictably if the custom hasher returns a
+    // uint64_t, resulting in failures when syncing the chain (#4634).
+    size_t operator()(const uint256& key) const {
         return key.GetHash(salt);
     }
 };

From b6884b8594813ab0cf539022a73e9ab45badee33 Mon Sep 17 00:00:00 2001
From: Ben Holden-Crowther <benhc@live.co.uk>
Date: Thu, 7 Aug 2014 09:56:03 +0100
Subject: [PATCH 0490/1819] Added bullet point

To make it easier to add new requirements if necessary
---
 doc/bootstrap.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/bootstrap.md b/doc/bootstrap.md
index 685b768f8b34..7ce71abaadbc 100644
--- a/doc/bootstrap.md
+++ b/doc/bootstrap.md
@@ -4,7 +4,7 @@ Normally the Bitcoin client will download the transaction and network informatio
 
 ### Requirements
 
-A fresh install of the Bitcoin client software.
+- A fresh install of the Bitcoin client software.
 
 ### Download the blockchain via Bittorent
 

From 292cc072f3bada256bc6af9970512eb9dec8d93a Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 6 Aug 2014 15:06:40 -0400
Subject: [PATCH 0491/1819] qt: fix unicode character display on osx when
 building with 10.7 sdk

---
 src/qt/bitcoin.cpp |  3 +++
 src/qt/guiutil.cpp | 27 +++++++++++++++++++++++++++
 src/qt/guiutil.h   |  4 ++++
 3 files changed, 34 insertions(+)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index ea706d9f2565..a43e7cb7562e 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -489,6 +489,9 @@ int main(int argc, char *argv[])
 
     Q_INIT_RESOURCE(bitcoin);
     Q_INIT_RESOURCE(bitcoin_locale);
+
+    GUIUtil::SubstituteFonts();
+
     BitcoinApplication app(argc, argv);
 #if QT_VERSION > 0x050100
     // Generate high-dpi pixmaps
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index ed8390960869..38fbc48a4d9f 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -63,6 +63,13 @@
 static boost::filesystem::detail::utf8_codecvt_facet utf8;
 #endif
 
+#if defined(Q_OS_MAC)
+extern double NSAppKitVersionNumber;
+#if !defined(NSAppKitVersionNumber10_9)
+#define NSAppKitVersionNumber10_9 1265
+#endif
+#endif
+
 namespace GUIUtil {
 
 QString dateTimeStr(const QDateTime &date)
@@ -376,6 +383,26 @@ ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *pa
 
 }
 
+void SubstituteFonts()
+{
+#if defined(Q_OS_MAC)
+// Background:
+// OSX's default font changed in 10.9 and QT is unable to find it with its
+// usual fallback methods when building against the 10.7 sdk or lower.
+// The 10.8 SDK added a function to let it find the correct fallback font.
+// If this fallback is not properly loaded, some characters may fail to
+// render correctly.
+//
+// Solution: If building with the 10.7 SDK or lower and the user's platform
+// is 10.9 or higher at runtime, substitute the correct font. This needs to
+// happen before the QApplication is created.
+#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
+    if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_9)
+        QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
+#endif
+#endif
+}
+
 bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
 {
     if(evt->type() == QEvent::ToolTipChange)
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index dd31d051ee98..83739a5f13cd 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -106,6 +106,10 @@ namespace GUIUtil
       representation if needed. This assures that Qt can word-wrap long tooltip messages.
       Tooltips longer than the provided size threshold (in characters) are wrapped.
      */
+
+    // Replace invalid default fonts with known good ones
+    void SubstituteFonts();
+
     class ToolTipToRichTextFilter : public QObject
     {
         Q_OBJECT

From c4a77090c4b5a8346f3d312be41c1ee50830a21a Mon Sep 17 00:00:00 2001
From: ntrgn <ntrgnt@gmail.com>
Date: Thu, 7 Aug 2014 20:02:35 +0200
Subject: [PATCH 0492/1819] Fixes ignored qt 4.8 codecs path on windows when
 configuring with --with-qt-libdir

---
 src/m4/bitcoin_qt.m4 | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 4c1d40c394ce..fa5c990cf71f 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -112,11 +112,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
       AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
       if test x$qt_plugin_path != x; then
         QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
-        if test x$bitcoin_qt_got_major_vers == x5; then
-          QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
-        else
-          QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
-        fi
+        QT_LIBS="$QT_LIBS -L$qt_plugin_path/platforms"
       fi
       if test x$use_pkgconfig = xyes; then
         PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
@@ -141,6 +137,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   else
     if test x$TARGET_OS == xwindows; then
       AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
+      if test x$qt_plugin_path != x; then
+        QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
+        QT_LIBS="$QT_LIBS -L$qt_plugin_path/codecs"
+      fi
       _BITCOIN_QT_CHECK_STATIC_PLUGINS([
          Q_IMPORT_PLUGIN(qcncodecs)
          Q_IMPORT_PLUGIN(qjpcodecs)

From efd6b87811351cde592ac48247190e682ad02aea Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 16 Jun 2014 15:55:39 +0200
Subject: [PATCH 0493/1819] small net cleanup

- add comment for disabling sigpipe
- add closing comment in compat.h
- remove redundant check in net.h
---
 src/compat.h    | 4 ++--
 src/net.h       | 7 +++----
 src/netbase.cpp | 1 +
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 1b3a60d11b97..52c7817130fb 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
@@ -59,4 +59,4 @@ typedef u_int SOCKET;
 #define SOCKET_ERROR        -1
 #endif
 
-#endif
+#endif // _BITCOIN_COMPAT_H
diff --git a/src/net.h b/src/net.h
index 2d9325abf98a..a8795a4760b5 100644
--- a/src/net.h
+++ b/src/net.h
@@ -356,12 +356,11 @@ class CNode
 
     ~CNode()
     {
-        if (hSocket != INVALID_SOCKET)
-        {
-            CloseSocket(hSocket);
-        }
+        CloseSocket(hSocket);
+
         if (pfilter)
             delete pfilter;
+
         GetNodeSignals().FinalizeNode(GetId());
     }
 
diff --git a/src/netbase.cpp b/src/netbase.cpp
index af6d11f0e217..1031e7e38a9e 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -334,6 +334,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
 
 #ifdef SO_NOSIGPIPE
     int set = 1;
+    // Different way of disabling SIGPIPE on BSD
     setsockopt(hSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&set, sizeof(int));
 #endif
 

From 94e1b9e05b96e4fe639e5b07b7a53ea216170962 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 4 Aug 2014 13:50:17 +0200
Subject: [PATCH 0494/1819] [Qt] re-work overviewpage UI

- ensure normal and watch-only stuff looks consistent
- simplify UI by removing unneeded UI layout elements
- change some comments to watch-only from watchonly
---
 src/qt/forms/overviewpage.ui | 685 +++++++++++++++++------------------
 src/qt/overviewpage.cpp      |  15 +-
 2 files changed, 340 insertions(+), 360 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index df16295f77ef..7784a862d7e1 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -13,8 +13,8 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QVBoxLayout" name="topLayout">
-   <item>
+  <layout class="QFormLayout" name="formLayout_3">
+   <item row="0" column="0" colspan="2">
     <widget class="QLabel" name="labelAlerts">
      <property name="visible">
       <bool>false</bool>
@@ -30,7 +30,7 @@
      </property>
     </widget>
    </item>
-   <item>
+   <item row="1" column="1">
     <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
      <item>
       <layout class="QVBoxLayout" name="verticalLayout_2">
@@ -46,374 +46,344 @@
           <item>
            <layout class="QHBoxLayout" name="horizontalLayout_4">
             <item>
-             <layout class="QHBoxLayout" name="horizontalLayout_7">
-              <item>
-               <widget class="QLabel" name="label_5">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="text">
-                 <string>Wallet</string>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <widget class="QLabel" name="labelWalletStatus">
-                <property name="toolTip">
-                 <string>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.</string>
-                </property>
-                <property name="styleSheet">
-                 <string notr="true">QLabel { color: red; }</string>
-                </property>
-                <property name="text">
-                 <string notr="true">(out of sync)</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
-                </property>
-               </widget>
-              </item>
-             </layout>
+             <widget class="QLabel" name="label_5">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="text">
+               <string>Balances</string>
+              </property>
+             </widget>
+            </item>
+            <item>
+             <widget class="QLabel" name="labelWalletStatus">
+              <property name="cursor">
+               <cursorShape>WhatsThisCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>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.</string>
+              </property>
+              <property name="styleSheet">
+               <string notr="true">QLabel { color: red; }</string>
+              </property>
+              <property name="text">
+               <string notr="true">(out of sync)</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
+              </property>
+             </widget>
             </item>
             <item>
-             <layout class="QHBoxLayout" name="horizontalLayout_8">
-              <item>
-               <widget class="QLabel" name="labelWatchonly">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="text">
-                 <string>Watch-only:</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignCenter</set>
-                </property>
-               </widget>
-              </item>
-              <item>
-               <spacer name="horizontalSpacer_2">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-                <property name="sizeType">
-                 <enum>QSizePolicy::Preferred</enum>
-                </property>
-                <property name="sizeHint" stdset="0">
-                 <size>
-                  <width>40</width>
-                  <height>20</height>
-                 </size>
-                </property>
-               </spacer>
-              </item>
-             </layout>
+             <spacer name="horizontalSpacer_3">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>40</width>
+                <height>20</height>
+               </size>
+              </property>
+             </spacer>
             </item>
            </layout>
           </item>
           <item>
-           <layout class="QHBoxLayout" name="horizontalLayout_3">
-            <item>
-             <layout class="QFormLayout" name="formLayout_2">
-              <property name="fieldGrowthPolicy">
-               <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-              </property>
-              <property name="horizontalSpacing">
-               <number>12</number>
-              </property>
-              <property name="verticalSpacing">
-               <number>12</number>
-              </property>
-              <item row="0" column="0">
-               <widget class="QLabel" name="label">
-                <property name="text">
-                 <string>Available:</string>
-                </property>
-               </widget>
-              </item>
-              <item row="0" column="1">
-               <widget class="QLabel" name="labelBalance">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Your current spendable balance</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="0">
-               <widget class="QLabel" name="label_3">
-                <property name="text">
-                 <string>Pending:</string>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1">
-               <widget class="QLabel" name="labelUnconfirmed">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="2" column="0">
-               <widget class="QLabel" name="labelImmatureText">
-                <property name="text">
-                 <string>Immature:</string>
-                </property>
-               </widget>
-              </item>
-              <item row="2" column="1">
-               <widget class="QLabel" name="labelImmature">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Mined balance that has not yet matured</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="3" column="0" colspan="2">
-               <widget class="Line" name="line">
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-               </widget>
-              </item>
-              <item row="4" column="0">
-               <widget class="QLabel" name="labelTotalText">
-                <property name="text">
-                 <string>Total:</string>
-                </property>
-               </widget>
-              </item>
-              <item row="4" column="1">
-               <widget class="QLabel" name="labelTotal">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Your current total balance</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-             </layout>
+           <layout class="QGridLayout" name="gridLayout">
+            <property name="spacing">
+             <number>12</number>
+            </property>
+            <item row="2" column="2">
+             <widget class="QLabel" name="labelWatchPending">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Unconfirmed transactions to watch-only addresses</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
             </item>
-            <item>
-             <layout class="QFormLayout" name="formLayout">
-              <property name="fieldGrowthPolicy">
-               <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
-              </property>
-              <property name="horizontalSpacing">
-               <number>12</number>
-              </property>
-              <property name="verticalSpacing">
-               <number>12</number>
-              </property>
-              <item row="0" column="1">
-               <widget class="QLabel" name="labelWatchAvailable">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Your current balance in watch-only addresses</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="1" column="1">
-               <widget class="QLabel" name="labelWatchPending">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Unconfirmed transactions to watch-only addresses</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="2" column="1">
-               <widget class="QLabel" name="labelWatchImmature">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Mined balance in watch-only addresses that has not yet matured</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-              <item row="3" column="0" colspan="2">
-               <widget class="Line" name="lineWatchBalance">
-                <property name="sizePolicy">
-                 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
-                  <horstretch>0</horstretch>
-                  <verstretch>0</verstretch>
-                 </sizepolicy>
-                </property>
-                <property name="minimumSize">
-                 <size>
-                  <width>140</width>
-                  <height>0</height>
-                 </size>
-                </property>
-                <property name="orientation">
-                 <enum>Qt::Horizontal</enum>
-                </property>
-               </widget>
-              </item>
-              <item row="4" column="1">
-               <widget class="QLabel" name="labelWatchTotal">
-                <property name="font">
-                 <font>
-                  <weight>75</weight>
-                  <bold>true</bold>
-                 </font>
-                </property>
-                <property name="cursor">
-                 <cursorShape>IBeamCursor</cursorShape>
-                </property>
-                <property name="toolTip">
-                 <string>Current total balance in watch-only addresses</string>
-                </property>
-                <property name="text">
-                 <string notr="true">0 BTC</string>
-                </property>
-                <property name="alignment">
-                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-                </property>
-                <property name="textInteractionFlags">
-                 <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-                </property>
-               </widget>
-              </item>
-             </layout>
+            <item row="2" column="1">
+             <widget class="QLabel" name="labelUnconfirmed">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
             </item>
-            <item>
-             <spacer name="horizontalSpacer_3">
+            <item row="3" column="2">
+             <widget class="QLabel" name="labelWatchImmature">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Mined balance in watch-only addresses that has not yet matured</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="4" column="0" colspan="2">
+             <widget class="Line" name="line">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
+              </property>
+             </widget>
+            </item>
+            <item row="4" column="2">
+             <widget class="Line" name="lineWatchBalance">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="minimumSize">
+               <size>
+                <width>140</width>
+                <height>0</height>
+               </size>
+              </property>
               <property name="orientation">
                <enum>Qt::Horizontal</enum>
               </property>
-              <property name="sizeType">
-               <enum>QSizePolicy::Expanding</enum>
+             </widget>
+            </item>
+            <item row="5" column="0">
+             <widget class="QLabel" name="labelTotalText">
+              <property name="text">
+               <string>Total:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="3" column="1">
+             <widget class="QLabel" name="labelImmature">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Mined balance that has not yet matured</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="3">
+             <spacer name="horizontalSpacer_2">
+              <property name="orientation">
+               <enum>Qt::Horizontal</enum>
               </property>
               <property name="sizeHint" stdset="0">
                <size>
-                <width>20</width>
+                <width>40</width>
                 <height>20</height>
                </size>
               </property>
              </spacer>
             </item>
+            <item row="3" column="0">
+             <widget class="QLabel" name="labelImmatureText">
+              <property name="text">
+               <string>Immature:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="5" column="1">
+             <widget class="QLabel" name="labelTotal">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Your current total balance</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="5" column="2">
+             <widget class="QLabel" name="labelWatchTotal">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Current total balance in watch-only addresses</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="2">
+             <widget class="QLabel" name="labelWatchonly">
+              <property name="text">
+               <string>Watch-only:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="0">
+             <widget class="QLabel" name="labelBalanceText">
+              <property name="text">
+               <string>Available:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="1">
+             <widget class="QLabel" name="labelBalance">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Your current spendable balance</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="1" column="2">
+             <widget class="QLabel" name="labelWatchAvailable">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
+              <property name="cursor">
+               <cursorShape>IBeamCursor</cursorShape>
+              </property>
+              <property name="toolTip">
+               <string>Your current balance in watch-only addresses</string>
+              </property>
+              <property name="text">
+               <string notr="true">0.000 000 00 BTC</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+              <property name="textInteractionFlags">
+               <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+              </property>
+             </widget>
+            </item>
+            <item row="2" column="0">
+             <widget class="QLabel" name="labelPendingText">
+              <property name="text">
+               <string>Pending:</string>
+              </property>
+             </widget>
+            </item>
+            <item row="0" column="1">
+             <widget class="QLabel" name="labelSpendable">
+              <property name="text">
+               <string>Spendable:</string>
+              </property>
+              <property name="alignment">
+               <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+              </property>
+             </widget>
+            </item>
            </layout>
           </item>
          </layout>
@@ -449,13 +419,22 @@
            <layout class="QHBoxLayout" name="horizontalLayout_2">
             <item>
              <widget class="QLabel" name="label_4">
+              <property name="font">
+               <font>
+                <weight>75</weight>
+                <bold>true</bold>
+               </font>
+              </property>
               <property name="text">
-               <string>&lt;b&gt;Recent transactions&lt;/b&gt;</string>
+               <string>Recent transactions</string>
               </property>
              </widget>
             </item>
             <item>
              <widget class="QLabel" name="labelTransactionsStatus">
+              <property name="cursor">
+               <cursorShape>WhatsThisCursor</cursorShape>
+              </property>
               <property name="toolTip">
                <string>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.</string>
               </property>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1c700b37ffe5..b5a3de48ca34 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -162,15 +162,16 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
     bool showWatchOnlyImmature = watchImmatureBalance != 0;
     bool showWatchOnly = (watchOnlyBalance != 0 || watchUnconfBalance != 0 || showWatchOnlyImmature);
 
-    // for symmetry reasons also show immature label when the watchonly one is shown
+    // for symmetry reasons also show immature label when the watch-only one is shown
     ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);
     ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
-    ui->labelWatchonly->setVisible(showWatchOnly);              // show Watchonly label
-    ui->lineWatchBalance->setVisible(showWatchOnly);            // show watchonly balance separator line
-    ui->labelWatchAvailable->setVisible(showWatchOnly);         // show watchonly available balance
-    ui->labelWatchImmature->setVisible(showWatchOnlyImmature);  // show watchonly immature balance
-    ui->labelWatchPending->setVisible(showWatchOnly);           // show watchonly pending balance
-    ui->labelWatchTotal->setVisible(showWatchOnly);             // show watchonly total balance
+    ui->labelSpendable->setVisible(showWatchOnly);              // show spendable label (only when watch-only is active)
+    ui->labelWatchonly->setVisible(showWatchOnly);              // show watch-only label
+    ui->lineWatchBalance->setVisible(showWatchOnly);            // show watch-only balance separator line
+    ui->labelWatchAvailable->setVisible(showWatchOnly);         // show watch-only available balance
+    ui->labelWatchImmature->setVisible(showWatchOnlyImmature);  // show watch-only immature balance
+    ui->labelWatchPending->setVisible(showWatchOnly);           // show watch-only pending balance
+    ui->labelWatchTotal->setVisible(showWatchOnly);             // show watch-only total balance
 }
 
 void OverviewPage::setClientModel(ClientModel *model)

From c4bae530926853e59d0d9a3bdced91330ba56dd3 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 8 Aug 2014 10:03:13 +0200
Subject: [PATCH 0495/1819] [Qt] move SubstituteFonts() above
 ToolTipToRichTextFilter

- doesn't belong to the ToolTipToRichTextFilter class so move it up
---
 src/qt/guiutil.cpp | 13 +++++++------
 src/qt/guiutil.h   |  7 +++----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 38fbc48a4d9f..3b9b1226e165 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -377,12 +377,6 @@ void openDebugLogfile()
         QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
 }
 
-ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
-    QObject(parent), size_threshold(size_threshold)
-{
-
-}
-
 void SubstituteFonts()
 {
 #if defined(Q_OS_MAC)
@@ -403,6 +397,13 @@ void SubstituteFonts()
 #endif
 }
 
+ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) :
+    QObject(parent),
+    size_threshold(size_threshold)
+{
+
+}
+
 bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
 {
     if(evt->type() == QEvent::ToolTipChange)
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 83739a5f13cd..0ae5154d4b30 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -102,14 +102,13 @@ namespace GUIUtil
     // Open debug.log
     void openDebugLogfile();
 
+    // Replace invalid default fonts with known good ones
+    void SubstituteFonts();
+
     /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
       representation if needed. This assures that Qt can word-wrap long tooltip messages.
       Tooltips longer than the provided size threshold (in characters) are wrapped.
      */
-
-    // Replace invalid default fonts with known good ones
-    void SubstituteFonts();
-
     class ToolTipToRichTextFilter : public QObject
     {
         Q_OBJECT

From 8ca6a1617687ce613b0426c2627ba79e710a695f Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 7 Aug 2014 09:34:31 +0200
Subject: [PATCH 0496/1819] [Qt] ensure all class attributes are init to 0

- in BitcoinGUI and UnitDisplayStatusBarControl
---
 src/qt/bitcoingui.cpp | 30 +++++++++++++++++++++++++++---
 src/qt/bitcoingui.h   |  1 +
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index e3257e859cad..429b9a9fb34e 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -61,9 +61,33 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     QMainWindow(parent),
     clientModel(0),
     walletFrame(0),
+    unitDisplayControl(0),
+    labelEncryptionIcon(0),
+    labelConnectionsIcon(0),
+    labelBlocksIcon(0),
+    progressBarLabel(0),
+    progressBar(0),
+    progressDialog(0),
+    appMenuBar(0),
+    overviewAction(0),
+    historyAction(0),
+    quitAction(0),
+    sendCoinsAction(0),
+    usedSendingAddressesAction(0),
+    usedReceivingAddressesAction(0),
+    signMessageAction(0),
+    verifyMessageAction(0),
+    aboutAction(0),
+    receiveCoinsAction(0),
+    optionsAction(0),
+    toggleHideAction(0),
     encryptWalletAction(0),
+    backupWalletAction(0),
     changePassphraseAction(0),
     aboutQtAction(0),
+    openRPCConsoleAction(0),
+    openAction(0),
+    showHelpMessageAction(0),
     trayIcon(0),
     notificator(0),
     rpcConsole(0),
@@ -1006,9 +1030,10 @@ void BitcoinGUI::unsubscribeFromCoreSignals()
     uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
 }
 
-UnitDisplayStatusBarControl::UnitDisplayStatusBarControl():QLabel()
+UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
+    optionsModel(0),
+    menu(0)
 {
-    optionsModel = 0;
     createContextMenu();
     setToolTip(tr("Unit to show amounts in. Click to select another unit."));
 }
@@ -1068,4 +1093,3 @@ void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
         optionsModel->setDisplayUnit(action->data());
     }
 }
-
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 30dd7ae31702..7e45240f05ff 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -219,6 +219,7 @@ class UnitDisplayStatusBarControl : public QLabel
 private:
     OptionsModel *optionsModel;
     QMenu* menu;
+
     /** Shows context menu with Display Unit options by the mouse coordinates */
     void onDisplayUnitsClicked(const QPoint& point);
     /** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */

From 314fbd9ac7713e812e85960499474dcf453b563e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 7 Aug 2014 09:36:02 +0200
Subject: [PATCH 0497/1819] [Qt] use BitcoinGUI::DEFAULT_WALLET constant in
 bitcoin.cpp

---
 src/qt/bitcoin.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index a43e7cb7562e..c0dee66931d9 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -414,8 +414,8 @@ void BitcoinApplication::initializeResult(int retval)
         {
             walletModel = new WalletModel(pwalletMain, optionsModel);
 
-            window->addWallet("~Default", walletModel);
-            window->setCurrentWallet("~Default");
+            window->addWallet(BitcoinGUI::DEFAULT_WALLET, walletModel);
+            window->setCurrentWallet(BitcoinGUI::DEFAULT_WALLET);
 
             connect(walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)),
                              paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray)));

From b197bf3270490068319d87e4b977b08f754a1307 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 7 Aug 2014 09:37:21 +0200
Subject: [PATCH 0498/1819] [Qt] disable tray interactions when client model
 set to 0

- this prevents the ability to fiddle around with the system tray when
  already shutting down (e.g. on slow shutdowns because of a proxy delay)
- extends solution for #4360
---
 src/qt/bitcoingui.cpp | 13 +++++++++----
 src/qt/bitcoingui.h   |  1 +
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 429b9a9fb34e..e3665dfe6edd 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -89,6 +89,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     openAction(0),
     showHelpMessageAction(0),
     trayIcon(0),
+    trayIconMenu(0),
     notificator(0),
     rpcConsole(0),
     prevBlocks(0),
@@ -449,8 +450,12 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
             walletFrame->setClientModel(clientModel);
         }
 #endif
-
-        this->unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
+        unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
+    } else {
+        // Disable possibility to show main window via action
+        toggleHideAction->setEnabled(false);
+        // Disable context menu on tray icon
+        trayIconMenu->clear();
     }
 }
 
@@ -519,7 +524,6 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
 
 void BitcoinGUI::createTrayIconMenu()
 {
-    QMenu *trayIconMenu;
 #ifndef Q_OS_MAC
     // return if trayIcon is unset (only on non-Mac OSes)
     if (!trayIcon)
@@ -560,7 +564,7 @@ void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
     if(reason == QSystemTrayIcon::Trigger)
     {
         // Click on system tray icon triggers show/hide of the main window
-        toggleHideAction->trigger();
+        toggleHidden();
     }
 }
 #endif
@@ -946,6 +950,7 @@ void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
 {
     if(!clientModel)
         return;
+
     // activateWindow() (sometimes) helps with keyboard focus on Windows
     if (isHidden())
     {
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 7e45240f05ff..30b05cb7d975 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -103,6 +103,7 @@ class BitcoinGUI : public QMainWindow
     QAction *showHelpMessageAction;
 
     QSystemTrayIcon *trayIcon;
+    QMenu *trayIconMenu;
     Notificator *notificator;
     RPCConsole *rpcConsole;
 

From c7f3876d4af37cfd6e587d0ab7ddbeaedda27857 Mon Sep 17 00:00:00 2001
From: Ross Nicoll <jrn@jrn.me.uk>
Date: Sat, 2 Aug 2014 19:56:06 +0100
Subject: [PATCH 0499/1819] URLs containing a / after the address no longer
 cause parsing errors.

---
 src/qt/guiutil.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 33a50a078dad..75ae11405901 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -117,6 +117,10 @@ bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out)
 
     SendCoinsRecipient rv;
     rv.address = uri.path();
+    // Trim any following forward slash which may have been added by the OS
+    if (rv.address.endsWith("/")) {
+        rv.address.truncate(rv.address.length() - 1);
+    }
     rv.amount = 0;
 
 #if QT_VERSION < 0x050000

From 1dec09b341f61836147d87656aea7f7be02aab6d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 23 Jul 2014 01:31:30 -0400
Subject: [PATCH 0500/1819] depends: add shared dependency builder

See the README's in depends for documentation
---
 depends/.gitignore                            |    5 +
 depends/Makefile                              |  114 ++
 depends/README                                |   55 +
 depends/README.packages                       |  116 ++
 depends/README.usage                          |   29 +
 depends/builders/darwin.mk                    |   22 +
 depends/builders/default.mk                   |   20 +
 depends/builders/linux.mk                     |    2 +
 depends/config.guess                          | 1420 +++++++++++++
 depends/config.site.in                        |   84 +
 depends/config.sub                            | 1794 +++++++++++++++++
 depends/funcs.mk                              |  219 ++
 depends/hosts/darwin.mk                       |    8 +
 depends/hosts/default.mk                      |   23 +
 depends/hosts/linux.mk                        |   23 +
 depends/hosts/mingw32.mk                      |    2 +
 depends/packages/bdb.mk                       |   29 +
 depends/packages/boost.mk                     |   42 +
 depends/packages/dbus.mk                      |   23 +
 depends/packages/expat.mk                     |   21 +
 depends/packages/fontconfig.mk                |   22 +
 depends/packages/freetype.mk                  |   22 +
 depends/packages/libX11.mk                    |   23 +
 depends/packages/libXau.mk                    |   23 +
 depends/packages/libXext.mk                   |   22 +
 depends/packages/libxcb.mk                    |   30 +
 depends/packages/miniupnpc.mk                 |   28 +
 depends/packages/native_ccache.mk             |   25 +
 depends/packages/native_cctools.mk            |   80 +
 depends/packages/native_cdrkit.mk             |   26 +
 depends/packages/native_comparisontool.mk     |   44 +
 depends/packages/native_libdmg-hfsplus.mk     |   22 +
 depends/packages/native_libuuid.mk            |   24 +
 depends/packages/native_openssl.mk            |   21 +
 depends/packages/native_protobuf.mk           |   25 +
 depends/packages/openssl.mk                   |   40 +
 depends/packages/packages.mk                  |   14 +
 depends/packages/protobuf.mk                  |   28 +
 depends/packages/qrencode.mk                  |   22 +
 depends/packages/qt.mk                        |   89 +
 depends/packages/xcb_proto.mk                 |   27 +
 depends/packages/xextproto.mk                 |   21 +
 depends/packages/xproto.mk                    |   21 +
 depends/packages/xtrans.mk                    |   22 +
 .../patches/boost/darwin_boost_atomic-1.patch |   35 +
 .../patches/boost/darwin_boost_atomic-2.patch |   55 +
 .../native_cdrkit/cdrkit-deterministic.patch  |   86 +
 .../patches/qt/fix-xcb-include-order.patch    |   21 +
 depends/patches/qt/mac-qmake.conf             |   23 +
 49 files changed, 4992 insertions(+)
 create mode 100644 depends/.gitignore
 create mode 100644 depends/Makefile
 create mode 100644 depends/README
 create mode 100644 depends/README.packages
 create mode 100644 depends/README.usage
 create mode 100644 depends/builders/darwin.mk
 create mode 100644 depends/builders/default.mk
 create mode 100644 depends/builders/linux.mk
 create mode 100755 depends/config.guess
 create mode 100644 depends/config.site.in
 create mode 100755 depends/config.sub
 create mode 100644 depends/funcs.mk
 create mode 100644 depends/hosts/darwin.mk
 create mode 100644 depends/hosts/default.mk
 create mode 100644 depends/hosts/linux.mk
 create mode 100644 depends/hosts/mingw32.mk
 create mode 100644 depends/packages/bdb.mk
 create mode 100644 depends/packages/boost.mk
 create mode 100644 depends/packages/dbus.mk
 create mode 100644 depends/packages/expat.mk
 create mode 100644 depends/packages/fontconfig.mk
 create mode 100644 depends/packages/freetype.mk
 create mode 100644 depends/packages/libX11.mk
 create mode 100644 depends/packages/libXau.mk
 create mode 100644 depends/packages/libXext.mk
 create mode 100644 depends/packages/libxcb.mk
 create mode 100644 depends/packages/miniupnpc.mk
 create mode 100644 depends/packages/native_ccache.mk
 create mode 100644 depends/packages/native_cctools.mk
 create mode 100644 depends/packages/native_cdrkit.mk
 create mode 100644 depends/packages/native_comparisontool.mk
 create mode 100644 depends/packages/native_libdmg-hfsplus.mk
 create mode 100644 depends/packages/native_libuuid.mk
 create mode 100644 depends/packages/native_openssl.mk
 create mode 100644 depends/packages/native_protobuf.mk
 create mode 100644 depends/packages/openssl.mk
 create mode 100644 depends/packages/packages.mk
 create mode 100644 depends/packages/protobuf.mk
 create mode 100644 depends/packages/qrencode.mk
 create mode 100644 depends/packages/qt.mk
 create mode 100644 depends/packages/xcb_proto.mk
 create mode 100644 depends/packages/xextproto.mk
 create mode 100644 depends/packages/xproto.mk
 create mode 100644 depends/packages/xtrans.mk
 create mode 100644 depends/patches/boost/darwin_boost_atomic-1.patch
 create mode 100644 depends/patches/boost/darwin_boost_atomic-2.patch
 create mode 100644 depends/patches/native_cdrkit/cdrkit-deterministic.patch
 create mode 100644 depends/patches/qt/fix-xcb-include-order.patch
 create mode 100644 depends/patches/qt/mac-qmake.conf

diff --git a/depends/.gitignore b/depends/.gitignore
new file mode 100644
index 000000000000..82c48638b008
--- /dev/null
+++ b/depends/.gitignore
@@ -0,0 +1,5 @@
+SDKs/
+work/
+built/
+sources/
+config.site
diff --git a/depends/Makefile b/depends/Makefile
new file mode 100644
index 000000000000..d431653068f9
--- /dev/null
+++ b/depends/Makefile
@@ -0,0 +1,114 @@
+.NOTPARALLEL :
+
+SOURCES_PATH ?= $(BASEDIR)/sources
+BASE_CACHE ?= $(BASEDIR)/built
+SDK_PATH ?= $(BASEDIR)/SDKs
+NO_QT ?=
+NO_WALLET ?=
+NO_UPNP ?=
+
+BUILD = $(shell ./config.guess)
+HOST ?= $(BUILD)
+PATCHES_PATH = $(BASEDIR)/patches
+BASEDIR = $(CURDIR)
+HASH_LENGTH:=11
+
+host:=$(BUILD)
+ifneq ($(HOST),)
+host:=$(HOST)
+host_toolchain:=$(HOST)-
+endif
+
+base_build_dir=$(BASEDIR)/work/build
+base_staging_dir=$(BASEDIR)/work/staging
+canonical_host:=$(shell ./config.sub $(HOST))
+build:=$(shell ./config.sub $(BUILD))
+
+build_arch =$(firstword $(subst -, ,$(build)))
+build_vendor=$(word 2,$(subst -, ,$(build)))
+full_build_os:=$(subst $(build_arch)-$(build_vendor)-,,$(build))
+build_os:=$(findstring linux,$(full_build_os))
+build_os+=$(findstring darwin,$(full_build_os))
+build_os:=$(strip $(build_os))
+ifeq ($(build_os),)
+build_os=$(full_build_os)
+endif
+
+host_arch=$(firstword $(subst -, ,$(canonical_host)))
+host_vendor=$(word 2,$(subst -, ,$(canonical_host)))
+full_host_os:=$(subst $(host_arch)-$(host_vendor)-,,$(canonical_host))
+host_os:=$(findstring linux,$(full_host_os))
+host_os+=$(findstring darwin,$(full_host_os))
+host_os+=$(findstring mingw32,$(full_host_os))
+host_os:=$(strip $(host_os))
+ifeq ($(host_os),)
+host_os=$(full_host_os)
+endif
+
+$(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host)
+$(host_arch)_$(host_os)_host=$(host)
+host_prefix=$($(host_arch)_$(host_os)_prefix)
+build_prefix=$(host_prefix)/native
+build_host=$(build)
+
+AT_$(V):=
+AT_:=@
+AT:=$(AT_$(V))
+
+all: install
+
+include hosts/$(host_os).mk
+include hosts/default.mk
+include builders/$(build_os).mk
+include builders/default.mk
+include packages/packages.mk
+
+qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages)
+qt_native_packages_$(NO_QT) = $(qt_native_packages)
+wallet_packages_$(NO_WALLET) = $(wallet_packages)
+upnp_packages_$(NO_UPNP) = $(upnp_packages)
+
+packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_packages_) $(wallet_packages_) $(upnp_packages_)
+native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
+all_packages = $(packages) $(native_packages)
+
+meta_depends = Makefile builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
+
+$(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
+
+include funcs.mk
+
+toolchain_path=$($($(host_arch)_$(host_os)_native_toolchain)_prefixbin)
+final_build_id_long+=$(shell $(build_SHA256SUM) config.site.in)
+final_build_id+=$(shell echo -n $(final_build_id_long) | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH))
+$(host_prefix)/.stamp_$(final_build_id): | $(native_packages) $(packages)
+	$(AT)rm -rf $(@D)
+	$(AT)mkdir -p $(@D)
+	$(AT)echo copying packages: $|
+	$(AT)echo to: $(@D)
+	$(AT)cd $(@D); $(foreach package,$|, tar xf $($(package)_cached); )
+	$(AT)touch $@
+
+$(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_build_id)
+	$(AT)@mkdir -p $(@D)
+	$(AT)sed -e 's|@HOST@|$(host)|' \
+            -e 's|@CC@|$(toolchain_path)$(host_CC)|' \
+            -e 's|@CXX@|$(toolchain_path)$(host_CXX)|' \
+            -e 's|@AR@|$(toolchain_path)$(host_AR)|' \
+            -e 's|@RANLIB@|$(toolchain_path)$(host_RANLIB)|' \
+            -e 's|@NM@|$(toolchain_path)$(host_NM)|' \
+            -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
+            -e 's|@build_os@|$(build_os)|' \
+            -e 's|@host_os@|$(host_os)|' \
+            -e 's|@CFLAGS@|$(host_CFLAGS)|' \
+            -e 's|@CXXFLAGS@|$(host_CXXFLAGS)|' \
+            -e 's|@LDFLAGS@|$(host_LDFLAGS)|' \
+            -e 's|@no_qt@|$(NO_QT)|' \
+            -e 's|@no_wallet@|$(NO_WALLET)|' \
+            -e 's|@no_upnp@|$(NO_UPNP)|' \
+            $< > $@
+	$(AT)touch $@
+
+install: $(host_prefix)/share/config.site
+download: $(all_sources)
+.PHONY: install cached
diff --git a/depends/README b/depends/README
new file mode 100644
index 000000000000..fed2f9b5ab9f
--- /dev/null
+++ b/depends/README
@@ -0,0 +1,55 @@
+This is a system of building and caching dependencies necessary for building
+Bitcoin.
+
+There are several features that make it different from most similar systems:
+
+- It is designed to be builder and host agnostic
+
+In theory, binaries for any target OS/architecture can be created, from a
+builder running any OS/architecture. In practice, build-side tools must be
+specified when the defaults don't fit, and packages must be ammended to work
+on new hosts. For now, a build architecture of x86_64 is assumed, either on
+Linux or OSX.
+
+- No reliance on timestamps
+
+File presence is used to determine what needs to be built. This makes the
+results distributable and easily digestable by automated builders.
+
+- Each build only has its specified dependencies available at build-time.
+
+For each build, the sysroot is wiped and the (recursive) dependencies are
+installed. This makes each build deterministic, since there will never be any
+unknown files available to cause side-effects.
+
+- Each package is cached and only rebuilt as needed.
+
+Before building, a unique build-id is generated for each package. This id
+consists of a hash of all files used to build the package (Makefiles, packages,
+etc), and as well as a hash of the same data for each recursive dependency. If
+any portion of a package's build recipe changes, it will be rebuilt as well as
+any other package that depends on it. If any of the main makefiles (Makefile, 
+funcs.mk, etc) are changed, all packages will be rebuilt. After building, the
+results are cached into a tarball that can be re-used and distributed.
+
+- Package build results are (relatively) deterministic.
+
+Each package is configured and patched so that it will yield the same
+build-results with each consequent build, within a reasonable set of
+constraints. Some things like timestamp insertion are unavoidable, and are
+beyond the scope of this system. Additionally, the toolchain itself must be
+capable of deterministic results. When revisions are properly bumped, a cached
+build should represent an exact single payload.
+
+- Sources are fetched and verified automatically
+
+Each package must define its source location and checksum. The build will fail
+if the fetched source does not match. Sources may be pre-seeded and/or cached
+as desired.
+
+- Self-cleaning
+
+Build and staging dirs are wiped after use, and any previous version of a
+cached result is removed following a successful build. Automated builders
+should be able to build each revision and store the results with no further
+intervention.
diff --git a/depends/README.packages b/depends/README.packages
new file mode 100644
index 000000000000..c35abfbdc1ea
--- /dev/null
+++ b/depends/README.packages
@@ -0,0 +1,116 @@
+Each recipe consists of 3 main parts: defining identifiers, setting build
+variables, and defining build commands.
+
+The package "mylib" will be used here as an example
+
+General tips:
+mylib_foo is written as $(package)_foo in order to make recipes more similar.
+
+Identifiers:
+Each package is required to define at least these variables:
+  $(package)_version:
+    Version of the upstream library or program. If there is no version, a
+    placeholder such as 1.0 can be used.
+  $(package)_download_path:
+    Location of the upstream source, without the file-name. Usually http or
+    ftp.
+  $(package)_file_name:
+    The upstream source filename available at the download path.
+  $(package)_sha256_hash:
+    The sha256 hash of the upstream file
+
+These variables are optional:
+  $(package)_build_subdir:
+    cd to this dir before running configure/build/stage commands.
+  $(package)_download_file:
+    The file-name of the upstream source if it differs from how it should be
+    stored locally. This can be used to avoid storing file-names with strange
+    characters.
+  $(package)_dependencies:
+    Names of any other packages that this one depends on.
+  $(package)_patches:
+    Filenames of any patches needed to build the package
+
+
+Build Variables:
+After defining the main identifiers, build variables may be added or customized
+before running the build commands. They should be added to a function called
+$(package)_set_vars. For example:
+
+define $(package)_set_vars
+...
+endef
+
+Most variables can be prefixed with the host, architecture, or both, to make
+the modifications specific to that case. For example:
+
+  Universal:         $(package)_cc=gcc
+  Linux only:        $(package)_linux_cc=gcc
+  x86_64 only:       $(package)_x86_64_cc = gcc
+  x86_64 linux only: $(package)_x86_64_linux_cc = gcc
+
+These variables may be set to override or append their default values.
+  $(package)_cc
+  $(package)_cxx
+  $(package)_objc
+  $(package)_objcxx
+  $(package)_ar
+  $(package)_ranlib
+  $(package)_libtool
+  $(package)_nm
+  $(package)_cflags
+  $(package)_cxxflags
+  $(package)_ldflags
+  $(package)_cppflags
+  $(package)_config_env
+  $(package)_build_env
+  $(package)_stage_env
+
+The *_env variables are used to add environment variables to the respective
+commands.
+
+Other variables may be defined as needed.
+
+Build commands:
+
+  For each build, a unique build dir and staging dir are created. For example,
+  work/build/mylib/1.0-1adac830f6e and work/staging/mylib/1.0-1adac830f6e.
+
+  The following build commands are available for each recipe:
+
+  $(package)_fetch_cmds:
+    Runs from: build dir
+    Fetch the source file. If undefined, it will be fetched and verified
+    against its hash.
+  $(package)_extract_cmds:
+    Runs from: build dir
+    Verify the source file against its hash and extract it. If undefined, the
+    source is assumed to be a tarball.
+  $(package)_preprocess_cmds:
+    Runs from: build dir/$(package)_build_subdir
+    Preprocess the source as necessary. If undefined, does nothing.
+  $(package)_config_cmds:
+    Runs from: build dir/$(package)_build_subdir
+    Configure the source. If undefined, does nothing.
+  $(package)_build_cmds:
+    Runs from: build dir/$(package)_build_subdir
+    Build the source. If undefined, does nothing.
+  $(package)_stage_cmds:
+    Runs from: build dir/$(package)_build_subdir
+    Stage the build results. If undefined, does nothing.
+
+  The following variables are available for each recipe:
+  $(1)_staging_dir: package's destination sysroot path
+  $(1)_staging_prefix_dir: prefix path inside of the package's staging dir
+  $(1)_extract_dir: path to the package's extracted sources
+  $(1)_build_dir: path where configure/build/stage commands will be run
+  $(1)_patch_dir: path where the package's patches (if any) are found
+
+Notes on build commands:
+
+For packages built with autotools, $($(package)_autoconf) can be used in the
+configure step to (usually) correctly configure automatically. Any
+$($(package)_config_opts) will be appended.
+
+Most autotools projects can be properly staged using:
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
diff --git a/depends/README.usage b/depends/README.usage
new file mode 100644
index 000000000000..f50714f1f12b
--- /dev/null
+++ b/depends/README.usage
@@ -0,0 +1,29 @@
+To build dependencies for the current arch+OS:
+    make
+To build for another arch/OS:
+  make HOST=host-platform-triplet && make HOST=host-platform-triplet
+  (For example: make HOST=i686-w64-mingw32 -j4)
+
+A prefix will be generated that's suitable for plugging into Bitcoin's
+configure. In the above example, a dir named i686-w64-mingw32 will be
+created. To use it for Bitcoin:
+
+./configure --prefix=`pwd`/depends/i686-w64-mingw32
+
+No other options are needed, the paths are automatically configured.
+
+Dependency Options:
+The following can be set when running make: make FOO=bar
+
+SOURCES_PATH: downloaded sources will be placed here
+BASE_CACHE: built packages will be placed here
+SDK_PATH: Path where sdk's can be found (used by OSX)
+NO_QT: Don't download/build/cache qt and its dependencies
+NO_WALLET: Don't download/build/cache libs needed to enable the wallet
+NO_UPNP: Don't download/build/cache packages needed for enabling upnp
+
+If some packages are not built, for example 'make NO_WALLET=1', the appropriate
+options will be passed to bitcoin's configure. In this case, --disable-wallet.
+
+Additional targets:
+download: run 'make download' to fetch sources without building them
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
new file mode 100644
index 000000000000..6b734648f0ed
--- /dev/null
+++ b/depends/builders/darwin.mk
@@ -0,0 +1,22 @@
+build_darwin_CC: = $(shell xcrun -f clang)
+build_darwin_CXX: = $(shell xcrun -f clang++)
+build_darwin_AR: = $(shell xcrun -f ar)
+build_darwin_RANLIB: = $(shell xcrun -f ranlib)
+build_darwin_STRIP: = $(shell xcrun -f strip)
+build_darwin_OTOOL: = $(shell xcrun -f otool)
+build_darwin_NM: = $(shell xcrun -f nm)
+build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
+build_darwin_SHA256SUM = shasum -a 256
+build_darwin_DOWNLOAD = curl -L -o
+
+#darwin host on darwin builder. overrides darwin host preferences.
+darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)
+darwin_CXX:=$(shell xcrun -f clang++) -mmacosx-version-min=$(OSX_MIN_VERSION)
+darwin_AR:=$(shell xcrun -f ar)
+darwin_RANLIB:=$(shell xcrun -f ranlib)
+darwin_STRIP:=$(shell xcrun -f strip)
+darwin_LIBTOOL:=$(shell xcrun -f libtool)
+darwin_OTOOL:=$(shell xcrun -f otool)
+darwin_NM:=$(shell xcrun -f nm)
+darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
+darwin_native_toolchain=
diff --git a/depends/builders/default.mk b/depends/builders/default.mk
new file mode 100644
index 000000000000..f097db65d603
--- /dev/null
+++ b/depends/builders/default.mk
@@ -0,0 +1,20 @@
+default_build_CC = gcc
+default_build_CXX = g++
+default_build_AR = ar
+default_build_RANLIB = ranlib
+default_build_STRIP = strip
+default_build_NM = nm
+default_build_OTOOL = otool
+default_build_INSTALL_NAME_TOOL = install_name_tool
+
+define add_build_tool_func
+build_$(build_os)_$1 ?= $$(default_build_$1)
+build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
+build_$1=$$(build_$(build_arch)_$(build_os)_$1)
+endef
+$(foreach var,CC CXX AR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL,$(eval $(call add_build_tool_func,$(var))))
+define add_build_flags_func
+build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
+build_$1=$$(build_$(build_arch)_$(build_os)_$1)
+endef
+$(foreach flags, CFLAGS CXXFLAGS LDFLAGS, $(eval $(call add_build_flags_func,$(flags))))
diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk
new file mode 100644
index 000000000000..d98ba597dc7c
--- /dev/null
+++ b/depends/builders/linux.mk
@@ -0,0 +1,2 @@
+build_linux_SHA256SUM = sha256sum
+build_linux_DOWNLOAD = wget -nv -O
diff --git a/depends/config.guess b/depends/config.guess
new file mode 100755
index 000000000000..1f5c50c0d152
--- /dev/null
+++ b/depends/config.guess
@@ -0,0 +1,1420 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-03-23'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    *:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/depends/config.site.in b/depends/config.site.in
new file mode 100644
index 000000000000..4012f5a8d17a
--- /dev/null
+++ b/depends/config.site.in
@@ -0,0 +1,84 @@
+cross_compiling=maybe
+host_alias=@HOST@
+ac_tool_prefix=${host_alias}-
+
+if test -z $with_boost; then
+  with_boost=$prefix
+fi
+if test -z $with_qt_plugindir; then
+  with_qt_plugindir=$prefix/plugins
+fi
+if test -z $with_qt_translationdir; then
+  with_qt_translationdir=$prefix/translations
+fi
+if test -z $with_qt_bindir; then
+  with_qt_bindir=$prefix/native/bin
+fi
+if test -z $with_protoc_bindir; then
+  with_protoc_bindir=$prefix/native/bin
+fi
+if test -z $with_comparison_tool; then
+  with_comparison_tool=$prefix/native/share/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar
+fi
+
+
+if test -z $enable_wallet && test -n "@no_wallet@"; then
+  enable_wallet=no
+fi
+
+if test -z $with_miniupnpc && test -n "@no_upnp@"; then
+  with_miniupnpc=no
+fi
+
+if test -z $with_gui && test -n "@no_qt@"; then
+  with_gui=no
+fi
+
+if test @host_os@ == darwin; then
+  BREW=no
+  PORT=no
+fi
+
+if test @host_os@ == mingw32; then
+  if test -z $with_qt_incdir; then
+    with_qt_incdir=$prefix/include
+  fi
+  if test -z $with_qt_libdir; then
+    with_qt_libdir=$prefix/lib
+  fi
+fi
+
+export PATH=$prefix/native/bin:$PATH
+export PKG_CONFIG="`which pkg-config` --static"
+export PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
+export PKG_CONFIG_PATH=$prefix/share/pkgconfig
+export CPPFLAGS=-I$prefix/include/
+
+export CC="@CC@"
+export CXX="@CXX@"
+export OBJC="${CC}"
+export OBJCXX="${CXX}"
+export CCACHE=$prefix/native/bin/ccache
+
+if test -n "@AR@"; then
+  export AR=@AR@
+  ac_cv_path_ac_pt_AR=${AR}
+fi
+
+if test -n "@RANLIB@"; then
+  export RANLIB=@RANLIB@
+  ac_cv_path_ac_pt_RANLIB=${RANLIB}
+fi
+
+if test -n "@NM@"; then
+  export NM=@NM@
+  ac_cv_path_ac_pt_NM=${NM}
+fi
+
+if test -n "@CFLAGS@"; then
+  export CFLAGS="@CFLAGS@ $CFLAGS"
+fi
+if test -n "@CXXFLAGS@"; then
+  export CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
+fi
+export LDFLAGS="-L$prefix/lib @LDFLAGS@ $LDFLAGS"
diff --git a/depends/config.sub b/depends/config.sub
new file mode 100755
index 000000000000..d654d03cdcd2
--- /dev/null
+++ b/depends/config.sub
@@ -0,0 +1,1794 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2014 Free Software Foundation, Inc.
+
+timestamp='2014-05-01'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2014 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| be32 | be64 \
+	| bfin \
+	| c4x | c8051 | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| k1om \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
+	| ns16k | ns32k \
+	| open8 | or1k | or1knd | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| k1om-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| or1k*-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	c8051-*)
+		os=-elf
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/depends/funcs.mk b/depends/funcs.mk
new file mode 100644
index 000000000000..4c47cc926e25
--- /dev/null
+++ b/depends/funcs.mk
@@ -0,0 +1,219 @@
+define int_vars
+#Set defaults for vars which may be overridden per-package
+$(1)_cc=$($($(1)_type)_CC)
+$(1)_cxx=$($($(1)_type)_CXX)
+$(1)_objc=$($($(1)_type)_OBJC)
+$(1)_objcxx=$($($(1)_type)_OBJCXX)
+$(1)_ar=$($($(1)_type)_AR)
+$(1)_ranlib=$($($(1)_type)_RANLIB)
+$(1)_libtool=$($($(1)_type)_LIBTOOL)
+$(1)_nm=$($($(1)_type)_NM)
+$(1)_cflags=$($($(1)_type)_CFLAGS)
+$(1)_cxxflags=$($($(1)_type)_CXXFLAGS)
+$(1)_ldflags=$($($(1)_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
+$(1)_cppflags:=-I$($($(1)_type)_prefix)/include
+$(1)_recipe_hash:=
+endef
+
+define int_get_all_dependencies
+$(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dependencies))))
+endef
+
+define fetch_file
+(test -f $(SOURCES_PATH)/$(3) || ( mkdir -p $$($(1)_extract_dir) && $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)" && echo "$(4)  $$($(1)_extract_dir)/$(3).temp" | $(build_SHA256SUM) -c && mv $$($(1)_extract_dir)/$(3).temp $(SOURCES_PATH)/$(3) ))
+endef
+
+define int_get_build_recipe_hash
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches))))
+$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM)))
+endef
+
+define int_get_build_id
+$(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
+$(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
+$(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
+$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash) $($(1)_build_id_deps))
+$(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
+final_build_id_long+=$($(package)_build_id_long)
+
+#compute package-specific paths
+$(1)_build_subdir?=.
+$(1)_download_file?=$($(1)_file_name)
+$(1)_source:=$(SOURCES_PATH)/$($(1)_file_name)
+$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
+$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
+$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
+$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
+$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
+$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
+$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
+
+#stamps
+$(1)_fetched=$$($(1)_extract_dir)/.stamp_fetched
+$(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted
+$(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed
+$(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned
+$(1)_built=$$($(1)_build_dir)/.stamp_built
+$(1)_configured=$$($(1)_build_dir)/.stamp_configured
+$(1)_staged=$$($(1)_staging_dir)/.stamp_staged
+$(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed
+$(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
+
+
+#default commands
+$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)/$$($(1)_download_file)),$($(1)_file_name),$($(1)_sha256_hash))
+$(1)_extract_cmds ?= echo "$$($(1)_sha256_hash)  $$($(1)_source)" | $(build_SHA256SUM) -c && tar --strip-components=1 -xf $$($(1)_source)
+$(1)_preprocess_cmds ?=
+$(1)_build_cmds ?=
+$(1)_config_cmds ?=
+$(1)_stage_cmds ?=
+$(1)_set_vars ?=
+
+
+all_sources+=$$($(1)_fetched)
+endef
+#$(foreach dep_target,$($(1)_all_dependencies),$(eval $(1)_dependency_targets=$($(dep_target)_cached)))
+
+
+define int_config_attach_build_config
+$(eval $(call $(1)_set_vars,$(1)))
+$(1)_cflags+=$($(1)_cflags_$(host_arch))
+$(1)_cflags+=$($(1)_cflags_$(host_os))
+$(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os))
+
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch))
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_os))
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os))
+
+$(1)_cppflags+=$($(1)_cppflags_$(host_arch))
+$(1)_cppflags+=$($(1)_cppflags_$(host_os))
+$(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os))
+
+$(1)_ldflags+=$($(1)_ldflags_$(host_arch))
+$(1)_ldflags+=$($(1)_ldflags_$(host_os))
+$(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os))
+
+$(1)_build_opts+=$$($(1)_build_opts_$(host_arch))
+$(1)_build_opts+=$$($(1)_build_opts_$(host_os))
+$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os))
+
+$(1)_config_opts+=$$($(1)_config_opts_$(host_arch))
+$(1)_config_opts+=$$($(1)_config_opts_$(host_os))
+$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os))
+
+$(1)_config_env+=$($(1)_config_env_$(host_arch))
+$(1)_config_env+=$($(1)_config_env_$(host_os))
+$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os))
+
+$(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
+$(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
+$(1)_config_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_build_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
+$(1)_autoconf=./configure --host=$($($(1)_type)_host) --disable-dependency-tracking --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
+
+ifneq ($($(1)_nm),)
+$(1)_autoconf += NM="$$($(1)_nm)"
+endif
+ifneq ($($(1)_ranlib),)
+$(1)_autoconf += RANLIB="$$($(1)_ranlib)"
+endif
+ifneq ($($(1)_ar),)
+$(1)_autoconf += AR="$$($(1)_ar)"
+endif
+ifneq ($($(1)_cflags),)
+$(1)_autoconf += CFLAGS="$$($(1)_cflags)"
+endif
+ifneq ($($(1)_cxxflags),)
+$(1)_autoconf += CXXFLAGS="$$($(1)_cxxflags)"
+endif
+ifneq ($($(1)_cppflags),)
+$(1)_autoconf += CPPFLAGS="$$($(1)_cppflags)"
+endif
+ifneq ($($(1)_ldflags),)
+$(1)_autoconf += LDFLAGS="$$($(1)_ldflags)"
+endif
+endef
+
+define int_add_cmds
+$($(1)_fetched):
+	$(AT)echo Fetching $(1)...
+	$(AT)mkdir -p $$(@D) $(SOURCES_PATH)
+	$(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1))
+	$(AT)touch $$@
+$($(1)_extracted): | $($(1)_fetched)
+	$(AT)echo Extracting $(1)...
+	$(AT)mkdir -p $$(@D)
+	$(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1))
+	$(AT)touch $$@
+$($(1)_preprocessed): | $($(1)_dependencies) $($(1)_extracted)
+	$(AT)echo Preprocessing $(1)...
+	$(AT)mkdir -p $$(@D) $($(1)_patch_dir)
+	$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
+	$(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
+	$(AT)touch $$@
+$($(1)_configured): | $($(1)_preprocessed)
+	$(AT)echo Configuring $(1)...
+	$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); )
+	$(AT)mkdir -p $$(@D)
+	$(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1))
+	$(AT)touch $$@
+$($(1)_built): | $($(1)_configured)
+	$(AT)echo Building $(1)...
+	$(AT)mkdir -p $$(@D)
+	$(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1))
+	$(AT)touch $$@
+$($(1)_staged): | $($(1)_built)
+	$(AT)echo Staging $(1)...
+	$(AT)mkdir -p $($(1)_staging_dir)/$(host_prefix)
+	$(AT)cd $($(1)_build_dir); $($(1)_stage_env) $(call $(1)_stage_cmds, $(1))
+	$(AT)rm -rf $($(1)_extract_dir)
+	$(AT)touch $$@
+$($(1)_postprocessed): | $($(1)_staged)
+	$(AT)echo Postprocessing $(1)...
+	$(AT)cd $($(1)_staging_prefix_dir); $(call $(1)_postprocess_cmds)
+	$(AT)touch $$@
+$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
+	$(AT)echo Caching $(1)...
+	$(AT)cd $$($(1)_staging_dir)/$(host_prefix); find . | sort | tar --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
+	$(AT)mkdir -p $$(@D)
+	$(AT)rm -rf $$(@D) && mkdir -p $$(@D)
+	$(AT)mv $$($(1)_staging_dir)/$$(@F) $$(@)
+	$(AT)rm -rf $($(1)_staging_dir)
+
+.PHONY: $(1)
+$(1): | $($(1)_cached)
+.SECONDARY: $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched)
+
+endef
+
+# These functions create the build targets for each package. They must be
+# broken down into small steps so that each part is done for all packages
+# before moving on to the next step. Otherwise, a package's info
+# (build-id for example) would only be avilable to another package if it
+# happened to be computed already.
+
+#set the type for host/build packages.
+$(foreach native_package,$(native_packages),$(eval $(native_package)_type=build))
+$(foreach package,$(packages),$(eval $(package)_type=$(host_arch)_$(host_os)))
+
+#set overridable defaults
+$(foreach package,$(all_packages),$(eval $(call int_vars,$(package))))
+
+#include package files
+$(foreach package,$(all_packages),$(eval include packages/$(package).mk))
+
+#compute a hash of all files that comprise this package's build recipe
+$(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package))))
+
+#generate a unique id for this package, incorporating its dependencies as well
+$(foreach package,$(all_packages),$(eval $(call int_get_build_id,$(package))))
+
+#compute final vars after reading package vars
+$(foreach package,$(all_packages),$(eval $(call int_config_attach_build_config,$(package))))
+
+#create build targets
+$(foreach package,$(all_packages),$(eval $(call int_add_cmds,$(package))))
+
+#special exception: if a toolchain package exists, all non-native packages depend on it
+$(foreach package,$(packages),$(eval $($(package)_unpacked): |$($($(host_arch)_$(host_os)_native_toolchain)_cached) ))
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
new file mode 100644
index 000000000000..9e2415655e20
--- /dev/null
+++ b/depends/hosts/darwin.mk
@@ -0,0 +1,8 @@
+OSX_MIN_VERSION=10.6
+OSX_SDK_VERSION=10.7
+OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
+darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
+darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
+darwin_CFLAGS=-pipe -O2
+darwin_CXXFLAGS=$(darwin_CFLAGS)
+darwin_native_toolchain=native_cctools
diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk
new file mode 100644
index 000000000000..b9fe5d858a79
--- /dev/null
+++ b/depends/hosts/default.mk
@@ -0,0 +1,23 @@
+default_host_CC = $(host_toolchain)gcc
+default_host_CXX = $(host_toolchain)g++
+default_host_AR = $(host_toolchain)ar
+default_host_RANLIB = $(host_toolchain)ranlib
+default_host_STRIP = $(host_toolchain)strip
+default_host_LIBTOOL = $(host_toolchain)libtool
+default_host_INSTALL_NAME_TOOL = $(host_toolchain)install_name_tool
+default_host_OTOOL = $(host_toolchain)otool
+default_host_NM = $(host_toolchain)nm
+
+define add_host_tool_func
+$(host_os)_$1?=$$(default_host_$1)
+$(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
+host_$1=$$($(host_arch)_$(host_os)_$1)
+endef
+
+define add_host_flags_func
+$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
+host_$1 = $$($(host_arch)_$(host_os)_$1)
+endef
+
+$(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
+$(foreach flags,CFLAGS CXXFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk
new file mode 100644
index 000000000000..194d71d55765
--- /dev/null
+++ b/depends/hosts/linux.mk
@@ -0,0 +1,23 @@
+linux_CFLAGS=-pipe -O2
+linux_CXXFLAGS=$(linux_CFLAGS)
+
+ifeq (86,$(findstring 86,$(build_arch)))
+i686_linux_CC=gcc -m32
+i686_linux_CXX=g++ -m32
+i686_linux_AR=ar
+i686_linux_RANLIB=ranlib
+i686_linux_NM=nm
+i686_linux_STRIP=strip
+
+x86_64_linux_CC=gcc -m64
+x86_64_linux_CXX=g++ -m64
+x86_64_linux_AR=ar
+x86_64_linux_RANLIB=ranlib
+x86_64_linux_NM=nm
+x86_64_linux_STRIP=strip
+else
+i686_linux_CC=$(default_host_CC) -m32
+i686_linux_CXX=$(default_host_CXX) -m32
+x86_64_linux_CC=$(default_host_CC) -m64
+x86_64_linux_CXX=$(default_host_CXX) -m64
+endif
diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk
new file mode 100644
index 000000000000..ffe4a5584239
--- /dev/null
+++ b/depends/hosts/mingw32.mk
@@ -0,0 +1,2 @@
+mingw32_CFLAGS=-pipe -O2
+mingw32_CXXFLAGS=$(mingw32_CFLAGS)
diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
new file mode 100644
index 000000000000..503409c5e5bc
--- /dev/null
+++ b/depends/packages/bdb.mk
@@ -0,0 +1,29 @@
+package=bdb
+$(package)_version=4.8.30
+$(package)_download_path=http://download.oracle.com/berkeley-db
+$(package)_file_name=db-$($(package)_version).NC.tar.gz
+$(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef
+$(package)_build_subdir=build_unix
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared --enable-cxx
+$(package)_config_opts_mingw32=--enable-mingw
+$(package)_config_opts_x86_64_linux=--with-pic
+$(package)_config_opts_arm_linux=--with-pic
+endef
+
+define $(package)_preprocess_cmds
+  sed -i.old 's/__atomic_compare_exchange/__atomic_compare_exchange_db/' dbinc/atomic.h
+endef
+
+define $(package)_config_cmds
+  ../dist/$($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) libdb_cxx-4.8.a libdb-4.8.a
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install_lib install_include
+endef
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
new file mode 100644
index 000000000000..a3cacbcbb6f8
--- /dev/null
+++ b/depends/packages/boost.mk
@@ -0,0 +1,42 @@
+package=boost
+$(package)_version=1_55_0
+$(package)_download_path=http://sourceforge.net/projects/boost/files/boost/1.55.0
+$(package)_file_name=$(package)_$($(package)_version).tar.bz2
+$(package)_sha256_hash=fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52
+$(package)_patches=darwin_boost_atomic-1.patch darwin_boost_atomic-2.patch
+
+define $(package)_set_vars
+$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
+$(package)_config_opts+=variant=release threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
+$(package)_config_opts_linux=threadapi=pthread runtime-link=shared
+$(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
+$(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
+$(package)_config_opts_x86_64_mingw32=address-model=64
+$(package)_config_opts_i686_mingw32=address-model=32
+$(package)_config_opts_i686_linux=address-model=32 architecture=x86
+$(package)_toolset_$(host_os)=gcc
+$(package)_archiver_$(host_os)=$($(package)_ar)
+$(package)_toolset_darwin=darwin
+$(package)_archiver_darwin=$($(package)_libtool)
+$(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
+$(package)_cxxflags_x86_64_linux=-fPIC
+$(package)_cxxflags_arm_linux=-fPIC
+endef
+
+define $(package)_preprocess_cmds
+  patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-1.patch && \
+  patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-2.patch && \
+  echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\"  <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
+endef
+
+define $(package)_config_cmds
+  ./bootstrap.sh --without-icu --with-libraries=$(boost_config_libraries)
+endef
+
+define $(package)_build_cmds
+  ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) stage
+endef
+
+define $(package)_stage_cmds
+  ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) install
+endef
diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk
new file mode 100644
index 000000000000..8ac9ab742bfe
--- /dev/null
+++ b/depends/packages/dbus.mk
@@ -0,0 +1,23 @@
+package=dbus
+$(package)_version=1.8.6
+$(package)_download_path=http://dbus.freedesktop.org/releases/dbus
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=eded83ca007b719f32761e60fd8b9ffd0f5796a4caf455b01b5a5ef740ebd23f
+$(package)_dependencies=expat
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-tests --disable-doxygen-docs --disable-xml-docs --disable-static --without-x
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -C dbus libdbus-1.la
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) -C dbus DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-dbusincludeHEADERS install-nodist_dbusarchincludeHEADERS && \
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
+endef
diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk
new file mode 100644
index 000000000000..1ac443537420
--- /dev/null
+++ b/depends/packages/expat.mk
@@ -0,0 +1,21 @@
+package=expat
+$(package)_version=2.1.0
+$(package)_download_path=http://sourceforge.net/projects/expat/files/expat/$($(package)_version)
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=823705472f816df21c8f6aa026dd162b280806838bb55b3432b0fb1fcca7eb86
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk
new file mode 100644
index 000000000000..2cf553ed9657
--- /dev/null
+++ b/depends/packages/fontconfig.mk
@@ -0,0 +1,22 @@
+package=fontconfig
+$(package)_version=2.11.1
+$(package)_download_path=http://www.freedesktop.org/software/fontconfig/release/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=dc62447533bca844463a3c3fd4083b57c90f18a70506e7a9f4936b5a1e516a99
+$(package)_dependencies=freetype expat
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-docs --disable-static
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
new file mode 100644
index 000000000000..b83cbd93eafe
--- /dev/null
+++ b/depends/packages/freetype.mk
@@ -0,0 +1,22 @@
+package=freetype
+$(package)_version=2.5.3
+$(package)_download_path=http://downloads.sourceforge.net/$(package)
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358e65f75e
+
+define $(package)_set_vars
+  $(package)_config_opts=--without-zlib --without-png --disable-static
+  $(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk
new file mode 100644
index 000000000000..144021e34b04
--- /dev/null
+++ b/depends/packages/libX11.mk
@@ -0,0 +1,23 @@
+package=libX11
+$(package)_version=1.6.2
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=2aa027e837231d2eeea90f3a4afe19948a6eb4c8b2bec0241eba7dbc8106bd16
+$(package)_dependencies=libxcb xtrans xextproto xproto
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-xkb --disable-static
+$(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk
new file mode 100644
index 000000000000..8c9b21846b26
--- /dev/null
+++ b/depends/packages/libXau.mk
@@ -0,0 +1,23 @@
+package=libXau
+$(package)_version=1.0.8
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2
+$(package)_dependencies=xproto
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-shared
+  $(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk
new file mode 100644
index 000000000000..4db836066f96
--- /dev/null
+++ b/depends/packages/libXext.mk
@@ -0,0 +1,22 @@
+package=libXext
+$(package)_version=1.3.2
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=f829075bc646cdc085fa25d98d5885d83b1759ceb355933127c257e8e50432e0
+$(package)_dependencies=xproto xextproto libX11 libXau
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-static
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk
new file mode 100644
index 000000000000..f29b577f8aca
--- /dev/null
+++ b/depends/packages/libxcb.mk
@@ -0,0 +1,30 @@
+package=libxcb
+$(package)_version=1.10
+$(package)_download_path=http://xcb.freedesktop.org/dist
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=98d9ab05b636dd088603b64229dd1ab2d2cc02ab807892e107d674f9c3f2d5b5
+$(package)_dependencies=xcb_proto libXau xproto
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-static
+endef
+
+define $(package)_preprocess_cmds
+  sed "s/pthread-stubs//" -i configure
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf share/man share/doc
+endef
diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
new file mode 100644
index 000000000000..6dd7d93b07ba
--- /dev/null
+++ b/depends/packages/miniupnpc.mk
@@ -0,0 +1,28 @@
+package=miniupnpc
+$(package)_version=1.9
+$(package)_download_path=http://miniupnp.free.fr/files
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464
+
+define $(package)_set_vars
+$(package)_build_opts=CC="$($(package)_cc)"
+$(package)_build_opts_darwin=OS=Darwin
+$(package)_build_opts_mingw32=-f Makefile.mingw
+$(package)_build_env+=CFLAGS="$($(package)_cflags)" AR="$($(package)_ar)"
+endef
+
+define $(package)_preprocess_cmds
+  mkdir dll && \
+  sed -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"$($(package)_version)\"|' -e 's|OS/version|$(host)|' miniupnpcstrings.h.in > miniupnpcstrings.h && \
+  sed -i.old "s|miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings|miniupnpcstrings.h: miniupnpcstrings.h.in|" Makefile.mingw
+endef
+
+define $(package)_build_cmds
+	$(MAKE) libminiupnpc.a $($(package)_build_opts)
+endef
+
+define $(package)_stage_cmds
+	mkdir -p $($(package)_staging_prefix_dir)/include/miniupnpc $($(package)_staging_prefix_dir)/lib &&\
+	install *.h $($(package)_staging_prefix_dir)/include/miniupnpc &&\
+	install libminiupnpc.a $($(package)_staging_prefix_dir)/lib
+endef
diff --git a/depends/packages/native_ccache.mk b/depends/packages/native_ccache.mk
new file mode 100644
index 000000000000..3226e89a63ea
--- /dev/null
+++ b/depends/packages/native_ccache.mk
@@ -0,0 +1,25 @@
+package=native_ccache
+$(package)_version=3.1.9
+$(package)_download_path=http://samba.org/ftp/ccache
+$(package)_file_name=ccache-$($(package)_version).tar.bz2
+$(package)_sha256_hash=04d3e2e438ac8d4cc4b110b68cdd61bd59226c6588739a4a386869467f5ced7c
+
+define $(package)_set_vars
+$(package)_config_opts=
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf lib include
+endef
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk
new file mode 100644
index 000000000000..e3ba9685b456
--- /dev/null
+++ b/depends/packages/native_cctools.mk
@@ -0,0 +1,80 @@
+package=native_cctools
+$(package)_version=809
+$(package)_download_path=http://www.opensource.apple.com/tarballs/cctools
+$(package)_file_name=cctools-$($(package)_version).tar.gz
+$(package)_sha256_hash=03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad
+$(package)_build_subdir=cctools2odcctools/odcctools-$($(package)_version)
+$(package)_dependencies=native_libuuid native_openssl
+$(package)_ld64_download_file=ld64-127.2.tar.gz
+$(package)_ld64_download_path=http://www.opensource.apple.com/tarballs/ld64
+$(package)_ld64_file_name=$($(package)_ld64_download_file)
+$(package)_ld64_sha256_hash=97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142
+$(package)_dyld_download_file=dyld-195.5.tar.gz
+$(package)_dyld_download_path=http://www.opensource.apple.com/tarballs/dyld
+$(package)_dyld_file_name=$($(package)_dyld_download_file)
+$(package)_dyld_sha256_hash=2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c
+$(package)_toolchain4_download_file=10cc648683617cca8bcbeae507888099b41b530c.tar.gz
+$(package)_toolchain4_download_path=https://github.com/mingwandroid/toolchain4/archive
+$(package)_toolchain4_file_name=toolchain4-1.tar.gz
+$(package)_toolchain4_sha256_hash=18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca
+$(package)_clang_download_file=clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+$(package)_clang_download_path=http://llvm.org/releases/3.2
+$(package)_clang_file_name=clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
+$(package)_clang_sha256_hash=b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_ld64_download_path)/$($(package)_ld64_download_file),$($(package)_ld64_file_name),$($(package)_ld64_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_dyld_download_path)/$($(package)_dyld_download_file),$($(package)_dyld_file_name),$($(package)_dyld_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_clang_download_path)/$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_toolchain4_download_path)/$($(package)_toolchain4_download_file),$($(package)_toolchain4_file_name),$($(package)_toolchain4_sha256_hash))
+endef
+
+define $(package)_set_vars
+$(package)_config_opts=--target=$(host) --with-sysroot=$(OSX_SDK)
+$(package)_cflags+=-m32
+$(package)_cxxflags+=-m32
+$(package)_cppflags+=-D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
+$(package)_ldflags+=-m32 -Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
+$(package)_ldflags+=-L$$(native_cctools_extract_dir)/clang+llvm-3.2-x86-linux-ubuntu-12.04/lib
+endef
+define $(package)_extract_cmds
+  tar --strip-components=1 -xf $(SOURCES_PATH)/$($(package)_toolchain4_file_name) && \
+  ln -sf $($(package)_source) cctools2odcctools/$($(package)_file_name) && \
+  ln -sf $(SOURCES_PATH)/$($(package)_ld64_file_name) cctools2odcctools/$($(package)_ld64_file_name) && \
+  ln -sf $(SOURCES_PATH)/$($(package)_dyld_file_name) cctools2odcctools/$($(package)_dyld_file_name) && \
+  tar xf $(SOURCES_PATH)/$($(package)_clang_file_name) && \
+  mkdir -p $(SDK_PATH) sdks &&\
+  cd sdks; ln -sf $(OSX_SDK) MacOSX$(OSX_SDK_VERSION).sdk
+endef
+
+define $(package)_preprocess_cmds
+  sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" cctools2odcctools/extract.sh && \
+  sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" cctools2odcctools/extract.sh && \
+  sed -i "s|/llvmCore/include/llvm-c|/include/llvm-c \$$$${LLVM_CLANG_DIR}/include/llvm |" cctools2odcctools/extract.sh && \
+  sed -i "s|fAC_INIT|AC_INIT|" cctools2odcctools/files/configure.ac && \
+  sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' cctools2odcctools/files/configure.ac && \
+  cd cctools2odcctools; ./extract.sh --osxver $(OSX_SDK_VERSION) && \
+  sed -i "s|define\tPC|define\tPC_|" odcctools-809/include/architecture/sparc/reg.h
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install && \
+  cd ../../clang+llvm-3.2-x86-linux-ubuntu-12.04 && \
+  mkdir -p $($(package)_staging_prefix_dir)/lib/clang/3.2/include && \
+  mkdir -p $($(package)_staging_prefix_dir)/bin && \
+  cp -P bin/clang bin/clang++ $($(package)_staging_prefix_dir)/bin/ &&\
+  cp lib/libLTO.so $($(package)_staging_prefix_dir)/lib/ && \
+  cp lib/clang/3.2/include/* $($(package)_staging_prefix_dir)/lib/clang/3.2/include/ && \
+  echo "#!/bin/sh" > $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
+  echo "exit 0" >> $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil && \
+  chmod +x $($(package)_staging_prefix_dir)/bin/$(host)-dsymutil
+endef
diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk
new file mode 100644
index 000000000000..2cc388b4b30c
--- /dev/null
+++ b/depends/packages/native_cdrkit.mk
@@ -0,0 +1,26 @@
+package=native_cdrkit
+$(package)_version=1.1.11
+$(package)_download_path=http://distro.ibiblio.org/fatdog/source/c
+$(package)_file_name=cdrkit-$($(package)_version).tar.bz2
+$(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
+$(package)_patches=cdrkit-deterministic.patch
+
+define $(package)_preprocess_cmds
+  patch -p1 < $($(package)_patch_dir)/cdrkit-deterministic.patch
+endef
+
+define $(package)_config_cmds
+  cmake -DCMAKE_INSTALL_PREFIX=$(build_prefix)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) genisoimage
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) -C genisoimage install
+endef
+
+define $(package)_postprocess_cmds
+  rm bin/isovfy bin/isoinfo bin/isodump bin/isodebug bin/devdump
+endef
diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
new file mode 100644
index 000000000000..5eef73052fc5
--- /dev/null
+++ b/depends/packages/native_comparisontool.mk
@@ -0,0 +1,44 @@
+package=native_comparisontool
+$(package)_version=1
+$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/master/BitcoindComparisonTool_jar
+$(package)_file_name=BitcoindComparisonTool.jar
+$(package)_sha256_hash=a08b1a55523e7f57768cb66c35f47a926710e5b6c82822e1ccfbe38fcce37db2
+$(package)_guava_file_name=guava-13.0.1.jar
+$(package)_guava_sha256_hash=feb4b5b2e79a63b72ec47a693b1cf35cf1cea1f60a2bb2615bf21f74c7a60bb0
+$(package)_h2_file_name=h2-1.3.167.jar
+$(package)_h2_sha256_hash=fa97521a2e72174485a96276bcf6f573d5e44ca6aba2f62de87b33b5bb0d4b91
+$(package)_sc-light-jdk15on_file_name=sc-light-jdk15on-1.47.0.2.jar
+$(package)_sc-light-jdk15on_sha256_hash=931f39d351429fb96c2f749e7ecb1a256a8ebbf5edca7995c9cc085b94d1841d
+$(package)_slf4j-api_file_name=slf4j-api-1.6.4.jar
+$(package)_slf4j-api_sha256_hash=367b909030f714ee1176ab096b681e06348f03385e98d1bce0ed801b5452357e
+$(package)_slf4j-jdk14_file_name=slf4j-jdk14-1.6.4.jar
+$(package)_slf4j-jdk14_sha256_hash=064bd81796710f713f9f4a2309c0e032309934c2d2b4f7d3b6958325e584e13f
+
+define $(package)_fetch_cmds
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_guava_file_name),$($(package)_guava_file_name),$($(package)_guava_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_h2_file_name),$($(package)_h2_file_name),$($(package)_h2_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_sha256_hash))
+endef
+
+define $(package)_extract_cmds
+echo none
+endef
+
+define $(package)_configure_cmds
+endef
+
+define $(package)_build_cmds
+endef
+
+define $(package)_stage_cmds
+  mkdir -p $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar && \
+  cp $(SOURCES_PATH)/$($(package)_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
+  cp $(SOURCES_PATH)/$($(package)_guava_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
+  cp $(SOURCES_PATH)/$($(package)_h2_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
+  cp $(SOURCES_PATH)/$($(package)_sc-light-jdk15on_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
+  cp $(SOURCES_PATH)/$($(package)_slf4j-api_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
+  cp $(SOURCES_PATH)/$($(package)_slf4j-jdk14_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/
+endef
diff --git a/depends/packages/native_libdmg-hfsplus.mk b/depends/packages/native_libdmg-hfsplus.mk
new file mode 100644
index 000000000000..a4ffb6046ccc
--- /dev/null
+++ b/depends/packages/native_libdmg-hfsplus.mk
@@ -0,0 +1,22 @@
+package=native_libdmg-hfsplus
+$(package)_version=0.1
+$(package)_download_path=https://github.com/theuni/libdmg-hfsplus/archive
+$(package)_file_name=libdmg-hfsplus-v$($(package)_version).tar.gz
+$(package)_sha256_hash=6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3
+$(package)_build_subdir=build
+
+define $(package)_preprocess_cmds
+  mkdir build
+endef
+
+define $(package)_config_cmds
+  cmake -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)/bin ..
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -C dmg
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) -C dmg install
+endef
diff --git a/depends/packages/native_libuuid.mk b/depends/packages/native_libuuid.mk
new file mode 100644
index 000000000000..b25540f80dfa
--- /dev/null
+++ b/depends/packages/native_libuuid.mk
@@ -0,0 +1,24 @@
+package:=native_libuuid
+$(package)_version=1.41.14
+$(package)_download_path=http://downloads.sourceforge.net/e2fsprogs
+$(package)_file_name=e2fsprogs-libs-$($(package)_version).tar.gz
+$(package)_sha256_hash=dbc7a138a3218d9b80a0626b5b692d76934d6746d8cbb762751be33785d8d9f5
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-elf-shlibs --disable-uuidd
+$(package)_cflags+=-m32
+$(package)_ldflags+=-m32
+$(package)_cxxflags+=-m32
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -C lib/uuid
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) -C lib/uuid install
+endef
diff --git a/depends/packages/native_openssl.mk b/depends/packages/native_openssl.mk
new file mode 100644
index 000000000000..1f25d6afccd6
--- /dev/null
+++ b/depends/packages/native_openssl.mk
@@ -0,0 +1,21 @@
+package=native_openssl
+$(package)_version=1.0.1h
+$(package)_download_path=https://www.openssl.org/source
+$(package)_file_name=openssl-$($(package)_version).tar.gz
+$(package)_sha256_hash=9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093
+define $(package)_set_vars
+$(package)_build_config_opts= --prefix=$(build_prefix) no-zlib no-shared no-krb5C linux-generic32 -m32
+endef
+
+define $(package)_config_cmds
+  ./Configure $($(package)_build_config_opts) &&\
+  sed -i "s|engines apps test|engines|" Makefile
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -j1
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw
+endef
diff --git a/depends/packages/native_protobuf.mk b/depends/packages/native_protobuf.mk
new file mode 100644
index 000000000000..ed1a771f0d5e
--- /dev/null
+++ b/depends/packages/native_protobuf.mk
@@ -0,0 +1,25 @@
+package=native_protobuf
+$(package)_version=2.5.0
+$(package)_download_path=https://protobuf.googlecode.com/files
+$(package)_file_name=protobuf-$($(package)_version).tar.bz2
+$(package)_sha256_hash=13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -C src protoc
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) -C src DESTDIR=$($(package)_staging_dir) install-strip
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf lib include
+endef
diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
new file mode 100644
index 000000000000..1fb8edb09910
--- /dev/null
+++ b/depends/packages/openssl.mk
@@ -0,0 +1,40 @@
+package=openssl
+$(package)_version=1.0.1h
+$(package)_download_path=https://www.openssl.org/source
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093
+
+define $(package)_set_vars
+$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
+$(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl no-zlib no-shared no-dso
+$(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2
+$(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl3
+$(package)_config_opts+=$($(package)_cflags)
+$(package)_config_opts_x86_64_linux=-fPIC linux-x86_64
+$(package)_config_opts_arm_linux=-fPIC linux-generic32
+$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
+$(package)_config_opts_x86_64_mingw32=mingw64
+$(package)_config_opts_i686_mingw32=mingw
+$(package)_config_opts_i686_linux=linux-generic32 -fPIC
+endef
+
+define $(package)_preprocess_cmds
+  sed -i.old "/define DATE/d" crypto/Makefile && \
+  sed -i.old "s|engines apps test|engines|" Makefile.org
+endef
+
+define $(package)_config_cmds
+  ./Configure $($(package)_config_opts)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -j1 build_libs libcrypto.pc libssl.pc openssl.pc
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) INSTALL_PREFIX=$($(package)_staging_dir) -j1 install_sw
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf share bin etc
+endef
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
new file mode 100644
index 000000000000..260cadb214b8
--- /dev/null
+++ b/depends/packages/packages.mk
@@ -0,0 +1,14 @@
+packages:=boost openssl
+native_packages := native_ccache native_comparisontool
+
+qt_native_packages = native_protobuf
+qt_packages = qt qrencode protobuf
+qt_linux_packages=expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
+
+wallet_packages=bdb
+
+upnp_packages=miniupnpc
+
+ifneq ($(build_os),darwin)
+darwin_native_packages=native_libuuid native_openssl native_cctools native_cdrkit native_libdmg-hfsplus
+endif
diff --git a/depends/packages/protobuf.mk b/depends/packages/protobuf.mk
new file mode 100644
index 000000000000..716f837853b5
--- /dev/null
+++ b/depends/packages/protobuf.mk
@@ -0,0 +1,28 @@
+package=protobuf
+$(package)_version=$(native_$(package)_version)
+$(package)_download_path=$(native_$(package)_download_path)
+$(package)_file_name=$(native_$(package)_file_name)
+$(package)_sha256_hash=$(native_$(package)_sha256_hash)
+$(package)_dependencies=native_$(package)
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
+  $(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE) -C src libprotobuf.la
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
+endef
+
+define $(package)_postprocess_cmds
+  rm lib/libprotoc.a
+endef
diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk
new file mode 100644
index 000000000000..69d2982cbcb9
--- /dev/null
+++ b/depends/packages/qrencode.mk
@@ -0,0 +1,22 @@
+package=qrencode
+$(package)_version=3.4.3
+$(package)_download_path=https://fukuchi.org/works/qrencode/
+$(package)_file_name=qrencode-$(qrencode_version).tar.bz2
+$(package)_sha256_hash=dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared -without-tools --disable-sdltest
+$(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
new file mode 100644
index 000000000000..cce7d6e6efa4
--- /dev/null
+++ b/depends/packages/qt.mk
@@ -0,0 +1,89 @@
+PACKAGE=qt
+$(package)_version=5.2.1
+$(package)_download_path=http://download.qt-project.org/official_releases/qt/5.2/$($(package)_version)/single
+$(package)_file_name=$(package)-everywhere-opensource-src-$($(package)_version).tar.gz
+$(package)_sha256_hash=84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1
+$(package)_dependencies=openssl
+$(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
+$(package)_build_subdir=qtbase
+$(package)_qt_libs=corelib network widgets gui plugins testlib
+$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch
+
+define $(package)_set_vars
+$(package)_config_opts  = -release -opensource -confirm-license
+$(package)_config_opts += -no-audio-backend -no-sql-tds -no-glib -no-icu
+$(package)_config_opts += -no-cups -no-iconv -no-gif -no-audio-backend -no-freetype
+$(package)_config_opts += -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch
+$(package)_config_opts += -no-gif -no-feature-style-plastique
+$(package)_config_opts += -no-qml-debug -no-pch -no-nis -nomake examples -nomake tests
+$(package)_config_opts += -no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif
+$(package)_config_opts += -no-feature-style-windowsmobile -no-feature-style-windowsce
+$(package)_config_opts += -no-feature-style-cleanlooks
+$(package)_config_opts += -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql
+$(package)_config_opts += -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2
+$(package)_config_opts += -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport
+$(package)_config_opts += -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtx11extras
+$(package)_config_opts += -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns
+$(package)_config_opts += -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtmacextras
+$(package)_config_opts += -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc
+
+$(package)_config_opts += -prefix $(host_prefix) -bindir $(build_prefix)/bin
+$(package)_config_opts += -no-c++11 -openssl-linked  -v -static -silent -pkg-config
+$(package)_config_opts += -qt-libpng -qt-libjpeg -qt-zlib -qt-pcre
+
+ifneq ($(build_os),darwin)
+$(package)_config_opts_darwin = -xplatform macx-clang-linux -device-option MAC_SDK_PATH=$(OSX_SDK) -device-option CROSS_COMPILE="$(host)-"
+$(package)_config_opts_darwin += -device-option MAC_MIN_VERSION=$(OSX_MIN_VERSION) -device-option MAC_TARGET=$(host)
+endif
+
+$(package)_config_opts_linux  = -qt-xkbcommon -qt-xcb  -no-eglfs -no-linuxfb -system-freetype -no-sm -fontconfig -no-xinput2 -no-libudev -no-egl -no-opengl
+$(package)_config_opts_arm_linux  = -platform linux-g++ -xplatform $(host)
+$(package)_config_opts_i686_linux  = -xplatform linux-g++-32
+$(package)_config_opts_mingw32  = -no-opengl -xplatform win32-g++ -device-option CROSS_COMPILE="$(host)-"
+$(package)_build_env  = QT_RCC_TEST=1
+endef
+
+define $(package)_preprocess_cmds
+  sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
+  sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
+  sed -i.old "/XIproto.h/d" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
+  mkdir -p qtbase/mkspecs/macx-clang-linux &&\
+  cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
+  cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
+  cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
+  cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
+  patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch
+endef
+
+define $(package)_config_cmds
+  export PKG_CONFIG_SYSROOT_DIR=/ && \
+  export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
+  export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig  && \
+  export CPATH=$(host_prefix)/include && \
+  ./configure $($(package)_config_opts) && \
+  $(MAKE) sub-src-clean && \
+  cd ../qttranslations && ../qtbase/bin/qmake qttranslations.pro -o Makefile && \
+  cd translations && ../../qtbase/bin/qmake translations.pro -o Makefile && cd ../.. &&\
+  cd qttools/src/linguist/lrelease/ && ../../../../qtbase/bin/qmake lrelease.pro -o Makefile
+endef
+
+define $(package)_build_cmds
+  export CPATH=$(host_prefix)/include && \
+  $(MAKE) -C src $(addprefix sub-,$($(package)_qt_libs)) && \
+  $(MAKE) -C ../qttools/src/linguist/lrelease && \
+  $(MAKE) -C ../qttranslations
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && cd .. &&\
+  $(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
+  $(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets && \
+  if `test -f qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a`; then \
+    cp qtbase/src/plugins/platforms/xcb/xcb-static/libxcb-static.a $($(package)_staging_prefix_dir)/lib; \
+  fi
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf mkspecs/ lib/cmake/ && \
+  rm lib/libQt5Bootstrap.a lib/lib*.la lib/lib*.prl
+endef
diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk
new file mode 100644
index 000000000000..726e3048c30c
--- /dev/null
+++ b/depends/packages/xcb_proto.mk
@@ -0,0 +1,27 @@
+package=xcb_proto
+$(package)_version=1.10
+$(package)_download_path=http://xcb.freedesktop.org/dist
+$(package)_file_name=xcb-proto-$($(package)_version).tar.bz2
+$(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c922800baaf05
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-shared
+  $(package)_config_opts_x86_64_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+  find -name "*.pyc" -delete && \
+  find -name "*.pyo" -delete
+endef
diff --git a/depends/packages/xextproto.mk b/depends/packages/xextproto.mk
new file mode 100644
index 000000000000..98a11eb4974f
--- /dev/null
+++ b/depends/packages/xextproto.mk
@@ -0,0 +1,21 @@
+package=xextproto
+$(package)_version=7.3.0
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/xproto.mk b/depends/packages/xproto.mk
new file mode 100644
index 000000000000..50a90b26850a
--- /dev/null
+++ b/depends/packages/xproto.mk
@@ -0,0 +1,21 @@
+package=xproto
+$(package)_version=7.0.26
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/proto
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=636162c1759805a5a0114a369dffdeccb8af8c859ef6e1445f26a4e6e046514f
+
+define $(package)_set_vars
+$(package)_config_opts=--disable-shared
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk
new file mode 100644
index 000000000000..b973149797f4
--- /dev/null
+++ b/depends/packages/xtrans.mk
@@ -0,0 +1,22 @@
+package=xtrans
+$(package)_version=1.3.4
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc33544f583a
+$(package)_dependencies=
+
+define $(package)_set_vars
+$(package)_config_opts_x86_64_linux=--with-pic --disable-static
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/patches/boost/darwin_boost_atomic-1.patch b/depends/patches/boost/darwin_boost_atomic-1.patch
new file mode 100644
index 000000000000..97f59cb7e4ee
--- /dev/null
+++ b/depends/patches/boost/darwin_boost_atomic-1.patch
@@ -0,0 +1,35 @@
+diff --git a/include/boost/atomic/detail/cas128strong.hpp b/include/boost/atomic/detail/cas128strong.hpp
+index 906c13e..dcb4d7d 100644
+--- a/include/boost/atomic/detail/cas128strong.hpp
++++ b/include/boost/atomic/detail/cas128strong.hpp
+@@ -196,15 +196,17 @@ class base_atomic<T, void, 16, Sign>
+ 
+ public:
+     BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
+-    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
++    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
+     {
++        memset(&v_, 0, sizeof(v_));
+         memcpy(&v_, &v, sizeof(value_type));
+     }
+ 
+     void
+     store(value_type const& value, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
+     {
+-        storage_type value_s = 0;
++        storage_type value_s;
++        memset(&value_s, 0, sizeof(value_s));
+         memcpy(&value_s, &value, sizeof(value_type));
+         platform_fence_before_store(order);
+         platform_store128(value_s, &v_);
+@@ -247,7 +249,9 @@ class base_atomic<T, void, 16, Sign>
+         memory_order success_order,
+         memory_order failure_order) volatile BOOST_NOEXCEPT
+     {
+-        storage_type expected_s = 0, desired_s = 0;
++        storage_type expected_s, desired_s;
++        memset(&expected_s, 0, sizeof(expected_s));
++        memset(&desired_s, 0, sizeof(desired_s));
+         memcpy(&expected_s, &expected, sizeof(value_type));
+         memcpy(&desired_s, &desired, sizeof(value_type));
+ 
diff --git a/depends/patches/boost/darwin_boost_atomic-2.patch b/depends/patches/boost/darwin_boost_atomic-2.patch
new file mode 100644
index 000000000000..ca50765200ec
--- /dev/null
+++ b/depends/patches/boost/darwin_boost_atomic-2.patch
@@ -0,0 +1,55 @@
+diff --git a/include/boost/atomic/detail/gcc-atomic.hpp b/include/boost/atomic/detail/gcc-atomic.hpp
+index a130590..4af99a1 100644
+--- a/include/boost/atomic/detail/gcc-atomic.hpp
++++ b/include/boost/atomic/detail/gcc-atomic.hpp
+@@ -958,14 +958,16 @@ class base_atomic<T, void, 16, Sign>
+ 
+ public:
+     BOOST_DEFAULTED_FUNCTION(base_atomic(void), {})
+-    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : v_(0)
++    explicit base_atomic(value_type const& v) BOOST_NOEXCEPT
+     {
++        memset(&v_, 0, sizeof(v_));
+         memcpy(&v_, &v, sizeof(value_type));
+     }
+ 
+     void store(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
+     {
+-        storage_type tmp = 0;
++        storage_type tmp;
++        memset(&tmp, 0, sizeof(tmp));
+         memcpy(&tmp, &v, sizeof(value_type));
+         __atomic_store_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
+     }
+@@ -980,7 +982,8 @@ class base_atomic<T, void, 16, Sign>
+ 
+     value_type exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
+     {
+-        storage_type tmp = 0;
++        storage_type tmp;
++        memset(&tmp, 0, sizeof(tmp));
+         memcpy(&tmp, &v, sizeof(value_type));
+         tmp = __atomic_exchange_n(&v_, tmp, atomics::detail::convert_memory_order_to_gcc(order));
+         value_type res;
+@@ -994,7 +997,9 @@ class base_atomic<T, void, 16, Sign>
+         memory_order success_order,
+         memory_order failure_order) volatile BOOST_NOEXCEPT
+     {
+-        storage_type expected_s = 0, desired_s = 0;
++        storage_type expected_s, desired_s;
++        memset(&expected_s, 0, sizeof(expected_s));
++        memset(&desired_s, 0, sizeof(desired_s));
+         memcpy(&expected_s, &expected, sizeof(value_type));
+         memcpy(&desired_s, &desired, sizeof(value_type));
+         const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, false,
+@@ -1010,7 +1015,9 @@ class base_atomic<T, void, 16, Sign>
+         memory_order success_order,
+         memory_order failure_order) volatile BOOST_NOEXCEPT
+     {
+-        storage_type expected_s = 0, desired_s = 0;
++        storage_type expected_s, desired_s;
++        memset(&expected_s, 0, sizeof(expected_s));
++        memset(&desired_s, 0, sizeof(desired_s));
+         memcpy(&expected_s, &expected, sizeof(value_type));
+         memcpy(&desired_s, &desired, sizeof(value_type));
+         const bool success = __atomic_compare_exchange_n(&v_, &expected_s, desired_s, true,
diff --git a/depends/patches/native_cdrkit/cdrkit-deterministic.patch b/depends/patches/native_cdrkit/cdrkit-deterministic.patch
new file mode 100644
index 000000000000..8ab0993dc4de
--- /dev/null
+++ b/depends/patches/native_cdrkit/cdrkit-deterministic.patch
@@ -0,0 +1,86 @@
+--- cdrkit-1.1.11.old/genisoimage/tree.c	2008-10-21 19:57:47.000000000 -0400
++++ cdrkit-1.1.11/genisoimage/tree.c	2013-12-06 00:23:18.489622668 -0500
+@@ -1139,8 +1139,9 @@
+ scan_directory_tree(struct directory *this_dir, char *path, 
+ 						  struct directory_entry *de)
+ {
+-	DIR		*current_dir;
++        int             current_file;
+ 	char		whole_path[PATH_MAX];
++        struct dirent  **d_list;
+ 	struct dirent	*d_entry;
+ 	struct directory *parent;
+ 	int		dflag;
+@@ -1164,7 +1165,8 @@
+ 	this_dir->dir_flags |= DIR_WAS_SCANNED;
+ 
+ 	errno = 0;	/* Paranoia */
+-	current_dir = opendir(path);
++	//current_dir = opendir(path);
++        current_file = scandir(path, &d_list, NULL, alphasort);
+ 	d_entry = NULL;
+ 
+ 	/*
+@@ -1173,12 +1175,12 @@
+ 	 */
+ 	old_path = path;
+ 
+-	if (current_dir) {
++	if (current_file >= 0) {
+ 		errno = 0;
+-		d_entry = readdir(current_dir);
++		d_entry = d_list[0];
+ 	}
+ 
+-	if (!current_dir || !d_entry) {
++	if (current_file < 0 || !d_entry) {
+ 		int	ret = 1;
+ 
+ #ifdef	USE_LIBSCHILY
+@@ -1191,8 +1193,8 @@
+ 			de->isorec.flags[0] &= ~ISO_DIRECTORY;
+ 			ret = 0;
+ 		}
+-		if (current_dir)
+-			closedir(current_dir);
++		if(d_list)
++			free(d_list);
+ 		return (ret);
+ 	}
+ #ifdef	ABORT_DEEP_ISO_ONLY
+@@ -1208,7 +1210,7 @@
+ 			errmsgno(EX_BAD, "use Rock Ridge extensions via -R or -r,\n");
+ 			errmsgno(EX_BAD, "or allow deep ISO9660 directory nesting via -D.\n");
+ 		}
+-		closedir(current_dir);
++		free(d_list);
+ 		return (1);
+ 	}
+ #endif
+@@ -1250,13 +1252,13 @@
+ 		 * The first time through, skip this, since we already asked
+ 		 * for the first entry when we opened the directory.
+ 		 */
+-		if (dflag)
+-			d_entry = readdir(current_dir);
++		if (dflag && current_file >= 0)
++			d_entry = d_list[current_file];
+ 		dflag++;
+ 
+-		if (!d_entry)
++		if (current_file < 0)
+ 			break;
+-
++                current_file--;
+ 		/* OK, got a valid entry */
+ 
+ 		/* If we do not want all files, then pitch the backups. */
+@@ -1348,7 +1350,7 @@
+ 		insert_file_entry(this_dir, whole_path, d_entry->d_name);
+ #endif	/* APPLE_HYB */
+ 	}
+-	closedir(current_dir);
++	free(d_list);
+ 
+ #ifdef APPLE_HYB
+ 	/*
diff --git a/depends/patches/qt/fix-xcb-include-order.patch b/depends/patches/qt/fix-xcb-include-order.patch
new file mode 100644
index 000000000000..bf6c6dca36cf
--- /dev/null
+++ b/depends/patches/qt/fix-xcb-include-order.patch
@@ -0,0 +1,21 @@
+--- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro	2014-07-30 18:17:27.384458441 -0400
++++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro	2014-07-30 18:18:28.620459303 -0400
+@@ -101,10 +101,6 @@
+     }
+ }
+ 
+-DEFINES += $$QMAKE_DEFINES_XCB
+-LIBS += $$QMAKE_LIBS_XCB
+-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
+-
+ CONFIG += qpa/genericunixfontdatabase
+ 
+ contains(QT_CONFIG, dbus) {
+@@ -141,3 +137,7 @@
+         INCLUDEPATH += ../../../3rdparty/xkbcommon/xkbcommon/
+     }
+ }
++
++DEFINES += $$QMAKE_DEFINES_XCB
++LIBS += $$QMAKE_LIBS_XCB
++INCLUDEPATH += $$QMAKE_CFLAGS_XCB
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
new file mode 100644
index 000000000000..f7302265bcd9
--- /dev/null
+++ b/depends/patches/qt/mac-qmake.conf
@@ -0,0 +1,23 @@
+MAKEFILE_GENERATOR = UNIX
+CONFIG += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
+QMAKE_INCREMENTAL_STYLE = sublib
+include(../common/macx.conf)
+include(../common/gcc-base-mac.conf)
+include(../common/clang.conf)
+include(../common/clang-mac.conf)
+QMAKE_MAC_SDK_PATH=$${MAC_SDK_PATH}
+QMAKE_XCODE_VERSION=4.3
+QMAKE_XCODE_DEVELOPER_PATH=/Developer
+QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION}
+QMAKE_MAC_SDK=macosx
+QMAKE_MAC_SDK.macosx.path = $$QMAKE_MAC_SDK_PATH
+QMAKE_MAC_SDK.macosx.platform_name = macosx
+QMAKE_CFLAGS += -target $${MAC_TARGET}
+QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
+QMAKE_LFLAGS += -target $${MAC_TARGET}
+QMAKE_AR = $${CROSS_COMPILE}ar cq
+QMAKE_RANLIB=$${CROSS_COMPILE}ranlib
+QMAKE_LIBTOOL=$${CROSS_COMPILE}libtool
+QMAKE_INSTALL_NAME_TOOL=$${CROSS_COMPILE}install_name_tool
+load(qt_config)

From 8021cf8dbc0aafa15a481c6d9348771a0d0405ff Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 8 Aug 2014 15:19:49 -0400
Subject: [PATCH 0501/1819] build: fix FDELT_TYPE configure check

This probably never worked properly. Confirmed working now with every compiler
I throw at it.
---
 configure.ac | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 0b2a429e021a..ffd05ae4f84b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,7 +332,10 @@ if test x$use_glibc_compat != xno; then
   #__fdelt_chk's params and return type have changed from long unsigned int to long int.
   # See which one is present here.
   AC_MSG_CHECKING(__fdelt_chk type)
-  AC_TRY_COMPILE([#define __USE_FORTIFY_LEVEL 2
+  AC_TRY_COMPILE([#ifdef _FORTIFY_SOURCE
+                    #undef _FORTIFY_SOURCE
+                  #endif
+                  #define _FORTIFY_SOURCE 2
                   #include <sys/select.h>
      extern "C" long unsigned int __fdelt_warn(long unsigned int);],[],
     [ fdelt_type="long unsigned int"],

From 565e56977235974c0dd3acfe2023beb84974297c Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 8 Aug 2014 15:21:50 -0400
Subject: [PATCH 0502/1819] libc-compat: add new symbol that's now needed

---
 src/compat/glibcxx_compat.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/compat/glibcxx_compat.cpp b/src/compat/glibcxx_compat.cpp
index 417166aedae8..cbe059735ba2 100644
--- a/src/compat/glibcxx_compat.cpp
+++ b/src/compat/glibcxx_compat.cpp
@@ -64,6 +64,8 @@ template istream& istream::_M_extract(unsigned short&);
 
 out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT { }
 
+length_error::~length_error() _GLIBCXX_USE_NOEXCEPT { }
+
 // Used with permission.
 // See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d
 

From 216e9a4456207f5ae9cd85926521851e11a26d92 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 7 Aug 2014 23:00:01 +0200
Subject: [PATCH 0503/1819] Add a way to limit deserialized string lengths

and use it for most strings being serialized.
---
 src/alert.h     |  6 +++---
 src/main.cpp    |  9 +++------
 src/serialize.h | 39 +++++++++++++++++++++++++++++++++++++--
 src/wallet.h    |  6 +++---
 4 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/src/alert.h b/src/alert.h
index da140be5e59a..296d48891af2 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -60,9 +60,9 @@ class CUnsignedAlert
         READWRITE(setSubVer);
         READWRITE(nPriority);
 
-        READWRITE(strComment);
-        READWRITE(strStatusBar);
-        READWRITE(strReserved);
+        READWRITE(LIMITED_STRING(strComment, 65536));
+        READWRITE(LIMITED_STRING(strStatusBar, 256));
+        READWRITE(LIMITED_STRING(strReserved, 256));
     )
 
     void SetNull();
diff --git a/src/main.cpp b/src/main.cpp
index ba521b6b19f2..dec5bb652473 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3559,7 +3559,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         if (!vRecv.empty())
             vRecv >> addrFrom >> nNonce;
         if (!vRecv.empty()) {
-            vRecv >> pfrom->strSubVer;
+            vRecv >> LIMITED_STRING(pfrom->strSubVer, 256);
             pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer);
         }
         if (!vRecv.empty())
@@ -4183,7 +4183,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         if (fDebug)
         {
             string strMsg; unsigned char ccode; string strReason;
-            vRecv >> strMsg >> ccode >> strReason;
+            vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, 111);
 
             ostringstream ss;
             ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
@@ -4194,10 +4194,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                 vRecv >> hash;
                 ss << ": hash " << hash.ToString();
             }
-            // Truncate to reasonable length and sanitize before printing:
-            string s = ss.str();
-            if (s.size() > 111) s.erase(111, string::npos);
-            LogPrint("net", "Reject %s\n", SanitizeString(s));
+            LogPrint("net", "Reject %s\n", SanitizeString(ss.str()));
         }
     }
 
diff --git a/src/serialize.h b/src/serialize.h
index f876efd9b5a4..2eb69b3ec00b 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -334,8 +334,9 @@ I ReadVarInt(Stream& is)
     }
 }
 
-#define FLATDATA(obj)  REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj)))
-#define VARINT(obj)    REF(WrapVarInt(REF(obj)))
+#define FLATDATA(obj) REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj)))
+#define VARINT(obj) REF(WrapVarInt(REF(obj)))
+#define LIMITED_STRING(obj,n) REF(LimitedString< n >(REF(obj)))
 
 /** Wrapper for serializing arrays and POD.
  */
@@ -398,6 +399,40 @@ class CVarInt
     }
 };
 
+template<size_t Limit>
+class LimitedString
+{
+protected:
+    std::string& string;
+public:
+    LimitedString(std::string& string) : string(string) {}
+
+    template<typename Stream>
+    void Unserialize(Stream& s, int, int=0)
+    {
+        size_t size = ReadCompactSize(s);
+        if (size > Limit) {
+            throw std::ios_base::failure("String length limit exceeded");
+        }
+        string.resize(size);
+        if (size != 0)
+            s.read((char*)&string[0], size);
+    }
+
+    template<typename Stream>
+    void Serialize(Stream& s, int, int=0) const
+    {
+        WriteCompactSize(s, string.size());
+        if (!string.empty())
+            s.write((char*)&string[0], string.size());
+    }
+
+    unsigned int GetSerializeSize(int, int=0) const
+    {
+        return GetSizeOfCompactSize(string.size()) + string.size();
+    }
+};
+
 template<typename I>
 CVarInt<I> WrapVarInt(I& n) { return CVarInt<I>(n); }
 
diff --git a/src/wallet.h b/src/wallet.h
index 73fcfa24e081..864a635ec7f8 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -858,7 +858,7 @@ class CWalletKey
         READWRITE(vchPrivKey);
         READWRITE(nTimeCreated);
         READWRITE(nTimeExpires);
-        READWRITE(strComment);
+        READWRITE(LIMITED_STRING(strComment, 65536));
     )
 };
 
@@ -933,7 +933,7 @@ class CAccountingEntry
         // Note: strAccount is serialized as part of the key, not here.
         READWRITE(nCreditDebit);
         READWRITE(nTime);
-        READWRITE(strOtherAccount);
+        READWRITE(LIMITED_STRING(strOtherAccount, 65536));
 
         if (!fRead)
         {
@@ -949,7 +949,7 @@ class CAccountingEntry
             }
         }
 
-        READWRITE(strComment);
+        READWRITE(LIMITED_STRING(strComment, 65536));
 
         size_t nSepPos = strComment.find("\0", 0, 1);
         if (fRead)

From eb0b56b19017ab5c16c745e6da39c53126924ed6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 1 Aug 2014 22:57:55 +0200
Subject: [PATCH 0504/1819] Simplify serialize.h's exception handling

Remove the 'state' and 'exceptmask' from serialize.h's stream implementations,
as well as related methods.

As exceptmask always included 'failbit', and setstate was always called with
bits = failbit, all it did was immediately raise an exception. Get rid of
those variables, and replace the setstate with direct exception throwing
(which also removes some dead code).

As a result, good() is never reached after a failure (there are only 2
calls, one of which is in tests), and can just be replaced by !eof().

fail(), clear(n) and exceptions() are just never called. Delete them.
---
 src/main.cpp             |  2 +-
 src/serialize.h          | 63 ++++------------------------------------
 src/test/alert_tests.cpp |  2 +-
 3 files changed, 8 insertions(+), 59 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 353cde0bd7cd..3add3491c8a5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3228,7 +3228,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
             }
         }
         uint64_t nRewind = blkdat.GetPos();
-        while (blkdat.good() && !blkdat.eof()) {
+        while (!blkdat.eof()) {
             boost::this_thread::interruption_point();
 
             blkdat.SetPos(nRewind);
diff --git a/src/serialize.h b/src/serialize.h
index f876efd9b5a4..748a2a0d4e92 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -870,8 +870,6 @@ class CDataStream
     typedef CSerializeData vector_type;
     vector_type vch;
     unsigned int nReadPos;
-    short state;
-    short exceptmask;
 public:
     int nType;
     int nVersion;
@@ -923,8 +921,6 @@ class CDataStream
         nReadPos = 0;
         nType = nTypeIn;
         nVersion = nVersionIn;
-        state = 0;
-        exceptmask = std::ios::badbit | std::ios::failbit;
     }
 
     CDataStream& operator+=(const CDataStream& b)
@@ -1047,19 +1043,7 @@ class CDataStream
     //
     // Stream subset
     //
-    void setstate(short bits, const char* psz)
-    {
-        state |= bits;
-        if (state & exceptmask)
-            throw std::ios_base::failure(psz);
-    }
-
     bool eof() const             { return size() == 0; }
-    bool fail() const            { return state & (std::ios::badbit | std::ios::failbit); }
-    bool good() const            { return !eof() && (state == 0); }
-    void clear(short n)          { state = n; }  // name conflict with vector clear()
-    short exceptions()           { return exceptmask; }
-    short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CDataStream"); return prev; }
     CDataStream* rdbuf()         { return this; }
     int in_avail()               { return size(); }
 
@@ -1079,9 +1063,7 @@ class CDataStream
         {
             if (nReadPosNext > vch.size())
             {
-                setstate(std::ios::failbit, "CDataStream::read() : end of data");
-                memset(pch, 0, nSize);
-                nSize = vch.size() - nReadPos;
+                throw std::ios_base::failure("CDataStream::read() : end of data");
             }
             memcpy(pch, &vch[nReadPos], nSize);
             nReadPos = 0;
@@ -1101,7 +1083,7 @@ class CDataStream
         if (nReadPosNext >= vch.size())
         {
             if (nReadPosNext > vch.size())
-                setstate(std::ios::failbit, "CDataStream::ignore() : end of data");
+                throw std::ios_base::failure("CDataStream::ignore() : end of data");
             nReadPos = 0;
             vch.clear();
             return (*this);
@@ -1174,8 +1156,6 @@ class CAutoFile
 {
 protected:
     FILE* file;
-    short state;
-    short exceptmask;
 public:
     int nType;
     int nVersion;
@@ -1185,8 +1165,6 @@ class CAutoFile
         file = filenew;
         nType = nTypeIn;
         nVersion = nVersionIn;
-        state = 0;
-        exceptmask = std::ios::badbit | std::ios::failbit;
     }
 
     ~CAutoFile()
@@ -1213,19 +1191,6 @@ class CAutoFile
     //
     // Stream subset
     //
-    void setstate(short bits, const char* psz)
-    {
-        state |= bits;
-        if (state & exceptmask)
-            throw std::ios_base::failure(psz);
-    }
-
-    bool fail() const            { return state & (std::ios::badbit | std::ios::failbit); }
-    bool good() const            { return state == 0; }
-    void clear(short n = 0)      { state = n; }
-    short exceptions()           { return exceptmask; }
-    short exceptions(short mask) { short prev = exceptmask; exceptmask = mask; setstate(0, "CAutoFile"); return prev; }
-
     void SetType(int n)          { nType = n; }
     int GetType()                { return nType; }
     void SetVersion(int n)       { nVersion = n; }
@@ -1238,7 +1203,7 @@ class CAutoFile
         if (!file)
             throw std::ios_base::failure("CAutoFile::read : file handle is NULL");
         if (fread(pch, 1, nSize, file) != nSize)
-            setstate(std::ios::failbit, feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed");
+            throw std::ios_base::failure(feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed");
         return (*this);
     }
 
@@ -1247,7 +1212,7 @@ class CAutoFile
         if (!file)
             throw std::ios_base::failure("CAutoFile::write : file handle is NULL");
         if (fwrite(pch, 1, nSize, file) != nSize)
-            setstate(std::ios::failbit, "CAutoFile::write : write failed");
+            throw std::ios_base::failure("CAutoFile::write : write failed");
         return (*this);
     }
 
@@ -1292,16 +1257,7 @@ class CBufferedFile
     uint64_t nRewind;     // how many bytes we guarantee to rewind
     std::vector<char> vchBuf; // the buffer
 
-    short state;
-    short exceptmask;
-
 protected:
-    void setstate(short bits, const char *psz) {
-        state |= bits;
-        if (state & exceptmask)
-            throw std::ios_base::failure(psz);
-    }
-
     // read data from the source to fill the buffer
     bool Fill() {
         unsigned int pos = nSrcPos % vchBuf.size();
@@ -1313,8 +1269,7 @@ class CBufferedFile
             return false;
         size_t read = fread((void*)&vchBuf[pos], 1, readNow, src);
         if (read == 0) {
-            setstate(std::ios_base::failbit, feof(src) ? "CBufferedFile::Fill : end of file" : "CBufferedFile::Fill : fread failed");
-            return false;
+            throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill : end of file" : "CBufferedFile::Fill : fread failed");
         } else {
             nSrcPos += read;
             return true;
@@ -1327,12 +1282,7 @@ class CBufferedFile
 
     CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
         src(fileIn), nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0),
-        state(0), exceptmask(std::ios_base::badbit | std::ios_base::failbit), nType(nTypeIn), nVersion(nVersionIn) {
-    }
-
-    // check whether no error occurred
-    bool good() const {
-        return state == 0;
+        nType(nTypeIn), nVersion(nVersionIn) {
     }
 
     // check whether we're at the end of the source file
@@ -1391,7 +1341,6 @@ class CBufferedFile
         nLongPos = ftell(src);
         nSrcPos = nLongPos;
         nReadPos = nLongPos;
-        state = 0;
         return true;
     }
 
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index b16f3f7f5780..e3066a51ab98 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -83,7 +83,7 @@ struct ReadAlerts
         std::vector<unsigned char> vch(alert_tests::alertTests, alert_tests::alertTests + sizeof(alert_tests::alertTests));
         CDataStream stream(vch, SER_DISK, CLIENT_VERSION);
         try {
-            while (stream.good())
+            while (!stream.eof())
             {
                 CAlert alert;
                 stream >> alert;

From ab45ddb599edc46516b71b35c5afe3e8d0fc3e9b Mon Sep 17 00:00:00 2001
From: Derek701 <brainish@gmail.com>
Date: Fri, 8 Aug 2014 23:13:06 -0500
Subject: [PATCH 0505/1819] Fix typo in gettransaction help

---
 src/rpcwallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 667ca33ce1c0..215da2ea12d0 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1518,7 +1518,7 @@ Value gettransaction(const Array& params, bool fHelp)
             "  \"hex\" : \"data\"         (string) Raw data for transaction\n"
             "}\n"
 
-            "\nbExamples\n"
+            "\nExamples:\n"
             + HelpExampleCli("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
             + HelpExampleRpc("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
         );

From 9297763dadeee2fc74fcbbbf8eb227e4930877f1 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 10 Aug 2014 02:28:23 +0200
Subject: [PATCH 0506/1819] [Qt] Add TRY_LOCK back to peertablemodel

---
 src/qt/peertablemodel.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 54b46867eade..cfa05300cff1 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -75,8 +75,14 @@ class PeerTablePriv
         }
 
         // Try to retrieve the CNodeStateStats for each node.
-        BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
-            stats.fNodeStateStatsAvailable = GetNodeStateStats(stats.nodeStats.nodeid, stats.nodeStateStats);
+        {
+            TRY_LOCK(cs_main, lockMain);
+            if (lockMain)
+            {
+                BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
+                    stats.fNodeStateStatsAvailable = GetNodeStateStats(stats.nodeStats.nodeid, stats.nodeStateStats);
+            }
+        }
 
         if (sortColumn >= 0)
             // sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily)

From 22b3c4bbbd4ce319b1702f069ba962fc0cff9393 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 10 Aug 2014 14:28:09 +0200
Subject: [PATCH 0507/1819] remove unused class CAddrMan; from db.h

---
 src/db.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/db.h b/src/db.h
index 66d7f319174d..bba267b84fd4 100644
--- a/src/db.h
+++ b/src/db.h
@@ -17,7 +17,6 @@
 #include <boost/filesystem/path.hpp>
 #include <db_cxx.h>
 
-class CAddrMan;
 struct CBlockLocator;
 class CDiskBlockIndex;
 class COutPoint;

From 1e21c17d208e310295475c0e4a46d750a5c9ba2d Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 6 Apr 2014 00:18:52 -0700
Subject: [PATCH 0508/1819] Make CCryptoKeyStore::Unlock check all keys.

CCryptoKeyStore::Unlock has a loop to attempt decrypting each key which
 only executes once, likely due to a simple mistake when the code was
 originally written.

This patch fixes the behavior by making it check all keys. It also adds
 a fatal assertion in the case some decrypt but some do not, since that
 indicates that the wallet is in some kind of really bad state.

This may make unlocking noticeably slower on wallets with many keys.
---
 src/crypter.cpp | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/src/crypter.cpp b/src/crypter.cpp
index 4c43e3a7986d..2f94e0827361 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -152,6 +152,8 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
         if (!SetCrypted())
             return false;
 
+        bool keyPass = false;
+        bool keyFail = false;
         CryptedKeyMap::const_iterator mi = mapCryptedKeys.begin();
         for (; mi != mapCryptedKeys.end(); ++mi)
         {
@@ -159,15 +161,31 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
             const std::vector<unsigned char> &vchCryptedSecret = (*mi).second.second;
             CKeyingMaterial vchSecret;
             if(!DecryptSecret(vMasterKeyIn, vchCryptedSecret, vchPubKey.GetHash(), vchSecret))
-                return false;
+            {
+                keyFail = true;
+                break;
+            }
             if (vchSecret.size() != 32)
-                return false;
+            {
+                keyFail = true;
+                break;
+            }
             CKey key;
             key.Set(vchSecret.begin(), vchSecret.end(), vchPubKey.IsCompressed());
-            if (key.GetPubKey() == vchPubKey)
+            if (key.GetPubKey() != vchPubKey)
+            {
+                keyFail = true;
                 break;
-            return false;
+            }
+            keyPass = true;
+        }
+        if (keyPass && keyFail)
+        {
+            LogPrintf("The wallet is probably corrupted: Some keys decrypt but not all.");
+            assert(false);
         }
+        if (keyFail || !keyPass)
+            return false;
         vMasterKey = vMasterKeyIn;
     }
     NotifyStatusChanged(this);

From a35b55b522da8eeaed895f0ed43ba595fc083498 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Sat, 9 Aug 2014 18:49:07 -0700
Subject: [PATCH 0509/1819] Dont run full check every time we decrypt wallet.

---
 src/crypter.cpp | 3 +++
 src/crypter.h   | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/crypter.cpp b/src/crypter.cpp
index 2f94e0827361..122e06d97ef7 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -178,6 +178,8 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
                 break;
             }
             keyPass = true;
+            if (fDecryptionThoroughlyChecked)
+                break;
         }
         if (keyPass && keyFail)
         {
@@ -187,6 +189,7 @@ bool CCryptoKeyStore::Unlock(const CKeyingMaterial& vMasterKeyIn)
         if (keyFail || !keyPass)
             return false;
         vMasterKey = vMasterKeyIn;
+        fDecryptionThoroughlyChecked = true;
     }
     NotifyStatusChanged(this);
     return true;
diff --git a/src/crypter.h b/src/crypter.h
index 4791428b485f..f16fcef9c702 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -121,6 +121,9 @@ class CCryptoKeyStore : public CBasicKeyStore
     // if fUseCrypto is false, vMasterKey must be empty
     bool fUseCrypto;
 
+    // keeps track of whether Unlock has run a thourough check before
+    bool fDecryptionThoroughlyChecked;
+
 protected:
     bool SetCrypted();
 
@@ -130,7 +133,7 @@ class CCryptoKeyStore : public CBasicKeyStore
     bool Unlock(const CKeyingMaterial& vMasterKeyIn);
 
 public:
-    CCryptoKeyStore() : fUseCrypto(false)
+    CCryptoKeyStore() : fUseCrypto(false), fDecryptionThoroughlyChecked(false)
     {
     }
 

From ea100c73fae8a134c6ae2f1e39f557448734e012 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 11 Aug 2014 08:43:06 +0200
Subject: [PATCH 0510/1819] Reduce maximum coinscache size during verification

Due to growing coinsviewcaches, the memory usage with checklevel=3
(and standard settings for dbcache) could be up to 500MiB on a
64-bit system. This is about twice the peak during reindexing,
unnecessarily extending bitcoind's memory envelope.

This commit reduces the maximum total size of the caches used during
verification to just nCoinCacheSize, which should be the limit.
---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index ba521b6b19f2..55206600e2c0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3052,7 +3052,7 @@ bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
             }
         }
         // check level 3: check for inconsistencies during memory-only disconnect of tip blocks
-        if (nCheckLevel >= 3 && pindex == pindexState && (coins.GetCacheSize() + pcoinsTip->GetCacheSize()) <= 2*nCoinCacheSize + 32000) {
+        if (nCheckLevel >= 3 && pindex == pindexState && (coins.GetCacheSize() + pcoinsTip->GetCacheSize()) <= nCoinCacheSize) {
             bool fClean = true;
             if (!DisconnectBlock(block, state, pindex, coins, &fClean))
                 return error("VerifyDB() : *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());

From da2ec100f3681176f60dec6dc675fc64147ade3a Mon Sep 17 00:00:00 2001
From: Mike Hearn <mike@plan99.net>
Date: Mon, 19 May 2014 22:25:17 +0200
Subject: [PATCH 0511/1819] Add a getutxos command to the p2p protocol. It
 allows querying of the UTXO set given a set of outpoints.

---
 src/main.cpp   | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/net.cpp    |  2 +-
 src/protocol.h |  1 +
 src/version.h  |  2 +-
 4 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ba521b6b19f2..569b01246282 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,6 +20,7 @@
 
 #include <sstream>
 
+#include <boost/dynamic_bitset.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
@@ -3512,6 +3513,75 @@ void static ProcessGetData(CNode* pfrom)
     }
 }
 
+struct CCoin {
+    uint32_t nTxVer;   // Don't call this nVersion, that name has a special meaning inside IMPLEMENT_SERIALIZE
+    uint32_t nHeight;
+    CTxOut out;
+
+    IMPLEMENT_SERIALIZE(
+        READWRITE(nTxVer);
+        READWRITE(nHeight);
+        READWRITE(out);
+    )
+};
+
+bool ProcessGetUTXOs(const vector<COutPoint> &vOutPoints, bool fCheckMemPool, vector<unsigned char> *result, vector<CCoin> *resultCoins)
+{
+    // Defined by BIP 64.
+    //
+    // Allows a peer to retrieve the CTxOut structures corresponding to the given COutPoints. 
+    // Note that this data is not authenticated by anything: this code could just invent any
+    // old rubbish and hand it back, with the peer being unable to tell unless they are checking
+    // the outpoints against some out of band data.
+    //
+    // Also the answer could change the moment after we give it. However some apps can tolerate
+    // this, because they're only using the result as a hint or are willing to trust the results
+    // based on something else. For example we may be a "trusted node" for the peer, or it may
+    // be checking the results given by several nodes for consistency, it may
+    // run the UTXOs returned against scriptSigs of transactions obtained elsewhere (after checking
+    // for a standard script form), and because the height in which the UTXO was defined is provided
+    // a client that has a map of heights to block headers (as SPV clients do, for recent blocks)
+    // can request the creating block via hash.
+    //
+    // IMPORTANT: Clients expect ordering to be preserved!
+    if (vOutPoints.size() > MAX_INV_SZ)
+        return error("message getutxos size() = %u", vOutPoints.size());
+
+    LogPrint("net", "getutxos for %d queries %s mempool\n", vOutPoints.size(), fCheckMemPool ? "with" : "without");
+
+    boost::dynamic_bitset<unsigned char> hits(vOutPoints.size());
+    {
+        LOCK2(cs_main, mempool.cs);
+        CCoinsViewMemPool cvMemPool(*pcoinsTip, mempool);
+        CCoinsViewCache view(fCheckMemPool ? cvMemPool : *pcoinsTip);
+        for (size_t i = 0; i < vOutPoints.size(); i++)
+        {
+            CCoins coins;
+            uint256 hash = vOutPoints[i].hash;
+            if (view.GetCoins(hash, coins))
+            {
+                mempool.pruneSpent(hash, coins);
+                if (coins.IsAvailable(vOutPoints[i].n))
+                {
+                    hits[i] = true;
+                    // Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
+                    // n is valid but points to an already spent output (IsNull).
+                    CCoin coin;
+                    coin.nTxVer = coins.nVersion;
+                    coin.nHeight = coins.nHeight;
+                    coin.out = coins.vout.at(vOutPoints[i].n);
+                    assert(!coin.out.IsNull());
+                    resultCoins->push_back(coin);
+                }
+            }
+        }
+    }
+
+    boost::to_block_range(hits, std::back_inserter(*result));
+    return true;
+}
+
+
 bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived)
 {
     RandAddSeedPerfmon();
@@ -3860,6 +3930,22 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
+    else if (strCommand == "getutxos")
+    {
+        bool fCheckMemPool;
+        vector<COutPoint> vOutPoints;
+        vRecv >> fCheckMemPool;
+        vRecv >> vOutPoints;
+
+        vector<unsigned char> bitmap;
+        vector<CCoin> outs;
+        if (ProcessGetUTXOs(vOutPoints, fCheckMemPool, &bitmap, &outs))
+            pfrom->PushMessage("utxos", chainActive.Height(), chainActive.Tip()->GetBlockHash(), bitmap, outs);
+        else
+            Misbehaving(pfrom->GetId(), 20);
+    }
+
+
     else if (strCommand == "tx")
     {
         vector<uint256> vWorkQueue;
diff --git a/src/net.cpp b/src/net.cpp
index 62124514c8d3..e78c7b7fa2bd 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -66,7 +66,7 @@ namespace {
 //
 bool fDiscover = true;
 bool fListen = true;
-uint64_t nLocalServices = NODE_NETWORK;
+uint64_t nLocalServices = NODE_NETWORK | NODE_GETUTXOS;
 CCriticalSection cs_mapLocalHost;
 map<CNetAddr, LocalServiceInfo> mapLocalHost;
 static bool vfReachable[NET_MAX] = {};
diff --git a/src/protocol.h b/src/protocol.h
index 1f23274299b7..6019dab0c822 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -64,6 +64,7 @@ class CMessageHeader
 enum
 {
     NODE_NETWORK = (1 << 0),
+    NODE_GETUTXOS = (1 << 1),
 
     // Bits 24-31 are reserved for temporary experiments. Just pick a bit that
     // isn't getting used, or one not being used much, and notify the
diff --git a/src/version.h b/src/version.h
index 85c5dbf8d7ba..fbb731c91d8a 100644
--- a/src/version.h
+++ b/src/version.h
@@ -26,7 +26,7 @@ extern const std::string CLIENT_DATE;
 // network protocol versioning
 //
 
-static const int PROTOCOL_VERSION = 70002;
+static const int PROTOCOL_VERSION = 70003;
 
 // initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;

From ea96475d23487df975c688e8cba8b1fe254e43fd Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 11 Aug 2014 14:37:24 +0200
Subject: [PATCH 0512/1819] build: Add mention of --disable-wallet to bdb48
 error messages

---
 src/m4/bitcoin_find_bdb48.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/m4/bitcoin_find_bdb48.m4 b/src/m4/bitcoin_find_bdb48.m4
index 72ec49b63530..5223163fe5e7 100644
--- a/src/m4/bitcoin_find_bdb48.m4
+++ b/src/m4/bitcoin_find_bdb48.m4
@@ -44,7 +44,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
     AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
       AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!])
     ],[
-      AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore)])
+      AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)])
     ])
   else
     BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
@@ -60,7 +60,7 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
     ])
   done
   if test "x$BDB_LIBS" = "x"; then
-      AC_MSG_ERROR(libdb_cxx missing)
+      AC_MSG_ERROR([libdb_cxx missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)])
   fi
   AC_SUBST(BDB_LIBS)
 ])

From 6b5b7cbfb4cafaf0b616ba5cf72024b9d01a2fac Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Tue, 15 Jul 2014 21:38:52 +0200
Subject: [PATCH 0513/1819] Categorize rpc help overview

Conflicts:
	src/rpcserver.cpp

Github-Pull: #4539
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: df3d321
---
 src/rpcserver.cpp | 191 +++++++++++++++++++++++++---------------------
 src/rpcserver.h   |   1 +
 2 files changed, 107 insertions(+), 85 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index e7ed73310c36..56064941f6c1 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -135,11 +135,18 @@ vector<unsigned char> ParseHexO(const Object& o, string strKey)
 string CRPCTable::help(string strCommand) const
 {
     string strRet;
+    string category;
     set<rpcfn_type> setDone;
+    vector<pair<string, const CRPCCommand*> > vCommands;
+
     for (map<string, const CRPCCommand*>::const_iterator mi = mapCommands.begin(); mi != mapCommands.end(); ++mi)
+        vCommands.push_back(make_pair(mi->second->category + mi->first, mi->second));
+    sort(vCommands.begin(), vCommands.end());
+
+    BOOST_FOREACH(const PAIRTYPE(string, const CRPCCommand*)& command, vCommands)
     {
-        const CRPCCommand *pcmd = mi->second;
-        string strMethod = mi->first;
+        const CRPCCommand *pcmd = command.second;
+        string strMethod = pcmd->name;
         // We already filter duplicates, but these deprecated screw up the sort order
         if (strMethod.find("label") != string::npos)
             continue;
@@ -162,8 +169,20 @@ string CRPCTable::help(string strCommand) const
             // Help text is returned in an exception
             string strHelp = string(e.what());
             if (strCommand == "")
+            {
                 if (strHelp.find('\n') != string::npos)
                     strHelp = strHelp.substr(0, strHelp.find('\n'));
+
+                if (category != pcmd->category)
+                {
+                    if (!category.empty())
+                        strRet += "\n";
+                    category = pcmd->category;
+                    string firstLetter = category.substr(0,1);
+                    boost::to_upper(firstLetter);
+                    strRet += "== " + firstLetter + category.substr(1) + " ==\n";
+                }
+            }
             strRet += strHelp + "\n";
         }
     }
@@ -213,103 +232,105 @@ Value stop(const Array& params, bool fHelp)
 
 
 static const CRPCCommand vRPCCommands[] =
-{ //  name                      actor (function)         okSafeMode threadSafe reqWallet
-  //  ------------------------  -----------------------  ---------- ---------- ---------
+{ //  category              name                      actor (function)         okSafeMode threadSafe reqWallet
+  //  --------------------- ------------------------  -----------------------  ---------- ---------- ---------
     /* Overall control/query calls */
-    { "getinfo",                &getinfo,                true,      false,      false }, /* uses wallet if enabled */
-    { "help",                   &help,                   true,      true,       false },
-    { "stop",                   &stop,                   true,      true,       false },
+    { "control",            "getinfo",                &getinfo,                true,      false,      false }, /* uses wallet if enabled */
+    { "control",            "help",                   &help,                   true,      true,       false },
+    { "control",            "stop",                   &stop,                   true,      true,       false },
 
     /* P2P networking */
-    { "getnetworkinfo",         &getnetworkinfo,         true,      false,      false },
-    { "addnode",                &addnode,                true,      true,       false },
-    { "getaddednodeinfo",       &getaddednodeinfo,       true,      true,       false },
-    { "getconnectioncount",     &getconnectioncount,     true,      false,      false },
-    { "getnettotals",           &getnettotals,           true,      true,       false },
-    { "getpeerinfo",            &getpeerinfo,            true,      false,      false },
-    { "ping",                   &ping,                   true,      false,      false },
+    { "network",            "getnetworkinfo",         &getnetworkinfo,         true,      false,      false },
+    { "network",            "addnode",                &addnode,                true,      true,       false },
+    { "network",            "getaddednodeinfo",       &getaddednodeinfo,       true,      true,       false },
+    { "network",            "getconnectioncount",     &getconnectioncount,     true,      false,      false },
+    { "network",            "getnettotals",           &getnettotals,           true,      true,       false },
+    { "network",            "getpeerinfo",            &getpeerinfo,            true,      false,      false },
+    { "network",            "ping",                   &ping,                   true,      false,      false },
 
     /* Block chain and UTXO */
-    { "getblockchaininfo",      &getblockchaininfo,      true,      false,      false },
-    { "getbestblockhash",       &getbestblockhash,       true,      false,      false },
-    { "getblockcount",          &getblockcount,          true,      false,      false },
-    { "getblock",               &getblock,               true,      false,      false },
-    { "getblockhash",           &getblockhash,           true,      false,      false },
-    { "getchaintips",           &getchaintips,           true,      false,      false },
-    { "getdifficulty",          &getdifficulty,          true,      false,      false },
-    { "getrawmempool",          &getrawmempool,          true,      false,      false },
-    { "gettxout",               &gettxout,               true,      false,      false },
-    { "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
-    { "verifychain",            &verifychain,            true,      false,      false },
+    { "blockchain",         "getblockchaininfo",      &getblockchaininfo,      true,      false,      false },
+    { "blockchain",         "getbestblockhash",       &getbestblockhash,       true,      false,      false },
+    { "blockchain",         "getblockcount",          &getblockcount,          true,      false,      false },
+    { "blockchain",         "getblock",               &getblock,               true,      false,      false },
+    { "blockchain",         "getblockhash",           &getblockhash,           true,      false,      false },
+    { "blockchain",         "getchaintips",           &getchaintips,           true,      false,      false },
+    { "blockchain",         "getdifficulty",          &getdifficulty,          true,      false,      false },
+    { "blockchain",         "getrawmempool",          &getrawmempool,          true,      false,      false },
+    { "blockchain",         "gettxout",               &gettxout,               true,      false,      false },
+    { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
+    { "blockchain",         "verifychain",            &verifychain,            true,      false,      false },
 
     /* Mining */
-    { "getblocktemplate",       &getblocktemplate,       true,      false,      false },
-    { "getmininginfo",          &getmininginfo,          true,      false,      false },
-    { "getnetworkhashps",       &getnetworkhashps,       true,      false,      false },
-    { "prioritisetransaction",  &prioritisetransaction,  true,      false,      false },
-    { "submitblock",            &submitblock,            true,      true,       false },
+    { "mining",             "getblocktemplate",       &getblocktemplate,       true,      false,      false },
+    { "mining",             "getmininginfo",          &getmininginfo,          true,      false,      false },
+    { "mining",             "getnetworkhashps",       &getnetworkhashps,       true,      false,      false },
+    { "mining",             "prioritisetransaction",  &prioritisetransaction,  true,      false,      false },
+    { "mining",             "submitblock",            &submitblock,            true,      true,       false },
+
+#ifdef ENABLE_WALLET
+    /* Coin generation */
+    { "generating",         "getgenerate",            &getgenerate,            true,      false,      false },
+    { "generating",         "gethashespersec",        &gethashespersec,        true,      false,      false },
+    { "generating",         "setgenerate",            &setgenerate,            true,      true,       false },
+#endif
 
     /* Raw transactions */
-    { "createrawtransaction",   &createrawtransaction,   true,      false,      false },
-    { "decoderawtransaction",   &decoderawtransaction,   true,      false,      false },
-    { "decodescript",           &decodescript,           true,      false,      false },
-    { "getrawtransaction",      &getrawtransaction,      true,      false,      false },
-    { "sendrawtransaction",     &sendrawtransaction,     false,     false,      false },
-    { "signrawtransaction",     &signrawtransaction,     false,     false,      false }, /* uses wallet if enabled */
+    { "rawtransactions",    "createrawtransaction",   &createrawtransaction,   true,      false,      false },
+    { "rawtransactions",    "decoderawtransaction",   &decoderawtransaction,   true,      false,      false },
+    { "rawtransactions",    "decodescript",           &decodescript,           true,      false,      false },
+    { "rawtransactions",    "getrawtransaction",      &getrawtransaction,      true,      false,      false },
+    { "rawtransactions",    "sendrawtransaction",     &sendrawtransaction,     false,     false,      false },
+    { "rawtransactions",    "signrawtransaction",     &signrawtransaction,     false,     false,      false }, /* uses wallet if enabled */
 
     /* Utility functions */
-    { "createmultisig",         &createmultisig,         true,      true ,      false },
-    { "validateaddress",        &validateaddress,        true,      false,      false }, /* uses wallet if enabled */
-    { "verifymessage",          &verifymessage,          true,      false,      false },
-    { "estimatefee",            &estimatefee,            true,      true,       false },
-    { "estimatepriority",       &estimatepriority,       true,      true,       false },
+    { "util",               "createmultisig",         &createmultisig,         true,      true ,      false },
+    { "util",               "validateaddress",        &validateaddress,        true,      false,      false }, /* uses wallet if enabled */
+    { "util",               "verifymessage",          &verifymessage,          true,      false,      false },
+    { "util",               "estimatefee",            &estimatefee,            true,      true,       false },
+    { "util",               "estimatepriority",       &estimatepriority,       true,      true,       false },
 
 #ifdef ENABLE_WALLET
     /* Wallet */
-    { "addmultisigaddress",     &addmultisigaddress,     true,      false,      true },
-    { "backupwallet",           &backupwallet,           true,      false,      true },
-    { "dumpprivkey",            &dumpprivkey,            true,      false,      true },
-    { "dumpwallet",             &dumpwallet,             true,      false,      true },
-    { "encryptwallet",          &encryptwallet,          true,      false,      true },
-    { "getaccountaddress",      &getaccountaddress,      true,      false,      true },
-    { "getaccount",             &getaccount,             true,      false,      true },
-    { "getaddressesbyaccount",  &getaddressesbyaccount,  true,      false,      true },
-    { "getbalance",             &getbalance,             false,     false,      true },
-    { "getnewaddress",          &getnewaddress,          true,      false,      true },
-    { "getrawchangeaddress",    &getrawchangeaddress,    true,      false,      true },
-    { "getreceivedbyaccount",   &getreceivedbyaccount,   false,     false,      true },
-    { "getreceivedbyaddress",   &getreceivedbyaddress,   false,     false,      true },
-    { "gettransaction",         &gettransaction,         false,     false,      true },
-    { "getunconfirmedbalance",  &getunconfirmedbalance,  false,     false,      true },
-    { "getwalletinfo",          &getwalletinfo,          false,     false,      true },
-    { "importprivkey",          &importprivkey,          true,      false,      true },
-    { "importwallet",           &importwallet,           true,      false,      true },
-    { "importaddress",          &importaddress,          true,      false,      true },
-    { "keypoolrefill",          &keypoolrefill,          true,      false,      true },
-    { "listaccounts",           &listaccounts,           false,     false,      true },
-    { "listaddressgroupings",   &listaddressgroupings,   false,     false,      true },
-    { "listlockunspent",        &listlockunspent,        false,     false,      true },
-    { "listreceivedbyaccount",  &listreceivedbyaccount,  false,     false,      true },
-    { "listreceivedbyaddress",  &listreceivedbyaddress,  false,     false,      true },
-    { "listsinceblock",         &listsinceblock,         false,     false,      true },
-    { "listtransactions",       &listtransactions,       false,     false,      true },
-    { "listunspent",            &listunspent,            false,     false,      true },
-    { "lockunspent",            &lockunspent,            true,      false,      true },
-    { "move",                   &movecmd,                false,     false,      true },
-    { "sendfrom",               &sendfrom,               false,     false,      true },
-    { "sendmany",               &sendmany,               false,     false,      true },
-    { "sendtoaddress",          &sendtoaddress,          false,     false,      true },
-    { "setaccount",             &setaccount,             true,      false,      true },
-    { "settxfee",               &settxfee,               true,      false,      true },
-    { "signmessage",            &signmessage,            true,      false,      true },
-    { "walletlock",             &walletlock,             true,      false,      true },
-    { "walletpassphrasechange", &walletpassphrasechange, true,      false,      true },
-    { "walletpassphrase",       &walletpassphrase,       true,      false,      true },
-
-    /* Wallet-enabled mining */
-    { "getgenerate",            &getgenerate,            true,      false,      false },
-    { "gethashespersec",        &gethashespersec,        true,      false,      false },
-    { "setgenerate",            &setgenerate,            true,      true,       false },
+    { "wallet",             "addmultisigaddress",     &addmultisigaddress,     true,      false,      true },
+    { "wallet",             "backupwallet",           &backupwallet,           true,      false,      true },
+    { "wallet",             "dumpprivkey",            &dumpprivkey,            true,      false,      true },
+    { "wallet",             "dumpwallet",             &dumpwallet,             true,      false,      true },
+    { "wallet",             "encryptwallet",          &encryptwallet,          true,      false,      true },
+    { "wallet",             "getaccountaddress",      &getaccountaddress,      true,      false,      true },
+    { "wallet",             "getaccount",             &getaccount,             true,      false,      true },
+    { "wallet",             "getaddressesbyaccount",  &getaddressesbyaccount,  true,      false,      true },
+    { "wallet",             "getbalance",             &getbalance,             false,     false,      true },
+    { "wallet",             "getnewaddress",          &getnewaddress,          true,      false,      true },
+    { "wallet",             "getrawchangeaddress",    &getrawchangeaddress,    true,      false,      true },
+    { "wallet",             "getreceivedbyaccount",   &getreceivedbyaccount,   false,     false,      true },
+    { "wallet",             "getreceivedbyaddress",   &getreceivedbyaddress,   false,     false,      true },
+    { "wallet",             "gettransaction",         &gettransaction,         false,     false,      true },
+    { "wallet",             "getunconfirmedbalance",  &getunconfirmedbalance,  false,     false,      true },
+    { "wallet",             "getwalletinfo",          &getwalletinfo,          false,     false,      true },
+    { "wallet",             "importprivkey",          &importprivkey,          true,      false,      true },
+    { "wallet",             "importwallet",           &importwallet,           true,      false,      true },
+    { "wallet",             "importaddress",          &importaddress,          true,      false,      true },
+    { "wallet",             "keypoolrefill",          &keypoolrefill,          true,      false,      true },
+    { "wallet",             "listaccounts",           &listaccounts,           false,     false,      true },
+    { "wallet",             "listaddressgroupings",   &listaddressgroupings,   false,     false,      true },
+    { "wallet",             "listlockunspent",        &listlockunspent,        false,     false,      true },
+    { "wallet",             "listreceivedbyaccount",  &listreceivedbyaccount,  false,     false,      true },
+    { "wallet",             "listreceivedbyaddress",  &listreceivedbyaddress,  false,     false,      true },
+    { "wallet",             "listsinceblock",         &listsinceblock,         false,     false,      true },
+    { "wallet",             "listtransactions",       &listtransactions,       false,     false,      true },
+    { "wallet",             "listunspent",            &listunspent,            false,     false,      true },
+    { "wallet",             "lockunspent",            &lockunspent,            true,      false,      true },
+    { "wallet",             "move",                   &movecmd,                false,     false,      true },
+    { "wallet",             "sendfrom",               &sendfrom,               false,     false,      true },
+    { "wallet",             "sendmany",               &sendmany,               false,     false,      true },
+    { "wallet",             "sendtoaddress",          &sendtoaddress,          false,     false,      true },
+    { "wallet",             "setaccount",             &setaccount,             true,      false,      true },
+    { "wallet",             "settxfee",               &settxfee,               true,      false,      true },
+    { "wallet",             "signmessage",            &signmessage,            true,      false,      true },
+    { "wallet",             "walletlock",             &walletlock,             true,      false,      true },
+    { "wallet",             "walletpassphrasechange", &walletpassphrasechange, true,      false,      true },
+    { "wallet",             "walletpassphrase",       &walletpassphrase,       true,      false,      true },
 #endif // ENABLE_WALLET
 };
 
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 176852ca8fc3..2248e8aeb2f3 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -71,6 +71,7 @@ typedef json_spirit::Value(*rpcfn_type)(const json_spirit::Array& params, bool f
 class CRPCCommand
 {
 public:
+    std::string category;
     std::string name;
     rpcfn_type actor;
     bool okSafeMode;

From 939ed97373fdea0e8ecb173f1c22eb53b9f90bb6 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 26 Jul 2014 21:05:11 +0200
Subject: [PATCH 0514/1819] Add boolean HaveWatchonly and signal
 NotifyWatchonlyChanged

---
 src/keystore.cpp        |  6 ++++++
 src/keystore.h          |  2 ++
 src/qt/overviewpage.cpp | 24 +++++++++++++++++-------
 src/qt/overviewpage.h   |  1 +
 src/qt/walletmodel.cpp  | 32 +++++++++++++++++++++++++++++---
 src/qt/walletmodel.h    |  7 +++++++
 src/wallet.cpp          |  1 +
 src/wallet.h            |  3 +++
 8 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/src/keystore.cpp b/src/keystore.cpp
index 2a4c88d5656d..81b7b076faff 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -71,3 +71,9 @@ bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const
     LOCK(cs_KeyStore);
     return setWatchOnly.count(dest) > 0;
 }
+
+bool CBasicKeyStore::HaveWatchOnly() const
+{
+    LOCK(cs_KeyStore);
+    return (!setWatchOnly.empty());
+}
diff --git a/src/keystore.h b/src/keystore.h
index 72411a1387c0..f10e24f36cfc 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -50,6 +50,7 @@ class CKeyStore
     // Support for Watch-only addresses
     virtual bool AddWatchOnly(const CScript &dest) =0;
     virtual bool HaveWatchOnly(const CScript &dest) const =0;
+    virtual bool HaveWatchOnly() const =0;
 };
 
 typedef std::map<CKeyID, CKey> KeyMap;
@@ -107,6 +108,7 @@ class CBasicKeyStore : public CKeyStore
 
     virtual bool AddWatchOnly(const CScript &dest);
     virtual bool HaveWatchOnly(const CScript &dest) const;
+    virtual bool HaveWatchOnly() const;
 };
 
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index b5a3de48ca34..8eed0856e768 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -160,18 +160,25 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
     // for the non-mining users
     bool showImmature = immatureBalance != 0;
     bool showWatchOnlyImmature = watchImmatureBalance != 0;
-    bool showWatchOnly = (watchOnlyBalance != 0 || watchUnconfBalance != 0 || showWatchOnlyImmature);
 
     // for symmetry reasons also show immature label when the watch-only one is shown
     ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);
     ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
-    ui->labelSpendable->setVisible(showWatchOnly);              // show spendable label (only when watch-only is active)
-    ui->labelWatchonly->setVisible(showWatchOnly);              // show watch-only label
-    ui->lineWatchBalance->setVisible(showWatchOnly);            // show watch-only balance separator line
-    ui->labelWatchAvailable->setVisible(showWatchOnly);         // show watch-only available balance
     ui->labelWatchImmature->setVisible(showWatchOnlyImmature);  // show watch-only immature balance
-    ui->labelWatchPending->setVisible(showWatchOnly);           // show watch-only pending balance
-    ui->labelWatchTotal->setVisible(showWatchOnly);             // show watch-only total balance
+}
+
+// show/hide watch-only labels
+void OverviewPage::updateWatchOnlyLabels(bool showWatchOnly)
+{
+    ui->labelSpendable->setVisible(showWatchOnly);      // show spendable label (only when watch-only is active)
+    ui->labelWatchonly->setVisible(showWatchOnly);      // show watch-only label
+    ui->lineWatchBalance->setVisible(showWatchOnly);    // show watch-only balance separator line
+    ui->labelWatchAvailable->setVisible(showWatchOnly); // show watch-only available balance
+    ui->labelWatchPending->setVisible(showWatchOnly);   // show watch-only pending balance
+    ui->labelWatchTotal->setVisible(showWatchOnly);     // show watch-only total balance
+
+    if (!showWatchOnly)
+        ui->labelWatchImmature->hide();
 }
 
 void OverviewPage::setClientModel(ClientModel *model)
@@ -208,6 +215,9 @@ void OverviewPage::setWalletModel(WalletModel *model)
         connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64, qint64, qint64)));
 
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
+
+        updateWatchOnlyLabels(model->haveWatchOnly());
+        connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyLabels(bool)));
     }
 
     // update the display unit, to not use the default ("BTC")
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index fe00106770ed..f46374efbac7 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -58,6 +58,7 @@ private slots:
     void updateDisplayUnit();
     void handleTransactionClicked(const QModelIndex &index);
     void updateAlerts(const QString &warnings);
+    void updateWatchOnlyLabels(bool showWatchOnly);
 };
 
 #endif // OVERVIEWPAGE_H
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 0ad123f39d4d..30c9ecc96be7 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -36,6 +36,7 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
     cachedNumBlocks(0)
 {
     fProcessingQueuedTransactions = false;
+    fHaveWatchOnly = wallet->HaveWatchOnly();
 
     addressTableModel = new AddressTableModel(wallet, this);
     transactionTableModel = new TransactionTableModel(wallet, this);
@@ -81,6 +82,11 @@ qint64 WalletModel::getImmatureBalance() const
     return wallet->GetImmatureBalance();
 }
 
+bool WalletModel::haveWatchOnly() const
+{
+    return fHaveWatchOnly;
+}
+
 qint64 WalletModel::getWatchBalance() const
 {
     return wallet->GetWatchOnlyBalance();
@@ -144,9 +150,15 @@ void WalletModel::checkBalanceChanged()
     qint64 newBalance = getBalance();
     qint64 newUnconfirmedBalance = getUnconfirmedBalance();
     qint64 newImmatureBalance = getImmatureBalance();
-    qint64 newWatchOnlyBalance = getWatchBalance();
-    qint64 newWatchUnconfBalance = getWatchUnconfirmedBalance();
-    qint64 newWatchImmatureBalance = getWatchImmatureBalance();
+    qint64 newWatchOnlyBalance = 0;
+    qint64 newWatchUnconfBalance = 0;
+    qint64 newWatchImmatureBalance = 0;
+    if (haveWatchOnly())
+    {
+        newWatchOnlyBalance = getWatchBalance();
+        newWatchUnconfBalance = getWatchUnconfirmedBalance();
+        newWatchImmatureBalance = getWatchImmatureBalance();
+    }
 
     if(cachedBalance != newBalance || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance ||
         cachedWatchOnlyBalance != newWatchOnlyBalance || cachedWatchUnconfBalance != newWatchUnconfBalance || cachedWatchImmatureBalance != newWatchImmatureBalance)
@@ -185,6 +197,12 @@ void WalletModel::updateAddressBook(const QString &address, const QString &label
         addressTableModel->updateEntry(address, label, isMine, purpose, status);
 }
 
+void WalletModel::updateWatchOnlyFlag(bool fHaveWatchonly)
+{
+    fHaveWatchOnly = fHaveWatchonly;
+    emit notifyWatchonlyChanged(fHaveWatchonly);
+}
+
 bool WalletModel::validateAddress(const QString &address)
 {
     CBitcoinAddress addressParsed(address.toStdString());
@@ -499,6 +517,12 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int
     }
 }
 
+static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly)
+{
+    QMetaObject::invokeMethod(walletmodel, "updateWatchOnlyFlag", Qt::QueuedConnection,
+                              Q_ARG(bool, fHaveWatchonly));
+}
+
 void WalletModel::subscribeToCoreSignals()
 {
     // Connect signals to wallet
@@ -506,6 +530,7 @@ void WalletModel::subscribeToCoreSignals()
     wallet->NotifyAddressBookChanged.connect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
     wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
     wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
+    wallet->NotifyWatchonlyChanged.connect(boost::bind(NotifyWatchonlyChanged, this, _1));
 }
 
 void WalletModel::unsubscribeFromCoreSignals()
@@ -515,6 +540,7 @@ void WalletModel::unsubscribeFromCoreSignals()
     wallet->NotifyAddressBookChanged.disconnect(boost::bind(NotifyAddressBookChanged, this, _1, _2, _3, _4, _5, _6));
     wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
     wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
+    wallet->NotifyWatchonlyChanged.disconnect(boost::bind(NotifyWatchonlyChanged, this, _1));
 }
 
 // WalletModel::UnlockContext implementation
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 2bb91d85a928..1dad716061b1 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -128,6 +128,7 @@ class WalletModel : public QObject
     qint64 getBalance(const CCoinControl *coinControl = NULL) const;
     qint64 getUnconfirmedBalance() const;
     qint64 getImmatureBalance() const;
+    bool haveWatchOnly() const;
     qint64 getWatchBalance() const;
     qint64 getWatchUnconfirmedBalance() const;
     qint64 getWatchImmatureBalance() const;
@@ -198,6 +199,7 @@ class WalletModel : public QObject
 private:
     CWallet *wallet;
     bool fProcessingQueuedTransactions;
+    bool fHaveWatchOnly;
 
     // Wallet has an options model for wallet-specific options
     // (transaction fee, for example)
@@ -249,6 +251,9 @@ class WalletModel : public QObject
     // Show progress dialog e.g. for rescan
     void showProgress(const QString &title, int nProgress);
 
+    // Watch-only address added
+    void notifyWatchonlyChanged(bool fHaveWatchonly);
+
 public slots:
     /* Wallet status might have changed */
     void updateStatus();
@@ -256,6 +261,8 @@ public slots:
     void updateTransaction(const QString &hash, int status);
     /* New, updated or removed address book entry */
     void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
+    /* Watchonly added */
+    void updateWatchOnlyFlag(bool fHaveWatchonly);
     /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
     void pollBalanceChanged();
     /* Needed to update fProcessingQueuedTransactions through a QueuedConnection */
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 7c04743c0f0b..a293664f6dc0 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -153,6 +153,7 @@ bool CWallet::AddWatchOnly(const CScript &dest)
     if (!CCryptoKeyStore::AddWatchOnly(dest))
         return false;
     nTimeFirstKey = 1; // No birthday information for watch-only keys.
+    NotifyWatchonlyChanged(true);
     if (!fFileBacked)
         return true;
     return CWalletDB(strWalletFile).WriteWatchOnly(dest);
diff --git a/src/wallet.h b/src/wallet.h
index 73fcfa24e081..1f727aec0b97 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -408,6 +408,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     /** Show progress e.g. for rescan */
     boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
+
+    /** Watch-only address added */
+    boost::signals2::signal<void (bool fHaveWatchOnly)> NotifyWatchonlyChanged;
 };
 
 /** A key allocated from the key pool. */

From 1c5f0af0fd8b5630470d471d8319a7c979aa2587 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 10 Aug 2014 02:26:04 +0200
Subject: [PATCH 0515/1819] [Qt] Add column Watch-only to transactions list

---
 src/Makefile.qt.include           |   3 +++
 src/qt/bitcoin.qrc                |   3 +++
 src/qt/overviewpage.cpp           |  10 +++++++++-
 src/qt/res/icons/eye.png          | Bin 0 -> 536 bytes
 src/qt/res/icons/eye_minus.png    | Bin 0 -> 595 bytes
 src/qt/res/icons/eye_plus.png     | Bin 0 -> 661 bytes
 src/qt/transactionfilterproxy.cpp |  12 +++++++++++
 src/qt/transactionfilterproxy.h   |   9 +++++++++
 src/qt/transactiontablemodel.cpp  |  32 ++++++++++++++++++++++--------
 src/qt/transactiontablemodel.h    |  14 +++++++++----
 src/qt/transactionview.cpp        |  32 ++++++++++++++++++++++++++++++
 src/qt/transactionview.h          |   4 ++++
 12 files changed, 106 insertions(+), 13 deletions(-)
 create mode 100644 src/qt/res/icons/eye.png
 create mode 100644 src/qt/res/icons/eye_minus.png
 create mode 100644 src/qt/res/icons/eye_plus.png

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 2052264dc95c..eef0c317c6e4 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -233,6 +233,9 @@ RES_ICONS = \
   qt/res/icons/editcopy.png \
   qt/res/icons/editpaste.png \
   qt/res/icons/export.png \
+  qt/res/icons/eye.png \
+  qt/res/icons/eye_minus.png \
+  qt/res/icons/eye_plus.png \
   qt/res/icons/filesave.png \
   qt/res/icons/history.png \
   qt/res/icons/key.png \
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index 357c6470d3b5..9a7003938bdc 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -18,6 +18,9 @@
         <file alias="transaction_3">res/icons/clock3.png</file>
         <file alias="transaction_4">res/icons/clock4.png</file>
         <file alias="transaction_5">res/icons/clock5.png</file>
+        <file alias="eye">res/icons/eye.png</file>
+        <file alias="eye_minus">res/icons/eye_minus.png</file>
+        <file alias="eye_plus">res/icons/eye_plus.png</file>
         <file alias="options">res/icons/configure.png</file>
         <file alias="receiving_addresses">res/icons/receive.png</file>
         <file alias="editpaste">res/icons/editpaste.png</file>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 8eed0856e768..15501b8a8af3 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -57,7 +57,15 @@ class TxViewDelegate : public QAbstractItemDelegate
         }
 
         painter->setPen(foreground);
-        painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address);
+        QRect boundingRect;
+        painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address, &boundingRect);
+
+        if (index.data(TransactionTableModel::WatchonlyRole).toBool())
+        {
+            QIcon iconWatchonly = qvariant_cast<QIcon>(index.data(TransactionTableModel::WatchonlyDecorationRole));
+            QRect watchonlyRect(boundingRect.right() + 5, mainRect.top()+ypad+halfheight, 16, halfheight);
+            iconWatchonly.paint(painter, watchonlyRect);
+        }
 
         if(amount < 0)
         {
diff --git a/src/qt/res/icons/eye.png b/src/qt/res/icons/eye.png
new file mode 100644
index 0000000000000000000000000000000000000000..c4d182adbf4ed1140b7c715517e07802758ddeb5
GIT binary patch
diff --git a/src/qt/res/icons/eye_minus.png b/src/qt/res/icons/eye_minus.png
new file mode 100644
index 0000000000000000000000000000000000000000..08b048eae310b10d71082f8edad7b081b79b98af
GIT binary patch
diff --git a/src/qt/res/icons/eye_plus.png b/src/qt/res/icons/eye_plus.png
new file mode 100644
index 0000000000000000000000000000000000000000..4ad653156f77cba70a8ba328e2fbd8a0fe45cf89
GIT binary patch
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index f9546fddb5ed..6ab029173b71 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -22,6 +22,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
     dateTo(MAX_DATE),
     addrPrefix(),
     typeFilter(ALL_TYPES),
+    watchOnlyFilter(WatchOnlyFilter_All),
     minAmount(0),
     limitRows(-1),
     showInactive(true)
@@ -34,6 +35,7 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
 
     int type = index.data(TransactionTableModel::TypeRole).toInt();
     QDateTime datetime = index.data(TransactionTableModel::DateRole).toDateTime();
+    bool involvesWatchAddress = index.data(TransactionTableModel::WatchonlyRole).toBool();
     QString address = index.data(TransactionTableModel::AddressRole).toString();
     QString label = index.data(TransactionTableModel::LabelRole).toString();
     qint64 amount = llabs(index.data(TransactionTableModel::AmountRole).toLongLong());
@@ -43,6 +45,10 @@ bool TransactionFilterProxy::filterAcceptsRow(int sourceRow, const QModelIndex &
         return false;
     if(!(TYPE(type) & typeFilter))
         return false;
+    if (involvesWatchAddress && watchOnlyFilter == WatchOnlyFilter_No)
+        return false;
+    if (!involvesWatchAddress && watchOnlyFilter == WatchOnlyFilter_Yes)
+        return false;
     if(datetime < dateFrom || datetime > dateTo)
         return false;
     if (!address.contains(addrPrefix, Qt::CaseInsensitive) && !label.contains(addrPrefix, Qt::CaseInsensitive))
@@ -78,6 +84,12 @@ void TransactionFilterProxy::setMinAmount(qint64 minimum)
     invalidateFilter();
 }
 
+void TransactionFilterProxy::setWatchOnlyFilter(WatchOnlyFilter filter)
+{
+    this->watchOnlyFilter = filter;
+    invalidateFilter();
+}
+
 void TransactionFilterProxy::setLimit(int limit)
 {
     this->limitRows = limit;
diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h
index 9919bc3fd68f..f408317b53ce 100644
--- a/src/qt/transactionfilterproxy.h
+++ b/src/qt/transactionfilterproxy.h
@@ -25,6 +25,13 @@ class TransactionFilterProxy : public QSortFilterProxyModel
 
     static quint32 TYPE(int type) { return 1<<type; }
 
+    enum WatchOnlyFilter
+    {
+        WatchOnlyFilter_All,
+        WatchOnlyFilter_Yes,
+        WatchOnlyFilter_No
+    };
+
     void setDateRange(const QDateTime &from, const QDateTime &to);
     void setAddressPrefix(const QString &addrPrefix);
     /**
@@ -32,6 +39,7 @@ class TransactionFilterProxy : public QSortFilterProxyModel
      */
     void setTypeFilter(quint32 modes);
     void setMinAmount(qint64 minimum);
+    void setWatchOnlyFilter(WatchOnlyFilter filter);
 
     /** Set maximum number of rows returned, -1 if unlimited. */
     void setLimit(int limit);
@@ -49,6 +57,7 @@ class TransactionFilterProxy : public QSortFilterProxyModel
     QDateTime dateTo;
     QString addrPrefix;
     quint32 typeFilter;
+    WatchOnlyFilter watchOnlyFilter;
     qint64 minAmount;
     int limitRows;
     bool showInactive;
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 1647bc776f42..1a1f726bf865 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -27,6 +27,7 @@
 // Amount column is right-aligned it contains numbers
 static int column_alignments[] = {
         Qt::AlignLeft|Qt::AlignVCenter, /* status */
+        Qt::AlignLeft|Qt::AlignVCenter, /* watchonly */
         Qt::AlignLeft|Qt::AlignVCenter, /* date */
         Qt::AlignLeft|Qt::AlignVCenter, /* type */
         Qt::AlignLeft|Qt::AlignVCenter, /* address */
@@ -234,7 +235,7 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren
         walletModel(parent),
         priv(new TransactionTablePriv(wallet, this))
 {
-    columns << QString() << tr("Date") << tr("Type") << tr("Address") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
+    columns << QString() << QString() << tr("Date") << tr("Type") << tr("Address") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
     priv->refreshWallet();
 
     connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
@@ -393,22 +394,19 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
 
 QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
 {
-    // mark transactions involving watch-only addresses:
-    QString watchAddress = wtx->involvesWatchAddress ? " (w) " : "";
-
     switch(wtx->type)
     {
     case TransactionRecord::RecvFromOther:
-        return QString::fromStdString(wtx->address) + watchAddress;
+        return QString::fromStdString(wtx->address);
     case TransactionRecord::RecvWithAddress:
     case TransactionRecord::SendToAddress:
     case TransactionRecord::Generated:
-        return lookupAddress(wtx->address, tooltip) + watchAddress;
+        return lookupAddress(wtx->address, tooltip);
     case TransactionRecord::SendToOther:
-        return QString::fromStdString(wtx->address) + watchAddress;
+        return QString::fromStdString(wtx->address);
     case TransactionRecord::SendToSelf:
     default:
-        return tr("(n/a)") + watchAddress;
+        return tr("(n/a)");
     }
 }
 
@@ -482,6 +480,14 @@ QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx)
     return QColor(0,0,0);
 }
 
+QVariant TransactionTableModel::txWatchonlyDecoration(const TransactionRecord *wtx) const
+{
+    if (wtx->involvesWatchAddress)
+        return QIcon(":/icons/eye");
+    else
+        return QVariant();
+}
+
 QString TransactionTableModel::formatTooltip(const TransactionRecord *rec) const
 {
     QString tooltip = formatTxStatus(rec) + QString("\n") + formatTxType(rec);
@@ -506,6 +512,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         {
         case Status:
             return txStatusDecoration(rec);
+        case Watchonly:
+            return txWatchonlyDecoration(rec);
         case ToAddress:
             return txAddressDecoration(rec);
         }
@@ -533,6 +541,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
             return rec->time;
         case Type:
             return formatTxType(rec);
+        case Watchonly:
+            return (rec->involvesWatchAddress ? 1 : 0);
         case ToAddress:
             return formatTxToAddress(rec, true);
         case Amount:
@@ -562,6 +572,10 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         return rec->type;
     case DateRole:
         return QDateTime::fromTime_t(static_cast<uint>(rec->time));
+    case WatchonlyRole:
+        return rec->involvesWatchAddress;
+    case WatchonlyDecorationRole:
+        return txWatchonlyDecoration(rec);
     case LongDescriptionRole:
         return priv->describe(rec, walletModel->getOptionsModel()->getDisplayUnit());
     case AddressRole:
@@ -606,6 +620,8 @@ QVariant TransactionTableModel::headerData(int section, Qt::Orientation orientat
                 return tr("Date and time that the transaction was received.");
             case Type:
                 return tr("Type of transaction.");
+            case Watchonly:
+                return tr("Whether or not a watch-only address is involved in this transaction.");
             case ToAddress:
                 return tr("Destination address of transaction.");
             case Amount:
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 2124d3dd1c7f..413f3f9bf1e8 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -28,10 +28,11 @@ class TransactionTableModel : public QAbstractTableModel
 
     enum ColumnIndex {
         Status = 0,
-        Date = 1,
-        Type = 2,
-        ToAddress = 3,
-        Amount = 4
+        Watchonly = 1,
+        Date = 2,
+        Type = 3,
+        ToAddress = 4,
+        Amount = 5
     };
 
     /** Roles to get specific information from a transaction row.
@@ -42,6 +43,10 @@ class TransactionTableModel : public QAbstractTableModel
         TypeRole = Qt::UserRole,
         /** Date and time this transaction was created */
         DateRole,
+        /** Watch-only boolean */
+        WatchonlyRole,
+        /** Watch-only icon */
+        WatchonlyDecorationRole,
         /** Long description (HTML format) */
         LongDescriptionRole,
         /** Address of transaction */
@@ -83,6 +88,7 @@ class TransactionTableModel : public QAbstractTableModel
     QString formatTxAmount(const TransactionRecord *wtx, bool showUnconfirmed=true, BitcoinUnits::SeparatorStyle separators=BitcoinUnits::separatorStandard) const;
     QString formatTooltip(const TransactionRecord *rec) const;
     QVariant txStatusDecoration(const TransactionRecord *wtx) const;
+    QVariant txWatchonlyDecoration(const TransactionRecord *wtx) const;
     QVariant txAddressDecoration(const TransactionRecord *wtx) const;
 
 public slots:
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 7e8b71d8ea9c..2d34d5812989 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -51,6 +51,13 @@ TransactionView::TransactionView(QWidget *parent) :
     hlayout->addSpacing(23);
 #endif
 
+    watchOnlyWidget = new QComboBox(this);
+    watchOnlyWidget->setFixedWidth(24);
+    watchOnlyWidget->addItem("", TransactionFilterProxy::WatchOnlyFilter_All);
+    watchOnlyWidget->addItem(QIcon(":/icons/eye_plus"), "", TransactionFilterProxy::WatchOnlyFilter_Yes);
+    watchOnlyWidget->addItem(QIcon(":/icons/eye_minus"), "", TransactionFilterProxy::WatchOnlyFilter_No);
+    hlayout->addWidget(watchOnlyWidget);
+
     dateWidget = new QComboBox(this);
 #ifdef Q_OS_MAC
     dateWidget->setFixedWidth(121);
@@ -150,6 +157,7 @@ TransactionView::TransactionView(QWidget *parent) :
 
     connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int)));
     connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int)));
+    connect(watchOnlyWidget, SIGNAL(activated(int)), this, SLOT(chooseWatchonly(int)));
     connect(addressWidget, SIGNAL(textChanged(QString)), this, SLOT(changedPrefix(QString)));
     connect(amountWidget, SIGNAL(textChanged(QString)), this, SLOT(changedAmount(QString)));
 
@@ -187,6 +195,7 @@ void TransactionView::setModel(WalletModel *model)
         transactionView->verticalHeader()->hide();
 
         transactionView->setColumnWidth(TransactionTableModel::Status, STATUS_COLUMN_WIDTH);
+        transactionView->setColumnWidth(TransactionTableModel::Watchonly, WATCHONLY_COLUMN_WIDTH);
         transactionView->setColumnWidth(TransactionTableModel::Date, DATE_COLUMN_WIDTH);
         transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH);
         transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH);
@@ -211,6 +220,12 @@ void TransactionView::setModel(WalletModel *model)
                 }
             }
         }
+
+        // show/hide column Watch-only
+        updateWatchOnlyColumn(model->haveWatchOnly());
+
+        // Watch-only signal
+        connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyColumn(bool)));
     }
 }
 
@@ -270,6 +285,14 @@ void TransactionView::chooseType(int idx)
         typeWidget->itemData(idx).toInt());
 }
 
+void TransactionView::chooseWatchonly(int idx)
+{
+    if(!transactionProxyModel)
+        return;
+    transactionProxyModel->setWatchOnlyFilter(
+        (TransactionFilterProxy::WatchOnlyFilter)watchOnlyWidget->itemData(idx).toInt());
+}
+
 void TransactionView::changedPrefix(const QString &prefix)
 {
     if(!transactionProxyModel)
@@ -307,6 +330,8 @@ void TransactionView::exportClicked()
     // name, column, role
     writer.setModel(transactionProxyModel);
     writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
+    if (model && model->haveWatchOnly())
+        writer.addColumn(tr("Watchonly"), TransactionTableModel::Watchonly);
     writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
     writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
     writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
@@ -501,3 +526,10 @@ bool TransactionView::eventFilter(QObject *obj, QEvent *event)
     }
     return QWidget::eventFilter(obj, event);
 }
+
+// show/hide column Watch-only
+void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly)
+{
+    watchOnlyWidget->setVisible(fHaveWatchOnly);
+    transactionView->setColumnHidden(TransactionTableModel::Watchonly, !fHaveWatchOnly);
+}
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index 618efbc5658a..b249e0041102 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -50,6 +50,7 @@ class TransactionView : public QWidget
 
     enum ColumnWidths {
         STATUS_COLUMN_WIDTH = 23,
+        WATCHONLY_COLUMN_WIDTH = 23,
         DATE_COLUMN_WIDTH = 120,
         TYPE_COLUMN_WIDTH = 120,
         AMOUNT_MINIMUM_COLUMN_WIDTH = 120,
@@ -63,6 +64,7 @@ class TransactionView : public QWidget
 
     QComboBox *dateWidget;
     QComboBox *typeWidget;
+    QComboBox *watchOnlyWidget;
     QLineEdit *addressWidget;
     QLineEdit *amountWidget;
 
@@ -91,6 +93,7 @@ private slots:
     void copyAmount();
     void copyTxID();
     void openThirdPartyTxUrl(QString url);
+    void updateWatchOnlyColumn(bool fHaveWatchOnly);
 
 signals:
     void doubleClicked(const QModelIndex&);
@@ -101,6 +104,7 @@ private slots:
 public slots:
     void chooseDate(int idx);
     void chooseType(int idx);
+    void chooseWatchonly(int idx);
     void changedPrefix(const QString &prefix);
     void changedAmount(const QString &amount);
     void exportClicked();

From 54e658f249f8b2a2cbf7dbe2bab9749faa91c611 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Tue, 12 Aug 2014 00:13:45 +0200
Subject: [PATCH 0516/1819] Remove unused CKeyStoreIsMineVisitor

---
 src/script.cpp | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index 39ae001db8da..942e8810db78 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1444,18 +1444,6 @@ unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
     return nResult;
 }
 
-
-class CKeyStoreIsMineVisitor : public boost::static_visitor<bool>
-{
-private:
-    const CKeyStore *keystore;
-public:
-    CKeyStoreIsMineVisitor(const CKeyStore *keystoreIn) : keystore(keystoreIn) { }
-    bool operator()(const CNoDestination &dest) const { return false; }
-    bool operator()(const CKeyID &keyID) const { return keystore->HaveKey(keyID); }
-    bool operator()(const CScriptID &scriptID) const { return keystore->HaveCScript(scriptID); }
-};
-
 isminetype IsMine(const CKeyStore &keystore, const CTxDestination& dest)
 {
     CScript script;

From a381ee5d1c1c01c66e681e245f60f2de2b79b264 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Mon, 11 Aug 2014 20:49:22 +0200
Subject: [PATCH 0517/1819] Remove unnecessary typedef and script.h include

---
 src/keystore.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/src/keystore.h b/src/keystore.h
index 72411a1387c0..6a3a0dc13e31 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -8,21 +8,12 @@
 
 #include "key.h"
 #include "sync.h"
-#include "script.h"     // for CNoDestination
 
 #include <boost/signals2/signal.hpp>
 #include <boost/variant.hpp>
 
 class CScript;
 
-/** A txout script template with a specific destination. It is either:
- *  * CNoDestination: no destination set
- *  * CKeyID: TX_PUBKEYHASH destination
- *  * CScriptID: TX_SCRIPTHASH destination
- *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
- */
-typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
-
 /** A virtual base class for key stores */
 class CKeyStore
 {

From 76c49c4138dcd30c9237fbb0842df8d2f8209319 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 Aug 2014 12:05:03 +0200
Subject: [PATCH 0518/1819] Fix thread name setting

Because of a typo, thread names no longer appeared in the overview.

This was broken in 51ed9ec.
---
 src/util.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index d3fa5182f37a..93fefbac8a50 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -17,7 +17,7 @@
 
 #ifndef WIN32
 // for posix_fallocate
-#ifdef __linux_
+#ifdef __linux__
 
 #ifdef _POSIX_C_SOURCE
 #undef _POSIX_C_SOURCE
@@ -26,7 +26,7 @@
 #define _POSIX_C_SOURCE 200112L
 #include <sys/prctl.h>
 
-#endif
+#endif // __linux__
 
 #include <algorithm>
 #include <fcntl.h>

From 4c61ba40b9fccb197aae4e6443d564a5e2a501a6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 Aug 2014 13:03:56 +0200
Subject: [PATCH 0519/1819] build: check for sys/prctl.h in the proper way

Use AC_CHECK_HEADERS to check for the header, and include it only
if detected and the subsequent HAVE_SYS_PRCTL_H is set.
---
 configure.ac | 2 +-
 src/util.cpp | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index ffd05ae4f84b..55fc091bc53a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,7 +378,7 @@ if test x$TARGET_OS = xdarwin; then
   AX_CHECK_LINK_FLAG([[-Wl,-dead_strip]], [LDFLAGS="$LDFLAGS -Wl,-dead_strip"])
 fi
 
-AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h])
+AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
 AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
 AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
 
diff --git a/src/util.cpp b/src/util.cpp
index 93fefbac8a50..ae2145a3a0b0 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -3,6 +3,10 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#if defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+#endif
+
 #include "util.h"
 
 #include "chainparamsbase.h"
@@ -24,7 +28,6 @@
 #endif
 
 #define _POSIX_C_SOURCE 200112L
-#include <sys/prctl.h>
 
 #endif // __linux__
 
@@ -61,6 +64,10 @@
 #include <shlobj.h>
 #endif
 
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
 #include <boost/algorithm/string/case_conv.hpp> // for to_lower()
 #include <boost/algorithm/string/join.hpp>
 #include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()

From 8bfdc9acaadea086d19fabbf838ddd4c9e313a05 Mon Sep 17 00:00:00 2001
From: ntrgn <ntrgnt@gmail.com>
Date: Mon, 11 Aug 2014 18:46:57 +0200
Subject: [PATCH 0520/1819] qt: better looking trayicon

Github-Pull: #4678
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
---
 doc/assets-attribution.md            |   1 -
 src/Makefile.qt.include              |   2 --
 src/qt/bitcoin.qrc                   |   2 --
 src/qt/bitcoingui.cpp                |   4 ++--
 src/qt/res/icons/toolbar.png         | Bin 815 -> 0 bytes
 src/qt/res/icons/toolbar_testnet.png | Bin 678 -> 0 bytes
 6 files changed, 2 insertions(+), 7 deletions(-)
 delete mode 100644 src/qt/res/icons/toolbar.png
 delete mode 100644 src/qt/res/icons/toolbar_testnet.png

diff --git a/doc/assets-attribution.md b/doc/assets-attribution.md
index 61b457a28237..cd864f254d78 100644
--- a/doc/assets-attribution.md
+++ b/doc/assets-attribution.md
@@ -100,5 +100,4 @@ Jonas Schnelli
 	src/qt/res/icons/bitcoin.icns, src/qt/res/src/bitcoin.svg,
 	src/qt/res/src/bitcoin.ico, src/qt/res/src/bitcoin.png,
 	src/qt/res/src/bitcoin_testnet.png, docs/bitcoin_logo_doxygen.png,
-	src/qt/res/icons/toolbar.png, src/qt/res/icons/toolbar_testnet.png,
 	src/qt/res/images/splash.png, src/qt/res/images/splash_testnet.png
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 2052264dc95c..7e6fa5cb882a 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -245,8 +245,6 @@ RES_ICONS = \
   qt/res/icons/remove.png \
   qt/res/icons/send.png \
   qt/res/icons/synced.png \
-  qt/res/icons/toolbar.png \
-  qt/res/icons/toolbar_testnet.png \
   qt/res/icons/transaction0.png \
   qt/res/icons/transaction2.png \
   qt/res/icons/transaction_conflicted.png \
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index 357c6470d3b5..6dba62035bad 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -4,7 +4,6 @@
         <file alias="address-book">res/icons/address-book.png</file>
         <file alias="quit">res/icons/quit.png</file>
         <file alias="send">res/icons/send.png</file>
-        <file alias="toolbar">res/icons/toolbar.png</file>
         <file alias="connect_0">res/icons/connect0_16.png</file>
         <file alias="connect_1">res/icons/connect1_16.png</file>
         <file alias="connect_2">res/icons/connect2_16.png</file>
@@ -24,7 +23,6 @@
         <file alias="editcopy">res/icons/editcopy.png</file>
         <file alias="add">res/icons/add.png</file>
         <file alias="bitcoin_testnet">res/icons/bitcoin_testnet.png</file>
-        <file alias="toolbar_testnet">res/icons/toolbar_testnet.png</file>
         <file alias="edit">res/icons/edit.png</file>
         <file alias="history">res/icons/history.png</file>
         <file alias="overview">res/icons/overview.png</file>
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index e3257e859cad..bfca5e8d1a20 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -479,12 +479,12 @@ void BitcoinGUI::createTrayIcon(bool fIsTestnet)
     if (!fIsTestnet)
     {
         trayIcon->setToolTip(tr("Bitcoin Core client"));
-        trayIcon->setIcon(QIcon(":/icons/toolbar"));
+        trayIcon->setIcon(QIcon(":/icons/bitcoin"));
     }
     else
     {
         trayIcon->setToolTip(tr("Bitcoin Core client") + " " + tr("[testnet]"));
-        trayIcon->setIcon(QIcon(":/icons/toolbar_testnet"));
+        trayIcon->setIcon(QIcon(":/icons/bitcoin_testnet"));
     }
 
     trayIcon->show();
diff --git a/src/qt/res/icons/toolbar.png b/src/qt/res/icons/toolbar.png
deleted file mode 100644
index c82d96519c508857f70bf4b8555b9dd46d197272..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/src/qt/res/icons/toolbar_testnet.png b/src/qt/res/icons/toolbar_testnet.png
deleted file mode 100644
index 5995bc06672c9884960f20098441c2afb5dd022c..0000000000000000000000000000000000000000
GIT binary patch

From 3b72fdfb86b08d80f5f790220137083b56f624d6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 Aug 2014 15:06:20 +0200
Subject: [PATCH 0521/1819] Revert "Reject transactions with excessive numbers
 of sigops"

This reverts commit 4fad8e6d831729efa1965fa2034e7e51d3d0a1be.
---
 src/main.cpp | 15 +++------------
 src/main.h   |  2 --
 2 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index e135e93adb80..55206600e2c0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -956,18 +956,9 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         if (Params().RequireStandard() && !AreInputsStandard(tx, view))
             return error("AcceptToMemoryPool: : nonstandard transaction input");
 
-        // Check that the transaction doesn't have an excessive number of
-        // sigops, making it impossible to mine. Since the coinbase transaction
-        // itself can contain sigops MAX_TX_SIGOPS is less than
-        // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than
-        // merely non-standard transaction.
-        unsigned int nSigOps = GetLegacySigOpCount(tx);
-        nSigOps += GetP2SHSigOpCount(tx, view);
-        if (nSigOps > MAX_TX_SIGOPS)
-            return state.DoS(0,
-                             error("AcceptToMemoryPool : too many sigops %s, %d > %d",
-                                   hash.ToString(), nSigOps, MAX_TX_SIGOPS),
-                             REJECT_NONSTANDARD, "bad-txns-too-many-sigops");
+        // Note: if you modify this code to accept non-standard transactions, then
+        // you should add code here to check that the transaction does a
+        // reasonable number of ECDSA signature verifications.
 
         int64_t nValueOut = tx.GetValueOut();
         int64_t nFees = nValueIn-nValueOut;
diff --git a/src/main.h b/src/main.h
index 01d3f119e1e8..a27020459ab2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -45,8 +45,6 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 /** Maxiumum number of signature check operations in an IsStandard() P2SH script */
 static const unsigned int MAX_P2SH_SIGOPS = 15;
-/** The maximum number of sigops we're willing to relay/mine in a single tx */
-static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
 /** The maximum number of orphan transactions kept in memory */
 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
 /** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */

From c33b983903c64d88a2aef24da1827b86aadce596 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 Aug 2014 07:54:09 +0200
Subject: [PATCH 0522/1819] Don't poll showmyip.com, it doesn't exist anymore

Fixes #4679.

This leaves us with only one candidate, checkip.dyndns.org.
GetMyExternalIP should be phased out as soon as possible.
---
 src/net.cpp | 21 +--------------------
 1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 62124514c8d3..ec58f84b0687 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -368,7 +368,7 @@ bool GetMyExternalIP(CNetAddr& ipRet)
     const char* pszKeyword;
 
     for (int nLookup = 0; nLookup <= 1; nLookup++)
-    for (int nHost = 1; nHost <= 2; nHost++)
+    for (int nHost = 1; nHost <= 1; nHost++)
     {
         // We should be phasing out our use of sites like these. If we need
         // replacements, we should ask for volunteers to put this simple
@@ -393,25 +393,6 @@ bool GetMyExternalIP(CNetAddr& ipRet)
 
             pszKeyword = "Address:";
         }
-        else if (nHost == 2)
-        {
-            addrConnect = CService("74.208.43.192", 80); // www.showmyip.com
-
-            if (nLookup == 1)
-            {
-                CService addrIP("www.showmyip.com", 80, true);
-                if (addrIP.IsValid())
-                    addrConnect = addrIP;
-            }
-
-            pszGet = "GET /simple/ HTTP/1.1\r\n"
-                     "Host: www.showmyip.com\r\n"
-                     "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"
-                     "Connection: close\r\n"
-                     "\r\n";
-
-            pszKeyword = NULL; // Returns just IP address
-        }
 
         if (GetMyExternalIP2(addrConnect, pszGet, pszKeyword, ipRet))
             return true;

From 9ee09dc64fbe712401c57b458c8254a1fdaaa5f2 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Thu, 8 May 2014 00:18:57 -0400
Subject: [PATCH 0523/1819] Reapply: Reject transactions with excessive numbers
 of sigops

Reverting was based on a misunderstanding, it appears.

Github-Pull: #4150
---
 src/main.cpp | 15 ++++++++++++---
 src/main.h   |  2 ++
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 55206600e2c0..e135e93adb80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -956,9 +956,18 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         if (Params().RequireStandard() && !AreInputsStandard(tx, view))
             return error("AcceptToMemoryPool: : nonstandard transaction input");
 
-        // Note: if you modify this code to accept non-standard transactions, then
-        // you should add code here to check that the transaction does a
-        // reasonable number of ECDSA signature verifications.
+        // Check that the transaction doesn't have an excessive number of
+        // sigops, making it impossible to mine. Since the coinbase transaction
+        // itself can contain sigops MAX_TX_SIGOPS is less than
+        // MAX_BLOCK_SIGOPS; we still consider this an invalid rather than
+        // merely non-standard transaction.
+        unsigned int nSigOps = GetLegacySigOpCount(tx);
+        nSigOps += GetP2SHSigOpCount(tx, view);
+        if (nSigOps > MAX_TX_SIGOPS)
+            return state.DoS(0,
+                             error("AcceptToMemoryPool : too many sigops %s, %d > %d",
+                                   hash.ToString(), nSigOps, MAX_TX_SIGOPS),
+                             REJECT_NONSTANDARD, "bad-txns-too-many-sigops");
 
         int64_t nValueOut = tx.GetValueOut();
         int64_t nFees = nValueIn-nValueOut;
diff --git a/src/main.h b/src/main.h
index a27020459ab2..01d3f119e1e8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -45,6 +45,8 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 /** Maxiumum number of signature check operations in an IsStandard() P2SH script */
 static const unsigned int MAX_P2SH_SIGOPS = 15;
+/** The maximum number of sigops we're willing to relay/mine in a single tx */
+static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
 /** The maximum number of orphan transactions kept in memory */
 static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
 /** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */

From 616c24307f4f18d7dbd603b5d9688904f2d74210 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 13 Aug 2014 11:53:39 -0400
Subject: [PATCH 0524/1819] bitcoin-tx: fix build warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Cleans up a bunch of:
warning: missing braces around initializer for ‘const<anonymous struct>’
---
 src/bitcoin-tx.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 299315424bb8..ffe87298f63e 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -283,12 +283,12 @@ static const struct {
     const char *flagStr;
     int flags;
 } sighashOptions[N_SIGHASH_OPTS] = {
-    "ALL", SIGHASH_ALL,
-    "NONE", SIGHASH_NONE,
-    "SINGLE", SIGHASH_SINGLE,
-    "ALL|ANYONECANPAY", SIGHASH_ALL|SIGHASH_ANYONECANPAY,
-    "NONE|ANYONECANPAY", SIGHASH_NONE|SIGHASH_ANYONECANPAY,
-    "SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY,
+    {"ALL", SIGHASH_ALL},
+    {"NONE", SIGHASH_NONE},
+    {"SINGLE", SIGHASH_SINGLE},
+    {"ALL|ANYONECANPAY", SIGHASH_ALL|SIGHASH_ANYONECANPAY},
+    {"NONE|ANYONECANPAY", SIGHASH_NONE|SIGHASH_ANYONECANPAY},
+    {"SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY},
 };
 
 static bool findSighashFlags(int& flags, const string& flagStr)

From da2ede2aa68ba14e1228b61e41a5840669560eee Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Thu, 14 Aug 2014 16:15:09 +0200
Subject: [PATCH 0525/1819] [Wallet] Improve ReorderTransactions(..)

---
 src/walletdb.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index a95baf83d0dd..d55ed374c56e 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -278,8 +278,12 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
             nOrderPos = nOrderPosNext++;
             nOrderPosOffsets.push_back(nOrderPos);
 
-            if (pacentry)
-                // Have to write accounting regardless, since we don't keep it in memory
+            if (pwtx)
+            {
+                if (!WriteTx(pwtx->GetHash(), *pwtx))
+                    return DB_LOAD_FAIL;
+            }
+            else
                 if (!WriteAccountingEntry(pacentry->nEntryNo, *pacentry))
                     return DB_LOAD_FAIL;
         }
@@ -308,6 +312,7 @@ CWalletDB::ReorderTransactions(CWallet* pwallet)
                     return DB_LOAD_FAIL;
         }
     }
+    WriteOrderPosNext(nOrderPosNext);
 
     return DB_LOAD_OK;
 }

From beb36e800c393da3c5857a8f1e5959748ac0f96b Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 29 Jul 2014 10:53:38 -0400
Subject: [PATCH 0526/1819] ui_interface: remove unused NotifyBlocksChanged
 signal

---
 src/main.cpp           | 5 +----
 src/qt/clientmodel.cpp | 8 --------
 src/ui_interface.h     | 3 ---
 3 files changed, 1 insertion(+), 15 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index e135e93adb80..e73942d7e004 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1386,10 +1386,8 @@ void Misbehaving(NodeId pnode, int howmuch)
 void static InvalidChainFound(CBlockIndex* pindexNew)
 {
     if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
-    {
         pindexBestInvalid = pindexNew;
-        uiInterface.NotifyBlocksChanged();
-    }
+
     LogPrintf("InvalidChainFound: invalid block=%s  height=%d  log2_work=%.8g  date=%s\n",
       pindexNew->GetBlockHash().ToString(), pindexNew->nHeight,
       log(pindexNew->nChainWork.getdouble())/log(2.0), DateTimeStrFormat("%Y-%m-%d %H:%M:%S",
@@ -2175,7 +2173,6 @@ bool ActivateBestChain(CValidationState &state) {
                 boost::thread t(runCommand, strCmd); // thread runs free
             }
         }
-        uiInterface.NotifyBlocksChanged();
     } while(pindexMostWork != chainActive.Tip());
 
     return true;
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 4c21eb5594e1..fea99bfd9379 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -208,12 +208,6 @@ static void ShowProgress(ClientModel *clientmodel, const std::string &title, int
                               Q_ARG(int, nProgress));
 }
 
-static void NotifyBlocksChanged(ClientModel *clientmodel)
-{
-    // This notification is too frequent. Don't trigger a signal.
-    // Don't remove it, though, as it might be useful later.
-}
-
 static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections)
 {
     // Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections);
@@ -233,7 +227,6 @@ void ClientModel::subscribeToCoreSignals()
 {
     // Connect signals to client
     uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
-    uiInterface.NotifyBlocksChanged.connect(boost::bind(NotifyBlocksChanged, this));
     uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
     uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this, _1, _2));
 }
@@ -242,7 +235,6 @@ void ClientModel::unsubscribeFromCoreSignals()
 {
     // Disconnect signals from client
     uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
-    uiInterface.NotifyBlocksChanged.disconnect(boost::bind(NotifyBlocksChanged, this));
     uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
     uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this, _1, _2));
 }
diff --git a/src/ui_interface.h b/src/ui_interface.h
index b3df2b5a8591..a073a32828ff 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -78,9 +78,6 @@ class CClientUIInterface
     /** Translate a message to the native language of the user. */
     boost::signals2::signal<std::string (const char* psz)> Translate;
 
-    /** Block chain changed. */
-    boost::signals2::signal<void ()> NotifyBlocksChanged;
-
     /** Number of network connections changed. */
     boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
 

From c7b6117debf4ebabc464a55b840bdd7bdeb94fa3 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Thu, 14 Aug 2014 12:32:34 -0400
Subject: [PATCH 0527/1819] Create new signal for notification of new blocks. 
 Use w/ -blocknotify

---
 src/init.cpp       | 11 +++++++++++
 src/main.cpp       |  8 +++-----
 src/ui_interface.h |  3 +++
 3 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 8ae228bbbeb5..494342c693ca 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -367,6 +367,14 @@ std::string LicenseInfo()
            "\n";
 }
 
+static void BlockNotifyCallback(const uint256& hashNewTip)
+{
+    std::string strCmd = GetArg("-blocknotify", "");
+
+    boost::replace_all(strCmd, "%s", hashNewTip.GetHex());
+    boost::thread t(runCommand, strCmd); // thread runs free
+}
+
 struct CImportingNow
 {
     CImportingNow() {
@@ -1184,6 +1192,9 @@ bool AppInit2(boost::thread_group& threadGroup)
 #endif // !ENABLE_WALLET
     // ********************************************************* Step 9: import blocks
 
+    if (mapArgs.count("-blocknotify"))
+        uiInterface.NotifyBlockTip.connect(BlockNotifyCallback);
+
     // scan for better chains in the block chain database, that are not yet connected in the active best chain
     CValidationState state;
     if (!ActivateBestChain(state))
diff --git a/src/main.cpp b/src/main.cpp
index e73942d7e004..841cc1952f7d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2162,16 +2162,14 @@ bool ActivateBestChain(CValidationState &state) {
             uint256 hashNewTip = pindexNewTip->GetBlockHash();
             // Relay inventory, but don't relay old inventory during initial block download.
             int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
+            {
             LOCK(cs_vNodes);
             BOOST_FOREACH(CNode* pnode, vNodes)
                 if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
                     pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
-
-            std::string strCmd = GetArg("-blocknotify", "");
-            if (!strCmd.empty()) {
-                boost::replace_all(strCmd, "%s", hashNewTip.GetHex());
-                boost::thread t(runCommand, strCmd); // thread runs free
             }
+
+            uiInterface.NotifyBlockTip(hashNewTip);
         }
     } while(pindexMostWork != chainActive.Tip());
 
diff --git a/src/ui_interface.h b/src/ui_interface.h
index a073a32828ff..bbc8a203c934 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -92,6 +92,9 @@ class CClientUIInterface
 
     /** Show progress e.g. for verifychain */
     boost::signals2::signal<void (const std::string &title, int nProgress)> ShowProgress;
+
+    /** New block has been accepted */
+    boost::signals2::signal<void (const uint256& hash)> NotifyBlockTip;
 };
 
 extern CClientUIInterface uiInterface;

From 6f2c26a457d279138d23d0f321edf55cd6b1f72f Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 6 Aug 2014 23:58:19 -0400
Subject: [PATCH 0528/1819] Closely track mempool byte total. Add
 "getmempoolinfo" RPC.

Goal:  Gain live insight into the mempool.  Groundwork for future work
that caps mempool size.
---
 src/rpcblockchain.cpp | 24 ++++++++++++++++++++++++
 src/rpcserver.cpp     |  1 +
 src/rpcserver.h       |  1 +
 src/txmempool.cpp     |  9 +++++++++
 src/txmempool.h       |  6 ++++++
 5 files changed, 41 insertions(+)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 1e5198b85cff..e511fe4222d1 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -531,3 +531,27 @@ Value getchaintips(const Array& params, bool fHelp)
 
     return res;
 }
+
+Value getmempoolinfo(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 0)
+        throw runtime_error(
+            "getmempoolinfo\n"
+            "\nReturns details on the active state of the TX memory pool.\n"
+            "\nResult:\n"
+            "{\n"
+            "  \"size\": xxxxx                (numeric) Current tx count\n"
+            "  \"bytes\": xxxxx               (numeric) Sum of all tx sizes\n"
+            "}\n"
+            "\nExamples:\n"
+            + HelpExampleCli("getmempoolinfo", "")
+            + HelpExampleRpc("getmempoolinfo", "")
+        );
+
+    Object ret;
+    ret.push_back(Pair("size", (int64_t) mempool.size()));
+    ret.push_back(Pair("bytes", (int64_t) mempool.GetTotalTxSize()));
+
+    return ret;
+}
+
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 56064941f6c1..3b51c91e7cb3 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -256,6 +256,7 @@ static const CRPCCommand vRPCCommands[] =
     { "blockchain",         "getblockhash",           &getblockhash,           true,      false,      false },
     { "blockchain",         "getchaintips",           &getchaintips,           true,      false,      false },
     { "blockchain",         "getdifficulty",          &getdifficulty,          true,      false,      false },
+    { "blockchain",         "getmempoolinfo",         &getmempoolinfo,         true,      true,       false },
     { "blockchain",         "getrawmempool",          &getrawmempool,          true,      false,      false },
     { "blockchain",         "gettxout",               &gettxout,               true,      false,      false },
     { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 2248e8aeb2f3..b850d15d4ef3 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -200,6 +200,7 @@ extern json_spirit::Value getblockcount(const json_spirit::Array& params, bool f
 extern json_spirit::Value getbestblockhash(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getdifficulty(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value settxfee(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value getmempoolinfo(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getrawmempool(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblockhash(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblock(const json_spirit::Array& params, bool fHelp);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 29924fff09c2..80cae6824480 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -402,6 +402,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry)
         for (unsigned int i = 0; i < tx.vin.size(); i++)
             mapNextTx[tx.vin[i].prevout] = CInPoint(&tx, i);
         nTransactionsUpdated++;
+        totalTxSize += entry.GetTxSize();
     }
     return true;
 }
@@ -426,6 +427,8 @@ void CTxMemPool::remove(const CTransaction &tx, std::list<CTransaction>& removed
             removed.push_front(tx);
             BOOST_FOREACH(const CTxIn& txin, tx.vin)
                 mapNextTx.erase(txin.prevout);
+
+            totalTxSize -= mapTx[hash].GetTxSize();
             mapTx.erase(hash);
             nTransactionsUpdated++;
         }
@@ -477,6 +480,7 @@ void CTxMemPool::clear()
     LOCK(cs);
     mapTx.clear();
     mapNextTx.clear();
+    totalTxSize = 0;
     ++nTransactionsUpdated;
 }
 
@@ -487,9 +491,12 @@ void CTxMemPool::check(CCoinsViewCache *pcoins) const
 
     LogPrint("mempool", "Checking mempool with %u transactions and %u inputs\n", (unsigned int)mapTx.size(), (unsigned int)mapNextTx.size());
 
+    uint64_t checkTotal = 0;
+
     LOCK(cs);
     for (std::map<uint256, CTxMemPoolEntry>::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
         unsigned int i = 0;
+        checkTotal += it->second.GetTxSize();
         const CTransaction& tx = it->second.GetTx();
         BOOST_FOREACH(const CTxIn &txin, tx.vin) {
             // Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
@@ -518,6 +525,8 @@ void CTxMemPool::check(CCoinsViewCache *pcoins) const
         assert(tx.vin.size() > it->second.n);
         assert(it->first == it->second.ptx->vin[it->second.n].prevout);
     }
+
+    assert(totalTxSize == checkTotal);
 }
 
 void CTxMemPool::queryHashes(vector<uint256>& vtxid)
diff --git a/src/txmempool.h b/src/txmempool.h
index 41b2c52f39c7..2577397bce7b 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -68,6 +68,7 @@ class CTxMemPool
     CMinerPolicyEstimator* minerPolicyEstimator;
 
     CFeeRate minRelayFee; // Passed to constructor to avoid dependency on main
+    uint64_t totalTxSize; // sum of all mempool tx' byte sizes
 
 public:
     mutable CCriticalSection cs;
@@ -108,6 +109,11 @@ class CTxMemPool
         LOCK(cs);
         return mapTx.size();
     }
+    uint64_t GetTotalTxSize()
+    {
+        LOCK(cs);
+        return totalTxSize;
+    }
 
     bool exists(uint256 hash)
     {

From 6b099402b40dcf9fc716be29c85e7e1865b28e92 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 7 Aug 2014 11:16:07 -0400
Subject: [PATCH 0529/1819] build: fix automake warnings about the use of
 INCLUDES

While we're at it, reduce the use of LIBS as well. This makes dependencies
explicit.

Fixes building with (the not-yet-merged) libsecp256k1 as well.

Github-Pull: #4689
Rebased-By: Wladimir J. van der laan <laanwj@gmail.com>
Rebased-From: 909b347 c0e5dda
---
 configure.ac                | 11 ++++-------
 src/Makefile.am             | 21 +++++++++++++++------
 src/Makefile.qt.include     |  2 +-
 src/Makefile.qttest.include |  2 +-
 src/Makefile.test.include   |  2 +-
 5 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 55fc091bc53a..d6d56fae34de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -304,7 +304,6 @@ AC_C_BIGENDIAN([AC_MSG_ERROR("Big Endian not supported")])
 
 dnl Check for pthread compile/link requirements
 AX_PTHREAD
-INCLUDES="$INCLUDES $PTHREAD_CFLAGS"
 
 # The following macro will add the necessary defines to bitcoin-config.h, but
 # they also need to be passed down to any subprojects. Pull the results out of
@@ -456,7 +455,6 @@ if test x$use_tests = xyes; then
 fi
 
 BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
-BOOST_INCLUDES="$BOOST_CPPFLAGS"
 
 dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
 dnl it was broken from 1.50 to 1.52 when backed by nanosleep. Use sleep_for if
@@ -536,8 +534,8 @@ if test x$use_pkgconfig = xyes; then
   m4_ifdef(
     [PKG_CHECK_MODULES],
     [
-      PKG_CHECK_MODULES([SSL], [libssl], [INCLUDES="$INCLUDES $SSL_CFLAGS"; LIBS="$LIBS $SSL_LIBS"], [AC_MSG_ERROR(openssl  not found.)])
-      PKG_CHECK_MODULES([CRYPTO], [libcrypto], [INCLUDES="$INCLUDES $CRYPTO_CFLAGS"; LIBS="$LIBS $CRYPTO_LIBS"], [AC_MSG_ERROR(libcrypto  not found.)])
+      PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl  not found.)])
+      PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto  not found.)])
       BITCOIN_QT_CHECK([PKG_CHECK_MODULES([PROTOBUF], [protobuf], [have_protobuf=yes], [BITCOIN_QT_FAIL(libprotobuf not found)])])
       if test x$use_qr != xno; then
         BITCOIN_QT_CHECK([PKG_CHECK_MODULES([QR], [libqrencode], [have_qrencode=yes], [have_qrencode=no])])
@@ -546,10 +544,10 @@ if test x$use_pkgconfig = xyes; then
   )
 else
   AC_CHECK_HEADER([openssl/crypto.h],,AC_MSG_ERROR(libcrypto headers missing))
-  AC_CHECK_LIB([crypto],      [main],, AC_MSG_ERROR(libcrypto missing))
+  AC_CHECK_LIB([crypto],      [main],CRYPTO_LIBS=-lcrypto, AC_MSG_ERROR(libcrypto missing))
 
   AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
-  AC_CHECK_LIB([ssl],         [main],, AC_MSG_ERROR(libssl missing))
+  AC_CHECK_LIB([ssl],         [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
 
   BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],,BITCOIN_QT_FAIL(libprotobuf not found)))
   if test x$use_qr != xno; then
@@ -709,7 +707,6 @@ AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
-AC_SUBST(INCLUDES)
 AC_SUBST(BOOST_LIBS)
 AC_SUBST(TESTDEFS)
 AC_SUBST(LEVELDB_TARGET_FLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index 727a88c3e7f6..bec019b49ea6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,3 @@
-AM_CPPFLAGS =  $(INCLUDES)
 AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
 
 if USE_LIBSECP256K1
@@ -22,7 +21,7 @@ $(LIBLEVELDB) $(LIBMEMENV):
 endif
 
 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
-BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS)
+BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
 
 if USE_LIBSECP256K1
 BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
@@ -261,7 +260,7 @@ if TARGET_WINDOWS
 bitcoind_SOURCES += bitcoind-res.rc
 endif
 
-bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS)
+bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
 
 # bitcoin-cli binary #
@@ -270,7 +269,10 @@ bitcoin_cli_LDADD = \
   $(LIBBITCOIN_COMMON) \
   $(LIBBITCOIN_UTIL) \
   $(LIBBITCOIN_CRYPTO) \
-  $(BOOST_LIBS)
+  $(BOOST_LIBS) \
+  $(SSL_LIBS) \
+  $(CRYPTO_LIBS)
+
 bitcoin_cli_SOURCES = \
   bitcoin-cli.cpp
 
@@ -285,8 +287,15 @@ bitcoin_tx_LDADD = \
   $(LIBBITCOIN_UNIVALUE) \
   $(LIBBITCOIN_COMMON) \
   $(LIBBITCOIN_UTIL) \
-  $(LIBBITCOIN_CRYPTO) \
-  $(BOOST_LIBS)
+  $(LIBBITCOIN_CRYPTO)
+
+if USE_LIBSECP256K1
+  bitcoin_tx_LDADD += secp256k1/libsecp256k1.la
+endif
+
+  bitcoin_tx_LDADD += $(BOOST_LIBS) \
+  $(SSL_LIBS) \
+  $(CRYPTO_LIBS)
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 7e6fa5cb882a..9a333d5c76bc 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -358,7 +358,7 @@ if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index d49b2240eaf6..ee8edb994e1d 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -32,7 +32,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
-  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS)
+  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 72451fba9af3..b5fee082237f 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -74,7 +74,7 @@ if USE_LIBSECP256K1
   test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la
 endif
 
-test_test_bitcoin_LDADD += $(BDB_LIBS)
+test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From 54c7df81f3e5f81cb91646acaf82074a3a6be3b2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 15 Aug 2014 12:19:11 -0400
Subject: [PATCH 0530/1819] build: Fix boost build on some platforms

When the libpath doesn't line up with the value from config.sub, we don't find
the correct path to boost's libs. This adds a hack to try another path before
giving up.

Should close #3219.
---
 src/m4/ax_boost_base.m4 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/m4/ax_boost_base.m4 b/src/m4/ax_boost_base.m4
index e025a7e1ca92..3f24d5ddc617 100644
--- a/src/m4/ax_boost_base.m4
+++ b/src/m4/ax_boost_base.m4
@@ -112,6 +112,12 @@ if test "x$want_boost" = "xyes"; then
         ;;
     esac
 
+    dnl some arches may advertise a cpu type that doesn't line up with their
+    dnl prefix's cpu type. For example, uname may report armv7l while libs are
+    dnl installed to /usr/lib/arm-linux-gnueabihf. Try getting the compiler's
+    dnl value for an extra chance of finding the correct path.
+    libsubdirs="lib/`$CXX -dumpmachine 2>/dev/null` $libsubdirs"
+
     dnl first we check the system location for boost libraries
     dnl this location ist chosen if boost libraries are installed with the --layout=system option
     dnl or if you install boost with RPM

From 4975ae1722cd8af63eda2f02ef64a98091b6fb58 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 7 Aug 2014 18:59:06 -0400
Subject: [PATCH 0531/1819] build: add option for reducing exports

Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
---
 configure.ac                | 77 +++++++++++++++++++++++++++++++++++++
 src/Makefile.am             |  3 ++
 src/Makefile.qt.include     |  2 +-
 src/Makefile.qttest.include |  2 +-
 src/Makefile.test.include   |  1 +
 5 files changed, 83 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d6d56fae34de..bf45d7cd1c25 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,12 @@ AC_ARG_ENABLE([hardening],
   [use_hardening=$enableval],
   [use_hardening=yes])
 
+AC_ARG_ENABLE([reduce-exports],
+  [AS_HELP_STRING([--enable-reduce-exports],
+  [attempt to reduce exported symbols in the resulting executables (default is yes)])],
+  [use_reduce_exports=$enableval],
+  [use_reduce_exports=auto])
+
 AC_ARG_ENABLE([ccache],
   [AS_HELP_STRING([--enable-ccache],
   [use ccache for building (default is yes if ccache is found)])],
@@ -396,6 +402,40 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
 
 AC_SEARCH_LIBS([clock_gettime],[rt])
 
+AC_MSG_CHECKING([for visibility attribute])
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+  int foo_def( void ) __attribute__((visibility("default")));
+  int main(){}
+  ])],
+  [
+    AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
+    AC_MSG_RESULT(yes)
+  ],
+  [
+    AC_MSG_RESULT(no)
+    if test x$use_reduce_exports = xyes; then
+      AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduced-exports.])
+    fi
+      AC_MSG_WARN([Cannot find a working visibility attribute. Disabling reduced exports.])
+      use_reduce_exports=no
+  ]
+)
+
+if test x$use_reduce_exports != xno; then
+  AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
+  [
+    if test x$use_reduce_exports = xyes; then
+      AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduced-exports.])
+    fi
+    AC_MSG_WARN([Cannot set default symbol visibility. Disabling reduced exports.])
+    use_reduce_exports=no
+  ])
+  if test x$use_reduce_exports != xno; then
+    AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
+    CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
+  fi
+fi
+
 LEVELDB_CPPFLAGS=
 LIBLEVELDB=
 LIBMEMENV=
@@ -420,6 +460,35 @@ fi
 
 dnl Check for boost libs
 AX_BOOST_BASE
+
+if test x$use_reduce_exports != xno; then
+  AC_MSG_CHECKING([for working boost reduced exports])
+  TEMP_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
+  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+      @%:@include <boost/version.hpp>
+    ]], [[
+      #if BOOST_VERSION >= 104900
+      // Everything is okay
+      #else
+      #  error Boost version is too old
+      #endif
+    ]])],[
+      AC_MSG_RESULT(yes)
+    ],[:
+    if test x$use_reduce_exports = xauto; then
+      use_reduce_exports=no
+    else
+      if test x$use_reduce_exports = xyes; then
+        AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduced-exports.])
+      fi
+    fi
+    AC_MSG_RESULT(no)
+    AC_MSG_WARN([boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.])
+  ])
+  CPPFLAGS="$TEMP_CPPFLAGS"
+fi
+
 AX_BOOST_SYSTEM
 AX_BOOST_FILESYSTEM
 AX_BOOST_PROGRAM_OPTIONS
@@ -672,6 +741,13 @@ else
   AC_MSG_RESULT([no])
 fi
 
+AC_MSG_CHECKING([whether to reduce exports])
+if test x$use_reduce_exports != xno; then
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+
 if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
   AC_MSG_ERROR([No targets! Please specify at least one of: --enable-cli --enable-daemon --enable-gui or --enable-tests])
 fi
@@ -704,6 +780,7 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
 
+AC_SUBST(RELDFLAGS)
 AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
diff --git a/src/Makefile.am b/src/Makefile.am
index bec019b49ea6..85d4ab6decb8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -262,6 +262,7 @@ endif
 
 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
+bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
@@ -299,10 +300,12 @@ endif
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
+bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
+bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 9a333d5c76bc..28d7053fc4b1 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -362,7 +362,7 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 #locale/foo.ts -> locale/foo.qm
 QT_QM=$(QT_TS:.ts=.qm)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index ee8edb994e1d..2cba5b7e1ef7 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -36,7 +36,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBIT
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_test_test_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b5fee082237f..b54c9be66422 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -75,6 +75,7 @@ if USE_LIBSECP256K1
 endif
 
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From a65668ddc0b4a6e0114abb6856d90c8ec0bf8784 Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Sat, 16 Aug 2014 10:56:28 +1200
Subject: [PATCH 0532/1819] build : fix CPPFLAGS for libbitcoin_cli

---
 src/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index bec019b49ea6..eda20ad2964b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -229,6 +229,7 @@ libbitcoin_util_a_SOURCES += compat/glibcxx_compat.cpp
 endif
 
 # cli: shared between bitcoin-cli and bitcoin-qt
+libbitcoin_cli_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_cli_a_SOURCES = \
   rpcclient.cpp \
   $(BITCOIN_CORE_H)

From 1910910ddeeb319f0c863ba2fd37364c81338b8f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 15 Aug 2014 22:44:10 -0400
Subject: [PATCH 0533/1819] depends: fix shasum on osx < 10.9

Shasum verification from stdin doesn't work there, so we write to a file
instead.

Formatted a bit too.
---
 depends/funcs.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/depends/funcs.mk b/depends/funcs.mk
index 4c47cc926e25..b5d8b0ee2e6e 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -20,7 +20,11 @@ $(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dep
 endef
 
 define fetch_file
-(test -f $(SOURCES_PATH)/$(3) || ( mkdir -p $$($(1)_extract_dir) && $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)" && echo "$(4)  $$($(1)_extract_dir)/$(3).temp" | $(build_SHA256SUM) -c && mv $$($(1)_extract_dir)/$(3).temp $(SOURCES_PATH)/$(3) ))
+(test -f $(SOURCES_PATH)/$(3) || \
+  ( mkdir -p $$($(1)_extract_dir) && $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)" && \
+    echo "$(4)  $$($(1)_extract_dir)/$(3).temp" > $$($(1)_extract_dir)/.$(3).hash && \
+    $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$(3).hash && \
+    mv $$($(1)_extract_dir)/$(3).temp $(SOURCES_PATH)/$(3) ))
 endef
 
 define int_get_build_recipe_hash
@@ -62,7 +66,7 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
 
 #default commands
 $(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)/$$($(1)_download_file)),$($(1)_file_name),$($(1)_sha256_hash))
-$(1)_extract_cmds ?= echo "$$($(1)_sha256_hash)  $$($(1)_source)" | $(build_SHA256SUM) -c && tar --strip-components=1 -xf $$($(1)_source)
+$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash)  $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash &&  $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
 $(1)_preprocess_cmds ?=
 $(1)_build_cmds ?=
 $(1)_config_cmds ?=

From e42363d8005ff899c5da0e99eebc19bb16f330e5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 15 Aug 2014 22:44:36 -0400
Subject: [PATCH 0534/1819] build: add funcs.mk to the list of meta-depends

If anything in funcs.mk changes, everything must rebuild
---
 depends/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/Makefile b/depends/Makefile
index d431653068f9..bd5f0bf53643 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -72,7 +72,7 @@ packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(qt_pack
 native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages) $(qt_native_packages_)
 all_packages = $(packages) $(native_packages)
 
-meta_depends = Makefile builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
+meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
 
 $(host_arch)_$(host_os)_native_toolchain?=$($(host_os)_native_toolchain)
 

From 9322f1a4d9ab301f2f6b8a404fb6012d8b50ef74 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 15 Aug 2014 23:15:49 -0400
Subject: [PATCH 0535/1819] tests: fix test-runner for osx. Closes ##4708

Use the more portable $$ rather than $BASHPID
---
 qa/pull-tester/run-bitcoind-for-test.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index e186bd7a23b0..67318e5a4c11 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -9,7 +9,7 @@ mkdir -p "$DATADIR"/regtest
 touch "$DATADIR/regtest/debug.log"
 tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
 WAITER=$!
-PORT=`expr 10000 + $BASHPID % 55536`
+PORT=`expr 10000 + $$ % 55536`
 "@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
 BITCOIND=$!
 

From 5cbda4f10f16923910de2bd080152fc7bbc48738 Mon Sep 17 00:00:00 2001
From: Ross Nicoll <jrn@jrn.me.uk>
Date: Thu, 7 Aug 2014 22:58:50 +0100
Subject: [PATCH 0536/1819] Changed LevelDB cursors to use scoped pointers to
 ensure destruction when going out of scope.

This corrects a bug where an exception thrown reading from the database causes the cursor to
be left open, which causes an assertion error to occur when the database is deleted (around
line 938 of init.cpp).
---
 src/txdb.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/txdb.cpp b/src/txdb.cpp
index 52cd96283e2d..d3d05c58d705 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -103,7 +103,7 @@ bool CBlockTreeDB::ReadLastBlockFile(int &nFile) {
 }
 
 bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
-    leveldb::Iterator *pcursor = db.NewIterator();
+    boost::scoped_ptr<leveldb::Iterator> pcursor(db.NewIterator());
     pcursor->SeekToFirst();
 
     CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
@@ -146,7 +146,6 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
             return error("%s : Deserialize or I/O error - %s", __func__, e.what());
         }
     }
-    delete pcursor;
     stats.nHeight = mapBlockIndex.find(GetBestBlock())->second->nHeight;
     stats.hashSerialized = ss.GetHash();
     stats.nTotalAmount = nTotalAmount;
@@ -178,7 +177,7 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) {
 
 bool CBlockTreeDB::LoadBlockIndexGuts()
 {
-    leveldb::Iterator *pcursor = NewIterator();
+    boost::scoped_ptr<leveldb::Iterator> pcursor(NewIterator());
 
     CDataStream ssKeySet(SER_DISK, CLIENT_VERSION);
     ssKeySet << make_pair('b', uint256(0));
@@ -224,7 +223,6 @@ bool CBlockTreeDB::LoadBlockIndexGuts()
             return error("%s : Deserialize or I/O error - %s", __func__, e.what());
         }
     }
-    delete pcursor;
 
     return true;
 }

From 27116e87ccc48421640458310cd6cab222fc27dd Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sun, 17 Aug 2014 10:06:20 +0200
Subject: [PATCH 0537/1819] devtools: Exclude default exports from
 symbol-checker script

See discussion in #4663.
---
 contrib/devtools/symbol-check.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index 8dd6d8f037d9..f3999f1c0b54 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -41,6 +41,10 @@
 'GLIBCXX': (3,4,13),
 'GLIBC':   (2,11)
 }
+# Ignore symbols that are exported as part of every executable
+IGNORE_EXPORTS = {
+'_edata', '_end', '_init', '__bss_start', '_fini'
+}
 READELF_CMD = '/usr/bin/readelf'
 CPPFILT_CMD = '/usr/bin/c++filt'
 
@@ -105,6 +109,8 @@ def check_version(max_versions, version):
                 retval = 1
         # Check exported symbols
         for sym,version in read_symbols(filename, False):
+            if sym in IGNORE_EXPORTS:
+                continue
             print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
             retval = 1
 

From c101c7690706c962944570fe5efe9975bf740a53 Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Sat, 16 Aug 2014 16:48:24 +1200
Subject: [PATCH 0538/1819] build: Add --with-utils (bitcoin-cli and
 bitcoin-tx, default=yes). Help string consistency tweaks. Target sanity check
 fix.

---
 configure.ac         | 22 +++++++++++-----------
 src/Makefile.am      |  6 ++----
 src/m4/bitcoin_qt.m4 |  4 ++--
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index bf45d7cd1c25..fc1f7c51ca6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -579,15 +579,15 @@ if test x$boost_sleep != xyes; then
   AC_MSG_ERROR(No working boost sleep implementation found. If on ubuntu 13.10 with libboost1.54-all-dev remove libboost.1.54-all-dev and use libboost1.53-all-dev)
 fi
 
-AC_ARG_WITH([cli],
-  [AS_HELP_STRING([--with-cli],
-  [with CLI (default is yes)])],
-  [build_bitcoin_cli=$withval],
-  [build_bitcoin_cli=yes])
+AC_ARG_WITH([utils],
+  [AS_HELP_STRING([--with-utils],
+  [build bitcoin-cli bitcoin-tx (default=yes)])],
+  [build_bitcoin_utils=$withval],
+  [build_bitcoin_utils=yes])
 
 AC_ARG_WITH([daemon],
   [AS_HELP_STRING([--with-daemon],
-  [with daemon (default is yes)])],
+  [build bitcoind daemon (default=yes)])],
   [build_bitcoind=$withval],
   [build_bitcoind=yes])
 
@@ -631,9 +631,9 @@ AC_MSG_CHECKING([whether to build bitcoind])
 AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
 AC_MSG_RESULT($build_bitcoind)
 
-AC_MSG_CHECKING([whether to build bitcoin-cli])
-AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
-AC_MSG_RESULT($build_bitcoin_cli)
+AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
+AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
+AC_MSG_RESULT($build_bitcoin_utils)
 
 dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
 BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
@@ -748,8 +748,8 @@ else
   AC_MSG_RESULT([no])
 fi
 
-if test "x$use_tests$build_bitcoind$use_qt" = "xnonono"; then
-  AC_MSG_ERROR([No targets! Please specify at least one of: --enable-cli --enable-daemon --enable-gui or --enable-tests])
+if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
+  AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui or --enable-tests])
 fi
 
 AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
diff --git a/src/Makefile.am b/src/Makefile.am
index 2c00f8b57230..1bb59bce7b5c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -55,12 +55,10 @@ if BUILD_BITCOIND
   bin_PROGRAMS += bitcoind
 endif
 
-if BUILD_BITCOIN_CLI
-  bin_PROGRAMS += bitcoin-cli
+if BUILD_BITCOIN_UTILS
+  bin_PROGRAMS += bitcoin-cli bitcoin-tx
 endif
 
-bin_PROGRAMS += bitcoin-tx
-
 .PHONY: FORCE
 # bitcoin core #
 BITCOIN_CORE_H = \
diff --git a/src/m4/bitcoin_qt.m4 b/src/m4/bitcoin_qt.m4
index 4c1d40c394ce..27000ecbac0a 100644
--- a/src/m4/bitcoin_qt.m4
+++ b/src/m4/bitcoin_qt.m4
@@ -48,8 +48,8 @@ dnl CAUTION: Do not use this inside of a conditional.
 AC_DEFUN([BITCOIN_QT_INIT],[
   dnl enable qt support
   AC_ARG_WITH([gui],
-    [AS_HELP_STRING([--with-gui],
-    [with GUI (no|qt4|qt5|auto. default is auto, qt4 tried first.)])],
+    [AS_HELP_STRING([--with-gui@<:@=no|qt4|qt5|auto@:>@],
+    [build bitcoin-qt GUI (default=auto, qt4 tried first)])],
     [
      bitcoin_qt_want_version=$withval
      if test x$bitcoin_qt_want_version = xyes; then

From 0d27dad8452704fa849832a0d28bf3e1b564d7b7 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 17 Aug 2014 17:38:26 +0200
Subject: [PATCH 0539/1819] Clean-up SyncWithWallets/SyncTransaction

---
 src/main.cpp              | 6 +-----
 src/rpcrawtransaction.cpp | 4 +---
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index e135e93adb80..d8f96ed2c3c4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1022,7 +1022,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         pool.addUnchecked(hash, entry);
     }
 
-    g_signals.SyncTransaction(tx, NULL);
+    SyncWithWallets(tx, NULL);
 
     return true;
 }
@@ -1857,10 +1857,6 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
     LogPrint("bench", "    - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
 
-    // Watch for transactions paying to me
-    BOOST_FOREACH(const CTransaction& tx, block.vtx)
-        g_signals.SyncTransaction(tx, &block);
-
     // Watch for changes to the previous coinbase transaction.
     static uint256 hashPrevBestCoinBase;
     g_signals.UpdatedTransaction(hashPrevBestCoinBase);
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 763615120ae8..7cd704193dd5 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -738,9 +738,7 @@ Value sendrawtransaction(const Array& params, bool fHelp)
     if (!fHaveMempool && !fHaveChain) {
         // push to local node and sync with wallets
         CValidationState state;
-        if (AcceptToMemoryPool(mempool, state, tx, false, NULL, !fOverrideFees))
-            SyncWithWallets(tx, NULL);
-        else {
+        if (!AcceptToMemoryPool(mempool, state, tx, false, NULL, !fOverrideFees)) {
             if(state.IsInvalid())
                 throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
             else

From cb5fa86f42c721cb41e043e0b4e5effc8a0d4af5 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 17 Aug 2014 23:46:22 +0200
Subject: [PATCH 0540/1819] [Qt] Revert overviewpage from QFormLayout to
 QVBoxLayout

---
 src/qt/forms/overviewpage.ui | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index 7784a862d7e1..53d416ef3801 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -13,8 +13,8 @@
   <property name="windowTitle">
    <string>Form</string>
   </property>
-  <layout class="QFormLayout" name="formLayout_3">
-   <item row="0" column="0" colspan="2">
+  <layout class="QVBoxLayout" name="topLayout">
+   <item>
     <widget class="QLabel" name="labelAlerts">
      <property name="visible">
       <bool>false</bool>
@@ -30,7 +30,7 @@
      </property>
     </widget>
    </item>
-   <item row="1" column="1">
+   <item>
     <layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
      <item>
       <layout class="QVBoxLayout" name="verticalLayout_2">

From 88fe88cf3640caede5222380383d0816a42a73b7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 18 Aug 2014 10:25:26 +0200
Subject: [PATCH 0541/1819] gui: remove redundant numTransactions tracking

This number was still tracked even though it's shown nowhere in the UI
anymore. It was originally removed because it didn't match the actual number of
records in the view (which contains outputs, not transactions) thus was
confusing people.
---
 src/qt/walletmodel.cpp | 20 --------------------
 src/qt/walletmodel.h   |  5 -----
 2 files changed, 25 deletions(-)

diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 0ad123f39d4d..c5f8fb6a9cfc 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -31,7 +31,6 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
     transactionTableModel(0),
     recentRequestsTableModel(0),
     cachedBalance(0), cachedUnconfirmedBalance(0), cachedImmatureBalance(0),
-    cachedNumTransactions(0),
     cachedEncryptionStatus(Unencrypted),
     cachedNumBlocks(0)
 {
@@ -96,18 +95,6 @@ qint64 WalletModel::getWatchImmatureBalance() const
     return wallet->GetImmatureWatchOnlyBalance();
 }
 
-int WalletModel::getNumTransactions() const
-{
-    int numTransactions = 0;
-    {
-        LOCK(wallet->cs_wallet);
-        // the size of mapWallet contains the number of unique transaction IDs
-        // (e.g. payments to yourself generate 2 transactions, but both share the same transaction ID)
-        numTransactions = wallet->mapWallet.size();
-    }
-    return numTransactions;
-}
-
 void WalletModel::updateStatus()
 {
     EncryptionStatus newEncryptionStatus = getEncryptionStatus();
@@ -169,13 +156,6 @@ void WalletModel::updateTransaction(const QString &hash, int status)
 
     // Balance and number of transactions might have changed
     checkBalanceChanged();
-
-    int newNumTransactions = getNumTransactions();
-    if(cachedNumTransactions != newNumTransactions)
-    {
-        cachedNumTransactions = newNumTransactions;
-        emit numTransactionsChanged(newNumTransactions);
-    }
 }
 
 void WalletModel::updateAddressBook(const QString &address, const QString &label,
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 2bb91d85a928..2a74a6aa79c4 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -131,7 +131,6 @@ class WalletModel : public QObject
     qint64 getWatchBalance() const;
     qint64 getWatchUnconfirmedBalance() const;
     qint64 getWatchImmatureBalance() const;
-    int getNumTransactions() const;
     EncryptionStatus getEncryptionStatus() const;
     bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
 
@@ -214,7 +213,6 @@ class WalletModel : public QObject
     qint64 cachedWatchOnlyBalance;
     qint64 cachedWatchUnconfBalance;
     qint64 cachedWatchImmatureBalance;
-    qint64 cachedNumTransactions;
     EncryptionStatus cachedEncryptionStatus;
     int cachedNumBlocks;
 
@@ -229,9 +227,6 @@ class WalletModel : public QObject
     void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
                         qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
 
-    // Number of transactions in wallet changed
-    void numTransactionsChanged(int count);
-
     // Encryption status of wallet changed
     void encryptionStatusChanged(int status);
 

From bd45b1abd31ff75461407c7fe904b9e924dc576a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 18 Aug 2014 12:57:08 +0200
Subject: [PATCH 0542/1819] doc: Remove outdated information about boost
 versions

Bitcoin core should work with any remotely recent boost version
if a proper build environment is present. Remove a confusing comment
from the build documentation.
---
 doc/build-unix.md | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index 0f381d56c561..56054456a362 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -76,10 +76,6 @@ for Ubuntu 12.04 and later:
  Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev,
  but using these will break binary wallet compatibility, and is not recommended.
 
-for Ubuntu 13.10:
-	libboost1.54 will not work,
-	remove libboost1.54-all-dev and install libboost1.53-all-dev instead.
-
 for Debian 7 (Wheezy) and later:
  The oldstable repository contains db4.8 packages.
  Add the following line to /etc/apt/sources.list,

From aa8279513b5d206c172d3da3d5e3034c61d47b39 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 30 Jul 2014 15:35:14 +0200
Subject: [PATCH 0543/1819] Add detailed network info to getnetworkinfo RPC

This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by #2575.
---
 src/init.cpp   |  2 +-
 src/rpcnet.cpp | 33 ++++++++++++++++++++++++++++-----
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index a908169cd9aa..b20b940b86ef 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -248,7 +248,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -maxreceivebuffer=<n>  " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n";
     strUsage += "  -maxsendbuffer=<n>     " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n";
     strUsage += "  -onion=<ip:port>       " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
-    strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (IPv4, IPv6 or Onion)") + "\n";
+    strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)") + "\n";
     strUsage += "  -permitbaremultisig    " + _("Relay non-P2SH multisig (default: 1)") + "\n";
     strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
     strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 88e7c4ab07f7..2baa481c4e4d 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -338,6 +338,26 @@ Value getnettotals(const Array& params, bool fHelp)
     return obj;
 }
 
+static Array GetNetworksInfo()
+{
+    Array networks;
+    for(int n=0; n<NET_MAX; ++n)
+    {
+        enum Network network = static_cast<enum Network>(n);
+        if(network == NET_UNROUTABLE)
+            continue;
+        proxyType proxy;
+        Object obj;
+        GetProxy(network, proxy);
+        obj.push_back(Pair("name", GetNetworkName(network)));
+        obj.push_back(Pair("limited", IsLimited(network)));
+        obj.push_back(Pair("reachable", IsReachable(network)));
+        obj.push_back(Pair("proxy", proxy.IsValid() ? proxy.ToStringIPPort() : string()));
+        networks.push_back(obj);
+    }
+    return networks;
+}
+
 Value getnetworkinfo(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() != 0)
@@ -351,7 +371,13 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "  \"localservices\": \"xxxxxxxxxxxxxxxx\",   (string) the services we offer to the network\n"
             "  \"timeoffset\": xxxxx,        (numeric) the time offset\n"
             "  \"connections\": xxxxx,       (numeric) the number of connections\n"
-            "  \"proxy\": \"host:port\",     (string, optional) the proxy used by the server\n"
+            "  \"networks\": [               (array) information per network\n"
+            "      \"name\": \"xxx\",        (string) network (ipv4, ipv6 or onion)\n"
+            "      \"limited\": xxx,         (boolean) is the network limited using -onlynet?\n"
+            "      \"reachable\": xxx,       (boolean) is the network reachable?\n"
+            "      \"proxy\": \"host:port\"  (string) the proxy that is used for this network, or empty if none\n"
+            "    },\n"
+            "  ],\n"
             "  \"relayfee\": x.xxxx,         (numeric) minimum relay fee for non-free transactions in btc/kb\n"
             "  \"localaddresses\": [,        (array) list of local addresses\n"
             "    \"address\": \"xxxx\",      (string) network address\n"
@@ -364,16 +390,13 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             + HelpExampleRpc("getnetworkinfo", "")
         );
 
-    proxyType proxy;
-    GetProxy(NET_IPV4, proxy);
-
     Object obj;
     obj.push_back(Pair("version",       (int)CLIENT_VERSION));
     obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
     obj.push_back(Pair("localservices",       strprintf("%016x", nLocalServices)));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));
-    obj.push_back(Pair("proxy",         (proxy.IsValid() ? proxy.ToStringIPPort() : string())));
+    obj.push_back(Pair("networks",      GetNetworksInfo()));
     obj.push_back(Pair("relayfee",      ValueFromAmount(::minRelayTxFee.GetFeePerK())));
     Array localAddresses;
     {

From e4731dd85cc0c75046a6e3681506aed3d522f6ce Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 18 Aug 2014 16:18:39 +0200
Subject: [PATCH 0544/1819] qt: Use quint64 for formatServicesStr

`uint64_t` was causing a build error on some systems, as that type is
not known after including just the Qt headers.
---
 src/qt/guiutil.cpp | 2 +-
 src/qt/guiutil.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 389a08d9e8d4..304177ee119f 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -810,7 +810,7 @@ QString formatDurationStr(int secs)
     return strList.join(" ");
 }
 
-QString formatServicesStr(uint64_t mask)
+QString formatServicesStr(quint64 mask)
 {
     QStringList strList;
 
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 0ae5154d4b30..67e11e59a0cf 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -180,7 +180,7 @@ namespace GUIUtil
     QString formatDurationStr(int secs);
 
     /* Format CNodeStats.nServices bitmask into a user-readable string */
-    QString formatServicesStr(uint64_t mask);
+    QString formatServicesStr(quint64 mask);
 
     /* Format a CNodeCombinedStats.dPingTime into a user-readable string or display N/A, if 0*/
     QString formatPingTime(double dPingTime);

From 3cceba7abb22133fcaea8d4f7aaed345f0e48009 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 18 Aug 2014 10:36:21 -0400
Subject: [PATCH 0545/1819] Univalue: Do not build JSON escape list at runtime

No need to waste startup time building something that can be done
at compile time.

This also resolves a clang++ warning originally reported in #4714,
univalue/univalue_write.cpp:33:12: warning: array subscript is of type 'char
escapes['"'] = "\\"";
^~~~

etc.
---
 .gitignore                      |   2 +
 src/Makefile.am                 |   1 +
 src/univalue/gen.cpp            |  78 ++++++++++
 src/univalue/univalue_escapes.h | 262 ++++++++++++++++++++++++++++++++
 src/univalue/univalue_write.cpp |  21 +--
 5 files changed, 344 insertions(+), 20 deletions(-)
 create mode 100644 src/univalue/gen.cpp
 create mode 100644 src/univalue/univalue_escapes.h

diff --git a/.gitignore b/.gitignore
index e21ea92552a1..25c0dff660b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,6 +28,8 @@ src/m4/ltsugar.m4
 src/m4/ltversion.m4
 src/m4/lt~obsolete.m4
 
+src/univalue/gen
+
 src/qt/*.moc
 src/qt/moc_*.cpp
 src/qt/forms/ui_*.h
diff --git a/src/Makefile.am b/src/Makefile.am
index eda20ad2964b..1442c3d668fc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -187,6 +187,7 @@ univalue_libbitcoin_univalue_a_SOURCES = \
   univalue/univalue.cpp \
   univalue/univalue_read.cpp \
   univalue/univalue_write.cpp \
+  univalue/univalue_escapes.h \
   univalue/univalue.h
 
 # common: shared between bitcoind, and bitcoin-qt and non-server tools
diff --git a/src/univalue/gen.cpp b/src/univalue/gen.cpp
new file mode 100644
index 000000000000..881948f46ecc
--- /dev/null
+++ b/src/univalue/gen.cpp
@@ -0,0 +1,78 @@
+// Copyright 2014 BitPay Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+//
+// To re-create univalue_escapes.h:
+// $ g++ -o gen gen.cpp
+// $ ./gen > univalue_escapes.h
+//
+
+#include <ctype.h>
+#include <stdio.h>
+#include <string.h>
+#include "univalue.h"
+
+using namespace std;
+
+static bool initEscapes;
+static const char *escapes[256];
+
+static void initJsonEscape()
+{
+    escapes[(int)'"'] = "\\\"";
+    escapes[(int)'\\'] = "\\\\";
+    escapes[(int)'/'] = "\\/";
+    escapes[(int)'\b'] = "\\b";
+    escapes[(int)'\f'] = "\\f";
+    escapes[(int)'\n'] = "\\n";
+    escapes[(int)'\r'] = "\\r";
+    escapes[(int)'\t'] = "\\t";
+
+    initEscapes = true;
+}
+
+static void outputEscape()
+{
+	printf(	"// Automatically generated file. Do not modify.\n"
+		"#ifndef __UNIVALUE_ESCAPES_H__\n"
+		"#define __UNIVALUE_ESCAPES_H__\n"
+		"static const char *escapes[256] = {\n");
+
+	for (unsigned int i = 0; i < 256; i++) {
+		if (!escapes[i]) {
+			printf("\tNULL,\n");
+		} else {
+			printf("\t\"");
+
+			unsigned int si;
+			for (si = 0; si < strlen(escapes[i]); si++) {
+				char ch = escapes[i][si];
+				switch (ch) {
+				case '"':
+					printf("\\\"");
+					break;
+				case '\\':
+					printf("\\\\");
+					break;
+				default:
+					printf("%c", escapes[i][si]);
+					break;
+				}
+			}
+
+			printf("\",\n");
+		}
+	}
+
+	printf(	"};\n"
+		"#endif // __UNIVALUE_ESCAPES_H__\n");
+}
+
+int main (int argc, char *argv[])
+{
+	initJsonEscape();
+	outputEscape();
+	return 0;
+}
+
diff --git a/src/univalue/univalue_escapes.h b/src/univalue/univalue_escapes.h
new file mode 100644
index 000000000000..1d3a70a968ed
--- /dev/null
+++ b/src/univalue/univalue_escapes.h
@@ -0,0 +1,262 @@
+// Automatically generated file. Do not modify.
+#ifndef __UNIVALUE_ESCAPES_H__
+#define __UNIVALUE_ESCAPES_H__
+static const char *escapes[256] = {
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"\\b",
+	"\\t",
+	"\\n",
+	NULL,
+	"\\f",
+	"\\r",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"\\\"",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"\\/",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	"\\\\",
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+	NULL,
+};
+#endif // __UNIVALUE_ESCAPES_H__
diff --git a/src/univalue/univalue_write.cpp b/src/univalue/univalue_write.cpp
index 1818f5c6f9c5..70762a1ef1d6 100644
--- a/src/univalue/univalue_write.cpp
+++ b/src/univalue/univalue_write.cpp
@@ -5,33 +5,14 @@
 #include <ctype.h>
 #include <stdio.h>
 #include "univalue.h"
+#include "univalue_escapes.h"
 
 // TODO: Using UTF8
 
 using namespace std;
 
-static bool initEscapes;
-static const char *escapes[256];
-
-static void initJsonEscape()
-{
-    escapes['"'] = "\\\"";
-    escapes['\\'] = "\\\\";
-    escapes['/'] = "\\/";
-    escapes['\b'] = "\\b";
-    escapes['\f'] = "\\f";
-    escapes['\n'] = "\\n";
-    escapes['\r'] = "\\r";
-    escapes['\t'] = "\\t";
-
-    initEscapes = true;
-}
-
 static string json_escape(const string& inS)
 {
-    if (!initEscapes)
-        initJsonEscape();
-
     string outS;
     outS.reserve(inS.size() * 2);
 

From fad23a210bc61c784af0be4fc32cda6b75a4619b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 18 Aug 2014 14:01:06 +0200
Subject: [PATCH 0546/1819] Revert "build: add option for reducing exports"

Revert #4663 for now. It still breaks the pulltester.

This reverts commit 4975ae1722cd8af63eda2f02ef64a98091b6fb58.

Conflicts:
	configure.ac
---
 configure.ac                | 77 -------------------------------------
 src/Makefile.am             |  3 --
 src/Makefile.qt.include     |  2 +-
 src/Makefile.qttest.include |  2 +-
 src/Makefile.test.include   |  1 -
 5 files changed, 2 insertions(+), 83 deletions(-)

diff --git a/configure.ac b/configure.ac
index fc1f7c51ca6f..7db6ebac0e06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,12 +90,6 @@ AC_ARG_ENABLE([hardening],
   [use_hardening=$enableval],
   [use_hardening=yes])
 
-AC_ARG_ENABLE([reduce-exports],
-  [AS_HELP_STRING([--enable-reduce-exports],
-  [attempt to reduce exported symbols in the resulting executables (default is yes)])],
-  [use_reduce_exports=$enableval],
-  [use_reduce_exports=auto])
-
 AC_ARG_ENABLE([ccache],
   [AS_HELP_STRING([--enable-ccache],
   [use ccache for building (default is yes if ccache is found)])],
@@ -402,40 +396,6 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
 
 AC_SEARCH_LIBS([clock_gettime],[rt])
 
-AC_MSG_CHECKING([for visibility attribute])
-AC_LINK_IFELSE([AC_LANG_SOURCE([
-  int foo_def( void ) __attribute__((visibility("default")));
-  int main(){}
-  ])],
-  [
-    AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
-    AC_MSG_RESULT(yes)
-  ],
-  [
-    AC_MSG_RESULT(no)
-    if test x$use_reduce_exports = xyes; then
-      AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduced-exports.])
-    fi
-      AC_MSG_WARN([Cannot find a working visibility attribute. Disabling reduced exports.])
-      use_reduce_exports=no
-  ]
-)
-
-if test x$use_reduce_exports != xno; then
-  AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
-  [
-    if test x$use_reduce_exports = xyes; then
-      AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduced-exports.])
-    fi
-    AC_MSG_WARN([Cannot set default symbol visibility. Disabling reduced exports.])
-    use_reduce_exports=no
-  ])
-  if test x$use_reduce_exports != xno; then
-    AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
-    CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
-  fi
-fi
-
 LEVELDB_CPPFLAGS=
 LIBLEVELDB=
 LIBMEMENV=
@@ -460,35 +420,6 @@ fi
 
 dnl Check for boost libs
 AX_BOOST_BASE
-
-if test x$use_reduce_exports != xno; then
-  AC_MSG_CHECKING([for working boost reduced exports])
-  TEMP_CPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
-  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
-      @%:@include <boost/version.hpp>
-    ]], [[
-      #if BOOST_VERSION >= 104900
-      // Everything is okay
-      #else
-      #  error Boost version is too old
-      #endif
-    ]])],[
-      AC_MSG_RESULT(yes)
-    ],[:
-    if test x$use_reduce_exports = xauto; then
-      use_reduce_exports=no
-    else
-      if test x$use_reduce_exports = xyes; then
-        AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduced-exports.])
-      fi
-    fi
-    AC_MSG_RESULT(no)
-    AC_MSG_WARN([boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.])
-  ])
-  CPPFLAGS="$TEMP_CPPFLAGS"
-fi
-
 AX_BOOST_SYSTEM
 AX_BOOST_FILESYSTEM
 AX_BOOST_PROGRAM_OPTIONS
@@ -741,13 +672,6 @@ else
   AC_MSG_RESULT([no])
 fi
 
-AC_MSG_CHECKING([whether to reduce exports])
-if test x$use_reduce_exports != xno; then
-  AC_MSG_RESULT([yes])
-else
-  AC_MSG_RESULT([no])
-fi
-
 if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
   AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui or --enable-tests])
 fi
@@ -780,7 +704,6 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
 
-AC_SUBST(RELDFLAGS)
 AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
diff --git a/src/Makefile.am b/src/Makefile.am
index 1bb59bce7b5c..6292b5d61335 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -261,7 +261,6 @@ endif
 
 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
-bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
@@ -299,12 +298,10 @@ endif
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
-bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
-bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 28d7053fc4b1..9a333d5c76bc 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -362,7 +362,7 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 #locale/foo.ts -> locale/foo.qm
 QT_QM=$(QT_TS:.ts=.qm)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 2cba5b7e1ef7..ee8edb994e1d 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -36,7 +36,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBIT
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b54c9be66422..b5fee082237f 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -75,7 +75,6 @@ if USE_LIBSECP256K1
 endif
 
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
-test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From 8695a39350cd9fd403c1bb1ca725535b591f82f9 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Fri, 15 Aug 2014 22:56:45 +0200
Subject: [PATCH 0547/1819] replace int with size_t in stream methods

Thus the read(...) and write(...) methods of all stream classes now have identical parameter lists.
This will bring these classes one step closer to a common interface.
---
 src/serialize.h | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index 2eb69b3ec00b..3e5eff469ded 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -68,7 +68,7 @@ inline const T* end_ptr(const std::vector<T,TAl>& v)
 /////////////////////////////////////////////////////////////////
 //
 // Templates for serializing to anything that looks like a stream,
-// i.e. anything that supports .read(char*, int) and .write(char*, int)
+// i.e. anything that supports .read(char*, size_t) and .write(char*, size_t)
 //
 
 enum
@@ -876,7 +876,7 @@ class CSizeComputer
 
     CSizeComputer(int nTypeIn, int nVersionIn) : nSize(0), nType(nTypeIn), nVersion(nVersionIn) {}
 
-    CSizeComputer& write(const char *psz, int nSize)
+    CSizeComputer& write(const char *psz, size_t nSize)
     {
         this->nSize += nSize;
         return *this;
@@ -1105,10 +1105,9 @@ class CDataStream
     void ReadVersion()           { *this >> nVersion; }
     void WriteVersion()          { *this << nVersion; }
 
-    CDataStream& read(char* pch, int nSize)
+    CDataStream& read(char* pch, size_t nSize)
     {
         // Read from the beginning of the buffer
-        assert(nSize >= 0);
         unsigned int nReadPosNext = nReadPos + nSize;
         if (nReadPosNext >= vch.size())
         {
@@ -1145,10 +1144,9 @@ class CDataStream
         return (*this);
     }
 
-    CDataStream& write(const char* pch, int nSize)
+    CDataStream& write(const char* pch, size_t nSize)
     {
         // Write to the end of the buffer
-        assert(nSize >= 0);
         vch.insert(vch.end(), pch, pch + nSize);
         return (*this);
     }

From e432a5f08d75480753cf3cf81d656f0e1dd4da79 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 18 Aug 2014 15:55:54 -0400
Subject: [PATCH 0548/1819] build: add option for reducing exports (v2)

This was committed previously as 4975ae172 and reverted, because the flags were
applied even if the checks didn't pass. This is the same commit, fixed up to
actually disable the functionality when necessary.

Enabled automatically if boost >= 1.49.
See: https://svn.boost.org/trac/boost/ticket/2309

Also, check for a default visibility attribute, so that we can mark future
api functions correctly.
---
 configure.ac                | 78 +++++++++++++++++++++++++++++++++++++
 src/Makefile.am             |  3 ++
 src/Makefile.qt.include     |  2 +-
 src/Makefile.qttest.include |  2 +-
 src/Makefile.test.include   |  1 +
 5 files changed, 84 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7db6ebac0e06..601ccf0a7973 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,6 +90,12 @@ AC_ARG_ENABLE([hardening],
   [use_hardening=$enableval],
   [use_hardening=yes])
 
+AC_ARG_ENABLE([reduce-exports],
+  [AS_HELP_STRING([--enable-reduce-exports],
+  [attempt to reduce exported symbols in the resulting executables (default is yes)])],
+  [use_reduce_exports=$enableval],
+  [use_reduce_exports=auto])
+
 AC_ARG_ENABLE([ccache],
   [AS_HELP_STRING([--enable-ccache],
   [use ccache for building (default is yes if ccache is found)])],
@@ -396,6 +402,36 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
 
 AC_SEARCH_LIBS([clock_gettime],[rt])
 
+AC_MSG_CHECKING([for visibility attribute])
+AC_LINK_IFELSE([AC_LANG_SOURCE([
+  int foo_def( void ) __attribute__((visibility("default")));
+  int main(){}
+  ])],
+  [
+    AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE,1,[Define if the visibility attribute is supported.])
+    AC_MSG_RESULT(yes)
+  ],
+  [
+    AC_MSG_RESULT(no)
+    if test x$use_reduce_exports = xyes; then
+      AC_MSG_ERROR([Cannot find a working visibility attribute. Use --disable-reduced-exports.])
+    fi
+      AC_MSG_WARN([Cannot find a working visibility attribute. Disabling reduced exports.])
+      use_reduce_exports=no
+  ]
+)
+
+if test x$use_reduce_exports != xno; then
+  AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
+  [
+    if test x$use_reduce_exports = xyes; then
+      AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduced-exports.])
+    fi
+    AC_MSG_WARN([Cannot set default symbol visibility. Disabling reduced exports.])
+    use_reduce_exports=no
+  ])
+fi
+
 LEVELDB_CPPFLAGS=
 LIBLEVELDB=
 LIBMEMENV=
@@ -426,6 +462,40 @@ AX_BOOST_PROGRAM_OPTIONS
 AX_BOOST_THREAD
 AX_BOOST_CHRONO
 
+
+if test x$use_reduce_exports != xno; then
+  AC_MSG_CHECKING([for working boost reduced exports])
+  TEMP_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
+  AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+      @%:@include <boost/version.hpp>
+    ]], [[
+      #if BOOST_VERSION >= 104900
+      // Everything is okay
+      #else
+      #  error Boost version is too old
+      #endif
+    ]])],[
+      AC_MSG_RESULT(yes)
+    ],[:
+    if test x$use_reduce_exports = xauto; then
+      use_reduce_exports=no
+    else
+      if test x$use_reduce_exports = xyes; then
+        AC_MSG_ERROR([boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduced-exports.])
+      fi
+    fi
+    AC_MSG_RESULT(no)
+    AC_MSG_WARN([boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.])
+  ])
+  CPPFLAGS="$TEMP_CPPFLAGS"
+fi
+
+if test x$use_reduce_exports != xno; then
+    CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
+    AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
+fi
+
 if test x$use_tests = xyes; then
 
   if test x$HEXDUMP = x; then
@@ -672,6 +742,13 @@ else
   AC_MSG_RESULT([no])
 fi
 
+AC_MSG_CHECKING([whether to reduce exports])
+if test x$use_reduce_exports != xno; then
+  AC_MSG_RESULT([yes])
+else
+  AC_MSG_RESULT([no])
+fi
+
 if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
   AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui or --enable-tests])
 fi
@@ -704,6 +781,7 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
 
+AC_SUBST(RELDFLAGS)
 AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
diff --git a/src/Makefile.am b/src/Makefile.am
index 6292b5d61335..1bb59bce7b5c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -261,6 +261,7 @@ endif
 
 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
+bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
@@ -298,10 +299,12 @@ endif
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
+bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
+bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 9a333d5c76bc..28d7053fc4b1 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -362,7 +362,7 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 #locale/foo.ts -> locale/foo.qm
 QT_QM=$(QT_TS:.ts=.qm)
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index ee8edb994e1d..2cba5b7e1ef7 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -36,7 +36,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBIT
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
-qt_test_test_bitcoin_qt_LDFLAGS = $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b5fee082237f..b54c9be66422 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -75,6 +75,7 @@ if USE_LIBSECP256K1
 endif
 
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From 3a56de7fc318a45a7096cd318e2f2d7f8124ce24 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 18 Aug 2014 16:50:39 -0400
Subject: [PATCH 0549/1819] addrman: Do not propagate obviously poor addresses
 onto the network

---
 src/addrman.cpp | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 3628af2eab7e..704766dbf858 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -492,17 +492,23 @@ int CAddrMan::Check_()
 
 void CAddrMan::GetAddr_(std::vector<CAddress> &vAddr)
 {
-    int nNodes = ADDRMAN_GETADDR_MAX_PCT*vRandom.size()/100;
+    unsigned int nNodes = ADDRMAN_GETADDR_MAX_PCT * vRandom.size() / 100;
     if (nNodes > ADDRMAN_GETADDR_MAX)
         nNodes = ADDRMAN_GETADDR_MAX;
 
-    // perform a random shuffle over the first nNodes elements of vRandom (selecting from all)
-    for (int n = 0; n<nNodes; n++)
+    // gather a list of random nodes, skipping those of low quality
+    for (unsigned int n = 0; n < vRandom.size(); n++)
     {
+        if (vAddr.size() >= nNodes)
+            break;
+
         int nRndPos = GetRandInt(vRandom.size() - n) + n;
         SwapRandom(n, nRndPos);
         assert(mapInfo.count(vRandom[n]) == 1);
-        vAddr.push_back(mapInfo[vRandom[n]]);
+
+        const CAddrInfo& ai = mapInfo[vRandom[n]];
+        if (!ai.IsTerrible())
+            vAddr.push_back(ai);
     }
 }
 

From 01094bd01f5d999b7da698c0e655cf723afa8ebb Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 19 Aug 2014 14:40:11 +0200
Subject: [PATCH 0550/1819] Don't reveal whether password is <20 or >20
 characters in RPC

As discussed on IRC.

It seems bad to base a decision to delay based on the password length,
as it leaks a small amount of information.
---
 src/rpcserver.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 3b51c91e7cb3..524627e2dee9 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -849,11 +849,10 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
     if (!HTTPAuthorized(mapHeaders))
     {
         LogPrintf("ThreadRPCServer incorrect password attempt from %s\n", conn->peer_address_to_string());
-        /* Deter brute-forcing short passwords.
+        /* Deter brute-forcing
            If this results in a DoS the user really
            shouldn't have their RPC port exposed. */
-        if (mapArgs["-rpcpassword"].size() < 20)
-            MilliSleep(250);
+        MilliSleep(250);
 
         conn->stream() << HTTPError(HTTP_UNAUTHORIZED, false) << std::flush;
         return false;

From d789386371699fee14bb5e444507a6067293ff67 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 19 Aug 2014 10:28:58 -0400
Subject: [PATCH 0551/1819] Add "it works" test for bitcoin-tx

---
 .gitignore                           |  1 +
 src/Makefile.test.include            |  9 ++++++-
 src/test/bctest.py                   | 35 ++++++++++++++++++++++++++++
 src/test/bitcoin-util-test.py        | 12 ++++++++++
 src/test/data/bitcoin-util-test.json |  5 ++++
 src/test/data/blanktx.hex            |  1 +
 6 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 src/test/bctest.py
 create mode 100755 src/test/bitcoin-util-test.py
 create mode 100644 src/test/data/bitcoin-util-test.json
 create mode 100644 src/test/data/blanktx.hex

diff --git a/.gitignore b/.gitignore
index 25c0dff660b2..24af4cb72e4e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,6 +43,7 @@ src/qt/test/moc*.cpp
 *.bak
 *.rej
 *.orig
+*.pyc
 *.o
 *.o-*
 *.patch
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b54c9be66422..7e25430e3ebf 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -1,8 +1,15 @@
-TESTS += test/test_bitcoin
+TESTS += test/test_bitcoin test/bitcoin-util-test.py
 bin_PROGRAMS += test/test_bitcoin
 TEST_SRCDIR = test
 TEST_BINARY=test/test_bitcoin$(EXEEXT)
 
+
+EXTRA_DIST += \
+	test/bctest.py \
+	test/bitcoin-util-test.py \
+	test/data/bitcoin-util-test.json \
+	test/data/blanktx.hex
+
 JSON_TEST_FILES = \
   test/data/script_valid.json \
   test/data/base58_keys_valid.json \
diff --git a/src/test/bctest.py b/src/test/bctest.py
new file mode 100644
index 000000000000..3b17acb75e0d
--- /dev/null
+++ b/src/test/bctest.py
@@ -0,0 +1,35 @@
+# Copyright 2014 BitPay, Inc.
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+import subprocess
+import os
+import json
+import sys
+
+def bctest(testDir, testObj):
+	execargs = testObj['exec']
+	outputFn = testObj['output_cmp']
+	outputData = open(testDir + "/" + outputFn).read()
+
+	proc = subprocess.Popen(execargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+	try:
+		outs = proc.communicate()
+	except OSError:
+		print("OSError, Failed to execute " + execargs[0])
+		sys.exit(1)
+
+	if outs[0] != outputData:
+		print("Output data mismatch for " + outputFn)
+		sys.exit(1)
+
+def bctester(testDir, input_basename):
+	input_filename = testDir + "/" + input_basename
+	raw_data = open(input_filename).read()
+	input_data = json.loads(raw_data)
+
+	for testObj in input_data:
+		bctest(testDir, testObj)
+
+	sys.exit(0)
+
diff --git a/src/test/bitcoin-util-test.py b/src/test/bitcoin-util-test.py
new file mode 100755
index 000000000000..40690c2fed89
--- /dev/null
+++ b/src/test/bitcoin-util-test.py
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+# Copyright 2014 BitPay, Inc.
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+import os
+import bctest
+
+if __name__ == '__main__':
+	bctest.bctester(os.environ["srcdir"] + "/test/data",
+			"bitcoin-util-test.json")
+
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
new file mode 100644
index 000000000000..af29fd75a549
--- /dev/null
+++ b/src/test/data/bitcoin-util-test.json
@@ -0,0 +1,5 @@
+[
+  { "exec": ["./bitcoin-tx", "-create"],
+    "output_cmp": "blanktx.hex"
+  }
+]
diff --git a/src/test/data/blanktx.hex b/src/test/data/blanktx.hex
new file mode 100644
index 000000000000..36b6f00fb67f
--- /dev/null
+++ b/src/test/data/blanktx.hex
@@ -0,0 +1 @@
+01000000000000000000

From fb14452c6cadb8d977c405dddb0a94115250d7c4 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Mon, 18 Aug 2014 23:14:29 -0400
Subject: [PATCH 0552/1819] bitcoin-tx: Accept input via stdin. Add input
 handling to tests.

---
 src/bitcoin-tx.cpp                   | 28 ++++++++++++++++++++++++++--
 src/test/bctest.py                   | 12 ++++++++++--
 src/test/data/bitcoin-util-test.json |  4 ++++
 3 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index ffe87298f63e..6cd2768d700f 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -13,6 +13,7 @@
 
 #include <stdio.h>
 #include <boost/assign/list_of.hpp>
+#include <boost/algorithm/string.hpp>
 
 using namespace std;
 using namespace boost::assign;
@@ -501,13 +502,34 @@ static void OutputTx(const CTransaction& tx)
         OutputTxHex(tx);
 }
 
+static string readStdin()
+{
+    char buf[4096];
+    string ret;
+
+    while (!feof(stdin)) {
+        size_t bread = fread(buf, 1, sizeof(buf), stdin);
+        ret.append(buf, bread);
+        if (bread < sizeof(buf))
+            break;
+    }
+
+    if (ferror(stdin))
+        throw runtime_error("error reading stdin");
+
+    boost::algorithm::trim_right(ret);
+
+    return ret;
+}
+
 static int CommandLineRawTx(int argc, char* argv[])
 {
     string strPrint;
     int nRet = 0;
     try {
-        // Skip switches
-        while (argc > 1 && IsSwitchChar(argv[1][0])) {
+        // Skip switches; Permit common stdin convention "-"
+        while (argc > 1 && IsSwitchChar(argv[1][0]) &&
+               (argv[1][1] != 0)) {
             argc--;
             argv++;
         }
@@ -522,6 +544,8 @@ static int CommandLineRawTx(int argc, char* argv[])
 
             // param: hex-encoded bitcoin transaction
             string strHexTx(argv[1]);
+            if (strHexTx == "-")                 // "-" implies standard input
+                strHexTx = readStdin();
 
             if (!DecodeHexTx(txDecodeTmp, strHexTx))
                 throw runtime_error("invalid transaction encoding");
diff --git a/src/test/bctest.py b/src/test/bctest.py
index 3b17acb75e0d..b12647908394 100644
--- a/src/test/bctest.py
+++ b/src/test/bctest.py
@@ -9,12 +9,20 @@
 
 def bctest(testDir, testObj):
 	execargs = testObj['exec']
+
+	stdinCfg = None
+	inputData = None
+	if "input" in testObj:
+		filename = testDir + "/" + testObj['input']
+		inputData = open(filename).read()
+		stdinCfg = subprocess.PIPE
+
 	outputFn = testObj['output_cmp']
 	outputData = open(testDir + "/" + outputFn).read()
 
-	proc = subprocess.Popen(execargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+	proc = subprocess.Popen(execargs, stdin=stdinCfg, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 	try:
-		outs = proc.communicate()
+		outs = proc.communicate(input=inputData)
 	except OSError:
 		print("OSError, Failed to execute " + execargs[0])
 		sys.exit(1)
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index af29fd75a549..16bcb4489818 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -1,5 +1,9 @@
 [
   { "exec": ["./bitcoin-tx", "-create"],
     "output_cmp": "blanktx.hex"
+  },
+  { "exec": ["./bitcoin-tx", "-"],
+    "input": "blanktx.hex",
+    "output_cmp": "blanktx.hex"
   }
 ]

From c53b1ece1b0644bd9620773eea3757bf939a678f Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 19 Aug 2014 13:47:37 -0400
Subject: [PATCH 0553/1819] Fix github-merge with git version 2.1.0

Running git version 2.1.0 on OSX (homebrew), I get
  fatal: '1q': not a non-negative integer

I'm guessing git command-line parsing got more strict recently?
---
 contrib/devtools/github-merge.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
index e42b71a54ac0..3217a0619502 100755
--- a/contrib/devtools/github-merge.sh
+++ b/contrib/devtools/github-merge.sh
@@ -49,11 +49,11 @@ fi
 # Initialize source branches.
 git checkout -q "$BRANCH"
 if git fetch -q "$HOST":"$REPO" "+refs/pull/$PULL/*:refs/heads/pull/$PULL/*"; then
-  if ! git log -1q "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then
+  if ! git log -q -1 "refs/heads/pull/$PULL/head" >/dev/null 2>&1; then
     echo "ERROR: Cannot find head of pull request #$PULL on $HOST:$REPO." >&2
     exit 3
   fi
-  if ! git log -1q "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then
+  if ! git log -q -1 "refs/heads/pull/$PULL/merge" >/dev/null 2>&1; then
     echo "ERROR: Cannot find merge of pull request #$PULL on $HOST:$REPO." >&2
     exit 3
   fi

From df4d61e681df49d121c308b30dcba556aa544d7e Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 19 Aug 2014 23:15:58 -0400
Subject: [PATCH 0554/1819] Add bitcoin-tx tests

Testing: delin, delout, locktime, and basic createrawtransaction-like
functionality.
---
 src/Makefile.test.include               |  7 +++++-
 src/test/bctest.py                      | 16 +++++++++++---
 src/test/data/bitcoin-util-test.json    | 29 +++++++++++++++++++++++++
 src/test/data/tt-delin1-out.hex         |  1 +
 src/test/data/tt-delout1-out.hex        |  1 +
 src/test/data/tt-locktime317000-out.hex |  1 +
 src/test/data/tx394b54bb.hex            |  1 +
 src/test/data/txcreate1.hex             |  1 +
 8 files changed, 53 insertions(+), 4 deletions(-)
 create mode 100644 src/test/data/tt-delin1-out.hex
 create mode 100644 src/test/data/tt-delout1-out.hex
 create mode 100644 src/test/data/tt-locktime317000-out.hex
 create mode 100644 src/test/data/tx394b54bb.hex
 create mode 100644 src/test/data/txcreate1.hex

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 7e25430e3ebf..0ddc66fa00c6 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -8,7 +8,12 @@ EXTRA_DIST += \
 	test/bctest.py \
 	test/bitcoin-util-test.py \
 	test/data/bitcoin-util-test.json \
-	test/data/blanktx.hex
+	test/data/blanktx.hex \
+	test/data/tt-delin1-out.hex \
+	test/data/tt-delout1-out.hex \
+	test/data/tt-locktime317000-out.hex \
+	test/data/tx394b54bb.hex \
+	test/data/txcreate1.hex
 
 JSON_TEST_FILES = \
   test/data/script_valid.json \
diff --git a/src/test/bctest.py b/src/test/bctest.py
index b12647908394..1839f4fef460 100644
--- a/src/test/bctest.py
+++ b/src/test/bctest.py
@@ -17,8 +17,11 @@ def bctest(testDir, testObj):
 		inputData = open(filename).read()
 		stdinCfg = subprocess.PIPE
 
-	outputFn = testObj['output_cmp']
-	outputData = open(testDir + "/" + outputFn).read()
+	outputFn = None
+	outputData = None
+	if "output_cmp" in testObj:
+		outputFn = testObj['output_cmp']
+		outputData = open(testDir + "/" + outputFn).read()
 
 	proc = subprocess.Popen(execargs, stdin=stdinCfg, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 	try:
@@ -27,10 +30,17 @@ def bctest(testDir, testObj):
 		print("OSError, Failed to execute " + execargs[0])
 		sys.exit(1)
 
-	if outs[0] != outputData:
+	if outputData and (outs[0] != outputData):
 		print("Output data mismatch for " + outputFn)
 		sys.exit(1)
 
+	wantRC = 0
+	if "return_code" in testObj:
+		wantRC = testObj['return_code']
+	if proc.returncode != wantRC:
+		print("Return code mismatch for " + outputFn)
+		sys.exit(1)
+
 def bctester(testDir, input_basename):
 	input_filename = testDir + "/" + input_basename
 	raw_data = open(input_filename).read()
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index 16bcb4489818..7db87d7c11bb 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -5,5 +5,34 @@
   { "exec": ["./bitcoin-tx", "-"],
     "input": "blanktx.hex",
     "output_cmp": "blanktx.hex"
+  },
+  { "exec": ["./bitcoin-tx", "-", "delin=1"],
+    "input": "tx394b54bb.hex",
+    "output_cmp": "tt-delin1-out.hex"
+  },
+  { "exec": ["./bitcoin-tx", "-", "delin=31"],
+    "input": "tx394b54bb.hex",
+    "return_code": 1
+  },
+  { "exec": ["./bitcoin-tx", "-", "delout=1"],
+    "input": "tx394b54bb.hex",
+    "output_cmp": "tt-delout1-out.hex"
+  },
+  { "exec": ["./bitcoin-tx", "-", "delout=2"],
+    "input": "tx394b54bb.hex",
+    "return_code": 1
+  },
+  { "exec": ["./bitcoin-tx", "-", "locktime=317000"],
+    "input": "tx394b54bb.hex",
+    "output_cmp": "tt-locktime317000-out.hex"
+  },
+  { "exec":
+    ["./bitcoin-tx", "-create",
+     "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
+     "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
+     "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
+     "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
+     "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
+    "output_cmp": "txcreate1.hex"
   }
 ]
diff --git a/src/test/data/tt-delin1-out.hex b/src/test/data/tt-delin1-out.hex
new file mode 100644
index 000000000000..42ad840f435f
--- /dev/null
+++ b/src/test/data/tt-delin1-out.hex
@@ -0,0 +1 @@
+0100000014fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0260f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac41420f00000000001976a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac00000000
diff --git a/src/test/data/tt-delout1-out.hex b/src/test/data/tt-delout1-out.hex
new file mode 100644
index 000000000000..cc60c3fac693
--- /dev/null
+++ b/src/test/data/tt-delout1-out.hex
@@ -0,0 +1 @@
+0100000015fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffcb4ed1baba3a1eb2171e00ddec8e5b72b346dd8c07f9c2b0d122d0d06bc92ea7000000006c493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505ffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0160f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac00000000
diff --git a/src/test/data/tt-locktime317000-out.hex b/src/test/data/tt-locktime317000-out.hex
new file mode 100644
index 000000000000..287f420a40a8
--- /dev/null
+++ b/src/test/data/tt-locktime317000-out.hex
@@ -0,0 +1 @@
+0100000015fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffcb4ed1baba3a1eb2171e00ddec8e5b72b346dd8c07f9c2b0d122d0d06bc92ea7000000006c493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505ffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0260f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac41420f00000000001976a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac48d60400
diff --git a/src/test/data/tx394b54bb.hex b/src/test/data/tx394b54bb.hex
new file mode 100644
index 000000000000..33f26cb4d60e
--- /dev/null
+++ b/src/test/data/tx394b54bb.hex
@@ -0,0 +1 @@
+0100000015fd5c23522d31761c50175453daa6edaabe47a602a592d39ce933d8271a1a87274c0100006c493046022100b4251ecd63778a3dde0155abe4cd162947620ae9ee45a874353551092325b116022100db307baf4ff3781ec520bd18f387948cedd15dc27bafe17c894b0fe6ffffcafa012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffcb4ed1baba3a1eb2171e00ddec8e5b72b346dd8c07f9c2b0d122d0d06bc92ea7000000006c493046022100a9b617843b68c284715d3e02fd120479cd0d96a6c43bf01e697fb0a460a21a3a022100ba0a12fbe8b993d4e7911fa3467615765dbe421ddf5c51b57a9c1ee19dcc00ba012103e633b4fa4ceb705c2da712390767199be8ef2448b3095dc01652e11b2b751505ffffffffc1b37ae964f605978022f94ce2f3f676d66a46d1aef7c2c17d6315b9697f2f75010000006a473044022079bd62ee09621a3be96b760c39e8ef78170101d46313923c6b07ae60a95c90670220238e51ea29fc70b04b65508450523caedbb11cb4dd5aa608c81487de798925ba0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffffedd005dc7790ef65c206abd1ab718e75252a40f4b1310e4102cd692eca9cacb0d10000006b48304502207722d6f9038673c86a1019b1c4de2d687ae246477cd4ca7002762be0299de385022100e594a11e3a313942595f7666dcf7078bcb14f1330f4206b95c917e7ec0e82fac012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffdf28d6e26fb7a85a1e6a229b972c1bae0edc1c11cb9ca51e4caf5e59fbea35a1000000006b483045022100a63a4788027b79b65c6f9d9e054f68cf3b4eed19efd82a2d53f70dcbe64683390220526f243671425b2bd05745fcf2729361f985cfe84ea80c7cfc817b93d8134374012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffffae2a2320a1582faa24469eff3024a6b98bfe00eb4f554d8a0b1421ba53bfd6a5010000006c493046022100b200ac6db16842f76dab9abe807ce423c992805879bc50abd46ed8275a59d9cf022100c0d518e85dd345b3c29dd4dc47b9a420d3ce817b18720e94966d2fe23413a408012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffffb3cc5a12548aa1794b4d2bbf076838cfd7fbafb7716da51ee8221a4ff19c291b000000006b483045022100ededc441c3103a6f2bd6cab7639421af0f6ec5e60503bce1e603cf34f00aee1c02205cb75f3f519a13fb348783b21db3085cb5ec7552c59e394fdbc3e1feea43f967012103a621f08be22d1bbdcbe4e527ee4927006aa555fc65e2aafa767d4ea2fe9dfa52ffffffff85145367313888d2cf2747274a32e20b2df074027bafd6f970003fcbcdf11d07150000006b483045022100d9eed5413d2a4b4b98625aa6e3169edc4fb4663e7862316d69224454e70cd8ca022061e506521d5ced51dd0ea36496e75904d756a4c4f9fb111568555075d5f68d9a012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff8292c11f6d35abab5bac3ebb627a4ff949e8ecd62d33ed137adf7aeb00e512b0090000006b48304502207e84b27139c4c19c828cb1e30c349bba88e4d9b59be97286960793b5ddc0a2af0221008cdc7a951e7f31c20953ed5635fbabf228e80b7047f32faaa0313e7693005177012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff883dcf9a86063db088ad064d0953258d4b0ff3425857402d2f3f839cee0f84581e0000006a4730440220426540dfed9c4ab5812e5f06df705b8bcf307dd7d20f7fa6512298b2a6314f420220064055096e3ca62f6c7352c66a5447767c53f946acdf35025ab3807ddb2fa404012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff6697dbb3ed98afe481b568459fa67e503f8a4254532465a670e54669d19c9fe6720000006a47304402200a5e673996f2fc88e21cc8613611f08a650bc0370338803591d85d0ec5663764022040b6664a0d1ec83a7f01975b8fde5232992b8ca58bf48af6725d2f92a936ab2e012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff023ffc2182517e1d3fa0896c5b0bd7b4d2ef8a1e42655abe2ced54f657125d59670000006c493046022100d93b30219c5735f673be5c3b4688366d96f545561c74cb62c6958c00f6960806022100ec8200adcb028f2184fa2a4f6faac7f8bb57cb4503bb7584ac11051fece31b3d012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff16f8c77166b0df3d7cc8b5b2ce825afbea9309ad7acd8e2461a255958f81fc06010000006b483045022100a13934e68d3f5b22b130c4cb33f4da468cffc52323a47fbfbe06b64858162246022047081e0a70ff770e64a2e2d31e5d520d9102268b57a47009a72fe73ec766901801210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff197b96f3c87a3adfaa17f63fddc2a738a690ca665439f9431dbbd655816c41fb000000006c49304602210097f1f35d5bdc1a3a60390a1b015b8e7c4f916aa3847aafd969e04975e15bbe70022100a9052eb25517d481f1fda1b129eb1b534da50ea1a51f3ee012dca3601c11b86a0121027a759be8df971a6a04fafcb4f6babf75dc811c5cdaa0734cddbe9b942ce75b34ffffffff20d9a261ee27aa1bd92e7db2fdca935909a40b648e974cd24a10d63b68b94039dd0000006b483045022012b3138c591bf7154b6fef457f2c4a3c7162225003788ac0024a99355865ff13022100b71b125ae1ffb2e1d1571f580cd3ebc8cd049a2d7a8a41f138ba94aeb982106f012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff50f179d5d16cd872f9a63c26c448464ae9bd95cd9421c0476113b5d314571b71010000006b483045022100f834ccc8b22ee72712a3e5e6ef4acb8b2fb791b5385b70e2cd4332674d6667f4022024fbda0a997e0c253503f217501f508a4d56edce2c813ecdd9ad796dbeba907401210234b9d9413f247bb78cd3293b7b65a2c38018ba5621ea9ee737f3a6a3523fb4cdffffffff551b865d1568ac0a305e5f9c5dae6c540982334efbe789074318e0efc5b564631b0000006b48304502203b2fd1e39ae0e469d7a15768f262661b0de41470daf0fe8c4fd0c26542a0870002210081c57e331f9a2d214457d953e3542904727ee412c63028113635d7224da3dccc012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff57503e5a016189d407a721791459280875264f908ca2c5d4862c01386e7fb50b470400006b48304502206947a9c54f0664ece4430fd4ae999891dc50bb6126bc36b6a15a3189f29d25e9022100a86cfc4e2fdd9e39a20e305cfd1b76509c67b3e313e0f118229105caa0e823c9012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff3f16c1fb9d3e1a26d872933e955df85ee7f3f817711062b00b54a2144827349b250000006b483045022100c7128fe10b2d38744ae8177776054c29fc8ec13f07207723e70766ab7164847402201d2cf09009b9596de74c0183d1ab832e5edddb7a9965880bb400097e850850f8012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff4142a69d85b8498af214f0dd427b6ab29c240a0b8577e2944d37a7d8c05c6bb8140000006b48304502203b89a71628a28cc3703d170ca3be77786cff6b867e38a18b719705f8a326578f022100b2a9879e1acf621faa6466c207746a7f3eb4c8514c1482969aba3f2a957f1321012103f1575d6124ac78be398c25b31146d08313c6072d23a4d7df5ac6a9f87346c64cffffffff36e2feecc0a4bff7480015d42c12121932db389025ed0ac1d344ecee53230a3df20000006c493046022100ef794a8ef7fd6752d2a183c18866ff6e8dc0f5bd889a63e2c21cf303a6302461022100c1b09662d9e92988c3f9fcf17d1bcc79b5403647095d7212b9f8a1278a532d68012103091137f3ef23f4acfc19a5953a68b2074fae942ad3563ef28c33b0cac9a93adcffffffff0260f73608000000001976a9148fd139bb39ced713f231c58a4d07bf6954d1c20188ac41420f00000000001976a9146c772e9cf96371bba3da8cb733da70a2fcf2007888ac00000000
diff --git a/src/test/data/txcreate1.hex b/src/test/data/txcreate1.hex
new file mode 100644
index 000000000000..e2981a51c987
--- /dev/null
+++ b/src/test/data/txcreate1.hex
@@ -0,0 +1 @@
+01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000

From 42642c96950f50bec0866483876a6eef27318fec Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 19 Aug 2014 13:41:25 -0400
Subject: [PATCH 0555/1819] UniValue: use correct setNumStr() input val, when
 setting number values

---
 src/univalue/univalue.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/univalue/univalue.cpp b/src/univalue/univalue.cpp
index afc208bffb97..b0171e48c41d 100644
--- a/src/univalue/univalue.cpp
+++ b/src/univalue/univalue.cpp
@@ -44,7 +44,7 @@ static bool validNumStr(const string& s)
 
 bool UniValue::setNumStr(const string& val_)
 {
-    if (!validNumStr(val))
+    if (!validNumStr(val_))
         return false;
 
     clear();

From dee9324a0bdbf92a0764213f9b24424a7600f47b Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 20 Aug 2014 00:14:53 -0400
Subject: [PATCH 0556/1819] UniValue: compact (!pretty) output should not
 include extra whitespace

---
 src/univalue/univalue_write.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/univalue/univalue_write.cpp b/src/univalue/univalue_write.cpp
index 70762a1ef1d6..042091a8274a 100644
--- a/src/univalue/univalue_write.cpp
+++ b/src/univalue/univalue_write.cpp
@@ -91,8 +91,11 @@ void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, s
         if (prettyIndent)
             s += indentStr(prettyIndent, indentLevel);
         s += values[i].write(prettyIndent, indentLevel + 1);
-        if (i != (values.size() - 1))
-            s += ", ";
+        if (i != (values.size() - 1)) {
+            s += ",";
+            if (prettyIndent)
+                s += " ";
+        }
         if (prettyIndent)
             s += "\n";
     }
@@ -111,7 +114,9 @@ void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel,
     for (unsigned int i = 0; i < keys.size(); i++) {
         if (prettyIndent)
             s += indentStr(prettyIndent, indentLevel);
-        s += "\"" + json_escape(keys[i]) + "\": ";
+        s += "\"" + json_escape(keys[i]) + "\":";
+        if (prettyIndent)
+            s += " ";
         s += values[i].write(prettyIndent, indentLevel + 1);
         if (i != (values.size() - 1))
             s += ",";

From e85267be6306a54a0cfe0055c88b0b753f7d68cd Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 20 Aug 2014 00:28:46 -0400
Subject: [PATCH 0557/1819] UniValue: add unit tests

---
 src/Makefile.test.include   |   1 +
 src/test/univalue_tests.cpp | 275 ++++++++++++++++++++++++++++++++++++
 2 files changed, 276 insertions(+)
 create mode 100644 src/test/univalue_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 7e25430e3ebf..bf6534cf39f0 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -58,6 +58,7 @@ BITCOIN_TESTS =\
   test/test_bitcoin.cpp \
   test/transaction_tests.cpp \
   test/uint256_tests.cpp \
+  test/univalue_tests.cpp \
   test/util_tests.cpp \
   test/scriptnum_tests.cpp \
   test/sighash_tests.cpp
diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp
new file mode 100644
index 000000000000..25d1df34314f
--- /dev/null
+++ b/src/test/univalue_tests.cpp
@@ -0,0 +1,275 @@
+// Copyright 2014 BitPay, Inc.
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <stdint.h>
+#include <vector>
+#include <string>
+#include <map>
+#include "univalue/univalue.h"
+
+#include <boost/test/unit_test.hpp>
+
+using namespace std;
+
+BOOST_AUTO_TEST_SUITE(univalue_tests)
+
+BOOST_AUTO_TEST_CASE(univalue_constructor)
+{
+    UniValue v1;
+    BOOST_CHECK(v1.isNull());
+
+    UniValue v2(UniValue::VSTR);
+    BOOST_CHECK(v2.isStr());
+
+    UniValue v3(UniValue::VSTR, "foo");
+    BOOST_CHECK(v3.isStr());
+    BOOST_CHECK_EQUAL(v3.getValStr(), "foo");
+
+    UniValue numTest;
+    BOOST_CHECK(numTest.setNumStr("82"));
+    BOOST_CHECK_EQUAL(numTest.isNum(), true);
+    BOOST_CHECK_EQUAL(numTest.getValStr(), "82");
+
+    uint64_t vu64 = 82;
+    UniValue v4(vu64);
+    BOOST_CHECK_EQUAL(v4.isNum(), true);
+    BOOST_CHECK_EQUAL(v4.getValStr(), "82");
+
+    int64_t vi64 = -82;
+    UniValue v5(vi64);
+    BOOST_CHECK_EQUAL(v5.isNum(), true);
+    BOOST_CHECK_EQUAL(v5.getValStr(), "-82");
+
+    int vi = -688;
+    UniValue v6(vi);
+    BOOST_CHECK_EQUAL(v6.isNum(), true);
+    BOOST_CHECK_EQUAL(v6.getValStr(), "-688");
+
+    double vd = -7.21;
+    UniValue v7(vd);
+    BOOST_CHECK_EQUAL(v7.isNum(), true);
+    BOOST_CHECK_EQUAL(v7.getValStr(), "-7.21");
+
+    string vs("yawn");
+    UniValue v8(vs);
+    BOOST_CHECK_EQUAL(v8.isStr(), true);
+    BOOST_CHECK_EQUAL(v8.getValStr(), "yawn");
+
+    const char *vcs = "zappa";
+    UniValue v9(vcs);
+    BOOST_CHECK_EQUAL(v9.isStr(), true);
+    BOOST_CHECK_EQUAL(v9.getValStr(), "zappa");
+}
+
+BOOST_AUTO_TEST_CASE(univalue_set)
+{
+    UniValue v(UniValue::VSTR, "foo");
+    v.clear();
+    BOOST_CHECK_EQUAL(v.isNull(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "");
+
+    BOOST_CHECK(v.setObject());
+    BOOST_CHECK_EQUAL(v.isObject(), true);
+    BOOST_CHECK_EQUAL(v.count(), 0);
+    BOOST_CHECK_EQUAL(v.getType(), UniValue::VOBJ);
+    BOOST_CHECK_EQUAL(v.empty(), true);
+
+    BOOST_CHECK(v.setArray());
+    BOOST_CHECK_EQUAL(v.isArray(), true);
+    BOOST_CHECK_EQUAL(v.count(), 0);
+
+    BOOST_CHECK(v.setStr("zum"));
+    BOOST_CHECK_EQUAL(v.isStr(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "zum");
+
+    BOOST_CHECK(v.setFloat(-1.01));
+    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "-1.01");
+
+    BOOST_CHECK(v.setInt((int)1023));
+    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "1023");
+
+    BOOST_CHECK(v.setInt((int64_t)-1023LL));
+    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "-1023");
+
+    BOOST_CHECK(v.setInt((uint64_t)1023ULL));
+    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "1023");
+
+    BOOST_CHECK(v.setNumStr("-688"));
+    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK_EQUAL(v.getValStr(), "-688");
+
+    BOOST_CHECK(v.setBool(false));
+    BOOST_CHECK_EQUAL(v.isBool(), true);
+    BOOST_CHECK_EQUAL(v.isTrue(), false);
+    BOOST_CHECK_EQUAL(v.isFalse(), true);
+    BOOST_CHECK_EQUAL(v.getBool(), false);
+
+    BOOST_CHECK(v.setBool(true));
+    BOOST_CHECK_EQUAL(v.isBool(), true);
+    BOOST_CHECK_EQUAL(v.isTrue(), true);
+    BOOST_CHECK_EQUAL(v.isFalse(), false);
+    BOOST_CHECK_EQUAL(v.getBool(), true);
+
+    BOOST_CHECK(!v.setNumStr("zombocom"));
+
+    BOOST_CHECK(v.setNull());
+    BOOST_CHECK_EQUAL(v.isNull(), true);
+}
+
+BOOST_AUTO_TEST_CASE(univalue_array)
+{
+    UniValue arr(UniValue::VARR);
+
+    UniValue v((int64_t)1023LL);
+    BOOST_CHECK(arr.push_back(v));
+
+    string vStr("zippy");
+    BOOST_CHECK(arr.push_back(vStr));
+
+    const char *s = "pippy";
+    BOOST_CHECK(arr.push_back(s));
+
+    vector<UniValue> vec;
+    v.setStr("boing");
+    vec.push_back(v);
+
+    v.setStr("going");
+    vec.push_back(v);
+
+    BOOST_CHECK(arr.push_backV(vec));
+
+    BOOST_CHECK_EQUAL(arr.empty(), false);
+    BOOST_CHECK_EQUAL(arr.count(), 5);
+
+    BOOST_CHECK_EQUAL(arr[0].getValStr(), "1023");
+    BOOST_CHECK_EQUAL(arr[1].getValStr(), "zippy");
+    BOOST_CHECK_EQUAL(arr[2].getValStr(), "pippy");
+    BOOST_CHECK_EQUAL(arr[3].getValStr(), "boing");
+    BOOST_CHECK_EQUAL(arr[4].getValStr(), "going");
+
+    BOOST_CHECK_EQUAL(arr[999].getValStr(), "");
+
+    arr.clear();
+    BOOST_CHECK_EQUAL(arr.empty(), true);
+    BOOST_CHECK_EQUAL(arr.count(), 0);
+}
+
+BOOST_AUTO_TEST_CASE(univalue_object)
+{
+    UniValue obj(UniValue::VOBJ);
+    string strKey, strVal;
+    UniValue v;
+
+    strKey = "age";
+    v.setInt(100);
+    BOOST_CHECK(obj.pushKV(strKey, v));
+
+    strKey = "first";
+    strVal = "John";
+    BOOST_CHECK(obj.pushKV(strKey, strVal));
+
+    strKey = "last";
+    const char *cVal = "Smith";
+    BOOST_CHECK(obj.pushKV(strKey, cVal));
+
+    strKey = "distance";
+    BOOST_CHECK(obj.pushKV(strKey, (int64_t) 25));
+
+    strKey = "time";
+    BOOST_CHECK(obj.pushKV(strKey, (uint64_t) 3600));
+
+    strKey = "calories";
+    BOOST_CHECK(obj.pushKV(strKey, (int) 12));
+
+    strKey = "temperature";
+    BOOST_CHECK(obj.pushKV(strKey, (double) 90.012));
+
+    UniValue obj2(UniValue::VOBJ);
+    BOOST_CHECK(obj2.pushKV("cat1", 9000));
+    BOOST_CHECK(obj2.pushKV("cat2", 12345));
+
+    BOOST_CHECK(obj.pushKVs(obj2));
+
+    BOOST_CHECK_EQUAL(obj.empty(), false);
+    BOOST_CHECK_EQUAL(obj.count(), 9);
+
+    BOOST_CHECK_EQUAL(obj["age"].getValStr(), "100");
+    BOOST_CHECK_EQUAL(obj["first"].getValStr(), "John");
+    BOOST_CHECK_EQUAL(obj["last"].getValStr(), "Smith");
+    BOOST_CHECK_EQUAL(obj["distance"].getValStr(), "25");
+    BOOST_CHECK_EQUAL(obj["time"].getValStr(), "3600");
+    BOOST_CHECK_EQUAL(obj["calories"].getValStr(), "12");
+    BOOST_CHECK_EQUAL(obj["temperature"].getValStr(), "90.012");
+    BOOST_CHECK_EQUAL(obj["cat1"].getValStr(), "9000");
+    BOOST_CHECK_EQUAL(obj["cat2"].getValStr(), "12345");
+
+    BOOST_CHECK_EQUAL(obj["nyuknyuknyuk"].getValStr(), "");
+
+    BOOST_CHECK(obj.exists("age"));
+    BOOST_CHECK(obj.exists("first"));
+    BOOST_CHECK(obj.exists("last"));
+    BOOST_CHECK(obj.exists("distance"));
+    BOOST_CHECK(obj.exists("time"));
+    BOOST_CHECK(obj.exists("calories"));
+    BOOST_CHECK(obj.exists("temperature"));
+    BOOST_CHECK(obj.exists("cat1"));
+    BOOST_CHECK(obj.exists("cat2"));
+
+    BOOST_CHECK(!obj.exists("nyuknyuknyuk"));
+
+    map<string, UniValue::VType> objTypes;
+    objTypes["age"] = UniValue::VNUM;
+    objTypes["first"] = UniValue::VSTR;
+    objTypes["last"] = UniValue::VSTR;
+    objTypes["distance"] = UniValue::VNUM;
+    objTypes["time"] = UniValue::VNUM;
+    objTypes["calories"] = UniValue::VNUM;
+    objTypes["temperature"] = UniValue::VNUM;
+    objTypes["cat1"] = UniValue::VNUM;
+    objTypes["cat2"] = UniValue::VNUM;
+    BOOST_CHECK(obj.checkObject(objTypes));
+
+    objTypes["cat2"] = UniValue::VSTR;
+    BOOST_CHECK(!obj.checkObject(objTypes));
+
+    obj.clear();
+    BOOST_CHECK_EQUAL(obj.empty(), true);
+    BOOST_CHECK_EQUAL(obj.count(), 0);
+}
+
+static const char *json1 =
+"[1.1,{\"key1\":\"str\",\"key2\":800,\"key3\":{\"name\":\"martian\"}}]";
+
+BOOST_AUTO_TEST_CASE(univalue_readwrite)
+{
+    UniValue v;
+    BOOST_CHECK(v.read(json1));
+
+    string strJson1(json1);
+    BOOST_CHECK(v.read(strJson1));
+
+    BOOST_CHECK(v.isArray());
+    BOOST_CHECK_EQUAL(v.count(), 2);
+
+    BOOST_CHECK_EQUAL(v[0].getValStr(), "1.1");
+
+    UniValue obj = v[1];
+    BOOST_CHECK(obj.isObject());
+    BOOST_CHECK_EQUAL(obj.count(), 3);
+
+    BOOST_CHECK(obj["key1"].isStr());
+    BOOST_CHECK_EQUAL(obj["key1"].getValStr(), "str");
+    BOOST_CHECK(obj["key2"].isNum());
+    BOOST_CHECK_EQUAL(obj["key2"].getValStr(), "800");
+    BOOST_CHECK(obj["key3"].isObject());
+
+    BOOST_CHECK_EQUAL(strJson1, v.write());
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+

From dc271fc025d219c18428a4d36dbc372c8e457908 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 20 Aug 2014 01:09:21 -0400
Subject: [PATCH 0558/1819] UniValue tests: use more BOOST_CHECK()

---
 src/test/univalue_tests.cpp | 40 ++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp
index 25d1df34314f..23bc5f6b1265 100644
--- a/src/test/univalue_tests.cpp
+++ b/src/test/univalue_tests.cpp
@@ -28,37 +28,37 @@ BOOST_AUTO_TEST_CASE(univalue_constructor)
 
     UniValue numTest;
     BOOST_CHECK(numTest.setNumStr("82"));
-    BOOST_CHECK_EQUAL(numTest.isNum(), true);
+    BOOST_CHECK(numTest.isNum());
     BOOST_CHECK_EQUAL(numTest.getValStr(), "82");
 
     uint64_t vu64 = 82;
     UniValue v4(vu64);
-    BOOST_CHECK_EQUAL(v4.isNum(), true);
+    BOOST_CHECK(v4.isNum());
     BOOST_CHECK_EQUAL(v4.getValStr(), "82");
 
     int64_t vi64 = -82;
     UniValue v5(vi64);
-    BOOST_CHECK_EQUAL(v5.isNum(), true);
+    BOOST_CHECK(v5.isNum());
     BOOST_CHECK_EQUAL(v5.getValStr(), "-82");
 
     int vi = -688;
     UniValue v6(vi);
-    BOOST_CHECK_EQUAL(v6.isNum(), true);
+    BOOST_CHECK(v6.isNum());
     BOOST_CHECK_EQUAL(v6.getValStr(), "-688");
 
     double vd = -7.21;
     UniValue v7(vd);
-    BOOST_CHECK_EQUAL(v7.isNum(), true);
+    BOOST_CHECK(v7.isNum());
     BOOST_CHECK_EQUAL(v7.getValStr(), "-7.21");
 
     string vs("yawn");
     UniValue v8(vs);
-    BOOST_CHECK_EQUAL(v8.isStr(), true);
+    BOOST_CHECK(v8.isStr());
     BOOST_CHECK_EQUAL(v8.getValStr(), "yawn");
 
     const char *vcs = "zappa";
     UniValue v9(vcs);
-    BOOST_CHECK_EQUAL(v9.isStr(), true);
+    BOOST_CHECK(v9.isStr());
     BOOST_CHECK_EQUAL(v9.getValStr(), "zappa");
 }
 
@@ -66,41 +66,41 @@ BOOST_AUTO_TEST_CASE(univalue_set)
 {
     UniValue v(UniValue::VSTR, "foo");
     v.clear();
-    BOOST_CHECK_EQUAL(v.isNull(), true);
+    BOOST_CHECK(v.isNull());
     BOOST_CHECK_EQUAL(v.getValStr(), "");
 
     BOOST_CHECK(v.setObject());
-    BOOST_CHECK_EQUAL(v.isObject(), true);
+    BOOST_CHECK(v.isObject());
     BOOST_CHECK_EQUAL(v.count(), 0);
     BOOST_CHECK_EQUAL(v.getType(), UniValue::VOBJ);
-    BOOST_CHECK_EQUAL(v.empty(), true);
+    BOOST_CHECK(v.empty());
 
     BOOST_CHECK(v.setArray());
-    BOOST_CHECK_EQUAL(v.isArray(), true);
+    BOOST_CHECK(v.isArray());
     BOOST_CHECK_EQUAL(v.count(), 0);
 
     BOOST_CHECK(v.setStr("zum"));
-    BOOST_CHECK_EQUAL(v.isStr(), true);
+    BOOST_CHECK(v.isStr());
     BOOST_CHECK_EQUAL(v.getValStr(), "zum");
 
     BOOST_CHECK(v.setFloat(-1.01));
-    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK(v.isNum());
     BOOST_CHECK_EQUAL(v.getValStr(), "-1.01");
 
     BOOST_CHECK(v.setInt((int)1023));
-    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK(v.isNum());
     BOOST_CHECK_EQUAL(v.getValStr(), "1023");
 
     BOOST_CHECK(v.setInt((int64_t)-1023LL));
-    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK(v.isNum());
     BOOST_CHECK_EQUAL(v.getValStr(), "-1023");
 
     BOOST_CHECK(v.setInt((uint64_t)1023ULL));
-    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK(v.isNum());
     BOOST_CHECK_EQUAL(v.getValStr(), "1023");
 
     BOOST_CHECK(v.setNumStr("-688"));
-    BOOST_CHECK_EQUAL(v.isNum(), true);
+    BOOST_CHECK(v.isNum());
     BOOST_CHECK_EQUAL(v.getValStr(), "-688");
 
     BOOST_CHECK(v.setBool(false));
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE(univalue_set)
     BOOST_CHECK(!v.setNumStr("zombocom"));
 
     BOOST_CHECK(v.setNull());
-    BOOST_CHECK_EQUAL(v.isNull(), true);
+    BOOST_CHECK(v.isNull());
 }
 
 BOOST_AUTO_TEST_CASE(univalue_array)
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(univalue_array)
     BOOST_CHECK_EQUAL(arr[999].getValStr(), "");
 
     arr.clear();
-    BOOST_CHECK_EQUAL(arr.empty(), true);
+    BOOST_CHECK(arr.empty());
     BOOST_CHECK_EQUAL(arr.count(), 0);
 }
 
@@ -238,7 +238,7 @@ BOOST_AUTO_TEST_CASE(univalue_object)
     BOOST_CHECK(!obj.checkObject(objTypes));
 
     obj.clear();
-    BOOST_CHECK_EQUAL(obj.empty(), true);
+    BOOST_CHECK(obj.empty());
     BOOST_CHECK_EQUAL(obj.count(), 0);
 }
 

From 81212588c06cbf771bf3b60b426c3c4d2625e899 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 10:26:27 +0200
Subject: [PATCH 0559/1819] Remove print() from core functions

Break dependency on util.
---
 src/core.cpp  | 38 +++++++++-----------------------------
 src/core.h    |  6 +-----
 src/init.cpp  |  3 +--
 src/miner.cpp |  2 +-
 4 files changed, 12 insertions(+), 37 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 149b3532a18f..2a5e2a372b6d 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -12,11 +12,6 @@ std::string COutPoint::ToString() const
     return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
 }
 
-void COutPoint::print() const
-{
-    LogPrintf("%s\n", ToString());
-}
-
 CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, unsigned int nSequenceIn)
 {
     prevout = prevoutIn;
@@ -46,11 +41,6 @@ std::string CTxIn::ToString() const
     return str;
 }
 
-void CTxIn::print() const
-{
-    LogPrintf("%s\n", ToString());
-}
-
 CTxOut::CTxOut(int64_t nValueIn, CScript scriptPubKeyIn)
 {
     nValue = nValueIn;
@@ -67,11 +57,6 @@ std::string CTxOut::ToString() const
     return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
 }
 
-void CTxOut::print() const
-{
-    LogPrintf("%s\n", ToString());
-}
-
 CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
 {
     if (nSize > 0)
@@ -92,8 +77,7 @@ int64_t CFeeRate::GetFee(size_t nSize) const
 
 std::string CFeeRate::ToString() const
 {
-    std::string result = FormatMoney(nSatoshisPerK) + " BTC/kB";
-    return result;
+    return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
 }
 
 CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
@@ -171,11 +155,6 @@ std::string CTransaction::ToString() const
     return str;
 }
 
-void CTransaction::print() const
-{
-    LogPrintf("%s", ToString());
-}
-
 // Amount compression:
 // * If the amount is 0, output 0
 // * first, divide the amount (in base units) by the largest power of 10 possible; call the exponent e (e is max 9)
@@ -285,9 +264,10 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMer
     return hash;
 }
 
-void CBlock::print() const
+std::string CBlock::ToString() const
 {
-    LogPrintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
+    std::stringstream s;
+    s << strprintf("CBlock(hash=%s, ver=%d, hashPrevBlock=%s, hashMerkleRoot=%s, nTime=%u, nBits=%08x, nNonce=%u, vtx=%u)\n",
         GetHash().ToString(),
         nVersion,
         hashPrevBlock.ToString(),
@@ -296,11 +276,11 @@ void CBlock::print() const
         vtx.size());
     for (unsigned int i = 0; i < vtx.size(); i++)
     {
-        LogPrintf("  ");
-        vtx[i].print();
+        s << "  " << vtx[i].ToString() << "\n";
     }
-    LogPrintf("  vMerkleTree: ");
+    s << "  vMerkleTree: ";
     for (unsigned int i = 0; i < vMerkleTree.size(); i++)
-        LogPrintf("%s ", vMerkleTree[i].ToString());
-    LogPrintf("\n");
+        s << " " << vMerkleTree[i].ToString();
+    s << "\n";
+    return s.str();
 }
diff --git a/src/core.h b/src/core.h
index fb64e6c08e47..9552f7025465 100644
--- a/src/core.h
+++ b/src/core.h
@@ -47,7 +47,6 @@ class COutPoint
     }
 
     std::string ToString() const;
-    void print() const;
 };
 
 /** An inpoint - a combination of a transaction and an index n into its vin */
@@ -107,7 +106,6 @@ class CTxIn
     }
 
     std::string ToString() const;
-    void print() const;
 };
 
 
@@ -200,7 +198,6 @@ class CTxOut
     }
 
     std::string ToString() const;
-    void print() const;
 };
 
 
@@ -279,7 +276,6 @@ class CTransaction
     }
 
     std::string ToString() const;
-    void print() const;
 };
 
 /** A mutable version of CTransaction. */
@@ -497,7 +493,7 @@ class CBlock : public CBlockHeader
 
     std::vector<uint256> GetMerkleBranch(int nIndex) const;
     static uint256 CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMerkleBranch, int nIndex);
-    void print() const;
+    std::string ToString() const;
 };
 
 
diff --git a/src/init.cpp b/src/init.cpp
index 42956a8d69d9..708e6386aaf5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1029,8 +1029,7 @@ bool AppInit2(boost::thread_group& threadGroup)
                 CBlock block;
                 ReadBlockFromDisk(block, pindex);
                 block.BuildMerkleTree();
-                block.print();
-                LogPrintf("\n");
+                LogPrintf("%s\n", block.ToString());
                 nFound++;
             }
         }
diff --git a/src/miner.cpp b/src/miner.cpp
index 9408d2c5aac9..13aa6671c98e 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -404,7 +404,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
 
 bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
 {
-    pblock->print();
+    LogPrintf("%s\n", pblock->ToString());
     LogPrintf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue));
 
     // Found a solution

From 9b6d4c5cdc1ad7b12b8b7ba05125dad9ba2d396e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 10:51:18 +0200
Subject: [PATCH 0560/1819] Move strprintf define to tinyformat.h

This avoids a dependency on util.h if just tinyformat is needed.
---
 src/core.cpp     | 2 +-
 src/tinyformat.h | 2 ++
 src/util.h       | 1 -
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 2a5e2a372b6d..71d6fea610e8 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -5,7 +5,7 @@
 
 #include "core.h"
 
-#include "util.h"
+#include "tinyformat.h"
 
 std::string COutPoint::ToString() const
 {
diff --git a/src/tinyformat.h b/src/tinyformat.h
index b6113029f595..929cb66e4d7c 100644
--- a/src/tinyformat.h
+++ b/src/tinyformat.h
@@ -1007,4 +1007,6 @@ TINYFORMAT_WRAP_FORMAT_N(16, returnType, funcName, funcDeclSuffix, bodyPrefix, s
 
 } // namespace tinyformat
 
+#define strprintf tfm::format
+
 #endif // TINYFORMAT_H_INCLUDED
diff --git a/src/util.h b/src/util.h
index db2005337b20..1fb42a7b7ee9 100644
--- a/src/util.h
+++ b/src/util.h
@@ -108,7 +108,6 @@ bool LogAcceptCategory(const char* category);
 /* Send a string to the log output */
 int LogPrintStr(const std::string &str);
 
-#define strprintf tfm::format
 #define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)
 
 /* When we switch to C++11, this can be switched to variadic templates instead

From 5d9f22b3cb533122d2289ed404ca09eb345ae157 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Wed, 20 Aug 2014 20:00:13 +0800
Subject: [PATCH 0561/1819] Remove link to now removed Windows Build Notes

Removed in
---
 doc/README.md | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/README.md b/doc/README.md
index f8bb8020d487..10c9ad17992a 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -46,7 +46,6 @@ The following are developer notes on how to build Bitcoin on your native platfor
 
 - [OSX Build Notes](build-osx.md)
 - [Unix Build Notes](build-unix.md)
-- [Windows Build Notes](build-msw.md)
 
 Development
 ---------------------

From 380222411038cb4f74cbb109984c4b855b4799f6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 20:54:27 +0200
Subject: [PATCH 0562/1819] Remove all other print() methods

All unused.
---
 src/alert.cpp    |  5 -----
 src/alert.h      |  1 -
 src/main.cpp     |  1 -
 src/main.h       | 10 ----------
 src/miner.cpp    |  8 --------
 src/netbase.cpp  | 10 ----------
 src/netbase.h    |  2 --
 src/protocol.cpp |  6 ------
 src/protocol.h   |  3 ---
 src/wallet.h     |  5 -----
 10 files changed, 51 deletions(-)

diff --git a/src/alert.cpp b/src/alert.cpp
index 258a2b52c4f7..2cd684cc4c4a 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -80,11 +80,6 @@ std::string CUnsignedAlert::ToString() const
         strStatusBar);
 }
 
-void CUnsignedAlert::print() const
-{
-    LogPrintf("%s", ToString());
-}
-
 void CAlert::SetNull()
 {
     CUnsignedAlert::SetNull();
diff --git a/src/alert.h b/src/alert.h
index 296d48891af2..b9d850b565a6 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -68,7 +68,6 @@ class CUnsignedAlert
     void SetNull();
 
     std::string ToString() const;
-    void print() const;
 };
 
 /** An alert is a combination of a serialized CUnsignedAlert and a signature. */
diff --git a/src/main.cpp b/src/main.cpp
index 09b10c8e556d..d7543e3f13ee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3968,7 +3968,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         vRecv >> block;
 
         LogPrint("net", "received block %s peer=%d\n", block.GetHash().ToString(), pfrom->id);
-        // block.print();
 
         CInv inv(MSG_BLOCK, block.GetHash());
         pfrom->AddInventoryKnown(inv);
diff --git a/src/main.h b/src/main.h
index 01d3f119e1e8..886cac1507c9 100644
--- a/src/main.h
+++ b/src/main.h
@@ -839,11 +839,6 @@ class CBlockIndex
             GetBlockHash().ToString());
     }
 
-    void print() const
-    {
-        LogPrintf("%s\n", ToString());
-    }
-
     // Check whether this block index entry is valid up to the passed validity level.
     bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
     {
@@ -935,11 +930,6 @@ class CDiskBlockIndex : public CBlockIndex
             hashPrev.ToString());
         return str;
     }
-
-    void print() const
-    {
-        LogPrintf("%s\n", ToString());
-    }
 };
 
 /** Capture information about block/transaction validation */
diff --git a/src/miner.cpp b/src/miner.cpp
index 13aa6671c98e..06acff1c33e2 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -42,14 +42,6 @@ class COrphan
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
     {
     }
-
-    void print() const
-    {
-        LogPrintf("COrphan(hash=%s, dPriority=%.1f, fee=%s)\n",
-                  ptx->GetHash().ToString(), dPriority, feeRate.ToString());
-        BOOST_FOREACH(uint256 hash, setDependsOn)
-            LogPrintf("   setDependsOn %s\n", hash.ToString());
-    }
 };
 
 uint64_t nLastBlockTx = 0;
diff --git a/src/netbase.cpp b/src/netbase.cpp
index e1637cd404a8..e9207da33025 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -874,11 +874,6 @@ uint64_t CNetAddr::GetHash() const
     return nRet;
 }
 
-void CNetAddr::print() const
-{
-    LogPrintf("CNetAddr(%s)\n", ToString());
-}
-
 // private extensions to enum Network, only returned by GetExtNetwork,
 // and only used in GetReachabilityFrom
 static const int NET_UNKNOWN = NET_MAX + 0;
@@ -1107,11 +1102,6 @@ std::string CService::ToString() const
     return ToStringIPPort();
 }
 
-void CService::print() const
-{
-    LogPrintf("CService(%s)\n", ToString());
-}
-
 void CService::SetPort(unsigned short portIn)
 {
     port = portIn;
diff --git a/src/netbase.h b/src/netbase.h
index bd8dbf9695f0..2df3c4474df8 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -80,7 +80,6 @@ class CNetAddr
         bool GetInAddr(struct in_addr* pipv4Addr) const;
         std::vector<unsigned char> GetGroup() const;
         int GetReachabilityFrom(const CNetAddr *paddrPartner = NULL) const;
-        void print() const;
 
         CNetAddr(const struct in6_addr& pipv6Addr);
         bool GetIn6Addr(struct in6_addr* pipv6Addr) const;
@@ -145,7 +144,6 @@ class CService : public CNetAddr
         std::string ToString() const;
         std::string ToStringPort() const;
         std::string ToStringIPPort() const;
-        void print() const;
 
         CService(const struct in6_addr& ipv6Addr, unsigned short port);
         CService(const struct sockaddr_in6& addr);
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 87b2f238735c..341de0602ae3 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -144,9 +144,3 @@ std::string CInv::ToString() const
 {
     return strprintf("%s %s", GetCommand(), hash.ToString());
 }
-
-void CInv::print() const
-{
-    LogPrintf("CInv(%s)\n", ToString());
-}
-
diff --git a/src/protocol.h b/src/protocol.h
index 1f23274299b7..d7565584af57 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -98,8 +98,6 @@ class CAddress : public CService
              READWRITE(*pip);
             )
 
-        void print() const;
-
     // TODO: make private (improves encapsulation)
     public:
         uint64_t nServices;
@@ -130,7 +128,6 @@ class CInv
         bool IsKnownType() const;
         const char* GetCommand() const;
         std::string ToString() const;
-        void print() const;
 
     // TODO: make private (improves encapsulation)
     public:
diff --git a/src/wallet.h b/src/wallet.h
index 864a635ec7f8..34c699e979c6 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -824,11 +824,6 @@ class COutput
     {
         return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
     }
-
-    void print() const
-    {
-        LogPrintf("%s\n", ToString());
-    }
 };
 
 

From de1f05143f57e0aa0428b7c9c6a6ac515c3e0233 Mon Sep 17 00:00:00 2001
From: elichai <elichai.turkel@gmail.com>
Date: Wed, 20 Aug 2014 23:07:40 +0300
Subject: [PATCH 0563/1819] Added protobuf-compiler library to the Qt 5
 Dependencies

---
 doc/build-unix.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index d08c327ff98c..d5ddc90d405f 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -111,7 +111,7 @@ To build with Qt 4 you need the following:
 
 For Qt 5 you need the following:
 
-    sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev
+    sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
 
 libqrencode (optional) can be installed with:
 

From b1ed7c29381b5eebfa38fe95e9a31b74f25c8412 Mon Sep 17 00:00:00 2001
From: Rose Toomey <rktoomey@gmail.com>
Date: Wed, 20 Aug 2014 18:26:29 -0400
Subject: [PATCH 0564/1819] Update build-osx.md

The homebrew instructions were outdated - berkeley-db4 hasn't worked for months, based on the questions I'm seeing on Google/SO.  So I added a section explaining how to install berkeley-db4 using homebrew and move on with your life.  Thanks for the rest of the documentation!
---
 doc/build-osx.md | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index bc42723b1255..c19d87d38d93 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -69,7 +69,7 @@ Instructions: Homebrew
 
 #### Install dependencies using Homebrew
 
-        brew install autoconf automake libtool berkeley-db4 boost miniupnpc openssl pkg-config protobuf qt
+        brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
 
 Note: After you have installed the dependencies, you should check that the Homebrew installed version of OpenSSL is the one available for compilation. You can check this by typing
 
@@ -85,6 +85,29 @@ Rerunning "openssl version" should now return the correct version. If it
 doesn't, make sure `/usr/local/bin` comes before `/usr/bin` in your
 PATH. 
 
+#### Installing berkeley-db4 using Homebrew
+
+The homebrew package for berkeley-db4 has been broken for some time.  It will install without Java though.
+
+Running this command takes you into brew's interactive mode, which allows you to configure, make, and install by hand:
+```
+$ brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java 
+```
+
+These rest of these commands are run inside brew interactive mode:
+```
+/private/tmp/berkeley-db4-UGpd0O/db-4.8.30 $ cd ..
+/private/tmp/berkeley-db4-UGpd0O $ db-4.8.30/dist/configure --prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
+/private/tmp/berkeley-db4-UGpd0O $ make
+/private/tmp/berkeley-db4-UGpd0O $ make install
+/private/tmp/berkeley-db4-UGpd0O $ exit
+```
+
+After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to `/usr/local`.  You don't need it to link it to build bitcoin, but if you want to, here's how:
+
+    $ brew --force link berkeley-db4
+
+
 ### Building `bitcoind`
 
 1. Clone the github tree to get the source code and go into the directory.

From 7f836c66bdd91db967ed6917d8cbf678c8994566 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 20 Aug 2014 22:43:36 -0400
Subject: [PATCH 0565/1819] rpc_tests: use BOOST_CHECK_EQUAL

Upon failure, BOOST_CHECK_EQUAL provides additional diagnostic information,
displaying that data that failed to match.
---
 src/test/rpc_tests.cpp | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 107c0f06e752..d5475a92bfa4 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -110,14 +110,14 @@ BOOST_AUTO_TEST_CASE(rpc_rawsign)
 
 BOOST_AUTO_TEST_CASE(rpc_format_monetary_values)
 {
-    BOOST_CHECK(write_string(ValueFromAmount(0LL), false) == "0.00000000");
-    BOOST_CHECK(write_string(ValueFromAmount(1LL), false) == "0.00000001");
-    BOOST_CHECK(write_string(ValueFromAmount(17622195LL), false) == "0.17622195");
-    BOOST_CHECK(write_string(ValueFromAmount(50000000LL), false) == "0.50000000");
-    BOOST_CHECK(write_string(ValueFromAmount(89898989LL), false) == "0.89898989");
-    BOOST_CHECK(write_string(ValueFromAmount(100000000LL), false) == "1.00000000");
-    BOOST_CHECK(write_string(ValueFromAmount(2099999999999990LL), false) == "20999999.99999990");
-    BOOST_CHECK(write_string(ValueFromAmount(2099999999999999LL), false) == "20999999.99999999");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(0LL), false), "0.00000000");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(1LL), false), "0.00000001");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(17622195LL), false), "0.17622195");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(50000000LL), false), "0.50000000");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(89898989LL), false), "0.89898989");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(100000000LL), false), "1.00000000");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(2099999999999990LL), false), "20999999.99999990");
+    BOOST_CHECK_EQUAL(write_string(ValueFromAmount(2099999999999999LL), false), "20999999.99999999");
 }
 
 static Value ValueFromString(const std::string &str)
@@ -129,14 +129,14 @@ static Value ValueFromString(const std::string &str)
 
 BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values)
 {
-    BOOST_CHECK(AmountFromValue(ValueFromString("0.00000001")) == 1LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("0.17622195")) == 17622195LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("0.5")) == 50000000LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("0.50000000")) == 50000000LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("0.89898989")) == 89898989LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("1.00000000")) == 100000000LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("20999999.9999999")) == 2099999999999990LL);
-    BOOST_CHECK(AmountFromValue(ValueFromString("20999999.99999999")) == 2099999999999999LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.00000001")), 1LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.17622195")), 17622195LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.5")), 50000000LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.50000000")), 50000000LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("0.89898989")), 89898989LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("1.00000000")), 100000000LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.9999999")), 2099999999999990LL);
+    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.99999999")), 2099999999999999LL);
 }
 
 BOOST_AUTO_TEST_CASE(rpc_boostasiotocnetaddr)

From 386efb7695debaf5f0f328a2e4c9abc342161665 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 20 Aug 2014 21:02:55 -0400
Subject: [PATCH 0566/1819] build: work around ccache/autotools
 warning-spamming bug

When using clang and ccache, builds spew lots of:
Clang: warning: argument unused during compilation

Upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=8118

This is harmless, bug annoying. If ccache is being used and the
-Qunused-arguments flag is supported (clang), use it.
---
 configure.ac | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/configure.ac b/configure.ac
index 601ccf0a7973..700f4ab70950 100644
--- a/configure.ac
+++ b/configure.ac
@@ -656,6 +656,9 @@ if test "x$use_ccache" != "xno"; then
   fi
   AC_MSG_RESULT($use_ccache)
 fi
+if test "x$use_ccache" = "xyes"; then
+    AX_CHECK_PREPROC_FLAG([-Qunused-arguments],[CPPFLAGS="-Qunused-arguments $CPPFLAGS"])
+fi
 
 dnl enable wallet
 AC_MSG_CHECKING([if wallet should be enabled])

From c897b1e732f524e525d1bd150326b7f0632c1b69 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 22 Aug 2014 15:41:38 -0400
Subject: [PATCH 0567/1819] depends: add a fallback path in case package
 sources go missing

If a source url fails to download, try again at
$FALLBACK_DOWNLOAD_PATH/file.name, where FALLBACK_DOWNLOAD_PATH can be
overridden by the user.
---
 depends/Makefile                          |  1 +
 depends/README.usage                      |  1 +
 depends/funcs.mk                          | 14 ++++++++------
 depends/packages/native_cctools.mk        | 10 +++++-----
 depends/packages/native_comparisontool.mk | 12 ++++++------
 5 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/depends/Makefile b/depends/Makefile
index bd5f0bf53643..8075c66b78c2 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -6,6 +6,7 @@ SDK_PATH ?= $(BASEDIR)/SDKs
 NO_QT ?=
 NO_WALLET ?=
 NO_UPNP ?=
+FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 
 BUILD = $(shell ./config.guess)
 HOST ?= $(BUILD)
diff --git a/depends/README.usage b/depends/README.usage
index f50714f1f12b..0aacefbf94ce 100644
--- a/depends/README.usage
+++ b/depends/README.usage
@@ -18,6 +18,7 @@ The following can be set when running make: make FOO=bar
 SOURCES_PATH: downloaded sources will be placed here
 BASE_CACHE: built packages will be placed here
 SDK_PATH: Path where sdk's can be found (used by OSX)
+FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before giving up
 NO_QT: Don't download/build/cache qt and its dependencies
 NO_WALLET: Don't download/build/cache libs needed to enable the wallet
 NO_UPNP: Don't download/build/cache packages needed for enabling upnp
diff --git a/depends/funcs.mk b/depends/funcs.mk
index b5d8b0ee2e6e..280706efb312 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -20,11 +20,13 @@ $(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dep
 endef
 
 define fetch_file
-(test -f $(SOURCES_PATH)/$(3) || \
-  ( mkdir -p $$($(1)_extract_dir) && $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)" && \
-    echo "$(4)  $$($(1)_extract_dir)/$(3).temp" > $$($(1)_extract_dir)/.$(3).hash && \
-    $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$(3).hash && \
-    mv $$($(1)_extract_dir)/$(3).temp $(SOURCES_PATH)/$(3) ))
+(test -f $(SOURCES_PATH)/$(4) || \
+  ( mkdir -p $$($(1)_extract_dir) && \
+  ( $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)/$(3)" || \
+    $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(3)" ) && \
+    echo "$(5)  $$($(1)_extract_dir)/$(4).temp" > $$($(1)_extract_dir)/.$(4).hash && \
+    $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$(4).hash && \
+    mv $$($(1)_extract_dir)/$(4).temp $(SOURCES_PATH)/$(4) ))
 endef
 
 define int_get_build_recipe_hash
@@ -65,7 +67,7 @@ $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path))
 
 
 #default commands
-$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)/$$($(1)_download_file)),$($(1)_file_name),$($(1)_sha256_hash))
+$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash))
 $(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash)  $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash &&  $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source)
 $(1)_preprocess_cmds ?=
 $(1)_build_cmds ?=
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk
index e3ba9685b456..ad989cb544be 100644
--- a/depends/packages/native_cctools.mk
+++ b/depends/packages/native_cctools.mk
@@ -23,11 +23,11 @@ $(package)_clang_file_name=clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
 $(package)_clang_sha256_hash=b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff
 
 define $(package)_fetch_cmds
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_ld64_download_path)/$($(package)_ld64_download_file),$($(package)_ld64_file_name),$($(package)_ld64_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_dyld_download_path)/$($(package)_dyld_download_file),$($(package)_dyld_file_name),$($(package)_dyld_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_clang_download_path)/$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_toolchain4_download_path)/$($(package)_toolchain4_download_file),$($(package)_toolchain4_file_name),$($(package)_toolchain4_sha256_hash))
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_download_file),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_ld64_download_path),$($(package)_ld64_download_file),$($(package)_ld64_file_name),$($(package)_ld64_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_dyld_download_path),$($(package)_dyld_download_file),$($(package)_dyld_file_name),$($(package)_dyld_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_clang_download_path),$($(package)_clang_download_file),$($(package)_clang_file_name),$($(package)_clang_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_toolchain4_download_path),$($(package)_toolchain4_download_file),$($(package)_toolchain4_file_name),$($(package)_toolchain4_sha256_hash))
 endef
 
 define $(package)_set_vars
diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
index 5eef73052fc5..003923d7dde2 100644
--- a/depends/packages/native_comparisontool.mk
+++ b/depends/packages/native_comparisontool.mk
@@ -15,12 +15,12 @@ $(package)_slf4j-jdk14_file_name=slf4j-jdk14-1.6.4.jar
 $(package)_slf4j-jdk14_sha256_hash=064bd81796710f713f9f4a2309c0e032309934c2d2b4f7d3b6958325e584e13f
 
 define $(package)_fetch_cmds
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_guava_file_name),$($(package)_guava_file_name),$($(package)_guava_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_h2_file_name),$($(package)_h2_file_name),$($(package)_h2_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path)/$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_sha256_hash))
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_guava_file_name),$($(package)_guava_file_name),$($(package)_guava_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_h2_file_name),$($(package)_h2_file_name),$($(package)_h2_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_sha256_hash)) && \
+$(call fetch_file,$(package),$($(package)_download_path),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_sha256_hash))
 endef
 
 define $(package)_extract_cmds

From 5a61553a143b0a37d59ac739529560edc1bf4d90 Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <DomT4@users.noreply.github.com>
Date: Sat, 23 Aug 2014 04:15:32 +0100
Subject: [PATCH 0568/1819] Build-osx: Force Fix.

Removes the unnecessary directions that encourage people to force install openssl into /usr/local with Homebrew. Unnecessary, and potentially quite risky. @theuni okayed this removal [here](https://github.com/bitcoin/bitcoin/pull/4740#issuecomment-53076840).
---
 doc/build-osx.md | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index c19d87d38d93..4dfde0f35a6c 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -71,19 +71,7 @@ Instructions: Homebrew
 
         brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
 
-Note: After you have installed the dependencies, you should check that the Homebrew installed version of OpenSSL is the one available for compilation. You can check this by typing
-
-        openssl version
-
-into Terminal. You should see OpenSSL 1.0.1h 5 Jun 2014.
-
-If not, you can ensure that the Homebrew OpenSSL is correctly linked by running
-
-        brew link openssl --force
-
-Rerunning "openssl version" should now return the correct version. If it
-doesn't, make sure `/usr/local/bin` comes before `/usr/bin` in your
-PATH. 
+Make sure `/usr/local/bin` comes before `/usr/bin` in your PATH. 
 
 #### Installing berkeley-db4 using Homebrew
 

From df920c6d49137a667dbca5dd0763cb4e7de3a3b1 Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <DomT4@users.noreply.github.com>
Date: Sat, 23 Aug 2014 04:36:20 +0100
Subject: [PATCH 0569/1819] Build-osx: Force Fix.

Kills the "make" line as well.
---
 doc/build-osx.md | 2 --
 1 file changed, 2 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index 4dfde0f35a6c..ade9eb466b1f 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -71,8 +71,6 @@ Instructions: Homebrew
 
         brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
 
-Make sure `/usr/local/bin` comes before `/usr/bin` in your PATH. 
-
 #### Installing berkeley-db4 using Homebrew
 
 The homebrew package for berkeley-db4 has been broken for some time.  It will install without Java though.

From c2c02f3fa99385f5a5be722fda6f71522c93bdaa Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 28 Jun 2014 14:03:06 +0200
Subject: [PATCH 0570/1819] Move UpdateTime to pow

---
 src/main.cpp      | 28 ----------------------------
 src/main.h        |  2 --
 src/miner.cpp     |  4 ++--
 src/pow.cpp       | 10 ++++++++++
 src/pow.h         |  2 ++
 src/rpcmining.cpp |  2 +-
 6 files changed, 15 insertions(+), 33 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index d7543e3f13ee..fab5af73bb90 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1419,25 +1419,6 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
     }
 }
 
-void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev)
-{
-    block.nTime = max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
-
-    // Updating time can change work required on testnet:
-    if (Params().AllowMinDifficultyBlocks())
-        block.nBits = GetNextWorkRequired(pindexPrev, &block);
-}
-
-
-
-
-
-
-
-
-
-
-
 void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)
 {
     bool ret;
@@ -3291,15 +3272,6 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
     return nLoaded > 0;
 }
 
-
-
-
-
-
-
-
-
-
 //////////////////////////////////////////////////////////////////////////////
 //
 // CAlert
diff --git a/src/main.h b/src/main.h
index 886cac1507c9..adb7d68bcf33 100644
--- a/src/main.h
+++ b/src/main.h
@@ -163,8 +163,6 @@ bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, b
 bool ActivateBestChain(CValidationState &state);
 int64_t GetBlockValue(int nHeight, int64_t nFees);
 
-void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev);
-
 /** Create a new block index entry for a given block hash */
 CBlockIndex * InsertBlockIndex(uint256 hash);
 /** Verify a signature */
diff --git a/src/miner.cpp b/src/miner.cpp
index 06acff1c33e2..97b74695a7a7 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -305,7 +305,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
         // Fill in header
         pblock->hashPrevBlock  = pindexPrev->GetBlockHash();
-        UpdateTime(*pblock, pindexPrev);
+        UpdateTime(pblock, pindexPrev);
         pblock->nBits          = GetNextWorkRequired(pindexPrev, pblock);
         pblock->nNonce         = 0;
         pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
@@ -538,7 +538,7 @@ void static BitcoinMiner(CWallet *pwallet)
                     break;
 
                 // Update nTime every few seconds
-                UpdateTime(*pblock, pindexPrev);
+                UpdateTime(pblock, pindexPrev);
                 if (Params().AllowMinDifficultyBlocks())
                 {
                     // Changing pblock->nTime can change work required on testnet:
diff --git a/src/pow.cpp b/src/pow.cpp
index c0d0a7ca20f2..a99c582d7d1d 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -8,6 +8,7 @@
 #include "chainparams.h"
 #include "core.h"
 #include "main.h"
+#include "timedata.h"
 #include "uint256.h"
 
 unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
@@ -117,3 +118,12 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
         bnResult = bnLimit;
     return bnResult.GetCompact();
 }
+
+void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
+{
+    pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
+
+    // Updating time can change work required on testnet:
+    if (Params().AllowMinDifficultyBlocks())
+        pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
+}
diff --git a/src/pow.h b/src/pow.h
index 0ce5b48766a8..988062178827 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -20,4 +20,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits);
 /** Calculate the minimum amount of work a received block needs, without knowing its direct parent */
 unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
 
+void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
+
 #endif
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index edab427cbfac..429d7892782b 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -457,7 +457,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     CBlock* pblock = &pblocktemplate->block; // pointer for convenience
 
     // Update nTime
-    UpdateTime(*pblock, pindexPrev);
+    UpdateTime(pblock, pindexPrev);
     pblock->nNonce = 0;
 
     Array transactions;

From b343c1a1e34f851e70649ad1f49855a7d878f9ef Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 5 Jul 2014 12:05:33 +0200
Subject: [PATCH 0571/1819] Move CBlockIndex::GetBlockWork() to
 pow::GetProofIncrement(nBits)

---
 src/main.h  | 13 ++-----------
 src/pow.cpp | 15 +++++++++++++++
 src/pow.h   |  2 ++
 3 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/src/main.h b/src/main.h
index adb7d68bcf33..a15a0e16d078 100644
--- a/src/main.h
+++ b/src/main.h
@@ -14,6 +14,7 @@
 #include "coins.h"
 #include "core.h"
 #include "net.h"
+#include "pow.h"
 #include "script.h"
 #include "sync.h"
 #include "txmempool.h"
@@ -792,17 +793,7 @@ class CBlockIndex
 
     uint256 GetBlockWork() const
     {
-        uint256 bnTarget;
-        bool fNegative;
-        bool fOverflow;
-        bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
-        if (fNegative || fOverflow || bnTarget == 0)
-            return 0;
-        // We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
-        // as it's too large for a uint256. However, as 2**256 is at least as large
-        // as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
-        // or ~bnTarget / (nTarget+1) + 1.
-        return (~bnTarget / (bnTarget + 1)) + 1;
+        return GetProofIncrement(nBits);
     }
 
     enum { nMedianTimeSpan=11 };
diff --git a/src/pow.cpp b/src/pow.cpp
index a99c582d7d1d..d76928bda2a3 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -127,3 +127,18 @@ void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
     if (Params().AllowMinDifficultyBlocks())
         pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
 }
+
+uint256 GetProofIncrement(unsigned int nBits)
+{
+    uint256 bnTarget;
+    bool fNegative;
+    bool fOverflow;
+    bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
+    if (fNegative || fOverflow || bnTarget == 0)
+        return 0;
+    // We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
+    // as it's too large for a uint256. However, as 2**256 is at least as large
+    // as bnTarget+1, it is equal to ((2**256 - bnTarget - 1) / (bnTarget+1)) + 1,
+    // or ~bnTarget / (nTarget+1) + 1.
+    return (~bnTarget / (bnTarget + 1)) + 1;
+}
diff --git a/src/pow.h b/src/pow.h
index 988062178827..6aea713fc460 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -22,4 +22,6 @@ unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
 
 void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
 
+uint256 GetProofIncrement(unsigned int nBits);
+
 #endif

From 654871d43677947d124673c9e0dd2984f0d3ca61 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 20 Jun 2014 20:55:42 +0200
Subject: [PATCH 0572/1819] replace ComputeMinWork with CheckMinWork

---
 src/main.cpp           |  7 +------
 src/pow.cpp            | 23 +++++++++++++++--------
 src/pow.h              |  4 ++--
 src/test/DoS_tests.cpp |  6 +-----
 4 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index fab5af73bb90..9e07f43c442e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2410,12 +2410,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
             return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
                              REJECT_CHECKPOINT, "time-too-old");
         }
-        bool fOverflow = false;
-        uint256 bnNewBlock;
-        bnNewBlock.SetCompact(block.nBits, NULL, &fOverflow);
-        uint256 bnRequired;
-        bnRequired.SetCompact(ComputeMinWork(pcheckpoint->nBits, deltaTime));
-        if (fOverflow || bnNewBlock > bnRequired)
+        if (!CheckMinWork(block.nBits, pcheckpoint->nBits, deltaTime))
         {
             return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
                              REJECT_INVALID, "bad-diffbits");
diff --git a/src/pow.cpp b/src/pow.cpp
index d76928bda2a3..1d2b743b481a 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -94,29 +94,36 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
 }
 
 //
-// minimum amount of work that could possibly be required nTime after
-// minimum work required was nBase
+// true if nBits is greater than the minimum amount of work that could
+// possibly be required deltaTime after minimum work required was nBase
 //
-unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime)
+bool CheckMinWork(unsigned int nBits, unsigned int nBase, int64_t deltaTime)
 {
+    bool fOverflow = false;
+    uint256 bnNewBlock;
+    bnNewBlock.SetCompact(nBits, NULL, &fOverflow);
+    if (fOverflow)
+        return false;
+
     const uint256 &bnLimit = Params().ProofOfWorkLimit();
     // Testnet has min-difficulty blocks
     // after Params().TargetSpacing()*2 time between blocks:
-    if (Params().AllowMinDifficultyBlocks() && nTime > Params().TargetSpacing()*2)
-        return bnLimit.GetCompact();
+    if (Params().AllowMinDifficultyBlocks() && deltaTime > Params().TargetSpacing()*2)
+        return bnNewBlock <= bnLimit;
 
     uint256 bnResult;
     bnResult.SetCompact(nBase);
-    while (nTime > 0 && bnResult < bnLimit)
+    while (deltaTime > 0 && bnResult < bnLimit)
     {
         // Maximum 400% adjustment...
         bnResult *= 4;
         // ... in best-case exactly 4-times-normal target time
-        nTime -= Params().TargetTimespan()*4;
+        deltaTime -= Params().TargetTimespan()*4;
     }
     if (bnResult > bnLimit)
         bnResult = bnLimit;
-    return bnResult.GetCompact();
+
+    return bnNewBlock <= bnResult;
 }
 
 void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
diff --git a/src/pow.h b/src/pow.h
index 6aea713fc460..f350d763f4cb 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -17,8 +17,8 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
 
 /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
 bool CheckProofOfWork(uint256 hash, unsigned int nBits);
-/** Calculate the minimum amount of work a received block needs, without knowing its direct parent */
-unsigned int ComputeMinWork(unsigned int nBase, int64_t nTime);
+/** Check the work is more than the minimum a received block needs, without knowing its direct parent */
+bool CheckMinWork(unsigned int nBits, unsigned int nBase, int64_t deltaTime);
 
 void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
 
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 5e17555e7a8f..bb15db43b1b3 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -106,11 +106,7 @@ static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2,
         return CheckNBits(nbits2, time2, nbits1, time1);
     int64_t deltaTime = time2-time1;
 
-    uint256 required;
-    required.SetCompact(ComputeMinWork(nbits1, deltaTime));
-    uint256 have;
-    have.SetCompact(nbits2);
-    return (have <= required);
+    return CheckMinWork(nbits2, nbits1, deltaTime);
 }
 
 BOOST_AUTO_TEST_CASE(DoS_checknbits)

From 65f3fa8d11a9b2e139d4963514fdc1beb04dfb68 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 30 May 2014 19:14:01 -0400
Subject: [PATCH 0573/1819] build: osx: Fix incomplete framework packaging for
 codesigning

Starting with 10.9, Framework versions must be signed individually, rather
than as a single bundle version, in order to be properly codesigned. This
change ensures that the proper plist files and symlinks are present prior to
packaging.
---
 contrib/macdeploy/macdeployqtplus | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 23b57a76b357..5ab6a222dd4e 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -37,7 +37,10 @@ class FrameworkInfo(object):
         self.sourceFilePath = ""
         self.destinationDirectory = ""
         self.sourceResourcesDirectory = ""
+        self.sourceVersionContentsDirectory = ""
+        self.sourceContentsDirectory = ""
         self.destinationResourcesDirectory = ""
+        self.destinationVersionContentsDirectory = ""
     
     def __eq__(self, other):
         if self.__class__ == other.__class__:
@@ -141,7 +144,11 @@ class FrameworkInfo(object):
             info.destinationDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, info.binaryDirectory)
             
             info.sourceResourcesDirectory = os.path.join(info.frameworkPath, "Resources")
+            info.sourceContentsDirectory = os.path.join(info.frameworkPath, "Contents")
+            info.sourceVersionContentsDirectory = os.path.join(info.frameworkPath, "Versions", info.version, "Contents")
             info.destinationResourcesDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Resources")
+            info.destinationContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Contents")
+            info.destinationVersionContentsDirectory = os.path.join(cls.bundleFrameworkDirectory, info.frameworkName, "Versions", info.version, "Contents")
         
         return info
 
@@ -275,6 +282,13 @@ def copyFramework(framework, path, verbose):
       os.chmod(toPath, permissions.st_mode | stat.S_IWRITE)
 
     if not framework.isDylib(): # Copy resources for real frameworks
+
+        linkfrom = os.path.join(path, "Contents/Frameworks/", framework.frameworkName, framework.binaryName)
+        linkto = os.path.join(framework.binaryPath)
+        if not os.path.exists(linkfrom):
+            os.symlink(linkto, linkfrom)
+            if verbose >= 2:
+                print "Linked:", linkfrom, "->", linkto
         fromResourcesDir = framework.sourceResourcesDirectory
         if os.path.exists(fromResourcesDir):
             toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory)
@@ -282,6 +296,21 @@ def copyFramework(framework, path, verbose):
             if verbose >= 3:
                 print "Copied resources:", fromResourcesDir
                 print " to:", toResourcesDir
+        fromContentsDir = framework.sourceVersionContentsDirectory
+        if not os.path.exists(fromContentsDir):
+            fromContentsDir = framework.sourceContentsDirectory
+        if os.path.exists(fromContentsDir):
+            toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
+            shutil.copytree(fromContentsDir, toContentsDir)
+            contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
+            if not os.path.exists(contentslinkfrom):
+                contentslinkto = os.path.join("Versions/", framework.version, "Contents")
+                os.symlink(contentslinkto, contentslinkfrom)
+                if verbose >= 3:
+                    print "Linked:", contentslinkfrom, "->", contentslinkto
+            if verbose >= 3:
+                print "Copied Contents:", fromContentsDir
+                print " to:", toContentsDir
     elif framework.frameworkName.startswith("libQtGui"): # Copy qt_menu.nib (applies to non-framework layout)
         qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib")
         qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib")

From b0875eb3fea0934f3a6651fbc22aac12e33e15e5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 24 Aug 2014 02:08:05 +0200
Subject: [PATCH 0574/1819] Allow BatchWrite to destroy its input, reducing
 copying

---
 src/coins.cpp | 16 +++++++++-------
 src/coins.h   | 10 ++++++----
 src/txdb.cpp  |  7 +++++--
 src/txdb.h    |  2 +-
 4 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index fe40911db7d7..6137b51c55c1 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -57,7 +57,7 @@ bool CCoinsView::SetCoins(const uint256 &txid, const CCoins &coins) { return fal
 bool CCoinsView::HaveCoins(const uint256 &txid) { return false; }
 uint256 CCoinsView::GetBestBlock() { return uint256(0); }
 bool CCoinsView::SetBestBlock(const uint256 &hashBlock) { return false; }
-bool CCoinsView::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
+bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
 bool CCoinsView::GetStats(CCoinsStats &stats) { return false; }
 
 
@@ -68,7 +68,7 @@ bool CCoinsViewBacked::HaveCoins(const uint256 &txid) { return base->HaveCoins(t
 uint256 CCoinsViewBacked::GetBestBlock() { return base->GetBestBlock(); }
 bool CCoinsViewBacked::SetBestBlock(const uint256 &hashBlock) { return base->SetBestBlock(hashBlock); }
 void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
-bool CCoinsViewBacked::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
+bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
 bool CCoinsViewBacked::GetStats(CCoinsStats &stats) { return base->GetStats(stats); }
 
 CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
@@ -130,17 +130,19 @@ bool CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
     return true;
 }
 
-bool CCoinsViewCache::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
-    for (CCoinsMap::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
-        cacheCoins[it->first] = it->second;
+bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
+    for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
+        cacheCoins[it->first].swap(it->second);
+        CCoinsMap::iterator itOld = it++;
+        mapCoins.erase(itOld);
+    }
     hashBlock = hashBlockIn;
     return true;
 }
 
 bool CCoinsViewCache::Flush() {
     bool fOk = base->BatchWrite(cacheCoins, hashBlock);
-    if (fOk)
-        cacheCoins.clear();
+    cacheCoins.clear();
     return fOk;
 }
 
diff --git a/src/coins.h b/src/coins.h
index ff60288163b2..2b657299e3af 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -291,8 +291,9 @@ class CCoinsView
     // Modify the currently active block hash
     virtual bool SetBestBlock(const uint256 &hashBlock);
 
-    // Do a bulk modification (multiple SetCoins + one SetBestBlock)
-    virtual bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
+    // Do a bulk modification (multiple SetCoins + one SetBestBlock).
+    // The passed mapCoins can be modified.
+    virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Calculate statistics about the unspent transaction output set
     virtual bool GetStats(CCoinsStats &stats);
@@ -316,7 +317,7 @@ class CCoinsViewBacked : public CCoinsView
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
     void SetBackend(CCoinsView &viewIn);
-    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats);
 };
 
@@ -337,7 +338,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     bool HaveCoins(const uint256 &txid);
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
-    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Return a modifiable reference to a CCoins. Check HaveCoins first.
     // Many methods explicitly require a CCoinsViewCache because of this method, to reduce
@@ -346,6 +347,7 @@ class CCoinsViewCache : public CCoinsViewBacked
 
     // Push the modifications applied to this cache to its base.
     // Failure to call this method before destruction will cause the changes to be forgotten.
+    // If false is returned, the state of this cache (and its backing view) will be undefined.
     bool Flush();
 
     // Calculate the size of the cache (in number of transactions)
diff --git a/src/txdb.cpp b/src/txdb.cpp
index d3d05c58d705..7c0683aaf3d4 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -54,12 +54,15 @@ bool CCoinsViewDB::SetBestBlock(const uint256 &hashBlock) {
     return db.WriteBatch(batch);
 }
 
-bool CCoinsViewDB::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) {
+bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
     LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size());
 
     CLevelDBBatch batch;
-    for (CCoinsMap::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++)
+    for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
         BatchWriteCoins(batch, it->first, it->second);
+        CCoinsMap::iterator itOld = it++;
+        mapCoins.erase(itOld);
+    }
     if (hashBlock != uint256(0))
         BatchWriteHashBestChain(batch, hashBlock);
 
diff --git a/src/txdb.h b/src/txdb.h
index 7d670c25423f..099f1517768c 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -37,7 +37,7 @@ class CCoinsViewDB : public CCoinsView
     bool HaveCoins(const uint256 &txid);
     uint256 GetBestBlock();
     bool SetBestBlock(const uint256 &hashBlock);
-    bool BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock);
+    bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats);
 };
 

From fff7455deda80bf483422dd7d7c2446e93522f2d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 24 Aug 2014 02:08:25 +0200
Subject: [PATCH 0575/1819] Make CScript::clear() release its memory

---
 src/script.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/script.h b/src/script.h
index 7cb863d1c937..1e2cc94efe26 100644
--- a/src/script.h
+++ b/src/script.h
@@ -730,6 +730,12 @@ class CScript : public std::vector<unsigned char>
     {
         return CScriptID(Hash160(*this));
     }
+
+    void clear()
+    {
+        // The default std::vector::clear() does not release memory.
+        std::vector<unsigned char>().swap(*this);
+    }
 };
 
 /** Compact serializer for scripts.

From 476eb7eb53f680494952865a823e5cf9459da2b9 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sat, 23 Aug 2014 21:46:12 -0400
Subject: [PATCH 0576/1819] Update linearize scripts.

Break into two steps:
* Generate hash list
* Build data file(s) from local bitcoind blocks/ directory.

This supports building one large bootstrap.dat, or multiple
smaller blocks/blkNNNNN.dat files.
---
 contrib/linearize/README.md                   |  31 ++-
 contrib/linearize/example-linearize.cfg       |  12 +-
 contrib/linearize/linearize-data.py           | 182 ++++++++++++++++++
 .../{linearize.py => linearize-hashes.py}     |  40 +---
 4 files changed, 226 insertions(+), 39 deletions(-)
 create mode 100755 contrib/linearize/linearize-data.py
 rename contrib/linearize/{linearize.py => linearize-hashes.py} (74%)
 mode change 100644 => 100755

diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md
index 70b9f034cdf0..8d06d53b1043 100644
--- a/contrib/linearize/README.md
+++ b/contrib/linearize/README.md
@@ -1,2 +1,29 @@
-### Linearize ###
-Construct a linear, no-fork, best version of the blockchain.
\ No newline at end of file
+# Linearize
+Construct a linear, no-fork, best version of the blockchain.
+
+## Step 1: Download hash list
+
+   $ ./linearize-hashes.py linearize.cfg > hashlist.txt
+
+Required configuration file settings for linearize-hashes:
+* RPC: rpcuser, rpcpassword
+
+Optional config file setting for linearize-hashes:
+* RPC: host, port
+* Block chain: min_height, max_height
+
+## Step 2: Copy local block data
+
+   $ ./linearize-data.py linearize.cfg
+
+Required configuration file settings:
+* "input": bitcoind blocks/ directory containing blkNNNNN.dat
+* "hashlist": text file containing list of block hashes, linearized-hashes.py
+output.
+* "output_file": bootstrap.dat
+      or
+* "output": output directory for linearized blocks/blkNNNNN.dat output
+
+Optional config file setting for linearize-data:
+* "netmagic": network magic number
+
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index f5cdab532574..9c3270d65382 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -1,12 +1,16 @@
 
-# bitcoind RPC settings
+# bitcoind RPC settings (linearize-hashes)
 rpcuser=someuser
 rpcpassword=somepassword
 host=127.0.0.1
 port=8332
 
-# bootstrap.dat settings
+# bootstrap.dat hashlist settings (linearize-hashes)
+max_height=313000
+
+# bootstrap.dat input/output settings (linearize-data)
 netmagic=f9beb4d9
-max_height=279000
-output=bootstrap.dat
+input=/home/example/.bitcoin/blocks
+output_file=/home/example/Downloads/bootstrap.dat
+hashlist=hashlist.txt
 
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
new file mode 100755
index 000000000000..77bae6e3c655
--- /dev/null
+++ b/contrib/linearize/linearize-data.py
@@ -0,0 +1,182 @@
+#!/usr/bin/python
+#
+# linearize-data.py: Construct a linear, no-fork version of the chain.
+#
+# Copyright (c) 2013 The Bitcoin developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#
+
+import json
+import struct
+import re
+import base64
+import httplib
+import sys
+import hashlib
+
+MAX_OUT_SZ = 128 * 1024 * 1024
+
+settings = {}
+
+
+def uint32(x):
+	return x & 0xffffffffL
+
+def bytereverse(x):
+	return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
+		       (((x) >> 8) & 0x0000ff00) | ((x) >> 24) ))
+
+def bufreverse(in_buf):
+	out_words = []
+	for i in range(0, len(in_buf), 4):
+		word = struct.unpack('@I', in_buf[i:i+4])[0]
+		out_words.append(struct.pack('@I', bytereverse(word)))
+	return ''.join(out_words)
+
+def wordreverse(in_buf):
+	out_words = []
+	for i in range(0, len(in_buf), 4):
+		out_words.append(in_buf[i:i+4])
+	out_words.reverse()
+	return ''.join(out_words)
+
+def calc_hdr_hash(rawblock):
+	blk_hdr = rawblock[:80]
+
+	hash1 = hashlib.sha256()
+	hash1.update(blk_hdr)
+	hash1_o = hash1.digest()
+
+	hash2 = hashlib.sha256()
+	hash2.update(hash1_o)
+	hash2_o = hash2.digest()
+
+	return hash2_o
+
+def calc_hash_str(rawblock):
+	hash = calc_hdr_hash(rawblock)
+	hash = bufreverse(hash)
+	hash = wordreverse(hash)
+	hash_str = hash.encode('hex')
+	return hash_str
+
+def get_block_hashes(settings):
+	blkindex = []
+	f = open(settings['hashlist'], "r")
+	for line in f:
+		line = line.rstrip()
+		blkindex.append(line)
+
+	print("Read " + str(len(blkindex)) + " hashes")
+
+	return blkindex
+
+def mkblockset(blkindex):
+	blkmap = {}
+	for hash in blkindex:
+		blkmap[hash] = True
+	return blkmap
+
+def copydata(settings, blkindex, blkset):
+	inFn = 0
+	inF = None
+	outFn = 0
+	outsz = 0
+	outF = None
+	blkCount = 0
+
+	fileOutput = True
+	if 'output' in settings:
+		fileOutput = False
+
+	while True:
+		if not inF:
+			fname = "%s/blk%05d.dat" % (settings['input'], inFn)
+			print("Input file" + fname)
+			inF = open(fname, "rb")
+
+		inhdr = inF.read(8)
+		if (not inhdr or (inhdr[0] == "\0")):
+			inF.close()
+			inF = None
+			inFn = inFn + 1
+			continue
+
+		inMagic = inhdr[:4]
+		if (inMagic != settings['netmagic']):
+			print("Invalid magic:" + inMagic)
+			return
+		inLenLE = inhdr[4:]
+		su = struct.unpack("<I", inLenLE)
+		inLen = su[0]
+		rawblock = inF.read(inLen)
+
+		hash_str = calc_hash_str(rawblock)
+		if not hash_str in blkset:
+			print("Skipping unknown block " + hash_str)
+			continue
+
+		if not fileOutput and ((outsz + inLen) > MAX_OUT_SZ):
+			outF.close()
+			outF = None
+			outFn = outFn + 1
+			outsz = 0
+		if not outF:
+			if fileOutput:
+				fname = settings['output_file']
+			else:
+				fname = "%s/blk%05d.dat" % (settings['output'], outFn)
+			print("Output file" + fname)
+			outF = open(fname, "wb")
+
+		outF.write(inhdr)
+		outF.write(rawblock)
+		outsz = outsz + inLen + 8
+
+		blkCount = blkCount + 1
+
+		if (blkCount % 1000) == 0:
+			print("Wrote " + str(blkCount) + " blocks")
+
+if __name__ == '__main__':
+	if len(sys.argv) != 2:
+		print "Usage: linearize-data.py CONFIG-FILE"
+		sys.exit(1)
+
+	f = open(sys.argv[1])
+	for line in f:
+		# skip comment lines
+		m = re.search('^\s*#', line)
+		if m:
+			continue
+
+		# parse key=value lines
+		m = re.search('^(\w+)\s*=\s*(\S.*)$', line)
+		if m is None:
+			continue
+		settings[m.group(1)] = m.group(2)
+	f.close()
+
+	if 'netmagic' not in settings:
+		settings['netmagic'] = 'f9beb4d9'
+	if 'input' not in settings:
+		settings['input'] = 'input'
+	if 'hashlist' not in settings:
+		settings['hashlist'] = 'hashlist.txt'
+
+	settings['netmagic'] = settings['netmagic'].decode('hex')
+
+	if 'output_file' not in settings and 'output' not in settings:
+		print("Missing output file / directory")
+		sys.exit(1)
+
+	blkindex = get_block_hashes(settings)
+	blkset = mkblockset(blkindex)
+
+	if not "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" in blkset:
+		print("not found")
+	else:
+		copydata(settings, blkindex, blkset)
+
+
diff --git a/contrib/linearize/linearize.py b/contrib/linearize/linearize-hashes.py
old mode 100644
new mode 100755
similarity index 74%
rename from contrib/linearize/linearize.py
rename to contrib/linearize/linearize-hashes.py
index 650f7d368490..791b71bc3306
--- a/contrib/linearize/linearize.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -1,7 +1,6 @@
 #!/usr/bin/python
 #
-# linearize.py:  Construct a linear, no-fork, best version of the blockchain.
-#
+# linearize-hashes.py:  List blocks in a linear, no-fork version of the chain.
 #
 # Copyright (c) 2013 The Bitcoin developers
 # Distributed under the MIT/X11 software license, see the accompanying
@@ -15,9 +14,6 @@
 import httplib
 import sys
 
-ERR_SLEEP = 15
-MAX_NONCE = 1000000L
-
 settings = {}
 
 class BitcoinRPC:
@@ -62,34 +58,18 @@ def getblock(self, hash, verbose=True):
 	def getblockhash(self, index):
 		return self.rpc('getblockhash', [index])
 
-def getblock(rpc, settings, n):
-	hash = rpc.getblockhash(n)
-	hexdata = rpc.getblock(hash, False)
-	data = hexdata.decode('hex')
-
-	return data
-
-def get_blocks(settings):
+def get_block_hashes(settings):
 	rpc = BitcoinRPC(settings['host'], settings['port'],
 			 settings['rpcuser'], settings['rpcpassword'])
 
-	outf = open(settings['output'], 'ab')
-
 	for height in xrange(settings['min_height'], settings['max_height']+1):
-		data = getblock(rpc, settings, height)
-
-		outhdr = settings['netmagic']
-		outhdr += struct.pack("<i", len(data))
+		hash = rpc.getblockhash(height)
 
-		outf.write(outhdr)
-		outf.write(data)
-
-		if (height % 1000) == 0:
-			sys.stdout.write("Wrote block " + str(height) + "\n")
+		print(hash)
 
 if __name__ == '__main__':
 	if len(sys.argv) != 2:
-		print "Usage: linearize.py CONFIG-FILE"
+		print "Usage: linearize-hashes.py CONFIG-FILE"
 		sys.exit(1)
 
 	f = open(sys.argv[1])
@@ -106,10 +86,6 @@ def get_blocks(settings):
 		settings[m.group(1)] = m.group(2)
 	f.close()
 
-	if 'netmagic' not in settings:
-		settings['netmagic'] = 'f9beb4d9'
-	if 'output' not in settings:
-		settings['output'] = 'bootstrap.dat'
 	if 'host' not in settings:
 		settings['host'] = '127.0.0.1'
 	if 'port' not in settings:
@@ -117,16 +93,14 @@ def get_blocks(settings):
 	if 'min_height' not in settings:
 		settings['min_height'] = 0
 	if 'max_height' not in settings:
-		settings['max_height'] = 279000
+		settings['max_height'] = 313000
 	if 'rpcuser' not in settings or 'rpcpassword' not in settings:
 		print "Missing username and/or password in cfg file"
 		sys.exit(1)
 
-	settings['netmagic'] = settings['netmagic'].decode('hex')
 	settings['port'] = int(settings['port'])
 	settings['min_height'] = int(settings['min_height'])
 	settings['max_height'] = int(settings['max_height'])
 
-	get_blocks(settings)
-
+	get_block_hashes(settings)
 

From b4a72a75b4795dffbe973b0ae287343df2dac13c Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sat, 23 Aug 2014 22:59:16 -0400
Subject: [PATCH 0577/1819] contrib/linearize: split output files based on
 new-timestamp-year or max-file-size

---
 contrib/linearize/README.md             |  3 ++
 contrib/linearize/example-linearize.cfg |  1 +
 contrib/linearize/linearize-data.py     | 44 ++++++++++++++++++++-----
 3 files changed, 39 insertions(+), 9 deletions(-)

diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md
index 8d06d53b1043..b5c6e7824ed9 100644
--- a/contrib/linearize/README.md
+++ b/contrib/linearize/README.md
@@ -26,4 +26,7 @@ output.
 
 Optional config file setting for linearize-data:
 * "netmagic": network magic number
+* "max_out_sz": maximum output file size (default 1000*1000*1000)
+* "split_year": Split files when a new year is first seen, in addition to
+reaching a maximum file size.
 
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index 9c3270d65382..071345f23a0b 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -13,4 +13,5 @@ netmagic=f9beb4d9
 input=/home/example/.bitcoin/blocks
 output_file=/home/example/Downloads/bootstrap.dat
 hashlist=hashlist.txt
+split_year=1
 
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 77bae6e3c655..ea94f25faeec 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -14,8 +14,7 @@
 import httplib
 import sys
 import hashlib
-
-MAX_OUT_SZ = 128 * 1024 * 1024
+import datetime
 
 settings = {}
 
@@ -41,9 +40,7 @@ def wordreverse(in_buf):
 	out_words.reverse()
 	return ''.join(out_words)
 
-def calc_hdr_hash(rawblock):
-	blk_hdr = rawblock[:80]
-
+def calc_hdr_hash(blk_hdr):
 	hash1 = hashlib.sha256()
 	hash1.update(blk_hdr)
 	hash1_o = hash1.digest()
@@ -54,13 +51,18 @@ def calc_hdr_hash(rawblock):
 
 	return hash2_o
 
-def calc_hash_str(rawblock):
-	hash = calc_hdr_hash(rawblock)
+def calc_hash_str(blk_hdr):
+	hash = calc_hdr_hash(blk_hdr)
 	hash = bufreverse(hash)
 	hash = wordreverse(hash)
 	hash_str = hash.encode('hex')
 	return hash_str
 
+def get_blk_year(blk_hdr):
+	members = struct.unpack("<I", blk_hdr[68:68+4])
+	dt = datetime.datetime.fromtimestamp(members[0])
+	return dt.year
+
 def get_block_hashes(settings):
 	blkindex = []
 	f = open(settings['hashlist'], "r")
@@ -86,9 +88,14 @@ def copydata(settings, blkindex, blkset):
 	outF = None
 	blkCount = 0
 
+	lastYear = 0
+	splitYear = False
 	fileOutput = True
+	maxOutSz = settings['max_out_sz']
 	if 'output' in settings:
 		fileOutput = False
+	if settings['split_year'] != 0:
+		splitYear = True
 
 	while True:
 		if not inF:
@@ -111,17 +118,30 @@ def copydata(settings, blkindex, blkset):
 		su = struct.unpack("<I", inLenLE)
 		inLen = su[0]
 		rawblock = inF.read(inLen)
+		blk_hdr = rawblock[:80]
 
-		hash_str = calc_hash_str(rawblock)
+		hash_str = calc_hash_str(blk_hdr)
 		if not hash_str in blkset:
 			print("Skipping unknown block " + hash_str)
 			continue
 
-		if not fileOutput and ((outsz + inLen) > MAX_OUT_SZ):
+		if not fileOutput and ((outsz + inLen) > maxOutSz):
 			outF.close()
 			outF = None
 			outFn = outFn + 1
 			outsz = 0
+
+		if splitYear:
+			blkYear = get_blk_year(blk_hdr)
+			if blkYear > lastYear:
+				print("New year " + str(blkYear) + " @ " + hash_str)
+				lastYear = blkYear
+				if outF:
+					outF.close()
+					outF = None
+					outFn = outFn + 1
+					outsz = 0
+
 		if not outF:
 			if fileOutput:
 				fname = settings['output_file']
@@ -164,7 +184,13 @@ def copydata(settings, blkindex, blkset):
 		settings['input'] = 'input'
 	if 'hashlist' not in settings:
 		settings['hashlist'] = 'hashlist.txt'
+	if 'split_year' not in settings:
+		settings['split_year'] = 0
+	if 'max_out_sz' not in settings:
+		settings['max_out_sz'] = 1000L * 1000 * 1000
 
+	settings['max_out_sz'] = long(settings['max_out_sz'])
+	settings['split_year'] = int(settings['split_year'])
 	settings['netmagic'] = settings['netmagic'].decode('hex')
 
 	if 'output_file' not in settings and 'output' not in settings:

From 75400a2a413c082de2ba5fc2f1da9dc86fd1d924 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sun, 24 Aug 2014 01:18:24 -0400
Subject: [PATCH 0578/1819] contrib/linearize: Guarantee that output is
 generated in-order

This was typically ensured implicitly by virtue of normal bitcoind
operation.  Adding an explicit check provides a stronger guarantee, and
it is cheap to add.
---
 contrib/linearize/linearize-data.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index ea94f25faeec..2d57d245f654 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -125,6 +125,12 @@ def copydata(settings, blkindex, blkset):
 			print("Skipping unknown block " + hash_str)
 			continue
 
+		if blkindex[blkCount] != hash_str:
+			print("Out of order block.")
+			print("Expected " + blkindex[blkCount])
+			print("Got " + hash_str)
+			sys.exit(1)
+
 		if not fileOutput and ((outsz + inLen) > maxOutSz):
 			outF.close()
 			outF = None

From 8f5a423344b277fbb63eb4295ce5928e16c6dc9d Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sun, 24 Aug 2014 01:40:40 -0400
Subject: [PATCH 0579/1819] contrib/linearize: split block files based on
 year-month, not just year

---
 contrib/linearize/linearize-data.py | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 2d57d245f654..3a4c9759fe47 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -58,10 +58,11 @@ def calc_hash_str(blk_hdr):
 	hash_str = hash.encode('hex')
 	return hash_str
 
-def get_blk_year(blk_hdr):
+def get_blk_dt(blk_hdr):
 	members = struct.unpack("<I", blk_hdr[68:68+4])
 	dt = datetime.datetime.fromtimestamp(members[0])
-	return dt.year
+	dt_ym = datetime.datetime(dt.year, dt.month, 1)
+	return dt_ym
 
 def get_block_hashes(settings):
 	blkindex = []
@@ -88,14 +89,14 @@ def copydata(settings, blkindex, blkset):
 	outF = None
 	blkCount = 0
 
-	lastYear = 0
-	splitYear = False
+	lastDate = datetime.datetime(2000, 1, 1)
+	timestampSplit = False
 	fileOutput = True
 	maxOutSz = settings['max_out_sz']
 	if 'output' in settings:
 		fileOutput = False
-	if settings['split_year'] != 0:
-		splitYear = True
+	if settings['split_timestamp'] != 0:
+		timestampSplit = True
 
 	while True:
 		if not inF:
@@ -137,11 +138,11 @@ def copydata(settings, blkindex, blkset):
 			outFn = outFn + 1
 			outsz = 0
 
-		if splitYear:
-			blkYear = get_blk_year(blk_hdr)
-			if blkYear > lastYear:
-				print("New year " + str(blkYear) + " @ " + hash_str)
-				lastYear = blkYear
+		if timestampSplit:
+			blkDate = get_blk_dt(blk_hdr)
+			if blkDate > lastDate:
+				print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
+				lastDate = blkDate
 				if outF:
 					outF.close()
 					outF = None
@@ -190,13 +191,13 @@ def copydata(settings, blkindex, blkset):
 		settings['input'] = 'input'
 	if 'hashlist' not in settings:
 		settings['hashlist'] = 'hashlist.txt'
-	if 'split_year' not in settings:
-		settings['split_year'] = 0
+	if 'split_timestamp' not in settings:
+		settings['split_timestamp'] = 0
 	if 'max_out_sz' not in settings:
 		settings['max_out_sz'] = 1000L * 1000 * 1000
 
 	settings['max_out_sz'] = long(settings['max_out_sz'])
-	settings['split_year'] = int(settings['split_year'])
+	settings['split_timestamp'] = int(settings['split_timestamp'])
 	settings['netmagic'] = settings['netmagic'].decode('hex')
 
 	if 'output_file' not in settings and 'output' not in settings:

From aa41ac216eb51d61512b4cadc95c809e094215ce Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sun, 24 Aug 2014 21:16:51 -0400
Subject: [PATCH 0580/1819] Test IsPushOnly() with invalid push

---
 src/script.cpp            |  2 ++
 src/test/script_tests.cpp | 11 +++++++++++
 2 files changed, 13 insertions(+)

diff --git a/src/script.cpp b/src/script.cpp
index 942e8810db78..d6d6684f4438 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -1874,9 +1874,11 @@ bool CScript::IsPushOnly() const
     const_iterator pc = begin();
     while (pc < end())
     {
+        // Note how a script with an invalid PUSHDATA returns False.
         opcodetype opcode;
         if (!GetOp(pc, opcode))
             return false;
+
         // Note that IsPushOnly() *does* consider OP_RESERVED to be a
         // push-type opcode, however execution of OP_RESERVED fails, so
         // it's not relevant to P2SH as the scriptSig would fail prior to
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index bc9f31c07763..77c44501ab3a 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -394,4 +394,15 @@ BOOST_AUTO_TEST_CASE(script_standard_push)
     }
 }
 
+BOOST_AUTO_TEST_CASE(script_IsPushOnly_on_invalid_scripts)
+{
+    // IsPushOnly returns false when given a script containing only pushes that
+    // are invalid due to truncation. IsPushOnly() is consensus critical
+    // because P2SH evaluation uses it, although this specific behavior should
+    // not be consensus critical as the P2SH evaluation would fail first due to
+    // the invalid push. Still, it doesn't hurt to test it explicitly.
+    static const unsigned char direct[] = { 1 };
+    BOOST_CHECK(!CScript(direct, direct+sizeof(direct)).IsPushOnly());
+}
+
 BOOST_AUTO_TEST_SUITE_END()

From 9380d019a18b27c7ddb4f3956a329a516d017531 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 20 Aug 2014 13:00:00 -0400
Subject: [PATCH 0581/1819] travis: initial descriptor

---
 .travis.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..2073e71769c4
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,57 @@
+# errata:
+# - A travis bug causes caches to trample eachother when using the same
+#   compiler key (which we don't use anyway). This is worked around for now by
+#   using the phony compilers "true X". These can be removed when the travis
+#   bug is fixed. See: https://github.com/travis-ci/casher/issues/6
+
+os: linux
+language: cpp
+env:
+  global:
+    - MAKEJOBS=-j3
+    - RUN_TESTS=false
+    - CCACHE_SIZE=100M
+    - CCACHE_TEMPDIR=/tmp/.ccache-temp
+    - CCACHE_COMPRESS=1
+    - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
+cache:
+  apt: true
+  directories:
+  - depends/built
+  - $HOME/.ccache
+matrix:
+  fast_finish: true
+  include:
+    - compiler: "true 1"
+      env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG"--enable-glibc-back-compat"
+    - compiler: "true 2"
+      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+    - compiler: "true 3"
+      env: HOST=x86_64-unknown-linux-gnu RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+    - compiler: "true 4"
+      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+    - compiler: "true 6"
+      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev" GOAL="deploy"
+    - compiler: "true 7"
+      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev" GOAL="deploy"
+install:
+    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
+    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi
+before_script:
+    - unset CC; unset CXX
+    - mkdir -p depends/SDKs
+    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS || (echo "Build failure. Verbose build follows." && make -C depends V=1 HOST=$HOST $DEP_OPTS)
+script:
+    - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
+    - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
+    - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
+    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
+    - ./autogen.sh
+    - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+    - make distdir PACKAGE=bitcoin VERSION=$HOST
+    - cd bitcoin-$HOST
+    - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+    - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
+    - if [ "$RUN_TESTS" = "true" ]; then make check; fi
+after_script:
+    - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi

From 425c7a83899f7ccf5343a24319bc19e1e77363da Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 21 Aug 2014 13:11:31 -0400
Subject: [PATCH 0582/1819] travis: add doc

---
 doc/travis-ci.txt | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 doc/travis-ci.txt

diff --git a/doc/travis-ci.txt b/doc/travis-ci.txt
new file mode 100644
index 000000000000..01f7d02a86a2
--- /dev/null
+++ b/doc/travis-ci.txt
@@ -0,0 +1,39 @@
+Support for using travis-ci has been added in order to automate pull-testing.
+See https://travis-ci.org/ for more info
+
+This procedure is different than the pull-tester that came before it in a few
+ways.
+
+There is nothing to administer. This is a major feature as it means
+that builds have no local state. Because there is no ability to login to the
+builders to install packages (tools, dependencies, etc), the entire build
+procedure must instead be controlled by a declarative script (.travis.yml).
+This script declares each build configuration, creates virtual machines as
+necessary, builds, then discards the virtual machines.
+
+A build matrix is constructed to test a wide range of configurations, rather
+than a single pass/fail. This helps to catch build failures and logic errors
+that present on platforms other than the ones the author has tested. This
+matrix is defined in the build script and can be changed at any time.
+
+All builders use the dependency-generator in the depends dir, rather than
+using apt-get to install build dependencies. This guarantees that the tester
+is using the same versions as Gitian, so the build results are nearly identical
+to what would be found in a final release. However, this also means that builds
+will fail if new dependencies are introduced without being added to the
+dependency generator.
+
+In order to avoid rebuilding all dependencies for each build, the binaries are
+cached and re-used when possible. Changes in the dependency-generator will
+trigger cache-invalidation and rebuilds as necessary.
+
+These caches can be manually removed if necessary. This is one of the the very few
+manual operations that is possible with Travis, and it can be done by the
+Bitcoin Core committer via the Travis web interface.
+
+In some cases, secure strings may be needed for hiding sensitive info such as
+private keys or URLs. The travis client may be used to create these strings:
+http://docs.travis-ci.com/user/encryption-keys/
+
+For the details of the build descriptor, see the official docs:
+http://docs.travis-ci.com/user/build-configuration/

From 92bb6f2f1729192703dd49bb982c1dd4c0062fa0 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 26 Aug 2014 02:26:41 +0200
Subject: [PATCH 0583/1819] Bypass reloading blocks from disk

---
 src/main.cpp | 43 ++++++++++++++++++++++++++-----------------
 src/main.h   |  2 +-
 2 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 947494ce625b..a5c1103ef4f5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1975,15 +1975,19 @@ static int64_t nTimeFlush = 0;
 static int64_t nTimeChainState = 0;
 static int64_t nTimePostConnect = 0;
 
-// Connect a new block to chainActive.
-bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
+// Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock
+// corresponding to pindexNew, to bypass loading it again from disk.
+bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *pblock) {
     assert(pindexNew->pprev == chainActive.Tip());
     mempool.check(pcoinsTip);
     // Read block from disk.
     int64_t nTime1 = GetTimeMicros();
     CBlock block;
-    if (!ReadBlockFromDisk(block, pindexNew))
-        return state.Abort(_("Failed to read block"));
+    if (!pblock) {
+        if (!ReadBlockFromDisk(block, pindexNew))
+            return state.Abort(_("Failed to read block"));
+        pblock = &block;
+    }
     // Apply the block atomically to the chain state.
     int64_t nTime2 = GetTimeMicros(); nTimeReadFromDisk += nTime2 - nTime1;
     int64_t nTime3;
@@ -1991,7 +1995,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     {
         CCoinsViewCache view(*pcoinsTip, true);
         CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
-        if (!ConnectBlock(block, state, pindexNew, view)) {
+        if (!ConnectBlock(*pblock, state, pindexNew, view)) {
             if (state.IsInvalid())
                 InvalidBlockFound(pindexNew, state);
             return error("ConnectTip() : ConnectBlock %s failed", pindexNew->GetBlockHash().ToString());
@@ -2010,7 +2014,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
     LogPrint("bench", "  - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
     // Remove conflicting transactions from the mempool.
     list<CTransaction> txConflicted;
-    mempool.removeForBlock(block.vtx, pindexNew->nHeight, txConflicted);
+    mempool.removeForBlock(pblock->vtx, pindexNew->nHeight, txConflicted);
     mempool.check(pcoinsTip);
     // Update chainActive & related variables.
     UpdateTip(pindexNew);
@@ -2020,8 +2024,8 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew) {
         SyncWithWallets(tx, NULL);
     }
     // ... and about transactions that got confirmed:
-    BOOST_FOREACH(const CTransaction &tx, block.vtx) {
-        SyncWithWallets(tx, &block);
+    BOOST_FOREACH(const CTransaction &tx, pblock->vtx) {
+        SyncWithWallets(tx, pblock);
     }
     int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
     LogPrint("bench", "  - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
@@ -2070,7 +2074,8 @@ static CBlockIndex* FindMostWorkChain() {
 }
 
 // Try to make some progress towards making pindexMostWork the active block.
-static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork) {
+// pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
+static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork, CBlock *pblock) {
     AssertLockHeld(cs_main);
     bool fInvalidFound = false;
     const CBlockIndex *pindexOldTip = chainActive.Tip();
@@ -2085,14 +2090,15 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
     // Build list of new blocks to connect.
     std::vector<CBlockIndex*> vpindexToConnect;
     vpindexToConnect.reserve(pindexMostWork->nHeight - (pindexFork ? pindexFork->nHeight : -1));
-    while (pindexMostWork && pindexMostWork != pindexFork) {
-        vpindexToConnect.push_back(pindexMostWork);
-        pindexMostWork = pindexMostWork->pprev;
+    CBlockIndex *pindexIter = pindexMostWork;
+    while (pindexIter && pindexIter != pindexFork) {
+        vpindexToConnect.push_back(pindexIter);
+        pindexIter = pindexIter->pprev;
     }
 
     // Connect new blocks.
     BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
-        if (!ConnectTip(state, pindexConnect)) {
+        if (!ConnectTip(state, pindexConnect, pindexConnect == pindexMostWork ? pblock : NULL)) {
             if (state.IsInvalid()) {
                 // The block violates a consensus rule.
                 if (!state.CorruptionPossible())
@@ -2133,7 +2139,10 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
     return true;
 }
 
-bool ActivateBestChain(CValidationState &state) {
+// Make the best chain active, in multiple steps. The result is either failure
+// or an activated best chain. pblock is either NULL or a pointer to a block
+// that is already loaded (to avoid loading it again from disk).
+bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     CBlockIndex *pindexNewTip = NULL;
     CBlockIndex *pindexMostWork = NULL;
     do {
@@ -2148,7 +2157,7 @@ bool ActivateBestChain(CValidationState &state) {
             if (pindexMostWork == NULL || pindexMostWork == chainActive.Tip())
                 return true;
 
-            if (!ActivateBestChainStep(state, pindexMostWork))
+            if (!ActivateBestChainStep(state, pindexMostWork, pblock && pblock->GetHash() == pindexMostWork->GetBlockHash() ? pblock : NULL))
                 return false;
 
             pindexNewTip = chainActive.Tip();
@@ -2696,7 +2705,7 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
 
     }
 
-    if (!ActivateBestChain(state))
+    if (!ActivateBestChain(state, pblock))
         return error("ProcessBlock() : ActivateBestChain failed");
 
     return true;
@@ -3136,7 +3145,7 @@ bool InitBlockIndex() {
             CBlockIndex *pindex = AddToBlockIndex(block);
             if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
                 return error("LoadBlockIndex() : genesis block not accepted");
-            if (!ActivateBestChain(state))
+            if (!ActivateBestChain(state, &block))
                 return error("LoadBlockIndex() : genesis block cannot be activated");
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
diff --git a/src/main.h b/src/main.h
index 886cac1507c9..444c887204b8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -160,7 +160,7 @@ std::string GetWarnings(std::string strFor);
 /** Retrieve a transaction (from memory pool, or from disk, if possible) */
 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);
+bool ActivateBestChain(CValidationState &state, CBlock *pblock = NULL);
 int64_t GetBlockValue(int nHeight, int64_t nFees);
 
 void UpdateTime(CBlockHeader& block, const CBlockIndex* pindexPrev);

From ffb4c210bc0b78bd8cbccdb7ccb80dde918a01b0 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Sat, 19 Jul 2014 15:39:50 +0200
Subject: [PATCH 0584/1819] Mark LevelDB "Read" and "Exists" functions as
 const.

Mark the "Read" and "Exists" functions in CLevelDBWrapper as "const".
They do not change anything in the DB, by definition.
---
 src/leveldbwrapper.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 043a56bf38a4..452df92839ef 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -82,7 +82,7 @@ class CLevelDBWrapper
     CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory = false, bool fWipe = false);
     ~CLevelDBWrapper();
 
-    template<typename K, typename V> bool Read(const K& key, V& value) throw(leveldb_error) {
+    template<typename K, typename V> bool Read(const K& key, V& value) const throw(leveldb_error) {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;
@@ -111,7 +111,7 @@ class CLevelDBWrapper
         return WriteBatch(batch, fSync);
     }
 
-    template<typename K> bool Exists(const K& key) throw(leveldb_error) {
+    template<typename K> bool Exists(const K& key) const throw(leveldb_error) {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;

From a3dc587a62f5d12aea1ff8139198bf0441535c5f Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Sat, 19 Jul 2014 16:42:48 +0200
Subject: [PATCH 0585/1819] Make appropriate getter-routines "const" in
 CCoinsView.

Mark the "Get"/"Have" routines in CCoinsView and subclasses as "const".
---
 src/coins.cpp     | 44 +++++++++++++++++++++++++++-----------------
 src/coins.h       | 41 +++++++++++++++++++++++------------------
 src/txdb.cpp      | 13 ++++++++-----
 src/txdb.h        |  8 ++++----
 src/txmempool.cpp |  4 ++--
 src/txmempool.h   |  4 ++--
 6 files changed, 66 insertions(+), 48 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 6137b51c55c1..7bfb84ef3e7f 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -52,30 +52,30 @@ bool CCoins::Spend(int nPos) {
 }
 
 
-bool CCoinsView::GetCoins(const uint256 &txid, CCoins &coins) { return false; }
+bool CCoinsView::GetCoins(const uint256 &txid, CCoins &coins) const { return false; }
 bool CCoinsView::SetCoins(const uint256 &txid, const CCoins &coins) { return false; }
-bool CCoinsView::HaveCoins(const uint256 &txid) { return false; }
-uint256 CCoinsView::GetBestBlock() { return uint256(0); }
+bool CCoinsView::HaveCoins(const uint256 &txid) const { return false; }
+uint256 CCoinsView::GetBestBlock() const { return uint256(0); }
 bool CCoinsView::SetBestBlock(const uint256 &hashBlock) { return false; }
 bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
-bool CCoinsView::GetStats(CCoinsStats &stats) { return false; }
+bool CCoinsView::GetStats(CCoinsStats &stats) const { return false; }
 
 
 CCoinsViewBacked::CCoinsViewBacked(CCoinsView &viewIn) : base(&viewIn) { }
-bool CCoinsViewBacked::GetCoins(const uint256 &txid, CCoins &coins) { return base->GetCoins(txid, coins); }
+bool CCoinsViewBacked::GetCoins(const uint256 &txid, CCoins &coins) const { return base->GetCoins(txid, coins); }
 bool CCoinsViewBacked::SetCoins(const uint256 &txid, const CCoins &coins) { return base->SetCoins(txid, coins); }
-bool CCoinsViewBacked::HaveCoins(const uint256 &txid) { return base->HaveCoins(txid); }
-uint256 CCoinsViewBacked::GetBestBlock() { return base->GetBestBlock(); }
+bool CCoinsViewBacked::HaveCoins(const uint256 &txid) const { return base->HaveCoins(txid); }
+uint256 CCoinsViewBacked::GetBestBlock() const { return base->GetBestBlock(); }
 bool CCoinsViewBacked::SetBestBlock(const uint256 &hashBlock) { return base->SetBestBlock(hashBlock); }
 void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
 bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
-bool CCoinsViewBacked::GetStats(CCoinsStats &stats) { return base->GetStats(stats); }
+bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStats(stats); }
 
 CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
 
 CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hashBlock(0) { }
 
-bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) {
+bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
     if (cacheCoins.count(txid)) {
         coins = cacheCoins[txid];
         return true;
@@ -99,19 +99,29 @@ CCoinsMap::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
     return ret;
 }
 
+CCoinsMap::const_iterator CCoinsViewCache::FetchCoins(const uint256 &txid) const {
+    /* Avoid redundant implementation with the const-cast.  */
+    return const_cast<CCoinsViewCache*>(this)->FetchCoins(txid);
+}
+
 CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) {
     CCoinsMap::iterator it = FetchCoins(txid);
     assert(it != cacheCoins.end());
     return it->second;
 }
 
+const CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) const {
+    /* Avoid redundant implementation with the const-cast.  */
+    return const_cast<CCoinsViewCache*>(this)->GetCoins(txid);
+}
+
 bool CCoinsViewCache::SetCoins(const uint256 &txid, const CCoins &coins) {
     cacheCoins[txid] = coins;
     return true;
 }
 
-bool CCoinsViewCache::HaveCoins(const uint256 &txid) {
-    CCoinsMap::iterator it = FetchCoins(txid);
+bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
+    CCoinsMap::const_iterator it = FetchCoins(txid);
     // We're using vtx.empty() instead of IsPruned here for performance reasons,
     // as we only care about the case where an transaction was replaced entirely
     // in a reorganization (which wipes vout entirely, as opposed to spending
@@ -119,7 +129,7 @@ bool CCoinsViewCache::HaveCoins(const uint256 &txid) {
     return (it != cacheCoins.end() && !it->second.vout.empty());
 }
 
-uint256 CCoinsViewCache::GetBestBlock() {
+uint256 CCoinsViewCache::GetBestBlock() const {
     if (hashBlock == uint256(0))
         hashBlock = base->GetBestBlock();
     return hashBlock;
@@ -146,18 +156,18 @@ bool CCoinsViewCache::Flush() {
     return fOk;
 }
 
-unsigned int CCoinsViewCache::GetCacheSize() {
+unsigned int CCoinsViewCache::GetCacheSize() const {
     return cacheCoins.size();
 }
 
-const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input)
+const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input) const
 {
     const CCoins &coins = GetCoins(input.prevout.hash);
     assert(coins.IsAvailable(input.prevout.n));
     return coins.vout[input.prevout.n];
 }
 
-int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx)
+int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx) const
 {
     if (tx.IsCoinBase())
         return 0;
@@ -169,7 +179,7 @@ int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx)
     return nResult;
 }
 
-bool CCoinsViewCache::HaveInputs(const CTransaction& tx)
+bool CCoinsViewCache::HaveInputs(const CTransaction& tx) const
 {
     if (!tx.IsCoinBase()) {
         // first check whether information about the prevout hash is available
@@ -190,7 +200,7 @@ bool CCoinsViewCache::HaveInputs(const CTransaction& tx)
     return true;
 }
 
-double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight)
+double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
 {
     if (tx.IsCoinBase())
         return 0.0;
diff --git a/src/coins.h b/src/coins.h
index 2b657299e3af..08913531d81e 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -276,17 +276,17 @@ class CCoinsView
 {
 public:
     // Retrieve the CCoins (unspent transaction outputs) for a given txid
-    virtual bool GetCoins(const uint256 &txid, CCoins &coins);
+    virtual bool GetCoins(const uint256 &txid, CCoins &coins) const;
 
     // Modify the CCoins for a given txid
     virtual bool SetCoins(const uint256 &txid, const CCoins &coins);
 
     // Just check whether we have data for a given txid.
     // This may (but cannot always) return true for fully spent transactions
-    virtual bool HaveCoins(const uint256 &txid);
+    virtual bool HaveCoins(const uint256 &txid) const;
 
     // Retrieve the block hash whose state this CCoinsView currently represents
-    virtual uint256 GetBestBlock();
+    virtual uint256 GetBestBlock() const;
 
     // Modify the currently active block hash
     virtual bool SetBestBlock(const uint256 &hashBlock);
@@ -296,7 +296,7 @@ class CCoinsView
     virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Calculate statistics about the unspent transaction output set
-    virtual bool GetStats(CCoinsStats &stats);
+    virtual bool GetStats(CCoinsStats &stats) const;
 
     // As we use CCoinsViews polymorphically, have a virtual destructor
     virtual ~CCoinsView() {}
@@ -311,14 +311,14 @@ class CCoinsViewBacked : public CCoinsView
 
 public:
     CCoinsViewBacked(CCoinsView &viewIn);
-    bool GetCoins(const uint256 &txid, CCoins &coins);
+    bool GetCoins(const uint256 &txid, CCoins &coins) const;
     bool SetCoins(const uint256 &txid, const CCoins &coins);
-    bool HaveCoins(const uint256 &txid);
-    uint256 GetBestBlock();
+    bool HaveCoins(const uint256 &txid) const;
+    uint256 GetBestBlock() const;
     bool SetBestBlock(const uint256 &hashBlock);
     void SetBackend(CCoinsView &viewIn);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
-    bool GetStats(CCoinsStats &stats);
+    bool GetStats(CCoinsStats &stats) const;
 };
 
 
@@ -326,17 +326,20 @@ class CCoinsViewBacked : public CCoinsView
 class CCoinsViewCache : public CCoinsViewBacked
 {
 protected:
-    uint256 hashBlock;
-    CCoinsMap cacheCoins;
+
+    /* Make mutable so that we can "fill the cache" even from Get-methods
+       declared as "const".  */
+    mutable uint256 hashBlock;
+    mutable CCoinsMap cacheCoins;
 
 public:
     CCoinsViewCache(CCoinsView &baseIn, bool fDummy = false);
 
     // Standard CCoinsView methods
-    bool GetCoins(const uint256 &txid, CCoins &coins);
+    bool GetCoins(const uint256 &txid, CCoins &coins) const;
     bool SetCoins(const uint256 &txid, const CCoins &coins);
-    bool HaveCoins(const uint256 &txid);
-    uint256 GetBestBlock();
+    bool HaveCoins(const uint256 &txid) const;
+    uint256 GetBestBlock() const;
     bool SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
@@ -344,6 +347,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     // Many methods explicitly require a CCoinsViewCache because of this method, to reduce
     // copying.
     CCoins &GetCoins(const uint256 &txid);
+    const CCoins &GetCoins(const uint256 &txid) const;
 
     // Push the modifications applied to this cache to its base.
     // Failure to call this method before destruction will cause the changes to be forgotten.
@@ -351,7 +355,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     bool Flush();
 
     // Calculate the size of the cache (in number of transactions)
-    unsigned int GetCacheSize();
+    unsigned int GetCacheSize() const;
 
     /** Amount of bitcoins coming in to a transaction
         Note that lightweight clients may not know anything besides the hash of previous transactions,
@@ -360,18 +364,19 @@ class CCoinsViewCache : public CCoinsViewBacked
         @param[in] tx	transaction for which we are checking input total
         @return	Sum of value of all inputs (scriptSigs)
      */
-    int64_t GetValueIn(const CTransaction& tx);
+    int64_t GetValueIn(const CTransaction& tx) const;
 
     // Check whether all prevouts of the transaction are present in the UTXO set represented by this view
-    bool HaveInputs(const CTransaction& tx);
+    bool HaveInputs(const CTransaction& tx) const;
 
     // Return priority of tx at height nHeight
-    double GetPriority(const CTransaction &tx, int nHeight);
+    double GetPriority(const CTransaction &tx, int nHeight) const;
 
-    const CTxOut &GetOutputFor(const CTxIn& input);
+    const CTxOut &GetOutputFor(const CTxIn& input) const;
 
 private:
     CCoinsMap::iterator FetchCoins(const uint256 &txid);
+    CCoinsMap::const_iterator FetchCoins(const uint256 &txid) const;
 };
 
 #endif
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 7c0683aaf3d4..2349514deff6 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -27,7 +27,7 @@ void static BatchWriteHashBestChain(CLevelDBBatch &batch, const uint256 &hash) {
 CCoinsViewDB::CCoinsViewDB(size_t nCacheSize, bool fMemory, bool fWipe) : db(GetDataDir() / "chainstate", nCacheSize, fMemory, fWipe) {
 }
 
-bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) {
+bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) const {
     return db.Read(make_pair('c', txid), coins);
 }
 
@@ -37,11 +37,11 @@ bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
     return db.WriteBatch(batch);
 }
 
-bool CCoinsViewDB::HaveCoins(const uint256 &txid) {
+bool CCoinsViewDB::HaveCoins(const uint256 &txid) const {
     return db.Exists(make_pair('c', txid));
 }
 
-uint256 CCoinsViewDB::GetBestBlock() {
+uint256 CCoinsViewDB::GetBestBlock() const {
     uint256 hashBestChain;
     if (!db.Read('B', hashBestChain))
         return uint256(0);
@@ -105,8 +105,11 @@ bool CBlockTreeDB::ReadLastBlockFile(int &nFile) {
     return Read('l', nFile);
 }
 
-bool CCoinsViewDB::GetStats(CCoinsStats &stats) {
-    boost::scoped_ptr<leveldb::Iterator> pcursor(db.NewIterator());
+bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
+    /* It seems that there are no "const iterators" for LevelDB.  Since we
+       only need read operations on it, use a const-cast to get around
+       that restriction.  */
+    leveldb::Iterator *pcursor = const_cast<CLevelDBWrapper*>(&db)->NewIterator();
     pcursor->SeekToFirst();
 
     CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
diff --git a/src/txdb.h b/src/txdb.h
index 099f1517768c..f0b6b9e1dde6 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -32,13 +32,13 @@ class CCoinsViewDB : public CCoinsView
 public:
     CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
 
-    bool GetCoins(const uint256 &txid, CCoins &coins);
+    bool GetCoins(const uint256 &txid, CCoins &coins) const;
     bool SetCoins(const uint256 &txid, const CCoins &coins);
-    bool HaveCoins(const uint256 &txid);
-    uint256 GetBestBlock();
+    bool HaveCoins(const uint256 &txid) const;
+    uint256 GetBestBlock() const;
     bool SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
-    bool GetStats(CCoinsStats &stats);
+    bool GetStats(CCoinsStats &stats) const;
 };
 
 /** Access to the block database (blocks/index/) */
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 80cae6824480..3845a35b37f9 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -625,7 +625,7 @@ void CTxMemPool::ClearPrioritisation(const uint256 hash)
 
 CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
 
-bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) {
+bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const {
     // If an entry in the mempool exists, always return that one, as it's guaranteed to never
     // conflict with the underlying cache, and it cannot have pruned entries (as it contains full)
     // transactions. First checking the underlying cache risks returning a pruned entry instead.
@@ -637,7 +637,7 @@ bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) {
     return (base->GetCoins(txid, coins) && !coins.IsPruned());
 }
 
-bool CCoinsViewMemPool::HaveCoins(const uint256 &txid) {
+bool CCoinsViewMemPool::HaveCoins(const uint256 &txid) const {
     return mempool.exists(txid) || base->HaveCoins(txid);
 }
 
diff --git a/src/txmempool.h b/src/txmempool.h
index 2577397bce7b..074c355077e6 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -143,8 +143,8 @@ class CCoinsViewMemPool : public CCoinsViewBacked
 
 public:
     CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn);
-    bool GetCoins(const uint256 &txid, CCoins &coins);
-    bool HaveCoins(const uint256 &txid);
+    bool GetCoins(const uint256 &txid, CCoins &coins) const;
+    bool HaveCoins(const uint256 &txid) const;
 };
 
 #endif /* BITCOIN_TXMEMPOOL_H */

From d0867acb0e07ac63f03dcc555387f24322e8799e Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Sat, 19 Jul 2014 17:14:23 +0200
Subject: [PATCH 0586/1819] Use const CCoinsView's at some places.

At some places where it is possible (e. g., CheckInputs), use a const
version of CCoinsView instead of a non-const one.
---
 src/main.cpp      | 6 +++---
 src/main.h        | 6 +++---
 src/txmempool.cpp | 4 ++--
 src/txmempool.h   | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 947494ce625b..1c9b3f861be0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -644,7 +644,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
 // 2. P2SH scripts with a crazy number of expensive
 //    CHECKSIG/CHECKMULTISIG operations
 //
-bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs)
+bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
 {
     if (tx.IsCoinBase())
         return true; // Coinbases don't use vin normally
@@ -717,7 +717,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx)
     return nSigOps;
 }
 
-unsigned int GetP2SHSigOpCount(const CTransaction& tx, CCoinsViewCache& inputs)
+unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs)
 {
     if (tx.IsCoinBase())
         return 0;
@@ -1470,7 +1470,7 @@ bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned in
     return CScriptCheck(txFrom, txTo, nIn, flags, nHashType)();
 }
 
-bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
+bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
 {
     if (!tx.IsCoinBase())
     {
diff --git a/src/main.h b/src/main.h
index 886cac1507c9..f93b78d8e501 100644
--- a/src/main.h
+++ b/src/main.h
@@ -265,7 +265,7 @@ int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowF
     @param[in] mapInputs    Map of previous transactions that have outputs we're spending
     @return True if all inputs (scriptSigs) use only standard transaction forms
 */
-bool AreInputsStandard(const CTransaction& tx, CCoinsViewCache& mapInputs);
+bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
 
 /** Count ECDSA signature operations the old-fashioned (pre-0.6) way
     @return number of sigops this transaction's outputs will produce when spent
@@ -279,13 +279,13 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx);
     @return maximum number of sigops required to validate this transaction's inputs
     @see CTransaction::FetchInputs
  */
-unsigned int GetP2SHSigOpCount(const CTransaction& tx, CCoinsViewCache& mapInputs);
+unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& mapInputs);
 
 
 // Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
 // This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
 // instead of being performed inline.
-bool CheckInputs(const CTransaction& tx, CValidationState &state, CCoinsViewCache &view, bool fScriptChecks = true,
+bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks = true,
                  unsigned int flags = STANDARD_SCRIPT_VERIFY_FLAGS,
                  std::vector<CScriptCheck> *pvChecks = NULL);
 
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 3845a35b37f9..f75e2212d55a 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -484,7 +484,7 @@ void CTxMemPool::clear()
     ++nTransactionsUpdated;
 }
 
-void CTxMemPool::check(CCoinsViewCache *pcoins) const
+void CTxMemPool::check(const CCoinsViewCache *pcoins) const
 {
     if (!fSanityCheck)
         return;
@@ -505,7 +505,7 @@ void CTxMemPool::check(CCoinsViewCache *pcoins) const
                 const CTransaction& tx2 = it2->second.GetTx();
                 assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
             } else {
-                CCoins &coins = pcoins->GetCoins(txin.prevout.hash);
+                const CCoins &coins = pcoins->GetCoins(txin.prevout.hash);
                 assert(coins.IsAvailable(txin.prevout.n));
             }
             // Check whether its inputs are marked in mapNextTx.
diff --git a/src/txmempool.h b/src/txmempool.h
index 074c355077e6..d95c4d970b2b 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -85,7 +85,7 @@ class CTxMemPool
      * all inputs are in the mapNextTx array). If sanity-checking is turned off,
      * check does nothing.
      */
-    void check(CCoinsViewCache *pcoins) const;
+    void check(const CCoinsViewCache *pcoins) const;
     void setSanityCheck(bool _fSanityCheck) { fSanityCheck = _fSanityCheck; }
 
     bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry);

From d1e26d4e71460ffd50c3190385c759b48ab343e9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 13:53:42 +0200
Subject: [PATCH 0587/1819] Move CMedianFilter to timedata.cpp

Now that we no longer use the median filter to keep track of
the number of blocks of peers, that's the only place it is used.
---
 src/Makefile.test.include   |  1 +
 src/test/timedata_tests.cpp | 38 ++++++++++++++++++++++++
 src/test/util_tests.cpp     | 25 ----------------
 src/timedata.h              | 59 +++++++++++++++++++++++++++++++++++++
 src/util.h                  | 56 -----------------------------------
 5 files changed, 98 insertions(+), 81 deletions(-)
 create mode 100644 src/test/timedata_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index cc407f679f14..b4360831bb5f 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -61,6 +61,7 @@ BITCOIN_TESTS =\
   test/sigopcount_tests.cpp \
   test/skiplist_tests.cpp \
   test/test_bitcoin.cpp \
+  test/timedata_tests.cpp \
   test/transaction_tests.cpp \
   test/uint256_tests.cpp \
   test/univalue_tests.cpp \
diff --git a/src/test/timedata_tests.cpp b/src/test/timedata_tests.cpp
new file mode 100644
index 000000000000..aa4fa0d500e8
--- /dev/null
+++ b/src/test/timedata_tests.cpp
@@ -0,0 +1,38 @@
+// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+//
+#include "timedata.h"
+
+#include <boost/test/unit_test.hpp>
+
+using namespace std;
+
+BOOST_AUTO_TEST_SUITE(timedata_tests)
+
+BOOST_AUTO_TEST_CASE(util_MedianFilter)
+{
+    CMedianFilter<int> filter(5, 15);
+
+    BOOST_CHECK_EQUAL(filter.median(), 15);
+
+    filter.input(20); // [15 20]
+    BOOST_CHECK_EQUAL(filter.median(), 17);
+
+    filter.input(30); // [15 20 30]
+    BOOST_CHECK_EQUAL(filter.median(), 20);
+
+    filter.input(3); // [3 15 20 30]
+    BOOST_CHECK_EQUAL(filter.median(), 17);
+
+    filter.input(7); // [3 7 15 20 30]
+    BOOST_CHECK_EQUAL(filter.median(), 15);
+
+    filter.input(18); // [3 7 18 20 30]
+    BOOST_CHECK_EQUAL(filter.median(), 18);
+
+    filter.input(0); // [0 3 7 18 30]
+    BOOST_CHECK_EQUAL(filter.median(), 7);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 068b9f29c811..31fcd3e92a4f 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -36,31 +36,6 @@ BOOST_AUTO_TEST_CASE(util_criticalsection)
     } while(0);
 }
 
-BOOST_AUTO_TEST_CASE(util_MedianFilter)
-{
-    CMedianFilter<int> filter(5, 15);
-
-    BOOST_CHECK_EQUAL(filter.median(), 15);
-
-    filter.input(20); // [15 20]
-    BOOST_CHECK_EQUAL(filter.median(), 17);
-
-    filter.input(30); // [15 20 30]
-    BOOST_CHECK_EQUAL(filter.median(), 20);
-
-    filter.input(3); // [3 15 20 30]
-    BOOST_CHECK_EQUAL(filter.median(), 17);
-
-    filter.input(7); // [3 7 15 20 30]
-    BOOST_CHECK_EQUAL(filter.median(), 15);
-
-    filter.input(18); // [3 7 18 20 30]
-    BOOST_CHECK_EQUAL(filter.median(), 18);
-
-    filter.input(0); // [0 3 7 18 30]
-    BOOST_CHECK_EQUAL(filter.median(), 7);
-}
-
 static const unsigned char ParseHex_expected[65] = {
     0x04, 0x67, 0x8a, 0xfd, 0xb0, 0xfe, 0x55, 0x48, 0x27, 0x19, 0x67, 0xf1, 0xa6, 0x71, 0x30, 0xb7,
     0x10, 0x5c, 0xd6, 0xa8, 0x28, 0xe0, 0x39, 0x09, 0xa6, 0x79, 0x62, 0xe0, 0xea, 0x1f, 0x61, 0xde,
diff --git a/src/timedata.h b/src/timedata.h
index 0e7bdc2c1f06..d0c84b3183b1 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -6,9 +6,68 @@
 #define BITCOIN_TIMEDATA_H
 
 #include <stdint.h>
+#include <vector>
+#include <algorithm>
+#include <assert.h>
 
 class CNetAddr;
 
+/** Median filter over a stream of values.
+ * Returns the median of the last N numbers
+ */
+template <typename T> class CMedianFilter
+{
+private:
+    std::vector<T> vValues;
+    std::vector<T> vSorted;
+    unsigned int nSize;
+public:
+    CMedianFilter(unsigned int size, T initial_value):
+        nSize(size)
+    {
+        vValues.reserve(size);
+        vValues.push_back(initial_value);
+        vSorted = vValues;
+    }
+
+    void input(T value)
+    {
+        if(vValues.size() == nSize)
+        {
+            vValues.erase(vValues.begin());
+        }
+        vValues.push_back(value);
+
+        vSorted.resize(vValues.size());
+        std::copy(vValues.begin(), vValues.end(), vSorted.begin());
+        std::sort(vSorted.begin(), vSorted.end());
+    }
+
+    T median() const
+    {
+        int size = vSorted.size();
+        assert(size>0);
+        if(size & 1) // Odd number of elements
+        {
+            return vSorted[size/2];
+        }
+        else // Even number of elements
+        {
+            return (vSorted[size/2-1] + vSorted[size/2]) / 2;
+        }
+    }
+
+    int size() const
+    {
+        return vValues.size();
+    }
+
+    std::vector<T> sorted () const
+    {
+        return vSorted;
+    }
+};
+
 /* Functions to keep track of adjusted P2P time */
 int64_t GetTimeOffset();
 int64_t GetAdjustedTime();
diff --git a/src/util.h b/src/util.h
index 1fb42a7b7ee9..e813c86804cd 100644
--- a/src/util.h
+++ b/src/util.h
@@ -356,62 +356,6 @@ bool TimingResistantEqual(const T& a, const T& b)
     return accumulator == 0;
 }
 
-/** Median filter over a stream of values.
- * Returns the median of the last N numbers
- */
-template <typename T> class CMedianFilter
-{
-private:
-    std::vector<T> vValues;
-    std::vector<T> vSorted;
-    unsigned int nSize;
-public:
-    CMedianFilter(unsigned int size, T initial_value):
-        nSize(size)
-    {
-        vValues.reserve(size);
-        vValues.push_back(initial_value);
-        vSorted = vValues;
-    }
-
-    void input(T value)
-    {
-        if(vValues.size() == nSize)
-        {
-            vValues.erase(vValues.begin());
-        }
-        vValues.push_back(value);
-
-        vSorted.resize(vValues.size());
-        std::copy(vValues.begin(), vValues.end(), vSorted.begin());
-        std::sort(vSorted.begin(), vSorted.end());
-    }
-
-    T median() const
-    {
-        int size = vSorted.size();
-        assert(size>0);
-        if(size & 1) // Odd number of elements
-        {
-            return vSorted[size/2];
-        }
-        else // Even number of elements
-        {
-            return (vSorted[size/2-1] + vSorted[size/2]) / 2;
-        }
-    }
-
-    int size() const
-    {
-        return vValues.size();
-    }
-
-    std::vector<T> sorted () const
-    {
-        return vSorted;
-    }
-};
-
 #ifdef WIN32
 inline void SetThreadPriority(int nPriority)
 {

From 121d6ad9dbedd6a13b12d75a4c48505797d8de9d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 16:32:14 +0200
Subject: [PATCH 0588/1819] Remove unused `alignup` function from util.h

---
 src/util.h | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/util.h b/src/util.h
index e813c86804cd..10fc5dd58e69 100644
--- a/src/util.h
+++ b/src/util.h
@@ -46,20 +46,6 @@ static const int64_t CENT = 1000000;
 // This is needed because the foreach macro can't get over the comma in pair<t1, t2>
 #define PAIRTYPE(t1, t2)    std::pair<t1, t2>
 
-// Align by increasing pointer, must have extra space at end of buffer
-template <size_t nBytes, typename T>
-T* alignup(T* p)
-{
-    union
-    {
-        T* ptr;
-        size_t n;
-    } u;
-    u.ptr = p;
-    u.n = (u.n + (nBytes-1)) & ~(nBytes-1);
-    return u.ptr;
-}
-
 #ifdef WIN32
 #define MSG_DONTWAIT        0
 

From f780e65ac632d2cad51d00c2b4a93248a5df91a6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 16:59:00 +0200
Subject: [PATCH 0589/1819] Remove unused function `ByteReverse` from util.h

---
 src/util.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/util.h b/src/util.h
index 10fc5dd58e69..785d4056e748 100644
--- a/src/util.h
+++ b/src/util.h
@@ -372,12 +372,6 @@ inline void SetThreadPriority(int nPriority)
 
 void RenameThread(const char* name);
 
-inline uint32_t ByteReverse(uint32_t value)
-{
-    value = ((value & 0xFF00FF00) >> 8) | ((value & 0x00FF00FF) << 8);
-    return (value<<16) | (value>>16);
-}
-
 // Standard wrapper for do-something-forever thread functions.
 // "Forever" really means until the thread is interrupted.
 // Use it like:

From 610a8c075958aa95b97f62a7ab020a543694c23d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 17:43:56 +0200
Subject: [PATCH 0590/1819] Move SetThreadPriority implementation to util.cpp
 instead of the header

Put the THREAD_* and PRIO_ constants in compat.h.
---
 src/compat.h | 11 +++++++++++
 src/util.cpp | 13 +++++++++++++
 src/util.h   | 29 +----------------------------
 3 files changed, 25 insertions(+), 28 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 52c7817130fb..3f0a8b6158c1 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -59,4 +59,15 @@ typedef u_int SOCKET;
 #define SOCKET_ERROR        -1
 #endif
 
+#ifndef WIN32
+// PRIO_MAX is not defined on Solaris
+#ifndef PRIO_MAX
+#define PRIO_MAX 20
+#endif
+#define THREAD_PRIORITY_LOWEST          PRIO_MAX
+#define THREAD_PRIORITY_BELOW_NORMAL    2
+#define THREAD_PRIORITY_NORMAL          0
+#define THREAD_PRIORITY_ABOVE_NORMAL    (-2)
+#endif
+
 #endif // _BITCOIN_COMPAT_H
diff --git a/src/util.cpp b/src/util.cpp
index ae2145a3a0b0..606f5a60f95a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1286,3 +1286,16 @@ std::string FormatParagraph(const std::string in, size_t width, size_t indent)
     }
     return out.str();
 }
+
+void SetThreadPriority(int nPriority)
+{
+#ifdef WIN32
+    SetThreadPriority(GetCurrentThread(), nPriority);
+#else // WIN32
+#ifdef PRIO_THREAD
+    setpriority(PRIO_THREAD, 0, nPriority);
+#else // PRIO_THREAD
+    setpriority(PRIO_PROCESS, 0, nPriority);
+#endif // PRIO_THREAD
+#endif // WIN32
+}
diff --git a/src/util.h b/src/util.h
index 785d4056e748..939e59c30133 100644
--- a/src/util.h
+++ b/src/util.h
@@ -342,34 +342,7 @@ bool TimingResistantEqual(const T& a, const T& b)
     return accumulator == 0;
 }
 
-#ifdef WIN32
-inline void SetThreadPriority(int nPriority)
-{
-    SetThreadPriority(GetCurrentThread(), nPriority);
-}
-#else
-
-// PRIO_MAX is not defined on Solaris
-#ifndef PRIO_MAX
-#define PRIO_MAX 20
-#endif
-#define THREAD_PRIORITY_LOWEST          PRIO_MAX
-#define THREAD_PRIORITY_BELOW_NORMAL    2
-#define THREAD_PRIORITY_NORMAL          0
-#define THREAD_PRIORITY_ABOVE_NORMAL    (-2)
-
-inline void SetThreadPriority(int nPriority)
-{
-    // It's unclear if it's even possible to change thread priorities on Linux,
-    // but we really and truly need it for the generation threads.
-#ifdef PRIO_THREAD
-    setpriority(PRIO_THREAD, 0, nPriority);
-#else
-    setpriority(PRIO_PROCESS, 0, nPriority);
-#endif
-}
-#endif
-
+void SetThreadPriority(int nPriority);
 void RenameThread(const char* name);
 
 // Standard wrapper for do-something-forever thread functions.

From 651480c8e453e7df9d735f684e6a3e368c777ac0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 21 Aug 2014 05:17:21 +0200
Subject: [PATCH 0591/1819] move functions in main and net to implementation
 files

---
 src/main.cpp |  61 ++++++++++++++++++++
 src/main.h   |  64 +--------------------
 src/net.cpp  | 154 +++++++++++++++++++++++++++++++++++++++++++++++++
 src/net.h    | 158 +++------------------------------------------------
 4 files changed, 226 insertions(+), 211 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 947494ce625b..d9f897f44771 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4655,7 +4655,68 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
 }
 
 
+bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
+{
+    // Open history file to append
+    CAutoFile fileout = CAutoFile(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
+    if (!fileout)
+        return error("CBlockUndo::WriteToDisk : OpenUndoFile failed");
+
+    // Write index header
+    unsigned int nSize = fileout.GetSerializeSize(*this);
+    fileout << FLATDATA(Params().MessageStart()) << nSize;
+
+    // Write undo data
+    long fileOutPos = ftell(fileout);
+    if (fileOutPos < 0)
+        return error("CBlockUndo::WriteToDisk : ftell failed");
+    pos.nPos = (unsigned int)fileOutPos;
+    fileout << *this;
+
+    // calculate & write checksum
+    CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION);
+    hasher << hashBlock;
+    hasher << *this;
+    fileout << hasher.GetHash();
+
+    // Flush stdio buffers and commit to disk before returning
+    fflush(fileout);
+    if (!IsInitialBlockDownload())
+        FileCommit(fileout);
+
+    return true;
+}
+
+bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock)
+{
+    // Open history file to read
+    CAutoFile filein = CAutoFile(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION);
+    if (!filein)
+        return error("CBlockUndo::ReadFromDisk : OpenBlockFile failed");
+
+    // Read block
+    uint256 hashChecksum;
+    try {
+        filein >> *this;
+        filein >> hashChecksum;
+    }
+    catch (std::exception &e) {
+        return error("%s : Deserialize or I/O error - %s", __func__, e.what());
+    }
+
+    // Verify checksum
+    CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION);
+    hasher << hashBlock;
+    hasher << *this;
+    if (hashChecksum != hasher.GetHash())
+        return error("CBlockUndo::ReadFromDisk : Checksum mismatch");
+
+    return true;
+}
 
+ std::string CBlockFileInfo::ToString() const {
+     return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst).c_str(), DateTimeStrFormat("%Y-%m-%d", nTimeLast).c_str());
+ }
 
 
 
diff --git a/src/main.h b/src/main.h
index 886cac1507c9..0db631f6d62f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -312,64 +312,8 @@ class CBlockUndo
         READWRITE(vtxundo);
     )
 
-    bool WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
-    {
-        // Open history file to append
-        CAutoFile fileout = CAutoFile(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
-        if (!fileout)
-            return error("CBlockUndo::WriteToDisk : OpenUndoFile failed");
-
-        // Write index header
-        unsigned int nSize = fileout.GetSerializeSize(*this);
-        fileout << FLATDATA(Params().MessageStart()) << nSize;
-
-        // Write undo data
-        long fileOutPos = ftell(fileout);
-        if (fileOutPos < 0)
-            return error("CBlockUndo::WriteToDisk : ftell failed");
-        pos.nPos = (unsigned int)fileOutPos;
-        fileout << *this;
-
-        // calculate & write checksum
-        CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION);
-        hasher << hashBlock;
-        hasher << *this;
-        fileout << hasher.GetHash();
-
-        // Flush stdio buffers and commit to disk before returning
-        fflush(fileout);
-        if (!IsInitialBlockDownload())
-            FileCommit(fileout);
-
-        return true;
-    }
-
-    bool ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock)
-    {
-        // Open history file to read
-        CAutoFile filein = CAutoFile(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION);
-        if (!filein)
-            return error("CBlockUndo::ReadFromDisk : OpenBlockFile failed");
-
-        // Read block
-        uint256 hashChecksum;
-        try {
-            filein >> *this;
-            filein >> hashChecksum;
-        }
-        catch (std::exception &e) {
-            return error("%s : Deserialize or I/O error - %s", __func__, e.what());
-        }
-
-        // Verify checksum
-        CHashWriter hasher(SER_GETHASH, PROTOCOL_VERSION);
-        hasher << hashBlock;
-        hasher << *this;
-        if (hashChecksum != hasher.GetHash())
-            return error("CBlockUndo::ReadFromDisk : Checksum mismatch");
-
-        return true;
-    }
+    bool WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock);
+    bool ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock);
 };
 
 
@@ -625,9 +569,7 @@ class CBlockFileInfo
          SetNull();
      }
 
-     std::string ToString() const {
-         return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst).c_str(), DateTimeStrFormat("%Y-%m-%d", nTimeLast).c_str());
-     }
+     std::string ToString() const;
 
      // update statistics (does not update nSize)
      void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn) {
diff --git a/src/net.cpp b/src/net.cpp
index cae9b70da71a..440c271a5e9f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2037,3 +2037,157 @@ bool CAddrDB::Read(CAddrMan& addr)
 
     return true;
 }
+
+unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); }
+unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); }
+
+CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fInboundIn) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), setAddrKnown(5000)
+{
+    nServices = 0;
+    hSocket = hSocketIn;
+    nRecvVersion = INIT_PROTO_VERSION;
+    nLastSend = 0;
+    nLastRecv = 0;
+    nSendBytes = 0;
+    nRecvBytes = 0;
+    nTimeConnected = GetTime();
+    addr = addrIn;
+    addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
+    nVersion = 0;
+    strSubVer = "";
+    fWhitelisted = false;
+    fOneShot = false;
+    fClient = false; // set by version message
+    fInbound = fInboundIn;
+    fNetworkNode = false;
+    fSuccessfullyConnected = false;
+    fDisconnect = false;
+    nRefCount = 0;
+    nSendSize = 0;
+    nSendOffset = 0;
+    hashContinue = 0;
+    pindexLastGetBlocksBegin = 0;
+    hashLastGetBlocksEnd = 0;
+    nStartingHeight = -1;
+    fStartSync = false;
+    fGetAddr = false;
+    fRelayTxes = false;
+    setInventoryKnown.max_size(SendBufferSize() / 1000);
+    pfilter = new CBloomFilter();
+    nPingNonceSent = 0;
+    nPingUsecStart = 0;
+    nPingUsecTime = 0;
+    fPingQueued = false;
+
+    {
+        LOCK(cs_nLastNodeId);
+        id = nLastNodeId++;
+    }
+
+    if (fLogIPs)
+        LogPrint("net", "Added connection to %s peer=%d\n", addrName, id);
+    else
+        LogPrint("net", "Added connection peer=%d\n", id);
+
+    // Be shy and don't send version until we hear
+    if (hSocket != INVALID_SOCKET && !fInbound)
+        PushVersion();
+
+    GetNodeSignals().InitializeNode(GetId(), this);
+}
+
+CNode::~CNode()
+{
+    CloseSocket(hSocket);
+
+    if (pfilter)
+        delete pfilter;
+
+    GetNodeSignals().FinalizeNode(GetId());
+}
+
+void CNode::AskFor(const CInv& inv)
+{
+    // We're using mapAskFor as a priority queue,
+    // the key is the earliest time the request can be sent
+    int64_t nRequestTime;
+    limitedmap<CInv, int64_t>::const_iterator it = mapAlreadyAskedFor.find(inv);
+    if (it != mapAlreadyAskedFor.end())
+        nRequestTime = it->second;
+    else
+        nRequestTime = 0;
+    LogPrint("net", "askfor %s  %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str(), id);
+
+    // Make sure not to reuse time indexes to keep things in the same order
+    int64_t nNow = GetTimeMicros() - 1000000;
+    static int64_t nLastTime;
+    ++nLastTime;
+    nNow = std::max(nNow, nLastTime);
+    nLastTime = nNow;
+
+    // Each retry is 2 minutes after the last
+    nRequestTime = std::max(nRequestTime + 2 * 60 * 1000000, nNow);
+    if (it != mapAlreadyAskedFor.end())
+        mapAlreadyAskedFor.update(it, nRequestTime);
+    else
+        mapAlreadyAskedFor.insert(std::make_pair(inv, nRequestTime));
+    mapAskFor.insert(std::make_pair(nRequestTime, inv));
+}
+
+void CNode::BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend)
+{
+    ENTER_CRITICAL_SECTION(cs_vSend);
+    assert(ssSend.size() == 0);
+    ssSend << CMessageHeader(pszCommand, 0);
+    LogPrint("net", "sending: %s ", pszCommand);
+}
+
+void CNode::AbortMessage() UNLOCK_FUNCTION(cs_vSend)
+{
+    ssSend.clear();
+
+    LEAVE_CRITICAL_SECTION(cs_vSend);
+
+    LogPrint("net", "(aborted)\n");
+}
+
+void CNode::EndMessage() UNLOCK_FUNCTION(cs_vSend)
+{
+    // The -*messagestest options are intentionally not documented in the help message,
+    // since they are only used during development to debug the networking code and are
+    // not intended for end-users.
+    if (mapArgs.count("-dropmessagestest") && GetRand(GetArg("-dropmessagestest", 2)) == 0)
+    {
+        LogPrint("net", "dropmessages DROPPING SEND MESSAGE\n");
+        AbortMessage();
+        return;
+    }
+    if (mapArgs.count("-fuzzmessagestest"))
+        Fuzz(GetArg("-fuzzmessagestest", 10));
+
+    if (ssSend.size() == 0)
+        return;
+
+    // Set the size
+    unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
+    memcpy((char*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], &nSize, sizeof(nSize));
+
+    // Set the checksum
+    uint256 hash = Hash(ssSend.begin() + CMessageHeader::HEADER_SIZE, ssSend.end());
+    unsigned int nChecksum = 0;
+    memcpy(&nChecksum, &hash, sizeof(nChecksum));
+    assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum));
+    memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], &nChecksum, sizeof(nChecksum));
+
+    LogPrint("net", "(%d bytes) peer=%d\n", nSize, id);
+
+    std::deque<CSerializeData>::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData());
+    ssSend.GetAndClear(*it);
+    nSendSize += (*it).size();
+
+    // If write queue empty, attempt "optimistic write"
+    if (it == vSendMsg.begin())
+        SocketSendData(this);
+
+    LEAVE_CRITICAL_SECTION(cs_vSend);
+}
diff --git a/src/net.h b/src/net.h
index 1a7b3c00b893..2b4732c9deed 100644
--- a/src/net.h
+++ b/src/net.h
@@ -51,8 +51,8 @@ static const bool DEFAULT_UPNP = USE_UPNP;
 static const bool DEFAULT_UPNP = false;
 #endif
 
-inline unsigned int ReceiveFloodSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); }
-inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); }
+unsigned int ReceiveFloodSize();
+unsigned int SendBufferSize();
 
 void AddOneShot(std::string strDest);
 bool RecvLine(SOCKET hSocket, std::string& strLine);
@@ -300,70 +300,8 @@ class CNode
     // Whether a ping is requested.
     bool fPingQueued;
 
-    CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false) : ssSend(SER_NETWORK, INIT_PROTO_VERSION), setAddrKnown(5000)
-    {
-        nServices = 0;
-        hSocket = hSocketIn;
-        nRecvVersion = INIT_PROTO_VERSION;
-        nLastSend = 0;
-        nLastRecv = 0;
-        nSendBytes = 0;
-        nRecvBytes = 0;
-        nTimeConnected = GetTime();
-        addr = addrIn;
-        addrName = addrNameIn == "" ? addr.ToStringIPPort() : addrNameIn;
-        nVersion = 0;
-        strSubVer = "";
-        fWhitelisted = false;
-        fOneShot = false;
-        fClient = false; // set by version message
-        fInbound = fInboundIn;
-        fNetworkNode = false;
-        fSuccessfullyConnected = false;
-        fDisconnect = false;
-        nRefCount = 0;
-        nSendSize = 0;
-        nSendOffset = 0;
-        hashContinue = 0;
-        pindexLastGetBlocksBegin = 0;
-        hashLastGetBlocksEnd = 0;
-        nStartingHeight = -1;
-        fStartSync = false;
-        fGetAddr = false;
-        fRelayTxes = false;
-        setInventoryKnown.max_size(SendBufferSize() / 1000);
-        pfilter = new CBloomFilter();
-        nPingNonceSent = 0;
-        nPingUsecStart = 0;
-        nPingUsecTime = 0;
-        fPingQueued = false;
-
-        {
-            LOCK(cs_nLastNodeId);
-            id = nLastNodeId++;
-        }
-
-        if (fLogIPs)
-            LogPrint("net", "Added connection to %s peer=%d\n", addrName, id);
-        else
-            LogPrint("net", "Added connection peer=%d\n", id);
-
-        // Be shy and don't send version until we hear
-        if (hSocket != INVALID_SOCKET && !fInbound)
-            PushVersion();
-
-        GetNodeSignals().InitializeNode(GetId(), this);
-    }
-
-    ~CNode()
-    {
-        CloseSocket(hSocket);
-
-        if (pfilter)
-            delete pfilter;
-
-        GetNodeSignals().FinalizeNode(GetId());
-    }
+    CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn = "", bool fInboundIn=false);
+    ~CNode();
 
 private:
     // Network usage totals
@@ -452,96 +390,16 @@ class CNode
         }
     }
 
-    void AskFor(const CInv& inv)
-    {
-        // We're using mapAskFor as a priority queue,
-        // the key is the earliest time the request can be sent
-        int64_t nRequestTime;
-        limitedmap<CInv, int64_t>::const_iterator it = mapAlreadyAskedFor.find(inv);
-        if (it != mapAlreadyAskedFor.end())
-            nRequestTime = it->second;
-        else
-            nRequestTime = 0;
-        LogPrint("net", "askfor %s  %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str(), id);
-
-        // Make sure not to reuse time indexes to keep things in the same order
-        int64_t nNow = GetTimeMicros() - 1000000;
-        static int64_t nLastTime;
-        ++nLastTime;
-        nNow = std::max(nNow, nLastTime);
-        nLastTime = nNow;
-
-        // Each retry is 2 minutes after the last
-        nRequestTime = std::max(nRequestTime + 2 * 60 * 1000000, nNow);
-        if (it != mapAlreadyAskedFor.end())
-            mapAlreadyAskedFor.update(it, nRequestTime);
-        else
-            mapAlreadyAskedFor.insert(std::make_pair(inv, nRequestTime));
-        mapAskFor.insert(std::make_pair(nRequestTime, inv));
-    }
-
-
+    void AskFor(const CInv& inv);
 
     // TODO: Document the postcondition of this function.  Is cs_vSend locked?
-    void BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend)
-    {
-        ENTER_CRITICAL_SECTION(cs_vSend);
-        assert(ssSend.size() == 0);
-        ssSend << CMessageHeader(pszCommand, 0);
-        LogPrint("net", "sending: %s ", pszCommand);
-    }
+    void BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend);
 
     // TODO: Document the precondition of this function.  Is cs_vSend locked?
-    void AbortMessage() UNLOCK_FUNCTION(cs_vSend)
-    {
-        ssSend.clear();
-
-        LEAVE_CRITICAL_SECTION(cs_vSend);
-
-        LogPrint("net", "(aborted)\n");
-    }
+    void AbortMessage() UNLOCK_FUNCTION(cs_vSend);
 
     // TODO: Document the precondition of this function.  Is cs_vSend locked?
-    void EndMessage() UNLOCK_FUNCTION(cs_vSend)
-    {
-        // The -*messagestest options are intentionally not documented in the help message,
-        // since they are only used during development to debug the networking code and are
-        // not intended for end-users.
-        if (mapArgs.count("-dropmessagestest") && GetRand(GetArg("-dropmessagestest", 2)) == 0)
-        {
-            LogPrint("net", "dropmessages DROPPING SEND MESSAGE\n");
-            AbortMessage();
-            return;
-        }
-        if (mapArgs.count("-fuzzmessagestest"))
-            Fuzz(GetArg("-fuzzmessagestest", 10));
-
-        if (ssSend.size() == 0)
-            return;
-
-        // Set the size
-        unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
-        memcpy((char*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], &nSize, sizeof(nSize));
-
-        // Set the checksum
-        uint256 hash = Hash(ssSend.begin() + CMessageHeader::HEADER_SIZE, ssSend.end());
-        unsigned int nChecksum = 0;
-        memcpy(&nChecksum, &hash, sizeof(nChecksum));
-        assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + sizeof(nChecksum));
-        memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], &nChecksum, sizeof(nChecksum));
-
-        LogPrint("net", "(%d bytes) peer=%d\n", nSize, id);
-
-        std::deque<CSerializeData>::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData());
-        ssSend.GetAndClear(*it);
-        nSendSize += (*it).size();
-
-        // If write queue empty, attempt "optimistic write"
-        if (it == vSendMsg.begin())
-            SocketSendData(this);
-
-        LEAVE_CRITICAL_SECTION(cs_vSend);
-    }
+    void EndMessage() UNLOCK_FUNCTION(cs_vSend);
 
     void PushVersion();
 

From af8297c010154243cb11b27184a9badb4e03ecb0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 21 Aug 2014 05:04:43 +0200
Subject: [PATCH 0592/1819] Move functions in wallet.h to implementation file

Breaks compile-time dependency of wallet.h on util.
---
 src/wallet.cpp | 17 +++++++++++++++++
 src/wallet.h   | 18 +++---------------
 2 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 7c04743c0f0b..ee4793b3f187 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2168,3 +2168,20 @@ bool CWallet::GetDestData(const CTxDestination &dest, const std::string &key, st
     }
     return false;
 }
+
+CKeyPool::CKeyPool()
+{
+    nTime = GetTime();
+}
+
+CKeyPool::CKeyPool(const CPubKey& vchPubKeyIn)
+{
+    nTime = GetTime();
+    vchPubKey = vchPubKeyIn;
+}
+
+CWalletKey::CWalletKey(int64_t nExpires)
+{
+    nTimeCreated = (nExpires ? GetTime() : 0);
+    nTimeExpires = nExpires;
+}
diff --git a/src/wallet.h b/src/wallet.h
index 34c699e979c6..7cbbb2a6ed60 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -61,16 +61,8 @@ class CKeyPool
     int64_t nTime;
     CPubKey vchPubKey;
 
-    CKeyPool()
-    {
-        nTime = GetTime();
-    }
-
-    CKeyPool(const CPubKey& vchPubKeyIn)
-    {
-        nTime = GetTime();
-        vchPubKey = vchPubKeyIn;
-    }
+    CKeyPool();
+    CKeyPool(const CPubKey& vchPubKeyIn);
 
     IMPLEMENT_SERIALIZE
     (
@@ -840,11 +832,7 @@ class CWalletKey
     //// todo: add something to note what created it (user, getnewaddress, change)
     ////   maybe should have a map<string, string> property map
 
-    CWalletKey(int64_t nExpires=0)
-    {
-        nTimeCreated = (nExpires ? GetTime() : 0);
-        nTimeExpires = nExpires;
-    }
+    CWalletKey(int64_t nExpires=0);
 
     IMPLEMENT_SERIALIZE
     (

From b4aa769bcb82519024ee54fc84a37c34420d53b8 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 21 Aug 2014 15:50:59 +0200
Subject: [PATCH 0593/1819] Move `S_I*` constants and `MSG_NOSIGNAL` to
 compat.h

---
 src/compat.h | 14 ++++++++++++++
 src/util.h   | 14 --------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index 3f0a8b6158c1..4fc28a36e005 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -59,6 +59,20 @@ typedef u_int SOCKET;
 #define SOCKET_ERROR        -1
 #endif
 
+#ifdef WIN32
+#ifndef S_IRUSR
+#define S_IRUSR             0400
+#define S_IWUSR             0200
+#endif
+#else
+#define MAX_PATH            1024
+#endif
+
+// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
+#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
+#define MSG_NOSIGNAL 0
+#endif
+
 #ifndef WIN32
 // PRIO_MAX is not defined on Solaris
 #ifndef PRIO_MAX
diff --git a/src/util.h b/src/util.h
index 939e59c30133..e0feca07ca90 100644
--- a/src/util.h
+++ b/src/util.h
@@ -46,20 +46,6 @@ static const int64_t CENT = 1000000;
 // This is needed because the foreach macro can't get over the comma in pair<t1, t2>
 #define PAIRTYPE(t1, t2)    std::pair<t1, t2>
 
-#ifdef WIN32
-#define MSG_DONTWAIT        0
-
-#ifndef S_IRUSR
-#define S_IRUSR             0400
-#define S_IWUSR             0200
-#endif
-#else
-#define MAX_PATH            1024
-#endif
-// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
-#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
-#define MSG_NOSIGNAL 0
-#endif
 
 inline void MilliSleep(int64_t n)
 {

From 6e5fd003e04b81115b6b164b21f048472d575535 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 21 Aug 2014 16:11:05 +0200
Subject: [PATCH 0594/1819] Move `*Version()` functions to version.h/cpp

---
 src/bitcoin-cli.cpp      |  1 +
 src/qt/utilitydialog.cpp |  2 +-
 src/rpcprotocol.cpp      |  1 +
 src/tinyformat.h         |  1 +
 src/util.cpp             | 25 -------------------------
 src/util.h               |  2 --
 src/version.cpp          | 28 ++++++++++++++++++++++++++++
 src/version.h            |  4 ++++
 8 files changed, 36 insertions(+), 28 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 0609adcab3cb..10ca26ff2bc4 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -8,6 +8,7 @@
 #include "rpcclient.h"
 #include "rpcprotocol.h"
 #include "chainparamsbase.h"
+#include "version.h"
 
 #include <boost/filesystem/operations.hpp>
 
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 5fb0da145dea..1a39894c9bf3 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -10,9 +10,9 @@
 #include "clientmodel.h"
 #include "guiutil.h"
 
-#include "clientversion.h"
 #include "init.h"
 #include "util.h"
+#include "version.h"
 
 #include <QLabel>
 #include <QRegExp>
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 643208b3b674..a4deddbed36a 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -6,6 +6,7 @@
 #include "rpcprotocol.h"
 
 #include "util.h"
+#include "version.h"
 
 #include <stdint.h>
 
diff --git a/src/tinyformat.h b/src/tinyformat.h
index 929cb66e4d7c..73d49a1fe4d7 100644
--- a/src/tinyformat.h
+++ b/src/tinyformat.h
@@ -121,6 +121,7 @@ namespace tfm = tinyformat;
 #include <cassert>
 #include <iostream>
 #include <sstream>
+#include <stdexcept>
 
 #ifndef TINYFORMAT_ERROR
 #   define TINYFORMAT_ERROR(reason) assert(0 && reason)
diff --git a/src/util.cpp b/src/util.cpp
index 606f5a60f95a..80d27d582640 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -13,7 +13,6 @@
 #include "random.h"
 #include "sync.h"
 #include "uint256.h"
-#include "version.h"
 
 #include <stdarg.h>
 
@@ -1116,30 +1115,6 @@ void SetMockTime(int64_t nMockTimeIn)
     nMockTime = nMockTimeIn;
 }
 
-string FormatVersion(int nVersion)
-{
-    if (nVersion%100 == 0)
-        return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100);
-    else
-        return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100);
-}
-
-string FormatFullVersion()
-{
-    return CLIENT_BUILD;
-}
-
-// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)
-std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
-{
-    std::ostringstream ss;
-    ss << "/";
-    ss << name << ":" << FormatVersion(nClientVersion);
-    if (!comments.empty())
-        ss << "(" << boost::algorithm::join(comments, "; ") << ")";
-    ss << "/";
-    return ss.str();
-}
 
 #ifdef WIN32
 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate)
diff --git a/src/util.h b/src/util.h
index e0feca07ca90..cfbf30c6a4ec 100644
--- a/src/util.h
+++ b/src/util.h
@@ -156,8 +156,6 @@ boost::filesystem::path GetTempPath();
 void ShrinkDebugFile();
 int64_t GetTime();
 void SetMockTime(int64_t nMockTimeIn);
-std::string FormatFullVersion();
-std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
 void runCommand(std::string strCommand);
 
 inline std::string i64tostr(int64_t n)
diff --git a/src/version.cpp b/src/version.cpp
index d86caa3ac2e2..8311041ed282 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -4,7 +4,10 @@
 
 #include "version.h"
 
+#include "tinyformat.h"
+
 #include <string>
+#include <boost/algorithm/string/join.hpp>
 
 // Name of client reported in the 'version' message. Report the same name
 // for both bitcoind and bitcoin-qt, to make it harder for attackers to
@@ -69,3 +72,28 @@ const std::string CLIENT_NAME("Satoshi");
 
 const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
 const std::string CLIENT_DATE(BUILD_DATE);
+
+static std::string FormatVersion(int nVersion)
+{
+    if (nVersion%100 == 0)
+        return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100);
+    else
+        return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100);
+}
+
+std::string FormatFullVersion()
+{
+    return CLIENT_BUILD;
+}
+
+// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)
+std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
+{
+    std::ostringstream ss;
+    ss << "/";
+    ss << name << ":" << FormatVersion(nClientVersion);
+    if (!comments.empty())
+        ss << "(" << boost::algorithm::join(comments, "; ") << ")";
+    ss << "/";
+    return ss.str();
+}
diff --git a/src/version.h b/src/version.h
index fbb731c91d8a..3a6c0f37193b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -7,6 +7,7 @@
 #include "clientversion.h"
 
 #include <string>
+#include <vector>
 
 //
 // client versioning
@@ -48,4 +49,7 @@ static const int BIP0031_VERSION = 60000;
 // "mempool" command, enhanced "getdata" behavior starts with this version
 static const int MEMPOOL_GD_VERSION = 60002;
 
+std::string FormatFullVersion();
+std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
+
 #endif

From f841aa2892ffd97d564deee103555149d9fbcd9a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 20 Aug 2014 16:33:55 +0200
Subject: [PATCH 0595/1819] Move `COIN` and `CENT` to core.h

Eventually these should end up in `money.h` after monetary
amounts are typedef'ed, but at least they don't belong in `util.h`.
---
 src/core.h | 3 +++
 src/util.h | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/core.h b/src/core.h
index 9552f7025465..e3ceac97aa6b 100644
--- a/src/core.h
+++ b/src/core.h
@@ -14,6 +14,9 @@
 
 class CTransaction;
 
+static const int64_t COIN = 100000000;
+static const int64_t CENT = 1000000;
+
 /** No amount larger than this (in satoshi) is valid */
 static const int64_t MAX_MONEY = 21000000 * COIN;
 inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
diff --git a/src/util.h b/src/util.h
index cfbf30c6a4ec..cbd311574a34 100644
--- a/src/util.h
+++ b/src/util.h
@@ -34,9 +34,6 @@
 
 class uint256;
 
-static const int64_t COIN = 100000000;
-static const int64_t CENT = 1000000;
-
 #define BEGIN(a)            ((char*)&(a))
 #define END(a)              ((char*)&((&(a))[1]))
 #define UBEGIN(a)           ((unsigned char*)&(a))

From ad49c256c33bfe4088fd3c7ecb7d28cb81a8fc70 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 21 Aug 2014 16:11:09 +0200
Subject: [PATCH 0596/1819] Split up util.cpp/h

Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
---
 src/Makefile.am               |   6 +
 src/alert.cpp                 |   1 +
 src/bitcoin-cli.cpp           |   1 +
 src/bitcoin-tx.cpp            |   1 +
 src/bitcoind.cpp              |   1 +
 src/core_write.cpp            |   1 +
 src/crypter.cpp               |   1 +
 src/db.cpp                    |   2 +
 src/init.cpp                  |   2 +
 src/keystore.cpp              |   1 +
 src/main.cpp                  |   1 +
 src/miner.cpp                 |   6 +-
 src/net.cpp                   |   1 +
 src/net.h                     |   3 +-
 src/netbase.cpp               |   2 +
 src/noui.cpp                  |   1 +
 src/pow.cpp                   |   1 +
 src/qt/bitcoin.cpp            |   1 +
 src/qt/bitcoingui.cpp         |   1 +
 src/qt/clientmodel.cpp        |   1 +
 src/qt/optionsdialog.cpp      |   1 +
 src/qt/paymentserver.cpp      |   1 +
 src/qt/transactiondesc.cpp    |   1 +
 src/qt/utilitydialog.cpp      |   3 +-
 src/random.cpp                |   4 +-
 src/rpcblockchain.cpp         |   1 +
 src/rpcdump.cpp               |   2 +
 src/rpcmining.cpp             |   1 +
 src/rpcprotocol.cpp           |   3 +
 src/rpcserver.cpp             |   6 +
 src/script.cpp                |   3 +-
 src/script.h                  |   3 +-
 src/test/DoS_tests.cpp        |   1 +
 src/test/alert_tests.cpp      |   1 +
 src/test/allocator_tests.cpp  |   2 +
 src/test/base32_tests.cpp     |   2 +-
 src/test/base64_tests.cpp     |   2 +-
 src/test/checkblock_tests.cpp |   1 +
 src/test/crypto_tests.cpp     |   2 +-
 src/test/hash_tests.cpp       |   2 +-
 src/test/test_bitcoin.cpp     |   1 +
 src/test/util_tests.cpp       |   3 +
 src/timedata.cpp              |   6 +
 src/txdb.cpp                  |   1 +
 src/txmempool.cpp             |   1 +
 src/uint256.cpp               |   3 +-
 src/util.cpp                  | 551 +---------------------------------
 src/util.h                    | 176 +----------
 src/utilmoneystr.cpp          |  75 +++++
 src/utilmoneystr.h            |  19 ++
 src/utilstrencodings.cpp      | 496 ++++++++++++++++++++++++++++++
 src/utilstrencodings.h        |  97 ++++++
 src/utiltime.cpp              |  66 ++++
 src/utiltime.h                |  20 ++
 src/wallet.cpp                |   8 +
 src/wallet.h                  |   6 +-
 src/walletdb.cpp              |   3 +
 57 files changed, 875 insertions(+), 734 deletions(-)
 create mode 100644 src/utilmoneystr.cpp
 create mode 100644 src/utilmoneystr.h
 create mode 100644 src/utilstrencodings.cpp
 create mode 100644 src/utilstrencodings.h
 create mode 100644 src/utiltime.cpp
 create mode 100644 src/utiltime.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 6c67dee7d5b2..655bfc88c3be 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -109,6 +109,9 @@ BITCOIN_CORE_H = \
   ui_interface.h \
   uint256.h \
   util.h \
+  utilstrencodings.h \
+  utilmoneystr.h \
+  utiltime.h \
   version.h \
   walletdb.h \
   wallet.h \
@@ -219,6 +222,9 @@ libbitcoin_util_a_SOURCES = \
   sync.cpp \
   uint256.cpp \
   util.cpp \
+  utilstrencodings.cpp \
+  utilmoneystr.cpp \
+  utiltime.cpp \
   version.cpp \
   $(BITCOIN_CORE_H)
 
diff --git a/src/alert.cpp b/src/alert.cpp
index 2cd684cc4c4a..3271ecfbfd30 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -19,6 +19,7 @@
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/foreach.hpp>
+#include <boost/thread.hpp>
 
 using namespace std;
 
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 10ca26ff2bc4..871aaf93df5e 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -8,6 +8,7 @@
 #include "rpcclient.h"
 #include "rpcprotocol.h"
 #include "chainparamsbase.h"
+#include "utilstrencodings.h"
 #include "version.h"
 
 #include <boost/filesystem/operations.hpp>
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 6cd2768d700f..75f0fb69f26e 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -4,6 +4,7 @@
 
 #include "base58.h"
 #include "util.h"
+#include "utilmoneystr.h"
 #include "core.h"
 #include "main.h"         // for MAX_BLOCK_SIZE
 #include "keystore.h"
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 880955481b0e..5be8708979b7 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -12,6 +12,7 @@
 
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/filesystem.hpp>
+#include <boost/thread.hpp>
 
 /* Introduction text for doxygen: */
 
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 37dd69f7b834..b395b5c0908e 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -8,6 +8,7 @@
 #include "core.h"
 #include "serialize.h"
 #include "util.h"
+#include "utilmoneystr.h"
 #include "base58.h"
 
 using namespace std;
diff --git a/src/crypter.cpp b/src/crypter.cpp
index 122e06d97ef7..8aa2bb051771 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -5,6 +5,7 @@
 #include "crypter.h"
 
 #include "script.h"
+#include "util.h"
 
 #include <string>
 #include <vector>
diff --git a/src/db.cpp b/src/db.cpp
index eb40f3cc4056..8c139843a181 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -9,6 +9,7 @@
 #include "hash.h"
 #include "protocol.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <stdint.h>
 
@@ -17,6 +18,7 @@
 #endif
 
 #include <boost/filesystem.hpp>
+#include <boost/thread.hpp>
 #include <boost/version.hpp>
 #include <openssl/rand.h>
 
diff --git a/src/init.cpp b/src/init.cpp
index 708e6386aaf5..e972413c4b9c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -19,6 +19,7 @@
 #include "txdb.h"
 #include "ui_interface.h"
 #include "util.h"
+#include "utilmoneystr.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
 #include "wallet.h"
@@ -36,6 +37,7 @@
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/interprocess/sync/file_lock.hpp>
+#include <boost/thread.hpp>
 #include <openssl/crypto.h>
 
 using namespace boost;
diff --git a/src/keystore.cpp b/src/keystore.cpp
index 2a4c88d5656d..c6322eadce82 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -8,6 +8,7 @@
 #include "crypter.h"
 #include "key.h"
 #include "script.h"
+#include "util.h"
 
 #include <boost/foreach.hpp>
 
diff --git a/src/main.cpp b/src/main.cpp
index d9f897f44771..322f580f10b0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -24,6 +24,7 @@
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
+#include <boost/thread.hpp>
 
 using namespace std;
 using namespace boost;
diff --git a/src/miner.cpp b/src/miner.cpp
index 06acff1c33e2..8696edcf6e9d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -3,8 +3,6 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <inttypes.h>
-
 #include "miner.h"
 
 #include "core.h"
@@ -12,10 +10,14 @@
 #include "main.h"
 #include "net.h"
 #include "pow.h"
+#include "util.h"
+#include "utilmoneystr.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
 
+#include <boost/thread.hpp>
+
 using namespace std;
 
 //////////////////////////////////////////////////////////////////////////////
diff --git a/src/net.cpp b/src/net.cpp
index 440c271a5e9f..e2adba851755 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -28,6 +28,7 @@
 #endif
 
 #include <boost/filesystem.hpp>
+#include <boost/thread.hpp>
 
 // Dump addresses to peers.dat every 15 minutes (900s)
 #define DUMP_ADDRESSES_INTERVAL 900
diff --git a/src/net.h b/src/net.h
index 2b4732c9deed..bfad32b2c17a 100644
--- a/src/net.h
+++ b/src/net.h
@@ -16,7 +16,7 @@
 #include "random.h"
 #include "sync.h"
 #include "uint256.h"
-#include "util.h"
+#include "utilstrencodings.h"
 
 #include <deque>
 #include <stdint.h>
@@ -25,6 +25,7 @@
 #include <arpa/inet.h>
 #endif
 
+#include <boost/filesystem/path.hpp>
 #include <boost/foreach.hpp>
 #include <boost/signals2/signal.hpp>
 
diff --git a/src/netbase.cpp b/src/netbase.cpp
index e9207da33025..d5821d4465bc 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -13,6 +13,7 @@
 #include "sync.h"
 #include "uint256.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #ifdef HAVE_GETADDRINFO_A
 #include <netdb.h>
@@ -27,6 +28,7 @@
 
 #include <boost/algorithm/string/case_conv.hpp> // for to_lower()
 #include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
+#include <boost/thread.hpp>
 
 #if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
 #define MSG_NOSIGNAL 0
diff --git a/src/noui.cpp b/src/noui.cpp
index 32c861b0d9de..8b00fd40571a 100644
--- a/src/noui.cpp
+++ b/src/noui.cpp
@@ -8,6 +8,7 @@
 #include "ui_interface.h"
 #include "util.h"
 
+#include <cstdio>
 #include <stdint.h>
 #include <string>
 
diff --git a/src/pow.cpp b/src/pow.cpp
index c0d0a7ca20f2..b091cbec3dc6 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -9,6 +9,7 @@
 #include "core.h"
 #include "main.h"
 #include "uint256.h"
+#include "util.h"
 
 unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock)
 {
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index a43e7cb7562e..12277a8ad004 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -33,6 +33,7 @@
 #include <stdint.h>
 
 #include <boost/filesystem/operations.hpp>
+#include <boost/thread.hpp>
 #include <QApplication>
 #include <QDebug>
 #include <QLibraryInfo>
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index bfca5e8d1a20..d0a5ff13c3ac 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -24,6 +24,7 @@
 #endif
 
 #include "init.h"
+#include "util.h"
 #include "ui_interface.h"
 
 #include <iostream>
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 4c21eb5594e1..9c9ff5b3a1a1 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -13,6 +13,7 @@
 #include "main.h"
 #include "net.h"
 #include "ui_interface.h"
+#include "util.h"
 
 #include <stdint.h>
 
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index fd1d446f9b89..c775a7f8d64c 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -21,6 +21,7 @@
 #include "wallet.h" // for CWallet::minTxFee
 #endif
 
+#include <boost/thread.hpp>
 #include <QDir>
 #include <QIntValidator>
 #include <QLocale>
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index a9f1566d62bf..f6a4b599de50 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -11,6 +11,7 @@
 
 #include "base58.h"
 #include "ui_interface.h"
+#include "util.h"
 #include "wallet.h"
 
 #include <cstdlib>
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 4f6e3169f5a2..8258e719a363 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -15,6 +15,7 @@
 #include "transactionrecord.h"
 #include "timedata.h"
 #include "ui_interface.h"
+#include "util.h"
 #include "wallet.h"
 
 #include <stdint.h>
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 1a39894c9bf3..7df9d1bc2df4 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -11,9 +11,10 @@
 #include "guiutil.h"
 
 #include "init.h"
-#include "util.h"
 #include "version.h"
 
+#include <stdio.h>
+
 #include <QLabel>
 #include <QRegExp>
 #include <QVBoxLayout>
diff --git a/src/random.cpp b/src/random.cpp
index 0d20d205ac64..22c942acc041 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -8,12 +8,14 @@
 #ifdef WIN32
 #include "compat.h" // for Windows API
 #endif
+#include "serialize.h" // for begin_ptr(vec)
 #include "util.h" // for LogPrint()
+#include "utilstrencodings.h" // for GetTime()
 
 #ifndef WIN32
 #include <sys/time.h>
 #endif
-
+#include <limits>
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/rand.h>
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index e511fe4222d1..58cab140454b 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -7,6 +7,7 @@
 #include "main.h"
 #include "rpcserver.h"
 #include "sync.h"
+#include "util.h"
 
 #include <stdint.h>
 
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index ff2361482b9f..e68ddee04096 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -7,6 +7,8 @@
 #include "init.h"
 #include "main.h"
 #include "sync.h"
+#include "utiltime.h"
+#include "util.h"
 #include "wallet.h"
 
 #include <fstream>
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index edab427cbfac..6e508abcda42 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -11,6 +11,7 @@
 #include "miner.h"
 #include "pow.h"
 #include "core_io.h"
+#include "util.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
 #include "wallet.h"
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index a4deddbed36a..808b9bbd2a73 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -6,6 +6,9 @@
 #include "rpcprotocol.h"
 
 #include "util.h"
+#include "tinyformat.h"
+#include "utilstrencodings.h"
+#include "utiltime.h"
 #include "version.h"
 
 #include <stdint.h>
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 524627e2dee9..c9133bd3d272 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -23,6 +23,7 @@
 #include <boost/iostreams/concepts.hpp>
 #include <boost/iostreams/stream.hpp>
 #include <boost/shared_ptr.hpp>
+#include <boost/thread.hpp>
 #include "json/json_spirit_writer_template.h"
 
 using namespace boost;
@@ -82,6 +83,11 @@ void RPCTypeCheck(const Object& o,
     }
 }
 
+static inline int64_t roundint64(double d)
+{
+    return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
+}
+
 int64_t AmountFromValue(const Value& value)
 {
     double dAmount = value.get_real();
diff --git a/src/script.cpp b/src/script.cpp
index 942e8810db78..4c7bb10c372a 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -18,8 +18,9 @@
 #include "util.h"
 
 #include <boost/foreach.hpp>
-#include <boost/tuple/tuple.hpp>
+#include <boost/thread.hpp>
 #include <boost/tuple/tuple_comparison.hpp>
+#include <boost/tuple/tuple.hpp>
 
 using namespace std;
 using namespace boost;
diff --git a/src/script.h b/src/script.h
index 1e2cc94efe26..462e3f230289 100644
--- a/src/script.h
+++ b/src/script.h
@@ -7,7 +7,8 @@
 #define H_BITCOIN_SCRIPT
 
 #include "key.h"
-#include "util.h"
+#include "utilstrencodings.h"
+#include "tinyformat.h"
 
 #include <stdexcept>
 #include <stdint.h>
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 5e17555e7a8f..4ecf6e253574 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -14,6 +14,7 @@
 #include "pow.h"
 #include "script.h"
 #include "serialize.h"
+#include "util.h"
 
 #include <stdint.h>
 
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index e3066a51ab98..4af87cf8ef79 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -11,6 +11,7 @@
 
 #include "serialize.h"
 #include "util.h"
+#include "utilstrencodings.h"
 #include "version.h"
 
 #include <fstream>
diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp
index 2752a0b21589..69888da3dfa0 100644
--- a/src/test/allocator_tests.cpp
+++ b/src/test/allocator_tests.cpp
@@ -4,6 +4,8 @@
 
 #include "util.h"
 
+#include "allocators.h"
+
 #include <boost/test/unit_test.hpp>
 
 BOOST_AUTO_TEST_SUITE(allocator_tests)
diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp
index 87473585e33c..68617abbdd5f 100644
--- a/src/test/base32_tests.cpp
+++ b/src/test/base32_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/test/unit_test.hpp>
 
diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp
index d4a23d9aa0ea..f2bf3326ad8d 100644
--- a/src/test/base64_tests.cpp
+++ b/src/test/base64_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/test/unit_test.hpp>
 
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 10352240f427..fdea12846a08 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -9,6 +9,7 @@
 
 
 #include "main.h"
+#include "utiltime.h"
 
 #include <cstdio>
 
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index a17278b80396..a3eec270ee9a 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -6,7 +6,7 @@
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
 #include "random.h"
-#include "util.h"
+#include "utilstrencodings.h"
 
 #include <vector>
 
diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp
index 4568c8769bc4..b8e290f071fd 100644
--- a/src/test/hash_tests.cpp
+++ b/src/test/hash_tests.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "hash.h"
-#include "util.h"
+#include "utilstrencodings.h"
 
 #include <vector>
 
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 443b5853b205..68fad8d038e8 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -16,6 +16,7 @@
 
 #include <boost/filesystem.hpp>
 #include <boost/test/unit_test.hpp>
+#include <boost/thread.hpp>
 
 CClientUIInterface uiInterface;
 CWallet* pwalletMain;
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 31fcd3e92a4f..e077c9de3bf3 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -4,8 +4,11 @@
 
 #include "util.h"
 
+#include "core.h"
 #include "random.h"
 #include "sync.h"
+#include "utilstrencodings.h"
+#include "utilmoneystr.h"
 
 #include <stdint.h>
 #include <vector>
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 4576786b965e..40cdb33f7a8f 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -8,6 +8,7 @@
 #include "sync.h"
 #include "ui_interface.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
 
@@ -35,6 +36,11 @@ int64_t GetAdjustedTime()
     return GetTime() + GetTimeOffset();
 }
 
+static int64_t abs64(int64_t n)
+{
+    return (n >= 0 ? n : -n);
+}
+
 void AddTimeData(const CNetAddr& ip, int64_t nTime)
 {
     int64_t nOffsetSample = nTime - GetTime();
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 7c0683aaf3d4..a3a9b3153476 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -9,6 +9,7 @@
 #include "pow.h"
 #include "uint256.h"
 
+#include <boost/thread.hpp>
 #include <stdint.h>
 
 using namespace std;
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 80cae6824480..b327e1c732c9 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -5,6 +5,7 @@
 
 #include "core.h"
 #include "txmempool.h"
+#include "util.h"
 
 #include <boost/circular_buffer.hpp>
 
diff --git a/src/uint256.cpp b/src/uint256.cpp
index 08c05594fd97..feda0ca5a9d4 100644
--- a/src/uint256.cpp
+++ b/src/uint256.cpp
@@ -4,7 +4,8 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "uint256.h"
-#include "util.h"
+
+#include "utilstrencodings.h"
 
 #include <stdio.h>
 #include <string.h>
diff --git a/src/util.cpp b/src/util.cpp
index 80d27d582640..5a4e187f9e2a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -11,13 +11,13 @@
 
 #include "chainparamsbase.h"
 #include "random.h"
+#include "serialize.h"
 #include "sync.h"
-#include "uint256.h"
+#include "utilstrencodings.h"
+#include "utiltime.h"
 
 #include <stdarg.h>
 
-#include <boost/date_time/posix_time/posix_time.hpp>
-
 #ifndef WIN32
 // for posix_fallocate
 #ifdef __linux__
@@ -75,6 +75,7 @@
 #include <boost/foreach.hpp>
 #include <boost/program_options/detail/config_file.hpp>
 #include <boost/program_options/parsers.hpp>
+#include <boost/thread.hpp>
 #include <openssl/crypto.h>
 #include <openssl/rand.h>
 
@@ -243,148 +244,6 @@ int LogPrintStr(const std::string &str)
     return ret;
 }
 
-string FormatMoney(int64_t n, bool fPlus)
-{
-    // Note: not using straight sprintf here because we do NOT want
-    // localized number formatting.
-    int64_t n_abs = (n > 0 ? n : -n);
-    int64_t quotient = n_abs/COIN;
-    int64_t remainder = n_abs%COIN;
-    string str = strprintf("%d.%08d", quotient, remainder);
-
-    // Right-trim excess zeros before the decimal point:
-    int nTrim = 0;
-    for (int i = str.size()-1; (str[i] == '0' && isdigit(str[i-2])); --i)
-        ++nTrim;
-    if (nTrim)
-        str.erase(str.size()-nTrim, nTrim);
-
-    if (n < 0)
-        str.insert((unsigned int)0, 1, '-');
-    else if (fPlus && n > 0)
-        str.insert((unsigned int)0, 1, '+');
-    return str;
-}
-
-
-bool ParseMoney(const string& str, int64_t& nRet)
-{
-    return ParseMoney(str.c_str(), nRet);
-}
-
-bool ParseMoney(const char* pszIn, int64_t& nRet)
-{
-    string strWhole;
-    int64_t nUnits = 0;
-    const char* p = pszIn;
-    while (isspace(*p))
-        p++;
-    for (; *p; p++)
-    {
-        if (*p == '.')
-        {
-            p++;
-            int64_t nMult = CENT*10;
-            while (isdigit(*p) && (nMult > 0))
-            {
-                nUnits += nMult * (*p++ - '0');
-                nMult /= 10;
-            }
-            break;
-        }
-        if (isspace(*p))
-            break;
-        if (!isdigit(*p))
-            return false;
-        strWhole.insert(strWhole.end(), *p);
-    }
-    for (; *p; p++)
-        if (!isspace(*p))
-            return false;
-    if (strWhole.size() > 10) // guard against 63 bit overflow
-        return false;
-    if (nUnits < 0 || nUnits > COIN)
-        return false;
-    int64_t nWhole = atoi64(strWhole);
-    int64_t nValue = nWhole*COIN + nUnits;
-
-    nRet = nValue;
-    return true;
-}
-
-// safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
-// even possibly remotely dangerous like & or >
-static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@");
-string SanitizeString(const string& str)
-{
-    string strResult;
-    for (std::string::size_type i = 0; i < str.size(); i++)
-    {
-        if (safeChars.find(str[i]) != std::string::npos)
-            strResult.push_back(str[i]);
-    }
-    return strResult;
-}
-
-const signed char p_util_hexdigit[256] =
-{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,
-  -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, };
-
-signed char HexDigit(char c)
-{
-    return p_util_hexdigit[(unsigned char)c];
-}
-
-bool IsHex(const string& str)
-{
-    BOOST_FOREACH(char c, str)
-    {
-        if (HexDigit(c) < 0)
-            return false;
-    }
-    return (str.size() > 0) && (str.size()%2 == 0);
-}
-
-vector<unsigned char> ParseHex(const char* psz)
-{
-    // convert hex dump to vector
-    vector<unsigned char> vch;
-    while (true)
-    {
-        while (isspace(*psz))
-            psz++;
-        signed char c = HexDigit(*psz++);
-        if (c == (signed char)-1)
-            break;
-        unsigned char n = (c << 4);
-        c = HexDigit(*psz++);
-        if (c == (signed char)-1)
-            break;
-        n |= c;
-        vch.push_back(n);
-    }
-    return vch;
-}
-
-vector<unsigned char> ParseHex(const string& str)
-{
-    return ParseHex(str.c_str());
-}
-
 static void InterpretNegativeSetting(string name, map<string, string>& mapSettingsRet)
 {
     // interpret -nofoo as -foo=0 (and -nofoo=0 as -foo=1) as long as -foo not set
@@ -482,334 +341,6 @@ bool SoftSetBoolArg(const std::string& strArg, bool fValue)
         return SoftSetArg(strArg, std::string("0"));
 }
 
-
-string EncodeBase64(const unsigned char* pch, size_t len)
-{
-    static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-    string strRet="";
-    strRet.reserve((len+2)/3*4);
-
-    int mode=0, left=0;
-    const unsigned char *pchEnd = pch+len;
-
-    while (pch<pchEnd)
-    {
-        int enc = *(pch++);
-        switch (mode)
-        {
-            case 0: // we have no bits
-                strRet += pbase64[enc >> 2];
-                left = (enc & 3) << 4;
-                mode = 1;
-                break;
-
-            case 1: // we have two bits
-                strRet += pbase64[left | (enc >> 4)];
-                left = (enc & 15) << 2;
-                mode = 2;
-                break;
-
-            case 2: // we have four bits
-                strRet += pbase64[left | (enc >> 6)];
-                strRet += pbase64[enc & 63];
-                mode = 0;
-                break;
-        }
-    }
-
-    if (mode)
-    {
-        strRet += pbase64[left];
-        strRet += '=';
-        if (mode == 1)
-            strRet += '=';
-    }
-
-    return strRet;
-}
-
-string EncodeBase64(const string& str)
-{
-    return EncodeBase64((const unsigned char*)str.c_str(), str.size());
-}
-
-vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
-{
-    static const int decode64_table[256] =
-    {
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1,
-        -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
-        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28,
-        29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
-        49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-    };
-
-    if (pfInvalid)
-        *pfInvalid = false;
-
-    vector<unsigned char> vchRet;
-    vchRet.reserve(strlen(p)*3/4);
-
-    int mode = 0;
-    int left = 0;
-
-    while (1)
-    {
-         int dec = decode64_table[(unsigned char)*p];
-         if (dec == -1) break;
-         p++;
-         switch (mode)
-         {
-             case 0: // we have no bits and get 6
-                 left = dec;
-                 mode = 1;
-                 break;
-
-              case 1: // we have 6 bits and keep 4
-                  vchRet.push_back((left<<2) | (dec>>4));
-                  left = dec & 15;
-                  mode = 2;
-                  break;
-
-             case 2: // we have 4 bits and get 6, we keep 2
-                 vchRet.push_back((left<<4) | (dec>>2));
-                 left = dec & 3;
-                 mode = 3;
-                 break;
-
-             case 3: // we have 2 bits and get 6
-                 vchRet.push_back((left<<6) | dec);
-                 mode = 0;
-                 break;
-         }
-    }
-
-    if (pfInvalid)
-        switch (mode)
-        {
-            case 0: // 4n base64 characters processed: ok
-                break;
-
-            case 1: // 4n+1 base64 character processed: impossible
-                *pfInvalid = true;
-                break;
-
-            case 2: // 4n+2 base64 characters processed: require '=='
-                if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1)
-                    *pfInvalid = true;
-                break;
-
-            case 3: // 4n+3 base64 characters processed: require '='
-                if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1)
-                    *pfInvalid = true;
-                break;
-        }
-
-    return vchRet;
-}
-
-string DecodeBase64(const string& str)
-{
-    vector<unsigned char> vchRet = DecodeBase64(str.c_str());
-    return string((const char*)&vchRet[0], vchRet.size());
-}
-
-string EncodeBase32(const unsigned char* pch, size_t len)
-{
-    static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567";
-
-    string strRet="";
-    strRet.reserve((len+4)/5*8);
-
-    int mode=0, left=0;
-    const unsigned char *pchEnd = pch+len;
-
-    while (pch<pchEnd)
-    {
-        int enc = *(pch++);
-        switch (mode)
-        {
-            case 0: // we have no bits
-                strRet += pbase32[enc >> 3];
-                left = (enc & 7) << 2;
-                mode = 1;
-                break;
-
-            case 1: // we have three bits
-                strRet += pbase32[left | (enc >> 6)];
-                strRet += pbase32[(enc >> 1) & 31];
-                left = (enc & 1) << 4;
-                mode = 2;
-                break;
-
-            case 2: // we have one bit
-                strRet += pbase32[left | (enc >> 4)];
-                left = (enc & 15) << 1;
-                mode = 3;
-                break;
-
-            case 3: // we have four bits
-                strRet += pbase32[left | (enc >> 7)];
-                strRet += pbase32[(enc >> 2) & 31];
-                left = (enc & 3) << 3;
-                mode = 4;
-                break;
-
-            case 4: // we have two bits
-                strRet += pbase32[left | (enc >> 5)];
-                strRet += pbase32[enc & 31];
-                mode = 0;
-        }
-    }
-
-    static const int nPadding[5] = {0, 6, 4, 3, 1};
-    if (mode)
-    {
-        strRet += pbase32[left];
-        for (int n=0; n<nPadding[mode]; n++)
-             strRet += '=';
-    }
-
-    return strRet;
-}
-
-string EncodeBase32(const string& str)
-{
-    return EncodeBase32((const unsigned char*)str.c_str(), str.size());
-}
-
-vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid)
-{
-    static const int decode32_table[256] =
-    {
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
-        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1,  0,  1,  2,
-         3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
-        23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-    };
-
-    if (pfInvalid)
-        *pfInvalid = false;
-
-    vector<unsigned char> vchRet;
-    vchRet.reserve((strlen(p))*5/8);
-
-    int mode = 0;
-    int left = 0;
-
-    while (1)
-    {
-         int dec = decode32_table[(unsigned char)*p];
-         if (dec == -1) break;
-         p++;
-         switch (mode)
-         {
-             case 0: // we have no bits and get 5
-                 left = dec;
-                 mode = 1;
-                 break;
-
-              case 1: // we have 5 bits and keep 2
-                  vchRet.push_back((left<<3) | (dec>>2));
-                  left = dec & 3;
-                  mode = 2;
-                  break;
-
-             case 2: // we have 2 bits and keep 7
-                 left = left << 5 | dec;
-                 mode = 3;
-                 break;
-
-             case 3: // we have 7 bits and keep 4
-                 vchRet.push_back((left<<1) | (dec>>4));
-                 left = dec & 15;
-                 mode = 4;
-                 break;
-
-             case 4: // we have 4 bits, and keep 1
-                 vchRet.push_back((left<<4) | (dec>>1));
-                 left = dec & 1;
-                 mode = 5;
-                 break;
-
-             case 5: // we have 1 bit, and keep 6
-                 left = left << 5 | dec;
-                 mode = 6;
-                 break;
-
-             case 6: // we have 6 bits, and keep 3
-                 vchRet.push_back((left<<2) | (dec>>3));
-                 left = dec & 7;
-                 mode = 7;
-                 break;
-
-             case 7: // we have 3 bits, and keep 0
-                 vchRet.push_back((left<<5) | dec);
-                 mode = 0;
-                 break;
-         }
-    }
-
-    if (pfInvalid)
-        switch (mode)
-        {
-            case 0: // 8n base32 characters processed: ok
-                break;
-
-            case 1: // 8n+1 base32 characters processed: impossible
-            case 3: //   +3
-            case 6: //   +6
-                *pfInvalid = true;
-                break;
-
-            case 2: // 8n+2 base32 characters processed: require '======'
-                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || p[4] != '=' || p[5] != '=' || decode32_table[(unsigned char)p[6]] != -1)
-                    *pfInvalid = true;
-                break;
-
-            case 4: // 8n+4 base32 characters processed: require '===='
-                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || decode32_table[(unsigned char)p[4]] != -1)
-                    *pfInvalid = true;
-                break;
-
-            case 5: // 8n+5 base32 characters processed: require '==='
-                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || decode32_table[(unsigned char)p[3]] != -1)
-                    *pfInvalid = true;
-                break;
-
-            case 7: // 8n+7 base32 characters processed: require '='
-                if (left || p[0] != '=' || decode32_table[(unsigned char)p[1]] != -1)
-                    *pfInvalid = true;
-                break;
-        }
-
-    return vchRet;
-}
-
-string DecodeBase32(const string& str)
-{
-    vector<unsigned char> vchRet = DecodeBase32(str.c_str());
-    return string((const char*)&vchRet[0], vchRet.size());
-}
-
 static std::string FormatException(std::exception* pex, const char* pszThread)
 {
 #ifdef WIN32
@@ -1101,21 +632,6 @@ void ShrinkDebugFile()
         fclose(file);
 }
 
-static int64_t nMockTime = 0;  // For unit testing
-
-int64_t GetTime()
-{
-    if (nMockTime) return nMockTime;
-
-    return time(NULL);
-}
-
-void SetMockTime(int64_t nMockTimeIn)
-{
-    nMockTime = nMockTimeIn;
-}
-
-
 #ifdef WIN32
 boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate)
 {
@@ -1186,20 +702,6 @@ void RenameThread(const char* name)
 #endif
 }
 
-bool ParseInt32(const std::string& str, int32_t *out)
-{
-    char *endp = NULL;
-    errno = 0; // strtol will not set errno if valid
-    long int n = strtol(str.c_str(), &endp, 10);
-    if(out) *out = (int)n;
-    // Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow
-    // we still have to check that the returned value is within the range of an *int32_t*. On 64-bit
-    // platforms the size of these types may be different.
-    return endp && *endp == 0 && !errno &&
-        n >= std::numeric_limits<int32_t>::min() &&
-        n <= std::numeric_limits<int32_t>::max();
-}
-
 void SetupEnvironment()
 {
 #ifndef WIN32
@@ -1217,51 +719,6 @@ void SetupEnvironment()
 #endif
 }
 
-std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
-{
-    // std::locale takes ownership of the pointer
-    std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat));
-    std::stringstream ss;
-    ss.imbue(loc);
-    ss << boost::posix_time::from_time_t(nTime);
-    return ss.str();
-}
-
-std::string FormatParagraph(const std::string in, size_t width, size_t indent)
-{
-    std::stringstream out;
-    size_t col = 0;
-    size_t ptr = 0;
-    while(ptr < in.size())
-    {
-        // Find beginning of next word
-        ptr = in.find_first_not_of(' ', ptr);
-        if (ptr == std::string::npos)
-            break;
-        // Find end of next word
-        size_t endword = in.find_first_of(' ', ptr);
-        if (endword == std::string::npos)
-            endword = in.size();
-        // Add newline and indentation if this wraps over the allowed width
-        if (col > 0)
-        {
-            if ((col + endword - ptr) > width)
-            {
-                out << '\n';
-                for(size_t i=0; i<indent; ++i)
-                    out << ' ';
-                col = 0;
-            } else
-                out << ' ';
-        }
-        // Append word
-        out << in.substr(ptr, endword - ptr);
-        col += endword - ptr;
-        ptr = endword;
-    }
-    return out.str();
-}
-
 void SetThreadPriority(int nPriority)
 {
 #ifdef WIN32
diff --git a/src/util.h b/src/util.h
index cbd311574a34..30f7c15c89d3 100644
--- a/src/util.h
+++ b/src/util.h
@@ -3,6 +3,10 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+/**
+ * Server/client environment: argument handling, config file parsing,
+ * logging, thread wrappers
+ */
 #ifndef BITCOIN_UTIL_H
 #define BITCOIN_UTIL_H
 
@@ -11,53 +15,17 @@
 #endif
 
 #include "compat.h"
-#include "serialize.h"
+#include "utiltime.h"
 #include "tinyformat.h"
 
-#include <cstdio>
 #include <exception>
 #include <map>
-#include <stdarg.h>
 #include <stdint.h>
 #include <string>
-#include <utility>
 #include <vector>
 
-#ifndef WIN32
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#endif
-
 #include <boost/filesystem/path.hpp>
-#include <boost/thread.hpp>
-
-class uint256;
-
-#define BEGIN(a)            ((char*)&(a))
-#define END(a)              ((char*)&((&(a))[1]))
-#define UBEGIN(a)           ((unsigned char*)&(a))
-#define UEND(a)             ((unsigned char*)&((&(a))[1]))
-#define ARRAYLEN(array)     (sizeof(array)/sizeof((array)[0]))
-
-// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
-#define PAIRTYPE(t1, t2)    std::pair<t1, t2>
-
-
-inline void MilliSleep(int64_t n)
-{
-// Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
-// until fixed in 1.52. Use the deprecated sleep method for the broken case.
-// See: https://svn.boost.org/trac/boost/ticket/7238
-#if defined(HAVE_WORKING_BOOST_SLEEP_FOR)
-    boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
-#elif defined(HAVE_WORKING_BOOST_SLEEP)
-    boost::this_thread::sleep(boost::posix_time::milliseconds(n));
-#else
-//should never get here
-#error missing boost sleep implementation
-#endif
-}
+#include <boost/thread/exceptions.hpp>
 
 extern std::map<std::string, std::string> mapArgs;
 extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
@@ -115,22 +83,6 @@ static inline bool error(const char* format)
 }
 
 void PrintExceptionContinue(std::exception* pex, const char* pszThread);
-std::string FormatMoney(int64_t n, bool fPlus=false);
-bool ParseMoney(const std::string& str, int64_t& nRet);
-bool ParseMoney(const char* pszIn, int64_t& nRet);
-std::string SanitizeString(const std::string& str);
-std::vector<unsigned char> ParseHex(const char* psz);
-std::vector<unsigned char> ParseHex(const std::string& str);
-signed char HexDigit(char c);
-bool IsHex(const std::string& str);
-std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL);
-std::string DecodeBase64(const std::string& str);
-std::string EncodeBase64(const unsigned char* pch, size_t len);
-std::string EncodeBase64(const std::string& str);
-std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid = NULL);
-std::string DecodeBase32(const std::string& str);
-std::string EncodeBase32(const unsigned char* pch, size_t len);
-std::string EncodeBase32(const std::string& str);
 void ParseParameters(int argc, const char*const argv[]);
 void FileCommit(FILE *fileout);
 bool TruncateFile(FILE *file, unsigned int length);
@@ -151,109 +103,8 @@ boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
 #endif
 boost::filesystem::path GetTempPath();
 void ShrinkDebugFile();
-int64_t GetTime();
-void SetMockTime(int64_t nMockTimeIn);
 void runCommand(std::string strCommand);
 
-inline std::string i64tostr(int64_t n)
-{
-    return strprintf("%d", n);
-}
-
-inline std::string itostr(int n)
-{
-    return strprintf("%d", n);
-}
-
-inline int64_t atoi64(const char* psz)
-{
-#ifdef _MSC_VER
-    return _atoi64(psz);
-#else
-    return strtoll(psz, NULL, 10);
-#endif
-}
-
-inline int64_t atoi64(const std::string& str)
-{
-#ifdef _MSC_VER
-    return _atoi64(str.c_str());
-#else
-    return strtoll(str.c_str(), NULL, 10);
-#endif
-}
-
-inline int atoi(const std::string& str)
-{
-    return atoi(str.c_str());
-}
-
-/**
- * Convert string to signed 32-bit integer with strict parse error feedback.
- * @returns true if the entire string could be parsed as valid integer,
- *   false if not the entire string could be parsed or when overflow or underflow occured.
- */
-bool ParseInt32(const std::string& str, int32_t *out);
-
-inline int roundint(double d)
-{
-    return (int)(d > 0 ? d + 0.5 : d - 0.5);
-}
-
-inline int64_t roundint64(double d)
-{
-    return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
-}
-
-inline int64_t abs64(int64_t n)
-{
-    return (n >= 0 ? n : -n);
-}
-
-template<typename T>
-std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
-{
-    std::string rv;
-    static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
-                                     '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
-    rv.reserve((itend-itbegin)*3);
-    for(T it = itbegin; it < itend; ++it)
-    {
-        unsigned char val = (unsigned char)(*it);
-        if(fSpaces && it != itbegin)
-            rv.push_back(' ');
-        rv.push_back(hexmap[val>>4]);
-        rv.push_back(hexmap[val&15]);
-    }
-
-    return rv;
-}
-
-template<typename T>
-inline std::string HexStr(const T& vch, bool fSpaces=false)
-{
-    return HexStr(vch.begin(), vch.end(), fSpaces);
-}
-
-/** Format a paragraph of text to a fixed width, adding spaces for
- * indentation to any added line.
- */
-std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0);
-
-inline int64_t GetTimeMillis()
-{
-    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
-            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
-}
-
-inline int64_t GetTimeMicros()
-{
-    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
-            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
-}
-
-std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
-
 inline bool IsSwitchChar(char c)
 {
 #ifdef WIN32
@@ -308,21 +159,6 @@ bool SoftSetArg(const std::string& strArg, const std::string& strValue);
  */
 bool SoftSetBoolArg(const std::string& strArg, bool fValue);
 
-/**
- * Timing-attack-resistant comparison.
- * Takes time proportional to length
- * of first argument.
- */
-template <typename T>
-bool TimingResistantEqual(const T& a, const T& b)
-{
-    if (b.size() == 0) return a.size() == 0;
-    size_t accumulator = a.size() ^ b.size();
-    for (size_t i = 0; i < a.size(); i++)
-        accumulator |= a[i] ^ b[i%b.size()];
-    return accumulator == 0;
-}
-
 void SetThreadPriority(int nPriority);
 void RenameThread(const char* name);
 
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
new file mode 100644
index 000000000000..1bd48d8d4ce4
--- /dev/null
+++ b/src/utilmoneystr.cpp
@@ -0,0 +1,75 @@
+#include "utilmoneystr.h"
+
+#include "core.h"
+#include "tinyformat.h"
+
+using namespace std;
+
+string FormatMoney(int64_t n, bool fPlus)
+{
+    // Note: not using straight sprintf here because we do NOT want
+    // localized number formatting.
+    int64_t n_abs = (n > 0 ? n : -n);
+    int64_t quotient = n_abs/COIN;
+    int64_t remainder = n_abs%COIN;
+    string str = strprintf("%d.%08d", quotient, remainder);
+
+    // Right-trim excess zeros before the decimal point:
+    int nTrim = 0;
+    for (int i = str.size()-1; (str[i] == '0' && isdigit(str[i-2])); --i)
+        ++nTrim;
+    if (nTrim)
+        str.erase(str.size()-nTrim, nTrim);
+
+    if (n < 0)
+        str.insert((unsigned int)0, 1, '-');
+    else if (fPlus && n > 0)
+        str.insert((unsigned int)0, 1, '+');
+    return str;
+}
+
+
+bool ParseMoney(const string& str, int64_t& nRet)
+{
+    return ParseMoney(str.c_str(), nRet);
+}
+
+bool ParseMoney(const char* pszIn, int64_t& nRet)
+{
+    string strWhole;
+    int64_t nUnits = 0;
+    const char* p = pszIn;
+    while (isspace(*p))
+        p++;
+    for (; *p; p++)
+    {
+        if (*p == '.')
+        {
+            p++;
+            int64_t nMult = CENT*10;
+            while (isdigit(*p) && (nMult > 0))
+            {
+                nUnits += nMult * (*p++ - '0');
+                nMult /= 10;
+            }
+            break;
+        }
+        if (isspace(*p))
+            break;
+        if (!isdigit(*p))
+            return false;
+        strWhole.insert(strWhole.end(), *p);
+    }
+    for (; *p; p++)
+        if (!isspace(*p))
+            return false;
+    if (strWhole.size() > 10) // guard against 63 bit overflow
+        return false;
+    if (nUnits < 0 || nUnits > COIN)
+        return false;
+    int64_t nWhole = atoi64(strWhole);
+    int64_t nValue = nWhole*COIN + nUnits;
+
+    nRet = nValue;
+    return true;
+}
diff --git a/src/utilmoneystr.h b/src/utilmoneystr.h
new file mode 100644
index 000000000000..f0c61aa13828
--- /dev/null
+++ b/src/utilmoneystr.h
@@ -0,0 +1,19 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+/**
+ * Money parsing/formatting utilities.
+ */
+#ifndef BITCOIN_UTILMONEYSTR_H
+#define BITCOIN_UTILMONEYSTR_H
+
+#include <stdint.h>
+#include <string>
+
+std::string FormatMoney(int64_t n, bool fPlus=false);
+bool ParseMoney(const std::string& str, int64_t& nRet);
+bool ParseMoney(const char* pszIn, int64_t& nRet);
+
+#endif // BITCOIN_UTILMONEYSTR_H
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
new file mode 100644
index 000000000000..ef1355510420
--- /dev/null
+++ b/src/utilstrencodings.cpp
@@ -0,0 +1,496 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "utilstrencodings.h"
+
+#include "tinyformat.h"
+
+#include <boost/foreach.hpp>
+#include <errno.h>
+#include <limits>
+
+using namespace std;
+
+// safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
+// even possibly remotely dangerous like & or >
+static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@");
+string SanitizeString(const string& str)
+{
+    string strResult;
+    for (std::string::size_type i = 0; i < str.size(); i++)
+    {
+        if (safeChars.find(str[i]) != std::string::npos)
+            strResult.push_back(str[i]);
+    }
+    return strResult;
+}
+
+const signed char p_util_hexdigit[256] =
+{ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,
+  -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,0xa,0xb,0xc,0xd,0xe,0xf,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+  -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, };
+
+signed char HexDigit(char c)
+{
+    return p_util_hexdigit[(unsigned char)c];
+}
+
+bool IsHex(const string& str)
+{
+    BOOST_FOREACH(char c, str)
+    {
+        if (HexDigit(c) < 0)
+            return false;
+    }
+    return (str.size() > 0) && (str.size()%2 == 0);
+}
+
+vector<unsigned char> ParseHex(const char* psz)
+{
+    // convert hex dump to vector
+    vector<unsigned char> vch;
+    while (true)
+    {
+        while (isspace(*psz))
+            psz++;
+        signed char c = HexDigit(*psz++);
+        if (c == (signed char)-1)
+            break;
+        unsigned char n = (c << 4);
+        c = HexDigit(*psz++);
+        if (c == (signed char)-1)
+            break;
+        n |= c;
+        vch.push_back(n);
+    }
+    return vch;
+}
+
+vector<unsigned char> ParseHex(const string& str)
+{
+    return ParseHex(str.c_str());
+}
+
+string EncodeBase64(const unsigned char* pch, size_t len)
+{
+    static const char *pbase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+    string strRet="";
+    strRet.reserve((len+2)/3*4);
+
+    int mode=0, left=0;
+    const unsigned char *pchEnd = pch+len;
+
+    while (pch<pchEnd)
+    {
+        int enc = *(pch++);
+        switch (mode)
+        {
+            case 0: // we have no bits
+                strRet += pbase64[enc >> 2];
+                left = (enc & 3) << 4;
+                mode = 1;
+                break;
+
+            case 1: // we have two bits
+                strRet += pbase64[left | (enc >> 4)];
+                left = (enc & 15) << 2;
+                mode = 2;
+                break;
+
+            case 2: // we have four bits
+                strRet += pbase64[left | (enc >> 6)];
+                strRet += pbase64[enc & 63];
+                mode = 0;
+                break;
+        }
+    }
+
+    if (mode)
+    {
+        strRet += pbase64[left];
+        strRet += '=';
+        if (mode == 1)
+            strRet += '=';
+    }
+
+    return strRet;
+}
+
+string EncodeBase64(const string& str)
+{
+    return EncodeBase64((const unsigned char*)str.c_str(), str.size());
+}
+
+vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
+{
+    static const int decode64_table[256] =
+    {
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1,
+        -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
+        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28,
+        29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+        49, 50, 51, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+    };
+
+    if (pfInvalid)
+        *pfInvalid = false;
+
+    vector<unsigned char> vchRet;
+    vchRet.reserve(strlen(p)*3/4);
+
+    int mode = 0;
+    int left = 0;
+
+    while (1)
+    {
+         int dec = decode64_table[(unsigned char)*p];
+         if (dec == -1) break;
+         p++;
+         switch (mode)
+         {
+             case 0: // we have no bits and get 6
+                 left = dec;
+                 mode = 1;
+                 break;
+
+              case 1: // we have 6 bits and keep 4
+                  vchRet.push_back((left<<2) | (dec>>4));
+                  left = dec & 15;
+                  mode = 2;
+                  break;
+
+             case 2: // we have 4 bits and get 6, we keep 2
+                 vchRet.push_back((left<<4) | (dec>>2));
+                 left = dec & 3;
+                 mode = 3;
+                 break;
+
+             case 3: // we have 2 bits and get 6
+                 vchRet.push_back((left<<6) | dec);
+                 mode = 0;
+                 break;
+         }
+    }
+
+    if (pfInvalid)
+        switch (mode)
+        {
+            case 0: // 4n base64 characters processed: ok
+                break;
+
+            case 1: // 4n+1 base64 character processed: impossible
+                *pfInvalid = true;
+                break;
+
+            case 2: // 4n+2 base64 characters processed: require '=='
+                if (left || p[0] != '=' || p[1] != '=' || decode64_table[(unsigned char)p[2]] != -1)
+                    *pfInvalid = true;
+                break;
+
+            case 3: // 4n+3 base64 characters processed: require '='
+                if (left || p[0] != '=' || decode64_table[(unsigned char)p[1]] != -1)
+                    *pfInvalid = true;
+                break;
+        }
+
+    return vchRet;
+}
+
+string DecodeBase64(const string& str)
+{
+    vector<unsigned char> vchRet = DecodeBase64(str.c_str());
+    return string((const char*)&vchRet[0], vchRet.size());
+}
+
+string EncodeBase32(const unsigned char* pch, size_t len)
+{
+    static const char *pbase32 = "abcdefghijklmnopqrstuvwxyz234567";
+
+    string strRet="";
+    strRet.reserve((len+4)/5*8);
+
+    int mode=0, left=0;
+    const unsigned char *pchEnd = pch+len;
+
+    while (pch<pchEnd)
+    {
+        int enc = *(pch++);
+        switch (mode)
+        {
+            case 0: // we have no bits
+                strRet += pbase32[enc >> 3];
+                left = (enc & 7) << 2;
+                mode = 1;
+                break;
+
+            case 1: // we have three bits
+                strRet += pbase32[left | (enc >> 6)];
+                strRet += pbase32[(enc >> 1) & 31];
+                left = (enc & 1) << 4;
+                mode = 2;
+                break;
+
+            case 2: // we have one bit
+                strRet += pbase32[left | (enc >> 4)];
+                left = (enc & 15) << 1;
+                mode = 3;
+                break;
+
+            case 3: // we have four bits
+                strRet += pbase32[left | (enc >> 7)];
+                strRet += pbase32[(enc >> 2) & 31];
+                left = (enc & 3) << 3;
+                mode = 4;
+                break;
+
+            case 4: // we have two bits
+                strRet += pbase32[left | (enc >> 5)];
+                strRet += pbase32[enc & 31];
+                mode = 0;
+        }
+    }
+
+    static const int nPadding[5] = {0, 6, 4, 3, 1};
+    if (mode)
+    {
+        strRet += pbase32[left];
+        for (int n=0; n<nPadding[mode]; n++)
+             strRet += '=';
+    }
+
+    return strRet;
+}
+
+string EncodeBase32(const string& str)
+{
+    return EncodeBase32((const unsigned char*)str.c_str(), str.size());
+}
+
+vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid)
+{
+    static const int decode32_table[256] =
+    {
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
+        15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1,  0,  1,  2,
+         3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
+        23, 24, 25, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+        -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+    };
+
+    if (pfInvalid)
+        *pfInvalid = false;
+
+    vector<unsigned char> vchRet;
+    vchRet.reserve((strlen(p))*5/8);
+
+    int mode = 0;
+    int left = 0;
+
+    while (1)
+    {
+         int dec = decode32_table[(unsigned char)*p];
+         if (dec == -1) break;
+         p++;
+         switch (mode)
+         {
+             case 0: // we have no bits and get 5
+                 left = dec;
+                 mode = 1;
+                 break;
+
+              case 1: // we have 5 bits and keep 2
+                  vchRet.push_back((left<<3) | (dec>>2));
+                  left = dec & 3;
+                  mode = 2;
+                  break;
+
+             case 2: // we have 2 bits and keep 7
+                 left = left << 5 | dec;
+                 mode = 3;
+                 break;
+
+             case 3: // we have 7 bits and keep 4
+                 vchRet.push_back((left<<1) | (dec>>4));
+                 left = dec & 15;
+                 mode = 4;
+                 break;
+
+             case 4: // we have 4 bits, and keep 1
+                 vchRet.push_back((left<<4) | (dec>>1));
+                 left = dec & 1;
+                 mode = 5;
+                 break;
+
+             case 5: // we have 1 bit, and keep 6
+                 left = left << 5 | dec;
+                 mode = 6;
+                 break;
+
+             case 6: // we have 6 bits, and keep 3
+                 vchRet.push_back((left<<2) | (dec>>3));
+                 left = dec & 7;
+                 mode = 7;
+                 break;
+
+             case 7: // we have 3 bits, and keep 0
+                 vchRet.push_back((left<<5) | dec);
+                 mode = 0;
+                 break;
+         }
+    }
+
+    if (pfInvalid)
+        switch (mode)
+        {
+            case 0: // 8n base32 characters processed: ok
+                break;
+
+            case 1: // 8n+1 base32 characters processed: impossible
+            case 3: //   +3
+            case 6: //   +6
+                *pfInvalid = true;
+                break;
+
+            case 2: // 8n+2 base32 characters processed: require '======'
+                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || p[4] != '=' || p[5] != '=' || decode32_table[(unsigned char)p[6]] != -1)
+                    *pfInvalid = true;
+                break;
+
+            case 4: // 8n+4 base32 characters processed: require '===='
+                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || p[3] != '=' || decode32_table[(unsigned char)p[4]] != -1)
+                    *pfInvalid = true;
+                break;
+
+            case 5: // 8n+5 base32 characters processed: require '==='
+                if (left || p[0] != '=' || p[1] != '=' || p[2] != '=' || decode32_table[(unsigned char)p[3]] != -1)
+                    *pfInvalid = true;
+                break;
+
+            case 7: // 8n+7 base32 characters processed: require '='
+                if (left || p[0] != '=' || decode32_table[(unsigned char)p[1]] != -1)
+                    *pfInvalid = true;
+                break;
+        }
+
+    return vchRet;
+}
+
+string DecodeBase32(const string& str)
+{
+    vector<unsigned char> vchRet = DecodeBase32(str.c_str());
+    return string((const char*)&vchRet[0], vchRet.size());
+}
+
+bool ParseInt32(const std::string& str, int32_t *out)
+{
+    char *endp = NULL;
+    errno = 0; // strtol will not set errno if valid
+    long int n = strtol(str.c_str(), &endp, 10);
+    if(out) *out = (int)n;
+    // Note that strtol returns a *long int*, so even if strtol doesn't report a over/underflow
+    // we still have to check that the returned value is within the range of an *int32_t*. On 64-bit
+    // platforms the size of these types may be different.
+    return endp && *endp == 0 && !errno &&
+        n >= std::numeric_limits<int32_t>::min() &&
+        n <= std::numeric_limits<int32_t>::max();
+}
+
+std::string FormatParagraph(const std::string in, size_t width, size_t indent)
+{
+    std::stringstream out;
+    size_t col = 0;
+    size_t ptr = 0;
+    while(ptr < in.size())
+    {
+        // Find beginning of next word
+        ptr = in.find_first_not_of(' ', ptr);
+        if (ptr == std::string::npos)
+            break;
+        // Find end of next word
+        size_t endword = in.find_first_of(' ', ptr);
+        if (endword == std::string::npos)
+            endword = in.size();
+        // Add newline and indentation if this wraps over the allowed width
+        if (col > 0)
+        {
+            if ((col + endword - ptr) > width)
+            {
+                out << '\n';
+                for(size_t i=0; i<indent; ++i)
+                    out << ' ';
+                col = 0;
+            } else
+                out << ' ';
+        }
+        // Append word
+        out << in.substr(ptr, endword - ptr);
+        col += endword - ptr;
+        ptr = endword;
+    }
+    return out.str();
+}
+
+std::string i64tostr(int64_t n)
+{
+    return strprintf("%d", n);
+}
+
+std::string itostr(int n)
+{
+    return strprintf("%d", n);
+}
+
+int64_t atoi64(const char* psz)
+{
+#ifdef _MSC_VER
+    return _atoi64(psz);
+#else
+    return strtoll(psz, NULL, 10);
+#endif
+}
+
+int64_t atoi64(const std::string& str)
+{
+#ifdef _MSC_VER
+    return _atoi64(str.c_str());
+#else
+    return strtoll(str.c_str(), NULL, 10);
+#endif
+}
+
+int atoi(const std::string& str)
+{
+    return atoi(str.c_str());
+}
diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h
new file mode 100644
index 000000000000..0b8c1a17818a
--- /dev/null
+++ b/src/utilstrencodings.h
@@ -0,0 +1,97 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+/**
+ * Utilities for converting data from/to strings.
+ */
+#ifndef BITCOIN_UTILSTRENCODINGS_H
+#define BITCOIN_UTILSTRENCODINGS_H
+
+#include <stdint.h>
+#include <string>
+#include <vector>
+
+#define BEGIN(a)            ((char*)&(a))
+#define END(a)              ((char*)&((&(a))[1]))
+#define UBEGIN(a)           ((unsigned char*)&(a))
+#define UEND(a)             ((unsigned char*)&((&(a))[1]))
+#define ARRAYLEN(array)     (sizeof(array)/sizeof((array)[0]))
+
+// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
+#define PAIRTYPE(t1, t2)    std::pair<t1, t2>
+
+std::string SanitizeString(const std::string& str);
+std::vector<unsigned char> ParseHex(const char* psz);
+std::vector<unsigned char> ParseHex(const std::string& str);
+signed char HexDigit(char c);
+bool IsHex(const std::string& str);
+std::vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid = NULL);
+std::string DecodeBase64(const std::string& str);
+std::string EncodeBase64(const unsigned char* pch, size_t len);
+std::string EncodeBase64(const std::string& str);
+std::vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid = NULL);
+std::string DecodeBase32(const std::string& str);
+std::string EncodeBase32(const unsigned char* pch, size_t len);
+std::string EncodeBase32(const std::string& str);
+
+std::string i64tostr(int64_t n);
+std::string itostr(int n);
+int64_t atoi64(const char* psz);
+int64_t atoi64(const std::string& str);
+int atoi(const std::string& str);
+
+/**
+ * Convert string to signed 32-bit integer with strict parse error feedback.
+ * @returns true if the entire string could be parsed as valid integer,
+ *   false if not the entire string could be parsed or when overflow or underflow occured.
+ */
+bool ParseInt32(const std::string& str, int32_t *out);
+
+template<typename T>
+std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)
+{
+    std::string rv;
+    static const char hexmap[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
+                                     '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
+    rv.reserve((itend-itbegin)*3);
+    for(T it = itbegin; it < itend; ++it)
+    {
+        unsigned char val = (unsigned char)(*it);
+        if(fSpaces && it != itbegin)
+            rv.push_back(' ');
+        rv.push_back(hexmap[val>>4]);
+        rv.push_back(hexmap[val&15]);
+    }
+
+    return rv;
+}
+
+template<typename T>
+inline std::string HexStr(const T& vch, bool fSpaces=false)
+{
+    return HexStr(vch.begin(), vch.end(), fSpaces);
+}
+
+/** Format a paragraph of text to a fixed width, adding spaces for
+ * indentation to any added line.
+ */
+std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0);
+
+/**
+ * Timing-attack-resistant comparison.
+ * Takes time proportional to length
+ * of first argument.
+ */
+template <typename T>
+bool TimingResistantEqual(const T& a, const T& b)
+{
+    if (b.size() == 0) return a.size() == 0;
+    size_t accumulator = a.size() ^ b.size();
+    for (size_t i = 0; i < a.size(); i++)
+        accumulator |= a[i] ^ b[i%b.size()];
+    return accumulator == 0;
+}
+
+#endif // BITCOIN_UTILSTRENCODINGS_H
diff --git a/src/utiltime.cpp b/src/utiltime.cpp
new file mode 100644
index 000000000000..78f0342cbab3
--- /dev/null
+++ b/src/utiltime.cpp
@@ -0,0 +1,66 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+#endif
+
+#include "utiltime.h"
+
+#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/thread.hpp>
+
+using namespace std;
+
+static int64_t nMockTime = 0;  // For unit testing
+
+int64_t GetTime()
+{
+    if (nMockTime) return nMockTime;
+
+    return time(NULL);
+}
+
+void SetMockTime(int64_t nMockTimeIn)
+{
+    nMockTime = nMockTimeIn;
+}
+
+int64_t GetTimeMillis()
+{
+    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
+            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_milliseconds();
+}
+
+int64_t GetTimeMicros()
+{
+    return (boost::posix_time::ptime(boost::posix_time::microsec_clock::universal_time()) -
+            boost::posix_time::ptime(boost::gregorian::date(1970,1,1))).total_microseconds();
+}
+
+void MilliSleep(int64_t n)
+{
+// Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
+// until fixed in 1.52. Use the deprecated sleep method for the broken case.
+// See: https://svn.boost.org/trac/boost/ticket/7238
+#if defined(HAVE_WORKING_BOOST_SLEEP_FOR)
+    boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
+#elif defined(HAVE_WORKING_BOOST_SLEEP)
+    boost::this_thread::sleep(boost::posix_time::milliseconds(n));
+#else
+//should never get here
+#error missing boost sleep implementation
+#endif
+}
+
+std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
+{
+    // std::locale takes ownership of the pointer
+    std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat));
+    std::stringstream ss;
+    ss.imbue(loc);
+    ss << boost::posix_time::from_time_t(nTime);
+    return ss.str();
+}
diff --git a/src/utiltime.h b/src/utiltime.h
new file mode 100644
index 000000000000..500ae4dab97e
--- /dev/null
+++ b/src/utiltime.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_UTILTIME_H
+#define BITCOIN_UTILTIME_H
+
+#include <stdint.h>
+#include <string>
+
+int64_t GetTime();
+int64_t GetTimeMillis();
+int64_t GetTimeMicros();
+void SetMockTime(int64_t nMockTimeIn);
+void MilliSleep(int64_t n);
+
+std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
+
+#endif
diff --git a/src/wallet.cpp b/src/wallet.cpp
index ee4793b3f187..91f7eaa560a8 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -10,8 +10,11 @@
 #include "coincontrol.h"
 #include "net.h"
 #include "timedata.h"
+#include "util.h"
+#include "utilmoneystr.h"
 
 #include <boost/algorithm/string/replace.hpp>
+#include <boost/thread.hpp>
 
 using namespace std;
 
@@ -37,6 +40,11 @@ struct CompareValueOnly
     }
 };
 
+std::string COutput::ToString() const
+{
+    return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
+}
+
 const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const
 {
     LOCK(cs_wallet);
diff --git a/src/wallet.h b/src/wallet.h
index 7cbbb2a6ed60..bdb026472932 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -11,7 +11,6 @@
 #include "keystore.h"
 #include "main.h"
 #include "ui_interface.h"
-#include "util.h"
 #include "walletdb.h"
 
 #include <algorithm>
@@ -812,10 +811,7 @@ class COutput
         tx = txIn; i = iIn; nDepth = nDepthIn; fSpendable = fSpendableIn;
     }
 
-    std::string ToString() const
-    {
-        return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
-    }
+    std::string ToString() const;
 };
 
 
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index a95baf83d0dd..2fa607165855 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -9,10 +9,13 @@
 #include "protocol.h"
 #include "serialize.h"
 #include "sync.h"
+#include "utiltime.h"
+#include "util.h"
 #include "wallet.h"
 
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
+#include <boost/thread.hpp>
 
 using namespace std;
 using namespace boost;

From f30801afbde7598318a5b03de9812c58a6a34f33 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 26 Aug 2014 17:44:57 +0200
Subject: [PATCH 0597/1819] qt: Add null check in setClientModel(0)

Don't clear tray icon menu if it was never created.
Necessary precaution after #4649.
---
 src/qt/bitcoingui.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 68d42ce64ba3..790301a1eb93 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -455,8 +455,11 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
     } else {
         // Disable possibility to show main window via action
         toggleHideAction->setEnabled(false);
-        // Disable context menu on tray icon
-        trayIconMenu->clear();
+        if(trayIconMenu)
+        {
+            // Disable context menu on tray icon
+            trayIconMenu->clear();
+        }
     }
 }
 

From 80daee0fb585762d303503f32f8efa0e625f152f Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 17 Aug 2014 02:34:42 +0200
Subject: [PATCH 0598/1819] [Qt] Call checkBalanceChanged() periodically
 instead for every updated transaction

---
 src/qt/walletmodel.cpp | 18 +++++++++++-------
 src/qt/walletmodel.h   |  1 +
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 92c22f5692d6..530c46cdb49d 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -36,6 +36,7 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
 {
     fProcessingQueuedTransactions = false;
     fHaveWatchOnly = wallet->HaveWatchOnly();
+    fForceCheckBalanceChanged = false;
 
     addressTableModel = new AddressTableModel(wallet, this);
     transactionTableModel = new TransactionTableModel(wallet, this);
@@ -121,8 +122,10 @@ void WalletModel::pollBalanceChanged()
     if(!lockWallet)
         return;
 
-    if(chainActive.Height() != cachedNumBlocks)
+    if(fForceCheckBalanceChanged || chainActive.Height() != cachedNumBlocks)
     {
+        fForceCheckBalanceChanged = false;
+
         // Balance and number of transactions might have changed
         cachedNumBlocks = chainActive.Height();
 
@@ -167,7 +170,7 @@ void WalletModel::updateTransaction(const QString &hash, int status)
         transactionTableModel->updateTransaction(hash, status);
 
     // Balance and number of transactions might have changed
-    checkBalanceChanged();
+    fForceCheckBalanceChanged = true;
 }
 
 void WalletModel::updateAddressBook(const QString &address, const QString &label,
@@ -344,6 +347,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
         }
         emit coinsSent(wallet, rcp, transaction_array);
     }
+    checkBalanceChanged(); // update balance immediately, otherwise there could be a short noticeable delay until pollBalanceChanged hits
 
     return SendCoinsReturn(OK);
 }
@@ -473,11 +477,6 @@ static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet,
 
 static void ShowProgress(WalletModel *walletmodel, const std::string &title, int nProgress)
 {
-    // emits signal "showProgress"
-    QMetaObject::invokeMethod(walletmodel, "showProgress", Qt::QueuedConnection,
-                              Q_ARG(QString, QString::fromStdString(title)),
-                              Q_ARG(int, nProgress));
-
     if (nProgress == 0)
         fQueueNotifications = true;
 
@@ -495,6 +494,11 @@ static void ShowProgress(WalletModel *walletmodel, const std::string &title, int
         }
         std::vector<std::pair<uint256, ChangeType> >().swap(vQueueNotifications); // clear
     }
+
+    // emits signal "showProgress"
+    QMetaObject::invokeMethod(walletmodel, "showProgress", Qt::QueuedConnection,
+                              Q_ARG(QString, QString::fromStdString(title)),
+                              Q_ARG(int, nProgress));
 }
 
 static void NotifyWatchonlyChanged(WalletModel *walletmodel, bool fHaveWatchonly)
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index b3a401e4cc94..b277b0e9fc8a 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -199,6 +199,7 @@ class WalletModel : public QObject
     CWallet *wallet;
     bool fProcessingQueuedTransactions;
     bool fHaveWatchOnly;
+    bool fForceCheckBalanceChanged;
 
     // Wallet has an options model for wallet-specific options
     // (transaction fee, for example)

From 9f7f504efca27c7d390f121410846b45c1732761 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 26 Aug 2014 15:17:18 -0400
Subject: [PATCH 0599/1819] build: add -DMINIUPNP_STATICLIB for new version

libminiupnpc changed their required static define to the much more sane
"MINIUPNP_STATICLIB". Sadly, they don't respect the old "STATICLIB" for
back-compat. Define them both since the old one didn't seem to be conflicting
anywhere.

Also go ahead and split out the cppflags so that they can be applied only where
they're needed. This will help us to build dll's from our libs without having
their import/export declspecs poisoned.
---
 configure.ac    | 3 ++-
 src/Makefile.am | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 700f4ab70950..dbf7db3a4628 100644
--- a/configure.ac
+++ b/configure.ac
@@ -690,7 +690,7 @@ else
     AC_MSG_RESULT($use_upnp_default)
     AC_DEFINE_UNQUOTED([USE_UPNP],[$upnp_setting],[UPnP support not compiled if undefined, otherwise value (0 or 1) determines default state])
     if test x$TARGET_OS = xwindows; then
-      CPPFLAGS="$CPPFLAGS -DSTATICLIB"
+      MINIUPNPC_CPPFLAGS="-DSTATICLIB -DMINIUPNP_STATICLIB"
     fi
   else
     AC_MSG_RESULT(no)
@@ -794,6 +794,7 @@ AC_SUBST(LEVELDB_TARGET_FLAGS)
 AC_SUBST(BUILD_TEST)
 AC_SUBST(BUILD_QT)
 AC_SUBST(BUILD_TEST_QT)
+AC_SUBST(MINIUPNPC_CPPFLAGS)
 AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
diff --git a/src/Makefile.am b/src/Makefile.am
index 655bfc88c3be..35fca6570f85 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -135,7 +135,7 @@ obj/build.h: FORCE
 libbitcoin_util_a-version.$(OBJEXT): obj/build.h
 
 # server: shared between bitcoind and bitcoin-qt
-libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES)
+libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
 libbitcoin_server_a_SOURCES = \
   addrman.cpp \
   alert.cpp \

From f628127887ce0b3ac0322ba2c49f9b0865451989 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 26 Aug 2014 15:17:58 -0400
Subject: [PATCH 0600/1819] depends: bump openssl to 1.0.1i

This is the forward-port of bba01750226745d6666d587cabe57c321fde0875.
---
 depends/packages/openssl.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 1fb8edb09910..b1dcc6f81fa5 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -1,8 +1,8 @@
 package=openssl
-$(package)_version=1.0.1h
+$(package)_version=1.0.1i
 $(package)_download_path=https://www.openssl.org/source
 $(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093
+$(package)_sha256_hash=3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7
 
 define $(package)_set_vars
 $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"

From b144a74a08a856997f48a3c83f0bd080cf9432f9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 26 Aug 2014 15:17:43 -0400
Subject: [PATCH 0601/1819] depends: bump miniupnpc to 1.9.20140701.

This is the forward-port of a9c6eef915ee264ccf4169d5e8769a6be1fa101a
---
 depends/packages/miniupnpc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
index 6dd7d93b07ba..30f2d3f31588 100644
--- a/depends/packages/miniupnpc.mk
+++ b/depends/packages/miniupnpc.mk
@@ -1,8 +1,8 @@
 package=miniupnpc
-$(package)_version=1.9
+$(package)_version=1.9.20140701
 $(package)_download_path=http://miniupnp.free.fr/files
 $(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464
+$(package)_sha256_hash=26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07
 
 define $(package)_set_vars
 $(package)_build_opts=CC="$($(package)_cc)"

From 2e280311b87ac95a765edd3cac05096e48c73545 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 27 Aug 2014 09:20:33 +0200
Subject: [PATCH 0602/1819] Perform CVerifyDB on pcoinsdbview instead of
 pcoinsTip

Bypassing the main coins cache allows more thorough checking with the same
memory budget.

This has no effect on performance because everything ends up in the child
cache created by VerifyDB itself.

It has bugged me ever since #4675, which effectively reduced the
number of checked blocks to reduce peak memory usage.

- Pass the coinsview to use as argument to VerifyDB

- This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
  writes a large slew of unchanged coin records back to the database.
---
 src/init.cpp          | 2 +-
 src/main.cpp          | 4 ++--
 src/main.h            | 2 +-
 src/rpcblockchain.cpp | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index e972413c4b9c..7b1318654fc7 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -969,7 +969,7 @@ bool AppInit2(boost::thread_group& threadGroup)
                 }
 
                 uiInterface.InitMessage(_("Verifying blocks..."));
-                if (!CVerifyDB().VerifyDB(GetArg("-checklevel", 3),
+                if (!CVerifyDB().VerifyDB(pcoinsdbview, GetArg("-checklevel", 3),
                               GetArg("-checkblocks", 288))) {
                     strLoadError = _("Corrupted block database detected");
                     break;
diff --git a/src/main.cpp b/src/main.cpp
index 6567c77e9300..de5730a38849 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3018,7 +3018,7 @@ CVerifyDB::~CVerifyDB()
     uiInterface.ShowProgress("", 100);
 }
 
-bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
+bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth)
 {
     LOCK(cs_main);
     if (chainActive.Tip() == NULL || chainActive.Tip()->pprev == NULL)
@@ -3031,7 +3031,7 @@ bool CVerifyDB::VerifyDB(int nCheckLevel, int nCheckDepth)
         nCheckDepth = chainActive.Height();
     nCheckLevel = std::max(0, std::min(4, nCheckLevel));
     LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);
-    CCoinsViewCache coins(*pcoinsTip, true);
+    CCoinsViewCache coins(*coinsview, true);
     CBlockIndex* pindexState = chainActive.Tip();
     CBlockIndex* pindexFailure = NULL;
     int nGoodTransactions = 0;
diff --git a/src/main.h b/src/main.h
index e5357cbfddd7..fae8990d20f7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -942,7 +942,7 @@ class CVerifyDB {
 public:
     CVerifyDB();
     ~CVerifyDB();
-    bool VerifyDB(int nCheckLevel, int nCheckDepth);
+    bool VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth);
 };
 
 /** An in-memory indexed chain of blocks. */
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 58cab140454b..b71d5a080436 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -430,7 +430,7 @@ Value verifychain(const Array& params, bool fHelp)
     if (params.size() > 1)
         nCheckDepth = params[1].get_int();
 
-    return CVerifyDB().VerifyDB(nCheckLevel, nCheckDepth);
+    return CVerifyDB().VerifyDB(pcoinsTip, nCheckLevel, nCheckDepth);
 }
 
 Value getblockchaininfo(const Array& params, bool fHelp)

From df7565d99c4baca212db6bf1d75b097a7ec58475 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 27 Aug 2014 03:40:30 -0400
Subject: [PATCH 0603/1819] depends: add sensible download timeout/retry values

---
 depends/Makefile           | 2 ++
 depends/builders/darwin.mk | 2 +-
 depends/builders/linux.mk  | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/depends/Makefile b/depends/Makefile
index 8075c66b78c2..f5fb5b865f46 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -13,6 +13,8 @@ HOST ?= $(BUILD)
 PATCHES_PATH = $(BASEDIR)/patches
 BASEDIR = $(CURDIR)
 HASH_LENGTH:=11
+DOWNLOAD_CONNECT_TIMEOUT:=10
+DOWNLOAD_RETRIES:=3
 
 host:=$(BUILD)
 ifneq ($(HOST),)
diff --git a/depends/builders/darwin.mk b/depends/builders/darwin.mk
index 6b734648f0ed..b366460e64bc 100644
--- a/depends/builders/darwin.mk
+++ b/depends/builders/darwin.mk
@@ -7,7 +7,7 @@ build_darwin_OTOOL: = $(shell xcrun -f otool)
 build_darwin_NM: = $(shell xcrun -f nm)
 build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
 build_darwin_SHA256SUM = shasum -a 256
-build_darwin_DOWNLOAD = curl -L -o
+build_darwin_DOWNLOAD = curl --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -L -o
 
 #darwin host on darwin builder. overrides darwin host preferences.
 darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION)
diff --git a/depends/builders/linux.mk b/depends/builders/linux.mk
index d98ba597dc7c..98d0e9de348f 100644
--- a/depends/builders/linux.mk
+++ b/depends/builders/linux.mk
@@ -1,2 +1,2 @@
 build_linux_SHA256SUM = sha256sum
-build_linux_DOWNLOAD = wget -nv -O
+build_linux_DOWNLOAD = wget --timeout=$(DOWNLOAD_CONNECT_TIMEOUT) --tries=$(DOWNLOAD_RETRIES) -nv -O

From 70352e11c0194fe4e71efea06220544749f4cd64 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 27 Aug 2014 18:04:09 +0200
Subject: [PATCH 0604/1819] Revert "Add a getutxos command to the p2p protocol.
 It allows querying of the UTXO set"

This reverts commit da2ec100f3681176f60dec6dc675fc64147ade3a.
---
 src/main.cpp   | 86 --------------------------------------------------
 src/net.cpp    |  2 +-
 src/protocol.h |  1 -
 src/version.h  |  2 +-
 4 files changed, 2 insertions(+), 89 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 6567c77e9300..7dd1c2c068fe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -20,7 +20,6 @@
 
 #include <sstream>
 
-#include <boost/dynamic_bitset.hpp>
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
@@ -3519,75 +3518,6 @@ void static ProcessGetData(CNode* pfrom)
     }
 }
 
-struct CCoin {
-    uint32_t nTxVer;   // Don't call this nVersion, that name has a special meaning inside IMPLEMENT_SERIALIZE
-    uint32_t nHeight;
-    CTxOut out;
-
-    IMPLEMENT_SERIALIZE(
-        READWRITE(nTxVer);
-        READWRITE(nHeight);
-        READWRITE(out);
-    )
-};
-
-bool ProcessGetUTXOs(const vector<COutPoint> &vOutPoints, bool fCheckMemPool, vector<unsigned char> *result, vector<CCoin> *resultCoins)
-{
-    // Defined by BIP 64.
-    //
-    // Allows a peer to retrieve the CTxOut structures corresponding to the given COutPoints. 
-    // Note that this data is not authenticated by anything: this code could just invent any
-    // old rubbish and hand it back, with the peer being unable to tell unless they are checking
-    // the outpoints against some out of band data.
-    //
-    // Also the answer could change the moment after we give it. However some apps can tolerate
-    // this, because they're only using the result as a hint or are willing to trust the results
-    // based on something else. For example we may be a "trusted node" for the peer, or it may
-    // be checking the results given by several nodes for consistency, it may
-    // run the UTXOs returned against scriptSigs of transactions obtained elsewhere (after checking
-    // for a standard script form), and because the height in which the UTXO was defined is provided
-    // a client that has a map of heights to block headers (as SPV clients do, for recent blocks)
-    // can request the creating block via hash.
-    //
-    // IMPORTANT: Clients expect ordering to be preserved!
-    if (vOutPoints.size() > MAX_INV_SZ)
-        return error("message getutxos size() = %u", vOutPoints.size());
-
-    LogPrint("net", "getutxos for %d queries %s mempool\n", vOutPoints.size(), fCheckMemPool ? "with" : "without");
-
-    boost::dynamic_bitset<unsigned char> hits(vOutPoints.size());
-    {
-        LOCK2(cs_main, mempool.cs);
-        CCoinsViewMemPool cvMemPool(*pcoinsTip, mempool);
-        CCoinsViewCache view(fCheckMemPool ? cvMemPool : *pcoinsTip);
-        for (size_t i = 0; i < vOutPoints.size(); i++)
-        {
-            CCoins coins;
-            uint256 hash = vOutPoints[i].hash;
-            if (view.GetCoins(hash, coins))
-            {
-                mempool.pruneSpent(hash, coins);
-                if (coins.IsAvailable(vOutPoints[i].n))
-                {
-                    hits[i] = true;
-                    // Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
-                    // n is valid but points to an already spent output (IsNull).
-                    CCoin coin;
-                    coin.nTxVer = coins.nVersion;
-                    coin.nHeight = coins.nHeight;
-                    coin.out = coins.vout.at(vOutPoints[i].n);
-                    assert(!coin.out.IsNull());
-                    resultCoins->push_back(coin);
-                }
-            }
-        }
-    }
-
-    boost::to_block_range(hits, std::back_inserter(*result));
-    return true;
-}
-
-
 bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived)
 {
     RandAddSeedPerfmon();
@@ -3936,22 +3866,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
-    else if (strCommand == "getutxos")
-    {
-        bool fCheckMemPool;
-        vector<COutPoint> vOutPoints;
-        vRecv >> fCheckMemPool;
-        vRecv >> vOutPoints;
-
-        vector<unsigned char> bitmap;
-        vector<CCoin> outs;
-        if (ProcessGetUTXOs(vOutPoints, fCheckMemPool, &bitmap, &outs))
-            pfrom->PushMessage("utxos", chainActive.Height(), chainActive.Tip()->GetBlockHash(), bitmap, outs);
-        else
-            Misbehaving(pfrom->GetId(), 20);
-    }
-
-
     else if (strCommand == "tx")
     {
         vector<uint256> vWorkQueue;
diff --git a/src/net.cpp b/src/net.cpp
index e2adba851755..39667062075a 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -67,7 +67,7 @@ namespace {
 //
 bool fDiscover = true;
 bool fListen = true;
-uint64_t nLocalServices = NODE_NETWORK | NODE_GETUTXOS;
+uint64_t nLocalServices = NODE_NETWORK;
 CCriticalSection cs_mapLocalHost;
 map<CNetAddr, LocalServiceInfo> mapLocalHost;
 static bool vfReachable[NET_MAX] = {};
diff --git a/src/protocol.h b/src/protocol.h
index 94d313e9c040..d7565584af57 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -64,7 +64,6 @@ class CMessageHeader
 enum
 {
     NODE_NETWORK = (1 << 0),
-    NODE_GETUTXOS = (1 << 1),
 
     // Bits 24-31 are reserved for temporary experiments. Just pick a bit that
     // isn't getting used, or one not being used much, and notify the
diff --git a/src/version.h b/src/version.h
index 3a6c0f37193b..b87aa8258cf1 100644
--- a/src/version.h
+++ b/src/version.h
@@ -27,7 +27,7 @@ extern const std::string CLIENT_DATE;
 // network protocol versioning
 //
 
-static const int PROTOCOL_VERSION = 70003;
+static const int PROTOCOL_VERSION = 70002;
 
 // initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;

From d2d6f708e486caff1b53b6e75a577db794514604 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 01:23:13 +0200
Subject: [PATCH 0605/1819] Fix build with DEBUG_LOCKORDER

Fixes #4771
---
 src/sync.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sync.cpp b/src/sync.cpp
index e624a9ee8499..066c1ca7446d 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -5,8 +5,11 @@
 #include "sync.h"
 
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
+#include <boost/thread.hpp>
+#include <stdio.h>
 
 #ifdef DEBUG_LOCKCONTENTION
 void PrintLockContention(const char* pszName, const char* pszFile, int nLine)

From 87d9819d4dd7c11a07241b6ea5ca7bd622ce5cc8 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 27 Aug 2014 17:47:17 +0200
Subject: [PATCH 0606/1819] fix comments ExtractAddress() ->
 ExtractDestination()

---
 src/test/multisig_tests.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 2a0466e92899..02c6d095f2a0 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -164,9 +164,9 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
     // Tests Solver() that returns lists of keys that are
     // required to satisfy a ScriptPubKey
     //
-    // Also tests IsMine() and ExtractAddress()
+    // Also tests IsMine() and ExtractDestination()
     //
-    // Note: ExtractAddress for the multisignature transactions
+    // Note: ExtractDestination for the multisignature transactions
     // always returns false for this release, even if you have
     // one key that would satisfy an (a|b) or 2-of-3 keys needed
     // to spend an escrow transaction.

From 11a899445edf3e07317eb312d3c1d9c71c06f618 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Wed, 27 Aug 2014 22:39:01 -0400
Subject: [PATCH 0607/1819] qt/splashscreen: #include version.h

Needed to build breakage reported by Arnavion on IRC:
qt/splashscreen.cpp: In constructor 'SplashScreen::SplashScreen(const QPixmap&, Qt::WindowFlags, bool)':
qt/splashscreen.cpp:33:98: error: 'FormatFullVersion' was not declared in this scope
---
 src/qt/splashscreen.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 1162e2d87f5a..5dd110b36a82 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -4,6 +4,7 @@
 
 #include "splashscreen.h"
 
+#include "version.h"
 #include "clientversion.h"
 #include "init.h"
 #include "ui_interface.h"

From 5a0823a09bbd01a16725ff21e433c285ffc2849a Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Tue, 26 Aug 2014 21:10:52 +1200
Subject: [PATCH 0608/1819] Add travis build:passing/failing indicator.

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index 081af80dcf1f..43be738c6262 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
 Bitcoin Core integration/staging tree
 =====================================
 
+[![Build Status](https://travis-ci.org/bitcoin/bitcoin.svg?branch=master)](https://travis-ci.org/bitcoin/bitcoin)
+
 https://www.bitcoin.org
 
 Copyright (c) 2009-2014 Bitcoin Core Developers

From 8bdd2877c4f959b0c4b93f3d9d1f465fb4960f3f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 15:28:57 +0200
Subject: [PATCH 0609/1819] Fix a few "Uninitialized scalar field" warnings

Fix a few warnings reported by Coverity.
None of these is critical, but making sure that class fields are
initialized can avoid heisenbugs.
---
 src/bloom.h       | 2 +-
 src/db.cpp        | 2 +-
 src/key.h         | 2 +-
 src/main.h        | 4 ++--
 src/txmempool.cpp | 7 +++++--
 src/wallet.h      | 1 +
 6 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/bloom.h b/src/bloom.h
index d0caf9e9fafb..54d16d712690 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -60,7 +60,7 @@ class CBloomFilter
     // It should generally always be a random value (and is largely only exposed for unit testing)
     // nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)
     CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
-    CBloomFilter() : isFull(true) {}
+    CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
 
     IMPLEMENT_SERIALIZE
     (
diff --git a/src/db.cpp b/src/db.cpp
index 8c139843a181..23d2cc988db1 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -227,10 +227,10 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
     pdb(NULL), activeTxn(NULL)
 {
     int ret;
+    fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
     if (pszFile == NULL)
         return;
 
-    fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
     bool fCreate = strchr(pszMode, 'c');
     unsigned int nFlags = DB_THREAD;
     if (fCreate)
diff --git a/src/key.h b/src/key.h
index 11dc65de8ccb..1de83cc73889 100644
--- a/src/key.h
+++ b/src/key.h
@@ -189,7 +189,7 @@ class CKey {
 public:
 
     // Construct an invalid private key.
-    CKey() : fValid(false) {
+    CKey() : fValid(false), fCompressed(false) {
         LockObject(vch);
     }
 
diff --git a/src/main.h b/src/main.h
index 0a1ff45460a2..3160b28c4911 100644
--- a/src/main.h
+++ b/src/main.h
@@ -328,7 +328,7 @@ class CScriptCheck
     int nHashType;
 
 public:
-    CScriptCheck() {}
+    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), nHashType(0) {}
     CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, int nHashTypeIn) :
         scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey),
         ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), nHashType(nHashTypeIn) { }
@@ -876,7 +876,7 @@ class CValidationState {
     unsigned char chRejectCode;
     bool corruptionPossible;
 public:
-    CValidationState() : mode(MODE_VALID), nDoS(0), corruptionPossible(false) {}
+    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) {
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 8af1f1c91b12..238d5bab1676 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -11,7 +11,8 @@
 
 using namespace std;
 
-CTxMemPoolEntry::CTxMemPoolEntry()
+CTxMemPoolEntry::CTxMemPoolEntry():
+    nFee(0), nTxSize(0), nTime(0), dPriority(0.0)
 {
     nHeight = MEMPOOL_HEIGHT;
 }
@@ -345,7 +346,9 @@ class CMinerPolicyEstimator
 };
 
 
-CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) : minRelayFee(_minRelayFee)
+CTxMemPool::CTxMemPool(const CFeeRate& _minRelayFee) :
+    nTransactionsUpdated(0),
+    minRelayFee(_minRelayFee)
 {
     // Sanity checks off by default for performance, because otherwise
     // accepting transactions becomes O(N^2) where N is the number
diff --git a/src/wallet.h b/src/wallet.h
index 052da246097e..b3878adb1ed9 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -905,6 +905,7 @@ class CAccountingEntry
         strOtherAccount.clear();
         strComment.clear();
         nOrderPos = -1;
+        nEntryNo = 0;
     }
 
     IMPLEMENT_SERIALIZE

From 093303a8874dc3384c4f7f770d2ee2618e3f3885 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 28 Aug 2014 22:21:03 +0200
Subject: [PATCH 0610/1819] add missing header end comments

- ensures a consistent usage in header files
- also add a blank line after the copyright header where missing
- also remove orphan new-lines at the end of some files
---
 src/addrman.h         | 4 ++--
 src/alert.h           | 4 ++--
 src/allocators.h      | 2 +-
 src/bitcoin-tx.cpp    | 1 -
 src/bloom.h           | 2 +-
 src/chainparams.h     | 2 +-
 src/chainparamsbase.h | 2 +-
 src/checkpoints.h     | 2 +-
 src/checkqueue.h      | 2 +-
 src/coins.h           | 3 ++-
 src/core.h            | 2 +-
 src/core_read.cpp     | 1 -
 src/core_write.cpp    | 1 -
 src/crypter.h         | 2 +-
 src/hash.h            | 2 +-
 src/init.h            | 2 +-
 src/key.h             | 2 +-
 src/keystore.h        | 2 +-
 src/limitedmap.h      | 2 +-
 src/main.h            | 2 +-
 src/mruset.h          | 2 +-
 src/net.h             | 2 +-
 src/netbase.h         | 2 +-
 src/noui.h            | 2 +-
 src/pow.h             | 3 +--
 src/rpcclient.h       | 4 ++--
 src/rpcprotocol.h     | 4 ++--
 src/rpcserver.h       | 4 ++--
 src/script.h          | 2 +-
 src/serialize.h       | 2 +-
 src/sync.h            | 2 +-
 src/threadsafety.h    | 1 +
 src/timedata.h        | 2 +-
 src/txmempool.h       | 3 ++-
 src/ui_interface.h    | 2 +-
 src/uint256.h         | 2 +-
 src/util.h            | 2 +-
 src/utiltime.h        | 2 +-
 src/version.h         | 3 ++-
 src/wallet.h          | 3 ++-
 src/walletdb.h        | 1 +
 41 files changed, 47 insertions(+), 45 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 052d364655fe..8f6ab6066268 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOIN_ADDRMAN
-#define _BITCOIN_ADDRMAN 1
+#define _BITCOIN_ADDRMAN
 
 #include "netbase.h"
 #include "protocol.h"
@@ -503,4 +503,4 @@ class CAddrMan
     }
 };
 
-#endif
+#endif // _BITCOIN_ADDRMAN
diff --git a/src/alert.h b/src/alert.h
index b9d850b565a6..d8254ba2cbda 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOINALERT_H_
-#define _BITCOINALERT_H_ 1
+#define _BITCOINALERT_H_
 
 #include "serialize.h"
 #include "sync.h"
@@ -105,4 +105,4 @@ class CAlert : public CUnsignedAlert
     static CAlert getAlertByHash(const uint256 &hash);
 };
 
-#endif
+#endif // _BITCOINALERT_H_
diff --git a/src/allocators.h b/src/allocators.h
index be0be7ab9637..0b1c9fea683a 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -252,4 +252,4 @@ struct zero_after_free_allocator : public std::allocator<T>
 // This is exactly like std::string, but with a custom allocator.
 typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;
 
-#endif
+#endif // BITCOIN_ALLOCATORS_H
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 75f0fb69f26e..5f547bba8362 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -619,4 +619,3 @@ int main(int argc, char* argv[])
     }
     return ret;
 }
-
diff --git a/src/bloom.h b/src/bloom.h
index d0caf9e9fafb..1c9c10325376 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -91,4 +91,4 @@ class CBloomFilter
     void UpdateEmptyFull();
 };
 
-#endif /* BITCOIN_BLOOM_H */
+#endif // BITCOIN_BLOOM_H
diff --git a/src/chainparams.h b/src/chainparams.h
index 446256ba82a7..95b972bd7f26 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -120,4 +120,4 @@ void SelectParams(CBaseChainParams::Network network);
  */
 bool SelectParamsFromCommandLine();
 
-#endif
+#endif // BITCOIN_CHAIN_PARAMS_H
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 4398f6954805..2d3a07b44ab0 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -55,4 +55,4 @@ bool SelectBaseParamsFromCommandLine();
  */
 bool AreBaseParamsConfigured();
 
-#endif
+#endif // BITCOIN_CHAIN_PARAMS_BASE_H
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 2cf8d41b9d6e..52cdc3555945 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -30,4 +30,4 @@ namespace Checkpoints {
 
 } //namespace Checkpoints
 
-#endif
+#endif // BITCOIN_CHECKPOINT_H
diff --git a/src/checkqueue.h b/src/checkqueue.h
index ef7b4ca4221a..c2c7d8ca2482 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -191,4 +191,4 @@ template<typename T> class CCheckQueueControl {
     }
 };
 
-#endif
+#endif // CHECKQUEUE_H
diff --git a/src/coins.h b/src/coins.h
index 08913531d81e..d338e3172eca 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -2,6 +2,7 @@
 // Copyright (c) 2009-2013 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCOIN_COINS_H
 #define BITCOIN_COINS_H
 
@@ -379,4 +380,4 @@ class CCoinsViewCache : public CCoinsViewBacked
     CCoinsMap::const_iterator FetchCoins(const uint256 &txid) const;
 };
 
-#endif
+#endif // BITCOIN_COINS_H
diff --git a/src/core.h b/src/core.h
index e3ceac97aa6b..42286a48dd47 100644
--- a/src/core.h
+++ b/src/core.h
@@ -533,4 +533,4 @@ struct CBlockLocator
     }
 };
 
-#endif
+#endif // BITCOIN_CORE_H
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 593eb2d03548..57f1397f18bc 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -126,4 +126,3 @@ vector<unsigned char> ParseHexUV(const UniValue& v, const string& strName)
         throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
     return ParseHex(strHex);
 }
-
diff --git a/src/core_write.cpp b/src/core_write.cpp
index b395b5c0908e..e63b64d69231 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -89,4 +89,3 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
     if (hashBlock != 0)
         entry.pushKV("blockhash", hashBlock.GetHex());
 }
-
diff --git a/src/crypter.h b/src/crypter.h
index f16fcef9c702..9b592dbcdce5 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -192,4 +192,4 @@ class CCryptoKeyStore : public CBasicKeyStore
     boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;
 };
 
-#endif
+#endif // __CRYPTER_H__
diff --git a/src/hash.h b/src/hash.h
index f2a0ebfe1f25..98a2d1fb114a 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -159,4 +159,4 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL
 
 unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
 
-#endif
+#endif // BITCOIN_HASH_H
diff --git a/src/init.h b/src/init.h
index 626525c9adb5..cf1d1e7e396a 100644
--- a/src/init.h
+++ b/src/init.h
@@ -33,4 +33,4 @@ std::string HelpMessage(HelpMessageMode mode);
 /** Returns licensing information (for -version) */
 std::string LicenseInfo();
 
-#endif
+#endif // BITCOIN_INIT_H
diff --git a/src/key.h b/src/key.h
index 11dc65de8ccb..552f12ad2364 100644
--- a/src/key.h
+++ b/src/key.h
@@ -309,4 +309,4 @@ struct CExtKey {
 /** Check that required EC support is available at runtime */
 bool ECC_InitSanityCheck(void);
 
-#endif
+#endif // BITCOIN_KEY_H
diff --git a/src/keystore.h b/src/keystore.h
index 7aaf197cd7c3..3b49e282d960 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -105,4 +105,4 @@ class CBasicKeyStore : public CKeyStore
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CKeyingMaterial;
 typedef std::map<CKeyID, std::pair<CPubKey, std::vector<unsigned char> > > CryptedKeyMap;
 
-#endif
+#endif // BITCOIN_KEYSTORE_H
diff --git a/src/limitedmap.h b/src/limitedmap.h
index 1623a372b30c..58593688af06 100644
--- a/src/limitedmap.h
+++ b/src/limitedmap.h
@@ -98,4 +98,4 @@ template <typename K, typename V> class limitedmap
     }
 };
 
-#endif
+#endif // BITCOIN_LIMITEDMAP_H
diff --git a/src/main.h b/src/main.h
index 0a1ff45460a2..4c98f78cf1c6 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1056,4 +1056,4 @@ class CWalletInterface {
     friend void ::UnregisterAllWallets();
 };
 
-#endif
+#endif // BITCOIN_MAIN_H
diff --git a/src/mruset.h b/src/mruset.h
index c1c08b02888d..b9f325d874ac 100644
--- a/src/mruset.h
+++ b/src/mruset.h
@@ -64,4 +64,4 @@ template <typename T> class mruset
     }
 };
 
-#endif
+#endif // BITCOIN_MRUSET_H
diff --git a/src/net.h b/src/net.h
index bfad32b2c17a..e2700c097568 100644
--- a/src/net.h
+++ b/src/net.h
@@ -615,4 +615,4 @@ class CAddrDB
     bool Read(CAddrMan& addr);
 };
 
-#endif
+#endif // BITCOIN_NET_H
diff --git a/src/netbase.h b/src/netbase.h
index 2df3c4474df8..d4d266e0a8f3 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -182,4 +182,4 @@ bool CloseSocket(SOCKET& hSocket);
 /** Disable or enable blocking-mode for a socket */
 bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking);
 
-#endif
+#endif // BITCOIN_NETBASE_H
diff --git a/src/noui.h b/src/noui.h
index 755d987fdd0a..dbd4320fa7fc 100644
--- a/src/noui.h
+++ b/src/noui.h
@@ -7,4 +7,4 @@
 
 extern void noui_connect();
 
-#endif
+#endif // BITCOIN_NOUI_H
diff --git a/src/pow.h b/src/pow.h
index f350d763f4cb..2a0d9b24bb9d 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -1,4 +1,3 @@
-
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
@@ -24,4 +23,4 @@ void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
 
 uint256 GetProofIncrement(unsigned int nBits);
 
-#endif
+#endif // BITCOIN_POW_H
diff --git a/src/rpcclient.h b/src/rpcclient.h
index 840890e34b40..1233ea3875cf 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOINRPC_CLIENT_H_
-#define _BITCOINRPC_CLIENT_H_ 1
+#define _BITCOINRPC_CLIENT_H_
 
 #include "json/json_spirit_reader_template.h"
 #include "json/json_spirit_utils.h"
@@ -12,4 +12,4 @@
 
 json_spirit::Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams);
 
-#endif
+#endif // _BITCOINRPC_CLIENT_H_
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 8f05c08482f0..a9adb5880393 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOINRPC_PROTOCOL_H_
-#define _BITCOINRPC_PROTOCOL_H_ 1
+#define _BITCOINRPC_PROTOCOL_H_
 
 #include <list>
 #include <map>
@@ -159,4 +159,4 @@ json_spirit::Object JSONRPCReplyObj(const json_spirit::Value& result, const json
 std::string JSONRPCReply(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
 json_spirit::Object JSONRPCError(int code, const std::string& message);
 
-#endif
+#endif // _BITCOINRPC_PROTOCOL_H_
diff --git a/src/rpcserver.h b/src/rpcserver.h
index b850d15d4ef3..820c1bc08176 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOINRPC_SERVER_H_
-#define _BITCOINRPC_SERVER_H_ 1
+#define _BITCOINRPC_SERVER_H_
 
 #include "uint256.h"
 #include "rpcprotocol.h"
@@ -209,4 +209,4 @@ extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp)
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
 
-#endif
+#endif // _BITCOINRPC_SERVER_H_
diff --git a/src/script.h b/src/script.h
index 462e3f230289..8e6aedcc631b 100644
--- a/src/script.h
+++ b/src/script.h
@@ -833,4 +833,4 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
 // combine them intelligently and return the result.
 CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
-#endif
+#endif // H_BITCOIN_SCRIPT
diff --git a/src/serialize.h b/src/serialize.h
index 17cb724bee96..d486181d7855 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1405,4 +1405,4 @@ class CBufferedFile
     }
 };
 
-#endif
+#endif // BITCOIN_SERIALIZE_H
diff --git a/src/sync.h b/src/sync.h
index cd319e017157..4b81b4bd3215 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -260,5 +260,5 @@ class CSemaphoreGrant
         return fHaveGrant;
     }
 };
-#endif
 
+#endif // BITCOIN_SYNC_H
diff --git a/src/threadsafety.h b/src/threadsafety.h
index 176060ac6599..9ee39372e1a9 100644
--- a/src/threadsafety.h
+++ b/src/threadsafety.h
@@ -51,4 +51,5 @@
 #define SHARED_LOCKS_REQUIRED(...)
 #define NO_THREAD_SAFETY_ANALYSIS
 #endif  // __GNUC__
+
 #endif  // BITCOIN_THREADSAFETY_H
diff --git a/src/timedata.h b/src/timedata.h
index d0c84b3183b1..9cc47bec13ff 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -73,4 +73,4 @@ int64_t GetTimeOffset();
 int64_t GetAdjustedTime();
 void AddTimeData(const CNetAddr& ip, int64_t nTime);
 
-#endif
+#endif // BITCOIN_TIMEDATA_H
diff --git a/src/txmempool.h b/src/txmempool.h
index d95c4d970b2b..360364d8b059 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -2,6 +2,7 @@
 // Copyright (c) 2009-2013 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCOIN_TXMEMPOOL_H
 #define BITCOIN_TXMEMPOOL_H
 
@@ -147,4 +148,4 @@ class CCoinsViewMemPool : public CCoinsViewBacked
     bool HaveCoins(const uint256 &txid) const;
 };
 
-#endif /* BITCOIN_TXMEMPOOL_H */
+#endif // BITCOIN_TXMEMPOOL_H
diff --git a/src/ui_interface.h b/src/ui_interface.h
index b3df2b5a8591..53005f984441 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -109,4 +109,4 @@ inline std::string _(const char* psz)
     return rv ? (*rv) : psz;
 }
 
-#endif
+#endif // BITCOIN_UI_INTERFACE_H
diff --git a/src/uint256.h b/src/uint256.h
index ad0a56f447d1..d1a822af0df8 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -326,4 +326,4 @@ class uint256 : public base_uint<256> {
     uint64_t GetHash(const uint256& salt) const;
 };
 
-#endif
+#endif // BITCOIN_UINT256_H
diff --git a/src/util.h b/src/util.h
index 30f7c15c89d3..6e1f439ff740 100644
--- a/src/util.h
+++ b/src/util.h
@@ -222,4 +222,4 @@ template <typename Callable> void TraceThread(const char* name,  Callable func)
     }
 }
 
-#endif
+#endif // BITCOIN_UTIL_H
diff --git a/src/utiltime.h b/src/utiltime.h
index 500ae4dab97e..6f82e5a836fc 100644
--- a/src/utiltime.h
+++ b/src/utiltime.h
@@ -17,4 +17,4 @@ void MilliSleep(int64_t n);
 
 std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime);
 
-#endif
+#endif // BITCOIN_UTILTIME_H
diff --git a/src/version.h b/src/version.h
index b87aa8258cf1..75cbec39b724 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,6 +1,7 @@
 // Copyright (c) 2012 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCOIN_VERSION_H
 #define BITCOIN_VERSION_H
 
@@ -52,4 +53,4 @@ static const int MEMPOOL_GD_VERSION = 60002;
 std::string FormatFullVersion();
 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
 
-#endif
+#endif // BITCOIN_VERSION_H
diff --git a/src/wallet.h b/src/wallet.h
index 052da246097e..e542317be84b 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -2,6 +2,7 @@
 // Copyright (c) 2009-2013 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCOIN_WALLET_H
 #define BITCOIN_WALLET_H
 
@@ -955,4 +956,4 @@ class CAccountingEntry
     std::vector<char> _ssExtra;
 };
 
-#endif
+#endif // BITCOIN_WALLET_H
diff --git a/src/walletdb.h b/src/walletdb.h
index 58b4571b16f2..24096e13eac6 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -2,6 +2,7 @@
 // Copyright (c) 2009-2013 The Bitcoin developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef BITCOIN_WALLETDB_H
 #define BITCOIN_WALLETDB_H
 

From 4d04492bf217bb5466135f61f89eac835caac321 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 28 Aug 2014 22:26:56 +0200
Subject: [PATCH 0611/1819] add missing copyright headers

---
 src/clientversion.h  | 4 ++++
 src/utilmoneystr.cpp | 5 +++++
 2 files changed, 9 insertions(+)

diff --git a/src/clientversion.h b/src/clientversion.h
index 6c718a9f7978..5634516ca4b4 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef CLIENTVERSION_H
 #define CLIENTVERSION_H
 
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index 1bd48d8d4ce4..c169355f05a2 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -1,3 +1,8 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include "utilmoneystr.h"
 
 #include "core.h"

From 187115c01d594bda3a4825ca45404ca27585b7f3 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 28 Aug 2014 22:56:53 +0200
Subject: [PATCH 0612/1819] cleanup include of assert.h

---
 src/chainparams.cpp     | 3 ++-
 src/chainparamsbase.cpp | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f32d4ed235d8..ce99f268f38f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -5,10 +5,11 @@
 
 #include "chainparams.h"
 
-#include "assert.h"
 #include "random.h"
 #include "util.h"
 
+#include <assert.h>
+
 #include <boost/assign/list_of.hpp>
 
 using namespace std;
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 720e24c4a8b2..d1e19871c370 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -5,9 +5,10 @@
 
 #include "chainparamsbase.h"
 
-#include "assert.h"
 #include "util.h"
 
+#include <assert.h>
+
 #include <boost/assign/list_of.hpp>
 
 using namespace boost::assign;

From 21f15164681ae57c3f0b4fa6e6771b4f4fb00a1a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 9 Aug 2014 15:26:40 +0200
Subject: [PATCH 0613/1819] [Qt] add all used colors in txtablemodel to
 guiconstants

- add colors used in TX status decoration
---
 src/qt/guiconstants.h            | 6 ++++++
 src/qt/transactiontablemodel.cpp | 7 ++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 5ae4bc833de8..4c8a67b663e3 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -23,6 +23,12 @@ static const int STATUSBAR_ICONSIZE = 16;
 #define COLOR_NEGATIVE QColor(255, 0, 0)
 /* Transaction list -- bare address (without label) */
 #define COLOR_BAREADDRESS QColor(140, 140, 140)
+/* Transaction list -- TX status decoration - open until date */
+#define COLOR_TX_STATUS_OPENUNTILDATE QColor(64, 64, 255)
+/* Transaction list -- TX status decoration - offline */
+#define COLOR_TX_STATUS_OFFLINE QColor(192, 192, 192)
+/* Transaction list -- TX status decoration - default color */
+#define COLOR_BLACK QColor(0, 0, 0)
 
 /* Tooltips longer than this (in characters) are converted into rich text,
    so that they can be word-wrapped.
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 1a1f726bf865..98812b6f8094 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -450,9 +450,9 @@ QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx)
     {
     case TransactionStatus::OpenUntilBlock:
     case TransactionStatus::OpenUntilDate:
-        return QColor(64,64,255);
+        return COLOR_TX_STATUS_OPENUNTILDATE;
     case TransactionStatus::Offline:
-        return QColor(192,192,192);
+        return COLOR_TX_STATUS_OFFLINE;
     case TransactionStatus::Unconfirmed:
         return QIcon(":/icons/transaction_0");
     case TransactionStatus::Confirming:
@@ -476,8 +476,9 @@ QVariant TransactionTableModel::txStatusDecoration(const TransactionRecord *wtx)
     case TransactionStatus::MaturesWarning:
     case TransactionStatus::NotAccepted:
         return QIcon(":/icons/transaction_0");
+    default:
+        return COLOR_BLACK;
     }
-    return QColor(0,0,0);
 }
 
 QVariant TransactionTableModel::txWatchonlyDecoration(const TransactionRecord *wtx) const

From bbad683224c77743a9fef5cc2fc64cc43fbec192 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 9 Aug 2014 15:29:55 +0200
Subject: [PATCH 0614/1819] [Qt] simplify return code and return values in
 txtablemodel

- also move an added space in a string where it belongs
---
 src/qt/transactiontablemodel.cpp | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 98812b6f8094..5f420c0c6cc1 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -209,10 +209,7 @@ class TransactionTablePriv
             }
             return rec;
         }
-        else
-        {
-            return 0;
-        }
+        return 0;
     }
 
     QString describe(TransactionRecord *rec, int unit)
@@ -225,7 +222,7 @@ class TransactionTablePriv
                 return TransactionDesc::toHTML(wallet, mi->second, rec, unit);
             }
         }
-        return QString("");
+        return QString();
     }
 };
 
@@ -330,10 +327,7 @@ QString TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const
     {
         return GUIUtil::dateTimeStr(wtx->time);
     }
-    else
-    {
-        return QString();
-    }
+    return QString();
 }
 
 /* Look up address in address book, if found return label (address)
@@ -345,11 +339,11 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
     QString description;
     if(!label.isEmpty())
     {
-        description += label + QString(" ");
+        description += label;
     }
     if(label.isEmpty() || tooltip)
     {
-        description += QString("(") + QString::fromStdString(address) + QString(")");
+        description += QString(" (") + QString::fromStdString(address) + QString(")");
     }
     return description;
 }
@@ -389,7 +383,6 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
     default:
         return QIcon(":/icons/tx_inout");
     }
-    return QVariant();
 }
 
 QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
@@ -641,10 +634,7 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex
     {
         return createIndex(row, column, priv->index(row));
     }
-    else
-    {
-        return QModelIndex();
-    }
+    return QModelIndex();
 }
 
 void TransactionTableModel::updateDisplayUnit()

From fbe0fcae7641889b778ecb6bd7067eff5b1b2c4e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 28 Aug 2014 23:20:46 +0200
Subject: [PATCH 0615/1819] [Qt] minor watch-only changes

- use watch-only, not watchonly
- add back a tooltip hint when hovering addresses and attach
  "(watch-only)" at the end
---
 src/qt/overviewpage.cpp          |  2 +-
 src/qt/transactiontablemodel.cpp | 14 ++++++++++----
 src/qt/transactionview.cpp       |  2 +-
 src/qt/walletmodel.h             |  2 +-
 4 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 15501b8a8af3..90762bea5d38 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -172,7 +172,7 @@ void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64
     // for symmetry reasons also show immature label when the watch-only one is shown
     ui->labelImmature->setVisible(showImmature || showWatchOnlyImmature);
     ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
-    ui->labelWatchImmature->setVisible(showWatchOnlyImmature);  // show watch-only immature balance
+    ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watch-only immature balance
 }
 
 // show/hide watch-only labels
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 1a1f726bf865..734c7afc4e5c 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -394,19 +394,25 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
 
 QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
 {
+    QString watchAddress;
+    if (tooltip) {
+        // Mark transactions involving watch-only addresses by adding " (watch-only)"
+        watchAddress = wtx->involvesWatchAddress ? QString(" (") + tr("watch-only") + QString(")") : "";
+    }
+
     switch(wtx->type)
     {
     case TransactionRecord::RecvFromOther:
-        return QString::fromStdString(wtx->address);
+        return QString::fromStdString(wtx->address) + watchAddress;
     case TransactionRecord::RecvWithAddress:
     case TransactionRecord::SendToAddress:
     case TransactionRecord::Generated:
-        return lookupAddress(wtx->address, tooltip);
+        return lookupAddress(wtx->address, tooltip) + watchAddress;
     case TransactionRecord::SendToOther:
-        return QString::fromStdString(wtx->address);
+        return QString::fromStdString(wtx->address) + watchAddress;
     case TransactionRecord::SendToSelf:
     default:
-        return tr("(n/a)");
+        return tr("(n/a)") + watchAddress;
     }
 }
 
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 2d34d5812989..a7ba100cd20e 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -331,7 +331,7 @@ void TransactionView::exportClicked()
     writer.setModel(transactionProxyModel);
     writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
     if (model && model->haveWatchOnly())
-        writer.addColumn(tr("Watchonly"), TransactionTableModel::Watchonly);
+        writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
     writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
     writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
     writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index b3a401e4cc94..9102faf04e52 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -256,7 +256,7 @@ public slots:
     void updateTransaction(const QString &hash, int status);
     /* New, updated or removed address book entry */
     void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
-    /* Watchonly added */
+    /* Watch-only added */
     void updateWatchOnlyFlag(bool fHaveWatchonly);
     /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
     void pollBalanceChanged();

From 539abc4729ea16039d148cfa3b771929f7d37584 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 29 Aug 2014 13:02:23 +0200
Subject: [PATCH 0616/1819] build: Remove message about Ubuntu 13.10 when no
 boost sleep implementation found

It's only confusing people into thinking that they should mess with
boost versions, which should not be necessary to get bitcoind to work.

If there is a bug in the build system with autodetecting boost it needs
to be solved not worked around.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 700f4ab70950..5a2d7e8e4199 100644
--- a/configure.ac
+++ b/configure.ac
@@ -577,7 +577,7 @@ CPPFLAGS="$TEMP_CPPFLAGS"
 fi
 
 if test x$boost_sleep != xyes; then
-  AC_MSG_ERROR(No working boost sleep implementation found. If on ubuntu 13.10 with libboost1.54-all-dev remove libboost.1.54-all-dev and use libboost1.53-all-dev)
+  AC_MSG_ERROR(No working boost sleep implementation found.)
 fi
 
 AC_ARG_WITH([utils],

From 57153d4e1ac6e2cc9fc3f2fcd6d786e9813d824f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 17:14:22 +0200
Subject: [PATCH 0617/1819] rpc: Compute number of confirmations of a block
 from block height

Currently this uses a CMerkleTx, but that makes no sense as we
have the CBlockIndex available. As noted by @jgarzik.
---
 src/rpcblockchain.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 58cab140454b..8a4b25cc540d 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -54,9 +54,11 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
 {
     Object result;
     result.push_back(Pair("hash", block.GetHash().GetHex()));
-    CMerkleTx txGen(block.vtx[0]);
-    txGen.SetMerkleBranch(&block);
-    result.push_back(Pair("confirmations", (int)txGen.GetDepthInMainChain()));
+    int confirmations = -1;
+    // Only report confirmations if the block is on the main chain
+    if (chainActive.Contains(blockindex))
+        confirmations = chainActive.Height() - blockindex->nHeight + 1;
+    result.push_back(Pair("confirmations", confirmations));
     result.push_back(Pair("size", (int)::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION)));
     result.push_back(Pair("height", blockindex->nHeight));
     result.push_back(Pair("version", block.nVersion));
@@ -242,7 +244,7 @@ Value getblock(const Array& params, bool fHelp)
             "\nResult (for verbose = true):\n"
             "{\n"
             "  \"hash\" : \"hash\",     (string) the block hash (same as provided)\n"
-            "  \"confirmations\" : n,   (numeric) The number of confirmations\n"
+            "  \"confirmations\" : n,   (numeric) The number of confirmations, or -1 if the block is not on the main chain\n"
             "  \"size\" : n,            (numeric) The block size\n"
             "  \"height\" : n,          (numeric) The block height or index\n"
             "  \"version\" : n,         (numeric) The block version\n"

From 0101483f46396a7f1d19a9d29a1da15639ce4233 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 17:15:21 +0200
Subject: [PATCH 0618/1819] Move CMerkleTx to wallet.cpp/h

It is only used by the wallet so it has no place in main.
---
 src/main.cpp   | 99 --------------------------------------------------
 src/main.h     | 60 ------------------------------
 src/wallet.cpp | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/wallet.h   | 57 +++++++++++++++++++++++++++++
 4 files changed, 156 insertions(+), 159 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ddc37ea53428..6f3a5aae8955 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -732,53 +732,6 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
     return nSigOps;
 }
 
-int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
-{
-    AssertLockHeld(cs_main);
-    CBlock blockTmp;
-
-    if (pblock == NULL) {
-        CCoins coins;
-        if (pcoinsTip->GetCoins(GetHash(), coins)) {
-            CBlockIndex *pindex = chainActive[coins.nHeight];
-            if (pindex) {
-                if (!ReadBlockFromDisk(blockTmp, pindex))
-                    return 0;
-                pblock = &blockTmp;
-            }
-        }
-    }
-
-    if (pblock) {
-        // Update the tx's hashBlock
-        hashBlock = pblock->GetHash();
-
-        // Locate the transaction
-        for (nIndex = 0; nIndex < (int)pblock->vtx.size(); nIndex++)
-            if (pblock->vtx[nIndex] == *(CTransaction*)this)
-                break;
-        if (nIndex == (int)pblock->vtx.size())
-        {
-            vMerkleBranch.clear();
-            nIndex = -1;
-            LogPrintf("ERROR: SetMerkleBranch() : couldn't find tx in block\n");
-            return 0;
-        }
-
-        // Fill in merkle branch
-        vMerkleBranch = pblock->GetMerkleBranch(nIndex);
-    }
-
-    // Is the tx in a block that's in the main chain
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
-    if (mi == mapBlockIndex.end())
-        return 0;
-    CBlockIndex* pindex = (*mi).second;
-    if (!pindex || !chainActive.Contains(pindex))
-        return 0;
-
-    return chainActive.Height() - pindex->nHeight + 1;
-}
 
 
 
@@ -1028,58 +981,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
-
-int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
-{
-    if (hashBlock == 0 || nIndex == -1)
-        return 0;
-    AssertLockHeld(cs_main);
-
-    // Find the block it claims to be in
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
-    if (mi == mapBlockIndex.end())
-        return 0;
-    CBlockIndex* pindex = (*mi).second;
-    if (!pindex || !chainActive.Contains(pindex))
-        return 0;
-
-    // Make sure the merkle branch connects to this block
-    if (!fMerkleVerified)
-    {
-        if (CBlock::CheckMerkleBranch(GetHash(), vMerkleBranch, nIndex) != pindex->hashMerkleRoot)
-            return 0;
-        fMerkleVerified = true;
-    }
-
-    pindexRet = pindex;
-    return chainActive.Height() - pindex->nHeight + 1;
-}
-
-int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const
-{
-    AssertLockHeld(cs_main);
-    int nResult = GetDepthInMainChainINTERNAL(pindexRet);
-    if (nResult == 0 && !mempool.exists(GetHash()))
-        return -1; // Not in chain, not in mempool
-
-    return nResult;
-}
-
-int CMerkleTx::GetBlocksToMaturity() const
-{
-    if (!IsCoinBase())
-        return 0;
-    return max(0, (COINBASE_MATURITY+1) - GetDepthInMainChain());
-}
-
-
-bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectInsaneFee)
-{
-    CValidationState state;
-    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectInsaneFee);
-}
-
-
 // Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock
 bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow)
 {
diff --git a/src/main.h b/src/main.h
index 3160b28c4911..9fe15d3aa300 100644
--- a/src/main.h
+++ b/src/main.h
@@ -344,66 +344,6 @@ class CScriptCheck
     }
 };
 
-/** A transaction with a merkle branch linking it to the block chain. */
-class CMerkleTx : public CTransaction
-{
-private:
-    int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const;
-
-public:
-    uint256 hashBlock;
-    std::vector<uint256> vMerkleBranch;
-    int nIndex;
-
-    // memory only
-    mutable bool fMerkleVerified;
-
-
-    CMerkleTx()
-    {
-        Init();
-    }
-
-    CMerkleTx(const CTransaction& txIn) : CTransaction(txIn)
-    {
-        Init();
-    }
-
-    void Init()
-    {
-        hashBlock = 0;
-        nIndex = -1;
-        fMerkleVerified = false;
-    }
-
-
-    IMPLEMENT_SERIALIZE
-    (
-        nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action);
-        nVersion = this->nVersion;
-        READWRITE(hashBlock);
-        READWRITE(vMerkleBranch);
-        READWRITE(nIndex);
-    )
-
-
-    int SetMerkleBranch(const CBlock* pblock=NULL);
-
-    // Return depth of transaction in blockchain:
-    // -1  : not in blockchain, and not in memory pool (conflicted transaction)
-    //  0  : in memory pool, waiting to be included in a block
-    // >=1 : this many blocks deep in the main chain
-    int GetDepthInMainChain(CBlockIndex* &pindexRet) const;
-    int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
-    bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
-    int GetBlocksToMaturity() const;
-    bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
-};
-
-
-
-
-
 /** Data structure that represents a partial merkle tree.
  *
  * It respresents a subset of the txid's of a known block, in a way that
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 786b2f6a9271..18a5b3971c9a 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2194,3 +2194,102 @@ CWalletKey::CWalletKey(int64_t nExpires)
     nTimeCreated = (nExpires ? GetTime() : 0);
     nTimeExpires = nExpires;
 }
+
+int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
+{
+    AssertLockHeld(cs_main);
+    CBlock blockTmp;
+
+    if (pblock == NULL) {
+        CCoins coins;
+        if (pcoinsTip->GetCoins(GetHash(), coins)) {
+            CBlockIndex *pindex = chainActive[coins.nHeight];
+            if (pindex) {
+                if (!ReadBlockFromDisk(blockTmp, pindex))
+                    return 0;
+                pblock = &blockTmp;
+            }
+        }
+    }
+
+    if (pblock) {
+        // Update the tx's hashBlock
+        hashBlock = pblock->GetHash();
+
+        // Locate the transaction
+        for (nIndex = 0; nIndex < (int)pblock->vtx.size(); nIndex++)
+            if (pblock->vtx[nIndex] == *(CTransaction*)this)
+                break;
+        if (nIndex == (int)pblock->vtx.size())
+        {
+            vMerkleBranch.clear();
+            nIndex = -1;
+            LogPrintf("ERROR: SetMerkleBranch() : couldn't find tx in block\n");
+            return 0;
+        }
+
+        // Fill in merkle branch
+        vMerkleBranch = pblock->GetMerkleBranch(nIndex);
+    }
+
+    // Is the tx in a block that's in the main chain
+    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
+    if (mi == mapBlockIndex.end())
+        return 0;
+    CBlockIndex* pindex = (*mi).second;
+    if (!pindex || !chainActive.Contains(pindex))
+        return 0;
+
+    return chainActive.Height() - pindex->nHeight + 1;
+}
+
+int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
+{
+    if (hashBlock == 0 || nIndex == -1)
+        return 0;
+    AssertLockHeld(cs_main);
+
+    // Find the block it claims to be in
+    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
+    if (mi == mapBlockIndex.end())
+        return 0;
+    CBlockIndex* pindex = (*mi).second;
+    if (!pindex || !chainActive.Contains(pindex))
+        return 0;
+
+    // Make sure the merkle branch connects to this block
+    if (!fMerkleVerified)
+    {
+        if (CBlock::CheckMerkleBranch(GetHash(), vMerkleBranch, nIndex) != pindex->hashMerkleRoot)
+            return 0;
+        fMerkleVerified = true;
+    }
+
+    pindexRet = pindex;
+    return chainActive.Height() - pindex->nHeight + 1;
+}
+
+int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const
+{
+    AssertLockHeld(cs_main);
+    int nResult = GetDepthInMainChainINTERNAL(pindexRet);
+    if (nResult == 0 && !mempool.exists(GetHash()))
+        return -1; // Not in chain, not in mempool
+
+    return nResult;
+}
+
+int CMerkleTx::GetBlocksToMaturity() const
+{
+    if (!IsCoinBase())
+        return 0;
+    return max(0, (COINBASE_MATURITY+1) - GetDepthInMainChain());
+}
+
+
+bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectInsaneFee)
+{
+    CValidationState state;
+    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectInsaneFee);
+}
+
diff --git a/src/wallet.h b/src/wallet.h
index b3878adb1ed9..544b4f5bfbe0 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -457,6 +457,63 @@ struct COutputEntry
     int vout;
 };
 
+/** A transaction with a merkle branch linking it to the block chain. */
+class CMerkleTx : public CTransaction
+{
+private:
+    int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const;
+
+public:
+    uint256 hashBlock;
+    std::vector<uint256> vMerkleBranch;
+    int nIndex;
+
+    // memory only
+    mutable bool fMerkleVerified;
+
+
+    CMerkleTx()
+    {
+        Init();
+    }
+
+    CMerkleTx(const CTransaction& txIn) : CTransaction(txIn)
+    {
+        Init();
+    }
+
+    void Init()
+    {
+        hashBlock = 0;
+        nIndex = -1;
+        fMerkleVerified = false;
+    }
+
+
+    IMPLEMENT_SERIALIZE
+    (
+        nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action);
+        nVersion = this->nVersion;
+        READWRITE(hashBlock);
+        READWRITE(vMerkleBranch);
+        READWRITE(nIndex);
+    )
+
+
+    int SetMerkleBranch(const CBlock* pblock=NULL);
+
+    // Return depth of transaction in blockchain:
+    // -1  : not in blockchain, and not in memory pool (conflicted transaction)
+    //  0  : in memory pool, waiting to be included in a block
+    // >=1 : this many blocks deep in the main chain
+    int GetDepthInMainChain(CBlockIndex* &pindexRet) const;
+    int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
+    bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
+    int GetBlocksToMaturity() const;
+    bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
+};
+
+
 /** A transaction with a bunch of additional info that only the owner cares about.
  * It includes any unrecorded transactions needed to link it back to the block chain.
  */

From e9dd83f0a90c29f9f913f019356844a989505855 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Fri, 29 Aug 2014 22:52:41 +0200
Subject: [PATCH 0619/1819] missing include boost/algorithm/string/replace.hpp

---
 src/init.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/init.cpp b/src/init.cpp
index c49083c7df1c..50ad2785dd69 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -35,6 +35,7 @@
 #include "compat/sanity.h"
 
 #include <boost/algorithm/string/predicate.hpp>
+#include <boost/algorithm/string/replace.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/interprocess/sync/file_lock.hpp>
 #include <boost/thread.hpp>

From bac5586b103bf3783805675948df255ed7dbe8e7 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 30 Aug 2014 02:35:05 +0200
Subject: [PATCH 0620/1819] Replace weird characters by normal spaces

---
 src/rpcdump.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index e68ddee04096..c286626fd335 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -165,14 +165,14 @@ Value importaddress(const Array& params, bool fHelp)
         std::vector<unsigned char> data(ParseHex(params[0].get_str()));
         script = CScript(data.begin(), data.end());
     } else {
-        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
     }
 
     string strLabel = "";
     if (params.size() > 1)
         strLabel = params[1].get_str();
 
-    // Whether to perform rescan after import
+    // Whether to perform rescan after import
     bool fRescan = true;
     if (params.size() > 2)
         fRescan = params[2].get_bool();
@@ -191,7 +191,7 @@ Value importaddress(const Array& params, bool fHelp)
         pwalletMain->MarkDirty();
 
         if (!pwalletMain->AddWatchOnly(script))
-            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
+            throw JSONRPCError(RPC_WALLET_ERROR, "Error adding address to wallet");
 
         if (fRescan)
         {

From 9f3d47677973cb894fdbb437b9b322e2062a1bf1 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Thu, 7 Aug 2014 15:39:49 +0200
Subject: [PATCH 0621/1819] changed field types in some structures to
 equivalent unambiguous types

Conflicts:
	src/core.cpp

Rebased-By: Wladimir J. van der Laan
Github-Pull: #4180
---
 src/core.cpp |  4 ++--
 src/core.h   | 48 ++++++++++++++++++++++++------------------------
 2 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 71d6fea610e8..e6636ae04f19 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -12,14 +12,14 @@ std::string COutPoint::ToString() const
     return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
 }
 
-CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, unsigned int nSequenceIn)
+CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, uint32_t nSequenceIn)
 {
     prevout = prevoutIn;
     scriptSig = scriptSigIn;
     nSequence = nSequenceIn;
 }
 
-CTxIn::CTxIn(uint256 hashPrevTx, unsigned int nOut, CScript scriptSigIn, unsigned int nSequenceIn)
+CTxIn::CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn, uint32_t nSequenceIn)
 {
     prevout = COutPoint(hashPrevTx, nOut);
     scriptSig = scriptSigIn;
diff --git a/src/core.h b/src/core.h
index e3ceac97aa6b..126e1baa9895 100644
--- a/src/core.h
+++ b/src/core.h
@@ -26,13 +26,13 @@ class COutPoint
 {
 public:
     uint256 hash;
-    unsigned int n;
+    uint32_t n;
 
     COutPoint() { SetNull(); }
-    COutPoint(uint256 hashIn, unsigned int nIn) { hash = hashIn; n = nIn; }
+    COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
     IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); )
-    void SetNull() { hash = 0; n = (unsigned int) -1; }
-    bool IsNull() const { return (hash == 0 && n == (unsigned int) -1); }
+    void SetNull() { hash = 0; n = (uint32_t) -1; }
+    bool IsNull() const { return (hash == 0 && n == (uint32_t) -1); }
 
     friend bool operator<(const COutPoint& a, const COutPoint& b)
     {
@@ -57,12 +57,12 @@ class CInPoint
 {
 public:
     const CTransaction* ptx;
-    unsigned int n;
+    uint32_t n;
 
     CInPoint() { SetNull(); }
-    CInPoint(const CTransaction* ptxIn, unsigned int nIn) { ptx = ptxIn; n = nIn; }
-    void SetNull() { ptx = NULL; n = (unsigned int) -1; }
-    bool IsNull() const { return (ptx == NULL && n == (unsigned int) -1); }
+    CInPoint(const CTransaction* ptxIn, uint32_t nIn) { ptx = ptxIn; n = nIn; }
+    void SetNull() { ptx = NULL; n = (uint32_t) -1; }
+    bool IsNull() const { return (ptx == NULL && n == (uint32_t) -1); }
 };
 
 /** An input of a transaction.  It contains the location of the previous
@@ -74,15 +74,15 @@ class CTxIn
 public:
     COutPoint prevout;
     CScript scriptSig;
-    unsigned int nSequence;
+    uint32_t nSequence;
 
     CTxIn()
     {
         nSequence = std::numeric_limits<unsigned int>::max();
     }
 
-    explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), unsigned int nSequenceIn=std::numeric_limits<unsigned int>::max());
-    CTxIn(uint256 hashPrevTx, unsigned int nOut, CScript scriptSigIn=CScript(), unsigned int nSequenceIn=std::numeric_limits<unsigned int>::max());
+    explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
+    CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
 
     IMPLEMENT_SERIALIZE
     (
@@ -93,7 +93,7 @@ class CTxIn
 
     bool IsFinal() const
     {
-        return (nSequence == std::numeric_limits<unsigned int>::max());
+        return (nSequence == std::numeric_limits<uint32_t>::max());
     }
 
     friend bool operator==(const CTxIn& a, const CTxIn& b)
@@ -217,17 +217,17 @@ class CTransaction
     void UpdateHash() const;
 
 public:
-    static const int CURRENT_VERSION=1;
+    static const int32_t CURRENT_VERSION=1;
 
     // The local variables are made const to prevent unintended modification
     // without updating the cached hash value. However, CTransaction is not
     // actually immutable; deserialization and assignment are implemented,
     // and bypass the constness. This is safe, as they update the entire
     // structure, including the hash.
-    const int nVersion;
+    const int32_t nVersion;
     const std::vector<CTxIn> vin;
     const std::vector<CTxOut> vout;
-    const unsigned int nLockTime;
+    const uint32_t nLockTime;
 
     /** Construct a CTransaction that qualifies as IsNull() */
     CTransaction();
@@ -238,11 +238,11 @@ class CTransaction
     CTransaction& operator=(const CTransaction& tx);
 
     IMPLEMENT_SERIALIZE(
-        READWRITE(*const_cast<int*>(&this->nVersion));
+        READWRITE(*const_cast<int32_t*>(&this->nVersion));
         nVersion = this->nVersion;
         READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
         READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
-        READWRITE(*const_cast<unsigned int*>(&nLockTime));
+        READWRITE(*const_cast<uint32_t*>(&nLockTime));
         if (fRead)
             UpdateHash();
     )
@@ -284,10 +284,10 @@ class CTransaction
 /** A mutable version of CTransaction. */
 struct CMutableTransaction
 {
-    int nVersion;
+    int32_t nVersion;
     std::vector<CTxIn> vin;
     std::vector<CTxOut> vout;
-    unsigned int nLockTime;
+    uint32_t nLockTime;
 
     CMutableTransaction();
     CMutableTransaction(const CTransaction& tx);
@@ -399,13 +399,13 @@ class CBlockHeader
 {
 public:
     // header
-    static const int CURRENT_VERSION=2;
-    int nVersion;
+    static const int32_t CURRENT_VERSION=2;
+    int32_t nVersion;
     uint256 hashPrevBlock;
     uint256 hashMerkleRoot;
-    unsigned int nTime;
-    unsigned int nBits;
-    unsigned int nNonce;
+    uint32_t nTime;
+    uint32_t nBits;
+    uint32_t nNonce;
 
     CBlockHeader()
     {

From e84843c0dbb9cb853b912c09858b01c5c9302b09 Mon Sep 17 00:00:00 2001
From: Ross Nicoll <jrn@jrn.me.uk>
Date: Sat, 2 Aug 2014 19:54:57 +0100
Subject: [PATCH 0622/1819] Broken addresses on command line no longer trigger
 testnet.

When passing a bitcoin: URI on the command line, invalid addresses do not incorrectly send the
user to the test network.
---
 src/base58.cpp           |  8 ++++++--
 src/base58.h             |  1 +
 src/chainparams.cpp      | 19 ++++++++++---------
 src/chainparams.h        |  3 +++
 src/qt/paymentserver.cpp |  8 ++++++--
 5 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index c9e91beef1d5..76f0404a184d 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -215,9 +215,13 @@ bool CBitcoinAddress::Set(const CTxDestination &dest) {
 }
 
 bool CBitcoinAddress::IsValid() const {
+    return IsValid(Params());
+}
+
+bool CBitcoinAddress::IsValid(const CChainParams &params) const {
     bool fCorrectSize = vchData.size() == 20;
-    bool fKnownVersion = vchVersion == Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS) ||
-                         vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
+    bool fKnownVersion = vchVersion == params.Base58Prefix(CChainParams::PUBKEY_ADDRESS) ||
+                         vchVersion == params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
     return fCorrectSize && fKnownVersion;
 }
 
diff --git a/src/base58.h b/src/base58.h
index 70681f589a6a..0f11f7c6d396 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -104,6 +104,7 @@ class CBitcoinAddress : public CBase58Data {
     bool Set(const CScriptID &id);
     bool Set(const CTxDestination &dest);
     bool IsValid() const;
+    bool IsValid(const CChainParams &params) const;
 
     CBitcoinAddress() {}
     CBitcoinAddress(const CTxDestination &dest) { Set(dest); }
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f32d4ed235d8..84cfd11feb57 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -220,24 +220,25 @@ const CChainParams &Params() {
     return *pCurrentParams;
 }
 
-void SelectParams(CBaseChainParams::Network network) {
-    SelectBaseParams(network);
+CChainParams &Params(CBaseChainParams::Network network) {
     switch (network) {
         case CBaseChainParams::MAIN:
-            pCurrentParams = &mainParams;
-            break;
+            return mainParams;
         case CBaseChainParams::TESTNET:
-            pCurrentParams = &testNetParams;
-            break;
+            return testNetParams;
         case CBaseChainParams::REGTEST:
-            pCurrentParams = &regTestParams;
-            break;
+            return regTestParams;
         default:
             assert(false && "Unimplemented network");
-            return;
+            return mainParams;
     }
 }
 
+void SelectParams(CBaseChainParams::Network network) {
+    SelectBaseParams(network);
+    pCurrentParams = &Params(network);
+}
+
 bool SelectParamsFromCommandLine() {
     if (!SelectBaseParamsFromCommandLine())
         return false;
diff --git a/src/chainparams.h b/src/chainparams.h
index 446256ba82a7..34aaf1fb4767 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -111,6 +111,9 @@ class CChainParams
  */
 const CChainParams &Params();
 
+/** Return parameters for the given network. */
+CChainParams &Params(CBaseChainParams::Network network);
+
 /** Sets the params returned by Params() to those for the given network. */
 void SelectParams(CBaseChainParams::Network network);
 
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index a9f1566d62bf..3360dd36eb15 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -10,6 +10,7 @@
 #include "optionsmodel.h"
 
 #include "base58.h"
+#include "chainparams.h"
 #include "ui_interface.h"
 #include "wallet.h"
 
@@ -199,8 +200,11 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             {
                 CBitcoinAddress address(r.address.toStdString());
 
-                SelectParams(CBaseChainParams::MAIN);
-                if (!address.IsValid())
+                if (address.IsValid(Params(CBaseChainParams::MAIN)))
+                {
+                    SelectParams(CBaseChainParams::MAIN);
+                }
+                else if (address.IsValid(Params(CBaseChainParams::TESTNET)))
                 {
                     SelectParams(CBaseChainParams::TESTNET);
                 }

From 4b0deb3b2df5882061ae6c44947eda831420cd5e Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Fri, 29 Aug 2014 20:24:16 +0200
Subject: [PATCH 0623/1819] Clean up CMerkleTx::SetMerkleBranch.

The case SetMerkleBranch(NULL) was never actually used, and thus the
involved code (loading the block from disk) can be removed and the
implementation simplified.
---
 src/wallet.cpp | 50 ++++++++++++++++++--------------------------------
 src/wallet.h   |  2 +-
 2 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 18a5b3971c9a..f7efeaec4a25 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -644,7 +644,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
             CWalletTx wtx(this,tx);
             // Get merkle branch if transaction was found in a block
             if (pblock)
-                wtx.SetMerkleBranch(pblock);
+                wtx.SetMerkleBranch(*pblock);
             return AddToWallet(wtx);
         }
     }
@@ -2195,48 +2195,34 @@ CWalletKey::CWalletKey(int64_t nExpires)
     nTimeExpires = nExpires;
 }
 
-int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
+int CMerkleTx::SetMerkleBranch(const CBlock& block)
 {
     AssertLockHeld(cs_main);
     CBlock blockTmp;
 
-    if (pblock == NULL) {
-        CCoins coins;
-        if (pcoinsTip->GetCoins(GetHash(), coins)) {
-            CBlockIndex *pindex = chainActive[coins.nHeight];
-            if (pindex) {
-                if (!ReadBlockFromDisk(blockTmp, pindex))
-                    return 0;
-                pblock = &blockTmp;
-            }
-        }
-    }
-
-    if (pblock) {
-        // Update the tx's hashBlock
-        hashBlock = pblock->GetHash();
-
-        // Locate the transaction
-        for (nIndex = 0; nIndex < (int)pblock->vtx.size(); nIndex++)
-            if (pblock->vtx[nIndex] == *(CTransaction*)this)
-                break;
-        if (nIndex == (int)pblock->vtx.size())
-        {
-            vMerkleBranch.clear();
-            nIndex = -1;
-            LogPrintf("ERROR: SetMerkleBranch() : couldn't find tx in block\n");
-            return 0;
-        }
+    // Update the tx's hashBlock
+    hashBlock = block.GetHash();
 
-        // Fill in merkle branch
-        vMerkleBranch = pblock->GetMerkleBranch(nIndex);
+    // Locate the transaction
+    for (nIndex = 0; nIndex < (int)block.vtx.size(); nIndex++)
+        if (block.vtx[nIndex] == *(CTransaction*)this)
+            break;
+    if (nIndex == (int)block.vtx.size())
+    {
+        vMerkleBranch.clear();
+        nIndex = -1;
+        LogPrintf("ERROR: SetMerkleBranch() : couldn't find tx in block\n");
+        return 0;
     }
 
+    // Fill in merkle branch
+    vMerkleBranch = block.GetMerkleBranch(nIndex);
+
     // Is the tx in a block that's in the main chain
     map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
     if (mi == mapBlockIndex.end())
         return 0;
-    CBlockIndex* pindex = (*mi).second;
+    const CBlockIndex* pindex = (*mi).second;
     if (!pindex || !chainActive.Contains(pindex))
         return 0;
 
diff --git a/src/wallet.h b/src/wallet.h
index 544b4f5bfbe0..3becc396c1a9 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -500,7 +500,7 @@ class CMerkleTx : public CTransaction
     )
 
 
-    int SetMerkleBranch(const CBlock* pblock=NULL);
+    int SetMerkleBranch(const CBlock& block);
 
     // Return depth of transaction in blockchain:
     // -1  : not in blockchain, and not in memory pool (conflicted transaction)

From 3d796f89962842e91e7d88e57c1d2d579f01052e Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Wed, 20 Aug 2014 08:42:31 +0200
Subject: [PATCH 0624/1819] overhaul serialization code

The implementation of each class' serialization/deserialization is no longer
passed within a macro. The implementation now lies within a template of form:

template <typename T, typename Stream, typename Operation>
inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
    size_t nSerSize = 0;
    /* CODE */
    return nSerSize;
}

In cases when codepath should depend on whether or not we are just deserializing
(old fGetSize, fWrite, fRead flags) an additional clause can be used:
bool fRead = boost::is_same<Operation, CSerActionUnserialize>();

The IMPLEMENT_SERIALIZE macro will now be a freestanding clause added within
class' body (similiar to Qt's Q_OBJECT) to implement GetSerializeSize,
Serialize and Unserialize. These are now wrappers around
the "SerializationOp" template.
---
 src/addrman.h                     |  17 +--
 src/alert.h                       |  50 +++++----
 src/bloom.h                       |  16 +--
 src/core.h                        | 168 +++++++++++++++++++++---------
 src/crypter.h                     |  19 ++--
 src/main.h                        | 138 +++++++++++++++---------
 src/netbase.h                     |  29 ++++--
 src/protocol.h                    |  61 +++++++----
 src/qt/recentrequeststablemodel.h |  19 ++--
 src/qt/walletmodel.h              |  15 ++-
 src/serialize.h                   |  68 +++++-------
 src/wallet.h                      | 123 +++++++++++++---------
 src/walletdb.h                    |  14 ++-
 13 files changed, 463 insertions(+), 274 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 052d364655fe..4287cbc1b33a 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -46,13 +46,18 @@ class CAddrInfo : public CAddress
 
 public:
 
-    IMPLEMENT_SERIALIZE(
-        CAddress* pthis = (CAddress*)(this);
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        CAddress* pthis = (CAddress*)(thisPtr);
         READWRITE(*pthis);
-        READWRITE(source);
-        READWRITE(nLastSuccess);
-        READWRITE(nAttempts);
-    )
+        READWRITE(thisPtr->source);
+        READWRITE(thisPtr->nLastSuccess);
+        READWRITE(thisPtr->nAttempts);
+        return nSerSize;
+    }
 
     void Init()
     {
diff --git a/src/alert.h b/src/alert.h
index b9d850b565a6..4c8267fd062f 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -47,23 +47,27 @@ class CUnsignedAlert
     std::string strReserved;
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(this->nVersion);
-        nVersion = this->nVersion;
-        READWRITE(nRelayUntil);
-        READWRITE(nExpiration);
-        READWRITE(nID);
-        READWRITE(nCancel);
-        READWRITE(setCancel);
-        READWRITE(nMinVer);
-        READWRITE(nMaxVer);
-        READWRITE(setSubVer);
-        READWRITE(nPriority);
-
-        READWRITE(LIMITED_STRING(strComment, 65536));
-        READWRITE(LIMITED_STRING(strStatusBar, 256));
-        READWRITE(LIMITED_STRING(strReserved, 256));
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->nVersion);
+        nVersion = thisPtr->nVersion;
+        READWRITE(thisPtr->nRelayUntil);
+        READWRITE(thisPtr->nExpiration);
+        READWRITE(thisPtr->nID);
+        READWRITE(thisPtr->nCancel);
+        READWRITE(thisPtr->setCancel);
+        READWRITE(thisPtr->nMinVer);
+        READWRITE(thisPtr->nMaxVer);
+        READWRITE(thisPtr->setSubVer);
+        READWRITE(thisPtr->nPriority);
+
+        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
+        READWRITE(LIMITED_STRING(thisPtr->strStatusBar, 256));
+        READWRITE(LIMITED_STRING(thisPtr->strReserved, 256));
+        return nSerSize;
+    }
 
     void SetNull();
 
@@ -83,10 +87,14 @@ class CAlert : public CUnsignedAlert
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(vchMsg);
-        READWRITE(vchSig);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->vchMsg);
+        READWRITE(thisPtr->vchSig);
+        return nSerSize;
+    }
 
     void SetNull();
     bool IsNull() const;
diff --git a/src/bloom.h b/src/bloom.h
index 54d16d712690..dafea6702929 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -63,12 +63,16 @@ class CBloomFilter
     CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(vData);
-        READWRITE(nHashFuncs);
-        READWRITE(nTweak);
-        READWRITE(nFlags);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->vData);
+        READWRITE(thisPtr->nHashFuncs);
+        READWRITE(thisPtr->nTweak);
+        READWRITE(thisPtr->nFlags);
+        return nSerSize;
+    }
 
     void insert(const std::vector<unsigned char>& vKey);
     void insert(const COutPoint& outpoint);
diff --git a/src/core.h b/src/core.h
index 126e1baa9895..1caf9da6c0fa 100644
--- a/src/core.h
+++ b/src/core.h
@@ -30,7 +30,16 @@ class COutPoint
 
     COutPoint() { SetNull(); }
     COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
-    IMPLEMENT_SERIALIZE( READWRITE(FLATDATA(*this)); )
+
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(FLATDATA(*thisPtr));
+        return nSerSize;
+    }
+
     void SetNull() { hash = 0; n = (uint32_t) -1; }
     bool IsNull() const { return (hash == 0 && n == (uint32_t) -1); }
 
@@ -85,11 +94,15 @@ class CTxIn
     CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(prevout);
-        READWRITE(scriptSig);
-        READWRITE(nSequence);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->prevout);
+        READWRITE(thisPtr->scriptSig);
+        READWRITE(thisPtr->nSequence);
+        return nSerSize;
+    }
 
     bool IsFinal() const
     {
@@ -136,7 +149,14 @@ class CFeeRate
     friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
     std::string ToString() const;
 
-    IMPLEMENT_SERIALIZE( READWRITE(nSatoshisPerK); )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->nSatoshisPerK);
+        return nSerSize;
+    }
 };
 
 
@@ -157,10 +177,14 @@ class CTxOut
     CTxOut(int64_t nValueIn, CScript scriptPubKeyIn);
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(nValue);
-        READWRITE(scriptPubKey);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->nValue);
+        READWRITE(thisPtr->scriptPubKey);
+        return nSerSize;
+    }
 
     void SetNull()
     {
@@ -237,15 +261,23 @@ class CTransaction
 
     CTransaction& operator=(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(*const_cast<int32_t*>(&this->nVersion));
-        nVersion = this->nVersion;
-        READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
-        READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
-        READWRITE(*const_cast<uint32_t*>(&nLockTime));
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        READWRITE(*const_cast<int32_t*>(&thisPtr->nVersion));
+        nVersion = thisPtr->nVersion;
+        READWRITE(*const_cast<std::vector<CTxIn>*>(&thisPtr->vin));
+        READWRITE(*const_cast<std::vector<CTxOut>*>(&thisPtr->vout));
+        READWRITE(*const_cast<uint32_t*>(&thisPtr->nLockTime));
         if (fRead)
-            UpdateHash();
-    )
+            thisPtr->UpdateHash();
+
+        return nSerSize;
+    }
 
     bool IsNull() const {
         return vin.empty() && vout.empty();
@@ -292,13 +324,20 @@ struct CMutableTransaction
     CMutableTransaction();
     CMutableTransaction(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(this->nVersion);
-        nVersion = this->nVersion;
-        READWRITE(vin);
-        READWRITE(vout);
-        READWRITE(nLockTime);
-    )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
+        READWRITE(thisPtr->nVersion);
+        nVersion = thisPtr->nVersion;
+        READWRITE(thisPtr->vin);
+        READWRITE(thisPtr->vout);
+        READWRITE(thisPtr->nLockTime);
+
+        return nSerSize;
+    }
 
     /** Compute the hash of this CMutableTransaction. This is computed on the
      * fly, as opposed to GetHash() in CTransaction, which uses a cached result.
@@ -318,18 +357,24 @@ class CTxOutCompressor
 
     CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
 
-    IMPLEMENT_SERIALIZE(({
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+        size_t nSerSize = 0;
         if (!fRead) {
-            uint64_t nVal = CompressAmount(txout.nValue);
+            uint64_t nVal = CompressAmount(thisPtr->txout.nValue);
             READWRITE(VARINT(nVal));
         } else {
             uint64_t nVal = 0;
             READWRITE(VARINT(nVal));
-            txout.nValue = DecompressAmount(nVal);
+            thisPtr->txout.nValue = DecompressAmount(nVal);
         }
-        CScriptCompressor cscript(REF(txout.scriptPubKey));
+        CScriptCompressor cscript(REF(thisPtr->txout.scriptPubKey));
         READWRITE(cscript);
-    });)
+        return nSerSize;
+    }
 };
 
 /** Undo information for a CTxIn
@@ -382,9 +427,14 @@ class CTxUndo
     // undo information for all txins
     std::vector<CTxInUndo> vprevout;
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(vprevout);
-    )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->vprevout);
+        return nSerSize;
+    }
 };
 
 
@@ -413,15 +463,21 @@ class CBlockHeader
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(this->nVersion);
-        nVersion = this->nVersion;
-        READWRITE(hashPrevBlock);
-        READWRITE(hashMerkleRoot);
-        READWRITE(nTime);
-        READWRITE(nBits);
-        READWRITE(nNonce);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
+        READWRITE(thisPtr->nVersion);
+        nVersion = thisPtr->nVersion;
+        READWRITE(thisPtr->hashPrevBlock);
+        READWRITE(thisPtr->hashMerkleRoot);
+        READWRITE(thisPtr->nTime);
+        READWRITE(thisPtr->nBits);
+        READWRITE(thisPtr->nNonce);
+
+        return nSerSize;
+    }
 
     void SetNull()
     {
@@ -468,10 +524,16 @@ class CBlock : public CBlockHeader
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(*(CBlockHeader*)this);
-        READWRITE(vtx);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
+        READWRITE(*(CBlockHeader*)thisPtr);
+        READWRITE(thisPtr->vtx);
+
+        return nSerSize;
+    }
 
     void SetNull()
     {
@@ -516,11 +578,17 @@ struct CBlockLocator
     }
 
     IMPLEMENT_SERIALIZE
-    (
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(vHave);
-    )
+        READWRITE(thisPtr->vHave);
+
+        return nSerSize;
+    }
 
     void SetNull()
     {
diff --git a/src/crypter.h b/src/crypter.h
index f16fcef9c702..c3f4ed971ca2 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -44,13 +44,18 @@ class CMasterKey
     std::vector<unsigned char> vchOtherDerivationParameters;
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(vchCryptedKey);
-        READWRITE(vchSalt);
-        READWRITE(nDerivationMethod);
-        READWRITE(nDeriveIterations);
-        READWRITE(vchOtherDerivationParameters);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->vchCryptedKey);
+        READWRITE(thisPtr->vchSalt);
+        READWRITE(thisPtr->nDerivationMethod);
+        READWRITE(thisPtr->nDeriveIterations);
+        READWRITE(thisPtr->vchOtherDerivationParameters);
+        return nSerSize;
+    }
+
     CMasterKey()
     {
         // 25000 rounds is just under 0.1 seconds on a 1.86 GHz Pentium M
diff --git a/src/main.h b/src/main.h
index 9fe15d3aa300..88e3159e3fd1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -197,10 +197,15 @@ struct CDiskBlockPos
     int nFile;
     unsigned int nPos;
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(VARINT(nFile));
-        READWRITE(VARINT(nPos));
-    )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(VARINT(thisPtr->nFile));
+        READWRITE(VARINT(thisPtr->nPos));
+        return nSerSize;
+    }
 
     CDiskBlockPos() {
         SetNull();
@@ -227,10 +232,15 @@ struct CDiskTxPos : public CDiskBlockPos
 {
     unsigned int nTxOffset; // after header
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(*(CDiskBlockPos*)this);
-        READWRITE(VARINT(nTxOffset));
-    )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(*(CDiskBlockPos*)thisPtr);
+        READWRITE(VARINT(thisPtr->nTxOffset));
+        return nSerSize;
+    }
 
     CDiskTxPos(const CDiskBlockPos &blockIn, unsigned int nTxOffsetIn) : CDiskBlockPos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {
     }
@@ -307,9 +317,14 @@ class CBlockUndo
 public:
     std::vector<CTxUndo> vtxundo; // for all but the coinbase
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(vtxundo);
-    )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->vtxundo);
+        return nSerSize;
+    }
 
     bool WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock);
     bool ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock);
@@ -411,24 +426,32 @@ class CPartialMerkleTree
 public:
 
     // serialization implementation
-    IMPLEMENT_SERIALIZE(
-        READWRITE(nTransactions);
-        READWRITE(vHash);
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        READWRITE(thisPtr->nTransactions);
+        READWRITE(thisPtr->vHash);
         std::vector<unsigned char> vBytes;
         if (fRead) {
             READWRITE(vBytes);
-            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(this));
+            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(thisPtr));
             us.vBits.resize(vBytes.size() * 8);
             for (unsigned int p = 0; p < us.vBits.size(); p++)
                 us.vBits[p] = (vBytes[p / 8] & (1 << (p % 8))) != 0;
             us.fBad = false;
         } else {
-            vBytes.resize((vBits.size()+7)/8);
-            for (unsigned int p = 0; p < vBits.size(); p++)
-                vBytes[p / 8] |= vBits[p] << (p % 8);
+            vBytes.resize((thisPtr->vBits.size()+7)/8);
+            for (unsigned int p = 0; p < thisPtr->vBits.size(); p++)
+                vBytes[p / 8] |= thisPtr->vBits[p] << (p % 8);
             READWRITE(vBytes);
         }
-    )
+
+        return nSerSize;
+    }
 
     // Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them
     CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
@@ -484,15 +507,22 @@ class CBlockFileInfo
     uint64_t nTimeFirst;         // earliest time of block in file
     uint64_t nTimeLast;          // latest time of block in file
 
-    IMPLEMENT_SERIALIZE(
-        READWRITE(VARINT(nBlocks));
-        READWRITE(VARINT(nSize));
-        READWRITE(VARINT(nUndoSize));
-        READWRITE(VARINT(nHeightFirst));
-        READWRITE(VARINT(nHeightLast));
-        READWRITE(VARINT(nTimeFirst));
-        READWRITE(VARINT(nTimeLast));
-     )
+    IMPLEMENT_SERIALIZE
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
+        READWRITE(VARINT(thisPtr->nBlocks));
+        READWRITE(VARINT(thisPtr->nSize));
+        READWRITE(VARINT(thisPtr->nUndoSize));
+        READWRITE(VARINT(thisPtr->nHeightFirst));
+        READWRITE(VARINT(thisPtr->nHeightLast));
+        READWRITE(VARINT(thisPtr->nTimeFirst));
+        READWRITE(VARINT(thisPtr->nTimeLast));
+
+        return nSerSize;
+    }
 
      void SetNull() {
          nBlocks = 0;
@@ -756,28 +786,34 @@ class CDiskBlockIndex : public CBlockIndex
     }
 
     IMPLEMENT_SERIALIZE
-    (
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
         if (!(nType & SER_GETHASH))
             READWRITE(VARINT(nVersion));
 
-        READWRITE(VARINT(nHeight));
-        READWRITE(VARINT(nStatus));
-        READWRITE(VARINT(nTx));
-        if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
-            READWRITE(VARINT(nFile));
-        if (nStatus & BLOCK_HAVE_DATA)
-            READWRITE(VARINT(nDataPos));
-        if (nStatus & BLOCK_HAVE_UNDO)
-            READWRITE(VARINT(nUndoPos));
+        READWRITE(VARINT(thisPtr->nHeight));
+        READWRITE(VARINT(thisPtr->nStatus));
+        READWRITE(VARINT(thisPtr->nTx));
+        if (thisPtr->nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
+            READWRITE(VARINT(thisPtr->nFile));
+        if (thisPtr->nStatus & BLOCK_HAVE_DATA)
+            READWRITE(VARINT(thisPtr->nDataPos));
+        if (thisPtr->nStatus & BLOCK_HAVE_UNDO)
+            READWRITE(VARINT(thisPtr->nUndoPos));
 
         // block header
-        READWRITE(this->nVersion);
-        READWRITE(hashPrev);
-        READWRITE(hashMerkleRoot);
-        READWRITE(nTime);
-        READWRITE(nBits);
-        READWRITE(nNonce);
-    )
+        READWRITE(thisPtr->nVersion);
+        READWRITE(thisPtr->hashPrev);
+        READWRITE(thisPtr->hashMerkleRoot);
+        READWRITE(thisPtr->nTime);
+        READWRITE(thisPtr->nBits);
+        READWRITE(thisPtr->nNonce);
+
+        return nSerSize;
+    }
 
     uint256 GetBlockHash() const
     {
@@ -976,10 +1012,14 @@ class CMerkleBlock
     CMerkleBlock(const CBlock& block, CBloomFilter& filter);
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(header);
-        READWRITE(txn);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->header);
+        READWRITE(thisPtr->txn);
+        return nSerSize;
+    }
 };
 
 
diff --git a/src/netbase.h b/src/netbase.h
index 2df3c4474df8..6f8c13250269 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -89,9 +89,13 @@ class CNetAddr
         friend bool operator<(const CNetAddr& a, const CNetAddr& b);
 
         IMPLEMENT_SERIALIZE
-            (
-             READWRITE(FLATDATA(ip));
-            )
+
+        template <typename T, typename Stream, typename Operation>
+        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+            size_t nSerSize = 0;
+            READWRITE(FLATDATA(thisPtr->ip));
+            return nSerSize;
+        }
 };
 
 class CSubNet
@@ -149,14 +153,19 @@ class CService : public CNetAddr
         CService(const struct sockaddr_in6& addr);
 
         IMPLEMENT_SERIALIZE
-            (
-             CService* pthis = const_cast<CService*>(this);
-             READWRITE(FLATDATA(ip));
-             unsigned short portN = htons(port);
-             READWRITE(portN);
-             if (fRead)
+
+        template <typename T, typename Stream, typename Operation>
+        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+            bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+            size_t nSerSize = 0;
+            CService* pthis = const_cast<CService*>(thisPtr);
+            READWRITE(FLATDATA(thisPtr->ip));
+            unsigned short portN = htons(thisPtr->port);
+            READWRITE(portN);
+            if (fRead)
                  pthis->port = ntohs(portN);
-            )
+            return nSerSize;
+        }
 };
 
 typedef CService proxyType;
diff --git a/src/protocol.h b/src/protocol.h
index d7565584af57..851fca9d9e48 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -36,12 +36,16 @@ class CMessageHeader
         bool IsValid() const;
 
         IMPLEMENT_SERIALIZE
-            (
-             READWRITE(FLATDATA(pchMessageStart));
-             READWRITE(FLATDATA(pchCommand));
-             READWRITE(nMessageSize);
-             READWRITE(nChecksum);
-            )
+
+        template <typename T, typename Stream, typename Operation>
+        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+            size_t nSerSize = 0;
+            READWRITE(FLATDATA(thisPtr->pchMessageStart));
+            READWRITE(FLATDATA(thisPtr->pchCommand));
+            READWRITE(thisPtr->nMessageSize);
+            READWRITE(thisPtr->nChecksum);
+            return nSerSize;
+        }
 
     // TODO: make private (improves encapsulation)
     public:
@@ -84,19 +88,26 @@ class CAddress : public CService
         void Init();
 
         IMPLEMENT_SERIALIZE
-            (
-             CAddress* pthis = const_cast<CAddress*>(this);
-             CService* pip = (CService*)pthis;
-             if (fRead)
-                 pthis->Init();
-             if (nType & SER_DISK)
-                 READWRITE(nVersion);
-             if ((nType & SER_DISK) ||
-                 (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
-                 READWRITE(nTime);
-             READWRITE(nServices);
-             READWRITE(*pip);
-            )
+
+        template <typename T, typename Stream, typename Operation>
+        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+            size_t nSerSize = 0;
+            bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+            CAddress* pthis = const_cast<CAddress*>(thisPtr);
+            CService* pip = (CService*)pthis;
+            if (fRead)
+                pthis->Init();
+            if (nType & SER_DISK)
+                READWRITE(nVersion);
+            if ((nType & SER_DISK) ||
+                (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
+            READWRITE(thisPtr->nTime);
+            READWRITE(thisPtr->nServices);
+            READWRITE(*pip);
+
+            return nSerSize;
+        }
 
     // TODO: make private (improves encapsulation)
     public:
@@ -118,10 +129,14 @@ class CInv
         CInv(const std::string& strType, const uint256& hashIn);
 
         IMPLEMENT_SERIALIZE
-        (
-            READWRITE(type);
-            READWRITE(hash);
-        )
+
+        template <typename T, typename Stream, typename Operation>
+        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+            size_t nSerSize = 0;
+            READWRITE(thisPtr->type);
+            READWRITE(thisPtr->hash);
+            return nSerSize;
+        }
 
         friend bool operator<(const CInv& a, const CInv& b);
 
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 4f0b241259de..50962334f51d 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -25,20 +25,27 @@ class RecentRequestEntry
     SendCoinsRecipient recipient;
 
     IMPLEMENT_SERIALIZE
-    (
-        RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(this);
 
-        unsigned int nDate = date.toTime_t();
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(thisPtr);
+
+        unsigned int nDate = thisPtr->date.toTime_t();
 
         READWRITE(pthis->nVersion);
         nVersion = pthis->nVersion;
-        READWRITE(id);
+        READWRITE(thisPtr->id);
         READWRITE(nDate);
-        READWRITE(recipient);
+        READWRITE(thisPtr->recipient);
 
         if (fRead)
             pthis->date = QDateTime::fromTime_t(nDate);
-    )
+
+        return nSerSize;
+    }
 };
 
 class RecentRequestEntryLessThan
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index b3a401e4cc94..543843733c74 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -60,8 +60,13 @@ class SendCoinsRecipient
     int nVersion;
 
     IMPLEMENT_SERIALIZE
-    (
-        SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(this);
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(thisPtr);
 
         std::string sAddress = pthis->address.toStdString();
         std::string sLabel = pthis->label.toStdString();
@@ -75,7 +80,7 @@ class SendCoinsRecipient
         nVersion = pthis->nVersion;
         READWRITE(sAddress);
         READWRITE(sLabel);
-        READWRITE(amount);
+        READWRITE(thisPtr->amount);
         READWRITE(sMessage);
         READWRITE(sPaymentRequest);
         READWRITE(sAuthenticatedMerchant);
@@ -89,7 +94,9 @@ class SendCoinsRecipient
                 pthis->paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
             pthis->authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
         }
-    )
+
+        return nSerSize;
+    }
 };
 
 /** Interface to Bitcoin wallet from Qt view code. */
diff --git a/src/serialize.h b/src/serialize.h
index 17cb724bee96..7e0ecc2edfdc 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -22,6 +22,7 @@
 
 #include <boost/tuple/tuple.hpp>
 #include <boost/type_traits/is_fundamental.hpp>
+#include <boost/typeof/typeof.hpp>
 
 class CAutoFile;
 class CDataStream;
@@ -37,6 +38,14 @@ inline T& REF(const T& val)
     return const_cast<T&>(val);
 }
 
+// Used to acquire a const pointer "this" and generate a const
+// serialization operation from a template
+template<typename T>
+inline T MAKE_CONST(T val)
+{
+    return const_cast<const T>(val);
+}
+
 /** Get begin pointer of vector (non-const version).
  * @note These functions avoid the undefined case of indexing into an empty
  * vector, as well as that of indexing after the end of the vector.
@@ -79,48 +88,27 @@ enum
     SER_GETHASH         = (1 << 2),
 };
 
-#define IMPLEMENT_SERIALIZE(statements)    \
-    unsigned int GetSerializeSize(int nType, int nVersion) const  \
-    {                                           \
-        CSerActionGetSerializeSize ser_action;  \
-        const bool fGetSize = true;             \
-        const bool fWrite = false;              \
-        const bool fRead = false;               \
-        unsigned int nSerSize = 0;              \
-        ser_streamplaceholder s;                \
-        assert(fGetSize||fWrite||fRead); /* suppress warning */ \
-        s.nType = nType;                        \
-        s.nVersion = nVersion;                  \
-        {statements}                            \
-        return nSerSize;                        \
-    }                                           \
-    template<typename Stream>                   \
-    void Serialize(Stream& s, int nType, int nVersion) const  \
-    {                                           \
-        CSerActionSerialize ser_action;         \
-        const bool fGetSize = false;            \
-        const bool fWrite = true;               \
-        const bool fRead = false;               \
-        unsigned int nSerSize = 0;              \
-        assert(fGetSize||fWrite||fRead); /* suppress warning */ \
-        {statements}                            \
-    }                                           \
-    template<typename Stream>                   \
-    void Unserialize(Stream& s, int nType, int nVersion)  \
-    {                                           \
-        CSerActionUnserialize ser_action;       \
-        const bool fGetSize = false;            \
-        const bool fWrite = false;              \
-        const bool fRead = true;                \
-        unsigned int nSerSize = 0;              \
-        assert(fGetSize||fWrite||fRead); /* suppress warning */ \
-        {statements}                            \
-    }
-
 #define READWRITE(obj)      (nSerSize += ::SerReadWrite(s, (obj), nType, nVersion, ser_action))
 
-
-
+/* Implement three methods for serializable objects. These are actually wrappers over
+ * "SerializationOp" template, which implements the body of each class' serialization
+ * code. Adding "IMPLEMENT_SERIALIZE" in the body of the class causes these wrappers to be
+ * added as members. */
+#define IMPLEMENT_SERIALIZE                                                                         \
+    size_t GetSerializeSize(int nType, int nVersion) const {                                        \
+        ser_streamplaceholder s;                                                                    \
+        s.nType = nType;                                                                            \
+        s.nVersion = nVersion;                                                                      \
+        return SerializationOp(MAKE_CONST(this), s, CSerActionGetSerializeSize(), nType, nVersion); \
+    }                                                                                               \
+    template<typename Stream>                                                                       \
+    void Serialize(Stream& s, int nType, int nVersion) const {                                      \
+        SerializationOp(MAKE_CONST(this), s, CSerActionSerialize(), nType, nVersion);               \
+    }                                                                                               \
+    template<typename Stream>                                                                       \
+    void Unserialize(Stream& s, int nType, int nVersion) {                                          \
+        SerializationOp(this, s, CSerActionUnserialize(), nType, nVersion);                         \
+    }
 
 
 
diff --git a/src/wallet.h b/src/wallet.h
index 544b4f5bfbe0..36b0bafe5ae2 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -64,12 +64,16 @@ class CKeyPool
     CKeyPool(const CPubKey& vchPubKeyIn);
 
     IMPLEMENT_SERIALIZE
-    (
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(nTime);
-        READWRITE(vchPubKey);
-    )
+        READWRITE(thisPtr->nTime);
+        READWRITE(thisPtr->vchPubKey);
+        return nSerSize;
+    }
 };
 
 /** Address book data */
@@ -489,16 +493,20 @@ class CMerkleTx : public CTransaction
         fMerkleVerified = false;
     }
 
-
     IMPLEMENT_SERIALIZE
-    (
-        nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action);
-        nVersion = this->nVersion;
-        READWRITE(hashBlock);
-        READWRITE(vMerkleBranch);
-        READWRITE(nIndex);
-    )
 
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+
+        nSerSize += SerReadWrite(s, *(CTransaction*)thisPtr, nType, nVersion, ser_action);
+        nVersion = thisPtr->nVersion;
+        READWRITE(thisPtr->hashBlock);
+        READWRITE(thisPtr->vMerkleBranch);
+        READWRITE(thisPtr->nIndex);
+
+        return nSerSize;
+    }
 
     int SetMerkleBranch(const CBlock* pblock=NULL);
 
@@ -513,7 +521,6 @@ class CMerkleTx : public CTransaction
     bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
 };
 
-
 /** A transaction with a bunch of additional info that only the owner cares about.
  * It includes any unrecorded transactions needed to link it back to the block chain.
  */
@@ -604,8 +611,13 @@ class CWalletTx : public CMerkleTx
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        CWalletTx* pthis = const_cast<CWalletTx*>(this);
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        CWalletTx* pthis = const_cast<CWalletTx*>(thisPtr);
         if (fRead)
             pthis->Init(NULL);
         char fSpent = false;
@@ -616,18 +628,18 @@ class CWalletTx : public CMerkleTx
 
             WriteOrderPos(pthis->nOrderPos, pthis->mapValue);
 
-            if (nTimeSmart)
-                pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart);
+            if (thisPtr->nTimeSmart)
+                pthis->mapValue["timesmart"] = strprintf("%u", thisPtr->nTimeSmart);
         }
 
-        nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action);
+        nSerSize += SerReadWrite(s, *(CMerkleTx*)thisPtr, nType, nVersion,ser_action);
         std::vector<CMerkleTx> vUnused; // Used to be vtxPrev
         READWRITE(vUnused);
-        READWRITE(mapValue);
-        READWRITE(vOrderForm);
-        READWRITE(fTimeReceivedIsTxTime);
-        READWRITE(nTimeReceived);
-        READWRITE(fFromMe);
+        READWRITE(thisPtr->mapValue);
+        READWRITE(thisPtr->vOrderForm);
+        READWRITE(thisPtr->fTimeReceivedIsTxTime);
+        READWRITE(thisPtr->nTimeReceived);
+        READWRITE(thisPtr->fFromMe);
         READWRITE(fSpent);
 
         if (fRead)
@@ -636,7 +648,7 @@ class CWalletTx : public CMerkleTx
 
             ReadOrderPos(pthis->nOrderPos, pthis->mapValue);
 
-            pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
+            pthis->nTimeSmart = thisPtr->mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
         }
 
         pthis->mapValue.erase("fromaccount");
@@ -644,7 +656,9 @@ class CWalletTx : public CMerkleTx
         pthis->mapValue.erase("spent");
         pthis->mapValue.erase("n");
         pthis->mapValue.erase("timesmart");
-    )
+
+        return nSerSize;
+    }
 
     // make sure balances are recalculated
     void MarkDirty()
@@ -891,14 +905,18 @@ class CWalletKey
     CWalletKey(int64_t nExpires=0);
 
     IMPLEMENT_SERIALIZE
-    (
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(vchPrivKey);
-        READWRITE(nTimeCreated);
-        READWRITE(nTimeExpires);
-        READWRITE(LIMITED_STRING(strComment, 65536));
-    )
+        READWRITE(thisPtr->vchPrivKey);
+        READWRITE(thisPtr->nTimeCreated);
+        READWRITE(thisPtr->nTimeExpires);
+        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
+        return nSerSize;
+    }
 };
 
 
@@ -925,11 +943,15 @@ class CAccount
     }
 
     IMPLEMENT_SERIALIZE
-    (
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(vchPubKey);
-    )
+        READWRITE(thisPtr->vchPubKey);
+        return nSerSize;
+    }
 };
 
 
@@ -966,38 +988,43 @@ class CAccountingEntry
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        CAccountingEntry& me = *const_cast<CAccountingEntry*>(this);
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+
+        CAccountingEntry& me = *const_cast<CAccountingEntry*>(thisPtr);
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         // Note: strAccount is serialized as part of the key, not here.
-        READWRITE(nCreditDebit);
-        READWRITE(nTime);
-        READWRITE(LIMITED_STRING(strOtherAccount, 65536));
+        READWRITE(thisPtr->nCreditDebit);
+        READWRITE(thisPtr->nTime);
+        READWRITE(LIMITED_STRING(thisPtr->strOtherAccount, 65536));
 
         if (!fRead)
         {
-            WriteOrderPos(nOrderPos, me.mapValue);
+            WriteOrderPos(thisPtr->nOrderPos, me.mapValue);
 
-            if (!(mapValue.empty() && _ssExtra.empty()))
+            if (!(thisPtr->mapValue.empty() && thisPtr->_ssExtra.empty()))
             {
                 CDataStream ss(nType, nVersion);
                 ss.insert(ss.begin(), '\0');
-                ss << mapValue;
-                ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end());
+                ss << thisPtr->mapValue;
+                ss.insert(ss.end(), thisPtr->_ssExtra.begin(), thisPtr->_ssExtra.end());
                 me.strComment.append(ss.str());
             }
         }
 
-        READWRITE(LIMITED_STRING(strComment, 65536));
+        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
 
-        size_t nSepPos = strComment.find("\0", 0, 1);
+        size_t nSepPos = thisPtr->strComment.find("\0", 0, 1);
         if (fRead)
         {
             me.mapValue.clear();
             if (std::string::npos != nSepPos)
             {
-                CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion);
+                CDataStream ss(std::vector<char>(thisPtr->strComment.begin() + nSepPos + 1, thisPtr->strComment.end()), nType, nVersion);
                 ss >> me.mapValue;
                 me._ssExtra = std::vector<char>(ss.begin(), ss.end());
             }
@@ -1007,7 +1034,9 @@ class CAccountingEntry
             me.strComment.erase(nSepPos);
 
         me.mapValue.erase("n");
-    )
+
+        return nSerSize;
+    }
 
 private:
     std::vector<char> _ssExtra;
diff --git a/src/walletdb.h b/src/walletdb.h
index 58b4571b16f2..e14c137ba8dd 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -55,11 +55,15 @@ class CKeyMetadata
     }
 
     IMPLEMENT_SERIALIZE
-    (
-        READWRITE(this->nVersion);
-        nVersion = this->nVersion;
-        READWRITE(nCreateTime);
-    )
+
+    template <typename T, typename Stream, typename Operation>
+    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        size_t nSerSize = 0;
+        READWRITE(thisPtr->nVersion);
+        nVersion = thisPtr->nVersion;
+        READWRITE(thisPtr->nCreateTime);
+        return nSerSize;
+    }
 
     void SetNull()
     {

From 5d96b4ae0188fcad36105642c5d69249d37fdbb5 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Wed, 20 Aug 2014 18:09:29 +0200
Subject: [PATCH 0625/1819] remove fields of ser_streamplaceholder

The nType and nVersion fields of stream objects are never accessed
from outside the class (or perhaps from the inside too, I haven't checked).
Thus no need to have them in a placeholder, whose only purpose is to
fill the "Stream" template parameter in serialization implementation.
---
 src/serialize.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index 7e0ecc2edfdc..c0666d30a5c6 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -97,8 +97,6 @@ enum
 #define IMPLEMENT_SERIALIZE                                                                         \
     size_t GetSerializeSize(int nType, int nVersion) const {                                        \
         ser_streamplaceholder s;                                                                    \
-        s.nType = nType;                                                                            \
-        s.nVersion = nVersion;                                                                      \
         return SerializationOp(MAKE_CONST(this), s, CSerActionGetSerializeSize(), nType, nVersion); \
     }                                                                                               \
     template<typename Stream>                                                                       \
@@ -835,13 +833,7 @@ inline unsigned int SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSe
     return 0;
 }
 
-struct ser_streamplaceholder
-{
-    int nType;
-    int nVersion;
-};
-
-
+struct ser_streamplaceholder { };
 
 
 

From 84881f8c472cc67dc757686eb7dc3b495b13cab8 Mon Sep 17 00:00:00 2001
From: Kamil Domanski <kdomanski@kdemail.net>
Date: Wed, 20 Aug 2014 22:44:38 +0200
Subject: [PATCH 0626/1819] rework overhauled serialization methods to
 non-static

Thanks to Pieter Wuille for most of the work on this commit.
I did not fixup the overhaul commit, because a rebase conflicted
with "remove fields of ser_streamplaceholder".
I prefer not to risk making a mistake while resolving it.
---
 src/addrman.h                     |  14 ++--
 src/alert.h                       |  46 +++++------
 src/bloom.h                       |  14 ++--
 src/core.h                        | 130 +++++++++++++++---------------
 src/crypter.h                     |  16 ++--
 src/main.h                        | 112 ++++++++++++-------------
 src/netbase.h                     |  20 ++---
 src/protocol.h                    |  36 ++++-----
 src/qt/recentrequeststablemodel.h |  14 ++--
 src/qt/walletmodel.h              |  10 +--
 src/serialize.h                   |  14 ++--
 src/wallet.h                      | 102 +++++++++++------------
 src/walletdb.h                    |  12 +--
 13 files changed, 270 insertions(+), 270 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 4287cbc1b33a..05af436aebaa 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -46,16 +46,16 @@ class CAddrInfo : public CAddress
 
 public:
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        CAddress* pthis = (CAddress*)(thisPtr);
+        CAddress* pthis = (CAddress*)(this);
         READWRITE(*pthis);
-        READWRITE(thisPtr->source);
-        READWRITE(thisPtr->nLastSuccess);
-        READWRITE(thisPtr->nAttempts);
+        READWRITE(source);
+        READWRITE(nLastSuccess);
+        READWRITE(nAttempts);
         return nSerSize;
     }
 
diff --git a/src/alert.h b/src/alert.h
index 4c8267fd062f..46ec4fbde008 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -46,26 +46,26 @@ class CUnsignedAlert
     std::string strStatusBar;
     std::string strReserved;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->nVersion);
-        nVersion = thisPtr->nVersion;
-        READWRITE(thisPtr->nRelayUntil);
-        READWRITE(thisPtr->nExpiration);
-        READWRITE(thisPtr->nID);
-        READWRITE(thisPtr->nCancel);
-        READWRITE(thisPtr->setCancel);
-        READWRITE(thisPtr->nMinVer);
-        READWRITE(thisPtr->nMaxVer);
-        READWRITE(thisPtr->setSubVer);
-        READWRITE(thisPtr->nPriority);
-
-        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
-        READWRITE(LIMITED_STRING(thisPtr->strStatusBar, 256));
-        READWRITE(LIMITED_STRING(thisPtr->strReserved, 256));
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(nRelayUntil);
+        READWRITE(nExpiration);
+        READWRITE(nID);
+        READWRITE(nCancel);
+        READWRITE(setCancel);
+        READWRITE(nMinVer);
+        READWRITE(nMaxVer);
+        READWRITE(setSubVer);
+        READWRITE(nPriority);
+
+        READWRITE(LIMITED_STRING(strComment, 65536));
+        READWRITE(LIMITED_STRING(strStatusBar, 256));
+        READWRITE(LIMITED_STRING(strReserved, 256));
         return nSerSize;
     }
 
@@ -86,13 +86,13 @@ class CAlert : public CUnsignedAlert
         SetNull();
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->vchMsg);
-        READWRITE(thisPtr->vchSig);
+        READWRITE(vchMsg);
+        READWRITE(vchSig);
         return nSerSize;
     }
 
diff --git a/src/bloom.h b/src/bloom.h
index dafea6702929..8dbf74f4943b 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -62,15 +62,15 @@ class CBloomFilter
     CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
     CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->vData);
-        READWRITE(thisPtr->nHashFuncs);
-        READWRITE(thisPtr->nTweak);
-        READWRITE(thisPtr->nFlags);
+        READWRITE(vData);
+        READWRITE(nHashFuncs);
+        READWRITE(nTweak);
+        READWRITE(nFlags);
         return nSerSize;
     }
 
diff --git a/src/core.h b/src/core.h
index 1caf9da6c0fa..e56be1a4eca0 100644
--- a/src/core.h
+++ b/src/core.h
@@ -31,12 +31,12 @@ class COutPoint
     COutPoint() { SetNull(); }
     COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(FLATDATA(*thisPtr));
+        READWRITE(FLATDATA(*this));
         return nSerSize;
     }
 
@@ -93,14 +93,14 @@ class CTxIn
     explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
     CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->prevout);
-        READWRITE(thisPtr->scriptSig);
-        READWRITE(thisPtr->nSequence);
+        READWRITE(prevout);
+        READWRITE(scriptSig);
+        READWRITE(nSequence);
         return nSerSize;
     }
 
@@ -149,12 +149,12 @@ class CFeeRate
     friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
     std::string ToString() const;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->nSatoshisPerK);
+        READWRITE(nSatoshisPerK);
         return nSerSize;
     }
 };
@@ -176,13 +176,13 @@ class CTxOut
 
     CTxOut(int64_t nValueIn, CScript scriptPubKeyIn);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->nValue);
-        READWRITE(thisPtr->scriptPubKey);
+        READWRITE(nValue);
+        READWRITE(scriptPubKey);
         return nSerSize;
     }
 
@@ -261,20 +261,20 @@ class CTransaction
 
     CTransaction& operator=(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        READWRITE(*const_cast<int32_t*>(&thisPtr->nVersion));
-        nVersion = thisPtr->nVersion;
-        READWRITE(*const_cast<std::vector<CTxIn>*>(&thisPtr->vin));
-        READWRITE(*const_cast<std::vector<CTxOut>*>(&thisPtr->vout));
-        READWRITE(*const_cast<uint32_t*>(&thisPtr->nLockTime));
+        READWRITE(*const_cast<int32_t*>(&this->nVersion));
+        nVersion = this->nVersion;
+        READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
+        READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
+        READWRITE(*const_cast<uint32_t*>(&nLockTime));
         if (fRead)
-            thisPtr->UpdateHash();
+            UpdateHash();
 
         return nSerSize;
     }
@@ -324,17 +324,17 @@ struct CMutableTransaction
     CMutableTransaction();
     CMutableTransaction(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
-        READWRITE(thisPtr->nVersion);
-        nVersion = thisPtr->nVersion;
-        READWRITE(thisPtr->vin);
-        READWRITE(thisPtr->vout);
-        READWRITE(thisPtr->nLockTime);
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(vin);
+        READWRITE(vout);
+        READWRITE(nLockTime);
 
         return nSerSize;
     }
@@ -357,21 +357,21 @@ class CTxOutCompressor
 
     CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
         size_t nSerSize = 0;
         if (!fRead) {
-            uint64_t nVal = CompressAmount(thisPtr->txout.nValue);
+            uint64_t nVal = CompressAmount(txout.nValue);
             READWRITE(VARINT(nVal));
         } else {
             uint64_t nVal = 0;
             READWRITE(VARINT(nVal));
-            thisPtr->txout.nValue = DecompressAmount(nVal);
+            txout.nValue = DecompressAmount(nVal);
         }
-        CScriptCompressor cscript(REF(thisPtr->txout.scriptPubKey));
+        CScriptCompressor cscript(REF(txout.scriptPubKey));
         READWRITE(cscript);
         return nSerSize;
     }
@@ -427,12 +427,12 @@ class CTxUndo
     // undo information for all txins
     std::vector<CTxInUndo> vprevout;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->vprevout);
+        READWRITE(vprevout);
         return nSerSize;
     }
 };
@@ -462,19 +462,19 @@ class CBlockHeader
         SetNull();
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
-        READWRITE(thisPtr->nVersion);
-        nVersion = thisPtr->nVersion;
-        READWRITE(thisPtr->hashPrevBlock);
-        READWRITE(thisPtr->hashMerkleRoot);
-        READWRITE(thisPtr->nTime);
-        READWRITE(thisPtr->nBits);
-        READWRITE(thisPtr->nNonce);
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(hashPrevBlock);
+        READWRITE(hashMerkleRoot);
+        READWRITE(nTime);
+        READWRITE(nBits);
+        READWRITE(nNonce);
 
         return nSerSize;
     }
@@ -523,14 +523,14 @@ class CBlock : public CBlockHeader
         *((CBlockHeader*)this) = header;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
-        READWRITE(*(CBlockHeader*)thisPtr);
-        READWRITE(thisPtr->vtx);
+        READWRITE(*(CBlockHeader*)this);
+        READWRITE(vtx);
 
         return nSerSize;
     }
@@ -577,15 +577,15 @@ struct CBlockLocator
         vHave = vHaveIn;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(thisPtr->vHave);
+        READWRITE(vHave);
 
         return nSerSize;
     }
diff --git a/src/crypter.h b/src/crypter.h
index c3f4ed971ca2..ce4c6315aa69 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -43,16 +43,16 @@ class CMasterKey
     // such as the various parameters to scrypt
     std::vector<unsigned char> vchOtherDerivationParameters;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->vchCryptedKey);
-        READWRITE(thisPtr->vchSalt);
-        READWRITE(thisPtr->nDerivationMethod);
-        READWRITE(thisPtr->nDeriveIterations);
-        READWRITE(thisPtr->vchOtherDerivationParameters);
+        READWRITE(vchCryptedKey);
+        READWRITE(vchSalt);
+        READWRITE(nDerivationMethod);
+        READWRITE(nDeriveIterations);
+        READWRITE(vchOtherDerivationParameters);
         return nSerSize;
     }
 
diff --git a/src/main.h b/src/main.h
index 88e3159e3fd1..8a5fa0e7e0fc 100644
--- a/src/main.h
+++ b/src/main.h
@@ -197,13 +197,13 @@ struct CDiskBlockPos
     int nFile;
     unsigned int nPos;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(VARINT(thisPtr->nFile));
-        READWRITE(VARINT(thisPtr->nPos));
+        READWRITE(VARINT(nFile));
+        READWRITE(VARINT(nPos));
         return nSerSize;
     }
 
@@ -232,13 +232,13 @@ struct CDiskTxPos : public CDiskBlockPos
 {
     unsigned int nTxOffset; // after header
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(*(CDiskBlockPos*)thisPtr);
-        READWRITE(VARINT(thisPtr->nTxOffset));
+        READWRITE(*(CDiskBlockPos*)this);
+        READWRITE(VARINT(nTxOffset));
         return nSerSize;
     }
 
@@ -317,12 +317,12 @@ class CBlockUndo
 public:
     std::vector<CTxUndo> vtxundo; // for all but the coinbase
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->vtxundo);
+        READWRITE(vtxundo);
         return nSerSize;
     }
 
@@ -426,27 +426,27 @@ class CPartialMerkleTree
 public:
 
     // serialization implementation
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        READWRITE(thisPtr->nTransactions);
-        READWRITE(thisPtr->vHash);
+        READWRITE(nTransactions);
+        READWRITE(vHash);
         std::vector<unsigned char> vBytes;
         if (fRead) {
             READWRITE(vBytes);
-            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(thisPtr));
+            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(this));
             us.vBits.resize(vBytes.size() * 8);
             for (unsigned int p = 0; p < us.vBits.size(); p++)
                 us.vBits[p] = (vBytes[p / 8] & (1 << (p % 8))) != 0;
             us.fBad = false;
         } else {
-            vBytes.resize((thisPtr->vBits.size()+7)/8);
-            for (unsigned int p = 0; p < thisPtr->vBits.size(); p++)
-                vBytes[p / 8] |= thisPtr->vBits[p] << (p % 8);
+            vBytes.resize((vBits.size()+7)/8);
+            for (unsigned int p = 0; p < vBits.size(); p++)
+                vBytes[p / 8] |= vBits[p] << (p % 8);
             READWRITE(vBytes);
         }
 
@@ -507,19 +507,19 @@ class CBlockFileInfo
     uint64_t nTimeFirst;         // earliest time of block in file
     uint64_t nTimeLast;          // latest time of block in file
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
-        READWRITE(VARINT(thisPtr->nBlocks));
-        READWRITE(VARINT(thisPtr->nSize));
-        READWRITE(VARINT(thisPtr->nUndoSize));
-        READWRITE(VARINT(thisPtr->nHeightFirst));
-        READWRITE(VARINT(thisPtr->nHeightLast));
-        READWRITE(VARINT(thisPtr->nTimeFirst));
-        READWRITE(VARINT(thisPtr->nTimeLast));
+        READWRITE(VARINT(nBlocks));
+        READWRITE(VARINT(nSize));
+        READWRITE(VARINT(nUndoSize));
+        READWRITE(VARINT(nHeightFirst));
+        READWRITE(VARINT(nHeightLast));
+        READWRITE(VARINT(nTimeFirst));
+        READWRITE(VARINT(nTimeLast));
 
         return nSerSize;
     }
@@ -785,32 +785,32 @@ class CDiskBlockIndex : public CBlockIndex
         hashPrev = (pprev ? pprev->GetBlockHash() : 0);
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
         if (!(nType & SER_GETHASH))
             READWRITE(VARINT(nVersion));
 
-        READWRITE(VARINT(thisPtr->nHeight));
-        READWRITE(VARINT(thisPtr->nStatus));
-        READWRITE(VARINT(thisPtr->nTx));
-        if (thisPtr->nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
-            READWRITE(VARINT(thisPtr->nFile));
-        if (thisPtr->nStatus & BLOCK_HAVE_DATA)
-            READWRITE(VARINT(thisPtr->nDataPos));
-        if (thisPtr->nStatus & BLOCK_HAVE_UNDO)
-            READWRITE(VARINT(thisPtr->nUndoPos));
+        READWRITE(VARINT(nHeight));
+        READWRITE(VARINT(nStatus));
+        READWRITE(VARINT(nTx));
+        if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
+            READWRITE(VARINT(nFile));
+        if (nStatus & BLOCK_HAVE_DATA)
+            READWRITE(VARINT(nDataPos));
+        if (nStatus & BLOCK_HAVE_UNDO)
+            READWRITE(VARINT(nUndoPos));
 
         // block header
-        READWRITE(thisPtr->nVersion);
-        READWRITE(thisPtr->hashPrev);
-        READWRITE(thisPtr->hashMerkleRoot);
-        READWRITE(thisPtr->nTime);
-        READWRITE(thisPtr->nBits);
-        READWRITE(thisPtr->nNonce);
+        READWRITE(this->nVersion);
+        READWRITE(hashPrev);
+        READWRITE(hashMerkleRoot);
+        READWRITE(nTime);
+        READWRITE(nBits);
+        READWRITE(nNonce);
 
         return nSerSize;
     }
@@ -1011,13 +1011,13 @@ class CMerkleBlock
     // thus the filter will likely be modified.
     CMerkleBlock(const CBlock& block, CBloomFilter& filter);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->header);
-        READWRITE(thisPtr->txn);
+        READWRITE(header);
+        READWRITE(txn);
         return nSerSize;
     }
 };
diff --git a/src/netbase.h b/src/netbase.h
index 6f8c13250269..b4ba711261b3 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -88,12 +88,12 @@ class CNetAddr
         friend bool operator!=(const CNetAddr& a, const CNetAddr& b);
         friend bool operator<(const CNetAddr& a, const CNetAddr& b);
 
-        IMPLEMENT_SERIALIZE
+        IMPLEMENT_SERIALIZE;
 
-        template <typename T, typename Stream, typename Operation>
-        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        template <typename Stream, typename Operation>
+        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             size_t nSerSize = 0;
-            READWRITE(FLATDATA(thisPtr->ip));
+            READWRITE(FLATDATA(ip));
             return nSerSize;
         }
 };
@@ -152,15 +152,15 @@ class CService : public CNetAddr
         CService(const struct in6_addr& ipv6Addr, unsigned short port);
         CService(const struct sockaddr_in6& addr);
 
-        IMPLEMENT_SERIALIZE
+        IMPLEMENT_SERIALIZE;
 
-        template <typename T, typename Stream, typename Operation>
-        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        template <typename Stream, typename Operation>
+        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
             size_t nSerSize = 0;
-            CService* pthis = const_cast<CService*>(thisPtr);
-            READWRITE(FLATDATA(thisPtr->ip));
-            unsigned short portN = htons(thisPtr->port);
+            CService* pthis = const_cast<CService*>(this);
+            READWRITE(FLATDATA(ip));
+            unsigned short portN = htons(port);
             READWRITE(portN);
             if (fRead)
                  pthis->port = ntohs(portN);
diff --git a/src/protocol.h b/src/protocol.h
index 851fca9d9e48..0f5c5559d1d8 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -35,15 +35,15 @@ class CMessageHeader
         std::string GetCommand() const;
         bool IsValid() const;
 
-        IMPLEMENT_SERIALIZE
+        IMPLEMENT_SERIALIZE;
 
-        template <typename T, typename Stream, typename Operation>
-        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        template <typename Stream, typename Operation>
+        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             size_t nSerSize = 0;
-            READWRITE(FLATDATA(thisPtr->pchMessageStart));
-            READWRITE(FLATDATA(thisPtr->pchCommand));
-            READWRITE(thisPtr->nMessageSize);
-            READWRITE(thisPtr->nChecksum);
+            READWRITE(FLATDATA(pchMessageStart));
+            READWRITE(FLATDATA(pchCommand));
+            READWRITE(nMessageSize);
+            READWRITE(nChecksum);
             return nSerSize;
         }
 
@@ -87,14 +87,14 @@ class CAddress : public CService
 
         void Init();
 
-        IMPLEMENT_SERIALIZE
+        IMPLEMENT_SERIALIZE;
 
-        template <typename T, typename Stream, typename Operation>
-        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        template <typename Stream, typename Operation>
+        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             size_t nSerSize = 0;
             bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-            CAddress* pthis = const_cast<CAddress*>(thisPtr);
+            CAddress* pthis = const_cast<CAddress*>(this);
             CService* pip = (CService*)pthis;
             if (fRead)
                 pthis->Init();
@@ -102,8 +102,8 @@ class CAddress : public CService
                 READWRITE(nVersion);
             if ((nType & SER_DISK) ||
                 (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
-            READWRITE(thisPtr->nTime);
-            READWRITE(thisPtr->nServices);
+            READWRITE(nTime);
+            READWRITE(nServices);
             READWRITE(*pip);
 
             return nSerSize;
@@ -128,13 +128,13 @@ class CInv
         CInv(int typeIn, const uint256& hashIn);
         CInv(const std::string& strType, const uint256& hashIn);
 
-        IMPLEMENT_SERIALIZE
+        IMPLEMENT_SERIALIZE;
 
-        template <typename T, typename Stream, typename Operation>
-        inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+        template <typename Stream, typename Operation>
+        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             size_t nSerSize = 0;
-            READWRITE(thisPtr->type);
-            READWRITE(thisPtr->hash);
+            READWRITE(type);
+            READWRITE(hash);
             return nSerSize;
         }
 
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 50962334f51d..581d7b2c5e48 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -24,22 +24,22 @@ class RecentRequestEntry
     QDateTime date;
     SendCoinsRecipient recipient;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(thisPtr);
+        RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(this);
 
-        unsigned int nDate = thisPtr->date.toTime_t();
+        unsigned int nDate = date.toTime_t();
 
         READWRITE(pthis->nVersion);
         nVersion = pthis->nVersion;
-        READWRITE(thisPtr->id);
+        READWRITE(id);
         READWRITE(nDate);
-        READWRITE(thisPtr->recipient);
+        READWRITE(recipient);
 
         if (fRead)
             pthis->date = QDateTime::fromTime_t(nDate);
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 543843733c74..553b56654498 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -59,14 +59,14 @@ class SendCoinsRecipient
     static const int CURRENT_VERSION = 1;
     int nVersion;
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(thisPtr);
+        SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(this);
 
         std::string sAddress = pthis->address.toStdString();
         std::string sLabel = pthis->label.toStdString();
@@ -80,7 +80,7 @@ class SendCoinsRecipient
         nVersion = pthis->nVersion;
         READWRITE(sAddress);
         READWRITE(sLabel);
-        READWRITE(thisPtr->amount);
+        READWRITE(amount);
         READWRITE(sMessage);
         READWRITE(sPaymentRequest);
         READWRITE(sAuthenticatedMerchant);
diff --git a/src/serialize.h b/src/serialize.h
index c0666d30a5c6..6eefa18135d7 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -38,12 +38,12 @@ inline T& REF(const T& val)
     return const_cast<T&>(val);
 }
 
-// Used to acquire a const pointer "this" and generate a const
-// serialization operation from a template
+// Used to acquire a non-const pointer "this" to generate bodies
+// of const serialization operations from a template
 template<typename T>
-inline T MAKE_CONST(T val)
+inline T* NCONST_PTR(const T* val)
 {
-    return const_cast<const T>(val);
+    return const_cast<T*>(val);
 }
 
 /** Get begin pointer of vector (non-const version).
@@ -97,15 +97,15 @@ enum
 #define IMPLEMENT_SERIALIZE                                                                         \
     size_t GetSerializeSize(int nType, int nVersion) const {                                        \
         ser_streamplaceholder s;                                                                    \
-        return SerializationOp(MAKE_CONST(this), s, CSerActionGetSerializeSize(), nType, nVersion); \
+        return NCONST_PTR(this)->SerializationOp(s, CSerActionGetSerializeSize(), nType, nVersion); \
     }                                                                                               \
     template<typename Stream>                                                                       \
     void Serialize(Stream& s, int nType, int nVersion) const {                                      \
-        SerializationOp(MAKE_CONST(this), s, CSerActionSerialize(), nType, nVersion);               \
+        NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);               \
     }                                                                                               \
     template<typename Stream>                                                                       \
     void Unserialize(Stream& s, int nType, int nVersion) {                                          \
-        SerializationOp(this, s, CSerActionUnserialize(), nType, nVersion);                         \
+        SerializationOp(s, CSerActionUnserialize(), nType, nVersion);                               \
     }
 
 
diff --git a/src/wallet.h b/src/wallet.h
index 36b0bafe5ae2..d30a28218fbc 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -63,15 +63,15 @@ class CKeyPool
     CKeyPool();
     CKeyPool(const CPubKey& vchPubKeyIn);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(thisPtr->nTime);
-        READWRITE(thisPtr->vchPubKey);
+        READWRITE(nTime);
+        READWRITE(vchPubKey);
         return nSerSize;
     }
 };
@@ -493,17 +493,17 @@ class CMerkleTx : public CTransaction
         fMerkleVerified = false;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
 
-        nSerSize += SerReadWrite(s, *(CTransaction*)thisPtr, nType, nVersion, ser_action);
-        nVersion = thisPtr->nVersion;
-        READWRITE(thisPtr->hashBlock);
-        READWRITE(thisPtr->vMerkleBranch);
-        READWRITE(thisPtr->nIndex);
+        nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action);
+        nVersion = this->nVersion;
+        READWRITE(hashBlock);
+        READWRITE(vMerkleBranch);
+        READWRITE(nIndex);
 
         return nSerSize;
     }
@@ -610,14 +610,14 @@ class CWalletTx : public CMerkleTx
         nOrderPos = -1;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        CWalletTx* pthis = const_cast<CWalletTx*>(thisPtr);
+        CWalletTx* pthis = const_cast<CWalletTx*>(this);
         if (fRead)
             pthis->Init(NULL);
         char fSpent = false;
@@ -628,18 +628,18 @@ class CWalletTx : public CMerkleTx
 
             WriteOrderPos(pthis->nOrderPos, pthis->mapValue);
 
-            if (thisPtr->nTimeSmart)
-                pthis->mapValue["timesmart"] = strprintf("%u", thisPtr->nTimeSmart);
+            if (nTimeSmart)
+                pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart);
         }
 
-        nSerSize += SerReadWrite(s, *(CMerkleTx*)thisPtr, nType, nVersion,ser_action);
+        nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action);
         std::vector<CMerkleTx> vUnused; // Used to be vtxPrev
         READWRITE(vUnused);
-        READWRITE(thisPtr->mapValue);
-        READWRITE(thisPtr->vOrderForm);
-        READWRITE(thisPtr->fTimeReceivedIsTxTime);
-        READWRITE(thisPtr->nTimeReceived);
-        READWRITE(thisPtr->fFromMe);
+        READWRITE(mapValue);
+        READWRITE(vOrderForm);
+        READWRITE(fTimeReceivedIsTxTime);
+        READWRITE(nTimeReceived);
+        READWRITE(fFromMe);
         READWRITE(fSpent);
 
         if (fRead)
@@ -648,7 +648,7 @@ class CWalletTx : public CMerkleTx
 
             ReadOrderPos(pthis->nOrderPos, pthis->mapValue);
 
-            pthis->nTimeSmart = thisPtr->mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
+            pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
         }
 
         pthis->mapValue.erase("fromaccount");
@@ -904,17 +904,17 @@ class CWalletKey
 
     CWalletKey(int64_t nExpires=0);
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(thisPtr->vchPrivKey);
-        READWRITE(thisPtr->nTimeCreated);
-        READWRITE(thisPtr->nTimeExpires);
-        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
+        READWRITE(vchPrivKey);
+        READWRITE(nTimeCreated);
+        READWRITE(nTimeExpires);
+        READWRITE(LIMITED_STRING(strComment, 65536));
         return nSerSize;
     }
 };
@@ -942,14 +942,14 @@ class CAccount
         vchPubKey = CPubKey();
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        READWRITE(thisPtr->vchPubKey);
+        READWRITE(vchPubKey);
         return nSerSize;
     }
 };
@@ -987,44 +987,44 @@ class CAccountingEntry
         nEntryNo = 0;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
         bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
 
-        CAccountingEntry& me = *const_cast<CAccountingEntry*>(thisPtr);
+        CAccountingEntry& me = *const_cast<CAccountingEntry*>(this);
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         // Note: strAccount is serialized as part of the key, not here.
-        READWRITE(thisPtr->nCreditDebit);
-        READWRITE(thisPtr->nTime);
-        READWRITE(LIMITED_STRING(thisPtr->strOtherAccount, 65536));
+        READWRITE(nCreditDebit);
+        READWRITE(nTime);
+        READWRITE(LIMITED_STRING(strOtherAccount, 65536));
 
         if (!fRead)
         {
-            WriteOrderPos(thisPtr->nOrderPos, me.mapValue);
+            WriteOrderPos(nOrderPos, me.mapValue);
 
-            if (!(thisPtr->mapValue.empty() && thisPtr->_ssExtra.empty()))
+            if (!(mapValue.empty() && _ssExtra.empty()))
             {
                 CDataStream ss(nType, nVersion);
                 ss.insert(ss.begin(), '\0');
-                ss << thisPtr->mapValue;
-                ss.insert(ss.end(), thisPtr->_ssExtra.begin(), thisPtr->_ssExtra.end());
+                ss << mapValue;
+                ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end());
                 me.strComment.append(ss.str());
             }
         }
 
-        READWRITE(LIMITED_STRING(thisPtr->strComment, 65536));
+        READWRITE(LIMITED_STRING(strComment, 65536));
 
-        size_t nSepPos = thisPtr->strComment.find("\0", 0, 1);
+        size_t nSepPos = strComment.find("\0", 0, 1);
         if (fRead)
         {
             me.mapValue.clear();
             if (std::string::npos != nSepPos)
             {
-                CDataStream ss(std::vector<char>(thisPtr->strComment.begin() + nSepPos + 1, thisPtr->strComment.end()), nType, nVersion);
+                CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion);
                 ss >> me.mapValue;
                 me._ssExtra = std::vector<char>(ss.begin(), ss.end());
             }
diff --git a/src/walletdb.h b/src/walletdb.h
index e14c137ba8dd..2dd257c2c194 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -54,14 +54,14 @@ class CKeyMetadata
         nCreateTime = nCreateTime_;
     }
 
-    IMPLEMENT_SERIALIZE
+    IMPLEMENT_SERIALIZE;
 
-    template <typename T, typename Stream, typename Operation>
-    inline static size_t SerializationOp(T thisPtr, Stream& s, Operation ser_action, int nType, int nVersion) {
+    template <typename Stream, typename Operation>
+    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         size_t nSerSize = 0;
-        READWRITE(thisPtr->nVersion);
-        nVersion = thisPtr->nVersion;
-        READWRITE(thisPtr->nCreateTime);
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(nCreateTime);
         return nSerSize;
     }
 

From 31e9a8384a77947f6777d035992f4734618ed206 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 21 Aug 2014 00:49:32 +0200
Subject: [PATCH 0627/1819] Use CSizeComputer to avoid counting sizes in
 SerializationOp

---
 src/addrman.h                     |  7 ++--
 src/alert.h                       |  8 ++---
 src/bloom.h                       |  4 +--
 src/core.h                        | 57 +++++++------------------------
 src/crypter.h                     |  4 +--
 src/main.h                        | 35 +++++--------------
 src/netbase.h                     | 13 +++----
 src/protocol.h                    | 18 +++-------
 src/qt/recentrequeststablemodel.h |  9 ++---
 src/qt/walletmodel.h              |  7 ++--
 src/serialize.h                   | 51 +++++++++++++--------------
 src/wallet.h                      | 48 +++++++++-----------------
 src/walletdb.h                    |  4 +--
 13 files changed, 81 insertions(+), 184 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 05af436aebaa..2b6e45664c2e 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -49,14 +49,11 @@ class CAddrInfo : public CAddress
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        CAddress* pthis = (CAddress*)(this);
-        READWRITE(*pthis);
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(*(CAddress*)this);
         READWRITE(source);
         READWRITE(nLastSuccess);
         READWRITE(nAttempts);
-        return nSerSize;
     }
 
     void Init()
diff --git a/src/alert.h b/src/alert.h
index 46ec4fbde008..b25ac41f6b08 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -49,8 +49,7 @@ class CUnsignedAlert
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(this->nVersion);
         nVersion = this->nVersion;
         READWRITE(nRelayUntil);
@@ -66,7 +65,6 @@ class CUnsignedAlert
         READWRITE(LIMITED_STRING(strComment, 65536));
         READWRITE(LIMITED_STRING(strStatusBar, 256));
         READWRITE(LIMITED_STRING(strReserved, 256));
-        return nSerSize;
     }
 
     void SetNull();
@@ -89,11 +87,9 @@ class CAlert : public CUnsignedAlert
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vchMsg);
         READWRITE(vchSig);
-        return nSerSize;
     }
 
     void SetNull();
diff --git a/src/bloom.h b/src/bloom.h
index 8dbf74f4943b..a5269d08d48a 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -65,13 +65,11 @@ class CBloomFilter
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vData);
         READWRITE(nHashFuncs);
         READWRITE(nTweak);
         READWRITE(nFlags);
-        return nSerSize;
     }
 
     void insert(const std::vector<unsigned char>& vKey);
diff --git a/src/core.h b/src/core.h
index e56be1a4eca0..486782e5b734 100644
--- a/src/core.h
+++ b/src/core.h
@@ -34,10 +34,8 @@ class COutPoint
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(FLATDATA(*this));
-        return nSerSize;
     }
 
     void SetNull() { hash = 0; n = (uint32_t) -1; }
@@ -96,12 +94,10 @@ class CTxIn
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(prevout);
         READWRITE(scriptSig);
         READWRITE(nSequence);
-        return nSerSize;
     }
 
     bool IsFinal() const
@@ -152,10 +148,8 @@ class CFeeRate
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(nSatoshisPerK);
-        return nSerSize;
     }
 };
 
@@ -179,11 +173,9 @@ class CTxOut
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(nValue);
         READWRITE(scriptPubKey);
-        return nSerSize;
     }
 
     void SetNull()
@@ -264,9 +256,8 @@ class CTransaction
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         READWRITE(*const_cast<int32_t*>(&this->nVersion));
         nVersion = this->nVersion;
@@ -275,8 +266,6 @@ class CTransaction
         READWRITE(*const_cast<uint32_t*>(&nLockTime));
         if (fRead)
             UpdateHash();
-
-        return nSerSize;
     }
 
     bool IsNull() const {
@@ -327,16 +316,12 @@ struct CMutableTransaction
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(this->nVersion);
         nVersion = this->nVersion;
         READWRITE(vin);
         READWRITE(vout);
         READWRITE(nLockTime);
-
-        return nSerSize;
     }
 
     /** Compute the hash of this CMutableTransaction. This is computed on the
@@ -360,9 +345,8 @@ class CTxOutCompressor
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
         if (!fRead) {
             uint64_t nVal = CompressAmount(txout.nValue);
             READWRITE(VARINT(nVal));
@@ -373,7 +357,6 @@ class CTxOutCompressor
         }
         CScriptCompressor cscript(REF(txout.scriptPubKey));
         READWRITE(cscript);
-        return nSerSize;
     }
 };
 
@@ -430,10 +413,8 @@ class CTxUndo
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vprevout);
-        return nSerSize;
     }
 };
 
@@ -465,9 +446,7 @@ class CBlockHeader
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(this->nVersion);
         nVersion = this->nVersion;
         READWRITE(hashPrevBlock);
@@ -475,8 +454,6 @@ class CBlockHeader
         READWRITE(nTime);
         READWRITE(nBits);
         READWRITE(nNonce);
-
-        return nSerSize;
     }
 
     void SetNull()
@@ -526,13 +503,9 @@ class CBlock : public CBlockHeader
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(*(CBlockHeader*)this);
         READWRITE(vtx);
-
-        return nSerSize;
     }
 
     void SetNull()
@@ -580,14 +553,10 @@ struct CBlockLocator
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         READWRITE(vHave);
-
-        return nSerSize;
     }
 
     void SetNull()
diff --git a/src/crypter.h b/src/crypter.h
index ce4c6315aa69..b00f92721cb9 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -46,14 +46,12 @@ class CMasterKey
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vchCryptedKey);
         READWRITE(vchSalt);
         READWRITE(nDerivationMethod);
         READWRITE(nDeriveIterations);
         READWRITE(vchOtherDerivationParameters);
-        return nSerSize;
     }
 
     CMasterKey()
diff --git a/src/main.h b/src/main.h
index 8a5fa0e7e0fc..cea8a649e318 100644
--- a/src/main.h
+++ b/src/main.h
@@ -200,11 +200,9 @@ struct CDiskBlockPos
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(VARINT(nFile));
         READWRITE(VARINT(nPos));
-        return nSerSize;
     }
 
     CDiskBlockPos() {
@@ -235,11 +233,9 @@ struct CDiskTxPos : public CDiskBlockPos
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(*(CDiskBlockPos*)this);
         READWRITE(VARINT(nTxOffset));
-        return nSerSize;
     }
 
     CDiskTxPos(const CDiskBlockPos &blockIn, unsigned int nTxOffsetIn) : CDiskBlockPos(blockIn.nFile, blockIn.nPos), nTxOffset(nTxOffsetIn) {
@@ -320,10 +316,8 @@ class CBlockUndo
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vtxundo);
-        return nSerSize;
     }
 
     bool WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock);
@@ -429,9 +423,8 @@ class CPartialMerkleTree
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         READWRITE(nTransactions);
         READWRITE(vHash);
@@ -449,8 +442,6 @@ class CPartialMerkleTree
                 vBytes[p / 8] |= vBits[p] << (p % 8);
             READWRITE(vBytes);
         }
-
-        return nSerSize;
     }
 
     // Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them
@@ -510,9 +501,7 @@ class CBlockFileInfo
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(VARINT(nBlocks));
         READWRITE(VARINT(nSize));
         READWRITE(VARINT(nUndoSize));
@@ -520,8 +509,6 @@ class CBlockFileInfo
         READWRITE(VARINT(nHeightLast));
         READWRITE(VARINT(nTimeFirst));
         READWRITE(VARINT(nTimeLast));
-
-        return nSerSize;
     }
 
      void SetNull() {
@@ -788,9 +775,7 @@ class CDiskBlockIndex : public CBlockIndex
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(VARINT(nVersion));
 
@@ -811,8 +796,6 @@ class CDiskBlockIndex : public CBlockIndex
         READWRITE(nTime);
         READWRITE(nBits);
         READWRITE(nNonce);
-
-        return nSerSize;
     }
 
     uint256 GetBlockHash() const
@@ -1014,11 +997,9 @@ class CMerkleBlock
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(header);
         READWRITE(txn);
-        return nSerSize;
     }
 };
 
diff --git a/src/netbase.h b/src/netbase.h
index b4ba711261b3..1ea37519a699 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -91,10 +91,8 @@ class CNetAddr
         IMPLEMENT_SERIALIZE;
 
         template <typename Stream, typename Operation>
-        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            size_t nSerSize = 0;
+        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             READWRITE(FLATDATA(ip));
-            return nSerSize;
         }
 };
 
@@ -155,16 +153,13 @@ class CService : public CNetAddr
         IMPLEMENT_SERIALIZE;
 
         template <typename Stream, typename Operation>
-        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
-            size_t nSerSize = 0;
-            CService* pthis = const_cast<CService*>(this);
+        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+            bool fRead = ser_action.ForRead();
             READWRITE(FLATDATA(ip));
             unsigned short portN = htons(port);
             READWRITE(portN);
             if (fRead)
-                 pthis->port = ntohs(portN);
-            return nSerSize;
+                 port = ntohs(portN);
         }
 };
 
diff --git a/src/protocol.h b/src/protocol.h
index 0f5c5559d1d8..e4b099177499 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -38,13 +38,11 @@ class CMessageHeader
         IMPLEMENT_SERIALIZE;
 
         template <typename Stream, typename Operation>
-        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            size_t nSerSize = 0;
+        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             READWRITE(FLATDATA(pchMessageStart));
             READWRITE(FLATDATA(pchCommand));
             READWRITE(nMessageSize);
             READWRITE(nChecksum);
-            return nSerSize;
         }
 
     // TODO: make private (improves encapsulation)
@@ -90,12 +88,10 @@ class CAddress : public CService
         IMPLEMENT_SERIALIZE;
 
         template <typename Stream, typename Operation>
-        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            size_t nSerSize = 0;
-            bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+            bool fRead = ser_action.ForRead();
 
             CAddress* pthis = const_cast<CAddress*>(this);
-            CService* pip = (CService*)pthis;
             if (fRead)
                 pthis->Init();
             if (nType & SER_DISK)
@@ -104,9 +100,7 @@ class CAddress : public CService
                 (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
             READWRITE(nTime);
             READWRITE(nServices);
-            READWRITE(*pip);
-
-            return nSerSize;
+            READWRITE(*(CService*)this);
         }
 
     // TODO: make private (improves encapsulation)
@@ -131,11 +125,9 @@ class CInv
         IMPLEMENT_SERIALIZE;
 
         template <typename Stream, typename Operation>
-        inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            size_t nSerSize = 0;
+        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             READWRITE(type);
             READWRITE(hash);
-            return nSerSize;
         }
 
         friend bool operator<(const CInv& a, const CInv& b);
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 581d7b2c5e48..a558aa494238 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -27,9 +27,8 @@ class RecentRequestEntry
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(this);
 
@@ -42,9 +41,7 @@ class RecentRequestEntry
         READWRITE(recipient);
 
         if (fRead)
-            pthis->date = QDateTime::fromTime_t(nDate);
-
-        return nSerSize;
+            date = QDateTime::fromTime_t(nDate);
     }
 };
 
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 553b56654498..2a9ac4650f36 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -62,9 +62,8 @@ class SendCoinsRecipient
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(this);
 
@@ -94,8 +93,6 @@ class SendCoinsRecipient
                 pthis->paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
             pthis->authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
         }
-
-        return nSerSize;
     }
 };
 
diff --git a/src/serialize.h b/src/serialize.h
index 6eefa18135d7..4e6ca57a49e7 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -22,7 +22,6 @@
 
 #include <boost/tuple/tuple.hpp>
 #include <boost/type_traits/is_fundamental.hpp>
-#include <boost/typeof/typeof.hpp>
 
 class CAutoFile;
 class CDataStream;
@@ -88,24 +87,25 @@ enum
     SER_GETHASH         = (1 << 2),
 };
 
-#define READWRITE(obj)      (nSerSize += ::SerReadWrite(s, (obj), nType, nVersion, ser_action))
+#define READWRITE(obj)      (::SerReadWrite(s, (obj), nType, nVersion, ser_action))
 
 /* Implement three methods for serializable objects. These are actually wrappers over
  * "SerializationOp" template, which implements the body of each class' serialization
  * code. Adding "IMPLEMENT_SERIALIZE" in the body of the class causes these wrappers to be
  * added as members. */
-#define IMPLEMENT_SERIALIZE                                                                         \
-    size_t GetSerializeSize(int nType, int nVersion) const {                                        \
-        ser_streamplaceholder s;                                                                    \
-        return NCONST_PTR(this)->SerializationOp(s, CSerActionGetSerializeSize(), nType, nVersion); \
-    }                                                                                               \
-    template<typename Stream>                                                                       \
-    void Serialize(Stream& s, int nType, int nVersion) const {                                      \
-        NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);               \
-    }                                                                                               \
-    template<typename Stream>                                                                       \
-    void Unserialize(Stream& s, int nType, int nVersion) {                                          \
-        SerializationOp(s, CSerActionUnserialize(), nType, nVersion);                               \
+#define IMPLEMENT_SERIALIZE                                                          \
+    size_t GetSerializeSize(int nType, int nVersion) const {                         \
+        CSizeComputer s(nType, nVersion);                                            \
+        NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);\
+        return s.size();                                                             \
+    }                                                                                \
+    template<typename Stream>                                                        \
+    void Serialize(Stream& s, int nType, int nVersion) const {                       \
+        NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);\
+    }                                                                                \
+    template<typename Stream>                                                        \
+    void Unserialize(Stream& s, int nType, int nVersion) {                           \
+        SerializationOp(s, CSerActionUnserialize(), nType, nVersion);                \
     }
 
 
@@ -809,32 +809,27 @@ void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
 //
 // Support for IMPLEMENT_SERIALIZE and READWRITE macro
 //
-class CSerActionGetSerializeSize { };
-class CSerActionSerialize { };
-class CSerActionUnserialize { };
-
-template<typename Stream, typename T>
-inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionGetSerializeSize ser_action)
+struct CSerActionSerialize
 {
-    return ::GetSerializeSize(obj, nType, nVersion);
-}
+    bool ForRead() const { return false; }
+};
+struct CSerActionUnserialize
+{
+    bool ForRead() const { return true; }
+};
 
 template<typename Stream, typename T>
-inline unsigned int SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionSerialize ser_action)
+inline void SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionSerialize ser_action)
 {
     ::Serialize(s, obj, nType, nVersion);
-    return 0;
 }
 
 template<typename Stream, typename T>
-inline unsigned int SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionUnserialize ser_action)
+inline void SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionUnserialize ser_action)
 {
     ::Unserialize(s, obj, nType, nVersion);
-    return 0;
 }
 
-struct ser_streamplaceholder { };
-
 
 
 
diff --git a/src/wallet.h b/src/wallet.h
index d30a28218fbc..aa811ee584ae 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -66,13 +66,11 @@ class CKeyPool
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         READWRITE(nTime);
         READWRITE(vchPubKey);
-        return nSerSize;
     }
 };
 
@@ -496,16 +494,12 @@ class CMerkleTx : public CTransaction
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-
-        nSerSize += SerReadWrite(s, *(CTransaction*)this, nType, nVersion, ser_action);
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(*(CTransaction*)this);
         nVersion = this->nVersion;
         READWRITE(hashBlock);
         READWRITE(vMerkleBranch);
         READWRITE(nIndex);
-
-        return nSerSize;
     }
 
     int SetMerkleBranch(const CBlock* pblock=NULL);
@@ -613,9 +607,8 @@ class CWalletTx : public CMerkleTx
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         CWalletTx* pthis = const_cast<CWalletTx*>(this);
         if (fRead)
@@ -632,7 +625,7 @@ class CWalletTx : public CMerkleTx
                 pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart);
         }
 
-        nSerSize += SerReadWrite(s, *(CMerkleTx*)this, nType, nVersion,ser_action);
+        READWRITE(*(CMerkleTx*)this);
         std::vector<CMerkleTx> vUnused; // Used to be vtxPrev
         READWRITE(vUnused);
         READWRITE(mapValue);
@@ -651,13 +644,11 @@ class CWalletTx : public CMerkleTx
             pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
         }
 
-        pthis->mapValue.erase("fromaccount");
-        pthis->mapValue.erase("version");
-        pthis->mapValue.erase("spent");
-        pthis->mapValue.erase("n");
-        pthis->mapValue.erase("timesmart");
-
-        return nSerSize;
+        mapValue.erase("fromaccount");
+        mapValue.erase("version");
+        mapValue.erase("spent");
+        mapValue.erase("n");
+        mapValue.erase("timesmart");
     }
 
     // make sure balances are recalculated
@@ -907,15 +898,13 @@ class CWalletKey
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         READWRITE(vchPrivKey);
         READWRITE(nTimeCreated);
         READWRITE(nTimeExpires);
         READWRITE(LIMITED_STRING(strComment, 65536));
-        return nSerSize;
     }
 };
 
@@ -945,12 +934,10 @@ class CAccount
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         READWRITE(vchPubKey);
-        return nSerSize;
     }
 };
 
@@ -990,9 +977,8 @@ class CAccountingEntry
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
-        bool fRead = boost::is_same<Operation, CSerActionUnserialize>();
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        bool fRead = ser_action.ForRead();
 
         CAccountingEntry& me = *const_cast<CAccountingEntry*>(this);
         if (!(nType & SER_GETHASH))
@@ -1033,9 +1019,7 @@ class CAccountingEntry
         if (std::string::npos != nSepPos)
             me.strComment.erase(nSepPos);
 
-        me.mapValue.erase("n");
-
-        return nSerSize;
+        mapValue.erase("n");
     }
 
 private:
diff --git a/src/walletdb.h b/src/walletdb.h
index 2dd257c2c194..c2f427ae77a3 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -57,12 +57,10 @@ class CKeyMetadata
     IMPLEMENT_SERIALIZE;
 
     template <typename Stream, typename Operation>
-    inline size_t SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        size_t nSerSize = 0;
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(this->nVersion);
         nVersion = this->nVersion;
         READWRITE(nCreateTime);
-        return nSerSize;
     }
 
     void SetNull()

From d920f7dcf876f5bb5c525a55c56028fcf65cbdf1 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 10 Aug 2014 18:01:55 +0200
Subject: [PATCH 0628/1819] Move g_signals.SetBestChain(..) below
 SyncWithWallets

---
 src/main.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index da00b4b53152..e206071910fe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1773,11 +1773,6 @@ bool static WriteChainState(CValidationState &state) {
 void static UpdateTip(CBlockIndex *pindexNew) {
     chainActive.SetTip(pindexNew);
 
-    // Update best block in wallet (so we can detect restored wallets)
-    bool fIsInitialDownload = IsInitialBlockDownload();
-    if ((chainActive.Height() % 20160) == 0 || (!fIsInitialDownload && (chainActive.Height() % 144) == 0))
-        g_signals.SetBestChain(chainActive.GetLocator());
-
     // New best block
     nTimeBestReceived = GetTime();
     mempool.AddTransactionsUpdated(1);
@@ -1790,7 +1785,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
     cvBlockChange.notify_all();
 
     // Check the version of the last 100 blocks to see if we need to upgrade:
-    if (!fIsInitialDownload)
+    if (!IsInitialBlockDownload())
     {
         int nUpgraded = 0;
         const CBlockIndex* pindex = chainActive.Tip();
@@ -1907,6 +1902,11 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     BOOST_FOREACH(const CTransaction &tx, pblock->vtx) {
         SyncWithWallets(tx, pblock);
     }
+    // Update best block in wallet (so we can detect restored wallets)
+    // Emit this signal after the SyncWithWallets signals as the wallet relies on that everything up to this point has been synced
+    if ((chainActive.Height() % 20160) == 0 || ((chainActive.Height() % 144) == 0 && !IsInitialBlockDownload()))
+        g_signals.SetBestChain(chainActive.GetLocator());
+
     int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
     LogPrint("bench", "  - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
     LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);

From da59f283350343a623820fa9ea48dd1ebb817064 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 13:09:19 +0200
Subject: [PATCH 0629/1819] Add deeper XML checking to update-translation
 script

- Catch problems such as mismatched formatting characters. Remove
  messages that can give problems at runtime.

- Also remove unfinished/untranslated messages, they just take up space
  in the ts and waste parsing time.

Fixes #4774.
---
 contrib/devtools/update-translations.py | 148 +++++++++++++++++++++---
 1 file changed, 134 insertions(+), 14 deletions(-)

diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index 1950a42678d9..0be632069a94 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -14,13 +14,14 @@
 
 TODO:
 - auto-add new translations to the build system according to the translation process
-- remove 'unfinished' translation items
 '''
 from __future__ import division, print_function
 import subprocess
 import re
 import sys
 import os
+import io
+import xml.etree.ElementTree as ET
 
 # Name of transifex tool
 TX = 'tx'
@@ -40,24 +41,143 @@ def fetch_all_translations():
         print('Error while fetching translations', file=sys.stderr)
         exit(1)
 
-def postprocess_translations():
-    print('Postprocessing...')
+def find_format_specifiers(s):
+    '''Find all format specifiers in a string.'''
+    pos = 0
+    specifiers = []
+    while True:
+        percent = s.find('%', pos)
+        if percent < 0:
+            break
+        specifiers.append(s[percent+1])
+        pos = percent+2
+    return specifiers
+
+def split_format_specifiers(specifiers):
+    '''Split format specifiers between numeric (Qt) and others (strprintf)'''
+    numeric = []
+    other = []
+    for s in specifiers:
+        if s in {'1','2','3','4','5','6','7','8','9'}:
+            numeric.append(s)
+        else:
+            other.append(s)
+
+    # numeric (Qt) can be present in any order, others (strprintf) must be in specified order
+    return set(numeric),other
+
+def sanitize_string(s):
+    '''Sanitize string for printing'''
+    return s.replace('\n',' ')
+
+def check_format_specifiers(source, translation, errors):
+    source_f = split_format_specifiers(find_format_specifiers(source))
+    # assert that no source messages contain both Qt and strprintf format specifiers
+    # if this fails, go change the source as this is hacky and confusing!
+    assert(not(source_f[0] and source_f[1]))
+    try:
+        translation_f = split_format_specifiers(find_format_specifiers(translation))
+    except IndexError:
+        errors.append("Parse error in translation '%s'" % sanitize_string(translation))
+        return False
+    else:
+        if source_f != translation_f:
+            errors.append("Mismatch between '%s' and '%s'" % (sanitize_string(source), sanitize_string(translation)))
+            return False
+    return True
+
+def all_ts_files(suffix=''):
     for filename in os.listdir(LOCALE_DIR):
         # process only language files, and do not process source language
-        if not filename.endswith('.ts') or filename == SOURCE_LANG: 
+        if not filename.endswith('.ts'+suffix) or filename == SOURCE_LANG+suffix:
             continue
+        if suffix: # remove provided suffix
+            filename = filename[0:-len(suffix)]
         filepath = os.path.join(LOCALE_DIR, filename)
-        with open(filepath, 'rb') as f:
+        yield(filename, filepath)
+
+FIX_RE = re.compile(b'[\x00-\x09\x0b\x0c\x0e-\x1f]')
+def remove_invalid_characters(s):
+    '''Remove invalid characters from translation string'''
+    return FIX_RE.sub(b'', s)
+
+# Override cdata escape function to make our output match Qt's (optional, just for cleaner diffs for
+# comparison, disable by default)
+_orig_escape_cdata = None
+def escape_cdata(text):
+    text = _orig_escape_cdata(text)
+    text = text.replace("'", '&apos;')
+    text = text.replace('"', '&quot;')
+    return text
+
+def postprocess_translations(reduce_diff_hacks=False):
+    print('Checking and postprocessing...')
+
+    if reduce_diff_hacks:
+        global _orig_escape_cdata
+        _orig_escape_cdata = ET._escape_cdata
+        ET._escape_cdata = escape_cdata
+
+    for (filename,filepath) in all_ts_files():
+        os.rename(filepath, filepath+'.orig')
+
+    have_errors = False
+    for (filename,filepath) in all_ts_files('.orig'):
+        # pre-fixups to cope with transifex output
+        parser = ET.XMLParser(encoding='utf-8') # need to override encoding because 'utf8' is not understood only 'utf-8'
+        with open(filepath + '.orig', 'rb') as f:
             data = f.read()
-        # remove non-allowed control characters
-        data = re.sub('[\x00-\x09\x0b\x0c\x0e-\x1f]', '', data)
-        data = data.split('\n')
-        # strip locations from non-origin translation
-        # location tags are used to guide translators, they are not necessary for compilation
-        # TODO: actually process XML instead of relying on Transifex's one-tag-per-line output format
-        data = [line for line in data if not '<location' in line]
-        with open(filepath, 'wb') as f:
-            f.write('\n'.join(data))
+        # remove control characters; this must be done over the entire file otherwise the XML parser will fail
+        data = remove_invalid_characters(data)
+        tree = ET.parse(io.BytesIO(data), parser=parser)
+
+        # iterate over all messages in file
+        root = tree.getroot()
+        for context in root.findall('context'):
+            for message in context.findall('message'):
+                numerus = message.get('numerus') == 'yes'
+                source = message.find('source').text
+                translation_node = message.find('translation')
+                # pick all numerusforms
+                if numerus:
+                    translations = [i.text for i in translation_node.findall('numerusform')]
+                else:
+                    translations = [translation_node.text]
+
+                for translation in translations:
+                    if translation is None:
+                        continue
+                    errors = []
+                    valid = check_format_specifiers(source, translation, errors)
+
+                    for error in errors:
+                        print('%s: %s' % (filename, error))
+
+                    if not valid: # set type to unfinished and clear string if invalid
+                        translation_node.clear()
+                        translation_node.set('type', 'unfinished')
+                        have_errors = True
+
+                # Remove location tags
+                for location in message.findall('location'):
+                    message.remove(location)
+
+                # Remove entire message if it is an unfinished translation
+                if translation_node.get('type') == 'unfinished':
+                    context.remove(message)
+
+        # write fixed-up tree
+        # if diff reduction requested, replace some XML to 'sanitize' to qt formatting
+        if reduce_diff_hacks:
+            out = io.BytesIO()
+            tree.write(out, encoding='utf-8')
+            out = out.getvalue()
+            out = out.replace(b' />', b'/>')
+            with open(filepath, 'wb') as f:
+                f.write(out)
+        else:
+            tree.write(filepath, encoding='utf-8')
+    return have_errors
 
 if __name__ == '__main__':
     check_at_repository_root()

From 6f5d33b3d2901799311d8596c394a45211ff978f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 28 Aug 2014 13:10:32 +0200
Subject: [PATCH 0630/1819] Update translations after update script
 improvements

---
 src/qt/locale/bitcoin_ach.ts         | 3340 +------------------------
 src/qt/locale/bitcoin_af_ZA.ts       | 3264 +++---------------------
 src/qt/locale/bitcoin_ar.ts          | 1806 +-------------
 src/qt/locale/bitcoin_be_BY.ts       | 3110 +++--------------------
 src/qt/locale/bitcoin_bg.ts          | 2707 ++++----------------
 src/qt/locale/bitcoin_bs.ts          | 3446 +-------------------------
 src/qt/locale/bitcoin_ca.ts          | 1927 +++++++-------
 src/qt/locale/bitcoin_ca@valencia.ts | 1871 ++++++--------
 src/qt/locale/bitcoin_ca_ES.ts       | 1667 +++++++------
 src/qt/locale/bitcoin_cmn.ts         | 3340 +------------------------
 src/qt/locale/bitcoin_cs.ts          |  967 ++++----
 src/qt/locale/bitcoin_cy.ts          | 3268 ++----------------------
 src/qt/locale/bitcoin_da.ts          |  863 ++++---
 src/qt/locale/bitcoin_de.ts          |  803 +++---
 src/qt/locale/bitcoin_el_GR.ts       |  998 +-------
 src/qt/locale/bitcoin_eo.ts          |  821 +-----
 src/qt/locale/bitcoin_es.ts          |  754 +++---
 src/qt/locale/bitcoin_es_CL.ts       | 2462 +++---------------
 src/qt/locale/bitcoin_es_DO.ts       |  782 +-----
 src/qt/locale/bitcoin_es_MX.ts       | 2984 +++-------------------
 src/qt/locale/bitcoin_es_UY.ts       | 3302 ++----------------------
 src/qt/locale/bitcoin_et.ts          | 1669 +------------
 src/qt/locale/bitcoin_eu_ES.ts       | 3300 +++---------------------
 src/qt/locale/bitcoin_fa.ts          | 1511 +----------
 src/qt/locale/bitcoin_fa_IR.ts       | 3041 +++--------------------
 src/qt/locale/bitcoin_fi.ts          |  474 +---
 src/qt/locale/bitcoin_fr.ts          | 1097 ++++----
 src/qt/locale/bitcoin_fr_CA.ts       | 3397 +------------------------
 src/qt/locale/bitcoin_gl.ts          |  949 +------
 src/qt/locale/bitcoin_gu_IN.ts       | 3340 +------------------------
 src/qt/locale/bitcoin_he.ts          |  875 +------
 src/qt/locale/bitcoin_hi_IN.ts       | 3139 +++--------------------
 src/qt/locale/bitcoin_hr.ts          | 2546 +++----------------
 src/qt/locale/bitcoin_hu.ts          | 1472 ++---------
 src/qt/locale/bitcoin_id_ID.ts       |  732 +-----
 src/qt/locale/bitcoin_it.ts          |  634 ++---
 src/qt/locale/bitcoin_ja.ts          |  955 +------
 src/qt/locale/bitcoin_ka.ts          |  641 +----
 src/qt/locale/bitcoin_kk_KZ.ts       | 3390 +------------------------
 src/qt/locale/bitcoin_ko_KR.ts       |  753 +-----
 src/qt/locale/bitcoin_ky.ts          | 3438 ++-----------------------
 src/qt/locale/bitcoin_la.ts          | 1540 +-----------
 src/qt/locale/bitcoin_lt.ts          | 1874 +-------------
 src/qt/locale/bitcoin_lv_LV.ts       |  973 +-------
 src/qt/locale/bitcoin_mn.ts          | 2828 ++-------------------
 src/qt/locale/bitcoin_ms_MY.ts       | 3422 +------------------------
 src/qt/locale/bitcoin_nb.ts          |  817 +++---
 src/qt/locale/bitcoin_nl.ts          |  451 +---
 src/qt/locale/bitcoin_pam.ts         | 2233 ++---------------
 src/qt/locale/bitcoin_pl.ts          |  671 +----
 src/qt/locale/bitcoin_pt_BR.ts       |  629 ++---
 src/qt/locale/bitcoin_pt_PT.ts       |  557 +----
 src/qt/locale/bitcoin_ro_RO.ts       |  707 +-----
 src/qt/locale/bitcoin_ru.ts          |  823 +++---
 src/qt/locale/bitcoin_sah.ts         | 3336 +------------------------
 src/qt/locale/bitcoin_sk.ts          |  489 +---
 src/qt/locale/bitcoin_sl_SI.ts       | 1428 +----------
 src/qt/locale/bitcoin_sq.ts          | 3304 ++----------------------
 src/qt/locale/bitcoin_sr.ts          | 3118 +++--------------------
 src/qt/locale/bitcoin_sv.ts          |  829 ++++---
 src/qt/locale/bitcoin_th_TH.ts       | 3246 ++----------------------
 src/qt/locale/bitcoin_tr.ts          |  833 ++++---
 src/qt/locale/bitcoin_uk.ts          | 1427 ++---------
 src/qt/locale/bitcoin_ur_PK.ts       | 3406 ++-----------------------
 src/qt/locale/bitcoin_uz@Cyrl.ts     | 3326 ++++---------------------
 src/qt/locale/bitcoin_vi.ts          | 3416 +------------------------
 src/qt/locale/bitcoin_vi_VN.ts       | 3336 +------------------------
 src/qt/locale/bitcoin_zh_CN.ts       |  697 +++---
 src/qt/locale/bitcoin_zh_HK.ts       | 3340 +------------------------
 src/qt/locale/bitcoin_zh_TW.ts       |  799 +++---
 70 files changed, 16766 insertions(+), 118924 deletions(-)

diff --git a/src/qt/locale/bitcoin_ach.ts b/src/qt/locale/bitcoin_ach.ts
index de5619bfc070..835ddb8eaa75 100644
--- a/src/qt/locale/bitcoin_ach.ts
+++ b/src/qt/locale/bitcoin_ach.ts
@@ -1,3368 +1,110 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ach" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ach" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index 6e8395e58948..474b6b329818 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="af_ZA" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="af_ZA" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -39,97 +7,17 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Skep &apos;n nuwe adres</translation>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>Skep 'n nuwe adres</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Maak &apos;n kopie van die huidige adres na die stelsel klipbord</translation>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>Maak 'n kopie van die huidige adres na die stelsel klipbord</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Verwyder</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +35,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Tik Wagwoord in</translation>
@@ -163,17 +47,13 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Herhaal nuwe wagwoord</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Tik die nuwe wagwoord vir die beursie in.&lt;br/&gt;Gebruik asseblief &apos;n wagwoord van &lt;b&gt;ten minste 10 ewekansige karakters&lt;/b&gt;, of &lt;b&gt;agt (8) of meer woorde.&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Enkripteer beursie</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Hierdie operasie benodig &apos;n wagwoord om die beursie oop te sluit.</translation>
+        <translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -181,7 +61,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Hierdie operasie benodig &apos;n wagwoord om die beursie oop te sluit.</translation>
+        <translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -199,37 +79,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Bevestig beursie enkripsie.</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Die beursie is nou bewaak</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>Die beursie kon nie bewaak word nie</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>Beursie bewaaking het misluk as gevolg van &apos;n interne fout. Die beursie is nie bewaak nie!</translation>
+        <translation>Beursie bewaaking het misluk as gevolg van 'n interne fout. Die beursie is nie bewaak nie!</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -247,17 +107,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Beursie dekripsie het misluk</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Sinchroniseer met die netwerk ...</translation>
@@ -266,10 +118,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Oorsig</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Wys algemene oorsig van die beursie</translation>
@@ -290,14 +138,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Sluit af</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Wys inligting oor Bitcoin</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show information about Qt</source>
         <translation>Wys inligting oor Qt</translation>
@@ -306,66 +146,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Options...</source>
         <translation>&amp;Opsies</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
@@ -374,34 +154,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet</source>
         <translation>Beursie</translation>
     </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Lêer</translation>
@@ -419,2901 +171,517 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Blad nutsbalk</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>%1 behind</source>
+        <translation>%1 agter</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Last received block was generated %1 ago.</source>
+        <translation>Ontvangs van laaste blok is %1 terug.</translation>
     </message>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Fout</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Informasie</translation>
     </message>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Bedrag:</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adres</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Maak kopie van adres</translation>
     </message>
     <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klient</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Copy amount</source>
+        <translation>Kopieer bedrag</translation>
     </message>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(geen etiket)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Nuwe ontvangende adres</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>New sending address</source>
+        <translation>Nuwe stuurende adres</translation>
     </message>
     <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Edit receiving address</source>
+        <translation>Wysig ontvangende adres</translation>
     </message>
     <message>
-        <source>%1 behind</source>
-        <translation>%1 agter</translation>
+        <source>Edit sending address</source>
+        <translation>Wysig stuurende adres</translation>
     </message>
     <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation>Ontvangs van laaste blok is %1 terug.</translation>
+        <source>Could not unlock wallet.</source>
+        <translation>Kon nie die beursie oopsluit nie.</translation>
     </message>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Gebruik:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
         <source>Error</source>
         <translation>Fout</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Opsies</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Information</source>
-        <translation>Informasie</translation>
+        <source>Form</source>
+        <translation>Vorm</translation>
     </message>
     <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
+        <source>Wallet</source>
+        <translation>Beursie</translation>
     </message>
     <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Onlangse transaksies&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
+        <source>&amp;Information</source>
+        <translation>Informasie</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopieer bedrag</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adres</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
     <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiket</translation>
     </message>
-</context>
-<context>
-    <name>ClientModel</name>
     <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Boodskap</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>CoinControlDialog</name>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiket</translation>
     </message>
     <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Boodskap</translation>
     </message>
     <message>
-        <source>Amount:</source>
-        <translation>Bedrag:</translation>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
     <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(geen etiket)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Stuur Munstukke</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Bedrag:</translation>
     </message>
     <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Stuur aan vele ontvangers op eens</translation>
     </message>
     <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Balans:</translation>
     </message>
     <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <source>S&amp;end</source>
+        <translation>S&amp;tuur</translation>
     </message>
     <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopieer bedrag</translation>
     </message>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Maak kopie van adres</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopieer bedrag</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(geen etiket)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Nuwe ontvangende adres</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Nuwe stuurende adres</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Wysig ontvangende adres</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>Wysig stuurende adres</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Kon nie die beursie oopsluit nie.</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>Gebruik:</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opsies</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Vorm</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Beursie</translation>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Onlangse transaksies&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die adres waarheen die betaling gestuur moet word (b.v. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopieer bedrag</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiket</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Boodskap</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiket</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Boodskap</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(geen etiket)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Stuur Munstukke</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Bedrag:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Stuur aan vele ontvangers op eens</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Balans:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>S&amp;tuur</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopieer bedrag</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(geen etiket)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die adres waarheen die betaling gestuur moet word (b.v. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Boodskap:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation>&amp;Teken boodskap</translation>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation>Handtekening</translation>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation>Teken &amp;Boodskap</translation>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die adres waarheen die betaling gestuur moet word (b.v. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation>Van</translation>
-    </message>
-    <message>
-        <source>To</source>
-        <translation>Na</translation>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation>eie adres</translation>
-    </message>
-    <message>
-        <source>label</source>
-        <translation>etiket</translation>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation>Krediet</translation>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation>nie aanvaar nie</translation>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation>Debiet</translation>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation>Transaksie fooi</translation>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation>Netto bedrag</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Boodskap</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation>Transaksie ID</translation>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation>waar</translation>
-    </message>
-    <message>
-        <source>false</source>
-        <translation>onwaar</translation>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>onbekend</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipe</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Ontvang met</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Ontvang van</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Gestuur na</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Betalings Aan/na jouself</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Gemyn</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n.v.t)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Datum en tyd wat die transaksie ontvang was.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Tipe transaksie.</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Alles</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Vandag</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Hierdie week</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Hierdie maand</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Verlede maand</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Hierdie jaar</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Reeks...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Ontvang met</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Gestuur na</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Aan/na jouself</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Gemyn</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Ander</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Min bedrag</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Maak kopie van adres</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopieer bedrag</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipe</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiket</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Reeks:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>aan</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Stuur Munstukke</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Gebruik:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Opsies:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Luister vir konneksies op &lt;port&gt; (standaard: 8333 of testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Onderhou op die meeste &lt;n&gt; konneksies na eweknieë (standaard: 125)</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Gebruik die toets netwerk</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Fout: Hardeskyf spasie is baie laag!</translation>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(geen etiket)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Boodskap:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>&amp;Sign Message</source>
+        <translation>&amp;Teken boodskap</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Signature</source>
+        <translation>Handtekening</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Sign &amp;Message</source>
+        <translation>Teken &amp;Boodskap</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>From</source>
+        <translation>Van</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>To</source>
+        <translation>Na</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>own address</source>
+        <translation>eie adres</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>label</source>
+        <translation>etiket</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Credit</source>
+        <translation>Krediet</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>not accepted</source>
+        <translation>nie aanvaar nie</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Debit</source>
+        <translation>Debiet</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Transaction fee</source>
+        <translation>Transaksie fooi</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Net amount</source>
+        <translation>Netto bedrag</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Boodskap</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>Transaksie ID</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>true</source>
+        <translation>waar</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>false</source>
+        <translation>onwaar</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>onbekend</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tipe</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adres</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Ontvang met</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>Ontvang van</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Gestuur na</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Betalings Aan/na jouself</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Gemyn</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n.v.t)</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Datum en tyd wat die transaksie ontvang was.</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Tipe transaksie.</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Alles</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>Informasie</translation>
+        <source>Today</source>
+        <translation>Vandag</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Hierdie week</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Hierdie maand</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Verlede maand</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Hierdie jaar</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Reeks...</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Ontvang met</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Gestuur na</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Aan/na jouself</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Gemyn</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Ander</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Min bedrag</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Maak kopie van adres</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopieer bedrag</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tipe</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiket</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adres</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Reeks:</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>aan</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Stuur Munstukke</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Opsies:</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Luister vir konneksies op &lt;port&gt; (standaard: 8333 of testnet: 18333)</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Onderhou op die meeste &lt;n&gt; konneksies na eweknieë (standaard: 125)</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Gebruik die toets netwerk</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Error: Disk space is low!</source>
+        <translation>Fout: Hardeskyf spasie is baie laag!</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Informasie</translation>
     </message>
     <message>
         <source>System error: </source>
         <translation>Sisteem fout:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Hierdie help boodskap</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>Laai adresse...</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Invalid amount</source>
         <translation>Ongeldige bedrag</translation>
@@ -3326,43 +694,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading block index...</source>
         <translation>Laai blok indeks...</translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>Laai beursie...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Done loading</source>
         <translation>Klaar gelaai</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Fout</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index 5877cc35d9c9..ea1bc0ea4b96 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>الحقوق محفوظة</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ar" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -65,10 +33,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Delete the currently selected address from the list</source>
         <translation>حذف العنوان المحدد من القائمة</translation>
     </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Export</source>
         <translation>&amp;تصدير</translation>
@@ -97,14 +61,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Receiving addresses</source>
         <translation>استقبال العناوين</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>نسخ &amp;الوصف</translation>
@@ -117,19 +73,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Export Address List</source>
         <translation>تصدير قائمة العناوين</translation>
     </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>فشل التصدير</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +95,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>ادخل كلمة المرور</translation>
@@ -163,10 +107,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>ادخل كلمة المرور الجديدة مرة أخرى</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>أدخل كلمة مرور جديدة للمحفظة. &lt;br/&gt;الرجاء استخدام كلمة مرور تتكون &lt;b&gt;من 10 حروف عشوائية على الاقل&lt;/b&gt;, أو &lt;b&gt;أكثر من 7 كلمات&lt;/b&gt;. </translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>تشفير المحفظة</translation>
@@ -199,18 +139,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>تأكيد تشفير المحفظة</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>تحذير: مفتاح الحروف الكبيرة مفعل</translation>
@@ -247,11 +175,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>فشل   فك التشفير المحفظة</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
@@ -268,7 +192,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>جهاز</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -290,10 +214,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>الخروج من التطبيق</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>  إظهار معلومات حول بت كوين</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>عن</translation>
@@ -318,34 +238,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;تغيير كلمة المرور</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>افتح &amp;URI...</translation>
     </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>ارسل عملات الى عنوان بيتكوين</translation>
     </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>احفظ نسخة احتياطية للمحفظة في مكان آخر</translation>
@@ -358,10 +258,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Debug window</source>
         <translation>&amp;نافذة المعالجة</translation>
     </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Verify message...</source>
         <translation>&amp;التحقق من الرسالة...</translation>
@@ -374,10 +270,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet</source>
         <translation>محفظة</translation>
     </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation>%ارسل</translation>
-    </message>
     <message>
         <source>&amp;Receive</source>
         <translation>&amp;استقبل</translation>
@@ -390,18 +282,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show or hide the main Window</source>
         <translation>عرض او اخفاء النافذة الرئيسية</translation>
     </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;ملف</translation>
@@ -424,55 +304,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>عميل بت كوين</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>جوهر البيت كوين</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -486,26 +318,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n week(s)</source>
         <translation><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطأ</translation>
@@ -534,18 +346,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Incoming transaction</source>
         <translation>المعاملات الواردة</translation>
     </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation>التاريخ : 1% 
-القيمة: 2% 
-النوع: 3% 
-العنوان: 4%
-</translation>
-    </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>المحفظة &lt;b&gt;مشفرة&lt;/b&gt; و &lt;b&gt;مفتوحة&lt;/b&gt; حاليا</translation>
@@ -554,10 +354,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>المحفظة &lt;b&gt;مشفرة&lt;/b&gt; و &lt;b&gt;مقفلة&lt;/b&gt; حاليا</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -568,53 +364,29 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>الكمية:</translation>
     </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>القيمة</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>افضلية :</translation>
     </message>
     <message>
         <source>Fee:</source>
         <translation>رسوم :</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>بعد الرسوم :</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>تعديل :</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -656,14 +428,6 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>نسخ رقم المعاملة</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>نسخ الكمية</translation>
@@ -676,18 +440,10 @@ Address: %4
         <source>Copy after fee</source>
         <translation>نسخ بعد الرسوم</translation>
     </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy priority</source>
         <translation>نسخ الافضلية</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>نسخ التغييرات</translation>
@@ -704,42 +460,22 @@ Address: %4
         <source>high</source>
         <translation>عالي</translation>
     </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>low</source>
         <translation>منخفض</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>أدنى</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>الأدنى</translation>
     </message>
     <message>
         <source>none</source>
         <translation>لا شيء</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
         <translation>نعم</translation>
@@ -748,53 +484,13 @@ Address: %4
         <source>no</source>
         <translation>لا</translation>
     </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(لا وصف)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(تغير)</translation>
     </message>
 </context>
 <context>
@@ -807,14 +503,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;وصف</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;العنوان</translation>
@@ -836,12 +524,8 @@ Address: %4
         <translation>تعديل عنوان الارسال</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>هدا العنوان &quot;%1&quot; موجود مسبقا في دفتر العناوين</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>هدا العنوان "%1" موجود مسبقا في دفتر العناوين</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -862,14 +546,6 @@ Address: %4
         <source>name</source>
         <translation>الاسم</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot create data directory here.</source>
         <translation>لا يمكن انشاء دليل بيانات هنا .</translation>
@@ -877,69 +553,33 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>جوهر البيت كوين</translation>
     </message>
     <message>
         <source>version</source>
         <translation>النسخة</translation>
     </message>
     <message>
-        <source>Usage:</source>
-        <translation>المستخدم</translation>
+        <source>About Bitcoin Core</source>
+        <translation>عن جوهر البيت كوين</translation>
     </message>
     <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>المستخدم</translation>
     </message>
     <message>
         <source>UI options</source>
         <translation>خيارات UI</translation>
     </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
         <translation>أهلا</translation>
     </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>استخدام دليل البانات الافتراضي</translation>
@@ -949,12 +589,8 @@ Address: %4
         <translation>استخدام دليل بيانات مخصص:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>بت كوين</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>جوهر البيت كوين</translation>
     </message>
     <message>
         <source>Error</source>
@@ -964,25 +600,9 @@ Address: %4
         <source>GB of free space available</source>
         <translation>قيقا بايت مساحة متاحة</translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>( بحاجة الى 1%قيقا بايت )</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Select payment request file</source>
         <translation>حدد ملف طلب الدفع</translation>
@@ -1002,62 +622,22 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;الرئيسي</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>ادفع &amp;رسوم المعاملة</translation>
     </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>م ب</translation>
     </message>
     <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
+        <source>Accept connections from outside</source>
+        <translation>إقبل التواصل من الخارج</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
         <translation>عنوان النطاق للطرف الثالث</translation>
     </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Reset Options</source>
         <translation>&amp;استعادة الخيارات</translation>
@@ -1066,10 +646,6 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;الشبكة</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>&amp;محفظة</translation>
@@ -1078,26 +654,6 @@ Address: %4
         <source>Expert</source>
         <translation>تصدير</translation>
     </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>بروكسي &amp;اي بي:</translation>
@@ -1110,34 +666,10 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>منفذ البروكسي (مثلا 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>نافذه</translation>
     </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Display</source>
         <translation>&amp;عرض</translation>
@@ -1147,60 +679,24 @@ Address: %4
         <translation>واجهة المستخدم &amp;اللغة:</translation>
     </message>
     <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
+        <source>&amp;OK</source>
+        <translation>تم</translation>
     </message>
     <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Cancel</source>
+        <translation>الغاء</translation>
     </message>
     <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
+        <source>default</source>
+        <translation>الافتراضي</translation>
     </message>
     <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
+        <source>none</source>
+        <translation>لا شيء</translation>
     </message>
     <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>عرض العناوين في قائمة الصفقة</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation>تم</translation>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation>الغاء</translation>
-    </message>
-    <message>
-        <source>default</source>
-        <translation>الافتراضي</translation>
-    </message>
-    <message>
-        <source>none</source>
-        <translation>لا شيء</translation>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation>تأكيد استعادة الخيارات</translation>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <source>Confirm options reset</source>
+        <translation>تأكيد استعادة الخيارات</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1213,10 +709,6 @@ Address: %4
         <source>Form</source>
         <translation>نمودج</translation>
     </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>محفظة</translation>
@@ -1225,26 +717,14 @@ Address: %4
         <source>Available:</source>
         <translation>متوفر</translation>
     </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pending:</source>
         <translation>معلق:</translation>
     </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>غير ناضجة</translation>
     </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>المجموع:</translation>
@@ -1264,102 +744,25 @@ Address: %4
 </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation>استجابة سيئة من الملقم٪ 1</translation>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>بت كوين</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>المبلغ</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>UNKNOWN</source>
+        <translation>غير معروف</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>إدخال عنوانBitcoin (مثال :1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>غير معروف</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1376,7 +779,7 @@ Address: %4
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
+        <translation>صورة PNG (*.png)</translation>
     </message>
 </context>
 <context>
@@ -1397,18 +800,10 @@ Address: %4
         <source>&amp;Information</source>
         <translation>المعلومات</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>General</source>
         <translation>عام</translation>
     </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Startup time</source>
         <translation>وقت البدء</translation>
@@ -1426,28 +821,32 @@ Address: %4
         <translation>عدد الاتصالات</translation>
     </message>
     <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
+        <source>Received</source>
+        <translation>إستقبل</translation>
     </message>
     <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
+        <source>Sent</source>
+        <translation>تم الإرسال</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
+        <source>Direction</source>
+        <translation>جهة</translation>
     </message>
     <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
+        <source>Services</source>
+        <translation>خدمات</translation>
     </message>
     <message>
-        <source>&amp;Open</source>
-        <translation>الفتح</translation>
+        <source>Last Send</source>
+        <translation>آخر استقبال</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>آخر إرسال</translation>
     </message>
     <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
+        <source>&amp;Open</source>
+        <translation>الفتح</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
@@ -1473,57 +872,25 @@ Address: %4
         <source>Build date</source>
         <translation>وقت البناء</translation>
     </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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>استخدم اسهم الاعلى و الاسفل للتنقل بين السجلات و &lt;b&gt;Ctrl-L&lt;/b&gt;  لمسح الشاشة</translation>
     </message>
     <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation>1% بايت</translation>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation>1% كيلو بايت</translation>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation>1% ميقا بايت</translation>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation>1% قيقا بايت</translation>
+        <source>Yes</source>
+        <translation>نعم</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>1% دقيقة</translation>
+        <source>No</source>
+        <translation>لا</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>1% ساعة</translation>
+        <source>Unknown</source>
+        <translation>غير معرف</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>1% ساعة 2% دقيقة</translation>
+        <source>Fetching...</source>
+        <translation>جاري الجلب...</translation>
     </message>
 </context>
 <context>
@@ -1540,30 +907,6 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>&amp;رسالة:</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>مسح كل حقول النموذج المطلوبة</translation>
@@ -1576,22 +919,10 @@ Address: %4
         <source>Requested payments history</source>
         <translation>سجل طلبات الدفع</translation>
     </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>عرض</translation>
     </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Remove</source>
         <translation>ازل</translation>
@@ -1627,13 +958,9 @@ Address: %4
         <source>&amp;Save Image...</source>
         <translation>&amp;حفظ الصورة</translation>
     </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment information</source>
-        <translation type="unfinished"/>
+        <translation>معلومات الدفع</translation>
     </message>
     <message>
         <source>URI</source>
@@ -1655,15 +982,7 @@ Address: %4
         <source>Message</source>
         <translation>رسالة</translation>
     </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
@@ -1690,41 +1009,25 @@ Address: %4
         <source>(no message)</source>
         <translation>( لا رسائل )</translation>
     </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>إرسال Coins</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>automatically selected</source>
         <translation>اختيار تلقائيا</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>الرصيد غير كافي!</translation>
     </message>
     <message>
         <source>Quantity:</source>
         <translation>الكمية :</translation>
     </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>القيمة :</translation>
@@ -1737,10 +1040,6 @@ Address: %4
         <source>Fee:</source>
         <translation>رسوم :</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>بعد الرسوم :</translation>
@@ -1749,14 +1048,6 @@ Address: %4
         <source>Change:</source>
         <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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>إرسال إلى عدة مستلمين في وقت واحد</translation>
@@ -1767,7 +1058,7 @@ Address: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>مسح كل حقول النموذج المطلوبة</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1789,10 +1080,6 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>تأكيد الإرسال Coins</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation>1% الى 2%</translation>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>نسخ الكمية </translation>
@@ -1809,18 +1096,10 @@ Address: %4
         <source>Copy after fee</source>
         <translation>نسخ بعد الرسوم</translation>
     </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy priority</source>
         <translation>نسخ الافضلية</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>نسخ التعديل</translation>
@@ -1833,10 +1112,6 @@ Address: %4
         <source>or</source>
         <translation>أو</translation>
     </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
         <translation>المبلغ المدفوع يجب ان يكون اكبر من 0</translation>
@@ -1845,65 +1120,17 @@ Address: %4
         <source>The amount exceeds your balance.</source>
         <translation>القيمة تتجاوز رصيدك</translation>
     </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>المجموع يتجاوز رصيدك عندما يتم اضافة 1% رسوم العملية</translation>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(لا وصف)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay &amp;To:</source>
         <translation>ادفع &amp;الى :</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>إدخال تسمية لهذا العنوان لإضافته إلى دفتر العناوين الخاص بك</translation>
@@ -1912,14 +1139,6 @@ Address: %4
         <source>&amp;Label:</source>
         <translation>&amp;وصف :</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1932,45 +1151,13 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>الرسائل</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>لا توقف عمل الكمبيوتر حتى تختفي هذه النافذة</translation>
@@ -1978,26 +1165,10 @@ Address: %4
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Sign Message</source>
         <translation>&amp;توقيع الرسالة</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2018,10 +1189,6 @@ Address: %4
         <source>Signature</source>
         <translation>التوقيع</translation>
     </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
         <translation>وقع الرسالة لتثبت انك تمتلك عنوان البت كوين هذا</translation>
@@ -2030,10 +1197,6 @@ Address: %4
         <source>Sign &amp;Message</source>
         <translation>توقيع $الرسالة</translation>
     </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>مسح الكل</translation>
@@ -2042,33 +1205,13 @@ Address: %4
         <source>&amp;Verify Message</source>
         <translation>&amp;تحقق رسالة</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verify &amp;Message</source>
         <translation>تحقق &amp;الرسالة</translation>
     </message>
     <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>إدخال عنوانBitcoin (مثال :1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>اضغط  &quot;توقيع الرسالة&quot; لتوليد التوقيع</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>اضغط  "توقيع الرسالة" لتوليد التوقيع</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2098,18 +1241,10 @@ Address: %4
         <source>Message signed.</source>
         <translation>الرسالة موقعة.</translation>
     </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Please check the signature and try again.</source>
         <translation>فضلا تاكد من التوقيع وحاول مرة اخرى</translation>
     </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message verification failed.</source>
         <translation>فشلت عملية التأكد من الرسالة.</translation>
@@ -2123,11 +1258,11 @@ Address: %4
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>جوهر البيت كوين</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>مطوري جوهر البيت كوين</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2136,29 +1271,13 @@ Address: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>مفتوح حتى 1٪</translation>
-    </message>
     <message>
         <source>conflicted</source>
         <translation>يتعارض</translation>
     </message>
-    <message>
-        <source>%1/offline</source>
-        <translation>1% غير متواجد</translation>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>غير مؤكدة/1%</translation>
-    </message>
     <message>
         <source>%1 confirmations</source>
         <translation>تأكيد %1</translation>
@@ -2167,10 +1286,6 @@ Address: %4
         <source>Status</source>
         <translation>الحالة.</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>التاريخ</translation>
@@ -2199,14 +1314,6 @@ Address: %4
         <source>label</source>
         <translation>علامة</translation>
     </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>غير مقبولة</translation>
@@ -2219,10 +1326,6 @@ Address: %4
         <source>Transaction fee</source>
         <translation>رسوم المعاملة</translation>
     </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message</source>
         <translation>رسالة </translation>
@@ -2239,22 +1342,10 @@ Address: %4
         <source>Merchant</source>
         <translation>تاجر</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transaction</source>
         <translation>معاملة</translation>
     </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>المبلغ</translation>
@@ -2271,10 +1362,6 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>,  لم يتم حتى الآن البث بنجاح</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>غير معروف</translation>
@@ -2305,26 +1392,6 @@ Address: %4
         <source>Address</source>
         <translation>عنوان</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>المبلغ</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>مفتوح حتى 1٪</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>تأكيد الإرسال Coins</translation>
-    </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>لم يتم تلقى هذه الكتلة (Block) من قبل أي العقد الأخرى وربما لن تكون مقبولة!</translation>
@@ -2337,18 +1404,6 @@ Address: %4
         <source>Offline</source>
         <translation>غير متصل</translation>
     </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>استقبل مع</translation>
@@ -2476,30 +1531,14 @@ Address: %4
         <source>Show transaction details</source>
         <translation>عرض تفاصيل المعاملة</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>فشل التصدير</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Successful</source>
         <translation>نجح التصدير</translation>
     </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>تأكيد</translation>
@@ -2520,10 +1559,6 @@ Address: %4
         <source>Address</source>
         <translation>عنوان</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>المبلغ</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>العنوان</translation>
@@ -2537,13 +1572,12 @@ Address: %4
         <translation>الى</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2557,30 +1591,14 @@ Address: %4
         <source>&amp;Export</source>
         <translation>&amp;تصدير</translation>
     </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Wallet</source>
         <translation>نسخ احتياط للمحفظة</translation>
     </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Failed</source>
         <translation>فشل النسخ الاحتياطي</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>نجاح  النسخ الاحتياطي</translation>
@@ -2588,78 +1606,14 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>المستخدم</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>اعرض الأوامر</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>مساعدة في كتابة الاوامر</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>خيارات: </translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>حدد مجلد المعلومات</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the test network</source>
         <translation>استخدم التحقق من الشبكه</translation>
@@ -2668,204 +1622,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>قبول الاتصالات من خارج</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>تحذير: مساحة القرص منخفضة</translation>
@@ -2883,293 +1639,25 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>فشل في الاستماع على أي منفذ. استخدام الاستماع = 0 إذا كنت تريد هذا.</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>عنوان اونيون غير صحيح : &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>عنوان اونيون غير صحيح : '%s'</translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
         <translation>التحقق من المحفظة ...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet options:</source>
         <translation>خيارات المحفظة :</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>معلومات</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Signing transaction failed</source>
         <translation>فشل توقيع المعاملة</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>خطأ في النظام :</translation>
@@ -3186,18 +1674,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>المعاملة طويلة جدا</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning</source>
         <translation>تحذير</translation>
@@ -3206,58 +1682,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>تحذير : هذا الاصدار قديم , يتطلب التحديث</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>النسخة</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Upgrade wallet to latest format</source>
         <translation>تحديث المحفظة للنسخة الاخيرة</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Server private key (default: server.pem)</source>
         <translation>المفتاح الخاص بالسيرفر (default: server.pem)</translation>
@@ -3266,14 +1694,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>رسالة المساعدة هذه</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>تحميل العنوان</translation>
@@ -3282,41 +1702,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>خطأ عند تنزيل wallet.dat: المحفظة تالفة</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>خطأ عند تنزيل wallet.dat: المحفظة تتطلب نسخة أحدث من بتكوين</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>المحفظة تحتاج لإعادة إنشاء: أعد تشغيل بتكوين للإتمام</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>خطأ عند تنزيل wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>عنوان البروكسي غير صحيح : &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>عنوان البروكسي غير صحيح : '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3326,22 +1718,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Insufficient funds</source>
         <translation>اموال غير كافية</translation>
     </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>تحميل المحفظه</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot write default address</source>
         <translation>لايمكن كتابة العنوان الافتراضي</translation>
@@ -3362,11 +1742,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>خطأ</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index c384aa6d2deb..8fac417b73b2 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="be_BY" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="be_BY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,34 +9,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Стварыць новы адрас</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Капіяваць пазначаны адрас у сістэмны буфер абмену</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Export</source>
         <translation>Экспарт</translation>
@@ -77,59 +21,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Delete</source>
         <translation>Выдаліць</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Коскамі падзелены файл (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +43,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Увядзіце кодавую фразу</translation>
@@ -163,10 +55,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Паўтарыце новую кодавую фразу</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Увядзіце новую кодавую фразу для гаманца. &lt;br/&gt;Калі ласка, ўжывайце пароль &lt;b&gt;не меньша за 10 адвольных сімвалаў&lt;/b&gt;, ці &lt;b&gt;болей васьмі слоў&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Зашыфраваць гаманец.</translation>
@@ -199,29 +87,13 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Пацвердзіце шыфраванне гаманца</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Гаманец зашыфраваны</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin зачыняецца дзеля завяршэння працэсса шыфравання. Памятайце, што шыфраванне гаманца цалкам абараняе вашыя сродкі ад скрадання шкоднымі праграмамі якія могуць пранікнуць у ваш камп&apos;ютар.</translation>
+        <translation>Bitcoin зачыняецца дзеля завяршэння працэсса шыфравання. Памятайце, што шыфраванне гаманца цалкам абараняе вашыя сродкі ад скрадання шкоднымі праграмамі якія могуць пранікнуць у ваш камп'ютар.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -247,17 +119,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Расшыфраванне гаманца няўдалае</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Сінхранізацыя з сецівам...</translation>
@@ -266,10 +130,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>Агляд</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Паказвае агульныя звесткі аб гаманцы</translation>
@@ -290,10 +150,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Выйсці з праграмы</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Паказаць звесткі пра Біткойн</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Аб Qt</translation>
@@ -306,46 +162,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Options...</source>
         <translation>Опцыі...</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>Зрабіце копію гаманца ў іншае месца</translation>
@@ -354,26 +170,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Змяніць пароль шыфравання гаманца</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Send</source>
         <translation>Даслаць</translation>
@@ -382,26 +178,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>Атрымаць</translation>
     </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>Ф&amp;айл</translation>
@@ -414,110 +190,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Help</source>
         <translation>Дапамога</translation>
     </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin кліент</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n актыўнае злучэнне з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Памылка</translation>
     </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Сінхранізавана</translation>
@@ -554,68 +238,12 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Гаманец &lt;b&gt;зашыфраваны&lt;/b&gt; і зараз &lt;b&gt;заблакаваны&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Колькасць</translation>
@@ -628,18 +256,10 @@ Address: %4
         <source>Date</source>
         <translation>Дата</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Пацверджана</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Капіяваць адрас</translation>
@@ -657,1865 +277,127 @@ Address: %4
         <translation>Капіяваць ID транзакцыі</translation>
     </message>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>непазначаны</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Рэдагаваць Адрас</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>Пазнака</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>Адрас</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Новы адрас для атрымання</translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Новы адрас для дасылання</translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>Рэдагаваць адрас прымання</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>Рэдагаваць адрас дасылання</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Уведзены адрас "%1" ужо ў кніге адрасоў</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>Немагчыма разблакаваць гаманец</translation>
     </message>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>Генерацыя новага ключа няўдалая</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Ужыванне:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Памылка</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Опцыі</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Форма</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Нядаўнія транзаццыі&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Колькасць</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>Пазнака:</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Капіяваць пазнаку</translation>
     </message>
     <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>непазначаны</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Рэдагаваць Адрас</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>Пазнака</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>Адрас</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Новы адрас для атрымання</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Новы адрас для дасылання</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Рэдагаваць адрас прымання</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>Рэдагаваць адрас дасылання</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Уведзены адрас &quot;%1&quot; ужо ў кніге адрасоў</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Немагчыма разблакаваць гаманец</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>Генерацыя новага ключа няўдалая</translation>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>Ужыванне:</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Памылка</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Опцыі</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Форма</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Нядаўнія транзаццыі&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Увядзіце Біткойн-адрас (ўзор 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>Пазнака:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Капіяваць пазнаку</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Капіяваць колькасць</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрас</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Колькасць</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Пазнака</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Пазнака</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Колькасць</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>непазначаны</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Даслаць Манеты</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Даслаць адразу некалькім атрымальнікам</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Баланс:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Пацвердзіць дасыланне</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Пацвердзіць дасыланне манет</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Капіяваць колькасць</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Велічыня плацяжу мае быць больш за 0.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>непазначаны</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>Колькасць:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Заплаціць да:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Увядзіце пазнаку гэтаму адрасу, каб дадаць яго ў адрасную кнігу</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>Пазнака:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Уставіць адрас з буферу абмена</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Уставіць адрас з буферу абмена</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Увядзіце Біткойн-адрас (ўзор 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/непацверджана</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 пацверджанняў</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Колькасць</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, пакуль не было паспяхова транслявана</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>невядома</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Дэталі транзакцыі</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Гэтая панэль паказвае дэтальнае апісанне транзакцыі</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Тып</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрас</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Колькасць</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Пацверджана (%1 пацверджанняў)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Гэты блок не быў прыняты іншымі вузламі і магчыма не будзе ўхвалены!</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Згенеравана, але не прынята</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Прынята з</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Прынята ад</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Даслана да</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Плацёж самому сабе</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Здабыта</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Статус транзакцыі. Навядзіце курсар на гэтае поле, каб паказаць колькасць пацверджанняў.</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Дата і час, калі транзакцыя была прынята.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Тып транзакцыі</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Адрас прызначэння транзакцыі.</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Колькасць аднятая ці даданая да балансу.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Усё</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Сёння</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Гэты тыдзень</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Гэты месяц</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Мінулы месяц</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Гэты год</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Прамежак...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Прынята з</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Даслана да</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Да сябе</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Здабыта</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Іншыя</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Увядзіце адрас ці пазнаку для пошуку</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Мін. колькасць</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Капіяваць адрас</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Капіяваць пазнаку</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Капіяваць колькасць</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation>Капіяваць ID транзакцыі</translation>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Рэдагаваць пазнаку</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Коскамі падзелены файл (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Пацверджана</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Тып</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Пазнака</translation>
+        <source>Copy amount</source>
+        <translation>Капіяваць колькасць</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
         <source>Address</source>
         <translation>Адрас</translation>
@@ -2525,715 +407,429 @@ Address: %4
         <translation>Колькасць</translation>
     </message>
     <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Прамежак:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>да</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Даслаць Манеты</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation>Экспарт</translation>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Пазнака</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Ужыванне:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Спіс каманд</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Атрымаць дапамогу для каманды</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Опцыі:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Вызначыць канфігурацыйны файл (зыходна: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Вызначыць pid-файл (зыходна: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>Вызначыць каталог даных</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Слухаць злучэнні на &lt;port&gt; (зыходна: 8333 ці testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Трымаць не больш за &lt;n&gt; злучэнняў на асобу (зыходна: 125)</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Парог для адлучэння злаўмысных карыстальнікаў (тыпова: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Колькасць секунд для ўстрымання асобаў да перадалучэння (заходна: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>Прымаць камандны радок і JSON-RPC каманды</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Запусціць у фоне як дэман і прымаць каманды</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Ужываць тэставае сеціва</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Пазнака</translation>
     </message>
     <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Колькасць</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>непазначаны</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Даслаць Манеты</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Даслаць адразу некалькім атрымальнікам</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Баланс:</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Пацвердзіць дасыланне</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Пацвердзіць дасыланне манет</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Капіяваць колькасць</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Велічыня плацяжу мае быць больш за 0.</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>непазначаны</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>Колькасць:</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Заплаціць да:</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Увядзіце пазнаку гэтаму адрасу, каб дадаць яго ў адрасную кнігу</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>Пазнака:</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Уставіць адрас з буферу абмена</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Уставіць адрас з буферу абмена</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/непацверджана</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 пацверджанняў</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Колькасць</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, пакуль не было паспяхова транслявана</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>невядома</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Дэталі транзакцыі</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Гэтая панэль паказвае дэтальнае апісанне транзакцыі</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тып</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрас</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Пацверджана (%1 пацверджанняў)</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Гэты блок не быў прыняты іншымі вузламі і магчыма не будзе ўхвалены!</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Згенеравана, але не прынята</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Прынята з</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>Прынята ад</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Даслана да</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Плацёж самому сабе</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Здабыта</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Статус транзакцыі. Навядзіце курсар на гэтае поле, каб паказаць колькасць пацверджанняў.</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Дата і час, калі транзакцыя была прынята.</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Тып транзакцыі</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Адрас прызначэння транзакцыі.</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Колькасць аднятая ці даданая да балансу.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Усё</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Сёння</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Гэты тыдзень</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Гэты месяц</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Мінулы месяц</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Гэты год</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Прамежак...</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Прынята з</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Даслана да</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Да сябе</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Здабыта</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Іншыя</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Увядзіце адрас ці пазнаку для пошуку</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Мін. колькасць</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Капіяваць адрас</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Капіяваць пазнаку</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Капіяваць колькасць</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Copy transaction ID</source>
+        <translation>Капіяваць ID транзакцыі</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Рэдагаваць пазнаку</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Коскамі падзелены файл (*.csv)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Пацверджана</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Слаць trace/debug звесткі ў кансоль замест файла debug.log</translation>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тып</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Пазнака</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрас</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Прамежак:</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>да</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Даслаць Манеты</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>&amp;Export</source>
+        <translation>Экспарт</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Опцыі:</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Вызначыць канфігурацыйны файл (зыходна: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>Вызначыць pid-файл (зыходна: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Вызначыць каталог даных</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Слухаць злучэнні на &lt;port&gt; (зыходна: 8333 ці testnet: 18333)</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Трымаць не больш за &lt;n&gt; злучэнняў на асобу (зыходна: 125)</translation>
     </message>
     <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation>Імя карыстальника для JSON-RPC злучэнняў</translation>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>Парог для адлучэння злаўмысных карыстальнікаў (тыпова: 100)</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation>Колькасць секунд для ўстрымання асобаў да перадалучэння (заходна: 86400)</translation>
     </message>
     <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Прымаць камандны радок і JSON-RPC каманды</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Запусціць у фоне як дэман і прымаць каманды</translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Ужываць тэставае сеціва</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation type="unfinished"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>Слаць trace/debug звесткі ў кансоль замест файла debug.log</translation>
     </message>
     <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <source>Username for JSON-RPC connections</source>
+        <translation>Імя карыстальника для JSON-RPC злучэнняў</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Пароль для JSON-RPC злучэнняў</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Дазволіць  JSON-RPC злучэнні з пэўнага IP адрасу</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Адпраўляць каманды вузлу на &lt;ip&gt; (зыходна: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Выканаць каманду калі лепшы блок зменіцца (%s замяняецца на хэш блока)</translation>
@@ -3262,18 +858,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Server private key (default: server.pem)</source>
         <translation>Прыватны ключ сервера (зыходна: server.pem)</translation>
     </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>Загружаем адрасы...</translation>
@@ -3282,42 +866,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Памылка загрузкі wallet.dat: гаманец пашкоджаны</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Памылка загрузкі wallet.dat: гаманец патрабуе новую версію Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Гаманец мае быць перазапісаны: патрэбны перазапуск Bitcoin для выканання</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Памылка загрузкі wallet.dat</translation>
     </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Invalid amount</source>
         <translation>Памылковая колькасць</translation>
@@ -3330,22 +882,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading block index...</source>
         <translation>Загружаем індэкс блокаў...</translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>Загружаем гаманец...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Перасканаванне...</translation>
@@ -3354,19 +894,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>Загрузка выканана</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Памылка</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 367e223784a3..11bf594a42e8 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Това е експериментален софтуер.
-
-Разпространява се под MIT/X11 софтуерен лиценз, виж COPYING или http://www.opensource.org/licenses/mit-license.php.
-
-Използван е софтуер, разработен от OpenSSL Project за употреба в OpenSSL Toolkit (http://www.openssl.org/), криптографски софтуер разработен от Eric Young (eay@cryptsoft.com) и UPnP софтуер разработен от Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Авторски права</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="bg" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -46,22 +9,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Създаване на нов адрес</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копиране на избрания адрес</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Копирай</translation>
@@ -74,26 +25,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Export the data in the current tab to a file</source>
         <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Изтриване</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sending addresses</source>
         <translation>Адреси за изпращане</translation>
@@ -102,14 +37,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Receiving addresses</source>
         <translation>Адреси за получаване</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Копирай &amp;име</translation>
@@ -130,11 +57,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>Грешка при изнасянето</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -152,10 +75,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Въведи парола</translation>
@@ -168,10 +87,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Още веднъж</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Въведете нова парола за портфейла.&lt;br/&gt;Моля използвайте &lt;b&gt;поне 10 случайни символа&lt;/b&gt; или &lt;b&gt;8 или повече думи&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Криптиране на портфейла</translation>
@@ -206,7 +121,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>ВНИМАНИЕ: Ако защитите вашият портфейл и изгубите ключовата дума, вие ще &lt;b&gt;ИЗГУБИТЕ ВСИЧКИТЕ СИ БИТКОЙНОВЕ&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -214,7 +129,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </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 type="unfinished"/>
+        <translation>ВАЖНО: Всякакви стари бекъп версии, които сте направили на вашият портфейл трябва да бъдат заменени със ново-генерирания, криптиран портфейл файл. От съображения за сигурност, предишните бекъпи на некриптираните портфейли ще станат неизползваеми веднага щом започнете да използвате новият криптиран портфейл.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -271,10 +186,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Баланс</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Обобщена информация за портфейла</translation>
@@ -295,10 +206,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Изход от приложението</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Информация за Биткоин</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>За &amp;Qt</translation>
@@ -323,50 +230,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Смяна на паролата...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>Изпращане към Биткоин адрес</translation>
     </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Променя паролата за портфейла</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Verify message...</source>
         <translation>&amp;Проверка на съобщение...</translation>
@@ -381,32 +252,16 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Изпращане</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Покажи / Скрий</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
         <translation>Показване и скриване на основния прозорец</translation>
     </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
@@ -427,58 +282,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n връзка към Биткоин мрежата</numerusform><numerusform>%n връзки към Биткоин мрежата</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform></translation>
@@ -499,18 +306,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n year(s)</source>
         <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform></translation>
     </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Грешка</translation>
@@ -539,14 +334,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Incoming transaction</source>
         <translation>Входяща трансакция</translation>
     </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;отключен&lt;/b&gt;</translation>
@@ -555,28 +342,12 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;заключен&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bytes:</source>
         <translation>Байтове:</translation>
@@ -593,30 +364,6 @@ Address: %4
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Сума</translation>
@@ -653,94 +400,6 @@ Address: %4
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation>Прах</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>да</translation>
@@ -749,55 +408,11 @@ Address: %4
         <source>no</source>
         <translation>не</translation>
     </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -808,14 +423,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Име</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Адрес</translation>
@@ -837,12 +444,12 @@ Address: %4
         <translation>Редактиране на изходящ адрес</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Вече има адрес &quot;%1&quot; в списъка с адреси.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Вече има адрес "%1" в списъка с адреси.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>&quot;%1&quot; не е валиден Биткоин адрес.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>"%1" не е валиден Биткоин адрес.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -863,29 +470,13 @@ Address: %4
         <source>name</source>
         <translation>име</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
         <translation>Пътят вече съществува и не е папка.</translation>
     </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>version</source>
         <translation>версия</translation>
@@ -894,254 +485,90 @@ Address: %4
         <source>Usage:</source>
         <translation>Използване:</translation>
     </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>UI options</source>
         <translation>UI Опции</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
+        <source>Welcome</source>
+        <translation>Добре дошли</translation>
     </message>
     <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Грешка</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Опции</translation>
     </message>
     <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>&amp;Main</source>
+        <translation>&amp;Основни</translation>
     </message>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Pay transaction &amp;fee</source>
+        <translation>&amp;Такса за изходяща трансакция</translation>
     </message>
-</context>
-<context>
-    <name>Intro</name>
     <message>
-        <source>Welcome</source>
-        <translation>Добре дошли</translation>
+        <source>&amp;Start Bitcoin on system login</source>
+        <translation>&amp;Пускане на Биткоин при вход в системата</translation>
     </message>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Network</source>
+        <translation>&amp;Мрежа</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <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>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Map port using &amp;UPnP</source>
+        <translation>Отваряне на входящия порт чрез &amp;UPnP</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Proxy &amp;IP:</source>
+        <translation>Прокси &amp; АйПи:</translation>
     </message>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Port:</source>
+        <translation>&amp;Порт:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Биткоин</translation>
+        <source>Port of the proxy (e.g. 9050)</source>
+        <translation>Порт на прокси сървъра (пр. 9050)</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Window</source>
+        <translation>&amp;Прозорец</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Грешка</translation>
+        <source>Show only a tray icon after minimizing the window.</source>
+        <translation>След минимизиране ще е видима само иконата в системния трей.</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <source>&amp;Minimize to the tray instead of the taskbar</source>
+        <translation>&amp;Минимизиране в системния трей</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
+        <translation>При затваряне на прозореца приложението остава минимизирано. Ако изберете тази опция, приложението може да се затвори само чрез Изход в менюто.</translation>
     </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
     <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
+        <source>M&amp;inimize on close</source>
+        <translation>М&amp;инимизиране при затваряне</translation>
     </message>
     <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Опции</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation>&amp;Основни</translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>&amp;Такса за изходяща трансакция</translation>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Пускане на Биткоин при вход в системата</translation>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Мрежа</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation>Отваряне на входящия порт чрез &amp;UPnP</translation>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation>&amp;Порт:</translation>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation>&amp;Прозорец</translation>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation>След минимизиране ще е видима само иконата в системния трей.</translation>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>&amp;Минимизиране в системния трей</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 Quit in the menu.</source>
-        <translation>При затваряне на прозореца приложението остава минимизирано. Ако изберете тази опция, приложението може да се затвори само чрез Изход в менюто.</translation>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation>М&amp;инимизиране при затваряне</translation>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation>&amp;Интерфейс</translation>
+        <source>&amp;Display</source>
+        <translation>&amp;Интерфейс</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
@@ -1159,50 +586,18 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Изберете единиците, показвани по подразбиране в интерфейса.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Ще се показват адресите в списъка с трансакции независимо от наличието на кратко име.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Адреси в списъка с трансакции</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
-        <translation type="unfinished"/>
+        <translation>ОК</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
+        <translation>Отказ</translation>
     </message>
     <message>
         <source>default</source>
         <translation>подразбиране</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Прокси адресът е невалиден.</translation>
@@ -1214,10 +609,6 @@ Address: %4
         <source>Form</source>
         <translation>Форма</translation>
     </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>Портфейл</translation>
@@ -1226,26 +617,10 @@ Address: %4
         <source>Available:</source>
         <translation>Налично:</translation>
     </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pending:</source>
         <translation>Изчакващо:</translation>
     </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Общо:</translation>
@@ -1265,121 +640,28 @@ Address: %4
 </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Плащането е приета</translation>
     </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Биткоин</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Сума</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Въведете Биткоин адрес (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1396,23 +678,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Данни</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
+        <translation>Използване на OpenSSL версия</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1426,227 +696,75 @@ Address: %4
         <source>Number of connections</source>
         <translation>Брой връзки</translation>
     </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Current number of blocks</source>
         <translation>Текущ брой блокове</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Предвидени общо блокове</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Време на последния блок</translation>
     </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
+        <translation>Общо:</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <translation>Отворете Биткой дебъг лог файла от настоящата Data папка. Може да отнеме няколко секунди при по - големи лог файлове.</translation>
     </message>
     <message>
         <source>Clear console</source>
         <translation>Изчисти конзолата</translation>
     </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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>Използвайте стрелки надолу и нагореза разглеждане на историятаот команди и &lt;b&gt;Ctrl-L&lt;/b&gt; за изчистване на конзолата.</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Име:</translation>
     </message>
     <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <source>Clear</source>
+        <translation>Изчистване</translation>
     </message>
     <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <source>Show</source>
+        <translation>Показване</translation>
     </message>
     <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <source>Remove</source>
+        <translation>Премахване</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Копирай име</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>Copy message</source>
+        <translation>Копиране на съобщението</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Копирай сума</translation>
     </message>
 </context>
 <context>
-    <name>ReceiveCoinsDialog</name>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <source>Payment information</source>
+        <translation>Данни за плащането</translation>
     </message>
     <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Име:</translation>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
     <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation>Изчистване</translation>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation>Показване</translation>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation>Премахване</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Копирай име</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation>Копиране на съобщението</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Копирай сума</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation>Данни за плащането</translation>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Сума</translation>
+        <source>Amount</source>
+        <translation>Сума</translation>
     </message>
     <message>
         <source>Label</source>
@@ -1656,10 +774,6 @@ Address: %4
         <source>Message</source>
         <translation>Съобщение</translation>
     </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
         <translation>Грешка при създаването на QR Code от URI.</translation>
@@ -1687,1489 +801,726 @@ Address: %4
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation>Изпращане</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation>Байтове:</translation>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Сума:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation>Приоритет:</translation>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation>Такса:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Изпращане към повече от един получател</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation>Добави &amp;получател</translation>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Изчисти</translation>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Баланс:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Потвърдете изпращането</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>И&amp;зпрати</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Потвърждаване</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Копирай сума</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation>или</translation>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation>Невалиден адрес на получателя.</translation>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Сумата трябва да е по-голяма от 0.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation>Сумата надвишава текущия баланс</translation>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation>Грешка при създаването на трансакция!</translation>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(без име)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation>Наистина ли искате да изпратите?</translation>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation>добавено като такса за трансакция</translation>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>С&amp;ума:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Плати &amp;На:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Въведете име за този адрес, за да го добавите в списъка с адреси</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Име:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation>Това е нормално плащане.</translation>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Вмъкни от клипборда</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation>Премахване на този запис</translation>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Съобщение:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation>Плащане на:</translation>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation>Подпиши / Провери съобщение</translation>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation>&amp;Подпиши</translation>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Можете да подпишете съобщение като доказателство, че притежавате определен адрес. Бъдете внимателни и не подписвайте съобщения, които биха разкрили лична информация без вашето съгласие.</translation>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Адресът, с който ще подпишете съобщението (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Вмъкни от клипборда</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation>Въведете съобщението тук</translation>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation>Подпис</translation>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation>Копиране на текущия подпис</translation>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>Подпишете съобщение като доказателство, че притежавате определен адрес</translation>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Изчисти</translation>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation>&amp;Провери</translation>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Адресът, с който е подписано съобщението (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>Проверете съобщение, за да сте сигурни че е подписано с определен Биткоин адрес</translation>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Въведете Биткоин адрес (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Натиснете &quot;Подписване на съобщение&quot; за да създадете подпис</translation>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation>Въведеният адрес е невалиден.</translation>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation>Моля проверете адреса и опитайте отново.</translation>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation>Не е наличен частният ключ за въведеният адрес.</translation>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation>Подписването на съобщение бе неуспешно.</translation>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation>Съобщението е подписано.</translation>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation>Подписът не може да бъде декодиран.</translation>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation>Проверете подписа и опитайте отново.</translation>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation>Подписът не отговаря на комбинацията от съобщение и адрес.</translation>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation>Проверката на съобщението беше неуспешна.</translation>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation>Съобщението е потвърдено.</translation>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Подлежи на промяна до %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation>%1/офлайн</translation>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/непотвърдени</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>включена в %1 блока</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation>Статус</translation>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation>Източник</translation>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation>Издадени</translation>
-    </message>
-    <message>
-        <source>From</source>
-        <translation>От</translation>
-    </message>
-    <message>
-        <source>To</source>
-        <translation>За</translation>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation>собствен адрес</translation>
-    </message>
-    <message>
-        <source>label</source>
-        <translation>име</translation>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation>Кредит</translation>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation>Дебит</translation>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation>Такса</translation>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation>Сума нето</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Съобщение</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation>Коментар</translation>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation>Търговец</translation>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation>Трансакция</translation>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Сума</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation>true</translation>
-    </message>
-    <message>
-        <source>false</source>
-        <translation>false</translation>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, все още не е изпратено</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>неизвестен</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Трансакция</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Описание на трансакцията</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Тип</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Сума</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Подлежи на промяна до %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Потвърдени (%1 потвърждения)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Блокът не е получен от останалите участници и най-вероятно няма да бъде одобрен.</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Генерирана, но отхвърлена от мрежата</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation>Непотвърдено</translation>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation>Потвърждаване (%1 от %2 препоръчвани потвърждения)</translation>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation>Конфликтно</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Получени с</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Получен от</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Изпратени на</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Плащане към себе си</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Емитирани</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Състояние на трансакцията. Задръжте върху това поле за брой потвърждения.</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Дата и час на получаване.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Вид трансакция.</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Получател на трансакцията.</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Сума извадена или добавена към баланса.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Всички</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Днес</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Тази седмица</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Този месец</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Предния месец</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Тази година</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>От - до...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Получени</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Изпратени на</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Собствени</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Емитирани</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Други</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Търсене по адрес или име</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Минимална сума</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Копирай адрес</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Копирай име</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Копирай сума</translation>
+        <translation>Изпращане</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>Bytes:</source>
+        <translation>Байтове:</translation>
     </message>
     <message>
-        <source>Edit label</source>
-        <translation>Редактирай име</translation>
+        <source>Amount:</source>
+        <translation>Сума:</translation>
     </message>
     <message>
-        <source>Show transaction details</source>
-        <translation>Подробности за трансакцията</translation>
+        <source>Priority:</source>
+        <translation>Приоритет:</translation>
     </message>
     <message>
-        <source>Export Transaction History</source>
-        <translation>Изнасяне историята на трансакциите</translation>
+        <source>Fee:</source>
+        <translation>Такса:</translation>
     </message>
     <message>
-        <source>Exporting Failed</source>
-        <translation>Грешка при изнасянето</translation>
+        <source>Send to multiple recipients at once</source>
+        <translation>Изпращане към повече от един получател</translation>
     </message>
     <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <source>Add &amp;Recipient</source>
+        <translation>Добави &amp;получател</translation>
     </message>
     <message>
-        <source>Exporting Successful</source>
-        <translation>Изнасянето е успешна</translation>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Изчисти</translation>
     </message>
     <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Баланс:</translation>
     </message>
     <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>CSV файл (*.csv)</translation>
+        <source>Confirm the send action</source>
+        <translation>Потвърдете изпращането</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation>Потвърдени</translation>
+        <source>S&amp;end</source>
+        <translation>И&amp;зпрати</translation>
     </message>
     <message>
-        <source>Date</source>
-        <translation>Дата</translation>
+        <source>Confirm send coins</source>
+        <translation>Потвърждаване</translation>
     </message>
     <message>
-        <source>Type</source>
-        <translation>Тип</translation>
+        <source>Copy amount</source>
+        <translation>Копирай сума</translation>
     </message>
     <message>
-        <source>Label</source>
-        <translation>Име</translation>
+        <source>or</source>
+        <translation>или</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
+        <source>The recipient address is not valid, please recheck.</source>
+        <translation>Невалиден адрес на получателя.</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation>Сума</translation>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Сумата трябва да е по-голяма от 0.</translation>
     </message>
     <message>
-        <source>ID</source>
-        <translation>ИД</translation>
+        <source>The amount exceeds your balance.</source>
+        <translation>Сумата надвишава текущия баланс</translation>
     </message>
     <message>
-        <source>Range:</source>
-        <translation>От:</translation>
+        <source>Transaction creation failed!</source>
+        <translation>Грешка при създаването на трансакция!</translation>
     </message>
     <message>
-        <source>to</source>
-        <translation>до</translation>
+        <source>(no label)</source>
+        <translation>(без име)</translation>
     </message>
-</context>
-<context>
-    <name>WalletFrame</name>
     <message>
-        <source>No wallet has been loaded.</source>
-        <translation>Няма зареден портфейл.</translation>
+        <source>Are you sure you want to send?</source>
+        <translation>Наистина ли искате да изпратите?</translation>
     </message>
-</context>
-<context>
-    <name>WalletModel</name>
     <message>
-        <source>Send Coins</source>
-        <translation>Изпращане</translation>
+        <source>added as transaction fee</source>
+        <translation>добавено като такса за трансакция</translation>
     </message>
 </context>
 <context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation>Запишете данните от текущия раздел във файл</translation>
-    </message>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>С&amp;ума:</translation>
     </message>
     <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Плати &amp;На:</translation>
     </message>
     <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Въведете име за този адрес, за да го добавите в списъка с адреси</translation>
     </message>
     <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Име:</translation>
     </message>
     <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <source>This is a normal payment.</source>
+        <translation>Това е нормално плащане.</translation>
     </message>
     <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
     <message>
-        <source>Usage:</source>
-        <translation>Използване:</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Вмъкни от клипборда</translation>
     </message>
     <message>
-        <source>List commands</source>
-        <translation>Вписване на команди</translation>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Get help for a command</source>
-        <translation>Получете помощ за команда</translation>
+        <source>Remove this entry</source>
+        <translation>Премахване на този запис</translation>
     </message>
     <message>
-        <source>Options:</source>
-        <translation>Опции:</translation>
+        <source>Message:</source>
+        <translation>Съобщение:</translation>
     </message>
     <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Задаване на файл с настройки (по подразбиране bitcoin.conf)</translation>
+        <source>Pay To:</source>
+        <translation>Плащане на:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
+        <source>Signatures - Sign / Verify a Message</source>
+        <translation>Подпиши / Провери съобщение</translation>
     </message>
     <message>
-        <source>Specify data directory</source>
-        <translation>Определете директория за данните</translation>
+        <source>&amp;Sign Message</source>
+        <translation>&amp;Подпиши</translation>
     </message>
     <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
+        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+        <translation>Можете да подпишете съобщение като доказателство, че притежавате определен адрес. Бъдете внимателни и не подписвайте съобщения, които биха разкрили лична информация без вашето съгласие.</translation>
     </message>
     <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Вмъкни от клипборда</translation>
     </message>
     <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Праг на прекъсване на връзката при непорядъчно държащи се пиъри (по подразбиране:100)</translation>
+        <source>Enter the message you want to sign here</source>
+        <translation>Въведете съобщението тук</translation>
     </message>
     <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Брой секунди до възтановяване на връзката за зле държащите се пиъри (по подразбиране:86400)</translation>
+        <source>Signature</source>
+        <translation>Подпис</translation>
     </message>
     <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
+        <source>Copy the current signature to the system clipboard</source>
+        <translation>Копиране на текущия подпис</translation>
     </message>
     <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <source>Sign the message to prove you own this Bitcoin address</source>
+        <translation>Подпишете съобщение като доказателство, че притежавате определен адрес</translation>
     </message>
     <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
+        <source>Sign &amp;Message</source>
+        <translation>Подпиши &amp;съобщение</translation>
     </message>
     <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Изчисти</translation>
     </message>
     <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
+        <source>&amp;Verify Message</source>
+        <translation>&amp;Провери</translation>
     </message>
     <message>
-        <source>Use the test network</source>
-        <translation>Използвайте тестовата мрежа</translation>
+        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
+        <translation>Проверете съобщение, за да сте сигурни че е подписано с определен Биткоин адрес</translation>
     </message>
     <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Натиснете "Подписване на съобщение" за да създадете подпис</translation>
     </message>
     <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
+        <source>The entered address is invalid.</source>
+        <translation>Въведеният адрес е невалиден.</translation>
     </message>
     <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
+        <source>Please check the address and try again.</source>
+        <translation>Моля проверете адреса и опитайте отново.</translation>
     </message>
     <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <source>Wallet unlock was cancelled.</source>
+        <translation>Отключването на портфейла беше отменено.</translation>
     </message>
     <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
+        <source>Private key for the entered address is not available.</source>
+        <translation>Не е наличен частният ключ за въведеният адрес.</translation>
     </message>
     <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <source>Message signing failed.</source>
+        <translation>Подписването на съобщение бе неуспешно.</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Message signed.</source>
+        <translation>Съобщението е подписано.</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
+        <source>The signature could not be decoded.</source>
+        <translation>Подписът не може да бъде декодиран.</translation>
     </message>
     <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <source>Please check the signature and try again.</source>
+        <translation>Проверете подписа и опитайте отново.</translation>
     </message>
     <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <source>The signature did not match the message digest.</source>
+        <translation>Подписът не отговаря на комбинацията от съобщение и адрес.</translation>
     </message>
     <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
+        <source>Message verification failed.</source>
+        <translation>Проверката на съобщението беше неуспешна.</translation>
     </message>
     <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
+        <source>Message verified.</source>
+        <translation>Съобщението е потвърдено.</translation>
     </message>
+</context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Подлежи на промяна до %1</translation>
     </message>
     <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <source>%1/offline</source>
+        <translation>%1/офлайн</translation>
     </message>
     <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/непотвърдени</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 type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>включена в %1 блока</translation>
     </message>
     <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <source>Status</source>
+        <translation>Статус</translation>
     </message>
     <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Source</source>
+        <translation>Източник</translation>
     </message>
     <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <source>Generated</source>
+        <translation>Издадени</translation>
     </message>
     <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
+        <source>From</source>
+        <translation>От</translation>
     </message>
     <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
+        <source>To</source>
+        <translation>За</translation>
     </message>
     <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <source>own address</source>
+        <translation>собствен адрес</translation>
     </message>
     <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <source>label</source>
+        <translation>име</translation>
     </message>
     <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
+        <source>Credit</source>
+        <translation>Кредит</translation>
     </message>
     <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
+        <source>not accepted</source>
+        <translation>не е приет</translation>
     </message>
     <message>
-        <source>(default: 1)</source>
-        <translation>(по подразбиране 1)</translation>
+        <source>Debit</source>
+        <translation>Дебит</translation>
     </message>
     <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(по подразбиране wallet.dat)</translation>
+        <source>Transaction fee</source>
+        <translation>Такса</translation>
     </message>
     <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <source>Net amount</source>
+        <translation>Сума нето</translation>
     </message>
     <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Съобщение</translation>
     </message>
     <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Comment</source>
+        <translation>Коментар</translation>
     </message>
     <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <source>Merchant</source>
+        <translation>Търговец</translation>
     </message>
     <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
+        <source>Transaction</source>
+        <translation>Трансакция</translation>
     </message>
     <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Сума</translation>
     </message>
     <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <source>true</source>
+        <translation>true</translation>
     </message>
     <message>
-        <source>Connection options:</source>
-        <translation>Настройки на връзката:</translation>
+        <source>false</source>
+        <translation>false</translation>
     </message>
     <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, все още не е изпратено</translation>
     </message>
     <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>неизвестен</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Трансакция</translation>
     </message>
     <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Описание на трансакцията</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тип</translation>
     </message>
     <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Подлежи на промяна до %1</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Потвърдени (%1 потвърждения)</translation>
     </message>
     <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Блокът не е получен от останалите участници и най-вероятно няма да бъде одобрен.</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Грешка: мястото на диска е малко!</translation>
+        <source>Generated but not accepted</source>
+        <translation>Генерирана, но отхвърлена от мрежата</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Unconfirmed</source>
+        <translation>Непотвърдено</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation>Грешка: системна грешка:</translation>
+        <source>Confirming (%1 of %2 recommended confirmations)</source>
+        <translation>Потвърждаване (%1 от %2 препоръчвани потвърждения)</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <source>Conflicted</source>
+        <translation>Конфликтно</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation>Грешка при четене данни на блок</translation>
+        <source>Received with</source>
+        <translation>Получени с</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation>Грешка при четене на блок</translation>
+        <source>Received from</source>
+        <translation>Получен от</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Изпратени на</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Плащане към себе си</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation>Грешка при запис данни на блок</translation>
+        <source>Mined</source>
+        <translation>Емитирани</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation>Грешка при запис на блок</translation>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Състояние на трансакцията. Задръжте върху това поле за брой потвърждения.</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Дата и час на получаване.</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Вид трансакция.</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Получател на трансакцията.</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Сума извадена или добавена към баланса.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Всички</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Днес</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Тази седмица</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Този месец</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Предния месец</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Тази година</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation>Внасяне...</translation>
+        <source>Range...</source>
+        <translation>От - до...</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Получени</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Изпратени на</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Собствени</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Емитирани</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Други</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Търсене по адрес или име</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Минимална сума</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Копирай адрес</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Копирай име</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Копирай сума</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Редактирай име</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Show transaction details</source>
+        <translation>Подробности за трансакцията</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Export Transaction History</source>
+        <translation>Изнасяне историята на трансакциите</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Exporting Failed</source>
+        <translation>Грешка при изнасянето</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation>Проверка на блоковете...</translation>
+        <source>Exporting Successful</source>
+        <translation>Изнасянето е успешна</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation>Проверка на портфейла...</translation>
+        <source>Comma separated file (*.csv)</source>
+        <translation>CSV файл (*.csv)</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Потвърдени</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation>Настройки на портфейла:</translation>
+        <source>Type</source>
+        <translation>Тип</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Име</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ИД</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>От:</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>до</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>No wallet has been loaded.</source>
+        <translation>Няма зареден портфейл.</translation>
     </message>
+</context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Изпращане</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Information</source>
-        <translation>Данни</translation>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Backup Wallet</source>
+        <translation>Запазване на портфейла</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Опции:</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Задаване на файл с настройки (по подразбиране bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Определете директория за данните</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>Праг на прекъсване на връзката при непорядъчно държащи се пиъри (по подразбиране:100)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation>Брой секунди до възтановяване на връзката за зле държащите се пиъри (по подразбиране:86400)</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Използвайте тестовата мрежа</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+        <translation>Внимание: -paytxfee има голяма стойност! Това е таксата за транзакциите, която ще платите ако направите транзакция.</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>(default: 1)</source>
+        <translation>(по подразбиране 1)</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>(default: wallet.dat)</source>
+        <translation>(по подразбиране wallet.dat)</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Connection options:</source>
+        <translation>Настройки на връзката:</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Error: Disk space is low!</source>
+        <translation>Грешка: мястото на диска е малко!</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Error: system error: </source>
+        <translation>Грешка: системна грешка:</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
+        <translation>Провалено "слушане" на всеки порт. Използвайте -listen=0 ако искате това.</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block info</source>
+        <translation>Грешка при четене данни на блок</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block</source>
+        <translation>Грешка при четене на блок</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block info</source>
+        <translation>Грешка при запис данни на блок</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block</source>
+        <translation>Грешка при запис на блок</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Изпрати локализиращата или дебъг информацията към конзолата, вместо файлът debug.log</translation>
+        <source>Importing...</source>
+        <translation>Внасяне...</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Verifying blocks...</source>
+        <translation>Проверка на блоковете...</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Verifying wallet...</source>
+        <translation>Проверка на портфейла...</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Wallet options:</source>
+        <translation>Настройки на портфейла:</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Данни</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>Изпрати локализиращата или дебъг информацията към конзолата, вместо файлът debug.log</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Set minimum block size in bytes (default: 0)</source>
+        <translation>Задайте минимален размер на блок-а в байтове (подразбиране: 0)</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Определете таймаут за свързване в милисекунди (подразбиране: 5000)</translation>
     </message>
     <message>
         <source>System error: </source>
@@ -3187,14 +1538,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Трансакцията е твърде голяма</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Потребителско име за JSON-RPC връзките</translation>
@@ -3205,48 +1548,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>Внимание: Използвате остаряла версия, необходимо е обновление!</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Парола за  JSON-RPC връзките</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Разреши  JSON-RPC връзките от отучнен IP адрес</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Изпрати команди до възел функциониращ на &lt;ip&gt; (По подразбиране: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Upgrade wallet to latest format</source>
         <translation>Обновяване на портфейла до най-новия формат</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Повторно сканиране на блок-връзка за липсващи портфейлни трансакции</translation>
@@ -3267,14 +1578,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Това помощно съобщение</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>Зареждане на адресите...</translation>
@@ -3283,45 +1586,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Грешка при зареждане на wallet.dat: портфейлът е повреден</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Грешка при зареждане на  wallet.dat: портфейлът изисква по-нова версия на Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Грешка при зареждане на wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Невалиден -proxy address: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Невалиден -proxy address: '%s'</translation>
     </message>
     <message>
         <source>Insufficient funds</source>
@@ -3331,22 +1602,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading block index...</source>
         <translation>Зареждане на блок индекса...</translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>Зареждане на портфейла...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Преразглеждане на последовтелността от блокове...</translation>
@@ -3355,19 +1614,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>Зареждането е завършено</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Грешка</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_bs.ts b/src/qt/locale/bitcoin_bs.ts
index 2ec28af777a4..fc5e6d270e76 100644
--- a/src/qt/locale/bitcoin_bs.ts
+++ b/src/qt/locale/bitcoin_bs.ts
@@ -1,3368 +1,166 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="bs" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezrga</translation>
     </message>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezrga</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezrga</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezrga</translation>
     </message>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Sve</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Danas</translation>
     </message>
     <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Ovaj mjesec</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Prošli mjesec</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Ove godine</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation>Bitcoin Jezrga</translation>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletFrame</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletModel</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation>Bitcoin Jezrga</translation>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation>Bitcoin Jezrga</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Sve</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Danas</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Ovaj mjesec</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Prošli mjesec</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Ove godine</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index c225967caca9..0d45ab63b642 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1,133 +1,101 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ca" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Doble click per editar l&apos;adreça o l&apos;etiqueta</translation>
+        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Crear una nova adrça</translation>
+        <translation>Crea una nova adreça</translation>
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Nova</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copia la selecció actual al porta-retalls del sistema</translation>
+        <translation>Copia l'adreça seleccionada al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Tanca</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia l'adreça</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Elimina l'adreça sel·leccionada actualment de la llista</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>&amp;Eliminar</translation>
+        <translation>&amp;Elimina</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Trieu una adreça on voleu enviar monedes</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Trieu l'adreça on voleu rebre monedes</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>T&amp;ria</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>S'estan enviant les adreces</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>S'estan rebent les adreces</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;etiqueta</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Edita</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Exporta la llista d'adreces</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Fitxer separat per comes (*.csv)</translation>
+        <translation>Fitxer de separació amb comes (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar.</translation>
     </message>
 </context>
 <context>
@@ -149,130 +117,130 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
+        <translation>Diàleg de contrasenya</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>Introduïu la frase-contrasenya</translation>
+        <translation>Introduïu una contrasenya</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>Nova frase-contrasenya</translation>
+        <translation>Nova contrasenya</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Repetiu la nova frase-contrasenya</translation>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduïu la nova frase-contrasenya per a la cartera.&lt;br/&gt;Empreu una frase-contrasenya de &lt;b&gt;10 o més caràcters aleatoris&lt;b/&gt;, o &lt;b&gt;vuit o més paraules&lt;b/&gt;.</translation>
+        <translation>Repetiu la nova contrasenya</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Encriptar cartera</translation>
+        <translation>Encripta el moneder</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Cal que introduïu la frase-contrasenya de la cartera per a desbloquejar-la.</translation>
+        <translation>Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation>Desbloquejar cartera</translation>
+        <translation>Desbloqueja el moneder</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Cal que introduïu la frase-contrasenya de la cartera per a desencriptar-la.</translation>
+        <translation>Aquesta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation>Desencriptar cartera</translation>
+        <translation>Desencripta el moneder</translation>
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation>Canviar frase-contrasenya</translation>
+        <translation>Canvia la contrasenya</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Introduïu l&apos;antiga i la nova frase-contrasenya per a la cartera.</translation>
+        <translation>Introduïu tant la contrasenya antiga com la nova del moneder.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>Confirmeu l&apos;encriptació de cartera</translation>
+        <translation>Confirma l'encriptació del moneder</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
+        <translation>Esteu segur que voleu encriptar el vostre moneder?</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 type="unfinished"/>
+        <translation>IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: Les lletres majúscules estan activades!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
-        <translation>Cartera encriptada</translation>
+        <translation>Moneder encriptat</translation>
+    </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin es tancarà ara per acabar el procés d'encriptació. Recordeu que encriptar el moneder no protegeix completament els bitcoins de ser robats per programari maliciós instal·lat a l'ordinador.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
-        <translation>L&apos;encriptació de cartera ha fallat</translation>
+        <translation>L'encriptació del moneder ha fallat</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>L&apos;encriptació de cartera ha fallat degut a un error intern. La vostra cartera no ha estat encriptada.</translation>
+        <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation>Les frases-contrasenya no concorden.</translation>
+        <translation>La contrasenya introduïda no coincideix.</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>El desbloqueig de cartera ha fallat</translation>
+        <translation>El desbloqueig del moneder ha fallat</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>La frase-contrasenya per a la desencriptació de cartera és incorrecta.</translation>
+        <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation>La desencriptació de cartera ha fallat</translation>
+        <translation>La desencriptació del moneder ha fallat</translation>
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <translation>La contrasenya del moneder ha estat modificada correctament.</translation>
     </message>
 </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
+        <translation>Signa el &amp;missatge...</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>Sincronitzant amb la xarxa...</translation>
+        <translation>S'està sincronitzant amb la xarxa ...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation>&amp;Visió general</translation>
+        <translation>&amp;Panorama general</translation>
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Node</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>Mostrar visió general de la cartera</translation>
+        <translation>Mostra el panorama general del moneder</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -280,27 +248,23 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>Exploreu l&apos;historial de transaccions</translation>
+        <translation>Cerca a l'historial de transaccions</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation type="unfinished"/>
+        <translation>S&amp;urt</translation>
     </message>
     <message>
         <source>Quit application</source>
-        <translation>Sortir de l&apos;aplicació</translation>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Informació sobre Bitcoin</translation>
+        <translation>Surt de l'aplicació</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
+        <translation>Quant a &amp;Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <translation>Mostra informació sobre Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
@@ -308,99 +272,107 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Encripta el moneder...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Realitza una còpia de seguretat del moneder...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Canvia la contrasenya...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces d'e&amp;nviament...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces de &amp;recepció</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Obre un &amp;URI...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Client del Bitcoin Core</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan important els blocs del disc...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan reindexant els blocs al disc...</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes a una adreça Bitcoin</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Modifica les opcions de configuració per bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <translation>Realitza una còpia de seguretat del moneder a una altra ubicació</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Canviar frase-contrasenya per a l&apos;escriptació de la cartera</translation>
+        <translation>Canvia la contrasenya d'encriptació del moneder</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Finestra de depuració</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <translation>Obre la consola de diagnòstic i depuració</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Verifica el missatge...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Moneder</translation>
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Envia</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Rep</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostra informació del Bitcoin Core</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Mostra / Amaga</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <translation>Mostra o amaga la finestra principal</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <translation>Encripta les claus privades pertanyents al moneder</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <translation>Signa el missatges amb la seva adreça de Bitcoin per provar que les poseeixes</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>Verifiqueu els missatges per assegurar-vos que han estat signats amb una adreça Bitcoin específica.</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -416,7 +388,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Barra d&apos;eines</translation>
+        <translation>Barra d'eines de les pestanyes</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -424,107 +396,99 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita pagaments (genera codis QR i bitcoin: URI)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Quant al Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces d'enviament i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces de recepció i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Obre una bitcoin: sol·licitud d'URI o pagament</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la &amp;línia d'ordres</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
+        <translation>Mostra el missatge d'ajuda del Bitcoin Core per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n connexió activa a la xarxa Bitcoin</numerusform><numerusform>%n connexions actives a la xarxa Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>Proccessats %1 blocs del històric de transaccions.</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n dia</numerusform><numerusform>%n dies</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n setmana</numerusform><numerusform>%n setmanes</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 i %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n any</numerusform><numerusform>%n anys</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <translation>%1 darrere</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <translation>El darrer bloc rebut ha estat generat fa %1.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <translation>Les transaccions a partir d'això no seran visibles.</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>Avís</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>Informació</translation>
     </message>
     <message>
         <source>Up to date</source>
-        <translation type="unfinished"/>
+        <translation>Al dia</translation>
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>Actualitzant...</translation>
+        <translation>S'està posant al dia ...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -540,81 +504,77 @@ Amount: %2
 Type: %3
 Address: %4
 </source>
-        <translation type="unfinished"/>
+        <translation>Data: %1\nImport: %2\n Tipus: %3\n Adreça: %4\n</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>La cartera està &lt;b&gt;encriptada&lt;b/&gt; i &lt;b&gt;desbloquejada&lt;b/&gt;</translation>
+        <translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;desbloquejat&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>La cartera està &lt;b&gt;encriptada&lt;b/&gt; i &lt;b&gt;bloquejada&lt;b/&gt;</translation>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
         <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <translation>Alerta de xarxa</translation>
     </message>
 </context>
 <context>
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Selecció de l'adreça de control de monedes</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bytes:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Quota:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Quota posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Canvi:</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(des)selecciona-ho tot</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>Mode arbre</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Mode llista</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat</translation>
     </message>
     <message>
         <source>Address</source>
@@ -622,163 +582,151 @@ Address: %4
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>Confirmacions</translation>
     </message>
     <message>
         <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat</translation>
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation type="unfinished"/>
+        <translation>Copiar adreça </translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar etiqueta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>Copiar ID de transacció</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Bloqueja sense gastar</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Desbloqueja sense gastar</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>El més alt</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>Més alt</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>Alt</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>mig-alt</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>mig</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>baix-mig</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>baix</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>més baix</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>el més baix</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 bloquejada)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Pot variar +/- %1 satoshi(s) per entrada.</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>sí</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>no</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta etiqueta es posa de color vermell si la mida de la transacció és més gran de 1000 bytes.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>Això comporta una comissi d'almenys %1 per kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Pot variar +/- 1 byte per entrada.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Les transaccions amb una major prioritat són més propenses a ser incloses en un bloc.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Aquesta etiqueta es torna vermella si la prioritat és menor que «mitjana».</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta etiqueta es torna vermella si qualsevol destinatari rep un import inferior a %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -786,18 +734,18 @@ Address: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>canvia de %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(canvia)</translation>
     </message>
 </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Editar adreça</translation>
+        <translation>Editar Adreça</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -805,11 +753,11 @@ Address: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>L'etiqueta associada amb aquesta entrada de llista d'adreces</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça associada amb aquesta entrada de llista d'adreces. Només es pot modificar per a les adreces d'enviament.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -817,823 +765,898 @@ Address: %4
     </message>
     <message>
         <source>New receiving address</source>
-        <translation type="unfinished"/>
+        <translation>Nova adreça de recepció.</translation>
     </message>
     <message>
         <source>New sending address</source>
-        <translation type="unfinished"/>
+        <translation>Nova adreça d'enviament</translation>
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation type="unfinished"/>
+        <translation>Edita les adreces de recepció</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation type="unfinished"/>
+        <translation>Edita les adreces d'enviament</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha pogut desbloquejar el moneder.</translation>
     </message>
     <message>
         <source>New key generation failed.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la generació d'una nova clau.</translation>
     </message>
 </context>
 <context>
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Es crearà un nou directori de dades.</translation>
     </message>
     <message>
         <source>name</source>
-        <translation type="unfinished"/>
+        <translation>nom</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>El directori ja existeix. Afegeix %1 si vols crear un nou directori en aquesta ubicació.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>El camí ja existeix i no és cap directori.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot crear el directori de dades aquí.</translation>
     </message>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
         <source>version</source>
-        <translation type="unfinished"/>
+        <translation>versió</translation>
+    </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Quant al Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opcions de línia d'ordres</translation>
     </message>
     <message>
         <source>Usage:</source>
-        <translation type="unfinished"/>
+        <translation>Ús:</translation>
     </message>
     <message>
         <source>command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la línia d'ordres</translation>
     </message>
     <message>
         <source>UI options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de IU</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Defineix un idioma, per exemple "de_DE" (per defecte: preferències locals de sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
-        <translation type="unfinished"/>
+        <translation>Inicia minimitzat</translation>
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix certificats arrel SSL per a la sol·licitud de pagament (per defecte: -sistema-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la finestra de benvinguda a l'inici (per defecte: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Tria el directori de dades a l'inici (per defecte: 0)</translation>
     </message>
 </context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
-        <translation type="unfinished"/>
+        <translation>Us donem la benviguda</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <translation>Us donem la benvinguda al Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Atès que és la primera vegada que executeu el programa, podeu triar on emmagatzemarà el Bitcoin Core les dades.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>El Bitcoin Core descarregarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim s'emmagatzemaran %1 GB de dades en aquest directori, que seguiran creixent gradualment. També s'hi emmagatzemarà el moneder.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza el directori de dades per defecte</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un directori de dades personalitzat:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Error: el directori de dades «%1» especificat no pot ser creat.</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <translation>GB d'espai lliure disponible</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>(d' %1GB necessari)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>Obre un URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Obre una sol·licitud de pagament des d'un URI o un fitxer</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona un fitxer de sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona el fitxer de sol·licitud de pagament per obrir</translation>
     </message>
 </context>
 <context>
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions</translation>
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Principal</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
+        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
+        <translation>Paga &amp;comissió de transacció</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
+        <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Inicia el Bitcoin a l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>Mida de la memòria cau de la base de &amp;dades</translation>
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de fils de &amp;verificació d'scripts</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accepta connexions de fora</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permet connexions entrants</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>Adreça IP del proxy (p. ex. IPv4: 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 type="unfinished"/>
+        <translation>URL de terceres parts (p. ex. explorador de blocs) que apareix en la pestanya de transaccions com elements del menú contextual. %s en l'URL es reemplaçat pel resum de la transacció. Diferents URL estan separades per una barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URL de transaccions de terceres parts</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de línies d'ordre active que sobreescriuen les opcions de dalt:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
+        <translation>Reestableix totes les opcions del client.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Reestableix les opcions</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Xarxa</translation>
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = auto, &lt;0 = deixa tants nuclis lliures)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Moneder</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Expert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Activa les funcions de &amp;control de les monedes</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 type="unfinished"/>
+        <translation>Si inhabiliteu la despesa d'un canvi sense confirmar, el canvi d'una transacció no pot ser utilitzat fins que la transacció no tingui com a mínim una confirmació. Això també afecta com es calcula el vostre balanç.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Gasta el canvi sense confirmar</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 type="unfinished"/>
+        <translation>Obre el port del client de Bitcoin al router de forma automàtica. Això només funciona quan el router implementa UPnP i l'opció està activada.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
+        <translation>Port obert amb &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;IP del proxy:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Port:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
+        <translation>Port del proxy (per exemple 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Finestra</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
+        <translation>Mostra només la icona de la barra en minimitzar la finestra.</translation>
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Minimitza a la barra d'aplicacions en comptes de la barra de tasques</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 Quit in the menu.</source>
-        <translation type="unfinished"/>
+        <translation>Minimitza en comptes de sortir de la aplicació al tancar la finestra. Quan aquesta opció està activa, la aplicació només es tancarà al seleccionar Sortir al menú.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
+        <translation>M&amp;inimitza en tancar</translation>
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Pantalla</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Llengua de la interfície d'usuari:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
+        <translation>Aquí podeu definir la llengua de l'aplicació. Aquesta configuració tindrà efecte una vegada es reiniciï Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Unitats per mostrar els imports en:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona la unitat de subdivisió per defecte per mostrar en la interfície quan s'envien monedes.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Si voleu mostrar les funcions de control de monedes o no.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation type="unfinished"/>
+        <translation>&amp;D'acord</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Cancel·la</translation>
     </message>
     <message>
         <source>default</source>
-        <translation type="unfinished"/>
+        <translation>Per defecte</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation type="unfinished"/>
+        <translation>Confirmeu el reestabliment de les opcions</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Cal reiniciar el client per activar els canvis.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>S'aturarà el client, voleu procedir?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Amb aquest canvi cal un reinici del client.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça proxy introduïda és invalida.</translation>
     </message>
 </context>
 <context>
     <name>OverviewPage</name>
     <message>
         <source>Form</source>
-        <translation type="unfinished"/>
+        <translation>Formulari</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
+        <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establert connexió, però aquest proces no s'ha completat encara.</translation>
     </message>
     <message>
         <source>Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Moneder</translation>
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Disponible:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç que podeu gastar actualment</translation>
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Pendent:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Total de transaccions que encara han de confirmar-se i que encara no compten en el balanç que es pot gastar</translation>
     </message>
     <message>
         <source>Immature:</source>
-        <translation type="unfinished"/>
+        <translation>Immadur:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
+        <translation>Balanç minat que encara no ha madurat</translation>
     </message>
     <message>
         <source>Total:</source>
-        <translation type="unfinished"/>
+        <translation>Total:</translation>
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç total actual</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;Transaccions recents&lt;/b&gt;</translation>
     </message>
     <message>
         <source>out of sync</source>
-        <translation type="unfinished"/>
+        <translation>Fora de sincronia</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
-        <translation type="unfinished"/>
+        <translation>Gestió d'URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>Adreça de pagament no vàlida %1</translation>
     </message>
     <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <source>Payment request rejected</source>
+        <translation>La sol·licitud de pagament s'ha rebutjat</translation>
     </message>
     <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
     </message>
     <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
+        <source>Payment request has expired.</source>
+        <translation>La sol·licitud de pagament ha caducat.</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
+        <source>Payment request is not initialized.</source>
+        <translation>La sol·licitud de pagament no està inicialitzada.</translation>
     </message>
     <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
+    </message>
+    <message>
+        <source>Payment request error</source>
+        <translation>Error en la sol·licitud de pagament</translation>
+    </message>
+    <message>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation>No es pot iniciar bitcoin: gestor clica-per-pagar</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
+    </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
+        <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation type="unfinished"/>
+        <translation>Reemborsament de %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
+        <translation>Error en comunicar amb %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
+        <source>Payment request cannot be parsed!</source>
+        <translation>No es pot analitzar la sol·licitud de pagament!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
+        <translation>Mala resposta del servidor %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
+        <translation>Pagament reconegut</translation>
     </message>
     <message>
         <source>Network request error</source>
-        <translation type="unfinished"/>
+        <translation>Error en la sol·licitud de xarxa</translation>
+    </message>
+</context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adreça / nom de l'ordinador</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Quantitat</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Introduïu una adreça de Bitcoin (p. ex. %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>XARXA</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>DESCONEGUT</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>None</source>
+        <translation>Cap</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>N/A</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>De&amp;sa la imatge...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia la imatge</translation>
     </message>
     <message>
         <source>Save QR Code</source>
-        <translation type="unfinished"/>
+        <translation>Desa el codi QR</translation>
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
+        <translation>Imatge PNG (*.png)</translation>
     </message>
 </context>
 <context>
     <name>RPCConsole</name>
     <message>
         <source>Client name</source>
-        <translation type="unfinished"/>
+        <translation>Nom del client</translation>
     </message>
     <message>
         <source>N/A</source>
-        <translation type="unfinished"/>
+        <translation>N/A</translation>
     </message>
     <message>
         <source>Client version</source>
-        <translation type="unfinished"/>
+        <translation>Versió del client</translation>
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Informació</translation>
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
+        <translation>Finestra de depuració</translation>
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>General</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
+        <translation>Utilitzant OpenSSL versió</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Utilitzant BerkeleyDB versió</translation>
     </message>
     <message>
         <source>Startup time</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Temps d'inici</translation>
     </message>
     <message>
         <source>Network</source>
-        <translation type="unfinished"/>
+        <translation>Xarxa</translation>
     </message>
     <message>
         <source>Name</source>
-        <translation type="unfinished"/>
+        <translation>Nom</translation>
     </message>
     <message>
         <source>Number of connections</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de connexions</translation>
     </message>
     <message>
         <source>Block chain</source>
-        <translation type="unfinished"/>
+        <translation>Cadena de blocs</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de blocs actuals</translation>
+    </message>
+    <message>
+        <source>Received</source>
+        <translation>Rebut</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviat</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Iguals</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Seleccioneu un igual per mostrar informació detallada.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direcció</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versió</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Serveis</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Node de sincronització</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
     </message>
     <message>
         <source>Last block time</source>
-        <translation type="unfinished"/>
+        <translation>Últim temps de bloc</translation>
     </message>
     <message>
         <source>&amp;Open</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Obre</translation>
     </message>
     <message>
         <source>&amp;Console</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Consola</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>Trà&amp;nsit de la xarxa</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>Nete&amp;ja</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
+        <translation>Totals</translation>
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>Dins:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Fora:</translation>
     </message>
     <message>
         <source>Build date</source>
-        <translation type="unfinished"/>
+        <translation>Data de compilació</translation>
     </message>
     <message>
         <source>Debug log file</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer de registre de depuració</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <translation>Obre el fitxer de registre de depuració de Bitcoin del directori de dades actual. Això pot trigar uns quants segons per a fitxers de registre grans.</translation>
     </message>
     <message>
         <source>Clear console</source>
-        <translation type="unfinished"/>
+        <translation>Neteja la consola</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <translation>Us donem la benvinguda a la consola RPC de Bitcoin</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 type="unfinished"/>
+        <translation>Utilitza les fletxes d'amunt i avall per navegar per l'historial, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
+        <translation>Escriviu &lt;b&gt;help&lt;\b&gt; per a obtenir un llistat de les ordres disponibles.</translation>
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Im&amp;port:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Missatge:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Reutilitza una de les adreces de recepció utilitzades anteriorment. La reutilització d'adreces pot comportar problemes de seguretat i privadesa. No ho utilitzeu llevat que torneu a generar una sol·licitud de pagament feta abans.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>R&amp;eutilitza una adreça de recepció anterior (no recomanat)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge opcional que s'adjuntarà a la sol·licitud de pagament, que es mostrarà quan s'obri la sol·licitud. Nota: El missatge no s'enviarà amb el pagament per la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Una etiqueta opcional que s'associarà amb la nova adreça receptora.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Utilitzeu aquest formulari per sol·licitar pagaments. Tots els camps són &lt;b&gt;opcionals&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Un import opcional per sol·licitar. Deixeu-ho en blanc o zero per no sol·licitar cap import específic.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Esborra tots els camps del formuari.</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation type="unfinished"/>
+        <translation>Neteja</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>Historial de pagaments sol·licitats</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la sol·licitud seleccionada (fa el mateix que el doble clic a una entrada)</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
+        <translation>Mostra</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Esborra les entrades seleccionades de la llista</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>Esborra</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'etiqueta</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Copia el missatge</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
         <source>QR Code</source>
-        <translation type="unfinished"/>
+        <translation>Codi QR</translation>
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;adreça</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>De&amp;sa la imatge...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita un pagament a %1</translation>
     </message>
     <message>
         <source>Payment information</source>
-        <translation type="unfinished"/>
+        <translation>Informació de pagament</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1641,7 +1664,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Label</source>
@@ -1649,22 +1672,22 @@ Address: %4
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
+        <translation>URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
+        <translation>Error en codificar l'URI en un codi QR.</translation>
     </message>
 </context>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Label</source>
@@ -1672,11 +1695,11 @@ Address: %4
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1684,182 +1707,178 @@ Address: %4
     </message>
     <message>
         <source>(no message)</source>
-        <translation type="unfinished"/>
+        <translation>(sense missatge)</translation>
     </message>
     <message>
         <source>(no amount)</source>
-        <translation type="unfinished"/>
+        <translation>(sense import)</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>Característiques de control de les monedes</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>Entrades...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>seleccionat automàticament</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Fons insuficients!</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bytes:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Comissió:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Quota posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Canvi:</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 type="unfinished"/>
+        <translation>Si s'activa això, però l'adreça de canvi està buida o bé no és vàlida, el canvi s'enviarà a una adreça generada de nou.</translation>
     </message>
     <message>
         <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Personalitza l'adreça de canvi</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
+        <translation>Envia a múltiples destinataris al mateix temps</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
+        <translation>Afegeix &amp;destinatari</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Netejar tots els camps del formulari.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>Balance:</source>
-        <translation type="unfinished"/>
+        <translation>Balanç:</translation>
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation type="unfinished"/>
+        <translation>Confirma l'acció d'enviament</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation type="unfinished"/>
+        <translation>E&amp;nvia</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation type="unfinished"/>
+        <translation>Confirma l'enviament de monedes</translation>
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 a %2</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissi</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Import total %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>o</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça de destinatari no és vàlida, si us plau comprovi-la.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
+        <translation>L'import a pagar ha de ser major que 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
+        <translation>L'import supera el vostre balanç.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
+        <translation>El total excedeix el teu balanç quan s'afegeix la comisió a la transacció %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha trobat una adreça duplicada, tan sols es pot enviar a cada adreça un cop per ordre de enviament.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la creació de la transacció!</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha rebutjat la transacció! Això pot passar si alguna de les monedes del vostre moneder ja s'han gastat; per exemple, si heu fet servir una còpia de seguretat del fitxer wallet.dat i s'haguessin gastat monedes de la còpia però sense marcar-les-hi com a gastades.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça Bitcoin no vàlida</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1867,263 +1886,243 @@ Address: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça de canvi desconeguda</translation>
     </message>
     <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
+        <source>Are you sure you want to send?</source>
+        <translation>Esteu segur que ho voleu enviar?</translation>
     </message>
     <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <source>added as transaction fee</source>
+        <translation>S'ha afegit una taxa de transacció</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
         <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
+        <translation>Q&amp;uantitat:</translation>
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Paga &amp;a:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llibreta d'adreces</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Escull una adreça feta servir anteriorment</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
+        <translation>Això és un pagament normal.</translation>
     </message>
     <message>
         <source>Alt+A</source>
-        <translation type="unfinished"/>
+        <translation>Alta+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Enganxar adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
-        <translation type="unfinished"/>
+        <translation>Alt+P</translation>
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Elimina aquesta entrada</translation>
     </message>
     <message>
         <source>Message:</source>
-        <translation type="unfinished"/>
+        <translation>Missatge:</translation>
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta és una sol·licitud de pagament verificada.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llista d'adreces utilitzades</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge que s'ha adjuntat al bitcoin: URI que s'emmagatzemarà amb la transacció per a la vostra referència. Nota: el missatge no s'enviarà a través de la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta és una sol·licitud de pagament no verificada.</translation>
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>Paga a:</translation>
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Memo:</translation>
     </message>
 </context>
 <context>
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>S'està aturant el Bitcoin Core...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>No apagueu l'ordinador fins que no desaparegui aquesta finestra.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
+        <translation>Signatures - Signa / verifica un missatge</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Signa el missatge</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Podeu signar missatges amb la vostra adreça per provar que són vostres. Aneu amb compte no signar qualsevol cosa, ja que els atacs de pesca electrònica (phishing) poden provar de confondre-us perquè els signeu amb la vostra identitat. Només signeu als documents completament detallats amb què hi esteu d'acord.</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Tria les adreces fetes servir amb anterioritat</translation>
     </message>
     <message>
         <source>Alt+A</source>
-        <translation type="unfinished"/>
+        <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Enganxa l'adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
-        <translation type="unfinished"/>
+        <translation>Alt+P</translation>
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu aquí el missatge que voleu signar</translation>
     </message>
     <message>
         <source>Signature</source>
-        <translation type="unfinished"/>
+        <translation>Signatura</translation>
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Copia la signatura actual al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Signa el missatge per provar que ets propietari d'aquesta adreça Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>Signa el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps de clau</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Verifica el missatge</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Introdueixi l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Verificar el missatge per assegurar-se que ha estat signat amb una adreça Bitcoin específica</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>Verifica el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps de verificació de missatge</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça introduïda no és vàlida.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça introduïda no referencia a cap clau.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
+        <translation>El desbloqueig del moneder ha estat cancelat.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <translation>La clau privada per a la adreça introduïda no està disponible.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura del missatge ha fallat.</translation>
     </message>
     <message>
         <source>Message signed.</source>
-        <translation type="unfinished"/>
+        <translation>Missatge signat.</translation>
     </message>
     <message>
         <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura no s'ha pogut descodificar.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Comproveu la signatura i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura no coincideix amb el resum del missatge.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la verificació del missatge.</translation>
     </message>
     <message>
         <source>Message verified.</source>
-        <translation type="unfinished"/>
+        <translation>Missatge verificat.</translation>
     </message>
 </context>
 <context>
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Els desenvolupadors del Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2134,363 +2133,359 @@ Address: %4
     <name>TrafficGraphWidget</name>
     <message>
         <source>KB/s</source>
-        <translation type="unfinished"/>
+        <translation>KB/s</translation>
     </message>
 </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation type="unfinished"/>
+        <translation>Obert fins %1</translation>
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>en conflicte</translation>
     </message>
     <message>
         <source>%1/offline</source>
-        <translation type="unfinished"/>
+        <translation>%1/fora de línia</translation>
     </message>
     <message>
         <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>%1/sense confirmar</translation>
     </message>
     <message>
         <source>%1 confirmations</source>
-        <translation type="unfinished"/>
+        <translation>%1 confirmacions</translation>
     </message>
     <message>
         <source>Status</source>
-        <translation type="unfinished"/>
+        <translation>Estat</translation>
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>, difusió a través de %n node</numerusform><numerusform>, difusió a través de %n nodes</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Source</source>
-        <translation type="unfinished"/>
+        <translation>Font</translation>
     </message>
     <message>
         <source>Generated</source>
-        <translation type="unfinished"/>
+        <translation>Generat</translation>
     </message>
     <message>
         <source>From</source>
-        <translation type="unfinished"/>
+        <translation>Des de</translation>
     </message>
     <message>
         <source>To</source>
-        <translation type="unfinished"/>
+        <translation>A</translation>
     </message>
     <message>
         <source>own address</source>
-        <translation type="unfinished"/>
+        <translation>Adreça pròpia</translation>
     </message>
     <message>
         <source>label</source>
-        <translation type="unfinished"/>
+        <translation>etiqueta</translation>
     </message>
     <message>
         <source>Credit</source>
-        <translation type="unfinished"/>
+        <translation>Crèdit</translation>
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>disponible en %n bloc més</numerusform><numerusform>disponibles en %n blocs més</numerusform></translation>
     </message>
     <message>
         <source>not accepted</source>
-        <translation type="unfinished"/>
+        <translation>no acceptat</translation>
     </message>
     <message>
         <source>Debit</source>
-        <translation type="unfinished"/>
+        <translation>Dèbit</translation>
     </message>
     <message>
         <source>Transaction fee</source>
-        <translation type="unfinished"/>
+        <translation>Comissió de transacció</translation>
     </message>
     <message>
         <source>Net amount</source>
-        <translation type="unfinished"/>
+        <translation>Import net</translation>
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Comment</source>
-        <translation type="unfinished"/>
+        <translation>Comentar</translation>
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>ID de transacció</translation>
     </message>
     <message>
         <source>Merchant</source>
-        <translation type="unfinished"/>
+        <translation>Mercader</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu aquest bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
     </message>
     <message>
         <source>Debug information</source>
-        <translation type="unfinished"/>
+        <translation>Informació de depuració</translation>
     </message>
     <message>
         <source>Transaction</source>
-        <translation type="unfinished"/>
+        <translation>Transacció</translation>
     </message>
     <message>
         <source>Inputs</source>
-        <translation type="unfinished"/>
+        <translation>Entrades</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat</translation>
     </message>
     <message>
         <source>true</source>
-        <translation type="unfinished"/>
+        <translation>cert</translation>
     </message>
     <message>
         <source>false</source>
-        <translation type="unfinished"/>
+        <translation>fals</translation>
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
+        <translation>, encara no ha estat emès correctement</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Obre per %n bloc més</numerusform><numerusform>Obre per %n blocs més</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
-        <translation type="unfinished"/>
+        <translation>desconegut</translation>
     </message>
 </context>
 <context>
     <name>TransactionDescDialog</name>
     <message>
         <source>Transaction details</source>
-        <translation type="unfinished"/>
+        <translation>Detall de la transacció</translation>
     </message>
     <message>
         <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
+        <translation>Aquest panell mostra una descripció detallada de la transacció</translation>
     </message>
 </context>
 <context>
     <name>TransactionTableModel</name>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Type</source>
-        <translation type="unfinished"/>
+        <translation>Tipus</translation>
     </message>
     <message>
         <source>Address</source>
         <translation>Adreça</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
+        <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Obre per %n bloc més</numerusform><numerusform>Obre per %n blocs més</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
-        <translation type="unfinished"/>
+        <translation>Obert fins %1</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat (%1 confirmacions)</translation>
     </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
+        <translation>Aquest bloc no ha estat rebut per cap altre node i probablement no serà acceptat!</translation>
     </message>
     <message>
         <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
+        <translation>Generat però no acceptat</translation>
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Fora de línia</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Sense confirmar</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>En conflicte</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation type="unfinished"/>
+        <translation>Rebut amb</translation>
     </message>
     <message>
         <source>Received from</source>
-        <translation type="unfinished"/>
+        <translation>Rebut de</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation type="unfinished"/>
+        <translation>Enviat a</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
-        <translation type="unfinished"/>
+        <translation>Pagament a un mateix</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation type="unfinished"/>
+        <translation>Minat</translation>
     </message>
     <message>
         <source>(n/a)</source>
-        <translation type="unfinished"/>
+        <translation>(n/a)</translation>
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
+        <translation>Estat de la transacció. Desplaceu-vos sobre aquest camp per mostrar el nombre de confirmacions.</translation>
     </message>
     <message>
         <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
+        <translation>Data i hora en que la transacció va ser rebuda.</translation>
     </message>
     <message>
         <source>Type of transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Tipus de transacció.</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Adreça del destinatari de la transacció.</translation>
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
+        <translation>Import extret o afegit del balanç.</translation>
     </message>
 </context>
 <context>
     <name>TransactionView</name>
     <message>
         <source>All</source>
-        <translation type="unfinished"/>
+        <translation>Tot</translation>
     </message>
     <message>
         <source>Today</source>
-        <translation type="unfinished"/>
+        <translation>Avui</translation>
     </message>
     <message>
         <source>This week</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta setmana</translation>
     </message>
     <message>
         <source>This month</source>
-        <translation type="unfinished"/>
+        <translation>Aquest mes</translation>
     </message>
     <message>
         <source>Last month</source>
-        <translation type="unfinished"/>
+        <translation>El mes passat</translation>
     </message>
     <message>
         <source>This year</source>
-        <translation type="unfinished"/>
+        <translation>Enguany</translation>
     </message>
     <message>
         <source>Range...</source>
-        <translation type="unfinished"/>
+        <translation>Rang...</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation type="unfinished"/>
+        <translation>Rebut amb</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation type="unfinished"/>
+        <translation>Enviat a</translation>
     </message>
     <message>
         <source>To yourself</source>
-        <translation type="unfinished"/>
+        <translation>A un mateix</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation type="unfinished"/>
+        <translation>Minat</translation>
     </message>
     <message>
         <source>Other</source>
-        <translation type="unfinished"/>
+        <translation>Altres</translation>
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una adreça o una etiqueta per cercar</translation>
     </message>
     <message>
         <source>Min amount</source>
-        <translation type="unfinished"/>
+        <translation>Import mínim</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'adreça</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar etiqueta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>Copiar ID de transacció</translation>
     </message>
     <message>
         <source>Edit label</source>
-        <translation type="unfinished"/>
+        <translation>Editar etiqueta</translation>
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation type="unfinished"/>
+        <translation>Mostra detalls de la transacció</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>Exporta l'historial de transacció</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de desar l'historial de transacció a %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>Exportació amb èxit</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>L'historial de transaccions s'ha desat correctament a %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2498,15 +2493,15 @@ Address: %4
     </message>
     <message>
         <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat</translation>
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Type</source>
-        <translation type="unfinished"/>
+        <translation>Tipus</translation>
     </message>
     <message>
         <source>Label</source>
@@ -2516,153 +2511,132 @@ Address: %4
         <source>Address</source>
         <translation>Adreça</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>ID</source>
-        <translation type="unfinished"/>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Range:</source>
-        <translation type="unfinished"/>
+        <translation>Rang:</translation>
     </message>
     <message>
         <source>to</source>
-        <translation type="unfinished"/>
+        <translation>a</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha carregat cap moneder.</translation>
     </message>
 </context>
 <context>
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Còpia de seguretat del moneder</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
+        <translation>Dades del moneder (*.dat)</translation>
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la còpia de seguretat</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de desar les dades del moneder a %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'han desat les dades del moneder correctament a %1.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation type="unfinished"/>
+        <translation>La còpia de seguretat s'ha realitzat correctament</translation>
     </message>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions:</translation>
     </message>
     <message>
         <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
     </message>
     <message>
         <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation type="unfinished"/>
+        <translation>Especifica el directori de dades</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
+        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
+        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
+        <translation>Connecta al node per obtenir les adreces de les connexions, i desconnecta</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation type="unfinished"/>
+        <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Límit per a desconectar connexions errònies (per defecte: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Accepta la línia d'ordres i ordres JSON-RPC </translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
+        <translation>Executa en segon pla com a programa dimoni i accepta ordres</translation>
     </message>
     <message>
         <source>Use the test network</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza la xarxa de prova</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2674,695 +2648,586 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
-        <translation type="unfinished"/>
+        <translation>%s, heu de establir una contrasenya RPC al fitxer de configuració: %s
+Es recomana que useu la següent contrasenya aleatòria:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no necesiteu recordar aquesta contrasenya)
+El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
+Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
+També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
+per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
+        <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
+        <translation>Error: Aquesta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>En aquest mode -genproclimit controla quants blocs es generen immediatament.</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 type="unfinished"/>
+        <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot enllaçar %s a aquest ordinador. El Bitcoin Core probablement ja estigui executant-s'hi.</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagareu si envieu una transacció.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: la xarxa no sembla que hi estigui plenament d'acord. Alguns miners sembla que estan experimentant problemes.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: sembla que no estem plenament d'acord amb els nostres iguals! Podria caler que actualitzar l'aplicació, o potser que ho facin altres nodes.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: error en llegir el fitxer wallet.dat! Totes les claus es llegeixen correctament, però hi ha dades de transaccions o entrades de la llibreta d'adreces absents o bé son incorrectes.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: el fitxer wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; pot ser:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
     </message>
     <message>
         <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la creació de blocs:</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Connecta només al(s) node(s) especificats</translation>
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de connexió:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <translation>S'ha detectat una base de dades de blocs corrupta</translation>
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de depuració/proves:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>No carreguis el moneder i inhabilita les crides RPC del moneder</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <translation>Voleu reconstruir la base de dades de blocs ara?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <translation>Error carregant la base de dades de blocs</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <translation>Error inicialitzant l'entorn de la base de dades del moneder %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <translation>Error carregant la base de dades del bloc</translation>
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <translation>Error en obrir la base de dades de blocs</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <translation>Error: Espai al disc baix!</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
     <message>
         <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <translation>Error: error de sistema: </translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la lectura de la informació del bloc</translation>
     </message>
     <message>
         <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la lectura del bloc</translation>
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la escriptura de la informació de bloc</translation>
     </message>
     <message>
         <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura del bloc</translation>
     </message>
     <message>
         <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat el desfer de dades</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Força el mode segur (per defecte: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Genera monedes (per defecte: 0)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>S'està important...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha trobat el bloc de gènesi o és incorrecte. El directori de dades de la xarxa és incorrecte?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Adreça -onion no vàlida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: 1)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida de la memòria cau de la base de dades en megabytes (%d a %d, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>Estableix el nombre de fils per atendre trucades RPC (per defecte: 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan verificant els blocs...</translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>S'està verificant el moneder...</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>El moneder %s resideix fora del directori de dades %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de moneder:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <translation>Importa blocs de un fitxer blk000??.dat extern</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot obtenir un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estigui executant.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>Executa l'ordre quan es rebi un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Informació de la depuració de sortida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Informació</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida màxima del buffer de recepció per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Només accepta cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions del servidor RPC:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Descarta a l'atzar 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
     <message>
         <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <translation>Redueix el fitxer debug.log durant l'inici del client (per defecte: 1 quan no -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
     </message>
     <message>
         <source>System error: </source>
-        <translation type="unfinished"/>
+        <translation>Error de sistema: </translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <translation>Import de la transacció massa petit</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>Els imports de les transaccions han de ser positius</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <translation>La transacció és massa gran</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 1 quan s'escolta)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <translation>Nom d'usuari per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>Avís</translation>
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: aquesta versió està obsoleta. És necessari actualitzar-la!</translation>
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <translation>Se suprimeixen totes les transaccions del moneder...</translation>
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
+        <translation>a l'inici de l'aplicació</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
+        <translation>Contrasenya per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <translation>Executa l'ordre quan el millor bloc canviï (%s en cmd es reemplaça per un resum de bloc)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
+        <translation>Actualitza el moneder a l'últim format</translation>
     </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
     </message>
     <message>
         <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <translation>Clau privada del servidor (per defecte: server.pem)</translation>
     </message>
     <message>
         <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <translation>Aquest misatge d'ajuda</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <translation>Permet consultes DNS per a -addnode, -seednode i -connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan carregant les adreces...</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
+        <translation>Error en carregar wallet.dat: Moneder corrupte</translation>
     </message>
     <message>
         <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Error en carregar wallet.dat</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Adreça -proxy invalida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Invalid amount</source>
-        <translation type="unfinished"/>
+        <translation>Import no vàlid</translation>
     </message>
     <message>
         <source>Insufficient funds</source>
-        <translation type="unfinished"/>
+        <translation>Balanç insuficient</translation>
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation type="unfinished"/>
+        <translation>S'està carregant l'índex de blocs...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
+        <translation>Afegeix un node per a connectar-s'hi i intenta mantenir-hi la connexió oberta</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation type="unfinished"/>
+        <translation>S'està carregant el moneder...</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
+        <translation>No es pot reduir la versió del moneder</translation>
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>No es pot escriure l'adreça per defecte</translation>
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation type="unfinished"/>
+        <translation>S'està reescanejant...</translation>
     </message>
     <message>
         <source>Done loading</source>
-        <translation type="unfinished"/>
+        <translation>Ha acabat la càrrega</translation>
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza l'opció %s</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index b36d6b7d670b..0d43d95d2a23 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca@valencia" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ca@valencia" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -43,35 +11,35 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Nova</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copieu l&apos;adreça seleccionada al porta-retalls del sistema</translation>
+        <translation>Copieu l'adreça seleccionada al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Tanca</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia l'adreça</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Elimina l'adreça sel·leccionada actualment de la llista</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -79,460 +47,420 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Trieu una adreça on voleu enviar monedes</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Trieu l'adreça on voleu rebre monedes</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>T&amp;ria</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>S'estan enviant les adreces</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>S'estan rebent les adreces</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Estes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Estes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;etiqueta</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Edita</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Exporta la llista d'adreces</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer de separació amb comes (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
         <source>Label</source>
-        <translation type="unfinished"/>
+        <translation>Etiqueta</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation type="unfinished"/>
+        <translation>(sense etiqueta)</translation>
     </message>
 </context>
 <context>
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
+        <translation>Diàleg de contrasenya</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una contrasenya</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Nova contrasenya</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Repetiu la nova contrasenya</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
+        <translation>Encripta el moneder</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Esta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation type="unfinished"/>
+        <translation>Desbloqueja el moneder</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Esta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
+        <translation>Desencripta el moneder</translation>
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Canvia la contrasenya</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu tant la contrasenya antiga com la nova del moneder.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
+        <translation>Confirma l'encriptació del moneder</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
+        <translation>Esteu segur que voleu encriptar el vostre moneder?</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 type="unfinished"/>
+        <translation>IMPORTANT: Tota copia de seguretat que hàgeu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: Les lletres majúscules estan activades!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
+        <translation>Moneder encriptat</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin es tancarà ara per acabar el procés d'encriptació. Recordeu que encriptar el moneder no protegeix completament els bitcoins de ser robats per programari maliciós instal·lat a l'ordinador.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
+        <translation>L'encriptació del moneder ha fallat</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
+        <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
+        <translation>La contrasenya introduïda no coincideix.</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
+        <translation>El desbloqueig del moneder ha fallat</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
+        <translation>La desencriptació del moneder ha fallat</translation>
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <translation>La contrasenya del moneder ha estat modificada correctament.</translation>
     </message>
 </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
+        <translation>Signa el &amp;missatge...</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
+        <translation>S'està sincronitzant amb la xarxa ...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Panorama general</translation>
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Node</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
+        <translation>Mostra el panorama general del moneder</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Transaccions</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation type="unfinished"/>
+        <translation>Cerca a l'historial de transaccions</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation type="unfinished"/>
+        <translation>I&amp;x</translation>
     </message>
     <message>
         <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Ix de l'aplicació</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
+        <translation>Quant a &amp;Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <translation>Mostra informació sobre Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Opcions...</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Encripta el moneder...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Realitza una còpia de seguretat del moneder...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Canvia la contrasenya...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces d'e&amp;nviament...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces de &amp;recepció</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Obri un &amp;URI...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan important els blocs del disc...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan reindexant els blocs al disc...</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes a una adreça Bitcoin</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Modifica les opcions de configuració per bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <translation>Realitza una còpia de seguretat del moneder a una altra ubicació</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
+        <translation>Canvia la contrasenya d'encriptació del moneder</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Finestra de depuració</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <translation>Obri la consola de diagnòstic i depuració</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Verifica el missatge...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Moneder</translation>
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Envia</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Rep</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Mostra / Amaga</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <translation>Mostra o amaga la finestra principal</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <translation>Encripta les claus privades pertanyents al moneder</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <translation>Signa el missatges amb la seua adreça de Bitcoin per provar que les poseeixes</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>Verifiqueu els missatges per assegurar-vos que han estat signats amb una adreça Bitcoin específica.</translation>
     </message>
     <message>
         <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Fitxer</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Configuració</translation>
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Ajuda</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <translation>Barra d'eines de les pestanyes</translation>
     </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita pagaments (genera codis QR i bitcoin: URI)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Quant al Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces d'enviament i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces de recepció i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Obri una bitcoin: sol·licitud d'URI o pagament</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la &amp;línia d'ordes</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>Mostra el missatge d'ajuda del Bitcoin Core per obtindre una llista amb les possibles opcions de línia d'ordes de Bitcoin</translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>Proccessats %1 blocs del històric de transaccions.</translation>
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>%1 i %2</translation>
     </message>
     <message>
         <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <translation>%1 darrere</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <translation>El darrer bloc rebut ha estat generat fa %1.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <translation>Les transaccions a partir d'això no seran visibles.</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>Avís</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>Informació</translation>
     </message>
     <message>
         <source>Up to date</source>
-        <translation type="unfinished"/>
+        <translation>Al dia</translation>
     </message>
     <message>
         <source>Catching up...</source>
-        <translation type="unfinished"/>
+        <translation>S'està posant al dia ...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
-        <translation type="unfinished"/>
+        <translation>Transacció enviada</translation>
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation type="unfinished"/>
+        <translation>Transacció entrant</translation>
     </message>
     <message>
         <source>Date: %1
@@ -540,2129 +468,1975 @@ Amount: %2
 Type: %3
 Address: %4
 </source>
-        <translation type="unfinished"/>
+        <translation>Data: %1\nImport: %2\n Tipus: %3\n Adreça: %4\n</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;desbloquejat&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
         <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <translation>Alerta de xarxa</translation>
     </message>
 </context>
 <context>
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Selecció de l'adreça de control de monedes</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bytes:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Quota:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Canvi:</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(des)selecciona-ho tot</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>Mode arbre</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Mode llista</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>Confirmacions</translation>
     </message>
     <message>
         <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat</translation>
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation type="unfinished"/>
+        <translation>Copiar adreça </translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar etiqueta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>Copiar ID de transacció</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Bloqueja sense gastar</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Desbloqueja sense gastar</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>El més alt</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>Més alt</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>Alt</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>mig-alt</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>mig</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>baix-mig</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>baix</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>més baix</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>el més baix</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 bloquejada)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>sí</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>no</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Esta etiqueta es posa de color roig si la mida de la transacció és més gran de 1000 bytes.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>Això comporta una comissi d'almenys %1 per kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Pot variar +/- 1 byte per entrada.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Les transaccions amb una major prioritat són més propenses a ser incloses en un bloc.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Esta etiqueta es torna roja si la prioritat és menor que «mitjana».</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Esta etiqueta es torna roja si qualsevol destinatari rep un import inferior a %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation type="unfinished"/>
+        <translation>(sense etiqueta)</translation>
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>canvia de %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(canvia)</translation>
     </message>
 </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation type="unfinished"/>
+        <translation>Editar Adreça</translation>
     </message>
     <message>
         <source>&amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Etiqueta</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>L'etiqueta associada amb esta entrada de llista d'adreces</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça associada amb esta entrada de llista d'adreces. Només es pot modificar per a les adreces d'enviament.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Adreça</translation>
     </message>
     <message>
         <source>New receiving address</source>
-        <translation type="unfinished"/>
+        <translation>Nova adreça de recepció.</translation>
     </message>
     <message>
         <source>New sending address</source>
-        <translation type="unfinished"/>
+        <translation>Nova adreça d'enviament</translation>
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation type="unfinished"/>
+        <translation>Edita les adreces de recepció</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation type="unfinished"/>
+        <translation>Edita les adreces d'enviament</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha pogut desbloquejar el moneder.</translation>
     </message>
     <message>
         <source>New key generation failed.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la generació d'una nova clau.</translation>
     </message>
 </context>
 <context>
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Es crearà un nou directori de dades.</translation>
     </message>
     <message>
         <source>name</source>
-        <translation type="unfinished"/>
+        <translation>nom</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>El directori ja existeix. Afig %1 si vols crear un nou directori en esta ubicació.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>El camí ja existeix i no és cap directori.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot crear el directori de dades ací.</translation>
     </message>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>version</source>
-        <translation type="unfinished"/>
+        <translation>versió</translation>
+    </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Quant al Bitcoin Core</translation>
     </message>
     <message>
         <source>Usage:</source>
-        <translation type="unfinished"/>
+        <translation>Ús:</translation>
     </message>
     <message>
         <source>command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la línia d'ordes</translation>
     </message>
     <message>
         <source>UI options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions d'IU</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Defineix un idioma, per exemple "de_DE" (per defecte: preferències locals de sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
-        <translation type="unfinished"/>
+        <translation>Inicia minimitzat</translation>
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix certificats arrel SSL per a la sol·licitud de pagament (per defecte: -sistema-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la finestra de benvinguda a l'inici (per defecte: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Tria el directori de dades a l'inici (per defecte: 0)</translation>
     </message>
 </context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
-        <translation type="unfinished"/>
+        <translation>Vos donem la benviguda</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <translation>Vos donem la benvinguda al Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Atès que és la primera vegada que executeu el programa, podeu triar on emmagatzemarà el Bitcoin Core les dades.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>El Bitcoin Core descarregarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim s'emmagatzemaran %1 GB de dades en este directori, que seguiran creixent gradualment. També s'hi emmagatzemarà el moneder.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza el directori de dades per defecte</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un directori de dades personalitzat:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <translation>GB d'espai lliure disponible</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>(d' %1GB necessari)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>Obri un URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Obri una sol·licitud de pagament des d'un URI o un fitxer</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona un fitxer de sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona el fitxer de sol·licitud de pagament per obrir</translation>
     </message>
 </context>
 <context>
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions</translation>
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Principal</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
+        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
+        <translation>Paga &amp;comissió de transacció</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
+        <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Inicia el Bitcoin a l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>Mida de la memòria cau de la base de &amp;dades</translation>
     </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de fils de &amp;verificació d'scripts</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>Adreça IP del proxy (p. ex. IPv4: 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 type="unfinished"/>
+        <translation>URL de terceres parts (p. ex. explorador de blocs) que apareix en la pestanya de transaccions com elements del menú contextual. %s en l'URL es reemplaçat pel resum de la transacció. Diferents URL estan separades per una barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URL de transaccions de terceres parts</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de línies d'orde active que sobreescriuen les opcions de dalt:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
+        <translation>Reestableix totes les opcions del client.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Reestableix les opcions</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Xarxa</translation>
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = auto, &lt;0 = deixa tants nuclis lliures)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Moneder</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Expert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Activa les funcions de &amp;control de les monedes</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 type="unfinished"/>
+        <translation>Si inhabiliteu la despesa d'un canvi sense confirmar, el canvi d'una transacció no pot ser utilitzat fins que la transacció no tinga com a mínim una confirmació. Això també afecta com es calcula el vostre balanç.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Gasta el canvi sense confirmar</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 type="unfinished"/>
+        <translation>Obri el port del client de Bitcoin al router de forma automàtica. Això només funciona quan el router implementa UPnP i l'opció està activada.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
+        <translation>Port obert amb &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;IP del proxy:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Port:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
+        <translation>Port del proxy (per exemple 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Finestra</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
+        <translation>Mostra només la icona de la barra en minimitzar la finestra.</translation>
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Minimitza a la barra d'aplicacions en comptes de la barra de tasques</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 Quit in the menu.</source>
-        <translation type="unfinished"/>
+        <translation>Minimitza en comptes d'eixir de la aplicació al tancar la finestra. Quan esta opció està activa, la aplicació només es tancarà al seleccionar Eixir al menú.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
+        <translation>M&amp;inimitza en tancar</translation>
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Pantalla</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Llengua de la interfície d'usuari:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
+        <translation>Ací podeu definir la llengua de l'aplicació. Esta configuració tindrà efecte una vegada es reinicie Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Unitats per mostrar els imports en:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona la unitat de subdivisió per defecte per mostrar en la interfície quan s'envien monedes.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Si voleu mostrar les funcions de control de monedes o no.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation type="unfinished"/>
+        <translation>&amp;D'acord</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Cancel·la</translation>
     </message>
     <message>
         <source>default</source>
-        <translation type="unfinished"/>
+        <translation>Per defecte</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation type="unfinished"/>
+        <translation>Confirmeu el reestabliment de les opcions</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Cal reiniciar el client per activar els canvis.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>Es pararà el client, voleu procedir?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Amb este canvi cal un reinici del client.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça proxy introduïda és invalida.</translation>
     </message>
 </context>
 <context>
     <name>OverviewPage</name>
     <message>
         <source>Form</source>
-        <translation type="unfinished"/>
+        <translation>Formulari</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
+        <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establit connexió, però este proces no s'ha completat encara.</translation>
     </message>
     <message>
         <source>Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Moneder</translation>
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Disponible:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç que podeu gastar actualment</translation>
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Pendent:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Total de transaccions que encara han de confirmar-se i que encara no compten en el balanç que es pot gastar</translation>
     </message>
     <message>
         <source>Immature:</source>
-        <translation type="unfinished"/>
+        <translation>Immadur:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
+        <translation>Balanç minat que encara no ha madurat</translation>
     </message>
     <message>
         <source>Total:</source>
-        <translation type="unfinished"/>
+        <translation>Total:</translation>
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç total actual</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <translation>&lt;b&gt;Transaccions recents&lt;/b&gt;</translation>
     </message>
     <message>
         <source>out of sync</source>
-        <translation type="unfinished"/>
+        <translation>Fora de sincronia</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
-        <translation type="unfinished"/>
+        <translation>Gestió d'URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>Adreça de pagament no vàlida %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
     </message>
     <message>
         <source>Payment request error</source>
-        <translation type="unfinished"/>
+        <translation>Error en la sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot iniciar bitcoin: gestor clica-per-pagar</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
+        <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation type="unfinished"/>
+        <translation>Reemborsament de %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
+        <translation>Error en comunicar amb %1: %2</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
+        <translation>Mala resposta del servidor %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
+        <translation>Pagament reconegut</translation>
     </message>
     <message>
         <source>Network request error</source>
-        <translation type="unfinished"/>
+        <translation>Error en la sol·licitud de xarxa</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Import</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>N/D</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Guarda la imatge...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia la imatge</translation>
     </message>
     <message>
         <source>Save QR Code</source>
-        <translation type="unfinished"/>
+        <translation>Guarda el codi QR</translation>
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
+        <translation>Imatge PNG (*.png)</translation>
     </message>
 </context>
 <context>
     <name>RPCConsole</name>
     <message>
         <source>Client name</source>
-        <translation type="unfinished"/>
+        <translation>Nom del client</translation>
     </message>
     <message>
         <source>N/A</source>
-        <translation type="unfinished"/>
+        <translation>N/D</translation>
     </message>
     <message>
         <source>Client version</source>
-        <translation type="unfinished"/>
+        <translation>Versió del client</translation>
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Informació</translation>
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
+        <translation>Finestra de depuració</translation>
     </message>
     <message>
         <source>General</source>
-        <translation type="unfinished"/>
+        <translation>General</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
+        <translation>Utilitzant OpenSSL versió</translation>
     </message>
     <message>
         <source>Startup time</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Temps d'inici</translation>
     </message>
     <message>
         <source>Network</source>
-        <translation type="unfinished"/>
+        <translation>Xarxa</translation>
     </message>
     <message>
         <source>Name</source>
-        <translation type="unfinished"/>
+        <translation>Nom</translation>
     </message>
     <message>
         <source>Number of connections</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de connexions</translation>
     </message>
     <message>
         <source>Block chain</source>
-        <translation type="unfinished"/>
+        <translation>Cadena de blocs</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de blocs actuals</translation>
     </message>
     <message>
         <source>Last block time</source>
-        <translation type="unfinished"/>
+        <translation>Últim temps de bloc</translation>
     </message>
     <message>
         <source>&amp;Open</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Obri</translation>
     </message>
     <message>
         <source>&amp;Console</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Consola</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>Trà&amp;nsit de la xarxa</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>Nete&amp;ja</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
+        <translation>Totals</translation>
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>Dins:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Fora:</translation>
     </message>
     <message>
         <source>Build date</source>
-        <translation type="unfinished"/>
+        <translation>Data de compilació</translation>
     </message>
     <message>
         <source>Debug log file</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer de registre de depuració</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <translation>Obri el fitxer de registre de depuració de Bitcoin del directori de dades actual. Això pot trigar uns quants segons per a fitxers de registre grans.</translation>
     </message>
     <message>
         <source>Clear console</source>
-        <translation type="unfinished"/>
+        <translation>Neteja la consola</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <translation>Vos donem la benvinguda a la consola RPC de Bitcoin</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 type="unfinished"/>
+        <translation>Utilitza les fletxes d'amunt i avall per navegar per l'historial, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
+        <translation>Escriviu &lt;b&gt;help&lt;\b&gt; per a obtindre un llistat de les ordes disponibles.</translation>
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <translation>%1 GB</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Im&amp;port:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Missatge:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Reutilitza una de les adreces de recepció utilitzades anteriorment. La reutilització d'adreces pot comportar problemes de seguretat i privadesa. No ho utilitzeu llevat que torneu a generar una sol·licitud de pagament feta abans.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>R&amp;eutilitza una adreça de recepció anterior (no recomanat)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge opcional que s'adjuntarà a la sol·licitud de pagament, que es mostrarà quan s'òbriga la sol·licitud. Nota: El missatge no s'enviarà amb el pagament per la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Una etiqueta opcional que s'associarà amb la nova adreça receptora.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Utilitzeu este formulari per sol·licitar pagaments. Tots els camps són &lt;b&gt;opcionals&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Un import opcional per sol·licitar. Deixeu-ho en blanc o zero per no sol·licitar cap import específic.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps del formulari.</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation type="unfinished"/>
+        <translation>Neteja</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>Historial de pagaments sol·licitats</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la sol·licitud seleccionada (fa el mateix que el doble clic a una entrada)</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
+        <translation>Mostra</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Esborra les entrades seleccionades de la llista</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>Esborra</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar etiqueta</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Copia el missatge</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
         <source>QR Code</source>
-        <translation type="unfinished"/>
+        <translation>Codi QR</translation>
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'&amp;adreça</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Guarda la imatge...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita un pagament a %1</translation>
     </message>
     <message>
         <source>Payment information</source>
-        <translation type="unfinished"/>
+        <translation>Informació de pagament</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Label</source>
-        <translation type="unfinished"/>
+        <translation>Etiqueta</translation>
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
+        <translation>URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
+        <translation>Error en codificar l'URI en un codi QR.</translation>
     </message>
 </context>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Label</source>
-        <translation type="unfinished"/>
+        <translation>Etiqueta</translation>
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation type="unfinished"/>
+        <translation>(sense etiqueta)</translation>
     </message>
     <message>
         <source>(no message)</source>
-        <translation type="unfinished"/>
+        <translation>(sense missatge)</translation>
     </message>
     <message>
         <source>(no amount)</source>
-        <translation type="unfinished"/>
+        <translation>(sense import)</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>Característiques de control de les monedes</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
+        <translation>Entrades...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation type="unfinished"/>
+        <translation>seleccionat automàticament</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Fons insuficients!</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Quantitat:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bytes:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation type="unfinished"/>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritat:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Quota:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Canvi:</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 type="unfinished"/>
+        <translation>Si s'activa això, però l'adreça de canvi està buida o bé no és vàlida, el canvi s'enviarà a una adreça generada de nou.</translation>
     </message>
     <message>
         <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Personalitza l'adreça de canvi</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
+        <translation>Envia a múltiples destinataris al mateix temps</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
+        <translation>Afig &amp;destinatari</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps del formulari.</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>Balance:</source>
-        <translation type="unfinished"/>
+        <translation>Balanç:</translation>
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation type="unfinished"/>
+        <translation>Confirma l'acció d'enviament</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation type="unfinished"/>
+        <translation>E&amp;nvia</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation type="unfinished"/>
+        <translation>Confirma l'enviament de monedes</translation>
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 a %2</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Import total %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>o</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça de destinatari no és vàlida, per favor comprovi-la.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
+        <translation>L'import a pagar ha de ser major que 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
+        <translation>L'import supera el vostre balanç.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
+        <translation>El total excedeix el teu balanç quan s'afig la comisió a la transacció %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha trobat una adreça duplicada, tan sols es pot enviar a cada adreça un cop per orde d'enviament.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la creació de la transacció!</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha rebutjat la transacció! Això pot passar si alguna de les monedes del vostre moneder ja s'han gastat; per exemple, si heu fet servir una còpia de seguretat del fitxer wallet.dat i s'hagueren gastat monedes de la còpia però sense marcar-les-hi com a gastades.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça Bitcoin no vàlida</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation type="unfinished"/>
+        <translation>(sense etiqueta)</translation>
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça de canvi desconeguda</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
+        <translation>Esteu segur que ho voleu enviar?</translation>
     </message>
     <message>
         <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <translation>S'ha afegit una taxa de transacció</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
         <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
+        <translation>Q&amp;uantitat:</translation>
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Paga &amp;a:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una etiqueta per a esta adreça per afegir-la a la llibreta d'adreces</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Tria les adreces fetes servir amb anterioritat</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
+        <translation>Això és un pagament normal.</translation>
     </message>
     <message>
         <source>Alt+A</source>
-        <translation type="unfinished"/>
+        <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Apega l'adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
-        <translation type="unfinished"/>
+        <translation>Alt+P</translation>
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Elimina esta entrada</translation>
     </message>
     <message>
         <source>Message:</source>
-        <translation type="unfinished"/>
+        <translation>Missatge:</translation>
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Esta és una sol·licitud de pagament verificada.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una etiqueta per a esta adreça per afegir-la a la llista d'adreces utilitzades</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge que s'ha adjuntat al bitcoin: URI que s'emmagatzemarà amb la transacció per a la vostra referència. Nota: el missatge no s'enviarà a través de la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Esta és una sol·licitud de pagament no verificada.</translation>
     </message>
     <message>
         <source>Pay To:</source>
-        <translation type="unfinished"/>
+        <translation>Paga a:</translation>
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Memo:</translation>
     </message>
 </context>
 <context>
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>S'està parant el Bitcoin Core...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>No apagueu l'ordinador fins que no desaparegui esta finestra.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
+        <translation>Signatures - Signa / verifica un missatge</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Signa el missatge</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Podeu signar missatges amb la vostra adreça per provar que són vostres. Aneu amb compte no signar qualsevol cosa, ja que els atacs de pesca electrònica (phishing) poden provar de confondre-vos perquè els signeu amb la vostra identitat. Només signeu als documents completament detallats amb què hi esteu d'acord.</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <translation>Tria les adreces fetes servir amb anterioritat</translation>
     </message>
     <message>
         <source>Alt+A</source>
-        <translation type="unfinished"/>
+        <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Apega l'adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
-        <translation type="unfinished"/>
+        <translation>Alt+P</translation>
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu ací el missatge que voleu signar</translation>
     </message>
     <message>
         <source>Signature</source>
-        <translation type="unfinished"/>
+        <translation>Signatura</translation>
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Copia la signatura actual al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Signa el missatge per provar que ets propietari d'esta adreça Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>Signa el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps de clau</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Verifica el missatge</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <translation>Introduïsca l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Verificar el missatge per assegurar-se que ha estat signat amb una adreça Bitcoin específica</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
+        <translation>Verifica el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
+        <translation>Neteja tots els camps de verificació de missatge</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça introduïda no és vàlida.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça introduïda no referencia a cap clau.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
+        <translation>El desbloqueig del moneder ha estat cancelat.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <translation>La clau privada per a la adreça introduïda no està disponible.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura del missatge ha fallat.</translation>
     </message>
     <message>
         <source>Message signed.</source>
-        <translation type="unfinished"/>
+        <translation>Missatge signat.</translation>
     </message>
     <message>
         <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura no s'ha pogut descodificar.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
+        <translation>Comproveu la signatura i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
+        <translation>La signatura no coincideix amb el resum del missatge.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la verificació del missatge.</translation>
     </message>
     <message>
         <source>Message verified.</source>
-        <translation type="unfinished"/>
+        <translation>Missatge verificat.</translation>
     </message>
 </context>
 <context>
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Els desenvolupadors del Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
         <source>KB/s</source>
-        <translation type="unfinished"/>
+        <translation>KB/s</translation>
     </message>
 </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation type="unfinished"/>
+        <translation>Obert fins %1</translation>
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>en conflicte</translation>
     </message>
     <message>
         <source>%1/offline</source>
-        <translation type="unfinished"/>
+        <translation>%1/fora de línia</translation>
     </message>
     <message>
         <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>%1/sense confirmar</translation>
     </message>
     <message>
         <source>%1 confirmations</source>
-        <translation type="unfinished"/>
+        <translation>%1 confirmacions</translation>
     </message>
     <message>
         <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>Estat</translation>
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Source</source>
-        <translation type="unfinished"/>
+        <translation>Font</translation>
     </message>
     <message>
         <source>Generated</source>
-        <translation type="unfinished"/>
+        <translation>Generat</translation>
     </message>
     <message>
         <source>From</source>
-        <translation type="unfinished"/>
+        <translation>Des de</translation>
     </message>
     <message>
         <source>To</source>
-        <translation type="unfinished"/>
+        <translation>A</translation>
     </message>
     <message>
         <source>own address</source>
-        <translation type="unfinished"/>
+        <translation>Adreça pròpia</translation>
     </message>
     <message>
         <source>label</source>
-        <translation type="unfinished"/>
+        <translation>etiqueta</translation>
     </message>
     <message>
         <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>Crèdit</translation>
     </message>
     <message>
         <source>not accepted</source>
-        <translation type="unfinished"/>
+        <translation>no acceptat</translation>
     </message>
     <message>
         <source>Debit</source>
-        <translation type="unfinished"/>
+        <translation>Dèbit</translation>
     </message>
     <message>
         <source>Transaction fee</source>
-        <translation type="unfinished"/>
+        <translation>Comissió de transacció</translation>
     </message>
     <message>
         <source>Net amount</source>
-        <translation type="unfinished"/>
+        <translation>Import net</translation>
     </message>
     <message>
         <source>Message</source>
-        <translation type="unfinished"/>
+        <translation>Missatge</translation>
     </message>
     <message>
         <source>Comment</source>
-        <translation type="unfinished"/>
+        <translation>Comentar</translation>
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>ID de transacció</translation>
     </message>
     <message>
         <source>Merchant</source>
-        <translation type="unfinished"/>
+        <translation>Mercader</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu este bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
     </message>
     <message>
         <source>Debug information</source>
-        <translation type="unfinished"/>
+        <translation>Informació de depuració</translation>
     </message>
     <message>
         <source>Transaction</source>
-        <translation type="unfinished"/>
+        <translation>Transacció</translation>
     </message>
     <message>
         <source>Inputs</source>
-        <translation type="unfinished"/>
+        <translation>Entrades</translation>
     </message>
     <message>
         <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Import</translation>
     </message>
     <message>
         <source>true</source>
-        <translation type="unfinished"/>
+        <translation>cert</translation>
     </message>
     <message>
         <source>false</source>
-        <translation type="unfinished"/>
+        <translation>fals</translation>
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>, encara no ha estat emés correctement</translation>
     </message>
     <message>
         <source>unknown</source>
-        <translation type="unfinished"/>
+        <translation>desconegut</translation>
     </message>
 </context>
 <context>
     <name>TransactionDescDialog</name>
     <message>
         <source>Transaction details</source>
-        <translation type="unfinished"/>
+        <translation>Detall de la transacció</translation>
     </message>
     <message>
         <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
+        <translation>Este panell mostra una descripció detallada de la transacció</translation>
     </message>
 </context>
 <context>
     <name>TransactionTableModel</name>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Type</source>
-        <translation type="unfinished"/>
+        <translation>Tipus</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
     </message>
     <message>
         <source>Open until %1</source>
-        <translation type="unfinished"/>
+        <translation>Obert fins %1</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat (%1 confirmacions)</translation>
     </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
+        <translation>Este bloc no ha estat rebut per cap altre node i probablement no serà acceptat!</translation>
     </message>
     <message>
         <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
+        <translation>Generat però no acceptat</translation>
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Fora de línia</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Sense confirmar</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>En conflicte</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation type="unfinished"/>
+        <translation>Rebut amb</translation>
     </message>
     <message>
         <source>Received from</source>
-        <translation type="unfinished"/>
+        <translation>Rebut de</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation type="unfinished"/>
+        <translation>Enviat a</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
-        <translation type="unfinished"/>
+        <translation>Pagament a un mateix</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation type="unfinished"/>
+        <translation>Minat</translation>
     </message>
     <message>
         <source>(n/a)</source>
-        <translation type="unfinished"/>
+        <translation>(n/a)</translation>
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
+        <translation>Estat de la transacció. Desplaceu-vos sobre este camp per mostrar el nombre de confirmacions.</translation>
     </message>
     <message>
         <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
+        <translation>Data i hora en que la transacció va ser rebuda.</translation>
     </message>
     <message>
         <source>Type of transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Tipus de transacció.</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Adreça del destinatari de la transacció.</translation>
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
+        <translation>Import extret o afegit del balanç.</translation>
     </message>
 </context>
 <context>
     <name>TransactionView</name>
     <message>
         <source>All</source>
-        <translation type="unfinished"/>
+        <translation>Tot</translation>
     </message>
     <message>
         <source>Today</source>
-        <translation type="unfinished"/>
+        <translation>Hui</translation>
     </message>
     <message>
         <source>This week</source>
-        <translation type="unfinished"/>
+        <translation>Esta setmana</translation>
     </message>
     <message>
         <source>This month</source>
-        <translation type="unfinished"/>
+        <translation>Este mes</translation>
     </message>
     <message>
         <source>Last month</source>
-        <translation type="unfinished"/>
+        <translation>El mes passat</translation>
     </message>
     <message>
         <source>This year</source>
-        <translation type="unfinished"/>
+        <translation>Enguany</translation>
     </message>
     <message>
         <source>Range...</source>
-        <translation type="unfinished"/>
+        <translation>Rang...</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation type="unfinished"/>
+        <translation>Rebut amb</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation type="unfinished"/>
+        <translation>Enviat a</translation>
     </message>
     <message>
         <source>To yourself</source>
-        <translation type="unfinished"/>
+        <translation>A un mateix</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation type="unfinished"/>
+        <translation>Minat</translation>
     </message>
     <message>
         <source>Other</source>
-        <translation type="unfinished"/>
+        <translation>Altres</translation>
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una adreça o una etiqueta per cercar</translation>
     </message>
     <message>
         <source>Min amount</source>
-        <translation type="unfinished"/>
+        <translation>Import mínim</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation type="unfinished"/>
+        <translation>Copiar adreça </translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar etiqueta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <translation>Copiar ID de transacció</translation>
     </message>
     <message>
         <source>Edit label</source>
-        <translation type="unfinished"/>
+        <translation>Editar etiqueta</translation>
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation type="unfinished"/>
+        <translation>Mostra detalls de la transacció</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>Exporta l'historial de transacció</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de guardar l'historial de transacció a %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>Exportació amb èxit</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>L'historial de transaccions s'ha guardat correctament a %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer de separació amb comes (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <translation>Confirmat</translation>
     </message>
     <message>
         <source>Date</source>
-        <translation type="unfinished"/>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Type</source>
-        <translation type="unfinished"/>
+        <translation>Tipus</translation>
     </message>
     <message>
         <source>Label</source>
-        <translation type="unfinished"/>
+        <translation>Etiqueta</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>ID</source>
-        <translation type="unfinished"/>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Range:</source>
-        <translation type="unfinished"/>
+        <translation>Rang:</translation>
     </message>
     <message>
         <source>to</source>
-        <translation type="unfinished"/>
+        <translation>a</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha carregat cap moneder.</translation>
     </message>
 </context>
 <context>
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>Envia monedes</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Còpia de seguretat del moneder</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
+        <translation>Dades del moneder (*.dat)</translation>
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la còpia de seguretat</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de guardar les dades del moneder a %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'han guardat les dades del moneder correctament a %1.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation type="unfinished"/>
+        <translation>La còpia de seguretat s'ha realitzat correctament</translation>
     </message>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions:</translation>
     </message>
     <message>
         <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
     </message>
     <message>
         <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation type="unfinished"/>
+        <translation>Especifica el directori de dades</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
+        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
+        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
+        <translation>Connecta al node per obtindre les adreces de les connexions, i desconnecta</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation type="unfinished"/>
+        <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Límit per a desconectar connexions errònies (per defecte: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Accepta la línia d'ordes i ordes JSON-RPC </translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
+        <translation>Executa en segon pla com a programa dimoni i accepta ordes</translation>
     </message>
     <message>
         <source>Use the test network</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza la xarxa de prova</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2674,695 +2448,586 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
-        <translation type="unfinished"/>
+        <translation>%s, heu d'establir una contrasenya RPC al fitxer de configuració: %s
+Es recomana que useu la següent contrasenya aleatòria:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no necesiteu recordar esta contrasenya)
+El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
+Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
+També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
+per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
+        <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'hagueren gastat monedes de la copia però sense marcar com gastades en este.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
+        <translation>Error: Esta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Executa una orde quan una transacció del moneder canvie (%s en cmd es canvia per TxID)</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>En este mode -genproclimit controla quants blocs es generen immediatament.</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 type="unfinished"/>
+        <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
+        <translation>Esta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot enllaçar %s a este ordinador. El Bitcoin Core probablement ja estiga executant-s'hi.</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: el -paytxfee és molt elevat! Esta és la comissió de transacció que pagareu si envieu una transacció.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: la xarxa no pareix que hi estiga plenament d'acord. Alguns miners pareix que estan experimentant problemes.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: pareix que no estem plenament d'acord amb els nostres iguals! Podria caldre que actualitzar l'aplicació, o potser que ho facen altres nodes.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: error en llegir el fitxer wallet.dat! Totes les claus es lligen correctament, però hi ha dades de transaccions o entrades de la llibreta d'adreces absents o bé son incorrectes.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: el fitxer wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat guardat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; pot ser:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
     </message>
     <message>
         <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la creació de blocs:</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Connecta només al(s) node(s) especificats</translation>
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de connexió:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <translation>S'ha detectat una base de dades de blocs corrupta</translation>
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de depuració/proves:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>No carreguis el moneder i inhabilita les crides RPC del moneder</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <translation>Voleu reconstruir la base de dades de blocs ara?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <translation>Error carregant la base de dades de blocs</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <translation>Error inicialitzant l'entorn de la base de dades del moneder %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <translation>Error carregant la base de dades del bloc</translation>
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <translation>Error en obrir la base de dades de blocs</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <translation>Error: Espai al disc baix!</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
     <message>
         <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <translation>Error: error de sistema: </translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la lectura de la informació del bloc</translation>
     </message>
     <message>
         <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la lectura del bloc</translation>
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la escriptura de la informació de bloc</translation>
     </message>
     <message>
         <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura del bloc</translation>
     </message>
     <message>
         <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat el desfer de dades</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Força el mode segur (per defecte: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Genera monedes (per defecte: 0)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>S'està important...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha trobat el bloc de gènesi o és incorrecte. El directori de dades de la xarxa és incorrecte?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Adreça -onion no vàlida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Posa davant de l'eixida de depuració una marca horària (per defecte: 1)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida de la memòria cau de la base de dades en megabytes (%d a %d, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <translation>Estableix el nombre de fils per atendre trucades RPC (per defecte: 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <translation>Això s'així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan verificant els blocs...</translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>S'està verificant el moneder...</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>El moneder %s resideix fora del directori de dades %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de moneder:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <translation>Importa blocs d'un fitxer blk000??.dat extern</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot obtindre un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estiga executant.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>Executa l'orde quan es reba un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Informació de la depuració d'eixida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation type="unfinished"/>
+        <translation>Informació</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida màxima del buffer de recepció per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Només accepta cadenes de blocs que coincidisquen amb els punts de prova (per defecte: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions del servidor RPC:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Descarta a l'atzar 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
     <message>
         <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <translation>Redueix el fitxer debug.log durant l'inici del client (per defecte: 1 quan no -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
     </message>
     <message>
         <source>System error: </source>
-        <translation type="unfinished"/>
+        <translation>Error de sistema: </translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <translation>Import de la transacció massa petit</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>Els imports de les transaccions han de ser positius</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <translation>La transacció és massa gran</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 1 quan s'escolta)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <translation>Nom d'usuari per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>Avís</translation>
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <translation>Avís: esta versió està obsoleta. És necessari actualitzar-la!</translation>
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <translation>Se suprimeixen totes les transaccions del moneder...</translation>
     </message>
     <message>
         <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
+        <translation>a l'inici de l'aplicació</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
+        <translation>Contrasenya per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <translation>Executa l'orde quan el millor bloc canvie (%s en cmd es reemplaça per un resum de bloc)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
+        <translation>Actualitza el moneder a l'últim format</translation>
     </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
     </message>
     <message>
         <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <translation>Clau privada del servidor (per defecte: server.pem)</translation>
     </message>
     <message>
         <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <translation>Este misatge d'ajuda</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <translation>Permet consultes DNS per a -addnode, -seednode i -connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation type="unfinished"/>
+        <translation>S'estan carregant les adreces...</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
+        <translation>Error en carregar wallet.dat: Moneder corrupte</translation>
     </message>
     <message>
         <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Error en carregar wallet.dat</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Adreça -proxy invalida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Invalid amount</source>
-        <translation type="unfinished"/>
+        <translation>Import no vàlid</translation>
     </message>
     <message>
         <source>Insufficient funds</source>
-        <translation type="unfinished"/>
+        <translation>Balanç insuficient</translation>
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation type="unfinished"/>
+        <translation>S'està carregant l'índex de blocs...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
+        <translation>Afig un node per a connectar-s'hi i intenta mantindre-hi la connexió oberta</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation type="unfinished"/>
+        <translation>S'està carregant el moneder...</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
+        <translation>No es pot reduir la versió del moneder</translation>
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>No es pot escriure l'adreça per defecte</translation>
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation type="unfinished"/>
+        <translation>S'està reescanejant...</translation>
     </message>
     <message>
         <source>Done loading</source>
-        <translation type="unfinished"/>
+        <translation>Ha acabat la càrrega</translation>
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza l'opció %s</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 5bf7fbfba721..f3b2b4a9266f 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1,133 +1,101 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Sobre el Nucli de Bitcoin</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>\n Aquest és software experimental.\n\n Distribuït sota llicència de software MIT/11, veure l&apos;arxiu COPYING o http://www.opensource.org/licenses/mit-license.php.\n\nAquest producte inclou software desarrollat pel projecte OpenSSL per a l&apos;ús de OppenSSL Toolkit (http://www.openssl.org/) i de softwqre criptogràfic escrit per l&apos;Eric Young (eay@cryptsoft.com) i software UPnP escrit per en Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ca_ES" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Feu doble clic per editar l&apos;adreça o l&apos;etiqueta</translation>
+        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Crear una nova adreça</translation>
+        <translation>Crea una nova adreça</translation>
     </message>
     <message>
         <source>&amp;New</source>
-        <translation>&amp;Nou</translation>
+        <translation>&amp;Nova</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copiar l&apos;adreça seleccionada al porta-retalls del sistema</translation>
+        <translation>Copia l'adreça seleccionada al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation>&amp;Copiar</translation>
+        <translation>&amp;Copia</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Tanca</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>&amp;Copiar adreça</translation>
+        <translation>&amp;Copia l'adreça</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>Esborrar l&apos;adreça sel·leccionada</translation>
+        <translation>Elimina l'adreça sel·leccionada actualment de la llista</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exportar les dades de la pestanya actual a un arxiu</translation>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Exportar</translation>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>&amp;Esborrar</translation>
+        <translation>&amp;Elimina</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Escull una adreça a la qual enviar coins</translation>
+        <translation>Trieu una adreça on voleu enviar monedes</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Escull l&apos;adreça a la quals vols rebre coins</translation>
+        <translation>Trieu l'adreça on voleu rebre monedes</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>T&amp;ria</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Enviant adreces</translation>
+        <translation>S'estan enviant les adreces</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation>Rebent adreces</translation>
+        <translation>S'estan rebent les adreces</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Aquestes són la seva adreça de Bitcoin per enviar els pagaments. Sempre revisi la quantitat i l&apos;adreça del destinatari abans transferència de monedes.</translation>
+        <translation>Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Copiar &amp;Etiqueta</translation>
+        <translation>Copia l'&amp;etiqueta</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation>&amp;Editar</translation>
+        <translation>&amp;Edita</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation>Exportar la llista d&apos;adre</translation>
+        <translation>Exporta la llista d'adreces</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Arxiu de separació per comes (*.csv)</translation>
+        <translation>Fitxer de separació amb comes (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar.</translation>
     </message>
 </context>
 <context>
@@ -149,11 +117,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Dialeg de contrasenya</translation>
+        <translation>Diàleg de contrasenya</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>Introdueix contrasenya</translation>
+        <translation>Introduïu una contrasenya</translation>
     </message>
     <message>
         <source>New passphrase</source>
@@ -161,19 +129,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Repeteix la nova contrasenya</translation>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introdueixi la nova contrasenya al moneder&lt;br/&gt;Si us plau useu una contrasenya de &lt;b&gt;10 o més caracters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+        <translation>Repetiu la nova contrasenya</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Xifrar la cartera</translation>
+        <translation>Encripta el moneder</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Aquesta operació requereix la seva contrasenya del moneder per a desbloquejar-lo.</translation>
+        <translation>Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -181,7 +145,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Aquesta operació requereix la seva contrasenya del moneder per a desencriptar-lo.</translation>
+        <translation>Aquesta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -189,19 +153,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation>Canviar la contrasenya</translation>
+        <translation>Canvia la contrasenya</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Introdueixi tant l&apos;antiga com la nova contrasenya de moneder.</translation>
+        <translation>Introduïu tant la contrasenya antiga com la nova del moneder.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>Confirmar l&apos;encriptació del moneder</translation>
+        <translation>Confirma l'encriptació del moneder</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Advertència: Si encripteu el vostre moneder i perdeu la constrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
+        <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -209,27 +173,31 @@ This product includes software developed by the OpenSSL Project for use in the O
     </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: Tota copia de seguretat que hagis realitzat hauria de ser reemplaçada pel, recentment generat, arxiu encriptat del moneder.</translation>
+        <translation>IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>Advertència: Les lletres majúscules estàn activades!</translation>
+        <translation>Avís: Les lletres majúscules estan activades!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Moneder encriptat</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin es tancarà ara per acabar el procés d&apos;encriptació. Recorda que encriptar el teu moneder no protegeix completament els teus bitcoins de ser robades per programari maliciós instal·lat al teu ordinador.</translation>
+        <translation>Bitcoin es tancarà ara per acabar el procés d'encriptació. Recordeu que encriptar el moneder no protegeix completament els bitcoins de ser robats per programari maliciós instal·lat a l'ordinador.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
-        <translation>L&apos;encriptació del moneder ha fallat</translation>
+        <translation>L'encriptació del moneder ha fallat</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>L&apos;encriptació del moneder ha fallat per un error intern. El seu moneder no ha estat encriptat.</translation>
+        <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -241,7 +209,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecte.</translation>
+        <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
@@ -256,11 +224,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>Signar &amp;missatge...</translation>
+        <translation>Signa el &amp;missatge...</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>Sincronitzant amb la xarxa ...</translation>
+        <translation>S'està sincronitzant amb la xarxa ...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
@@ -272,7 +240,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>Mostra panorama general del moneder</translation>
+        <translation>Mostra el panorama general del moneder</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -280,23 +248,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>Cerca a l&apos;historial de transaccions</translation>
+        <translation>Cerca a l'historial de transaccions</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation>S&amp;ortir</translation>
+        <translation>S&amp;urt</translation>
     </message>
     <message>
         <source>Quit application</source>
-        <translation>Sortir de l&apos;aplicació</translation>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostra informació sobre Bitcoin</translation>
+        <translation>Surt de l'aplicació</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation>Sobre &amp;Qt</translation>
+        <translation>Quant a &amp;Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
@@ -308,63 +272,67 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>&amp;Xifrar moneder</translation>
+        <translation>&amp;Encripta el moneder...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Realitzant copia de seguretat del moneder...</translation>
+        <translation>&amp;Realitza una còpia de seguretat del moneder...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>&amp;Canviar contrasenya...</translation>
+        <translation>&amp;Canvia la contrasenya...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces d'e&amp;nviament...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Adreces de &amp;recepció</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Obre un &amp;URI...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Client del Bitcoin Core</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation>Important blocs del disc..</translation>
+        <translation>S'estan important els blocs del disc...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation>Re-indexant blocs al disc...</translation>
+        <translation>S'estan reindexant els blocs al disc...</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation>Enviar monedes a una adreça Bitcoin</translation>
+        <translation>Envia monedes a una adreça Bitcoin</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation>Modificar les opcions de configuració per bitcoin</translation>
+        <translation>Modifica les opcions de configuració per bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation>Realitzar còpia de seguretat del moneder a un altre directori</translation>
+        <translation>Realitza una còpia de seguretat del moneder a una altra ubicació</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Canviar la constrasenya d&apos;encriptació del moneder</translation>
+        <translation>Canvia la contrasenya d'encriptació del moneder</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>&amp;Finestra de debug</translation>
+        <translation>&amp;Finestra de depuració</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation>Obrir la consola de diagnòstic i debugging</translation>
+        <translation>Obre la consola de diagnòstic i depuració</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>&amp;Verifica el missatge..</translation>
+        <translation>&amp;Verifica el missatge...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -376,23 +344,27 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation>&amp;Enviar</translation>
+        <translation>&amp;Envia</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>&amp;Rebre</translation>
+        <translation>&amp;Rep</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostra informació del Bitcoin Core</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation>&amp;Mostrar / Amagar</translation>
+        <translation>&amp;Mostra / Amaga</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation>Mostrar o amagar la finestra principal</translation>
+        <translation>Mostra o amaga la finestra principal</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Xifrar les claus privades pertanyents al seu moneder</translation>
+        <translation>Encripta les claus privades pertanyents al moneder</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
@@ -400,11 +372,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Verificar els missatges per assegurar-te que han estat signades amb una adreça Bitcoin específica.</translation>
+        <translation>Verifiqueu els missatges per assegurar-vos que han estat signats amb una adreça Bitcoin específica.</translation>
     </message>
     <message>
         <source>&amp;File</source>
-        <translation>&amp;Arxiu</translation>
+        <translation>&amp;Fitxer</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
@@ -416,7 +388,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Barra d&apos;eines de seccions</translation>
+        <translation>Barra d'eines de les pestanyes</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -428,35 +400,31 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita pagaments (genera codis QR i bitcoin: URI)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Quant al Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces d'enviament i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la llista d'adreces de recepció i etiquetes utilitzades</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>Obre una bitcoin: sol·licitud d'URI o pagament</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de la &amp;línia d'ordres</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Client Bitcoin</translation>
+        <translation>Mostra el missatge d'ajuda del Bitcoin Core per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -464,11 +432,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Processat el %1 de %2 (estimat) dels blocs del històric de transaccions.</translation>
+        <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
@@ -488,23 +452,23 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 i %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n any</numerusform><numerusform>%n anys</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
-        <translation>%1 radera</translation>
+        <translation>%1 darrere</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation>Lúltim bloc rebut ha estat generat fa %1.</translation>
+        <translation>El darrer bloc rebut ha estat generat fa %1.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>Les transaccions a partir d&apos;això no seràn visibles.</translation>
+        <translation>Les transaccions a partir d'això no seran visibles.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -524,7 +488,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>Posar-se al dia ...</translation>
+        <translation>S'està posant al dia ...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -540,7 +504,7 @@ Amount: %2
 Type: %3
 Address: %4
 </source>
-        <translation>Data: %1\nQuantitat %2\n Tipus: %3\n Adreça: %4\n</translation>
+        <translation>Data: %1\nImport: %2\n Tipus: %3\n Adreça: %4\n</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
@@ -550,10 +514,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ha tingut lloc un error fatal. Bitcoin no pot continuar executant-se de manera segura i es tancará.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -566,7 +526,7 @@ Address: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Selecció de l'adreça de control de monedes</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -578,7 +538,7 @@ Address: %4
     </message>
     <message>
         <source>Amount:</source>
-        <translation>Quantitat:</translation>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
@@ -589,8 +549,8 @@ Address: %4
         <translation>Quota:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -602,7 +562,7 @@ Address: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>(des)selecciona-ho tot</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -646,7 +606,7 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar quantitat</translation>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
@@ -654,39 +614,39 @@ Address: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Bloqueja sense gastar</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Desbloqueja sense gastar</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>highest</source>
@@ -726,19 +686,19 @@ Address: %4
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 bloquejada)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Pols</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Pot variar +/- %1 satoshi(s) per entrada.</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation>si</translation>
+        <translation>sí</translation>
     </message>
     <message>
         <source>no</source>
@@ -750,35 +710,23 @@ Address: %4
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>Això comporta una comissi d'almenys %1 per kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Pot variar +/- 1 byte per entrada.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Les transaccions amb una major prioritat són més propenses a ser incloses en un bloc.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Aquesta etiqueta es torna vermella si la prioritat és menor que «mitjana».</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta etiqueta es torna vermella si qualsevol destinatari rep un import inferior a %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -786,11 +734,11 @@ Address: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>canvia de %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation>(canviar)</translation>
+        <translation>(canvia)</translation>
     </message>
 </context>
 <context>
@@ -805,15 +753,15 @@ Address: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>L'etiqueta associada amb aquesta entrada de llista d'adreces</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>L'adreça associada amb aquesta entrada de llista d'adreces. Només es pot modificar per a les adreces d'enviament.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
-        <translation>&amp;Direcció</translation>
+        <translation>&amp;Adreça</translation>
     </message>
     <message>
         <source>New receiving address</source>
@@ -821,38 +769,38 @@ Address: %4
     </message>
     <message>
         <source>New sending address</source>
-        <translation>Nova adreça d&apos;enviament</translation>
+        <translation>Nova adreça d'enviament</translation>
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation>Editar adreces de recepció</translation>
+        <translation>Edita les adreces de recepció</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation>Editar adreces d&apos;enviament</translation>
+        <translation>Edita les adreces d'enviament</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>L&apos;adreça introduïda &quot;%1&quot; ja és present a la llibreta d&apos;adreces.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>L&apos;adreça introduida &quot;%1&quot; no és una adreça Bitcoin valida.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
-        <translation>No s&apos;ha pogut desbloquejar el moneder.</translation>
+        <translation>No s'ha pogut desbloquejar el moneder.</translation>
     </message>
     <message>
         <source>New key generation failed.</source>
-        <translation>Ha fallat la generació d&apos;una nova clau.</translation>
+        <translation>Ha fallat la generació d'una nova clau.</translation>
     </message>
 </context>
 <context>
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Es crearà un nou directori de dades.</translation>
     </message>
     <message>
         <source>name</source>
@@ -864,19 +812,15 @@ Address: %4
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>El camí ja existeix i no és cap directori.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot crear el directori de dades aquí.</translation>
     </message>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Nucli de Bitcoin</translation>
@@ -885,72 +829,84 @@ Address: %4
         <source>version</source>
         <translation>versió</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Quant al Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opcions de línia d'ordres</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Ús:</translation>
     </message>
     <message>
         <source>command-line options</source>
-        <translation>Opcions de la línia d&apos;ordres</translation>
+        <translation>Opcions de la línia d'ordres</translation>
     </message>
     <message>
         <source>UI options</source>
         <translation>Opcions de IU</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Definir llenguatge, per exemple &quot;de_DE&quot; (per defecte: Preferències locals de sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Defineix un idioma, per exemple "de_DE" (per defecte: preferències locals de sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
-        <translation>Iniciar minimitzat</translation>
+        <translation>Inicia minimitzat</translation>
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix certificats arrel SSL per a la sol·licitud de pagament (per defecte: -sistema-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>Mostrar finestra de benvinguda a l&apos;inici (per defecte: 1)</translation>
+        <translation>Mostra la finestra de benvinguda a l'inici (per defecte: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Tria el directori de dades a l'inici (per defecte: 0)</translation>
     </message>
 </context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
-        <translation>Benvingut</translation>
+        <translation>Us donem la benviguda</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation>Benvingut a Bitcoin Core.</translation>
+        <translation>Us donem la benvinguda al Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Atès que és la primera vegada que executeu el programa, podeu triar on emmagatzemarà el Bitcoin Core les dades.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>El Bitcoin Core descarregarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim s'emmagatzemaran %1 GB de dades en aquest directori, que seguiran creixent gradualment. També s'hi emmagatzemarà el moneder.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza el directori de dades per defecte</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un directori de dades personalitzat:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Error: el directori de dades «%1» especificat no pot ser creat.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -958,22 +914,22 @@ Address: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation>GB d&apos;espai lliure disponible</translation>
+        <translation>GB d'espai lliure disponible</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation>(d&apos; %1GB necessari)</translation>
+        <translation>(d' %1GB necessari)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>Obre un URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Obre una sol·licitud de pagament des d'un URI o un fitxer</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -981,11 +937,11 @@ Address: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona un fitxer de sol·licitud de pagament</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Selecciona el fitxer de sol·licitud de pagament per obrir</translation>
     </message>
 </context>
 <context>
@@ -1000,23 +956,23 @@ Address: %4
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
+        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation>Pagar &amp;comisió de transacció</translation>
+        <translation>Paga &amp;comissió de transacció</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Iniciar automàticament Bitcoin després de l&apos;inici de sessió del sistema.</translation>
+        <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Iniciar Bitcoin al inici de sessió del sistema.</translation>
+        <translation>&amp;Inicia el Bitcoin a l'inici de sessió del sistema.</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <translation>Mida de la memòria cau de la base de &amp;dades</translation>
     </message>
     <message>
         <source>MB</source>
@@ -1024,39 +980,47 @@ Address: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Nombre de fils de &amp;verificació d'scripts</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accepta connexions de fora</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permet connexions entrants</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <translation>Adreça IP del proxy (p. ex. IPv4: 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 type="unfinished"/>
+        <translation>URL de terceres parts (p. ex. explorador de blocs) que apareix en la pestanya de transaccions com elements del menú contextual. %s en l'URL es reemplaçat pel resum de la transacció. Diferents URL estan separades per una barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URL de transaccions de terceres parts</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de línies d'ordre active que sobreescriuen les opcions de dalt:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation>Reestablir totes les opcions del client.</translation>
+        <translation>Reestableix totes les opcions del client.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation>&amp;Reestablir Opcions</translation>
+        <translation>&amp;Reestableix les opcions</translation>
     </message>
     <message>
         <source>&amp;Network</source>
@@ -1064,31 +1028,31 @@ Address: %4
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
+        <translation>(0 = auto, &lt;0 = deixa tants nuclis lliures)</translation>
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Moneder</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
+        <translation>Expert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Activa les funcions de &amp;control de les monedes</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 type="unfinished"/>
+        <translation>Si inhabiliteu la despesa d'un canvi sense confirmar, el canvi d'una transacció no pot ser utilitzat fins que la transacció no tingui com a mínim una confirmació. Això també afecta com es calcula el vostre balanç.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Gasta el canvi sense confirmar</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>Obrir el port del client de Bitcoin al router de forma automàtica. Això només funciona quan el teu router implementa UPnP i l&apos;opció està activada.</translation>
+        <translation>Obre el port del client de Bitcoin al router de forma automàtica. Això només funciona quan el router implementa UPnP i l'opció està activada.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
@@ -1106,25 +1070,17 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port del proxy (per exemple 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Versió de SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versió SOCKS del proxy (per exemple 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Finestra</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
-        <translation>Mostrar només l&apos;icona de la barra al minimitzar l&apos;aplicació.</translation>
+        <translation>Mostra només la icona de la barra en minimitzar la finestra.</translation>
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>&amp;Minimitzar a la barra d&apos;aplicacions</translation>
+        <translation>&amp;Minimitza a la barra d'aplicacions en comptes de la barra de tasques</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 Quit in the menu.</source>
@@ -1132,7 +1088,7 @@ Address: %4
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation>M&amp;inimitzar al tancar</translation>
+        <translation>M&amp;inimitza en tancar</translation>
     </message>
     <message>
         <source>&amp;Display</source>
@@ -1140,35 +1096,27 @@ Address: %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>Llenguatge de la Interfície d&apos;Usuari:</translation>
+        <translation>&amp;Llengua de la interfície d'usuari:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>Aquí pots definir el llenguatge de l&apos;aplicatiu. Aquesta configuració tindrà efecte un cop es reiniciï Bitcoin.</translation>
+        <translation>Aquí podeu definir la llengua de l'aplicació. Aquesta configuració tindrà efecte una vegada es reiniciï Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation>&amp;Unitats per mostrar les quantitats en:</translation>
+        <translation>&amp;Unitats per mostrar els imports en:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Sel·lecciona la unitat de subdivisió per defecte per mostrar en la interficie quan s&apos;envien monedes.</translation>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Mostrar adreces Bitcoin als llistats de transaccions o no.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Mostrar adreces al llistat de transaccions</translation>
+        <translation>Selecciona la unitat de subdivisió per defecte per mostrar en la interfície quan s'envien monedes.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Si voleu mostrar les funcions de control de monedes o no.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation>&amp;OK</translation>
+        <translation>&amp;D'acord</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
@@ -1180,27 +1128,27 @@ Address: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>cap</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation>Confirmi el reestabliment de les opcions</translation>
+        <translation>Confirmeu el reestabliment de les opcions</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Cal reiniciar el client per activar els canvis.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>S'aturarà el client, voleu procedir?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Amb aquest canvi cal un reinici del client.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>L&apos;adreça proxy introduïda és invalida.</translation>
+        <translation>L'adreça proxy introduïda és invalida.</translation>
     </message>
 </context>
 <context>
@@ -1211,31 +1159,35 @@ Address: %4
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s&apos;ha establert connexió, però aquest proces no s&apos;ha completat encara.</translation>
+        <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establert connexió, però aquest proces no s'ha completat encara.</translation>
     </message>
     <message>
         <source>Wallet</source>
         <translation>Moneder</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Només lectura:</translation>
+    </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Disponible:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç que podeu gastar actualment</translation>
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Pendent:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
+        <translation>Total de transaccions que encara han de confirmar-se i que encara no compten en el balanç que es pot gastar</translation>
     </message>
     <message>
         <source>Immature:</source>
-        <translation>Immatur:</translation>
+        <translation>Immadur:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
@@ -1247,7 +1199,23 @@ Address: %4
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation type="unfinished"/>
+        <translation>El balanç total actual</translation>
+    </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>El vostre balanç actual en adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transaccions sense confirmar a adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Balanç minat en adreces de només lectura que encara no ha madurat</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Balanç total actual en adreces de només lectura</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
@@ -1262,15 +1230,31 @@ Address: %4
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
-        <translation>Manejant URI</translation>
+        <translation>Gestió d'URI</translation>
+    </message>
+    <message>
+        <source>Invalid payment address %1</source>
+        <translation>Adreça de pagament no vàlida %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>La sol·licitud de pagament s'ha rebutjat</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>la URI no pot ser processada! Això es pot ser causat per una adreça Bitcoin invalida o paràmetres URI malformats.</translation>
+        <source>Payment request has expired.</source>
+        <translation>La sol·licitud de pagament ha caducat.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>La sol·licitud de pagament no està inicialitzada.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1278,31 +1262,27 @@ Address: %4
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>No es pot iniciar bitcoin: manejador clicla-per-pagar</translation>
+        <translation>No es pot iniciar bitcoin: gestor clica-per-pagar</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
     </message>
     <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation type="unfinished"/>
+        <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1310,65 +1290,100 @@ Address: %4
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
+        <translation>Error en comunicar amb %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
+        <source>Payment request cannot be parsed!</source>
+        <translation>No es pot analitzar la sol·licitud de pagament!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
+        <translation>Mala resposta del servidor %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation>Pagament notificat</translation>
+        <translation>Pagament reconegut</translation>
     </message>
     <message>
         <source>Network request error</source>
         <translation>Error en la sol·licitud de xarxa</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adreça / nom de l'ordinador</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Quantitat</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Introduïu una adreça de Bitcoin (p. ex. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: El directori de dades específiques &quot;%1! no existeix.</translation>
+        <source>NETWORK</source>
+        <translation>XARXA</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>UNKNOWN</source>
+        <translation>DESCONEGUT</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>None</source>
+        <translation>Cap</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introdueixi una adreça de Bitcoin (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>De&amp;sa la imatge...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copia la imatge</translation>
     </message>
     <message>
         <source>Save QR Code</source>
-        <translation>Desar codi QR</translation>
+        <translation>Desa el codi QR</translation>
     </message>
     <message>
         <source>PNG Image (*.png)</source>
@@ -1395,7 +1410,7 @@ Address: %4
     </message>
     <message>
         <source>Debug window</source>
-        <translation>Depura finestra</translation>
+        <translation>Finestra de depuració</translation>
     </message>
     <message>
         <source>General</source>
@@ -1405,9 +1420,13 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>Utilitzant OpenSSL versió</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Utilitzant BerkeleyDB versió</translation>
+    </message>
     <message>
         <source>Startup time</source>
-        <translation>&amp;Temps d&apos;inici</translation>
+        <translation>&amp;Temps d'inici</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1423,15 +1442,83 @@ Address: %4
     </message>
     <message>
         <source>Block chain</source>
-        <translation>Bloquejar cadena</translation>
+        <translation>Cadena de blocs</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
         <translation>Nombre de blocs actuals</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Total estimat de blocs</translation>
+        <source>Received</source>
+        <translation>Rebut</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviat</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Iguals</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Seleccioneu un igual per mostrar informació detallada.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direcció</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versió</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Serveis</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Node de sincronització</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Alçada inicial</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Sincronitza l'alçada</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Puntuació de bandeig</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Temps de connexió</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Darrer enviament</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Darrera recepció</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes enviats</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes rebuts</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1439,7 +1526,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Open</source>
-        <translation>&amp;Obrir</translation>
+        <translation>&amp;Obre</translation>
     </message>
     <message>
         <source>&amp;Console</source>
@@ -1447,11 +1534,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <translation>Trà&amp;nsit de la xarxa</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>Nete&amp;ja</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1471,27 +1558,27 @@ Address: %4
     </message>
     <message>
         <source>Debug log file</source>
-        <translation>Dietàri de debug</translation>
+        <translation>Fitxer de registre de depuració</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Obrir el dietari de debug de Bitcoin del directori de dades actual. Aixó pot trigar uns quants segons per a dietàris grossos.</translation>
+        <translation>Obre el fitxer de registre de depuració de Bitcoin del directori de dades actual. Això pot trigar uns quants segons per a fitxers de registre grans.</translation>
     </message>
     <message>
         <source>Clear console</source>
-        <translation>Netejar consola</translation>
+        <translation>Neteja la consola</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Benvingut a la consola RPC de Bitcoin</translation>
+        <translation>Us donem la benvinguda a la consola RPC de Bitcoin</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>Utilitza les fletxes d&apos;amunt i avall per navegar per l&apos;històric, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
+        <translation>Utilitza les fletxes d'amunt i avall per navegar per l'historial, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Escriu &lt;b&gt;help&lt;\b&gt; per a obtenir una llistat de les ordres disponibles.</translation>
+        <translation>Escriviu &lt;b&gt;help&lt;\b&gt; per a obtenir un llistat de les ordres disponibles.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -1510,23 +1597,43 @@ Address: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>a través de %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>never</source>
+        <translation>mai</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrant</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Sortint</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>Yes</source>
+        <translation>Sí</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>No</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconegut</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>S'està obtenint...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation>&amp;Quantitat:</translation>
+        <translation>Im&amp;port:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1538,27 +1645,27 @@ Address: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Reutilitza una de les adreces de recepció utilitzades anteriorment. La reutilització d'adreces pot comportar problemes de seguretat i privadesa. No ho utilitzeu llevat que torneu a generar una sol·licitud de pagament feta abans.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>R&amp;eutilitza una adreça de recepció anterior (no recomanat)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge opcional que s'adjuntarà a la sol·licitud de pagament, que es mostrarà quan s'obri la sol·licitud. Nota: El missatge no s'enviarà amb el pagament per la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Una etiqueta opcional que s'associarà amb la nova adreça receptora.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Utilitzeu aquest formulari per sol·licitar pagaments. Tots els camps són &lt;b&gt;opcionals&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Un import opcional per sol·licitar. Deixeu-ho en blanc o zero per no sol·licitar cap import específic.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
@@ -1566,11 +1673,11 @@ Address: %4
     </message>
     <message>
         <source>Clear</source>
-        <translation>Esborra</translation>
+        <translation>Neteja</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>Historial de pagaments sol·licitats</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
@@ -1578,7 +1685,7 @@ Address: %4
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra la sol·licitud seleccionada (fa el mateix que el doble clic a una entrada)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -1594,38 +1701,38 @@ Address: %4
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Copiar etiqueta</translation>
+        <translation>Copia l'etiqueta</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Copia el missatge</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar quantitat</translation>
+        <translation>Copia l'import</translation>
     </message>
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
         <source>QR Code</source>
-        <translation> Codi QR</translation>
+        <translation>Codi QR</translation>
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Copiar &amp;URI</translation>
+        <translation>Copia l'&amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>Copiar &amp;Adress</translation>
+        <translation>Copia l'&amp;adreça</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>De&amp;sa la imatge...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>Sol·licita un pagament a %1</translation>
     </message>
     <message>
         <source>Payment information</source>
@@ -1641,7 +1748,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Label</source>
@@ -1657,7 +1764,7 @@ Address: %4
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Error codificant la URI en un codi QR.</translation>
+        <translation>Error en codificar l'URI en un codi QR.</translation>
     </message>
 </context>
 <context>
@@ -1676,7 +1783,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1688,30 +1795,30 @@ Address: %4
     </message>
     <message>
         <source>(no amount)</source>
-        <translation type="unfinished"/>
+        <translation>(sense import)</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation>Enviar monedes</translation>
+        <translation>Envia monedes</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation>(Opcions del control del Coin)</translation>
+        <translation>Característiques de control de les monedes</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation>Entrades</translation>
+        <translation>Entrades...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation>Seleccionat automàticament</translation>
+        <translation>seleccionat automàticament</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation>Fons insuficient</translation>
+        <translation>Fons insuficients!</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -1723,7 +1830,7 @@ Address: %4
     </message>
     <message>
         <source>Amount:</source>
-        <translation>Quantitat:</translation>
+        <translation>Import:</translation>
     </message>
     <message>
         <source>Priority:</source>
@@ -1731,11 +1838,7 @@ Address: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Quota:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Comissió:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -1747,27 +1850,31 @@ Address: %4
     </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 type="unfinished"/>
+        <translation>Si s'activa això, però l'adreça de canvi està buida o bé no és vàlida, el canvi s'enviarà a una adreça generada de nou.</translation>
     </message>
     <message>
         <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Personalitza l'adreça de canvi</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation>Enviar a multiples destinataris al mateix temps</translation>
+        <translation>Envia a múltiples destinataris al mateix temps</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation>Affegir &amp;Destinatari</translation>
+        <translation>Afegeix &amp;destinatari</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Netejar tots els camps del formulari.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Esborrar &amp;Tot</translation>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>Balance:</source>
@@ -1775,55 +1882,51 @@ Address: %4
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation>Confirmi l&apos;acció d&apos;enviament</translation>
+        <translation>Confirma l'acció d'enviament</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation>E&amp;nviar</translation>
+        <translation>E&amp;nvia</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation>Confirmar l&apos;enviament de monedes</translation>
+        <translation>Confirma l'enviament de monedes</translation>
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 a %2</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Copia la quantitat</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar quantitat</translation>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissi</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Copia la comissió posterior</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Copia els bytes</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Copia la prioritat</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Copia el canvi</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Import total %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
@@ -1831,35 +1934,35 @@ Address: %4
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation>L&apos;adreça remetent no és vàlida, si us plau comprovi-la.</translation>
+        <translation>L'adreça de destinatari no és vàlida, si us plau comprovi-la.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>La quantitat a pagar ha de ser major que 0.</translation>
+        <translation>L'import a pagar ha de ser major que 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation>Import superi el saldo de la seva compte.</translation>
+        <translation>L'import supera el vostre balanç.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>El total excedeix el teu balanç quan s&apos;afegeix la comisió a la transacció %1.</translation>
+        <translation>El total excedeix el teu balanç quan s'afegeix la comisió a la transacció %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>S&apos;ha trobat una adreça duplicada, tan sols es pot enviar a cada adreça un cop per ordre de enviament.</translation>
+        <translation>S'ha trobat una adreça duplicada, tan sols es pot enviar a cada adreça un cop per ordre de enviament.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la creació de la transacció!</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha rebutjat la transacció! Això pot passar si alguna de les monedes del vostre moneder ja s'han gastat; per exemple, si heu fet servir una còpia de seguretat del fitxer wallet.dat i s'haguessin gastat monedes de la còpia però sense marcar-les-hi com a gastades.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça Bitcoin no vàlida</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1867,23 +1970,19 @@ Address: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
+        <translation>Avís: adreça de canvi desconeguda</translation>
     </message>
     <message>
-        <source>Are you sure you want to send?</source>
-        <translation>Estàs segur que ho vols enviar?</translation>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
     </message>
     <message>
-        <source>added as transaction fee</source>
-        <translation>S&apos;ha afegit una taxa de transacció</translation>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>La sol·licitud de pagament ha caducat</translation>
+        <source>Are you sure you want to send?</source>
+        <translation>Esteu segur que ho voleu enviar?</translation>
     </message>
     <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <source>added as transaction fee</source>
+        <translation>S'ha afegit una taxa de transacció</translation>
     </message>
 </context>
 <context>
@@ -1894,15 +1993,11 @@ Address: %4
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation>Pagar &amp;A:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreça a on envia el pagament (per exemple: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Paga &amp;a:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation>Introdueixi una etiquera per a aquesta adreça per afegir-la a la llibreta d&apos;adreces</translation>
+        <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llibreta d'adreces</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1914,7 +2009,11 @@ Address: %4
     </message>
     <message>
         <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
+        <translation>Això és un pagament normal.</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>L'adreça Bitcoin on enviar el pagament</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1930,7 +2029,7 @@ Address: %4
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Elimina aquesta entrada</translation>
     </message>
     <message>
         <source>Message:</source>
@@ -1938,19 +2037,19 @@ Address: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta és una sol·licitud de pagament verificada.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llista d'adreces utilitzades</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Un missatge que s'ha adjuntat al bitcoin: URI que s'emmagatzemarà amb la transacció per a la vostra referència. Nota: el missatge no s'enviarà a través de la xarxa Bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <translation>Aquesta és una sol·licitud de pagament no verificada.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -1958,49 +2057,49 @@ Address: %4
     </message>
     <message>
         <source>Memo:</source>
-        <translation type="unfinished"/>
+        <translation>Memo:</translation>
     </message>
 </context>
 <context>
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>S'està aturant el Bitcoin Core...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <translation>No apagueu l'ordinador fins que no desaparegui aquesta finestra.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation>Signatures .Signar/Verificar un Missatge</translation>
+        <translation>Signatures - Signa / verifica un missatge</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>&amp;Signar Missatge</translation>
+        <translation>&amp;Signa el missatge</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Pots signar missatges amb la teva adreça per provar que són teus. Sigues cautelòs al signar qualsevol cosa, ja que els atacs phising poden intentar confondre&apos;t per a que els hi signis amb la teva identitat. Tan sols signa als documents completament detallats amb els que hi estàs d&apos;acord.</translation>
+        <translation>Podeu signar missatges amb la vostra adreça per provar que són vostres. Aneu amb compte no signar qualsevol cosa, ja que els atacs de pesca electrònica (phishing) poden provar de confondre-us perquè els signeu amb la vostra identitat. Només signeu als documents completament detallats amb què hi esteu d'acord.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreça amb la que signat els missatges (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>L'adreça Bitcoin amb què signar el missatge</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>Escull adreces fetes servir amb anterioritat</translation>
+        <translation>Tria les adreces fetes servir amb anterioritat</translation>
     </message>
     <message>
         <source>Alt+A</source>
-        <translation>Alta+A</translation>
+        <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Enganxar adreça del porta-retalls</translation>
+        <translation>Enganxa l'adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -2008,7 +2107,7 @@ Address: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation>Introdueix aqui el missatge que vols signar</translation>
+        <translation>Introduïu aquí el missatge que voleu signar</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -2016,15 +2115,15 @@ Address: %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>Copiar la signatura actual al porta-retalls del sistema</translation>
+        <translation>Copia la signatura actual al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>Signa el missatge per provar que ets propietari d&apos;aquesta adreça Bitcoin</translation>
+        <translation>Signa el missatge per provar que ets propietari d'aquesta adreça Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation>Signar &amp;Missatge</translation>
+        <translation>Signa el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
@@ -2032,19 +2131,19 @@ Address: %4
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Esborrar &amp;Tot</translation>
+        <translation>Neteja-ho &amp;tot</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation>&amp;Verificar el missatge</translation>
+        <translation>&amp;Verifica el missatge</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Introdueixi l&apos;adreça signant, missatge (assegura&apos;t que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
+        <translation>Introdueixi l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreça amb el que el missatge va ser signat (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>L'adreça Bitcoin amb què va ser signat el missatge</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2052,31 +2151,27 @@ Address: %4
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation>Verificar &amp;Missatge</translation>
+        <translation>Verifica el &amp;missatge</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
         <translation>Neteja tots els camps de verificació de missatge</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introdueixi una adreça de Bitcoin (per exemple 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Clica &quot;Signar Missatge&quot; per a generar una signatura</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation>L&apos;adreça intoduïda és invàlida.</translation>
+        <translation>L'adreça introduïda no és vàlida.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Siu us plau, comprovi l&apos;adreça i provi de nou.</translation>
+        <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation>L&apos;adreça introduïda no referencia a cap clau.</translation>
+        <translation>L'adreça introduïda no referencia a cap clau.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
@@ -2088,7 +2183,7 @@ Address: %4
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation>El signat del missatge ha fallat.</translation>
+        <translation>La signatura del missatge ha fallat.</translation>
     </message>
     <message>
         <source>Message signed.</source>
@@ -2096,11 +2191,11 @@ Address: %4
     </message>
     <message>
         <source>The signature could not be decoded.</source>
-        <translation>La signatura no s&apos;ha pogut decodificar .</translation>
+        <translation>La signatura no s'ha pogut descodificar.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation>Su us plau, comprovi la signatura i provi de nou.</translation>
+        <translation>Comproveu la signatura i torneu-ho a provar.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
@@ -2119,15 +2214,15 @@ Address: %4
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Nucli de Bitcoin</translation>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>Els desenvolupadors del Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
@@ -2145,11 +2240,11 @@ Address: %4
     </message>
     <message>
         <source>conflicted</source>
-        <translation type="unfinished"/>
+        <translation>en conflicte</translation>
     </message>
     <message>
         <source>%1/offline</source>
-        <translation>%1/offline</translation>
+        <translation>%1/fora de línia</translation>
     </message>
     <message>
         <source>%1/unconfirmed</source>
@@ -2157,7 +2252,7 @@ Address: %4
     </message>
     <message>
         <source>%1 confirmations</source>
-        <translation>%1 confrimacions</translation>
+        <translation>%1 confirmacions</translation>
     </message>
     <message>
         <source>Status</source>
@@ -2191,6 +2286,10 @@ Address: %4
         <source>own address</source>
         <translation>Adreça pròpia</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etiqueta</translation>
@@ -2211,13 +2310,21 @@ Address: %4
         <source>Debit</source>
         <translation>Dèbit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Dèbit total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Crèdit total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Comissió de transacció</translation>
     </message>
     <message>
         <source>Net amount</source>
-        <translation>Quantitat neta</translation>
+        <translation>Import net</translation>
     </message>
     <message>
         <source>Message</source>
@@ -2236,12 +2343,12 @@ Address: %4
         <translation>Mercader</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu aquest bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
     </message>
     <message>
         <source>Debug information</source>
-        <translation>Informació de debug</translation>
+        <translation>Informació de depuració</translation>
     </message>
     <message>
         <source>Transaction</source>
@@ -2299,15 +2406,11 @@ Address: %4
     </message>
     <message>
         <source>Address</source>
-        <translation>Direcció</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
+        <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2331,19 +2434,19 @@ Address: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
+        <translation>Fora de línia</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation type="unfinished"/>
+        <translation>Sense confirmar</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
+        <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
     </message>
     <message>
         <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>En conflicte</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2371,7 +2474,7 @@ Address: %4
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Estat de la transacció. Desplaça&apos;t per aquí sobre per mostrar el nombre de confirmacions.</translation>
+        <translation>Estat de la transacció. Desplaceu-vos sobre aquest camp per mostrar el nombre de confirmacions.</translation>
     </message>
     <message>
         <source>Date and time that the transaction was received.</source>
@@ -2387,7 +2490,7 @@ Address: %4
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
-        <translation>Quantitat extreta o afegida del balanç.</translation>
+        <translation>Import extret o afegit del balanç.</translation>
     </message>
 </context>
 <context>
@@ -2430,7 +2533,7 @@ Address: %4
     </message>
     <message>
         <source>To yourself</source>
-        <translation>A tu mateix</translation>
+        <translation>A un mateix</translation>
     </message>
     <message>
         <source>Mined</source>
@@ -2442,15 +2545,15 @@ Address: %4
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation>Introdueix una adreça o una etiqueta per cercar</translation>
+        <translation>Introduïu una adreça o una etiqueta per cercar</translation>
     </message>
     <message>
         <source>Min amount</source>
-        <translation>Quantitat mínima</translation>
+        <translation>Import mínim</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Copiar adreça </translation>
+        <translation>Copia l'adreça</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -2458,7 +2561,7 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar quantitat</translation>
+        <translation>Copia l'import</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
@@ -2474,27 +2577,27 @@ Address: %4
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation type="unfinished"/>
+        <translation>Exporta l'historial de transacció</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>L'exportació ha fallat</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de desar l'historial de transacció a %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <translation>Exportació amb èxit</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>L'historial de transaccions s'ha desat correctament a %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Arxiu de separació per comes (*.csv)</translation>
+        <translation>Fitxer separat per comes (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2514,11 +2617,7 @@ Address: %4
     </message>
     <message>
         <source>Address</source>
-        <translation>Direcció</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Adreça</translation>
     </message>
     <message>
         <source>ID</source>
@@ -2533,33 +2632,40 @@ Address: %4
         <translation>a</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unitat en què mostrar els imports. Feu clic per seleccionar una altra unitat.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha carregat cap moneder.</translation>
     </message>
 </context>
 <context>
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation>Enviar monedes</translation>
+        <translation>Envia monedes</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Exportar</translation>
+        <translation>&amp;Exporta</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exportar les dades de la pestanya actual a un arxiu</translation>
+        <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation>Realitzar còpia de seguretat del moneder</translation>
+        <translation>Còpia de seguretat del moneder</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
@@ -2567,66 +2673,54 @@ Address: %4
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation>Còpia de seguretat faillida</translation>
+        <translation>Ha fallat la còpia de seguretat</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'ha produït un error en provar de desar les dades del moneder a %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>S'han desat les dades del moneder correctament a %1.</translation>
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation>Copia de seguretat realitzada correctament</translation>
+        <translation>La còpia de seguretat s'ha realitzat correctament</translation>
     </message>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Ús:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Llista d&apos;ordres</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Obtenir ajuda per a un ordre.</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opcions:</translation>
     </message>
     <message>
         <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especificat arxiu de configuració (per defecte: bitcoin.conf)</translation>
+        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
     </message>
     <message>
         <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especificar arxiu pid (per defecte: bitcoind.pid)</translation>
+        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation>Especificar directori de dades</translation>
+        <translation>Especifica el directori de dades</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escoltar connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
+        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantenir com a molt &lt;n&gt; connexions a peers (per defecte: 125)</translation>
+        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Connectar al node per obtenir les adreces de les connexions, i desconectar</translation>
+        <translation>Connecta al node per obtenir les adreces de les connexions, i desconnecta</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation>Especificar la teva adreça pública</translation>
+        <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
@@ -2636,33 +2730,25 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ha sorgit un error al configurar el port RPC %u escoltant a IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escoltar connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
+        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>Acceptar línia d&apos;ordres i ordres JSON-RPC </translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
+        <translation>Accepta la línia d'ordres i ordres JSON-RPC </translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation>Executar en segon pla com a programa dimoni i acceptar ordres</translation>
+        <translation>Executa en segon pla com a programa dimoni i accepta ordres</translation>
     </message>
     <message>
         <source>Use the test network</source>
-        <translation>Usar la xarxa de prova</translation>
+        <translation>Utilitza la xarxa de prova</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Aceptar connexions d&apos;afora (per defecte: 1 si no -proxy o -connect)</translation>
+        <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2674,73 +2760,70 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
-        <translation>%s has de establir una contrasenya RPC a l&apos;arxiu de configuració:\n%s\nEs recomana que useu la següent constrasenya aleatòria:\nrpcuser=bitcoinrpc\nrpcpassword=%s\n(no necesiteu recordar aquesta contrsenya)\nEl nom d&apos;usuari i contrasenya NO HAN de ser els mateixos.\nSi l&apos;arxiu no existeix, crea&apos;l amb els permisos d&apos;arxiu de només lectura per al propietari.\nTambé es recomana establir la notificació d&apos;alertes i així seràs notificat de les incidències;\nper exemple: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translation>
+        <translation>%s, heu de establir una contrasenya RPC al fitxer de configuració: %s
+Es recomana que useu la següent contrasenya aleatòria:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no necesiteu recordar aquesta contrasenya)
+El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
+Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
+També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
+per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ha sorgit un error al configurar el port RPC %u escoltant a IPv6, retrocedint a IPv4: %s</translation>
+        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Vincular a una adreça específica i sempre escoltar-hi. Utilitza la notació [host]:port per IPv6</translation>
+        <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s&apos;han gastat, com si haguesis usat una copia de l&apos;arxiu wallet.dat i s&apos;haguessin gastat monedes de la copia però sense marcar com gastades en aquest.</translation>
+        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: Aquesta transacció requereix una comissió d&apos;almenys %s degut al seu import, complexitat o per l&apos;ús de fons recentment rebuts!</translation>
+        <translation>Error: Aquesta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Executar una ordre quan una transacció del moneder canviï (%s in cmd es canvia per TxID)</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
+        <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
+        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>En aquest mode -genproclimit controla quants blocs es generen immediatament.</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 type="unfinished"/>
+        <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
@@ -2748,103 +2831,83 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot enllaçar %s a aquest ordinador. El Bitcoin Core probablement ja estigui executant-s'hi.</translation>
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Advertència: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagaràs quan enviis una transacció.</translation>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Advertència: Si us plau comprovi que la data i hora del seu computador siguin correctes! Si el seu rellotge està mal configurat, Bitcoin no funcionará de manera apropiada.</translation>
+        <translation>Avís: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagareu si envieu una transacció.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: la xarxa no sembla que hi estigui plenament d'acord. Alguns miners sembla que estan experimentant problemes.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Avís: sembla que no estem plenament d'acord amb els nostres iguals! Podria caler que actualitzar l'aplicació, o potser que ho facin altres nodes.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Advertència: Error llegint l&apos;arxiu wallet.dat!! Totes les claus es llegeixen correctament, però hi ha dades de transaccions o entrades del llibre d&apos;adreces absents o bé son incorrectes.</translation>
+        <translation>Avís: error en llegir el fitxer wallet.dat! Totes les claus es llegeixen correctament, però hi ha dades de transaccions o entrades de la llibreta d'adreces absents o bé son incorrectes.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Advertència: L&apos;arxiu wallet.dat és corrupte, dades rescatades! L&apos;arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
+        <translation>Avís: el fitxer wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(per defecte: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; pot ser:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation>Intentar recuperar les claus privades d&apos;un arxiu wallet.dat corrupte</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
     </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opcions de la creació de blocs:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Connectar només al(s) node(s) especificats</translation>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <translation>Connecta només al(s) node(s) especificats</translation>
     </message>
     <message>
         <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de connexió:</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation>S&apos;ha detectat una base de dades de blocs corrupta</translation>
+        <translation>S'ha detectat una base de dades de blocs corrupta</translation>
     </message>
     <message>
         <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de depuració/proves:</translation>
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Descobrir la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
+        <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>No carreguis el moneder i inhabilita les crides RPC del moneder</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation>Vols reconstruir la base de dades de blocs ara?</translation>
+        <translation>Voleu reconstruir la base de dades de blocs ara?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
@@ -2852,7 +2915,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Error inicialitzant l&apos;entorn de la base de dades del moneder %s!</translation>
+        <translation>Error inicialitzant l'entorn de la base de dades del moneder %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2860,7 +2923,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation>Error obrint la base de dades de blocs</translation>
+        <translation>Error en obrir la base de dades de blocs</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
@@ -2868,15 +2931,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: El moneder està blocat, no és possible crear la transacció!</translation>
+        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
     <message>
         <source>Error: system error: </source>
-        <translation>Error: error de sistema:</translation>
+        <translation>Error: error de sistema: </translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Error al escoltar a qualsevol port. Utilitza -listen=0 si vols això.</translation>
+        <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
@@ -2888,11 +2951,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation>Ha fallat la sincronització de l&apos;índex de bloc</translation>
+        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation>Ha fallat la escriptura de l&apos;índex de blocs</translation>
+        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
@@ -2900,91 +2963,71 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to write block</source>
-        <translation>Ha fallat l&apos;escriptura del bloc</translation>
+        <translation>Ha fallat l'escriptura del bloc</translation>
     </message>
     <message>
         <source>Failed to write file info</source>
-        <translation>Ha fallat l&apos;escriptura de l&apos;arxiu info</translation>
+        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation>Ha fallat l&apos;escriptura de la basse de dades de monedes</translation>
+        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation>Ha fallat l&apos;escriptura de l&apos;índex de transaccions</translation>
+        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
         <translation>Ha fallat el desfer de dades</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Cerca punts de connexió usant rastreig de DNS (per defecte: 1 tret d&apos;usar -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Força el mode segur (per defecte: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
-        <translation>Generar monedes (estàndard: 0)</translation>
+        <translation>Genera monedes (per defecte: 0)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quants blocs s&apos;han de confirmar a l&apos;inici (per defecte: 288, 0 = tots)</translation>
+        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
     </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>S'està important...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <translation>No s'ha trobat el bloc de gènesi o és incorrecte. El directori de dades de la xarxa és incorrecte?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Adreça -onion no vàlida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: 1)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Reconstruir l&apos;índex de la cadena de blocs dels arxius actuals blk000??.dat</translation>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida de la memòria cau de la base de dades en megabytes (%d a %d, per defecte: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
@@ -2992,91 +3035,187 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Especifica un arxiu de moneder (dintre del directori de les dades)</translation>
+        <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Atura l'execució després d'importar blocs del disc (per defecte: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
-        <translation>Verificant blocs...</translation>
+        <translation>S'estan verificant els blocs...</translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
-        <translation>Verificant moneder...</translation>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <translation>S'està verificant el moneder...</translation>
     </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>El moneder %s resideix fora del directori de dades %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Opcions de moneder:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocs de un fitxer blk000??.dat extern</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(per defecte: 1, 1 = mantingues les metadades de les tx, p. ex., el propietari del compte i la informació de sol·licitud de pagament, 2 = descarta les metadades de tx) </translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar aquesta opció moltes vegades</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Vincula l'adreça donada i posa a la llista blanca els iguals que s'hi connectin. Feu servir la notació [host]:port per a IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Vincula a l'adreça donada per a escoltar les connexions JSON-RPC. Feu servir la notació [host]:port per a IPv6. Aquesta opció pot ser especificada moltes vegades (per defecte: vincula a totes les interfícies)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>No es pot obtenir un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estigui executant.</translation>
+    </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: s'ha trobat un argument no permès de -socks. Ja no es pot definir més la versió de SOCKS, només s'accepten els proxies de SOCKS5.ç</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Executa l'ordre quan una tx de xarxa gasta de nou una tx d'entrada del moneder (%s=torna a gastar TxID, %t=TxID del moneder)</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <translation>Executa l'ordre quan es rebi un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la transmissió (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Si no s'ha definit paytxfee, inclou comissió suficient per tal que les transaccions siguin confirmades dins d'una mitja de n blocs (per defecte: 1)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Informació de la depuració de sortida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</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>Avís: comproveu que la data i hora del vostre ordinador siguin correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Posa en la llista blanca els iguals que es connectin de la màscara de xarxa o ip donada. Es pot especificar moltes vegades.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Consulta sempre adreces d'iguals a través de consultes DNS (per defecte: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connecta a través del proxy SOCKS5</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Els desenvolupadors del Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>No s'ha pogut analitzar el valor -rpcbind %s com una adreça de xarxa</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Error en carregar wallet.dat: el moneder requereix una versió més nova del Bitcoin core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: s'ha trobat un argument -tor no acceptat. Feu servir -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Comissió en (BTC/kB) per afegir a les transaccions que envieu (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Inclou adreces IP en la sortida de depuració (per defecte: 0)</translation>
     </message>
     <message>
         <source>Information</source>
         <translation>&amp;Informació</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantenir tot l&apos;índex de transaccions (per defecte: 0)</translation>
+        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
@@ -3084,115 +3223,103 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Mida màxima del buffer d&apos;enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Tan sols acceptar cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1)</translation>
+        <translation>Només accepta cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Només connectar als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcions del servidor RPC:</translation>
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Descarta a l'atzar 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opcions SSL: (veure la Wiki de Bitcoin per a instruccions de configuració SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Enviar informació de traça/debug a la consola en comptes del arxiu debug.log</translation>
+        <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
     <message>
         <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Establir una mida mínima de bloc en bytes (per defecte: 0)</translation>
+        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Reduir l&apos;arxiu debug.log al iniciar el client (per defecte 1 quan no -debug)</translation>
+        <translation>Redueix el fitxer debug.log durant l'inici del client (per defecte: 1 quan no -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar el temps limit per a un intent de connexió en milisegons (per defecte: 5000)</translation>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
     </message>
     <message>
         <source>System error: </source>
-        <translation>Error de sistema:</translation>
+        <translation>Error de sistema: </translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <translation>Import de la transacció massa petit</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <translation>Els imports de les transaccions han de ser positius</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <translation>La transacció és massa gran</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utilitza UPnP per a mapejar els ports d&apos;escolta (per defecte: 0)</translation>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Utilitza UPnP per a mapejar els ports d&apos;escolta (per defecte: 1 quan s&apos;escolta)</translation>
+        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 1 quan s'escolta)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation>Nom d&apos;usuari per a connexions JSON-RPC</translation>
+        <translation>Nom d'usuari per a connexions JSON-RPC</translation>
+    </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Cal reescriure el moneder: reiniceu el Bitcoin Core per completar-ho.</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -3200,59 +3327,55 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation>Advertència: Aquetsa versió està obsoleta, és necessari actualitzar!</translation>
+        <translation>Avís: aquesta versió està obsoleta. És necessari actualitzar-la!</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -benchmark. Feu servir -debug=bench.</translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -debugnet. Feu servir -debug=net.</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation>versió</translation>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>Se suprimeixen totes les transaccions del moneder...</translation>
+    </message>
+    <message>
+        <source>on startup</source>
+        <translation>a l'inici de l'aplicació</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
-        <translation>L&apos;arxiu wallet.data és corrupte, el rescat de les dades ha fallat</translation>
+        <translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Contrasenya per a connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permetre connexions JSON-RPC d&apos;adreces IP específiques</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar ordre al node en execució a &lt;ip&gt; (per defecte: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Executar orde quan el millor bloc canviï (%s al cmd es reemplaça per un bloc de hash)</translation>
+        <translation>Executa l'ordre quan el millor bloc canviï (%s en cmd es reemplaça per un resum de bloc)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation>Actualitzar moneder a l&apos;últim format</translation>
+        <translation>Actualitza el moneder a l'últim format</translation>
     </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Establir límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
+        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Re-escanejar cadena de blocs en cerca de transaccions de moneder perdudes</translation>
+        <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>Utilitzar OpenSSL (https) per a connexions JSON-RPC</translation>
+        <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
-        <translation>Arxiu del certificat de servidor (per defecte: server.cert)</translation>
+        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
     </message>
     <message>
         <source>Server private key (default: server.pem)</source>
@@ -3260,63 +3383,47 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>This help message</source>
-        <translation>Aquest misatge d&apos;ajuda</translation>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Impossible d&apos;unir %s a aquest ordinador (s&apos;ha retornat l&apos;error %d, %s)</translation>
+        <translation>Aquest misatge d'ajuda</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation>Permetre consultes DNS per a -addnode, -seednode i -connect</translation>
+        <translation>Permet consultes DNS per a -addnode, -seednode i -connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation>Carregant adreces...</translation>
+        <translation>S'estan carregant les adreces...</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation>Error carregant wallet.dat: Moneder corrupte</translation>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error carregant wallet.dat: El moneder requereix una versió de Bitcoin més moderna</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>El moneder necesita ser re-escrit: re-inicia Bitcoin per a completar la tasca</translation>
+        <translation>Error en carregar wallet.dat: Moneder corrupte</translation>
     </message>
     <message>
         <source>Error loading wallet.dat</source>
-        <translation>Error carregant wallet.dat</translation>
+        <translation>Error en carregar wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Adreça -proxy invalida: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Adreça -proxy invalida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Xarxa desconeguda especificada a -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>S&apos;ha demanat una versió desconeguda de -socks proxy: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>No es pot resoldre l&apos;adreça -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>No es pot resoldre l&apos;adreça -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantitat invalida per a -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
         <source>Invalid amount</source>
-        <translation>Quanitat invalida</translation>
+        <translation>Import no vàlid</translation>
     </message>
     <message>
         <source>Insufficient funds</source>
@@ -3324,15 +3431,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>Carregant índex de blocs...</translation>
+        <translation>S'està carregant l'índex de blocs...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation>Afegir un node per a connectar&apos;s-hi i intentar mantenir la connexió oberta</translation>
+        <translation>Afegeix un node per a connectar-s'hi i intenta mantenir-hi la connexió oberta</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation>Carregant moneder...</translation>
+        <translation>S'està carregant el moneder...</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
@@ -3340,29 +3447,23 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation>No es pot escriure l&apos;adreça per defecte</translation>
+        <translation>No es pot escriure l'adreça per defecte</translation>
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation>Re-escanejant...</translation>
+        <translation>S'està reescanejant...</translation>
     </message>
     <message>
         <source>Done loading</source>
-        <translation>Càrrega acabada</translation>
+        <translation>Ha acabat la càrrega</translation>
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation>Utilitza la opció %s</translation>
+        <translation>Utilitza l'opció %s</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Has de configurar el rpcpassword=&lt;password&gt; a l&apos;arxiu de configuració:\n %s\n Si l&apos;arxiu no existeix, crea&apos;l amb els permís owner-readable-only.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_cmn.ts b/src/qt/locale/bitcoin_cmn.ts
index 696cbedd0a18..3286f126982b 100644
--- a/src/qt/locale/bitcoin_cmn.ts
+++ b/src/qt/locale/bitcoin_cmn.ts
@@ -1,3368 +1,110 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cmn" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="cmn" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index 6cc783b59ea6..2aa017fdf8dc 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>O Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; verze</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Tohle je experimentální program.
-
-Šířen pod licencí MIT/X11, viz přiložený soubor COPYING nebo http://www.opensource.org/licenses/mit-license.php.
-
-Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu (http://www.openssl.org/) a kryptografický program od Erika Younga (eay@cryptsoft.com) a program UPnP od Thomase Bernarda.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Vývojáři Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="cs" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <translation>Exportování selhalo</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Při ukládání seznamu adres do %1 se přihodila nějaká chyba.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Při ukládání seznamu adres do %1 se přihodila nějaká chyba. Zkus to prosím znovu.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>Repeat new passphrase</source>
         <translation>Totéž heslo ještě jednou</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Zadej nové heslo k peněžence.&lt;br/&gt;Použij &lt;b&gt;alespoň 10 náhodných znaků&lt;/b&gt; nebo &lt;b&gt;alespoň osm slov&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Zašifruj peněženku</translation>
@@ -224,6 +183,10 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>Wallet encrypted</source>
         <translation>Peněženka je zašifrována</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Zadej nové heslo k peněžence.&lt;br/&gt;Použij &lt;b&gt;alespoň deset náhodných znaků&lt;/b&gt; nebo &lt;b&gt;alespoň osm slov&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin se teď ukončí, aby dokončil zašifrování. Pamatuj však, že pouhé zašifrování peněženky úplně nezabraňuje krádeži tvých bitcoinů malwarem, kterým se může počítač nakazit.</translation>
@@ -242,7 +205,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>Odemčení peněženky selhalo</translation>
+        <translation>Nepodařilo se odemknout peněženku</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
@@ -250,7 +213,7 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation>Dešifrování peněženky selhalo</translation>
+        <translation>Nepodařilo se dešifrovat peněženku</translation>
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
@@ -295,10 +258,6 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>Quit application</source>
         <translation>Ukonči aplikaci</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Zobraz informace o Bitcoinu</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>O &amp;Qt</translation>
@@ -335,6 +294,10 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>Open &amp;URI...</source>
         <translation>Načíst &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klient</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importuji bloky z disku...</translation>
@@ -387,6 +350,10 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>&amp;Receive</source>
         <translation>Při&amp;jmi</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Zobraz informace o Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Zobraz/Skryj</translation>
@@ -459,10 +426,6 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Seznam argumentů Bitcoinu pro příkazovou řádku získáš v nápovědě Bitcoinu Core</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klient</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktivní spojení do Bitcoinové sítě</numerusform><numerusform>%n aktivní spojení do Bitcoinové sítě</numerusform><numerusform>%n aktivních spojení do Bitcoinové sítě</numerusform></translation>
@@ -471,34 +434,14 @@ Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v Open
         <source>No block source available...</source>
         <translation>Není dostupný žádný zdroj bloků...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Zpracováno %1 z přibližně %2 bloků transakční historie.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Zpracováno %1 bloků transakční historie.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>hodinu</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodin</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>den</numerusform><numerusform>%n dny</numerusform><numerusform>%n dnů</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><numerusform>týden</numerusform><numerusform>%n týdny</numerusform><numerusform>%n týdnů</numerusform></translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation>%1 a %2</translation>
     </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation><numerusform>rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n roků</numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>Stahuji ještě bloky transakcí za poslední %1</translation>
@@ -559,10 +502,6 @@ Adresa: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Peněženka je &lt;b&gt;zašifrovaná&lt;/b&gt; a momentálně &lt;b&gt;zamčená&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Stala se fatální chyba. Bitcoin nemůže bezpečně pokračovat v činnosti, a proto skončí.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -575,7 +514,7 @@ Adresa: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Volba adres v rámci ruční správy mincí</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -598,8 +537,8 @@ Adresa: %4
         <translation>Poplatek:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Malý výstup:</translation>
+        <source>Dust:</source>
+        <translation>Prach:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +629,8 @@ Adresa: %4
         <translation>Kopíruj prioritu</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Kopíruj malý výstup</translation>
+        <source>Copy dust</source>
+        <translation>Kopíruj prach</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +681,8 @@ Adresa: %4
         <translation>žádná</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Může se lišit o +/– %1 satoshi na každý vstup.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -755,7 +694,7 @@ Adresa: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Popisek zčervená, pokud je velikost transakce větší než 1000 bajtů.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
@@ -767,27 +706,15 @@ Adresa: %4
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Transakce s vyšší prioritou mají větší šanci na zařazení do bloku.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Popisek zčervená, pokud je priorita menší než „střední“.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Popisek zčervená, pokud má některý příjemce obdržet částku menší než %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -795,7 +722,7 @@ Adresa: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>drobné z %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
@@ -841,12 +768,12 @@ Adresa: %4
         <translation>Uprav odesílací adresu</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Zadaná adresa &quot;%1&quot; už v adresáři je.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Zadaná adresa "%1" už v adresáři je.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Zadaná adresa &quot;%1&quot; není platná Bitcoinová adresa.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Zadaná adresa "%1" není platná Bitcoinová adresa.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +809,6 @@ Adresa: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +817,18 @@ Adresa: %4
         <source>version</source>
         <translation>verze</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>O Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Argumenty z příkazové řádky</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Užití:</translation>
@@ -907,8 +842,8 @@ Adresa: %4
         <translation>Možnosti UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Nastavit jazyk, například &quot;de_DE&quot; (výchozí: systémové nastavení)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Nastavit jazyk, například "de_DE" (výchozí: systémové nastavení)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -916,7 +851,7 @@ Adresa: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>Nastavit kořenové SSL certifikáty pro platební požadavky (výchozí: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -954,11 +889,11 @@ Adresa: %4
         <translation>Použij tento adresář pro data:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
         <translation>Chyba: Nejde vytvořit požadovaný adresář pro data „%1“.</translation>
     </message>
     <message>
@@ -1035,6 +970,14 @@ Adresa: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Počet vláken pro &amp;verifikaci skriptů</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Přijímat spojení zvenčí</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Přijímat příchozí spojení</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Připojí se do Bitcoinové sítě přes SOCKS proxy.</translation>
@@ -1049,15 +992,15 @@ Adresa: %4
     </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 type="unfinished"/>
+        <translation>URL třetích stran (např. block exploreru), které se zobrazí v kontextovém menu v záložce Transakce. %s v URL se nahradí hashem transakce. Více URL odděl svislítkem |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URL transakcí třetích stran</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Aktivní argumenty z příkazové řádky, které přetloukly tato nastavení:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1085,15 +1028,15 @@ Adresa: %4
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
+        <translation>Povolit ruční správu &amp;mincí</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 type="unfinished"/>
+        <translation>Pokud zakážeš utrácení ještě nepotvrzených drobných, nepůjde použít drobné z transakce, dokud nebude mít alespoň jedno potvrzení. Ovlivní to také výpočet stavu účtu.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Utrácet i ještě nepotvrzené drobné</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>
@@ -1115,14 +1058,6 @@ Adresa: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port proxy (např. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Verze SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Verze SOCKS proxy (např. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>O&amp;kno</translation>
@@ -1157,23 +1092,15 @@ Adresa: %4
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation>J&amp;ednotka pro částky: </translation>
+        <translation>J&amp;ednotka pro částky:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Zvol výchozí podjednotku, která se bude zobrazovat v programu a při posílání mincí.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Zda ukazovat bitcoinové adresy ve výpisu transakcí nebo ne.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Ukazo&amp;vat adresy ve výpisu transakcí</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>Zda ukazovat možnosti pro ruční správu mincí nebo ne.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1189,7 +1116,7 @@ Adresa: %4
     </message>
     <message>
         <source>none</source>
-        <translation>žádná</translation>
+        <translation>žádné</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1226,6 +1153,10 @@ Adresa: %4
         <source>Wallet</source>
         <translation>Peněženka</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Sledované:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>K dispozici:</translation>
@@ -1240,7 +1171,7 @@ Adresa: %4
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Celkem z transakcí, které ještě nejsou potvrzené a které se ještě nezapočítávají do celkového disponibilního stavu účtu</translation>
+        <translation>Souhrn transakcí, které ještě nejsou potvrzené a které se ještě nezapočítávají do celkového disponibilního stavu účtu</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1258,6 +1189,22 @@ Adresa: %4
         <source>Your current total balance</source>
         <translation>Celkový stav tvého účtu</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Aktuální stav účtu sledovaných adres</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Nepotvrzené transakce sledovaných adres</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Vytěžené mince na sledovaných adresách, které ještě nejsou zralé</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Aktuální stav účtu sledovaných adres</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Poslední transakce&lt;/b&gt;</translation>
@@ -1274,8 +1221,24 @@ Adresa: %4
         <translation>Zpracování URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Nepodařilo se analyzovat URI! Důvodem může být neplatná Bitcoinová adresa nebo poškozené parametry URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Neplatná platební adresa %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Platební požadavek byl odmítnut</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Síť platebního požadavku neodpovídá síti klienta.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Platební požadavek vypršel.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Platební požadavek není zahájený.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,24 +1252,20 @@ Adresa: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Nemůžu spustit bitcoin: obsluha click-to-pay</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Upozornění správce sítě</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Tvá aktivní proxy nepodporuje SOCKS5, které je vyžadováno pro platební požadavky skrz proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Zdrojová URL platebního požadavku není platná: %1</translation>
     </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>Nepodařilo se analyzovat URI! Důvodem může být neplatná Bitcoinová adresa nebo poškozené parametry URI.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Zpracování souboru platebního požadavku</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
         <translation>Soubor platebního požadavku nejde přečíst nebo zpracovat! Příčinou může být špatný soubor platebního požadavku.</translation>
     </message>
     <message>
@@ -1322,8 +1281,8 @@ Adresa: %4
         <translation>Chyba při komunikaci s %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Platebního požadavku nejde přečíst nebo zpracovat!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Platební požadavek je nečitelný!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,31 +1297,66 @@ Adresa: %4
         <translation>Chyba síťového požadavku</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Typ klienta</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresa/Název hostitele</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Odezva</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Částka</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Zadej Bitcoinovou adresu (např. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Chyba: Zadaný adresář pro data „%1“ neexistuje.</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Chyba: Nemohu zpracovat konfigurační soubor: %1. Používej pouze syntaxi klíč=hodnota.</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Chyba: Neplatná kombinace -regtest a -testnet.</translation>
+        <source>NETWORK</source>
+        <translation>SÍŤ</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ještě bezpečně neskončil...</translation>
+        <source>UNKNOWN</source>
+        <translation>NEZNÁMÁ</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadej Bitcoinovou adresu (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>None</source>
+        <translation>Žádné</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>N/A</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1414,6 +1408,10 @@ Adresa: %4
         <source>Using OpenSSL version</source>
         <translation>Používaná verze OpenSSL</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Používaná verze BerkeleyDB</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Čas spuštění</translation>
@@ -1439,8 +1437,76 @@ Adresa: %4
         <translation>Aktuální počet bloků</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Odhad celkového počtu bloků</translation>
+        <source>Received</source>
+        <translation>Přijato</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Odesláno</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Protějšky</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Vyber protějšek a uvidíš jeho detailní informace.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Směr</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Verze</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Typ klienta</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Služby</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Synchronizační uzel</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Prvotní výška</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Aktuální výška</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Skóre pro klatbu</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Doba spojení</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Poslední odeslání</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Poslední příjem</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bajtů odesláno</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bajtů přijato</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Odezva</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1464,7 +1530,7 @@ Adresa: %4
     </message>
     <message>
         <source>Totals</source>
-        <translation>Sumy</translation>
+        <translation>Součty</translation>
     </message>
     <message>
         <source>In:</source>
@@ -1519,16 +1585,36 @@ Adresa: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>via %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>nikdy</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>Inbound</source>
+        <translation>Sem</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Ven</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Ano</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Ne</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Neznámá</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Stahuji...</translation>
     </message>
 </context>
 <context>
@@ -1547,39 +1633,39 @@ Adresa: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <translation>Recyklovat již dříve použité adresy. Recyklace adres má bezpečnostní rizika a narušuje soukromí. Nezaškrtávejte to, pokud znovu nevytváříte již dříve vytvořený platební požadavek.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Recyklovat již existující adresy (nedoporučeno)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Volitelná zpráva, která se připojí k platebnímu požadavku a která se zobrazí, když se požadavek otevře. Poznámka: Tahle zpráva se neposílá s platbou po Bitcoinové síti.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>Volitelné označení, které se má přiřadit k nové adrese.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Tímto formulář můžeš požadovat platby. Všechna pole jsou &lt;b&gt;volitelná&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <translation>Volitelná částka, kterou požaduješ. Nech prázdné nebo nulové, pokud nepožaduješ konkrétní částku.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Smaže všechny pole formuláře.</translation>
+        <translation>Promaž obsah ze všech formulářových políček.</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation type="unfinished"/>
+        <translation>Vyčistit</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <translation>Historie vyžádaných plateb</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
@@ -1587,19 +1673,19 @@ Adresa: %4
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Zobraz zvolený požadavek (stejně tak můžeš přímo na něj dvakrát poklepat)</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
+        <translation>Zobrazit</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Smaž zvolené požadavky ze seznamu</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation>Odstranit</translation>
+        <translation>Smazat</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -1622,7 +1708,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Kopíruj &amp;URI</translation>
+        <translation>&amp;Kopíruj URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
@@ -1634,7 +1720,7 @@ Adresa: %4
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation type="unfinished"/>
+        <translation>Platební požadavek: %1</translation>
     </message>
     <message>
         <source>Payment information</source>
@@ -1708,7 +1794,7 @@ Adresa: %4
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti ruční správy mincí</translation>
     </message>
     <message>
         <source>Inputs...</source>
@@ -1742,10 +1828,6 @@ Adresa: %4
         <source>Fee:</source>
         <translation>Poplatek:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Malý výstup:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Čistá částka:</translation>
@@ -1756,7 +1838,7 @@ Adresa: %4
     </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 type="unfinished"/>
+        <translation>Pokud aktivováno, ale adresa pro drobné je prázdná nebo neplatná, tak se drobné pošlou na nově vygenerovanou adresu.</translation>
     </message>
     <message>
         <source>Custom change address</source>
@@ -1772,7 +1854,11 @@ Adresa: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Smaže všechny pole formuláře.</translation>
+        <translation>Promaž obsah ze všech formulářových políček.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Prach:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1796,7 +1882,7 @@ Adresa: %4
     </message>
     <message>
         <source>%1 to %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 pro %2</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -1822,10 +1908,6 @@ Adresa: %4
         <source>Copy priority</source>
         <translation>Kopíruj prioritu</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopíruj malý výstup</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopíruj drobné</translation>
@@ -1878,22 +1960,18 @@ Adresa: %4
         <source>Warning: Unknown change address</source>
         <translation>Upozornění: Neznámá adresa pro drobné</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopíruj prach</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
-        <translation>Opravdu chcete odeslat %1?</translation>
+        <translation>Jsi si jistý, že to chceš poslat?</translation>
     </message>
     <message>
         <source>added as transaction fee</source>
         <translation>přidán jako transakční poplatek</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Platební požadavek vypršel</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Neplatná platební adresa %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1983,6 @@ Adresa: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Komu:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adresa příjemce (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Zadej označení této adresy; obojí se ti pak uloží do adresáře</translation>
@@ -1925,6 +1999,10 @@ Adresa: %4
         <source>This is a normal payment.</source>
         <translation>Tohle je normální platba.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Bitcoinová adresa příjemce</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1947,19 +2025,19 @@ Adresa: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation>Toto je ověřený požadavek k platbě.</translation>
+        <translation>Tohle je ověřený platební požadavek.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <translation>Zadej označení této adresy; obojí se ti pak uloží do adresáře</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <translation>Zpráva, která byla připojena k bitcoin: URI a která se ti pro přehled uloží k transakci. Poznámka: Tahle zpráva se neposílá s platbou po Bitcoinové síti.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation>Toto je neověřený požadavek k platbě.</translation>
+        <translation>Tohle je neověřený platební požadavek.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -1996,8 +2074,8 @@ Adresa: %4
         <translation>Podepsáním zprávy svými adresami můžeš prokázat, že je skutečně vlastníš. Buď opatrný a nepodepisuj nic vágního; například při phishingových útocích můžeš být lákán, abys něco takového podepsal. Podepisuj pouze zcela úplná a detailní prohlášení, se kterými souhlasíš.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adresa, kterou se zpráva podepíše (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Bitcoinová adresa, kterou se zpráva podepíše</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2052,8 +2130,8 @@ Adresa: %4
         <translation>K ověření podpisu zprávy zadej podepisující adresu, zprávu (ověř si, že správně kopíruješ zalomení řádků, mezery, tabulátory apod.) a podpis. Dávej pozor na to, abys nezkopíroval do podpisu víc, než co je v samotné podepsané zprávě, abys nebyl napálen man-in-the-middle útokem.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adresa, kterou je zpráva podepsána (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Bitcoinová adresa, kterou je zpráva podepsána</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2068,12 +2146,8 @@ Adresa: %4
         <translation>Vymaž všechna pole formuláře pro ověření zrávy</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadej Bitcoinovou adresu (např. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Kliknutím na &quot;Podepiš zprávu&quot; vygeneruješ podpis</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Kliknutím na "Podepiš zprávu" vygeneruješ podpis</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2097,7 +2171,7 @@ Adresa: %4
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation>Podepisování zprávy selhalo.</translation>
+        <translation>Nepodařilo se podepsat zprávu.</translation>
     </message>
     <message>
         <source>Message signed.</source>
@@ -2117,7 +2191,7 @@ Adresa: %4
     </message>
     <message>
         <source>Message verification failed.</source>
-        <translation>Ověřování zprávy selhalo.</translation>
+        <translation>Nepodařilo se ověřit zprávu.</translation>
     </message>
     <message>
         <source>Message verified.</source>
@@ -2174,7 +2248,7 @@ Adresa: %4
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, rozesláno přes 1 uzel</numerusform><numerusform>, rozesláno přes %n uzly</numerusform><numerusform>, rozesláno přes %n uzlů</numerusform></translation>
+        <translation><numerusform>, rozesláno přes %n uzel</numerusform><numerusform>, rozesláno přes %n uzly</numerusform><numerusform>, rozesláno přes %n uzlů</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2200,6 +2274,10 @@ Adresa: %4
         <source>own address</source>
         <translation>vlastní adresa</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>sledovací</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>označení</translation>
@@ -2208,10 +2286,6 @@ Adresa: %4
         <source>Credit</source>
         <translation>Příjem</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>dozraje po jednom bloku</numerusform><numerusform>dozraje po %n blocích</numerusform><numerusform>dozraje po %n blocích</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>neakceptováno</translation>
@@ -2220,6 +2294,14 @@ Adresa: %4
         <source>Debit</source>
         <translation>Výdaj</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Celkové výdaje</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Celkové příjmy</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transakční poplatek</translation>
@@ -2245,8 +2327,8 @@ Adresa: %4
         <translation>Obchodník</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Vygenerované mince musí čekat %1 bloků, než mohou být utraceny. Když jsi vygeneroval tenhle blok, tak byl rozposlán do sítě, aby byl přidán do řetězce bloků. Pokud se mu nepodaří dostat se do řetězce, změní se na &quot;neakceptovaný&quot; a nepůjde utratit. To se občas může stát, pokud jiný uzel vygeneruje blok zhruba ve stejném okamžiku jako ty.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Vygenerované mince musí čekat %1 bloků, než mohou být utraceny. Když jsi vygeneroval tenhle blok, tak byl rozposlán do sítě, aby byl přidán do řetězce bloků. Pokud se mu nepodaří dostat se do řetězce, změní se na "neakceptovaný" a nepůjde utratit. To se občas může stát, pokud jiný uzel vygeneruje blok zhruba ve stejném okamžiku jako ty.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2278,7 +2360,7 @@ Adresa: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>Otevřeno pro 1 další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
+        <translation><numerusform>Otevřeno pro %n další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -2310,17 +2392,13 @@ Adresa: %4
         <source>Address</source>
         <translation>Adresa</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Částka</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Nedozráno (%1 potvrzení, bude k dispozici za %2)</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>Otevřeno pro 1 další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
+        <translation><numerusform>Otevřeno pro %n další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -2525,10 +2603,6 @@ Adresa: %4
         <source>Address</source>
         <translation>Adresa</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Částka</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2616,13 @@ Adresa: %4
         <translation>až</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Jednotka pro částky. Klikni pro výběr nějaké jiné.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2674,6 @@ Adresa: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Užití:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Výpis příkazů</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Získat nápovědu pro příkaz</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Možnosti:</translation>
@@ -2627,7 +2696,7 @@ Adresa: %4
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Povolit nejvýše &lt;n&gt; připojení k uzlům (výchozí: 125)</translation>
+        <translation>Povolit nejvýše &lt;n&gt; protějšků (výchozí: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
@@ -2639,15 +2708,11 @@ Adresa: %4
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Práh pro odpojování zlobivých uzlů (výchozí: 100)</translation>
+        <translation>Práh pro odpojování zlobivých protějšků (výchozí: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Doba ve vteřinách, po kterou se nebudou moci zlobivé uzly znovu připojit (výchozí: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Při nastavování naslouchacího RPC portu %i pro IPv4 nastala chyba: %s</translation>
+        <translation>Doba ve vteřinách, po kterou se nebudou moci zlobivé protějšky znovu připojit (výchozí: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2657,10 +2722,6 @@ Adresa: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akceptovat příkazy z příkazové řádky a přes JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Verze Bitcoin Core RPC klienta</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Běžet na pozadí jako démon a akceptovat příkazy</translation>
@@ -2683,7 +2744,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, musíš nastavit rpcpassword v konfiguračním souboru:
 %s
@@ -2694,37 +2755,29 @@ rpcpassword=%s
 rpcuser a rpcpassword NESMÍ být stejné.
 Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník.
 Je také doporučeno si nastavit alertnotify, abys byl upozorněn na případné problémy;
-například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Akceptovatelné šifry (výchozí: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Při nastavování naslouchacího RPC portu %u pro IPv6 nastala chyba, vracím se k IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
+        <translation>Kontinuálně omezovat bezpoplatkové transakce na &lt;n&gt;*1000 bajtů za minutu (výchozí: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Přepnout do módu testování regresí, který používá speciální řetězec, ve kterém jsou mohou být bloky okamžitě vyřešeny. Je to určeno pro nástroje pro regresní testování a vyvíjení aplikací.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Smazat všechny transakce peněženky a při startu obnovit pouze relevantní části řetězce bloků pomocí -rescan</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Přepnout do módu testování regresí, který používá speciální řetězec, ve kterém mohou být bloky okamžitě vyřešeny.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Chyba: Transakce byla odmítnuta! Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této.</translation>
@@ -2737,13 +2790,9 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
+        <translation>Promítnout databázovou aktivitu z paměťového prostoru do záznamu na disku každých &lt;n&gt; megabajtů (výchozí: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
@@ -2751,15 +2800,15 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
+        <translation>V tomto módu -genproclimit určuje, kolik bloků je vygenerováno okamžitě.</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>Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, &lt;0 = nechat daný počet jader volný, výchozí: 0)</translation>
+        <translation>Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, &lt;0 = nechat daný počet jader volný, výchozí: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Nastavit omezení procesoru pro zapnuté generování (-1 = bez omezení, výchozí: -1)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
@@ -2771,23 +2820,19 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Použít samostatnou SOCKS5 proxy ke spojení s peery přes skryté služby v Toru (výchozí: -proxy)</translation>
+        <translation>Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru (výchozí: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Upozornění: -paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Upozornění: Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, Bitcoin nebude fungovat správně.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Upozornění: Síť podle všeho není v konzistentním stavu. Někteří těžaři jsou zřejmě v potížích.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Upozornění: Nesouhlasím zcela se svými protiuzly! Možná potřebuji aktualizovat nebo ostatní uzly potřebují aktualizovat.</translation>
+        <translation>Upozornění: Nesouhlasím zcela se svými protějšky! Možná potřebuji aktualizovat nebo ostatní uzly potřebují aktualizovat.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2813,30 +2858,14 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Pokusit se zachránit soukromé klíče z poškozeného souboru wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core démon</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Možnosti vytvoření bloku:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Připojit se pouze k zadanému uzlu (příp. zadaným uzlům)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Připojit se přes SOCKS proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Připojit se k JSON RPC na &lt;port&gt; (výchozí: 8332 nebo testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Možnosti připojení:</translation>
@@ -2851,7 +2880,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vypnout bezpečný režim (safemode), překrýt skutečnou událost bezpečného režimu (výchozí: 0)</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
@@ -2937,18 +2966,6 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Nepodařilo se zapsat data o vracení změn</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Poplatek za kB, který se přidá ke každé odeslané transakci</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Hledat uzly přes DNS (výchozí: 1, pokud není zadáno -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Vynutit bezpečný mód (výchozí: 0)</translation>
@@ -2963,7 +2980,7 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <translation>Pokud není &lt;category&gt; zadána, bude tisknout veškeré ladicí informace.</translation>
     </message>
     <message>
         <source>Importing...</source>
@@ -2974,8 +2991,8 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Nemám žádný nebo jen špatný genesis blok. Není špatně nastavený datadir?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Neplatná -onion adresa: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Neplatná -onion adresa: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,18 +3002,10 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Připojit před ladicí výstup časové razítko (výchozí: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Znovu vytvořit index řetězce bloků z aktuálních blk000??.dat souborů</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Zvol verzi SOCKS proxy pro -proxy (4 nebo 5, výchozí: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Nastavit velikost databázové vyrovnávací paměti v megabajtech (%d až %d, výchozí: %d)</translation>
@@ -3015,28 +3024,24 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Utrácet i ještě nepotvrzené drobné při posílání transakcí (výchozí: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Tohle je určeno pro nástroje na regresní testování a vyvíjení aplikací.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Ukončit se po importu bloků z disku (výchozí: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Tohle je určeno pro nástroje na regresní testování a vyvíjení aplikací.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
-        <translation>Ověřuji bloky...</translation>
+        <translation>Ověřuji bloky... </translation>
     </message>
     <message>
         <source>Verifying wallet...</source>
         <translation>Kontroluji peněženku...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Peněženka %s se nachází mimo datový adresář %s</translation>
@@ -3045,10 +3050,6 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Wallet options:</source>
         <translation>Možnosti peněženky:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Je třeba přestavět databázi použitím -reindex, aby bylo možné změnit -txindex</translation>
@@ -3057,41 +3058,165 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importovat bloky z externího souboru blk000??.dat</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(výchozí: 1, 1 = ukládat transakční metadata, např. majitele účtu a informace o platebním požadavku, 2 = mazat transakční metadata)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Povolit JSON-RPC spojení ze specifikovaného zdroje. Platnou hodnotou &lt;ip&gt; je jednotlivá IP adresa (např. 1.2.3.4), síť/maska (např. 1.2.3.4/255.255.255.0) nebo síť/CIDR (např. 1.2.3.4/24). Tuto volbu lze použít i vícekrát</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Při nastavování naslouchací RPC adresy %s a portu %u nastala chyba: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Obsadit zadanou adresu a protějšky, které se na ní připojí, umístit na bílou listinu. Pro zápis IPv6 adresy použij notaci [adresa]:port</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Čekat na zadané adrese na JSON-RPC spojení. Pro zápis IPv6 adresy použij notaci [adresa]:port. Tuto volbu lze použít i vícekrát (výchozí: poslouchat na všech rozhraních)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Nedaří se mi získat zámek na datový adresář %s. Bitcoin Core pravděpodobně už jednou běží.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Vytvářet nové soubory s výchozími systémovými právy namísto umask 077 (uplatní se, pouze pokud je vypnutá funkce peněženky)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Šířen pod licencí MIT/X11, viz přiložený soubor COPYING nebo &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Chyba: Nelze naslouchat příchozí spojení (listen vrátil chybu %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Chyba: Byl použit nepodporovaný argument -socks. Nastavení verze SOCKS už není možné, podporovány jsou pouze SOCKS5 proxy.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Spustit příkaz, když nějaká transakce na síti znovu utrácí vstup transakce této peněženky (%s=TxID cizí transakce, %t=TxID transakce peněženky)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Spustit příkaz, když přijde relevantní upozornění nebo když dojde k opravdu dlouhému rozštěpení řetezce bloků (%s se v příkazu nahradí zprávou)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Poplatky (v BTC/Kb) menší než tato hodnota jsou považovány za nulové pro účely přeposílání transakcí (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Poplatky (v BTC/Kb) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Pokud paytxfee není nastaveno, platit dostatečný poplatek na to, aby byly transakce potvrzeny v průměru během n bloků (výchozí: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Tisknout ladicí informace (výchozí: 0, zadání &lt;category&gt; je volitelné)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Při nedostatku adres získat další protějšky z DNS (výchozí: 1, pokud není použito -connect)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Nastavit maximální velikost prioritních/nízkopoplatkových transakcí v bajtech (výchozí: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu &lt;https://www.openssl.org/&gt; a kryptografický program od Erika Younga a program UPnP od Thomase Bernarda.</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>Upozornění: Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, Bitcoin Core nebude fungovat správně.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Umístit na bílou listinu protějšky připojující se z dané podsítě či ip. Lze zadat i vícekrát.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Na protějšky na bílé listině se nevztahuje DoS klatba a jejich transakce jsou vždy přeposílány, i když už třeba jsou v mempoolu, což je užitečné např. pro bránu</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Vždy získávat adresy dalších protějšků přes DNS (výchozí: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Nemohu přeložit -whitebind adresu: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Připojit se přes SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Vývojáři Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Nejde mi přečíst hodnotu -rpcbind %s jako síťovou adresu</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Chyba při načítání wallet.dat: peněženka vyžaduje novější verzi Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Chyba: Argument -tor již není podporovaný, použij -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Poplatek (v BTC/kB), který se přidá ke každé odeslané transakci (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Zaznamenávat do ladicích výstupů i IP adresy (výchozí: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informace</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná částka pro -minrelaytxfee=&lt;částka&gt;: &apos;%s&apos;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Selhala úvodní zevrubná prověrka. Bitcoin Core se ukončuje.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná částka pro -minrelaytxfee=&lt;částka&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná částka pro -mintxfee=&lt;částka&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Neplatná částka pro -paytxfee=&lt;částka&gt;: '%s' (musí být alespoň %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ve -whitelist byla zadána neplatná podsíť: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná částka pro -mintxfee=&lt;částka&gt;: &apos;%s&apos;</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Držet v paměti nejvýše &lt;n&gt; nespojitelných bloků (výchozí: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Omezit velikost vyrovnávací paměti pro podpisy na &lt;n&gt; položek (výchozí: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Zaznamenávat během těžení bloků prioritu transakce a poplatek za kB (výchozí: 0)</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3105,6 +3230,14 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maximální velikost odesílacího bufferu pro každé spojení, &lt;n&gt;*1000 bajtů (výchozí: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>V rámci -whitebind je třeba specifikovat i port: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Možnosti přeposílání:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Uznávat pouze řetězec bloků, který odpovídá vnitřním kontrolním bodům (výchozí: 1)</translation>
@@ -3115,15 +3248,15 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <translation>Vypsat při startu blok,pokud se nachází v indexu bloků</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Vypsat při startu strom bloků (výchozí: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Možnosti SSL pro RPC: (viz instrukce nastavení SSL na Bitcoin Wiki)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
@@ -3131,23 +3264,23 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Náhodně zahazovat jednu z každých &lt;n&gt; síťových zpráv</translation>
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Náhodně pozměňovat jednu z každých &lt;n&gt; síťových zpráv</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Přeposílat a těžit transakce nesoucí data (výchozí: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Možnosti SSL: (viz instrukce nastavení SSL v Bitcoin Wiki)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Přeposílat ne-P2SH multisig (výchozí: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Poslat příkaz Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Spustit vlákno pročišťující periodicky peněženku (výchozí: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3159,15 +3292,11 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>Nastavit příznak DB_PRIVATE v databázovém prostředí peněženky (výchozí: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Zobrazit všechny možnosti ladění (užití: --help -help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3175,20 +3304,20 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation>Podepisování transakce selhalo</translation>
+        <translation>Nepodařilo se podepsat transakci</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Zadej časový limit spojení v milisekundách (výchozí: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systémová chyba: </translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Tohle je experimentální program.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Částka v transakci je příliš malá</translation>
@@ -3201,6 +3330,10 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Transace je příliš velká</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Nedaří se mi připojit na %s na tomhle počítači (operace bind vrátila chybu %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Použít UPnP k namapování naslouchacího portu (výchozí: 0)</translation>
@@ -3213,6 +3346,10 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Username for JSON-RPC connections</source>
         <translation>Uživatelské jméno pro JSON-RPC spojení</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Soubor s peněženkou potřeboval přepsat: restartuj Bitcoin Core, aby se operace dokončila</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Upozornění</translation>
@@ -3221,18 +3358,22 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Upozornění: tahle verze je zastaralá, měl bys ji aktualizovat!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Upozornění: Nepodporovaný argument -benchmark se ignoruje, použij -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Upozornění: Nepodporovaný argument -debugnet se ignoruje, použij -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <translation>Vymazat všechny transakce z peněženky...</translation>
     </message>
     <message>
         <source>on startup</source>
         <translation>při startu</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>verze</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>Soubor wallet.dat je poškozen, jeho záchrana se nezdařila</translation>
@@ -3241,14 +3382,6 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Heslo pro JSON-RPC spojení</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Povolit JSON-RPC spojení ze specifikované IP adresy</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Posílat příkazy uzlu běžícím na &lt;ip&gt; (výchozí: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Spustit příkaz, když se změní nejlepší blok (%s se v příkazu nahradí hashem bloku)</translation>
@@ -3281,10 +3414,6 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Tato nápověda</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nedaří se mi připojit na %s na tomhle počítači (operace bind vrátila chybu %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Povolit DNS dotazy pro -addnode (přidání uzlu), -seednode a -connect (připojení)</translation>
@@ -3297,41 +3426,29 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Chyba při načítání wallet.dat: peněženka je poškozená</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Chyba při načítání wallet.dat: peněženka vyžaduje novější verzi Bitcoinu</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Soubor s peněženkou potřeboval přepsat: restartuj Bitcoin, aby se operace dokončila</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Chyba při načítání wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Neplatná -proxy adresa: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Neplatná -proxy adresa: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>V -onlynet byla uvedena neznámá síť: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>V -onlynet byla uvedena neznámá síť: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>V -socks byla požadována neznámá verze proxy: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nemohu přeložit -bind adresu: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nemohu přeložit -bind adresu: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nemohu přeložit -externalip adresu: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nemohu přeložit -externalip adresu: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná částka pro -paytxfee=&lt;částka&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná částka pro -paytxfee=&lt;částka&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +3494,5 @@ například: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Musíš nastavit rpcpassword=&lt;heslo&gt; v konfiguračním souboru:
-%s
-Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index d2f41739cb1a..3380733c6372 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="cy" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,15 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Creu cyfeiriad newydd</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copio&apos;r cyfeiriad sydd wedi&apos;i ddewis i&apos;r clipfwrdd system</translation>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Dileu</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +35,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Teipiwch gyfrinymadrodd</translation>
@@ -163,29 +47,25 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Ailadroddwch gyfrinymadrodd newydd</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Dewiswch gyfrinymadrodd newydd ar gyfer y waled. &lt;br/&gt; Defnyddiwch cyfrinymadrodd o &lt;b&gt;10 neu fwy o lythyrennau hapgyrch&lt;/b&gt;, neu &lt;b&gt; wyth neu fwy o eiriau.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Amgryptio&apos;r waled</translation>
+        <translation>Amgryptio'r waled</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Mae angen i&apos;r gweithred hon ddefnyddio&apos;ch cyfrinymadrodd er mwyn datgloi&apos;r waled.</translation>
+        <translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn datgloi'r waled.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation>Datgloi&apos;r waled</translation>
+        <translation>Datgloi'r waled</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Mae angen i&apos;r gweithred hon ddefnyddio&apos;ch cyfrinymadrodd er mwyn dadgryptio&apos;r waled.</translation>
+        <translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn dadgryptio'r waled.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation>Dadgryptio&apos;r waled</translation>
+        <translation>Dadgryptio'r waled</translation>
     </message>
     <message>
         <source>Change passphrase</source>
@@ -193,35 +73,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Teipiwch yr hen cyfrinymadrodd a chyfrinymadrodd newydd i mewn i&apos;r waled.</translation>
+        <translation>Teipiwch yr hen cyfrinymadrodd a chyfrinymadrodd newydd i mewn i'r waled.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
         <translation>Cadarnau amgryptiad y waled</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
-        <translation>Waled wedi&apos;i amgryptio</translation>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <translation>Waled wedi'i amgryptio</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -233,43 +93,27 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation>Dydy&apos;r cyfrinymadroddion a ddarparwyd ddim yn cyd-fynd â&apos;u gilydd.</translation>
+        <translation>Dydy'r cyfrinymadroddion a ddarparwyd ddim yn cyd-fynd â'u gilydd.</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>Methodd ddatgloi&apos;r waled</translation>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>Methodd ddatgloi'r waled</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
         <translation>Methodd dadgryptiad y waled</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>Cysoni â&apos;r rhwydwaith...</translation>
+        <translation>Cysoni â'r rhwydwaith...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
         <translation>&amp;Trosolwg</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Dangos trosolwg cyffredinol y waled</translation>
@@ -282,125 +126,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Browse transaction history</source>
         <translation>Pori hanes trafodion</translation>
     </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quit application</source>
         <translation>Gadael rhaglen</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Dangos gwybodaeth am Bitcoin</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>&amp;Opsiynau</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio&apos;r waled</translation>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio'r waled</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -422,90 +158,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Gwall</translation>
@@ -532,2837 +184,343 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>Trafodiad sy&apos;n cyrraedd</translation>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
+        <translation>Trafodiad sy'n cyrraedd</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Mae&apos;r waled &lt;b&gt;wedi&apos;i amgryptio&lt;/b&gt; ac &lt;b&gt;heb ei gloi&lt;/b&gt; ar hyn o bryd</translation>
+        <translation>Mae'r waled &lt;b&gt;wedi'i amgryptio&lt;/b&gt; ac &lt;b&gt;heb ei gloi&lt;/b&gt; ar hyn o bryd</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Mae&apos;r waled &lt;b&gt;wedi&apos;i amgryptio&lt;/b&gt; ac &lt;b&gt;ar glo&lt;/b&gt; ar hyn o bryd</translation>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <translation>Mae'r waled &lt;b&gt;wedi'i amgryptio&lt;/b&gt; ac &lt;b&gt;ar glo&lt;/b&gt; ar hyn o bryd</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Cyfeiriad</translation>
     </message>
     <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Dyddiad</translation>
     </message>
     <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(heb label)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Golygu'r cyfeiriad</translation>
     </message>
     <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Label</translation>
     </message>
     <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Cyfeiriad</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Cyfeiriad derbyn newydd</translation>
     </message>
     <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Cyfeiriad anfon newydd</translation>
     </message>
     <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>Golygu'r cyfeiriad derbyn</translation>
     </message>
     <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>Golygu'r cyfeiriad anfon</translation>
     </message>
     <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Mae'r cyfeiriad "%1" sydd newydd gael ei geisio gennych yn y llyfr cyfeiriad yn barod.</translation>
     </message>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>Methodd ddatgloi'r waled.</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>Methodd gynhyrchu allwedd newydd.</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>Address</source>
-        <translation>Cyfeiriad</translation>
+        <source>Error</source>
+        <translation>Gwall</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Date</source>
-        <translation>Dyddiad</translation>
+        <source>Options</source>
+        <translation>Opsiynau</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Ffurflen</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Trafodion diweddar&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
+        <source>&amp;Information</source>
+        <translation>Gwybodaeth</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Label:</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Cyfeiriad</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Label</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Neges</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Dyddiad</translation>
     </message>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Label</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Neges</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(heb label)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Anfon arian</translation>
     </message>
     <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Anfon at pobl lluosog ar yr un pryd</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Gweddill:</translation>
     </message>
     <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Cadarnhau'r gweithrediad anfon</translation>
     </message>
     <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>%1 to %2</source>
+        <translation>%1 i %2</translation>
     </message>
     <message>
         <source>(no label)</source>
         <translation>(heb label)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Golygu&apos;r cyfeiriad</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Label</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Cyfeiriad</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Cyfeiriad derbyn newydd</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Cyfeiriad anfon newydd</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Golygu&apos;r cyfeiriad derbyn</translation>
-    </message>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Edit sending address</source>
-        <translation>Golygu&apos;r cyfeiriad anfon</translation>
+        <source>A&amp;mount:</source>
+        <translation>&amp;Maint</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Mae&apos;r cyfeiriad &quot;%1&quot; sydd newydd gael ei geisio gennych yn y llyfr cyfeiriad yn barod.</translation>
+        <source>&amp;Label:</source>
+        <translation>&amp;Label:</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Methodd ddatgloi&apos;r waled.</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Gludo cyfeiriad o'r glipfwrdd</translation>
     </message>
     <message>
-        <source>New key generation failed.</source>
-        <translation>Methodd gynhyrchu allwedd newydd.</translation>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>name</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Gludo cyfeiriad o'r glipfwrdd</translation>
     </message>
     <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Agor tan %1</translation>
     </message>
     <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Dyddiad</translation>
     </message>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Neges</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Dyddiad</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Math</translation>
     </message>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Cyfeiriad</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Agor tan %1</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Heddiw</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Eleni</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Dyddiad</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Gwall</translation>
+        <source>Type</source>
+        <translation>Math</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Label</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Cyfeiriad</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Anfon arian</translation>
     </message>
 </context>
 <context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opsiynau</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Gwybodaeth</translation>
     </message>
     <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Ffurflen</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Trafodion diweddar&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Label:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Cyfeiriad</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Label</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Neges</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Dyddiad</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Label</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Neges</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(heb label)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Anfon arian</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Anfon at pobl lluosog ar yr un pryd</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Gweddill:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Cadarnhau&apos;r gweithrediad anfon</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation>%1 i %2</translation>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(heb label)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>&amp;Maint</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Label:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Gludo cyfeiriad o&apos;r glipfwrdd</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Gludo cyfeiriad o&apos;r glipfwrdd</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Agor tan %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Dyddiad</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Neges</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Dyddiad</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Math</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Cyfeiriad</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Agor tan %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Heddiw</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Eleni</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Dyddiad</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Math</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Label</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Cyfeiriad</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation>Gwybodaeth</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation>Rhybudd</translation>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <source>Warning</source>
+        <translation>Rhybudd</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Gwall</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index a0514035fd70..f292766ec8d1 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="da" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Om Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Dette program er eksperimentelt.
-
-Det er gjort tilgængeligt under MIT/X11-softwarelicensen. Se den medfølgende fil &quot;COPYING&quot; eller http://www.opensource.org/licenses/mit-license.php.
-
-Produktet indeholder software som er udviklet af OpenSSL Project til brug i OpenSSL Toolkit (http://www.openssl.org/), kryptografisk software skrevet af Eric Young (eay@cryptsoft.com) og UPnP-software skrevet af Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Ophavsret</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Udviklerne af Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="da" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <translation>Eksport mislykkedes</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>En fejl opstod under gemning af adresseliste til %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Der opstod en fejl under gemning af adresselisten til %1. Prøv venligst igen.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>Repeat new passphrase</source>
         <translation>Gentag ny adgangskode</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Indtast den nye adgangskode til tegnebogen.&lt;br/&gt;Brug venligst en adgangskode på &lt;b&gt;10 eller flere tilfældige tegn&lt;/b&gt; eller &lt;b&gt;otte eller flere ord&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Kryptér tegnebog</translation>
@@ -224,6 +183,10 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>Wallet encrypted</source>
         <translation>Tegnebog krypteret</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Indtast det nye kodeord til tegnebogen.&lt;br/&gt;Brug venligst et kodeord på &lt;b&gt;ti eller flere tilfældige tegn&lt;/b&gt; eller &lt;b&gt;otte eller flere ord&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin vil nu lukke for at gennemføre krypteringsprocessen. Husk på, at kryptering af din tegnebog vil ikke beskytte dine bitcoins fuldt ud mod at blive stjålet af malware på din computer.</translation>
@@ -295,10 +258,6 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>Quit application</source>
         <translation>Afslut program</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Vis informationer om Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Om Qt</translation>
@@ -335,6 +294,10 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>Open &amp;URI...</source>
         <translation>Åbn URI …</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core-klient</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importerer blokke fra disken …</translation>
@@ -387,6 +350,10 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>&amp;Receive</source>
         <translation>Modtag</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Vis oplysninger om Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>Vis / skjul</translation>
@@ -433,7 +400,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Forespørg betalinger (genererer QR-koder og &quot;bitcoin:&quot;-URI&apos;er)</translation>
+        <translation>Anmod om betalinger (genererer QR-koder og "bitcoin:"-URI'er)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -449,7 +416,7 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>Åbn en &quot;bitcoin:&quot;-URI eller betalingsforespørgsel</translation>
+        <translation>Åbn en "bitcoin:"-URI eller betalingsanmodning</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
@@ -459,10 +426,6 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Vis Bitcoin Core hjælpebesked for at få en liste over mulige tilvalg for Bitcoin kommandolinje</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-klient</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiv forbindelse til Bitcoin-netværket</numerusform><numerusform>%n aktive forbindelser til Bitcoin-netværket</numerusform></translation>
@@ -471,10 +434,6 @@ Produktet indeholder software som er udviklet af OpenSSL Project til brug i Open
         <source>No block source available...</source>
         <translation>Ingen blokkilde tilgængelig …</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Behandlet %1 ud af %2 (estimeret) blokke af transaktionshistorikken.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Behandlet %1 blokke af transaktionshistorikken.</translation>
@@ -559,10 +518,6 @@ Adresse: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Tegnebog er &lt;b&gt;krypteret&lt;/b&gt; og i øjeblikket &lt;b&gt;låst&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Der opstod en fatal fejl. Bitcoin kan ikke længere fortsætte sikkert og vil afslutte.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +553,8 @@ Adresse: %4
         <translation>Gebyr:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Lavt output:</translation>
+        <source>Dust:</source>
+        <translation>Støv:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +645,8 @@ Adresse: %4
         <translation>Kopiér prioritet</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Kopiér lavt output</translation>
+        <source>Copy dust</source>
+        <translation>Kopiér støv</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +697,8 @@ Adresse: %4
         <translation>ingen</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Støv</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Kan variere med +/- %1 satoshi per input.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -770,25 +725,13 @@ Adresse: %4
         <translation>Transaktioner med højere prioritet har højere sansynlighed for at blive inkluderet i en blok.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Dette mærkat bliver rødt, hvis prioriteten er mindre end &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Dette mærkat bliver rødt, hvis prioriteten er mindre end "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Dette mærkat bliver rødt, hvis mindst én modtager et beløb mindre end %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Dette betyder, at et gebyr på mindst %1 er nødvendigt.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Beløb under 0,546 gange det minimale videreførselsgebyr vises som støv.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Dette mærkat bliver rødt, hvis byttepengene er mindre end %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ingen mærkat)</translation>
@@ -841,12 +784,12 @@ Adresse: %4
         <translation>Redigér afsendelsesadresse</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Den indtastede adresse &quot;%1&quot; er allerede i adressebogen.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Den indtastede adresse "%1" er allerede i adressebogen.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Den indtastede adresse &quot;%1&quot; er ikke en gyldig Bitcoin-adresse.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Den indtastede adresse "%1" er ikke en gyldig Bitcoin-adresse.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +825,6 @@ Adresse: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core – tilvalg for kommandolinje</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +833,18 @@ Adresse: %4
         <source>version</source>
         <translation>version</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Om Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Kommandolinjetilvalg</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Anvendelse:</translation>
@@ -907,8 +858,8 @@ Adresse: %4
         <translation>Brugergrænsefladeindstillinger</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Angiv sprog, fx &quot;da_DK&quot; (standard: systemlokalitet)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Angiv sprog, fx "da_DK" (standard: systemlokalitet)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -916,7 +867,7 @@ Adresse: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation>Sæt SSL-rodcertifikater for betalingsforespørgsel (standard: -system-)</translation>
+        <translation>Sæt SSL-rodcertifikater for betalingsanmodning (standard: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -954,12 +905,12 @@ Adresse: %4
         <translation>Brug tilpasset mappe for data:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Fejl: Angivet datamappe &quot;%1&quot; kan ikke oprettes.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Fejl: Angivet datamappe "%1" kan ikke oprettes.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -982,7 +933,7 @@ Adresse: %4
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation>Åbn betalingsforespørgsel fra URI eller fil</translation>
+        <translation>Åbn betalingsanmodning fra URI eller fil</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -990,11 +941,11 @@ Adresse: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation>Vælg fil for betalingsforespørgsel</translation>
+        <translation>Vælg fil for betalingsanmodning</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation>Vælg fil for betalingsforespørgsel til åbning</translation>
+        <translation>Vælg fil for betalingsanmodning til åbning</translation>
     </message>
 </context>
 <context>
@@ -1035,6 +986,14 @@ Adresse: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Antallet af scriptverificeringstråde</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Acceptér forbindelser udefra</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Tillad indkommende forbindelser</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Forbind til Bitcoin-netværket gennem en SOCKS-proxy.</translation>
@@ -1049,11 +1008,11 @@ Adresse: %4
     </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>Tredjeparts-URL&apos;er (fx et blokhåndteringsværktøj), der vises i transaktionsfanen som genvejsmenupunkter. %s i URL&apos;en erstattes med transaktionens hash. Flere URL&apos;er separeres med en lodret streg |.</translation>
+        <translation>Tredjeparts-URL'er (fx et blokhåndteringsværktøj), der vises i transaktionsfanen som genvejsmenupunkter. %s i URL'en erstattes med transaktionens hash. Flere URL'er separeres med en lodret streg |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation>Tredjeparts-transaktions-URL&apos;er</translation>
+        <translation>Tredjeparts-transaktions-URL'er</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1115,14 +1074,6 @@ Adresse: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port for proxyen (fx 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS-version</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS-version for proxyen (fx 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>Vindue</translation>
@@ -1163,14 +1114,6 @@ Adresse: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Vælg standard for underopdeling af enhed, som skal vises i brugergrænsefladen og ved afsendelse af bitcoins.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Afgør hvorvidt Bitcoin-adresser skal vises i transaktionslisten eller ej.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Vis adresser i transaktionsliste</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Hvorvidt egenskaber for coin-styring skal vises eller ej.</translation>
@@ -1189,7 +1132,7 @@ Adresse: %4
     </message>
     <message>
         <source>none</source>
-        <translation>ingeningen</translation>
+        <translation>ingen</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1226,6 +1169,10 @@ Adresse: %4
         <source>Wallet</source>
         <translation>Tegnebog</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Kigge:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Tilgængelig:</translation>
@@ -1248,7 +1195,7 @@ Adresse: %4
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Udvunden saldo, som endnu ikke er modnet</translation>
+        <translation>Minet saldo, som endnu ikke er modnet</translation>
     </message>
     <message>
         <source>Total:</source>
@@ -1258,6 +1205,22 @@ Adresse: %4
         <source>Your current total balance</source>
         <translation>Din nuværende totale saldo</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Din nuværende saldo på kigge-adresser</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Ubekræftede transaktioner til kigge-adresser</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Minet saldo på kigge-adresser, som endnu ikke er modnet</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Nuværende totalsaldo på kigge-adresser</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Nyeste transaktioner&lt;/b&gt;</translation>
@@ -1274,44 +1237,56 @@ Adresse: %4
         <translation>URI-håndtering</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI kan ikke fortolkes! Dette kan skyldes en ugyldig Bitcoin-adresse eller misdannede URI-parametre.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Ugyldig betalingsadresse %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Betalingsanmodning afvist</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Netværk for betalingsanmodning stemmer ikke overens med klientens netværk.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Betalingsanmodning er udløbet.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Betalingsanmodning er ikke klargjort.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Forespurgt betalingsbeløb på %1 er for lille (regnes som støv).</translation>
+        <translation>Anmodet betalingsbeløb på %1 er for lille (regnes som støv).</translation>
     </message>
     <message>
         <source>Payment request error</source>
-        <translation>Fejl i betalingsforespørgsel</translation>
+        <translation>Fejl i betalingsanmodning</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Kan ikke starte bitcoin: click-to-pay-håndtering</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Net-håndterings-advarsel</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Din aktuelle proxy understøtter ikke SOCKS5, hvilket kræves for betalingsforespørgsler via proxy.</translation>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>Hentnings-URL for betalingsanmodning er ugyldig: %1</translation>
     </message>
     <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation>Betalingsforespørgslens hentnings-URL er ugyldig: %1</translation>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>URI kan ikke tolkes! Dette kan skyldes en ugyldig Bitcoin-adresse eller forkert udformede URL-parametre.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Filhåndtering for betalingsanmodninger</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Betalingsanmodningsfil kan ikke indlæses eller bearbejdes! Dette kan skyldes en ugyldig betalingsanmodningsfil.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Fil for betalingsanmodning kan ikke læses! Dette kan skyldes en ugyldig fil for betalingsanmodning.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation>Ikke-verificerede betalingsforespørgsler for tilpassede betalings-scripts understøttes ikke.</translation>
+        <translation>Ikke-verificerede betalingsanmodninger for tilpassede betalings-scripts understøttes ikke.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1322,8 +1297,8 @@ Adresse: %4
         <translation>Fejl under kommunikation med %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Betalingsanmodning kan ikke fortolkes eller bearbejdes!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Betalingsanmodning kan ikke tolkes!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,31 +1313,66 @@ Adresse: %4
         <translation>Fejl i netværksforespørgsel</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Brugeragent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresse/værtsnavn</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping-tid</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Beløb</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Fejl: Angivet datamappe &quot;%1&quot; eksisterer ikke.</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Indtast en Bitcoin-adresse (fx %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Fejl: Kan ikke fortolke konfigurationsfil: %1. Brug kun syntaksen nøgle=værdi.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Fejl: Ugyldig kombination af -regtest og -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 t</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core blev ikke afsluttet på sikker vis …</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Indtast en Bitcoin-adresse (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>NETVÆRK</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>UKENDT</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Ingen</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>N/A</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1414,6 +1424,10 @@ Adresse: %4
         <source>Using OpenSSL version</source>
         <translation>Anvender OpenSSL-version</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Bruger BerkeleyDB version</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Opstartstidspunkt</translation>
@@ -1439,8 +1453,76 @@ Adresse: %4
         <translation>Nuværende antal blokke</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Estimeret antal blokke</translation>
+        <source>Received</source>
+        <translation>Modtaget</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Sendt</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>Andre knuder</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Vælg en anden knude for at se detaljeret information.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Retning</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Version</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Brugeragent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Tjenester</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Synkroniseringsknude</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Starthøjde</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Synkroniseringshøjde</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Bandlysningsscore</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Forbindelsestid</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Seneste afsendelse</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Seneste modtagelse</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Byte sendt</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Byte modtaget</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping-tid</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1519,16 +1601,36 @@ Adresse: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>via %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 t</translation>
+        <source>never</source>
+        <translation>aldrig</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Indkommende</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Udgående</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Ja</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Nej</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Ukendt</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 t %2 m</translation>
+        <source>Fetching...</source>
+        <translation>Henter …</translation>
     </message>
 </context>
 <context>
@@ -1547,7 +1649,7 @@ Adresse: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Genbrug en af de tidligere brugte modtagelsesadresser. Genbrug af adresser har indflydelse på sikkerhed og privatliv. Brug ikke dette med mindre du genskaber en betalingsforespørgsel fra tidligere.</translation>
+        <translation>Genbrug en af de tidligere brugte modtagelsesadresser. Genbrug af adresser har indflydelse på sikkerhed og privatliv. Brug ikke dette med mindre du genskaber en betalingsanmodning fra tidligere.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
@@ -1555,7 +1657,7 @@ Adresse: %4
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>En valgfri besked, der føjes til betalingsanmodningen, og som vil vises, når anmodningen åbnes. Bemærk: Beskeden vil ikke sendes med betalingen over Bitcoin-netværket.</translation>
+        <translation>En valgfri besked, der føjes til betalingsanmodningen, og som vil vises, når anmodningen åbnes. Bemærk: Beskeden vil ikke sendes sammen med betalingen over Bitcoin-netværket.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
@@ -1587,7 +1689,7 @@ Adresse: %4
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation>Vis den valgte forespørgsel (gør det samme som dobbeltklik på en indgang)</translation>
+        <translation>Vis den valgte anmodning (gør det samme som dobbeltklik på en indgang)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -1742,10 +1844,6 @@ Adresse: %4
         <source>Fee:</source>
         <translation>Gebyr:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Lavt output:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Efter gebyr:</translation>
@@ -1774,6 +1872,10 @@ Adresse: %4
         <source>Clear all fields of the form.</source>
         <translation>Ryd alle felter af formen.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Støv:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Ryd alle</translation>
@@ -1822,10 +1924,6 @@ Adresse: %4
         <source>Copy priority</source>
         <translation>Kopiér prioritet</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopiér lavt output</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopiér byttepenge</translation>
@@ -1878,6 +1976,10 @@ Adresse: %4
         <source>Warning: Unknown change address</source>
         <translation>Advarsel: Ukendt byttepengeadresse</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiér støv</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Er du sikker på, at du vil sende?</translation>
@@ -1886,14 +1988,6 @@ Adresse: %4
         <source>added as transaction fee</source>
         <translation>tilføjet som transaktionsgebyr</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Betalingsforespørgsel udløbet</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Ugyldig betalingsadresse %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1999,6 @@ Adresse: %4
         <source>Pay &amp;To:</source>
         <translation>Betal til:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som betalingen skal sendes til (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Indtast en mærkat for denne adresse for at føje den til din adressebog</translation>
@@ -1925,6 +2015,10 @@ Adresse: %4
         <source>This is a normal payment.</source>
         <translation>Dette er en normal betaling.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Bitcoin-adresse, som betalingen skal sendes til</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1947,7 +2041,7 @@ Adresse: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation>Dette er en verificeret betalingsforespørgsel.</translation>
+        <translation>Dette er en verificeret betalingsanmodning.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
@@ -1955,11 +2049,11 @@ Adresse: %4
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation>En besked, som blev føjet til &quot;bitcon:&quot;-URI&apos;en, som vil gemmes med transaktionen til din reference. Bemærk: Denne besked vil ikke blive sendt over Bitcoin-netværket.</translation>
+        <translation>En besked, som blev føjet til "bitcon:"-URI'en, som vil gemmes med transaktionen til din reference. Bemærk: Denne besked vil ikke blive sendt over Bitcoin-netværket.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation>Dette er en ikke-verificeret betalingsforespørgsel.</translation>
+        <translation>Dette er en ikke-verificeret betalingsanmodning.</translation>
     </message>
     <message>
         <source>Pay To:</source>
@@ -1996,8 +2090,8 @@ Adresse: %4
         <translation>Du kan underskrive beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig. Pas på ikke at underskrive noget vagt, da phisingangreb kan narre dig til at overdrage din identitet. Underskriv kun fuldt detaljerede udsagn, du er enig i.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som beskeden skal underskrives med (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Bitcoin-adresse, som beskeden skal signeres med</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2037,7 +2131,7 @@ Adresse: %4
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation>Nulstil alle &quot;underskriv besked&quot;-felter</translation>
+        <translation>Nulstil alle "underskriv besked"-felter</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -2052,8 +2146,8 @@ Adresse: %4
         <translation>Indtast herunder den underskrivende adresse, beskeden (inkludér linjeskift, mellemrum mv. nøjagtigt, som de fremgår) og underskriften for at verificere beskeden. Vær forsigtig med ikke at lægge mere i underskriften end besked selv, så du undgår at blive narret af et man-in-the-middle-angreb.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-adressen som beskeden er underskrevet med (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Bitcoin-adressen, som beskeden blev signeret med</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2065,15 +2159,11 @@ Adresse: %4
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation>Nulstil alle &quot;verificér besked&quot;-felter</translation>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Indtast en Bitcoin-adresse (fx 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Nulstil alle "verificér besked"-felter</translation>
     </message>
     <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klik &quot;Underskriv besked&quot; for at generere underskriften</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klik "Underskriv besked" for at generere underskriften</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2200,6 +2290,10 @@ Adresse: %4
         <source>own address</source>
         <translation>egen adresse</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>kigge</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>mærkat</translation>
@@ -2220,6 +2314,14 @@ Adresse: %4
         <source>Debit</source>
         <translation>Debet</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Total debet</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Total kredit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transaktionsgebyr</translation>
@@ -2245,8 +2347,8 @@ Adresse: %4
         <translation>Forretningsdrivende</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Udvundne bitcoins skal modne %1 blokke, før de kan bruges. Da du genererede denne blok, blev den udsendt til netværket for at blive føjet til blokkæden. Hvis det ikke lykkes at få den i kæden, vil dens tilstand ændres til &quot;ikke accepteret&quot;, og den vil ikke kunne bruges. Dette kan ske nu og da, hvis en anden knude udvinder en blok inden for nogle få sekunder fra din.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Minede bitcoins skal modne %1 blokke, før de kan bruges. Da du genererede denne blok, blev den udsendt til netværket for at blive føjet til blokkæden. Hvis det ikke lykkes at få den i kæden, vil dens tilstand ændres til "ikke accepteret", og den vil ikke kunne bruges. Dette kan ske nu og da, hvis en anden knude udvinder en blok inden for nogle få sekunder fra din.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2412,6 @@ Adresse: %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Beløb</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Umoden (%1 bekræftelser; vil være tilgængelig efter %2)</translation>
@@ -2372,7 +2470,7 @@ Adresse: %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>Udvundne</translation>
+        <translation>Minet</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2443,7 +2541,7 @@ Adresse: %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>Udvundne</translation>
+        <translation>Minet</translation>
     </message>
     <message>
         <source>Other</source>
@@ -2525,10 +2623,6 @@ Adresse: %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Beløb</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2636,13 @@ Adresse: %4
         <translation>til</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Enhed, som beløb vises i. Klik for at vælge en anden enhed.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2694,6 @@ Adresse: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Anvendelse:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Liste over kommandoer</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Få hjælp til en kommando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Indstillinger:</translation>
@@ -2627,7 +2716,7 @@ Adresse: %4
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Oprethold højest &lt;n&gt; forbindelser til andre i netværket (standard: 125)</translation>
+        <translation>Oprethold højest &lt;n&gt; forbindelser til andre knuder i netværket (standard: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
@@ -2639,15 +2728,11 @@ Adresse: %4
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Grænse for afbrydelse til dårlige forbindelser (standard: 100)</translation>
+        <translation>Grænse for frakobling fra andre knuder, der opfører sig dårligt (standard: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Antal sekunder dårlige forbindelser skal vente før reetablering (standard: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Der opstod en fejl ved angivelse af RPC-porten %u til at lytte på IPv4: %s</translation>
+        <translation>Antal sekunder, som andre knuder der opfører sig dårligt, skal vente før reetablering af forbindelse (standard: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2657,10 +2742,6 @@ Adresse: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Acceptér kommandolinje- og JSON-RPC-kommandoer</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC-klient-version</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Kør i baggrunden som en service, og acceptér kommandoer</translation>
@@ -2683,7 +2764,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, du skal angive en RPC-adgangskode i konfigurationsfilen:
 %s
@@ -2694,17 +2775,13 @@ rpcpassword=%s
 Brugernavnet og adgangskode MÅ IKKE være det samme.
 Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed.
 Det anbefales også at angive alertnotify, så du påmindes om problemer;
-fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Accepterede krypteringer (standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Der opstod en fejl ved angivelse af RPC-porten %u til at lytte på IPv6, falder tilbage til IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Tildel til den givne adresse og lyt altid på den. Brug [vært]:port-notation for IPv6</translation>
@@ -2714,17 +2791,13 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Rate-begræns kontinuerligt frie transaktioner til &lt;n&gt;*1000 byte i minuttet (standard:15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme. Dette er tiltænkt til testværktøjer for regression of programudvikling.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Slet alle transaktioner i tegnebogen og genskab kun disse dele af blokkæden gennem -rescan under opstart</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Fejl: Lytning efter indkommende forbindelser mislykkedes (lytning returnerede fejl %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Fejl: Transaktionen blev afvist. Dette kan ske, hvis nogle af dine bitcoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine bitcoins er blevet brugt i kopien, men ikke er markeret som brugt her.</translation>
@@ -2737,10 +2810,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Gebyrer mindre end dette opfattes som nul-gebyr (for oprettelse af transaktioner) (standard:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Flyt databaseaktivitet fra hukommelsespulje til disklog hver &lt;n&gt; megabytes (standard: 100)</translation>
@@ -2771,23 +2840,19 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Brug separat SOCS5-proxy for at nå andre knuder via Tor skjulte tjenester (standard: -proxy)</translation>
+        <translation>Brug separat SOCS5-proxy for at nå andre knuder via tjenester skjult med Tor (standard: -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Advarsel: -paytxfee er sat meget højt! Dette er det gebyr du vil betale, hvis du sender en transaktion.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Advarsel: Undersøg venligst, at din computers dato og klokkeslæt er korrekt indstillet! Hvis der er fejl i disse, vil Bitcoin ikke fungere korrekt.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Advarsel: Netværket ser ikke ud til at være fuldt ud enige! Enkelte minere ser ud til at opleve problemer.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Advarsel: Vi ser ikke ud til at være fuldt ud enige med andre noder! Du kan være nødt til at opgradere, eller andre noder kan være nødt til at opgradere.</translation>
+        <translation>Advarsel: Vi ser ikke ud til at være fuldt ud enige med andre knuder! Du kan være nødt til at opgradere, eller andre knuder kan være nødt til at opgradere.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2813,30 +2878,14 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Forsøg at genskabe private nøgler fra ødelagt wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core-tjeneste</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blokoprettelsestilvalg:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Ryd liste over transaktioner i tegnebog (diagnoseværktøj; medfører -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Tilslut kun til de(n) angivne knude(r)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Forbind gennem SOCKS-proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Forbind til JSON-RPC på &lt;port&gt; (standard: 8332 eller testnetværk: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Tilvalg for forbindelser:</translation>
@@ -2937,18 +2986,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Failed to write undo data</source>
         <translation>Skrivning af genskabelsesdata mislykkedes</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Føj gebyr pr. kB til transaktioner, du sender</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Gebyrer mindre end dette opfattes som nul-gebyr (for videreførsler) (standard:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Find andre knuder ved DNS-opslag (standard: 1 hvis ikke -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Gennemtving sikker tilstand (standard: 0)</translation>
@@ -2974,8 +3011,8 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Ukorrekt eller ingen tilblivelsesblok fundet. Forkert datamappe for netværk?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Ugyldig -onion adresse: &quot;%s&quot;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Ugyldig -onion adresse: "%s"</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,18 +3022,10 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Føj tidsstempel foran fejlsøgningsoutput (standard: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Tilvalg for RPC-klient:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Genbyg blokkædeindeks fra nuværende blk000??.dat filer</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Vælg SOCKS-version for -proxy (4 eller 5, standard: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d)</translation>
@@ -3018,12 +3047,12 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Brug ubekræftede byttepenge under afsendelse af transaktioner (standard: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>This is intended for regression testing tools and app development.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Stop kørsel efter import af blokke fra disk (standard: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Brug (forældet, brug bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>This is intended for regression testing tools and app development.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3033,22 +3062,14 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Verifying wallet...</source>
         <translation>Verificerer tegnebog …</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Vent på opstart af RPC-server</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation>Tegnebog %1 findes uden for datamappe %s</translation>
+        <translation>Tegnebog %s findes uden for datamappe %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
         <translation>Tilvalg for tegnebog:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Advarsel: Forældet argument -debugnet ignoreret; brug -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex for at ændre -txindex</translation>
@@ -3057,33 +3078,157 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerer blokke fra ekstern blk000??.dat fil</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(standard: 1, 1 = behold metadata for transaktion, fx kontoindehaver og information om betalingsanmodning, 2 = drop metadata for transaktion)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Tillad JSON-RPC-forbindelser fra angivet kilde. Gyldig for &lt;ip&gt; er en enkelt IP (fx 1.2.3.4), et netværk/netmaske (fx 1.2.3.4/255.255.255.0) eller et netværk/CIDR (fx 1.2.3.4/24). Dette tilvalg kan angives flere gange</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Der opstod en fejl under opsætning af RPC-adresse %s port %u for lytning: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Tildel given adresse og sæt andre knuder, der forbinder til den, på hvidliste. Brug [vært]:port notation for IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Tildel til den givne adresse for at lytte efter JSON-RPC-forbindelser. Brug [vært]:port-notation for IPv6. Denne valgmulighed kan angives flere gange (standard: tildel til alle grænseflader)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Kan ikke opnå en lås på datamappe %s. Bitcoin Core kører sansynligvis allerede.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Opret nye filer med systemstandard for rettigheder i stedet for umask 077 (kun virksomt med tegnebogsfunktionalitet slået fra)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribueret under MIT/X11-softwarelicensen. Se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Fejl: Lytning efter indkommende forbindelser mislykkedes (lytning resultarede i fejl %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Fejl: Ikke understøttet argument -socks blev fundet. Det er ikke muligt at angive SOCKS-version længere, da kun SOCKS5-proxier er understøttet.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Udfør kommando når en netværkstransaktion genspenderer input fra tegnebogstransaktion (%s=transaktions-ID fra genspendering, %t=transaktions-ID fra tegnebog)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Udfør kommando, når en relevant alarm modtages eller vi ser en virkelig lang udsplitning (%s i cmd erstattes af besked)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Gebyrer (i BTC/Kb) mindre end dette opfattes som nulgebyr for videresendelse (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Gebyrer (i BTC/Kb) mindre end dette opfattes som nulgebyr for oprettelse af transaktion (standard: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Hvis paytxfee ikke er angivet, inkludér da nok gebyr til at transaktioner gennemsnitligt bekræftes inden for n blokke (standard: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Udskriv fejlsøgningsinformation (standard: 0, angivelse af &lt;kategori&gt; er valgfri)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Forespørgsel</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sæt maksimumstørrelse for højprioritet/lavgebyr-transaktioner i byte (standard: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Dette produkt indeholder software, der er udviklet af OpenSSL-projektet for brug i OpenSSL-værktøjskassen &lt;https://www.openssl.org/&gt;, samt kryptografisk software, der er skrevet af Eric Young, samt UPnP-software, der er skrevet af Thomas Bernard.</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>Advarsel: Undersøg venligst at din computers dato og klokkeslet er korrekt indstillet! Hvis der er fejl i disse vil Bitcoin Core ikke fungere korrekt.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Sæt andre knuder, der forbinder fra den angivne netmaske eller ip, på hvidliste. Kan angives flere gange.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Andre knuder på hvidliste kan ikke DoS-bandlyses, og deres transaktioner videresendes altid, selv hvis de allerede er i mempool'en. Brugbart til fx et adgangspunkt</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Forespørg altid adresser på andre knuder via DNS-opslag (default: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Kan ikke løse -whitebind adresse: "%s"</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Forbind gennem SOCKS5-proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Ophavsret © 2009-%i Udviklerne af Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Kunne ikke tolke -rpcbind-værdi %s som en netværksadresse</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Fejl ved indlæsning af wallet.dat: Tegnebog kræver en nyere version af Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Fejl: Ikke understøttet argument -tor fundet, brug -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Gebyr (i BTC/kB) som skal føjes til transaktioner, du sender (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Inkludér IP-adresser i fejlretningsoutput (standard: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Information</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb til -minrelaytxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Sundhedstjek under klargøring mislykkedes. Bitcoin Core lukker ned.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldigt beløb til -minrelaytxfee=&lt;beløb&gt;: "%s"</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldigt beløb til -mintxfee=&lt;beløb&gt;: "%s"</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: "%s" (skal være mindst %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ugyldig netmaske angivet i -whitelist: "%s"</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb til -mintxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Behold højest &lt;n&gt; uforbindelige blokke i hukommelsen (standard: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3105,6 +3250,14 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maksimum for afsendelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Nødt til at angive en port med -whitebinde: "%s"</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Videresendelsesvalgmuligheder for knude:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Acceptér kun blokkæde, som matcher indbyggede kontrolposter (standard: 1)</translation>
@@ -3138,16 +3291,16 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Slør tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kør en tråd for at rydde tegnebog periodisk (standard: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Videresend og mine databærer-transaktioner (standard: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-indstillinger: (se Bitcoin Wiki for SSL-opsætningsinstruktioner)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Videresend ikke-P2SH multisig (standard: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Send kommando til Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Kør en tråd for at rydde tegnebog periodisk (standard: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3165,10 +3318,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle tilvalg for fejlsøgning (brug: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Vis information om ydelsesmåling (standard: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Formindsk debug.log filen ved klientopstart (standard: 1 hvis ikke -debug)</translation>
@@ -3181,14 +3330,14 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Angiv tilslutningstimeout i millisekunder (standard: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Start Bitcoin Core-tjeneste</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systemfejl: </translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Dette er eksperimentelt software.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transaktionsbeløb er for lavt</translation>
@@ -3201,6 +3350,10 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Transaction too large</source>
         <translation>Transaktionen er for stor</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Ikke i stand til at tildele til %s på denne computer (bind returnerede fejl %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Brug UPnP til at konfigurere den lyttende port (standard: 0)</translation>
@@ -3213,6 +3366,10 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Username for JSON-RPC connections</source>
         <translation>Brugernavn til JSON-RPC-forbindelser</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Det var nødvendigt at genskrive tegnebogen: genstart Bitcoin Core for at gennemføre</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Advarsel</translation>
@@ -3221,6 +3378,14 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Advarsel: Denne version er forældet, opgradering påkrævet!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Advarsel: Ikke understøttet argument -benchmark ignoreret, brug -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Advarsel: Ikke understøttet argument -debugnet ignoreret, brug -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Zapper alle transaktioner fra tegnebog …</translation>
@@ -3229,10 +3394,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>on startup</source>
         <translation>under opstart</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>version</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat ødelagt, redning af data mislykkedes</translation>
@@ -3241,14 +3402,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Password for JSON-RPC connections</source>
         <translation>Adgangskode til JSON-RPC-forbindelser</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Tillad JSON-RPC-forbindelser fra bestemt IP-adresse</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Send kommandoer til knude, der kører på &lt;ip&gt; (standard: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Udfør kommando, når den bedste blok ændres (%s i kommandoen erstattes med blokhash)</translation>
@@ -3281,10 +3434,6 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>This help message</source>
         <translation>Denne hjælpebesked</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Kunne ikke tildele %s på denne computer (bind returnerede fejl %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Tillad DNS-opslag for -addnode, -seednode og -connect</translation>
@@ -3297,41 +3446,29 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fejl ved indlæsning af wallet.dat: Tegnebog ødelagt</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Fejl ved indlæsning af wallet.dat: Tegnebog kræver en nyere version af Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Det var nødvendigt at genskrive tegnebogen: genstart Bitcoin for at gennemføre</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fejl ved indlæsning af wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ugyldig -proxy adresse: &quot;%s&quot;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ugyldig -proxy adresse: "%s"</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Ukendt netværk anført i -onlynet: &quot;%s&quot;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Ukendt netværk anført i -onlynet: "%s"</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Ukendt -socks proxy-version: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Kan ikke finde -bind adressen: "%s"</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kan ikke finde -bind adressen: &quot;%s&quot;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Kan ikke finde -externalip adressen: "%s"</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kan ikke finde -externalip adressen: &quot;%s&quot;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: &quot;%s&quot;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: "%s"</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +3514,5 @@ fx: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error</source>
         <translation>Fejl</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Du skal angive rpcpassword=&lt;adgangskode&gt; i konfigurationsfilen:
-%s
-Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 888b48c251f4..667f0eb23999 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Über Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;&quot;Bitcoin Core&quot;&lt;/b&gt;-Version</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Dies ist experimentelle Software.
-
-Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder http://www.opensource.org/licenses/mit-license.php.
-
-Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit (https://www.openssl.org) entwickelt wird, sowie von Eric Young (eay@cryptsoft.com) geschriebene kryptographische Software und von Thomas Bernard geschriebene UPnP-Software.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Urheberrecht</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Die &quot;Bitcoin Core&quot;-Entwickler</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-Bit)</translation>
-    </message>
-</context>
+<TS language="de" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -104,11 +67,11 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Dies sind ihre Bitcoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Bitcoins überweisen.</translation>
+        <translation>Dies sind Ihre Bitcoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Bitcoins überweisen.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Dies sind ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es wird empfohlen für jede Transaktion eine neue Empfangsadresse zu verwenden.</translation>
+        <translation>Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es wird empfohlen für jede Transaktion eine neue Empfangsadresse zu verwenden.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -131,8 +94,8 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <translation>Exportieren fehlgeschlagen</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.</translation>
     </message>
 </context>
 <context>
@@ -166,11 +129,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Neue Passphrase wiederholen</translation>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Geben Sie die neue Passphrase für die Wallet ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;10 oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;8 oder mehr Wörtern&lt;/b&gt;.</translation>
+        <translation>Neue Passphrase bestätigen</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -178,7 +137,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entsperren.</translation>
+        <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Wallet zu entsperren.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -186,7 +145,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entschlüsseln.</translation>
+        <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Wallet zu entschlüsseln.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -206,11 +165,11 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Warnung: Wenn Sie ihre Wallet verschlüsseln und ihre Passphrase verlieren, werden Sie &lt;b&gt;alle ihre Bitcoins verlieren&lt;/b&gt;!</translation>
+        <translation>Warnung: Wenn Sie Ihre Wallet verschlüsseln und Ihre Passphrase verlieren, werden Sie &lt;b&gt;alle Ihre Bitcoins verlieren&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>Sind Sie sich sicher, dass Sie ihre Wallet verschlüsseln möchten?</translation>
+        <translation>Sind Sie sich sicher, dass Sie Ihre Wallet verschlüsseln möchten?</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>
@@ -224,9 +183,13 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <source>Wallet encrypted</source>
         <translation>Wallet verschlüsselt</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Geben Sie die neue Passphrase für die Wallet ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;zehn oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;acht oder mehr Wörtern&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl ihrer Bitcoins durch Schadsoftware schützt, die ihren Computer befällt.</translation>
+        <translation>Bitcoin wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadprogramme schützt, die Ihren Computer befällt.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -295,10 +258,6 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <source>Quit application</source>
         <translation>Anwendung beenden</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Informationen über Bitcoin anzeigen</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Über &amp;Qt</translation>
@@ -335,6 +294,10 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <source>Open &amp;URI...</source>
         <translation>&amp;URI öffnen...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>"Bitcoin Core"-Client</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importiere Blöcke von Datenträger...</translation>
@@ -387,6 +350,10 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <source>&amp;Receive</source>
         <translation>&amp;Empfangen</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Informationen über Bitcoin Core anzeigen</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Anzeigen / Verstecken</translation>
@@ -397,11 +364,11 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Verschlüsselt die zu ihrer Wallet gehörenden privaten Schlüssel</translation>
+        <translation>Verschlüsselt die zu Ihrer Wallet gehörenden privaten Schlüssel</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Nachrichten signieren, um den Besitz ihrer Bitcoin-Adressen zu beweisen</translation>
+        <translation>Nachrichten signieren, um den Besitz Ihrer Bitcoin-Adressen zu beweisen</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
@@ -433,7 +400,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Zahlungen anfordern (erzeugt QR-Codes und &quot;bitcoin:&quot;-URIs)</translation>
+        <translation>Zahlungen anfordern (erzeugt QR-Codes und "bitcoin:"-URIs)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -449,7 +416,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>Eine &quot;bitcoin:&quot;-URI oder Zahlungsanforderung öffnen</translation>
+        <translation>Eine "bitcoin:"-URI oder Zahlungsanforderung öffnen</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
@@ -457,11 +424,7 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Zeige den &quot;Bitcoin Core&quot;-Hilfetext, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten</translation>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-Client</translation>
+        <translation>Zeige den "Bitcoin Core"-Hilfetext, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -471,10 +434,6 @@ Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im Open
         <source>No block source available...</source>
         <translation>Keine Blockquelle verfügbar...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 von (geschätzten) %2 Blöcken des Transaktionsverlaufs verarbeitet.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation>
@@ -558,10 +517,6 @@ Adresse: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;gesperrt&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ein schwerer Fehler ist aufgetreten. Bitcoin kann nicht stabil weiter ausgeführt werden und wird beendet.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -574,7 +529,7 @@ Adresse: %4</translation>
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation>&quot;Coin Control&quot;-Adressauswahl</translation>
+        <translation>"Coin Control"-Adressauswahl</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -597,8 +552,8 @@ Adresse: %4</translation>
         <translation>Gebühr:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Zu geringer Ausgabebetrag:</translation>
+        <source>Dust:</source>
+        <translation>"Dust":</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -689,8 +644,8 @@ Adresse: %4</translation>
         <translation>Priorität kopieren</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Zu geringen Ausgabebetrag kopieren</translation>
+        <source>Copy dust</source>
+        <translation>"Dust" kopieren</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -741,8 +696,8 @@ Adresse: %4</translation>
         <translation>keine</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>&quot;Dust&quot;</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Kann pro Eingabe um +/- %1 Satoshi(s) abweichen.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -769,25 +724,13 @@ Adresse: %4</translation>
         <translation>Transaktionen mit höherer Priorität haben eine größere Chance in einen Block aufgenommen zu werden.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Diese Bezeichnung wird rot, wenn die Priorität niedriger als &quot;mittel&quot; ist.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Diese Bezeichnung wird rot, wenn die Priorität niedriger als "mittel" ist.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Diese Bezeichnung wird rot, wenn irgendein Empfänger einen Betrag kleiner als %1 erhält.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Das bedeutet, dass eine Gebühr von mindestens %1 erforderlich ist.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Beträge kleiner als das 0,546-fache der niedrigsten Vermittlungsgebühr werden als &quot;Dust&quot; angezeigt.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Diese Bezeichnung wird rot, wenn das Wechselgeld weniger als %1 ist.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(keine Bezeichnung)</translation>
@@ -840,12 +783,12 @@ Adresse: %4</translation>
         <translation>Zahlungsadresse bearbeiten</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Die eingegebene Adresse &quot;%1&quot; befindet sich bereits im Adressbuch.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Die eingegebene Adresse &quot;%1&quot; ist keine gültige Bitcoin-Adresse.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Die eingegebene Adresse "%1" ist keine gültige Bitcoin-Adresse.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -881,10 +824,6 @@ Adresse: %4</translation>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Kommandozeilenoptionen</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -893,6 +832,18 @@ Adresse: %4</translation>
         <source>version</source>
         <translation>Version</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-Bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Über Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Kommandozeilenoptionen</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Benutzung:</translation>
@@ -906,8 +857,8 @@ Adresse: %4</translation>
         <translation>UI-Optionen</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Sprache festlegen, z.B. &quot;de_DE&quot; (Standard: Systemstandard)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Sprache festlegen, z.B. "de_DE" (Standard: Systemstandard)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -953,12 +904,12 @@ Adresse: %4</translation>
         <translation>Ein benutzerdefiniertes Datenverzeichnis verwenden:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Fehler: Angegebenes Datenverzeichnis &quot;%1&quot; kann nicht angelegt werden.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Fehler: Angegebenes Datenverzeichnis "%1" kann nicht angelegt werden.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1008,7 +959,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Optionale Transaktionsgebühr pro kB, die sicherstellt, dass ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation>
+        <translation>Optionale Transaktionsgebühr pro kB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
@@ -1034,6 +985,14 @@ Adresse: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Anzahl an Skript-&amp;Verifizierungs-Threads</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Eingehende Verbindungen annehmen</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Erlaubt eingehende Verbindungen</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Über einen SOCKS-Proxy mit dem Bitcoin-Netzwerk verbinden.</translation>
@@ -1048,7 +1007,7 @@ Adresse: %4</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>Externe URLs (z.B. ein Block-Explorer), die im Kontextmenü des Transaktionsverlaufs eingefügt werden. In der URL wird %s durch den Transaktionshash ersetzt. Bei Angabe mehrerer URLs müssen diese durch &quot;|&quot; voneinander getrennt werden.</translation>
+        <translation>Externe URLs (z.B. ein Block-Explorer), die im Kontextmenü des Transaktionsverlaufs eingefügt werden. In der URL wird %s durch den Transaktionshash ersetzt. Bei Angabe mehrerer URLs müssen diese durch "|" voneinander getrennt werden.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
@@ -1084,7 +1043,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation>&quot;&amp;Coin Control&quot;-Funktionen aktivieren</translation>
+        <translation>"&amp;Coin Control"-Funktionen aktivieren</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>
@@ -1096,7 +1055,7 @@ Adresse: %4</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>Automatisch den Bitcoin-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn ihr Router UPnP unterstützt und dies aktiviert ist.</translation>
+        <translation>Automatisch den Bitcoin-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
@@ -1114,14 +1073,6 @@ Adresse: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port des Proxies (z.B. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS-&amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS-Version des Proxies (z.B. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Programmfenster</translation>
@@ -1136,7 +1087,7 @@ Adresse: %4</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 Quit in the menu.</source>
-        <translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über &quot;Beenden&quot; im Menü schließen.</translation>
+        <translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über "Beenden" im Menü schließen.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1162,17 +1113,9 @@ Adresse: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Wählen Sie die standardmäßige Untereinheit, die in der Benutzeroberfläche und beim Überweisen von Bitcoins angezeigt werden soll.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Legt fest, ob Bitcoin-Adressen im Transaktionsverlauf angezeigt werden.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Adressen im Transaktionsverlauf &amp;anzeigen</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation>Legt fest, ob die &quot;Coin Control&quot;-Funktionen angezeigt werden.</translation>
+        <translation>Legt fest, ob die "Coin Control"-Funktionen angezeigt werden.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1225,6 +1168,10 @@ Adresse: %4</translation>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Beobachtet:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Verfügbar:</translation>
@@ -1257,6 +1204,22 @@ Adresse: %4</translation>
         <source>Your current total balance</source>
         <translation>Aktueller Gesamtbetrag aus obigen Kategorien</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Ihr aktueller Kontostand beobachteter Adressen</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Unbestätigte Transaktionen von beobachteten Adressen</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Erarbeiteter Betrag in beobachteten Adressen der noch nicht gereift ist</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Aktueller Gesamtbetrag in beobachteten Adressen aus obigen Kategorien</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Letzte Transaktionen&lt;/b&gt;</translation>
@@ -1273,40 +1236,52 @@ Adresse: %4</translation>
         <translation>URI-Verarbeitung</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige Bitcoin-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Ungültige Zahlungsadresse %1</translation>
     </message>
     <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Angeforderter Zahlungsbetrag in Höhe von %1 ist zu niedrig und wurde als &quot;Dust&quot; eingestuft.</translation>
+        <source>Payment request rejected</source>
+        <translation>Zahlungsanforderung abgelehnt</translation>
     </message>
     <message>
-        <source>Payment request error</source>
-        <translation>fehlerhafte Zahlungsanforderung</translation>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Netzwerk der Zahlungsanforderung stimmt nicht mit dem Client-Netzwerk überein.</translation>
     </message>
     <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>&quot;bitcoin: Klicken-zum-Bezahlen&quot;-Handler konnte nicht gestartet werden</translation>
+        <source>Payment request has expired.</source>
+        <translation>Zahlungsanforderung ist abgelaufen.</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Netzwerkmanager-Warnung</translation>
+        <source>Payment request is not initialized.</source>
+        <translation>Zahlungsanforderung ist nicht initialisiert.</translation>
     </message>
     <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Ihr aktiver Proxy unterstützt kein SOCKS5, dies wird jedoch für Zahlungsanforderungen über einen Proxy benötigt.</translation>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <translation>Angeforderter Zahlungsbetrag in Höhe von %1 ist zu niedrig und wurde als "Dust" eingestuft.</translation>
+    </message>
+    <message>
+        <source>Payment request error</source>
+        <translation>fehlerhafte Zahlungsanforderung</translation>
+    </message>
+    <message>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation>"bitcoin: Klicken-zum-Bezahlen"-Handler konnte nicht gestartet werden</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Abruf-URL der Zahlungsanforderung ist ungültig: %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 kann nicht analysiert werden! Dies kann durch eine ungültige Bitcoin-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Zahlungsanforderungsdatei-Verarbeitung</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Zahlungsanforderungsdatei kann nicht gelesen oder verarbeitet werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Zahlungsanforderungsdatei kann nicht gelesen werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1321,8 +1296,8 @@ Adresse: %4</translation>
         <translation>Kommunikationsfehler mit %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Zahlungsanforderung kann nicht analysiert oder verarbeitet werden!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Zahlungsanforderung kann nicht verarbeitet werden!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1337,31 +1312,66 @@ Adresse: %4</translation>
         <translation>fehlerhafte Netzwerkanfrage</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>User-Agent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresse/Hostname</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Pingzeit</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Betrag</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Bitcoin-Adresse eingeben (z.B. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Fehler: Angegebenes Datenverzeichnis &quot;%1&quot; existiert nicht.</translation>
+        <source>NETWORK</source>
+        <translation>NETZWERK</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Fehler: Konfigurationsdatei kann nicht analysiert werden: %1. Bitte nur &quot;Schlüssel=Wert&quot;-Syntax verwenden.</translation>
+        <source>UNKNOWN</source>
+        <translation>UNBEKANNT</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Fehler: Ungültige Kombination von -regtest und -testnet.</translation>
+        <source>None</source>
+        <translation>Keine</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core wurde noch nicht sicher beendet...</translation>
+        <source>N/A</source>
+        <translation>k.A.</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1399,7 +1409,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>&amp;Information</translation>
+        <translation>Hinweis</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1413,6 +1423,10 @@ Adresse: %4</translation>
         <source>Using OpenSSL version</source>
         <translation>Verwendete OpenSSL-Version</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Verwendete BerkeleyDB-Version</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Startzeit</translation>
@@ -1438,8 +1452,76 @@ Adresse: %4</translation>
         <translation>Aktuelle Anzahl Blöcke</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Geschätzte Gesamtzahl Blöcke</translation>
+        <source>Received</source>
+        <translation>Empfangen</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Übertragen</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Gegenstellen</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Gegenstelle auswählen, um detaillierte Informationen zu erhalten.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Richtung</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Version</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User-Agent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Dienste</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Sync-Knoten</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Start-Höhe</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Sync-Höhe</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Sperrpunktzahl</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Verbindungsdauer</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Letzte Übertragung</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Letzter Empfang</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Übertragene Byte</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Empfangene Byte</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Pingzeit</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1463,7 +1545,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation>Summen</translation>
+        <translation>Gesamtbetrag:</translation>
     </message>
     <message>
         <source>In:</source>
@@ -1518,16 +1600,36 @@ Adresse: %4</translation>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>über %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>nie</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>eingehend</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>ausgehend</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Ja</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>No</source>
+        <translation>Nein</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Unbekannt</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Aktualisiere...</translation>
     </message>
 </context>
 <context>
@@ -1707,7 +1809,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation>&quot;Coin Control&quot;-Funktionen</translation>
+        <translation>"Coin Control"-Funktionen</translation>
     </message>
     <message>
         <source>Inputs...</source>
@@ -1741,10 +1843,6 @@ Adresse: %4</translation>
         <source>Fee:</source>
         <translation>Gebühr:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Zu geringer Ausgabebetrag:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Abzüglich Gebühr:</translation>
@@ -1773,6 +1871,10 @@ Adresse: %4</translation>
         <source>Clear all fields of the form.</source>
         <translation>Alle Formularfelder zurücksetzen.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>"Dust":</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Zurücksetzen</translation>
@@ -1821,10 +1923,6 @@ Adresse: %4</translation>
         <source>Copy priority</source>
         <translation>Priorität kopieren</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Zu geringen Ausgabebetrag kopieren</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Wechselgeld kopieren</translation>
@@ -1847,11 +1945,11 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation>Der angegebene Betrag übersteigt ihren Kontostand.</translation>
+        <translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 ihren Kontostand.</translation>
+        <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -1863,7 +1961,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
+        <translation>Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
@@ -1877,6 +1975,10 @@ Adresse: %4</translation>
         <source>Warning: Unknown change address</source>
         <translation>Warnung: Unbekannte Wechselgeld-Adresse</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>"Dust" kopieren</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Wollen Sie die Überweisung ausführen?</translation>
@@ -1885,14 +1987,6 @@ Adresse: %4</translation>
         <source>added as transaction fee</source>
         <translation>als Transaktionsgebühr hinzugefügt</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Zahlungsanforderung abgelaufen</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Ungültige Zahlungsadresse %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1904,10 +1998,6 @@ Adresse: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>E&amp;mpfänger:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die Zahlungsadresse der Überweisung (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation>
@@ -1924,6 +2014,10 @@ Adresse: %4</translation>
         <source>This is a normal payment.</source>
         <translation>Dies ist eine normale Überweisung.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Die Zahlungsadresse der Überweisung</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1954,7 +2048,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation>Eine an die &quot;bitcoin:&quot;-URI angefügte Nachricht, die zusammen mit der Transaktion gespeichert wird. Hinweis: Diese Nachricht wird nicht über das Bitcoin-Netzwerk gesendet.</translation>
+        <translation>Eine an die "bitcoin:"-URI angefügte Nachricht, die zusammen mit der Transaktion gespeichert wird. Hinweis: Diese Nachricht wird nicht über das Bitcoin-Netzwerk gesendet.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
@@ -1992,11 +2086,11 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Sie können Nachrichten mit ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation>
+        <translation>Sie können Nachrichten mit Ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die Adresse mit der die Nachricht signiert wird (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Die Bitcoin-Adresse mit der die Nachricht signiert wird</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2036,7 +2130,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation>Alle &quot;Nachricht signieren&quot;-Felder zurücksetzen</translation>
+        <translation>Alle "Nachricht signieren"-Felder zurücksetzen</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -2051,8 +2145,8 @@ Adresse: %4</translation>
         <translation>Geben Sie die signierende Adresse, 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.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Die Adresse mit der die Nachricht signiert wurde (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Die Bitcoin-Adresse mit der die Nachricht signiert wurde</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2064,15 +2158,11 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation>Alle &quot;Nachricht verifizieren&quot;-Felder zurücksetzen</translation>
+        <translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin-Adresse eingeben (z.B. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Auf &quot;Nachricht signieren&quot; klicken, um die Signatur zu erzeugen</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2112,7 +2202,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>Die Signatur entspricht nicht dem &quot;Message Digest&quot;.</translation>
+        <translation>Die Signatur entspricht nicht dem "Message Digest".</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -2131,7 +2221,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation>Die &quot;Bitcoin Core&quot;-Entwickler</translation>
+        <translation>Die "Bitcoin Core"-Entwickler</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2199,6 +2289,10 @@ Adresse: %4</translation>
         <source>own address</source>
         <translation>eigene Adresse</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>beobachtet</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>Bezeichnung</translation>
@@ -2219,6 +2313,14 @@ Adresse: %4</translation>
         <source>Debit</source>
         <translation>Belastung</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Gesamtbelastung</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Gesamtgutschrift</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transaktionsgebühr</translation>
@@ -2244,8 +2346,8 @@ Adresse: %4</translation>
         <translation>Händler</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Erzeugte Bitcoins müssen %1 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block erzeugten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in &quot;nicht angenommen&quot; geändert und Sie werden keine Bitcoins gutgeschrieben bekommen. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich erzeugt.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Erzeugte Bitcoins müssen %1 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block erzeugten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in "nicht angenommen" geändert und Sie werden keine Bitcoins gutgeschrieben bekommen. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich erzeugt.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2309,10 +2411,6 @@ Adresse: %4</translation>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Betrag</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Unreif (%1 Bestätigungen, wird verfügbar sein nach %2)</translation>
@@ -2391,7 +2489,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
-        <translation>Zieladresse der Transaktion</translation>
+        <translation>Zieladresse der Transaktion.</translation>
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
@@ -2426,7 +2524,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Range...</source>
-        <translation>Zeitraum...</translation>
+        <translation>Zeitraum</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2524,10 +2622,6 @@ Adresse: %4</translation>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Betrag</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,6 +2635,13 @@ Adresse: %4</translation>
         <translation>bis</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Die Einheit in der Beträge angezeigt werden. Klicken, um eine andere Einheit auszuwählen.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2592,18 +2693,6 @@ Adresse: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Benutzung:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Befehle auflisten</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Hilfe zu einem Befehl erhalten</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Optionen:</translation>
@@ -2644,10 +2733,6 @@ Adresse: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Beim Einrichten des RPC-Ports %u zum Abhören von IPv4 ist ein Fehler aufgetreten: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>&lt;port&gt; nach JSON-RPC-Verbindungen abhören (Standard: 8332 oder Testnetz: 18332)</translation>
@@ -2656,10 +2741,6 @@ Adresse: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Kommandozeilen- und JSON-RPC-Befehle annehmen</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>&quot;Bitcoin Core&quot;-RPC-Client-Version</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Als Hintergrunddienst ausführen und Befehle annehmen</translation>
@@ -2682,7 +2763,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben:
 %s
@@ -2693,53 +2774,41 @@ rpcpassword=%s
 Der Benutzername und das Passwort dürfen NICHT identisch sein.
 Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
 Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden;
-zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@foo.com
+zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Zulässige Chiffren (Standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Beim Einrichten des RPC-Ports %u zum Abhören von IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 &quot;[Host]:Port&quot;-Schreibweise verwenden</translation>
+        <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Schreibweise verwenden</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Anzahl der freien Transaktionen auf &lt;n&gt; * 1000 Byte pro Minute begrenzen (Standard: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können. Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Alle Wallet-Transaktionen löschen und nur diese Teilbereiche der Blockkette durch -rescan beim Starten wiederherstellen</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Fehler: Abhören nach eingehenden Verbindungen fehlgeschlagen (Fehler %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
+        <translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung erst kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation>
+        <translation>Fehler: Diese Transaktion benötigt aufgrund Ihres Betrags, Ihrer Komplexität oder der Nutzung erst kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die TxID ersetzt)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Niedrigere Gebühren als diese werden als gebührenfrei angesehen (bei der Transaktionserstellung) (Standard:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: 100)</translation>
@@ -2776,17 +2845,13 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen ihres Computers, da Bitcoin ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Warnung: Das Netzwerk scheint nicht vollständig übereinzustimmen! Einige Miner scheinen Probleme zu haben.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Warnung: Wir scheinen nicht vollständig mit unseren Gegenstellen übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen ihre Client-Software aktualisieren.</translation>
+        <translation>Warnung: Wir scheinen nicht vollständig mit unseren Gegenstellen übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen Ihre Client-Software aktualisieren.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2794,7 +2859,7 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Warnung: wallet.dat beschädigt, Datenrettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation>
+        <translation>Warnung: wallet.dat beschädigt, Datenrettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2812,30 +2877,14 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Versuchen, private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>&quot;Bitcoin Core&quot;-Hintergrunddienst</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blockerzeugungsoptionen:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Liste der Wallet-Transaktionen zurücksetzen (Diagnosetool; beinhaltet -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Mit nur dem oder den angegebenen Knoten verbinden</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Über einen SOCKS-Proxy verbinden</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Mit JSON-RPC auf &lt;port&gt; verbinden (Standard: 8332 oder Testnetz: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Verbindungsoptionen:</translation>
@@ -2936,18 +2985,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Failed to write undo data</source>
         <translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Gebühr pro kB, die gesendeten Transaktionen hinzugefügt wird</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Niedrigere Gebühren als diese werden als gebührenfrei angesehen (bei der Vermittlung) (Standard:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Gegenstellen via DNS-Abfrage finden (Standard: 1, außer bei -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Sicherheitsmodus erzwingen (Standard: 0)</translation>
@@ -2973,8 +3010,8 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <translation>Fehlerhafter oder kein Genesis-Block gefunden. Falsches Datenverzeichnis für das Netzwerk?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Ungültige &quot;-onion&quot;-Adresse: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Ungültige "-onion"-Adresse: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2984,18 +3021,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC-Client-Optionen:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>SOCKS-Version des Proxies wählen (4 oder 5, Standard: 5)</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>
@@ -3017,12 +3046,12 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <translation>Unbestätigtes Wechselgeld beim Senden von Transaktionen ausgeben (Standard: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Beenden, nachdem Blöcke vom Datenträger importiert wurden (Standard: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Benutzung (veraltet, bitte bitcoin-cli verwenden):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3032,10 +3061,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Verifying wallet...</source>
         <translation>Verifiziere Wallet...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Warten, bis der RPC-Server gestartet ist</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Wallet %s liegt außerhalb des Datenverzeichnisses %s</translation>
@@ -3044,10 +3069,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Wallet options:</source>
         <translation>Wallet-Optionen:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Warnung: Veraltetes Argument -debugnet gefunden, bitte -debug=net verwenden</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern</translation>
@@ -3056,14 +3077,38 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Blöcke aus externer Datei blk000??.dat importieren</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(Standard: 1, 1 = TX-Metadaten wie z.B. Accountbesitzer und Zahlungsanforderungsinformationen behalten, 2 = TX-Metadaten verwerfen)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Datenverzeichnis %s kann nicht gesperrt werden, da Bitcoin Core wahrscheinlich bereits gestartet wurde.</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Fehler: Abhören nach eingehenden Verbindungen fehlgeschlagen (listen meldete Fehler %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Fehler: Nicht unterstütztes Argument -socks gefunden. Das Festlegen der SOCKS-Version ist nicht mehr möglich, nur noch SOCKS5-Proxies werden unterstützt.</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Befehl ausführen wenn ein relevanter Alarm empfangen wird oder wir einen wirklich langen Fork entdecken (%s im Befehl wird durch die Nachricht ersetzt)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Vermittlung als gebührenfrei angesehen (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Debugginginformationen ausgeben (Standard: 0, &lt;category&gt; anzugeben ist optional)</translation>
@@ -3072,17 +3117,45 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Maximale Größe in Byte von Transaktionen hoher Priorität/mit niedrigen Gebühren festlegen (Standard: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit &lt;https://www.openssl.org/&gt; entwickelt wird, sowie von Eric Young geschriebene kryptographische Software und von Thomas Bernard geschriebene UPnP-Software.</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>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Bitcoin Core ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Über einen SOCKS5-Proxy &amp;verbinden</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Urheberrecht (C) 2009-%i Die "Bitcoin Core"-Entwickler</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Der Wert %s von -rpcbind wurde nicht als Netzwerkadresse erkannt</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Fehler beim Laden von wallet.dat: Wallet benötigt neuere Version von Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Fehler: Nicht unterstütztes Argument -tor gefunden, bitte -onion verwenden.</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Hinweis</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3104,6 +3177,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maximale Größe des Sendepuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: 1000)</translation>
     </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Knoten-Vermittlungsoptionen:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Blockkette nur als gültig ansehen, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation>
@@ -3140,14 +3217,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Einen Thread starten, der periodisch die Wallet sicher auf den Datenträger schreibt (Standard: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-Optionen (siehe Bitcoin-Wiki für SSL-Einrichtungssanweisungen):</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Befehl an Bitcoin Core senden</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>
@@ -3164,10 +3233,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zeige alle Debuggingoptionen (Benutzung: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Zeige Benchmarkinformationen (Standard: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Protokolldatei debug.log beim Starten des Clients kürzen (Standard: 1, wenn kein -debug)</translation>
@@ -3180,14 +3245,14 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Verbindungzeitüberschreitung in Millisekunden festlegen (Standard: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>&quot;Bitcoin Core&quot;-Hintergrunddienst starten</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systemfehler: </translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Dies ist experimentelle Software.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transaktionsbetrag zu niedrig</translation>
@@ -3212,6 +3277,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Username for JSON-RPC connections</source>
         <translation>Benutzername für JSON-RPC-Verbindungen</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Wallet musste neu geschrieben werden: starten Sie Bitcoin Core zur Fertigstellung neu</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Warnung</translation>
@@ -3220,6 +3289,14 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Warnung: Nicht unterstütztes Argument -benchmark wurde ignoriert, bitte -debug=bench verwenden.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Warnung: Nicht unterstütztes Argument -debugnet wurde ignoriert, bitte -debug=net verwenden.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Lösche alle Transaktionen aus Wallet...</translation>
@@ -3228,10 +3305,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>on startup</source>
         <translation>beim Starten</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>Version</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat beschädigt, Datenrettung fehlgeschlagen</translation>
@@ -3240,14 +3313,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Password for JSON-RPC connections</source>
         <translation>Passwort für JSON-RPC-Verbindungen</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Sende Befehle an Knoten &lt;ip&gt; (Standard: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Befehl ausführen wenn der beste Block wechselt (%s im Befehl wird durch den Hash des Blocks ersetzt)</translation>
@@ -3280,10 +3345,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>This help message</source>
         <translation>Dieser Hilfetext</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Erlaube DNS-Abfragen für -addnode, -seednode und -connect</translation>
@@ -3296,41 +3357,29 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fehler beim Laden von wallet.dat: Wallet beschädigt</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Fehler beim Laden von wallet.dat: Wallet benötigt neuere Version von Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Wallet musste neu geschrieben werden: starten Sie Bitcoin zur Fertigstellung neu</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fehler beim Laden von wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ungültige Adresse in -proxy: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Unbekannter Netztyp in -onlynet angegeben: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ungültige Adresse in -proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Unbekannte Proxyversion in -socks angefordert: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kann Adresse in -bind nicht auflösen: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Kann Adresse in -bind nicht auflösen: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kann Adresse in -externalip nicht auflösen: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Kann Adresse in -externalip nicht auflösen: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +3425,5 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Bitcoin Alert\&quot; admin@f
         <source>Error</source>
         <translation>Fehler</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Sie müssen den Wert rpcpassword=&lt;passwort&gt; in der Konfigurationsdatei angeben:
-%s
-Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index e957a0088eba..d5e9b57d99a7 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Σχετικά με το Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; έκδοση</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Πνευματική ιδιοκτησία </translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Οι προγραμματιστές του Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="el_GR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -88,11 +51,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Επιλογή διεύθυνσης απ&apos; όπου θα ληφθούν νομίσματα</translation>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>Επιλογή διεύθυνσης απ' όπου θα ληφθούν νομίσματα</translation>
     </message>
     <message>
         <source>Sending addresses</source>
@@ -106,10 +65,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Αυτές είναι οι Bitcoin διευθύνσεις σας για να λαμβάνετε πληρωμές. Δίνοντας μία ξεχωριστή διεύθυνση σε κάθε αποστολέα, θα μπορείτε να ελέγχετε ποιος σας πληρώνει.</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Αντιγραφή &amp;επιγραφής</translation>
@@ -130,11 +85,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>Η εξαγωγή απέτυχε</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Παρουσιάστηκε σφάλμα κατά την αποθήκευση της λίστας πορτοφολιών στο %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +119,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Επανέλαβε τον νέο κωδικό πρόσβασης</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Εισάγετε τον νέο κωδικό πρόσβασης στον πορτοφόλι &lt;br/&gt; Παρακαλώ χρησιμοποιείστε ένα κωδικό με &lt;b&gt; 10 ή περισσότερους τυχαίους χαρακτήρες&lt;/b&gt; ή &lt;b&gt; οχτώ ή παραπάνω λέξεις&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Κρυπτογράφησε το πορτοφόλι</translation>
@@ -272,10 +219,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Επισκόπηση</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Εμφάνισε τη γενική εικόνα του πορτοφολιού</translation>
@@ -296,10 +239,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Εξοδος από την εφαρμογή</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Εμφάνιση πληροφοριών σχετικά με το Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Σχετικά με &amp;Qt</translation>
@@ -324,18 +263,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Άλλαξε κωδικο πρόσβασης</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Εισαγωγή μπλοκ από τον σκληρο δίσκο ... </translation>
@@ -406,7 +333,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Υπογράψτε ένα μήνυμα για ν&apos; αποδείξετε πως ανήκει μια συγκεκριμένη διεύθυνση Bitcoin</translation>
+        <translation>Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως ανήκει μια συγκεκριμένη διεύθυνση Bitcoin</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -448,22 +375,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Προβολή της λίστας των χρησιμοποιημένων διευθύνσεων και ετικετών λήψεως</translation>
     </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Πελάτης Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ενεργή σύνδεση στο δίκτυο Bitcoin</numerusform><numerusform>%n ενεργές συνδέσεις στο δίκτυο Βitcoin</numerusform></translation>
@@ -472,10 +383,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>Η πηγή του μπλοκ δεν ειναι διαθέσιμη... </translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Μεταποιημένα %1 απο %2 (κατ &apos;εκτίμηση) μπλοκ της ιστορίας της συναλλαγής. </translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Έγινε λήψη %1 μπλοκ ιστορικού συναλλαγών</translation>
@@ -560,10 +467,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Το πορτοφόλι είναι &lt;b&gt;κρυπτογραφημένο&lt;/b&gt; και &lt;b&gt;κλειδωμένο&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Παρουσιάστηκε ανεπανόρθωτο σφάλμα. Το Bitcoin δεν μπορεί πλέον να συνεχίσει με ασφάλεια και θα τερματισθει.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -574,10 +477,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Ποσότητα:</translation>
@@ -594,18 +493,6 @@ Address: %4
         <source>Priority:</source>
         <translation>Προτεραιότητα:</translation>
     </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change:</source>
         <translation>Ρέστα:</translation>
@@ -614,14 +501,6 @@ Address: %4
         <source>(un)select all</source>
         <translation>(από)επιλογή όλων</translation>
     </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Ποσό</translation>
@@ -662,26 +541,10 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>Αντιγραφη του ID Συναλλαγής</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>Αντιγραφή ποσότητας</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy bytes</source>
         <translation>Αντιγραφή των byte</translation>
@@ -690,10 +553,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>Αντιγραφή προτεραιότητας</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Αντιγραφή των ρέστων</translation>
@@ -742,10 +601,6 @@ Address: %4
         <source>none</source>
         <translation>κανένα</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
         <translation>ναι</translation>
@@ -754,42 +609,6 @@ Address: %4
         <source>no</source>
         <translation>όχι</translation>
     </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(χωρίς ετικέτα)</translation>
@@ -818,10 +637,6 @@ Address: %4
         <source>The label associated with this address list entry</source>
         <translation>Η ετικέτα που συνδέεται με αυτήν την καταχώρηση στο βιβλίο διευθύνσεων</translation>
     </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Διεύθυνση</translation>
@@ -843,12 +658,12 @@ Address: %4
         <translation>Επεξεργασία διεύθυνσης αποστολής</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Η διεύθυνση &quot;%1&quot; βρίσκεται ήδη στο βιβλίο διευθύνσεων.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Η διεύθυνση "%1" βρίσκεται ήδη στο βιβλίο διευθύνσεων.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Η διεύθυνση &quot;%1&quot; δεν είναι έγκυρη Bitcoin διεύθυνση.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Η διεύθυνση "%1" δεν είναι έγκυρη Bitcoin διεύθυνση.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -869,14 +684,6 @@ Address: %4
         <source>name</source>
         <translation>όνομα</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot create data directory here.</source>
         <translation>Δεν μπορεί να δημιουργηθεί φάκελος δεδομένων εδώ.</translation>
@@ -884,10 +691,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -896,6 +699,18 @@ Address: %4
         <source>version</source>
         <translation>έκδοση</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Σχετικά με το Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>επιλογής γραμμής εντολών</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Χρήση:</translation>
@@ -909,26 +724,18 @@ Address: %4
         <translation>επιλογές UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Όρισε γλώσσα, για παράδειγμα &quot;de_DE&quot;(προεπιλογή:τοπικές ρυθμίσεις)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Όρισε γλώσσα, για παράδειγμα "de_DE"(προεπιλογή:τοπικές ρυθμίσεις)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Έναρξη ελαχιστοποιημένο</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Εμφάνισε την οθόνη εκκίνησης κατά την εκκίνηση(προεπιλογή:1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -943,10 +750,6 @@ Address: %4
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
         <translation>Καθώς αυτή είναι η πρώτη φορά που εκκινείται το πρόγραμμα, μπορείτε να διαλέξετε πού θα αποθηκεύει το Bitcoin Core τα δεδομένα του.</translation>
     </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Χρήση του προεπιλεγμένου φακέλου δεδομένων</translation>
@@ -956,12 +759,8 @@ Address: %4
         <translation>Προσαρμογή του φακέλου δεδομένων: </translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Σφάλμα: Ο καθορισμένος φάκελος δεδομένων &quot;%1&quot; δεν μπορεί να δημιουργηθεί.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -978,27 +777,7 @@ Address: %4
 </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1025,42 +804,10 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Έναρξη του Βιtcoin κατά την εκκίνηση του συστήματος</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Επαναφορα όλων των επιλογων του πελάτη σε default.</translation>
@@ -1073,30 +820,10 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;Δίκτυο</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Expert</source>
         <translation>Έμπειρος</translation>
     </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>
@@ -1117,14 +844,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Θύρα διαμεσολαβητή</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Έκδοση:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS εκδοση του διαμεσολαβητη (e.g. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Παράθυρο</translation>
@@ -1165,18 +884,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Διαλέξτε την προεπιλεγμένη υποδιαίρεση που θα εμφανίζεται όταν στέλνετε νομίσματα.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Επιλέξτε αν θέλετε να εμφανίζονται οι διευθύνσεις Bitcoin στη λίστα συναλλαγών.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Εμφάνιση διευθύνσεων στη λίστα συναλλαγών</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;ΟΚ</translation>
@@ -1201,14 +908,6 @@ Address: %4
         <source>Client restart required to activate changes.</source>
         <translation>Χρειάζεται επανεκκίνηση του προγράμματος για να ενεργοποιηθούν οι αλλαγές.</translation>
     </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή</translation>
@@ -1236,10 +935,6 @@ Address: %4
         <source>Your current spendable balance</source>
         <translation>Το τρέχον διαθέσιμο υπόλοιπο</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Το άθροισμα των συναλλαγών που δεν έχουν ακόμα επιβεβαιωθεί και δεν προσμετρώνται στο τρέχον διαθέσιμο υπόλοιπό σας</translation>
@@ -1276,12 +971,8 @@ Address: %4
         <translation>Χειρισμός URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Το URI δεν μπορεί να αναλυθεί! Αυτό μπορεί να προκληθεί από μια μη έγκυρη διεύθυνση Bitcoin ή ακατάλληλη παραμέτρο URI.</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>Μη έγκυρη διεύθυνση πληρωμής %1</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1291,46 +982,6 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Δεν είναι δυνατή η εκκίνηση του Bitcoin: click-to-pay handler</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Πληρωμή αναγνωρίστηκε</translation>
@@ -1340,33 +991,28 @@ Address: %4
         <translation>Σφάλμα αιτήματος δικτύου</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Σφάλμα: Ο καθορισμένος φάκελος δεδομένων &quot;%1&quot; δεν υπάρχει.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Ποσό</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Σφάλμα: Άκυρος συνδυασμός των -regtest και -testnet</translation>
+        <source>%1 h</source>
+        <translation>%1 ώ</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 λ</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Εισάγετε μια διεύθυνση Bitcoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>Μη διαθέσιμο</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1440,10 +1086,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>Τρέχον αριθμός μπλοκ</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Κατ&apos; εκτίμηση συνολικά μπλοκς</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Χρόνος τελευταίου μπλοκ</translation>
@@ -1520,19 +1162,7 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 λ</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 ώ</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 ώ %2 λ</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1547,30 +1177,6 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>&amp;Μήνυμα:</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Καθαρισμός όλων των πεδίων της φόρμας.</translation>
@@ -1579,26 +1185,14 @@ Address: %4
         <source>Clear</source>
         <translation>Καθαρισμός</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;Αίτηση πληρωμής</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>Εμφάνιση</translation>
     </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Remove</source>
         <translation>Αφαίρεση</translation>
@@ -1622,30 +1216,14 @@ Address: %4
         <source>QR Code</source>
         <translation>Κώδικας QR</translation>
     </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Save Image...</source>
         <translation>&amp;Αποθήκευση εικόνας...</translation>
     </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment information</source>
         <translation>Πληροφορίες πληρωμής</translation>
     </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Διεύθυνση</translation>
@@ -1708,14 +1286,6 @@ Address: %4
         <source>Send Coins</source>
         <translation>Αποστολή νομισμάτων</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>automatically selected</source>
         <translation>επιλεγμένο αυτόματα</translation>
@@ -1740,30 +1310,10 @@ Address: %4
         <source>Priority:</source>
         <translation>Προτεραιότητα:</translation>
     </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change:</source>
         <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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Αποστολή σε πολλούς αποδέκτες ταυτόχρονα</translation>
@@ -1808,14 +1358,6 @@ Address: %4
         <source>Copy amount</source>
         <translation>Αντιγραφή ποσού</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy bytes</source>
         <translation>Αντιγραφή των byte</translation>
@@ -1824,10 +1366,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>Αντιγραφή προτεραιότητας</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Αντιγραφή των ρέστων</translation>
@@ -1864,10 +1402,6 @@ Address: %4
         <source>Transaction creation failed!</source>
         <translation>Η δημιουργία της συναλλαγής απέτυχε!</translation>
     </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Προειδοποίηση: Μη έγκυρη διεύθυνση Bitcoin</translation>
@@ -1876,10 +1410,6 @@ Address: %4
         <source>(no label)</source>
         <translation>(χωρίς ετικέτα)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Είστε βέβαιοι για την αποστολή;</translation>
@@ -1888,14 +1418,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>προστέθηκαν ως αμοιβή συναλλαγής</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Έληξε η αίτηση πληρωμής</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Μη έγκυρη διεύθυνση πληρωμής %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1907,10 +1429,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>Πληρωμή &amp;σε:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Διεύθυνση αποστολής της πληρωμής  (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Εισάγετε μια επιγραφή για αυτή τη διεύθυνση ώστε να καταχωρηθεί στο βιβλίο διευθύνσεων</translation>
@@ -1923,10 +1441,6 @@ Address: %4
         <source>Choose previously used address</source>
         <translation>Επιλογή διεύθυνσης που έχει ήδη χρησιμοποιηθεί</translation>
     </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1947,22 +1461,6 @@ Address: %4
         <source>Message:</source>
         <translation>Μήνυμα:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay To:</source>
         <translation>Πληρωμή σε:</translation>
@@ -1995,11 +1493,7 @@ Address: %4
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Μπορείτε να υπογράφετε μηνύματα με τις διευθύνσεις σας, ώστε ν&apos; αποδεικνύετε πως αυτές σας ανήκουν. Αποφεύγετε να υπογράφετε κάτι αόριστο καθώς ενδέχεται να εξαπατηθείτε. Υπογράφετε μόνο πλήρης δηλώσεις με τις οποίες συμφωνείτε.</translation>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Εισάγετε μια διεύθυνση Bitcoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Μπορείτε να υπογράφετε μηνύματα με τις διευθύνσεις σας, ώστε ν' αποδεικνύετε πως αυτές σας ανήκουν. Αποφεύγετε να υπογράφετε κάτι αόριστο καθώς ενδέχεται να εξαπατηθείτε. Υπογράφετε μόνο πλήρης δηλώσεις με τις οποίες συμφωνείτε.</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2031,7 +1525,7 @@ Address: %4
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>Υπογράψτε ένα μήνυμα για ν&apos; αποδείξετε πως σας ανήκει μια συγκεκριμένη διεύθυνση Bitcoin</translation>
+        <translation>Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως σας ανήκει μια συγκεκριμένη διεύθυνση Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
@@ -2053,13 +1547,9 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>Πληκτρολογήστε την υπογραφή διεύθυνσης, μήνυμα (βεβαιωθείτε ότι έχετε αντιγράψει τις αλλαγές γραμμής, κενά, tabs, κ.λπ. ακριβώς) και την υπογραφή παρακάτω, για να ελέγξει το μήνυμα. Να είστε προσεκτικοί για να μην διαβάσετε περισσότερα στην υπογραφή ό, τι είναι στην υπογραφή ίδιο το μήνυμα , για να μην εξαπατηθούν από έναν άνθρωπο -in - the-middle επίθεση.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Εισάγετε μια διεύθυνση Bitcoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>Υπογράψτε ένα μήνυμα για ν&apos; αποδείξετε πως υπογραφθηκε απο μια συγκεκριμένη διεύθυνση Bitcoin</translation>
+        <translation>Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως υπογραφθηκε απο μια συγκεκριμένη διεύθυνση Bitcoin</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
@@ -2070,12 +1560,8 @@ Address: %4
         <translation>Επαναφορά όλων επαλήθευμενων πεδίων μήνυματος </translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Εισάγετε μια διεύθυνση Bitcoin (π.χ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Κάντε κλικ στο &quot;Υπογραφή Μηνύματος&quot; για να λάβετε την υπογραφή</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Κάντε κλικ στο "Υπογραφή Μηνύματος" για να λάβετε την υπογραφή</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2154,10 +1640,6 @@ Address: %4
         <source>Open until %1</source>
         <translation>Ανοιχτό μέχρι %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/χωρίς σύνδεση;</translation>
@@ -2246,10 +1728,6 @@ Address: %4
         <source>Merchant</source>
         <translation>Έμπορος</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Πληροφορίες αποσφαλμάτωσης</translation>
@@ -2276,7 +1754,7 @@ Address: %4
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation>, δεν έχει ακόμα μεταδοθεί μ&apos; επιτυχία</translation>
+        <translation>, δεν έχει ακόμα μεταδοθεί μ' επιτυχία</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2312,14 +1790,6 @@ Address: %4
         <source>Address</source>
         <translation>Διεύθυνση</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Ποσό</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Ανοιχτό για %n μπλοκ</numerusform><numerusform>Ανοιχτό για %n μπλοκ</numerusform></translation>
@@ -2348,14 +1818,6 @@ Address: %4
         <source>Unconfirmed</source>
         <translation>Ανεπιβεβαίωτες</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Παραλαβή με</translation>
@@ -2499,10 +1961,6 @@ Address: %4
         <source>Exporting Successful</source>
         <translation>Επιτυχής εξαγωγή</translation>
     </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Αρχείο οριοθετημένο με κόμματα (*.csv)</translation>
@@ -2527,10 +1985,6 @@ Address: %4
         <source>Address</source>
         <translation>Διεύθυνση</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Ποσό</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2544,6 +1998,9 @@ Address: %4
         <translation>έως</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2580,10 +2037,6 @@ Address: %4
         <source>Backup Failed</source>
         <translation>Αποτυχία κατά τη δημιουργία αντιγράφου</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Τα δεδομένα πορτοφολιού αποθηκεύτηκαν με επιτυχία στο %1.</translation>
@@ -2595,18 +2048,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Χρήση:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Λίστα εντολών</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Επεξήγηση εντολής</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Επιλογές:</translation>
@@ -2647,10 +2088,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Δευτερόλεπτα πριν επιτραπεί ξανά η σύνδεση των προβληματικών peers (προεπιλογή: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ένα σφάλμα συνέβη καθώς προετοιμαζόταν η πόρτα RPC %u για αναμονή IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Εισερχόμενες συνδέσεις JSON-RPC στη θύρα &lt;port&gt; (προεπιλογή: 8332 or testnet: 18332)</translation>
@@ -2659,10 +2096,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Αποδοχή εντολών κονσόλας και JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Εκτέλεση στο παρασκήνιο κι αποδοχή εντολών</translation>
@@ -2685,7 +2118,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, you must set a rpcpassword in the configuration file:
 %s
@@ -2696,37 +2129,13 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ένα σφάλμα συνέβη καθώς προετοιμαζόταν η υποδοχη RPC %u για αναμονη του IPv6, επεσε πισω στο IPv4:%s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Αποθηκευση σε συγκεκριμένη διεύθυνση. Χρησιμοποιήστε τα πλήκτρα [Host] : συμβολισμός θύρα για IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Σφάλμα: Η συναλλαγή απορρίφθηκε.
@@ -2740,58 +2149,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Αυτό είναι ένα προ-τεστ κυκλοφορίας - χρησιμοποιήστε το με δική σας ευθύνη - δεν χρησιμοποιείτε για εξόρυξη ή για αλλες εφαρμογές</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Προειδοποίηση: Η παράμετρος -paytxfee είναι πολύ υψηλή. Πρόκειται για την αμοιβή που θα πληρώνετε για κάθε συναλλαγή που θα στέλνετε.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Προειδοποίηση: Παρακαλώ βεβαιωθείτε πως η ημερομηνία κι ώρα του συστήματός σας είναι σωστές. Αν το ρολόι του υπολογιστή σας πάει λάθος, ενδέχεται να μη λειτουργεί σωστά το Bitcoin.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Προειδοποίηση : Σφάλμα wallet.dat κατα την ανάγνωση ! Όλα τα κλειδιά αναγνωρισθηκαν σωστά, αλλά τα δεδομένα των συναλλαγών ή καταχωρήσεις στο βιβλίο διευθύνσεων μπορεί να είναι ελλιπείς ή λανθασμένα. </translation>
@@ -2808,38 +2173,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>(default: wallet.dat)</source>
         <translation>(προεπιλογή: wallet.dat)</translation>
     </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Προσπάθεια για ανακτησει ιδιωτικων κλειδιων από ενα διεφθαρμένο αρχειο wallet.dat </translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Αποκλεισμός επιλογων δημιουργίας: </translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Σύνδεση μόνο με ορισμένους κόμβους</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Επιλογές σύνδεσης:</translation>
@@ -2848,22 +2193,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Corrupted block database detected</source>
         <translation>Εντοπισθηκε διεφθαρμενη βαση δεδομενων των μπλοκ</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Ανακαλύψτε την δικη σας IP διεύθυνση (προεπιλογή: 1 όταν ακούει και δεν - externalip) </translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Θελετε να δημιουργηθει τωρα η βαση δεδομενων του μπλοκ? </translation>
@@ -2940,22 +2273,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Αποτυχία εγγραφής αναίρεσης δεδομένων </translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Προσθήκη αμοιβής ανά kB στις συναλλαγές που στέλνετε</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Βρες ομότιμους υπολογιστές χρησιμοποιώντας αναζήτηση DNS(προεπιλογή:1)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Δημιουργία νομισμάτων (προκαθορισμος: 0)</translation>
@@ -2965,69 +2282,21 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Πόσα μπλοκ να ελέγχθουν κατά την εκκίνηση (προεπιλογή:288,0=όλα)</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Άκυρη διεύθυνση -onion : &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Άκυρη διεύθυνση -onion : '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Δεν ειναι αρκετες περιγραφες αρχείων διαθέσιμες.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Ορίσμος του αριθμόυ θεματων στην υπηρεσία κλήσεων RPC (προεπιλογή: 4) </translation>
     </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Επαλήθευση των μπλοκ... </translation>
@@ -3036,65 +2305,25 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Επαλήθευση πορτοφολιου... </translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet options:</source>
         <translation>Επιλογές πορτοφολιού:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Πληροφορία</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3116,42 +2345,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation> Συνδέση μόνο σε κόμβους του δικτύου &lt;net&gt; (IPv4, IPv6 ή Tor) </translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Ρυθμίσεις SSL: (ανατρέξτε στο Bitcoin Wiki για οδηγίες ρυθμίσεων SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log</translation>
@@ -3160,18 +2353,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Ορίστε το μέγιστο μέγεθος μπλοκ σε bytes (προεπιλογή: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Συρρίκνωση του αρχείο debug.log κατα την εκκίνηση του πελάτη (προεπιλογή: 1 όταν δεν-debug)</translation>
@@ -3184,10 +2365,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Ορισμός λήξης χρονικού ορίου σε χιλιοστά του δευτερολέπτου(προεπιλογή:5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Λάθος Συστήματος:</translation>
@@ -3224,18 +2401,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Προειδοποίηση: Αυτή η έκδοση είναι ξεπερασμένη, απαιτείται αναβάθμιση </translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>on startup</source>
         <translation>κατά την εκκίνηση</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>έκδοση</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>Το αρχειο wallet.dat ειναι διεφθαρμένο, η διάσωση απέτυχε</translation>
@@ -3244,14 +2413,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Κωδικός για τις συνδέσεις JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Αποδοχή συνδέσεων JSON-RPC από συγκεκριμένη διεύθυνση IP</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Αποστολή εντολών στον κόμβο &lt;ip&gt; (προεπιλογή: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
@@ -3284,10 +2445,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Αυτό το κείμενο βοήθειας</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Αδύνατη η σύνδεση με τη θύρα %s αυτού του υπολογιστή (bind returned error %d, %s) </translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Να επιτρέπονται οι έλεγχοι DNS για προσθήκη και σύνδεση κόμβων</translation>
@@ -3300,41 +2457,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Σφάλμα φόρτωσης wallet.dat: Κατεστραμμένο Πορτοφόλι</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Σφάλμα φόρτωσης wallet.dat: Το Πορτοφόλι απαιτεί μια νεότερη έκδοση του Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Απαιτείται η επανεγγραφή του Πορτοφολιού, η οποία θα ολοκληρωθεί στην επανεκκίνηση του Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Σφάλμα φόρτωσης αρχείου wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Άγνωστo δίκτυο ορίζεται σε onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Άγνωστo δίκτυο ορίζεται: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Άγνωστo δίκτυο ορίζεται σε onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Δεν μπορώ να γράψω την προεπιλεγμένη διεύθυνση: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3380,12 +2525,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Σφάλμα</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Πρέπει να βάλεις ένα κωδικό  στο αρχείο παραμέτρων: %s
-Εάν το αρχείο δεν υπάρχει, δημιούργησε το με δικαιώματα μόνο για ανάγνωση από τον δημιουργό</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 8c2869abac49..652ee2d9bf18 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="eo" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Pri la Bitmona Kerno</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Versio de &lt;b&gt;Bitmona Kerno&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Tio ĉi estas eksperimenta programo.
-
-Eldonita laŭ la permesilo MIT/X11. Vidu la kunan dosieron COPYING aŭ http://www.opensource.org/licenses/mit-license.php.
-
-Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uzo en la &quot;OpenSSL Toolkit&quot; (http://www.openssl.org/) kaj ĉifrajn erojn kreitajn de Eric Young (eay@cryptsoft.com) kaj UPnP-erojn kreitajn de Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Kopirajto</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>La programistoj de Bitmona Kerno</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="eo" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -126,15 +89,7 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>Comma separated file (*.csv)</source>
         <translation>Perkome disigita dosiero (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +123,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>Repeat new passphrase</source>
         <translation>Ripetu la novan pasfrazon</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Enigu novan pasfrazon por la monujo.&lt;br/&gt;Bonvolu uzi pasfrazon kun &lt;b&gt;almenaŭ 10 hazardaj signoj&lt;/b&gt;, aŭ &lt;b&gt;almenaŭ ok vortoj&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Ĉifri la monujon</translation>
@@ -295,10 +246,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>Quit application</source>
         <translation>Eliri la aplikaĵon</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Vidigi informojjn pri Bitmono</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Pri &amp;Qt</translation>
@@ -455,14 +402,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>&amp;Command-line options</source>
         <translation>&amp;Komandliniaj agordaĵoj</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitmon-kliento</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiva konekto al la bitmona reto</numerusform><numerusform>%n aktivaj konektoj al la bitmona reto</numerusform></translation>
@@ -471,10 +410,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>No block source available...</source>
         <translation>Neniu fonto de blokoj trovebla...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Traktis %1 el (ĉirkaŭ) %2 blokoj de la transakcia historio.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Traktis %1 blokoj de la transakcia historio.</translation>
@@ -495,10 +430,6 @@ Tiu ĉi produkto enhavas erojn kreitajn de la &quot;OpenSSL Project&quot; por uz
         <source>%1 and %2</source>
         <translation>%1 kaj %2</translation>
     </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>mankas %1</translation>
@@ -559,10 +490,6 @@ Adreso: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Monujo estas &lt;b&gt;ĉifrita&lt;/b&gt; kaj aktuale &lt;b&gt;ŝlosita&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Okazis neriparebla eraro. Bitmono ne plu povas sekure daŭri, do ĝi sekure ĉesos.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -573,10 +500,6 @@ Adreso: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Kvanto:</translation>
@@ -597,10 +520,6 @@ Adreso: %4
         <source>Fee:</source>
         <translation>Krompago:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Malalta Eligo:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Post krompago:</translation>
@@ -689,10 +608,6 @@ Adreso: %4
         <source>Copy priority</source>
         <translation>Kopii prioritaton</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopii malaltan eligon</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopii restmonon</translation>
@@ -741,10 +656,6 @@ Adreso: %4
         <source>none</source>
         <translation>neniu</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Polvo</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>jes</translation>
@@ -769,26 +680,10 @@ Adreso: %4
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Transakcioj kun pli alta prioritato havas pli altan ŝancon inkluziviĝi en bloko.</translation>
     </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Tiu ĉi etikedo ruĝiĝas se iu ajn ricevonto ricevos sumon malpli ol %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Tio signifas, ke krompago de almenaŭ %1 estas deviga.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Sumoj, kiuj valoras malpli ol 0.545 oble la minimuman plusendan kromkoston vidiĝas kiel polvo.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Tiu ĉi etikedo ruĝiĝas se la restmono estas malpli ol %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(neniu etikedo)</translation>
@@ -841,12 +736,12 @@ Adreso: %4
         <translation>Redakti adreson por sendi</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>La adreso enigita &quot;%1&quot; jam ekzistas en la adresaro.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>La adreso enigita "%1" jam ekzistas en la adresaro.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>La adreso enigita &quot;%1&quot; ne estas valida Bitmon-adreso.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>La adreso enigita "%1" ne estas valida Bitmon-adreso.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +777,6 @@ Adreso: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitmona Kerno - Komandliniaj agordaĵoj</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Kerno de Bitmono</translation>
@@ -894,6 +785,14 @@ Adreso: %4
         <source>version</source>
         <translation>versio</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Pri la Bitmona Kerno</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Komandliniaj agordaĵoj</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uzado:</translation>
@@ -907,17 +806,13 @@ Adreso: %4
         <translation>UI-agordaĵoj</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Agordi lingvon, ekzemple &quot;de_DE&quot; (defaŭlte: tiu de la sistemo)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Agordi lingvon, ekzemple "de_DE" (defaŭlte: tiu de la sistemo)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Lanĉiĝi plejete</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Montri salutŝildon dum lanĉo (defaŭlte: 1)</translation>
@@ -954,12 +849,8 @@ Adreso: %4
         <translation>Uzi alian dosierujon por datumoj:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitmono</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Eraro: ne eblas krei la elektitan dosierujon por datumoj &quot;%1&quot;.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Kerno de Bitmono</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1031,34 +922,6 @@ Adreso: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Reagordi ĉion al defaŭlataj valoroj.</translation>
@@ -1071,30 +934,6 @@ Adreso: %4
         <source>&amp;Network</source>
         <translation>&amp;Reto</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Aŭtomate malfermi la kursilan pordon por Bitmono. Tio funkcias nur se via kursilo havas la UPnP-funkcion, kaj se tiu ĉi estas ŝaltita.</translation>
@@ -1115,14 +954,6 @@ Adreso: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>la pordo de la prokurilo (ekz. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Versio de SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>la versio de SOCKS ĉe la prokurilo (ekz. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Fenestro</translation>
@@ -1137,7 +968,7 @@ Adreso: %4
     </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 Quit in the menu.</source>
-        <translation>Minimumigi la aplikaĵon anstataŭ eliri kaj ĉesi kiam la fenestro estas fermita. Se tiu ĉi estas agordita, la aplikaĵo ĉesas nur kiam oni elektas &quot;Eliri&quot; el la menuo.</translation>
+        <translation>Minimumigi la aplikaĵon anstataŭ eliri kaj ĉesi kiam la fenestro estas fermita. Se tiu ĉi estas agordita, la aplikaĵo ĉesas nur kiam oni elektas "Eliri" el la menuo.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1163,14 +994,6 @@ Adreso: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Elekti la defaŭltan manieron por montri bitmonajn sumojn en la interfaco, kaj kiam vi sendos bitmonon.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Elekti ĉu videblu Bitmon-adresoj en la listo de transakcioj.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Montri adresojn en la listo de transakcioj</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Ĉu montri detalan adres-regilon, aŭ ne.</translation>
@@ -1195,18 +1018,6 @@ Adreso: %4
         <source>Confirm options reset</source>
         <translation>Konfirmi reŝargo de agordoj</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>La prokurila adreso estas malvalida.</translation>
@@ -1226,18 +1037,10 @@ Adreso: %4
         <source>Wallet</source>
         <translation>Monujo</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>via aktuala elspezebla saldo</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>la sumo de transakcioj ankoraŭ ne konfirmitaj, kiuj ankoraŭ ne elspezeblas</translation>
@@ -1274,8 +1077,8 @@ Adreso: %4
         <translation>Traktado de URI-oj</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Fiaskis la analizon de la URI! Eble la Bitmon-adreso estas nevalida, aŭ povus esti problemo kun la parametroj de la URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Nevalida pagadreso %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1287,31 +1090,7 @@ Adreso: %4
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>Ne eblas lanĉi la ilon &apos;klaki-por-pagi&apos;</translation>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>Ne eblas lanĉi la ilon 'klaki-por-pagi'</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1321,10 +1100,6 @@ Adreso: %4
         <source>Error communicating with %1: %2</source>
         <translation>Eraro dum komunikado kun %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Malbona respondo de la servilo %1</translation>
@@ -1338,33 +1113,28 @@ Adreso: %4
         <translation>Eraro dum ret-peto</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitmono</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Eraro: la elektita dosierujo por datumoj &quot;%1&quot; ne ekzistas.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sumo</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Eraro: nevalida kunigo de -regtest kaj -testnet</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Enigi Bitmon-adreson (ekz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>neaplikebla</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1208,6 @@ Adreso: %4
         <source>Current number of blocks</source>
         <translation>Aktuala nombro de blokoj</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Supozita totalo da blokoj</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Horo de la lasta bloko</translation>
@@ -1518,19 +1284,7 @@ Adreso: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1553,22 +1307,6 @@ Adreso: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;euzi ekzistantan ricevan adreson (malrekomendinda)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Malplenigi ĉiujn kampojn de la formularo.</translation>
@@ -1577,26 +1315,14 @@ Adreso: %4
         <source>Clear</source>
         <translation>Forigi</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;Peti pagon</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>Vidigi</translation>
     </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Remove</source>
         <translation>Forigi</translation>
@@ -1695,11 +1421,7 @@ Adreso: %4
         <source>(no message)</source>
         <translation>(neniu mesaĝo)</translation>
     </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -1714,10 +1436,6 @@ Adreso: %4
         <source>Inputs...</source>
         <translation>Enigoj...</translation>
     </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Insufficient funds!</source>
         <translation>Nesufiĉa mono!</translation>
@@ -1742,10 +1460,6 @@ Adreso: %4
         <source>Fee:</source>
         <translation>Krompago:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Malalta Eligo:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Post krompago:</translation>
@@ -1754,14 +1468,6 @@ Adreso: %4
         <source>Change:</source>
         <translation>Restmono:</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Sendi samtempe al pluraj ricevantoj</translation>
@@ -1822,10 +1528,6 @@ Adreso: %4
         <source>Copy priority</source>
         <translation>Kopii prioritaton</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopii malaltan eligon</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopii restmonon</translation>
@@ -1862,10 +1564,6 @@ Adreso: %4
         <source>Transaction creation failed!</source>
         <translation>Kreo de transakcio fiaskis!</translation>
     </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Averto: Nevalida Bitmon-adreso</translation>
@@ -1874,10 +1572,6 @@ Adreso: %4
         <source>(no label)</source>
         <translation>(neniu etikedo)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Ĉu vi certas, ke vi volas sendi?</translation>
@@ -1886,14 +1580,6 @@ Adreso: %4
         <source>added as transaction fee</source>
         <translation>aldonita kiel krompago</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Pagopeto nun estas eksdata</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Nevalida pagadreso %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1591,6 @@ Adreso: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Ricevonto:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreso kie vi sendos la pagon (ekz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Tajpu etikedon por tiu ĉi adreso kaj aldonu ĝin al via adresaro</translation>
@@ -1945,22 +1627,10 @@ Adreso: %4
         <source>Message:</source>
         <translation>Mesaĝo:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Tajpu etikedon por tiu ĉi adreso por aldoni ĝin al la listo de uzitaj adresoj</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay To:</source>
         <translation>Pagi Al:</translation>
@@ -1972,10 +1642,6 @@ Adreso: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Ne sistemfermu ĝis ĉi tiu fenestro malaperas.</translation>
@@ -1995,10 +1661,6 @@ Adreso: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Vi povas subskribi mesaĝon per viaj adresoj, por pravigi ke vi estas la posedanto de tiuj adresoj. Atentu, ke vi ne subskriu ion neprecizan, ĉar trompisto povus ruzi kontraŭ vi kaj ŝteli vian identecon. Subskribu nur plene detaligitaj deklaroj pri kiuj vi konsentas.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreso por subskribi la mesaĝon (ekz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Elektu la jam uzitan adreson</translation>
@@ -2051,10 +1713,6 @@ Adreso: %4
         <source>Enter the signing 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.</source>
         <translation>Enmeti la subskriban adreson, la mesaĝon (kune kun ĉiu linisalto, spaceto, taboj, ktp. precize) kaj la subskribon ĉi sube por kontroli la mesaĝon. Atentu, ke vi ne komprenu per la subskribo pli ol la enhavo de la mesaĝo mem, por eviti homo-en-la-mezo-atakon.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La adreso per kio oni subskribis la mesaĝon (ekz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Kontroli la mesaĝon por pravigi, ke ĝi ja estas subskribita per la specifa Bitmon-adreso</translation>
@@ -2068,12 +1726,8 @@ Adreso: %4
         <translation>Reagordigi ĉiujn prikontrolajn kampojn</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Enigi Bitmon-adreson (ekz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klaku &quot;Subskribi Mesaĝon&quot; por krei subskribon</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klaku "Subskribi Mesaĝon" por krei subskribon</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2152,10 +1806,6 @@ Adreso: %4
         <source>Open until %1</source>
         <translation>Malferma ĝis %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/senkonekte</translation>
@@ -2245,8 +1895,8 @@ Adreso: %4
         <translation>Vendisto</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Kreitaj moneroj devas esti maturaj je %1 blokoj antaŭ ol eblas elspezi ilin. Kiam vi generis tiun ĉi blokon, ĝi estis elsendita al la reto por aldono al la blokĉeno. Se tiu aldono malsukcesas, ĝia stato ŝanĝiĝos al &quot;neakceptita&quot; kaj ne eblos elspezi ĝin. Tio estas malofta, sed povas okazi se alia bloko estas kreita je preskaŭ la sama momento kiel la via.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Kreitaj moneroj devas esti maturaj je %1 blokoj antaŭ ol eblas elspezi ilin. Kiam vi generis tiun ĉi blokon, ĝi estis elsendita al la reto por aldono al la blokĉeno. Se tiu aldono malsukcesas, ĝia stato ŝanĝiĝos al "neakceptita" kaj ne eblos elspezi ĝin. Tio estas malofta, sed povas okazi se alia bloko estas kreita je preskaŭ la sama momento kiel la via.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,14 +1960,6 @@ Adreso: %4
         <source>Address</source>
         <translation>Adreso</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sumo</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Malferma dum ankoraŭ %n bloko</numerusform><numerusform>Malferma dum ankoraŭ %n blokoj</numerusform></translation>
@@ -2346,14 +1988,6 @@ Adreso: %4
         <source>Unconfirmed</source>
         <translation>Nekonfirmita</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Ricevita kun</translation>
@@ -2481,26 +2115,6 @@ Adreso: %4
         <source>Show transaction details</source>
         <translation>Montri detalojn de transakcio</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Perkome disigita dosiero (*.csv)</translation>
@@ -2525,10 +2139,6 @@ Adreso: %4
         <source>Address</source>
         <translation>Adreso</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sumo</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,13 +2152,12 @@ Adreso: %4
         <translation>al</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2578,14 +2187,6 @@ Adreso: %4
         <source>Backup Failed</source>
         <translation>Malsukcesis sekurkopio</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>Sukcesis krei sekurkopion</translation>
@@ -2593,18 +2194,6 @@ Adreso: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uzado:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listigi komandojn</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Vidigi helpon pri iu komando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Agordoj:</translation>
@@ -2645,10 +2234,6 @@ Adreso: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Nombro da sekundoj por rifuzi rekonekton de misagantaj samtavolanoj (defaŭlte: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Eraro okazis dum estigo de RPC-pordo %u por aŭskulti per IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Aŭskulti al &lt;port&gt; por JSON-RPC-konektoj (defaŭlte: 8332 aŭ testnet: 18332)</translation>
@@ -2657,10 +2242,6 @@ Adreso: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akcepti komandojn JSON-RPC kaj el komandlinio</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Ruli fone kiel demono kaj akcepti komandojn</translation>
@@ -2683,7 +2264,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, vi devas specifi rpcpassword en la konfigura dosiero:
 %s
@@ -2692,39 +2273,19 @@ rpcuser=bitcoinrpc
 rpcpassword=%s
 (ne utilas al vi memorigi tiun ĉi pasvorton)
 La salutnomo kaj la pasvorto estu nepre MALSAMAJ.
-Se la dosiero ne ekzistas, kreu ĝin kun permeso &quot;nur posedanto rajtas legi&quot;.
+Se la dosiero ne ekzistas, kreu ĝin kun permeso "nur posedanto rajtas legi".
 Estas konsilinde ankaŭ agordi alertnotify por ke vi ricevu avertojn pri eventualaj problemoj;
-ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo.com
+ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Akcepteblaj ĉifroj (defaŭlte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Eraro okazis dum estigo de RPC-pordo %u por aŭskulti per IPv6; retrodefaŭltas al IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bindi al donita adreso kaj ĉiam aŭskulti per ĝi. Uzu la formaton [gastigo]:pordo por IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Ŝalti reĝimo de regresotestado, kiu uzas specialan ĉenon en kiu oni povas tuj solvi blokojn. La celo de tio estas regresotestilo kaj la kreado de aplikaĵoj.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Eraro: la transakcio estas rifuzita. Tio povas okazi se iom da Bitmono en via monujo jam elspeziĝis (ekz. se vi uzis kopion de wallet.dat kies Bitmono jam elspeziĝis, sed ne estis markita kiel elspezita ĉi tie).</translation>
@@ -2737,50 +2298,14 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Plenumi komandon kiam monuja transakcio ŝanĝiĝas (%s en cmd anstataŭiĝas per TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Tiu ĉi estas antaŭeldona testa versio - uzu laŭ via propra risko - ne uzu por minado aŭ por aplikaĵoj por vendistoj</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Averto: -paytxfee estas agordita per tre alta valoro! Tio estas la krompago, kion vi pagos se vi sendas la transakcion.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Averto: Bonvolu kontroli, ke la horo kaj dato de via komputilo estas ĝuste agorditaj! Se via horloĝo malĝustas, Bitmono ne bone funkcios.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Averto: La reto ne tute konsentas! Kelkaj minantoj ŝajne spertas problemojn aktuale.</translation>
@@ -2797,14 +2322,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Averto: via wallet.dat estas difektita, sed la datumoj sukcese saviĝis! La originala wallet.dat estas nun konservita kiel wallet.{timestamp}.bak en %s; se via saldo aŭ transakcioj estas malĝustaj vi devus restaŭri per alia sekurkopio.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; povas esti:</translation>
@@ -2813,54 +2330,22 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Provo ripari privatajn ŝlosilojn el difektita wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitmonakerna Demono</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blok-kreaj agordaĵoj:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Konekti nur al specifita(j) nodo(j)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Konekti al la JSON-RPC per &lt;port&gt; (defaŭlte: 8332 aŭ testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Difektita blokdatumbazo trovita</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Malkovri la propran IP-adreson (defaŭlte: 1 dum aŭskultado sen -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Ĉu vi volas rekonstrui la blokdatumbazon nun?</translation>
@@ -2937,22 +2422,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Failed to write undo data</source>
         <translation>Malsukcesis skribi malfarajn datumojn</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Trovi samtavolanojn per DNS-elserĉo (defaŭlte: 1 krom kaze de -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Generi Bitmonon (defaŭlte: 0)</translation>
@@ -2961,50 +2430,22 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Kiom da blokoj kontrolendas dum lanĉo (defaŭlte: 288, 0=ĉiuj)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Geneza bloko aŭ netrovita aŭ neĝusta. Ĉu eble la datadir de la reto malĝustas?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Nevalida -onion-adreso: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Nevalida -onion-adreso: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Nesufiĉa nombro de dosierpriskribiloj disponeblas.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rekontrui blokĉenan indekson el la aktualaj blk000??.dat dosieroj</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Specifi la nombron de fadenoj por priatenti RPC-alvokojn (defaŭlte: 4)</translation>
@@ -3013,18 +2454,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Specify wallet file (within data directory)</source>
         <translation>Specifi monujan dosieron (ene de dosierujo por datumoj)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Uzado (malaktuala, uzu anstataŭe bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Kontrolado de blokoj...</translation>
@@ -3033,10 +2462,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>Kontrolado de monujo...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Atendu por RPC-an servilo komenci</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Monujo %s troviĝas ekster la dosierujo por datumoj %s</translation>
@@ -3045,10 +2470,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Monujaj opcioj:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Vi devas rekontrui la datumbazon kun -reindex por ŝanĝi -txindex</translation>
@@ -3057,41 +2478,21 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importas blokojn el ekstera dosiero blk000??.dat</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Plenumi komandon kiam rilata alerto riceviĝas, aŭ kiam ni vidas tre longan forkon (%s en cms anstataŭiĝas per mesaĝo)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informoj</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nevalida sumo por -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nevalida sumo por -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nevalida sumo por -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nevalida sumo por -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3113,42 +2514,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Konekti nur la nodoj en la reto &lt;net&gt; (IPv4, IPv6 aŭ Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-agordaĵoj: (vidu la vikio de Bitmono por instrukcioj pri agordado de SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Sendi spurajn/sencimigajn informojn al la konzolo anstataŭ al dosiero debug.log</translation>
@@ -3157,18 +2522,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Agordi minimuman grandon de blokoj je bajtoj (defaŭlte: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Malpligrandigi la sencimigan protokol-dosieron kiam kliento lanĉiĝas (defaŭlte: 1 kiam mankas -debug)</translation>
@@ -3181,10 +2534,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Specifi konektan tempolimon je milisekundoj (defaŭlte: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Sistema eraro: </translation>
@@ -3221,18 +2570,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Averto: tiu ĉi versio estas eksdata. Vi bezonas ĝisdatigon!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versio</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat estas difektita, riparo malsukcesis</translation>
@@ -3241,14 +2578,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Password for JSON-RPC connections</source>
         <translation>Pasvorto por konektoj JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permesi konektojn JSON-RPC de specifa IP-adreso</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Sendi komandon al nodo ĉe &lt;ip&gt; (defaŭlte: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Plenumi komandon kiam plej bona bloko ŝanĝiĝas (%s en cmd anstataŭiĝas per bloka haketaĵo)</translation>
@@ -3281,10 +2610,6 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>This help message</source>
         <translation>Tiu ĉi helpmesaĝo</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Ne eblis bindi al %s en tiu ĉi komputilo (bind resendis eraron %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permesi DNS-elserĉojn por -addnote, -seednote kaj -connect</translation>
@@ -3297,41 +2622,29 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Eraro dum ŝargado de wallet.dat: monujo difektita</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Eraro dum ŝargo de wallet.dat: monujo bezonas pli novan version de Bitmono</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Monujo bezonas esti reskribita: relanĉu Bitmonon por finfari tion</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Eraro dum ŝargado de wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Nevalid adreso -proxy: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Nevalid adreso -proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Nekonata reto specifita en -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Nekonata reto specifita en -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Nekonata versio de -socks petita: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Ne eblas trovi la adreson -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Ne eblas trovi la adreson -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Ne eblas trovi la adreson -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Ne eblas trovi la adreson -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nevalida sumo por -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nevalida sumo por -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +2690,5 @@ ekzemple: alertnotify=echo %%s | mail -s &quot;Averto de Bitmono&quot; admin@foo
         <source>Error</source>
         <translation>Eraro</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Vi devas agordi rpcpassword=&lt;password&gt; en la konfigura dosiero:
-%s
-Se la dosiero ne ekzistas, kreu ĝin kun permeso &quot;nur posedanto rajtas legi&quot;.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 1ed40a77c28b..fad8c9bbe835 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1,44 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Acerca de Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Versión de &lt;b&gt;Bitcoin Core&lt;b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este es un software experimental.
-
-Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
-COPYING o http://www.opensource.org/licenses/mit-license.php.
-
-Este producto incluye software desarrollado por OpenSSL Project para su uso en
-el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por
-Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Los desarrolladores de Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="es" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -51,7 +11,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>&amp;New</source>
-        <translation>Nuevo</translation>
+        <translation>&amp;Nuevo</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -134,8 +94,8 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <translation>Error exportando</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Ha habido un error al intentar guardar los datos del monedero en %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Se ha producido un error al intentar guardar la lista de direcciones en %1. Por favor vuelva a intentarlo.</translation>
     </message>
 </context>
 <context>
@@ -171,10 +131,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Repeat new passphrase</source>
         <translation>Repita la nueva contraseña</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduzca la nueva contraseña del monedero.&lt;br/&gt;Por favor elija una con &lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt;, u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cifrar el monedero</translation>
@@ -209,7 +165,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá &lt;b&gt;TODOS SUS BITCOINS&lt;/b&gt;!&quot;</translation>
+        <translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá &lt;b&gt;TODOS SUS BITCOINS&lt;/b&gt;!"</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -227,6 +183,10 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Wallet encrypted</source>
         <translation>Monedero cifrado</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Introduzca la nueva contraseña para el monedero.&lt;br/&gt;Utilice por favor una contraseña con &lt;b&gt;diez o más caracteres aleatorios&lt;/b&gt; o con &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin se cerrará para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus bitcoins de robo por malware que infecte su sistema.</translation>
@@ -298,10 +258,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Quit application</source>
         <translation>Salir de la aplicación</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar información acerca de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Acerca de &amp;Qt</translation>
@@ -338,6 +294,10 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Open &amp;URI...</source>
         <translation>Abrir &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Cliente Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importando bloques de disco...</translation>
@@ -390,9 +350,13 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>&amp;Receive</source>
         <translation>&amp;Recibir</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostrar información acerca de Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation>Mo&amp;strar/ocultar</translation>
+        <translation>&amp;Mostrar / Ocultar</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
@@ -420,7 +384,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation>A&amp;yuda</translation>
+        <translation>&amp;Ayuda</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
@@ -436,7 +400,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Solicitar pagos (genera codigo QR y URL&apos;s de Bitcoin)</translation>
+        <translation>Solicitar pagos (generando códigos QR e identificadores URI "bitcoin:")</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -452,7 +416,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>Abrir un bitcoin: URI o petición de pago</translation>
+        <translation>Abrir un identificador URI "bitcoin:" o una petición de pago</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
@@ -460,11 +424,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Muestra el mensaje de ayuda Bitcoin Core para obtener una lista con las posibles opciones de la consola de comandos de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
+        <translation>Mostrar el mensaje de ayuda de Bitcoin Core con una lista de las posibles opciones de la consola de comandos de Bitcoin</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -474,10 +434,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>No block source available...</source>
         <translation>Ninguna fuente de bloques disponible ...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Se han procesado %1 de %2 bloques (estimados) del historial de transacciones.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Procesados %1 bloques del historial de transacciones.</translation>
@@ -504,7 +460,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>%1 behind</source>
-        <translation>%1 por detrás</translation>
+        <translation>%1 atrás</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
@@ -562,10 +518,6 @@ Dirección: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ha ocurrido un error crítico. Bitcoin ya no puede continuar con seguridad y se cerrará.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -601,12 +553,12 @@ Dirección: %4
         <translation>Tasa:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Envío pequeño:</translation>
+        <source>Dust:</source>
+        <translation>Polvo:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Después de tasas:</translation>
+        <translation>Después de aplicar la comisión:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -678,11 +630,11 @@ Dirección: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copiar donación</translation>
+        <translation>Copiar comisión</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>Copiar después de aplicar donación</translation>
+        <translation>Copiar después de aplicar comisión</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -693,8 +645,8 @@ Dirección: %4
         <translation>Copiar prioridad</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Copiar envío pequeño</translation>
+        <source>Copy dust</source>
+        <translation>Copiar polvo</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -745,8 +697,8 @@ Dirección: %4
         <translation>ninguna</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Basura</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Puede variar en +/- %1 satoshi(s) por entrada.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -758,39 +710,27 @@ Dirección: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation>Esta etiqueta se torna roja si el tamaño de la transación es mayor a 1000 bytes.</translation>
+        <translation>Esta etiqueta se torna roja si el tamaño de la transacción es mayor de 1000 bytes.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Esto implica que se requiere una tarifa de al menos %1 por kB</translation>
+        <translation>Esto implica que se requiere una comisión de al menos %1 por kB</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation>Puede variar +/- 1 byte por entrada.</translation>
+        <translation>Puede variar en +/- 1 byte por entrada.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation>Las transacciones con alta prioridad son más propensas a ser incluidas dentro de un bloque.</translation>
+        <translation>Las transacciones con mayor prioridad tienen mayor probabilidad de ser incluidas en un bloque.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Esta etiqueta se muestra en rojo si la prioridad es menor que &quot;media&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Esta etiqueta se torna roja si la prioridad es menor que "media".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>Esta etiqueta se torna roja si cualquier destinatario recibe una cantidad menor a %1.</translation>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Esto significa que se necesita una tarifa de al menos %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Cantidades por debajo de 0.546 veces la tasa serán mostradas como basura</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Esta etiqueta se vuelve roja si el cambio es menor que %1</translation>
+        <translation>Esta etiqueta se torna roja si cualquier destinatario recibe una cantidad menor de %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -798,7 +738,7 @@ Dirección: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation>Enviar desde %1 (%2)</translation>
+        <translation>Cambio desde %1 (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
@@ -844,12 +784,12 @@ Dirección: %4
         <translation>Editar dirección de envío</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>La dirección introducida &quot;%1&quot; ya está presente en la libreta de direcciones.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>La dirección introducida "%1" ya está presente en la libreta de direcciones.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>La dirección introducida &quot;%1&quot; no es una dirección Bitcoin válida.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>La dirección introducida "%1" no es una dirección Bitcoin válida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -885,10 +825,6 @@ Dirección: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Opciones de consola de comandos</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -897,6 +833,18 @@ Dirección: %4
         <source>version</source>
         <translation>versión</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Acerca de Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opciones de la línea de órdenes</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uso:</translation>
@@ -907,11 +855,11 @@ Dirección: %4
     </message>
     <message>
         <source>UI options</source>
-        <translation>Opciones GUI</translation>
+        <translation>Opciones de interfaz de usuario</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Establecer el idioma, por ejemplo, &quot;es_ES&quot; (predeterminado: configuración regional del sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,15 +902,15 @@ Dirección: %4
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation>Utilice un directorio de datos personalizado:</translation>
+        <translation>Utilizar un directorio de datos personalizado:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Error: No puede crearse el directorio de datos especificado &quot;%1&quot;.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Error: no ha podido crearse el directorio de datos especificado "%1".</translation>
     </message>
     <message>
         <source>Error</source>
@@ -985,7 +933,7 @@ Dirección: %4
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation>El pago requiere una URI o archivo</translation>
+        <translation>Abrir solicitud de pago a partir de un identificador URI o de un archivo</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -993,11 +941,11 @@ Dirección: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation>Seleccione archivo de sulicitud de pago</translation>
+        <translation>Seleccionar archivo de sulicitud de pago</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation>Abrir archivo de solicitud de pago</translation>
+        <translation>Seleccionar el archivo de solicitud de pago para abrir</translation>
     </message>
 </context>
 <context>
@@ -1012,11 +960,11 @@ Dirección: %4
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
+        <translation>Comisión de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation>Comisión de &amp;transacciones</translation>
+        <translation>Pagar comisión de &amp;transacción</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
@@ -1036,7 +984,15 @@ Dirección: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation>Número de procesos de &amp;verificación de scripts</translation>
+        <translation>Número de hilos de &amp;verificación de scripts</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Aceptar conexiones desde el exterior</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Aceptar conexiones entrantes</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
@@ -1052,19 +1008,19 @@ Dirección: %4
     </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 de terceros (por ejemplo, un explorador de bloques) que aparecen en la pestaña de transacciones como items del menú contextual. El %s en la URL es reemplazado por el hash de la transacción. Se pueden separar múltiples URLs por una barra vertical |.</translation>
+        <translation>Identificadores URL de terceros (por ejemplo, un explorador de bloques) que aparecen en la pestaña de transacciones como elementos del menú contextual. El %s en la URL es reemplazado por el valor hash de la transacción. Se pueden separar URL múltiples por una barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation>URLs de transacciones de terceros</translation>
+        <translation>Identificadores URL de transacciones de terceros</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation>Opciones activas de consola de comandos que tienen preferencia sobre las opciones antes mencionadas:</translation>
+        <translation>Opciones activas de consola de comandos que tienen preferencia sobre las opciones anteriores:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation>
+        <translation>Restablecer todas las opciones predeterminadas del cliente.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
@@ -1104,7 +1060,7 @@ Dirección: %4
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>Mapear el puerto usando &amp;UPnP</translation>
+        <translation>Mapear el puerto mediante &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1118,14 +1074,6 @@ Dirección: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Puerto del servidor proxy (ej. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Versión SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versión SOCKS del proxy (ej. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Ventana</translation>
@@ -1166,14 +1114,6 @@ Dirección: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían bitcoins.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Mostrar o no las direcciones Bitcoin en la lista de transacciones.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Mostrar las direcciones en la lista de transacciones</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Mostrar o no funcionalidad de Coin Control</translation>
@@ -1219,7 +1159,7 @@ Dirección: %4
     <name>OverviewPage</name>
     <message>
         <source>Form</source>
-        <translation>Desde</translation>
+        <translation>Formulario</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
@@ -1229,13 +1169,17 @@ Dirección: %4
         <source>Wallet</source>
         <translation>Monedero</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>De observación:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Disponible:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation>Su balance actual gastable</translation>
+        <translation>Su saldo disponible actual</translation>
     </message>
     <message>
         <source>Pending:</source>
@@ -1243,15 +1187,15 @@ Dirección: %4
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Total de transacciones que deben ser confirmadas, y que no cuentan con el balance gastable necesario</translation>
+        <translation>Total de transacciones pendientes de confirmar y que aún no contribuye al saldo disponible</translation>
     </message>
     <message>
         <source>Immature:</source>
-        <translation>No disponible:</translation>
+        <translation>No madurado:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Saldo recién minado que aún no está disponible.</translation>
+        <translation>Saldo recién minado que aún no ha madurado.</translation>
     </message>
     <message>
         <source>Total:</source>
@@ -1259,11 +1203,27 @@ Dirección: %4
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation>Su balance actual total</translation>
+        <translation>Su saldo actual total</translation>
+    </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Su saldo actual en direcciones watch-only</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transacciones sin confirmar en direcciones watch-only</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Saldo minado en direcciones watch-only que aún no ha madurado</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Saldo total en las direcciones watch-only</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Movimientos recientes&lt;/b&gt;</translation>
+        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1277,40 +1237,52 @@ Dirección: %4
         <translation>Gestión de URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección Bitcoin inválida o a parámetros de URI mal formados.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Dirección de pago no válida %1</translation>
     </message>
     <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>La cantidad del pago solicitado (%1) es demasiado pequeña (considerada polvo).</translation>
+        <source>Payment request rejected</source>
+        <translation>Solicitud de pago rechazada</translation>
     </message>
     <message>
-        <source>Payment request error</source>
-        <translation>Error en petición de pago</translation>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>La red de solicitud de pago no coincide con la red cliente</translation>
     </message>
     <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>No se pudo iniciar bitcoin: manejador de pago-al-clic</translation>
+        <source>Payment request has expired.</source>
+        <translation>La solicitud de pago ha cadiucado</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>La solicitud de pago no está inicializada</translation>
+    </message>
+    <message>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <translation>La cantidad del pago solicitado (%1) es demasiado pequeña (considerada polvo).</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Advertencia del gestor de red</translation>
+        <source>Payment request error</source>
+        <translation>Error en solicitud de pago</translation>
     </message>
     <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>El proxy configurado no soporta el protocolo SOCKS5, el cual es requerido para pagos vía proxy.</translation>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation>No se puede iniciar el gestor de identificadores "bitcoin:" de clic-para-pagar</translation>
     </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>La URL de obtención de la solicitud de pago es inválida: %1</translation>
     </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>¡No se puede leer el identificador URI! Esto puede deberse a una dirección Bitcoin inválida o a parámetros de la URI mal formados</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Procesado del archivo de solicitud de pago</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>¡No se ha podido leer o procesar el archivo de solicitud de pago! Esto puede deberse a un archivo inválido de solicitud de pago.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>¡No puede leerse el archivo de solicitud de pago! Esto puede deberse a un archivo inválido de solicitud de pago.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1318,15 +1290,15 @@ Dirección: %4
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation>Devolución de %1</translation>
+        <translation>Devolución desde %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Error en la comunicación con %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>¡La solicitud de pago no puede leerse ni procesarse!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>¡No puede leerse la solicitud de pago!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1341,31 +1313,66 @@ Dirección: %4
         <translation>Error en petición de red</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>DIrección/Nombre de host</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Cantidad</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Introducir una dirección Bitcoin (p. ej. %1)</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: El directorio de datos especificado &quot;%1&quot; no existe.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Error: No se ha podido leer el archivo de configuración: %1. Debe utilizarse solamente la sintaxis clave=valor.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Error: Combinación no válida de -regtest y -testnet.</translation>
+        <source>NETWORK</source>
+        <translation>RED</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin core no se ha cerrado de forma segura todavía...</translation>
+        <source>UNKNOWN</source>
+        <translation>DESCONOCIDO</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduzca una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>None</source>
+        <translation>Ninguno</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>N/D</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1415,7 +1422,11 @@ Dirección: %4
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation>Utilizando la versión OpenSSL</translation>
+        <translation>Utilizando la versión de OpenSSL</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Utilizando la versión de BerkeleyDB</translation>
     </message>
     <message>
         <source>Startup time</source>
@@ -1442,8 +1453,76 @@ Dirección: %4
         <translation>Número actual de bloques</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Bloques totales estimados</translation>
+        <source>Received</source>
+        <translation>Recibido</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviado</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Pares</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Seleccionar un par para ver su información detallada.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Dirección</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versión</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Servicios</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Sincronizar Nodo</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Altura de comienzo</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Altura de sincronización</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Puntuación de bloqueo</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Duración de la conexión</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Ultimo envío</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Ultima recepción</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes enviados</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes recibidos</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1522,16 +1601,36 @@ Dirección: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>via %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>nunca</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrante</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>Outbound</source>
+        <translation>Saliente</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Sí</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>No</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconocido</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Adquiriendo....</translation>
     </message>
 </context>
 <context>
@@ -1745,10 +1844,6 @@ Dirección: %4
         <source>Fee:</source>
         <translation>Tasa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Envío pequeño:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Después de tasas:</translation>
@@ -1777,6 +1872,10 @@ Dirección: %4
         <source>Clear all fields of the form.</source>
         <translation>Vaciar todos los campos del formulario</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Polvo:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Vaciar &amp;todo</translation>
@@ -1825,10 +1924,6 @@ Dirección: %4
         <source>Copy priority</source>
         <translation>Copiar prioridad</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiar envío pequeño</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar Cambio</translation>
@@ -1881,6 +1976,10 @@ Dirección: %4
         <source>Warning: Unknown change address</source>
         <translation>Alerta: Dirección de Bitcoin inválida</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiar polvo</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>¿Está seguro que desea enviar?</translation>
@@ -1889,14 +1988,6 @@ Dirección: %4
         <source>added as transaction fee</source>
         <translation>añadido como comisión de transacción</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Petición de pago expirada</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Dirección de pago no válida %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1908,10 +1999,6 @@ Dirección: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Pagar a:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección a la que enviar el pago (p. ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Etiquete esta dirección para añadirla a la libreta</translation>
@@ -1928,6 +2015,10 @@ Dirección: %4
         <source>This is a normal payment.</source>
         <translation>Esto es un pago ordinario.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Dirección Bitcoin a la que enviar el pago</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1999,8 +2090,8 @@ Dirección: %4
         <translation>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección con la que firmar el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Dirección Bitcoin con la que firmar el mensaje</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2055,8 +2146,8 @@ Dirección: %4
         <translation>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección con la que se firmó el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>La dirección Bitcoin con la que se firmó el mensaje</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2071,12 +2162,8 @@ Dirección: %4
         <translation>Vaciar todos los campos de la verificación de mensaje</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduzca una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Haga clic en &quot;Firmar mensaje&quot; para generar la firma</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Haga clic en "Firmar mensaje" para generar la firma</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2203,6 +2290,10 @@ Dirección: %4
         <source>own address</source>
         <translation>dirección propia</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>de observación</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etiqueta</translation>
@@ -2223,6 +2314,14 @@ Dirección: %4
         <source>Debit</source>
         <translation>Débito</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Débito total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Crédito total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Comisión de transacción</translation>
@@ -2248,8 +2347,8 @@ Dirección: %4
         <translation>Vendedor</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a &quot;no aceptado&quot; y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a "no aceptado" y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2313,10 +2412,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>No vencidos (%1 confirmaciones. Estarán disponibles al cabo de %2)</translation>
@@ -2528,10 +2623,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2545,6 +2636,13 @@ Dirección: %4
         <translation>para</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unidad en la que se muestran las cantidades. Haga clic para seleccionar otra unidad.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2596,20 +2694,6 @@ Dirección: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Muestra comandos
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Recibir ayuda para un comando
-</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opciones:
@@ -2653,10 +2737,6 @@ Dirección: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet:18332)</translation>
@@ -2666,10 +2746,6 @@ Dirección: %4
         <translation>Aceptar comandos consola y JSON-RPC
 </translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Versión del cliente RPC de Bitcoin Core RPC</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Ejecutar en segundo plano como daemon y aceptar comandos
@@ -2694,7 +2770,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
 %s
@@ -2705,17 +2781,13 @@ rpcpassword=%s
 El nombre de usuario y la contraseña DEBEN NO ser iguales.
 Si el archivo no existe, créelo con permisos de archivo de solo lectura.
 Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
-Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifrados aceptables (predeterminados: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
@@ -2724,18 +2796,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Limitar continuamente las transacciones gratuitas a &lt;n&gt;*1000 bytes por minuto (predeterminado:15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Iniciar modo de prueba de regresión, el cuál utiliza una cadena especial en la cual los bloques pueden ser resueltos instantáneamente. Se utiliza para herramientas de prueba de regresión y desarrollo de aplicaciones.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ingresar en el modo de prueba de regresión, que utiliza una cadena especial en la que los bloques se pueden resolver instantáneamente.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Error: Ha fallado la escucha de conexiones entrantes (listen ha devuelto el error %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunos de los bitcoins del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado bitcoins a partir de la copia, con lo que no se habrían marcado aquí como gastados.</translation>
@@ -2748,10 +2812,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Las comisiones inferiores se consideran comisión cero (a efectos de creación de transacciones) (predeterminado:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Volcar la actividad de la base de datos de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: 100)</translation>
@@ -2788,10 +2848,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, Bitcoin no funcionará correctamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Atención: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están presentando inconvenientes.</translation>
@@ -2824,30 +2880,14 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Daemon (proceso independiente)</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opciones de creación de bloques:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Vaciar lista de transacciones del monedero (herramienta de diagnóstico; implica -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conectar sólo a los nodos (o nodo) especificados</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Conectar a través de un proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Conectar a JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Opciones de conexión:</translation>
@@ -2948,18 +2988,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>No se han podido escribir los datos de deshacer</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Donación por KB añadida a las transacciones que envíe</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Las comisiones inferiores se consideran comisión cero (a efectos de propagación) (predeterminado:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Forzar modo seguro (predeterminado: 0)</translation>
@@ -2985,8 +3013,8 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Incorrecto o bloque de génesis no encontrado. Datadir equivocada para la red?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Dirección -onion inválida: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Dirección -onion inválida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2996,18 +3024,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Anteponer marca temporal a la información de depuración (predeterminado: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opciones para cliente RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Seleccionar versión de SOCKS para -proxy (4 o 5, predeterminado: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
@@ -3032,10 +3052,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Esto afecta a las herramientas de prueba de regresión y al desarrollo informático de la aplicación.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Uso (desaconsejado, usar bitcoin-cli)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificando bloques...</translation>
@@ -3044,10 +3060,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Verificando monedero...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Espere a que se inicie el servidor RPC</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>El monedero %s se encuentra fuera del directorio de datos %s</translation>
@@ -3056,10 +3068,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Wallet options:</source>
         <translation>Opciones de monedero:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Aviso: Argumento -debugnet anticuado, utilice -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Usted necesita reconstruir la base de datos utilizando -reindex para cambiar -txindex</translation>
@@ -3084,17 +3092,33 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Este producto incluye software desarrollado por el OpenSSL Project para su uso en OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, software de cifrado escrito por Eric Young y software UPnP escrito por Thomas Bernard.</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>Aviso: ¡Comprueba la fecha y hora de tu ordenador y verifica si es correcta! Si no es correcta Bitcoin Core no funcionará adecuadamente.</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Conectar usando SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Información</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidad inválida para -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidad inválida para -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidad inválida para -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidad inválida para -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3152,14 +3176,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Ejecutar un hilo (thread) para limpiar de la memoria el monedero periódicamente (predeterminado: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Enviar orden a Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
@@ -3176,10 +3192,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Muestra todas las opciones de depuración (uso: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Mostrar información de benchmarking (predeterminado: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
@@ -3192,14 +3204,14 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Iniciar Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Error de sistema: </translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Este software es experimental.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Cantidad de la transacción demasiado pequeña</translation>
@@ -3241,10 +3253,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>on startup</source>
         <translation>al iniciar</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versión</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
@@ -3252,16 +3260,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Contraseña para las conexiones JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir conexiones JSON-RPC desde la dirección IP especificada
-</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comando al nodo situado en &lt;ip&gt; (predeterminado: 127.0.0.1)
 </translation>
     </message>
     <message>
@@ -3301,10 +3299,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Este mensaje de ayuda
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>No es posible conectar con %s en este sistema (bind ha dado el error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
@@ -3317,41 +3311,29 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error al cargar wallet.dat: el monedero está dañado</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>El monedero ha necesitado ser reescrito. Reinicie Bitcoin para completar el proceso</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error al cargar wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Dirección -proxy inválida: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Dirección -proxy inválida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>La red especificada en -onlynet &apos;%s&apos; es desconocida</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>La red especificada en -onlynet '%s' es desconocida</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Solicitada versión de proxy -socks desconocida: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>No se puede resolver la dirección de -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>No se puede resolver la dirección de -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>No se puede resolver la dirección de -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>No se puede resolver la dirección de -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3397,13 +3379,5 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Tiene que establecer rpcpassword=&lt;contraseña&gt; en el fichero de configuración: ⏎
-%s ⏎
-Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index 758a190f758f..b22ad3fb8e68 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -1,44 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este es un software experimental.
-
-Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
-COPYING o http://www.opensource.org/licenses/mit-license.php.
-
-Este producto incluye software desarrollado por OpenSSL Project para su uso en
-el OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por
-Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="es_CL" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -49,70 +9,22 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>Create a new address</source>
         <translation>Crea una nueva dirección</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copia la dirección seleccionada al portapapeles</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copia dirección</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar los datos de la pestaña actual a un archivo</translation>
     </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Borrar</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Copia &amp;etiqueta</translation>
@@ -121,23 +33,11 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Archivos separados por coma (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -155,10 +55,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Introduce contraseña actual      </translation>
@@ -171,10 +67,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>Repeat new passphrase</source>
         <translation>Repite nueva contraseña</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduce la nueva contraseña para la billetera.&lt;br/&gt;Por favor utiliza un contraseña de&lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt;, u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Codificar billetera</translation>
@@ -274,10 +166,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>&amp;Overview</source>
         <translation>&amp;Vista general</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Muestra una vista general de la billetera</translation>
@@ -298,10 +186,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>Quit application</source>
         <translation>Salir del programa</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Muestra información acerca de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Acerca de</translation>
@@ -326,22 +210,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Cambiar la contraseña...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reindexing blocks on disk...</source>
         <translation>Cargando el index de bloques...</translation>
@@ -370,10 +238,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>Open debugging and diagnostic console</source>
         <translation>Abre consola de depuración y diagnóstico</translation>
     </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
@@ -384,32 +248,16 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Envía</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostrar/Ocultar</translation>
     </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
         <translation>Firmar un mensaje para provar que usted es dueño de esta dirección</translation>
     </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Archivo</translation>
@@ -430,58 +278,10 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>[testnet]</source>
         <translation>[red-de-pruebas]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexión activa hacia la red Bitcoin</numerusform><numerusform>%n conexiones activas hacia la red Bitcoin</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
@@ -494,26 +294,6 @@ Eric Young (eay@cryptsoft.com) y UPnP software escrito por Thomas Bernard.</tran
         <source>%n week(s)</source>
         <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
@@ -561,10 +341,6 @@ Dirección: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>La billetera esta &lt;b&gt;codificada&lt;/b&gt; y actualmente &lt;b&gt;bloqueda&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -575,54 +351,10 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Cantidad:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Cantidad</translation>
@@ -635,18 +367,10 @@ Dirección: %4</translation>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Confirmado</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Copia dirección</translation>
@@ -659,151 +383,11 @@ Dirección: %4</translation>
         <source>Copy amount</source>
         <translation>Copiar Cantidad</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -814,14 +398,6 @@ Dirección: %4</translation>
         <source>&amp;Label</source>
         <translation>&amp;Etiqueta</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Dirección</translation>
@@ -843,12 +419,12 @@ Dirección: %4</translation>
         <translation>Editar dirección de envio</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>La dirección introducida &quot;%1&quot; ya esta guardada en la libreta de direcciones.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>La dirección introducida "%1" ya esta guardada en la libreta de direcciones.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>La dirección introducida &quot;%1&quot; no es una dirección Bitcoin valida.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>La dirección introducida "%1" no es una dirección Bitcoin valida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -861,37 +437,13 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>name</source>
         <translation>Nombre</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>version</source>
         <translation>versión</translation>
@@ -900,203 +452,55 @@ Dirección: %4</translation>
         <source>Usage:</source>
         <translation>Uso:</translation>
     </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>UI options</source>
         <translation>UI opciones</translation>
     </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Start minimized</source>
         <translation>Arranca minimizado
 </translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Error</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Opciones</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Main</source>
+        <translation>&amp;Principal</translation>
     </message>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Pay transaction &amp;fee</source>
+        <translation>Comisión de &amp;transacciónes</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Automatically start Bitcoin after logging in to the system.</source>
+        <translation>Inicia Bitcoin automáticamente despues de encender el computador</translation>
     </message>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Start Bitcoin on system login</source>
+        <translation>&amp;Inicia Bitcoin al iniciar el sistema</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Reset all client options to default.</source>
+        <translation>Reestablece todas las opciones.</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Error</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opciones</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation>&amp;Principal</translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Comisión de &amp;transacciónes</translation>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Inicia Bitcoin automáticamente despues de encender el computador</translation>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Inicia Bitcoin al iniciar el sistema</translation>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation>Reestablece todas las opciones.</translation>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Red</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <source>&amp;Network</source>
+        <translation>&amp;Red</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>
@@ -1118,18 +522,6 @@ Dirección: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Puerto del servidor proxy (ej. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Muestra solo un ícono en la bandeja después de minimizar la ventana</translation>
@@ -1150,14 +542,6 @@ Dirección: %4</translation>
         <source>&amp;Display</source>
         <translation>&amp;Mostrado</translation>
     </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unidad en la que mostrar cantitades:</translation>
@@ -1166,18 +550,6 @@ Dirección: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Elige la subdivisión por defecto para mostrar cantidaded en la interfaz cuando se envien monedas</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Muestra direcciones en el listado de transaccioines</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1190,77 +562,25 @@ Dirección: %4</translation>
         <source>default</source>
         <translation>predeterminado</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Confirmar reestablecimiento de las opciones</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
     <message>
         <source>Form</source>
         <translation>Formulario</translation>
     </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>Cartera</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
@@ -1272,102 +592,25 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Pago completado</translation>
     </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Cantidad</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduce una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1378,15 +621,7 @@ Dirección: %4</translation>
         <source>&amp;Copy Image</source>
         <translation>Copiar Imagen</translation>
     </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1405,18 +640,6 @@ Dirección: %4</translation>
         <source>&amp;Information</source>
         <translation>&amp;Información</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Startup time</source>
         <translation>Tiempo de inicio</translation>
@@ -1437,18 +660,6 @@ Dirección: %4</translation>
         <source>Block chain</source>
         <translation>Bloquea cadena</translation>
     </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Open</source>
         <translation>&amp;Abrir</translation>
@@ -1458,325 +669,105 @@ Dirección: %4</translation>
         <translation>&amp;Consola</translation>
     </message>
     <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <source>Totals</source>
+        <translation>Total:</translation>
     </message>
     <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
+        <source>Clear console</source>
+        <translation>Limpiar Consola</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Message:</source>
+        <translation>&amp;mensaje</translation>
     </message>
     <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Copia etiqueta</translation>
     </message>
     <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Copiar Cantidad</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <source>QR Code</source>
+        <translation>Código QR </translation>
     </message>
     <message>
-        <source>Clear console</source>
-        <translation>Limpiar Consola</translation>
+        <source>Copy &amp;Address</source>
+        <translation>&amp;Copia dirección</translation>
     </message>
     <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Save Image...</source>
+        <translation>Guardar imagen...</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 type="unfinished"/>
+        <source>Address</source>
+        <translation>Dirección</translation>
     </message>
     <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Cantidad</translation>
     </message>
     <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Mensaje</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Mensaje</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Cantidad</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(sin etiqueta)</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>ReceiveCoinsDialog</name>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Enviar monedas</translation>
     </message>
     <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiqueta:</translation>
+        <source>Amount:</source>
+        <translation>Cantidad:</translation>
     </message>
     <message>
-        <source>&amp;Message:</source>
-        <translation>&amp;mensaje</translation>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Copia etiqueta</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Copiar Cantidad</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation>Código QR </translation>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation>&amp;Copia dirección</translation>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation>Guardar imagen...</translation>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Mensaje</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Mensaje</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Enviar monedas</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Cantidad:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Enviar a múltiples destinatarios</translation>
+        <source>Send to multiple recipients at once</source>
+        <translation>Enviar a múltiples destinatarios</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
         <translation>&amp;Agrega destinatario</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Borra todos</translation>
@@ -1797,50 +788,10 @@ Dirección: %4</translation>
         <source>Confirm send coins</source>
         <translation>Confirmar el envio de monedas</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Copiar Cantidad</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>La dirección de destinatarion no es valida, comprueba otra vez.</translation>
@@ -1861,43 +812,11 @@ Dirección: %4</translation>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Tienes una dirección duplicada, solo puedes enviar a direcciónes individuales de una sola vez.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1908,10 +827,6 @@ Dirección: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>&amp;Pagar a:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección donde enviar el pago (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Introduce una etiqueta a esta dirección para añadirla a tu guia</translation>
@@ -1920,14 +835,6 @@ Dirección: %4</translation>
         <source>&amp;Label:</source>
         <translation>&amp;Etiqueta:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1940,72 +847,20 @@ Dirección: %4</translation>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Mensaje:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Sign Message</source>
         <translation>&amp;Firmar Mensaje</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduce una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2026,10 +881,6 @@ Dirección: %4</translation>
         <source>Signature</source>
         <translation>Firma</translation>
     </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
         <translation>Firmar un mensjage para probar que usted es dueño de esta dirección</translation>
@@ -2038,10 +889,6 @@ Dirección: %4</translation>
         <source>Sign &amp;Message</source>
         <translation>Firmar Mensaje</translation>
     </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Borra todos</translation>
@@ -2050,54 +897,22 @@ Dirección: %4</translation>
         <source>&amp;Verify Message</source>
         <translation>&amp;Firmar Mensaje</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduce una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verify &amp;Message</source>
         <translation>&amp;Firmar Mensaje</translation>
     </message>
     <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduce una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Click en &quot;Firmar Mensage&quot; para conseguir firma</translation>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation>La dirección introducida &quot;%1&quot; no es una dirección Bitcoin valida.</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Click en "Firmar Mensage" para conseguir firma</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
         <translation>Por favor, revise la dirección Bitcoin e inténtelo denuevo</translation>
     </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
         <translation>Ha fallado el desbloqueo de la billetera</translation>
     </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message signing failed.</source>
         <translation>Firma fallida</translation>
@@ -2106,22 +921,6 @@ Dirección: %4</translation>
         <source>Message signed.</source>
         <translation>Mensaje firmado</translation>
     </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message verified.</source>
         <translation>Mensaje comprobado</translation>
@@ -2129,14 +928,6 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[red-de-pruebas]</translation>
@@ -2155,10 +946,6 @@ Dirección: %4</translation>
         <source>Open until %1</source>
         <translation>Abierto hasta %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/fuera de linea</translation>
@@ -2175,18 +962,10 @@ Dirección: %4</translation>
         <source>Status</source>
         <translation>Estado</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generated</source>
         <translation>Generado</translation>
@@ -2211,10 +990,6 @@ Dirección: %4</translation>
         <source>Credit</source>
         <translation>Credito</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>no aceptada</translation>
@@ -2243,38 +1018,14 @@ Dirección: %4</translation>
         <source>Transaction ID</source>
         <translation>ID de Transacción</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transaction</source>
         <translation>Transacción</translation>
     </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
         <translation>, no ha sido emitido satisfactoriamente todavía</translation>
@@ -2285,872 +1036,347 @@ Dirección: %4</translation>
     </message>
     <message>
         <source>unknown</source>
-        <translation>desconocido</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Detalles de transacción</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Esta ventana muestra información detallada sobre la transacción</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipo</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Abierto para &amp;n bloque más</numerusform><numerusform>Abierto para &amp;n bloques más</numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Abierto hasta %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Confirmado (%1 confirmaciones)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado !</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Generado pero no acceptado</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Recibido con</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Recibido de</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Enviado a</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Pagar a usted mismo</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minado</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Estado de transacción. Pasa el raton sobre este campo para ver el numero de confirmaciónes.</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Fecha y hora cuando se recibió la transaccion</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Tipo de transacción.</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Dirección de destino para la transacción</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Cantidad restada o añadida al balance</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Todo</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Hoy</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Esta semana</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Esta mes</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Mes pasado</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Este año</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Rango...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Recibido con</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Enviado a</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>A ti mismo</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minado</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Otra</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Introduce una dirección o etiqueta para  buscar</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Cantidad minima</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Copia dirección</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Copia etiqueta</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Copiar Cantidad</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Edita etiqueta</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation>Mostrar detalles de la transacción</translation>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Archivos separados por coma (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Confirmado</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipo</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Rango:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>para</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Enviar monedas</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation>Exportar los datos de la pestaña actual a un archivo</translation>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Muestra comandos
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Recibir ayuda para un comando
-</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Opciones:
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifica archivo de configuración (predeterminado: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifica archivo pid (predeterminado: bitcoin.pid)
-</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>Especifica directorio para los datos
-</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escuchar por conecciones en &lt;puerto&gt; (Por defecto: 8333 o red de prueba: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantener al menos &lt;n&gt; conecciones por cliente (por defecto: 125) </translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral de desconección de clientes con mal comportamiento (por defecto: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escucha conexiones JSON-RPC en el puerto &lt;port&gt; (predeterminado: 8332 or testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>Aceptar comandos consola y JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Correr como demonio y acepta comandos
-</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Usa la red de pruebas
-</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Precaución: -paytxfee es muy alta. Esta es la comisión que pagarás si envias una transacción.</translation>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Precaución: Por favor revise que la fecha y hora de tu ordenador son correctas. Si tu reloj está mal configurado Bitcoin no funcionará correctamente.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation>Conecta solo al nodo especificado
-</translation>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>desconocido</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Detalles de transacción</translation>
     </message>
     <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Esta ventana muestra información detallada sobre la transacción</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tipo</translation>
     </message>
     <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Dirección</translation>
     </message>
     <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Abierto hasta %1</translation>
     </message>
     <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Confirmado (%1 confirmaciones)</translation>
     </message>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado !</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation>Error cargando blkindex.dat</translation>
+        <source>Generated but not accepted</source>
+        <translation>Generado pero no acceptado</translation>
     </message>
     <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Recibido con</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Atención: Poco espacio en el disco duro</translation>
+        <source>Received from</source>
+        <translation>Recibido de</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Enviado a</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema:</translation>
+        <source>Payment to yourself</source>
+        <translation>Pagar a usted mismo</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minado</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation>Falló la lectura de la información del bloque</translation>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation>Falló la lectura del bloque</translation>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Estado de transacción. Pasa el raton sobre este campo para ver el numero de confirmaciónes.</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation>Falló sincronización del índice del bloque</translation>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Fecha y hora cuando se recibió la transaccion</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation>Falló la escritura del bloque del índice</translation>
+        <source>Type of transaction.</source>
+        <translation>Tipo de transacción.</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation>Falló la escritura de la información del bloque</translation>
+        <source>Destination address of transaction.</source>
+        <translation>Dirección de destino para la transacción</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation>Falló la escritura del bloque</translation>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Cantidad restada o añadida al balance</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Todo</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Hoy</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Esta semana</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Esta mes</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Comisión por kB para adicionarla a las transacciones enviadas</translation>
+        <source>Last month</source>
+        <translation>Mes pasado</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Este año</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Rango...</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Recibido con</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Enviado a</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>A ti mismo</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minado</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Otra</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Introduce una dirección o etiqueta para  buscar</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Cantidad minima</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Copia dirección</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Copia etiqueta</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Copiar Cantidad</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Edita etiqueta</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Show transaction details</source>
+        <translation>Mostrar detalles de la transacción</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Archivos separados por coma (*.csv)</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Confirmado</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tipo</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Dirección</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Rango:</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>para</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Enviar monedas</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Exportar los datos de la pestaña actual a un archivo</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Backup Wallet</source>
+        <translation>Respaldar billetera</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Wallet Data (*.dat)</source>
+        <translation>Datos de billetera (*.dat)</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Backup Failed</source>
+        <translation>Ha fallado el respaldo</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation>Importar bloques desde el archivo externo blk000??.dat </translation>
+        <source>Options:</source>
+        <translation>Opciones:
+</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Especifica archivo de configuración (predeterminado: bitcoin.conf)
+</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>Especifica archivo pid (predeterminado: bitcoin.pid)
+</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Especifica directorio para los datos
+</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Escuchar por conecciones en &lt;puerto&gt; (Por defecto: 8333 o red de prueba: 18333)</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>Información</translation>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Mantener al menos &lt;n&gt; conecciones por cliente (por defecto: 125) </translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>Umbral de desconección de clientes con mal comportamiento (por defecto: 100)</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
+        <translation>Escucha conexiones JSON-RPC en el puerto &lt;port&gt; (predeterminado: 8332 or testnet: 18332)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Aceptar comandos consola y JSON-RPC
+</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Correr como demonio y acepta comandos
+</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Usa la red de pruebas
+</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+        <translation>Precaución: -paytxfee es muy alta. Esta es la comisión que pagarás si envias una transacción.</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Connect only to the specified node(s)</source>
+        <translation>Conecta solo al nodo especificado
+</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Error loading block database</source>
+        <translation>Error cargando blkindex.dat</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Error: Disk space is low!</source>
+        <translation>Atención: Poco espacio en el disco duro</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Error: system error: </source>
+        <translation>Error: error de sistema:</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block info</source>
+        <translation>Falló la lectura de la información del bloque</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block</source>
+        <translation>Falló la lectura del bloque</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Failed to sync block index</source>
+        <translation>Falló sincronización del índice del bloque</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block index</source>
+        <translation>Falló la escritura del bloque del índice</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block info</source>
+        <translation>Falló la escritura de la información del bloque</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block</source>
+        <translation>Falló la escritura del bloque</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL)</translation>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>Importar bloques desde el archivo externo blk000??.dat </translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Información</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3160,50 +1386,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Establezca el tamaño mínimo del bloque en bytes (por defecto: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especifica tiempo de espera para conexion en milisegundos (predeterminado: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Error de sistema:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Intenta usar UPnP para mapear el puerto de escucha (default: 0)</translation>
@@ -3225,18 +1415,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Advertencia: Esta versión está obsoleta, se necesita actualizar!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versión</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompió, guardado fallido</translation>
@@ -3246,20 +1424,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Contraseña para las conexiones JSON-RPC
 </translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permite conexiones JSON-RPC desde la dirección IP especificada
-</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Envia comando al nodo situado en &lt;ip&gt; (predeterminado: 127.0.0.1)
-</translation>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizar billetera al formato actual</translation>
@@ -3294,10 +1458,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Este mensaje de ayuda
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>No es posible escuchar en el %s en este ordenador (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permite búsqueda DNS para addnode y connect
@@ -3311,41 +1471,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error cargando wallet.dat: Billetera corrupta</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error cargando wallet.dat: Billetera necesita una vercion reciente de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>La billetera necesita ser reescrita: reinicie Bitcoin para completar</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error cargando wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Dirección -proxy invalida: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Dirección -proxy invalida: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3367,14 +1503,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading wallet...</source>
         <translation>Cargando cartera...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Rescaneando...</translation>
@@ -3391,11 +1519,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 6944c3157f0d..a9cfe90895f7 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -1,44 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_DO" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Acerca del Núcleo de Bitcoin</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Versión del &lt;b&gt;Núcleo de Bitcoin&lt;b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este es un software experimental.
-
-Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
-COPYING o http://www.opensource.org/licenses/mit-license.php.
-
-Este producto incluye software desarrollado por OpenSSL Project para su uso en
-el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por
-Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Los desarrolladores del Núcleo de Bitcoin</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="es_DO" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -133,11 +93,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Exporting Failed</source>
         <translation>Error exportando</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -171,10 +127,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Repeat new passphrase</source>
         <translation>Repita la nueva contraseña</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduzca la nueva contraseña de la cartera.&lt;br/&gt;Por favor elija una con &lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt;, u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cifrar la cartera</translation>
@@ -209,7 +161,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá &lt;b&gt;TODOS SUS BITCOINS&lt;/b&gt;!&quot;</translation>
+        <translation>Atencion: ¡Si cifra su monedero y pierde la contraseña perderá &lt;b&gt;TODOS SUS BITCOINS&lt;/b&gt;!"</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -298,10 +250,6 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>Quit application</source>
         <translation>Salir de la aplicación</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar información acerca de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Acerca de &amp;Qt</translation>
@@ -436,7 +384,7 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Solicitar pagos (genera codigo QR y URL&apos;s de Bitcoin)</translation>
+        <translation>Solicitar pagos (genera codigo QR y URL's de Bitcoin)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -458,50 +406,14 @@ Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</t
         <source>&amp;Command-line options</source>
         <translation>&amp;Opciones de linea de comando</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n conexión activa hacia la red Bitcoin</numerusform><numerusform>%n conexiones activas hacia la red Bitcoin</numerusform></translation>
-    </message>
     <message>
         <source>No block source available...</source>
         <translation>Ninguna fuente de bloques disponible ...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Se han procesado %1 de %2 bloques (estimados) del historial de transacciones.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Procesados %1 bloques del historial de transacciones.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>%n día</numerusform><numerusform>%n días</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 atrás</translation>
@@ -562,10 +474,6 @@ Dirección: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ha ocurrido un error crítico. Bitcoin ya no puede continuar con seguridad y se cerrará.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -600,10 +508,6 @@ Dirección: %4
         <source>Fee:</source>
         <translation>Tasa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Envío pequeño:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Después de tasas:</translation>
@@ -692,13 +596,9 @@ Dirección: %4
         <source>Copy priority</source>
         <translation>Copiar prioridad</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiar envío pequeño</translation>
-    </message>
     <message>
         <source>Copy change</source>
-        <translation>Copiar cambio</translation>
+        <translation>Copiar Cambio</translation>
     </message>
     <message>
         <source>highest</source>
@@ -744,10 +644,6 @@ Dirección: %4
         <source>none</source>
         <translation>ninguno</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Basura</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>si</translation>
@@ -773,25 +669,13 @@ Dirección: %4
         <translation>Las transacciones con alta prioridad son más propensas a ser incluidas dentro de un bloque.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Esta etiqueta se convierte en rojo, si la prioridad es menor que &quot;medio&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Esta etiqueta se convierte en rojo, si la prioridad es menor que "medio".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Esta etiqueta se torna roja si cualquier destinatario recibe una cantidad menor a %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Esto significa que se necesita una tarifa de al menos %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Cantidades por debajo de 0.546 veces la tasa serán mostradas como basura</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Esta etiqueta se vuelve roja si la cantidad de monedas es menor a %1</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
@@ -844,12 +728,12 @@ Dirección: %4
         <translation>Editar dirección de envío</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>La dirección introducida &quot;%1&quot; ya está presente en la libreta de direcciones.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>La dirección introducida "%1" ya está presente en la libreta de direcciones.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>La dirección introducida &quot;%1&quot; no es una dirección Bitcoin válida.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>La dirección introducida "%1" no es una dirección Bitcoin válida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -885,10 +769,6 @@ Dirección: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Núcleo de Bitcoin</translation>
@@ -897,6 +777,14 @@ Dirección: %4
         <source>version</source>
         <translation>versión</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Acerca del Núcleo de Bitcoin</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opciones de la línea de órdenes</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uso:</translation>
@@ -910,17 +798,13 @@ Dirección: %4
         <translation>Opciones GUI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Establecer el idioma, por ejemplo, &quot;es_ES&quot; (predeterminado: configuración regional del sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Arrancar minimizado</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: 1)</translation>
@@ -957,12 +841,8 @@ Dirección: %4
         <translation>Utilice un directorio de datos personalizado:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Error: No puede crearse el directorio de datos especificado &quot;%1&quot;.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Núcleo de Bitcoin</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1026,42 +906,18 @@ Dirección: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Iniciar Bitcoin al iniciar el sistema</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Conéctese a la red Bitcoin través de un proxy SOCKS.</translation>
     </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (ej. IPv4: 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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation>
@@ -1074,30 +930,10 @@ Dirección: %4
         <source>&amp;Network</source>
         <translation>&amp;Red</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Expert</source>
         <translation>Experto</translation>
     </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Abrir automáticamente el puerto del cliente Bitcoin en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation>
@@ -1118,14 +954,6 @@ Dirección: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Puerto del servidor proxy (ej. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Versión SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versión del proxy SOCKS (ej. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Ventana</translation>
@@ -1166,14 +994,6 @@ Dirección: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían monedas.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Mostrar o no las direcciones Bitcoin en la lista de transacciones.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Mostrar las direcciones en la lista de transacciones</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Mostrar o no características de control de moneda</translation>
@@ -1192,7 +1012,7 @@ Dirección: %4
     </message>
     <message>
         <source>none</source>
-        <translation>Ninguna</translation>
+        <translation>ninguno</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
@@ -1202,10 +1022,6 @@ Dirección: %4
         <source>Client restart required to activate changes.</source>
         <translation>Reinicio del cliente para activar cambios.</translation>
     </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This change would require a client restart.</source>
         <translation>Este cambio requiere reinicio por parte del cliente.</translation>
@@ -1229,18 +1045,10 @@ Dirección: %4
         <source>Wallet</source>
         <translation>Monedero</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>Su balance actual gastable</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total de transacciones que deben ser confirmadas, y que no cuentan con el balance gastable necesario</translation>
@@ -1277,8 +1085,8 @@ Dirección: %4
         <translation>Gestión de URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección Bitcoin inválida o a parámetros de URI mal formados.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Dirección de pago no válida %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1292,26 +1100,6 @@ Dirección: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>No se pudo iniciar bitcoin: manejador de pago-al-clic</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>No están soportadas las peticiones inseguras a scripts de pago personalizados</translation>
@@ -1324,10 +1112,6 @@ Dirección: %4
         <source>Error communicating with %1: %2</source>
         <translation>Error en la comunicación con %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Respuesta errónea del servidor %1</translation>
@@ -1341,33 +1125,28 @@ Dirección: %4
         <translation>Error en petición de red</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: El directorio de datos especificado &quot;%1&quot; no existe.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Cantidad</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Error: Combinación no válida de -regtest y -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduzca una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/D</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1403,7 +1182,7 @@ Dirección: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>&amp;Información</translation>
+        <translation>Información</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1441,10 +1220,6 @@ Dirección: %4
         <source>Current number of blocks</source>
         <translation>Número actual de bloques</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Bloques totales estimados</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Hora del último bloque</translation>
@@ -1521,19 +1296,7 @@ Dirección: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1556,34 +1319,14 @@ Dirección: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;eutilizar una dirección existente para recibir (no recomendado)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Limpiar todos los campos del formulario.</translation>
+        <translation>Limpiar todos los campos del formulario</translation>
     </message>
     <message>
         <source>Clear</source>
         <translation>Limpiar</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;Solicitar pago</translation>
@@ -1608,10 +1351,6 @@ Dirección: %4
         <source>Copy label</source>
         <translation>Copiar etiqueta</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Copiar cantidad</translation>
@@ -1698,11 +1437,7 @@ Dirección: %4
         <source>(no message)</source>
         <translation>(Ningun mensaje)</translation>
     </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -1745,10 +1480,6 @@ Dirección: %4
         <source>Fee:</source>
         <translation>Tasa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Envío pequeño:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Después de tasas:</translation>
@@ -1807,7 +1538,7 @@ Dirección: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar cuantía</translation>
+        <translation>Copiar cantidad</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -1825,10 +1556,6 @@ Dirección: %4
         <source>Copy priority</source>
         <translation>Copiar prioridad</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiar envío pequeño</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar Cambio</translation>
@@ -1889,14 +1616,6 @@ Dirección: %4
         <source>added as transaction fee</source>
         <translation>añadido como comisión de transacción</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Petición de pago expirada</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Dirección de pago no válida %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1908,10 +1627,6 @@ Dirección: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Pagar a:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección a la que enviar el pago (p. ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Etiquete esta dirección para añadirla a la libreta</translation>
@@ -1922,7 +1637,7 @@ Dirección: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>Escoger direcciones previamente usadas</translation>
+        <translation>Escoger dirección previamente usada</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
@@ -1944,10 +1659,6 @@ Dirección: %4
         <source>Remove this entry</source>
         <translation>Eliminar esta transacción</translation>
     </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a verified payment request.</source>
         <translation>Esto es una petición de pago verificado.</translation>
@@ -1956,10 +1667,6 @@ Dirección: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Introduce una etiqueta para esta dirección para añadirla a la lista de direcciones utilizadas</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>Esto es una petición de pago no verificado.</translation>
@@ -1975,15 +1682,7 @@ Dirección: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1998,10 +1697,6 @@ Dirección: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección con la que firmar el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escoger dirección previamente usada</translation>
@@ -2054,10 +1749,6 @@ Dirección: %4
         <source>Enter the signing 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.</source>
         <translation>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>La dirección con la que se firmó el mensaje (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verificar el mensaje para comprobar que fue firmado con la dirección Bitcoin indicada</translation>
@@ -2071,12 +1762,8 @@ Dirección: %4
         <translation>Limpiar todos los campos de la verificación de mensaje</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduzca una dirección Bitcoin (ej. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Haga clic en &quot;Firmar mensaje&quot; para generar la firma</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Haga clic en "Firmar mensaje" para generar la firma</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2155,10 +1842,6 @@ Dirección: %4
         <source>Open until %1</source>
         <translation>Abierto hasta %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/fuera de línea</translation>
@@ -2175,10 +1858,6 @@ Dirección: %4
         <source>Status</source>
         <translation>Estado</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, transmitir a través de %n nodo</numerusform><numerusform>, transmitir a través de %n nodos</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
@@ -2211,10 +1890,6 @@ Dirección: %4
         <source>Credit</source>
         <translation>Crédito</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>disponible en %n bloque más</numerusform><numerusform>disponible en %n bloques más</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>no aceptada</translation>
@@ -2241,15 +1916,15 @@ Dirección: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>Identificador de transacción</translation>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Merchant</source>
         <translation>Vendedor</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Las monedas generadas deben madurar %1 bloques antes de que puedan ser gastadas. Una vez que generas este bloque, es propagado por la red para ser añadido a la cadena de bloques. Si falla el intento de meterse en la cadena, su estado cambiará a &quot;no aceptado&quot; y ya no se puede gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del tuyo.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Las monedas generadas deben madurar %1 bloques antes de que puedan ser gastadas. Una vez que generas este bloque, es propagado por la red para ser añadido a la cadena de bloques. Si falla el intento de meterse en la cadena, su estado cambiará a "no aceptado" y ya no se puede gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del tuyo.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2279,10 +1954,6 @@ Dirección: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, todavía no se ha sido difundido satisfactoriamente</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>desconocido</translation>
@@ -2313,18 +1984,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Abierto hasta %1</translation>
@@ -2341,22 +2000,6 @@ Dirección: %4
         <source>Generated but not accepted</source>
         <translation>Generado pero no aceptado</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Recibido con</translation>
@@ -2470,7 +2113,7 @@ Dirección: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copiar cuantía</translation>
+        <translation>Copiar cantidad</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
@@ -2528,10 +2171,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidad</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2545,6 +2184,9 @@ Dirección: %4
         <translation>para</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2596,20 +2238,6 @@ Dirección: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Muestra comandos
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Recibir ayuda para un comando
-</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opciones:
@@ -2653,10 +2281,6 @@ Dirección: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet:18332)</translation>
@@ -2666,10 +2290,6 @@ Dirección: %4
         <translation>Aceptar comandos consola y JSON-RPC
 </translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Ejecutar en segundo plano como daemon y aceptar comandos
@@ -2694,7 +2314,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
 %s
@@ -2705,37 +2325,17 @@ rpcpassword=%s
 El nombre de usuario y la contraseña DEBEN NO ser iguales.
 Si el archivo no existe, créelo con permisos de archivo de solo lectura.
 Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
-Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifradores aceptables (por defecto: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Iniciar modo de prueba de regresión, el cuál utiliza una cadena especial en la cual los bloques pueden ser resueltos instantáneamente. Se utiliza para herramientas de prueba de regresión y desarrollo de aplicaciones.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas.</translation>
@@ -2748,38 +2348,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
         <translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: -proxy)</translation>
@@ -2788,10 +2360,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Precaución: Por favor, ¡revise que la fecha y hora de su ordenador son correctas! Si su reloj está mal, Bitcoin no funcionará correctamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Atención: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están presentando inconvenientes.</translation>
@@ -2808,14 +2376,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; puede ser:</translation>
@@ -2824,54 +2384,22 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Proceso Bitcoin-QT</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opciones de creación de bloques:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conectar sólo a los nodos (o nodo) especificados</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Conectar a través de un proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Conectar a JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Corrupción de base de datos de bloques detectada.</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation>
@@ -2948,22 +2476,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>No se han podido escribir los datos de deshacer</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Donación por KB añadida a las transacciones que envíe</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Encontrar pares mediante búsqueda de DNS (predeterminado: 1 salvo con -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Generar monedas (por defecto: 0)</translation>
@@ -2976,17 +2488,13 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se proporciona &lt;category&gt;, mostrar toda la depuración</translation>
     </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorrecto o bloque de génesis no encontrado. Datadir equivocada para la red?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Dirección -onion inválida: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Dirección -onion inválida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2996,22 +2504,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Anteponer marca temporal a la información de depuración (por defecto: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opciones para cliente RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Seleccionar version de SOCKS para -proxy (4 o 5, por defecto: 5)</translation>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de bloque en bytes (por defecto: %d)</translation>
@@ -3024,18 +2520,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar archivo de monedero (dentro del directorio de datos)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Uso (desaconsejado, usar bitcoin-cli)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificando bloques...</translation>
@@ -3044,22 +2528,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Verificando monedero...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Espere a que se inicie el servidor RPC</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>El monedero %s se encuentra fuera del directorio de datos %s</translation>
     </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Aviso: Argumento -debugnet anticuado, utilice -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Usted necesita reconstruir la base de datos utilizando -reindex para cambiar -txindex</translation>
@@ -3068,10 +2540,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
@@ -3089,20 +2557,12 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Información</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Inválido por el monto -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Inválido por el monto -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Inválido por el monto -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Inválido por el monto -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3124,42 +2584,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Conectarse solo a nodos de la red &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
@@ -3168,18 +2592,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
@@ -3192,10 +2604,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Error de sistema: </translation>
@@ -3233,18 +2641,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versión</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
@@ -3252,16 +2648,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Contraseña para las conexiones JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir conexiones JSON-RPC desde la dirección IP especificada
-</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comando al nodo situado en &lt;ip&gt; (predeterminado: 127.0.0.1)
 </translation>
     </message>
     <message>
@@ -3301,10 +2687,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Este mensaje de ayuda
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>No es posible conectar con %s en este sistema (bind ha dado el error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
@@ -3317,41 +2699,29 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error al cargar wallet.dat: el monedero está dañado</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>El monedero ha necesitado ser reescrito. Reinicie Bitcoin para completar el proceso</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error al cargar wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Dirección -proxy inválida: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Dirección -proxy inválida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>La red especificada en -onlynet &apos;%s&apos; es desconocida</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>La red especificada en -onlynet '%s' es desconocida</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Solicitada versión de proxy -socks desconocida: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>No se puede resolver la dirección de -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>No se puede resolver la dirección de -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>No se puede resolver la dirección de -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>No se puede resolver la dirección de -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3397,13 +2767,5 @@ Por ejemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Tiene que establecer rpcpassword=&lt;contraseña&gt; en el fichero de configuración: ⏎
-%s ⏎
-Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index 9a39551d6be4..c89ac5c6eff4 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_MX" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>El nucleo de Bitcoin de desarrolladores</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="es_MX" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -43,7 +11,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Nuevo</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -51,27 +19,27 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copiar</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>Cerrar</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Copiar dirección</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Eliminar la dirección actualmente seleccionada de la lista</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Exportar la información en la tabla actual a un archivo</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Exportar</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -79,43 +47,43 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Elija una dirección a la cual enviar monedas</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Elija la dirección con la cual recibir monedas</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>Elegir</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>Enviando direcciones</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>Recibiendo direcciones</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Estas son tus direcciones de Bitcoin para enviar pagos. Siempre revise la cantidad y la dirección receptora antes de enviar monedas</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Estas son tus direcciones Bitcoin para recibir pagos. Es recomendado usar una nueva dirección receptora para cada transacción.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>Copiar &amp;Etiqueta</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Editar</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Exportar Lista de direcciones</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -125,11 +93,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>Fallo en la exportación</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Ocurrio un error al intentar guardar la lista de direccione en %1</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +111,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Ingrese la contraseña</translation>
@@ -163,10 +123,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Repita la nueva contraseña</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Ingrese la nueva contraseña a la cartera&lt;br/&gt;Por favor use una contraseña de&lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt; o &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cartera encriptada.</translation>
@@ -201,19 +157,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Advertencia: Si encripta su cartera y pierde su contraseña, &lt;b&gt;PERDERÁ TODOS SUS BITCOINS&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
+        <translation>¿Está seguro que desea encriptar su cartera?</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>Advertencia: ¡La tecla Bloq Mayus está activada!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
@@ -221,7 +173,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin se cerrará para finalizar el proceso de encriptación. Recuerda que encriptar tu cartera no protege completamente a tus bitcoins de ser robadas por malware infectando tu computadora.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -249,14 +201,14 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <translation>La contraseña de la cartera ha sido exitosamente cambiada.</translation>
     </message>
 </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
+        <translation>Sign &amp;mensaje</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
@@ -268,7 +220,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Nodo</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -290,17 +242,13 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Salir de la aplicación</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar información acerca de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
+        <translation>Acerca de &amp;Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <translation>Mostrar información acerca de Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
@@ -308,47 +256,47 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Encriptar cartera</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Respaldar cartera</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Cambiar contraseña...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Enviando direcciones...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Recibiendo direcciones...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Abrir &amp;URL...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <translation>Importando bloques desde el disco...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <translation>Reindexando bloques en el disco...</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <translation>Enviar monedas a una dirección Bitcoin</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <translation>Modificar las opciones de configuración de Bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <translation>Respaldar cartera en otra ubicación</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
@@ -356,51 +304,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Depurar ventana</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <translation>Abrir la consola de depuración y disgnostico</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Verificar mensaje...</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -418,34 +330,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Tabs toolbar</source>
         <translation>Pestañas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>nucleo Bitcoin</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Command-line options</source>
         <translation>opciones de la &amp;Linea de comandos</translation>
@@ -454,70 +342,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Mostrar mensaje de ayuda del nucleo de Bitcoin para optener una lista con los posibles comandos  de Bitcoin</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n Activar conexión a la red de Bitcoin</numerusform><numerusform>%n Activar conexiones a la red de Bitcoin</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Actualizado al dia </translation>
@@ -534,14 +362,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Incoming transaction</source>
         <translation>Transacción entrante</translation>
     </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>La cartera esta &lt;b&gt;encriptada&lt;/b&gt; y &lt;b&gt;desbloqueada&lt;/b&gt; actualmente </translation>
@@ -550,28 +370,12 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>La cartera esta &lt;b&gt;encriptada&lt;/b&gt; y &lt;b&gt;bloqueada&lt;/b&gt; actualmente </translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
@@ -588,30 +392,6 @@ Address: %4
         <source>Fee:</source>
         <translation>Cuota:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Monto</translation>
@@ -624,18 +404,10 @@ Address: %4
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Confirmado </translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Copiar dirección </translation>
@@ -648,18 +420,6 @@ Address: %4
         <source>Copy amount</source>
         <translation>copiar monto</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>copiar cantidad</translation>
@@ -680,119 +440,15 @@ Address: %4
         <source>Copy priority</source>
         <translation>copiar prioridad</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>copiar cambio</translation>
     </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -803,14 +459,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Etiqueta</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Dirección</translation>
@@ -832,12 +480,8 @@ Address: %4
         <translation>Editar dirección de envios</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>El domicilio ingresado &quot;%1&quot; ya existe en la libreta de direcciones</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>El domicilio ingresado "%1" ya existe en la libreta de direcciones</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -850,33 +494,9 @@ Address: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Opciones de lineas de comando del nucleo de Bitcoin</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>nucleo Bitcoin</translation>
@@ -885,6 +505,14 @@ Address: %4
         <source>version</source>
         <translation>Versión</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Acerca de Bitcoin Core</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uso:</translation>
@@ -898,17 +526,13 @@ Address: %4
         <translation>Opciones de interfaz</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Definir idioma, por ejemplo &quot;de_DE&quot; (por defecto: Sistema local)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Definir idioma, por ejemplo "de_DE" (por defecto: Sistema local)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Iniciar minimizado</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar pantalla de arraque al iniciar (por defecto: 1)</translation>
@@ -921,2448 +545,598 @@ Address: %4
 <context>
     <name>Intro</name>
     <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>nucleo Bitcoin</translation>
+    </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    <message>
+        <source>Options</source>
+        <translation>Opciones</translation>
     </message>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>Active command-line options that override above options:</source>
+        <translation>Activar las opciones de linea de comando que sobre escriben las siguientes opciones:</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Formulario</translation>
     </message>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Monto</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiqueta</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation>Mensaje opcional para agregar a la solicitud de pago, el cual será mostrado cuando la solicitud este abierta. Nota: El mensaje no se manda con el pago a travéz de la red de Bitcoin.</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>Use este formulario para la solicitud de pagos. Todos los campos son &lt;b&gt;opcionales&lt;/b&gt;</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>Monto opcional a solicitar. Dejarlo vacion o en cero no solicita un monto especifico.</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Copiar capa </translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>copiar monto</translation>
     </message>
 </context>
 <context>
-    <name>OpenURIDialog</name>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Domicilio</translation>
     </message>
     <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Monto</translation>
     </message>
     <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opciones</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation>Activar las opciones de linea de comando que sobre escriben las siguientes opciones:</translation>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Formulario</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>advertencia del administrador de red.</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Tu active proxy no soporta SOCKS5, el cual es requerido para solicitud de pago via proxy. </translation>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ingrese una direccion Bitcoin (ejem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiqueta</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>Mensaje opcional para agregar a la solicitud de pago, el cual será mostrado cuando la solicitud este abierta. Nota: El mensaje no se manda con el pago a travéz de la red de Bitcoin.</translation>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation>Use este formulario para la solicitud de pagos. Todos los campos son &lt;b&gt;opcionales&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation>Monto opcional a solicitar. Dejarlo vacion o en cero no solicita un monto especifico.</translation>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Copiar capa </translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>copiar monto</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Domicilio</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Monto</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Monto</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Mandar monedas</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation>Bytes:</translation>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Monto:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation>Prioridad:</translation>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation>Cuota:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Enviar a múltiples receptores a la vez</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Saldo:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Confirme la acción de enviar</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Confirme para mandar monedas</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation>copiar cantidad</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>copiar monto</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation>copiar cuota</translation>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation>copiar despues de cuota</translation>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation>copiar bytes</translation>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation>copiar prioridad</translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation>copiar cambio</translation>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Monto total %1(=%2)</translation>
-    </message>
-    <message>
-        <source>or</source>
-        <translation>o</translation>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>El monto a pagar debe ser mayor a 0</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation>¡La creación de transacion falló!</translation>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>¡La transación fue rechazada! Esto puede ocurrir si algunas de tus monedas en tu cartera han sido gastadas, al igual que si usas una cartera copiada y la monedas fueron gastadas en la copia pero no se marcaron como gastadas.</translation>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation>Advertencia: Dirección de Bitcoin invalida</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation>Advertencia: Cambio de dirección desconocido</translation>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>M&amp;onto</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Pagar &amp;a:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Ingrese una etiqueta para esta dirección para agregarlo en su libreta de direcciones.</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiqueta</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation>Este es un pago normal</translation>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Pegar dirección  del portapapeles</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation>Quitar esta entrada</translation>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Mensaje:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation>Esta es una verificación de solicituda de pago.</translation>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation>Esta es una solicitud de pago no verificada.</translation>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation>Pago para:</translation>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation>Apagando el nucleo de Bitcoin...</translation>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation>No apague su computadora hasta que esta ventana desaparesca.</translation>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Pegar dirección  del portapapeles</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ingrese una direccion Bitcoin (ejem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation>nucleo Bitcoin</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>El nucleo de Bitcoin de desarrolladores</translation>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Abrir hasta %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/No confirmado</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 confirmaciones</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Monto</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, no ha sido transmitido aun</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>desconocido</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Detalles de la transacción</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Este panel muestras una descripción detallada de la transacción</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipo</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Domicilio</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Monto</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Abrir hasta %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Confimado (%1 confirmaciones)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Este bloque no fue recibido por ningun nodo y probablemente no fue aceptado !</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Generado pero no aprovado</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Recivido con</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Enviar a</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Pagar a si mismo</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minado</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Fecha y hora en que la transacción fue recibida </translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Escriba una transacción</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Direccion del destinatario de la transacción</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Cantidad removida del saldo o agregada </translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Todo</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Hoy</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Esta semana </translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Este mes </translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>El mes pasado </translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Este año</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Recivido con</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Enviar a</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Para ti mismo</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minado </translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Otro</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Ingrese dirección o capa a buscar </translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Monto minimo </translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Copiar dirección </translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Copiar capa </translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>copiar monto</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Editar capa </translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation>Exportar el historial de transacción</translation>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation>Fallo en la exportación</translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation>Ocurrio un error intentando guardar el historial de transaciones a %1</translation>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation>Exportacion satisfactoria</translation>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation>el historial de transaciones ha sido guardado exitosamente en 1%</translation>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Arhchivo separado por comas (*.CSV)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Confirmado </translation>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
-    <message>
-        <source>Type</source>
-        <translation>Tipo</translation>
-    </message>
     <message>
         <source>Label</source>
         <translation>Etiqueta</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Domicilio</translation>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Monto</translation>
     </message>
     <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>Para</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation>No se há cargado la cartera.</translation>
+        <source>(no label)</source>
+        <translation>(sin etiqueta)</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>WalletModel</name>
+    <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Mandar monedas</translation>
     </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation>Ocurrio un error tratando de guardar la información de la cartera %1</translation>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation>La información de la cartera fué guardada exitosamente a 1%</translation>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lista de comandos</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;categoria&gt; puede ser:</translation>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>Bytes:</source>
+        <translation>Bytes:</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Monto:</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Priority:</source>
+        <translation>Prioridad:</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>Fee:</source>
+        <translation>Cuota:</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Enviar a múltiples receptores a la vez</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Saldo:</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Confirme la acción de enviar</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Confirme para mandar monedas</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Copy quantity</source>
+        <translation>copiar cantidad</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>copiar monto</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Copy fee</source>
+        <translation>copiar cuota</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Copy after fee</source>
+        <translation>copiar despues de cuota</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>Copy bytes</source>
+        <translation>copiar bytes</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Copy priority</source>
+        <translation>copiar prioridad</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Copy change</source>
+        <translation>copiar cambio</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>Monto total %1(=%2)</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>or</source>
+        <translation>o</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>El monto a pagar debe ser mayor a 0</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Transaction creation failed!</source>
+        <translation>¡La creación de transacion falló!</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation>¡La transación fue rechazada! Esto puede ocurrir si algunas de tus monedas en tu cartera han sido gastadas, al igual que si usas una cartera copiada y la monedas fueron gastadas en la copia pero no se marcaron como gastadas.</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Advertencia: Dirección de Bitcoin invalida</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(sin etiqueta)</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Warning: Unknown change address</source>
+        <translation>Advertencia: Cambio de dirección desconocido</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>M&amp;onto</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Pagar &amp;a:</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Ingrese una etiqueta para esta dirección para agregarlo en su libreta de direcciones.</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiqueta</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>This is a normal payment.</source>
+        <translation>Este es un pago normal</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Pegar dirección  del portapapeles</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation>Opciones de cartera:</translation>
+        <source>Remove this entry</source>
+        <translation>Quitar esta entrada</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Mensaje:</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>This is a verified payment request.</source>
+        <translation>Esta es una verificación de solicituda de pago.</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>This is an unverified payment request.</source>
+        <translation>Esta es una solicitud de pago no verificada.</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Pay To:</source>
+        <translation>Pago para:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Apagando el nucleo de Bitcoin...</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>No apague su computadora hasta que esta ventana desaparesca.</translation>
     </message>
+</context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Pegar dirección  del portapapeles</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>nucleo Bitcoin</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>The Bitcoin Core developers</source>
+        <translation>El nucleo de Bitcoin de desarrolladores</translation>
     </message>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Abrir hasta %1</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/No confirmado</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 confirmaciones</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Monto</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, no ha sido transmitido aun</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>desconocido</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Detalles de la transacción</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Este panel muestras una descripción detallada de la transacción</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tipo</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Domicilio</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Abrir hasta %1</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Confimado (%1 confirmaciones)</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Este bloque no fue recibido por ningun nodo y probablemente no fue aceptado !</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Generado pero no aprovado</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Recivido con</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Enviar a</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Pagar a si mismo</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minado</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Fecha y hora en que la transacción fue recibida </translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Escriba una transacción</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Direccion del destinatario de la transacción</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Cantidad removida del saldo o agregada </translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Todo</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Hoy</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Esta semana </translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Este mes </translation>
     </message>
     <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>El mes pasado </translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Este año</translation>
     </message>
     <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Recivido con</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Enviar a</translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Para ti mismo</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation>Versión</translation>
+        <source>Mined</source>
+        <translation>Minado </translation>
     </message>
     <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Otro</translation>
     </message>
     <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Ingrese dirección o capa a buscar </translation>
     </message>
     <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Monto minimo </translation>
     </message>
     <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Copiar dirección </translation>
     </message>
     <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Copiar capa </translation>
     </message>
     <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>copiar monto</translation>
     </message>
     <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Editar capa </translation>
     </message>
     <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <source>Export Transaction History</source>
+        <translation>Exportar el historial de transacción</translation>
     </message>
     <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Exporting Failed</source>
+        <translation>Fallo en la exportación</translation>
     </message>
     <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the transaction history to %1.</source>
+        <translation>Ocurrio un error intentando guardar el historial de transaciones a %1</translation>
     </message>
     <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <source>Exporting Successful</source>
+        <translation>Exportacion satisfactoria</translation>
     </message>
     <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Arhchivo separado por comas (*.CSV)</translation>
     </message>
     <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Confirmado </translation>
     </message>
     <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Loading addresses...</source>
-        <translation>Cargando direcciones...</translation>
+        <source>Type</source>
+        <translation>Tipo</translation>
     </message>
     <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Domicilio</translation>
     </message>
     <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>Para</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>No wallet has been loaded.</source>
+        <translation>No se há cargado la cartera.</translation>
     </message>
+</context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Mandar monedas</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <source>&amp;Export</source>
+        <translation>&amp;Exportar</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Exportar la información en la tabla actual a un archivo</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the wallet data to %1.</source>
+        <translation>Ocurrio un error tratando de guardar la información de la cartera %1</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;categoria&gt; puede ser:</translation>
     </message>
     <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
+        <source>Wallet options:</source>
+        <translation>Opciones de cartera:</translation>
     </message>
     <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
+        <source>Loading addresses...</source>
+        <translation>Cargando direcciones...</translation>
     </message>
     <message>
         <source>Loading block index...</source>
         <translation>Cargando indice de bloques... </translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>Cargando billetera...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Done loading</source>
         <translation>Carga completa</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index 03ecce46c0a0..321e5312ad7a 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="es_UY" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="es_UY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Crear una nueva dirección </translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copia la dirección seleccionada al portapapeles del sistema</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Borrar</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Archivos separados por coma (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Escriba la contraseña</translation>
@@ -163,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Repetir nueva contraseña</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduzca la nueva contraseña para el monedero. &lt;br/&gt; Utilice una contraseña de &lt;b&gt; 10 o más caracteres al azar &lt;/ b&gt;, o &lt;b&gt; ocho o más palabras &lt;/ b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Monedero cifrado</translation>
@@ -199,30 +83,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Confirme el cifrado del monedero</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Monedero cifrado</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>Fallo en el cifrado del monedero</translation>
@@ -247,17 +111,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Fallo en el descifrado del monedero</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Sincronizando con la red...</translation>
@@ -266,10 +122,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Vista previa</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Mostrar descripción general del monedero</translation>
@@ -282,3087 +134,361 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Browse transaction history</source>
         <translation>Buscar en el historial de transacciones</translation>
     </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quit application</source>
         <translation>Salir de la aplicacion </translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar informacion sobre Bitcoin</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>&amp;Opciones...</translation>
     </message>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Cambie la clave utilizada para el cifrado del monedero</translation>
     </message>
     <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <source>&amp;File</source>
+        <translation>&amp;Archivo</translation>
     </message>
     <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Settings</source>
+        <translation>&amp;Configuracion </translation>
     </message>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ayuda</translation>
     </message>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <source>Tabs toolbar</source>
+        <translation>Barra de herramientas</translation>
     </message>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[prueba_de_red]</translation>
     </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n active connection(s) to Bitcoin network</source>
+        <translation><numerusform>%n conexión activa a la red Bitcoin </numerusform><numerusform>%n conexiones activas a la red Bitcoin</numerusform></translation>
     </message>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>Up to date</source>
+        <translation>A la fecha</translation>
     </message>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Catching up...</source>
+        <translation>Ponerse al dia...</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Sent transaction</source>
+        <translation>Transaccion enviada</translation>
     </message>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>Incoming transaction</source>
+        <translation>Transacción entrante</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation>Cambie la clave utilizada para el cifrado del monedero</translation>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>El Monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation>
     </message>
     <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>El Monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
     </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Direccion </translation>
     </message>
     <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(Sin etiqueta)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Editar dirección</translation>
     </message>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Etiqueta</translation>
     </message>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Direccion </translation>
     </message>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Nueva dirección de recepción </translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Nueva dirección de envío </translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>Editar dirección de recepcion </translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>Editar dirección de envío </translation>
     </message>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>No se puede abrir el monedero.</translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation>&amp;Archivo</translation>
+        <source>New key generation failed.</source>
+        <translation>Fallo en la nueva clave generada.</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>&amp;Settings</source>
-        <translation>&amp;Configuracion </translation>
+        <source>Options</source>
+        <translation>Opciones</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>&amp;Help</source>
-        <translation>&amp;Ayuda</translation>
+        <source>Form</source>
+        <translation>Formulario</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation>Barra de herramientas</translation>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>[testnet]</source>
-        <translation>[prueba_de_red]</translation>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiqueta:</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Direccion </translation>
     </message>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(Sin etiqueta)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Enviar monedas</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Enviar a varios destinatarios a la vez</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Balance:</translation>
     </message>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n conexión activa a la red Bitcoin </numerusform><numerusform>%n conexiones activas a la red Bitcoin</numerusform></translation>
+        <source>Confirm the send action</source>
+        <translation>Confirmar el envío</translation>
     </message>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Confirmar el envio de monedas</translation>
     </message>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>La cantidad a pagar debe ser mayor que 0.</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>(no label)</source>
+        <translation>(Sin etiqueta)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>A&amp;mount:</source>
+        <translation>A&amp;Monto:</translation>
     </message>
     <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Pagar &amp;A:</translation>
     </message>
     <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Introduzca una etiqueta para esta dirección para añadirla a su libreta de direcciones</translation>
     </message>
     <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Pegar la dirección desde el portapapeles</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Up to date</source>
-        <translation>A la fecha</translation>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Catching up...</source>
-        <translation>Ponerse al dia...</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Pegar la dirección desde el portapapeles</translation>
     </message>
     <message>
-        <source>Sent transaction</source>
-        <translation>Transaccion enviada</translation>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation>Transacción entrante</translation>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>El Monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>El Monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>ClientModel</name>
+    <name>SplashScreen</name>
     <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[prueba_de_red]</translation>
     </message>
 </context>
 <context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Address</source>
-        <translation>Direccion </translation>
+        <source>Open until %1</source>
+        <translation>Abrir hasta %1</translation>
     </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(Sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>desconocido</translation>
     </message>
 </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Editar dirección</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Etiqueta</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Direccion </translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Nueva dirección de recepción </translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Nueva dirección de envío </translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Editar dirección de recepcion </translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>Editar dirección de envío </translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>La dirección introducida &quot;% 1&quot; ya está en la libreta de direcciones.</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>No se puede abrir el monedero.</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>Fallo en la nueva clave generada.</translation>
-    </message>
-</context>
+    <name>TransactionDescDialog</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Direccion </translation>
     </message>
     <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Abrir hasta %1</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionView</name>
     <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Archivos separados por coma (*.csv)</translation>
     </message>
     <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Fecha</translation>
     </message>
     <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiqueta</translation>
     </message>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Direccion </translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Enviar monedas</translation>
     </message>
 </context>
 <context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opciones</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Formulario</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiqueta:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Direccion </translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(Sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Enviar monedas</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Enviar a varios destinatarios a la vez</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Balance:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Confirmar el envío</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Confirmar el envio de monedas</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>La cantidad a pagar debe ser mayor que 0.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(Sin etiqueta)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>A&amp;Monto:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Pagar &amp;A:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Introduzca una etiqueta para esta dirección para añadirla a su libreta de direcciones</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiqueta:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Pegar la dirección desde el portapapeles</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Pegar la dirección desde el portapapeles</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[prueba_de_red]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Abrir hasta %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>desconocido</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Direccion </translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Abrir hasta %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Archivos separados por coma (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Fecha</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiqueta</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Direccion </translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Enviar monedas</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index e6c27bf21c65..cd3a39b6b9cb 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>⏎
-See on eksperimentaalne tarkvara.⏎
-⏎
-Levitatud MIT/X11 tarkvara litsentsi all, vaata kaasasolevat faili COPYING või http://www.opensource.org/licenses/mit-license.php⏎
-⏎
-Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenSSL Toolkitis (http://www.openssl.org/) ja Eric Young&apos;i poolt loodud krüptograafilist tarkvara (eay@cryptsoft.com) ning Thomas Bernard&apos;i loodud UPnP tarkvara.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Autoriõigus</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="et" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -46,22 +9,10 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>Create a new address</source>
         <translation>Loo uus aadress</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopeeri märgistatud aadress vahemällu</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Aadressi kopeerimine</translation>
@@ -72,44 +23,16 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>Ekspordi kuvatava vahelehe sisu faili</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Kustuta</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Need on sinu Bitcoini aadressid maksete saatmiseks. Müntide saatmisel kontrolli alati summat ning saaja aadressi.</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>&amp;Märgise kopeerimine</translation>
@@ -118,23 +41,11 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>&amp;Edit</source>
         <translation>&amp;Muuda</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Komaeraldatud fail (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +79,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>Repeat new passphrase</source>
         <translation>Korda salafraasi</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Sisesta rahakotile uus salafraas.&lt;br/&gt;Palun kasuta salafraasina &lt;b&gt;vähemalt 10 tähte/numbrit/sümbolit&lt;/b&gt;, või &lt;b&gt;vähemalt 8 sõna&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Krüpteeri rahakott</translation>
@@ -271,10 +178,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>&amp;Overview</source>
         <translation>&amp;Ülevaade</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Kuva rahakoti üld-ülevaade</translation>
@@ -295,10 +198,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>Quit application</source>
         <translation>Väljumine</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Kuva info Bitcoini kohta</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Teave &amp;Qt kohta</translation>
@@ -323,18 +222,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Salafraasi muutmine</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Impordi blokid kettalt...</translation>
@@ -431,50 +318,10 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoini klient</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiivne ühendus Bitcoini võrku</numerusform><numerusform>%n aktiivset ühendust Bitcoini võrku</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Protsessitud %1 (arvutuslikult) tehingu ajaloo blokki %2-st.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Protsessitud %1 tehingute ajaloo blokki.</translation>
@@ -491,14 +338,6 @@ Toode sisaldab OpenSSL Projekti all toodetud tarkvara, mis on kasutamiseks OpenS
         <source>%n week(s)</source>
         <translation><numerusform>%n nädal</numerusform><numerusform>%n nädalat</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 maas</translation>
@@ -558,10 +397,6 @@ Aadress: %4⏎</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Rahakott on &lt;b&gt;krüpteeritud&lt;/b&gt; ning hetkel &lt;b&gt;suletud&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ilmnes kriitiline tõrge. Bitcoin suletakse turvakaalutluste tõttu.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -572,54 +407,10 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Summa:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Kogus</translation>
@@ -632,18 +423,10 @@ Aadress: %4⏎</translation>
         <source>Date</source>
         <translation>Kuupäev</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Kinnitatud</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Aadressi kopeerimine</translation>
@@ -660,147 +443,11 @@ Aadress: %4⏎</translation>
         <source>Copy transaction ID</source>
         <translation>Kopeeri tehingu ID</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(silti pole)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -811,14 +458,6 @@ Aadress: %4⏎</translation>
         <source>&amp;Label</source>
         <translation>&amp;Märgis</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Aadress</translation>
@@ -840,12 +479,12 @@ Aadress: %4⏎</translation>
         <translation>Väljaminevate aadresside muutmine</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Selline aadress on juba olemas: &quot;%1&quot;</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Selline aadress on juba olemas: "%1"</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Sisestatud aadress &quot;%1&quot; ei ole Bitcoinis kehtiv.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Sisestatud aadress "%1" ei ole Bitcoinis kehtiv.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -858,33 +497,9 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
@@ -893,6 +508,10 @@ Aadress: %4⏎</translation>
         <source>version</source>
         <translation>versioon</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Käsurea valikud</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Kasutus:</translation>
@@ -906,110 +525,38 @@ Aadress: %4⏎</translation>
         <translation>UI valikud</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Keele valik, nt &quot;ee_ET&quot; (vaikeväärtus: system locale)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Keele valik, nt "ee_ET" (vaikeväärtus: system locale)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Käivitu tegumiribale</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Käivitamisel teabeakna kuvamine (vaikeväärtus: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoini tuumik</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>Tõrge</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
         <translation>Valikud</translation>
     </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation>%Peamine</translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>Tasu tehingu &amp;fee</translation>
@@ -1023,108 +570,40 @@ Aadress: %4⏎</translation>
         <translation>&amp;Start Bitcoin sisselogimisel</translation>
     </message>
     <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <source>Reset all client options to default.</source>
+        <translation>Taasta kõik klientprogrammi seadete vaikeväärtused.</translation>
     </message>
     <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
+        <source>&amp;Reset Options</source>
+        <translation>&amp;Lähtesta valikud</translation>
     </message>
     <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <source>&amp;Network</source>
+        <translation>&amp;Võrk</translation>
     </message>
     <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
+        <translation>Bitcoini kliendi pordi automaatne avamine ruuteris. Toimib, kui sinu ruuter aktsepteerib UPnP ühendust.</translation>
     </message>
     <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <source>Map port using &amp;UPnP</source>
+        <translation>Suuna port &amp;UPnP kaudu</translation>
     </message>
     <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
+        <source>Proxy &amp;IP:</source>
+        <translation>Proxi &amp;IP:</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 type="unfinished"/>
+        <source>&amp;Port:</source>
+        <translation>&amp;Port:</translation>
     </message>
     <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <source>Port of the proxy (e.g. 9050)</source>
+        <translation>Proxi port (nt 9050)</translation>
     </message>
     <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation>Taasta kõik klientprogrammi seadete vaikeväärtused.</translation>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation>&amp;Lähtesta valikud</translation>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Võrk</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Bitcoini kliendi pordi automaatne avamine ruuteris. Toimib, kui sinu ruuter aktsepteerib UPnP ühendust.</translation>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation>Suuna port &amp;UPnP kaudu</translation>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation>Proxi &amp;IP:</translation>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation>&amp;Port:</translation>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Proxi port (nt 9050)</translation>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Turva proxi SOCKS &amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Turva proxi SOCKS versioon (nt 5)</translation>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation>&amp;Aken</translation>
+        <source>&amp;Window</source>
+        <translation>&amp;Aken</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
@@ -1136,7 +615,7 @@ Aadress: %4⏎</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 Quit in the menu.</source>
-        <translation>Sulgemise asemel minimeeri aken. Selle valiku tegemisel suletakse programm Menüüst &quot;Välju&quot; käsuga.</translation>
+        <translation>Sulgemise asemel minimeeri aken. Selle valiku tegemisel suletakse programm Menüüst "Välju" käsuga.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1162,18 +641,6 @@ Aadress: %4⏎</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Vali liideses ning müntide saatmisel kuvatav vaikimisi alajaotus.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Kuvada Bitcoini aadress tehingute loetelus või mitte.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Tehingute loetelu &amp;Display aadress</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1186,26 +653,10 @@ Aadress: %4⏎</translation>
         <source>default</source>
         <translation>vaikeväärtus</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Kinnita valikute algseadistamine</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Sisestatud kehtetu proxy aadress.</translation>
@@ -1225,37 +676,13 @@ Aadress: %4⏎</translation>
         <source>Wallet</source>
         <translation>Rahakott</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Ebaküps:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Mitte aegunud mine&apos;itud jääk</translation>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
+        <translation>Mitte aegunud mine'itud jääk</translation>
     </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
@@ -1272,117 +699,32 @@ Aadress: %4⏎</translation>
         <source>URI handling</source>
         <translation>URI käsitsemine</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI ei suudeta parsida. Põhjuseks võib olla kehtetu Bitcoini aadress või vigased URI parameetrid.</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Bitcoin ei käivitu: vajuta-maksa toiming</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Kogus</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Sisesta Bitcoini aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Save QR Code</source>
         <translation>Salvesta QR kood</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1401,14 +743,6 @@ Aadress: %4⏎</translation>
         <source>&amp;Information</source>
         <translation>&amp;Informatsioon</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Kasutan OpenSSL versiooni</translation>
@@ -1421,10 +755,6 @@ Aadress: %4⏎</translation>
         <source>Network</source>
         <translation>Võrgustik</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Ühenduste arv</translation>
@@ -1437,10 +767,6 @@ Aadress: %4⏎</translation>
         <source>Current number of blocks</source>
         <translation>Plokkide hetkearv</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Ligikaudne plokkide kogus</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Viimane ploki aeg</translation>
@@ -1453,26 +779,6 @@ Aadress: %4⏎</translation>
         <source>&amp;Console</source>
         <translation>&amp;Konsool</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Build date</source>
         <translation>Valmistusaeg</translation>
@@ -1501,113 +807,17 @@ Aadress: %4⏎</translation>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Ülevaateks võimalikest käsklustest trüki &lt;b&gt;help&lt;/b&gt;.</translation>
     </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Märgis</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Märgise kopeerimine</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopeeri summa</translation>
@@ -1615,34 +825,6 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Aadress</translation>
@@ -1665,7 +847,7 @@ Aadress: %4⏎</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Tõrge URI&apos;st QR koodi loomisel</translation>
+        <translation>Tõrge URI'st QR koodi loomisel</translation>
     </message>
 </context>
 <context>
@@ -1690,77 +872,17 @@ Aadress: %4⏎</translation>
         <source>(no label)</source>
         <translation>(silti pole)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Müntide saatmine</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Summa:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Saatmine mitmele korraga</translation>
@@ -1769,10 +891,6 @@ Aadress: %4⏎</translation>
         <source>Add &amp;Recipient</source>
         <translation>Lisa &amp;Saaja</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Puhasta &amp;Kõik</translation>
@@ -1793,50 +911,10 @@ Aadress: %4⏎</translation>
         <source>Confirm send coins</source>
         <translation>Müntide saatmise kinnitamine</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopeeri summa</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Saaja aadress ei ole kehtiv, palun kontrolli.</translation>
@@ -1857,43 +935,11 @@ Aadress: %4⏎</translation>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Ühe saatmisega topelt-adressaati olla ei tohi.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(silti pole)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1904,10 +950,6 @@ Aadress: %4⏎</translation>
         <source>Pay &amp;To:</source>
         <translation>Maksa &amp;:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Tehingu saaja aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Aadressiraamatusse sisestamiseks märgista aadress</translation>
@@ -1916,14 +958,6 @@ Aadress: %4⏎</translation>
         <source>&amp;Label:</source>
         <translation>&amp;Märgis</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1934,52 +968,16 @@ Aadress: %4⏎</translation>
     </message>
     <message>
         <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Sõnum:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Sõnum:</translation>
     </message>
-</context>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1994,14 +992,6 @@ Aadress: %4⏎</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Omandiõigsuse tõestamiseks saad sõnumeid allkirjastada oma aadressiga. Ettevaatust petturitega, kes üritavad saada sinu allkirja endale saada. Allkirjasta ainult korralikult täidetud avaldusi, millega nõustud.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Sõnumi signeerimise aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2050,10 +1040,6 @@ Aadress: %4⏎</translation>
         <source>Enter the signing 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.</source>
         <translation>Kinnitamiseks sisesta allkirjastamise aadress, sõnum (kindlasti kopeeri täpselt ka reavahetused, tühikud, tabulaatorid jms) ning allolev signatuur.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Aadress, millega sõnum allkirjastati (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Kinnita sõnum tõestamaks selle allkirjastatust määratud Bitcoini aadressiga.</translation>
@@ -2067,12 +1053,8 @@ Aadress: %4⏎</translation>
         <translation>Tühjenda kõik sõnumi kinnitamise väljad</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Sisesta Bitcoini aadress (nt: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Signatuuri genereerimiseks vajuta &quot;Allkirjasta Sõnum&quot;</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Signatuuri genereerimiseks vajuta "Allkirjasta Sõnum"</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2129,36 +1111,20 @@ Aadress: %4⏎</translation>
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>Avatud kuni %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation>%/1offline&apos;is</translation>
-    </message>
     <message>
         <source>%1/unconfirmed</source>
         <translation>%1/kinnitamata</translation>
@@ -2173,7 +1139,7 @@ Aadress: %4⏎</translation>
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, levita läbi %n node&apos;i</numerusform><numerusform>, levita läbi %n node&apos;i</numerusform></translation>
+        <translation><numerusform>, levita läbi %n node'i</numerusform><numerusform>, levita läbi %n node'i</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2239,17 +1205,9 @@ Aadress: %4⏎</translation>
         <source>Transaction ID</source>
         <translation>Tehingu ID</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
-        <translation>Debug&apos;imise info</translation>
+        <translation>Debug'imise info</translation>
     </message>
     <message>
         <source>Transaction</source>
@@ -2309,14 +1267,6 @@ Aadress: %4⏎</translation>
         <source>Address</source>
         <translation>Aadress</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kogus</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Avaneb %n bloki pärast</numerusform><numerusform>Avaneb %n bloki pärast</numerusform></translation>
@@ -2337,22 +1287,6 @@ Aadress: %4⏎</translation>
         <source>Generated but not accepted</source>
         <translation>Loodud, kuid aktsepteerimata</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Saadud koos</translation>
@@ -2371,7 +1305,7 @@ Aadress: %4⏎</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation>Mine&apos;itud</translation>
+        <translation>Mine'itud</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2442,7 +1376,7 @@ Aadress: %4⏎</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation>Mine&apos;itud</translation>
+        <translation>Mine'itud</translation>
     </message>
     <message>
         <source>Other</source>
@@ -2480,26 +1414,6 @@ Aadress: %4⏎</translation>
         <source>Show transaction details</source>
         <translation>Kuva tehingu detailid</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Komaeraldatud fail (*.csv)</translation>
@@ -2524,10 +1438,6 @@ Aadress: %4⏎</translation>
         <source>Address</source>
         <translation>Aadress</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kogus</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,29 +1451,24 @@ Aadress: %4⏎</translation>
         <translation>saaja</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation type="unfinished"/>
+        <translation>Müntide saatmine</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Ekspordi kuvatava vahelehe sisu faili</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
@@ -2577,14 +1482,6 @@ Aadress: %4⏎</translation>
         <source>Backup Failed</source>
         <translation>Varundamine nurjus</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>Varundamine õnnestus</translation>
@@ -2592,18 +1489,6 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Kasutus:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Käskluste loetelu</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Käskluste abiinfo</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Valikud:</translation>
@@ -2630,7 +1515,7 @@ Aadress: %4⏎</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Peeri aadressi saamiseks ühendu korraks node&apos;iga</translation>
+        <translation>Peeri aadressi saamiseks ühendu korraks node'iga</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2644,10 +1529,6 @@ Aadress: %4⏎</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Mitme sekundi pärast ulakad peerid tagasi võivad tulla (vaikeväärtus: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>RPC pordi %u kuulamiseks seadistamisel ilmnes viga IPv4&apos;l: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Kuula JSON-RPC ühendusel seda porti &lt;port&gt; (vaikeväärtus: 8332 või testnet: 18332)</translation>
@@ -2656,10 +1537,6 @@ Aadress: %4⏎</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Luba käsurea ning JSON-RPC käsklusi</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Tööta taustal ning aktsepteeri käsklusi</translation>
@@ -2682,7 +1559,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, sul tuleb rpcpassword määrata seadete failis:
 %s
@@ -2693,37 +1570,13 @@ rpcpassword=%s
 Kasutajanimi ning parool EI TOHI kattuda.
 Kui faili ei leita, loo see ainult-omaniku-loetavas failiõigustes .
 Soovitatav on seadistada tõrgete puhul teavitus;
-nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
+nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>RPC pordi %u kuulamiseks seadistamisel ilmnes viga IPv6&apos;l, lülitumine tagasi IPv4&apos;le : %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Määratud aadressiga sidumine ning sellelt kuulamine. IPv6 jaoks kasuta vormingut [host]:port</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Tõrge: Tehingust keelduti! Põhjuseks võib olla juba kulutatud mündid, nt kui wallet.dat fail koopias kulutatid mündid, kuid ei märgitud neid siin vastavalt.</translation>
@@ -2734,132 +1587,44 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Käivita käsklus, kui rahakoti tehing muutub (%s cmd&apos;s muudetakse TxID&apos;ks)</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
+        <translation>Käivita käsklus, kui rahakoti tehing muutub (%s cmd's muudetakse TxID'ks)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation>See on test-versioon - kasutamine omal riisikol - ära kasuta mining&apos;uks ega kaupmeeste programmides</translation>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
+        <translation>See on test-versioon - kasutamine omal riisikol - ära kasuta mining'uks ega kaupmeeste programmides</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Hoiatus: -paytxfee on seatud väga kõrgeks! See on sinu poolt makstav tehingu lisatasu.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Hoiatus: Palun kontrolli oma arvuti kuupäeva/kellaaega! Kui arvuti kell on vale, siis Bitcoin ei tööta korralikult</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Hoiatus: ilmnes tõrge wallet.dat faili lugemisel! Võtmed on terved, kuid tehingu andmed või aadressiraamatu kirjed võivad olla kadunud või vigased.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Hoiatus: toimus wallet.dat faili andmete päästmine! Originaal wallet.dat nimetati kaustas %s ümber wallet.{ajatempel}.bak&apos;iks, jäägi või tehingute ebakõlade puhul tuleks teha backup&apos;ist taastamine.</translation>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <translation>Hoiatus: toimus wallet.dat faili andmete päästmine! Originaal wallet.dat nimetati kaustas %s ümber wallet.{ajatempel}.bak'iks, jäägi või tehingute ebakõlade puhul tuleks teha backup'ist taastamine.</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Püüa vigasest wallet.dat failist taastada turvavõtmed</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blokeeri loomise valikud:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Ühendu ainult määratud node&apos;i(de)ga</translation>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <translation>Ühendu ainult määratud node'i(de)ga</translation>
     </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Tuvastati vigane bloki andmebaas</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Leia oma IP aadress (vaikeväärtus: 1, kui kuulatakse ning puudub -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Kas soovid bloki andmebaasi taastada?</translation>
@@ -2936,94 +1701,18 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Failed to write undo data</source>
         <translation>Tagasivõtmise andmete kirjutamine ebaõnnestus</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Otsi DNS&apos;i lookup&apos;i kastavaid peere (vaikeväärtus: 1, kui mitte -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Käivitamisel kontrollitavate blokkide arv (vaikeväärtus: 288, 0=kõik)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Taasta bloki jada indeks blk000??.dat failist</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Määra RPC kõnede haldurite arv (vaikeväärtus: 4)</translation>
     </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Kontrollin blokke...</translation>
@@ -3032,66 +1721,14 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Verifying wallet...</source>
         <translation>Kontrollin rahakotti...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Impordi blokid välisest blk000??.dat failist</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informatsioon</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
         <translation>Säilita kogu tehingu indeks (vaikeväärtus: 0)</translation>
@@ -3110,43 +1747,7 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Ühenda ainult node&apos;idega &lt;net&gt; võrgus (IPv4, IPv6 või Tor)</translation>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL valikud: (vaata Bitcoini Wikist või SSL sätete juhendist)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Ühenda ainult node'idega &lt;net&gt; võrgus (IPv4, IPv6 või Tor)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3156,50 +1757,18 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Sea minimaalne bloki suurus baitides (vaikeväärtus: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Kahanda programmi käivitamisel debug.log faili (vaikeväärtus: 1, kui ei ole -debug)</translation>
     </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Sea ühenduse timeout millisekundites (vaikeväärtus: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Süsteemi tõrge:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 0)</translation>
@@ -3220,18 +1789,6 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Hoiatus: versioon on aegunud, uuendus on nõutav!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versioon</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat fail on katki, päästmine ebaõnnestus</translation>
@@ -3240,17 +1797,9 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC ühenduste salasõna</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>JSON-RPC ühenduste lubamine kindla IP pealt</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Saada käsklusi node&apos;ile IP&apos;ga &lt;ip&gt; (vaikeväärtus: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Käivita käsklus, kui parim plokk muutub (käskluse %s asendatakse ploki hash&apos;iga)</translation>
+        <translation>Käivita käsklus, kui parim plokk muutub (käskluse %s asendatakse ploki hash'iga)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
@@ -3266,7 +1815,7 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>Kasuta JSON-RPC ühenduste jaoks OpenSSL&apos;i (https)</translation>
+        <translation>Kasuta JSON-RPC ühenduste jaoks OpenSSL'i (https)</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
@@ -3280,13 +1829,9 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>This help message</source>
         <translation>Käesolev abitekst</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Selle arvutiga ei ole võimalik siduda %s külge (katse nurjus %d, %s tõttu)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation>-addnode, -seednode ja -connect tohivad kasutada DNS lookup&apos;i</translation>
+        <translation>-addnode, -seednode ja -connect tohivad kasutada DNS lookup'i</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
@@ -3296,41 +1841,29 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Viga wallet.dat käivitamisel. Vigane rahakkott</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Viga wallet.dat käivitamisel: Rahakott nõuab Bitcoini uusimat versiooni</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Rahakott tuli ümberkirjutada: toimingu lõpetamiseks taaskäivita Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Viga wallet.dat käivitamisel</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Vigane -proxi aadress: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Kirjeldatud tundmatu võrgustik -onlynet&apos;is: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Vigane -proxi aadress: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Küsitud tundmatu -socks proxi versioon: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Kirjeldatud tundmatu võrgustik -onlynet'is: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Tundmatu -bind aadress: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Tundmatu -bind aadress: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Tundmatu -externalip aadress: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Tundmatu -externalip aadress: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-paytxfee=&lt;amount&gt; jaoks vigane kogus: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-paytxfee=&lt;amount&gt; jaoks vigane kogus: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +1909,5 @@ nt: alertnotify=echo %%s | email -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error</source>
         <translation>Tõrge</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>rpcpassword=&lt;password&gt; peab sätete failis olema seadistatud:⏎
-%s⏎
-Kui seda faili ei ole, loo see ainult-omanikule-lugemiseks faili õigustes.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index 1fce25d6daaa..f8f03c3d29d6 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="eu_ES" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="eu_ES" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Sortu helbide berria</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopiatu hautatutako helbidea sistemaren arbelera</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Ezabatu</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Komaz bereizitako artxiboa (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Sartu pasahitza</translation>
@@ -163,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Errepikatu pasahitz berria</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Sartu zorrorako pasahitz berria.&lt;br/&gt; Mesedez erabili &lt;b&gt;gutxienez ausazko 10 karaktere&lt;/b&gt;, edo &lt;b&gt;gutxienez zortzi hitz&lt;/b&gt; pasahitza osatzeko.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Enkriptatu zorroa</translation>
@@ -199,30 +83,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Berretsi zorroaren enkriptazioa</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Zorroa enkriptatuta</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>Zorroaren enkriptazioak huts egin du</translation>
@@ -247,17 +111,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Zorroaren desenkriptazioak huts egin du</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Sarearekin sinkronizatzen...</translation>
@@ -266,10 +122,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Gainbegiratu</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Ikusi zorroaren begirada orokorra</translation>
@@ -290,10 +142,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Irten aplikaziotik</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Erakutsi Bitcoin-i buruzko informazioa</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>&amp;Qt-ari buruz</translation>
@@ -307,3062 +155,564 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>&amp;Aukerak...</translation>
     </message>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Aldatu zorroa enkriptatzeko erabilitako pasahitza</translation>
     </message>
     <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <source>&amp;File</source>
+        <translation>&amp;Artxiboa</translation>
     </message>
     <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Settings</source>
+        <translation>&amp;Ezarpenak</translation>
     </message>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Laguntza</translation>
     </message>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <source>Tabs toolbar</source>
+        <translation>Fitxen tresna-barra</translation>
     </message>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
     <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <source>Up to date</source>
+        <translation>Egunean</translation>
     </message>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>Catching up...</source>
+        <translation>Eguneratzen...</translation>
     </message>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Sent transaction</source>
+        <translation>Bidalitako transakzioa</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Incoming transaction</source>
+        <translation>Sarrerako transakzioa</translation>
     </message>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>Zorroa &lt;b&gt;enkriptatuta&lt;/b&gt; eta &lt;b&gt;desblokeatuta&lt;/b&gt; dago une honetan</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation>Aldatu zorroa enkriptatzeko erabilitako pasahitza</translation>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>Zorroa &lt;b&gt;enkriptatuta&lt;/b&gt; eta &lt;b&gt;blokeatuta&lt;/b&gt; dago une honetan</translation>
     </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Kopurua</translation>
     </message>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Kopurua</translation>
     </message>
     <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Helbidea</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Kopiatu helbidea</translation>
     </message>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopiatu etiketa</translation>
     </message>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(etiketarik ez)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Editatu helbidea</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Etiketa</translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Helbidea</translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Jasotzeko helbide berria</translation>
     </message>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Bidaltzeko helbide berria</translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation>&amp;Artxiboa</translation>
+        <source>Edit receiving address</source>
+        <translation>Editatu jasotzeko helbidea</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation>&amp;Ezarpenak</translation>
+        <source>Edit sending address</source>
+        <translation>Editatu bidaltzeko helbidea</translation>
     </message>
     <message>
-        <source>&amp;Help</source>
-        <translation>&amp;Laguntza</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Sartu berri den helbidea, "%1", helbide-liburuan dago jadanik.</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation>Fitxen tresna-barra</translation>
+        <source>Could not unlock wallet.</source>
+        <translation>Ezin desblokeatu zorroa.</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
+        <source>New key generation failed.</source>
+        <translation>Gako berriaren sorrerak huts egin du.</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Aukerak</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Inprimakia</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Azken transakzioak&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Kopurua</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiketa:</translation>
     </message>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopiatu etiketa</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Helbidea</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Kopurua</translation>
     </message>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>Konexio aktibo %n Bitcoin-en sarera</numerusform><numerusform>%n konexio aktibo Bitcoin-en sarera</numerusform></translation>
+        <source>Label</source>
+        <translation>Etiketa</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiketa</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Amount</source>
+        <translation>Kopurua</translation>
     </message>
     <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>(no label)</source>
+        <translation>(etiketarik ez)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Bidali txanponak</translation>
     </message>
     <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Kopurua</translation>
     </message>
     <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Bidali hainbat jasotzaileri batera</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Saldoa:</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Berretsi bidaltzeko ekintza</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Berretsi txanponak bidaltzea</translation>
     </message>
     <message>
-        <source>Up to date</source>
-        <translation>Egunean</translation>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Ordaintzeko kopurua 0 baino handiagoa izan behar du.</translation>
     </message>
     <message>
-        <source>Catching up...</source>
-        <translation>Eguneratzen...</translation>
+        <source>(no label)</source>
+        <translation>(etiketarik ez)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Sent transaction</source>
-        <translation>Bidalitako transakzioa</translation>
+        <source>A&amp;mount:</source>
+        <translation>K&amp;opurua:</translation>
     </message>
     <message>
-        <source>Incoming transaction</source>
-        <translation>Sarrerako transakzioa</translation>
+        <source>Pay &amp;To:</source>
+        <translation>Ordaindu &amp;honi:</translation>
     </message>
     <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Zorroa &lt;b&gt;enkriptatuta&lt;/b&gt; eta &lt;b&gt;desblokeatuta&lt;/b&gt; dago une honetan</translation>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiketa:</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Zorroa &lt;b&gt;enkriptatuta&lt;/b&gt; eta &lt;b&gt;blokeatuta&lt;/b&gt; dago une honetan</translation>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Itsatsi helbidea arbeletik</translation>
     </message>
     <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Amount:</source>
-        <translation>Kopurua</translation>
+        <source>Message:</source>
+        <translation>Mezua</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Itsatsi helbidea arbeletik</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Zabalik %1 arte</translation>
     </message>
     <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/konfirmatu gabe</translation>
     </message>
     <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 konfirmazioak</translation>
     </message>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
         <source>Amount</source>
         <translation>Kopurua</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Helbidea</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, ez da arrakastaz emititu oraindik</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>ezezaguna</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Transakzioaren xehetasunak</translation>
     </message>
     <message>
-        <source>Copy address</source>
-        <translation>Kopiatu helbidea</translation>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Panel honek transakzioaren deskribapen xehea erakusten du</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Copy label</source>
-        <translation>Kopiatu etiketa</translation>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Mota</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Helbidea</translation>
     </message>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Zabalik %1 arte</translation>
     </message>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Konfirmatuta (%1 konfirmazio)</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Bloke hau ez du beste inongo nodorik jaso, eta seguruenik ez da onartuko!</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Sortua, baina ez onartua</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Jasota honekin: </translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Hona bidalia: </translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Ordainketa zeure buruari</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Bildua</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko.</translation>
     </message>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Transakzioa jasotako data eta ordua.</translation>
     </message>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Transakzio mota.</translation>
     </message>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Transakzioaren xede-helbidea.</translation>
     </message>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Saldoan kendu edo gehitutako kopurua.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Denak</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Gaur</translation>
     </message>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Aste honetan</translation>
     </message>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Hil honetan</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Azken hilean</translation>
     </message>
     <message>
-        <source>none</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Aurten</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Muga...</translation>
     </message>
     <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Jasota honekin: </translation>
     </message>
     <message>
-        <source>no</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Hona bidalia: </translation>
     </message>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Zeure buruari</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Bildua</translation>
     </message>
     <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Beste</translation>
     </message>
     <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Sartu bilatzeko helbide edo etiketa</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Kopuru minimoa</translation>
     </message>
     <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Kopiatu helbidea</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopiatu etiketa</translation>
     </message>
     <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Komaz bereizitako artxiboa (*.csv)</translation>
     </message>
     <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>(no label)</source>
-        <translation>(etiketarik ez)</translation>
+        <source>Type</source>
+        <translation>Mota</translation>
     </message>
     <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiketa</translation>
     </message>
     <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Helbidea</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Editatu helbidea</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Etiketa</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Helbidea</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Jasotzeko helbide berria</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Bidaltzeko helbide berria</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Editatu jasotzeko helbidea</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>Editatu bidaltzeko helbidea</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Sartu berri den helbidea, &quot;%1&quot;, helbide-liburuan dago jadanik.</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Ezin desblokeatu zorroa.</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>Gako berriaren sorrerak huts egin du.</translation>
-    </message>
-</context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletFrame</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>WalletModel</name>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Bidali txanponak</translation>
     </message>
 </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Aukerak</translation>
     </message>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Ezarpen fitxategia aukeratu (berezkoa: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>pid fitxategia aukeratu (berezkoa: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>This help message</source>
+        <translation>Laguntza mezu hau</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Rescanning...</source>
+        <translation>Birbilatzen...</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Done loading</source>
+        <translation>Zamaketa amaitua</translation>
     </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Aukerak</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Inprimakia</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Azken transakzioak&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Sartu Bitocin helbide bat (adb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) </translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiketa:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Kopiatu etiketa</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Helbidea</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketa</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketa</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(etiketarik ez)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Bidali txanponak</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Bidali hainbat jasotzaileri batera</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Saldoa:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Berretsi bidaltzeko ekintza</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Berretsi txanponak bidaltzea</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Ordaintzeko kopurua 0 baino handiagoa izan behar du.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(etiketarik ez)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>K&amp;opurua:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Ordaindu &amp;honi:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiketa:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Itsatsi helbidea arbeletik</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Mezua</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Itsatsi helbidea arbeletik</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Sartu Bitocin helbide bat (adb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L) </translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Zabalik %1 arte</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/konfirmatu gabe</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 konfirmazioak</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, ez da arrakastaz emititu oraindik</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>ezezaguna</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Transakzioaren xehetasunak</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Panel honek transakzioaren deskribapen xehea erakusten du</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Mota</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Helbidea</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Zabalik %1 arte</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Konfirmatuta (%1 konfirmazio)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Bloke hau ez du beste inongo nodorik jaso, eta seguruenik ez da onartuko!</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Sortua, baina ez onartua</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Jasoa honekin: </translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Honi bidalia: </translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Ordainketa zeure buruari</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Bildua</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko.</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Transakzioa jasotako data eta ordua.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Transakzio mota.</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Transakzioaren xede-helbidea.</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Saldoan kendu edo gehitutako kopurua.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Denak</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Gaur</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Aste honetan</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Hil honetan</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Azken hilean</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Aurten</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Muga...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Jasota honekin: </translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Hona bidalia: </translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Zeure buruari</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Bildua</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Beste</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Sartu bilatzeko helbide edo etiketa</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Kopuru minimoa</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Kopiatu helbidea</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Kopiatu etiketa</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Komaz bereizitako artxiboa (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Mota</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketa</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Helbidea</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kopurua</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Komandoen lista</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Laguntza komando batean</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Aukerak</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Ezarpen fitxategia aukeratu (berezkoa: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid fitxategia aukeratu (berezkoa: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation>Laguntza mezu hau</translation>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation>Birbilatzen...</translation>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation>Zamaketa amaitua</translation>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 0dfbafb81186..d806fa47efc1 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>⏎ ⏎ این یک نرم‌افزار آزمایشی است⏎ ⏎ نرم افزار تحت مجوز MIT/X11 منتشر شده است. پروندهٔ COPYING یا نشانی http://www.opensource.org/licenses/mit-license.php. را ببینید⏎ ⏎ این محصول شامل نرم‌افزار  توسعه داده‌شده در پروژهٔ OpenSSL است. در این نرم‌افزار از OpenSSL Toolkit (http://www.openssl.org/) و نرم‌افزار رمزنگاری نوشته شده توسط اریک یانگ (eay@cryptsoft.com) و UPnP توسط توماس برنارد استفاده شده است.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>حق تألیف</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="fa" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,21 +9,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>ایجاد نشانی جدید</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>کپی نشانی انتخاب شده به حافظهٔ سیستم</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;رونوشت</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;بستن</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -77,34 +41,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Delete</source>
         <translation>&amp;حذف</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>این‌ها نشانی‌های بیت‌کوین شما برای ارسال وجود هستند. همیشه قبل از ارسال سکه‌ها، نشانی دریافت‌کننده و مقدار ارسالی را بررسی کنید.</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>کپی و برچسب‌&amp;گذاری</translation>
@@ -115,21 +55,13 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>استخراج لیست آدرس</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -163,10 +95,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>تکرار گذرواژهٔ جدید</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>گذرواژهٔ جدید کیف پول خود را وارد کنید.&lt;br/&gt;لطفاً از گذرواژه‌ای با &lt;b&gt;حداقل ۱۰ حرف تصادفی&lt;/b&gt;، یا &lt;b&gt;حداقل هشت کلمه&lt;/b&gt; انتخاب کنید.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>رمزنگاری کیف پول</translation>
@@ -266,10 +194,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;بررسی اجمالی</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>نمایش بررسی اجمالی کیف پول</translation>
@@ -290,10 +214,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>خروج از برنامه</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>نمایش اطلاعات در مورد بیت‌کوین</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>دربارهٔ &amp;کیوت</translation>
@@ -318,18 +238,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;تغییر گذرواژه...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>دریافت بلوک‌ها از دیسک...</translation>
@@ -426,38 +334,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Bitcoin Core</source>
         <translation> هسته Bitcoin </translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>کلاینت بیت‌کوین</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ارتباط فعال با شبکهٔ بیت‌کوین</numerusform></translation>
@@ -466,10 +342,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>منبعی برای دریافت بلاک در دسترس نیست...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 بلاک از مجموع %2 بلاک (تخمینی) تاریخچهٔ تراکنش‌ها پردازش شده است.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>%1 بلاک از تاریخچهٔ تراکنش‌ها پردازش شده است.</translation>
@@ -486,14 +358,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n week(s)</source>
         <translation><numerusform>%n هفته</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 عقب‌تر</translation>
@@ -554,10 +418,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>کیف پول &lt;b&gt;رمزنگاری شده&lt;/b&gt; است و هم‌اکنون &lt;b&gt;قفل&lt;/b&gt; است</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>یک خطای مهلک اتفاق افتاده است. بیت‌کوین نمی‌تواند بدون مشکل به کار خود ادامه دهد و بسته خواهد شد.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -568,54 +428,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>مبلغ:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>مبلغ</translation>
@@ -628,18 +444,10 @@ Address: %4
         <source>Date</source>
         <translation>تاریخ</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>تأیید شده</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>کپی نشانی</translation>
@@ -656,147 +464,19 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>کپی شناسهٔ تراکنش</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>بله</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>خیر</translation>
     </message>
     <message>
         <source>(no label)</source>
         <translation>(بدون برچسب)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -807,14 +487,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;برچسب</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;نشانی</translation>
@@ -836,11 +508,11 @@ Address: %4
         <translation>ویرایش نشانی ارسالی</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>نشانی وارد شده «%1» در حال حاضر در دفترچه وجود دارد.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
         <translation>نشانی وارد شده «%1» یک نشانی معتبر بیت‌کوین نیست.</translation>
     </message>
     <message>
@@ -877,10 +549,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation> هسته Bitcoin </translation>
@@ -889,6 +557,10 @@ Address: %4
         <source>version</source>
         <translation>نسخه</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>گزینه‌های خط‌فرمان</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>استفاده:</translation>
@@ -902,17 +574,13 @@ Address: %4
         <translation>گزینه‌های رابط کاربری</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
         <translation>زبان را تنظیم کنید؛ برای مثال «de_DE» (زبان پیش‌فرض محلی)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>اجرای برنامه به صورت کوچک‌شده</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>نمایش پنجرهٔ خوشامدگویی در ابتدای اجرای برنامه (پیش‌فرض: 1)</translation>
@@ -928,18 +596,6 @@ Address: %4
         <source>Welcome</source>
         <translation>خوش‌آمدید</translation>
     </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>استفاده از مسیر پیش‌فرض</translation>
@@ -949,12 +605,8 @@ Address: %4
         <translation>استفاده از یک مسیر سفارشی:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>بیت‌کوین</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>خطا: نمی‌توان پوشه‌ای برای داده‌ها در «%1» ایجاد کرد.</translation>
+        <source>Bitcoin Core</source>
+        <translation> هسته Bitcoin </translation>
     </message>
     <message>
         <source>Error</source>
@@ -971,27 +623,7 @@ Address: %4
 </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1018,42 +650,6 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;اجرای بیت‌کوین با ورود به سیستم</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>بازنشانی تمام تنظیمات به پیش‌فرض.</translation>
@@ -1066,29 +662,9 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;شبکه</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>استخراج</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>
@@ -1110,14 +686,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>درگاه پراکسی (مثال 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;نسخهٔ SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>نسخهٔ پراکسی SOCKS (مثلاً 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;پنجره</translation>
@@ -1158,18 +726,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>انتخاب واحد پول مورد استفاده برای نمایش در پنجره‌ها و برای ارسال سکه.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>نمایش یا عدم نمایش نشانی‌های بیت‌کوین در لیست تراکنش‌ها.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>نمایش ن&amp;شانی‌ها در فهرست تراکنش‌ها</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;تأیید</translation>
@@ -1182,25 +738,13 @@ Address: %4
         <source>default</source>
         <translation>پیش‌فرض</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>تأییدِ بازنشانی گزینه‌ها</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>برای این تغییرات بازنشانی مشتری ضروری است</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1223,16 +767,12 @@ Address: %4
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>در دسترس:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>تراز علی‌الحساب شما</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>مجموع تراکنش‌هایی که هنوز تأیید نشده‌اند؛ و هنوز روی تراز علی‌الحساب اعمال نشده‌اند</translation>
@@ -1268,117 +808,32 @@ Address: %4
         <source>URI handling</source>
         <translation>مدیریت URI</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>نشانی اینترنتی قابل تجزیه و تحلیل نیست! دلیل این وضعیت ممکن است یک نشانی نامعتبر بیت‌کوین و یا پارامترهای ناهنجار در URI بوده باشد.</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>نمی‌توان بیت‌کوین را اجرا کرد: کنترل‌کنندهٔ کلیک-و-پرداخت</translation>
     </message>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>مبلغ</translation>
     </message>
     <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>ناموجود</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
     <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <source>Save QR Code</source>
+        <translation>ذخیرهٔ کد QR</translation>
     </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>بیت‌کوین</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>خطا: پوشهٔ مشخص شده برای داده‌ها در «%1» وجود ندارد.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک آدرس بیت‌کوین وارد کنید (مثلاً 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation>ذخیرهٔ کد QR</translation>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1397,14 +852,6 @@ Address: %4
         <source>&amp;Information</source>
         <translation>&amp;اطلاعات</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>نسخهٔ OpenSSL استفاده شده</translation>
@@ -1433,10 +880,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>تعداد فعلی بلوک‌ها</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>تعداد تخمینی بلوک‌ها</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>زمان آخرین بلوک</translation>
@@ -1449,25 +892,9 @@ Address: %4
         <source>&amp;Console</source>
         <translation>&amp;کنسول</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>جمع کل:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1497,113 +924,17 @@ Address: %4
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>برای نمایش یک مرور کلی از دستورات ممکن، عبارت &lt;b&gt;help&lt;/b&gt; را بنویسید.</translation>
     </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;برچسب:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>کپی برچسب</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>کپی مقدار</translation>
@@ -1615,30 +946,6 @@ Address: %4
         <source>QR Code</source>
         <translation>کد QR</translation>
     </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>نشانی</translation>
@@ -1686,77 +993,17 @@ Address: %4
         <source>(no label)</source>
         <translation>(بدون برچسب)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>ارسال سکه</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>مبلغ:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>ارسال به چند دریافت‌کنندهٔ به‌طور همزمان</translation>
@@ -1765,10 +1012,6 @@ Address: %4
         <source>Add &amp;Recipient</source>
         <translation>&amp;دریافت‌کنندهٔ جدید</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>پاکسازی &amp;همه</translation>
@@ -1789,49 +1032,13 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>ارسال سکه را تأیید کنید</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>کپی مقدار</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>یا</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1853,43 +1060,11 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>یک نشانی تکراری پیدا شد. در هر عملیات ارسال، به هر نشانی فقط مبلغ می‌توان ارسال کرد.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(بدون برچسب)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1900,10 +1075,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>پرداخ&amp;ت به:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>نشانی مقصد برای پرداخت (مثلاً 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>برای این نشانی یک برچسب وارد کنید تا در دفترچهٔ آدرس ذخیره شود</translation>
@@ -1912,14 +1083,6 @@ Address: %4
         <source>&amp;Label:</source>
         <translation>&amp;برچسب:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1932,50 +1095,14 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>پیام:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1990,14 +1117,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>برای احراز اینکه پیام‌ها از جانب شما هستند، می‌توانید آن‌ها را با نشانی خودتان امضا کنید. مراقب باشید چیزی که بدان اطمینان ندارید را امضا نکنید زیرا حملات فیشینگ ممکن است بخواهند از.پیامی با امضای شما سوءاستفاده کنند. تنها مواردی را که حاوی اطلاعات دقیق و قابل قبول برای شما هستند امضا کنید.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>نشانی مورد استفاده برای امضا کردن پیام (برای مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2046,10 +1165,6 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>برای شناسایی پیام، نشانیِ امضا کننده و متن پیام را وارد کنید. (مطمئن شوید که فاصله‌ها، تب‌ها و خطوط را عیناً کپی می‌کنید.) مراقب باشید در امضا چیزی بیشتر از آنچه در پیام می‌بینید وجود نداشته باشد تا فریب دزدان اینترنتی و حملات از نوع MITM را نخورید.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>نشانی مورد استفاده برای امضا کردن پیام (برای مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>برای حصول اطمینان از اینکه پیام با نشانی بیت‌کوین مشخص شده امضا است یا خیر، پیام را شناسایی کنید</translation>
@@ -2063,11 +1178,7 @@ Address: %4
         <translation>بازنشانی تمام فیلدهای پیام</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک نشانی بیت‌کوین وارد کنید (مثلاً 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <source>Click "Sign Message" to generate signature</source>
         <translation>برای ایجاد یک امضای جدید روی «امضای پیام» کلیک کنید</translation>
     </message>
     <message>
@@ -2125,10 +1236,6 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation> هسته Bitcoin </translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>آزمایش شبکه</translation>
@@ -2136,21 +1243,13 @@ Address: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>باز تا %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/آفلاین</translation>
@@ -2235,14 +1334,6 @@ Address: %4
         <source>Transaction ID</source>
         <translation>شناسهٔ تراکنش</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>اطلاعات اشکال‌زدایی</translation>
@@ -2305,14 +1396,6 @@ Address: %4
         <source>Address</source>
         <translation>نشانی</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>مبلغ</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>باز برای %n بلوک دیگر</numerusform></translation>
@@ -2333,22 +1416,6 @@ Address: %4
         <source>Generated but not accepted</source>
         <translation>تولید شده ولی قبول نشده</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>دریافت‌شده با</translation>
@@ -2476,26 +1543,6 @@ Address: %4
         <source>Show transaction details</source>
         <translation>نمایش جزئیات تراکنش</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
@@ -2520,10 +1567,6 @@ Address: %4
         <source>Address</source>
         <translation>نشانی</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>مبلغ</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>شناسه</translation>
@@ -2537,13 +1580,12 @@ Address: %4
         <translation>به</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2573,14 +1615,6 @@ Address: %4
         <source>Backup Failed</source>
         <translation>خطا در پشتیبان‌گیری</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>پشتیبان‌گیری موفق</translation>
@@ -2588,18 +1622,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>استفاده:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>نمایش لیست فرمان‌ها</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>راهنمایی در مورد یک دستور</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>گزینه‌ها:</translation>
@@ -2640,10 +1662,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>مدت زمان جلوگیری از اتصال مجدد همتایان بدرفتار، به ثانیه (پیش‌فرض: ۸۴۶۰۰)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>هنگام تنظیم پورت RPC %u برای گوش دادن روی IPv4 خطایی رخ داده است: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>پورت مورد شنود برای اتصالات JSON-RPC (پیش‌فرض: 8332 برای شبکهٔ تست 18332)</translation>
@@ -2652,10 +1670,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>پذیرش دستورات خط فرمان و دستورات JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>اجرا در پشت زمینه به‌صورت یک سرویس و پذیرش دستورات</translation>
@@ -2668,48 +1682,10 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>مقید به نشانی داده شده باشید و همیشه از آن پیروی کنید. از نشانه گذاری استاندار IPv6 به صورت Host]:Port] استفاده کنید.</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>تراکنش پذیرفته نیست! این خطا ممکن است در حالتی رخ داده باشد که مقداری از سکه های شما در کیف پولتان از جایی دیگر، همانند یک کپی از کیف پول اصلی اتان، خرج شده باشد اما در کیف پول اصلی اتان به عنوان مبلغ خرج شده، نشانه گذاری نشده باشد.</translation>
@@ -2722,130 +1698,30 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>هنگامی که یک تراکنش در کیف پولی رخ می دهد، دستور را اجرا کن(%s در دستورات بوسیله ی TxID جایگزین می شود)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>این یک نسخه ی آزمایشی است - با مسئولیت خودتان از آن استفاده کنید -  آن را در معدن و بازرگانی بکار نگیرید.</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>هشدار: مبلغ paytxfee بسیار بالایی تنظیم شده است! این مبلغ هزینه‌ای است که شما برای تراکنش‌ها پرداخت می‌کنید.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>هشدار: لطفا زمان و تاریخ رایانه خود را تصحیح نمایید! اگر ساعت رایانه شما اشتباه باشد bitcoin ممکن است صحیح کار نکند</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>بستن گزینه ایجاد</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>تنها در گره (های) مشخص شده متصل شوید</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>یک پایگاه داده ی بلوک خراب یافت شد</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>آدرس آی.پی. خود را شناسایی کنید (پیش فرض:1 در زمان when listening وno -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>آیا مایلید که اکنون پایگاه داده ی بلوک را بازسازی کنید؟</translation>
@@ -2854,10 +1730,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error initializing block database</source>
         <translation>خطا در آماده سازی پایگاه داده ی بلوک</translation>
     </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading block database</source>
         <translation>خطا در بارگذاری پایگاه داده ها</translation>
@@ -2866,14 +1738,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error opening block database</source>
         <translation>خطا در بازگشایی پایگاه داده ی بلوک</translation>
     </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: system error: </source>
         <translation>خطا: خطای سامانه:</translation>
@@ -2922,94 +1786,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>عملیات بازگشت دادن اطلاعات با شکست مواجه شدن</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>نرخ هر کیلوبایت برای اضافه کردن به تراکنش‌هایی که می‌فرستید</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>قرینه ها را برای جستجوی DNS بیاب (پیش فرض: 1 مگر در زمان اتصال)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>چند بلوک نیاز است که در ابتدای راه اندازی بررسی شوند(پیش فرض:288 ،0=همه)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>در حال بازبینی بلوک ها...</translation>
@@ -3018,70 +1798,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>در حال بازبینی کیف پول...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>اطلاعات</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
         <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;*  1000 بایت  (پیش فرض:5000)</translation>
@@ -3090,50 +1810,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;*  1000 بایت  (پیش فرض:1000)</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>تنها =به گره ها در شبکه متصا شوید  &lt;net&gt; (IPv4, IPv6 or Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>گزینه ssl (به ویکیbitcoin برای راهنمای راه اندازی ssl مراجعه شود)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation>
@@ -3142,50 +1822,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>فایل debug.log  را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation>
     </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>(میلی ثانیه )فاصله ارتباط خاص</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>خطای سامانه</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>از UPnP  برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation>
@@ -3206,34 +1854,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>هشدار: این نسخه قدیمی است، روزآمدسازی مورد نیاز است</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>نسخه</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC عبارت عبور برای ارتباطات</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>از آدرس آی پی خاص JSON-RPC قبول ارتباطات</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>(127.0.0.1پیش فرض: ) &amp;lt;ip&amp;gt; دادن فرمانها برای استفاده گره ها روی</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation>
@@ -3266,10 +1890,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>پیام کمکی</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>امکان اتصال به %s از این رایانه وجود ندارد ( bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>به DNS اجازه بده تا برای addnode ، seednode و اتصال جستجو کند</translation>
@@ -3282,40 +1902,28 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>خطا در بارگیری wallet.dat: کیف پول خراب شده است</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>خطا در بارگیری wallet.dat: کیف پول به ویرایش جدیدتری از Biticon نیاز دارد</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>سلام</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>خطا در بارگیری wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <source>Invalid -proxy address: '%s'</source>
         <translation>آدرس پراکسی اشتباه %s</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>نسخه پراکسی ساکس غیرقابل شناسایی  درخواست شده است: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>شبکه مشخص شده غیرقابل شناسایی در onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
+        <source>Cannot resolve -bind address: '%s'</source>
         <translation>آدرس قابل اتصال- شناسایی نیست %s</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
+        <source>Cannot resolve -externalip address: '%s'</source>
         <translation>آدرس خارجی قابل اتصال- شناسایی نیست %s</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation>
     </message>
     <message>
@@ -3362,12 +1970,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>خطا</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>%s، شما باید یک rpcpassword  را در فایل پیکربندی تنظیم کنید :⏎%s⏎ اگر فایل ایجاد نشد، یک فایل فقط متنی ایجاد کنید.
-</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 3b82ffa5e5d7..92e0722767d2 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa_IR" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="fa_IR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,70 +9,22 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>گشایش حسابی جدید</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>کپی کردن حساب انتخاب شده به حافظه سیستم - کلیپ بورد</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>و کپی آدرس</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>صدور داده نوار جاری به یک فایل</translation>
     </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>و حذف</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>کپی و برچسب</translation>
@@ -113,23 +33,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Edit</source>
         <translation>و ویرایش</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>سی.اس.وی. (فایل جداگانه دستوری)</translation>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Comma separated file (*.csv) فایل جداگانه دستوری</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +55,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>رمز/پَس فرِیز را وارد کنید</translation>
@@ -163,10 +67,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>رمز/پَس فرِیز را دوباره وارد کنید</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>رمز/پَس فرِیز جدید را در wallet وارد کنید. برای انتخاب رمز/پَس فرِیز از 10 کاراکتر تصادفی یا بیشتر و یا هشت کلمه یا بیشتر استفاده کنید. </translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>wallet را رمزگذاری کنید</translation>
@@ -199,22 +99,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>رمزگذاری wallet را تایید کنید</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>تایید رمزگذاری</translation>
@@ -247,11 +131,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>کشف رمز wallet انجام نشد</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
@@ -266,10 +146,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>و بازبینی</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>نمای کلی از wallet را نشان بده</translation>
@@ -288,11 +164,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Quit application</source>
-        <translation>از &quot;درخواست نامه&quot;/ application خارج شو</translation>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>اطلاعات در مورد Bitcoin را نشان بده</translation>
+        <translation>از "درخواست نامه"/ application خارج شو</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
@@ -318,30 +190,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>تغییر رمز/پَس فرِیز</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
         <translation>اصلاح انتخابها برای پیکربندی Bitcoin</translation>
@@ -354,18 +202,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Change the passphrase used for wallet encryption</source>
         <translation>رمز مربوط به رمزگذاریِ wallet را تغییر دهید</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>bitcoin</translation>
@@ -376,32 +212,12 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <translation>و ارسال</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;نمایش/ عدم نمایش و</translation>
     </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>و فایل</translation>
@@ -422,103 +238,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>مشتری bitcoin</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n ارتباط فعال به شبکه Bitcoin
-%n ارتباط فعال به شبکه Bitcoin</numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطا</translation>
     </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>روزآمد</translation>
@@ -552,10 +275,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>wallet رمزگذاری شد و در حال حاضر قفل است</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -566,54 +285,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>میزان وجه:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>میزان</translation>
@@ -626,18 +301,10 @@ Address: %4
         <source>Date</source>
         <translation>تاریخ</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>تایید شده</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>آدرس را کپی کنید</translation>
@@ -651,2588 +318,685 @@ Address: %4
         <translation>میزان وجه کپی شود</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(برچسب ندارد)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>ویرایش حساب</translation>
     </message>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>و برچسب</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>حساب&amp;</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>حساب دریافت کننده جدید
+</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>حساب ارسال کننده جدید</translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>ویرایش حساب دریافت کننده</translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>ویرایش حساب ارسال کننده</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>آدرس وارد شده "%1" یک آدرس صحیح برای bitcoin نسشت</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>عدم توانیی برای قفل گشایی wallet</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>عدم توانیی در ایجاد کلید جدید</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>version</source>
+        <translation>نسخه</translation>
     </message>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>میزان استفاده:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>خطا</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>انتخاب/آپشن</translation>
     </message>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>&amp;OK</source>
+        <translation>و تایید</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>&amp;Cancel</source>
+        <translation>و رد</translation>
     </message>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>default</source>
+        <translation>پیش فرض</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>فرم</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <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>none</source>
-        <translation type="unfinished"/>
+        <source>Wallet</source>
+        <translation>کیف پول</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>تراکنشهای اخیر</translation>
     </message>
     <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
+        <source>out of sync</source>
+        <translation>خارج از روزآمد سازی</translation>
     </message>
+</context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>no</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>میزان</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <source>Client name</source>
+        <translation>نام کنسول RPC</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <source>Client version</source>
+        <translation>ویرایش کنسول RPC</translation>
     </message>
     <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <source>Network</source>
+        <translation>شبکه</translation>
     </message>
     <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <source>Number of connections</source>
+        <translation>تعداد اتصال</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>Block chain</source>
+        <translation>زنجیره مجموعه تراکنش ها</translation>
     </message>
     <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Current number of blocks</source>
+        <translation>تعداد زنجیره های حاضر</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <source>Welcome to the Bitcoin RPC console.</source>
+        <translation>به کنسول آر.پی.سی. BITCOIN خوش آمدید</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>و برچسب</translation>
     </message>
     <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(برچسب ندارد)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>ویرایش حساب</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>و برچسب</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>حساب&amp;</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>حساب دریافت کننده جدید
-</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>حساب ارسال کننده جدید</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>ویرایش حساب دریافت کننده</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>ویرایش حساب ارسال کننده</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>حساب وارد شده «1%» از پیش در دفترچه حساب ها موجود است.</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>آدرس وارد شده &quot;%1&quot; یک آدرس صحیح برای bitcoin نسشت</translation>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>عدم توانیی برای قفل گشایی wallet</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>عدم توانیی در ایجاد کلید جدید</translation>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>نسخه</translation>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>میزان استفاده:</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>خطا</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>انتخاب/آپشن</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>و نمایش آدرسها در فهرست تراکنش</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation>و تایید</translation>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation>و رد</translation>
-    </message>
-    <message>
-        <source>default</source>
-        <translation>پیش فرض</translation>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>فرم</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>اطلاعات نمایش داده شده ممکن است روزآمد نباشد. wallet شما به صورت خودکار بعد از برقراری اتصال با شبکه bitcoin به روز می شود اما این فرایند هنوز تکمیل نشده است.</translation>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation>کیف پول</translation>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>تراکنشهای اخیر</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation>خارج از روزآمد سازی</translation>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک آدرس bitcoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation>نام کنسول RPC</translation>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation>ویرایش کنسول RPC</translation>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation>شبکه</translation>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation>تعداد اتصال</translation>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation>زنجیره مجموعه تراکنش ها</translation>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation>تعداد زنجیره های حاضر</translation>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>به کنسول آر.پی.سی. BITCOIN خوش آمدید</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>و برچسب</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>برچسب را کپی کنید</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>میزان وجه کپی شود</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>حساب</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>میزان</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>برچسب</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>پیام</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>متن وارد شده طولانی است، متنِ برچسب/پیام را کوتاه کنید</translation>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation>خطای تبدیل URI به کد QR</translation>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>برچسب</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>پیام</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>میزان</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(برچسب ندارد)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>سکه های ارسالی</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>میزان وجه:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>ارسال همزمان به گیرنده های متعدد</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>مانده حساب:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>تایید عملیات ارسال </translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>و ارسال</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>تایید ارسال بیت کوین ها</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>میزان وجه کپی شود</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>میزان پرداخت باید بیشتر از 0 باشد</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation>مقدار مورد نظر از مانده حساب بیشتر است.</translation>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(برچسب ندارد)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>و میزان وجه</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>پرداخت و به چه کسی</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>یک برچسب برای این آدرس بنویسید تا به دفترچه آدرسهای شما اضافه شود</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>و برچسب</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt و A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>آدرس را بر کلیپ بورد کپی کنید</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt و P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>پیام:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation>و امضای پیام </translation>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک آدرس bitcoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt و A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>آدرس را بر کلیپ بورد کپی کنید</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt و P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک آدرس bitcoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>یک آدرس bitcoin وارد کنید (مثال 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>باز کن تا %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1 / تایید نشده</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 تایید</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation>برچسب</translation>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>پیام</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>میزان</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>، هنوز با موفقیت ارسال نگردیده است</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>ناشناس</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>جزئیات تراکنش</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>این بخش جزئیات تراکنش را نشان می دهد</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>گونه</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>آدرس</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>میزان وجه</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>باز کن تا %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>تایید شده (%1 تاییدها)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>این block توسط گره های دیگری دریافت نشده است و ممکن است قبول نشود</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>تولید شده اما قبول نشده است</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>قبول با </translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>دریافت شده از</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>ارسال به</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>وجه برای شما </translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>استخراج شده</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>خالی</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>وضعیت تراکنش. با اشاره به این بخش تعداد تاییدها نمایش داده می شود</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>زمان و تاریخی که تراکنش دریافت شده است</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>نوع تراکنش</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>آدرس مقصد در تراکنش</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>میزان وجه کم شده یا اضافه شده به حساب</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>همه</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>امروز</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>این هفته</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>این ماه</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>ماه گذشته</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>این سال</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>حدود..</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>دریافت با</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>ارسال به</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>به شما</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>استخراج شده</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>دیگر</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>آدرس یا برچسب را برای جستجو وارد کنید</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>حداقل میزان وجه</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>آدرس را کپی کنید</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>برچسب را کپی کنید</translation>
+        <source>Copy label</source>
+        <translation>برچسب را کپی کنید</translation>
     </message>
     <message>
         <source>Copy amount</source>
         <translation>میزان وجه کپی شود</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>برچسب را ویرایش کنید</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>حساب</translation>
     </message>
     <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>میزان</translation>
     </message>
     <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>برچسب</translation>
     </message>
     <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>پیام</translation>
     </message>
     <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Comma separated file (*.csv) فایل جداگانه دستوری</translation>
+        <source>Resulting URI too long, try to reduce the text for label / message.</source>
+        <translation>متن وارد شده طولانی است، متنِ برچسب/پیام را کوتاه کنید</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation>تایید شده</translation>
+        <source>Error encoding URI into QR Code.</source>
+        <translation>خطای تبدیل URI به کد QR</translation>
     </message>
+</context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
         <source>Date</source>
         <translation>تاریخ</translation>
     </message>
-    <message>
-        <source>Type</source>
-        <translation>نوع</translation>
-    </message>
     <message>
         <source>Label</source>
         <translation>برچسب</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>آدرس</translation>
+        <source>Message</source>
+        <translation>پیام</translation>
     </message>
     <message>
         <source>Amount</source>
         <translation>میزان</translation>
     </message>
     <message>
-        <source>ID</source>
-        <translation>شناسه کاربری</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>دامنه:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>به</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(برچسب ندارد)</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>WalletModel</name>
+    <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>سکه های ارسالی</translation>
     </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation>صدور داده نوار جاری به یک فایل</translation>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>میزان استفاده:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>فهرست دستورها</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>درخواست کمک برای یک دستور</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>انتخابها:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>فایل پیکربندیِ را مشخص کنید (پیش فرض: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>فایل pid  را مشخص کنید (پیش فرض: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>دایرکتوری داده را مشخص کن</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>ارتباطات را در &lt;PORT&gt; بشنوید (پیش فرض: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>نگهداری &lt;N&gt; ارتباطات برای قرینه سازی  (پیش فرض:125)</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>آستانه قطع برای قرینه سازی اشتباه (پیش فرض:100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>تعداد ثانیه ها برای اتصال دوباره قرینه های اشتباه (پیش فرض:86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>ارتباطاتِ JSON-RPC  را در &lt;port&gt;  گوش کنید (پیش فرض:8332)</translation>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>command line  و JSON-RPC commands را قبول کنید</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>به عنوان daemon بک گراند را اجرا کنید و دستورات را قبول نمایید</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>از تستِ شبکه استفاده نمایید</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>میزان وجه:</translation>
     </message>
     <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>ارسال همزمان به گیرنده های متعدد</translation>
     </message>
     <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>مانده حساب:</translation>
     </message>
     <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>تایید عملیات ارسال </translation>
     </message>
     <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <source>S&amp;end</source>
+        <translation>و ارسال</translation>
     </message>
     <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>تایید ارسال بیت کوین ها</translation>
     </message>
     <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>میزان وجه کپی شود</translation>
     </message>
     <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>میزان پرداخت باید بیشتر از 0 باشد</translation>
     </message>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>The amount exceeds your balance.</source>
+        <translation>مقدار مورد نظر از مانده حساب بیشتر است.</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(برچسب ندارد)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>و میزان وجه</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>پرداخت و به چه کسی</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>یک برچسب برای این آدرس بنویسید تا به دفترچه آدرسهای شما اضافه شود</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>و برچسب</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt و A</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>آدرس را بر کلیپ بورد کپی کنید</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt و P</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>پیام:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>&amp;Sign Message</source>
+        <translation>و امضای پیام </translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt و A</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>آدرس را بر کلیپ بورد کپی کنید</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt و P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>باز کن تا %1</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1 / تایید نشده</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 تایید</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>label</source>
+        <translation>برچسب</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>پیام</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>شناسه کاربری</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>میزان</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>، هنوز با موفقیت ارسال نگردیده است</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>ناشناس</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>جزئیات تراکنش</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>این بخش جزئیات تراکنش را نشان می دهد</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>گونه</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>حساب</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>باز کن تا %1</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>تایید شده (%1 تاییدها)</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>این block توسط گره های دیگری دریافت نشده است و ممکن است قبول نشود</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>تولید شده اما قبول نشده است</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>دریافت با</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>دریافت شده از</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>ارسال به</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>وجه برای شما </translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>استخراج شده</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>خالی</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>وضعیت تراکنش. با اشاره به این بخش تعداد تاییدها نمایش داده می شود</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>زمان و تاریخی که تراکنش دریافت شده است</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>نوع تراکنش</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>آدرس مقصد در تراکنش</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>میزان وجه کم شده یا اضافه شده به حساب</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>همه</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>امروز</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>این هفته</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>این ماه</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>ماه گذشته</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>این سال</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>حدود..</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>دریافت با</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>ارسال به</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>به شما</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>استخراج شده</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>دیگر</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>آدرس یا برچسب را برای جستجو وارد کنید</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>حداقل میزان وجه</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>آدرس را کپی کنید</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>برچسب را کپی کنید</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>میزان وجه کپی شود</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>برچسب را ویرایش کنید</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Comma separated file (*.csv) فایل جداگانه دستوری</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>تایید شده</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>گونه</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>برچسب</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>حساب</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>شناسه کاربری</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>ارسال اطلاعات پیگیری/خطایابی به کنسول به جای ارسال به فایل debug.log</translation>
+        <source>Range:</source>
+        <translation>دامنه:</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>به</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>سکه های ارسالی</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Export the data in the current tab to a file</source>
+        <translation>صدور داده نوار جاری به یک فایل</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Backup Wallet</source>
+        <translation>گرفتن نسخه پیشتیبان از Wallet</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Wallet Data (*.dat)</source>
+        <translation>داده های Wallet  
+(*.dat)</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Backup Failed</source>
+        <translation>عملیات گرفتن نسخه پیشتیبان انجام نشد</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>تعیین مدت زمان وقفه (time out) به هزارم ثانیه</translation>
+        <source>Options:</source>
+        <translation>انتخابها:</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>فایل پیکربندیِ را مشخص کنید (پیش فرض: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>فایل pid  را مشخص کنید (پیش فرض: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>دایرکتوری داده را مشخص کن</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>ارتباطات را در &lt;PORT&gt; بشنوید (پیش فرض: 8333 or testnet: 18333)</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>نگهداری &lt;N&gt; ارتباطات برای قرینه سازی  (پیش فرض:125)</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>آستانه قطع برای قرینه سازی اشتباه (پیش فرض:100)</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation>تعداد ثانیه ها برای اتصال دوباره قرینه های اشتباه (پیش فرض:86400)</translation>
     </message>
     <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation>شناسه کاربری برای ارتباطاتِ JSON-RPC</translation>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
+        <translation>ارتباطاتِ JSON-RPC  را در &lt;port&gt;  گوش کنید (پیش فرض:8332)</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>command line  و JSON-RPC commands را قبول کنید</translation>
     </message>
     <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>به عنوان daemon بک گراند را اجرا کنید و دستورات را قبول نمایید</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>از تستِ شبکه استفاده نمایید</translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>ارسال اطلاعات پیگیری/خطایابی به کنسول به جای ارسال به فایل debug.log</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation>نسخه</translation>
+        <source>Specify connection timeout in milliseconds (default: 5000)</source>
+        <translation>تعیین مدت زمان وقفه (time out) به هزارم ثانیه</translation>
     </message>
     <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <source>Username for JSON-RPC connections</source>
+        <translation>شناسه کاربری برای ارتباطاتِ JSON-RPC</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>رمز برای ارتباطاتِ JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>ارتباطاتِ JSON-RPC  را از آدرس آی.پی. مشخصی برقرار کنید.</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>دستورات را به گره اجرا شده در&lt;ip&gt; ارسال کنید (پیش فرض:127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>دستور را وقتی بهترین بلاک تغییر کرد اجرا کن (%s در دستور توسط block hash جایگزین شده است)</translation>
@@ -3265,14 +1029,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>این پیام راهنما</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>لود شدن آدرسها..</translation>
@@ -3281,41 +1037,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>خطا در هنگام لود شدن wallet.dat: Wallet corrupted</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>خطا در هنگام لود شدن wallet.dat.  به نسخه جدید Bitocin برای wallet نیاز است.</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>wallet نیاز به بازنویسی دارد. Bitcoin را برای تکمیل عملیات دوباره اجرا کنید.</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>خطا در هنگام لود شدن wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>میزان اشتباه است for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>میزان اشتباه است for -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3361,12 +1089,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>خطا</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>شما باید یک رمز rpcpassword=&lt;password&gt; را در فایل تنظیمات ایجاد کنید⏎ %s ⏎ اگر فایل ایجاد نشده است، آن را با یک فایل &quot;فقط متنی&quot; ایجاد کنید.
-</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index dc723595908e..3541c58fcfe3 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1,42 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Tietoja Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; versio</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Tämä on kokeellinen ohjelmisto.
-
-Levitetään MIT/X11 ohjelmistolisenssin alaisuudessa. Tarkemmat tiedot löytyvät tiedostosta COPYING tai osoitteesta http://www.opensource.org/licenses/mit-license.php.
-
-Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.openssl.org/), Eric Youngin (eay@cryptsoft.com) kehittämän salausohjelmiston sekä Thomas Bernardin UPnP ohjelmiston.
-</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Tekijänoikeus</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core kehittäjät</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="fi" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -132,8 +94,8 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <translation>Vienti epäonnistui</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Osoitelistan tallennuksessa tapahtui virhe tiedostoon %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Virhe tallentaessa osoitelistaa %1. Yritä uudelleen.</translation>
     </message>
 </context>
 <context>
@@ -169,10 +131,6 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>Repeat new passphrase</source>
         <translation>Kirjoita uusi tunnuslause uudelleen</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Anna lompakolle uusi tunnuslause.&lt;br/&gt;Käytä tunnuslausetta, jossa on ainakin  &lt;b&gt;10 satunnaista mekkiä&lt;/b&gt; tai &lt;b&gt;kahdeksan sanaa&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Salaa lompakko</translation>
@@ -225,6 +183,10 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>Wallet encrypted</source>
         <translation>Lompakko salattu</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Anna salauslause lompakkoon. &lt;br/&gt;Ole hyvä ja käytä lausetta jossa on &lt;b&gt;kymmenen tai enemmän satunnaista merkkiä&lt;/b&gt; tai &lt;b&gt;kahdeksan tai useampi sanaa&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin sulkeutuu lopettaakseen salausprosessin. Muista, että salattukaan lompakko ei täysin suojaa sitä haittaohjelmien aiheuttamilta varkauksilta.</translation>
@@ -296,10 +258,6 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>Quit application</source>
         <translation>Sulje ohjelma</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Näytä tietoa Bitcoin-projektista</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Tietoja &amp;Qt</translation>
@@ -336,6 +294,10 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>Open &amp;URI...</source>
         <translation>Avaa &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core ohjelma</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Tuodaan lohkoja levyltä</translation>
@@ -388,6 +350,10 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>&amp;Receive</source>
         <translation>&amp;Vastaanota</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Näytä tietoja Bitcoin Core:sta</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Näytä / Piilota</translation>
@@ -460,10 +426,6 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Näytä Bitcoin Core ohjeet saadaksesi listan mahdollisista Bitcoinin komentorivivalinnoista</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-asiakas</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiivinen yhteys Bitcoin-verkkoon</numerusform><numerusform>%n aktiivista yhteyttä Bitcoin-verkkoon</numerusform></translation>
@@ -472,10 +434,6 @@ Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.o
         <source>No block source available...</source>
         <translation>Lohkojen lähdettä ei saatavilla...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Käsitelty %1 of %2 (arviolta) rahansiirtohistorian lohkoa.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Käsitelty %1 lohkoa rahansiirtohistoriasta</translation>
@@ -559,10 +517,6 @@ Osoite: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Lompakko on &lt;b&gt;salattu&lt;/b&gt; ja tällä hetkellä &lt;b&gt;lukittuna&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Peruuttamaton virhe on tapahtunut. Bitcoin ei voi enää jatkaa turvallisesti ja sammutetaan.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +552,8 @@ Osoite: %4</translation>
         <translation>Palkkio:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Pieni Tuotos</translation>
+        <source>Dust:</source>
+        <translation>Tomu:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +644,8 @@ Osoite: %4</translation>
         <translation>Kopioi prioriteetti</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Kopioi pieni tuotos</translation>
+        <source>Copy dust</source>
+        <translation>Kopioi tomu</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +696,8 @@ Osoite: %4</translation>
         <translation>ei mitään</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Tomu</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Saattaa vaihdella +/- %1 satoshia per syöte.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -770,25 +724,13 @@ Osoite: %4</translation>
         <translation>Rahansiirrot korkeammalla prioriteetilla sisällytetään varmemmin lohkoon.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Tämä nimi muuttuu punaiseksi jos prioriteetti on pienempi kuin &quot;keskisuuri&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Tämä nimi muuttuu punaiseksi jos prioriteetti on pienempi kuin "keskisuuri".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Tämä nimi muuttuu punaiseksi jos vastaanottaja saa pienemmän määrän kuin %1</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Tämä tarkoittaa että vähintään %1 palkkio on pakollinen.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Maksumäärät alle 0.546 kertaa vähimmäispalkkion näytetään tomuna.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Tämä nimi muuttuu punaiseksi jos vaihtoraha on alle %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ei nimeä)</translation>
@@ -841,12 +783,12 @@ Osoite: %4</translation>
         <translation>Muokkaa lähtevää osoitetta</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Osoite &quot;%1&quot; on jo osoitekirjassa.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Osoite "%1" on jo osoitekirjassa.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Antamasi osoite &quot;%1&quot; ei ole validi Bitcoin-osoite.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Antamasi osoite "%1" ei ole validi Bitcoin-osoite.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +824,6 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Kometorivivalinnat</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin-ydin</translation>
@@ -894,6 +832,18 @@ Osoite: %4</translation>
         <source>version</source>
         <translation>versio</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Tietoja Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Komentorivi parametrit</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Käyttö:</translation>
@@ -907,8 +857,8 @@ Osoite: %4</translation>
         <translation>Käyttöliittymäasetukset</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Set language, for example &quot;de_DE&quot; (default: system locale)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Set language, for example "de_DE" (default: system locale)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,12 +904,12 @@ Osoite: %4</translation>
         <translation>Määritä oma kansio:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin-ydin</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Virhe: Annettua data-hakemistoa &quot;%1&quot; ei voida luoda.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Virhe: Annettu datahakemistoa "%1" ei voida luoda.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1035,6 +985,14 @@ Osoite: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Script &amp;varmistuksen threadien määrä</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Hyväksy yhteysiä ulkopuolelta</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Hyväksy sisääntulevia yhteyksiä</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Yhdistä Bitcoin-verkkoon SOCKS proxyn kautta.</translation>
@@ -1115,14 +1073,6 @@ Osoite: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Proxyn Portti (esim. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Versio:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Proxyn SOCKS-versio (esim. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Ikkuna</translation>
@@ -1163,14 +1113,6 @@ Osoite: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Valitse mitä yksikköä käytetään ensisijaisesti bitcoin-määrien näyttämiseen.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Näytetäänkö Bitcoin-osoitteet rahansiirrot listassa vai ei.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Näytä osoitteet rahansiirrot listassa</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Näytetäänkö kolikkokontrollin ominaisuuksia vai ei</translation>
@@ -1226,6 +1168,10 @@ Osoite: %4</translation>
         <source>Wallet</source>
         <translation>Lompakko</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Seuranta:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Käytettävissä:</translation>
@@ -1258,6 +1204,10 @@ Osoite: %4</translation>
         <source>Your current total balance</source>
         <translation>Tililläsi tällä hetkellä olevien Bitcoinien määrä</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Nykyinen tase seurantaosoitetteissa</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Viimeisimmät rahansiirrot&lt;/b&gt;</translation>
@@ -1274,8 +1224,8 @@ Osoite: %4</translation>
         <translation>URI käsittely</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URIa ei voitu jäsentää! Tämä voi johtua kelvottomasta Bitcoin-osoitteesta tai virheellisistä URI parametreista.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Virheellinen maksuosoite %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,14 +1239,6 @@ Osoite: %4</translation>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Ei voida käynnistää bitcoin: klikkaa-maksu käsittelijää</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Verkkohallinnan varoitus</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Aktiivinen proxy ei tue SOCKS5, joka on pakollinen maksupyynnöissä proxyn kautta.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Maksupyynnön haku URL on virheellinen: %1</translation>
@@ -1305,10 +1247,6 @@ Osoite: %4</translation>
         <source>Payment request file handling</source>
         <translation>Maksupyynnön tiedoston käsittely</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Maksupyynnön tiedostoa ei voida lukea tai prosessoida! Tämä voi johtua virheellisestä maksupyyntötiedostosta.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Varmistamattomia maksupyyntöjä kustomoituun maksupalveluun ei tueta.</translation>
@@ -1321,10 +1259,6 @@ Osoite: %4</translation>
         <source>Error communicating with %1: %2</source>
         <translation>Virhe kommunikoidessa %1n kanssa: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Maksupyyntöä ei voida jäsentää tai prosessoida!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Huono vastaus palvelimelta %1</translation>
@@ -1338,33 +1272,28 @@ Osoite: %4</translation>
         <translation>Tietoverkon pyyntövirhe</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Virhe: Annettu data-hakemisto &quot;%1&quot; ei ole olemassa.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Virhe: Ei voida jäsentää asetustiedostoa: %1. Käytä vain avain=arvo syntaksia.</translation>
+        <source>Amount</source>
+        <translation>Määrä</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Virhe: Virheellinen yhdistelmä -regtest ja -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ei ole vielä sulkeutunut turvallisesti...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Anna Bitcoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>Ei saatavilla</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1367,6 @@ Osoite: %4</translation>
         <source>Current number of blocks</source>
         <translation>Nykyinen Lohkojen määrä</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Arvioitu lohkojen kokonaismäärä</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Viimeisimmän lohkon aika</translation>
@@ -1518,19 +1443,7 @@ Osoite: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1742,10 +1655,6 @@ Osoite: %4</translation>
         <source>Fee:</source>
         <translation>Palkkio:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Pieni Tuotos</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Palkkion jälkeen:</translation>
@@ -1774,6 +1683,10 @@ Osoite: %4</translation>
         <source>Clear all fields of the form.</source>
         <translation>Tyhjennä lomakkeen kaikki kentät</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Tomu:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Tyhjennnä Kaikki</translation>
@@ -1822,10 +1735,6 @@ Osoite: %4</translation>
         <source>Copy priority</source>
         <translation>Kopioi prioriteetti</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopioi pieni tuotos</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopioi vaihtoraha</translation>
@@ -1878,6 +1787,10 @@ Osoite: %4</translation>
         <source>Warning: Unknown change address</source>
         <translation>Varoitus: Tuntematon vaihtorahan osoite</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopioi tomu</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Haluatko varmasti lähettää?</translation>
@@ -1886,14 +1799,6 @@ Osoite: %4</translation>
         <source>added as transaction fee</source>
         <translation>lisätty rahansiirtomaksuna</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Maksupyyntö vanhentui</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Virheellinen maksuosoite %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1810,6 @@ Osoite: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>Maksun saaja:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Osoite, johon Bitcoinit lähetetään  (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Anna nimi tälle osoitteelle, jos haluat lisätä sen osoitekirjaan</translation>
@@ -1995,10 +1896,6 @@ Osoite: %4</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Voit allekirjoittaa viestit omalla osoitteellasi todistaaksesi että omistat ne. Ole huolellinen, että et allekirjoita mitään epämääräistä, phishing-hyökkääjät voivat huijata sinua allekirjoittamaan luovuttamalla henkilöllisyytesi. Allekirjoita selvitys täysin yksityiskohtaisesti mihin olet sitoutunut.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Osoite, jolla viesti allekirjoitetaan (esimerkiksi 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Valitse aikaisemmin käytetty osoite</translation>
@@ -2051,10 +1948,6 @@ Osoite: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Syötä allekirjoittava osoite, viesti ja allekirjoitus alla oleviin kenttiin varmistaaksesi allekirjoituksen aitouden. Varmista että kopioit kaikki kentät täsmälleen oikein, myös rivinvaihdot, välilyönnit, tabulaattorit, jne.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Osoite, jolla viesti allekirjoitettiin (esimerkiksi 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Tarkista viestin allekirjoitus varmistaaksesi, että se allekirjoitettiin tietyllä Bitcoin-osoitteella</translation>
@@ -2068,12 +1961,8 @@ Osoite: %4</translation>
         <translation>Tyhjennä kaikki varmista-viesti-kentät</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Anna Bitcoin-osoite (esim. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klikkaa &quot;Allekirjoita Viesti luodaksesi allekirjoituksen </translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klikkaa "Allekirjoita Viesti luodaksesi allekirjoituksen </translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2245,8 +2134,8 @@ Osoite: %4</translation>
         <translation>Kauppias</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Luodut kolikot täytyy kypsyttää %1 lohkoa kunnes ne voidaan käyttää. Kun loit tämän lohkon, se lähetettiin verkkoon lisänä lohkoketjuun. Jos se epäonnistuu pääsemään ketjuun sen tila tulee muuttumaan &quot;ei hyväksytty&quot; ja sitä ei voida käyttää. Tämä voi ajoittain tapahtua kun toisen solmun lohko luodaan samanaikaisesti omasi kanssa.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Luodut kolikot täytyy kypsyttää %1 lohkoa kunnes ne voidaan käyttää. Kun loit tämän lohkon, se lähetettiin verkkoon lisänä lohkoketjuun. Jos se epäonnistuu pääsemään ketjuun sen tila tulee muuttumaan "ei hyväksytty" ja sitä ei voida käyttää. Tämä voi ajoittain tapahtua kun toisen solmun lohko luodaan samanaikaisesti omasi kanssa.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2199,6 @@ Osoite: %4</translation>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Määrä</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Epäkypsä (%1 varmistusta, saatavilla %2 jälkeen)</translation>
@@ -2525,10 +2410,6 @@ Osoite: %4</translation>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Määrä</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2423,9 @@ Osoite: %4</translation>
         <translation>kenelle</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2477,6 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Käyttö:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lista komennoista</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Hanki apua käskyyn</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Asetukset:</translation>
@@ -2645,10 +2517,6 @@ Osoite: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Sekuntien määrä, kuinka kauan uudelleenkytkeydytään verkkoihin (oletus: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Virhe valmisteltaessa RPC-portin %u avaamista kuunneltavaksi: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Kuuntele JSON-RPC -yhteyksiä portista &lt;port&gt; (oletus: 8332 or testnet: 18332)</translation>
@@ -2657,10 +2525,6 @@ Osoite: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Hyväksy merkkipohjaiset- ja JSON-RPC-käskyt</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC asiakasversio</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Aja taustalla daemonina ja hyväksy komennot</translation>
@@ -2683,7 +2547,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, sinun tulee asettaa rpcpassword asetustietostossa:
 %s
@@ -2694,17 +2558,13 @@ rpcpassword=%s
 Tämän tunnuksen ja salasanan TULEE OLLA sama.
 Jos tiedostoa ei ole, luo se vain omistajan-luku-oikeudella.
 Suositellaan asettaa alertnotify jotta saat tietoa ongelmista;
-esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Hyväksytyt koodit (oletus: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Virhe ilmennyt asetettaessa RPC-porttia %u IPv6:n kuuntelemiseksi, palataan takaisin IPv4:ään %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle.</translation>
@@ -2713,18 +2573,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Yhtäaikaisesti rajaa vapaat rahansiirrot &lt;n&gt;*1000 tavua per minuutti (oletus: 15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Aloita regressio testimoodi joka käyttää erikoisketjua missä lohkot voidaan ratkaista välittömästi. Tämä on tarkoitettu regressiotestien työkaluksi ja ohjelman kehittämiseen.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Aloita regression testimoodi joka käyttää erikoisketjua jossa lohkoja voidaan ratkaista välittömästi.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Virhe: Odottaessa sisääntulevia yhteyksiä epäonnistui (listen palautti virheen %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Virhe: Rahansiirto hylättiin! Tämä saattaa tapahtua jos jotkut kolikot lompakossa on jo käytetty. Esimerkiksi jos kopioit wallet.dat tiedoston ja kolikot on käytetty mutta ei merkattu täällä.</translation>
@@ -2737,10 +2589,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Tätä pienemmät palkkiot huomioidaan tyhjäksi (rahansiirron luonnissa) (oletus:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Aja tietokannan toimet muistivarannosta kovalevylogiin joka &lt;n&gt; megatavu (oletus: 100)</translation>
@@ -2777,10 +2625,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varoitus: -paytxfee on asetettu erittäin korkeaksi! Tämä on maksukulu jonka tulet maksamaan kun lähetät siirron.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Varoitus: Tarkista että tietokoneesi kellonaika ja päivämäärä ovat paikkansapitäviä! Bitcoin ei toimi oikein väärällä päivämäärällä ja/tai kellonajalla.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Varoitus: Tietoverkko ei ole sovussa! Luohijat näyttävät kokevan virhetilanteita.</translation>
@@ -2813,30 +2657,14 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Yritetään palauttaa privaattiavaimia korruptoituneesta wallet.dat -lompakkotiedostosta</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core taustapalvelin</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Lohkon luonnin asetukset:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Tyhjennä lompakon rahansiirtojen lista (diagnostiikka työkalu; olettaa -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Yhidstä ainoastaan määrättyihin noodeihin</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Yhdistä SOCKS proxin kautta</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Yhdistä JSON-RPC portissa &lt;port&gt; (oletus: 8332 tai testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Yhteyden valinnat:</translation>
@@ -2937,18 +2765,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Palautustiedon kirjoitus epäonnistui</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>palkkio per kB lisätty lähettämiisi rahansiirtoihin</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Tätä pienemmät palkkiot huomioidaan tyhjäksi (välittämisessä) (oletus:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Hae naapureita DNS hauilla (vakioasetus: 1 paitsi jos -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Pakota safe moodi (oletus: 0)</translation>
@@ -2974,8 +2790,8 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Virheellinen tai olematon alkulohko löydetty. Väärä data-hakemisto verkolle?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Virheellinen -onion osoite: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Virheellinen -onion osoite: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,18 +2801,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Lisää aikamerkki debug tulosteen eteen (oletus: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC asiakas valinnat:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Uudelleenrakenna lohkoketjuindeksi nykyisistä blk000??.dat tiedostoista</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Valitse SOCKS versio -proxy:lle (4 tai 5, oletus: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Aseta tietokannan välimuistin koko megatavuissa (%d - %d, oletus: %d</translation>
@@ -3021,10 +2829,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Tämä on tarkoitettu regression testityökaluille ja ohjelman kehittämiseen.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Käyttö (vanhentunut, käytä bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Varmistetaan lohkoja...</translation>
@@ -3033,10 +2837,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Varmistetaan lompakko...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Odota RPC palvelimen käynnistystä</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Lompakko %s sijaitsee data-hakemiston ulkopuolella %s</translation>
@@ -3045,10 +2845,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Wallet options:</source>
         <translation>Lompakon valinnat:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Varoitus: Vanhentunut argumentti -debugnet sivutettu, käytä debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex vaihtaen -txindex</translation>
@@ -3078,12 +2874,12 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Tietoa</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Virheellinen määrä -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Virheellinen määrä -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3141,14 +2937,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Aja threadi jossa tallennetaan lompakko ajoittain (oletus: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL asetukset (katso Bitcoin Wikistä tarkemmat SSL ohjeet)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Lähetä komento Bitcoin Coreen</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Lähetä jäljitys/debug-tieto konsoliin, debug.log-tiedoston sijaan</translation>
@@ -3165,10 +2953,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Näytä kaikki debuggaus valinnat: (käyttö: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Näytä suorituskykytietoja (oletus: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Pienennä debug.log tiedosto käynnistyksen yhteydessä (vakioasetus: 1 kun ei -debug)</translation>
@@ -3181,10 +2965,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Määritä yhteyden aikakataisu millisekunneissa (vakioasetus: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Käynnistä Bitcoin Core taustapalvelin</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Järjestelmävirhe:</translation>
@@ -3229,10 +3009,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>on startup</source>
         <translation>käynnistyksessä</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versio</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat -lompakkotiedosto korruptoitunut, korjaaminen epäonnistui</translation>
@@ -3241,14 +3017,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Salasana JSON-RPC-yhteyksille</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Salli JSON-RPC yhteydet tietystä ip-osoitteesta</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Lähetä käskyjä solmuun osoitteessa &lt;ip&gt; (oletus: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Suorita käsky kun paras lohko muuttuu (%s cmd on vaihdettu block hashin kanssa)</translation>
@@ -3281,10 +3049,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Tämä ohjeviesti</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Kytkeytyminen %s tällä tietokonella ei onnistu (kytkeytyminen palautti virheen %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Salli DNS kyselyt -addnode, -seednode ja -connect yhteydessä</translation>
@@ -3297,41 +3061,29 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Virhe ladattaessa wallet.dat-tiedostoa: Tarvitset uudemman version Bitcoinista</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Lompakko tarvitsee uudelleenkirjoittaa: käynnistä Bitcoin uudelleen</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Virhe ladattaessa wallet.dat-tiedostoa</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Virheellinen proxy-osoite &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Virheellinen proxy-osoite '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Tuntematon verkko -onlynet parametrina: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Tuntematon verkko -onlynet parametrina: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Tuntematon -socks proxy versio pyydetty: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>-bind osoitteen '%s' selvittäminen epäonnistui</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>-bind osoitteen &apos;%s&apos; selvittäminen epäonnistui</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>-externalip osoitteen '%s' selvittäminen epäonnistui</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>-externalip osoitteen &apos;%s&apos; selvittäminen epäonnistui</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-paytxfee=&lt;amount&gt;: &apos;%s&apos; on virheellinen</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-paytxfee=&lt;amount&gt;: '%s' on virheellinen</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +3129,5 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Sinun täytyy asettaa rpcpassword=&lt;password&gt; asetustiedostoon:
-%s
-Jos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index 05089f0416ca..dfd7081593c8 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1,46 +1,9 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>À propos de Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Version de &lt;b&gt;Bitcoin Core&lt;/b&gt; </translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
- Ce logiciel est expérimental.
-
- Distribué sous licence logicielle MIT/X11, voir le fichier COPYING joint ou http://www.opensource.org/licenses/mit-license.php.
-
- Ce produit comprend des logiciels développés par le projet OpenSSL afin d&apos;être utilisés dans la boîte à outils OpenSSL (http://www.openssl.org/), un logiciel de chiffrement écrit par Eric Young (eay@cryptsoft.com), et un logiciel UPnP développé par Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Tous droits réservés</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Les développeurs Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="fr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Double cliquer afin de modifier l&apos;adresse ou l&apos;étiquette</translation>
+        <translation>Double cliquer afin de modifier l'adresse ou l'étiquette</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -52,7 +15,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copier l&apos;adresse courante sélectionnée dans le presse-papier</translation>
+        <translation>Copier l'adresse courante sélectionnée dans le presse-papiers</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -64,15 +27,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>&amp;Copier l&apos;adresse</translation>
+        <translation>&amp;Copier l'adresse</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>Effacer l&apos;adresse actuellement sélectionnée de la liste</translation>
+        <translation>Supprimer l'adresse actuellement sélectionnée de la liste</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exporter les données de l&apos;onglet courant vers un fichier</translation>
+        <translation>Exporter les données de l'onglet courant vers un fichier</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -84,11 +47,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Choisir l&apos;adresse à laquelle envoyer des pièces</translation>
+        <translation>Choisir l'adresse à laquelle envoyer des pièces</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Choisir l&apos;adresse avec laquelle recevoir des pîèces</translation>
+        <translation>Choisir l'adresse avec laquelle recevoir des pièces</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -96,7 +59,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Adresses d&apos;envoi</translation>
+        <translation>Adresses d'envoi</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
@@ -104,15 +67,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Voici vos adresses Bitcoin pour envoyer des paiements. Vérifiez toujours le montant et l&apos;adresse du destinataire avant d&apos;envoyer des pièces.</translation>
+        <translation>Voici vos adresses Bitcoin pour envoyer des paiements. Vérifiez toujours le montant et l'adresse du destinataire avant d'envoyer des pièces.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Voici vos adresses Bitcoin pour recevoir des paiements. Il est recommandé d&apos;utiliser une nouvelle adresse de réception pour chaque transaction.</translation>
+        <translation>Voici vos adresses Bitcoin pour recevoir des paiements. Il est recommandé d'utiliser une nouvelle adresse de réception pour chaque transaction.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Copier l&apos;é&amp;tiquette</translation>
+        <translation>Copier l'é&amp;tiquette</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
@@ -120,7 +83,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Export Address List</source>
-        <translation>Exporter la liste d&apos;adresses</translation>
+        <translation>Exporter la liste d'adresses</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -128,11 +91,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>L&apos;exportation a échoué</translation>
+        <translation>L'exportation a échoué</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Une erreur est survenue lors de l&apos;enregistrement de la liste d&apos;adresses vers %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Une erreur est survenue lors de l'enregistrement de la liste d'adresses vers %1. Veuillez ressayer plus tard.</translation>
     </message>
 </context>
 <context>
@@ -154,7 +117,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Dialogue de phrase de passe</translation>
+        <translation>Fenêtre de dialogue de la phrase de passe</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
@@ -168,10 +131,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Répéter la phrase de passe</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Saisir la nouvelle phrase de passe pour le portefeuille. &lt;br/&gt;Veuillez utiliser une phrase de passe de &lt;b&gt;10 caractères aléatoires ou plus&lt;/b&gt;, ou de &lt;b&gt;huit mots ou plus&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Chiffrer le portefeuille</translation>
@@ -206,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Attention : Si vous chiffrez votre portefeuille et perdez votre phrase de passe, vous &lt;b&gt;PERDREZ TOUS VOS BITCOINS&lt;/b&gt; !</translation>
+        <translation>Avertissement : si vous chiffrez votre portefeuille et perdez votre phrase de passe, vous &lt;b&gt;PERDREZ TOUS VOS BITCOINS&lt;/b&gt; !</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -218,15 +177,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>Attention : la touche Verr. Maj. est activée !</translation>
+        <translation>Avertissement : la touche Verr. Maj. est activée !</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Portefeuille chiffré</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Saisissez une nouvelle phrase de passe pour le portefeuille.&lt;br/&gt;Veuillez utiliser une phrase composée de &lt;b&gt;dix caractères aléatoires ou plus&lt;/b&gt;, ou bien de &lt;b&gt;huit mots ou plus&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin va à présent se fermer pour terminer le chiffrement. N&apos;oubliez pas que le chiffrement de votre portefeuille n&apos;est pas une protection totale contre le vol par des logiciels malveillants qui infecteraient votre ordinateur.</translation>
+        <translation>Bitcoin va à présent se fermer pour terminer le chiffrement. N'oubliez pas que le chiffrement de votre portefeuille n'est pas une protection totale contre le vol par des logiciels malveillants qui infecteraient votre ordinateur.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -234,7 +197,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>Le chiffrement du portefeuille a échoué en raison d&apos;une erreur interne. Votre portefeuille n&apos;a pas été chiffré.</translation>
+        <translation>Le chiffrement du portefeuille a échoué en raison d'une erreur interne. Votre portefeuille n'a pas été chiffré.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -269,7 +232,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation>&amp;Vue d&apos;ensemble</translation>
+        <translation>&amp;Vue d'ensemble</translation>
     </message>
     <message>
         <source>Node</source>
@@ -285,7 +248,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>Parcourir l&apos;historique des transactions</translation>
+        <translation>Parcourir l'historique des transactions</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
@@ -295,10 +258,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Quitter l’application</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Afficher des informations à propos de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>À propos de &amp;Qt</translation>
@@ -325,7 +284,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>Adresses d&apos;&amp;envoi...</translation>
+        <translation>Adresses d'&amp;envoi...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
@@ -335,6 +294,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>Ouvrir un &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Client Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importation des blocs depuis le disque...</translation>
@@ -387,6 +350,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>&amp;Recevoir</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Montrer des informations à propos de Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Afficher / Cacher</translation>
@@ -405,7 +372,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Vérifier les messages pour vous assurer qu&apos;ils ont été signés avec les adresses Bitcoin spécifiées</translation>
+        <translation>Vérifier les messages pour vous assurer qu'ils ont été signés avec les adresses Bitcoin spécifiées</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -421,7 +388,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Barre d&apos;outils des onglets</translation>
+        <translation>Barre d'outils des onglets</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -441,11 +408,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation>Afficher la liste d&apos;adresses d&apos;envoi et d&apos;étiquettes utilisées</translation>
+        <translation>Afficher la liste d'adresses d'envoi et d'étiquettes utilisées</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation>Afficher la liste d&apos;adresses de réception et d&apos;étiquettes utilisées</translation>
+        <translation>Afficher la liste d'adresses de réception et d'étiquettes utilisées</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
@@ -457,11 +424,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Afficher le message d&apos;aide de Bitcoin Core pour obtenir une liste des options de ligne de commande Bitcoin possibles.</translation>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Client Bitcoin</translation>
+        <translation>Afficher le message d'aide de Bitcoin Core pour obtenir une liste des options de ligne de commande Bitcoin possibles.</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -471,13 +434,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>Aucune source de blocs disponible...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>À traité %1 blocs sur %2 (estimés) de l&apos;historique des transactions.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
-        <translation>À traité %1 blocs de l&apos;historique des transactions.</translation>
+        <translation>À traité %1 blocs de l'historique des transactions.</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -559,10 +518,6 @@ Adresse : %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Le portefeuille est &lt;b&gt;chiffré&lt;/b&gt; et actuellement &lt;b&gt;verrouillé&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Une erreur fatale est survenue. Bitcoin ne peut plus continuer de façon sûre et va s&apos;arrêter.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -575,7 +530,7 @@ Adresse : %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation>Sélection de l&apos;adresse de contrôle des pièces</translation>
+        <translation>Sélection de l'adresse de contrôle des pièces</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -598,8 +553,8 @@ Adresse : %4
         <translation>Frais :</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Sortie faible :</translation>
+        <source>Dust:</source>
+        <translation>Poussière :</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -659,15 +614,15 @@ Adresse : %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copier l&apos;ID de la transaction</translation>
+        <translation>Copier l'ID de la transaction</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation>Verrouiller ce qui n&apos;est pas dépensé</translation>
+        <translation>Verrouiller ce qui n'est pas dépensé</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation>Déverrouiller ce qui n&apos;est pas dépensé</translation>
+        <translation>Déverrouiller ce qui n'est pas dépensé</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -690,8 +645,8 @@ Adresse : %4
         <translation>Copier la priorité</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Copier la sortie faible</translation>
+        <source>Copy dust</source>
+        <translation>Copier la poussière</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +697,8 @@ Adresse : %4
         <translation>aucun</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Poussière</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Peut varier +/- %1 satoshi(s) par entrée.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -759,7 +714,7 @@ Adresse : %4
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Signifie que des frais d&apos;au moins 1% par ko sont requis.</translation>
+        <translation>Ceci signifie que des frais d'au moins %1 par ko sont exigés.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
@@ -767,28 +722,12 @@ Adresse : %4
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation>Les transactions à priorité plus haute sont plus à même d&apos;être incluses dans un bloc.</translation>
+        <translation>Les transactions à priorité plus haute sont plus à même d'être incluses dans un bloc.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>Cette étiquette devient rouge si la priorité est plus basse que « moyenne »</translation>
     </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>Cette étiquette devient rouge si un destinataire reçoit un montant inférieur à 1%.</translation>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Signifie que des frais d&apos;au moins %1 sont requis.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Les montants inférieurs à 0,546 fois les frais minimums de relais sont affichés en tant que poussière.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Cette étiquette devient rouge si la monnaie rendue est inférieure à %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(aucune étiquette)</translation>
@@ -806,7 +745,7 @@ Adresse : %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Modifier l&apos;adresse</translation>
+        <translation>Modifier l'adresse</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -814,11 +753,11 @@ Adresse : %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation>L&apos;étiquette associée à cette entrée de la liste d&apos;adresses</translation>
+        <translation>L'étiquette associée à cette entrée de la liste d'adresses</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation>L&apos;adresse associée à cette entrée de la liste d&apos;adresses. Ceci ne peut être modifié que pour les adresses d&apos;envoi.</translation>
+        <translation>L'adresse associée à cette entrée de la liste d'adresses. Ceci ne peut être modifié que pour les adresses d'envoi.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -838,15 +777,15 @@ Adresse : %4
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation>Modifier l’adresse d&apos;envoi</translation>
+        <translation>Modifier l’adresse d'envoi</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>L’adresse fournie « %1 » est déjà présente dans le carnet d&apos;adresses.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>L’adresse fournie « %1 » est déjà présente dans le carnet d'adresses.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>L&apos;adresse fournie « %1 » n&apos;est pas une adresse Bitcoin valide.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>L'adresse fournie « %1 » n'est pas une adresse Bitcoin valide.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -873,7 +812,7 @@ Adresse : %4
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation>Le chemin existe déjà et n&apos;est pas un répertoire.</translation>
+        <translation>Le chemin existe déjà et n'est pas un répertoire.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
@@ -882,10 +821,6 @@ Adresse : %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Options de ligne de commande</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +829,18 @@ Adresse : %4
         <source>version</source>
         <translation>version</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>À propos de Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Options de ligne de commande</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Utilisation :</translation>
@@ -904,10 +851,10 @@ Adresse : %4
     </message>
     <message>
         <source>UI options</source>
-        <translation>Options de l&apos;interface utilisateur</translation>
+        <translation>Options de l'interface utilisateur</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
         <translation>Définir la langue, par exemple « fr_CA » (par défaut : la langue du système)</translation>
     </message>
     <message>
@@ -920,7 +867,7 @@ Adresse : %4
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>Afficher l&apos;écran d&apos;accueil au démarrage (par défaut : 1)</translation>
+        <translation>Afficher l'écran d'accueil au démarrage (par défaut : 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
@@ -939,7 +886,7 @@ Adresse : %4
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation>Comme c&apos;est la première fois que le logiciel est lancé, vous pouvez choisir où Bitcoin Core stockera ses données.</translation>
+        <translation>Comme c'est la première fois que le logiciel est lancé, vous pouvez choisir où Bitcoin Core stockera ses données.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
@@ -954,11 +901,11 @@ Adresse : %4
         <translation>Utiliser un répertoire de données personnalisé :</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
         <translation>Erreur : le répertoire de données spécifié « %1 » ne peut pas être créé.</translation>
     </message>
     <message>
@@ -967,7 +914,7 @@ Adresse : %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation>Go d&apos;espace libre disponible</translation>
+        <translation>Go d'espace libre disponible</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
@@ -982,7 +929,7 @@ Adresse : %4
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation>Ouvrir une demande de paiement à partir d&apos;un URI ou d&apos;un fichier</translation>
+        <translation>Ouvrir une demande de paiement à partir d'un URI ou d'un fichier</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -1017,11 +964,11 @@ Adresse : %4
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Démarrer Bitcoin automatiquement après avoir ouvert une session sur l&apos;ordinateur.</translation>
+        <translation>Démarrer Bitcoin automatiquement après avoir ouvert une session sur l'ordinateur.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Démarrer Bitcoin lors de l&apos;ouverture d&apos;une session</translation>
+        <translation>&amp;Démarrer Bitcoin lors de l'ouverture d'une session</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
@@ -1033,7 +980,15 @@ Adresse : %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation>Nombre d&apos;exétrons de &amp;vérification de script</translation>
+        <translation>Nombre d'exétrons de &amp;vérification de script</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accepter les connexions provenant de l'extérieur</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permettre les transactions entrantes</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
@@ -1049,11 +1004,11 @@ Adresse : %4
     </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 de tiers (par ex. un explorateur de blocs) apparaissant dans l&apos;onglet des transactions comme éléments du menu contextuel. %s dans l&apos;URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
+        <translation>URL de tiers (par ex. un explorateur de blocs) apparaissant dans l'onglet des transactions comme éléments du menu contextuel. %s dans l'URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation>URL de transaction d&apos;un tiers</translation>
+        <translation>URL de transaction d'un tiers</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1089,7 +1044,7 @@ Adresse : %4
     </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>Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d&apos;une transaction ne peut pas être utilisée tant que cette transaction n&apos;a pas reçu au moins une confirmation. Ceci affecte aussi comment votre solde est calculé.</translation>
+        <translation>Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d'une transaction ne peut pas être utilisée tant que cette transaction n'a pas reçu au moins une confirmation. Ceci affecte aussi comment votre solde est calculé.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
@@ -1097,11 +1052,11 @@ Adresse : %4
     </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>Ouvrir le port du client Bitcoin automatiquement sur le routeur. Ceci ne fonctionne que si votre routeur supporte l&apos;UPnP et si la fonctionnalité est activée.</translation>
+        <translation>Ouvrir le port du client Bitcoin automatiquement sur le routeur. Ceci ne fonctionne que si votre routeur supporte l'UPnP et si la fonctionnalité est activée.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>Mapper le port avec l&apos;&amp;UPnP</translation>
+        <translation>Mapper le port avec l'&amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1115,14 +1070,6 @@ Adresse : %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port du serveur mandataire (par ex. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Version SOCKS :</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Version SOCKS du serveur mandataire (par ex. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Fenêtre</translation>
@@ -1137,7 +1084,7 @@ Adresse : %4
     </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 Quit in the menu.</source>
-        <translation>Minimiser au lieu de quitter l&apos;application lorsque la fenêtre est fermée. Si cette option est activée, l&apos;application ne pourra être fermée qu&apos;en sélectionnant Quitter dans le menu.</translation>
+        <translation>Minimiser au lieu de quitter l'application lorsque la fenêtre est fermée. Si cette option est activée, l'application ne pourra être fermée qu'en sélectionnant Quitter dans le menu.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1149,27 +1096,19 @@ Adresse : %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>&amp;Langue de l&apos;interface utilisateur :</translation>
+        <translation>&amp;Langue de l'interface utilisateur :</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>La langue de l&apos;interface utilisateur peut être définie ici. Ce réglage sera pris en compte après redémarrage de Bitcoin.</translation>
+        <translation>La langue de l'interface utilisateur peut être définie ici. Ce réglage sera pris en compte après redémarrage de Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation>&amp;Unité d&apos;affichage des montants :</translation>
+        <translation>&amp;Unité d'affichage des montants :</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Choisissez la sous-unité par défaut pour l&apos;affichage dans l&apos;interface et lors de l&apos;envoi de pièces.</translation>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Détermine si les adresses Bitcoin seront affichées sur la liste des transactions.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Afficher les adresses sur la liste des transactions</translation>
+        <translation>Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
@@ -1205,11 +1144,11 @@ Adresse : %4
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation>Ce changement nécessite un redémarrage du client.</translation>
+        <translation>Ce changement demanderait un redémarrage du client.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>L&apos;adresse de serveur mandataire fournie est invalide.</translation>
+        <translation>L'adresse de serveur mandataire fournie est invalide.</translation>
     </message>
 </context>
 <context>
@@ -1220,12 +1159,16 @@ Adresse : %4
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>Les informations affichées peuvent être obsolètes. Votre portefeuille est automatiquement synchronisé avec le réseau Bitcoin lorsque la connexion s&apos;établit, or ce processus n&apos;est pas encore terminé.</translation>
+        <translation>Les informations affichées peuvent être obsolètes. Votre portefeuille est automatiquement synchronisé avec le réseau Bitcoin lorsque la connexion s'établit, or ce processus n'est pas encore terminé.</translation>
     </message>
     <message>
         <source>Wallet</source>
         <translation>Portefeuille</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Juste-regarder :</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Disponible :</translation>
@@ -1240,7 +1183,7 @@ Adresse : %4
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Total des transactions qui doivent encore être confirmées et qu&apos;il n&apos;est pas encore possible de dépenser</translation>
+        <translation>Total des transactions qui doivent encore être confirmées et qu'il n'est pas encore possible de dépenser</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1248,7 +1191,7 @@ Adresse : %4
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Le solde généré n&apos;est pas encore mûr</translation>
+        <translation>Le solde généré n'est pas encore mûr</translation>
     </message>
     <message>
         <source>Total:</source>
@@ -1258,6 +1201,22 @@ Adresse : %4
         <source>Your current total balance</source>
         <translation>Votre solde total actuel</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Votre balance actuelle en adresses juste-regarder</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transactions non confirmées vers des adresses juste-regarder</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Le solde miné dans des adresses juste-regarder, qui n'est pas encore mûr</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Solde total actuel dans des adresses juste-regarder</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Transactions récentes&lt;/b&gt;</translation>
@@ -1274,12 +1233,28 @@ Adresse : %4
         <translation>Gestion des URIs</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>L&apos;URI ne peut être analysé ! Ceci peut être causé par une adresse Bitcoin invalide ou par des paramètres d&apos;URI mal composé.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Adresse de paiement invalide %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>La demande de paiement est rejetée</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Le réseau de la demande de paiement ne correspond pas au réseau du client.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>La demande de paiement est expirée.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>La demande de paiement n'est pas initialisée.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Le paiement demandé d&apos;un montant de %1 est trop faible (considéré comme de la poussière).</translation>
+        <translation>Le paiement demandé d'un montant de %1 est trop faible (considéré comme de la poussière).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1290,24 +1265,20 @@ Adresse : %4
         <translation>Impossible de démarrer le gestionnaire de cliquer-pour-payer bitcoin :</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Avertissement du gestionnaire de réseau</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Votre serveur mandataire actif ne prend pas en charge SOCKS5 ce qui est exigé pour les demandes de paiements par serveur mandataire.</translation>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>L'URL de récupération de la demande de paiement est invalide : %1</translation>
     </message>
     <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation>L&apos;URL de récupération de la demande de paiement est invalide : %1</translation>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>L'URI ne peut pas être analysé ! Ceci peut être causé par une adresse Bitcoin invalide ou par des paramètres d'URI mal formés.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Gestion des fichiers de demande de paiement</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Le fichier de demande de paiement ne peut pas être lu ou traité ! Ceci peut être causé par un fichier de demande de paiement invalide.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Le fichier de demande de paiement ne peut pas être lu ! Ceci peut être causé par un fichier de demande de paiement invalide.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1322,8 +1293,8 @@ Adresse : %4
         <translation>Erreur de communication avec %1 : %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>La demande de paiement ne peut pas être analysée ou traitée !</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>La demande de paiement ne peut pas être analysée !</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,42 +1309,77 @@ Adresse : %4
         <translation>Erreur de demande réseau</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent utilisateur</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresse/nom d'hôte</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Montant</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erreur : le répertoire de données spécifié « %1 » n&apos;existe pas.</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Saisir une adresse Bitcoin (p. ex. %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Erreur : impossible d&apos;analyser le fichier de configuration : %1. N’utilisez que la syntaxe clef=valeur.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erreur : combinaison invalide de -regtest et de -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ne s&apos;est pas encore arrêté en toute sécurité...</translation>
+        <source>%1 m</source>
+        <translation>%1 min</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Saisir une adresse Bitcoin (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>RÉSEAU</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>INCONNU</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Aucun</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>N.D.</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Sauvegarder l&apos;image...</translation>
+        <translation>&amp;Sauvegarder l'image...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation>&amp;Copier l&apos;image</translation>
+        <translation>&amp;Copier l'image</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1412,7 +1418,11 @@ Adresse : %4
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation>Version d&apos;OpenSSL utilisée</translation>
+        <translation>Version d'OpenSSL utilisée</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Version BerkeleyDB utilisée</translation>
     </message>
     <message>
         <source>Startup time</source>
@@ -1439,8 +1449,76 @@ Adresse : %4
         <translation>Nombre actuel de blocs</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Nombre total estimé de blocs</translation>
+        <source>Received</source>
+        <translation>Reçu</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Envoyé</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Pairs</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Choisir un pair pour voir l'information détaillée.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direction</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Version</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent utilisateur</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Services</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Nœud de synchro</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Hauteur de démarrage</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Hauteur de synchro</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Pointage des bannissements</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Temps de connexion</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Dernier envoi</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Dernière réception</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Octets envoyés</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Octets reçus</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1496,7 +1574,7 @@ Adresse : %4
     </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>Utiliser les touches de curseur pour naviguer dans l&apos;historique et &lt;b&gt;Ctrl-L&lt;/b&gt; pour effacer l&apos;écran.</translation>
+        <translation>Utiliser les touches de curseur pour naviguer dans l'historique et &lt;b&gt;Ctrl-L&lt;/b&gt; pour effacer l'écran.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1519,16 +1597,36 @@ Adresse : %4
         <translation>%1 Go</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 min</translation>
+        <source>via %1</source>
+        <translation>par %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>jamais</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrant</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Sortant</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Oui</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Non</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 min</translation>
+        <source>Unknown</source>
+        <translation>Inconnu</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Récupération...</translation>
     </message>
 </context>
 <context>
@@ -1547,7 +1645,7 @@ Adresse : %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Réutilise une adresse de réception précédemment utilisée. Réutiliser une adresse pose des problèmes de sécurité et de vie privée. N&apos;utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite.</translation>
+        <translation>Réutilise une adresse de réception précédemment utilisée. Réutiliser une adresse pose des problèmes de sécurité et de vie privée. N'utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
@@ -1555,7 +1653,7 @@ Adresse : %4
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>Un message optionnel à joindre à la demande de paiement qui sera affiché à l&apos;ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin.</translation>
+        <translation>Un message optionnel à joindre à la demande de paiement qui sera affiché à l'ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
@@ -1622,15 +1720,15 @@ Adresse : %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Copier l&apos;&amp;URI</translation>
+        <translation>Copier l'&amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>Copier l&apos;&amp;adresse</translation>
+        <translation>Copier l'&amp;adresse</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Sauvegarder l&apos;image...</translation>
+        <translation>&amp;Sauvegarder l'image...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1662,11 +1760,11 @@ Adresse : %4
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>L&apos;URI résultant est trop long, essayez de réduire le texte d&apos;étiquette / de message.</translation>
+        <translation>L'URI résultant est trop long, essayez de réduire le texte d'étiquette / de message.</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Erreur d&apos;encodage de l&apos;URI en code QR.</translation>
+        <translation>Erreur d'encodage de l'URI en code QR.</translation>
     </message>
 </context>
 <context>
@@ -1689,7 +1787,7 @@ Adresse : %4
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(pas d&apos;étiquette)</translation>
+        <translation>(pas d'étiquette)</translation>
     </message>
     <message>
         <source>(no message)</source>
@@ -1742,10 +1840,6 @@ Adresse : %4
         <source>Fee:</source>
         <translation>Frais :</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Sortie faible</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Après les frais :</translation>
@@ -1756,7 +1850,7 @@ Adresse : %4
     </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>Si ceci est actif mais l&apos;adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée.</translation>
+        <translation>Si ceci est actif mais l'adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée.</translation>
     </message>
     <message>
         <source>Custom change address</source>
@@ -1774,6 +1868,10 @@ Adresse : %4
         <source>Clear all fields of the form.</source>
         <translation>Effacer tous les champs du formulaire.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Poussière :</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Tout nettoyer</translation>
@@ -1784,7 +1882,7 @@ Adresse : %4
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation>Confirmer l’action d&apos;envoi</translation>
+        <translation>Confirmer l’action d'envoi</translation>
     </message>
     <message>
         <source>S&amp;end</source>
@@ -1822,10 +1920,6 @@ Adresse : %4
         <source>Copy priority</source>
         <translation>Copier la priorité</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copier la sortie faible</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copier la monnaie</translation>
@@ -1840,7 +1934,7 @@ Adresse : %4
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation>L&apos;adresse du destinataire n’est pas valide, veuillez la vérifier.</translation>
+        <translation>L'adresse du destinataire n’est pas valide, veuillez la vérifier.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
@@ -1856,7 +1950,7 @@ Adresse : %4
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Adresse indentique trouvée, il n&apos;est possible d&apos;envoyer qu&apos;une fois à chaque adresse par opération d&apos;envoi.</translation>
+        <translation>Adresse indentique trouvée, il n'est possible d'envoyer qu'une fois à chaque adresse par opération d'envoi.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -1868,15 +1962,19 @@ Adresse : %4
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation>Attention : adresse Bitcoin invalide</translation>
+        <translation>Avertissement : adresse Bitcoin invalide</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(pas d&apos;étiquette)</translation>
+        <translation>(pas d'étiquette)</translation>
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation>Attention : adresse de monnaie rendue inconnue</translation>
+        <translation>Avertissement : adresse de monnaie rendue inconnue</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copier la poussière</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1886,14 +1984,6 @@ Adresse : %4
         <source>added as transaction fee</source>
         <translation>ajouté en tant que frais de transaction</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>La demande de paiement a expiré</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Adresse de paiement invalide %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1995,6 @@ Adresse : %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Payer à :</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;adresse à laquelle le paiement sera envoyé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses</translation>
@@ -1925,13 +2011,17 @@ Adresse : %4
         <source>This is a normal payment.</source>
         <translation>Ceci est un paiement normal.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>L'adresse Bitcoin à laquelle envoyer le paiement</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Coller l&apos;adresse depuis le presse-papier</translation>
+        <translation>Coller l'adresse depuis le presse-papiers</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1951,11 +2041,11 @@ Adresse : %4
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation>Saisir une étiquette pour cette adresse afin de l&apos;ajouter à la liste d&apos;adresses utilisées</translation>
+        <translation>Saisir une étiquette pour cette adresse afin de l'ajouter à la liste d'adresses utilisées</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation>Un message qui était joint à l&apos;URI Bitcoin et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin.</translation>
+        <translation>Un message qui était joint à l'URI Bitcoin et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
@@ -1978,7 +2068,7 @@ Adresse : %4
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation>Ne pas fermer l&apos;ordinateur jusqu&apos;à la disparition de cette fenêtre.</translation>
+        <translation>Ne pas fermer l'ordinateur jusqu'à la disparition de cette fenêtre.</translation>
     </message>
 </context>
 <context>
@@ -1993,11 +2083,11 @@ Adresse : %4
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Vous pouvez signer des messages avec vos adresses pour prouver que vous les détenez. Faites attention de ne pas signer de vague car des attaques d&apos;hameçonnage peuvent essayer d&apos;usurper votre identité par votre signature. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous serez d&apos;accord.</translation>
+        <translation>Vous pouvez signer des messages avec vos adresses pour prouver que vous les détenez. Faites attention de ne pas signer de vague car des attaques d'hameçonnage peuvent essayer d'usurper votre identité par votre signature. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous serez d'accord.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;adresse avec laquelle le message sera signé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>L'adresse Bitcoin avec laquelle signer le message</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2009,7 +2099,7 @@ Adresse : %4
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Coller une adresse depuis le presse-papier</translation>
+        <translation>Coller une adresse depuis le presse-papiers</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -2025,7 +2115,7 @@ Adresse : %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>Copier la signature actuelle dans le presse-papier</translation>
+        <translation>Copier la signature actuelle dans le presse-papiers</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
@@ -2049,15 +2139,15 @@ Adresse : %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Saisir ci-dessous l&apos;adresse de signature, le message (assurez-vous d&apos;avoir copié exactement les retours à la ligne, les espaces, tabulations etc...) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé lui-même pour éviter d&apos;être trompé par une attaque d&apos;homme du milieu.</translation>
+        <translation>Saisir ci-dessous l'adresse de signature, le message (assurez-vous d'avoir copié exactement les retours à la ligne, les espaces, tabulations etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé lui-même pour éviter d'être trompé par une attaque d'homme du milieu.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;adresse avec laquelle le message a été signé (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>L'adresse Bitcoin avec laquelle le message a été signé</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>Vérifier le message pour vous assurer qu&apos;il a bien été signé par l&apos;adresse Bitcoin spécifiée</translation>
+        <translation>Vérifier le message pour vous assurer qu'il a bien été signé par l'adresse Bitcoin spécifiée</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
@@ -2068,24 +2158,20 @@ Adresse : %4
         <translation>Réinitialiser tous les champs de vérification de message</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Saisir une adresse Bitcoin (par ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <source>Click "Sign Message" to generate signature</source>
         <translation>Cliquez sur « Signer le message » pour générer la signature</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation>L&apos;adresse saisie est invalide.</translation>
+        <translation>L'adresse saisie est invalide.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Veuillez vérifier l&apos;adresse et réessayer.</translation>
+        <translation>Veuillez vérifier l'adresse et réessayer.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation>L&apos;adresse saisie ne fait pas référence à une clef.</translation>
+        <translation>L'adresse saisie ne fait pas référence à une clef.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
@@ -2093,7 +2179,7 @@ Adresse : %4
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation>La clef privée pour l&apos;adresse indiquée n&apos;est pas disponible.</translation>
+        <translation>La clef privée pour l'adresse indiquée n'est pas disponible.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2105,7 +2191,7 @@ Adresse : %4
     </message>
     <message>
         <source>The signature could not be decoded.</source>
-        <translation>La signature n&apos;a pu être décodée.</translation>
+        <translation>La signature n'a pu être décodée.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
@@ -2113,7 +2199,7 @@ Adresse : %4
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>La signature ne correspond pas à l&apos;empreinte du message.</translation>
+        <translation>La signature ne correspond pas à l'empreinte du message.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -2150,7 +2236,7 @@ Adresse : %4
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation>Ouvert jusqu&apos;à %1</translation>
+        <translation>Ouvert jusqu'à %1</translation>
     </message>
     <message>
         <source>conflicted</source>
@@ -2200,6 +2286,10 @@ Adresse : %4
         <source>own address</source>
         <translation>votre propre adresse</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>juste-regarder</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>étiquette</translation>
@@ -2220,6 +2310,14 @@ Adresse : %4
         <source>Debit</source>
         <translation>Débit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Débit total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Crédit total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Frais de transaction</translation>
@@ -2245,7 +2343,7 @@ Adresse : %4
         <translation>Marchand</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Les pièces générées doivent mûrir pendant %1 blocs avant de pouvoir être dépensées. Lorsque vous avez généré ce bloc, il a été diffusé sur le réseau pour être ajouté à la chaîne de blocs. S’il échoue a intégrer la chaîne, son état sera modifié en « non accepté » et il ne sera pas possible de le dépenser. Ceci peut arriver occasionnellement si un autre nœud génère un bloc à quelques secondes du votre.</translation>
     </message>
     <message>
@@ -2310,10 +2408,6 @@ Adresse : %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Montant</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Immature (%1 confirmations, sera disponible après %2)</translation>
@@ -2324,7 +2418,7 @@ Adresse : %4
     </message>
     <message>
         <source>Open until %1</source>
-        <translation>Ouvert jusqu&apos;à %1</translation>
+        <translation>Ouvert jusqu'à %1</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
@@ -2372,7 +2466,7 @@ Adresse : %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>Extrait</translation>
+        <translation>Miné</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2443,7 +2537,7 @@ Adresse : %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>Extrait</translation>
+        <translation>Miné</translation>
     </message>
     <message>
         <source>Other</source>
@@ -2471,7 +2565,7 @@ Adresse : %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copier l&apos;ID de la transaction</translation>
+        <translation>Copier l'ID de la transaction</translation>
     </message>
     <message>
         <source>Edit label</source>
@@ -2483,15 +2577,15 @@ Adresse : %4
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation>Exporter l&apos;historique des transactions</translation>
+        <translation>Exporter l'historique des transactions</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>L&apos;exportation a échoué</translation>
+        <translation>L'exportation a échoué</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation>Une erreur est survenue lors de l&apos;enregistrement de l&apos;historique des transactions vers %1.</translation>
+        <translation>Une erreur est survenue lors de l'enregistrement de l'historique des transactions vers %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
@@ -2499,7 +2593,7 @@ Adresse : %4
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation>L&apos;historique des transactions a été sauvegardée avec succès vers %1.</translation>
+        <translation>L'historique des transactions a été sauvegardée avec succès vers %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2525,10 +2619,6 @@ Adresse : %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Montant</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2632,13 @@ Adresse : %4
         <translation>à</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unité d'affichage des montants. Cliquer pour choisir une autre unité.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2564,7 +2661,7 @@ Adresse : %4
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exporter les données de l&apos;onglet courant vers un fichier</translation>
+        <translation>Exporter les données de l'onglet courant vers un fichier</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
@@ -2580,7 +2677,7 @@ Adresse : %4
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation>Une erreur est survenue lors de l&apos;enregistrement des données de portefeuille vers %1.</translation>
+        <translation>Une erreur est survenue lors de l'enregistrement des données de portefeuille vers %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
@@ -2593,18 +2690,6 @@ Adresse : %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Utilisation :</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lister les commandes</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Obtenir de l’aide pour une commande</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Options :</translation>
@@ -2645,10 +2730,6 @@ Adresse : %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Délai en secondes de refus de reconnexion aux pairs de mauvaise qualité (par défaut : 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Une erreur est survenue lors du réglage du port RPC %u pour écouter sur IPv4 : %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Écouter les connexions JSON-RPC sur le &lt;port&gt; (par défaut : 8332 ou tesnet : 18332)</translation>
@@ -2657,10 +2738,6 @@ Adresse : %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepter les commandes de JSON-RPC et de la ligne de commande</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Version du client RPC de Bitcoin Core</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Fonctionner en arrière-plan en tant que démon et accepter les commandes</translation>
@@ -2683,63 +2760,51 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, vous devez définir un mot de passe rpc dans le fichier de configuration : 
 %s
-Il vous est conseillé d&apos;utiliser le mot de passe aléatoire suivant :
+Il vous est conseillé d'utiliser le mot de passe aléatoire suivant :
 rpcuser=bitcoinrpc
 rpcpassword=%s
-(vous n&apos;avez pas besoin de retenir ce mot de passe)
-Le nom d&apos;utilisateur et le mot de passe NE DOIVENT PAS être identiques.
-Si le fichier n&apos;existe pas, créez-le avec les droits de lecture accordés au propriétaire.
+(vous n'avez pas besoin de retenir ce mot de passe)
+Le nom d'utilisateur et le mot de passe NE DOIVENT PAS être identiques.
+Si le fichier n'existe pas, créez-le avec les droits de lecture accordés au propriétaire.
 Il est aussi conseillé de régler alertnotify pour être prévenu des problèmes ;
-par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@foo.com
+par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Chiffrements acceptables (par défaut : TLSv1.2+HIGH : TLSv1+HIGH : !SSLv2 : !aNULL : !eNULL : !3DES : @STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Une erreur est survenue lors du réglage du port RPC %u pour écouter sur IPv6, retour à IPv4 : %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Se lier à l&apos;adresse donnée et toujours l&apos;écouter. Utilisez la notation [host]:port pour l&apos;IPv6</translation>
+        <translation>Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Limiter continuellement les transactions gratuites à &lt;n&gt;*1000 octets par minute (par défaut : 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entrer dans le mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs peuvent être résolus instantanément. Ceci est destiné aux outils de test de régression et au développement d&apos;applications.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Supprimer toutes les transactions du portefeuille et ne récupérer que ces parties de la chaîne de bloc avec -rescan au démarrage</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Passer en mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs sont résolus instantanément.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Erreur : l&apos;écoute des connexions entrantes a échoué (l&apos;écoute a retourné l&apos;erreur %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Erreur : La transaction a été rejetée ! Ceci peut arriver si certaines pièces de votre portefeuille étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et les pièces ont été dépensées avec cette copie sans être marquées comme tel ici.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erreur : Cette transaction nécessite des frais de transaction d&apos;au moins %s en raison de son montant, de sa complexité ou de l&apos;utilisation de fonds reçus récemment !</translation>
+        <translation>Erreur : cette transaction exige des frais de transaction d'au moins %s en raison de son montant, de sa complexité ou de l'utilisation de fonds reçus récemment !</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Exécuter la commande lorsqu&apos;une transaction de portefeuille change (%s dans la commande est remplacée par TxID)</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Les frais inférieurs à ce seuil sont considérés comme nuls (pour la création de transactions) (par défaut :</translation>
+        <translation>Exécuter la commande lorsqu'une transaction de portefeuille change (%s dans la commande est remplacée par TxID)</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
@@ -2755,7 +2820,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </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>Définir le nombre d&apos;exétrons de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
+        <translation>Définir le nombre d'exétrons de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
@@ -2763,7 +2828,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation>Ceci est une pré-version de test - l&apos;utiliser à vos risques et périls - ne pas l&apos;utiliser pour miner ou pour des applications marchandes</translation>
+        <translation>Ceci est une pré-version de test - l'utiliser à vos risques et périls - ne pas l'utiliser pour miner ou pour des applications marchandes</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
@@ -2775,23 +2840,19 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Attention : -paytxfee est réglée sur un montant très élevé ! Il s&apos;agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Attention : Veuillez vérifier que la date et l&apos;heure de votre ordinateur sont justes ! Si votre horloge n&apos;est pas à l&apos;heure, Bitcoin ne fonctionnera pas correctement.</translation>
+        <translation>Avertissement : -paytxfee est réglé sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation>Attention : Le réseau ne semble pas totalement d&apos;accord ! Quelques mineurs semblent éprouver des difficultés.</translation>
+        <translation>Avertissement : le réseau ne semble pas totalement d'accord ! Quelques mineurs semblent éprouver des difficultés.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Attention : Nous ne semblons pas être en accord complet avec nos pairs ! Vous pourriez avoir besoin d&apos;effectuer une mise à niveau, ou d&apos;autres nœuds du réseau pourraient avoir besoin d&apos;effectuer une mise à niveau.</translation>
+        <translation>Avertissement : nous ne semblons pas être en accord complet avec nos pairs ! Vous pourriez avoir besoin d'effectuer une mise à niveau, ou d'autres nœuds du réseau pourraient avoir besoin d'effectuer une mise à niveau.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Avertissement : une erreur est survenue lors de la lecture de wallet.dat ! Toutes les clefs ont été lues correctement mais les données de transaction ou les entrées du carnet d&apos;adresses sont peut-être incorrectes ou manquantes.</translation>
+        <translation>Avertissement : une erreur est survenue lors de la lecture de wallet.dat ! Toutes les clefs ont été lues correctement mais les données de transaction ou les entrées du carnet d'adresses sont peut-être incorrectes ou manquantes.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
@@ -2811,31 +2872,15 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation>Tenter de récupérer les clefs privées d&apos;un wallet.dat corrompu</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Démon Bitcoin Core</translation>
+        <translation>Tenter de récupérer les clefs privées d'un wallet.dat corrompu</translation>
     </message>
     <message>
         <source>Block creation options:</source>
         <translation>Options de création de bloc :</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Effacer la liste des transactions du portefeuille (outil de diagnostic, implique un nouveau balayage -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Ne se connecter qu&apos;au(x) nœud(s) spécifié(s)</translation>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Connexion à travers un serveur mandataire SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Se connecter à JSON-RPC sur le &lt;port&gt; (par défaut : 8332 ou testnet : 18332)</translation>
+        <translation>Ne se connecter qu'au(x) nœud(s) spécifié(s)</translation>
     </message>
     <message>
         <source>Connection options:</source>
@@ -2855,7 +2900,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Découvrir sa propre adresse IP (par défaut : 1 lors de l&apos;écoute et si aucun -externalip)</translation>
+        <translation>Découvrir sa propre adresse IP (par défaut : 1 lors de l'écoute et si aucun -externalip)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
@@ -2867,11 +2912,11 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation>Erreur lors de l&apos;initialisation de la base de données des blocs</translation>
+        <translation>Erreur lors de l'initialisation de la base de données des blocs</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Erreur lors de l&apos;initialisation de l&apos;environnement de la base de données du portefeuille %s !</translation>
+        <translation>Erreur lors de l'initialisation de l'environnement de la base de données du portefeuille %s !</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2879,11 +2924,11 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation>Erreur lors de l&apos;ouverture de la base de données des blocs</translation>
+        <translation>Erreur lors de l'ouverture de la base de données des blocs</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation>Erreur : l&apos;espace disque est faible !</translation>
+        <translation>Erreur : l'espace disque est faible !</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
@@ -2895,7 +2940,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Échec de l&apos;écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
+        <translation>Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
@@ -2907,47 +2952,35 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation>La synchronisation de l&apos;index des blocs a échoué</translation>
+        <translation>La synchronisation de l'index des blocs a échoué</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation>L&apos;&apos;écriture de l&apos;index des blocs a échoué</translation>
+        <translation>L''écriture de l'index des blocs a échoué</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
-        <translation>L&apos;écriture des informations du bloc a échoué</translation>
+        <translation>L'écriture des informations du bloc a échoué</translation>
     </message>
     <message>
         <source>Failed to write block</source>
-        <translation>L&apos;écriture du bloc a échoué</translation>
+        <translation>L'écriture du bloc a échoué</translation>
     </message>
     <message>
         <source>Failed to write file info</source>
-        <translation>L&apos;écriture des informations de fichier a échoué</translation>
+        <translation>L'écriture des informations de fichier a échoué</translation>
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation>L&apos;écriture dans la base de données des pièces a échoué</translation>
+        <translation>L'écriture dans la base de données des pièces a échoué</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation>L&apos;écriture de l&apos;index des transactions a échoué</translation>
+        <translation>L'écriture de l'index des transactions a échoué</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
-        <translation>L&apos;écriture des données d&apos;annulation a échoué</translation>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Frais par ko à ajouter aux transactions que vous envoyez</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Les frais inférieurs à ce seuil sont considérés comme nuls (pour le relayage) (par défaut :</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Trouver des pairs en utilisant la recherche DNS (par défaut : 1 sauf si -connect est utilisé)</translation>
+        <translation>L'écriture des données d'annulation a échoué</translation>
     </message>
     <message>
         <source>Force safe mode (default: 0)</source>
@@ -2963,7 +2996,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Si &lt;category&gt; n&apos;est pas indiqué, extraire toutes les données de débogage.</translation>
+        <translation>Si &lt;category&gt; n'est pas indiqué, extraire toutes les données de débogage.</translation>
     </message>
     <message>
         <source>Importing...</source>
@@ -2974,7 +3007,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <translation>Bloc de genèse incorrect ou introuvable. Mauvais répertoire de données pour le réseau ?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
+        <source>Invalid -onion address: '%s'</source>
         <translation>Adresse -onion invalide : « %s »</translation>
     </message>
     <message>
@@ -2983,19 +3016,11 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Ajouter l&apos;horodatage au début des résultats de débogage (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Options du client RPC :</translation>
+        <translation>Ajouter l'horodatage au début des résultats de débogage (par défaut : 1)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Reconstruire l&apos;index de la chaîne de blocs à partir des fichiers blk000??.dat courants</translation>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Choisir la version SOCKS pour -proxy (4 ou 5, par défaut : 5)</translation>
+        <translation>Reconstruire l'index de la chaîne de blocs à partir des fichiers blk000??.dat courants</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
@@ -3007,7 +3032,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Définir le nombre d&apos;exétrons pour desservir les appels RPC (par défaut : 4)</translation>
+        <translation>Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : 4)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
@@ -3015,15 +3040,15 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Dépenser la monnaie non confirmée lors de l&apos;envoi de transactions (par défaut : 1)</translation>
+        <translation>Dépenser la monnaie non confirmée lors de l'envoi de transactions (par défaut : 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Ceci est à l&apos;intention des outils de test de régression et du développement applicatif.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Arrêter l'exécution après l'importation des blocs du disque (par défaut : 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Utilisation (obsolète, utiliser bitcoin-cli) :</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Ceci est à l'intention des outils de test de régression et du développement applicatif.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3033,10 +3058,6 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Verifying wallet...</source>
         <translation>Vérification du portefeuille en cours...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Attendre le démarrage du serveur RPC</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Le portefeuille %s réside en dehors du répertoire de données %s</translation>
@@ -3045,10 +3066,6 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Wallet options:</source>
         <translation>Options du portefeuille :</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Attention : l&apos;argument obsolète -debugnet a été ignoré, utiliser -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Vous devez reconstruire la base de données en utilisant -reindex afin de modifier -txindex</translation>
@@ -3057,34 +3074,158 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importe des blocs depuis un fichier blk000??.dat externe</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(par défaut : 1, 1 = conserver les données de transmission c.-à-d. propriétaire du compte et information de demande de paiement, 2 = abandonner les données de transmission)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permettre les connexions JSON-RPC de sources spécifiques. Valide pour &lt;ip&gt; qui sont une IP simple (p. ex. 1.2.3.4), un réseau/masque réseau (p. ex. 1.2.3.4/255.255.255.0) ou un réseau/CIDR (p. ex. 1.2.3.4/24). Cette option peut être être spécifiée plusieurs fois</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Une erreur est survenue lors de la mise en place de l'adresse %s port %u d'écoute RPC  : %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Se lier à l'adresse donnée et aux pairs s'y connectant. Utiliser la notation [host]:port pour l'IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Se lier à l'adresse donnée pour écouter des connexions JSON-RPC. Utiliser la notation [host]:port pour l'IPv6. Cette option peut être spécifiée plusieurs fois (par défaut : se lier à toutes les interfaces)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Impossible d’obtenir un verrou sur le répertoire de données %s. Bitcoin Core fonctionne probablement déjà.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Créer de nouveaux fichiers avec les permissions système par défaut, au lieu de umask 077 (effectif seulement avec la fonction du portefeuille désactivée)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribué sous la licence logiciel MIT/X11, consultez le fichier joint COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Erreur : l'écoute des connexions entrantes a échoué (l'écoute a retourné l'erreur %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Erreur : l'argument non pris en charge -socks a été trouvé. Il n'est plus possible de définir la version de SOCKS, seuls les serveurs mandataires SOCKS5 sont pris en charge.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Exécuter la commande quand une transmission réseau redépense l'entrée d'une transmission du portefeuille (%s=respend TxID, %t=wallet TxID)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Exécuter une commande lorsqu&apos;une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
+        <translation>Exécuter une commande lorsqu'une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Les frais (en BTC/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour le relayage (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Les frais (en BTC/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour la création de transactions (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Si paytxfee n'est pas défini, inclure suffisamment de frais afin que les transactions soient confirmées avant n blocs (par défaut : 1)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Informations du résultat de débogage (par défaut : 0, fournir &lt;category&gt; est optionnel)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Demander les adresses des pairs par recherche DNS si l'on manque d'adresses (par défaut : 1 sauf si -connect)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL &lt;https://www.openssl.org/&gt; et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</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>Avertissement : veuillez vérifier que l'heure et la date de votre ordinateur sont correctes ! Si votre horloge n'est pas à l'heure, Bitcoin Core ne fonctionnera pas correctement.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Pairs de la liste blanche se connectant à partir du masque réseau ou de l'IP donné. Peut être spécifié plusieurs fois.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Les pairs de la liste blanche ne peuvent pas être bannis DoS et leurs transactions sont toujours relayées, même si elles sont déjà dans le mempool, utile p. ex. pour une passerelle</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Toujours demander les adresses de pairs par recherche DNS (par défaut : 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Impossible de résoudre l'adresse -whitebind : « %s »</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Se connecter par un mandataire SOCKS5</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright © 2009-%i Les développeurs de Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Impossible d'analyser la valeur -rpcbind %s comme adresse réseau</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Erreur lors du chargement de wallet.dat : le portefeuille exige une version plus récente de Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Erreur : argument non pris en charge -tor trouvé, utiliser -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Les frais (en BTC/ko) à ajouter aux transactions que vous envoyez (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Inclure les adresses IP dans la sortie de débogage (par défaut : 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informations</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>L'initialisation du test de cohérence a échoué. Bitcoin est en cours de fermeture. </translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Montant invalide pour -minrelayfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Montant invalide pour -mintxfee=&lt;montant&gt; : « %s »</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s » (doit être au moins %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Masque réseau invalide spécifié dans -whitelist : « %s »</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Garder au plus &lt;n&gt; blocs non connectables en mémoire (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
         <translation>Limiter la taille du cache des signatures à &lt;n&gt; entrées (par défaut : 50000)</translation>
@@ -3103,11 +3244,19 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tampon maximal d&apos;envoi par « -connection », &lt;n&gt;*1 000 octets (par défaut : 1 000)</translation>
+        <translation>Tampon maximal d'envoi par « -connection », &lt;n&gt;*1 000 octets (par défaut : 1 000)</translation>
+    </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Un port doit être spécifié avec -whitebind : « %s »</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Options de relais du nœud :</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>N&apos;accepter que la chaîne de blocs correspondant aux points de vérification internes (par défaut : 1)</translation>
+        <translation>N'accepter que la chaîne de blocs correspondant aux points de vérification internes (par défaut : 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
@@ -3115,11 +3264,11 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation>Imprimer le bloc au démarrage s&apos;il est trouvé dans l&apos;index des blocs</translation>
+        <translation>Imprimer le bloc au démarrage s'il est trouvé dans l'index des blocs</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimer l&apos;arborescence des blocs au démarrage (par défaut : 0)</translation>
+        <translation>Imprimer l'arborescence des blocs au démarrage (par défaut : 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3138,16 +3287,16 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Exécuter un exétron pour purger le portefeuille périodiquement (par défaut : 1) </translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Relayer et miner les transactions du porteur de données (par défaut : 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Options SSL : (voir le Wiki de Bitcoin pour les instructions de configuration du SSL)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Relayer les multisig non-P2SH (par défaut : 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Envoyer une commande à Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Exécuter un exétron pour purger le portefeuille périodiquement (par défaut : 1) </translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3159,19 +3308,15 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Définit le drapeau DB_PRIVATE dans l&apos;environnement de la base de données du portefeuille (par défaut : 1)</translation>
+        <translation>Définit le drapeau DB_PRIVATE dans l'environnement de la base de données du portefeuille (par défaut : 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Montrer toutes les options de débogage (utilisation : --help --help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Afficher les infos du test de performance (par défaut : 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n&apos;est pas présent)</translation>
+        <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n'est pas présent)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
@@ -3179,16 +3324,16 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Spécifier le délai d&apos;expiration de la connexion en millisecondes (par défaut : 5 000)</translation>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Démarrer le démon Bitcoin Core</translation>
+        <translation>Spécifier le délai d'expiration de la connexion en millisecondes (par défaut : 5 000)</translation>
     </message>
     <message>
         <source>System error: </source>
         <translation>Erreur système :</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Ceci est un logiciel expérimental.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Montant de la transaction trop bas</translation>
@@ -3201,17 +3346,25 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Transaction too large</source>
         <translation>Transaction trop volumineuse</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Impossible de se lier à %s sur cet ordinateur (bind a retourné l'erreur %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utiliser l&apos;UPnP pour rediriger le port d&apos;écoute (par défaut : 0)</translation>
+        <translation>Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 0)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Utiliser l&apos;UPnP pour rediriger le port d&apos;écoute (par défaut : 1 lors de l&apos;écoute)</translation>
+        <translation>Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 1 lors de l'écoute)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation>Nom d&apos;utilisateur pour les connexions JSON-RPC</translation>
+        <translation>Nom d'utilisateur pour les connexions JSON-RPC</translation>
+    </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Le portefeuille avait besoin d'être réécrit : veuillez redémarrer Bitcoin Core pour terminer</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -3221,6 +3374,14 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Avertissement : cette version est obsolète, une mise à niveau est nécessaire !</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Avertissement : l'argument -benchmark non pris en charge a été ignoré, utiliser -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Avertissement : l'argument -debugnet non pris en charge a été ignoré, utiliser -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Supprimer toutes les transactions du portefeuille...</translation>
@@ -3229,10 +3390,6 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>on startup</source>
         <translation>au démarrage</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>version</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompu, la récupération a échoué</translation>
@@ -3241,14 +3398,6 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Password for JSON-RPC connections</source>
         <translation>Mot de passe pour les connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Autoriser les connexions JSON-RPC depuis l&apos;adresse IP spécifiée</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Envoyer des commandes au nœud fonctionnant sur &lt;ip&gt; (par défaut : 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Exécuter la commande lorsque le meilleur bloc change (%s dans cmd est remplacé par le hachage du bloc)</translation>
@@ -3279,11 +3428,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>This help message</source>
-        <translation>Ce message d&apos;aide</translation>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Impossible de se lier à %s sur cet ordinateur (bind a retourné l&apos;erreur %d, %s)</translation>
+        <translation>Ce message d'aide</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
@@ -3297,40 +3442,28 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erreur lors du chargement de wallet.dat : portefeuille corrompu</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Erreur lors du chargement de wallet.dat : le portefeuille exige une version plus récente de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Le portefeuille devait être réécrit : redémarrer Bitcoin pour terminer l&apos;opération.</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erreur lors du chargement de wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <source>Invalid -proxy address: '%s'</source>
         <translation>Adresse -proxy invalide : « %s »</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
+        <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Réseau inconnu spécifié sur -onlynet : « %s »</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Version inconnue de serveur mandataire -socks demandée : %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Impossible de résoudre l'adresse -bind : « %s »</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Impossible de résoudre l&apos;adresse -bind : « %s »</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Impossible de résoudre l'adresse -externalip : « %s »</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Impossible de résoudre l&apos;adresse -externalip : « %s »</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
@@ -3359,7 +3492,7 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation>Impossible d&apos;écrire l&apos;adresse par défaut</translation>
+        <translation>Impossible d'écrire l'adresse par défaut</translation>
     </message>
     <message>
         <source>Rescanning...</source>
@@ -3371,19 +3504,11 @@ par exemple : alertnotify=echo %%s | mail -s &quot;Alerte Bitcoin&quot; admin@fo
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation>Pour utiliser l&apos;option %s</translation>
+        <translation>Pour utiliser l'option %s</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Vous devez ajouter la ligne rpcpassword=&lt;mot-de-passe&gt; au fichier de configuration :
-%s
-Si le fichier n&apos;existe pas, créez-le avec les droits de lecture seule accordés au propriétaire.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index ff22c2fd1c69..56be717a8d14 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -1,140 +1,27 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr_CA" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Ce logiciel est en phase expérimentale.
-
-Distribué sous licence MIT/X11, voir le fichier COPYING ou http://www.opensource.org/licenses/mit-license.php.
-
-Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL (http://www.openssl.org/), un logiciel cryptographique écrit par Eric Young (eay@cryptsoft.com) et un logiciel UPnP écrit par Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="fr_CA" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Double-cliquez afin de modifier l&apos;adress ou l&apos;étiquette</translation>
+        <translation>Double-cliquez afin de modifier l'adress ou l'étiquette</translation>
     </message>
     <message>
         <source>Create a new address</source>
         <translation>Créer une nouvelle adresse</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copier l&apos;adresse surligné a votre presse-papier</translation>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>Copier l'adresse surligné a votre presse-papier</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Supprimer</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Fichier séparé par une virgule (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -152,10 +39,6 @@ Ce produit comprend des logiciels développés par le projet OpenSSL pour être
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Entrer Mot de Passe</translation>
@@ -168,10 +51,6 @@ Ce produit comprend des logiciels développés par le projet OpenSSL pour être
         <source>Repeat new passphrase</source>
         <translation>Répéter Mot de Passe</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Entrer le nouveau mot de passe pour le porte-feuille. Veuillez utiliser un mot de passe de 10 caractères au hasard ou plus, ou, 8 mots ou plus. </translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Encrypter Porte-Feuille</translation>
@@ -188,3186 +67,148 @@ Ce produit comprend des logiciels développés par le projet OpenSSL pour être
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Cette opération nécessite le mot de passe de votre porte-feuille pour le décrypter.</translation>
     </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Addresse</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(pas de record)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Addresse</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Record</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Record</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(pas de record)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(pas de record)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Address</source>
+        <translation>Addresse</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Fichier séparé par une virgule (*.csv)</translation>
     </message>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Record</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Address</source>
+        <translation>Addresse</translation>
     </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Addresse</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pas de record)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletFrame</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletModel</name>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Addresse</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Record</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Record</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pas de record)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pas de record)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Addresse</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Fichier séparé par une virgule (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Record</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Addresse</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index ecf1fa222220..b047bb5a4b8a 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Sobre Bitcoin core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin core&lt;/b&gt; versión</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Isto é software experimental.
-
-Distribuído baixo a licencia de software MIT/X11, véxase o arquivo que acompaña COPYING ou http://www.opensource.org/licenses/mit-license.php.
-
-Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no OpenSSL Toolkit (http://www.openssl.org/) e software criptográfico escrito por Eric Young (eay@cryptsoft.com) e software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Os desarrolladores de Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="gl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>Exporting Failed</source>
         <translation>Exportación falida</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>Repeat new passphrase</source>
         <translation>Repite novo contrasinal</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introduce o novo contrasinal ao moedeiro.&lt;br/&gt;Por favor empregue un contrasinal de &lt;b&gt;10 ou máis caracteres aleatorios&lt;/b&gt;, ou &lt;b&gt;oito ou máis palabras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Encriptar moedeiro</translation>
@@ -271,10 +226,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>&amp;Overview</source>
         <translation>&amp;Vista xeral</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Amosar vista xeral do moedeiro</translation>
@@ -295,10 +246,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>Quit application</source>
         <translation>Saír da aplicación</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Amosar información sobre Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Acerca de &amp;Qt</translation>
@@ -323,18 +270,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Cambiar contrasinal...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importando bloques de disco...</translation>
@@ -451,18 +386,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>Open a bitcoin: URI or payment request</source>
         <translation>Abrir un bitcoin: URI ou solicitude de pago</translation>
     </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexión activa coa rede Bitcoin</numerusform><numerusform>%n conexións activas coa rede Bitcoin</numerusform></translation>
@@ -471,10 +394,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>No block source available...</source>
         <translation>Non hai orixe de bloques dispoñible...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Procesados %1 de %2 bloques (estimados) del historial de transacciones.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Procesados %1 bloques do historial de transacccións.</translation>
@@ -491,14 +410,6 @@ Este produto inclúe software desenvolvido polo OpenSSL Project para o uso no Op
         <source>%n week(s)</source>
         <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 detrás</translation>
@@ -559,10 +470,6 @@ Dirección: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>O moedeiro está &lt;b&gt;encriptado&lt;/b&gt; e actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ocorriu un erro fatal. Bitcoin non pode continuar en condicións de seguridade e pecharáse.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -573,10 +480,6 @@ Dirección: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantidade:</translation>
@@ -597,14 +500,6 @@ Dirección: %4
         <source>Fee:</source>
         <translation>Pago:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change:</source>
         <translation>Cambiar:</translation>
@@ -689,10 +584,6 @@ Dirección: %4
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar cambio</translation>
@@ -713,10 +604,6 @@ Dirección: %4
         <source>medium-high</source>
         <translation>medio-alto</translation>
     </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>low-medium</source>
         <translation>medio-baixo</translation>
@@ -737,14 +624,6 @@ Dirección: %4
         <source>(%1 locked)</source>
         <translation>(%1 bloqueado)</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation>Limpar</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>Si</translation>
@@ -753,50 +632,14 @@ Dirección: %4
         <source>no</source>
         <translation>non</translation>
     </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>As transacción con maior prioridade teñen máis posibilidades de ser incluidas nun bloque</translation>
     </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sen etiqueta)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(change)</source>
         <translation>(cambio)</translation>
@@ -841,12 +684,12 @@ Dirección: %4
         <translation>Modificar dirección para enviar</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>A dirección introducida &quot;%1&quot; xa está no libro de direccións.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>A dirección introducida "%1" xa está no libro de direccións.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>A dirección introducida &apos;%1&apos; non é unha dirección Bitcoin válida.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>A dirección introducida '%1' non é unha dirección Bitcoin válida.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +725,6 @@ Dirección: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Core de Bitcoin</translation>
@@ -894,6 +733,14 @@ Dirección: %4
         <source>version</source>
         <translation>versión</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Sobre Bitcoin core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opcións da liña de comandos</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Emprego:</translation>
@@ -907,17 +754,13 @@ Dirección: %4
         <translation>opcións de UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Fixar idioma, por exemplo &quot;de_DE&quot; (por defecto: locale del sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Fixar idioma, por exemplo "de_DE" (por defecto: locale del sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Comezar minimizado</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Amosar pantalla splash no arranque (por defecto: 1)</translation>
@@ -933,18 +776,6 @@ Dirección: %4
         <source>Welcome</source>
         <translation>Benvido</translation>
     </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Empregar o directorio de datos por defecto</translation>
@@ -954,12 +785,8 @@ Dirección: %4
         <translation>Empregar un directorio de datos personalizado</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Erro: O directorio de datos especificado &quot;%1&quot; non pode ser creado.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Core de Bitcoin</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1023,42 +850,6 @@ Dirección: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Comezar Bitcoin ao facer login no sistema</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Restaurar todas as opcións de cliente ás por defecto</translation>
@@ -1071,30 +862,6 @@ Dirección: %4
         <source>&amp;Network</source>
         <translation>&amp;Rede</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Abrir automáticamente o porto do cliente Bitcoin no router. Esto so funciona se o teu router soporta UPnP e está habilitado.</translation>
@@ -1115,14 +882,6 @@ Dirección: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porto do proxy (exemplo: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Version de SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versión SOCKS del proxy (exemplo: 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Xanela</translation>
@@ -1163,18 +922,6 @@ Dirección: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Escolle a unidade de subdivisión por defecto para amosar na interface e ao enviar moedas.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Se se amosan ou non as direccións Bitcoin na listaxe de transaccións.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Visualizar direccións na listaxe de transaccións</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1187,26 +934,10 @@ Dirección: %4
         <source>default</source>
         <translation>por defecto</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Confirmar opcións de restaurar</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>A dirección de proxy suministrada é inválida.</translation>
@@ -1226,18 +957,10 @@ Dirección: %4
         <source>Wallet</source>
         <translation>Moedeiro</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>O teu balance actualmente dispoñible</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total de transaccións que aínda teñen que ser confirmadas, e non contan todavía dentro do balance gastable</translation>
@@ -1274,8 +997,8 @@ Dirección: %4
         <translation>Manexo de URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Non se pode parsear a URI! Esto pode ser causado por unha dirección Bitcoin inválida ou parámetros da URI malformados.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Dirección de pago %1 inválida</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1285,34 +1008,6 @@ Dirección: %4
         <source>Payment request error</source>
         <translation>Erro na petición de pago</translation>
     </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Refund from %1</source>
         <translation>Devolución dende %1</translation>
@@ -1321,10 +1016,6 @@ Dirección: %4
         <source>Error communicating with %1: %2</source>
         <translation>Erro comunicando con %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Responsa errónea do servidor %1</translation>
@@ -1338,33 +1029,28 @@ Dirección: %4
         <translation>Erro de solicitude de rede</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erro: O directorio de datos especificado &quot;%1&quot; non existe.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Cantidade</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erro: combinación inválida de -regtest e -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduce unha dirección Bitcoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1379,11 +1065,7 @@ Dirección: %4
         <source>Save QR Code</source>
         <translation>Gardar Código QR</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1402,14 +1084,6 @@ Dirección: %4
         <source>&amp;Information</source>
         <translation>&amp;Información</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Usar versión OpenSSL</translation>
@@ -1422,10 +1096,6 @@ Dirección: %4
         <source>Network</source>
         <translation>Rede</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Número de conexións</translation>
@@ -1438,10 +1108,6 @@ Dirección: %4
         <source>Current number of blocks</source>
         <translation>Número actual de bloques</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Bloques totais estimados</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Hora do último bloque</translation>
@@ -1518,19 +1184,7 @@ Dirección: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1553,22 +1207,6 @@ Dirección: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;eutilizar unha dirección para recibir existente (non recomendado)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Limpar todos os campos do formulario</translation>
@@ -1577,38 +1215,14 @@ Dirección: %4
         <source>Clear</source>
         <translation>Limpar</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;Solicitar pago</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Copiar etiqueta</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Copiar cantidade</translation>
@@ -1691,37 +1305,13 @@ Dirección: %4
         <source>(no label)</source>
         <translation>(sen etiqueta)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Moedas Enviadas</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantidade:</translation>
@@ -1742,26 +1332,10 @@ Dirección: %4
         <source>Fee:</source>
         <translation>Pago:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change:</source>
         <translation>Cambiar:</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar a múltiples receptores á vez</translation>
@@ -1822,22 +1396,10 @@ Dirección: %4
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar cambio</translation>
     </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>A dirección de recepción non é válida, por favor compróbea.</translation>
@@ -1858,14 +1420,6 @@ Dirección: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Atopouse dirección duplicada, so se pode enviar a cada dirección unha vez por operación.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Atención:  Enderezo Bitcoin non válido</translation>
@@ -1886,14 +1440,6 @@ Dirección: %4
         <source>added as transaction fee</source>
         <translation>engadido como tarifa de transacción</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>A petición de pago expirou</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Dirección de pago %1 inválida</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1451,6 @@ Dirección: %4
         <source>Pay &amp;To:</source>
         <translation>Pagar &amp;A:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>A dirección á que enviar o pago (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Introduce unha etiqueta para esta dirección para engadila ao teu libro de direccións</translation>
@@ -1941,10 +1483,6 @@ Dirección: %4
         <source>Remove this entry</source>
         <translation>Eliminar esta entrada</translation>
     </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a verified payment request.</source>
         <translation>Esta é unha solicitude de pago verificada</translation>
@@ -1953,10 +1491,6 @@ Dirección: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Introduce unha etiqueta para esta dirección para engadila á listaxe de direccións empregadas</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>Esta é unha solicitude de pago non verificada</translation>
@@ -1972,15 +1506,7 @@ Dirección: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1995,10 +1521,6 @@ Dirección: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Podes asinar mensaxes coas túas direccións para probar que ti as posees. Ten conta de non asinar nada vago, xa que hai ataques de phishing que tentarán que asines coa túa identidade por riba deles. Asina únicamente declaracións totalmente detalladas coas que esteas de acordo.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>A dirección coa que asinar a mensaxe (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escoller dirección previamente empregada</translation>
@@ -2051,10 +1573,6 @@ Dirección: %4
         <source>Enter the signing 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.</source>
         <translation>Introduce a dirección coa que asinar, a mensaxe (asegúrate de copiar exactamente os saltos de liña, espacios, tabulacións, etc.) e a sinatura debaixo para verificar a mensaxe. Ten coidado de non ler máis na sinatura do que hai no mensaxe asinado mesmo, a fin de evitar ser cazado nun ataque de home no medio.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>A dirección coa que foi firmada a mensaxe (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verificar a mensaxe para asegurar que foi asinada coa dirección Bitcoin especificada</translation>
@@ -2068,12 +1586,8 @@ Dirección: %4
         <translation>Restaurar todos os campos de verificación de mensaxe</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduza unha dirección Bitcoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Click en &quot;Asinar Mensaxe&quot; para xerar sinatura</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Click en "Asinar Mensaxe" para xerar sinatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2152,10 +1666,6 @@ Dirección: %4
         <source>Open until %1</source>
         <translation>Aberto ata %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/fóra de liña</translation>
@@ -2172,10 +1682,6 @@ Dirección: %4
         <source>Status</source>
         <translation>Estado</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, propagado a % nodo</numerusform><numerusform>, propagado a % nodos</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -2208,10 +1714,6 @@ Dirección: %4
         <source>Credit</source>
         <translation>Crédito</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>madura nun bloque máis</numerusform><numerusform>madura en %n bloques máis</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>non aceptado</translation>
@@ -2245,8 +1747,8 @@ Dirección: %4
         <translation>Comerciante</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>As moedas xeradas deben madurar %1 bloques antes de que poidan ser gastadas. Cando xeraste este bloque, foi propagado á rede para ser engadido á cadeas de bloques. Se falla ao tentar meterse na cadea, o seu estado cambiará a &quot;non aceptado&quot; e non poderá ser gastado. Esto pode ocorrir ocasionalmente se outro nodo xera un bloque en poucos segundos de diferencia co teu.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>As moedas xeradas deben madurar %1 bloques antes de que poidan ser gastadas. Cando xeraste este bloque, foi propagado á rede para ser engadido á cadeas de bloques. Se falla ao tentar meterse na cadea, o seu estado cambiará a "non aceptado" e non poderá ser gastado. Esto pode ocorrir ocasionalmente se outro nodo xera un bloque en poucos segundos de diferencia co teu.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2276,10 +1778,6 @@ Dirección: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, non foi propagado con éxito todavía</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Abrir para %s bloque máis</numerusform><numerusform>Abrir para %n bloques máis</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>descoñecido</translation>
@@ -2310,14 +1808,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidade</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Abrir para %n bloque máis</numerusform><numerusform>Abrir para %n bloques máis</numerusform></translation>
@@ -2338,22 +1828,6 @@ Dirección: %4
         <source>Generated but not accepted</source>
         <translation>Xerado pero non aceptado</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Recibido con</translation>
@@ -2525,10 +1999,6 @@ Dirección: %4
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantidade</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2012,9 @@ Dirección: %4
         <translation>a</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2066,6 @@ Dirección: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Emprego:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listar comandos</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Obter axuda para un comando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opcións:</translation>
@@ -2645,10 +2106,6 @@ Dirección: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Número de segundos para manter sen reconectar aos pares con mal comportamento (por defecto: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ocorreu un erro mentres se establecía o porto RPC %u para escoitar sobre IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Escoitar conexións JSON-RPC no &lt;porto&gt; (por defecto: 8332 ou testnet: 18332)</translation>
@@ -2657,10 +2114,6 @@ Dirección: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar liña de comandos e comandos JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Executar no fondo como un demo e aceptar comandos</translation>
@@ -2683,7 +2136,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, debes fixar unha rpcpassword no arquivo de configuración:
 %s
@@ -2694,37 +2147,17 @@ rpcpassword=%s
 O nome do usuario e o contrasinal DEBEN NON ser o mesmo.
 Se o arquivo non existe, debes crealo con permisos de so lectura para o propietario.
 Tamén é recomendable fixar alertnotify de modo que recibas notificación dos problemas;
-por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifradores aceptables (por defecto: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ocorreu un erro mentres se establecía o porto RPC %u para escoitar sobre IPv6, voltando a IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Enlazar a unha dirección dada e escoitar sempre nela. Emprega a notación [host]:post para IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entra en modo de test de regresión, que emprega unha cadea especial na que os bloques poden ser resoltos instantáneamente. Esto está pensado para ferramentes de testing de regresión e desenvolvemento de aplicacións.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Erro: A transacción foi rexeitada! Esto podería suceder se unha das moedas do teu moedeiro xa foi gastada, como se usas unha copia de wallet.dat e hai moedas que se gastaron na copia pero non foron marcadas como gastadas aquí.</translation>
@@ -2737,50 +2170,14 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando cando unha transacción do moedeiro cambia (%s no comando é substituído por TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta é unha build de test pre-lanzamento - emprégaa baixo o teu propio risco - non empregar para minado ou aplicacións de comerciantes</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Precaución: -paytxfee está posto moi algo! Esta é a tarifa de transacción que ti pagarás se envías unha transacción.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Precaución; Por favor revisa que a data e hora do teu ordenador son correctas! Se o teu reloxo está equivocato Bitcoin non funcionará adecuadamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Precaución: A rede non parece estar totalmente de acordo! Algúns mineitos parecen estar experimentando problemas.</translation>
@@ -2797,14 +2194,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Precaución: wallet.dat corrupto, datos salvagardados! O wallet.dat orixinal foi gardado como wallet.{timestamp}.bak en %s; se o teu balance ou transaccións son incorrectas deberías restauralas dende unha copia de seguridade.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;categoría&gt; pode ser:</translation>
@@ -2813,54 +2202,22 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tentar recuperar claves privadas dende un wallet.dat corrupto</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opcións de creación de bloque:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conectar so ao(s) nodo(s) especificado(s)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Conectar a JSON-RPC no &lt;porto&gt; (por defecto: 8332 ou testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Detectada base de datos de bloques corrupta.</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobrir dirección IP propia (por defecto: 1 se á escoita e non -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Queres reconstruír a base de datos de bloques agora?</translation>
@@ -2937,22 +2294,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Fallou a escritura dos datos para desfacer</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Atopar pares usando lookup DNS (por defecto: 1 agás -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Xerar moedas (por defecto: 0)</translation>
@@ -2961,50 +2302,22 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Cantos bloques para chequear ao arrancar (por defecto: 288, 0 = todos)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloque genesis incorrecto o no existente. Datadir erróneo para a rede?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Dirección -onion inválida: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Dirección -onion inválida: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Non hai suficientes descritores de arquivo dispoñibles.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruír índice de cadea de bloque dende os ficheiros actuais blk000??.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Fixar o número de fíos para as chamadas aos servicios RPC (por defecto: 4)</translation>
@@ -3013,18 +2326,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar arquivo do moedeiro (dentro do directorio de datos)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Emprego (desaconsellado, usar bitcoin-cli)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificando bloques...</translation>
@@ -3033,22 +2334,10 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Verificando moedeiro...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>O moedeiro %s reside fóra do directorio de datos %s</translation>
     </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Precisas reconstruír a base de datos empregando -reindex para cambiar -txindex</translation>
@@ -3057,41 +2346,21 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa bloques dende arquivos blk000??.dat externos</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executar comando cando se recibe unha alerta relevante ou vemos un fork realmente longo (%s no cmd é substituído pola mensaxe)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Información</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidade inválida para -minrelaytxfee=&lt;cantidade&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidade inválida para -mintxfee=&lt;cantidade&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidade inválida para -minrelaytxfee=&lt;cantidade&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidade inválida para -mintxfee=&lt;cantidade&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3113,42 +2382,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Conectar so a nodos na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opcións SSL: (ver ńa Wiki Bitcoin as instrucción de configuración de SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar traza/información de depuración á consola en lugar de ao arquivo debug.log</translation>
@@ -3157,18 +2390,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Fixar tamaño mínimo de bloque en bytes (por defecto: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Recortar o arquivo debug.log ao arrancar o cliente (por defecto: 1 cando no-debug)</translation>
@@ -3181,10 +2402,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especificar tempo límite da conexión en milisegundos (por defecto: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Erro do sistema:</translation>
@@ -3221,18 +2438,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Precaución: Esta versión é obsoleta, precísase unha actualización!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versión</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupto, fallou o gardado</translation>
@@ -3241,14 +2446,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Contrasinal para conexións JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir conexións JSON-RPC dende direccións IP especificadas</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comandos a nodo executando na &lt;ip&gt; (por defecto: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Executar comando cando o mellor bloque cambie (%s no comando é sustituído polo hash do bloque)</translation>
@@ -3281,10 +2478,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Esta mensaxe de axuda</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Imposible enlazar con %s neste ordenador (enlace devolveu erro %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir lookup de DNS para -addnote, -seednote e -connect</translation>
@@ -3297,41 +2490,29 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erro cargando wallet.dat: Moedeiro corrupto</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Erro cargando wallet.dat: O moedeiro precisa unha versión máis nova de Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Precísase rescribir o moedeiro: reinicie Bitcoin para completar</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erro cargando wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Dirección -proxy inválida: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Rede descoñecida especificada en -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Dirección -proxy inválida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versión solicitada de proxy -socks descoñecida: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Rede descoñecida especificada en -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Non se pode resolver a dirección -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Non se pode resolver a dirección -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Non se pode resolver dirección -externalip: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Non se pode resolver dirección -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Cantidade inválida para -paytxfee=&lt;cantidade&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Cantidade inválida para -paytxfee=&lt;cantidade&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +2558,5 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Debes fixar rpcpassword=&lt;contrasinal&gt; no arquivo de configuración:
-%s
-Se o arquivo non existe, debes crealo con permisos de so lectura para o propietario.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_gu_IN.ts b/src/qt/locale/bitcoin_gu_IN.ts
index ed4a9265e4bc..b7b091aa39c0 100644
--- a/src/qt/locale/bitcoin_gu_IN.ts
+++ b/src/qt/locale/bitcoin_gu_IN.ts
@@ -1,3368 +1,110 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="gu_IN" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index ae13df452435..ae96d9f57073 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="he" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>על אודות ליבת ביטקוין</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;קליינט ביטקוין&lt;/b&gt; גירסאת</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-זוהי תוכנה ניסיונית.
-
-מופצת תחת רישיון התוכנה MIT/X11, ראה את הקובץ המצורף COPYING או http://www.opensource.org/licenses/mit-license.php.
-
-המוצר הזה כולל תוכנה שפותחה ע&quot;י פרויקט OpenSSL לשימוש בתיבת הכלים OpenSSL (http://www.openssl.org/) ותוכנה קריפטוגרפית שנכתבה ע&quot;י אריק יאנג (eay@cryptsoft.com) ותוכנת UPnP שנכתבה ע&quot;י תומס ברנרד.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>זכויות יוצרים</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="he" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>הייצוא נכשל</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>חזור על הסיסמה החדשה</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>הכנס את הסיסמה החדשה לארנק. &lt;br/&gt;אנא השתמש בסיסמה המכילה &lt;b&gt;10 תוים אקראיים או יותר&lt;/b&gt;, או &lt;b&gt;שמונה מילים או יותר&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>הצפן ארנק</translation>
@@ -271,10 +226,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;סקירה</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>הצג סקירה כללית של הארנק</translation>
@@ -295,10 +246,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>סגור תוכנה</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>הצג מידע על ביטקוין</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>אודות Qt</translation>
@@ -323,18 +270,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>שנה סיסמא</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>מייבא בלוקים מהדיסק...</translation>
@@ -449,32 +384,12 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>תוכנת ביטקוין</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>חיבור פעיל אחד לרשת הביטקוין</numerusform><numerusform>%n חיבורים פעילים לרשת הביטקוין</numerusform></translation>
+        <translation>פתח ביטקוין: URI או בקשת תשלום</translation>
     </message>
     <message>
         <source>No block source available...</source>
         <translation>אין קוד נתון</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 מתוך %2 (משוער) בלוקים של הסטוריית פעולות עובדו.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>הושלם עיבוד של %1 בלוקים של היסטוריית פעולות.</translation>
@@ -491,18 +406,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n week(s)</source>
         <translation><numerusform>%n שבוע</numerusform><numerusform>%n שבועות</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation>1% מאחור</translation>
-    </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
         <translation>הבלוק האחרון שהתקבל נוצר לפני %1</translation>
@@ -558,10 +461,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; וכרגע &lt;b&gt;נעול&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>שגיאה סופנית אירעה. ביטקוין אינו יכול להמשיך לפעול בבטחה ולכן ייסגר.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -574,7 +473,7 @@ Address: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>בחירת כתובת שליטת מטבעות</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -596,10 +495,6 @@ Address: %4
         <source>Fee:</source>
         <translation>תשלום:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>לאחר עמלה:</translation>
@@ -662,11 +557,11 @@ Address: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>נעל יתרה</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>פתח יתרה</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -688,10 +583,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>העתק קדימות</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>העתק עודף</translation>
@@ -732,18 +623,6 @@ Address: %4
         <source>lowest</source>
         <translation>הכי נמוך</translation>
     </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation>אבק</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>כן</translation>
@@ -768,26 +647,6 @@ Address: %4
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>העברות עם עדיפות גבוהה, יותר סיכוי שיכנסו לתוך הבלוק</translation>
     </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>התווית הזו הופכת לאדומה, אם אחד מהנמענים מקבל סכום אשר קטן מ 1%</translation>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>זה אומר שצריך לפחות 1% עמלה</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ללא תוית)</translation>
@@ -840,12 +699,12 @@ Address: %4
         <translation>ערוך כתובת לשליחה</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>הכתובת שהכנסת &quot;%1&quot; כבר נמצאת בפנקס הכתובות.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>הכתובת שהכנסת "%1" כבר נמצאת בפנקס הכתובות.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>הכתובת שהוכנסה &quot;%1&quot; אינה כתובת ביטקוין תקינה.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>הכתובת שהוכנסה "%1" אינה כתובת ביטקוין תקינה.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -881,10 +740,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>ליבת ביטקוין</translation>
@@ -893,6 +748,14 @@ Address: %4
         <source>version</source>
         <translation>גרסה</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>על אודות ליבת ביטקוין</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>אפשרויות שורת פקודה</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>שימוש:</translation>
@@ -906,26 +769,18 @@ Address: %4
         <translation>אפשרויות ממשק</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>קבע שפה, למשל &quot;he_il&quot; (ברירת מחדל: שפת המערכת)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>קבע שפה, למשל "he_il" (ברירת מחדל: שפת המערכת)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>התחל ממוזער</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>הצג מסך פתיחה בעת הפעלה (ברירת מחדל: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -953,12 +808,8 @@ Address: %4
         <translation>השתמש בספריית מידע מותאמת אישית:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>ביטקוין</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>שגיאה: אי אפשר ליצור את התיקיה &quot;%1&quot;</translation>
+        <source>Bitcoin Core</source>
+        <translation>ליבת ביטקוין</translation>
     </message>
     <message>
         <source>Error</source>
@@ -966,11 +817,11 @@ Address: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation>ג&quot;ב של שטח אחסון פנוי</translation>
+        <translation>ג"ב של שטח אחסון פנוי</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation>(מתוך %1 ג&quot;ב נחוצים)</translation>
+        <translation>(מתוך %1 ג"ב נחוצים)</translation>
     </message>
 </context>
 <context>
@@ -981,7 +832,7 @@ Address: %4
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>פתח בקשת תשלום מ-URI או קובץ</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -1022,42 +873,10 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>התחל את ביטקוין בעת התחברות למערכת</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>מגה בייט</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>אפס כל אפשרויות התוכנה לברירת המחדל.</translation>
@@ -1070,33 +889,9 @@ Address: %4
         <source>&amp;Network</source>
         <translation>רשת</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>פתח את פורט ביטקוין בנתב באופן אוטומטי. עובד רק אם UPnP מאופשר ונתמך ע&quot;י הנתב.</translation>
+        <translation>פתח את פורט ביטקוין בנתב באופן אוטומטי. עובד רק אם UPnP מאופשר ונתמך ע"י הנתב.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
@@ -1114,14 +909,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>הפורט של הפרוקסי (למשל 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>גרסת SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>גרסת SOCKS של הפרוקסי (למשל 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>חלון</translation>
@@ -1162,17 +949,9 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>בחר את ברירת המחדל ליחידת החלוקה אשר תוצג בממשק ובעת שליחת מטבעות.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>האם להציג כתובות ביטקוין ברשימת הפעולות או לא.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>הצג כתובות ברשימת הפעולות</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>הצג תכונות שליטת מטבע או לא.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1186,26 +965,10 @@ Address: %4
         <source>default</source>
         <translation>ברירת מחדל</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>אשר את איפוס האפשרויות</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>כתובת הפרוקסי שסופקה אינה תקינה.</translation>
@@ -1225,18 +988,10 @@ Address: %4
         <source>Wallet</source>
         <translation>ארנק</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>היתרה הזמינה הנוכחית</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>הסכום הכולל של פעולות שטרם אושרו, ועוד אינן נספרות בחישוב היתרה הזמינה</translation>
@@ -1273,8 +1028,8 @@ Address: %4
         <translation>תפעול URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>לא ניתן לנתח URI! זה יכול להיגרם כתוצאה מכתובת ביטקוין לא תקינה או פרמטרי URI חסרי צורה תקינה.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>כתובת תשלום שגויה %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1288,26 +1043,6 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>לא ניתן להתחיל את ביטקוין: מפעיל לחץ-לתשלום </translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>בקשות לתשלום לסקריפטיי תשלום מותאמים אישית אינן נתמכות.</translation>
@@ -1320,10 +1055,6 @@ Address: %4
         <source>Error communicating with %1: %2</source>
         <translation>שגיאה בתקשורת עם %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>מענה שגוי משרת %1</translation>
@@ -1337,33 +1068,24 @@ Address: %4
         <translation>שגיאת בקשת שרת</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>ביטקוין</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>שגיאה: הספריה &quot;%1&quot; לא קיימת.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>שגיאה: שילוב בלתי חוקי של regtest- ו testnet-.</translation>
+        <source>Amount</source>
+        <translation>כמות</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 שעות</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>הכנס כתובת ביטקוין (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1437,10 +1159,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>מספר הבלוקים הנוכחי</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>מספר כולל משוער של בלוקים</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>זמן הבלוק האחרון</translation>
@@ -1515,21 +1233,9 @@ Address: %4
     </message>
     <message>
         <source>%1 GB</source>
-        <translation>%1 ג&apos;יגה בייט</translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation>1% דקות</translation>
+        <translation>%1 ג'יגה בייט</translation>
     </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 שעות</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 שעות %2 דקות</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1552,22 +1258,6 @@ Address: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>ש&amp;ימוש חוזר בכתובת קבלה קיימת(לא מומלץ)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>נקה את כל השדות</translation>
@@ -1576,17 +1266,13 @@ Address: %4
         <source>Clear</source>
         <translation>נקה</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;בקש תשלום</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>הצג בקשות נבחרות (דומה ללחיצה כפולה על רשומה)</translation>
     </message>
     <message>
         <source>Show</source>
@@ -1594,7 +1280,7 @@ Address: %4
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>הסר הרשומות הנבחרות מהרשימה</translation>
     </message>
     <message>
         <source>Remove</source>
@@ -1604,10 +1290,6 @@ Address: %4
         <source>Copy label</source>
         <translation>העתק תוית</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>העתק כמות</translation>
@@ -1694,11 +1376,7 @@ Address: %4
         <source>(no message)</source>
         <translation>(אין הודעות)</translation>
     </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -1741,10 +1419,6 @@ Address: %4
         <source>Fee:</source>
         <translation>תשלום:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>לאחר עמלה:</translation>
@@ -1753,10 +1427,6 @@ Address: %4
         <source>Change:</source>
         <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 type="unfinished"/>
-    </message>
     <message>
         <source>Custom change address</source>
         <translation>כתובת לעודף מותאמת אישית</translation>
@@ -1821,18 +1491,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>העתק קדימות</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>העתק עודף</translation>
     </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>or</source>
         <translation>או</translation>
@@ -1861,22 +1523,10 @@ Address: %4
         <source>Transaction creation failed!</source>
         <translation>יצירת הפעולה נכשלה!</translation>
     </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ללא תוית)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>האם אכן לשלוח?</translation>
@@ -1885,14 +1535,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>הוסף מחיר טיפול</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>תוקף בקשת תשלום פג</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>כתובת תשלום שגויה %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1904,10 +1546,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>שלם &amp;ל:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>הכתובת שאליה ישלח התשלום (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>הכנס תוית לכתובת הזאת כדי להכניס לפנקס הכתובות</translation>
@@ -1936,10 +1574,6 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>הודעה:</translation>
@@ -1952,10 +1586,6 @@ Address: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>הקלד תווית עבור כתובת זו בכדי להוסיף אותה לרשימת הכתובות בשימוש</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>זוהי בקשת תשלום בלתי־מאומתת.</translation>
@@ -1971,10 +1601,6 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>אין לכבות את המחשב עד שחלון זה נעלם.</translation>
@@ -1994,10 +1620,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>אתה יכול לחתום על הודעות עם הכתובות שלך כדי להוכיח שהן בבעלותך. היזהר לא לחתום על משהו מעורפל, שכן התקפות פישינג עשויות לגרום לך בעורמה למסור את זהותך. חתום רק על אמרות מפורטות לחלוטין שאתה מסכים עימן.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>הכתובת איתה לחתום על ההודעה (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>בחר כתובת שהייתה בשימוש</translation>
@@ -2048,11 +1670,7 @@ Address: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>הכנס למטה את הכתובת החותמת, ההודעה (ודא שאתה מעתיק מעברי שורה, רווחים, טאבים וכו&apos; באופן מדויק) והחתימה כדי לאמת את ההודעה. היזהר לא לפרש את החתימה כיותר ממה שמופיע בהודעה החתומה בעצמה, כדי להימנע מליפול קורבן למתקפת איש-באמצע.</translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>הכתובת איתה ההודעה נחתמה (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>הכנס למטה את הכתובת החותמת, ההודעה (ודא שאתה מעתיק מעברי שורה, רווחים, טאבים וכו' באופן מדויק) והחתימה כדי לאמת את ההודעה. היזהר לא לפרש את החתימה כיותר ממה שמופיע בהודעה החתומה בעצמה, כדי להימנע מליפול קורבן למתקפת איש-באמצע.</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2067,12 +1685,8 @@ Address: %4
         <translation>אפס את כל שדות אימות הודעה</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>הכנס כתובת ביטקוין (למשל 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>לחץ &quot;חתום על ההודעה&quot; כדי לחולל חתימה</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>לחץ "חתום על ההודעה" כדי לחולל חתימה</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2129,10 +1743,6 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>ליבת ביטקוין</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[רשת-בדיקה]</translation>
@@ -2151,10 +1761,6 @@ Address: %4
         <source>Open until %1</source>
         <translation>פתוח עד %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/מנותק</translation>
@@ -2171,10 +1777,6 @@ Address: %4
         <source>Status</source>
         <translation>מצב</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, הופץ דרך צומת אחד</numerusform><numerusform>, הופץ דרך %n צמתים</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>תאריך</translation>
@@ -2207,10 +1809,6 @@ Address: %4
         <source>Credit</source>
         <translation>זיכוי</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>מבשיל בעוד בלוק אחד</numerusform><numerusform>מבשיל בעוד %n בלוקים</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>לא התקבל</translation>
@@ -2244,8 +1842,8 @@ Address: %4
         <translation>סוחר</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>מטבעות חדשים שנוצרו חייבים להבשיל במשך %1 בלוקים לפני שניתן לנצל אותם. כשבלוק זה נוצר הוא שודר ברשת על מנת שייכנס לשרשרת הבלוקים. במקרה והוא לא ייכנס לשרשרת, מצבו ישתנה ל&quot;לא התקבל&quot; ולא ניתן יהיה לנצלו. זה יכול לקרות מדי פעם אם במקרה צומת אחרת ייצרה בלוק בהבדל של שניות בודדות ממך.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>מטבעות חדשים שנוצרו חייבים להבשיל במשך %1 בלוקים לפני שניתן לנצל אותם. כשבלוק זה נוצר הוא שודר ברשת על מנת שייכנס לשרשרת הבלוקים. במקרה והוא לא ייכנס לשרשרת, מצבו ישתנה ל"לא התקבל" ולא ניתן יהיה לנצלו. זה יכול לקרות מדי פעם אם במקרה צומת אחרת ייצרה בלוק בהבדל של שניות בודדות ממך.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2309,14 +1907,6 @@ Address: %4
         <source>Address</source>
         <translation>כתובת</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>כמות</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>פתח למשך בלוק %n יותר</numerusform><numerusform>פתח למשך %n בלוקים נוספים</numerusform></translation>
@@ -2337,22 +1927,6 @@ Address: %4
         <source>Generated but not accepted</source>
         <translation>נוצר אך לא התקבל</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>התקבל עם</translation>
@@ -2488,10 +2062,6 @@ Address: %4
         <source>Exporting Failed</source>
         <translation>הייצוא נכשל</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Successful</source>
         <translation>הייצוא בוצע בהצלחה</translation>
@@ -2524,10 +2094,6 @@ Address: %4
         <source>Address</source>
         <translation>כתובת</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>כמות</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>מזהה</translation>
@@ -2541,6 +2107,9 @@ Address: %4
         <translation>אל</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2577,14 +2146,6 @@ Address: %4
         <source>Backup Failed</source>
         <translation>גיבוי נכשל</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>גיבוי הושלם בהצלחה</translation>
@@ -2592,18 +2153,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>שימוש:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>רשימת פקודות</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>קבל עזרה עבור פקודה</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>אפשרויות:</translation>
@@ -2644,10 +2193,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>מספר שניות למנוע מעמיתים הנוהגים שלא כהלכה מלהתחבר מחדש (ברירת מחדל: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>אירעה שגיאה בעת הגדרת פורט RPC %u להאזנה ב-IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>האזן לחיבורי JSON-RPC ב- &lt;port&gt; (ברירת מחדל: 8332 או רשת בדיקה: 18332)</translation>
@@ -2656,10 +2201,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>קבל פקודות משורת הפקודה ו- JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>רוץ ברקע כדימון וקבל פקודות</translation>
@@ -2682,7 +2223,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, עליך לקבוע סיסמת RPC בקובץ הקונפיגורציה:
  %s
@@ -2693,37 +2234,17 @@ rpcpassword=%s
 אסור ששם המשתמש והסיסמא יהיו זהים.
 אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד.
 זה מומלץ לסמן alertnotify כדי לקבל דיווח על תקלות;
-למשל: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com 
+למשל: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com 
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>צפנים קבילים (ברירת מחדל: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>אירעה שגיאה בעת הגדרת פורט RPC %u להאזנה ב-IPv6, נסוג ל-IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>קשור עם כתובת נתונה והאזן לה תמיד. השתמש בסימון [host]:port עבוד IPv6.</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>כניסה למצב בדיקת רגרסיה, בה נעשה שימוש בשרשרת מיוחדת המאפשרת פתרון מיידי של בלוקים. מצב זה מיועד לכלי בדיקת רגרסיה ופיתוח תוכנה.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>שגיאה: הפעולה נדחתה! זה עלול לקרות אם כמה מהמטבעות בארנק שלך כבר נוצלו, למשל אם השתמשת בעותק של wallet.dat ומטבעות נשלחו בעותק אך לא סומנו כמנוצלות כאן.</translation>
@@ -2736,50 +2257,14 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>בצע פקודה כאשר פעולת ארנק משתנה (%s ב cmd יוחלף ב TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>זוהי בניית ניסיון טרום-שחרור - השימוש בה על אחריותך - אין להשתמש לצורך כריה או יישומי מסחר</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>אזהרה: -paytxfee נקבע לערך מאד גבוה! זוהי עמלת הפעולה שתשלם אם אתה שולח פעולה.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>אזהרה: אנא בדוק שהתאריך והשעה של המחשב שלך נכונים! אם השעון שלך אינו נכון ביטקוין לא יעבוד כראוי.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>אזהרה: נראה שלא כל הרשת מסכימה! נראה שישנם כורים אשר נתקלים בבעיות.</translation>
@@ -2796,46 +2281,18 @@ rpcpassword=%s
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>אזהרה: קובץ wallet.dat מושחת, המידע חולץ! קובץ wallet.dat המקורח נשמר כ - wallet.{timestamp}.bak ב - %s; אם המאזן או הפעולות שגויים עליך לשחזר גיבוי.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>נסה לשחזר מפתחות פרטיים מקובץ wallet.dat מושחת.</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>אפשרויות יצירת בלוק:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>התחבר רק לצמתים המצוינים</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>התחבר ל JSON-RPC ב &lt;port&gt; (ברירת מחדל: 8332 או ברשת בדיקה: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>הגדרות חיבור:</translation>
@@ -2844,22 +2301,10 @@ rpcpassword=%s
         <source>Corrupted block database detected</source>
         <translation>התגלה מסד נתוני בלוקים לא תקין</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>גלה את כתובת ה-IP העצמית (ברירת מחדל: 1 כשמאזינים וללא -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>האם תרצה כעט לבנות מחדש את מסד נתוני הבלוקים?</translation>
@@ -2936,22 +2381,6 @@ rpcpassword=%s
         <source>Failed to write undo data</source>
         <translation>כתיבת נתוני ביטול נכשלה</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>עמלה לכל kB להוסיף לפעולות שאתה שולח</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>מצא עמיתים ע&quot;י חיפוש DNS (ברירת מחדל: 1 ללא -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>ייצר מטבעות (ברגיל: 0)</translation>
@@ -2960,50 +2389,22 @@ rpcpassword=%s
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>מספר הבלוקים לבדוק בעת אתחול (ברירת מחדל: 288, 0 = כולם)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>בלוק בראשית הינו שגוי או לא נמצא. ספריית מידע לא נכונה עבור הרשת?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>כתובת onion- שגויה: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>כתובת onion- שגויה: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>אין מספיק מידע על הקובץ</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>בנה מחדש את אינדק שרשרת הבלוקים מקבצי ה-blk000??.dat הנוכחיים.</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>קבע את מספר תהליכוני לשירות קריאות RPC (ברירת מחדל: 4)</translation>
@@ -3012,18 +2413,6 @@ rpcpassword=%s
         <source>Specify wallet file (within data directory)</source>
         <translation>ציין קובץ ארנק (בתוך ספריית המידע)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>שימוש (מיושן, השתמש ב bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>מאמת את שלמות מסד הנתונים...</translation>
@@ -3032,22 +2421,10 @@ rpcpassword=%s
         <source>Verifying wallet...</source>
         <translation>מאמת את יושרת הארנק...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>הארנק %s יושב מחוץ לספריית המידע %s</translation>
     </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>עליך לבנות מחדש את מסד הנתונים תוך שימוש ב- -reindex על מנת לשנות את -txindex</translation>
@@ -3056,41 +2433,21 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>מייבא בלוקים מקובצי blk000??.dat חיצוניים</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>הרץ פקודה כאשר ההתראה הרלוונטית מתקבלת או כשאנחנו עדים לפיצול ארוך מאוד (%s בשורת הפקודה יוחלף ע&quot;י ההודעה)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>הרץ פקודה כאשר ההתראה הרלוונטית מתקבלת או כשאנחנו עדים לפיצול ארוך מאוד (%s בשורת הפקודה יוחלף ע"י ההודעה)</translation>
     </message>
     <message>
         <source>Information</source>
         <translation>מידע</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3112,42 +2469,10 @@ rpcpassword=%s
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>התחבר רק לצמתים ברשת &lt;net&gt; (IPv4, IPv6 או Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>RPC server options:</source>
         <translation>הגדרות שרת RPC</translation>
     </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>אפשרויות SSL: (ראה את הויקי של ביטקוין עבור הוראות הגדרת SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>שלח מידע דיבאג ועקבה לקונסולה במקום לקובץ debug.log</translation>
@@ -3156,18 +2481,6 @@ rpcpassword=%s
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>קבע את גודל הבלוק המינימלי בבתים (ברירת מחדל: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>כווץ את קובץ debug.log בהפעלת הקליינט (ברירת מחדל: 1 ללא -debug)</translation>
@@ -3180,10 +2493,6 @@ rpcpassword=%s
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>ציין הגבלת זמן לחיבור במילישניות (ברירת מחדל: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>שגיאת מערכת:</translation>
@@ -3220,18 +2529,10 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>אזהרה: הגרסה הזאת מיושנת, יש צורך בשדרוג!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>on startup</source>
         <translation>בפתיחה</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>גרסה</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>קובץ wallet.dat מושחת, החילוץ נכשל</translation>
@@ -3240,14 +2541,6 @@ rpcpassword=%s
         <source>Password for JSON-RPC connections</source>
         <translation>סיסמה לחיבורי JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>אפשר חיבורי JSON-RPC מכתובת האינטרנט המצוינת</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>שלח פקודות לצומת ב-&lt;ip&gt; (ברירת מחדל: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>בצע פקודה זו כשהבלוק הטוב ביותר משתנה (%s בפקודה יוחלף בגיבוב הבלוק)</translation>
@@ -3280,10 +2573,6 @@ rpcpassword=%s
         <source>This help message</source>
         <translation>הודעת העזרה הזו</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>לא מסוגל לקשור ל-%s במחשב זה (הקשירה החזירה שגיאה %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>אפשר בדיקת DNS עבור -addnode, -seednode ו- -connect</translation>
@@ -3296,41 +2585,29 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>שגיאה בטעינת הקובץ wallet.dat: הארנק מושחת</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>שגיאה בטעינת הקובץ wallet.dat: הארנק דורש גרסה חדשה יותר של ביטקוין</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>יש לכתוב מחדש את הארנק: אתחל את ביטקוין לסיום</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>שגיאה בטעינת הקובץ wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>כתובת -proxy לא תקינה: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>כתובת -proxy לא תקינה: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>רשת לא ידועה צוינה ב- -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>רשת לא ידועה צוינה ב- -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>התבקשה גרסת פרוקסי -socks לא ידועה: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>לא מסוגל לפתור כתובת -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>לא מסוגל לפתור כתובת -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>לא מסוגל לפתור כתובת -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>לא מסוגל לפתור כתובת -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +2653,5 @@ rpcpassword=%s
         <source>Error</source>
         <translation>שגיאה</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>עליך לקבוע rpcpassword=yourpassword בקובץ ההגדרות:
-%s
-אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index 3ccac8899e85..28778a0258f0 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hi_IN" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>कापीराइट</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="hi_IN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,70 +9,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>नया पता लिखिए !</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>चुनिन्दा पते को सिस्टम क्लिपबोर्ड पर कापी करे !</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;पता कॉपी करे</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;मिटाए !!</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>&amp;लेबल कॉपी करे </translation>
@@ -113,23 +29,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Edit</source>
         <translation>&amp;एडिट</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma separated file (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>पहचान शब्द/अक्षर डालिए !</translation>
@@ -163,10 +63,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>दोबारा नया पहचान शब्द/अक्षर डालिए !</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>नया पहचान शब्द/अक्षर वॉलेट मे डालिए ! &lt;br/&gt; कृपा करके पहचान शब्द में &lt;br&gt; 10 से ज़्यादा अक्षॉरों का इस्तेमाल करे &lt;/b&gt;,या &lt;b&gt;आठ या उससे से ज़्यादा शब्दो का इस्तेमाल करे&lt;/b&gt; !</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>एनक्रिप्ट वॉलेट !</translation>
@@ -199,30 +95,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>वॉलेट एनक्रिपशन को प्रमाणित कीजिए !</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>वॉलेट एनक्रिप्ट हो गया !</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>वॉलेट एनक्रिप्ट नही हुआ!</translation>
@@ -247,17 +123,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>वॉलेट का डीक्रिप्ट-ष्ण असफल !</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>नेटवर्क से समकालिक (मिल) रहा है ...</translation>
@@ -266,10 +134,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;विवरण</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>वॉलेट का सामानया विवरण दिखाए !</translation>
@@ -291,82 +155,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>अप्लिकेशन से बाहर निकलना !</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>बीटकोइन के बारे में जानकारी !</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>&amp;विकल्प</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;बैकप वॉलेट</translation>
     </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>पहचान शब्द/अक्षर जो वॉलेट एनक्रिपशन के लिए इस्तेमाल किया है उसे बदलिए!</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>बीटकोइन</translation>
@@ -375,34 +175,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet</source>
         <translation>वॉलेट</translation>
     </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;फाइल</translation>
@@ -423,58 +195,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[टेस्टनेट]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n सक्रिया संपर्क बीटकोइन नेटवर्क से</numerusform><numerusform>%n सक्रिया संपर्क बीटकोइन नेटवर्क से</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n घंटा</numerusform><numerusform>%n घंटे</numerusform></translation>
@@ -487,26 +211,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n week(s)</source>
         <translation><numerusform>%n हफ़्ता</numerusform><numerusform>%n हफ्ते</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 पीछे</translation>
     </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>भूल</translation>
@@ -523,10 +231,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Up to date</source>
         <translation>नवीनतम</translation>
     </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sent transaction</source>
         <translation>भेजी ट्रांजक्शन</translation>
@@ -554,68 +258,16 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड है</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>राशि :</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>राशि</translation>
@@ -628,18 +280,10 @@ Address: %4
         <source>Date</source>
         <translation>taareek</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>पक्का</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>पता कॉपी करे</translation>
@@ -653,1870 +297,157 @@ Address: %4
         <translation>कॉपी राशि</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(कोई लेबल नही !)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>पता एडिट करना</translation>
     </message>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;लेबल</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;पता</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>नया स्वीकार्य पता</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>नया भेजने वाला पता</translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>एडिट स्वीकार्य पता </translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>एडिट भेजने वाला पता</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>डाला गया पता "%1" एड्रेस बुक में पहले से ही मोजूद है|</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>वॉलेट को unlock नहीं किया जा सकता|</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>नयी कुंजी का निर्माण असफल रहा|</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>version</source>
+        <translation>संस्करण</translation>
     </message>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>खपत :</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>भूल</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>विकल्प</translation>
     </message>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>&amp;OK</source>
+        <translation>&amp;ओके</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>&amp;Cancel</source>
+        <translation>&amp;कैन्सल</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>फार्म</translation>
     </message>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>Wallet</source>
+        <translation>वॉलेट</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;हाल का लेन-देन&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>none</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>राशि</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>लागू नही
+</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>लागू नही
+</translation>
     </message>
     <message>
-        <source>no</source>
-        <translation type="unfinished"/>
+        <source>&amp;Information</source>
+        <translation>जानकारी</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>लेबल:</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(कोई लेबल नही !)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>पता एडिट करना</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;लेबल</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;पता</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>नया स्वीकार्य पता</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>नया भेजने वाला पता</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>एडिट स्वीकार्य पता </translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>एडिट भेजने वाला पता</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>डाला गया पता &quot;%1&quot; एड्रेस बुक में पहले से ही मोजूद है|</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>वॉलेट को unlock नहीं किया जा सकता|</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>नयी कुंजी का निर्माण असफल रहा|</translation>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>संस्करण</translation>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>खपत :</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>बीटकोइन</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>विकल्प</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation>&amp;ओके</translation>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation>&amp;कैन्सल</translation>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>फार्म</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation>वॉलेट</translation>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;हाल का लेन-देन&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>बीटकोइन</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin एड्रेस लिखें (उदाहरण: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation>लागू नही
-</translation>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>लेबल:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>लेबल कॉपी करे </translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>कॉपी राशि</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>पता</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>राशि</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>लेबल</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>taareek</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>लेबल</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>राशि</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(कोई लेबल नही !)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>सिक्के भेजें|</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>राशि :</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>एक साथ कई प्राप्तकर्ताओं को भेजें</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>बाकी रकम :</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>भेजने की पुष्टि करें</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>सिक्के भेजने की पुष्टि करें</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>कॉपी राशि</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>भेजा गया अमाउंट शुन्य से अधिक होना चाहिए|</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(कोई लेबल नही !)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>अमाउंट:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>प्राप्तकर्ता:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>आपकी एड्रेस बुक में इस एड्रेस के लिए एक लेबल लिखें</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>लेबल:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt-A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Clipboard से एड्रेस paste करें</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt-P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt-A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Clipboard से एड्रेस paste करें</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt-P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation>हस्ताक्षर</translation>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin एड्रेस लिखें (उदाहरण: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>खुला है जबतक %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/अपुष्ट</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 पुष्टियाँ</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>taareek</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>राशि</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation>सही</translation>
-    </message>
-    <message>
-        <source>false</source>
-        <translation>ग़लत</translation>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, अभी तक सफलतापूर्वक प्रसारित नहीं किया गया है</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>अज्ञात</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>लेन-देन का विवरण</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation> ये खिड़की आपको लेन-देन का विस्तृत विवरण देगी !</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>taareek</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>टाइप</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>पता</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>राशि</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>खुला है जबतक %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>पक्के  ( %1 पक्का करना)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>यह ब्लॉक किसी भी और नोड को मिला नही है ! शायद यह ब्लॉक कोई भी नोड स्वीकारे गा नही !</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>जेनरेट किया गया किंतु स्वीकारा नही गया !</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>स्वीकारा गया</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>स्वीकार्य ओर से</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>भेजा गया</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>भेजा खुद को भुगतान</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>माइंड</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(लागू नहीं)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>ट्रांसेक्शन स्तिथि| पुष्टियों की संख्या जानने के लिए इस जगह पर माउस लायें|</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>तारीख तथा समय जब ये ट्रांसेक्शन प्राप्त हुई थी|</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>ट्रांसेक्शन का प्रकार|</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>ट्रांसेक्शन की मंजिल का पता|</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>अमाउंट बैलेंस से निकला या जमा किया गया |</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>सभी</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>आज</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>इस हफ्ते</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>इस महीने</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>पिछले महीने</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>इस साल</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>विस्तार...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>स्वीकार करना</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>भेजा गया</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>अपनेआप को</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>माइंड</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>अन्य</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>ढूँदने के लिए कृपा करके पता या लेबल टाइप करे !</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>लघुत्तम राशि</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>पता कॉपी करे</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>लेबल कॉपी करे </translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>कॉपी राशि</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>एडिट लेबल</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Comma separated file (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>पक्का</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>taareek</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>टाइप</translation>
+        <source>Copy label</source>
+        <translation>लेबल कॉपी करे </translation>
     </message>
     <message>
-        <source>Label</source>
-        <translation>लेबल</translation>
+        <source>Copy amount</source>
+        <translation>कॉपी राशि</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
         <source>Address</source>
         <translation>पता</translation>
@@ -2526,827 +457,461 @@ Address: %4
         <translation>राशि</translation>
     </message>
     <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>विस्तार:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>तक</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation>बैकप वॉलेट</translation>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation>वॉलेट डेटा (*.dat)</translation>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation>बैकप असफल</translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation>बैकप सफल</translation>
+        <source>Label</source>
+        <translation>लेबल</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>खपत :</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>commands की लिस्ट बनाएं</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>किसी command के लिए मदद लें</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>विकल्प:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>configuraion की फाइल का विवरण दें (default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid फाइल का विवरण दें (default: bitcoin.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>डेटा डायरेक्टरी बताएं </translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>बैकग्राउंड में डेमॉन बन कर रन करे तथा कमांड्स स्वीकार करें </translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>टेस्ट नेटवर्क का इस्तेमाल करे </translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>taareek</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>लेबल</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>राशि</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(कोई लेबल नही !)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>सिक्के भेजें|</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>राशि :</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>एक साथ कई प्राप्तकर्ताओं को भेजें</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>बाकी रकम :</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>भेजने की पुष्टि करें</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>सिक्के भेजने की पुष्टि करें</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>कॉपी राशि</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>भेजा गया अमाउंट शुन्य से अधिक होना चाहिए|</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(कोई लेबल नही !)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>अमाउंट:</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>प्राप्तकर्ता:</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>आपकी एड्रेस बुक में इस एड्रेस के लिए एक लेबल लिखें</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>लेबल:</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt-A</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Clipboard से एड्रेस paste करें</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt-P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt-A</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation>ब्लॉक्स जाँचे जा रहा है...</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Clipboard से एड्रेस paste करें</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation>वॉलेट जाँचा जा रहा है...</translation>
+        <source>Alt+P</source>
+        <translation>Alt-P</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Signature</source>
+        <translation>हस्ताक्षर</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[टेस्टनेट]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>खुला है जबतक %1</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/अपुष्ट</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 पुष्टियाँ</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>taareek</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>राशि</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>true</source>
+        <translation>सही</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>false</source>
+        <translation>ग़लत</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>जानकारी</translation>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, अभी तक सफलतापूर्वक प्रसारित नहीं किया गया है</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>अज्ञात</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>लेन-देन का विवरण</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation> ये खिड़की आपको लेन-देन का विस्तृत विवरण देगी !</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>taareek</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>टाइप</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>पता</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>खुला है जबतक %1</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>पक्के  ( %1 पक्का करना)</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>यह ब्लॉक किसी भी और नोड को मिला नही है ! शायद यह ब्लॉक कोई भी नोड स्वीकारे गा नही !</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>जेनरेट किया गया किंतु स्वीकारा नही गया !</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>स्वीकारा गया</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>स्वीकार्य ओर से</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>भेजा गया</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>भेजा खुद को भुगतान</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>माइंड</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(लागू नहीं)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>ट्रांसेक्शन स्तिथि| पुष्टियों की संख्या जानने के लिए इस जगह पर माउस लायें|</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>तारीख तथा समय जब ये ट्रांसेक्शन प्राप्त हुई थी|</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>ट्रांसेक्शन का प्रकार|</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>ट्रांसेक्शन की मंजिल का पता|</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>अमाउंट बैलेंस से निकला या जमा किया गया |</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>सभी</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>आज</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>इस हफ्ते</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>इस महीने</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>पिछले महीने</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>इस साल</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>विस्तार...</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>स्वीकार करना</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>भेजा गया</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>अपनेआप को</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>माइंड</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>अन्य</translation>
     </message>
     <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>ढूँदने के लिए कृपा करके पता या लेबल टाइप करे !</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation>चेतावनी</translation>
+        <source>Min amount</source>
+        <translation>लघुत्तम राशि</translation>
     </message>
     <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>पता कॉपी करे</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>लेबल कॉपी करे </translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>कॉपी राशि</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation>संस्करण</translation>
+        <source>Edit label</source>
+        <translation>एडिट लेबल</translation>
     </message>
     <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Comma separated file (*.csv)</translation>
     </message>
     <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>पक्का</translation>
     </message>
     <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>taareek</translation>
     </message>
     <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>टाइप</translation>
     </message>
     <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>लेबल</translation>
     </message>
     <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>पता</translation>
     </message>
     <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>विस्तार:</translation>
     </message>
     <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>तक</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>सिक्के भेजें|</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <source>Backup Wallet</source>
+        <translation>बैकप वॉलेट</translation>
     </message>
     <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
+        <source>Wallet Data (*.dat)</source>
+        <translation>वॉलेट डेटा (*.dat)</translation>
     </message>
     <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <source>Backup Failed</source>
+        <translation>बैकप असफल</translation>
     </message>
     <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <source>Backup Successful</source>
+        <translation>बैकप सफल</translation>
     </message>
+</context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Loading addresses...</source>
-        <translation>पता पुस्तक आ रही है...</translation>
+        <source>Options:</source>
+        <translation>विकल्प:</translation>
     </message>
     <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>configuraion की फाइल का विवरण दें (default: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>pid फाइल का विवरण दें (default: bitcoin.pid)</translation>
     </message>
     <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>डेटा डायरेक्टरी बताएं </translation>
     </message>
     <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>बैकग्राउंड में डेमॉन बन कर रन करे तथा कमांड्स स्वीकार करें </translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>टेस्ट नेटवर्क का इस्तेमाल करे </translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Verifying blocks...</source>
+        <translation>ब्लॉक्स जाँचे जा रहा है...</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <source>Verifying wallet...</source>
+        <translation>वॉलेट जाँचा जा रहा है...</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>जानकारी</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Warning</source>
+        <translation>चेतावनी</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Loading addresses...</source>
+        <translation>पता पुस्तक आ रही है...</translation>
     </message>
     <message>
         <source>Invalid amount</source>
         <translation>राशि ग़लत है</translation>
     </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading block index...</source>
         <translation>ब्लॉक इंडेक्स आ रहा है...</translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>वॉलेट आ रहा है...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>रि-स्केनी-इंग...</translation>
@@ -3355,19 +920,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>लोड हो गया|</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>भूल</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index bd2b773d2fea..bf365bb57e44 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hr" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>O Bitcoin Jezrgu</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Autorsko pravo</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="hr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,30 +9,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Dodajte novu adresu</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopiraj trenutno odabranu adresu u međuspremnik</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopirati adresu</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Izvoz podataka iz trenutnog taba u datoteku</translation>
@@ -77,34 +29,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Delete</source>
         <translation>&amp;Brisanje</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopirati &amp;oznaku</translation>
@@ -113,23 +37,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Edit</source>
         <translation>&amp;Izmjeniti</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Datoteka vrijednosti odvojenih zarezom (*. csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +59,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Unesite lozinku</translation>
@@ -163,10 +71,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Ponovite novu lozinku</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Unesite novi lozinku za novčanik. &lt;br/&gt; Molimo Vas da koristite zaporku od &lt;b&gt;10 ili više slučajnih znakova,&lt;/b&gt; ili &lt;b&gt;osam ili više riječi.&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Šifriranje novčanika</translation>
@@ -207,10 +111,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Jeste li sigurni da želite šifrirati svoj novčanik?</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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Upozorenje: Tipka Caps Lock je uključena!</translation>
@@ -266,10 +166,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Pregled</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Prikaži opći pregled novčanika</translation>
@@ -290,10 +186,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Izlazak iz programa</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Prikaži informacije o Bitcoinu</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Više o &amp;Qt</translation>
@@ -318,18 +210,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Promijena lozinke...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importiranje blokova sa diska...</translation>
@@ -354,14 +234,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Promijenite lozinku za šifriranje novčanika</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Verify message...</source>
         <translation>&amp;Potvrdite poruku...</translation>
@@ -378,30 +250,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Send</source>
         <translation>&amp;Pošalji</translation>
     </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Datoteka</translation>
@@ -426,86 +274,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Bitcoin Core</source>
         <translation>Bitcoin Jezgra</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klijent</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktivna veza na Bitcoin mrežu</numerusform><numerusform>%n aktivne veze na Bitcoin mrežu</numerusform><numerusform>%n aktivnih veza na Bitcoin mrežu</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Obrađeno %1 blokova povijesti transakcije.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Greška</translation>
@@ -554,68 +330,16 @@ Adresa:%4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Novčanik je &lt;b&gt;šifriran&lt;/b&gt; i trenutno &lt;b&gt;zaključan&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Iznos:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Iznos</translation>
@@ -628,18 +352,10 @@ Adresa:%4
         <source>Date</source>
         <translation>Datum</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Potvrđeno</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Kopirati adresu</translation>
@@ -652,151 +368,11 @@ Adresa:%4
         <source>Copy amount</source>
         <translation>Kopiraj iznos</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(bez oznake)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -807,14 +383,6 @@ Adresa:%4
         <source>&amp;Label</source>
         <translation>&amp;Oznaka</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Adresa</translation>
@@ -836,12 +404,12 @@ Adresa:%4
         <translation>Uredi adresu za slanje</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Upisana adresa &quot;%1&quot; je već u adresaru.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Upisana adresa "%1" je već u adresaru.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Upisana adresa &quot;%1&quot; nije valjana bitcoin adresa.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Upisana adresa "%1" nije valjana bitcoin adresa.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -854,33 +422,13 @@ Adresa:%4
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>name</source>
         <translation>ime</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Jezgra</translation>
@@ -890,38 +438,22 @@ Adresa:%4
         <translation>verzija</translation>
     </message>
     <message>
-        <source>Usage:</source>
-        <translation>Upotreba:</translation>
+        <source>About Bitcoin Core</source>
+        <translation>O Bitcoin Jezrgu</translation>
     </message>
     <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Upotreba:</translation>
     </message>
     <message>
         <source>UI options</source>
         <translation>UI postavke</translation>
     </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Start minimized</source>
         <translation>Pokreni minimiziran</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -929,71 +461,23 @@ Adresa:%4
         <translation>Dobrodošli</translation>
     </message>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezgra</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Pogreška</translation>
     </message>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>(of %1GB needed)</source>
+        <translation>(od potrebnog %1GB)</translation>
     </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Pogreška</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(od potrebnog %1GB)</translation>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
+</context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
         <source>Options</source>
         <translation>Postavke</translation>
@@ -1002,10 +486,6 @@ Adresa:%4
         <source>&amp;Main</source>
         <translation>&amp;Glavno</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>Plati &amp;naknadu za transakciju</translation>
@@ -1018,78 +498,10 @@ Adresa:%4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Pokreni Bitcoin kod pokretanja sustava</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Network</source>
         <translation>&amp;Mreža</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Automatski otvori port Bitcoin klijenta na ruteru. To radi samo ako ruter podržava UPnP i ako je omogućen.</translation>
@@ -1102,22 +514,10 @@ Adresa:%4
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
     </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port od proxy-a (npr. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Verzija:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Prozor</translation>
@@ -1142,14 +542,6 @@ Adresa:%4
         <source>&amp;Display</source>
         <translation>&amp;Prikaz</translation>
     </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Jedinica za prikazivanje iznosa:</translation>
@@ -1158,18 +550,6 @@ Adresa:%4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Izaberite željeni najmanji dio bitcoina koji će biti prikazan u sučelju i koji će se koristiti za plaćanje.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Prikaži adrese u popisu transakcija</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;U redu</translation>
@@ -1182,26 +562,6 @@ Adresa:%4
         <source>default</source>
         <translation>standardne vrijednosti</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Priložena proxy adresa je nevažeća.</translation>
@@ -1221,164 +581,43 @@ Adresa:%4
         <source>Wallet</source>
         <translation>Novčanik</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Ukupno:</translation>
     </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Nedavne transakcije&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
         <translation>URI upravljanje</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Iznos</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Save QR Code</source>
         <translation>Spremi QR kod</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1397,22 +636,10 @@ Adresa:%4
         <source>&amp;Information</source>
         <translation>&amp;Informacija</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Koristim OpenSSL verziju</translation>
     </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Network</source>
         <translation>Mreža</translation>
@@ -1433,10 +660,6 @@ Adresa:%4
         <source>Current number of blocks</source>
         <translation>Trenutni broj blokova</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Procjenjeni ukupni broj blokova</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Posljednje vrijeme bloka</translation>
@@ -1449,37 +672,9 @@ Adresa:%4
         <source>&amp;Console</source>
         <translation>&amp;Konzola</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
+        <translation>Ukupno:</translation>
     </message>
     <message>
         <source>Clear console</source>
@@ -1493,342 +688,118 @@ Adresa:%4
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Kako bi navigirali kroz povijest koristite strelice gore i dolje. &lt;b&gt;Ctrl-L&lt;/b&gt; kako bi očistili ekran.</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Oznaka:</translation>
     </message>
     <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
+        <source>Show</source>
+        <translation>Pokaži</translation>
     </message>
     <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopirati oznaku</translation>
     </message>
     <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopiraj iznos</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <source>QR Code</source>
+        <translation>QR kôd</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresa</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Iznos</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Oznaka</translation>
     </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Poruka</translation>
     </message>
     <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Oznaka:</translation>
+        <source>Resulting URI too long, try to reduce the text for label / message.</source>
+        <translation>Rezultirajući URI je predug, probajte umanjiti tekst za naslov / poruku.</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Oznaka</translation>
     </message>
     <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Poruka</translation>
     </message>
     <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Iznos</translation>
     </message>
     <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(bez oznake)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Slanje novca</translation>
     </message>
     <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Iznos:</translation>
     </message>
     <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Pošalji k nekoliko primatelja odjednom</translation>
     </message>
     <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
+        <source>Add &amp;Recipient</source>
+        <translation>&amp;Dodaj primatelja</translation>
     </message>
     <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>Obriši &amp;sve</translation>
     </message>
     <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Stanje:</translation>
     </message>
     <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Potvrdi akciju slanja</translation>
     </message>
     <message>
-        <source>Show</source>
-        <translation>Pokaži</translation>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Kopirati oznaku</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopiraj iznos</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation>QR kôd</translation>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Iznos</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Oznaka</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Poruka</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>Rezultirajući URI je predug, probajte umanjiti tekst za naslov / poruku.</translation>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Oznaka</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Poruka</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Iznos</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(bez oznake)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Slanje novca</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Iznos:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Pošalji k nekoliko primatelja odjednom</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation>&amp;Dodaj primatelja</translation>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>Obriši &amp;sve</translation>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Stanje:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Potvrdi akciju slanja</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>&amp;Pošalji</translation>
+        <source>S&amp;end</source>
+        <translation>&amp;Pošalji</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
         <translation>Potvrdi slanje novca</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopiraj iznos</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>or</source>
         <translation>ili</translation>
@@ -1853,43 +824,11 @@ Adresa:%4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Pronašli smo adresu koja se ponavlja. U svakom plaćanju program može svaku adresu koristiti samo jedanput.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(bez oznake)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1900,10 +839,6 @@ Adresa:%4
         <source>Pay &amp;To:</source>
         <translation>&amp;Primatelj plaćanja:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Unesite oznaku za ovu adresu kako bi ju dodali u vaš adresar</translation>
@@ -1912,14 +847,6 @@ Adresa:%4
         <source>&amp;Label:</source>
         <translation>&amp;Oznaka:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1932,56 +859,20 @@ Adresa:%4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Poruka:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay To:</source>
         <translation>Primatelj plaćanja:</translation>
     </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Sign Message</source>
         <translation>&amp;Potpišite poruku</translation>
@@ -1990,14 +881,6 @@ Adresa:%4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Možete potpisati poruke sa svojom adresom kako bi dokazali da ih posjedujete. Budite oprezni da ne potpisujete ništa mutno, jer bi vas phishing napadi mogli na prevaru natjerati da prepišete svoj identitet njima. Potpisujte samo detaljno objašnjene izjave sa kojima se slažete.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2018,22 +901,6 @@ Adresa:%4
         <source>Signature</source>
         <translation>Potpis</translation>
     </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Obriši &amp;sve</translation>
@@ -2043,149 +910,65 @@ Adresa:%4
         <translation>&amp;Potvrdite poruku</translation>
     </message>
     <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
+        <source>Wallet unlock was cancelled.</source>
+        <translation>Otključavanje novčanika je otkazano.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>Message signed.</source>
+        <translation>Poruka je potpisana.</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Jezgra</translation>
     </message>
     <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Otvoren do %1</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (npr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1/offline</source>
+        <translation>%1 nije dostupan</translation>
     </message>
     <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/nepotvrđeno</translation>
     </message>
     <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 potvrda</translation>
     </message>
     <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
+        <source>Status</source>
+        <translation>Status</translation>
     </message>
     <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation>Otključavanje novčanika je otkazano.</translation>
+        <source>Source</source>
+        <translation>Izvor</translation>
     </message>
     <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <source>Generated</source>
+        <translation>Generiran</translation>
     </message>
     <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation>Poruka je potpisana.</translation>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation>Bitcoin Jezgra</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Otvoren do %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation>%1 nije dostupan</translation>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/nepotvrđeno</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 potvrda</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation>Status</translation>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation>Izvor</translation>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation>Generiran</translation>
-    </message>
-    <message>
-        <source>From</source>
-        <translation>Od</translation>
+        <source>From</source>
+        <translation>Od</translation>
     </message>
     <message>
         <source>To</source>
@@ -2203,936 +986,377 @@ Adresa:%4
         <source>Credit</source>
         <translation>Uplaćeno</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>Nije prihvaćeno</translation>
     </message>
     <message>
-        <source>Debit</source>
-        <translation>Zaduženje</translation>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation>Naknada za transakciju</translation>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation>Neto iznos</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Poruka</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation>Komentar</translation>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation>ID transakcije</translation>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation>Transakcija</translation>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation>Unosi</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Iznos</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, još nije bio uspješno emitiran</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>nepoznato</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Detalji transakcije</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Ova panela prikazuje detaljni opis transakcije</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tip</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Iznos</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Otvoren do %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Potvrđen (%1 potvrda)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Generirano - Upozorenje: ovaj blok nije bio primljen od strane bilo kojeg drugog noda i vjerojatno neće biti prihvaćen!</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Generirano, ali nije prihvaćeno</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Primljeno s</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Primljeno od</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Poslano za</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Plaćanje samom sebi</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Rudareno</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/d)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Status transakcije</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Datum i vrijeme kad je transakcija primljena</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Vrsta transakcije.</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Odredište transakcije</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Iznos odbijen od ili dodan k saldu.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Sve</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Danas</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Ovaj tjedan</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Ovaj mjesec</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Prošli mjesec</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Ove godine</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Raspon...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Primljeno s</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Poslano za</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Tebi</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Rudareno</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Ostalo</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Unesite adresu ili oznaku za pretraživanje</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Min iznos</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Kopirati adresu</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Kopirati oznaku</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopiraj iznos</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Izmjeniti oznaku</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation>Prikaži detalje transakcije</translation>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Datoteka podataka odvojenih zarezima (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Potvrđeno</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Tip</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Oznaka</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Iznos</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Raspon:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>za</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Slanje novca</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation>&amp;Izvoz</translation>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation>Izvoz podataka iz trenutnog taba u datoteku</translation>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation>Podaci novčanika (*.dat)</translation>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Upotreba:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Prikaži komande</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Potraži pomoć za komandu</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Postavke:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Odredi konfiguracijsku datoteku (ugrađeni izbor: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Odredi proces ID datoteku (ugrađeni izbor: bitcoin.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>Odredi direktorij za datoteke</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Slušaj na &lt;port&gt;u (default: 8333 ili testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Održavaj najviše &lt;n&gt; veza sa članovima (default: 125)</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation>Odaberi vlastitu javnu adresu</translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Prag za odspajanje članova koji se čudno ponašaju (default: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Broj sekundi koliko se članovima koji se čudno ponašaju neće dopustiti da se opet spoje (default: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Prihvaćaj JSON-RPC povezivanje na portu broj &lt;port&gt; (ugrađeni izbor: 8332 or testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>Prihvati komande iz tekst moda i JSON-RPC</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Izvršavaj u pozadini kao uslužnik i prihvaćaj komande</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Koristi test mrežu</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Upozorenje: -paytxfee je podešen na preveliki iznos.  To je iznos koji ćete platiti za obradu transakcije.</translation>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Upozorenje: Molimo provjerite jesu li datum i vrijeme na vašem računalu točni. Ako vaš sat ide krivo, Bitcoin neće raditi ispravno.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
+        <source>Debit</source>
+        <translation>Zaduženje</translation>
     </message>
     <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
+        <source>Transaction fee</source>
+        <translation>Naknada za transakciju</translation>
     </message>
     <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Net amount</source>
+        <translation>Neto iznos</translation>
     </message>
     <message>
-        <source>Block creation options:</source>
-        <translation>Opcije za kreiranje bloka:</translation>
+        <source>Message</source>
+        <translation>Poruka</translation>
     </message>
     <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <source>Comment</source>
+        <translation>Komentar</translation>
     </message>
     <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation>Poveži se samo sa određenim nodom</translation>
+        <source>Transaction ID</source>
+        <translation>ID transakcije</translation>
     </message>
     <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
+        <source>Transaction</source>
+        <translation>Transakcija</translation>
     </message>
     <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
+        <source>Inputs</source>
+        <translation>Unosi</translation>
     </message>
     <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Iznos</translation>
     </message>
     <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, još nije bio uspješno emitiran</translation>
     </message>
     <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>nepoznato</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Detalji transakcije</translation>
     </message>
     <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Ova panela prikazuje detaljni opis transakcije</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tip</translation>
     </message>
     <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresa</translation>
     </message>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Otvoren do %1</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Potvrđen (%1 potvrda)</translation>
     </message>
     <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Generirano - Upozorenje: ovaj blok nije bio primljen od strane bilo kojeg drugog noda i vjerojatno neće biti prihvaćen!</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Pogreška: Nema prostora na disku!</translation>
+        <source>Generated but not accepted</source>
+        <translation>Generirano, ali nije prihvaćeno</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Primljeno s</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation>Pogreška: sistemska pogreška:</translation>
+        <source>Received from</source>
+        <translation>Primljeno od</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Poslano za</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Plaćanje samom sebi</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Rudareno</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n/d)</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Status transakcije</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Datum i vrijeme kad je transakcija primljena</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Vrsta transakcije.</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Odredište transakcije</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Iznos odbijen od ili dodan k saldu.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Sve</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Danas</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Naknada po kB dodana transakciji koju šaljete</translation>
+        <source>This week</source>
+        <translation>Ovaj tjedan</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Ovaj mjesec</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Prošli mjesec</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Ove godine</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Raspon...</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Primljeno s</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Poslano za</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Tebi</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Rudareno</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Ostalo</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Unesite adresu ili oznaku za pretraživanje</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Min iznos</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Kopirati adresu</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopirati oznaku</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopiraj iznos</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Izmjeniti oznaku</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Show transaction details</source>
+        <translation>Prikaži detalje transakcije</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Datoteka podataka odvojenih zarezima (*.csv)</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Potvrđeno</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Datum</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Tip</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Oznaka</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresa</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Raspon:</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>za</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Slanje novca</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>&amp;Export</source>
+        <translation>&amp;Izvoz</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Izvoz podataka iz trenutnog taba u datoteku</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation>Importiraj blokove sa vanjskog blk000??.dat fajla</translation>
+        <source>Backup Wallet</source>
+        <translation>Backup novčanika</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Wallet Data (*.dat)</source>
+        <translation>Podaci novčanika (*.dat)</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Backup Failed</source>
+        <translation>Backup nije uspio</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Postavke:</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Odredi konfiguracijsku datoteku (ugrađeni izbor: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>Informacija</translation>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>Odredi proces ID datoteku (ugrađeni izbor: bitcoin.pid)</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Odredi direktorij za datoteke</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Slušaj na &lt;port&gt;u (default: 8333 ili testnet: 18333)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Održavaj najviše &lt;n&gt; veza sa članovima (default: 125)</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Specify your own public address</source>
+        <translation>Odaberi vlastitu javnu adresu</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>Prag za odspajanje članova koji se čudno ponašaju (default: 100)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation>Broj sekundi koliko se članovima koji se čudno ponašaju neće dopustiti da se opet spoje (default: 86400)</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
+        <translation>Prihvaćaj JSON-RPC povezivanje na portu broj &lt;port&gt; (ugrađeni izbor: 8332 or testnet: 18332)</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Prihvati samo lance blokova koji se podudaraju sa ugrađenim checkpoint-ovima (default: 1)</translation>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Prihvati komande iz tekst moda i JSON-RPC</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Izvršavaj u pozadini kao uslužnik i prihvaćaj komande</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Koristi test mrežu</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+        <translation>Upozorenje: -paytxfee je podešen na preveliki iznos.  To je iznos koji ćete platiti za obradu transakcije.</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Block creation options:</source>
+        <translation>Opcije za kreiranje bloka:</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Connect only to the specified node(s)</source>
+        <translation>Poveži se samo sa određenim nodom</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Error: Disk space is low!</source>
+        <translation>Pogreška: Nema prostora na disku!</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Error: system error: </source>
+        <translation>Pogreška: sistemska pogreška:</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>Importiraj blokove sa vanjskog blk000??.dat fajla</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL postavke: (za detalje o podešavanju SSL opcija vidi Bitcoin Wiki)</translation>
+        <source>Information</source>
+        <translation>Informacija</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
+        <translation>Prihvati samo lance blokova koji se podudaraju sa ugrađenim checkpoint-ovima (default: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3142,50 +1366,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Podesite minimalnu veličinu bloka u bajtovima (default: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Odredi vremenski prozor za spajanje na mrežu u milisekundama (ugrađeni izbor: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Pogreška sistema:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Pokušaj koristiti UPnP da otvoriš port za uslugu (default: 0)</translation>
@@ -3202,38 +1390,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning</source>
         <translation>Upozorenje</translation>
     </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>verzija</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Lozinka za JSON-RPC veze</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Dozvoli JSON-RPC povezivanje s određene IP adrese</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Pošalji komande nodu na adresi &lt;ip&gt; (ugrađeni izbor: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Izvršite naredbu kada se najbolji blok promjeni (%s u cmd je zamjenjen sa block hash)</translation>
@@ -3266,10 +1426,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Ova poruka za pomoć</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Program ne može koristiti %s na ovom računalu (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Dozvoli DNS upite za dodavanje nodova i povezivanje</translation>
@@ -3282,41 +1438,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Greška kod učitavanja wallet.dat: Novčanik pokvaren</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Greška kod učitavanja wallet.dat: Novčanik zahtjeva noviju verziju Bitcoina</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Novčanik je trebao prepravak: ponovo pokrenite Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Greška kod učitavanja wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Nevaljala -proxy adresa: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Nevaljala -proxy adresa: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nevaljali iznos za opciju -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nevaljali iznos za opciju -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3354,19 +1486,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>Učitavanje gotovo</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Greška</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 3d8d45a61dd4..b5eb262442f3 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1,45 +1,9 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="hu" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Ez egy kísérleti program.
-MIT/X11 szoftverlicenc alatt kiadva, lásd a mellékelt fájlt COPYING vagy http://www.opensource.org/licenses/mit-license.php.
-
-Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (http://www.openssl.org/) és kriptográfiai szoftvertben való felhasználásra,  írta Eric Young (eay@cryptsoft.com) és UPnP szoftver, írta Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="hu" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Dupla-kattintás a cím vagy a címke szerkesztéséhez</translation>
+        <translation>Dupla-kattintás a cím vagy címke szerkesztéséhez</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -47,7 +11,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Új</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -55,11 +19,11 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Másolás</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Bezárás</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -67,7 +31,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Kiválasztott cím törlése a listából</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -75,7 +39,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Exportálás...</translation>
+        <translation>&amp;Exportálás</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -83,35 +47,35 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Válaszd ki a címet, ahová küldesz</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Válaszd ki a címet, amivel fogadsz</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Kiválaszt</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>Küldési címek</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>Fogadó címek</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Ezekről a címekről küldhetsz bitcoint. Mindig ellenőrizd a fogadó címet és a fizetendő összeget, mielőtt elküldöd.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Ezekkel a címekkel fogadhatsz bitcoint. Ajánlott minden tranzakcióhoz egy új fogadó címet használni.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Címke &amp;másolása</translation>
+        <translation>&amp;Címke másolása</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
@@ -119,7 +83,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Címjegyzék exportálása</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -127,11 +91,11 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Az exportálás sikertelen volt</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Hiba történt a címjegyzék %1 helyre való mentésekor. Kérlek próbáld újra.</translation>
     </message>
 </context>
 <context>
@@ -153,7 +117,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Kulcsszó párbeszédablak</translation>
+        <translation>Jelszó párbeszédablak</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
@@ -167,17 +131,13 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
         <source>Repeat new passphrase</source>
         <translation>Új jelszó újra</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Írd be az új jelszót a tárcához.&lt;br/&gt;Használj legalább 10&lt;br/&gt;véletlenszerű karaktert&lt;/b&gt; vagy &lt;b&gt;legalább nyolc szót&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Tárca kódolása</translation>
+        <translation>Tárca titkosítása</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>A tárcád megnyitásához a műveletnek szüksége van a tárcád jelszavára.</translation>
+        <translation>A tárca megnyitásához a műveletnek szüksége van a tárcád jelszavára.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -185,7 +145,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>A tárcád dekódolásához a műveletnek szüksége van a tárcád jelszavára.</translation>
+        <translation>A tárca dekódolásához a műveletnek szüksége van a tárcád jelszavára.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -201,39 +161,43 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>Biztosan kódolni akarod a tárcát?</translation>
+        <translation>Biztosan titkosítani akarod a tárcát?</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Figyelem: Ha kódolod a tárcát, és elveszíted a jelszavad, akkor &lt;b&gt;AZ ÖSSZES BITCOINODAT IS EL FOGOD VESZÍTENI!&lt;/b&gt;</translation>
+        <translation>Figyelem: ha titkosítod a tárcát és elveszted a jelszavad, akkor &lt;b&gt;AZ ÖSSZES BITCOINOD ELVESZIK!&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>Biztosan kódolni akarod a tárcát?</translation>
+        <translation>Biztosan titkosítani akarod a tárcád?</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>FONTOS: A pénztárca-fájl korábbi mentéseit ezzel az új, titkosított pénztárca-fájllal kell helyettesíteni. Biztonsági okokból a pénztárca-fájl korábbi titkosítás nélküli mentései haszontalanná válnak amint elkezdi használni az új, titkosított pénztárcát.</translation>
+        <translation>FONTOS: A tárca-fájl minden korábbi mentését cseréld le ezzel az új, titkosított tárca-fájllal. Biztonsági okokból a tárca-fájl korábbi, titkosítás nélküli mentései használhatatlanná válnak, amint elkezded használni az új, titkosított tárcát.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>Vigyázat: a Caps Lock be van kapcsolva!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
-        <translation>Tárca kódolva</translation>
+        <translation>Tárca titkosítva</translation>
+    </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Add meg a tárca új jelszavát.&lt;br/&gt;Olyan jelszót válassz, ami &lt;b&gt;legalább tíz véletlenszerű karakterből&lt;/b&gt; vagy &lt;b&gt;legalább 8 véletlenszerű szóból&lt;/b&gt; áll.</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin will close now to finish the encryption process. Ne feledd, hogy a tárca titkosítása sem nyújt teljes védelmet az adathalász programok fertőzésével szemben.</translation>
+        <translation>A Bitcoin Core most bezár, hogy befejezze a titkosítást. Ne feledd: a tárca titkosítása nem nyújt teljes védelmet azzal szemben, hogy adathalász programok megfertőzzék a számítógéped és ellopják a bitcoinjaid.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
-        <translation>Tárca kódolása sikertelen.</translation>
+        <translation>A tárca titkosítása sikertelen.</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>Tárca kódolása belső hiba miatt sikertelen. A tárcád nem lett kódolva.</translation>
+        <translation>Tárca titkosítása belső hiba miatt sikertelen. A tárcád nem lett titkosítva.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -272,7 +236,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Csomópont</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -284,7 +248,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>Tranzakciótörténet megtekintése</translation>
+        <translation>Tranzakciós előzmények megtekintése</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
@@ -292,11 +256,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Quit application</source>
-        <translation>Kilépés</translation>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Információk a Bitcoinról</translation>
+        <translation>Kilépés az alkalmazásból</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
@@ -304,7 +264,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation>Információk a Qt ról</translation>
+        <translation>Információk a Qt-ról</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
@@ -312,7 +272,7 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>Tárca &amp;kódolása...</translation>
+        <translation>Tárca &amp;titkosítása...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
@@ -324,15 +284,19 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Küldési címek...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Fogadó címek...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;URI azonosító megnyitása...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core kliens</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -340,11 +304,11 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation>A blokkok lemezen történő ujraindexelése...</translation>
+        <translation>Lemezen lévő blokkok újraindexelése...</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation>Érmék küldése megadott címre</translation>
+        <translation>Bitcoin küldése megadott címre</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
@@ -352,11 +316,11 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation>Biztonsági másolat készítése a Tárcáról egy másik helyre</translation>
+        <translation>Biztonsági másolat készítése a tárcáról egy másik helyre</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Tárcakódoló jelszó megváltoztatása</translation>
+        <translation>Tárca-titkosító jelszó megváltoztatása</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
@@ -386,25 +350,29 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
         <source>&amp;Receive</source>
         <translation>&amp;Fogadás</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Bitcoin Core információ megjelenítése</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mutat / Elrejt</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <translation>Főablakot mutat/elrejt</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>A pénztárcájához tartozó privát kulcsok titkosítása</translation>
+        <translation>A tárcádhoz tartozó privát kulcsok titkosítása</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Üzenet aláírása a Bitcoin címmel, amivel bizonyítja, hogy a cím az ön tulajdona.</translation>
+        <translation>Üzenetek aláírása a Bitcoin-címmeiddel, amivel bizonyítod, hogy a cím a sajátod</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Annak ellenőrzése, hogy az üzenetek valóban a megjelölt Bitcoin címekkel vannak-e alaírva</translation>
+        <translation>Üzenetek ellenőrzése, hogy valóban a megjelölt Bitcoin-címekkel vannak-e aláírva</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -432,35 +400,31 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <translation>Fizetési kérelem (QR-kódot és "bitcoin:" URI azonosítót hoz létre)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>&amp;A Bitcoin Core-ról</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>A használt küldési címek és címkék megtekintése</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <translation>A használt fogadó címek és címkék megtekintése</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <translation>"bitcoin:" URI azonosító vagy fizetési kérelem megnyitása</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>Paran&amp;cssor kapcsolók</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin kliens</translation>
+        <translation>A Bitcoin Core súgóüzenet megjelenítése a Bitcoin lehetséges parancssori kapcsolóival.</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -470,10 +434,6 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
         <source>No block source available...</source>
         <translation>Blokk forrása ismeretlen...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 blokk feldolgozva a tranzakciótörténet %2 (becsült) blokkjából</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>A tranzakció-történet %1 blokkja feldolgozva.</translation>
@@ -492,11 +452,11 @@ Ez a termék az OpenSSL Project által lett kifejlesztve az OpenSSL Toolkit (htt
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 és %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n év</numerusform><numerusform>%n év</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -552,16 +512,12 @@ Cím: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Tárca &lt;b&gt;kódolva&lt;/b&gt; és jelenleg &lt;b&gt;nyitva&lt;/b&gt;.</translation>
+        <translation>A tárca &lt;b&gt;titkosítva&lt;/b&gt; és jelenleg &lt;b&gt;nyitva&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Tárca &lt;b&gt;kódolva&lt;/b&gt; és jelenleg &lt;b&gt;zárva&lt;/b&gt;.</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -574,15 +530,15 @@ Cím: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <translation>Ellenőrző cím kiválasztása</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Mennyiség:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bájtok:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -590,35 +546,35 @@ Cím: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritás:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Díjak:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Por-határ:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Utólagos díj:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
+        <translation>Visszajáró:</translation>
     </message>
     <message>
         <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <translation>mindent kiválaszt/elvet</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <translation>Fa nézet</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Lista nézet</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -634,7 +590,7 @@ Cím: %4
     </message>
     <message>
         <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <translation>Megerősítések</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -642,7 +598,7 @@ Cím: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation type="unfinished"/>
+        <translation>Prioritás</translation>
     </message>
     <message>
         <source>Copy address</source>
@@ -662,131 +618,119 @@ Cím: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Megmaradt zárolása</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <translation>Zárolás feloldása</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Mennyiség másolása</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Díj másolása</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Utólagos díj másolása</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Byte-ok másolása </translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <translation>Prioritás másolása</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Copy dust</source>
+        <translation>Por-határ másolása</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Visszajáró másolása</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>legmagasabb</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>magasabb</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>magas</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>közepesen-magas</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>közepes</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>alacsony-közepes</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>alacsony</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>alacsonyabb</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>legalacsonyabb</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <translation>(%1 zárolva)</translation>
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>semmi</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Bemenetenként  +/- %1 satoshi-val változhat</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>igen</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>nem</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <translation>Ez a címke piros lesz, ha tranzakció mérete nagyobb 1000 byte-nál.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <translation>Legalább %1 díj szüksége kB-onként.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <translation>Bemenetenként +/- 1 byte-al változhat.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Nagyobb prioritású tranzakciók nagyobb valószínűséggel kerülnek be egy blokkba.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Ez a címke piros lesz, ha a prioritás közepesnél alacsonyabb.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Ez a címke piros lesz, ha valamelyik elfogadó kevesebbet kap mint %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -794,11 +738,11 @@ Cím: %4
     </message>
     <message>
         <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <translation>visszajáró %1-ből (%2)</translation>
     </message>
     <message>
         <source>(change)</source>
-        <translation type="unfinished"/>
+        <translation>(visszajáró)</translation>
     </message>
 </context>
 <context>
@@ -813,11 +757,11 @@ Cím: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
+        <translation>Ehhez a listaelemhez rendelt címke </translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
+        <translation>Ehhez a címlistaelemhez rendelt cím. Csak a küldő címek módosíthatók.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -840,12 +784,12 @@ Cím: %4
         <translation>Küldő cím szerkesztése</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>A megadott &quot;%1&quot; cím már szerepel a címjegyzékben.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>A megadott "%1" cím már szerepel a címjegyzékben.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>A megadott &quot;%1&quot; cím nem egy érvényes Bitcoin-cím.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>A megadott "%1" cím nem egy érvényes Bitcoin-cím.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -860,31 +804,23 @@ Cím: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Új adatkönyvtár lesz létrehozva.</translation>
     </message>
     <message>
         <source>name</source>
         <translation>Név</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>Az elérési út létezik, de nem egy könyvtáré.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Adatkönyvtár nem hozható itt létre.</translation>
     </message>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -893,6 +829,18 @@ Cím: %4
         <source>version</source>
         <translation>verzió</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>A Bitcoin Core-ról</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Parancssoros opciók</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Használat:</translation>
@@ -906,8 +854,8 @@ Cím: %4
         <translation>UI opciók</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Nyelvbeállítás, például &quot;de_DE&quot; (alapértelmezett: rendszer nyelve)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Nyelvbeállítás, például "de_DE" (alapértelmezett: rendszer nyelve)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -916,7 +864,7 @@ Cím: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <translation>SLL gyökér-igazolások megadása fizetési kérelmekhez (alapértelmezett: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -924,42 +872,22 @@ Cím: %4
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Adatkönyvtár kiválasztása induláskor (alapbeállítás: 0)</translation>
     </message>
 </context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
-        <translation type="unfinished"/>
+        <translation>Üdvözlünk</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <translation>Üdvözlünk a Bitcoin Core-ban.</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -967,36 +895,32 @@ Cím: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <translation>GB hely érhető el</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>( ebből %1GB szükséges)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
+        <translation>URI megnyitása</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Fizetési kérelem megnyitása URI azonosítóból vagy fájlból</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Fizetési kérelmi fájl kiválasztása</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1023,41 +947,13 @@ Cím: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Induljon el a számítógép bekapcsolásakor</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>MB</translation>
     </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>SOCKS proxyn keresztüli csatlakozás a Bitcoin hálózatához.</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1071,30 +967,6 @@ Cím: %4
         <source>&amp;Network</source>
         <translation>&amp;Hálózat</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>A Bitcoin-kliens portjának automatikus megnyitása a routeren. Ez csak akkor működik, ha a routered támogatja az UPnP-t és az engedélyezve is van rajta.</translation>
@@ -1115,14 +987,6 @@ Cím: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Proxy portja (pl.: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Verzió:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>A proxy SOCKS verziója  (pl. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Ablak</translation>
@@ -1163,18 +1027,6 @@ Cím: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Válaszd ki az interfészen és érmék küldésekor megjelenítendő alapértelmezett alegységet.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Mutassa-e a Bitcoin címeket a tranzakciólistában.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Címek megjelenítése a tranzakciólistában</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1189,24 +1041,12 @@ Cím: %4
     </message>
     <message>
         <source>none</source>
-        <translation type="unfinished"/>
+        <translation>semmi</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Beállítások törlésének jóváhagyása.</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>A megadott proxy cím nem érvényes.</translation>
@@ -1228,7 +1068,7 @@ Cím: %4
     </message>
     <message>
         <source>Available:</source>
-        <translation type="unfinished"/>
+        <translation>Elérhető:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
@@ -1236,7 +1076,7 @@ Cím: %4
     </message>
     <message>
         <source>Pending:</source>
-        <translation type="unfinished"/>
+        <translation>Küldés:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1273,107 +1113,38 @@ Cím: %4
         <source>URI handling</source>
         <translation>URI kezelés</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>A bitcoint nem lehet elindítani: click-to-pay handler</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Összeg</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>NETWORK</source>
+        <translation>HÁLÓZAT</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adj meg egy Bitcoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
+        <source>N/A</source>
+        <translation>Nem elérhető</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Kép mentése</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Kép másolása</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1381,7 +1152,7 @@ Cím: %4
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
+        <translation>PNG kép (*.png)</translation>
     </message>
 </context>
 <context>
@@ -1404,11 +1175,7 @@ Cím: %4
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Debug ablak</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1439,8 +1206,16 @@ Cím: %4
         <translation>Aktuális blokkok száma</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Becsült összes blokk</translation>
+        <source>Received</source>
+        <translation>Fogadott</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Küldött</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Peerek</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1456,23 +1231,19 @@ Cím: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Hálózati forgalom</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
+        <translation>Összesen:</translation>
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>Be:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Ki:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1482,10 +1253,6 @@ Cím: %4
         <source>Debug log file</source>
         <translation>Debug naplófájl</translation>
     </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear console</source>
         <translation>Konzol törlése</translation>
@@ -1504,102 +1271,50 @@ Cím: %4
     </message>
     <message>
         <source>%1 B</source>
-        <translation type="unfinished"/>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation type="unfinished"/>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation type="unfinished"/>
+        <translation>%1 MB</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation type="unfinished"/>
+        <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <source>never</source>
+        <translation>soha</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>Yes</source>
+        <translation>Igen</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <source>No</source>
+        <translation>Nem</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>Címke:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
+        <translation>Törlés</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
+        <translation>Mutat</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation type="unfinished"/>
+        <translation>Eltávolítás</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -1607,7 +1322,7 @@ Cím: %4
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Üzenet másolása</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1630,19 +1345,11 @@ Cím: %4
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Kép mentése</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1691,44 +1398,24 @@ Cím: %4
         <source>(no label)</source>
         <translation>(nincs címke)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Érmék küldése</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
+        <translation>Bemenetek...</translation>
     </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <translation>Mennyiség:</translation>
     </message>
     <message>
         <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Bájtok:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -1736,31 +1423,19 @@ Cím: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Prioritás:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Díjak:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Utólagos díj:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Visszajáró:</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
@@ -1771,8 +1446,8 @@ Cím: %4
         <translation>&amp;Címzett hozzáadása</translation>
     </message>
     <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Por-határ:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1794,13 +1469,9 @@ Cím: %4
         <source>Confirm send coins</source>
         <translation>Küldés megerősítése</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Mennyiség másolása</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1808,35 +1479,27 @@ Cím: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Díj másolása</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Utólagos díj másolása</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Byte-ok másolása </translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Prioritás másolása</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
+        <translation>Visszajáró másolása</translation>
     </message>
     <message>
         <source>or</source>
-        <translation type="unfinished"/>
+        <translation>vagy</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1858,43 +1521,15 @@ Cím: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Többször szerepel ugyanaz a cím. Egy küldési műveletben egy címre csak egyszer lehet küldeni.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(nincs címke)</translation>
     </message>
     <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
+        <source>Copy dust</source>
+        <translation>Visszajáró másolása</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1905,10 +1540,6 @@ Cím: %4
         <source>Pay &amp;To:</source>
         <translation>Címzett:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Milyen címkével kerüljön be ez a cím a címtáradba?
@@ -1918,14 +1549,6 @@ Cím: %4
         <source>&amp;Label:</source>
         <translation>Címke:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1938,71 +1561,35 @@ Cím: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Üzenet:</translation>
     </message>
     <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
+        <source>Memo:</source>
+        <translation>Jegyzet:</translation>
     </message>
+</context>
+<context>
+    <name>ShutdownWindow</name>
     <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>A Bitcoin Core leáll...</translation>
     </message>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
+        <source>Signatures - Sign / Verify a Message</source>
+        <translation>Aláírások - üzenet aláírása/ellenőrzése</translation>
     </message>
     <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Sign Message</source>
+        <translation>Üzenet aláírása...</translation>
     </message>
     <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation>Üzenet aláírása...</translation>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Aláírhat a címeivel üzeneteket, amivel bizonyíthatja, hogy a címek az önéi. Vigyázzon, hogy ne írjon alá semmi félreérthetőt, mivel a phising támadásokkal megpróbálhatják becsapni, hogy az azonosságát átírja másokra. Csak olyan részletes állításokat írjon alá, amivel egyetért.</translation>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adj meg egy Bitcoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
+        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+        <translation>Aláírhat a címeivel üzeneteket, amivel bizonyíthatja, hogy a címek az önéi. Vigyázzon, hogy ne írjon alá semmi félreérthetőt, mivel a phising támadásokkal megpróbálhatják becsapni, hogy az azonosságát átírja másokra. Csak olyan részletes állításokat írjon alá, amivel egyetért.</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -2036,10 +1623,6 @@ Cím: %4
         <source>Sign &amp;Message</source>
         <translation>Üzenet &amp;aláírása</translation>
     </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Mindent &amp;töröl</translation>
@@ -2052,30 +1635,6 @@ Cím: %4
         <source>Enter the signing 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.</source>
         <translation>Írja be az aláírás címét, az üzenetet (ügyelve arra, hogy az új-sor, szóköz, tab, stb. karaktereket is pontosan) és az aláírást az üzenet ellenőrzéséhez. Ügyeljen arra, ne gondoljon többet az aláírásról, mint amennyi az aláírt szövegben ténylegesen áll, hogy elkerülje a köztes-ember (man-in-the-middle) támadást.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adj meg egy Bitcoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adj meg egy Bitcoin-címet (pl.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L )</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The entered address is invalid.</source>
         <translation>A megadott cím nem érvényes.</translation>
@@ -2084,17 +1643,9 @@ Cím: %4
         <source>Please check the address and try again.</source>
         <translation>Ellenőrizze a címet és próbálja meg újra.</translation>
     </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
+        <translation>A megadott cím privát kulcsa nem található.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2112,10 +1663,6 @@ Cím: %4
         <source>Please check the signature and try again.</source>
         <translation>Ellenőrizd az aláírást és próbáld újra.</translation>
     </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message verification failed.</source>
         <translation>Az üzenet ellenőrzése nem sikerült.</translation>
@@ -2133,7 +1680,7 @@ Cím: %4
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
+        <translation>A Bitcoin fejlesztői</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2144,7 +1691,7 @@ Cím: %4
     <name>TrafficGraphWidget</name>
     <message>
         <source>KB/s</source>
-        <translation type="unfinished"/>
+        <translation>KB/s</translation>
     </message>
 </context>
 <context>
@@ -2153,14 +1700,6 @@ Cím: %4
         <source>Open until %1</source>
         <translation>Megnyitva %1-ig</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/unconfirmed</source>
         <translation>%1/megerősítetlen</translation>
@@ -2173,17 +1712,13 @@ Cím: %4
         <source>Status</source>
         <translation>Állapot</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dátum</translation>
     </message>
     <message>
         <source>Source</source>
-        <translation type="unfinished"/>
+        <translation>Forrás</translation>
     </message>
     <message>
         <source>Generated</source>
@@ -2241,14 +1776,6 @@ Cím: %4
         <source>Transaction ID</source>
         <translation>Tranzakcióazonosító</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Debug információ</translation>
@@ -2311,14 +1838,6 @@ Cím: %4
         <source>Address</source>
         <translation>Cím</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Összeg</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>%n további blokkra megnyitva</numerusform><numerusform>%n további blokkra megnyitva</numerusform></translation>
@@ -2341,19 +1860,7 @@ Cím: %4
     </message>
     <message>
         <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
+        <translation>Offline</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2482,25 +1989,9 @@ Cím: %4
         <source>Show transaction details</source>
         <translation>Tranzakciós részletek megjelenítése</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Az exportálás sikertelen volt</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2526,10 +2017,6 @@ Cím: %4
         <source>Address</source>
         <translation>Cím</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Összeg</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>Azonosító</translation>
@@ -2543,13 +2030,12 @@ Cím: %4
         <translation>meddig</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2579,14 +2065,6 @@ Cím: %4
         <source>Backup Failed</source>
         <translation>Biztonsági másolat készítése sikertelen</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>Sikeres biztonsági mentés</translation>
@@ -2594,20 +2072,6 @@ Cím: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Használat:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Parancsok kilistázása
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Segítség egy parancsról
-</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opciók
@@ -2652,10 +2116,6 @@ Cím: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Helytelenül viselkedő peerek kizárási ideje másodpercben (alapértelmezés: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>JSON-RPC csatlakozásokhoz figyelendő &lt;port&gt; (alapértelmezett: 8332 or testnet: 18332)</translation>
@@ -2665,10 +2125,6 @@ Cím: %4
         <translation>Parancssoros és JSON-RPC parancsok elfogadása
 </translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Háttérben futtatás daemonként és parancsok elfogadása
@@ -2683,184 +2139,30 @@ Cím: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Kívülről érkező kapcsolatok elfogadása (alapértelmezett: 1, ha nem használt a -proxy vagy a -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Regressziós teszt mód indítása, amely egy speciális láncot használ, amelyben a blokkok azonnal feloldhatók. Ez regressziós tesztalkalmazások által és alkalmazásfejlesztéshez használható.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Hiba: a tranzakciót elutasították. Ezt az okozhatja, ha már elköltöttél valamennyi érmét a tárcádból például ha a wallet.dat-od egy másolatát használtad, és így az elköltés csak abban lett jelölve, de itt nem.</translation>
     </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Parancs, amit akkor hajt végre, amikor egy tárca-tranzakció megváltozik  (%s a parancsban lecserélődik a blokk TxID-re)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Figyelem: a -paytxfee nagyon magas.  Ennyi tranzakciós díjat fogsz fizetni, ha elküldöd a tranzakciót.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Figyelem: Ellenőrizd, hogy helyesen van-e beállítva a gépeden a dátum és az idő.  A Bitcoin nem fog megfelelően működni, ha rosszul van beállítvaaz órád.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Csatlakozás csak a megadott csomóponthoz</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Sérült blokk-adatbázis észlelve</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Saját IP-cím felfedezése (alapértelmezett: 1, amikor figyel és nem használt a -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Újra akarod építeni a blokk adatbázist most?</translation>
@@ -2883,11 +2185,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <translation>Hiba: kevés a hely a lemezen!</translation>
     </message>
     <message>
         <source>Error: system error: </source>
@@ -2937,22 +2235,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>A stornóadatok írása nem sikerült</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Érmék generálása (alapértelmezett: 0)</translation>
@@ -2961,70 +2243,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Hány blokkot ellenőrizzen induláskor (alapértelmezett: 288, 0 = mindet)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
+        <translation>Importálás</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Helytelen vagy nemlétező genézis blokk. Helytelen hálózati adatkönyvtár?</translation>
     </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Nincs elég fájlleíró. </translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blokklánc index újraalkotása az alábbi blk000??.dat fájlokból</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Blokkok ellenőrzése...</translation>
@@ -3033,146 +2267,38 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Tárca ellenőrzése...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Az adatbázist újra kell építeni -reindex használatával (módosítás -tindex).</translation>
     </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Információ</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Érvénytelen -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos; összeg</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Érvénytelen -mintxfee=&lt;amount&gt;: &apos;%s&apos; összeg</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Érvénytelen -minrelaytxfee=&lt;amount&gt;: '%s' összeg</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Érvénytelen -mintxfee=&lt;amount&gt;: '%s' összeg</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
         <translation>Teljes tranzakcióindex megőrzése (alapértelmezett: 0)</translation>
     </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Csak blokklánccal egyező beépített ellenőrző pontok elfogadása (alapértelmezés: 1)</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-opciók: (lásd a Bitcoin Wiki SSL-beállítási instrukcióit)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Csak a &lt;net&gt; hálózat csomópontjaihoz kapcsolódjon (IPv4, IPv6 vagy Tor)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>trace/debug információ küldése a konzolra a debog.log fájl helyett</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Signing transaction failed</source>
         <translation>Tranzakció aláírása sikertelen</translation>
@@ -3181,14 +2307,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Csatlakozás időkerete milliszekundumban (alapértelmezett: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Rendszerhiba:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Ez egy kísérleti szoftver.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Tranzakció összege túl alacsony</translation>
@@ -3218,39 +2344,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning</source>
         <translation>Figyelem</translation>
     </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>verzió</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Jelszó JSON-RPC csatlakozásokhoz
-</translation>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>JSON-RPC csatlakozások engedélyezése meghatározott IP-címről
-</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Parancsok küldése &lt;ip&gt; címen működő csomóponthoz (alapértelmezett: 127.0.0.1)
 </translation>
     </message>
     <message>
@@ -3291,10 +2387,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Ez a súgó-üzenet
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>A %s nem elérhető ezen a gépen (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>DNS-kikeresés engedélyezése az addnode-nál és a connect-nél</translation>
@@ -3307,41 +2399,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Hiba a wallet.dat betöltése közben: meghibásodott tárca</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Hiba a wallet.dat betöltése közben: ehhez a tárcához újabb verziójú Bitcoin-kliens szükséges</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>A Tárca újraírása szükséges: Indítsa újra a teljesen a Bitcoin-t</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Hiba az wallet.dat betöltése közben</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Érvénytelen -proxy cím: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Érvénytelen -proxy cím: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Ismeretlen hálózat lett megadva -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Ismeretlen hálózat lett megadva -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Ismeretlen -socks proxy kérése: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Csatlakozási cím (-bind address) feloldása nem sikerült: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Csatlakozási cím (-bind address) feloldása nem sikerült: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Külső cím (-externalip address) feloldása nem sikerült: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Külső cím (-externalip address) feloldása nem sikerült: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Étvénytelen -paytxfee=&lt;összeg&gt; összeg: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Étvénytelen -paytxfee=&lt;összeg&gt; összeg: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3387,13 +2467,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Hiba</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Be kell állítani rpcpassword=&lt;password&gt; a konfigurációs fájlban
-%s
-Ha a fájl nem létezik, hozd létre &apos;csak a felhasználó által olvasható&apos; fájl engedéllyel</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 2b9685f6a0f4..80d4141beb96 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="id_ID" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Mengenai Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>versi &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Software ini adalah yang bersifat percobaan.
-
-Dibagikan dengan izin software MIT/X11, bacalah arsip COPYING atau  http://www.opensource.org/licenses/mit-license.php.
-
-Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit OpenSSL (http://www.openssl.org/) dan software kriptografi dibangun oleh Eric Young (eay@cryptsoft.com) dan software UPnP dibangun oleh Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Pembangun Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="id_ID" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>Exporting Failed</source>
         <translation>Proses Ekspor Gagal</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>Repeat new passphrase</source>
         <translation>Ulangi kata kunci baru</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Masukkan kata kunci baru ke dompet.&lt;br/&gt;Mohon gunakan kata kunci dengan &lt;b&gt;10 karakter atau lebih dengan acak&lt;/b&gt;, atau &lt;b&gt;delapan kata atau lebih&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Enkripsi dompet</translation>
@@ -212,10 +167,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Apakah kamu yakin ingin mengenkripsi dompet anda?</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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Perhatian: tombol Caps Lock sementara aktif!</translation>
@@ -295,10 +246,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>Quit application</source>
         <translation>Keluar dari aplikasi</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Tampilkan informasi mengenai Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Mengenai &amp;Qt</translation>
@@ -311,10 +258,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>&amp;Options...</source>
         <translation>&amp;Pilihan...</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation>%Enkripsi Dompet...</translation>
-    </message>
     <message>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Cadangkan Dompet...</translation>
@@ -459,10 +402,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Tampilkan pesan bantuan Bitcoin Core untuk memberikan daftar pilihan perintah-baris yang memungkinkan dalam aplikasi Bitcoin</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Klien Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n hubungan aktif ke jaringan Bitcoin</numerusform></translation>
@@ -471,10 +410,6 @@ Produk ini termasuk software yang dibangun oleh Proyek OpenSSL untuk Toolkit Ope
         <source>No block source available...</source>
         <translation>Sumber blok tidak tersedia...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Proses % 1 dar i% 2 (perkiraan) blok catatan transaksi</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>%1 blok-blok riwayat transaksi telah diproses</translation>
@@ -559,10 +494,6 @@ Alamat: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Dompet saat ini &lt;b&gt;terenkripsi&lt;/b&gt; dan &lt;b&gt;terkunci&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Terjadi kesalahan fatal. Bitcoin tidak bisa lagi meneruskan dengan aman dan akan berhenti.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,10 +528,6 @@ Alamat: %4
         <source>Fee:</source>
         <translation>Biaya:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Jumlah Yang Sedikit:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Dengan Biaya:</translation>
@@ -689,10 +616,6 @@ Alamat: %4
         <source>Copy priority</source>
         <translation>Salin prioritas</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Salin jumlah yang sedikit</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Salin uang kembali</translation>
@@ -741,10 +664,6 @@ Alamat: %4
         <source>none</source>
         <translation>tidak satupun</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Debu</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>ya</translation>
@@ -770,25 +689,13 @@ Alamat: %4
         <translation>Makin penting transaksinya, makin kemungkinan akan termasuk dalam blok.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Label ini akan berubah merah, jika prioritas lebih kecil dari &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Label ini akan berubah merah, jika prioritas lebih kecil dari "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Label ini akan berubah merah, jika setiap penerima menerima nilai lebih kecil dari %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Berarti perlu biaya lebih dari %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Nilai yang kurang dari 0.546 kali biaya pengiriman minimal akan ditampilkan sebagai debu.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Label ini akan berubah merah, jika perubahan itu lebih kecil dari %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(tidak ada label)</translation>
@@ -841,12 +748,12 @@ Alamat: %4
         <translation>Ubah alamat mengirim</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Alamat yang dimasukkan &quot;%1&quot; sudah ada di dalam buku alamat.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Alamat yang dimasukkan "%1" sudah ada di dalam buku alamat.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Alamat yang dimasukkan &quot;%1&quot; bukan alamat Bitcoin yang benar.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Alamat yang dimasukkan "%1" bukan alamat Bitcoin yang benar.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +789,6 @@ Alamat: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - pilihan Perintah-baris</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +797,10 @@ Alamat: %4
         <source>version</source>
         <translation>versi</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Mengenai Bitcoin Core</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Penggunaan:</translation>
@@ -907,26 +814,18 @@ Alamat: %4
         <translation>pilihan UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Atur bahasa, sebagai contoh &quot;id_ID&quot; (standar: system locale)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Atur bahasa, sebagai contoh "id_ID" (standar: system locale)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Memulai terminimalisi</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Tampilkan layar pembuka saat nyala (standar: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -937,14 +836,6 @@ Alamat: %4
         <source>Welcome to Bitcoin Core.</source>
         <translation>Selamat Datang ke Bitcoin Core</translation>
     </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Menggunakan direktori untuk data yang biasa.</translation>
@@ -954,12 +845,8 @@ Alamat: %4
         <translation>Menggunakan direktori data yang dipilih Anda:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Gagal: Direktori untuk data &quot;%1&quot; tidak bisa dibuat.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1023,18 +910,10 @@ Alamat: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Menyalakan Bitcoin pada login sistem</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Menghubungkan jaringan Bitcoin lewat proxy SOCKS.</translation>
@@ -1047,13 +926,9 @@ Alamat: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Alamat IP proxy (cth. IPv4: 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 type="unfinished"/>
-    </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>Transaksi URLs pihak ketiga</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1071,10 +946,6 @@ Alamat: %4
         <source>&amp;Network</source>
         <translation>&amp;Jaringan</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>D&amp;ompet</translation>
@@ -1115,14 +986,6 @@ Alamat: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port proxy (cth. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Versi &amp;SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versi proxy SOCKS (cth. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Jendela</translation>
@@ -1163,14 +1026,6 @@ Alamat: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Pilihan standar unit yang ingin ditampilkan pada layar aplikasi dan saat mengirim koin.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Apakah menampilkan alamat-alamat Bitcoin dalam daftar transaksi atau tidak.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Tampilkan alamat dalam daftar transaksi</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Ingin menunjukkan cara pengaturan koin atau tidak.</translation>
@@ -1197,15 +1052,15 @@ Alamat: %4
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
+        <translation>Restart klien diperlukan untuk mengaktifkan perubahan.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
+        <translation>Klien akan dimatikan, apakah anda hendak melanjutkan?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
+        <translation>Perubahan ini akan memerlukan restart klien</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
@@ -1274,8 +1129,8 @@ Alamat: %4
         <translation>Penanganan URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI tidak bisa dimengerti! Biasanya oleh karena alamat Bitcoin yang tidak sah atau persoalan tentang parameter-parameter URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Alamat pembayaran salah %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1285,34 +1140,6 @@ Alamat: %4
         <source>Payment request error</source>
         <translation>Gagalan permintaan pembayaran</translation>
     </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Proxy Anda tidak mendukung SOCKS5, yang diperlu untuk permintaan pembayaran melalui proxy.</translation>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Refund from %1</source>
         <translation>Pembayaran kembali dari %1</translation>
@@ -1321,10 +1148,6 @@ Alamat: %4
         <source>Error communicating with %1: %2</source>
         <translation>Masalah berkomunikasi dengan %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Jawaban salah dari server %1</translation>
@@ -1338,33 +1161,28 @@ Alamat: %4
         <translation>Gagalan permintaan dari jaringan</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Gagal: Tidak ada direktori untuk data &quot;%1&quot;.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Kesalahan: Tidak dapat memproses pengaturan berkas: %1. Hanya menggunakan kunci= nilai sintak.</translation>
+        <source>Amount</source>
+        <translation>Nilai</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Gagal: Gabungan -regtest dan -testnet salah</translation>
+        <source>%1 h</source>
+        <translation>%1 Jam</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 menit</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Masukkan alamat Bitcoin (cth. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>T/S</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1256,6 @@ Alamat: %4
         <source>Current number of blocks</source>
         <translation>Jumlah blok terkini</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Perkiraan jumlah blok</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Waktu blok terakhir</translation>
@@ -1518,19 +1332,7 @@ Alamat: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 menit</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 Jam</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 Jam %2 menit</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1545,18 +1347,10 @@ Alamat: %4
         <source>&amp;Message:</source>
         <translation>&amp;Pesan:</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>Gunakan lagi alamat penerima yang ada (tidak disarankan)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Label opsional untuk mengasosiasikan dengan alamat penerima baru.</translation>
@@ -1742,10 +1536,6 @@ Alamat: %4
         <source>Fee:</source>
         <translation>Biaya:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Jumlah Yang Sedikit:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Dengan Biaya:</translation>
@@ -1774,10 +1564,6 @@ Alamat: %4
         <source>Clear all fields of the form.</source>
         <translation>Hapus informasi dari form.</translation>
     </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>Hapus %Semua</translation>
-    </message>
     <message>
         <source>Balance:</source>
         <translation>Saldo:</translation>
@@ -1822,10 +1608,6 @@ Alamat: %4
         <source>Copy priority</source>
         <translation>Salin prioritas</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Salin jumlah yang sedikit</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Salin uang kembali</translation>
@@ -1874,10 +1656,6 @@ Alamat: %4
         <source>(no label)</source>
         <translation>(tidak ada label)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Apakah Anda yakin ingin kirim?</translation>
@@ -1886,14 +1664,6 @@ Alamat: %4
         <source>added as transaction fee</source>
         <translation>ditambahkan sebagai biaya transaksi</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Permintaan pembayaran telah kadaluarsa</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Alamat pembayaran salah %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1675,6 @@ Alamat: %4
         <source>Pay &amp;To:</source>
         <translation>Kirim &amp;Ke:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Alamat pembayaran (cth. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Masukkan label bagi alamat ini untuk menambahkannya ke buku alamat Anda</translation>
@@ -1923,7 +1689,7 @@ Alamat: %4
     </message>
     <message>
         <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
+        <translation>Ini adalah pembayaran normal</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1939,7 +1705,7 @@ Alamat: %4
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation type="unfinished"/>
+        <translation>Hapus masukan ini</translation>
     </message>
     <message>
         <source>Message:</source>
@@ -1953,10 +1719,6 @@ Alamat: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Masukkan label untuk alamat ini untuk dimasukan dalam daftar alamat yang pernah digunakan</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>Permintaan pembayaran tidak terverifikasi.</translation>
@@ -1991,14 +1753,6 @@ Alamat: %4
         <source>&amp;Sign Message</source>
         <translation>&amp;Tandakan Pesan</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Alamat yang akan ditandai pesan (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Pilih alamat yang telah digunakan sebelumnya</translation>
@@ -2039,26 +1793,10 @@ Alamat: %4
         <source>Reset all sign message fields</source>
         <translation>Hapus semua bidang penanda pesan</translation>
     </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>Hapus %Semua</translation>
-    </message>
     <message>
         <source>&amp;Verify Message</source>
         <translation>&amp;Verifikasi Pesan</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verify &amp;Message</source>
         <translation>Verifikasi &amp;Pesan</translation>
@@ -2068,12 +1806,8 @@ Alamat: %4
         <translation>Hapus semua bidang verifikasi pesan</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Masukkan alamat Bitcoin (cth. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Tekan "Tandatangan Pesan" untuk menghasilan tanda tangan</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2244,10 +1978,6 @@ Alamat: %4
         <source>Merchant</source>
         <translation>Pedagang</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Informasi debug</translation>
@@ -2310,10 +2040,6 @@ Alamat: %4
         <source>Address</source>
         <translation>Alamat</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Nilai</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Terlalu muda (cuma %1 konfirmasi, akan siap sesudah %2) </translation>
@@ -2489,10 +2215,6 @@ Alamat: %4
         <source>Exporting Failed</source>
         <translation>Proses Ekspor Gagal</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Successful</source>
         <translation>Proses Ekspor Berhasil</translation>
@@ -2525,10 +2247,6 @@ Alamat: %4
         <source>Address</source>
         <translation>Alamat</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Nilai</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2260,9 @@ Alamat: %4
         <translation>ke</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2578,10 +2299,6 @@ Alamat: %4
         <source>Backup Failed</source>
         <translation>Cadangkgan Gagal</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Informasi dalam dompet berhasil disimpan di %1.</translation>
@@ -2593,18 +2310,6 @@ Alamat: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Penggunaan:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Daftar perintah</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Dapatkan bantuan untuk perintah</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Pilihan:</translation>
@@ -2645,22 +2350,10 @@ Alamat: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Jumlah kedua untuk menjaga peer buruk dari hubung-ulang (standar: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Menerima perintah baris perintah dan JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Berjalan dibelakang sebagai daemin dan menerima perintah</translation>
@@ -2673,89 +2366,18 @@ Alamat: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Terima hubungan dari luar (standar: 1 kalau -proxy atau -connect tidak dipilih)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation>
-</translation>
-    </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Sandi yang diterima (biasanya: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Gagal: Transaksi ditolak. Ini mungkin terjadi jika beberapa dari koin dalam dompet Anda telah digunakan, seperti ketika Anda menggunakan salinan wallet.dat dan beberapa koin telah dibelanjakan dalam salinan tersebut tetapi disini tidak tertandai sebagai terpakai.</translation>
     </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Jalankan perintah ketika perubahan transaksi dompet (%s di cmd digantikan oleh TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Tidak bisa mengikat dengan %s di computer ini. Kemungkinan Bitcoin Core sudah mulai.</translation>
@@ -2768,10 +2390,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Peringatan: -paytxfee sangat besar! Ini adalah biaya pengiriman yang akan dibayar oleh Anda jika transaksi terkirim.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Perhatian: Mohon diperiksa pengaturan tanggal dan waktu komputer anda apakah sudah benar! Jika pengaturan waktu salah aplikasi Bitcoin tidak akan berjalan dengan tepat.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Peringatan: Jaringan tidak semua bersetuju! Beberapa penambang dapat persoalan.</translation>
@@ -2784,10 +2402,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Awas: wallet.dat tidak bisa dibaca! Berhasil periksakan kunci-kunci dalam arsipnya, tetapi ada kemungkinan informasi tentang transaksi atau isi-isi buku alamat salah atau terhilang.</translation>
     </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(pengaturan awal: 1)</translation>
@@ -2796,38 +2410,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>(default: wallet.dat)</source>
         <translation>(pengaturan awal: wallet.dat)</translation>
     </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Coba memulihkan kunci-kunci pribadi dari wallet.dat yang rusak</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Daemon Bitcoin Core</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Pilihan pembuatan blok:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Jangan menghubungkan node(-node) selain yang di daftar</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Hubungkan melalui proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Pilih koneksi:</translation>
@@ -2836,21 +2430,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Corrupted block database detected</source>
         <translation>Menemukan database blok yang rusak </translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Cari alamat IP Anda sendiri (biasanya: 1 saat mendengarkan dan -externalip tidak terpilih)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>Jangan memuat dompet dan menonaktifkan panggilan dompet RPC</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2884,10 +2470,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error: system error: </source>
         <translation>Error: system error:</translation>
     </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Failed to read block info</source>
         <translation>Gagal membaca informasi dari blok</translation>
@@ -2918,7 +2500,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <translation>Gagal menuliskan ke dalam database koin</translation>
     </message>
     <message>
         <source>Failed to write transaction index</source>
@@ -2926,23 +2508,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Biaya untuk setiap kB yang akan ditambahkan ke transaksi yang Anda kirim</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Cari peer dengan daftar alamat DNS (biasanya: 1 jika -connect tidak terpilih)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Gagal menulis ulang data</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2952,10 +2518,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Periksakan berapa blok waktu mulai (biasanya: 288, 0 = setiapnya)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>mengimpor...</translation>
@@ -2965,33 +2527,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Tidak bisa cari blok pertama, atau blok pertama salah. Salah direktori untuk jaringan?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Alamat -onion salah: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Alamat -onion salah: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Deskripsi berkas tidak tersedia dengan cukup.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Pilihan RPC klien:</translation>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Pililah versi SOCKS untuk -proxy (4 atau 5, biasanya: 5)</translation>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Atur ukuran maksimal untuk blok dalam byte (biasanya: %d)</translation>
@@ -3008,14 +2550,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
         <translation>Perubahan saldo untuk transaksi yang belum dikonfirmasi setelah transaksi terkirim (default: 1)</translation>
     </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Blok-blok sedang diverifikasi...</translation>
@@ -3024,21 +2558,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Dompet sedang diverifikasi...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Tunggu sampai server RPC dimulai</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Dompet %s ada diluar direktori data %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <translation>Opsi dompet:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
@@ -3052,93 +2578,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Tidak bisa mengunci data directory %s. Kemungkinan Bitcoin Core sudah mulai.</translation>
     </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informasi</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nilai yang salah untuk -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nilai yang salah untuk -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nilai yang salah untuk -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nilai yang salah untuk -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
         <translation>Jaga daftar transaksi yang lengkap (biasanya: 0)</translation>
     </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Dilarang menghubungkan node-node selain &lt;net&gt; (IPv4, IPv6 atau Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Pilihan SSL: (petunjuk pengaturan SSL lihat dalam Bitcoin Wiki)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <translation>Opsi server RPC:</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3148,18 +2610,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Atur ukuran minimal untuk blok dalam byte (standar: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Mengecilkan berkas debug.log saat klien berjalan  (Standar: 1 jika tidak -debug)</translation>
@@ -3172,10 +2622,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Menetapkan waktu berakhir koneksi di milidetik (biasanya: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Memulai Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Kesalahan sistem:</translation>
@@ -3192,14 +2638,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Transaksi terlalu besar</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Nama pengguna untuk hubungan JSON-RPC</translation>
@@ -3214,15 +2652,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation>Setiap transaksi dalam dompet sedang di-&apos;Zap&apos;...</translation>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versi</translation>
+        <translation>Setiap transaksi dalam dompet sedang di-'Zap'...</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
@@ -3232,14 +2662,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Kata sandi untuk hubungan JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Izinkan hubungan JSON-RPC dari alamat IP yang ditentukan</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Kirim perintah ke node berjalan pada &lt;ip&gt; (standar: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Menjalankan perintah ketika perubahan blok terbaik (%s dalam cmd digantikan oleh hash blok)</translation>
@@ -3272,10 +2694,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Pesan bantuan ini</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Tidak dapat mengikat ke %s dengan komputer ini (ikatan gagal %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Izinkan peninjauan DNS untuk -addnote, -seednode dan -connect</translation>
@@ -3288,41 +2706,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Gagal memuat wallet.dat: Dompet rusak</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Gagal memuat wallet.dat: Dompet memerlukan versi Bitcoin yang terbaru</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Dompet diperlukan untuk disimpan-ulang: nyala-ulangkan Bitcoin untuk menyelesaikan</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Gagal memuat wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Alamat -proxy salah: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Jaringan tidak diketahui yang ditentukan dalam -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Alamat -proxy salah: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Diminta versi proxy -socks tidak diketahui: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Jaringan tidak diketahui yang ditentukan dalam -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Tidak dapat menyelesaikan alamat -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Tidak dapat menyelesaikan alamat -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Tidak dapat menyelesaikan alamat -externalip: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Tidak dapat menyelesaikan alamat -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nilai salah untuk -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nilai salah untuk -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3368,13 +2774,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Gagal</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Anda harus mengatur rpcpassword=&lt;kata sandi&gt; dalam berkas konfigurasi:
-%s
-Jika berkas tidak ada, buatlah dengan permisi berkas hanya-dapat-dibaca-oleh-pemilik.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index cb9fed1ab932..a803241d10db 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1,46 +1,9 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Info su Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Versione &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Questo è un software sperimentale.
-
-Distribuito sotto la licenza software MIT/X11, vedi il file COPYING incluso oppure su http://www.opensource.org/licenses/mit-license.php.
-
-Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso del Toolkit OpenSSL (http://www.openssl.org/), software crittografico scritto da Eric Young (eay@cryptsoft.com) e software UPnP scritto da Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Gli sviluppatori del Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="it" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Doppio click per modificare l&apos;indirizzo o l&apos;etichetta</translation>
+        <translation>Doppio click per modificare l'indirizzo o l'etichetta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -52,7 +15,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copia l&apos;indirizzo attualmente selezionato negli appunti</translation>
+        <translation>Copia l'indirizzo attualmente selezionato negli appunti</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -64,11 +27,11 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>&amp;Copia l&apos;indirizzo</translation>
+        <translation>&amp;Copia l'indirizzo</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>Cancella l&apos;indirizzo attualmente selezionato dalla lista</translation>
+        <translation>Cancella l'indirizzo attualmente selezionato dalla lista</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -84,11 +47,11 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Scegli l&apos;indirizzo a cui inviare bitcoin</translation>
+        <translation>Scegli l'indirizzo a cui inviare bitcoin</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Scegli l&apos;indirizzo con cui ricevere bitcoin</translation>
+        <translation>Scegli l'indirizzo con cui ricevere bitcoin</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -96,7 +59,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Indirizzi d&apos;invio</translation>
+        <translation>Indirizzi d'invio</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
@@ -104,7 +67,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Questo è un elenco di indirizzi bitcoin a cui puoi inviare pagamenti. Controlla sempre l&apos;importo e l&apos;indirizzo del beneficiario prima di inviare bitcoin.</translation>
+        <translation>Questo è un elenco di indirizzi bitcoin a cui puoi inviare pagamenti. Controlla sempre l'importo e l'indirizzo del beneficiario prima di inviare bitcoin.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
@@ -112,7 +75,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Copia &amp;l&apos;etichetta</translation>
+        <translation>Copia &amp;l'etichetta</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
@@ -130,11 +93,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
         <source>Exporting Failed</source>
         <translation>Esportazione Fallita.</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Si è verificato un errore tentando di salvare la lista degli indirizzi in %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,17 +127,13 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
         <source>Repeat new passphrase</source>
         <translation>Ripeti la nuova passphrase</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Inserisci la nuova passphrase per il portamonete.&lt;br/&gt;Si prega di usare una passphrase di &lt;b&gt;10 o più caratteri casuali&lt;/b&gt;, o di &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cifra il portamonete</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Quest&apos;operazione necessita della passphrase per sbloccare il portamonete.</translation>
+        <translation>Quest'operazione necessita della passphrase per sbloccare il portamonete.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -186,7 +141,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Quest&apos;operazione necessita della passphrase per decifrare il portamonete,</translation>
+        <translation>Quest'operazione necessita della passphrase per decifrare il portamonete,</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -295,10 +250,6 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
         <source>Quit application</source>
         <translation>Chiudi applicazione</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostra informazioni su Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Informazioni su &amp;Qt</translation>
@@ -325,7 +276,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;Indirizzi d&apos;invio...</translation>
+        <translation>&amp;Indirizzi d'invio...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
@@ -421,7 +372,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Barra degli strumenti &quot;Tabs&quot;</translation>
+        <translation>Barra degli strumenti "Tabs"</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -459,10 +410,6 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Mostra il messaggio di aiuto di Bitcoin Core per avere la lista di tutte le opzioni della riga di comando di Bitcoin.</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin client</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n connessione attiva alla rete Bitcoin</numerusform><numerusform>%n connessioni attive alla rete Bitcoin</numerusform></translation>
@@ -471,10 +418,6 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
         <source>No block source available...</source>
         <translation>Nessuna fonte di blocchi disponibile</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Processati %1 di %2 blocchi totali (stimati) della cronologia transazioni.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Processati %1 blocchi della cronologia transazioni.</translation>
@@ -505,7 +448,7 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation>L&apos;ultimo blocco ricevuto è stato generato %1 fa.</translation>
+        <translation>L'ultimo blocco ricevuto è stato generato %1 fa.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
@@ -560,10 +503,6 @@ Indirizzo: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Il portamonete è &lt;b&gt;cifrato&lt;/b&gt; ed attualmente &lt;b&gt;bloccato&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Riscontrato un errore irreversibile. Bitcoin non può più continuare in sicurezza e sarà terminato.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,10 +537,6 @@ Indirizzo: %4
         <source>Fee:</source>
         <translation>Commissione:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Low Output:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Dopo Commissione:</translation>
@@ -648,19 +583,19 @@ Indirizzo: %4
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Copia l&apos;indirizzo</translation>
+        <translation>Copia l'indirizzo</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Copia l&apos;etichetta</translation>
+        <translation>Copia l'etichetta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l&apos;importo</translation>
+        <translation>Copia l'importo</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copia l&apos;ID transazione</translation>
+        <translation>Copia l'ID transazione</translation>
     </message>
     <message>
         <source>Lock unspent</source>
@@ -690,10 +625,6 @@ Indirizzo: %4
         <source>Copy priority</source>
         <translation>Copia priorità</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copia low output</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copia resto</translation>
@@ -742,10 +673,6 @@ Indirizzo: %4
         <source>none</source>
         <translation>nessuno</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Trascurabile</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>sì</translation>
@@ -771,25 +698,13 @@ Indirizzo: %4
         <translation>Le transazioni con priorità più alta hanno più probabilità di essere incluse in un blocco.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Questa etichetta diventa rossa se la priorità è inferiore a &quot;media&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Questa etichetta diventa rossa se la priorità è inferiore a "media".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Questa etichetta diventa rossa se uno qualsiasi dei destinatari riceve un ammontare inferiore di %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Questo significa che è richiesta una commissione di almeno %1</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Importi inferiori a 0,546 volte la commissione minima di trasferimento sono mostrati come trascurabili.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Questa etichetta diventa rossa se il resto è minore di %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(nessuna etichetta)</translation>
@@ -807,7 +722,7 @@ Indirizzo: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Modifica l&apos;indirizzo</translation>
+        <translation>Modifica l'indirizzo</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -815,11 +730,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation>L&apos;etichetta associata con questa voce della lista degli indirizzi</translation>
+        <translation>L'etichetta associata con questa voce della lista degli indirizzi</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation>L&apos;indirizzo associato a questa voce della rubrica. Può essere modificato solo per gli indirizzi d&apos;invio.</translation>
+        <translation>L'indirizzo associato a questa voce della rubrica. Può essere modificato solo per gli indirizzi d'invio.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -831,7 +746,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>New sending address</source>
-        <translation>Nuovo indirizzo d&apos;invio</translation>
+        <translation>Nuovo indirizzo d'invio</translation>
     </message>
     <message>
         <source>Edit receiving address</source>
@@ -839,15 +754,15 @@ Indirizzo: %4
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation>Modifica indirizzo d&apos;invio</translation>
+        <translation>Modifica indirizzo d'invio</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>L&apos;indirizzo inserito &quot;%1&quot; è già in rubrica.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>L'indirizzo inserito "%1" è già in rubrica.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>L&apos;indirizzo inserito &quot;%1&quot; non è un indirizzo bitcoin valido.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>L'indirizzo inserito "%1" non è un indirizzo bitcoin valido.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -883,10 +798,6 @@ Indirizzo: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Opzioni riga di comando</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -895,6 +806,18 @@ Indirizzo: %4
         <source>version</source>
         <translation>versione</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Info su Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>opzioni riga di comando</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Utilizzo:</translation>
@@ -908,8 +831,8 @@ Indirizzo: %4
         <translation>UI opzioni</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Imposta lingua, ad esempio &quot;it_IT&quot; (predefinita: lingua di sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Imposta lingua, ad esempio "it_IT" (predefinita: lingua di sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -921,11 +844,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>Mostra finestra di presentazione all&apos;avvio (predefinito: 1)</translation>
+        <translation>Mostra finestra di presentazione all'avvio (predefinito: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation>Scegli una cartella dati all&apos;avvio (predefinito: 0)</translation>
+        <translation>Scegli una cartella dati all'avvio (predefinito: 0)</translation>
     </message>
 </context>
 <context>
@@ -955,12 +878,8 @@ Indirizzo: %4
         <translation>Usa una cartella dati personalizzata:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Errore: La cartella dati &quot;%1&quot; specificata non può essere creata.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1018,11 +937,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Avvia automaticamente Bitcoin una volta effettuato l&apos;accesso al sistema.</translation>
+        <translation>Avvia automaticamente Bitcoin una volta effettuato l'accesso al sistema.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Avvia Bitcoin all&apos;accesso al sistema</translation>
+        <translation>&amp;Avvia Bitcoin all'accesso al sistema</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
@@ -1050,7 +969,7 @@ Indirizzo: %4
     </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 di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell&apos;URL è sostituito dall&apos;hash della transazione.
+        <translation>URL di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell'URL è sostituito dall'hash della transazione.
 Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
@@ -1091,11 +1010,11 @@ Più URL vengono separati da una barra verticale |.</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>Disabilitando l&apos;uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando la transazione non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo saldo.</translation>
+        <translation>Disabilitando l'uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando la transazione non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo saldo.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation>%Spendere resti non confermati</translation>
+        <translation>&amp;Spendere resti non confermati</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>
@@ -1117,14 +1036,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta del proxy (es. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versione SOCKS del proxy (es. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Finestra</translation>
@@ -1139,7 +1050,7 @@ Più URL vengono separati da una barra verticale |.</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 Quit in the menu.</source>
-        <translation>Riduci ad icona invece di uscire dall&apos;applicazione quando la finestra viene chiusa. Se l&apos;opzione è attiva, l&apos;applicazione terminerà solo dopo aver selezionato Esci dal menu File.</translation>
+        <translation>Riduci ad icona invece di uscire dall'applicazione quando la finestra viene chiusa. Se l'opzione è attiva, l'applicazione terminerà solo dopo aver selezionato Esci dal menu File.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1155,7 +1066,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>La lingua dell&apos;interfaccia utente può essere impostata qui. L&apos;impostazione avrà effetto dopo il riavvio di Bitcoin.</translation>
+        <translation>La lingua dell'interfaccia utente può essere impostata qui. L'impostazione avrà effetto dopo il riavvio di Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
@@ -1163,15 +1074,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Scegli l&apos;unità di suddivisione predefinita da utilizzare per l&apos;interfaccia e per l&apos;invio di monete.</translation>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Specifica se gli indirizzi saranno visualizzati nella lista delle transazioni.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Mostra gli indirizzi nella lista delle transazioni</translation>
+        <translation>Scegli l'unità di suddivisione predefinita da utilizzare per l'interfaccia e per l'invio di monete.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
@@ -1211,7 +1114,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>L&apos;indirizzo proxy che hai fornito è invalido.</translation>
+        <translation>L'indirizzo proxy che hai fornito è invalido.</translation>
     </message>
 </context>
 <context>
@@ -1276,12 +1179,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Gestione URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Impossibile interpretare l&apos;URI! Ciò può essere provocato da un indirizzo Bitcoin non valido o da parametri URI non corretti.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Indirizzo di pagamento non valido %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>L&apos;importo di pagamento richiesto di %1 è troppo basso (considerato come trascurabile).</translation>
+        <translation>L'importo di pagamento richiesto di %1 è troppo basso (considerato come trascurabile).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1291,14 +1194,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Impossibile avviare bitcoin: gestore click-to-pay</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Avviso Net manager</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Il proxy attualmente attivo non supporta SOCKS5, il quale è necessario per richieste di pagamento via proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL di recupero della Richiesta di pagamento non valido: %1</translation>
@@ -1307,10 +1202,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Payment request file handling</source>
         <translation>Gestione del file di richiesta del pagamento</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Il file di richiesta del pagamento non può essere letto o elaborato! Il file in questione potrebbe essere danneggiato.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Le richieste di pagamento non verificate verso script di pagamento personalizzati non sono supportate.</translation>
@@ -1323,10 +1214,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Error communicating with %1: %2</source>
         <translation>Errore di comunicazione con %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>La richiesta di pagamento non può essere analizzata o processata!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Risposta errata da parte del server %1</translation>
@@ -1340,33 +1227,36 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Errore di richiesta di rete</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Importo</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Errore: La cartella dati &quot;%1&quot; specificata non esiste.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Errore: impossibile interpretare il file di configurazione: %1. Usare esclusivamente la sintassi chiave=valore.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Errore: combinazione di -regtest e -testnet non valida.</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core non si è ancora chiuso con sicurezza...</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Inserisci un indirizzo Bitcoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/D</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1440,10 +1330,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Current number of blocks</source>
         <translation>Numero attuale di blocchi</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Numero totale stimato di blocchi</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Ora del blocco più recente</translation>
@@ -1521,18 +1407,18 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>never</source>
+        <translation>mai</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>Yes</source>
+        <translation>Si</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>No</source>
+        <translation>No</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1557,11 +1443,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>Un messaggio opzionale da allegare alla richiesta di pagamento, il quale sarà mostrato all&apos;apertura della richiesta. Nota: Il messaggio non sarà inviato con il pagamento sulla rete Bitcoin.</translation>
+        <translation>Un messaggio opzionale da allegare alla richiesta di pagamento, il quale sarà mostrato all'apertura della richiesta. Nota: Il messaggio non sarà inviato con il pagamento sulla rete Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation>Un&apos;etichetta facoltativa da associare al nuovo indirizzo di ricezione</translation>
+        <translation>Un'etichetta facoltativa da associare al nuovo indirizzo di ricezione</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
@@ -1605,7 +1491,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Copia l&apos;etichetta</translation>
+        <translation>Copia l'etichetta</translation>
     </message>
     <message>
         <source>Copy message</source>
@@ -1613,7 +1499,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l&apos;importo</translation>
+        <translation>Copia l'importo</translation>
     </message>
 </context>
 <context>
@@ -1664,11 +1550,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>L&apos;URI risultante è troppo lungo, prova a ridurre il testo nell&apos;etichetta / messaggio.</translation>
+        <translation>L'URI risultante è troppo lungo, prova a ridurre il testo nell'etichetta / messaggio.</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Errore nella codifica dell&apos;URI nel codice QR</translation>
+        <translation>Errore nella codifica dell'URI nel codice QR</translation>
     </message>
 </context>
 <context>
@@ -1744,10 +1630,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Fee:</source>
         <translation>Commissione:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Low Output:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Dopo Commissione:</translation>
@@ -1758,7 +1640,7 @@ Più URL vengono separati da una barra verticale |.</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>Se questo è abilitato e l&apos;indirizzo per il resto è vuoto o invalido, il resto sarà inviato ad un nuovo indirizzo bitcoin generato appositamente.</translation>
+        <translation>Se questo è abilitato e l'indirizzo per il resto è vuoto o invalido, il resto sarà inviato ad un nuovo indirizzo bitcoin generato appositamente.</translation>
     </message>
     <message>
         <source>Custom change address</source>
@@ -1786,7 +1668,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation>Conferma l&apos;azione di invio</translation>
+        <translation>Conferma l'azione di invio</translation>
     </message>
     <message>
         <source>S&amp;end</source>
@@ -1794,7 +1676,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation>Conferma l&apos;invio di bitcoin</translation>
+        <translation>Conferma l'invio di bitcoin</translation>
     </message>
     <message>
         <source>%1 to %2</source>
@@ -1806,7 +1688,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l&apos;importo</translation>
+        <translation>Copia l'importo</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -1824,10 +1706,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Copy priority</source>
         <translation>Copia priorità</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copia low output</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copia resto</translation>
@@ -1842,15 +1720,15 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation>L&apos;indirizzo del beneficiario non è valido, si prega di ricontrollare.</translation>
+        <translation>L'indirizzo del beneficiario non è valido, si prega di ricontrollare.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>L&apos;importo da pagare dev&apos;essere maggiore di 0.</translation>
+        <translation>L'importo da pagare dev'essere maggiore di 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation>L&apos;importo è superiore al tuo saldo attuale</translation>
+        <translation>L'importo è superiore al tuo saldo attuale</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
@@ -1858,7 +1736,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Rilevato un indirizzo duplicato, è possibile inviare bitcoin una sola volta agli indirizzi durante un&apos;operazione di invio.</translation>
+        <translation>Rilevato un indirizzo duplicato, è possibile inviare bitcoin una sola volta agli indirizzi durante un'operazione di invio.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -1888,14 +1766,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>added as transaction fee</source>
         <translation>aggiunto come tassa di transazione</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Richiesta di pagamento scaduta</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Indirizzo di pagamento non valido %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1907,13 +1777,9 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Pay &amp;To:</source>
         <translation>Paga &amp;a:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;indirizzo del beneficiario a cui inviare il pagamento (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation>Inserisci un&apos;etichetta per questo indirizzo, per aggiungerlo nella rubrica</translation>
+        <translation>Inserisci un'etichetta per questo indirizzo, per aggiungerlo nella rubrica</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1933,7 +1799,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Incollare l&apos;indirizzo dagli appunti</translation>
+        <translation>Incollare l'indirizzo dagli appunti</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1953,7 +1819,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation>Inserisci un&apos;etichetta per questo indirizzo per aggiungerlo alla lista degli indirizzi utilizzati</translation>
+        <translation>Inserisci un'etichetta per questo indirizzo per aggiungerlo alla lista degli indirizzi utilizzati</translation>
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
@@ -1997,10 +1863,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puoi firmare messaggi con i tuoi indirizzi in modo da dimostrarne il possesso. Presta attenzione a non firmare dichiarazioni vaghe, attacchi di phishing potrebbero cercare di spingerti ad apporre la tua firma su di esse. Firma solo dichiarazioni completamente dettagliate e delle quali condividi in pieno il contenuto.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;indirizzo con cui firmare il messaggio (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Scegli un indirizzo usato precedentemente</translation>
@@ -2011,7 +1873,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Incolla l&apos;indirizzo dagli appunti</translation>
+        <translation>Incolla l'indirizzo dagli appunti</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -2051,15 +1913,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Inserisci l&apos;indirizzo del firmatario, il messaggio (assicurati di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella firma più di quanto non sia riportato nel messaggio stesso, per evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>L&apos;indirizzo con cui è stato firmato il messaggio (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Inserisci l'indirizzo del firmatario, il messaggio (assicurati di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella firma più di quanto non sia riportato nel messaggio stesso, per evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>Verifica il messaggio per accertare che sia stato firmato con l&apos;indirizzo specificato</translation>
+        <translation>Verifica il messaggio per accertare che sia stato firmato con l'indirizzo specificato</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
@@ -2070,24 +1928,20 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Reimposta tutti i campi della verifica messaggio</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Inserisci un indirizzo Bitcoin (ad esempio 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Clicca &quot;Firma il messaggio&quot; per ottenere la firma</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Clicca "Firma il messaggio" per ottenere la firma</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation>L&apos;indirizzo inserito non è valido.</translation>
+        <translation>L'indirizzo inserito non è valido.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Per favore controlla l&apos;indirizzo e prova ancora</translation>
+        <translation>Per favore controlla l'indirizzo e prova ancora</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation>L&apos;indirizzo bitcoin inserito non è associato a nessuna chiave.</translation>
+        <translation>L'indirizzo bitcoin inserito non è associato a nessuna chiave.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
@@ -2095,7 +1949,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation>La chiave privata per l&apos;indirizzo inserito non è disponibile.</translation>
+        <translation>La chiave privata per l'indirizzo inserito non è disponibile.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2247,8 +2101,8 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Mercante</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>È necessario attendere %1 blocchi prima che i bitcoin generati possano essere spesi. Quando è stato generato questo blocco, è stato trasmesso alla rete in modo da poter essere aggiunto alla block chain. Se l&apos;inserimento avrà esito negativo il suo stato sarà modificato in &quot;non accettato&quot; e risulterà non spendibile. Questo può occasionalmente accadere se un altro nodo genera un blocco entro pochi secondi dal tuo.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>È necessario attendere %1 blocchi prima che i bitcoin generati possano essere spesi. Quando è stato generato questo blocco, è stato trasmesso alla rete in modo da poter essere aggiunto alla block chain. Se l'inserimento avrà esito negativo il suo stato sarà modificato in "non accettato" e risulterà non spendibile. Questo può occasionalmente accadere se un altro nodo genera un blocco entro pochi secondi dal tuo.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2312,10 +2166,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Importo</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Immaturo (%1 conferme, sarà disponibile fra %2)</translation>
@@ -2425,7 +2275,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>This year</source>
-        <translation>Quest&apos;anno</translation>
+        <translation>Quest'anno</translation>
     </message>
     <message>
         <source>Range...</source>
@@ -2453,7 +2303,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation>Inserisci un indirizzo o un&apos;etichetta da cercare</translation>
+        <translation>Inserisci un indirizzo o un'etichetta da cercare</translation>
     </message>
     <message>
         <source>Min amount</source>
@@ -2461,23 +2311,23 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Copia l&apos;indirizzo</translation>
+        <translation>Copia l'indirizzo</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Copia l&apos;etichetta</translation>
+        <translation>Copia l'etichetta</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l&apos;importo</translation>
+        <translation>Copia l'importo</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copia l&apos;ID transazione</translation>
+        <translation>Copia l'ID transazione</translation>
     </message>
     <message>
         <source>Edit label</source>
-        <translation>Modifica l&apos;etichetta</translation>
+        <translation>Modifica l'etichetta</translation>
     </message>
     <message>
         <source>Show transaction details</source>
@@ -2501,7 +2351,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation>Lo storico delle transazioni e&apos; stato salvato con successo in %1.</translation>
+        <translation>Lo storico delle transazioni e' stato salvato con successo in %1.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
@@ -2527,10 +2377,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Importo</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2544,6 +2390,9 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>a</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2595,18 +2444,6 @@ Più URL vengono separati da una barra verticale |.</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Utilizzo:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Elenca comandi</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Aiuto su un comando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opzioni:</translation>
@@ -2647,10 +2484,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Numero di secondi di sospensione che i peer di cattiva qualità devono attendere prima di potersi riconnettere (predefiniti: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Errore riscontrato durante l&apos;impostazione della porta RPC %u per l&apos;ascolto su IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Attendi le connessioni JSON-RPC su &lt;porta&gt; (predefinita: 8332 or testnet: 18332)</translation>
@@ -2659,10 +2492,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accetta comandi da riga di comando e JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Versione client RPC di Bitcoin Core</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Esegui in background come demone ed accetta i comandi</translation>
@@ -2673,7 +2502,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Accetta connessioni dall&apos;esterno (predefinito: 1 se no -proxy o -connect)</translation>
+        <translation>Accetta connessioni dall'esterno (predefinito: 1 se no -proxy o -connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2685,67 +2514,51 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, devi impostare una rpcpassword nel file di configurazione:
 %s
-Si raccomanda l&apos;uso della seguente password generata casualmente:
+Si raccomanda l'uso della seguente password generata casualmente:
 rpcuser=bitcoinrpc
 rpcpassword=%s
 (non serve ricordare questa password)
 Il nome utente e la password NON DEVONO essere uguali.
 Se il file non esiste, crealo concedendo permessi di lettura al solo proprietario del file.
 Si raccomanda anche di impostare alertnotify così sarai avvisato di eventuali problemi;
-ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo.com
+ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifrature accettabili (predefinito: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Errore riscontrato durante l&apos;impostazione della porta RPC %u per l&apos;ascolto su IPv6, tornando su IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Associa all&apos;indirizzo indicato e resta permanentemente in ascolto su questo. Usa la notazione [host]:porta per l&apos;IPv6</translation>
+        <translation>Associa all'indirizzo indicato e resta permanentemente in ascolto su questo. Usa la notazione [host]:porta per l'IPv6</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Limita la quantità di transazioni gratuite ad &lt;n&gt;*1000 byte al minuto (predefinito: 15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi sono risolti istantaneamente. Questo è fatto per lo sviluppo di strumenti e applicazioni per test di regressione.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi possono essere risolti istantaneamente.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Errore: l&apos;ascolto per le connessioni in ingresso non è riuscito (errore riportato %d) </translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Errore: la transazione è stata rifiutata! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere bitcoin e questi non sono stati considerati spesi dal portamonete corrente.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Errore: questa transazione necessita di una commissione di almeno %s a causa del suo ammontare, della sua complessità, o dell&apos;uso di fondi recentemente ricevuti!</translation>
+        <translation>Errore: questa transazione necessita di una commissione di almeno %s a causa del suo ammontare, della sua complessità, o dell'uso di fondi recentemente ricevuti!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Esegui comando quando una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Le commissioni inferiori a questo valore saranno considerate nulle (per la creazione della transazione) (prefedinito:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Scarica l&apos;attività del database dalla memoria al log su disco ogni &lt;n&gt; megabytes (predefinito: 100)</translation>
+        <translation>Scarica l'attività del database dalla memoria al log su disco ogni &lt;n&gt; megabytes (predefinito: 100)</translation>
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
@@ -2779,13 +2592,9 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Attenzione: si prega di controllare che la data e l&apos;ora del computer siano corrette. Se l&apos;ora di sistema è errata Bitcoin non funzionerà correttamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation>Attenzione: La rete non sembra essere d&apos;accordo pienamente! Alcuni minatori sembrano riscontrare problemi.</translation>
+        <translation>Attenzione: La rete non sembra essere d'accordo pienamente! Alcuni minatori sembrano riscontrare problemi.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
@@ -2815,30 +2624,14 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tenta di recuperare le chiavi private da un wallet.dat corrotto</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opzioni creazione blocco:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Cancella elenco delle transazioni sul portamonete (strumento di diagnostica; implica -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Connetti solo al nodo specificato</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Connetti attraverso SOCKS proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Connetti al JSON-RPC su &lt;port&gt; (predefinita: 8332 o testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Opzioni di connessione:</translation>
@@ -2869,11 +2662,11 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation>Errore durante l&apos;inizializzazione del database dei blocchi</translation>
+        <translation>Errore durante l'inizializzazione del database dei blocchi</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Errore durante l&apos;inizializzazione dell&apos;ambiente %s del database del portamonete!</translation>
+        <translation>Errore durante l'inizializzazione dell'ambiente %s del database del portamonete!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2897,7 +2690,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Nessuna porta disponibile per l&apos;ascolto. Usa -listen=0 se vuoi procedere comunque.</translation>
+        <translation>Nessuna porta disponibile per l'ascolto. Usa -listen=0 se vuoi procedere comunque.</translation>
     </message>
     <message>
         <source>Failed to read block info</source>
@@ -2909,11 +2702,11 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Failed to sync block index</source>
-        <translation>Sincronizzazione dell&apos;indice del blocco fallita</translation>
+        <translation>Sincronizzazione dell'indice del blocco fallita</translation>
     </message>
     <message>
         <source>Failed to write block index</source>
-        <translation>Scrittura dell&apos;indice del blocco fallita</translation>
+        <translation>Scrittura dell'indice del blocco fallita</translation>
     </message>
     <message>
         <source>Failed to write block info</source>
@@ -2933,24 +2726,12 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Failed to write transaction index</source>
-        <translation>Scrittura dell&apos;indice di transazione fallita</translation>
+        <translation>Scrittura dell'indice di transazione fallita</translation>
     </message>
     <message>
         <source>Failed to write undo data</source>
         <translation>Scrittura dei dati di ripristino fallita</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Commissione per kB da aggiungere alle transazioni in uscita</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Le commissioni inferiori a questo valore saranno considerate nulle (per la trasmissione) (prefedinito:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Trova peer utilizzando la ricerca DNS (predefinito: 1 a meno che non si usi -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Forza modalità provvisoria (predefinito: 0)</translation>
@@ -2961,7 +2742,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Numero di blocchi da controllare all&apos;avvio (predefinito: 288, 0 = tutti)</translation>
+        <translation>Numero di blocchi da controllare all'avvio (predefinito: 288, 0 = tutti)</translation>
     </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
@@ -2976,8 +2757,8 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <translation>Blocco genesis non corretto o non trovato. Cartella dati errata?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Indirizzo -onion non valido: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Indirizzo -onion non valido: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,19 +2766,11 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Preponi timestamp all&apos;output di debug (predefinito: 1)</translation>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opzioni client RPC:</translation>
+        <translation>Preponi timestamp all'output di debug (predefinito: 1)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Ricreare l&apos;indice della catena di blocchi dai file blk000??.dat correnti</translation>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Selezionare la versione SOCKS per -proxy (4 o 5, predefinito: 5)</translation>
+        <translation>Ricreare l'indice della catena di blocchi dai file blk000??.dat correnti</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
@@ -3013,7 +2786,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Specifica il file portamonete (all&apos;interno della cartella dati)</translation>
+        <translation>Specifica il file portamonete (all'interno della cartella dati)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
@@ -3021,11 +2794,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation>Questo è previsto per l&apos;uso con test di regressione e per lo sviluppo di applicazioni.</translation>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Usage (deprecato, usare bitcoin-cli):</translation>
+        <translation>Questo è previsto per l'uso con test di regressione e per lo sviluppo di applicazioni.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3035,10 +2804,6 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>Verifica portamonete...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Attendere l&apos;avvio dell&apos;RPC server</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Il portamonete %s si trova al di fuori dalla cartella dati %s</translation>
@@ -3047,10 +2812,6 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Opzioni portamonete:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Attenzione: Argomento deprecato -debugnet ignorato, usare -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>È necessario ricostruire il database usando -reindex per cambiare -txindex</translation>
@@ -3080,12 +2841,12 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <translation>Informazioni</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Importo non valido per -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Importo non valido per -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Importo non valido per -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Importo non valido per -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3117,11 +2878,11 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
-        <translation>Stampa il blocco all&apos;avvio, se presente nell&apos;indice dei blocchi</translation>
+        <translation>Stampa il blocco all'avvio, se presente nell'indice dei blocchi</translation>
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation>Stampa l&apos;albero dei blocchi all&apos;avvio (default: 0)</translation>
+        <translation>Stampa l'albero dei blocchi all'avvio (default: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3143,14 +2904,6 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Mantieni in esecuzione un thread per scaricare periodicamente il portafoglio (predefinito: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opzioni SSL: (vedi il wiki di Bitcoin per le istruzioni di configurazione SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Invia comando a Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Invia le informazioni di trace/debug alla console invece che al file debug.log</translation>
@@ -3161,19 +2914,15 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Imposta il flag DB_PRIVATE nell&apos;ambiente di database del portamonete (predefinito: 1)</translation>
+        <translation>Imposta il flag DB_PRIVATE nell'ambiente di database del portamonete (predefinito: 1)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra tutte le opzioni di debug (utilizzo: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Visualizza le informazioni relative al benchmark (predefinito: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Riduci il file debug.log all&apos;avvio del client (predefinito: 1 se non impostato -debug)</translation>
+        <translation>Riduci il file debug.log all'avvio del client (predefinito: 1 se non impostato -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
@@ -3183,21 +2932,21 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Specifica il timeout di connessione in millisecondi (predefinito: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Avvia Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Errore di sistema:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Questo è un software sperimentale.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Importo transazione troppo piccolo</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation>L&apos;importo della transazione deve essere positivo</translation>
+        <translation>L'importo della transazione deve essere positivo</translation>
     </message>
     <message>
         <source>Transaction too large</source>
@@ -3230,11 +2979,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>on startup</source>
-        <translation>all&apos;avvio</translation>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versione</translation>
+        <translation>all'avvio</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
@@ -3245,22 +2990,13 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <translation>Password per connessioni JSON-RPC
 </translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Consenti connessioni JSON-RPC dall&apos;indirizzo IP specificato
-</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Inviare comandi al nodo in esecuzione su &lt;ip&gt; (predefinito: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Esegui il comando quando il migliore blocco cambia(%s nel cmd è sostituito dall&apos;hash del blocco)</translation>
+        <translation>Esegui il comando quando il migliore blocco cambia(%s nel cmd è sostituito dall'hash del blocco)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation>Aggiorna il wallet all&apos;ultimo formato</translation>
+        <translation>Aggiorna il wallet all'ultimo formato</translation>
     </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
@@ -3289,10 +3025,6 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <translation>Questo messaggio di aiuto
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Impossibile associarsi alla %s su questo computer (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Consenti ricerche DNS per -addnode, -seednode e -connect</translation>
@@ -3305,41 +3037,29 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Errore caricamento wallet.dat: Portamonete corrotto</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Errore caricamento wallet.dat: il portamonete richiede una versione di Bitcoin più recente</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Il portamonete necessitava di essere riscritto: riavviare Bitcoin per completare</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Errore caricamento wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Indirizzo -proxy non valido: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Indirizzo -proxy non valido: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Rete sconosciuta specificata in -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Rete sconosciuta specificata in -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versione -socks proxy sconosciuta richiesta: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Impossibile risolvere -bind address: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Impossibile risolvere -bind address: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Impossibile risolvere indirizzo -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Impossibile risolvere indirizzo -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Importo non valido per -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Importo non valido per -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3351,7 +3071,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>Caricamento dell&apos;indice del blocco...</translation>
+        <translation>Caricamento dell'indice del blocco...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
@@ -3367,7 +3087,7 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation>Non è possibile scrivere l&apos;indirizzo predefinito</translation>
+        <translation>Non è possibile scrivere l'indirizzo predefinito</translation>
     </message>
     <message>
         <source>Rescanning...</source>
@@ -3379,19 +3099,11 @@ ad esempio: alertnotify=echo %%s | mail -s &quot;Allarme Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation>Per usare l&apos;opzione %s</translation>
+        <translation>Per usare l'opzione %s</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Errore</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Devi settare rpcpassword=&lt;password&gt; nel file di configurazione:
-%s
-Se il file non esiste, crealo assegnando i permessi di lettura solamente al proprietario.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index d3a6cece8759..f056dd401ee9 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;ビットコインコア&lt;/b&gt; バージョン</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-これは実験的なソフトウェアです。
-
-MIT/X11 ソフトウェア ライセンスの下で配布されています。詳しくは添付の COPYING ファイルやhttp://www.opensource.org/licenses/mit-license.php を参照してください。
-
-この製品は OpenSSL Toolkit (http://www.openssl.org/) に用いられる  Eric Young (eay@cryptsoft.com)  が開発した暗号化ソフトウェアと Thomas Bernard が開発した UPnP ソフトウェアを含んでいます。</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>ビットコインコアの開発者</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ja" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -106,10 +69,6 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>これらは支払いを送信するためのあなたの Bitcoin アドレスです。コインを送信する前に、常に額と受信アドレスを確認してください。</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>ラベルをコピー (&amp;L)</translation>
@@ -130,11 +89,7 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>Exporting Failed</source>
         <translation>エクスポート失敗</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +123,6 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>Repeat new passphrase</source>
         <translation>新しいパスフレーズをもう一度</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>ウォレットの新しいパスフレーズを入力してください。&lt;br/&gt;&lt;b&gt;8個以上の単語か10個以上のランダムな文字&lt;/b&gt;を使ってください。</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>ウォレットを暗号化する</translation>
@@ -295,10 +246,6 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>Quit application</source>
         <translation>アプリケーションを終了</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Bitcoinに関する情報を見る</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Qt について(&amp;Q)</translation>
@@ -431,38 +378,18 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>Bitcoin Core</source>
         <translation>Bitcoin のコア</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
         <translation>ビットコインコアについて (&amp;A)</translation>
     </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>支払いを受け取るアドレスとラベルのリストを表示する</translation>
     </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Command-line options</source>
         <translation>コマンドラインオプション (&amp;C)</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin クライアント</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n の Bitcoin ネットワークへのアクティブな接続</numerusform></translation>
@@ -471,10 +398,6 @@ MIT/X11 ソフトウェア ライセンスの下で配布されています。
         <source>No block source available...</source>
         <translation>利用可能なブロックがありません...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>取引履歴の %2 (推定値) の内 %1 ブロックを処理しました。</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>取引履歴の %1 ブロックを処理しました。</translation>
@@ -558,11 +481,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>ウォレットは&lt;b&gt;暗号化されて、ロックされています&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>致命的なエラーが発生しました。Bitcoin は安全に継続することができず終了するでしょう。
-</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -573,10 +491,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>数量:</translation>
@@ -597,18 +511,10 @@ Address: %4
         <source>Fee:</source>
         <translation>手数料:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>手数料差引後:</translation>
     </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(un)select all</source>
         <translation>すべて選択/選択解除</translation>
@@ -661,14 +567,6 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>取引 ID をコピー</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>数量をコピーする</translation>
@@ -689,62 +587,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>優先度をコピーする</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>none</source>
         <translation>なし</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
         <translation>はい</translation>
@@ -754,54 +600,14 @@ Address: %4
         <translation>いいえ</translation>
     </message>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>優先度が「中」未満の場合には、このラベルは赤くなります。</translation>
     </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -812,14 +618,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>ラベル(&amp;L)</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>アドレス帳 (&amp;A)</translation>
@@ -841,12 +639,12 @@ Address: %4
         <translation>送信アドレスを編集</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>入力されたアドレス &quot;%1&quot; は既にアドレス帳にあります。</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>入力されたアドレス "%1" は既にアドレス帳にあります。</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>入力されたアドレス &quot;%1&quot; は無効な Bitcoin アドレスです。</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>入力されたアドレス "%1" は無効な Bitcoin アドレスです。</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +680,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin のコア</translation>
@@ -894,6 +688,10 @@ Address: %4
         <source>version</source>
         <translation>バージョン</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>コマンドライン オプション</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>使用法:</translation>
@@ -907,17 +705,13 @@ Address: %4
         <translation>UI オプション</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>言語設定 例: &quot;de_DE&quot; (初期値: システムの言語)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>言語設定 例: "de_DE" (初期値: システムの言語)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>最小化された状態で起動する</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>起動時にスプラッシュ画面を表示する (初期値: 1)</translation>
@@ -933,18 +727,6 @@ Address: %4
         <source>Welcome</source>
         <translation>ようこそ</translation>
     </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>初期値のデータ ディレクトリを使用</translation>
@@ -954,12 +736,8 @@ Address: %4
         <translation>任意のデータ ディレクトリを使用:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>エラー: 指定のデータ ディレクトリ &quot;%1&quot; を作成できません。</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin のコア</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1031,34 +809,10 @@ Address: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>プロキシのIPアドレス (例えば IPv4: 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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>すべてのオプションを初期値に戻します。</translation>
@@ -1071,10 +825,6 @@ Address: %4
         <source>&amp;Network</source>
         <translation>ネットワーク (&amp;N)</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>ウォレット (&amp;A)</translation>
@@ -1087,14 +837,6 @@ Address: %4
         <source>Enable coin &amp;control features</source>
         <translation>コインコントロール機能を有効化する (&amp;C)</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>
@@ -1115,14 +857,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>プロキシのポート番号 (例 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS バージョン (&amp;V) :</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS プロキシのバージョン (例 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>ウインドウ (&amp;W)</translation>
@@ -1163,18 +897,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>インターフェース上の表示とコインの送信で使用する単位を選択します。</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>最近の取引履歴で Bitcoin アドレスを表示するかしないか。</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>取引履歴にアドレスを表示 (&amp;D)</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1195,18 +917,6 @@ Address: %4
         <source>Confirm options reset</source>
         <translation>オプションのリセットの確認</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>プロキシアドレスが無効です。</translation>
@@ -1226,18 +936,10 @@ Address: %4
         <source>Wallet</source>
         <translation>ウォレット</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>あなたの利用可能残高</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>未検証の取引で利用可能残高に反映されていない数</translation>
@@ -1274,13 +976,8 @@ Address: %4
         <translation>URI の操作</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI を解析できません! これは無効な Bitcoin アドレスあるいや不正な形式の URI パラメーターによって引き起こされる場合があります。
-</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>支払いのアドレス「%1」は無効です</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1290,42 +987,10 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Bitcoin を起動できません: click-to-pay handler</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>%1: %2とコミュニケーション・エラーです</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>サーバーの返事は無効 %1</translation>
@@ -1339,33 +1004,28 @@ Address: %4
         <translation>ネットワーク・リクエストのエラーです</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>エラー: 指定のデータ ディレクトリ &quot;%1&quot; は存在しません。</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>総額</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>エラー：　-regtestと-testnetは一緒にするのは無効です。</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin アドレスを入力します (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1407,10 +1067,6 @@ Address: %4
         <source>Debug window</source>
         <translation>デバッグ ウインドウ</translation>
     </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>使用中の OpenSSL のバージョン</translation>
@@ -1439,10 +1095,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>現在のブロック数</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>推定総ブロック数</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>最終ブロックの日時</translation>
@@ -1519,19 +1171,7 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1546,62 +1186,14 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>メッセージ (&amp;M):</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear</source>
         <translation>クリア</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>表示</translation>
     </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>ラベルをコピーする</translation>
@@ -1692,15 +1284,7 @@ Address: %4
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -1743,26 +1327,10 @@ Address: %4
         <source>Fee:</source>
         <translation>手数料:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>手数料差引後:</translation>
     </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>一度に複数の人に送る</translation>
@@ -1771,10 +1339,6 @@ Address: %4
         <source>Add &amp;Recipient</source>
         <translation>受取人を追加 (&amp;R)</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>すべてクリア (&amp;A)</translation>
@@ -1795,10 +1359,6 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>コインを送る確認</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>数量をコピーする</translation>
@@ -1823,22 +1383,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>優先度をコピーする</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>受取人のアドレスが不正です。再確認してください。</translation>
@@ -1859,26 +1403,10 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>重複しているアドレスが見つかりました。1回の送信で同じアドレスに送ることは出来ません。</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>送ってよろしいですか？</translation>
@@ -1887,14 +1415,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>取引手数料として追加された</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>支払いのリクエストは期限切れです</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>支払いのアドレス「%1」は無効です</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1906,10 +1426,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>送り先(&amp;T):</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>支払い送信するアドレス (例 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>アドレス帳に追加するには、このアドレスのラベルを入力します</translation>
@@ -1922,10 +1438,6 @@ Address: %4
         <source>Choose previously used address</source>
         <translation>前に使用したアドレスを選ぶ</translation>
     </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1938,30 +1450,10 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>メッセージ:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay To:</source>
         <translation>支払先:</translation>
@@ -1973,15 +1465,7 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1996,10 +1480,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>あなた自身を立証するためにあなたのアドレスでメッセージに署名することができます。フィッシング攻撃によってあなたを騙して署名を譲渡させようとするかもしれないので、不明確なものは絶対に署名しないように注意してください。あなたが同意する完全に詳細な声明にだけ署名してください。</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>メッセージの署名に使うアドレス (例 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>前に使用したアドレスを選ぶ</translation>
@@ -2052,10 +1532,6 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>メッセージを検証するために、署名するアドレスとメッセージ(改行、スペース、タブなどを正確にコピーしてください)、そして署名を入力します。中間者攻撃によってだまされることを避けるために、署名されたメッセージそのものよりも、署名を読み取られないように注意してください。</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>メッセージが署名されたアドレス (例 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>指定された Bitcoin アドレスで署名されたことを保証するメッセージを検証</translation>
@@ -2069,12 +1545,8 @@ Address: %4
         <translation>入力項目の内容をすべて消去します</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin アドレスを入力します (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>署名を作成するには&quot;メッセージの署名&quot;をクリック</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>署名を作成するには"メッセージの署名"をクリック</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2153,10 +1625,6 @@ Address: %4
         <source>Open until %1</source>
         <translation>ユニット %1 を開く</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/オフライン</translation>
@@ -2245,10 +1713,6 @@ Address: %4
         <source>Merchant</source>
         <translation>商人</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>デバッグ情報</translation>
@@ -2311,14 +1775,6 @@ Address: %4
         <source>Address</source>
         <translation>Helbidea</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>総額</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>%n 以上のブロックを開く</numerusform></translation>
@@ -2347,14 +1803,6 @@ Address: %4
         <source>Unconfirmed</source>
         <translation>未検証</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>受信元</translation>
@@ -2498,10 +1946,6 @@ Address: %4
         <source>Exporting Successful</source>
         <translation>エクスポートに成功しました</translation>
     </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>テキスト CSV (*.csv)</translation>
@@ -2526,10 +1970,6 @@ Address: %4
         <source>Address</source>
         <translation>Helbidea</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>総額</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2543,13 +1983,12 @@ Address: %4
         <translation>から</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2579,14 +2018,6 @@ Address: %4
         <source>Backup Failed</source>
         <translation>バックアップに失敗しました</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>バックアップ成功</translation>
@@ -2594,18 +2025,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>使用法:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>コマンド一覧</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>コマンドのヘルプ</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>オプション:</translation>
@@ -2646,10 +2065,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>不正なピアを再接続するまでの秒数 (初期値: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>IPv4 でリスンする RPC ポート %u の設定中にエラーが発生しました: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>&lt;port&gt; で JSON-RPC 接続をリスン (初期値: 8332、testnet は 18332)</translation>
@@ -2658,10 +2073,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>コマンドラインと JSON-RPC コマンドを許可</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>ビットコインコアRPCクライアントのバージョン</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>デーモンとしてバックグランドで実行しコマンドを許可</translation>
@@ -2684,7 +2095,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, rpcpassword を設定ファイルで設定してください:
 %s
@@ -2695,36 +2106,12 @@ rpcpassword=%s
 ユーザー名とパスワードが同じであってはいけません。
 もしもファイルが存在しないなら、所有者だけが読み取れる権限で作成してください。
 また、問題が通知されるように alertnotify を設定することをお勧めします;
-例えば: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translation>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>IPv6 でリスンする RPC ポート %u の設定中にエラーが発生したので IPv4 に切り替えます: %s</translation>
+例えば: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>指定のアドレスへバインドし、その上で常にリスンします。IPv6 は [ホスト名]:ポート番号 と表記します</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>ブロックを瞬時に解決することができる特別なチェーンを使用して、リグレッションテストモードに入る。これはリグレッションテストツールやアプリケーション開発を対象としています。</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>エラー: 取引は拒否されました。wallet.dat のコピーを使い、そしてコピーしたウォレットからコインを使用したことがマークされなかったときなど、ウォレットのいくつかのコインがすでに使用されている場合に、このエラーは起こるかもしれません。</translation>
@@ -2737,50 +2124,14 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>ウォレットの取引を変更する際にコマンドを実行 (cmd の %s は TxID に置換される)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>これはリリース前のテストビルドです - 各自の責任で利用すること - 採掘や商取引に使用しないでください</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告: -paytxfee が非常に高く設定されています! これは取引を送信する場合に支払う取引手数料です。</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>警告: あなたのコンピュータの日時が正しいことを確認してください! 時計が間違っていると Bitcoin は正常に動作しません。</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>警告： ネットワークは完全に同意しないみたいです。マイナーは何かの問題を経験してるみたいなんです。</translation>
@@ -2805,42 +2156,18 @@ rpcpassword=%s
         <source>(default: wallet.dat)</source>
         <translation>(デフォルト: wallet.dat)</translation>
     </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>壊れた wallet.dat から秘密鍵を復旧することを試す</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>ブロック作成オプション:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>指定したノードだけに接続</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>SOCKS プロキシ経由で接続する</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>破損したブロック データベースが見つかりました
@@ -2850,18 +2177,10 @@ rpcpassword=%s
         <source>Debugging/Testing options:</source>
         <translation>デバッグ／テスト用オプション:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>自分の IP アドレスを発見 (初期値:  リスン中と -externalip を使用していない場合は1)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>ブロック データベースを今すぐ再構築しますか?</translation>
@@ -2938,18 +2257,6 @@ rpcpassword=%s
         <source>Failed to write undo data</source>
         <translation>元へ戻すデータの書き込みに失敗しました</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>送信するトランザクションの1kBあたりの手数料</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>この値未満の (中継) 手数料はゼロであるとみなす (デフォルト:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>DNS ルックアップでピアを探す (初期値: -connect を使っていなければ1)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>セーフモードを矯正する (デフォルト: 0)</translation>
@@ -2966,46 +2273,18 @@ rpcpassword=%s
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>&lt;category&gt; が与えられなかった場合には、すべてのデバッグ情報が出力されます。</translation>
     </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>不正なブロックあるいは、生成されていないブロックが見つかりました。ネットワークの datadir が間違っていませんか?</translation>
     </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>使用可能なファイルディスクリプタが不足しています。</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC クライアントのオプション:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>現在の blk000??.dat ファイルからブロック チェーンのインデックスを再構築</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>RPC サービスのスレッド数を設定 (初期値: 4)</translation>
@@ -3014,18 +2293,6 @@ rpcpassword=%s
         <source>Specify wallet file (within data directory)</source>
         <translation>ウォレットのファイルを指定　(データ・ディレクトリの中に)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>ブロックの検証中...</translation>
@@ -3034,22 +2301,10 @@ rpcpassword=%s
         <source>Verifying wallet...</source>
         <translation>ウォレットの検証中...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>RPC サーバが開始するのを待つ</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>財布 %s はデータ・ディレクトリ%sの外にあります</translation>
     </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>警告: 非推奨の引数 -debugnet は無視されました。-debug=net を使用してください</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>-txindex を変更するには -reindex を使用してデータベースを再構築する必要があります</translation>
@@ -3058,33 +2313,21 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>外部の blk000??.dat ファイルからブロックをインポート</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>関連のアラートをもらってもすごく長いのフォークを見てもコマンドを実行 (コマンドの中にあるの%sはメッセージから置き換えさせる)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>情報</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3114,14 +2357,6 @@ rpcpassword=%s
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>&lt;net&gt; (IPv4, IPv6, Tor) ネットワーク内のノードだけに接続する</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL オプション: (SSLのセットアップ手順はビットコインWikiを参照してください)</translation>
@@ -3130,26 +2365,6 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>RPCサーバのオプション:</translation>
     </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL オプション: (SSLのセットアップ手順は Bitcoin Wiki をご覧下さい)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
@@ -3158,18 +2373,6 @@ rpcpassword=%s
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>最小ブロックサイズをバイトで設定 (初期値: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>クライアント起動時に debug.log ファイルを縮小 (初期値: -debug オプションを指定しない場合は1)</translation>
@@ -3182,10 +2385,6 @@ rpcpassword=%s
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>接続のタイムアウトをミリセコンドで指定 (初期値: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>システム エラー:</translation>
@@ -3222,18 +2421,6 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>警告: このバージョンは古いのでアップグレードが必要です!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>バージョン</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat が壊れ、復旧に失敗しました</translation>
@@ -3242,14 +2429,6 @@ rpcpassword=%s
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC 接続のパスワード</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>指定した IP アドレスからの JSON-RPC 接続を許可</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>&lt;ip&gt; (初期値: 127.0.0.1) で実行中のノードにコマンドを送信</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>最良のブロックに変更する際にコマンドを実行 (cmd の %s はブロック ハッシュに置換される)</translation>
@@ -3282,10 +2461,6 @@ rpcpassword=%s
         <source>This help message</source>
         <translation>このヘルプ メッセージ</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>このコンピュータの %s にバインドすることができません (バインドが返したエラーは %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>-addnode, -seednode と -connect で DNS ルックアップを許可する</translation>
@@ -3298,41 +2473,29 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat 読み込みエラー: ウォレットが壊れました</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>wallet.dat 読み込みエラー: ウォレットは Bitcoin の最新バージョンを必要とします</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>ウォレットが書き直される必要がありました: 完了するために Bitcoin を再起動します</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat 読み込みエラー</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>無効な -proxy アドレス: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>-onlynet で指定された &apos;%s&apos; は未知のネットワークです</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>無効な -proxy アドレス: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>-socks で指定された %i は未知のバージョンです</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>-onlynet で指定された '%s' は未知のネットワークです</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>-bind のアドレス &apos;%s&apos; を解決できません</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>-bind のアドレス '%s' を解決できません</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>-externalip のアドレス &apos;%s&apos; を解決できません</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>-externalip のアドレス '%s' を解決できません</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-paytxfee=&lt;amount&gt; の額 &apos;%s&apos; が無効です</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-paytxfee=&lt;amount&gt; の額 '%s' が無効です</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3378,13 +2541,5 @@ rpcpassword=%s
         <source>Error</source>
         <translation>エラー</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>rpcpassword=&lt;password&gt; を設定ファイルでセットしてください:
-%s
-ファイルが無い場合は、オーナーだけが読み取れる権限でファイルを作成してください。</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index fda2e97037a4..c23367171da2 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ka" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Bitcoin Core-ს შესახებ</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt;-ს ვერსია</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-პროგრამა ექსპერიმენტულია.
-
-ვრცელდება MIT/X11 ლიცენზიით, იხილე თანდართული ფაილი COPYING ან http://www.opensource.org/licenses/mit-license.php.
-
-პროდუქტი შეიცავს OpenSSL პროექტის ფარგლებში შემუშავებულ პროგრამულ უზრუნველყოფას OpenSSL Toolkit-ში გამოყენებისათვის (http://www.openssl.org/), კრიპტოგრაფიულ პროგრამას, ავტორი ერიქ იანგი (Eric Young, eay@cryptsoft.com) და UPnP-პროგრამას, ავტორი თომას ბერნარდი (Thomas Bernard).</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>საავტორო უფლებები</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core-ს ავტორები</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ka" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>ექსპორტი ვერ განხორციელდა</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>შეცდომა მისამართების სიის %1-ში შენახვის მცდელობისას.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>გაიმეორეთ ახალი ფრაზა-პაროლი</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>შეიყვანეთ საფულის ახალი ფრაზა-პაროლი.&lt;br/&gt;ფრაზა-პაროლი შეადგინეთ &lt;b&gt;არანაკლებ 10 შემთხვევითი სიმბოლოსაგან&lt;/b&gt;, ან &lt;b&gt;რვა და მეტი სიტყვისაგან&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>საფულის დაშიფრვა</translation>
@@ -295,10 +250,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>გასვლა</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>ინფორმაცია Bitcoin-ის შესახებ</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>&amp;Qt-ს შესახებ</translation>
@@ -459,46 +410,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Bitcoin Core-ს დახმარების ჩვენება Bitcoin-ის საკომანდო სტრიქონის დასაშვები ოპციების სანახავად</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-კლიენტი</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>აქტიური მიერთებები ბითქოინის ქსელთან: %n</numerusform></translation>
-    </message>
     <message>
         <source>No block source available...</source>
         <translation>ბლოკების წყარო მიუწვდომელია...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>დამუშავებულია ტრანსაქციების ისტორიის %2-დან (სავარაუდოდ) %1 ბლოკი.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>დამუშავებულია ტრანსაქციების ისტორიის %1 ბლოკი.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>%n საათი</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>%n დღე</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><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></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 გავლილია</translation>
@@ -559,10 +482,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>საფულე &lt;b&gt;დაშიფრულია&lt;/b&gt; და ამჟამად &lt;b&gt;დაბლოკილია&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>ფატალური შეცდომა. Bitcoin ვერ უზრუნველყოფს უსაფრთხო გაგრძელებას, ამიტომ იხურება.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,10 +516,6 @@ Address: %4
         <source>Fee:</source>
         <translation>საკომისიო:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>ქვედა ზღვარი:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>დამატებითი საკომისიო:</translation>
@@ -623,7 +538,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>რაოდენობა</translation>
+        <translation>თანხა</translation>
     </message>
     <message>
         <source>Address</source>
@@ -689,10 +604,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>პრიორიტეტის კოპირება</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>ქვედა ზღვრის კოპირება</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>ხურდის კოპირება</translation>
@@ -741,10 +652,6 @@ Address: %4
         <source>none</source>
         <translation>ცარიელი</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>მტვერი</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>კი</translation>
@@ -770,25 +677,13 @@ Address: %4
         <translation>მეტი პრიორიტეტის ტრანსაქციებს მეტი შანსი აქვს მოხვდეს ბლოკში.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>ნიშნული წითლდება, როცა პრიორიტეტი &quot;საშუალო&quot;-ზე დაბალია.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>ნიშნული წითლდება, როცა პრიორიტეტი "საშუალო"-ზე დაბალია.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>ნიშნული წითლდება, როცა რომელიმე რეციპიენტი მიიღებს %1-ზე ნაკლებს.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>ეს ნიშნავს, რომ საკომისიო იქნება მინიმუმ %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>რეტრანსლაციის მინიმალური საკომისიოს 0.546-ზე ნაკლები თანხები ნაჩვენები იქნება როგორც მტვერი.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>ნიშნული წითლდება, როცა ხურდა ნაკლებია %1-ზე.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(არ არის ნიშნული)</translation>
@@ -841,12 +736,12 @@ Address: %4
         <translation>გაგზავნის მისამართის შეცვლა</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>მისამართი &quot;%1&quot; უკვე არის მისამართების წიგნში.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>მისამართი "%1" უკვე არის მისამართების წიგნში.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>შეყვანილი მისამართი &quot;%1&quot; არ არის ვალიდური Bitcoin-მისამართი.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>შეყვანილი მისამართი "%1" არ არის ვალიდური Bitcoin-მისამართი.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +777,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - საკომანდო სტრიქონის ოპციები</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +785,14 @@ Address: %4
         <source>version</source>
         <translation>ვერსია</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Bitcoin Core-ს შესახებ</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>კომანდების ზოლის ოპციები</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>გამოყენება:</translation>
@@ -907,17 +806,13 @@ Address: %4
         <translation>ინტერფეისის პარამეტრები</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>აირჩიეთ ენა, მაგალითად &quot;de_DE&quot; (ნაგულისხმევია სისტემური ლოკალი)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>აირჩიეთ ენა, მაგალითად "de_DE" (ნაგულისხმევია სისტემური ლოკალი)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>გაშვება მინიმიზებული ეკრანით</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>მისალმების ეკრანის ჩვენება გაშვებისას (ნაგულისხმევი:1)</translation>
@@ -941,10 +836,6 @@ Address: %4
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
         <translation>ეს პროგრამის პირველი გაშვებაა; შეგიძლიათ მიუთითოთ, სად შეინახოს მონაცემები Bitcoin Core-მ.</translation>
     </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Bitcoin Core გადმოტვირთავს და შეინახავს Bitcoin-ის ბლოკთა ჯაჭვს. მითითებულ კატალოგში დაგროვდება სულ ცოტა 1 გბ მონაცემები, და მომავალში უფრო გაიზრდება. საფულეც ამავე კატალოგში შეინახება.</translation>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>ნაგულისხმევი კატალოგის გამოყენება</translation>
@@ -954,12 +845,8 @@ Address: %4
         <translation>მითითებული კატალოგის გამოყენება:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>შეცდომა: მითითებული მონაცემთა კატალოგი &quot;%1&quot; ვერ შეიქმნა.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1047,14 +934,6 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>პროქსის IP-მისამართი (მაგ.: IPv4: 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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>საკომანდო სტრიქონის აქტიური ოპციები, რომლებიც გადაფარავენ ზემოთნაჩვენებს:</translation>
@@ -1071,30 +950,14 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;ქსელი</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>ს&amp;აფულე</translation>
     </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </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>
@@ -1115,14 +978,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>პროქსის პორტი (მაგ.: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;ვერსია:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>პროქსის SOCKS-ვერსია (მაგ.: 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;ფანჯარა</translation>
@@ -1137,7 +992,7 @@ Address: %4
     </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 Quit in the menu.</source>
-        <translation>პროგრამის მინიმიზება ფანჯრის დახურვისას. ოპციის ჩართვის შემდეგ პროგრამის დახურვა შესაძლებელი იქნება მხოლოდ მენიუდან - პუნქტი &quot;გასვლა&quot;.</translation>
+        <translation>პროგრამის მინიმიზება ფანჯრის დახურვისას. ოპციის ჩართვის შემდეგ პროგრამის დახურვა შესაძლებელი იქნება მხოლოდ მენიუდან - პუნქტი "გასვლა".</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1163,14 +1018,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>აირჩიეთ გასაგზავნი თანხის ნაგულისხმევი ერთეული.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>ტრანსაქციების სიაში იყოს თუ არა ნაჩვენები Bitcoin-მისამართები.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>მისამართების &amp;ჩვენება სიაში</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>ვაჩვენოთ თუ არა მონეტების მართვის პარამეტრები.</translation>
@@ -1274,12 +1121,12 @@ Address: %4
         <translation>URI-ების დამუშავება</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI-ის დამუშავება ვერ მოხერხდა. შესაძლოა არასწორია Bitcoin-მისამართი ან  URI-ის პარამეტრები.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>გადახდის მისამართი არასწორია: %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>მოთხოვნილი გადახდის %1 მოცულობა ძალიან მცირეა (ითვლება &quot;მტვრად&quot;)</translation>
+        <translation>მოთხოვნილი გადახდის %1 მოცულობა ძალიან მცირეა (ითვლება "მტვრად")</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1289,14 +1136,6 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>ვერ გაიშვა bitcoin: click-to-pay</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>გაფრთხილება ქსელის მენეჯერისაგან</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>თქვენს აქტიურ პროქსის არა აქვს SOCKS5-ის მხარდაჭერა, რაც საჭიროა გადახდების პროქსით განხორციელებისათვის.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>არასწორია გადახდის მოთხოვნის URL: %1</translation>
@@ -1305,10 +1144,6 @@ Address: %4
         <source>Payment request file handling</source>
         <translation>გადახდის მოთხოვნის ფაილის დამუშავება</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>ვერ ხერხდება გადახდის მოთხოვნის ფაილის წაკითხვა ან დამუშავება! შესაძლოა დაზიანებულია გადახდის მოთხოვნის ფაილი.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>არავერიფიცირებული გადახდის მოთხოვნები გადახდის სამომხმარებლო სკრიპტებისათვის არ არის მხარდაჭერილი.</translation>
@@ -1321,10 +1156,6 @@ Address: %4
         <source>Error communicating with %1: %2</source>
         <translation>ვერ გამოდის კავშირზე %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>ვერ ხერხდება გადახდის მოთხოვნის გარჩევა ან დამუშავება!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>ცუდი პასუხი სერვერისაგან %1</translation>
@@ -1338,38 +1169,33 @@ Address: %4
         <translation>ქსელური მოთხოვნის შეცდომა</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>შეცდომა: მითითებული მონაცემთა კატალოგი &quot;%1&quot; არ არსებობს.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>თანხა</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>შეცდომა: -regtest-ისა და -testnet-ის დაუშვებელი კომბინაცია.</translation>
+        <source>%1 h</source>
+        <translation>%1 სთ</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 წთ</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>შეიყვანეთ ბიტკოინ-მისამართი (მაგ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>მიუწვდ.</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>გამო&amp;სახულების შენახვა</translation>
+        <translation>გამო&amp;სახულების შენახვა...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
@@ -1438,10 +1264,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>ბლოკების მიმდინარე რაოდენობა</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>ბლოკების სავარაუდო რაოდენობა</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>ბოლო ბლოკის დრო</translation>
@@ -1464,7 +1286,7 @@ Address: %4
     </message>
     <message>
         <source>Totals</source>
-        <translation>ჯამი</translation>
+        <translation>სულ:</translation>
     </message>
     <message>
         <source>In:</source>
@@ -1496,7 +1318,7 @@ Address: %4
     </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>კლავიშები &quot;ზევით&quot; და &quot;ქვევით&quot; - ისტორიაში მოძრაობა, &lt;b&gt;Ctrl-L&lt;/b&gt; - ეკრანის გასუფთავება.</translation>
+        <translation>კლავიშები "ზევით" და "ქვევით" - ისტორიაში მოძრაობა, &lt;b&gt;Ctrl-L&lt;/b&gt; - ეკრანის გასუფთავება.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1518,19 +1340,7 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 წთ</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 სთ</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 სთ %2 წთ</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1650,7 +1460,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>რაოდენობა</translation>
+        <translation>თანხა</translation>
     </message>
     <message>
         <source>Label</source>
@@ -1685,7 +1495,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>რაოდენობა</translation>
+        <translation>თანხა</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1742,10 +1552,6 @@ Address: %4
         <source>Fee:</source>
         <translation>საკომისიო:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>ქვედა ზღვარი:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>დამატებითი საკომისიო:</translation>
@@ -1822,10 +1628,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>პრიორიტეტის კოპირება</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>ქვედა ზღვრის კოპირება</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>ხურდის კოპირება</translation>
@@ -1850,10 +1652,6 @@ Address: %4
         <source>The amount exceeds your balance.</source>
         <translation>თანხა აღემატება თქვენს ბალანსს</translation>
     </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>საკომისიო 1%-ის დამატების შემდეგ თანხა აჭარბებს თქვენს ბალანსს</translation>
-    </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>მისამართები დუბლირებულია, დაშვებულია ერთ ჯერზე თითო მისამართზე ერთხელ გაგზავნა.</translation>
@@ -1886,14 +1684,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>დამატებულია საკომისიო</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>გადახდის მოთხოვნას ვადა გაუვიდა</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>გადახდის მისამართი არასწორია: %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1695,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>ადრესა&amp;ტი:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>მისამართი, რომლითაც ასრულებთ გადახდას (მაგ.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>შეიყვანეთ ამ მისამართის ნიშნული მისამართების წიგნში დასამატებლად</translation>
@@ -1995,10 +1781,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>ხელმოწერით თქვენ ადასტურებთ, რომ მესიჯი თქვენია. ფრთხილად - არ მოაწეროთ ხელი რაიმე საეჭვოს: ფიშინგური ხრიკებით შეიძლება ის თქვენს მესიჯად გაასაღონ. მოაწერეთ ხელი მხოლოდ იმას, რასაც ყველა წვრილმანში ეთანხმებით.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>მისამართი, რომლითაც ხელს აწერთ (მაგ.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>აირჩიეთ ადრე გამოყენებული მისამართი</translation>
@@ -2049,11 +1831,7 @@ Address: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>შეიყვანეთ ხელმოწერის მისამართი, მესიჯი (დაუკვირდით, რომ ზუსტად იყოს კოპირებული სტრიქონის გადატანები, ჰარები, ტაბულაციები და სხვ) და ხელმოწერა მესიჯის ვერიფიკაციისათვის. მიაქციეთ ყურადღება, რომ რაიმე ზედმეტი არ გაგყვეთ კოპირებისას, რათა არ გახდეთ &quot;man-in-the-middle&quot; შეტევის ობიექტი.</translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>მისამართი, რომლითაც ხელმოწერილია მესიჯი (მაგ.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>შეიყვანეთ ხელმოწერის მისამართი, მესიჯი (დაუკვირდით, რომ ზუსტად იყოს კოპირებული სტრიქონის გადატანები, ჰარები, ტაბულაციები და სხვ) და ხელმოწერა მესიჯის ვერიფიკაციისათვის. მიაქციეთ ყურადღება, რომ რაიმე ზედმეტი არ გაგყვეთ კოპირებისას, რათა არ გახდეთ "man-in-the-middle" შეტევის ობიექტი.</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2068,12 +1846,8 @@ Address: %4
         <translation>ვერიფიკაციის ყველა ველის წაშლა</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>შეიყვანეთ ბიტკოინ-მისამართი (მაგ. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>ხელმოწერის გენერირებისათვის დააჭირეთ &quot;მესიჯის ხელმოწერა&quot;-ს</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>ხელმოწერის გენერირებისათვის დააჭირეთ "მესიჯის ხელმოწერა"-ს</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2172,10 +1946,6 @@ Address: %4
         <source>Status</source>
         <translation>სტატუსი</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, დაგზავნილია %n კვანძისათვის</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>თარიღი</translation>
@@ -2208,10 +1978,6 @@ Address: %4
         <source>Credit</source>
         <translation>კრედიტი</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>მზად იქნება %n ბლოკის შემდეგ</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>უარყოფილია</translation>
@@ -2245,8 +2011,8 @@ Address: %4
         <translation>გამყიდველი</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>გენერირებული მონეტები გასაგზავნად მომწიფდება %1 ბლოკის შემდეგ. ეს ბლოკი გენერირების შემდეგ გავრცელებულ იქნა ქსელში ბლოკთა ჯაჭვზე დასამატებლად. თუ ის ვერ ჩაჯდა ჯაჭვში, მიეცემა სტატუსი &quot;უარყოფილია&quot; და ამ მონეტებს ვერ გამოიყენებთ. ასეთი რამ შეიძლება მოხდეს, თუ რომელიმე კვანძმა რამდენიმე წამით დაგასწროთ ბლოკის გენერირება.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>გენერირებული მონეტები გასაგზავნად მომწიფდება %1 ბლოკის შემდეგ. ეს ბლოკი გენერირების შემდეგ გავრცელებულ იქნა ქსელში ბლოკთა ჯაჭვზე დასამატებლად. თუ ის ვერ ჩაჯდა ჯაჭვში, მიეცემა სტატუსი "უარყოფილია" და ამ მონეტებს ვერ გამოიყენებთ. ასეთი რამ შეიძლება მოხდეს, თუ რომელიმე კვანძმა რამდენიმე წამით დაგასწროთ ბლოკის გენერირება.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2276,10 +2042,6 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, დაგზავნა არ არის წარმატებით დასრულებული</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>ღიაა კიდევ %n ბლოკისათვის</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>უცნობია</translation>
@@ -2310,18 +2072,10 @@ Address: %4
         <source>Address</source>
         <translation>მისამართი</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>რაოდენობა</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>არ არის მომწიფებული (%1 დასტური, საჭიროა სულ %2)</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>ღიაა კიდევ %n ბლოკისათვის</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>ღია იქნება სანამ %1</translation>
@@ -2356,7 +2110,7 @@ Address: %4
     </message>
     <message>
         <source>Received with</source>
-        <translation>მიღებულია</translation>
+        <translation>შემოსულია</translation>
     </message>
     <message>
         <source>Received from</source>
@@ -2364,7 +2118,7 @@ Address: %4
     </message>
     <message>
         <source>Sent to</source>
-        <translation>გაგზავნილია ადრესატთან</translation>
+        <translation>გაგზავნილია</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
@@ -2525,10 +2279,6 @@ Address: %4
         <source>Address</source>
         <translation>მისამართი</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>თანხა</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2292,9 @@ Address: %4
         <translation>-</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2346,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>გამოყენება:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>ბრძანებები</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>ბრძანების აღწერილობა</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>ოპციები:</translation>
@@ -2645,10 +2386,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>არასწორად მოქმედი პირების ბლოკირების დრო წამებში (ნაგულისხმევი: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>შეცდომა %u RPC-პორტის მიყურადების ჩართვისას IPv4 მისამართზე: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation> JSON-RPC-შეერთებების მიყურადება პორტზე &lt;port&gt; (ნაგულისხმევი: 8332 ან სატესტო ქსელში: 18332)</translation>
@@ -2657,10 +2394,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>საკომანდო სტრიქონისა და JSON-RPC-კომამდების ნებართვა</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>რეზიდენტულად გაშვება და კომანდების მიღება</translation>
@@ -2683,7 +2416,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, მიუთითეთ rpcpassword საკონფიგურაციო ფაილში:
 %s
@@ -2694,37 +2427,21 @@ rpcpassword=%s
 სახელი და პაროლი ერთმანეთს არ უნდა ემთხვეოდეს.
 თუ ფაილი არ არსებობს, შექმენით იგი უფლებებით owner-readable-only.
 ასევე რეკომენდებულია დააყენოთ alertnotify რათა მიიღოთ შეტყობინებები პრობლემების შესახებ;
-მაგალითად: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+მაგალითად: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>დაშვებული ალგორითმები (ნაგულისხმევი: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>შეცდომა %u RPC-პორტის მიყურადების ჩართვისას IPv6 მისამართზე, ვბრუნდებით IPv4-ზე : %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>მოცემულ მისამართზე მიჯაჭვა მუდმივად მასზე მიყურადებით. გამოიყენეთ [host]:port ფორმა IPv6-სათვის</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>შესვლა რეგრესული ტესტირების რეჟიმში; სპეციალური ჯაჭვის გამოყენებით ბლოკების პოვნა ხდება დაუყოვნებლივ. გამოიყენება რეგრესული ტესტირების ინსტრუმენტებისა და პროგრამების შემუშავებისას.</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>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>შეცდომა: ტრანსაქცია უარყოფილია! შესაძლოა მონეტების ნაწილი თქვენი საფულიდან უკვე გამოყენებულია, რაც შეიძლება მოხდეს wallet.dat-ის ასლის გამოყენებისას, როცა მონეტები გაიგზავნა სხვა ასლიდან, აქ კი არ არის გაგზავნილად მონიშნული.</translation>
@@ -2737,38 +2454,10 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>კომანდის შესრულება საფულის ტრანსაქციის ცვლილებისას (%s კომანდაში ჩანაცვლდება TxID-ით)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>ეს არის წინასწარი სატესტო ვერსია - გამოიყენეთ საკუთარი რისკით - არ გამოიყენოთ მოპოვებისა ან კომერციული მიზნებისათვის</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
         <translation>ფარული Tor-სერვისებით პირების წვდომისათვის სხვა SOCKS5 პროქსის გამოყენება (ნაგულისხმევია: -proxy)</translation>
@@ -2777,10 +2466,6 @@ rpcpassword=%s
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>ყურადღება:  ძალიან მაღალია -paytxfee - საკომისო, რომელსაც თქვენ გადაიხდით ამ ტრანსაქციის გაგზავნის საფასურად.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>ყურადღება: შეამოწმეთ თქვენი კომპიუტერის სისტემური თარიღი და დრო! თუ ისინი არასწორია, Bitcoin ვერ იმუშავებს კორექტულად.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>ყურადღება: ქსელში შეუთანხმებლობაა. შესაძლოა ცალკეულ მომპოვებლებს პრობლემები ექმნებათ!</translation>
@@ -2797,14 +2482,6 @@ rpcpassword=%s
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>ყურადღება: wallet.dat დაზიანებულია! ორიგინალური wallet.dat შენახულია როგორც wallet.{timestamp}.bak %s-ში; თუ შეამჩნიეთ უზუსტობა ნაშთში ან ტრანსაქციებში, აღადგინეთ არქივიდან.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; შეიძლება იყოს:</translation>
@@ -2813,46 +2490,18 @@ rpcpassword=%s
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>პირადი გასაღებების აღდგენის მცდელობა wallet.dat-იდან</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core დემონი</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>ბლოკის შექმნის ოპციები:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>საფულის ტრანსაქციების სიის წაშლა (დიაგნოსტიკის საშუალება; მოიცავს -rescan-ს)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>შეერთება მხოლოდ მითითებულ კვანძ(ებ)თან</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>შეერთება SOCKS-პროქსით</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation> JSON-RPC-შეერთება პორტზე &lt;port&gt; (ნაგულისხმევი: 8332 ან სატესტო ქსელში: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>შენიშნულია ბლოკთა ბაზის დაზიანება</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>საკუთარი IP-მისამართის განსაზღვრა (ნაგულისხმევი: 1 თუ ჩართულია მიყურადება და არ გამოიყენება -externalip)</translation>
@@ -2937,22 +2586,6 @@ rpcpassword=%s
         <source>Failed to write undo data</source>
         <translation>ცვლილებების გაუქმების მონაცემთა ჩაწერა ვერ მოხერხდა</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>საკომისო კბ-ზე, რომელიც დაემატება გაგზავნილ ტრანსაქციას</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>პირების ძებნა DNS-ით (ნაგულისხმევი: 1 გარდა -connect-ისა)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>მონეტების გენერირება (ნაგულისხმევი: 0)</translation>
@@ -2965,17 +2598,13 @@ rpcpassword=%s
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>თუ &lt;category&gt; არ არის მითითებული, ნაჩვენები იქნება სრული დახვეწის ინფორმაცია.</translation>
     </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>საწყისი ბლოკი არ არსებობს ან არასწორია. ქსელის მონაცემთა კატალოგი datadir ხომ არის არასწორი?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>არასწორია მისამართი -onion: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>არასწორია მისამართი -onion: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,22 +2614,10 @@ rpcpassword=%s
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>დაემატოს დახვეწის ინფორმაციას დროის ჭდეები (ნაგულისხმევი: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC კლიენტის ოპციები:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>ბლოკთა ჯაჭვის ინდექსის  ხელახლა აგება blk000??.dat ფაილიდან</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation> SOCKS-ვერსიის არჩევა -proxy-სათვის (4 ან 5, ნაგულისხმევი: 5)</translation>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>ბლოკის მაქსიმალური ზომის განსაზღვრა ბაიტებში (ნადულისხმევი: %d)</translation>
@@ -3021,10 +2638,6 @@ rpcpassword=%s
         <source>This is intended for regression testing tools and app development.</source>
         <translation>გამოიყენება რეგრესული ტესტირების ინსტრუმენტებისა და პროგრამების შემუშავებისას.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>გამოყენება (მოძველებულია, გამოიყენეთ bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>ბლოკების ვერიფიკაცია...</translation>
@@ -3033,10 +2646,6 @@ rpcpassword=%s
         <source>Verifying wallet...</source>
         <translation>საფულის ვერიფიკაცია...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>RPC-სერვერის დალოდება გაშვებისათვის</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>საფულე %s მდებარეობს მონაცემთა კატალოგის %s გარეთ</translation>
@@ -3045,10 +2654,6 @@ rpcpassword=%s
         <source>Wallet options:</source>
         <translation>სფულის ოპციები:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>ყურადღება: მოძველებული არგუმენტი -debugnet იგნორირდება. გამოიყენეთ -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>საჭიროა ბაზის ხელახალი აგება, გამოიყენეთ -reindex რათა შეცვალოთ -txindex</translation>
@@ -3057,10 +2662,6 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>ბლოკების იმპორტი გარე blk000??.dat ფაილიდან</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>ბრძანების შესრულება შესაბამისი უწყების მიღებისას ან როცა შეინიშნება საგრძნობი გახლეჩა (cmd-ში %s შეიცვლება მესიჯით)</translation>
@@ -3078,20 +2679,12 @@ rpcpassword=%s
         <translation>ინფორმაცია</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>დაუშვებელი მნიშვნელობა -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>დაუშვებელი მნიშვნელობა -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>დაუშვებელი მნიშვნელობა -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>დაუშვებელი მნიშვნელობა -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3113,42 +2706,6 @@ rpcpassword=%s
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>შეერთება მხოლოდ &lt;net&gt; ქსელის კვანძებთან (IPv4, IPv6 ან Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL ოპციები: (იხილე Bitcoin Wiki-ში  SSL-ს მოწყობის ინსტრუქციები)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>ტრასირების/დახვეწის ინფოს გაგზავნა კონსოლზე debug.log ფაილის ნაცვლად</translation>
@@ -3157,18 +2714,6 @@ rpcpassword=%s
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>დააყენეთ ბლოკის მინიმალური ზომა ბაიტებში (ნაგულისხმევი: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>debug.log ფაილის შეკუმშვა გაშვებისას (ნაგულისხმევია: 1 როცა არ აყენია -debug)</translation>
@@ -3181,10 +2726,6 @@ rpcpassword=%s
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>მიუთითეთ შეერთების ტაიმაუტი მილიწამებში (ნაგულისხმევი: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>სისტემური შეცდომა:</translation>
@@ -3225,14 +2766,6 @@ rpcpassword=%s
         <source>Zapping all transactions from wallet...</source>
         <translation>ტრანსაქციების ჩახსნა საფულიდან...</translation>
     </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>ვერსია</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat დაზიანებულია, აღდგენა ვერ მოხერხდა</translation>
@@ -3241,14 +2774,6 @@ rpcpassword=%s
         <source>Password for JSON-RPC connections</source>
         <translation>პაროლი JSON-RPC-შეერთებისათვის</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>JSON-RPC-შეერთების ნებართვა მითითებული IP მისამართიდან</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>კომანდის გაგზავნა კვანძისათვის, რომელიც გაშვებულია მისამართზე &lt;ip&gt; (ნაგულისხმევი: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>კომანდის შესრულება უკეთესი ბლოკის გამოჩენისას (%s კომანდაში ჩანაცვლდება ბლოკის ჰეშით)</translation>
@@ -3281,10 +2806,6 @@ rpcpassword=%s
         <source>This help message</source>
         <translation>ეს ტექსტი</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>ვერ ხერხდება მიბმა %s-თან ამ კომპიუტერზე (მიღებულია შეცდომა %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>DNS-ძებნის დაშვება -addnode, -seednode და -connect-სათვის</translation>
@@ -3297,41 +2818,29 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>არ იტვირთება wallet.dat: საფულე დაზიანებულია</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>არ იტვირთება wallet.dat: საფულეს სჭირდება Bitcoin-ის ახალი ვერსია</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>საჭიროა საფულის აღდგენა: დაარესტარტეთ Bitcoin </translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>არ იტვირთება wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>არასწორია მისამართი -proxy: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>-onlynet-ში მითითებულია უცნობი ქსელი: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>არასწორია მისამართი -proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>მოთხოვნილია -socks პროქსის უცნობი ვერსია: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>-onlynet-ში მითითებულია უცნობი ქსელი: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>ვერ ხერხდება -bind მისამართის გარკვევა: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>ვერ ხერხდება -bind მისამართის გარკვევა: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>ვერ ხერხდება -externalip მისამართის გარკვევა: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>ვერ ხერხდება -externalip მისამართის გარკვევა: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>დაუშვებელი მნიშვნელობა -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>დაუშვებელი მნიშვნელობა -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +2886,5 @@ rpcpassword=%s
         <source>Error</source>
         <translation>შეცდომა</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>უნდა დააყენოთ rpcpassword=&lt;password&gt; საკონფიგურაციო ფაილში:
-%s
-თუ ეს ფაილი არ არსებობს, შექმენით იგი უფლებებით owner-readable-only.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index b913ba9858f1..e9eddd503c0c 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="kk_KZ" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="kk_KZ" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Жаңа адрес енгізу</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Таңдаған адресті тізімнен жою</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>Жою</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Үтірмен бөлінген текст (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Құпия сөзді енгізу</translation>
@@ -163,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Жаңа құпия сөзді қайта енгізу</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Әмиянға жаңа қүпия сөзді енгізіңіз.&lt;br/&gt;&lt;b&gt;10 немесе одан әрі кездейсоқ белгілерді&lt;/b&gt;, әлде &lt;b&gt;сегіз немесе одан әрі сөздерді&lt;/b&gt;құпия сөзіңізде пайдалану өтінеміз.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Әмиянді шифрлау</translation>
@@ -191,3178 +75,156 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Change passphrase</source>
         <translation>Құпия сөзді өзгерту</translation>
     </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(таңбасыз)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>таңба</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>таңба</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(таңбасыз)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(таңбасыз)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Үтірмен бөлінген файл (*.csv)</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>таңба</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адрес</translation>
     </message>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
+    </context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <source>Transaction amount too small</source>
+        <translation>Транзакция өте кішкентай</translation>
     </message>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>Transaction too large</source>
+        <translation>Транзакция өте үлкен</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(таңбасыз)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>таңба</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>таңба</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(таңбасыз)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(таңбасыз)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Үтірмен бөлінген файл (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>таңба</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation>Транзакция өте кішкентай</translation>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation>Транзакция өте үлкен</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index ce30a8603d8e..9fe31b4330b0 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1,46 +1,9 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ko_KR" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>비트코인 코어 소개</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;비트코인 코어&lt;/b&gt; 버젼</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-이 프로그램은 시험용입니다.
-
-MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http://www.opensource.org/licenses/mit-license.php를 참조하십시오.
-
-이 프로그램에는 OpenSSL 툴킷(http://www.openssl.org) 사용 목적으로 개발한 OpenSSL 프로젝트를 포함하고 있으며, 암호화 프로그램은 Eric Young(eay@cryptsoft.com)이, UPnP 프로그램은 Thomas Bernard가 작성했습니다.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>비트코인코어 개발자들</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-비트)</translation>
-    </message>
-</context>
+<TS language="ko_KR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>지갑 주소나 제목을 수정하려면 더블클릭하세요.</translation>
+        <translation>지갑 주소나 이름을 수정하려면 더블클릭하세요.</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -104,7 +67,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>이것이 비트코인 금액을 보내는 주소이다. 항상 코인을 보내기전에 잔고와 받는 주소를 확인하시오</translation>
+        <translation>비트코인을 받는 계좌 주소입니다. 코인을 보내기 전에 잔고와 받는 주소를 항상 확인하세요.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
@@ -130,11 +93,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
         <source>Exporting Failed</source>
         <translation>내보내기 실패</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,17 +127,13 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
         <source>Repeat new passphrase</source>
         <translation>새 암호 반복</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>새로운 암호를 지갑에 입력. 8자보다 많은 단어를 입력하거나 10 자보다 많은 여러 종류를 암호에 사용하세요.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>지갑 암호화</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>이 작업은 지갑을 열기위해 사용자의 지갑의  암호가 필요합니다.</translation>
+        <translation>이 작업을 실행하려면 사용자 지갑의 암호가 필요합니다.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -186,7 +141,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>이 작업은 지갑을 해독하기 위해 사용자의 지갑 암호가 필요합니다.</translation>
+        <translation>이 작업은 지갑을 해독하기 위해 사용자 지갑의 암호가 필요합니다.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -206,7 +161,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>경고: 만약 당신의 지갑을 암호화 하고 비밀번호를 잃어 버릴 경우, 당신의 모든 비트코인들을 잃어버릴 수 있습니다!</translation>
+        <translation>경고: 만약 암호화된 지갑의 비밀번호를 잃어버릴 경우, 모든 비트코인들을 잃어버릴 수 있습니다!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -214,7 +169,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </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 type="unfinished"/>
+        <translation>중요: 본인 지갑파일에서 만든 예전 백업들은 새로 생성한 암화화된 지갑 파일로 교체됩니다. 보안상 이유로 이전에 암호화 하지 않은 지갑 파일 백업은 사용할 수 없게 되니 빠른 시일 내로 새로 암화화된 지갑을 사용하시기 바랍니다.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -226,7 +181,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>암호화 처리 과정을 끝내기 위해 비트코인을 닫겠습니다. 지갑 암호화는 컴퓨터로의 멀웨어 감염으로 인한 비트코인 도난을 완전히 막아주지 못함을 기억하십시오.</translation>
+        <translation>암호화 처리 과정을 끝내기 위해 비트코인을 종료합니다. 지갑 암호화는 컴퓨터로의 멀웨어 감염으로 인한 비트코인 도난을 완전히 방지할 수 없음을 기억하세요.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -242,7 +197,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>지갑 열기를 실패하였습니다.</translation>
+        <translation>지갑을 열지 못했습니다.</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
@@ -254,7 +209,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation>지갑 비밀번호가 성공적으로 변경되었습니다</translation>
+        <translation>지갑 비밀번호가 성공적으로 변경되었습니다.</translation>
     </message>
 </context>
 <context>
@@ -277,7 +232,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>지갑의 일반적 개요를 보여 줍니다.</translation>
+        <translation>지갑의 일반적 개요를 보여줍니다.</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -295,10 +250,6 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
         <source>Quit application</source>
         <translation>적용 중단</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>비트코인에 대한 정보를 보여줍니다.</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Qt 정보(&amp;Q)</translation>
@@ -333,7 +284,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation>URI&amp;열기</translation>
+        <translation>URI&amp;열기...</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -401,7 +352,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>지갑 주소가 자신 소유의 것인지 증명하기 위해 비트코인 주소에 서명할 수 있습니다.</translation>
+        <translation>지갑 주소가 본인 소유인지 증명하기 위해 비트코인 주소에 서명할 수 있습니다.</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
@@ -429,7 +380,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>비트코인코어</translation>
+        <translation>비트코인 코어</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
@@ -457,48 +408,32 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>비트코인 고객</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>비트코인 네트워크와 %n 개의 활성연결</numerusform></translation>
+        <translation>사용할 수 있는 비트코인 명령어 옵션 목록을 가져오기 위해 Bitcoin-Qt 도움말 메시지를 표시합니다.</translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>사용 가능한 블락 소스가 없습니다...</translation>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>송금 기록 %1/%2개 블록 (추산) 처리됨.</translation>
+        <translation>사용 가능한 블록이 없습니다...</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 블락의 거래 기록들이 처리됨.</translation>
+        <translation>%1 블록의 거래 기록들이 처리됨.</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation><numerusform>시간</numerusform></translation>
+        <translation><numerusform>%n시간</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation><numerusform>일</numerusform></translation>
+        <translation><numerusform>%n일</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation><numerusform>주</numerusform></translation>
+        <translation><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></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 뒤에</translation>
@@ -509,7 +444,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>이것 후의 거래들은 아직 보이지 않을 것입니다.</translation>
+        <translation>이 후의 거래들은 아직 보이지 않을 것입니다.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -529,7 +464,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>따라잡기...</translation>
+        <translation>블록 따라잡기...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -537,7 +472,7 @@ MIT/X11 프로그램 라이선스에 따라 배포합니다. COPYING 또는 http
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>거래 들어오는 중</translation>
+        <translation>들어오고 있는 거래</translation>
     </message>
     <message>
         <source>Date: %1
@@ -559,10 +494,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>지갑이 암호화 되었고 현재 잠겨져 있습니다</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>치명적인 오류가 있습니다. 비트코인을 더이상 안전하게 진행할 수 없어 빠져나갑니다.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -575,7 +506,7 @@ Address: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation>코인컨트롤 주소 선택</translation>
+        <translation>코인 컨트롤 주소 선택</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -583,32 +514,24 @@ Address: %4
     </message>
     <message>
         <source>Bytes:</source>
-        <translation>Bytes:</translation>
+        <translation>바이트:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation>거래량</translation>
+        <translation>거래량:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation>우선도:</translation>
+        <translation>우선순위:</translation>
     </message>
     <message>
         <source>Fee:</source>
         <translation>수수료:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>수수료 이후:</translation>
     </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(un)select all</source>
         <translation>모두 선택(하지 않음)</translation>
@@ -643,7 +566,7 @@ Address: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation>우선도</translation>
+        <translation>우선순위</translation>
     </message>
     <message>
         <source>Copy address</source>
@@ -651,15 +574,15 @@ Address: %4
     </message>
     <message>
         <source>Copy label</source>
-        <translation>라벨 복사하기</translation>
+        <translation>표 복사하기</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>거래액 복사</translation>
+        <translation>거래량 복사</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>송금 ID 복사</translation>
+        <translation>거래 아이디 복사</translation>
     </message>
     <message>
         <source>Lock unspent</source>
@@ -683,55 +606,47 @@ Address: %4
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation>bytes를 복사</translation>
+        <translation>bytes 복사</translation>
     </message>
     <message>
         <source>Copy priority</source>
         <translation>우선도 복사</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>highest</source>
-        <translation>최상</translation>
+        <translation>아주 높음</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>보다 높음</translation>
     </message>
     <message>
         <source>high</source>
-        <translation>상</translation>
+        <translation>높음</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation>중상</translation>
+        <translation>약간 높음</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation>중</translation>
+        <translation>보통</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation>중하</translation>
+        <translation>약간 낮음</translation>
     </message>
     <message>
         <source>low</source>
-        <translation>하</translation>
+        <translation>낮음</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>보다 낮음</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
+        <translation>아주 낮음</translation>
     </message>
     <message>
         <source>(%1 locked)</source>
@@ -741,10 +656,6 @@ Address: %4
         <source>none</source>
         <translation>없음</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
         <translation>예</translation>
@@ -761,47 +672,23 @@ Address: %4
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>이 의미는 수수료가 최소한 %1 per 키로바이트 필요합니다</translation>
     </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>우선 순위가 높은 거래의 경우 블럭에 포함될 가능성이 더 많습니다.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>우선권이 중간보다 작으면 제목이 빨간색으로 변합니다. </translation>
     </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>만약 수령인이 받은 액수가 잔고의 1%보다 작으면 이 제목이 빨간색으로 변합니다.</translation>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>최소 %1의 거래 수수료가 필요하다는 뜻입니다. </translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>노드 릴레이를 위한 최저 수수료의 0.546배보다 낮은 거래는 먼지 거래로 표현됩니다.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>만약 잔돈이 1%보다 작다면 제목이 빨간색으로 변합니다</translation>
-    </message>
     <message>
         <source>(no label)</source>
-        <translation>(표 없슴)</translation>
+        <translation>(표 없음)</translation>
     </message>
     <message>
         <source>change from %1 (%2)</source>
         <translation>~로부터 변경 %1 (%2)</translation>
     </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -816,10 +703,6 @@ Address: %4
         <source>The label associated with this address list entry</source>
         <translation>현재 선택된 주소 필드의 제목입니다. </translation>
     </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;주소</translation>
@@ -841,12 +724,12 @@ Address: %4
         <translation>보내는 주소 편집</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>입력된 주소는&quot;%1&quot; 이미 주소록에 있습니다.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>입력된 주소는"%1" 이미 주소록에 있습니다.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>입력한 &quot;%1&quot; 주소는 올바른 비트코인 주소가 아닙니다.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>입력한 "%1" 주소는 올바른 비트코인 주소가 아닙니다.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,18 +765,26 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>비트코인 코어 - 명령어-라인 옵션</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>비트코인코어</translation>
+        <translation>비트코인 코어</translation>
     </message>
     <message>
         <source>version</source>
         <translation>버전</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-비트)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>비트코인 코어 소개</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>명령줄 옵션</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>사용법:</translation>
@@ -907,8 +798,8 @@ Address: %4
         <translation>UI 옵션</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>&quot;de_DE&quot;와 같이 언어를 설정하십시오 (기본값: 시스템 로캘)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>"de_DE"와 같이 언어를 설정하십시오 (기본값: 시스템 로캘)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,12 +845,8 @@ Address: %4
         <translation>커스텀 데이터 폴더 사용:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>비트코인</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>오류 : 별도 정의한 폴더명 &quot;%1&quot; 생성에 실패했습니다. </translation>
+        <source>Bitcoin Core</source>
+        <translation>비트코인 코어</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1047,17 +934,13 @@ Address: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>프록시 아이피 주소(예. IPv4: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 type="unfinished"/>
-    </message>
     <message>
         <source>Third party transaction URLs</source>
         <translation>제 3자 거래 URLs</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>명령어 라인 옵션을 활성화해서 옵션을 우회하시오</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1071,10 +954,6 @@ Address: %4
         <source>&amp;Network</source>
         <translation>네트워크(&amp;N)</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>지갑</translation>
@@ -1087,10 +966,6 @@ Address: %4
         <source>Enable coin &amp;control features</source>
         <translation>코인 상세 제어기능을 활성화합니다 - &amp;C</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 type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;확인되지 않은 돈을 쓰다</translation>
@@ -1115,14 +990,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>프록시의 포트번호입니다(예: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS 버전(&amp;V):</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>프록시의 SOCKS 버전입니다(예: 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>창(&amp;W)</translation>
@@ -1163,14 +1030,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>인터페이스에 표시하고 코인을 보낼때 사용할 기본 최소화 단위를 선택하십시오.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>송금 목록에 비트코인 주소를 표시할지의 여부입니다.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>송금 목록에 주소 표시(&amp;D)</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>코인 상세 제어기능에 대한 표시 여부를 선택할 수 있습니다.</translation>
@@ -1228,7 +1087,7 @@ Address: %4
     </message>
     <message>
         <source>Available:</source>
-        <translation>유용한</translation>
+        <translation>사용 가능</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
@@ -1236,7 +1095,7 @@ Address: %4
     </message>
     <message>
         <source>Pending:</source>
-        <translation>미정</translation>
+        <translation>미확정</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1264,7 +1123,7 @@ Address: %4
     </message>
     <message>
         <source>out of sync</source>
-        <translation>오래됨</translation>
+        <translation>동기화 필요</translation>
     </message>
 </context>
 <context>
@@ -1274,8 +1133,8 @@ Address: %4
         <translation>URI 조작중</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI의 파싱에 문제가 발생했습니다. 잘못된 비트코인 주소나 URI 파라미터 구성에 오류가 존재할 수 있습니다.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>잘못된 지불 주소입니다 %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,29 +1148,17 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>비트코인을 시작할 수 없습니다: 지급제어기를 클릭하시오</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>네트워크 관리인 경고</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>현재의 프록시가 SOCKS5를 지원하지 않아 지불 요청을 수행할 수 없습니다. </translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
+        <translation>대금 청구서의 URL이 올바르지 않습니다: %1</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
         <translation>지불이 파일 처리를 요청합니다</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
+        <translation>임의로 변경한 결제 스크립트 기반의 대금 청구서 양식은 검증되기 전까지는 지원되지 않습니다.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1321,10 +1168,6 @@ Address: %4
         <source>Error communicating with %1: %2</source>
         <translation>%1과 소통하는데 애러: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>서버로 부터 반응이 없습니다 %1</translation>
@@ -1338,33 +1181,20 @@ Address: %4
         <translation>네트워크 요청 애러</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>비트코인</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>애러: 지정한 데이터 폴더 &quot;%1&quot;은 존재하지 않습니다.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>오류: 잘못된 -regtest 와 -testnet의 조합입니다.</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>비트코인 코어가 아직 안전하게 종료되지 않았습니다.</translation>
+        <source>Amount</source>
+        <translation>거래량</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>비트코인 주소를 입력하기 (예 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>없음</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1400,7 +1230,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>정보&amp;</translation>
+        <translation>정보</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1438,10 +1268,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>현재 블럭 수</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>예상 전체 블럭</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>최종 블럭 시각</translation>
@@ -1468,11 +1294,11 @@ Address: %4
     </message>
     <message>
         <source>In:</source>
-        <translation type="unfinished"/>
+        <translation>In:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Out:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1502,35 +1328,7 @@ Address: %4
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>사용할 수 있는 명령을 둘러보려면 &lt;b&gt;help&lt;/b&gt;를 입력하십시오.</translation>
     </message>
-    <message>
-        <source>%1 B</source>
-        <translation>% 1 바이트</translation>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation>% 1 킬로바이트</translation>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation>% 1 메가바이트</translation>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation>% 1 기가바이트</translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation>% 1 분</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>% 1 시간</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>% 1시 %2 분</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1553,13 +1351,9 @@ Address: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>현재의 수취용 주소를 재사용합니다만 권장하지는 않습니다. (R&amp;)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
+        <translation>임의의 라벨이 새로운 받기 주소와 결합</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
@@ -1585,10 +1379,6 @@ Address: %4
         <source>&amp;Request payment</source>
         <translation>지불 요청(&amp;R)</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>보기</translation>
@@ -1689,7 +1479,7 @@ Address: %4
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(표 없슴)</translation>
+        <translation>(표 없음)</translation>
     </message>
     <message>
         <source>(no message)</source>
@@ -1728,7 +1518,7 @@ Address: %4
     </message>
     <message>
         <source>Bytes:</source>
-        <translation>Bytes:</translation>
+        <translation>바이트:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -1736,28 +1526,16 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation>우선도:</translation>
+        <translation>우선순위:</translation>
     </message>
     <message>
         <source>Fee:</source>
         <translation>수수료:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>수수료 이후:</translation>
     </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
     <message>
         <source>Custom change address</source>
         <translation>주소변경</translation>
@@ -1804,7 +1582,7 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>거래액 복사</translation>
+        <translation>거래량 복사</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -1822,14 +1600,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>우선도 복사</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
         <translation>총 액수 %1(=%2)</translation>
@@ -1872,7 +1642,7 @@ Address: %4
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(표 없슴)</translation>
+        <translation>(표 없음)</translation>
     </message>
     <message>
         <source>Warning: Unknown change address</source>
@@ -1886,14 +1656,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>거래 수수료로 추가됨</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>지불 요청 만료</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>잘못된 지불 주소입니다 %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1667,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>지급&amp;수신:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>비트코인을 송금할 지갑 주소 입력하기 (예 : 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>당신의 주소록에 이 주소를 추가하기 위하여 표를 입역하세요 </translation>
@@ -1953,10 +1711,6 @@ Address: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>사용된 주소 목록에 새 주소를 추가하기 위해 제목을 입력합니다. </translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>지급요청 미확인입니다</translation>
@@ -1995,10 +1749,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>여러분 자신을 증명하기 위해 주소를 첨가하고 섬여할 수 있습니다. 피싱 공격으로 말미암아 여러분의 서명을 통해 속아 넘어가게 할 수 있으므로, 서명하지 않은 어떤 모호한 요소든 주의하십시오. 동의하는 완전 무결한 조항에만 서명하십시오.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>메시지를 서명할 주소 (예: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>이전에 사용한 주소를 선택하십시오</translation>
@@ -2051,10 +1801,6 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>메시지를 검증하기 위해 아래 칸에 각각 지갑 주소와 메시지, 전자서명을 입력하세요. (메시지 원본의 띄어쓰기, 들여쓰기, 행 나눔 등이 정확하게 입력되어야 하므로 원본을 복사해서 입력하세요) 이 기능은 메시지 검증이 주 목적이며, 네트워크 침입자에 의해 변조되지 않도록 전자서명 해독에 불필요한 시간을 소모하지 마세요. </translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>서명한 메시지의 주소입니다 (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>정확한 비트코인주소가 입력됬는지 메시지를 확인하시오</translation>
@@ -2068,12 +1814,8 @@ Address: %4
         <translation>모든 검증 메시지 필드 재설정</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>비트코인 주소를 입력하기 (예 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>서명을 만들려면 &quot;메시지 서명&quot;을 누르십시오</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>서명을 만들려면 "메시지 서명"을 누르십시오</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2128,7 +1870,7 @@ Address: %4
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>비트코인코어</translation>
+        <translation>비트코인 코어</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
@@ -2172,10 +1914,6 @@ Address: %4
         <source>Status</source>
         <translation>상태</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>%n 노드를 거쳐 전파합니다.</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>날짜</translation>
@@ -2208,10 +1946,6 @@ Address: %4
         <source>Credit</source>
         <translation>예금</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>허용되지 않는다</translation>
@@ -2238,15 +1972,15 @@ Address: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>송금 ID</translation>
+        <translation>아이디</translation>
     </message>
     <message>
         <source>Merchant</source>
         <translation>상인</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>신규 채굴된 코인이 사용되기 위해서는 %1 개의 블럭이 경과되어야 합니다. 블럭을 생성할 때 블럭체인에 추가되도록 네트워크에 전파되는 과정을 거치는데, 블럭체인에 포함되지 못하고 실패한다면 해당 블럭의 상태는 &apos;미승인&apos;으로 표현되고 비트코인 또한 사용될 수 없습니다. 이 현상은 다른 노드가 비슷한 시간대에 동시에 블럭을 생성할 때 종종 발생할 수 있습니다. </translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>신규 채굴된 코인이 사용되기 위해서는 %1 개의 블럭이 경과되어야 합니다. 블럭을 생성할 때 블럭체인에 추가되도록 네트워크에 전파되는 과정을 거치는데, 블럭체인에 포함되지 못하고 실패한다면 해당 블럭의 상태는 '미승인'으로 표현되고 비트코인 또한 사용될 수 없습니다. 이 현상은 다른 노드가 비슷한 시간대에 동시에 블럭을 생성할 때 종종 발생할 수 있습니다. </translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2276,10 +2010,6 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>. 아직 성공적으로 통보하지 않음</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>%n 개의 추가 블럭을 읽습니다.</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>알수없음</translation>
@@ -2304,24 +2034,16 @@ Address: %4
     </message>
     <message>
         <source>Type</source>
-        <translation>형식</translation>
+        <translation>종류</translation>
     </message>
     <message>
         <source>Address</source>
         <translation>주소</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>수량</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>충분히 숙성되지 않은 상태 (%1 승인, %2 후에 사용 가능합니다)</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>%n 개의 추가 블럭을 읽습니다.</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>%1 까지 열림</translation>
@@ -2356,7 +2078,7 @@ Address: %4
     </message>
     <message>
         <source>Received with</source>
-        <translation>다음과 함께 받음 : </translation>
+        <translation>보낸 주소</translation>
     </message>
     <message>
         <source>Received from</source>
@@ -2364,7 +2086,7 @@ Address: %4
     </message>
     <message>
         <source>Sent to</source>
-        <translation>다음에게 보냄 :</translation>
+        <translation>받는 주소</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
@@ -2372,7 +2094,7 @@ Address: %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>채굴됨</translation>
+        <translation>채굴</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2467,11 +2189,11 @@ Address: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>거래액 복사</translation>
+        <translation>거래량 복사</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>송금 ID 복사</translation>
+        <translation>거래 아이디 복사</translation>
     </message>
     <message>
         <source>Edit label</source>
@@ -2525,10 +2247,6 @@ Address: %4
         <source>Address</source>
         <translation>주소</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>거래량</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>아이디</translation>
@@ -2542,6 +2260,9 @@ Address: %4
         <translation>상대방</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2314,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>사용법:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>커맨드 목록</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>커맨드 도움말</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>옵션:</translation>
@@ -2645,10 +2354,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>이상행동을 하는 네트워크 참여자들을 다시 연결시키는데 걸리는 시간 (기본값: 86400초)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>IPv4 감청을 위한 RPC 포트 %u번을 설정중 오류가 발생했습니다: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>포트 &lt;port&gt;을 통해 JSON-RPC 연결 (기본값: 8332 또는 testnet: 18332)</translation>
@@ -2657,10 +2362,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>명령줄과 JSON-RPC 명령 수락</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>비트코인 코어 RPC 클라이언트 버전</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>데몬으로 백그라운드에서 실행하고 명령을 허용</translation>
@@ -2673,47 +2374,13 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>외부 접속을 승인합니다</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>암호 허용(기본값: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>IPv6 연결을 위해 RPC port %u 설정 중 오류가 발생했습니다. IPv4: %s 환경으로 돌아갑니다.</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>선택된 주소로 고정하며 항상 리슨(Listen)합니다. IPv6 프로토콜인 경우  [host]:port 방식의 명령어 표기법을 사용합니다.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
@@ -2729,38 +2396,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>해당 금액보다 적은 수수료는 수수료 면제로 간주됩니다. (거래 생성의 목적)(기본값:</translation>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>이 빌드 버전은 정식 출시 전 테스트의 목적이며, 예기치 않은 위험과 오류가 발생할 수 있습니다. 채굴과 상점용 소프트웨어로 사용하는 것을 권하지 않습니다.</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
         <translation>Tor 서비스를 이용하여 네트워크에 참여하기 위해서 SOCKS5 프록시를 따로 사용함 (기본값: -proxy)</translation>
@@ -2769,10 +2408,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>경고: -paytxfee값이 너무 큽니다! 이 값은 송금할때 지불할 송금 수수료입니다.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>경고: 컴퓨터의 날짜와 시간이 올바른지 확인하십시오! 시간이 잘못되면 비트코인은 제대로 동작하지 않습니다.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>경고 : 모든 네트워크가 동의해야 하나, 일부 채굴자들에게 문제가 있는 것으로 보입니다. </translation>
@@ -2797,38 +2432,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>(default: wallet.dat)</source>
         <translation>(기본값: wallet.dat)</translation>
     </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>손상된 wallet.dat에서 개인키 복원을 시도합니다</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>비트코인 코어 데몬</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>블록 생성 옵션:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>거래내역 삭제(진단도구; 재스캔 포함)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>지정된 노드에만 연결하기</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>SOCKS 프록시를 통해 연결</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>JSON-RPC에 연결 &lt;포트&gt;(기본값:8332 또는 테스트넷: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>연결 설정 : </translation>
@@ -2851,7 +2466,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <translation>지갑 불러오기를 하지마시오 또한 지갑 RPC 연결을 차단하십시오</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2861,10 +2476,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error initializing block database</source>
         <translation>블록 데이터베이스를 초기화하는데 오류</translation>
     </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation>지갑 데이터베이스 환경 초기화하는데 오류</translation>
-    </message>
     <message>
         <source>Error loading block database</source>
         <translation>블록 데이터베이스를 불러오는데 오류</translation>
@@ -2929,18 +2540,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>데이터 실행 취소를 기록하는데 실패했습니다</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>송금 거래시 추가되는 KB 당 수수료입니다. </translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>해당 금액보다 적은 수수료는 수수료 면제로 간주됩니다. (릴레이 목적)(기본값:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>DNS 찾기를 이용하여 사용자를 찾으시오(기본값: 1 연결 되면)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>안전 모드로 강제 진입하는 기능입니다.(기본값: 0) </translation>
@@ -2953,10 +2552,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>시작할때 검사할 블록 갯수입니다(기본값: 288, 0 = 모두)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>들여오기 중...</translation>
@@ -2966,29 +2561,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>올바르지 않거나 생성된 블록을 찾을 수 없습니다. 잘못된 네트워크 자료 디렉토리?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>잘못된 -onion 주소입니다: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>잘못된 -onion 주소입니다: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>사용 가능한 파일 디스크립터-File Descriptor-가 부족합니다. </translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC 클라이언트 옵션</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>현재의 blk000??.dat 파일들로부터 블록체인 색인을 재구성합니다.</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>-proxy를 위한 SOCKS 버전을 선택하세요 (4 또는 5, 기본: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>데이터베이스 케시 크기를 메가바이트로 설정(%d 부터 %d, 기본값: %d)</translation>
@@ -3005,18 +2588,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify wallet file (within data directory)</source>
         <translation>데이터 폴더 안에 지갑 파일을 선택하세요.</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>사용법 (오래되었습니다. bitcoin-cli를 사용하십시오):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>블록 검증중...</translation>
@@ -3025,22 +2596,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>지갑 검증중...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>RPC서버가 시작되길 기다리십시요</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <translation>지갑 %s는 데이터 디렉토리 %s 밖에 위치합니다.</translation>
     </message>
     <message>
         <source>Wallet options:</source>
         <translation>지갑 옵션:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>-txindex를 바꾸기 위해서는 -reindex를 사용해서 데이터베이스를 재구성해야 합니다. </translation>
@@ -3051,7 +2614,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>데이터 디렉토리 %s에 락을 걸 수 없었습니다. 비트코인 코어가 이미 실행 중인 것으로 보입니다.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -3059,7 +2622,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>출력 오류 정보(기본값:0, 임의의 공급 카테고리)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
@@ -3070,12 +2633,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>정보</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>노드로 전달하기 위한 최저 거래 수수료가 부족합니다. - minrelaytxfee=&lt;amount&gt;: &apos;%s&apos; -</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>노드로 전달하기 위한 최저 거래 수수료가 부족합니다. - minrelaytxfee=&lt;amount&gt;: '%s' -</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>최저 거래 수수료가 부족합니다. -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>최저 거래 수수료가 부족합니다. -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3125,22 +2688,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>모든 네트워크 메시지 마다 무작위로 1이 떨어진다</translation>
     </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL 옵션: (SSL 설정 절차를 보혀면 비트코인 위키를 참조하십시오)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>비트코인 코어로 명령 보내기</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>추적오류 정보를 degug.log 자료로 보내는 대신 콘솔로 보내기</translation>
@@ -3157,10 +2704,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>모든 디버그 설정 보기(설정: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>벤치마크 정보 보기(기본값: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>클라이언트 시작시 debug.log 파일 비우기(기본값: 디버그 안할때 1)</translation>
@@ -3173,10 +2716,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>밀리초 단위로 연결 제한시간을 설정하십시오(기본값: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>비트코인 코어의 데몬 프로그램을 실행합니다.</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>시스템 오류:</translation>
@@ -3221,10 +2760,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>on startup</source>
         <translation>구동 중</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>버전</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat 파일이 손상되었고 복구가 실패하였습니다.</translation>
@@ -3233,14 +2768,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC 연결에 사용할 암호</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>지정한 IP 주소의 JSON-RPC 연결 허용</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>실행 중인 노드로 명령 전송 &lt;ip&gt; (기본값: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>최고의 블럭이 변하면 명령을 실행(cmd 에 있는 %s 는 블럭 해시에 의해 대체되어 짐)</translation>
@@ -3273,10 +2800,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>도움말 메시지입니다</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>이 컴퓨터의 %s에 바인딩할 수 없습니다 (바인딩 과정에 %d 오류 발생, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>-addnode, -seednode, -connect 옵션에 대해 DNS 탐색 허용</translation>
@@ -3289,41 +2812,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat 불러오기 에러: 지갑 오류</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>wallet.dat 불러오기 에러:  지갑은 새버전의 비트코인이 필요합니다.</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>지갑을 새로 써야 합니다.:  완성하기 위하여 비트코인을 다시 시작하십시오.</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat 불러오기 에러</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>잘못된 -proxy 주소입니다: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>잘못된 -proxy 주소입니다: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>-onlynet에 지정한 네트워크를 알 수 없습니다: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>-onlynet에 지정한 네트워크를 알 수 없습니다: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>요청한 -socks 프록히 버전을 알 수 없습니다: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>-bind 주소를 확인할 수 없습니다: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>-bind 주소를 확인할 수 없습니다: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>-externalip 주소를 확인할 수 없습니다: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>-externalip 주소를 확인할 수 없습니다: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-paytxfee=&lt;amount&gt;에 대한 양이 잘못되었습니다: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-paytxfee=&lt;amount&gt;에 대한 양이 잘못되었습니다: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3369,13 +2880,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>오류</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>설정 파일에 rpcpassword=&lt;암호&gt;를 설정해야 합니다:
-%s
-파일이 없으면 소유자 읽기 전용 파일 권한으로 만들어야 합니다.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index d0db034e86d0..ad4b5eae03f1 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -1,141 +1,17 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ky" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ky" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Жаң даректи жасоо</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>Ө&amp;чүрүү</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Дарек</translation>
@@ -147,3222 +23,324 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
+    </context>
+<context>
+    <name>BitcoinGUI</name>
     <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
+        <source>&amp;Transactions</source>
+        <translation>&amp;Транзакциялар</translation>
     </message>
     <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
+        <source>&amp;Verify message...</source>
+        <translation>Билдирүүнү &amp;текшерүү...</translation>
     </message>
     <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin</source>
+        <translation>Bitcoin</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <source>Wallet</source>
+        <translation>Капчык</translation>
     </message>
     <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
     </message>
     <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Жардам</translation>
     </message>
     <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Ката</translation>
     </message>
     <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
+        <source>Warning</source>
+        <translation>Эскертүү</translation>
     </message>
     <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Маалымат</translation>
     </message>
     <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
+        <source>Up to date</source>
+        <translation>Жаңыланган</translation>
     </message>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Дарек</translation>
     </message>
     <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <source>none</source>
+        <translation>жок</translation>
     </message>
     <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(аты жок)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <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 type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Дарек</translation>
     </message>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <source>version</source>
+        <translation>версия</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Ката</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <source>MB</source>
+        <translation>МБ</translation>
     </message>
     <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
+        <source>&amp;Network</source>
+        <translation>&amp;Тармак</translation>
     </message>
     <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Port:</source>
+        <translation>&amp;Порт:</translation>
     </message>
     <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Window</source>
+        <translation>&amp;Терезе</translation>
     </message>
     <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
+        <source>&amp;OK</source>
+        <translation>&amp;Жарайт</translation>
     </message>
     <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Жокко чыгаруу</translation>
     </message>
     <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
+        <source>default</source>
+        <translation>жарыяланбаган</translation>
     </message>
     <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <source>none</source>
+        <translation>жок</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>OverviewPage</name>
     <message>
-        <source>&amp;Transactions</source>
-        <translation>&amp;Транзакциялар</translation>
+        <source>Wallet</source>
+        <translation>Капчык</translation>
     </message>
     <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
+        <source>out of sync</source>
+        <translation>синхрондоштурулган эмес</translation>
     </message>
+</context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
+        <source>&amp;Information</source>
+        <translation>Маалымат</translation>
     </message>
     <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
+        <source>General</source>
+        <translation>Жалпы</translation>
     </message>
     <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Name</source>
+        <translation>Аты</translation>
     </message>
     <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
+        <source>&amp;Open</source>
+        <translation>&amp;Ачуу</translation>
     </message>
     <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <source>&amp;Console</source>
+        <translation>&amp;Консоль</translation>
     </message>
     <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
+        <source>Clear console</source>
+        <translation>Консолду тазалоо</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Дарек</translation>
     </message>
     <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Билдирүү</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Билдирүү</translation>
     </message>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(аты жок)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бардыгын тазалоо</translation>
     </message>
     <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <source>S&amp;end</source>
+        <translation>&amp;Жөнөтүү</translation>
     </message>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(аты жок)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Даректи алмашуу буферинен коюу</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Билдирүү:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Даректи алмашуу буферинен коюу</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бардыгын тазалоо</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <source>%1/offline</source>
+        <translation>%1/тармакта эмес</translation>
     </message>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>&amp;Verify message...</source>
-        <translation>Билдирүүнү &amp;текшерүү...</translation>
+        <source>Message</source>
+        <translation>Билдирүү</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Капчык</translation>
+        <source>Address</source>
+        <translation>Дарек</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Дата</translation>
     </message>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Дарек</translation>
     </message>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
+    </context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>Маалымат</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation>&amp;Файл</translation>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation>&amp;Жардам</translation>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Ката</translation>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation>Эскертүү</translation>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation>Маалымат</translation>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation>Жаңыланган</translation>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Дарек</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation>жок</translation>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(аты жок)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Дарек</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Ката</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation>МБ</translation>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Тармак</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation>&amp;Порт:</translation>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation>&amp;Терезе</translation>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation>&amp;Жарайт</translation>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation>&amp;Жокко чыгаруу</translation>
-    </message>
-    <message>
-        <source>default</source>
-        <translation>жарыяланбаган</translation>
-    </message>
-    <message>
-        <source>none</source>
-        <translation>жок</translation>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Капчык</translation>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation>синхрондоштурулган эмес</translation>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation>Жалпы</translation>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation>Аты</translation>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation>&amp;Ачуу</translation>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation>&amp;Консоль</translation>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation>Консолду тазалоо</translation>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Дарек</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Билдирүү</translation>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Билдирүү</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(аты жок)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Бардыгын тазалоо</translation>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>&amp;Жөнөтүү</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(аты жок)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Даректи алмашуу буферинен коюу</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Билдирүү:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Даректи алмашуу буферинен коюу</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Бардыгын тазалоо</translation>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation>%1/тармакта эмес</translation>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Билдирүү</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Дарек</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Дата</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Дарек</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation>Маалымат</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation>Эскертүү</translation>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <source>Warning</source>
+        <translation>Эскертүү</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Ката</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 425519514a31..450228b22147 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1,40 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="la" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>Hoc est experimentale programma.
-
-Distributum sub MIT/X11 licentia programmatum, vide comitantem plicam COPYING vel http://www.opensource.org/licenses/mit-license.php.
-
-Hoc productum continet programmata composita ab OpenSSL Project pro utendo in OpenSSL Toolkit (http://www.openssl.org/) et programmata cifrarum scripta ab Eric Young (eay@cryptsoft.com) et UPnP programmata scripta ab Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="la" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -45,22 +9,10 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>Create a new address</source>
         <translation>Crea novam inscriptionem</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copia inscriptionem iam selectam in latibulum systematis</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copia Inscriptionem</translation>
@@ -81,34 +33,10 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>&amp;Delete</source>
         <translation>&amp;Dele</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Hae sunt inscriptiones mittendi pensitationes.  Semper inspice quantitatem et inscriptionem accipiendi antequam nummos mittis.</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Copia &amp;Titulum</translation>
@@ -117,23 +45,11 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>&amp;Edit</source>
         <translation>&amp;Muta</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma Separata Plica (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -167,10 +83,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>Repeat new passphrase</source>
         <translation>Itera novam tesseram</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Insero novam tesseram cassidili.&lt;br/&gt;Sodes tessera &lt;b&gt;10 pluriumve fortuitarum litterarum&lt;/b&gt; utere aut &lt;b&gt;octo pluriumve verborum&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cifra cassidile</translation>
@@ -270,10 +182,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>&amp;Overview</source>
         <translation>&amp;Summarium</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Monstra generale summarium cassidilis</translation>
@@ -294,10 +202,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>Quit application</source>
         <translation>Exi applicatione</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Monstra informationem de Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Informatio de &amp;Qt</translation>
@@ -322,18 +226,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Muta tesseram...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importans frusta ab disco...</translation>
@@ -420,7 +312,7 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Tabella instrumentorum &quot;Tabs&quot;</translation>
+        <translation>Tabella instrumentorum "Tabs"</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -430,38 +322,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>Bitcoin Core</source>
         <translation>Bitcoin Nucleus</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin cliens</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n activa conexio ad rete Bitcoin</numerusform><numerusform>%n activae conexiones ad rete Bitcoin</numerusform></translation>
@@ -470,10 +330,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>No block source available...</source>
         <translation>Nulla fons frustorum absens...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Perfecta %1 de %2 (aestimato) frusta historiae transactionum.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Processae %1 frusta historiae transactionum.</translation>
@@ -490,14 +346,6 @@ Hoc productum continet programmata composita ab OpenSSL Project pro utendo in Op
         <source>%n week(s)</source>
         <translation><numerusform>%n hebdomas</numerusform><numerusform>%n hebdomades</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 post</translation>
@@ -558,10 +406,6 @@ Inscriptio: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Cassidile &lt;b&gt;cifratum&lt;/b&gt; est et iam nunc &lt;b&gt;seratum&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Error fatalis accidit.  Bitcoin nondum pergere tute potest, et exibit.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -572,54 +416,10 @@ Inscriptio: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Quantitas:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Quantitas</translation>
@@ -632,18 +432,10 @@ Inscriptio: %4
         <source>Date</source>
         <translation>Dies</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Confirmatum</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Copia inscriptionem</translation>
@@ -660,147 +452,11 @@ Inscriptio: %4
         <source>Copy transaction ID</source>
         <translation>Copia transactionis ID</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(nullus titulus)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -811,14 +467,6 @@ Inscriptio: %4
         <source>&amp;Label</source>
         <translation>&amp;Titulus</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Inscriptio</translation>
@@ -840,12 +488,12 @@ Inscriptio: %4
         <translation>Muta inscriptionem mittendi</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Inserta inscriptio &quot;%1&quot; iam in libro inscriptionum est.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Inserta inscriptio "%1" iam in libro inscriptionum est.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Inscriptio inserta &quot;%1&quot; non valida inscriptio Bitcoin est.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Inscriptio inserta "%1" non valida inscriptio Bitcoin est.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -858,33 +506,9 @@ Inscriptio: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Nucleus</translation>
@@ -893,6 +517,10 @@ Inscriptio: %4
         <source>version</source>
         <translation>versio</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Optiones mandati initiantis</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Usus:</translation>
@@ -906,96 +534,32 @@ Inscriptio: %4
         <translation>UI optiones</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Constitue linguam, exempli gratia &quot;de_DE&quot; (praedefinitum: lingua systematis)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Constitue linguam, exempli gratia "de_DE" (praedefinitum: lingua systematis)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Incipe minifactum ut icon</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Monstra principem imaginem ad initium (praedefinitum: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Nucleus</translation>
     </message>
     <message>
         <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>Error</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1022,42 +586,6 @@ Inscriptio: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Pelle Bitcoin cum inire systema</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Reconstitue omnes optiones clientis ad praedefinita.</translation>
@@ -1070,30 +598,6 @@ Inscriptio: %4
         <source>&amp;Network</source>
         <translation>&amp;Rete</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Aperi per se portam clientis Bitcoin in itineratore.  Hoc tantum effectivum est si itineratrum tuum supportat UPnP et id activum est.</translation>
@@ -1114,14 +618,6 @@ Inscriptio: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta vicarii (e.g. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Versio:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS versio vicarii (e.g. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Fenestra</translation>
@@ -1162,18 +658,6 @@ Inscriptio: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Selige praedefinitam unitam subdivisionis monstrare in interfacie et quando nummos mittere</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Num monstrare inscriptiones Bitcoin in enumeratione transactionum.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Monstra inscriptiones in enumeratione transactionum</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1186,26 +670,10 @@ Inscriptio: %4
         <source>default</source>
         <translation>praedefinitum</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Confirma optionum reconstituere</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Inscriptio vicarii tradita non valida est.</translation>
@@ -1225,22 +693,6 @@ Inscriptio: %4
         <source>Wallet</source>
         <translation>Cassidile</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Immatura:</translation>
@@ -1249,14 +701,6 @@ Inscriptio: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Fossum pendendum quod nondum maturum est</translation>
     </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Recentes transactiones&lt;/b&gt;</translation>
@@ -1272,117 +716,32 @@ Inscriptio: %4
         <source>URI handling</source>
         <translation>Tractatio URI</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI intellegi non posse!  Huius causa possit inscriptionem Bitcoin non validam aut URI parametra maleformata.</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Bitcoin incipere non potest: cliccare-ad-pensandum handler</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Quantitas</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Insere inscriptionem Bitcoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Save QR Code</source>
         <translation>Salva codicem QR</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1401,14 +760,6 @@ Inscriptio: %4
         <source>&amp;Information</source>
         <translation>&amp;Informatio</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Utens OpenSSL versione</translation>
@@ -1421,10 +772,6 @@ Inscriptio: %4
         <source>Network</source>
         <translation>Rete</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Numerus conexionum</translation>
@@ -1437,10 +784,6 @@ Inscriptio: %4
         <source>Current number of blocks</source>
         <translation>Numerus frustorum iam nunc</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Aestimatus totalis numerus frustorum</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Hora postremi frusti</translation>
@@ -1453,26 +796,6 @@ Inscriptio: %4
         <source>&amp;Console</source>
         <translation>&amp;Terminale</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Build date</source>
         <translation>Dies aedificandi</translation>
@@ -1501,113 +824,17 @@ Inscriptio: %4
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Scribe &lt;b&gt;help&lt;/b&gt; pro summario possibilium mandatorum.</translation>
     </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Titulus:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Copia titulum</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Copia quantitatem</translation>
@@ -1615,34 +842,6 @@ Inscriptio: %4
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Inscriptio</translation>
@@ -1690,77 +889,17 @@ Inscriptio: %4
         <source>(no label)</source>
         <translation>(nullus titulus)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Mitte Nummos</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Quantitas:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Mitte pluribus accipientibus simul</translation>
@@ -1769,10 +908,6 @@ Inscriptio: %4
         <source>Add &amp;Recipient</source>
         <translation>Adde &amp;Accipientem</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Vacuefac &amp;Omnia</translation>
@@ -1793,50 +928,10 @@ Inscriptio: %4
         <source>Confirm send coins</source>
         <translation>Confirma mittendum nummorum</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Copia quantitatem</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Inscriptio accipientis non est valida, sodes reproba.</translation>
@@ -1857,43 +952,11 @@ Inscriptio: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Geminata inscriptio inventa, tantum posse mittere ad quamque inscriptionem semel singulare operatione.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(nullus titulus)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1904,10 +967,6 @@ Inscriptio: %4
         <source>Pay &amp;To:</source>
         <translation>Pensa &amp;Ad:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Inscriptio cui mittere pensitationem (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Insero titulum huic inscriptioni ut eam in tuum librum inscriptionum addas.</translation>
@@ -1916,14 +975,6 @@ Inscriptio: %4
         <source>&amp;Label:</source>
         <translation>&amp;Titulus:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1936,50 +987,14 @@ Inscriptio: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Nuntius:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1994,14 +1009,6 @@ Inscriptio: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Potes nuntios signare inscriptionibus tuis ut demonstres te eas possidere.  Cautus es non amibiguum signare, quia impetus phiscatorum conentur te fallere ut signes identitatem tuam ad eos.  Solas signa sententias cuncte descriptas quibus convenis.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Inscriptio qua signare nuntium (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2050,10 +1057,6 @@ Inscriptio: %4
         <source>Enter the signing 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.</source>
         <translation>Insere inscriptionem signantem, nuntium (cura ut copias intermissiones linearum, spatia, tabs, et cetera exacte) et signationem infra ut nuntium verifices.  Cautus esto ne magis legas in signationem quam in nuntio signato ipso est, ut vites falli ab impetu homo-in-medio.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Inscriptio qua nuntius signatus est (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verifica nuntium ut cures signatum esse cum specifica inscriptione Bitcoin</translation>
@@ -2067,12 +1070,8 @@ Inscriptio: %4
         <translation>Reconstitue omnes campos verificandi nuntii</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Insere inscriptionem Bitcoin (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Clicca &quot;Signa Nuntium&quot; ut signatio generetur</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Clicca "Signa Nuntium" ut signatio generetur</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2129,10 +1128,6 @@ Inscriptio: %4
         <source>Bitcoin Core</source>
         <translation>Bitcoin Nucleus</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -2140,21 +1135,13 @@ Inscriptio: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>Apertum donec %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/non conecto</translation>
@@ -2239,14 +1226,6 @@ Inscriptio: %4
         <source>Transaction ID</source>
         <translation>ID transactionis</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Informatio de debug</translation>
@@ -2275,10 +1254,6 @@ Inscriptio: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, nondum prospere disseminatum est</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform>Aperi pro %n pluribus frustis</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>ignotum</translation>
@@ -2309,14 +1284,6 @@ Inscriptio: %4
         <source>Address</source>
         <translation>Inscriptio</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantitas</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Aperi pro %n plure frusto</numerusform><numerusform>Aperi pro %n pluribus frustis</numerusform></translation>
@@ -2337,22 +1304,6 @@ Inscriptio: %4
         <source>Generated but not accepted</source>
         <translation>Generatum sed non acceptum</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Acceptum cum</translation>
@@ -2480,26 +1431,6 @@ Inscriptio: %4
         <source>Show transaction details</source>
         <translation>Monstra particularia transactionis</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma Separata Plica (*.csv)</translation>
@@ -2524,10 +1455,6 @@ Inscriptio: %4
         <source>Address</source>
         <translation>Inscriptio</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantitas</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,13 +1468,12 @@ Inscriptio: %4
         <translation>ad</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2577,14 +1503,6 @@ Inscriptio: %4
         <source>Backup Failed</source>
         <translation>Conservare abortum est.</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>Successum in conservando</translation>
@@ -2592,18 +1510,6 @@ Inscriptio: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Usus:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Enumera mandata</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Accipe auxilium pro mandato</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Optiones:</translation>
@@ -2644,10 +1550,6 @@ Inscriptio: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Numerum secundorum prohibere ne paria improba reconectant (praedefinitum: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Error erat dum initians portam RPC %u pro auscultando in IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Ausculta pro conexionibus JSON-RPC in &lt;porta&gt; (praedefinitum: 8332 vel testnet: 18332)</translation>
@@ -2656,10 +1558,6 @@ Inscriptio: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accipe terminalis et JSON-RPC mandata.</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Operare infere sicut daemon et mandata accipe</translation>
@@ -2682,7 +1580,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, necesse est te rpcpassword constituere in plica configurationis:
 %s
@@ -2693,37 +1591,13 @@ rpcpassword=%s
 Nomen usoris et tessera eadem esse NON POSSUNT.
 Si plica non existit, eam crea cum permissionibus ut eius dominus tantum sinitur id legere.
 Quoque hortatur alertnotify constituere ut tu notificetur de problematibus;
-exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; admin@foo.com
+exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Error erat dum initians portam RPC %u pro auscultando in IPv6, labens retrorsum ad IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Conglutina ad inscriptionem datam et semper in eam ausculta.  Utere [moderatrum]:porta notationem pro IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Error: Transactio eiecta est! Hoc possit accidere si alii nummorum in cassidili tuo iam soluti sint, ut si usus es exemplar de wallet.dat et nummi soluti sunt in exemplari sed non hic notati ut soluti.</translation>
@@ -2736,58 +1610,14 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Facere mandatum quotiescumque cassidilis transactio mutet (%s in mandato sbstituitur ab TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Hoc est prae-dimittum experimentala aedes - utere eo periculo tuo proprio - nolite utere fodendo vel applicationibus mercatoriis</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Monitio: -paytxfee constitutum valde magnum!  Hoc est merces transactionis solves si mittis transactionem.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Monitio: Sodes cura ut dies tempusque computatri tui recti sunt!  Si horologium tuum pravum est, Bitcoin non proprie fungetur.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Monitio: error legendo wallet.dat!  Omnes claves recte lectae, sed data transactionum vel libri inscriptionum fortasse desint vel prava sint.</translation>
@@ -2796,70 +1626,26 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Monitio: wallet.data corrupta, data salvata!  Originalis wallet.dat salvata ut wallet.{timestamp}.bak in %s; si pendendum tuum vel transactiones pravae sunt, oportet ab conservato restituere.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Conare recipere claves privatas de corrupto wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Optiones creandi frustorum:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conecte sole ad nodos specificatos (vel nodum specificatum)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Corruptum databasum frustorum invenitur</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Discooperi propriam inscriptionem IP (praedefinitum: 1 quando auscultans et nullum -externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Visne reficere databasum frustorum iam?</translation>
@@ -2936,22 +1722,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Failed to write undo data</source>
         <translation>Scribere data pro cancellando mutationes abortum est</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Inveni paria utendo DNS quaerendo (praedefinitum: 1 nisi -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Genera nummos (praedefinitum: 0)</translation>
@@ -2960,70 +1730,18 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Quot frusta proba ad initium (praedefinitum: 288, 0 = omnia)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Inopia descriptorum plicarum.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Restituere indicem catenae frustorum ex activis plicis blk000??.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Constitue numerum filorum ad tractandum RPC postulationes (praedefinitum: 4)</translation>
     </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificante frusta...</translation>
@@ -3032,65 +1750,21 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Verifying wallet...</source>
         <translation>Verificante cassidilem...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importat frusta ab externa plica blk000??.dat</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informatio</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantitas non valida pro -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantitas non valida pro -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantitas non valida pro -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantitas non valida pro -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3112,42 +1786,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Tantum conecte ad nodos in rete &lt;net&gt; (IPv4, IPv6 aut Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Optiones SSL: (vide vici de Bitcoin pro instructionibus SSL configurationis)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Mitte informationem vestigii/debug ad terminale potius quam plicam debug.log</translation>
@@ -3156,18 +1794,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Constitue minimam magnitudinem frusti in octetis/bytes (praedefinitum: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Diminue plicam debug.log ad initium clientis (praedefinitum: 1 nisi -debug)</translation>
@@ -3180,10 +1806,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Specifica tempumfati conexionis in millisecundis (praedefinitum: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systematis error:</translation>
@@ -3220,18 +1842,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Monitio: Haec versio obsoleta est, progressio postulata!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versio</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupta, salvare abortum est</translation>
@@ -3240,14 +1850,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Password for JSON-RPC connections</source>
         <translation>Tessera pro conexionibus JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitte conexionibus JSON-RPC ex inscriptione specificata</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Mitte mandata nodo operanti in &lt;ip&gt; (praedefinitum: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Pelle mandatum quando optissimum frustum mutat (%s in mandato substituitur ab hash frusti)</translation>
@@ -3280,10 +1882,6 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>This help message</source>
         <translation>Hic nuntius auxilii</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Non posse conglutinare ad %s in hoc computatro (conglutinare redidit errorem %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitte quaerenda DNS pro -addnode, -seednode, et -connect</translation>
@@ -3296,41 +1894,29 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error legendi wallet.dat: Cassidile corruptum</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Error legendi wallet.dat: Cassidili necesse est recentior versio Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Cassidili necesse erat rescribi: Repelle Bitcoin ut compleas</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error legendi wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Inscriptio -proxy non valida: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Ignotum rete specificatum in -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Inscriptio -proxy non valida: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Ignota -socks vicarii versio postulata: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Ignotum rete specificatum in -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Non posse resolvere -bind inscriptonem: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Non posse resolvere -bind inscriptonem: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Non posse resolvere -externalip inscriptionem: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Non posse resolvere -externalip inscriptionem: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantitas non valida pro -paytxfee=&lt;quantitas&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantitas non valida pro -paytxfee=&lt;quantitas&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +1962,5 @@ exempli gratia: alertnotify=echo %%s | mail -s &quot;Bitcoin Notificatio&quot; a
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Necesse est te rpcpassword=&lt;tesseram&gt; constituere in plica configurationum:
-%s
-Si plica non existat, crea eam cum permissionibus ut solus eius dominus eam legere sinatur.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index c74fd8ab3bd6..6d0fb684daa0 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1,40 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>Tai eksperimentinė programa.
-
-Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.opensource.org/licenses/mit-license.php.
-
-Šiame produkte yra OpenSSL projekto kuriamas OpenSSL Toolkit (http://www.openssl.org/), Eric Young parašyta kriptografinė programinė įranga bei Thomas Bernard sukurta UPnP programinė įranga.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="lt" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -65,14 +29,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopijuoti adresą</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Export</source>
         <translation>&amp;Eksportuoti</translation>
@@ -81,34 +37,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>&amp;Delete</source>
         <translation>&amp;Trinti</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopijuoti ž&amp;ymę</translation>
@@ -117,23 +45,11 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>&amp;Edit</source>
         <translation>&amp;Keisti</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Kableliais išskirtas failas (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -167,10 +83,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>Repeat new passphrase</source>
         <translation>Pakartokite naują slaptafrazę</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Įveskite naują piniginės slaptafrazę.&lt;br/&gt;Prašome naudoti slaptafrazę iš &lt;b&gt; 10 ar daugiau atsitiktinių simbolių&lt;/b&gt; arba &lt;b&gt;aštuonių ar daugiau žodžių&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Užšifruoti piniginę</translation>
@@ -211,10 +123,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Ar tikrai norite šifruoti savo piniginę?</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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Įspėjimas: įjungtas Caps Lock klavišas!</translation>
@@ -270,10 +178,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>&amp;Overview</source>
         <translation>&amp;Apžvalga</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Rodyti piniginės bendrą apžvalgą</translation>
@@ -294,10 +198,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>Quit application</source>
         <translation>Išjungti programą</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Rodyti informaciją apie Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Apie &amp;Qt</translation>
@@ -322,18 +222,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Keisti slaptafrazę...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Blokai importuojami iš disko...</translation>
@@ -394,18 +282,6 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>Show or hide the main Window</source>
         <translation>Rodyti arba slėpti pagrindinį langą</translation>
     </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Failas</translation>
@@ -430,54 +306,10 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>Bitcoin Core</source>
         <translation>Bitcoin branduolys</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klientas</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n Bitcoin tinklo aktyvus ryšys</numerusform><numerusform>%n Bitcoin tinklo aktyvūs ryšiai</numerusform><numerusform>%n Bitcoin tinklo aktyvūs ryšiai</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n valanda</numerusform><numerusform>%n valandos</numerusform><numerusform>%n valandų</numerusform></translation>
@@ -490,33 +322,13 @@ Platinama pagal MIT/X11 licenciją, kurią rasite faile COPYING arba http://www.
         <source>%n week(s)</source>
         <translation><numerusform>%n savaitė</numerusform><numerusform>%n savaitės</numerusform><numerusform>%n savaičių</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Klaida</translation>
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
+        <translation>Įspėjimas</translation>
     </message>
     <message>
         <source>Information</source>
@@ -557,10 +369,6 @@ Adresas: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Piniginė &lt;b&gt;užšifruota&lt;/b&gt; ir šiuo metu &lt;b&gt;užrakinta&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -571,54 +379,10 @@ Adresas: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Suma:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Suma</translation>
@@ -631,18 +395,10 @@ Adresas: %4</translation>
         <source>Date</source>
         <translation>Data</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Patvirtintas</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Kopijuoti adresą</translation>
@@ -655,151 +411,11 @@ Adresas: %4</translation>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(nėra žymės)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -810,14 +426,6 @@ Adresas: %4</translation>
         <source>&amp;Label</source>
         <translation>Ž&amp;ymė</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Adresas</translation>
@@ -839,11 +447,11 @@ Adresas: %4</translation>
         <translation>Keisti siuntimo adresą</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>Įvestas adresas „%1“ jau yra adresų knygelėje.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
         <translation>Įvestas adresas „%1“ nėra galiojantis Bitcoin adresas.</translation>
     </message>
     <message>
@@ -857,33 +465,9 @@ Adresas: %4</translation>
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin branduolys</translation>
@@ -892,6 +476,10 @@ Adresas: %4</translation>
         <source>version</source>
         <translation>versija</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Komandinės eilutės parametrai</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Naudojimas:</translation>
@@ -905,26 +493,14 @@ Adresas: %4</translation>
         <translation>Naudotoji sąsajos parametrai</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Nustatyti kalbą, pavyzdžiui &quot;lt_LT&quot; (numatyta: sistemos kalba)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Nustatyti kalbą, pavyzdžiui "lt_LT" (numatyta: sistemos kalba)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Paleisti sumažintą</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -932,69 +508,17 @@ Adresas: %4</translation>
         <translation>Sveiki</translation>
     </message>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin branduolys</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Klaida</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1005,10 +529,6 @@ Adresas: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Pagrindinės</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>&amp;Mokėti sandorio mokestį</translation>
@@ -1022,84 +542,16 @@ Adresas: %4</translation>
         <translation>&amp;Paleisti Bitcoin programą su window sistemos paleidimu</translation>
     </message>
     <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
+        <source>&amp;Network</source>
+        <translation>&amp;Tinklas</translation>
     </message>
     <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
+        <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
+        <translation>Automatiškai atidaryti Bitcoin kliento prievadą maršrutizatoriuje. Tai veikia tik tada, kai jūsų maršrutizatorius palaiko UPnP ir ji įjungta.</translation>
     </message>
     <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Tinklas</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Automatiškai atidaryti Bitcoin kliento prievadą maršrutizatoriuje. Tai veikia tik tada, kai jūsų maršrutizatorius palaiko UPnP ir ji įjungta.</translation>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation>Persiųsti prievadą naudojant &amp;UPnP</translation>
+        <source>Map port using &amp;UPnP</source>
+        <translation>Persiųsti prievadą naudojant &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1113,14 +565,6 @@ Adresas: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Tarpinio serverio preivadas (pvz, 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;versija:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Tarpinio serverio SOCKS versija (pvz., 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Langas</translation>
@@ -1161,18 +605,6 @@ Adresas: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Rodomų ir siunčiamų monetų kiekio matavimo vienetai</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Rodyti adresus sandorių sąraše</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;Gerai</translation>
@@ -1185,26 +617,6 @@ Adresas: %4</translation>
         <source>default</source>
         <translation>numatyta</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Nurodytas tarpinio serverio adresas negalioja.</translation>
@@ -1216,38 +628,14 @@ Adresas: %4</translation>
         <source>Form</source>
         <translation>Forma</translation>
     </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>Piniginė</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Nepribrendę:</translation>
     </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Viso:</translation>
@@ -1271,117 +659,40 @@ Adresas: %4</translation>
         <source>URI handling</source>
         <translation>URI apdorojimas</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Network request error</source>
         <translation>Tinklo užklausos klaida</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Suma</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Įveskite bitkoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>nėra</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Save QR Code</source>
         <translation>Įrašyti QR kodą</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1400,14 +711,6 @@ Adresas: %4</translation>
         <source>&amp;Information</source>
         <translation>&amp;Informacija</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Naudojama OpenSSL versija</translation>
@@ -1420,10 +723,6 @@ Adresas: %4</translation>
         <source>Network</source>
         <translation>Tinklas</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Prisijungimų kiekis</translation>
@@ -1436,10 +735,6 @@ Adresas: %4</translation>
         <source>Current number of blocks</source>
         <translation>Dabartinis blokų skaičius</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Paskutinio bloko laikas</translation>
@@ -1452,25 +747,9 @@ Adresas: %4</translation>
         <source>&amp;Console</source>
         <translation>&amp;Konsolė</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Viso:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1480,10 +759,6 @@ Adresas: %4</translation>
         <source>Debug log file</source>
         <translation>Derinimo žurnalo failas</translation>
     </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear console</source>
         <translation>Išvalyti konsolę</translation>
@@ -1492,14 +767,6 @@ Adresas: %4</translation>
         <source>Welcome to the Bitcoin RPC console.</source>
         <translation>Sveiki atvykę į Bitcoin RPC konsolę.</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1 B</source>
         <translation>%1 B</translation>
@@ -1516,97 +783,17 @@ Adresas: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>Ž&amp;ymė:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Kopijuoti žymę</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
@@ -1618,30 +805,10 @@ Adresas: %4</translation>
         <source>QR Code</source>
         <translation>QR kodas</translation>
     </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment information</source>
         <translation>Mokėjimo informacija</translation>
     </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Adresas</translation>
@@ -1658,10 +825,6 @@ Adresas: %4</translation>
         <source>Message</source>
         <translation>Žinutė</translation>
     </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
         <translation>Klaida, koduojant URI į QR kodą.</translation>
@@ -1689,77 +852,17 @@ Adresas: %4</translation>
         <source>(no label)</source>
         <translation>(nėra žymės)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Siųsti monetas</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Suma:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Siųsti keliems gavėjams vienu metu</translation>
@@ -1768,10 +871,6 @@ Adresas: %4</translation>
         <source>Add &amp;Recipient</source>
         <translation>&amp;A Pridėti gavėją</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Išvalyti &amp;viską</translation>
@@ -1792,109 +891,37 @@ Adresas: %4</translation>
         <source>Confirm send coins</source>
         <translation>Patvirtinti monetų siuntimą</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>The recipient address is not valid, please recheck.</source>
+        <translation>Negaliojantis gavėjo adresas. Patikrinkite.</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Apmokėjimo suma turi būti didesnė nei 0.</translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>The amount exceeds your balance.</source>
+        <translation>Suma viršija jūsų balansą.</translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+        <translation>Jei pridedame sandorio mokestį %1 bendra suma viršija jūsų balansą.</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Duplicate address found, can only send to each address once per send operation.</source>
+        <translation>Rastas adreso dublikatas.</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(nėra žymės)</translation>
     </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation>Negaliojantis gavėjo adresas. Patikrinkite.</translation>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Apmokėjimo suma turi būti didesnė nei 0.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation>Suma viršija jūsų balansą.</translation>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Jei pridedame sandorio mokestį %1 bendra suma viršija jūsų balansą.</translation>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Rastas adreso dublikatas.</translation>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(nėra žymės)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
         <source>A&amp;mount:</source>
         <translation>Su&amp;ma:</translation>
@@ -1903,10 +930,6 @@ Adresas: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>Mokėti &amp;gavėjui:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Įveskite žymę šiam adresui kad galėtumėte įtraukti ją į adresų knygelę</translation>
@@ -1915,14 +938,6 @@ Adresas: %4</translation>
         <source>&amp;Label:</source>
         <translation>Ž&amp;ymė:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1935,72 +950,20 @@ Adresas: %4</translation>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Žinutė:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Sign Message</source>
         <translation>&amp;Pasirašyti žinutę</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Įveskite bitkoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -2017,25 +980,13 @@ Adresas: %4</translation>
         <source>Enter the message you want to sign here</source>
         <translation>Įveskite pranešimą, kurį norite pasirašyti čia</translation>
     </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
         <translation>Registruotis žinute įrodymuii, kad turite šį adresą</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
+        <translation>Registruoti praneši&amp;mą</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -2045,33 +996,13 @@ Adresas: %4</translation>
         <source>&amp;Verify Message</source>
         <translation>&amp;Patikrinti žinutę</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Įveskite bitkoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Patikrinkite žinutę, jog įsitikintumėte, kad ją pasirašė nurodytas Bitcoin adresas</translation>
     </message>
     <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Įveskite bitkoinų adresą (pvz. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Spragtelėkite &quot;Registruotis žinutę&quot; tam, kad gauti parašą</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Spragtelėkite "Registruotis žinutę" tam, kad gauti parašą</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2081,18 +1012,10 @@ Adresas: %4</translation>
         <source>Please check the address and try again.</source>
         <translation>Prašom patikrinti adresą ir bandyti iš naujo.</translation>
     </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
         <translation>Piniginės atrakinimas atšauktas.</translation>
     </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message signing failed.</source>
         <translation>Žinutės pasirašymas nepavyko.</translation>
@@ -2128,10 +1051,6 @@ Adresas: %4</translation>
         <source>Bitcoin Core</source>
         <translation>Bitcoin branduolys</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testavimotinklas]</translation>
@@ -2150,10 +1069,6 @@ Adresas: %4</translation>
         <source>Open until %1</source>
         <translation>Atidaryta iki %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/neprisijungęs</translation>
@@ -2170,10 +1085,6 @@ Adresas: %4</translation>
         <source>Status</source>
         <translation>Būsena</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -2206,10 +1117,6 @@ Adresas: %4</translation>
         <source>Credit</source>
         <translation>Kreditas</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>nepriimta</translation>
@@ -2238,14 +1145,6 @@ Adresas: %4</translation>
         <source>Transaction ID</source>
         <translation>Sandorio ID</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Derinimo informacija</translation>
@@ -2254,10 +1153,6 @@ Adresas: %4</translation>
         <source>Transaction</source>
         <translation>Sandoris</translation>
     </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Suma</translation>
@@ -2274,10 +1169,6 @@ Adresas: %4</translation>
         <source>, has not been successfully broadcast yet</source>
         <translation>, transliavimas dar nebuvo sėkmingas</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>nežinomas</translation>
@@ -2308,18 +1199,6 @@ Adresas: %4</translation>
         <source>Address</source>
         <translation>Adresas</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Suma</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Atidaryta iki %1</translation>
@@ -2336,22 +1215,6 @@ Adresas: %4</translation>
         <source>Generated but not accepted</source>
         <translation>Išgauta bet nepriimta</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Gauta su</translation>
@@ -2467,10 +1330,6 @@ Adresas: %4</translation>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Edit label</source>
         <translation>Taisyti žymę</translation>
@@ -2479,26 +1338,6 @@ Adresas: %4</translation>
         <source>Show transaction details</source>
         <translation>Rodyti sandėrio detales</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Kableliais atskirtų duomenų failas (*.csv)</translation>
@@ -2523,10 +1362,6 @@ Adresas: %4</translation>
         <source>Address</source>
         <translation>Adresas</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Suma</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2540,13 +1375,12 @@ Adresas: %4</translation>
         <translation>skirta</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2560,29 +1394,17 @@ Adresas: %4</translation>
         <source>&amp;Export</source>
         <translation>&amp;Eksportuoti</translation>
     </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Wallet</source>
-        <translation type="unfinished"/>
+        <translation>Backup piniginę</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
+        <translation>Piniginės duomenys (*.dat)</translation>
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Nepavyko padaryti atsarginės kopijos</translation>
     </message>
     <message>
         <source>Backup Successful</source>
@@ -2591,18 +1413,6 @@ Adresas: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Naudojimas:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Komandų sąrašas</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Suteikti pagalba komandai</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Parinktys:</translation>
@@ -2627,10 +1437,6 @@ Adresas: %4</translation>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
         <translation>Palaikyti ne daugiau &lt;n&gt; jungčių kolegoms (pagal nutylėjimą: 125)</translation>
     </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify your own public address</source>
         <translation>Nurodykite savo nuosavą viešą adresą</translation>
@@ -2643,10 +1449,6 @@ Adresas: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Sekundžių kiekis eikiamas palaikyti ryšį dėl lygiarangių nestabilumo (pagal nutylėjimą: 86.400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Klausymas JSON-RPC sujungimui prijungčiai &lt;port&gt; (pagal nutylėjimą: 8332 or testnet: 18332)</translation>
@@ -2655,10 +1457,6 @@ Adresas: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Priimti komandinę eilutę ir JSON-RPC komandas</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Dirbti fone kaip šešėlyje ir priimti komandas</translation>
@@ -2667,224 +1465,22 @@ Adresas: %4</translation>
         <source>Use the test network</source>
         <translation>Naudoti testavimo tinklą</translation>
     </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Įspėjimas: -paytxfee yra nustatytas per didelis. Tai sandorio mokestis, kurį turėsite mokėti, jei siųsite sandorį.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Įspėjimas: Patikrinkite, kad kompiuterio data ir laikas yra teisingi.Jei Jūsų laikrodis neteisingai nustatytas Bitcoin, veiks netinkamai.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Prisijungti tik prie nurodyto mazgo</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error opening block database</source>
         <translation>Klaida atveriant blokų duombazę</translation>
     </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: system error: </source>
         <translation>Klaida: sistemos klaida:</translation>
     </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Failed to read block info</source>
         <translation>Nepavyko nuskaityti bloko informacijos</translation>
@@ -2893,18 +1489,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to read block</source>
         <translation>Nepavyko nuskaityti bloko</translation>
     </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Failed to write block</source>
         <translation>Nepavyko įrašyti bloko</translation>
@@ -2913,106 +1497,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write file info</source>
         <translation>Nepavyko įrašyti failo informacijos</translation>
     </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation> Įtraukti mokestį už kB siunčiamiems sandoriams</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Generuoti monetas (numatyta: 0)</translation>
     </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Tikrinami blokai...</translation>
@@ -3021,70 +1509,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Tikrinama piniginė...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informacija</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
         <translation>Maksimalus buferis priėmimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 5000)</translation>
@@ -3093,102 +1521,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maksimalus buferis siuntimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 1000)</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL opcijos (žr.e Bitcoin Wiki for SSL setup instructions)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Siųsti atsekimo/derinimo info į konsolę vietoj debug.log failo</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Nustatyti sujungimo trukmę milisekundėmis (pagal nutylėjimą: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Sistemos klaida:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 0)</translation>
@@ -3203,44 +1547,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versija</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>Įspėjimas</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Slaptažodis JSON-RPC sujungimams</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Leisti JSON-RPC tik iš nurodytų IP adresų</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Siųsti komandą mazgui dirbančiam &lt;ip&gt; (pagal nutylėjimą: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Upgrade wallet to latest format</source>
         <translation>Atnaujinti piniginę į naujausią formatą</translation>
@@ -3269,10 +1581,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Pagelbos žinutė</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nepavyko susieti šiame kompiuteryje prievado %s (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Leisti DNS paiešką sujungimui ir mazgo pridėjimui</translation>
@@ -3285,41 +1593,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation> wallet.dat pakrovimo klaida,  wallet.dat sugadintas</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation> wallet.dat pakrovimo klaida,  wallet.dat reikalauja naujasnės Bitcoin versijos</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Piniginė turi būti prrašyta: įvykdymui perkraukite Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation> wallet.dat pakrovimo klaida</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Neteisingas proxy adresas: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Neteisingas proxy adresas: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neteisinga suma -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neteisinga suma -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3341,10 +1625,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading wallet...</source>
         <translation>Užkraunama piniginė...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Cannot write default address</source>
         <translation>Negalima parašyti įprasto adreso</translation>
@@ -3357,19 +1637,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>Įkėlimas baigtas</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Klaida</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index 299e4d55e02e..81b2688d031e 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="lv_LV" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Par Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; versija</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Šī ir eksperimentālā programmatūra.
-
-Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datni COPYING vai http://www.opensource.org/licenses/mit-license.php.
-
-Šis produkts ietver programmatūru, ko izstrādājis OpenSSL Project izmantošanai OpenSSL Toolkit (http://www.openssl.org/) un šifrēšanas programmatūru no Eric Young (eay@cryptsoft.com) un UPnP programmatūru no Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Autortiesības</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core izstrādātāji</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-biti)</translation>
-    </message>
-</context>
+<TS language="lv_LV" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -72,7 +35,7 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Datus no tekošā ieliktņa eksportēt uz failu</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -102,14 +65,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>Receiving addresses</source>
         <translation>Saņemšanas adreses</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopēt &amp;Nosaukumu</translation>
@@ -130,11 +85,7 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>Exporting Failed</source>
         <translation>Eksportēšana Neizdevās</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +119,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>Repeat new passphrase</source>
         <translation>Jaunā parole vēlreiz</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Ierakstiet maciņa jauno paroli.&lt;br/&gt;Lūdzu izmantojiet &lt;b&gt;10 vai vairāk nejauši izvēlētas zīmes&lt;/b&gt;, vai &lt;b&gt;astoņus un vairāk vārdus&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Šifrēt maciņu</translation>
@@ -212,10 +159,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Vai tu tiešām vēlies šifrēt savu maciņu?</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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Brīdinājums: Caps Lock ir ieslēgts!</translation>
@@ -295,10 +238,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>Quit application</source>
         <translation>Aizvērt programmu</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Parādīt informāciju par Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Par &amp;Qt</translation>
@@ -439,14 +378,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>&amp;About Bitcoin Core</source>
         <translation>Par &amp;Bitcoin Core</translation>
     </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
         <translation>Atvērt bitcoin URI vai maksājuma pieprasījumu</translation>
@@ -455,14 +386,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>&amp;Command-line options</source>
         <translation>&amp;Komandrindas iespējas</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klients</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktīvu savienojumu ar Bitcoin tīklu</numerusform><numerusform>%n aktīvs savienojums ar Bitcoin tīklu</numerusform><numerusform>%n aktīvu savienojumu as Bitcoin tīklu</numerusform></translation>
@@ -471,10 +394,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>No block source available...</source>
         <translation>Nav pieejams neviens bloku avots...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Apstrādāti %1 bloki no transakciju vēstures.</translation>
@@ -503,10 +422,6 @@ Izplatīta saskaņā ar MIT/X11 programmatūras licenci, skatīt pievienoto datn
         <source>%1 behind</source>
         <translation>%1 aizmugurē</translation>
     </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transakcijas pēc šī vel nebūs redzamas</translation>
@@ -559,10 +474,6 @@ Adrese: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Maciņš ir &lt;b&gt;šifrēts&lt;/b&gt; un pašlaik &lt;b&gt;slēgts&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Radās fatāla kļūda. Bitcoin Core nevar vairs droši turpināt un tiks izslēgta.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,10 +508,6 @@ Adrese: %4
         <source>Fee:</source>
         <translation>Maksa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Zema Izeja:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Pēc Maksas:</translation>
@@ -689,10 +596,6 @@ Adrese: %4
         <source>Copy priority</source>
         <translation>Kopēt prioritāti</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopēt zemo izeju</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopēt atlikumu</translation>
@@ -741,10 +644,6 @@ Adrese: %4
         <source>none</source>
         <translation>neviens</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Putekļi</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>jā</translation>
@@ -753,42 +652,6 @@ Adrese: %4
         <source>no</source>
         <translation>nē</translation>
     </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(bez nosaukuma)</translation>
@@ -812,14 +675,6 @@ Adrese: %4
         <source>&amp;Label</source>
         <translation>&amp;Nosaukums</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Adrese</translation>
@@ -841,12 +696,12 @@ Adrese: %4
         <translation>Mainīt nosūtīšanas adresi</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Nupat ierakstītā adrese &quot;%1&quot; jau atrodas adrešu grāmatā.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Nupat ierakstītā adrese "%1" jau atrodas adrešu grāmatā.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Ierakstītā adrese &quot;%1&quot; nav derīga Bitcoin adrese.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Ierakstītā adrese "%1" nav derīga Bitcoin adrese.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -867,10 +722,6 @@ Adrese: %4
         <source>name</source>
         <translation>vārds</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
         <translation>Šāds ceļš jau pastāv un tā nav mape.</translation>
@@ -882,10 +733,6 @@ Adrese: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Komandrindas iespējas</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +741,14 @@ Adrese: %4
         <source>version</source>
         <translation>versija</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-biti)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Par Bitcoin Core</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Lietojums:</translation>
@@ -907,26 +762,18 @@ Adrese: %4
         <translation>Lietotāja interfeisa izvēlnes</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Uzstādiet valodu, piemēram &quot;de_DE&quot; (pēc noklusēšanas: sistēmas lokāle)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Uzstādiet valodu, piemēram "de_DE" (pēc noklusēšanas: sistēmas lokāle)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Sākt minimizētu</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Uzsākot, parādīt programmas informācijas logu (pēc noklusēšanas: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -937,14 +784,6 @@ Adrese: %4
         <source>Welcome to Bitcoin Core.</source>
         <translation>Sveicināts Bitcoin Core</translation>
     </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Izmantot noklusēto datu mapi</translation>
@@ -954,12 +793,8 @@ Adrese: %4
         <translation>Izmantot pielāgotu datu mapi:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1007,10 +842,6 @@ Adrese: %4
         <source>&amp;Main</source>
         <translation>&amp;Galvenais</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>&amp;Maksāt par transakciju</translation>
@@ -1047,10 +878,6 @@ Adrese: %4
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Starpniekservera IP adrese (piem. IPv4: 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 type="unfinished"/>
-    </message>
     <message>
         <source>Third party transaction URLs</source>
         <translation>Trešo personu transakciju URLs</translation>
@@ -1071,10 +898,6 @@ Adrese: %4
         <source>&amp;Network</source>
         <translation>&amp;Tīkls</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>&amp;Maciņš</translation>
@@ -1087,10 +910,6 @@ Adrese: %4
         <source>Enable coin &amp;control features</source>
         <translation>Ieslēgt bitcoin &amp;kontroles funkcijas</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 type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Tērēt neapstiprinātu atlikumu</translation>
@@ -1115,14 +934,6 @@ Adrese: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Starpniekservera ports (piem. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Versija:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Starpniekservera SOCKS versija (piem. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Logs</translation>
@@ -1163,14 +974,6 @@ Adrese: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Izvēlēties dalījuma vienību pēc noklusēšanas, ko izmantot interfeisā un nosūtot bitkoinus.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Rādīt vai nē Bitcoin adreses transakciju sarakstā.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Attēlot adreses transakciju sarakstā</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Vai rādīt Bitcoin kontroles funkcijas vai nē.</translation>
@@ -1195,18 +998,10 @@ Adrese: %4
         <source>Confirm options reset</source>
         <translation>Apstiprināt iestatījumu atiestatīšanu</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Klients tiks izslēgts, vai vēlaties turpināt?</translation>
     </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Norādītā starpniekservera adrese nav derīga.</translation>
@@ -1246,10 +1041,6 @@ Adrese: %4
         <source>Immature:</source>
         <translation>Nenobriedušu:</translation>
     </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Kopsumma:</translation>
@@ -1274,12 +1065,8 @@ Adrese: %4
         <translation>URI apstrāde</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>Nederīga maksājuma adrese %1</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1289,46 +1076,10 @@ Adrese: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Nevar palaist Bitcoin: nospied-lai-maksātu apstrādātāju</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Refund from %1</source>
         <translation>Atmaksa no %1</translation>
     </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Maksājums atzīts</translation>
@@ -1338,33 +1089,28 @@ Adrese: %4
         <translation>Tīkla pieprasījuma kļūda</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Daudzums</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 st</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core vel neizgāja droši...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ierakstiet Bitcoin adresi (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1184,6 @@ Adrese: %4
         <source>Current number of blocks</source>
         <translation>Pašreizējais bloku skaits</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Bloku skaita novērtējums</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Pēdējā bloka laiks</translation>
@@ -1482,10 +1224,6 @@ Adrese: %4
         <source>Debug log file</source>
         <translation>Atkļūdošanas žurnāla datne</translation>
     </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear console</source>
         <translation>Notīrīt konsoli</translation>
@@ -1518,19 +1256,7 @@ Adrese: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 st</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 st %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1545,30 +1271,10 @@ Adrese: %4
         <source>&amp;Message:</source>
         <translation>&amp;Ziņojums:</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Atkārtoti izmantot esošo saņemšanas adresi (nav ieteicams)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Notīrīt visus laukus formā.</translation>
@@ -1742,10 +1448,6 @@ Adrese: %4
         <source>Fee:</source>
         <translation>Maksa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Zema Izeja:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Pēc Maksas:</translation>
@@ -1754,10 +1456,6 @@ Adrese: %4
         <source>Change:</source>
         <translation>Atlikums:</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 type="unfinished"/>
-    </message>
     <message>
         <source>Custom change address</source>
         <translation>Pielāgota atlikuma adrese</translation>
@@ -1822,10 +1520,6 @@ Adrese: %4
         <source>Copy priority</source>
         <translation>Kopēt prioritāti</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopēt zemās izejas</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopēt atlikumu</translation>
@@ -1862,10 +1556,6 @@ Adrese: %4
         <source>Transaction creation failed!</source>
         <translation>Transakcijas izveidošana neizdevās!</translation>
     </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Brīdinājums: Nederīga Bitcoin adrese</translation>
@@ -1878,22 +1568,10 @@ Adrese: %4
         <source>Warning: Unknown change address</source>
         <translation>Brīdinājums: Nezināma atlikuma adrese</translation>
     </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>added as transaction fee</source>
         <translation>pievienots kā transakcijas maksa</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Maksājuma pieprasījums ir novecojis</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Nederīga maksājuma adrese %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1583,6 @@ Adrese: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Saņēmējs:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adrese lai sūtītu maksājumu uz (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Lai pievienotu adresi adrešu grāmatai, tai jādod nosaukums</translation>
@@ -1949,14 +1623,6 @@ Adrese: %4
         <source>This is a verified payment request.</source>
         <translation>Šis ir pārbaudīts maksājuma pieprasījums.</translation>
     </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>Šis ir nepārbaudīts maksājuma pieprasījums.</translation>
@@ -1991,14 +1657,6 @@ Adrese: %4
         <source>&amp;Sign Message</source>
         <translation>Parakstīt &amp;Ziņojumu</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adrese ar kuru parakstīt ziņojumu (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Izvēlies iepriekš izmantoto adresi</translation>
@@ -2047,18 +1705,6 @@ Adrese: %4
         <source>&amp;Verify Message</source>
         <translation>&amp;Pārbaudīt Ziņojumu</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adrese ar kādu ziņojums tika parakstīts (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verify &amp;Message</source>
         <translation>&amp;Pārbaudīt Ziņojumu</translation>
@@ -2068,12 +1714,8 @@ Adrese: %4
         <translation>Atiestatīt visus laukus</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ierakstiet Bitcoin adresi (piem. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Nospied &quot;Parakstīt Ziņojumu&quot; lai ģenerētu parakstu</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Nospied "Parakstīt Ziņojumu" lai ģenerētu parakstu</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2172,10 +1814,6 @@ Adrese: %4
         <source>Status</source>
         <translation>Status</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datums</translation>
@@ -2208,10 +1846,6 @@ Adrese: %4
         <source>Credit</source>
         <translation>Kredīts</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>nav pieņemts</translation>
@@ -2244,10 +1878,6 @@ Adrese: %4
         <source>Merchant</source>
         <translation>Tirgotājs</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Atkļūdošanas informācija</translation>
@@ -2310,14 +1940,6 @@ Adrese: %4
         <source>Address</source>
         <translation>Adrese</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Daudzums</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>Atvērts vel %n blokus</numerusform><numerusform>Atvērts vel %n bloku</numerusform><numerusform>Atvērts vel %n blokus</numerusform></translation>
@@ -2346,10 +1968,6 @@ Adrese: %4
         <source>Unconfirmed</source>
         <translation>Neapstiprināts</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Conflicted</source>
         <translation>Pretrunā</translation>
@@ -2489,10 +2107,6 @@ Adrese: %4
         <source>Exporting Failed</source>
         <translation>Eksportēšana Neizdevās</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Successful</source>
         <translation>Eksportēšana Veiksmīga</translation>
@@ -2525,10 +2139,6 @@ Adrese: %4
         <source>Address</source>
         <translation>Adrese</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Daudzums</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2152,9 @@ Adrese: %4
         <translation>uz</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2564,7 +2177,7 @@ Adrese: %4
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Datus no tekošā ieliktņa eksportēt uz failu</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
@@ -2593,18 +2206,6 @@ Adrese: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Lietojums:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Komandu saraksts</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Palīdzība par komandu</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Iespējas:</translation>
@@ -2645,22 +2246,10 @@ Adrese: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Sekundes, cik ilgi atturēt pārkāpējmezglus no atkārtotas pievienošanās (pēc noklusēšanas: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Pieņemt komandrindas un JSON-RPC komandas</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC klienta versija</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Darbināt fonā kā servisu un pieņemt komandas</translation>
@@ -2669,124 +2258,6 @@ Adrese: %4
         <source>Use the test network</source>
         <translation>Izmantot testa tīklu</translation>
     </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Brīdinājums: Lūdzu pārbaudi vai tava datora datums un laiks ir pareizs! Ja pulkstenis ir nepareizs, Bitcoin Core nestrādās pareizi.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(noklusējums: 1)</translation>
@@ -2803,74 +2274,26 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Mēģināt atgūt privātās atslēgas no bojāta wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Process</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
+        <translation>Bloka izveidošanas iestatījumi:</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Savienoties tikai ar norādītajām nodēm.</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Savienoties caur SOCKS starpniekserveri</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Savienojuma iestatījumi:</translation>
     </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debugging/Testing options:</source>
         <translation>Atkļūdošanas/Testēšanas iestatījumi:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading block database</source>
         <translation>Kļūda ielādējot bloku datubāzi</translation>
     </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Kļūda: Zema diska vieta!</translation>
@@ -2883,74 +2306,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error: system error: </source>
         <translation>Kļūda: sistēmas kļūda:</translation>
     </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Pievienot maksu par kB tām transakcijām kuras tu sūti</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Atrast pīrus izmantojot DNS uzmeklēšanu (noklusējums: 1 ja nav -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Piespiest drošo režīmu (noklusējums: 0)</translation>
     </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Ja &lt;category&gt; nav norādīta, izvadīt visu atkļūdošanas informāciju.</translation>
@@ -2959,62 +2318,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Importing...</source>
         <translation>Importē...</translation>
     </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC klienta iespējas:</translation>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
         <translation>Tērēt neapstiprinātu atlikumu kad sūta transakcijas (noklusējums: 1)</translation>
     </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Pārbauda blokus...</translation>
@@ -3023,158 +2330,30 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Pārbauda maciņu...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Uzgaidi līdz RPC serveris palaižas</translation>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet options:</source>
         <translation>Maciņa iespējas:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importēt blokus no ārējās blk000??.dat datnes</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informācija</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>RPC server options:</source>
         <translation>RPC servera iestatījumi:</translation>
     </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Sūtīt komandu uz Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Debug/trace informāciju izvadīt konsolē, nevis debug.log failā</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Rādīt etalonuzdevuma informāciju (noklusējums: 0)</translation>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Signing transaction failed</source>
         <translation>Transakcijas parakstīšana neizdevās</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Sākt Bitcoin Core Procesu</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Sistēmas kļūda:</translation>
@@ -3191,14 +2370,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Transakcija ir pārāk liela</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC savienojumu lietotājvārds</translation>
@@ -3211,18 +2382,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Brīdinājums: Šī versija ir novecojusi, nepieciešams atjauninājums!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>on startup</source>
         <translation>startēšanas laikā</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versija</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat ir bojāts, glābšana neizdevās</translation>
@@ -3231,14 +2394,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC savienojumu parole</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Atļaut JSON-RPC savienojumus no norādītās IP adreses</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Nosūtīt komandas mezglam, kas darbojas adresē &lt;ip&gt; (pēc noklusēšanas: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Izpildīt komandu, kad labāk atbilstošais bloks izmainās (%s cmd aizvieto ar bloka hešu)</translation>
@@ -3271,10 +2426,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Šis palīdzības paziņojums</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nevar pievienoties pie %s šajā datorā (pievienošanās atgrieza kļūdu %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Atļaut DNS uzmeklēšanu priekš -addnode, -seednode un -connect</translation>
@@ -3287,41 +2438,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Nevar ielādēt wallet.dat: maciņš bojāts</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Nevar ielādēt wallet.dat: maciņa atvēršanai nepieciešama jaunāka Bitcoin versija</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Bija nepieciešams pārstartēt maciņu: pabeigšanai pārstartējiet Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Kļūda ielādējot wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Nederīga -proxy adrese: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Nederīga -proxy adrese: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>-onlynet komandā norādīts nepazīstams tīkls: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>-onlynet komandā norādīts nepazīstams tīkls: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Pieprasīta nezināma -socks starpniekservera versija: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nevar uzmeklēt -bind adresi: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nevar uzmeklēt -bind adresi: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nevar atrisināt -externalip adresi: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nevar atrisināt -externalip adresi: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nederīgs daudzums priekš -paytxfree=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nederīgs daudzums priekš -paytxfree=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3367,13 +2506,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Kļūda</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Konfigurācijas failā jāuzstāda rpcpassword=&lt;password&gt;:
-%s
-Ja fails neeksistē, izveidojiet to ar atļauju lasīšanai tikai īpašniekam.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index e765931b2cd0..4a296dfce7bf 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="mn" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="mn" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,70 +9,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Шинэ хаяг нээх</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Одоогоор сонгогдсон байгаа хаягуудыг сануулах</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>Хаягийг &amp;Хуулбарлах</translation>
     </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Устгах</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>&amp;Шошгыг хуулбарлах</translation>
@@ -113,23 +29,11 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Edit</source>
         <translation>&amp;Ѳѳрчлѳх</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Таслалаар тусгаарлагдсан хүснэгтэн файл (.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Нууц үгийг оруул</translation>
@@ -163,10 +63,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Шинэ нууц үгийг давтана уу</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Түрүйвчийн шинэ нууц үгийг оруул. &lt;br/&gt;&lt;b&gt;Дор хаяж 10 дурын үсэг/тоо бүхий&lt;/b&gt; эсвэл &lt;b&gt;дор хаяж 8 дурын үгнээс бүрдсэн&lt;/b&gt; нууц үгийг ашиглана уу. </translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Түрүйвчийг цоожлох</translation>
@@ -199,22 +95,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Түрүйвчийн цоожийг баталгаажуулах</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Түрүйвч цоожлогдлоо</translation>
@@ -262,18 +142,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Synchronizing with network...</source>
         <translation>Сүлжээтэй тааруулж байна...</translation>
     </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Node</source>
         <translation>Нод</translation>
     </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Transactions</source>
         <translation>Гүйлгээнүүд</translation>
@@ -290,10 +162,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Програмаас Гарах</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Биткойны мэдээллийг харуулах</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>&amp;Клиентийн тухай</translation>
@@ -318,54 +186,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Нууц Үгийг Солих...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Түрүйвчийг цоожлох нууц үгийг солих</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Open debugging and diagnostic console</source>
         <translation>Оношилгоо ба засварын консолыг онгойлго</translation>
     </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>Биткойн</translation>
@@ -374,34 +202,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet</source>
         <translation>Түрүйвч</translation>
     </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Харуул / Нуу</translation>
     </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
@@ -414,66 +218,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Help</source>
         <translation>&amp;Тусламж</translation>
     </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Биткойн клиент</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>Биткойны сүлжээрүү %n идэвхитэй холболт байна </numerusform><numerusform>Биткойны сүлжээрүү %n идэвхитэй холболтууд байна </numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n цаг</numerusform><numerusform>%n цаг</numerusform></translation>
@@ -482,50 +230,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n day(s)</source>
         <translation><numerusform>%n ѳдѳр</numerusform><numerusform>%n ѳдрүүд</numerusform></translation>
     </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error</source>
         <translation>Алдаа</translation>
     </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Шинэчлэгдсэн</translation>
     </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sent transaction</source>
         <translation>Гадагшаа гүйлгээ</translation>
@@ -557,68 +269,20 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Түрүйвч &lt;b&gt;цоожтой&lt;/b&gt; ба одоогоор цоож &lt;b&gt;хаалттай&lt;/b&gt; байна</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Хэмжээ:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Fee:</source>
         <translation>Тѳлбѳр:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Хэмжээ</translation>
@@ -631,18 +295,10 @@ Address: %4
         <source>Date</source>
         <translation>Огноо</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Баталгаажлаа</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Хаягийг санах</translation>
@@ -655,146 +311,14 @@ Address: %4
         <source>Copy amount</source>
         <translation>Хэмжээг санах</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Ѳѳрчлѳлтийг санах</translation>
     </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(шошгогүй)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(change)</source>
         <translation>(ѳѳрчлѳх)</translation>
@@ -810,14 +334,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Шошго</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Хаяг</translation>
@@ -839,12 +355,8 @@ Address: %4
         <translation>Явуулах хаягийг ѳѳрчлѳх</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Таны оруулсан хаяг &quot;%1&quot; нь хаягийн бүртгэлд ѳмнѳ нь орсон байна</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Таны оруулсан хаяг "%1" нь хаягийн бүртгэлд ѳмнѳ нь орсон байна</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -857,342 +369,46 @@ Address: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <source>version</source>
+        <translation>хувилбар</translation>
     </message>
     <message>
-        <source>name</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Хэрэглээ:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Алдаа</translation>
     </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>хувилбар</translation>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>Хэрэглээ:</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Биткойн</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>Алдаа</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
         <translation>Сонголтууд</translation>
     </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>МБ</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Биткойны сүлжээрүү SOCKS проксигоор холбогдох.</translation>
     </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>проксигийн IP хаяг (жишээ нь: IPv4: 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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Client restart required to activate changes.</source>
         <translation>Ѳѳрчлѳлтүүдийг идэвхижүүлхийн тулд клиентийг ахин эхлүүлэх шаардлагтай</translation>
@@ -1205,21 +421,9 @@ Address: %4
         <source>This change would require a client restart.</source>
         <translation>Энэ ѳѳрчлѳлтийг оруулахын тулд кли1нт програмыг ахин эхлүүлэх шаардлагтай</translation>
     </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>Түрүйвч</translation>
@@ -1228,155 +432,30 @@ Address: %4
         <source>Available:</source>
         <translation>Хэрэглэж болох хэмжээ:</translation>
     </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Сүүлд хийгдсэн гүйлгээнүүд&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Биткойн</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>Алга Байна</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>PNG Image (*.png)</source>
         <translation>PNG форматын зураг (*.png)</translation>
@@ -1400,22 +479,10 @@ Address: %4
         <source>&amp;Information</source>
         <translation>&amp;Мэдээллэл</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>General</source>
         <translation>Ерѳнхий</translation>
     </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Network</source>
         <translation>Сүлжээ</translation>
@@ -1436,10 +503,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>Одоогийн блокийн тоо</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Нийт блокийн барагцаа</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Сүүлийн блокийн хугацаа</translation>
@@ -1453,140 +516,16 @@ Address: %4
         <translation>&amp;Консол</translation>
     </message>
     <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
+        <source>Clear console</source>
+        <translation>Консолыг цэвэрлэх</translation>
     </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation>Консолыг цэвэрлэх</translation>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Шошго:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>Харуул</translation>
@@ -1614,34 +553,6 @@ Address: %4
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Хаяг</translation>
@@ -1658,15 +569,7 @@ Address: %4
         <source>Message</source>
         <translation>Зурвас</translation>
     </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
@@ -1693,1589 +596,450 @@ Address: %4
         <source>(no message)</source>
         <translation>(зурвас алга)</translation>
     </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Зоос явуулах</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>automatically selected</source>
         <translation>автоматаар сонгогдсон</translation>
     </message>
     <message>
-        <source>Insufficient funds!</source>
-        <translation>Таны дансны үлдэгдэл хүрэлцэхгүй байна!</translation>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Хэмжээ:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation>Тѳлбѳр:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Нэгэн зэрэг олон хүлээн авагчруу явуулах</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation>&amp;Хүлээн авагчийг Нэмэх</translation>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Баланс:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Явуулах үйлдлийг баталгаажуулна уу</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>Яв&amp;уул</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>Зоос явуулахыг баталгаажуулна уу</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Хэмжээг санах</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation>Ѳѳрчлѳлтийг санах</translation>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Нийт дүн %1 (= %2)</translation>
-    </message>
-    <message>
-        <source>or</source>
-        <translation>эсвэл</translation>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Тѳлѳх хэмжээ 0.-оос их байх ёстой</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation>Энэ хэмжээ таны балансаас хэтэрсэн байна.</translation>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Гүйлгээний тѳлбѳр %1-ийг тооцхоор нийт дүн нь таны балансаас хэтрээд байна.</translation>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation>Анхаар:Буруу Биткойны хаяг байна</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(шошгогүй)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>Дүн:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Тѳлѳх &amp;хаяг:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Энэ хаягийг ѳѳрийн бүртгэлдээ авахын тулд шошго оруул</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Шошго:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Копидсон хаягийг буулгах</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Зурвас:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation>Биткойны цѳм хаагдаж байна...</translation>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation>Энэ цонхыг хаагдтал компьютерээ бүү унтраагаарай</translation>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Копидсон хаягийг буулгах</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>%1 хүртэл нээлттэй</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation>зѳрчилдлѳѳ</translation>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/баталгаажаагүй</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 баталгаажилтууд</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Огноо</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation>Зурвас</translation>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Хэмжээ</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, хараахан амжилттай цацагдаагүй байна</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>үл мэдэгдэх</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Гүйлгээний мэдээллэл</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Гүйлгээний дэлгэрэнгүйг энэ бичил цонх харуулж байна</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Огноо</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Тѳрѳл</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Хаяг</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Хэмжээ</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>%1 хүртэл нээлттэй</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Баталгаажлаа (%1 баталгаажилт)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Энэ блокийг аль ч нод хүлээн авсангүй ба ер нь зѳвшѳѳрѳгдѳхгүй байж мэднэ!</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Үүсгэгдсэн гэхдээ хүлээн авагдаагүй</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation>Баталгаажаагүй</translation>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation>Зѳрчилдлѳѳ</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Хүлээн авсан хаяг</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Хүлээн авагдсан хаяг</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Явуулсан хаяг</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Ѳѳрлүүгээ хийсэн тѳлбѳр</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Олборлогдсон</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(алга байна)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Гүйлгээний байдал. Энд хулганыг авчирч баталгаажуулалтын тоог харна уу.</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Гүйлгээг хүлээн авсан огноо ба цаг.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Гүйлгээний тѳрѳл</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Гүйлгээг хүлээн авах хаяг</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Балансаас авагдсан болон нэмэгдсэн хэмжээ.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Бүгд</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Ѳнѳѳдѳр</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Энэ долоо хоног</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Энэ сар</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Ѳнгѳрсѳн сар</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Энэ жил</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Хүлээн авсан хаяг</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Явуулсан хаяг</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Ѳѳрлүүгээ</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Олборлогдсон</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Бусад</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Хайлт хийхийн тулд хаяг эсвэл шошгыг оруул</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Хамгийн бага хэмжээ</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Хаягийг санах</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Шошгыг санах</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Хэмжээг санах</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Шошгыг ѳѳрчлѳх</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation>Гүйлгээний дэлгэрэнгүйг харуул</translation>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </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>
-    <message>
-        <source>Confirmed</source>
-        <translation>Баталгаажлаа</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Огноо</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Тѳрѳл</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Шошго</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Хаяг</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Хэмжээ</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation>Тодорхойлолт</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>-рүү/руу</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation>Ямар ч түрүйвч ачааллагдсангүй.</translation>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Зоос явуулах</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Хэрэглээ:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Үйлдлүүдийг жагсаах</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Үйлдэлд туслалцаа авах</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Сонголтууд:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>&lt;port&gt; дээрх холболтуудыг чагна (ѳгѳгдмѳл: 8333 эсвэл testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>SOCKS проксигоор холбогдох</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
+        <source>Insufficient funds!</source>
+        <translation>Таны дансны үлдэгдэл хүрэлцэхгүй байна!</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Хэмжээ:</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>Fee:</source>
+        <translation>Тѳлбѳр:</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Нэгэн зэрэг олон хүлээн авагчруу явуулах</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <source>Add &amp;Recipient</source>
+        <translation>&amp;Хүлээн авагчийг Нэмэх</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Баланс:</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Явуулах үйлдлийг баталгаажуулна уу</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>S&amp;end</source>
+        <translation>Яв&amp;уул</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Зоос явуулахыг баталгаажуулна уу</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Copy change</source>
+        <translation>Ѳѳрчлѳлтийг санах</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>Нийт дүн %1 (= %2)</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>or</source>
+        <translation>эсвэл</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Тѳлѳх хэмжээ 0.-оос их байх ёстой</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>The amount exceeds your balance.</source>
+        <translation>Энэ хэмжээ таны балансаас хэтэрсэн байна.</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+        <translation>Гүйлгээний тѳлбѳр %1-ийг тооцхоор нийт дүн нь таны балансаас хэтрээд байна.</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Анхаар:Буруу Биткойны хаяг байна</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(шошгогүй)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>Дүн:</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Тѳлѳх &amp;хаяг:</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Энэ хаягийг ѳѳрийн бүртгэлдээ авахын тулд шошго оруул</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Шошго:</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Копидсон хаягийг буулгах</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Зурвас:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Биткойны цѳм хаагдаж байна...</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>Энэ цонхыг хаагдтал компьютерээ бүү унтраагаарай</translation>
     </message>
+</context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Копидсон хаягийг буулгах</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Clear &amp;All</source>
+        <translation>&amp;Бүгдийг Цэвэрлэ</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>%1 хүртэл нээлттэй</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation>RPC серверийг эхэлтэл хүлээ</translation>
+        <source>conflicted</source>
+        <translation>зѳрчилдлѳѳ</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/баталгаажаагүй</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation>Түрүйвчийн сонголтууд:</translation>
+        <source>%1 confirmations</source>
+        <translation>%1 баталгаажилтууд</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Огноо</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Message</source>
+        <translation>Зурвас</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>Тодорхойлолт</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Хэмжээ</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, хараахан амжилттай цацагдаагүй байна</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>үл мэдэгдэх</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Гүйлгээний мэдээллэл</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Гүйлгээний дэлгэрэнгүйг энэ бичил цонх харуулж байна</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Огноо</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тѳрѳл</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Хаяг</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>%1 хүртэл нээлттэй</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Баталгаажлаа (%1 баталгаажилт)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Энэ блокийг аль ч нод хүлээн авсангүй ба ер нь зѳвшѳѳрѳгдѳхгүй байж мэднэ!</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Үүсгэгдсэн гэхдээ хүлээн авагдаагүй</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Unconfirmed</source>
+        <translation>Баталгаажаагүй</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Conflicted</source>
+        <translation>Зѳрчилдлѳѳ</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Хүлээн авсан хаяг</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>Хүлээн авагдсан хаяг</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Явуулсан хаяг</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Ѳѳрлүүгээ хийсэн тѳлбѳр</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Олборлогдсон</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(алга байна)</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Гүйлгээний байдал. Энд хулганыг авчирч баталгаажуулалтын тоог харна уу.</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Гүйлгээг хүлээн авсан огноо ба цаг.</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Гүйлгээний тѳрѳл</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Гүйлгээг хүлээн авах хаяг</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Балансаас авагдсан болон нэмэгдсэн хэмжээ.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Бүгд</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Ѳнѳѳдѳр</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Энэ долоо хоног</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Энэ сар</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Ѳнгѳрсѳн сар</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Энэ жил</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Хүлээн авсан хаяг</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Явуулсан хаяг</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Ѳѳрлүүгээ</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Олборлогдсон</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Бусад</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Хайлт хийхийн тулд хаяг эсвэл шошгыг оруул</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Хамгийн бага хэмжээ</translation>
     </message>
     <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Хаягийг санах</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Шошгыг санах</translation>
     </message>
     <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Хэмжээг санах</translation>
     </message>
     <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Шошгыг ѳѳрчлѳх</translation>
     </message>
     <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
+        <source>Show transaction details</source>
+        <translation>Гүйлгээний дэлгэрэнгүйг харуул</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation>хувилбар</translation>
+        <source>The transaction history was successfully saved to %1.</source>
+        <translation>Гүйлгээнүй түүхийг %1-д амжилттай хадгаллаа.</translation>
     </message>
     <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Таслалаар тусгаарлагдсан хүснэгтэн файл (.csv)</translation>
     </message>
     <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Баталгаажлаа</translation>
     </message>
     <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Огноо</translation>
     </message>
     <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тѳрѳл</translation>
     </message>
     <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Шошго</translation>
     </message>
     <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Түрүйвчийг хамгийн сүүлийн үеийн форматруу шинэчлэх</translation>
+        <source>Address</source>
+        <translation>Хаяг</translation>
     </message>
     <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>Тодорхойлолт</translation>
     </message>
     <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>-рүү/руу</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
     <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <source>No wallet has been loaded.</source>
+        <translation>Ямар ч түрүйвч ачааллагдсангүй.</translation>
     </message>
+</context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Зоос явуулах</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Сонголтууд:</translation>
     </message>
     <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>&lt;port&gt; дээрх холболтуудыг чагна (ѳгѳгдмѳл: 8333 эсвэл testnet: 18333)</translation>
     </message>
     <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
+        <source>Wallet options:</source>
+        <translation>Түрүйвчийн сонголтууд:</translation>
     </message>
     <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Түрүйвчийг хамгийн сүүлийн үеийн форматруу шинэчлэх</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
@@ -3285,41 +1049,13 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat-ыг ачааллахад алдаа гарлаа: Түрүйвч эвдэрсэн байна</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>wallet.dat-ыг ачааллахад алдаа гарлаа: Түрүйвч Биткойны шинэ хувилбарыг шаардаж байна</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat-ыг ачааллахад алдаа гарлаа</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Эдгээр прокси хаягнууд буруу байна: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Эдгээр прокси хаягнууд буруу байна: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3341,14 +1077,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Loading wallet...</source>
         <translation>Түрүйвчийг ачааллаж байна...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Ахин уншиж байна...</translation>
@@ -3365,11 +1093,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Алдаа</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index 0f92a6d49fee..428819e92f14 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ms_MY" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ms_MY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,3328 +9,162 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Cipta alamat baru</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Salin alamat terpilih ke dalam sistem papan klip</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Padam</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Fail yang dipisahkan dengan koma</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Alamat</translation>
     </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>Pilihan</translation>
     </message>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Alamat</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Alamat</translation>
     </message>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>Alamat</translation>
     </message>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Alamat</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Baki</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Alamat</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Fail yang dipisahkan dengan koma</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Alamat</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletFrame</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletModel</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Baki</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Fail yang dipisahkan dengan koma</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 9e38c69c6096..bb6b78849c65 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Om Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt; versjon</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Dette er eksperimentell programvare.
-
-Distribuert under MIT/X11 programvarelisensen, se medfølgende fil COPYING eller http://www.opensource.org/licenses/mit-license.php.
-
-Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i OpenSSL Toolkit (http://www.openssl.org/), kryptografisk programvare skrevet av Eric Young (eay@cryptsoft.com) og UPnP programvare skrevet av Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core utviklerne</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation> (%1-bit)</translation>
-    </message>
-</context>
+<TS language="nb" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <translation>Ekport Feilet</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>En feil oppstod ved lagring av adresselisten til %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Det oppstod en feil under lagring av adresselisten til %1. Vennligst prøv på nytt.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>Repeat new passphrase</source>
         <translation>Gjenta ny adgangsfrase</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Skriv inn den nye adgangsfrasen for lommeboken.&lt;br/&gt;Vennligst bruk en adgangsfrase med &lt;b&gt;10 eller flere tilfeldige tegn&lt;/b&gt;, eller &lt;b&gt;åtte eller flere ord&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Krypter lommebok</translation>
@@ -224,6 +183,10 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>Wallet encrypted</source>
         <translation>Lommebok kryptert</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Oppgi adgangsfrasen til lommeboken.&lt;br/&gt;Vennligst bruk en adgangsfrase med &lt;b&gt;ti eller flere tilfeldige tegn&lt;/b&gt;, eller &lt;b&gt;åtte eller flere ord&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin vil nå lukkes for å fullføre krypteringsprosessen. Husk at kryptering av lommeboken ikke fullt ut kan beskytte dine bitcoins fra å bli stjålet om skadevare infiserer datamaskinen.</translation>
@@ -295,10 +258,6 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>Quit application</source>
         <translation>Avslutt applikasjonen</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Vis informasjon om Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Om &amp;Qt</translation>
@@ -335,6 +294,10 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>Open &amp;URI...</source>
         <translation>Åpne &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core-klient</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importere blokker...</translation>
@@ -387,6 +350,10 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>&amp;Receive</source>
         <translation>&amp;Motta</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Vis informasjon om Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Vis / Skjul</translation>
@@ -459,10 +426,6 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Vis Bitcoin Core hjelpemeldingen for å få en liste med mulige kommandolinjevalg</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-klienten</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiv forbindelse til Bitcoin-nettverket</numerusform><numerusform>%n aktive forbindelser til Bitcoin-nettverket</numerusform></translation>
@@ -471,10 +434,6 @@ Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i Op
         <source>No block source available...</source>
         <translation>Ingen kilde for blokker tilgjengelig...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Lastet %1 av %2 (estimert) blokker med transaksjonshistorikk.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Lastet %1 blokker med transaksjonshistorikk.</translation>
@@ -559,10 +518,6 @@ Adresse: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Lommeboken er &lt;b&gt;kryptert&lt;/b&gt; og for tiden &lt;b&gt;låst&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>En fatal feil har inntruffet. Det er ikke trygt å fortsette og Bitcoin må derfor avslutte.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +553,8 @@ Adresse: %4
         <translation>Avgift:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Svake Utdata:</translation>
+        <source>Dust:</source>
+        <translation>Støv:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +645,8 @@ Adresse: %4
         <translation>Kopier prioritet</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Kopier svake utdata</translation>
+        <source>Copy dust</source>
+        <translation>Kopier støv</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +697,8 @@ Adresse: %4
         <translation>ingen</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Støv</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Kan variere +/- %1 satoshi(er) per input.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -770,25 +725,13 @@ Adresse: %4
         <translation>Transaksjoner med høyere prioritet har mer sannsynlighet for å bli inkludert i en blokk.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Denne merkelappen blir rød, hvis prioriteten er mindre enn &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Denne merkelappen blir rød, hvis prioriteten er mindre enn "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Denne merkelappen blir rød, hvis en mottaker mottar en mengde på mindre enn %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Dette betyr at et gebyr på minst %1 er påkrevd.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Mengder under 0.546 ganger minimum relégebyr er vist som støv.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Denne merkelappen blir rød, hvis endringen er mindre enn %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ingen merkelapp)</translation>
@@ -841,12 +784,12 @@ Adresse: %4
         <translation>Rediger utsendingsadresse</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Den oppgitte adressen &quot;%1&quot; er allerede i adresseboken.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Den oppgitte adressen "%1" er allerede i adresseboken.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Den angitte adressed &quot;%1&quot; er ikke en gyldig Bitcoin-adresse.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Den angitte adressed "%1" er ikke en gyldig Bitcoin-adresse.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +825,6 @@ Adresse: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Kommandolinjevalg</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +833,18 @@ Adresse: %4
         <source>version</source>
         <translation>versjon</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation> (%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Om Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Kommandolinjevalg</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Bruk:</translation>
@@ -907,8 +858,8 @@ Adresse: %4
         <translation>valg i brukergrensesnitt</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Sett språk, for eksempel &quot;nb_NO&quot; (standardverdi: fra operativsystem)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Sett språk, for eksempel "nb_NO" (standardverdi: fra operativsystem)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -916,7 +867,7 @@ Adresse: %4
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation>Sett SSL-rotsertifikat for betalingsforespørsel (standard: -system-)</translation>
+        <translation>Sett SSL-rotsertifikat for betalingsetterspørring (standard: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -954,12 +905,12 @@ Adresse: %4
         <translation>Bruk en egendefinert datamappe:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Feil: Spesifisert datamappe &quot;%1&quot; kan ikke opprettes.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Feil: Den oppgitte datamappen "%1" kan ikke opprettes.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1035,6 +986,14 @@ Adresse: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Antall script &amp;verifikasjonstråder</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Tillat tilkoblinger fra utsiden</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Tillatt innkommende tilkoblinger</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Koble til Bitcoin-nettverket gjennom en SOCKS proxy.</translation>
@@ -1115,14 +1074,6 @@ Adresse: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Proxyens port (f.eks. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Versjon:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Proxyens SOCKS versjon (f.eks. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Vindu</translation>
@@ -1163,14 +1114,6 @@ Adresse: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Velg standard delt enhet for visning i grensesnittet og for sending av bitcoins.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Om Bitcoin-adresser skal vises i transaksjonslisten eller ikke.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Vis adresser i transaksjonslisten</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Skal myntkontroll funksjoner vises eller ikke.</translation>
@@ -1226,6 +1169,10 @@ Adresse: %4
         <source>Wallet</source>
         <translation>Lommebok</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Kun observerbar:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Tilgjengelig:</translation>
@@ -1258,6 +1205,22 @@ Adresse: %4
         <source>Your current total balance</source>
         <translation>Din nåværende saldo</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Din nåværende balanse i kun observerbare adresser</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Ubekreftede transaksjoner til kun observerbare adresser</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Utvunnet balanse i kun observerbare adresser som ennå ikke har modnet</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Nåværende totale balanse i kun observerbare adresser</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Siste transaksjoner&lt;/b&gt;</translation>
@@ -1274,8 +1237,24 @@ Adresse: %4
         <translation>URI-håndtering</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI kunne ikke tolkes! Dette kan forårsakes av en ugyldig Bitcoin-adresse eller feil i URI-parametere.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Ugyldig betalingsadresse %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Betalingsetterspørring avvist</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Nettverk for betalingsetterspørring er ikke i overensstemmelse med klientnettverket.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Betalingsetterspørringen har utløpt.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Betalingsetterspørringen er ikke initialisert.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1283,31 +1262,27 @@ Adresse: %4
     </message>
     <message>
         <source>Payment request error</source>
-        <translation>Betalingsforespørsel feil</translation>
+        <translation>Betalingsetterspørringsfeil</translation>
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Kan ikke starte Bitcoin: klikk-og-betal håndterer</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Nettleder advarsel</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Din aktive proxy har ikke støtte for SOCKS5, som er påkrevd for betalingsforespørsler via proxy.</translation>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>Hentelenke for betalingsetterspørring er ugyldig: %1</translation>
     </message>
     <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation>Hentelenke for betalingsforespørsel er ugyldig: %1</translation>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>URI kan ikke fortolkes! Dette kan være forårsaket av en ugyldig Bitcoin-adresse eller feilformede URI-parametre.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
-        <translation>Filhåndtering for betalingsforespørsel</translation>
+        <translation>Filhåndtering for betalingsetterspørring</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Fil for betalingsforespørsel kan ikke leses eller behandles! Dette kan skyldes en ugyldig fil for betalingsforespørsel.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Betalingsetterspørringsfil kan ikke leses! Dette kan være forårsaket av en ugyldig betalingsetterspørringsfil.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1322,8 +1297,8 @@ Adresse: %4
         <translation>Feil i kommunikasjonen med %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Betalingsforespørsler kan ikke analyseres eller behandles!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Betaingsetterspørrelse kan ikke fortolkes!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,31 +1313,66 @@ Adresse: %4
         <translation>Nettverksforespørsel feil</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Brukeragent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresse/Vertsnavn</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping-tid</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Beløp</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Feil: Spesifisert datamappe &quot;%1&quot; finnes ikke.</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Oppgi en Bitcoin-adresse (f.eks. %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Feil: Kan ikke lese konfigurasjonsfil: %1. Bruk kun syntaksen nøkkel=verdi.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Feil: Ugyldig kombinasjon av -regtest og -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 t</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core har ennå ikke avsluttet på en sikker måte...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Skriv inn en Bitcoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>NETTVERK</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>UKJENT</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Ingen</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>-</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1414,6 +1424,10 @@ Adresse: %4
         <source>Using OpenSSL version</source>
         <translation>Bruker OpenSSL versjon</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Bruker BerkeleyDB versjon</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Oppstartstidspunkt</translation>
@@ -1439,8 +1453,76 @@ Adresse: %4
         <translation>Nåværende antall blokker</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Estimert totalt antall blokker</translation>
+        <source>Received</source>
+        <translation>Mottatt</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Sendt</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Noder</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Velg en node for å vise detaljert informasjon.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Retning</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versjon</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Brukeragent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Tjenester</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Synk-node</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Starthøyde</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Synkroniseringshøyde</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Ban Poengsum</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Tilkoblingstid</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Siste Sendte</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Siste Mottatte</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Byte Sendt</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Byte Mottatt</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping-tid</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1519,16 +1601,36 @@ Adresse: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>via %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 t</translation>
+        <source>never</source>
+        <translation>aldri</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Innkommende</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Utgående</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Ja</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Nei</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Ukjent</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 t %2 m</translation>
+        <source>Fetching...</source>
+        <translation>Henter …</translation>
     </message>
 </context>
 <context>
@@ -1547,7 +1649,7 @@ Adresse: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Gjenbruk en av de tidligere brukte mottaksadressene. Gjenbruk av adresser har sikkerhets- og personvernsutfordringer. Ikke bruk dette med unntak for å gjennopprette en betalingsforespørsel som ble gjort tidligere.</translation>
+        <translation>Gjenbruk en av de tidligere brukte mottaksadressene. Gjenbruk av adresser har sikkerhets- og personvernsutfordringer. Ikke bruk dette med unntak for å gjennopprette en betalingsetterspørring som ble gjort tidligere.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
@@ -1555,7 +1657,7 @@ Adresse: %4
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>En valgfri melding å tilknytte betalingsforespørselen, som vil bli vist når forespørselen er åpnet. Meldingen vil ikke bli sendt med betalingen over Bitcoin-nettverket.</translation>
+        <translation>En valgfri melding å tilknytte betalingsetterspørringen, som vil bli vist når forespørselen er åpnet. Meldingen vil ikke bli sendt med betalingen over Bitcoin-nettverket.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
@@ -1742,10 +1844,6 @@ Adresse: %4
         <source>Fee:</source>
         <translation>Gebyr:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Svake Utdata:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Etter Gebyr:</translation>
@@ -1774,6 +1872,10 @@ Adresse: %4
         <source>Clear all fields of the form.</source>
         <translation>Fjern alle felter fra skjemaet.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Støv:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Fjern &amp;Alt</translation>
@@ -1822,10 +1924,6 @@ Adresse: %4
         <source>Copy priority</source>
         <translation>Kopier prioritet</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopier svake utdata</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopier veksel</translation>
@@ -1878,6 +1976,10 @@ Adresse: %4
         <source>Warning: Unknown change address</source>
         <translation>Advarsel: Ukjent adresse for veksel</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopier støv</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Er du sikker på at du vil sende?</translation>
@@ -1886,14 +1988,6 @@ Adresse: %4
         <source>added as transaction fee</source>
         <translation>lagt til som transaksjonsgebyr</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Betalingsforespørsel utgått</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Ugyldig betalingsadresse %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1999,6 @@ Adresse: %4
         <source>Pay &amp;To:</source>
         <translation>Betal &amp;Til:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen betalingen skal sendes til  (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Skriv inn en merkelapp for denne adressen for å legge den til i din adressebok</translation>
@@ -1925,6 +2015,10 @@ Adresse: %4
         <source>This is a normal payment.</source>
         <translation>Dette er en normal betaling.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Bitcoin-adressen betalingen skal sendes til</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1996,8 +2090,8 @@ Adresse: %4
         <translation>Du kan signere meldinger med dine adresser for å bevise at du eier dem. Ikke signer vage meldinger da phishing-angrep kan prøve å lure deg til å signere din identitet over til andre. Signer kun fullt detaljerte utsagn som du er enig i.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen for signering av meldingen (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Bitcoin-adressen meldingen skal signeres med</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2049,11 +2143,11 @@ Adresse: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Angi adresse for signering, melding (vær sikker på at du kopierer linjeskift, mellomrom, tab, etc. helt nøyaktig) og signatur under for å verifisere meldingen. Vær forsiktig med at du ikke gir signaturen mer betydning enn det som faktisk står i meldingen, for å unngå å bli lurt av såkalte &quot;man-in-the-middle&quot; angrep.</translation>
+        <translation>Angi adresse for signering, melding (vær sikker på at du kopierer linjeskift, mellomrom, tab, etc. helt nøyaktig) og signatur under for å verifisere meldingen. Vær forsiktig med at du ikke gir signaturen mer betydning enn det som faktisk står i meldingen, for å unngå å bli lurt av såkalte "man-in-the-middle" angrep.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen meldingen var signert med (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Bitcoin-adressen meldingen ble signert med</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2068,12 +2162,8 @@ Adresse: %4
         <translation>Tilbakestill alle felter for meldingsverifikasjon</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Skriv inn en Bitcoin-adresse (f.eks. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klikk &quot;Signer Melding&quot; for å generere signatur</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klikk "Signer Melding" for å generere signatur</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2200,6 +2290,10 @@ Adresse: %4
         <source>own address</source>
         <translation>egen adresse</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>kun observerbar</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>merkelapp</translation>
@@ -2220,6 +2314,14 @@ Adresse: %4
         <source>Debit</source>
         <translation>Debet</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Total debet</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Total kredit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transaksjonsgebyr</translation>
@@ -2245,8 +2347,8 @@ Adresse: %4
         <translation>Forhandler</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Genererte bitcoins må modnes %1 blokker før de kan brukes. Da du genererte denne blokken ble den kringkastet på nettverket for å bli lagt til i kjeden av blokker. Hvis den ikke kommer med i kjeden vil den endre seg til &quot;ikke akseptert&quot; og pengene vil ikke kunne brukes. Dette vil noen ganger skje hvis en annen node genererer en blokk noen sekunder i tid fra din egen.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Genererte bitcoins må modnes %1 blokker før de kan brukes. Da du genererte denne blokken ble den kringkastet på nettverket for å bli lagt til i kjeden av blokker. Hvis den ikke kommer med i kjeden vil den endre seg til "ikke akseptert" og pengene vil ikke kunne brukes. Dette vil noen ganger skje hvis en annen node genererer en blokk noen sekunder i tid fra din egen.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2412,6 @@ Adresse: %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Beløp</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Umoden (%1 bekreftelser, vil være tilgjengelig etter %2)</translation>
@@ -2525,10 +2623,6 @@ Adresse: %4
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Beløp</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2636,13 @@ Adresse: %4
         <translation>til</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Enhet å vise beløper i. Klikk for å velge en annen enhet.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2694,6 @@ Adresse: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Bruk:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>List opp kommandoer</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Vis hjelpetekst for en kommando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Innstillinger:</translation>
@@ -2645,10 +2734,6 @@ Adresse: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Antall sekunder noder med dårlig oppførsel hindres fra å koble til på nytt (standardverdi: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>En feil oppstod ved opprettelse av RPC-port %u for IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Lytt etter JSON-RPC tilkoblinger på &lt;port&gt; (standardverdi: 8332 eller testnett: 18332)</translation>
@@ -2657,10 +2742,6 @@ Adresse: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Ta imot kommandolinje- og JSON-RPC-kommandoer</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC-klientversjon</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Kjør i bakgrunnen som daemon og ta imot kommandoer</translation>
@@ -2683,7 +2764,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, du må angi rpcpassord i konfigurasjonsfilen.
 %s
@@ -2694,16 +2775,12 @@ rpcpassord=%s
 Brukernavnet og passordet MÅ IKKE være like.
 Om filen ikke eksisterer, opprett den nå med eier-kun-les filrettigheter.
 Det er også anbefalt at å sette varselsmelding slik du får melding om problemer.
-For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@foo.com</translation>
+For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Akseptable krypteringsmetoder (standardverdi: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>En feil oppstod under oppsettet av RPC-port %u for IPv6, tilbakestilles til IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind til angitt adresse. Bruk [vertsmaskin]:port notasjon for IPv6</translation>
@@ -2713,17 +2790,13 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <translation>Ratebegrens gratistransaksjoner kontinuerlig til &lt;n&gt;*1000 bytes per minutt (standard: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Gå til modus for regresjonstesting, som bruker en spesiell blokkjede der blokker kan bli løst momentant. Dette er tenkt til verktøy for regresjonstesting og apputvikling.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Slett alle transaksjoner i lommeboken og gjenopprett kun de delene av blokkjeden gjennom -rescan ved oppstart</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Gå til modus for regresjonstesting, som bruker en spesiell blokkjede der blokker kan bli løst momentant.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Feil: Lytting etter innkommende tilkoblinger feilet (lytting returnerte feil %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Feil: Transaksjonen ble avvist! Dette kan skje hvis noen av myntene i lommeboken allerede er blitt brukt, som om du brukte en kopi av wallet.dat og myntene ble brukt i kopien, men ikke markert som brukt her.</translation>
@@ -2736,10 +2809,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Kjør kommando når en lommeboktransaksjon endres (%s i kommando er erstattet med TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Gebyr mindre enn dette er betraktet som intet gebyr (for laging av transaksjoner) (standardverdi:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Overfør aktiviteten i databasen fra minnelageret til loggen på harddisken for hver &lt;n&gt; megabytes (standardverdi: 100)</translation>
@@ -2776,10 +2845,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Advarsel: -paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Advarsel: Vennligst undersøk at din datamaskin har riktig dato og klokkeslett! Hvis klokken er stilt feil vil ikke Bitcoin fungere riktig.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Advarsel: Nettverket ser ikke ut til å være enig! Noen minere ser ut til å ha problemer.</translation>
@@ -2812,30 +2877,14 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Forsøk å berge private nøkler fra en korrupt wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Valg for opprettelse av blokker:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Tøm listen over transaksjoner i lommeboken (diagnoseverktøy; impliserer -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Koble kun til angitt(e) node(r)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Koble til via SOCKS proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Koble til JSON-RPC på &lt;port&gt; (default: 8332 eller testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Innstillinger for tilkobling:</translation>
@@ -2936,18 +2985,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Failed to write undo data</source>
         <translation>Feil ved skriving av angredata</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Gebyr per kB for transaksjoner du sender</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Gebyrer mindre enn dette vil anses som gebyrfrie (for videresending) (standard:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Finn andre noder gjennom DNS-oppslag (standardverdi: 1 med mindre -connect er oppgitt)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Tving sikkerhetsmodus (standard: 0)</translation>
@@ -2973,8 +3010,8 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <translation>Ugyldig eller ingen skaperblokk funnet. Feil datamappe for nettverk?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Ugyldig -onion adresse: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Ugyldig -onion adresse: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2984,18 +3021,10 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Sett inn tidsstempel i front av feilsøkingsdata (standardverdi: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Innstillinger for RPC-klient:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Gjenopprett blokkjedeindeks fra blk000??.dat filer</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Velg versjon av SOCKS -proxy (4 eller 5, standardverdi: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Sett databasen sin størrelse på hurtigbufferen i megabytes (%d til %d, standardverdi: %d)</translation>
@@ -3017,12 +3046,12 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <translation>Bruk ubekreftet veksel ved sending av transaksjoner (standardverdi: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Dette er tiltenkt verktøy for regresjonstesting og apputvikling.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Avslutt etter import av blokker fra disk (standard: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Bruk (foreldet, bruk bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Dette er tiltenkt verktøy for regresjonstesting og apputvikling.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3032,10 +3061,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Verifying wallet...</source>
         <translation>Verifiserer lommebok...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Vent på start av RPC-tjeneren</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Lommebok %s befinner seg utenfor datamappe %s</translation>
@@ -3044,10 +3069,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Wallet options:</source>
         <translation>Valg for lommebok:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Advarsel: Utløpt argument -debugnet ignorert, bruk -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Du må gjenoppbygge databasen med å bruke -reindex for å endre -txindex</translation>
@@ -3056,33 +3077,157 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerer blokker fra ekstern fil blk000??.dat</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(standardverdi: 1, 1 = behold metadata for transaksjon som f. eks. kontoeier og informasjon om betalingsanmodning, 2 = dropp metadata for transaksjon)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Tillat JSON-RPC-tilkoblinger fra angitt kilde. Gyldig for &lt;ip&gt; er en enkelt IP (f. eks. 1.2.3.4), et nettverk/nettmaske (f. eks. 1.2.3.4/255.255.255.0) eller et nettverk/CIDR (f. eks. 1.2.3.4/24). Dette alternativet kan angis flere ganger</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>En feil oppstod under oppsett av RPC-adressen %s port %u for lytting: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Bind til gitt adresse og hvitlist peers som kobler seg til den. Bruk [host]:port notasjon for IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Bind til gitt adresse for å lytte for JSON-RPC-tilkoblinger. Bruk [host]:port notasjon for IPv6. Dette alternativet kan angis flere ganger (standardverdi: bind til alle grensesnitt)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Ute av stand til å låse datamappen %s. Bitcoin Core kjører sannsynligvis allerede.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Opprett nye filer med standardtillatelser i systemet, i stedet for umask 077 (kun virksom med lommebokfunksjonalitet slått av)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuert under MIT/X11 programvarelisensen, se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Feil: Lytting etter innkommende tilkoblinger feilet (lytting returnerte feil %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Feil: Argumentet -socks er ikke støttet. Det er ikke lenger mulig å sette SOCKS-versjon; bare SOCKS5-proxyer er støttet.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Utfør kommando når et nettverkstransaksjon gjenbruker inndata fra lommeboktransaksjonen (%s=gjenbruk TxID, %t=lommebok TxID)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Utfør kommando når et relevant varsel er mottatt eller vi ser en veldig lang gaffel (%s i kommando er erstattet med melding)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Gebyrer (i BTC/Kb) mindre enn dette anses som null gebyr for videresending (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Gebyrer (i BTC/Kb) mindre enn dette anses som null gebyr for laging av transaksjoner (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Hvis paytxfee ikke er angitt, inkluderer da nok gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Ta ut feilsøkingsinformasjon (standardverdi: 0, bruk av &lt;category&gt; er valgfritt)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sett maksimum størrelse for transaksjoner med høy prioritet / lavt gebyr, i bytes (standardverdi: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; og kryptografisk programvare skrevet av Eric Young og UPnP-programvare skrevet av Thomas Bernard.</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>Advarsel: Vennligst undersøk at din datamaskin har riktig dato og klokkeslett! Hvis klokken er stilt feil vil ikke Bitcoin Core fungere riktig.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Hvitelist noder som kobler til fra den oppgitte nettmasken eller IP-adressen. Kan oppgis flere ganger.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Hvitlistede noder kan ikke DoS-blokkeres, og deres transaksjoner videresendes alltid, selv om de allerede er i minnelageret. Nyttig f.eks. for en gateway.</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Alltid søk etter nodeadresser via DNS-oppslag (standardverdi: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Kan ikke løse -whitebind-adresse: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Koble til via SOCKS5-proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i utviklerne av Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Kunne ikke tolke -rpcbind-verdi %s som en nettverksadresse</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Feil ved lasting av wallet.dat: Lommeboken krever en nyere versjon av Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Feil: Argumentet -tor er ikke støttet, bruk -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Gebyr (i BTC/kB) for å legge til i transaksjoner du sender (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Inkludere IP-adresser i feilsøkingslogg (standard: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informasjon</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldig mengde for -minrelaytxfee=&lt;beløp&gt;: &apos;%s&apos;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Sunnhetssjekk ved oppstart feilet. Bitcoin Core stenges ned.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldig mengde for -minrelaytxfee=&lt;beløp&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldig mengde for -mintxfee=&lt;beløp&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Ugyldig beløp for -paytxfee=&lt;amount&gt;: '%s' (må være minst %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ugyldig nettmaske spesifisert i -whitelist: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldig mengde for -mintxfee=&lt;beløp&gt;: &apos;%s&apos;</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Behold på det meste &lt;n&gt; blokker i minnet som ikke er mulig å koble (standardverdi: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3104,6 +3249,14 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maks sendebuffer per forbindelse, &lt;n&gt;*1000 bytes (standardverdi: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Må oppgi en port med -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Node alternativer for videresending:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Aksepter kun en blokkjede som passer med innebygde sjekkpunkter (standardvalg: 1)</translation>
@@ -3137,16 +3290,16 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <translation>Slumpvis bland 1 av hver &lt;n&gt; nettverksmeldinger</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kjør en tråd som skriver lommeboken til disk periodisk (standard: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Videresend og ufør graving av databærende transaksjoner (standardverdi: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL valg: (se Bitcoin Wiki for instruksjoner for oppsett av SSL)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Videresende ikke-P2SH multisig (standard: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Send kommando til Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Kjør en tråd som skriver lommeboken til disk periodisk (standard: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3164,10 +3317,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle feilsøkingsvalg (bruk: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Vis informasjon om ytelsesmål (standard: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Krymp filen debug.log når klienten starter (standardverdi: 1 hvis uten -debug)</translation>
@@ -3180,14 +3329,14 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Angi tidsavbrudd for forbindelse i millisekunder (standardverdi: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Start Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systemfeil:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Dette er eksperimentell programvare.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transaksjonen er for liten</translation>
@@ -3200,6 +3349,10 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Transaction too large</source>
         <translation>Transaksjonen er for stor</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Kan ikke binde til %s på denne datamaskinen (binding returnerte feilen %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Bruk UPnP for lytteport (standardverdi: 0)</translation>
@@ -3212,6 +3365,10 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Username for JSON-RPC connections</source>
         <translation>Brukernavn for JSON-RPC forbindelser</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Lommeboken måtte skrives på nytt: start Bitcoin Core på nytt for å fullføre</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Advarsel</translation>
@@ -3220,6 +3377,14 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Advarsel: Denne versjonen er foreldet, oppgradering kreves!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Advarsel: Argumentet -benchmark er ikke støttet og ble ignorert, bruk -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Advarsel: Argumentet -debugnet er ikke støttet og ble ignorert, bruk -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Zapper alle transaksjoner fra lommeboken...</translation>
@@ -3228,10 +3393,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>on startup</source>
         <translation>ved oppstart</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versjon</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat korrupt, bergning feilet</translation>
@@ -3240,14 +3401,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Password for JSON-RPC connections</source>
         <translation>Passord for JSON-RPC forbindelser</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Tillat JSON-RPC tilkoblinger fra angitt IP-adresse</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Send kommandoer til node på &lt;ip&gt; (standardverdi: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Utfør kommando når beste blokk endrer seg (%s i kommandoen erstattes med blokkens hash)</translation>
@@ -3280,10 +3433,6 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>This help message</source>
         <translation>Denne hjelpemeldingen</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Kan ikke binde til %s på denne datamaskinen (bind returnerte feil %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Tillat oppslag i DNS for -addnode, -seednode og -connect</translation>
@@ -3296,41 +3445,29 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Feil ved lasting av wallet.dat: Lommeboken er skadet</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Feil ved lasting av wallet.dat: Lommeboken krever en nyere versjon av Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Lommeboken måtte skrives om: start Bitcoin på nytt for å fullføre</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Feil ved lasting av wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ugyldig -proxy adresse: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ugyldig -proxy adresse: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Ukjent nettverk angitt i -onlynet &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Ukjent nettverk angitt i -onlynet '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Ukjent -socks proxyversjon angitt: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Kunne ikke slå opp -bind adresse: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kunne ikke slå opp -bind adresse: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Kunne ikke slå opp -externalip adresse: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kunne ikke slå opp -externalip adresse: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ugyldig beløp for -paytxfee=&lt;beløp&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldig beløp for -paytxfee=&lt;beløp&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +3513,5 @@ For eksempel: varselmelding=echo %%s | mail -s &quot;Bitcoin Varsel&quot; admin@
         <source>Error</source>
         <translation>Feil</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Du må sette rpcpassword=&lt;passord&gt; i konfigurasjonsfilen:
-%s
-Hvis filen ikke finnes, opprett den med leserettighet kun for eier av filen.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 8cbbbdad7f19..0a9c6e2efae8 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="nl" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Over Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt; Bitcoin Core&lt;/b&gt; versie</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Dit is experimentele software.
-
-Gedistribueerd onder de MIT/X11 software licentie, zie het bijgevoegde bestand COPYING of http://www.opensource.org/licenses/mit-license.php.
-
-Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in de OpenSSL Toolkit (http://www.openssl.org/) en cryptografische software gemaakt door Eric Young (eay@cryptsoft.com) en UPnP software geschreven door Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Auteursrecht</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>De Bitcoin Core ontwikkelaars</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="nl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d
         <translation>Export Mislukt</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Een fout is opgetreden tijdens het opslaan van deze adreslijst naar %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Een fout is opgetreden tijdens het opslaan van deze adreslijst naar %1. Probeer het nogmaals.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d
         <source>Repeat new passphrase</source>
         <translation>Herhaal nieuw wachtwoord</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Vul een nieuw wachtwoord in voor uw portemonnee. &lt;br/&gt; Gebruik een wachtwoord van &lt;b&gt;10 of meer lukrake karakters&lt;/b&gt;, of &lt;b&gt;acht of meer woorden&lt;/b&gt; . </translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Versleutel portemonnee</translation>
@@ -295,10 +254,6 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d
         <source>Quit application</source>
         <translation>Programma afsluiten</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Laat informatie zien over Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Over &amp;Qt</translation>
@@ -459,10 +414,6 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Toon het Bitcoin Core hulpbericht om een lijst te krijgen met mogelijke Bitcoin commandoregelopties</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin client</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n actieve connectie naar Bitcoinnetwerk</numerusform><numerusform>%n actieve connecties naar Bitcoinnetwerk</numerusform></translation>
@@ -471,10 +422,6 @@ Dit product bevat software ontwikkeld door het OpenSSL Project voor gebruik in d
         <source>No block source available...</source>
         <translation>Geen bron van blokken beschikbaar...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 van %2 (geschat) blokken van de transactiehistorie verwerkt.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>%1 blokken van transactiehistorie verwerkt.</translation>
@@ -559,10 +506,6 @@ Adres: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Portemonnee is &lt;b&gt;versleuteld&lt;/b&gt; en momenteel &lt;b&gt;gesloten&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Er is een fatale fout opgetreden. Bitcoin kan niet meer veilig doorgaan en zal nu afgesloten worden.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,10 +540,6 @@ Adres: %4
         <source>Fee:</source>
         <translation>Vergoeding:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Lage uitvoer:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Na vergoeding:</translation>
@@ -689,10 +628,6 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Kopieer prioriteit</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopieer lage uitvoer</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopieer wisselgeld</translation>
@@ -741,10 +676,6 @@ Adres: %4
         <source>none</source>
         <translation>geen</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Stof</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>ja</translation>
@@ -770,25 +701,13 @@ Adres: %4
         <translation>Transacties met een hogere prioriteit zullen eerder in een block gezet worden.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Als dit label rood is, is de prioriteit minder dan &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Als dit label rood is, is de prioriteit minder dan "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Dit label wordt rood, als een ontvanger een bedrag van minder dan %1 gekregen heeft.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Dit betekend dat een minimale vergoeding van %1 nodig is.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Bedragen beneden 0.546 keer het minimum relais vergoeding, worden als stof aangemerkt.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Dit label wordt rood, als de wijziging is kleiner dan %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(geen label)</translation>
@@ -841,12 +760,12 @@ Adres: %4
         <translation>Bewerk adres om naar te verzenden</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Het opgegeven adres &quot;%1&quot; bestaat al in uw adresboek.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Het opgegeven adres "%1" bestaat al in uw adresboek.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Het opgegeven adres &quot;%1&quot; is een ongeldig Bitcoinadres</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Het opgegeven adres "%1" is een ongeldig Bitcoinadres</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +801,6 @@ Adres: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Commandoregel-opties</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Kern</translation>
@@ -894,6 +809,18 @@ Adres: %4
         <source>version</source>
         <translation>versie</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Over Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Commandoregel-opties</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Gebruik:</translation>
@@ -907,8 +834,8 @@ Adres: %4
         <translation>gebruikersinterfaceopties</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Stel taal in, bijvoorbeeld &apos;&apos;de_DE&quot; (standaard: systeeminstellingen)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Stel taal in, bijvoorbeeld ''de_DE" (standaard: systeeminstellingen)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,12 +881,8 @@ Adres: %4
         <translation>Gebruik een persoonlijke gegevensmap:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Fout: Opgegeven gegevensmap &quot;%1&quot; kan niet aangemaakt worden.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Kern</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1049,7 +972,7 @@ Adres: %4
     </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>Derde partijen URL&apos;s (bijvoorbeeld block explorer) dat in de transacties tab verschijnen als contextmenu elementen. %s in de URL is vervangen door transactie hash. Verscheidene URL&apos;s zijn gescheiden door een verticale streep |.  </translation>
+        <translation>Derde partijen URL's (bijvoorbeeld block explorer) dat in de transacties tab verschijnen als contextmenu elementen. %s in de URL is vervangen door transactie hash. Verscheidene URL's zijn gescheiden door een verticale streep |.  </translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
@@ -1115,14 +1038,6 @@ Adres: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Poort van de proxy (bijv. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS-&amp;Versie:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS-versie van de proxy (bijv. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Scherm</translation>
@@ -1163,14 +1078,6 @@ Adres: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Kies de standaard onderverdelingseenheid om weer te geven in uw programma, en voor het versturen van munten</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Of Bitcoinadressen getoond worden in de transactielijst</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Toon a&amp;dressen in de transactielijst</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Munt controle functies weergeven of niet.</translation>
@@ -1274,8 +1181,8 @@ Adres: %4
         <translation>URI-behandeling</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI kan niet worden geïnterpreteerd. Dit kan komen door een ongeldig Bitcoinadres of misvormde URI-parameters.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Ongeldig betalingsadres %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,14 +1196,6 @@ Adres: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Kan bitcoin niet starten: click-to-pay handler</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Netmanager waarschuwing</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Uw actieve proxy ondersteunt geen SOCKS5, dewelke vereist is voor betalingsverzoeken via proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL om betalingsverzoek te verkrijgen is ongeldig: %1</translation>
@@ -1305,10 +1204,6 @@ Adres: %4
         <source>Payment request file handling</source>
         <translation>Betalingsverzoek bestandsafhandeling</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Betalingsverzoek-bestand kan niet gelezen of verwerkt worden! Dit kan veroorzaakt worden door een ongeldig betalingsverzoek-bestand.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Niet-geverifieerde betalingsverzoeken naar aangepaste betaling scripts worden niet ondersteund.</translation>
@@ -1321,10 +1216,6 @@ Adres: %4
         <source>Error communicating with %1: %2</source>
         <translation>Fout bij communiceren met %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Betalingsverzoek kan niet juist worden ontleed of verwerkt!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Ongeldige respons van server %1</translation>
@@ -1338,33 +1229,28 @@ Adres: %4
         <translation>Netwerkfout bij verzoek</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Fout: Opgegeven gegevensmap &quot;%1&quot; bestaat niet.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Fout: Kan configuratiebestand niet parsen: %1. Gebruik enkel de key=value syntax.</translation>
+        <source>Amount</source>
+        <translation>Bedrag</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Fout: Ongeldige combinatie van -regtest en -testnet</translation>
+        <source>%1 h</source>
+        <translation>%1 uur</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core is nog niet veilig uitgeschakeld...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Vul een Bitcoinadres in (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N.v.t.</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1324,6 @@ Adres: %4
         <source>Current number of blocks</source>
         <translation>Huidig aantal blokken</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Geschat totaal aantal blokken</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Tijd laatste blok</translation>
@@ -1500,7 +1382,7 @@ Adres: %4
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Typ &lt;b&gt;help&lt;/b&gt; voor een overzicht van de beschikbare commando&apos;s.</translation>
+        <translation>Typ &lt;b&gt;help&lt;/b&gt; voor een overzicht van de beschikbare commando's.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -1518,19 +1400,7 @@ Adres: %4
         <source>%1 GB</source>
         <translation>%1 Gb</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 uur</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1742,10 +1612,6 @@ Adres: %4
         <source>Fee:</source>
         <translation>Vergoeding:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Lage uitvoer:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Na vergoeding:</translation>
@@ -1822,10 +1688,6 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Kopieer prioriteit</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopieer lage uitvoer</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopieer wijziging</translation>
@@ -1886,14 +1748,6 @@ Adres: %4
         <source>added as transaction fee</source>
         <translation>toegevoegd als transactiekosten</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Betalingsverzoek verlopen</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Ongeldig betalingsadres %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1759,6 @@ Adres: %4
         <source>Pay &amp;To:</source>
         <translation>Betaal &amp;Aan:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Het adres waaraan u wilt betalen  (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Vul een label in voor dit adres om het toe te voegen aan uw adresboek</translation>
@@ -1995,10 +1845,6 @@ Adres: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>U kunt berichten ondertekenen met een van uw adressen om te bewijzen dat u dit adres bezit. Pas op dat u geen onduidelijke dingen ondertekent, want phishingaanvallen zouden u kunnen misleiden om zo uw identiteit te stelen. Onderteken alleen berichten waarmee u het volledig eens bent.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Het adres om het bericht mee te ondertekenen (Vb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L).</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Kies een eerder gebruikt adres</translation>
@@ -2051,10 +1897,6 @@ Adres: %4
         <source>Enter the signing 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.</source>
         <translation>Voer het ondertekenende adres, bericht en handtekening hieronder in (let erop dat u nieuwe regels, spaties en tabs juist overneemt) om de handtekening te verifiëren. Let erop dat u niet meer uit het bericht interpreteert dan er daadwerkelijk staat,  om te voorkomen dat u wordt misleid in een man-in-the-middle-aanval.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Het adres waarmee bet bericht was ondertekend (Vb.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L).</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Controleer een bericht om te verifiëren dat het gespecificeerde Bitcoinadres het bericht heeft ondertekend.</translation>
@@ -2068,12 +1910,8 @@ Adres: %4
         <translation>Verwijder alles in de invulvelden</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Vul een Bitcoinadres in (bijv. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klik &quot;Onderteken Bericht&quot; om de handtekening te genereren</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klik "Onderteken Bericht" om de handtekening te genereren</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2245,8 +2083,8 @@ Adres: %4
         <translation>Handelaar</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Gegenereerde munten moeten %1 blokken rijpen voordat ze kunnen worden besteed. Toen dit blok gegenereerd werd, werd het uitgezonden naar het netwerk om aan de blokketen toegevoegd te worden. Als het niet lukt om in de keten toegevoegd te worden, zal de status te veranderen naar &quot;niet geaccepteerd&quot; en het zal deze niet besteedbaar zijn. Dit kan soms gebeuren als een ander knooppunt een blok genereert binnen een paar seconden na die van u.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Gegenereerde munten moeten %1 blokken rijpen voordat ze kunnen worden besteed. Toen dit blok gegenereerd werd, werd het uitgezonden naar het netwerk om aan de blokketen toegevoegd te worden. Als het niet lukt om in de keten toegevoegd te worden, zal de status te veranderen naar "niet geaccepteerd" en het zal deze niet besteedbaar zijn. Dit kan soms gebeuren als een ander knooppunt een blok genereert binnen een paar seconden na die van u.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2148,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>immatuur (%1 bevestigingen, zal beschikbaar zijn na %2)</translation>
@@ -2525,10 +2359,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Bedrag</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2372,9 @@ Adres: %4
         <translation>naar</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2426,6 @@ Adres: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Gebruik:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lijst van commando&apos;s</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Toon hulp voor een commando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opties:</translation>
@@ -2647,25 +2468,17 @@ Adres: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Aantal seconden dat zich misdragende peers niet opnieuw mogen verbinden (standaard: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Er is een fout opgetreden tijdens het instellen van de inkomende RPC-poort %u op IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Wacht op JSON-RPC-connecties op poort &lt;port&gt; (standaard: 8332 of testnet: 18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>Aanvaard commandoregel- en JSON-RPC-commando&apos;s</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC-client versie</translation>
+        <translation>Aanvaard commandoregel- en JSON-RPC-commando's</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation>Draai in de achtergrond als daemon en aanvaard commando&apos;s</translation>
+        <translation>Draai in de achtergrond als daemon en aanvaard commando's</translation>
     </message>
     <message>
         <source>Use the test network</source>
@@ -2685,7 +2498,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, u moet een RPC-wachtwoord instellen in het configuratiebestand: %s
 U wordt aangeraden het volgende willekeurige wachtwoord te gebruiken:
@@ -2694,17 +2507,13 @@ rpcpassword=%s
 (u hoeft dit wachtwoord niet te onthouden)
 De gebruikersnaam en wachtwoord mogen niet hetzelfde zijn.
 Als het bestand niet bestaat, make hem dan aan met leesrechten voor enkel de eigenaar.
-Het is ook aan te bevelen &quot;alertnotify&quot; in te stellen zodat u op de hoogte gesteld wordt van problemen;
-bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translation>
+Het is ook aan te bevelen "alertnotify" in te stellen zodat u op de hoogte gesteld wordt van problemen;
+bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Aanvaardbare cijfers (standaard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Er is een fout opgetreden tijdens het instellen van de inkomende RPC-poort %u op IPv6, terugval naar IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind aan opgegeven adres en luister er altijd op. Gebruik [host]:port notatie voor IPv6</translation>
@@ -2713,18 +2522,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Doorlopend tarief-limiet op gratis transacties toepassen tot &lt;n&gt;*1000 bytes per minuut (standaard: 15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Schakel regressietest-modus in, die een speciale blokketen gebruikt waarin blokken instantaan opgelost kunnen worden. Dit is bedoeld voor regressietestsoftware en app-ontwikkeling.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Schakel regressietest-modus in, die een speciale blokketen gebruikt waarin blokken onmiddellijk opgelost kunnen worden.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Fout: Luisteren naar inkomende connecties mislukt (listen geeft fout terug %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Fout: De transactie was afgewezen! Dit kan gebeuren als sommige munten in uw portemonnee al eerder uitgegeven zijn, zoals wanneer u een kopie van uw wallet.dat heeft gebruikt en in de kopie deze munten zijn uitgegeven, maar in deze portemonnee die munten nog niet als zodanig zijn gemarkeerd.</translation>
@@ -2737,10 +2538,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Toeslagen kleiner dan dit worden beschouwd als geen vergoeding (voor transactie aanmaak) (standaard:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Leeg database-activiteit uit de geheugenpool naar schijf log elke &lt;n&gt; megabytes (standaard: 100) </translation>
@@ -2771,16 +2568,12 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
     </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Gebruik een aparte SOCKS5 proxy om &apos;Tor hidden services&apos; te bereiken (standaard: hetzelfde als -proxy)</translation>
+        <translation>Gebruik een aparte SOCKS5 proxy om 'Tor hidden services' te bereiken (standaard: hetzelfde als -proxy)</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Waarschuwing: -paytxfee is zeer hoog ingesteld.  Dit zijn de transactiekosten die u betaalt bij het versturen van een transactie.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Waarschuwing: Controleer dat de datum en tijd op uw computer correct zijn ingesteld. Als uw klok fout staat zal Bitcoin niet correct werken.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Waarschuwing: Het lijkt erop dat het netwerk geen consensus kan vinden! Sommige delvers lijken problemen te ondervinden.</translation>
@@ -2791,7 +2584,7 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Waarschuwing: Fout bij het lezen van wallet.dat! Alle sleutels zijn in goede orde uitgelezen, maar transactiedata of adresboeklemma&apos;s zouden kunnen ontbreken of fouten bevatten.</translation>
+        <translation>Waarschuwing: Fout bij het lezen van wallet.dat! Alle sleutels zijn in goede orde uitgelezen, maar transactiedata of adresboeklemma's zouden kunnen ontbreken of fouten bevatten.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
@@ -2813,30 +2606,14 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Poog de geheime sleutels uit een corrupt wallet.dat bestand terug te halen</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blokcreatie-opties:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Leeg lijst met wallet transacties (diagnostisch instrument; impliceert -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Verbind alleen naar de gespecificeerde node(s)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Verbind via een SOCKS-proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Verbinden met JSON-RPC op &lt;poort&gt; (standaard: 8332 of testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Verbindingsopties:</translation>
@@ -2937,18 +2714,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Failed to write undo data</source>
         <translation>Schrijven van undo-data mislukt</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Transactiekosten per kB om toe te voegen aan transacties die u verzendt</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Toeslagen kleiner dan dit worden beschouwd als geen vergoeding (voor relaying) (standaard:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Vind andere nodes d.m.v. DNS-naslag (standaard: 1 tenzij -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Forceer veilige modus (default: 0)</translation>
@@ -2974,8 +2739,8 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Incorrect of geen genesis-blok gevonden. Verkeerde datamap voor het netwerk?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Ongeldig -onion adres &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Ongeldig -onion adres '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,18 +2750,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Prepend debug output met tijdstempel (standaard: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC client opties:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blokketen opnieuw opbouwen met behulp van huidige blk000??.dat-bestanden</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Selecteer de versie van de SOCKS-proxy om te gebruiken (4 of 5, standaard is 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Zet database cache grootte in megabytes (%d tot %d, standaard: %d)</translation>
@@ -3021,10 +2778,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Dit is bedoeld voor regressie test toepassingen en applicatie onwikkeling.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Gebruik (vervangen; gebruik Bitcoin-cli);</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Blokken aan het controleren...</translation>
@@ -3033,10 +2786,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>Portemonnee aan het controleren...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Wacht voor RPC server om te starten</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Portemonnee %s bevindt zich buiten de gegevensmap %s</translation>
@@ -3045,10 +2794,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Portemonnee instellingen:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Waarschuwing: Afgekeurd argument -debugnet genegeerd, use -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Om -txindex te kunnen veranderen dient u de database opnieuw te bouwen met gebruik van -reindex.</translation>
@@ -3078,12 +2823,12 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Informatie</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ongeldig bedrag voor -minrelaytxfee=&lt;bedrag&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ongeldig bedrag voor -minrelaytxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ongeldig bedrag voor -mintxfee=&lt;bedrag&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ongeldig bedrag voor -mintxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3141,14 +2886,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Draai een proces om de wallet periodiek te flushen (default: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-opties: (zie de Bitcoin wiki voor SSL-instructies)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Stuur commando naar Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Stuur trace/debug-info naar de console in plaats van het debug.log bestand</translation>
@@ -3165,10 +2902,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Toon alle foutopsporingsopties (gebruik: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Toon benchmark-informatie (default: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Verklein debug.log-bestand bij het opstarten van de client (standaard: 1 als geen -debug)</translation>
@@ -3181,10 +2914,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Specificeer de time-outtijd in milliseconden (standaard: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Start Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systeemfout:</translation>
@@ -3229,10 +2958,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>on startup</source>
         <translation>bij opstarten</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versie</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupt, veiligstellen mislukt</translation>
@@ -3241,14 +2966,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Password for JSON-RPC connections</source>
         <translation>Wachtwoord voor JSON-RPC-verbindingen</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Sta JSON-RPC verbindingen van opgegeven IP-adres toe</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Verstuur commando&apos;s naar proces dat op &lt;ip&gt; draait (standaard: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Voer commando uit zodra het beste blok verandert (%s in cmd wordt vervangen door blockhash)</translation>
@@ -3281,10 +2998,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>This help message</source>
         <translation>Dit helpbericht</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Niet in staat om aan %s te binden op deze computer (bind gaf error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Sta DNS-naslag toe voor -addnode, -seednode en -connect</translation>
@@ -3297,41 +3010,29 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fout bij laden wallet.dat: Portemonnee corrupt</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Fout bij laden wallet.dat: Portemonnee vereist een nieuwere versie van Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Portemonnee moest herschreven worden: Herstart Bitcoin om te voltooien</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fout bij laden wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ongeldig -proxy adres: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ongeldig -proxy adres: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Onbekend netwerk gespecificeerd in -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Onbekend netwerk gespecificeerd in -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Onbekende -socks proxyversie aangegeven: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Kan -bind adres niet herleiden: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kan -bind adres niet herleiden: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Kan -externlip adres niet herleiden: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kan -externlip adres niet herleiden: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ongeldig bedrag voor -paytxfee=&lt;bedrag&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ongeldig bedrag voor -paytxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +3078,5 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Error</source>
         <translation>Fout</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>U dient rpcpassword=&lt;wachtwoord&gt; in te stellen in het configuratiebestand:
-%s
-Als het bestand niet bestaat, maak het dan aan, met een alleen-lezen permissie.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 22f1b7ccc3cd..d109c2442327 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1,39 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pam" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Metung ya ining experimental software.
-Me-distribute ya lalam na ning lisensya na ning MIT/X11 software, lawan ye ing makayabeng file COPYING o http://www.opensource.org/licenses/mit-license.php.
-Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project para gamit king OpenSSL Toolkit(http://www.openssl.org/) at cryptographic software a sinulat ng Eric Young (eay@cryptsoft.com) at UPnp software a sinulat ng Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Karapatan ning Pamangopya</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="pam" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -44,22 +9,10 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Create a new address</source>
         <translation>Maglalang kang bayung address</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopyan me ing salukuyan at makipiling address keng system clipboard</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopyan ing address</translation>
@@ -68,46 +21,14 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Delete the currently selected address from the list</source>
         <translation>Ilako ya ing kasalungsungan makapiling address keng listahan</translation>
     </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Ilako</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Reni reng kekang Bitcoin address king pamagpadalang kabayaran. Lawan mulang masalese reng alaga ampo ing address na ning tumanggap bayu ka magpadalang barya.</translation>
     </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopyan ing &amp;Label</translation>
@@ -116,23 +37,11 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>&amp;Edit</source>
         <translation>&amp;Alilan</translation>
     </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma separated file (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -166,10 +75,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Repeat new passphrase</source>
         <translation>Pasibayuan ya ing bayung passphrase</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Palub ye ing bayung passphrase king wallet.&lt;br/&gt;Maliari pu sanang gumamit kayung passphrase a maki&lt;/b&gt; 10 or dakal pang miyayaliuang characters&lt;/b&gt;, o ualu o dakal pang salita&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>I-encrypt ye ing wallet</translation>
@@ -269,10 +174,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Ipakit ing kabuuang lawe ning wallet</translation>
@@ -293,10 +194,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Quit application</source>
         <translation>Tuknangan ing aplikasyon</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Ipakit ing impormasyun tungkul king Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Tungkul &amp;Qt</translation>
@@ -321,26 +218,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Alilan ing Passphrase...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>Magpadalang barya king Bitcoin address</translation>
@@ -377,14 +254,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Ipalto / Isalikut</translation>
@@ -393,18 +262,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Show or hide the main Window</source>
         <translation>Ipalto o isalikut ing pun a awang</translation>
     </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;File</translation>
@@ -429,78 +286,6 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
         <source>Bitcoin Core</source>
         <translation>Kapilubluban ning Bitcoin</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin client</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n ya ing aktibong koneksion keng Bitcoin network</numerusform><numerusform>%n lareng aktibong koneksion keng Bitcoin network</numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Me-prosesu %1 kareng %2 (me-estima) blocks ning kasalesayan ning transaksion.</translation>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>%n oras</numerusform><numerusform>%n oras</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>%n aldo</numerusform><numerusform>%n aldo</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><numerusform>%n dominggu</numerusform><numerusform>%n dominggu</numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
         <translation>Ing tatauling block a metanggap,  me-generate ya %1 ing milabas</translation>
@@ -519,7 +304,7 @@ Ing produktung ini atin yang makayabeng software a gewa dareng OpenSSL Project p
     </message>
     <message>
         <source>Information</source>
-        <translation>Impormasion</translation>
+        <translation>&amp;Impormasion</translation>
     </message>
     <message>
         <source>Up to date</source>
@@ -557,10 +342,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Maka-&lt;b&gt;encrypt&lt;/b&gt; ya ing wallet at kasalukuyan yang maka-&lt;b&gt;locked&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Atin kamalian a milyari. Ali ne magsilbing sumulung pa ing Bitcoin at kailangan na ng tuknang.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -571,54 +352,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Alaga</translation>
@@ -631,18 +364,10 @@ Address: %4
         <source>Date</source>
         <translation>Kaaldauan</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Me-kumpirma</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Kopyan ing address</translation>
@@ -655,151 +380,11 @@ Address: %4
         <source>Copy amount</source>
         <translation>Kopyan ing alaga</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(alang label)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -810,14 +395,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Label</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Address</translation>
@@ -839,12 +416,12 @@ Address: %4
         <translation>Alilan ya ing address king pamagpadala</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Ing pepalub yung address &quot;%1&quot; ati na yu king aklat dareng address</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Ing pepalub yung address "%1" ati na yu king aklat dareng address</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Ing pepalub yung address &quot;%1&quot; ali ya katanggap-tanggap a Bitcoin address.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Ing pepalub yung address "%1" ali ya katanggap-tanggap a Bitcoin address.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -857,33 +434,9 @@ Address: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Kapilubluban ning Bitcoin</translation>
@@ -892,6 +445,10 @@ Address: %4
         <source>version</source>
         <translation>bersion</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Pipamilian command-line</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Pamanggamit:</translation>
@@ -905,26 +462,18 @@ Address: %4
         <translation>Pipamilian ning UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Mamiling Amanu, alimbawa &quot;de_DE&quot;(default: system locale)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Mamiling Amanu, alimbawa "de_DE"(default: system locale)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Umpisan ing pamaglati</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Ipalto ing splash screen keng umpisa (default: 1)</translation>
     </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -932,174 +481,50 @@ Address: %4
         <translation>Malaus ka</translation>
     </message>
     <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Kapilubluban ning Bitcoin</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>Mali</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Pipamilian</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>&amp;Main</source>
+        <translation>&amp;Pun</translation>
     </message>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>Pay transaction &amp;fee</source>
+        <translation>Mamayad &amp;bayad para king transaksion </translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Automatically start Bitcoin after logging in to the system.</source>
+        <translation>Umpisan yang antimu ing Bitcoin kaibat mekapag-log in king sistema.</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>&amp;Start Bitcoin on system login</source>
+        <translation>&amp;Umpisan ya ing Bitcoin king pamag-log-in na ning sistema.</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Mali</translation>
+        <source>&amp;Network</source>
+        <translation>&amp;Network</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
+        <translation>Ibuklat yang antimanu ing Bitcoin client port king router. Gagana yamu ini istung ing router mu susuporta yang UPnP at magsilbi ya.</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Pipamilian</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation>&amp;Pun</translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Mamayad &amp;bayad para king transaksion </translation>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Umpisan yang antimu ing Bitcoin kaibat mekapag-log in king sistema.</translation>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;Umpisan ya ing Bitcoin king pamag-log-in na ning sistema.</translation>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation>&amp;Network</translation>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Ibuklat yang antimanu ing Bitcoin client port king router. Gagana yamu ini istung ing router mu susuporta yang UPnP at magsilbi ya.</translation>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation>Mapa ng ning port gamit ing &amp;UPnP</translation>
+        <source>Map port using &amp;UPnP</source>
+        <translation>Mapa ng ning port gamit ing &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1113,14 +538,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port na ning proxy(e.g. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Bersion na ning SOCKS</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Bersion a SOCKS ning proxy (e.g 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Awang</translation>
@@ -1135,7 +552,7 @@ Address: %4
     </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 Quit in the menu.</source>
-        <translation>Palatian namu kesa king iluwal ya ing aplikasion istung makasara ya ing awang. Istung ing pipamilian a ini atiu king &quot;magsilbi&quot;, ing aplikasion misara yamu kaibat meng pinili ing &quot;Tuknangan&quot; king menu.</translation>
+        <translation>Palatian namu kesa king iluwal ya ing aplikasion istung makasara ya ing awang. Istung ing pipamilian a ini atiu king "magsilbi", ing aplikasion misara yamu kaibat meng pinili ing "Tuknangan" king menu.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
@@ -1161,18 +578,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Pilinan ing default subdivision unit a ipalto o ipakit king interface at istung magpadala kang barya.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Ipakit man ing Bitcoin address king listahan naning transaksion o ali.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Ipakit ing address king listahan naning transaksion</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1185,26 +590,6 @@ Address: %4
         <source>default</source>
         <translation>default</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Ing milageng proxy address eya katanggap-tanggap.</translation>
@@ -1224,18 +609,10 @@ Address: %4
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>Ing kekang kasalungsungan balanse a malyari mung gastusan</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Ing kabuuan dareng transaksion a kasalungsungan ali pa me-kumpirma, at kasalungsungan ali pa mebilang kareng kekang balanseng malyari mung gastusan</translation>
@@ -1267,121 +644,24 @@ Address: %4
 </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Alaga</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Magpalub kang Bitcoin address(e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1400,14 +680,6 @@ Address: %4
         <source>&amp;Information</source>
         <translation>&amp;Impormasion</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Gagamit bersion na ning OpenSSL</translation>
@@ -1420,10 +692,6 @@ Address: %4
         <source>Network</source>
         <translation>Network</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Bilang dareng koneksion</translation>
@@ -1436,10 +704,6 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>Kasalungsungan bilang dareng blocks</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Estima kareng kabuuan dareng blocks</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Tatauling oras na ning block</translation>
@@ -1452,25 +716,9 @@ Address: %4
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>Kabuuan:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1500,113 +748,17 @@ Address: %4
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>I-type ing &lt;b&gt;help&lt;/b&gt; ban akit la reng ati at magsilbing commands.</translation>
     </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Label:</translation>
     </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Kopyan ing label</translation>
     </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopyan ing alaga</translation>
@@ -1614,34 +766,6 @@ Address: %4
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Address</source>
         <translation>Address</translation>
@@ -1658,15 +782,7 @@ Address: %4
         <source>Message</source>
         <translation>Mensayi</translation>
     </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
@@ -1689,77 +805,13 @@ Address: %4
         <source>(no label)</source>
         <translation>(alang label)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Magpadalang Barya</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Misanang magpadala kareng alialiuang tumanggap</translation>
@@ -1768,10 +820,6 @@ Address: %4
         <source>Add &amp;Recipient</source>
         <translation>Maglage &amp;Tumanggap</translation>
     </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>I-Clear &amp;Eganagana</translation>
@@ -1792,50 +840,10 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>Kumpirman ing pamagpadalang barya</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopyan ing alaga</translation>
     </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Ing address na ning tumanggap ali ya katanggap-tanggap, maliari pung pakilaue pasibayu.</translation>
@@ -1856,43 +864,11 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Atin meakit a milupang address, maliari kamung magpadalang misan king metung a address king misan a pamagpadalang transaksion.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(alang label)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1903,10 +879,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>Ibayad &amp;kang:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ing address nung nokarin ipadala ya ing kabayaran (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Magpalub kang label para king address a ini ban a-iabe me king aklat dareng address</translation>
@@ -1915,14 +887,6 @@ Address: %4
         <source>&amp;Label:</source>
         <translation>&amp;Label:</translation>
     </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1935,50 +899,10 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1993,21 +917,13 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Maliari kang mamirmang mensayi king kekang address bilang patune na keka ya ini. Mimingat mu king pamag-pirmang  e malino uling mapalyari kang mabiktimang phishing attack a manloku keka na pirman me ing sarili mu para king karela. Only sign fully-detailed statements you agree to.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ing address ban a -pirman ya ing mensayi kayabe ning (e.g.1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Idikit ing address menibat clipboard</translation>
+        <translation>Idikit ing address menibat king clipboard</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -2045,14 +961,6 @@ Address: %4
         <source>&amp;Verify Message</source>
         <translation>&amp;Beripikan ing Mensayi</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ing address na ning mensayi nung nokarin me pirma ya ini (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Beripikan ing mensayi ban asiguradu a me pirma ya ini gamit ing mepiling Bitcoin address</translation>
@@ -2066,12 +974,8 @@ Address: %4
         <translation>Ibalik king dati reng ngan fields na ning pamag beripikang mensayi</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Magpalub kang Bitcoin address(e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>I-click ing &quot;Pirman ing Mensayi&quot; ban agawa ya ing metung a pirma</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>I-click ing "Pirman ing Mensayi" ban agawa ya ing metung a pirma</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2128,10 +1032,6 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>Kapilubluban ning Bitcoin</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -2139,21 +1039,13 @@ Address: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>Makabuklat anggang %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
@@ -2170,10 +1062,6 @@ Address: %4
         <source>Status</source>
         <translation>Kabilian</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Kaaldauan</translation>
@@ -2206,10 +1094,6 @@ Address: %4
         <source>Credit</source>
         <translation>Credit</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>ali metanggap</translation>
@@ -2236,15 +1120,7 @@ Address: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>ID ning Transaksion</translation>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2254,10 +1130,6 @@ Address: %4
         <source>Transaction</source>
         <translation>Transaksion</translation>
     </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Alaga</translation>
@@ -2274,10 +1146,6 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, eya matagumpeng mibalita</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>e miya balu</translation>
@@ -2305,898 +1173,367 @@ Address: %4
         <translation>Klase</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Address</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Alaga</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Makabuklat anggang %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Me-kumpirma(%1 kumpirmasion)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Ing block a ini ali de atanggap deng aliwa pang nodes ania ali ya magsilbing tanggapan</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Me-generate ya oneng ali ya metanggap</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Atanggap kayabe ning</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Atanggap menibat kang</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Mipadala kang</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Kabayaran keka</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Me-mina</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Status ning Transaksion: Itapat me babo na ning field a ini ban ipakit dala reng bilang dareng me-kumpirma na</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Aldo at oras nung kapilan me tanggap ya ing transaksion</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Klase ning transaksion</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Kepuntalan a address ning transaksion</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Alagang milako o miragdag king balanse.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Eganagana</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Aldo iti</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>Paruminggung iti</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Bulan a iti</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Milabas a bulan</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Banuang iti</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Angganan...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Atanggap kayabe ning</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Mipadala kang</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Keng sarili mu</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Me-mina</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Aliwa</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Magpalub kang address o label para pantunan</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Pekaditak a alaga</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>Kopyan ing address</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>Kopyan ing label</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>Kopyan ing alaga</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>Alilan ing label</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation>Ipakit ing detalye ning transaksion</translation>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Comma separated file (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Me-kumpirma</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Kaaldauan</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Klase</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Label</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Address</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Alaga</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation>ID</translation>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Angga:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>para kang</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Magpadalang Barya</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Pamanggamit:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listahan dareng commands</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Maniauad saup para kareng command</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Pipamilian:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Pilinan ing configuration file(default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Pilinan ing pid file(default: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>Pilinan ing data directory</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Makiramdam king koneksion king &lt;port&gt;(default: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mag-maintain peka &lt;n&gt; koneksion keng peers (default: 125)</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Kumunekta king note ban ayakua mula reng peer address, at mako king panga konekta</translation>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation>Sabyan me ing kekang pampublikong address</translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Atin kamalian a milyari kabang ayusan ya ing RPC port %u para keng pamakiramdam king IPv4: %s</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>Tumanggap command line at JSON-RPC commands</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Gumana king gulut bilang daemon at tumanggap commands</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Gamitan ing test network</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Tumanggap koneksion menibat king kilwal (default: 1 if no -proxy or -connect)</translation>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Kapabaluan: Sobra ya katas ing makalage king -paytxfee. Ini ing maging bayad mu para king bayad na ning transaksion istung pepadala me ing transaksion a ini.</translation>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Kapabaluan: Maliaring pakilawe ing oras at aldo a makalage king kekayung kompyuter nung istu la! Istung ing oras yu mali ya ali ya gumanang masalese ing Bitcoin.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation>Pipamilian king pamag-gawang block:</translation>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation>Kumunekta mu king mepiling node(s)</translation>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation>Mekapansin lang me-corrupt a block database</translation>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Address</translation>
     </message>
     <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>I-discover ing sariling IP address (default: 1 istung makiramdam at -externalip)</translation>
+        <source>Open until %1</source>
+        <translation>Makabuklat anggang %1</translation>
     </message>
     <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Me-kumpirma(%1 kumpirmasion)</translation>
     </message>
     <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation>Buri meng buuan pasibayu ing block database ngene?</translation>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Ing block a ini ali de atanggap deng aliwa pang nodes ania ali ya magsilbing tanggapan</translation>
     </message>
     <message>
-        <source>Error initializing block database</source>
-        <translation>Kamalian king pamag-initialize king block na ning database</translation>
+        <source>Generated but not accepted</source>
+        <translation>Me-generate ya oneng ali ya metanggap</translation>
     </message>
     <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Atanggap kayabe ning</translation>
     </message>
     <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>Atanggap menibat kang</translation>
     </message>
     <message>
-        <source>Error opening block database</source>
-        <translation>Kamalian king pamag buklat king block database</translation>
+        <source>Sent to</source>
+        <translation>Mipadala kang</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Kamalian: Mababa ne ing espasyu king disk!</translation>
+        <source>Payment to yourself</source>
+        <translation>Kabayaran keka</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Me-mina</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation>Kamalian: kamalian na ning sistema:</translation>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Memali ya ing pamakiramdam kareng gang nanung port. Gamita me ini -listen=0 nung buri me ini.</translation>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Status ning Transaksion: Itapat me babo na ning field a ini ban ipakit dala reng bilang dareng me-kumpirma na</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation>Me-mali king pamagbasa king impormasion ning block</translation>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Aldo at oras nung kapilan me tanggap ya ing transaksion</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation>Me-mali king pamagbasa keng block</translation>
+        <source>Type of transaction.</source>
+        <translation>Klase ning transaksion</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation>Me-mali para i-sync ing block index</translation>
+        <source>Destination address of transaction.</source>
+        <translation>Kepuntalan a address ning transaksion</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation>Me-mali king pamanyulat king block index</translation>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Alagang milako o miragdag king balanse.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Failed to write block info</source>
-        <translation>Me-mali king pamanyulat king block info</translation>
+        <source>All</source>
+        <translation>Eganagana</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation>Me-mali king pamanyulat block</translation>
+        <source>Today</source>
+        <translation>Aldo iti</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation>Me-mali king pamanyulat king file info</translation>
+        <source>This week</source>
+        <translation>Paruminggung iti</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation>Me-mali king pamanyulat king coin database</translation>
+        <source>This month</source>
+        <translation>Bulan a iti</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation>Me-mali king pamanyulat king index ning transaksion</translation>
+        <source>Last month</source>
+        <translation>Milabas a bulan</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation>Me-mali king pamanyulat king undo data</translation>
+        <source>This year</source>
+        <translation>Banuang iti</translation>
     </message>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Angganan...</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Atanggap kayabe ning</translation>
     </message>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Mantun peers gamit ing pamamantun DNS (default: 1 unless -connect)</translation>
+        <source>Sent to</source>
+        <translation>Mipadala kang</translation>
     </message>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Keng sarili mu</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Me-mina</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Pilan la reng block a lawan keng umpisa (default: 288, 0 = all)</translation>
+        <source>Other</source>
+        <translation>Aliwa</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Magpalub kang address o label para pantunan</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Pekaditak a alaga</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Kopyan ing address</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Kopyan ing label</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Kopyan ing alaga</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Alilan ing label</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>Show transaction details</source>
+        <translation>Ipakit ing detalye ning transaksion</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Comma separated file (*.csv)</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Me-kumpirma</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Kaaldauan</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Klase</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Label</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Address</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Angga:</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>para kang</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Magpadalang Barya</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Pipamilian:</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Pilinan ing configuration file(default: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>Pilinan ing pid file(default: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Pilinan ing data directory</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Makiramdam king koneksion king &lt;port&gt;(default: 8333 o testnet: 18333)</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Mag-maintain peka &lt;n&gt; koneksion keng peers (default: 125)</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
+        <translation>Kumunekta king note ban ayakua mula reng peer address, at mako king panga konekta</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Specify your own public address</source>
+        <translation>Sabyan me ing kekang pampublikong address</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
+        <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
+        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Tumanggap command line at JSON-RPC commands</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>&amp;Impormasion</translation>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Gumana king gulut bilang daemon at tumanggap commands</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Gamitan ing test network</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
+        <translation>Tumanggap koneksion menibat king kilwal (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+        <translation>Kapabaluan: Sobra ya katas ing makalage king -paytxfee. Ini ing maging bayad mu para king bayad na ning transaksion istung pepadala me ing transaksion a ini.</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Block creation options:</source>
+        <translation>Pipamilian king pamag-gawang block:</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Connect only to the specified node(s)</source>
+        <translation>Kumunekta mu king mepiling node(s)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Corrupted block database detected</source>
+        <translation>Mekapansin lang me-corrupt a block database</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
+        <translation>I-discover ing sariling IP address (default: 1 istung makiramdam at -externalip)</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Do you want to rebuild the block database now?</source>
+        <translation>Buri meng buuan pasibayu ing block database ngene?</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Error initializing block database</source>
+        <translation>Kamalian king pamag-initialize king block na ning database</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Error opening block database</source>
+        <translation>Kamalian king pamag buklat king block database</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Error: Disk space is low!</source>
+        <translation>Kamalian: Mababa ne ing espasyu king disk!</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Error: system error: </source>
+        <translation>Kamalian: kamalian na ning sistema:</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
+        <translation>Memali ya ing pamakiramdam kareng gang nanung port. Gamita me ini -listen=0 nung buri me ini.</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block info</source>
+        <translation>Me-mali king pamagbasa king impormasion ning block</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Failed to read block</source>
+        <translation>Me-mali king pamagbasa keng block</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Failed to sync block index</source>
+        <translation>Me-mali para i-sync ing block index</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Pipamilian ning SSL: (lawen ye ing Bitcoin Wiki para king SSL setup instructions)</translation>
+        <source>Failed to write block index</source>
+        <translation>Me-mali king pamanyulat king block index</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Failed to write block info</source>
+        <translation>Me-mali king pamanyulat king block info</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Magpadalang trace/debug info okeng console kesa keng debug.log file</translation>
+        <source>Failed to write block</source>
+        <translation>Me-mali king pamanyulat block</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Ilage ing pekaditak a dagul na ning block king bytes (default: 0)</translation>
+        <source>Failed to write file info</source>
+        <translation>Me-mali king pamanyulat king file info</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Failed to write to coin database</source>
+        <translation>Me-mali king pamanyulat king coin database</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Failed to write transaction index</source>
+        <translation>Me-mali king pamanyulat king index ning transaksion</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Failed to write undo data</source>
+        <translation>Me-mali king pamanyulat king undo data</translation>
     </message>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
+        <translation>Pilan la reng block a lawan keng umpisa (default: 288, 0 = all)</translation>
     </message>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Information</source>
+        <translation>&amp;Impormasion</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>Magpadalang trace/debug info okeng console kesa keng debug.log file</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Set minimum block size in bytes (default: 0)</source>
+        <translation>Ilage ing pekaditak a dagul na ning block king bytes (default: 0)</translation>
     </message>
     <message>
         <source>System error: </source>
         <translation>Kamalian ning sistema:</translation>
     </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Maragul yang masiadu ing transaksion</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Username para king JSON-RPC koneksion</translation>
@@ -3209,34 +1546,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Kapabaluan: Ing bersioin a ini laus ne, kailangan nang mag-upgrade!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>bersion</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Password para king JSON-RPC koneksion</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Payagan ya i JSON-RPC koneksion para king metung a IP address</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Magpadalang command king node a gagana king &lt;ip&gt;(default: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>I-execute ing command istung mialilan ya ing best block (%s in cmd is replaced by block hash)</translation>
@@ -3269,10 +1582,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Ining saup a mensayi</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Ali ya magsilbing mag-bind keng %s kening kompyuter a ini (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Payagan ing pamaglawe DNS para king -addnode, -seednode and -connect</translation>
@@ -3285,41 +1594,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Me-mali ya ing pamag-load king wallet.dat: Me-corrupt ya ing wallet</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Me-mali ya ing pamag-load na ning wallet.dat: Ing wallet mangailangan yang bayung bersion na ning Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Ing wallet mangailangan yang misulat pasibayu: Umpisan yang pasibayu ing Bitcoin ban ma-kumpleto ya</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Me-mali ya ing pamag-load king wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ali katanggap-tanggap a -proxy addresss: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ali katanggap-tanggap a -proxy addresss: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>E kilalang network ing mepili king -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>E kilalang network ing mepili king -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>E kilalang -socks proxy version requested: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Eya me-resolve ing -bind address: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Eya me-resolve ing -bind address: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Eya me-resolve ing -externalip address: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Eya me-resolve ing -externalip address: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Eya maliari ing alaga keng -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Eya maliari ing alaga keng -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3365,13 +1662,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Mali</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Dapat meng ilage ing rpcpassword=&lt;password&gt; king configuration file:
-%s
-Nung ing file ala ya, gawa ka gamit ing owner-readable-only file permissions.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index 6bc177076b7a..7cf3d042a12d 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>O Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Wersja &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Oprogramowanie eksperymentalne.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Prawo autorskie</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Deweloperzy Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="pl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Błąd przy próbie eksportu</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Wystąpił błąd podczas próby zapisu listy adresów %1. Proszę spróbować ponownie</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Powtórz nowe hasło</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Wprowadź nowe hasło dla portfela.&lt;br/&gt;Proszę użyć hasła składającego się z &lt;b&gt;10 lub więcej losowych znaków&lt;/b&gt; lub &lt;b&gt;ośmiu lub więcej słów&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Zaszyfruj portfel</translation>
@@ -206,7 +165,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło to &lt;b&gt;STRACISZ WSZYSTKIE SWOJE BITCOIN&apos;Y&lt;/b&gt;!</translation>
+        <translation>Uwaga: Jeśli zaszyfrujesz swój portfel i zgubisz hasło to &lt;b&gt;STRACISZ WSZYSTKIE SWOJE BITCOIN'Y&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -273,7 +232,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Węzeł</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -295,10 +254,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Zamknij program</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Pokaż informację o Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>O &amp;Qt</translation>
@@ -335,6 +290,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>Otwórz URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Rdzeń klienta Bitcoin</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importowanie bloków z dysku...</translation>
@@ -387,6 +346,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>Odbie&amp;rz</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Pokaż informacje o Rdzeniu Bitcoin</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Pokaż / Ukryj</translation>
@@ -447,21 +410,13 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Pokaż listę użytych adresów odbiorczych i etykiety</translation>
     </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Opcje konsoli</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klient</translation>
+        <translation>Pokaż pomoc Rdzenia Bitcoin, aby zobaczyć listę wszystkich opcji linii poleceń</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -471,10 +426,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>Brak dostępnych źródeł bloków...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Przetworzono (w przybliżeniu) %1 z %2 bloków historii transakcji.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Pobrano %1 bloków z historią transakcji.</translation>
@@ -559,10 +510,6 @@ Adres: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;zablokowany&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Błąd krytyczny. Bitcoin nie może kontynuować bezpiecznie więc zostanie zamknięty.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -573,10 +520,6 @@ Adres: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Ilość:</translation>
@@ -597,10 +540,6 @@ Adres: %4
         <source>Fee:</source>
         <translation>Opłata:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po opłacie:</translation>
@@ -689,10 +628,6 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Skopiuj priorytet</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Skopiuj resztę</translation>
@@ -741,10 +676,6 @@ Adres: %4
         <source>none</source>
         <translation>żaden</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>yes</source>
         <translation>tak</translation>
@@ -770,25 +701,13 @@ Adres: %4
         <translation>Transakcje o wyższym priorytecie zostają szybciej dołączone do bloku.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Ta etykieta jest czerwona, jeżeli priorytet jest mniejszy niż &quot;średni&quot;</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Ta etykieta jest czerwona, jeżeli priorytet jest mniejszy niż "średni"</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Etykieta staje się czerwona kiedy którykolwiek odbiorca otrzymuje kwotę mniejszą niż %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Oznacza to, że wymagana jest opłata przynajmniej %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Etykieta staje się czerwona kiedy reszta jest mniejsza niż %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(bez etykiety)</translation>
@@ -841,12 +760,12 @@ Adres: %4
         <translation>Zmień adres wysyłania</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Wprowadzony adres &quot;%1&quot; już istnieje w książce adresowej.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Wprowadzony adres "%1" już istnieje w książce adresowej.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Wprowadzony adres &quot;%1&quot; nie jest poprawnym adresem Bitcoin.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Wprowadzony adres "%1" nie jest poprawnym adresem Bitcoin.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +801,6 @@ Adres: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Opcje konsoli</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Rdzeń BitCoin</translation>
@@ -894,6 +809,18 @@ Adres: %4
         <source>version</source>
         <translation>wersja</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>O Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opcje konsoli</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Użycie:</translation>
@@ -907,17 +834,13 @@ Adres: %4
         <translation>UI opcje</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Ustaw Język, na przykład &quot;pl_PL&quot; (domyślnie: systemowy)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Ustaw Język, na przykład "pl_PL" (domyślnie: systemowy)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Uruchom zminimalizowany</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Pokazuj okno powitalne przy starcie (domyślnie: 1)</translation>
@@ -954,12 +877,12 @@ Adres: %4
         <translation>Użyj wybranego folderu dla danych</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Rdzeń BitCoin</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Błąd: Określony folder danych &quot;%1&quot; nie mógł zostać utworzony.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Błąd: Określony folder danych "%1" nie mógł zostać utworzony.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -990,11 +913,11 @@ Adres: %4
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <translation>Otwórz żądanie zapłaty z pliku</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>Wybierz plik żądania zapłaty do otwarcia</translation>
     </message>
 </context>
 <context>
@@ -1023,41 +946,33 @@ Adres: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>Uruchamiaj Bitcoin wraz z zalogowaniem do &amp;systemu</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
+        <translation>Liczba wątków &amp;weryfikacji skryptu</translation>
     </message>
     <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
+        <source>Accept connections from outside</source>
+        <translation>Akceptuj połączenia z zewnątrz</translation>
     </message>
     <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
+        <source>Allow incoming connections</source>
+        <translation>Zezwól na połączenia przychodzące</translation>
     </message>
     <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation>Adres IP serwera proxy (np. IPv4: 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 type="unfinished"/>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>Połącz się z siecią Bitcoin poprzez SOCKS proxy.</translation>
     </message>
     <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>Adres IP serwera proxy (np. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
+        <translation>Aktywne opcje linii komend, które nadpisują powyższe opcje:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1071,10 +986,6 @@ Adres: %4
         <source>&amp;Network</source>
         <translation>&amp;Sieć</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>Portfel</translation>
@@ -1083,18 +994,6 @@ Adres: %4
         <source>Expert</source>
         <translation>Ekspert</translation>
     </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Automatycznie otwiera port klienta Bitcoin na routerze. Ta opcja dzieła tylko jeśli twój router wspiera UPnP i jest ono włączone.</translation>
@@ -1115,14 +1014,6 @@ Adres: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port proxy (np. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Wersja &amp;SOCKS</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS wersja serwera proxy (np. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Okno</translation>
@@ -1163,18 +1054,6 @@ Adres: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Wybierz podział jednostki pokazywany w interfejsie  oraz podczas wysyłania monet</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Pokazuj adresy Bitcoin na liście transakcji.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Wyświetlaj adresy w liście transakcji</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1274,8 +1153,8 @@ Adres: %4
         <translation>Obsługa URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI nie może zostać przetworzony! Prawdopodobnie błędny adres Bitcoin bądź nieprawidłowe parametry URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>błędny adres płatności %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,30 +1168,6 @@ Adres: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Nie można rozpocząć bitcoin: kliknij-by-zapłacić opiekunowi</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Twoje aktywne proxy nie obsługuje SOCKS5, co jest wymagane dla żądania płatności przez proxy.</translation>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Refund from %1</source>
         <translation>Zwrot z %1</translation>
@@ -1321,10 +1176,6 @@ Adres: %4
         <source>Error communicating with %1: %2</source>
         <translation>Błąd komunikacji z %1 : %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Błędna odpowiedź z serwera %1</translation>
@@ -1338,33 +1189,28 @@ Adres: %4
         <translation>Błąd żądania sieci</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Błąd: Określony folder danych &quot;%1&quot; nie istnieje.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Błąd: Nie można przetworzyć pliku konfiguracyjnego: %1. Używaj tylko składni klucz=wartość.</translation>
+        <source>Amount</source>
+        <translation>Kwota</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Błąd: Niepoprawna kombinacja -regtest i -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core jeszcze się nie wyłączył bezpiecznie…</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Wprowadź adres Bitcoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>NIEDOSTĘPNE</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1284,6 @@ Adres: %4
         <source>Current number of blocks</source>
         <translation>Aktualna liczba bloków</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Szacowana ilość bloków</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Czas ostatniego bloku</translation>
@@ -1518,19 +1360,7 @@ Adres: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1549,14 +1379,6 @@ Adres: %4
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Użyj jeden z poprzednio użytych adresów odbiorczych. Podczas ponownego używania adresów występują problemy z bezpieczeństwem i prywatnością. Nie korzystaj z tej opcji, chyba że odtwarzasz żądanie płatności wykonane już wcześniej.</translation>
     </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation>U%żyj ponownie istniejący adres odbiorczy (niepolecane)</translation>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Opcjonalna etykieta do skojarzenia z nowym adresem odbiorczym.</translation>
@@ -1565,10 +1387,6 @@ Adres: %4
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Użyj tego formularza do zażądania płatności. Wszystkie pola są &lt;b&gt;opcjonalne&lt;/b&gt;.</translation>
     </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Wyczyść pola formularza</translation>
@@ -1585,10 +1403,6 @@ Adres: %4
         <source>&amp;Request payment</source>
         <translation>&amp;Żądaj płatności</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>Pokaż</translation>
@@ -1706,10 +1520,6 @@ Adres: %4
         <source>Send Coins</source>
         <translation>Wyślij Monety</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Inputs...</source>
         <translation>Wejścia...</translation>
@@ -1742,10 +1552,6 @@ Adres: %4
         <source>Fee:</source>
         <translation>Opłata:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po opłacie:</translation>
@@ -1758,10 +1564,6 @@ Adres: %4
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Kiedy ta opcja jest wybrana, ale adres reszty jest pusty lub nieprawidłowy to reszta będzie wysyłana na adres nowo-wygenerowany.</translation>
     </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Wyślij do wielu odbiorców na raz</translation>
@@ -1822,10 +1624,6 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Skopiuj priorytet</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Skopiuj resztę</translation>
@@ -1886,14 +1684,6 @@ Adres: %4
         <source>added as transaction fee</source>
         <translation>dodano jako opłata transakcyjna</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Zażądanie płatności upłynęło</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>błędny adres płatności %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1695,6 @@ Adres: %4
         <source>Pay &amp;To:</source>
         <translation>Zapłać &amp;dla:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adres, na który wysłasz płatności (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Wprowadź etykietę dla tego adresu by dodać go do książki adresowej</translation>
@@ -1953,10 +1739,6 @@ Adres: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Wprowadź etykietę dla tego adresu by dodać go do listy użytych adresów</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>To żądanie zapłaty nie zostało zweryfikowane.</translation>
@@ -1995,10 +1777,6 @@ Adres: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Wprowadź adres Bitcoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Wybierz wcześniej użyty adres</translation>
@@ -2051,10 +1829,6 @@ Adres: %4
         <source>Enter the signing 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.</source>
         <translation>Wpisz adres podpisu, wiadomość (upewnij się, że dokładnie skopiujesz wszystkie zakończenia linii, spacje, tabulacje itp.) oraz podpis poniżej by sprawdzić wiadomość. Uważaj by nie dodać więcej do podpisu niż do samej podpisywanej wiadomości by uniknąć ataku man-in-the-middle (człowiek pośrodku)</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Wprowadź adres Bitcoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Zweryfikuj wiadomość,  aby upewnić się, że została podpisana odpowiednim adresem Bitcoin.</translation>
@@ -2068,12 +1842,8 @@ Adres: %4
         <translation>Resetuje wszystkie pola weryfikacji wiadomości</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Wprowadź adres Bitcoin (np. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Kliknij &quot;Podpisz Wiadomość&quot; żeby uzyskać podpis</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Kliknij "Podpisz Wiadomość" żeby uzyskać podpis</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2152,10 +1922,6 @@ Adres: %4
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
@@ -2245,8 +2011,8 @@ Adres: %4
         <translation>Kupiec</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Wygenerowane monety muszą dojrzeć przez %1 bloków zanim będzie można je wysłać. Gdy wygenerowałeś ten blok został on ogłoszony w sieci i dodany do łańcucha bloków. Jeżeli nie uda mu się wejść do łańcucha jego status zostanie zmieniony na &quot;nie zaakceptowano&quot; i nie będzie można go wydać. To czasem zdarza się gdy inny węzeł wygeneruje blok w kilka sekund od twojego.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Wygenerowane monety muszą dojrzeć przez %1 bloków zanim będzie można je wysłać. Gdy wygenerowałeś ten blok został on ogłoszony w sieci i dodany do łańcucha bloków. Jeżeli nie uda mu się wejść do łańcucha jego status zostanie zmieniony na "nie zaakceptowano" i nie będzie można go wydać. To czasem zdarza się gdy inny węzeł wygeneruje blok w kilka sekund od twojego.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,18 +2076,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kwota</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform>Otwórz dla %n następnych bloków</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
@@ -2350,10 +2104,6 @@ Adres: %4
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Potwierdzanie (%1 z %2 rekomendowanych potwierdzeń)</translation>
     </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Otrzymane przez</translation>
@@ -2525,10 +2275,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Kwota</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2288,9 @@ Adres: %4
         <translation>do</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2342,6 @@ Adres: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Użycie:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lista poleceń</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Uzyskaj pomoc do polecenia</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opcje:</translation>
@@ -2645,10 +2382,6 @@ Adres: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Nasłuchuj połączeń JSON-RPC na &lt;port&gt; (domyślnie: 8332 or testnet: 18332)</translation>
@@ -2657,10 +2390,6 @@ Adres: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akceptuj linię poleceń oraz polecenia JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Uruchom w tle jako daemon i przyjmuj polecenia</translation>
@@ -2683,7 +2412,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, musisz ustawić rpcpassword w pliku konfiguracyjnym:⏎
 %s⏎
@@ -2694,36 +2423,16 @@ rpcpassword=%s⏎
 Użytkownik i hasło nie mogą być takie same.⏎
 Jeśli plik nie istnieje, utwórz go z uprawnieniami tylko-do-odczytu dla właściciela.⏎
 Zalecane jest ustawienie alertnotify aby poinformować o problemach:⏎
-na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo.com⏎</translation>
+na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Dopuszczalne szyfry (domyślnie: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Wystąpił błąd podczas ustawiania portu RPC %u w tryb nasłuchu dla IPv6, korzystam z IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Skojarz z podanym adresem. Użyj formatu [host]:port dla IPv6 </translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Wejście w tryb testów regresji, który wykorzystuje specjalny łańcuch, w którym bloki można rozwiązać natychmiast. To jest przeznaczone dla narzędzi testowania regresji i rozwoju aplikacji.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Błąd: transakcja została odrzucona. Może się to zdarzyć, gdy monety z Twojego portfela zostały już wydane, na przykład gdy używałeś kopii wallet.dat i bitcoiny które tam wydałeś nie zostały jeszcze odjęte z portfela z którego teraz korzystasz.</translation>
@@ -2736,50 +2445,14 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>To jest testowa wersja - używaj na własne ryzyko - nie używaj do wykopywania oraz przy aplikacjach kupieckich</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Uwaga: Sprawdź czy data i czas na Twoim komputerze są prawidłowe! Jeśli nie to Bitcoin nie będzie działał prawidłowo.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Ostrzeżenie: Sieć nie wydaje się w pełni zgodna! Niektórzy górnicy wydają się doświadczać problemów.</translation>
@@ -2804,38 +2477,18 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>(default: wallet.dat)</source>
         <translation>(domyślnie: wallet.dat)</translation>
     </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opcje tworzenia bloku:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Wyczyść listę transakcji portfela (narzędzie diagnostyczne; implikuje -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Łącz tylko do wskazanego węzła</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Połącz przez SOCKS proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>podłącz do JSON-RPC na &lt;port&gt; (domyślnie: 8332 lub sieć testowa: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Opcje połączenia:</translation>
@@ -2848,10 +2501,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Debugging/Testing options:</source>
         <translation>Opcje debugowania/testowania:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation>
@@ -2936,21 +2585,9 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Failed to write undo data</source>
         <translation>Nie udało się zapisać danych odtwarzających</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Prowizja za kB dodawana do wysyłanej transakcji</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Opłaty mniejsze niż to są uznawane za nieistniejące (przy przekazywaniu) (domyślnie:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Wyszukaj połączenia wykorzystując zapytanie DNS (domyślnie 1 jeśli nie użyto -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Wymuś tryb bezpieczny (domyślnie: 0)</translation>
     </message>
     <message>
         <source>Generate coins (default: 0)</source>
@@ -2960,10 +2597,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Ile bloków sprawdzić przy starcie (domyślnie: 288, 0 = wszystkie)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Importowanie…</translation>
@@ -2973,29 +2606,17 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <translation>Nieprawidłowy lub brak bloku genezy. Błędny folder_danych dla sieci?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Nieprawidłowy adres -onion: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Nieprawidłowy adres -onion: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Brak wystarczającej liczby deskryptorów plików. </translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opcje klienta RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Odbuduj indeks łańcucha bloków z obecnych plików blk000??.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Wybierz wersję proxy SOCKS (4 lub 5, domyślnie 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Ustaw wielkość pamięci podręcznej w megabajtach (%d do %d, domyślnie: %d)</translation>
@@ -3016,14 +2637,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Spend unconfirmed change when sending transactions (default: 1)</source>
         <translation>Wydawaj niepotwierdzoną resztę podczas wysyłania transakcji (domyślnie: 1)</translation>
     </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Użycie (przestarzałe, użyj bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Weryfikacja bloków...</translation>
@@ -3032,10 +2645,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>Weryfikacja portfela...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Portfel %s znajduje się poza folderem danych %s</translation>
@@ -3044,10 +2653,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Opcje portfela:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Musisz przebudować bazę używając parametru -reindex aby zmienić -txindex</translation>
@@ -3058,35 +2663,27 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <translation>Nie można uzyskać blokady na katalogu z danymi %s. Rdzeń Bitcoin najprawdopodobniej jest już uruchomiony.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Uruchom polecenie przy otrzymaniu odpowiedniego powiadomienia lub gdy zobaczymy naprawdę długie rozgałęzienie (%s w poleceniu jest podstawiane za komunikat)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation>Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: 27000)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informacja</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nieprawidłowa kwota dla -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nieprawidłowa kwota dla -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nieprawidłowa kwota dla -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nieprawidłowa kwota dla -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <translation>Ogranicz rozmiar pamięci podręcznej sygnatur do &lt;n&gt; wpisów (domyslnie: 50000)</translation>
     </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
@@ -3104,6 +2701,10 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maksymalny bufor wysyłu na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: 1000)</translation>
     </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Opcje przekaźnikowe węzła:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Akceptuj tylko łańcuch bloków zgodny z wbudowanymi punktami kontrolnymi (domyślnie: 1)</translation>
@@ -3118,11 +2719,11 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Wypisz drzewo bloków podczas uruchomienia (domyślnie: 0)</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <translation>Opcje RPC SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
@@ -3134,20 +2735,12 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <translation>Losowo ignoruje 1 z wszystkich &lt;n&gt; wiadomości sieciowych.</translation>
     </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Uruchom wątek do okresowego zapisywania portfela (domyślnie: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opcje SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Wyślij komendę do Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation>
@@ -3156,17 +2749,9 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Pokaż wszystkie opcje odpluskwiania (użycie: --help -help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
@@ -3180,14 +2765,14 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Uruchom serwer Bitcoin Core</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Błąd systemu:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>To oprogramowanie eksperymentalne.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Zbyt niska kwota transakcji </translation>
@@ -3212,6 +2797,10 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Username for JSON-RPC connections</source>
         <translation>Nazwa użytkownika dla połączeń JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Portfel wymaga przepisania: zresetuj Bitcoina aby ukończyć</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Ostrzeżenie</translation>
@@ -3220,18 +2809,10 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>on startup</source>
         <translation>podczas uruchamiania</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>wersja</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat uszkodzony, odtworzenie się nie powiodło</translation>
@@ -3240,14 +2821,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Password for JSON-RPC connections</source>
         <translation>Hasło do połączeń JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Przyjmuj połączenia JSON-RPC ze wskazanego adresu IP</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Wysyłaj polecenia do węzła działającego na &lt;ip&gt; (domyślnie: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku)</translation>
@@ -3280,10 +2853,6 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>This help message</source>
         <translation>Ta wiadomość pomocy</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nie można przywiązać %s na tym komputerze (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Zezwól -addnode, -seednode i -connect na łączenie się z serwerem DNS</translation>
@@ -3296,41 +2865,29 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Błąd ładowania wallet.dat: Uszkodzony portfel</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Błąd ładowania wallet.dat: Portfel wymaga nowszej wersji Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Portfel wymaga przepisania: zrestartuj Bitcoina żeby ukończyć</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Błąd ładowania wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Nieprawidłowy adres -proxy: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Nieznana sieć w -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Nieprawidłowy adres -proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Nieznana wersja proxy w -socks: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Nieznana sieć w -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nie można uzyskać adresu -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nie można uzyskać adresu -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nie można uzyskać adresu -externalip: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nie można uzyskać adresu -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +2933,5 @@ na przykład: alertnotify=echo %%s | mail -s &quot;Alarm Bitcoin&quot; admin@foo
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Musisz ustawić rpcpassword=&lt;hasło&gt; w pliku configuracyjnym:
-%s
-Jeżeli plik nie istnieje, utwórz go z uprawnieniami właściciela-tylko-do-odczytu.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index ee1c2a7381d3..0cdb7d669414 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Sobre o Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>versão do &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>⏎
-Este é um software experimental.⏎
-⏎
-Distribuido sob a licença de software MIT/X11, veja o arquivo anexo COPYING ou http://www.opensource.org/licenses/mit-license.php.⏎
-⏎
-Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software de criptografia escrito por Eric Young (eay@cryptsoft.com) e sofware UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Programadores do Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="pt_BR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <translation>Exportação Falhou</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Ocorreu um erro ao tentar salvar a lista de endereço em %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Ocorreu um erro ao tentar salvar a lista de endereço em %1.. Por favor tente novamente.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>Repeat new passphrase</source>
         <translation>Repita a nova frase de segurança</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Digite a nova frase de seguraça da sua carteira. &lt;br/&gt; Por favor, use uma frase de &lt;b&gt;10 ou mais caracteres aleatórios,&lt;/b&gt; ou &lt;b&gt;oito ou mais palavras.&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Criptografar carteira</translation>
@@ -224,6 +183,10 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>Wallet encrypted</source>
         <translation>Carteira criptografada</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Digite a nova senha da carteira. &lt;br/&gt;Por favor utilize uma senha com &lt;b&gt;dez ou mais caracteres aleartórios&lt;/b&gt;, ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>O Bitcoin irá fechar agora para finalizar o processo de encriptação. Lembre-se de que encriptar sua carteira não protege totalmente suas bitcoins de serem roubadas por malwares que tenham infectado o seu computador.</translation>
@@ -295,10 +258,6 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>Quit application</source>
         <translation>Sair da aplicação</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar informação sobre Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Sobre &amp;Qt</translation>
@@ -335,6 +294,10 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>Open &amp;URI...</source>
         <translation>Abrir &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Cliente Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importando blocos do disco...</translation>
@@ -387,6 +350,10 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>&amp;Receive</source>
         <translation>&amp;Receber</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostrar informações sobre Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Exibir/Ocultar</translation>
@@ -459,10 +426,6 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Mostra a mensagem de ajuda do Bitcoin Core para pegar a lista com os comandos possíveis</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexão ativa na rede Bitcoin</numerusform><numerusform>%n conexões ativas na rede Bitcoin</numerusform></translation>
@@ -471,10 +434,6 @@ Este produto inclui software desenvolvido pelo Projeto OpenSSL para uso no OpenS
         <source>No block source available...</source>
         <translation>Nenhum servidor disponível...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Processado %1 de %2 blocos (estimado) de histórico de transações.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Processado %1 blocos do histórico de transações.</translation>
@@ -558,10 +517,6 @@ Endereço: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Carteira está &lt;b&gt;criptografada&lt;/b&gt; e atualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Um erro fatal ocorreu. Bitcoin não pode continuar em segurança e irá fechar.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,8 +552,8 @@ Endereço: %4</translation>
         <translation>Taxa:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Rendimento baixo:</translation>
+        <source>Dust:</source>
+        <translation>Poeira:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -689,8 +644,8 @@ Endereço: %4</translation>
         <translation>Copia prioridade</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Copia saída de pouco valor</translation>
+        <source>Copy dust</source>
+        <translation>Copiar poeira</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -741,8 +696,8 @@ Endereço: %4</translation>
         <translation>nenhum</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Sujeira</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Pode variar +/- %1 satoshi(s) por entrada.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -769,25 +724,13 @@ Endereço: %4</translation>
         <translation>Transações de alta prioridade são mais propensas a serem incluídas em um bloco.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Esse marcador fica vermelho se a prioridade for menor que &quot;média&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Esse marcador fica vermelho se a prioridade for menor que "média".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Esse marcador fica vermelho se qualquer destinatário receber uma quantia menor que %1</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Isso significa que uma taxa de pelo menos %1 é necessária.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Quantias abaixo de 0,546 multiplicado pela taxa mínima é mostrada como sujeira.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Esse marcador fica vermelho se o troco for menor que %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(Sem rótulo)</translation>
@@ -840,12 +783,12 @@ Endereço: %4</translation>
         <translation>Editar endereço de envio</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>O endereço digitado &quot;%1&quot; já se encontra no catálogo de endereços.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>O endereço digitado "%1" já se encontra no catálogo de endereços.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>O endereço digitado &quot;%1&quot; não é um endereço Bitcoin válido.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>O endereço digitado "%1" não é um endereço Bitcoin válido.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -881,10 +824,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Opções de linha de comando</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Núcleo Bitcoin</translation>
@@ -893,6 +832,18 @@ Endereço: %4</translation>
         <source>version</source>
         <translation>versão</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Sobre o Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opções da linha de comando</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uso:</translation>
@@ -906,8 +857,8 @@ Endereço: %4</translation>
         <translation>opções da UI</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Escolher língua, por exemplo &quot;de_DE&quot; (padrão: localização do sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Escolher língua, por exemplo "de_DE" (padrão: localização do sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -953,12 +904,12 @@ Endereço: %4</translation>
         <translation>Use um diretório de dados personalizado:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Núcleo Bitcoin</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Erro: dados especificados diretório &quot;% 1&quot; não pode ser criado.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Erro: Diretório de dados "%1" não pode ser criado.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -970,7 +921,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation>(Mais de 1GB necessário)</translation>
+        <translation>(Mais de %1GB necessário)</translation>
     </message>
 </context>
 <context>
@@ -1034,6 +985,14 @@ Endereço: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Número de threads do script de &amp;verificação</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Aceitar conexões externas</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permitir conexões de entrada</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Conectado na rede do Bitcoin através de proxy SOCKS.</translation>
@@ -1048,11 +1007,11 @@ Endereço: %4</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 type="unfinished"/>
+        <translation>URLs de terceiros (exemplo: explorador de blocos) que aparecem na aba de transações como itens do menu de contexto. %s na URL é substituido pela hash da transação. Múltiplas URLs são separadas pela barra vertical |.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
+        <translation>URLs da transação de terceiros</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1114,14 +1073,6 @@ Endereço: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta do serviço de proxy (ex. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Versão do SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versão do proxy SOCKS (ex. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Janela</translation>
@@ -1162,14 +1113,6 @@ Endereço: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Escolha a unidade padrão de subdivisão para interface mostrar quando enviar bitcoins.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Mostrar ou não endereços Bitcoin na lista de transações.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Mostrar en&amp;dereços na lista de transações</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Mostrar ou não opções de controle da moeda.</translation>
@@ -1225,6 +1168,10 @@ Endereço: %4</translation>
         <source>Wallet</source>
         <translation>Carteira</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Apenas visualizar:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Disponível:</translation>
@@ -1257,6 +1204,10 @@ Endereço: %4</translation>
         <source>Your current total balance</source>
         <translation>Seu saldo total atual</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Sua balança atual em endereços apenas visualizados</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Transações recentes&lt;/b&gt;</translation>
@@ -1273,12 +1224,20 @@ Endereço: %4</translation>
         <translation>Manipulação de URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI não pode ser decodificado! Isso pode ter sido causado por um endereço Bitcoin inválido ou por parâmetros URI malformados.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Endereço de pagamento inválido %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Solicitação de pagamento rejeitada</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Solicitação de pagamento expirou.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Valor do pagamento solicitado de 1% é muito pequeno (Considerado poeira).</translation>
+        <translation>Valor do pagamento solicitado de %1 é muito pequeno (Considerado poeira).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1288,14 +1247,6 @@ Endereço: %4</translation>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Não foi possível iniciar bitcoin: manipulador clique-para-pagar</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Gerenciador de rede problemático</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Seu proxy ativo não suporta SOCKS5, que é obrigatório para cobranças via proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL de cobrança é inválida: %1</translation>
@@ -1304,29 +1255,21 @@ Endereço: %4</translation>
         <source>Payment request file handling</source>
         <translation>Manipulação de arquivo de cobrança</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Arquivo de cobrança não pôde ser lido ou processado! Isso pode ter sido causado por um arquivo de cobrança inválido.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Cobrança não verificada para scripts de pagamento personalizados não é suportado.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation>Reembolso de 1%</translation>
+        <translation>Reembolso de %1</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
-        <translation>Erro na comunicação com% 1:% 2</translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Cobrança não pôde ser processada!</translation>
+        <translation>Erro na comunicação com %1: %2</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation>Resposta ruim do servidor% 1</translation>
+        <translation>Resposta incorreta do servidor %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
@@ -1337,31 +1280,54 @@ Endereço: %4</translation>
         <translation>Erro de solicitação de rede</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Quantidade</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erro: diretório de dados especificado &quot;% 1&quot; não existe.</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Informe um endereço Bitcoin (ex: %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Erro: Não foi possível interpretar arquivo de configuração: %1. Utilize apenas a sintaxe chave=valor.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erro: Combinação inválida de-regtest e testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>NETWORK</source>
+        <translation>REDE</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Digite um endereço Bitcoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>UNKNOWN</source>
+        <translation>DESCONHECIDO</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Nenhum</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>N/A</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1438,8 +1404,24 @@ Endereço: %4</translation>
         <translation>Quantidade atual de blocos</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Total estimado de blocos</translation>
+        <source>Received</source>
+        <translation>Recebido</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviado</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Pares</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versão</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Serviços</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1475,7 +1457,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Build date</source>
-        <translation>Data do &apos;build&apos;</translation>
+        <translation>Data do 'build'</translation>
     </message>
     <message>
         <source>Debug log file</source>
@@ -1503,11 +1485,11 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>%1 B</source>
-        <translation>1% B</translation>
+        <translation>%1 B</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation>1% KB</translation>
+        <translation>%1 KB</translation>
     </message>
     <message>
         <source>%1 MB</source>
@@ -1518,18 +1500,34 @@ Endereço: %4</translation>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>por %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>nunca</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>Inbound</source>
+        <translation>Entrada</translation>
     </message>
-</context>
+    <message>
+        <source>Outbound</source>
+        <translation>Saída</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Sim</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Não</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconhecido</translation>
+    </message>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1741,10 +1739,6 @@ Endereço: %4</translation>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Rendimento baixo:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Depois da taxa:</translation>
@@ -1773,6 +1767,10 @@ Endereço: %4</translation>
         <source>Clear all fields of the form.</source>
         <translation>Limpar todos os campos do formulário.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Poeira:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Limpar Tudo</translation>
@@ -1821,10 +1819,6 @@ Endereço: %4</translation>
         <source>Copy priority</source>
         <translation>Copia prioridade</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copia saída de pouco valor</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copia alteração</translation>
@@ -1877,6 +1871,10 @@ Endereço: %4</translation>
         <source>Warning: Unknown change address</source>
         <translation>Atenção: endereço de troco desconhecido</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiar poeira</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Tem certeza que quer enviar?</translation>
@@ -1885,14 +1883,6 @@ Endereço: %4</translation>
         <source>added as transaction fee</source>
         <translation>Adicionado como taxa de transação</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Pedido de pagamento expirado</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Endereço de pagamento inválido %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1904,10 +1894,6 @@ Endereço: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>Pagar &amp;Para:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>O endereço para onde enviar o pagamento (ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Digite um rótulo para este endereço para adicioná-lo ao catálogo de endereços</translation>
@@ -1994,10 +1980,6 @@ Endereço: %4</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Você pode assinar mensagens com seus endereços para provar que você é o dono deles. Seja cuidadoso para não assinar algo vago, pois ataques de pishing podem tentar te enganar para dar sua assinatura de identidade para eles. Apenas assine afirmações completamente detalhadas com as quais você concorda.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Endereço a ser usado para assinar a mensagem (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escolha um endereço usado anteriormente</translation>
@@ -2048,11 +2030,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Forneça o endereço da assinatura, a mensagem (se assegure que você copiou quebras de linha, espaços, tabs, etc. exatamente) e a assinatura abaixo para verificar a mensagem. Cuidado para não ler mais na assinatura do que está escrito na mensagem propriamente, para evitar ser vítima de uma ataque do tipo &quot;man-in-the-middle&quot;.</translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>O endereço usado para assinar a mensagem (ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Forneça o endereço da assinatura, a mensagem (se assegure que você copiou quebras de linha, espaços, tabs, etc. exatamente) e a assinatura abaixo para verificar a mensagem. Cuidado para não ler mais na assinatura do que está escrito na mensagem propriamente, para evitar ser vítima de uma ataque do tipo "man-in-the-middle".</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2060,19 +2038,15 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation>Verificar %Mensagem</translation>
+        <translation>Verificar &amp;Mensagem</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
         <translation>Limpar todos os campos de assinatura da mensagem</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Digite um endereço Bitcoin (exemplo: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Clique em &quot;Assinar Mensagem&quot; para gerar a assinatura</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Clique em "Assinar Mensagem" para gerar a assinatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2112,7 +2086,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>A assinatura não corresponde ao &quot;resumo da mensagem&quot;.</translation>
+        <translation>A assinatura não corresponde ao "resumo da mensagem".</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -2244,8 +2218,8 @@ Endereço: %4</translation>
         <translation>Mercador</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Bitcoins recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à cadeia de blocos: blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para &quot;não aceito&quot; e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Bitcoins recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à cadeia de blocos: blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para "não aceito" e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2309,10 +2283,6 @@ Endereço: %4</translation>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantidade</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Recém-criado (%1 confirmações, disponível somente após %2)</translation>
@@ -2524,10 +2494,6 @@ Endereço: %4</translation>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantidade</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,6 +2507,9 @@ Endereço: %4</translation>
         <translation>para</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2592,18 +2561,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lista de comandos</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Obtenha ajuda sobre um comando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opções:</translation>
@@ -2644,10 +2601,6 @@ Endereço: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Número de segundos para impedir que peers mal comportados reconectem (padrão: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Um erro ocorreu ao configurar a porta RPC %u para escuta em IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Escutar conexões JSON-RPC na porta &lt;porta&gt; (padrão: 8332 ou testnet: 18332)</translation>
@@ -2656,10 +2609,6 @@ Endereço: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar linha de comando e comandos JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Versão do cliente Bitcoin Core RPC</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Rodar em segundo plano como serviço e aceitar comandos</translation>
@@ -2682,7 +2631,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, você deve especificar uma senha rpcpassword no arquivo de configuração:⏎
 %s⏎
@@ -2693,17 +2642,13 @@ rpcpassword=%s⏎
 O nome de usuário e a senha NÃO PODEM ser os mesmos.⏎
 Se o arquivo não existir, crie um com permissão de leitura apenas para o dono.⏎
 É recomendado também definir um alertnotify para que você seja notificado de problemas;⏎
-por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com⏎
+por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Codificadores aceitos (padrão: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Um erro ocorreu ao configurar a porta RPC %u para escuta em IPv6, voltando ao IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular ao endereço fornecido e sempre escutar nele. Use a notação [host]:port para IPv6</translation>
@@ -2712,18 +2657,10 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Restringe a taxa de transações gratuitas para &lt;n&gt;*1000 bytes por minuto (padrão:15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entre em modo de teste de regressão, que utiliza uma cadeia especial em que os blocos podem ser resolvido imediatamente. Este destina-se a ferramentas de teste de regressão e de desenvolvimento de aplicativos.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra no modo de teste de regressão, que usa uma cadeia especial onde os blocos podem ser resolvidos instantaneamente.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Erro: Falha ao tentar aguardar conexões de entrada (erro retornado %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Erro: A transação foi rejeitada. Isso pode acontecer se alguns dos bitcoins de sua carteira já haviam sido gastos, por exemplo se você usou uma cópia do arquivo wallet.dat e alguns bitcoins foram gastos na cópia mas não foram marcados como gastos aqui.</translation>
@@ -2736,10 +2673,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando uma transação da carteira mudar (%s no comando será substituído por TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Taxas menores que esta são consideradas taxa zero (para criação da transação) (padrão:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Descarrega a atividade do banco de dados da memória para log em disco a cada &lt;n&gt; megabytes (padrão: 100)</translation>
@@ -2776,10 +2709,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atenção: valor de -paytxfee escolhido é muito alto! Este é o valor da taxa de transação que você irá pagar se enviar a transação.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Atenção: Por favor, verifique que a data e hora do seu computador estão corretas! Se o seu relógio estiver errado, o Bitcoin não irá funcionar corretamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Atenção: A rede não parecem concordar plenamente! Alguns mineiros parecem estar enfrentando problemas.</translation>
@@ -2812,30 +2741,14 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tentar recuperar chaves privadas de um arquivo wallet.dat corrompido</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core Daemon</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opções de criação de blocos:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Limpa a lista de transações da carteira (ferramenta de diagnóstico; implica -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conectar apenas a nó(s) específico(s)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Conecta através de proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Conectar-se ao JSON-RPC em &lt;port&gt; (padrão: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Opções de conexão:</translation>
@@ -2936,18 +2849,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Falha ao escrever dados para desfazer ações</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Taxa por kB para adicionar às transações que você envia</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Taxas menores que esta são consideradas taxa zero (para relay) (padrão:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Procurar pares usando consulta de DNS (padrão: 1 a menos que a opção -connect esteja presente)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Força modo seguro (padrão: 0)</translation>
@@ -2973,8 +2874,8 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Bloco gênese incorreto ou não encontrado. Datadir errado para a rede?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Endereço -onion inválido: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Endereço -onion inválido: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2984,18 +2885,10 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Adiciona timestamp como prefixo no debug (padrão: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opções de cliente RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir índice de blockchain a partir dos arquivos atuais blk000??.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Seleciona versão SOCKS para -proxy (4 ou 5, padrão: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Define o tamanho do cache do banco de dados em megabytes (%d para %d, padrão: %d)</translation>
@@ -3017,12 +2910,12 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Permite gastar troco não confirmado ao criar transações (padrão: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Isso é usado para testes de regressão e ferramentas de desenvolvimento.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Parar de executar após importar blocos do disco (padrão: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Exemplo de uso (obsoleto, use bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Isso é usado para testes de regressão e ferramentas de desenvolvimento.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3032,22 +2925,14 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Verificando carteira...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Aguarde um servidor RPC para iniciar</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation>Carteira de% s reside fora de dados do diretório% s</translation>
+        <translation>Carteira %s reside fora do diretório de dados %s</translation>
     </message>
     <message>
         <source>Wallet options:</source>
         <translation>Opções da Carteira:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Atenção: Parâmetro obsoleto -debugnet foi ignorado, use -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Você precisa reconstruir o banco de dados utilizando-reindexar a mudar-txindex</translation>
@@ -3056,13 +2941,33 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importar blocos de um arquivo externo blk000??.dat</translation>
     </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Um erro ocorreu enquanto configurando o endereço RPC %s porta %u para escuta: %s</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Não foi possível obter proteção exclusiva ao diretório de dados %s. Bitcoin Core já está sendo executado provavelmente.</translation>
     </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Erro: Escutar por conexões de entrada falhou (escutar retornou erro %s)</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Executa comando quando uma transação da rede gasta novamente uma transação de entrada da carteira (%s=TxID do gasto duplo, %t=TxID da Carteira)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Executa o comando quando um alerta relevante é recebido ou vemos um longo garfo (% s em cmd é substituída pela mensagem)</translation>
+        <translation>Executa o comando quando um alerta relevante é recebido ou vemos uma longa segregação (%s em cmd é substituído pela mensagem)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Taxas (em BTC/Kb) menores do que este valor são consideradas inexistentes para divulgação (padrão: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Taxas (em BTC/Kb) menores do que este valor são consideradas inexistentes para a criação da transação (padrão: %s)</translation>
     </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
@@ -3072,17 +2977,49 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Define o tamanho máximo de alta-prioridade por taxa baixa nas transações em bytes (padrão: %d)</translation>
     </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Impossível resolver endereço -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Desenvolvedores Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Impossível interpretar o valor -rpcbind %s como um endereço da rede</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Taxa (em BTC/kB) a adicionar nas transações que você envia (padrão: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Incluir endereços IP na saída de depuração (padrão: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informação</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantidade inválida para -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantidade inválida para -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Valor inválido para -mintxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Valor inválido para -paytxfee=&lt;amount&gt;: '%s' (precisa ser no mínimo %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Máscara de rede especificada em -whitelist: '%s' é inválida</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Inválido montante for-mintxfee = &lt;amount&gt;: &apos;% s&apos;</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Manter no máximo &lt;n&gt; blocos pendentes em memória (padrão: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3104,6 +3041,10 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Buffer máximo de envio por conexão, &lt;n&gt;*1000 bytes (padrão: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Necessário informar uma porta com -whitebind: '%s'</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Apenas aceitar cadeia de blocos correspondente a marcas de verificação internas (padrão: 1)</translation>
@@ -3140,14 +3081,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Executa uma thread para limpar a carteira periodicamente (padrão: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opções SSL: (veja a Wiki do Bitcoin para instruções de configuração SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Enviar comando ao Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Mandar informação de trace/debug para o console em vez de para o arquivo debug.log</translation>
@@ -3164,10 +3097,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Exibir todas opções de debug (uso: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Exibir informação de benchmark (padrão: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Encolher arquivo debug.log ao iniciar o cliente (padrão 1 se opção -debug não estiver presente)</translation>
@@ -3180,14 +3109,14 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especifique o tempo limite (timeout) da conexão em milissegundos (padrão: 5000) </translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Inicializar serviço Bitcoin Core</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Erro de sistema:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Este é um software experimental.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Quantidade da transação muito pequena.</translation>
@@ -3200,6 +3129,10 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Transação muito larga</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Impossível se ligar a %s neste computador (bind retornou erro %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Usar UPnP para mapear porta de escuta (padrão: 0)</translation>
@@ -3228,10 +3161,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>on startup</source>
         <translation>ao iniciar</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versão</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompido, recuperação falhou</translation>
@@ -3240,14 +3169,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Senha para conexões JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir conexões JSON-RPC de endereços IP específicos</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comando para nó rodando em &lt;ip&gt; (padrão: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Executar comando quando o melhor bloco mudar (%s no comando será substituído pelo hash do bloco)</translation>
@@ -3280,10 +3201,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Esta mensagem de ajuda</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Impossível vincular a %s neste computador (bind retornou erro %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir consultas DNS para -addnode, -seednode e -connect</translation>
@@ -3296,41 +3213,29 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erro ao carregar wallet.dat: Carteira corrompida</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Erro ao carregar wallet.dat: Carteira requer uma versão mais nova do Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>A Carteira precisou ser reescrita: reinicie o Bitcoin para completar</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erro ao carregar wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Endereço -proxy inválido: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Rede desconhecida especificada em -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Endereço -proxy inválido: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versão desconhecida do proxy -socks requisitada: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Rede desconhecida especificada em -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Impossível encontrar o endereço -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Impossível encontrar o endereço -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Impossível encontrar endereço -externalip: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Impossível encontrar endereço -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantidade inválida para -paytxfee=&lt;quantidade&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantidade inválida para -paytxfee=&lt;quantidade&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3376,13 +3281,5 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Você precisa especificar rpcpassword=&lt;senha&gt; no arquivo de configurações:⏎
-%s⏎
-Se o arquivo não existir, crie um com permissão de leitura apenas pelo dono</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 7a9595a6ddb7..2d277528b1bf 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Sobre o Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>versão do &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este é um programa experimental.
-
-Distribuído sob uma licença de software MIT/X11, por favor verifique o ficheiro anexo license.txt ou http://www.opensource.org/licenses/mit-license.php.
-
-Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por Eric Young (eay@cryptsoft.com) e software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Os programadores Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="pt_PT" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
         <source>Exporting Failed</source>
         <translation>A Exportação Falhou</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Ocorreu um erro ao tentar guardar a lista de endereços em %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
         <source>Repeat new passphrase</source>
         <translation>Repita a nova frase de segurança</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Insira a nova frase de segurança da sua carteira.&lt;br/&gt;Por favor, use uma frase de &lt;b&gt;10 ou mais caracteres aleatórios,&lt;/b&gt; ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Encriptar carteira</translation>
@@ -295,10 +250,6 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
         <source>Quit application</source>
         <translation>Sair da aplicação</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Mostrar informação sobre o Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Sobre &amp;Qt</translation>
@@ -459,10 +410,6 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Mostrar a mensagem de ajuda do Bitcoin Core para obter uma lista com possíveis opções de linha de comandos</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Cliente Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ligação ativa à rede Bitcoin</numerusform><numerusform>%n ligações ativas à rede Bitcoin</numerusform></translation>
@@ -471,10 +418,6 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
         <source>No block source available...</source>
         <translation>Nenhuma fonte de blocos disponível...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Processados %1 de %2 blocos (estimados) do histórico de transacções.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Processados %1 blocos do histórico de transações.</translation>
@@ -558,10 +501,6 @@ Endereço: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>A carteira está &lt;b&gt;encriptada&lt;/b&gt; e atualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ocorreu um erro fatal. O Bitcoin não pode continuar com segurança e irá fechar.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -596,10 +535,6 @@ Endereço: %4</translation>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Saída Baixa:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Depois da Taxa:</translation>
@@ -688,10 +623,6 @@ Endereço: %4</translation>
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiar output baixo</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar alteração</translation>
@@ -740,10 +671,6 @@ Endereço: %4</translation>
         <source>none</source>
         <translation>nenhum</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Pó</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>sim</translation>
@@ -769,25 +696,13 @@ Endereço: %4</translation>
         <translation>Transacções com uma prioridade mais alta têm uma maior probabilidade de serem incluídas num bloco.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Esta legenda fica vermelha, se a prioridade for menor que &quot;média&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Esta legenda fica vermelha, se a prioridade for menor que "média".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Este rótulo fica vermelho se algum recipiente receber uma quantia menor que %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Isto significa que uma taxa de pelo menos %1 é necessária.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Quantias abaixo de 0.546 vezes a taxa mínima de retransmissão são mostradas como &quot;pó&quot;.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Esta legenda fica vermelha, se o troco for menor do que %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(sem rótulo)</translation>
@@ -840,12 +755,12 @@ Endereço: %4</translation>
         <translation>Editar endereço de saída</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>O endereço introduzido &quot;%1&quot; já se encontra no livro de endereços.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>O endereço introduzido "%1" já se encontra no livro de endereços.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>O endereço introduzido &quot;%1&quot; não é um endereço bitcoin válido.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>O endereço introduzido "%1" não é um endereço bitcoin válido.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -881,10 +796,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Opções de linha de comandos</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -893,6 +804,14 @@ Endereço: %4</translation>
         <source>version</source>
         <translation>versão</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Sobre o Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opções de linha de comandos</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Utilização:</translation>
@@ -906,17 +825,13 @@ Endereço: %4</translation>
         <translation>Opções de Interface</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Definir linguagem, por exemplo &quot;pt_PT&quot; (por defeito: linguagem do sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Definir linguagem, por exemplo "pt_PT" (por defeito: linguagem do sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Iniciar minimizado</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar imagem ao iniciar (por defeito: 1)</translation>
@@ -942,7 +857,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>O Bitcoin Core vai transferir e armazenar uma cópia do &quot;block chain&quot; (cadeia de blocos). Pelo menos %1GB de dados serão armazenados nesta pasta, e vão crescer ao longo do tempo. A sua carteira também irá ser armazenada nesta pasta.</translation>
+        <translation>O Bitcoin Core vai transferir e armazenar uma cópia do "block chain" (cadeia de blocos). Pelo menos %1GB de dados serão armazenados nesta pasta, e vão crescer ao longo do tempo. A sua carteira também irá ser armazenada nesta pasta.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -953,12 +868,8 @@ Endereço: %4</translation>
         <translation>Utilizar uma pasta de dados personalizada:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Erro: Pasta de dados especificada &quot;%1&quot; não pôde ser criada.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1046,14 +957,6 @@ Endereço: %4</translation>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço IP do proxy (p.ex. IPv4: 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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Opções de linha de comandos ativas que se sobrepõem ás opções anteriores:</translation>
@@ -1070,10 +973,6 @@ Endereço: %4</translation>
         <source>&amp;Network</source>
         <translation>&amp;Rede</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>C&amp;arteira</translation>
@@ -1114,14 +1013,6 @@ Endereço: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta do proxy (p.ex. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Versão SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versão do proxy SOCKS (p.ex. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Janela</translation>
@@ -1162,14 +1053,6 @@ Endereço: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Escolha a subdivisão unitária a ser mostrada por defeito na aplicação e ao enviar moedas.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Se mostrar, ou não, os endereços Bitcoin na lista de transações.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Mostrar en&amp;dereços na lista de transações</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Escolha para mostrar funcionalidades de Coin Control ou não.</translation>
@@ -1273,12 +1156,12 @@ Endereço: %4</translation>
         <translation>Manuseamento de URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>O URI não foi lido correctamente! Isto pode ser causado por um endereço Bitcoin inválido ou por parâmetros URI malformados.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Endereço de pagamento inválido %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Quantia solicitada para pagamento de %1 é muito pequena (considerada &quot;pó&quot;).</translation>
+        <translation>Quantia solicitada para pagamento de %1 é muito pequena (considerada "pó").</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1288,14 +1171,6 @@ Endereço: %4</translation>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Impossível iniciar o controlador de bitcoin: click-to-pay</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Aviso do gestor de rede</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>O seu proxy ativo não suporta SOCKS5, que é necessário para efectuar pedidos de pagemento via proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>O URL de pedido de pagamento é inválido: %1</translation>
@@ -1304,10 +1179,6 @@ Endereço: %4</translation>
         <source>Payment request file handling</source>
         <translation>Controlo de pedidos de pagamento.</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>O ficheiro de pedido de pagamento não pôde ser lido ou processado! Isto pode ter sido causado por um ficheiro de pedido de pagamento inválido.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Pedidos de pagamento não-verificados para scripts de pagamento personalizados não são suportados.</translation>
@@ -1320,10 +1191,6 @@ Endereço: %4</translation>
         <source>Error communicating with %1: %2</source>
         <translation>Erro ao comunicar com %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>O pedido de pagamento não pode ser lido ou processado!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Má resposta do servidor %1</translation>
@@ -1337,33 +1204,28 @@ Endereço: %4</translation>
         <translation>Erro de pedido de rede</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erro: Pasta de dados especificada &quot;%1&quot; não existe.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Quantia</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erro: Combinação inválida de -regtest e -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduza um endereço Bitcoin (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/D</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1437,10 +1299,6 @@ Endereço: %4</translation>
         <source>Current number of blocks</source>
         <translation>Número actual de blocos</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Total estimado de blocos</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Data do último bloco</translation>
@@ -1517,19 +1375,7 @@ Endereço: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1741,10 +1587,6 @@ Endereço: %4</translation>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Output Baixo:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Depois da taxa:</translation>
@@ -1821,10 +1663,6 @@ Endereço: %4</translation>
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiar output baixo</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar alteração</translation>
@@ -1885,14 +1723,6 @@ Endereço: %4</translation>
         <source>added as transaction fee</source>
         <translation>adicionados como taxa de transação</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Pedido de pagamento expirou</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Endereço de pagamento inválido %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1904,10 +1734,6 @@ Endereço: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>&amp;Pagar A:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>O endereço para onde enviar o pagamento  (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Escreva um rótulo para este endereço para o adicionar ao seu livro de endereços</translation>
@@ -1994,10 +1820,6 @@ Endereço: %4</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção ao assinar mensagens ambíguas, pois ataques de phishing podem tentar enganá-lo de modo a assinar a sua identidade para os atacantes. Apenas assine declarações detalhadas com as quais concorde.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>O endereço a utilizar para assinar a mensagem (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escolher endereço usado previamente</translation>
@@ -2050,10 +1872,6 @@ Endereço: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Introduza o endereço de assinatura, mensagem (assegure-se que copia quebras de linha, espaços, tabulações, etc. exactamente) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>O endereço utilizado para assinar a mensagem (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verifique a mensagem para assegurar que foi assinada com o endereço Bitcoin especificado</translation>
@@ -2067,12 +1885,8 @@ Endereço: %4</translation>
         <translation>Repor todos os campos de verificação de mensagem</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduza um endereço Bitcoin (p.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Clique &quot;Assinar mensagem&quot; para gerar a assinatura</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Clique "Assinar mensagem" para gerar a assinatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2244,8 +2058,8 @@ Endereço: %4</translation>
         <translation>Comerciante</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Moedas geradas deverão maturar por %1 blocos antes de poderem ser gastas. Quando gerou este bloco, ele foi transmitido para a rede para ser incluído na cadeia de blocos. Se a inclusão na cadeia de blocos falhar, o seu estado irá ser alterado para &quot;não aceite&quot; e as moedas não poderão ser gastas. Isto poderá acontecer ocasionalmente se outro nó da rede gerar um bloco a poucos segundos de diferença do seu.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Moedas geradas deverão maturar por %1 blocos antes de poderem ser gastas. Quando gerou este bloco, ele foi transmitido para a rede para ser incluído na cadeia de blocos. Se a inclusão na cadeia de blocos falhar, o seu estado irá ser alterado para "não aceite" e as moedas não poderão ser gastas. Isto poderá acontecer ocasionalmente se outro nó da rede gerar um bloco a poucos segundos de diferença do seu.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2309,10 +2123,6 @@ Endereço: %4</translation>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantia</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Imaturo (%1 confirmações, estará disponível após %2)</translation>
@@ -2524,10 +2334,6 @@ Endereço: %4</translation>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Quantia</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,6 +2347,9 @@ Endereço: %4</translation>
         <translation>até</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2592,18 +2401,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Utilização:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listar comandos</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Obter ajuda para um comando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Opções:</translation>
@@ -2644,10 +2441,6 @@ Endereço: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Número de segundos a impedir que nós com comportamento indesejado se liguem de novo (por defeito: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Escutar por ligações JSON-RPC na porta &lt;n&gt; (por defeito: 8332 ou rede de testes: 18332)</translation>
@@ -2656,10 +2449,6 @@ Endereço: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar comandos de linha de comandos e JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Correr o processo em segundo plano e aceitar comandos</translation>
@@ -2682,7 +2471,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, deverá definir uma rpcpassword no ficheiro de configuração:
 %s
@@ -2693,36 +2482,20 @@ rpcpassword=%s
 O nome de utilizador e palavra-passe NÃO PODEM ser iguais.
 Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono.
 Também é recomendado definir um alertnotify para que seja alertado sobre problemas;
-por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo.com</translation>
+por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifras aceitáveis (por defeito: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ocorreu um erro ao definir a porta %u do serviço RPC a escutar em IPv6, a usar IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associar a endereço específico e escutar sempre nele. Use a notação [anfitrião]:porta para IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entre no modo de teste de regressão, que usa uma cadeia especial cujos blocos podem ser resolvidos instantaneamente. Isto têm como fim a realização de testes de regressão para pools e desenvolvimento de aplicações.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entre no modo de teste de regressão, que usa uma cadeia especial cujos blocos podem ser resolvidos instantaneamente.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Erro: A Escuta de ligações de entrada falhou (retornou erro %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Erro: A transação foi rejeitada! Isso poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas tiverem sido gastas na cópia mas não tiverem sido marcadas como gastas aqui.</translation>
@@ -2735,30 +2508,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta é uma versão de testes pré-lançamento - use à sua responsabilidade - não usar para minar ou aplicações comerciais</translation>
@@ -2775,10 +2524,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atenção: -paytxfee está definida com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transação.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Atenção: Por favor verifique que a data e hora do seu computador estão correctas! Se o seu relógio não estiver certo o Bitcoin não irá funcionar correctamente.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Aviso: A rede não parece estar completamente de acordo! Parece que alguns mineiros estão com dificuldades técnicas.</translation>
@@ -2795,14 +2540,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Atenção: wallet.dat corrompido, dados recuperados! wallet.dat original salvo como wallet.{timestamp}.bak em %s; se o seu saldo ou transações estiverem incorrectos deverá recuperar uma cópia de segurança.</translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;categoria&gt; pode ser:</translation>
@@ -2811,46 +2548,18 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tentar recuperar chaves privadas de um wallet.dat corrupto</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Servidor Bitcoin Core</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Opções de criação de bloco:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Limpar lista de transações (ferramenta de diagnóstico; implica -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Apenas ligar ao(s) nó(s) especificado(s)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Ligar através de proxy SOCKS:</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Ligar ao JSON-RPC na porta &lt;n&gt; (por defeito: 8332 ou rede de testes: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Cadeia de blocos corrompida detectada</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobrir endereço IP próprio (padrão: 1 ao escutar sem -externalip)</translation>
@@ -2935,22 +2644,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Failed to write undo data</source>
         <translation>Falha ao escrever histórico de modificações</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Taxa por KB a adicionar a transações enviadas</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Encontrar pares usando procura DNS (por defeito: 1 excepto -connect)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Gerar moedas (por defeito: 0)</translation>
@@ -2963,17 +2656,13 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Se uma &lt;categoria&gt; não é fornecida, imprimir toda a informação de depuração.</translation>
     </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloco génese incorreto ou nenhum bloco génese encontrado. Pasta de dados errada para a rede?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Endereço -onion inválido: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Endereço -onion inválido: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2983,21 +2672,13 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Adicionar data e hora à informação de depuração (por defeito: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opções de cliente RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir a cadeia de blocos a partir dos ficheiros blk000??.dat atuais</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Selecione a versão do proxy socks a usar (4 ou 5, por defeito: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Definir o tamanho da cache de base de dados em megabytes (%d a %s, padrão: %d)</translation>
+        <translation>Definir o tamanho da cache de base de dados em megabytes (%d a %d, padrão: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
@@ -3019,10 +2700,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Isto têm como fim a realização de testes de regressão para pools e desenvolvimento de aplicações.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Utilização (obsoleto, usar bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>A verificar blocos...</translation>
@@ -3031,10 +2708,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>A verificar carteira...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Esperar pelo ínicio do servidor RPC</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>A carteira %s reside fora da pasta de dados %s</translation>
@@ -3043,10 +2716,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Opções da carteira:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Atenção: Argumento obsoleto -debugnet ignorado, usar -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>É necessário reconstruir as bases de dados usando -reindex para mudar o -txindex</translation>
@@ -3076,20 +2745,12 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <translation>Informação</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantia inválida para -minrelaytxfee=&lt;quantidade&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantia inválida para -mintxfee=&lt;quantidade&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantia inválida para -minrelaytxfee=&lt;quantidade&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantia inválida para -mintxfee=&lt;quantidade&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3111,42 +2772,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Apenas ligar a nós na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opções SSL: (ver a Bitcoin Wiki para instruções de configuração SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar informação de rastreio/depuração para a consola e não para o ficheiro debug.log</translation>
@@ -3155,18 +2780,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Definir tamanho minímo de um bloco em bytes (por defeito: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Encolher ficheiro debug.log ao iniciar o cliente (por defeito: 1 sem -debug definido)</translation>
@@ -3179,10 +2792,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Especificar tempo de espera da ligação em millisegundos (por defeito: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Erro de sistema:</translation>
@@ -3223,14 +2832,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Zapping all transactions from wallet...</source>
         <translation>A limpar todas as transações da carteira...</translation>
     </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>versão</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompido, recuperação falhou</translation>
@@ -3239,14 +2840,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Password for JSON-RPC connections</source>
         <translation>Palavra-passe para ligações JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir ligações JSON-RPC do endereço IP especificado</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comandos para o nó a correr em &lt;ip&gt; (por defeito: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Executar comando quando o melhor bloco mudar (no comando, %s é substituído pela hash do bloco)</translation>
@@ -3279,10 +2872,6 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>This help message</source>
         <translation>Esta mensagem de ajuda</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Incapaz de vincular à porta %s neste computador (vínculo retornou erro %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir procuras DNS para -addnode, -seednode e -connect</translation>
@@ -3295,41 +2884,29 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erro ao carregar wallet.dat: Carteira danificada</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Erro ao carregar wallet.dat: A Carteira requer uma versão mais recente do Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>A Carteira precisou de ser reescrita: reinicie o Bitcoin para completar o processo</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erro ao carregar wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Endereço -proxy inválido: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Rede desconhecida especificada em -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Endereço -proxy inválido: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versão de proxy -socks requisitada desconhecida: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Rede desconhecida especificada em -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Não foi possível resolver o endereço -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Não foi possível resolver o endereço -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Não foi possível resolver o endereço -externalip: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Não foi possível resolver o endereço -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3375,13 +2952,5 @@ por exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Deverá definir rpcpassword=&lt;password&gt; no ficheiro de configuração:
-%s
-Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index d09c40f62e91..c9cad3d92a9f 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ro_RO" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Despre Nucleul Bitcoin</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Nucleul Bitcoin &lt;/b&gt; versiune</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Acesta este un program experimental.
-
-Distribuit sub licența de programe MIT/X11, vezi fișierul însoțitor COPYING sau http://www.opensource.org/licenses/mit-license.php.
-
-Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi folosite în OpenSSL Toolkit (http://www.openssl.org/) și programe criptografice scrise de către Eric Young (eay@cryptsoft.com) și programe UPnP scrise de către Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Drepturi de autor</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Dezvoltatorii Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ro_RO" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>Exporting Failed</source>
         <translation>Exportare esuata</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>A apărut o eroare încercând să se salveze lista de adrese la %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>Repeat new passphrase</source>
         <translation>Repetă noua frază de acces</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Introdu noua parolă a portofelului electronic.&lt;br/&gt;Te rog folosește &lt;b&gt;minim 10 caractere aleatoare&lt;/b&gt;, sau &lt;b&gt;minim 8 cuvinte&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Criptează portofelul</translation>
@@ -295,10 +250,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>Quit application</source>
         <translation>Închide aplicația</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Arată informații despre Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Despre &amp;Qt</translation>
@@ -323,14 +274,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>&amp;Change Passphrase...</source>
         <translation>S&amp;chimbă parola...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>Vizitaţi &amp;URI...</translation>
@@ -455,14 +398,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>&amp;Command-line options</source>
         <translation>Command-line setări</translation>
     </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Client Bitcoin</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexiune activă către rețeaua Bitcoin</numerusform><numerusform>%n conexiuni active către rețeaua Bitcoin</numerusform><numerusform>%n de conexiuni active către rețeaua Bitcoin</numerusform></translation>
@@ -471,10 +406,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>No block source available...</source>
         <translation>Nici o sursă de bloc disponibil ...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>S-a procesat %1 din %2 block-uri (estimate) din istoria tranzactiei.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>S-au procesat %1 blocuri din istoricul tranzacțiilor.</translation>
@@ -495,10 +426,6 @@ Acest produs include programe dezvoltate de către OpenSSL Project pentru a fi f
         <source>%1 and %2</source>
         <translation>%1 si %2</translation>
     </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 în urmă</translation>
@@ -559,10 +486,6 @@ Adresa: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de față este &lt;b&gt;blocat&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>A survenit o eroare fatala. Bitcoin nu mai poate continua in siguranta si se va opri.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -597,10 +520,6 @@ Adresa: %4
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Ieşire minimă: </translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>După taxe:</translation>
@@ -689,10 +608,6 @@ Adresa: %4
         <source>Copy priority</source>
         <translation>Copiaţi prioritatea</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiaţi ieşire minimă:</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiaţi schimb</translation>
@@ -733,18 +648,10 @@ Adresa: %4
         <source>lowest</source>
         <translation>cel mai scazut</translation>
     </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation>(1% blocat)</translation>
-    </message>
     <message>
         <source>none</source>
         <translation>nimic</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Praf</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>da</translation>
@@ -757,10 +664,6 @@ Adresa: %4
         <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 means a fee of at least %1 per kB is required.</source>
-        <translation>Aceasta înseamnă o taxă de cel puţin 1% pe kB necesar.</translation>
-    </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Poate varia +/- 1 octet pentru fiecare intrare. </translation>
@@ -770,25 +673,9 @@ Adresa: %4
         <translation>Tranzacţiile cu prioritate mai mare sunt mai susceptibile de fi incluse într-un bloc. </translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>Aceasta eticheta se face rosie daca prioritatea e mai mica decat media</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>This means a fee of at least %1 is required.</source>
-        <translation>Aceasta înseamnă că o taxă de cel puţin 1% este necesară. </translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Sume sub 0,546 ori taxa minima sunt indicate ca ignorate. </translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Această etichetă devine roşie, dacă schimbul e mai mic de 1%.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(fără etichetă)</translation>
@@ -841,12 +728,12 @@ Adresa: %4
         <translation>Editează adresa de trimitere</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Adresa introdusă &quot;%1&quot; se află deja în lista de adrese.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Adresa introdusă "%1" se află deja în lista de adrese.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Adresa introdusă &quot;%1&quot; nu este o adresă bitcoin validă.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Adresa introdusă "%1" nu este o adresă bitcoin validă.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +769,6 @@ Adresa: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Opţiuni Linie de comandă</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +777,14 @@ Adresa: %4
         <source>version</source>
         <translation>versiunea</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Despre Nucleul Bitcoin</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Command-line setări</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uz:</translation>
@@ -907,17 +798,13 @@ Adresa: %4
         <translation>UI setări</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Seteaza limba, de exemplu: &quot;de_DE&quot; (initialt: system locale)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Seteaza limba, de exemplu: "de_DE" (initialt: system locale)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Incepe miniaturizare</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Afișează pe ecran splash la pornire (implicit: 1)</translation>
@@ -941,10 +828,6 @@ Adresa: %4
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
         <translation>Dacă aceasta este prima dată când programul este lansat, puteţi alege unde Nucleul Bitcoin va stoca datele. </translation>
     </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Nucleul Bitcoin Core se va descărca şi va stoca o copie a lanţului blocului Bitcoin. Cel puţin 1GB de date vor fi stocate in acest dosar şi se va dezvolta în timp. Portofelul va fi, de asemenea, stocat în acest dosar.</translation>
-    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Folosește dosarul de date implicit</translation>
@@ -954,12 +837,8 @@ Adresa: %4
         <translation>Folosește un dosar de date personalizat:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Eroare: Directorul datelor specificate &quot;%1&quot; nu poate fi creat.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1023,42 +902,14 @@ Adresa: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;S Porneşte Bitcoin la pornirea sistemului</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Conecteaza-te la reteaua Bitcoin printr-un proxy SOCKS</translation>
     </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Resetează toate setările clientului la valorile implicite.</translation>
@@ -1071,30 +922,10 @@ Adresa: %4
         <source>&amp;Network</source>
         <translation>&amp;Retea</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Expert</source>
         <translation>expert</translation>
     </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Deschide automat în router portul aferent clientului Bitcoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată.</translation>
@@ -1115,14 +946,6 @@ Adresa: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Portul pe care se concetează proxy serverul (de exemplu: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Versiune:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Versiunea SOCKS a proxiului (ex. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Fereastra</translation>
@@ -1163,14 +986,6 @@ Adresa: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de bitcoin.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Vezi dacă adresele Bitcoin sunt în lista de tranzacție sau nu</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Afişează adresele în lista de tranzacţii</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Dacă să se afişeze controlul caracteristicilor monedei sau nu.</translation>
@@ -1274,8 +1089,8 @@ Adresa: %4
         <translation>Gestionare URI</translation>
     </message>
     <message>
-        <source>URI can not 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 adresa Bitcoin invalida sau parametri deformati URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Adresă pentru plată nevalidă %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,26 +1104,6 @@ Adresa: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Nu poate porni bitcoin: regula clic-pentru-plata</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Cereri de plată neverificate prin script-uri personalizate de plată nu sunt suportate.</translation>
@@ -1321,10 +1116,6 @@ Adresa: %4
         <source>Error communicating with %1: %2</source>
         <translation>Eroare la comunicarea cu %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Răspuns greșit de la server %1</translation>
@@ -1338,33 +1129,28 @@ Adresa: %4
         <translation>Eroare în cererea de rețea</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Eroare: Directorul datelor specificate &quot;%1&quot; nu exista.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sumă</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Eroare: combinație nevalidă de -regtest și -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introdu o adresă Bitcoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>N/A</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1438,10 +1224,6 @@ Adresa: %4
         <source>Current number of blocks</source>
         <translation>Numărul curent de blocuri</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Blocurile totale estimate</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Data ultimului bloc</translation>
@@ -1518,19 +1300,7 @@ Adresa: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 ora %2 minute</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1553,22 +1323,10 @@ Adresa: %4
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Refolosirea unei adrese de primire (nu este recomandat)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Folosește acest formular pentru a solicita plăți. Toate câmpurile sunt &lt;b&gt;opționale&lt;/b&gt;.</translation>
     </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Stergeti toate campurile formularului</translation>
@@ -1593,10 +1351,6 @@ Adresa: %4
         <source>Show</source>
         <translation>Arată</translation>
     </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Remove</source>
         <translation>Elimină</translation>
@@ -1706,10 +1460,6 @@ Adresa: %4
         <source>Send Coins</source>
         <translation>Trimite monede</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Inputs...</source>
         <translation>Intrări</translation>
@@ -1742,10 +1492,6 @@ Adresa: %4
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Ieşire minimă: </translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>După taxe:</translation>
@@ -1754,14 +1500,6 @@ Adresa: %4
         <source>Change:</source>
         <translation>Schimbaţi:</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Trimite simultan către mai mulți destinatari</translation>
@@ -1822,10 +1560,6 @@ Adresa: %4
         <source>Copy priority</source>
         <translation>Copiaţi prioritatea</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Copiaţi ieşire minimă:</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiaţi schimb</translation>
@@ -1886,14 +1620,6 @@ Adresa: %4
         <source>added as transaction fee</source>
         <translation>adăugat ca taxă de tranzacție</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Cererea de plată a expirat</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Adresă pentru plată nevalidă %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1631,6 @@ Adresa: %4
         <source>Pay &amp;To:</source>
         <translation>Plătește că&amp;tre:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adresa către care se va face plata  (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Introdu o etichetă pentru această adresă pentru a fi adăugată în lista ta de adrese</translation>
@@ -1953,10 +1675,6 @@ Adresa: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Introduceti eticheta pentru ca aceasta adresa sa fie introdusa in lista de adrese folosite</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>Aceasta este o cerere de plata neverificata</translation>
@@ -1995,10 +1713,6 @@ Adresa: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puteti semna mesaje cu adresa dumneavoastra pentru a demostra ca sunteti proprietarul lor. Aveti grija sa nu semnati nimic vag, deoarece atacurile de tip phishing va pot pacali sa le transferati identitatea. Semnati numai declaratiile detaliate cu care sunteti deacord.</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduceţi o adresă Bitcoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Alegeti adrese folosite in prealabil</translation>
@@ -2051,10 +1765,6 @@ Adresa: %4
         <source>Enter the signing 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.</source>
         <translation>Introduceti adresa de semnatura, mesajul (asigurati-va ca ati copiat spatiile, taburile etc. exact) si semnatura dedesubt pentru a verifica mesajul. Aveti grija sa nu cititi mai mult in semnatura decat mesajul in sine, pentru a evita sa fiti pacaliti de un atac de tip man-in-the-middle.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduceţi o adresă Bitcoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verifica mesajul pentru a fi sigur ca a fost semnat cu adresa Bitcoin specifica</translation>
@@ -2068,12 +1778,8 @@ Adresa: %4
         <translation>Reseteaza toate spatiile mesajelor semnate.</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Introduceţi o adresă Bitcoin (de exemplu: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Click &quot;Semneaza msajul&quot; pentru a genera semnatura</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Click "Semneaza msajul" pentru a genera semnatura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2152,10 +1858,6 @@ Adresa: %4
         <source>Open until %1</source>
         <translation>Deschis până la %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/deconectat</translation>
@@ -2245,7 +1947,7 @@ Adresa: %4
         <translation>Comerciant</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Monezile generate trebuie sa creasca %1 block-uri inainte sa poata fi cheltuite. Cand ati generat acest block, a fost transmis retelei pentru a fi adaugat la lantul de block-uri. Aceasta  se poate intampla ocazional daca alt nod genereaza un block la numai cateva secunde de al tau.</translation>
     </message>
     <message>
@@ -2276,10 +1978,6 @@ Adresa: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, nu s-a propagat încă</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Deschis pentru încă %1 bloc</numerusform><numerusform>Deschis pentru încă %1 blocuri</numerusform><numerusform>Deschis pentru încă %1 de blocuri</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>necunoscut</translation>
@@ -2310,18 +2008,6 @@ Adresa: %4
         <source>Address</source>
         <translation>Adresa</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Cantitate</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Deschis pentru încă %1 bloc</numerusform><numerusform>Deschis pentru încă %1 blocuri</numerusform><numerusform>Deschis pentru încă %1 de blocuri</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Deschis până la %1</translation>
@@ -2350,10 +2036,6 @@ Adresa: %4
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Confirmare (%1 dintre %2 confirmări recomandate)</translation>
     </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Recepționat cu</translation>
@@ -2525,10 +2207,6 @@ Adresa: %4
         <source>Address</source>
         <translation>Adresă</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sumă</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2220,9 @@ Adresa: %4
         <translation>către</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2274,6 @@ Adresa: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uz:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listă de comenzi</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Ajutor pentru o comandă</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Setări:</translation>
@@ -2645,10 +2314,6 @@ Adresa: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Numărul de secunde pentru a preveni reconectarea partenerilor care nu funcționează corect (implicit: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>A intervenit o eroare in timp ce se seta portul RPC %u pentru ascultare pe IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Ascultă pentru conexiuni JSON-RPC pe &lt;port&gt; (implicit:8332 sau testnet: 18332)</translation>
@@ -2657,10 +2322,6 @@ Adresa: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Se acceptă comenzi din linia de comandă și comenzi JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Rulează în fundal ca un demon și acceptă comenzi</translation>
@@ -2683,7 +2344,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s trebuie sa setezi o parola rpc in fisierul de configurare
 %s
@@ -2694,7 +2355,7 @@ parola rpc=%s
 Numele de utilizator si parola NU trebuie sa fie la fel.
 Daca fisierul nu exista, creaza-l cu fisier de citit permis doar proprietarului.
 Este de asemenea recomandat sa setezi alerta de notificare ca sa primesti notificari ale problemelor;
-spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@foo.com
+spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
 
 </translation>
     </message>
@@ -2702,30 +2363,10 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Cifruri acceptabile (implicit: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>A intervenit o eroare in timp ce se seta portul RPC %u pentru ascultare pe IPv6, reintoarcere la IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Atasati adresei date si ascultati totdeauna pe ea. Folositi [host]:port notatia pentru IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Initiati modul de test al regresie, care foloseste un lant special in care block-urile pot fi rezolvate instantaneu. Acest lucru este facut pentru utilitare si aplicatii de dezvoltare pentru testarea regresiei.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Eroare: Tranzactia a fost respinsa! Acest lucru se poate intampla daca anumite monezi din portofelul dumneavoastra au fost deja cheltuite, deasemenea daca ati folosit o copie a fisierului wallet.dat si monezile au fost folosite in acea copie dar nu au fost marcate ca fiind folosite acolo.</translation>
@@ -2738,38 +2379,10 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executati comanda cand o tranzactie a portofelului se schimba (%s in cmd este inlocuit de TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Taxe mai mici decat aceasta suma sunt considerate taxe nule (pentru crearea tranzactiilor) (pentru nespecificare:</translation>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Aceasta este o versiune de test preliminara - va asumati riscul folosind-o - nu folositi pentru minerit sau aplicatiile comerciantilor.</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
         <translation>Utilizare proxy SOCKS5 separat pentru a ajunge la servicii ascunse TOR (implicit: -proxy)</translation>
@@ -2778,10 +2391,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atentie: setarea -paytxfee este foarte ridicata! Aceasta este taxa tranzactiei pe care o vei plati daca trimiti o tranzactie.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Atentie: Va rugam verificati daca data/timpul computerului dumneavoastra sunt corecte! Daca ceasul computerului este decalat, Bitcoin nu va functiona corect.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Atentie: Reteaua nu pare sa fie deacord in totalitate! Aparent niste mineri au probleme. </translation>
@@ -2798,14 +2407,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Atentie: fisierul wallet.dat este corupt, date salvate! Fisierul original wallet.dat a fost salvat ca wallet.{timestamp}.bak in %s; daca balansul sau tranzactiile sunt incorecte ar trebui sa restaurati dintr-o copie de siguranta. </translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; poate fi:</translation>
@@ -2814,57 +2415,25 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Încearcă recuperarea cheilor private dintr-un wallet.dat corupt</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Daemon-ul Bitcoin Core</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Optiuni creare block</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Conecteaza-te doar la nod(urile) specifice</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Conectare prin proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Conectat la JSON-RPC pe &lt;portul&gt; (implicit: 8332 sau testnet: 18332)</translation>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation>Baza de date &apos;bloc&apos; defectată a fost detectată</translation>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Baza de date 'bloc' defectată a fost detectată</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descopera propria ta adresa IP (intial: 1)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation>Doriți să reconstruiți baza de date &apos;bloc&apos; acum?</translation>
+        <translation>Doriți să reconstruiți baza de date 'bloc' acum?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
@@ -2938,18 +2507,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Failed to write undo data</source>
         <translation>Esuare in scrierea datelor anulate</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Găsește parteneri folosind căutarea DNS (implicit: 1 doar dacă nu s-a folosit -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Pornire fortata a modului safe mode (prestabilit: 0)</translation>
@@ -2962,46 +2519,22 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Cate block-uri se verifica la initializare (implicit: 288, 0=toate)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorect sau nici un bloc de Geneza găsite. Directorul de retea greşit?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Adresa -onion invalidă: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Adresa -onion invalidă: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Nu sunt destule descriptoare disponibile.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Opţiuni client RPC:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruirea indexului lantului de block-uri din fisierele actuale blk000???.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Selectaţi versiunea SOCKS pentru -proxy (4 din 5; iniţial: 5)</translation>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Setaţi dimensiunea maximă a unui block în bytes (implicit: %d)</translation>
@@ -3014,18 +2547,10 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Specify wallet file (within data directory)</source>
         <translation>Specifică fișierul wallet (în dosarul de date)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Este folosita pentru programe de testare a regresiei in algoritmi si  dezvoltare de alte aplicatii. </translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Utilizare (învechită, folositi bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Se verifică blocurile...</translation>
@@ -3034,10 +2559,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Verifying wallet...</source>
         <translation>Se verifică portofelul...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Aşteptaţi serverul RPC să pornească</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Portofelul %s se află în afara dosarului de date %s</translation>
@@ -3046,10 +2567,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Wallet options:</source>
         <translation>Optiuni de portofel</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Trebuie să reconstruiești baza de date folosind -reindex pentru a schimba -txindex</translation>
@@ -3058,41 +2575,21 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importă blocuri dintr-un fișier extern blk000??.dat</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executati comanda cand o alerta relevanta este primita sau vedem o bifurcatie foarte lunga (%s in cmd este inlocuti de mesaj)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informație</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Suma invalida pentru -minrelaytxfee=&lt;suma&gt;:&apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Suma invalida pentru -mintxfee=&lt;suma&gt;: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Suma invalida pentru -minrelaytxfee=&lt;suma&gt;:'%s'</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Suma invalida pentru -mintxfee=&lt;suma&gt;: '%s'</translation>
     </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
@@ -3122,34 +2619,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Print block tree on startup (default: 0)</source>
         <translation>Publicare arbore blocuri la pornire (prestabilit: 0)</translation>
     </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Optiuni SSl (vezi Bitcoin wiki pentru intructiunile de instalare)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Trimitere comenzi catre Bitcoin Core</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Trimite informațiile trace/debug la consolă în locul fișierului debug.log</translation>
@@ -3158,18 +2627,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Setează mărimea minimă a blocului în baiți (implicit: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Micsorati fisierul debug.log la inceperea clientului (implicit: 1 cand nu -debug)</translation>
@@ -3182,10 +2639,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Specifică intervalul maxim de conectare în milisecunde (implicit: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Eroare de sistem:</translation>
@@ -3222,18 +2675,10 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Atenție: această versiune este depășită, este necesară actualizarea!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>on startup</source>
         <translation>in timpul pornirii</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>versiunea</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corupt, recuperare eșuată</translation>
@@ -3242,14 +2687,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Password for JSON-RPC connections</source>
         <translation>Parola pentru conexiunile JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permite conexiuni JSON-RPC de la adresa IP specificată</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Trimite comenzi la nodul care rulează la &lt;ip&gt; (implicit: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execută comanda când cel mai bun bloc se modifică (%s în cmd este înlocuit cu hash-ul blocului)</translation>
@@ -3282,10 +2719,6 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>This help message</source>
         <translation>Acest mesaj de ajutor</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nu se poate folosi %s pe acest calculator (eroarea returnată este %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permite căutări DNS pentru -addnode, -seednode și -connect</translation>
@@ -3298,41 +2731,29 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Eroare la încărcarea wallet.dat: Portofel corupt</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Eroare la încărcarea wallet.dat: Portofelul are nevoie de o versiune Bitcoin mai nouă</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Portofelul trebuie rescris: repornește Bitcoin pentru finalizare</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Eroare la încărcarea wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Adresa -proxy nevalidă: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Adresa -proxy nevalidă: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Rețeaua specificată în -onlynet este necunoscută: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Rețeaua specificată în -onlynet este necunoscută: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>S-a cerut o versiune necunoscută de proxy -socks: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nu se poate rezolva adresa -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nu se poate rezolva adresa -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nu se poate rezolva adresa -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nu se poate rezolva adresa -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Suma nevalidă pentru -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Suma nevalidă pentru -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3378,13 +2799,5 @@ spre exemplu: alertnotify=echo %%s | mail -s &quot;Alerta Bitcoin&quot; admin@fo
         <source>Error</source>
         <translation>Eroare</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Trebuie sa setezi rpcpassword=&lt;password&gt; în fișierul de configurare:⏎
-%s⏎
-Dacă fișierul nu există, creează-l cu permisiuni de citire doar de către proprietar.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 570c3a61e766..d6a145928c52 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>О Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>версия &lt;b&gt;Bitcoin Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Это экспериментальная программа.
-
-Распространяется на правах лицензии MIT/X11, см. файл license.txt или http://www.opensource.org/licenses/mit-license.php.
-
-Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit (http://www.openssl.org/) и криптографическое ПО, написанное Eric Young (eay@cryptsoft.com) и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Все права защищены</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Разработчики Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-бит)</translation>
-    </message>
-</context>
+<TS language="ru" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -130,11 +93,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>Экспорт не удался</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Произошла ошибка при сохранении списка адресов в %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Повторите новый пароль</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Введите новый пароль для бумажника. &lt;br/&gt; Пожалуйста, используйте фразы из &lt;b&gt;10 или более случайных символов,&lt;/b&gt; или &lt;b&gt;восьми и более слов.&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Зашифровать бумажник</translation>
@@ -224,6 +179,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet encrypted</source>
         <translation>Бумажник зашифрован</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Введите новый пароль бумажника.&lt;br/&gt;Используйте пароль, состоящий из &lt;b&gt;десяти или более случайных символов&lt;/b&gt;, или &lt;b&gt;восьми или более слов&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Сейчас программа закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши биткойны от кражи с помощью инфицирования вашего компьютера вредоносным ПО.</translation>
@@ -295,10 +254,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Закрыть приложение</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Показать информацию о Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>О &amp;Qt</translation>
@@ -335,6 +290,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>Открыть &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core клиент</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Импортируются блоки с диска...</translation>
@@ -387,6 +346,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>&amp;Получить</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Показать информацию о Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Показать / Скрыть</translation>
@@ -459,10 +422,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Показать помощь по Bitcoin Core и получить список доступных опций командной строки.</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin клиент</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n активное соединение с сетью</numerusform><numerusform>%n активных соединений с сетью</numerusform><numerusform>%n активных соединений с сетью Bitcoin</numerusform></translation>
@@ -471,10 +430,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>Источник блоков недоступен...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Обработано %1 из %2 (примерно) блоков истории транзакций.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Обработано %1 блоков истории транзакций.</translation>
@@ -559,10 +514,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;заблокирован&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Произошла неисправимая ошибка. Bitcoin не может безопасно продолжать работу и будет закрыт.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +549,8 @@ Address: %4
         <translation>Комиссия:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Малый выход:</translation>
+        <source>Dust:</source>
+        <translation>Пыль:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +641,8 @@ Address: %4
         <translation>Копировать приоритет</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Копировать малый выход</translation>
+        <source>Copy dust</source>
+        <translation>Копировать пыль</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +693,8 @@ Address: %4
         <translation>ничего</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Пыль</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Может отличаться на +/- %1 сатоши на вход.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -770,25 +721,13 @@ Address: %4
         <translation>Транзакции с более высоким приоритетом будут вероятнее других включены в блок.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Эта пометка становится красной, если приоритет ниже, чем &quot;средний&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Эта пометка становится красной, если приоритет ниже, чем "средний".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Эта пометка становится красной, если какой-либо из адресатов получает сумму менее %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Это значит, что требуется комиссия как минимум %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Суммы ниже, чем 0.546 минимальных комиссий ретрансляции, показаны как пыль.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Эта пометка становится красной, если сдача меньше %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>[нет метки]</translation>
@@ -841,12 +780,12 @@ Address: %4
         <translation>Изменение адреса для отправки</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>Введённый адрес «%1» уже находится в адресной книге.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Введённый адрес &quot;%1&quot; не является правильным Bitcoin-адресом.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Введённый адрес "%1" не является правильным Bitcoin-адресом.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +821,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - опции командной строки</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -894,6 +829,18 @@ Address: %4
         <source>version</source>
         <translation>версия</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-бит)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>О Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Параметры командной строки</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Использование:</translation>
@@ -907,8 +854,8 @@ Address: %4
         <translation>Опции интерфейса</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Выберите язык, например &quot;de_DE&quot; (по умолчанию: как в системе)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Выберите язык, например "de_DE" (по умолчанию: как в системе)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,12 +901,12 @@ Address: %4
         <translation>Использовать другой каталог данных:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Ошибка: не удалось создать указанный каталог данных &quot;%1&quot;.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Ошибка: не удалось создать указанный каталог данных "%1".</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1035,6 +982,14 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Число потоков проверки &amp;сценария</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Разрешать соединения извне</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Разрешить входящие подключения</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Подключаться к сети Bitcoin через прокси SOCKS.</translation>
@@ -1115,14 +1070,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Порт прокси-сервера (например, 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>&amp;Версия SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Версия SOCKS-прокси (например, 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Окно</translation>
@@ -1163,14 +1110,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Выберите единицу измерения монет при отображении и отправке.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Показывать ли адреса Bitcoin в списке транзакций.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Показывать адреса в списке транзакций</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Показывать ли функции контроля монет или нет.</translation>
@@ -1226,6 +1165,10 @@ Address: %4
         <source>Wallet</source>
         <translation>Бумажник</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Только наблюдение:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Доступно:</translation>
@@ -1258,6 +1201,22 @@ Address: %4
         <source>Your current total balance</source>
         <translation>Ваш текущий общий баланс</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Ваш текущий баланс в адресах наблюдения</translation>
+    </message>
+    <message>
+        <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>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Недавние транзакции&lt;/b&gt;</translation>
@@ -1274,8 +1233,24 @@ Address: %4
         <translation>Обработка URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Не удалось разобрать URI! Это может быть связано с неверным адресом Bitcoin или неправильными параметрами URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Неверный адрес платежа %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Запрос платежа отклонён</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Сеть запроса платежа не совпадает с сетью клиента.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Запрос платежа просрочен.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Запрос платежа не инициализирован.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1289,25 +1264,21 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Не удаётся запустить bitcoin: обработчик click-to-pay</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Предупреждение менеджера сети</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Активный прокси не поддерживает SOCKS5, который необходим для запроса платежей через прокси.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Неверный URL запроса платежа: %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! Это может быть связано с неверным адресом Bitcoin или неправильными параметрами URI.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Обработка файла запроса платежа</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Файл запроса платежа не может быть прочитан или обработан! Обычно это происходит из-за неверного файла запроса платежа.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Файл запроса платежа не может быть прочитан! Обычно это происходит из-за неверного файла запроса платежа.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1322,8 +1293,8 @@ Address: %4
         <translation>Ошибка связи с %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Запрос платежа не может быть разобран или обработан!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Запрос платежа не может быть разобран!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,31 +1309,66 @@ Address: %4
         <translation>Ошибка сетевого запроса</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Юзер-агент</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Адрес/имя хоста</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Время задержки</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Сумма</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Введите адрес Bitcoin (например, %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 д</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 ч</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 мин</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 с</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Ошибка: указанный каталог &quot;%1&quot; не существует.</translation>
+        <source>NETWORK</source>
+        <translation>СЕТЬ</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Ошибка: не удалось разобрать конфигурационный файл: %1. Используйте синтаксис вида ключ=значение.</translation>
+        <source>UNKNOWN</source>
+        <translation>НЕИЗВЕСТНЫЙ</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Ошибка: неверная комбинация -regtest и -testnet.</translation>
+        <source>None</source>
+        <translation>Ничего</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core ещё не завершился безопасно...</translation>
+        <source>N/A</source>
+        <translation>Н/Д</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введите Bitcoin-адрес (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 ms</source>
+        <translation>%1 мс</translation>
     </message>
 </context>
 <context>
@@ -1414,6 +1420,10 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>Используется версия OpenSSL</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Используется версия BerkeleyDB</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Время запуска</translation>
@@ -1439,8 +1449,76 @@ Address: %4
         <translation>Текущее число блоков</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Расчётное число блоков</translation>
+        <source>Received</source>
+        <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>Direction</source>
+        <translation>Направление</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Версия</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Юзер-агент</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Сервисы</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <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>Байт передано</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Байт получено</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Время задержки</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1519,16 +1597,36 @@ Address: %4
         <translation>%1 ГБ</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 мин</translation>
+        <source>via %1</source>
+        <translation>через %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 ч</translation>
+        <source>never</source>
+        <translation>никогда</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Входящие</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Исходящие</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Да</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 ч %2 мин</translation>
+        <source>No</source>
+        <translation>Нет</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Неизвестно</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Получение...</translation>
     </message>
 </context>
 <context>
@@ -1742,10 +1840,6 @@ Address: %4
         <source>Fee:</source>
         <translation>Комиссия:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Малый выход:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>После комиссии:</translation>
@@ -1774,6 +1868,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>Очистить все поля формы</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Пыль:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Очистить &amp;всё</translation>
@@ -1822,10 +1920,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>Копировать приоритет</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Копировать малый выход</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Копировать размен</translation>
@@ -1878,6 +1972,10 @@ Address: %4
         <source>Warning: Unknown change address</source>
         <translation>Внимание: неизвестный адрес для сдачи</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Копировать пыль</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Вы уверены, что хотите отправить?</translation>
@@ -1886,14 +1984,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>добавлено как комиссия</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Запрос платежа просрочен</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Неверный адрес платежа %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1995,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>Полу&amp;чатель:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Адрес, на который будет выслан платёж (например 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Введите метку для данного адреса (для добавления в адресную книгу)</translation>
@@ -1925,6 +2011,10 @@ Address: %4
         <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>
@@ -1996,8 +2086,8 @@ Address: %4
         <translation>Вы можете подписывать сообщения своими адресами, чтобы доказать владение ими. Будьте осторожны, не подписывайте что-то неопределённое, так как фишинговые атаки могут обманным путём заставить вас подписать нежелательные сообщения. Подписывайте только те сообщения, с которыми вы согласны вплоть до мелочей.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Адрес, которым вы хотите подписать сообщение  (напр. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Адрес Bitcoin, которым подписать сообщение</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2049,11 +2139,11 @@ Address: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Введите ниже адрес для подписи, сообщение (убедитесь, что переводы строк, пробелы, табы и т.п. в точности скопированы) и подпись, чтобы проверить сообщение. Убедитесь, что не скопировали лишнего в подпись, по сравнению с самим подписываемым сообщением, чтобы не стать жертвой атаки &quot;man-in-the-middle&quot;.</translation>
+        <translation>Введите ниже адрес для подписи, сообщение (убедитесь, что переводы строк, пробелы, табы и т.п. в точности скопированы) и подпись, чтобы проверить сообщение. Убедитесь, что не скопировали лишнего в подпись, по сравнению с самим подписываемым сообщением, чтобы не стать жертвой атаки "man-in-the-middle".</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Адрес, которым было подписано сообщение (напр. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Адрес Bitcoin, которым было подписано сообщение</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2068,12 +2158,8 @@ Address: %4
         <translation>Сбросить все поля проверки сообщения</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введите адрес Bitcoin (напр. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Нажмите &quot;Подписать сообщение&quot; для создания подписи</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Нажмите "Подписать сообщение" для создания подписи</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2200,6 +2286,10 @@ Address: %4
         <source>own address</source>
         <translation>свой адрес</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>только наблюдение</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>метка</translation>
@@ -2220,6 +2310,14 @@ Address: %4
         <source>Debit</source>
         <translation>Дебет</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Всего дебет</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Всего кредит</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Комиссия</translation>
@@ -2245,8 +2343,8 @@ Address: %4
         <translation>Продавец</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Сгенерированные монеты должны подождать %1 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если он не попадёт в цепь, его статус изменится на &quot;не принят&quot;, и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Сгенерированные монеты должны подождать %1 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если он не попадёт в цепь, его статус изменится на "не принят", и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2408,6 @@ Address: %4
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Сумма</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Незрелый (%1 подтверждений, будет доступен после %2)</translation>
@@ -2346,10 +2440,6 @@ Address: %4
         <source>Unconfirmed</source>
         <translation>Неподтверждено</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation>Подтверждено(%1 подтверждений, рекомендуется 2% подтверждений)</translation>
-    </message>
     <message>
         <source>Conflicted</source>
         <translation>В противоречии</translation>
@@ -2525,10 +2615,6 @@ Address: %4
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Сумма</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2542,6 +2628,13 @@ Address: %4
         <translation>до</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Единица измерения количества монет. Щёлкните для выбора другой единицы.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,19 +2686,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Использование:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Список команд
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Получить помощь по команде</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Опции:</translation>
@@ -2628,11 +2708,11 @@ Address: %4
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Поддерживать не более &lt;n&gt; подключений к узлам (по умолчанию: 125)</translation>
+        <translation>Поддерживать не более &lt;n&gt; подключений к участникам (по умолчанию: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Подключиться к узлу, чтобы получить список адресов других участников и отключиться</translation>
+        <translation>Подключиться к участнику, чтобы получить список адресов других участников и отключиться</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2640,15 +2720,11 @@ Address: %4
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Порог для отключения неправильно ведущих себя узлов (по умолчанию: 100)</translation>
+        <translation>Порог для отключения неправильно ведущих себя участников (по умолчанию: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Число секунд блокирования неправильно ведущих себя узлов (по умолчанию: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Произошла ошибка при открытии RPC-порта %u для прослушивания на IPv4: %s</translation>
+        <translation>Число секунд блокирования неправильно ведущих себя участников (по умолчанию: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
@@ -2658,10 +2734,6 @@ Address: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Принимать командную строку и команды JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Версия RPC-клиента Bitcoin Core</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Запускаться в фоне как демон и принимать команды</translation>
@@ -2684,7 +2756,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, вы должны установить опцию rpcpassword в конфигурационном файле:
  %s
@@ -2695,17 +2767,13 @@ rpcpassword=%s
 Имя и пароль ДОЛЖНЫ различаться.
 Если файл не существует, создайте его и установите права доступа только для владельца, только для чтения.
 Также рекомендуется включить alertnotify для оповещения о проблемах;
-Например: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+Например: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Разрешённые алгоритмы(по умолчанию: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Произошла ошибка при открытии на прослушивание IPv6 RCP-порта %u, возвращаемся к IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Привязаться к указанному адресу и всегда прослушивать только его. Используйте [хост]:порт для IPv6</translation>
@@ -2715,17 +2783,13 @@ rpcpassword=%s
         <translation>Ограничить скорость передачи бесплатных транзакций до &lt;n&gt;*1000 байт в минуту (по умолчанию: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Войти в режим тестирования на регрессии, в котором используется специальная цепь, где блоки находятся мгновенно. Этот режим рассчитан на инструменты регрессионного тестирования и разработку приложений.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Удалить все транзакции бумажника с возможностью восстановить эти части цепи блоков с помощью -rescan при запуске</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>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Ошибка: не удалось начать прослушивание входящих подключений (прослушивание вернуло ошибку %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Ошибка: транзакция была отклонена! Это могло произойти в случае, если некоторые монеты в вашем бумажнике уже были потрачены, например, если вы используете копию wallet.dat, и монеты были использованы в копии, но не отмечены как потраченные здесь.</translation>
@@ -2738,10 +2802,6 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Комиссии меньшие этого значения считаются нулевыми (для создания транзакции) (по умолчанию:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Сбрасывать активность базы данных из памяти на диск каждые &lt;n&gt; мегабайт (по умолчанию: 100)</translation>
@@ -2778,17 +2838,13 @@ rpcpassword=%s
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: установлено очень большое значение -paytxfee. Это комиссия, которую вы заплатите при проведении транзакции.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Внимание: убедитесь, что дата и время на Вашем компьютере выставлены верно. Если Ваши часы идут неправильно, Bitcoin будет работать некорректно.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Внимание: похоже, в сети нет полного согласия! Некоторый майнеры, возможно, испытывают проблемы.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Внимание: мы не полностью согласны с подключенными участниками! Вам или другим узлам, возможно, следует обновиться.</translation>
+        <translation>Внимание: мы не полностью согласны с подключенными участниками! Вам или другим участникам, возможно, следует обновиться.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2814,30 +2870,14 @@ rpcpassword=%s
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Попытаться восстановить приватные ключи из повреждённого wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Демон Bitcoin Core</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Параметры создания блоков:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Очистить список транзакций кошелька (диагностический инструмент; включает в себя -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Подключаться только к указанному узлу(ам)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Подключаться через SOCKS прокси</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Подключаться к JSON-RPC на &lt;порт&gt; (по умолчанию: 8332 или testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Параметры подключения:</translation>
@@ -2938,18 +2978,6 @@ rpcpassword=%s
         <source>Failed to write undo data</source>
         <translation>Не удалось записать данные для отмены</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Комиссия на КБ, добавляемая к вашим переводам</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Комиссии меньшие этого значения считаются нулевыми (для ретрансляции) (по умолчанию:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Искать узлы с помощью DNS (по умолчанию: 1, если не указан -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Принудительный безопасный режим (по умолчанию: 0)</translation>
@@ -2975,8 +3003,8 @@ rpcpassword=%s
         <translation>Неверный или отсутствующий начальный блок. Неправильный каталог данных для сети?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Неверный -onion адрес: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Неверный -onion адрес: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2986,18 +3014,10 @@ rpcpassword=%s
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Дописывать отметки времени к отладочному выводу (по умолчанию: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Параметры RPC клиента:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Перестроить индекс цепи блоков из текущих файлов blk000??.dat</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Выбрать версию SOCKS для -proxy (4 или 5, по умолчанию: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
@@ -3019,12 +3039,12 @@ rpcpassword=%s
         <translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Остановиться после импорта блоков с диска (по умолчанию: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Использование (устарело, используйте bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3034,10 +3054,6 @@ rpcpassword=%s
         <source>Verifying wallet...</source>
         <translation>Проверка бумажника...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Ожидание запуска RPC сервера</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Бумажник %s располагается вне каталога данных %s</translation>
@@ -3046,10 +3062,6 @@ rpcpassword=%s
         <source>Wallet options:</source>
         <translation>Опции бумажника:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Внимание: устаревший аргумент -debugnet проигнорирован, используйте -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Вам необходимо пересобрать базы данных с помощью -reindex, чтобы изменить -txindex</translation>
@@ -3058,33 +3070,157 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Импортировать блоки из внешнего файла blk000??.dat</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(по умолчанию: 1, 1 = сохранять метаданные транзакции, например, владельца аккаунта и информацию запроса платежа, 2 = отбросить метаданные)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Разрешить подключения JSON-RPC с указанного источника. Разрешённые значения для &lt;ip&gt; — отдельный IP (например, 1.2.3.4), сеть/маска сети (например, 1.2.3.4/255.255.255.0) или сеть/CIDR (например, 1.2.3.4/24). Эту опцию можно использовать многократно</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Произошла ошибка в процессе открытия RPC адреса %s порта %u для прослушивания: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Привязаться к указанному адресу и внести в белый список подключающихся к нему участников. Используйте [хост]:порт для IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Привязаться к указанному адресу для прослушивания JSON-RPC подключений. Используйте запись [хост]:порт для IPv6. Эту опцию можно использовать многократно (по умолчанию: привязываться ко всем интерфейсам)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Не удалось установить блокировку на каталог данных %s. Возможно, Bitcoin Core уже запущен.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Создавать новые файлы с системными правами по умолчанию вместо umask 077 (эффективно только при отключенном бумажнике)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Распространяется под лицензией MIT/X11, см. приложенный файл COPYING или &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Ошибка: не удалось начать прослушивание входящих подключений (прослушивание вернуло ошибку %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Ошибка: обнаружен неподдерживаемый аргумент -socks. Выбор версии SOCKS более невозможен, поддерживаются только прокси SOCKS5.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Выполнить команду, когда транзакция из сети повторно тратит вход транзакции в бумажнике (%s=TxID транзакции сети, %t=TxID транзакции в бумажнике)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Выполнить команду, когда приходит соответствующее сообщение о тревоге или наблюдается очень длинное расщепление цепи (%s в команде заменяется на сообщение)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Комиссии (в BTC/Кб) меньшие этого значения считаются нулевыми для трансляции (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Комиссии (в BTC/Кб) меньшие этого значения считаются нулевыми для создания транзакции (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Выводить отладочную информацию (по умолчанию: 0, указание &lt;category&gt; необязательно)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Задать максимальный размер высокоприоритетных/низкокомиссионных транзакций в байтах (по умолчанию: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit &lt;https://www.openssl.org/&gt; и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</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>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Вносить в белый список участников, подключающихся с указанной маски сети или ip. Можно использовать многократно.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Участники из белого списка не могуть быть забанены за DoS, и их транзакции всегда транслируются, даже если они уже содержатся в памяти. Полезно, например, для шлюза.</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Всегда запрашивать адреса участников с помощью DNS (по умолчанию: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Не удаётся разрешить адрес в параметре -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Подключаться через SOCKS5 прокси</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Все права защищены © 2009-%i Разработчики Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Не удалось разобрать значение %s параметра -rpcbind как сетевой адрес</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Ошибка загрузки wallet.dat: бумажник требует более новую версию Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Ошибка: обнаружен неподдерживаемый параметр -tor, используйте -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Комиссия (в BTC/Кб) для добавления к вашим транзакциям (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Включать IP-адреса в отладочный вывод (по умолчанию: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Информация</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -minrelaytxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <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>Неверная сумма в параметре -minrelaytxfee=&lt;кол-во&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Неверная сумма в параметре -mintxfee=&lt;кол-во&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -mintxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Неверное количество в параметре -paytxfee=&lt;кол-во&gt;: '%s' (должно быть как минимум %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Указана неверная сетевая маска в -whitelist: '%s'</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Хранить максимум &lt;n&gt; несоединённых блоков в памяти (по умолчанию: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3106,6 +3242,14 @@ rpcpassword=%s
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Максимальный размер буфера отправки на соединение, &lt;n&gt;*1000 байт (по умолчанию: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Необходимо указать порт с помощью -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Параметры трансляции узла:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Принимать цепь блоков, только если она соответствует встроенным контрольным точкам (по умолчанию: 1)</translation>
@@ -3139,17 +3283,16 @@ rpcpassword=%s
         <translation>Случайно разбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Запустить поток для периодического сохранения бумажника (по умолчанию: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Транслировать и генерировать транзакции носители данных (по умолчанию: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>
-Параметры SSL: (см. Bitcoin Wiki для инструкций по настройке SSL)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Транслировать не-P2SH мультиподпись (по умолчанию: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Отправить команду Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Запустить поток для периодического сохранения бумажника (по умолчанию: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3167,10 +3310,6 @@ rpcpassword=%s
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Показать все отладочные параметры (использование: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Показать информацию нагрузочного тестирования (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Сжимать файл debug.log при запуске клиента (по умолчанию: 1, если нет -debug)</translation>
@@ -3183,14 +3322,14 @@ rpcpassword=%s
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Тайм-аут соединения в миллисекундах (по умолчанию: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Запустить Bitcoin Core демон</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Системная ошибка:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Это экспериментальное ПО.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Сумма транзакции слишком мала</translation>
@@ -3203,6 +3342,10 @@ rpcpassword=%s
         <source>Transaction too large</source>
         <translation>Транзакция слишком большая</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Невозможно привязаться к %s на этом компьютере (bind вернул ошибку %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Использовать UPnP для проброса порта (по умолчанию: 0)</translation>
@@ -3215,6 +3358,10 @@ rpcpassword=%s
         <source>Username for JSON-RPC connections</source>
         <translation>Имя для подключений JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Необходимо перезаписать бумажник, перезапустите Bitcoin Core для завершения операции.</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Внимание</translation>
@@ -3223,6 +3370,14 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Внимание: эта версия устарела, требуется обновление!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Внимание: неподдерживаемый аргумент -benchmark проигнорирован, используйте -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Внимание: неподдерживаемый аргумент -debugnet проигнорирован, используйте -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Стираем все транзакции из кошелька...</translation>
@@ -3231,10 +3386,6 @@ rpcpassword=%s
         <source>on startup</source>
         <translation>при запуске</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat повреждён, спасение данных не удалось</translation>
@@ -3243,14 +3394,6 @@ rpcpassword=%s
         <source>Password for JSON-RPC connections</source>
         <translation>Пароль для подключений JSON-RPC</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Разрешить подключения JSON-RPC с указанного IP</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Посылать команды узлу, запущенному на &lt;ip&gt; (по умолчанию: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Выполнить команду, когда появляется новый блок (%s в команде заменяется на хэш блока)</translation>
@@ -3283,10 +3426,6 @@ rpcpassword=%s
         <source>This help message</source>
         <translation>Эта справка</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Невозможно привязаться к %s на этом компьютере (bind вернул ошибку %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Разрешить поиск в DNS для -addnode, -seednode и -connect</translation>
@@ -3299,41 +3438,29 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Ошибка загрузки wallet.dat: Бумажник поврежден</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Ошибка загрузки wallet.dat: бумажник требует более новую версию Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Необходимо перезаписать бумажник, перезапустите Bitcoin для завершения операции.</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Ошибка при загрузке wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Неверный адрес -proxy: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Неверный адрес -proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>В параметре -onlynet указана неизвестная сеть: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>В параметре -onlynet указана неизвестная сеть: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>В параметре -socks запрошена неизвестная версия: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Не удаётся разрешить адрес в параметре -bind: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Не удаётся разрешить адрес в параметре -bind: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Не удаётся разрешить адрес в параметре -externalip: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Не удаётся разрешить адрес в параметре -externalip: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -paytxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Неверная сумма в параметре -paytxfee=&lt;кол-во&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3379,13 +3506,5 @@ rpcpassword=%s
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Вы должны установить rpcpassword=&lt;password&gt; в конфигурационном файле:
-%s
-Если файл не существует, создайте его и установите права доступа только для владельца.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts
index 3bc3e65c6271..a951e10ab9fd 100644
--- a/src/qt/locale/bitcoin_sah.ts
+++ b/src/qt/locale/bitcoin_sah.ts
@@ -1,3368 +1,114 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sah" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="sah" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
         <translation>Аадырыскын уларытаргар иккитэ баттаа</translation>
     </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index bce535fad736..793cbfa37761 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sk" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>O jadre Bitcoin</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>Verzia &lt;b&gt;Bitcoin jadra&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Toto je experimentálny softvér.
-
-Distribuovaný pod MIT/X11 softvérovou licenciou, viď sprevádzajúci súbor COPYING alebo http://www.opensource.org/licenses/mit-license.php.
-
-Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v OpenSSL Toolkit (http://www.openssl.org/) a kryptografický softvér napísaný Ericom Youngom (eay@cryptsoft.com) a UPnP softvér napísaný Thomasom Bernardom.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Autorské práva</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Vývojári jadra Bitcoin</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="sk" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -124,17 +87,13 @@ Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Čiarkou oddelený súbor (*.csv)</translation>
+        <translation>Čiarkou oddelovaný súbor (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Export zlyhal</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Nastala chyba pri pokuse uložiť zoznam adries do %1.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -168,10 +127,6 @@ Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v
         <source>Repeat new passphrase</source>
         <translation>Zopakujte nové heslo</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Zadajte nové heslo k peňaženke.&lt;br/&gt;Prosím použite heslo s dĺžkou aspon &lt;b&gt;10 alebo viac náhodných znakov&lt;/b&gt;, alebo &lt;b&gt;8 alebo viac slov&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Zašifrovať peňaženku</translation>
@@ -295,10 +250,6 @@ Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v
         <source>Quit application</source>
         <translation>Ukončiť program</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Zobraziť informácie o Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>O &amp;Qt</translation>
@@ -459,46 +410,18 @@ Tento výrobok obsahuje sofvér, ktorý vyvynul OpenSSL Project pre použitie v
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Zobraziť pomocnú správu od Bitcoin Jadra pre získanie zoznamu dostupných možností príkazového riadku</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin klient</translation>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n aktívne spojenie v Bitcoin sieti</numerusform><numerusform>%n aktívne spojenia v Bitcoin sieti</numerusform><numerusform>%n aktívnych spojení v Bitconi sieti</numerusform></translation>
-    </message>
     <message>
         <source>No block source available...</source>
         <translation>Nedostupný zdroj blokov...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Spracovaných %1 z %2 (odhadovaných) blokov transakčnej histórie.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Spracovaných %1 blokov transakčnej histórie.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>%n hodina</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodín</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>%n deň</numerusform><numerusform>%n dni</numerusform><numerusform>%n dní</numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><numerusform>%n týždeň</numerusform><numerusform>%n týždne</numerusform><numerusform>%n týždňov</numerusform></translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation> %1 a  %2</translation>
     </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation><numerusform>%</numerusform><numerusform>%d)</numerusform><numerusform>%n rokov</numerusform></translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 pozadu</translation>
@@ -558,10 +481,6 @@ Adresa: %4</translation>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Peňaženka je &lt;b&gt;zašifrovaná&lt;/b&gt; a momentálne &lt;b&gt;zamknutá&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Vyskytla sa neblahá chyba. Bitcoin nemôže daľej bezpečne pokračovať a vypne sa.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -596,10 +515,6 @@ Adresa: %4</translation>
         <source>Fee:</source>
         <translation>Poplatok:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Malá hodnota na výstupe:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po poplatku:</translation>
@@ -688,10 +603,6 @@ Adresa: %4</translation>
         <source>Copy priority</source>
         <translation>Kopírovať prioritu</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopírovať malý výstup.</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopírovať zmenu</translation>
@@ -740,10 +651,6 @@ Adresa: %4</translation>
         <source>none</source>
         <translation>žiadne</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Prach</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>áno</translation>
@@ -769,25 +676,13 @@ Adresa: %4</translation>
         <translation>Transakcie s vysokou prioritou sa pravdepodobnejsie dostanú do bloku.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Tento popis zčervenie ak je priorita nižčia ako &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Tento popis zčervenie ak je priorita nižčia ako "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Tento popis zčervenie ak ktorýkoľvek príjemca dostane sumu menšiu ako %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>To znamená že je požadovaný poplatok aspoň %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Sumy pod 0.546 násobkom minimálneho poplatku pre prenos sú považované za prach.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Tento popis zžervenie ak výdavok je menší než %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(bez popisu)</translation>
@@ -840,12 +735,12 @@ Adresa: %4</translation>
         <translation>Upraviť odosielaciu adresu</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Vložená adresa &quot;%1&quot; sa už nachádza v adresári.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Vložená adresa "%1" sa už nachádza v adresári.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Vložená adresa &quot;%1&quot; nieje platnou adresou bitcoin.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Vložená adresa "%1" nieje platnou adresou bitcoin.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -868,7 +763,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation>Priečinok už existuje. Pridajte &quot;%1&quot; ak chcete vytvoriť nový priečinok tu.</translation>
+        <translation>Priečinok už existuje. Pridajte "%1" ak chcete vytvoriť nový priečinok tu.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
@@ -881,10 +776,6 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Jadro Bitcoin - možnosti príkazového riadku</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Jadro Bitcoin</translation>
@@ -893,6 +784,18 @@ Adresa: %4</translation>
         <source>version</source>
         <translation>verzia</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>O jadre Bitcoin</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Voľby príkazového riadku</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Použitie:</translation>
@@ -906,8 +809,8 @@ Adresa: %4</translation>
         <translation>UI možnosti</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Nastaviť jazyk, napríklad &quot;sk_SK&quot; (predvolené: systémový)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Nastaviť jazyk, napríklad "sk_SK" (predvolené: systémový)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -953,12 +856,8 @@ Adresa: %4</translation>
         <translation>Použiť vlastný dátový adresár:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Chyba: Predpísaný priečinok pre dáta &quot;%1&quot; nemôže byt vytvorený.</translation>
+        <source>Bitcoin Core</source>
+        <translation>Jadro Bitcoin</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1114,14 +1013,6 @@ Adresa: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port proxy (napr. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Verzia SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS verzia proxy (napr. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>Okno</translation>
@@ -1162,17 +1053,9 @@ Adresa: %4</translation>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Zvoľte ako deliť bitcoin pri zobrazovaní pri platbách a užívateľskom rozhraní.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Či ukazovať Bitcoin adresy v zozname transakcií alebo nie.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Zobraziť adresy zo zoznamu transakcií</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation>Či zobrazovať možnosti &quot;Coin control&quot; alebo nie.</translation>
+        <translation>Či zobrazovať možnosti "Coin control" alebo nie.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1273,8 +1156,8 @@ Adresa: %4</translation>
         <translation>Spracovanie URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI sa nedá rozložiť! To môže byť spôsobené neplatou Bitcoin adresou alebo zle upravenými vlastnosťami URI.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Neplatná adresa platby %1</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1288,14 +1171,6 @@ Adresa: %4</translation>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Nedá sa spustiť obslužný program bitcoin: click-to-pay zaplatiť kliknutím</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Varovanie správcu siete</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Vaše aktívne proxy nepodporuje SOCKS5, ktoré je potrebné pre vyzvu na zaplatenie cez proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL pre stiahnutie výzvy na zaplatenie je neplatné: %1</translation>
@@ -1304,10 +1179,6 @@ Adresa: %4</translation>
         <source>Payment request file handling</source>
         <translation>Obsluha súboru s požiadavkou na platbu</translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Súbor s výzvou na zaplatenie sa nedá čítať alebo spracovať! To môže byť spôsobené aj neplatným súborom s výzvou.</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Program nepodporuje neoverené platobné výzvy na vlastná skripty.</translation>
@@ -1320,10 +1191,6 @@ Adresa: %4</translation>
         <source>Error communicating with %1: %2</source>
         <translation>Chyba komunikácie s %1: %2 </translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Požiadavka na platbu nemôže byť analyzovaná alebo spracovaná!</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Zlá odpoveď zo servera %1</translation>
@@ -1337,33 +1204,28 @@ Adresa: %4</translation>
         <translation>Chyba požiadavky siete</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Chyba: Uvedený priečinok s dátami &quot;%1&quot; neexistuje.</translation>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Chyba: Nedá sa rozlúštit súbor s nastaveniami: %1. Používajte výlučne kľúč=hodnota syntax.</translation>
+        <source>Amount</source>
+        <translation>Suma</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Chyba: Nesprávna kombinácia -regtest a -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Jadro Bitcoin sa ešte úspešne nevyplo ...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadajte Bitcoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>nie je k dispozícii</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1437,10 +1299,6 @@ Adresa: %4</translation>
         <source>Current number of blocks</source>
         <translation>Aktuálny počet blokov</translation>
     </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation>Očakávaných blokov celkovo</translation>
-    </message>
     <message>
         <source>Last block time</source>
         <translation>Čas posledného bloku</translation>
@@ -1463,7 +1321,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Totals</source>
-        <translation>Celkovo</translation>
+        <translation>Celkovo:</translation>
     </message>
     <message>
         <source>In:</source>
@@ -1517,19 +1375,7 @@ Adresa: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1707,7 +1553,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation>Možnosti &quot;Coin Control&quot;</translation>
+        <translation>Možnosti "Coin Control"</translation>
     </message>
     <message>
         <source>Inputs...</source>
@@ -1741,10 +1587,6 @@ Adresa: %4</translation>
         <source>Fee:</source>
         <translation>Poplatok:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Malá hodnota na výstupe:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po poplatku:</translation>
@@ -1821,10 +1663,6 @@ Adresa: %4</translation>
         <source>Copy priority</source>
         <translation>Kopírovať prioritu</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopírovať nízky výstup</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopírovať zmenu</translation>
@@ -1885,14 +1723,6 @@ Adresa: %4</translation>
         <source>added as transaction fee</source>
         <translation>pridané ako transakčný poplatok</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Vypršala platnosť požiadavky na platbu</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Neplatná adresa platby %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1904,10 +1734,6 @@ Adresa: %4</translation>
         <source>Pay &amp;To:</source>
         <translation>Zapla&amp;tiť:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adresa na odoslanie platby (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Vložte popis pre túto adresu aby sa pridala do adresára</translation>
@@ -1930,7 +1756,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Vložiť adresu z klipbordu</translation>
+        <translation>Vložte adresu z klipbordu</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1992,11 +1818,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Môžete podpísať správy svojou adresou a dokázať, že ju vlastníte. Buďte opatrní a podpíšte len prehlásenia s ktorými plne súhlasíte, nakoľko útoky typu &quot;phishing&quot; Vás môžu lákať k ich podpísaniu.</translation>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadajte Bitcoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Môžete podpísať správy svojou adresou a dokázať, že ju vlastníte. Buďte opatrní a podpíšte len prehlásenia s ktorými plne súhlasíte, nakoľko útoky typu "phishing" Vás môžu lákať k ich podpísaniu.</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2050,10 +1872,6 @@ Adresa: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Vložte podpisovaciu adresu, správu (uistite sa, že kopírujete ukončenia riadkov, medzery, odrážky, atď. presne) a podpis pod to na overenie adresy. Buďte opatrní a nečítajte ako podpísané viac než je v samotnej podpísanej správe a môžete sa tak vyhnúť podvodu mitm útokom.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadajte Bitcoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Overím správy sa uistiť že bola podpísaná označenou Bitcoin adresou</translation>
@@ -2067,12 +1885,8 @@ Adresa: %4</translation>
         <translation>Obnoviť všetky polia v overiť správu</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Zadajte Bitcoin adresu (napr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Kliknite &quot;Podpísať Správu&quot; na získanie podpisu</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Kliknite "Podpísať Správu" na získanie podpisu</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2171,10 +1985,6 @@ Adresa: %4</translation>
         <source>Status</source>
         <translation>Stav</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>,</numerusform><numerusform>,</numerusform><numerusform>, vysielať cez %n nód</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dátum</translation>
@@ -2207,10 +2017,6 @@ Adresa: %4</translation>
         <source>Credit</source>
         <translation>Kredit</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>Dospeje o %n blokov</numerusform><numerusform>Dospeje o %n blokov</numerusform><numerusform>dospeje o %n blokov</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>neprijaté</translation>
@@ -2244,8 +2050,8 @@ Adresa: %4</translation>
         <translation>Kupec</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Vytvorené coins musia dospieť %1 blokov kým môžu byť minuté. Keď vytvoríte tento blok, bude rozoslaný do siete aby bol akceptovaný do reťaze blokov. Ak sa nedostane reťaze, jeho stav sa zmení na &quot;zamietnutý&quot; a nebude sa dať minúť. Toto sa môže občas stať ak iná nóda vytvorí blok približne v tom istom čase.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Vytvorené coins musia dospieť %1 blokov kým môžu byť minuté. Keď vytvoríte tento blok, bude rozoslaný do siete aby bol akceptovaný do reťaze blokov. Ak sa nedostane reťaze, jeho stav sa zmení na "zamietnutý" a nebude sa dať minúť. Toto sa môže občas stať ak iná nóda vytvorí blok približne v tom istom čase.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2275,10 +2081,6 @@ Adresa: %4</translation>
         <source>, has not been successfully broadcast yet</source>
         <translation>, ešte nebola úspešne odoslaná</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Otvoriť pre %n viac blok</numerusform><numerusform>Otvoriť pre %n viac blokov </numerusform><numerusform>Otvoriť pre %n viac blokov </numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>neznámy</translation>
@@ -2309,18 +2111,10 @@ Adresa: %4</translation>
         <source>Address</source>
         <translation>Adresa</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Hodnota</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Nezrelé (%1 potvrdení, bude k dispozícii po %2)</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Otvorené pre ešte %1 blok</numerusform><numerusform>Otvorené pre %n viac blokov </numerusform><numerusform>Otvorené pre %n blokov</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Otvorené do %1</translation>
@@ -2524,10 +2318,6 @@ Adresa: %4</translation>
         <source>Address</source>
         <translation>Adresa</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Suma</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2541,6 +2331,9 @@ Adresa: %4</translation>
         <translation>do</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2592,18 +2385,6 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Použitie:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Zoznam príkazov</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Dostať pomoc pre príkaz</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Možnosti:</translation>
@@ -2644,10 +2425,6 @@ Adresa: %4</translation>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Počet sekúnd kedy sa zabráni zle sa správajúcim peerom znovupripojenie (predvolené: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Vyskytla sa chyba pri nastavovaní RPC portu %u pre počúvanie na IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Počúvať JSON-RPC spojeniam na &lt;port&gt; (predvolené: 8332 or testnet: 18332)</translation>
@@ -2656,10 +2433,6 @@ Adresa: %4</translation>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Prijímať príkazy z príkazového riadku a JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Verzia RPC klienta Jadra Bitcoin</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Bežať na pozadí ako démon a prijímať príkazy</translation>
@@ -2682,7 +2455,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, musíte nastaviť rpcpassword heslo v súbore nastavení:
 %s
@@ -2693,17 +2466,13 @@ rpcpassword=%s
 Užívateľské meno a heslo NESMÚ byť rovnaké.
 Ak súbor neexistuje, vytvorte ho s prístupovým právom owner-readable-only čitateľné len pre majiteľa.
 Tiež sa odporúča nastaviť alertnotify aby ste boli upozorňovaní na problémy;
-napríklad: alertnotify=echo %%s | mail -s &quot;Bitcoin Výstraha&quot; admin@foo.com
+napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Prijateľlné šifry (prednastavené: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Vyskytla sa chyba pri nastavovaní RPC portu %u pre počúvanie na IPv6, vraciam sa späť ku IPv4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6</translation>
@@ -2712,18 +2481,10 @@ napríklad: alertnotify=echo %%s | mail -s &quot;Bitcoin Výstraha&quot; admin@f
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>Priebežne obmedzuj transakcie bez poplatku na &lt;n&gt;*1000 bajtov za minútu (prednastavené: 15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Vstúpiť do regresného testovacieho módu, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené. Pre účely regresného testovania a vývoja aplikácie.</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Vojsť do režimu regresného testovania, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Chyba: Zlyhalo počúvanie prichádzajúcich spojení (listen vrátil chybu %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transakcia bola zamietnutá! Toto sa môže stať ak niektoré coins vo vašej peňaženke už boli minuté, ako keď použijete kópiu wallet.dat a coins boli minuté z kópie ale neoznačené ako minuté tu.</translation>
@@ -2736,10 +2497,6 @@ napríklad: alertnotify=echo %%s | mail -s &quot;Bitcoin Výstraha&quot; admin@f
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Poplatky menšie než toto sa považujú za nulové (pre vytvorenie transakcie) (prednastavené:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Odložiť aktivitu databázy spoločnej pamäti do logu na disku každých &lt;n&gt; megabajtov (prednastavené: 100)</translation>
@@ -2776,10 +2533,6 @@ napríklad: alertnotify=echo %%s | mail -s &quot;Bitcoin Výstraha&quot; admin@f
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varovanie: -paytxfee je nastavené veľmi vysoko. Toto sú transakčné poplatky ktoré zaplatíte ak odošlete transakciu.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Varovanie: Skontroluj či je na počítači nastavený správny čas a dátum. Ak sú hodiny nastavené nesprávne, Bitcoin nebude správne pracovať.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Varovanie: Javí sa že sieť sieť úplne nesúhlasí! Niektorí mineri zjavne majú ťažkosti.
@@ -2814,30 +2567,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Pokus zachrániť súkromné kľúče z poškodeného wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Démon Jadro Bitcoin</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Voľby vytvorenia bloku:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Vyčistiť zoznam transakcií peňaženky (diagnostický nástroj; zahŕňa -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Pripojiť sa len k určenej nóde</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Pripojiť cez SOCKS proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Pripojiť ku JSON-RPC na &lt;port&gt; (prednastavené: 8332 alebo testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Možnosti pripojenia:</translation>
@@ -2938,18 +2675,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Failed to write undo data</source>
         <translation>Zlyhalo zapisovanie </translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Poplatok za kB ktorý treba pridať k odoslanej transakcii</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Poplatky menšie než toto sa považujú za nulové (pre preposielanie) (prednastavené:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Nájsť počítače v bitcoin sieti použitím DNS vyhľadávania (predvolené: 1 okrem -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Vnútiť bezpečný režim (prenastavené: 0)</translation>
@@ -2975,8 +2700,8 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <translation>Nesprávny alebo žiadny genesis blok nájdený. Nesprávny dátový priečinok alebo sieť?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Neplatná -onion adresa:  &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Neplatná -onion adresa:  '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2986,18 +2711,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Na začiatok logu pre ladenie vlož dátum a čas (prednastavené: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>Možnosti klienta RPC baník pyčo:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Znovu vytvoriť zoznam blokov zo súčasných blk000??.dat súborov</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Zvoľte SOCKS verziu -proxy (4 alebo 5, predvolené 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d na %d, prednatavené: %d)</translation>
@@ -3022,10 +2739,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Toto je mienené nástrojom pre regresné testovania a vývoj programu.</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Použitie (neodporúča sa, použite bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Overujem bloky...</translation>
@@ -3034,10 +2747,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Verifying wallet...</source>
         <translation>Overujem peňaženku...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Čakanie na štart RPC servra</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Peňaženka %s sa nachádza mimo dátového priečinka %s </translation>
@@ -3046,10 +2755,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Wallet options:</source>
         <translation>Voľby peňaženky:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Varovanie: Zastaralý parameter -debugnet bol ignorovaný, použite -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Potrebujete prebudovať databázu použitím -reindex zmeniť -txindex</translation>
@@ -3079,12 +2784,12 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <translation>Informácia</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná suma pre -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná suma pre -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná suma pre -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná suma pre -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3142,14 +2847,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Run a thread to flush wallet periodically (default: 1)</source>
         <translation>Mať spustené vlákno pravidelného čístenia peňaženky (predvolené: 1)</translation>
     </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL možnosť: (pozrite Bitcoin Wiki pre návod na nastavenie SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Poslať príkaz Jadru Bitcoin</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu</translation>
@@ -3166,10 +2863,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zobraziť všetky možnosti ladenia (použitie: --help --help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Zobraziť porovnávacie informácie (prednastavené: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Zmenšiť debug.log pri spustení klienta (predvolené: 1 ak bez -debug)</translation>
@@ -3182,10 +2875,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Určiť aut spojenia v milisekundách (predvolené: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Štart služby Jadro Bitcoin</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systémová chyba:</translation>
@@ -3230,10 +2919,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>on startup</source>
         <translation>pri štarte</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>verzia</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat je poškodený, záchrana zlyhala</translation>
@@ -3242,14 +2927,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Password for JSON-RPC connections</source>
         <translation>Heslo pre JSON-rPC spojenia</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Povoliť JSON-RPC spojenia z určenej IP adresy.</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Poslať príkaz nóde bežiacej na &lt;ip&gt; (predvolené: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Vykonaj príkaz, ak zmeny v najlepšom bloku (%s v príkaze nahradí blok hash)</translation>
@@ -3282,10 +2959,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>This help message</source>
         <translation>Táto pomocná správa</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nepodarilo sa spojiť s %s na tomto počítači (bind vrátil chybu %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Povoliť vyhľadávanie DNS pre pridanie nódy a spojenie</translation>
@@ -3298,41 +2971,29 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Chyba načítania wallet.dat: Peňaženka je poškodená</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Chyba načítania wallet.dat: Peňaženka vyžaduje novšiu verziu Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Bolo potrebné prepísať peňaženku: dokončite reštartovaním Bitcoin</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Chyba načítania wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Neplatná adresa proxy: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Neznáma sieť upresnená v -onlynet: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Neplatná adresa proxy: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Neznáma verzia -socks proxy požadovaná: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Neznáma sieť upresnená v -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nemožno rozriešiť -bind adress: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nemožno rozriešiť -bind adress: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nemožno rozriešiť -externalip address: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nemožno rozriešiť -externalip address: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neplatná suma pre -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neplatná suma pre -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3378,13 +3039,5 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Musíš nastaviť rpcpassword=&lt;heslo&gt; v konfiguračnom súbore:
-%s
-Ak súbor neexistuje, vytvor ho s oprávnením pre čítanie len vlastníkom (owner-readable-only)</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 2ad31e911bae..f615d3134313 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sl_SI" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>O jedru Bitcoina</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Jedro Bitcoina&lt;/b&gt; različica</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="sl_SI" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -63,11 +31,11 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Izbriši trenutno označeni naslov  iz seznama</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Izvozi podatke v trenutni zavih v datoteko</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -91,19 +59,19 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Pošiljati naslove</translation>
+        <translation>Naslovi za pošiljanje</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation>Prejemati naslovi</translation>
+        <translation>Naslovi za prejemanje</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>To so tvoji Bitcoin naslovi za pošiljanje plačil. Vedno preveri znesek in prejemnikov naslov pred pošiljanjem kovancev.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>To so vaši Bitcoin naslovi za prejemanje plačil. Priporočljivo je uporabljati nov prejemni naslov za vsako izmed transakcij.</translation>
+        <translation>To so tvoji Bitcoin naslovi za prejemanje plačil. Priporočljivo je uporabljati nov prejemni naslov za vsako izmed transakcij.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -125,11 +93,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Exporting Failed</source>
         <translation>Neuspešen izvoz</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -163,10 +127,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Ponovite novo geslo</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Vnesite novo geslo za vstop v denarnico.&lt;br/&gt;Prosimo, da geslo sestavite iz &lt;b&gt; 10 ali več naključnih znakov&lt;/b&gt; oz. &lt;b&gt;osem ali več besed&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Šifriraj denarnico</translation>
@@ -201,16 +161,12 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Opozorilo: V primeru izgube gesla kriptirane denarnice, boš &lt;b&gt;IZGUBIL VSE SVOJE BITCOINE&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Ali ste prepričani, da želite šifrirati vašo denarnico?</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 type="unfinished"/>
-    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Opozorilo: imate prižgan Cap Lock</translation>
@@ -247,11 +203,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Dešifriranje denarnice spodletelo</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
@@ -268,7 +220,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>Vozlišče</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
@@ -290,10 +242,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Izhod iz aplikacije</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Pokaži informacije o Bitcoinu</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>O &amp;Qt</translation>
@@ -330,6 +278,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>Odpri &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Odjemalec Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Uvažam bloke z diska...</translation>
@@ -362,10 +314,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open debugging and diagnostic console</source>
         <translation>Odpri razhroščevalno in diagnostično konzolo</translation>
     </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation>%Preveri sporočilo ...</translation>
-    </message>
     <message>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
@@ -398,10 +346,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
         <translation>Za dokaz, da ste lastniki sporočil, se podpišite z Bitcoin naslovom</translation>
     </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Datoteka</translation>
@@ -426,10 +370,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Bitcoin Core</source>
         <translation>Jedro Bitcoina</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
         <translation>&amp;O jedru Bitcoina</translation>
@@ -446,34 +386,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open a bitcoin: URI or payment request</source>
         <translation>Odpri Bitcoin: URI ali zahteva o plačilu</translation>
     </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin odjemalec</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktivna povezava v bitcoin omrežje</numerusform><numerusform>%n aktivni povezavi v bitcoin omrežje</numerusform><numerusform>%n aktivnih povezav v bitcoin omrežje</numerusform><numerusform>%n aktivnih povezav v bitcoin omrežje</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n ura</numerusform><numerusform>%n uri</numerusform><numerusform>%n ure</numerusform><numerusform>%n ura</numerusform></translation>
@@ -486,10 +402,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%n week(s)</source>
         <translation><numerusform>%n teden</numerusform><numerusform>%n tedna</numerusform><numerusform>%n tedni</numerusform><numerusform>%n tednov</numerusform></translation>
     </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n year(s)</source>
         <translation><numerusform>%n leto</numerusform><numerusform>%n leti</numerusform><numerusform>%n leta</numerusform><numerusform>%n let</numerusform></translation>
@@ -498,10 +410,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>%1 behind</source>
         <translation>%1 odzadaj</translation>
     </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transkacija za tem ne bo bila še na voljo.</translation>
@@ -554,10 +462,6 @@ Naslov: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Denarnica je &lt;b&gt;šifrirana&lt;/b&gt; in trenutno &lt;b&gt;zaklenjena&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -568,10 +472,6 @@ Naslov: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Količina:</translation>
@@ -593,29 +493,13 @@ Naslov: %4
         <translation>Provizija:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Prah:</translation>
     </message>
     <message>
         <source>Change:</source>
         <translation>Sprememba:</translation>
     </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>Količina</translation>
@@ -656,14 +540,6 @@ Naslov: %4
         <source>Copy transaction ID</source>
         <translation>Kopiraj ID transakcije</translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>Kopiraj količino</translation>
@@ -672,10 +548,6 @@ Naslov: %4
         <source>Copy fee</source>
         <translation>Kopiraj provizijo</translation>
     </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy bytes</source>
         <translation>Kopiraj bite</translation>
@@ -684,14 +556,6 @@ Naslov: %4
         <source>Copy priority</source>
         <translation>Kopiraj prednostno mesto</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>highest</source>
         <translation>najvišja</translation>
@@ -732,14 +596,6 @@ Naslov: %4
         <source>(%1 locked)</source>
         <translation>(%1 zaklenjeno)</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation>Prah</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>da</translation>
@@ -752,51 +608,11 @@ Naslov: %4
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>V primeru, da je velikost transakcije večja od 1000 bitov, se ta oznaka se obarva rdeče.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ni oznake)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -811,10 +627,6 @@ Naslov: %4
         <source>The label associated with this address list entry</source>
         <translation>Oznaka je povezana s tem vnosom seznama naslovov</translation>
     </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Naslov</translation>
@@ -836,12 +648,8 @@ Naslov: %4
         <translation>Uredi naslov za odlive</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Vnešeni naslov &quot;&amp;1&quot; je že v imeniku.</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Vnešeni naslov &quot;%1&quot; ni veljaven Bitcoin naslov.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Vnešeni naslov "%1" ni veljaven Bitcoin naslov.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -854,33 +662,13 @@ Naslov: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>name</source>
         <translation>ime</translation>
     </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Jedro Bitcoina</translation>
@@ -889,6 +677,14 @@ Naslov: %4
         <source>version</source>
         <translation>različica</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>O jedru Bitcoina</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Možnosti ukazne vrstice</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Uporaba:</translation>
@@ -902,26 +698,14 @@ Naslov: %4
         <translation>možnosti uporabniškega vmesnika</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Nastavi jezik, npr. &quot;sl_SI&quot; (privzeto: jezikovna oznaka sistema)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Nastavi jezik, npr. "sl_SI" (privzeto: jezikovna oznaka sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Zaženi pomanjšano</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
     <message>
@@ -933,28 +717,8 @@ Naslov: %4
         <translation>Dobrodošli v jedru Bitcoina</translation>
     </message>
     <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Bitcoin Core</source>
+        <translation>Jedro Bitcoina</translation>
     </message>
     <message>
         <source>Error</source>
@@ -964,11 +728,7 @@ Naslov: %4
         <source>GB of free space available</source>
         <translation>GB prostora na voljo</translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -983,15 +743,7 @@ Naslov: %4
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1002,10 +754,6 @@ Naslov: %4
         <source>&amp;Main</source>
         <translation>&amp;Glavno</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>Nakazilo plačila &amp; provizija</translation>
@@ -1018,85 +766,29 @@ Naslov: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Zaženi Bitcoin ob prijavi v sistem</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>MB</source>
         <translation>megabite</translation>
     </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Network</source>
         <translation>&amp;Omrežje</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>&amp;Denarnica</translation>
     </message>
     <message>
         <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
+        <translation>Poznavalec</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 type="unfinished"/>
+        <translation>Avtomatično odpri vrata Bitcoin odjemalca na usmerjevalniku. To deluje samo, če vaš usmerjevalnik podpira UPnP in je omogočen.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
+        <translation>Naslavljanje vrat z uporabo &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -1110,33 +802,25 @@ Naslov: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Vrata strežnika (npr.: 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;različica:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS različica posredniškega strežnika (npr.: 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Okno</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
+        <translation>Prikaži samo pomanjšano ikono programa po pomanjšitvi okna.</translation>
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Minimiraj na pladenj namesto na opravilno vrstico</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 Quit in the menu.</source>
-        <translation type="unfinished"/>
+        <translation>Minimiziraj namesto izhoda iz programa, ko je okno zaprto. Ko je ta opcija omogočena se bo aplikacija zaprla z izbiro opcije Zapri iz menija. </translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Minimiziraj na ukaz zapri</translation>
     </message>
     <message>
         <source>&amp;Display</source>
@@ -1148,27 +832,11 @@ Naslov: %4
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
+        <translation>Tukaj je mogoče nastaviti uporabniški vmesnik za jezike. Ta nastavitev bo prikazana šele, ko boste znova zagnali Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
+        <translation>&amp;</translation>
     </message>
     <message>
         <source>&amp;OK</source>
@@ -1182,31 +850,7 @@ Naslov: %4
         <source>default</source>
         <translation>privzeto</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
     <message>
@@ -1229,22 +873,10 @@ Naslov: %4
         <source>Your current spendable balance</source>
         <translation>Vaše trenutno razpoložljivo stanje</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Skupno število potrjenih transakcij, ki sicer niso bile prištete k razpoložljivem stanju</translation>
     </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Skupaj:</translation>
@@ -1259,7 +891,7 @@ Naslov: %4
     </message>
     <message>
         <source>out of sync</source>
-        <translation type="unfinished"/>
+        <translation>iz sinhronizacije</translation>
     </message>
 </context>
 <context>
@@ -1269,57 +901,17 @@ Naslov: %4
         <translation>Rokovanje z URI</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
+        <source>Invalid payment address %1</source>
+        <translation>Neveljaven naslov plačila %1</translation>
     </message>
     <message>
         <source>Payment request error</source>
         <translation>Napaka pri zahtevi plačila</translation>
     </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Napaka pri povezavi z  %1: %2</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Slab odziv strežnika %1</translation>
@@ -1334,32 +926,31 @@ Naslov: %4
     </message>
 </context>
 <context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
-    </message>
+    <name>PeerTableModel</name>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Napaka: Želena nahajališče datoteke &quot;%1&quot; ne obstaja.</translation>
+        <source>Ping Time</source>
+        <translation>Odzivni čas</translation>
     </message>
+</context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Količina</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Napaka: Neveljavna kombinacija -regtest and -testnet</translation>
+        <source>%1 h</source>
+        <translation>%1 ur</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>%1 m</source>
+        <translation>%1 minut</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Vnesite bitcoin naslov (npr.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>N/A</source>
+        <translation>Neznano</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1397,18 +988,14 @@ Naslov: %4
         <source>&amp;Information</source>
         <translation>&amp;Informacije</translation>
     </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>OpenSSL različica v rabi</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>BerkeleyDB različica v rabi</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Čas zagona</translation>
@@ -1417,10 +1004,6 @@ Naslov: %4
         <source>Network</source>
         <translation>Omrežje</translation>
     </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Number of connections</source>
         <translation>Število povezav</translation>
@@ -1434,8 +1017,24 @@ Naslov: %4
         <translation>Trenutno število blokov</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Ocenjeno skupno število blokov</translation>
+        <source>Received</source>
+        <translation>Prejeto</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Poslano</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Različica</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Storitve</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Odzivni čas</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1461,14 +1060,6 @@ Naslov: %4
         <source>Totals</source>
         <translation>Vsote</translation>
     </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Build date</source>
         <translation>Datum izgradnje</translation>
@@ -1477,10 +1068,6 @@ Naslov: %4
         <source>Debug log file</source>
         <translation>Razhroščevalna dnevniška datoteka</translation>
     </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear console</source>
         <translation>Počisti konzolo</translation>
@@ -1514,16 +1101,24 @@ Naslov: %4
         <translation>%1 gigabitov</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 minut</translation>
+        <source>never</source>
+        <translation>nikoli</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 ur</translation>
+        <source>Yes</source>
+        <translation>Da</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 ur %2 minut</translation>
+        <source>No</source>
+        <translation>Ne</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Neznano</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Pridobivam...</translation>
     </message>
 </context>
 <context>
@@ -1540,50 +1135,18 @@ Naslov: %4
         <source>&amp;Message:</source>
         <translation>&amp;Sporočilo:</translation>
     </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Pomožna oznaka je povezana z novim sprejemnim naslovom.</translation>
     </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear</source>
         <translation>Počisti</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Request payment</source>
         <translation>&amp;Zahtevaj plačilo</translation>
     </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show</source>
         <translation>Pokaži</translation>
@@ -1627,17 +1190,13 @@ Naslov: %4
         <source>&amp;Save Image...</source>
         <translation>&amp;Shrani sliko..</translation>
     </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Payment information</source>
         <translation>Informacija o plačilu</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1661,7 +1220,7 @@ Naslov: %4
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
+        <translation>Napaka pri kodiranju URIja v QR kodo.</translation>
     </message>
 </context>
 <context>
@@ -1701,10 +1260,6 @@ Naslov: %4
         <source>Send Coins</source>
         <translation>Pošlji kovance</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Inputs...</source>
         <translation>Vnosi...</translation>
@@ -1737,26 +1292,10 @@ Naslov: %4
         <source>Fee:</source>
         <translation>Provizija:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change:</source>
         <translation>Sprememba:</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Pošlji več prejemnikom hkrati</translation>
@@ -1766,8 +1305,8 @@ Naslov: %4
         <translation>Dodaj &amp;prejemnika</translation>
     </message>
     <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
+        <source>Dust:</source>
+        <translation>Prah:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1789,10 +1328,6 @@ Naslov: %4
         <source>Confirm send coins</source>
         <translation>Potrdi odliv kovancev </translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
         <translation>Kopiraj količino</translation>
@@ -1805,10 +1340,6 @@ Naslov: %4
         <source>Copy fee</source>
         <translation>Kopiraj provizijo</translation>
     </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy bytes</source>
         <translation>Kopiraj bite</translation>
@@ -1817,26 +1348,10 @@ Naslov: %4
         <source>Copy priority</source>
         <translation>Kopiraj prednostno mesto</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>or</source>
         <translation>ali</translation>
     </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Količina za plačilo mora biti večja od 0.</translation>
@@ -1845,22 +1360,10 @@ Naslov: %4
         <source>The amount exceeds your balance.</source>
         <translation>Količina presega vaše dobroimetje</translation>
     </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Celotni znesek presega vaše stanje, ko je zaračunana 1% provizija.</translation>
-    </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Najdena kopija naslova, možnost pošiljanja na vsakega izmed naslov le enkrat ob pošiljanju.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Opozorilo: Neveljaven Bitcoin naslov</translation>
@@ -1869,10 +1372,6 @@ Naslov: %4
         <source>(no label)</source>
         <translation>(ni oznake)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Ali ste prepričani, da želite poslati?</translation>
@@ -1881,14 +1380,6 @@ Naslov: %4
         <source>added as transaction fee</source>
         <translation>dodano kot provizija transakcije</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Zahteva plačila je potekla</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Neveljaven naslov plačila %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1900,10 +1391,6 @@ Naslov: %4
         <source>Pay &amp;To:</source>
         <translation>Prejemnik &amp;plačila:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Vnesite oznako za ta naslov, ki bo shranjena v imenik</translation>
@@ -1916,10 +1403,6 @@ Naslov: %4
         <source>Choose previously used address</source>
         <translation>Izberi zadnje uporabljen naslov</translation>
     </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1932,45 +1415,17 @@ Naslov: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Sporočilo:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Vnesite oznako za ta naslov, ki bo shranjena v seznam uporabljenih naslovov</translation>
     </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Ne zaustavite računalnika dokler to okno ne izgine.</translation>
@@ -1986,14 +1441,6 @@ Naslov: %4
         <source>&amp;Sign Message</source>
         <translation>&amp;Podpiši sporočilo</translation>
     </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Izberi zadnje uporabljen naslov</translation>
@@ -2010,30 +1457,14 @@ Naslov: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Signature</source>
         <translation>Podpis</translation>
     </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Sign &amp;Message</source>
         <translation>Podpiši &amp;sporočilo</translation>
     </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Počisti &amp;vse </translation>
@@ -2042,33 +1473,13 @@ Naslov: %4
         <source>&amp;Verify Message</source>
         <translation>&amp;Preveri sporočilo</translation>
     </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Verify &amp;Message</source>
         <translation>Preveri &amp;Sporočilo</translation>
     </message>
     <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Vnesite bitcoin naslov (npr.: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Kliknite &quot;Podpiši sporočilo&quot; za ustvaritev podpisa</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Kliknite "Podpiši sporočilo" za ustvaritev podpisa</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2078,10 +1489,6 @@ Naslov: %4
         <source>Please check the address and try again.</source>
         <translation>Prosimo preverite naslov in poizkusite znova.</translation>
     </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
         <translation>Odklepanje denarnice je bilo prekinjeno.</translation>
@@ -2106,10 +1513,6 @@ Naslov: %4
         <source>Please check the signature and try again.</source>
         <translation>Prosimo preverite podpis in poizkusite znova.</translation>
     </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message verification failed.</source>
         <translation>Pregledovanje sporočila spodletelo.</translation>
@@ -2125,10 +1528,6 @@ Naslov: %4
         <source>Bitcoin Core</source>
         <translation>Jedro Bitcoina</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -2136,25 +1535,13 @@ Naslov: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>Odpri enoto %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/unconfirmed</source>
         <translation>%1/nepotrjeno</translation>
@@ -2167,10 +1554,6 @@ Naslov: %4
         <source>Status</source>
         <translation>Stanje</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -2199,14 +1582,6 @@ Naslov: %4
         <source>label</source>
         <translation>oznaka</translation>
     </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>ni bilo sprejeto</translation>
@@ -2239,10 +1614,6 @@ Naslov: %4
         <source>Merchant</source>
         <translation>Trgovec</translation>
     </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Razhroščevalna informacija</translation>
@@ -2271,10 +1642,6 @@ Naslov: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, še ni bila uspešno raznešena</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>neznano</translation>
@@ -2305,18 +1672,6 @@ Naslov: %4
         <source>Address</source>
         <translation>Naslov</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Količina</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Odpri enoto %1</translation>
@@ -2333,22 +1688,10 @@ Naslov: %4
         <source>Generated but not accepted</source>
         <translation>Generirano, toda ne sprejeto</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Unconfirmed</source>
         <translation>Nepotrjeno</translation>
     </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
         <translation>Prejeto z</translation>
@@ -2476,18 +1819,10 @@ Naslov: %4
         <source>Show transaction details</source>
         <translation>Prikaži podrobnosti transakcije</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Neuspešen izvoz</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Exporting Successful</source>
         <translation>Uspešen izvoz</translation>
@@ -2520,10 +1855,6 @@ Naslov: %4
         <source>Address</source>
         <translation>Naslov</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Količina</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2537,13 +1868,12 @@ Naslov: %4
         <translation>za</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2559,7 +1889,7 @@ Naslov: %4
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Izvozi podatke v trenutni zavih v datoteko</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
@@ -2588,18 +1918,6 @@ Naslov: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Uporaba:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Prikaži ukaze</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Prikaži pomoč za ukaz</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Možnosti:</translation>
@@ -2640,22 +1958,10 @@ Naslov: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Število sekund za težavo pri vzpostavitvi povezave med uporabniki (privzeto: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Sprejmi ukaze iz ukazne vrstice in JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Teci v ozadju in sprejemaj ukaze</translation>
@@ -2664,52 +1970,6 @@ Naslov: %4
         <source>Use the test network</source>
         <translation>Uporabi testno omrežje</translation>
     </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Napaka: Transakcija ni bila sprejeta! To se je morebiti zgodilo, ker so nekateri kovanci v vaši denarnici bili že porabljeni, na primer če ste uporabili kopijo wallet.dat in so tako kovanci bili porabljeni v kopiji, ostali pa označeni kot neporabljeni.</translation>
@@ -2722,150 +1982,34 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Izvedi ukaz, ko bo transakcija denarnice se spremenila (V cmd je bil TxID zamenjan za %s)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>To je pred izdana poizkusna verzija - uporaba na lastno odgovornost - ne uporabljajte je za rudarstvo ali trgovske aplikacije</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
+        <translation>Za doseg soležnikov preko Tor skritih storitev uporabi ločen SOCKS5 proxy (privzeto: -proxy)</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Opozorilo: napaka pri branju wallet.dat! Vsi ključi so bili pravilno prebrani, podatki o transakciji ali imenik vnešenih naslovov so morda izgubljeni ali nepravilni.</translation>
     </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(default: 1)</source>
-        <translation type="unfinished"/>
+        <translation>(privzeto: 1)</translation>
     </message>
     <message>
         <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
+        <translation>(privzeto: wallet.dat)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;kategorija&gt; je lahko:</translation>
     </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Možnosti ustvarjanja blokov:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Opozorilo: Premalo prostora na disku!</translation>
@@ -2878,34 +2022,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error: system error: </source>
         <translation>Napaka: sistemska napaka:</translation>
     </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Failed to write file info</source>
         <translation>Zapisovanje informacij o datoteki neuspešno</translation>
@@ -2914,262 +2030,26 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write to coin database</source>
         <translation>Neuspešno zapisovanje na bazi podatkov kovancev</translation>
     </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Ustvari kovance (privzeto: 0)</translation>
     </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Počakajte na zagon RPC strežnika</translation>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Uvažam...</translation>
     </message>
     <message>
         <source>Information</source>
         <translation>Informacije</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL možnosti: (glejte Bitcoin Wiki za navodla, kako nastaviti SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Pošlji sledilne/razhroščevalne informacije v konzolo namesto jih shraniti v debug.log datoteko</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Signing transaction failed</source>
         <translation>Podpisovanje transakcije spodletelo</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Sistemska napaka:</translation>
@@ -3186,14 +2066,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction too large</source>
         <translation>Transkacija je prevelika</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Uporabniško ime za JSON-RPC povezave</translation>
@@ -3206,18 +2078,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Opozorilo: ta različica je zastarela, potrebna je nadgradnja!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>različica</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat poškodovana, neuspešna obnova</translation>
@@ -3226,17 +2086,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Password for JSON-RPC connections</source>
         <translation>Geslo za JSON-RPC povezave</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Dovoli JSON-RPC povezave z določenega IP naslova</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Pošlji ukaze vozlišču na &lt;ip&gt; (privzet: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
+        <translation>Izvedi ukaz, ko je najboljši blok spremenjen (%s je v cmd zamenjan za iskalnik blokov)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
@@ -3266,10 +2118,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>To sporočilo pomoči</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Nemogoče je povezati s/z %s na tem računalniku (povezava je vrnila napaka %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Omogoči DNS poizvedbe za -addnode, -seednode in -connect.</translation>
@@ -3282,41 +2130,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Napaka pri nalaganju wallet.dat: denarnica pokvarjena</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Napaka pri nalaganju wallet.dat: denarnica zahteva novejšo različico Bitcoina</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Denarnica mora biti prepisana: ponovno zaženite Bitcoin za doknčanje</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Napaka pri nalaganju wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Neveljaven -proxy naslov: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Neznano omrežje določeno v -onlynet: &apos;%s&apos;.</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Neveljaven -proxy naslov: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Neznano -socks zahtevan zastopnik različice: %i</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Neznano omrežje določeno v -onlynet: '%s'.</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Nemogoče rešiti -bind naslova: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Nemogoče rešiti -bind naslova: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Nemogoče rešiti -externalip naslova: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Nemogoče rešiti -externalip naslova: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Neveljavna količina za -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Neveljavna količina za -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3362,13 +2198,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Napaka</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Potrebno je nastaviti rpcpassword=&lt;password&gt; v nastavitveni datoteki:
-%s
-Če datoteka ne obstaja jo ustvarite z dovoljenjem, da jo lahko bere samo uporabnik.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 65e37ff90392..f779e391c029 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="sq" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Krijo një adresë të re</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopjo adresën e zgjedhur në memorjen e sistemit </translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Fshi</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Futni frazkalimin</translation>
@@ -163,21 +51,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Përsërisni frazkalimin e ri</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Futni frazkalimin e ri në portofol.&lt;br/&gt;Ju lutemi përdorni një frazkalim prej&lt;b&gt;10 ose më shumë shkronjash të rastësishme&lt;b/&gt;, ose tetë apo më shumë fjalë&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Enkripto portofolin</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Ky veprim ka nevojë per frazkalimin e portofolit tuaj që të ç&apos;kyç portofolin.</translation>
+        <translation>Ky veprim ka nevojë per frazkalimin e portofolit tuaj që të ç'kyç portofolin.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation>ç&apos;kyç portofolin.</translation>
+        <translation>ç'kyç portofolin.</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
@@ -199,30 +83,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>Konfirmoni enkriptimin e portofolit</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Portofoli u enkriptua</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>Enkriptimi i portofolit dështoi</translation>
@@ -237,7 +101,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>ç&apos;kyçja e portofolit dështoi</translation>
+        <translation>ç'kyçja e portofolit dështoi</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
@@ -247,17 +111,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>Dekriptimi i portofolit dështoi</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Duke u sinkronizuar me rrjetin...</translation>
@@ -266,10 +122,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Përmbledhje</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Trego një përmbledhje te përgjithshme të portofolit</translation>
@@ -282,3087 +134,453 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Browse transaction history</source>
         <translation>Shfleto historinë e transaksioneve</translation>
     </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quit application</source>
         <translation>Mbyllni aplikacionin</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Trego informacionin rreth Botkoin-it</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>&amp;Opsione</translation>
     </message>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Ndrysho frazkalimin e përdorur per enkriptimin e portofolit</translation>
     </message>
     <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <source>&amp;File</source>
+        <translation>&amp;Skedar</translation>
     </message>
     <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Settings</source>
+        <translation>&amp;Konfigurimet</translation>
     </message>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ndihmë</translation>
     </message>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <source>Tabs toolbar</source>
+        <translation>Shiriti i mjeteve</translation>
     </message>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testo rrjetin]</translation>
     </message>
     <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <source>Up to date</source>
+        <translation>I azhornuar</translation>
     </message>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>Catching up...</source>
+        <translation>Duke u azhornuar...</translation>
     </message>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Sent transaction</source>
+        <translation>Dërgo transaksionin</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Incoming transaction</source>
+        <translation>Transaksion në ardhje</translation>
     </message>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i ç'kyçur&lt;/b&gt;</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation>Ndrysho frazkalimin e përdorur per enkriptimin e portofolit</translation>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i kyçur&lt;/b&gt;</translation>
     </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sasia</translation>
     </message>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresë</translation>
     </message>
     <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(pa etiketë)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Ndrysho Adresën</translation>
     </message>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Etiketë</translation>
     </message>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Adresa</translation>
     </message>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>Adresë e re pritëse</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Adresë e re dërgimi</translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>Ndrysho adresën pritëse</translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>ndrysho adresën dërguese</translation>
     </message>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Adresa e dhënë "%1" është e zënë në librin e adresave. </translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation>&amp;Skedar</translation>
+        <source>Could not unlock wallet.</source>
+        <translation>Nuk mund të ç'kyçet portofoli.</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation>&amp;Konfigurimet</translation>
+        <source>New key generation failed.</source>
+        <translation>Krijimi i çelësit të ri dështoi.</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>&amp;Help</source>
-        <translation>&amp;Ndihmë</translation>
+        <source>Options</source>
+        <translation>Opsionet</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Tabs toolbar</source>
-        <translation>Shiriti i mjeteve</translation>
+        <source>Form</source>
+        <translation>Formilarë</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation>[testo rrjetin]</translation>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Transaksionet e fundit&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sasia</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiketë:</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresë</translation>
     </message>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sasia</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiketë</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiketë</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Sasia</translation>
     </message>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n lidhje aktive me rrjetin e Bitkoin</numerusform><numerusform>%n lidhje aktive me rrjetin e Bitkoin</numerusform></translation>
+        <source>(no label)</source>
+        <translation>(pa etiketë)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Dërgo Monedha</translation>
     </message>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Dërgo marrësve të ndryshëm njëkohësisht</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Balance:</source>
+        <translation>Balanca:</translation>
     </message>
     <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <source>Confirm the send action</source>
+        <translation>Konfirmo veprimin e dërgimit</translation>
     </message>
     <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>konfirmo dërgimin e monedhave</translation>
     </message>
     <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Shuma e paguar duhet të jetë më e madhe se 0.</translation>
     </message>
     <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(pa etiketë)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>Sh&amp;uma:</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>Paguaj &amp;drejt:</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Krijoni një etiketë për këtë adresë që t'ja shtoni librit të adresave</translation>
     </message>
     <message>
-        <source>Up to date</source>
-        <translation>I azhornuar</translation>
+        <source>&amp;Label:</source>
+        <translation>&amp;Etiketë:</translation>
     </message>
     <message>
-        <source>Catching up...</source>
-        <translation>Duke u azhornuar...</translation>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Sent transaction</source>
-        <translation>Dërgo transaksionin</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Ngjit nga memorja e sistemit</translation>
     </message>
     <message>
-        <source>Incoming transaction</source>
-        <translation>Transaksion në ardhje</translation>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i ç&apos;kyçur&lt;/b&gt;</translation>
+        <source>Paste address from clipboard</source>
+        <translation>Ngjit nga memorja e sistemit</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i kyçur&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>ClientModel</name>
+    <name>SplashScreen</name>
     <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testo rrjetin]</translation>
     </message>
 </context>
 <context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Hapur deri më %1</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
+        <source>%1/unconfirmed</source>
+        <translation>%1/I pakonfirmuar</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adresë</translation>
+        <source>%1 confirmations</source>
+        <translation>%1 konfirmimet</translation>
     </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pa etiketë)</translation>
+        <source>Amount</source>
+        <translation>Sasia</translation>
     </message>
     <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, nuk është transmetuar me sukses deri tani</translation>
     </message>
     <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>i/e panjohur</translation>
     </message>
 </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Ndrysho Adresën</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Etiketë</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Adresa</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>Adresë e re pritëse</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>Adresë e re dërgimi</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>Ndrysho adresën pritëse</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>ndrysho adresën dërguese</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Adresa e dhënë &quot;%1&quot; është e zënë në librin e adresave. </translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Nuk mund të ç&apos;kyçet portofoli.</translation>
+        <source>Transaction details</source>
+        <translation>Detajet e transaksionit</translation>
     </message>
     <message>
-        <source>New key generation failed.</source>
-        <translation>Krijimi i çelësit të ri dështoi.</translation>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Ky panel tregon një përshkrim të detajuar të transaksionit</translation>
     </message>
 </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
     <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Lloji</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresë</translation>
     </message>
     <message>
-        <source>version</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Hapur deri më %1</translation>
     </message>
     <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>I/E konfirmuar(%1 konfirmime)</translation>
     </message>
     <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Ky bllok është marrë nga ndonjë nyje dhe ka shumë mundësi të mos pranohet! </translation>
     </message>
     <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>I krijuar por i papranuar</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Marrë me</translation>
     </message>
     <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Dërguar drejt</translation>
     </message>
     <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Pagesë ndaj vetvetes</translation>
     </message>
     <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minuar</translation>
     </message>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(p/a)</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TransactionView</name>
     <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Marrë me</translation>
     </message>
     <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Dërguar drejt</translation>
     </message>
     <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minuar</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Data</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Lloji</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Etiketë</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Adresë</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Dërgo Monedha</translation>
     </message>
 </context>
 <context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Opsionet</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Formilarë</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaksionet e fundit&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Futni një adresë Bitkoini (p.sh. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiketë:</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresë</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketë</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketë</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pa etiketë)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Dërgo Monedha</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>Dërgo marrësve të ndryshëm njëkohësisht</translation>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>Balanca:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Konfirmo veprimin e dërgimit</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation>konfirmo dërgimin e monedhave</translation>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation>Shuma e paguar duhet të jetë më e madhe se 0.</translation>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(pa etiketë)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation>Sh&amp;uma:</translation>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation>Paguaj &amp;drejt:</translation>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation>Krijoni një etiketë për këtë adresë që t&apos;ja shtoni librit të adresave</translation>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Etiketë:</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Ngjit nga memorja e sistemit</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation>Ngjit nga memorja e sistemit</translation>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+P</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Futni një adresë Bitkoini (p.sh. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testo rrjetin]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Hapur deri më %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/I pakonfirmuar</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 konfirmimet</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, nuk është transmetuar me sukses deri tani</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>i/e panjohur</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>Detajet e transaksionit</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Ky panel tregon një përshkrim të detajuar të transaksionit</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Lloji</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresë</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Hapur deri më %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>I/E konfirmuar(%1 konfirmime)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Ky bllok është marrë nga ndonjë nyje dhe ka shumë mundësi të mos pranohet! </translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>I krijuar por i papranuar</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Marrë me</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Dërguar drejt</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Pagesë ndaj vetvetes</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minuar</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(p/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Marrë me</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Dërguar drejt</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minuar</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>Data</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>Lloji</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Etiketë</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresë</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Sasia</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Dërgo Monedha</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index 901eb59394d5..f5723efece37 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sr" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="sr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Прави нову адресу</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копира изабрану адресу на системски клипборд</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Избриши</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Зарезом одвојене вредности (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Унесите лозинку</translation>
@@ -163,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Поновите нову лозинку</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Унесите нову лозинку за приступ новчанику.&lt;br/&gt;Молимо Вас да лозинка буде &lt;b&gt;10 или више насумице одабраних знакова&lt;/b&gt;, или &lt;b&gt;осам или више речи&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Шифровање новчаника</translation>
@@ -207,14 +91,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Да ли сте сигурни да желите да се новчаник шифује?</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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Новчаник је шифрован</translation>
@@ -254,10 +130,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Синхронизација са мрежом у току...</translation>
@@ -266,10 +138,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Општи преглед</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Погледајте општи преглед новчаника</translation>
@@ -290,10 +158,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Напустите програм</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Прегледајте информације о Bitcoin-у</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>О &amp;Qt-у</translation>
@@ -318,26 +182,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Change Passphrase...</source>
         <translation>Промени &amp;лозинку...</translation>
     </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>Пошаљите новац на bitcoin адресу</translation>
@@ -346,61 +190,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Modify configuration options for Bitcoin</source>
         <translation>Изаберите могућности bitcoin-а</translation>
     </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Мењање лозинке којом се шифрује новчаник</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet</source>
         <translation>новчаник</translation>
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Пошаљи</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -422,102 +222,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </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></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Ажурно</translation>
@@ -550,68 +254,16 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Новчаник јс &lt;b&gt;шифрован&lt;/b&gt; и тренутно &lt;b&gt;закључан&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount:</source>
         <translation>Iznos:</translation>
     </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Amount</source>
         <translation>iznos</translation>
@@ -624,18 +276,10 @@ Address: %4
         <source>Date</source>
         <translation>datum</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Potvrdjen</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>kopiraj adresu</translation>
@@ -649,2596 +293,516 @@ Address: %4
         <translation>kopiraj iznos</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(без етикете)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Измени адресу</translation>
     </message>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Етикета</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Адреса</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Унешена адреса "%1" се већ налази у адресару.</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>Немогуће откључати новчаник.</translation>
     </message>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>version</source>
+        <translation>верзија</translation>
     </message>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Korišćenje:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Поставке</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>&amp;Unit to show amounts in:</source>
+        <translation>&amp;Јединица за приказивање износа:</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Форма</translation>
     </message>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Wallet</source>
+        <translation>новчаник</translation>
     </message>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Недавне трансакције&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>iznos</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Етикета</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>kopiraj naziv</translation>
     </message>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>kopiraj iznos</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адреса</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>iznos</translation>
     </message>
     <message>
-        <source>none</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Етикета</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>datum</translation>
     </message>
     <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Етикета</translation>
     </message>
     <message>
-        <source>no</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>iznos</translation>
     </message>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(без етикете)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Слање новца</translation>
     </message>
     <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(без етикете)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>Измени адресу</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Етикета</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Адреса</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Унешена адреса &quot;%1&quot; се већ налази у адресару.</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Немогуће откључати новчаник.</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>верзија</translation>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation>Korišćenje:</translation>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>Поставке</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation>&amp;Јединица за приказивање износа:</translation>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation>&amp;OK</translation>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>Форма</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation>новчаник</translation>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Недавне трансакције&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (n.pr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Етикета</translation>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>kopiraj naziv</translation>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>kopiraj iznos</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адреса</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>iznos</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Етикета</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>datum</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Етикета</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>iznos</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(без етикете)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Слање новца</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation>Iznos:</translation>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation>Потврди акцију слања</translation>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation>&amp;Пошаљи</translation>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>kopiraj iznos</translation>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(без етикете)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Етикета</translation>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+П</translation>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation>Poruka:</translation>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation>Alt+A</translation>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation>Alt+П</translation>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Unesite Bitcoin adresu (n.pr. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation>Otvorite do %1</translation>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation>%1/nepotvrdjeno</translation>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation>%1 potvrde</translation>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>datum</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation>етикета</translation>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>iznos</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation>, nije još uvek uspešno emitovan</translation>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation>nepoznato</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation>detalji transakcije</translation>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation>Ovaj odeljak pokazuje detaljan opis transakcije</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>tip</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адреса</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>iznos</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation>Otvoreno do %1</translation>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation>Potvrdjena (%1 potvrdjenih)</translation>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Ovaj blok nije primljen od ostalih čvorova (nodova) i verovatno neće biti prihvaćen!</translation>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation>Generisan ali nije prihvaćen</translation>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Primljen sa</translation>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation>Primljeno od</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Poslat ka</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation>Isplata samom sebi</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minirano</translation>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(n/a)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Status vaše transakcije. Predjite mišem preko ovog polja da bi ste videli broj konfirmacija</translation>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation>Datum i vreme primljene transakcije.</translation>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation>Tip transakcije</translation>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation>Destinacija  i adresa transakcije</translation>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation>Iznos odbijen ili dodat balansu.</translation>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>Sve</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>Danas</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>ove nedelje</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>Ovog meseca</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>Prošlog meseca</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>Ove godine</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>Opseg...</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation>Primljen sa</translation>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>Poslat ka</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation>Vama - samom sebi</translation>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation>Minirano</translation>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation>Drugi</translation>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation>Navedite adresu ili naziv koji bi ste potražili</translation>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation>Min iznos</translation>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation>kopiraj adresu</translation>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation>kopiraj naziv</translation>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation>kopiraj iznos</translation>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation>promeni naziv</translation>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Зарезом одвојене вредности (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation>Potvrdjen</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>datum</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>tip</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Етикета</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Адреса</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>iznos</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation>Opseg:</translation>
-    </message>
-    <message>
-        <source>to</source>
-        <translation>do</translation>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>Слање новца</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Korišćenje:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Listaj komande</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Zatraži pomoć za komande</translation>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation>Opcije</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Potvrdi željeni konfiguracioni fajl (podrazumevani:bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Konkretizuj pid fajl (podrazumevani: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation>Gde je konkretni data direktorijum </translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Slušaj konekcije na &lt;port&gt; (default: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Održavaj najviše &lt;n&gt; konekcija  po priključku (default: 125)
-</translation>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation>Prihvati komandnu liniju i JSON-RPC komande</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Radi u pozadini kao daemon servis i prihvati komande</translation>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation>Koristi testnu mrežu</translation>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
+        <source>Amount:</source>
+        <translation>Iznos:</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Потврди акцију слања</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
+        <source>S&amp;end</source>
+        <translation>&amp;Пошаљи</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>kopiraj iznos</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(без етикете)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Етикета</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+П</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
+        <source>Message:</source>
+        <translation>Poruka:</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+</translation>
     </message>
     <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+П</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Otvoreno do %1</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/nepotvrdjeno</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 potvrde</translation>
     </message>
     <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>datum</translation>
     </message>
     <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
+        <source>label</source>
+        <translation>етикета</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>iznos</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, nije još uvek uspešno emitovan</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>nepoznato</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>detalji transakcije</translation>
     </message>
     <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Ovaj odeljak pokazuje detaljan opis transakcije</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>datum</translation>
     </message>
     <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>tip</translation>
     </message>
     <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адреса</translation>
     </message>
     <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>Otvoreno do %1</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Potvrdjena (%1 potvrdjenih)</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Ovaj blok nije primljen od ostalih čvorova (nodova) i verovatno neće biti prihvaćen!</translation>
     </message>
     <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Generisan ali nije prihvaćen</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Primljen sa</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
+        <source>Received from</source>
+        <translation>Primljeno od</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Poslat ka</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Isplata samom sebi</translation>
     </message>
     <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minirano</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(n/a)</translation>
     </message>
     <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Status vaše transakcije. Predjite mišem preko ovog polja da bi ste videli broj konfirmacija</translation>
     </message>
     <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Datum i vreme primljene transakcije.</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Tip transakcije</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Destinacija  i adresa transakcije</translation>
     </message>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Iznos odbijen ili dodat balansu.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Sve</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Danas</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>ove nedelje</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Ovog meseca</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Prošlog meseca</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Ove godine</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Opseg...</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Primljen sa</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Poslat ka</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Vama - samom sebi</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Minirano</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Drugi</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Navedite adresu ili naziv koji bi ste potražili</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Min iznos</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>kopiraj adresu</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>kopiraj naziv</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>kopiraj iznos</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>promeni naziv</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Зарезом одвојене вредности (*.csv)</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Potvrdjen</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>datum</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>tip</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Етикета</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Адреса</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Opseg:</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>do</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Слање новца</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Backup Wallet</source>
+        <translation>Backup новчаника</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Opcije</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Potvrdi željeni konfiguracioni fajl (podrazumevani:bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>Konkretizuj pid fajl (podrazumevani: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Gde je konkretni data direktorijum </translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
+        <translation>Slušaj konekcije na &lt;port&gt; (default: 8333 or testnet: 18333)</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
+        <translation>Održavaj najviše &lt;n&gt; konekcija  po priključku (default: 125)
+</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Prihvati komandnu liniju i JSON-RPC komande</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Radi u pozadini kao daemon servis i prihvati komande</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Koristi testnu mrežu</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Korisničko ime za JSON-RPC konekcije</translation>
     </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>верзија</translation>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Lozinka za JSON-RPC konekcije</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Dozvoli JSON-RPC konekcije sa posebne IP adrese</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Pošalji komande to nodu koji radi na &lt;ip&gt; (default: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
         <translation>Odredi veličinu zaštićenih ključeva na &lt;n&gt; (default: 100)</translation>
@@ -3251,10 +815,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Koristi OpenSSL (https) za  JSON-RPC konekcije</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Server private key (default: server.pem)</source>
         <translation>privatni ključ za Server (podrazumevan: server.pem)</translation>
@@ -3263,14 +823,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Ova poruka Pomoći</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>učitavam adrese....</translation>
@@ -3279,70 +831,18 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Грешка током учитавања wallet.dat: Новчаник је покварен      </translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Грешка током учитавања wallet.dat: Новчанику је неопходна нова верзија Bitcoin-a.</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Грешка током учитавања wallet.dat      </translation>
     </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading block index...</source>
         <translation>Učitavam blok indeksa...</translation>
     </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Loading wallet...</source>
         <translation>Новчаник се учитава...</translation>
     </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Ponovo skeniram...</translation>
@@ -3351,19 +851,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Done loading</source>
         <translation>Završeno učitavanje</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index e98048e925d4..8e771c5ce7db 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1,42 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Om Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Core&lt;/b&gt;-version</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Detta är experimentell mjukvara.
-
-
-Distribuerad under mjukvarulicensen MIT/X11, se den medföljande filen COPYING eller http://www.opensource.org/licenses/mit-license.php.
-
-Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit (http://www.openssl.org/) och kryptografisk mjukvara utvecklad av Eric Young (eay@cryptsoft.com) samt UPnP-mjukvara skriven av Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core-utvecklarna</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="sv" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -132,8 +94,9 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <translation>Exporteringen misslyckades</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Det inträffade ett fel när adresslistan skulle sparas till %1.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Det inträffade ett fel när adresslistan skulle sparas till %1.
+Var vänlig och försök igen.</translation>
     </message>
 </context>
 <context>
@@ -169,10 +132,6 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>Repeat new passphrase</source>
         <translation>Upprepa nytt lösenord</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Ange plånbokens nya lösenord. &lt;br/&gt; Använd ett lösenord på &lt;b&gt;10 eller fler slumpmässiga tecken,&lt;/b&gt; eller &lt;b&gt;åtta eller fler ord.&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Kryptera plånbok</translation>
@@ -225,6 +184,10 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>Wallet encrypted</source>
         <translation>Plånboken är krypterad</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Ange plånbokens nya lösenord. &lt;br/&gt; Använd ett lösenord på &lt;b&gt;tio eller fler slumpmässiga tecken,&lt;/b&gt; eller &lt;b&gt;åtta eller fler ord.&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Programmet kommer nu att stänga ner för att färdigställa krypteringen. Tänk på att en krypterad plånbok inte skyddar mot stöld om din dator är infekterad med en keylogger.</translation>
@@ -278,7 +241,7 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>Visa översiktsvy av plånbok</translation>
+        <translation>Visa generell översikt av plånboken</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -296,10 +259,6 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>Quit application</source>
         <translation>Avsluta programmet</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Visa information om Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>Om &amp;Qt</translation>
@@ -336,6 +295,10 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>Open &amp;URI...</source>
         <translation>Öppna &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klient</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importerar block från disk...</translation>
@@ -346,7 +309,7 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation>Skicka mynt till en Bitcoin-adress</translation>
+        <translation>Skicka bitcoins till en Bitcoin-adress</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
@@ -358,7 +321,7 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Byt lösenord för kryptering av plånbok</translation>
+        <translation>Byt lösenfras för kryptering av plånbok</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
@@ -388,6 +351,10 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>&amp;Receive</source>
         <translation>&amp;Ta emot</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Visa information om Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Visa / Göm</translation>
@@ -402,11 +369,11 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Signera meddelanden med din Bitcoinadress för att bevisa att du äger dem</translation>
+        <translation>Signera meddelanden med din Bitcoin-adress för att bevisa att du äger dem</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Verifiera meddelanden för att vara säker på att de var signerade med den specificerade Bitcoin-adressen</translation>
+        <translation>Verifiera meddelanden för att vara säker på att de var signerade med specificerade Bitcoin-adresser</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -460,22 +427,14 @@ Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användni
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Visa Bitcoin Core hjälpmeddelande för att få en lista med möjliga Bitcoin kommandoradsalternativ.</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-klient</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n aktiv anslutning till Bitcoin-nätverket</numerusform><numerusform>%n aktiva anslutningar till Bitcoin-nätverket</numerusform></translation>
+        <translation><numerusform>%n aktiva anslutningar till Bitcoin-nätverket.</numerusform><numerusform>%n aktiva anslutningar till Bitcoin-nätverket.</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
         <translation>Ingen block-källa tillgänglig...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Bearbetat %1 av %2 (uppskattade) block av transaktionshistorik.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Bearbetat %1 block i transaktionshistoriken.</translation>
@@ -560,10 +519,6 @@ Adress: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Denna plånbok är &lt;b&gt;krypterad&lt;/b&gt; och för närvarande &lt;b&gt;låst&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ett allvarligt fel har uppstått. Bitcoin kan inte längre köras säkert och kommer att avslutas.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -599,8 +554,8 @@ Adress: %4
         <translation>Avgift:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Låg utmatning:</translation>
+        <source>Dust:</source>
+        <translation>Damm:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -691,8 +646,8 @@ Adress: %4
         <translation>Kopiera prioritet</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Kopiera låg utmatning</translation>
+        <source>Copy dust</source>
+        <translation>Kopiera damm</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,10 +697,6 @@ Adress: %4
         <source>none</source>
         <translation>ingen</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>Damm</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>ja</translation>
@@ -771,25 +722,13 @@ Adress: %4
         <translation>Transaktioner med högre prioritet har större sannolikhet att inkluderas i ett block.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Denna etikett blir röd om prioriteten är mindre än &quot;medium&quot;.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Denna etikett blir röd om prioriteten är mindre än "medium".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Denna etikett blir röd om någon mottagare får en betalning som är mindre än %1.</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Detta betyder att en avgift på minst %1 behövs.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Belopp mindre än 0.546 gånger den minsta vidarebefordringsavgiften visa som damm.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Denna etikett blir röd om växeln är mindre än %1.</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(Ingen etikett)</translation>
@@ -842,12 +781,12 @@ Adress: %4
         <translation>Redigera avsändaradress</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Den angivna adressen &quot;%1&quot; finns redan i adressboken.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Den angivna adressen "%1" finns redan i adressboken.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Den angivna adressen &quot;%1&quot; är inte en giltig Bitcoin-adress.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Den angivna adressen "%1" är inte en giltig Bitcoin-adress.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -883,10 +822,6 @@ Adress: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Core - Kommandoradsalternativ</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Kärna</translation>
@@ -895,6 +830,18 @@ Adress: %4
         <source>version</source>
         <translation>version</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Om Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Kommandoradsalternativ</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Användning:</translation>
@@ -908,8 +855,8 @@ Adress: %4
         <translation>UI alternativ</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Ändra språk, till exempel &quot;de_DE&quot; (förvalt: systemets språk)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Ändra språk, till exempel "de_DE" (förvalt: systemets språk)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -955,12 +902,12 @@ Adress: %4
         <translation>Använd en anpassad datakatalog:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Kärna</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Fel: Den angivna datakatalogen &quot;%1&quot; kan inte skapas.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Fel: Den angivna datakatalogen "%1" kan inte skapas.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1036,6 +983,14 @@ Adress: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Antalet skript &amp; verifikationstrådar</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Acceptera anslutningar utifrån</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Acceptera inkommande anslutningar</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Anslut till Bitcoin-nätverket genom en SOCKS-proxy.</translation>
@@ -1116,14 +1071,6 @@ Adress: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Proxyns port (t.ex. 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>SOCKS version av proxyn (t.ex. 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Fönster</translation>
@@ -1164,14 +1111,6 @@ Adress: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Välj en måttenhet att visa när du skickar mynt.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Anger om Bitcoin-adresser skall visas i transaktionslistan.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Visa adresser i transaktionslistan</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Om myntkontrollfunktioner skall visas eller inte</translation>
@@ -1227,6 +1166,10 @@ Adress: %4
         <source>Wallet</source>
         <translation>Plånbok</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Granska-bara:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Tillgängligt:</translation>
@@ -1259,6 +1202,22 @@ Adress: %4
         <source>Your current total balance</source>
         <translation>Ditt nuvarande totala saldo</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Ditt nuvarande saldo i granska-bara adresser</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Okonfirmerade transaktioner till granska-bara adresser</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Den genererade balansen i granska-bara adresser som ännu inte har mognat</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Nuvarande total balans i granska-bara adresser</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Nyligen genomförda transaktioner&lt;/b&gt;</translation>
@@ -1275,8 +1234,24 @@ Adress: %4
         <translation>URI hantering</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI går inte att tolkas! Detta kan orsakas av en ogiltig Bitcoin-adress eller felaktiga URI parametrar.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Felaktig betalningsadress %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Betalningsbegäran avslogs</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Betalningsbegärans nätverk matchar inte klientens nätverk.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Tiden för betalningsbegäran gick ut</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Betalningsbegäran är inte initierad.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1290,25 +1265,21 @@ Adress: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Kan inte starta bitcoin: klicka-och-betala handhavare</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>Varningar från näthanteraren</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Din aktiva proxy stödjer inte SOCKS5, vilket är nödvändigt för att använda betalningsbegäran via proxy.</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Betalningsbegärans hämta URL är felaktig: %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 går inte att tolkas! Detta kan orsakas av en ogiltig Bitcoin-adress eller felaktiga URI parametrar.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Hantering av betalningsbegäransfil</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>Betalningsbegäransfilen kan inte läsas eller behandlas! Detta kan orsakas av en felaktig betalningsbegäransfil.</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Betalningsbegäransfilen kan inte läsas! Detta kan orsakas av en felaktig betalningsbegäransfil.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1323,8 +1294,8 @@ Adress: %4
         <translation>Kommunikationsfel med %1: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Betalningsbegäran kan inte läsas eller behandlas!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Betalningsbegäran kan inte behandlas!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1339,31 +1310,66 @@ Adress: %4
         <translation>Fel vid närverksbegäran</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Användaragent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adress/Värdnamn</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Pingtid</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Mängd</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Fel: Den angivna datakatalogen &quot;%1&quot; finns inte.</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Ange en Bitcoin-adress (t.ex. %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Fel: Kan inte läsa konfigurationsfilen: %1. Använd bara nyckel=värde formatet.</translation>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Fel: Felaktig kombination av -regtest och -testnet.</translation>
+        <source>%1 h</source>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Core avslutades inte ännu säkert...</translation>
+        <source>%1 m</source>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ange en Bitcoin-adress (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>NÄTVERK</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>OKÄND</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Ingen</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>ej tillgänglig</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1415,6 +1421,10 @@ Adress: %4
         <source>Using OpenSSL version</source>
         <translation>Använder OpenSSL version</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Använder BerkeleyDB versionen</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Uppstartstid</translation>
@@ -1440,8 +1450,76 @@ Adress: %4
         <translation>Aktuellt antal block</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Beräknade totala block</translation>
+        <source>Received</source>
+        <translation>Mottagen</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Skickad</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Klienter</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Välj en klient för att se detaljerad information.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Riktning</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Version</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Användaragent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Tjänster</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Syncnod</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Starthöjd</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Synchöjd</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Banpoäng</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Anslutningstid</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Senast sänt</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Senast mottagen</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes sänt</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes mottaget</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Pingtid</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1465,7 +1543,7 @@ Adress: %4
     </message>
     <message>
         <source>Totals</source>
-        <translation>Totalt</translation>
+        <translation>Totalt:</translation>
     </message>
     <message>
         <source>In:</source>
@@ -1520,24 +1598,40 @@ Adress: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 m</translation>
+        <source>via %1</source>
+        <translation>via %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 h</translation>
+        <source>never</source>
+        <translation>aldrig</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Inkommande</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 h %2 m</translation>
+        <source>Outbound</source>
+        <translation>Utgående</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Ja</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>Nej</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Okänd</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Hämtar...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation>%Belopp:</translation>
-    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Etikett:</translation>
@@ -1743,10 +1837,6 @@ Adress: %4
         <source>Fee:</source>
         <translation>Avgift:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Låg utmatning:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Efter avgift:</translation>
@@ -1775,6 +1865,10 @@ Adress: %4
         <source>Clear all fields of the form.</source>
         <translation>Rensa alla formulärfälten</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Damm:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Rensa &amp;alla</translation>
@@ -1823,10 +1917,6 @@ Adress: %4
         <source>Copy priority</source>
         <translation>Kopiera prioritet</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Kopiera låg utmatning</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopiera växel</translation>
@@ -1879,6 +1969,10 @@ Adress: %4
         <source>Warning: Unknown change address</source>
         <translation>Varning: Okänd växeladress</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiera damm</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Är du säker på att du vill skicka?</translation>
@@ -1887,14 +1981,6 @@ Adress: %4
         <source>added as transaction fee</source>
         <translation>adderad som transaktionsavgift</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Tiden för betalningsbegäran gick ut</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Felaktig betalningsadress %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1906,10 +1992,6 @@ Adress: %4
         <source>Pay &amp;To:</source>
         <translation>Betala &amp;Till:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen som betalningen skall skickas till  (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Ange ett namn för den här adressen och lägg till den i din adressbok</translation>
@@ -1926,6 +2008,10 @@ Adress: %4
         <source>This is a normal payment.</source>
         <translation>Detta är en normal betalning.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Bitcoinadress att sända betalning till</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1997,8 +2083,8 @@ Adress: %4
         <translation>Du kan signera meddelanden med dina adresser för att bevisa att du äger dem. Var försiktig med vad du signerar eftersom phising-attacker kan försöka få dig att skriva över din identitet till någon annan. Signera bara väldetaljerade påståenden du kan gå i god för.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen att signera meddelandet med  (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Bitcoinadress att signera meddelandet med</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2053,8 +2139,8 @@ Adress: %4
         <translation>Skriv in din adress, meddelande (se till att du kopierar radbrytningar, mellanslag, tabbar, osv. exakt) och signatur nedan för att verifiera meddelandet. Var noga med att inte läsa in mer i signaturen än vad som finns i det signerade meddelandet, för att undvika att luras av en man-in-the-middle attack.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Adressen som meddelandet var signerat med  (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Bitcoinadressen som meddelandet signerades med</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2069,12 +2155,8 @@ Adress: %4
         <translation>Rensa alla fält</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ange en Bitcoin-adress (t.ex. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>Klicka &quot;Signera Meddelande&quot; för att få en signatur</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>Klicka "Signera Meddelande" för att få en signatur</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2201,6 +2283,10 @@ Adress: %4
         <source>own address</source>
         <translation>egen adress</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>granska-bara</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etikett</translation>
@@ -2211,7 +2297,7 @@ Adress: %4
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
-        <translation><numerusform>mognar om %n block</numerusform><numerusform>mognar om %n fler block</numerusform></translation>
+        <translation><numerusform>mognar om %n fler block</numerusform><numerusform>mognar om %n fler block</numerusform></translation>
     </message>
     <message>
         <source>not accepted</source>
@@ -2221,6 +2307,14 @@ Adress: %4
         <source>Debit</source>
         <translation>Belasta</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Total skuld</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Total kredit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transaktionsavgift</translation>
@@ -2246,8 +2340,8 @@ Adress: %4
         <translation>Handlare</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Genererade mynt måste vänta %1 block innan de kan användas. När du skapade detta block sändes det till nätverket för att läggas till i blockkedjan. Om blocket inte kommer in i kedjan kommer dess status att ändras till &quot;accepteras inte&quot; och kommer ej att gå att spendera. Detta kan ibland hända om en annan nod genererar ett block nästan samtidigt som dig.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Genererade mynt måste vänta %1 block innan de kan användas. När du skapade detta block sändes det till nätverket för att läggas till i blockkedjan. Om blocket inte kommer in i kedjan kommer dess status att ändras till "accepteras inte" och kommer ej att gå att spendera. Detta kan ibland hända om en annan nod genererar ett block nästan samtidigt som dig.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2311,10 +2405,6 @@ Adress: %4
         <source>Address</source>
         <translation>Adress</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Mängd</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Omogen (%1 konfirmeringar, blir tillgänglig efter %2)</translation>
@@ -2504,7 +2594,7 @@ Adress: %4
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Kommaseparerad fil (*. csv)</translation>
+        <translation>Kommaseparerad fil (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2526,10 +2616,6 @@ Adress: %4
         <source>Address</source>
         <translation>Adress</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Mängd</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2543,6 +2629,13 @@ Adress: %4
         <translation>till</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>&amp;Enhet att visa belopp i. Klicka för att välja annan enhet.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2594,18 +2687,6 @@ Adress: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Användning:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Lista kommandon</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Få hjälp med ett kommando</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Inställningar:</translation>
@@ -2646,10 +2727,6 @@ Adress: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv4: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>Lyssna på JSON-RPC-anslutningar på &lt;port&gt; (förvalt: 8332 eller testnet: 18332)</translation>
@@ -2658,10 +2735,6 @@ Adress: %4
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Tillåt kommandon från kommandotolken och JSON-RPC-kommandon</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Core RPC-klient version</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Kör i bakgrunden som tjänst och acceptera kommandon</translation>
@@ -2684,7 +2757,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, du behöver sätta ett rpclösensord i konfigurationsfilen:
 %s
@@ -2695,17 +2768,13 @@ rpcpassword=%s
 Användarnamnet och lösenordet FÅR INTE bara detsamma.
 Om filen inte existerar, skapa den med enbart ägarläsbara filrättigheter.
 Det är också rekommenderat att sätta alertnotify så du meddelas om problem;
-till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Accepterade krypteringsalgoritmer  (förvalt: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv6, faller tillbaka till IPV4: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind till given adress och lyssna alltid på den. Använd [värd]:port notation för IPv6</translation>
@@ -2715,17 +2784,13 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Antalsbegränsa kontinuerligt fria transaktioner till &lt;n&gt;*1000 bytes per minut (förvalt:15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Ange regressiontestläge, som använder en speciell kedja i vilka block kan lösas omedelbart. Detta är avsett för regressiontestnings verktyg och applikationsutveckling.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Ta bort alla plånbokstransaktioner och återskapa bara dom som är en del av blockkedjan genom att ange -rescan vid uppstart</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ange regressiontestläge, som använder en speciell kedja i vilka block kan lösas omedelbart.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Fel: Avlyssning av inkommande anslutningar misslyckades (Avlyssningen returnerade felkod %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Fel: Transaktionen avslogs! Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här.</translation>
@@ -2738,10 +2803,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Avgifter mindre än detta betraktas som nollavgift (för transaktionsskapande) (förvalt:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>Töm databasens minnespool till disk varje &lt;n&gt; megabytes (förvalt: 100)</translation>
@@ -2778,10 +2839,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer Bitcoin inte fungera korrekt.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Varning: Nätverket verkar inte vara helt överens! Några miners verkar ha problem.</translation>
@@ -2814,30 +2871,14 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Försök att rädda de privata nycklarna från en korrupt wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Core tjänsten</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Block skapande inställningar:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Töm listan över plånbokstransaktioner (diagnostikverktyg; medför -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Koppla enbart upp till den/de specificerade noden/noder</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Anslut genom SOCKS-proxy</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Anslut till JSON-RPC på &lt;port&gt; (förval: 8332 eller testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Anslutningsoptioner:</translation>
@@ -2938,18 +2979,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Failed to write undo data</source>
         <translation>Misslyckades att skriva ångradata</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Avgift per kB att lägga till på transaktioner du skickar</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Avgifter mindre än detta betraktas som nollavgift (för vidarebefodran) (förvalt:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Sök efter klienter med DNS sökningen (förvalt: 1 om inte -connect)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Tvångskör i säkert läge (förvalt: 0)</translation>
@@ -2975,8 +3004,8 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Felaktig eller inget genesisblock hittades. Fel datadir för nätverket?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Ogiltig -onion adress:&apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Ogiltig -onion adress:'%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2986,18 +3015,10 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Skriv ut tidsstämpel i avlusningsinformationen (förvalt: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC klientoptioner:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Välj SOCKS-version att använda för -proxy (4 eller 5, förvalt: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Sätt databasens cachestorlek i megabyte (%d till %d, förvalt: %d)</translation>
@@ -3019,12 +3040,12 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Spendera okonfirmerad växel när transaktioner sänds (förvalt: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Detta är avsett för regressionstestningsverktyg och applikationsutveckling.</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Sluta köra efter importen av block från disk är klar (förvalt: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Användning (föråldrat, använd bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Detta är avsett för regressionstestningsverktyg och applikationsutveckling.</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3034,10 +3055,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Verifying wallet...</source>
         <translation>Verifierar plånboken...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>Vänta på att RPC.servern startar</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Plånbok %s ligger utanför datakatalogen %s</translation>
@@ -3046,10 +3063,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Plånboksinställningar:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Varning: Föråldrat argument -debugnet ignorerad, använd -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Du måste återskapa databasen med -reindex för att ändra -txindex</translation>
@@ -3058,33 +3071,157 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerar block från extern blk000??.dat fil</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(förvalt: 1, 1 = spara tx metadata t.ex. kontoägare och betalningsbegäransinformation, 2 = släng tx metadata)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Tillåt JSON-RPC anslutningar från specifik kalla. Tillåtet för &lt;ip&gt; är enkel IP (t.ex 1.2.3.4), en nätverk/nätmask (t.ex. 1.2.3.4/255.255.255.0) eller ett nätverk/CIDR (t.ex. 1.2.3.4/24). Denna option kan specificeras flera gånger</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Ett fel uppstod vid upprättandet av RPC adress %s port %u för att lyssna: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Bind till given adress och vitlista klienter som ansluter till den. Använd [värd]:port notation för IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Bind till angiven adress för att lyssna på JSON-RPC anslutningar. Använd [värd]:port notation for IPv6. Denna option kan specificeras flera gånger (förvalt: bind till alla gränssnitt)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Kan inte låsa data-mappen %s. Bitcoin Core körs förmodligen redan.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Skapa nya filer med systemets förvalda rättigheter, istället för umask 077 (bara effektivt med avaktiverad plånboks funktionalitet)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuerad under MIT/X11 mjukvarulicens, se den bifogade filen COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Fel: Avlyssning av inkommande anslutningar misslyckades (Avlyssningen returnerade felkod %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Fel: Argumentet -socks stöds inte. Att sätta SOCKS version är inte möjligt längre. Endast SOCKS5 proxy stöds.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Kör kommando när en nätverks tx återspenderar plånbokens tx input (%s=återspendera TxID, %t=plånbok TxID)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Exekvera kommando när ett relevant meddelande är mottagen eller när vi ser en väldigt lång förgrening (%s i cmd är utbytt med ett meddelande)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Avgifter (i BTC/Kb) mindre än detta betraktas som nollavgift för vidarebefodran (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Avgifter (i BTC/Kb) mindre än detta betraktas som nollavgift för transaktionsskapande (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Om paytxfee inte är satt, inkludera tillräcklig avgift så att transaktionen konfirmeras inom n blocks (förvalt: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Skriv ut avlusningsinformation (förvalt: 0, att ange &lt;category&gt; är frivilligt)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sätt den maximala storleken av hög-prioriterade/låg-avgifts transaktioner i byte (förvalt: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; och kryptografisk mjukvara utvecklad av Eric Young samt UPnP-mjukvara skriven av Thomas Bernard.</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>Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer Bitcoin Core inte att fungera korrekt.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Vitlista klienter som ansluter från angivna nätmasker eller ip adresser. Kan specificeras flera gånger.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Vitlistade klienter kan inte bli DoS bannade och deras transaktioner reläas alltid, även om dom redan är i mempoolen, användbart för t.ex en gateway  </translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Sök alltid efter klientadresser med DNS sökningen (förvalt: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Kan inte matcha -whitebind adress: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Anslut genom SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Bitcoin Core Utvecklarna</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Kunde inte tolka -rpcbind värdet %s som en nätverksadress</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Fel vid inläsningen av wallet.dat: Kontofilen kräver en senare version av Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Fel: Argumentet -tor stöds inte, använd -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Avgift (i BTC/Kb) att lägga till på transaktioner du skickar (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Inkludera IP-adresser i debugutskrift (förvalt: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Information</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ogiltigt belopp för -minrelaytxfee=&lt;belopp&gt;: &apos;%s&apos;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Initieringschecken fallerade. Bitcoin Core stängs av...</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ogiltigt belopp för -minrelaytxfee=&lt;belopp&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ogiltigt belopp för -mintxfee=&lt;belopp&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ogiltigt belopp för -mintxfee=&lt;belopp&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Ogiltigt belopp för -paytxfee=&lt;belopp&gt;:'%s' (måste vara minst %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ogiltig nätmask angiven i -whitelist: '%s'</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Håll som mest &lt;n&gt; oanslutningsbara block i minnet (förvalt: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3106,6 +3243,14 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Maximal buffert för sändning per anslutning, &lt;n&gt;*1000 byte (förvalt: 5000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Port måste anges med -whitelist: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Nodreläoptioner:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Acceptera bara blockkedjans matchande inbyggda kontrollpunkter (förvalt: 1)</translation>
@@ -3139,16 +3284,16 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <translation>Slupmässigt brus 1 gång varje &lt;n&gt; nätverksmeddelande</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kör en tråd för att tömma plånboken periodiskt (förvalt: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Reläa och bearbeta databärartransaktioner (förvalt: 1) </translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-inställningar: (se Bitcoin-wikin för SSL-setup instruktioner)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>Reläa icke P2SH multisig (förvalt: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Sänd kommando till Bitcoin Core</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Kör en tråd för att tömma plånboken periodiskt (förvalt: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3166,10 +3311,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Visa alla avlusningsoptioner (använd: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Visa riktmärknings information (förvalt: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Krymp debug.log filen vid klient start (förvalt: 1 vid ingen -debug)</translation>
@@ -3182,14 +3323,14 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Ange timeout för uppkoppling i millisekunder (förvalt: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Starta Bitcoin Core tjänsten</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Systemfel:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Detta är experimentmjukvara.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transaktions belopp för liten</translation>
@@ -3202,6 +3343,10 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Transaction too large</source>
         <translation>Transaktionen är för stor</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 0)</translation>
@@ -3214,6 +3359,10 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Username for JSON-RPC connections</source>
         <translation>Användarnamn för JSON-RPC-anslutningar</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Kontot behöver sparas om: Starta om Bitcoin Core för att fullfölja</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Varning</translation>
@@ -3222,6 +3371,14 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Varning: denna version är föråldrad, uppgradering krävs!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Varning:  Argument -benchmark stöds inte och ignoreras, använd -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Varning: Argument -debugnet stöds inte och ignorerad, använd -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Töm plånboken på alla transaktioner...</translation>
@@ -3230,10 +3387,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>on startup</source>
         <translation>under uppstarten</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>version</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat korrupt, räddning misslyckades</translation>
@@ -3242,14 +3395,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Password for JSON-RPC connections</source>
         <translation>Lösenord för JSON-RPC-anslutningar</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Tillåt JSON-RPC-anslutningar från specifika IP-adresser</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Skicka kommandon till klient på &lt;ip&gt; (förvalt: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Exekvera kommando när det bästa blocket ändras (%s i cmd är utbytt av blockhash)</translation>
@@ -3282,10 +3427,6 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>This help message</source>
         <translation>Det här hjälp medelandet</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Tillåt DNS-sökningar för -addnode, -seednode och -connect</translation>
@@ -3298,41 +3439,29 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fel vid inläsningen av wallet.dat: Plånboken är skadad</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Fel vid inläsningen av wallet.dat: Plånboken kräver en senare version av Bitcoin</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Plånboken behöver skrivas om: Starta om Bitcoin för att färdigställa</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fel vid inläsning av plånboksfilen wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Ogiltig -proxy adress: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Ogiltig -proxy adress: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>Okänt nätverk som anges i -onlynet: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>Okänt nätverk som anges i -onlynet: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Okänd -socks proxy version begärd: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Kan inte matcha -bind adress: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>Kan inte matcha -bind adress: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Kan inte matcha -externalip adress: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>Kan inte matcha -externalip adress: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Ogiltigt belopp för -paytxfee=&lt;belopp&gt;:&apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ogiltigt belopp för -paytxfee=&lt;belopp&gt;:'%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3378,13 +3507,5 @@ till exempel: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo
         <source>Error</source>
         <translation>Fel</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Du behöver välja ett rpclösensord i konfigurationsfilen:
-%s
-Om filen inte existerar, skapa den med filrättigheten endast läsbar för ägaren.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index 54e15a75e00a..cb52be61b295 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="th_TH" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="th_TH" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>สร้างที่อยู่ใหม่</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>คัดลอกที่อยู่ที่ถูกเลือกไปยัง คลิปบอร์ดของระบบ</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;ลบ</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>คั่นไฟล์ด้วยเครื่องหมายจุลภาค (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +39,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>ใส่รหัสผ่าน</translation>
@@ -163,10 +51,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>กรุณากรอกรหัสผ่านใหม่อีกครั้งหนึ่ง</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>ใส่รหัสผ่านใหม่ให้กับกระเป๋าเงิน. &lt;br/&gt; กรุณาใช้รหัสผ่านของ &lt;b&gt; 10 หรือแบบสุ่มมากกว่าตัวอักษร &lt;/ b&gt; หรือ &lt;b&gt; แปดหรือมากกว่าคำ &lt;/ b&gt;</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>กระเป๋าสตางค์ที่เข้ารหัส</translation>
@@ -199,30 +83,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Confirm wallet encryption</source>
         <translation>ยืนยันการเข้ารหัสกระเป๋าสตางค์</translation>
     </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>กระเป๋าสตางค์ถูกเข้ารหัสเรียบร้อยแล้ว</translation>
     </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet encryption failed</source>
         <translation>การเข้ารหัสกระเป๋าสตางค์ผิดพลาด</translation>
@@ -247,17 +111,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet decryption failed</source>
         <translation>ถอดรหัสกระเป๋าเงินล้มเหลว</translation>
     </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>กำลังทำข้อมูลให้ตรงกันกับเครือข่าย ...</translation>
@@ -266,10 +122,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;ภาพรวม</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>แสดงภาพรวมทั่วไปของกระเป๋าเงิน</translation>
@@ -282,126 +134,18 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Browse transaction history</source>
         <translation>เรียกดูประวัติการทำธุรกรรม</translation>
     </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quit application</source>
         <translation>ออกจากโปรแกรม</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>แสดงข้อมูลเกี่ยวกับ Bitcoin</translation>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Options...</source>
         <translation>&amp;ตัวเลือก...</translation>
     </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>เปลี่ยนรหัสผ่านที่ใช้สำหรับการเข้ารหัสกระเป๋าเงิน</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;ไฟล์</translation>
@@ -422,102 +166,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ที่ใช้งานการเชื่อมต่อกับเครือข่าย Bitcoin</numerusform></translation>
     </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>ทันสมัย</translation>
@@ -534,14 +186,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Incoming transaction</source>
         <translation>การทำรายการขาเข้า</translation>
     </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>ระเป๋าเงินถูก &lt;b&gt;เข้ารหัส&lt;/b&gt; และในขณะนี้ &lt;b&gt;ปลดล็อคแล้ว&lt;/b&gt;</translation>
@@ -550,2819 +194,213 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>กระเป๋าเงินถูก &lt;b&gt;เข้ารหัส&lt;/b&gt; และในปัจจุบัน &lt;b&gt;ล็อค &lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>ที่อยู่</translation>
     </message>
     <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(ไม่มีชื่อ)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>แก้ไขที่อยู่</translation>
     </message>
     <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;ชื่อ</translation>
     </message>
     <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;ที่อยู่</translation>
     </message>
     <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
+        <source>New receiving address</source>
+        <translation>ที่อยู่ผู้รับใหม่</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>ที่อยู่ผู้ส่งใหม่</translation>
     </message>
     <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>แก้ไขที่อยู่ผู้รับ</translation>
     </message>
     <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
+        <source>Edit sending address</source>
+        <translation>แก้ไขที่อยู่ผู้ส่ง</translation>
     </message>
     <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>ป้อนที่อยู่ "%1" ที่มีอยู่แล้วในสมุดที่อยู่</translation>
     </message>
     <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>ไม่สามารถปลดล็อคกระเป๋าเงิน</translation>
     </message>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>สร้างกุญแจใหม่ล้มเหลว</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>ตัวเลือก</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Address</source>
-        <translation>ที่อยู่</translation>
+        <source>Form</source>
+        <translation>รูป</translation>
     </message>
     <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;รายการทำธุรกรรมล่าสุด&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>ที่อยู่</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>ชื่อ</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>ชื่อ</translation>
     </message>
     <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(ไม่มีชื่อ)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>ส่งเหรียญ</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(ไม่มีชื่อ)</translation>
     </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(ไม่มีชื่อ)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation>แก้ไขที่อยู่</translation>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation>&amp;ชื่อ</translation>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation>&amp;ที่อยู่</translation>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation>ที่อยู่ผู้รับใหม่</translation>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation>ที่อยู่ผู้ส่งใหม่</translation>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation>แก้ไขที่อยู่ผู้รับ</translation>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation>แก้ไขที่อยู่ผู้ส่ง</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>ป้อนที่อยู่ &quot;%1&quot; ที่มีอยู่แล้วในสมุดที่อยู่</translation>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation>ไม่สามารถปลดล็อคกระเป๋าเงิน</translation>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation>สร้างกุญแจใหม่ล้มเหลว</translation>
-    </message>
-</context>
+    <name>SendCoinsEntry</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>ShutdownWindow</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
 </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>ที่อยู่</translation>
     </message>
-</context>
+    </context>
 <context>
-    <name>OpenURIDialog</name>
+    <name>TransactionView</name>
     <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>วันนี้</translation>
     </message>
     <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>คั่นไฟล์ด้วยเครื่องหมายจุลภาค (*.csv)</translation>
     </message>
     <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>ชื่อ</translation>
     </message>
     <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>ที่อยู่</translation>
     </message>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>ส่งเหรียญ</translation>
     </message>
 </context>
 <context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation>ตัวเลือก</translation>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation>รูป</translation>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;รายการทำธุรกรรมล่าสุด&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>ที่อยู่</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>ชื่อ</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>ชื่อ</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(ไม่มีชื่อ)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>ส่งเหรียญ</translation>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(ไม่มีชื่อ)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>ที่อยู่</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>วันนี้</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>คั่นไฟล์ด้วยเครื่องหมายจุลภาค (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>ชื่อ</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>ที่อยู่</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation>ส่งเหรียญ</translation>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index 15ec92f98291..b2a14c92fc4f 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>Bitcoin Çekirdeği hakkında</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Bitcoin Çekirdek&lt;/b&gt; sürümü</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
- Bu yazılım deneme safhasındadır.
-
- MIT/X11 yazılım lisansı kapsamında yayınlanmıştır, COPYING dosyasına ya da http://www.opensource.org/licenses/mit-license.php sayfasına bakınız.
-
- Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young (eay@cryptsoft.com) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Telif hakkı</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Çekirdeği geliştiricileri</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
-    </message>
-</context>
+<TS language="tr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>Dışa aktarım başarısız oldu</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>Adres listesinin %1 konumuna kaydedilmesi sırasında bir hata meydana geldi.</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Adres listesinin %1 konumuna kaydedilmesi sırasında bir hata meydana geldi. Lütfen tekrar deneyin.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +131,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Yeni parolayı tekrarlayınız</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Cüzdanınız için yeni parolayı giriniz.&lt;br/&gt;Lütfen &lt;b&gt;10 ya da daha fazla rastgele karakter&lt;/b&gt; veya &lt;b&gt;sekiz ya da daha fazla kelime&lt;/b&gt; içeren bir parola seçiniz.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Cüzdanı şifrele</translation>
@@ -224,6 +183,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet encrypted</source>
         <translation>Cüzdan şifrelendi</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Cüzdan için yeni parolayı giriniz.&lt;br/&gt;Lütfen &lt;b&gt;on ya da daha fazla rastgele karakter&lt;/b&gt; veya &lt;b&gt;sekiz ya da daha fazla kelime&lt;/b&gt; içeren bir parola kullanınız.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Şifreleme işlemini tamamlamak için Bitcoin şimdi kapanacaktır. Cüzdanınızı şifrelemenin, Bitcoinlerinizin bilgisayara bulaşan kötücül bir yazılım tarafından çalınmaya karşı tamamen koruyamayacağını unutmayınız.</translation>
@@ -295,10 +258,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Uygulamadan çık</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Bitcoin hakkında bilgi göster</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>&amp;Qt hakkında</translation>
@@ -335,6 +294,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>&amp;URI aç...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Çekirdeği istemcisi</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Bloklar diskten içe aktarılıyor...</translation>
@@ -387,6 +350,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>&amp;Al</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Bitcoin Çekirdeği hakkında bilgi göster</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Göster / Sakla</translation>
@@ -433,7 +400,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Ödeme talep et (QR kodu ve bitcoin URI&apos;si oluşturur)</translation>
+        <translation>Ödeme talep et (QR kodu ve bitcoin URI'si oluşturur)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -459,10 +426,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Bitcoin komut satırı seçeneklerinin listesini elde etmek için Bitcoin Çekirdeği yardım mesajını göster</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin istemcisi</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>Bitcoin şebekesine %n faal bağlantı</numerusform><numerusform>Bitcoin şebekesine %n faal bağlantı</numerusform></translation>
@@ -471,10 +434,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>Hiçbir blok kaynağı mevcut değil...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>Muamele tarihçesinin toplam (tahmini) %2 blokundan %1 blok işlendi.</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>Muamele tarihçesinde %1 blok işlendi.</translation>
@@ -559,10 +518,6 @@ Adres: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Cüzdan &lt;b&gt;şifrelenmiştir&lt;/b&gt; ve şu anda &lt;b&gt;kilitlidir&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Ciddi bir hata oluştu. Bitcoin artık güvenli bir şekilde işlemeye devam edemez ve kapanacaktır.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +553,8 @@ Adres: %4
         <translation>Ücret:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>Düşük çıktı:</translation>
+        <source>Dust:</source>
+        <translation>Toz:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +645,8 @@ Adres: %4
         <translation>Önceliği kopyala</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>Düşük çıktıyı kopyala</translation>
+        <source>Copy dust</source>
+        <translation>Tozu kopyala</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -742,8 +697,8 @@ Adres: %4
         <translation>boş</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>Toz</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Giriş başına +/- %1 satoshi olarak değişebilir.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -770,24 +725,12 @@ Adres: %4
         <translation>Yüksek öncelikli muamelelerin bir bloğa dahil olmaları daha olasıdır.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>Eğer öncelik &quot;ortadan&quot; düşükse bu etiket kırmızı olur.</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Eğer öncelik "ortadan" düşükse bu etiket kırmızı olur.</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>Eğer herhangi bir alıcı %1&apos;den düşük bir meblağ alırsa bu etiket kırmızı olur.</translation>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>Bu, en az %1 tutarında bir ücret gerektiği anlamına gelir.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>Asgari yönlendirme ücretinin 0.546 oranının altındaki meblağlar toz olarak gösterilir.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Eğer para üstü %1&apos;den düşükse bu etiket kırmızı olur.</translation>
+        <translation>Eğer herhangi bir alıcı %1'den düşük bir meblağ alırsa bu etiket kırmızı olur.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -841,12 +784,12 @@ Adres: %4
         <translation>Gönderi adresini düzenle</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation>Girilen &quot;%1&quot; adresi hâlihazırda adres defterinde mevcuttur.</translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Girilen "%1" adresi hâlihazırda adres defterinde mevcuttur.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation>Girilen &quot;%1&quot; adresi geçerli bir Bitcoin adresi değildir.</translation>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Girilen "%1" adresi geçerli bir Bitcoin adresi değildir.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -882,10 +825,6 @@ Adres: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>Bitcoin Çekirdeği - Komut satırı seçenekleri</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Çekirdeği</translation>
@@ -894,6 +833,18 @@ Adres: %4
         <source>version</source>
         <translation>sürüm</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Bitcoin Çekirdeği hakkında</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Komut satırı seçenekleri</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Kullanım:</translation>
@@ -907,8 +858,8 @@ Adres: %4
         <translation>Kullanıcı arayüzü seçenekleri</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Lisan belirt, mesela &quot;de_De&quot; (varsayılan: sistem dili)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Lisan belirt, mesela "de_De" (varsayılan: sistem dili)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -954,12 +905,12 @@ Adres: %4
         <translation>Özel bir veri klasörü kullan:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Çekirdeği</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>Hata: belirtilen &quot;%1&quot; veri klasörü oluşturulamaz.</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Hata: belirtilen "%1" veri klasörü oluşturulamaz.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -982,7 +933,7 @@ Adres: %4
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation>Dosyadan veya URI&apos;den ödeme talebi aç</translation>
+        <translation>Dosyadan veya URI'den ödeme talebi aç</translation>
     </message>
     <message>
         <source>URI:</source>
@@ -1009,7 +960,7 @@ Adres: %4
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Muamelelerin hızlı işlenmesini garantilemeye yardım eden, seçime dayalı kB başı muamele ücreti. Muamelelerin çoğunluğunun boyutu 1 kB&apos;dir.</translation>
+        <translation>Muamelelerin hızlı işlenmesini garantilemeye yardım eden, seçime dayalı kB başı muamele ücreti. Muamelelerin çoğunluğunun boyutu 1 kB'dir.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
@@ -1017,11 +968,11 @@ Adres: %4
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Sistemde oturum açıldığında Bitcoin&apos;i otomatik olarak başlat.</translation>
+        <translation>Sistemde oturum açıldığında Bitcoin'i otomatik olarak başlat.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>Bitcoin&apos;i sistem oturumuyla &amp;başlat</translation>
+        <translation>Bitcoin'i sistem oturumuyla &amp;başlat</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
@@ -1035,6 +986,14 @@ Adres: %4
         <source>Number of script &amp;verification threads</source>
         <translation>İş parçacıklarını &amp;denetleme betiği sayısı</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Dışarıdan gelen bağlantıları kabul et</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Gelen bağlantılara izin ver</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Bitcoin şebekesine bir SOCKS vekil sunucusu vasıtasıyla bağlan.</translation>
@@ -1049,11 +1008,11 @@ Adres: %4
     </message>
     <message>
         <source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
-        <translation>Muameleler sekmesinde bağlam menüsü unsurları olarak görünen üçüncü taraf bağlantıları (mesela bir blok tarayıcısı). URL&apos;deki %s, muamele hash değeri ile değiştirilecektir. Birden çok bağlantılar düşey çubuklar | ile ayrılacaktır.</translation>
+        <translation>Muameleler sekmesinde bağlam menüsü unsurları olarak görünen üçüncü taraf bağlantıları (mesela bir blok tarayıcısı). URL'deki %s, muamele hash değeri ile değiştirilecektir. Birden çok bağlantılar düşey çubuklar | ile ayrılacaktır.</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation>Üçüncü taraf muamele URL&apos;leri</translation>
+        <translation>Üçüncü taraf muamele URL'leri</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1115,14 +1074,6 @@ Adres: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Vekil sunucunun portu (mesela 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS &amp;sürümü:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Vekil sunucunun SOCKS sürümü (mesela 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Pencere</translation>
@@ -1163,14 +1114,6 @@ Adres: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Bitcoin gönderildiğinde arayüzde gösterilecek varsayılan alt birimi seçiniz.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Muamele listesinde Bitcoin adreslerinin gösterilip gösterilmeyeceklerini belirler.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>Muamele listesinde adresleri &amp;göster</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>Para kontrol özelliklerinin gösterilip gösterilmeyeceğini ayarlar.</translation>
@@ -1226,6 +1169,10 @@ Adres: %4
         <source>Wallet</source>
         <translation>Cüzdan</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Sadece-izlenen:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Mevcut:</translation>
@@ -1258,6 +1205,22 @@ Adres: %4
         <source>Your current total balance</source>
         <translation>Güncel toplam bakiyeniz</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Sadece izlenen adreslerdeki güncel bakiyeniz</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Sadece izlenen adreslere gelen teyit edilmemiş muameleler</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Sadece izlenen adreslerin henüz olgunlaşmamış oluşturulan bakiyeleri</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Sadece izlenen adreslerdeki güncel toplam bakiye</translation>
+    </message>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;Son muameleler&lt;/b&gt;</translation>
@@ -1274,8 +1237,24 @@ Adres: %4
         <translation>URI yönetimi</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI okunamadı! Sebebi geçersiz bir Bitcoin adresi veya hatalı URI parametreleri olabilir.</translation>
+        <source>Invalid payment address %1</source>
+        <translation>Geçersiz ödeme adresi %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Ödeme talebi reddedildi</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Ödeme talebi şebekesi istemci şebekesine denk gelmiyor.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Ödeme talebinin ömrü doldu.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Ödeme talebi başlatılmamış.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1290,23 +1269,19 @@ Adres: %4
         <translation>Bitcoin başlatılamadı: tıkla-ve-öde yöneticisi</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation>Şebeke yöneticisi uyarısı</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>Faal vekil sunucunuz, vekil vasıtasıyla ödeme talepleri için gereken SOCKS5&apos;i desteklememektedir.</translation>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>Ödeme talebini alma URL'i geçersiz: %1</translation>
     </message>
     <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation>Ödeme talebini alma URL&apos;i geçersiz: %1</translation>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>URI okunamadı! Sebebi geçersiz bir Bitcoin adresi veya hatalı URI parametreleri olabilir.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Ödeme talebi dosyası yönetimi</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
         <translation>Ödeme talebi okunamaz ya da işlenemez! Bunun sebebi geçersiz bir ödeme talebi dosyası olabilir.</translation>
     </message>
     <message>
@@ -1322,8 +1297,8 @@ Adres: %4
         <translation>%1 ile iletişimde hata: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>Ödeme talebi ayrıştırılamaz ya da işlenemez!</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Ödeme talebi ayrıştırılamaz!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1338,31 +1313,66 @@ Adres: %4
         <translation>Şebeke talebi hatası</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Kullanıcı Yazılımı</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adres/Makine ismi</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping Zamanı</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Meblağ</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Bir Bitcoin adresi giriniz (mesela %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 g</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Hata: belirtilen &quot;%1&quot; veri klasörü yoktur.</translation>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>ŞEBEKE</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Hata: %1 yapılandırma dosyası ayrıştırılamadı. Sadece anahtar=değer dizimini kullanınız.</translation>
+        <source>UNKNOWN</source>
+        <translation>BİLİNMİYOR</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Hata: -regtest ve -testnet&apos;in geçersiz kombinasyonu.</translation>
+        <source>None</source>
+        <translation>Boş</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>Bitcoin Çekirdeği henüz güvenli bir şekilde çıkış yapmamıştır...</translation>
+        <source>N/A</source>
+        <translation>Mevcut değil</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
@@ -1414,6 +1424,10 @@ Adres: %4
         <source>Using OpenSSL version</source>
         <translation>Kullanılan OpenSSL sürümü</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Kullanılan BerkeleyDB sürümü</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Başlama zamanı</translation>
@@ -1439,8 +1453,76 @@ Adres: %4
         <translation>Güncel blok sayısı</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Tahmini toplam blok sayısı</translation>
+        <source>Received</source>
+        <translation>Alınan</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Yollanan</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Eşler</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Ayrıntılı bilgi görmek için bir eş seçin.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Yön</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Sürüm</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Kullanıcı Yazılımı</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Servisler</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <translation>Eşleşme Düğümü</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Başlama Yüksekliği</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Eşleşme Yüksekliği</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Yasaklama Skoru</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Bağlantı Zamanı</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Son Gönderme</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Son Alma</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Yollanan Baytlar</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Alınan Baytlar</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping Zamanı</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1519,16 +1601,36 @@ Adres: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 d</translation>
+        <source>via %1</source>
+        <translation>%1 vasıtasıyla</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 s</translation>
+        <source>never</source>
+        <translation>asla</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Gelen</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Giden</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>Evet</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 s %2 d</translation>
+        <source>No</source>
+        <translation>Hayır</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Bilinmiyor</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Alınıyor...</translation>
     </message>
 </context>
 <context>
@@ -1622,7 +1724,7 @@ Adres: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>&amp;URI&apos;yi kopyala</translation>
+        <translation>&amp;URI'yi kopyala</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
@@ -1666,7 +1768,7 @@ Adres: %4
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>URI&apos;nin QR koduna kodlanmasında hata oluştu.</translation>
+        <translation>URI'nin QR koduna kodlanmasında hata oluştu.</translation>
     </message>
 </context>
 <context>
@@ -1742,10 +1844,6 @@ Adres: %4
         <source>Fee:</source>
         <translation>Ücret:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>Düşük çıktı:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>Ücretten sonra:</translation>
@@ -1774,6 +1872,10 @@ Adres: %4
         <source>Clear all fields of the form.</source>
         <translation>Formdaki tüm alanları temizle.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Toz:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Tümünü &amp;temizle</translation>
@@ -1822,10 +1924,6 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Önceliği kopyala</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>Düşük çıktıyı kopyala</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>Para üstünü kopyala</translation>
@@ -1878,6 +1976,10 @@ Adres: %4
         <source>Warning: Unknown change address</source>
         <translation>Uyarı: geçersiz para üstü adresi</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Tozu kopyala</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Göndermek istediğinizden emin misiniz?</translation>
@@ -1886,14 +1988,6 @@ Adres: %4
         <source>added as transaction fee</source>
         <translation>muamele ücreti olarak eklendi</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>Ödeme talebinin ömrü doldu</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>Geçersiz ödeme adresi %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1905,10 +1999,6 @@ Adres: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Şu adrese öde:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Ödemenin gönderileceği adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Adres defterinize eklemek için bu adrese ilişik bir etiket giriniz</translation>
@@ -1925,6 +2015,10 @@ Adres: %4
         <source>This is a normal payment.</source>
         <translation>Bu, normal bir ödemedir.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Ödemenin yollanacağı Bitcoin adresi</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1955,7 +2049,7 @@ Adres: %4
     </message>
     <message>
         <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation>Bitcoin: URI&apos;siyle ilişkili ve bilginiz için muameleyle saklanacak bir mesaj. Not: Bu mesaj Bitcoin şebekesi üzerinden gönderilmeyecektir.</translation>
+        <translation>Bitcoin: URI'siyle ilişkili ve bilginiz için muameleyle saklanacak bir mesaj. Not: Bu mesaj Bitcoin şebekesi üzerinden gönderilmeyecektir.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
@@ -1996,8 +2090,8 @@ Adres: %4
         <translation>Bir adresin sizin olduğunu ispatlamak için adresinizle mesaj imzalayabilirsiniz. Oltalama saldırılarının kimliğinizi imzanızla elde etmeyi deneyebilecekleri için belirsiz hiçbir şey imzalamamaya dikkat ediniz. Sadece ayrıntılı açıklaması olan ve tümüne katıldığınız ifadeleri imzalayınız.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Mesajın imzalanmasında kullanılacak adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Mesajın imzalanmasında kullanılacak Bitcoin adresi</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2052,8 +2146,8 @@ Adres: %4
         <translation>İmza için kullanılan adresi, mesajı (satır sonları, boşluklar, sekmeler vs. karakterleri tam olarak kopyaladığınızdan emin olunuz) ve imzayı aşağıda giriniz. Bir ortadaki adam saldırısı tarafından kandırılmaya mâni olmak için imzadan, imzalı mesajın içeriğini aşan bir anlam çıkarmamaya dikkat ediniz.</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Mesajı imzalamak için kullanılmış olan adres (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Mesajın imzalanmasında kullanılan Bitcoin adresi</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2068,12 +2162,8 @@ Adres: %4
         <translation>Tüm mesaj kontrolü alanlarını sıfırla</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Bitcoin adresi giriniz (mesela 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation>İmzayı oluşturmak için &quot;Mesaj İmzala&quot; unsurunu tıklayın</translation>
+        <source>Click "Sign Message" to generate signature</source>
+        <translation>İmzayı oluşturmak için "Mesaj İmzala" unsurunu tıklayın</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -2200,6 +2290,10 @@ Adres: %4
         <source>own address</source>
         <translation>kendi adresiniz</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>sadece-izlenen</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etiket</translation>
@@ -2220,6 +2314,14 @@ Adres: %4
         <source>Debit</source>
         <translation>Gelir</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Toplam gider</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Toplam gelir</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Muamele ücreti</translation>
@@ -2245,8 +2347,8 @@ Adres: %4
         <translation>Tüccar</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Oluşturulan bitcoin&apos;lerin harcanabilmelerinden önce %1 blok beklemeleri gerekmektedir. Bu blok, oluşturduğunuzda, blok zincirine eklenmesi için ağda yayınlandı. Zincire eklenmesi başarısız olursa, durumu &quot;kabul edilmedi&quot; olarak değiştirilecek ve harcanamayacaktır. Bu, bazen başka bir düğüm sizden birkaç saniye önce ya da sonra blok oluşturursa meydana gelebilir.</translation>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Oluşturulan bitcoin'lerin harcanabilmelerinden önce %1 blok beklemeleri gerekmektedir. Bu blok, oluşturduğunuzda, blok zincirine eklenmesi için ağda yayınlandı. Zincire eklenmesi başarısız olursa, durumu "kabul edilmedi" olarak değiştirilecek ve harcanamayacaktır. Bu, bazen başka bir düğüm sizden birkaç saniye önce ya da sonra blok oluşturursa meydana gelebilir.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2310,10 +2412,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Meblağ</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Olgunlaşmamış (%1 teyit, %2 teyit ardından kullanılabilir olacaktır)</translation>
@@ -2525,10 +2623,6 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Meblağ</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>Tanımlayıcı</translation>
@@ -2542,6 +2636,13 @@ Adres: %4
         <translation>ilâ</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Meblağları göstermek için birim. Başka bir birim seçmek için tıklayınız.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2593,18 +2694,6 @@ Adres: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Kullanım:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Komutları listele</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Bir komut için yardım al</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Seçenekler:</translation>
@@ -2645,21 +2734,13 @@ Adres: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Aksaklık gösteren eşlerle yeni bağlantıları engelleme süresi, saniye olarak (varsayılan: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>IPv4 üzerinde dinlemek için %u numaralı RPC portunun kurulumu sırasında hata meydana geldi: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>JSON-RPC bağlantılarını &lt;port&gt; üzerinde dinle (varsayılan: 8332 veya tesnet: 18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>Konut satırı ve JSON-RPC komutlarını kabul et</translation>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>Bitcoin Çekirdeği RPC istemci sürümü</translation>
+        <translation>Komut satırı ve JSON-RPC komutlarını kabul et</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
@@ -2683,7 +2764,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, şu yapılandırma dosyasında rpc parolası belirtmeniz gerekir:
 %s
@@ -2694,17 +2775,13 @@ rpcpassword=%s
 Kullanıcı ismi ile parolanın FARKLI olmaları gerekir.
 Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.
 Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye edilir;
-mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>Kabul edilebilir şifreler (varsayılan: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>IPv6 üzerinde dinlemek için %u numaralı RPC portu kurulurken bir hata meydana geldi, IPv4&apos;e dönülüyor: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Belirtilen adrese bağlan ve daima ondan dinle. IPv6 için [makine]:port yazımını kullanınız</translation>
@@ -2714,17 +2791,13 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Devamlı olarak ücretsiz muameleleri dakikada &lt;n&gt;*1000 bayt olarak sınırla (varsayılan: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Anında çözümlenebilen bloklar içeren ve özel zincir kullanan regresyon test kipine gir. Bu, uygulama geliştirme ve regresyon testi araçları için tasarlanmıştır.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Tüm cüzdan muamelelerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Blokların anında çözülebileceği özel bir zincir kullanan regresyon deneme kipine gir.</translation>
     </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>Hata: İçeri gelen bağlantıların dinlenmesi başarısız oldu (dinleme %d hatası verdi)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Hata: Muamele reddedildi! Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde.</translation>
@@ -2735,11 +2808,7 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s TxID ile değiştirilecektir)</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Bundan düşük ücretler sıfır değerinde sayılır (muamele oluşturulması için) (varsayılan:</translation>
+        <translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir)</translation>
     </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
@@ -2747,7 +2816,7 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
     </message>
     <message>
         <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>-checkblocks&apos;un blok kontrolünün ne kadar kapsamlı olacağı (0 ilâ 4, varsayılan: 3)</translation>
+        <translation>-checkblocks'un blok kontrolünün ne kadar kapsamlı olacağı (0 ilâ 4, varsayılan: 3)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
@@ -2777,10 +2846,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Uyarı: -paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Uyarı: Lütfen bilgisayarınızın tarih ve saatinin doğru olup olmadığını kontrol ediniz! Saatiniz doğru değilse Bitcoin gerektiği gibi çalışamaz.</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Uyarı: şebeke tamamen mutabık değil gibi görünüyor! Bazı madenciler sorun yaşıyor gibi görünüyor.</translation>
@@ -2813,30 +2878,14 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Bozuk bir wallet.dat dosyasından özel anahtarları geri kazanmayı dene</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>Bitcoin Çekirdek servisi</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Blok oluşturma seçenekleri:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Cüzdanın muamele listesini temizle (tanı aracı; -rescan ima eder)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Sadece belirtilen düğüme veya düğümlere bağlan</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>SOCKS vekil sunucusuyla bağlan</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>&lt;port&gt; numarasında JSON-RPC&apos;ye bağlan (varsayılan: 8332 veya testnet: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Bağlantı seçenekleri:</translation>
@@ -2937,18 +2986,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Failed to write undo data</source>
         <translation>Geri alma verilerinin yazılamadı</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Yolladığınız muameleler için eklenecek kB başı ücret</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Bundan düşük ücretler sıfır değerinde sayılacaktır (aktarım için) (varsayılan:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Eşleri DNS araması vasıtasıyla bul (varsayılan: 1, eğer -connect kullanılmadıysa)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>Güvenli kipi zorla (varsayılan: 0)</translation>
@@ -2974,8 +3011,8 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Yanlış ya da bulunamamış doğuş bloku. Şebeke için yanlış veri klasörü mü?</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Geçersiz -onion adresi: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Geçersiz -onion adresi: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2985,18 +3022,10 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>Hata ayıklama verilerinin önüne zaman damgası ekle (varsayılan: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC istemci seçenekleri:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blok zinciri indeksini güncel blk000??.dat dosyalarından tekrar inşa et</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>-proxy için SOCKS sürümünü seç (4 veya 5, varsayılan: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Veritabanı önbellek boyutunu megabayt olarak belirt (%d ilâ %d, varsayılan: %d)</translation>
@@ -3018,12 +3047,12 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Gönderme muamelelerinde teyit edilmemiş para üstünü harca (varsayılan: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Bu, regresyon deneme araçları ve uygulama geliştirmesi için tasarlanmıştır. </translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>Diskten blokları içeri aktardıktan sonra çalışmayı durdur (varsayılan: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Kullanım (önerilmemektedir, bitcoin-cli kullanın):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Bu, regresyon deneme araçları ve uygulama geliştirmesi için tasarlanmıştır. </translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3033,10 +3062,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Verifying wallet...</source>
         <translation>Cüzdan kontrol ediliyor...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>RPC sunucusunun başlamasını bekle</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>%s cüzdan %s veri klasörünün dışında bulunuyor</translation>
@@ -3045,45 +3070,165 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Cüzdan seçenekleri:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Uyarı: eskimiş seçenek -debugnet görmezden gelinir, -debug=net kullanınız</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation>-txindex&apos;i değiştirmek için veritabanını -reindex kullanarak tekrar inşa etmeniz gerekmektedir</translation>
+        <translation>-txindex'i değiştirmek için veritabanını -reindex kullanarak tekrar inşa etmeniz gerekmektedir</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Harici blk000??.dat dosyasından blokları içe aktarır</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(varsayılan: 1, 1 = tx meta verilerini tut mesela hesap sahibi ve ödeme talebi bilgileri, 2 = tx meta verilerini at)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Belirtilen kaynaktan JSON-RPC bağlantılarını kabul et. Bir &lt;ip&gt; için geçerli olanlar şunlardır: salt IP adresi (mesela 1.2.3.4), bir şebeke/ağ maskesi (örneğin 1.2.3.4/255.255.255.0) ya da bir şebeke/CIDR (mesela 1.2.3.4/24). Bu seçenek birden fazla kez belirtilebilir</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Dinleme için RPC adresi %s port %u kurulurken bir hata meydana geldi: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Belirtilen adrese bağlan ve ona bağlanan eşleri beyaz listeye al. IPv6 için [makine]:port imlasını kullanınız</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Belirtilen adrese bağlan ve JSON RPC bağlantıları için dinlemeye geç. IPv6 için [makine]:port imlasını kullanınız. Bu seçenek birden çok kez belirtilebilir (varsayılan: tüm arayüzlere bağlan)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>%s veri dizininde kilit elde edilemedi. Bitcoin Çekirdeği muhtemelen hâlihazırda çalışmaktadır.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Yeni dosyaları umask 077 yerine varsayılan izinlerle oluştur (sadece devre dışı cüzdan işlevselliği ile etkilidir)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>MIT/X11 yazılım lisansı kapsamında yayınlanmıştır, ekteki COPYING dosyasına ya da &lt;http://www.opensource.org/licenses/mit-license.php&gt; adresine bakınız.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Hata: İçeri gelen bağlantıların dinlenmesi başarısız oldu (dinleme %s hatasını verdi)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Hata: Desteklenmeyen -socks argümanı bulundu. SOCKS sürümünün ayarlanması artık mümkün değildir, sadece SOCKS5 vekilleri desteklenmektedir.</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>Bir şebeke muamelesi cüzdan muamele girdisini tekrar harcadığında komut çalıştır (%s=tekrar harcama muamele kimliği, %t=cüzdan muamele kimliği)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>İlgili bir uyarı alındığında ya da gerçekten uzun bir çatallama gördüğümüzde komutu çalıştır (komuttaki %s mesaj ile değiştirilir)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Kb başına BTC olarak bundan düşük ücretler aktarım için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Kb başına BTC olarak bundan düşük ücretler muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>Eğer paytxfee ayarlanmadıysa, kafi derecede ücret ekleyin ki muameleler vasati n blok içinde teyit edilsin (varsayılan: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>Hata ayıklama bilgisi dök (varsayılan:0, &lt;kategori&gt; sağlanması seçime dayalıdır)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Yüksek öncelikli/düşük ücretli muamelelerin azami boyutunu bayt olarak ayarla (varsayılan: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young (eay@cryptsoft.com) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir.</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>Uyarı: Lütfen bilgisayarınızın saat ve tarihinin doğru olduğunu kontol ediniz! Saatinizde gecikme varsa Bitcoin Çekirdeği doğru şekilde çalışamaz.</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>Belirtilen ağ maskesi ya da IP adresinden bağlanan eşleri beyaz listeye al. Birden fazla kez belirtilebilir.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Beyaz listeye alınan eşler DoS yasaklamasına uğramazlar ve muameleleri zaten mempool'da olsalar da daima aktarılır, bu mesela bir geçit için kullanışlıdır</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>Eş adreslerini daima DNS araması ile sorgula (varsayılan: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>-whitebind adresi çözümlenemedi: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>SOCKS5 vekil sunucusu vasıtasıyla bağlan</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Telif hakkı 2009-%i Bitcoin Çekirdeği Geliştiricileri</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>-rpcbind değeri %s şebeke adresi olarak ayrıştırılamadı</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>wallet.dat dosyasının yüklenmesinde hata: Cüzdan Bitcoin Çekirdeğinin daha yeni bir sürümünü gerektirmektedir</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Hata: Deskteklenmeyen -tor argümanı bulundu, -onion kullanınız.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Yolladığınız muamelelere kB başına BTC olarak eklenecek ücret (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>Hata ayıklama çıktısına IP adreslerini dahil et (varsayılan: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Bilgi</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-minrelaytxfee=&lt;amount&gt; için geçersiz meblağ: &apos;%s&apos;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Başlatma sınaması başarısız oldu. Bitcoin Çekirdeği kapatılıyor.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-minrelaytxfee=&lt;amount&gt; için geçersiz meblağ: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-mintxfee=&lt;amount&gt; için geçersiz meblağ: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>-paytxfee=&lt;tutar&gt;:'%s' unsurunda geçersiz tutar (asgari %s olması lazımdır)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>-whitelist: '%s' unsurunda geçersiz bir ağ maskesi belirtildi</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-mintxfee=&lt;amount&gt; için geçersiz meblağ: &apos;%s&apos;</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Hafızada en çok &lt;n&gt; bağlanılamaz blok tut (varsaylan: %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3105,6 +3250,14 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>Bağlantı başına azami yollama tamponu, &lt;n&gt;*1000 bayt (varsayılan: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>-whitebind: '%s' ile bir port belirtilmesi lazımdır</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Düğüm röle seçenekleri:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>Sadece yerleşik kontrol noktalarıyla eşleşen blok zincirini kabul et (varsayılan: 1)</translation>
@@ -3138,16 +3291,16 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <translation>Her &lt;n&gt; şebeke mesajından rastgele birini bulanıklaştır</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Periyodik olarak cüdanı diske yazdırmak için bir iş parçacığı çalıştır (varsayılan: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>Veri taşıyıcı muameleleri oluştur ve aktar (varsayılan: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation> SSL seçenekleri: (SSL kurulum bilgisi için Bitcoin vikisine bakınız)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>P2SH olmayan çoklu imzaları aktar (varsayılan: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>Bitcoin Çekirdeğine komut yolla</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>Periyodik olarak cüdanı diske yazdırmak için bir iş parçacığı çalıştır (varsayılan: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3165,10 +3318,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Tüm hata ayıklama seçeneklerini göster (kullanımı: --help -help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Denektaşı verilerini göster (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>İstemci başlatıldığında debug.log dosyasını küçült (varsayılan: -debug bulunmadığında 1)</translation>
@@ -3181,14 +3330,14 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (varsayılan: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>Bitcoin Çekirdeği servisini başlat</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Sistem hatası:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Bu, deneysel bir yazılımdır.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Muamele meblağı çok düşük</translation>
@@ -3201,6 +3350,10 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Transaction too large</source>
         <translation>Muamele çok büyük</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Bu bilgisayarda %s unsuruna bağlanılamadı (bağlanma %s hatasını verdi)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: 0)</translation>
@@ -3213,6 +3366,10 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC bağlantıları için kullanıcı ismi</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Cüzdanın tekrar yazılması gerekmektedir: tamamlamak için Bitcoin Çekirdeğini yeniden başlatın</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Uyarı</translation>
@@ -3221,6 +3378,14 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Uyarı: Bu sürüm çok eskidir, güncellemeniz gerekir!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Uyarı: Deskteklenmeyen -benchmark argümanı görmezden gelindi, -debug=bench kullanınız.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Uyarı: Desteklenmeyen -debugnet argümanı görmezden gelindi, debug=net kullanınız.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Cüzdandaki tüm muameleler kaldırılıyor...</translation>
@@ -3229,10 +3394,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>on startup</source>
         <translation>başlangıçta</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>sürüm</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat bozuk, geri kazanım başarısız oldu</translation>
@@ -3241,14 +3402,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC bağlantıları için parola</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Belirtilen İP adresinden JSON-RPC bağlantılarını kabul et</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Şu &lt;ip&gt; adresinde (varsayılan: 127.0.0.1) çalışan düğüme komut yolla</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>En iyi blok değiştiğinde komutu çalıştır (komut için %s parametresi blok hash değeri ile değiştirilecektir)</translation>
@@ -3281,10 +3434,6 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>This help message</source>
         <translation>Bu yardım mesajı</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Bu bilgisayarda %s unsuruna bağlanılamadı. (bind şu hatayı iletti: %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>-addnode, -seednode ve -connect için DNS aramalarına izin ver</translation>
@@ -3297,41 +3446,29 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat dosyasının yüklenmesinde hata oluştu: bozuk cüzdan</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>wallet.dat dosyasının yüklenmesinde hata oluştu: cüzdanın daha yeni bir Bitcoin sürümüne ihtiyacı var</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Cüzdanın tekrar yazılması gerekiyordu: işlemi tamamlamak için Bitcoin&apos;i yeniden başlatınız</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat dosyasının yüklenmesinde hata oluştu</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Geçersiz -proxy adresi: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>Geçersiz -proxy adresi: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>-onlynet için bilinmeyen bir şebeke belirtildi: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>-onlynet için bilinmeyen bir şebeke belirtildi: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Bilinmeyen bir -socks vekil sürümü talep edildi: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>-bind adresi çözümlenemedi: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>-bind adresi çözümlenemedi: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>-externalip adresi çözümlenemedi: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>-externalip adresi çözümlenemedi: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-paytxfee=&lt;meblağ&gt; için geçersiz meblağ: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-paytxfee=&lt;meblağ&gt; için geçersiz meblağ: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3377,13 +3514,5 @@ mesela: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
         <source>Error</source>
         <translation>Hata</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>rpcpassword=&lt;parola&gt; şu yapılandırma dosyasında belirtilmelidir:
-%s
-Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index 1e739395a263..ff8ac6802236 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Це програмне забезпечення є експериментальним.
-
-Поширюється за ліцензією MIT/X11, додаткова інформація міститься у файлі COPYING, а також за адресою http://www.opensource.org/licenses/mit-license.php.
-
-Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL (http://www.openssl.org/), криптографічне програмне забезпечення, написане Еріком Янгом (eay@cryptsoft.com), та функції для роботи з UPnP, написані Томасом Бернардом.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>Авторське право</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="uk" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -46,22 +9,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Створити нову адресу</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копіювати виділену адресу в буфер обміну</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Скопіювати адресу</translation>
@@ -76,31 +27,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp; Експорт</translation>
+        <translation>&amp;Експорт...</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Видалити</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Обрати</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
@@ -108,7 +43,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Це ваша нова Bitcoin адреса для отримування платежів. Рекомендовано використовувати нову адресу для кожної транзакції.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -120,19 +55,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Експортувати список адрес</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Файли відділені комами (*.csv)</translation>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
+        <translation>Файли, розділені комою (*.csv)</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Сталася помилка підчас зберігання адрес до %1. Будь ласка спробуйте ще.</translation>
     </message>
 </context>
 <context>
@@ -168,10 +99,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>Повторіть пароль</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Введіть новий пароль для гаманця.&lt;br/&gt;Будь ласка, використовуйте паролі що містять &lt;b&gt;як мінімум 10 випадкових символів&lt;/b&gt;, або &lt;b&gt;як мінімум 8 слів&lt;/b&gt;.</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>Зашифрувати гаманець</translation>
@@ -214,7 +141,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </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>ВАЖЛИВО: Всі попередні резервні копії, які ви зробили з вашого гаманця файл повинен бути замінений новоствореному, зашифрованому файлі гаманця. З міркувань безпеки, попередні резервні копії в незашифрованому файлі гаманець стане марним, як тільки ви починаєте використовувати нову, зашифрований гаманець.</translation>
+        <translation>ВАЖЛИВО: Всі попередні резервні копії, які ви зробили з вашого файла гаманця повинні бути замінені новоствореним, зашифрованим файлом гаманця. З міркувань безпеки, попередні резервні копії в незашифрованого файла гаманця стануть марним, як тільки ви починаєте використовувати новий, зашифрований гаманець.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -226,7 +153,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Біткоін-клієнт буде закрито для завершення процесу шифрування. Пам&apos;ятайте, що шифрування гаманця не може повністю захистити ваші біткоіни від крадіжки, у випадку якщо ваш комп&apos;ютер буде інфіковано шкідливими програмами.</translation>
+        <translation>Біткоін-клієнт буде закрито для завершення процесу шифрування. Пам'ятайте, що шифрування гаманця не може повністю захистити ваші біткоіни від крадіжки, у випадку якщо ваш комп'ютер буде інфіковано шкідливими програмами.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -271,10 +198,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Overview</source>
         <translation>&amp;Огляд</translation>
     </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Показати загальний огляд гаманця</translation>
@@ -295,10 +218,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>Вийти</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>Показати інформацію про Bitcoin</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>&amp;Про Qt</translation>
@@ -325,15 +244,15 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Адреси для &amp;відправлення...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>Адреси для &amp;отримання...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Відкрити &amp;URI</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -387,6 +306,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>&amp;Отримати</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Показати інформацію про Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>Показати / Приховати</translation>
@@ -431,49 +354,17 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Bitcoin Core</source>
         <translation>Bitcoin Ядро</translation>
     </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>Bitcoin-клієнт</translation>
+        <translation>Параметри командного рядка</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n активне з&apos;єднання з мережею</numerusform><numerusform>%n активні з&apos;єднання з мережею</numerusform><numerusform>%n активних з&apos;єднань з мережею</numerusform></translation>
+        <translation><numerusform>%n активние з'єднання з мережею Bitcoin</numerusform><numerusform>%n активниих з'єднань з мережею Bitcoin</numerusform><numerusform>%n активних з'єднань з мережею Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>Ні блок джерела доступні ...</translation>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <translation>Недоступно жодного джерела блоків...</translation>
     </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
@@ -481,35 +372,35 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform><numerusform>%n годин</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n день</numerusform><numerusform>%n дні</numerusform><numerusform>%n днів</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n тиждень</numerusform><numerusform>%n тижня</numerusform><numerusform>%n тижнів</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation type="unfinished"/>
+        <translation>%1 та %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>%n рік</numerusform><numerusform>%n роки</numerusform><numerusform>%n років</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <translation>%1 позаду</translation>
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <translation>Останній отриманий блок було згенеровано %1 тому.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>Угоди після цього буде ще не буде видно.</translation>
+        <translation>Пізніші транзакції не буде видно.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -517,7 +408,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     </message>
     <message>
         <source>Warning</source>
-        <translation>Увага</translation>
+        <translation>Попередження</translation>
     </message>
     <message>
         <source>Information</source>
@@ -559,10 +450,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>&lt;b&gt;Зашифрований&lt;/b&gt; гаманець &lt;b&gt;заблоковано&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>Сталася фатальна помилка. Bitcoin більше не може продовжувати безпечно і піде.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -573,17 +460,9 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Кількість:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -591,35 +470,19 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Пріорітет:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Комісія:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Після комісії</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <translation>Решта:</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -633,18 +496,10 @@ Address: %4
         <source>Date</source>
         <translation>Дата</translation>
     </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirmed</source>
         <translation>Підтверджені</translation>
     </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy address</source>
         <translation>Скопіювати адресу</translation>
@@ -661,147 +516,91 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>Копіювати ID транзакції </translation>
     </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати кількість</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати комісію</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати після комісії</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати байти</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати пріорітет</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати решту</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation type="unfinished"/>
+        <translation>найвищий</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation type="unfinished"/>
+        <translation>вищий</translation>
     </message>
     <message>
         <source>high</source>
-        <translation type="unfinished"/>
+        <translation>високий</translation>
     </message>
     <message>
         <source>medium-high</source>
-        <translation type="unfinished"/>
+        <translation>вище за середній</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation type="unfinished"/>
+        <translation>середній</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation type="unfinished"/>
+        <translation>нижче за середній</translation>
     </message>
     <message>
         <source>low</source>
-        <translation type="unfinished"/>
+        <translation>низький</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation type="unfinished"/>
+        <translation>нижчий</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <translation>найнижчий</translation>
     </message>
     <message>
         <source>yes</source>
-        <translation type="unfinished"/>
+        <translation>так</translation>
     </message>
     <message>
         <source>no</source>
-        <translation type="unfinished"/>
+        <translation>ні</translation>
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <translation>Ця позначка буде червоною, якщо розмір транзакції вищий за 1000 байт.</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Ця позначка буде червоною, якщо пріорітет транзакції нижчий за «середній»".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <translation>Ця позначка буде червоною, якщо будь хто з отримувачів отримає менше ніж %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -812,14 +611,6 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Мітка</translation>
     </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Адреса</translation>
@@ -841,11 +632,11 @@ Address: %4
         <translation>Редагувати адресу для відправлення</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>Введена адреса «%1» вже присутня в адресній книзі.</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
         <translation>Введена адреса «%1» не є коректною адресою в мережі Bitcoin.</translation>
     </message>
     <message>
@@ -861,7 +652,7 @@ Address: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
+        <translation>Буде створена новий каталог даних.</translation>
     </message>
     <message>
         <source>name</source>
@@ -869,23 +660,19 @@ Address: %4
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Каталог вже існує. Додайте %1, якщо ви мали намір створити там новий каталог.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
+        <translation>Шлях вже існує і не є каталогом.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
+        <translation>Тут неможливо створити каталог даних.</translation>
     </message>
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Ядро</translation>
@@ -894,6 +681,10 @@ Address: %4
         <source>version</source>
         <translation>версія</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Параметри командного рядка</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Використання:</translation>
@@ -907,24 +698,20 @@ Address: %4
         <translation>Параметри інтерфейсу</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation>Встановлення мови, наприклад &quot;de_DE&quot; (типово: системна)</translation>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Встановлення мови, наприклад "de_DE" (типово: системна)</translation>
     </message>
     <message>
         <source>Start minimized</source>
         <translation>Запускати згорнутим</translation>
     </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Показувати заставку під час запуску (типово: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <translation>Обрати каталог даних під час запуску (типово: 0)</translation>
     </message>
 </context>
 <context>
@@ -935,31 +722,31 @@ Address: %4
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
+        <translation>Ласкаво просимо в Bitcoin Core.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
+        <translation>Оскільки це перший запуск програми, ви можете обрати де Bitcoin Core буде зберігати дані.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin Core завантажить та збереже копію ланцюга Bitcoin блоків. Щонайменше %1Gb даних буде збережено в цьому каталозі. Гаманець теж буде збережено в цьому каталозі.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation type="unfinished"/>
+        <translation>Використовувати типовий каталог даних</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
+        <translation>Використовувати свій каталог даних:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Помилка: неожливо створити обраний каталог даних «%1».</translation>
     </message>
     <message>
         <source>Error</source>
@@ -967,36 +754,24 @@ Address: %4
     </message>
     <message>
         <source>GB of free space available</source>
-        <translation>ГБ вільного простору доступно</translation>
+        <translation>Gb вільного простору доступно</translation>
     </message>
     <message>
         <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
+        <translation>(з %1Gb, що потрібно)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
+        <translation>Відкрити URI</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
+        <translation>URI:</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -1009,7 +784,7 @@ Address: %4
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Оплата додаткових транзакцій за Кб, що допомагає переконатися, що ваші транзакції обробляються швидко. Велика частина операцій проводиться 1 Кб.</translation>
+        <translation>Необов'язкова комісия за Кб допомагає переконатися, що ваші транзакції обробляються швидше. Більшість транзакцій є 1 Кб.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
@@ -1023,42 +798,6 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Запускати гаманець при вході в систему</translation>
     </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Скинути всі параметри клієнта на типові.</translation>
@@ -1071,30 +810,6 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;Мережа</translation>
     </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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>Автоматично відкривати порт для клієнту біткоін на роутері. Працює лише якщо ваш роутер підтримує UPnP і ця функція увімкнена.</translation>
@@ -1115,14 +830,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Порт проксі-сервера (наприклад 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS версії:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Версія SOCKS-проксі (наприклад 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>&amp;Вікно</translation>
@@ -1163,18 +870,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Виберіть одиницю вимірювання монет, яка буде відображатись в гаманці та при відправленні.</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>Незалежно від того, щоб показати Bitcoin адреси в списку транзакцій чи ні.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>&amp;Відображати адресу в списку транзакцій</translation>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;Гаразд</translation>
@@ -1187,26 +882,10 @@ Address: %4
         <source>default</source>
         <translation>типово</translation>
     </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Підтвердження скидання параметрів</translation>
     </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Невірно вказано адресу проксі.</translation>
@@ -1226,18 +905,10 @@ Address: %4
         <source>Wallet</source>
         <translation>Гаманець</translation>
     </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>Ваш поточний баланс расходуемого</translation>
     </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Всього угод, які ще мають бути підтверджені, і до цих пір не враховуються в расходуемого балансу</translation>
@@ -1273,96 +944,39 @@ Address: %4
         <source>URI handling</source>
         <translation>Обробка URI</translation>
     </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Неможливо обробити URI! Це може бути викликано неправильною Bitcoin-адресою, чи невірними параметрами URI.</translation>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>Bitcoin</translation>
+        <source>Amount</source>
+        <translation>Кількість</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
+        <source>%1 d</source>
+        <translation>%1 д</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
+        <source>%1 h</source>
+        <translation>%1 г</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 х</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
+        <source>%1 s</source>
+        <translation>%1 с</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
+        <source>N/A</source>
+        <translation>Н/Д</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введіть адресу Bitcoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>%1 ms</source>
+        <translation>%1 мс</translation>
     </message>
 </context>
 <context>
@@ -1379,11 +993,7 @@ Address: %4
         <source>Save QR Code</source>
         <translation>Зберегти QR-код</translation>
     </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1404,11 +1014,7 @@ Address: %4
     </message>
     <message>
         <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
+        <translation>Вікно зневадження</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
@@ -1439,8 +1045,16 @@ Address: %4
         <translation>Поточне число блоків</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>Розрахункове число блоків</translation>
+        <source>Received</source>
+        <translation>Отримано</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Відправлено</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Версія</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1454,25 +1068,9 @@ Address: %4
         <source>&amp;Console</source>
         <translation>Консоль</translation>
     </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
+        <translation>всього:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1503,34 +1101,18 @@ Address: %4
         <translation>Наберіть &lt;b&gt;help&lt;/b&gt; для перегляду доступних команд.</translation>
     </message>
     <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
+        <source>Inbound</source>
+        <translation>Вхідний</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
+        <source>Yes</source>
+        <translation>Так</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
+        <source>No</source>
+        <translation>Ні</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1546,68 +1128,20 @@ Address: %4
         <translation>&amp;Повідомлення:</translation>
     </message>
     <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation>Очистити всі поля в формі</translation>
+        <source>Clear all fields of the form.</source>
+        <translation>Очистити всі поля в формі</translation>
     </message>
     <message>
         <source>Clear</source>
         <translation>Очистити</translation>
     </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy label</source>
         <translation>Скопіювати мітку</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation type="unfinished"/>
+        <translation>Скопіювати повідомлення</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1622,27 +1156,19 @@ Address: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
+        <translation>Скопіювати URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
+        <translation>Скопіювати адресу</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
         <translation>&amp;Зберегти зображення...</translation>
     </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>URI</source>
-        <translation type="unfinished"/>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1691,44 +1217,16 @@ Address: %4
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Відправити</translation>
     </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <translation>Кількість:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -1736,31 +1234,19 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation type="unfinished"/>
+        <translation>Пріорітет:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <translation>Комісія:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Після комісії</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
+        <translation>Решта:</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
@@ -1794,13 +1280,9 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>Підтвердіть відправлення</translation>
     </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати кількість</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1808,35 +1290,23 @@ Address: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати комісію</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати після комісії</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати байти</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати пріорітет</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
+        <translation>Копіювати решту</translation>
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
@@ -1858,43 +1328,15 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Знайдено адресу що дублюється. Відправлення на кожну адресу дозволяється лише один раз на кожну операцію переказу.</translation>
     </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Ви впевнені, що хочете відправити?</translation>
     </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1905,10 +1347,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>&amp;Отримувач:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Звернення до відправити платіж на (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Введіть мітку для цієї адреси для додавання її в адресну книгу</translation>
@@ -1921,10 +1359,6 @@ Address: %4
         <source>Choose previously used address</source>
         <translation>Обрати ранiш використовувану адресу</translation>
     </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1937,34 +1371,10 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Message:</source>
         <translation>Повідомлення:</translation>
     </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Memo:</source>
         <translation>Нотатка:</translation>
@@ -1972,15 +1382,7 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1993,11 +1395,7 @@ Address: %4
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Ви можете зареєструватися повідомленнями зі своїми адресами, щоб довести, що ви є їх власником. Будьте обережні, щоб не підписувати що-небудь неясне, як фішинг-атак може спробувати обдурити вас в підписанні вашу особистість до них. Тільки підписати повністю докладні свідчення, користувач зобов&apos;язується.</translation>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введіть адресу Bitcoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <translation>Ви можете зареєструватися повідомленнями зі своїми адресами, щоб довести, що ви є їх власником. Будьте обережні, щоб не підписувати що-небудь неясне, як фішинг-атак може спробувати обдурити вас в підписанні вашу особистість до них. Тільки підписати повністю докладні свідчення, користувач зобов'язується.</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2051,10 +1449,6 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>Введіть адресу підписання, повідомлення (забезпечення копіюванні розриви рядків, прогалини, вкладки і т.д. точно) і підпис нижче, щоб перевірити повідомлення. Будьте обережні, щоб не читати далі в підпис, ніж те, що в підписаному самого повідомлення, щоб уникнути обдурять нападу чоловік-в-середній.</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введіть адресу Bitcoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Перевірте повідомлення для впевненості, що воно підписано вказаною Bitcoin-адресою</translation>
@@ -2068,11 +1462,7 @@ Address: %4
         <translation>Скинути всі поля перевірки повідомлення</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>Введіть адресу Bitcoin (наприклад 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <source>Click "Sign Message" to generate signature</source>
         <translation>Натисніть кнопку «Підписати повідомлення», для отримання підпису</translation>
     </message>
     <message>
@@ -2130,10 +1520,6 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>Bitcoin Ядро</translation>
     </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>[testnet]</source>
         <translation>[тестова мережа]</translation>
@@ -2152,10 +1538,6 @@ Address: %4
         <source>Open until %1</source>
         <translation>Відкрити до %1</translation>
     </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/поза інтернетом</translation>
@@ -2172,10 +1554,6 @@ Address: %4
         <source>Status</source>
         <translation>Статус</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
@@ -2208,10 +1586,6 @@ Address: %4
         <source>Credit</source>
         <translation>Кредит</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>не прийнято</translation>
@@ -2240,14 +1614,6 @@ Address: %4
         <source>Transaction ID</source>
         <translation>ID транзакції</translation>
     </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Debug information</source>
         <translation>Отладочна інформація</translation>
@@ -2276,13 +1642,9 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, ще не було успішно розіслано</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
-        <translation>невідомий</translation>
+        <translation>невідомо</translation>
     </message>
 </context>
 <context>
@@ -2310,18 +1672,6 @@ Address: %4
         <source>Address</source>
         <translation>Адреса</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Кількість</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>Відкрити до %1</translation>
@@ -2338,25 +1688,9 @@ Address: %4
         <source>Generated but not accepted</source>
         <translation>Згенеровано, але не підтверджено</translation>
     </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Received with</source>
-        <translation>Отримано</translation>
+        <translation>Отримані на</translation>
     </message>
     <message>
         <source>Received from</source>
@@ -2364,7 +1698,7 @@ Address: %4
     </message>
     <message>
         <source>Sent to</source>
-        <translation>Відправлено</translation>
+        <translation>Відправлені на</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
@@ -2372,7 +1706,7 @@ Address: %4
     </message>
     <message>
         <source>Mined</source>
-        <translation>Добуто</translation>
+        <translation>Добуті</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2481,26 +1815,6 @@ Address: %4
         <source>Show transaction details</source>
         <translation>Показати деталі транзакції</translation>
     </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Файли, розділені комою (*.csv)</translation>
@@ -2519,16 +1833,12 @@ Address: %4
     </message>
     <message>
         <source>Label</source>
-        <translation>Мітка</translation>
+        <translation>Назва</translation>
     </message>
     <message>
         <source>Address</source>
         <translation>Адреса</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>Кількість</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>Ідентифікатор</translation>
@@ -2542,13 +1852,12 @@ Address: %4
         <translation>до</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -2578,14 +1887,6 @@ Address: %4
         <source>Backup Failed</source>
         <translation>Помилка резервного копіювання</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Backup Successful</source>
         <translation>Успішне створення резервної копії</translation>
@@ -2593,18 +1894,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>Використання:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>Список команд</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>Отримати довідку по команді</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>Параметри:</translation>
@@ -2623,15 +1912,15 @@ Address: %4
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Чекати на з&apos;єднання на &lt;port&gt; (типово: 8333 або тестова мережа: 18333)</translation>
+        <translation>Чекати на з'єднання на &lt;port&gt; (типово: 8333 або тестова мережа: 18333)</translation>
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Підтримувати не більше &lt;n&gt; зв&apos;язків з колегами (типово: 125)</translation>
+        <translation>Підтримувати не більше &lt;n&gt; зв'язків з колегами (типово: 125)</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Підключитись до вузла, щоб отримати список адрес інших учасників та від&apos;єднатись</translation>
+        <translation>Підключитись до вузла, щоб отримати список адрес інших учасників та від'єднатись</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2639,28 +1928,20 @@ Address: %4
     </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Поріг відключення неправильно під&apos;єднаних пірів (типово: 100)</translation>
+        <translation>Поріг відключення неправильно під'єднаних пірів (типово: 100)</translation>
     </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Максимальній розмір вхідного буферу на одне з&apos;єднання (типово: 86400)</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Максимальній розмір вхідного буферу на одне з'єднання (типово: 86400)</translation>
     </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Прослуховувати &lt;port&gt; для JSON-RPC-з&apos;єднань (типово: 8332 або тестова мережа: 18332)</translation>
+        <translation>Прослуховувати &lt;port&gt; для JSON-RPC-з'єднань (типово: 8332 або тестова мережа: 18332)</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Приймати команди із командного рядка та команди JSON-RPC</translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Запустити в фоновому режимі (як демон) та приймати команди</translation>
@@ -2671,114 +1952,24 @@ Address: %4
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Приймати з&apos;єднання ззовні (за замовчуванням: 1, якщо ні-проксі або-з&apos;єднання)</translation>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
+        <translation>Приймати з'єднання ззовні (за замовчуванням: 1, якщо ні-проксі або-з'єднання)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Прив&apos;язка до даного адресою і завжди слухати на ньому. Використовуйте [господаря]: позначення порту для IPv6</translation>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Введіть тестовий режим регресії, яка використовує спеціальну ланцюг, в якій блоки можуть бути вирішені негайно. Це призначено для регресійного тестування інструментів і розробки додатків.</translation>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
+        <translation>Прив'язка до даного адресою і завжди слухати на ньому. Використовуйте [господаря]: позначення порту для IPv6</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Помилка: транзакцію було відхилено. Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій.</translation>
     </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Це тест збірки попередньою версією - використовуйте на свій страх і ризик - не використовувати для гірничодобувних або торгових додатків</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Увага: встановлено занадто велику комісію (-paytxfee). Комісія зніматиметься кожен раз коли ви проводитимете транзакції.</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>Увага: будь ласка, перевірте дату і час на своєму комп&apos;ютері. Якщо ваш годинник йде неправильно, Bitcoin може працювати некоректно.</translation>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Увага: помилка читання wallet.dat! Всі ключі прочитано коректно, але дані транзакцій чи записи адресної книги можуть бути пропущені, або пошкоджені.</translation>
@@ -2787,70 +1978,26 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Увага: файл wallet.dat пошкоджено, дані врятовано! Оригінальний wallet.dat збережено як wallet.{timestamp}.bak до %s; якщо Ваш баланс чи транзакції неправильні, Ви можете відновити їх з резервної копії. </translation>
     </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Спроба відновити закриті ключі з пошкодженого wallet.dat</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>Опції створення блоку:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>Підключитись лише до вказаного вузла</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Виявлено пошкоджений блок бази даних</translation>
     </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Відкрийте власну IP-адресу (за замовчуванням: 1, коли не чує і-externalip)</translation>
     </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Ви хочете перебудувати базу даних блоку зараз?</translation>
@@ -2859,10 +2006,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error initializing block database</source>
         <translation>Помилка ініціалізації бази даних блоків</translation>
     </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Error loading block database</source>
         <translation>Помилка завантаження бази даних блоків</translation>
@@ -2927,22 +2070,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Failed to write undo data</source>
         <translation>Не вдалося записати скасувати дані</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Комісія за Кб</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>Знайти однолітків за допомогою DNS пошук (за замовчуванням: 1, якщо-ні підключити)</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Generate coins (default: 0)</source>
         <translation>Генерація монети (за замовчуванням: 0)</translation>
@@ -2951,70 +2078,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>How many blocks to check at startup (default: 288, 0 = all)</source>
         <translation>Скільки блоків перевіряти під час запуску (типово: 288, 0 = всі)</translation>
     </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Бракує дескрипторів файлів, доступних.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Set the number of threads to service RPC calls (default: 4)</source>
         <translation>Встановити число потоків до дзвінків служба RPC (за замовчуванням: 4)</translation>
     </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>Використання (застаріле, використовуйте bitcoin-cli):</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Перевірка блоків...</translation>
@@ -3023,66 +2094,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Verifying wallet...</source>
         <translation>Перевірка гаманця... </translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Імпорт блоків з зовнішнього файлу blk000??.dat</translation>
     </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Information</source>
         <translation>Інформація</translation>
     </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Maintain a full transaction index (default: 0)</source>
         <translation>Підтримувати індекс повний транзакцій (за замовчуванням: 0)</translation>
@@ -3093,7 +2112,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Максимальній розмір вихідного буферу на одне з&apos;єднання, &lt;n&gt;*1000 байт (типово: 1000)</translation>
+        <translation>Максимальній розмір вихідного буферу на одне з'єднання, &lt;n&gt;*1000 байт (типово: 1000)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
@@ -3103,42 +2122,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
         <translation>Підключити тільки до вузлів в мережі &lt;net&gt; (IPv4, IPv6 або Tor)</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Параметри SSL: (див. Bitcoin Wiki для налаштування SSL)</translation>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Відсилати налагоджувальну інформацію на консоль, а не у файл debug.log</translation>
@@ -3147,18 +2130,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Set minimum block size in bytes (default: 0)</source>
         <translation>Встановити мінімальний розмір блоку у байтах (типово: 0)</translation>
     </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Стискати файл debug.log під час старту клієнта (типово: 1 коли відсутутній параметр -debug)</translation>
@@ -3171,10 +2142,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>Вказати тайм-аут підключення у мілісекундах (типово: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>System error: </source>
         <translation>Системна помилка: </translation>
@@ -3201,7 +2168,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation>Ім&apos;я користувача для JSON-RPC-з&apos;єднань</translation>
+        <translation>Ім'я користувача для JSON-RPC-з'єднань</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -3211,37 +2178,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Увага: Поточна версія застаріла, необхідне оновлення!</translation>
     </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation>версія</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat пошкоджено, відновлення не вдалося</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation>Пароль для JSON-RPC-з&apos;єднань</translation>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Дозволити JSON-RPC-з&apos;єднання з вказаної IP-адреси</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Відправляти команди на вузол, запущений на &lt;ip&gt; (типово: 127.0.0.1)</translation>
+        <translation>Пароль для JSON-RPC-з'єднань</translation>
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Виконати команду, коли з&apos;явиться новий блок (%s в команді змінюється на хеш блоку)</translation>
+        <translation>Виконати команду, коли з'явиться новий блок (%s в команді змінюється на хеш блоку)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
@@ -3257,7 +2204,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>Використовувати OpenSSL (https) для JSON-RPC-з&apos;єднань</translation>
+        <translation>Використовувати OpenSSL (https) для JSON-RPC-з'єднань</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
@@ -3271,10 +2218,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>This help message</source>
         <translation>Дана довідка</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>Неможливо прив&apos;язати до порту %s на цьому комп&apos;ютері (bind returned error %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Дозволити пошук в DNS для команд -addnode, -seednode та -connect</translation>
@@ -3287,40 +2230,20 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Помилка при завантаженні wallet.dat: Гаманець пошкоджено</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>Помилка при завантаженні wallet.dat: Гаманець потребує новішої версії Біткоін-клієнта</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>Потрібно перезаписати гаманець: перезапустіть Біткоін-клієнт для завершення</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Помилка при завантаженні wallet.dat</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <source>Invalid -proxy address: '%s'</source>
         <translation>Помилка в адресі проксі-сервера: «%s»</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
+        <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Невідома мережа вказана в -onlynet: «%s»</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>В параметрі -socks запитується невідома версія: %i</translation>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Помилка у величині комісії -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
@@ -3367,13 +2290,5 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error</source>
         <translation>Помилка</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Ви мусите встановити rpcpassword=&lt;password&gt; в файлі конфігурації:
-%s
-Якщо файл не існує, створіть його із правами тільки для читання власником (owner-readable-only).</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index d9634f63e337..ab9106ca0361 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="ur_PK" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="ur_PK" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>نیا ایڈریس بنائیں</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,10 +27,6 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>پاس فریز داخل کریں</translation>
@@ -163,26 +39,14 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>نیا پاس فریز دہرائیں</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>بٹوے کی رمزنگاری</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
         <translation>بٹوا ان لاک</translation>
     </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Decrypt wallet</source>
         <translation>خفیہ کشائی کر یںبٹوے کے</translation>
@@ -191,3178 +55,260 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Change passphrase</source>
         <translation>پاس فریز تبدیل کریں</translation>
     </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>نقص</translation>
     </message>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>رقم</translation>
     </message>
     <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation> پتہ</translation>
     </message>
     <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>چٹ کے بغیر</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
     <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <source>Error</source>
+        <translation>نقص</translation>
     </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>رقم</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation> پتہ</translation>
     </message>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>رقم</translation>
     </message>
     <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>چٹ</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>چٹ</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>رقم</translation>
     </message>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>چٹ کے بغیر</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>بیلنس:</translation>
     </message>
     <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>چٹ کے بغیر</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>رقم</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>ٹائپ</translation>
     </message>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation> پتہ</translation>
     </message>
     <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>کو بھیجا</translation>
     </message>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(N / A)</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>تمام</translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>آج</translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>اس ہفتے</translation>
     </message>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>اس مہینے</translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>پچھلے مہینے</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>اس سال</translation>
     </message>
     <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>دیگر</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>کو بھیجا</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>تاریخ</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>ٹائپ</translation>
     </message>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>چٹ</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation> پتہ</translation>
     </message>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
+    </context>
+<context>
+    <name>WalletView</name>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>This help message</source>
+        <translation>یہ مدد کا پیغام</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Invalid amount</source>
+        <translation>غلط رقم</translation>
     </message>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>نقص</translation>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation> پتہ</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>چٹ کے بغیر</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation>نقص</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation> پتہ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>چٹ</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>چٹ</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>چٹ کے بغیر</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation>بیلنس:</translation>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>چٹ کے بغیر</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>ٹائپ</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation> پتہ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>کو بھیجا</translation>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation>(N / A)</translation>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation>تمام</translation>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation>آج</translation>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation>اس ہفتے</translation>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation>اس مہینے</translation>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation>پچھلے مہینے</translation>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation>اس سال</translation>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation>دیگر</translation>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation>کو بھیجا</translation>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation>تاریخ</translation>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation>ٹائپ</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>چٹ</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation> پتہ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>رقم</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation>یہ مدد کا پیغام</translation>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>غلط رقم</translation>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation>ناکافی فنڈز</translation>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
+        <source>Insufficient funds</source>
+        <translation>ناکافی فنڈز</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>نقص</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 6ba4f6fa1bf9..1a4d9f8108ae 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1,3368 +1,974 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="uz@Cyrl" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="uz@Cyrl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
+        <translation>Манзил ёки ёрлиқни таҳрирлаш учун икки марта босинг</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation type="unfinished"/>
+        <translation>Янги манзил яратинг</translation>
     </message>
     <message>
         <source>&amp;New</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Янги</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
+        <translation>Жорий танланган манзилни тизим вақтинчалик хотирасига нусха кўчиринг</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Нусха олиш</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Ёпиш</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
+        <translation>Манзилдан &amp;нусха олиш</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
+        <translation>Жорий танланган манзилни рўйхатдан ўчириш</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
+        <translation>Жорий ички ойна ичидаги маълумотларни файлга экспорт қилиш</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Экспорт</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Ўчириш</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
+        <translation>Тангаларни жўнатиш учун манзилни танланг</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
+        <translation>Тангаларни қабул қилиш учун манзилни танланг</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Танлаш</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation type="unfinished"/>
+        <translation>Жўнатиладиган манзиллар</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation type="unfinished"/>
+        <translation>Қабул қилинадиган манзиллар</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
+        <translation>Улар тўловларни жўнатиш учун сизнинг Bitcoin манзилларингиз. Доимо тангаларни жўнатишдан олдин сумма ва қабул қилувчи манзилни текшириб кўринг. </translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Улар тўловларни қабул қилиш учун сизнинг Bitcoin манзилларингиз. Ҳар бир ўтказма учун янги қабул қилувчи манзилдан фойдаланиш тавсия қилинади.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
+        <translation>Нусха олиш ва ёрлиқ</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Таҳрирлаш</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation type="unfinished"/>
+        <translation>Манзил рўйхатини экспорт қилиш</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
+        <translation>Вергул билан ажратилган файл (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
+        <translation>Экспорт қилиб бўлмади</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
         <source>Label</source>
-        <translation type="unfinished"/>
+        <translation>Ёрлиқ</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation type="unfinished"/>
+        <translation>Манзил</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation type="unfinished"/>
+        <translation>(Ёрлиқ мавжуд эмас)</translation>
     </message>
 </context>
 <context>
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
+        <translation>Махфий сўз ойнаси</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Махфий сузни киритинг</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Янги махфий суз</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Янги махфий сузни такрорланг</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи қодлаш</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Ушбу операцияни амалга ошириш учун ҳамённи қулфдан чиқариш парол сўзини талаб қилади.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи қулфдан чиқариш</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Ушбу операцияни амалга ошириш учун ҳамённи коддан чиқариш парол сўзини талаб қилади.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи коддан чиқариш</translation>
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation type="unfinished"/>
+        <translation>Махфий сузни узгартириш</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамёнга эски ва янги паролларингизни киритинг.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи кодлашни тасдиқлаш</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
+        <translation>Диққат: Агар сиз ҳамёнингизни кодласангиз ва махфий сўзингизни унутсангиз, сиз &lt;b&gt;БАРЧА BITCOIN ПУЛЛАРИНГИЗНИ ЙЎҚОТАСИЗ&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
+        <translation>Ҳамёнингизни кодлашни ростдан хоҳлайсизми?</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
+        <translation>Диққат: Caps Lock тугмаси ёқилган!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамёни кодланган</translation>
+    </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Ҳамёнга янги махфий сўз киритинг.&lt;br/&gt;Илтимос, &lt;b&gt;ўнта ёки тасодифий белгили&lt;/b&gt; махфий сўздан фойдаланинг ёки &lt;b&gt;саккизта ёки кўпроқ сўзлар&lt;/b&gt;дан фойдаланинг.</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
+        <translation>Bitcoin кодлаш жараёнини тугатиш учун ёпилади. Ёдда сақланг: ҳамёнингизни кодлаш компьютерингизни зарарлаган зарарли дастурлар томонидан bitcoin тангаларингизни ўғирланишидан тўлиқ ҳимоя қила олмайди.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи кодлаш амалга ошмади</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи кодлаш ташқи хато туфайли амалга ошмади. Ҳамёнингиз кодланмади.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
+        <translation>Киритилган пароллар мос келмади.</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи қулфдан чиқариш амалга ошмади</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи коддан чиқариш учун киритилган парол нотўғри.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённи коддан чиқариш амалга ошмади</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
+        <translation>Тармоқ билан синхронланмоқда...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Кўриб чиқиш</translation>
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамённинг умумий кўринишини кўрсатиш</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Пул ўтказмалари</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation type="unfinished"/>
+        <translation>Пул ўтказмалари тарихини кўриш</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation type="unfinished"/>
+        <translation>Ч&amp;иқиш</translation>
     </message>
     <message>
         <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
+        <translation>Иловадан чиқиш</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Мосламалар...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Жўнатилувчи манзиллар...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Қабул қилувчи манзиллар...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
+        <translation>Интернет манзилни очиш</translation>
     </message>
     <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Паролни ўзгартириш ҳамённи кодлашда фойдаланилади</translation>
     </message>
     <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
+        <source>&amp;File</source>
+        <translation>&amp; файл</translation>
     </message>
     <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
+        <source>&amp;Settings</source>
+        <translation>&amp; Созламалар</translation>
     </message>
     <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
+        <source>&amp;Help</source>
+        <translation>&amp;Ёрдам</translation>
     </message>
     <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
+        <source>Tabs toolbar</source>
+        <translation>Ички ойналар асбоблар панели</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n active connection(s) to Bitcoin network</source>
+        <translation><numerusform>%n та Bitcoin тармоғига фаол уланиш мавжуд</numerusform></translation>
     </message>
     <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
+        <source>Processed %1 blocks of transaction history.</source>
+        <translation>Ўтказма тарихи блоклари %1 та амалга оширилган. </translation>
     </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n соат</numerusform></translation>
     </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n кун</numerusform></translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><numerusform>%n ҳафта</numerusform></translation>
     </message>
     <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
+        <source>%1 and %2</source>
+        <translation>%1 ва %2</translation>
     </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n йил</numerusform></translation>
     </message>
     <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>Up to date</source>
+        <translation>Янгиланган</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>Sent transaction</source>
+        <translation>Жўнатилган операция</translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>Incoming transaction</source>
+        <translation>Кирувчи операция</translation>
     </message>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфдан чиқарилган&lt;/b&gt;</translation>
     </message>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфланган&lt;/b&gt;</translation>
     </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <source>Bytes:</source>
+        <translation>Байт:</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
     </message>
     <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Манзил</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Сана</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Тасдиқланди</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Манзилни нусхалаш</translation>
     </message>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Ёрликни нусхала</translation>
     </message>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Кийматни нусхала</translation>
     </message>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>medium</source>
+        <translation>ўрта</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(Ёрлик мавжуд эмас)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Edit Address</source>
+        <translation>Манзилларни таҳрирлаш</translation>
     </message>
     <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label</source>
+        <translation>&amp;Ёрлик</translation>
     </message>
     <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
+        <source>&amp;Address</source>
+        <translation>&amp;Манзил</translation>
     </message>
     <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <source>New receiving address</source>
+        <translation>Янги кабул килувчи манзил</translation>
     </message>
     <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
+        <source>New sending address</source>
+        <translation>Янги жунатилувчи манзил</translation>
     </message>
     <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
+        <source>Edit receiving address</source>
+        <translation>Кабул килувчи манзилни тахрирлаш</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <source>Edit sending address</source>
+        <translation>Жунатилувчи манзилни тахрирлаш</translation>
     </message>
     <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Киритилган "%1" манзили аллақачон манзил китобида.</translation>
     </message>
     <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
+        <source>Could not unlock wallet.</source>
+        <translation>Ҳамён қулфдан чиқмади.</translation>
     </message>
     <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
+        <source>New key generation failed.</source>
+        <translation>Янги калит яратиш амалга ошмади.</translation>
     </message>
+</context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
     <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
+        <source>About Bitcoin Core</source>
+        <translation>Bitcoin Core ҳақида</translation>
     </message>
     <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
+        <source>Usage:</source>
+        <translation>Фойдаланиш:</translation>
     </message>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Options</source>
+        <translation>Танламалар</translation>
     </message>
+    </context>
+<context>
+    <name>OverviewPage</name>
     <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
+        <source>Form</source>
+        <translation>Шакл</translation>
     </message>
     <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
+        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
+        <translation>&lt;b&gt;Жорий утказмалар&lt;/b&gt;</translation>
     </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
+        <source>General</source>
+        <translation>Асосий</translation>
     </message>
     <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
+        <source>Name</source>
+        <translation>Ном</translation>
     </message>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Ёрлиқ:</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Ёрликни нусхала</translation>
     </message>
     <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
+        <source>Copy message</source>
+        <translation>Хабарни нусхала</translation>
     </message>
-</context>
-<context>
-    <name>ClientModel</name>
     <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Кийматни нусхала</translation>
     </message>
 </context>
 <context>
-    <name>CoinControlDialog</name>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Манзил</translation>
     </message>
     <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
     </message>
     <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Ёрлик</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Сана</translation>
     </message>
     <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Ёрлик</translation>
     </message>
     <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(Ёрлик мавжуд эмас)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Тангаларни жунат</translation>
     </message>
     <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
+        <source>Bytes:</source>
+        <translation>Байт:</translation>
     </message>
     <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
+        <source>Send to multiple recipients at once</source>
+        <translation>Бирданига бир нечта қабул қилувчиларга жўнатиш</translation>
     </message>
     <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
+        <source>Balance:</source>
+        <translation>Баланс</translation>
     </message>
     <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
+        <source>Confirm the send action</source>
+        <translation>Жўнатиш амалини тасдиқлаш</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
+        <source>Confirm send coins</source>
+        <translation>Тангалар жўнаишни тасдиқлаш</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Кийматни нусхала</translation>
     </message>
     <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
+        <source>The amount to pay must be larger than 0.</source>
+        <translation>Тўлов миқдори 0. дан катта бўлиши керак. </translation>
     </message>
     <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(Ёрлик мавжуд эмас)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
     <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
+        <source>A&amp;mount:</source>
+        <translation>&amp;Миқдори:</translation>
     </message>
     <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
+        <source>Pay &amp;To:</source>
+        <translation>&amp;Тўлов олувчи:</translation>
     </message>
     <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
+        <source>Enter a label for this address to add it to your address book</source>
+        <translation>Манзил китобингизга қўшиш учун ушбу манзил учун ёрлиқ киритинг</translation>
     </message>
     <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
+        <source>&amp;Label:</source>
+        <translation>&amp;Ёрлиқ:</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Клипбоарддан манзилни қўйиш</translation>
     </message>
     <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
     <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
+        <source>Alt+A</source>
+        <translation>Alt+A</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
+        <source>Paste address from clipboard</source>
+        <translation>Клипбоарддан манзилни қўйиш</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
+        <source>Alt+P</source>
+        <translation>Alt+P</translation>
     </message>
+    </context>
+<context>
+    <name>SplashScreen</name>
     <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
+        <source>The Bitcoin Core developers</source>
+        <translation>Bitcoin Core дастурчилари</translation>
     </message>
     <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
+        <source>[testnet]</source>
+        <translation>[testnet]</translation>
     </message>
+</context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>%1 гача очиш</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
+        <source>%1/unconfirmed</source>
+        <translation>%1/тасдиқланмади</translation>
     </message>
     <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
+        <source>%1 confirmations</source>
+        <translation>%1 тасдиқлашлар</translation>
     </message>
     <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Сана</translation>
     </message>
     <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
+        <source>Transaction ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>high</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
     </message>
     <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
+        <source>, has not been successfully broadcast yet</source>
+        <translation>, ҳалигача трансляция қилингани йўқ</translation>
     </message>
     <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
+        <source>unknown</source>
+        <translation>Номаълум</translation>
     </message>
+</context>
+<context>
+    <name>TransactionDescDialog</name>
     <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
+        <source>Transaction details</source>
+        <translation>Операция тафсилотлари</translation>
     </message>
     <message>
-        <source>low</source>
-        <translation type="unfinished"/>
+        <source>This pane shows a detailed description of the transaction</source>
+        <translation>Ушбу ойна операциянинг батафсил таърифини кўрсатади</translation>
     </message>
+</context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Сана</translation>
     </message>
     <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Тури</translation>
     </message>
     <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Манзил</translation>
     </message>
     <message>
-        <source>none</source>
-        <translation type="unfinished"/>
+        <source>Open until %1</source>
+        <translation>%1 гача очиш</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
+        <source>Confirmed (%1 confirmations)</source>
+        <translation>Тасдиқланди (%1 та тасдиқ)</translation>
     </message>
     <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
+        <source>This block was not received by any other nodes and will probably not be accepted!</source>
+        <translation>Ушбу тўсиқ бирорта бошқа уланишлар томонидан қабул қилинмаган ва тасдиқланмаган!</translation>
     </message>
     <message>
-        <source>no</source>
-        <translation type="unfinished"/>
+        <source>Generated but not accepted</source>
+        <translation>Яратилди, аммо қабул қилинмади</translation>
     </message>
     <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Ёрдамида қабул қилиш</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Жўнатиш</translation>
     </message>
     <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
+        <source>Payment to yourself</source>
+        <translation>Ўзингизга тўлов</translation>
     </message>
     <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Фойда</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
+        <source>(n/a)</source>
+        <translation>(қ/қ)</translation>
     </message>
     <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Transaction status. Hover over this field to show number of confirmations.</source>
+        <translation>Ўтказма ҳолати. Ушбу майдон бўйлаб тасдиқлашлар сонини кўрсатиш.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
+        <source>Date and time that the transaction was received.</source>
+        <translation>Ўтказма қабул қилинган сана ва вақт.</translation>
     </message>
     <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
+        <source>Type of transaction.</source>
+        <translation>Пул ўтказмаси тури</translation>
     </message>
     <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
+        <source>Destination address of transaction.</source>
+        <translation>Ўтказиладиган жараён манзили.</translation>
     </message>
     <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
+        <source>Amount removed from or added to balance.</source>
+        <translation>Миқдор ўчирилган ёки балансга қўшилган.</translation>
     </message>
+</context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
+        <source>All</source>
+        <translation>Барча</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
+        <source>Today</source>
+        <translation>Бугун</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <source>This week</source>
+        <translation>Шу ҳафта</translation>
     </message>
     <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
+        <source>This month</source>
+        <translation>Шу ой</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
+        <source>Last month</source>
+        <translation>Ўтган хафта</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>This year</source>
+        <translation>Шу йил</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <source>Range...</source>
+        <translation>Оралиқ...</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
+        <source>Received with</source>
+        <translation>Ёрдамида қабул қилинган</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Sent to</source>
+        <translation>Жўнатиш</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>To yourself</source>
+        <translation>Ўзингизга</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Mined</source>
+        <translation>Фойда</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
+        <source>Other</source>
+        <translation>Бошка</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Enter address or label to search</source>
+        <translation>Излаш учун манзил ёки ёрлиқни киритинг</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
+        <source>Min amount</source>
+        <translation>Мин қиймат</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
+        <source>Copy address</source>
+        <translation>Манзилни нусхалаш</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Copy label</source>
+        <translation>Ёрликни нусхалаш</translation>
     </message>
     <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Copy amount</source>
+        <translation>Кийматни нусхала</translation>
     </message>
     <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
+        <source>Edit label</source>
+        <translation>Ёрликни тахрирлаш</translation>
     </message>
     <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Exporting Failed</source>
+        <translation>Экспорт қилиб бўлмади</translation>
     </message>
     <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Вергул билан ажратилган файл (*.csv)</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>Confirmed</source>
+        <translation>Тасдиқланди</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
+        <source>Date</source>
+        <translation>Сана</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Type</source>
+        <translation>Туркум</translation>
     </message>
     <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Ёрлик</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Манзил</translation>
     </message>
     <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
+        <source>ID</source>
+        <translation>ID</translation>
     </message>
     <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
+        <source>Range:</source>
+        <translation>Оралиқ:</translation>
     </message>
     <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>to</source>
+        <translation>Кимга</translation>
     </message>
+</context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
+<context>
+    <name>WalletFrame</name>
+    </context>
+<context>
+    <name>WalletModel</name>
     <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
+        <source>Send Coins</source>
+        <translation>Тангаларни жунат</translation>
     </message>
+</context>
+<context>
+    <name>WalletView</name>
     <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
+        <source>&amp;Export</source>
+        <translation>&amp;Экспорт</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Жорий ички ойна ичидаги маълумотларни файлга экспорт қилиш</translation>
     </message>
+    </context>
+<context>
+    <name>bitcoin-core</name>
     <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
+        <source>Options:</source>
+        <translation>Танламалар:</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
+        <source>Specify configuration file (default: bitcoin.conf)</source>
+        <translation>Мослаш файлини кўрсатинг (default: bitcoin.conf)</translation>
     </message>
     <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
+        <source>Specify pid file (default: bitcoind.pid)</source>
+        <translation>pid файлини кўрсатинг (default: bitcoind.pid)</translation>
     </message>
     <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
+        <source>Specify data directory</source>
+        <translation>Маълумотлар директориясини кўрсатинг</translation>
     </message>
     <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
+        <source>Accept command line and JSON-RPC commands</source>
+        <translation>Буйруқлар сатри ва JSON-RPC буйруқларига рози бўлинг</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Демон сифатида орқа фонда ишга туширинг ва буйруқларга рози бўлинг</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
+        <source>Use the test network</source>
+        <translation>Синов тармоғидан фойдаланинг</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
+        <translation>JSON-RPC уланишлари учун фойдаланувчи номи</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
+        <translation>JSON-RPC уланишлари учун парол</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
+        <translation>JSON-RPC уланишлари учун OpenSSL (https)дан фойдаланиш</translation>
     </message>
     <message>
         <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
+        <translation>Сервер сертификат файли (default: server.cert)</translation>
     </message>
     <message>
         <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
+        <translation>Сервер махфий калити (бирламчи: server.pem)</translation>
     </message>
     <message>
         <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
+        <translation>Бу ёрдам хабари</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
+        <translation>Манзиллар юкланмоқда...</translation>
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
+        <translation>Тўсиқ индекси юкланмоқда...</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
+        <translation>Ҳамён юкланмоқда...</translation>
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation type="unfinished"/>
+        <translation>Қайта текшириб чиқилмоқда...</translation>
     </message>
     <message>
         <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
+        <translation>Юклаш тайёр</translation>
     </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index 0f9fc4f0f1d4..e03349b38353 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -1,36 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="vi" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -41,95 +9,19 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Create a new address</source>
         <translation>Tạo một địa chỉ mới</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Sao chép các địa chỉ đã được chọn vào bộ nhớ tạm thời của hệ thống</translation>
     </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Xóa</translation>
     </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Tập tin tách biệt bởi dấu phẩy (*.csv)</translation>
     </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -147,3222 +39,168 @@ This product includes software developed by the OpenSSL Project for use in the O
 </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
+    </context>
+<context>
+    <name>ClientModel</name>
+    </context>
+<context>
+    <name>CoinControlDialog</name>
     <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Số lượng</translation>
     </message>
     <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
     </message>
     <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(chưa có nhãn)</translation>
     </message>
+    </context>
+<context>
+    <name>EditAddressDialog</name>
+    </context>
+<context>
+    <name>FreespaceChecker</name>
+    </context>
+<context>
+    <name>HelpMessageDialog</name>
+    </context>
+<context>
+    <name>Intro</name>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    </context>
+<context>
+    <name>OptionsDialog</name>
+    </context>
+<context>
+    <name>OverviewPage</name>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
+<context>
+    <name>QObject</name>
     <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Số lượng</translation>
     </message>
+    </context>
+<context>
+    <name>QRImageWidget</name>
+    </context>
+<context>
+    <name>RPCConsole</name>
+    </context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    </context>
+<context>
+    <name>ReceiveRequestDialog</name>
     <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Số lượng</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Nhãn dữ liệu</translation>
     </message>
+    </context>
+<context>
+    <name>RecentRequestsTableModel</name>
     <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Nhãn dữ liệu</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Số lượng</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(chưa có nhãn)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsDialog</name>
     <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>(no label)</source>
+        <translation>(chưa có nhãn)</translation>
     </message>
+    </context>
+<context>
+    <name>SendCoinsEntry</name>
+    </context>
+<context>
+    <name>ShutdownWindow</name>
+    </context>
+<context>
+    <name>SignVerifyMessageDialog</name>
+    </context>
+<context>
+    <name>SplashScreen</name>
+    </context>
+<context>
+    <name>TrafficGraphWidget</name>
+    </context>
+<context>
+    <name>TransactionDesc</name>
     <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
+        <source>Amount</source>
+        <translation>Số lượng</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionDescDialog</name>
+    </context>
+<context>
+    <name>TransactionTableModel</name>
     <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
     </message>
+    </context>
+<context>
+    <name>TransactionView</name>
     <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Tập tin tách biệt bởi dấu phẩy (*.csv)</translation>
     </message>
     <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
+        <source>Label</source>
+        <translation>Nhãn dữ liệu</translation>
     </message>
     <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
     </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
-    <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Địa chỉ</translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(chưa có nhãn)</translation>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
-    <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletFrame</name>
+    </context>
 <context>
-    <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletModel</name>
+    </context>
 <context>
-    <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>WalletView</name>
+    </context>
 <context>
-    <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Địa chỉ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Nhãn dữ liệu</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Nhãn dữ liệu</translation>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(chưa có nhãn)</translation>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation>(chưa có nhãn)</translation>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Địa chỉ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation>Tập tin tách biệt bởi dấu phẩy (*.csv)</translation>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation>Nhãn dữ liệu</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation>Địa chỉ</translation>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation>Số lượng</translation>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
-<context>
-    <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    <name>bitcoin-core</name>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index 210272952363..20ebd7b59452 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -1,3368 +1,114 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi_VN" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="vi_VN" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Tạo một địa chỉ mới</translation>
     </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index b87d27fe12f6..cd0caf53a19a 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1,41 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>关于比特币核心</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;比特币核心&lt;/b&gt; 版本</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>版权</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>Bitcoin Core 的开发者</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1 位)</translation>
-    </message>
-</context>
+<TS language="zh_CN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -131,8 +94,8 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>导出失败</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>地址列表保存至 %1 时发生错误。</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>保存地址列表出现 %1错误。请重试。</translation>
     </message>
 </context>
 <context>
@@ -168,13 +131,9 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>重复新密码</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>输入钱包的新密码。&lt;br/&gt;使用的密码请至少包含&lt;b&gt;10个以上随机字符&lt;/&gt;，或者是&lt;b&gt;8个以上的单词&lt;/b&gt;。</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>加密钱包</translation>
+        <translation>钱包加密</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
@@ -295,10 +254,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>退出程序</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>显示比特币的相关信息</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>关于 &amp;Qt</translation>
@@ -335,6 +290,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>打开 &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>比特币核心钱包</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>正在从磁盘导入数据块...</translation>
@@ -387,6 +346,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>接收(&amp;R)</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>显示有关比特币核心钱包信息</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>显示 / 隐藏(&amp;S)</translation>
@@ -459,37 +422,29 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>显示比特币核心 程序帮助信息，获取可用的命令行选项 </translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>比特币客户端</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n条到比特币网络的活动连接</numerusform></translation>
+        <translation><numerusform>%n 个到比特币网络的活动连接</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
         <translation>沒有可用的区块来源...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>%1 / %2 个交易历史的区块已下载</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>已处理 %1 个交易历史数据块。</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation><numerusform>%n 小时前</numerusform></translation>
+        <translation><numerusform>%n 小时</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation><numerusform>%n 天前</numerusform></translation>
+        <translation><numerusform>%n 天</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation><numerusform>%n 周前</numerusform></translation>
+        <translation><numerusform>%n 周</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
@@ -559,10 +514,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>钱包已被&lt;b&gt;加密&lt;/b&gt;，当前为&lt;b&gt;锁定&lt;/b&gt;状态</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>发生严重错误。</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -598,8 +549,8 @@ Address: %4
         <translation>费用：</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>低输出</translation>
+        <source>Dust:</source>
+        <translation>小额：</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -690,8 +641,8 @@ Address: %4
         <translation>复制优先级</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>复制低输出</translation>
+        <source>Copy dust</source>
+        <translation>复制小额</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -741,10 +692,6 @@ Address: %4
         <source>none</source>
         <translation>无</translation>
     </message>
-    <message>
-        <source>Dust</source>
-        <translation>尘埃交易</translation>
-    </message>
     <message>
         <source>yes</source>
         <translation>是</translation>
@@ -770,25 +717,13 @@ Address: %4
         <translation>交易的优先级越高，被矿工收入数据块的速度也越快。</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation>如果优先级小于&quot;中位数&quot; ，标签将变成红色。</translation>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>如果优先级小于"中位数" ，标签将变成红色。</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>如果收款地址收到小于%1的比特币，标签将变成红色。</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>这意味着至少需要 %1的交易费。</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>小于最小转发交易费的0.546倍的 转账金额将被视为 尘埃交易。</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>如果零钱小于 %1，标签将变成红色。</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(没有标签)</translation>
@@ -841,11 +776,11 @@ Address: %4
         <translation>编辑发送地址</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>输入的地址“%1”已经存在于地址簿中。</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
         <translation>您输入的“%1”不是有效的比特币地址。</translation>
     </message>
     <message>
@@ -882,10 +817,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>比特币核心程序 - 命令行选项</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>比特币核心</translation>
@@ -894,6 +825,18 @@ Address: %4
         <source>version</source>
         <translation>版本</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1 位)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>关于比特币核心</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>命令行选项</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>使用：</translation>
@@ -907,7 +850,7 @@ Address: %4
         <translation>UI选项</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
         <translation>设置语言, 例如“zh-TW”（默认为系统语言）</translation>
     </message>
     <message>
@@ -955,12 +898,8 @@ Address: %4
         <translation>使用自定义的数据目录：</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>比特币</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>错误：指定的数据目录“%1”无法创建。</translation>
+        <source>Bitcoin Core</source>
+        <translation>比特币核心</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1036,6 +975,14 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>脚本&amp;验证 进程数 </translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>接收外部连接</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>允许流入连接</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>通过 SOCKS 代理连接到比特币网络。</translation>
@@ -1116,14 +1063,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>代理端口（例如 9050）</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>Socks 版本(&amp;V)：</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>Socks 代理版本（例如 5）</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>窗口(&amp;W)</translation>
@@ -1164,14 +1103,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>选择比特币单位。</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>是否需要在交易清单中显示比特币地址。</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>在交易清单中显示比特币地址(&amp;D)</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>是否需要交易源地址控制功能。</translation>
@@ -1227,6 +1158,10 @@ Address: %4
         <source>Wallet</source>
         <translation>钱包</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>查看-只有:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>可使用的余额：</translation>
@@ -1275,8 +1210,20 @@ Address: %4
         <translation>URI 处理</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>URI无法解析！原因可能是比特币地址不正确，或者URI参数错误。</translation>
+        <source>Invalid payment address %1</source>
+        <translation>无效的付款地址 %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>支付请求被拒绝</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>支付请求已超时</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>支付请求未成形。</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1290,14 +1237,6 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>暂时无法启动比特币：点击支付功能</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>网络管理器警告</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>您的活动代理不支持 SOCKS5，而通过代理进行支付请求时这是必须的。</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>付款请求URI链接非法: %1</translation>
@@ -1306,10 +1245,6 @@ Address: %4
         <source>Payment request file handling</source>
         <translation>付款请求文件处理 </translation>
     </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>付款请求文件不能读取或无法识别！这可能是个不合格的付款请求文件。</translation>
-    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>不支持到自定义付款脚本的未验证付款请求。</translation>
@@ -1322,10 +1257,6 @@ Address: %4
         <source>Error communicating with %1: %2</source>
         <translation>%1: %2 通讯出错</translation>
     </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>支付请求不能被解析或处理！</translation>
-    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>来自 %1 服务器的错误响应</translation>
@@ -1339,31 +1270,66 @@ Address: %4
         <translation>网络请求出错</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>用户代理</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>地址/主机名</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping 时间</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>比特币</translation>
+        <source>Amount</source>
+        <translation>金额</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>错误：指定的数据目录“%1”不存在。</translation>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>请输入一个比特币地址 (例如 %1)</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>错误: 无法解析配置文件: %1. 只有钥匙=重要的私匙.</translation>
+        <source>%1 d</source>
+        <translation>%1 天</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>错误：无效的 -regtest 与 -testnet 结合体。</translation>
+        <source>%1 h</source>
+        <translation>%1 小时</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>比特币核心钱包没有安全退出....</translation>
+        <source>%1 m</source>
+        <translation>%1 分钟</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>请输入比特币地址（例如: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L）</translation>
+        <source>%1 s</source>
+        <translation>%1 秒</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>网络</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>未知</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>无</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>不可用</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 毫秒</translation>
     </message>
 </context>
 <context>
@@ -1401,7 +1367,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>信息(&amp;I)</translation>
+        <translation>信息</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1415,6 +1381,10 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>使用 OpenSSL 版本</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>使用的 BerkeleyDB 版本</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>启动时间</translation>
@@ -1440,8 +1410,72 @@ Address: %4
         <translation>当前数据块数量</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>预计数据块数量</translation>
+        <source>Received</source>
+        <translation>收到</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>发送</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;同类</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>方向</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>版本</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>用户代理</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>服务</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <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>发送字节</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>接收字节</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping 时间</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1520,16 +1554,36 @@ Address: %4
         <translation>%1 GB</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 分钟</translation>
+        <source>via %1</source>
+        <translation>通过 %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 小时</translation>
+        <source>never</source>
+        <translation>从未</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>传入</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>传出</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>是</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 小时 %2 分钟</translation>
+        <source>No</source>
+        <translation>否</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>未知</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>获取中...</translation>
     </message>
 </context>
 <context>
@@ -1572,7 +1626,7 @@ Address: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>清空此表单的所有字段。</translation>
+        <translation>清除此表单的所有字段。</translation>
     </message>
     <message>
         <source>Clear</source>
@@ -1705,7 +1759,7 @@ Address: %4
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation>发送货币</translation>
+        <translation>发送比特币</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
@@ -1743,10 +1797,6 @@ Address: %4
         <source>Fee:</source>
         <translation>费用：</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>低输出</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>加上交易费用后:</translation>
@@ -1775,6 +1825,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>清除此表单的所有字段。</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>小额：</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>清除所有(&amp;A)</translation>
@@ -1823,10 +1877,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>复制优先级</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>复制低输出</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>复制零钱</translation>
@@ -1879,6 +1929,10 @@ Address: %4
         <source>Warning: Unknown change address</source>
         <translation>警告：未知的更改地址</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>复制小额</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>您确定要发出吗？</translation>
@@ -1887,14 +1941,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>已添加交易费</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>支付请求已过期</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>无效的付款地址 %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1906,10 +1952,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>付给(&amp;T)：</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>付款给这个地址  (例如 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>为这个地址输入一个标签，以便将它添加到您的地址簿</translation>
@@ -1996,10 +2038,6 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>您可以用你的地址对消息进行签名，以证明您是该地址的所有人。注意不要对模棱两可的消息签名，以免遭受钓鱼式攻击。请确保消息内容准确的表达了您的真实意愿。</translation>
     </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>用于签名消息的地址（例如: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L）</translation>
-    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>选择以前用过的地址</translation>
@@ -2052,10 +2090,6 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>在下面输入签名地址，消息（请确保换行符、空格符、制表符等等一个不漏）和签名以验证消息。请确保签名信息准确，提防中间人攻击。</translation>
     </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>用于签名消息的地址(例如: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>验证消息，确保消息是由指定的比特币地址签名过的。</translation>
@@ -2069,11 +2103,7 @@ Address: %4
         <translation>清空所有验证消息栏</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>请输入比特币地址 (例如: 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <source>Click "Sign Message" to generate signature</source>
         <translation>单击“签名消息“产生签名。</translation>
     </message>
     <message>
@@ -2137,7 +2167,7 @@ Address: %4
     </message>
     <message>
         <source>[testnet]</source>
-        <translation>[testnet]</translation>
+        <translation>[测试网络]</translation>
     </message>
 </context>
 <context>
@@ -2173,10 +2203,6 @@ Address: %4
         <source>Status</source>
         <translation>状态</translation>
     </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>通过 %n 个节点广播</numerusform></translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>日期</translation>
@@ -2209,10 +2235,6 @@ Address: %4
         <source>Credit</source>
         <translation>收入</translation>
     </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation><numerusform>将在 %n 个数据块后成熟</numerusform></translation>
-    </message>
     <message>
         <source>not accepted</source>
         <translation>未被接受</translation>
@@ -2239,14 +2261,14 @@ Address: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>交易ID</translation>
+        <translation>ID</translation>
     </message>
     <message>
         <source>Merchant</source>
         <translation>商店</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>生成的比特币在可以使用前必须有 %1 个成熟的区块。当您生成了此区块后，它将被广播到网络中以加入区块链。如果它未成功进入区块链，其状态将变更为“不接受”并且不可使用。这可能偶尔会发生，如果另一个节点比你早几秒钟成功生成一个区块。</translation>
     </message>
     <message>
@@ -2277,10 +2299,6 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>，未被成功广播</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Open for %n more block</numerusform></translation>
-    </message>
     <message>
         <source>unknown</source>
         <translation>未知</translation>
@@ -2305,24 +2323,16 @@ Address: %4
     </message>
     <message>
         <source>Type</source>
-        <translation>类型</translation>
+        <translation>类别</translation>
     </message>
     <message>
         <source>Address</source>
         <translation>地址</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>数量</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>未成熟 (%1 个确认，将在 %2 个后可用)</translation>
     </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation><numerusform>Open for %n more block</numerusform></translation>
-    </message>
     <message>
         <source>Open until %1</source>
         <translation>至 %1 个数据块时开启</translation>
@@ -2526,10 +2536,6 @@ Address: %4
         <source>Address</source>
         <translation>地址</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>金额</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>ID</translation>
@@ -2543,6 +2549,9 @@ Address: %4
         <translation>到</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2594,20 +2603,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>使用：</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>列出命令
-</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>获得某条命令的帮助
-</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>选项：
@@ -2652,10 +2647,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>重新连接异常节点的秒数(缺省: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>设置RPC监听端口%u时发生错误, IPv4:%s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>JSON-RPC连接监听端口&lt;port&gt; (缺省：8332　testnet：18332)</translation>
@@ -2665,10 +2656,6 @@ Address: %4
         <translation>接受命令行和 JSON-RPC 命令
 </translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>比特币核心钱包RPC客户端版本</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>在后台运行并接受命令
@@ -2694,7 +2681,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, 您必须在配置文件设置rpcpassword:
  %s
@@ -2705,17 +2692,13 @@ rpcpassword=%s
 用户名和密码 必! 须! 不一样。
 如果配置文件不存在，请自行建立一个只有所有者拥有只读权限的文件。
 推荐您开启提示通知以便收到错误通知，
-像这样: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+像这样: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>可接受的密码（默认：TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH）</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>在IPv6模式下设置RPC监听端口 %u 失败，返回到IPv4模式: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>绑定指定的IP地址开始监听。IPv6地址请使用[host]:port 格式</translation>
@@ -2724,18 +2707,10 @@ rpcpassword=%s
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>自由交易不断的速率限制为&lt;n&gt;*1000 字节每分钟(默认值:15)</translation>
     </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>进入回归测试模式，它采用一种特殊的可立即解决的区块链模拟情况。这是为了回归测试工具和应用的开发所设。</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>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>错误: 监听接收连接失败 (监听错误 %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>错误：该交易被拒绝！发生这种错误的原因可能是：钱包中的比特币已经被用掉，有可能您复制了wallet.dat钱包文件，然后用复制的钱包文件支付了比特币，但是这个钱包文件中没有记录。</translation>
@@ -2748,10 +2723,6 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>当最佳区块变化时执行命令 (命令行中的 %s 会被替换成区块哈希值)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>比这手续费更小的被认为零手续费 (交易产生) (默认:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>从缓冲池清理磁盘数据库活动日志每&lt;n&gt;兆字节 (默认值: 100)</translation>
@@ -2788,10 +2759,6 @@ rpcpassword=%s
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告：-paytxfee 交易费设置得太高了！每笔交易都将支付交易费。</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>警告：请检查电脑的日期时间设置是否正确！时间错误可能会导致比特币客户端运行异常。</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>警告：网络似乎并不完全同意！有些矿工似乎遇到了问题。</translation>
@@ -2824,30 +2791,14 @@ rpcpassword=%s
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>尝试从损坏的钱包文件wallet.dat中恢复私钥</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>比特币核心 守护程序</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>数据块创建选项：</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>清除钱包中的交易记录 (诊断用，意味着需要重新扫描 -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>仅连接到指定节点</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>通过Socks代理连接:</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>连接到 JSON-RPC 于 &lt;port&gt;（默认: 8332，或测试网络: 18332）</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>连接选项：</translation>
@@ -2948,18 +2899,6 @@ rpcpassword=%s
         <source>Failed to write undo data</source>
         <translation>无法写入回滚信息</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>为付款交易支付比特币(每kb)</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>比这手续费更小的被认为零手续费 (中继) (默认值: </translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>通过DNS查找节点(缺省：1 除非使用 -connect 选项)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>强制安全模式(默认值: 0)</translation>
@@ -2985,7 +2924,7 @@ rpcpassword=%s
         <translation>不正确或没有找到起源区块。网络错误？</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
+        <source>Invalid -onion address: '%s'</source>
         <translation>无效的 -onion 地址：“%s”</translation>
     </message>
     <message>
@@ -2996,18 +2935,10 @@ rpcpassword=%s
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>调试信息输出时，前面加上时间戳 (缺省: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC 客户端选项：</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>重新为当前的blk000??.dat文件建立索引</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>用 -proxy 选择 SOCKS 版本（4 或 5，默认为 5）</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>设置以MB为单位的数据库缓存大小(%d 到 %d, 默认值: %d)</translation>
@@ -3032,10 +2963,6 @@ rpcpassword=%s
         <source>This is intended for regression testing tools and app development.</source>
         <translation>这是用于回归测试和应用开发目的。</translation>
     </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>用法（不推荐，请使用 bitcoin-cli）：</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>正在验证数据库的完整性...</translation>
@@ -3044,10 +2971,6 @@ rpcpassword=%s
         <source>Verifying wallet...</source>
         <translation>正在检测钱包的完整性...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>等待 RPC 服务器</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>钱包 %s 在外部的数据目录 %s</translation>
@@ -3056,10 +2979,6 @@ rpcpassword=%s
         <source>Wallet options:</source>
         <translation>钱包选项:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>警告：已废弃的 -debugnet 参数已忽略，请用 -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>您需要将 -reindex 改为 -txindex 以重建数据库</translation>
@@ -3080,21 +2999,69 @@ rpcpassword=%s
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>输出调试信息（默认为0，提供  &lt;category&gt; 是可选的）</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>通过DNS查询每个地址，如果短地址 (默认值: 1 除非 -连接)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>设置 高优先级/低交易费 交易的最大字节  (缺省: %d)</translation>
     </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>始终通过 DNS 查询对等端地址 (默认: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>无法解析 -whitebind 地址: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>通过 SOCKS5 代理连接</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>版权所有 (C) 2009-%i Bitcoin Core 开发者</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>无法解析 -rpcbind 的值 %s 为网络地址</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>加载wallet.dat错误：需要新版的比特币核心钱包</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>错误：发现了不支持的参数 -tor，请使用 -onion。</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>在调试输出中包含IP地址 (默认: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>信息</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-minrelaytxfee=&lt;amount&gt;: &apos;%s&apos; 无效的金额</translation>
+        <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>-minrelaytxfee=&lt;amount&gt;: '%s' 无效的金额</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-mintxfee=&lt;amount&gt;: '%s' 无效的金额</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>无效的金额 -paytxfee=&lt;amount&gt;: '%s' (必须至少为 %s)</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>-mintxfee=&lt;amount&gt;: &apos;%s&apos; 无效的金额</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>-whitelist: '%s' 指定的网络掩码无效</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3116,6 +3083,14 @@ rpcpassword=%s
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>每个连接的最大发送缓存，&lt;n&gt;*1000 字节(缺省：1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>-whitebind: '%s' 需要指定一个端口</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>节点中继选项:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>仅接受符合客户端检查点设置的数据块文件</translation>
@@ -3149,16 +3124,12 @@ rpcpassword=%s
         <translation>随机每1个模拟测试&lt;n&gt;网络信息</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>运行一个程序，定时清理钱包 (默认值：1)</translation>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL选项：(参见Bitcoin Wiki关于SSL设置栏目)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>中转non-P2SH multisig (默认值: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>发送指令到比特币核心钱包</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>运行一个程序，定时清理钱包 (默认值：1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3176,10 +3147,6 @@ rpcpassword=%s
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>显示所有调试选项 (用法: --帮助 -帮助调试)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>显示标准信息 (默认值: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>客户端启动时压缩debug.log文件(缺省：no-debug模式时为1)</translation>
@@ -3192,14 +3159,14 @@ rpcpassword=%s
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>设置连接超时时间(缺省：5000毫秒)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>开启比特币核心钱包守护进程</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>系统错误：</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>这是实验性的软件。</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>交易量太小</translation>
@@ -3212,6 +3179,10 @@ rpcpassword=%s
         <source>Transaction too large</source>
         <translation>交易太大</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>无法在此计算机上绑定 %s (绑定返回错误 %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>使用UPnP映射监听端口 (缺省: 0)</translation>
@@ -3224,6 +3195,10 @@ rpcpassword=%s
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC 连接用户名</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>钱包需要被改写：重新启动核心钱包来完成</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>警告</translation>
@@ -3232,6 +3207,14 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>警告：该软件版本已过时，请升级！</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>警告：不支持的参数 -benchmark 已忽略，请使用 -debug=bench。</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>警告：不支持的参数 -debugnet 已忽略，请使用 -debug=net。</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Zapping all transactions from wallet...</translation>
@@ -3240,10 +3223,6 @@ rpcpassword=%s
         <source>on startup</source>
         <translation>启动中</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>版本</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>钱包文件wallet.dat损坏，抢救备份失败</translation>
@@ -3253,14 +3232,6 @@ rpcpassword=%s
         <translation>JSON-RPC 连接密码
 </translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>允许从指定IP接受到的 JSON-RPC 连接</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>向IP地址为 &lt;ip&gt; 的节点发送指令 (缺省: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>当最佳数据块变化时执行命令 (命令行中的 %s 会被替换成数据块哈希值)</translation>
@@ -3297,10 +3268,6 @@ rpcpassword=%s
         <translation>本帮助信息
 </translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>无法绑定本机端口 %s  (返回错误消息 %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>使用 -addnode, -seednode 和 -connect 选项时允许查询DNS</translation>
@@ -3313,41 +3280,29 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat 钱包文件加载出错：钱包损坏</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>wallet.dat 钱包文件加载错误：请升级到最新版Bitcoin客户端</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>钱包文件需要被重写：请退出并重新启动Bitcoin客户端</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat 钱包文件加载出错</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <source>Invalid -proxy address: '%s'</source>
         <translation>无效的代理地址：%s</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
+        <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>-onlynet 指定的是未知网络：%s</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>被指定的是未知socks代理版本: %i</translation>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>无法解析 -bind 端口地址: &apos;%s&apos;</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>无法解析 -bind 端口地址: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>无法解析 -externalip 地址: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>无法解析 -externalip 地址: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>非法金额 -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>非法金额 -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3393,13 +3348,5 @@ rpcpassword=%s
         <source>Error</source>
         <translation>错误</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>您必须在配置文件中加入选项 rpcpassword :
- %s
-如果配置文件不存在，请新建，并将文件权限设置为仅允许文件所有者读取.</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts
index 835d0134d62c..dfdbb7d1da05 100644
--- a/src/qt/locale/bitcoin_zh_HK.ts
+++ b/src/qt/locale/bitcoin_zh_HK.ts
@@ -1,3368 +1,110 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_HK" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+<TS language="zh_HK" version="2.1">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Create a new address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;New</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the currently selected address to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;lose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Delete the currently selected address from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Delete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to send coins to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the address to receive coins with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>C&amp;hoose</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sending addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Receiving addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Edit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Address List</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>AskPassphraseDialog</name>
-    <message>
-        <source>Passphrase Dialog</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Repeat new passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Decrypt wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change passphrase</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the old and new passphrase to the wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The Caps Lock key is on!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encrypted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied passphrases do not match.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet decryption failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet passphrase was successfully changed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>BitcoinGUI</name>
-    <message>
-        <source>Sign &amp;message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Synchronizing with network...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Overview</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Node</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show general overview of wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Browse transaction history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>E&amp;xit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quit application</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>About &amp;Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show information about Qt</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Options...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Encrypt Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Backup Wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Change Passphrase...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sending addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open &amp;URI...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing blocks from disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reindexing blocks on disk...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send coins to a Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Modify configuration options for Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup wallet to another location</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open debugging and diagnostic console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify message...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Receive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Show / Hide</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show or hide the main Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Encrypt the private keys that belong to your wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;File</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Settings</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Help</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tabs toolbar</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;About Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used sending addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the list of used receiving addresses and labels</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open a bitcoin: URI or payment request</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>No block source available...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 and %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>%1 behind</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last received block was generated %1 ago.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions after this will not yet be visible.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Up to date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Catching up...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incoming transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date: %1
-Amount: %2
-Type: %3
-Address: %4
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ClientModel</name>
-    <message>
-        <source>Network Alert</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(un)select all</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Tree mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List mode</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Lock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unlock unspent</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>highest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>higher</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium-high</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low-medium</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>low</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lower</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>lowest</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(%1 locked)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Dust</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>yes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>no</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 per kB is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Can vary +/- 1 byte per input.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>change from %1 (%2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(change)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>EditAddressDialog</name>
-    <message>
-        <source>Edit Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The label associated with this address list entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit receiving address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit sending address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Could not unlock wallet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>New key generation failed.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>FreespaceChecker</name>
-    <message>
-        <source>A new data directory will be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Path already exists, and is not a directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot create data directory here.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>command-line options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>UI options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start minimized</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show splash screen on startup (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose data directory on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>Intro</name>
-    <message>
-        <source>Welcome</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to Bitcoin Core.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the default data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use a custom data directory:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
-    <message>
-        <source>Open URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open payment request from URI or file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select payment request file to open</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OptionsDialog</name>
-    <message>
-        <source>Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Main</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Start Bitcoin on system login</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Size of &amp;database cache</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of script &amp;verification threads</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Third party transaction URLs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Active command-line options that override above options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all client options to default.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Reset Options</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>W&amp;allet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Expert</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enable coin &amp;control features</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Spend unconfirmed change</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Map port using &amp;UPnP</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Proxy &amp;IP:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Port:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Port of the proxy (e.g. 9050)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show only a tray icon after minimizing the window.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation type="unfinished"/>
-    </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 Quit in the menu.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>M&amp;inimize on close</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>User Interface &amp;language:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Unit to show amounts in:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Whether to show coin control features or not.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;OK</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Cancel</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>default</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>none</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm options reset</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client restart required to activate changes.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client will be shutdown, do you want to proceed?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This change would require a client restart.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The supplied proxy address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Form</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Available:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pending:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined balance that has not yet matured</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your current total balance</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>out of sync</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>PaymentServer</name>
-    <message>
-        <source>URI handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request fetch URL is invalid: %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file handling</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Refund from %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error communicating with %1: %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bad response from server %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment acknowledged</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network request error</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    </context>
 <context>
     <name>QObject</name>
-    <message>
-        <source>Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>QRImageWidget</name>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Copy Image</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Save QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>PNG Image (*.png)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RPCConsole</name>
-    <message>
-        <source>Client name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>N/A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug window</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>General</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Using OpenSSL version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Startup time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Name</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block chain</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Current number of blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Estimated total blocks</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last block time</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Network Traffic</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Totals</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Out:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Build date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear console</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 B</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 KB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 MB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 GB</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    <message>
-        <source>&amp;Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional label to associate with the new receiving address.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Requested payments history</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Request payment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove the selected entries from the list</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ReceiveRequestDialog</name>
-    <message>
-        <source>QR Code</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy &amp;Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Save Image...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Request payment to %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>URI</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error encoding URI into QR Code.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>RecentRequestsTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no amount)</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsDialog</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Coin Control Features</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>automatically selected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Quantity:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bytes:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Priority:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>After Fee:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Change:</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Custom change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send to multiple recipients at once</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add &amp;Recipient</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear all fields of the form.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Balance:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm the send action</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>S&amp;end</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirm send coins</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 to %2</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy quantity</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy after fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy bytes</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy priority</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy change</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Total Amount %1 (= %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>or</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The recipient address is not valid, please recheck.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount to pay must be larger than 0.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The amount exceeds your balance.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction creation failed!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Invalid Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(no label)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Unknown change address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Are you sure you want to send?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>added as transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SendCoinsEntry</name>
-    <message>
-        <source>A&amp;mount:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay &amp;To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to your address book</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Label:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a normal payment.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Remove this entry</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a verified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is an unverified payment request.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Pay To:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Memo:</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>ShutdownWindow</name>
-    <message>
-        <source>Bitcoin Core is shutting down...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not shut down the computer until this window disappears.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SignVerifyMessageDialog</name>
-    <message>
-        <source>Signatures - Sign / Verify a Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Sign Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Choose previously used address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+A</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Paste address from clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Alt+P</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the message you want to sign here</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy the current signature to the system clipboard</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sign &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all sign message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear &amp;All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&amp;Verify Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter the signing 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.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verify &amp;Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Reset all verify message fields</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address is invalid.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the address and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The entered address does not refer to a key.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet unlock was cancelled.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Private key for the entered address is not available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signing failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message signed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature could not be decoded.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Please check the signature and try again.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The signature did not match the message digest.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verification failed.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message verified.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>SplashScreen</name>
-    <message>
-        <source>Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TrafficGraphWidget</name>
-    <message>
-        <source>KB/s</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDesc</name>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1/unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%1 confirmations</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Status</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Source</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>From</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>own address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Credit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debit</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction fee</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Net amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comment</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Merchant</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debug information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Inputs</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>true</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>false</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>, has not been successfully broadcast yet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>unknown</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionDescDialog</name>
-    <message>
-        <source>Transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This pane shows a detailed description of the transaction</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionTableModel</name>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Immature (%1 confirmations, will be available after %2)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message numerus="yes">
-        <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
-    </message>
-    <message>
-        <source>Open until %1</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed (%1 confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generated but not accepted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Offline</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unconfirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Conflicted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received from</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Payment to yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(n/a)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date and time that the transaction was received.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Destination address of transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount removed from or added to balance.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>TransactionView</name>
-    <message>
-        <source>All</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Today</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This week</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Last month</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This year</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Received with</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sent to</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To yourself</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Mined</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Other</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter address or label to search</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Min amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Copy transaction ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Edit label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show transaction details</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export Transaction History</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the transaction history to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Exporting Successful</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The transaction history was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Comma separated file (*.csv)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Confirmed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Date</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Type</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>ID</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Range:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>to</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    </context>
 <context>
     <name>WalletFrame</name>
-    <message>
-        <source>No wallet has been loaded.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletModel</name>
-    <message>
-        <source>Send Coins</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>WalletView</name>
-    <message>
-        <source>&amp;Export</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Export the data in the current tab to a file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet Data (*.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>There was an error trying to save the wallet data to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>The wallet data was successfully saved to %1.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Backup Successful</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify data directory</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify your own public address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept command line and JSON-RPC commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use the test network</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
-        <translation type="unfinished"/>
-    </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 type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>&lt;category&gt; can be:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Block creation options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect only to the specified node(s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Connection options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Corrupted block database detected</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Debugging/Testing options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Do you want to rebuild the block database now?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error initializing wallet database environment %s!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error opening block database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Disk space is low!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Importing...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Not enough file descriptors available.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying blocks...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Verifying wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Information</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>RPC server options:</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Signing transaction failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amount too small</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction amounts must be positive</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Transaction too large</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Username for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Zapping all transactions from wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>on startup</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>version</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>wallet.dat corrupt, salvage failed</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Password for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Upgrade wallet to latest format</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>This help message</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading addresses...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error loading wallet.dat</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Insufficient funds</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading block index...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Loading wallet...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot downgrade wallet</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Cannot write default address</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Rescanning...</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Done loading</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>Error</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation type="unfinished"/>
-    </message>
-</context>
+    </context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index fccdf48abde7..51c0780ab09a 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1,43 +1,4 @@
-<?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.1">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <source>About Bitcoin Core</source>
-        <translation>關於位元幣核心</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Bitcoin Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;位元幣核心&lt;/b&gt; 版本</translation>
-    </message>
-    <message>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-位元幣，原名是 Bitcoin, 又叫做比特幣。
-
-這是一套實驗性的軟體。
-
-這套軟體是依據 MIT/X11 軟體授權條款散布，詳情請見附帶的 COPYING 檔案，或是以下網站: http://www.opensource.org/licenses/mit-license.php.
-
-此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit (http://www.openssl.org/) 軟體，和由 Eric Young (eay@cryptsoft.com) 撰寫的加解密軟體，以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation>版權</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation>位元幣核心開發人員</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation>(%1 位元)</translation>
-    </message>
-</context>
+<TS language="zh_TW" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -133,8 +94,8 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation>匯出失敗</translation>
     </message>
     <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation>儲存位址列表到 %1 時發生錯誤。</translation>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>儲存位址列表到 %1 時發生錯誤。請重試一次。</translation>
     </message>
 </context>
 <context>
@@ -170,10 +131,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Repeat new passphrase</source>
         <translation>重複新密碼</translation>
     </message>
-    <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>請輸入錢包的新密碼。&lt;br/&gt;建議用&lt;b&gt;10 個以上的任意字元&lt;/b&gt;，或是&lt;b&gt;8 個以上的單字&lt;/b&gt;。</translation>
-    </message>
     <message>
         <source>Encrypt wallet</source>
         <translation>加密錢包</translation>
@@ -226,6 +183,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Wallet encrypted</source>
         <translation>錢包已加密</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>輸入錢包的新密碼。&lt;br/&gt;密碼請用&lt;b&gt;10 個以上的字元&lt;/b&gt;，或是&lt;b&gt;8 個以上的字詞&lt;/b&gt;。</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>位元幣軟體現在要關閉，好完成加密程序。請注意，加密錢包不能完全防止入侵你的電腦的惡意程式偷取位元幣。</translation>
@@ -297,10 +258,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Quit application</source>
         <translation>結束應用程式</translation>
     </message>
-    <message>
-        <source>Show information about Bitcoin</source>
-        <translation>顯示位元幣軟體相關資訊</translation>
-    </message>
     <message>
         <source>About &amp;Qt</source>
         <translation>關於 &amp;Qt</translation>
@@ -337,6 +294,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Open &amp;URI...</source>
         <translation>開啓 URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>位元幣核心客戶端軟體</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>正在從磁碟匯入區塊資料...</translation>
@@ -389,6 +350,10 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>&amp;Receive</source>
         <translation>收款</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>顯示位元幣核心的相關資訊</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>顯示或隱藏</translation>
@@ -461,10 +426,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>顯示位元幣核心的說明訊息，來取得可用命令列選項的列表</translation>
     </message>
-    <message>
-        <source>Bitcoin client</source>
-        <translation>位元幣客戶端軟體</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n 個運作中的位元幣網路連線</numerusform></translation>
@@ -473,10 +434,6 @@ This product includes software developed by the OpenSSL Project for use in the O
         <source>No block source available...</source>
         <translation>沒有可用的區塊來源...</translation>
     </message>
-    <message>
-        <source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
-        <translation>已處理了估計全部 %2 個區塊中的 %1 個的交易紀錄。</translation>
-    </message>
     <message>
         <source>Processed %1 blocks of transaction history.</source>
         <translation>已處理了 %1 個區塊的交易紀錄。</translation>
@@ -561,10 +518,6 @@ Address: %4
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>錢包&lt;b&gt;已加密&lt;/b&gt;並且&lt;b&gt;上鎖中&lt;/b&gt;</translation>
     </message>
-    <message>
-        <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
-        <translation>發生了致命的錯誤。位元幣軟體沒辦法再繼續安全執行，只好結束。</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
@@ -600,8 +553,8 @@ Address: %4
         <translation>手續費:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation>低輸出:</translation>
+        <source>Dust:</source>
+        <translation>零散錢:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -692,8 +645,8 @@ Address: %4
         <translation>複製優先度</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation>複製低輸出</translation>
+        <source>Copy dust</source>
+        <translation>複製零散金額</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -744,8 +697,8 @@ Address: %4
         <translation>無</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation>零散錢</translation>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>每組輸入可能有 +/- %1 個 satoshi 的誤差。</translation>
     </message>
     <message>
         <source>yes</source>
@@ -772,25 +725,13 @@ Address: %4
         <translation>優先度較高的交易比較有可能被接受放進區塊中。</translation>
     </message>
     <message>
-        <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>當優先度低於「中等」時，文字會變紅色。</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>當任何一個收款金額小於 %1 時，文字會變紅色。</translation>
     </message>
-    <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation>表示至少需要 %1 的交易手續費。</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation>當金額低於最低轉發手續費乘以 0.546 時，會顯示成零散錢。</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>當找零金額小於 %1 時，文字會變紅色。</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(無標記)</translation>
@@ -843,11 +784,11 @@ Address: %4
         <translation>編輯付款位址</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is already in the address book.</source>
+        <source>The entered address "%1" is already in the address book.</source>
         <translation>輸入的位址 %1 在位址簿中已經有了。</translation>
     </message>
     <message>
-        <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
         <translation>輸入的位址 %1 並不是有效的位元幣位址。</translation>
     </message>
     <message>
@@ -884,10 +825,6 @@ Address: %4
 </context>
 <context>
     <name>HelpMessageDialog</name>
-    <message>
-        <source>Bitcoin Core - Command-line options</source>
-        <translation>位元幣核心 - 命令列選項</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>位元幣核心</translation>
@@ -896,6 +833,18 @@ Address: %4
         <source>version</source>
         <translation>版本</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1 位元)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>關於位元幣核心</translation>
+    </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>命令列選項</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>用法:</translation>
@@ -909,7 +858,7 @@ Address: %4
         <translation>使用界面選項</translation>
     </message>
     <message>
-        <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
         <translation>設定語言，比如說 de_DE (預設值: 系統語系)</translation>
     </message>
     <message>
@@ -956,12 +905,12 @@ Address: %4
         <translation>使用自定的資料目錄:</translation>
     </message>
     <message>
-        <source>Bitcoin</source>
-        <translation>位元幣</translation>
+        <source>Bitcoin Core</source>
+        <translation>位元幣核心</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation>錯誤: 沒辦法造出指定的資料目錄 %1 。</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>錯誤: 無法新增指定的資料目錄: %1</translation>
     </message>
     <message>
         <source>Error</source>
@@ -1037,6 +986,14 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>指令碼驗證執行緒數目</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>接受外來連線</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>接受外來連線</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>透過 SOCKS 代理伺服器來連線到位元幣網路。</translation>
@@ -1117,14 +1074,6 @@ Address: %4
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>代理伺服器的通訊埠(像是 9050)</translation>
     </message>
-    <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation>SOCKS 版本:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation>代理伺服器的 SOCKS 協定版本(像是 5)</translation>
-    </message>
     <message>
         <source>&amp;Window</source>
         <translation>視窗</translation>
@@ -1165,14 +1114,6 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>選擇操作界面和付款時，預設顯示金額的細分單位。</translation>
     </message>
-    <message>
-        <source>Whether to show Bitcoin addresses in the transaction list or not.</source>
-        <translation>是否要在交易列表中顯示位元幣位址。</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation>在交易列表顯示位址</translation>
-    </message>
     <message>
         <source>Whether to show coin control features or not.</source>
         <translation>是否要顯示錢幣控制功能。</translation>
@@ -1228,6 +1169,10 @@ Address: %4
         <source>Wallet</source>
         <translation>錢包</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>只能看:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>可用金額:</translation>
@@ -1260,6 +1205,22 @@ Address: %4
         <source>Your current total balance</source>
         <translation>目前全部餘額</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>所有只能看位址的目前餘額</translation>
+    </message>
+    <message>
+        <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>
     <message>
         <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
         <translation>&lt;b&gt;最近交易&lt;/b&gt;</translation>
@@ -1276,8 +1237,24 @@ Address: %4
         <translation>URI 處理</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>沒辦法解析 URI 位址！可能是因為位元幣位址無效，或是 URI 參數格式錯誤。</translation>
+        <source>Invalid payment address %1</source>
+        <translation>無效的付款位址 %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>付款的要求被拒絕了</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>付款要求的網路類型跟客戶端不符。</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>付款的要求已經過期了。</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>付款的要求沒有完成初始化。</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
@@ -1291,25 +1268,21 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>沒辦法啟動 bitcoin 協議的按就付處理器</translation>
     </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation>網路管理員警告</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation>目前使用中的代理伺服器不支援 SOCKS5 通訊協定，因此不能透過它來要求付款。</translation>
-    </message>
     <message>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>取得付款要求的 URL 無效: %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 位址！可能是因為位元幣位址無效，或是 URI 參數格式錯誤。</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>處理付款要求檔案</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation>沒辦法讀或處理付款要求檔案！可能是無效的檔案造成的。</translation>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>沒辦法讀取付款要求檔案！可能是無效的檔案造成的。</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1324,8 +1297,8 @@ Address: %4
         <translation>跟 %1 通訊時發生錯誤: %2</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation>沒辦法解析或處理付款要求！</translation>
+        <source>Payment request cannot be parsed!</source>
+        <translation>沒辦法解析付款要求內容！</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1340,31 +1313,66 @@ Address: %4
         <translation>發出要求時發生網路錯誤</translation>
     </message>
 </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>使用者代理</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>位址/主機名稱</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping 時間</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Bitcoin</source>
-        <translation>位元幣</translation>
+        <source>Amount</source>
+        <translation>金額</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>輸入位元幣位址 (比如說 %1)</translation>
     </message>
     <message>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>錯誤: 沒有指定的資料目錄 %1 。</translation>
+        <source>%1 d</source>
+        <translation>%1 天</translation>
     </message>
     <message>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>錯誤: 沒辦法解析設定檔: %1。請只用「名稱=設定值」這種語法。</translation>
+        <source>%1 h</source>
+        <translation>%1 小時</translation>
     </message>
     <message>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>錯誤: -regtest 和 -testnet 的使用組合無效。</translation>
+        <source>%1 m</source>
+        <translation>%1 分鐘</translation>
     </message>
     <message>
-        <source>Bitcoin Core didn&apos;t yet exit safely...</source>
-        <translation>位元幣核心還沒有安全地結束...</translation>
+        <source>%1 s</source>
+        <translation>%1 秒</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>請輸入位元幣位址(像是 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>NETWORK</source>
+        <translation>網路</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>不明</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>無</translation>
+    </message>
+    <message>
+        <source>N/A</source>
+        <translation>未知</translation>
+    </message>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 毫秒</translation>
     </message>
 </context>
 <context>
@@ -1416,6 +1424,10 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>使用的 OpenSSL 版本</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>使用 BerkeleyDB 版本</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>啓動時間</translation>
@@ -1441,8 +1453,76 @@ Address: %4
         <translation>目前區塊數</translation>
     </message>
     <message>
-        <source>Estimated total blocks</source>
-        <translation>估計總區塊數</translation>
+        <source>Received</source>
+        <translation>收款</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>付款</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>節點</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>選一個節點來看詳細資訊</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>方向</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>版本</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>使用者代理</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>服務</translation>
+    </message>
+    <message>
+        <source>Sync Node</source>
+        <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>送出位元組</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>收到位元組</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping 時間</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1521,16 +1601,36 @@ Address: %4
         <translation>%1 GB (十億位元組)</translation>
     </message>
     <message>
-        <source>%1 m</source>
-        <translation>%1 分鐘</translation>
+        <source>via %1</source>
+        <translation>經由 %1</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation>%1 小時</translation>
+        <source>never</source>
+        <translation>沒有過</translation>
     </message>
     <message>
-        <source>%1 h %2 m</source>
-        <translation>%1 小時 %2 分</translation>
+        <source>Inbound</source>
+        <translation>進來</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>出去</translation>
+    </message>
+    <message>
+        <source>Yes</source>
+        <translation>是</translation>
+    </message>
+    <message>
+        <source>No</source>
+        <translation>否</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>不明</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>正在擷取中...</translation>
     </message>
 </context>
 <context>
@@ -1744,10 +1844,6 @@ Address: %4
         <source>Fee:</source>
         <translation>手續費:</translation>
     </message>
-    <message>
-        <source>Low Output:</source>
-        <translation>低輸出:</translation>
-    </message>
     <message>
         <source>After Fee:</source>
         <translation>計費後金額:</translation>
@@ -1776,6 +1872,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>把表單中的所有欄位清空。</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>零散錢:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>全部清掉</translation>
@@ -1824,10 +1924,6 @@ Address: %4
         <source>Copy priority</source>
         <translation>複製優先度</translation>
     </message>
-    <message>
-        <source>Copy low output</source>
-        <translation>複製低輸出</translation>
-    </message>
     <message>
         <source>Copy change</source>
         <translation>複製找零金額</translation>
@@ -1880,6 +1976,10 @@ Address: %4
         <source>Warning: Unknown change address</source>
         <translation>警告: 不明的找零位址</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>複製零散金額</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>你確定要付錢出去嗎？</translation>
@@ -1888,14 +1988,6 @@ Address: %4
         <source>added as transaction fee</source>
         <translation>加做交易手續費</translation>
     </message>
-    <message>
-        <source>Payment request expired</source>
-        <translation>付款的要求已經過期</translation>
-    </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation>無效的付款位址 %1</translation>
-    </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -1907,10 +1999,6 @@ Address: %4
         <source>Pay &amp;To:</source>
         <translation>付給:</translation>
     </message>
-    <message>
-        <source>The address to send the payment to (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>付款的目標位址(像是 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>請輸入這個位址的標記來把它加進位址簿中</translation>
@@ -1927,6 +2015,10 @@ Address: %4
         <source>This is a normal payment.</source>
         <translation>這是一筆正常的付款。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>接收付款的位元幣位址</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1998,8 +2090,8 @@ Address: %4
         <translation>你可以用自己的位址簽署訊息，來證明你對位址的所有權。但是請小心，不要簽署語意含糊不清的內容，因為釣魚式詐騙可能會用騙你簽署的手法來冒充是你。只有在語句中的細節你都同意時才簽署。</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>用來簽署訊息的位址(像是 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>用來簽署訊息的位元幣位址</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2054,8 +2146,8 @@ Address: %4
         <translation>請在下面輸入簽署的位址，訊息(請確定完整複製了所包含的換行，空格，跳位符號等等)，以及簽章，來驗證這個訊息。請小心，除了訊息內容以外，不要對簽章本身過度解讀，以避免被用「中間人攻擊法」詐騙。</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>簽署這個訊息的位址(像是 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>簽署這個訊息的位元幣位址</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -2070,11 +2162,7 @@ Address: %4
         <translation>重設所有訊息驗證欄位</translation>
     </message>
     <message>
-        <source>Enter a Bitcoin address (e.g. 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</source>
-        <translation>請輸入位元幣位址(像是 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L)</translation>
-    </message>
-    <message>
-        <source>Click &quot;Sign Message&quot; to generate signature</source>
+        <source>Click "Sign Message" to generate signature</source>
         <translation>請按一下「簽署訊息」來產生簽章</translation>
     </message>
     <message>
@@ -2202,6 +2290,10 @@ Address: %4
         <source>own address</source>
         <translation>自己的位址</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>只能看</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>標記</translation>
@@ -2222,6 +2314,14 @@ Address: %4
         <source>Debit</source>
         <translation>出帳</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>出帳總額</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>入帳總額</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>交易手續費</translation>
@@ -2247,7 +2347,7 @@ Address: %4
         <translation>商家</translation>
     </message>
     <message>
-        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>生產出來的錢要再等 %1 個區塊生出來後才成熟可以用。當區塊生產出來時會公布到網路上，來被加進區塊鏈。如果加失敗了，狀態就會變成「不被接受」，而且不能夠花。如果在你生產出區塊的幾秒鐘內，也有其他節點生產出來的話，就有可能會發生這種情形。</translation>
     </message>
     <message>
@@ -2312,10 +2412,6 @@ Address: %4
         <source>Address</source>
         <translation>位址</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>金額</translation>
-    </message>
     <message>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>未成熟(確認 %1 次，會在 %2 次後可用)</translation>
@@ -2527,10 +2623,6 @@ Address: %4
         <source>Address</source>
         <translation>位址</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation>金額</translation>
-    </message>
     <message>
         <source>ID</source>
         <translation>識別碼</translation>
@@ -2544,6 +2636,13 @@ Address: %4
         <translation>到</translation>
     </message>
 </context>
+<context>
+    <name>UnitDisplayStatusBarControl</name>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>金額顯示單位。可以點選其他單位。</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2595,18 +2694,6 @@ Address: %4
 </context>
 <context>
     <name>bitcoin-core</name>
-    <message>
-        <source>Usage:</source>
-        <translation>用法:</translation>
-    </message>
-    <message>
-        <source>List commands</source>
-        <translation>列出指令</translation>
-    </message>
-    <message>
-        <source>Get help for a command</source>
-        <translation>取得指令說明</translation>
-    </message>
     <message>
         <source>Options:</source>
         <translation>選項:</translation>
@@ -2647,10 +2734,6 @@ Address: %4
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>拒絕跟異常節點連線的秒數(預設值: 86400)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>設定在 IPv4 網路上以通訊埠 %u 聽取 RPC 連線時發生錯誤: %s</translation>
-    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
         <translation>在通訊埠 &lt;port&gt; 聽候 JSON-RPC 連線(預設值: 8332, 或若是測試網路: 18332)</translation>
@@ -2660,10 +2743,6 @@ Address: %4
         <translation>接受指令列和 JSON-RPC 指令
 </translation>
     </message>
-    <message>
-        <source>Bitcoin Core RPC client version</source>
-        <translation>位元幣核心 RPC 客戶端軟體版本</translation>
-    </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>用護靈模式在背後執行並接受指令</translation>
@@ -2686,7 +2765,7 @@ rpcpassword=%s
 The username and password MUST NOT be the same.
 If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
         <translation>%s, 你必須要在以下設定檔中設定 RPC 密碼(rpcpassword):
 %s
@@ -2698,36 +2777,28 @@ rpcpassword=%s
 如果還沒有這個設定檔，請在造出來的時候，設定檔案權限成「只有主人才能讀取」。
 也建議你設定警示通知，發生問題時你才會被通知到；
 比如說設定成:
-alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translation>
+alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
     <message>
         <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
         <translation>可接受的加密演算法 (預設值: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
     </message>
-    <message>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>設定在 IPv6 網路上以通訊埠 %u 聽候 RPC 連線失敗，退而改用 IPv4 網路: %s</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>和指定的位址繫結，並總是在指定位址聽候連線。IPv6 請用 [主機]:通訊埠 這種格式</translation>
+        <translation>和指定的位址繫結，並且一直在指定位址聽候連線。IPv6 請用 [主機]:通訊埠 這種格式</translation>
     </message>
     <message>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
         <translation>對沒付手續費的交易持續限制一分鐘內最多只能有 &lt;n&gt; 千位元組 (預設值: 15)</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>進入回歸測試模式，使用可以立即解出區塊的特殊區塊鏈。目的是用來做回歸測試，以及配合應用程式的開發。</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>清掉錢包裡的所有交易，並且在下次啟動時，使用 -rescan 來從區塊鏈中復原回來。</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>Error: Listening for incoming connections failed (listen returned error %d)</source>
-        <translation>錯誤: 聽候外來連線失敗(回傳錯誤 %d)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>錯誤: 交易被拒絕了！有時候會發生這種錯誤，是因為你錢包中的一些錢已經被花掉了。比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢，你現在所用的原來的錢包中，卻沒有那筆錢已經花掉的紀錄。</translation>
@@ -2740,10 +2811,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>當錢包有交易改變時要執行的指令(指令中的 %s 會被取代成交易識別碼)</translation>
     </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>手續費低於這個時會被認為是沒付手續費(產生交易用)(預設值:</translation>
-    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
         <translation>每當累積到 &lt;n&gt; 百萬位元組(MB)時，才將資料庫的變動從記憶體暫存池中寫進磁碟紀錄檔 (預設值: 100)</translation>
@@ -2758,7 +2825,7 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
     </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>設定指令碼驗證的執行緒數目 (%u 到 %d，0 表示程式自動決定，小於 0 表示保留處理器核心不用的數目，預設值: 0)</translation>
+        <translation>設定指令碼驗證的執行緒數目 (%u 到 %d，0 表示程式自動決定，小於 0 表示保留處理器核心不用的數目，預設值: %d)</translation>
     </message>
     <message>
         <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
@@ -2780,10 +2847,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告: -paytxfee 設定了很高的金額！這可是你交易付款所要付的手續費。</translation>
     </message>
-    <message>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin will not work properly.</source>
-        <translation>警告: 請檢查電腦日期和時間是否正確！位元幣軟體沒辦法在時鐘不準的情況下正常運作。</translation>
-    </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>警告: 位元幣網路對於區塊鏈結的決定目前有分歧！看來有些礦工會有問題。</translation>
@@ -2816,30 +2879,14 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>嘗試從壞掉的錢包檔 wallet.dat 復原密鑰</translation>
     </message>
-    <message>
-        <source>Bitcoin Core Daemon</source>
-        <translation>位元幣核心護靈</translation>
-    </message>
     <message>
         <source>Block creation options:</source>
         <translation>區塊製造選項:</translation>
     </message>
-    <message>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>清掉錢包裡交易的列表(診斷用的工具; 也會做 -rescan)</translation>
-    </message>
     <message>
         <source>Connect only to the specified node(s)</source>
         <translation>只連線到指定節點(可多個)</translation>
     </message>
-    <message>
-        <source>Connect through SOCKS proxy</source>
-        <translation>透過 SOCKS 代理伺服器來連線</translation>
-    </message>
-    <message>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>連線到埠號 &lt;port&gt; 上的 JSON-RPC 伺服器(預設值: 8332，或若是測試網路: 18332)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>連線選項:</translation>
@@ -2940,18 +2987,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Failed to write undo data</source>
         <translation>把回復資料寫進去失敗了</translation>
     </message>
-    <message>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>交易時每一千位元組(kB)加付的交易手續費</translation>
-    </message>
-    <message>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>手續費比這個低時會被認為是沒付手續費(轉發用)(預設值:</translation>
-    </message>
-    <message>
-        <source>Find peers using DNS lookup (default: 1 unless -connect)</source>
-        <translation>是否允許在找節點時使用域名查詢(預設值: 當沒用 -connect 時為 1)</translation>
-    </message>
     <message>
         <source>Force safe mode (default: 0)</source>
         <translation>強制進入安全模式 (預設值: 0)</translation>
@@ -2977,8 +3012,8 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <translation>創世區塊不正確或找不到。資料目錄錯了嗎？</translation>
     </message>
     <message>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>無效的 -onion 位址: &apos;%s&apos;</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>無效的 -onion 位址: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
@@ -2988,18 +3023,10 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation>在除錯輸出內容前附加時間(預設值: 1)</translation>
     </message>
-    <message>
-        <source>RPC client options:</source>
-        <translation>RPC 客戶端選項:</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>從目前的區塊檔 blk000??.dat 重建區塊鏈的索引</translation>
     </message>
-    <message>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>選擇 -proxy 指定代理伺服器的 SOCKS 協定版本(4 或 5, 預設值: 5)</translation>
-    </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>設定資料庫快取大小是多少百萬位元組(MB，範圍: %d 到 %d，預設值: %d)</translation>
@@ -3021,12 +3048,12 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <translation>傳送交易時可以花還沒確認的零錢(預設值: 1)</translation>
     </message>
     <message>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>這是設計用來給回歸測試工具和應用程式開發用的。</translation>
+        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <translation>從磁碟匯入區塊資料後停止執行(預設值: 0)</translation>
     </message>
     <message>
-        <source>Usage (deprecated, use bitcoin-cli):</source>
-        <translation>用法(已過時，請改用 bitcoin-cli):</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>這是設計用來給回歸測試工具和應用程式開發用的。</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3036,10 +3063,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Verifying wallet...</source>
         <translation>正在驗證錢包資料...</translation>
     </message>
-    <message>
-        <source>Wait for RPC server to start</source>
-        <translation>等待 RPC 伺服器啟動</translation>
-    </message>
     <message>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>錢包檔 %s 沒有在資料目錄 %s 裡面</translation>
@@ -3048,10 +3071,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Wallet options:</source>
         <translation>錢包選項:</translation>
     </message>
-    <message>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>警告: 參數 -debugnet 因為已經淘汰掉了而被忽略，請改用 -debug=net</translation>
-    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>改變 -txindex 參數後，必須要用 -reindex 參數來重建資料庫</translation>
@@ -3060,33 +3079,157 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>從其它來源的 blk000??.dat 檔匯入區塊</translation>
     </message>
+    <message>
+        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(預設值: 1。1 表示保留交易描述資料，像是帳戶使用者和付款請求資訊；2 表示丟掉交易描述資料)</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>允許指定的來源建立 JSON-RPC 連線。&lt;ip&gt; 的有效值可以是一個單獨位址(像是 1.2.3.4)，一個網段/網段罩遮值(像是 1.2.3.4/255.255.255.0)，或是網段/CIDR值(像是 1.2.3.4/24)。這個選項可以設定多次。</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>設定在網路上以位址 %s 和通訊埠 %u 聽候 RPC 連線時發生錯誤: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>和指定的位址繫結，並且把連線過來的節點放進白名單。IPv6 請用 [主機]:通訊埠 這種格式</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>和指定的位址繫結以聽候 JSON-RPC 連線。IPv6 請用 [主機]:通訊埠 這種格式。這個選項可以設定多次。(預設值: 跟所有網路界面上的位址繫結)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>沒辦法鎖定資料目錄 %s。位元幣核心可能已經在執行了。</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>用系統預設權限來造出新的檔案，而不是用使用者權限罩遮(umask)值 077 (只有在關掉錢包功能時才有作用)。</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>這套軟體是依據 MIT/X11 軟體授權條款散布，詳情請見附帶的 COPYING 檔案，或是以下網站:  &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>錯誤: 聽候外來連線失敗(回傳錯誤 %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>錯誤: 找到不再支援的 -socks 參數。現在只支援 SOCKS5 協定的代理伺服器了，因為不再能夠指定 SOCKS 協定版本。</translation>
+    </message>
+    <message>
+        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
+        <translation>當發現網路上有重複花用錢包裡的交易輸入時所要執行的指令(指令中的 %s 會被取代為重複花用的交易代碼，%t 會被取代為錢包中的交易代碼)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>當收到相關警示，或發現相當長的分支時，所要執行的指令(指令中的 %s 會被取代成警示訊息)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>當處理轉發的交易時，如果每千位元組(Kb)的手續費比這個值低，就視為沒付手續費 (預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>當製造交易時，如果每千位元組(Kb)的手續費比這個值低，就視為沒付手續費 (預設值: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
+        <translation>當沒有設定 paytxfee 時，自動包含可以讓交易能在平均 n 個區塊內確認的手續費  (預設值: 1)</translation>
+    </message>
     <message>
         <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
         <translation>輸出除錯資訊(預設值: 0, 可以不指定 &lt;category&gt;)</translation>
     </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>是否允許在節點位址數目不足時，使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>設定高優先度或低手續費的交易資料大小上限成多少位元組(預設值: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit 軟體 &lt;https://www.openssl.org/&gt;, 和由 Eric Young 撰寫的加解密軟體，以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</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>警告: 請檢查電腦日期和時間是否正確！位元幣核心沒辦法在時鐘不準的情況下正常運作。</translation>
+    </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
+        <translation>把來自指定網域或位址的節點放進白名單。這個選項可以設定多次。</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>在白名單中的節點不會因為偵測到阻斷服務攻擊而被停用。來自這些節點的交易也一定會被轉發，即使說交易本來就在記憶池裡了也一樣。適用於像是閘道伺服器。</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
+        <translation>是否一定要用域名查詢來搜尋節點 (預設值: 0)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>沒辦法解析 -whitebind 指定的位址: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>透過 SOCKS5 代理伺服器連線</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>版權為位元幣核心開發人員自西元 2009 至 %i 年起所有</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>沒辦法解析 -rpcbind 參數值 %s 為網路位址</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>載入 wallet.dat 檔案時發生錯誤: 這個錢包需要新版的位元幣核心</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>錯誤: 找到不再支援的 -tor 參數，請改用 -onion 參數。</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>交易付款時每千位元組(kB)的交易手續費 (預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: 0)</source>
+        <translation>在除錯輸出內容中包含網際網路位址(預設值: 0)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>資訊</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>設定最低轉發手續費 -minrelaytxfee=&lt;金額&gt; 的金額無效: &apos;%s&apos;</translation>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>初始化時的基本檢查失敗了。位元幣核心將會關閉。</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>設定最低轉發手續費 -minrelaytxfee=&lt;金額&gt; 的金額無效: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>設定 -mintxfee=&lt;金額&gt; 的金額無效: '%s'</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>設定 -mintxfee=&lt;金額&gt; 的金額無效: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>設定 -paytxfee=&lt;金額&gt; 的金額無效: '%s' (至少要有 %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>指定在 -whitelist 的網段無效: '%s'</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>在記憶體中保存最多 &lt;n&gt; 個不和其他區塊相連結的區塊(預設值 : %u)</translation>
     </message>
     <message>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -3108,6 +3251,14 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
         <translation>每個連線的傳送緩衝區大小上限為 &lt;n&gt;*1000 位元組(預設值: 1000)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>指定 -whitebind 時必須包含通訊埠: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>節點轉發選項:</translation>
+    </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
         <translation>只接受跟內建的檢查段點吻合的區塊鏈(預設值: 1)</translation>
@@ -3141,16 +3292,16 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <translation>隨機亂動 &lt;n&gt; 分之一的網路訊息裡的資料</translation>
     </message>
     <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>啟用定期將變動寫入錢包檔的執行緒 (預設值: 1)</translation>
+        <source>Relay and mine data carrier transactions (default: 1)</source>
+        <translation>允許轉發和開採只帶資料的交易 (預設值: 1)</translation>
     </message>
     <message>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL 選項: (SSL 設定程序請見 Bitcoin Wiki)</translation>
+        <source>Relay non-P2SH multisig (default: 1)</source>
+        <translation>允許轉發非 P2SH 的多簽章交易 (預設值: 1)</translation>
     </message>
     <message>
-        <source>Send command to Bitcoin Core</source>
-        <translation>傳送指令給位元幣核心</translation>
+        <source>Run a thread to flush wallet periodically (default: 1)</source>
+        <translation>啟用定期將變動寫入錢包檔的執行緒 (預設值: 1)</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -3168,10 +3319,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>顯示所有的除錯選項 (用法: --help --help-debug)</translation>
     </message>
-    <message>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>顯示效能評比資訊 (預設值: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>客戶端軟體啓動時把 debug.log 檔縮小(預設值: 當沒有 -debug 時為 1)</translation>
@@ -3184,14 +3331,14 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Specify connection timeout in milliseconds (default: 5000)</source>
         <translation>指定連線在幾毫秒後逾時(預設值: 5000)</translation>
     </message>
-    <message>
-        <source>Start Bitcoin Core Daemon</source>
-        <translation>啟動位元幣核心護靈</translation>
-    </message>
     <message>
         <source>System error: </source>
         <translation>系統錯誤:</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>這套軟體屬於實驗性質。</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>交易金額太小</translation>
@@ -3204,6 +3351,10 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Transaction too large</source>
         <translation>交易位元量太大</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>無法和這台電腦上的 %s 繫結(回傳錯誤 %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 0)</source>
         <translation>是否要使用「通用即插即用」協定(UPnP)，來設定聽候連線的通訊埠的對應(預設值: 0)</translation>
@@ -3216,6 +3367,10 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC 連線使用者名稱</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>錢包需要重寫: 請重新啓動位元幣核心來完成</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>警告</translation>
@@ -3224,6 +3379,14 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>警告: 這個版本已經被淘汰了，必須要升級！</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>警告: 忽略了不再支援的 -benchmark 參數，請改用 -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>警告: 忽略了不再支援的 -debugnet 參數，請改用 -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>正在砍掉錢包中的所有交易...</translation>
@@ -3232,10 +3395,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>on startup</source>
         <translation>當啟動時</translation>
     </message>
-    <message>
-        <source>version</source>
-        <translation>版本</translation>
-    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>錢包檔 weallet.dat 壞掉了，拯救失敗</translation>
@@ -3244,14 +3403,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC 連線密碼</translation>
     </message>
-    <message>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>允許指定的來源 IP 位址進行 JSON-RPC 連線</translation>
-    </message>
-    <message>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>傳送指令給在 &lt;ip&gt; 的節點(預設值: 127.0.0.1)</translation>
-    </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>當最新區塊改變時要執行的指令(指令中的 %s 會被取代成區塊雜湊值)</translation>
@@ -3284,10 +3435,6 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>This help message</source>
         <translation>這些說明訊息</translation>
     </message>
-    <message>
-        <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
-        <translation>沒辦法和這台電腦上的 %s 繫結(回傳錯誤 %d, %s)</translation>
-    </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>允許對 -addnode, -seednode, -connect 的參數使用域名查詢 </translation>
@@ -3300,41 +3447,29 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>載入檔案 wallet.dat 時發生錯誤: 錢包損毀了</translation>
     </message>
-    <message>
-        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin</source>
-        <translation>載入 wallet.dat 檔案時發生錯誤: 這個錢包需要新版的位元幣軟體</translation>
-    </message>
-    <message>
-        <source>Wallet needed to be rewritten: restart Bitcoin to complete</source>
-        <translation>錢包需要重寫: 請重新啓動位元幣軟體來完成</translation>
-    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>載入錢包檔 wallet.dat 時發生錯誤</translation>
     </message>
     <message>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>無效的 -proxy 位址: &apos;%s&apos;</translation>
+        <source>Invalid -proxy address: '%s'</source>
+        <translation>無效的 -proxy 位址: '%s'</translation>
     </message>
     <message>
-        <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
-        <translation>在 -onlynet 指定了不明的網路別: &apos;%s&apos;</translation>
+        <source>Unknown network specified in -onlynet: '%s'</source>
+        <translation>在 -onlynet 指定了不明的網路別: '%s'</translation>
     </message>
     <message>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>在 -socks 指定了不明的代理協定版本: %i</translation>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>沒辦法解析 -bind 位址: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -bind address: &apos;%s&apos;</source>
-        <translation>沒辦法解析 -bind 位址: &apos;%s&apos;</translation>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>沒辦法解析 -externalip 位址: '%s'</translation>
     </message>
     <message>
-        <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
-        <translation>沒辦法解析 -externalip 位址: &apos;%s&apos;</translation>
-    </message>
-    <message>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>設定 -paytxfee=&lt;金額&gt; 的金額無效: &apos;%s&apos;</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>設定 -paytxfee=&lt;金額&gt; 的金額無效: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -3380,13 +3515,5 @@ alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com</translat
         <source>Error</source>
         <translation>錯誤</translation>
     </message>
-    <message>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>你必須在以下設定檔中設定 RPC 密碼(rpcpassword=&lt;password&gt;):
-%s
-如果還沒有這個檔案，請在造出來的時候，設定檔案權限成只有主人才能讀取。</translation>
-    </message>
 </context>
 </TS>
\ No newline at end of file

From 47eb76597efb7dadb36dd98bc20bd80b2db9cd50 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 1 Sep 2014 21:36:46 +0200
Subject: [PATCH 0631/1819] Serializer simplifications after
 IMPLEMENT_SERIALIZE overhaul

---
 src/core.h                        |  7 ++---
 src/main.h                        |  4 +--
 src/netbase.h                     |  3 +--
 src/protocol.h                    |  9 +++----
 src/qt/recentrequeststablemodel.h | 10 +++----
 src/qt/walletmodel.h              | 32 ++++++++++------------
 src/wallet.h                      | 44 +++++++++++++------------------
 7 files changed, 43 insertions(+), 66 deletions(-)

diff --git a/src/core.h b/src/core.h
index 34c00c4142b5..ed37f7a3f820 100644
--- a/src/core.h
+++ b/src/core.h
@@ -257,14 +257,12 @@ class CTransaction
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
         READWRITE(*const_cast<int32_t*>(&this->nVersion));
         nVersion = this->nVersion;
         READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
         READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
         READWRITE(*const_cast<uint32_t*>(&nLockTime));
-        if (fRead)
+        if (ser_action.ForRead())
             UpdateHash();
     }
 
@@ -346,8 +344,7 @@ class CTxOutCompressor
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-        if (!fRead) {
+        if (!ser_action.ForRead()) {
             uint64_t nVal = CompressAmount(txout.nValue);
             READWRITE(VARINT(nVal));
         } else {
diff --git a/src/main.h b/src/main.h
index 31a1131b832e..1d1a9df10f29 100644
--- a/src/main.h
+++ b/src/main.h
@@ -424,12 +424,10 @@ class CPartialMerkleTree
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
         READWRITE(nTransactions);
         READWRITE(vHash);
         std::vector<unsigned char> vBytes;
-        if (fRead) {
+        if (ser_action.ForRead()) {
             READWRITE(vBytes);
             CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(this));
             us.vBits.resize(vBytes.size() * 8);
diff --git a/src/netbase.h b/src/netbase.h
index 9b52c0a41595..a061a9155671 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -154,11 +154,10 @@ class CService : public CNetAddr
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            bool fRead = ser_action.ForRead();
             READWRITE(FLATDATA(ip));
             unsigned short portN = htons(port);
             READWRITE(portN);
-            if (fRead)
+            if (ser_action.ForRead())
                  port = ntohs(portN);
         }
 };
diff --git a/src/protocol.h b/src/protocol.h
index e4b099177499..ddf096aeacc6 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -89,16 +89,13 @@ class CAddress : public CService
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            bool fRead = ser_action.ForRead();
-
-            CAddress* pthis = const_cast<CAddress*>(this);
-            if (fRead)
-                pthis->Init();
+            if (ser_action.ForRead())
+                Init();
             if (nType & SER_DISK)
                 READWRITE(nVersion);
             if ((nType & SER_DISK) ||
                 (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
-            READWRITE(nTime);
+                READWRITE(nTime);
             READWRITE(nServices);
             READWRITE(*(CService*)this);
         }
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index a558aa494238..cdb7e47f6239 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -28,19 +28,15 @@ class RecentRequestEntry
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
-        RecentRequestEntry* pthis = const_cast<RecentRequestEntry*>(this);
-
         unsigned int nDate = date.toTime_t();
 
-        READWRITE(pthis->nVersion);
-        nVersion = pthis->nVersion;
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
         READWRITE(id);
         READWRITE(nDate);
         READWRITE(recipient);
 
-        if (fRead)
+        if (ser_action.ForRead())
             date = QDateTime::fromTime_t(nDate);
     }
 };
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 2a9ac4650f36..bd8a25bb94f1 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -63,20 +63,16 @@ class SendCoinsRecipient
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
-        SendCoinsRecipient* pthis = const_cast<SendCoinsRecipient*>(this);
-
-        std::string sAddress = pthis->address.toStdString();
-        std::string sLabel = pthis->label.toStdString();
-        std::string sMessage = pthis->message.toStdString();
+        std::string sAddress = address.toStdString();
+        std::string sLabel = label.toStdString();
+        std::string sMessage = message.toStdString();
         std::string sPaymentRequest;
-        if (!fRead && pthis->paymentRequest.IsInitialized())
-            pthis->paymentRequest.SerializeToString(&sPaymentRequest);
-        std::string sAuthenticatedMerchant = pthis->authenticatedMerchant.toStdString();
+        if (!ser_action.ForRead() && paymentRequest.IsInitialized())
+            paymentRequest.SerializeToString(&sPaymentRequest);
+        std::string sAuthenticatedMerchant = authenticatedMerchant.toStdString();
 
-        READWRITE(pthis->nVersion);
-        nVersion = pthis->nVersion;
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
         READWRITE(sAddress);
         READWRITE(sLabel);
         READWRITE(amount);
@@ -84,14 +80,14 @@ class SendCoinsRecipient
         READWRITE(sPaymentRequest);
         READWRITE(sAuthenticatedMerchant);
 
-        if (fRead)
+        if (ser_action.ForRead())
         {
-            pthis->address = QString::fromStdString(sAddress);
-            pthis->label = QString::fromStdString(sLabel);
-            pthis->message = QString::fromStdString(sMessage);
+            address = QString::fromStdString(sAddress);
+            label = QString::fromStdString(sLabel);
+            message = QString::fromStdString(sMessage);
             if (!sPaymentRequest.empty())
-                pthis->paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
-            pthis->authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
+                paymentRequest.parse(QByteArray::fromRawData(sPaymentRequest.data(), sPaymentRequest.size()));
+            authenticatedMerchant = QString::fromStdString(sAuthenticatedMerchant);
         }
     }
 };
diff --git a/src/wallet.h b/src/wallet.h
index cea61afed34c..2fc953c516c1 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -609,21 +609,18 @@ class CWalletTx : public CMerkleTx
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
-        CWalletTx* pthis = const_cast<CWalletTx*>(this);
-        if (fRead)
-            pthis->Init(NULL);
+        if (ser_action.ForRead())
+            Init(NULL);
         char fSpent = false;
 
-        if (!fRead)
+        if (!ser_action.ForRead())
         {
-            pthis->mapValue["fromaccount"] = pthis->strFromAccount;
+            mapValue["fromaccount"] = strFromAccount;
 
-            WriteOrderPos(pthis->nOrderPos, pthis->mapValue);
+            WriteOrderPos(nOrderPos, mapValue);
 
             if (nTimeSmart)
-                pthis->mapValue["timesmart"] = strprintf("%u", nTimeSmart);
+                mapValue["timesmart"] = strprintf("%u", nTimeSmart);
         }
 
         READWRITE(*(CMerkleTx*)this);
@@ -636,13 +633,13 @@ class CWalletTx : public CMerkleTx
         READWRITE(fFromMe);
         READWRITE(fSpent);
 
-        if (fRead)
+        if (ser_action.ForRead())
         {
-            pthis->strFromAccount = pthis->mapValue["fromaccount"];
+            strFromAccount = mapValue["fromaccount"];
 
-            ReadOrderPos(pthis->nOrderPos, pthis->mapValue);
+            ReadOrderPos(nOrderPos, mapValue);
 
-            pthis->nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(pthis->mapValue["timesmart"]) : 0;
+            nTimeSmart = mapValue.count("timesmart") ? (unsigned int)atoi64(mapValue["timesmart"]) : 0;
         }
 
         mapValue.erase("fromaccount");
@@ -979,9 +976,6 @@ class CAccountingEntry
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        bool fRead = ser_action.ForRead();
-
-        CAccountingEntry& me = *const_cast<CAccountingEntry*>(this);
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
         // Note: strAccount is serialized as part of the key, not here.
@@ -989,9 +983,9 @@ class CAccountingEntry
         READWRITE(nTime);
         READWRITE(LIMITED_STRING(strOtherAccount, 65536));
 
-        if (!fRead)
+        if (!ser_action.ForRead())
         {
-            WriteOrderPos(nOrderPos, me.mapValue);
+            WriteOrderPos(nOrderPos, mapValue);
 
             if (!(mapValue.empty() && _ssExtra.empty()))
             {
@@ -999,26 +993,26 @@ class CAccountingEntry
                 ss.insert(ss.begin(), '\0');
                 ss << mapValue;
                 ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end());
-                me.strComment.append(ss.str());
+                strComment.append(ss.str());
             }
         }
 
         READWRITE(LIMITED_STRING(strComment, 65536));
 
         size_t nSepPos = strComment.find("\0", 0, 1);
-        if (fRead)
+        if (ser_action.ForRead())
         {
-            me.mapValue.clear();
+            mapValue.clear();
             if (std::string::npos != nSepPos)
             {
                 CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion);
-                ss >> me.mapValue;
-                me._ssExtra = std::vector<char>(ss.begin(), ss.end());
+                ss >> mapValue;
+                _ssExtra = std::vector<char>(ss.begin(), ss.end());
             }
-            ReadOrderPos(me.nOrderPos, me.mapValue);
+            ReadOrderPos(nOrderPos, mapValue);
         }
         if (std::string::npos != nSepPos)
-            me.strComment.erase(nSepPos);
+            strComment.erase(nSepPos);
 
         mapValue.erase("n");
     }

From c0f5d4aba5e158d32edb3fc280f63e04542e90d4 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Mon, 1 Sep 2014 19:51:25 -0400
Subject: [PATCH 0632/1819] Fixing Compiler Error C2466

---
 src/key.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/key.cpp b/src/key.cpp
index a253f8666abc..a058ef05e540 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -396,7 +396,7 @@ const unsigned char vchMaxModHalfOrder[32] = {
     0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0
 };
 
-const unsigned char vchZero[0] = {};
+const unsigned char vchZero[1] = {0};
 
 } // anon namespace
 

From 8d5e5102f6f80c037b6bbc2985b778fd40c80d1c Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 23 Aug 2014 03:52:54 +0200
Subject: [PATCH 0633/1819] Remove unused function StackString() and class
 CCoins;

---
 src/script.h | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/src/script.h b/src/script.h
index 8e6aedcc631b..c1f5aa1dd528 100644
--- a/src/script.h
+++ b/src/script.h
@@ -18,7 +18,6 @@
 #include <boost/foreach.hpp>
 #include <boost/variant.hpp>
 
-class CCoins;
 class CKeyStore;
 class CTransaction;
 struct CMutableTransaction;
@@ -411,25 +410,6 @@ inline std::string ValueString(const std::vector<unsigned char>& vch)
         return HexStr(vch);
 }
 
-inline std::string StackString(const std::vector<std::vector<unsigned char> >& vStack)
-{
-    std::string str;
-    BOOST_FOREACH(const std::vector<unsigned char>& vch, vStack)
-    {
-        if (!str.empty())
-            str += " ";
-        str += ValueString(vch);
-    }
-    return str;
-}
-
-
-
-
-
-
-
-
 /** Serialized script, used inside transaction inputs and outputs */
 class CScript : public std::vector<unsigned char>
 {

From 53efb09e4ceaa0ccb4e6271387f5013fe5e1ec75 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 23 Aug 2014 05:09:47 +0200
Subject: [PATCH 0634/1819] Discover some missing includes

---
 src/bloom.cpp                       | 2 ++
 src/core.cpp                        | 2 ++
 src/core_write.cpp                  | 2 ++
 src/qt/recentrequeststablemodel.cpp | 2 ++
 src/script.cpp                      | 2 ++
 src/script.h                        | 1 -
 6 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/bloom.cpp b/src/bloom.cpp
index 85a2ddc1892b..e34041336fbf 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -10,6 +10,8 @@
 #include <math.h>
 #include <stdlib.h>
 
+#include <boost/foreach.hpp>
+
 #define LN2SQUARED 0.4804530139182014246671025263266649717305529515945455
 #define LN2 0.6931471805599453094172321214581765680755001343602552
 
diff --git a/src/core.cpp b/src/core.cpp
index e6636ae04f19..8dcda0126a73 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -7,6 +7,8 @@
 
 #include "tinyformat.h"
 
+#include <boost/foreach.hpp>
+
 std::string COutPoint::ToString() const
 {
     return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
diff --git a/src/core_write.cpp b/src/core_write.cpp
index e63b64d69231..e66e75515c33 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -11,6 +11,8 @@
 #include "utilmoneystr.h"
 #include "base58.h"
 
+#include <boost/foreach.hpp>
+
 using namespace std;
 
 string EncodeHexTx(const CTransaction& tx)
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 9e3976644ede..0e5802922c4c 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -8,6 +8,8 @@
 #include "guiutil.h"
 #include "optionsmodel.h"
 
+#include <boost/foreach.hpp>
+
 RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent) :
     walletModel(parent)
 {
diff --git a/src/script.cpp b/src/script.cpp
index 28c50a1358b3..21883bd41a40 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -22,6 +22,8 @@
 #include <boost/tuple/tuple_comparison.hpp>
 #include <boost/tuple/tuple.hpp>
 
+#include <boost/foreach.hpp>
+
 using namespace std;
 using namespace boost;
 
diff --git a/src/script.h b/src/script.h
index c1f5aa1dd528..d17cfe3fa457 100644
--- a/src/script.h
+++ b/src/script.h
@@ -15,7 +15,6 @@
 #include <string>
 #include <vector>
 
-#include <boost/foreach.hpp>
 #include <boost/variant.hpp>
 
 class CKeyStore;

From 3f6540ad8f9c7b45a0dd2b260a282d3adad2406f Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 2 Sep 2014 09:58:09 +0200
Subject: [PATCH 0635/1819] Rename IMPLEMENT_SERIALIZE to ADD_SERIALIZE_METHODS

---
 src/addrman.h                     |  4 ++--
 src/alert.h                       |  4 ++--
 src/bloom.h                       |  2 +-
 src/core.h                        | 22 +++++++++++-----------
 src/crypter.h                     |  2 +-
 src/main.h                        | 14 +++++++-------
 src/netbase.h                     |  4 ++--
 src/protocol.h                    |  6 +++---
 src/qt/recentrequeststablemodel.h |  2 +-
 src/qt/walletmodel.h              |  2 +-
 src/serialize.h                   |  6 +++---
 src/wallet.h                      | 12 ++++++------
 src/walletdb.h                    |  2 +-
 13 files changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 0790802b5c94..90507cb4580b 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -46,7 +46,7 @@ class CAddrInfo : public CAddress
 
 public:
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -268,7 +268,7 @@ class CAddrMan
     // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
     // changes to the ADDRMAN_ parameters without breaking the on-disk structure.
     //
-    // We don't use IMPLEMENT_SERIALIZE since the serialization and deserialization code has
+    // We don't use ADD_SERIALIZE_METHODS since the serialization and deserialization code has
     // very little in common.
     template<typename Stream>
     void Serialize(Stream &s, int nType, int nVersionDummy) const
diff --git a/src/alert.h b/src/alert.h
index 4a8736d60ba1..5ecf94cea8c9 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -46,7 +46,7 @@ class CUnsignedAlert
     std::string strStatusBar;
     std::string strReserved;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -84,7 +84,7 @@ class CAlert : public CUnsignedAlert
         SetNull();
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/bloom.h b/src/bloom.h
index 4a710928ccb8..143e3b4c79f8 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -62,7 +62,7 @@ class CBloomFilter
     CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
     CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/core.h b/src/core.h
index ed37f7a3f820..cde8d8b3fe07 100644
--- a/src/core.h
+++ b/src/core.h
@@ -31,7 +31,7 @@ class COutPoint
     COutPoint() { SetNull(); }
     COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -91,7 +91,7 @@ class CTxIn
     explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
     CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -145,7 +145,7 @@ class CFeeRate
     friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
     std::string ToString() const;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -170,7 +170,7 @@ class CTxOut
 
     CTxOut(int64_t nValueIn, CScript scriptPubKeyIn);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -253,7 +253,7 @@ class CTransaction
 
     CTransaction& operator=(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -311,7 +311,7 @@ struct CMutableTransaction
     CMutableTransaction();
     CMutableTransaction(const CTransaction& tx);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -340,7 +340,7 @@ class CTxOutCompressor
 
     CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -407,7 +407,7 @@ class CTxUndo
     // undo information for all txins
     std::vector<CTxInUndo> vprevout;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -440,7 +440,7 @@ class CBlockHeader
         SetNull();
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -497,7 +497,7 @@ class CBlock : public CBlockHeader
         *((CBlockHeader*)this) = header;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -547,7 +547,7 @@ struct CBlockLocator
         vHave = vHaveIn;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/crypter.h b/src/crypter.h
index 59efc7650882..c7424c9b20e5 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -43,7 +43,7 @@ class CMasterKey
     // such as the various parameters to scrypt
     std::vector<unsigned char> vchOtherDerivationParameters;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/main.h b/src/main.h
index 1d1a9df10f29..6ef16c1ed1ef 100644
--- a/src/main.h
+++ b/src/main.h
@@ -197,7 +197,7 @@ struct CDiskBlockPos
     int nFile;
     unsigned int nPos;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -230,7 +230,7 @@ struct CDiskTxPos : public CDiskBlockPos
 {
     unsigned int nTxOffset; // after header
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -313,7 +313,7 @@ class CBlockUndo
 public:
     std::vector<CTxUndo> vtxundo; // for all but the coinbase
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -420,7 +420,7 @@ class CPartialMerkleTree
 public:
 
     // serialization implementation
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -496,7 +496,7 @@ class CBlockFileInfo
     uint64_t nTimeFirst;         // earliest time of block in file
     uint64_t nTimeLast;          // latest time of block in file
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -770,7 +770,7 @@ class CDiskBlockIndex : public CBlockIndex
         hashPrev = (pprev ? pprev->GetBlockHash() : 0);
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -992,7 +992,7 @@ class CMerkleBlock
     // thus the filter will likely be modified.
     CMerkleBlock(const CBlock& block, CBloomFilter& filter);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/netbase.h b/src/netbase.h
index a061a9155671..9fc5c72eb813 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -88,7 +88,7 @@ class CNetAddr
         friend bool operator!=(const CNetAddr& a, const CNetAddr& b);
         friend bool operator<(const CNetAddr& a, const CNetAddr& b);
 
-        IMPLEMENT_SERIALIZE;
+        ADD_SERIALIZE_METHODS;
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -150,7 +150,7 @@ class CService : public CNetAddr
         CService(const struct in6_addr& ipv6Addr, unsigned short port);
         CService(const struct sockaddr_in6& addr);
 
-        IMPLEMENT_SERIALIZE;
+        ADD_SERIALIZE_METHODS;
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/protocol.h b/src/protocol.h
index ddf096aeacc6..82d29e66de95 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -35,7 +35,7 @@ class CMessageHeader
         std::string GetCommand() const;
         bool IsValid() const;
 
-        IMPLEMENT_SERIALIZE;
+        ADD_SERIALIZE_METHODS;
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -85,7 +85,7 @@ class CAddress : public CService
 
         void Init();
 
-        IMPLEMENT_SERIALIZE;
+        ADD_SERIALIZE_METHODS;
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -119,7 +119,7 @@ class CInv
         CInv(int typeIn, const uint256& hashIn);
         CInv(const std::string& strType, const uint256& hashIn);
 
-        IMPLEMENT_SERIALIZE;
+        ADD_SERIALIZE_METHODS;
 
         template <typename Stream, typename Operation>
         inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index cdb7e47f6239..3df5971823b1 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -24,7 +24,7 @@ class RecentRequestEntry
     QDateTime date;
     SendCoinsRecipient recipient;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index bd8a25bb94f1..52d02038cd39 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -59,7 +59,7 @@ class SendCoinsRecipient
     static const int CURRENT_VERSION = 1;
     int nVersion;
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/serialize.h b/src/serialize.h
index 1440676a1629..dba3460d1bff 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -91,9 +91,9 @@ enum
 
 /* Implement three methods for serializable objects. These are actually wrappers over
  * "SerializationOp" template, which implements the body of each class' serialization
- * code. Adding "IMPLEMENT_SERIALIZE" in the body of the class causes these wrappers to be
+ * code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be
  * added as members. */
-#define IMPLEMENT_SERIALIZE                                                          \
+#define ADD_SERIALIZE_METHODS                                                          \
     size_t GetSerializeSize(int nType, int nVersion) const {                         \
         CSizeComputer s(nType, nVersion);                                            \
         NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);\
@@ -807,7 +807,7 @@ void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
 
 
 //
-// Support for IMPLEMENT_SERIALIZE and READWRITE macro
+// Support for ADD_SERIALIZE_METHODS and READWRITE macro
 //
 struct CSerActionSerialize
 {
diff --git a/src/wallet.h b/src/wallet.h
index 2fc953c516c1..f8e1ebac1219 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -64,7 +64,7 @@ class CKeyPool
     CKeyPool();
     CKeyPool(const CPubKey& vchPubKeyIn);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -492,7 +492,7 @@ class CMerkleTx : public CTransaction
         fMerkleVerified = false;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -605,7 +605,7 @@ class CWalletTx : public CMerkleTx
         nOrderPos = -1;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -893,7 +893,7 @@ class CWalletKey
 
     CWalletKey(int64_t nExpires=0);
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -929,7 +929,7 @@ class CAccount
         vchPubKey = CPubKey();
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
@@ -972,7 +972,7 @@ class CAccountingEntry
         nEntryNo = 0;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
diff --git a/src/walletdb.h b/src/walletdb.h
index cf1a66216ec7..ce63bb0b97df 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -55,7 +55,7 @@ class CKeyMetadata
         nCreateTime = nCreateTime_;
     }
 
-    IMPLEMENT_SERIALIZE;
+    ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {

From 910526d8487e5db04b4f280efcd05d95e6dc273f Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 2 Sep 2014 18:56:47 +0200
Subject: [PATCH 0636/1819] Use OR of respective block flags for masks

---
 src/main.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main.h b/src/main.h
index 31a1131b832e..9688b53dc42e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -548,15 +548,16 @@ enum BlockStatus {
     BLOCK_VALID_TRANSACTIONS =    3, // only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root
     BLOCK_VALID_CHAIN        =    4, // outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30
     BLOCK_VALID_SCRIPTS      =    5, // scripts/signatures ok
-    BLOCK_VALID_MASK         =    7,
+    BLOCK_VALID_MASK         =   BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
+                                 BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
 
     BLOCK_HAVE_DATA          =    8, // full block available in blk*.dat
     BLOCK_HAVE_UNDO          =   16, // undo data available in rev*.dat
-    BLOCK_HAVE_MASK          =   24,
+    BLOCK_HAVE_MASK          =   BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO,
 
     BLOCK_FAILED_VALID       =   32, // stage after last reached validness failed
     BLOCK_FAILED_CHILD       =   64, // descends from failed block
-    BLOCK_FAILED_MASK        =   96
+    BLOCK_FAILED_MASK        =   BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD,
 };
 
 /** The block chain is a tree shaped structure starting with the

From 9189f5fe4df1ac7ea6ca75ceada867beafda90a9 Mon Sep 17 00:00:00 2001
From: phantomcircuit <patrick@cloudhashing.com>
Date: Fri, 29 Aug 2014 18:21:18 -0700
Subject: [PATCH 0637/1819] remove useless millisleep

reduces time to service requests improving performance
---
 src/net.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 39667062075a..0e848787e991 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1080,8 +1080,6 @@ void ThreadSocketHandler()
             BOOST_FOREACH(CNode* pnode, vNodesCopy)
                 pnode->Release();
         }
-
-        MilliSleep(10);
     }
 }
 

From 550d4fa7a77c9763d4de9e0c0c48bc2655a65017 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Sat, 9 Aug 2014 20:57:47 -0700
Subject: [PATCH 0638/1819] Remove DNS Seeds run by entities which were never
 well-established.

---
 doc/dnsseed-policy.md | 3 +++
 src/chainparams.cpp   | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/doc/dnsseed-policy.md b/doc/dnsseed-policy.md
index 73e307f7cd1f..66a1757ac5e7 100644
--- a/doc/dnsseed-policy.md
+++ b/doc/dnsseed-policy.md
@@ -3,6 +3,9 @@ Expectations for DNS Seed operators
 
 Bitcoin Core attempts to minimize the level of trust in DNS seeds,
 but DNS seeds still pose a small amount of risk for the network.
+As such, DNS seeds must be run by entities which have some minimum
+level of trust within the Bitcoin community.
+
 Other implementations of Bitcoin software may also use the same
 seeds and may be more exposed. In light of this exposure this
 document establishes some basic expectations for the expectations
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index ce99f268f38f..bfe50d77d577 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -99,7 +99,6 @@ class CMainParams : public CChainParams {
         vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org"));
         vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com"));
         vSeeds.push_back(CDNSSeedData("bitnodes.io", "seed.bitnodes.io"));
-        vSeeds.push_back(CDNSSeedData("open-nodes.org", "seeds.bitcoin.open-nodes.org"));
         vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org"));
 
         base58Prefixes[PUBKEY_ADDRESS] = list_of(0);

From bbda40226b87ab152bc24b67a1f296857e6e465f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 3 Sep 2014 12:20:47 +0200
Subject: [PATCH 0639/1819] net: Remove MilliSleep from StopNode

I don't understand why it would be there in the first place. This looks
like voodoo, not programming.
---
 src/net.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/net.cpp b/src/net.cpp
index 39667062075a..dbba5108da56 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1791,7 +1791,6 @@ bool StopNode()
     if (semOutbound)
         for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
             semOutbound->post();
-    MilliSleep(50);
     DumpAddresses();
 
     return true;

From 629d75faac84bc0a00533d01dd291a4e6394a51f Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 2 Sep 2014 21:21:15 +0200
Subject: [PATCH 0640/1819] Combine CCoinsViewCache's HaveCoins and const
 GetCoins into AccessCoins.

The efficient version of CCoinsViewCache::GetCoins only works for known-to-exist
cache entries, requiring a separate HaveCoins call beforehand. This is
inefficient as both perform a hashtable lookup.

Replace the non-mutable GetCoins with AccessCoins, which returns a potentially-NULL
pointer. This also decreases the overloading of GetCoins.

Also replace some copying (inefficient) GetCoins calls with equivalent AccessCoins,
decreasing the copying.
---
 src/bitcoin-tx.cpp        |  6 +++---
 src/coins.cpp             | 38 ++++++++++++++++++--------------------
 src/coins.h               |  8 +++++---
 src/main.cpp              | 30 ++++++++++++++++--------------
 src/miner.cpp             |  7 ++++---
 src/rpcrawtransaction.cpp | 12 ++++++------
 src/txmempool.cpp         |  4 ++--
 7 files changed, 54 insertions(+), 51 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 5f547bba8362..c8cd9edfa45b 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -418,12 +418,12 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
     // Sign what we can:
     for (unsigned int i = 0; i < mergedTx.vin.size(); i++) {
         CTxIn& txin = mergedTx.vin[i];
-        CCoins coins;
-        if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n)) {
+        const CCoins* coins = view.AccessCoins(txin.prevout.hash);
+        if (!coins || !coins->IsAvailable(txin.prevout.n)) {
             fComplete = false;
             continue;
         }
-        const CScript& prevPubKey = coins.vout[txin.prevout.n].scriptPubKey;
+        const CScript& prevPubKey = coins->vout[txin.prevout.n].scriptPubKey;
 
         txin.scriptSig.clear();
         // Only sign SIGHASH_SINGLE if there's a corresponding output:
diff --git a/src/coins.cpp b/src/coins.cpp
index 7bfb84ef3e7f..34485db2bd29 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -110,9 +110,13 @@ CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) {
     return it->second;
 }
 
-const CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) const {
-    /* Avoid redundant implementation with the const-cast.  */
-    return const_cast<CCoinsViewCache*>(this)->GetCoins(txid);
+const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
+    CCoinsMap::const_iterator it = FetchCoins(txid);
+    if (it == cacheCoins.end()) {
+        return NULL;
+    } else {
+        return &it->second;
+    }
 }
 
 bool CCoinsViewCache::SetCoins(const uint256 &txid, const CCoins &coins) {
@@ -162,9 +166,9 @@ unsigned int CCoinsViewCache::GetCacheSize() const {
 
 const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input) const
 {
-    const CCoins &coins = GetCoins(input.prevout.hash);
-    assert(coins.IsAvailable(input.prevout.n));
-    return coins.vout[input.prevout.n];
+    const CCoins* coins = AccessCoins(input.prevout.hash);
+    assert(coins && coins->IsAvailable(input.prevout.n));
+    return coins->vout[input.prevout.n];
 }
 
 int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx) const
@@ -182,19 +186,12 @@ int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx) const
 bool CCoinsViewCache::HaveInputs(const CTransaction& tx) const
 {
     if (!tx.IsCoinBase()) {
-        // first check whether information about the prevout hash is available
         for (unsigned int i = 0; i < tx.vin.size(); i++) {
             const COutPoint &prevout = tx.vin[i].prevout;
-            if (!HaveCoins(prevout.hash))
-                return false;
-        }
-
-        // then check whether the actual outputs are available
-        for (unsigned int i = 0; i < tx.vin.size(); i++) {
-            const COutPoint &prevout = tx.vin[i].prevout;
-            const CCoins &coins = GetCoins(prevout.hash);
-            if (!coins.IsAvailable(prevout.n))
+            const CCoins* coins = AccessCoins(prevout.hash);
+            if (!coins || !coins->IsAvailable(prevout.n)) {
                 return false;
+            }
         }
     }
     return true;
@@ -207,10 +204,11 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
     double dResult = 0.0;
     BOOST_FOREACH(const CTxIn& txin, tx.vin)
     {
-        const CCoins &coins = GetCoins(txin.prevout.hash);
-        if (!coins.IsAvailable(txin.prevout.n)) continue;
-        if (coins.nHeight < nHeight) {
-            dResult += coins.vout[txin.prevout.n].nValue * (nHeight-coins.nHeight);
+        const CCoins* coins = AccessCoins(txin.prevout.hash);
+        assert(coins);
+        if (!coins->IsAvailable(txin.prevout.n)) continue;
+        if (coins->nHeight < nHeight) {
+            dResult += coins->vout[txin.prevout.n].nValue * (nHeight-coins->nHeight);
         }
     }
     return tx.ComputePriority(dResult);
diff --git a/src/coins.h b/src/coins.h
index d338e3172eca..c25393f1e04c 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -344,11 +344,13 @@ class CCoinsViewCache : public CCoinsViewBacked
     bool SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
+    // Return a pointer to CCoins in the cache, or NULL if not found. This is
+    // more efficient than GetCoins. Modifications to other cache entries are
+    // allowed while accessing the returned pointer.
+    const CCoins* AccessCoins(const uint256 &txid) const;
+
     // Return a modifiable reference to a CCoins. Check HaveCoins first.
-    // Many methods explicitly require a CCoinsViewCache because of this method, to reduce
-    // copying.
     CCoins &GetCoins(const uint256 &txid);
-    const CCoins &GetCoins(const uint256 &txid) const;
 
     // Push the modifications applied to this cache to its base.
     // Failure to call this method before destruction will cause the changes to be forgotten.
diff --git a/src/main.cpp b/src/main.cpp
index 4aebdadd3b6d..bea01ab7c974 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1017,9 +1017,9 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
             int nHeight = -1;
             {
                 CCoinsViewCache &view = *pcoinsTip;
-                CCoins coins;
-                if (view.GetCoins(hash, coins))
-                    nHeight = coins.nHeight;
+                const CCoins* coins = view.AccessCoins(hash);
+                if (coins)
+                    nHeight = coins->nHeight;
             }
             if (nHeight > 0)
                 pindexSlow = chainActive[nHeight];
@@ -1371,19 +1371,20 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
         for (unsigned int i = 0; i < tx.vin.size(); i++)
         {
             const COutPoint &prevout = tx.vin[i].prevout;
-            const CCoins &coins = inputs.GetCoins(prevout.hash);
+            const CCoins *coins = inputs.AccessCoins(prevout.hash);
+            assert(coins);
 
             // If prev is coinbase, check that it's matured
-            if (coins.IsCoinBase()) {
-                if (nSpendHeight - coins.nHeight < COINBASE_MATURITY)
+            if (coins->IsCoinBase()) {
+                if (nSpendHeight - coins->nHeight < COINBASE_MATURITY)
                     return state.Invalid(
-                        error("CheckInputs() : tried to spend coinbase at depth %d", nSpendHeight - coins.nHeight),
+                        error("CheckInputs() : tried to spend coinbase at depth %d", nSpendHeight - coins->nHeight),
                         REJECT_INVALID, "bad-txns-premature-spend-of-coinbase");
             }
 
             // Check for negative or overflow input values
-            nValueIn += coins.vout[prevout.n].nValue;
-            if (!MoneyRange(coins.vout[prevout.n].nValue) || !MoneyRange(nValueIn))
+            nValueIn += coins->vout[prevout.n].nValue;
+            if (!MoneyRange(coins->vout[prevout.n].nValue) || !MoneyRange(nValueIn))
                 return state.DoS(100, error("CheckInputs() : txin values out of range"),
                                  REJECT_INVALID, "bad-txns-inputvalues-outofrange");
 
@@ -1413,10 +1414,11 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
         if (fScriptChecks) {
             for (unsigned int i = 0; i < tx.vin.size(); i++) {
                 const COutPoint &prevout = tx.vin[i].prevout;
-                const CCoins &coins = inputs.GetCoins(prevout.hash);
+                const CCoins* coins = inputs.AccessCoins(prevout.hash);
+                assert(coins);
 
                 // Verify signature
-                CScriptCheck check(coins, tx, i, flags, 0);
+                CScriptCheck check(*coins, tx, i, flags, 0);
                 if (pvChecks) {
                     pvChecks->push_back(CScriptCheck());
                     check.swap(pvChecks->back());
@@ -1428,7 +1430,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                         // arguments; if so, don't trigger DoS protection to
                         // avoid splitting the network between upgraded and
                         // non-upgraded nodes.
-                        CScriptCheck check(coins, tx, i,
+                        CScriptCheck check(*coins, tx, i,
                                 flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, 0);
                         if (check())
                             return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag");
@@ -1614,8 +1616,8 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
                            (pindex->nHeight==91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721")));
     if (fEnforceBIP30) {
         BOOST_FOREACH(const CTransaction& tx, block.vtx) {
-            const uint256& hash = tx.GetHash();
-            if (view.HaveCoins(hash) && !view.GetCoins(hash).IsPruned())
+            const CCoins* coins = view.AccessCoins(tx.GetHash());
+            if (coins && !coins->IsPruned())
                 return state.DoS(100, error("ConnectBlock() : tried to overwrite transaction"),
                                  REJECT_INVALID, "bad-txns-BIP30");
         }
diff --git a/src/miner.cpp b/src/miner.cpp
index 96dc80a26d71..d05ddbeb1f8b 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -167,12 +167,13 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                     nTotalIn += mempool.mapTx[txin.prevout.hash].GetTx().vout[txin.prevout.n].nValue;
                     continue;
                 }
-                const CCoins &coins = view.GetCoins(txin.prevout.hash);
+                const CCoins* coins = view.AccessCoins(txin.prevout.hash);
+                assert(coins);
 
-                int64_t nValueIn = coins.vout[txin.prevout.n].nValue;
+                int64_t nValueIn = coins->vout[txin.prevout.n].nValue;
                 nTotalIn += nValueIn;
 
-                int nConf = pindexPrev->nHeight - coins.nHeight + 1;
+                int nConf = pindexPrev->nHeight - coins->nHeight + 1;
 
                 dPriority += (double)nValueIn * nConf;
             }
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 7cd704193dd5..dc75caeabce4 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -565,7 +565,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         BOOST_FOREACH(const CTxIn& txin, mergedTx.vin) {
             const uint256& prevHash = txin.prevout.hash;
             CCoins coins;
-            view.GetCoins(prevHash, coins); // this is certainly allowed to fail
+            view.AccessCoins(prevHash); // this is certainly allowed to fail
         }
 
         view.SetBackend(viewDummy); // switch back to avoid locking mempool for too long
@@ -669,12 +669,12 @@ Value signrawtransaction(const Array& params, bool fHelp)
     // Sign what we can:
     for (unsigned int i = 0; i < mergedTx.vin.size(); i++) {
         CTxIn& txin = mergedTx.vin[i];
-        CCoins coins;
-        if (!view.GetCoins(txin.prevout.hash, coins) || !coins.IsAvailable(txin.prevout.n)) {
+        const CCoins* coins = view.AccessCoins(txin.prevout.hash);
+        if (coins == NULL || !coins->IsAvailable(txin.prevout.n)) {
             fComplete = false;
             continue;
         }
-        const CScript& prevPubKey = coins.vout[txin.prevout.n].scriptPubKey;
+        const CScript& prevPubKey = coins->vout[txin.prevout.n].scriptPubKey;
 
         txin.scriptSig.clear();
         // Only sign SIGHASH_SINGLE if there's a corresponding output:
@@ -732,9 +732,9 @@ Value sendrawtransaction(const Array& params, bool fHelp)
         fOverrideFees = params[1].get_bool();
 
     CCoinsViewCache &view = *pcoinsTip;
-    CCoins existingCoins;
+    const CCoins* existingCoins = view.AccessCoins(hashTx);
     bool fHaveMempool = mempool.exists(hashTx);
-    bool fHaveChain = view.GetCoins(hashTx, existingCoins) && existingCoins.nHeight < 1000000000;
+    bool fHaveChain = existingCoins && existingCoins->nHeight < 1000000000;
     if (!fHaveMempool && !fHaveChain) {
         // push to local node and sync with wallets
         CValidationState state;
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 238d5bab1676..f059e69ac78b 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -509,8 +509,8 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
                 const CTransaction& tx2 = it2->second.GetTx();
                 assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
             } else {
-                const CCoins &coins = pcoins->GetCoins(txin.prevout.hash);
-                assert(coins.IsAvailable(txin.prevout.n));
+                const CCoins* coins = pcoins->AccessCoins(txin.prevout.hash);
+                assert(coins && coins->IsAvailable(txin.prevout.n));
             }
             // Check whether its inputs are marked in mapNextTx.
             std::map<COutPoint, CInPoint>::const_iterator it3 = mapNextTx.find(txin.prevout);

From a0dbe433bdb3f22be639fbb675c371277fba6d80 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Sep 2014 02:01:10 +0200
Subject: [PATCH 0641/1819] checkpoints.cpp depends on main, it can use
 mapBlockIndex directly

---
 src/checkpoints.cpp | 2 +-
 src/checkpoints.h   | 2 +-
 src/main.cpp        | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 717f0b90fee2..343d5251f531 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -146,7 +146,7 @@ namespace Checkpoints {
         return checkpoints.rbegin()->first;
     }
 
-    CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex)
+    CBlockIndex* GetLastCheckpoint()
     {
         if (!fEnabled)
             return NULL;
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 52cdc3555945..6d3f2d493563 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -22,7 +22,7 @@ namespace Checkpoints {
     int GetTotalBlocksEstimate();
 
     // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
-    CBlockIndex* GetLastCheckpoint(const std::map<uint256, CBlockIndex*>& mapBlockIndex);
+    CBlockIndex* GetLastCheckpoint();
 
     double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks = true);
 
diff --git a/src/main.cpp b/src/main.cpp
index 4aebdadd3b6d..a024461e27b9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2302,7 +2302,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
             return state.Invalid(error("AcceptBlock() : block is marked invalid"), 0, "duplicate");
     }
 
-    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
+    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
     if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
     {
         // Extra checks to prevent "fill up memory by spamming with bogus blocks"
@@ -2345,7 +2345,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
                              REJECT_CHECKPOINT, "checkpoint mismatch");
 
         // Don't accept any forks from the main chain prior to last checkpoint
-        CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
+        CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
         if (pcheckpoint && nHeight < pcheckpoint->nHeight)
             return state.DoS(100, error("AcceptBlock() : forked chain older than last checkpoint (height %d)", nHeight));
 
@@ -3286,7 +3286,7 @@ void static ProcessGetData(CNode* pfrom)
                     // If the requested block is at a height below our last
                     // checkpoint, only serve it if it's in the checkpointed chain
                     int nHeight = mi->second->nHeight;
-                    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint(mapBlockIndex);
+                    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
                     if (pcheckpoint && nHeight < pcheckpoint->nHeight) {
                         if (!chainActive.Contains(mi->second))
                         {

From 145d5be896db4e8fda17039bed26100e38fae2f0 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Sep 2014 02:02:44 +0200
Subject: [PATCH 0642/1819] Introduce BlockMap type for mapBlockIndex

---
 src/checkpoints.cpp          |  2 +-
 src/init.cpp                 |  2 +-
 src/main.cpp                 | 32 ++++++++++++++++----------------
 src/main.h                   |  3 ++-
 src/qt/transactionrecord.cpp |  2 +-
 src/rpcblockchain.cpp        |  2 +-
 src/rpcrawtransaction.cpp    |  2 +-
 src/rpcwallet.cpp            |  2 +-
 src/wallet.cpp               |  6 +++---
 9 files changed, 27 insertions(+), 26 deletions(-)

diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 343d5251f531..c41deea7ce64 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -156,7 +156,7 @@ namespace Checkpoints {
         BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints)
         {
             const uint256& hash = i.second;
-            std::map<uint256, CBlockIndex*>::const_iterator t = mapBlockIndex.find(hash);
+            BlockMap::const_iterator t = mapBlockIndex.find(hash);
             if (t != mapBlockIndex.end())
                 return t->second;
         }
diff --git a/src/init.cpp b/src/init.cpp
index b8988f8b7508..31f64878fb25 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1031,7 +1031,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     {
         string strMatch = mapArgs["-printblock"];
         int nFound = 0;
-        for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
+        for (BlockMap::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
         {
             uint256 hash = (*mi).first;
             if (boost::algorithm::starts_with(hash.ToString(), strMatch))
diff --git a/src/main.cpp b/src/main.cpp
index a024461e27b9..2479beabddd1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -38,7 +38,7 @@ using namespace boost;
 
 CCriticalSection cs_main;
 
-map<uint256, CBlockIndex*> mapBlockIndex;
+BlockMap mapBlockIndex;
 CChain chainActive;
 int64_t nTimeBestReceived = 0;
 CWaitableCriticalSection csBestBlock;
@@ -328,7 +328,7 @@ void ProcessBlockAvailability(NodeId nodeid) {
     assert(state != NULL);
 
     if (state->hashLastUnknownBlock != 0) {
-        map<uint256, CBlockIndex*>::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock);
+        BlockMap::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock);
         if (itOld != mapBlockIndex.end() && itOld->second->nChainWork > 0) {
             if (state->pindexBestKnownBlock == NULL || itOld->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
                 state->pindexBestKnownBlock = itOld->second;
@@ -344,7 +344,7 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
 
     ProcessBlockAvailability(nodeid);
 
-    map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(hash);
+    BlockMap::iterator it = mapBlockIndex.find(hash);
     if (it != mapBlockIndex.end() && it->second->nChainWork > 0) {
         // An actually better block was announced.
         if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
@@ -434,7 +434,7 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
 CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const {
     // Find the first block the caller has in the main chain
     BOOST_FOREACH(const uint256& hash, locator.vHave) {
-        std::map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hash);
+        BlockMap::iterator mi = mapBlockIndex.find(hash);
         if (mi != mapBlockIndex.end())
         {
             CBlockIndex* pindex = (*mi).second;
@@ -2068,7 +2068,7 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
 {
     // Check for duplicate
     uint256 hash = block.GetHash();
-    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(hash);
+    BlockMap::iterator it = mapBlockIndex.find(hash);
     if (it != mapBlockIndex.end())
         return it->second;
 
@@ -2079,9 +2079,9 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
          LOCK(cs_nBlockSequenceId);
          pindexNew->nSequenceId = nBlockSequenceId++;
     }
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
+    BlockMap::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
     pindexNew->phashBlock = &((*mi).first);
-    map<uint256, CBlockIndex*>::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);
+    BlockMap::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);
     if (miPrev != mapBlockIndex.end())
     {
         pindexNew->pprev = (*miPrev).second;
@@ -2294,7 +2294,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     AssertLockHeld(cs_main);
     // Check for duplicate
     uint256 hash = block.GetHash();
-    std::map<uint256, CBlockIndex*>::iterator miSelf = mapBlockIndex.find(hash);
+    BlockMap::iterator miSelf = mapBlockIndex.find(hash);
     CBlockIndex *pindex = NULL;
     if (miSelf != mapBlockIndex.end()) {
         pindex = miSelf->second;
@@ -2323,7 +2323,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     CBlockIndex* pindexPrev = NULL;
     int nHeight = 0;
     if (hash != Params().HashGenesisBlock()) {
-        map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
+        BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
         if (mi == mapBlockIndex.end())
             return state.DoS(10, error("AcceptBlock() : prev block not found"), 0, "bad-prevblk");
         pindexPrev = (*mi).second;
@@ -2517,7 +2517,7 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
         return error("ProcessBlock() : CheckBlock FAILED");
 
     // If we don't already have its previous block (with full data), shunt it off to holding area until we get it
-    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(pblock->hashPrevBlock);
+    BlockMap::iterator it = mapBlockIndex.find(pblock->hashPrevBlock);
     if (pblock->hashPrevBlock != 0 && (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)))
     {
         LogPrintf("ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString());
@@ -2799,7 +2799,7 @@ CBlockIndex * InsertBlockIndex(uint256 hash)
         return NULL;
 
     // Return existing
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hash);
+    BlockMap::iterator mi = mapBlockIndex.find(hash);
     if (mi != mapBlockIndex.end())
         return (*mi).second;
 
@@ -2876,7 +2876,7 @@ bool static LoadBlockIndexDB()
     LogPrintf("LoadBlockIndexDB(): transaction index %s\n", fTxIndex ? "enabled" : "disabled");
 
     // Load pointer to end of best chain
-    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
+    BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
     if (it == mapBlockIndex.end())
         return true;
     chainActive.SetTip(it->second);
@@ -3034,7 +3034,7 @@ void PrintBlockTree()
     AssertLockHeld(cs_main);
     // pre-compute tree structure
     map<CBlockIndex*, vector<CBlockIndex*> > mapNext;
-    for (map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
+    for (BlockMap::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
     {
         CBlockIndex* pindex = (*mi).second;
         mapNext[pindex->pprev].push_back(pindex);
@@ -3280,7 +3280,7 @@ void static ProcessGetData(CNode* pfrom)
             if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK)
             {
                 bool send = false;
-                map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(inv.hash);
+                BlockMap::iterator mi = mapBlockIndex.find(inv.hash);
                 if (mi != mapBlockIndex.end())
                 {
                     // If the requested block is at a height below our last
@@ -3711,7 +3711,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         if (locator.IsNull())
         {
             // If locator is null, return the hashStop block
-            map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashStop);
+            BlockMap::iterator mi = mapBlockIndex.find(hashStop);
             if (mi == mapBlockIndex.end())
                 return true;
             pindex = (*mi).second;
@@ -4513,7 +4513,7 @@ class CMainCleanup
     CMainCleanup() {}
     ~CMainCleanup() {
         // block headers
-        std::map<uint256, CBlockIndex*>::iterator it1 = mapBlockIndex.begin();
+        BlockMap::iterator it1 = mapBlockIndex.begin();
         for (; it1 != mapBlockIndex.end(); it1++)
             delete (*it1).second;
         mapBlockIndex.clear();
diff --git a/src/main.h b/src/main.h
index d38d033d2cc8..da2b5cac81dc 100644
--- a/src/main.h
+++ b/src/main.h
@@ -85,7 +85,8 @@ static const unsigned char REJECT_CHECKPOINT = 0x43;
 extern CScript COINBASE_FLAGS;
 extern CCriticalSection cs_main;
 extern CTxMemPool mempool;
-extern std::map<uint256, CBlockIndex*> mapBlockIndex;
+typedef std::map<uint256, CBlockIndex*> BlockMap;
+extern BlockMap mapBlockIndex;
 extern uint64_t nLastBlockTx;
 extern uint64_t nLastBlockSize;
 extern const std::string strMessageMagic;
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index d7bd25e08b4c..20c1449c9248 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -170,7 +170,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
 
     // Find the block the tx is in
     CBlockIndex* pindex = NULL;
-    std::map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(wtx.hashBlock);
+    BlockMap::iterator mi = mapBlockIndex.find(wtx.hashBlock);
     if (mi != mapBlockIndex.end())
         pindex = (*mi).second;
 
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 83fe629351df..4b3beae20c1b 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -392,7 +392,7 @@ Value gettxout(const Array& params, bool fHelp)
     if (n<0 || (unsigned int)n>=coins.vout.size() || coins.vout[n].IsNull())
         return Value::null;
 
-    std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
+    BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock());
     CBlockIndex *pindex = it->second;
     ret.push_back(Pair("bestblock", pindex->GetBlockHash().GetHex()));
     if ((unsigned int)coins.nHeight == MEMPOOL_HEIGHT)
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 7cd704193dd5..a73641834d80 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -88,7 +88,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry)
 
     if (hashBlock != 0) {
         entry.push_back(Pair("blockhash", hashBlock.GetHex()));
-        map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
+        BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
         if (mi != mapBlockIndex.end() && (*mi).second) {
             CBlockIndex* pindex = (*mi).second;
             if (chainActive.Contains(pindex)) {
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 215da2ea12d0..100d6c2bd031 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1447,7 +1447,7 @@ Value listsinceblock(const Array& params, bool fHelp)
         uint256 blockId = 0;
 
         blockId.SetHex(params[0].get_str());
-        std::map<uint256, CBlockIndex*>::iterator it = mapBlockIndex.find(blockId);
+        BlockMap::iterator it = mapBlockIndex.find(blockId);
         if (it != mapBlockIndex.end())
             pindex = it->second;
     }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 18a5b3971c9a..d3ad4869bbea 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2113,7 +2113,7 @@ void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const {
     for (std::map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); it++) {
         // iterate over all wallet transactions...
         const CWalletTx &wtx = (*it).second;
-        std::map<uint256, CBlockIndex*>::const_iterator blit = mapBlockIndex.find(wtx.hashBlock);
+        BlockMap::const_iterator blit = mapBlockIndex.find(wtx.hashBlock);
         if (blit != mapBlockIndex.end() && chainActive.Contains(blit->second)) {
             // ... which are already in a block
             int nHeight = blit->second->nHeight;
@@ -2233,7 +2233,7 @@ int CMerkleTx::SetMerkleBranch(const CBlock* pblock)
     }
 
     // Is the tx in a block that's in the main chain
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
+    BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
     if (mi == mapBlockIndex.end())
         return 0;
     CBlockIndex* pindex = (*mi).second;
@@ -2250,7 +2250,7 @@ int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
     AssertLockHeld(cs_main);
 
     // Find the block it claims to be in
-    map<uint256, CBlockIndex*>::iterator mi = mapBlockIndex.find(hashBlock);
+    BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
     if (mi == mapBlockIndex.end())
         return 0;
     CBlockIndex* pindex = (*mi).second;

From 8a41e1edd4d31d08b7360d7e5964c1c40a7aa1b6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Sep 2014 02:03:17 +0200
Subject: [PATCH 0643/1819] Use boost::unordered_map for mapBlockIndex

---
 src/main.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main.h b/src/main.h
index da2b5cac81dc..8c0a743e24d6 100644
--- a/src/main.h
+++ b/src/main.h
@@ -29,6 +29,8 @@
 #include <utility>
 #include <vector>
 
+#include <boost/unordered_map.hpp>
+
 class CBlockIndex;
 class CBloomFilter;
 class CInv;
@@ -81,11 +83,15 @@ 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.GetLow64(); }
+};
 
 extern CScript COINBASE_FLAGS;
 extern CCriticalSection cs_main;
 extern CTxMemPool mempool;
-typedef std::map<uint256, CBlockIndex*> BlockMap;
+typedef boost::unordered_map<uint256, CBlockIndex*, BlockHasher> BlockMap;
 extern BlockMap mapBlockIndex;
 extern uint64_t nLastBlockTx;
 extern uint64_t nLastBlockSize;

From 1e4f87f5a13e34a457b537e9d13a212e6c5b754f Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Sep 2014 02:03:39 +0200
Subject: [PATCH 0644/1819] Use memcmp for uint256 equality/inequality

---
 src/uint256.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/uint256.h b/src/uint256.h
index d1a822af0df8..6bb9a5940047 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -10,6 +10,7 @@
 #include <stdexcept>
 #include <stdint.h>
 #include <string>
+#include <cstring>
 #include <vector>
 
 class uint_error : public std::runtime_error {
@@ -215,8 +216,8 @@ class base_uint
     friend inline const base_uint operator>>(const base_uint& a, int shift) { return base_uint(a) >>= shift; }
     friend inline const base_uint operator<<(const base_uint& a, int shift) { return base_uint(a) <<= shift; }
     friend inline const base_uint operator*(const base_uint& a, uint32_t b) { return base_uint(a) *= b; }
-    friend inline bool operator==(const base_uint& a, const base_uint& b) { return a.CompareTo(b) == 0; }
-    friend inline bool operator!=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) != 0; }
+    friend inline bool operator==(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) == 0; }
+    friend inline bool operator!=(const base_uint& a, const base_uint& b) { return memcmp(a.pn, b.pn, sizeof(a.pn)) != 0; }
     friend inline bool operator>(const base_uint& a, const base_uint& b) { return a.CompareTo(b) > 0; }
     friend inline bool operator<(const base_uint& a, const base_uint& b) { return a.CompareTo(b) < 0; }
     friend inline bool operator>=(const base_uint& a, const base_uint& b) { return a.CompareTo(b) >= 0; }

From fb51e28227fc1561ffa55cd3c5222d2b581778af Mon Sep 17 00:00:00 2001
From: himynameismartin <himynameismartin@gmail.com>
Date: Thu, 4 Sep 2014 12:45:28 +0200
Subject: [PATCH 0645/1819] Added XML syntax highlighting

---
 doc/translation_process.md | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/doc/translation_process.md b/doc/translation_process.md
index 61a0a0ffed98..9475b1dc7211 100644
--- a/doc/translation_process.md
+++ b/doc/translation_process.md
@@ -17,10 +17,12 @@ automated.
 This file must be updated whenever a new translation is added. Please note that
 files must end with `.qm`, not `.ts`.
 
-    <qresource prefix="/translations">
-        <file alias="en">locale/bitcoin_en.qm</file>
-        ...
-    </qresource>
+```xml
+<qresource prefix="/translations">
+    <file alias="en">locale/bitcoin_en.qm</file>
+    ...
+</qresource>
+```
 
 ### src/qt/locale/
 

From 399cdbc70013d54569f17b4e47e4438b8921b46b Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sun, 24 Aug 2014 11:37:14 -0400
Subject: [PATCH 0646/1819] contrib/linearize: Add feature to set file's
 timestamp based on block header time.

---
 contrib/linearize/README.md         |  5 +--
 contrib/linearize/linearize-data.py | 50 ++++++++++++++++++++---------
 2 files changed, 37 insertions(+), 18 deletions(-)

diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md
index b5c6e7824ed9..157586e4d4e0 100644
--- a/contrib/linearize/README.md
+++ b/contrib/linearize/README.md
@@ -27,6 +27,7 @@ output.
 Optional config file setting for linearize-data:
 * "netmagic": network magic number
 * "max_out_sz": maximum output file size (default 1000*1000*1000)
-* "split_year": Split files when a new year is first seen, in addition to
+* "split_timestamp": Split files when a new month is first seen, in addition to
 reaching a maximum file size.
-
+* "file_timestamp": Set each file's last-modified time to that of the
+most recent block in that file.
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 3a4c9759fe47..383bb38198a7 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -10,11 +10,13 @@
 import json
 import struct
 import re
+import os
 import base64
 import httplib
 import sys
 import hashlib
 import datetime
+import time
 
 settings = {}
 
@@ -60,9 +62,10 @@ def calc_hash_str(blk_hdr):
 
 def get_blk_dt(blk_hdr):
 	members = struct.unpack("<I", blk_hdr[68:68+4])
-	dt = datetime.datetime.fromtimestamp(members[0])
+	nTime = members[0]
+	dt = datetime.datetime.fromtimestamp(nTime)
 	dt_ym = datetime.datetime(dt.year, dt.month, 1)
-	return dt_ym
+	return (dt_ym, nTime)
 
 def get_block_hashes(settings):
 	blkindex = []
@@ -87,14 +90,19 @@ def copydata(settings, blkindex, blkset):
 	outFn = 0
 	outsz = 0
 	outF = None
+	outFname = None
 	blkCount = 0
 
 	lastDate = datetime.datetime(2000, 1, 1)
+	highTS = 1408893517 - 315360000
 	timestampSplit = False
 	fileOutput = True
+	setFileTime = False
 	maxOutSz = settings['max_out_sz']
 	if 'output' in settings:
 		fileOutput = False
+	if settings['file_timestamp'] != 0:
+		setFileTime = True
 	if settings['split_timestamp'] != 0:
 		timestampSplit = True
 
@@ -134,34 +142,41 @@ def copydata(settings, blkindex, blkset):
 
 		if not fileOutput and ((outsz + inLen) > maxOutSz):
 			outF.close()
+			if setFileTime:
+				os.utime(outFname, (int(time.time()), highTS))
 			outF = None
+			outFname = None
 			outFn = outFn + 1
 			outsz = 0
 
-		if timestampSplit:
-			blkDate = get_blk_dt(blk_hdr)
-			if blkDate > lastDate:
-				print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
-				lastDate = blkDate
-				if outF:
-					outF.close()
-					outF = None
-					outFn = outFn + 1
-					outsz = 0
+		(blkDate, blkTS) = get_blk_dt(blk_hdr)
+		if timestampSplit and (blkDate > lastDate):
+			print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
+			lastDate = blkDate
+			if outF:
+				outF.close()
+				if setFileTime:
+					os.utime(outFname, (int(time.time()), highTS))
+				outF = None
+				outFname = None
+				outFn = outFn + 1
+				outsz = 0
 
 		if not outF:
 			if fileOutput:
-				fname = settings['output_file']
+				outFname = settings['output_file']
 			else:
-				fname = "%s/blk%05d.dat" % (settings['output'], outFn)
-			print("Output file" + fname)
-			outF = open(fname, "wb")
+				outFname = "%s/blk%05d.dat" % (settings['output'], outFn)
+			print("Output file" + outFname)
+			outF = open(outFname, "wb")
 
 		outF.write(inhdr)
 		outF.write(rawblock)
 		outsz = outsz + inLen + 8
 
 		blkCount = blkCount + 1
+		if blkTS > highTS:
+			highTS = blkTS
 
 		if (blkCount % 1000) == 0:
 			print("Wrote " + str(blkCount) + " blocks")
@@ -191,6 +206,8 @@ def copydata(settings, blkindex, blkset):
 		settings['input'] = 'input'
 	if 'hashlist' not in settings:
 		settings['hashlist'] = 'hashlist.txt'
+	if 'file_timestamp' not in settings:
+		settings['file_timestamp'] = 0
 	if 'split_timestamp' not in settings:
 		settings['split_timestamp'] = 0
 	if 'max_out_sz' not in settings:
@@ -198,6 +215,7 @@ def copydata(settings, blkindex, blkset):
 
 	settings['max_out_sz'] = long(settings['max_out_sz'])
 	settings['split_timestamp'] = int(settings['split_timestamp'])
+	settings['file_timestamp'] = int(settings['file_timestamp'])
 	settings['netmagic'] = settings['netmagic'].decode('hex')
 
 	if 'output_file' not in settings and 'output' not in settings:

From e4cf9f84797cea8d5c7fa36b99f502a5afe0ceb5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 4 Sep 2014 13:12:13 -0400
Subject: [PATCH 0647/1819] depends: fix typo in source downloading. Regression
 from c897b1e732.

Some sources are renamed after download, since the filenames don't play nice
with (for example) gitian. This fixes the rename.

Needed for OSX build as it renames a file.
---
 depends/funcs.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/depends/funcs.mk b/depends/funcs.mk
index 280706efb312..28bfb8549238 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -22,8 +22,8 @@ endef
 define fetch_file
 (test -f $(SOURCES_PATH)/$(4) || \
   ( mkdir -p $$($(1)_extract_dir) && \
-  ( $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(2)/$(3)" || \
-    $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(3).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(3)" ) && \
+  ( $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(4).temp" "$(2)/$(3)" || \
+    $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(4).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(3)" ) && \
     echo "$(5)  $$($(1)_extract_dir)/$(4).temp" > $$($(1)_extract_dir)/.$(4).hash && \
     $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$(4).hash && \
     mv $$($(1)_extract_dir)/$(4).temp $(SOURCES_PATH)/$(4) ))

From 81061ffd694958383496a4d1e628d764e648ffbe Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 3 Sep 2014 14:14:01 -0400
Subject: [PATCH 0648/1819] travis: add osx build

---
 .travis.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 2073e71769c4..379a0e1df794 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -14,10 +14,12 @@ env:
     - CCACHE_TEMPDIR=/tmp/.ccache-temp
     - CCACHE_COMPRESS=1
     - BASE_OUTDIR=$TRAVIS_BUILD_DIR/out
+    - SDK_URL=https://bitcoincore.org/depends-sources/sdks
 cache:
   apt: true
   directories:
   - depends/built
+  - depends/sdk-sources
   - $HOME/.ccache
 matrix:
   fast_finish: true
@@ -30,6 +32,8 @@ matrix:
       env: HOST=x86_64-unknown-linux-gnu RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 4"
       env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+    - compiler: "true 5"
+      env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
     - compiler: "true 6"
       env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev" GOAL="deploy"
     - compiler: "true 7"
@@ -39,7 +43,9 @@ install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi
 before_script:
     - unset CC; unset CXX
-    - mkdir -p depends/SDKs
+    - mkdir -p depends/SDKs depends/sdk-sources
+    - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -O depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
+    - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
     - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS || (echo "Build failure. Verbose build follows." && make -C depends V=1 HOST=$HOST $DEP_OPTS)
 script:
     - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST

From a264e445ff497f2704d386cc3357c6efca352114 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Sep 2014 09:49:57 +0200
Subject: [PATCH 0649/1819] remove dup include of foreach.hpp in script.cpp

---
 src/script.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/script.cpp b/src/script.cpp
index 21883bd41a40..06a0a5decf58 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -19,10 +19,8 @@
 
 #include <boost/foreach.hpp>
 #include <boost/thread.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
 #include <boost/tuple/tuple.hpp>
-
-#include <boost/foreach.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
 
 using namespace std;
 using namespace boost;

From 1ffb99b07f404404c5e84bf6576b27434b7c34ba Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Sep 2014 13:11:11 +0200
Subject: [PATCH 0650/1819] [Qt] copyright, style and indentation cleanup of Qt
 tests

---
 src/qt/test/paymentrequestdata.h   | 4 ++++
 src/qt/test/paymentservertests.cpp | 9 ++++++---
 src/qt/test/paymentservertests.h   | 8 ++++++--
 src/qt/test/test_main.cpp          | 7 ++++++-
 src/qt/test/uritests.cpp           | 4 ++++
 src/qt/test/uritests.h             | 4 ++++
 6 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/src/qt/test/paymentrequestdata.h b/src/qt/test/paymentrequestdata.h
index 49558165f055..aeaa7d89a036 100644
--- a/src/qt/test/paymentrequestdata.h
+++ b/src/qt/test/paymentrequestdata.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 //
 // Data for paymentservertests.cpp
 //
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index e92a7d2b1a4d..5d7fe96285cc 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include "paymentservertests.h"
 
 #include "optionsmodel.h"
@@ -21,7 +25,6 @@ X509 *parse_b64der_cert(const char* cert_data)
     return cert;
 }
 
-
 //
 // Test payment request handling
 //
@@ -30,7 +33,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
 {
     RecipientCatcher sigCatcher;
     QObject::connect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
-                     &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
+        &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
 
     // Write data to a temp file:
     QTemporaryFile f;
@@ -48,7 +51,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
     QCoreApplication::sendEvent(&object, &event);
 
     QObject::disconnect(server, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
-                        &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
+        &sigCatcher, SLOT(getRecipient(SendCoinsRecipient)));
 
     // Return results from sigCatcher
     return sigCatcher.recipient;
diff --git a/src/qt/test/paymentservertests.h b/src/qt/test/paymentservertests.h
index 884e535a6032..9b6400b0d58a 100644
--- a/src/qt/test/paymentservertests.h
+++ b/src/qt/test/paymentservertests.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef PAYMENTSERVERTESTS_H
 #define PAYMENTSERVERTESTS_H
 
@@ -15,8 +19,8 @@ private slots:
 };
 
 // Dummy class to receive paymentserver signals.
-// If SendCoinsRecipient was a proper QObject, then we could use
-// QSignalSpy... but it's not.
+// If SendCoinsRecipient was a proper QObject, then
+// we could use QSignalSpy... but it's not.
 class RecipientCatcher : public QObject
 {
     Q_OBJECT
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index 03a2381c0665..f2161c2f7931 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -1,11 +1,16 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #if defined(HAVE_CONFIG_H)
 #include "config/bitcoin-config.h"
 #endif
 
+#include "uritests.h"
+
 #ifdef ENABLE_WALLET
 #include "paymentservertests.h"
 #endif
-#include "uritests.h"
 
 #include <QCoreApplication>
 #include <QObject>
diff --git a/src/qt/test/uritests.cpp b/src/qt/test/uritests.cpp
index 5c0f4406a71e..78a7b1b9b47c 100644
--- a/src/qt/test/uritests.cpp
+++ b/src/qt/test/uritests.cpp
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include "uritests.h"
 
 #include "guiutil.h"
diff --git a/src/qt/test/uritests.h b/src/qt/test/uritests.h
index 17d4280a90a0..1ea6d9f075ee 100644
--- a/src/qt/test/uritests.h
+++ b/src/qt/test/uritests.h
@@ -1,3 +1,7 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #ifndef URITESTS_H
 #define URITESTS_H
 

From f79323b0ddbab5c8e6a3bc26450d2699d838e229 Mon Sep 17 00:00:00 2001
From: Teran McKinney <sega01@go-beyond.org>
Date: Mon, 18 Aug 2014 19:33:51 +0000
Subject: [PATCH 0651/1819] Improve readability of CAddrInfo::IsTerrible

- Replaced 86400 with 24*60*60
- Remove references to specific timespans in comments

Github-Pull: #4724
---
 src/addrman.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 704766dbf858..68948ac7ffe3 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -45,13 +45,13 @@ bool CAddrInfo::IsTerrible(int64_t nNow) const
     if (nTime > nNow + 10*60) // came in a flying DeLorean
         return true;
 
-    if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*86400) // not seen in over a month
+    if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*24*60*60) // not seen in recent history
         return true;
 
-    if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried three times and never a success
+    if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried N times and never a success
         return true;
 
-    if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*86400 && nAttempts>=ADDRMAN_MAX_FAILURES) // 10 successive failures in the last week
+    if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*24*60*60 && nAttempts>=ADDRMAN_MAX_FAILURES) // N successive failures in the last week
         return true;
 
     return false;

From 2605b94d73d14fbea209193e3013e62cfeea7c44 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Sep 2014 13:54:16 +0200
Subject: [PATCH 0652/1819] [Qt] update form files for setting autoDefault
 explicitly to false

- also fixes indentation in one file (auto fixed by Qt Designer)
- removes several default parameters, which are not needed in the files
- related to #4840 (but not intended as fix for a no-bug)
---
 src/qt/forms/addressbookpage.ui         |  15 +
 src/qt/forms/coincontroldialog.ui       |   3 +
 src/qt/forms/openuridialog.ui           |   6 +-
 src/qt/forms/optionsdialog.ui           |   6 +
 src/qt/forms/receivecoinsdialog.ui      | 380 ++++++++++++------------
 src/qt/forms/receiverequestdialog.ui    |   9 +
 src/qt/forms/rpcconsole.ui              |   3 +
 src/qt/forms/sendcoinsdialog.ui         |   9 +-
 src/qt/forms/signverifymessagedialog.ui |   3 +
 9 files changed, 241 insertions(+), 193 deletions(-)

diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index f40c44605096..52fdc6ef06b5 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -63,6 +63,9 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/add</normaloff>:/icons/add</iconset>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -77,6 +80,9 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -91,6 +97,9 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -118,6 +127,9 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/export</normaloff>:/icons/export</iconset>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -131,6 +143,9 @@
        <property name="text">
         <string>C&amp;lose</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
     </layout>
diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index 67ea3a9d8c53..cbe58fec65c6 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -363,6 +363,9 @@
           <property name="text">
            <string>(un)select all</string>
           </property>
+          <property name="autoDefault">
+           <bool>false</bool>
+          </property>
          </widget>
         </item>
         <item>
diff --git a/src/qt/forms/openuridialog.ui b/src/qt/forms/openuridialog.ui
index cd09ed02465b..7fce858bd29e 100644
--- a/src/qt/forms/openuridialog.ui
+++ b/src/qt/forms/openuridialog.ui
@@ -31,8 +31,7 @@
       </widget>
      </item>
      <item>
-      <widget class="QValidatedLineEdit" name="uriEdit">
-      </widget>
+      <widget class="QValidatedLineEdit" name="uriEdit"/>
      </item>
      <item>
       <widget class="QPushButton" name="selectFileButton">
@@ -42,6 +41,9 @@
        <property name="text">
         <string notr="true">…</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
     </layout>
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 47ed4c8bc6c4..9d094c1a73c6 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -609,6 +609,12 @@
        <property name="text">
         <string>&amp;OK</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
+       <property name="default">
+        <bool>true</bool>
+       </property>
       </widget>
      </item>
      <item>
diff --git a/src/qt/forms/receivecoinsdialog.ui b/src/qt/forms/receivecoinsdialog.ui
index e1a0a28f81bf..03fcb2fb50d1 100644
--- a/src/qt/forms/receivecoinsdialog.ui
+++ b/src/qt/forms/receivecoinsdialog.ui
@@ -12,192 +12,189 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout" stretch="0,0,1">
    <item>
-   <widget class="QFrame" name="frame2">
-    <property name="sizePolicy">
+    <widget class="QFrame" name="frame2">
+     <property name="sizePolicy">
       <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-        <horstretch>0</horstretch>
-        <verstretch>0</verstretch>
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
       </sizepolicy>
-    </property>
-    <property name="frameShape">
+     </property>
+     <property name="frameShape">
       <enum>QFrame::StyledPanel</enum>
-    </property>
-    <property name="frameShadow">
+     </property>
+     <property name="frameShadow">
       <enum>QFrame::Sunken</enum>
-    </property>
-    <layout class="QVBoxLayout" name="verticalLayout_3">
-    <item>
-    <layout class="QGridLayout" name="gridLayout">
-     <item row="7" column="2">
-      <widget class="QCheckBox" name="reuseAddress">
-       <property name="toolTip">
-        <string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
-       </property>
-       <property name="text">
-        <string>R&amp;euse an existing receiving address (not recommended)</string>
-       </property>
-      </widget>
-     </item>
-     <item row="7" column="0">
-      <widget class="QLabel" name="label_4">
-       <property name="text">
-        <string/>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="0">
-      <widget class="QLabel" name="label_3">
-       <property name="toolTip">
-        <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
-       </property>
-       <property name="text">
-        <string>&amp;Message:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-       <property name="buddy">
-        <cstring>reqMessage</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="2">
-      <widget class="QLineEdit" name="reqLabel">
-       <property name="toolTip">
-        <string>An optional label to associate with the new receiving address.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="6" column="2">
-      <widget class="QLineEdit" name="reqMessage">
-       <property name="toolTip">
-        <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="2" column="2">
-      <widget class="QLabel" name="label_5">
-       <property name="text">
-        <string>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</string>
-       </property>
-      </widget>
-     </item>
-     <item row="4" column="0">
-      <widget class="QLabel" name="label_2">
-       <property name="toolTip">
-        <string>An optional label to associate with the new receiving address.</string>
-       </property>
-       <property name="text">
-        <string>&amp;Label:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-       <property name="buddy">
-        <cstring>reqLabel</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="0">
-      <widget class="QLabel" name="label">
-       <property name="toolTip">
-        <string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
-       </property>
-       <property name="text">
-        <string>&amp;Amount:</string>
-       </property>
-       <property name="alignment">
-        <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-       </property>
-       <property name="buddy">
-        <cstring>reqAmount</cstring>
-       </property>
-      </widget>
-     </item>
-     <item row="5" column="2">
-      <widget class="BitcoinAmountField" name="reqAmount">
-       <property name="minimumSize">
-        <size>
-         <width>80</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="toolTip">
-        <string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
-       </property>
-      </widget>
-     </item>
-    <item row="8" column="2">
-    <layout class="QHBoxLayout" name="horizontalLayout">
-     <item>
-      <widget class="QPushButton" name="receiveButton">
-       <property name="minimumSize">
-        <size>
-         <width>150</width>
-         <height>0</height>
-        </size>
-       </property>
-       <property name="text">
-        <string>&amp;Request payment</string>
-       </property>
-       <property name="icon">
-        <iconset resource="../bitcoin.qrc">
-         <normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <widget class="QPushButton" name="clearButton">
-       <property name="sizePolicy">
-        <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-         <horstretch>0</horstretch>
-         <verstretch>0</verstretch>
-        </sizepolicy>
-       </property>
-       <property name="toolTip">
-        <string>Clear all fields of the form.</string>
-       </property>
-       <property name="text">
-        <string>Clear</string>
-       </property>
-       <property name="icon">
-        <iconset resource="../bitcoin.qrc">
-         <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
-       </property>
-       <property name="autoRepeatDelay">
-        <number>300</number>
-       </property>
-       <property name="autoDefault">
-        <bool>false</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-    </layout>
-     </item>
-     <item row="8" column="0">
-      <widget class="QLabel" name="label_7">
-       <property name="text">
-        <string/>
-       </property>
-      </widget>
-     </item>
-    </layout>
-   </item>
-   </layout>
-   </widget>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_3">
+      <item>
+       <layout class="QGridLayout" name="gridLayout">
+        <item row="7" column="2">
+         <widget class="QCheckBox" name="reuseAddress">
+          <property name="toolTip">
+           <string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
+          </property>
+          <property name="text">
+           <string>R&amp;euse an existing receiving address (not recommended)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="7" column="0">
+         <widget class="QLabel" name="label_4">
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="0">
+         <widget class="QLabel" name="label_3">
+          <property name="toolTip">
+           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
+          </property>
+          <property name="text">
+           <string>&amp;Message:</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy">
+           <cstring>reqMessage</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="2">
+         <widget class="QLineEdit" name="reqLabel">
+          <property name="toolTip">
+           <string>An optional label to associate with the new receiving address.</string>
+          </property>
+         </widget>
+        </item>
+        <item row="6" column="2">
+         <widget class="QLineEdit" name="reqMessage">
+          <property name="toolTip">
+           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2">
+         <widget class="QLabel" name="label_5">
+          <property name="text">
+           <string>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="0">
+         <widget class="QLabel" name="label_2">
+          <property name="toolTip">
+           <string>An optional label to associate with the new receiving address.</string>
+          </property>
+          <property name="text">
+           <string>&amp;Label:</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy">
+           <cstring>reqLabel</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="0">
+         <widget class="QLabel" name="label">
+          <property name="toolTip">
+           <string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
+          </property>
+          <property name="text">
+           <string>&amp;Amount:</string>
+          </property>
+          <property name="alignment">
+           <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+          </property>
+          <property name="buddy">
+           <cstring>reqAmount</cstring>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="2">
+         <widget class="BitcoinAmountField" name="reqAmount">
+          <property name="minimumSize">
+           <size>
+            <width>80</width>
+            <height>0</height>
+           </size>
+          </property>
+          <property name="toolTip">
+           <string>An optional amount to request. Leave this empty or zero to not request a specific amount.</string>
+          </property>
+         </widget>
+        </item>
+        <item row="8" column="2">
+         <layout class="QHBoxLayout" name="horizontalLayout">
+          <item>
+           <widget class="QPushButton" name="receiveButton">
+            <property name="minimumSize">
+             <size>
+              <width>150</width>
+              <height>0</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>&amp;Request payment</string>
+            </property>
+            <property name="icon">
+             <iconset resource="../bitcoin.qrc">
+              <normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="clearButton">
+            <property name="sizePolicy">
+             <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+              <horstretch>0</horstretch>
+              <verstretch>0</verstretch>
+             </sizepolicy>
+            </property>
+            <property name="toolTip">
+             <string>Clear all fields of the form.</string>
+            </property>
+            <property name="text">
+             <string>Clear</string>
+            </property>
+            <property name="icon">
+             <iconset resource="../bitcoin.qrc">
+              <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
+            </property>
+            <property name="autoDefault">
+             <bool>false</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item row="8" column="0">
+         <widget class="QLabel" name="label_7">
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
    </item>
    <item>
     <spacer name="verticalSpacer_2">
@@ -257,36 +254,42 @@
        <layout class="QHBoxLayout" name="horizontalLayout_2">
         <item>
          <widget class="QPushButton" name="showRequestButton">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
           <property name="toolTip">
            <string>Show the selected request (does the same as double clicking an entry)</string>
           </property>
           <property name="text">
            <string>Show</string>
           </property>
-          <property name="enabled">
-           <bool>false</bool>
-          </property>
           <property name="icon">
            <iconset resource="../bitcoin.qrc">
             <normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
           </property>
+          <property name="autoDefault">
+           <bool>false</bool>
+          </property>
          </widget>
         </item>
         <item>
          <widget class="QPushButton" name="removeRequestButton">
+          <property name="enabled">
+           <bool>false</bool>
+          </property>
           <property name="toolTip">
            <string>Remove the selected entries from the list</string>
           </property>
           <property name="text">
            <string>Remove</string>
           </property>
-          <property name="enabled">
-           <bool>false</bool>
-          </property>
           <property name="icon">
            <iconset resource="../bitcoin.qrc">
             <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
           </property>
+          <property name="autoDefault">
+           <bool>false</bool>
+          </property>
          </widget>
         </item>
         <item>
@@ -314,6 +317,7 @@
    <class>BitcoinAmountField</class>
    <extends>QLineEdit</extends>
    <header>bitcoinamountfield.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
  <tabstops>
diff --git a/src/qt/forms/receiverequestdialog.ui b/src/qt/forms/receiverequestdialog.ui
index 85928c9be5aa..1e484dd9a0f5 100644
--- a/src/qt/forms/receiverequestdialog.ui
+++ b/src/qt/forms/receiverequestdialog.ui
@@ -74,6 +74,9 @@
        <property name="text">
         <string>Copy &amp;URI</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -81,6 +84,9 @@
        <property name="text">
         <string>Copy &amp;Address</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
@@ -88,6 +94,9 @@
        <property name="text">
         <string>&amp;Save Image...</string>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
       </widget>
      </item>
      <item>
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index b9b90aa84635..7f28209c9a9c 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -484,6 +484,9 @@
              <property name="text">
               <string>&amp;Clear</string>
              </property>
+             <property name="autoDefault">
+              <bool>false</bool>
+             </property>
             </widget>
            </item>
           </layout>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index a631b04670ed..dce7f4ce4c12 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -109,6 +109,9 @@
             <property name="text">
              <string>Inputs...</string>
             </property>
+            <property name="autoDefault">
+             <bool>false</bool>
+            </property>
            </widget>
           </item>
           <item>
@@ -674,6 +677,9 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/send</normaloff>:/icons/send</iconset>
        </property>
+       <property name="autoDefault">
+        <bool>false</bool>
+       </property>
        <property name="default">
         <bool>true</bool>
        </property>
@@ -697,9 +703,6 @@
         <iconset resource="../bitcoin.qrc">
          <normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
        </property>
-       <property name="autoRepeatDelay">
-        <number>300</number>
-       </property>
        <property name="autoDefault">
         <bool>false</bool>
        </property>
diff --git a/src/qt/forms/signverifymessagedialog.ui b/src/qt/forms/signverifymessagedialog.ui
index 53573ec821c6..40b2da322859 100644
--- a/src/qt/forms/signverifymessagedialog.ui
+++ b/src/qt/forms/signverifymessagedialog.ui
@@ -19,6 +19,9 @@
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
     <widget class="QTabWidget" name="tabWidget">
+     <property name="currentIndex">
+      <number>0</number>
+     </property>
      <widget class="QWidget" name="tabSignMessage">
       <attribute name="title">
        <string>&amp;Sign Message</string>

From 41ef558aa907c50a055c44c4e6abaf813b23aeff Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 5 Sep 2014 13:10:39 +0200
Subject: [PATCH 0653/1819] univalue: make spaceStr thread-safe

Simply add spaces to the existing string instead of using a
temporary.

Fixes #4756.
---
 src/univalue/univalue_write.cpp | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/univalue/univalue_write.cpp b/src/univalue/univalue_write.cpp
index 042091a8274a..9565cfa11a7e 100644
--- a/src/univalue/univalue_write.cpp
+++ b/src/univalue/univalue_write.cpp
@@ -70,15 +70,9 @@ string UniValue::write(unsigned int prettyIndent,
     return s;
 }
 
-static string spaceStr;
-
-static string indentStr(unsigned int prettyIndent, unsigned int indentLevel)
+static void indentStr(unsigned int prettyIndent, unsigned int indentLevel, string& s)
 {
-    unsigned int spaces = prettyIndent * indentLevel;
-    while (spaceStr.size() < spaces)
-        spaceStr += "                ";
-
-    return spaceStr.substr(0, spaces);
+    s.append(prettyIndent * indentLevel, ' ');
 }
 
 void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, string& s) const
@@ -89,7 +83,7 @@ void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, s
 
     for (unsigned int i = 0; i < values.size(); i++) {
         if (prettyIndent)
-            s += indentStr(prettyIndent, indentLevel);
+            indentStr(prettyIndent, indentLevel, s);
         s += values[i].write(prettyIndent, indentLevel + 1);
         if (i != (values.size() - 1)) {
             s += ",";
@@ -101,7 +95,7 @@ void UniValue::writeArray(unsigned int prettyIndent, unsigned int indentLevel, s
     }
 
     if (prettyIndent)
-        s += indentStr(prettyIndent, indentLevel - 1);
+        indentStr(prettyIndent, indentLevel - 1, s);
     s += "]";
 }
 
@@ -113,7 +107,7 @@ void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel,
 
     for (unsigned int i = 0; i < keys.size(); i++) {
         if (prettyIndent)
-            s += indentStr(prettyIndent, indentLevel);
+            indentStr(prettyIndent, indentLevel, s);
         s += "\"" + json_escape(keys[i]) + "\":";
         if (prettyIndent)
             s += " ";
@@ -125,7 +119,7 @@ void UniValue::writeObject(unsigned int prettyIndent, unsigned int indentLevel,
     }
 
     if (prettyIndent)
-        s += indentStr(prettyIndent, indentLevel - 1);
+        indentStr(prettyIndent, indentLevel - 1, s);
     s += "}";
 }
 

From 3a7c3483b6df12e84aefb937b85afec746b06b5e Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 3 Sep 2014 15:07:43 -0400
Subject: [PATCH 0654/1819] Fix make_change to not create half-satoshis

---
 qa/rpc-tests/util.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index da2b6df19799..87baadc5d640 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -10,7 +10,7 @@
 import sys
 sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
 
-from decimal import Decimal
+from decimal import Decimal, ROUND_DOWN
 import json
 import random
 import shutil
@@ -230,10 +230,12 @@ def make_change(from_node, amount_in, amount_out, fee):
     change = amount_in - amount
     if change > amount*2:
         # Create an extra change output to break up big inputs
-        outputs[from_node.getnewaddress()] = float(change/2)
-        change = change/2
+        change_address = from_node.getnewaddress()
+        # Split change in two, being careful of rounding:
+        outputs[change_address] = Decimal(change/2).quantize(Decimal('0.00000001'), rounding=ROUND_DOWN)
+        change = amount_in - amount - outputs[change_address]
     if change > 0:
-        outputs[from_node.getnewaddress()] = float(change)
+        outputs[from_node.getnewaddress()] = change
     return outputs
 
 def send_zeropri_transaction(from_node, to_node, amount, fee):

From 346193bd934bf198dbfd606d8c52c60bc7967858 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Thu, 4 Sep 2014 09:59:20 +0700
Subject: [PATCH 0655/1819] Cleanup messy error messages

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2479beabddd1..a3b31b719d57 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4136,7 +4136,7 @@ bool ProcessMessages(CNode* pfrom)
 
         // Scan for message start
         if (memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
-            LogPrintf("\n\nPROCESSMESSAGE: INVALID MESSAGESTART\n\n");
+            LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", msg.hdr.GetCommand(), pfrom->id);
             fOk = false;
             break;
         }
@@ -4145,7 +4145,7 @@ bool ProcessMessages(CNode* pfrom)
         CMessageHeader& hdr = msg.hdr;
         if (!hdr.IsValid())
         {
-            LogPrintf("\n\nPROCESSMESSAGE: ERRORS IN HEADER %s\n\n\n", hdr.GetCommand());
+            LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", hdr.GetCommand(), pfrom->id);
             continue;
         }
         string strCommand = hdr.GetCommand();

From 8d657a651735426388c5f7462e2dbf24225a26cb Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Sat, 6 Sep 2014 15:59:59 -0400
Subject: [PATCH 0656/1819] Fixing compiler warning C4800: 'type' forcing value
 to bool 'true' or 'false'

---
 src/allocators.cpp |  4 ++--
 src/coins.h        |  4 ++--
 src/crypter.cpp    | 12 ++++++------
 src/db.cpp         |  2 +-
 src/init.cpp       |  4 ++--
 src/key.cpp        |  8 ++++----
 src/rpcwallet.cpp  |  2 +-
 src/util.cpp       |  2 +-
 src/wallet.cpp     |  8 ++++----
 9 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/allocators.cpp b/src/allocators.cpp
index 15f34aa2c8f3..8ecd7206cda2 100644
--- a/src/allocators.cpp
+++ b/src/allocators.cpp
@@ -46,7 +46,7 @@ static inline size_t GetSystemPageSize()
 bool MemoryPageLocker::Lock(const void *addr, size_t len)
 {
 #ifdef WIN32
-    return VirtualLock(const_cast<void*>(addr), len);
+    return VirtualLock(const_cast<void*>(addr), len) != 0;
 #else
     return mlock(addr, len) == 0;
 #endif
@@ -55,7 +55,7 @@ bool MemoryPageLocker::Lock(const void *addr, size_t len)
 bool MemoryPageLocker::Unlock(const void *addr, size_t len)
 {
 #ifdef WIN32
-    return VirtualUnlock(const_cast<void*>(addr), len);
+    return VirtualUnlock(const_cast<void*>(addr), len) != 0;
 #else
     return munlock(addr, len) == 0;
 #endif
diff --git a/src/coins.h b/src/coins.h
index d338e3172eca..e70b19ff8f77 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -195,8 +195,8 @@ class CCoins
         ::Unserialize(s, VARINT(nCode), nType, nVersion);
         fCoinBase = nCode & 1;
         std::vector<bool> vAvail(2, false);
-        vAvail[0] = nCode & 2;
-        vAvail[1] = nCode & 4;
+        vAvail[0] = (nCode & 2) != 0;
+        vAvail[1] = (nCode & 4) != 0;
         unsigned int nMaskCode = (nCode / 8) + ((nCode & 6) != 0 ? 0 : 1);
         // spentness bitmask
         while (nMaskCode > 0) {
diff --git a/src/crypter.cpp b/src/crypter.cpp
index 8aa2bb051771..8f5822dfc57d 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -62,9 +62,9 @@ bool CCrypter::Encrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned
     bool fOk = true;
 
     EVP_CIPHER_CTX_init(&ctx);
-    if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV);
-    if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen);
-    if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0])+nCLen, &nFLen);
+    if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+    if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0;
+    if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0;
     EVP_CIPHER_CTX_cleanup(&ctx);
 
     if (!fOk) return false;
@@ -89,9 +89,9 @@ bool CCrypter::Decrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingM
     bool fOk = true;
 
     EVP_CIPHER_CTX_init(&ctx);
-    if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV);
-    if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen);
-    if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0])+nPLen, &nFLen);
+    if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+    if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0;
+    if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0;
     EVP_CIPHER_CTX_cleanup(&ctx);
 
     if (!fOk) return false;
diff --git a/src/db.cpp b/src/db.cpp
index 23d2cc988db1..4ffbd61eddc4 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -231,7 +231,7 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
     if (pszFile == NULL)
         return;
 
-    bool fCreate = strchr(pszMode, 'c');
+    bool fCreate = strchr(pszMode, 'c') != NULL;
     unsigned int nFlags = DB_THREAD;
     if (fCreate)
         nFlags |= DB_CREATE;
diff --git a/src/init.cpp b/src/init.cpp
index b8988f8b7508..1450e3481f48 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -198,7 +198,7 @@ bool static Bind(const CService &addr, unsigned int flags) {
     if (!(flags & BF_EXPLICIT) && IsLimited(addr))
         return false;
     std::string strError;
-    if (!BindListenPort(addr, strError, flags & BF_WHITELIST)) {
+    if (!BindListenPort(addr, strError, (flags & BF_WHITELIST) != 0)) {
         if (flags & BF_REPORT_ERROR)
             return InitError(strError);
         return false;
@@ -692,7 +692,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     std::string strWalletFile = GetArg("-wallet", "wallet.dat");
 #endif // ENABLE_WALLET
 
-    fIsBareMultisigStd = GetArg("-permitbaremultisig", true);
+    fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
 
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
     // Sanity check
diff --git a/src/key.cpp b/src/key.cpp
index a058ef05e540..8ed787654aa5 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -172,9 +172,9 @@ class CECKey {
         bool ret;
         BIGNUM bn;
         BN_init(&bn);
-        ret = BN_bin2bn(vch, 32, &bn);
+        ret = BN_bin2bn(vch, 32, &bn) != NULL;
         assert(ret);
-        ret = EC_KEY_regenerate_key(pkey, &bn);
+        ret = EC_KEY_regenerate_key(pkey, &bn) != 0;
         assert(ret);
         BN_clear_free(&bn);
     }
@@ -217,7 +217,7 @@ class CECKey {
 
     bool SetPubKey(const CPubKey &pubkey) {
         const unsigned char* pbegin = pubkey.begin();
-        return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size());
+        return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size()) != NULL;
     }
 
     bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) {
@@ -553,7 +553,7 @@ bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned cha
     if (vchSig.size() != 65)
         return false;
     int recid = (vchSig[0] - 27) & 3;
-    bool fComp = (vchSig[0] - 27) & 4;
+    bool fComp = ((vchSig[0] - 27) & 4) != 0;
 #ifdef USE_SECP256K1
     int pubkeylen = 65;
     if (!secp256k1_ecdsa_recover_compact((const unsigned char*)&hash, 32, &vchSig[1], (unsigned char*)begin(), &pubkeylen, fComp, recid))
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 215da2ea12d0..078bbc1f1331 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1536,7 +1536,7 @@ Value gettransaction(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
     const CWalletTx& wtx = pwalletMain->mapWallet[hash];
 
-    int64_t nCredit = wtx.GetCredit(filter);
+    int64_t nCredit = wtx.GetCredit(filter != 0);
     int64_t nDebit = wtx.GetDebit(filter);
     int64_t nNet = nCredit - nDebit;
     int64_t nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
diff --git a/src/util.cpp b/src/util.cpp
index 5a4e187f9e2a..1a11d038cab7 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -494,7 +494,7 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
 {
 #ifdef WIN32
     return MoveFileExA(src.string().c_str(), dest.string().c_str(),
-                      MOVEFILE_REPLACE_EXISTING);
+                       MOVEFILE_REPLACE_EXISTING) != 0;
 #else
     int rc = std::rename(src.string().c_str(), dest.string().c_str());
     return (rc == 0);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 18a5b3971c9a..20ee0bbe845e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -637,7 +637,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
 {
     {
         AssertLockHeld(cs_wallet);
-        bool fExisted = mapWallet.count(tx.GetHash());
+        bool fExisted = mapWallet.count(tx.GetHash()) != 0;
         if (fExisted && !fUpdate) return false;
         if (fExisted || IsMine(tx) || IsFromMe(tx))
         {
@@ -1129,7 +1129,7 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
                 if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO &&
                     !IsLockedCoin((*it).first, i) && pcoin->vout[i].nValue > 0 &&
                     (!coinControl || !coinControl->HasSelected() || coinControl->IsSelected((*it).first, i)))
-                        vCoins.push_back(COutput(pcoin, i, nDepth, mine & ISMINE_SPENDABLE));
+                        vCoins.push_back(COutput(pcoin, i, nDepth, (mine & ISMINE_SPENDABLE) != ISMINE_NO));
             }
         }
     }
@@ -1655,7 +1655,7 @@ bool CWallet::SetAddressBook(const CTxDestination& address, const string& strNam
         if (!strPurpose.empty()) /* update purpose only if requested */
             mapAddressBook[address].purpose = strPurpose;
     }
-    NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address),
+    NotifyAddressBookChanged(this, address, strName, ::IsMine(*this, address) != ISMINE_NO,
                              strPurpose, (fUpdated ? CT_UPDATED : CT_NEW) );
     if (!fFileBacked)
         return false;
@@ -1681,7 +1681,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
         mapAddressBook.erase(address);
     }
 
-    NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address), "", CT_DELETED);
+    NotifyAddressBookChanged(this, address, "", ::IsMine(*this, address) != ISMINE_NO, "", CT_DELETED);
 
     if (!fFileBacked)
         return false;

From 45a4baf100d8e7392e9e26f81069d69e0115ea51 Mon Sep 17 00:00:00 2001
From: Andreas Schildbach <andreas@schildbach.de>
Date: Sun, 7 Sep 2014 11:11:57 +0200
Subject: [PATCH 0657/1819] Add testnet DNS seed of Andreas Schildbach.

It runs sipas crawler, but rather than using its custom nameserver implementation it serves a generated zonefile via bind9. The zone always contains 25 IPv4 and 25 IPv6 peers. FWIW, the zone is secured using DNSSEC.
---
 src/chainparams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index bfe50d77d577..460fabc6e601 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -155,6 +155,7 @@ class CTestNetParams : public CMainParams {
         vSeeds.push_back(CDNSSeedData("alexykot.me", "testnet-seed.alexykot.me"));
         vSeeds.push_back(CDNSSeedData("bitcoin.petertodd.org", "testnet-seed.bitcoin.petertodd.org"));
         vSeeds.push_back(CDNSSeedData("bluematt.me", "testnet-seed.bluematt.me"));
+        vSeeds.push_back(CDNSSeedData("bitcoin.schildbach.de", "testnet-seed.bitcoin.schildbach.de"));
 
         base58Prefixes[PUBKEY_ADDRESS] = list_of(111);
         base58Prefixes[SCRIPT_ADDRESS] = list_of(196);

From 8e44f2e00a14e1d12f898ae54f77e9de228d206f Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sun, 7 Sep 2014 22:32:57 -0400
Subject: [PATCH 0658/1819] Clarify 'compressed nor uncompressed' error message

---
 src/script.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/script.cpp b/src/script.cpp
index 06a0a5decf58..f3d423a42454 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -238,7 +238,7 @@ bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
         if (vchPubKey.size() != 33)
             return error("Non-canonical public key: invalid length for compressed key");
     } else {
-        return error("Non-canonical public key: compressed nor uncompressed");
+        return error("Non-canonical public key: neither compressed nor uncompressed");
     }
     return true;
 }

From a95b1199dbcf6c90508250d9b4cfd1df78106a5b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 8 Sep 2014 10:40:54 +0200
Subject: [PATCH 0659/1819] qt: Remove thousands separators after decimal point

Revert thousands separators after decimal point, as introduced in #4167.
---
 src/qt/bitcoinunits.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 6f506d3f2559..3215363fa0aa 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -115,11 +115,6 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
         for (int i = 3; i < q_size; i += 3)
             quotient_str.insert(q_size - i, thin_sp);
 
-    int r_size = remainder_str.size();
-    if (separators == separatorAlways || (separators == separatorStandard && r_size > 4))
-        for (int i = 3, adj = 0; i < r_size ; i += 3, adj++)
-            remainder_str.insert(i + adj, thin_sp);
-
     if (n < 0)
         quotient_str.insert(0, '-');
     else if (fPlus && n > 0)

From f7d0a86bf687b4ee11870937666806b289ee9a48 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 8 Sep 2014 12:20:50 +0200
Subject: [PATCH 0660/1819] netbase: Use .data() instead of .c_str() on binary
 string

`.c_str()` is only guaranteed to return the data up to the first NUL
character.
---
 src/netbase.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index d5821d4465bc..954c11f77d55 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -259,7 +259,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     strSocks5 += strDest;
     strSocks5 += static_cast<char>((port >> 8) & 0xFF);
     strSocks5 += static_cast<char>((port >> 0) & 0xFF);
-    ret = send(hSocket, strSocks5.c_str(), strSocks5.size(), MSG_NOSIGNAL);
+    ret = send(hSocket, strSocks5.data(), strSocks5.size(), MSG_NOSIGNAL);
     if (ret != (ssize_t)strSocks5.size())
     {
         CloseSocket(hSocket);

From c26649f9ed03fa9505e44aaf7f8cfdaa81f734cc Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Tue, 26 Aug 2014 12:59:21 -0400
Subject: [PATCH 0661/1819] Track modified size in TxMemPoolEntry so that we
 can correctly compute priority.

---
 src/core.cpp      | 12 ++++++++++--
 src/core.h        |  3 +++
 src/txmempool.cpp |  4 +++-
 src/txmempool.h   |  1 +
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 8dcda0126a73..491e4fa68bc1 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -123,6 +123,14 @@ int64_t CTransaction::GetValueOut() const
 }
 
 double CTransaction::ComputePriority(double dPriorityInputs, unsigned int nTxSize) const
+{
+    nTxSize = CalculateModifiedSize(nTxSize);
+    if (nTxSize == 0) return 0.0;
+
+    return dPriorityInputs / nTxSize;
+}
+
+unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
 {
     // In order to avoid disincentivizing cleaning up the UTXO set we don't count
     // the constant overhead for each txin and up to 110 bytes of scriptSig (which
@@ -131,14 +139,14 @@ double CTransaction::ComputePriority(double dPriorityInputs, unsigned int nTxSiz
     // risk encouraging people to create junk outputs to redeem later.
     if (nTxSize == 0)
         nTxSize = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
+
     BOOST_FOREACH(const CTxIn& txin, vin)
     {
         unsigned int offset = 41U + std::min(110U, (unsigned int)txin.scriptSig.size());
         if (nTxSize > offset)
             nTxSize -= offset;
     }
-    if (nTxSize == 0) return 0.0;
-    return dPriorityInputs / nTxSize;
+    return nTxSize;
 }
 
 std::string CTransaction::ToString() const
diff --git a/src/core.h b/src/core.h
index 34c00c4142b5..1233fbde61c0 100644
--- a/src/core.h
+++ b/src/core.h
@@ -284,6 +284,9 @@ class CTransaction
     // Compute priority, given priority of inputs and (optionally) tx size
     double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const;
 
+    // Compute modified tx size for priority calculation (optionally given tx size)
+    unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
+
     bool IsCoinBase() const
     {
         return (vin.size() == 1 && vin[0].prevout.IsNull());
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 238d5bab1676..acdf51c95e81 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -23,6 +23,8 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, int64_t _nFee,
     tx(_tx), nFee(_nFee), nTime(_nTime), dPriority(_dPriority), nHeight(_nHeight)
 {
     nTxSize = ::GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION);
+
+    nModSize = tx.CalculateModifiedSize(nTxSize);
 }
 
 CTxMemPoolEntry::CTxMemPoolEntry(const CTxMemPoolEntry& other)
@@ -34,7 +36,7 @@ double
 CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
 {
     int64_t nValueIn = tx.GetValueOut()+nFee;
-    double deltaPriority = ((double)(currentHeight-nHeight)*nValueIn)/nTxSize;
+    double deltaPriority = ((double)(currentHeight-nHeight)*nValueIn)/nModSize;
     double dResult = dPriority + deltaPriority;
     return dResult;
 }
diff --git a/src/txmempool.h b/src/txmempool.h
index 360364d8b059..b9d50ee0bc19 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -31,6 +31,7 @@ class CTxMemPoolEntry
     CTransaction tx;
     int64_t nFee; // Cached to avoid expensive parent-transaction lookups
     size_t nTxSize; // ... and avoid recomputing tx size
+    size_t nModSize; // ... and modified size for priority
     int64_t nTime; // Local time when entering the mempool
     double dPriority; // Priority when entering the mempool
     unsigned int nHeight; // Chain height when entering the mempool

From 89d91f6aa74da5e3fb1bbd08ce20ab3b9d593abd Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 8 Sep 2014 17:37:26 +0200
Subject: [PATCH 0662/1819] Avoid repeated lookups in mapOrphanTransactions and
 mapOrphanTransactionsByPrev

---
 src/main.cpp | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index a3b31b719d57..2e24eb950f74 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -492,16 +492,17 @@ bool AddOrphanTx(const CTransaction& tx)
 
 void static EraseOrphanTx(uint256 hash)
 {
-    if (!mapOrphanTransactions.count(hash))
+    map<uint256, CTransaction>::iterator it = mapOrphanTransactions.find(hash);
+    if (it == mapOrphanTransactions.end())
         return;
-    const CTransaction& tx = mapOrphanTransactions[hash];
-    BOOST_FOREACH(const CTxIn& txin, tx.vin)
+    BOOST_FOREACH(const CTxIn& txin, it->second.vin)
     {
-        mapOrphanTransactionsByPrev[txin.prevout.hash].erase(hash);
-        if (mapOrphanTransactionsByPrev[txin.prevout.hash].empty())
-            mapOrphanTransactionsByPrev.erase(txin.prevout.hash);
+        map<uint256, set<uint256> >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash);
+        itPrev->second.erase(hash);
+        if (itPrev->second.empty())
+            mapOrphanTransactionsByPrev.erase(itPrev);
     }
-    mapOrphanTransactions.erase(hash);
+    mapOrphanTransactions.erase(it);
 }
 
 unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
@@ -3769,9 +3770,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             // Recursively process any orphan transactions that depended on this one
             for (unsigned int i = 0; i < vWorkQueue.size(); i++)
             {
-                uint256 hashPrev = vWorkQueue[i];
-                for (set<uint256>::iterator mi = mapOrphanTransactionsByPrev[hashPrev].begin();
-                     mi != mapOrphanTransactionsByPrev[hashPrev].end();
+                map<uint256, set<uint256> >::iterator itByPrev = mapOrphanTransactionsByPrev.find(vWorkQueue[i]);
+                if (itByPrev == mapOrphanTransactionsByPrev.end())
+                    continue;
+                for (set<uint256>::iterator mi = itByPrev->second.begin();
+                     mi != itByPrev->second.end();
                      ++mi)
                 {
                     const uint256& orphanHash = *mi;

From 86dbeea2cdd5749374c98afea3e4f5f49817f746 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Thu, 14 Aug 2014 13:54:05 +0200
Subject: [PATCH 0663/1819] Rename script.h/.cpp to scriptutils.h/.cpp (plus
 remove duplicated includes)

---
 src/Makefile.am                     | 4 ++--
 src/base58.h                        | 2 +-
 src/bloom.cpp                       | 2 +-
 src/core.h                          | 2 +-
 src/core_read.cpp                   | 2 +-
 src/core_write.cpp                  | 2 +-
 src/crypter.cpp                     | 2 +-
 src/keystore.cpp                    | 2 +-
 src/main.h                          | 2 +-
 src/qt/transactiondesc.cpp          | 2 +-
 src/{script.cpp => scriptutils.cpp} | 2 +-
 src/{script.h => scriptutils.h}     | 4 ++--
 src/test/DoS_tests.cpp              | 2 +-
 src/test/base58_tests.cpp           | 2 +-
 src/test/canonical_tests.cpp        | 2 +-
 src/test/key_tests.cpp              | 2 +-
 src/test/multisig_tests.cpp         | 2 +-
 src/test/script_P2SH_tests.cpp      | 4 +---
 src/test/script_tests.cpp           | 4 +---
 src/test/scriptnum_tests.cpp        | 2 +-
 src/test/sighash_tests.cpp          | 2 +-
 src/test/sigopcount_tests.cpp       | 2 +-
 src/test/transaction_tests.cpp      | 2 +-
 23 files changed, 25 insertions(+), 29 deletions(-)
 rename src/{script.cpp => scriptutils.cpp} (99%)
 rename src/{script.h => scriptutils.h} (99%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 35fca6570f85..e6fc1fdbefaf 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,7 +98,7 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
-  script.h \
+  scriptutils.h \
   serialize.h \
   sync.h \
   threadsafety.h \
@@ -206,7 +206,7 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
-  script.cpp \
+  scriptutils.cpp \
   $(BITCOIN_CORE_H)
 
 # util: shared between all executables.
diff --git a/src/base58.h b/src/base58.h
index 70681f589a6a..a4dc7267670b 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -16,7 +16,7 @@
 
 #include "chainparams.h"
 #include "key.h"
-#include "script.h"
+#include "scriptutils.h"
 
 #include <string>
 #include <vector>
diff --git a/src/bloom.cpp b/src/bloom.cpp
index e34041336fbf..07990beb15e7 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -5,7 +5,7 @@
 #include "bloom.h"
 
 #include "core.h"
-#include "script.h"
+#include "scriptutils.h"
 
 #include <math.h>
 #include <stdlib.h>
diff --git a/src/core.h b/src/core.h
index cde8d8b3fe07..0df75670fdcd 100644
--- a/src/core.h
+++ b/src/core.h
@@ -6,7 +6,7 @@
 #ifndef BITCOIN_CORE_H
 #define BITCOIN_CORE_H
 
-#include "script.h"
+#include "scriptutils.h"
 #include "serialize.h"
 #include "uint256.h"
 
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 57f1397f18bc..41d8d6b49270 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -5,7 +5,7 @@
 #include "core_io.h"
 #include "core.h"
 #include "serialize.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "util.h"
 
 #include <boost/assign/list_of.hpp>
diff --git a/src/core_write.cpp b/src/core_write.cpp
index e66e75515c33..e816611809aa 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -4,7 +4,7 @@
 
 #include "core_io.h"
 #include "univalue/univalue.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "core.h"
 #include "serialize.h"
 #include "util.h"
diff --git a/src/crypter.cpp b/src/crypter.cpp
index 8aa2bb051771..ac5c8952e638 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -4,7 +4,7 @@
 
 #include "crypter.h"
 
-#include "script.h"
+#include "scriptutils.h"
 #include "util.h"
 
 #include <string>
diff --git a/src/keystore.cpp b/src/keystore.cpp
index 72ae9b0a30c1..e273bbb1de96 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -7,7 +7,7 @@
 
 #include "crypter.h"
 #include "key.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
diff --git a/src/main.h b/src/main.h
index 8c0a743e24d6..1fc9b3ecf155 100644
--- a/src/main.h
+++ b/src/main.h
@@ -15,7 +15,7 @@
 #include "core.h"
 #include "net.h"
 #include "pow.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "sync.h"
 #include "txmempool.h"
 #include "uint256.h"
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 8258e719a363..d1feeef17949 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -11,7 +11,7 @@
 #include "db.h"
 #include "main.h"
 #include "paymentserver.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "transactionrecord.h"
 #include "timedata.h"
 #include "ui_interface.h"
diff --git a/src/script.cpp b/src/scriptutils.cpp
similarity index 99%
rename from src/script.cpp
rename to src/scriptutils.cpp
index f3d423a42454..ce0d3b753754 100644
--- a/src/script.cpp
+++ b/src/scriptutils.cpp
@@ -3,7 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "script.h"
+#include "scriptutils.h"
 
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
diff --git a/src/script.h b/src/scriptutils.h
similarity index 99%
rename from src/script.h
rename to src/scriptutils.h
index d17cfe3fa457..44f18483c389 100644
--- a/src/script.h
+++ b/src/scriptutils.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT
-#define H_BITCOIN_SCRIPT
+#ifndef H_BITCOIN_SCRIPTUTILS
+#define H_BITCOIN_SCRIPTUTILS
 
 #include "key.h"
 #include "utilstrencodings.h"
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 8fa38c3605f9..a1134258917b 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -12,7 +12,7 @@
 #include "main.h"
 #include "net.h"
 #include "pow.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "serialize.h"
 #include "util.h"
 
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 0ac3e9a36353..0587ddac8493 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -9,7 +9,7 @@
 #include "data/base58_keys_valid.json.h"
 
 #include "key.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/test/canonical_tests.cpp b/src/test/canonical_tests.cpp
index a9798623ea81..2d2a60074010 100644
--- a/src/test/canonical_tests.cpp
+++ b/src/test/canonical_tests.cpp
@@ -9,7 +9,7 @@
 #include "data/sig_noncanonical.json.h"
 #include "data/sig_canonical.json.h"
 #include "random.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index 864d90128c71..c6bf0db3af3f 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -5,7 +5,7 @@
 #include "key.h"
 
 #include "base58.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 02c6d095f2a0..2e45a7a0229c 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -5,7 +5,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "uint256.h"
 
 #include <boost/assign/std/vector.hpp>
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 51ff1ffbc945..d27fc7159861 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -2,12 +2,10 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "script.h"
-
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "script.h"
+#include "scriptutils.h"
 
 #include <vector>
 
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 77c44501ab3a..a8ccd5059804 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -2,15 +2,13 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "script.h"
-
 #include "data/script_invalid.json.h"
 #include "data/script_valid.json.h"
 
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "core_io.h"
 
 #include <fstream>
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp
index cd194cc4d983..c3cd41cf8452 100644
--- a/src/test/scriptnum_tests.cpp
+++ b/src/test/scriptnum_tests.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "bignum.h"
-#include "script.h"
+#include "scriptutils.h"
 #include <boost/test/unit_test.hpp>
 #include <limits.h>
 #include <stdint.h>
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index bff151cddaa8..53f4d443c4b4 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -6,7 +6,7 @@
 #include "main.h"
 #include "random.h"
 #include "serialize.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "util.h"
 #include "version.h"
 
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 722f14a98979..963ccf560d3c 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "key.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "uint256.h"
 
 #include <vector>
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 03919e7c7d3f..2b5161b0cf69 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -8,7 +8,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "script.h"
+#include "scriptutils.h"
 #include "core_io.h"
 
 #include <map>

From cbd22a50c4b3d2d0f133c5f8d34c9c7aca9c7f4f Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 20 Aug 2014 17:37:40 +0200
Subject: [PATCH 0664/1819] Move CScript class and dependencies to
 script/script

---
 src/Makefile.am                |   2 +
 src/base58.h                   |   2 +-
 src/core_read.cpp              |   2 +-
 src/crypter.cpp                |   2 +-
 src/keystore.cpp               |   2 +-
 src/qt/transactiondesc.cpp     |   2 +-
 src/script/script.cpp          | 295 +++++++++++++++
 src/script/script.h            | 645 +++++++++++++++++++++++++++++++++
 src/scriptutils.cpp            | 288 ---------------
 src/scriptutils.h              | 637 +-------------------------------
 src/test/base58_tests.cpp      |   2 +-
 src/test/key_tests.cpp         |   2 +-
 src/test/multisig_tests.cpp    |   1 +
 src/test/script_P2SH_tests.cpp |   1 +
 src/test/script_tests.cpp      |   1 +
 src/test/scriptnum_tests.cpp   |   2 +-
 src/test/sighash_tests.cpp     |   1 +
 src/test/sigopcount_tests.cpp  |   2 +-
 src/test/transaction_tests.cpp |   2 +-
 19 files changed, 957 insertions(+), 934 deletions(-)
 create mode 100644 src/script/script.cpp
 create mode 100644 src/script/script.h

diff --git a/src/Makefile.am b/src/Makefile.am
index e6fc1fdbefaf..a9f1ceeeba89 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,6 +98,7 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
+  script/script.h \
   scriptutils.h \
   serialize.h \
   sync.h \
@@ -206,6 +207,7 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
+  script/script.cpp \
   scriptutils.cpp \
   $(BITCOIN_CORE_H)
 
diff --git a/src/base58.h b/src/base58.h
index a4dc7267670b..216aca364859 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -16,7 +16,7 @@
 
 #include "chainparams.h"
 #include "key.h"
-#include "scriptutils.h"
+#include "script/script.h"
 
 #include <string>
 #include <vector>
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 41d8d6b49270..efcecb106ff6 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -5,7 +5,7 @@
 #include "core_io.h"
 #include "core.h"
 #include "serialize.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "util.h"
 
 #include <boost/assign/list_of.hpp>
diff --git a/src/crypter.cpp b/src/crypter.cpp
index ac5c8952e638..3df13021df16 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -4,7 +4,7 @@
 
 #include "crypter.h"
 
-#include "scriptutils.h"
+#include "script/script.h"
 #include "util.h"
 
 #include <string>
diff --git a/src/keystore.cpp b/src/keystore.cpp
index e273bbb1de96..98bc0e9e28b4 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -7,7 +7,7 @@
 
 #include "crypter.h"
 #include "key.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index d1feeef17949..727b8dc66dac 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -11,7 +11,7 @@
 #include "db.h"
 #include "main.h"
 #include "paymentserver.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "transactionrecord.h"
 #include "timedata.h"
 #include "ui_interface.h"
diff --git a/src/script/script.cpp b/src/script/script.cpp
new file mode 100644
index 000000000000..60d1beac95eb
--- /dev/null
+++ b/src/script/script.cpp
@@ -0,0 +1,295 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "script.h"
+
+#include <boost/foreach.hpp>
+
+using namespace std;
+
+const char* GetOpName(opcodetype opcode)
+{
+    switch (opcode)
+    {
+    // push value
+    case OP_0                      : return "0";
+    case OP_PUSHDATA1              : return "OP_PUSHDATA1";
+    case OP_PUSHDATA2              : return "OP_PUSHDATA2";
+    case OP_PUSHDATA4              : return "OP_PUSHDATA4";
+    case OP_1NEGATE                : return "-1";
+    case OP_RESERVED               : return "OP_RESERVED";
+    case OP_1                      : return "1";
+    case OP_2                      : return "2";
+    case OP_3                      : return "3";
+    case OP_4                      : return "4";
+    case OP_5                      : return "5";
+    case OP_6                      : return "6";
+    case OP_7                      : return "7";
+    case OP_8                      : return "8";
+    case OP_9                      : return "9";
+    case OP_10                     : return "10";
+    case OP_11                     : return "11";
+    case OP_12                     : return "12";
+    case OP_13                     : return "13";
+    case OP_14                     : return "14";
+    case OP_15                     : return "15";
+    case OP_16                     : return "16";
+
+    // control
+    case OP_NOP                    : return "OP_NOP";
+    case OP_VER                    : return "OP_VER";
+    case OP_IF                     : return "OP_IF";
+    case OP_NOTIF                  : return "OP_NOTIF";
+    case OP_VERIF                  : return "OP_VERIF";
+    case OP_VERNOTIF               : return "OP_VERNOTIF";
+    case OP_ELSE                   : return "OP_ELSE";
+    case OP_ENDIF                  : return "OP_ENDIF";
+    case OP_VERIFY                 : return "OP_VERIFY";
+    case OP_RETURN                 : return "OP_RETURN";
+
+    // stack ops
+    case OP_TOALTSTACK             : return "OP_TOALTSTACK";
+    case OP_FROMALTSTACK           : return "OP_FROMALTSTACK";
+    case OP_2DROP                  : return "OP_2DROP";
+    case OP_2DUP                   : return "OP_2DUP";
+    case OP_3DUP                   : return "OP_3DUP";
+    case OP_2OVER                  : return "OP_2OVER";
+    case OP_2ROT                   : return "OP_2ROT";
+    case OP_2SWAP                  : return "OP_2SWAP";
+    case OP_IFDUP                  : return "OP_IFDUP";
+    case OP_DEPTH                  : return "OP_DEPTH";
+    case OP_DROP                   : return "OP_DROP";
+    case OP_DUP                    : return "OP_DUP";
+    case OP_NIP                    : return "OP_NIP";
+    case OP_OVER                   : return "OP_OVER";
+    case OP_PICK                   : return "OP_PICK";
+    case OP_ROLL                   : return "OP_ROLL";
+    case OP_ROT                    : return "OP_ROT";
+    case OP_SWAP                   : return "OP_SWAP";
+    case OP_TUCK                   : return "OP_TUCK";
+
+    // splice ops
+    case OP_CAT                    : return "OP_CAT";
+    case OP_SUBSTR                 : return "OP_SUBSTR";
+    case OP_LEFT                   : return "OP_LEFT";
+    case OP_RIGHT                  : return "OP_RIGHT";
+    case OP_SIZE                   : return "OP_SIZE";
+
+    // bit logic
+    case OP_INVERT                 : return "OP_INVERT";
+    case OP_AND                    : return "OP_AND";
+    case OP_OR                     : return "OP_OR";
+    case OP_XOR                    : return "OP_XOR";
+    case OP_EQUAL                  : return "OP_EQUAL";
+    case OP_EQUALVERIFY            : return "OP_EQUALVERIFY";
+    case OP_RESERVED1              : return "OP_RESERVED1";
+    case OP_RESERVED2              : return "OP_RESERVED2";
+
+    // numeric
+    case OP_1ADD                   : return "OP_1ADD";
+    case OP_1SUB                   : return "OP_1SUB";
+    case OP_2MUL                   : return "OP_2MUL";
+    case OP_2DIV                   : return "OP_2DIV";
+    case OP_NEGATE                 : return "OP_NEGATE";
+    case OP_ABS                    : return "OP_ABS";
+    case OP_NOT                    : return "OP_NOT";
+    case OP_0NOTEQUAL              : return "OP_0NOTEQUAL";
+    case OP_ADD                    : return "OP_ADD";
+    case OP_SUB                    : return "OP_SUB";
+    case OP_MUL                    : return "OP_MUL";
+    case OP_DIV                    : return "OP_DIV";
+    case OP_MOD                    : return "OP_MOD";
+    case OP_LSHIFT                 : return "OP_LSHIFT";
+    case OP_RSHIFT                 : return "OP_RSHIFT";
+    case OP_BOOLAND                : return "OP_BOOLAND";
+    case OP_BOOLOR                 : return "OP_BOOLOR";
+    case OP_NUMEQUAL               : return "OP_NUMEQUAL";
+    case OP_NUMEQUALVERIFY         : return "OP_NUMEQUALVERIFY";
+    case OP_NUMNOTEQUAL            : return "OP_NUMNOTEQUAL";
+    case OP_LESSTHAN               : return "OP_LESSTHAN";
+    case OP_GREATERTHAN            : return "OP_GREATERTHAN";
+    case OP_LESSTHANOREQUAL        : return "OP_LESSTHANOREQUAL";
+    case OP_GREATERTHANOREQUAL     : return "OP_GREATERTHANOREQUAL";
+    case OP_MIN                    : return "OP_MIN";
+    case OP_MAX                    : return "OP_MAX";
+    case OP_WITHIN                 : return "OP_WITHIN";
+
+    // crypto
+    case OP_RIPEMD160              : return "OP_RIPEMD160";
+    case OP_SHA1                   : return "OP_SHA1";
+    case OP_SHA256                 : return "OP_SHA256";
+    case OP_HASH160                : return "OP_HASH160";
+    case OP_HASH256                : return "OP_HASH256";
+    case OP_CODESEPARATOR          : return "OP_CODESEPARATOR";
+    case OP_CHECKSIG               : return "OP_CHECKSIG";
+    case OP_CHECKSIGVERIFY         : return "OP_CHECKSIGVERIFY";
+    case OP_CHECKMULTISIG          : return "OP_CHECKMULTISIG";
+    case OP_CHECKMULTISIGVERIFY    : return "OP_CHECKMULTISIGVERIFY";
+
+    // expanson
+    case OP_NOP1                   : return "OP_NOP1";
+    case OP_NOP2                   : return "OP_NOP2";
+    case OP_NOP3                   : return "OP_NOP3";
+    case OP_NOP4                   : return "OP_NOP4";
+    case OP_NOP5                   : return "OP_NOP5";
+    case OP_NOP6                   : return "OP_NOP6";
+    case OP_NOP7                   : return "OP_NOP7";
+    case OP_NOP8                   : return "OP_NOP8";
+    case OP_NOP9                   : return "OP_NOP9";
+    case OP_NOP10                  : return "OP_NOP10";
+
+    case OP_INVALIDOPCODE          : return "OP_INVALIDOPCODE";
+
+    // Note:
+    //  The template matching params OP_SMALLDATA/etc are defined in opcodetype enum
+    //  as kind of implementation hack, they are *NOT* real opcodes.  If found in real
+    //  Script, just let the default: case deal with them.
+
+    default:
+        return "OP_UNKNOWN";
+    }
+}
+
+unsigned int CScript::GetSigOpCount(bool fAccurate) const
+{
+    unsigned int n = 0;
+    const_iterator pc = begin();
+    opcodetype lastOpcode = OP_INVALIDOPCODE;
+    while (pc < end())
+    {
+        opcodetype opcode;
+        if (!GetOp(pc, opcode))
+            break;
+        if (opcode == OP_CHECKSIG || opcode == OP_CHECKSIGVERIFY)
+            n++;
+        else if (opcode == OP_CHECKMULTISIG || opcode == OP_CHECKMULTISIGVERIFY)
+        {
+            if (fAccurate && lastOpcode >= OP_1 && lastOpcode <= OP_16)
+                n += DecodeOP_N(lastOpcode);
+            else
+                n += 20;
+        }
+        lastOpcode = opcode;
+    }
+    return n;
+}
+
+unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const
+{
+    if (!IsPayToScriptHash())
+        return GetSigOpCount(true);
+
+    // This is a pay-to-script-hash scriptPubKey;
+    // get the last item that the scriptSig
+    // pushes onto the stack:
+    const_iterator pc = scriptSig.begin();
+    vector<unsigned char> data;
+    while (pc < scriptSig.end())
+    {
+        opcodetype opcode;
+        if (!scriptSig.GetOp(pc, opcode, data))
+            return 0;
+        if (opcode > OP_16)
+            return 0;
+    }
+
+    /// ... and return its opcount:
+    CScript subscript(data.begin(), data.end());
+    return subscript.GetSigOpCount(true);
+}
+
+bool CScript::IsPayToScriptHash() const
+{
+    // Extra-fast test for pay-to-script-hash CScripts:
+    return (this->size() == 23 &&
+            this->at(0) == OP_HASH160 &&
+            this->at(1) == 0x14 &&
+            this->at(22) == OP_EQUAL);
+}
+
+bool CScript::IsPushOnly() const
+{
+    const_iterator pc = begin();
+    while (pc < end())
+    {
+        opcodetype opcode;
+        if (!GetOp(pc, opcode))
+            return false;
+        // Note that IsPushOnly() *does* consider OP_RESERVED to be a
+        // push-type opcode, however execution of OP_RESERVED fails, so
+        // it's not relevant to P2SH as the scriptSig would fail prior to
+        // the P2SH special validation code being executed.
+        if (opcode > OP_16)
+            return false;
+    }
+    return true;
+}
+
+bool CScript::HasCanonicalPushes() const
+{
+    const_iterator pc = begin();
+    while (pc < end())
+    {
+        opcodetype opcode;
+        std::vector<unsigned char> data;
+        if (!GetOp(pc, opcode, data))
+            return false;
+        if (opcode > OP_16)
+            continue;
+        if (opcode < OP_PUSHDATA1 && opcode > OP_0 && (data.size() == 1 && data[0] <= 16))
+            // Could have used an OP_n code, rather than a 1-byte push.
+            return false;
+        if (opcode == OP_PUSHDATA1 && data.size() < OP_PUSHDATA1)
+            // Could have used a normal n-byte push, rather than OP_PUSHDATA1.
+            return false;
+        if (opcode == OP_PUSHDATA2 && data.size() <= 0xFF)
+            // Could have used an OP_PUSHDATA1.
+            return false;
+        if (opcode == OP_PUSHDATA4 && data.size() <= 0xFFFF)
+            // Could have used an OP_PUSHDATA2.
+            return false;
+    }
+    return true;
+}
+
+class CScriptVisitor : public boost::static_visitor<bool>
+{
+private:
+    CScript *script;
+public:
+    CScriptVisitor(CScript *scriptin) { script = scriptin; }
+
+    bool operator()(const CNoDestination &dest) const {
+        script->clear();
+        return false;
+    }
+
+    bool operator()(const CKeyID &keyID) const {
+        script->clear();
+        *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG;
+        return true;
+    }
+
+    bool operator()(const CScriptID &scriptID) const {
+        script->clear();
+        *script << OP_HASH160 << scriptID << OP_EQUAL;
+        return true;
+    }
+};
+
+void CScript::SetDestination(const CTxDestination& dest)
+{
+    boost::apply_visitor(CScriptVisitor(this), dest);
+}
+
+void CScript::SetMultisig(int nRequired, const std::vector<CPubKey>& keys)
+{
+    this->clear();
+
+    *this << EncodeOP_N(nRequired);
+    BOOST_FOREACH(const CPubKey& key, keys)
+        *this << key;
+    *this << EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
+}
diff --git a/src/script/script.h b/src/script/script.h
new file mode 100644
index 000000000000..21847c09bd8a
--- /dev/null
+++ b/src/script/script.h
@@ -0,0 +1,645 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT
+#define H_BITCOIN_SCRIPT
+
+#include "key.h"
+#include "tinyformat.h"
+#include "utilstrencodings.h"
+
+#include <stdexcept>
+
+#include <boost/variant.hpp>
+
+static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
+
+/** Script opcodes */
+enum opcodetype
+{
+    // push value
+    OP_0 = 0x00,
+    OP_FALSE = OP_0,
+    OP_PUSHDATA1 = 0x4c,
+    OP_PUSHDATA2 = 0x4d,
+    OP_PUSHDATA4 = 0x4e,
+    OP_1NEGATE = 0x4f,
+    OP_RESERVED = 0x50,
+    OP_1 = 0x51,
+    OP_TRUE=OP_1,
+    OP_2 = 0x52,
+    OP_3 = 0x53,
+    OP_4 = 0x54,
+    OP_5 = 0x55,
+    OP_6 = 0x56,
+    OP_7 = 0x57,
+    OP_8 = 0x58,
+    OP_9 = 0x59,
+    OP_10 = 0x5a,
+    OP_11 = 0x5b,
+    OP_12 = 0x5c,
+    OP_13 = 0x5d,
+    OP_14 = 0x5e,
+    OP_15 = 0x5f,
+    OP_16 = 0x60,
+
+    // control
+    OP_NOP = 0x61,
+    OP_VER = 0x62,
+    OP_IF = 0x63,
+    OP_NOTIF = 0x64,
+    OP_VERIF = 0x65,
+    OP_VERNOTIF = 0x66,
+    OP_ELSE = 0x67,
+    OP_ENDIF = 0x68,
+    OP_VERIFY = 0x69,
+    OP_RETURN = 0x6a,
+
+    // stack ops
+    OP_TOALTSTACK = 0x6b,
+    OP_FROMALTSTACK = 0x6c,
+    OP_2DROP = 0x6d,
+    OP_2DUP = 0x6e,
+    OP_3DUP = 0x6f,
+    OP_2OVER = 0x70,
+    OP_2ROT = 0x71,
+    OP_2SWAP = 0x72,
+    OP_IFDUP = 0x73,
+    OP_DEPTH = 0x74,
+    OP_DROP = 0x75,
+    OP_DUP = 0x76,
+    OP_NIP = 0x77,
+    OP_OVER = 0x78,
+    OP_PICK = 0x79,
+    OP_ROLL = 0x7a,
+    OP_ROT = 0x7b,
+    OP_SWAP = 0x7c,
+    OP_TUCK = 0x7d,
+
+    // splice ops
+    OP_CAT = 0x7e,
+    OP_SUBSTR = 0x7f,
+    OP_LEFT = 0x80,
+    OP_RIGHT = 0x81,
+    OP_SIZE = 0x82,
+
+    // bit logic
+    OP_INVERT = 0x83,
+    OP_AND = 0x84,
+    OP_OR = 0x85,
+    OP_XOR = 0x86,
+    OP_EQUAL = 0x87,
+    OP_EQUALVERIFY = 0x88,
+    OP_RESERVED1 = 0x89,
+    OP_RESERVED2 = 0x8a,
+
+    // numeric
+    OP_1ADD = 0x8b,
+    OP_1SUB = 0x8c,
+    OP_2MUL = 0x8d,
+    OP_2DIV = 0x8e,
+    OP_NEGATE = 0x8f,
+    OP_ABS = 0x90,
+    OP_NOT = 0x91,
+    OP_0NOTEQUAL = 0x92,
+
+    OP_ADD = 0x93,
+    OP_SUB = 0x94,
+    OP_MUL = 0x95,
+    OP_DIV = 0x96,
+    OP_MOD = 0x97,
+    OP_LSHIFT = 0x98,
+    OP_RSHIFT = 0x99,
+
+    OP_BOOLAND = 0x9a,
+    OP_BOOLOR = 0x9b,
+    OP_NUMEQUAL = 0x9c,
+    OP_NUMEQUALVERIFY = 0x9d,
+    OP_NUMNOTEQUAL = 0x9e,
+    OP_LESSTHAN = 0x9f,
+    OP_GREATERTHAN = 0xa0,
+    OP_LESSTHANOREQUAL = 0xa1,
+    OP_GREATERTHANOREQUAL = 0xa2,
+    OP_MIN = 0xa3,
+    OP_MAX = 0xa4,
+
+    OP_WITHIN = 0xa5,
+
+    // crypto
+    OP_RIPEMD160 = 0xa6,
+    OP_SHA1 = 0xa7,
+    OP_SHA256 = 0xa8,
+    OP_HASH160 = 0xa9,
+    OP_HASH256 = 0xaa,
+    OP_CODESEPARATOR = 0xab,
+    OP_CHECKSIG = 0xac,
+    OP_CHECKSIGVERIFY = 0xad,
+    OP_CHECKMULTISIG = 0xae,
+    OP_CHECKMULTISIGVERIFY = 0xaf,
+
+    // expansion
+    OP_NOP1 = 0xb0,
+    OP_NOP2 = 0xb1,
+    OP_NOP3 = 0xb2,
+    OP_NOP4 = 0xb3,
+    OP_NOP5 = 0xb4,
+    OP_NOP6 = 0xb5,
+    OP_NOP7 = 0xb6,
+    OP_NOP8 = 0xb7,
+    OP_NOP9 = 0xb8,
+    OP_NOP10 = 0xb9,
+
+
+    // template matching params
+    OP_SMALLDATA = 0xf9,
+    OP_SMALLINTEGER = 0xfa,
+    OP_PUBKEYS = 0xfb,
+    OP_PUBKEYHASH = 0xfd,
+    OP_PUBKEY = 0xfe,
+
+    OP_INVALIDOPCODE = 0xff,
+};
+
+const char* GetOpName(opcodetype opcode);
+
+class scriptnum_error : public std::runtime_error
+{
+public:
+    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
+};
+
+class CScriptNum
+{
+// Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
+// The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
+// but results may overflow (and are valid as long as they are not used in a subsequent
+// numeric operation). CScriptNum enforces those semantics by storing results as
+// an int64 and allowing out-of-range values to be returned as a vector of bytes but
+// throwing an exception if arithmetic is done or the result is interpreted as an integer.
+public:
+
+    explicit CScriptNum(const int64_t& n)
+    {
+        m_value = n;
+    }
+
+    explicit CScriptNum(const std::vector<unsigned char>& vch)
+    {
+        if (vch.size() > nMaxNumSize)
+            throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow");
+        m_value = set_vch(vch);
+    }
+
+    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
+    inline bool operator!=(const int64_t& rhs) const    { return m_value != rhs; }
+    inline bool operator<=(const int64_t& rhs) const    { return m_value <= rhs; }
+    inline bool operator< (const int64_t& rhs) const    { return m_value <  rhs; }
+    inline bool operator>=(const int64_t& rhs) const    { return m_value >= rhs; }
+    inline bool operator> (const int64_t& rhs) const    { return m_value >  rhs; }
+
+    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
+    inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
+    inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
+    inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
+    inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
+    inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
+
+    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
+    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
+    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
+    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
+
+    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
+    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
+
+    inline CScriptNum operator-()                         const
+    {
+        assert(m_value != std::numeric_limits<int64_t>::min());
+        return CScriptNum(-m_value);
+    }
+
+    inline CScriptNum& operator=( const int64_t& rhs)
+    {
+        m_value = rhs;
+        return *this;
+    }
+
+    inline CScriptNum& operator+=( const int64_t& rhs)
+    {
+        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
+                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
+        m_value += rhs;
+        return *this;
+    }
+
+    inline CScriptNum& operator-=( const int64_t& rhs)
+    {
+        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
+                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
+        m_value -= rhs;
+        return *this;
+    }
+
+    int getint() const
+    {
+        if (m_value > std::numeric_limits<int>::max())
+            return std::numeric_limits<int>::max();
+        else if (m_value < std::numeric_limits<int>::min())
+            return std::numeric_limits<int>::min();
+        return m_value;
+    }
+
+    std::vector<unsigned char> getvch() const
+    {
+        return serialize(m_value);
+    }
+
+    static std::vector<unsigned char> serialize(const int64_t& value)
+    {
+        if(value == 0)
+            return std::vector<unsigned char>();
+
+        std::vector<unsigned char> result;
+        const bool neg = value < 0;
+        uint64_t absvalue = neg ? -value : value;
+
+        while(absvalue)
+        {
+            result.push_back(absvalue & 0xff);
+            absvalue >>= 8;
+        }
+
+//    - If the most significant byte is >= 0x80 and the value is positive, push a
+//    new zero-byte to make the significant byte < 0x80 again.
+
+//    - If the most significant byte is >= 0x80 and the value is negative, push a
+//    new 0x80 byte that will be popped off when converting to an integral.
+
+//    - If the most significant byte is < 0x80 and the value is negative, add
+//    0x80 to it, since it will be subtracted and interpreted as a negative when
+//    converting to an integral.
+
+        if (result.back() & 0x80)
+            result.push_back(neg ? 0x80 : 0);
+        else if (neg)
+            result.back() |= 0x80;
+
+        return result;
+    }
+
+    static const size_t nMaxNumSize = 4;
+
+private:
+    static int64_t set_vch(const std::vector<unsigned char>& vch)
+    {
+      if (vch.empty())
+          return 0;
+
+      int64_t result = 0;
+      for (size_t i = 0; i != vch.size(); ++i)
+          result |= static_cast<int64_t>(vch[i]) << 8*i;
+
+      // If the input vector's most significant byte is 0x80, remove it from
+      // the result's msb and return a negative.
+      if (vch.back() & 0x80)
+          return -(result & ~(0x80ULL << (8 * (vch.size() - 1))));
+
+      return result;
+    }
+
+    int64_t m_value;
+};
+
+inline std::string ValueString(const std::vector<unsigned char>& vch)
+{
+    if (vch.size() <= 4)
+        return strprintf("%d", CScriptNum(vch).getint());
+    else
+        return HexStr(vch);
+}
+
+class CNoDestination {
+public:
+    friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; }
+    friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
+};
+
+/** A txout script template with a specific destination. It is either:
+ *  * CNoDestination: no destination set
+ *  * CKeyID: TX_PUBKEYHASH destination
+ *  * CScriptID: TX_SCRIPTHASH destination
+ *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
+ */
+typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
+
+/** Serialized script, used inside transaction inputs and outputs */
+class CScript : public std::vector<unsigned char>
+{
+protected:
+    CScript& push_int64(int64_t n)
+    {
+        if (n == -1 || (n >= 1 && n <= 16))
+        {
+            push_back(n + (OP_1 - 1));
+        }
+        else
+        {
+            *this << CScriptNum::serialize(n);
+        }
+        return *this;
+    }
+public:
+    CScript() { }
+    CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
+    CScript(const_iterator pbegin, const_iterator pend) : std::vector<unsigned char>(pbegin, pend) { }
+#ifndef _MSC_VER
+    CScript(const unsigned char* pbegin, const unsigned char* pend) : std::vector<unsigned char>(pbegin, pend) { }
+#endif
+
+    CScript& operator+=(const CScript& b)
+    {
+        insert(end(), b.begin(), b.end());
+        return *this;
+    }
+
+    friend CScript operator+(const CScript& a, const CScript& b)
+    {
+        CScript ret = a;
+        ret += b;
+        return ret;
+    }
+
+    CScript(int64_t b)        { operator<<(b); }
+
+    explicit CScript(opcodetype b)     { operator<<(b); }
+    explicit CScript(const uint256& b) { operator<<(b); }
+    explicit CScript(const CScriptNum& b) { operator<<(b); }
+    explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
+
+
+    CScript& operator<<(int64_t b) { return push_int64(b); }
+
+    CScript& operator<<(opcodetype opcode)
+    {
+        if (opcode < 0 || opcode > 0xff)
+            throw std::runtime_error("CScript::operator<<() : invalid opcode");
+        insert(end(), (unsigned char)opcode);
+        return *this;
+    }
+
+    CScript& operator<<(const uint160& b)
+    {
+        insert(end(), sizeof(b));
+        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
+        return *this;
+    }
+
+    CScript& operator<<(const uint256& b)
+    {
+        insert(end(), sizeof(b));
+        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
+        return *this;
+    }
+
+    CScript& operator<<(const CPubKey& key)
+    {
+        assert(key.size() < OP_PUSHDATA1);
+        insert(end(), (unsigned char)key.size());
+        insert(end(), key.begin(), key.end());
+        return *this;
+    }
+
+    CScript& operator<<(const CScriptNum& b)
+    {
+        *this << b.getvch();
+        return *this;
+    }
+
+    CScript& operator<<(const std::vector<unsigned char>& b)
+    {
+        if (b.size() < OP_PUSHDATA1)
+        {
+            insert(end(), (unsigned char)b.size());
+        }
+        else if (b.size() <= 0xff)
+        {
+            insert(end(), OP_PUSHDATA1);
+            insert(end(), (unsigned char)b.size());
+        }
+        else if (b.size() <= 0xffff)
+        {
+            insert(end(), OP_PUSHDATA2);
+            unsigned short nSize = b.size();
+            insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize));
+        }
+        else
+        {
+            insert(end(), OP_PUSHDATA4);
+            unsigned int nSize = b.size();
+            insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize));
+        }
+        insert(end(), b.begin(), b.end());
+        return *this;
+    }
+
+    CScript& operator<<(const CScript& b)
+    {
+        // I'm not sure if this should push the script or concatenate scripts.
+        // If there's ever a use for pushing a script onto a script, delete this member fn
+        assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!");
+        return *this;
+    }
+
+
+    bool GetOp(iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet)
+    {
+         // Wrapper so it can be called with either iterator or const_iterator
+         const_iterator pc2 = pc;
+         bool fRet = GetOp2(pc2, opcodeRet, &vchRet);
+         pc = begin() + (pc2 - begin());
+         return fRet;
+    }
+
+    bool GetOp(iterator& pc, opcodetype& opcodeRet)
+    {
+         const_iterator pc2 = pc;
+         bool fRet = GetOp2(pc2, opcodeRet, NULL);
+         pc = begin() + (pc2 - begin());
+         return fRet;
+    }
+
+    bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
+    {
+        return GetOp2(pc, opcodeRet, &vchRet);
+    }
+
+    bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const
+    {
+        return GetOp2(pc, opcodeRet, NULL);
+    }
+
+    bool GetOp2(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet) const
+    {
+        opcodeRet = OP_INVALIDOPCODE;
+        if (pvchRet)
+            pvchRet->clear();
+        if (pc >= end())
+            return false;
+
+        // Read instruction
+        if (end() - pc < 1)
+            return false;
+        unsigned int opcode = *pc++;
+
+        // Immediate operand
+        if (opcode <= OP_PUSHDATA4)
+        {
+            unsigned int nSize = 0;
+            if (opcode < OP_PUSHDATA1)
+            {
+                nSize = opcode;
+            }
+            else if (opcode == OP_PUSHDATA1)
+            {
+                if (end() - pc < 1)
+                    return false;
+                nSize = *pc++;
+            }
+            else if (opcode == OP_PUSHDATA2)
+            {
+                if (end() - pc < 2)
+                    return false;
+                nSize = 0;
+                memcpy(&nSize, &pc[0], 2);
+                pc += 2;
+            }
+            else if (opcode == OP_PUSHDATA4)
+            {
+                if (end() - pc < 4)
+                    return false;
+                memcpy(&nSize, &pc[0], 4);
+                pc += 4;
+            }
+            if (end() - pc < 0 || (unsigned int)(end() - pc) < nSize)
+                return false;
+            if (pvchRet)
+                pvchRet->assign(pc, pc + nSize);
+            pc += nSize;
+        }
+
+        opcodeRet = (opcodetype)opcode;
+        return true;
+    }
+
+    // Encode/decode small integers:
+    static int DecodeOP_N(opcodetype opcode)
+    {
+        if (opcode == OP_0)
+            return 0;
+        assert(opcode >= OP_1 && opcode <= OP_16);
+        return (int)opcode - (int)(OP_1 - 1);
+    }
+    static opcodetype EncodeOP_N(int n)
+    {
+        assert(n >= 0 && n <= 16);
+        if (n == 0)
+            return OP_0;
+        return (opcodetype)(OP_1+n-1);
+    }
+
+    int FindAndDelete(const CScript& b)
+    {
+        int nFound = 0;
+        if (b.empty())
+            return nFound;
+        iterator pc = begin();
+        opcodetype opcode;
+        do
+        {
+            while (end() - pc >= (long)b.size() && memcmp(&pc[0], &b[0], b.size()) == 0)
+            {
+                erase(pc, pc + b.size());
+                ++nFound;
+            }
+        }
+        while (GetOp(pc, opcode));
+        return nFound;
+    }
+    int Find(opcodetype op) const
+    {
+        int nFound = 0;
+        opcodetype opcode;
+        for (const_iterator pc = begin(); pc != end() && GetOp(pc, opcode);)
+            if (opcode == op)
+                ++nFound;
+        return nFound;
+    }
+
+    // Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
+    // as 20 sigops. With pay-to-script-hash, that changed:
+    // CHECKMULTISIGs serialized in scriptSigs are
+    // counted more accurately, assuming they are of the form
+    //  ... OP_N CHECKMULTISIG ...
+    unsigned int GetSigOpCount(bool fAccurate) const;
+
+    // Accurately count sigOps, including sigOps in
+    // pay-to-script-hash transactions:
+    unsigned int GetSigOpCount(const CScript& scriptSig) const;
+
+    bool IsPayToScriptHash() const;
+
+    // Called by IsStandardTx and P2SH VerifyScript (which makes it consensus-critical).
+    bool IsPushOnly() const;
+
+    // Called by IsStandardTx.
+    bool HasCanonicalPushes() const;
+
+    // Returns whether the script is guaranteed to fail at execution,
+    // regardless of the initial stack. This allows outputs to be pruned
+    // instantly when entering the UTXO set.
+    bool IsUnspendable() const
+    {
+        return (size() > 0 && *begin() == OP_RETURN);
+    }
+
+    void SetDestination(const CTxDestination& address);
+    void SetMultisig(int nRequired, const std::vector<CPubKey>& keys);
+
+    std::string ToString() const
+    {
+        std::string str;
+        opcodetype opcode;
+        std::vector<unsigned char> vch;
+        const_iterator pc = begin();
+        while (pc < end())
+        {
+            if (!str.empty())
+                str += " ";
+            if (!GetOp(pc, opcode, vch))
+            {
+                str += "[error]";
+                return str;
+            }
+            if (0 <= opcode && opcode <= OP_PUSHDATA4)
+                str += ValueString(vch);
+            else
+                str += GetOpName(opcode);
+        }
+        return str;
+    }
+
+    CScriptID GetID() const
+    {
+        return CScriptID(Hash160(*this));
+    }
+
+    void clear()
+    {
+        // The default std::vector::clear() does not release memory.
+        std::vector<unsigned char>().swap(*this);
+    }
+};
+
+#endif
diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index ce0d3b753754..56edc2c2dd32 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -81,150 +81,6 @@ const char* GetTxnOutputType(txnouttype t)
     return NULL;
 }
 
-
-const char* GetOpName(opcodetype opcode)
-{
-    switch (opcode)
-    {
-    // push value
-    case OP_0                      : return "0";
-    case OP_PUSHDATA1              : return "OP_PUSHDATA1";
-    case OP_PUSHDATA2              : return "OP_PUSHDATA2";
-    case OP_PUSHDATA4              : return "OP_PUSHDATA4";
-    case OP_1NEGATE                : return "-1";
-    case OP_RESERVED               : return "OP_RESERVED";
-    case OP_1                      : return "1";
-    case OP_2                      : return "2";
-    case OP_3                      : return "3";
-    case OP_4                      : return "4";
-    case OP_5                      : return "5";
-    case OP_6                      : return "6";
-    case OP_7                      : return "7";
-    case OP_8                      : return "8";
-    case OP_9                      : return "9";
-    case OP_10                     : return "10";
-    case OP_11                     : return "11";
-    case OP_12                     : return "12";
-    case OP_13                     : return "13";
-    case OP_14                     : return "14";
-    case OP_15                     : return "15";
-    case OP_16                     : return "16";
-
-    // control
-    case OP_NOP                    : return "OP_NOP";
-    case OP_VER                    : return "OP_VER";
-    case OP_IF                     : return "OP_IF";
-    case OP_NOTIF                  : return "OP_NOTIF";
-    case OP_VERIF                  : return "OP_VERIF";
-    case OP_VERNOTIF               : return "OP_VERNOTIF";
-    case OP_ELSE                   : return "OP_ELSE";
-    case OP_ENDIF                  : return "OP_ENDIF";
-    case OP_VERIFY                 : return "OP_VERIFY";
-    case OP_RETURN                 : return "OP_RETURN";
-
-    // stack ops
-    case OP_TOALTSTACK             : return "OP_TOALTSTACK";
-    case OP_FROMALTSTACK           : return "OP_FROMALTSTACK";
-    case OP_2DROP                  : return "OP_2DROP";
-    case OP_2DUP                   : return "OP_2DUP";
-    case OP_3DUP                   : return "OP_3DUP";
-    case OP_2OVER                  : return "OP_2OVER";
-    case OP_2ROT                   : return "OP_2ROT";
-    case OP_2SWAP                  : return "OP_2SWAP";
-    case OP_IFDUP                  : return "OP_IFDUP";
-    case OP_DEPTH                  : return "OP_DEPTH";
-    case OP_DROP                   : return "OP_DROP";
-    case OP_DUP                    : return "OP_DUP";
-    case OP_NIP                    : return "OP_NIP";
-    case OP_OVER                   : return "OP_OVER";
-    case OP_PICK                   : return "OP_PICK";
-    case OP_ROLL                   : return "OP_ROLL";
-    case OP_ROT                    : return "OP_ROT";
-    case OP_SWAP                   : return "OP_SWAP";
-    case OP_TUCK                   : return "OP_TUCK";
-
-    // splice ops
-    case OP_CAT                    : return "OP_CAT";
-    case OP_SUBSTR                 : return "OP_SUBSTR";
-    case OP_LEFT                   : return "OP_LEFT";
-    case OP_RIGHT                  : return "OP_RIGHT";
-    case OP_SIZE                   : return "OP_SIZE";
-
-    // bit logic
-    case OP_INVERT                 : return "OP_INVERT";
-    case OP_AND                    : return "OP_AND";
-    case OP_OR                     : return "OP_OR";
-    case OP_XOR                    : return "OP_XOR";
-    case OP_EQUAL                  : return "OP_EQUAL";
-    case OP_EQUALVERIFY            : return "OP_EQUALVERIFY";
-    case OP_RESERVED1              : return "OP_RESERVED1";
-    case OP_RESERVED2              : return "OP_RESERVED2";
-
-    // numeric
-    case OP_1ADD                   : return "OP_1ADD";
-    case OP_1SUB                   : return "OP_1SUB";
-    case OP_2MUL                   : return "OP_2MUL";
-    case OP_2DIV                   : return "OP_2DIV";
-    case OP_NEGATE                 : return "OP_NEGATE";
-    case OP_ABS                    : return "OP_ABS";
-    case OP_NOT                    : return "OP_NOT";
-    case OP_0NOTEQUAL              : return "OP_0NOTEQUAL";
-    case OP_ADD                    : return "OP_ADD";
-    case OP_SUB                    : return "OP_SUB";
-    case OP_MUL                    : return "OP_MUL";
-    case OP_DIV                    : return "OP_DIV";
-    case OP_MOD                    : return "OP_MOD";
-    case OP_LSHIFT                 : return "OP_LSHIFT";
-    case OP_RSHIFT                 : return "OP_RSHIFT";
-    case OP_BOOLAND                : return "OP_BOOLAND";
-    case OP_BOOLOR                 : return "OP_BOOLOR";
-    case OP_NUMEQUAL               : return "OP_NUMEQUAL";
-    case OP_NUMEQUALVERIFY         : return "OP_NUMEQUALVERIFY";
-    case OP_NUMNOTEQUAL            : return "OP_NUMNOTEQUAL";
-    case OP_LESSTHAN               : return "OP_LESSTHAN";
-    case OP_GREATERTHAN            : return "OP_GREATERTHAN";
-    case OP_LESSTHANOREQUAL        : return "OP_LESSTHANOREQUAL";
-    case OP_GREATERTHANOREQUAL     : return "OP_GREATERTHANOREQUAL";
-    case OP_MIN                    : return "OP_MIN";
-    case OP_MAX                    : return "OP_MAX";
-    case OP_WITHIN                 : return "OP_WITHIN";
-
-    // crypto
-    case OP_RIPEMD160              : return "OP_RIPEMD160";
-    case OP_SHA1                   : return "OP_SHA1";
-    case OP_SHA256                 : return "OP_SHA256";
-    case OP_HASH160                : return "OP_HASH160";
-    case OP_HASH256                : return "OP_HASH256";
-    case OP_CODESEPARATOR          : return "OP_CODESEPARATOR";
-    case OP_CHECKSIG               : return "OP_CHECKSIG";
-    case OP_CHECKSIGVERIFY         : return "OP_CHECKSIGVERIFY";
-    case OP_CHECKMULTISIG          : return "OP_CHECKMULTISIG";
-    case OP_CHECKMULTISIGVERIFY    : return "OP_CHECKMULTISIGVERIFY";
-
-    // expanson
-    case OP_NOP1                   : return "OP_NOP1";
-    case OP_NOP2                   : return "OP_NOP2";
-    case OP_NOP3                   : return "OP_NOP3";
-    case OP_NOP4                   : return "OP_NOP4";
-    case OP_NOP5                   : return "OP_NOP5";
-    case OP_NOP6                   : return "OP_NOP6";
-    case OP_NOP7                   : return "OP_NOP7";
-    case OP_NOP8                   : return "OP_NOP8";
-    case OP_NOP9                   : return "OP_NOP9";
-    case OP_NOP10                  : return "OP_NOP10";
-
-    case OP_INVALIDOPCODE          : return "OP_INVALIDOPCODE";
-
-    // Note:
-    //  The template matching params OP_SMALLDATA/etc are defined in opcodetype enum
-    //  as kind of implementation hack, they are *NOT* real opcodes.  If found in real
-    //  Script, just let the default: case deal with them.
-
-    default:
-        return "OP_UNKNOWN";
-    }
-}
-
 bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
     if (!(flags & SCRIPT_VERIFY_STRICTENC))
         return true;
@@ -1813,150 +1669,6 @@ CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsign
     return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
 }
 
-unsigned int CScript::GetSigOpCount(bool fAccurate) const
-{
-    unsigned int n = 0;
-    const_iterator pc = begin();
-    opcodetype lastOpcode = OP_INVALIDOPCODE;
-    while (pc < end())
-    {
-        opcodetype opcode;
-        if (!GetOp(pc, opcode))
-            break;
-        if (opcode == OP_CHECKSIG || opcode == OP_CHECKSIGVERIFY)
-            n++;
-        else if (opcode == OP_CHECKMULTISIG || opcode == OP_CHECKMULTISIGVERIFY)
-        {
-            if (fAccurate && lastOpcode >= OP_1 && lastOpcode <= OP_16)
-                n += DecodeOP_N(lastOpcode);
-            else
-                n += 20;
-        }
-        lastOpcode = opcode;
-    }
-    return n;
-}
-
-unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const
-{
-    if (!IsPayToScriptHash())
-        return GetSigOpCount(true);
-
-    // This is a pay-to-script-hash scriptPubKey;
-    // get the last item that the scriptSig
-    // pushes onto the stack:
-    const_iterator pc = scriptSig.begin();
-    vector<unsigned char> data;
-    while (pc < scriptSig.end())
-    {
-        opcodetype opcode;
-        if (!scriptSig.GetOp(pc, opcode, data))
-            return 0;
-        if (opcode > OP_16)
-            return 0;
-    }
-
-    /// ... and return its opcount:
-    CScript subscript(data.begin(), data.end());
-    return subscript.GetSigOpCount(true);
-}
-
-bool CScript::IsPayToScriptHash() const
-{
-    // Extra-fast test for pay-to-script-hash CScripts:
-    return (this->size() == 23 &&
-            this->at(0) == OP_HASH160 &&
-            this->at(1) == 0x14 &&
-            this->at(22) == OP_EQUAL);
-}
-
-bool CScript::IsPushOnly() const
-{
-    const_iterator pc = begin();
-    while (pc < end())
-    {
-        // Note how a script with an invalid PUSHDATA returns False.
-        opcodetype opcode;
-        if (!GetOp(pc, opcode))
-            return false;
-
-        // Note that IsPushOnly() *does* consider OP_RESERVED to be a
-        // push-type opcode, however execution of OP_RESERVED fails, so
-        // it's not relevant to P2SH as the scriptSig would fail prior to
-        // the P2SH special validation code being executed.
-        if (opcode > OP_16)
-            return false;
-    }
-    return true;
-}
-
-bool CScript::HasCanonicalPushes() const
-{
-    const_iterator pc = begin();
-    while (pc < end())
-    {
-        opcodetype opcode;
-        std::vector<unsigned char> data;
-        if (!GetOp(pc, opcode, data))
-            return false;
-        if (opcode > OP_16)
-            continue;
-        if (opcode < OP_PUSHDATA1 && opcode > OP_0 && (data.size() == 1 && data[0] <= 16))
-            // Could have used an OP_n code, rather than a 1-byte push.
-            return false;
-        if (opcode == OP_PUSHDATA1 && data.size() < OP_PUSHDATA1)
-            // Could have used a normal n-byte push, rather than OP_PUSHDATA1.
-            return false;
-        if (opcode == OP_PUSHDATA2 && data.size() <= 0xFF)
-            // Could have used an OP_PUSHDATA1.
-            return false;
-        if (opcode == OP_PUSHDATA4 && data.size() <= 0xFFFF)
-            // Could have used an OP_PUSHDATA2.
-            return false;
-    }
-    return true;
-}
-
-class CScriptVisitor : public boost::static_visitor<bool>
-{
-private:
-    CScript *script;
-public:
-    CScriptVisitor(CScript *scriptin) { script = scriptin; }
-
-    bool operator()(const CNoDestination &dest) const {
-        script->clear();
-        return false;
-    }
-
-    bool operator()(const CKeyID &keyID) const {
-        script->clear();
-        *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG;
-        return true;
-    }
-
-    bool operator()(const CScriptID &scriptID) const {
-        script->clear();
-        *script << OP_HASH160 << scriptID << OP_EQUAL;
-        return true;
-    }
-};
-
-void CScript::SetDestination(const CTxDestination& dest)
-{
-    boost::apply_visitor(CScriptVisitor(this), dest);
-}
-
-void CScript::SetMultisig(int nRequired, const std::vector<CPubKey>& keys)
-{
-    this->clear();
-
-    *this << EncodeOP_N(nRequired);
-    BOOST_FOREACH(const CPubKey& key, keys)
-        *this << key;
-    *this << EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
-}
-
 bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
 {
     if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 44f18483c389..4f29f7ab29dc 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -7,172 +7,19 @@
 #define H_BITCOIN_SCRIPTUTILS
 
 #include "key.h"
-#include "utilstrencodings.h"
-#include "tinyformat.h"
+#include "script/script.h"
 
 #include <stdexcept>
 #include <stdint.h>
 #include <string>
 #include <vector>
 
-#include <boost/variant.hpp>
-
 class CKeyStore;
 class CTransaction;
 struct CMutableTransaction;
 
-static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
 
-class scriptnum_error : public std::runtime_error
-{
-public:
-    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
-};
-
-class CScriptNum
-{
-// Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
-// The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
-// but results may overflow (and are valid as long as they are not used in a subsequent
-// numeric operation). CScriptNum enforces those semantics by storing results as
-// an int64 and allowing out-of-range values to be returned as a vector of bytes but
-// throwing an exception if arithmetic is done or the result is interpreted as an integer.
-public:
-
-    explicit CScriptNum(const int64_t& n)
-    {
-        m_value = n;
-    }
-
-    explicit CScriptNum(const std::vector<unsigned char>& vch)
-    {
-        if (vch.size() > nMaxNumSize)
-            throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow");
-        m_value = set_vch(vch);
-    }
-
-    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
-    inline bool operator!=(const int64_t& rhs) const    { return m_value != rhs; }
-    inline bool operator<=(const int64_t& rhs) const    { return m_value <= rhs; }
-    inline bool operator< (const int64_t& rhs) const    { return m_value <  rhs; }
-    inline bool operator>=(const int64_t& rhs) const    { return m_value >= rhs; }
-    inline bool operator> (const int64_t& rhs) const    { return m_value >  rhs; }
-
-    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
-    inline bool operator!=(const CScriptNum& rhs) const { return operator!=(rhs.m_value); }
-    inline bool operator<=(const CScriptNum& rhs) const { return operator<=(rhs.m_value); }
-    inline bool operator< (const CScriptNum& rhs) const { return operator< (rhs.m_value); }
-    inline bool operator>=(const CScriptNum& rhs) const { return operator>=(rhs.m_value); }
-    inline bool operator> (const CScriptNum& rhs) const { return operator> (rhs.m_value); }
-
-    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
-    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
-    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
-    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
-
-    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
-    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
-
-    inline CScriptNum operator-()                         const
-    {
-        assert(m_value != std::numeric_limits<int64_t>::min());
-        return CScriptNum(-m_value);
-    }
-
-    inline CScriptNum& operator=( const int64_t& rhs)
-    {
-        m_value = rhs;
-        return *this;
-    }
-
-    inline CScriptNum& operator+=( const int64_t& rhs)
-    {
-        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
-                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
-        m_value += rhs;
-        return *this;
-    }
-
-    inline CScriptNum& operator-=( const int64_t& rhs)
-    {
-        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
-                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
-        m_value -= rhs;
-        return *this;
-    }
-
-    int getint() const
-    {
-        if (m_value > std::numeric_limits<int>::max())
-            return std::numeric_limits<int>::max();
-        else if (m_value < std::numeric_limits<int>::min())
-            return std::numeric_limits<int>::min();
-        return m_value;
-    }
-
-    std::vector<unsigned char> getvch() const
-    {
-        return serialize(m_value);
-    }
-
-    static std::vector<unsigned char> serialize(const int64_t& value)
-    {
-        if(value == 0)
-            return std::vector<unsigned char>();
-
-        std::vector<unsigned char> result;
-        const bool neg = value < 0;
-        uint64_t absvalue = neg ? -value : value;
-
-        while(absvalue)
-        {
-            result.push_back(absvalue & 0xff);
-            absvalue >>= 8;
-        }
-
-
-//    - If the most significant byte is >= 0x80 and the value is positive, push a
-//    new zero-byte to make the significant byte < 0x80 again.
-
-//    - If the most significant byte is >= 0x80 and the value is negative, push a
-//    new 0x80 byte that will be popped off when converting to an integral.
-
-//    - If the most significant byte is < 0x80 and the value is negative, add
-//    0x80 to it, since it will be subtracted and interpreted as a negative when
-//    converting to an integral.
-
-        if (result.back() & 0x80)
-            result.push_back(neg ? 0x80 : 0);
-        else if (neg)
-            result.back() |= 0x80;
-
-        return result;
-    }
-
-    static const size_t nMaxNumSize = 4;
-
-private:
-    static int64_t set_vch(const std::vector<unsigned char>& vch)
-    {
-      if (vch.empty())
-          return 0;
-
-      int64_t result = 0;
-      for (size_t i = 0; i != vch.size(); ++i)
-          result |= static_cast<int64_t>(vch[i]) << 8*i;
-
-      // If the input vector's most significant byte is 0x80, remove it from
-      // the result's msb and return a negative.
-      if (vch.back() & 0x80)
-          return -(result & ~(0x80ULL << (8 * (vch.size() - 1))));
-
-      return result;
-    }
-
-    int64_t m_value;
-};
-
 /** Signature hash types/flags */
 enum
 {
@@ -234,490 +81,8 @@ enum txnouttype
     TX_NULL_DATA,
 };
 
-class CNoDestination {
-public:
-    friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; }
-    friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
-};
-
-/** A txout script template with a specific destination. It is either:
- *  * CNoDestination: no destination set
- *  * CKeyID: TX_PUBKEYHASH destination
- *  * CScriptID: TX_SCRIPTHASH destination
- *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
- */
-typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
-
 const char* GetTxnOutputType(txnouttype t);
 
-/** Script opcodes */
-enum opcodetype
-{
-    // push value
-    OP_0 = 0x00,
-    OP_FALSE = OP_0,
-    OP_PUSHDATA1 = 0x4c,
-    OP_PUSHDATA2 = 0x4d,
-    OP_PUSHDATA4 = 0x4e,
-    OP_1NEGATE = 0x4f,
-    OP_RESERVED = 0x50,
-    OP_1 = 0x51,
-    OP_TRUE=OP_1,
-    OP_2 = 0x52,
-    OP_3 = 0x53,
-    OP_4 = 0x54,
-    OP_5 = 0x55,
-    OP_6 = 0x56,
-    OP_7 = 0x57,
-    OP_8 = 0x58,
-    OP_9 = 0x59,
-    OP_10 = 0x5a,
-    OP_11 = 0x5b,
-    OP_12 = 0x5c,
-    OP_13 = 0x5d,
-    OP_14 = 0x5e,
-    OP_15 = 0x5f,
-    OP_16 = 0x60,
-
-    // control
-    OP_NOP = 0x61,
-    OP_VER = 0x62,
-    OP_IF = 0x63,
-    OP_NOTIF = 0x64,
-    OP_VERIF = 0x65,
-    OP_VERNOTIF = 0x66,
-    OP_ELSE = 0x67,
-    OP_ENDIF = 0x68,
-    OP_VERIFY = 0x69,
-    OP_RETURN = 0x6a,
-
-    // stack ops
-    OP_TOALTSTACK = 0x6b,
-    OP_FROMALTSTACK = 0x6c,
-    OP_2DROP = 0x6d,
-    OP_2DUP = 0x6e,
-    OP_3DUP = 0x6f,
-    OP_2OVER = 0x70,
-    OP_2ROT = 0x71,
-    OP_2SWAP = 0x72,
-    OP_IFDUP = 0x73,
-    OP_DEPTH = 0x74,
-    OP_DROP = 0x75,
-    OP_DUP = 0x76,
-    OP_NIP = 0x77,
-    OP_OVER = 0x78,
-    OP_PICK = 0x79,
-    OP_ROLL = 0x7a,
-    OP_ROT = 0x7b,
-    OP_SWAP = 0x7c,
-    OP_TUCK = 0x7d,
-
-    // splice ops
-    OP_CAT = 0x7e,
-    OP_SUBSTR = 0x7f,
-    OP_LEFT = 0x80,
-    OP_RIGHT = 0x81,
-    OP_SIZE = 0x82,
-
-    // bit logic
-    OP_INVERT = 0x83,
-    OP_AND = 0x84,
-    OP_OR = 0x85,
-    OP_XOR = 0x86,
-    OP_EQUAL = 0x87,
-    OP_EQUALVERIFY = 0x88,
-    OP_RESERVED1 = 0x89,
-    OP_RESERVED2 = 0x8a,
-
-    // numeric
-    OP_1ADD = 0x8b,
-    OP_1SUB = 0x8c,
-    OP_2MUL = 0x8d,
-    OP_2DIV = 0x8e,
-    OP_NEGATE = 0x8f,
-    OP_ABS = 0x90,
-    OP_NOT = 0x91,
-    OP_0NOTEQUAL = 0x92,
-
-    OP_ADD = 0x93,
-    OP_SUB = 0x94,
-    OP_MUL = 0x95,
-    OP_DIV = 0x96,
-    OP_MOD = 0x97,
-    OP_LSHIFT = 0x98,
-    OP_RSHIFT = 0x99,
-
-    OP_BOOLAND = 0x9a,
-    OP_BOOLOR = 0x9b,
-    OP_NUMEQUAL = 0x9c,
-    OP_NUMEQUALVERIFY = 0x9d,
-    OP_NUMNOTEQUAL = 0x9e,
-    OP_LESSTHAN = 0x9f,
-    OP_GREATERTHAN = 0xa0,
-    OP_LESSTHANOREQUAL = 0xa1,
-    OP_GREATERTHANOREQUAL = 0xa2,
-    OP_MIN = 0xa3,
-    OP_MAX = 0xa4,
-
-    OP_WITHIN = 0xa5,
-
-    // crypto
-    OP_RIPEMD160 = 0xa6,
-    OP_SHA1 = 0xa7,
-    OP_SHA256 = 0xa8,
-    OP_HASH160 = 0xa9,
-    OP_HASH256 = 0xaa,
-    OP_CODESEPARATOR = 0xab,
-    OP_CHECKSIG = 0xac,
-    OP_CHECKSIGVERIFY = 0xad,
-    OP_CHECKMULTISIG = 0xae,
-    OP_CHECKMULTISIGVERIFY = 0xaf,
-
-    // expansion
-    OP_NOP1 = 0xb0,
-    OP_NOP2 = 0xb1,
-    OP_NOP3 = 0xb2,
-    OP_NOP4 = 0xb3,
-    OP_NOP5 = 0xb4,
-    OP_NOP6 = 0xb5,
-    OP_NOP7 = 0xb6,
-    OP_NOP8 = 0xb7,
-    OP_NOP9 = 0xb8,
-    OP_NOP10 = 0xb9,
-
-
-
-    // template matching params
-    OP_SMALLDATA = 0xf9,
-    OP_SMALLINTEGER = 0xfa,
-    OP_PUBKEYS = 0xfb,
-    OP_PUBKEYHASH = 0xfd,
-    OP_PUBKEY = 0xfe,
-
-    OP_INVALIDOPCODE = 0xff,
-};
-
-const char* GetOpName(opcodetype opcode);
-
-
-
-inline std::string ValueString(const std::vector<unsigned char>& vch)
-{
-    if (vch.size() <= 4)
-        return strprintf("%d", CScriptNum(vch).getint());
-    else
-        return HexStr(vch);
-}
-
-/** Serialized script, used inside transaction inputs and outputs */
-class CScript : public std::vector<unsigned char>
-{
-protected:
-    CScript& push_int64(int64_t n)
-    {
-        if (n == -1 || (n >= 1 && n <= 16))
-        {
-            push_back(n + (OP_1 - 1));
-        }
-        else
-        {
-            *this << CScriptNum::serialize(n);
-        }
-        return *this;
-    }
-public:
-    CScript() { }
-    CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
-    CScript(const_iterator pbegin, const_iterator pend) : std::vector<unsigned char>(pbegin, pend) { }
-#ifndef _MSC_VER
-    CScript(const unsigned char* pbegin, const unsigned char* pend) : std::vector<unsigned char>(pbegin, pend) { }
-#endif
-
-    CScript& operator+=(const CScript& b)
-    {
-        insert(end(), b.begin(), b.end());
-        return *this;
-    }
-
-    friend CScript operator+(const CScript& a, const CScript& b)
-    {
-        CScript ret = a;
-        ret += b;
-        return ret;
-    }
-
-
-    CScript(int64_t b)        { operator<<(b); }
-
-    explicit CScript(opcodetype b)     { operator<<(b); }
-    explicit CScript(const uint256& b) { operator<<(b); }
-    explicit CScript(const CScriptNum& b) { operator<<(b); }
-    explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
-
-
-    CScript& operator<<(int64_t b) { return push_int64(b); }
-
-    CScript& operator<<(opcodetype opcode)
-    {
-        if (opcode < 0 || opcode > 0xff)
-            throw std::runtime_error("CScript::operator<<() : invalid opcode");
-        insert(end(), (unsigned char)opcode);
-        return *this;
-    }
-
-    CScript& operator<<(const uint160& b)
-    {
-        insert(end(), sizeof(b));
-        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
-        return *this;
-    }
-
-    CScript& operator<<(const uint256& b)
-    {
-        insert(end(), sizeof(b));
-        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
-        return *this;
-    }
-
-    CScript& operator<<(const CPubKey& key)
-    {
-        assert(key.size() < OP_PUSHDATA1);
-        insert(end(), (unsigned char)key.size());
-        insert(end(), key.begin(), key.end());
-        return *this;
-    }
-
-    CScript& operator<<(const CScriptNum& b)
-    {
-        *this << b.getvch();
-        return *this;
-    }
-
-    CScript& operator<<(const std::vector<unsigned char>& b)
-    {
-        if (b.size() < OP_PUSHDATA1)
-        {
-            insert(end(), (unsigned char)b.size());
-        }
-        else if (b.size() <= 0xff)
-        {
-            insert(end(), OP_PUSHDATA1);
-            insert(end(), (unsigned char)b.size());
-        }
-        else if (b.size() <= 0xffff)
-        {
-            insert(end(), OP_PUSHDATA2);
-            unsigned short nSize = b.size();
-            insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize));
-        }
-        else
-        {
-            insert(end(), OP_PUSHDATA4);
-            unsigned int nSize = b.size();
-            insert(end(), (unsigned char*)&nSize, (unsigned char*)&nSize + sizeof(nSize));
-        }
-        insert(end(), b.begin(), b.end());
-        return *this;
-    }
-
-    CScript& operator<<(const CScript& b)
-    {
-        // I'm not sure if this should push the script or concatenate scripts.
-        // If there's ever a use for pushing a script onto a script, delete this member fn
-        assert(!"Warning: Pushing a CScript onto a CScript with << is probably not intended, use + to concatenate!");
-        return *this;
-    }
-
-
-    bool GetOp(iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet)
-    {
-         // Wrapper so it can be called with either iterator or const_iterator
-         const_iterator pc2 = pc;
-         bool fRet = GetOp2(pc2, opcodeRet, &vchRet);
-         pc = begin() + (pc2 - begin());
-         return fRet;
-    }
-
-    bool GetOp(iterator& pc, opcodetype& opcodeRet)
-    {
-         const_iterator pc2 = pc;
-         bool fRet = GetOp2(pc2, opcodeRet, NULL);
-         pc = begin() + (pc2 - begin());
-         return fRet;
-    }
-
-    bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
-    {
-        return GetOp2(pc, opcodeRet, &vchRet);
-    }
-
-    bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const
-    {
-        return GetOp2(pc, opcodeRet, NULL);
-    }
-
-    bool GetOp2(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet) const
-    {
-        opcodeRet = OP_INVALIDOPCODE;
-        if (pvchRet)
-            pvchRet->clear();
-        if (pc >= end())
-            return false;
-
-        // Read instruction
-        if (end() - pc < 1)
-            return false;
-        unsigned int opcode = *pc++;
-
-        // Immediate operand
-        if (opcode <= OP_PUSHDATA4)
-        {
-            unsigned int nSize = 0;
-            if (opcode < OP_PUSHDATA1)
-            {
-                nSize = opcode;
-            }
-            else if (opcode == OP_PUSHDATA1)
-            {
-                if (end() - pc < 1)
-                    return false;
-                nSize = *pc++;
-            }
-            else if (opcode == OP_PUSHDATA2)
-            {
-                if (end() - pc < 2)
-                    return false;
-                nSize = 0;
-                memcpy(&nSize, &pc[0], 2);
-                pc += 2;
-            }
-            else if (opcode == OP_PUSHDATA4)
-            {
-                if (end() - pc < 4)
-                    return false;
-                memcpy(&nSize, &pc[0], 4);
-                pc += 4;
-            }
-            if (end() - pc < 0 || (unsigned int)(end() - pc) < nSize)
-                return false;
-            if (pvchRet)
-                pvchRet->assign(pc, pc + nSize);
-            pc += nSize;
-        }
-
-        opcodeRet = (opcodetype)opcode;
-        return true;
-    }
-
-    // Encode/decode small integers:
-    static int DecodeOP_N(opcodetype opcode)
-    {
-        if (opcode == OP_0)
-            return 0;
-        assert(opcode >= OP_1 && opcode <= OP_16);
-        return (int)opcode - (int)(OP_1 - 1);
-    }
-    static opcodetype EncodeOP_N(int n)
-    {
-        assert(n >= 0 && n <= 16);
-        if (n == 0)
-            return OP_0;
-        return (opcodetype)(OP_1+n-1);
-    }
-
-    int FindAndDelete(const CScript& b)
-    {
-        int nFound = 0;
-        if (b.empty())
-            return nFound;
-        iterator pc = begin();
-        opcodetype opcode;
-        do
-        {
-            while (end() - pc >= (long)b.size() && memcmp(&pc[0], &b[0], b.size()) == 0)
-            {
-                erase(pc, pc + b.size());
-                ++nFound;
-            }
-        }
-        while (GetOp(pc, opcode));
-        return nFound;
-    }
-    int Find(opcodetype op) const
-    {
-        int nFound = 0;
-        opcodetype opcode;
-        for (const_iterator pc = begin(); pc != end() && GetOp(pc, opcode);)
-            if (opcode == op)
-                ++nFound;
-        return nFound;
-    }
-
-    // Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
-    // as 20 sigops. With pay-to-script-hash, that changed:
-    // CHECKMULTISIGs serialized in scriptSigs are
-    // counted more accurately, assuming they are of the form
-    //  ... OP_N CHECKMULTISIG ...
-    unsigned int GetSigOpCount(bool fAccurate) const;
-
-    // Accurately count sigOps, including sigOps in
-    // pay-to-script-hash transactions:
-    unsigned int GetSigOpCount(const CScript& scriptSig) const;
-
-    bool IsPayToScriptHash() const;
-
-    // Called by IsStandardTx and P2SH VerifyScript (which makes it consensus-critical).
-    bool IsPushOnly() const;
-
-    // Called by IsStandardTx.
-    bool HasCanonicalPushes() const;
-
-    // Returns whether the script is guaranteed to fail at execution,
-    // regardless of the initial stack. This allows outputs to be pruned
-    // instantly when entering the UTXO set.
-    bool IsUnspendable() const
-    {
-        return (size() > 0 && *begin() == OP_RETURN);
-    }
-
-    void SetDestination(const CTxDestination& address);
-    void SetMultisig(int nRequired, const std::vector<CPubKey>& keys);
-
-    std::string ToString() const
-    {
-        std::string str;
-        opcodetype opcode;
-        std::vector<unsigned char> vch;
-        const_iterator pc = begin();
-        while (pc < end())
-        {
-            if (!str.empty())
-                str += " ";
-            if (!GetOp(pc, opcode, vch))
-            {
-                str += "[error]";
-                return str;
-            }
-            if (0 <= opcode && opcode <= OP_PUSHDATA4)
-                str += ValueString(vch);
-            else
-                str += GetOpName(opcode);
-        }
-        return str;
-    }
-
-    CScriptID GetID() const
-    {
-        return CScriptID(Hash160(*this));
-    }
-
-    void clear()
-    {
-        // The default std::vector::clear() does not release memory.
-        std::vector<unsigned char>().swap(*this);
-    }
-};
-
 /** Compact serializer for scripts.
  *
  *  It detects common cases and encodes them much more efficiently.
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 0587ddac8493..fe68e9e9744f 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -9,7 +9,7 @@
 #include "data/base58_keys_valid.json.h"
 
 #include "key.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index c6bf0db3af3f..203c20731afc 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -5,7 +5,7 @@
 #include "key.h"
 
 #include "base58.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 2e45a7a0229c..aa9b0de4ce89 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -5,6 +5,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "script/script.h"
 #include "scriptutils.h"
 #include "uint256.h"
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index d27fc7159861..9136d6229286 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -5,6 +5,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "script/script.h"
 #include "scriptutils.h"
 
 #include <vector>
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index a8ccd5059804..ff56bdf13bae 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -8,6 +8,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "script/script.h"
 #include "scriptutils.h"
 #include "core_io.h"
 
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp
index c3cd41cf8452..ac60fa426f89 100644
--- a/src/test/scriptnum_tests.cpp
+++ b/src/test/scriptnum_tests.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "bignum.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include <boost/test/unit_test.hpp>
 #include <limits.h>
 #include <stdint.h>
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 53f4d443c4b4..1421288eed30 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -6,6 +6,7 @@
 #include "main.h"
 #include "random.h"
 #include "serialize.h"
+#include "script/script.h"
 #include "scriptutils.h"
 #include "util.h"
 #include "version.h"
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 963ccf560d3c..2d10c356ac1a 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "key.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "uint256.h"
 
 #include <vector>
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 2b5161b0cf69..943568e89d25 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -8,7 +8,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "scriptutils.h"
+#include "script/script.h"
 #include "core_io.h"
 
 #include <map>

From da03e6ed7c380d8942592626b9677579267f86fd Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 27 Aug 2014 20:11:41 +0200
Subject: [PATCH 0665/1819] Separate script/interpreter

---
 src/Makefile.am              |    2 +
 src/script/interpreter.cpp   | 1048 +++++++++++++++++++++++++++++++++
 src/script/interpreter.h     |   45 ++
 src/scriptutils.cpp          | 1058 ----------------------------------
 src/scriptutils.h            |   27 +-
 src/test/canonical_tests.cpp |    4 +-
 src/test/multisig_tests.cpp  |    1 +
 src/test/sighash_tests.cpp   |    2 +-
 8 files changed, 1101 insertions(+), 1086 deletions(-)
 create mode 100644 src/script/interpreter.cpp
 create mode 100644 src/script/interpreter.h

diff --git a/src/Makefile.am b/src/Makefile.am
index a9f1ceeeba89..a3fdd3ee6a60 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,6 +98,7 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
+  script/interpreter.h \
   script/script.h \
   scriptutils.h \
   serialize.h \
@@ -207,6 +208,7 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
+  script/interpreter.cpp \
   script/script.cpp \
   scriptutils.cpp \
   $(BITCOIN_CORE_H)
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
new file mode 100644
index 000000000000..4f4fdb6b7f80
--- /dev/null
+++ b/src/script/interpreter.cpp
@@ -0,0 +1,1048 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "interpreter.h"
+
+#include "core.h"
+#include "crypto/ripemd160.h"
+#include "crypto/sha1.h"
+#include "crypto/sha2.h"
+#include "random.h"
+#include "script/script.h"
+#include "uint256.h"
+#include "util.h"
+
+#include <boost/thread.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+
+using namespace std;
+
+typedef vector<unsigned char> valtype;
+static const valtype vchFalse(0);
+static const valtype vchZero(0);
+static const valtype vchTrue(1, 1);
+static const CScriptNum bnZero(0);
+static const CScriptNum bnOne(1);
+static const CScriptNum bnFalse(0);
+static const CScriptNum bnTrue(1);
+
+bool CastToBool(const valtype& vch)
+{
+    for (unsigned int i = 0; i < vch.size(); i++)
+    {
+        if (vch[i] != 0)
+        {
+            // Can be negative zero
+            if (i == vch.size()-1 && vch[i] == 0x80)
+                return false;
+            return true;
+        }
+    }
+    return false;
+}
+
+//
+// Script is a stack machine (like Forth) that evaluates a predicate
+// returning a bool indicating valid or not.  There are no loops.
+//
+#define stacktop(i)  (stack.at(stack.size()+(i)))
+#define altstacktop(i)  (altstack.at(altstack.size()+(i)))
+static inline void popstack(vector<valtype>& stack)
+{
+    if (stack.empty())
+        throw runtime_error("popstack() : stack empty");
+    stack.pop_back();
+}
+
+bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
+    if (!(flags & SCRIPT_VERIFY_STRICTENC))
+        return true;
+
+    if (vchPubKey.size() < 33)
+        return error("Non-canonical public key: too short");
+    if (vchPubKey[0] == 0x04) {
+        if (vchPubKey.size() != 65)
+            return error("Non-canonical public key: invalid length for uncompressed key");
+    } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) {
+        if (vchPubKey.size() != 33)
+            return error("Non-canonical public key: invalid length for compressed key");
+    } else {
+        return error("Non-canonical public key: neither compressed nor uncompressed");
+    }
+    return true;
+}
+
+bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
+    if (!(flags & SCRIPT_VERIFY_STRICTENC))
+        return true;
+
+    // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
+    // A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
+    // Where R and S are not negative (their first byte has its highest bit not set), and not
+    // excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
+    // in which case a single 0 byte is necessary and even required).
+    if (vchSig.size() < 9)
+        return error("Non-canonical signature: too short");
+    if (vchSig.size() > 73)
+        return error("Non-canonical signature: too long");
+    unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
+    if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
+        return error("Non-canonical signature: unknown hashtype byte");
+    if (vchSig[0] != 0x30)
+        return error("Non-canonical signature: wrong type");
+    if (vchSig[1] != vchSig.size()-3)
+        return error("Non-canonical signature: wrong length marker");
+    unsigned int nLenR = vchSig[3];
+    if (5 + nLenR >= vchSig.size())
+        return error("Non-canonical signature: S length misplaced");
+    unsigned int nLenS = vchSig[5+nLenR];
+    if ((unsigned long)(nLenR+nLenS+7) != vchSig.size())
+        return error("Non-canonical signature: R+S length mismatch");
+
+    const unsigned char *R = &vchSig[4];
+    if (R[-2] != 0x02)
+        return error("Non-canonical signature: R value type mismatch");
+    if (nLenR == 0)
+        return error("Non-canonical signature: R length is zero");
+    if (R[0] & 0x80)
+        return error("Non-canonical signature: R value negative");
+    if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80))
+        return error("Non-canonical signature: R value excessively padded");
+
+    const unsigned char *S = &vchSig[6+nLenR];
+    if (S[-2] != 0x02)
+        return error("Non-canonical signature: S value type mismatch");
+    if (nLenS == 0)
+        return error("Non-canonical signature: S length is zero");
+    if (S[0] & 0x80)
+        return error("Non-canonical signature: S value negative");
+    if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80))
+        return error("Non-canonical signature: S value excessively padded");
+
+    if (flags & SCRIPT_VERIFY_LOW_S) {
+        // If the S value is above the order of the curve divided by two, its
+        // complement modulo the order could have been used instead, which is
+        // one byte shorter when encoded correctly.
+        if (!CKey::CheckSignatureElement(S, nLenS, true))
+            return error("Non-canonical signature: S value is unnecessarily high");
+    }
+
+    return true;
+}
+
+bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
+{
+    CScript::const_iterator pc = script.begin();
+    CScript::const_iterator pend = script.end();
+    CScript::const_iterator pbegincodehash = script.begin();
+    opcodetype opcode;
+    valtype vchPushValue;
+    vector<bool> vfExec;
+    vector<valtype> altstack;
+    if (script.size() > 10000)
+        return false;
+    int nOpCount = 0;
+
+    try
+    {
+        while (pc < pend)
+        {
+            bool fExec = !count(vfExec.begin(), vfExec.end(), false);
+
+            //
+            // Read instruction
+            //
+            if (!script.GetOp(pc, opcode, vchPushValue))
+                return false;
+            if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
+                return false;
+
+            // Note how OP_RESERVED does not count towards the opcode limit.
+            if (opcode > OP_16 && ++nOpCount > 201)
+                return false;
+
+            if (opcode == OP_CAT ||
+                opcode == OP_SUBSTR ||
+                opcode == OP_LEFT ||
+                opcode == OP_RIGHT ||
+                opcode == OP_INVERT ||
+                opcode == OP_AND ||
+                opcode == OP_OR ||
+                opcode == OP_XOR ||
+                opcode == OP_2MUL ||
+                opcode == OP_2DIV ||
+                opcode == OP_MUL ||
+                opcode == OP_DIV ||
+                opcode == OP_MOD ||
+                opcode == OP_LSHIFT ||
+                opcode == OP_RSHIFT)
+                return false; // Disabled opcodes.
+
+            if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4)
+                stack.push_back(vchPushValue);
+            else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
+            switch (opcode)
+            {
+                //
+                // Push value
+                //
+                case OP_1NEGATE:
+                case OP_1:
+                case OP_2:
+                case OP_3:
+                case OP_4:
+                case OP_5:
+                case OP_6:
+                case OP_7:
+                case OP_8:
+                case OP_9:
+                case OP_10:
+                case OP_11:
+                case OP_12:
+                case OP_13:
+                case OP_14:
+                case OP_15:
+                case OP_16:
+                {
+                    // ( -- value)
+                    CScriptNum bn((int)opcode - (int)(OP_1 - 1));
+                    stack.push_back(bn.getvch());
+                }
+                break;
+
+
+                //
+                // Control
+                //
+                case OP_NOP:
+                case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5:
+                case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10:
+                break;
+
+                case OP_IF:
+                case OP_NOTIF:
+                {
+                    // <expression> if [statements] [else [statements]] endif
+                    bool fValue = false;
+                    if (fExec)
+                    {
+                        if (stack.size() < 1)
+                            return false;
+                        valtype& vch = stacktop(-1);
+                        fValue = CastToBool(vch);
+                        if (opcode == OP_NOTIF)
+                            fValue = !fValue;
+                        popstack(stack);
+                    }
+                    vfExec.push_back(fValue);
+                }
+                break;
+
+                case OP_ELSE:
+                {
+                    if (vfExec.empty())
+                        return false;
+                    vfExec.back() = !vfExec.back();
+                }
+                break;
+
+                case OP_ENDIF:
+                {
+                    if (vfExec.empty())
+                        return false;
+                    vfExec.pop_back();
+                }
+                break;
+
+                case OP_VERIFY:
+                {
+                    // (true -- ) or
+                    // (false -- false) and return
+                    if (stack.size() < 1)
+                        return false;
+                    bool fValue = CastToBool(stacktop(-1));
+                    if (fValue)
+                        popstack(stack);
+                    else
+                        return false;
+                }
+                break;
+
+                case OP_RETURN:
+                {
+                    return false;
+                }
+                break;
+
+
+                //
+                // Stack ops
+                //
+                case OP_TOALTSTACK:
+                {
+                    if (stack.size() < 1)
+                        return false;
+                    altstack.push_back(stacktop(-1));
+                    popstack(stack);
+                }
+                break;
+
+                case OP_FROMALTSTACK:
+                {
+                    if (altstack.size() < 1)
+                        return false;
+                    stack.push_back(altstacktop(-1));
+                    popstack(altstack);
+                }
+                break;
+
+                case OP_2DROP:
+                {
+                    // (x1 x2 -- )
+                    if (stack.size() < 2)
+                        return false;
+                    popstack(stack);
+                    popstack(stack);
+                }
+                break;
+
+                case OP_2DUP:
+                {
+                    // (x1 x2 -- x1 x2 x1 x2)
+                    if (stack.size() < 2)
+                        return false;
+                    valtype vch1 = stacktop(-2);
+                    valtype vch2 = stacktop(-1);
+                    stack.push_back(vch1);
+                    stack.push_back(vch2);
+                }
+                break;
+
+                case OP_3DUP:
+                {
+                    // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3)
+                    if (stack.size() < 3)
+                        return false;
+                    valtype vch1 = stacktop(-3);
+                    valtype vch2 = stacktop(-2);
+                    valtype vch3 = stacktop(-1);
+                    stack.push_back(vch1);
+                    stack.push_back(vch2);
+                    stack.push_back(vch3);
+                }
+                break;
+
+                case OP_2OVER:
+                {
+                    // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2)
+                    if (stack.size() < 4)
+                        return false;
+                    valtype vch1 = stacktop(-4);
+                    valtype vch2 = stacktop(-3);
+                    stack.push_back(vch1);
+                    stack.push_back(vch2);
+                }
+                break;
+
+                case OP_2ROT:
+                {
+                    // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2)
+                    if (stack.size() < 6)
+                        return false;
+                    valtype vch1 = stacktop(-6);
+                    valtype vch2 = stacktop(-5);
+                    stack.erase(stack.end()-6, stack.end()-4);
+                    stack.push_back(vch1);
+                    stack.push_back(vch2);
+                }
+                break;
+
+                case OP_2SWAP:
+                {
+                    // (x1 x2 x3 x4 -- x3 x4 x1 x2)
+                    if (stack.size() < 4)
+                        return false;
+                    swap(stacktop(-4), stacktop(-2));
+                    swap(stacktop(-3), stacktop(-1));
+                }
+                break;
+
+                case OP_IFDUP:
+                {
+                    // (x - 0 | x x)
+                    if (stack.size() < 1)
+                        return false;
+                    valtype vch = stacktop(-1);
+                    if (CastToBool(vch))
+                        stack.push_back(vch);
+                }
+                break;
+
+                case OP_DEPTH:
+                {
+                    // -- stacksize
+                    CScriptNum bn(stack.size());
+                    stack.push_back(bn.getvch());
+                }
+                break;
+
+                case OP_DROP:
+                {
+                    // (x -- )
+                    if (stack.size() < 1)
+                        return false;
+                    popstack(stack);
+                }
+                break;
+
+                case OP_DUP:
+                {
+                    // (x -- x x)
+                    if (stack.size() < 1)
+                        return false;
+                    valtype vch = stacktop(-1);
+                    stack.push_back(vch);
+                }
+                break;
+
+                case OP_NIP:
+                {
+                    // (x1 x2 -- x2)
+                    if (stack.size() < 2)
+                        return false;
+                    stack.erase(stack.end() - 2);
+                }
+                break;
+
+                case OP_OVER:
+                {
+                    // (x1 x2 -- x1 x2 x1)
+                    if (stack.size() < 2)
+                        return false;
+                    valtype vch = stacktop(-2);
+                    stack.push_back(vch);
+                }
+                break;
+
+                case OP_PICK:
+                case OP_ROLL:
+                {
+                    // (xn ... x2 x1 x0 n - xn ... x2 x1 x0 xn)
+                    // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
+                    if (stack.size() < 2)
+                        return false;
+                    int n = CScriptNum(stacktop(-1)).getint();
+                    popstack(stack);
+                    if (n < 0 || n >= (int)stack.size())
+                        return false;
+                    valtype vch = stacktop(-n-1);
+                    if (opcode == OP_ROLL)
+                        stack.erase(stack.end()-n-1);
+                    stack.push_back(vch);
+                }
+                break;
+
+                case OP_ROT:
+                {
+                    // (x1 x2 x3 -- x2 x3 x1)
+                    //  x2 x1 x3  after first swap
+                    //  x2 x3 x1  after second swap
+                    if (stack.size() < 3)
+                        return false;
+                    swap(stacktop(-3), stacktop(-2));
+                    swap(stacktop(-2), stacktop(-1));
+                }
+                break;
+
+                case OP_SWAP:
+                {
+                    // (x1 x2 -- x2 x1)
+                    if (stack.size() < 2)
+                        return false;
+                    swap(stacktop(-2), stacktop(-1));
+                }
+                break;
+
+                case OP_TUCK:
+                {
+                    // (x1 x2 -- x2 x1 x2)
+                    if (stack.size() < 2)
+                        return false;
+                    valtype vch = stacktop(-1);
+                    stack.insert(stack.end()-2, vch);
+                }
+                break;
+
+
+                case OP_SIZE:
+                {
+                    // (in -- in size)
+                    if (stack.size() < 1)
+                        return false;
+                    CScriptNum bn(stacktop(-1).size());
+                    stack.push_back(bn.getvch());
+                }
+                break;
+
+
+                //
+                // Bitwise logic
+                //
+                case OP_EQUAL:
+                case OP_EQUALVERIFY:
+                //case OP_NOTEQUAL: // use OP_NUMNOTEQUAL
+                {
+                    // (x1 x2 - bool)
+                    if (stack.size() < 2)
+                        return false;
+                    valtype& vch1 = stacktop(-2);
+                    valtype& vch2 = stacktop(-1);
+                    bool fEqual = (vch1 == vch2);
+                    // OP_NOTEQUAL is disabled because it would be too easy to say
+                    // something like n != 1 and have some wiseguy pass in 1 with extra
+                    // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001)
+                    //if (opcode == OP_NOTEQUAL)
+                    //    fEqual = !fEqual;
+                    popstack(stack);
+                    popstack(stack);
+                    stack.push_back(fEqual ? vchTrue : vchFalse);
+                    if (opcode == OP_EQUALVERIFY)
+                    {
+                        if (fEqual)
+                            popstack(stack);
+                        else
+                            return false;
+                    }
+                }
+                break;
+
+
+                //
+                // Numeric
+                //
+                case OP_1ADD:
+                case OP_1SUB:
+                case OP_NEGATE:
+                case OP_ABS:
+                case OP_NOT:
+                case OP_0NOTEQUAL:
+                {
+                    // (in -- out)
+                    if (stack.size() < 1)
+                        return false;
+                    CScriptNum bn(stacktop(-1));
+                    switch (opcode)
+                    {
+                    case OP_1ADD:       bn += bnOne; break;
+                    case OP_1SUB:       bn -= bnOne; break;
+                    case OP_NEGATE:     bn = -bn; break;
+                    case OP_ABS:        if (bn < bnZero) bn = -bn; break;
+                    case OP_NOT:        bn = (bn == bnZero); break;
+                    case OP_0NOTEQUAL:  bn = (bn != bnZero); break;
+                    default:            assert(!"invalid opcode"); break;
+                    }
+                    popstack(stack);
+                    stack.push_back(bn.getvch());
+                }
+                break;
+
+                case OP_ADD:
+                case OP_SUB:
+                case OP_BOOLAND:
+                case OP_BOOLOR:
+                case OP_NUMEQUAL:
+                case OP_NUMEQUALVERIFY:
+                case OP_NUMNOTEQUAL:
+                case OP_LESSTHAN:
+                case OP_GREATERTHAN:
+                case OP_LESSTHANOREQUAL:
+                case OP_GREATERTHANOREQUAL:
+                case OP_MIN:
+                case OP_MAX:
+                {
+                    // (x1 x2 -- out)
+                    if (stack.size() < 2)
+                        return false;
+                    CScriptNum bn1(stacktop(-2));
+                    CScriptNum bn2(stacktop(-1));
+                    CScriptNum bn(0);
+                    switch (opcode)
+                    {
+                    case OP_ADD:
+                        bn = bn1 + bn2;
+                        break;
+
+                    case OP_SUB:
+                        bn = bn1 - bn2;
+                        break;
+
+                    case OP_BOOLAND:             bn = (bn1 != bnZero && bn2 != bnZero); break;
+                    case OP_BOOLOR:              bn = (bn1 != bnZero || bn2 != bnZero); break;
+                    case OP_NUMEQUAL:            bn = (bn1 == bn2); break;
+                    case OP_NUMEQUALVERIFY:      bn = (bn1 == bn2); break;
+                    case OP_NUMNOTEQUAL:         bn = (bn1 != bn2); break;
+                    case OP_LESSTHAN:            bn = (bn1 < bn2); break;
+                    case OP_GREATERTHAN:         bn = (bn1 > bn2); break;
+                    case OP_LESSTHANOREQUAL:     bn = (bn1 <= bn2); break;
+                    case OP_GREATERTHANOREQUAL:  bn = (bn1 >= bn2); break;
+                    case OP_MIN:                 bn = (bn1 < bn2 ? bn1 : bn2); break;
+                    case OP_MAX:                 bn = (bn1 > bn2 ? bn1 : bn2); break;
+                    default:                     assert(!"invalid opcode"); break;
+                    }
+                    popstack(stack);
+                    popstack(stack);
+                    stack.push_back(bn.getvch());
+
+                    if (opcode == OP_NUMEQUALVERIFY)
+                    {
+                        if (CastToBool(stacktop(-1)))
+                            popstack(stack);
+                        else
+                            return false;
+                    }
+                }
+                break;
+
+                case OP_WITHIN:
+                {
+                    // (x min max -- out)
+                    if (stack.size() < 3)
+                        return false;
+                    CScriptNum bn1(stacktop(-3));
+                    CScriptNum bn2(stacktop(-2));
+                    CScriptNum bn3(stacktop(-1));
+                    bool fValue = (bn2 <= bn1 && bn1 < bn3);
+                    popstack(stack);
+                    popstack(stack);
+                    popstack(stack);
+                    stack.push_back(fValue ? vchTrue : vchFalse);
+                }
+                break;
+
+
+                //
+                // Crypto
+                //
+                case OP_RIPEMD160:
+                case OP_SHA1:
+                case OP_SHA256:
+                case OP_HASH160:
+                case OP_HASH256:
+                {
+                    // (in -- hash)
+                    if (stack.size() < 1)
+                        return false;
+                    valtype& vch = stacktop(-1);
+                    valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
+                    if (opcode == OP_RIPEMD160)
+                        CRIPEMD160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                    else if (opcode == OP_SHA1)
+                        CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                    else if (opcode == OP_SHA256)
+                        CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                    else if (opcode == OP_HASH160)
+                        CHash160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                    else if (opcode == OP_HASH256)
+                        CHash256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                    popstack(stack);
+                    stack.push_back(vchHash);
+                }
+                break;
+
+                case OP_CODESEPARATOR:
+                {
+                    // Hash starts after the code separator
+                    pbegincodehash = pc;
+                }
+                break;
+
+                case OP_CHECKSIG:
+                case OP_CHECKSIGVERIFY:
+                {
+                    // (sig pubkey -- bool)
+                    if (stack.size() < 2)
+                        return false;
+
+                    valtype& vchSig    = stacktop(-2);
+                    valtype& vchPubKey = stacktop(-1);
+
+                    // Subset of script starting at the most recent codeseparator
+                    CScript scriptCode(pbegincodehash, pend);
+
+                    // Drop the signature, since there's no way for a signature to sign itself
+                    scriptCode.FindAndDelete(CScript(vchSig));
+
+                    bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
+                        CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
+
+                    popstack(stack);
+                    popstack(stack);
+                    stack.push_back(fSuccess ? vchTrue : vchFalse);
+                    if (opcode == OP_CHECKSIGVERIFY)
+                    {
+                        if (fSuccess)
+                            popstack(stack);
+                        else
+                            return false;
+                    }
+                }
+                break;
+
+                case OP_CHECKMULTISIG:
+                case OP_CHECKMULTISIGVERIFY:
+                {
+                    // ([sig ...] num_of_signatures [pubkey ...] num_of_pubkeys -- bool)
+
+                    int i = 1;
+                    if ((int)stack.size() < i)
+                        return false;
+
+                    int nKeysCount = CScriptNum(stacktop(-i)).getint();
+                    if (nKeysCount < 0 || nKeysCount > 20)
+                        return false;
+                    nOpCount += nKeysCount;
+                    if (nOpCount > 201)
+                        return false;
+                    int ikey = ++i;
+                    i += nKeysCount;
+                    if ((int)stack.size() < i)
+                        return false;
+
+                    int nSigsCount = CScriptNum(stacktop(-i)).getint();
+                    if (nSigsCount < 0 || nSigsCount > nKeysCount)
+                        return false;
+                    int isig = ++i;
+                    i += nSigsCount;
+                    if ((int)stack.size() < i)
+                        return false;
+
+                    // Subset of script starting at the most recent codeseparator
+                    CScript scriptCode(pbegincodehash, pend);
+
+                    // Drop the signatures, since there's no way for a signature to sign itself
+                    for (int k = 0; k < nSigsCount; k++)
+                    {
+                        valtype& vchSig = stacktop(-isig-k);
+                        scriptCode.FindAndDelete(CScript(vchSig));
+                    }
+
+                    bool fSuccess = true;
+                    while (fSuccess && nSigsCount > 0)
+                    {
+                        valtype& vchSig    = stacktop(-isig);
+                        valtype& vchPubKey = stacktop(-ikey);
+
+                        // Check signature
+                        bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
+                            CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
+
+                        if (fOk) {
+                            isig++;
+                            nSigsCount--;
+                        }
+                        ikey++;
+                        nKeysCount--;
+
+                        // If there are more signatures left than keys left,
+                        // then too many signatures have failed
+                        if (nSigsCount > nKeysCount)
+                            fSuccess = false;
+                    }
+
+                    // Clean up stack of actual arguments
+                    while (i-- > 1)
+                        popstack(stack);
+
+                    // A bug causes CHECKMULTISIG to consume one extra argument
+                    // whose contents were not checked in any way.
+                    //
+                    // Unfortunately this is a potential source of mutability,
+                    // so optionally verify it is exactly equal to zero prior
+                    // to removing it from the stack.
+                    if (stack.size() < 1)
+                        return false;
+                    if ((flags & SCRIPT_VERIFY_NULLDUMMY) && stacktop(-1).size())
+                        return error("CHECKMULTISIG dummy argument not null");
+                    popstack(stack);
+
+                    stack.push_back(fSuccess ? vchTrue : vchFalse);
+
+                    if (opcode == OP_CHECKMULTISIGVERIFY)
+                    {
+                        if (fSuccess)
+                            popstack(stack);
+                        else
+                            return false;
+                    }
+                }
+                break;
+
+                default:
+                    return false;
+            }
+
+            // Size limits
+            if (stack.size() + altstack.size() > 1000)
+                return false;
+        }
+    }
+    catch (...)
+    {
+        return false;
+    }
+
+    if (!vfExec.empty())
+        return false;
+
+    return true;
+}
+
+namespace {
+
+/** Wrapper that serializes like CTransaction, but with the modifications
+ *  required for the signature hash done in-place
+ */
+class CTransactionSignatureSerializer {
+private:
+    const CTransaction &txTo;  // reference to the spending transaction (the one being serialized)
+    const CScript &scriptCode; // output script being consumed
+    const unsigned int nIn;    // input index of txTo being signed
+    const bool fAnyoneCanPay;  // whether the hashtype has the SIGHASH_ANYONECANPAY flag set
+    const bool fHashSingle;    // whether the hashtype is SIGHASH_SINGLE
+    const bool fHashNone;      // whether the hashtype is SIGHASH_NONE
+
+public:
+    CTransactionSignatureSerializer(const CTransaction &txToIn, const CScript &scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :
+        txTo(txToIn), scriptCode(scriptCodeIn), nIn(nInIn),
+        fAnyoneCanPay(!!(nHashTypeIn & SIGHASH_ANYONECANPAY)),
+        fHashSingle((nHashTypeIn & 0x1f) == SIGHASH_SINGLE),
+        fHashNone((nHashTypeIn & 0x1f) == SIGHASH_NONE) {}
+
+    /** Serialize the passed scriptCode, skipping OP_CODESEPARATORs */
+    template<typename S>
+    void SerializeScriptCode(S &s, int nType, int nVersion) const {
+        CScript::const_iterator it = scriptCode.begin();
+        CScript::const_iterator itBegin = it;
+        opcodetype opcode;
+        unsigned int nCodeSeparators = 0;
+        while (scriptCode.GetOp(it, opcode)) {
+            if (opcode == OP_CODESEPARATOR)
+                nCodeSeparators++;
+        }
+        ::WriteCompactSize(s, scriptCode.size() - nCodeSeparators);
+        it = itBegin;
+        while (scriptCode.GetOp(it, opcode)) {
+            if (opcode == OP_CODESEPARATOR) {
+                s.write((char*)&itBegin[0], it-itBegin-1);
+                itBegin = it;
+            }
+        }
+        s.write((char*)&itBegin[0], it-itBegin);
+    }
+
+    /** Serialize an input of txTo */
+    template<typename S>
+    void SerializeInput(S &s, unsigned int nInput, int nType, int nVersion) const {
+        // In case of SIGHASH_ANYONECANPAY, only the input being signed is serialized
+        if (fAnyoneCanPay)
+            nInput = nIn;
+        // Serialize the prevout
+        ::Serialize(s, txTo.vin[nInput].prevout, nType, nVersion);
+        // Serialize the script
+        if (nInput != nIn)
+            // Blank out other inputs' signatures
+            ::Serialize(s, CScript(), nType, nVersion);
+        else
+            SerializeScriptCode(s, nType, nVersion);
+        // Serialize the nSequence
+        if (nInput != nIn && (fHashSingle || fHashNone))
+            // let the others update at will
+            ::Serialize(s, (int)0, nType, nVersion);
+        else
+            ::Serialize(s, txTo.vin[nInput].nSequence, nType, nVersion);
+    }
+
+    /** Serialize an output of txTo */
+    template<typename S>
+    void SerializeOutput(S &s, unsigned int nOutput, int nType, int nVersion) const {
+        if (fHashSingle && nOutput != nIn)
+            // Do not lock-in the txout payee at other indices as txin
+            ::Serialize(s, CTxOut(), nType, nVersion);
+        else
+            ::Serialize(s, txTo.vout[nOutput], nType, nVersion);
+    }
+
+    /** Serialize txTo */
+    template<typename S>
+    void Serialize(S &s, int nType, int nVersion) const {
+        // Serialize nVersion
+        ::Serialize(s, txTo.nVersion, nType, nVersion);
+        // Serialize vin
+        unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size();
+        ::WriteCompactSize(s, nInputs);
+        for (unsigned int nInput = 0; nInput < nInputs; nInput++)
+             SerializeInput(s, nInput, nType, nVersion);
+        // Serialize vout
+        unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size());
+        ::WriteCompactSize(s, nOutputs);
+        for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
+             SerializeOutput(s, nOutput, nType, nVersion);
+        // Serialie nLockTime
+        ::Serialize(s, txTo.nLockTime, nType, nVersion);
+    }
+};
+
+} // anon namespace
+
+uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
+{
+    if (nIn >= txTo.vin.size()) {
+        LogPrintf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn);
+        return 1;
+    }
+
+    // Check for invalid use of SIGHASH_SINGLE
+    if ((nHashType & 0x1f) == SIGHASH_SINGLE) {
+        if (nIn >= txTo.vout.size()) {
+            LogPrintf("ERROR: SignatureHash() : nOut=%d out of range\n", nIn);
+            return 1;
+        }
+    }
+
+    // Wrapper to serialize only the necessary parts of the transaction being signed
+    CTransactionSignatureSerializer txTmp(txTo, scriptCode, nIn, nHashType);
+
+    // Serialize and hash
+    CHashWriter ss(SER_GETHASH, 0);
+    ss << txTmp << nHashType;
+    return ss.GetHash();
+}
+
+// Valid signature cache, to avoid doing expensive ECDSA signature checking
+// twice for every transaction (once when accepted into memory pool, and
+// again when accepted into the block chain)
+class CSignatureCache
+{
+private:
+     // sigdata_type is (signature hash, signature, public key):
+    typedef boost::tuple<uint256, std::vector<unsigned char>, CPubKey> sigdata_type;
+    std::set< sigdata_type> setValid;
+    boost::shared_mutex cs_sigcache;
+
+public:
+    bool
+    Get(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
+    {
+        boost::shared_lock<boost::shared_mutex> lock(cs_sigcache);
+
+        sigdata_type k(hash, vchSig, pubKey);
+        std::set<sigdata_type>::iterator mi = setValid.find(k);
+        if (mi != setValid.end())
+            return true;
+        return false;
+    }
+
+    void Set(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
+    {
+        // DoS prevention: limit cache size to less than 10MB
+        // (~200 bytes per cache entry times 50,000 entries)
+        // Since there are a maximum of 20,000 signature operations per block
+        // 50,000 is a reasonable default.
+        int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 50000);
+        if (nMaxCacheSize <= 0) return;
+
+        boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
+
+        while (static_cast<int64_t>(setValid.size()) > nMaxCacheSize)
+        {
+            // Evict a random entry. Random because that helps
+            // foil would-be DoS attackers who might try to pre-generate
+            // and re-use a set of valid signatures just-slightly-greater
+            // than our cache size.
+            uint256 randomHash = GetRandHash();
+            std::vector<unsigned char> unused;
+            std::set<sigdata_type>::iterator it =
+                setValid.lower_bound(sigdata_type(randomHash, unused, unused));
+            if (it == setValid.end())
+                it = setValid.begin();
+            setValid.erase(*it);
+        }
+
+        sigdata_type k(hash, vchSig, pubKey);
+        setValid.insert(k);
+    }
+};
+
+bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags)
+{
+    static CSignatureCache signatureCache;
+
+    CPubKey pubkey(vchPubKey);
+    if (!pubkey.IsValid())
+        return false;
+
+    // Hash type is one byte tacked on to the end of the signature
+    if (vchSig.empty())
+        return false;
+    if (nHashType == 0)
+        nHashType = vchSig.back();
+    else if (nHashType != vchSig.back())
+        return false;
+    vchSig.pop_back();
+
+    uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
+
+    if (signatureCache.Get(sighash, vchSig, pubkey))
+        return true;
+
+    if (!pubkey.Verify(sighash, vchSig))
+        return false;
+
+    if (!(flags & SCRIPT_VERIFY_NOCACHE))
+        signatureCache.Set(sighash, vchSig, pubkey);
+
+    return true;
+}
+
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+                  unsigned int flags, int nHashType)
+{
+    vector<vector<unsigned char> > stack, stackCopy;
+    if (!EvalScript(stack, scriptSig, txTo, nIn, flags, nHashType))
+        return false;
+    if (flags & SCRIPT_VERIFY_P2SH)
+        stackCopy = stack;
+    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, nHashType))
+        return false;
+    if (stack.empty())
+        return false;
+
+    if (CastToBool(stack.back()) == false)
+        return false;
+
+    // Additional validation for spend-to-script-hash transactions:
+    if ((flags & SCRIPT_VERIFY_P2SH) && scriptPubKey.IsPayToScriptHash())
+    {
+        if (!scriptSig.IsPushOnly()) // scriptSig must be literals-only
+            return false;            // or validation fails
+
+        // stackCopy cannot be empty here, because if it was the
+        // P2SH  HASH <> EQUAL  scriptPubKey would be evaluated with
+        // an empty stack and the EvalScript above would return false.
+        assert(!stackCopy.empty());
+
+        const valtype& pubKeySerialized = stackCopy.back();
+        CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
+        popstack(stackCopy);
+
+        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, nHashType))
+            return false;
+        if (stackCopy.empty())
+            return false;
+        return CastToBool(stackCopy.back());
+    }
+
+    return true;
+}
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
new file mode 100644
index 000000000000..0c6f8b9d134a
--- /dev/null
+++ b/src/script/interpreter.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT_INTERPRETER
+#define H_BITCOIN_SCRIPT_INTERPRETER
+
+#include <vector>
+#include <stdint.h>
+#include <string>
+
+class uint256;
+class CScript;
+class CTransaction;
+
+/** Signature hash types/flags */
+enum
+{
+    SIGHASH_ALL = 1,
+    SIGHASH_NONE = 2,
+    SIGHASH_SINGLE = 3,
+    SIGHASH_ANYONECANPAY = 0x80,
+};
+
+/** Script verification flags */
+enum
+{
+    SCRIPT_VERIFY_NONE      = 0,
+    SCRIPT_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
+    SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
+    SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC)
+    SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
+    SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
+};
+
+bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
+bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
+
+uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
+bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
+
+#endif
diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index 56edc2c2dd32..fb3766ab158d 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -5,67 +5,17 @@
 
 #include "scriptutils.h"
 
-#include "crypto/ripemd160.h"
-#include "crypto/sha1.h"
-#include "crypto/sha2.h"
 #include "core.h"
-#include "hash.h"
 #include "key.h"
 #include "keystore.h"
-#include "random.h"
-#include "sync.h"
 #include "uint256.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
-#include <boost/thread.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
 
 using namespace std;
-using namespace boost;
 
 typedef vector<unsigned char> valtype;
-static const valtype vchFalse(0);
-static const valtype vchZero(0);
-static const valtype vchTrue(1, 1);
-static const CScriptNum bnZero(0);
-static const CScriptNum bnOne(1);
-static const CScriptNum bnFalse(0);
-static const CScriptNum bnTrue(1);
-
-bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
-
-bool CastToBool(const valtype& vch)
-{
-    for (unsigned int i = 0; i < vch.size(); i++)
-    {
-        if (vch[i] != 0)
-        {
-            // Can be negative zero
-            if (i == vch.size()-1 && vch[i] == 0x80)
-                return false;
-            return true;
-        }
-    }
-    return false;
-}
-
-
-
-//
-// Script is a stack machine (like Forth) that evaluates a predicate
-// returning a bool indicating valid or not.  There are no loops.
-//
-#define stacktop(i)  (stack.at(stack.size()+(i)))
-#define altstacktop(i)  (altstack.at(altstack.size()+(i)))
-static inline void popstack(vector<valtype>& stack)
-{
-    if (stack.empty())
-        throw runtime_error("popstack() : stack empty");
-    stack.pop_back();
-}
-
 
 const char* GetTxnOutputType(txnouttype t)
 {
@@ -81,972 +31,6 @@ const char* GetTxnOutputType(txnouttype t)
     return NULL;
 }
 
-bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
-    if (!(flags & SCRIPT_VERIFY_STRICTENC))
-        return true;
-
-    if (vchPubKey.size() < 33)
-        return error("Non-canonical public key: too short");
-    if (vchPubKey[0] == 0x04) {
-        if (vchPubKey.size() != 65)
-            return error("Non-canonical public key: invalid length for uncompressed key");
-    } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) {
-        if (vchPubKey.size() != 33)
-            return error("Non-canonical public key: invalid length for compressed key");
-    } else {
-        return error("Non-canonical public key: neither compressed nor uncompressed");
-    }
-    return true;
-}
-
-bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
-    if (!(flags & SCRIPT_VERIFY_STRICTENC))
-        return true;
-
-    // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
-    // A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
-    // Where R and S are not negative (their first byte has its highest bit not set), and not
-    // excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
-    // in which case a single 0 byte is necessary and even required).
-    if (vchSig.size() < 9)
-        return error("Non-canonical signature: too short");
-    if (vchSig.size() > 73)
-        return error("Non-canonical signature: too long");
-    unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
-    if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
-        return error("Non-canonical signature: unknown hashtype byte");
-    if (vchSig[0] != 0x30)
-        return error("Non-canonical signature: wrong type");
-    if (vchSig[1] != vchSig.size()-3)
-        return error("Non-canonical signature: wrong length marker");
-    unsigned int nLenR = vchSig[3];
-    if (5 + nLenR >= vchSig.size())
-        return error("Non-canonical signature: S length misplaced");
-    unsigned int nLenS = vchSig[5+nLenR];
-    if ((unsigned long)(nLenR+nLenS+7) != vchSig.size())
-        return error("Non-canonical signature: R+S length mismatch");
-
-    const unsigned char *R = &vchSig[4];
-    if (R[-2] != 0x02)
-        return error("Non-canonical signature: R value type mismatch");
-    if (nLenR == 0)
-        return error("Non-canonical signature: R length is zero");
-    if (R[0] & 0x80)
-        return error("Non-canonical signature: R value negative");
-    if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80))
-        return error("Non-canonical signature: R value excessively padded");
-
-    const unsigned char *S = &vchSig[6+nLenR];
-    if (S[-2] != 0x02)
-        return error("Non-canonical signature: S value type mismatch");
-    if (nLenS == 0)
-        return error("Non-canonical signature: S length is zero");
-    if (S[0] & 0x80)
-        return error("Non-canonical signature: S value negative");
-    if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80))
-        return error("Non-canonical signature: S value excessively padded");
-
-    if (flags & SCRIPT_VERIFY_LOW_S) {
-        // If the S value is above the order of the curve divided by two, its
-        // complement modulo the order could have been used instead, which is
-        // one byte shorter when encoded correctly.
-        if (!CKey::CheckSignatureElement(S, nLenS, true))
-            return error("Non-canonical signature: S value is unnecessarily high");
-    }
-
-    return true;
-}
-
-bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
-{
-    CScript::const_iterator pc = script.begin();
-    CScript::const_iterator pend = script.end();
-    CScript::const_iterator pbegincodehash = script.begin();
-    opcodetype opcode;
-    valtype vchPushValue;
-    vector<bool> vfExec;
-    vector<valtype> altstack;
-    if (script.size() > 10000)
-        return false;
-    int nOpCount = 0;
-
-    try
-    {
-        while (pc < pend)
-        {
-            bool fExec = !count(vfExec.begin(), vfExec.end(), false);
-
-            //
-            // Read instruction
-            //
-            if (!script.GetOp(pc, opcode, vchPushValue))
-                return false;
-            if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
-                return false;
-
-            // Note how OP_RESERVED does not count towards the opcode limit.
-            if (opcode > OP_16 && ++nOpCount > 201)
-                return false;
-
-            if (opcode == OP_CAT ||
-                opcode == OP_SUBSTR ||
-                opcode == OP_LEFT ||
-                opcode == OP_RIGHT ||
-                opcode == OP_INVERT ||
-                opcode == OP_AND ||
-                opcode == OP_OR ||
-                opcode == OP_XOR ||
-                opcode == OP_2MUL ||
-                opcode == OP_2DIV ||
-                opcode == OP_MUL ||
-                opcode == OP_DIV ||
-                opcode == OP_MOD ||
-                opcode == OP_LSHIFT ||
-                opcode == OP_RSHIFT)
-                return false; // Disabled opcodes.
-
-            if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4)
-                stack.push_back(vchPushValue);
-            else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
-            switch (opcode)
-            {
-                //
-                // Push value
-                //
-                case OP_1NEGATE:
-                case OP_1:
-                case OP_2:
-                case OP_3:
-                case OP_4:
-                case OP_5:
-                case OP_6:
-                case OP_7:
-                case OP_8:
-                case OP_9:
-                case OP_10:
-                case OP_11:
-                case OP_12:
-                case OP_13:
-                case OP_14:
-                case OP_15:
-                case OP_16:
-                {
-                    // ( -- value)
-                    CScriptNum bn((int)opcode - (int)(OP_1 - 1));
-                    stack.push_back(bn.getvch());
-                }
-                break;
-
-
-                //
-                // Control
-                //
-                case OP_NOP:
-                case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5:
-                case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10:
-                break;
-
-                case OP_IF:
-                case OP_NOTIF:
-                {
-                    // <expression> if [statements] [else [statements]] endif
-                    bool fValue = false;
-                    if (fExec)
-                    {
-                        if (stack.size() < 1)
-                            return false;
-                        valtype& vch = stacktop(-1);
-                        fValue = CastToBool(vch);
-                        if (opcode == OP_NOTIF)
-                            fValue = !fValue;
-                        popstack(stack);
-                    }
-                    vfExec.push_back(fValue);
-                }
-                break;
-
-                case OP_ELSE:
-                {
-                    if (vfExec.empty())
-                        return false;
-                    vfExec.back() = !vfExec.back();
-                }
-                break;
-
-                case OP_ENDIF:
-                {
-                    if (vfExec.empty())
-                        return false;
-                    vfExec.pop_back();
-                }
-                break;
-
-                case OP_VERIFY:
-                {
-                    // (true -- ) or
-                    // (false -- false) and return
-                    if (stack.size() < 1)
-                        return false;
-                    bool fValue = CastToBool(stacktop(-1));
-                    if (fValue)
-                        popstack(stack);
-                    else
-                        return false;
-                }
-                break;
-
-                case OP_RETURN:
-                {
-                    return false;
-                }
-                break;
-
-
-                //
-                // Stack ops
-                //
-                case OP_TOALTSTACK:
-                {
-                    if (stack.size() < 1)
-                        return false;
-                    altstack.push_back(stacktop(-1));
-                    popstack(stack);
-                }
-                break;
-
-                case OP_FROMALTSTACK:
-                {
-                    if (altstack.size() < 1)
-                        return false;
-                    stack.push_back(altstacktop(-1));
-                    popstack(altstack);
-                }
-                break;
-
-                case OP_2DROP:
-                {
-                    // (x1 x2 -- )
-                    if (stack.size() < 2)
-                        return false;
-                    popstack(stack);
-                    popstack(stack);
-                }
-                break;
-
-                case OP_2DUP:
-                {
-                    // (x1 x2 -- x1 x2 x1 x2)
-                    if (stack.size() < 2)
-                        return false;
-                    valtype vch1 = stacktop(-2);
-                    valtype vch2 = stacktop(-1);
-                    stack.push_back(vch1);
-                    stack.push_back(vch2);
-                }
-                break;
-
-                case OP_3DUP:
-                {
-                    // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3)
-                    if (stack.size() < 3)
-                        return false;
-                    valtype vch1 = stacktop(-3);
-                    valtype vch2 = stacktop(-2);
-                    valtype vch3 = stacktop(-1);
-                    stack.push_back(vch1);
-                    stack.push_back(vch2);
-                    stack.push_back(vch3);
-                }
-                break;
-
-                case OP_2OVER:
-                {
-                    // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2)
-                    if (stack.size() < 4)
-                        return false;
-                    valtype vch1 = stacktop(-4);
-                    valtype vch2 = stacktop(-3);
-                    stack.push_back(vch1);
-                    stack.push_back(vch2);
-                }
-                break;
-
-                case OP_2ROT:
-                {
-                    // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2)
-                    if (stack.size() < 6)
-                        return false;
-                    valtype vch1 = stacktop(-6);
-                    valtype vch2 = stacktop(-5);
-                    stack.erase(stack.end()-6, stack.end()-4);
-                    stack.push_back(vch1);
-                    stack.push_back(vch2);
-                }
-                break;
-
-                case OP_2SWAP:
-                {
-                    // (x1 x2 x3 x4 -- x3 x4 x1 x2)
-                    if (stack.size() < 4)
-                        return false;
-                    swap(stacktop(-4), stacktop(-2));
-                    swap(stacktop(-3), stacktop(-1));
-                }
-                break;
-
-                case OP_IFDUP:
-                {
-                    // (x - 0 | x x)
-                    if (stack.size() < 1)
-                        return false;
-                    valtype vch = stacktop(-1);
-                    if (CastToBool(vch))
-                        stack.push_back(vch);
-                }
-                break;
-
-                case OP_DEPTH:
-                {
-                    // -- stacksize
-                    CScriptNum bn(stack.size());
-                    stack.push_back(bn.getvch());
-                }
-                break;
-
-                case OP_DROP:
-                {
-                    // (x -- )
-                    if (stack.size() < 1)
-                        return false;
-                    popstack(stack);
-                }
-                break;
-
-                case OP_DUP:
-                {
-                    // (x -- x x)
-                    if (stack.size() < 1)
-                        return false;
-                    valtype vch = stacktop(-1);
-                    stack.push_back(vch);
-                }
-                break;
-
-                case OP_NIP:
-                {
-                    // (x1 x2 -- x2)
-                    if (stack.size() < 2)
-                        return false;
-                    stack.erase(stack.end() - 2);
-                }
-                break;
-
-                case OP_OVER:
-                {
-                    // (x1 x2 -- x1 x2 x1)
-                    if (stack.size() < 2)
-                        return false;
-                    valtype vch = stacktop(-2);
-                    stack.push_back(vch);
-                }
-                break;
-
-                case OP_PICK:
-                case OP_ROLL:
-                {
-                    // (xn ... x2 x1 x0 n - xn ... x2 x1 x0 xn)
-                    // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
-                    if (stack.size() < 2)
-                        return false;
-                    int n = CScriptNum(stacktop(-1)).getint();
-                    popstack(stack);
-                    if (n < 0 || n >= (int)stack.size())
-                        return false;
-                    valtype vch = stacktop(-n-1);
-                    if (opcode == OP_ROLL)
-                        stack.erase(stack.end()-n-1);
-                    stack.push_back(vch);
-                }
-                break;
-
-                case OP_ROT:
-                {
-                    // (x1 x2 x3 -- x2 x3 x1)
-                    //  x2 x1 x3  after first swap
-                    //  x2 x3 x1  after second swap
-                    if (stack.size() < 3)
-                        return false;
-                    swap(stacktop(-3), stacktop(-2));
-                    swap(stacktop(-2), stacktop(-1));
-                }
-                break;
-
-                case OP_SWAP:
-                {
-                    // (x1 x2 -- x2 x1)
-                    if (stack.size() < 2)
-                        return false;
-                    swap(stacktop(-2), stacktop(-1));
-                }
-                break;
-
-                case OP_TUCK:
-                {
-                    // (x1 x2 -- x2 x1 x2)
-                    if (stack.size() < 2)
-                        return false;
-                    valtype vch = stacktop(-1);
-                    stack.insert(stack.end()-2, vch);
-                }
-                break;
-
-
-                case OP_SIZE:
-                {
-                    // (in -- in size)
-                    if (stack.size() < 1)
-                        return false;
-                    CScriptNum bn(stacktop(-1).size());
-                    stack.push_back(bn.getvch());
-                }
-                break;
-
-
-                //
-                // Bitwise logic
-                //
-                case OP_EQUAL:
-                case OP_EQUALVERIFY:
-                //case OP_NOTEQUAL: // use OP_NUMNOTEQUAL
-                {
-                    // (x1 x2 - bool)
-                    if (stack.size() < 2)
-                        return false;
-                    valtype& vch1 = stacktop(-2);
-                    valtype& vch2 = stacktop(-1);
-                    bool fEqual = (vch1 == vch2);
-                    // OP_NOTEQUAL is disabled because it would be too easy to say
-                    // something like n != 1 and have some wiseguy pass in 1 with extra
-                    // zero bytes after it (numerically, 0x01 == 0x0001 == 0x000001)
-                    //if (opcode == OP_NOTEQUAL)
-                    //    fEqual = !fEqual;
-                    popstack(stack);
-                    popstack(stack);
-                    stack.push_back(fEqual ? vchTrue : vchFalse);
-                    if (opcode == OP_EQUALVERIFY)
-                    {
-                        if (fEqual)
-                            popstack(stack);
-                        else
-                            return false;
-                    }
-                }
-                break;
-
-
-                //
-                // Numeric
-                //
-                case OP_1ADD:
-                case OP_1SUB:
-                case OP_NEGATE:
-                case OP_ABS:
-                case OP_NOT:
-                case OP_0NOTEQUAL:
-                {
-                    // (in -- out)
-                    if (stack.size() < 1)
-                        return false;
-                    CScriptNum bn(stacktop(-1));
-                    switch (opcode)
-                    {
-                    case OP_1ADD:       bn += bnOne; break;
-                    case OP_1SUB:       bn -= bnOne; break;
-                    case OP_NEGATE:     bn = -bn; break;
-                    case OP_ABS:        if (bn < bnZero) bn = -bn; break;
-                    case OP_NOT:        bn = (bn == bnZero); break;
-                    case OP_0NOTEQUAL:  bn = (bn != bnZero); break;
-                    default:            assert(!"invalid opcode"); break;
-                    }
-                    popstack(stack);
-                    stack.push_back(bn.getvch());
-                }
-                break;
-
-                case OP_ADD:
-                case OP_SUB:
-                case OP_BOOLAND:
-                case OP_BOOLOR:
-                case OP_NUMEQUAL:
-                case OP_NUMEQUALVERIFY:
-                case OP_NUMNOTEQUAL:
-                case OP_LESSTHAN:
-                case OP_GREATERTHAN:
-                case OP_LESSTHANOREQUAL:
-                case OP_GREATERTHANOREQUAL:
-                case OP_MIN:
-                case OP_MAX:
-                {
-                    // (x1 x2 -- out)
-                    if (stack.size() < 2)
-                        return false;
-                    CScriptNum bn1(stacktop(-2));
-                    CScriptNum bn2(stacktop(-1));
-                    CScriptNum bn(0);
-                    switch (opcode)
-                    {
-                    case OP_ADD:
-                        bn = bn1 + bn2;
-                        break;
-
-                    case OP_SUB:
-                        bn = bn1 - bn2;
-                        break;
-
-                    case OP_BOOLAND:             bn = (bn1 != bnZero && bn2 != bnZero); break;
-                    case OP_BOOLOR:              bn = (bn1 != bnZero || bn2 != bnZero); break;
-                    case OP_NUMEQUAL:            bn = (bn1 == bn2); break;
-                    case OP_NUMEQUALVERIFY:      bn = (bn1 == bn2); break;
-                    case OP_NUMNOTEQUAL:         bn = (bn1 != bn2); break;
-                    case OP_LESSTHAN:            bn = (bn1 < bn2); break;
-                    case OP_GREATERTHAN:         bn = (bn1 > bn2); break;
-                    case OP_LESSTHANOREQUAL:     bn = (bn1 <= bn2); break;
-                    case OP_GREATERTHANOREQUAL:  bn = (bn1 >= bn2); break;
-                    case OP_MIN:                 bn = (bn1 < bn2 ? bn1 : bn2); break;
-                    case OP_MAX:                 bn = (bn1 > bn2 ? bn1 : bn2); break;
-                    default:                     assert(!"invalid opcode"); break;
-                    }
-                    popstack(stack);
-                    popstack(stack);
-                    stack.push_back(bn.getvch());
-
-                    if (opcode == OP_NUMEQUALVERIFY)
-                    {
-                        if (CastToBool(stacktop(-1)))
-                            popstack(stack);
-                        else
-                            return false;
-                    }
-                }
-                break;
-
-                case OP_WITHIN:
-                {
-                    // (x min max -- out)
-                    if (stack.size() < 3)
-                        return false;
-                    CScriptNum bn1(stacktop(-3));
-                    CScriptNum bn2(stacktop(-2));
-                    CScriptNum bn3(stacktop(-1));
-                    bool fValue = (bn2 <= bn1 && bn1 < bn3);
-                    popstack(stack);
-                    popstack(stack);
-                    popstack(stack);
-                    stack.push_back(fValue ? vchTrue : vchFalse);
-                }
-                break;
-
-
-                //
-                // Crypto
-                //
-                case OP_RIPEMD160:
-                case OP_SHA1:
-                case OP_SHA256:
-                case OP_HASH160:
-                case OP_HASH256:
-                {
-                    // (in -- hash)
-                    if (stack.size() < 1)
-                        return false;
-                    valtype& vch = stacktop(-1);
-                    valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
-                    if (opcode == OP_RIPEMD160)
-                        CRIPEMD160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
-                    else if (opcode == OP_SHA1)
-                        CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
-                    else if (opcode == OP_SHA256)
-                        CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
-                    else if (opcode == OP_HASH160)
-                        CHash160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
-                    else if (opcode == OP_HASH256)
-                        CHash256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
-                    popstack(stack);
-                    stack.push_back(vchHash);
-                }
-                break;
-
-                case OP_CODESEPARATOR:
-                {
-                    // Hash starts after the code separator
-                    pbegincodehash = pc;
-                }
-                break;
-
-                case OP_CHECKSIG:
-                case OP_CHECKSIGVERIFY:
-                {
-                    // (sig pubkey -- bool)
-                    if (stack.size() < 2)
-                        return false;
-
-                    valtype& vchSig    = stacktop(-2);
-                    valtype& vchPubKey = stacktop(-1);
-
-                    // Subset of script starting at the most recent codeseparator
-                    CScript scriptCode(pbegincodehash, pend);
-
-                    // Drop the signature, since there's no way for a signature to sign itself
-                    scriptCode.FindAndDelete(CScript(vchSig));
-
-                    bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                        CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
-
-                    popstack(stack);
-                    popstack(stack);
-                    stack.push_back(fSuccess ? vchTrue : vchFalse);
-                    if (opcode == OP_CHECKSIGVERIFY)
-                    {
-                        if (fSuccess)
-                            popstack(stack);
-                        else
-                            return false;
-                    }
-                }
-                break;
-
-                case OP_CHECKMULTISIG:
-                case OP_CHECKMULTISIGVERIFY:
-                {
-                    // ([sig ...] num_of_signatures [pubkey ...] num_of_pubkeys -- bool)
-
-                    int i = 1;
-                    if ((int)stack.size() < i)
-                        return false;
-
-                    int nKeysCount = CScriptNum(stacktop(-i)).getint();
-                    if (nKeysCount < 0 || nKeysCount > 20)
-                        return false;
-                    nOpCount += nKeysCount;
-                    if (nOpCount > 201)
-                        return false;
-                    int ikey = ++i;
-                    i += nKeysCount;
-                    if ((int)stack.size() < i)
-                        return false;
-
-                    int nSigsCount = CScriptNum(stacktop(-i)).getint();
-                    if (nSigsCount < 0 || nSigsCount > nKeysCount)
-                        return false;
-                    int isig = ++i;
-                    i += nSigsCount;
-                    if ((int)stack.size() < i)
-                        return false;
-
-                    // Subset of script starting at the most recent codeseparator
-                    CScript scriptCode(pbegincodehash, pend);
-
-                    // Drop the signatures, since there's no way for a signature to sign itself
-                    for (int k = 0; k < nSigsCount; k++)
-                    {
-                        valtype& vchSig = stacktop(-isig-k);
-                        scriptCode.FindAndDelete(CScript(vchSig));
-                    }
-
-                    bool fSuccess = true;
-                    while (fSuccess && nSigsCount > 0)
-                    {
-                        valtype& vchSig    = stacktop(-isig);
-                        valtype& vchPubKey = stacktop(-ikey);
-
-                        // Check signature
-                        bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                            CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
-
-                        if (fOk) {
-                            isig++;
-                            nSigsCount--;
-                        }
-                        ikey++;
-                        nKeysCount--;
-
-                        // If there are more signatures left than keys left,
-                        // then too many signatures have failed
-                        if (nSigsCount > nKeysCount)
-                            fSuccess = false;
-                    }
-
-                    // Clean up stack of actual arguments
-                    while (i-- > 1)
-                        popstack(stack);
-
-                    // A bug causes CHECKMULTISIG to consume one extra argument
-                    // whose contents were not checked in any way.
-                    //
-                    // Unfortunately this is a potential source of mutability,
-                    // so optionally verify it is exactly equal to zero prior
-                    // to removing it from the stack.
-                    if (stack.size() < 1)
-                        return false;
-                    if ((flags & SCRIPT_VERIFY_NULLDUMMY) && stacktop(-1).size())
-                        return error("CHECKMULTISIG dummy argument not null");
-                    popstack(stack);
-
-                    stack.push_back(fSuccess ? vchTrue : vchFalse);
-
-                    if (opcode == OP_CHECKMULTISIGVERIFY)
-                    {
-                        if (fSuccess)
-                            popstack(stack);
-                        else
-                            return false;
-                    }
-                }
-                break;
-
-                default:
-                    return false;
-            }
-
-            // Size limits
-            if (stack.size() + altstack.size() > 1000)
-                return false;
-        }
-    }
-    catch (...)
-    {
-        return false;
-    }
-
-
-    if (!vfExec.empty())
-        return false;
-
-    return true;
-}
-
-
-
-
-
-
-
-namespace {
-
-/** Wrapper that serializes like CTransaction, but with the modifications
- *  required for the signature hash done in-place
- */
-class CTransactionSignatureSerializer {
-private:
-    const CTransaction &txTo;  // reference to the spending transaction (the one being serialized)
-    const CScript &scriptCode; // output script being consumed
-    const unsigned int nIn;    // input index of txTo being signed
-    const bool fAnyoneCanPay;  // whether the hashtype has the SIGHASH_ANYONECANPAY flag set
-    const bool fHashSingle;    // whether the hashtype is SIGHASH_SINGLE
-    const bool fHashNone;      // whether the hashtype is SIGHASH_NONE
-
-public:
-    CTransactionSignatureSerializer(const CTransaction &txToIn, const CScript &scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :
-        txTo(txToIn), scriptCode(scriptCodeIn), nIn(nInIn),
-        fAnyoneCanPay(!!(nHashTypeIn & SIGHASH_ANYONECANPAY)),
-        fHashSingle((nHashTypeIn & 0x1f) == SIGHASH_SINGLE),
-        fHashNone((nHashTypeIn & 0x1f) == SIGHASH_NONE) {}
-
-    /** Serialize the passed scriptCode, skipping OP_CODESEPARATORs */
-    template<typename S>
-    void SerializeScriptCode(S &s, int nType, int nVersion) const {
-        CScript::const_iterator it = scriptCode.begin();
-        CScript::const_iterator itBegin = it;
-        opcodetype opcode;
-        unsigned int nCodeSeparators = 0;
-        while (scriptCode.GetOp(it, opcode)) {
-            if (opcode == OP_CODESEPARATOR)
-                nCodeSeparators++;
-        }
-        ::WriteCompactSize(s, scriptCode.size() - nCodeSeparators);
-        it = itBegin;
-        while (scriptCode.GetOp(it, opcode)) {
-            if (opcode == OP_CODESEPARATOR) {
-                s.write((char*)&itBegin[0], it-itBegin-1);
-                itBegin = it;
-            }
-        }
-        s.write((char*)&itBegin[0], it-itBegin);
-    }
-
-    /** Serialize an input of txTo */
-    template<typename S>
-    void SerializeInput(S &s, unsigned int nInput, int nType, int nVersion) const {
-        // In case of SIGHASH_ANYONECANPAY, only the input being signed is serialized
-        if (fAnyoneCanPay)
-            nInput = nIn;
-        // Serialize the prevout
-        ::Serialize(s, txTo.vin[nInput].prevout, nType, nVersion);
-        // Serialize the script
-        if (nInput != nIn)
-            // Blank out other inputs' signatures
-            ::Serialize(s, CScript(), nType, nVersion);
-        else
-            SerializeScriptCode(s, nType, nVersion);
-        // Serialize the nSequence
-        if (nInput != nIn && (fHashSingle || fHashNone))
-            // let the others update at will
-            ::Serialize(s, (int)0, nType, nVersion);
-        else
-            ::Serialize(s, txTo.vin[nInput].nSequence, nType, nVersion);
-    }
-
-    /** Serialize an output of txTo */
-    template<typename S>
-    void SerializeOutput(S &s, unsigned int nOutput, int nType, int nVersion) const {
-        if (fHashSingle && nOutput != nIn)
-            // Do not lock-in the txout payee at other indices as txin
-            ::Serialize(s, CTxOut(), nType, nVersion);
-        else
-            ::Serialize(s, txTo.vout[nOutput], nType, nVersion);
-    }
-
-    /** Serialize txTo */
-    template<typename S>
-    void Serialize(S &s, int nType, int nVersion) const {
-        // Serialize nVersion
-        ::Serialize(s, txTo.nVersion, nType, nVersion);
-        // Serialize vin
-        unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size();
-        ::WriteCompactSize(s, nInputs);
-        for (unsigned int nInput = 0; nInput < nInputs; nInput++)
-             SerializeInput(s, nInput, nType, nVersion);
-        // Serialize vout
-        unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size());
-        ::WriteCompactSize(s, nOutputs);
-        for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
-             SerializeOutput(s, nOutput, nType, nVersion);
-        // Serialie nLockTime
-        ::Serialize(s, txTo.nLockTime, nType, nVersion);
-    }
-};
-
-} // anon namespace
-
-uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
-{
-    if (nIn >= txTo.vin.size()) {
-        LogPrintf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn);
-        return 1;
-    }
-
-    // Check for invalid use of SIGHASH_SINGLE
-    if ((nHashType & 0x1f) == SIGHASH_SINGLE) {
-        if (nIn >= txTo.vout.size()) {
-            LogPrintf("ERROR: SignatureHash() : nOut=%d out of range\n", nIn);
-            return 1;
-        }
-    }
-
-    // Wrapper to serialize only the necessary parts of the transaction being signed
-    CTransactionSignatureSerializer txTmp(txTo, scriptCode, nIn, nHashType);
-
-    // Serialize and hash
-    CHashWriter ss(SER_GETHASH, 0);
-    ss << txTmp << nHashType;
-    return ss.GetHash();
-}
-
-// Valid signature cache, to avoid doing expensive ECDSA signature checking
-// twice for every transaction (once when accepted into memory pool, and
-// again when accepted into the block chain)
-class CSignatureCache
-{
-private:
-     // sigdata_type is (signature hash, signature, public key):
-    typedef boost::tuple<uint256, std::vector<unsigned char>, CPubKey> sigdata_type;
-    std::set< sigdata_type> setValid;
-    boost::shared_mutex cs_sigcache;
-
-public:
-    bool
-    Get(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
-    {
-        boost::shared_lock<boost::shared_mutex> lock(cs_sigcache);
-
-        sigdata_type k(hash, vchSig, pubKey);
-        std::set<sigdata_type>::iterator mi = setValid.find(k);
-        if (mi != setValid.end())
-            return true;
-        return false;
-    }
-
-    void Set(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
-    {
-        // DoS prevention: limit cache size to less than 10MB
-        // (~200 bytes per cache entry times 50,000 entries)
-        // Since there are a maximum of 20,000 signature operations per block
-        // 50,000 is a reasonable default.
-        int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 50000);
-        if (nMaxCacheSize <= 0) return;
-
-        boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
-
-        while (static_cast<int64_t>(setValid.size()) > nMaxCacheSize)
-        {
-            // Evict a random entry. Random because that helps
-            // foil would-be DoS attackers who might try to pre-generate
-            // and re-use a set of valid signatures just-slightly-greater
-            // than our cache size.
-            uint256 randomHash = GetRandHash();
-            std::vector<unsigned char> unused;
-            std::set<sigdata_type>::iterator it =
-                setValid.lower_bound(sigdata_type(randomHash, unused, unused));
-            if (it == setValid.end())
-                it = setValid.begin();
-            setValid.erase(*it);
-        }
-
-        sigdata_type k(hash, vchSig, pubKey);
-        setValid.insert(k);
-    }
-};
-
-bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode,
-              const CTransaction& txTo, unsigned int nIn, int nHashType, int flags)
-{
-    static CSignatureCache signatureCache;
-
-    CPubKey pubkey(vchPubKey);
-    if (!pubkey.IsValid())
-        return false;
-
-    // Hash type is one byte tacked on to the end of the signature
-    if (vchSig.empty())
-        return false;
-    if (nHashType == 0)
-        nHashType = vchSig.back();
-    else if (nHashType != vchSig.back())
-        return false;
-    vchSig.pop_back();
-
-    uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
-
-    if (signatureCache.Get(sighash, vchSig, pubkey))
-        return true;
-
-    if (!pubkey.Verify(sighash, vchSig))
-        return false;
-
-    if (!(flags & SCRIPT_VERIFY_NOCACHE))
-        signatureCache.Set(sighash, vchSig, pubkey);
-
-    return true;
-}
-
-
-
-
-
-
-
-
-
 //
 // Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
 //
@@ -1459,48 +443,6 @@ void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey,
     CAffectedKeysVisitor(keystore, vKeys).Process(scriptPubKey);
 }
 
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
-                  unsigned int flags, int nHashType)
-{
-    vector<vector<unsigned char> > stack, stackCopy;
-    if (!EvalScript(stack, scriptSig, txTo, nIn, flags, nHashType))
-        return false;
-    if (flags & SCRIPT_VERIFY_P2SH)
-        stackCopy = stack;
-    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, nHashType))
-        return false;
-    if (stack.empty())
-        return false;
-
-    if (CastToBool(stack.back()) == false)
-        return false;
-
-    // Additional validation for spend-to-script-hash transactions:
-    if ((flags & SCRIPT_VERIFY_P2SH) && scriptPubKey.IsPayToScriptHash())
-    {
-        if (!scriptSig.IsPushOnly()) // scriptSig must be literals-only
-            return false;            // or validation fails
-
-        // stackCopy cannot be empty here, because if it was the
-        // P2SH  HASH <> EQUAL  scriptPubKey would be evaluated with
-        // an empty stack and the EvalScript above would return false.
-        assert(!stackCopy.empty());
-
-        const valtype& pubKeySerialized = stackCopy.back();
-        CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
-        popstack(stackCopy);
-
-        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, nHashType))
-            return false;
-        if (stackCopy.empty())
-            return false;
-        return CastToBool(stackCopy.back());
-    }
-
-    return true;
-}
-
-
 bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
 {
     assert(nIn < txTo.vin.size());
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 4f29f7ab29dc..1df95b1fa08c 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -8,6 +8,7 @@
 
 #include "key.h"
 #include "script/script.h"
+#include "script/interpreter.h"
 
 #include <stdexcept>
 #include <stdint.h>
@@ -20,26 +21,6 @@ struct CMutableTransaction;
 
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
 
-/** Signature hash types/flags */
-enum
-{
-    SIGHASH_ALL = 1,
-    SIGHASH_NONE = 2,
-    SIGHASH_SINGLE = 3,
-    SIGHASH_ANYONECANPAY = 0x80,
-};
-
-/** Script verification flags */
-enum
-{
-    SCRIPT_VERIFY_NONE      = 0,
-    SCRIPT_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
-    SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
-    SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC)
-    SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
-    SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
-};
-
 /** IsMine() return codes */
 enum isminetype
 {
@@ -156,11 +137,6 @@ class CScriptCompressor
     }
 };
 
-bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
-bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
-
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
-uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
 int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
 bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
@@ -171,7 +147,6 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
 bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 
 // Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
 // combine them intelligently and return the result.
diff --git a/src/test/canonical_tests.cpp b/src/test/canonical_tests.cpp
index 2d2a60074010..a17099de7275 100644
--- a/src/test/canonical_tests.cpp
+++ b/src/test/canonical_tests.cpp
@@ -8,9 +8,11 @@
 
 #include "data/sig_noncanonical.json.h"
 #include "data/sig_canonical.json.h"
+#include "key.h"
 #include "random.h"
-#include "scriptutils.h"
+#include "script/interpreter.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
 #include <boost/test/unit_test.hpp>
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index aa9b0de4ce89..e28682522bbe 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -6,6 +6,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/interpreter.h"
 #include "scriptutils.h"
 #include "uint256.h"
 
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 1421288eed30..8abde887ceef 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -7,7 +7,7 @@
 #include "random.h"
 #include "serialize.h"
 #include "script/script.h"
-#include "scriptutils.h"
+#include "script/interpreter.h"
 #include "util.h"
 #include "version.h"
 

From c4408a6c8534a36711557028a69314024cbc1bbe Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Sat, 23 Aug 2014 03:35:51 +0200
Subject: [PATCH 0666/1819] Separate script/standard

---
 src/Makefile.am           |   2 +
 src/bitcoin-tx.cpp        |   2 +
 src/bloom.cpp             |   3 +-
 src/core_write.cpp        |   3 +-
 src/main.h                |   3 +-
 src/rpcrawtransaction.cpp |   2 +
 src/script/standard.cpp   | 254 ++++++++++++++++++++++++++++++++++++++
 src/script/standard.h     |  56 +++++++++
 src/scriptutils.cpp       | 241 ------------------------------------
 src/scriptutils.h         |  40 +-----
 src/wallet.h              |   1 +
 11 files changed, 324 insertions(+), 283 deletions(-)
 create mode 100644 src/script/standard.cpp
 create mode 100644 src/script/standard.h

diff --git a/src/Makefile.am b/src/Makefile.am
index a3fdd3ee6a60..c3e2f7ed8243 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -100,6 +100,7 @@ BITCOIN_CORE_H = \
   rpcserver.h \
   script/interpreter.h \
   script/script.h \
+  script/standard.h \
   scriptutils.h \
   serialize.h \
   sync.h \
@@ -210,6 +211,7 @@ libbitcoin_common_a_SOURCES = \
   protocol.cpp \
   script/interpreter.cpp \
   script/script.cpp \
+  script/standard.cpp \
   scriptutils.cpp \
   $(BITCOIN_CORE_H)
 
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 5f547bba8362..3f12304bb20f 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -8,6 +8,8 @@
 #include "core.h"
 #include "main.h"         // for MAX_BLOCK_SIZE
 #include "keystore.h"
+#include "script/script.h"
+#include "scriptutils.h"
 #include "ui_interface.h" // for _(...)
 #include "univalue/univalue.h"
 #include "core_io.h"
diff --git a/src/bloom.cpp b/src/bloom.cpp
index 07990beb15e7..cef74a3a545a 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -5,7 +5,8 @@
 #include "bloom.h"
 
 #include "core.h"
-#include "scriptutils.h"
+#include "script/script.h"
+#include "script/standard.h"
 
 #include <math.h>
 #include <stdlib.h>
diff --git a/src/core_write.cpp b/src/core_write.cpp
index e816611809aa..62712b1ba061 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -4,7 +4,8 @@
 
 #include "core_io.h"
 #include "univalue/univalue.h"
-#include "scriptutils.h"
+#include "script/script.h"
+#include "script/standard.h"
 #include "core.h"
 #include "serialize.h"
 #include "util.h"
diff --git a/src/main.h b/src/main.h
index 1fc9b3ecf155..30cccab2f1cb 100644
--- a/src/main.h
+++ b/src/main.h
@@ -15,7 +15,8 @@
 #include "core.h"
 #include "net.h"
 #include "pow.h"
-#include "scriptutils.h"
+#include "script/script.h"
+#include "script/standard.h"
 #include "sync.h"
 #include "txmempool.h"
 #include "uint256.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index a73641834d80..901a16cd3cc1 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -11,6 +11,8 @@
 #include "main.h"
 #include "net.h"
 #include "rpcserver.h"
+#include "script/script.h"
+#include "script/standard.h"
 #include "uint256.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
new file mode 100644
index 000000000000..684edff4d230
--- /dev/null
+++ b/src/script/standard.cpp
@@ -0,0 +1,254 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "script/standard.h"
+
+#include "script/script.h"
+#include "util.h"
+
+#include <boost/foreach.hpp>
+
+using namespace std;
+
+typedef vector<unsigned char> valtype;
+
+const char* GetTxnOutputType(txnouttype t)
+{
+    switch (t)
+    {
+    case TX_NONSTANDARD: return "nonstandard";
+    case TX_PUBKEY: return "pubkey";
+    case TX_PUBKEYHASH: return "pubkeyhash";
+    case TX_SCRIPTHASH: return "scripthash";
+    case TX_MULTISIG: return "multisig";
+    case TX_NULL_DATA: return "nulldata";
+    }
+    return NULL;
+}
+
+//
+// Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
+//
+bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsigned char> >& vSolutionsRet)
+{
+    // Templates
+    static multimap<txnouttype, CScript> mTemplates;
+    if (mTemplates.empty())
+    {
+        // Standard tx, sender provides pubkey, receiver adds signature
+        mTemplates.insert(make_pair(TX_PUBKEY, CScript() << OP_PUBKEY << OP_CHECKSIG));
+
+        // Bitcoin address tx, sender provides hash of pubkey, receiver provides signature and pubkey
+        mTemplates.insert(make_pair(TX_PUBKEYHASH, CScript() << OP_DUP << OP_HASH160 << OP_PUBKEYHASH << OP_EQUALVERIFY << OP_CHECKSIG));
+
+        // Sender provides N pubkeys, receivers provides M signatures
+        mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG));
+
+        // Empty, provably prunable, data-carrying output
+        if (GetBoolArg("-datacarrier", true))
+            mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
+        mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
+    }
+
+    // Shortcut for pay-to-script-hash, which are more constrained than the other types:
+    // it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
+    if (scriptPubKey.IsPayToScriptHash())
+    {
+        typeRet = TX_SCRIPTHASH;
+        vector<unsigned char> hashBytes(scriptPubKey.begin()+2, scriptPubKey.begin()+22);
+        vSolutionsRet.push_back(hashBytes);
+        return true;
+    }
+
+    // Scan templates
+    const CScript& script1 = scriptPubKey;
+    BOOST_FOREACH(const PAIRTYPE(txnouttype, CScript)& tplate, mTemplates)
+    {
+        const CScript& script2 = tplate.second;
+        vSolutionsRet.clear();
+
+        opcodetype opcode1, opcode2;
+        vector<unsigned char> vch1, vch2;
+
+        // Compare
+        CScript::const_iterator pc1 = script1.begin();
+        CScript::const_iterator pc2 = script2.begin();
+        while (true)
+        {
+            if (pc1 == script1.end() && pc2 == script2.end())
+            {
+                // Found a match
+                typeRet = tplate.first;
+                if (typeRet == TX_MULTISIG)
+                {
+                    // Additional checks for TX_MULTISIG:
+                    unsigned char m = vSolutionsRet.front()[0];
+                    unsigned char n = vSolutionsRet.back()[0];
+                    if (m < 1 || n < 1 || m > n || vSolutionsRet.size()-2 != n)
+                        return false;
+                }
+                return true;
+            }
+            if (!script1.GetOp(pc1, opcode1, vch1))
+                break;
+            if (!script2.GetOp(pc2, opcode2, vch2))
+                break;
+
+            // Template matching opcodes:
+            if (opcode2 == OP_PUBKEYS)
+            {
+                while (vch1.size() >= 33 && vch1.size() <= 65)
+                {
+                    vSolutionsRet.push_back(vch1);
+                    if (!script1.GetOp(pc1, opcode1, vch1))
+                        break;
+                }
+                if (!script2.GetOp(pc2, opcode2, vch2))
+                    break;
+                // Normal situation is to fall through
+                // to other if/else statements
+            }
+
+            if (opcode2 == OP_PUBKEY)
+            {
+                if (vch1.size() < 33 || vch1.size() > 65)
+                    break;
+                vSolutionsRet.push_back(vch1);
+            }
+            else if (opcode2 == OP_PUBKEYHASH)
+            {
+                if (vch1.size() != sizeof(uint160))
+                    break;
+                vSolutionsRet.push_back(vch1);
+            }
+            else if (opcode2 == OP_SMALLINTEGER)
+            {   // Single-byte small integer pushed onto vSolutions
+                if (opcode1 == OP_0 ||
+                    (opcode1 >= OP_1 && opcode1 <= OP_16))
+                {
+                    char n = (char)CScript::DecodeOP_N(opcode1);
+                    vSolutionsRet.push_back(valtype(1, n));
+                }
+                else
+                    break;
+            }
+            else if (opcode2 == OP_SMALLDATA)
+            {
+                // small pushdata, <= MAX_OP_RETURN_RELAY bytes
+                if (vch1.size() > MAX_OP_RETURN_RELAY)
+                    break;
+            }
+            else if (opcode1 != opcode2 || vch1 != vch2)
+            {
+                // Others must match exactly
+                break;
+            }
+        }
+    }
+
+    vSolutionsRet.clear();
+    typeRet = TX_NONSTANDARD;
+    return false;
+}
+
+int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions)
+{
+    switch (t)
+    {
+    case TX_NONSTANDARD:
+    case TX_NULL_DATA:
+        return -1;
+    case TX_PUBKEY:
+        return 1;
+    case TX_PUBKEYHASH:
+        return 2;
+    case TX_MULTISIG:
+        if (vSolutions.size() < 1 || vSolutions[0].size() < 1)
+            return -1;
+        return vSolutions[0][0] + 1;
+    case TX_SCRIPTHASH:
+        return 1; // doesn't include args needed by the script
+    }
+    return -1;
+}
+
+bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
+{
+    vector<valtype> vSolutions;
+    if (!Solver(scriptPubKey, whichType, vSolutions))
+        return false;
+
+    if (whichType == TX_MULTISIG)
+    {
+        unsigned char m = vSolutions.front()[0];
+        unsigned char n = vSolutions.back()[0];
+        // Support up to x-of-3 multisig txns as standard
+        if (n < 1 || n > 3)
+            return false;
+        if (m < 1 || m > n)
+            return false;
+    }
+
+    return whichType != TX_NONSTANDARD;
+}
+
+bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
+{
+    vector<valtype> vSolutions;
+    txnouttype whichType;
+    if (!Solver(scriptPubKey, whichType, vSolutions))
+        return false;
+
+    if (whichType == TX_PUBKEY)
+    {
+        addressRet = CPubKey(vSolutions[0]).GetID();
+        return true;
+    }
+    else if (whichType == TX_PUBKEYHASH)
+    {
+        addressRet = CKeyID(uint160(vSolutions[0]));
+        return true;
+    }
+    else if (whichType == TX_SCRIPTHASH)
+    {
+        addressRet = CScriptID(uint160(vSolutions[0]));
+        return true;
+    }
+    // Multisig txns have more than one address...
+    return false;
+}
+
+bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vector<CTxDestination>& addressRet, int& nRequiredRet)
+{
+    addressRet.clear();
+    typeRet = TX_NONSTANDARD;
+    vector<valtype> vSolutions;
+    if (!Solver(scriptPubKey, typeRet, vSolutions))
+        return false;
+    if (typeRet == TX_NULL_DATA){
+        // This is data, not addresses
+        return false;
+    }
+
+    if (typeRet == TX_MULTISIG)
+    {
+        nRequiredRet = vSolutions.front()[0];
+        for (unsigned int i = 1; i < vSolutions.size()-1; i++)
+        {
+            CTxDestination address = CPubKey(vSolutions[i]).GetID();
+            addressRet.push_back(address);
+        }
+    }
+    else
+    {
+        nRequiredRet = 1;
+        CTxDestination address;
+        if (!ExtractDestination(scriptPubKey, address))
+           return false;
+        addressRet.push_back(address);
+    }
+
+    return true;
+}
diff --git a/src/script/standard.h b/src/script/standard.h
new file mode 100644
index 000000000000..18092e879e7e
--- /dev/null
+++ b/src/script/standard.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT_STANDARD
+#define H_BITCOIN_SCRIPT_STANDARD
+
+#include "script/script.h"
+#include "script/interpreter.h"
+
+#include <stdint.h>
+
+class CScript;
+
+static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
+
+// Mandatory script verification flags that all new blocks must comply with for
+// them to be valid. (but old blocks may not comply with) Currently just P2SH,
+// but in the future other flags may be added, such as a soft-fork to enforce
+// strict DER encoding.
+//
+// Failing one of these tests may trigger a DoS ban - see CheckInputs() for
+// details.
+static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
+
+// Standard script verification flags that standard transactions will comply
+// with. However scripts violating these flags may still be present in valid
+// blocks and we must accept those blocks.
+static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
+                                                         SCRIPT_VERIFY_STRICTENC |
+                                                         SCRIPT_VERIFY_NULLDUMMY;
+
+// For convenience, standard but not mandatory verify flags.
+static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
+
+enum txnouttype
+{
+    TX_NONSTANDARD,
+    // 'standard' transaction types:
+    TX_PUBKEY,
+    TX_PUBKEYHASH,
+    TX_SCRIPTHASH,
+    TX_MULTISIG,
+    TX_NULL_DATA,
+};
+
+const char* GetTxnOutputType(txnouttype t);
+
+bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
+int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
+bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
+bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
+bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
+
+#endif
diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index fb3766ab158d..cede11d6a748 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -17,146 +17,6 @@ using namespace std;
 
 typedef vector<unsigned char> valtype;
 
-const char* GetTxnOutputType(txnouttype t)
-{
-    switch (t)
-    {
-    case TX_NONSTANDARD: return "nonstandard";
-    case TX_PUBKEY: return "pubkey";
-    case TX_PUBKEYHASH: return "pubkeyhash";
-    case TX_SCRIPTHASH: return "scripthash";
-    case TX_MULTISIG: return "multisig";
-    case TX_NULL_DATA: return "nulldata";
-    }
-    return NULL;
-}
-
-//
-// Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
-//
-bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsigned char> >& vSolutionsRet)
-{
-    // Templates
-    static multimap<txnouttype, CScript> mTemplates;
-    if (mTemplates.empty())
-    {
-        // Standard tx, sender provides pubkey, receiver adds signature
-        mTemplates.insert(make_pair(TX_PUBKEY, CScript() << OP_PUBKEY << OP_CHECKSIG));
-
-        // Bitcoin address tx, sender provides hash of pubkey, receiver provides signature and pubkey
-        mTemplates.insert(make_pair(TX_PUBKEYHASH, CScript() << OP_DUP << OP_HASH160 << OP_PUBKEYHASH << OP_EQUALVERIFY << OP_CHECKSIG));
-
-        // Sender provides N pubkeys, receivers provides M signatures
-        mTemplates.insert(make_pair(TX_MULTISIG, CScript() << OP_SMALLINTEGER << OP_PUBKEYS << OP_SMALLINTEGER << OP_CHECKMULTISIG));
-
-        // Empty, provably prunable, data-carrying output
-        if (GetBoolArg("-datacarrier", true))
-            mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN << OP_SMALLDATA));
-        mTemplates.insert(make_pair(TX_NULL_DATA, CScript() << OP_RETURN));
-    }
-
-    // Shortcut for pay-to-script-hash, which are more constrained than the other types:
-    // it is always OP_HASH160 20 [20 byte hash] OP_EQUAL
-    if (scriptPubKey.IsPayToScriptHash())
-    {
-        typeRet = TX_SCRIPTHASH;
-        vector<unsigned char> hashBytes(scriptPubKey.begin()+2, scriptPubKey.begin()+22);
-        vSolutionsRet.push_back(hashBytes);
-        return true;
-    }
-
-    // Scan templates
-    const CScript& script1 = scriptPubKey;
-    BOOST_FOREACH(const PAIRTYPE(txnouttype, CScript)& tplate, mTemplates)
-    {
-        const CScript& script2 = tplate.second;
-        vSolutionsRet.clear();
-
-        opcodetype opcode1, opcode2;
-        vector<unsigned char> vch1, vch2;
-
-        // Compare
-        CScript::const_iterator pc1 = script1.begin();
-        CScript::const_iterator pc2 = script2.begin();
-        while (true)
-        {
-            if (pc1 == script1.end() && pc2 == script2.end())
-            {
-                // Found a match
-                typeRet = tplate.first;
-                if (typeRet == TX_MULTISIG)
-                {
-                    // Additional checks for TX_MULTISIG:
-                    unsigned char m = vSolutionsRet.front()[0];
-                    unsigned char n = vSolutionsRet.back()[0];
-                    if (m < 1 || n < 1 || m > n || vSolutionsRet.size()-2 != n)
-                        return false;
-                }
-                return true;
-            }
-            if (!script1.GetOp(pc1, opcode1, vch1))
-                break;
-            if (!script2.GetOp(pc2, opcode2, vch2))
-                break;
-
-            // Template matching opcodes:
-            if (opcode2 == OP_PUBKEYS)
-            {
-                while (vch1.size() >= 33 && vch1.size() <= 65)
-                {
-                    vSolutionsRet.push_back(vch1);
-                    if (!script1.GetOp(pc1, opcode1, vch1))
-                        break;
-                }
-                if (!script2.GetOp(pc2, opcode2, vch2))
-                    break;
-                // Normal situation is to fall through
-                // to other if/else statements
-            }
-
-            if (opcode2 == OP_PUBKEY)
-            {
-                if (vch1.size() < 33 || vch1.size() > 65)
-                    break;
-                vSolutionsRet.push_back(vch1);
-            }
-            else if (opcode2 == OP_PUBKEYHASH)
-            {
-                if (vch1.size() != sizeof(uint160))
-                    break;
-                vSolutionsRet.push_back(vch1);
-            }
-            else if (opcode2 == OP_SMALLINTEGER)
-            {   // Single-byte small integer pushed onto vSolutions
-                if (opcode1 == OP_0 ||
-                    (opcode1 >= OP_1 && opcode1 <= OP_16))
-                {
-                    char n = (char)CScript::DecodeOP_N(opcode1);
-                    vSolutionsRet.push_back(valtype(1, n));
-                }
-                else
-                    break;
-            }
-            else if (opcode2 == OP_SMALLDATA)
-            {
-                // small pushdata, <= MAX_OP_RETURN_RELAY bytes
-                if (vch1.size() > MAX_OP_RETURN_RELAY)
-                    break;
-            }
-            else if (opcode1 != opcode2 || vch1 != vch2)
-            {
-                // Others must match exactly
-                break;
-            }
-        }
-    }
-
-    vSolutionsRet.clear();
-    typeRet = TX_NONSTANDARD;
-    return false;
-}
-
-
 bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
 {
     CKey key;
@@ -231,48 +91,6 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash
     return false;
 }
 
-int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions)
-{
-    switch (t)
-    {
-    case TX_NONSTANDARD:
-    case TX_NULL_DATA:
-        return -1;
-    case TX_PUBKEY:
-        return 1;
-    case TX_PUBKEYHASH:
-        return 2;
-    case TX_MULTISIG:
-        if (vSolutions.size() < 1 || vSolutions[0].size() < 1)
-            return -1;
-        return vSolutions[0][0] + 1;
-    case TX_SCRIPTHASH:
-        return 1; // doesn't include args needed by the script
-    }
-    return -1;
-}
-
-bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
-{
-    vector<valtype> vSolutions;
-    if (!Solver(scriptPubKey, whichType, vSolutions))
-        return false;
-
-    if (whichType == TX_MULTISIG)
-    {
-        unsigned char m = vSolutions.front()[0];
-        unsigned char n = vSolutions.back()[0];
-        // Support up to x-of-3 multisig txns as standard
-        if (n < 1 || n > 3)
-            return false;
-        if (m < 1 || m > n)
-            return false;
-    }
-
-    return whichType != TX_NONSTANDARD;
-}
-
-
 unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
 {
     unsigned int nResult = 0;
@@ -348,65 +166,6 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
     return ISMINE_NO;
 }
 
-bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
-{
-    vector<valtype> vSolutions;
-    txnouttype whichType;
-    if (!Solver(scriptPubKey, whichType, vSolutions))
-        return false;
-
-    if (whichType == TX_PUBKEY)
-    {
-        addressRet = CPubKey(vSolutions[0]).GetID();
-        return true;
-    }
-    else if (whichType == TX_PUBKEYHASH)
-    {
-        addressRet = CKeyID(uint160(vSolutions[0]));
-        return true;
-    }
-    else if (whichType == TX_SCRIPTHASH)
-    {
-        addressRet = CScriptID(uint160(vSolutions[0]));
-        return true;
-    }
-    // Multisig txns have more than one address...
-    return false;
-}
-
-bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vector<CTxDestination>& addressRet, int& nRequiredRet)
-{
-    addressRet.clear();
-    typeRet = TX_NONSTANDARD;
-    vector<valtype> vSolutions;
-    if (!Solver(scriptPubKey, typeRet, vSolutions))
-        return false;
-    if (typeRet == TX_NULL_DATA){
-        // This is data, not addresses
-        return false;
-    }
-
-    if (typeRet == TX_MULTISIG)
-    {
-        nRequiredRet = vSolutions.front()[0];
-        for (unsigned int i = 1; i < vSolutions.size()-1; i++)
-        {
-            CTxDestination address = CPubKey(vSolutions[i]).GetID();
-            addressRet.push_back(address);
-        }
-    }
-    else
-    {
-        nRequiredRet = 1;
-        CTxDestination address;
-        if (!ExtractDestination(scriptPubKey, address))
-           return false;
-        addressRet.push_back(address);
-    }
-
-    return true;
-}
-
 class CAffectedKeysVisitor : public boost::static_visitor<void> {
 private:
     const CKeyStore &keystore;
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 1df95b1fa08c..7ea2c9e6a59e 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -9,6 +9,7 @@
 #include "key.h"
 #include "script/script.h"
 #include "script/interpreter.h"
+#include "script/standard.h"
 
 #include <stdexcept>
 #include <stdint.h>
@@ -19,8 +20,6 @@ class CKeyStore;
 class CTransaction;
 struct CMutableTransaction;
 
-static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
-
 /** IsMine() return codes */
 enum isminetype
 {
@@ -32,38 +31,6 @@ enum isminetype
 /** used for bitflags of isminetype */
 typedef uint8_t isminefilter;
 
-// Mandatory script verification flags that all new blocks must comply with for
-// them to be valid. (but old blocks may not comply with) Currently just P2SH,
-// but in the future other flags may be added, such as a soft-fork to enforce
-// strict DER encoding.
-//
-// Failing one of these tests may trigger a DoS ban - see CheckInputs() for
-// details.
-static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
-
-// Standard script verification flags that standard transactions will comply
-// with. However scripts violating these flags may still be present in valid
-// blocks and we must accept those blocks.
-static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
-                                                         SCRIPT_VERIFY_STRICTENC |
-                                                         SCRIPT_VERIFY_NULLDUMMY;
-
-// For convenience, standard but not mandatory verify flags.
-static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
-
-enum txnouttype
-{
-    TX_NONSTANDARD,
-    // 'standard' transaction types:
-    TX_PUBKEY,
-    TX_PUBKEYHASH,
-    TX_SCRIPTHASH,
-    TX_MULTISIG,
-    TX_NULL_DATA,
-};
-
-const char* GetTxnOutputType(txnouttype t);
-
 /** Compact serializer for scripts.
  *
  *  It detects common cases and encodes them much more efficiently.
@@ -137,14 +104,9 @@ class CScriptCompressor
     }
 };
 
-bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
-int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
-bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
-bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
-bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
 bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 
diff --git a/src/wallet.h b/src/wallet.h
index f8e1ebac1219..6788986f88cb 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -11,6 +11,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
+#include "scriptutils.h"
 #include "ui_interface.h"
 #include "walletdb.h"
 

From 9294a4bbe7ec067a45905b6e693414ad7d3b5669 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Wed, 20 Aug 2014 18:33:30 +0200
Subject: [PATCH 0667/1819] Separate CScriptCompressor

---
 src/Makefile.am           |   2 +
 src/core.h                |   3 +-
 src/script/compressor.cpp | 127 ++++++++++++++++++++++++++++++++++++++
 src/script/compressor.h   |  84 +++++++++++++++++++++++++
 src/scriptutils.cpp       | 121 ------------------------------------
 src/scriptutils.h         |  73 ----------------------
 6 files changed, 215 insertions(+), 195 deletions(-)
 create mode 100644 src/script/compressor.cpp
 create mode 100644 src/script/compressor.h

diff --git a/src/Makefile.am b/src/Makefile.am
index c3e2f7ed8243..efa55f0dc2c7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -99,6 +99,7 @@ BITCOIN_CORE_H = \
   rpcprotocol.h \
   rpcserver.h \
   script/interpreter.h \
+  script/compressor.h \
   script/script.h \
   script/standard.h \
   scriptutils.h \
@@ -210,6 +211,7 @@ libbitcoin_common_a_SOURCES = \
   netbase.cpp \
   protocol.cpp \
   script/interpreter.cpp \
+  script/compressor.cpp \
   script/script.cpp \
   script/standard.cpp \
   scriptutils.cpp \
diff --git a/src/core.h b/src/core.h
index 0df75670fdcd..030eb17734f2 100644
--- a/src/core.h
+++ b/src/core.h
@@ -6,7 +6,8 @@
 #ifndef BITCOIN_CORE_H
 #define BITCOIN_CORE_H
 
-#include "scriptutils.h"
+#include "script/compressor.h"
+#include "script/script.h"
 #include "serialize.h"
 #include "uint256.h"
 
diff --git a/src/script/compressor.cpp b/src/script/compressor.cpp
new file mode 100644
index 000000000000..2f8df602bf54
--- /dev/null
+++ b/src/script/compressor.cpp
@@ -0,0 +1,127 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "compressor.h"
+
+bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
+{
+    if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160
+                            && script[2] == 20 && script[23] == OP_EQUALVERIFY
+                            && script[24] == OP_CHECKSIG) {
+        memcpy(&hash, &script[3], 20);
+        return true;
+    }
+    return false;
+}
+
+bool CScriptCompressor::IsToScriptID(CScriptID &hash) const
+{
+    if (script.size() == 23 && script[0] == OP_HASH160 && script[1] == 20
+                            && script[22] == OP_EQUAL) {
+        memcpy(&hash, &script[2], 20);
+        return true;
+    }
+    return false;
+}
+
+bool CScriptCompressor::IsToPubKey(CPubKey &pubkey) const
+{
+    if (script.size() == 35 && script[0] == 33 && script[34] == OP_CHECKSIG
+                            && (script[1] == 0x02 || script[1] == 0x03)) {
+        pubkey.Set(&script[1], &script[34]);
+        return true;
+    }
+    if (script.size() == 67 && script[0] == 65 && script[66] == OP_CHECKSIG
+                            && script[1] == 0x04) {
+        pubkey.Set(&script[1], &script[66]);
+        return pubkey.IsFullyValid(); // if not fully valid, a case that would not be compressible
+    }
+    return false;
+}
+
+bool CScriptCompressor::Compress(std::vector<unsigned char> &out) const
+{
+    CKeyID keyID;
+    if (IsToKeyID(keyID)) {
+        out.resize(21);
+        out[0] = 0x00;
+        memcpy(&out[1], &keyID, 20);
+        return true;
+    }
+    CScriptID scriptID;
+    if (IsToScriptID(scriptID)) {
+        out.resize(21);
+        out[0] = 0x01;
+        memcpy(&out[1], &scriptID, 20);
+        return true;
+    }
+    CPubKey pubkey;
+    if (IsToPubKey(pubkey)) {
+        out.resize(33);
+        memcpy(&out[1], &pubkey[1], 32);
+        if (pubkey[0] == 0x02 || pubkey[0] == 0x03) {
+            out[0] = pubkey[0];
+            return true;
+        } else if (pubkey[0] == 0x04) {
+            out[0] = 0x04 | (pubkey[64] & 0x01);
+            return true;
+        }
+    }
+    return false;
+}
+
+unsigned int CScriptCompressor::GetSpecialSize(unsigned int nSize) const
+{
+    if (nSize == 0 || nSize == 1)
+        return 20;
+    if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
+        return 32;
+    return 0;
+}
+
+bool CScriptCompressor::Decompress(unsigned int nSize, const std::vector<unsigned char> &in)
+{
+    switch(nSize) {
+    case 0x00:
+        script.resize(25);
+        script[0] = OP_DUP;
+        script[1] = OP_HASH160;
+        script[2] = 20;
+        memcpy(&script[3], &in[0], 20);
+        script[23] = OP_EQUALVERIFY;
+        script[24] = OP_CHECKSIG;
+        return true;
+    case 0x01:
+        script.resize(23);
+        script[0] = OP_HASH160;
+        script[1] = 20;
+        memcpy(&script[2], &in[0], 20);
+        script[22] = OP_EQUAL;
+        return true;
+    case 0x02:
+    case 0x03:
+        script.resize(35);
+        script[0] = 33;
+        script[1] = nSize;
+        memcpy(&script[2], &in[0], 32);
+        script[34] = OP_CHECKSIG;
+        return true;
+    case 0x04:
+    case 0x05:
+        unsigned char vch[33] = {};
+        vch[0] = nSize - 2;
+        memcpy(&vch[1], &in[0], 32);
+        CPubKey pubkey(&vch[0], &vch[33]);
+        if (!pubkey.Decompress())
+            return false;
+        assert(pubkey.size() == 65);
+        script.resize(67);
+        script[0] = 65;
+        memcpy(&script[1], pubkey.begin(), 65);
+        script[66] = OP_CHECKSIG;
+        return true;
+    }
+    return false;
+}
diff --git a/src/script/compressor.h b/src/script/compressor.h
new file mode 100644
index 000000000000..f0a3754f02b4
--- /dev/null
+++ b/src/script/compressor.h
@@ -0,0 +1,84 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT_COMPRESSOR
+#define H_BITCOIN_SCRIPT_COMPRESSOR
+
+#include "script/script.h"
+
+/** Compact serializer for scripts.
+ *
+ *  It detects common cases and encodes them much more efficiently.
+ *  3 special cases are defined:
+ *  * Pay to pubkey hash (encoded as 21 bytes)
+ *  * Pay to script hash (encoded as 21 bytes)
+ *  * Pay to pubkey starting with 0x02, 0x03 or 0x04 (encoded as 33 bytes)
+ *
+ *  Other scripts up to 121 bytes require 1 byte + script length. Above
+ *  that, scripts up to 16505 bytes require 2 bytes + script length.
+ */
+class CScriptCompressor
+{
+private:
+    // make this static for now (there are only 6 special scripts defined)
+    // this can potentially be extended together with a new nVersion for
+    // transactions, in which case this value becomes dependent on nVersion
+    // and nHeight of the enclosing transaction.
+    static const unsigned int nSpecialScripts = 6;
+
+    CScript &script;
+protected:
+    // These check for scripts for which a special case with a shorter encoding is defined.
+    // They are implemented separately from the CScript test, as these test for exact byte
+    // sequence correspondences, and are more strict. For example, IsToPubKey also verifies
+    // whether the public key is valid (as invalid ones cannot be represented in compressed
+    // form).
+    bool IsToKeyID(CKeyID &hash) const;
+    bool IsToScriptID(CScriptID &hash) const;
+    bool IsToPubKey(CPubKey &pubkey) const;
+
+    bool Compress(std::vector<unsigned char> &out) const;
+    unsigned int GetSpecialSize(unsigned int nSize) const;
+    bool Decompress(unsigned int nSize, const std::vector<unsigned char> &out);
+public:
+    CScriptCompressor(CScript &scriptIn) : script(scriptIn) { }
+
+    unsigned int GetSerializeSize(int nType, int nVersion) const {
+        std::vector<unsigned char> compr;
+        if (Compress(compr))
+            return compr.size();
+        unsigned int nSize = script.size() + nSpecialScripts;
+        return script.size() + VARINT(nSize).GetSerializeSize(nType, nVersion);
+    }
+
+    template<typename Stream>
+    void Serialize(Stream &s, int nType, int nVersion) const {
+        std::vector<unsigned char> compr;
+        if (Compress(compr)) {
+            s << CFlatData(compr);
+            return;
+        }
+        unsigned int nSize = script.size() + nSpecialScripts;
+        s << VARINT(nSize);
+        s << CFlatData(script);
+    }
+
+    template<typename Stream>
+    void Unserialize(Stream &s, int nType, int nVersion) {
+        unsigned int nSize = 0;
+        s >> VARINT(nSize);
+        if (nSize < nSpecialScripts) {
+            std::vector<unsigned char> vch(GetSpecialSize(nSize), 0x00);
+            s >> REF(CFlatData(vch));
+            Decompress(nSize, vch);
+            return;
+        }
+        nSize -= nSpecialScripts;
+        script.resize(nSize);
+        s >> REF(CFlatData(script));
+    }
+};
+
+#endif
diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index cede11d6a748..cc38706d34d3 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -369,124 +369,3 @@ CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsign
 
     return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
 }
-
-bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
-{
-    if (script.size() == 25 && script[0] == OP_DUP && script[1] == OP_HASH160
-                            && script[2] == 20 && script[23] == OP_EQUALVERIFY
-                            && script[24] == OP_CHECKSIG) {
-        memcpy(&hash, &script[3], 20);
-        return true;
-    }
-    return false;
-}
-
-bool CScriptCompressor::IsToScriptID(CScriptID &hash) const
-{
-    if (script.size() == 23 && script[0] == OP_HASH160 && script[1] == 20
-                            && script[22] == OP_EQUAL) {
-        memcpy(&hash, &script[2], 20);
-        return true;
-    }
-    return false;
-}
-
-bool CScriptCompressor::IsToPubKey(CPubKey &pubkey) const
-{
-    if (script.size() == 35 && script[0] == 33 && script[34] == OP_CHECKSIG
-                            && (script[1] == 0x02 || script[1] == 0x03)) {
-        pubkey.Set(&script[1], &script[34]);
-        return true;
-    }
-    if (script.size() == 67 && script[0] == 65 && script[66] == OP_CHECKSIG
-                            && script[1] == 0x04) {
-        pubkey.Set(&script[1], &script[66]);
-        return pubkey.IsFullyValid(); // if not fully valid, a case that would not be compressible
-    }
-    return false;
-}
-
-bool CScriptCompressor::Compress(std::vector<unsigned char> &out) const
-{
-    CKeyID keyID;
-    if (IsToKeyID(keyID)) {
-        out.resize(21);
-        out[0] = 0x00;
-        memcpy(&out[1], &keyID, 20);
-        return true;
-    }
-    CScriptID scriptID;
-    if (IsToScriptID(scriptID)) {
-        out.resize(21);
-        out[0] = 0x01;
-        memcpy(&out[1], &scriptID, 20);
-        return true;
-    }
-    CPubKey pubkey;
-    if (IsToPubKey(pubkey)) {
-        out.resize(33);
-        memcpy(&out[1], &pubkey[1], 32);
-        if (pubkey[0] == 0x02 || pubkey[0] == 0x03) {
-            out[0] = pubkey[0];
-            return true;
-        } else if (pubkey[0] == 0x04) {
-            out[0] = 0x04 | (pubkey[64] & 0x01);
-            return true;
-        }
-    }
-    return false;
-}
-
-unsigned int CScriptCompressor::GetSpecialSize(unsigned int nSize) const
-{
-    if (nSize == 0 || nSize == 1)
-        return 20;
-    if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
-        return 32;
-    return 0;
-}
-
-bool CScriptCompressor::Decompress(unsigned int nSize, const std::vector<unsigned char> &in)
-{
-    switch(nSize) {
-    case 0x00:
-        script.resize(25);
-        script[0] = OP_DUP;
-        script[1] = OP_HASH160;
-        script[2] = 20;
-        memcpy(&script[3], &in[0], 20);
-        script[23] = OP_EQUALVERIFY;
-        script[24] = OP_CHECKSIG;
-        return true;
-    case 0x01:
-        script.resize(23);
-        script[0] = OP_HASH160;
-        script[1] = 20;
-        memcpy(&script[2], &in[0], 20);
-        script[22] = OP_EQUAL;
-        return true;
-    case 0x02:
-    case 0x03:
-        script.resize(35);
-        script[0] = 33;
-        script[1] = nSize;
-        memcpy(&script[2], &in[0], 32);
-        script[34] = OP_CHECKSIG;
-        return true;
-    case 0x04:
-    case 0x05:
-        unsigned char vch[33] = {};
-        vch[0] = nSize - 2;
-        memcpy(&vch[1], &in[0], 32);
-        CPubKey pubkey(&vch[0], &vch[33]);
-        if (!pubkey.Decompress())
-            return false;
-        assert(pubkey.size() == 65);
-        script.resize(67);
-        script[0] = 65;
-        memcpy(&script[1], pubkey.begin(), 65);
-        script[66] = OP_CHECKSIG;
-        return true;
-    }
-    return false;
-}
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 7ea2c9e6a59e..1c7408124e10 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -31,79 +31,6 @@ enum isminetype
 /** used for bitflags of isminetype */
 typedef uint8_t isminefilter;
 
-/** Compact serializer for scripts.
- *
- *  It detects common cases and encodes them much more efficiently.
- *  3 special cases are defined:
- *  * Pay to pubkey hash (encoded as 21 bytes)
- *  * Pay to script hash (encoded as 21 bytes)
- *  * Pay to pubkey starting with 0x02, 0x03 or 0x04 (encoded as 33 bytes)
- *
- *  Other scripts up to 121 bytes require 1 byte + script length. Above
- *  that, scripts up to 16505 bytes require 2 bytes + script length.
- */
-class CScriptCompressor
-{
-private:
-    // make this static for now (there are only 6 special scripts defined)
-    // this can potentially be extended together with a new nVersion for
-    // transactions, in which case this value becomes dependent on nVersion
-    // and nHeight of the enclosing transaction.
-    static const unsigned int nSpecialScripts = 6;
-
-    CScript &script;
-protected:
-    // These check for scripts for which a special case with a shorter encoding is defined.
-    // They are implemented separately from the CScript test, as these test for exact byte
-    // sequence correspondences, and are more strict. For example, IsToPubKey also verifies
-    // whether the public key is valid (as invalid ones cannot be represented in compressed
-    // form).
-    bool IsToKeyID(CKeyID &hash) const;
-    bool IsToScriptID(CScriptID &hash) const;
-    bool IsToPubKey(CPubKey &pubkey) const;
-
-    bool Compress(std::vector<unsigned char> &out) const;
-    unsigned int GetSpecialSize(unsigned int nSize) const;
-    bool Decompress(unsigned int nSize, const std::vector<unsigned char> &out);
-public:
-    CScriptCompressor(CScript &scriptIn) : script(scriptIn) { }
-
-    unsigned int GetSerializeSize(int nType, int nVersion) const {
-        std::vector<unsigned char> compr;
-        if (Compress(compr))
-            return compr.size();
-        unsigned int nSize = script.size() + nSpecialScripts;
-        return script.size() + VARINT(nSize).GetSerializeSize(nType, nVersion);
-    }
-
-    template<typename Stream>
-    void Serialize(Stream &s, int nType, int nVersion) const {
-        std::vector<unsigned char> compr;
-        if (Compress(compr)) {
-            s << CFlatData(compr);
-            return;
-        }
-        unsigned int nSize = script.size() + nSpecialScripts;
-        s << VARINT(nSize);
-        s << CFlatData(script);
-    }
-
-    template<typename Stream>
-    void Unserialize(Stream &s, int nType, int nVersion) {
-        unsigned int nSize = 0;
-        s >> VARINT(nSize);
-        if (nSize < nSpecialScripts) {
-            std::vector<unsigned char> vch(GetSpecialSize(nSize), 0x00);
-            s >> REF(CFlatData(vch));
-            Decompress(nSize, vch);
-            return;
-        }
-        nSize -= nSpecialScripts;
-        script.resize(nSize);
-        s >> REF(CFlatData(script));
-    }
-};
-
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);

From e088d65acbb181220b64a45a2a62bb79c0e40304 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 27 Aug 2014 17:22:33 +0200
Subject: [PATCH 0668/1819] Separate script/sign

---
 src/Makefile.am                |   2 +
 src/bitcoin-tx.cpp             |   2 +-
 src/rpcrawtransaction.cpp      |   1 +
 src/script/sign.cpp            | 260 +++++++++++++++++++++++++++++++++
 src/script/sign.h              |  23 +++
 src/scriptutils.cpp            | 246 +------------------------------
 src/scriptutils.h              |  15 --
 src/test/DoS_tests.cpp         |   2 +-
 src/test/multisig_tests.cpp    |   1 +
 src/test/script_P2SH_tests.cpp |   1 +
 src/test/script_tests.cpp      |   2 +-
 src/wallet.cpp                 |   2 +
 12 files changed, 294 insertions(+), 263 deletions(-)
 create mode 100644 src/script/sign.cpp
 create mode 100644 src/script/sign.h

diff --git a/src/Makefile.am b/src/Makefile.am
index efa55f0dc2c7..9b7e99861dd6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,6 +101,7 @@ BITCOIN_CORE_H = \
   script/interpreter.h \
   script/compressor.h \
   script/script.h \
+  script/sign.h \
   script/standard.h \
   scriptutils.h \
   serialize.h \
@@ -213,6 +214,7 @@ libbitcoin_common_a_SOURCES = \
   script/interpreter.cpp \
   script/compressor.cpp \
   script/script.cpp \
+  script/sign.cpp \
   script/standard.cpp \
   scriptutils.cpp \
   $(BITCOIN_CORE_H)
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 3f12304bb20f..c455351411df 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -9,7 +9,7 @@
 #include "main.h"         // for MAX_BLOCK_SIZE
 #include "keystore.h"
 #include "script/script.h"
-#include "scriptutils.h"
+#include "script/sign.h"
 #include "ui_interface.h" // for _(...)
 #include "univalue/univalue.h"
 #include "core_io.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 901a16cd3cc1..b5551524bee1 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -13,6 +13,7 @@
 #include "rpcserver.h"
 #include "script/script.h"
 #include "script/standard.h"
+#include "script/sign.h"
 #include "uint256.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
new file mode 100644
index 000000000000..958177de3d80
--- /dev/null
+++ b/src/script/sign.cpp
@@ -0,0 +1,260 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "script/sign.h"
+
+#include "core.h"
+#include "key.h"
+#include "keystore.h"
+#include "script/standard.h"
+#include "uint256.h"
+
+#include <boost/foreach.hpp>
+
+using namespace std;
+
+typedef vector<unsigned char> valtype;
+
+bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
+{
+    CKey key;
+    if (!keystore.GetKey(address, key))
+        return false;
+
+    vector<unsigned char> vchSig;
+    if (!key.Sign(hash, vchSig))
+        return false;
+    vchSig.push_back((unsigned char)nHashType);
+    scriptSigRet << vchSig;
+
+    return true;
+}
+
+bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
+{
+    int nSigned = 0;
+    int nRequired = multisigdata.front()[0];
+    for (unsigned int i = 1; i < multisigdata.size()-1 && nSigned < nRequired; i++)
+    {
+        const valtype& pubkey = multisigdata[i];
+        CKeyID keyID = CPubKey(pubkey).GetID();
+        if (Sign1(keyID, keystore, hash, nHashType, scriptSigRet))
+            ++nSigned;
+    }
+    return nSigned==nRequired;
+}
+
+//
+// Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.
+// Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed),
+// unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
+// Returns false if scriptPubKey could not be completely satisfied.
+//
+bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType,
+                  CScript& scriptSigRet, txnouttype& whichTypeRet)
+{
+    scriptSigRet.clear();
+
+    vector<valtype> vSolutions;
+    if (!Solver(scriptPubKey, whichTypeRet, vSolutions))
+        return false;
+
+    CKeyID keyID;
+    switch (whichTypeRet)
+    {
+    case TX_NONSTANDARD:
+    case TX_NULL_DATA:
+        return false;
+    case TX_PUBKEY:
+        keyID = CPubKey(vSolutions[0]).GetID();
+        return Sign1(keyID, keystore, hash, nHashType, scriptSigRet);
+    case TX_PUBKEYHASH:
+        keyID = CKeyID(uint160(vSolutions[0]));
+        if (!Sign1(keyID, keystore, hash, nHashType, scriptSigRet))
+            return false;
+        else
+        {
+            CPubKey vch;
+            keystore.GetPubKey(keyID, vch);
+            scriptSigRet << vch;
+        }
+        return true;
+    case TX_SCRIPTHASH:
+        return keystore.GetCScript(uint160(vSolutions[0]), scriptSigRet);
+
+    case TX_MULTISIG:
+        scriptSigRet << OP_0; // workaround CHECKMULTISIG bug
+        return (SignN(vSolutions, keystore, hash, nHashType, scriptSigRet));
+    }
+    return false;
+}
+
+bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
+{
+    assert(nIn < txTo.vin.size());
+    CTxIn& txin = txTo.vin[nIn];
+
+    // Leave out the signature from the hash, since a signature can't sign itself.
+    // The checksig op will also drop the signatures from its hash.
+    uint256 hash = SignatureHash(fromPubKey, txTo, nIn, nHashType);
+
+    txnouttype whichType;
+    if (!Solver(keystore, fromPubKey, hash, nHashType, txin.scriptSig, whichType))
+        return false;
+
+    if (whichType == TX_SCRIPTHASH)
+    {
+        // Solver returns the subscript that need to be evaluated;
+        // the final scriptSig is the signatures from that
+        // and then the serialized subscript:
+        CScript subscript = txin.scriptSig;
+
+        // Recompute txn hash using subscript in place of scriptPubKey:
+        uint256 hash2 = SignatureHash(subscript, txTo, nIn, nHashType);
+
+        txnouttype subType;
+        bool fSolved =
+            Solver(keystore, subscript, hash2, nHashType, txin.scriptSig, subType) && subType != TX_SCRIPTHASH;
+        // Append serialized subscript whether or not it is completely signed:
+        txin.scriptSig << static_cast<valtype>(subscript);
+        if (!fSolved) return false;
+    }
+
+    // Test solution
+    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
+}
+
+bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
+{
+    assert(nIn < txTo.vin.size());
+    CTxIn& txin = txTo.vin[nIn];
+    assert(txin.prevout.n < txFrom.vout.size());
+    const CTxOut& txout = txFrom.vout[txin.prevout.n];
+
+    return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, nHashType);
+}
+
+static CScript PushAll(const vector<valtype>& values)
+{
+    CScript result;
+    BOOST_FOREACH(const valtype& v, values)
+        result << v;
+    return result;
+}
+
+static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction& txTo, unsigned int nIn,
+                               const vector<valtype>& vSolutions,
+                               vector<valtype>& sigs1, vector<valtype>& sigs2)
+{
+    // Combine all the signatures we've got:
+    set<valtype> allsigs;
+    BOOST_FOREACH(const valtype& v, sigs1)
+    {
+        if (!v.empty())
+            allsigs.insert(v);
+    }
+    BOOST_FOREACH(const valtype& v, sigs2)
+    {
+        if (!v.empty())
+            allsigs.insert(v);
+    }
+
+    // Build a map of pubkey -> signature by matching sigs to pubkeys:
+    assert(vSolutions.size() > 1);
+    unsigned int nSigsRequired = vSolutions.front()[0];
+    unsigned int nPubKeys = vSolutions.size()-2;
+    map<valtype, valtype> sigs;
+    BOOST_FOREACH(const valtype& sig, allsigs)
+    {
+        for (unsigned int i = 0; i < nPubKeys; i++)
+        {
+            const valtype& pubkey = vSolutions[i+1];
+            if (sigs.count(pubkey))
+                continue; // Already got a sig for this pubkey
+
+            if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0, 0))
+            {
+                sigs[pubkey] = sig;
+                break;
+            }
+        }
+    }
+    // Now build a merged CScript:
+    unsigned int nSigsHave = 0;
+    CScript result; result << OP_0; // pop-one-too-many workaround
+    for (unsigned int i = 0; i < nPubKeys && nSigsHave < nSigsRequired; i++)
+    {
+        if (sigs.count(vSolutions[i+1]))
+        {
+            result << sigs[vSolutions[i+1]];
+            ++nSigsHave;
+        }
+    }
+    // Fill any missing with OP_0:
+    for (unsigned int i = nSigsHave; i < nSigsRequired; i++)
+        result << OP_0;
+
+    return result;
+}
+
+static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+                                 const txnouttype txType, const vector<valtype>& vSolutions,
+                                 vector<valtype>& sigs1, vector<valtype>& sigs2)
+{
+    switch (txType)
+    {
+    case TX_NONSTANDARD:
+    case TX_NULL_DATA:
+        // Don't know anything about this, assume bigger one is correct:
+        if (sigs1.size() >= sigs2.size())
+            return PushAll(sigs1);
+        return PushAll(sigs2);
+    case TX_PUBKEY:
+    case TX_PUBKEYHASH:
+        // Signatures are bigger than placeholders or empty scripts:
+        if (sigs1.empty() || sigs1[0].empty())
+            return PushAll(sigs2);
+        return PushAll(sigs1);
+    case TX_SCRIPTHASH:
+        if (sigs1.empty() || sigs1.back().empty())
+            return PushAll(sigs2);
+        else if (sigs2.empty() || sigs2.back().empty())
+            return PushAll(sigs1);
+        else
+        {
+            // Recur to combine:
+            valtype spk = sigs1.back();
+            CScript pubKey2(spk.begin(), spk.end());
+
+            txnouttype txType2;
+            vector<vector<unsigned char> > vSolutions2;
+            Solver(pubKey2, txType2, vSolutions2);
+            sigs1.pop_back();
+            sigs2.pop_back();
+            CScript result = CombineSignatures(pubKey2, txTo, nIn, txType2, vSolutions2, sigs1, sigs2);
+            result << spk;
+            return result;
+        }
+    case TX_MULTISIG:
+        return CombineMultisig(scriptPubKey, txTo, nIn, vSolutions, sigs1, sigs2);
+    }
+
+    return CScript();
+}
+
+CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+                          const CScript& scriptSig1, const CScript& scriptSig2)
+{
+    txnouttype txType;
+    vector<vector<unsigned char> > vSolutions;
+    Solver(scriptPubKey, txType, vSolutions);
+
+    vector<valtype> stack1;
+    EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
+    vector<valtype> stack2;
+    EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
+
+    return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
+}
diff --git a/src/script/sign.h b/src/script/sign.h
new file mode 100644
index 000000000000..51723b53af55
--- /dev/null
+++ b/src/script/sign.h
@@ -0,0 +1,23 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT_SIGN
+#define H_BITCOIN_SCRIPT_SIGN
+
+#include "script/interpreter.h"
+
+class CKeyStore;
+class CScript;
+class CTransaction;
+struct CMutableTransaction;
+
+bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
+bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
+
+// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
+// combine them intelligently and return the result.
+CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
+
+#endif
diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index cc38706d34d3..a636eeedab77 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -5,11 +5,9 @@
 
 #include "scriptutils.h"
 
-#include "core.h"
 #include "key.h"
 #include "keystore.h"
-#include "uint256.h"
-#include "util.h"
+#include "script/standard.h"
 
 #include <boost/foreach.hpp>
 
@@ -17,80 +15,6 @@ using namespace std;
 
 typedef vector<unsigned char> valtype;
 
-bool Sign1(const CKeyID& address, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
-{
-    CKey key;
-    if (!keystore.GetKey(address, key))
-        return false;
-
-    vector<unsigned char> vchSig;
-    if (!key.Sign(hash, vchSig))
-        return false;
-    vchSig.push_back((unsigned char)nHashType);
-    scriptSigRet << vchSig;
-
-    return true;
-}
-
-bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, uint256 hash, int nHashType, CScript& scriptSigRet)
-{
-    int nSigned = 0;
-    int nRequired = multisigdata.front()[0];
-    for (unsigned int i = 1; i < multisigdata.size()-1 && nSigned < nRequired; i++)
-    {
-        const valtype& pubkey = multisigdata[i];
-        CKeyID keyID = CPubKey(pubkey).GetID();
-        if (Sign1(keyID, keystore, hash, nHashType, scriptSigRet))
-            ++nSigned;
-    }
-    return nSigned==nRequired;
-}
-
-//
-// Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.
-// Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed),
-// unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
-// Returns false if scriptPubKey could not be completely satisfied.
-//
-bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType,
-                  CScript& scriptSigRet, txnouttype& whichTypeRet)
-{
-    scriptSigRet.clear();
-
-    vector<valtype> vSolutions;
-    if (!Solver(scriptPubKey, whichTypeRet, vSolutions))
-        return false;
-
-    CKeyID keyID;
-    switch (whichTypeRet)
-    {
-    case TX_NONSTANDARD:
-    case TX_NULL_DATA:
-        return false;
-    case TX_PUBKEY:
-        keyID = CPubKey(vSolutions[0]).GetID();
-        return Sign1(keyID, keystore, hash, nHashType, scriptSigRet);
-    case TX_PUBKEYHASH:
-        keyID = CKeyID(uint160(vSolutions[0]));
-        if (!Sign1(keyID, keystore, hash, nHashType, scriptSigRet))
-            return false;
-        else
-        {
-            CPubKey vch;
-            keystore.GetPubKey(keyID, vch);
-            scriptSigRet << vch;
-        }
-        return true;
-    case TX_SCRIPTHASH:
-        return keystore.GetCScript(uint160(vSolutions[0]), scriptSigRet);
-
-    case TX_MULTISIG:
-        scriptSigRet << OP_0; // workaround CHECKMULTISIG bug
-        return (SignN(vSolutions, keystore, hash, nHashType, scriptSigRet));
-    }
-    return false;
-}
-
 unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
 {
     unsigned int nResult = 0;
@@ -201,171 +125,3 @@ class CAffectedKeysVisitor : public boost::static_visitor<void> {
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys) {
     CAffectedKeysVisitor(keystore, vKeys).Process(scriptPubKey);
 }
-
-bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
-{
-    assert(nIn < txTo.vin.size());
-    CTxIn& txin = txTo.vin[nIn];
-
-    // Leave out the signature from the hash, since a signature can't sign itself.
-    // The checksig op will also drop the signatures from its hash.
-    uint256 hash = SignatureHash(fromPubKey, txTo, nIn, nHashType);
-
-    txnouttype whichType;
-    if (!Solver(keystore, fromPubKey, hash, nHashType, txin.scriptSig, whichType))
-        return false;
-
-    if (whichType == TX_SCRIPTHASH)
-    {
-        // Solver returns the subscript that need to be evaluated;
-        // the final scriptSig is the signatures from that
-        // and then the serialized subscript:
-        CScript subscript = txin.scriptSig;
-
-        // Recompute txn hash using subscript in place of scriptPubKey:
-        uint256 hash2 = SignatureHash(subscript, txTo, nIn, nHashType);
-
-        txnouttype subType;
-        bool fSolved =
-            Solver(keystore, subscript, hash2, nHashType, txin.scriptSig, subType) && subType != TX_SCRIPTHASH;
-        // Append serialized subscript whether or not it is completely signed:
-        txin.scriptSig << static_cast<valtype>(subscript);
-        if (!fSolved) return false;
-    }
-
-    // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
-}
-
-bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
-{
-    assert(nIn < txTo.vin.size());
-    CTxIn& txin = txTo.vin[nIn];
-    assert(txin.prevout.n < txFrom.vout.size());
-    const CTxOut& txout = txFrom.vout[txin.prevout.n];
-
-    return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, nHashType);
-}
-
-static CScript PushAll(const vector<valtype>& values)
-{
-    CScript result;
-    BOOST_FOREACH(const valtype& v, values)
-        result << v;
-    return result;
-}
-
-static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction& txTo, unsigned int nIn,
-                               const vector<valtype>& vSolutions,
-                               vector<valtype>& sigs1, vector<valtype>& sigs2)
-{
-    // Combine all the signatures we've got:
-    set<valtype> allsigs;
-    BOOST_FOREACH(const valtype& v, sigs1)
-    {
-        if (!v.empty())
-            allsigs.insert(v);
-    }
-    BOOST_FOREACH(const valtype& v, sigs2)
-    {
-        if (!v.empty())
-            allsigs.insert(v);
-    }
-
-    // Build a map of pubkey -> signature by matching sigs to pubkeys:
-    assert(vSolutions.size() > 1);
-    unsigned int nSigsRequired = vSolutions.front()[0];
-    unsigned int nPubKeys = vSolutions.size()-2;
-    map<valtype, valtype> sigs;
-    BOOST_FOREACH(const valtype& sig, allsigs)
-    {
-        for (unsigned int i = 0; i < nPubKeys; i++)
-        {
-            const valtype& pubkey = vSolutions[i+1];
-            if (sigs.count(pubkey))
-                continue; // Already got a sig for this pubkey
-
-            if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0, 0))
-            {
-                sigs[pubkey] = sig;
-                break;
-            }
-        }
-    }
-    // Now build a merged CScript:
-    unsigned int nSigsHave = 0;
-    CScript result; result << OP_0; // pop-one-too-many workaround
-    for (unsigned int i = 0; i < nPubKeys && nSigsHave < nSigsRequired; i++)
-    {
-        if (sigs.count(vSolutions[i+1]))
-        {
-            result << sigs[vSolutions[i+1]];
-            ++nSigsHave;
-        }
-    }
-    // Fill any missing with OP_0:
-    for (unsigned int i = nSigsHave; i < nSigsRequired; i++)
-        result << OP_0;
-
-    return result;
-}
-
-static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
-                                 const txnouttype txType, const vector<valtype>& vSolutions,
-                                 vector<valtype>& sigs1, vector<valtype>& sigs2)
-{
-    switch (txType)
-    {
-    case TX_NONSTANDARD:
-    case TX_NULL_DATA:
-        // Don't know anything about this, assume bigger one is correct:
-        if (sigs1.size() >= sigs2.size())
-            return PushAll(sigs1);
-        return PushAll(sigs2);
-    case TX_PUBKEY:
-    case TX_PUBKEYHASH:
-        // Signatures are bigger than placeholders or empty scripts:
-        if (sigs1.empty() || sigs1[0].empty())
-            return PushAll(sigs2);
-        return PushAll(sigs1);
-    case TX_SCRIPTHASH:
-        if (sigs1.empty() || sigs1.back().empty())
-            return PushAll(sigs2);
-        else if (sigs2.empty() || sigs2.back().empty())
-            return PushAll(sigs1);
-        else
-        {
-            // Recur to combine:
-            valtype spk = sigs1.back();
-            CScript pubKey2(spk.begin(), spk.end());
-
-            txnouttype txType2;
-            vector<vector<unsigned char> > vSolutions2;
-            Solver(pubKey2, txType2, vSolutions2);
-            sigs1.pop_back();
-            sigs2.pop_back();
-            CScript result = CombineSignatures(pubKey2, txTo, nIn, txType2, vSolutions2, sigs1, sigs2);
-            result << spk;
-            return result;
-        }
-    case TX_MULTISIG:
-        return CombineMultisig(scriptPubKey, txTo, nIn, vSolutions, sigs1, sigs2);
-    }
-
-    return CScript();
-}
-
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
-                          const CScript& scriptSig1, const CScript& scriptSig2)
-{
-    txnouttype txType;
-    vector<vector<unsigned char> > vSolutions;
-    Solver(scriptPubKey, txType, vSolutions);
-
-    vector<valtype> stack1;
-    EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
-    vector<valtype> stack2;
-    EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
-
-    return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
-}
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 1c7408124e10..98080fc456cb 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -8,17 +8,8 @@
 
 #include "key.h"
 #include "script/script.h"
-#include "script/interpreter.h"
-#include "script/standard.h"
-
-#include <stdexcept>
-#include <stdint.h>
-#include <string>
-#include <vector>
 
 class CKeyStore;
-class CTransaction;
-struct CMutableTransaction;
 
 /** IsMine() return codes */
 enum isminetype
@@ -34,11 +25,5 @@ typedef uint8_t isminefilter;
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
-bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
-bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
-
-// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
-// combine them intelligently and return the result.
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
 #endif // H_BITCOIN_SCRIPT
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index a1134258917b..fa4edff63f1e 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -12,7 +12,7 @@
 #include "main.h"
 #include "net.h"
 #include "pow.h"
-#include "scriptutils.h"
+#include "script/sign.h"
 #include "serialize.h"
 #include "util.h"
 
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index e28682522bbe..6c5afa130c76 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -7,6 +7,7 @@
 #include "main.h"
 #include "script/script.h"
 #include "script/interpreter.h"
+#include "script/sign.h"
 #include "scriptutils.h"
 #include "uint256.h"
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 9136d6229286..b7e7487bb2bb 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -6,6 +6,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/sign.h"
 #include "scriptutils.h"
 
 #include <vector>
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index ff56bdf13bae..88efc3896493 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -9,7 +9,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
-#include "scriptutils.h"
+#include "script/sign.h"
 #include "core_io.h"
 
 #include <fstream>
diff --git a/src/wallet.cpp b/src/wallet.cpp
index d3ad4869bbea..b69ed223b49c 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -9,6 +9,8 @@
 #include "checkpoints.h"
 #include "coincontrol.h"
 #include "net.h"
+#include "script/script.h"
+#include "script/sign.h"
 #include "timedata.h"
 #include "util.h"
 #include "utilmoneystr.h"

From 21f139b4a622f07679f1d1c30ad32e2b40a2617e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 5 Sep 2014 22:55:54 -0400
Subject: [PATCH 0669/1819] qt: fix tablet crash. closes #4854.

This backports the relevant parts of:
https://codereview.qt-project.org/#/c/82689/
---
 depends/packages/qt.mk                  |  5 +++--
 depends/patches/qt/qt5-tablet-osx.patch | 20 ++++++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)
 create mode 100644 depends/patches/qt/qt5-tablet-osx.patch

diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index cce7d6e6efa4..e719e2e506c4 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -7,7 +7,7 @@ $(package)_dependencies=openssl
 $(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
 $(package)_build_subdir=qtbase
 $(package)_qt_libs=corelib network widgets gui plugins testlib
-$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch
+$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch
 
 define $(package)_set_vars
 $(package)_config_opts  = -release -opensource -confirm-license
@@ -52,7 +52,8 @@ define $(package)_preprocess_cmds
   cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
   cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
   cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
-  patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch
+  patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
+  patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch
 endef
 
 define $(package)_config_cmds
diff --git a/depends/patches/qt/qt5-tablet-osx.patch b/depends/patches/qt/qt5-tablet-osx.patch
new file mode 100644
index 000000000000..7deabf8d4e04
--- /dev/null
+++ b/depends/patches/qt/qt5-tablet-osx.patch
@@ -0,0 +1,20 @@
+--- old/qtbase/src/widgets/kernel/qwidgetwindow.cpp	2014-09-05 20:45:18.717570370 -0400
++++ new/qtbase/src/widgets/kernel/qwidgetwindow.cpp	2014-09-05 20:52:38.653576561 -0400
+@@ -57,7 +57,7 @@
+ Q_WIDGETS_EXPORT extern bool qt_tab_all_widgets();
+ 
+ QWidget *qt_button_down = 0; // widget got last button-down
+-static QWidget *qt_tablet_target = 0;
++static QPointer<QWidget> qt_tablet_target = 0;
+ 
+ // popup control
+ QWidget *qt_popup_down = 0; // popup that contains the pressed widget
+@@ -96,8 +96,6 @@
+ 
+ QWidgetWindow::~QWidgetWindow()
+ {
+-    if (m_widget == qt_tablet_target)
+-        qt_tablet_target = 0;
+ }
+ 
+ #ifndef QT_NO_ACCESSIBILITY

From 6db83db3eb96809da3e680464b152f82785e38e6 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 3 Sep 2014 02:52:01 +0200
Subject: [PATCH 0670/1819] Decouple CChain from mapBlockIndex

---
 src/init.cpp |  2 +-
 src/main.cpp | 11 ++++++-----
 src/main.h   |  6 +++---
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 31f64878fb25..f83dfe2f9943 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1151,7 +1151,7 @@ bool AppInit2(boost::thread_group& threadGroup)
             CWalletDB walletdb(strWalletFile);
             CBlockLocator locator;
             if (walletdb.ReadBestBlock(locator))
-                pindexRescan = chainActive.FindFork(locator);
+                pindexRescan = FindForkInGlobalIndex(chainActive, locator);
             else
                 pindexRescan = chainActive.Genesis();
         }
diff --git a/src/main.cpp b/src/main.cpp
index a3b31b719d57..108f8e0823aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -431,18 +431,19 @@ CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
     return CBlockLocator(vHave);
 }
 
-CBlockIndex *CChain::FindFork(const CBlockLocator &locator) const {
+CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator)
+{
     // Find the first block the caller has in the main chain
     BOOST_FOREACH(const uint256& hash, locator.vHave) {
         BlockMap::iterator mi = mapBlockIndex.find(hash);
         if (mi != mapBlockIndex.end())
         {
             CBlockIndex* pindex = (*mi).second;
-            if (Contains(pindex))
+            if (chain.Contains(pindex))
                 return pindex;
         }
     }
-    return Genesis();
+    return chain.Genesis();
 }
 
 const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
@@ -3672,7 +3673,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         LOCK(cs_main);
 
         // Find the last block the caller has in the main chain
-        CBlockIndex* pindex = chainActive.FindFork(locator);
+        CBlockIndex* pindex = FindForkInGlobalIndex(chainActive, locator);
 
         // Send the rest of the chain
         if (pindex)
@@ -3719,7 +3720,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         else
         {
             // Find the last block the caller has in the main chain
-            pindex = chainActive.FindFork(locator);
+            pindex = FindForkInGlobalIndex(chainActive, locator);
             if (pindex)
                 pindex = chainActive.Next(pindex);
         }
diff --git a/src/main.h b/src/main.h
index 30cccab2f1cb..dbc20783bbbd 100644
--- a/src/main.h
+++ b/src/main.h
@@ -953,13 +953,13 @@ class CChain {
     /** Return a CBlockLocator that refers to a block in this chain (by default the tip). */
     CBlockLocator GetLocator(const CBlockIndex *pindex = NULL) const;
 
-    /** Find the last common block between this chain and a locator. */
-    CBlockIndex *FindFork(const CBlockLocator &locator) const;
-
     /** Find the last common block between this chain and a block index entry. */
     const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
 };
 
+/** Find the last common block between the parameter chain and a locator. */
+CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator);
+
 /** The currently-connected chain of blocks. */
 extern CChain chainActive;
 

From e8b5f0d549b1b76611c7374bed9ceec7d09fa847 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 3 Sep 2014 02:20:09 +0200
Subject: [PATCH 0671/1819] Move CBlockIndex, CChain and related code out of
 main

---
 src/Makefile.am |   2 +
 src/chain.cpp   |  59 ++++++++
 src/chain.h     | 390 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/main.cpp    |  54 -------
 src/main.h      | 381 +---------------------------------------------
 5 files changed, 452 insertions(+), 434 deletions(-)
 create mode 100644 src/chain.cpp
 create mode 100644 src/chain.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 9b7e99861dd6..56e141532ad9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -67,6 +67,7 @@ BITCOIN_CORE_H = \
   allocators.h \
   base58.h \
   bloom.h \
+  chain.h \
   chainparams.h \
   chainparamsbase.h \
   chainparamsseeds.h \
@@ -145,6 +146,7 @@ libbitcoin_server_a_SOURCES = \
   addrman.cpp \
   alert.cpp \
   bloom.cpp \
+  chain.cpp \
   checkpoints.cpp \
   init.cpp \
   leveldbwrapper.cpp \
diff --git a/src/chain.cpp b/src/chain.cpp
new file mode 100644
index 000000000000..bcb497b2d491
--- /dev/null
+++ b/src/chain.cpp
@@ -0,0 +1,59 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "chain.h"
+
+using namespace std;
+
+// CChain implementation
+
+CBlockIndex *CChain::SetTip(CBlockIndex *pindex) {
+    if (pindex == NULL) {
+        vChain.clear();
+        return NULL;
+    }
+    vChain.resize(pindex->nHeight + 1);
+    while (pindex && vChain[pindex->nHeight] != pindex) {
+        vChain[pindex->nHeight] = pindex;
+        pindex = pindex->pprev;
+    }
+    return pindex;
+}
+
+CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
+    int nStep = 1;
+    std::vector<uint256> vHave;
+    vHave.reserve(32);
+
+    if (!pindex)
+        pindex = Tip();
+    while (pindex) {
+        vHave.push_back(pindex->GetBlockHash());
+        // Stop when we have added the genesis block.
+        if (pindex->nHeight == 0)
+            break;
+        // Exponentially larger steps back, plus the genesis block.
+        int nHeight = std::max(pindex->nHeight - nStep, 0);
+        if (Contains(pindex)) {
+            // Use O(1) CChain index if possible.
+            pindex = (*this)[nHeight];
+        } else {
+            // Otherwise, use O(log n) skiplist.
+            pindex = pindex->GetAncestor(nHeight);
+        }
+        if (vHave.size() > 10)
+            nStep *= 2;
+    }
+
+    return CBlockLocator(vHave);
+}
+
+const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
+    if (pindex->nHeight > Height())
+        pindex = pindex->GetAncestor(Height());
+    while (pindex && !Contains(pindex))
+        pindex = pindex->pprev;
+    return pindex;
+}
diff --git a/src/chain.h b/src/chain.h
new file mode 100644
index 000000000000..91bdf383475f
--- /dev/null
+++ b/src/chain.h
@@ -0,0 +1,390 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_CHAIN
+#define H_BITCOIN_CHAIN
+
+#include "core.h"
+#include "pow.h"
+#include "uint256.h"
+
+#include <vector>
+
+#include <boost/foreach.hpp>
+
+struct CDiskBlockPos
+{
+    int nFile;
+    unsigned int nPos;
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(VARINT(nFile));
+        READWRITE(VARINT(nPos));
+    }
+
+    CDiskBlockPos() {
+        SetNull();
+    }
+
+    CDiskBlockPos(int nFileIn, unsigned int nPosIn) {
+        nFile = nFileIn;
+        nPos = nPosIn;
+    }
+
+    friend bool operator==(const CDiskBlockPos &a, const CDiskBlockPos &b) {
+        return (a.nFile == b.nFile && a.nPos == b.nPos);
+    }
+
+    friend bool operator!=(const CDiskBlockPos &a, const CDiskBlockPos &b) {
+        return !(a == b);
+    }
+
+    void SetNull() { nFile = -1; nPos = 0; }
+    bool IsNull() const { return (nFile == -1); }
+};
+
+enum BlockStatus {
+    BLOCK_VALID_UNKNOWN      =    0,
+    BLOCK_VALID_HEADER       =    1, // parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
+    BLOCK_VALID_TREE         =    2, // parent found, difficulty matches, timestamp >= median previous, checkpoint
+    BLOCK_VALID_TRANSACTIONS =    3, // only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root
+    BLOCK_VALID_CHAIN        =    4, // outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30
+    BLOCK_VALID_SCRIPTS      =    5, // scripts/signatures ok
+    BLOCK_VALID_MASK         =   BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
+                                 BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
+
+    BLOCK_HAVE_DATA          =    8, // full block available in blk*.dat
+    BLOCK_HAVE_UNDO          =   16, // undo data available in rev*.dat
+    BLOCK_HAVE_MASK          =   BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO,
+
+    BLOCK_FAILED_VALID       =   32, // stage after last reached validness failed
+    BLOCK_FAILED_CHILD       =   64, // descends from failed block
+    BLOCK_FAILED_MASK        =   BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD,
+};
+
+/** The block chain is a tree shaped structure starting with the
+ * genesis block at the root, with each block potentially having multiple
+ * candidates to be the next block. A blockindex may have multiple pprev pointing
+ * to it, but at most one of them can be part of the currently active branch.
+ */
+class CBlockIndex
+{
+public:
+    // pointer to the hash of the block, if any. memory is owned by this CBlockIndex
+    const uint256* phashBlock;
+
+    // pointer to the index of the predecessor of this block
+    CBlockIndex* pprev;
+
+    // pointer to the index of some further predecessor of this block
+    CBlockIndex* pskip;
+
+    // height of the entry in the chain. The genesis block has height 0
+    int nHeight;
+
+    // Which # file this block is stored in (blk?????.dat)
+    int nFile;
+
+    // Byte offset within blk?????.dat where this block's data is stored
+    unsigned int nDataPos;
+
+    // Byte offset within rev?????.dat where this block's undo data is stored
+    unsigned int nUndoPos;
+
+    // (memory only) Total amount of work (expected number of hashes) in the chain up to and including this block
+    uint256 nChainWork;
+
+    // Number of transactions in this block.
+    // Note: in a potential headers-first mode, this number cannot be relied upon
+    unsigned int nTx;
+
+    // (memory only) Number of transactions in the chain up to and including this block
+    unsigned int nChainTx; // change to 64-bit type when necessary; won't happen before 2030
+
+    // Verification status of this block. See enum BlockStatus
+    unsigned int nStatus;
+
+    // block header
+    int nVersion;
+    uint256 hashMerkleRoot;
+    unsigned int nTime;
+    unsigned int nBits;
+    unsigned int nNonce;
+
+    // (memory only) Sequencial id assigned to distinguish order in which blocks are received.
+    uint32_t nSequenceId;
+
+    void SetNull()
+    {
+        phashBlock = NULL;
+        pprev = NULL;
+        pskip = NULL;
+        nHeight = 0;
+        nFile = 0;
+        nDataPos = 0;
+        nUndoPos = 0;
+        nChainWork = 0;
+        nTx = 0;
+        nChainTx = 0;
+        nStatus = 0;
+        nSequenceId = 0;
+
+        nVersion       = 0;
+        hashMerkleRoot = 0;
+        nTime          = 0;
+        nBits          = 0;
+        nNonce         = 0;
+    }
+
+    CBlockIndex()
+    {
+        SetNull();
+    }
+
+    CBlockIndex(CBlockHeader& block)
+    {
+        SetNull();
+
+        nVersion       = block.nVersion;
+        hashMerkleRoot = block.hashMerkleRoot;
+        nTime          = block.nTime;
+        nBits          = block.nBits;
+        nNonce         = block.nNonce;
+    }
+
+    CDiskBlockPos GetBlockPos() const {
+        CDiskBlockPos ret;
+        if (nStatus & BLOCK_HAVE_DATA) {
+            ret.nFile = nFile;
+            ret.nPos  = nDataPos;
+        }
+        return ret;
+    }
+
+    CDiskBlockPos GetUndoPos() const {
+        CDiskBlockPos ret;
+        if (nStatus & BLOCK_HAVE_UNDO) {
+            ret.nFile = nFile;
+            ret.nPos  = nUndoPos;
+        }
+        return ret;
+    }
+
+    CBlockHeader GetBlockHeader() const
+    {
+        CBlockHeader block;
+        block.nVersion       = nVersion;
+        if (pprev)
+            block.hashPrevBlock = pprev->GetBlockHash();
+        block.hashMerkleRoot = hashMerkleRoot;
+        block.nTime          = nTime;
+        block.nBits          = nBits;
+        block.nNonce         = nNonce;
+        return block;
+    }
+
+    uint256 GetBlockHash() const
+    {
+        return *phashBlock;
+    }
+
+    int64_t GetBlockTime() const
+    {
+        return (int64_t)nTime;
+    }
+
+    uint256 GetBlockWork() const
+    {
+        return GetProofIncrement(nBits);
+    }
+
+    enum { nMedianTimeSpan=11 };
+
+    int64_t GetMedianTimePast() const
+    {
+        int64_t pmedian[nMedianTimeSpan];
+        int64_t* pbegin = &pmedian[nMedianTimeSpan];
+        int64_t* pend = &pmedian[nMedianTimeSpan];
+
+        const CBlockIndex* pindex = this;
+        for (int i = 0; i < nMedianTimeSpan && pindex; i++, pindex = pindex->pprev)
+            *(--pbegin) = pindex->GetBlockTime();
+
+        std::sort(pbegin, pend);
+        return pbegin[(pend - pbegin)/2];
+    }
+
+    /**
+     * Returns true if there are nRequired or more blocks of minVersion or above
+     * in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart 
+     * and going backwards.
+     */
+    static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart,
+                                unsigned int nRequired);
+
+    std::string ToString() const
+    {
+        return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)",
+            pprev, nHeight,
+            hashMerkleRoot.ToString(),
+            GetBlockHash().ToString());
+    }
+
+    // Check whether this block index entry is valid up to the passed validity level.
+    bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
+    {
+        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
+        if (nStatus & BLOCK_FAILED_MASK)
+            return false;
+        return ((nStatus & BLOCK_VALID_MASK) >= nUpTo);
+    }
+
+    // Raise the validity level of this block index entry.
+    // Returns true if the validity was changed.
+    bool RaiseValidity(enum BlockStatus nUpTo)
+    {
+        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
+        if (nStatus & BLOCK_FAILED_MASK)
+            return false;
+        if ((nStatus & BLOCK_VALID_MASK) < nUpTo) {
+            nStatus = (nStatus & ~BLOCK_VALID_MASK) | nUpTo;
+            return true;
+        }
+        return false;
+    }
+
+    // Build the skiplist pointer for this entry.
+    void BuildSkip();
+
+    // Efficiently find an ancestor of this block.
+    CBlockIndex* GetAncestor(int height);
+    const CBlockIndex* GetAncestor(int height) const;
+};
+
+/** Used to marshal pointers into hashes for db storage. */
+class CDiskBlockIndex : public CBlockIndex
+{
+public:
+    uint256 hashPrev;
+
+    CDiskBlockIndex() {
+        hashPrev = 0;
+    }
+
+    explicit CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) {
+        hashPrev = (pprev ? pprev->GetBlockHash() : 0);
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        if (!(nType & SER_GETHASH))
+            READWRITE(VARINT(nVersion));
+
+        READWRITE(VARINT(nHeight));
+        READWRITE(VARINT(nStatus));
+        READWRITE(VARINT(nTx));
+        if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
+            READWRITE(VARINT(nFile));
+        if (nStatus & BLOCK_HAVE_DATA)
+            READWRITE(VARINT(nDataPos));
+        if (nStatus & BLOCK_HAVE_UNDO)
+            READWRITE(VARINT(nUndoPos));
+
+        // block header
+        READWRITE(this->nVersion);
+        READWRITE(hashPrev);
+        READWRITE(hashMerkleRoot);
+        READWRITE(nTime);
+        READWRITE(nBits);
+        READWRITE(nNonce);
+    }
+
+    uint256 GetBlockHash() const
+    {
+        CBlockHeader block;
+        block.nVersion        = nVersion;
+        block.hashPrevBlock   = hashPrev;
+        block.hashMerkleRoot  = hashMerkleRoot;
+        block.nTime           = nTime;
+        block.nBits           = nBits;
+        block.nNonce          = nNonce;
+        return block.GetHash();
+    }
+
+
+    std::string ToString() const
+    {
+        std::string str = "CDiskBlockIndex(";
+        str += CBlockIndex::ToString();
+        str += strprintf("\n                hashBlock=%s, hashPrev=%s)",
+            GetBlockHash().ToString(),
+            hashPrev.ToString());
+        return str;
+    }
+};
+
+/** An in-memory indexed chain of blocks. */
+class CChain {
+private:
+    std::vector<CBlockIndex*> vChain;
+
+public:
+    /** Returns the index entry for the genesis block of this chain, or NULL if none. */
+    CBlockIndex *Genesis() const {
+        return vChain.size() > 0 ? vChain[0] : NULL;
+    }
+
+    /** Returns the index entry for the tip of this chain, or NULL if none. */
+    CBlockIndex *Tip() const {
+        return vChain.size() > 0 ? vChain[vChain.size() - 1] : NULL;
+    }
+
+    /** Returns the index entry at a particular height in this chain, or NULL if no such height exists. */
+    CBlockIndex *operator[](int nHeight) const {
+        if (nHeight < 0 || nHeight >= (int)vChain.size())
+            return NULL;
+        return vChain[nHeight];
+    }
+
+    /** Compare two chains efficiently. */
+    friend bool operator==(const CChain &a, const CChain &b) {
+        return a.vChain.size() == b.vChain.size() &&
+               a.vChain[a.vChain.size() - 1] == b.vChain[b.vChain.size() - 1];
+    }
+
+    /** Efficiently check whether a block is present in this chain. */
+    bool Contains(const CBlockIndex *pindex) const {
+        return (*this)[pindex->nHeight] == pindex;
+    }
+
+    /** Find the successor of a block in this chain, or NULL if the given index is not found or is the tip. */
+    CBlockIndex *Next(const CBlockIndex *pindex) const {
+        if (Contains(pindex))
+            return (*this)[pindex->nHeight + 1];
+        else
+            return NULL;
+    }
+
+    /** Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */
+    int Height() const {
+        return vChain.size() - 1;
+    }
+
+    /** Set/initialize a chain with a given tip. Returns the forking point. */
+    CBlockIndex *SetTip(CBlockIndex *pindex);
+
+    /** Return a CBlockLocator that refers to a block in this chain (by default the tip). */
+    CBlockLocator GetLocator(const CBlockIndex *pindex = NULL) const;
+
+    /** Find the last common block between this chain and a block index entry. */
+    const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
+};
+
+#endif 
diff --git a/src/main.cpp b/src/main.cpp
index 108f8e0823aa..5210f8ef55c1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -385,52 +385,6 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals)
     nodeSignals.FinalizeNode.disconnect(&FinalizeNode);
 }
 
-//////////////////////////////////////////////////////////////////////////////
-//
-// CChain implementation
-//
-
-CBlockIndex *CChain::SetTip(CBlockIndex *pindex) {
-    if (pindex == NULL) {
-        vChain.clear();
-        return NULL;
-    }
-    vChain.resize(pindex->nHeight + 1);
-    while (pindex && vChain[pindex->nHeight] != pindex) {
-        vChain[pindex->nHeight] = pindex;
-        pindex = pindex->pprev;
-    }
-    return pindex;
-}
-
-CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
-    int nStep = 1;
-    std::vector<uint256> vHave;
-    vHave.reserve(32);
-
-    if (!pindex)
-        pindex = Tip();
-    while (pindex) {
-        vHave.push_back(pindex->GetBlockHash());
-        // Stop when we have added the genesis block.
-        if (pindex->nHeight == 0)
-            break;
-        // Exponentially larger steps back, plus the genesis block.
-        int nHeight = std::max(pindex->nHeight - nStep, 0);
-        if (Contains(pindex)) {
-            // Use O(1) CChain index if possible.
-            pindex = (*this)[nHeight];
-        } else {
-            // Otherwise, use O(log n) skiplist.
-            pindex = pindex->GetAncestor(nHeight);
-        }
-        if (vHave.size() > 10)
-            nStep *= 2;
-    }
-
-    return CBlockLocator(vHave);
-}
-
 CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator)
 {
     // Find the first block the caller has in the main chain
@@ -446,14 +400,6 @@ CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& loc
     return chain.Genesis();
 }
 
-const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
-    if (pindex->nHeight > Height())
-        pindex = pindex->GetAncestor(Height());
-    while (pindex && !Contains(pindex))
-        pindex = pindex->pprev;
-    return pindex;
-}
-
 CCoinsViewCache *pcoinsTip = NULL;
 CBlockTreeDB *pblocktree = NULL;
 
diff --git a/src/main.h b/src/main.h
index dbc20783bbbd..ff55a26cac3d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -10,6 +10,7 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include "chain.h"
 #include "chainparams.h"
 #include "coins.h"
 #include "core.h"
@@ -113,7 +114,6 @@ static const uint64_t nMinDiskSpace = 52428800;
 
 
 class CBlockTreeDB;
-struct CDiskBlockPos;
 class CTxUndo;
 class CScriptCheck;
 class CValidationState;
@@ -189,51 +189,11 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
                         bool* pfMissingInputs, bool fRejectInsaneFee=false);
 
 
-
-
-
-
-
-
 struct CNodeStateStats {
     int nMisbehavior;
     int nSyncHeight;
 };
 
-struct CDiskBlockPos
-{
-    int nFile;
-    unsigned int nPos;
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(VARINT(nFile));
-        READWRITE(VARINT(nPos));
-    }
-
-    CDiskBlockPos() {
-        SetNull();
-    }
-
-    CDiskBlockPos(int nFileIn, unsigned int nPosIn) {
-        nFile = nFileIn;
-        nPos = nPosIn;
-    }
-
-    friend bool operator==(const CDiskBlockPos &a, const CDiskBlockPos &b) {
-        return (a.nFile == b.nFile && a.nPos == b.nPos);
-    }
-
-    friend bool operator!=(const CDiskBlockPos &a, const CDiskBlockPos &b) {
-        return !(a == b);
-    }
-
-    void SetNull() { nFile = -1; nPos = 0; }
-    bool IsNull() const { return (nFile == -1); }
-};
-
 struct CDiskTxPos : public CDiskBlockPos
 {
     unsigned int nTxOffset; // after header
@@ -547,288 +507,6 @@ class CBlockFileInfo
      }
 };
 
-enum BlockStatus {
-    BLOCK_VALID_UNKNOWN      =    0,
-    BLOCK_VALID_HEADER       =    1, // parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
-    BLOCK_VALID_TREE         =    2, // parent found, difficulty matches, timestamp >= median previous, checkpoint
-    BLOCK_VALID_TRANSACTIONS =    3, // only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root
-    BLOCK_VALID_CHAIN        =    4, // outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30
-    BLOCK_VALID_SCRIPTS      =    5, // scripts/signatures ok
-    BLOCK_VALID_MASK         =   BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
-                                 BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
-
-    BLOCK_HAVE_DATA          =    8, // full block available in blk*.dat
-    BLOCK_HAVE_UNDO          =   16, // undo data available in rev*.dat
-    BLOCK_HAVE_MASK          =   BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO,
-
-    BLOCK_FAILED_VALID       =   32, // stage after last reached validness failed
-    BLOCK_FAILED_CHILD       =   64, // descends from failed block
-    BLOCK_FAILED_MASK        =   BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD,
-};
-
-/** The block chain is a tree shaped structure starting with the
- * genesis block at the root, with each block potentially having multiple
- * candidates to be the next block. A blockindex may have multiple pprev pointing
- * to it, but at most one of them can be part of the currently active branch.
- */
-class CBlockIndex
-{
-public:
-    // pointer to the hash of the block, if any. memory is owned by this CBlockIndex
-    const uint256* phashBlock;
-
-    // pointer to the index of the predecessor of this block
-    CBlockIndex* pprev;
-
-    // pointer to the index of some further predecessor of this block
-    CBlockIndex* pskip;
-
-    // height of the entry in the chain. The genesis block has height 0
-    int nHeight;
-
-    // Which # file this block is stored in (blk?????.dat)
-    int nFile;
-
-    // Byte offset within blk?????.dat where this block's data is stored
-    unsigned int nDataPos;
-
-    // Byte offset within rev?????.dat where this block's undo data is stored
-    unsigned int nUndoPos;
-
-    // (memory only) Total amount of work (expected number of hashes) in the chain up to and including this block
-    uint256 nChainWork;
-
-    // Number of transactions in this block.
-    // Note: in a potential headers-first mode, this number cannot be relied upon
-    unsigned int nTx;
-
-    // (memory only) Number of transactions in the chain up to and including this block
-    unsigned int nChainTx; // change to 64-bit type when necessary; won't happen before 2030
-
-    // Verification status of this block. See enum BlockStatus
-    unsigned int nStatus;
-
-    // block header
-    int nVersion;
-    uint256 hashMerkleRoot;
-    unsigned int nTime;
-    unsigned int nBits;
-    unsigned int nNonce;
-
-    // (memory only) Sequencial id assigned to distinguish order in which blocks are received.
-    uint32_t nSequenceId;
-
-    void SetNull()
-    {
-        phashBlock = NULL;
-        pprev = NULL;
-        pskip = NULL;
-        nHeight = 0;
-        nFile = 0;
-        nDataPos = 0;
-        nUndoPos = 0;
-        nChainWork = 0;
-        nTx = 0;
-        nChainTx = 0;
-        nStatus = 0;
-        nSequenceId = 0;
-
-        nVersion       = 0;
-        hashMerkleRoot = 0;
-        nTime          = 0;
-        nBits          = 0;
-        nNonce         = 0;
-    }
-
-    CBlockIndex()
-    {
-        SetNull();
-    }
-
-    CBlockIndex(CBlockHeader& block)
-    {
-        SetNull();
-
-        nVersion       = block.nVersion;
-        hashMerkleRoot = block.hashMerkleRoot;
-        nTime          = block.nTime;
-        nBits          = block.nBits;
-        nNonce         = block.nNonce;
-    }
-
-    CDiskBlockPos GetBlockPos() const {
-        CDiskBlockPos ret;
-        if (nStatus & BLOCK_HAVE_DATA) {
-            ret.nFile = nFile;
-            ret.nPos  = nDataPos;
-        }
-        return ret;
-    }
-
-    CDiskBlockPos GetUndoPos() const {
-        CDiskBlockPos ret;
-        if (nStatus & BLOCK_HAVE_UNDO) {
-            ret.nFile = nFile;
-            ret.nPos  = nUndoPos;
-        }
-        return ret;
-    }
-
-    CBlockHeader GetBlockHeader() const
-    {
-        CBlockHeader block;
-        block.nVersion       = nVersion;
-        if (pprev)
-            block.hashPrevBlock = pprev->GetBlockHash();
-        block.hashMerkleRoot = hashMerkleRoot;
-        block.nTime          = nTime;
-        block.nBits          = nBits;
-        block.nNonce         = nNonce;
-        return block;
-    }
-
-    uint256 GetBlockHash() const
-    {
-        return *phashBlock;
-    }
-
-    int64_t GetBlockTime() const
-    {
-        return (int64_t)nTime;
-    }
-
-    uint256 GetBlockWork() const
-    {
-        return GetProofIncrement(nBits);
-    }
-
-    enum { nMedianTimeSpan=11 };
-
-    int64_t GetMedianTimePast() const
-    {
-        int64_t pmedian[nMedianTimeSpan];
-        int64_t* pbegin = &pmedian[nMedianTimeSpan];
-        int64_t* pend = &pmedian[nMedianTimeSpan];
-
-        const CBlockIndex* pindex = this;
-        for (int i = 0; i < nMedianTimeSpan && pindex; i++, pindex = pindex->pprev)
-            *(--pbegin) = pindex->GetBlockTime();
-
-        std::sort(pbegin, pend);
-        return pbegin[(pend - pbegin)/2];
-    }
-
-    /**
-     * Returns true if there are nRequired or more blocks of minVersion or above
-     * in the last Params().ToCheckBlockUpgradeMajority() blocks, starting at pstart 
-     * and going backwards.
-     */
-    static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart,
-                                unsigned int nRequired);
-
-    std::string ToString() const
-    {
-        return strprintf("CBlockIndex(pprev=%p, nHeight=%d, merkle=%s, hashBlock=%s)",
-            pprev, nHeight,
-            hashMerkleRoot.ToString(),
-            GetBlockHash().ToString());
-    }
-
-    // Check whether this block index entry is valid up to the passed validity level.
-    bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
-    {
-        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
-        if (nStatus & BLOCK_FAILED_MASK)
-            return false;
-        return ((nStatus & BLOCK_VALID_MASK) >= nUpTo);
-    }
-
-    // Raise the validity level of this block index entry.
-    // Returns true if the validity was changed.
-    bool RaiseValidity(enum BlockStatus nUpTo)
-    {
-        assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
-        if (nStatus & BLOCK_FAILED_MASK)
-            return false;
-        if ((nStatus & BLOCK_VALID_MASK) < nUpTo) {
-            nStatus = (nStatus & ~BLOCK_VALID_MASK) | nUpTo;
-            return true;
-        }
-        return false;
-    }
-
-    // Build the skiplist pointer for this entry.
-    void BuildSkip();
-
-    // Efficiently find an ancestor of this block.
-    CBlockIndex* GetAncestor(int height);
-    const CBlockIndex* GetAncestor(int height) const;
-};
-
-/** Used to marshal pointers into hashes for db storage. */
-class CDiskBlockIndex : public CBlockIndex
-{
-public:
-    uint256 hashPrev;
-
-    CDiskBlockIndex() {
-        hashPrev = 0;
-    }
-
-    explicit CDiskBlockIndex(CBlockIndex* pindex) : CBlockIndex(*pindex) {
-        hashPrev = (pprev ? pprev->GetBlockHash() : 0);
-    }
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        if (!(nType & SER_GETHASH))
-            READWRITE(VARINT(nVersion));
-
-        READWRITE(VARINT(nHeight));
-        READWRITE(VARINT(nStatus));
-        READWRITE(VARINT(nTx));
-        if (nStatus & (BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO))
-            READWRITE(VARINT(nFile));
-        if (nStatus & BLOCK_HAVE_DATA)
-            READWRITE(VARINT(nDataPos));
-        if (nStatus & BLOCK_HAVE_UNDO)
-            READWRITE(VARINT(nUndoPos));
-
-        // block header
-        READWRITE(this->nVersion);
-        READWRITE(hashPrev);
-        READWRITE(hashMerkleRoot);
-        READWRITE(nTime);
-        READWRITE(nBits);
-        READWRITE(nNonce);
-    }
-
-    uint256 GetBlockHash() const
-    {
-        CBlockHeader block;
-        block.nVersion        = nVersion;
-        block.hashPrevBlock   = hashPrev;
-        block.hashMerkleRoot  = hashMerkleRoot;
-        block.nTime           = nTime;
-        block.nBits           = nBits;
-        block.nNonce          = nNonce;
-        return block.GetHash();
-    }
-
-
-    std::string ToString() const
-    {
-        std::string str = "CDiskBlockIndex(";
-        str += CBlockIndex::ToString();
-        str += strprintf("\n                hashBlock=%s, hashPrev=%s)",
-            GetBlockHash().ToString(),
-            hashPrev.ToString());
-        return str;
-    }
-};
-
 /** Capture information about block/transaction validation */
 class CValidationState {
 private:
@@ -900,63 +578,6 @@ class CVerifyDB {
     bool VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth);
 };
 
-/** An in-memory indexed chain of blocks. */
-class CChain {
-private:
-    std::vector<CBlockIndex*> vChain;
-
-public:
-    /** Returns the index entry for the genesis block of this chain, or NULL if none. */
-    CBlockIndex *Genesis() const {
-        return vChain.size() > 0 ? vChain[0] : NULL;
-    }
-
-    /** Returns the index entry for the tip of this chain, or NULL if none. */
-    CBlockIndex *Tip() const {
-        return vChain.size() > 0 ? vChain[vChain.size() - 1] : NULL;
-    }
-
-    /** Returns the index entry at a particular height in this chain, or NULL if no such height exists. */
-    CBlockIndex *operator[](int nHeight) const {
-        if (nHeight < 0 || nHeight >= (int)vChain.size())
-            return NULL;
-        return vChain[nHeight];
-    }
-
-    /** Compare two chains efficiently. */
-    friend bool operator==(const CChain &a, const CChain &b) {
-        return a.vChain.size() == b.vChain.size() &&
-               a.vChain[a.vChain.size() - 1] == b.vChain[b.vChain.size() - 1];
-    }
-
-    /** Efficiently check whether a block is present in this chain. */
-    bool Contains(const CBlockIndex *pindex) const {
-        return (*this)[pindex->nHeight] == pindex;
-    }
-
-    /** Find the successor of a block in this chain, or NULL if the given index is not found or is the tip. */
-    CBlockIndex *Next(const CBlockIndex *pindex) const {
-        if (Contains(pindex))
-            return (*this)[pindex->nHeight + 1];
-        else
-            return NULL;
-    }
-
-    /** Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */
-    int Height() const {
-        return vChain.size() - 1;
-    }
-
-    /** Set/initialize a chain with a given tip. Returns the forking point. */
-    CBlockIndex *SetTip(CBlockIndex *pindex);
-
-    /** Return a CBlockLocator that refers to a block in this chain (by default the tip). */
-    CBlockLocator GetLocator(const CBlockIndex *pindex = NULL) const;
-
-    /** Find the last common block between this chain and a block index entry. */
-    const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
-};
-
 /** Find the last common block between the parameter chain and a locator. */
 CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator);
 

From 6022b5dc6ba930797db46e00426923b53d6594b3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 8 Sep 2014 21:15:31 +0200
Subject: [PATCH 0672/1819] Make script_{valid,invalid}.json validation flags
 configurable

---
 src/test/data/script_invalid.json | 657 +++++++++++----------
 src/test/data/script_valid.json   | 940 +++++++++++++++---------------
 src/test/script_tests.cpp         |  12 +-
 src/test/transaction_tests.cpp    |   6 +-
 4 files changed, 821 insertions(+), 794 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index e3e1ccbf3c12..75de4716f858 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -1,366 +1,377 @@
 [
-["", "DEPTH",   "Test the test: we should have an empty stack after scriptSig evaluation"],
-["  ", "DEPTH", "and multiple spaces should not change that."],
-["   ", "DEPTH"],
-["    ", "DEPTH"],
-
-["", ""],
-["", "NOP"],
-["", "NOP DEPTH"],
-["NOP", ""],
-["NOP", "DEPTH"],
-["NOP","NOP"],
-["NOP","NOP DEPTH"],
-
-["DEPTH", ""],
-
-["0x4c01","0x01 NOP", "PUSHDATA1 with not enough bytes"],
-["0x4d0200ff","0x01 NOP", "PUSHDATA2 with not enough bytes"],
-["0x4e03000000ffff","0x01 NOP", "PUSHDATA4 with not enough bytes"],
-
-["1", "IF 0x50 ENDIF 1", "0x50 is reserved"],
-["0x52", "0x5f ADD 0x60 EQUAL", "0x51 through 0x60 push 1 through 16 onto stack"],
-["0","NOP"],
-["1", "IF VER ELSE 1 ENDIF", "VER non-functional"],
-["0", "IF VERIF ELSE 1 ENDIF", "VERIF illegal everywhere"],
-["0", "IF ELSE 1 ELSE VERIF ENDIF", "VERIF illegal everywhere"],
-["0", "IF VERNOTIF ELSE 1 ENDIF", "VERNOTIF illegal everywhere"],
-["0", "IF ELSE 1 ELSE VERNOTIF ENDIF", "VERNOTIF illegal everywhere"],
-
-["1 IF", "1 ENDIF", "IF/ENDIF can't span scriptSig/scriptPubKey"],
-["1 IF 0 ENDIF", "1 ENDIF"],
-["1 ELSE 0 ENDIF", "1"],
-["0 NOTIF", "123"],
-
-["0", "DUP IF ENDIF"],
-["0", "IF 1 ENDIF"],
-["0", "DUP IF ELSE ENDIF"],
-["0", "IF 1 ELSE ENDIF"],
-["0", "NOTIF ELSE 1 ENDIF"],
-
-["0 1", "IF IF 1 ELSE 0 ENDIF ENDIF"],
-["0 0", "IF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 0", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-["0 1", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-
-["0 0", "NOTIF IF 1 ELSE 0 ENDIF ENDIF"],
-["0 1", "NOTIF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-["0 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-
-["1", "IF RETURN ELSE ELSE 1 ENDIF", "Multiple ELSEs"],
-["1", "IF 1 ELSE ELSE RETURN ENDIF"],
-
-["1", "ENDIF", "Malformed IF/ELSE/ENDIF sequence"],
-["1", "ELSE ENDIF"],
-["1", "ENDIF ELSE"],
-["1", "ENDIF ELSE IF"],
-["1", "IF ELSE ENDIF ELSE"],
-["1", "IF ELSE ENDIF ELSE ENDIF"],
-["1", "IF ENDIF ENDIF"],
-["1", "IF ELSE ELSE ENDIF ENDIF"],
-
-["1", "RETURN"],
-["1", "DUP IF RETURN ENDIF"],
-
-["1", "RETURN 'data'", "canonical prunable txout format"],
-["0 IF", "RETURN ENDIF 1", "still prunable because IF/ENDIF can't span scriptSig/scriptPubKey"],
-
-["0", "VERIFY 1"],
-["1", "VERIFY"],
-["1", "VERIFY 0"],
-
-["1 TOALTSTACK", "FROMALTSTACK 1", "alt stack not shared between sig/pubkey"],
-
-["IFDUP", "DEPTH 0 EQUAL"],
-["DROP", "DEPTH 0 EQUAL"],
-["DUP", "DEPTH 0 EQUAL"],
-["1", "DUP 1 ADD 2 EQUALVERIFY 0 EQUAL"],
-["NOP", "NIP"],
-["NOP", "1 NIP"],
-["NOP", "1 0 NIP"],
-["NOP", "OVER 1"],
-["1", "OVER"],
-["0 1", "OVER DEPTH 3 EQUALVERIFY"],
-["19 20 21", "PICK 19 EQUALVERIFY DEPTH 2 EQUAL"],
-["NOP", "0 PICK"],
-["1", "-1 PICK"],
-["19 20 21", "0 PICK 20 EQUALVERIFY DEPTH 3 EQUAL"],
-["19 20 21", "1 PICK 21 EQUALVERIFY DEPTH 3 EQUAL"],
-["19 20 21", "2 PICK 22 EQUALVERIFY DEPTH 3 EQUAL"],
-["NOP", "0 ROLL"],
-["1", "-1 ROLL"],
-["19 20 21", "0 ROLL 20 EQUALVERIFY DEPTH 2 EQUAL"],
-["19 20 21", "1 ROLL 21 EQUALVERIFY DEPTH 2 EQUAL"],
-["19 20 21", "2 ROLL 22 EQUALVERIFY DEPTH 2 EQUAL"],
-["NOP", "ROT 1"],
-["NOP", "1 ROT 1"],
-["NOP", "1 2 ROT 1"],
-["NOP", "0 1 2 ROT"],
-["NOP", "SWAP 1"],
-["1", "SWAP 1"],
-["0 1", "SWAP 1 EQUALVERIFY"],
-["NOP", "TUCK 1"],
-["1", "TUCK 1"],
-["1 0", "TUCK DEPTH 3 EQUALVERIFY SWAP 2DROP"],
-["NOP", "2DUP 1"],
-["1", "2DUP 1"],
-["NOP", "3DUP 1"],
-["1", "3DUP 1"],
-["1 2", "3DUP 1"],
-["NOP", "2OVER 1"],
-["1", "2 3 2OVER 1"],
-["NOP", "2SWAP 1"],
-["1", "2 3 2SWAP 1"],
-
-["'a' 'b'", "CAT", "CAT disabled"],
-["'a' 'b' 0", "IF CAT ELSE 1 ENDIF", "CAT disabled"],
-["'abc' 1 1", "SUBSTR", "SUBSTR disabled"],
-["'abc' 1 1 0", "IF SUBSTR ELSE 1 ENDIF", "SUBSTR disabled"],
-["'abc' 2 0", "IF LEFT ELSE 1 ENDIF", "LEFT disabled"],
-["'abc' 2 0", "IF RIGHT ELSE 1 ENDIF", "RIGHT disabled"],
-
-["NOP", "SIZE 1"],
-
-["'abc'", "IF INVERT ELSE 1 ENDIF", "INVERT disabled"],
-["1 2 0 IF AND ELSE 1 ENDIF", "NOP", "AND disabled"],
-["1 2 0 IF OR ELSE 1 ENDIF", "NOP", "OR disabled"],
-["1 2 0 IF XOR ELSE 1 ENDIF", "NOP", "XOR disabled"],
-["2 0 IF 2MUL ELSE 1 ENDIF", "NOP", "2MUL disabled"],
-["2 0 IF 2DIV ELSE 1 ENDIF", "NOP", "2DIV disabled"],
-["2 2 0 IF MUL ELSE 1 ENDIF", "NOP", "MUL disabled"],
-["2 2 0 IF DIV ELSE 1 ENDIF", "NOP", "DIV disabled"],
-["2 2 0 IF MOD ELSE 1 ENDIF", "NOP", "MOD disabled"],
-["2 2 0 IF LSHIFT ELSE 1 ENDIF", "NOP", "LSHIFT disabled"],
-["2 2 0 IF RSHIFT ELSE 1 ENDIF", "NOP", "RSHIFT disabled"],
-
-["0 1","EQUAL"],
-["1 1 ADD", "0 EQUAL"],
-["11 1 ADD 12 SUB", "11 EQUAL"],
-
-["2147483648 0 ADD", "NOP", "arithmetic operands must be in range [-2^31...2^31] "],
-["-2147483648 0 ADD", "NOP", "arithmetic operands must be in range [-2^31...2^31] "],
-["2147483647 DUP ADD", "4294967294 NUMEQUAL", "NUMEQUAL must be in numeric range"],
-["'abcdef' NOT", "0 EQUAL", "NOT is an arithmetic operand"],
-
-["2 DUP MUL", "4 EQUAL", "disabled"],
-["2 DUP DIV", "1 EQUAL", "disabled"],
-["2 2MUL", "4 EQUAL", "disabled"],
-["2 2DIV", "1 EQUAL", "disabled"],
-["7 3 MOD", "1 EQUAL", "disabled"],
-["2 2 LSHIFT", "8 EQUAL", "disabled"],
-["2 1 RSHIFT", "1 EQUAL", "disabled"],
-
-["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 2 EQUAL"],
-["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_11' EQUAL"],
-
-["0x50","1", "opcode 0x50 is reserved"],
-["1", "IF 0xba ELSE 1 ENDIF", "opcodes above NOP10 invalid if executed"],
-["1", "IF 0xbb ELSE 1 ENDIF"],
-["1", "IF 0xbc ELSE 1 ENDIF"],
-["1", "IF 0xbd ELSE 1 ENDIF"],
-["1", "IF 0xbe ELSE 1 ENDIF"],
-["1", "IF 0xbf ELSE 1 ENDIF"],
-["1", "IF 0xc0 ELSE 1 ENDIF"],
-["1", "IF 0xc1 ELSE 1 ENDIF"],
-["1", "IF 0xc2 ELSE 1 ENDIF"],
-["1", "IF 0xc3 ELSE 1 ENDIF"],
-["1", "IF 0xc4 ELSE 1 ENDIF"],
-["1", "IF 0xc5 ELSE 1 ENDIF"],
-["1", "IF 0xc6 ELSE 1 ENDIF"],
-["1", "IF 0xc7 ELSE 1 ENDIF"],
-["1", "IF 0xc8 ELSE 1 ENDIF"],
-["1", "IF 0xc9 ELSE 1 ENDIF"],
-["1", "IF 0xca ELSE 1 ENDIF"],
-["1", "IF 0xcb ELSE 1 ENDIF"],
-["1", "IF 0xcc ELSE 1 ENDIF"],
-["1", "IF 0xcd ELSE 1 ENDIF"],
-["1", "IF 0xce ELSE 1 ENDIF"],
-["1", "IF 0xcf ELSE 1 ENDIF"],
-["1", "IF 0xd0 ELSE 1 ENDIF"],
-["1", "IF 0xd1 ELSE 1 ENDIF"],
-["1", "IF 0xd2 ELSE 1 ENDIF"],
-["1", "IF 0xd3 ELSE 1 ENDIF"],
-["1", "IF 0xd4 ELSE 1 ENDIF"],
-["1", "IF 0xd5 ELSE 1 ENDIF"],
-["1", "IF 0xd6 ELSE 1 ENDIF"],
-["1", "IF 0xd7 ELSE 1 ENDIF"],
-["1", "IF 0xd8 ELSE 1 ENDIF"],
-["1", "IF 0xd9 ELSE 1 ENDIF"],
-["1", "IF 0xda ELSE 1 ENDIF"],
-["1", "IF 0xdb ELSE 1 ENDIF"],
-["1", "IF 0xdc ELSE 1 ENDIF"],
-["1", "IF 0xdd ELSE 1 ENDIF"],
-["1", "IF 0xde ELSE 1 ENDIF"],
-["1", "IF 0xdf ELSE 1 ENDIF"],
-["1", "IF 0xe0 ELSE 1 ENDIF"],
-["1", "IF 0xe1 ELSE 1 ENDIF"],
-["1", "IF 0xe2 ELSE 1 ENDIF"],
-["1", "IF 0xe3 ELSE 1 ENDIF"],
-["1", "IF 0xe4 ELSE 1 ENDIF"],
-["1", "IF 0xe5 ELSE 1 ENDIF"],
-["1", "IF 0xe6 ELSE 1 ENDIF"],
-["1", "IF 0xe7 ELSE 1 ENDIF"],
-["1", "IF 0xe8 ELSE 1 ENDIF"],
-["1", "IF 0xe9 ELSE 1 ENDIF"],
-["1", "IF 0xea ELSE 1 ENDIF"],
-["1", "IF 0xeb ELSE 1 ENDIF"],
-["1", "IF 0xec ELSE 1 ENDIF"],
-["1", "IF 0xed ELSE 1 ENDIF"],
-["1", "IF 0xee ELSE 1 ENDIF"],
-["1", "IF 0xef ELSE 1 ENDIF"],
-["1", "IF 0xf0 ELSE 1 ENDIF"],
-["1", "IF 0xf1 ELSE 1 ENDIF"],
-["1", "IF 0xf2 ELSE 1 ENDIF"],
-["1", "IF 0xf3 ELSE 1 ENDIF"],
-["1", "IF 0xf4 ELSE 1 ENDIF"],
-["1", "IF 0xf5 ELSE 1 ENDIF"],
-["1", "IF 0xf6 ELSE 1 ENDIF"],
-["1", "IF 0xf7 ELSE 1 ENDIF"],
-["1", "IF 0xf8 ELSE 1 ENDIF"],
-["1", "IF 0xf9 ELSE 1 ENDIF"],
-["1", "IF 0xfa ELSE 1 ENDIF"],
-["1", "IF 0xfb ELSE 1 ENDIF"],
-["1", "IF 0xfc ELSE 1 ENDIF"],
-["1", "IF 0xfd ELSE 1 ENDIF"],
-["1", "IF 0xfe ELSE 1 ENDIF"],
-["1", "IF 0xff ELSE 1 ENDIF"],
-
-["1 IF 1 ELSE", "0xff ENDIF", "invalid because scriptSig and scriptPubKey are processed separately"],
-
-["NOP", "RIPEMD160"],
-["NOP", "SHA1"],
-["NOP", "SHA256"],
-["NOP", "HASH160"],
-["NOP", "HASH256"],
+["", "DEPTH", "P2SH,STRICTENC",   "Test the test: we should have an empty stack after scriptSig evaluation"],
+["  ", "DEPTH", "P2SH,STRICTENC", "and multiple spaces should not change that."],
+["   ", "DEPTH", "P2SH,STRICTENC"],
+["    ", "DEPTH", "P2SH,STRICTENC"],
+
+["", "", "P2SH,STRICTENC"],
+["", "NOP", "P2SH,STRICTENC"],
+["", "NOP DEPTH", "P2SH,STRICTENC"],
+["NOP", "", "P2SH,STRICTENC"],
+["NOP", "DEPTH", "P2SH,STRICTENC"],
+["NOP","NOP", "P2SH,STRICTENC"],
+["NOP","NOP DEPTH", "P2SH,STRICTENC"],
+
+["DEPTH", "", "P2SH,STRICTENC"],
+
+["0x4c01","0x01 NOP", "P2SH,STRICTENC", "PUSHDATA1 with not enough bytes"],
+["0x4d0200ff","0x01 NOP", "P2SH,STRICTENC", "PUSHDATA2 with not enough bytes"],
+["0x4e03000000ffff","0x01 NOP", "P2SH,STRICTENC", "PUSHDATA4 with not enough bytes"],
+
+["1", "IF 0x50 ENDIF 1", "P2SH,STRICTENC", "0x50 is reserved"],
+["0x52", "0x5f ADD 0x60 EQUAL", "P2SH,STRICTENC", "0x51 through 0x60 push 1 through 16 onto stack"],
+["0","NOP", "P2SH,STRICTENC"],
+["1", "IF VER ELSE 1 ENDIF", "P2SH,STRICTENC", "VER non-functional"],
+["0", "IF VERIF ELSE 1 ENDIF", "P2SH,STRICTENC", "VERIF illegal everywhere"],
+["0", "IF ELSE 1 ELSE VERIF ENDIF", "P2SH,STRICTENC", "VERIF illegal everywhere"],
+["0", "IF VERNOTIF ELSE 1 ENDIF", "P2SH,STRICTENC", "VERNOTIF illegal everywhere"],
+["0", "IF ELSE 1 ELSE VERNOTIF ENDIF", "P2SH,STRICTENC", "VERNOTIF illegal everywhere"],
+
+["1 IF", "1 ENDIF", "P2SH,STRICTENC", "IF/ENDIF can't span scriptSig/scriptPubKey"],
+["1 IF 0 ENDIF", "1 ENDIF", "P2SH,STRICTENC"],
+["1 ELSE 0 ENDIF", "1", "P2SH,STRICTENC"],
+["0 NOTIF", "123", "P2SH,STRICTENC"],
+
+["0", "DUP IF ENDIF", "P2SH,STRICTENC"],
+["0", "IF 1 ENDIF", "P2SH,STRICTENC"],
+["0", "DUP IF ELSE ENDIF", "P2SH,STRICTENC"],
+["0", "IF 1 ELSE ENDIF", "P2SH,STRICTENC"],
+["0", "NOTIF ELSE 1 ENDIF", "P2SH,STRICTENC"],
+
+["0 1", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 0", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 0", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 1", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+
+["0 0", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 1", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+
+["1", "IF RETURN ELSE ELSE 1 ENDIF", "P2SH,STRICTENC", "Multiple ELSEs"],
+["1", "IF 1 ELSE ELSE RETURN ENDIF", "P2SH,STRICTENC"],
+
+["1", "ENDIF", "P2SH,STRICTENC", "Malformed IF/ELSE/ENDIF sequence"],
+["1", "ELSE ENDIF", "P2SH,STRICTENC"],
+["1", "ENDIF ELSE", "P2SH,STRICTENC"],
+["1", "ENDIF ELSE IF", "P2SH,STRICTENC"],
+["1", "IF ELSE ENDIF ELSE", "P2SH,STRICTENC"],
+["1", "IF ELSE ENDIF ELSE ENDIF", "P2SH,STRICTENC"],
+["1", "IF ENDIF ENDIF", "P2SH,STRICTENC"],
+["1", "IF ELSE ELSE ENDIF ENDIF", "P2SH,STRICTENC"],
+
+["1", "RETURN", "P2SH,STRICTENC"],
+["1", "DUP IF RETURN ENDIF", "P2SH,STRICTENC"],
+
+["1", "RETURN 'data'", "P2SH,STRICTENC", "canonical prunable txout format"],
+["0 IF", "RETURN ENDIF 1", "P2SH,STRICTENC", "still prunable because IF/ENDIF can't span scriptSig/scriptPubKey"],
+
+["0", "VERIFY 1", "P2SH,STRICTENC"],
+["1", "VERIFY", "P2SH,STRICTENC"],
+["1", "VERIFY 0", "P2SH,STRICTENC"],
+
+["1 TOALTSTACK", "FROMALTSTACK 1", "P2SH,STRICTENC", "alt stack not shared between sig/pubkey"],
+
+["IFDUP", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["DROP", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["DUP", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["1", "DUP 1 ADD 2 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
+["NOP", "NIP", "P2SH,STRICTENC"],
+["NOP", "1 NIP", "P2SH,STRICTENC"],
+["NOP", "1 0 NIP", "P2SH,STRICTENC"],
+["NOP", "OVER 1", "P2SH,STRICTENC"],
+["1", "OVER", "P2SH,STRICTENC"],
+["0 1", "OVER DEPTH 3 EQUALVERIFY", "P2SH,STRICTENC"],
+["19 20 21", "PICK 19 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["NOP", "0 PICK", "P2SH,STRICTENC"],
+["1", "-1 PICK", "P2SH,STRICTENC"],
+["19 20 21", "0 PICK 20 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["19 20 21", "1 PICK 21 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["19 20 21", "2 PICK 22 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["NOP", "0 ROLL", "P2SH,STRICTENC"],
+["1", "-1 ROLL", "P2SH,STRICTENC"],
+["19 20 21", "0 ROLL 20 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["19 20 21", "1 ROLL 21 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["19 20 21", "2 ROLL 22 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["NOP", "ROT 1", "P2SH,STRICTENC"],
+["NOP", "1 ROT 1", "P2SH,STRICTENC"],
+["NOP", "1 2 ROT 1", "P2SH,STRICTENC"],
+["NOP", "0 1 2 ROT", "P2SH,STRICTENC"],
+["NOP", "SWAP 1", "P2SH,STRICTENC"],
+["1", "SWAP 1", "P2SH,STRICTENC"],
+["0 1", "SWAP 1 EQUALVERIFY", "P2SH,STRICTENC"],
+["NOP", "TUCK 1", "P2SH,STRICTENC"],
+["1", "TUCK 1", "P2SH,STRICTENC"],
+["1 0", "TUCK DEPTH 3 EQUALVERIFY SWAP 2DROP", "P2SH,STRICTENC"],
+["NOP", "2DUP 1", "P2SH,STRICTENC"],
+["1", "2DUP 1", "P2SH,STRICTENC"],
+["NOP", "3DUP 1", "P2SH,STRICTENC"],
+["1", "3DUP 1", "P2SH,STRICTENC"],
+["1 2", "3DUP 1", "P2SH,STRICTENC"],
+["NOP", "2OVER 1", "P2SH,STRICTENC"],
+["1", "2 3 2OVER 1", "P2SH,STRICTENC"],
+["NOP", "2SWAP 1", "P2SH,STRICTENC"],
+["1", "2 3 2SWAP 1", "P2SH,STRICTENC"],
+
+["'a' 'b'", "CAT", "P2SH,STRICTENC", "CAT disabled"],
+["'a' 'b' 0", "IF CAT ELSE 1 ENDIF", "P2SH,STRICTENC", "CAT disabled"],
+["'abc' 1 1", "SUBSTR", "P2SH,STRICTENC", "SUBSTR disabled"],
+["'abc' 1 1 0", "IF SUBSTR ELSE 1 ENDIF", "P2SH,STRICTENC", "SUBSTR disabled"],
+["'abc' 2 0", "IF LEFT ELSE 1 ENDIF", "P2SH,STRICTENC", "LEFT disabled"],
+["'abc' 2 0", "IF RIGHT ELSE 1 ENDIF", "P2SH,STRICTENC", "RIGHT disabled"],
+
+["NOP", "SIZE 1", "P2SH,STRICTENC"],
+
+["'abc'", "IF INVERT ELSE 1 ENDIF", "P2SH,STRICTENC", "INVERT disabled"],
+["1 2 0 IF AND ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "AND disabled"],
+["1 2 0 IF OR ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "OR disabled"],
+["1 2 0 IF XOR ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "XOR disabled"],
+["2 0 IF 2MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "2MUL disabled"],
+["2 0 IF 2DIV ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "2DIV disabled"],
+["2 2 0 IF MUL ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "MUL disabled"],
+["2 2 0 IF DIV ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "DIV disabled"],
+["2 2 0 IF MOD ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "MOD disabled"],
+["2 2 0 IF LSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "LSHIFT disabled"],
+["2 2 0 IF RSHIFT ELSE 1 ENDIF", "NOP", "P2SH,STRICTENC", "RSHIFT disabled"],
+
+["0 1","EQUAL", "P2SH,STRICTENC"],
+["1 1 ADD", "0 EQUAL", "P2SH,STRICTENC"],
+["11 1 ADD 12 SUB", "11 EQUAL", "P2SH,STRICTENC"],
+
+["2147483648 0 ADD", "NOP", "P2SH,STRICTENC", "arithmetic operands must be in range [-2^31...2^31] "],
+["-2147483648 0 ADD", "NOP", "P2SH,STRICTENC", "arithmetic operands must be in range [-2^31...2^31] "],
+["2147483647 DUP ADD", "4294967294 NUMEQUAL", "P2SH,STRICTENC", "NUMEQUAL must be in numeric range"],
+["'abcdef' NOT", "0 EQUAL", "P2SH,STRICTENC", "NOT is an arithmetic operand"],
+
+["2 DUP MUL", "4 EQUAL", "P2SH,STRICTENC", "disabled"],
+["2 DUP DIV", "1 EQUAL", "P2SH,STRICTENC", "disabled"],
+["2 2MUL", "4 EQUAL", "P2SH,STRICTENC", "disabled"],
+["2 2DIV", "1 EQUAL", "P2SH,STRICTENC", "disabled"],
+["7 3 MOD", "1 EQUAL", "P2SH,STRICTENC", "disabled"],
+["2 2 LSHIFT", "8 EQUAL", "P2SH,STRICTENC", "disabled"],
+["2 1 RSHIFT", "1 EQUAL", "P2SH,STRICTENC", "disabled"],
+
+["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 2 EQUAL", "P2SH,STRICTENC"],
+["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_11' EQUAL", "P2SH,STRICTENC"],
+
+["0x50","1", "P2SH,STRICTENC", "opcode 0x50 is reserved"],
+["1", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "opcodes above NOP10 invalid if executed"],
+["1", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xc9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xca ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xcb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xcc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xcd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xce ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xcf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xd9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xda ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xdb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xdc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xdd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xde ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xdf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xe9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xea ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xeb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xec ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xed ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xee ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xef ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xf9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xfa ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xfb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xfc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xfd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xfe ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 0xff ELSE 1 ENDIF", "P2SH,STRICTENC"],
+
+["1 IF 1 ELSE", "0xff ENDIF", "P2SH,STRICTENC", "invalid because scriptSig and scriptPubKey are processed separately"],
+
+["NOP", "RIPEMD160", "P2SH,STRICTENC"],
+["NOP", "SHA1", "P2SH,STRICTENC"],
+["NOP", "SHA256", "P2SH,STRICTENC"],
+["NOP", "HASH160", "P2SH,STRICTENC"],
+["NOP", "HASH256", "P2SH,STRICTENC"],
 
 ["NOP",
 "'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'",
+"P2SH,STRICTENC",
 ">520 byte push"],
 ["0",
 "IF 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' ENDIF 1",
+"P2SH,STRICTENC",
 ">520 byte push in non-executed IF branch"],
 ["1",
 "0x61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+"P2SH,STRICTENC",
 ">201 opcodes executed. 0x61 is NOP"],
 ["0",
 "IF 0x6161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161 ENDIF 1",
+"P2SH,STRICTENC",
 ">201 opcodes including non-executed IF branch. 0x61 is NOP"],
 ["1 2 3 4 5 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
 "1 2 3 4 5 6 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
+"P2SH,STRICTENC",
 ">1,000 stack size (0x6f is 3DUP)"],
 ["1 2 3 4 5 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
 "1 TOALTSTACK 2 TOALTSTACK 3 4 5 6 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
+"P2SH,STRICTENC",
 ">1,000 stack+altstack size"],
 ["NOP",
 "0 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f 2DUP 0x616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+"P2SH,STRICTENC",
 "10,001-byte scriptPubKey"],
 
-["NOP1","NOP10"],
-
-["1","VER", "OP_VER is reserved"],
-["1","VERIF", "OP_VERIF is reserved"],
-["1","VERNOTIF", "OP_VERNOTIF is reserved"],
-["1","RESERVED", "OP_RESERVED is reserved"],
-["1","RESERVED1", "OP_RESERVED1 is reserved"],
-["1","RESERVED2", "OP_RESERVED2 is reserved"],
-["1","0xba", "0xba == OP_NOP10 + 1"],
-
-["2147483648", "1ADD 1", "We cannot do math on 5-byte integers"],
-["2147483648", "NEGATE 1", "We cannot do math on 5-byte integers"],
-["-2147483648", "1ADD 1", "Because we use a sign bit, -2147483648 is also 5 bytes"],
-["2147483647", "1ADD 1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
-["2147483648", "1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
-
-["2147483648 1", "BOOLOR 1", "We cannot do BOOLOR on 5-byte integers (but we can still do IF etc)"],
-["2147483648 1", "BOOLAND 1", "We cannot do BOOLAND on 5-byte integers"],
-
-["1", "1 ENDIF", "ENDIF without IF"],
-["1", "IF 1", "IF without ENDIF"],
-["1 IF 1", "ENDIF", "IFs don't carry over"],
-
-["NOP", "IF 1 ENDIF", "The following tests check the if(stack.size() < N) tests in each opcode"],
-["NOP", "NOTIF 1 ENDIF", "They are here to catch copy-and-paste errors"],
-["NOP", "VERIFY 1", "Most of them are duplicated elsewhere,"],
-
-["NOP", "TOALTSTACK 1", "but, hey, more is always better, right?"],
-["1", "FROMALTSTACK"],
-["1", "2DROP 1"],
-["1", "2DUP"],
-["1 1", "3DUP"],
-["1 1 1", "2OVER"],
-["1 1 1 1 1", "2ROT"],
-["1 1 1", "2SWAP"],
-["NOP", "IFDUP 1"],
-["NOP", "DROP 1"],
-["NOP", "DUP 1"],
-["1", "NIP"],
-["1", "OVER"],
-["1 1 1 3", "PICK"],
-["0", "PICK 1"],
-["1 1 1 3", "ROLL"],
-["0", "ROLL 1"],
-["1 1", "ROT"],
-["1", "SWAP"],
-["1", "TUCK"],
-
-["NOP", "SIZE 1"],
-
-["1", "EQUAL 1"],
-["1", "EQUALVERIFY 1"],
-
-["NOP", "1ADD 1"],
-["NOP", "1SUB 1"],
-["NOP", "NEGATE 1"],
-["NOP", "ABS 1"],
-["NOP", "NOT 1"],
-["NOP", "0NOTEQUAL 1"],
-
-["1", "ADD"],
-["1", "SUB"],
-["1", "BOOLAND"],
-["1", "BOOLOR"],
-["1", "NUMEQUAL"],
-["1", "NUMEQUALVERIFY 1"],
-["1", "NUMNOTEQUAL"],
-["1", "LESSTHAN"],
-["1", "GREATERTHAN"],
-["1", "LESSTHANOREQUAL"],
-["1", "GREATERTHANOREQUAL"],
-["1", "MIN"],
-["1", "MAX"],
-["1 1", "WITHIN"],
-
-["NOP", "RIPEMD160 1"],
-["NOP", "SHA1 1"],
-["NOP", "SHA256 1"],
-["NOP", "HASH160 1"],
-["NOP", "HASH256 1"],
+["NOP1","NOP10", "P2SH,STRICTENC"],
+
+["1","VER", "P2SH,STRICTENC", "OP_VER is reserved"],
+["1","VERIF", "P2SH,STRICTENC", "OP_VERIF is reserved"],
+["1","VERNOTIF", "P2SH,STRICTENC", "OP_VERNOTIF is reserved"],
+["1","RESERVED", "P2SH,STRICTENC", "OP_RESERVED is reserved"],
+["1","RESERVED1", "P2SH,STRICTENC", "OP_RESERVED1 is reserved"],
+["1","RESERVED2", "P2SH,STRICTENC", "OP_RESERVED2 is reserved"],
+["1","0xba", "P2SH,STRICTENC", "0xba == OP_NOP10 + 1"],
+
+["2147483648", "1ADD 1", "P2SH,STRICTENC", "We cannot do math on 5-byte integers"],
+["2147483648", "NEGATE 1", "P2SH,STRICTENC", "We cannot do math on 5-byte integers"],
+["-2147483648", "1ADD 1", "P2SH,STRICTENC", "Because we use a sign bit, -2147483648 is also 5 bytes"],
+["2147483647", "1ADD 1SUB 1", "P2SH,STRICTENC", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
+["2147483648", "1SUB 1", "P2SH,STRICTENC", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
+
+["2147483648 1", "BOOLOR 1", "P2SH,STRICTENC", "We cannot do BOOLOR on 5-byte integers (but we can still do IF etc)"],
+["2147483648 1", "BOOLAND 1", "P2SH,STRICTENC", "We cannot do BOOLAND on 5-byte integers"],
+
+["1", "1 ENDIF", "P2SH,STRICTENC", "ENDIF without IF"],
+["1", "IF 1", "P2SH,STRICTENC", "IF without ENDIF"],
+["1 IF 1", "ENDIF", "P2SH,STRICTENC", "IFs don't carry over"],
+
+["NOP", "IF 1 ENDIF", "P2SH,STRICTENC", "The following tests check the if(stack.size() < N) tests in each opcode"],
+["NOP", "NOTIF 1 ENDIF", "P2SH,STRICTENC", "They are here to catch copy-and-paste errors"],
+["NOP", "VERIFY 1", "P2SH,STRICTENC", "Most of them are duplicated elsewhere,"],
+
+["NOP", "TOALTSTACK 1", "P2SH,STRICTENC", "but, hey, more is always better, right?"],
+["1", "FROMALTSTACK", "P2SH,STRICTENC"],
+["1", "2DROP 1", "P2SH,STRICTENC"],
+["1", "2DUP", "P2SH,STRICTENC"],
+["1 1", "3DUP", "P2SH,STRICTENC"],
+["1 1 1", "2OVER", "P2SH,STRICTENC"],
+["1 1 1 1 1", "2ROT", "P2SH,STRICTENC"],
+["1 1 1", "2SWAP", "P2SH,STRICTENC"],
+["NOP", "IFDUP 1", "P2SH,STRICTENC"],
+["NOP", "DROP 1", "P2SH,STRICTENC"],
+["NOP", "DUP 1", "P2SH,STRICTENC"],
+["1", "NIP", "P2SH,STRICTENC"],
+["1", "OVER", "P2SH,STRICTENC"],
+["1 1 1 3", "PICK", "P2SH,STRICTENC"],
+["0", "PICK 1", "P2SH,STRICTENC"],
+["1 1 1 3", "ROLL", "P2SH,STRICTENC"],
+["0", "ROLL 1", "P2SH,STRICTENC"],
+["1 1", "ROT", "P2SH,STRICTENC"],
+["1", "SWAP", "P2SH,STRICTENC"],
+["1", "TUCK", "P2SH,STRICTENC"],
+
+["NOP", "SIZE 1", "P2SH,STRICTENC"],
+
+["1", "EQUAL 1", "P2SH,STRICTENC"],
+["1", "EQUALVERIFY 1", "P2SH,STRICTENC"],
+
+["NOP", "1ADD 1", "P2SH,STRICTENC"],
+["NOP", "1SUB 1", "P2SH,STRICTENC"],
+["NOP", "NEGATE 1", "P2SH,STRICTENC"],
+["NOP", "ABS 1", "P2SH,STRICTENC"],
+["NOP", "NOT 1", "P2SH,STRICTENC"],
+["NOP", "0NOTEQUAL 1", "P2SH,STRICTENC"],
+
+["1", "ADD", "P2SH,STRICTENC"],
+["1", "SUB", "P2SH,STRICTENC"],
+["1", "BOOLAND", "P2SH,STRICTENC"],
+["1", "BOOLOR", "P2SH,STRICTENC"],
+["1", "NUMEQUAL", "P2SH,STRICTENC"],
+["1", "NUMEQUALVERIFY 1", "P2SH,STRICTENC"],
+["1", "NUMNOTEQUAL", "P2SH,STRICTENC"],
+["1", "LESSTHAN", "P2SH,STRICTENC"],
+["1", "GREATERTHAN", "P2SH,STRICTENC"],
+["1", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["1", "GREATERTHANOREQUAL", "P2SH,STRICTENC"],
+["1", "MIN", "P2SH,STRICTENC"],
+["1", "MAX", "P2SH,STRICTENC"],
+["1 1", "WITHIN", "P2SH,STRICTENC"],
+
+["NOP", "RIPEMD160 1", "P2SH,STRICTENC"],
+["NOP", "SHA1 1", "P2SH,STRICTENC"],
+["NOP", "SHA256 1", "P2SH,STRICTENC"],
+["NOP", "HASH160 1", "P2SH,STRICTENC"],
+["NOP", "HASH256 1", "P2SH,STRICTENC"],
 
 ["",
 "0 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG",
+"P2SH,STRICTENC",
 "202 CHECKMULTISIGS, fails due to 201 op limit"],
 
 ["1",
-"0 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY"],
+"0 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY 0 0 CHECKMULTISIGVERIFY",
+"P2SH,STRICTENC"],
 
 ["",
 "NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG",
+"P2SH,STRICTENC",
 "Fails due to 201 sig op limit"],
 
 ["1",
-"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY"],
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY",
+"P2SH,STRICTENC"],
 
 
-["0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21", "21 CHECKMULTISIG 1", "nPubKeys > 20"],
-["0 'sig' 1 0", "CHECKMULTISIG 1", "nSigs > nPubKeys"],
+["0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21", "21 CHECKMULTISIG 1", "P2SH,STRICTENC", "nPubKeys > 20"],
+["0 'sig' 1 0", "CHECKMULTISIG 1", "P2SH,STRICTENC", "nSigs > nPubKeys"],
 
 
-["NOP 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "Tests for Script.IsPushOnly()"],
-["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
+["NOP 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "P2SH,STRICTENC", "Tests for Script.IsPushOnly()"],
+["NOP1 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "P2SH,STRICTENC"],
 
-["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "OP_RESERVED in P2SH should fail"],
-["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "OP_VER in P2SH should fail"],
+["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "P2SH,STRICTENC", "OP_RESERVED in P2SH should fail"],
+["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "P2SH,STRICTENC", "OP_VER in P2SH should fail"],
 
-["0x00", "'00' EQUAL", "Basic OP_0 execution"]
+["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"]
 ]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 082c65efed66..c1db4c606199 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -1,510 +1,522 @@
 [
-["", "DEPTH 0 EQUAL",   "Test the test: we should have an empty stack after scriptSig evaluation"],
-["  ", "DEPTH 0 EQUAL", "and multiple spaces should not change that."],
-["   ", "DEPTH 0 EQUAL"],
-["    ", "DEPTH 0 EQUAL"],
-["1 2", "2 EQUALVERIFY 1 EQUAL", "Similarly whitespace around and between symbols"],
-["1  2", "2 EQUALVERIFY 1 EQUAL"],
-["  1  2", "2 EQUALVERIFY 1 EQUAL"],
-["1  2  ", "2 EQUALVERIFY 1 EQUAL"],
-["  1  2  ", "2 EQUALVERIFY 1 EQUAL"],
-
-["1", ""],
-["0x02 0x01 0x00", "", "all bytes are significant, not only the last one"],
-["0x09 0x00000000 0x00000000 0x10", "", "equals zero when cast to Int64"],
-
-["0x01 0x0b", "11 EQUAL", "push 1 byte"],
-["0x02 0x417a", "'Az' EQUAL"],
+["", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "Test the test: we should have an empty stack after scriptSig evaluation"],
+["  ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "and multiple spaces should not change that."],
+["   ", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["    ", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["1 2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC", "Similarly whitespace around and between symbols"],
+["1  2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+["  1  2", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+["1  2  ", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+["  1  2  ", "2 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+
+["1", "", "P2SH,STRICTENC"],
+["0x02 0x01 0x00", "", "P2SH,STRICTENC", "all bytes are significant, not only the last one"],
+["0x09 0x00000000 0x00000000 0x10", "", "P2SH,STRICTENC", "equals zero when cast to Int64"],
+
+["0x01 0x0b", "11 EQUAL", "P2SH,STRICTENC", "push 1 byte"],
+["0x02 0x417a", "'Az' EQUAL", "P2SH,STRICTENC"],
 ["0x4b 0x417a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a7a",
- "'Azzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' EQUAL", "push 75 bytes"],
-
-["0x4c 0x01 0x07","7 EQUAL", "0x4c is OP_PUSHDATA1"],
-["0x4d 0x0100 0x08","8 EQUAL", "0x4d is OP_PUSHDATA2"],
-["0x4e 0x01000000 0x09","9 EQUAL", "0x4e is OP_PUSHDATA4"],
-
-["0x4c 0x00","0 EQUAL"],
-["0x4d 0x0000","0 EQUAL"],
-["0x4e 0x00000000","0 EQUAL"],
-["0x4f 1000 ADD","999 EQUAL"],
-["0", "IF 0x50 ENDIF 1", "0x50 is reserved (ok if not executed)"],
-["0x51", "0x5f ADD 0x60 EQUAL", "0x51 through 0x60 push 1 through 16 onto stack"],
-["1","NOP"],
-["0", "IF VER ELSE 1 ENDIF", "VER non-functional (ok if not executed)"],
-["0", "IF RESERVED RESERVED1 RESERVED2 ELSE 1 ENDIF", "RESERVED ok in un-executed IF"],
-
-["1", "DUP IF ENDIF"],
-["1", "IF 1 ENDIF"],
-["1", "DUP IF ELSE ENDIF"],
-["1", "IF 1 ELSE ENDIF"],
-["0", "IF ELSE 1 ENDIF"],
-
-["1 1", "IF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 0", "IF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 1", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-["0 0", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-
-["1 0", "NOTIF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 1", "NOTIF IF 1 ELSE 0 ENDIF ENDIF"],
-["1 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-["0 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF"],
-
-["0", "IF 0 ELSE 1 ELSE 0 ENDIF", "Multiple ELSE's are valid and executed inverts on each ELSE encountered"],
-["1", "IF 1 ELSE 0 ELSE ENDIF"],
-["1", "IF ELSE 0 ELSE 1 ENDIF"],
-["1", "IF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL"],
-["'' 1", "IF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL"],
-
-["1", "NOTIF 0 ELSE 1 ELSE 0 ENDIF", "Multiple ELSE's are valid and execution inverts on each ELSE encountered"],
-["0", "NOTIF 1 ELSE 0 ELSE ENDIF"],
-["0", "NOTIF ELSE 0 ELSE 1 ENDIF"],
-["0", "NOTIF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL"],
-["'' 0", "NOTIF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL"],
-
-["0", "IF 1 IF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 1 IF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL", "Nested ELSE ELSE"],
-["1", "NOTIF 0 NOTIF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 0 NOTIF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL"],
-
-["0", "IF RETURN ENDIF 1", "RETURN only works if executed"],
-
-["1 1", "VERIFY"],
-["1 0x05 0x01 0x00 0x00 0x00 0x00", "VERIFY", "values >4 bytes can be cast to boolean"],
-
-["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL"],
-["'gavin_was_here' TOALTSTACK 11 FROMALTSTACK", "'gavin_was_here' EQUALVERIFY 11 EQUAL"],
-
-["0 IFDUP", "DEPTH 1 EQUALVERIFY 0 EQUAL"],
-["1 IFDUP", "DEPTH 2 EQUALVERIFY 1 EQUALVERIFY 1 EQUAL"],
-["0 DROP", "DEPTH 0 EQUAL"],
-["0", "DUP 1 ADD 1 EQUALVERIFY 0 EQUAL"],
-["0 1", "NIP"],
-["1 0", "OVER DEPTH 3 EQUALVERIFY"],
-["22 21 20", "0 PICK 20 EQUALVERIFY DEPTH 3 EQUAL"],
-["22 21 20", "1 PICK 21 EQUALVERIFY DEPTH 3 EQUAL"],
-["22 21 20", "2 PICK 22 EQUALVERIFY DEPTH 3 EQUAL"],
-["22 21 20", "0 ROLL 20 EQUALVERIFY DEPTH 2 EQUAL"],
-["22 21 20", "1 ROLL 21 EQUALVERIFY DEPTH 2 EQUAL"],
-["22 21 20", "2 ROLL 22 EQUALVERIFY DEPTH 2 EQUAL"],
-["22 21 20", "ROT 22 EQUAL"],
-["22 21 20", "ROT DROP 20 EQUAL"],
-["22 21 20", "ROT DROP DROP 21 EQUAL"],
-["22 21 20", "ROT ROT 21 EQUAL"],
-["22 21 20", "ROT ROT ROT 20 EQUAL"],
-["25 24 23 22 21 20", "2ROT 24 EQUAL"],
-["25 24 23 22 21 20", "2ROT DROP 25 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2DROP 20 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2DROP DROP 21 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2DROP 2DROP 22 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2DROP 2DROP DROP 23 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2ROT 22 EQUAL"],
-["25 24 23 22 21 20", "2ROT 2ROT 2ROT 20 EQUAL"],
-["1 0", "SWAP 1 EQUALVERIFY 0 EQUAL"],
-["0 1", "TUCK DEPTH 3 EQUALVERIFY SWAP 2DROP"],
-["13 14", "2DUP ROT EQUALVERIFY EQUAL"],
-["-1 0 1 2", "3DUP DEPTH 7 EQUALVERIFY ADD ADD 3 EQUALVERIFY 2DROP 0 EQUALVERIFY"],
-["1 2 3 5", "2OVER ADD ADD 8 EQUALVERIFY ADD ADD 6 EQUAL"],
-["1 3 5 7", "2SWAP ADD 4 EQUALVERIFY ADD 12 EQUAL"],
-["0", "SIZE 0 EQUAL"],
-["1", "SIZE 1 EQUAL"],
-["127", "SIZE 1 EQUAL"],
-["128", "SIZE 2 EQUAL"],
-["32767", "SIZE 2 EQUAL"],
-["32768", "SIZE 3 EQUAL"],
-["8388607", "SIZE 3 EQUAL"],
-["8388608", "SIZE 4 EQUAL"],
-["2147483647", "SIZE 4 EQUAL"],
-["2147483648", "SIZE 5 EQUAL"],
-["549755813887", "SIZE 5 EQUAL"],
-["549755813888", "SIZE 6 EQUAL"],
-["9223372036854775807", "SIZE 8 EQUAL"],
-["-1", "SIZE 1 EQUAL"],
-["-127", "SIZE 1 EQUAL"],
-["-128", "SIZE 2 EQUAL"],
-["-32767", "SIZE 2 EQUAL"],
-["-32768", "SIZE 3 EQUAL"],
-["-8388607", "SIZE 3 EQUAL"],
-["-8388608", "SIZE 4 EQUAL"],
-["-2147483647", "SIZE 4 EQUAL"],
-["-2147483648", "SIZE 5 EQUAL"],
-["-549755813887", "SIZE 5 EQUAL"],
-["-549755813888", "SIZE 6 EQUAL"],
-["-9223372036854775807", "SIZE 8 EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL"],
-
-["42", "SIZE 1 EQUALVERIFY 42 EQUAL", "SIZE does not consume argument"],
-
-["2 -2 ADD", "0 EQUAL"],
-["2147483647 -2147483647 ADD", "0 EQUAL"],
-["-1 -1 ADD", "-2 EQUAL"],
-
-["0 0","EQUAL"],
-["1 1 ADD", "2 EQUAL"],
-["1 1ADD", "2 EQUAL"],
-["111 1SUB", "110 EQUAL"],
-["111 1 ADD 12 SUB", "100 EQUAL"],
-["0 ABS", "0 EQUAL"],
-["16 ABS", "16 EQUAL"],
-["-16 ABS", "-16 NEGATE EQUAL"],
-["0 NOT", "NOP"],
-["1 NOT", "0 EQUAL"],
-["11 NOT", "0 EQUAL"],
-["0 0NOTEQUAL", "0 EQUAL"],
-["1 0NOTEQUAL", "1 EQUAL"],
-["111 0NOTEQUAL", "1 EQUAL"],
-["-111 0NOTEQUAL", "1 EQUAL"],
-["1 1 BOOLAND", "NOP"],
-["1 0 BOOLAND", "NOT"],
-["0 1 BOOLAND", "NOT"],
-["0 0 BOOLAND", "NOT"],
-["16 17 BOOLAND", "NOP"],
-["1 1 BOOLOR", "NOP"],
-["1 0 BOOLOR", "NOP"],
-["0 1 BOOLOR", "NOP"],
-["0 0 BOOLOR", "NOT"],
-["16 17 BOOLOR", "NOP"],
-["11 10 1 ADD", "NUMEQUAL"],
-["11 10 1 ADD", "NUMEQUALVERIFY 1"],
-["11 10 1 ADD", "NUMNOTEQUAL NOT"],
-["111 10 1 ADD", "NUMNOTEQUAL"],
-["11 10", "LESSTHAN NOT"],
-["4 4", "LESSTHAN NOT"],
-["10 11", "LESSTHAN"],
-["-11 11", "LESSTHAN"],
-["-11 -10", "LESSTHAN"],
-["11 10", "GREATERTHAN"],
-["4 4", "GREATERTHAN NOT"],
-["10 11", "GREATERTHAN NOT"],
-["-11 11", "GREATERTHAN NOT"],
-["-11 -10", "GREATERTHAN NOT"],
-["11 10", "LESSTHANOREQUAL NOT"],
-["4 4", "LESSTHANOREQUAL"],
-["10 11", "LESSTHANOREQUAL"],
-["-11 11", "LESSTHANOREQUAL"],
-["-11 -10", "LESSTHANOREQUAL"],
-["11 10", "GREATERTHANOREQUAL"],
-["4 4", "GREATERTHANOREQUAL"],
-["10 11", "GREATERTHANOREQUAL NOT"],
-["-11 11", "GREATERTHANOREQUAL NOT"],
-["-11 -10", "GREATERTHANOREQUAL NOT"],
-["1 0 MIN", "0 NUMEQUAL"],
-["0 1 MIN", "0 NUMEQUAL"],
-["-1 0 MIN", "-1 NUMEQUAL"],
-["0 -2147483647 MIN", "-2147483647 NUMEQUAL"],
-["2147483647 0 MAX", "2147483647 NUMEQUAL"],
-["0 100 MAX", "100 NUMEQUAL"],
-["-100 0 MAX", "0 NUMEQUAL"],
-["0 -2147483647 MAX", "0 NUMEQUAL"],
-["0 0 1", "WITHIN"],
-["1 0 1", "WITHIN NOT"],
-["0 -2147483647 2147483647", "WITHIN"],
-["-1 -100 100", "WITHIN"],
-["11 -100 100", "WITHIN"],
-["-2147483647 -100 100", "WITHIN NOT"],
-["2147483647 -100 100", "WITHIN NOT"],
-
-["2147483647 2147483647 SUB", "0 EQUAL"],
-["2147483647 DUP ADD", "4294967294 EQUAL", ">32 bit EQUAL is valid"],
-["2147483647 NEGATE DUP ADD", "-4294967294 EQUAL"],
-
-["''", "RIPEMD160 0x14 0x9c1185a5c5e9fc54612808977ee8f548b2258d31 EQUAL"],
-["'a'", "RIPEMD160 0x14 0x0bdc9d2d256b3ee9daae347be6f4dc835a467ffe EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "RIPEMD160 0x14 0xf71c27109c692c1b56bbdceb5b9d2865b3708dbc EQUAL"],
-["''", "SHA1 0x14 0xda39a3ee5e6b4b0d3255bfef95601890afd80709 EQUAL"],
-["'a'", "SHA1 0x14 0x86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "SHA1 0x14 0x32d10c7b8cf96570ca04ce37f2a19d84240d3a89 EQUAL"],
-["''", "SHA256 0x20 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 EQUAL"],
-["'a'", "SHA256 0x20 0xca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "SHA256 0x20 0x71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 EQUAL"],
-["''", "DUP HASH160 SWAP SHA256 RIPEMD160 EQUAL"],
-["''", "DUP HASH256 SWAP SHA256 SHA256 EQUAL"],
-["''", "NOP HASH160 0x14 0xb472a266d0bd89c13706a4132ccfb16f7c3b9fcb EQUAL"],
-["'a'", "HASH160 NOP 0x14 0x994355199e516ff76c4fa4aab39337b9d84cf12b EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "HASH160 0x4c 0x14 0xc286a1af0947f58d1ad787385b1c2c4a976f9e71 EQUAL"],
-["''", "HASH256 0x20 0x5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456 EQUAL"],
-["'a'", "HASH256 0x20 0xbf5d3affb73efd2ec6c36ad3112dd933efed63c4e1cbffcfa88e2759c144f2d8 EQUAL"],
-["'abcdefghijklmnopqrstuvwxyz'", "HASH256 0x4c 0x20 0xca139bc10c2f660da42666f72e89a225936fc60f193c161124a672050c434671 EQUAL"],
-
-
-["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL"],
-["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL"],
-
-["0", "IF 0xba ELSE 1 ENDIF", "opcodes above NOP10 invalid if executed"],
-["0", "IF 0xbb ELSE 1 ENDIF"],
-["0", "IF 0xbc ELSE 1 ENDIF"],
-["0", "IF 0xbd ELSE 1 ENDIF"],
-["0", "IF 0xbe ELSE 1 ENDIF"],
-["0", "IF 0xbf ELSE 1 ENDIF"],
-["0", "IF 0xc0 ELSE 1 ENDIF"],
-["0", "IF 0xc1 ELSE 1 ENDIF"],
-["0", "IF 0xc2 ELSE 1 ENDIF"],
-["0", "IF 0xc3 ELSE 1 ENDIF"],
-["0", "IF 0xc4 ELSE 1 ENDIF"],
-["0", "IF 0xc5 ELSE 1 ENDIF"],
-["0", "IF 0xc6 ELSE 1 ENDIF"],
-["0", "IF 0xc7 ELSE 1 ENDIF"],
-["0", "IF 0xc8 ELSE 1 ENDIF"],
-["0", "IF 0xc9 ELSE 1 ENDIF"],
-["0", "IF 0xca ELSE 1 ENDIF"],
-["0", "IF 0xcb ELSE 1 ENDIF"],
-["0", "IF 0xcc ELSE 1 ENDIF"],
-["0", "IF 0xcd ELSE 1 ENDIF"],
-["0", "IF 0xce ELSE 1 ENDIF"],
-["0", "IF 0xcf ELSE 1 ENDIF"],
-["0", "IF 0xd0 ELSE 1 ENDIF"],
-["0", "IF 0xd1 ELSE 1 ENDIF"],
-["0", "IF 0xd2 ELSE 1 ENDIF"],
-["0", "IF 0xd3 ELSE 1 ENDIF"],
-["0", "IF 0xd4 ELSE 1 ENDIF"],
-["0", "IF 0xd5 ELSE 1 ENDIF"],
-["0", "IF 0xd6 ELSE 1 ENDIF"],
-["0", "IF 0xd7 ELSE 1 ENDIF"],
-["0", "IF 0xd8 ELSE 1 ENDIF"],
-["0", "IF 0xd9 ELSE 1 ENDIF"],
-["0", "IF 0xda ELSE 1 ENDIF"],
-["0", "IF 0xdb ELSE 1 ENDIF"],
-["0", "IF 0xdc ELSE 1 ENDIF"],
-["0", "IF 0xdd ELSE 1 ENDIF"],
-["0", "IF 0xde ELSE 1 ENDIF"],
-["0", "IF 0xdf ELSE 1 ENDIF"],
-["0", "IF 0xe0 ELSE 1 ENDIF"],
-["0", "IF 0xe1 ELSE 1 ENDIF"],
-["0", "IF 0xe2 ELSE 1 ENDIF"],
-["0", "IF 0xe3 ELSE 1 ENDIF"],
-["0", "IF 0xe4 ELSE 1 ENDIF"],
-["0", "IF 0xe5 ELSE 1 ENDIF"],
-["0", "IF 0xe6 ELSE 1 ENDIF"],
-["0", "IF 0xe7 ELSE 1 ENDIF"],
-["0", "IF 0xe8 ELSE 1 ENDIF"],
-["0", "IF 0xe9 ELSE 1 ENDIF"],
-["0", "IF 0xea ELSE 1 ENDIF"],
-["0", "IF 0xeb ELSE 1 ENDIF"],
-["0", "IF 0xec ELSE 1 ENDIF"],
-["0", "IF 0xed ELSE 1 ENDIF"],
-["0", "IF 0xee ELSE 1 ENDIF"],
-["0", "IF 0xef ELSE 1 ENDIF"],
-["0", "IF 0xf0 ELSE 1 ENDIF"],
-["0", "IF 0xf1 ELSE 1 ENDIF"],
-["0", "IF 0xf2 ELSE 1 ENDIF"],
-["0", "IF 0xf3 ELSE 1 ENDIF"],
-["0", "IF 0xf4 ELSE 1 ENDIF"],
-["0", "IF 0xf5 ELSE 1 ENDIF"],
-["0", "IF 0xf6 ELSE 1 ENDIF"],
-["0", "IF 0xf7 ELSE 1 ENDIF"],
-["0", "IF 0xf8 ELSE 1 ENDIF"],
-["0", "IF 0xf9 ELSE 1 ENDIF"],
-["0", "IF 0xfa ELSE 1 ENDIF"],
-["0", "IF 0xfb ELSE 1 ENDIF"],
-["0", "IF 0xfc ELSE 1 ENDIF"],
-["0", "IF 0xfd ELSE 1 ENDIF"],
-["0", "IF 0xfe ELSE 1 ENDIF"],
-["0", "IF 0xff ELSE 1 ENDIF"],
+ "'Azzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' EQUAL", "P2SH,STRICTENC", "push 75 bytes"],
+
+["0x4c 0x01 0x07","7 EQUAL", "P2SH,STRICTENC", "0x4c is OP_PUSHDATA1"],
+["0x4d 0x0100 0x08","8 EQUAL", "P2SH,STRICTENC", "0x4d is OP_PUSHDATA2"],
+["0x4e 0x01000000 0x09","9 EQUAL", "P2SH,STRICTENC", "0x4e is OP_PUSHDATA4"],
+
+["0x4c 0x00","0 EQUAL", "P2SH,STRICTENC"],
+["0x4d 0x0000","0 EQUAL", "P2SH,STRICTENC"],
+["0x4e 0x00000000","0 EQUAL", "P2SH,STRICTENC"],
+["0x4f 1000 ADD","999 EQUAL", "P2SH,STRICTENC"],
+["0", "IF 0x50 ENDIF 1", "P2SH,STRICTENC", "0x50 is reserved (ok if not executed)"],
+["0x51", "0x5f ADD 0x60 EQUAL", "P2SH,STRICTENC", "0x51 through 0x60 push 1 through 16 onto stack"],
+["1","NOP", "P2SH,STRICTENC"],
+["0", "IF VER ELSE 1 ENDIF", "P2SH,STRICTENC", "VER non-functional (ok if not executed)"],
+["0", "IF RESERVED RESERVED1 RESERVED2 ELSE 1 ENDIF", "P2SH,STRICTENC", "RESERVED ok in un-executed IF"],
+
+["1", "DUP IF ENDIF", "P2SH,STRICTENC"],
+["1", "IF 1 ENDIF", "P2SH,STRICTENC"],
+["1", "DUP IF ELSE ENDIF", "P2SH,STRICTENC"],
+["1", "IF 1 ELSE ENDIF", "P2SH,STRICTENC"],
+["0", "IF ELSE 1 ENDIF", "P2SH,STRICTENC"],
+
+["1 1", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 0", "IF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 1", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 0", "IF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+
+["1 0", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 1", "NOTIF IF 1 ELSE 0 ENDIF ENDIF", "P2SH,STRICTENC"],
+["1 0", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+["0 1", "NOTIF IF 1 ELSE 0 ENDIF ELSE IF 0 ELSE 1 ENDIF ENDIF", "P2SH,STRICTENC"],
+
+["0", "IF 0 ELSE 1 ELSE 0 ENDIF", "P2SH,STRICTENC", "Multiple ELSE's are valid and executed inverts on each ELSE encountered"],
+["1", "IF 1 ELSE 0 ELSE ENDIF", "P2SH,STRICTENC"],
+["1", "IF ELSE 0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["1", "IF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL", "P2SH,STRICTENC"],
+["'' 1", "IF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL", "P2SH,STRICTENC"],
+
+["1", "NOTIF 0 ELSE 1 ELSE 0 ENDIF", "P2SH,STRICTENC", "Multiple ELSE's are valid and execution inverts on each ELSE encountered"],
+["0", "NOTIF 1 ELSE 0 ELSE ENDIF", "P2SH,STRICTENC"],
+["0", "NOTIF ELSE 0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "NOTIF 1 ELSE 0 ELSE 1 ENDIF ADD 2 EQUAL", "P2SH,STRICTENC"],
+["'' 0", "NOTIF SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ELSE ELSE SHA1 ENDIF 0x14 0x68ca4fec736264c13b859bac43d5173df6871682 EQUAL", "P2SH,STRICTENC"],
+
+["0", "IF 1 IF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 1 IF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL", "P2SH,STRICTENC", "Nested ELSE ELSE"],
+["1", "NOTIF 0 NOTIF RETURN ELSE RETURN ELSE RETURN ENDIF ELSE 0 NOTIF 1 ELSE RETURN ELSE 1 ENDIF ELSE RETURN ENDIF ADD 2 EQUAL", "P2SH,STRICTENC"],
+
+["0", "IF RETURN ENDIF 1", "P2SH,STRICTENC", "RETURN only works if executed"],
+
+["1 1", "VERIFY", "P2SH,STRICTENC"],
+["1 0x05 0x01 0x00 0x00 0x00 0x00", "VERIFY", "P2SH,STRICTENC", "values >4 bytes can be cast to boolean"],
+
+["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL", "P2SH,STRICTENC"],
+["'gavin_was_here' TOALTSTACK 11 FROMALTSTACK", "'gavin_was_here' EQUALVERIFY 11 EQUAL", "P2SH,STRICTENC"],
+
+["0 IFDUP", "DEPTH 1 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
+["1 IFDUP", "DEPTH 2 EQUALVERIFY 1 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+["0 DROP", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["0", "DUP 1 ADD 1 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
+["0 1", "NIP", "P2SH,STRICTENC"],
+["1 0", "OVER DEPTH 3 EQUALVERIFY", "P2SH,STRICTENC"],
+["22 21 20", "0 PICK 20 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "1 PICK 21 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "2 PICK 22 EQUALVERIFY DEPTH 3 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "0 ROLL 20 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "1 ROLL 21 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "2 ROLL 22 EQUALVERIFY DEPTH 2 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "ROT 22 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "ROT DROP 20 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "ROT DROP DROP 21 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "ROT ROT 21 EQUAL", "P2SH,STRICTENC"],
+["22 21 20", "ROT ROT ROT 20 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 24 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT DROP 25 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2DROP 20 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2DROP DROP 21 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2DROP 2DROP 22 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2DROP 2DROP DROP 23 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2ROT 22 EQUAL", "P2SH,STRICTENC"],
+["25 24 23 22 21 20", "2ROT 2ROT 2ROT 20 EQUAL", "P2SH,STRICTENC"],
+["1 0", "SWAP 1 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
+["0 1", "TUCK DEPTH 3 EQUALVERIFY SWAP 2DROP", "P2SH,STRICTENC"],
+["13 14", "2DUP ROT EQUALVERIFY EQUAL", "P2SH,STRICTENC"],
+["-1 0 1 2", "3DUP DEPTH 7 EQUALVERIFY ADD ADD 3 EQUALVERIFY 2DROP 0 EQUALVERIFY", "P2SH,STRICTENC"],
+["1 2 3 5", "2OVER ADD ADD 8 EQUALVERIFY ADD ADD 6 EQUAL", "P2SH,STRICTENC"],
+["1 3 5 7", "2SWAP ADD 4 EQUALVERIFY ADD 12 EQUAL", "P2SH,STRICTENC"],
+["0", "SIZE 0 EQUAL", "P2SH,STRICTENC"],
+["1", "SIZE 1 EQUAL", "P2SH,STRICTENC"],
+["127", "SIZE 1 EQUAL", "P2SH,STRICTENC"],
+["128", "SIZE 2 EQUAL", "P2SH,STRICTENC"],
+["32767", "SIZE 2 EQUAL", "P2SH,STRICTENC"],
+["32768", "SIZE 3 EQUAL", "P2SH,STRICTENC"],
+["8388607", "SIZE 3 EQUAL", "P2SH,STRICTENC"],
+["8388608", "SIZE 4 EQUAL", "P2SH,STRICTENC"],
+["2147483647", "SIZE 4 EQUAL", "P2SH,STRICTENC"],
+["2147483648", "SIZE 5 EQUAL", "P2SH,STRICTENC"],
+["549755813887", "SIZE 5 EQUAL", "P2SH,STRICTENC"],
+["549755813888", "SIZE 6 EQUAL", "P2SH,STRICTENC"],
+["9223372036854775807", "SIZE 8 EQUAL", "P2SH,STRICTENC"],
+["-1", "SIZE 1 EQUAL", "P2SH,STRICTENC"],
+["-127", "SIZE 1 EQUAL", "P2SH,STRICTENC"],
+["-128", "SIZE 2 EQUAL", "P2SH,STRICTENC"],
+["-32767", "SIZE 2 EQUAL", "P2SH,STRICTENC"],
+["-32768", "SIZE 3 EQUAL", "P2SH,STRICTENC"],
+["-8388607", "SIZE 3 EQUAL", "P2SH,STRICTENC"],
+["-8388608", "SIZE 4 EQUAL", "P2SH,STRICTENC"],
+["-2147483647", "SIZE 4 EQUAL", "P2SH,STRICTENC"],
+["-2147483648", "SIZE 5 EQUAL", "P2SH,STRICTENC"],
+["-549755813887", "SIZE 5 EQUAL", "P2SH,STRICTENC"],
+["-549755813888", "SIZE 6 EQUAL", "P2SH,STRICTENC"],
+["-9223372036854775807", "SIZE 8 EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL", "P2SH,STRICTENC"],
+
+["42", "SIZE 1 EQUALVERIFY 42 EQUAL", "P2SH,STRICTENC", "SIZE does not consume argument"],
+
+["2 -2 ADD", "0 EQUAL", "P2SH,STRICTENC"],
+["2147483647 -2147483647 ADD", "0 EQUAL", "P2SH,STRICTENC"],
+["-1 -1 ADD", "-2 EQUAL", "P2SH,STRICTENC"],
+
+["0 0","EQUAL", "P2SH,STRICTENC"],
+["1 1 ADD", "2 EQUAL", "P2SH,STRICTENC"],
+["1 1ADD", "2 EQUAL", "P2SH,STRICTENC"],
+["111 1SUB", "110 EQUAL", "P2SH,STRICTENC"],
+["111 1 ADD 12 SUB", "100 EQUAL", "P2SH,STRICTENC"],
+["0 ABS", "0 EQUAL", "P2SH,STRICTENC"],
+["16 ABS", "16 EQUAL", "P2SH,STRICTENC"],
+["-16 ABS", "-16 NEGATE EQUAL", "P2SH,STRICTENC"],
+["0 NOT", "NOP", "P2SH,STRICTENC"],
+["1 NOT", "0 EQUAL", "P2SH,STRICTENC"],
+["11 NOT", "0 EQUAL", "P2SH,STRICTENC"],
+["0 0NOTEQUAL", "0 EQUAL", "P2SH,STRICTENC"],
+["1 0NOTEQUAL", "1 EQUAL", "P2SH,STRICTENC"],
+["111 0NOTEQUAL", "1 EQUAL", "P2SH,STRICTENC"],
+["-111 0NOTEQUAL", "1 EQUAL", "P2SH,STRICTENC"],
+["1 1 BOOLAND", "NOP", "P2SH,STRICTENC"],
+["1 0 BOOLAND", "NOT", "P2SH,STRICTENC"],
+["0 1 BOOLAND", "NOT", "P2SH,STRICTENC"],
+["0 0 BOOLAND", "NOT", "P2SH,STRICTENC"],
+["16 17 BOOLAND", "NOP", "P2SH,STRICTENC"],
+["1 1 BOOLOR", "NOP", "P2SH,STRICTENC"],
+["1 0 BOOLOR", "NOP", "P2SH,STRICTENC"],
+["0 1 BOOLOR", "NOP", "P2SH,STRICTENC"],
+["0 0 BOOLOR", "NOT", "P2SH,STRICTENC"],
+["16 17 BOOLOR", "NOP", "P2SH,STRICTENC"],
+["11 10 1 ADD", "NUMEQUAL", "P2SH,STRICTENC"],
+["11 10 1 ADD", "NUMEQUALVERIFY 1", "P2SH,STRICTENC"],
+["11 10 1 ADD", "NUMNOTEQUAL NOT", "P2SH,STRICTENC"],
+["111 10 1 ADD", "NUMNOTEQUAL", "P2SH,STRICTENC"],
+["11 10", "LESSTHAN NOT", "P2SH,STRICTENC"],
+["4 4", "LESSTHAN NOT", "P2SH,STRICTENC"],
+["10 11", "LESSTHAN", "P2SH,STRICTENC"],
+["-11 11", "LESSTHAN", "P2SH,STRICTENC"],
+["-11 -10", "LESSTHAN", "P2SH,STRICTENC"],
+["11 10", "GREATERTHAN", "P2SH,STRICTENC"],
+["4 4", "GREATERTHAN NOT", "P2SH,STRICTENC"],
+["10 11", "GREATERTHAN NOT", "P2SH,STRICTENC"],
+["-11 11", "GREATERTHAN NOT", "P2SH,STRICTENC"],
+["-11 -10", "GREATERTHAN NOT", "P2SH,STRICTENC"],
+["11 10", "LESSTHANOREQUAL NOT", "P2SH,STRICTENC"],
+["4 4", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["10 11", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["-11 11", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["-11 -10", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["11 10", "GREATERTHANOREQUAL", "P2SH,STRICTENC"],
+["4 4", "GREATERTHANOREQUAL", "P2SH,STRICTENC"],
+["10 11", "GREATERTHANOREQUAL NOT", "P2SH,STRICTENC"],
+["-11 11", "GREATERTHANOREQUAL NOT", "P2SH,STRICTENC"],
+["-11 -10", "GREATERTHANOREQUAL NOT", "P2SH,STRICTENC"],
+["1 0 MIN", "0 NUMEQUAL", "P2SH,STRICTENC"],
+["0 1 MIN", "0 NUMEQUAL", "P2SH,STRICTENC"],
+["-1 0 MIN", "-1 NUMEQUAL", "P2SH,STRICTENC"],
+["0 -2147483647 MIN", "-2147483647 NUMEQUAL", "P2SH,STRICTENC"],
+["2147483647 0 MAX", "2147483647 NUMEQUAL", "P2SH,STRICTENC"],
+["0 100 MAX", "100 NUMEQUAL", "P2SH,STRICTENC"],
+["-100 0 MAX", "0 NUMEQUAL", "P2SH,STRICTENC"],
+["0 -2147483647 MAX", "0 NUMEQUAL", "P2SH,STRICTENC"],
+["0 0 1", "WITHIN", "P2SH,STRICTENC"],
+["1 0 1", "WITHIN NOT", "P2SH,STRICTENC"],
+["0 -2147483647 2147483647", "WITHIN", "P2SH,STRICTENC"],
+["-1 -100 100", "WITHIN", "P2SH,STRICTENC"],
+["11 -100 100", "WITHIN", "P2SH,STRICTENC"],
+["-2147483647 -100 100", "WITHIN NOT", "P2SH,STRICTENC"],
+["2147483647 -100 100", "WITHIN NOT", "P2SH,STRICTENC"],
+
+["2147483647 2147483647 SUB", "0 EQUAL", "P2SH,STRICTENC"],
+["2147483647 DUP ADD", "4294967294 EQUAL", "P2SH,STRICTENC", ">32 bit EQUAL is valid"],
+["2147483647 NEGATE DUP ADD", "-4294967294 EQUAL", "P2SH,STRICTENC"],
+
+["''", "RIPEMD160 0x14 0x9c1185a5c5e9fc54612808977ee8f548b2258d31 EQUAL", "P2SH,STRICTENC"],
+["'a'", "RIPEMD160 0x14 0x0bdc9d2d256b3ee9daae347be6f4dc835a467ffe EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "RIPEMD160 0x14 0xf71c27109c692c1b56bbdceb5b9d2865b3708dbc EQUAL", "P2SH,STRICTENC"],
+["''", "SHA1 0x14 0xda39a3ee5e6b4b0d3255bfef95601890afd80709 EQUAL", "P2SH,STRICTENC"],
+["'a'", "SHA1 0x14 0x86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "SHA1 0x14 0x32d10c7b8cf96570ca04ce37f2a19d84240d3a89 EQUAL", "P2SH,STRICTENC"],
+["''", "SHA256 0x20 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 EQUAL", "P2SH,STRICTENC"],
+["'a'", "SHA256 0x20 0xca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "SHA256 0x20 0x71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73 EQUAL", "P2SH,STRICTENC"],
+["''", "DUP HASH160 SWAP SHA256 RIPEMD160 EQUAL", "P2SH,STRICTENC"],
+["''", "DUP HASH256 SWAP SHA256 SHA256 EQUAL", "P2SH,STRICTENC"],
+["''", "NOP HASH160 0x14 0xb472a266d0bd89c13706a4132ccfb16f7c3b9fcb EQUAL", "P2SH,STRICTENC"],
+["'a'", "HASH160 NOP 0x14 0x994355199e516ff76c4fa4aab39337b9d84cf12b EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "HASH160 0x4c 0x14 0xc286a1af0947f58d1ad787385b1c2c4a976f9e71 EQUAL", "P2SH,STRICTENC"],
+["''", "HASH256 0x20 0x5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456 EQUAL", "P2SH,STRICTENC"],
+["'a'", "HASH256 0x20 0xbf5d3affb73efd2ec6c36ad3112dd933efed63c4e1cbffcfa88e2759c144f2d8 EQUAL", "P2SH,STRICTENC"],
+["'abcdefghijklmnopqrstuvwxyz'", "HASH256 0x4c 0x20 0xca139bc10c2f660da42666f72e89a225936fc60f193c161124a672050c434671 EQUAL", "P2SH,STRICTENC"],
+
+
+["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH,STRICTENC"],
+["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL", "P2SH,STRICTENC"],
+
+["0", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "opcodes above NOP10 invalid if executed"],
+["0", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xbd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xbe ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xbf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xc9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xca ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xcb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xcc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xcd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xce ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xcf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xd9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xda ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xdb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xdc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xdd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xde ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xdf ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xe9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xea ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xeb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xec ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xed ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xee ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xef ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf0 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf1 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf2 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf3 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf4 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf5 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf6 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf7 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf8 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xf9 ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xfa ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xfb ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xfc ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xfd ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xfe ELSE 1 ENDIF", "P2SH,STRICTENC"],
+["0", "IF 0xff ELSE 1 ENDIF", "P2SH,STRICTENC"],
 
 ["NOP",
 "'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'",
+"P2SH,STRICTENC",
 "520 byte push"],
 ["1",
 "0x616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+"P2SH,STRICTENC",
 "201 opcodes executed. 0x61 is NOP"],
 ["1 2 3 4 5 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
 "1 2 3 4 5 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
+"P2SH,STRICTENC",
 "1,000 stack size (0x6f is 3DUP)"],
 ["1 TOALTSTACK 2 TOALTSTACK 3 4 5 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
 "1 2 3 4 5 6 7 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
+"P2SH,STRICTENC",
 "1,000 stack size (altstack cleared between scriptSig/scriptPubKey)"],
 ["'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f",
 "'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' 0x6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f6f 2DUP 0x616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161",
+"P2SH,STRICTENC",
 "Max-size (10,000-byte), max-push(520 bytes), max-opcodes(201), max stack size(1,000 items). 0x6f is 3DUP, 0x61 is NOP"],
 
 ["0",
 "IF 0x5050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050505050 ENDIF 1",
+"P2SH,STRICTENC",
 ">201 opcodes, but RESERVED (0x50) doesn't count towards opcode limit."],
 
-["NOP","1"],
-
-["1", "0x01 0x01 EQUAL", "The following is useful for checking implementations of BN_bn2mpi"],
-["127", "0x01 0x7F EQUAL"],
-["128", "0x02 0x8000 EQUAL", "Leave room for the sign bit"],
-["32767", "0x02 0xFF7F EQUAL"],
-["32768", "0x03 0x008000 EQUAL"],
-["8388607", "0x03 0xFFFF7F EQUAL"],
-["8388608", "0x04 0x00008000 EQUAL"],
-["2147483647", "0x04 0xFFFFFF7F EQUAL"],
-["2147483648", "0x05 0x0000008000 EQUAL"],
-["549755813887", "0x05 0xFFFFFFFF7F EQUAL"],
-["549755813888", "0x06 0xFFFFFFFF7F EQUAL"],
-["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL"],
-["-1", "0x01 0x81 EQUAL", "Numbers are little-endian with the MSB being a sign bit"],
-["-127", "0x01 0xFF EQUAL"],
-["-128", "0x02 0x8080 EQUAL"],
-["-32767", "0x02 0xFFFF EQUAL"],
-["-32768", "0x03 0x008080 EQUAL"],
-["-8388607", "0x03 0xFFFFFF EQUAL"],
-["-8388608", "0x04 0x00008080 EQUAL"],
-["-2147483647", "0x04 0xFFFFFFFF EQUAL"],
-["-2147483648", "0x05 0x0000008080 EQUAL"],
-["-4294967295", "0x05 0xFFFFFFFF80 EQUAL"],
-["-549755813887", "0x05 0xFFFFFFFFFF EQUAL"],
-["-549755813888", "0x06 0x000000008080 EQUAL"],
-["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL"],
-
-["2147483647", "1ADD 2147483648 EQUAL", "We can do math on 4-byte integers, and compare 5-byte ones"],
-["2147483647", "1ADD 1"],
-["-2147483647", "1ADD 1"],
-
-["1", "0x02 0x0100 EQUAL NOT", "Not the same byte array..."],
-["1", "0x02 0x0100 NUMEQUAL", "... but they are numerically equal"],
-["11", "0x4c 0x03 0x0b0000 NUMEQUAL"],
-["0", "0x01 0x80 EQUAL NOT"],
-["0", "0x01 0x80 NUMEQUAL", "Zero numerically equals negative zero"],
-["0", "0x02 0x0080 NUMEQUAL"],
-["0x03 0x000080", "0x04 0x00000080 NUMEQUAL"],
-["0x03 0x100080", "0x04 0x10000080 NUMEQUAL"],
-["0x03 0x100000", "0x04 0x10000000 NUMEQUAL"],
-
-["NOP", "NOP 1", "The following tests check the if(stack.size() < N) tests in each opcode"],
-["1", "IF 1 ENDIF", "They are here to catch copy-and-paste errors"],
-["0", "NOTIF 1 ENDIF", "Most of them are duplicated elsewhere,"],
-["1", "VERIFY 1", "but, hey, more is always better, right?"],
-
-["0", "TOALTSTACK 1"],
-["1", "TOALTSTACK FROMALTSTACK"],
-["0 0", "2DROP 1"],
-["0 1", "2DUP"],
-["0 0 1", "3DUP"],
-["0 1 0 0", "2OVER"],
-["0 1 0 0 0 0", "2ROT"],
-["0 1 0 0", "2SWAP"],
-["1", "IFDUP"],
-["NOP", "DEPTH 1"],
-["0", "DROP 1"],
-["1", "DUP"],
-["0 1", "NIP"],
-["1 0", "OVER"],
-["1 0 0 0 3", "PICK"],
-["1 0", "PICK"],
-["1 0 0 0 3", "ROLL"],
-["1 0", "ROLL"],
-["1 0 0", "ROT"],
-["1 0", "SWAP"],
-["0 1", "TUCK"],
-
-["1", "SIZE"],
-
-["0 0", "EQUAL"],
-["0 0", "EQUALVERIFY 1"],
-
-["0", "1ADD"],
-["2", "1SUB"],
-["-1", "NEGATE"],
-["-1", "ABS"],
-["0", "NOT"],
-["-1", "0NOTEQUAL"],
-
-["1 0", "ADD"],
-["1 0", "SUB"],
-["-1 -1", "BOOLAND"],
-["-1 0", "BOOLOR"],
-["0 0", "NUMEQUAL"],
-["0 0", "NUMEQUALVERIFY 1"],
-["-1 0", "NUMNOTEQUAL"],
-["-1 0", "LESSTHAN"],
-["1 0", "GREATERTHAN"],
-["0 0", "LESSTHANOREQUAL"],
-["0 0", "GREATERTHANOREQUAL"],
-["-1 0", "MIN"],
-["1 0", "MAX"],
-["-1 -1 0", "WITHIN"],
-
-["0", "RIPEMD160"],
-["0", "SHA1"],
-["0", "SHA256"],
-["0", "HASH160"],
-["0", "HASH256"],
-["NOP", "CODESEPARATOR 1"],
-
-["NOP", "NOP1 1"],
-["NOP", "NOP2 1"],
-["NOP", "NOP3 1"],
-["NOP", "NOP4 1"],
-["NOP", "NOP5 1"],
-["NOP", "NOP6 1"],
-["NOP", "NOP7 1"],
-["NOP", "NOP8 1"],
-["NOP", "NOP9 1"],
-["NOP", "NOP10 1"],
-
-["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
-["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Zero sigs means no sigs are checked"],
-["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-
-["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
-["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Zero sigs means no sigs are checked"],
-["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-
-["", "0 0 'a' 'b' 2 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "Test from up to 20 pubkeys, all not checked"],
-["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG VERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 2 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
-["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY DEPTH 0 EQUAL"],
+["NOP","1", "P2SH,STRICTENC"],
+
+["1", "0x01 0x01 EQUAL", "P2SH,STRICTENC", "The following is useful for checking implementations of BN_bn2mpi"],
+["127", "0x01 0x7F EQUAL", "P2SH,STRICTENC"],
+["128", "0x02 0x8000 EQUAL", "P2SH,STRICTENC", "Leave room for the sign bit"],
+["32767", "0x02 0xFF7F EQUAL", "P2SH,STRICTENC"],
+["32768", "0x03 0x008000 EQUAL", "P2SH,STRICTENC"],
+["8388607", "0x03 0xFFFF7F EQUAL", "P2SH,STRICTENC"],
+["8388608", "0x04 0x00008000 EQUAL", "P2SH,STRICTENC"],
+["2147483647", "0x04 0xFFFFFF7F EQUAL", "P2SH,STRICTENC"],
+["2147483648", "0x05 0x0000008000 EQUAL", "P2SH,STRICTENC"],
+["549755813887", "0x05 0xFFFFFFFF7F EQUAL", "P2SH,STRICTENC"],
+["549755813888", "0x06 0xFFFFFFFF7F EQUAL", "P2SH,STRICTENC"],
+["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL", "P2SH,STRICTENC"],
+["-1", "0x01 0x81 EQUAL", "P2SH,STRICTENC", "Numbers are little-endian with the MSB being a sign bit"],
+["-127", "0x01 0xFF EQUAL", "P2SH,STRICTENC"],
+["-128", "0x02 0x8080 EQUAL", "P2SH,STRICTENC"],
+["-32767", "0x02 0xFFFF EQUAL", "P2SH,STRICTENC"],
+["-32768", "0x03 0x008080 EQUAL", "P2SH,STRICTENC"],
+["-8388607", "0x03 0xFFFFFF EQUAL", "P2SH,STRICTENC"],
+["-8388608", "0x04 0x00008080 EQUAL", "P2SH,STRICTENC"],
+["-2147483647", "0x04 0xFFFFFFFF EQUAL", "P2SH,STRICTENC"],
+["-2147483648", "0x05 0x0000008080 EQUAL", "P2SH,STRICTENC"],
+["-4294967295", "0x05 0xFFFFFFFF80 EQUAL", "P2SH,STRICTENC"],
+["-549755813887", "0x05 0xFFFFFFFFFF EQUAL", "P2SH,STRICTENC"],
+["-549755813888", "0x06 0x000000008080 EQUAL", "P2SH,STRICTENC"],
+["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL", "P2SH,STRICTENC"],
+
+["2147483647", "1ADD 2147483648 EQUAL", "P2SH,STRICTENC", "We can do math on 4-byte integers, and compare 5-byte ones"],
+["2147483647", "1ADD 1", "P2SH,STRICTENC"],
+["-2147483647", "1ADD 1", "P2SH,STRICTENC"],
+
+["1", "0x02 0x0100 EQUAL NOT", "P2SH,STRICTENC", "Not the same byte array..."],
+["1", "0x02 0x0100 NUMEQUAL", "P2SH,STRICTENC", "... but they are numerically equal"],
+["11", "0x4c 0x03 0x0b0000 NUMEQUAL", "P2SH,STRICTENC"],
+["0", "0x01 0x80 EQUAL NOT", "P2SH,STRICTENC"],
+["0", "0x01 0x80 NUMEQUAL", "P2SH,STRICTENC", "Zero numerically equals negative zero"],
+["0", "0x02 0x0080 NUMEQUAL", "P2SH,STRICTENC"],
+["0x03 0x000080", "0x04 0x00000080 NUMEQUAL", "P2SH,STRICTENC"],
+["0x03 0x100080", "0x04 0x10000080 NUMEQUAL", "P2SH,STRICTENC"],
+["0x03 0x100000", "0x04 0x10000000 NUMEQUAL", "P2SH,STRICTENC"],
+
+["NOP", "NOP 1", "P2SH,STRICTENC", "The following tests check the if(stack.size() < N) tests in each opcode"],
+["1", "IF 1 ENDIF", "P2SH,STRICTENC", "They are here to catch copy-and-paste errors"],
+["0", "NOTIF 1 ENDIF", "P2SH,STRICTENC", "Most of them are duplicated elsewhere,"],
+["1", "VERIFY 1", "P2SH,STRICTENC", "but, hey, more is always better, right?"],
+
+["0", "TOALTSTACK 1", "P2SH,STRICTENC"],
+["1", "TOALTSTACK FROMALTSTACK", "P2SH,STRICTENC"],
+["0 0", "2DROP 1", "P2SH,STRICTENC"],
+["0 1", "2DUP", "P2SH,STRICTENC"],
+["0 0 1", "3DUP", "P2SH,STRICTENC"],
+["0 1 0 0", "2OVER", "P2SH,STRICTENC"],
+["0 1 0 0 0 0", "2ROT", "P2SH,STRICTENC"],
+["0 1 0 0", "2SWAP", "P2SH,STRICTENC"],
+["1", "IFDUP", "P2SH,STRICTENC"],
+["NOP", "DEPTH 1", "P2SH,STRICTENC"],
+["0", "DROP 1", "P2SH,STRICTENC"],
+["1", "DUP", "P2SH,STRICTENC"],
+["0 1", "NIP", "P2SH,STRICTENC"],
+["1 0", "OVER", "P2SH,STRICTENC"],
+["1 0 0 0 3", "PICK", "P2SH,STRICTENC"],
+["1 0", "PICK", "P2SH,STRICTENC"],
+["1 0 0 0 3", "ROLL", "P2SH,STRICTENC"],
+["1 0", "ROLL", "P2SH,STRICTENC"],
+["1 0 0", "ROT", "P2SH,STRICTENC"],
+["1 0", "SWAP", "P2SH,STRICTENC"],
+["0 1", "TUCK", "P2SH,STRICTENC"],
+
+["1", "SIZE", "P2SH,STRICTENC"],
+
+["0 0", "EQUAL", "P2SH,STRICTENC"],
+["0 0", "EQUALVERIFY 1", "P2SH,STRICTENC"],
+
+["0", "1ADD", "P2SH,STRICTENC"],
+["2", "1SUB", "P2SH,STRICTENC"],
+["-1", "NEGATE", "P2SH,STRICTENC"],
+["-1", "ABS", "P2SH,STRICTENC"],
+["0", "NOT", "P2SH,STRICTENC"],
+["-1", "0NOTEQUAL", "P2SH,STRICTENC"],
+
+["1 0", "ADD", "P2SH,STRICTENC"],
+["1 0", "SUB", "P2SH,STRICTENC"],
+["-1 -1", "BOOLAND", "P2SH,STRICTENC"],
+["-1 0", "BOOLOR", "P2SH,STRICTENC"],
+["0 0", "NUMEQUAL", "P2SH,STRICTENC"],
+["0 0", "NUMEQUALVERIFY 1", "P2SH,STRICTENC"],
+["-1 0", "NUMNOTEQUAL", "P2SH,STRICTENC"],
+["-1 0", "LESSTHAN", "P2SH,STRICTENC"],
+["1 0", "GREATERTHAN", "P2SH,STRICTENC"],
+["0 0", "LESSTHANOREQUAL", "P2SH,STRICTENC"],
+["0 0", "GREATERTHANOREQUAL", "P2SH,STRICTENC"],
+["-1 0", "MIN", "P2SH,STRICTENC"],
+["1 0", "MAX", "P2SH,STRICTENC"],
+["-1 -1 0", "WITHIN", "P2SH,STRICTENC"],
+
+["0", "RIPEMD160", "P2SH,STRICTENC"],
+["0", "SHA1", "P2SH,STRICTENC"],
+["0", "SHA256", "P2SH,STRICTENC"],
+["0", "HASH160", "P2SH,STRICTENC"],
+["0", "HASH256", "P2SH,STRICTENC"],
+["NOP", "CODESEPARATOR 1", "P2SH,STRICTENC"],
+
+["NOP", "NOP1 1", "P2SH,STRICTENC"],
+["NOP", "NOP2 1", "P2SH,STRICTENC"],
+["NOP", "NOP3 1", "P2SH,STRICTENC"],
+["NOP", "NOP4 1", "P2SH,STRICTENC"],
+["NOP", "NOP5 1", "P2SH,STRICTENC"],
+["NOP", "NOP6 1", "P2SH,STRICTENC"],
+["NOP", "NOP7 1", "P2SH,STRICTENC"],
+["NOP", "NOP8 1", "P2SH,STRICTENC"],
+["NOP", "NOP9 1", "P2SH,STRICTENC"],
+["NOP", "NOP10 1", "P2SH,STRICTENC"],
+
+["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
+["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "Zero sigs means no sigs are checked"],
+["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+
+["", "0 0 0 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "CHECKMULTISIG is allowed to have zero keys and/or sigs"],
+["", "0 0 0 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 0 1 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "Zero sigs means no sigs are checked"],
+["", "0 0 0 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+
+["", "0 0 'a' 'b' 2 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC", "Test from up to 20 pubkeys, all not checked"],
+["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG VERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 1 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 2 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 3 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 4 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 5 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 6 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 7 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 8 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 9 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 10 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 11 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 12 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 13 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 14 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 15 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 16 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 17 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 18 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 19 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
+["", "0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY DEPTH 0 EQUAL", "P2SH,STRICTENC"],
 
 ["",
 "0 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG 0 0 CHECKMULTISIG",
+"P2SH,STRICTENC",
 "nOpCount is incremented by the number of keys evaluated in addition to the usual one op per op. In this case we have zero keys, so we can execute 201 CHECKMULTISIGS"],
 
 ["1",
-"0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY"],
+"0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY 0 0 0 CHECKMULTISIGVERIFY",
+"P2SH,STRICTENC"],
 
 ["",
 "NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIG",
+"P2SH,STRICTENC",
 "Even though there are no signatures being checked nOpCount is incremented by the number of keys."],
 
 ["1",
-"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY"],
+"NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP NOP 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY 0 0 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p' 'q' 'r' 's' 't' 20 CHECKMULTISIGVERIFY",
+"P2SH,STRICTENC"],
 
-["0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "Very basic P2SH"],
-["0x4c 0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL"],
+["0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "P2SH,STRICTENC", "Very basic P2SH"],
+["0x4c 0 0x01 1", "HASH160 0x14 0xda1745e9b549bd0bfa1a569971c77eba30cd5a4b EQUAL", "P2SH,STRICTENC"],
 
 ["0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
 "0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
+"P2SH,STRICTENC",
 "Basic PUSH signedness check"],
 
 ["0x4c 0x40 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242",
 "0x4d 0x4000 0x42424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242 EQUAL",
+"P2SH,STRICTENC",
 "Basic PUSHDATA1 signedness check"],
 
-["0x00", "SIZE 0 EQUAL", "Basic OP_0 execution"]
+["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"]
 ]
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 88efc3896493..bc610778c47b 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -35,6 +35,8 @@ using namespace boost::algorithm;
 
 static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
+unsigned int ParseScriptFlags(string strFlags);
+
 Array
 read_json(const std::string& jsondata)
 {
@@ -54,7 +56,7 @@ BOOST_AUTO_TEST_CASE(script_valid)
 {
     // Read tests from test/data/script_valid.json
     // Format is an array of arrays
-    // Inner arrays are [ "scriptSig", "scriptPubKey" ]
+    // Inner arrays are [ "scriptSig", "scriptPubKey", "flags" ]
     // ... where scriptSig and scriptPubKey are stringified
     // scripts.
     Array tests = read_json(std::string(json_tests::script_valid, json_tests::script_valid + sizeof(json_tests::script_valid)));
@@ -63,7 +65,7 @@ BOOST_AUTO_TEST_CASE(script_valid)
     {
         Array test = tv.get_array();
         string strTest = write_string(tv, false);
-        if (test.size() < 2) // Allow size > 2; extra stuff ignored (useful for comments)
+        if (test.size() < 3) // Allow size > 3; extra stuff ignored (useful for comments)
         {
             BOOST_ERROR("Bad test: " << strTest);
             continue;
@@ -72,9 +74,10 @@ BOOST_AUTO_TEST_CASE(script_valid)
         CScript scriptSig = ParseScript(scriptSigString);
         string scriptPubKeyString = test[1].get_str();
         CScript scriptPubKey = ParseScript(scriptPubKeyString);
+        unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
+        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags, SIGHASH_NONE), strTest);
     }
 }
 
@@ -96,9 +99,10 @@ BOOST_AUTO_TEST_CASE(script_invalid)
         CScript scriptSig = ParseScript(scriptSigString);
         string scriptPubKeyString = test[1].get_str();
         CScript scriptPubKey = ParseScript(scriptPubKeyString);
+        unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, flags, SIGHASH_NONE), strTest);
+        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags, SIGHASH_NONE), strTest);
     }
 }
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 943568e89d25..21377395cf92 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -26,7 +26,7 @@ using namespace boost::algorithm;
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
 
-unsigned int ParseFlags(string strFlags){
+unsigned int ParseScriptFlags(string strFlags){
     unsigned int flags = 0;
     vector<string> words;
     split(words, strFlags, is_any_of(","));
@@ -119,7 +119,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
                     break;
                 }
 
-                unsigned int verify_flags = ParseFlags(test[2].get_str());
+                unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
                                                  tx, i, verify_flags, 0),
                                     strTest);
@@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
                     break;
                 }
 
-                unsigned int verify_flags = ParseFlags(test[2].get_str());
+                unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
                                       tx, i, verify_flags, 0);
             }

From d4168c82bef0d86fd254a9d993906a09f5fd7fc0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 9 Sep 2014 09:18:05 +0200
Subject: [PATCH 0673/1819] Limit CNode::mapAskFor

Tighten resource constraints on CNode.
---
 src/net.cpp | 2 ++
 src/net.h   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/src/net.cpp b/src/net.cpp
index 2546826f9ae6..6b7e62d7cb90 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2106,6 +2106,8 @@ CNode::~CNode()
 
 void CNode::AskFor(const CInv& inv)
 {
+    if (mapAskFor.size() > MAPASKFOR_MAX_SZ)
+        return;
     // We're using mapAskFor as a priority queue,
     // the key is the earliest time the request can be sent
     int64_t nRequestTime;
diff --git a/src/net.h b/src/net.h
index e2700c097568..ad0a1df7e2b7 100644
--- a/src/net.h
+++ b/src/net.h
@@ -51,6 +51,8 @@ static const bool DEFAULT_UPNP = USE_UPNP;
 #else
 static const bool DEFAULT_UPNP = false;
 #endif
+/** The maximum number of entries in mapAskFor */
+static const size_t MAPASKFOR_MAX_SZ = MAX_INV_SZ;
 
 unsigned int ReceiveFloodSize();
 unsigned int SendBufferSize();

From 540ac4514dbe4e077917bad1750768218ef5f9cf Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 9 Sep 2014 09:26:52 +0200
Subject: [PATCH 0674/1819] Avoid returning many "inv" orphans

---
 src/main.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 2e24eb950f74..21a352f7ba03 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3639,6 +3639,11 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
             // Track requests for our stuff
             g_signals.Inventory(inv.hash);
+
+            if (pfrom->nSendSize > (SendBufferSize() * 2)) {
+                Misbehaving(pfrom->GetId(), 50);
+                return error("send buffer size() = %u", pfrom->nSendSize);
+            }
         }
     }
 

From 2c2cc5dac1102c1eb86c7dd825a893ab388abba1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 8 Sep 2014 12:25:52 +0200
Subject: [PATCH 0675/1819] Remove some unnecessary c_strs() in logging and the
 GUI

Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code`
by P. Kaufmann.
---
 src/addrman.h                | 2 +-
 src/main.cpp                 | 4 ++--
 src/net.cpp                  | 2 +-
 src/qt/coincontroldialog.cpp | 4 ++--
 src/qt/walletmodel.cpp       | 2 +-
 src/txmempool.cpp            | 2 +-
 src/wallet.cpp               | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 90507cb4580b..5fd698f18a25 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -424,7 +424,7 @@ class CAddrMan
             Check();
         }
         if (fRet)
-            LogPrint("addrman", "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort().c_str(), source.ToString(), nTried, nNew);
+            LogPrint("addrman", "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort(), source.ToString(), nTried, nNew);
         return fRet;
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index a3b31b719d57..ff4560c2d006 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4392,7 +4392,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         if (!pto->fDisconnect && state.nBlocksInFlight &&
             state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
             state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
-            LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name.c_str());
+            LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name);
             pto->fDisconnect = true;
         }
 
@@ -4502,7 +4502,7 @@ bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock
 }
 
  std::string CBlockFileInfo::ToString() const {
-     return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst).c_str(), DateTimeStrFormat("%Y-%m-%d", nTimeLast).c_str());
+     return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast));
  }
 
 
diff --git a/src/net.cpp b/src/net.cpp
index 2546826f9ae6..633a3a34e721 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2114,7 +2114,7 @@ void CNode::AskFor(const CInv& inv)
         nRequestTime = it->second;
     else
         nRequestTime = 0;
-    LogPrint("net", "askfor %s  %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000).c_str(), id);
+    LogPrint("net", "askfor %s  %d (%s) peer=%d\n", inv.ToString(), nRequestTime, DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000), id);
 
     // Make sure not to reuse time indexes to keep things in the same order
     int64_t nNow = GetTimeMicros() - 1000000;
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 7b30f8de090a..d10463fd8f64 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -705,7 +705,7 @@ void CoinControlDialog::updateView()
             QString sAddress = "";
             if(ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress))
             {
-                sAddress = CBitcoinAddress(outputAddress).ToString().c_str();
+                sAddress = QString::fromStdString(CBitcoinAddress(outputAddress).ToString());
 
                 // if listMode or change => show bitcoin address. In tree mode, address is not shown again for direct wallet address outputs
                 if (!treeMode || (!(sAddress == sWalletAddress)))
@@ -752,7 +752,7 @@ void CoinControlDialog::updateView()
 
             // transaction hash
             uint256 txhash = out.tx->GetHash();
-            itemOutput->setText(COLUMN_TXHASH, txhash.GetHex().c_str());
+            itemOutput->setText(COLUMN_TXHASH, QString::fromStdString(txhash.GetHex()));
 
             // vout index
             itemOutput->setText(COLUMN_VOUT_INDEX, QString::number(out.i));
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 530c46cdb49d..8d2c2e96d88c 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -622,7 +622,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
         CTxDestination address;
         if(!out.fSpendable || !ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address))
             continue;
-        mapCoins[CBitcoinAddress(address).ToString().c_str()].push_back(out);
+        mapCoins[QString::fromStdString(CBitcoinAddress(address).ToString())].push_back(out);
     }
 }
 
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 238d5bab1676..28339837bfe8 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -606,7 +606,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256 hash, const string strHash,
         deltas.first += dPriorityDelta;
         deltas.second += nFeeDelta;
     }
-    LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash.c_str(), dPriorityDelta, nFeeDelta);
+    LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash, dPriorityDelta, nFeeDelta);
 }
 
 void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta)
diff --git a/src/wallet.cpp b/src/wallet.cpp
index d3ad4869bbea..c018c221b406 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -42,7 +42,7 @@ struct CompareValueOnly
 
 std::string COutput::ToString() const
 {
-    return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue).c_str());
+    return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue));
 }
 
 const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const

From faadbe17333a41fc1c15551f74a6ae5dcbd6aedc Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 9 Sep 2014 10:09:59 +0200
Subject: [PATCH 0676/1819] remove unneeded cast in rpcmisc.cpp

---
 src/rpcmisc.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index bd992397b87b..917c84053605 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -74,8 +74,8 @@ Value getinfo(const Array& params, bool fHelp)
     GetProxy(NET_IPV4, proxy);
 
     Object obj;
-    obj.push_back(Pair("version",       (int)CLIENT_VERSION));
-    obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
+    obj.push_back(Pair("version", CLIENT_VERSION));
+    obj.push_back(Pair("protocolversion", PROTOCOL_VERSION));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
         obj.push_back(Pair("walletversion", pwalletMain->GetVersion()));

From 234bfbf6a5fcba37e510e9cb6c1f2a629cd0290e Mon Sep 17 00:00:00 2001
From: Adam Weiss <adam@signal11.com>
Date: Thu, 31 Jul 2014 11:56:17 -0400
Subject: [PATCH 0677/1819] Add init scripts and docs for Upstart and OpenRC

---
 contrib/init/README.md                     | 10 +++
 contrib/init/bitcoind.conf                 | 65 +++++++++++++++
 contrib/init/bitcoind.openrc               | 86 ++++++++++++++++++++
 contrib/init/bitcoind.openrcconf           | 27 +++++++
 contrib/{systemd => init}/bitcoind.service | 11 ++-
 doc/README.md                              |  2 +-
 doc/init.md                                | 92 ++++++++++++++++++++++
 doc/systemd.md                             | 47 -----------
 8 files changed, 289 insertions(+), 51 deletions(-)
 create mode 100644 contrib/init/README.md
 create mode 100644 contrib/init/bitcoind.conf
 create mode 100644 contrib/init/bitcoind.openrc
 create mode 100644 contrib/init/bitcoind.openrcconf
 rename contrib/{systemd => init}/bitcoind.service (59%)
 create mode 100644 doc/init.md
 delete mode 100644 doc/systemd.md

diff --git a/contrib/init/README.md b/contrib/init/README.md
new file mode 100644
index 000000000000..d3fa9665839a
--- /dev/null
+++ b/contrib/init/README.md
@@ -0,0 +1,10 @@
+Sample configuration files for:
+
+SystemD: bitcoind.service
+Upstart: bitcoind.conf
+OpenRC:  bitcoind.openrc
+         bitcoind.openrcconf
+
+have been made available to assist packagers in creating node packages here.
+
+See doc/init.md for more information.
diff --git a/contrib/init/bitcoind.conf b/contrib/init/bitcoind.conf
new file mode 100644
index 000000000000..f9554eecde7f
--- /dev/null
+++ b/contrib/init/bitcoind.conf
@@ -0,0 +1,65 @@
+description "Bitcoin Core Daemon"
+
+start on runlevel [2345]
+stop on starting rc RUNLEVEL=[016]
+
+env BITCOIND_BIN="/usr/bin/bitcoind"
+env BITCOIND_USER="bitcoin"
+env BITCOIND_GROUP="bitcoin"
+env BITCOIND_PIDDIR="/var/run/bitcoind"
+# upstart can't handle variables constructed with other variables
+env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid"
+env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
+env BITCOIND_DATADIR="/var/lib/bitcoind"
+
+expect fork
+
+respawn
+respawn limit 5 120
+kill timeout 60
+
+pre-start script
+    # this will catch non-existent config files
+    # bitcoind will check and exit with this very warning, but it can do so
+    # long after forking, leaving upstart to think everything started fine.
+    # since this is a commonly encountered case on install, just check and
+    # warn here.
+    if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then
+        echo "ERROR: You must set a secure rpcpassword to run bitcoind."
+        echo "The setting must appear in $BITCOIND_CONFIGFILE"
+        echo
+        echo "This password is security critical to securing wallets "
+        echo "and must not be the same as the rpcuser setting."
+        echo "You can generate a suitable random password using the following"
+        echo "command from the shell:"
+        echo
+        echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
+        echo
+        echo "It is also recommended that you also set alertnotify so you are "
+        echo "notified of problems:"
+        echo
+        echo "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
+            "admin@foo.com"
+        echo
+        exit 1
+    fi
+
+    mkdir -p "$BITCOIND_PIDDIR"
+    chmod 0755 "$BITCOIND_PIDDIR"
+    chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_PIDDIR"
+    chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_CONFIGFILE"
+    chmod 0660 "$BITCOIND_CONFIGFILE"
+end script
+
+exec start-stop-daemon \
+    --start \
+    --pidfile "$BITCOIND_PIDFILE" \
+    --chuid $BITCOIND_USER:$BITCOIND_GROUP \
+    --exec "$BITCOIND_BIN" \
+    -- \
+    -pid="$BITCOIND_PIDFILE" \
+    -conf="$BITCOIND_CONFIGFILE" \
+    -datadir="$BITCOIND_DATADIR" \
+    -disablewallet \
+    -daemon
+
diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc
new file mode 100644
index 000000000000..1f7758c9202a
--- /dev/null
+++ b/contrib/init/bitcoind.openrc
@@ -0,0 +1,86 @@
+#!/sbin/runscript
+
+# backward compatibility for existing gentoo layout 
+#
+if [ -d "/var/lib/bitcoin/.bitcoin" ]; then
+	BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin"
+else
+	BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind"
+fi
+
+BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf}
+BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
+BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
+BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
+BITCOIND_USER=${BITCOIND_USER:-bitcoin}
+BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
+BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
+
+name="Bitcoin Core Daemon"
+description="Bitcoin crypto-currency p2p network daemon"
+
+command="/usr/bin/bitcoind"
+command_args="-pid=\"${BITCOIND_PIDFILE}\" \
+		-conf=\"${BITCOIND_CONFIGFILE}\" \
+		-datadir=\"${BITCOIND_DATADIR}\" \
+		-daemon \
+		${BITCOIND_OPTS}"
+
+required_files="${BITCOIND_CONFIGFILE}"
+start_stop_daemon_args="-u ${BITCOIND_USER} \
+			-N ${BITCOIND_NICE:-0} -w 2000"
+pidfile="${BITCOIND_PIDFILE}"
+retry=60
+
+depend() {
+	need localmount net
+}
+
+# verify
+# 1) that the datadir exists and is writable (or create it)
+# 2) that a directory for the pid exists and is writable
+# 3) ownership and permissions on the config file
+start_pre() {
+	checkpath \
+	-d \
+	--mode 0750 \
+	--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
+	"${BITCOIND_DATADIR}"
+
+	checkpath \
+	-d \
+	--mode 0755 \
+	--owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \
+	"${BITCOIND_PIDDIR}"
+
+	checkpath -f \
+	-o ${BITCOIND_USER}:${BITCOIND_GROUP} \
+	-m 0660 \
+	${BITCOIND_CONFIGFILE}
+
+	checkconfig || return 1
+}
+
+checkconfig()
+{
+	if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
+		eerror ""
+		eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
+		eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
+		eerror ""
+		eerror "This password is security critical to securing wallets "
+		eerror "and must not be the same as the rpcuser setting."
+		eerror "You can generate a suitable random password using the following"
+		eerror "command from the shell:"
+		eerror ""
+		eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'"
+		eerror ""
+		eerror "It is also recommended that you also set alertnotify so you are "
+		eerror "notified of problems:"
+		eerror ""
+		eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
+			"admin@foo.com"
+		eerror ""
+		return 1
+	fi
+}
diff --git a/contrib/init/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf
new file mode 100644
index 000000000000..d8d7f5833746
--- /dev/null
+++ b/contrib/init/bitcoind.openrcconf
@@ -0,0 +1,27 @@
+# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind
+
+# Config file location
+#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
+
+# What directory to write pidfile to?  (created and owned by $BITCOIND_USER)
+#BITCOIND_PIDDIR="/var/run/bitcoind"
+
+# What filename to give the pidfile
+#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid"
+
+# Where to write bitcoind data (be mindful that the blockchain is large)
+#BITCOIND_DATADIR="/var/lib/bitcoind"
+
+# User and group to own bitcoind process
+#BITCOIND_USER="bitcoin"
+#BITCOIND_GROUP="bitcoin"
+
+# Path to bitcoind executable
+#BITCOIND_BIN="/usr/bin/bitcoind"
+
+# Nice value to run bitcoind under
+#BITCOIND_NICE=0
+
+# Additional options (avoid -conf and -datadir, use flags above)
+BITCOIND_OPTS="-disablewallet"
+
diff --git a/contrib/systemd/bitcoind.service b/contrib/init/bitcoind.service
similarity index 59%
rename from contrib/systemd/bitcoind.service
rename to contrib/init/bitcoind.service
index edc81cc76317..9132957c38b8 100644
--- a/contrib/systemd/bitcoind.service
+++ b/contrib/init/bitcoind.service
@@ -3,15 +3,20 @@ Description=Bitcoin's distributed currency daemon
 After=network.target
 
 [Service]
-User=bitcoind
-Group=bitcoind
+User=bitcoin
+Group=bitcoin
 
 Type=forking
 PIDFile=/var/lib/bitcoind/bitcoind.pid
-ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid -conf=/etc/bitcoind.conf -datadir=/var/lib/bitcoind
+ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \
+-conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet
 
 Restart=always
 PrivateTmp=true
+TimeoutStopSec=60s
+TimeoutStartSec=2s
+StartLimitInterval=120s
+StartLimitBurst=5
 
 [Install]
 WantedBy=multi-user.target
diff --git a/doc/README.md b/doc/README.md
index f8bb8020d487..8368e4644b71 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -68,7 +68,7 @@ The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/
 - [Assets Attribution](assets-attribution.md)
 - [Files](files.md)
 - [Tor Support](tor.md)
-- [Systemd](systemd.md)
+- [Init Scripts (systemd/upstart/openrc)](init.md)
 
 License
 ---------------------
diff --git a/doc/init.md b/doc/init.md
new file mode 100644
index 000000000000..3d14025ab497
--- /dev/null
+++ b/doc/init.md
@@ -0,0 +1,92 @@
+Sample init scripts and service configuration for bitcoind
+==========================================================
+
+Sample scripts and configuration files for systemd, Upstart and OpenRC
+can be found in the contrib/init folder.
+
+contrib/init/bitcoind.service:    systemd service unit configuration
+contrib/init/bitcoind.openrc:     OpenRC compatible SysV style init script
+contrib/init/bitcoind.openrcconf: OpenRC conf.d file
+contrib/init/bitcoind.conf:       Upstart service configuration file
+
+1. Service User
+---------------------------------
+
+All three startup configurations assume the existence of a "bitcoin" user
+and group.  They must be created before attempting to use these scripts.
+
+2. Configuration
+---------------------------------
+
+At a bare minimum, bitcoind requires that the rpcpassword setting be set
+when running as a daemon.  If the configuration file does not exist or this
+setting is not set, bitcoind will shutdown promptly after startup.
+
+This password does not have to be remembered or typed as it is mostly used
+as a fixed token that bitcoind and client programs read from the configuration
+file, however it is recommended that a strong and secure password be used
+as this password is security critical to securing the wallet should the
+wallet be enabled.
+
+If bitcoind is run with "-daemon" flag, and no rpcpassword is set, it will
+print a randomly generated suitable password to stderr.  You can also
+generate one from the shell yourself like this:
+
+bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'
+
+Once you have a password in hand, set rpcpassword= in /etc/bitcoin/bitcoin.conf
+
+For an example configuration file that describes the configuration settings, 
+see contrib/debian/examples/bitcoin.conf.
+
+3. Paths
+---------------------------------
+
+All three configurations assume several paths that might need to be adjusted.
+
+Binary:              /usr/bin/bitcoind
+Configuration file:  /etc/bitcoin/bitcoin.conf
+Data directory:      /var/lib/bitcoind
+PID file:            /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart)
+                     /var/lib/bitcoind/bitcoind.pid (systemd)
+
+The configuration file, PID directory (if applicable) and data directory
+should all be owned by the bitcoin user and group.  It is advised for security
+reasons to make the configuration file and data directory only readable by the
+bitcoin user and group.  Access to bitcoin-cli and other bitcoind rpc clients
+can then be controlled by group membership.
+
+4. Installing Service Configuration
+-----------------------------------
+
+4a) systemd
+
+Installing this .service file consists on just copying it to
+/usr/lib/systemd/system directory, followed by the command
+"systemctl daemon-reload" in order to update running systemd configuration.
+
+To test, run "systemctl start bitcoind" and to enable for system startup run
+"systemctl enable bitcoind"
+
+4b) OpenRC
+
+Rename bitcoind.openrc to bitcoind and drop it in /etc/init.d.  Double
+check ownership and permissions and make it executable.  Test it with
+"/etc/init.d/bitcoind start" and configure it to run on startup with
+"rc-update add bitcoind"
+
+4c) Upstart (for Debian/Ubuntu based distributions)
+
+Drop bitcoind.conf in /etc/init.  Test by running "service bitcoind start"
+it will automatically start on reboot.
+
+NOTE: This script is incompatible with CentOS 5 and Amazon Linux 2014 as they
+use old versions of Upstart and do not supply the start-stop-daemon uitility.
+
+5. Auto-respawn
+-----------------------------------
+
+Auto respawning is currently only configured for Upstart and systemd.
+Reasonable defaults have been chosen but YMMV.
+
+
diff --git a/doc/systemd.md b/doc/systemd.md
deleted file mode 100644
index 96202c1532fb..000000000000
--- a/doc/systemd.md
+++ /dev/null
@@ -1,47 +0,0 @@
-SYSTEMD SUPPORT IN BITCOIN
-==========================
-
-Packagers can find a .service file in this repo in order to integrate bitcoin's 
-daemon into systemd based distributions.
-
-bitcoind.service file is located in contrib/systemd/ folder.
-
-1. Users
----------------------------------
-
-This .service file assumes bitcoind user and group exist in the system, so packager
-should make sure they are created on installation. 
-
-2. Files
----------------------------------
-
-The .service file assumes several paths that might need to be adjusted according
-to packager's needs.
-
-Daemon's config file is assumed to be located at /etc/bitcoind.conf (you can
-use contrib/debian/examples/bitcoin.conf as an example). Once installed, users
-must edit the file in order to update at least these two 
-values: rpcuser and rpcpassword . Failing to do so will make the daemon fail 
-to boot. However, the message written to /var/lib/bitcoind/debug.log file is
-very helpful and no default values should be set:
-
-    YYYY-MM-DD HH:MM:DD Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
-    /etc/bitcoind.conf
-    It is recommended you use the following random password:
-    rpcuser=bitcoinrpc
-    rpcpassword=HdYZ5HGtAF7mx8aTw6uCATtD2maMAK4E12Ysp4YNZQcX
-    (you do not need to remember this password)
-    The username and password MUST NOT be the same.
-    If the file does not exist, create it with owner-readable-only file permissions.
-    It is also recommended to set alertnotify so you are notified of problems;
-    for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com
-
-Daemon's data and pid files will be stored in /var/lib/bitcoind directory, so it
-should be created on installation and make bitcoind user/group it's owner.
-
-3. Installing .service file
----------------------------------
-
-Installing this .service file consists on just copying it to /usr/lib/systemd/system
-directory, followed by the command "systemctl daemon-reload" in order to update
-running systemd configuration.

From 6050ab685553c7312ef105d2c4a5230c3fcf4002 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 8 Sep 2014 13:49:56 +0200
Subject: [PATCH 0678/1819] netbase: Make SOCKS5 negotiation interruptible

Avoids that SOCKS5 negotiation will hold up the shutdown process.

- Sockets can stay in non-blocking mode, no need to switch it on/off
  anymore
- Adds a timeout (20 seconds) on SOCK5 negotiation. This should be
  enough for even Tor to get a connection to a hidden service, and
  avoids blocking the opencon thread indefinitely on a hanging proxy.

Fixes #2954.
---
 src/net.cpp     |  4 ---
 src/netbase.cpp | 88 +++++++++++++++++++++++++++++++++++++++----------
 2 files changed, 70 insertions(+), 22 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 633a3a34e721..4c9ff4ebed73 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -488,10 +488,6 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
     {
         addrman.Attempt(addrConnect);
 
-        // Set to non-blocking
-        if (!SetSocketNonBlocking(hSocket, true))
-            LogPrintf("ConnectNode: Setting socket to non-blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
-
         // Add node
         CNode* pnode = new CNode(hSocket, addrConnect, pszDest ? pszDest : "", false);
         pnode->AddRef();
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 954c11f77d55..5819c152a361 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -45,6 +45,9 @@ bool fNameLookup = false;
 
 static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
 
+// Need ample time for negotiation for very slow proxies such as Tor (milliseconds)
+static const int SOCKS5_RECV_TIMEOUT = 20 * 1000;
+
 enum Network ParseNetwork(std::string net) {
     boost::to_lower(net);
     if (net == "ipv4") return NET_IPV4;
@@ -225,6 +228,63 @@ bool LookupNumeric(const char *pszName, CService& addr, int portDefault)
     return Lookup(pszName, addr, portDefault, false);
 }
 
+/**
+ * Convert milliseconds to a struct timeval for select.
+ */
+struct timeval static MillisToTimeval(int64_t nTimeout)
+{
+    struct timeval timeout;
+    timeout.tv_sec  = nTimeout / 1000;
+    timeout.tv_usec = (nTimeout % 1000) * 1000;
+    return timeout;
+}
+
+/**
+ * Read bytes from socket. This will either read the full number of bytes requested
+ * or return False on error or timeout.
+ * This function can be interrupted by boost thread interrupt.
+ *
+ * @param data Buffer to receive into
+ * @param len  Length of data to receive
+ * @param timeout  Timeout in milliseconds for receive operation
+ *
+ * @note This function requires that hSocket is in non-blocking mode.
+ */
+bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSocket)
+{
+    int64_t curTime = GetTimeMillis();
+    int64_t endTime = curTime + timeout;
+    // Maximum time to wait in one select call. It will take up until this time (in millis)
+    // to break off in case of an interruption.
+    const int64_t maxWait = 1000;
+    while (len > 0 && curTime < endTime) {
+        ssize_t ret = recv(hSocket, data, len, 0); // Optimistically try the recv first
+        if (ret > 0) {
+            len -= ret;
+            data += ret;
+        } else if (ret == 0) { // Unexpected disconnection
+            return false;
+        } else { // Other error or blocking
+            int nErr = WSAGetLastError();
+            if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL) {
+                struct timeval tval = MillisToTimeval(std::min(endTime - curTime, maxWait));
+                fd_set fdset;
+                FD_ZERO(&fdset);
+                FD_SET(hSocket, &fdset);
+                int nRet = select(hSocket + 1, &fdset, NULL, NULL, &tval);
+                if (nRet == SOCKET_ERROR) {
+                    return false;
+                }
+            } else {
+                return false;
+            }
+        }
+        boost::this_thread::interruption_point();
+        curTime = GetTimeMillis();
+    }
+    return len == 0;
+}
+
 bool static Socks5(string strDest, int port, SOCKET& hSocket)
 {
     LogPrintf("SOCKS5 connecting %s\n", strDest);
@@ -243,7 +303,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
         return error("Error sending to proxy");
     }
     char pchRet1[2];
-    if (recv(hSocket, pchRet1, 2, 0) != 2)
+    if (!InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket))
     {
         CloseSocket(hSocket);
         return error("Error reading proxy response");
@@ -266,7 +326,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
         return error("Error sending to proxy");
     }
     char pchRet2[4];
-    if (recv(hSocket, pchRet2, 4, 0) != 4)
+    if (!InterruptibleRecv(pchRet2, 4, SOCKS5_RECV_TIMEOUT, hSocket))
     {
         CloseSocket(hSocket);
         return error("Error reading proxy response");
@@ -300,27 +360,27 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket)
     char pchRet3[256];
     switch (pchRet2[3])
     {
-        case 0x01: ret = recv(hSocket, pchRet3, 4, 0) != 4; break;
-        case 0x04: ret = recv(hSocket, pchRet3, 16, 0) != 16; break;
+        case 0x01: ret = InterruptibleRecv(pchRet3, 4, SOCKS5_RECV_TIMEOUT, hSocket); break;
+        case 0x04: ret = InterruptibleRecv(pchRet3, 16, SOCKS5_RECV_TIMEOUT, hSocket); break;
         case 0x03:
         {
-            ret = recv(hSocket, pchRet3, 1, 0) != 1;
-            if (ret) {
+            ret = InterruptibleRecv(pchRet3, 1, SOCKS5_RECV_TIMEOUT, hSocket);
+            if (!ret) {
                 CloseSocket(hSocket);
                 return error("Error reading from proxy");
             }
             int nRecv = pchRet3[0];
-            ret = recv(hSocket, pchRet3, nRecv, 0) != nRecv;
+            ret = InterruptibleRecv(pchRet3, nRecv, SOCKS5_RECV_TIMEOUT, hSocket);
             break;
         }
         default: CloseSocket(hSocket); return error("Error: malformed proxy response");
     }
-    if (ret)
+    if (!ret)
     {
         CloseSocket(hSocket);
         return error("Error reading from proxy");
     }
-    if (recv(hSocket, pchRet3, 2, 0) != 2)
+    if (!InterruptibleRecv(pchRet3, 2, SOCKS5_RECV_TIMEOUT, hSocket))
     {
         CloseSocket(hSocket);
         return error("Error reading from proxy");
@@ -360,10 +420,7 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
         // WSAEINVAL is here because some legacy version of winsock uses it
         if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL)
         {
-            struct timeval timeout;
-            timeout.tv_sec  = nTimeout / 1000;
-            timeout.tv_usec = (nTimeout % 1000) * 1000;
-
+            struct timeval timeout = MillisToTimeval(nTimeout);
             fd_set fdset;
             FD_ZERO(&fdset);
             FD_SET(hSocket, &fdset);
@@ -410,11 +467,6 @@ bool static ConnectSocketDirectly(const CService &addrConnect, SOCKET& hSocketRe
         }
     }
 
-    // This is required when using SOCKS5 proxy!
-    // CNode::ConnectNode turns the socket back to non-blocking.
-    if (!SetSocketNonBlocking(hSocket, false))
-        return error("ConnectSocketDirectly: Setting socket to blocking failed, error %s\n", NetworkErrorString(WSAGetLastError()));
-
     hSocketRet = hSocket;
     return true;
 }

From 0d2fa14a3434fb259319aedec0124df305e652c0 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Fri, 29 Aug 2014 22:07:39 +0200
Subject: [PATCH 0679/1819] Move scriptutils.o to wallet

---
 src/Makefile.am                |  2 +-
 src/test/multisig_tests.cpp    | 13 ++++++++++++-
 src/test/script_P2SH_tests.cpp |  7 +++++++
 3 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 9b7e99861dd6..27bcdc7bcc16 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -173,6 +173,7 @@ libbitcoin_wallet_a_SOURCES = \
   crypter.cpp \
   rpcdump.cpp \
   rpcwallet.cpp \
+  scriptutils.cpp \
   wallet.cpp \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
@@ -216,7 +217,6 @@ libbitcoin_common_a_SOURCES = \
   script/script.cpp \
   script/sign.cpp \
   script/standard.cpp \
-  scriptutils.cpp \
   $(BITCOIN_CORE_H)
 
 # util: shared between all executables.
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 6c5afa130c76..427477edcc6e 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -8,9 +8,12 @@
 #include "script/script.h"
 #include "script/interpreter.h"
 #include "script/sign.h"
-#include "scriptutils.h"
 #include "uint256.h"
 
+#ifdef ENABLE_WALLET
+#include "scriptutils.h"
+#endif
+
 #include <boost/assign/std/vector.hpp>
 #include <boost/foreach.hpp>
 #include <boost/test/unit_test.hpp>
@@ -195,8 +198,10 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         CTxDestination addr;
         BOOST_CHECK(ExtractDestination(s, addr));
         BOOST_CHECK(addr == keyaddr[0]);
+#ifdef ENABLE_WALLET
         BOOST_CHECK(IsMine(keystore, s));
         BOOST_CHECK(!IsMine(emptykeystore, s));
+#endif
     }
     {
         vector<valtype> solutions;
@@ -208,8 +213,10 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         CTxDestination addr;
         BOOST_CHECK(ExtractDestination(s, addr));
         BOOST_CHECK(addr == keyaddr[0]);
+#ifdef ENABLE_WALLET
         BOOST_CHECK(IsMine(keystore, s));
         BOOST_CHECK(!IsMine(emptykeystore, s));
+#endif
     }
     {
         vector<valtype> solutions;
@@ -220,9 +227,11 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         BOOST_CHECK_EQUAL(solutions.size(), 4U);
         CTxDestination addr;
         BOOST_CHECK(!ExtractDestination(s, addr));
+#ifdef ENABLE_WALLET
         BOOST_CHECK(IsMine(keystore, s));
         BOOST_CHECK(!IsMine(emptykeystore, s));
         BOOST_CHECK(!IsMine(partialkeystore, s));
+#endif
     }
     {
         vector<valtype> solutions;
@@ -237,9 +246,11 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         BOOST_CHECK(addrs[0] == keyaddr[0]);
         BOOST_CHECK(addrs[1] == keyaddr[1]);
         BOOST_CHECK(nRequired == 1);
+#ifdef ENABLE_WALLET
         BOOST_CHECK(IsMine(keystore, s));
         BOOST_CHECK(!IsMine(emptykeystore, s));
         BOOST_CHECK(!IsMine(partialkeystore, s));
+#endif
     }
     {
         vector<valtype> solutions;
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index b7e7487bb2bb..b1c1052de454 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -7,7 +7,10 @@
 #include "main.h"
 #include "script/script.h"
 #include "script/sign.h"
+
+#ifdef ENABLE_WALLET
 #include "scriptutils.h"
+#endif
 
 #include <vector>
 
@@ -95,7 +98,9 @@ BOOST_AUTO_TEST_CASE(sign)
         txTo[i].vin[0].prevout.n = i;
         txTo[i].vin[0].prevout.hash = txFrom.GetHash();
         txTo[i].vout[0].nValue = 1;
+#ifdef ENABLE_WALLET
         BOOST_CHECK_MESSAGE(IsMine(keystore, txFrom.vout[i].scriptPubKey), strprintf("IsMine %d", i));
+#endif
     }
     for (int i = 0; i < 8; i++)
     {
@@ -189,7 +194,9 @@ BOOST_AUTO_TEST_CASE(set)
         txTo[i].vin[0].prevout.hash = txFrom.GetHash();
         txTo[i].vout[0].nValue = 1*CENT;
         txTo[i].vout[0].scriptPubKey = inner[i];
+#ifdef ENABLE_WALLET
         BOOST_CHECK_MESSAGE(IsMine(keystore, txFrom.vout[i].scriptPubKey), strprintf("IsMine %d", i));
+#endif
     }
     for (int i = 0; i < 4; i++)
     {

From 8b59a3d36626085db79db2874ae76272b2b42f25 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 27 Aug 2014 17:46:30 +0200
Subject: [PATCH 0680/1819] Move CAffectedKeysVisitor to wallet.cpp (remove
 ExtractAffectedKeys)

---
 src/scriptutils.cpp | 36 ------------------------------------
 src/scriptutils.h   |  1 -
 src/wallet.cpp      | 35 ++++++++++++++++++++++++++++++++++-
 3 files changed, 34 insertions(+), 38 deletions(-)

diff --git a/src/scriptutils.cpp b/src/scriptutils.cpp
index a636eeedab77..5099d7515a43 100644
--- a/src/scriptutils.cpp
+++ b/src/scriptutils.cpp
@@ -89,39 +89,3 @@ isminetype IsMine(const CKeyStore &keystore, const CScript& scriptPubKey)
         return ISMINE_WATCH_ONLY;
     return ISMINE_NO;
 }
-
-class CAffectedKeysVisitor : public boost::static_visitor<void> {
-private:
-    const CKeyStore &keystore;
-    std::vector<CKeyID> &vKeys;
-
-public:
-    CAffectedKeysVisitor(const CKeyStore &keystoreIn, std::vector<CKeyID> &vKeysIn) : keystore(keystoreIn), vKeys(vKeysIn) {}
-
-    void Process(const CScript &script) {
-        txnouttype type;
-        std::vector<CTxDestination> vDest;
-        int nRequired;
-        if (ExtractDestinations(script, type, vDest, nRequired)) {
-            BOOST_FOREACH(const CTxDestination &dest, vDest)
-                boost::apply_visitor(*this, dest);
-        }
-    }
-
-    void operator()(const CKeyID &keyId) {
-        if (keystore.HaveKey(keyId))
-            vKeys.push_back(keyId);
-    }
-
-    void operator()(const CScriptID &scriptId) {
-        CScript script;
-        if (keystore.GetCScript(scriptId, script))
-            Process(script);
-    }
-
-    void operator()(const CNoDestination &none) {}
-};
-
-void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys) {
-    CAffectedKeysVisitor(keystore, vKeys).Process(scriptPubKey);
-}
diff --git a/src/scriptutils.h b/src/scriptutils.h
index 98080fc456cb..4e98a1f74fa2 100644
--- a/src/scriptutils.h
+++ b/src/scriptutils.h
@@ -24,6 +24,5 @@ typedef uint8_t isminefilter;
 
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
-void ExtractAffectedKeys(const CKeyStore &keystore, const CScript& scriptPubKey, std::vector<CKeyID> &vKeys);
 
 #endif // H_BITCOIN_SCRIPT
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 218a1379664a..52660be9a035 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2086,6 +2086,39 @@ void CWallet::ListLockedCoins(std::vector<COutPoint>& vOutpts)
     }
 }
 
+
+class CAffectedKeysVisitor : public boost::static_visitor<void> {
+private:
+    const CKeyStore &keystore;
+    std::vector<CKeyID> &vKeys;
+
+public:
+    CAffectedKeysVisitor(const CKeyStore &keystoreIn, std::vector<CKeyID> &vKeysIn) : keystore(keystoreIn), vKeys(vKeysIn) {}
+
+    void Process(const CScript &script) {
+        txnouttype type;
+        std::vector<CTxDestination> vDest;
+        int nRequired;
+        if (ExtractDestinations(script, type, vDest, nRequired)) {
+            BOOST_FOREACH(const CTxDestination &dest, vDest)
+                boost::apply_visitor(*this, dest);
+        }
+    }
+
+    void operator()(const CKeyID &keyId) {
+        if (keystore.HaveKey(keyId))
+            vKeys.push_back(keyId);
+    }
+
+    void operator()(const CScriptID &scriptId) {
+        CScript script;
+        if (keystore.GetCScript(scriptId, script))
+            Process(script);
+    }
+
+    void operator()(const CNoDestination &none) {}
+};
+
 void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const {
     AssertLockHeld(cs_wallet); // mapKeyMetadata
     mapKeyBirth.clear();
@@ -2121,7 +2154,7 @@ void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const {
             int nHeight = blit->second->nHeight;
             BOOST_FOREACH(const CTxOut &txout, wtx.vout) {
                 // iterate over all their outputs
-                ::ExtractAffectedKeys(*this, txout.scriptPubKey, vAffected);
+                CAffectedKeysVisitor(*this, vAffected).Process(txout.scriptPubKey);
                 BOOST_FOREACH(const CKeyID &keyid, vAffected) {
                     // ... and all their affected keys
                     std::map<CKeyID, CBlockIndex*>::iterator rit = mapKeyFirstBlock.find(keyid);

From c1e433b717fbc26a74ca395771076b203630a5a2 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sat, 30 Aug 2014 13:40:37 +0200
Subject: [PATCH 0681/1819] Rename scriptutils.o to wallet_ismine.o

---
 src/Makefile.am                            | 4 ++--
 src/test/multisig_tests.cpp                | 2 +-
 src/test/script_P2SH_tests.cpp             | 2 +-
 src/wallet.h                               | 2 +-
 src/{scriptutils.cpp => wallet_ismine.cpp} | 2 +-
 src/{scriptutils.h => wallet_ismine.h}     | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)
 rename src/{scriptutils.cpp => wallet_ismine.cpp} (98%)
 rename src/{scriptutils.h => wallet_ismine.h} (91%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 27bcdc7bcc16..b2071f49e235 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -103,7 +103,7 @@ BITCOIN_CORE_H = \
   script/script.h \
   script/sign.h \
   script/standard.h \
-  scriptutils.h \
+  wallet_ismine.h \
   serialize.h \
   sync.h \
   threadsafety.h \
@@ -173,7 +173,7 @@ libbitcoin_wallet_a_SOURCES = \
   crypter.cpp \
   rpcdump.cpp \
   rpcwallet.cpp \
-  scriptutils.cpp \
+  wallet_ismine.cpp \
   wallet.cpp \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 427477edcc6e..91dfa3950587 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -11,7 +11,7 @@
 #include "uint256.h"
 
 #ifdef ENABLE_WALLET
-#include "scriptutils.h"
+#include "wallet_ismine.h"
 #endif
 
 #include <boost/assign/std/vector.hpp>
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index b1c1052de454..f99002017f4c 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -9,7 +9,7 @@
 #include "script/sign.h"
 
 #ifdef ENABLE_WALLET
-#include "scriptutils.h"
+#include "wallet_ismine.h"
 #endif
 
 #include <vector>
diff --git a/src/wallet.h b/src/wallet.h
index 6788986f88cb..5c2618673011 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -11,7 +11,7 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "scriptutils.h"
+#include "wallet_ismine.h"
 #include "ui_interface.h"
 #include "walletdb.h"
 
diff --git a/src/scriptutils.cpp b/src/wallet_ismine.cpp
similarity index 98%
rename from src/scriptutils.cpp
rename to src/wallet_ismine.cpp
index 5099d7515a43..1c2c117fadbb 100644
--- a/src/scriptutils.cpp
+++ b/src/wallet_ismine.cpp
@@ -3,7 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "scriptutils.h"
+#include "wallet_ismine.h"
 
 #include "key.h"
 #include "keystore.h"
diff --git a/src/scriptutils.h b/src/wallet_ismine.h
similarity index 91%
rename from src/scriptutils.h
rename to src/wallet_ismine.h
index 4e98a1f74fa2..9915e9f7bba3 100644
--- a/src/scriptutils.h
+++ b/src/wallet_ismine.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPTUTILS
-#define H_BITCOIN_SCRIPTUTILS
+#ifndef H_BITCOIN_WALLET_ISMINE
+#define H_BITCOIN_WALLET_ISMINE
 
 #include "key.h"
 #include "script/script.h"

From def2fdb4b9b52fa908c11fe2f5a42ea04f8e9f11 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 9 Sep 2014 14:01:11 -0400
Subject: [PATCH 0682/1819] Fix crashing bug caused by orphan(s) with duplicate
 prevout.hash

---
 src/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index f063a48fe579..27100d62c2a6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -498,6 +498,8 @@ void static EraseOrphanTx(uint256 hash)
     BOOST_FOREACH(const CTxIn& txin, it->second.vin)
     {
         map<uint256, set<uint256> >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash);
+        if (itPrev == mapOrphanTransactionsByPrev.end())
+            continue;
         itPrev->second.erase(hash);
         if (itPrev->second.empty())
             mapOrphanTransactionsByPrev.erase(itPrev);

From e982b574a5e8878fb50f8f75c179474f2b1661dd Mon Sep 17 00:00:00 2001
From: Adam Weiss <adam@signal11.com>
Date: Wed, 10 Sep 2014 12:26:59 -0400
Subject: [PATCH 0683/1819] Use explicit fflush() instead of setvbuf()

Flushing after every line when printing to console is desirable when
running with systemd but setvbuf() has slightly different semantics
on Windows that causes warnings.  Just do an explicit fflush() after
each line print to console instead.
---
 src/init.cpp | 1 -
 src/util.cpp | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 31f64878fb25..2e18f485bf1a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -630,7 +630,6 @@ bool AppInit2(boost::thread_group& threadGroup)
     fPrintToConsole = GetBoolArg("-printtoconsole", false);
     fLogTimestamps = GetBoolArg("-logtimestamps", true);
     fLogIPs = GetBoolArg("-logips", false);
-    setvbuf(stdout, NULL, _IOLBF, 0);
 #ifdef ENABLE_WALLET
     bool fDisableWallet = GetBoolArg("-disablewallet", false);
 #endif
diff --git a/src/util.cpp b/src/util.cpp
index 5a4e187f9e2a..20aff49c8616 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -211,6 +211,7 @@ int LogPrintStr(const std::string &str)
     {
         // print to console
         ret = fwrite(str.data(), 1, str.size(), stdout);
+        fflush(stdout);
     }
     else if (fPrintToDebugLog && AreBaseParamsConfigured())
     {

From ec7eb0fa80ce50f0c45c7f764bf4958224721ca0 Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Mon, 8 Sep 2014 13:29:14 -0400
Subject: [PATCH 0684/1819] When reindexing check for file before trying to
 open (refactored)

---
 src/init.cpp | 4 +++-
 src/main.cpp | 8 +++++++-
 src/main.h   | 2 ++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 31f64878fb25..4b95f293655b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -401,9 +401,11 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
         int nFile = 0;
         while (true) {
             CDiskBlockPos pos(nFile, 0);
+            if (!boost::filesystem::exists(GetBlockPosFilename(pos, "blk")))
+                break; // No block files left to reindex
             FILE *file = OpenBlockFile(pos, true);
             if (!file)
-                break;
+                break; // This error is logged in OpenBlockFile
             LogPrintf("Reindexing block file blk%05u.dat...\n", (unsigned int)nFile);
             LoadExternalBlockFile(file, &pos);
             nFile++;
diff --git a/src/main.cpp b/src/main.cpp
index a3b31b719d57..0816e36633fc 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2766,7 +2766,7 @@ FILE* OpenDiskFile(const CDiskBlockPos &pos, const char *prefix, bool fReadOnly)
 {
     if (pos.IsNull())
         return NULL;
-    boost::filesystem::path path = GetDataDir() / "blocks" / strprintf("%s%05u.dat", prefix, pos.nFile);
+    boost::filesystem::path path = GetBlockPosFilename(pos, prefix);
     boost::filesystem::create_directories(path.parent_path());
     FILE* file = fopen(path.string().c_str(), "rb+");
     if (!file && !fReadOnly)
@@ -2793,6 +2793,12 @@ FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly) {
     return OpenDiskFile(pos, "rev", fReadOnly);
 }
 
+boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix)
+{
+    boost::filesystem::path path = GetDataDir() / "blocks" / strprintf("%s%05u.dat", prefix, pos.nFile);
+    return path;  
+}
+
 CBlockIndex * InsertBlockIndex(uint256 hash)
 {
     if (hash == 0)
diff --git a/src/main.h b/src/main.h
index 8c0a743e24d6..09de2187c451 100644
--- a/src/main.h
+++ b/src/main.h
@@ -145,6 +145,8 @@ bool CheckDiskSpace(uint64_t nAdditionalBytes = 0);
 FILE* OpenBlockFile(const CDiskBlockPos &pos, bool fReadOnly = false);
 /** Open an undo file (rev?????.dat) */
 FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly = false);
+/** Translation to a filesystem path */
+boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix);
 /** Import blocks from an external file */
 bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp = NULL);
 /** Initialize a new block tree database + block data on disk */

From c74332c67806ed92e6e18de174671a7c30608780 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 28 Aug 2014 13:23:24 -0400
Subject: [PATCH 0685/1819] Stricter handling of orphan transactions

Prevent denial-of-service attacks by banning
peers that send us invalid orphan transactions
and only storing orphan transactions given to
us by a peer while the peer is connected.
---
 src/main.cpp           | 65 +++++++++++++++++++++++++++++++++---------
 src/test/DoS_tests.cpp | 17 ++++++++---
 2 files changed, 65 insertions(+), 17 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 27100d62c2a6..6a2e6ac659b8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -63,8 +63,13 @@ struct COrphanBlock {
 map<uint256, COrphanBlock*> mapOrphanBlocks;
 multimap<uint256, COrphanBlock*> mapOrphanBlocksByPrev;
 
-map<uint256, CTransaction> mapOrphanTransactions;
+struct COrphanTx {
+    CTransaction tx;
+    NodeId fromPeer;
+};
+map<uint256, COrphanTx> mapOrphanTransactions;
 map<uint256, set<uint256> > mapOrphanTransactionsByPrev;
+void EraseOrphansFor(NodeId peer);
 
 // Constant stuff for coinbase transactions we create:
 CScript COINBASE_FLAGS;
@@ -264,6 +269,7 @@ void FinalizeNode(NodeId nodeid) {
         mapBlocksInFlight.erase(entry.hash);
     BOOST_FOREACH(const uint256& hash, state->vBlocksToDownload)
         mapBlocksToDownload.erase(hash);
+    EraseOrphansFor(nodeid);
 
     mapNodeState.erase(nodeid);
 }
@@ -461,7 +467,7 @@ CBlockTreeDB *pblocktree = NULL;
 // mapOrphanTransactions
 //
 
-bool AddOrphanTx(const CTransaction& tx)
+bool AddOrphanTx(const CTransaction& tx, NodeId peer)
 {
     uint256 hash = tx.GetHash();
     if (mapOrphanTransactions.count(hash))
@@ -481,21 +487,22 @@ bool AddOrphanTx(const CTransaction& tx)
         return false;
     }
 
-    mapOrphanTransactions[hash] = tx;
+    mapOrphanTransactions[hash].tx = tx;
+    mapOrphanTransactions[hash].fromPeer = peer;
     BOOST_FOREACH(const CTxIn& txin, tx.vin)
         mapOrphanTransactionsByPrev[txin.prevout.hash].insert(hash);
 
-    LogPrint("mempool", "stored orphan tx %s (mapsz %u)\n", hash.ToString(),
-        mapOrphanTransactions.size());
+    LogPrint("mempool", "stored orphan tx %s (mapsz %u prevsz %u)\n", hash.ToString(),
+             mapOrphanTransactions.size(), mapOrphanTransactionsByPrev.size());
     return true;
 }
 
 void static EraseOrphanTx(uint256 hash)
 {
-    map<uint256, CTransaction>::iterator it = mapOrphanTransactions.find(hash);
+    map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.find(hash);
     if (it == mapOrphanTransactions.end())
         return;
-    BOOST_FOREACH(const CTxIn& txin, it->second.vin)
+    BOOST_FOREACH(const CTxIn& txin, it->second.tx.vin)
     {
         map<uint256, set<uint256> >::iterator itPrev = mapOrphanTransactionsByPrev.find(txin.prevout.hash);
         if (itPrev == mapOrphanTransactionsByPrev.end())
@@ -507,6 +514,23 @@ void static EraseOrphanTx(uint256 hash)
     mapOrphanTransactions.erase(it);
 }
 
+void EraseOrphansFor(NodeId peer)
+{
+    int nErased = 0;
+    map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin();
+    while (iter != mapOrphanTransactions.end())
+    {
+        map<uint256, COrphanTx>::iterator maybeErase = iter++; // increment to avoid iterator becoming invalid
+        if (maybeErase->second.fromPeer == peer)
+        {
+            EraseOrphanTx(maybeErase->second.tx.GetHash());
+            ++nErased;
+        }
+    }
+    if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx from peer %d\n", nErased, peer);
+}
+
+
 unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
 {
     unsigned int nEvicted = 0;
@@ -514,7 +538,7 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
     {
         // Evict a random orphan:
         uint256 randomhash = GetRandHash();
-        map<uint256, CTransaction>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
+        map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
         if (it == mapOrphanTransactions.end())
             it = mapOrphanTransactions.begin();
         EraseOrphanTx(it->first);
@@ -3777,6 +3801,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                 mempool.mapTx.size());
 
             // Recursively process any orphan transactions that depended on this one
+            set<NodeId> setMisbehaving;
             for (unsigned int i = 0; i < vWorkQueue.size(); i++)
             {
                 map<uint256, set<uint256> >::iterator itByPrev = mapOrphanTransactionsByPrev.find(vWorkQueue[i]);
@@ -3787,25 +3812,36 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                      ++mi)
                 {
                     const uint256& orphanHash = *mi;
-                    const CTransaction& orphanTx = mapOrphanTransactions[orphanHash];
+                    const CTransaction& orphanTx = mapOrphanTransactions[orphanHash].tx;
+                    NodeId fromPeer = mapOrphanTransactions[orphanHash].fromPeer;
                     bool fMissingInputs2 = false;
                     // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan
                     // resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get
                     // anyone relaying LegitTxX banned)
                     CValidationState stateDummy;
 
+                    vEraseQueue.push_back(orphanHash);
+
+                    if (setMisbehaving.count(fromPeer))
+                        continue;
                     if (AcceptToMemoryPool(mempool, stateDummy, orphanTx, true, &fMissingInputs2))
                     {
                         LogPrint("mempool", "   accepted orphan tx %s\n", orphanHash.ToString());
                         RelayTransaction(orphanTx);
                         mapAlreadyAskedFor.erase(CInv(MSG_TX, orphanHash));
                         vWorkQueue.push_back(orphanHash);
-                        vEraseQueue.push_back(orphanHash);
                     }
                     else if (!fMissingInputs2)
                     {
-                        // invalid or too-little-fee orphan
-                        vEraseQueue.push_back(orphanHash);
+                        int nDos = 0;
+                        if (stateDummy.IsInvalid(nDos) && nDos > 0)
+                        {
+                            // Punish peer that gave us an invalid orphan tx
+                            Misbehaving(fromPeer, nDos);
+                            setMisbehaving.insert(fromPeer);
+                            LogPrint("mempool", "   invalid orphan tx %s\n", orphanHash.ToString());
+                        }
+                        // too-little-fee orphan
                         LogPrint("mempool", "   removed orphan tx %s\n", orphanHash.ToString());
                     }
                     mempool.check(pcoinsTip);
@@ -3817,7 +3853,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         }
         else if (fMissingInputs)
         {
-            AddOrphanTx(tx);
+            AddOrphanTx(tx, pfrom->GetId());
 
             // DoS prevention: do not allow mapOrphanTransactions to grow unbounded
             unsigned int nEvicted = LimitOrphanTxSize(MAX_ORPHAN_TRANSACTIONS);
@@ -4324,7 +4360,9 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
                 if (pto->addr.IsLocal())
                     LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString());
                 else
+                {
                     CNode::Ban(pto->addr);
+                }
             }
             state.fShouldBan = false;
         }
@@ -4538,5 +4576,6 @@ class CMainCleanup
 
         // orphan transactions
         mapOrphanTransactions.clear();
+        mapOrphanTransactionsByPrev.clear();
     }
 } instance_of_cmaincleanup;
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index fa4edff63f1e..e01967481686 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -24,7 +24,8 @@
 #include <boost/test/unit_test.hpp>
 
 // Tests this internal-to-main.cpp method:
-extern bool AddOrphanTx(const CTransaction& tx);
+extern bool AddOrphanTx(const CTransaction& tx, NodeId peer);
+extern void EraseOrphansFor(NodeId peer);
 extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans);
 extern std::map<uint256, CTransaction> mapOrphanTransactions;
 extern std::map<uint256, std::set<uint256> > mapOrphanTransactionsByPrev;
@@ -174,7 +175,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         tx.vout[0].nValue = 1*CENT;
         tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
 
-        AddOrphanTx(tx);
+        AddOrphanTx(tx, i);
     }
 
     // ... and 50 that depend on other orphans:
@@ -191,7 +192,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
         SignSignature(keystore, txPrev, tx, 0);
 
-        AddOrphanTx(tx);
+        AddOrphanTx(tx, i);
     }
 
     // This really-big orphan should be ignored:
@@ -215,7 +216,15 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         for (unsigned int j = 1; j < tx.vin.size(); j++)
             tx.vin[j].scriptSig = tx.vin[0].scriptSig;
 
-        BOOST_CHECK(!AddOrphanTx(tx));
+        BOOST_CHECK(!AddOrphanTx(tx, i));
+    }
+
+    // Test EraseOrphansFor:
+    for (NodeId i = 0; i < 3; i++)
+    {
+        size_t sizeBefore = mapOrphanTransactions.size();
+        EraseOrphansFor(i);
+        BOOST_CHECK(mapOrphanTransactions.size() < sizeBefore);
     }
 
     // Test LimitOrphanTxSize() function:

From aa3c697e90c02d5797a59a7bfb1ecac6fbd918cf Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 10 Sep 2014 14:08:03 -0400
Subject: [PATCH 0686/1819] Store fewer orphan tx by default, add -maxorphantx
 option

There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.

This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.
---
 src/init.cpp | 1 +
 src/main.cpp | 3 ++-
 src/main.h   | 4 ++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 31f64878fb25..8f336c31fb31 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -226,6 +226,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -dbcache=<n>           " + strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache) + "\n";
     strUsage += "  -loadblock=<file>      " + _("Imports blocks from external blk000??.dat file") + " " + _("on startup") + "\n";
     strUsage += "  -maxorphanblocks=<n>   " + strprintf(_("Keep at most <n> unconnectable blocks in memory (default: %u)"), DEFAULT_MAX_ORPHAN_BLOCKS) + "\n";
+    strUsage += "  -maxorphantx=<n>       " + strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
     strUsage += "  -pid=<file>            " + _("Specify pid file (default: bitcoind.pid)") + "\n";
     strUsage += "  -reindex               " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n";
diff --git a/src/main.cpp b/src/main.cpp
index 6a2e6ac659b8..f9782549613b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3856,7 +3856,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             AddOrphanTx(tx, pfrom->GetId());
 
             // DoS prevention: do not allow mapOrphanTransactions to grow unbounded
-            unsigned int nEvicted = LimitOrphanTxSize(MAX_ORPHAN_TRANSACTIONS);
+            unsigned int nMaxOrphanTx = (unsigned int)std::max((int64_t)0, GetArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS));
+            unsigned int nEvicted = LimitOrphanTxSize(nMaxOrphanTx);
             if (nEvicted > 0)
                 LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
         } else if (pfrom->fWhitelisted) {
diff --git a/src/main.h b/src/main.h
index 30cccab2f1cb..d340fd0b6a9b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -51,8 +51,8 @@ static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
 static const unsigned int MAX_P2SH_SIGOPS = 15;
 /** The maximum number of sigops we're willing to relay/mine in a single tx */
 static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
-/** The maximum number of orphan transactions kept in memory */
-static const unsigned int MAX_ORPHAN_TRANSACTIONS = MAX_BLOCK_SIZE/100;
+/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
+static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
 /** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
 static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 750;
 /** The maximum size of a blk?????.dat file (since 0.8) */

From 07d5287f42ececa2e059724c7c5bba55c8658bc6 Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@chaincode.com>
Date: Thu, 11 Sep 2014 09:22:39 -0400
Subject: [PATCH 0687/1819] Catch error when done reading files

---
 contrib/linearize/linearize-data.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 383bb38198a7..3b5d198c1492 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -110,7 +110,11 @@ def copydata(settings, blkindex, blkset):
 		if not inF:
 			fname = "%s/blk%05d.dat" % (settings['input'], inFn)
 			print("Input file" + fname)
-			inF = open(fname, "rb")
+			try:
+				inF = open(fname, "rb")
+			except IOError:
+				print "Done"
+				return
 
 		inhdr = inF.read(8)
 		if (not inhdr or (inhdr[0] == "\0")):

From efad808aaece74a0308a77e35ad35e845edb97f8 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 12 Sep 2014 16:37:53 +0200
Subject: [PATCH 0688/1819] Avoid reject message feedback loops

---
 src/main.cpp | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index f9782549613b..7a126ca49548 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4106,21 +4106,25 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "reject")
     {
-        if (fDebug)
-        {
-            string strMsg; unsigned char ccode; string strReason;
-            vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, 111);
+        if (fDebug) {
+            try {
+                string strMsg; unsigned char ccode; string strReason;
+                vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, 111);
 
-            ostringstream ss;
-            ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
+                ostringstream ss;
+                ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
 
-            if (strMsg == "block" || strMsg == "tx")
-            {
-                uint256 hash;
-                vRecv >> hash;
-                ss << ": hash " << hash.ToString();
+                if (strMsg == "block" || strMsg == "tx")
+                {
+                    uint256 hash;
+                    vRecv >> hash;
+                    ss << ": hash " << hash.ToString();
+                }
+                LogPrint("net", "Reject %s\n", SanitizeString(ss.str()));
+            } catch (std::ios_base::failure& e) {
+                // Avoid feedback loops by preventing reject messages from triggering a new reject message.
+                LogPrint("net", "Unparseable reject message received\n");
             }
-            LogPrint("net", "Reject %s\n", SanitizeString(ss.str()));
         }
     }
 

From 358562b65189dce982ad30a1c158606a540e9bcb Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 18 Jul 2014 15:41:55 +0200
Subject: [PATCH 0689/1819] Remove unused function main:VerifySignature

---
 src/main.cpp                   | 5 -----
 src/main.h                     | 2 --
 src/test/script_P2SH_tests.cpp | 2 +-
 3 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index f9782549613b..2163b90bfeff 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1372,11 +1372,6 @@ bool CScriptCheck::operator()() const {
     return true;
 }
 
-bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
-{
-    return CScriptCheck(txFrom, txTo, nIn, flags, nHashType)();
-}
-
 bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
 {
     if (!tx.IsCoinBase())
diff --git a/src/main.h b/src/main.h
index d340fd0b6a9b..f7682c213cf1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -174,8 +174,6 @@ int64_t GetBlockValue(int nHeight, int64_t nFees);
 
 /** Create a new block index entry for a given block hash */
 CBlockIndex * InsertBlockIndex(uint256 hash);
-/** Verify a signature */
-bool VerifySignature(const CCoins& txFrom, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 /** Abort with a message */
 bool AbortNode(const std::string &msg);
 /** Get statistics from node state */
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index f99002017f4c..ef63d9d349a8 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(sign)
         {
             CScript sigSave = txTo[i].vin[0].scriptSig;
             txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig;
-            bool sigOK = VerifySignature(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0);
+            bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0)();
             if (i == j)
                 BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j));
             else

From ce3649fb61b2b421aa4e36ab107e5f2f9838378b Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 18 Jul 2014 16:51:33 +0200
Subject: [PATCH 0690/1819] Remove CScriptCheck::nHashType (was always 0)

---
 src/main.cpp                   | 6 +++---
 src/main.h                     | 8 +++-----
 src/test/script_P2SH_tests.cpp | 2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2163b90bfeff..2fde266f11d9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1367,7 +1367,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 
 bool CScriptCheck::operator()() const {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, nHashType))
+    if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, 0))
         return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString());
     return true;
 }
@@ -1440,7 +1440,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                 assert(coins);
 
                 // Verify signature
-                CScriptCheck check(*coins, tx, i, flags, 0);
+                CScriptCheck check(*coins, tx, i, flags);
                 if (pvChecks) {
                     pvChecks->push_back(CScriptCheck());
                     check.swap(pvChecks->back());
@@ -1453,7 +1453,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                         // avoid splitting the network between upgraded and
                         // non-upgraded nodes.
                         CScriptCheck check(*coins, tx, i,
-                                flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, 0);
+                                flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS);
                         if (check())
                             return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag");
                     }
diff --git a/src/main.h b/src/main.h
index f7682c213cf1..2ec1691471f8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -340,13 +340,12 @@ class CScriptCheck
     const CTransaction *ptxTo;
     unsigned int nIn;
     unsigned int nFlags;
-    int nHashType;
 
 public:
-    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), nHashType(0) {}
-    CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, int nHashTypeIn) :
+    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0) {}
+    CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn) :
         scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey),
-        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), nHashType(nHashTypeIn) { }
+        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn) { }
 
     bool operator()() const;
 
@@ -355,7 +354,6 @@ class CScriptCheck
         std::swap(ptxTo, check.ptxTo);
         std::swap(nIn, check.nIn);
         std::swap(nFlags, check.nFlags);
-        std::swap(nHashType, check.nHashType);
     }
 };
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index ef63d9d349a8..add198766404 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(sign)
         {
             CScript sigSave = txTo[i].vin[0].scriptSig;
             txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig;
-            bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0)();
+            bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC)();
             if (i == j)
                 BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j));
             else

From 2b23a87599b7d28e86ca193e7b52f429bcdf144f Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 18 Jul 2014 17:48:00 +0200
Subject: [PATCH 0691/1819] Don't pass nHashType to VerifyScript

---
 src/bitcoin-tx.cpp             |  2 +-
 src/main.cpp                   |  2 +-
 src/rpcrawtransaction.cpp      |  2 +-
 src/script/interpreter.cpp     |  9 ++++-----
 src/script/interpreter.h       |  2 +-
 src/script/sign.cpp            |  2 +-
 src/test/multisig_tests.cpp    | 18 +++++++++---------
 src/test/script_P2SH_tests.cpp |  2 +-
 src/test/script_tests.cpp      | 30 +++++++++++++++---------------
 src/test/transaction_tests.cpp |  4 ++--
 10 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 91525b51c9e4..1e27d400c8a9 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -436,7 +436,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
         BOOST_FOREACH(const CTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS, 0))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS))
             fComplete = false;
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index 2fde266f11d9..c59bc40c69c3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1367,7 +1367,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 
 bool CScriptCheck::operator()() const {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags, 0))
+    if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags))
         return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString());
     return true;
 }
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index c5c99870fc2e..5730f72a856b 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -688,7 +688,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         BOOST_FOREACH(const CMutableTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS, 0))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS))
             fComplete = false;
     }
 
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 4f4fdb6b7f80..0b3d63e5d33b 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1006,15 +1006,14 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubK
     return true;
 }
 
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
-                  unsigned int flags, int nHashType)
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
 {
     vector<vector<unsigned char> > stack, stackCopy;
-    if (!EvalScript(stack, scriptSig, txTo, nIn, flags, nHashType))
+    if (!EvalScript(stack, scriptSig, txTo, nIn, flags, 0))
         return false;
     if (flags & SCRIPT_VERIFY_P2SH)
         stackCopy = stack;
-    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, nHashType))
+    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, 0))
         return false;
     if (stack.empty())
         return false;
@@ -1037,7 +1036,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
         CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
         popstack(stackCopy);
 
-        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, nHashType))
+        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, 0))
             return false;
         if (stackCopy.empty())
             return false;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 0c6f8b9d134a..ca57387a1382 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -40,6 +40,6 @@ bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
 bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags);
 
 #endif
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 958177de3d80..7037193b9c7e 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
     }
 
     // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS, 0);
+    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS);
 }
 
 bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 91dfa3950587..cb37740068e4 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -82,19 +82,19 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     keys.clear();
     keys += key[0],key[1]; // magic operator+= from boost.assign
     s = sign_multisig(a_and_b, keys, txTo[0], 0);
-    BOOST_CHECK(VerifyScript(s, a_and_b, txTo[0], 0, flags, 0));
+    BOOST_CHECK(VerifyScript(s, a_and_b, txTo[0], 0, flags));
 
     for (int i = 0; i < 4; i++)
     {
         keys.clear();
         keys += key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags, 0), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags), strprintf("a&b 1: %d", i));
 
         keys.clear();
         keys += key[1],key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags, 0), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags), strprintf("a&b 2: %d", i));
     }
 
     // Test a OR b:
@@ -104,16 +104,16 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         keys += key[i];
         s = sign_multisig(a_or_b, keys, txTo[1], 0);
         if (i == 0 || i == 1)
-            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, txTo[1], 0, flags, 0), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, txTo[1], 0, flags), strprintf("a|b: %d", i));
         else
-            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, txTo[1], 0, flags, 0), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, txTo[1], 0, flags), strprintf("a|b: %d", i));
     }
     s.clear();
     s << OP_0 << OP_0;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags));
     s.clear();
     s << OP_0 << OP_1;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags));
 
 
     for (int i = 0; i < 4; i++)
@@ -123,9 +123,9 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
             keys += key[i],key[j];
             s = sign_multisig(escrow, keys, txTo[2], 0);
             if (i < j && i < 3 && j < 3)
-                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, txTo[2], 0, flags, 0), strprintf("escrow 1: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, txTo[2], 0, flags), strprintf("escrow 1: %d %d", i, j));
             else
-                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, txTo[2], 0, flags, 0), strprintf("escrow 2: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, txTo[2], 0, flags), strprintf("escrow 2: %d %d", i, j));
         }
 }
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index add198766404..d866380229cb 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -42,7 +42,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict)
     txTo.vin[0].scriptSig = scriptSig;
     txTo.vout[0].nValue = 1;
 
-    return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, 0);
+    return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE);
 }
 
 
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index bc610778c47b..0b4035f8d797 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(script_valid)
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags, SIGHASH_NONE), strTest);
+        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags), strTest);
     }
 }
 
@@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(script_invalid)
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags, SIGHASH_NONE), strTest);
+        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags), strTest);
     }
 }
 
@@ -185,15 +185,15 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     txTo12.vout[0].nValue = 1;
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags, 0));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags));
     txTo12.vout[0].nValue = 2;
-    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags));
 
     CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, txTo12, 0, flags, 0));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, txTo12, 0, flags));
 
     CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, txTo12, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, txTo12, 0, flags));
 }
 
 BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
@@ -221,46 +221,46 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
     CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key3);
     CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key3);
     CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
     CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
     CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
     CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
     CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
     CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, txTo23, 0, flags));
 
     keys.clear(); // Must have signatures
     CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, txTo23, 0, flags, 0));
+    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, txTo23, 0, flags));
 }    
 
 BOOST_AUTO_TEST_CASE(script_combineSigs)
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 21377395cf92..42f400ef4155 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                                 tx, i, verify_flags, 0),
+                                                 tx, i, verify_flags),
                                     strTest);
             }
         }
@@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                      tx, i, verify_flags, 0);
+                                      tx, i, verify_flags);
             }
 
             BOOST_CHECK_MESSAGE(!fValid, strTest);

From 6dcfda2dc48bee2148acd571dce7d3f09608d7a2 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@monetize.io>
Date: Fri, 18 Jul 2014 18:47:10 +0200
Subject: [PATCH 0692/1819] Don't pass nHashType to EvalScript nor CheckSig

---
 src/main.cpp               |  2 +-
 src/script/interpreter.cpp | 19 ++++++++-----------
 src/script/interpreter.h   |  4 ++--
 src/script/sign.cpp        |  6 +++---
 src/test/script_tests.cpp  |  8 ++++----
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c59bc40c69c3..134e87fc993d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -697,7 +697,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
         // IsStandard() will have already returned false
         // and this method isn't called.
         vector<vector<unsigned char> > stack;
-        if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false, 0))
+        if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false))
             return false;
 
         if (whichType == TX_SCRIPTHASH)
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 0b3d63e5d33b..c745564599e5 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -132,7 +132,7 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
     return true;
 }
 
-bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType)
+bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
 {
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
@@ -675,7 +675,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     scriptCode.FindAndDelete(CScript(vchSig));
 
                     bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                        CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
+                        CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, flags);
 
                     popstack(stack);
                     popstack(stack);
@@ -736,7 +736,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
 
                         // Check signature
                         bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                            CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, nHashType, flags);
+                            CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, flags);
 
                         if (fOk) {
                             isig++;
@@ -975,7 +975,7 @@ class CSignatureCache
     }
 };
 
-bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags)
+bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int flags)
 {
     static CSignatureCache signatureCache;
 
@@ -986,10 +986,7 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubK
     // Hash type is one byte tacked on to the end of the signature
     if (vchSig.empty())
         return false;
-    if (nHashType == 0)
-        nHashType = vchSig.back();
-    else if (nHashType != vchSig.back())
-        return false;
+    int nHashType = vchSig.back();
     vchSig.pop_back();
 
     uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
@@ -1009,11 +1006,11 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char> &vchPubK
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
 {
     vector<vector<unsigned char> > stack, stackCopy;
-    if (!EvalScript(stack, scriptSig, txTo, nIn, flags, 0))
+    if (!EvalScript(stack, scriptSig, txTo, nIn, flags))
         return false;
     if (flags & SCRIPT_VERIFY_P2SH)
         stackCopy = stack;
-    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags, 0))
+    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags))
         return false;
     if (stack.empty())
         return false;
@@ -1036,7 +1033,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
         CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
         popstack(stackCopy);
 
-        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags, 0))
+        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags))
             return false;
         if (stackCopy.empty())
             return false;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index ca57387a1382..0c00eefe7d4a 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -38,8 +38,8 @@ bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int
 bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, int flags);
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
+bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int flags);
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags);
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags);
 
 #endif
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 7037193b9c7e..cbddc1b72a23 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -174,7 +174,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
             if (sigs.count(pubkey))
                 continue; // Already got a sig for this pubkey
 
-            if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0, 0))
+            if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0))
             {
                 sigs[pubkey] = sig;
                 break;
@@ -252,9 +252,9 @@ CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsign
     Solver(scriptPubKey, txType, vSolutions);
 
     vector<valtype> stack1;
-    EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
+    EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
     vector<valtype> stack2;
-    EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC, 0);
+    EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
 
     return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
 }
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 0b4035f8d797..fc4cf05ebd29 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -116,18 +116,18 @@ BOOST_AUTO_TEST_CASE(script_PushData)
     static const unsigned char pushdata4[] = { OP_PUSHDATA4, 1, 0, 0, 0, 0x5a };
 
     vector<vector<unsigned char> > directStack;
-    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), CTransaction(), 0, true, 0));
+    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), CTransaction(), 0, true));
 
     vector<vector<unsigned char> > pushdata1Stack;
-    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), CTransaction(), 0, true, 0));
+    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), CTransaction(), 0, true));
     BOOST_CHECK(pushdata1Stack == directStack);
 
     vector<vector<unsigned char> > pushdata2Stack;
-    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), CTransaction(), 0, true, 0));
+    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), CTransaction(), 0, true));
     BOOST_CHECK(pushdata2Stack == directStack);
 
     vector<vector<unsigned char> > pushdata4Stack;
-    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), CTransaction(), 0, true, 0));
+    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), CTransaction(), 0, true));
     BOOST_CHECK(pushdata4Stack == directStack);
 }
 

From 15ef1b905b3b468a024b8d5b20c94d80d3c4296a Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 14 Sep 2014 05:28:41 +0000
Subject: [PATCH 0693/1819] Bugfix: bitcoin-tx: scriptPubKey may be null, so
 accept outscript=<n>:

---
 src/bitcoin-tx.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 91525b51c9e4..70819ff2e55a 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -237,8 +237,7 @@ static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput
     // separate VALUE:SCRIPT in string
     size_t pos = strInput.find(':');
     if ((pos == string::npos) ||
-        (pos == 0) ||
-        (pos == (strInput.size() - 1)))
+        (pos == 0))
         throw runtime_error("TX output missing separator");
 
     // extract and validate VALUE

From a65e320747133723f02c1947a4cc257214325b0b Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 14 Sep 2014 06:01:51 +0000
Subject: [PATCH 0694/1819] bitcoin-util-test: Test bitcoin-tx with null
 scriptPubKey

---
 src/Makefile.test.include            | 3 ++-
 src/test/data/bitcoin-util-test.json | 3 +++
 src/test/data/txcreate2.hex          | 1 +
 3 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 src/test/data/txcreate2.hex

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b4360831bb5f..ab449f3e711c 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -13,7 +13,8 @@ EXTRA_DIST += \
 	test/data/tt-delout1-out.hex \
 	test/data/tt-locktime317000-out.hex \
 	test/data/tx394b54bb.hex \
-	test/data/txcreate1.hex
+	test/data/txcreate1.hex \
+	test/data/txcreate2.hex
 
 JSON_TEST_FILES = \
   test/data/script_valid.json \
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index 7db87d7c11bb..cb74d73ef2ae 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -34,5 +34,8 @@
      "outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
      "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
     "output_cmp": "txcreate1.hex"
+  },
+  { "exec": ["./bitcoin-tx", "-create", "outscript=0:"],
+    "output_cmp": "txcreate2.hex"
   }
 ]
diff --git a/src/test/data/txcreate2.hex b/src/test/data/txcreate2.hex
new file mode 100644
index 000000000000..5243c2d02e8b
--- /dev/null
+++ b/src/test/data/txcreate2.hex
@@ -0,0 +1 @@
+01000000000100000000000000000000000000

From 2d79bba36b028dd803fb17124420b9d209b842b6 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 9 Sep 2014 10:00:42 +0200
Subject: [PATCH 0695/1819] cleanup new script files (no code changes)

- add missing header end comments
- ensure alphabetical ordering
- update copyright year and license
---
 src/Makefile.am            | 4 ++--
 src/script/compressor.cpp  | 4 ++--
 src/script/compressor.h    | 6 +++---
 src/script/interpreter.cpp | 4 ++--
 src/script/interpreter.h   | 8 ++++----
 src/script/script.cpp      | 4 ++--
 src/script/script.h        | 6 +++---
 src/script/sign.cpp        | 4 ++--
 src/script/sign.h          | 7 ++++---
 src/script/standard.cpp    | 4 ++--
 src/script/standard.h      | 6 +++---
 src/wallet_ismine.cpp      | 4 ++--
 src/wallet_ismine.h        | 6 +++---
 13 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index b2071f49e235..78bb6cd6d179 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,8 +98,8 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
-  script/interpreter.h \
   script/compressor.h \
+  script/interpreter.h \
   script/script.h \
   script/sign.h \
   script/standard.h \
@@ -212,8 +212,8 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
-  script/interpreter.cpp \
   script/compressor.cpp \
+  script/interpreter.cpp \
   script/script.cpp \
   script/sign.cpp \
   script/standard.cpp \
diff --git a/src/script/compressor.cpp b/src/script/compressor.cpp
index 2f8df602bf54..51a3cf6025e8 100644
--- a/src/script/compressor.cpp
+++ b/src/script/compressor.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "compressor.h"
diff --git a/src/script/compressor.h b/src/script/compressor.h
index f0a3754f02b4..53c6bf3ecc73 100644
--- a/src/script/compressor.h
+++ b/src/script/compressor.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT_COMPRESSOR
@@ -81,4 +81,4 @@ class CScriptCompressor
     }
 };
 
-#endif
+#endif // H_BITCOIN_SCRIPT_COMPRESSOR
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 4f4fdb6b7f80..471edf1c98bd 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "interpreter.h"
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 0c6f8b9d134a..6fbcd92a3d0c 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT_INTERPRETER
@@ -10,9 +10,9 @@
 #include <stdint.h>
 #include <string>
 
-class uint256;
 class CScript;
 class CTransaction;
+class uint256;
 
 /** Signature hash types/flags */
 enum
@@ -42,4 +42,4 @@ bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
 
-#endif
+#endif // H_BITCOIN_SCRIPT_INTERPRETER
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 60d1beac95eb..3c9f38dc8b9e 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "script.h"
diff --git a/src/script/script.h b/src/script/script.h
index 21847c09bd8a..2336cafd67ea 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT
@@ -642,4 +642,4 @@ class CScript : public std::vector<unsigned char>
     }
 };
 
-#endif
+#endif // H_BITCOIN_SCRIPT
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 958177de3d80..db9513db9fd0 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "script/sign.h"
diff --git a/src/script/sign.h b/src/script/sign.h
index 51723b53af55..f218a64562c2 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT_SIGN
@@ -11,6 +11,7 @@
 class CKeyStore;
 class CScript;
 class CTransaction;
+
 struct CMutableTransaction;
 
 bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
@@ -20,4 +21,4 @@ bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutab
 // combine them intelligently and return the result.
 CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
-#endif
+#endif // H_BITCOIN_SCRIPT_SIGN
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 684edff4d230..bda4b8b0ae03 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "script/standard.h"
diff --git a/src/script/standard.h b/src/script/standard.h
index 18092e879e7e..6c17a9394e5a 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT_STANDARD
@@ -53,4 +53,4 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
 
-#endif
+#endif // H_BITCOIN_SCRIPT_STANDARD
diff --git a/src/wallet_ismine.cpp b/src/wallet_ismine.cpp
index 1c2c117fadbb..a3c221d3ab51 100644
--- a/src/wallet_ismine.cpp
+++ b/src/wallet_ismine.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "wallet_ismine.h"
diff --git a/src/wallet_ismine.h b/src/wallet_ismine.h
index 9915e9f7bba3..29e13a94a637 100644
--- a/src/wallet_ismine.h
+++ b/src/wallet_ismine.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_WALLET_ISMINE
@@ -25,4 +25,4 @@ typedef uint8_t isminefilter;
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 
-#endif // H_BITCOIN_SCRIPT
+#endif // H_BITCOIN_WALLET_ISMINE

From 611116d4e31634384e9757befbd5e5a1a80e8cd3 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 14 Sep 2014 12:43:56 +0200
Subject: [PATCH 0696/1819] header include cleanup

- ensures alphabetical ordering for includes etc. in source file headers
---
 src/Makefile.am           | 10 +++++-----
 src/allocators.h          |  1 +
 src/bitcoin-cli.cpp       |  4 ++--
 src/bitcoin-tx.cpp        | 13 +++++++------
 src/chainparamsbase.h     |  2 +-
 src/core_io.h             |  2 +-
 src/core_read.cpp         | 11 ++++++-----
 src/core_write.cpp        |  7 ++++---
 src/crypto/ripemd160.cpp  |  1 +
 src/crypto/sha1.cpp       |  1 +
 src/crypto/sha2.cpp       |  1 +
 src/db.cpp                |  1 +
 src/db.h                  |  4 +++-
 src/hash.h                |  2 +-
 src/init.cpp              |  2 +-
 src/leveldbwrapper.h      |  1 +
 src/net.cpp               |  2 +-
 src/pow.h                 |  2 +-
 src/random.cpp            |  4 +++-
 src/rpcclient.cpp         |  2 +-
 src/rpcdump.cpp           |  3 ++-
 src/rpcmining.cpp         |  4 ++--
 src/rpcnet.cpp            |  1 +
 src/rpcprotocol.cpp       |  2 +-
 src/rpcrawtransaction.cpp |  4 ++--
 src/serialize.h           |  2 +-
 src/sync.cpp              |  3 ++-
 src/timedata.h            |  4 ++--
 src/txdb.cpp              |  3 ++-
 src/txmempool.cpp         |  4 ++--
 src/uint256.h             |  2 +-
 src/util.h                |  2 +-
 src/utilstrencodings.cpp  |  3 ++-
 src/version.cpp           |  1 +
 src/wallet.h              |  2 +-
 src/walletdb.cpp          |  2 +-
 36 files changed, 67 insertions(+), 48 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index b2071f49e235..94a582dfacef 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -98,12 +98,11 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
-  script/interpreter.h \
   script/compressor.h \
+  script/interpreter.h \
   script/script.h \
   script/sign.h \
   script/standard.h \
-  wallet_ismine.h \
   serialize.h \
   sync.h \
   threadsafety.h \
@@ -118,8 +117,9 @@ BITCOIN_CORE_H = \
   utilmoneystr.h \
   utiltime.h \
   version.h \
-  walletdb.h \
   wallet.h \
+  wallet_ismine.h \
+  walletdb.h \
   compat/sanity.h
 
 JSON_H = \
@@ -173,8 +173,8 @@ libbitcoin_wallet_a_SOURCES = \
   crypter.cpp \
   rpcdump.cpp \
   rpcwallet.cpp \
-  wallet_ismine.cpp \
   wallet.cpp \
+  wallet_ismine.cpp \
   walletdb.cpp \
   $(BITCOIN_CORE_H)
 
@@ -212,8 +212,8 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
-  script/interpreter.cpp \
   script/compressor.cpp \
+  script/interpreter.cpp \
   script/script.cpp \
   script/sign.cpp \
   script/standard.cpp \
diff --git a/src/allocators.h b/src/allocators.h
index 0b1c9fea683a..65a7d089874e 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -12,6 +12,7 @@
 
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/once.hpp>
+
 #include <openssl/crypto.h> // for OPENSSL_cleanse()
 
 /**
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 871aaf93df5e..badb376cb385 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -3,11 +3,11 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "util.h"
+#include "chainparamsbase.h"
 #include "init.h"
 #include "rpcclient.h"
 #include "rpcprotocol.h"
-#include "chainparamsbase.h"
+#include "util.h"
 #include "utilstrencodings.h"
 #include "version.h"
 
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 91525b51c9e4..2cc4fda9dfd7 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -3,23 +3,24 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
-#include "util.h"
-#include "utilmoneystr.h"
 #include "core.h"
-#include "main.h"         // for MAX_BLOCK_SIZE
+#include "core_io.h"
 #include "keystore.h"
+#include "main.h" // for MAX_BLOCK_SIZE
 #include "script/script.h"
 #include "script/sign.h"
 #include "ui_interface.h" // for _(...)
 #include "univalue/univalue.h"
-#include "core_io.h"
+#include "util.h"
+#include "utilmoneystr.h"
 
 #include <stdio.h>
-#include <boost/assign/list_of.hpp>
+
 #include <boost/algorithm/string.hpp>
+#include <boost/assign/list_of.hpp>
 
-using namespace std;
 using namespace boost::assign;
+using namespace std;
 
 static bool fCreateBlank;
 static map<string,UniValue> registers;
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 2d3a07b44ab0..743c8c541a54 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -5,8 +5,8 @@
 #ifndef BITCOIN_CHAIN_PARAMS_BASE_H
 #define BITCOIN_CHAIN_PARAMS_BASE_H
 
-#include <vector>
 #include <string>
+#include <vector>
 
 /**
  * CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind)
diff --git a/src/core_io.h b/src/core_io.h
index adf74cce3284..6268a3bf5834 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -8,9 +8,9 @@
 #include <string>
 #include <vector>
 
-class uint256;
 class CScript;
 class CTransaction;
+class uint256;
 class UniValue;
 
 // core_read.cpp
diff --git a/src/core_read.cpp b/src/core_read.cpp
index efcecb106ff6..11ec72f243eb 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -3,21 +3,22 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "core_io.h"
+
 #include "core.h"
-#include "serialize.h"
 #include "script/script.h"
+#include "serialize.h"
+#include "univalue/univalue.h"
 #include "util.h"
 
-#include <boost/assign/list_of.hpp>
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/predicate.hpp>
-#include <boost/algorithm/string/split.hpp>
 #include <boost/algorithm/string/replace.hpp>
-#include "univalue/univalue.h"
+#include <boost/algorithm/string/split.hpp>
+#include <boost/assign/list_of.hpp>
 
-using namespace std;
 using namespace boost;
 using namespace boost::algorithm;
+using namespace std;
 
 CScript ParseScript(std::string s)
 {
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 62712b1ba061..cd64aabf63b5 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -3,14 +3,15 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "core_io.h"
-#include "univalue/univalue.h"
+
+#include "base58.h"
+#include "core.h"
 #include "script/script.h"
 #include "script/standard.h"
-#include "core.h"
 #include "serialize.h"
+#include "univalue/univalue.h"
 #include "util.h"
 #include "utilmoneystr.h"
-#include "base58.h"
 
 #include <boost/foreach.hpp>
 
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
index 24bd318d43e6..b5e9f0df49d4 100644
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -5,6 +5,7 @@
 #include "crypto/ripemd160.h"
 
 #include "crypto/common.h"
+
 #include <string.h>
 
 // Internal implementation code.
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
index 304401a50fa6..819abab579ff 100644
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -5,6 +5,7 @@
 #include "crypto/sha1.h"
 
 #include "crypto/common.h"
+
 #include <string.h>
 
 // Internal implementation code.
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp
index 99a251cb1274..72f191afcdd8 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -5,6 +5,7 @@
 #include "crypto/sha2.h"
 
 #include "crypto/common.h"
+
 #include <string.h>
 
 // Internal implementation code.
diff --git a/src/db.cpp b/src/db.cpp
index 23d2cc988db1..419b71e30d02 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -20,6 +20,7 @@
 #include <boost/filesystem.hpp>
 #include <boost/thread.hpp>
 #include <boost/version.hpp>
+
 #include <openssl/rand.h>
 
 using namespace std;
diff --git a/src/db.h b/src/db.h
index bba267b84fd4..d1df9505484b 100644
--- a/src/db.h
+++ b/src/db.h
@@ -15,12 +15,14 @@
 #include <vector>
 
 #include <boost/filesystem/path.hpp>
+
 #include <db_cxx.h>
 
-struct CBlockLocator;
 class CDiskBlockIndex;
 class COutPoint;
 
+struct CBlockLocator;
+
 extern unsigned int nWalletDBUpdated;
 
 void ThreadFlushWalletDB(const std::string& strWalletFile);
diff --git a/src/hash.h b/src/hash.h
index 98a2d1fb114a..bdcd4afb4742 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -6,8 +6,8 @@
 #ifndef BITCOIN_HASH_H
 #define BITCOIN_HASH_H
 
-#include "crypto/sha2.h"
 #include "crypto/ripemd160.h"
+#include "crypto/sha2.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "version.h"
diff --git a/src/init.cpp b/src/init.cpp
index 6e47536d38ee..a3f75d61df23 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -11,6 +11,7 @@
 
 #include "addrman.h"
 #include "checkpoints.h"
+#include "compat/sanity.h"
 #include "key.h"
 #include "main.h"
 #include "miner.h"
@@ -32,7 +33,6 @@
 #ifndef WIN32
 #include <signal.h>
 #endif
-#include "compat/sanity.h"
 
 #include <boost/algorithm/string/predicate.hpp>
 #include <boost/algorithm/string/replace.hpp>
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 452df92839ef..e2a4f286b241 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -10,6 +10,7 @@
 #include "version.h"
 
 #include <boost/filesystem/path.hpp>
+
 #include <leveldb/db.h>
 #include <leveldb/write_batch.h>
 
diff --git a/src/net.cpp b/src/net.cpp
index b18944a264f5..891772cf6258 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -48,8 +48,8 @@
 #endif
 #endif
 
-using namespace std;
 using namespace boost;
+using namespace std;
 
 namespace {
     const int MAX_OUTBOUND_CONNECTIONS = 8;
diff --git a/src/pow.h b/src/pow.h
index 2a0d9b24bb9d..5d91108ac4f5 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -8,8 +8,8 @@
 
 #include <stdint.h>
 
-class CBlockIndex;
 class CBlockHeader;
+class CBlockIndex;
 class uint256;
 
 unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock);
diff --git a/src/random.cpp b/src/random.cpp
index 22c942acc041..fb5258a4421e 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -12,10 +12,12 @@
 #include "util.h" // for LogPrint()
 #include "utilstrencodings.h" // for GetTime()
 
+#include <limits>
+
 #ifndef WIN32
 #include <sys/time.h>
 #endif
-#include <limits>
+
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 #include <openssl/rand.h>
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index a0921453cc3c..81797248b487 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -3,7 +3,6 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <set>
 #include "rpcclient.h"
 
 #include "rpcprotocol.h"
@@ -11,6 +10,7 @@
 #include "ui_interface.h"
 #include "chainparams.h" // for Params().RPCPort()
 
+#include <set>
 #include <stdint.h>
 
 using namespace std;
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index c286626fd335..dc73161bf1ee 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -7,8 +7,8 @@
 #include "init.h"
 #include "main.h"
 #include "sync.h"
-#include "utiltime.h"
 #include "util.h"
+#include "utiltime.h"
 #include "wallet.h"
 
 #include <fstream>
@@ -16,6 +16,7 @@
 
 #include <boost/algorithm/string.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
+
 #include "json/json_spirit_value.h"
 
 using namespace json_spirit;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index e4a5bc4162b8..4c80a91e1b45 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -3,14 +3,14 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "rpcserver.h"
 #include "chainparams.h"
+#include "core_io.h"
 #include "init.h"
 #include "net.h"
 #include "main.h"
 #include "miner.h"
 #include "pow.h"
-#include "core_io.h"
+#include "rpcserver.h"
 #include "util.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 2baa481c4e4d..4afbe442eee0 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -13,6 +13,7 @@
 #include "util.h"
 
 #include <boost/foreach.hpp>
+
 #include "json/json_spirit_value.h"
 
 using namespace json_spirit;
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index 808b9bbd2a73..c99d113bc39d 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -5,8 +5,8 @@
 
 #include "rpcprotocol.h"
 
-#include "util.h"
 #include "tinyformat.h"
+#include "util.h"
 #include "utilstrencodings.h"
 #include "utiltime.h"
 #include "version.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index c5c99870fc2e..3c89be078d03 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -12,8 +12,8 @@
 #include "net.h"
 #include "rpcserver.h"
 #include "script/script.h"
-#include "script/standard.h"
 #include "script/sign.h"
+#include "script/standard.h"
 #include "uint256.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
@@ -25,10 +25,10 @@
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_value.h"
 
-using namespace std;
 using namespace boost;
 using namespace boost::assign;
 using namespace json_spirit;
+using namespace std;
 
 void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex)
 {
diff --git a/src/serialize.h b/src/serialize.h
index dba3460d1bff..57f5fd069b30 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -10,8 +10,8 @@
 
 #include <algorithm>
 #include <assert.h>
-#include <limits>
 #include <ios>
+#include <limits>
 #include <map>
 #include <set>
 #include <stdint.h>
diff --git a/src/sync.cpp b/src/sync.cpp
index 066c1ca7446d..d424f7bc95ee 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -7,9 +7,10 @@
 #include "util.h"
 #include "utilstrencodings.h"
 
+#include <stdio.h>
+
 #include <boost/foreach.hpp>
 #include <boost/thread.hpp>
-#include <stdio.h>
 
 #ifdef DEBUG_LOCKCONTENTION
 void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
diff --git a/src/timedata.h b/src/timedata.h
index 9cc47bec13ff..155f6872daa2 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -5,10 +5,10 @@
 #ifndef BITCOIN_TIMEDATA_H
 #define BITCOIN_TIMEDATA_H
 
-#include <stdint.h>
-#include <vector>
 #include <algorithm>
 #include <assert.h>
+#include <stdint.h>
+#include <vector>
 
 class CNetAddr;
 
diff --git a/src/txdb.cpp b/src/txdb.cpp
index d4c600755865..79838b6116e9 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -9,9 +9,10 @@
 #include "pow.h"
 #include "uint256.h"
 
-#include <boost/thread.hpp>
 #include <stdint.h>
 
+#include <boost/thread.hpp>
+
 using namespace std;
 
 void static BatchWriteCoins(CLevelDBBatch &batch, const uint256 &hash, const CCoins &coins) {
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 6bbadc834508..50e6fed2ad35 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -3,8 +3,9 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core.h"
 #include "txmempool.h"
+
+#include "core.h"
 #include "util.h"
 
 #include <boost/circular_buffer.hpp>
@@ -644,4 +645,3 @@ bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const {
 bool CCoinsViewMemPool::HaveCoins(const uint256 &txid) const {
     return mempool.exists(txid) || base->HaveCoins(txid);
 }
-
diff --git a/src/uint256.h b/src/uint256.h
index 6bb9a5940047..28de54022665 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -7,10 +7,10 @@
 #define BITCOIN_UINT256_H
 
 #include <assert.h>
+#include <cstring>
 #include <stdexcept>
 #include <stdint.h>
 #include <string>
-#include <cstring>
 #include <vector>
 
 class uint_error : public std::runtime_error {
diff --git a/src/util.h b/src/util.h
index 6e1f439ff740..e72c99adc774 100644
--- a/src/util.h
+++ b/src/util.h
@@ -15,8 +15,8 @@
 #endif
 
 #include "compat.h"
-#include "utiltime.h"
 #include "tinyformat.h"
+#include "utiltime.h"
 
 #include <exception>
 #include <map>
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index ef1355510420..6837e4e26749 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -7,10 +7,11 @@
 
 #include "tinyformat.h"
 
-#include <boost/foreach.hpp>
 #include <errno.h>
 #include <limits>
 
+#include <boost/foreach.hpp>
+
 using namespace std;
 
 // safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
diff --git a/src/version.cpp b/src/version.cpp
index 8311041ed282..e441cc463f32 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -7,6 +7,7 @@
 #include "tinyformat.h"
 
 #include <string>
+
 #include <boost/algorithm/string/join.hpp>
 
 // Name of client reported in the 'version' message. Report the same name
diff --git a/src/wallet.h b/src/wallet.h
index 5c2618673011..3461446b8bb6 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -11,8 +11,8 @@
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
-#include "wallet_ismine.h"
 #include "ui_interface.h"
+#include "wallet_ismine.h"
 #include "walletdb.h"
 
 #include <algorithm>
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 48045b98c858..03161250dbbe 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -9,8 +9,8 @@
 #include "protocol.h"
 #include "serialize.h"
 #include "sync.h"
-#include "utiltime.h"
 #include "util.h"
+#include "utiltime.h"
 #include "wallet.h"
 
 #include <boost/filesystem.hpp>

From 21b7addc9bee35349d5f26b7e752d4d231d7ca1a Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 15 Sep 2014 07:41:53 +0000
Subject: [PATCH 0697/1819] Bugfix: Add missing equals-sign to Travis config

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 379a0e1df794..7580adf5c4e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,7 +25,7 @@ matrix:
   fast_finish: true
   include:
     - compiler: "true 1"
-      env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG"--enable-glibc-back-compat"
+      env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 2"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 3"

From ec91092df8f70c4abef6bbb3c4dec6d9511405fe Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Fri, 5 Sep 2014 11:37:01 -0400
Subject: [PATCH 0698/1819] Fixing compiler warning C4101

Github-Pull: #4856
---
 src/core_read.cpp         | 2 +-
 src/db.h                  | 2 +-
 src/leveldbwrapper.h      | 2 +-
 src/main.cpp              | 2 +-
 src/net.cpp               | 2 +-
 src/rpcmining.cpp         | 2 +-
 src/rpcrawtransaction.cpp | 2 +-
 src/rpcserver.cpp         | 2 +-
 src/txmempool.cpp         | 4 ++--
 9 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/core_read.cpp b/src/core_read.cpp
index efcecb106ff6..179d3514a493 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -97,7 +97,7 @@ bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
     try {
         ssData >> tx;
     }
-    catch (std::exception &e) {
+    catch (const std::exception &) {
         return false;
     }
 
diff --git a/src/db.h b/src/db.h
index bba267b84fd4..0a8c8537e825 100644
--- a/src/db.h
+++ b/src/db.h
@@ -129,7 +129,7 @@ class CDB
             CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION);
             ssValue >> value;
         }
-        catch (std::exception &e) {
+        catch (const std::exception &) {
             return false;
         }
 
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 452df92839ef..95a22219db10 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -99,7 +99,7 @@ class CLevelDBWrapper
         try {
             CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), SER_DISK, CLIENT_VERSION);
             ssValue >> value;
-        } catch(std::exception &e) {
+        } catch(const std::exception &) {
             return false;
         }
         return true;
diff --git a/src/main.cpp b/src/main.cpp
index 02d4bfa8a03b..1b746a0b089e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3163,7 +3163,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                 blkdat >> nSize;
                 if (nSize < 80 || nSize > MAX_BLOCK_SIZE)
                     continue;
-            } catch (std::exception &e) {
+            } catch (const std::exception &) {
                 // no valid block header found; don't complain
                 break;
             }
diff --git a/src/net.cpp b/src/net.cpp
index b18944a264f5..a4bafe591483 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -689,7 +689,7 @@ int CNetMessage::readHeader(const char *pch, unsigned int nBytes)
     try {
         hdrbuf >> hdr;
     }
-    catch (std::exception &e) {
+    catch (const std::exception &) {
         return -1;
     }
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index e4a5bc4162b8..1613f04708c0 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -553,7 +553,7 @@ Value submitblock(const Array& params, bool fHelp)
     try {
         ssBlock >> pblock;
     }
-    catch (std::exception &e) {
+    catch (const std::exception &) {
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
     }
 
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index c5c99870fc2e..cf19c277d8ce 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -543,7 +543,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
             ssData >> tx;
             txVariants.push_back(tx);
         }
-        catch (std::exception &e) {
+        catch (const std::exception &) {
             throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
         }
     }
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c9133bd3d272..190de622827e 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -628,7 +628,7 @@ void StartRPCThreads()
             try {
                 vEndpoints.push_back(ParseEndpoint(addr, defaultPort));
             }
-            catch(boost::system::system_error &e)
+            catch(const boost::system::system_error &)
             {
                 uiInterface.ThreadSafeMessageBox(
                     strprintf(_("Could not parse -rpcbind value %s as network address"), addr),
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 119509ae3c23..e538645e1747 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -574,7 +574,7 @@ CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const
         fileout << CLIENT_VERSION; // version that wrote the file
         minerPolicyEstimator->Write(fileout);
     }
-    catch (std::exception &e) {
+    catch (const std::exception &) {
         LogPrintf("CTxMemPool::WriteFeeEstimates() : unable to write policy estimator data (non-fatal)");
         return false;
     }
@@ -593,7 +593,7 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
         LOCK(cs);
         minerPolicyEstimator->Read(filein, minRelayFee);
     }
-    catch (std::exception &e) {
+    catch (const std::exception &) {
         LogPrintf("CTxMemPool::ReadFeeEstimates() : unable to read policy estimator data (non-fatal)");
         return false;
     }

From f7e36370f36ca806076cdcf0cd3ed0c35fd38c42 Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Mon, 15 Sep 2014 09:56:10 -0400
Subject: [PATCH 0699/1819] Eliminate extra assignment

---
 src/main.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0816e36633fc..7242c3ab5c27 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2795,8 +2795,7 @@ FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly) {
 
 boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix)
 {
-    boost::filesystem::path path = GetDataDir() / "blocks" / strprintf("%s%05u.dat", prefix, pos.nFile);
-    return path;  
+    return GetDataDir() / "blocks" / strprintf("%s%05u.dat", prefix, pos.nFile);
 }
 
 CBlockIndex * InsertBlockIndex(uint256 hash)

From ee304b6e355ac324f4054e7672d5f8e6b8eb44e9 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 16 Sep 2014 09:00:36 +0200
Subject: [PATCH 0700/1819] minor changes for help message of getpeerinfo

---
 src/rpcnet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 4afbe442eee0..52f98fbf0043 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -95,8 +95,8 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"subver\": \"/Satoshi:0.8.5/\",  (string) The string version\n"
             "    \"inbound\": true|false,     (boolean) Inbound (true) or Outbound (false)\n"
             "    \"startingheight\": n,       (numeric) The starting height (block) of the peer\n"
-            "    \"banscore\": n,              (numeric) The ban score (stats.nMisbehavior)\n"
-            "    \"syncnode\" : true|false     (booleamn) if sync node\n"
+            "    \"banscore\": n,             (numeric) The ban score\n"
+            "    \"syncnode\": true|false     (booleamn) if sync node\n"
             "  }\n"
             "  ,...\n"
             "]\n"

From e9992fb6453209e93dee0f886fc8e3fe39ef89d4 Mon Sep 17 00:00:00 2001
From: imharrywu <imharrywu@users.noreply.github.com>
Date: Tue, 16 Sep 2014 15:53:04 +0800
Subject: [PATCH 0701/1819] remove include of chainparams.h

chainparams.h has not been used in this cpp file already, consider to remove it for clean.
---
 src/rpcclient.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 81797248b487..0279cd76ec71 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -8,7 +8,6 @@
 #include "rpcprotocol.h"
 #include "util.h"
 #include "ui_interface.h"
-#include "chainparams.h" // for Params().RPCPort()
 
 #include <set>
 #include <stdint.h>

From 52a5f903605760f54370863679740f5ac0354f13 Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Sun, 14 Sep 2014 11:09:25 +1200
Subject: [PATCH 0702/1819] Create the common location for all m4 autotool
 build scripts, build-aux/m4.

Update .gitignore.
---
 .gitignore                                    | 23 +++++---
 Makefile.am                                   |  2 +-
 {src => build-aux}/m4/ax_boost_base.m4        |  0
 {src => build-aux}/m4/ax_boost_chrono.m4      |  0
 {src => build-aux}/m4/ax_boost_filesystem.m4  |  0
 .../m4/ax_boost_program_options.m4            |  0
 {src => build-aux}/m4/ax_boost_system.m4      |  0
 {src => build-aux}/m4/ax_boost_thread.m4      |  0
 .../m4/ax_boost_unit_test_framework.m4        |  0
 .../m4/ax_check_compile_flag.m4               |  0
 {src => build-aux}/m4/ax_check_link_flag.m4   |  0
 .../m4/ax_check_preproc_flag.m4               |  0
 {src => build-aux}/m4/ax_pthread.m4           |  0
 {src => build-aux}/m4/bitcoin_find_bdb48.m4   |  0
 {src => build-aux}/m4/bitcoin_qt.m4           |  0
 .../m4/bitcoin_subdir_to_include.m4           |  0
 configure.ac                                  | 52 +++++++++----------
 17 files changed, 42 insertions(+), 35 deletions(-)
 rename {src => build-aux}/m4/ax_boost_base.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_chrono.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_filesystem.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_program_options.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_system.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_thread.m4 (100%)
 rename {src => build-aux}/m4/ax_boost_unit_test_framework.m4 (100%)
 rename {src => build-aux}/m4/ax_check_compile_flag.m4 (100%)
 rename {src => build-aux}/m4/ax_check_link_flag.m4 (100%)
 rename {src => build-aux}/m4/ax_check_preproc_flag.m4 (100%)
 rename {src => build-aux}/m4/ax_pthread.m4 (100%)
 rename {src => build-aux}/m4/bitcoin_find_bdb48.m4 (100%)
 rename {src => build-aux}/m4/bitcoin_qt.m4 (100%)
 rename {src => build-aux}/m4/bitcoin_subdir_to_include.m4 (100%)

diff --git a/.gitignore b/.gitignore
index 24af4cb72e4e..7d00051f2302 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,25 +8,32 @@ src/bitcoin-tx
 src/test/test_bitcoin
 src/qt/test/test_bitcoin-qt
 
+# autoreconf
 Makefile.in
 aclocal.m4
 autom4te.cache/
+build-aux/config.guess
+build-aux/config.sub
+build-aux/depcomp
+build-aux/install-sh
+build-aux/ltmain.sh
+build-aux/m4/libtool.m4
+build-aux/m4/lt~obsolete.m4
+build-aux/m4/ltoptions.m4
+build-aux/m4/ltsugar.m4
+build-aux/m4/ltversion.m4
+build-aux/missing
+build-aux/compile
+build-aux/test-driver
 config.log
 config.status
 configure
+libtool
 src/config/bitcoin-config.h
 src/config/bitcoin-config.h.in
 src/config/stamp-h1
-src/build-aux/
 share/setup.nsi
 share/qt/Info.plist
-# Libtool
-libtool
-src/m4/libtool.m4
-src/m4/ltoptions.m4
-src/m4/ltsugar.m4
-src/m4/ltversion.m4
-src/m4/lt~obsolete.m4
 
 src/univalue/gen
 
diff --git a/Makefile.am b/Makefile.am
index a64666a32b38..fe7244edf82c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-ACLOCAL_AMFLAGS = -I src/m4
+ACLOCAL_AMFLAGS = -I build-aux/m4
 SUBDIRS = src
 .PHONY: deploy FORCE
 
diff --git a/src/m4/ax_boost_base.m4 b/build-aux/m4/ax_boost_base.m4
similarity index 100%
rename from src/m4/ax_boost_base.m4
rename to build-aux/m4/ax_boost_base.m4
diff --git a/src/m4/ax_boost_chrono.m4 b/build-aux/m4/ax_boost_chrono.m4
similarity index 100%
rename from src/m4/ax_boost_chrono.m4
rename to build-aux/m4/ax_boost_chrono.m4
diff --git a/src/m4/ax_boost_filesystem.m4 b/build-aux/m4/ax_boost_filesystem.m4
similarity index 100%
rename from src/m4/ax_boost_filesystem.m4
rename to build-aux/m4/ax_boost_filesystem.m4
diff --git a/src/m4/ax_boost_program_options.m4 b/build-aux/m4/ax_boost_program_options.m4
similarity index 100%
rename from src/m4/ax_boost_program_options.m4
rename to build-aux/m4/ax_boost_program_options.m4
diff --git a/src/m4/ax_boost_system.m4 b/build-aux/m4/ax_boost_system.m4
similarity index 100%
rename from src/m4/ax_boost_system.m4
rename to build-aux/m4/ax_boost_system.m4
diff --git a/src/m4/ax_boost_thread.m4 b/build-aux/m4/ax_boost_thread.m4
similarity index 100%
rename from src/m4/ax_boost_thread.m4
rename to build-aux/m4/ax_boost_thread.m4
diff --git a/src/m4/ax_boost_unit_test_framework.m4 b/build-aux/m4/ax_boost_unit_test_framework.m4
similarity index 100%
rename from src/m4/ax_boost_unit_test_framework.m4
rename to build-aux/m4/ax_boost_unit_test_framework.m4
diff --git a/src/m4/ax_check_compile_flag.m4 b/build-aux/m4/ax_check_compile_flag.m4
similarity index 100%
rename from src/m4/ax_check_compile_flag.m4
rename to build-aux/m4/ax_check_compile_flag.m4
diff --git a/src/m4/ax_check_link_flag.m4 b/build-aux/m4/ax_check_link_flag.m4
similarity index 100%
rename from src/m4/ax_check_link_flag.m4
rename to build-aux/m4/ax_check_link_flag.m4
diff --git a/src/m4/ax_check_preproc_flag.m4 b/build-aux/m4/ax_check_preproc_flag.m4
similarity index 100%
rename from src/m4/ax_check_preproc_flag.m4
rename to build-aux/m4/ax_check_preproc_flag.m4
diff --git a/src/m4/ax_pthread.m4 b/build-aux/m4/ax_pthread.m4
similarity index 100%
rename from src/m4/ax_pthread.m4
rename to build-aux/m4/ax_pthread.m4
diff --git a/src/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4
similarity index 100%
rename from src/m4/bitcoin_find_bdb48.m4
rename to build-aux/m4/bitcoin_find_bdb48.m4
diff --git a/src/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
similarity index 100%
rename from src/m4/bitcoin_qt.m4
rename to build-aux/m4/bitcoin_qt.m4
diff --git a/src/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4
similarity index 100%
rename from src/m4/bitcoin_subdir_to_include.m4
rename to build-aux/m4/bitcoin_subdir_to_include.m4
diff --git a/configure.ac b/configure.ac
index 6dc71292dfd7..7d525f8251c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,8 +7,8 @@ define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, false)
 define(_COPYRIGHT_YEAR, 2014)
 AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
-AC_CONFIG_AUX_DIR([src/build-aux])
-AC_CONFIG_MACRO_DIR([src/m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([build-aux/m4])
 LT_INIT([disable-shared])
 AC_CANONICAL_HOST
 AH_TOP([#ifndef BITCOIN_CONFIG_H])
@@ -44,6 +44,30 @@ AM_MAINTAINER_MODE([enable])
 dnl make the compilation flags quiet unless V=1 is used
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+dnl Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXXCPP
+AC_PROG_INSTALL
+AC_PROG_OBJC
+AC_PROG_LN_S
+m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
+AC_PROG_MKDIR_P
+AC_PROG_SED
+AC_PATH_TOOL(AR, ar)
+AC_PATH_TOOL(RANLIB, ranlib)
+AC_PATH_TOOL(STRIP, strip)
+AC_PATH_TOOL(GCOV, gcov)
+AC_PATH_PROG(LCOV, lcov)
+AC_PATH_PROG(JAVA, java)
+AC_PATH_PROG(GENHTML, genhtml)
+AC_PATH_PROG([GIT], [git])
+AC_PATH_PROG(CCACHE,ccache)
+AC_PATH_PROG(XGETTEXT,xgettext)
+AC_PATH_PROG(HEXDUMP,hexdump)
+PKG_PROG_PKG_CONFIG
+
 # Enable wallet
 AC_ARG_ENABLE([wallet],
   [AS_HELP_STRING([--enable-wallet],
@@ -120,30 +144,6 @@ AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[spec
 AC_CONFIG_SRCDIR([src])
 AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
 
-dnl Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXXCPP
-AC_PROG_INSTALL
-AC_PROG_OBJC
-AC_PROG_LN_S
-m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
-AC_PROG_MKDIR_P
-AC_PROG_SED
-AC_PATH_TOOL(AR, ar)
-AC_PATH_TOOL(RANLIB, ranlib)
-AC_PATH_TOOL(STRIP, strip)
-AC_PATH_TOOL(GCOV, gcov)
-AC_PATH_PROG(LCOV, lcov)
-AC_PATH_PROG(JAVA, java)
-AC_PATH_PROG(GENHTML, genhtml)
-AC_PATH_PROG([GIT], [git])
-AC_PATH_PROG(CCACHE,ccache)
-AC_PATH_PROG(XGETTEXT,xgettext)
-AC_PATH_PROG(HEXDUMP,hexdump)
-PKG_PROG_PKG_CONFIG
-
 # Enable debug 
 AC_ARG_ENABLE([debug],
     [AS_HELP_STRING([--enable-debug],

From 57e1716de6a6deba23ad8c4152cc0a32a4974c41 Mon Sep 17 00:00:00 2001
From: Benedict Chan <bencxr@fragnetics.com>
Date: Sun, 7 Sep 2014 12:37:13 +0000
Subject: [PATCH 0703/1819] update rpc help message for gettransaction to add
 includeWatchonly param

---
 src/rpcwallet.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 997b861e59c4..9e345d74fa90 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1490,7 +1490,7 @@ Value gettransaction(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() < 1 || params.size() > 2)
         throw runtime_error(
-            "gettransaction \"txid\"\n"
+            "gettransaction \"txid\" ( includeWatchonly )\n"
             "\nGet detailed information about in-wallet transaction <txid>\n"
             "\nArguments:\n"
             "1. \"txid\"    (string, required) The transaction id\n"
@@ -1520,6 +1520,7 @@ Value gettransaction(const Array& params, bool fHelp)
 
             "\nExamples:\n"
             + HelpExampleCli("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
+            + HelpExampleCli("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true")
             + HelpExampleRpc("gettransaction", "\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
         );
 

From 1a613963e1567fd6102e783422cc6cad672dd1a5 Mon Sep 17 00:00:00 2001
From: Benedict Chan <bencxr@fragnetics.com>
Date: Sun, 7 Sep 2014 12:38:42 +0000
Subject: [PATCH 0704/1819] fix missing gettransaction entries in rpcclient

---
 src/rpcclient.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 81797248b487..05e54dcbf641 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -67,6 +67,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listunspent", 1 },
     { "listunspent", 2 },
     { "getblock", 1 },
+    { "gettransaction", 1 },
     { "getrawtransaction", 1 },
     { "createrawtransaction", 0 },
     { "createrawtransaction", 1 },

From e54381117a86f51a129056b18ad7f48967bdcf3a Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Tue, 26 Aug 2014 21:39:32 +1200
Subject: [PATCH 0705/1819] Add warnings for autogen.sh. Fix AC_CONFIG_SRCDIR.

---
 autogen.sh   | 2 +-
 configure.ac | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 50b85bcba063..ddfc09607e16 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,4 +5,4 @@ cd "$srcdir"
 if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
   export LIBTOOLIZE="${GLIBTOOLIZE}"
 fi
-autoreconf --install --force
+autoreconf --install --force --warnings=all
diff --git a/configure.ac b/configure.ac
index 7d525f8251c7..9c7a53819e0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7,6 +7,8 @@ define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, false)
 define(_COPYRIGHT_YEAR, 2014)
 AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
+AC_CONFIG_SRCDIR([src/main.cpp])
+AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([build-aux/m4])
 LT_INIT([disable-shared])
@@ -140,10 +142,6 @@ AC_ARG_ENABLE([glibc-back-compat],
 
 AC_ARG_WITH([protoc-bindir],[AS_HELP_STRING([--with-protoc-bindir=BIN_DIR],[specify protoc bin path])], [protoc_bin_path=$withval], [])
 
-
-AC_CONFIG_SRCDIR([src])
-AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
-
 # Enable debug 
 AC_ARG_ENABLE([debug],
     [AS_HELP_STRING([--enable-debug],

From e2a98d270d511711111a54f350c25733bc15a5b2 Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Wed, 27 Aug 2014 09:25:33 +1200
Subject: [PATCH 0706/1819] Update obsolete AC macros.

---
 build-aux/m4/bitcoin_find_bdb48.m4 | 14 +++++++-------
 build-aux/m4/bitcoin_qt.m4         | 28 ++++++++++++++--------------
 configure.ac                       | 20 ++++++++++----------
 3 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/bitcoin_find_bdb48.m4
index 5223163fe5e7..f3b14461eb9e 100644
--- a/build-aux/m4/bitcoin_find_bdb48.m4
+++ b/build-aux/m4/bitcoin_find_bdb48.m4
@@ -12,29 +12,29 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
   done
   for searchpath in $bdbdirlist ''; do
     test -n "${searchpath}" && searchpath="${searchpath}/"
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       #include <${searchpath}db_cxx.h>
-    ],[
+    ]],[[
       #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4)
         #error "failed to find bdb 4.8+"
       #endif
-    ],[
+    ]])],[
       if test "x$bdbpath" = "xX"; then
         bdbpath="${searchpath}"
       fi
     ],[
       continue
     ])
-    AC_TRY_COMPILE([
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       #include <${searchpath}db_cxx.h>
-    ],[
+    ]],[[
       #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)
         #error "failed to find bdb 4.8"
       #endif
-    ],[
+    ]])],[
       bdb48path="${searchpath}"
       break
-    ])
+    ],[])
   done
   if test "x$bdbpath" = "xX"; then
     AC_MSG_RESULT([no])
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index e141033b19a1..edfde4cd7978 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -217,17 +217,17 @@ dnl Requires: INCLUDES must be populated as necessary.
 dnl Output: bitcoin_cv_qt5=yes|no
 AC_DEFUN([_BITCOIN_QT_CHECK_QT5],[
   AC_CACHE_CHECK(for Qt 5, bitcoin_cv_qt5,[
-  AC_TRY_COMPILE(
-    [#include <QtCore>],
-    [
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[#include <QtCore>]],
+    [[
       #if QT_VERSION < 0x050000
       choke me
       #else
       return 0;
       #endif
-    ],
-    bitcoin_cv_qt5=yes,
-    bitcoin_cv_qt5=no)
+    ]])],
+    [bitcoin_cv_qt5=yes],
+    [bitcoin_cv_qt5=no])
 ])])
 
 dnl Internal. Check if the linked version of Qt was built as static libs.
@@ -237,15 +237,15 @@ dnl Output: bitcoin_cv_static_qt=yes|no
 dnl Output: Defines QT_STATICPLUGIN if plugins are static.
 AC_DEFUN([_BITCOIN_QT_IS_STATIC],[
   AC_CACHE_CHECK(for static Qt, bitcoin_cv_static_qt,[
-  AC_TRY_COMPILE(
-    [#include <QtCore>],
-    [
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[#include <QtCore>]],
+    [[
       #if defined(QT_STATIC)
       return 0;
       #else
       choke me
       #endif
-    ],
+    ]])],
     [bitcoin_cv_static_qt=yes],
     [bitcoin_cv_static_qt=no])
   ])
@@ -263,13 +263,13 @@ AC_DEFUN([_BITCOIN_QT_CHECK_STATIC_PLUGINS],[
   AC_MSG_CHECKING(for static Qt plugins: $2)
   CHECK_STATIC_PLUGINS_TEMP_LIBS="$LIBS"
   LIBS="$2 $QT_LIBS $LIBS"
-  AC_TRY_LINK([
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([[
     #define QT_STATICPLUGIN
     #include <QtPlugin>
-    $1],
-    [return 0;],
+    $1]],
+    [[return 0;]])],
     [AC_MSG_RESULT(yes); QT_LIBS="$2 $QT_LIBS"],
-    [AC_MSG_RESULT(no)]; BITCOIN_QT_FAIL(Could not resolve: $2))
+    [AC_MSG_RESULT(no); BITCOIN_QT_FAIL(Could not resolve: $2)])
   LIBS="$CHECK_STATIC_PLUGINS_TEMP_LIBS"
 ])
 
diff --git a/configure.ac b/configure.ac
index 9c7a53819e0f..0f9e78b74fbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,12 +335,12 @@ if test x$use_glibc_compat != xno; then
   #__fdelt_chk's params and return type have changed from long unsigned int to long int.
   # See which one is present here.
   AC_MSG_CHECKING(__fdelt_chk type)
-  AC_TRY_COMPILE([#ifdef _FORTIFY_SOURCE
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef _FORTIFY_SOURCE
                     #undef _FORTIFY_SOURCE
                   #endif
                   #define _FORTIFY_SOURCE 2
                   #include <sys/select.h>
-     extern "C" long unsigned int __fdelt_warn(long unsigned int);],[],
+     extern "C" long unsigned int __fdelt_warn(long unsigned int);]],[[]])],
     [ fdelt_type="long unsigned int"],
     [ fdelt_type="long int"])
   AC_MSG_RESULT($fdelt_type)
@@ -392,8 +392,8 @@ AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, h
 
 dnl Check for MSG_NOSIGNAL
 AC_MSG_CHECKING(for MSG_NOSIGNAL)
-AC_TRY_COMPILE([#include <sys/socket.h>],
- [ int f = MSG_NOSIGNAL; ],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+ [[ int f = MSG_NOSIGNAL; ]])],
  [ AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MSG_NOSIGNAL, 1,[Define this symbol if you have MSG_NOSIGNAL]) ],
  [ AC_MSG_RESULT(no)]
 )
@@ -535,16 +535,16 @@ TEMP_LIBS="$LIBS"
 LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB $LIBS"
 TEMP_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
   #include <boost/thread/thread.hpp>
   #include <boost/version.hpp>
-  ],[
+  ]],[[
   #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
       boost::this_thread::sleep_for(boost::chrono::milliseconds(0));
   #else
    choke me
   #endif
-  ],
+  ]])],
   [boost_sleep=yes; BOOST_LIBS="$BOOST_LIBS $BOOST_CHRONO_LIB";
      AC_DEFINE(HAVE_WORKING_BOOST_SLEEP_FOR, 1, [Define this symbol if boost sleep_for works])],
   [boost_sleep=no])
@@ -557,17 +557,17 @@ TEMP_LIBS="$LIBS"
 LIBS="$BOOST_LIBS $LIBS"
 TEMP_CPPFLAGS="$CPPFLAGS"
 CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
-AC_TRY_LINK([
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
   #include <boost/version.hpp>
   #include <boost/thread.hpp>
   #include <boost/date_time/posix_time/posix_time_types.hpp>
-  ],[
+  ]],[[
   #if BOOST_VERSION <= 105600
       boost::this_thread::sleep(boost::posix_time::milliseconds(0));
   #else
    choke me
   #endif
-  ],
+  ]])],
   [boost_sleep=yes; AC_DEFINE(HAVE_WORKING_BOOST_SLEEP, 1, [Define this symbol if boost sleep works])],
   [boost_sleep=no])
 LIBS="$TEMP_LIBS"

From f4fe20503433032e08cfa2133ce799a4c3d27d61 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 16 Sep 2014 10:28:53 +0200
Subject: [PATCH 0707/1819] add nModSize init to default constructor of
 CTxMemPoolEntry

---
 src/txmempool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 404cca23730a..52d07bf6a08c 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -13,7 +13,7 @@
 using namespace std;
 
 CTxMemPoolEntry::CTxMemPoolEntry():
-    nFee(0), nTxSize(0), nTime(0), dPriority(0.0)
+    nFee(0), nTxSize(0), nModSize(0), nTime(0), dPriority(0.0)
 {
     nHeight = MEMPOOL_HEIGHT;
 }

From 0be990ba34110184c8a5a2c04094311dab5cd84c Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 11 Sep 2014 19:15:29 +0200
Subject: [PATCH 0708/1819] Move CTxDestination from script/script to
 script/standard

---
 src/base58.h                   |  1 +
 src/bitcoin-tx.cpp             |  5 ++--
 src/qt/guiutil.cpp             |  4 ++-
 src/qt/paymentserver.cpp       |  4 +--
 src/qt/walletmodel.cpp         |  3 +--
 src/rpcdump.cpp                |  4 ++-
 src/rpcmisc.cpp                |  3 +--
 src/rpcrawtransaction.cpp      |  3 +--
 src/rpcwallet.cpp              |  9 +++----
 src/script/script.cpp          | 40 -----------------------------
 src/script/script.h            | 17 ------------
 src/script/standard.cpp        | 47 ++++++++++++++++++++++++++++++++++
 src/script/standard.h          | 17 ++++++++++++
 src/test/DoS_tests.cpp         |  6 ++---
 src/test/miner_tests.cpp       |  2 +-
 src/test/script_P2SH_tests.cpp | 45 +++++++++++++++-----------------
 src/test/script_tests.cpp      |  6 ++---
 src/test/sigopcount_tests.cpp  |  9 +++----
 src/test/transaction_tests.cpp |  6 ++---
 src/wallet.cpp                 |  7 +++--
 src/wallet_ismine.cpp          |  3 +--
 src/wallet_ismine.h            |  3 ++-
 22 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/src/base58.h b/src/base58.h
index 15bf710f5e44..c5e230c72ef9 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -17,6 +17,7 @@
 #include "chainparams.h"
 #include "key.h"
 #include "script/script.h"
+#include "script/standard.h"
 
 #include <string>
 #include <vector>
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 354d6ba41d9d..6445042f9cba 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -224,9 +224,8 @@ static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
     if (!addr.IsValid())
         throw runtime_error("invalid TX output address");
 
-    // build standard output script via SetDestination()
-    CScript scriptPubKey;
-    scriptPubKey.SetDestination(addr.Get());
+    // build standard output script via GetScriptForDestination()
+    CScript scriptPubKey = GetScriptForDestination(addr.Get());
 
     // construct TxOut, append to transaction output list
     CTxOut txout(value, scriptPubKey);
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 304177ee119f..fc22871a6b04 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -13,6 +13,8 @@
 #include "init.h"
 #include "main.h"
 #include "protocol.h"
+#include "script/script.h"
+#include "script/standard.h"
 #include "util.h"
 
 #ifdef WIN32
@@ -222,7 +224,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
 bool isDust(const QString& address, qint64 amount)
 {
     CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
-    CScript script; script.SetDestination(dest);
+    CScript script = GetScriptForDestination(dest);
     CTxOut txOut(amount, script);
     return txOut.IsDust(::minRelayTxFee);
 }
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 219a685faf40..cc4478f39f1b 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -609,7 +609,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
     std::string strAccount = account.toStdString();
     set<CTxDestination> refundAddresses = wallet->GetAccountAddresses(strAccount);
     if (!refundAddresses.empty()) {
-        CScript s; s.SetDestination(*refundAddresses.begin());
+        CScript s = GetScriptForDestination(*refundAddresses.begin());
         payments::Output* refund_to = payment.add_refund_to();
         refund_to->set_script(&s[0], s.size());
     }
@@ -620,7 +620,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
             CKeyID keyID = newKey.GetID();
             wallet->SetAddressBook(keyID, strAccount, "refund");
 
-            CScript s; s.SetDestination(keyID);
+            CScript s = GetScriptForDestination(keyID);
             payments::Output* refund_to = payment.add_refund_to();
             refund_to->set_script(&s[0], s.size());
         }
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 8d2c2e96d88c..ed90914ba7fd 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -241,8 +241,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
             setAddress.insert(rcp.address);
             ++nAddresses;
 
-            CScript scriptPubKey;
-            scriptPubKey.SetDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
+            CScript scriptPubKey = GetScriptForDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
             vecSend.push_back(std::pair<CScript, int64_t>(scriptPubKey, rcp.amount));
 
             total += rcp.amount;
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index dc73161bf1ee..1ac7024550c6 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -6,6 +6,8 @@
 #include "rpcserver.h"
 #include "init.h"
 #include "main.h"
+#include "script/script.h"
+#include "script/standard.h"
 #include "sync.h"
 #include "util.h"
 #include "utiltime.h"
@@ -161,7 +163,7 @@ Value importaddress(const Array& params, bool fHelp)
 
     CBitcoinAddress address(params[0].get_str());
     if (address.IsValid()) {
-        script.SetDestination(address.Get());
+        script = GetScriptForDestination(address.Get());
     } else if (IsHex(params[0].get_str())) {
         std::vector<unsigned char> data(ParseHex(params[0].get_str()));
         script = CScript(data.begin(), data.end());
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 917c84053605..dd45eefd58a9 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -250,8 +250,7 @@ CScript _createmultisig_redeemScript(const Array& params)
             throw runtime_error(" Invalid public key: "+ks);
         }
     }
-    CScript result;
-    result.SetMultisig(nRequired, pubkeys);
+    CScript result = GetScriptForMultisig(nRequired, pubkeys);
 
     if (result.size() > MAX_SCRIPT_ELEMENT_SIZE)
         throw runtime_error(
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 1828a5dc7dc5..b295be3b515e 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -366,8 +366,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
             throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
         setAddress.insert(address);
 
-        CScript scriptPubKey;
-        scriptPubKey.SetDestination(address.Get());
+        CScript scriptPubKey = GetScriptForDestination(address.Get());
         int64_t nAmount = AmountFromValue(s.value_);
 
         CTxOut out(nAmount, scriptPubKey);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 997b861e59c4..d9a23b23474b 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -124,8 +124,7 @@ CBitcoinAddress GetAccountAddress(string strAccount, bool bForceNew=false)
     // Check if the current key has been used
     if (account.vchPubKey.IsValid())
     {
-        CScript scriptPubKey;
-        scriptPubKey.SetDestination(account.vchPubKey.GetID());
+        CScript scriptPubKey = GetScriptForDestination(account.vchPubKey.GetID());
         for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin();
              it != pwalletMain->mapWallet.end() && account.vchPubKey.IsValid();
              ++it)
@@ -472,10 +471,9 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
 
     // Bitcoin address
     CBitcoinAddress address = CBitcoinAddress(params[0].get_str());
-    CScript scriptPubKey;
     if (!address.IsValid())
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
-    scriptPubKey.SetDestination(address.Get());
+    CScript scriptPubKey = GetScriptForDestination(address.Get());
     if (!IsMine(*pwalletMain,scriptPubKey))
         return (double)0.0;
 
@@ -849,8 +847,7 @@ Value sendmany(const Array& params, bool fHelp)
             throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, duplicated address: ")+s.name_);
         setAddress.insert(address);
 
-        CScript scriptPubKey;
-        scriptPubKey.SetDestination(address.Get());
+        CScript scriptPubKey = GetScriptForDestination(address.Get());
         int64_t nAmount = AmountFromValue(s.value_);
         totalAmount += nAmount;
 
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 3c9f38dc8b9e..a5126e7cc26f 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -253,43 +253,3 @@ bool CScript::HasCanonicalPushes() const
     }
     return true;
 }
-
-class CScriptVisitor : public boost::static_visitor<bool>
-{
-private:
-    CScript *script;
-public:
-    CScriptVisitor(CScript *scriptin) { script = scriptin; }
-
-    bool operator()(const CNoDestination &dest) const {
-        script->clear();
-        return false;
-    }
-
-    bool operator()(const CKeyID &keyID) const {
-        script->clear();
-        *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG;
-        return true;
-    }
-
-    bool operator()(const CScriptID &scriptID) const {
-        script->clear();
-        *script << OP_HASH160 << scriptID << OP_EQUAL;
-        return true;
-    }
-};
-
-void CScript::SetDestination(const CTxDestination& dest)
-{
-    boost::apply_visitor(CScriptVisitor(this), dest);
-}
-
-void CScript::SetMultisig(int nRequired, const std::vector<CPubKey>& keys)
-{
-    this->clear();
-
-    *this << EncodeOP_N(nRequired);
-    BOOST_FOREACH(const CPubKey& key, keys)
-        *this << key;
-    *this << EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
-}
diff --git a/src/script/script.h b/src/script/script.h
index 2336cafd67ea..07a4229f853a 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -320,20 +320,6 @@ inline std::string ValueString(const std::vector<unsigned char>& vch)
         return HexStr(vch);
 }
 
-class CNoDestination {
-public:
-    friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; }
-    friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
-};
-
-/** A txout script template with a specific destination. It is either:
- *  * CNoDestination: no destination set
- *  * CKeyID: TX_PUBKEYHASH destination
- *  * CScriptID: TX_SCRIPTHASH destination
- *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
- */
-typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
-
 /** Serialized script, used inside transaction inputs and outputs */
 class CScript : public std::vector<unsigned char>
 {
@@ -604,9 +590,6 @@ class CScript : public std::vector<unsigned char>
         return (size() > 0 && *begin() == OP_RETURN);
     }
 
-    void SetDestination(const CTxDestination& address);
-    void SetMultisig(int nRequired, const std::vector<CPubKey>& keys);
-
     std::string ToString() const
     {
         std::string str;
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index bda4b8b0ae03..407baf621d04 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -252,3 +252,50 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto
 
     return true;
 }
+
+namespace
+{
+class CScriptVisitor : public boost::static_visitor<bool>
+{
+private:
+    CScript *script;
+public:
+    CScriptVisitor(CScript *scriptin) { script = scriptin; }
+
+    bool operator()(const CNoDestination &dest) const {
+        script->clear();
+        return false;
+    }
+
+    bool operator()(const CKeyID &keyID) const {
+        script->clear();
+        *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG;
+        return true;
+    }
+
+    bool operator()(const CScriptID &scriptID) const {
+        script->clear();
+        *script << OP_HASH160 << scriptID << OP_EQUAL;
+        return true;
+    }
+};
+}
+
+CScript GetScriptForDestination(const CTxDestination& dest)
+{
+    CScript script;
+
+    boost::apply_visitor(CScriptVisitor(&script), dest);
+    return script;
+}
+
+CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys)
+{
+    CScript script;
+
+    script << CScript::EncodeOP_N(nRequired);
+    BOOST_FOREACH(const CPubKey& key, keys)
+        script << key;
+    script << CScript::EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
+    return script;
+}
diff --git a/src/script/standard.h b/src/script/standard.h
index 6c17a9394e5a..ead79b82a23d 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -45,6 +45,20 @@ enum txnouttype
     TX_NULL_DATA,
 };
 
+class CNoDestination {
+public:
+    friend bool operator==(const CNoDestination &a, const CNoDestination &b) { return true; }
+    friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
+};
+
+/** A txout script template with a specific destination. It is either:
+ *  * CNoDestination: no destination set
+ *  * CKeyID: TX_PUBKEYHASH destination
+ *  * CScriptID: TX_SCRIPTHASH destination
+ *  A CTxDestination is the internal data type encoded in a CBitcoinAddress
+ */
+typedef boost::variant<CNoDestination, CKeyID, CScriptID> CTxDestination;
+
 const char* GetTxnOutputType(txnouttype t);
 
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
@@ -53,4 +67,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType);
 bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet);
 bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<CTxDestination>& addressRet, int& nRequiredRet);
 
+CScript GetScriptForDestination(const CTxDestination& dest);
+CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys);
+
 #endif // H_BITCOIN_SCRIPT_STANDARD
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index e01967481686..af01e5518cec 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         tx.vin[0].scriptSig << OP_1;
         tx.vout.resize(1);
         tx.vout[0].nValue = 1*CENT;
-        tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
+        tx.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
 
         AddOrphanTx(tx, i);
     }
@@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         tx.vin[0].prevout.hash = txPrev.GetHash();
         tx.vout.resize(1);
         tx.vout[0].nValue = 1*CENT;
-        tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
+        tx.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
         SignSignature(keystore, txPrev, tx, 0);
 
         AddOrphanTx(tx, i);
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
         CMutableTransaction tx;
         tx.vout.resize(1);
         tx.vout[0].nValue = 1*CENT;
-        tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
+        tx.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
         tx.vin.resize(500);
         for (unsigned int j = 0; j < tx.vin.size(); j++)
         {
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 47977cf29540..9e4669eba900 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
     tx.vin[0].scriptSig = CScript() << OP_1;
     tx.vout[0].nValue = 4900000000LL;
     script = CScript() << OP_0;
-    tx.vout[0].scriptPubKey.SetDestination(script.GetID());
+    tx.vout[0].scriptPubKey = GetScriptForDestination(script.GetID());
     hash = tx.GetHash();
     mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
     tx.vin[0].prevout.hash = hash;
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index f99002017f4c..1f3991d7b6fd 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -68,14 +68,14 @@ BOOST_AUTO_TEST_CASE(sign)
     // different keys, straight/P2SH, pubkey/pubkeyhash
     CScript standardScripts[4];
     standardScripts[0] << key[0].GetPubKey() << OP_CHECKSIG;
-    standardScripts[1].SetDestination(key[1].GetPubKey().GetID());
+    standardScripts[1] = GetScriptForDestination(key[1].GetPubKey().GetID());
     standardScripts[2] << key[1].GetPubKey() << OP_CHECKSIG;
-    standardScripts[3].SetDestination(key[2].GetPubKey().GetID());
+    standardScripts[3] = GetScriptForDestination(key[2].GetPubKey().GetID());
     CScript evalScripts[4];
     for (int i = 0; i < 4; i++)
     {
         keystore.AddCScript(standardScripts[i]);
-        evalScripts[i].SetDestination(standardScripts[i].GetID());
+        evalScripts[i] = GetScriptForDestination(standardScripts[i].GetID());
     }
 
     CMutableTransaction txFrom;  // Funding transaction:
@@ -129,8 +129,7 @@ BOOST_AUTO_TEST_CASE(norecurse)
     CScript invalidAsScript;
     invalidAsScript << OP_INVALIDOPCODE << OP_INVALIDOPCODE;
 
-    CScript p2sh;
-    p2sh.SetDestination(invalidAsScript.GetID());
+    CScript p2sh = GetScriptForDestination(invalidAsScript.GetID());
 
     CScript scriptSig;
     scriptSig << Serialize(invalidAsScript);
@@ -140,8 +139,7 @@ BOOST_AUTO_TEST_CASE(norecurse)
 
     // Try to recur, and verification should succeed because
     // the inner HASH160 <> EQUAL should only check the hash:
-    CScript p2sh2;
-    p2sh2.SetDestination(p2sh.GetID());
+    CScript p2sh2 = GetScriptForDestination(p2sh.GetID());
     CScript scriptSig2;
     scriptSig2 << Serialize(invalidAsScript) << Serialize(p2sh);
 
@@ -163,15 +161,15 @@ BOOST_AUTO_TEST_CASE(set)
     }
 
     CScript inner[4];
-    inner[0].SetDestination(key[0].GetPubKey().GetID());
-    inner[1].SetMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
-    inner[2].SetMultisig(1, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
-    inner[3].SetMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+3));
+    inner[0] = GetScriptForDestination(key[0].GetPubKey().GetID());
+    inner[1] = GetScriptForMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
+    inner[2] = GetScriptForMultisig(1, std::vector<CPubKey>(keys.begin(), keys.begin()+2));
+    inner[3] = GetScriptForMultisig(2, std::vector<CPubKey>(keys.begin(), keys.begin()+3));
 
     CScript outer[4];
     for (int i = 0; i < 4; i++)
     {
-        outer[i].SetDestination(inner[i].GetID());
+        outer[i] = GetScriptForDestination(inner[i].GetID());
         keystore.AddCScript(inner[i]);
     }
 
@@ -244,8 +242,7 @@ BOOST_AUTO_TEST_CASE(switchover)
     CScript scriptSig;
     scriptSig << Serialize(notValid);
 
-    CScript fund;
-    fund.SetDestination(notValid.GetID());
+    CScript fund = GetScriptForDestination(notValid.GetID());
 
 
     // Validation should succeed under old rules (hash is correct):
@@ -274,11 +271,11 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     txFrom.vout.resize(7);
 
     // First three are standard:
-    CScript pay1; pay1.SetDestination(key[0].GetPubKey().GetID());
+    CScript pay1 = GetScriptForDestination(key[0].GetPubKey().GetID());
     keystore.AddCScript(pay1);
-    CScript pay1of3; pay1of3.SetMultisig(1, keys);
+    CScript pay1of3 = GetScriptForMultisig(1, keys);
 
-    txFrom.vout[0].scriptPubKey.SetDestination(pay1.GetID()); // P2SH (OP_CHECKSIG)
+    txFrom.vout[0].scriptPubKey = GetScriptForDestination(pay1.GetID()); // P2SH (OP_CHECKSIG)
     txFrom.vout[0].nValue = 1000;
     txFrom.vout[1].scriptPubKey = pay1; // ordinary OP_CHECKSIG
     txFrom.vout[1].nValue = 2000;
@@ -293,7 +290,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     oneAndTwo << OP_2 << key[3].GetPubKey() << key[4].GetPubKey() << key[5].GetPubKey();
     oneAndTwo << OP_3 << OP_CHECKMULTISIG;
     keystore.AddCScript(oneAndTwo);
-    txFrom.vout[3].scriptPubKey.SetDestination(oneAndTwo.GetID());
+    txFrom.vout[3].scriptPubKey = GetScriptForDestination(oneAndTwo.GetID());
     txFrom.vout[3].nValue = 4000;
 
     // vout[4] is max sigops:
@@ -302,17 +299,17 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
         fifteenSigops << key[i%3].GetPubKey();
     fifteenSigops << OP_15 << OP_CHECKMULTISIG;
     keystore.AddCScript(fifteenSigops);
-    txFrom.vout[4].scriptPubKey.SetDestination(fifteenSigops.GetID());
+    txFrom.vout[4].scriptPubKey = GetScriptForDestination(fifteenSigops.GetID());
     txFrom.vout[4].nValue = 5000;
 
     // vout[5/6] are non-standard because they exceed MAX_P2SH_SIGOPS
     CScript sixteenSigops; sixteenSigops << OP_16 << OP_CHECKMULTISIG;
     keystore.AddCScript(sixteenSigops);
-    txFrom.vout[5].scriptPubKey.SetDestination(fifteenSigops.GetID());
+    txFrom.vout[5].scriptPubKey = GetScriptForDestination(fifteenSigops.GetID());
     txFrom.vout[5].nValue = 5000;
     CScript twentySigops; twentySigops << OP_CHECKMULTISIG;
     keystore.AddCScript(twentySigops);
-    txFrom.vout[6].scriptPubKey.SetDestination(twentySigops.GetID());
+    txFrom.vout[6].scriptPubKey = GetScriptForDestination(twentySigops.GetID());
     txFrom.vout[6].nValue = 6000;
 
 
@@ -320,7 +317,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 
     CMutableTransaction txTo;
     txTo.vout.resize(1);
-    txTo.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
+    txTo.vout[0].scriptPubKey = GetScriptForDestination(key[1].GetPubKey().GetID());
 
     txTo.vin.resize(5);
     for (int i = 0; i < 5; i++)
@@ -352,7 +349,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 
     CMutableTransaction txToNonStd1;
     txToNonStd1.vout.resize(1);
-    txToNonStd1.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
+    txToNonStd1.vout[0].scriptPubKey = GetScriptForDestination(key[1].GetPubKey().GetID());
     txToNonStd1.vout[0].nValue = 1000;
     txToNonStd1.vin.resize(1);
     txToNonStd1.vin[0].prevout.n = 5;
@@ -364,7 +361,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 
     CMutableTransaction txToNonStd2;
     txToNonStd2.vout.resize(1);
-    txToNonStd2.vout[0].scriptPubKey.SetDestination(key[1].GetPubKey().GetID());
+    txToNonStd2.vout[0].scriptPubKey = GetScriptForDestination(key[1].GetPubKey().GetID());
     txToNonStd2.vout[0].nValue = 1000;
     txToNonStd2.vin.resize(1);
     txToNonStd2.vin[0].prevout.n = 6;
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index bc610778c47b..7afe84089774 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -280,7 +280,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
 
     CMutableTransaction txFrom;
     txFrom.vout.resize(1);
-    txFrom.vout[0].scriptPubKey.SetDestination(keys[0].GetPubKey().GetID());
+    txFrom.vout[0].scriptPubKey = GetScriptForDestination(keys[0].GetPubKey().GetID());
     CScript& scriptPubKey = txFrom.vout[0].scriptPubKey;
     CMutableTransaction txTo;
     txTo.vin.resize(1);
@@ -309,7 +309,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
     // P2SH, single-signature case:
     CScript pkSingle; pkSingle << keys[0].GetPubKey() << OP_CHECKSIG;
     keystore.AddCScript(pkSingle);
-    scriptPubKey.SetDestination(pkSingle.GetID());
+    scriptPubKey = GetScriptForDestination(pkSingle.GetID());
     SignSignature(keystore, txFrom, txTo, 0);
     combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
     BOOST_CHECK(combined == scriptSig);
@@ -327,7 +327,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
     BOOST_CHECK(combined == scriptSig);
 
     // Hardest case:  Multisig 2-of-3
-    scriptPubKey.SetMultisig(2, pubkeys);
+    scriptPubKey = GetScriptForMultisig(2, pubkeys);
     keystore.AddCScript(scriptPubKey);
     SignSignature(keystore, txFrom, txTo, 0);
     combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 2d10c356ac1a..62a6cd63d65a 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -4,6 +4,7 @@
 
 #include "key.h"
 #include "script/script.h"
+#include "script/standard.h"
 #include "uint256.h"
 
 #include <vector>
@@ -37,8 +38,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U);
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U);
 
-    CScript p2sh;
-    p2sh.SetDestination(s1.GetID());
+    CScript p2sh = GetScriptForDestination(s1.GetID());
     CScript scriptSig;
     scriptSig << OP_0 << Serialize(s1);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U);
@@ -50,12 +50,11 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
         k.MakeNewKey(true);
         keys.push_back(k.GetPubKey());
     }
-    CScript s2;
-    s2.SetMultisig(1, keys);
+    CScript s2 = GetScriptForMultisig(1, keys);
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U);
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U);
 
-    p2sh.SetDestination(s2.GetID());
+    p2sh = GetScriptForDestination(s2.GetID());
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U);
     CScript scriptSig2;
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 21377395cf92..221afa342082 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -248,9 +248,9 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsView & coinsRet)
 
     dummyTransactions[1].vout.resize(2);
     dummyTransactions[1].vout[0].nValue = 21*CENT;
-    dummyTransactions[1].vout[0].scriptPubKey.SetDestination(key[2].GetPubKey().GetID());
+    dummyTransactions[1].vout[0].scriptPubKey = GetScriptForDestination(key[2].GetPubKey().GetID());
     dummyTransactions[1].vout[1].nValue = 22*CENT;
-    dummyTransactions[1].vout[1].scriptPubKey.SetDestination(key[3].GetPubKey().GetID());
+    dummyTransactions[1].vout[1].scriptPubKey = GetScriptForDestination(key[3].GetPubKey().GetID());
     coinsRet.SetCoins(dummyTransactions[1].GetHash(), CCoins(dummyTransactions[1], 0));
 
     return dummyTransactions;
@@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
     t.vout[0].nValue = 90*CENT;
     CKey key;
     key.MakeNewKey(true);
-    t.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID());
+    t.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
 
     string reason;
     BOOST_CHECK(IsStandardTx(t, reason));
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 611fb8bbcd82..6bfaec368180 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1385,7 +1385,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
 
                     // coin control: send change to custom address
                     if (coinControl && !boost::get<CNoDestination>(&coinControl->destChange))
-                        scriptChange.SetDestination(coinControl->destChange);
+                        scriptChange = GetScriptForDestination(coinControl->destChange);
 
                     // no coin control: send change to newly generated address
                     else
@@ -1403,7 +1403,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                         ret = reservekey.GetReservedKey(vchPubKey);
                         assert(ret); // should never fail, as we just unlocked
 
-                        scriptChange.SetDestination(vchPubKey.GetID());
+                        scriptChange = GetScriptForDestination(vchPubKey.GetID());
                     }
 
                     CTxOut newTxOut(nChange, scriptChange);
@@ -1556,8 +1556,7 @@ string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWallet
     }
 
     // Parse Bitcoin address
-    CScript scriptPubKey;
-    scriptPubKey.SetDestination(address);
+    CScript scriptPubKey = GetScriptForDestination(address);
 
     // Create and send the transaction
     CReserveKey reservekey(this);
diff --git a/src/wallet_ismine.cpp b/src/wallet_ismine.cpp
index a3c221d3ab51..07149ebd0b6c 100644
--- a/src/wallet_ismine.cpp
+++ b/src/wallet_ismine.cpp
@@ -29,8 +29,7 @@ unsigned int HaveKeys(const vector<valtype>& pubkeys, const CKeyStore& keystore)
 
 isminetype IsMine(const CKeyStore &keystore, const CTxDestination& dest)
 {
-    CScript script;
-    script.SetDestination(dest);
+    CScript script = GetScriptForDestination(dest);
     return IsMine(keystore, script);
 }
 
diff --git a/src/wallet_ismine.h b/src/wallet_ismine.h
index 29e13a94a637..f326b86815b3 100644
--- a/src/wallet_ismine.h
+++ b/src/wallet_ismine.h
@@ -7,9 +7,10 @@
 #define H_BITCOIN_WALLET_ISMINE
 
 #include "key.h"
-#include "script/script.h"
+#include "script/standard.h"
 
 class CKeyStore;
+class CScript;
 
 /** IsMine() return codes */
 enum isminetype

From 7e3821c097c05a4790abac53ddd26ef28cb7cf4d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 16 Sep 2014 13:25:46 -0400
Subject: [PATCH 0709/1819] travis: retry tests before giving up

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 7580adf5c4e6..82f3290110bd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,6 +58,6 @@ script:
     - cd bitcoin-$HOST
     - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
-    - if [ "$RUN_TESTS" = "true" ]; then make check; fi
+    - if [ "$RUN_TESTS" = "true" ]; then travis_retry make check; fi
 after_script:
     - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi

From cf12c223d093d349822333582bd1899bdfb03bbc Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 16 Sep 2014 14:23:39 -0400
Subject: [PATCH 0710/1819] depends: respect CPPFLAGS when configuring with
 depends

---
 depends/config.site.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/config.site.in b/depends/config.site.in
index 4012f5a8d17a..1df04eec3f2c 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -52,7 +52,7 @@ export PATH=$prefix/native/bin:$PATH
 export PKG_CONFIG="`which pkg-config` --static"
 export PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
 export PKG_CONFIG_PATH=$prefix/share/pkgconfig
-export CPPFLAGS=-I$prefix/include/
+export CPPFLAGS="-I$prefix/include/ $CPPFLAGS"
 
 export CC="@CC@"
 export CXX="@CXX@"

From 1b0c981cb69c63f09fef71241ded8a6279e4b993 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 16 Sep 2014 13:54:36 -0400
Subject: [PATCH 0711/1819] travis: use DEBUG_LOCKORDER for our quick/small
 Linux build

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 82f3290110bd..54799362a23e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ matrix:
     - compiler: "true 1"
       env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 2"
-      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
     - compiler: "true 3"
       env: HOST=x86_64-unknown-linux-gnu RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 4"

From ab15b2ec71da7a82b1b08d09c0252582668a2a60 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 3 Sep 2014 15:54:37 +0200
Subject: [PATCH 0712/1819] Avoid copying undo data

---
 src/main.cpp | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 6c1c7166a818..15c3916a6fb0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1351,12 +1351,13 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
     bool ret;
     // mark inputs spent
     if (!tx.IsCoinBase()) {
-        BOOST_FOREACH(const CTxIn &txin, tx.vin) {
+        txundo.vprevout.reserve(tx.vin.size());
+        for (unsigned int i = 0; i < tx.vin.size(); i++) {
+            const CTxIn &txin = tx.vin[i];
             CCoins &coins = inputs.GetCoins(txin.prevout.hash);
-            CTxInUndo undo;
-            ret = coins.Spend(txin.prevout, undo);
+            txundo.vprevout.push_back(CTxInUndo());
+            ret = coins.Spend(txin.prevout, txundo.vprevout.back());
             assert(ret);
-            txundo.vprevout.push_back(undo);
         }
     }
 
@@ -1663,6 +1664,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     CDiskTxPos pos(pindex->GetBlockPos(), GetSizeOfCompactSize(block.vtx.size()));
     std::vector<std::pair<uint256, CDiskTxPos> > vPos;
     vPos.reserve(block.vtx.size());
+    blockundo.vtxundo.reserve(block.vtx.size() - 1);
     for (unsigned int i = 0; i < block.vtx.size(); i++)
     {
         const CTransaction &tx = block.vtx[i];
@@ -1698,10 +1700,11 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
             control.Add(vChecks);
         }
 
-        CTxUndo txundo;
-        UpdateCoins(tx, state, view, txundo, pindex->nHeight);
-        if (!tx.IsCoinBase())
-            blockundo.vtxundo.push_back(txundo);
+        CTxUndo undoDummy;
+        if (i > 0) {
+            blockundo.vtxundo.push_back(CTxUndo());
+        }
+        UpdateCoins(tx, state, view, i == 0 ? undoDummy : blockundo.vtxundo.back(), pindex->nHeight);
 
         vPos.push_back(std::make_pair(tx.GetHash(), pos));
         pos.nTxOffset += ::GetSerializeSize(tx, SER_DISK, CLIENT_VERSION);

From c15e483f2394e51163ba2514cd56fdba32bb92a4 Mon Sep 17 00:00:00 2001
From: imharrywu <imharrywu@users.noreply.github.com>
Date: Thu, 18 Sep 2014 08:15:09 +0800
Subject: [PATCH 0713/1819] typo fix of booleamn to boolean

---
 src/rpcnet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 52f98fbf0043..95f42eb47f73 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -96,7 +96,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"inbound\": true|false,     (boolean) Inbound (true) or Outbound (false)\n"
             "    \"startingheight\": n,       (numeric) The starting height (block) of the peer\n"
             "    \"banscore\": n,             (numeric) The ban score\n"
-            "    \"syncnode\": true|false     (booleamn) if sync node\n"
+            "    \"syncnode\": true|false     (boolean) if sync node\n"
             "  }\n"
             "  ,...\n"
             "]\n"

From 22d7e7014f2064fb9e52c634f68b3c5e965faec0 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 16 Sep 2014 15:16:29 +0200
Subject: [PATCH 0714/1819] prefer const string& over char* in CDB and
 CWalletDB constructor

- also make parameter of CDBEnv::CheckpointLSN a constant reference
---
 src/db.cpp     | 22 +++++++++++-----------
 src/db.h       |  6 ++++--
 src/walletdb.h |  2 +-
 3 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/db.cpp b/src/db.cpp
index edbff6fd49a5..24206d34e131 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -215,7 +215,7 @@ bool CDBEnv::Salvage(std::string strFile, bool fAggressive,
 }
 
 
-void CDBEnv::CheckpointLSN(std::string strFile)
+void CDBEnv::CheckpointLSN(const std::string& strFile)
 {
     dbenv.txn_checkpoint(0, 0, 0);
     if (fMockDb)
@@ -224,12 +224,12 @@ void CDBEnv::CheckpointLSN(std::string strFile)
 }
 
 
-CDB::CDB(const char *pszFile, const char* pszMode) :
+CDB::CDB(const std::string& strFilename, const char* pszMode) :
     pdb(NULL), activeTxn(NULL)
 {
     int ret;
     fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
-    if (pszFile == NULL)
+    if (strFilename.empty())
         return;
 
     bool fCreate = strchr(pszMode, 'c') != NULL;
@@ -242,7 +242,7 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
         if (!bitdb.Open(GetDataDir()))
             throw runtime_error("CDB : Failed to open database environment.");
 
-        strFile = pszFile;
+        strFile = strFilename;
         ++bitdb.mapFileUseCount[strFile];
         pdb = bitdb.mapDb[strFile];
         if (pdb == NULL)
@@ -255,14 +255,14 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
                 DbMpoolFile*mpf = pdb->get_mpf();
                 ret = mpf->set_flags(DB_MPOOL_NOFILE, 1);
                 if (ret != 0)
-                    throw runtime_error(strprintf("CDB : Failed to configure for no temp file backing for database %s", pszFile));
+                    throw runtime_error(strprintf("CDB : Failed to configure for no temp file backing for database %s", strFile));
             }
 
-            ret = pdb->open(NULL,      // Txn pointer
-                            fMockDb ? NULL : pszFile,   // Filename
-                            fMockDb ? pszFile : "main", // Logical db name
-                            DB_BTREE,  // Database type
-                            nFlags,    // Flags
+            ret = pdb->open(NULL, // Txn pointer
+                            fMockDb ? NULL : strFile.c_str(), // Filename
+                            fMockDb ? strFile.c_str() : "main", // Logical db name
+                            DB_BTREE, // Database type
+                            nFlags, // Flags
                             0);
 
             if (ret != 0)
@@ -271,7 +271,7 @@ CDB::CDB(const char *pszFile, const char* pszMode) :
                 pdb = NULL;
                 --bitdb.mapFileUseCount[strFile];
                 strFile = "";
-                throw runtime_error(strprintf("CDB : Error %d, can't open database %s", ret, pszFile));
+                throw runtime_error(strprintf("CDB : Error %d, can't open database %s", ret, strFile));
             }
 
             if (fCreate && !Exists(string("version")))
diff --git a/src/db.h b/src/db.h
index 999750ff3fb7..eab27f43af5a 100644
--- a/src/db.h
+++ b/src/db.h
@@ -69,7 +69,7 @@ class CDBEnv
     bool Open(const boost::filesystem::path &path);
     void Close();
     void Flush(bool fShutdown);
-    void CheckpointLSN(std::string strFile);
+    void CheckpointLSN(const std::string& strFile);
 
     void CloseDb(const std::string& strFile);
     bool RemoveDb(const std::string& strFile);
@@ -96,11 +96,13 @@ class CDB
     DbTxn *activeTxn;
     bool fReadOnly;
 
-    explicit CDB(const char* pszFile, const char* pszMode="r+");
+    explicit CDB(const std::string& strFilename, const char* pszMode="r+");
     ~CDB() { Close(); }
+
 public:
     void Flush();
     void Close();
+
 private:
     CDB(const CDB&);
     void operator=(const CDB&);
diff --git a/src/walletdb.h b/src/walletdb.h
index ce63bb0b97df..475d4fb96dac 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -75,7 +75,7 @@ class CKeyMetadata
 class CWalletDB : public CDB
 {
 public:
-    CWalletDB(std::string strFilename, const char* pszMode="r+") : CDB(strFilename.c_str(), pszMode)
+    CWalletDB(const std::string& strFilename, const char* pszMode = "r+") : CDB(strFilename, pszMode)
     {
     }
 private:

From 93f84d0417e8e1c590b405bde6e153b413bd43f2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 16 Sep 2014 15:18:33 +0200
Subject: [PATCH 0715/1819] cleanup class private and public areas in walletdb

- only code movement
---
 src/walletdb.cpp |  4 +---
 src/walletdb.h   | 17 +++++++++--------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 03161250dbbe..a84f44db01b3 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -242,9 +242,7 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountin
     pcursor->close();
 }
 
-
-DBErrors
-CWalletDB::ReorderTransactions(CWallet* pwallet)
+DBErrors CWalletDB::ReorderTransactions(CWallet* pwallet)
 {
     LOCK(pwallet->cs_wallet);
     // Old wallets didn't have any defined order for transactions
diff --git a/src/walletdb.h b/src/walletdb.h
index 475d4fb96dac..2c5b608f3db2 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -78,10 +78,7 @@ class CWalletDB : public CDB
     CWalletDB(const std::string& strFilename, const char* pszMode = "r+") : CDB(strFilename, pszMode)
     {
     }
-private:
-    CWalletDB(const CWalletDB&);
-    void operator=(const CWalletDB&);
-public:
+
     bool WriteName(const std::string& strAddress, const std::string& strName);
     bool EraseName(const std::string& strAddress);
 
@@ -119,19 +116,23 @@ class CWalletDB : public CDB
     bool WriteDestData(const std::string &address, const std::string &key, const std::string &value);
     /// Erase destination data tuple from wallet database
     bool EraseDestData(const std::string &address, const std::string &key);
-private:
-    bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry);
-public:
+
     bool WriteAccountingEntry(const CAccountingEntry& acentry);
     int64_t GetAccountCreditDebit(const std::string& strAccount);
     void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
 
-    DBErrors ReorderTransactions(CWallet*);
+    DBErrors ReorderTransactions(CWallet* pwallet);
     DBErrors LoadWallet(CWallet* pwallet);
     DBErrors FindWalletTx(CWallet* pwallet, std::vector<uint256>& vTxHash, std::vector<CWalletTx>& vWtx);
     DBErrors ZapWalletTx(CWallet* pwallet, std::vector<CWalletTx>& vWtx);
     static bool Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys);
     static bool Recover(CDBEnv& dbenv, std::string filename);
+
+private:
+    CWalletDB(const CWalletDB&);
+    void operator=(const CWalletDB&);
+
+    bool WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry);
 };
 
 bool BackupWallet(const CWallet& wallet, const std::string& strDest);

From d547ebf56ea1eeffd415ee9529c45f162bccaaf3 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 18 Sep 2014 10:11:45 +0200
Subject: [PATCH 0716/1819] Remove mention of MacPorts from OSX build docs

---
 doc/build-osx.md | 48 +++---------------------------------------------
 1 file changed, 3 insertions(+), 45 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index ade9eb466b1f..5eeda5b08ebd 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -26,44 +26,14 @@ There's also an assumption that you already have `git` installed. If
 not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
 (OS X 10.7+) or
 [Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
-available via Homebrew or MacPorts.
+available via Homebrew.
 
-You will also need to install [Homebrew](http://brew.sh)
-or [MacPorts](https://www.macports.org/) in order to install library
-dependencies. It's largely a religious decision which to choose, however, Homebrew
-is now used for building release versions.
+You will also need to install [Homebrew](http://brew.sh) in order to install library
+dependencies.
 
 The installation of the actual dependencies is covered in the Instructions
 sections below.
 
-Instructions: MacPorts
-----------------------
-
-### Install dependencies
-
-    sudo port install boost db48@+no_java openssl miniupnpc autoconf pkgconfig automake libtool
-
-Optional: install Qt4
-
-    sudo port install qt4-mac qrencode protobuf-cpp
-
-### Building `bitcoind`
-
-1. Clone the github tree to get the source code and go into the directory.
-
-        git clone git@github.com:bitcoin/bitcoin.git bitcoin
-        cd bitcoin
-
-2.  Build bitcoind (and Bitcoin-Qt, if configured):
-
-        ./autogen.sh
-        ./configure
-        make
-
-3.  It is a good idea to build and run the unit tests, too:
-
-        make check
-
 Instructions: Homebrew
 ----------------------
 
@@ -126,18 +96,6 @@ All dependencies should be compiled with these flags:
  -arch x86_64
  -isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
 
-For MacPorts, that means editing your macports.conf and setting
-`macosx_deployment_target` and `build_arch`:
-
-    macosx_deployment_target=10.6
-    build_arch=x86_64
-
-... and then uninstalling and re-installing, or simply rebuilding, all ports.
-
-As of December 2012, the `boost` port does not obey `macosx_deployment_target`.
-Download `https://gavinandresen-bitcoin.s3.amazonaws.com/boost_macports_fix.zip`
-for a fix.
-
 Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
 bundle is packaged and signed to create the .dmg disk image that is distributed.
 

From 62e5f8f96114a872354103ef566b5c74a16154d4 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 16 Sep 2014 18:13:05 +0200
Subject: [PATCH 0717/1819] CMessageHeader sanity changes

- Remove spurious `pchCommand[1] = 1` in CMessageHeader()
- Make sure that pchCommand is zero-padded if length is shorter than
  COMMAND_SIZE
- Use strnlen to determine length of pcmCommand in GetCommand
---
 src/protocol.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/protocol.cpp b/src/protocol.cpp
index 341de0602ae3..0e28f3abbd4a 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -24,7 +24,6 @@ CMessageHeader::CMessageHeader()
 {
     memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE);
     memset(pchCommand, 0, sizeof(pchCommand));
-    pchCommand[1] = 1;
     nMessageSize = -1;
     nChecksum = 0;
 }
@@ -32,6 +31,7 @@ CMessageHeader::CMessageHeader()
 CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn)
 {
     memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE);
+    memset(pchCommand, 0, sizeof(pchCommand));
     strncpy(pchCommand, pszCommand, COMMAND_SIZE);
     nMessageSize = nMessageSizeIn;
     nChecksum = 0;
@@ -39,10 +39,7 @@ CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSize
 
 std::string CMessageHeader::GetCommand() const
 {
-    if (pchCommand[COMMAND_SIZE-1] == 0)
-        return std::string(pchCommand, pchCommand + strlen(pchCommand));
-    else
-        return std::string(pchCommand, pchCommand + COMMAND_SIZE);
+    return std::string(pchCommand, pchCommand + strnlen(pchCommand, COMMAND_SIZE));
 }
 
 bool CMessageHeader::IsValid() const

From a49f11d9edf2f7dbce154ca370494a8f86e013d0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 18 Sep 2014 13:14:38 +0200
Subject: [PATCH 0718/1819] qt: Change splash screen to normal window

Makes it possible to move, minimize, unminimize the window while
Bitcoin Core is initializing.
---
 src/qt/bitcoin.cpp      |  7 +++---
 src/qt/splashscreen.cpp | 55 +++++++++++++++++++++++++++++++----------
 src/qt/splashscreen.h   | 15 +++++++++--
 3 files changed, 58 insertions(+), 19 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6cc6b99ceb06..676f218f20b9 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -338,8 +338,7 @@ void BitcoinApplication::createWindow(bool isaTestNet)
 
 void BitcoinApplication::createSplashScreen(bool isaTestNet)
 {
-    SplashScreen *splash = new SplashScreen(QPixmap(), 0, isaTestNet);
-    splash->setAttribute(Qt::WA_DeleteOnClose);
+    SplashScreen *splash = new SplashScreen(0, isaTestNet);
     splash->show();
     connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
 }
@@ -423,8 +422,6 @@ void BitcoinApplication::initializeResult(int retval)
         }
 #endif
 
-        emit splashFinished(window);
-
         // If -min option passed, start window minimized.
         if(GetBoolArg("-min", false))
         {
@@ -434,6 +431,8 @@ void BitcoinApplication::initializeResult(int retval)
         {
             window->show();
         }
+        emit splashFinished(window);
+
 #ifdef ENABLE_WALLET
         // Now that initialization/startup is done, process any command-line
         // bitcoin: URIs or payment requests:
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 5dd110b36a82..b6443d47ff22 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -15,11 +15,12 @@
 
 #include <QApplication>
 #include <QPainter>
+#include <QDesktopWidget>
 
-SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet) :
-    QSplashScreen(pixmap, f)
+SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
+    QWidget(0, f), curAlignment(0)
 {
-    setAutoFillBackground(true);
+    //setAutoFillBackground(true);
 
     // set reference point, paddings
     int paddingRight            = 50;
@@ -38,15 +39,14 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTest
     QString font            = "Arial";
 
     // load the bitmap for writing some text over it
-    QPixmap newPixmap;
     if(isTestNet) {
-        newPixmap     = QPixmap(":/images/splash_testnet");
+        pixmap     = QPixmap(":/images/splash_testnet");
     }
     else {
-        newPixmap     = QPixmap(":/images/splash");
+        pixmap     = QPixmap(":/images/splash");
     }
 
-    QPainter pixPaint(&newPixmap);
+    QPainter pixPaint(&pixmap);
     pixPaint.setPen(QColor(100,100,100));
 
     // check font size and drawing with
@@ -61,7 +61,7 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTest
     pixPaint.setFont(QFont(font, 33*fontFactor));
     fm = pixPaint.fontMetrics();
     titleTextWidth  = fm.width(titleText);
-    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight,paddingTop,titleText);
+    pixPaint.drawText(pixmap.width()-titleTextWidth-paddingRight,paddingTop,titleText);
 
     pixPaint.setFont(QFont(font, 15*fontFactor));
 
@@ -72,11 +72,11 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTest
         pixPaint.setFont(QFont(font, 10*fontFactor));
         titleVersionVSpace -= 5;
     }
-    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight+2,paddingTop+titleVersionVSpace,versionText);
+    pixPaint.drawText(pixmap.width()-titleTextWidth-paddingRight+2,paddingTop+titleVersionVSpace,versionText);
 
     // draw copyright stuff
     pixPaint.setFont(QFont(font, 10*fontFactor));
-    pixPaint.drawText(newPixmap.width()-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText);
+    pixPaint.drawText(pixmap.width()-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText);
 
     // draw testnet string if testnet is on
     if(isTestNet) {
@@ -85,12 +85,22 @@ SplashScreen::SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTest
         pixPaint.setFont(boldFont);
         fm = pixPaint.fontMetrics();
         int testnetAddTextWidth  = fm.width(testnetAddText);
-        pixPaint.drawText(newPixmap.width()-testnetAddTextWidth-10,15,testnetAddText);
+        pixPaint.drawText(pixmap.width()-testnetAddTextWidth-10,15,testnetAddText);
     }
 
     pixPaint.end();
 
-    this->setPixmap(newPixmap);
+    // Set window title
+    if(isTestNet)
+        setWindowTitle(titleText + " " + testnetAddText);
+    else
+        setWindowTitle(titleText);
+
+    // Resize window and move to center of desktop, disallow resizing
+    QRect r(QPoint(), pixmap.size());
+    resize(r.size());
+    setFixedSize(r.size());
+    move(QApplication::desktop()->screenGeometry().center() - r.center());
 
     subscribeToCoreSignals();
 }
@@ -102,7 +112,8 @@ SplashScreen::~SplashScreen()
 
 void SplashScreen::slotFinish(QWidget *mainWin)
 {
-    finish(mainWin);
+    hide();
+    deleteLater();
 }
 
 static void InitMessage(SplashScreen *splash, const std::string &message)
@@ -146,3 +157,21 @@ void SplashScreen::unsubscribeFromCoreSignals()
         pwalletMain->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
 #endif
 }
+
+void SplashScreen::showMessage(const QString &message, int alignment, const QColor &color)
+{
+    curMessage = message;
+    curAlignment = alignment;
+    curColor = color;
+    update();
+}
+
+void SplashScreen::paintEvent(QPaintEvent *event)
+{
+    QPainter painter(this);
+    painter.drawPixmap(0, 0, pixmap);
+    QRect r = rect().adjusted(5, 5, -5, -5);
+    painter.setPen(curColor);
+    painter.drawText(r, curAlignment, curMessage);
+}
+
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index d79038d81d13..1151d6c11190 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -9,23 +9,34 @@
 
 /** class for the splashscreen with information of the running client
  */
-class SplashScreen : public QSplashScreen
+class SplashScreen : public QWidget
 {
     Q_OBJECT
 
 public:
-    explicit SplashScreen(const QPixmap &pixmap, Qt::WindowFlags f, bool isTestNet);
+    explicit SplashScreen(Qt::WindowFlags f, bool isTestNet);
     ~SplashScreen();
 
+protected:
+     void paintEvent(QPaintEvent *event);
+
 public slots:
     /** Slot to call finish() method as it's not defined as slot */
     void slotFinish(QWidget *mainWin);
 
+    /** Show message and progress */
+    void showMessage(const QString &message, int alignment, const QColor &color);
+
 private:
     /** Connect core signals to splash screen */
     void subscribeToCoreSignals();
     /** Disconnect core signals to splash screen */
     void unsubscribeFromCoreSignals();
+
+    QPixmap pixmap;
+    QString curMessage;
+    QColor curColor;
+    int curAlignment;
 };
 
 #endif // SPLASHSCREEN_H

From 5e83bc404c77d6e70c62152f1f97eb264afcc80d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Sep 2014 13:18:35 +0200
Subject: [PATCH 0719/1819] [Qt] include and file header cleanup

- alphabetical ordering
- correct ordering own headers before normal headers etc.
---
 src/qt/bitcoin.cpp            | 5 ++++-
 src/qt/bitcoinamountfield.h   | 4 ++--
 src/qt/bitcoingui.cpp         | 5 +++--
 src/qt/coincontroldialog.h    | 8 +++++---
 src/qt/intro.h                | 2 +-
 src/qt/openuridialog.h        | 2 +-
 src/qt/optionsdialog.cpp      | 2 ++
 src/qt/optionsmodel.cpp       | 1 +
 src/qt/paymentrequestplus.cpp | 1 +
 src/qt/receivecoinsdialog.h   | 7 ++++---
 src/qt/rpcconsole.cpp         | 4 +++-
 src/qt/rpcconsole.h           | 8 ++++----
 src/qt/sendcoinsdialog.h      | 8 ++++----
 src/qt/splashscreen.cpp       | 3 ++-
 src/qt/transactiondesc.cpp    | 4 ++--
 15 files changed, 39 insertions(+), 25 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6cc6b99ceb06..d9ca42301506 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -16,6 +16,7 @@
 #include "splashscreen.h"
 #include "utilitydialog.h"
 #include "winshutdownmonitor.h"
+
 #ifdef ENABLE_WALLET
 #include "paymentserver.h"
 #include "walletmodel.h"
@@ -26,6 +27,7 @@
 #include "rpcserver.h"
 #include "ui_interface.h"
 #include "util.h"
+
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
@@ -34,15 +36,16 @@
 
 #include <boost/filesystem/operations.hpp>
 #include <boost/thread.hpp>
+
 #include <QApplication>
 #include <QDebug>
 #include <QLibraryInfo>
 #include <QLocale>
 #include <QMessageBox>
 #include <QSettings>
+#include <QThread>
 #include <QTimer>
 #include <QTranslator>
-#include <QThread>
 
 #if defined(QT_STATICPLUGIN)
 #include <QtPlugin>
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index c713f5d68736..84795a7e7a58 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -7,12 +7,12 @@
 
 #include <QWidget>
 
+class AmountSpinBox;
+
 QT_BEGIN_NAMESPACE
 class QValueComboBox;
 QT_END_NAMESPACE
 
-class AmountSpinBox;
-
 /** Widget for entering bitcoin amounts.
   */
 class BitcoinAmountField: public QWidget
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 790301a1eb93..dd5192982ee2 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -14,6 +14,7 @@
 #include "optionsmodel.h"
 #include "rpcconsole.h"
 #include "utilitydialog.h"
+
 #ifdef ENABLE_WALLET
 #include "walletframe.h"
 #include "walletmodel.h"
@@ -24,8 +25,8 @@
 #endif
 
 #include "init.h"
-#include "util.h"
 #include "ui_interface.h"
+#include "util.h"
 
 #include <iostream>
 
@@ -50,8 +51,8 @@
 #include <QVBoxLayout>
 
 #if QT_VERSION < 0x050000
-#include <QUrl>
 #include <QTextDocument>
+#include <QUrl>
 #else
 #include <QUrlQuery>
 #endif
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index 4f7422642fd1..a6f239a89871 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -14,13 +14,15 @@
 #include <QString>
 #include <QTreeWidgetItem>
 
-namespace Ui {
-    class CoinControlDialog;
-}
 class WalletModel;
+
 class CCoinControl;
 class CTxMemPool;
 
+namespace Ui {
+    class CoinControlDialog;
+}
+
 class CoinControlDialog : public QDialog
 {
     Q_OBJECT
diff --git a/src/qt/intro.h b/src/qt/intro.h
index 295a75562ffd..e3e396d3693b 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -12,7 +12,7 @@
 class FreespaceChecker;
 
 namespace Ui {
-class Intro;
+    class Intro;
 }
 
 /** Introduction screen (pre-GUI startup).
diff --git a/src/qt/openuridialog.h b/src/qt/openuridialog.h
index 28da7d6d9d1f..67a5f167d153 100644
--- a/src/qt/openuridialog.h
+++ b/src/qt/openuridialog.h
@@ -8,7 +8,7 @@
 #include <QDialog>
 
 namespace Ui {
-class OpenURIDialog;
+    class OpenURIDialog;
 }
 
 class OpenURIDialog : public QDialog
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index c775a7f8d64c..279467129fc2 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -17,11 +17,13 @@
 #include "main.h" // for MAX_SCRIPTCHECK_THREADS
 #include "netbase.h"
 #include "txdb.h" // for -dbcache defaults
+
 #ifdef ENABLE_WALLET
 #include "wallet.h" // for CWallet::minTxFee
 #endif
 
 #include <boost/thread.hpp>
+
 #include <QDir>
 #include <QIntValidator>
 #include <QLocale>
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 99928ebe4df3..bd747faeb684 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -15,6 +15,7 @@
 #include "main.h"
 #include "net.h"
 #include "txdb.h" // for -dbcache defaults
+
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #include "walletdb.h"
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index acce42e20376..7b7de49831e4 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -13,6 +13,7 @@
 
 #include <openssl/x509.h>
 #include <openssl/x509_vfy.h>
+
 #include <QDateTime>
 #include <QDebug>
 #include <QSslCertificate>
diff --git a/src/qt/receivecoinsdialog.h b/src/qt/receivecoinsdialog.h
index 663cb157a446..7a7e38e25e9e 100644
--- a/src/qt/receivecoinsdialog.h
+++ b/src/qt/receivecoinsdialog.h
@@ -5,6 +5,8 @@
 #ifndef RECEIVECOINSDIALOG_H
 #define RECEIVECOINSDIALOG_H
 
+#include "guiutil.h"
+
 #include <QDialog>
 #include <QHeaderView>
 #include <QItemSelection>
@@ -13,13 +15,12 @@
 #include <QPoint>
 #include <QVariant>
 
-#include "guiutil.h"
+class OptionsModel;
+class WalletModel;
 
 namespace Ui {
     class ReceiveCoinsDialog;
 }
-class OptionsModel;
-class WalletModel;
 
 QT_BEGIN_NAMESPACE
 class QModelIndex;
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 11089b24971b..8129353d4b0b 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -16,10 +16,12 @@
 #include "util.h"
 
 #include "json/json_spirit_value.h"
+
+#include <openssl/crypto.h>
+
 #ifdef ENABLE_WALLET
 #include <db_cxx.h>
 #endif
-#include <openssl/crypto.h>
 
 #include <QKeyEvent>
 #include <QScrollBar>
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 64bb5c29b323..1ffff927586a 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -14,14 +14,14 @@
 
 class ClientModel;
 
-QT_BEGIN_NAMESPACE
-class QItemSelection;
-QT_END_NAMESPACE
-
 namespace Ui {
     class RPCConsole;
 }
 
+QT_BEGIN_NAMESPACE
+class QItemSelection;
+QT_END_NAMESPACE
+
 /** Local Bitcoin RPC console. */
 class RPCConsole: public QDialog
 {
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 6cdf4a00c8dd..a090fa42d5c2 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -14,14 +14,14 @@ class OptionsModel;
 class SendCoinsEntry;
 class SendCoinsRecipient;
 
-QT_BEGIN_NAMESPACE
-class QUrl;
-QT_END_NAMESPACE
-
 namespace Ui {
     class SendCoinsDialog;
 }
 
+QT_BEGIN_NAMESPACE
+class QUrl;
+QT_END_NAMESPACE
+
 /** Dialog for sending bitcoins */
 class SendCoinsDialog : public QDialog
 {
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 5dd110b36a82..feb0f3350f4c 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -4,11 +4,12 @@
 
 #include "splashscreen.h"
 
-#include "version.h"
 #include "clientversion.h"
 #include "init.h"
 #include "ui_interface.h"
 #include "util.h"
+#include "version.h"
+
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 727b8dc66dac..49237183412d 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -6,13 +6,13 @@
 
 #include "bitcoinunits.h"
 #include "guiutil.h"
+#include "paymentserver.h"
+#include "transactionrecord.h"
 
 #include "base58.h"
 #include "db.h"
 #include "main.h"
-#include "paymentserver.h"
 #include "script/script.h"
-#include "transactionrecord.h"
 #include "timedata.h"
 #include "ui_interface.h"
 #include "util.h"

From 94064710b9123dfb3df8cfd6c32efae349aec281 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 18 Sep 2014 14:08:43 +0200
Subject: [PATCH 0720/1819] Write fee estimate and peers files only when
 initialized

Fixes #4669.

Move the loading of addresses to StartNode() to make it more
self-contained.
---
 src/init.cpp | 27 ++++++++++-----------------
 src/net.cpp  | 20 +++++++++++++++++++-
 2 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 67f53e044cc3..0a6b5abac592 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -47,6 +47,7 @@ using namespace std;
 #ifdef ENABLE_WALLET
 CWallet* pwalletMain;
 #endif
+bool fFeeEstimatesInitialized = false;
 
 #ifdef WIN32
 // Win32 LevelDB doesn't use filedescriptors, and the ones used for
@@ -119,6 +120,10 @@ void Shutdown()
     if (!lockShutdown)
         return;
 
+    /// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
+    /// for example if the data directory was found to be locked.
+    /// Be sure that anything that writes files or flushes caches only does this if the respective
+    /// module was initialized.
     RenameThread("bitcoin-shutoff");
     mempool.AddTransactionsUpdated(1);
     StopRPCThreads();
@@ -130,6 +135,7 @@ void Shutdown()
     StopNode();
     UnregisterNodeSignals(GetNodeSignals());
 
+    if (fFeeEstimatesInitialized)
     {
         boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
         CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
@@ -137,6 +143,7 @@ void Shutdown()
             mempool.WriteFeeEstimates(est_fileout);
         else
             LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
+        fFeeEstimatesInitialized = false;
     }
 
     {
@@ -1056,6 +1063,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     // Allowed to fail as this file IS missing on first startup.
     if (est_filein)
         mempool.ReadFeeEstimates(est_filein);
+    fFeeEstimatesInitialized = true;
 
     // ********************************************************* Step 8: load wallet
 #ifdef ENABLE_WALLET
@@ -1212,22 +1220,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
     threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles));
 
-    // ********************************************************* Step 10: load peers
-
-    uiInterface.InitMessage(_("Loading addresses..."));
-
-    nStart = GetTimeMillis();
-
-    {
-        CAddrDB adb;
-        if (!adb.Read(addrman))
-            LogPrintf("Invalid or missing peers.dat; recreating\n");
-    }
-
-    LogPrintf("Loaded %i addresses from peers.dat  %dms\n",
-           addrman.size(), GetTimeMillis() - nStart);
-
-    // ********************************************************* Step 11: start node
+    // ********************************************************* Step 10: start node
 
     if (!CheckDiskSpace())
         return false;
@@ -1256,7 +1249,7 @@ bool AppInit2(boost::thread_group& threadGroup)
         GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", -1));
 #endif
 
-    // ********************************************************* Step 12: finished
+    // ********************************************************* Step 11: finished
 
     uiInterface.InitMessage(_("Done loading"));
 
diff --git a/src/net.cpp b/src/net.cpp
index ab547e2fd7a8..ebb103b6362d 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -78,6 +78,7 @@ uint64_t nLocalHostNonce = 0;
 static std::vector<ListenSocket> vhListenSocket;
 CAddrMan addrman;
 int nMaxConnections = 125;
+bool fAddressesInitialized = false;
 
 vector<CNode*> vNodes;
 CCriticalSection cs_vNodes;
@@ -1739,6 +1740,18 @@ void static Discover(boost::thread_group& threadGroup)
 
 void StartNode(boost::thread_group& threadGroup)
 {
+    uiInterface.InitMessage(_("Loading addresses..."));
+    // Load addresses for peers.dat
+    int64_t nStart = GetTimeMillis();
+    {
+        CAddrDB adb;
+        if (!adb.Read(addrman))
+            LogPrintf("Invalid or missing peers.dat; recreating\n");
+    }
+    LogPrintf("Loaded %i addresses from peers.dat  %dms\n",
+           addrman.size(), GetTimeMillis() - nStart);
+    fAddressesInitialized = true;
+
     if (semOutbound == NULL) {
         // initialize semaphore
         int nMaxOutbound = min(MAX_OUTBOUND_CONNECTIONS, nMaxConnections);
@@ -1785,7 +1798,12 @@ bool StopNode()
     if (semOutbound)
         for (int i=0; i<MAX_OUTBOUND_CONNECTIONS; i++)
             semOutbound->post();
-    DumpAddresses();
+
+    if (fAddressesInitialized)
+    {
+        DumpAddresses();
+        fAddressesInitialized = false;
+    }
 
     return true;
 }

From 018cec7c41e5fca9cfe80c618444a4d343fc44e2 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Thu, 18 Sep 2014 16:57:01 -0400
Subject: [PATCH 0721/1819] Fixing 'vector out of bounds' issue in base 32 and
 64

---
 src/utilstrencodings.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index 6837e4e26749..2cec3023b53b 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -224,7 +224,7 @@ vector<unsigned char> DecodeBase64(const char* p, bool* pfInvalid)
 string DecodeBase64(const string& str)
 {
     vector<unsigned char> vchRet = DecodeBase64(str.c_str());
-    return string((const char*)&vchRet[0], vchRet.size());
+    return (vchRet.size() == 0) ? string() : string((const char*)&vchRet[0], vchRet.size());
 }
 
 string EncodeBase32(const unsigned char* pch, size_t len)
@@ -411,7 +411,7 @@ vector<unsigned char> DecodeBase32(const char* p, bool* pfInvalid)
 string DecodeBase32(const string& str)
 {
     vector<unsigned char> vchRet = DecodeBase32(str.c_str());
-    return string((const char*)&vchRet[0], vchRet.size());
+    return (vchRet.size() == 0) ? string() : string((const char*)&vchRet[0], vchRet.size());
 }
 
 bool ParseInt32(const std::string& str, int32_t *out)

From 20e01b1a03819d843a860284033b48a5e3b65ff7 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 19 Sep 2014 19:21:46 +0200
Subject: [PATCH 0722/1819] Apply clang-format on some infrequently-updated
 files

---
 src/addrman.cpp         | 225 ++++++++++++++++++++--------------------
 src/allocators.cpp      |   7 +-
 src/allocators.h        |  90 ++++++++--------
 src/base58.cpp          | 129 ++++++++++++++---------
 src/chainparamsbase.cpp |  56 ++++++----
 src/chainparamsbase.h   |   3 +-
 src/checkpoints.h       |  20 ++--
 src/checkqueue.h        |  59 +++++++----
 src/clientversion.h     |  12 +--
 src/coincontrol.h       |   1 -
 src/db.cpp              | 144 +++++++++++--------------
 src/db.h                |  33 +++---
 src/hash.cpp            |  32 +++---
 src/init.h              |   8 +-
 src/key.h               | 131 +++++++++++++----------
 src/leveldbwrapper.cpp  |  15 ++-
 src/leveldbwrapper.h    |  47 ++++++---
 src/limitedmap.h        |  18 ++--
 src/mruset.h            |  18 ++--
 src/noui.cpp            |   2 +-
 src/protocol.h          | 151 +++++++++++++--------------
 src/random.cpp          |  28 +++--
 src/random.h            |   2 +-
 src/rpcclient.h         |   2 +-
 src/sync.cpp            |  48 ++++-----
 src/sync.h              |  70 +++++++------
 src/threadsafety.h      |  40 +++----
 src/timedata.h          |  23 ++--
 src/uint256.cpp         | 133 ++++++++++++++----------
 src/version.cpp         |  44 ++++----
 30 files changed, 847 insertions(+), 744 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 68948ac7ffe3..7b674a66e7cb 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -9,7 +9,7 @@
 
 using namespace std;
 
-int CAddrInfo::GetTriedBucket(const std::vector<unsigned char> &nKey) const
+int CAddrInfo::GetTriedBucket(const std::vector<unsigned char>& nKey) const
 {
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchKey = GetKey();
@@ -23,7 +23,7 @@ int CAddrInfo::GetTriedBucket(const std::vector<unsigned char> &nKey) const
     return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
 }
 
-int CAddrInfo::GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAddr& src) const
+int CAddrInfo::GetNewBucket(const std::vector<unsigned char>& nKey, const CNetAddr& src) const
 {
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchGroupKey = GetGroup();
@@ -39,19 +39,19 @@ int CAddrInfo::GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAd
 
 bool CAddrInfo::IsTerrible(int64_t nNow) const
 {
-    if (nLastTry && nLastTry >= nNow-60) // never remove things tried the last minute
+    if (nLastTry && nLastTry >= nNow - 60) // never remove things tried the last minute
         return false;
 
-    if (nTime > nNow + 10*60) // came in a flying DeLorean
+    if (nTime > nNow + 10 * 60) // came in a flying DeLorean
         return true;
 
-    if (nTime==0 || nNow-nTime > ADDRMAN_HORIZON_DAYS*24*60*60) // not seen in recent history
+    if (nTime == 0 || nNow - nTime > ADDRMAN_HORIZON_DAYS * 24 * 60 * 60) // not seen in recent history
         return true;
 
-    if (nLastSuccess==0 && nAttempts>=ADDRMAN_RETRIES) // tried N times and never a success
+    if (nLastSuccess == 0 && nAttempts >= ADDRMAN_RETRIES) // tried N times and never a success
         return true;
 
-    if (nNow-nLastSuccess > ADDRMAN_MIN_FAIL_DAYS*24*60*60 && nAttempts>=ADDRMAN_MAX_FAILURES) // N successive failures in the last week
+    if (nNow - nLastSuccess > ADDRMAN_MIN_FAIL_DAYS * 24 * 60 * 60 && nAttempts >= ADDRMAN_MAX_FAILURES) // N successive failures in the last week
         return true;
 
     return false;
@@ -64,23 +64,25 @@ double CAddrInfo::GetChance(int64_t nNow) const
     int64_t nSinceLastSeen = nNow - nTime;
     int64_t nSinceLastTry = nNow - nLastTry;
 
-    if (nSinceLastSeen < 0) nSinceLastSeen = 0;
-    if (nSinceLastTry < 0) nSinceLastTry = 0;
+    if (nSinceLastSeen < 0)
+        nSinceLastSeen = 0;
+    if (nSinceLastTry < 0)
+        nSinceLastTry = 0;
 
     fChance *= 600.0 / (600.0 + nSinceLastSeen);
 
     // deprioritize very recent attempts away
-    if (nSinceLastTry < 60*10)
+    if (nSinceLastTry < 60 * 10)
         fChance *= 0.01;
 
     // deprioritize 50% after each failed attempt
-    for (int n=0; n<nAttempts; n++)
+    for (int n = 0; n < nAttempts; n++)
         fChance /= 1.5;
 
     return fChance;
 }
 
-CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int *pnId)
+CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int* pnId)
 {
     std::map<CNetAddr, int>::iterator it = mapAddr.find(addr);
     if (it == mapAddr.end())
@@ -93,7 +95,7 @@ CAddrInfo* CAddrMan::Find(const CNetAddr& addr, int *pnId)
     return NULL;
 }
 
-CAddrInfo* CAddrMan::Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId)
+CAddrInfo* CAddrMan::Create(const CAddress& addr, const CNetAddr& addrSource, int* pnId)
 {
     int nId = nIdCount++;
     mapInfo[nId] = CAddrInfo(addr, addrSource);
@@ -127,22 +129,21 @@ void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2)
 
 int CAddrMan::SelectTried(int nKBucket)
 {
-    std::vector<int> &vTried = vvTried[nKBucket];
+    std::vector<int>& vTried = vvTried[nKBucket];
 
     // random shuffle the first few elements (using the entire list)
     // find the least recently tried among them
     int64_t nOldest = -1;
     int nOldestPos = -1;
-    for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++)
-    {
+    for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++) {
         int nPos = GetRandInt(vTried.size() - i) + i;
         int nTemp = vTried[nPos];
         vTried[nPos] = vTried[i];
         vTried[i] = nTemp;
         assert(nOldest == -1 || mapInfo.count(nTemp) == 1);
         if (nOldest == -1 || mapInfo[nTemp].nLastSuccess < mapInfo[nOldest].nLastSuccess) {
-           nOldest = nTemp;
-           nOldestPos = nPos;
+            nOldest = nTemp;
+            nOldestPos = nPos;
         }
     }
 
@@ -152,18 +153,15 @@ int CAddrMan::SelectTried(int nKBucket)
 int CAddrMan::ShrinkNew(int nUBucket)
 {
     assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size());
-    std::set<int> &vNew = vvNew[nUBucket];
+    std::set<int>& vNew = vvNew[nUBucket];
 
     // first look for deletable items
-    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++)
-    {
+    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
         assert(mapInfo.count(*it));
-        CAddrInfo &info = mapInfo[*it];
-        if (info.IsTerrible())
-        {
-            if (--info.nRefCount == 0)
-            {
-                SwapRandom(info.nRandomPos, vRandom.size()-1);
+        CAddrInfo& info = mapInfo[*it];
+        if (info.IsTerrible()) {
+            if (--info.nRefCount == 0) {
+                SwapRandom(info.nRandomPos, vRandom.size() - 1);
                 vRandom.pop_back();
                 mapAddr.erase(info);
                 mapInfo.erase(*it);
@@ -178,10 +176,8 @@ int CAddrMan::ShrinkNew(int nUBucket)
     int n[4] = {GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size())};
     int nI = 0;
     int nOldest = -1;
-    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++)
-    {
-        if (nI == n[0] || nI == n[1] || nI == n[2] || nI == n[3])
-        {
+    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
+        if (nI == n[0] || nI == n[1] || nI == n[2] || nI == n[3]) {
             assert(nOldest == -1 || mapInfo.count(*it) == 1);
             if (nOldest == -1 || mapInfo[*it].nTime < mapInfo[nOldest].nTime)
                 nOldest = *it;
@@ -189,10 +185,9 @@ int CAddrMan::ShrinkNew(int nUBucket)
         nI++;
     }
     assert(mapInfo.count(nOldest) == 1);
-    CAddrInfo &info = mapInfo[nOldest];
-    if (--info.nRefCount == 0)
-    {
-        SwapRandom(info.nRandomPos, vRandom.size()-1);
+    CAddrInfo& info = mapInfo[nOldest];
+    if (--info.nRefCount == 0) {
+        SwapRandom(info.nRandomPos, vRandom.size() - 1);
         vRandom.pop_back();
         mapAddr.erase(info);
         mapInfo.erase(nOldest);
@@ -208,8 +203,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
     assert(vvNew[nOrigin].count(nId) == 1);
 
     // remove the entry from all new buckets
-    for (std::vector<std::set<int> >::iterator it = vvNew.begin(); it != vvNew.end(); it++)
-    {
+    for (std::vector<std::set<int> >::iterator it = vvNew.begin(); it != vvNew.end(); it++) {
         if ((*it).erase(nId))
             info.nRefCount--;
     }
@@ -219,11 +213,10 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
 
     // what tried bucket to move the entry to
     int nKBucket = info.GetTriedBucket(nKey);
-    std::vector<int> &vTried = vvTried[nKBucket];
+    std::vector<int>& vTried = vvTried[nKBucket];
 
     // first check whether there is place to just add it
-    if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE)
-    {
+    if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) {
         vTried.push_back(nId);
         nTried++;
         info.fInTried = true;
@@ -236,7 +229,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
     // find which new bucket it belongs to
     assert(mapInfo.count(vTried[nPos]) == 1);
     int nUBucket = mapInfo[vTried[nPos]].GetNewBucket(nKey);
-    std::set<int> &vNew = vvNew[nUBucket];
+    std::set<int>& vNew = vvNew[nUBucket];
 
     // remove the to-be-replaced tried entry from the tried set
     CAddrInfo& infoOld = mapInfo[vTried[nPos]];
@@ -245,8 +238,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
     // do not update nTried, as we are going to move something else there immediately
 
     // check whether there is place in that one,
-    if (vNew.size() < ADDRMAN_NEW_BUCKET_SIZE)
-    {
+    if (vNew.size() < ADDRMAN_NEW_BUCKET_SIZE) {
         // if so, move it back there
         vNew.insert(vTried[nPos]);
     } else {
@@ -261,16 +253,16 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
     return;
 }
 
-void CAddrMan::Good_(const CService &addr, int64_t nTime)
+void CAddrMan::Good_(const CService& addr, int64_t nTime)
 {
     int nId;
-    CAddrInfo *pinfo = Find(addr, &nId);
+    CAddrInfo* pinfo = Find(addr, &nId);
 
     // if not found, bail out
     if (!pinfo)
         return;
 
-    CAddrInfo &info = *pinfo;
+    CAddrInfo& info = *pinfo;
 
     // check whether we are talking about the exact same CService (including same port)
     if (info != addr)
@@ -289,12 +281,10 @@ void CAddrMan::Good_(const CService &addr, int64_t nTime)
     // find a bucket it is in now
     int nRnd = GetRandInt(vvNew.size());
     int nUBucket = -1;
-    for (unsigned int n = 0; n < vvNew.size(); n++)
-    {
-        int nB = (n+nRnd) % vvNew.size();
-        std::set<int> &vNew = vvNew[nB];
-        if (vNew.count(nId))
-        {
+    for (unsigned int n = 0; n < vvNew.size(); n++) {
+        int nB = (n + nRnd) % vvNew.size();
+        std::set<int>& vNew = vvNew[nB];
+        if (vNew.count(nId)) {
             nUBucket = nB;
             break;
         }
@@ -302,7 +292,8 @@ void CAddrMan::Good_(const CService &addr, int64_t nTime)
 
     // if no bucket is found, something bad happened;
     // TODO: maybe re-add the node, but for now, just bail out
-    if (nUBucket == -1) return;
+    if (nUBucket == -1)
+        return;
 
     LogPrint("addrman", "Moving %s to tried\n", addr.ToString());
 
@@ -310,17 +301,16 @@ void CAddrMan::Good_(const CService &addr, int64_t nTime)
     MakeTried(info, nId, nUBucket);
 }
 
-bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty)
+bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
 {
     if (!addr.IsRoutable())
         return false;
 
     bool fNew = false;
     int nId;
-    CAddrInfo *pinfo = Find(addr, &nId);
+    CAddrInfo* pinfo = Find(addr, &nId);
 
-    if (pinfo)
-    {
+    if (pinfo) {
         // periodically update nTime
         bool fCurrentlyOnline = (GetAdjustedTime() - addr.nTime < 24 * 60 * 60);
         int64_t nUpdateInterval = (fCurrentlyOnline ? 60 * 60 : 24 * 60 * 60);
@@ -344,7 +334,7 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimeP
 
         // stochastic test: previous nRefCount == N: 2^N times harder to increase it
         int nFactor = 1;
-        for (int n=0; n<pinfo->nRefCount; n++)
+        for (int n = 0; n < pinfo->nRefCount; n++)
             nFactor *= 2;
         if (nFactor > 1 && (GetRandInt(nFactor) != 0))
             return false;
@@ -356,9 +346,8 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimeP
     }
 
     int nUBucket = pinfo->GetNewBucket(nKey, source);
-    std::set<int> &vNew = vvNew[nUBucket];
-    if (!vNew.count(nId))
-    {
+    std::set<int>& vNew = vvNew[nUBucket];
+    if (!vNew.count(nId)) {
         pinfo->nRefCount++;
         if (vNew.size() == ADDRMAN_NEW_BUCKET_SIZE)
             ShrinkNew(nUBucket);
@@ -367,15 +356,15 @@ bool CAddrMan::Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimeP
     return fNew;
 }
 
-void CAddrMan::Attempt_(const CService &addr, int64_t nTime)
+void CAddrMan::Attempt_(const CService& addr, int64_t nTime)
 {
-    CAddrInfo *pinfo = Find(addr);
+    CAddrInfo* pinfo = Find(addr);
 
     // if not found, bail out
     if (!pinfo)
         return;
 
-    CAddrInfo &info = *pinfo;
+    CAddrInfo& info = *pinfo;
 
     // check whether we are talking about the exact same CService (including same port)
     if (info != addr)
@@ -393,37 +382,36 @@ CAddress CAddrMan::Select_(int nUnkBias)
 
     double nCorTried = sqrt(nTried) * (100.0 - nUnkBias);
     double nCorNew = sqrt(nNew) * nUnkBias;
-    if ((nCorTried + nCorNew)*GetRandInt(1<<30)/(1<<30) < nCorTried)
-    {
+    if ((nCorTried + nCorNew) * GetRandInt(1 << 30) / (1 << 30) < nCorTried) {
         // use a tried node
         double fChanceFactor = 1.0;
-        while(1)
-        {
+        while (1) {
             int nKBucket = GetRandInt(vvTried.size());
-            std::vector<int> &vTried = vvTried[nKBucket];
-            if (vTried.size() == 0) continue;
+            std::vector<int>& vTried = vvTried[nKBucket];
+            if (vTried.size() == 0)
+                continue;
             int nPos = GetRandInt(vTried.size());
             assert(mapInfo.count(vTried[nPos]) == 1);
-            CAddrInfo &info = mapInfo[vTried[nPos]];
-            if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30))
+            CAddrInfo& info = mapInfo[vTried[nPos]];
+            if (GetRandInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30))
                 return info;
             fChanceFactor *= 1.2;
         }
     } else {
         // use a new node
         double fChanceFactor = 1.0;
-        while(1)
-        {
+        while (1) {
             int nUBucket = GetRandInt(vvNew.size());
-            std::set<int> &vNew = vvNew[nUBucket];
-            if (vNew.size() == 0) continue;
+            std::set<int>& vNew = vvNew[nUBucket];
+            if (vNew.size() == 0)
+                continue;
             int nPos = GetRandInt(vNew.size());
             std::set<int>::iterator it = vNew.begin();
             while (nPos--)
                 it++;
             assert(mapInfo.count(*it) == 1);
-            CAddrInfo &info = mapInfo[*it];
-            if (GetRandInt(1<<30) < fChanceFactor*info.GetChance()*(1<<30))
+            CAddrInfo& info = mapInfo[*it];
+            if (GetRandInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30))
                 return info;
             fChanceFactor *= 1.2;
         }
@@ -436,69 +424,76 @@ int CAddrMan::Check_()
     std::set<int> setTried;
     std::map<int, int> mapNew;
 
-    if (vRandom.size() != nTried + nNew) return -7;
+    if (vRandom.size() != nTried + nNew)
+        return -7;
 
-    for (std::map<int, CAddrInfo>::iterator it = mapInfo.begin(); it != mapInfo.end(); it++)
-    {
+    for (std::map<int, CAddrInfo>::iterator it = mapInfo.begin(); it != mapInfo.end(); it++) {
         int n = (*it).first;
-        CAddrInfo &info = (*it).second;
-        if (info.fInTried)
-        {
-
-            if (!info.nLastSuccess) return -1;
-            if (info.nRefCount) return -2;
+        CAddrInfo& info = (*it).second;
+        if (info.fInTried) {
+            if (!info.nLastSuccess)
+                return -1;
+            if (info.nRefCount)
+                return -2;
             setTried.insert(n);
         } else {
-            if (info.nRefCount < 0 || info.nRefCount > ADDRMAN_NEW_BUCKETS_PER_ADDRESS) return -3;
-            if (!info.nRefCount) return -4;
+            if (info.nRefCount < 0 || info.nRefCount > ADDRMAN_NEW_BUCKETS_PER_ADDRESS)
+                return -3;
+            if (!info.nRefCount)
+                return -4;
             mapNew[n] = info.nRefCount;
         }
-        if (mapAddr[info] != n) return -5;
-        if (info.nRandomPos<0 || info.nRandomPos>=vRandom.size() || vRandom[info.nRandomPos] != n) return -14;
-        if (info.nLastTry < 0) return -6;
-        if (info.nLastSuccess < 0) return -8;
+        if (mapAddr[info] != n)
+            return -5;
+        if (info.nRandomPos < 0 || info.nRandomPos >= vRandom.size() || vRandom[info.nRandomPos] != n)
+            return -14;
+        if (info.nLastTry < 0)
+            return -6;
+        if (info.nLastSuccess < 0)
+            return -8;
     }
 
-    if (setTried.size() != nTried) return -9;
-    if (mapNew.size() != nNew) return -10;
+    if (setTried.size() != nTried)
+        return -9;
+    if (mapNew.size() != nNew)
+        return -10;
 
-    for (int n=0; n<vvTried.size(); n++)
-    {
-        std::vector<int> &vTried = vvTried[n];
-        for (std::vector<int>::iterator it = vTried.begin(); it != vTried.end(); it++)
-        {
-            if (!setTried.count(*it)) return -11;
+    for (int n = 0; n < vvTried.size(); n++) {
+        std::vector<int>& vTried = vvTried[n];
+        for (std::vector<int>::iterator it = vTried.begin(); it != vTried.end(); it++) {
+            if (!setTried.count(*it))
+                return -11;
             setTried.erase(*it);
         }
     }
 
-    for (int n=0; n<vvNew.size(); n++)
-    {
-        std::set<int> &vNew = vvNew[n];
-        for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++)
-        {
-            if (!mapNew.count(*it)) return -12;
+    for (int n = 0; n < vvNew.size(); n++) {
+        std::set<int>& vNew = vvNew[n];
+        for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
+            if (!mapNew.count(*it))
+                return -12;
             if (--mapNew[*it] == 0)
                 mapNew.erase(*it);
         }
     }
 
-    if (setTried.size()) return -13;
-    if (mapNew.size()) return -15;
+    if (setTried.size())
+        return -13;
+    if (mapNew.size())
+        return -15;
 
     return 0;
 }
 #endif
 
-void CAddrMan::GetAddr_(std::vector<CAddress> &vAddr)
+void CAddrMan::GetAddr_(std::vector<CAddress>& vAddr)
 {
     unsigned int nNodes = ADDRMAN_GETADDR_MAX_PCT * vRandom.size() / 100;
     if (nNodes > ADDRMAN_GETADDR_MAX)
         nNodes = ADDRMAN_GETADDR_MAX;
 
     // gather a list of random nodes, skipping those of low quality
-    for (unsigned int n = 0; n < vRandom.size(); n++)
-    {
+    for (unsigned int n = 0; n < vRandom.size(); n++) {
         if (vAddr.size() >= nNodes)
             break;
 
@@ -512,15 +507,15 @@ void CAddrMan::GetAddr_(std::vector<CAddress> &vAddr)
     }
 }
 
-void CAddrMan::Connected_(const CService &addr, int64_t nTime)
+void CAddrMan::Connected_(const CService& addr, int64_t nTime)
 {
-    CAddrInfo *pinfo = Find(addr);
+    CAddrInfo* pinfo = Find(addr);
 
     // if not found, bail out
     if (!pinfo)
         return;
 
-    CAddrInfo &info = *pinfo;
+    CAddrInfo& info = *pinfo;
 
     // check whether we are talking about the exact same CService (including same port)
     if (info != addr)
diff --git a/src/allocators.cpp b/src/allocators.cpp
index 8ecd7206cda2..dfe26f1b1e22 100644
--- a/src/allocators.cpp
+++ b/src/allocators.cpp
@@ -37,13 +37,13 @@ static inline size_t GetSystemPageSize()
     page_size = sSysInfo.dwPageSize;
 #elif defined(PAGESIZE) // defined in limits.h
     page_size = PAGESIZE;
-#else // assume some POSIX OS
+#else                   // assume some POSIX OS
     page_size = sysconf(_SC_PAGESIZE);
 #endif
     return page_size;
 }
 
-bool MemoryPageLocker::Lock(const void *addr, size_t len)
+bool MemoryPageLocker::Lock(const void* addr, size_t len)
 {
 #ifdef WIN32
     return VirtualLock(const_cast<void*>(addr), len) != 0;
@@ -52,7 +52,7 @@ bool MemoryPageLocker::Lock(const void *addr, size_t len)
 #endif
 }
 
-bool MemoryPageLocker::Unlock(const void *addr, size_t len)
+bool MemoryPageLocker::Unlock(const void* addr, size_t len)
 {
 #ifdef WIN32
     return VirtualUnlock(const_cast<void*>(addr), len) != 0;
@@ -64,4 +64,3 @@ bool MemoryPageLocker::Unlock(const void *addr, size_t len)
 LockedPageManager::LockedPageManager() : LockedPageManagerBase<MemoryPageLocker>(GetSystemPageSize())
 {
 }
-
diff --git a/src/allocators.h b/src/allocators.h
index 65a7d089874e..6b69e7ae69cf 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -26,14 +26,14 @@
  * small objects that span up to a few pages, mostly smaller than a page. To support large allocations,
  * something like an interval tree would be the preferred data structure.
  */
-template <class Locker> class LockedPageManagerBase
+template <class Locker>
+class LockedPageManagerBase
 {
 public:
-    LockedPageManagerBase(size_t page_size):
-        page_size(page_size)
+    LockedPageManagerBase(size_t page_size) : page_size(page_size)
     {
         // Determine bitmask for extracting page from address
-        assert(!(page_size & (page_size-1))); // size must be power of two
+        assert(!(page_size & (page_size - 1))); // size must be power of two
         page_mask = ~(page_size - 1);
     }
 
@@ -44,22 +44,21 @@ template <class Locker> class LockedPageManagerBase
 
 
     // For all pages in affected range, increase lock count
-    void LockRange(void *p, size_t size)
+    void LockRange(void* p, size_t size)
     {
         boost::mutex::scoped_lock lock(mutex);
-        if(!size) return;
+        if (!size)
+            return;
         const size_t base_addr = reinterpret_cast<size_t>(p);
         const size_t start_page = base_addr & page_mask;
         const size_t end_page = (base_addr + size - 1) & page_mask;
-        for(size_t page = start_page; page <= end_page; page += page_size)
-        {
+        for (size_t page = start_page; page <= end_page; page += page_size) {
             Histogram::iterator it = histogram.find(page);
-            if(it == histogram.end()) // Newly locked page
+            if (it == histogram.end()) // Newly locked page
             {
                 locker.Lock(reinterpret_cast<void*>(page), page_size);
                 histogram.insert(std::make_pair(page, 1));
-            }
-            else // Page was already locked; increase counter
+            } else // Page was already locked; increase counter
             {
                 it->second += 1;
             }
@@ -67,20 +66,20 @@ template <class Locker> class LockedPageManagerBase
     }
 
     // For all pages in affected range, decrease lock count
-    void UnlockRange(void *p, size_t size)
+    void UnlockRange(void* p, size_t size)
     {
         boost::mutex::scoped_lock lock(mutex);
-        if(!size) return;
+        if (!size)
+            return;
         const size_t base_addr = reinterpret_cast<size_t>(p);
         const size_t start_page = base_addr & page_mask;
         const size_t end_page = (base_addr + size - 1) & page_mask;
-        for(size_t page = start_page; page <= end_page; page += page_size)
-        {
+        for (size_t page = start_page; page <= end_page; page += page_size) {
             Histogram::iterator it = histogram.find(page);
             assert(it != histogram.end()); // Cannot unlock an area that was not locked
             // Decrease counter for page, when it is zero, the page will be unlocked
             it->second -= 1;
-            if(it->second == 0) // Nothing on the page anymore that keeps it locked
+            if (it->second == 0) // Nothing on the page anymore that keeps it locked
             {
                 // Unlock page and remove the count from histogram
                 locker.Unlock(reinterpret_cast<void*>(page), page_size);
@@ -101,7 +100,7 @@ template <class Locker> class LockedPageManagerBase
     boost::mutex mutex;
     size_t page_size, page_mask;
     // map of page base address to lock count
-    typedef std::map<size_t,int> Histogram;
+    typedef std::map<size_t, int> Histogram;
     Histogram histogram;
 };
 
@@ -116,11 +115,11 @@ class MemoryPageLocker
     /** Lock memory pages.
      * addr and len must be a multiple of the system page size
      */
-    bool Lock(const void *addr, size_t len);
+    bool Lock(const void* addr, size_t len);
     /** Unlock memory pages.
      * addr and len must be a multiple of the system page size
      */
-    bool Unlock(const void *addr, size_t len);
+    bool Unlock(const void* addr, size_t len);
 };
 
 /**
@@ -134,10 +133,10 @@ class MemoryPageLocker
  * secure_allocator are created. So instead of having LockedPageManager also be
  * static-initialized, it is created on demand.
  */
-class LockedPageManager: public LockedPageManagerBase<MemoryPageLocker>
+class LockedPageManager : public LockedPageManagerBase<MemoryPageLocker>
 {
 public:
-    static LockedPageManager& Instance() 
+    static LockedPageManager& Instance()
     {
         boost::call_once(LockedPageManager::CreateInstance, LockedPageManager::init_flag);
         return *LockedPageManager::_instance;
@@ -165,11 +164,15 @@ class LockedPageManager: public LockedPageManagerBase<MemoryPageLocker>
 // Functions for directly locking/unlocking memory objects.
 // Intended for non-dynamically allocated structures.
 //
-template<typename T> void LockObject(const T &t) {
+template <typename T>
+void LockObject(const T& t)
+{
     LockedPageManager::Instance().LockRange((void*)(&t), sizeof(T));
 }
 
-template<typename T> void UnlockObject(const T &t) {
+template <typename T>
+void UnlockObject(const T& t)
+{
     OPENSSL_cleanse((void*)(&t), sizeof(T));
     LockedPageManager::Instance().UnlockRange((void*)(&t), sizeof(T));
 }
@@ -178,13 +181,12 @@ template<typename T> void UnlockObject(const T &t) {
 // Allocator that locks its contents from being paged
 // out of memory and clears its contents before deletion.
 //
-template<typename T>
-struct secure_allocator : public std::allocator<T>
-{
+template <typename T>
+struct secure_allocator : public std::allocator<T> {
     // MSVC8 default copy constructor is broken
     typedef std::allocator<T> base;
     typedef typename base::size_type size_type;
-    typedef typename base::difference_type  difference_type;
+    typedef typename base::difference_type difference_type;
     typedef typename base::pointer pointer;
     typedef typename base::const_pointer const_pointer;
     typedef typename base::reference reference;
@@ -193,14 +195,18 @@ struct secure_allocator : public std::allocator<T>
     secure_allocator() throw() {}
     secure_allocator(const secure_allocator& a) throw() : base(a) {}
     template <typename U>
-    secure_allocator(const secure_allocator<U>& a) throw() : base(a) {}
+    secure_allocator(const secure_allocator<U>& a) throw() : base(a)
+    {
+    }
     ~secure_allocator() throw() {}
-    template<typename _Other> struct rebind
-    { typedef secure_allocator<_Other> other; };
+    template <typename _Other>
+    struct rebind {
+        typedef secure_allocator<_Other> other;
+    };
 
-    T* allocate(std::size_t n, const void *hint = 0)
+    T* allocate(std::size_t n, const void* hint = 0)
     {
-        T *p;
+        T* p;
         p = std::allocator<T>::allocate(n, hint);
         if (p != NULL)
             LockedPageManager::Instance().LockRange(p, sizeof(T) * n);
@@ -209,8 +215,7 @@ struct secure_allocator : public std::allocator<T>
 
     void deallocate(T* p, std::size_t n)
     {
-        if (p != NULL)
-        {
+        if (p != NULL) {
             OPENSSL_cleanse(p, sizeof(T) * n);
             LockedPageManager::Instance().UnlockRange(p, sizeof(T) * n);
         }
@@ -222,13 +227,12 @@ struct secure_allocator : public std::allocator<T>
 //
 // Allocator that clears its contents before deletion.
 //
-template<typename T>
-struct zero_after_free_allocator : public std::allocator<T>
-{
+template <typename T>
+struct zero_after_free_allocator : public std::allocator<T> {
     // MSVC8 default copy constructor is broken
     typedef std::allocator<T> base;
     typedef typename base::size_type size_type;
-    typedef typename base::difference_type  difference_type;
+    typedef typename base::difference_type difference_type;
     typedef typename base::pointer pointer;
     typedef typename base::const_pointer const_pointer;
     typedef typename base::reference reference;
@@ -237,10 +241,14 @@ struct zero_after_free_allocator : public std::allocator<T>
     zero_after_free_allocator() throw() {}
     zero_after_free_allocator(const zero_after_free_allocator& a) throw() : base(a) {}
     template <typename U>
-    zero_after_free_allocator(const zero_after_free_allocator<U>& a) throw() : base(a) {}
+    zero_after_free_allocator(const zero_after_free_allocator<U>& a) throw() : base(a)
+    {
+    }
     ~zero_after_free_allocator() throw() {}
-    template<typename _Other> struct rebind
-    { typedef zero_after_free_allocator<_Other> other; };
+    template <typename _Other>
+    struct rebind {
+        typedef zero_after_free_allocator<_Other> other;
+    };
 
     void deallocate(T* p, std::size_t n)
     {
diff --git a/src/base58.cpp b/src/base58.cpp
index 76f0404a184d..9750f0a161d9 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -18,7 +18,8 @@
 /* All alphanumeric characters except for "0", "I", "O", and "l" */
 static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
 
-bool DecodeBase58(const char *psz, std::vector<unsigned char>& vch) {
+bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
+{
     // Skip leading spaces.
     while (*psz && isspace(*psz))
         psz++;
@@ -33,7 +34,7 @@ bool DecodeBase58(const char *psz, std::vector<unsigned char>& vch) {
     // Process the characters.
     while (*psz && !isspace(*psz)) {
         // Decode base58 character
-        const char *ch = strchr(pszBase58, *psz);
+        const char* ch = strchr(pszBase58, *psz);
         if (ch == NULL)
             return false;
         // Apply "b256 = b256 * 58 + ch".
@@ -59,11 +60,12 @@ bool DecodeBase58(const char *psz, std::vector<unsigned char>& vch) {
     vch.reserve(zeroes + (b256.end() - it));
     vch.assign(zeroes, 0x00);
     while (it != b256.end())
-      vch.push_back(*(it++));
+        vch.push_back(*(it++));
     return true;
 }
 
-std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend) {
+std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
+{
     // Skip & count leading zeroes.
     int zeroes = 0;
     while (pbegin != pend && *pbegin == 0) {
@@ -97,15 +99,18 @@ std::string EncodeBase58(const unsigned char* pbegin, const unsigned char* pend)
     return str;
 }
 
-std::string EncodeBase58(const std::vector<unsigned char>& vch) {
+std::string EncodeBase58(const std::vector<unsigned char>& vch)
+{
     return EncodeBase58(&vch[0], &vch[0] + vch.size());
 }
 
-bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet) {
+bool DecodeBase58(const std::string& str, std::vector<unsigned char>& vchRet)
+{
     return DecodeBase58(str.c_str(), vchRet);
 }
 
-std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) {
+std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn)
+{
     // add 4-byte hash check to the end
     std::vector<unsigned char> vch(vchIn);
     uint256 hash = Hash(vch.begin(), vch.end());
@@ -113,45 +118,49 @@ std::string EncodeBase58Check(const std::vector<unsigned char>& vchIn) {
     return EncodeBase58(vch);
 }
 
-bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet) {
+bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vchRet)
+{
     if (!DecodeBase58(psz, vchRet) ||
-        (vchRet.size() < 4))
-    {
+        (vchRet.size() < 4)) {
         vchRet.clear();
         return false;
     }
     // re-calculate the checksum, insure it matches the included 4-byte checksum
-    uint256 hash = Hash(vchRet.begin(), vchRet.end()-4);
-    if (memcmp(&hash, &vchRet.end()[-4], 4) != 0)
-    {
+    uint256 hash = Hash(vchRet.begin(), vchRet.end() - 4);
+    if (memcmp(&hash, &vchRet.end()[-4], 4) != 0) {
         vchRet.clear();
         return false;
     }
-    vchRet.resize(vchRet.size()-4);
+    vchRet.resize(vchRet.size() - 4);
     return true;
 }
 
-bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet) {
+bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet)
+{
     return DecodeBase58Check(str.c_str(), vchRet);
 }
 
-CBase58Data::CBase58Data() {
+CBase58Data::CBase58Data()
+{
     vchVersion.clear();
     vchData.clear();
 }
 
-void CBase58Data::SetData(const std::vector<unsigned char> &vchVersionIn, const void* pdata, size_t nSize) {
+void CBase58Data::SetData(const std::vector<unsigned char>& vchVersionIn, const void* pdata, size_t nSize)
+{
     vchVersion = vchVersionIn;
     vchData.resize(nSize);
     if (!vchData.empty())
         memcpy(&vchData[0], pdata, nSize);
 }
 
-void CBase58Data::SetData(const std::vector<unsigned char> &vchVersionIn, const unsigned char *pbegin, const unsigned char *pend) {
+void CBase58Data::SetData(const std::vector<unsigned char>& vchVersionIn, const unsigned char* pbegin, const unsigned char* pend)
+{
     SetData(vchVersionIn, (void*)pbegin, pend - pbegin);
 }
 
-bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes) {
+bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes)
+{
     std::vector<unsigned char> vchTemp;
     bool rc58 = DecodeBase58Check(psz, vchTemp);
     if ((!rc58) || (vchTemp.size() < nVersionBytes)) {
@@ -167,65 +176,80 @@ bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes) {
     return true;
 }
 
-bool CBase58Data::SetString(const std::string& str) {
+bool CBase58Data::SetString(const std::string& str)
+{
     return SetString(str.c_str());
 }
 
-std::string CBase58Data::ToString() const {
+std::string CBase58Data::ToString() const
+{
     std::vector<unsigned char> vch = vchVersion;
     vch.insert(vch.end(), vchData.begin(), vchData.end());
     return EncodeBase58Check(vch);
 }
 
-int CBase58Data::CompareTo(const CBase58Data& b58) const {
-    if (vchVersion < b58.vchVersion) return -1;
-    if (vchVersion > b58.vchVersion) return  1;
-    if (vchData < b58.vchData)   return -1;
-    if (vchData > b58.vchData)   return  1;
+int CBase58Data::CompareTo(const CBase58Data& b58) const
+{
+    if (vchVersion < b58.vchVersion)
+        return -1;
+    if (vchVersion > b58.vchVersion)
+        return 1;
+    if (vchData < b58.vchData)
+        return -1;
+    if (vchData > b58.vchData)
+        return 1;
     return 0;
 }
 
-namespace {
+namespace
+{
+class CBitcoinAddressVisitor : public boost::static_visitor<bool>
+{
+private:
+    CBitcoinAddress* addr;
 
-    class CBitcoinAddressVisitor : public boost::static_visitor<bool> {
-    private:
-        CBitcoinAddress *addr;
-    public:
-        CBitcoinAddressVisitor(CBitcoinAddress *addrIn) : addr(addrIn) { }
+public:
+    CBitcoinAddressVisitor(CBitcoinAddress* addrIn) : addr(addrIn) {}
 
-        bool operator()(const CKeyID &id) const { return addr->Set(id); }
-        bool operator()(const CScriptID &id) const { return addr->Set(id); }
-        bool operator()(const CNoDestination &no) const { return false; }
-    };
+    bool operator()(const CKeyID& id) const { return addr->Set(id); }
+    bool operator()(const CScriptID& id) const { return addr->Set(id); }
+    bool operator()(const CNoDestination& no) const { return false; }
+};
 
 } // anon namespace
 
-bool CBitcoinAddress::Set(const CKeyID &id) {
+bool CBitcoinAddress::Set(const CKeyID& id)
+{
     SetData(Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS), &id, 20);
     return true;
 }
 
-bool CBitcoinAddress::Set(const CScriptID &id) {
+bool CBitcoinAddress::Set(const CScriptID& id)
+{
     SetData(Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS), &id, 20);
     return true;
 }
 
-bool CBitcoinAddress::Set(const CTxDestination &dest) {
+bool CBitcoinAddress::Set(const CTxDestination& dest)
+{
     return boost::apply_visitor(CBitcoinAddressVisitor(this), dest);
 }
 
-bool CBitcoinAddress::IsValid() const {
+bool CBitcoinAddress::IsValid() const
+{
     return IsValid(Params());
 }
 
-bool CBitcoinAddress::IsValid(const CChainParams &params) const {
+bool CBitcoinAddress::IsValid(const CChainParams& params) const
+{
     bool fCorrectSize = vchData.size() == 20;
     bool fKnownVersion = vchVersion == params.Base58Prefix(CChainParams::PUBKEY_ADDRESS) ||
                          vchVersion == params.Base58Prefix(CChainParams::SCRIPT_ADDRESS);
     return fCorrectSize && fKnownVersion;
 }
 
-CTxDestination CBitcoinAddress::Get() const {
+CTxDestination CBitcoinAddress::Get() const
+{
     if (!IsValid())
         return CNoDestination();
     uint160 id;
@@ -238,7 +262,8 @@ CTxDestination CBitcoinAddress::Get() const {
         return CNoDestination();
 }
 
-bool CBitcoinAddress::GetKeyID(CKeyID &keyID) const {
+bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const
+{
     if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::PUBKEY_ADDRESS))
         return false;
     uint160 id;
@@ -247,33 +272,39 @@ bool CBitcoinAddress::GetKeyID(CKeyID &keyID) const {
     return true;
 }
 
-bool CBitcoinAddress::IsScript() const {
+bool CBitcoinAddress::IsScript() const
+{
     return IsValid() && vchVersion == Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS);
 }
 
-void CBitcoinSecret::SetKey(const CKey& vchSecret) {
+void CBitcoinSecret::SetKey(const CKey& vchSecret)
+{
     assert(vchSecret.IsValid());
     SetData(Params().Base58Prefix(CChainParams::SECRET_KEY), vchSecret.begin(), vchSecret.size());
     if (vchSecret.IsCompressed())
         vchData.push_back(1);
 }
 
-CKey CBitcoinSecret::GetKey() {
+CKey CBitcoinSecret::GetKey()
+{
     CKey ret;
     ret.Set(&vchData[0], &vchData[32], vchData.size() > 32 && vchData[32] == 1);
     return ret;
 }
 
-bool CBitcoinSecret::IsValid() const {
+bool CBitcoinSecret::IsValid() const
+{
     bool fExpectedFormat = vchData.size() == 32 || (vchData.size() == 33 && vchData[32] == 1);
     bool fCorrectVersion = vchVersion == Params().Base58Prefix(CChainParams::SECRET_KEY);
     return fExpectedFormat && fCorrectVersion;
 }
 
-bool CBitcoinSecret::SetString(const char* pszSecret) {
+bool CBitcoinSecret::SetString(const char* pszSecret)
+{
     return CBase58Data::SetString(pszSecret) && IsValid();
 }
 
-bool CBitcoinSecret::SetString(const std::string& strSecret) {
+bool CBitcoinSecret::SetString(const std::string& strSecret)
+{
     return SetString(strSecret.c_str());
 }
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index d1e19871c370..98bb5b855fe3 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -17,9 +17,11 @@ using namespace boost::assign;
 // Main network
 //
 
-class CBaseMainParams : public CBaseChainParams {
+class CBaseMainParams : public CBaseChainParams
+{
 public:
-    CBaseMainParams() {
+    CBaseMainParams()
+    {
         networkID = CBaseChainParams::MAIN;
         nRPCPort = 8332;
     }
@@ -29,9 +31,11 @@ static CBaseMainParams mainParams;
 //
 // Testnet (v3)
 //
-class CBaseTestNetParams : public CBaseMainParams {
+class CBaseTestNetParams : public CBaseMainParams
+{
 public:
-    CBaseTestNetParams() {
+    CBaseTestNetParams()
+    {
         networkID = CBaseChainParams::TESTNET;
         nRPCPort = 18332;
         strDataDir = "testnet3";
@@ -42,40 +46,45 @@ static CBaseTestNetParams testNetParams;
 //
 // Regression test
 //
-class CBaseRegTestParams : public CBaseTestNetParams {
+class CBaseRegTestParams : public CBaseTestNetParams
+{
 public:
-    CBaseRegTestParams() {
+    CBaseRegTestParams()
+    {
         networkID = CBaseChainParams::REGTEST;
         strDataDir = "regtest";
     }
 };
 static CBaseRegTestParams regTestParams;
 
-static CBaseChainParams *pCurrentBaseParams = 0;
+static CBaseChainParams* pCurrentBaseParams = 0;
 
-const CBaseChainParams &BaseParams() {
+const CBaseChainParams& BaseParams()
+{
     assert(pCurrentBaseParams);
     return *pCurrentBaseParams;
 }
 
-void SelectBaseParams(CBaseChainParams::Network network) {
+void SelectBaseParams(CBaseChainParams::Network network)
+{
     switch (network) {
-        case CBaseChainParams::MAIN:
-            pCurrentBaseParams = &mainParams;
-            break;
-        case CBaseChainParams::TESTNET:
-            pCurrentBaseParams = &testNetParams;
-            break;
-        case CBaseChainParams::REGTEST:
-            pCurrentBaseParams = &regTestParams;
-            break;
-        default:
-            assert(false && "Unimplemented network");
-            return;
+    case CBaseChainParams::MAIN:
+        pCurrentBaseParams = &mainParams;
+        break;
+    case CBaseChainParams::TESTNET:
+        pCurrentBaseParams = &testNetParams;
+        break;
+    case CBaseChainParams::REGTEST:
+        pCurrentBaseParams = &regTestParams;
+        break;
+    default:
+        assert(false && "Unimplemented network");
+        return;
     }
 }
 
-bool SelectBaseParamsFromCommandLine() {
+bool SelectBaseParamsFromCommandLine()
+{
     bool fRegTest = GetBoolArg("-regtest", false);
     bool fTestNet = GetBoolArg("-testnet", false);
 
@@ -93,6 +102,7 @@ bool SelectBaseParamsFromCommandLine() {
     return true;
 }
 
-bool AreBaseParamsConfigured() {
+bool AreBaseParamsConfigured()
+{
     return pCurrentBaseParams != NULL;
 }
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 743c8c541a54..c054f03f1739 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -26,6 +26,7 @@ class CBaseChainParams
     const std::string& DataDir() const { return strDataDir; }
     int RPCPort() const { return nRPCPort; }
     Network NetworkID() const { return networkID; }
+
 protected:
     CBaseChainParams() {}
 
@@ -38,7 +39,7 @@ class CBaseChainParams
  * Return the currently selected parameters. This won't change after app startup
  * outside of the unit tests.
  */
-const CBaseChainParams &BaseParams();
+const CBaseChainParams& BaseParams();
 
 /** Sets the params returned by Params() to those for the given network. */
 void SelectBaseParams(CBaseChainParams::Network network);
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 6d3f2d493563..fca046559ae9 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -13,20 +13,20 @@ class uint256;
 /** Block-chain checkpoints are compiled-in sanity checks.
  * They are updated every release or three.
  */
-namespace Checkpoints {
+namespace Checkpoints
+{
+// Returns true if block passes checkpoint checks
+bool CheckBlock(int nHeight, const uint256& hash);
 
-    // Returns true if block passes checkpoint checks
-    bool CheckBlock(int nHeight, const uint256& hash);
+// Return conservative estimate of total number of blocks, 0 if unknown
+int GetTotalBlocksEstimate();
 
-    // Return conservative estimate of total number of blocks, 0 if unknown
-    int GetTotalBlocksEstimate();
+// Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
+CBlockIndex* GetLastCheckpoint();
 
-    // Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
-    CBlockIndex* GetLastCheckpoint();
+double GuessVerificationProgress(CBlockIndex* pindex, bool fSigchecks = true);
 
-    double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks = true);
-
-    extern bool fEnabled;
+extern bool fEnabled;
 
 } //namespace Checkpoints
 
diff --git a/src/checkqueue.h b/src/checkqueue.h
index c2c7d8ca2482..b2a713e64671 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -13,7 +13,8 @@
 #include <boost/thread/locks.hpp>
 #include <boost/thread/mutex.hpp>
 
-template<typename T> class CCheckQueueControl;
+template <typename T>
+class CCheckQueueControl;
 
 /** Queue for verifications that have to be performed.
   * The verifications are represented by a type T, which must provide an
@@ -24,7 +25,9 @@ template<typename T> class CCheckQueueControl;
   * the master is done adding work, it temporarily joins the worker pool
   * as an N'th worker, until all jobs are done.
   */
-template<typename T> class CCheckQueue {
+template <typename T>
+class CCheckQueue
+{
 private:
     // Mutex to protect the inner state
     boost::mutex mutex;
@@ -60,8 +63,9 @@ template<typename T> class CCheckQueue {
     unsigned int nBatchSize;
 
     // Internal function that does bulk of the verification work.
-    bool Loop(bool fMaster = false) {
-        boost::condition_variable &cond = fMaster ? condMaster : condWorker;
+    bool Loop(bool fMaster = false)
+    {
+        boost::condition_variable& cond = fMaster ? condMaster : condWorker;
         std::vector<T> vChecks;
         vChecks.reserve(nBatchSize);
         unsigned int nNow = 0;
@@ -103,41 +107,43 @@ template<typename T> class CCheckQueue {
                 nNow = std::max(1U, std::min(nBatchSize, (unsigned int)queue.size() / (nTotal + nIdle + 1)));
                 vChecks.resize(nNow);
                 for (unsigned int i = 0; i < nNow; i++) {
-                     // We want the lock on the mutex to be as short as possible, so swap jobs from the global
-                     // queue to the local batch vector instead of copying.
-                     vChecks[i].swap(queue.back());
-                     queue.pop_back();
+                    // We want the lock on the mutex to be as short as possible, so swap jobs from the global
+                    // queue to the local batch vector instead of copying.
+                    vChecks[i].swap(queue.back());
+                    queue.pop_back();
                 }
                 // Check whether we need to do work at all
                 fOk = fAllOk;
             }
             // execute work
-            BOOST_FOREACH(T &check, vChecks)
+            BOOST_FOREACH (T& check, vChecks)
                 if (fOk)
                     fOk = check();
             vChecks.clear();
-        } while(true);
+        } while (true);
     }
 
 public:
     // Create a new check queue
-    CCheckQueue(unsigned int nBatchSizeIn) :
-        nIdle(0), nTotal(0), fAllOk(true), nTodo(0), fQuit(false), nBatchSize(nBatchSizeIn) {}
+    CCheckQueue(unsigned int nBatchSizeIn) : nIdle(0), nTotal(0), fAllOk(true), nTodo(0), fQuit(false), nBatchSize(nBatchSizeIn) {}
 
     // Worker thread
-    void Thread() {
+    void Thread()
+    {
         Loop();
     }
 
     // Wait until execution finishes, and return whether all evaluations where succesful.
-    bool Wait() {
+    bool Wait()
+    {
         return Loop(true);
     }
 
     // Add a batch of checks to the queue
-    void Add(std::vector<T> &vChecks) {
+    void Add(std::vector<T>& vChecks)
+    {
         boost::unique_lock<boost::mutex> lock(mutex);
-        BOOST_FOREACH(T &check, vChecks) {
+        BOOST_FOREACH (T& check, vChecks) {
             queue.push_back(T());
             check.swap(queue.back());
         }
@@ -148,7 +154,8 @@ template<typename T> class CCheckQueue {
             condWorker.notify_all();
     }
 
-    ~CCheckQueue() {
+    ~CCheckQueue()
+    {
     }
 
     friend class CCheckQueueControl<T>;
@@ -157,13 +164,16 @@ template<typename T> class CCheckQueue {
 /** RAII-style controller object for a CCheckQueue that guarantees the passed
  *  queue is finished before continuing.
  */
-template<typename T> class CCheckQueueControl {
+template <typename T>
+class CCheckQueueControl
+{
 private:
-    CCheckQueue<T> *pqueue;
+    CCheckQueue<T>* pqueue;
     bool fDone;
 
 public:
-    CCheckQueueControl(CCheckQueue<T> *pqueueIn) : pqueue(pqueueIn), fDone(false) {
+    CCheckQueueControl(CCheckQueue<T>* pqueueIn) : pqueue(pqueueIn), fDone(false)
+    {
         // passed queue is supposed to be unused, or NULL
         if (pqueue != NULL) {
             assert(pqueue->nTotal == pqueue->nIdle);
@@ -172,7 +182,8 @@ template<typename T> class CCheckQueueControl {
         }
     }
 
-    bool Wait() {
+    bool Wait()
+    {
         if (pqueue == NULL)
             return true;
         bool fRet = pqueue->Wait();
@@ -180,12 +191,14 @@ template<typename T> class CCheckQueueControl {
         return fRet;
     }
 
-    void Add(std::vector<T> &vChecks) {
+    void Add(std::vector<T>& vChecks)
+    {
         if (pqueue != NULL)
             pqueue->Add(vChecks);
     }
 
-    ~CCheckQueueControl() {
+    ~CCheckQueueControl()
+    {
         if (!fDone)
             Wait();
     }
diff --git a/src/clientversion.h b/src/clientversion.h
index 5634516ca4b4..cd7ceb78f0eb 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -13,13 +13,13 @@
 //
 
 // These need to be macros, as version.cpp's and bitcoin*-res.rc's voodoo requires it
-#define CLIENT_VERSION_MAJOR       0
-#define CLIENT_VERSION_MINOR       9
-#define CLIENT_VERSION_REVISION    99
-#define CLIENT_VERSION_BUILD       0
+#define CLIENT_VERSION_MAJOR 0
+#define CLIENT_VERSION_MINOR 9
+#define CLIENT_VERSION_REVISION 99
+#define CLIENT_VERSION_BUILD 0
 
 // Set to true for release, false for prerelease or test build
-#define CLIENT_VERSION_IS_RELEASE  false
+#define CLIENT_VERSION_IS_RELEASE false
 
 // Copyright year (2009-this)
 // Todo: update this when changing our copyright comments in the source
@@ -33,6 +33,6 @@
 #define DO_STRINGIZE(X) #X
 
 // Copyright string used in Windows .rc files
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
+#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
 
 #endif // CLIENTVERSION_H
diff --git a/src/coincontrol.h b/src/coincontrol.h
index 97c30c271320..033092c01954 100644
--- a/src/coincontrol.h
+++ b/src/coincontrol.h
@@ -57,7 +57,6 @@ class CCoinControl
 
 private:
     std::set<COutPoint> setSelected;
-
 };
 
 #endif // COINCONTROL_H
diff --git a/src/db.cpp b/src/db.cpp
index 24206d34e131..12650e459f39 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -30,7 +30,6 @@ using namespace boost;
 unsigned int nWalletDBUpdated;
 
 
-
 //
 // CDB
 //
@@ -94,15 +93,15 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
     dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1);
     dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);
     int ret = dbenv.open(path.string().c_str(),
-                     DB_CREATE     |
-                     DB_INIT_LOCK  |
-                     DB_INIT_LOG   |
-                     DB_INIT_MPOOL |
-                     DB_INIT_TXN   |
-                     DB_THREAD     |
-                     DB_RECOVER    |
-                     nEnvFlags,
-                     S_IRUSR | S_IWUSR);
+                         DB_CREATE |
+                             DB_INIT_LOCK |
+                             DB_INIT_LOG |
+                             DB_INIT_MPOOL |
+                             DB_INIT_TXN |
+                             DB_THREAD |
+                             DB_RECOVER |
+                             nEnvFlags,
+                         S_IRUSR | S_IWUSR);
     if (ret != 0)
         return error("CDBEnv::Open : Error %d opening database environment: %s\n", ret, DbEnv::strerror(ret));
 
@@ -121,21 +120,21 @@ void CDBEnv::MakeMock()
     LogPrint("db", "CDBEnv::MakeMock\n");
 
     dbenv.set_cachesize(1, 0, 1);
-    dbenv.set_lg_bsize(10485760*4);
+    dbenv.set_lg_bsize(10485760 * 4);
     dbenv.set_lg_max(10485760);
     dbenv.set_lk_max_locks(10000);
     dbenv.set_lk_max_objects(10000);
     dbenv.set_flags(DB_AUTO_COMMIT, 1);
     dbenv.log_set_config(DB_LOG_IN_MEMORY, 1);
     int ret = dbenv.open(NULL,
-                     DB_CREATE     |
-                     DB_INIT_LOCK  |
-                     DB_INIT_LOG   |
-                     DB_INIT_MPOOL |
-                     DB_INIT_TXN   |
-                     DB_THREAD     |
-                     DB_PRIVATE,
-                     S_IRUSR | S_IWUSR);
+                         DB_CREATE |
+                             DB_INIT_LOCK |
+                             DB_INIT_LOG |
+                             DB_INIT_MPOOL |
+                             DB_INIT_TXN |
+                             DB_THREAD |
+                             DB_PRIVATE,
+                         S_IRUSR | S_IWUSR);
     if (ret > 0)
         throw runtime_error(strprintf("CDBEnv::MakeMock : Error %d opening database environment.", ret));
 
@@ -160,30 +159,27 @@ CDBEnv::VerifyResult CDBEnv::Verify(std::string strFile, bool (*recoverFunc)(CDB
     return (fRecovered ? RECOVER_OK : RECOVER_FAIL);
 }
 
-bool CDBEnv::Salvage(std::string strFile, bool fAggressive,
-                     std::vector<CDBEnv::KeyValPair >& vResult)
+bool CDBEnv::Salvage(std::string strFile, bool fAggressive, std::vector<CDBEnv::KeyValPair>& vResult)
 {
     LOCK(cs_db);
     assert(mapFileUseCount.count(strFile) == 0);
 
     u_int32_t flags = DB_SALVAGE;
-    if (fAggressive) flags |= DB_AGGRESSIVE;
+    if (fAggressive)
+        flags |= DB_AGGRESSIVE;
 
     stringstream strDump;
 
     Db db(&dbenv, 0);
     int result = db.verify(strFile.c_str(), NULL, &strDump, flags);
-    if (result == DB_VERIFY_BAD)
-    {
+    if (result == DB_VERIFY_BAD) {
         LogPrintf("CDBEnv::Salvage : Database salvage found errors, all data may not be recoverable.\n");
-        if (!fAggressive)
-        {
+        if (!fAggressive) {
             LogPrintf("CDBEnv::Salvage : Rerun with aggressive mode to ignore errors and continue.\n");
             return false;
         }
     }
-    if (result != 0 && result != DB_VERIFY_BAD)
-    {
+    if (result != 0 && result != DB_VERIFY_BAD) {
         LogPrintf("CDBEnv::Salvage : Database salvage failed with result %d.\n", result);
         return false;
     }
@@ -201,13 +197,11 @@ bool CDBEnv::Salvage(std::string strFile, bool fAggressive,
         getline(strDump, strLine); // Skip past header
 
     std::string keyHex, valueHex;
-    while (!strDump.eof() && keyHex != "DATA=END")
-    {
+    while (!strDump.eof() && keyHex != "DATA=END") {
         getline(strDump, keyHex);
-        if (keyHex != "DATA_END")
-        {
+        if (keyHex != "DATA_END") {
             getline(strDump, valueHex);
-            vResult.push_back(make_pair(ParseHex(keyHex),ParseHex(valueHex)));
+            vResult.push_back(make_pair(ParseHex(keyHex), ParseHex(valueHex)));
         }
     }
 
@@ -224,8 +218,7 @@ void CDBEnv::CheckpointLSN(const std::string& strFile)
 }
 
 
-CDB::CDB(const std::string& strFilename, const char* pszMode) :
-    pdb(NULL), activeTxn(NULL)
+CDB::CDB(const std::string& strFilename, const char* pszMode) : pdb(NULL), activeTxn(NULL)
 {
     int ret;
     fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
@@ -245,28 +238,25 @@ CDB::CDB(const std::string& strFilename, const char* pszMode) :
         strFile = strFilename;
         ++bitdb.mapFileUseCount[strFile];
         pdb = bitdb.mapDb[strFile];
-        if (pdb == NULL)
-        {
+        if (pdb == NULL) {
             pdb = new Db(&bitdb.dbenv, 0);
 
             bool fMockDb = bitdb.IsMock();
-            if (fMockDb)
-            {
-                DbMpoolFile*mpf = pdb->get_mpf();
+            if (fMockDb) {
+                DbMpoolFile* mpf = pdb->get_mpf();
                 ret = mpf->set_flags(DB_MPOOL_NOFILE, 1);
                 if (ret != 0)
                     throw runtime_error(strprintf("CDB : Failed to configure for no temp file backing for database %s", strFile));
             }
 
-            ret = pdb->open(NULL, // Txn pointer
-                            fMockDb ? NULL : strFile.c_str(), // Filename
+            ret = pdb->open(NULL,                               // Txn pointer
+                            fMockDb ? NULL : strFile.c_str(),   // Filename
                             fMockDb ? strFile.c_str() : "main", // Logical db name
-                            DB_BTREE, // Database type
-                            nFlags, // Flags
+                            DB_BTREE,                           // Database type
+                            nFlags,                             // Flags
                             0);
 
-            if (ret != 0)
-            {
+            if (ret != 0) {
                 delete pdb;
                 pdb = NULL;
                 --bitdb.mapFileUseCount[strFile];
@@ -274,8 +264,7 @@ CDB::CDB(const std::string& strFilename, const char* pszMode) :
                 throw runtime_error(strprintf("CDB : Error %d, can't open database %s", ret, strFile));
             }
 
-            if (fCreate && !Exists(string("version")))
-            {
+            if (fCreate && !Exists(string("version"))) {
                 bool fTmp = fReadOnly;
                 fReadOnly = false;
                 WriteVersion(CLIENT_VERSION);
@@ -297,7 +286,7 @@ void CDB::Flush()
     if (fReadOnly)
         nMinutes = 1;
 
-    bitdb.dbenv.txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100)*1024 : 0, nMinutes, 0);
+    bitdb.dbenv.txn_checkpoint(nMinutes ? GetArg("-dblogsize", 100) * 1024 : 0, nMinutes, 0);
 }
 
 void CDB::Close()
@@ -321,8 +310,7 @@ void CDBEnv::CloseDb(const string& strFile)
 {
     {
         LOCK(cs_db);
-        if (mapDb[strFile] != NULL)
-        {
+        if (mapDb[strFile] != NULL) {
             // Close the database handle
             Db* pdb = mapDb[strFile];
             pdb->close(0);
@@ -343,12 +331,10 @@ bool CDBEnv::RemoveDb(const string& strFile)
 
 bool CDB::Rewrite(const string& strFile, const char* pszSkip)
 {
-    while (true)
-    {
+    while (true) {
         {
             LOCK(bitdb.cs_db);
-            if (!bitdb.mapFileUseCount.count(strFile) || bitdb.mapFileUseCount[strFile] == 0)
-            {
+            if (!bitdb.mapFileUseCount.count(strFile) || bitdb.mapFileUseCount[strFile] == 0) {
                 // Flush log data to the dat file
                 bitdb.CloseDb(strFile);
                 bitdb.CheckpointLSN(strFile);
@@ -361,32 +347,27 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
                     CDB db(strFile.c_str(), "r");
                     Db* pdbCopy = new Db(&bitdb.dbenv, 0);
 
-                    int ret = pdbCopy->open(NULL,                 // Txn pointer
-                                            strFileRes.c_str(),   // Filename
-                                            "main",    // Logical db name
-                                            DB_BTREE,  // Database type
-                                            DB_CREATE,    // Flags
+                    int ret = pdbCopy->open(NULL,               // Txn pointer
+                                            strFileRes.c_str(), // Filename
+                                            "main",             // Logical db name
+                                            DB_BTREE,           // Database type
+                                            DB_CREATE,          // Flags
                                             0);
-                    if (ret > 0)
-                    {
+                    if (ret > 0) {
                         LogPrintf("CDB::Rewrite : Can't create database file %s\n", strFileRes);
                         fSuccess = false;
                     }
 
                     Dbc* pcursor = db.GetCursor();
                     if (pcursor)
-                        while (fSuccess)
-                        {
+                        while (fSuccess) {
                             CDataStream ssKey(SER_DISK, CLIENT_VERSION);
                             CDataStream ssValue(SER_DISK, CLIENT_VERSION);
                             int ret = db.ReadAtCursor(pcursor, ssKey, ssValue, DB_NEXT);
-                            if (ret == DB_NOTFOUND)
-                            {
+                            if (ret == DB_NOTFOUND) {
                                 pcursor->close();
                                 break;
-                            }
-                            else if (ret != 0)
-                            {
+                            } else if (ret != 0) {
                                 pcursor->close();
                                 fSuccess = false;
                                 break;
@@ -394,8 +375,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
                             if (pszSkip &&
                                 strncmp(&ssKey[0], pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0)
                                 continue;
-                            if (strncmp(&ssKey[0], "\x07version", 8) == 0)
-                            {
+                            if (strncmp(&ssKey[0], "\x07version", 8) == 0) {
                                 // Update version:
                                 ssValue.clear();
                                 ssValue << CLIENT_VERSION;
@@ -406,8 +386,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
                             if (ret2 > 0)
                                 fSuccess = false;
                         }
-                    if (fSuccess)
-                    {
+                    if (fSuccess) {
                         db.Close();
                         bitdb.CloseDb(strFile);
                         if (pdbCopy->close(0))
@@ -415,8 +394,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
                         delete pdbCopy;
                     }
                 }
-                if (fSuccess)
-                {
+                if (fSuccess) {
                     Db dbA(&bitdb.dbenv, 0);
                     if (dbA.remove(strFile.c_str(), NULL, 0))
                         fSuccess = false;
@@ -445,13 +423,11 @@ void CDBEnv::Flush(bool fShutdown)
     {
         LOCK(cs_db);
         map<string, int>::iterator mi = mapFileUseCount.begin();
-        while (mi != mapFileUseCount.end())
-        {
+        while (mi != mapFileUseCount.end()) {
             string strFile = (*mi).first;
             int nRefCount = (*mi).second;
             LogPrint("db", "CDBEnv::Flush : Flushing %s (refcount = %d)...\n", strFile, nRefCount);
-            if (nRefCount == 0)
-            {
+            if (nRefCount == 0) {
                 // Move log data to the dat file
                 CloseDb(strFile);
                 LogPrint("db", "CDBEnv::Flush : %s checkpoint\n", strFile);
@@ -461,16 +437,13 @@ void CDBEnv::Flush(bool fShutdown)
                     dbenv.lsn_reset(strFile.c_str(), 0);
                 LogPrint("db", "CDBEnv::Flush : %s closed\n", strFile);
                 mapFileUseCount.erase(mi++);
-            }
-            else
+            } else
                 mi++;
         }
         LogPrint("db", "CDBEnv::Flush : Flush(%s)%s took %15dms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started", GetTimeMillis() - nStart);
-        if (fShutdown)
-        {
+        if (fShutdown) {
             char** listp;
-            if (mapFileUseCount.empty())
-            {
+            if (mapFileUseCount.empty()) {
                 dbenv.log_archive(&listp, DB_ARCH_REMOVE);
                 Close();
                 if (!fMockDb)
@@ -479,4 +452,3 @@ void CDBEnv::Flush(bool fShutdown)
         }
     }
 }
-
diff --git a/src/db.h b/src/db.h
index eab27f43af5a..d20239938377 100644
--- a/src/db.h
+++ b/src/db.h
@@ -54,7 +54,9 @@ class CDBEnv
      * This must be called BEFORE strFile is opened.
      * Returns true if strFile is OK.
      */
-    enum VerifyResult { VERIFY_OK, RECOVER_OK, RECOVER_FAIL };
+    enum VerifyResult { VERIFY_OK,
+                        RECOVER_OK,
+                        RECOVER_FAIL };
     VerifyResult Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile));
     /*
      * Salvage data from a file that Verify says is bad.
@@ -66,7 +68,7 @@ class CDBEnv
     typedef std::pair<std::vector<unsigned char>, std::vector<unsigned char> > KeyValPair;
     bool Salvage(std::string strFile, bool fAggressive, std::vector<KeyValPair>& vResult);
 
-    bool Open(const boost::filesystem::path &path);
+    bool Open(const boost::filesystem::path& path);
     void Close();
     void Flush(bool fShutdown);
     void CheckpointLSN(const std::string& strFile);
@@ -74,7 +76,7 @@ class CDBEnv
     void CloseDb(const std::string& strFile);
     bool RemoveDb(const std::string& strFile);
 
-    DbTxn *TxnBegin(int flags=DB_TXN_WRITE_NOSYNC)
+    DbTxn* TxnBegin(int flags = DB_TXN_WRITE_NOSYNC)
     {
         DbTxn* ptxn = NULL;
         int ret = dbenv.txn_begin(NULL, &ptxn, flags);
@@ -93,10 +95,10 @@ class CDB
 protected:
     Db* pdb;
     std::string strFile;
-    DbTxn *activeTxn;
+    DbTxn* activeTxn;
     bool fReadOnly;
 
-    explicit CDB(const std::string& strFilename, const char* pszMode="r+");
+    explicit CDB(const std::string& strFilename, const char* pszMode = "r+");
     ~CDB() { Close(); }
 
 public:
@@ -108,7 +110,7 @@ class CDB
     void operator=(const CDB&);
 
 protected:
-    template<typename K, typename T>
+    template <typename K, typename T>
     bool Read(const K& key, T& value)
     {
         if (!pdb)
@@ -132,8 +134,7 @@ class CDB
         try {
             CDataStream ssValue((char*)datValue.get_data(), (char*)datValue.get_data() + datValue.get_size(), SER_DISK, CLIENT_VERSION);
             ssValue >> value;
-        }
-        catch (const std::exception &) {
+        } catch (const std::exception&) {
             return false;
         }
 
@@ -143,8 +144,8 @@ class CDB
         return (ret == 0);
     }
 
-    template<typename K, typename T>
-    bool Write(const K& key, const T& value, bool fOverwrite=true)
+    template <typename K, typename T>
+    bool Write(const K& key, const T& value, bool fOverwrite = true)
     {
         if (!pdb)
             return false;
@@ -172,7 +173,7 @@ class CDB
         return (ret == 0);
     }
 
-    template<typename K>
+    template <typename K>
     bool Erase(const K& key)
     {
         if (!pdb)
@@ -194,7 +195,7 @@ class CDB
         return (ret == 0 || ret == DB_NOTFOUND);
     }
 
-    template<typename K>
+    template <typename K>
     bool Exists(const K& key)
     {
         if (!pdb)
@@ -225,18 +226,16 @@ class CDB
         return pcursor;
     }
 
-    int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags=DB_NEXT)
+    int ReadAtCursor(Dbc* pcursor, CDataStream& ssKey, CDataStream& ssValue, unsigned int fFlags = DB_NEXT)
     {
         // Read at cursor
         Dbt datKey;
-        if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
-        {
+        if (fFlags == DB_SET || fFlags == DB_SET_RANGE || fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) {
             datKey.set_data(&ssKey[0]);
             datKey.set_size(ssKey.size());
         }
         Dbt datValue;
-        if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE)
-        {
+        if (fFlags == DB_GET_BOTH || fFlags == DB_GET_BOTH_RANGE) {
             datValue.set_data(&ssValue[0]);
             datValue.set_size(ssValue.size());
         }
diff --git a/src/hash.cpp b/src/hash.cpp
index bddd8abf38d0..4ce4da4c30e1 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -1,6 +1,6 @@
 #include "hash.h"
 
-inline uint32_t ROTL32 ( uint32_t x, int8_t r )
+inline uint32_t ROTL32(uint32_t x, int8_t r)
 {
     return (x << r) | (x >> (32 - r));
 }
@@ -16,33 +16,37 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
 
     //----------
     // body
-    const uint32_t * blocks = (const uint32_t *)(&vDataToHash[0] + nblocks*4);
+    const uint32_t* blocks = (const uint32_t*)(&vDataToHash[0] + nblocks * 4);
 
-    for(int i = -nblocks; i; i++)
-    {
+    for (int i = -nblocks; i; i++) {
         uint32_t k1 = blocks[i];
 
         k1 *= c1;
-        k1 = ROTL32(k1,15);
+        k1 = ROTL32(k1, 15);
         k1 *= c2;
 
         h1 ^= k1;
-        h1 = ROTL32(h1,13); 
-        h1 = h1*5+0xe6546b64;
+        h1 = ROTL32(h1, 13);
+        h1 = h1 * 5 + 0xe6546b64;
     }
 
     //----------
     // tail
-    const uint8_t * tail = (const uint8_t*)(&vDataToHash[0] + nblocks*4);
+    const uint8_t* tail = (const uint8_t*)(&vDataToHash[0] + nblocks * 4);
 
     uint32_t k1 = 0;
 
-    switch(vDataToHash.size() & 3)
-    {
-    case 3: k1 ^= tail[2] << 16;
-    case 2: k1 ^= tail[1] << 8;
-    case 1: k1 ^= tail[0];
-            k1 *= c1; k1 = ROTL32(k1,15); k1 *= c2; h1 ^= k1;
+    switch (vDataToHash.size() & 3) {
+    case 3:
+        k1 ^= tail[2] << 16;
+    case 2:
+        k1 ^= tail[1] << 8;
+    case 1:
+        k1 ^= tail[0];
+        k1 *= c1;
+        k1 = ROTL32(k1, 15);
+        k1 *= c2;
+        h1 ^= k1;
     };
 
     //----------
diff --git a/src/init.h b/src/init.h
index cf1d1e7e396a..aaf8c07e6e86 100644
--- a/src/init.h
+++ b/src/init.h
@@ -10,8 +10,9 @@
 
 class CWallet;
 
-namespace boost {
-    class thread_group;
+namespace boost
+{
+class thread_group;
 } // namespace boost
 
 extern CWallet* pwalletMain;
@@ -22,8 +23,7 @@ void Shutdown();
 bool AppInit2(boost::thread_group& threadGroup);
 
 /* The help message mode determines what help message to show */
-enum HelpMessageMode
-{
+enum HelpMessageMode {
     HMM_BITCOIND,
     HMM_BITCOIN_QT
 };
diff --git a/src/key.h b/src/key.h
index 2a1837a23a46..3863e95cffb0 100644
--- a/src/key.h
+++ b/src/key.h
@@ -26,27 +26,29 @@
 class CKeyID : public uint160
 {
 public:
-    CKeyID() : uint160(0) { }
-    CKeyID(const uint160 &in) : uint160(in) { }
+    CKeyID() : uint160(0) {}
+    CKeyID(const uint160& in) : uint160(in) {}
 };
 
 /** A reference to a CScript: the Hash160 of its serialization (see script.h) */
 class CScriptID : public uint160
 {
 public:
-    CScriptID() : uint160(0) { }
-    CScriptID(const uint160 &in) : uint160(in) { }
+    CScriptID() : uint160(0) {}
+    CScriptID(const uint160& in) : uint160(in) {}
 };
 
 /** An encapsulated public key. */
-class CPubKey {
+class CPubKey
+{
 private:
     // Just store the serialized data.
     // Its length can very cheaply be computed from the first byte.
     unsigned char vch[65];
 
     // Compute the length of a pubkey with a given first byte.
-    unsigned int static GetLen(unsigned char chHeader) {
+    unsigned int static GetLen(unsigned char chHeader)
+    {
         if (chHeader == 2 || chHeader == 3)
             return 33;
         if (chHeader == 4 || chHeader == 6 || chHeader == 7)
@@ -55,66 +57,79 @@ class CPubKey {
     }
 
     // Set this key data to be invalid
-    void Invalidate() {
+    void Invalidate()
+    {
         vch[0] = 0xFF;
     }
 
 public:
     // Construct an invalid public key.
-    CPubKey() {
+    CPubKey()
+    {
         Invalidate();
     }
 
     // Initialize a public key using begin/end iterators to byte data.
-    template<typename T>
-    void Set(const T pbegin, const T pend) {
+    template <typename T>
+    void Set(const T pbegin, const T pend)
+    {
         int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
-        if (len && len == (pend-pbegin))
+        if (len && len == (pend - pbegin))
             memcpy(vch, (unsigned char*)&pbegin[0], len);
         else
             Invalidate();
     }
 
     // Construct a public key using begin/end iterators to byte data.
-    template<typename T>
-    CPubKey(const T pbegin, const T pend) {
+    template <typename T>
+    CPubKey(const T pbegin, const T pend)
+    {
         Set(pbegin, pend);
     }
 
     // Construct a public key from a byte vector.
-    CPubKey(const std::vector<unsigned char> &vch) {
+    CPubKey(const std::vector<unsigned char>& vch)
+    {
         Set(vch.begin(), vch.end());
     }
 
     // Simple read-only vector-like interface to the pubkey data.
     unsigned int size() const { return GetLen(vch[0]); }
-    const unsigned char *begin() const { return vch; }
-    const unsigned char *end() const { return vch+size(); }
-    const unsigned char &operator[](unsigned int pos) const { return vch[pos]; }
+    const unsigned char* begin() const { return vch; }
+    const unsigned char* end() const { return vch + size(); }
+    const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
 
     // Comparator implementation.
-    friend bool operator==(const CPubKey &a, const CPubKey &b) {
+    friend bool operator==(const CPubKey& a, const CPubKey& b)
+    {
         return a.vch[0] == b.vch[0] &&
                memcmp(a.vch, b.vch, a.size()) == 0;
     }
-    friend bool operator!=(const CPubKey &a, const CPubKey &b) {
+    friend bool operator!=(const CPubKey& a, const CPubKey& b)
+    {
         return !(a == b);
     }
-    friend bool operator<(const CPubKey &a, const CPubKey &b) {
+    friend bool operator<(const CPubKey& a, const CPubKey& b)
+    {
         return a.vch[0] < b.vch[0] ||
                (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
     }
 
     // Implement serialization, as if this was a byte vector.
-    unsigned int GetSerializeSize(int nType, int nVersion) const {
+    unsigned int GetSerializeSize(int nType, int nVersion) const
+    {
         return size() + 1;
     }
-    template<typename Stream> void Serialize(Stream &s, int nType, int nVersion) const {
+    template <typename Stream>
+    void Serialize(Stream& s, int nType, int nVersion) const
+    {
         unsigned int len = size();
         ::WriteCompactSize(s, len);
         s.write((char*)vch, len);
     }
-    template<typename Stream> void Unserialize(Stream &s, int nType, int nVersion) {
+    template <typename Stream>
+    void Unserialize(Stream& s, int nType, int nVersion)
+    {
         unsigned int len = ::ReadCompactSize(s);
         if (len <= 65) {
             s.read((char*)vch, len);
@@ -128,19 +143,22 @@ class CPubKey {
     }
 
     // Get the KeyID of this public key (hash of its serialization)
-    CKeyID GetID() const {
-        return CKeyID(Hash160(vch, vch+size()));
+    CKeyID GetID() const
+    {
+        return CKeyID(Hash160(vch, vch + size()));
     }
 
     // Get the 256-bit hash of this public key.
-    uint256 GetHash() const {
-        return Hash(vch, vch+size());
+    uint256 GetHash() const
+    {
+        return Hash(vch, vch + size());
     }
 
     // Check syntactic correctness.
     //
     // Note that this is consensus critical as CheckSig() calls it!
-    bool IsValid() const {
+    bool IsValid() const
+    {
         return size() > 0;
     }
 
@@ -148,16 +166,17 @@ class CPubKey {
     bool IsFullyValid() const;
 
     // Check whether this is a compressed public key.
-    bool IsCompressed() const {
+    bool IsCompressed() const
+    {
         return size() == 33;
     }
 
     // Verify a DER signature (~72 bytes).
     // If this public key is not fully valid, the return value will be false.
-    bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const;
+    bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
 
     // Recover a public key from a compact signature.
-    bool RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig);
+    bool RecoverCompact(const uint256& hash, const std::vector<unsigned char>& vchSig);
 
     // Turn this public key into an uncompressed public key.
     bool Decompress();
@@ -172,7 +191,8 @@ class CPubKey {
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CPrivKey;
 
 /** An encapsulated private key. */
-class CKey {
+class CKey
+{
 private:
     // Whether this private key is valid. We check for correctness when modifying the key
     // data, so fValid should always correspond to the actual state.
@@ -185,33 +205,38 @@ class CKey {
     unsigned char vch[32];
 
     // Check whether the 32-byte array pointed to be vch is valid keydata.
-    bool static Check(const unsigned char *vch);
-public:
+    bool static Check(const unsigned char* vch);
 
+public:
     // Construct an invalid private key.
-    CKey() : fValid(false), fCompressed(false) {
+    CKey() : fValid(false), fCompressed(false)
+    {
         LockObject(vch);
     }
 
     // Copy constructor. This is necessary because of memlocking.
-    CKey(const CKey &secret) : fValid(secret.fValid), fCompressed(secret.fCompressed) {
+    CKey(const CKey& secret) : fValid(secret.fValid), fCompressed(secret.fCompressed)
+    {
         LockObject(vch);
         memcpy(vch, secret.vch, sizeof(vch));
     }
 
     // Destructor (again necessary because of memlocking).
-    ~CKey() {
+    ~CKey()
+    {
         UnlockObject(vch);
     }
 
-    friend bool operator==(const CKey &a, const CKey &b) {
+    friend bool operator==(const CKey& a, const CKey& b)
+    {
         return a.fCompressed == b.fCompressed && a.size() == b.size() &&
                memcmp(&a.vch[0], &b.vch[0], a.size()) == 0;
     }
 
     // Initialize using begin and end iterators to byte data.
-    template<typename T>
-    void Set(const T pbegin, const T pend, bool fCompressedIn) {
+    template <typename T>
+    void Set(const T pbegin, const T pend, bool fCompressedIn)
+    {
         if (pend - pbegin != 32) {
             fValid = false;
             return;
@@ -227,8 +252,8 @@ class CKey {
 
     // Simple read-only vector-like interface.
     unsigned int size() const { return (fValid ? 32 : 0); }
-    const unsigned char *begin() const { return vch; }
-    const unsigned char *end() const { return vch + size(); }
+    const unsigned char* begin() const { return vch; }
+    const unsigned char* end() const { return vch + size(); }
 
     // Check whether this private key is valid.
     bool IsValid() const { return fValid; }
@@ -237,7 +262,7 @@ class CKey {
     bool IsCompressed() const { return fCompressed; }
 
     // Initialize from a CPrivKey (serialized OpenSSL private key data).
-    bool SetPrivKey(const CPrivKey &vchPrivKey, bool fCompressed);
+    bool SetPrivKey(const CPrivKey& vchPrivKey, bool fCompressed);
 
     // Generate a new private key using a cryptographic PRNG.
     void MakeNewKey(bool fCompressed);
@@ -251,23 +276,23 @@ class CKey {
     CPubKey GetPubKey() const;
 
     // Create a DER-serialized signature.
-    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const;
+    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig) const;
 
     // Create a compact signature (65 bytes), which allows reconstructing the used public key.
     // The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
     // The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
     //                  0x1D = second key with even y, 0x1E = second key with odd y,
     //                  add 0x04 for compressed keys.
-    bool SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const;
+    bool SignCompact(const uint256& hash, std::vector<unsigned char>& vchSig) const;
 
     // Derive BIP32 child key.
     bool Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
 
     // Load private key and check that public key matches.
-    bool Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck);
+    bool Load(CPrivKey& privkey, CPubKey& vchPubKey, bool fSkipCheck);
 
     // Check whether an element of a signature (r or s) is valid.
-    static bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
+    static bool CheckSignatureElement(const unsigned char* vch, int len, bool half);
 };
 
 struct CExtPubKey {
@@ -277,14 +302,15 @@ struct CExtPubKey {
     unsigned char vchChainCode[32];
     CPubKey pubkey;
 
-    friend bool operator==(const CExtPubKey &a, const CExtPubKey &b) {
+    friend bool operator==(const CExtPubKey& a, const CExtPubKey& b)
+    {
         return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
                memcmp(&a.vchChainCode[0], &b.vchChainCode[0], 32) == 0 && a.pubkey == b.pubkey;
     }
 
     void Encode(unsigned char code[74]) const;
     void Decode(const unsigned char code[74]);
-    bool Derive(CExtPubKey &out, unsigned int nChild) const;
+    bool Derive(CExtPubKey& out, unsigned int nChild) const;
 };
 
 struct CExtKey {
@@ -294,16 +320,17 @@ struct CExtKey {
     unsigned char vchChainCode[32];
     CKey key;
 
-    friend bool operator==(const CExtKey &a, const CExtKey &b) {
+    friend bool operator==(const CExtKey& a, const CExtKey& b)
+    {
         return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
                memcmp(&a.vchChainCode[0], &b.vchChainCode[0], 32) == 0 && a.key == b.key;
     }
 
     void Encode(unsigned char code[74]) const;
     void Decode(const unsigned char code[74]);
-    bool Derive(CExtKey &out, unsigned int nChild) const;
+    bool Derive(CExtKey& out, unsigned int nChild) const;
     CExtPubKey Neuter() const;
-    void SetMaster(const unsigned char *seed, unsigned int nSeedLen);
+    void SetMaster(const unsigned char* seed, unsigned int nSeedLen);
 };
 
 /** Check that required EC support is available at runtime */
diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp
index 9e849696a848..8ce3e7b47088 100644
--- a/src/leveldbwrapper.cpp
+++ b/src/leveldbwrapper.cpp
@@ -12,7 +12,8 @@
 #include <leveldb/filter_policy.h>
 #include <memenv.h>
 
-void HandleError(const leveldb::Status &status) throw(leveldb_error) {
+void HandleError(const leveldb::Status& status) throw(leveldb_error)
+{
     if (status.ok())
         return;
     LogPrintf("%s\n", status.ToString());
@@ -25,7 +26,8 @@ void HandleError(const leveldb::Status &status) throw(leveldb_error) {
     throw leveldb_error("Unknown database error");
 }
 
-static leveldb::Options GetOptions(size_t nCacheSize) {
+static leveldb::Options GetOptions(size_t nCacheSize)
+{
     leveldb::Options options;
     options.block_cache = leveldb::NewLRUCache(nCacheSize / 2);
     options.write_buffer_size = nCacheSize / 4; // up to two write buffers may be held in memory simultaneously
@@ -40,7 +42,8 @@ static leveldb::Options GetOptions(size_t nCacheSize) {
     return options;
 }
 
-CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory, bool fWipe) {
+CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, bool fMemory, bool fWipe)
+{
     penv = NULL;
     readoptions.verify_checksums = true;
     iteroptions.verify_checksums = true;
@@ -64,7 +67,8 @@ CLevelDBWrapper::CLevelDBWrapper(const boost::filesystem::path &path, size_t nCa
     LogPrintf("Opened LevelDB successfully\n");
 }
 
-CLevelDBWrapper::~CLevelDBWrapper() {
+CLevelDBWrapper::~CLevelDBWrapper()
+{
     delete pdb;
     pdb = NULL;
     delete options.filter_policy;
@@ -75,7 +79,8 @@ CLevelDBWrapper::~CLevelDBWrapper() {
     options.env = NULL;
 }
 
-bool CLevelDBWrapper::WriteBatch(CLevelDBBatch &batch, bool fSync) throw(leveldb_error) {
+bool CLevelDBWrapper::WriteBatch(CLevelDBBatch& batch, bool fSync) throw(leveldb_error)
+{
     leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
     HandleError(status);
     return true;
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 29bc71f99dbb..da5ba61c7b04 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -17,10 +17,10 @@
 class leveldb_error : public std::runtime_error
 {
 public:
-    leveldb_error(const std::string &msg) : std::runtime_error(msg) {}
+    leveldb_error(const std::string& msg) : std::runtime_error(msg) {}
 };
 
-void HandleError(const leveldb::Status &status) throw(leveldb_error);
+void HandleError(const leveldb::Status& status) throw(leveldb_error);
 
 // Batch of changes queued to be written to a CLevelDBWrapper
 class CLevelDBBatch
@@ -31,7 +31,9 @@ class CLevelDBBatch
     leveldb::WriteBatch batch;
 
 public:
-    template<typename K, typename V> void Write(const K& key, const V& value) {
+    template <typename K, typename V>
+    void Write(const K& key, const V& value)
+    {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;
@@ -45,7 +47,9 @@ class CLevelDBBatch
         batch.Put(slKey, slValue);
     }
 
-    template<typename K> void Erase(const K& key) {
+    template <typename K>
+    void Erase(const K& key)
+    {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;
@@ -59,7 +63,7 @@ class CLevelDBWrapper
 {
 private:
     // custom environment this database is using (may be NULL in case of default environment)
-    leveldb::Env *penv;
+    leveldb::Env* penv;
 
     // database options used
     leveldb::Options options;
@@ -77,13 +81,15 @@ class CLevelDBWrapper
     leveldb::WriteOptions syncoptions;
 
     // the database itself
-    leveldb::DB *pdb;
+    leveldb::DB* pdb;
 
 public:
-    CLevelDBWrapper(const boost::filesystem::path &path, size_t nCacheSize, bool fMemory = false, bool fWipe = false);
+    CLevelDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, bool fMemory = false, bool fWipe = false);
     ~CLevelDBWrapper();
 
-    template<typename K, typename V> bool Read(const K& key, V& value) const throw(leveldb_error) {
+    template <typename K, typename V>
+    bool Read(const K& key, V& value) const throw(leveldb_error)
+    {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;
@@ -100,19 +106,23 @@ class CLevelDBWrapper
         try {
             CDataStream ssValue(strValue.data(), strValue.data() + strValue.size(), SER_DISK, CLIENT_VERSION);
             ssValue >> value;
-        } catch(const std::exception &) {
+        } catch (const std::exception&) {
             return false;
         }
         return true;
     }
 
-    template<typename K, typename V> bool Write(const K& key, const V& value, bool fSync = false) throw(leveldb_error) {
+    template <typename K, typename V>
+    bool Write(const K& key, const V& value, bool fSync = false) throw(leveldb_error)
+    {
         CLevelDBBatch batch;
         batch.Write(key, value);
         return WriteBatch(batch, fSync);
     }
 
-    template<typename K> bool Exists(const K& key) const throw(leveldb_error) {
+    template <typename K>
+    bool Exists(const K& key) const throw(leveldb_error)
+    {
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         ssKey.reserve(ssKey.GetSerializeSize(key));
         ssKey << key;
@@ -129,26 +139,31 @@ class CLevelDBWrapper
         return true;
     }
 
-    template<typename K> bool Erase(const K& key, bool fSync = false) throw(leveldb_error) {
+    template <typename K>
+    bool Erase(const K& key, bool fSync = false) throw(leveldb_error)
+    {
         CLevelDBBatch batch;
         batch.Erase(key);
         return WriteBatch(batch, fSync);
     }
 
-    bool WriteBatch(CLevelDBBatch &batch, bool fSync = false) throw(leveldb_error);
+    bool WriteBatch(CLevelDBBatch& batch, bool fSync = false) throw(leveldb_error);
 
     // not available for LevelDB; provide for compatibility with BDB
-    bool Flush() {
+    bool Flush()
+    {
         return true;
     }
 
-    bool Sync() throw(leveldb_error) {
+    bool Sync() throw(leveldb_error)
+    {
         CLevelDBBatch batch;
         return WriteBatch(batch, true);
     }
 
     // not exactly clean encapsulation, but it's easiest for now
-    leveldb::Iterator *NewIterator() {
+    leveldb::Iterator* NewIterator()
+    {
         return pdb->NewIterator(iteroptions);
     }
 };
diff --git a/src/limitedmap.h b/src/limitedmap.h
index 58593688af06..4bc8d9e5aa51 100644
--- a/src/limitedmap.h
+++ b/src/limitedmap.h
@@ -9,7 +9,8 @@
 #include <map>
 
 /** STL-like map container that only keeps the N elements with the highest value. */
-template <typename K, typename V> class limitedmap
+template <typename K, typename V>
+class limitedmap
 {
 public:
     typedef K key_type;
@@ -36,10 +37,8 @@ template <typename K, typename V> class limitedmap
     void insert(const value_type& x)
     {
         std::pair<iterator, bool> ret = map.insert(x);
-        if (ret.second)
-        {
-            if (nMaxSize && map.size() == nMaxSize)
-            {
+        if (ret.second) {
+            if (nMaxSize && map.size() == nMaxSize) {
                 map.erase(rmap.begin()->second);
                 rmap.erase(rmap.begin());
             }
@@ -54,8 +53,7 @@ template <typename K, typename V> class limitedmap
             return;
         std::pair<rmap_iterator, rmap_iterator> itPair = rmap.equal_range(itTarget->second);
         for (rmap_iterator it = itPair.first; it != itPair.second; ++it)
-            if (it->second == itTarget)
-            {
+            if (it->second == itTarget) {
                 rmap.erase(it);
                 map.erase(itTarget);
                 return;
@@ -72,8 +70,7 @@ template <typename K, typename V> class limitedmap
             return;
         std::pair<rmap_iterator, rmap_iterator> itPair = rmap.equal_range(itTarget->second);
         for (rmap_iterator it = itPair.first; it != itPair.second; ++it)
-            if (it->second == itTarget)
-            {
+            if (it->second == itTarget) {
                 rmap.erase(it);
                 itTarget->second = v;
                 rmap.insert(make_pair(v, itTarget));
@@ -88,8 +85,7 @@ template <typename K, typename V> class limitedmap
     size_type max_size(size_type s)
     {
         if (s)
-            while (map.size() > s)
-            {
+            while (map.size() > s) {
                 map.erase(rmap.begin()->second);
                 rmap.erase(rmap.begin());
             }
diff --git a/src/mruset.h b/src/mruset.h
index b9f325d874ac..1691875f57bf 100644
--- a/src/mruset.h
+++ b/src/mruset.h
@@ -10,7 +10,8 @@
 #include <utility>
 
 /** STL-like set container that only keeps the most recent N elements. */
-template <typename T> class mruset
+template <typename T>
+class mruset
 {
 public:
     typedef T key_type;
@@ -32,17 +33,19 @@ template <typename T> class mruset
     bool empty() const { return set.empty(); }
     iterator find(const key_type& k) const { return set.find(k); }
     size_type count(const key_type& k) const { return set.count(k); }
-    void clear() { set.clear(); queue.clear(); }
+    void clear()
+    {
+        set.clear();
+        queue.clear();
+    }
     bool inline friend operator==(const mruset<T>& a, const mruset<T>& b) { return a.set == b.set; }
     bool inline friend operator==(const mruset<T>& a, const std::set<T>& b) { return a.set == b; }
     bool inline friend operator<(const mruset<T>& a, const mruset<T>& b) { return a.set < b.set; }
     std::pair<iterator, bool> insert(const key_type& x)
     {
         std::pair<iterator, bool> ret = set.insert(x);
-        if (ret.second)
-        {
-            if (nMaxSize && queue.size() == nMaxSize)
-            {
+        if (ret.second) {
+            if (nMaxSize && queue.size() == nMaxSize) {
                 set.erase(queue.front());
                 queue.pop_front();
             }
@@ -54,8 +57,7 @@ template <typename T> class mruset
     size_type max_size(size_type s)
     {
         if (s)
-            while (queue.size() > s)
-            {
+            while (queue.size() > s) {
                 set.erase(queue.front());
                 queue.pop_front();
             }
diff --git a/src/noui.cpp b/src/noui.cpp
index 8b00fd40571a..f786a20db507 100644
--- a/src/noui.cpp
+++ b/src/noui.cpp
@@ -35,7 +35,7 @@ static bool noui_ThreadSafeMessageBox(const std::string& message, const std::str
     return false;
 }
 
-static void noui_InitMessage(const std::string &message)
+static void noui_InitMessage(const std::string& message)
 {
     LogPrintf("init message: %s\n", message);
 }
diff --git a/src/protocol.h b/src/protocol.h
index 82d29e66de95..b73041a9fdc5 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef __cplusplus
-# error This header can only be compiled as C++.
+#error This header can only be compiled as C++.
 #endif
 
 #ifndef __INCLUDED_PROTOCOL_H__
@@ -28,43 +28,43 @@
  */
 class CMessageHeader
 {
-    public:
-        CMessageHeader();
-        CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn);
+public:
+    CMessageHeader();
+    CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn);
 
-        std::string GetCommand() const;
-        bool IsValid() const;
+    std::string GetCommand() const;
+    bool IsValid() const;
 
-        ADD_SERIALIZE_METHODS;
+    ADD_SERIALIZE_METHODS;
 
-        template <typename Stream, typename Operation>
-        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            READWRITE(FLATDATA(pchMessageStart));
-            READWRITE(FLATDATA(pchCommand));
-            READWRITE(nMessageSize);
-            READWRITE(nChecksum);
-        }
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+    {
+        READWRITE(FLATDATA(pchMessageStart));
+        READWRITE(FLATDATA(pchCommand));
+        READWRITE(nMessageSize);
+        READWRITE(nChecksum);
+    }
 
     // TODO: make private (improves encapsulation)
-    public:
-        enum {
-            COMMAND_SIZE=12,
-            MESSAGE_SIZE_SIZE=sizeof(int),
-            CHECKSUM_SIZE=sizeof(int),
-
-            MESSAGE_SIZE_OFFSET=MESSAGE_START_SIZE+COMMAND_SIZE,
-            CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE,
-            HEADER_SIZE=MESSAGE_START_SIZE+COMMAND_SIZE+MESSAGE_SIZE_SIZE+CHECKSUM_SIZE
-        };
-        char pchMessageStart[MESSAGE_START_SIZE];
-        char pchCommand[COMMAND_SIZE];
-        unsigned int nMessageSize;
-        unsigned int nChecksum;
+public:
+    enum {
+        COMMAND_SIZE = 12,
+        MESSAGE_SIZE_SIZE = sizeof(int),
+        CHECKSUM_SIZE = sizeof(int),
+
+        MESSAGE_SIZE_OFFSET = MESSAGE_START_SIZE + COMMAND_SIZE,
+        CHECKSUM_OFFSET = MESSAGE_SIZE_OFFSET + MESSAGE_SIZE_SIZE,
+        HEADER_SIZE = MESSAGE_START_SIZE + COMMAND_SIZE + MESSAGE_SIZE_SIZE + CHECKSUM_SIZE
+    };
+    char pchMessageStart[MESSAGE_START_SIZE];
+    char pchCommand[COMMAND_SIZE];
+    unsigned int nMessageSize;
+    unsigned int nChecksum;
 };
 
 /** nServices flags */
-enum
-{
+enum {
     NODE_NETWORK = (1 << 0),
 
     // Bits 24-31 are reserved for temporary experiments. Just pick a bit that
@@ -79,68 +79,69 @@ enum
 /** A CService with information about it as peer */
 class CAddress : public CService
 {
-    public:
-        CAddress();
-        explicit CAddress(CService ipIn, uint64_t nServicesIn=NODE_NETWORK);
-
-        void Init();
-
-        ADD_SERIALIZE_METHODS;
-
-        template <typename Stream, typename Operation>
-        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            if (ser_action.ForRead())
-                Init();
-            if (nType & SER_DISK)
-                READWRITE(nVersion);
-            if ((nType & SER_DISK) ||
-                (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
-                READWRITE(nTime);
-            READWRITE(nServices);
-            READWRITE(*(CService*)this);
-        }
+public:
+    CAddress();
+    explicit CAddress(CService ipIn, uint64_t nServicesIn = NODE_NETWORK);
+
+    void Init();
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+    {
+        if (ser_action.ForRead())
+            Init();
+        if (nType & SER_DISK)
+            READWRITE(nVersion);
+        if ((nType & SER_DISK) ||
+            (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
+            READWRITE(nTime);
+        READWRITE(nServices);
+        READWRITE(*(CService*)this);
+    }
 
     // TODO: make private (improves encapsulation)
-    public:
-        uint64_t nServices;
+public:
+    uint64_t nServices;
 
-        // disk and network only
-        unsigned int nTime;
+    // disk and network only
+    unsigned int nTime;
 
-        // memory only
-        int64_t nLastTry;
+    // memory only
+    int64_t nLastTry;
 };
 
 /** inv message data */
 class CInv
 {
-    public:
-        CInv();
-        CInv(int typeIn, const uint256& hashIn);
-        CInv(const std::string& strType, const uint256& hashIn);
+public:
+    CInv();
+    CInv(int typeIn, const uint256& hashIn);
+    CInv(const std::string& strType, const uint256& hashIn);
 
-        ADD_SERIALIZE_METHODS;
+    ADD_SERIALIZE_METHODS;
 
-        template <typename Stream, typename Operation>
-        inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            READWRITE(type);
-            READWRITE(hash);
-        }
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+    {
+        READWRITE(type);
+        READWRITE(hash);
+    }
 
-        friend bool operator<(const CInv& a, const CInv& b);
+    friend bool operator<(const CInv& a, const CInv& b);
 
-        bool IsKnownType() const;
-        const char* GetCommand() const;
-        std::string ToString() const;
+    bool IsKnownType() const;
+    const char* GetCommand() const;
+    std::string ToString() const;
 
     // TODO: make private (improves encapsulation)
-    public:
-        int type;
-        uint256 hash;
+public:
+    int type;
+    uint256 hash;
 };
 
-enum
-{
+enum {
     MSG_TX = 1,
     MSG_BLOCK,
     // Nodes may always request a MSG_FILTERED_BLOCK in a getdata, however,
diff --git a/src/random.cpp b/src/random.cpp
index fb5258a4421e..998e7dfb08a0 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -8,8 +8,8 @@
 #ifdef WIN32
 #include "compat.h" // for Windows API
 #endif
-#include "serialize.h" // for begin_ptr(vec)
-#include "util.h" // for LogPrint()
+#include "serialize.h"        // for begin_ptr(vec)
+#include "util.h"             // for LogPrint()
 #include "utilstrencodings.h" // for GetTime()
 
 #include <limits>
@@ -56,28 +56,25 @@ void RandAddSeedPerfmon()
 #ifdef WIN32
     // Don't need this on Linux, OpenSSL automatically uses /dev/urandom
     // Seed with the entire set of perfmon data
-    std::vector <unsigned char> vData(250000,0);
+    std::vector<unsigned char> vData(250000, 0);
     long ret = 0;
     unsigned long nSize = 0;
     const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
-    while (true)
-    {
+    while (true) {
         nSize = vData.size();
         ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
         if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
             break;
-        vData.resize(std::max((vData.size()*3)/2, nMaxSize)); // Grow size of buffer exponentially
+        vData.resize(std::max((vData.size() * 3) / 2, nMaxSize)); // Grow size of buffer exponentially
     }
     RegCloseKey(HKEY_PERFORMANCE_DATA);
-    if (ret == ERROR_SUCCESS)
-    {
-        RAND_add(begin_ptr(vData), nSize, nSize/100.0);
+    if (ret == ERROR_SUCCESS) {
+        RAND_add(begin_ptr(vData), nSize, nSize / 100.0);
         OPENSSL_cleanse(begin_ptr(vData), nSize);
         LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
     } else {
         static bool warned = false; // Warn only once
-        if (!warned)
-        {
+        if (!warned) {
             LogPrintf("%s: Warning: RegQueryValueExA(HKEY_PERFORMANCE_DATA) failed with code %i\n", __func__, ret);
             warned = true;
         }
@@ -85,7 +82,7 @@ void RandAddSeedPerfmon()
 #endif
 }
 
-bool GetRandBytes(unsigned char *buf, int num)
+bool GetRandBytes(unsigned char* buf, int num)
 {
     if (RAND_bytes(buf, num) != 1) {
         LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL));
@@ -126,18 +123,17 @@ uint32_t insecure_rand_Rw = 11;
 void seed_insecure_rand(bool fDeterministic)
 {
     // The seed values have some unlikely fixed points which we avoid.
-    if(fDeterministic)
-    {
+    if (fDeterministic) {
         insecure_rand_Rz = insecure_rand_Rw = 11;
     } else {
         uint32_t tmp;
         do {
             GetRandBytes((unsigned char*)&tmp, 4);
-        } while(tmp == 0 || tmp == 0x9068ffffU);
+        } while (tmp == 0 || tmp == 0x9068ffffU);
         insecure_rand_Rz = tmp;
         do {
             GetRandBytes((unsigned char*)&tmp, 4);
-        } while(tmp == 0 || tmp == 0x464fffffU);
+        } while (tmp == 0 || tmp == 0x464fffffU);
         insecure_rand_Rw = tmp;
     }
 }
diff --git a/src/random.h b/src/random.h
index a599b0847858..161ebe89860a 100644
--- a/src/random.h
+++ b/src/random.h
@@ -19,7 +19,7 @@ void RandAddSeedPerfmon();
 /**
  * Functions to gather random data via the OpenSSL PRNG
  */
-bool GetRandBytes(unsigned char *buf, int num);
+bool GetRandBytes(unsigned char* buf, int num);
 uint64_t GetRand(uint64_t nMax);
 int GetRandInt(int nMax);
 uint256 GetRandHash();
diff --git a/src/rpcclient.h b/src/rpcclient.h
index 1233ea3875cf..307aa2aab8b0 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -10,6 +10,6 @@
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_writer_template.h"
 
-json_spirit::Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams);
+json_spirit::Array RPCConvertValues(const std::string& strMethod, const std::vector<std::string>& strParams);
 
 #endif // _BITCOINRPC_CLIENT_H_
diff --git a/src/sync.cpp b/src/sync.cpp
index d424f7bc95ee..ef35c9d646a5 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -32,8 +32,7 @@ void PrintLockContention(const char* pszName, const char* pszFile, int nLine)
 // Complain if any thread tries to lock in a different order.
 //
 
-struct CLockLocation
-{
+struct CLockLocation {
     CLockLocation(const char* pszName, const char* pszFile, int nLine)
     {
         mutexName = pszName;
@@ -43,7 +42,7 @@ struct CLockLocation
 
     std::string ToString() const
     {
-        return mutexName+"  "+sourceFile+":"+itostr(sourceLine);
+        return mutexName + "  " + sourceFile + ":" + itostr(sourceLine);
     }
 
     std::string MutexName() const { return mutexName; }
@@ -54,7 +53,7 @@ struct CLockLocation
     int sourceLine;
 };
 
-typedef std::vector< std::pair<void*, CLockLocation> > LockStack;
+typedef std::vector<std::pair<void*, CLockLocation> > LockStack;
 
 static boost::mutex dd_mutex;
 static std::map<std::pair<void*, void*>, LockStack> lockorders;
@@ -65,17 +64,19 @@ static void potential_deadlock_detected(const std::pair<void*, void*>& mismatch,
 {
     LogPrintf("POTENTIAL DEADLOCK DETECTED\n");
     LogPrintf("Previous lock order was:\n");
-    BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s2)
-    {
-        if (i.first == mismatch.first) LogPrintf(" (1)");
-        if (i.first == mismatch.second) LogPrintf(" (2)");
+    BOOST_FOREACH (const PAIRTYPE(void*, CLockLocation) & i, s2) {
+        if (i.first == mismatch.first)
+            LogPrintf(" (1)");
+        if (i.first == mismatch.second)
+            LogPrintf(" (2)");
         LogPrintf(" %s\n", i.second.ToString());
     }
     LogPrintf("Current lock order is:\n");
-    BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, s1)
-    {
-        if (i.first == mismatch.first) LogPrintf(" (1)");
-        if (i.first == mismatch.second) LogPrintf(" (2)");
+    BOOST_FOREACH (const PAIRTYPE(void*, CLockLocation) & i, s1) {
+        if (i.first == mismatch.first)
+            LogPrintf(" (1)");
+        if (i.first == mismatch.second)
+            LogPrintf(" (2)");
         LogPrintf(" %s\n", i.second.ToString());
     }
 }
@@ -91,8 +92,9 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
     (*lockstack).push_back(std::make_pair(c, locklocation));
 
     if (!fTry) {
-        BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)& i, (*lockstack)) {
-            if (i.first == c) break;
+        BOOST_FOREACH (const PAIRTYPE(void*, CLockLocation) & i, (*lockstack)) {
+            if (i.first == c)
+                break;
 
             std::pair<void*, void*> p1 = std::make_pair(i.first, c);
             if (lockorders.count(p1))
@@ -100,8 +102,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
             lockorders[p1] = (*lockstack);
 
             std::pair<void*, void*> p2 = std::make_pair(c, i.first);
-            if (lockorders.count(p2))
-            {
+            if (lockorders.count(p2)) {
                 potential_deadlock_detected(p1, lockorders[p2], lockorders[p1]);
                 break;
             }
@@ -112,8 +113,7 @@ static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
 
 static void pop_lock()
 {
-    if (fDebug)
-    {
+    if (fDebug) {
         const CLockLocation& locklocation = (*lockstack).rbegin()->second;
         LogPrint("lock", "Unlocked: %s\n", locklocation.ToString());
     }
@@ -135,17 +135,17 @@ void LeaveCritical()
 std::string LocksHeld()
 {
     std::string result;
-    BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)&i, *lockstack)
+    BOOST_FOREACH (const PAIRTYPE(void*, CLockLocation) & i, *lockstack)
         result += i.second.ToString() + std::string("\n");
     return result;
 }
 
-void AssertLockHeldInternal(const char *pszName, const char* pszFile, int nLine, void *cs)
+void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs)
 {
-    BOOST_FOREACH(const PAIRTYPE(void*, CLockLocation)&i, *lockstack)
-        if (i.first == cs) return;
-    fprintf(stderr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s",
-            pszName, pszFile, nLine, LocksHeld().c_str());
+    BOOST_FOREACH (const PAIRTYPE(void*, CLockLocation) & i, *lockstack)
+        if (i.first == cs)
+            return;
+    fprintf(stderr, "Assertion failed: lock %s not held in %s:%i; locks held:\n%s", pszName, pszFile, nLine, LocksHeld().c_str());
     abort();
 }
 
diff --git a/src/sync.h b/src/sync.h
index 4b81b4bd3215..cd0aa7b20e71 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -48,7 +48,6 @@ LEAVE_CRITICAL_SECTION(mutex); // no RAII
  */
 
 
-
 ///////////////////////////////
 //                           //
 // THE ACTUAL IMPLEMENTATION //
@@ -63,17 +62,17 @@ class LOCKABLE AnnotatedMixin : public PARENT
 public:
     void lock() EXCLUSIVE_LOCK_FUNCTION()
     {
-      PARENT::lock();
+        PARENT::lock();
     }
 
     void unlock() UNLOCK_FUNCTION()
     {
-      PARENT::unlock();
+        PARENT::unlock();
     }
 
     bool try_lock() EXCLUSIVE_TRYLOCK_FUNCTION(true)
     {
-      return PARENT::try_lock();
+        return PARENT::try_lock();
     }
 };
 
@@ -91,11 +90,13 @@ typedef boost::condition_variable CConditionVariable;
 void EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false);
 void LeaveCritical();
 std::string LocksHeld();
-void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void *cs);
+void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs);
 #else
-void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false) {}
+void static inline EnterCritical(const char* pszName, const char* pszFile, int nLine, void* cs, bool fTry = false)
+{
+}
 void static inline LeaveCritical() {}
-void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void *cs) {}
+void static inline AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, void* cs) {}
 #endif
 #define AssertLockHeld(cs) AssertLockHeldInternal(#cs, __FILE__, __LINE__, &cs)
 
@@ -104,7 +105,7 @@ void PrintLockContention(const char* pszName, const char* pszFile, int nLine);
 #endif
 
 /** Wrapper around boost::unique_lock<Mutex> */
-template<typename Mutex>
+template <typename Mutex>
 class CMutexLock
 {
 private:
@@ -114,11 +115,10 @@ class CMutexLock
     {
         EnterCritical(pszName, pszFile, nLine, (void*)(lock.mutex()));
 #ifdef DEBUG_LOCKCONTENTION
-        if (!lock.try_lock())
-        {
+        if (!lock.try_lock()) {
             PrintLockContention(pszName, pszFile, nLine);
 #endif
-        lock.lock();
+            lock.lock();
 #ifdef DEBUG_LOCKCONTENTION
         }
 #endif
@@ -157,19 +157,19 @@ class CMutexLock
 typedef CMutexLock<CCriticalSection> CCriticalBlock;
 
 #define LOCK(cs) CCriticalBlock criticalblock(cs, #cs, __FILE__, __LINE__)
-#define LOCK2(cs1,cs2) CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__),criticalblock2(cs2, #cs2, __FILE__, __LINE__)
-#define TRY_LOCK(cs,name) CCriticalBlock name(cs, #cs, __FILE__, __LINE__, true)
+#define LOCK2(cs1, cs2) CCriticalBlock criticalblock1(cs1, #cs1, __FILE__, __LINE__), criticalblock2(cs2, #cs2, __FILE__, __LINE__)
+#define TRY_LOCK(cs, name) CCriticalBlock name(cs, #cs, __FILE__, __LINE__, true)
 
-#define ENTER_CRITICAL_SECTION(cs) \
-    { \
+#define ENTER_CRITICAL_SECTION(cs)                            \
+    {                                                         \
         EnterCritical(#cs, __FILE__, __LINE__, (void*)(&cs)); \
-        (cs).lock(); \
+        (cs).lock();                                          \
     }
 
 #define LEAVE_CRITICAL_SECTION(cs) \
-    { \
-        (cs).unlock(); \
-        LeaveCritical(); \
+    {                              \
+        (cs).unlock();             \
+        LeaveCritical();           \
     }
 
 class CSemaphore
@@ -182,7 +182,8 @@ class CSemaphore
 public:
     CSemaphore(int init) : value(init) {}
 
-    void wait() {
+    void wait()
+    {
         boost::unique_lock<boost::mutex> lock(mutex);
         while (value < 1) {
             condition.wait(lock);
@@ -190,7 +191,8 @@ class CSemaphore
         value--;
     }
 
-    bool try_wait() {
+    bool try_wait()
+    {
         boost::unique_lock<boost::mutex> lock(mutex);
         if (value < 1)
             return false;
@@ -198,7 +200,8 @@ class CSemaphore
         return true;
     }
 
-    void post() {
+    void post()
+    {
         {
             boost::unique_lock<boost::mutex> lock(mutex);
             value++;
@@ -211,31 +214,35 @@ class CSemaphore
 class CSemaphoreGrant
 {
 private:
-    CSemaphore *sem;
+    CSemaphore* sem;
     bool fHaveGrant;
 
 public:
-    void Acquire() {
+    void Acquire()
+    {
         if (fHaveGrant)
             return;
         sem->wait();
         fHaveGrant = true;
     }
 
-    void Release() {
+    void Release()
+    {
         if (!fHaveGrant)
             return;
         sem->post();
         fHaveGrant = false;
     }
 
-    bool TryAcquire() {
+    bool TryAcquire()
+    {
         if (!fHaveGrant && sem->try_wait())
             fHaveGrant = true;
         return fHaveGrant;
     }
 
-    void MoveTo(CSemaphoreGrant &grant) {
+    void MoveTo(CSemaphoreGrant& grant)
+    {
         grant.Release();
         grant.sem = sem;
         grant.fHaveGrant = fHaveGrant;
@@ -245,18 +252,21 @@ class CSemaphoreGrant
 
     CSemaphoreGrant() : sem(NULL), fHaveGrant(false) {}
 
-    CSemaphoreGrant(CSemaphore &sema, bool fTry = false) : sem(&sema), fHaveGrant(false) {
+    CSemaphoreGrant(CSemaphore& sema, bool fTry = false) : sem(&sema), fHaveGrant(false)
+    {
         if (fTry)
             TryAcquire();
         else
             Acquire();
     }
 
-    ~CSemaphoreGrant() {
+    ~CSemaphoreGrant()
+    {
         Release();
     }
 
-    operator bool() {
+    operator bool()
+    {
         return fHaveGrant;
     }
 };
diff --git a/src/threadsafety.h b/src/threadsafety.h
index 9ee39372e1a9..7515d050e725 100644
--- a/src/threadsafety.h
+++ b/src/threadsafety.h
@@ -13,24 +13,24 @@
 // See http://clang.llvm.org/docs/LanguageExtensions.html#threadsafety
 // for documentation.  The clang compiler can do advanced static analysis
 // of locking when given the -Wthread-safety option.
-#define LOCKABLE                        __attribute__ ((lockable))
-#define SCOPED_LOCKABLE                 __attribute__ ((scoped_lockable))
-#define GUARDED_BY(x)                   __attribute__ ((guarded_by(x)))
-#define GUARDED_VAR                     __attribute__ ((guarded_var))
-#define PT_GUARDED_BY(x)                __attribute__ ((pt_guarded_by(x)))
-#define PT_GUARDED_VAR                  __attribute__ ((pt_guarded_var))
-#define ACQUIRED_AFTER(...)             __attribute__ ((acquired_after(__VA_ARGS__)))
-#define ACQUIRED_BEFORE(...)            __attribute__ ((acquired_before(__VA_ARGS__)))
-#define EXCLUSIVE_LOCK_FUNCTION(...)    __attribute__ ((exclusive_lock_function(__VA_ARGS__)))
-#define SHARED_LOCK_FUNCTION(...)       __attribute__ ((shared_lock_function(__VA_ARGS__)))
-#define EXCLUSIVE_TRYLOCK_FUNCTION(...) __attribute__ ((exclusive_trylock_function(__VA_ARGS__)))
-#define SHARED_TRYLOCK_FUNCTION(...)    __attribute__ ((shared_trylock_function(__VA_ARGS__)))
-#define UNLOCK_FUNCTION(...)            __attribute__ ((unlock_function(__VA_ARGS__)))
-#define LOCK_RETURNED(x)                __attribute__ ((lock_returned(x)))
-#define LOCKS_EXCLUDED(...)             __attribute__ ((locks_excluded(__VA_ARGS__)))
-#define EXCLUSIVE_LOCKS_REQUIRED(...)   __attribute__ ((exclusive_locks_required(__VA_ARGS__)))
-#define SHARED_LOCKS_REQUIRED(...)      __attribute__ ((shared_locks_required(__VA_ARGS__)))
-#define NO_THREAD_SAFETY_ANALYSIS       __attribute__ ((no_thread_safety_analysis))
+#define LOCKABLE __attribute__((lockable))
+#define SCOPED_LOCKABLE __attribute__((scoped_lockable))
+#define GUARDED_BY(x) __attribute__((guarded_by(x)))
+#define GUARDED_VAR __attribute__((guarded_var))
+#define PT_GUARDED_BY(x) __attribute__((pt_guarded_by(x)))
+#define PT_GUARDED_VAR __attribute__((pt_guarded_var))
+#define ACQUIRED_AFTER(...) __attribute__((acquired_after(__VA_ARGS__)))
+#define ACQUIRED_BEFORE(...) __attribute__((acquired_before(__VA_ARGS__)))
+#define EXCLUSIVE_LOCK_FUNCTION(...) __attribute__((exclusive_lock_function(__VA_ARGS__)))
+#define SHARED_LOCK_FUNCTION(...) __attribute__((shared_lock_function(__VA_ARGS__)))
+#define EXCLUSIVE_TRYLOCK_FUNCTION(...) __attribute__((exclusive_trylock_function(__VA_ARGS__)))
+#define SHARED_TRYLOCK_FUNCTION(...) __attribute__((shared_trylock_function(__VA_ARGS__)))
+#define UNLOCK_FUNCTION(...) __attribute__((unlock_function(__VA_ARGS__)))
+#define LOCK_RETURNED(x) __attribute__((lock_returned(x)))
+#define LOCKS_EXCLUDED(...) __attribute__((locks_excluded(__VA_ARGS__)))
+#define EXCLUSIVE_LOCKS_REQUIRED(...) __attribute__((exclusive_locks_required(__VA_ARGS__)))
+#define SHARED_LOCKS_REQUIRED(...) __attribute__((shared_locks_required(__VA_ARGS__)))
+#define NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
 #else
 #define LOCKABLE
 #define SCOPED_LOCKABLE
@@ -50,6 +50,6 @@
 #define EXCLUSIVE_LOCKS_REQUIRED(...)
 #define SHARED_LOCKS_REQUIRED(...)
 #define NO_THREAD_SAFETY_ANALYSIS
-#endif  // __GNUC__
+#endif // __GNUC__
 
-#endif  // BITCOIN_THREADSAFETY_H
+#endif // BITCOIN_THREADSAFETY_H
diff --git a/src/timedata.h b/src/timedata.h
index 155f6872daa2..2c20f4efd5e4 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -15,15 +15,16 @@ class CNetAddr;
 /** Median filter over a stream of values.
  * Returns the median of the last N numbers
  */
-template <typename T> class CMedianFilter
+template <typename T>
+class CMedianFilter
 {
 private:
     std::vector<T> vValues;
     std::vector<T> vSorted;
     unsigned int nSize;
+
 public:
-    CMedianFilter(unsigned int size, T initial_value):
-        nSize(size)
+    CMedianFilter(unsigned int size, T initial_value) : nSize(size)
     {
         vValues.reserve(size);
         vValues.push_back(initial_value);
@@ -32,8 +33,7 @@ template <typename T> class CMedianFilter
 
     void input(T value)
     {
-        if(vValues.size() == nSize)
-        {
+        if (vValues.size() == nSize) {
             vValues.erase(vValues.begin());
         }
         vValues.push_back(value);
@@ -46,14 +46,13 @@ template <typename T> class CMedianFilter
     T median() const
     {
         int size = vSorted.size();
-        assert(size>0);
-        if(size & 1) // Odd number of elements
+        assert(size > 0);
+        if (size & 1) // Odd number of elements
         {
-            return vSorted[size/2];
-        }
-        else // Even number of elements
+            return vSorted[size / 2];
+        } else // Even number of elements
         {
-            return (vSorted[size/2-1] + vSorted[size/2]) / 2;
+            return (vSorted[size / 2 - 1] + vSorted[size / 2]) / 2;
         }
     }
 
@@ -62,7 +61,7 @@ template <typename T> class CMedianFilter
         return vValues.size();
     }
 
-    std::vector<T> sorted () const
+    std::vector<T> sorted() const
     {
         return vSorted;
     }
diff --git a/src/uint256.cpp b/src/uint256.cpp
index feda0ca5a9d4..79406f24757b 100644
--- a/src/uint256.cpp
+++ b/src/uint256.cpp
@@ -10,13 +10,13 @@
 #include <stdio.h>
 #include <string.h>
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>::base_uint(const std::string& str)
 {
     SetHex(str);
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>::base_uint(const std::vector<unsigned char>& vch)
 {
     if (vch.size() != sizeof(pn))
@@ -24,7 +24,7 @@ base_uint<BITS>::base_uint(const std::vector<unsigned char>& vch)
     memcpy(pn, &vch[0], sizeof(pn));
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>& base_uint<BITS>::operator<<=(unsigned int shift)
 {
     base_uint<BITS> a(*this);
@@ -33,15 +33,15 @@ base_uint<BITS>& base_uint<BITS>::operator<<=(unsigned int shift)
     int k = shift / 32;
     shift = shift % 32;
     for (int i = 0; i < WIDTH; i++) {
-        if (i+k+1 < WIDTH && shift != 0)
-            pn[i+k+1] |= (a.pn[i] >> (32-shift));
-        if (i+k < WIDTH)
-            pn[i+k] |= (a.pn[i] << shift);
+        if (i + k + 1 < WIDTH && shift != 0)
+            pn[i + k + 1] |= (a.pn[i] >> (32 - shift));
+        if (i + k < WIDTH)
+            pn[i + k] |= (a.pn[i] << shift);
     }
     return *this;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>& base_uint<BITS>::operator>>=(unsigned int shift)
 {
     base_uint<BITS> a(*this);
@@ -50,15 +50,15 @@ base_uint<BITS>& base_uint<BITS>::operator>>=(unsigned int shift)
     int k = shift / 32;
     shift = shift % 32;
     for (int i = 0; i < WIDTH; i++) {
-        if (i-k-1 >= 0 && shift != 0)
-            pn[i-k-1] |= (a.pn[i] << (32-shift));
-        if (i-k >= 0)
-            pn[i-k] |= (a.pn[i] >> shift);
+        if (i - k - 1 >= 0 && shift != 0)
+            pn[i - k - 1] |= (a.pn[i] << (32 - shift));
+        if (i - k >= 0)
+            pn[i - k] |= (a.pn[i] >> shift);
     }
     return *this;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>& base_uint<BITS>::operator*=(uint32_t b32)
 {
     uint64_t carry = 0;
@@ -70,7 +70,7 @@ base_uint<BITS>& base_uint<BITS>::operator*=(uint32_t b32)
     return *this;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>& base_uint<BITS>::operator*=(const base_uint& b)
 {
     base_uint<BITS> a = *this;
@@ -86,12 +86,12 @@ base_uint<BITS>& base_uint<BITS>::operator*=(const base_uint& b)
     return *this;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 base_uint<BITS>& base_uint<BITS>::operator/=(const base_uint& b)
 {
-    base_uint<BITS> div = b; // make a copy, so we can shift.
+    base_uint<BITS> div = b;     // make a copy, so we can shift.
     base_uint<BITS> num = *this; // make a copy, so we can subtract.
-    *this = 0; // the quotient.
+    *this = 0;                   // the quotient.
     int num_bits = num.bits();
     int div_bits = div.bits();
     if (div_bits == 0)
@@ -112,9 +112,10 @@ base_uint<BITS>& base_uint<BITS>::operator/=(const base_uint& b)
     return *this;
 }
 
-template<unsigned int BITS>
-int base_uint<BITS>::CompareTo(const base_uint<BITS>& b) const {
-    for (int i = WIDTH-1; i >= 0; i--) {
+template <unsigned int BITS>
+int base_uint<BITS>::CompareTo(const base_uint<BITS>& b) const
+{
+    for (int i = WIDTH - 1; i >= 0; i--) {
         if (pn[i] < b.pn[i])
             return -1;
         if (pn[i] > b.pn[i])
@@ -123,9 +124,10 @@ int base_uint<BITS>::CompareTo(const base_uint<BITS>& b) const {
     return 0;
 }
 
-template<unsigned int BITS>
-bool base_uint<BITS>::EqualTo(uint64_t b) const {
-    for (int i = WIDTH-1; i >= 2; i--) {
+template <unsigned int BITS>
+bool base_uint<BITS>::EqualTo(uint64_t b) const
+{
+    for (int i = WIDTH - 1; i >= 2; i--) {
         if (pn[i])
             return false;
     }
@@ -136,7 +138,7 @@ bool base_uint<BITS>::EqualTo(uint64_t b) const {
     return true;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 double base_uint<BITS>::getdouble() const
 {
     double ret = 0.0;
@@ -148,19 +150,19 @@ double base_uint<BITS>::getdouble() const
     return ret;
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 std::string base_uint<BITS>::GetHex() const
 {
-    char psz[sizeof(pn)*2 + 1];
+    char psz[sizeof(pn) * 2 + 1];
     for (unsigned int i = 0; i < sizeof(pn); i++)
-        sprintf(psz + i*2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
-    return std::string(psz, psz + sizeof(pn)*2);
+        sprintf(psz + i * 2, "%02x", ((unsigned char*)pn)[sizeof(pn) - i - 1]);
+    return std::string(psz, psz + sizeof(pn) * 2);
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 void base_uint<BITS>::SetHex(const char* psz)
 {
-    memset(pn,0,sizeof(pn));
+    memset(pn, 0, sizeof(pn));
 
     // skip leading spaces
     while (isspace(*psz))
@@ -186,28 +188,28 @@ void base_uint<BITS>::SetHex(const char* psz)
     }
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 void base_uint<BITS>::SetHex(const std::string& str)
 {
     SetHex(str.c_str());
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 std::string base_uint<BITS>::ToString() const
 {
     return (GetHex());
 }
 
-template<unsigned int BITS>
+template <unsigned int BITS>
 unsigned int base_uint<BITS>::bits() const
 {
-    for (int pos = WIDTH-1; pos >= 0; pos--) {
+    for (int pos = WIDTH - 1; pos >= 0; pos--) {
         if (pn[pos]) {
             for (int bits = 31; bits > 0; bits--) {
-                if (pn[pos] & 1<<bits)
-                    return 32*pos + bits + 1;
+                if (pn[pos] & 1 << bits)
+                    return 32 * pos + bits + 1;
             }
-            return 32*pos + 1;
+            return 32 * pos + 1;
         }
     }
     return 0;
@@ -249,16 +251,16 @@ template unsigned int base_uint<256>::bits() const;
 
 // This implementation directly uses shifts instead of going
 // through an intermediate MPI representation.
-uint256& uint256::SetCompact(uint32_t nCompact, bool *pfNegative, bool *pfOverflow)
+uint256& uint256::SetCompact(uint32_t nCompact, bool* pfNegative, bool* pfOverflow)
 {
     int nSize = nCompact >> 24;
     uint32_t nWord = nCompact & 0x007fffff;
     if (nSize <= 3) {
-        nWord >>= 8*(3-nSize);
+        nWord >>= 8 * (3 - nSize);
         *this = nWord;
     } else {
         *this = nWord;
-        *this <<= 8*(nSize-3);
+        *this <<= 8 * (nSize - 3);
     }
     if (pfNegative)
         *pfNegative = nWord != 0 && (nCompact & 0x00800000) != 0;
@@ -274,9 +276,9 @@ uint32_t uint256::GetCompact(bool fNegative) const
     int nSize = (bits() + 7) / 8;
     uint32_t nCompact = 0;
     if (nSize <= 3) {
-        nCompact = GetLow64() << 8*(3-nSize);
+        nCompact = GetLow64() << 8 * (3 - nSize);
     } else {
-        uint256 bn = *this >> 8*(nSize-3);
+        uint256 bn = *this >> 8 * (nSize - 3);
         nCompact = bn.GetLow64();
     }
     // The 0x00800000 bit denotes the sign.
@@ -295,27 +297,46 @@ uint32_t uint256::GetCompact(bool fNegative) const
 static void inline HashMix(uint32_t& a, uint32_t& b, uint32_t& c)
 {
     // Taken from lookup3, by Bob Jenkins.
-    a -= c; a ^= ((c <<  4) | (c >> 28)); c += b;
-    b -= a; b ^= ((a <<  6) | (a >> 26)); a += c;
-    c -= b; c ^= ((b <<  8) | (b >> 24)); b += a;
-    a -= c; a ^= ((c << 16) | (c >> 16)); c += b;
-    b -= a; b ^= ((a << 19) | (a >> 13)); a += c;
-    c -= b; c ^= ((b <<  4) | (b >> 28)); b += a;
+    a -= c;
+    a ^= ((c << 4) | (c >> 28));
+    c += b;
+    b -= a;
+    b ^= ((a << 6) | (a >> 26));
+    a += c;
+    c -= b;
+    c ^= ((b << 8) | (b >> 24));
+    b += a;
+    a -= c;
+    a ^= ((c << 16) | (c >> 16));
+    c += b;
+    b -= a;
+    b ^= ((a << 19) | (a >> 13));
+    a += c;
+    c -= b;
+    c ^= ((b << 4) | (b >> 28));
+    b += a;
 }
 
 static void inline HashFinal(uint32_t& a, uint32_t& b, uint32_t& c)
 {
     // Taken from lookup3, by Bob Jenkins.
-    c ^= b; c -= ((b << 14) | (b >> 18));
-    a ^= c; a -= ((c << 11) | (c >> 21));
-    b ^= a; b -= ((a << 25) | (a >>  7));
-    c ^= b; c -= ((b << 16) | (b >> 16));
-    a ^= c; a -= ((c <<  4) | (c >> 28));
-    b ^= a; b -= ((a << 14) | (a >> 18));
-    c ^= b; c -= ((b << 24) | (b >>  8));
+    c ^= b;
+    c -= ((b << 14) | (b >> 18));
+    a ^= c;
+    a -= ((c << 11) | (c >> 21));
+    b ^= a;
+    b -= ((a << 25) | (a >> 7));
+    c ^= b;
+    c -= ((b << 16) | (b >> 16));
+    a ^= c;
+    a -= ((c << 4) | (c >> 28));
+    b ^= a;
+    b -= ((a << 14) | (a >> 18));
+    c ^= b;
+    c -= ((b << 24) | (b >> 8));
 }
 
-uint64_t uint256::GetHash(const uint256 &salt) const
+uint64_t uint256::GetHash(const uint256& salt) const
 {
     uint32_t a, b, c;
     a = b = c = 0xdeadbeef + (WIDTH << 2);
diff --git a/src/version.cpp b/src/version.cpp
index e441cc463f32..95632fdab706 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -16,7 +16,7 @@
 const std::string CLIENT_NAME("Satoshi");
 
 // Client version number
-#define CLIENT_VERSION_SUFFIX   ""
+#define CLIENT_VERSION_SUFFIX ""
 
 
 // The following part of the code determines the CLIENT_BUILD variable.
@@ -35,40 +35,40 @@ const std::string CLIENT_NAME("Satoshi");
 
 // First, include build.h if requested
 #ifdef HAVE_BUILD_INFO
-#    include "build.h"
+#include "build.h"
 #endif
 
 // git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$
 #ifdef GIT_ARCHIVE
-#    define GIT_COMMIT_ID "$Format:%h$"
-#    define GIT_COMMIT_DATE "$Format:%cD$"
+#define GIT_COMMIT_ID "$Format:%h$"
+#define GIT_COMMIT_DATE "$Format:%cD$"
 #endif
 
-#define BUILD_DESC_WITH_SUFFIX(maj,min,rev,build,suffix) \
+#define BUILD_DESC_WITH_SUFFIX(maj, min, rev, build, suffix) \
     "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-" DO_STRINGIZE(suffix)
 
-#define BUILD_DESC_FROM_COMMIT(maj,min,rev,build,commit) \
+#define BUILD_DESC_FROM_COMMIT(maj, min, rev, build, commit) \
     "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-g" commit
 
-#define BUILD_DESC_FROM_UNKNOWN(maj,min,rev,build) \
+#define BUILD_DESC_FROM_UNKNOWN(maj, min, rev, build) \
     "v" DO_STRINGIZE(maj) "." DO_STRINGIZE(min) "." DO_STRINGIZE(rev) "." DO_STRINGIZE(build) "-unk"
 
 #ifndef BUILD_DESC
-#    ifdef BUILD_SUFFIX
-#        define BUILD_DESC BUILD_DESC_WITH_SUFFIX(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, BUILD_SUFFIX)
-#    elif defined(GIT_COMMIT_ID)
-#        define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID)
-#    else
-#        define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD)
-#    endif
+#ifdef BUILD_SUFFIX
+#define BUILD_DESC BUILD_DESC_WITH_SUFFIX(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, BUILD_SUFFIX)
+#elif defined(GIT_COMMIT_ID)
+#define BUILD_DESC BUILD_DESC_FROM_COMMIT(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD, GIT_COMMIT_ID)
+#else
+#define BUILD_DESC BUILD_DESC_FROM_UNKNOWN(CLIENT_VERSION_MAJOR, CLIENT_VERSION_MINOR, CLIENT_VERSION_REVISION, CLIENT_VERSION_BUILD)
+#endif
 #endif
 
 #ifndef BUILD_DATE
-#    ifdef GIT_COMMIT_DATE
-#        define BUILD_DATE GIT_COMMIT_DATE
-#    else
-#        define BUILD_DATE __DATE__ ", " __TIME__
-#    endif
+#ifdef GIT_COMMIT_DATE
+#define BUILD_DATE GIT_COMMIT_DATE
+#else
+#define BUILD_DATE __DATE__ ", " __TIME__
+#endif
 #endif
 
 const std::string CLIENT_BUILD(BUILD_DESC CLIENT_VERSION_SUFFIX);
@@ -76,10 +76,10 @@ const std::string CLIENT_DATE(BUILD_DATE);
 
 static std::string FormatVersion(int nVersion)
 {
-    if (nVersion%100 == 0)
-        return strprintf("%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100);
+    if (nVersion % 100 == 0)
+        return strprintf("%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100);
     else
-        return strprintf("%d.%d.%d.%d", nVersion/1000000, (nVersion/10000)%100, (nVersion/100)%100, nVersion%100);
+        return strprintf("%d.%d.%d.%d", nVersion / 1000000, (nVersion / 10000) % 100, (nVersion / 100) % 100, nVersion % 100);
 }
 
 std::string FormatFullVersion()

From c65cc8cde30dd34a81962fda51a754f1cc0bdde8 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 19 Sep 2014 15:22:33 -0400
Subject: [PATCH 0723/1819] build: fix release name strings for gitian builds

When building from a distdir as gitian does, checking for the .git dir
is not reliable. Instead, ask git if we're in a repo.
---
 share/genbuild.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/genbuild.sh b/share/genbuild.sh
index 0800b3122971..679566e5969a 100755
--- a/share/genbuild.sh
+++ b/share/genbuild.sh
@@ -16,7 +16,7 @@ fi
 DESC=""
 SUFFIX=""
 LAST_COMMIT_DATE=""
-if [ -e "$(which git 2>/dev/null)" -a -d ".git" ]; then
+if [ -e "$(which git 2>/dev/null)" -a $(git rev-parse --is-inside-work-tree 2>/dev/null) = "true" ]; then
     # clean 'dirty' status of touched files that haven't been modified
     git diff >/dev/null 2>/dev/null 
 

From 6134b43ba9ffc277a3b0cd8cceb5abe8e5c8bd56 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Fri, 19 Sep 2014 18:29:58 -0400
Subject: [PATCH 0724/1819] Fixing condition 'sabotaging' MSVC build

---
 src/script/script.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/script/script.h b/src/script/script.h
index 07a4229f853a..4c9ac74b78b1 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -340,9 +340,7 @@ class CScript : public std::vector<unsigned char>
     CScript() { }
     CScript(const CScript& b) : std::vector<unsigned char>(b.begin(), b.end()) { }
     CScript(const_iterator pbegin, const_iterator pend) : std::vector<unsigned char>(pbegin, pend) { }
-#ifndef _MSC_VER
     CScript(const unsigned char* pbegin, const unsigned char* pend) : std::vector<unsigned char>(pbegin, pend) { }
-#endif
 
     CScript& operator+=(const CScript& b)
     {

From 33a27716fc4389e7acb53708f0e02fc9b4606498 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sat, 20 Sep 2014 09:53:50 +0200
Subject: [PATCH 0725/1819] test: Fix DoS tests after c74332c

Fix data structure mismatch ... The mind boggles that they were still passing at all.
---
 src/test/DoS_tests.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index af01e5518cec..7bec12b665c2 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -27,7 +27,11 @@
 extern bool AddOrphanTx(const CTransaction& tx, NodeId peer);
 extern void EraseOrphansFor(NodeId peer);
 extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans);
-extern std::map<uint256, CTransaction> mapOrphanTransactions;
+struct COrphanTx {
+    CTransaction tx;
+    NodeId fromPeer;
+};
+extern std::map<uint256, COrphanTx> mapOrphanTransactions;
 extern std::map<uint256, std::set<uint256> > mapOrphanTransactionsByPrev;
 
 CService ip(uint32_t i)
@@ -149,11 +153,11 @@ BOOST_AUTO_TEST_CASE(DoS_checknbits)
 
 CTransaction RandomOrphan()
 {
-    std::map<uint256, CTransaction>::iterator it;
+    std::map<uint256, COrphanTx>::iterator it;
     it = mapOrphanTransactions.lower_bound(GetRandHash());
     if (it == mapOrphanTransactions.end())
         it = mapOrphanTransactions.begin();
-    return it->second;
+    return it->second.tx;
 }
 
 BOOST_AUTO_TEST_CASE(DoS_mapOrphans)

From d6712db35419e36b2c89191eb730a86d95abf4b0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sat, 20 Sep 2014 10:56:25 +0200
Subject: [PATCH 0726/1819] Also create pid file in non-daemon mode

Always make a pid file, not only when `-daemon` specified.

This is useful for troubleshooting, for attaching debuggers and loggers
and such.

- Write the pid file only after the datadir lock was acquired
- Don't create or remove a pid file on WIN32, and also don't show the option
---
 src/bitcoind.cpp | 1 -
 src/init.cpp     | 8 +++++++-
 src/util.cpp     | 2 +-
 src/util.h       | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 5be8708979b7..0737b5a83dad 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -129,7 +129,6 @@ bool AppInit(int argc, char* argv[])
             }
             if (pid > 0) // Parent process, pid is child process id
             {
-                CreatePidFile(GetPidFile(), pid);
                 return true;
             }
             // Child process falls through to rest of initialization
diff --git a/src/init.cpp b/src/init.cpp
index 67f53e044cc3..7299bd0f4a73 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -160,7 +160,9 @@ void Shutdown()
     if (pwalletMain)
         bitdb.Flush(true);
 #endif
+#ifndef WIN32
     boost::filesystem::remove(GetPidFile());
+#endif
     UnregisterAllWallets();
 #ifdef ENABLE_WALLET
     if (pwalletMain)
@@ -228,7 +230,9 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -maxorphanblocks=<n>   " + strprintf(_("Keep at most <n> unconnectable blocks in memory (default: %u)"), DEFAULT_MAX_ORPHAN_BLOCKS) + "\n";
     strUsage += "  -maxorphantx=<n>       " + strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
+#ifndef WIN32
     strUsage += "  -pid=<file>            " + _("Specify pid file (default: bitcoind.pid)") + "\n";
+#endif
     strUsage += "  -reindex               " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n";
 #if !defined(WIN32)
     strUsage += "  -sysperms              " + _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)") + "\n";
@@ -714,7 +718,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     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));
-
+#ifndef WIN32
+    CreatePidFile(GetPidFile(), getpid());
+#endif
     if (GetBoolArg("-shrinkdebugfile", !fDebug))
         ShrinkDebugFile();
     LogPrintf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
diff --git a/src/util.cpp b/src/util.cpp
index 0ac0f70a7924..f387fce8c7b5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -472,6 +472,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
     ClearDatadirCache();
 }
 
+#ifndef WIN32
 boost::filesystem::path GetPidFile()
 {
     boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid"));
@@ -479,7 +480,6 @@ boost::filesystem::path GetPidFile()
     return pathPidFile;
 }
 
-#ifndef WIN32
 void CreatePidFile(const boost::filesystem::path &path, pid_t pid)
 {
     FILE* file = fopen(path.string().c_str(), "w");
diff --git a/src/util.h b/src/util.h
index e72c99adc774..4b2415278ba3 100644
--- a/src/util.h
+++ b/src/util.h
@@ -93,8 +93,8 @@ bool TryCreateDirectory(const boost::filesystem::path& p);
 boost::filesystem::path GetDefaultDataDir();
 const boost::filesystem::path &GetDataDir(bool fNetSpecific = true);
 boost::filesystem::path GetConfigFile();
-boost::filesystem::path GetPidFile();
 #ifndef WIN32
+boost::filesystem::path GetPidFile();
 void CreatePidFile(const boost::filesystem::path &path, pid_t pid);
 #endif
 void ReadConfigFile(std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);

From 01c28073ba2cae5a53124c7dc7123240b98513ce Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sat, 20 Sep 2014 12:32:42 -0400
Subject: [PATCH 0727/1819] Add warning about the merkle-tree algorithm
 duplicate txid flaw

Lots of people read the Bitcoin Core codebase to learn more about
crypto; better to warn about flaws explicitly so they don't blindly copy
the code for other uses and create broken systems.
---
 src/core.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/core.cpp b/src/core.cpp
index 491e4fa68bc1..e52327ba8e7d 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -226,6 +226,13 @@ uint256 CBlockHeader::GetHash() const
 
 uint256 CBlock::BuildMerkleTree() const
 {
+    // WARNING! If you're reading this because you're learning about crypto
+    // and/or designing a new system that will use merkle trees, keep in mind
+    // that the following merkle tree algorithm has a serious flaw related to
+    // duplicate txids, resulting in a vulnerability. (CVE-2012-2459) Bitcoin
+    // has since worked around the flaw, but for new applications you should
+    // use something different; don't just copy-and-paste this code without
+    // understanding the problem first.
     vMerkleTree.clear();
     BOOST_FOREACH(const CTransaction& tx, vtx)
         vMerkleTree.push_back(tx.GetHash());

From f297479a1995bd147c21c58fca103cd3ab3e54c1 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Mon, 1 Sep 2014 00:01:54 +0200
Subject: [PATCH 0728/1819] Reserve only one network specific cached path per
 session

---
 src/util.cpp | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 0ac0f70a7924..7bb65f65846b 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -395,7 +395,7 @@ boost::filesystem::path GetDefaultDataDir()
 #endif
 }
 
-static boost::filesystem::path pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1];
+static boost::filesystem::path pathCached[2];
 static CCriticalSection csPathCached;
 
 const boost::filesystem::path &GetDataDir(bool fNetSpecific)
@@ -404,10 +404,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
     LOCK(csPathCached);
 
-    int nNet = CBaseChainParams::MAX_NETWORK_TYPES;
-    if (fNetSpecific) nNet = BaseParams().NetworkID();
-
-    fs::path &path = pathCached[nNet];
+    fs::path &path = pathCached[fNetSpecific ? 1 : 0];
 
     // This can be called during exceptions by LogPrintf(), so we cache the
     // value so we don't have to do memory allocations after that.
@@ -433,8 +430,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
 void ClearDatadirCache()
 {
-    std::fill(&pathCached[0], &pathCached[CBaseChainParams::MAX_NETWORK_TYPES+1],
-        boost::filesystem::path());
+    std::fill(&pathCached[0], &pathCached[2], boost::filesystem::path());
 }
 
 boost::filesystem::path GetConfigFile()

From 3fdb9e8c159a2bc3ac853b469dae9ba0ecf739f3 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Mon, 1 Sep 2014 00:41:28 +0200
Subject: [PATCH 0729/1819] Remove CBaseChainParams::NetworkID()

---
 src/chainparams.cpp     |  9 ++++++---
 src/chainparamsbase.cpp | 25 +++++++++++++++----------
 src/chainparamsbase.h   |  8 ++++++--
 3 files changed, 27 insertions(+), 15 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 179db5a818f3..f561877d9f43 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -240,10 +240,13 @@ void SelectParams(CBaseChainParams::Network network) {
     pCurrentParams = &Params(network);
 }
 
-bool SelectParamsFromCommandLine() {
-    if (!SelectBaseParamsFromCommandLine())
+bool SelectParamsFromCommandLine() 
+{
+    CBaseChainParams::Network network = CBaseChainParams::NetworkIdFromCommandLine();
+    if (network == CBaseChainParams::MAX_NETWORK_TYPES)
         return false;
 
-    SelectParams(BaseParams().NetworkID());
+    SelectBaseParams(network);
+    SelectParams(network);
     return true;
 }
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 98bb5b855fe3..05ef5dd463b6 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -83,22 +83,27 @@ void SelectBaseParams(CBaseChainParams::Network network)
     }
 }
 
-bool SelectBaseParamsFromCommandLine()
+CBaseChainParams::Network CBaseChainParams::NetworkIdFromCommandLine()
 {
     bool fRegTest = GetBoolArg("-regtest", false);
     bool fTestNet = GetBoolArg("-testnet", false);
 
-    if (fTestNet && fRegTest) {
+    if (fTestNet && fRegTest)
+        return MAX_NETWORK_TYPES;
+    if (fRegTest)
+        return REGTEST;
+    if (fTestNet)
+        return TESTNET;
+    return MAIN;
+}
+
+bool SelectBaseParamsFromCommandLine() 
+{
+    CBaseChainParams::Network network = CBaseChainParams::NetworkIdFromCommandLine();
+    if (network == CBaseChainParams::MAX_NETWORK_TYPES)
         return false;
-    }
 
-    if (fRegTest) {
-        SelectBaseParams(CBaseChainParams::REGTEST);
-    } else if (fTestNet) {
-        SelectBaseParams(CBaseChainParams::TESTNET);
-    } else {
-        SelectBaseParams(CBaseChainParams::MAIN);
-    }
+    SelectBaseParams(network);
     return true;
 }
 
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index c054f03f1739..f24337cef0b4 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -25,8 +25,12 @@ class CBaseChainParams
 
     const std::string& DataDir() const { return strDataDir; }
     int RPCPort() const { return nRPCPort; }
-    Network NetworkID() const { return networkID; }
 
+    /**
+     * Looks for -regtest or -testnet and returns the appropriate Network ID.
+     * Returns MAX_NETWORK_TYPES if an invalid combination is given.
+     */
+    static Network NetworkIdFromCommandLine();
 protected:
     CBaseChainParams() {}
 
@@ -45,7 +49,7 @@ const CBaseChainParams& BaseParams();
 void SelectBaseParams(CBaseChainParams::Network network);
 
 /**
- * Looks for -regtest or -testnet and then calls SelectParams as appropriate.
+ * Calls CBaseChainParams::NetworkIdFromCommandLine() and then calls SelectParams as appropriate.
  * Returns false if an invalid combination is given.
  */
 bool SelectBaseParamsFromCommandLine();

From 87314c1c5e69035fefa638de8e237e4ce09788e9 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Sun, 21 Sep 2014 21:18:48 -0400
Subject: [PATCH 0730/1819] Fixing improper input syntax and failing bounds
 check

---
 src/serialize.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/serialize.h b/src/serialize.h
index 57f5fd069b30..447d808dee0e 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -921,7 +921,7 @@ class CDataStream
         Init(nTypeIn, nVersionIn);
     }
 
-    CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch((char*)&vchIn.begin()[0], (char*)&vchIn.end()[0])
+    CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
     {
         Init(nTypeIn, nVersionIn);
     }

From 2e5361b9c20517a22a4d1fdae3077d23800ecba7 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 28 Aug 2014 23:00:55 +0200
Subject: [PATCH 0731/1819] remove code below asserts in limitedmap.h (fixes a
 ToDo)

---
 src/limitedmap.h | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/limitedmap.h b/src/limitedmap.h
index 4bc8d9e5aa51..03727d7c4256 100644
--- a/src/limitedmap.h
+++ b/src/limitedmap.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_LIMITEDMAP_H
 #define BITCOIN_LIMITEDMAP_H
 
-#include <assert.h> // TODO: remove
+#include <assert.h>
 #include <map>
 
 /** STL-like map container that only keeps the N elements with the highest value. */
@@ -59,12 +59,11 @@ class limitedmap
                 return;
             }
         // Shouldn't ever get here
-        assert(0); //TODO remove me
-        map.erase(itTarget);
+        assert(0);
     }
     void update(const_iterator itIn, const mapped_type& v)
     {
-        //TODO: When we switch to C++11, use map.erase(itIn, itIn) to get the non-const iterator
+        // TODO: When we switch to C++11, use map.erase(itIn, itIn) to get the non-const iterator.
         iterator itTarget = map.find(itIn->first);
         if (itTarget == map.end())
             return;
@@ -77,9 +76,7 @@ class limitedmap
                 return;
             }
         // Shouldn't ever get here
-        assert(0); //TODO remove me
-        itTarget->second = v;
-        rmap.insert(make_pair(v, itTarget));
+        assert(0);
     }
     size_type max_size() const { return nMaxSize; }
     size_type max_size(size_type s)

From cfc5cfb0f0d074774b17adcb88aaed11e6847c92 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 22 Sep 2014 10:08:47 +0200
Subject: [PATCH 0732/1819] qt: Make splash and shutdown window ignore close
 events

It's strange to be able to close these windows while there is work
in progress.

Also set Qt::WA_DeleteOnClose on both windows to make sure that they
are deleted eventually, no matter what happens.
---
 src/qt/bitcoin.cpp       |  3 +++
 src/qt/splashscreen.cpp  |  9 +++++++--
 src/qt/splashscreen.h    |  9 +++++++--
 src/qt/utilitydialog.cpp | 26 ++++++++++++++++++++------
 src/qt/utilitydialog.h   |  6 +++++-
 5 files changed, 42 insertions(+), 11 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 676f218f20b9..fd629ccd2cb4 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -339,6 +339,9 @@ void BitcoinApplication::createWindow(bool isaTestNet)
 void BitcoinApplication::createSplashScreen(bool isaTestNet)
 {
     SplashScreen *splash = new SplashScreen(0, isaTestNet);
+    // We don't hold a direct pointer to the splash screen after creation, so use
+    // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
+    splash->setAttribute(Qt::WA_DeleteOnClose);
     splash->show();
     connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
 }
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index b6443d47ff22..382f0e67b68a 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -14,8 +14,9 @@
 #endif
 
 #include <QApplication>
-#include <QPainter>
+#include <QCloseEvent>
 #include <QDesktopWidget>
+#include <QPainter>
 
 SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
     QWidget(0, f), curAlignment(0)
@@ -113,7 +114,6 @@ SplashScreen::~SplashScreen()
 void SplashScreen::slotFinish(QWidget *mainWin)
 {
     hide();
-    deleteLater();
 }
 
 static void InitMessage(SplashScreen *splash, const std::string &message)
@@ -175,3 +175,8 @@ void SplashScreen::paintEvent(QPaintEvent *event)
     painter.drawText(r, curAlignment, curMessage);
 }
 
+void SplashScreen::closeEvent(QCloseEvent *event)
+{
+    event->ignore();
+}
+
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index 1151d6c11190..89c21e64579f 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -7,7 +7,11 @@
 
 #include <QSplashScreen>
 
-/** class for the splashscreen with information of the running client
+/** Class for the splashscreen with information of the running client.
+ *
+ * @note this is intentionally not a QSplashScreen. Bitcoin Core initialization
+ * can take a long time, and in that case a progress window that cannot be
+ * moved around and minimized has turned out to be frustrating to the user.
  */
 class SplashScreen : public QWidget
 {
@@ -18,7 +22,8 @@ class SplashScreen : public QWidget
     ~SplashScreen();
 
 protected:
-     void paintEvent(QPaintEvent *event);
+    void paintEvent(QPaintEvent *event);
+    void closeEvent(QCloseEvent *event);
 
 public slots:
     /** Slot to call finish() method as it's not defined as slot */
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 7df9d1bc2df4..84f88dff5af8 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -15,6 +15,7 @@
 
 #include <stdio.h>
 
+#include <QCloseEvent>
 #include <QLabel>
 #include <QRegExp>
 #include <QVBoxLayout>
@@ -106,18 +107,26 @@ void HelpMessageDialog::on_okButton_accepted()
 
 
 /** "Shutdown" window */
+ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
+    QWidget(parent, f)
+{
+    QVBoxLayout *layout = new QVBoxLayout();
+    layout->addWidget(new QLabel(
+        tr("Bitcoin Core is shutting down...") + "<br /><br />" +
+        tr("Do not shut down the computer until this window disappears.")));
+    setLayout(layout);
+}
+
 void ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
 {
     if (!window)
         return;
 
     // Show a simple window indicating shutdown status
-    QWidget *shutdownWindow = new QWidget();
-    QVBoxLayout *layout = new QVBoxLayout();
-    layout->addWidget(new QLabel(
-        tr("Bitcoin Core is shutting down...") + "<br /><br />" +
-        tr("Do not shut down the computer until this window disappears.")));
-    shutdownWindow->setLayout(layout);
+    QWidget *shutdownWindow = new ShutdownWindow();
+    // We don't hold a direct pointer to the shutdown window after creation, so use
+    // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
+    shutdownWindow->setAttribute(Qt::WA_DeleteOnClose);
     shutdownWindow->setWindowTitle(window->windowTitle());
 
     // Center shutdown window at where main window was
@@ -125,3 +134,8 @@ void ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
     shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
     shutdownWindow->show();
 }
+
+void ShutdownWindow::closeEvent(QCloseEvent *event)
+{
+    event->ignore();
+}
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
index 154bb70b8bb6..ae5045cca905 100644
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -37,12 +37,16 @@ private slots:
 
 
 /** "Shutdown" window */
-class ShutdownWindow : public QObject
+class ShutdownWindow : public QWidget
 {
     Q_OBJECT
 
 public:
+    ShutdownWindow(QWidget *parent=0, Qt::WindowFlags f=0);
     static void showShutdownWindow(BitcoinGUI *window);
+
+protected:
+    void closeEvent(QCloseEvent *event);
 };
 
 #endif // UTILITYDIALOG_H

From 27fc5277f73e510c2150dc29308fdf2dc6a96053 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 22 Sep 2014 16:40:49 +0200
Subject: [PATCH 0733/1819] build: change cdrkit location in build-process.md

The cdrkit.org domain expired.
Thanks to gdm85 on IRC for reporting this.
---
 doc/release-process.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index c5ead4199b61..8934be66c405 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -64,7 +64,7 @@ Release Process
 	wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
 	wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
 	wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
-	wget 'http://cdrkit.org/releases/cdrkit-1.1.11.tar.gz'
+	wget 'http://pkgs.fedoraproject.org/repo/pkgs/cdrkit/cdrkit-1.1.11.tar.gz/efe08e2f3ca478486037b053acd512e9/cdrkit-1.1.11.tar.gz'
 	wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
 	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
 	wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O cdrkit-deterministic.patch

From 76ec8677965570d344ef6f556920a00a47f54248 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 20 Sep 2014 00:20:53 +0200
Subject: [PATCH 0734/1819] Use actually valid transactions for script tests

---
 src/test/data/script_invalid.json |  9 ++++++
 src/test/data/script_valid.json   |  9 ++++++
 src/test/script_tests.cpp         | 49 +++++++++++++++++++++++++++----
 3 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 75de4716f858..6c13fdf1754d 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -1,4 +1,13 @@
 [
+["
+Format is: [scriptPubKey, scriptSig, flags, ... comments]
+It is evaluated as if there was a crediting coinbase transaction with two 0
+pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,
+followed by a spending transaction which spends this output as only input (and
+correct prevout hash), using the given scriptSig. All nLockTimes are 0, all
+nSequences are max.
+"],
+
 ["", "DEPTH", "P2SH,STRICTENC",   "Test the test: we should have an empty stack after scriptSig evaluation"],
 ["  ", "DEPTH", "P2SH,STRICTENC", "and multiple spaces should not change that."],
 ["   ", "DEPTH", "P2SH,STRICTENC"],
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index c1db4c606199..7fa74c1ca337 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -1,4 +1,13 @@
 [
+["
+Format is: [scriptPubKey, scriptSig, flags, ... comments]
+It is evaluated as if there was a crediting coinbase transaction with two 0
+pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,
+followed by a spending transaction which spends this output as only input (and
+correct prevout hash), using the given scriptSig. All nLockTimes are 0, all
+nSequences are max.
+"],
+
 ["", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "Test the test: we should have an empty stack after scriptSig evaluation"],
 ["  ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "and multiple spaces should not change that."],
 ["   ", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index cb543a0cf130..178b35fa2d80 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -52,6 +52,41 @@ read_json(const std::string& jsondata)
 
 BOOST_AUTO_TEST_SUITE(script_tests)
 
+CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey)
+{
+    CMutableTransaction txCredit;
+    txCredit.nVersion = 1;
+    txCredit.nLockTime = 0;
+    txCredit.vin.resize(1);
+    txCredit.vout.resize(1);
+    txCredit.vin[0].prevout.SetNull();
+    txCredit.vin[0].scriptSig = CScript() << CScriptNum(0) << CScriptNum(0);
+    txCredit.vin[0].nSequence = std::numeric_limits<unsigned int>::max();
+    txCredit.vout[0].scriptPubKey = scriptPubKey;
+    txCredit.vout[0].nValue = 0;
+
+    return txCredit;
+}
+
+CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScript& scriptPubKey)
+{
+    CMutableTransaction txCredit = BuildCreditingTransaction(scriptPubKey);
+
+    CMutableTransaction txSpend;
+    txSpend.nVersion = 1;
+    txSpend.nLockTime = 0;
+    txSpend.vin.resize(1);
+    txSpend.vout.resize(1);
+    txSpend.vin[0].prevout.hash = txCredit.GetHash();
+    txSpend.vin[0].prevout.n = 0;
+    txSpend.vin[0].scriptSig = scriptSig;
+    txSpend.vin[0].nSequence = std::numeric_limits<unsigned int>::max();
+    txSpend.vout[0].scriptPubKey = CScript();
+    txSpend.vout[0].nValue = 0;
+
+    return txSpend;
+}
+
 BOOST_AUTO_TEST_CASE(script_valid)
 {
     // Read tests from test/data/script_valid.json
@@ -67,7 +102,9 @@ BOOST_AUTO_TEST_CASE(script_valid)
         string strTest = write_string(tv, false);
         if (test.size() < 3) // Allow size > 3; extra stuff ignored (useful for comments)
         {
-            BOOST_ERROR("Bad test: " << strTest);
+            if (test.size() != 1) {
+                BOOST_ERROR("Bad test: " << strTest);
+            }
             continue;
         }
         string scriptSigString = test[0].get_str();
@@ -77,7 +114,7 @@ BOOST_AUTO_TEST_CASE(script_valid)
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags), strTest);
+        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, scriptPubKey), 0, scriptflags), strTest);
     }
 }
 
@@ -90,9 +127,11 @@ BOOST_AUTO_TEST_CASE(script_invalid)
     {
         Array test = tv.get_array();
         string strTest = write_string(tv, false);
-        if (test.size() < 2) // Allow size > 2; extra stuff ignored (useful for comments)
+        if (test.size() < 3) // Allow size > 3; extra stuff ignored (useful for comments)
         {
-            BOOST_ERROR("Bad test: " << strTest);
+            if (test.size() != 1) {
+                BOOST_ERROR("Bad test: " << strTest);
+            }
             continue;
         }
         string scriptSigString = test[0].get_str();
@@ -102,7 +141,7 @@ BOOST_AUTO_TEST_CASE(script_invalid)
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
         CTransaction tx;
-        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, tx, 0, scriptflags), strTest);
+        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, scriptPubKey), 0, scriptflags), strTest);
     }
 }
 

From c8589bf99e7d4b352763905e56799a03adda25a7 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 20 Sep 2014 03:13:04 +0200
Subject: [PATCH 0735/1819] Add actual signature tests

---
 src/test/data/script_invalid.json | 18 +++++++++++++++++-
 src/test/data/script_valid.json   | 17 ++++++++++++++++-
 2 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 6c13fdf1754d..401031ad12b3 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -382,5 +382,21 @@ nSequences are max.
 ["0 0x01 0x50", "HASH160 0x14 0xece424a6bb6ddf4db592c0faed60685047a361b1 EQUAL", "P2SH,STRICTENC", "OP_RESERVED in P2SH should fail"],
 ["0 0x01 VER", "HASH160 0x14 0x0f4d7845db968f2a81b530b6f3c1d6246d4c7e01 EQUAL", "P2SH,STRICTENC", "OP_VER in P2SH should fail"],
 
-["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"]
+["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
+
+["0x48 0x3045022100ea4d62e1fb351ad977596457bb01dfce58e050541784277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with wrong signature"],
+["0x47 0x304402207d09de5e34968c3f8b27d8217f173629f1106ee5216aa11d6b1f9813b3a214060220610a6ed25c704f901c6278f4f57fb11eadefdf0b22df298cfb6ce7ea84c86bf401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash using an anyonecanpay sighash"],
+["0x47 0x3044022028686fb3c8d3e5068cc9924c494fb5026df201d23340896da62fe9bb73fd9d5f02202a239609524959c4ca3651fd0cc48245b0b240862146fc579f3a962a4f46942b01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkey with wrong signature"],
+["0x47 0x3044022054cb0a3fca8694a0c231848ed9f965078148fd653e49dd4b6981fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside with wrong signature"],
+["0 0x48 0x3045022100e1c4e8800bd00c9ec3cd3df0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey with wrong signature"],
+["0x49 0x304602220000ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too much R padding)"],
+["0x47 0x30440220ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too little R padding)"],
+["0x49 0x3046022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a950221003003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too much S padding)"],
+["0x48 0x3045022100e6eda3fd34862078233463cae19f0b47995e3f892102e5b175175e92a9163cc402204bf58445819093638481084322b61a2d49b68c96fd6fea17ed494722d0d67b4f01", "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "P2SH,STRICTENC", "Pay to pubkey with hybrid pubkey encoding"],
+["0x48 0x304502203b56d65863e0cdb89313043c2402f46f518c31658648151b01ec6b5b6c89206a022100d71efefb4c24fab36abb44ade106963d8114c5af1bda033faa1923f54ec4ea6a01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC,LOW_S", "Pay to pubkey with high S"],
+["0x47 0x3044022054cb0a3fca8694a0c231848fd9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside with invalid signature"],
+["1 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC,NULLDUMMY", "Raw multisig with one pubkey with non-zero dummy"],
+
+["The End"]
+
 ]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 7fa74c1ca337..e0b527996c13 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -527,5 +527,20 @@ nSequences are max.
 "P2SH,STRICTENC",
 "Basic PUSHDATA1 signedness check"],
 
-["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"]
+["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
+
+["0x48 0x3045022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash"],
+["0x47 0x304402207d09de5e34968c3f8b27d8217f173629f1106ee5216aa11d6b1f9813b3a214060220610a6ed25c704f901c6278f4f57fb11eadefdf0b22df298cfb6ce7ea84c86bf481 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Anyonecanpay pay to pubkeyhash"],
+["0x47 0x3044022028686fb3c8d3e5069cc9924c494fb5026df201d23340896da62fe9bb73fd9d5f02202a239609524959c4ca3651fd0cc48245b0b240862146fc579f3a962a4f46942b01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkey"],
+["0x47 0x3044022054cb0a3fca8694a0c231848ed9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside"],
+["0 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey"],
+["0x49 0x304602220000ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too much R padding)"],
+["0x47 0x30440220ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too little R padding)"],
+["0x49 0x3046022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a950221003003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too much S padding)"],
+["0x48 0x3045022100e6eda3fd34862078233463cae19f0b47995e3f892102e5b175175e92a9163cc402204bf58445819093638481084322b61a2d49b68c96fd6fea17ed494722d0d67b4f01", "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "P2SH", "Pay to pubkey with hybrid pubkey encoding"],
+["0x48 0x304502203b56d65863e0cdb89313043c2402f46f518c31658648151b01ec6b5b6c89206a022100d71efefb4c24fab36abb44ade106963d8114c5af1bda033faa1923f54ec4ea6a01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Pay to pubkey with high S"],
+["0x47 0x3044022054cb0a3fca8694a0c231848fd9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "STRICTENC", "P2SH with a pay to pubkeyhash inside with invalid signature"],
+["1 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey with non-zero dummy"],
+
+["The End"]
 ]

From bb26e2c896a92b7d9376e2a903ebc9a1825b92d8 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 22 Sep 2014 15:48:34 +0200
Subject: [PATCH 0736/1819] [Qt] minor changes in splashscreen.cpp

- guard an unused variable with Q_UNUSED() macro
- remove a commented out line of code
---
 src/qt/splashscreen.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 673e98469194..4fe610794f79 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -22,8 +22,6 @@
 SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
     QWidget(0, f), curAlignment(0)
 {
-    //setAutoFillBackground(true);
-
     // set reference point, paddings
     int paddingRight            = 50;
     int paddingTop              = 50;
@@ -114,6 +112,7 @@ SplashScreen::~SplashScreen()
 
 void SplashScreen::slotFinish(QWidget *mainWin)
 {
+    Q_UNUSED(mainWin);
     hide();
 }
 
@@ -180,4 +179,3 @@ void SplashScreen::closeEvent(QCloseEvent *event)
 {
     event->ignore();
 }
-

From 2027450d4270afdde691f71231f5c81282c2e711 Mon Sep 17 00:00:00 2001
From: Alexander Jeng <alexanderjeng@gmail.com>
Date: Sun, 21 Sep 2014 23:13:18 -0700
Subject: [PATCH 0737/1819] Grammar fixes in README

Github-Pull: #4956
---
 README.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 43be738c6262..d13011d6dcc6 100644
--- a/README.md
+++ b/README.md
@@ -97,7 +97,7 @@ CXXFLAGS="-g -ggdb -O0" or whatever debug flags you need.
 **debug.log**
 
 If the code is behaving strangely, take a look in the debug.log file in the data directory;
-error and debugging message are written there.
+error and debugging messages are written there.
 
 The -debug=... command-line option controls debugging; running with just -debug will turn
 on all categories (and give you a very large debug.log file).
@@ -111,12 +111,12 @@ Run with the -testnet option to run with "play bitcoins" on the test network, if
 are testing multi-machine code that needs to operate across the internet.
 
 If you are testing something that can run on one machine, run with the -regtest option.
-In regression test mode blocks can be created on-demand; see qa/rpc-tests/ for tests
+In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
 that run in -regest mode.
 
 **DEBUG_LOCKORDER**
 
 Bitcoin Core is a multithreaded application, and deadlocks or other multithreading bugs
 can be very difficult to track down. Compiling with -DDEBUG_LOCKORDER (configure
-CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of what locks
-are held, and adds warning to the debug.log file if inconsistencies are detected.
+CXXFLAGS="-DDEBUG_LOCKORDER -g") inserts run-time checks to keep track of which locks
+are held, and adds warnings to the debug.log file if inconsistencies are detected.

From 6f3ae9b5df1a65c47aeb221afcf079b0fae566d4 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Mon, 22 Sep 2014 16:24:42 -0400
Subject: [PATCH 0738/1819] Fixing out of bounds error in GetKey()

---
 src/base58.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index 9750f0a161d9..d94db2c51b12 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -288,7 +288,8 @@ void CBitcoinSecret::SetKey(const CKey& vchSecret)
 CKey CBitcoinSecret::GetKey()
 {
     CKey ret;
-    ret.Set(&vchData[0], &vchData[32], vchData.size() > 32 && vchData[32] == 1);
+    assert(vchData.size() >= 32);
+    ret.Set(vchData.begin(), vchData.begin() + 32, vchData.size() > 32 && vchData[32] == 1);
     return ret;
 }
 

From c8063b57124600ae4e8e2a65eab402d3c47babe2 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Tue, 23 Sep 2014 11:17:43 -0400
Subject: [PATCH 0739/1819] Fixing out of bounds asses error

---
 src/test/crypto_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index a3eec270ee9a..68232a2ff110 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -32,7 +32,7 @@ void TestVector(const Hasher &h, const In &in, const Out &out) {
             size_t len = insecure_rand() % ((in.size() - pos + 1) / 2 + 1);
             hasher.Write((unsigned char*)&in[pos], len);
             pos += len;
-            if (pos > 0 && pos + 2 * out.size() > in.size()) {
+            if (pos > 0 && pos + 2 * out.size() > in.size() && pos < in.size()) {
                 // Test that writing the rest at once to a copy of a hasher works.
                 Hasher(hasher).Write((unsigned char*)&in[pos], in.size() - pos).Finalize(&hash[0]);
                 BOOST_CHECK(hash == out);

From 459a2d25e0c91d1650974900a902285bedb85f39 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Tue, 23 Sep 2014 11:54:12 -0400
Subject: [PATCH 0740/1819] Avoiding referencing elements of an empty vector

---
 src/hash.cpp | 69 +++++++++++++++++++++++++++-------------------------
 1 file changed, 36 insertions(+), 33 deletions(-)

diff --git a/src/hash.cpp b/src/hash.cpp
index 4ce4da4c30e1..218607a6fdfc 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -9,45 +9,48 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
 {
     // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp
     uint32_t h1 = nHashSeed;
-    const uint32_t c1 = 0xcc9e2d51;
-    const uint32_t c2 = 0x1b873593;
+    if (vDataToHash.size() > 0)
+    {
+        const uint32_t c1 = 0xcc9e2d51;
+        const uint32_t c2 = 0x1b873593;
 
-    const int nblocks = vDataToHash.size() / 4;
+        const int nblocks = vDataToHash.size() / 4;
 
-    //----------
-    // body
-    const uint32_t* blocks = (const uint32_t*)(&vDataToHash[0] + nblocks * 4);
+        //----------
+        // body
+        const uint32_t* blocks = (const uint32_t*)(&vDataToHash[0] + nblocks * 4);
 
-    for (int i = -nblocks; i; i++) {
-        uint32_t k1 = blocks[i];
+        for (int i = -nblocks; i; i++) {
+            uint32_t k1 = blocks[i];
 
-        k1 *= c1;
-        k1 = ROTL32(k1, 15);
-        k1 *= c2;
+            k1 *= c1;
+            k1 = ROTL32(k1, 15);
+            k1 *= c2;
 
-        h1 ^= k1;
-        h1 = ROTL32(h1, 13);
-        h1 = h1 * 5 + 0xe6546b64;
-    }
+            h1 ^= k1;
+            h1 = ROTL32(h1, 13);
+            h1 = h1 * 5 + 0xe6546b64;
+        }
 
-    //----------
-    // tail
-    const uint8_t* tail = (const uint8_t*)(&vDataToHash[0] + nblocks * 4);
-
-    uint32_t k1 = 0;
-
-    switch (vDataToHash.size() & 3) {
-    case 3:
-        k1 ^= tail[2] << 16;
-    case 2:
-        k1 ^= tail[1] << 8;
-    case 1:
-        k1 ^= tail[0];
-        k1 *= c1;
-        k1 = ROTL32(k1, 15);
-        k1 *= c2;
-        h1 ^= k1;
-    };
+        //----------
+        // tail
+        const uint8_t* tail = (const uint8_t*)(&vDataToHash[0] + nblocks * 4);
+
+        uint32_t k1 = 0;
+
+        switch (vDataToHash.size() & 3) {
+        case 3:
+            k1 ^= tail[2] << 16;
+        case 2:
+            k1 ^= tail[1] << 8;
+        case 1:
+            k1 ^= tail[0];
+            k1 *= c1;
+            k1 = ROTL32(k1, 15);
+            k1 *= c2;
+            h1 ^= k1;
+        };
+    }
 
     //----------
     // finalization

From f28aec014edd29cfc669cf1c3f795c0f1e2ae7e2 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 3 Sep 2014 09:01:24 +0200
Subject: [PATCH 0741/1819] Use ModifyCoins instead of mutable GetCoins.

Replace the mutable non-copying GetCoins method with a ModifyCoins, which
returns an encapsulated iterator, so we can keep track of concurrent
modifications (as iterators can be invalidated by those) and run cleanup
code after a modification is finished.

This also removes the overloading of the 'GetCoins' name.
---
 src/bitcoin-tx.cpp        | 18 +++++++-------
 src/coins.cpp             | 36 +++++++++++++++++++---------
 src/coins.h               | 49 +++++++++++++++++++++++++++++++++++----
 src/main.cpp              | 49 ++++++++++++++++++---------------------
 src/rpcrawtransaction.cpp | 18 +++++++-------
 5 files changed, 108 insertions(+), 62 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index b6e7a6c540c0..4d6dbc1dfcf2 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -384,21 +384,19 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
             vector<unsigned char> pkData(ParseHexUV(prevOut, "scriptPubKey"));
             CScript scriptPubKey(pkData.begin(), pkData.end());
 
-            CCoins coins;
-            if (view.GetCoins(txid, coins)) {
-                if (coins.IsAvailable(nOut) && coins.vout[nOut].scriptPubKey != scriptPubKey) {
+            {
+                CCoinsModifier coins = view.ModifyCoins(txid);
+                if (coins->IsAvailable(nOut) && coins->vout[nOut].scriptPubKey != scriptPubKey) {
                     string err("Previous output scriptPubKey mismatch:\n");
-                    err = err + coins.vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
+                    err = err + coins->vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
                         scriptPubKey.ToString();
                     throw runtime_error(err);
                 }
-                // what todo if txid is known, but the actual output isn't?
+                if ((unsigned int)nOut >= coins->vout.size())
+                    coins->vout.resize(nOut+1);
+                coins->vout[nOut].scriptPubKey = scriptPubKey;
+                coins->vout[nOut].nValue = 0; // we don't know the actual output value
             }
-            if ((unsigned int)nOut >= coins.vout.size())
-                coins.vout.resize(nOut+1);
-            coins.vout[nOut].scriptPubKey = scriptPubKey;
-            coins.vout[nOut].nValue = 0; // we don't know the actual output value
-            view.SetCoins(txid, coins);
 
             // if redeemScript given and private keys given,
             // add redeemScript to the tempKeystore so it can be signed:
diff --git a/src/coins.cpp b/src/coins.cpp
index 34485db2bd29..2b93c74c3a34 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -73,7 +73,7 @@ bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStat
 
 CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
 
-CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hashBlock(0) { }
+CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hasModifier(false), hashBlock(0) { }
 
 bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
     if (cacheCoins.count(txid)) {
@@ -87,7 +87,12 @@ bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
     return false;
 }
 
-CCoinsMap::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
+CCoinsViewCache::~CCoinsViewCache()
+{
+    assert(!hasModifier);
+}
+
+CCoinsMap::const_iterator CCoinsViewCache::FetchCoins(const uint256 &txid) const {
     CCoinsMap::iterator it = cacheCoins.find(txid);
     if (it != cacheCoins.end())
         return it;
@@ -99,15 +104,15 @@ CCoinsMap::iterator CCoinsViewCache::FetchCoins(const uint256 &txid) {
     return ret;
 }
 
-CCoinsMap::const_iterator CCoinsViewCache::FetchCoins(const uint256 &txid) const {
-    /* Avoid redundant implementation with the const-cast.  */
-    return const_cast<CCoinsViewCache*>(this)->FetchCoins(txid);
-}
-
-CCoins &CCoinsViewCache::GetCoins(const uint256 &txid) {
-    CCoinsMap::iterator it = FetchCoins(txid);
-    assert(it != cacheCoins.end());
-    return it->second;
+CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256 &txid) {
+    assert(!hasModifier);
+    hasModifier = true;
+    std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoins()));
+    if (ret.second) {
+        if (!base->GetCoins(txid, ret.first->second))
+            ret.first->second.Clear();
+    }
+    return CCoinsModifier(*this, ret.first);
 }
 
 const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
@@ -145,6 +150,7 @@ bool CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
 }
 
 bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
+    assert(!hasModifier);
     for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
         cacheCoins[it->first].swap(it->second);
         CCoinsMap::iterator itOld = it++;
@@ -213,3 +219,11 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
     }
     return tx.ComputePriority(dResult);
 }
+
+CCoinsModifier::CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_) : cache(cache_), it(it_) {}
+
+CCoinsModifier::~CCoinsModifier() {
+    assert(cache.hasModifier);
+    cache.hasModifier = false;
+    it->second.Cleanup();
+}
diff --git a/src/coins.h b/src/coins.h
index bf61f55aacd4..62beea3c23c2 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -83,11 +83,26 @@ class CCoins
     // as new tx version will probably only be introduced at certain heights
     int nVersion;
 
-    // construct a CCoins from a CTransaction, at a given height
-    CCoins(const CTransaction &tx, int nHeightIn) : fCoinBase(tx.IsCoinBase()), vout(tx.vout), nHeight(nHeightIn), nVersion(tx.nVersion) {
+    void FromTx(const CTransaction &tx, int nHeightIn) {
+        fCoinBase = tx.IsCoinBase();
+        vout = tx.vout;
+        nHeight = nHeightIn;
+        nVersion = tx.nVersion;
         ClearUnspendable();
     }
 
+    // construct a CCoins from a CTransaction, at a given height
+    CCoins(const CTransaction &tx, int nHeightIn) {
+        FromTx(tx, nHeightIn);
+    }
+
+    void Clear() {
+        fCoinBase = false;
+        std::vector<CTxOut>().swap(vout);
+        nHeight = 0;
+        nVersion = 0;
+    }
+
     // empty constructor
     CCoins() : fCoinBase(false), vout(0), nHeight(0), nVersion(0) { }
 
@@ -323,10 +338,31 @@ class CCoinsViewBacked : public CCoinsView
 };
 
 
+class CCoinsViewCache;
+
+/** A reference to a mutable cache entry. Encapsulating it allows us to run
+ *  cleanup code after the modification is finished, and keeping track of
+ *  concurrent modifications. */
+class CCoinsModifier
+{
+private:
+    CCoinsViewCache& cache;
+    CCoinsMap::iterator it;
+    CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_);
+
+public:
+    CCoins* operator->() { return &it->second; }
+    CCoins& operator*() { return it->second; }
+    ~CCoinsModifier();
+    friend class CCoinsViewCache;
+};
+
 /** CCoinsView that adds a memory cache for transactions to another CCoinsView */
 class CCoinsViewCache : public CCoinsViewBacked
 {
 protected:
+    /* Whether this cache has an active modifier. */
+    bool hasModifier;
 
     /* Make mutable so that we can "fill the cache" even from Get-methods
        declared as "const".  */
@@ -335,6 +371,7 @@ class CCoinsViewCache : public CCoinsViewBacked
 
 public:
     CCoinsViewCache(CCoinsView &baseIn, bool fDummy = false);
+    ~CCoinsViewCache();
 
     // Standard CCoinsView methods
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
@@ -349,8 +386,10 @@ class CCoinsViewCache : public CCoinsViewBacked
     // allowed while accessing the returned pointer.
     const CCoins* AccessCoins(const uint256 &txid) const;
 
-    // Return a modifiable reference to a CCoins. Check HaveCoins first.
-    CCoins &GetCoins(const uint256 &txid);
+    // Return a modifiable reference to a CCoins. If no entry with the given
+    // txid exists, a new one is created. Simultaneous modifications are not
+    // allowed.
+    CCoinsModifier ModifyCoins(const uint256 &txid);
 
     // Push the modifications applied to this cache to its base.
     // Failure to call this method before destruction will cause the changes to be forgotten.
@@ -377,6 +416,8 @@ class CCoinsViewCache : public CCoinsViewBacked
 
     const CTxOut &GetOutputFor(const CTxIn& input) const;
 
+    friend class CCoinsModifier;
+
 private:
     CCoinsMap::iterator FetchCoins(const uint256 &txid);
     CCoinsMap::const_iterator FetchCoins(const uint256 &txid) const;
diff --git a/src/main.cpp b/src/main.cpp
index 15c3916a6fb0..5aed3a2528cb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1348,22 +1348,18 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
 
 void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight)
 {
-    bool ret;
     // mark inputs spent
     if (!tx.IsCoinBase()) {
         txundo.vprevout.reserve(tx.vin.size());
-        for (unsigned int i = 0; i < tx.vin.size(); i++) {
-            const CTxIn &txin = tx.vin[i];
-            CCoins &coins = inputs.GetCoins(txin.prevout.hash);
+        BOOST_FOREACH(const CTxIn &txin, tx.vin) {
             txundo.vprevout.push_back(CTxInUndo());
-            ret = coins.Spend(txin.prevout, txundo.vprevout.back());
+            bool ret = inputs.ModifyCoins(txin.prevout.hash)->Spend(txin.prevout, txundo.vprevout.back());
             assert(ret);
         }
     }
 
     // add outputs
-    ret = inputs.SetCoins(tx.GetHash(), CCoins(tx, nHeight));
-    assert(ret);
+    inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight);
 }
 
 bool CScriptCheck::operator()() const {
@@ -1504,21 +1500,23 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
         // exactly. Note that transactions with only provably unspendable outputs won't
         // have outputs available even in the block itself, so we handle that case
         // specially with outsEmpty.
+        {
         CCoins outsEmpty;
-        CCoins &outs = view.HaveCoins(hash) ? view.GetCoins(hash) : outsEmpty;
-        outs.ClearUnspendable();
+        CCoinsModifier outs = view.ModifyCoins(hash);
+        outs->ClearUnspendable();
 
-        CCoins outsBlock = CCoins(tx, pindex->nHeight);
+        CCoins outsBlock(tx, pindex->nHeight);
         // The CCoins serialization does not serialize negative numbers.
         // No network rules currently depend on the version here, so an inconsistency is harmless
         // but it must be corrected before txout nversion ever influences a network rule.
         if (outsBlock.nVersion < 0)
-            outs.nVersion = outsBlock.nVersion;
-        if (outs != outsBlock)
+            outs->nVersion = outsBlock.nVersion;
+        if (*outs != outsBlock)
             fClean = fClean && error("DisconnectBlock() : added transaction mismatch? database corrupted");
 
         // remove outputs
-        outs = CCoins();
+        outs->Clear();
+        }
 
         // restore inputs
         if (i > 0) { // not coinbases
@@ -1528,27 +1526,24 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
             for (unsigned int j = tx.vin.size(); j-- > 0;) {
                 const COutPoint &out = tx.vin[j].prevout;
                 const CTxInUndo &undo = txundo.vprevout[j];
-                CCoins coins;
-                view.GetCoins(out.hash, coins); // this can fail if the prevout was already entirely spent
+                CCoinsModifier coins = view.ModifyCoins(out.hash);
                 if (undo.nHeight != 0) {
                     // undo data contains height: this is the last output of the prevout tx being spent
-                    if (!coins.IsPruned())
+                    if (!coins->IsPruned())
                         fClean = fClean && error("DisconnectBlock() : undo data overwriting existing transaction");
-                    coins = CCoins();
-                    coins.fCoinBase = undo.fCoinBase;
-                    coins.nHeight = undo.nHeight;
-                    coins.nVersion = undo.nVersion;
+                    coins->Clear();
+                    coins->fCoinBase = undo.fCoinBase;
+                    coins->nHeight = undo.nHeight;
+                    coins->nVersion = undo.nVersion;
                 } else {
-                    if (coins.IsPruned())
+                    if (coins->IsPruned())
                         fClean = fClean && error("DisconnectBlock() : undo data adding output to missing transaction");
                 }
-                if (coins.IsAvailable(out.n))
+                if (coins->IsAvailable(out.n))
                     fClean = fClean && error("DisconnectBlock() : undo data overwriting existing output");
-                if (coins.vout.size() < out.n+1)
-                    coins.vout.resize(out.n+1);
-                coins.vout[out.n] = undo.txout;
-                if (!view.SetCoins(out.hash, coins))
-                    return error("DisconnectBlock() : cannot restore coin inputs");
+                if (coins->vout.size() < out.n+1)
+                    coins->vout.resize(out.n+1);
+                coins->vout[out.n] = undo.txout;
             }
         }
     }
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index dbb0966ae2c5..da2421f38e28 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -612,21 +612,19 @@ Value signrawtransaction(const Array& params, bool fHelp)
             vector<unsigned char> pkData(ParseHexO(prevOut, "scriptPubKey"));
             CScript scriptPubKey(pkData.begin(), pkData.end());
 
-            CCoins coins;
-            if (view.GetCoins(txid, coins)) {
-                if (coins.IsAvailable(nOut) && coins.vout[nOut].scriptPubKey != scriptPubKey) {
+            {
+                CCoinsModifier coins = view.ModifyCoins(txid);
+                if (coins->IsAvailable(nOut) && coins->vout[nOut].scriptPubKey != scriptPubKey) {
                     string err("Previous output scriptPubKey mismatch:\n");
-                    err = err + coins.vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
+                    err = err + coins->vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
                         scriptPubKey.ToString();
                     throw JSONRPCError(RPC_DESERIALIZATION_ERROR, err);
                 }
-                // what todo if txid is known, but the actual output isn't?
+                if ((unsigned int)nOut >= coins->vout.size())
+                    coins->vout.resize(nOut+1);
+                coins->vout[nOut].scriptPubKey = scriptPubKey;
+                coins->vout[nOut].nValue = 0; // we don't know the actual output value
             }
-            if ((unsigned int)nOut >= coins.vout.size())
-                coins.vout.resize(nOut+1);
-            coins.vout[nOut].scriptPubKey = scriptPubKey;
-            coins.vout[nOut].nValue = 0; // we don't know the actual output value
-            view.SetCoins(txid, coins);
 
             // if redeemScript given and not using the local wallet (private keys
             // given), add redeemScript to the tempKeystore so it can be signed:

From c9d1a81ce76737a73c9706e074a4fe8440c8277e Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 3 Sep 2014 09:25:32 +0200
Subject: [PATCH 0742/1819] Get rid of CCoinsView's SetCoins and SetBestBlock.

All direct modifications are now done through ModifyCoins, and BatchWrite is
used for pushing batches of queued modifications up, so we don't need the
low-level SetCoins and SetBestBlock anymore in the top-level CCoinsView class.
---
 src/coins.cpp                  | 12 +-----------
 src/coins.h                    | 13 ++-----------
 src/main.cpp                   |  4 +---
 src/test/script_P2SH_tests.cpp |  3 +--
 src/test/transaction_tests.cpp |  6 +++---
 src/txdb.cpp                   | 12 ------------
 src/txdb.h                     |  2 --
 7 files changed, 8 insertions(+), 44 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 2b93c74c3a34..9632e67f207f 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -53,20 +53,16 @@ bool CCoins::Spend(int nPos) {
 
 
 bool CCoinsView::GetCoins(const uint256 &txid, CCoins &coins) const { return false; }
-bool CCoinsView::SetCoins(const uint256 &txid, const CCoins &coins) { return false; }
 bool CCoinsView::HaveCoins(const uint256 &txid) const { return false; }
 uint256 CCoinsView::GetBestBlock() const { return uint256(0); }
-bool CCoinsView::SetBestBlock(const uint256 &hashBlock) { return false; }
 bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return false; }
 bool CCoinsView::GetStats(CCoinsStats &stats) const { return false; }
 
 
 CCoinsViewBacked::CCoinsViewBacked(CCoinsView &viewIn) : base(&viewIn) { }
 bool CCoinsViewBacked::GetCoins(const uint256 &txid, CCoins &coins) const { return base->GetCoins(txid, coins); }
-bool CCoinsViewBacked::SetCoins(const uint256 &txid, const CCoins &coins) { return base->SetCoins(txid, coins); }
 bool CCoinsViewBacked::HaveCoins(const uint256 &txid) const { return base->HaveCoins(txid); }
 uint256 CCoinsViewBacked::GetBestBlock() const { return base->GetBestBlock(); }
-bool CCoinsViewBacked::SetBestBlock(const uint256 &hashBlock) { return base->SetBestBlock(hashBlock); }
 void CCoinsViewBacked::SetBackend(CCoinsView &viewIn) { base = &viewIn; }
 bool CCoinsViewBacked::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { return base->BatchWrite(mapCoins, hashBlock); }
 bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStats(stats); }
@@ -124,11 +120,6 @@ const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
     }
 }
 
-bool CCoinsViewCache::SetCoins(const uint256 &txid, const CCoins &coins) {
-    cacheCoins[txid] = coins;
-    return true;
-}
-
 bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
     CCoinsMap::const_iterator it = FetchCoins(txid);
     // We're using vtx.empty() instead of IsPruned here for performance reasons,
@@ -144,9 +135,8 @@ uint256 CCoinsViewCache::GetBestBlock() const {
     return hashBlock;
 }
 
-bool CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
+void CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
     hashBlock = hashBlockIn;
-    return true;
 }
 
 bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
diff --git a/src/coins.h b/src/coins.h
index 62beea3c23c2..ce7a79740b58 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -294,9 +294,6 @@ class CCoinsView
     // Retrieve the CCoins (unspent transaction outputs) for a given txid
     virtual bool GetCoins(const uint256 &txid, CCoins &coins) const;
 
-    // Modify the CCoins for a given txid
-    virtual bool SetCoins(const uint256 &txid, const CCoins &coins);
-
     // Just check whether we have data for a given txid.
     // This may (but cannot always) return true for fully spent transactions
     virtual bool HaveCoins(const uint256 &txid) const;
@@ -304,10 +301,7 @@ class CCoinsView
     // Retrieve the block hash whose state this CCoinsView currently represents
     virtual uint256 GetBestBlock() const;
 
-    // Modify the currently active block hash
-    virtual bool SetBestBlock(const uint256 &hashBlock);
-
-    // Do a bulk modification (multiple SetCoins + one SetBestBlock).
+    // Do a bulk modification (multiple CCoins changes + BestBlock change).
     // The passed mapCoins can be modified.
     virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
@@ -328,10 +322,8 @@ class CCoinsViewBacked : public CCoinsView
 public:
     CCoinsViewBacked(CCoinsView &viewIn);
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
-    bool SetCoins(const uint256 &txid, const CCoins &coins);
     bool HaveCoins(const uint256 &txid) const;
     uint256 GetBestBlock() const;
-    bool SetBestBlock(const uint256 &hashBlock);
     void SetBackend(CCoinsView &viewIn);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats) const;
@@ -375,10 +367,9 @@ class CCoinsViewCache : public CCoinsViewBacked
 
     // Standard CCoinsView methods
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
-    bool SetCoins(const uint256 &txid, const CCoins &coins);
     bool HaveCoins(const uint256 &txid) const;
     uint256 GetBestBlock() const;
-    bool SetBestBlock(const uint256 &hashBlock);
+    void SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
     // Return a pointer to CCoins in the cache, or NULL if not found. This is
diff --git a/src/main.cpp b/src/main.cpp
index 5aed3a2528cb..af8810ebd6fa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1753,9 +1753,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
             return state.Abort(_("Failed to write transaction index"));
 
     // add this block to the view's block chain
-    bool ret;
-    ret = view.SetBestBlock(pindex->GetBlockHash());
-    assert(ret);
+    view.SetBestBlock(pindex->GetBlockHash());
 
     int64_t nTime3 = GetTimeMicros(); nTimeIndex += nTime3 - nTime2;
     LogPrint("bench", "    - Index writing: %.2fms [%.2fs]\n", 0.001 * (nTime3 - nTime2), nTimeIndex * 0.000001);
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index e6cf00c2d07b..645d3c691856 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -312,8 +312,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     txFrom.vout[6].scriptPubKey = GetScriptForDestination(twentySigops.GetID());
     txFrom.vout[6].nValue = 6000;
 
-
-    coins.SetCoins(txFrom.GetHash(), CCoins(txFrom, 0));
+    coins.ModifyCoins(txFrom.GetHash())->FromTx(txFrom, 0);
 
     CMutableTransaction txTo;
     txTo.vout.resize(1);
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 41d8ee9f19d4..15c0034bfb3a 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE(basic_transaction_tests)
 // paid to a TX_PUBKEYHASH.
 //
 static std::vector<CMutableTransaction>
-SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsView & coinsRet)
+SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet)
 {
     std::vector<CMutableTransaction> dummyTransactions;
     dummyTransactions.resize(2);
@@ -244,14 +244,14 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsView & coinsRet)
     dummyTransactions[0].vout[0].scriptPubKey << key[0].GetPubKey() << OP_CHECKSIG;
     dummyTransactions[0].vout[1].nValue = 50*CENT;
     dummyTransactions[0].vout[1].scriptPubKey << key[1].GetPubKey() << OP_CHECKSIG;
-    coinsRet.SetCoins(dummyTransactions[0].GetHash(), CCoins(dummyTransactions[0], 0));
+    coinsRet.ModifyCoins(dummyTransactions[0].GetHash())->FromTx(dummyTransactions[0], 0);
 
     dummyTransactions[1].vout.resize(2);
     dummyTransactions[1].vout[0].nValue = 21*CENT;
     dummyTransactions[1].vout[0].scriptPubKey = GetScriptForDestination(key[2].GetPubKey().GetID());
     dummyTransactions[1].vout[1].nValue = 22*CENT;
     dummyTransactions[1].vout[1].scriptPubKey = GetScriptForDestination(key[3].GetPubKey().GetID());
-    coinsRet.SetCoins(dummyTransactions[1].GetHash(), CCoins(dummyTransactions[1], 0));
+    coinsRet.ModifyCoins(dummyTransactions[1].GetHash())->FromTx(dummyTransactions[1], 0);
 
     return dummyTransactions;
 }
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 79838b6116e9..3b353ab6249a 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -33,12 +33,6 @@ bool CCoinsViewDB::GetCoins(const uint256 &txid, CCoins &coins) const {
     return db.Read(make_pair('c', txid), coins);
 }
 
-bool CCoinsViewDB::SetCoins(const uint256 &txid, const CCoins &coins) {
-    CLevelDBBatch batch;
-    BatchWriteCoins(batch, txid, coins);
-    return db.WriteBatch(batch);
-}
-
 bool CCoinsViewDB::HaveCoins(const uint256 &txid) const {
     return db.Exists(make_pair('c', txid));
 }
@@ -50,12 +44,6 @@ uint256 CCoinsViewDB::GetBestBlock() const {
     return hashBestChain;
 }
 
-bool CCoinsViewDB::SetBestBlock(const uint256 &hashBlock) {
-    CLevelDBBatch batch;
-    BatchWriteHashBestChain(batch, hashBlock);
-    return db.WriteBatch(batch);
-}
-
 bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
     LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size());
 
diff --git a/src/txdb.h b/src/txdb.h
index f0b6b9e1dde6..8f2bd9af4d15 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -33,10 +33,8 @@ class CCoinsViewDB : public CCoinsView
     CCoinsViewDB(size_t nCacheSize, bool fMemory = false, bool fWipe = false);
 
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
-    bool SetCoins(const uint256 &txid, const CCoins &coins);
     bool HaveCoins(const uint256 &txid) const;
     uint256 GetBestBlock() const;
-    bool SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
     bool GetStats(CCoinsStats &stats) const;
 };

From 058b08c147a6d56b57221faa5b6fcdb83b4140b2 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 3 Sep 2014 09:37:47 +0200
Subject: [PATCH 0743/1819] Do not keep fully spent but unwritten CCoins
 entries cached.

Instead of storing CCoins entries directly in CCoinsMap, store a CCoinsCacheEntry
which additionally keeps track of whether a particular entry is:
* dirty: potentially different from its parent view.
* fresh: the parent view is known to not have a non-pruned version.

This allows us to skip non-dirty cache entries when pushing batches of changes up,
and to remove CCoins entries about transactions that are fully spent before the
parent cache learns about them.
---
 src/coins.cpp | 85 +++++++++++++++++++++++++++++++++++++--------------
 src/coins.h   | 19 ++++++++++--
 src/main.cpp  |  4 +--
 src/txdb.cpp  | 11 +++++--
 4 files changed, 88 insertions(+), 31 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index 9632e67f207f..9d60089bf5e5 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -71,18 +71,6 @@ CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
 
 CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hasModifier(false), hashBlock(0) { }
 
-bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
-    if (cacheCoins.count(txid)) {
-        coins = cacheCoins[txid];
-        return true;
-    }
-    if (base->GetCoins(txid, coins)) {
-        cacheCoins[txid] = coins;
-        return true;
-    }
-    return false;
-}
-
 CCoinsViewCache::~CCoinsViewCache()
 {
     assert(!hasModifier);
@@ -93,21 +81,43 @@ CCoinsMap::const_iterator CCoinsViewCache::FetchCoins(const uint256 &txid) const
     if (it != cacheCoins.end())
         return it;
     CCoins tmp;
-    if (!base->GetCoins(txid,tmp))
+    if (!base->GetCoins(txid, tmp))
         return cacheCoins.end();
-    CCoinsMap::iterator ret = cacheCoins.insert(it, std::make_pair(txid, CCoins()));
-    tmp.swap(ret->second);
+    CCoinsMap::iterator ret = cacheCoins.insert(std::make_pair(txid, CCoinsCacheEntry())).first;
+    tmp.swap(ret->second.coins);
+    if (ret->second.coins.IsPruned()) {
+        // The parent only has an empty entry for this txid; we can consider our
+        // version as fresh.
+        ret->second.flags = CCoinsCacheEntry::FRESH;
+    }
     return ret;
 }
 
+bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
+    CCoinsMap::const_iterator it = FetchCoins(txid);
+    if (it != cacheCoins.end()) {
+        coins = it->second.coins;
+        return true;
+    }
+    return false;
+}
+
 CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256 &txid) {
     assert(!hasModifier);
     hasModifier = true;
-    std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoins()));
+    std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoinsCacheEntry()));
     if (ret.second) {
-        if (!base->GetCoins(txid, ret.first->second))
-            ret.first->second.Clear();
+        if (!base->GetCoins(txid, ret.first->second.coins)) {
+            // The parent view does not have this entry; mark it as fresh.
+            ret.first->second.coins.Clear();
+            ret.first->second.flags = CCoinsCacheEntry::FRESH;
+        } else if (ret.first->second.coins.IsPruned()) {
+            // The parent view only has a pruned entry for this; mark it as fresh.
+            ret.first->second.flags = CCoinsCacheEntry::FRESH;
+        }
     }
+    // Assume that whenever ModifyCoins is called, the entry will be modified.
+    ret.first->second.flags |= CCoinsCacheEntry::DIRTY;
     return CCoinsModifier(*this, ret.first);
 }
 
@@ -116,7 +126,7 @@ const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
     if (it == cacheCoins.end()) {
         return NULL;
     } else {
-        return &it->second;
+        return &it->second.coins;
     }
 }
 
@@ -126,7 +136,7 @@ bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
     // as we only care about the case where an transaction was replaced entirely
     // in a reorganization (which wipes vout entirely, as opposed to spending
     // which just cleans individual outputs).
-    return (it != cacheCoins.end() && !it->second.vout.empty());
+    return (it != cacheCoins.end() && !it->second.coins.vout.empty());
 }
 
 uint256 CCoinsViewCache::GetBestBlock() const {
@@ -142,7 +152,32 @@ void CCoinsViewCache::SetBestBlock(const uint256 &hashBlockIn) {
 bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn) {
     assert(!hasModifier);
     for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
-        cacheCoins[it->first].swap(it->second);
+        if (it->second.flags & CCoinsCacheEntry::DIRTY) { // Ignore non-dirty entries (optimization).
+            CCoinsMap::iterator itUs = cacheCoins.find(it->first);
+            if (itUs == cacheCoins.end()) {
+                if (!it->second.coins.IsPruned()) {
+                    // The parent cache does not have an entry, while the child
+                    // cache does have (a non-pruned) one. Move the data up, and
+                    // mark it as fresh (if the grandparent did have it, we
+                    // would have pulled it in at first GetCoins).
+                    assert(it->second.flags & CCoinsCacheEntry::FRESH);
+                    CCoinsCacheEntry& entry = cacheCoins[it->first];
+                    entry.coins.swap(it->second.coins);
+                    entry.flags = CCoinsCacheEntry::DIRTY | CCoinsCacheEntry::FRESH;
+                }
+            } else {
+                if ((itUs->second.flags & CCoinsCacheEntry::FRESH) && it->second.coins.IsPruned()) {
+                    // The grandparent does not have an entry, and the child is
+                    // modified and being pruned. This means we can just delete
+                    // it from the parent.
+                    cacheCoins.erase(itUs);
+                } else {
+                    // A normal modification.
+                    itUs->second.coins.swap(it->second.coins);
+                    itUs->second.flags |= CCoinsCacheEntry::DIRTY;
+                }
+            }
+        }
         CCoinsMap::iterator itOld = it++;
         mapCoins.erase(itOld);
     }
@@ -212,8 +247,12 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
 
 CCoinsModifier::CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_) : cache(cache_), it(it_) {}
 
-CCoinsModifier::~CCoinsModifier() {
+CCoinsModifier::~CCoinsModifier()
+{
     assert(cache.hasModifier);
     cache.hasModifier = false;
-    it->second.Cleanup();
+    it->second.coins.Cleanup();
+    if ((it->second.flags & CCoinsCacheEntry::FRESH) && it->second.coins.IsPruned()) {
+        cache.cacheCoins.erase(it);
+    }
 }
diff --git a/src/coins.h b/src/coins.h
index ce7a79740b58..71aea79adcf9 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -271,7 +271,20 @@ class CCoinsKeyHasher
     }
 };
 
-typedef boost::unordered_map<uint256, CCoins, CCoinsKeyHasher> CCoinsMap;
+struct CCoinsCacheEntry
+{
+    CCoins coins; // The actual cached data.
+    unsigned char flags;
+
+    enum Flags {
+        DIRTY = (1 << 0), // This cache entry is potentially different from the version in the parent view.
+        FRESH = (1 << 1), // The parent view does not have this entry (or it is pruned).
+    };
+
+    CCoinsCacheEntry() : coins(), flags(0) {}
+};
+
+typedef boost::unordered_map<uint256, CCoinsCacheEntry, CCoinsKeyHasher> CCoinsMap;
 
 struct CCoinsStats
 {
@@ -343,8 +356,8 @@ class CCoinsModifier
     CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_);
 
 public:
-    CCoins* operator->() { return &it->second; }
-    CCoins& operator*() { return it->second; }
+    CCoins* operator->() { return &it->second.coins; }
+    CCoins& operator*() { return it->second.coins; }
     ~CCoinsModifier();
     friend class CCoinsViewCache;
 };
diff --git a/src/main.cpp b/src/main.cpp
index af8810ebd6fa..fbe63411d767 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1797,10 +1797,10 @@ void static UpdateTip(CBlockIndex *pindexNew) {
     nTimeBestReceived = GetTime();
     mempool.AddTransactionsUpdated(1);
 
-    LogPrintf("UpdateTip: new best=%s  height=%d  log2_work=%.8g  tx=%lu  date=%s progress=%f\n",
+    LogPrintf("UpdateTip: new best=%s  height=%d  log2_work=%.8g  tx=%lu  date=%s progress=%f  cache=%u\n",
       chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
       DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
-      Checkpoints::GuessVerificationProgress(chainActive.Tip()));
+      Checkpoints::GuessVerificationProgress(chainActive.Tip()), (unsigned int)pcoinsTip->GetCacheSize());
 
     cvBlockChange.notify_all();
 
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 3b353ab6249a..89830ced736d 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -45,17 +45,22 @@ uint256 CCoinsViewDB::GetBestBlock() const {
 }
 
 bool CCoinsViewDB::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) {
-    LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size());
-
     CLevelDBBatch batch;
+    size_t count = 0;
+    size_t changed = 0;
     for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end();) {
-        BatchWriteCoins(batch, it->first, it->second);
+        if (it->second.flags & CCoinsCacheEntry::DIRTY) {
+            BatchWriteCoins(batch, it->first, it->second.coins);
+            changed++;
+        }
+        count++;
         CCoinsMap::iterator itOld = it++;
         mapCoins.erase(itOld);
     }
     if (hashBlock != uint256(0))
         BatchWriteHashBestChain(batch, hashBlock);
 
+    LogPrint("coindb", "Committing %u changed transactions (out of %u) to coin database...\n", (unsigned int)changed, (unsigned int)count);
     return db.WriteBatch(batch);
 }
 

From ed27e53c9be3c2e194b3e7cff85933531aef4cc8 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 17 Sep 2014 01:27:06 +0200
Subject: [PATCH 0744/1819] Add coins_tests with a large randomized
 CCoinViewCache test.

---
 src/Makefile.test.include |   1 +
 src/test/coins_tests.cpp  | 178 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 179 insertions(+)
 create mode 100644 src/test/coins_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index ab449f3e711c..99ac09e1a474 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -44,6 +44,7 @@ BITCOIN_TESTS =\
   test/checkblock_tests.cpp \
   test/Checkpoints_tests.cpp \
   test/compress_tests.cpp \
+  test/coins_tests.cpp \
   test/crypto_tests.cpp \
   test/DoS_tests.cpp \
   test/getarg_tests.cpp \
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
new file mode 100644
index 000000000000..214aaff900d5
--- /dev/null
+++ b/src/test/coins_tests.cpp
@@ -0,0 +1,178 @@
+// Copyright (c) 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.
+
+#include "coins.h"
+#include "random.h"
+#include "uint256.h"
+
+#include <vector>
+#include <map>
+
+#include <boost/test/unit_test.hpp>
+
+namespace
+{
+class CCoinsViewTest : public CCoinsView
+{
+    uint256 hashBestBlock_;
+    std::map<uint256, CCoins> map_;
+
+public:
+    bool GetCoins(const uint256& txid, CCoins& coins) const
+    {
+        std::map<uint256, CCoins>::const_iterator it = map_.find(txid);
+        if (it == map_.end()) {
+            return false;
+        }
+        coins = it->second;
+        if (coins.IsPruned() && insecure_rand() % 2 == 0) {
+            // Randomly return false in case of an empty entry.
+            return false;
+        }
+        return true;
+    }
+
+    bool HaveCoins(const uint256& txid) const
+    {
+        CCoins coins;
+        return GetCoins(txid, coins);
+    }
+
+    uint256 GetBestBlock() const { return hashBestBlock_; }
+
+    bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock)
+    {
+        for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); ) {
+            map_[it->first] = it->second.coins;
+            if (it->second.coins.IsPruned() && insecure_rand() % 3 == 0) {
+                // Randomly delete empty entries on write.
+                map_.erase(it->first);
+            }
+            mapCoins.erase(it++);
+        }
+        mapCoins.clear();
+        hashBestBlock_ = hashBlock;
+        return true;
+    }
+
+    bool GetStats(CCoinsStats& stats) const { return false; }
+};
+}
+
+BOOST_AUTO_TEST_SUITE(coins_tests)
+
+static const unsigned int NUM_SIMULATION_ITERATIONS = 40000;
+
+// This is a large randomized insert/remove simulation test on a variable-size
+// stack of caches on top of CCoinsViewTest.
+//
+// It will randomly create/update/delete CCoins entries to a tip of caches, with
+// txids picked from a limited list of random 256-bit hashes. Occasionally, a
+// new tip is added to the stack of caches, or the tip is flushed and removed.
+//
+// During the process, booleans are kept to make sure that the randomized
+// operation hits all branches.
+BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
+{
+    // Various coverage trackers.
+    bool removed_all_caches = false;
+    bool reached_4_caches = false;
+    bool added_an_entry = false;
+    bool removed_an_entry = false;
+    bool updated_an_entry = false;
+    bool found_an_entry = false;
+    bool missed_an_entry = false;
+
+    // A simple map to track what we expect the cache stack to represent.
+    std::map<uint256, CCoins> result;
+
+    // The cache stack.
+    CCoinsViewTest base; // A CCoinsViewTest at the bottom.
+    std::vector<CCoinsViewCache*> stack; // A stack of CCoinsViewCaches on top.
+    stack.push_back(new CCoinsViewCache(base, false)); // Start with one cache.
+
+    // Use a limited set of random transaction ids, so we do test overwriting entries.
+    std::vector<uint256> txids;
+    txids.resize(NUM_SIMULATION_ITERATIONS / 8);
+    for (unsigned int i = 0; i < txids.size(); i++) {
+        txids[i] = GetRandHash();
+    }
+
+    for (unsigned int i = 0; i < NUM_SIMULATION_ITERATIONS; i++) {
+        // Do a random modification.
+        {
+            uint256 txid = txids[insecure_rand() % txids.size()]; // txid we're going to modify in this iteration.
+            CCoins& coins = result[txid];
+            CCoinsModifier entry = stack.back()->ModifyCoins(txid);
+            BOOST_CHECK(coins == *entry);
+            if (insecure_rand() % 5 == 0 || coins.IsPruned()) {
+                if (coins.IsPruned()) {
+                    added_an_entry = true;
+                } else {
+                    updated_an_entry = true;
+                }
+                coins.nVersion = insecure_rand();
+                coins.vout.resize(1);
+                coins.vout[0].nValue = insecure_rand();
+                *entry = coins;
+            } else {
+                coins.Clear();
+                entry->Clear();
+                removed_an_entry = true;
+            }
+        }
+
+        // Once every 1000 iterations and at the end, verify the full cache.
+        if (insecure_rand() % 1000 == 1 || i == NUM_SIMULATION_ITERATIONS - 1) {
+            for (std::map<uint256, CCoins>::iterator it = result.begin(); it != result.end(); it++) {
+                const CCoins* coins = stack.back()->AccessCoins(it->first);
+                if (coins) {
+                    BOOST_CHECK(*coins == it->second);
+                    found_an_entry = true;
+                } else {
+                    BOOST_CHECK(it->second.IsPruned());
+                    missed_an_entry = true;
+                }
+            }
+        }
+
+        if (insecure_rand() % 100 == 0) {
+            // Every 100 iterations, change the cache stack.
+            if (stack.size() > 0 && insecure_rand() % 2 == 0) {
+                stack.back()->Flush();
+                delete stack.back();
+                stack.pop_back();
+            }
+            if (stack.size() == 0 || (stack.size() < 4 && insecure_rand() % 2)) {
+                CCoinsView* tip = &base;
+                if (stack.size() > 0) {
+                    tip = stack.back();
+                } else {
+                    removed_all_caches = true;
+                }
+                stack.push_back(new CCoinsViewCache(*tip, false));
+                if (stack.size() == 4) {
+                    reached_4_caches = true;
+                }
+            }
+        }
+    }
+
+    // Clean up the stack.
+    while (stack.size() > 0) {
+        delete stack.back();
+        stack.pop_back();
+    }
+
+    // Verify coverage.
+    BOOST_CHECK(removed_all_caches);
+    BOOST_CHECK(reached_4_caches);
+    BOOST_CHECK(added_an_entry);
+    BOOST_CHECK(removed_an_entry);
+    BOOST_CHECK(updated_an_entry);
+    BOOST_CHECK(found_an_entry);
+    BOOST_CHECK(missed_an_entry);
+}
+
+BOOST_AUTO_TEST_SUITE_END()

From cda45b5131c3546b870d8cea3191fb29df182b27 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Tue, 23 Sep 2014 18:33:16 -0400
Subject: [PATCH 0745/1819] Reinitializing list's begin iterator after few
 elements were erased from the head

---
 src/script/script.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/script/script.h b/src/script/script.h
index 4c9ac74b78b1..b5336eb9977f 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -544,7 +544,7 @@ class CScript : public std::vector<unsigned char>
         {
             while (end() - pc >= (long)b.size() && memcmp(&pc[0], &b[0], b.size()) == 0)
             {
-                erase(pc, pc + b.size());
+                pc = erase(pc, pc + b.size());
                 ++nFound;
             }
         }

From 7c70438dc67547e83953ba0343a071fae304ce65 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 24 Sep 2014 03:19:04 +0200
Subject: [PATCH 0746/1819] Get rid of the dummy CCoinsViewCache constructor
 arg

---
 src/bitcoin-tx.cpp             |  2 +-
 src/coins.cpp                  |  4 ++--
 src/coins.h                    |  4 ++--
 src/init.cpp                   |  2 +-
 src/main.cpp                   | 10 +++++-----
 src/miner.cpp                  |  4 ++--
 src/rpcblockchain.cpp          |  2 +-
 src/rpcrawtransaction.cpp      |  4 ++--
 src/test/coins_tests.cpp       |  4 ++--
 src/test/script_P2SH_tests.cpp |  2 +-
 src/test/test_bitcoin.cpp      |  2 +-
 src/test/transaction_tests.cpp |  4 ++--
 src/txmempool.cpp              |  2 +-
 src/txmempool.h                |  2 +-
 14 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 4d6dbc1dfcf2..7ce80a04cbca 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -340,7 +340,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
     CMutableTransaction mergedTx(txVariants[0]);
     bool fComplete = true;
     CCoinsView viewDummy;
-    CCoinsViewCache view(viewDummy);
+    CCoinsViewCache view(&viewDummy);
 
     if (!registers.count("privatekeys"))
         throw runtime_error("privatekeys register variable must be set.");
diff --git a/src/coins.cpp b/src/coins.cpp
index 9d60089bf5e5..6b7ebf60783b 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -59,7 +59,7 @@ bool CCoinsView::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock) { ret
 bool CCoinsView::GetStats(CCoinsStats &stats) const { return false; }
 
 
-CCoinsViewBacked::CCoinsViewBacked(CCoinsView &viewIn) : base(&viewIn) { }
+CCoinsViewBacked::CCoinsViewBacked(CCoinsView *viewIn) : base(viewIn) { }
 bool CCoinsViewBacked::GetCoins(const uint256 &txid, CCoins &coins) const { return base->GetCoins(txid, coins); }
 bool CCoinsViewBacked::HaveCoins(const uint256 &txid) const { return base->HaveCoins(txid); }
 uint256 CCoinsViewBacked::GetBestBlock() const { return base->GetBestBlock(); }
@@ -69,7 +69,7 @@ bool CCoinsViewBacked::GetStats(CCoinsStats &stats) const { return base->GetStat
 
 CCoinsKeyHasher::CCoinsKeyHasher() : salt(GetRandHash()) {}
 
-CCoinsViewCache::CCoinsViewCache(CCoinsView &baseIn, bool fDummy) : CCoinsViewBacked(baseIn), hasModifier(false), hashBlock(0) { }
+CCoinsViewCache::CCoinsViewCache(CCoinsView *baseIn) : CCoinsViewBacked(baseIn), hasModifier(false), hashBlock(0) { }
 
 CCoinsViewCache::~CCoinsViewCache()
 {
diff --git a/src/coins.h b/src/coins.h
index 71aea79adcf9..4cb28e40c4f0 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -333,7 +333,7 @@ class CCoinsViewBacked : public CCoinsView
     CCoinsView *base;
 
 public:
-    CCoinsViewBacked(CCoinsView &viewIn);
+    CCoinsViewBacked(CCoinsView *viewIn);
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
     bool HaveCoins(const uint256 &txid) const;
     uint256 GetBestBlock() const;
@@ -375,7 +375,7 @@ class CCoinsViewCache : public CCoinsViewBacked
     mutable CCoinsMap cacheCoins;
 
 public:
-    CCoinsViewCache(CCoinsView &baseIn, bool fDummy = false);
+    CCoinsViewCache(CCoinsView *baseIn);
     ~CCoinsViewCache();
 
     // Standard CCoinsView methods
diff --git a/src/init.cpp b/src/init.cpp
index 7299bd0f4a73..787b850e7466 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -958,7 +958,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
                 pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex);
                 pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
-                pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
+                pcoinsTip = new CCoinsViewCache(pcoinsdbview);
 
                 if (fReindex)
                     pblocktree->WriteReindexing(true);
diff --git a/src/main.cpp b/src/main.cpp
index fbe63411d767..0b3eaafcb1ab 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -896,12 +896,12 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 
     {
         CCoinsView dummy;
-        CCoinsViewCache view(dummy);
+        CCoinsViewCache view(&dummy);
 
         int64_t nValueIn = 0;
         {
         LOCK(pool.cs);
-        CCoinsViewMemPool viewMemPool(*pcoinsTip, pool);
+        CCoinsViewMemPool viewMemPool(pcoinsTip, pool);
         view.SetBackend(viewMemPool);
 
         // do we already have it?
@@ -1835,7 +1835,7 @@ bool static DisconnectTip(CValidationState &state) {
     // Apply the block atomically to the chain state.
     int64_t nStart = GetTimeMicros();
     {
-        CCoinsViewCache view(*pcoinsTip, true);
+        CCoinsViewCache view(pcoinsTip);
         if (!DisconnectBlock(block, state, pindexDelete, view))
             return error("DisconnectTip() : DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString());
         assert(view.Flush());
@@ -1888,7 +1888,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     int64_t nTime3;
     LogPrint("bench", "  - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001);
     {
-        CCoinsViewCache view(*pcoinsTip, true);
+        CCoinsViewCache view(pcoinsTip);
         CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
         if (!ConnectBlock(*pblock, state, pindexNew, view)) {
             if (state.IsInvalid())
@@ -2936,7 +2936,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
         nCheckDepth = chainActive.Height();
     nCheckLevel = std::max(0, std::min(4, nCheckLevel));
     LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);
-    CCoinsViewCache coins(*coinsview, true);
+    CCoinsViewCache coins(coinsview);
     CBlockIndex* pindexState = chainActive.Tip();
     CBlockIndex* pindexFailure = NULL;
     int nGoodTransactions = 0;
diff --git a/src/miner.cpp b/src/miner.cpp
index d05ddbeb1f8b..010ee844aff1 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -116,7 +116,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     {
         LOCK2(cs_main, mempool.cs);
         CBlockIndex* pindexPrev = chainActive.Tip();
-        CCoinsViewCache view(*pcoinsTip, true);
+        CCoinsViewCache view(pcoinsTip);
 
         // Priority order to process transactions
         list<COrphan> vOrphan; // list memory doesn't move
@@ -316,7 +316,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         CBlockIndex indexDummy(*pblock);
         indexDummy.pprev = pindexPrev;
         indexDummy.nHeight = pindexPrev->nHeight + 1;
-        CCoinsViewCache viewNew(*pcoinsTip, true);
+        CCoinsViewCache viewNew(pcoinsTip);
         CValidationState state;
         if (!ConnectBlock(*pblock, state, &indexDummy, viewNew, true))
             throw std::runtime_error("CreateNewBlock() : ConnectBlock failed");
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 4b3beae20c1b..24175215bf71 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -381,7 +381,7 @@ Value gettxout(const Array& params, bool fHelp)
     CCoins coins;
     if (fMempool) {
         LOCK(mempool.cs);
-        CCoinsViewMemPool view(*pcoinsTip, mempool);
+        CCoinsViewMemPool view(pcoinsTip, mempool);
         if (!view.GetCoins(hash, coins))
             return Value::null;
         mempool.pruneSpent(hash, coins); // TODO: this should be done by the CCoinsViewMemPool
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index da2421f38e28..a85a6e0ad0aa 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -557,11 +557,11 @@ Value signrawtransaction(const Array& params, bool fHelp)
 
     // Fetch previous transactions (inputs):
     CCoinsView viewDummy;
-    CCoinsViewCache view(viewDummy);
+    CCoinsViewCache view(&viewDummy);
     {
         LOCK(mempool.cs);
         CCoinsViewCache &viewChain = *pcoinsTip;
-        CCoinsViewMemPool viewMempool(viewChain, mempool);
+        CCoinsViewMemPool viewMempool(&viewChain, mempool);
         view.SetBackend(viewMempool); // temporarily switch cache backend to db+mempool view
 
         BOOST_FOREACH(const CTxIn& txin, mergedTx.vin) {
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index 214aaff900d5..3ecd301bc749 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
     // The cache stack.
     CCoinsViewTest base; // A CCoinsViewTest at the bottom.
     std::vector<CCoinsViewCache*> stack; // A stack of CCoinsViewCaches on top.
-    stack.push_back(new CCoinsViewCache(base, false)); // Start with one cache.
+    stack.push_back(new CCoinsViewCache(&base)); // Start with one cache.
 
     // Use a limited set of random transaction ids, so we do test overwriting entries.
     std::vector<uint256> txids;
@@ -151,7 +151,7 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
                 } else {
                     removed_all_caches = true;
                 }
-                stack.push_back(new CCoinsViewCache(*tip, false));
+                stack.push_back(new CCoinsViewCache(tip));
                 if (stack.size() == 4) {
                     reached_4_caches = true;
                 }
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 645d3c691856..5d962ca3c116 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -255,7 +255,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
 {
     LOCK(cs_main);
     CCoinsView coinsDummy;
-    CCoinsViewCache coins(coinsDummy);
+    CCoinsViewCache coins(&coinsDummy);
     CBasicKeyStore keystore;
     CKey key[6];
     vector<CPubKey> keys;
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 68fad8d038e8..04f9c708cb0a 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -41,7 +41,7 @@ struct TestingSetup {
         mapArgs["-datadir"] = pathTemp.string();
         pblocktree = new CBlockTreeDB(1 << 20, true);
         pcoinsdbview = new CCoinsViewDB(1 << 23, true);
-        pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
+        pcoinsTip = new CCoinsViewCache(pcoinsdbview);
         InitBlockIndex();
 #ifdef ENABLE_WALLET
         bool fFirstRun;
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 15c0034bfb3a..68f3ebf342af 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -260,7 +260,7 @@ BOOST_AUTO_TEST_CASE(test_Get)
 {
     CBasicKeyStore keystore;
     CCoinsView coinsDummy;
-    CCoinsViewCache coins(coinsDummy);
+    CCoinsViewCache coins(&coinsDummy);
     std::vector<CMutableTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
 
     CMutableTransaction t1;
@@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
     LOCK(cs_main);
     CBasicKeyStore keystore;
     CCoinsView coinsDummy;
-    CCoinsViewCache coins(coinsDummy);
+    CCoinsViewCache coins(&coinsDummy);
     std::vector<CMutableTransaction> dummyTransactions = SetupDummyInputs(keystore, coins);
 
     CMutableTransaction t;
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 52d07bf6a08c..bfa8dbb46530 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -630,7 +630,7 @@ void CTxMemPool::ClearPrioritisation(const uint256 hash)
 }
 
 
-CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
+CCoinsViewMemPool::CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn) : CCoinsViewBacked(baseIn), mempool(mempoolIn) { }
 
 bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const {
     // If an entry in the mempool exists, always return that one, as it's guaranteed to never
diff --git a/src/txmempool.h b/src/txmempool.h
index b9d50ee0bc19..9e91e6d48ce9 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -144,7 +144,7 @@ class CCoinsViewMemPool : public CCoinsViewBacked
     CTxMemPool &mempool;
 
 public:
-    CCoinsViewMemPool(CCoinsView &baseIn, CTxMemPool &mempoolIn);
+    CCoinsViewMemPool(CCoinsView *baseIn, CTxMemPool &mempoolIn);
     bool GetCoins(const uint256 &txid, CCoins &coins) const;
     bool HaveCoins(const uint256 &txid) const;
 };

From 584a358997e52a87e8c5402269c7fb3784ed2065 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 16 Sep 2014 00:30:05 +0200
Subject: [PATCH 0747/1819] Do merkle root and txid duplicates check
 simultaneously

Move the txid duplicates check into BuildMerkleTree, where it can be done
much more efficiently (without needing to build a full txid set to detect
duplicates).

The previous version (using the std::set<uint256> to detect duplicates) was
also slightly too weak. A block mined with actual duplicate transactions
(which is invalid, due to the inputs of the duplicated transactions being
seen as double spends) would trigger the duplicates logic, resulting in the
block not being stored on disk, and rerequested. This change fixes that by
only triggering in the case of duplicated transactions that can actually
result in an identical merkle root.
---
 src/core.cpp | 53 ++++++++++++++++++++++++++++++++++++++++++++--------
 src/core.h   |  6 +++++-
 src/main.cpp | 15 +++++++--------
 3 files changed, 57 insertions(+), 17 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index e52327ba8e7d..85cca1ebf0aa 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -224,29 +224,66 @@ uint256 CBlockHeader::GetHash() const
     return Hash(BEGIN(nVersion), END(nNonce));
 }
 
-uint256 CBlock::BuildMerkleTree() const
+uint256 CBlock::BuildMerkleTree(bool* fMutated) const
 {
-    // WARNING! If you're reading this because you're learning about crypto
-    // and/or designing a new system that will use merkle trees, keep in mind
-    // that the following merkle tree algorithm has a serious flaw related to
-    // duplicate txids, resulting in a vulnerability. (CVE-2012-2459) Bitcoin
-    // has since worked around the flaw, but for new applications you should
-    // use something different; don't just copy-and-paste this code without
-    // understanding the problem first.
+    /* WARNING! If you're reading this because you're learning about crypto
+       and/or designing a new system that will use merkle trees, keep in mind
+       that the following merkle tree algorithm has a serious flaw related to
+       duplicate txids, resulting in a vulnerability (CVE-2012-2459).
+
+       The reason is that if the number of hashes in the list at a given time
+       is odd, the last one is duplicated before computing the next level (which
+       is unusual in Merkle trees). This results in certain sequences of
+       transactions leading to the same merkle root. For example, these two
+       trees:
+
+                    A               A
+                  /  \            /   \
+                B     C         B       C
+               / \    |        / \     / \
+              D   E   F       D   E   F   F
+             / \ / \ / \     / \ / \ / \ / \
+             1 2 3 4 5 6     1 2 3 4 5 6 5 6
+
+       for transaction lists [1,2,3,4,5,6] and [1,2,3,4,5,6,5,6] (where 5 and
+       6 are repeated) result in the same root hash A (because the hash of both
+       of (F) and (F,F) is C).
+
+       The vulnerability results from being able to send a block with such a
+       transaction list, with the same merkle root, and the same block hash as
+       the original without duplication, resulting in failed validation. If the
+       receiving node proceeds to mark that block as permanently invalid
+       however, it will fail to accept further unmodified (and thus potentially
+       valid) versions of the same block. We defend against this by detecting
+       the case where we would hash two identical hashes at the end of the list
+       together, and treating that identically to the block having an invalid
+       merkle root. Assuming no double-SHA256 collisions, this will detect all
+       known ways of changing the transactions without affecting the merkle
+       root.
+    */
     vMerkleTree.clear();
+    vMerkleTree.reserve(vtx.size() * 2 + 16); // Safe upper bound for the number of total nodes.
     BOOST_FOREACH(const CTransaction& tx, vtx)
         vMerkleTree.push_back(tx.GetHash());
     int j = 0;
+    bool mutated = false;
     for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
     {
         for (int i = 0; i < nSize; i += 2)
         {
             int i2 = std::min(i+1, nSize-1);
+            if (i2 == i + 1 && i2 + 1 == nSize && vMerkleTree[j+i] == vMerkleTree[j+i2]) {
+                // Two identical hashes at the end of the list at a particular level.
+                mutated = true;
+            }
             vMerkleTree.push_back(Hash(BEGIN(vMerkleTree[j+i]),  END(vMerkleTree[j+i]),
                                        BEGIN(vMerkleTree[j+i2]), END(vMerkleTree[j+i2])));
         }
         j += nSize;
     }
+    if (fMutated) {
+        *fMutated = mutated;
+    }
     return (vMerkleTree.empty() ? 0 : vMerkleTree.back());
 }
 
diff --git a/src/core.h b/src/core.h
index 9a2ac4748780..de41b8621b78 100644
--- a/src/core.h
+++ b/src/core.h
@@ -528,7 +528,11 @@ class CBlock : public CBlockHeader
         return block;
     }
 
-    uint256 BuildMerkleTree() const;
+    // Build the in-memory merkle tree for this block and return the merkle root.
+    // If non-NULL, *mutated is set to whether mutation was detected in the merkle
+    // tree (a duplication of transactions in the block leading to an identical
+    // merkle root).
+    uint256 BuildMerkleTree(bool* mutated = NULL) const;
 
     std::vector<uint256> GetMerkleBranch(int nIndex) const;
     static uint256 CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMerkleBranch, int nIndex);
diff --git a/src/main.cpp b/src/main.cpp
index 15c3916a6fb0..d79644e638f1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2289,13 +2289,12 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         if (!CheckTransaction(tx, state))
             return error("CheckBlock() : CheckTransaction failed");
 
-    // Check for duplicate txids. This is caught by ConnectInputs(),
-    // but catching it earlier avoids a potential DoS attack:
-    set<uint256> uniqueTx;
-    BOOST_FOREACH(const CTransaction &tx, block.vtx) {
-        uniqueTx.insert(tx.GetHash());
-    }
-    if (uniqueTx.size() != block.vtx.size())
+    // Check for merkle tree malleability (CVE-2012-2459): repeating sequences
+    // of transactions in a block without affecting the merkle root of a block,
+    // while still invalidating it.
+    bool mutated;
+    uint256 hashMerkleRoot2 = block.BuildMerkleTree(&mutated);
+    if (mutated)
         return state.DoS(100, error("CheckBlock() : duplicate transaction"),
                          REJECT_INVALID, "bad-txns-duplicate", true);
 
@@ -2309,7 +2308,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                          REJECT_INVALID, "bad-blk-sigops", true);
 
     // Check merkle root
-    if (fCheckMerkleRoot && block.hashMerkleRoot != block.BuildMerkleTree())
+    if (fCheckMerkleRoot && block.hashMerkleRoot != hashMerkleRoot2)
         return state.DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"),
                          REJECT_INVALID, "bad-txnmrklroot", true);
 

From b498a9493ce55d790307543685d8acc4676a4be6 Mon Sep 17 00:00:00 2001
From: Eric Shaw <ericshaw.linux@gmail.com>
Date: Wed, 24 Sep 2014 15:13:59 -0400
Subject: [PATCH 0748/1819] Fixed typo in README.md file. "-regest" "-regtest"

There was a typo in the README.md file. It previously read "-regest" instead of the proper "-regtest" and it has been updated to the proper reading.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index d13011d6dcc6..cf650fe54333 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ are testing multi-machine code that needs to operate across the internet.
 
 If you are testing something that can run on one machine, run with the -regtest option.
 In regression test mode, blocks can be created on-demand; see qa/rpc-tests/ for tests
-that run in -regest mode.
+that run in -regtest mode.
 
 **DEBUG_LOCKORDER**
 

From cf42c36e9963f9cf13704d8d74a9546f0db33d40 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 25 Sep 2014 08:23:32 +0200
Subject: [PATCH 0749/1819] Apply clang-format on crypto/* and compat/*

---
 src/compat/glibc_compat.cpp   |   4 +-
 src/compat/glibc_sanity.cpp   |  14 +-
 src/compat/glibcxx_compat.cpp |  19 +-
 src/compat/glibcxx_sanity.cpp |  24 +--
 src/crypto/common.h           |  55 +++--
 src/crypto/ripemd160.cpp      | 323 +++++++++++++++++-----------
 src/crypto/ripemd160.h        |   5 +-
 src/crypto/sha1.cpp           | 198 +++++++++---------
 src/crypto/sha1.h             |   5 +-
 src/crypto/sha2.cpp           | 382 ++++++++++++++++++----------------
 src/crypto/sha2.h             |  18 +-
 11 files changed, 589 insertions(+), 458 deletions(-)

diff --git a/src/compat/glibc_compat.cpp b/src/compat/glibc_compat.cpp
index 22f82e4259b9..94c79e4b9713 100644
--- a/src/compat/glibc_compat.cpp
+++ b/src/compat/glibc_compat.cpp
@@ -18,11 +18,11 @@ extern "C" void* memcpy(void* a, const void* b, size_t c)
     return memmove(a, b, c);
 }
 
-extern "C" void __chk_fail (void) __attribute__((__noreturn__));
+extern "C" void __chk_fail(void) __attribute__((__noreturn__));
 extern "C" FDELT_TYPE __fdelt_warn(FDELT_TYPE a)
 {
     if (a >= FD_SETSIZE)
-        __chk_fail ();
+        __chk_fail();
     return a / __NFDBITS;
 }
 extern "C" FDELT_TYPE __fdelt_chk(FDELT_TYPE) __attribute__((weak, alias("__fdelt_warn")));
diff --git a/src/compat/glibc_sanity.cpp b/src/compat/glibc_sanity.cpp
index d93602e0fe07..acc7809d773d 100644
--- a/src/compat/glibc_sanity.cpp
+++ b/src/compat/glibc_sanity.cpp
@@ -14,10 +14,11 @@
 extern "C" void* memcpy(void* a, const void* b, size_t c);
 void* memcpy_int(void* a, const void* b, size_t c)
 {
-    return memcpy(a,b,c);
+    return memcpy(a, b, c);
 }
 
-namespace {
+namespace
+{
 // trigger: Use the memcpy_int wrapper which calls our internal memcpy.
 //   A direct call to memcpy may be optimized away by the compiler.
 // test: Fill an array with a sequence of integers. memcpy to a new empty array.
@@ -31,11 +32,10 @@ bool sanity_test_memcpy()
     for (unsigned int i = 0; i != T; ++i)
         memcpy_test[i] = i;
 
-    memcpy_int(memcpy_verify,memcpy_test,sizeof(memcpy_test));
+    memcpy_int(memcpy_verify, memcpy_test, sizeof(memcpy_test));
 
-    for (unsigned int i = 0; i != T; ++i)
-    {
-        if(memcpy_verify[i] != i)
+    for (unsigned int i = 0; i != T; ++i) {
+        if (memcpy_verify[i] != i)
             return false;
     }
     return true;
@@ -51,7 +51,7 @@ bool sanity_test_fdelt()
     fd_set fds;
     FD_ZERO(&fds);
     FD_SET(0, &fds);
-    return FD_ISSET(0,&fds);
+    return FD_ISSET(0, &fds);
 }
 #endif
 
diff --git a/src/compat/glibcxx_compat.cpp b/src/compat/glibcxx_compat.cpp
index cbe059735ba2..41d8458cb272 100644
--- a/src/compat/glibcxx_compat.cpp
+++ b/src/compat/glibcxx_compat.cpp
@@ -11,8 +11,8 @@
 #define _GLIBCXX_USE_NOEXCEPT throw()
 #endif
 
-namespace std {
-
+namespace std
+{
 const char* bad_exception::what() const throw()
 {
     return "std::bad_exception";
@@ -30,9 +30,8 @@ const char* bad_alloc::what() const throw()
 
 namespace __detail
 {
-struct _List_node_base
-{
-    void _M_hook(std::__detail::_List_node_base* const __position) throw () __attribute__((used))
+struct _List_node_base {
+    void _M_hook(std::__detail::_List_node_base* const __position) throw() __attribute__((used))
     {
         _M_next = __position;
         _M_prev = __position->_M_prev;
@@ -62,9 +61,9 @@ template ostream& __ostream_insert(ostream&, const char*, streamsize);
 template istream& istream::_M_extract(long&);
 template istream& istream::_M_extract(unsigned short&);
 
-out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT { }
+out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT {}
 
-length_error::~length_error() _GLIBCXX_USE_NOEXCEPT { }
+length_error::~length_error() _GLIBCXX_USE_NOEXCEPT {}
 
 // Used with permission.
 // See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d
@@ -85,11 +84,11 @@ void ctype<char>::_M_widen_init() const
         }
 }
 
-void  __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__));
-void  __throw_out_of_range_fmt(const char* err, ...)
+void __throw_out_of_range_fmt(const char*, ...) __attribute__((__noreturn__));
+void __throw_out_of_range_fmt(const char* err, ...)
 {
     // Safe and over-simplified version. Ignore the format and print it as-is.
     __throw_out_of_range(err);
 }
 
-}// namespace std
+} // namespace std
diff --git a/src/compat/glibcxx_sanity.cpp b/src/compat/glibcxx_sanity.cpp
index cd8da4fd675d..9b1fefd44818 100644
--- a/src/compat/glibcxx_sanity.cpp
+++ b/src/compat/glibcxx_sanity.cpp
@@ -6,15 +6,15 @@
 #include <locale>
 #include <stdexcept>
 
-namespace{
-
+namespace
+{
 // trigger: use ctype<char>::widen to trigger ctype<char>::_M_widen_init().
 // test: convert a char from narrow to wide and back. Verify that the result
 //   matches the original.
 bool sanity_test_widen(char testchar)
 {
-    const std::ctype<char>& test(std::use_facet< std::ctype<char> >(std::locale()));
-    return test.narrow(test.widen(testchar),'b') == testchar;
+    const std::ctype<char>& test(std::use_facet<std::ctype<char> >(std::locale()));
+    return test.narrow(test.widen(testchar), 'b') == testchar;
 }
 
 // trigger: use list::push_back and list::pop_back to trigger _M_hook and
@@ -25,14 +25,13 @@ bool sanity_test_list(unsigned int size)
 {
     std::list<unsigned int> test;
     for (unsigned int i = 0; i != size; ++i)
-        test.push_back(i+1);
+        test.push_back(i + 1);
 
     if (test.size() != size)
         return false;
 
-    while (!test.empty())
-    {
-        if(test.back() != test.size())
+    while (!test.empty()) {
+        if (test.back() != test.size())
             return false;
         test.pop_back();
     }
@@ -47,15 +46,12 @@ bool sanity_test_list(unsigned int size)
 bool sanity_test_range_fmt()
 {
     std::string test;
-    try
-    {
+    try {
         test.at(1);
-    }
-    catch (const std::out_of_range&)
-    {
+    } catch (const std::out_of_range&) {
         return true;
+    } catch (...) {
     }
-    catch (...){}
     return false;
 }
 
diff --git a/src/crypto/common.h b/src/crypto/common.h
index 8f675a16c5be..7c3d0a135b19 100644
--- a/src/crypto/common.h
+++ b/src/crypto/common.h
@@ -13,7 +13,8 @@
 #include <endian.h>
 #endif
 
-uint32_t static inline ReadLE32(const unsigned char *ptr) {
+uint32_t static inline ReadLE32(const unsigned char* ptr)
+{
 #if HAVE_DECL_LE32TOH == 1
     return le32toh(*((uint32_t*)ptr));
 #elif !defined(WORDS_BIGENDIAN)
@@ -23,8 +24,8 @@ uint32_t static inline ReadLE32(const unsigned char *ptr) {
 #endif
 }
 
-uint64_t static inline ReadLE64(const unsigned char *ptr) {
-
+uint64_t static inline ReadLE64(const unsigned char* ptr)
+{
 #if HAVE_DECL_LE64TOH == 1
     return le64toh(*((uint64_t*)ptr));
 #elif !defined(WORDS_BIGENDIAN)
@@ -35,28 +36,40 @@ uint64_t static inline ReadLE64(const unsigned char *ptr) {
 #endif
 }
 
-void static inline WriteLE32(unsigned char *ptr, uint32_t x) {
+void static inline WriteLE32(unsigned char* ptr, uint32_t x)
+{
 #if HAVE_DECL_HTOLE32 == 1
     *((uint32_t*)ptr) = htole32(x);
 #elif !defined(WORDS_BIGENDIAN)
     *((uint32_t*)ptr) = x;
 #else
-    ptr[3] = x >> 24; ptr[2] = x >> 16; ptr[1] = x >> 8; ptr[0] = x;
+    ptr[3] = x >> 24;
+    ptr[2] = x >> 16;
+    ptr[1] = x >> 8;
+    ptr[0] = x;
 #endif
 }
 
-void static inline WriteLE64(unsigned char *ptr, uint64_t x) {
+void static inline WriteLE64(unsigned char* ptr, uint64_t x)
+{
 #if HAVE_DECL_HTOLE64 == 1
     *((uint64_t*)ptr) = htole64(x);
 #elif !defined(WORDS_BIGENDIAN)
     *((uint64_t*)ptr) = x;
 #else
-    ptr[7] = x >> 56; ptr[6] = x >> 48; ptr[5] = x >> 40; ptr[4] = x >> 32;
-    ptr[3] = x >> 24; ptr[2] = x >> 16; ptr[1] = x >> 8; ptr[0] = x;
+    ptr[7] = x >> 56;
+    ptr[6] = x >> 48;
+    ptr[5] = x >> 40;
+    ptr[4] = x >> 32;
+    ptr[3] = x >> 24;
+    ptr[2] = x >> 16;
+    ptr[1] = x >> 8;
+    ptr[0] = x;
 #endif
 }
 
-uint32_t static inline ReadBE32(const unsigned char *ptr) {
+uint32_t static inline ReadBE32(const unsigned char* ptr)
+{
 #if HAVE_DECL_BE32TOH == 1
     return be32toh(*((uint32_t*)ptr));
 #else
@@ -64,7 +77,8 @@ uint32_t static inline ReadBE32(const unsigned char *ptr) {
 #endif
 }
 
-uint64_t static inline ReadBE64(const unsigned char *ptr) {
+uint64_t static inline ReadBE64(const unsigned char* ptr)
+{
 #if HAVE_DECL_BE64TOH == 1
     return be64toh(*((uint64_t*)ptr));
 #else
@@ -73,20 +87,31 @@ uint64_t static inline ReadBE64(const unsigned char *ptr) {
 #endif
 }
 
-void static inline WriteBE32(unsigned char *ptr, uint32_t x) {
+void static inline WriteBE32(unsigned char* ptr, uint32_t x)
+{
 #if HAVE_DECL_HTOBE32 == 1
     *((uint32_t*)ptr) = htobe32(x);
 #else
-    ptr[0] = x >> 24; ptr[1] = x >> 16; ptr[2] = x >> 8; ptr[3] = x;
+    ptr[0] = x >> 24;
+    ptr[1] = x >> 16;
+    ptr[2] = x >> 8;
+    ptr[3] = x;
 #endif
 }
 
-void static inline WriteBE64(unsigned char *ptr, uint64_t x) {
+void static inline WriteBE64(unsigned char* ptr, uint64_t x)
+{
 #if HAVE_DECL_HTOBE64 == 1
     *((uint64_t*)ptr) = htobe64(x);
 #else
-    ptr[0] = x >> 56; ptr[1] = x >> 48; ptr[2] = x >> 40; ptr[3] = x >> 32;
-    ptr[4] = x >> 24; ptr[5] = x >> 16; ptr[6] = x >> 8; ptr[7] = x;
+    ptr[0] = x >> 56;
+    ptr[1] = x >> 48;
+    ptr[2] = x >> 40;
+    ptr[3] = x >> 32;
+    ptr[4] = x >> 24;
+    ptr[5] = x >> 16;
+    ptr[6] = x >> 8;
+    ptr[7] = x;
 #endif
 }
 
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
index b5e9f0df49d4..90b196ba32c7 100644
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -9,11 +9,11 @@
 #include <string.h>
 
 // Internal implementation code.
-namespace {
-
+namespace
+{
 /// Internal RIPEMD-160 implementation.
-namespace ripemd160 {
-
+namespace ripemd160
+{
 uint32_t inline f1(uint32_t x, uint32_t y, uint32_t z) { return x ^ y ^ z; }
 uint32_t inline f2(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (~x & z); }
 uint32_t inline f3(uint32_t x, uint32_t y, uint32_t z) { return (x | ~y) ^ z; }
@@ -21,7 +21,8 @@ uint32_t inline f4(uint32_t x, uint32_t y, uint32_t z) { return (x & z) | (y & ~
 uint32_t inline f5(uint32_t x, uint32_t y, uint32_t z) { return x ^ (y | ~z); }
 
 /** Initialize RIPEMD-160 state. */
-void inline Initialize(uint32_t *s) {
+void inline Initialize(uint32_t* s)
+{
     s[0] = 0x67452301ul;
     s[1] = 0xEFCDAB89ul;
     s[2] = 0x98BADCFEul;
@@ -29,139 +30,223 @@ void inline Initialize(uint32_t *s) {
     s[4] = 0xC3D2E1F0ul;
 }
 
-uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32-i)); }
+uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); }
 
-void inline Round(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r) {
+void inline Round(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r)
+{
     a = rol(a + f + x + k, r) + e;
     c = rol(c, 10);
 }
 
-void inline R11(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x,            0, r); }
-void inline R21(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x5A827999ul, r); }
-void inline R31(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6ED9EBA1ul, r); }
-void inline R41(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x8F1BBCDCul, r); }
-void inline R51(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0xA953FD4Eul, r); }
+void inline R11(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x, 0, r); }
+void inline R21(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x5A827999ul, r); }
+void inline R31(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6ED9EBA1ul, r); }
+void inline R41(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x8F1BBCDCul, r); }
+void inline R51(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0xA953FD4Eul, r); }
 
-void inline R12(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0x50A28BE6ul, r); }
-void inline R22(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x5C4DD124ul, r); }
-void inline R32(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6D703EF3ul, r); }
-void inline R42(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x7A6D76E9ul, r); }
-void inline R52(uint32_t &a, uint32_t b, uint32_t &c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x,            0, r); }
+void inline R12(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f5(b, c, d), x, 0x50A28BE6ul, r); }
+void inline R22(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f4(b, c, d), x, 0x5C4DD124ul, r); }
+void inline R32(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f3(b, c, d), x, 0x6D703EF3ul, r); }
+void inline R42(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f2(b, c, d), x, 0x7A6D76E9ul, r); }
+void inline R52(uint32_t& a, uint32_t b, uint32_t& c, uint32_t d, uint32_t e, uint32_t x, int r) { Round(a, b, c, d, e, f1(b, c, d), x, 0, r); }
 
 /** Perform a RIPEMD-160 transformation, processing a 64-byte chunk. */
-void Transform(uint32_t *s, const unsigned char *chunk) {
+void Transform(uint32_t* s, const unsigned char* chunk)
+{
     uint32_t a1 = s[0], b1 = s[1], c1 = s[2], d1 = s[3], e1 = s[4];
-    uint32_t a2 = a1  , b2 = b1  , c2 = c1  , d2 = d1  , e2 = e1  ;
-    uint32_t w0  = ReadLE32(chunk +  0), w1  = ReadLE32(chunk +  4), w2  = ReadLE32(chunk +  8), w3  = ReadLE32(chunk + 12);
-    uint32_t w4  = ReadLE32(chunk + 16), w5  = ReadLE32(chunk + 20), w6  = ReadLE32(chunk + 24), w7  = ReadLE32(chunk + 28);
-    uint32_t w8  = ReadLE32(chunk + 32), w9  = ReadLE32(chunk + 36), w10 = ReadLE32(chunk + 40), w11 = ReadLE32(chunk + 44);
+    uint32_t a2 = a1, b2 = b1, c2 = c1, d2 = d1, e2 = e1;
+    uint32_t w0 = ReadLE32(chunk + 0), w1 = ReadLE32(chunk + 4), w2 = ReadLE32(chunk + 8), w3 = ReadLE32(chunk + 12);
+    uint32_t w4 = ReadLE32(chunk + 16), w5 = ReadLE32(chunk + 20), w6 = ReadLE32(chunk + 24), w7 = ReadLE32(chunk + 28);
+    uint32_t w8 = ReadLE32(chunk + 32), w9 = ReadLE32(chunk + 36), w10 = ReadLE32(chunk + 40), w11 = ReadLE32(chunk + 44);
     uint32_t w12 = ReadLE32(chunk + 48), w13 = ReadLE32(chunk + 52), w14 = ReadLE32(chunk + 56), w15 = ReadLE32(chunk + 60);
 
-    R11(a1, b1, c1, d1, e1, w0 , 11); R12(a2, b2, c2, d2, e2, w5 ,  8);
-    R11(e1, a1, b1, c1, d1, w1 , 14); R12(e2, a2, b2, c2, d2, w14,  9);
-    R11(d1, e1, a1, b1, c1, w2 , 15); R12(d2, e2, a2, b2, c2, w7 ,  9);
-    R11(c1, d1, e1, a1, b1, w3 , 12); R12(c2, d2, e2, a2, b2, w0 , 11);
-    R11(b1, c1, d1, e1, a1, w4 ,  5); R12(b2, c2, d2, e2, a2, w9 , 13);
-    R11(a1, b1, c1, d1, e1, w5 ,  8); R12(a2, b2, c2, d2, e2, w2 , 15);
-    R11(e1, a1, b1, c1, d1, w6 ,  7); R12(e2, a2, b2, c2, d2, w11, 15);
-    R11(d1, e1, a1, b1, c1, w7 ,  9); R12(d2, e2, a2, b2, c2, w4 ,  5);
-    R11(c1, d1, e1, a1, b1, w8 , 11); R12(c2, d2, e2, a2, b2, w13,  7);
-    R11(b1, c1, d1, e1, a1, w9 , 13); R12(b2, c2, d2, e2, a2, w6 ,  7);
-    R11(a1, b1, c1, d1, e1, w10, 14); R12(a2, b2, c2, d2, e2, w15,  8);
-    R11(e1, a1, b1, c1, d1, w11, 15); R12(e2, a2, b2, c2, d2, w8 , 11);
-    R11(d1, e1, a1, b1, c1, w12,  6); R12(d2, e2, a2, b2, c2, w1 , 14);
-    R11(c1, d1, e1, a1, b1, w13,  7); R12(c2, d2, e2, a2, b2, w10, 14);
-    R11(b1, c1, d1, e1, a1, w14,  9); R12(b2, c2, d2, e2, a2, w3 , 12);
-    R11(a1, b1, c1, d1, e1, w15,  8); R12(a2, b2, c2, d2, e2, w12,  6);
-
-    R21(e1, a1, b1, c1, d1, w7 ,  7); R22(e2, a2, b2, c2, d2, w6 ,  9);
-    R21(d1, e1, a1, b1, c1, w4 ,  6); R22(d2, e2, a2, b2, c2, w11, 13);
-    R21(c1, d1, e1, a1, b1, w13,  8); R22(c2, d2, e2, a2, b2, w3 , 15);
-    R21(b1, c1, d1, e1, a1, w1 , 13); R22(b2, c2, d2, e2, a2, w7 ,  7);
-    R21(a1, b1, c1, d1, e1, w10, 11); R22(a2, b2, c2, d2, e2, w0 , 12);
-    R21(e1, a1, b1, c1, d1, w6 ,  9); R22(e2, a2, b2, c2, d2, w13,  8);
-    R21(d1, e1, a1, b1, c1, w15,  7); R22(d2, e2, a2, b2, c2, w5 ,  9);
-    R21(c1, d1, e1, a1, b1, w3 , 15); R22(c2, d2, e2, a2, b2, w10, 11);
-    R21(b1, c1, d1, e1, a1, w12,  7); R22(b2, c2, d2, e2, a2, w14,  7);
-    R21(a1, b1, c1, d1, e1, w0 , 12); R22(a2, b2, c2, d2, e2, w15,  7);
-    R21(e1, a1, b1, c1, d1, w9 , 15); R22(e2, a2, b2, c2, d2, w8 , 12);
-    R21(d1, e1, a1, b1, c1, w5 ,  9); R22(d2, e2, a2, b2, c2, w12,  7);
-    R21(c1, d1, e1, a1, b1, w2 , 11); R22(c2, d2, e2, a2, b2, w4 ,  6);
-    R21(b1, c1, d1, e1, a1, w14,  7); R22(b2, c2, d2, e2, a2, w9 , 15);
-    R21(a1, b1, c1, d1, e1, w11, 13); R22(a2, b2, c2, d2, e2, w1 , 13);
-    R21(e1, a1, b1, c1, d1, w8 , 12); R22(e2, a2, b2, c2, d2, w2 , 11);
-
-    R31(d1, e1, a1, b1, c1, w3 , 11); R32(d2, e2, a2, b2, c2, w15,  9);
-    R31(c1, d1, e1, a1, b1, w10, 13); R32(c2, d2, e2, a2, b2, w5 ,  7);
-    R31(b1, c1, d1, e1, a1, w14,  6); R32(b2, c2, d2, e2, a2, w1 , 15);
-    R31(a1, b1, c1, d1, e1, w4 ,  7); R32(a2, b2, c2, d2, e2, w3 , 11);
-    R31(e1, a1, b1, c1, d1, w9 , 14); R32(e2, a2, b2, c2, d2, w7 ,  8);
-    R31(d1, e1, a1, b1, c1, w15,  9); R32(d2, e2, a2, b2, c2, w14,  6);
-    R31(c1, d1, e1, a1, b1, w8 , 13); R32(c2, d2, e2, a2, b2, w6 ,  6);
-    R31(b1, c1, d1, e1, a1, w1 , 15); R32(b2, c2, d2, e2, a2, w9 , 14);
-    R31(a1, b1, c1, d1, e1, w2 , 14); R32(a2, b2, c2, d2, e2, w11, 12);
-    R31(e1, a1, b1, c1, d1, w7 ,  8); R32(e2, a2, b2, c2, d2, w8 , 13);
-    R31(d1, e1, a1, b1, c1, w0 , 13); R32(d2, e2, a2, b2, c2, w12,  5);
-    R31(c1, d1, e1, a1, b1, w6 ,  6); R32(c2, d2, e2, a2, b2, w2 , 14);
-    R31(b1, c1, d1, e1, a1, w13,  5); R32(b2, c2, d2, e2, a2, w10, 13);
-    R31(a1, b1, c1, d1, e1, w11, 12); R32(a2, b2, c2, d2, e2, w0 , 13);
-    R31(e1, a1, b1, c1, d1, w5 ,  7); R32(e2, a2, b2, c2, d2, w4 ,  7);
-    R31(d1, e1, a1, b1, c1, w12,  5); R32(d2, e2, a2, b2, c2, w13,  5);
-
-    R41(c1, d1, e1, a1, b1, w1 , 11); R42(c2, d2, e2, a2, b2, w8 , 15);
-    R41(b1, c1, d1, e1, a1, w9 , 12); R42(b2, c2, d2, e2, a2, w6 ,  5);
-    R41(a1, b1, c1, d1, e1, w11, 14); R42(a2, b2, c2, d2, e2, w4 ,  8);
-    R41(e1, a1, b1, c1, d1, w10, 15); R42(e2, a2, b2, c2, d2, w1 , 11);
-    R41(d1, e1, a1, b1, c1, w0 , 14); R42(d2, e2, a2, b2, c2, w3 , 14);
-    R41(c1, d1, e1, a1, b1, w8 , 15); R42(c2, d2, e2, a2, b2, w11, 14);
-    R41(b1, c1, d1, e1, a1, w12,  9); R42(b2, c2, d2, e2, a2, w15,  6);
-    R41(a1, b1, c1, d1, e1, w4 ,  8); R42(a2, b2, c2, d2, e2, w0 , 14);
-    R41(e1, a1, b1, c1, d1, w13,  9); R42(e2, a2, b2, c2, d2, w5 ,  6);
-    R41(d1, e1, a1, b1, c1, w3 , 14); R42(d2, e2, a2, b2, c2, w12,  9);
-    R41(c1, d1, e1, a1, b1, w7 ,  5); R42(c2, d2, e2, a2, b2, w2 , 12);
-    R41(b1, c1, d1, e1, a1, w15,  6); R42(b2, c2, d2, e2, a2, w13,  9);
-    R41(a1, b1, c1, d1, e1, w14,  8); R42(a2, b2, c2, d2, e2, w9 , 12);
-    R41(e1, a1, b1, c1, d1, w5 ,  6); R42(e2, a2, b2, c2, d2, w7 ,  5);
-    R41(d1, e1, a1, b1, c1, w6 ,  5); R42(d2, e2, a2, b2, c2, w10, 15);
-    R41(c1, d1, e1, a1, b1, w2 , 12); R42(c2, d2, e2, a2, b2, w14,  8);
-
-    R51(b1, c1, d1, e1, a1, w4 ,  9); R52(b2, c2, d2, e2, a2, w12,  8);
-    R51(a1, b1, c1, d1, e1, w0 , 15); R52(a2, b2, c2, d2, e2, w15,  5);
-    R51(e1, a1, b1, c1, d1, w5 ,  5); R52(e2, a2, b2, c2, d2, w10, 12);
-    R51(d1, e1, a1, b1, c1, w9 , 11); R52(d2, e2, a2, b2, c2, w4 ,  9);
-    R51(c1, d1, e1, a1, b1, w7 ,  6); R52(c2, d2, e2, a2, b2, w1 , 12);
-    R51(b1, c1, d1, e1, a1, w12,  8); R52(b2, c2, d2, e2, a2, w5 ,  5);
-    R51(a1, b1, c1, d1, e1, w2 , 13); R52(a2, b2, c2, d2, e2, w8 , 14);
-    R51(e1, a1, b1, c1, d1, w10, 12); R52(e2, a2, b2, c2, d2, w7 ,  6);
-    R51(d1, e1, a1, b1, c1, w14,  5); R52(d2, e2, a2, b2, c2, w6 ,  8);
-    R51(c1, d1, e1, a1, b1, w1 , 12); R52(c2, d2, e2, a2, b2, w2 , 13);
-    R51(b1, c1, d1, e1, a1, w3 , 13); R52(b2, c2, d2, e2, a2, w13,  6);
-    R51(a1, b1, c1, d1, e1, w8 , 14); R52(a2, b2, c2, d2, e2, w14,  5);
-    R51(e1, a1, b1, c1, d1, w11, 11); R52(e2, a2, b2, c2, d2, w0 , 15);
-    R51(d1, e1, a1, b1, c1, w6 ,  8); R52(d2, e2, a2, b2, c2, w3 , 13);
-    R51(c1, d1, e1, a1, b1, w15,  5); R52(c2, d2, e2, a2, b2, w9 , 11);
-    R51(b1, c1, d1, e1, a1, w13,  6); R52(b2, c2, d2, e2, a2, w11, 11);
+    R11(a1, b1, c1, d1, e1, w0, 11);
+    R12(a2, b2, c2, d2, e2, w5, 8);
+    R11(e1, a1, b1, c1, d1, w1, 14);
+    R12(e2, a2, b2, c2, d2, w14, 9);
+    R11(d1, e1, a1, b1, c1, w2, 15);
+    R12(d2, e2, a2, b2, c2, w7, 9);
+    R11(c1, d1, e1, a1, b1, w3, 12);
+    R12(c2, d2, e2, a2, b2, w0, 11);
+    R11(b1, c1, d1, e1, a1, w4, 5);
+    R12(b2, c2, d2, e2, a2, w9, 13);
+    R11(a1, b1, c1, d1, e1, w5, 8);
+    R12(a2, b2, c2, d2, e2, w2, 15);
+    R11(e1, a1, b1, c1, d1, w6, 7);
+    R12(e2, a2, b2, c2, d2, w11, 15);
+    R11(d1, e1, a1, b1, c1, w7, 9);
+    R12(d2, e2, a2, b2, c2, w4, 5);
+    R11(c1, d1, e1, a1, b1, w8, 11);
+    R12(c2, d2, e2, a2, b2, w13, 7);
+    R11(b1, c1, d1, e1, a1, w9, 13);
+    R12(b2, c2, d2, e2, a2, w6, 7);
+    R11(a1, b1, c1, d1, e1, w10, 14);
+    R12(a2, b2, c2, d2, e2, w15, 8);
+    R11(e1, a1, b1, c1, d1, w11, 15);
+    R12(e2, a2, b2, c2, d2, w8, 11);
+    R11(d1, e1, a1, b1, c1, w12, 6);
+    R12(d2, e2, a2, b2, c2, w1, 14);
+    R11(c1, d1, e1, a1, b1, w13, 7);
+    R12(c2, d2, e2, a2, b2, w10, 14);
+    R11(b1, c1, d1, e1, a1, w14, 9);
+    R12(b2, c2, d2, e2, a2, w3, 12);
+    R11(a1, b1, c1, d1, e1, w15, 8);
+    R12(a2, b2, c2, d2, e2, w12, 6);
+
+    R21(e1, a1, b1, c1, d1, w7, 7);
+    R22(e2, a2, b2, c2, d2, w6, 9);
+    R21(d1, e1, a1, b1, c1, w4, 6);
+    R22(d2, e2, a2, b2, c2, w11, 13);
+    R21(c1, d1, e1, a1, b1, w13, 8);
+    R22(c2, d2, e2, a2, b2, w3, 15);
+    R21(b1, c1, d1, e1, a1, w1, 13);
+    R22(b2, c2, d2, e2, a2, w7, 7);
+    R21(a1, b1, c1, d1, e1, w10, 11);
+    R22(a2, b2, c2, d2, e2, w0, 12);
+    R21(e1, a1, b1, c1, d1, w6, 9);
+    R22(e2, a2, b2, c2, d2, w13, 8);
+    R21(d1, e1, a1, b1, c1, w15, 7);
+    R22(d2, e2, a2, b2, c2, w5, 9);
+    R21(c1, d1, e1, a1, b1, w3, 15);
+    R22(c2, d2, e2, a2, b2, w10, 11);
+    R21(b1, c1, d1, e1, a1, w12, 7);
+    R22(b2, c2, d2, e2, a2, w14, 7);
+    R21(a1, b1, c1, d1, e1, w0, 12);
+    R22(a2, b2, c2, d2, e2, w15, 7);
+    R21(e1, a1, b1, c1, d1, w9, 15);
+    R22(e2, a2, b2, c2, d2, w8, 12);
+    R21(d1, e1, a1, b1, c1, w5, 9);
+    R22(d2, e2, a2, b2, c2, w12, 7);
+    R21(c1, d1, e1, a1, b1, w2, 11);
+    R22(c2, d2, e2, a2, b2, w4, 6);
+    R21(b1, c1, d1, e1, a1, w14, 7);
+    R22(b2, c2, d2, e2, a2, w9, 15);
+    R21(a1, b1, c1, d1, e1, w11, 13);
+    R22(a2, b2, c2, d2, e2, w1, 13);
+    R21(e1, a1, b1, c1, d1, w8, 12);
+    R22(e2, a2, b2, c2, d2, w2, 11);
+
+    R31(d1, e1, a1, b1, c1, w3, 11);
+    R32(d2, e2, a2, b2, c2, w15, 9);
+    R31(c1, d1, e1, a1, b1, w10, 13);
+    R32(c2, d2, e2, a2, b2, w5, 7);
+    R31(b1, c1, d1, e1, a1, w14, 6);
+    R32(b2, c2, d2, e2, a2, w1, 15);
+    R31(a1, b1, c1, d1, e1, w4, 7);
+    R32(a2, b2, c2, d2, e2, w3, 11);
+    R31(e1, a1, b1, c1, d1, w9, 14);
+    R32(e2, a2, b2, c2, d2, w7, 8);
+    R31(d1, e1, a1, b1, c1, w15, 9);
+    R32(d2, e2, a2, b2, c2, w14, 6);
+    R31(c1, d1, e1, a1, b1, w8, 13);
+    R32(c2, d2, e2, a2, b2, w6, 6);
+    R31(b1, c1, d1, e1, a1, w1, 15);
+    R32(b2, c2, d2, e2, a2, w9, 14);
+    R31(a1, b1, c1, d1, e1, w2, 14);
+    R32(a2, b2, c2, d2, e2, w11, 12);
+    R31(e1, a1, b1, c1, d1, w7, 8);
+    R32(e2, a2, b2, c2, d2, w8, 13);
+    R31(d1, e1, a1, b1, c1, w0, 13);
+    R32(d2, e2, a2, b2, c2, w12, 5);
+    R31(c1, d1, e1, a1, b1, w6, 6);
+    R32(c2, d2, e2, a2, b2, w2, 14);
+    R31(b1, c1, d1, e1, a1, w13, 5);
+    R32(b2, c2, d2, e2, a2, w10, 13);
+    R31(a1, b1, c1, d1, e1, w11, 12);
+    R32(a2, b2, c2, d2, e2, w0, 13);
+    R31(e1, a1, b1, c1, d1, w5, 7);
+    R32(e2, a2, b2, c2, d2, w4, 7);
+    R31(d1, e1, a1, b1, c1, w12, 5);
+    R32(d2, e2, a2, b2, c2, w13, 5);
+
+    R41(c1, d1, e1, a1, b1, w1, 11);
+    R42(c2, d2, e2, a2, b2, w8, 15);
+    R41(b1, c1, d1, e1, a1, w9, 12);
+    R42(b2, c2, d2, e2, a2, w6, 5);
+    R41(a1, b1, c1, d1, e1, w11, 14);
+    R42(a2, b2, c2, d2, e2, w4, 8);
+    R41(e1, a1, b1, c1, d1, w10, 15);
+    R42(e2, a2, b2, c2, d2, w1, 11);
+    R41(d1, e1, a1, b1, c1, w0, 14);
+    R42(d2, e2, a2, b2, c2, w3, 14);
+    R41(c1, d1, e1, a1, b1, w8, 15);
+    R42(c2, d2, e2, a2, b2, w11, 14);
+    R41(b1, c1, d1, e1, a1, w12, 9);
+    R42(b2, c2, d2, e2, a2, w15, 6);
+    R41(a1, b1, c1, d1, e1, w4, 8);
+    R42(a2, b2, c2, d2, e2, w0, 14);
+    R41(e1, a1, b1, c1, d1, w13, 9);
+    R42(e2, a2, b2, c2, d2, w5, 6);
+    R41(d1, e1, a1, b1, c1, w3, 14);
+    R42(d2, e2, a2, b2, c2, w12, 9);
+    R41(c1, d1, e1, a1, b1, w7, 5);
+    R42(c2, d2, e2, a2, b2, w2, 12);
+    R41(b1, c1, d1, e1, a1, w15, 6);
+    R42(b2, c2, d2, e2, a2, w13, 9);
+    R41(a1, b1, c1, d1, e1, w14, 8);
+    R42(a2, b2, c2, d2, e2, w9, 12);
+    R41(e1, a1, b1, c1, d1, w5, 6);
+    R42(e2, a2, b2, c2, d2, w7, 5);
+    R41(d1, e1, a1, b1, c1, w6, 5);
+    R42(d2, e2, a2, b2, c2, w10, 15);
+    R41(c1, d1, e1, a1, b1, w2, 12);
+    R42(c2, d2, e2, a2, b2, w14, 8);
+
+    R51(b1, c1, d1, e1, a1, w4, 9);
+    R52(b2, c2, d2, e2, a2, w12, 8);
+    R51(a1, b1, c1, d1, e1, w0, 15);
+    R52(a2, b2, c2, d2, e2, w15, 5);
+    R51(e1, a1, b1, c1, d1, w5, 5);
+    R52(e2, a2, b2, c2, d2, w10, 12);
+    R51(d1, e1, a1, b1, c1, w9, 11);
+    R52(d2, e2, a2, b2, c2, w4, 9);
+    R51(c1, d1, e1, a1, b1, w7, 6);
+    R52(c2, d2, e2, a2, b2, w1, 12);
+    R51(b1, c1, d1, e1, a1, w12, 8);
+    R52(b2, c2, d2, e2, a2, w5, 5);
+    R51(a1, b1, c1, d1, e1, w2, 13);
+    R52(a2, b2, c2, d2, e2, w8, 14);
+    R51(e1, a1, b1, c1, d1, w10, 12);
+    R52(e2, a2, b2, c2, d2, w7, 6);
+    R51(d1, e1, a1, b1, c1, w14, 5);
+    R52(d2, e2, a2, b2, c2, w6, 8);
+    R51(c1, d1, e1, a1, b1, w1, 12);
+    R52(c2, d2, e2, a2, b2, w2, 13);
+    R51(b1, c1, d1, e1, a1, w3, 13);
+    R52(b2, c2, d2, e2, a2, w13, 6);
+    R51(a1, b1, c1, d1, e1, w8, 14);
+    R52(a2, b2, c2, d2, e2, w14, 5);
+    R51(e1, a1, b1, c1, d1, w11, 11);
+    R52(e2, a2, b2, c2, d2, w0, 15);
+    R51(d1, e1, a1, b1, c1, w6, 8);
+    R52(d2, e2, a2, b2, c2, w3, 13);
+    R51(c1, d1, e1, a1, b1, w15, 5);
+    R52(c2, d2, e2, a2, b2, w9, 11);
+    R51(b1, c1, d1, e1, a1, w13, 6);
+    R52(b2, c2, d2, e2, a2, w11, 11);
 
     uint32_t t = s[0];
     s[0] = s[1] + c1 + d2;
     s[1] = s[2] + d1 + e2;
     s[2] = s[3] + e1 + a2;
     s[3] = s[4] + a1 + b2;
-    s[4] = t    + b1 + c2;
+    s[4] = t + b1 + c2;
 }
 
-}  // namespace ripemd160
+} // namespace ripemd160
 
-}  // namespace
+} // namespace
 
 ////// RIPEMD160
 
-CRIPEMD160::CRIPEMD160() : bytes(0) {
+CRIPEMD160::CRIPEMD160() : bytes(0)
+{
     ripemd160::Initialize(s);
 }
 
-CRIPEMD160& CRIPEMD160::Write(const unsigned char *data, size_t len) {
-    const unsigned char *end = data + len;
+CRIPEMD160& CRIPEMD160::Write(const unsigned char* data, size_t len)
+{
+    const unsigned char* end = data + len;
     size_t bufsize = bytes % 64;
     if (bufsize && bufsize + len >= 64) {
         // Fill the buffer, and process it.
@@ -185,20 +270,22 @@ CRIPEMD160& CRIPEMD160::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CRIPEMD160::Finalize(unsigned char hash[OUTPUT_SIZE]) {
+void CRIPEMD160::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteLE64(sizedesc, bytes << 3);
     Write(pad, 1 + ((119 - (bytes % 64)) % 64));
     Write(sizedesc, 8);
     WriteLE32(hash, s[0]);
-    WriteLE32(hash+4, s[1]);
-    WriteLE32(hash+8, s[2]);
-    WriteLE32(hash+12, s[3]);
-    WriteLE32(hash+16, s[4]);
+    WriteLE32(hash + 4, s[1]);
+    WriteLE32(hash + 8, s[2]);
+    WriteLE32(hash + 12, s[3]);
+    WriteLE32(hash + 16, s[4]);
 }
 
-CRIPEMD160& CRIPEMD160::Reset() {
+CRIPEMD160& CRIPEMD160::Reset()
+{
     bytes = 0;
     ripemd160::Initialize(s);
     return *this;
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index 44bd4879a509..76197543beea 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -9,7 +9,8 @@
 #include <stdlib.h>
 
 /** A hasher class for RIPEMD-160. */
-class CRIPEMD160 {
+class CRIPEMD160
+{
 private:
     uint32_t s[5];
     unsigned char buf[64];
@@ -19,7 +20,7 @@ class CRIPEMD160 {
     static const size_t OUTPUT_SIZE = 20;
 
     CRIPEMD160();
-    CRIPEMD160& Write(const unsigned char *data, size_t len);
+    CRIPEMD160& Write(const unsigned char* data, size_t len);
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CRIPEMD160& Reset();
 };
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
index 819abab579ff..5fbea002d652 100644
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -9,14 +9,14 @@
 #include <string.h>
 
 // Internal implementation code.
-namespace {
-
+namespace
+{
 /// Internal SHA-1 implementation.
-namespace sha1 {
-
+namespace sha1
+{
 /** One round of SHA-1. */
-void inline Round(uint32_t a, uint32_t &b, uint32_t c, uint32_t d, uint32_t &e,
-                  uint32_t f, uint32_t k, uint32_t w) {
+void inline Round(uint32_t a, uint32_t& b, uint32_t c, uint32_t d, uint32_t& e, uint32_t f, uint32_t k, uint32_t w)
+{
     e += ((a << 5) | (a >> 27)) + f + k + w;
     b = (b << 30) | (b >> 2);
 }
@@ -28,7 +28,8 @@ uint32_t inline f3(uint32_t b, uint32_t c, uint32_t d) { return (b & c) | (d & (
 uint32_t inline left(uint32_t x) { return (x << 1) | (x >> 31); }
 
 /** Initialize SHA-1 state. */
-void inline Initialize(uint32_t *s) {
+void inline Initialize(uint32_t* s)
+{
     s[0] = 0x67452301ul;
     s[1] = 0xEFCDAB89ul;
     s[2] = 0x98BADCFEul;
@@ -42,20 +43,21 @@ const uint32_t k3 = 0x8F1BBCDCul;
 const uint32_t k4 = 0xCA62C1D6ul;
 
 /** Perform a SHA-1 transformation, processing a 64-byte chunk. */
-void Transform(uint32_t *s, const unsigned char *chunk) {
+void Transform(uint32_t* s, const unsigned char* chunk)
+{
     uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4];
     uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
 
-    Round(a, b, c, d, e, f1(b, c, d), k1, w0  = ReadBE32(chunk +  0));
-    Round(e, a, b, c, d, f1(a, b, c), k1, w1  = ReadBE32(chunk +  4));
-    Round(d, e, a, b, c, f1(e, a, b), k1, w2  = ReadBE32(chunk +  8));
-    Round(c, d, e, a, b, f1(d, e, a), k1, w3  = ReadBE32(chunk + 12));
-    Round(b, c, d, e, a, f1(c, d, e), k1, w4  = ReadBE32(chunk + 16));
-    Round(a, b, c, d, e, f1(b, c, d), k1, w5  = ReadBE32(chunk + 20));
-    Round(e, a, b, c, d, f1(a, b, c), k1, w6  = ReadBE32(chunk + 24));
-    Round(d, e, a, b, c, f1(e, a, b), k1, w7  = ReadBE32(chunk + 28));
-    Round(c, d, e, a, b, f1(d, e, a), k1, w8  = ReadBE32(chunk + 32));
-    Round(b, c, d, e, a, f1(c, d, e), k1, w9  = ReadBE32(chunk + 36));
+    Round(a, b, c, d, e, f1(b, c, d), k1, w0 = ReadBE32(chunk + 0));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w1 = ReadBE32(chunk + 4));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w2 = ReadBE32(chunk + 8));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w3 = ReadBE32(chunk + 12));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w4 = ReadBE32(chunk + 16));
+    Round(a, b, c, d, e, f1(b, c, d), k1, w5 = ReadBE32(chunk + 20));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w6 = ReadBE32(chunk + 24));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w7 = ReadBE32(chunk + 28));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w8 = ReadBE32(chunk + 32));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w9 = ReadBE32(chunk + 36));
     Round(a, b, c, d, e, f1(b, c, d), k1, w10 = ReadBE32(chunk + 40));
     Round(e, a, b, c, d, f1(a, b, c), k1, w11 = ReadBE32(chunk + 44));
     Round(d, e, a, b, c, f1(e, a, b), k1, w12 = ReadBE32(chunk + 48));
@@ -63,73 +65,73 @@ void Transform(uint32_t *s, const unsigned char *chunk) {
     Round(b, c, d, e, a, f1(c, d, e), k1, w14 = ReadBE32(chunk + 56));
     Round(a, b, c, d, e, f1(b, c, d), k1, w15 = ReadBE32(chunk + 60));
 
-    Round(e, a, b, c, d, f1(a, b, c), k1, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
-    Round(d, e, a, b, c, f1(e, a, b), k1, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
-    Round(c, d, e, a, b, f1(d, e, a), k1, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
-    Round(b, c, d, e, a, f1(c, d, e), k1, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
-    Round(a, b, c, d, e, f2(b, c, d), k2, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
-    Round(e, a, b, c, d, f2(a, b, c), k2, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
-    Round(d, e, a, b, c, f2(e, a, b), k2, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
-    Round(c, d, e, a, b, f2(d, e, a), k2, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
-    Round(b, c, d, e, a, f2(c, d, e), k2, w8  = left(w8  ^ w5  ^ w0  ^ w10));
-    Round(a, b, c, d, e, f2(b, c, d), k2, w9  = left(w9  ^ w6  ^ w1  ^ w11));
-    Round(e, a, b, c, d, f2(a, b, c), k2, w10 = left(w10 ^ w7  ^ w2  ^ w12));
-    Round(d, e, a, b, c, f2(e, a, b), k2, w11 = left(w11 ^ w8  ^ w3  ^ w13));
-    Round(c, d, e, a, b, f2(d, e, a), k2, w12 = left(w12 ^ w9  ^ w4  ^ w14));
-    Round(b, c, d, e, a, f2(c, d, e), k2, w13 = left(w13 ^ w10 ^ w5  ^ w15));
-    Round(a, b, c, d, e, f2(b, c, d), k2, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
-    Round(e, a, b, c, d, f2(a, b, c), k2, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
-
-    Round(d, e, a, b, c, f2(e, a, b), k2, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
-    Round(c, d, e, a, b, f2(d, e, a), k2, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
-    Round(b, c, d, e, a, f2(c, d, e), k2, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
-    Round(a, b, c, d, e, f2(b, c, d), k2, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
-    Round(e, a, b, c, d, f2(a, b, c), k2, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
-    Round(d, e, a, b, c, f2(e, a, b), k2, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
-    Round(c, d, e, a, b, f2(d, e, a), k2, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
-    Round(b, c, d, e, a, f2(c, d, e), k2, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
-    Round(a, b, c, d, e, f3(b, c, d), k3, w8  = left(w8  ^ w5  ^ w0  ^ w10));
-    Round(e, a, b, c, d, f3(a, b, c), k3, w9  = left(w9  ^ w6  ^ w1  ^ w11));
-    Round(d, e, a, b, c, f3(e, a, b), k3, w10 = left(w10 ^ w7  ^ w2  ^ w12));
-    Round(c, d, e, a, b, f3(d, e, a), k3, w11 = left(w11 ^ w8  ^ w3  ^ w13));
-    Round(b, c, d, e, a, f3(c, d, e), k3, w12 = left(w12 ^ w9  ^ w4  ^ w14));
-    Round(a, b, c, d, e, f3(b, c, d), k3, w13 = left(w13 ^ w10 ^ w5  ^ w15));
-    Round(e, a, b, c, d, f3(a, b, c), k3, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
-    Round(d, e, a, b, c, f3(e, a, b), k3, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
-
-    Round(c, d, e, a, b, f3(d, e, a), k3, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
-    Round(b, c, d, e, a, f3(c, d, e), k3, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
-    Round(a, b, c, d, e, f3(b, c, d), k3, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
-    Round(e, a, b, c, d, f3(a, b, c), k3, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
-    Round(d, e, a, b, c, f3(e, a, b), k3, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
-    Round(c, d, e, a, b, f3(d, e, a), k3, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
-    Round(b, c, d, e, a, f3(c, d, e), k3, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
-    Round(a, b, c, d, e, f3(b, c, d), k3, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
-    Round(e, a, b, c, d, f3(a, b, c), k3, w8  = left(w8  ^ w5  ^ w0  ^ w10));
-    Round(d, e, a, b, c, f3(e, a, b), k3, w9  = left(w9  ^ w6  ^ w1  ^ w11));
-    Round(c, d, e, a, b, f3(d, e, a), k3, w10 = left(w10 ^ w7  ^ w2  ^ w12));
-    Round(b, c, d, e, a, f3(c, d, e), k3, w11 = left(w11 ^ w8  ^ w3  ^ w13));
-    Round(a, b, c, d, e, f2(b, c, d), k4, w12 = left(w12 ^ w9  ^ w4  ^ w14));
-    Round(e, a, b, c, d, f2(a, b, c), k4, w13 = left(w13 ^ w10 ^ w5  ^ w15));
-    Round(d, e, a, b, c, f2(e, a, b), k4, w14 = left(w14 ^ w11 ^ w6  ^ w0 ));
-    Round(c, d, e, a, b, f2(d, e, a), k4, w15 = left(w15 ^ w12 ^ w7  ^ w1 ));
-
-    Round(b, c, d, e, a, f2(c, d, e), k4, w0  = left(w0  ^ w13 ^ w8  ^ w2 ));
-    Round(a, b, c, d, e, f2(b, c, d), k4, w1  = left(w1  ^ w14 ^ w9  ^ w3 ));
-    Round(e, a, b, c, d, f2(a, b, c), k4, w2  = left(w2  ^ w15 ^ w10 ^ w4 ));
-    Round(d, e, a, b, c, f2(e, a, b), k4, w3  = left(w3  ^ w0  ^ w11 ^ w5 ));
-    Round(c, d, e, a, b, f2(d, e, a), k4, w4  = left(w4  ^ w1  ^ w12 ^ w6 ));
-    Round(b, c, d, e, a, f2(c, d, e), k4, w5  = left(w5  ^ w2  ^ w13 ^ w7 ));
-    Round(a, b, c, d, e, f2(b, c, d), k4, w6  = left(w6  ^ w3  ^ w14 ^ w8 ));
-    Round(e, a, b, c, d, f2(a, b, c), k4, w7  = left(w7  ^ w4  ^ w15 ^ w9 ));
-    Round(d, e, a, b, c, f2(e, a, b), k4, w8  = left(w8  ^ w5  ^ w0  ^ w10));
-    Round(c, d, e, a, b, f2(d, e, a), k4, w9  = left(w9  ^ w6  ^ w1  ^ w11));
-    Round(b, c, d, e, a, f2(c, d, e), k4, w10 = left(w10 ^ w7  ^ w2  ^ w12));
-    Round(a, b, c, d, e, f2(b, c, d), k4, w11 = left(w11 ^ w8  ^ w3  ^ w13));
-    Round(e, a, b, c, d, f2(a, b, c), k4, w12 = left(w12 ^ w9  ^ w4  ^ w14));
-    Round(d, e, a, b, c, f2(e, a, b), k4,       left(w13 ^ w10 ^ w5  ^ w15));
-    Round(c, d, e, a, b, f2(d, e, a), k4,       left(w14 ^ w11 ^ w6  ^ w0 ));
-    Round(b, c, d, e, a, f2(c, d, e), k4,       left(w15 ^ w12 ^ w7  ^ w1 ));
+    Round(e, a, b, c, d, f1(a, b, c), k1, w0 = left(w0 ^ w13 ^ w8 ^ w2));
+    Round(d, e, a, b, c, f1(e, a, b), k1, w1 = left(w1 ^ w14 ^ w9 ^ w3));
+    Round(c, d, e, a, b, f1(d, e, a), k1, w2 = left(w2 ^ w15 ^ w10 ^ w4));
+    Round(b, c, d, e, a, f1(c, d, e), k1, w3 = left(w3 ^ w0 ^ w11 ^ w5));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w4 = left(w4 ^ w1 ^ w12 ^ w6));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w5 = left(w5 ^ w2 ^ w13 ^ w7));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w6 = left(w6 ^ w3 ^ w14 ^ w8));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w7 = left(w7 ^ w4 ^ w15 ^ w9));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w8 = left(w8 ^ w5 ^ w0 ^ w10));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w9 = left(w9 ^ w6 ^ w1 ^ w11));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w10 = left(w10 ^ w7 ^ w2 ^ w12));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w11 = left(w11 ^ w8 ^ w3 ^ w13));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w12 = left(w12 ^ w9 ^ w4 ^ w14));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w13 = left(w13 ^ w10 ^ w5 ^ w15));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w14 = left(w14 ^ w11 ^ w6 ^ w0));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w15 = left(w15 ^ w12 ^ w7 ^ w1));
+
+    Round(d, e, a, b, c, f2(e, a, b), k2, w0 = left(w0 ^ w13 ^ w8 ^ w2));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w1 = left(w1 ^ w14 ^ w9 ^ w3));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w2 = left(w2 ^ w15 ^ w10 ^ w4));
+    Round(a, b, c, d, e, f2(b, c, d), k2, w3 = left(w3 ^ w0 ^ w11 ^ w5));
+    Round(e, a, b, c, d, f2(a, b, c), k2, w4 = left(w4 ^ w1 ^ w12 ^ w6));
+    Round(d, e, a, b, c, f2(e, a, b), k2, w5 = left(w5 ^ w2 ^ w13 ^ w7));
+    Round(c, d, e, a, b, f2(d, e, a), k2, w6 = left(w6 ^ w3 ^ w14 ^ w8));
+    Round(b, c, d, e, a, f2(c, d, e), k2, w7 = left(w7 ^ w4 ^ w15 ^ w9));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w8 = left(w8 ^ w5 ^ w0 ^ w10));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w9 = left(w9 ^ w6 ^ w1 ^ w11));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w10 = left(w10 ^ w7 ^ w2 ^ w12));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w11 = left(w11 ^ w8 ^ w3 ^ w13));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w12 = left(w12 ^ w9 ^ w4 ^ w14));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w13 = left(w13 ^ w10 ^ w5 ^ w15));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w14 = left(w14 ^ w11 ^ w6 ^ w0));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w15 = left(w15 ^ w12 ^ w7 ^ w1));
+
+    Round(c, d, e, a, b, f3(d, e, a), k3, w0 = left(w0 ^ w13 ^ w8 ^ w2));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w1 = left(w1 ^ w14 ^ w9 ^ w3));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w2 = left(w2 ^ w15 ^ w10 ^ w4));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w3 = left(w3 ^ w0 ^ w11 ^ w5));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w4 = left(w4 ^ w1 ^ w12 ^ w6));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w5 = left(w5 ^ w2 ^ w13 ^ w7));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w6 = left(w6 ^ w3 ^ w14 ^ w8));
+    Round(a, b, c, d, e, f3(b, c, d), k3, w7 = left(w7 ^ w4 ^ w15 ^ w9));
+    Round(e, a, b, c, d, f3(a, b, c), k3, w8 = left(w8 ^ w5 ^ w0 ^ w10));
+    Round(d, e, a, b, c, f3(e, a, b), k3, w9 = left(w9 ^ w6 ^ w1 ^ w11));
+    Round(c, d, e, a, b, f3(d, e, a), k3, w10 = left(w10 ^ w7 ^ w2 ^ w12));
+    Round(b, c, d, e, a, f3(c, d, e), k3, w11 = left(w11 ^ w8 ^ w3 ^ w13));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w12 = left(w12 ^ w9 ^ w4 ^ w14));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w13 = left(w13 ^ w10 ^ w5 ^ w15));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w14 = left(w14 ^ w11 ^ w6 ^ w0));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w15 = left(w15 ^ w12 ^ w7 ^ w1));
+
+    Round(b, c, d, e, a, f2(c, d, e), k4, w0 = left(w0 ^ w13 ^ w8 ^ w2));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w1 = left(w1 ^ w14 ^ w9 ^ w3));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w2 = left(w2 ^ w15 ^ w10 ^ w4));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w3 = left(w3 ^ w0 ^ w11 ^ w5));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w4 = left(w4 ^ w1 ^ w12 ^ w6));
+    Round(b, c, d, e, a, f2(c, d, e), k4, w5 = left(w5 ^ w2 ^ w13 ^ w7));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w6 = left(w6 ^ w3 ^ w14 ^ w8));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w7 = left(w7 ^ w4 ^ w15 ^ w9));
+    Round(d, e, a, b, c, f2(e, a, b), k4, w8 = left(w8 ^ w5 ^ w0 ^ w10));
+    Round(c, d, e, a, b, f2(d, e, a), k4, w9 = left(w9 ^ w6 ^ w1 ^ w11));
+    Round(b, c, d, e, a, f2(c, d, e), k4, w10 = left(w10 ^ w7 ^ w2 ^ w12));
+    Round(a, b, c, d, e, f2(b, c, d), k4, w11 = left(w11 ^ w8 ^ w3 ^ w13));
+    Round(e, a, b, c, d, f2(a, b, c), k4, w12 = left(w12 ^ w9 ^ w4 ^ w14));
+    Round(d, e, a, b, c, f2(e, a, b), k4, left(w13 ^ w10 ^ w5 ^ w15));
+    Round(c, d, e, a, b, f2(d, e, a), k4, left(w14 ^ w11 ^ w6 ^ w0));
+    Round(b, c, d, e, a, f2(c, d, e), k4, left(w15 ^ w12 ^ w7 ^ w1));
 
     s[0] += a;
     s[1] += b;
@@ -138,18 +140,20 @@ void Transform(uint32_t *s, const unsigned char *chunk) {
     s[4] += e;
 }
 
-}  // namespace sha1
+} // namespace sha1
 
-}  // namespace
+} // namespace
 
 ////// SHA1
 
-CSHA1::CSHA1() : bytes(0) {
+CSHA1::CSHA1() : bytes(0)
+{
     sha1::Initialize(s);
 }
 
-CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
-    const unsigned char *end = data + len;
+CSHA1& CSHA1::Write(const unsigned char* data, size_t len)
+{
+    const unsigned char* end = data + len;
     size_t bufsize = bytes % 64;
     if (bufsize && bufsize + len >= 64) {
         // Fill the buffer, and process it.
@@ -173,20 +177,22 @@ CSHA1& CSHA1::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA1::Finalize(unsigned char hash[OUTPUT_SIZE]) {
+void CSHA1::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteBE64(sizedesc, bytes << 3);
     Write(pad, 1 + ((119 - (bytes % 64)) % 64));
     Write(sizedesc, 8);
     WriteBE32(hash, s[0]);
-    WriteBE32(hash+4, s[1]);
-    WriteBE32(hash+8, s[2]);
-    WriteBE32(hash+12, s[3]);
-    WriteBE32(hash+16, s[4]);
+    WriteBE32(hash + 4, s[1]);
+    WriteBE32(hash + 8, s[2]);
+    WriteBE32(hash + 12, s[3]);
+    WriteBE32(hash + 16, s[4]);
 }
 
-CSHA1& CSHA1::Reset() {
+CSHA1& CSHA1::Reset()
+{
     bytes = 0;
     sha1::Initialize(s);
     return *this;
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index b16f2c88ce7c..4fa2b333babd 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -9,7 +9,8 @@
 #include <stdlib.h>
 
 /** A hasher class for SHA1. */
-class CSHA1 {
+class CSHA1
+{
 private:
     uint32_t s[5];
     unsigned char buf[64];
@@ -19,7 +20,7 @@ class CSHA1 {
     static const size_t OUTPUT_SIZE = 20;
 
     CSHA1();
-    CSHA1& Write(const unsigned char *data, size_t len);
+    CSHA1& Write(const unsigned char* data, size_t len);
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA1& Reset();
 };
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp
index 72f191afcdd8..9a96c5125a7d 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -9,11 +9,11 @@
 #include <string.h>
 
 // Internal implementation code.
-namespace {
-
+namespace
+{
 /// Internal SHA-256 implementation.
-namespace sha256 {
-
+namespace sha256
+{
 uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
 uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
 uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
@@ -22,9 +22,8 @@ uint32_t inline sigma0(uint32_t x) { return (x >> 7 | x << 25) ^ (x >> 18 | x <<
 uint32_t inline sigma1(uint32_t x) { return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); }
 
 /** One round of SHA-256. */
-void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t &d,
-                  uint32_t e, uint32_t f, uint32_t g, uint32_t &h,
-                  uint32_t k, uint32_t w) {
+void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t& d, uint32_t e, uint32_t f, uint32_t g, uint32_t& h, uint32_t k, uint32_t w)
+{
     uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
     uint32_t t2 = Sigma0(a) + Maj(a, b, c);
     d += t1;
@@ -32,7 +31,8 @@ void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t &d,
 }
 
 /** Initialize SHA-256 state. */
-void inline Initialize(uint32_t *s) {
+void inline Initialize(uint32_t* s)
+{
     s[0] = 0x6a09e667ul;
     s[1] = 0xbb67ae85ul;
     s[2] = 0x3c6ef372ul;
@@ -44,20 +44,21 @@ void inline Initialize(uint32_t *s) {
 }
 
 /** Perform one SHA-256 transformation, processing a 64-byte chunk. */
-void Transform(uint32_t *s, const unsigned char *chunk) {
+void Transform(uint32_t* s, const unsigned char* chunk)
+{
     uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
     uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
 
-    Round(a, b, c, d, e, f, g, h, 0x428a2f98,  w0 = ReadBE32(chunk + 0));
-    Round(h, a, b, c, d, e, f, g, 0x71374491,  w1 = ReadBE32(chunk + 4));
-    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf,  w2 = ReadBE32(chunk + 8));
-    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5,  w3 = ReadBE32(chunk + 12));
-    Round(e, f, g, h, a, b, c, d, 0x3956c25b,  w4 = ReadBE32(chunk + 16));
-    Round(d, e, f, g, h, a, b, c, 0x59f111f1,  w5 = ReadBE32(chunk + 20));
-    Round(c, d, e, f, g, h, a, b, 0x923f82a4,  w6 = ReadBE32(chunk + 24));
-    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5,  w7 = ReadBE32(chunk + 28));
-    Round(a, b, c, d, e, f, g, h, 0xd807aa98,  w8 = ReadBE32(chunk + 32));
-    Round(h, a, b, c, d, e, f, g, 0x12835b01,  w9 = ReadBE32(chunk + 36));
+    Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = ReadBE32(chunk + 0));
+    Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = ReadBE32(chunk + 4));
+    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = ReadBE32(chunk + 8));
+    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = ReadBE32(chunk + 12));
+    Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = ReadBE32(chunk + 16));
+    Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = ReadBE32(chunk + 20));
+    Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = ReadBE32(chunk + 24));
+    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = ReadBE32(chunk + 28));
+    Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = ReadBE32(chunk + 32));
+    Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = ReadBE32(chunk + 36));
     Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = ReadBE32(chunk + 40));
     Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = ReadBE32(chunk + 44));
     Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = ReadBE32(chunk + 48));
@@ -65,56 +66,56 @@ void Transform(uint32_t *s, const unsigned char *chunk) {
     Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = ReadBE32(chunk + 56));
     Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = ReadBE32(chunk + 60));
 
-    Round(a, b, c, d, e, f, g, h, 0xe49b69c1,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0xefbe4786,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x240ca1cc,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x2de92c6f,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x4a7484aa,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x76f988da,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0x983e5152,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0xa831c66d,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) +  w8 + sigma0( w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x27b70a85,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0x2e1b2138,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x53380d13,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x650a7354,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x766a0abb,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x81c2c92e,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x92722c85,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0xa81a664b,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) +  w8 + sigma0( w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x19a4c116,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0x1e376c08,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x2748774c,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x391c0cb3,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x682e6ff3,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0x748f82ee,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0x78a5636f,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14  + sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15  + sigma1(w13) +  w8 + sigma0( w0));
+    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
 
     s[0] += a;
     s[1] += b;
@@ -126,11 +127,11 @@ void Transform(uint32_t *s, const unsigned char *chunk) {
     s[7] += h;
 }
 
-}  // namespace sha256
+} // namespace sha256
 
 /// Internal SHA-512 implementation.
-namespace sha512 {
-
+namespace sha512
+{
 uint64_t inline Ch(uint64_t x, uint64_t y, uint64_t z) { return z ^ (x & (y ^ z)); }
 uint64_t inline Maj(uint64_t x, uint64_t y, uint64_t z) { return (x & y) | (z & (x | y)); }
 uint64_t inline Sigma0(uint64_t x) { return (x >> 28 | x << 36) ^ (x >> 34 | x << 30) ^ (x >> 39 | x << 25); }
@@ -139,9 +140,8 @@ uint64_t inline sigma0(uint64_t x) { return (x >> 1 | x << 63) ^ (x >> 8 | x <<
 uint64_t inline sigma1(uint64_t x) { return (x >> 19 | x << 45) ^ (x >> 61 | x << 3) ^ (x >> 6); }
 
 /** One round of SHA-512. */
-void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t &d,
-                  uint64_t e, uint64_t f, uint64_t g, uint64_t &h,
-                  uint64_t k, uint64_t w) {
+void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t& d, uint64_t e, uint64_t f, uint64_t g, uint64_t& h, uint64_t k, uint64_t w)
+{
     uint64_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
     uint64_t t2 = Sigma0(a) + Maj(a, b, c);
     d += t1;
@@ -149,7 +149,8 @@ void inline Round(uint64_t a, uint64_t b, uint64_t c, uint64_t &d,
 }
 
 /** Initialize SHA-256 state. */
-void inline Initialize(uint64_t *s) {
+void inline Initialize(uint64_t* s)
+{
     s[0] = 0x6a09e667f3bcc908ull;
     s[1] = 0xbb67ae8584caa73bull;
     s[2] = 0x3c6ef372fe94f82bull;
@@ -161,20 +162,21 @@ void inline Initialize(uint64_t *s) {
 }
 
 /** Perform one SHA-512 transformation, processing a 128-byte chunk. */
-void Transform(uint64_t *s, const unsigned char *chunk) {
+void Transform(uint64_t* s, const unsigned char* chunk)
+{
     uint64_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
     uint64_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
 
-    Round(a, b, c, d, e, f, g, h, 0x428a2f98d728ae22ull,  w0 = ReadBE64(chunk + 0));
-    Round(h, a, b, c, d, e, f, g, 0x7137449123ef65cdull,  w1 = ReadBE64(chunk + 8));
-    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcfec4d3b2full,  w2 = ReadBE64(chunk + 16));
-    Round(f, g, h, a, b, c, d, e, 0xe9b5dba58189dbbcull,  w3 = ReadBE64(chunk + 24));
-    Round(e, f, g, h, a, b, c, d, 0x3956c25bf348b538ull,  w4 = ReadBE64(chunk + 32));
-    Round(d, e, f, g, h, a, b, c, 0x59f111f1b605d019ull,  w5 = ReadBE64(chunk + 40));
-    Round(c, d, e, f, g, h, a, b, 0x923f82a4af194f9bull,  w6 = ReadBE64(chunk + 48));
-    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5da6d8118ull,  w7 = ReadBE64(chunk + 56));
-    Round(a, b, c, d, e, f, g, h, 0xd807aa98a3030242ull,  w8 = ReadBE64(chunk + 64));
-    Round(h, a, b, c, d, e, f, g, 0x12835b0145706fbeull,  w9 = ReadBE64(chunk + 72));
+    Round(a, b, c, d, e, f, g, h, 0x428a2f98d728ae22ull, w0 = ReadBE64(chunk + 0));
+    Round(h, a, b, c, d, e, f, g, 0x7137449123ef65cdull, w1 = ReadBE64(chunk + 8));
+    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcfec4d3b2full, w2 = ReadBE64(chunk + 16));
+    Round(f, g, h, a, b, c, d, e, 0xe9b5dba58189dbbcull, w3 = ReadBE64(chunk + 24));
+    Round(e, f, g, h, a, b, c, d, 0x3956c25bf348b538ull, w4 = ReadBE64(chunk + 32));
+    Round(d, e, f, g, h, a, b, c, 0x59f111f1b605d019ull, w5 = ReadBE64(chunk + 40));
+    Round(c, d, e, f, g, h, a, b, 0x923f82a4af194f9bull, w6 = ReadBE64(chunk + 48));
+    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5da6d8118ull, w7 = ReadBE64(chunk + 56));
+    Round(a, b, c, d, e, f, g, h, 0xd807aa98a3030242ull, w8 = ReadBE64(chunk + 64));
+    Round(h, a, b, c, d, e, f, g, 0x12835b0145706fbeull, w9 = ReadBE64(chunk + 72));
     Round(g, h, a, b, c, d, e, f, 0x243185be4ee4b28cull, w10 = ReadBE64(chunk + 80));
     Round(f, g, h, a, b, c, d, e, 0x550c7dc3d5ffb4e2ull, w11 = ReadBE64(chunk + 88));
     Round(e, f, g, h, a, b, c, d, 0x72be5d74f27b896full, w12 = ReadBE64(chunk + 96));
@@ -182,73 +184,73 @@ void Transform(uint64_t *s, const unsigned char *chunk) {
     Round(c, d, e, f, g, h, a, b, 0x9bdc06a725c71235ull, w14 = ReadBE64(chunk + 112));
     Round(b, c, d, e, f, g, h, a, 0xc19bf174cf692694ull, w15 = ReadBE64(chunk + 120));
 
-    Round(a, b, c, d, e, f, g, h, 0xe49b69c19ef14ad2ull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0xefbe4786384f25e3ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x0fc19dc68b8cd5b5ull,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x240ca1cc77ac9c65ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x2de92c6f592b0275ull,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x4a7484aa6ea6e483ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dcbd41fbd4ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x76f988da831153b5ull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0x983e5152ee66dfabull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0xa831c66d2db43210ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xb00327c898fb213full, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xbf597fc7beef0ee4ull, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd5a79147930aa725ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0x06ca6351e003826full, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x142929670a0e6e70ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x27b70a8546d22ffcull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0x2e1b21385c26c926ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc5ac42aedull,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x53380d139d95b3dfull,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x650a73548baf63deull,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x766a0abb3c77b2a8ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x81c2c92e47edaee6ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x92722c851482353bull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a14cf10364ull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0xa81a664bbc423001ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xc24b8b70d0f89791ull, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xc76c51a30654be30ull, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd69906245565a910ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xf40e35855771202aull, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x19a4c116b8d2d0c8ull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0x1e376c085141ab53ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0x2748774cdf8eeb99ull,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5e19b48a8ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x391c0cb3c5c95a63ull,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4ae3418acbull,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f7763e373ull,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x682e6ff3d6b2b8a3ull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0x748f82ee5defb2fcull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0x78a5636f43172f60ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0x84c87814a1f0ab72ull, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0x8cc702081a6439ecull, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0x90befffa23631e28ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0xc67178f2e372532bull, w15 += sigma1(w13) +  w8 + sigma0( w0));
-
-    Round(a, b, c, d, e, f, g, h, 0xca273eceea26619cull,  w0 += sigma1(w14) +  w9 + sigma0( w1));
-    Round(h, a, b, c, d, e, f, g, 0xd186b8c721c0c207ull,  w1 += sigma1(w15) + w10 + sigma0( w2));
-    Round(g, h, a, b, c, d, e, f, 0xeada7dd6cde0eb1eull,  w2 += sigma1( w0) + w11 + sigma0( w3));
-    Round(f, g, h, a, b, c, d, e, 0xf57d4f7fee6ed178ull,  w3 += sigma1( w1) + w12 + sigma0( w4));
-    Round(e, f, g, h, a, b, c, d, 0x06f067aa72176fbaull,  w4 += sigma1( w2) + w13 + sigma0( w5));
-    Round(d, e, f, g, h, a, b, c, 0x0a637dc5a2c898a6ull,  w5 += sigma1( w3) + w14 + sigma0( w6));
-    Round(c, d, e, f, g, h, a, b, 0x113f9804bef90daeull,  w6 += sigma1( w4) + w15 + sigma0( w7));
-    Round(b, c, d, e, f, g, h, a, 0x1b710b35131c471bull,  w7 += sigma1( w5) +  w0 + sigma0( w8));
-    Round(a, b, c, d, e, f, g, h, 0x28db77f523047d84ull,  w8 += sigma1( w6) +  w1 + sigma0( w9));
-    Round(h, a, b, c, d, e, f, g, 0x32caab7b40c72493ull,  w9 += sigma1( w7) +  w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0x3c9ebe0a15c9bebcull, w10 += sigma1( w8) +  w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1( w9) +  w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) +  w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) +  w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 += sigma1(w12) +  w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 += sigma1(w13) +  w8 + sigma0( w0));
+    Round(a, b, c, d, e, f, g, h, 0xe49b69c19ef14ad2ull, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0xefbe4786384f25e3ull, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x0fc19dc68b8cd5b5ull, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x240ca1cc77ac9c65ull, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x2de92c6f592b0275ull, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4a7484aa6ea6e483ull, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dcbd41fbd4ull, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x76f988da831153b5ull, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x983e5152ee66dfabull, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa831c66d2db43210ull, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xb00327c898fb213full, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xbf597fc7beef0ee4ull, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xc6e00bf33da88fc2ull, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd5a79147930aa725ull, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x06ca6351e003826full, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x142929670a0e6e70ull, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x27b70a8546d22ffcull, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x2e1b21385c26c926ull, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc5ac42aedull, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x53380d139d95b3dfull, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x650a73548baf63deull, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x766a0abb3c77b2a8ull, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x81c2c92e47edaee6ull, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x92722c851482353bull, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a14cf10364ull, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa81a664bbc423001ull, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xc24b8b70d0f89791ull, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xc76c51a30654be30ull, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xd192e819d6ef5218ull, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd69906245565a910ull, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xf40e35855771202aull, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x106aa07032bbd1b8ull, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x19a4c116b8d2d0c8ull, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x1e376c085141ab53ull, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x2748774cdf8eeb99ull, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5e19b48a8ull, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x391c0cb3c5c95a63ull, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4ae3418acbull, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f7763e373ull, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x682e6ff3d6b2b8a3ull, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x748f82ee5defb2fcull, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0x78a5636f43172f60ull, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x84c87814a1f0ab72ull, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x8cc702081a6439ecull, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x90befffa23631e28ull, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xa4506cebde82bde9ull, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7b2c67915ull, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0xc67178f2e372532bull, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0xca273eceea26619cull, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0xd186b8c721c0c207ull, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0xeada7dd6cde0eb1eull, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0xf57d4f7fee6ed178ull, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x06f067aa72176fbaull, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x0a637dc5a2c898a6ull, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x113f9804bef90daeull, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x1b710b35131c471bull, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x28db77f523047d84ull, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0x32caab7b40c72493ull, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x3c9ebe0a15c9bebcull, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 += sigma1(w13) + w8 + sigma0(w0));
 
     s[0] += a;
     s[1] += b;
@@ -260,19 +262,21 @@ void Transform(uint64_t *s, const unsigned char *chunk) {
     s[7] += h;
 }
 
-}  // namespace sha512
+} // namespace sha512
 
-}  // namespace
+} // namespace
 
 
 ////// SHA-256
 
-CSHA256::CSHA256() : bytes(0) {
+CSHA256::CSHA256() : bytes(0)
+{
     sha256::Initialize(s);
 }
 
-CSHA256& CSHA256::Write(const unsigned char *data, size_t len) {
-    const unsigned char *end = data + len;
+CSHA256& CSHA256::Write(const unsigned char* data, size_t len)
+{
+    const unsigned char* end = data + len;
     size_t bufsize = bytes % 64;
     if (bufsize && bufsize + len >= 64) {
         // Fill the buffer, and process it.
@@ -296,23 +300,25 @@ CSHA256& CSHA256::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE]) {
+void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
     static const unsigned char pad[64] = {0x80};
     unsigned char sizedesc[8];
     WriteBE64(sizedesc, bytes << 3);
     Write(pad, 1 + ((119 - (bytes % 64)) % 64));
     Write(sizedesc, 8);
     WriteBE32(hash, s[0]);
-    WriteBE32(hash+4, s[1]);
-    WriteBE32(hash+8, s[2]);
-    WriteBE32(hash+12, s[3]);
-    WriteBE32(hash+16, s[4]);
-    WriteBE32(hash+20, s[5]);
-    WriteBE32(hash+24, s[6]);
-    WriteBE32(hash+28, s[7]);
+    WriteBE32(hash + 4, s[1]);
+    WriteBE32(hash + 8, s[2]);
+    WriteBE32(hash + 12, s[3]);
+    WriteBE32(hash + 16, s[4]);
+    WriteBE32(hash + 20, s[5]);
+    WriteBE32(hash + 24, s[6]);
+    WriteBE32(hash + 28, s[7]);
 }
 
-CSHA256& CSHA256::Reset() {
+CSHA256& CSHA256::Reset()
+{
     bytes = 0;
     sha256::Initialize(s);
     return *this;
@@ -320,12 +326,14 @@ CSHA256& CSHA256::Reset() {
 
 ////// SHA-512
 
-CSHA512::CSHA512() : bytes(0) {
+CSHA512::CSHA512() : bytes(0)
+{
     sha512::Initialize(s);
 }
 
-CSHA512& CSHA512::Write(const unsigned char *data, size_t len) {
-    const unsigned char *end = data + len;
+CSHA512& CSHA512::Write(const unsigned char* data, size_t len)
+{
+    const unsigned char* end = data + len;
     size_t bufsize = bytes % 128;
     if (bufsize && bufsize + len >= 128) {
         // Fill the buffer, and process it.
@@ -349,23 +357,25 @@ CSHA512& CSHA512::Write(const unsigned char *data, size_t len) {
     return *this;
 }
 
-void CSHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) {
+void CSHA512::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
     static const unsigned char pad[128] = {0x80};
     unsigned char sizedesc[16] = {0x00};
-    WriteBE64(sizedesc+8, bytes << 3);
+    WriteBE64(sizedesc + 8, bytes << 3);
     Write(pad, 1 + ((239 - (bytes % 128)) % 128));
     Write(sizedesc, 16);
     WriteBE64(hash, s[0]);
-    WriteBE64(hash+8, s[1]);
-    WriteBE64(hash+16, s[2]);
-    WriteBE64(hash+24, s[3]);
-    WriteBE64(hash+32, s[4]);
-    WriteBE64(hash+40, s[5]);
-    WriteBE64(hash+48, s[6]);
-    WriteBE64(hash+56, s[7]);
+    WriteBE64(hash + 8, s[1]);
+    WriteBE64(hash + 16, s[2]);
+    WriteBE64(hash + 24, s[3]);
+    WriteBE64(hash + 32, s[4]);
+    WriteBE64(hash + 40, s[5]);
+    WriteBE64(hash + 48, s[6]);
+    WriteBE64(hash + 56, s[7]);
 }
 
-CSHA512& CSHA512::Reset() {
+CSHA512& CSHA512::Reset()
+{
     bytes = 0;
     sha512::Initialize(s);
     return *this;
@@ -373,7 +383,8 @@ CSHA512& CSHA512::Reset() {
 
 ////// HMAC-SHA-512
 
-CHMAC_SHA512::CHMAC_SHA512(const unsigned char *key, size_t keylen) {
+CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen)
+{
     unsigned char rkey[128];
     if (keylen <= 128) {
         memcpy(rkey, key, keylen);
@@ -383,16 +394,17 @@ CHMAC_SHA512::CHMAC_SHA512(const unsigned char *key, size_t keylen) {
         memset(rkey + 64, 0, 64);
     }
 
-    for (int n=0; n<128; n++)
+    for (int n = 0; n < 128; n++)
         rkey[n] ^= 0x5c;
     outer.Write(rkey, 128);
 
-    for (int n=0; n<128; n++)
+    for (int n = 0; n < 128; n++)
         rkey[n] ^= 0x5c ^ 0x36;
     inner.Write(rkey, 128);
 }
 
-void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE]) {
+void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
     unsigned char temp[64];
     inner.Finalize(temp);
     outer.Write(temp, 64).Finalize(hash);
diff --git a/src/crypto/sha2.h b/src/crypto/sha2.h
index 088d5e194c73..15ad5ac3830f 100644
--- a/src/crypto/sha2.h
+++ b/src/crypto/sha2.h
@@ -9,7 +9,8 @@
 #include <stdlib.h>
 
 /** A hasher class for SHA-256. */
-class CSHA256 {
+class CSHA256
+{
 private:
     uint32_t s[8];
     unsigned char buf[64];
@@ -19,13 +20,14 @@ class CSHA256 {
     static const size_t OUTPUT_SIZE = 32;
 
     CSHA256();
-    CSHA256& Write(const unsigned char *data, size_t len);
+    CSHA256& Write(const unsigned char* data, size_t len);
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA256& Reset();
 };
 
 /** A hasher class for SHA-512. */
-class CSHA512 {
+class CSHA512
+{
 private:
     uint64_t s[8];
     unsigned char buf[128];
@@ -35,13 +37,14 @@ class CSHA512 {
     static const size_t OUTPUT_SIZE = 64;
 
     CSHA512();
-    CSHA512& Write(const unsigned char *data, size_t len);
+    CSHA512& Write(const unsigned char* data, size_t len);
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
     CSHA512& Reset();
 };
 
 /** A hasher class for HMAC-SHA-512. */
-class CHMAC_SHA512 {
+class CHMAC_SHA512
+{
 private:
     CSHA512 outer;
     CSHA512 inner;
@@ -49,8 +52,9 @@ class CHMAC_SHA512 {
 public:
     static const size_t OUTPUT_SIZE = 64;
 
-    CHMAC_SHA512(const unsigned char *key, size_t keylen);
-    CHMAC_SHA512& Write(const unsigned char *data, size_t len) {
+    CHMAC_SHA512(const unsigned char* key, size_t keylen);
+    CHMAC_SHA512& Write(const unsigned char* data, size_t len)
+    {
         inner.Write(data, len);
         return *this;
     }

From e6beedc496093d98ba40500fd12bcb191c87bf6e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 22 Sep 2014 14:41:54 +0200
Subject: [PATCH 0750/1819] [Qt] add more NULL pointer checks in bitcoingui

- add missing checks for clientModel and optionsModel
- small cleanups for an #ifdef on Mac
- remove an unneeded else
---
 src/qt/bitcoingui.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index dd5192982ee2..443bed14d706 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -662,6 +662,9 @@ void BitcoinGUI::setNumConnections(int count)
 
 void BitcoinGUI::setNumBlocks(int count)
 {
+    if(!clientModel)
+        return;
+
     // Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
     statusBar()->clearMessage();
 
@@ -832,7 +835,7 @@ void BitcoinGUI::changeEvent(QEvent *e)
 #ifndef Q_OS_MAC // Ignored on Mac
     if(e->type() == QEvent::WindowStateChange)
     {
-        if(clientModel && clientModel->getOptionsModel()->getMinimizeToTray())
+        if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray())
         {
             QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e);
             if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
@@ -847,16 +850,16 @@ void BitcoinGUI::changeEvent(QEvent *e)
 
 void BitcoinGUI::closeEvent(QCloseEvent *event)
 {
-    if(clientModel)
-    {
 #ifndef Q_OS_MAC // Ignored on Mac
+    if(clientModel && clientModel->getOptionsModel())
+    {
         if(!clientModel->getOptionsModel()->getMinimizeToTray() &&
            !clientModel->getOptionsModel()->getMinimizeOnClose())
         {
             QApplication::quit();
         }
-#endif
     }
+#endif
     QMainWindow::closeEvent(event);
 }
 
@@ -917,8 +920,7 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
         gotoSendCoinsPage();
         return true;
     }
-    else
-        return false;
+    return false;
 }
 
 void BitcoinGUI::setEncryptionStatus(int status)

From ff36cbe8d010bd17d7d8fe2ba9293864833884e2 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Sun, 14 Sep 2014 21:54:32 -0400
Subject: [PATCH 0751/1819] RPC getnetworkinfo: export local node's client
 sub-version string

---
 src/rpcnet.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 95f42eb47f73..fb159d96f6af 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -11,6 +11,7 @@
 #include "sync.h"
 #include "timedata.h"
 #include "util.h"
+#include "version.h"
 
 #include <boost/foreach.hpp>
 
@@ -393,6 +394,8 @@ Value getnetworkinfo(const Array& params, bool fHelp)
 
     Object obj;
     obj.push_back(Pair("version",       (int)CLIENT_VERSION));
+    obj.push_back(Pair("subversion",
+        FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>())));
     obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
     obj.push_back(Pair("localservices",       strprintf("%016x", nLocalServices)));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));

From 346d5443f1b12a14fca90cc3ccbfa6ce94798aae Mon Sep 17 00:00:00 2001
From: Janusz Lenar <malleor@users.noreply.github.com>
Date: Sun, 14 Sep 2014 14:09:13 +0200
Subject: [PATCH 0752/1819] Fixed the broken `brew` shell command

---
 doc/build-osx.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index 5eeda5b08ebd..0364d3a01b50 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -50,7 +50,7 @@ Running this command takes you into brew's interactive mode, which allows you to
 $ brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java 
 ```
 
-These rest of these commands are run inside brew interactive mode:
+The rest of these commands are run inside brew interactive mode:
 ```
 /private/tmp/berkeley-db4-UGpd0O/db-4.8.30 $ cd ..
 /private/tmp/berkeley-db4-UGpd0O $ db-4.8.30/dist/configure --prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
@@ -61,7 +61,7 @@ These rest of these commands are run inside brew interactive mode:
 
 After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to `/usr/local`.  You don't need it to link it to build bitcoin, but if you want to, here's how:
 
-    $ brew --force link berkeley-db4
+    $ brew link --force berkeley-db4
 
 
 ### Building `bitcoind`

From 219372f1dd504b0e187da88e3c0adf25a7e6b8d2 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Tue, 23 Sep 2014 13:30:27 -0400
Subject: [PATCH 0753/1819] script: Fix reference into empty vector run time
 exception

Edit by laanwj: `begin_ptr(sourcedata) + sourcedata.size()` -> `end_ptr(sourcedata)`
---
 src/script/interpreter.cpp | 12 ++++++------
 src/test/base58_tests.cpp  |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index fd3e4f1ff76a..d742fb9eb9e5 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -637,19 +637,19 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     valtype& vch = stacktop(-1);
                     valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
                     if (opcode == OP_RIPEMD160)
-                        CRIPEMD160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                        CRIPEMD160().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
                     else if (opcode == OP_SHA1)
-                        CSHA1().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                        CSHA1().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
                     else if (opcode == OP_SHA256)
-                        CSHA256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                        CSHA256().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
                     else if (opcode == OP_HASH160)
-                        CHash160().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                        CHash160().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
                     else if (opcode == OP_HASH256)
-                        CHash256().Write(&vch[0], vch.size()).Finalize(&vchHash[0]);
+                        CHash256().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
                     popstack(stack);
                     stack.push_back(vchHash);
                 }
-                break;
+                break;                                   
 
                 case OP_CODESEPARATOR:
                 {
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index fe68e9e9744f..58fffb6df40c 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -40,7 +40,7 @@ BOOST_AUTO_TEST_CASE(base58_EncodeBase58)
         std::vector<unsigned char> sourcedata = ParseHex(test[0].get_str());
         std::string base58string = test[1].get_str();
         BOOST_CHECK_MESSAGE(
-                    EncodeBase58(&sourcedata[0], &sourcedata[sourcedata.size()]) == base58string,
+                    EncodeBase58(begin_ptr(sourcedata), end_ptr(sourcedata)) == base58string,
                     strTest);
     }
 }

From d14d7deff0a93d81946abec671dc47c967c9b027 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 25 Sep 2014 12:42:51 +0200
Subject: [PATCH 0754/1819] SanitizeString: allow '(' and ')'

'(' and ')' are valid in user agent strings, so should be reported
as such in RPC `getpeerinfo`.

Fixes #4537.
---
 src/utilstrencodings.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index 2cec3023b53b..b9e64c5fe10c 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -16,7 +16,7 @@ using namespace std;
 
 // safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
 // even possibly remotely dangerous like & or >
-static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@");
+static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
 string SanitizeString(const string& str)
 {
     string strResult;

From 20a11ffabf0c6936ab2dbb7cfda676996318650a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 25 Sep 2014 09:03:30 +0200
Subject: [PATCH 0755/1819] minor variable init changes in init.cpp

- explicit init of pcoinsdbview and pwalletMain (even if not needed, as
  globals are init to NULL, it seems cleaner)
- remove check if (pwalletMain) in Shutdown() as delete is valid even if
  pwalletMain is NULL
---
 src/init.cpp | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 7299bd0f4a73..87b5ae7a44d8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -45,7 +45,7 @@ using namespace boost;
 using namespace std;
 
 #ifdef ENABLE_WALLET
-CWallet* pwalletMain;
+CWallet* pwalletMain = NULL;
 #endif
 
 #ifdef WIN32
@@ -109,7 +109,7 @@ bool ShutdownRequested()
     return fRequestShutdown;
 }
 
-static CCoinsViewDB *pcoinsdbview;
+static CCoinsViewDB *pcoinsdbview = NULL;
 
 void Shutdown()
 {
@@ -165,8 +165,8 @@ void Shutdown()
 #endif
     UnregisterAllWallets();
 #ifdef ENABLE_WALLET
-    if (pwalletMain)
-        delete pwalletMain;
+    delete pwalletMain;
+    pwalletMain = NULL;
 #endif
     LogPrintf("%s: done\n", __func__);
 }
@@ -701,6 +701,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
 
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
+
     // Sanity check
     if (!InitSanityCheck())
         return InitError(_("Initialization sanity check failed. Bitcoin Core is shutting down."));

From 1e7350486582fafc651d07a43d209d30eaaef1d7 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Tue, 2 Sep 2014 17:36:45 -0400
Subject: [PATCH 0756/1819] Fixing C4146 warning

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
---
 src/script/script.h | 2 +-
 src/util.cpp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/script/script.h b/src/script/script.h
index 4c9ac74b78b1..4aea439e0143 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -304,7 +304,7 @@ class CScriptNum
       // If the input vector's most significant byte is 0x80, remove it from
       // the result's msb and return a negative.
       if (vch.back() & 0x80)
-          return -(result & ~(0x80ULL << (8 * (vch.size() - 1))));
+          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
 
       return result;
     }
diff --git a/src/util.cpp b/src/util.cpp
index f387fce8c7b5..632d0965bf4e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -618,7 +618,7 @@ void ShrinkDebugFile()
     {
         // Restart the file with some of the end
         std::vector <char> vch(200000,0);
-        fseek(file, -vch.size(), SEEK_END);
+        fseek(file, -((long)vch.size()), SEEK_END);
         int nBytes = fread(begin_ptr(vch), 1, vch.size(), file);
         fclose(file);
 

From 2027ad30e7b436b1341a0013398732c10f880bb9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 16:59:03 -0400
Subject: [PATCH 0757/1819] depends: add the debug/release concept to depends

---
 depends/Makefile         | 14 ++++++--
 depends/config.site.in   |  3 ++
 depends/funcs.mk         | 71 ++++++++++++++++++++++------------------
 depends/hosts/default.mk |  5 ++-
 4 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/depends/Makefile b/depends/Makefile
index f5fb5b865f46..fc763bedeb5f 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -22,6 +22,12 @@ host:=$(HOST)
 host_toolchain:=$(HOST)-
 endif
 
+ifneq ($(DEBUG),)
+release_type=debug
+else
+release_type=release
+endif
+
 base_build_dir=$(BASEDIR)/work/build
 base_staging_dir=$(BASEDIR)/work/staging
 canonical_host:=$(shell ./config.sub $(HOST))
@@ -103,12 +109,14 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
             -e 's|@STRIP@|$(toolchain_path)$(host_STRIP)|' \
             -e 's|@build_os@|$(build_os)|' \
             -e 's|@host_os@|$(host_os)|' \
-            -e 's|@CFLAGS@|$(host_CFLAGS)|' \
-            -e 's|@CXXFLAGS@|$(host_CXXFLAGS)|' \
-            -e 's|@LDFLAGS@|$(host_LDFLAGS)|' \
+            -e 's|@CFLAGS@|$(strip $(host_CFLAGS) $(host_$(release_type)_CFLAGS))|' \
+            -e 's|@CXXFLAGS@|$(strip $(host_CXXFLAGS) $(host_$(release_type)_CXXFLAGS))|' \
+            -e 's|@CPPFLAGS@|$(strip $(host_CPPFLAGS) $(host_$(release_type)_CPPFLAGS))|' \
+            -e 's|@LDFLAGS@|$(strip $(host_LDFLAGS) $(host_$(release_type)_LDFLAGS))|' \
             -e 's|@no_qt@|$(NO_QT)|' \
             -e 's|@no_wallet@|$(NO_WALLET)|' \
             -e 's|@no_upnp@|$(NO_UPNP)|' \
+            -e 's|@debug@|$(DEBUG)|' \
             $< > $@
 	$(AT)touch $@
 
diff --git a/depends/config.site.in b/depends/config.site.in
index 1df04eec3f2c..abd814ea6539 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -81,4 +81,7 @@ fi
 if test -n "@CXXFLAGS@"; then
   export CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
 fi
+if test -n "@CPPFLAGS@"; then
+  export CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
+fi
 export LDFLAGS="-L$prefix/lib @LDFLAGS@ $LDFLAGS"
diff --git a/depends/funcs.mk b/depends/funcs.mk
index 28bfb8549238..c1fc0a0e3316 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -8,10 +8,10 @@ $(1)_ar=$($($(1)_type)_AR)
 $(1)_ranlib=$($($(1)_type)_RANLIB)
 $(1)_libtool=$($($(1)_type)_LIBTOOL)
 $(1)_nm=$($($(1)_type)_NM)
-$(1)_cflags=$($($(1)_type)_CFLAGS)
-$(1)_cxxflags=$($($(1)_type)_CXXFLAGS)
-$(1)_ldflags=$($($(1)_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
-$(1)_cppflags:=-I$($($(1)_type)_prefix)/include
+$(1)_cflags=$($($(1)_type)_CFLAGS) $($($(1)_type)_$(release_type)_CFLAGS)
+$(1)_cxxflags=$($($(1)_type)_CXXFLAGS) $($($(1)_type)_$(release_type)_CXXFLAGS)
+$(1)_ldflags=$($($(1)_type)_LDFLAGS) $($($(1)_type)_$(release_type)_LDFLAGS) -L$($($(1)_type)_prefix)/lib
+$(1)_cppflags=$($($(1)_type)_CPPFLAGS) $($($(1)_type)_$(release_type)_CPPFLAGS) -I$($($(1)_type)_prefix)/include
 $(1)_recipe_hash:=
 endef
 
@@ -38,7 +38,7 @@ define int_get_build_id
 $(eval $(1)_dependencies += $($(1)_$(host_arch)_$(host_os)_dependencies) $($(1)_$(host_os)_dependencies))
 $(eval $(1)_all_dependencies:=$(call int_get_all_dependencies,$(1),$($($(1)_type)_native_toolchain) $($(1)_dependencies)))
 $(foreach dep,$($(1)_all_dependencies),$(eval $(1)_build_id_deps+=$(dep)-$($(dep)_version)-$($(dep)_recipe_hash)))
-$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash) $($(1)_build_id_deps))
+$(eval $(1)_build_id_long:=$(1)-$($(1)_version)-$($(1)_recipe_hash)-$(release_type) $($(1)_build_id_deps))
 $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SUM) | cut -c-$(HASH_LENGTH)))
 final_build_id_long+=$($(package)_build_id_long)
 
@@ -83,33 +83,40 @@ endef
 
 define int_config_attach_build_config
 $(eval $(call $(1)_set_vars,$(1)))
-$(1)_cflags+=$($(1)_cflags_$(host_arch))
-$(1)_cflags+=$($(1)_cflags_$(host_os))
-$(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os))
-
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch))
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_os))
-$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os))
-
-$(1)_cppflags+=$($(1)_cppflags_$(host_arch))
-$(1)_cppflags+=$($(1)_cppflags_$(host_os))
-$(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os))
-
-$(1)_ldflags+=$($(1)_ldflags_$(host_arch))
-$(1)_ldflags+=$($(1)_ldflags_$(host_os))
-$(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os))
-
-$(1)_build_opts+=$$($(1)_build_opts_$(host_arch))
-$(1)_build_opts+=$$($(1)_build_opts_$(host_os))
-$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os))
-
-$(1)_config_opts+=$$($(1)_config_opts_$(host_arch))
-$(1)_config_opts+=$$($(1)_config_opts_$(host_os))
-$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os))
-
-$(1)_config_env+=$($(1)_config_env_$(host_arch))
-$(1)_config_env+=$($(1)_config_env_$(host_os))
-$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os))
+$(1)_cflags+=$($(1)_cflags_$(release_type))
+$(1)_cflags+=$($(1)_cflags_$(host_arch)) $($(1)_cflags_$(host_arch)_$(release_type))
+$(1)_cflags+=$($(1)_cflags_$(host_os)) $($(1)_cflags_$(host_os)_$(release_type))
+$(1)_cflags+=$($(1)_cflags_$(host_arch)_$(host_os)) $($(1)_cflags_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_cxxflags+=$($(1)_cxxflags_$(release_type))
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)) $($(1)_cxxflags_$(host_arch)_$(release_type))
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_os)) $($(1)_cxxflags_$(host_os)_$(release_type))
+$(1)_cxxflags+=$($(1)_cxxflags_$(host_arch)_$(host_os)) $($(1)_cxxflags_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_cppflags+=$($(1)_cppflags_$(release_type))
+$(1)_cppflags+=$($(1)_cppflags_$(host_arch)) $($(1)_cppflags_$(host_arch)_$(release_type))
+$(1)_cppflags+=$($(1)_cppflags_$(host_os)) $($(1)_cppflags_$(host_os)_$(release_type))
+$(1)_cppflags+=$($(1)_cppflags_$(host_arch)_$(host_os)) $($(1)_cppflags_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_ldflags+=$($(1)_ldflags_$(release_type))
+$(1)_ldflags+=$($(1)_ldflags_$(host_arch)) $($(1)_ldflags_$(host_arch)_$(release_type))
+$(1)_ldflags+=$($(1)_ldflags_$(host_os)) $($(1)_ldflags_$(host_os)_$(release_type))
+$(1)_ldflags+=$($(1)_ldflags_$(host_arch)_$(host_os)) $($(1)_ldflags_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_build_opts+=$$($(1)_build_opts_$(release_type))
+$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)) $$($(1)_build_opts_$(host_arch)_$(release_type))
+$(1)_build_opts+=$$($(1)_build_opts_$(host_os)) $$($(1)_build_opts_$(host_os)_$(release_type))
+$(1)_build_opts+=$$($(1)_build_opts_$(host_arch)_$(host_os)) $$($(1)_build_opts_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_config_opts+=$$($(1)_config_opts_$(release_type))
+$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)) $$($(1)_config_opts_$(host_arch)_$(release_type))
+$(1)_config_opts+=$$($(1)_config_opts_$(host_os)) $$($(1)_config_opts_$(host_os)_$(release_type))
+$(1)_config_opts+=$$($(1)_config_opts_$(host_arch)_$(host_os)) $$($(1)_config_opts_$(host_arch)_$(host_os)_$(release_type))
+
+$(1)_config_env+=$$($(1)_config_env_$(release_type))
+$(1)_config_env+=$($(1)_config_env_$(host_arch)) $($(1)_config_env_$(host_arch)_$(release_type))
+$(1)_config_env+=$($(1)_config_env_$(host_os)) $($(1)_config_env_$(host_os)_$(release_type))
+$(1)_config_env+=$($(1)_config_env_$(host_arch)_$(host_os)) $($(1)_config_env_$(host_arch)_$(host_os)_$(release_type))
 
 $(1)_config_env+=PKG_CONFIG_LIBDIR=$($($(1)_type)_prefix)/lib/pkgconfig
 $(1)_config_env+=PKG_CONFIG_PATH=$($($(1)_type)_prefix)/share/pkgconfig
diff --git a/depends/hosts/default.mk b/depends/hosts/default.mk
index b9fe5d858a79..6f60d6b3fd00 100644
--- a/depends/hosts/default.mk
+++ b/depends/hosts/default.mk
@@ -11,13 +11,16 @@ default_host_NM = $(host_toolchain)nm
 define add_host_tool_func
 $(host_os)_$1?=$$(default_host_$1)
 $(host_arch)_$(host_os)_$1?=$$($(host_os)_$1)
+$(host_arch)_$(host_os)_$(release_type)_$1?=$$($(host_os)_$1)
 host_$1=$$($(host_arch)_$(host_os)_$1)
 endef
 
 define add_host_flags_func
 $(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
+$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
 host_$1 = $$($(host_arch)_$(host_os)_$1)
+host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
 endef
 
 $(foreach tool,CC CXX AR RANLIB STRIP NM LIBTOOL OTOOL INSTALL_NAME_TOOL,$(eval $(call add_host_tool_func,$(tool))))
-$(foreach flags,CFLAGS CXXFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))
+$(foreach flags,CFLAGS CXXFLAGS CPPFLAGS LDFLAGS, $(eval $(call add_host_flags_func,$(flags))))

From f3973040028d6a7335a3265fa0e13b599b2fac3d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:00:31 -0400
Subject: [PATCH 0758/1819] depends: add debug/release flags for linux/osx/win

Linux and mingw enable libstdc++ debugging for extra runtime checks. OSX
doesn't play nice, so don't enable it there.
---
 depends/hosts/darwin.mk  | 10 +++++++++-
 depends/hosts/linux.mk   | 10 +++++++++-
 depends/hosts/mingw32.mk | 10 +++++++++-
 3 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index 9e2415655e20..8d718eba17be 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -3,6 +3,14 @@ OSX_SDK_VERSION=10.7
 OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
 darwin_CC=clang -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
 darwin_CXX=clang++ -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysroot $(OSX_SDK)
-darwin_CFLAGS=-pipe -O2
+
+darwin_CFLAGS=-pipe
 darwin_CXXFLAGS=$(darwin_CFLAGS)
+
+darwin_release_CFLAGS=-O2
+darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
+
+darwin_debug_CFLAGS=-O1
+darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)
+
 darwin_native_toolchain=native_cctools
diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk
index 194d71d55765..b13a0f1ad714 100644
--- a/depends/hosts/linux.mk
+++ b/depends/hosts/linux.mk
@@ -1,6 +1,14 @@
-linux_CFLAGS=-pipe -O2
+linux_CFLAGS=-pipe
 linux_CXXFLAGS=$(linux_CFLAGS)
 
+linux_release_CFLAGS=-O2
+linux_release_CXXFLAGS=$(linux_release_CFLAGS)
+
+linux_debug_CFLAGS=-O1
+linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
+
+linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC
+
 ifeq (86,$(findstring 86,$(build_arch)))
 i686_linux_CC=gcc -m32
 i686_linux_CXX=g++ -m32
diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk
index ffe4a5584239..dbfb62fdcf98 100644
--- a/depends/hosts/mingw32.mk
+++ b/depends/hosts/mingw32.mk
@@ -1,2 +1,10 @@
-mingw32_CFLAGS=-pipe -O2
+mingw32_CFLAGS=-pipe
 mingw32_CXXFLAGS=$(mingw32_CFLAGS)
+
+mingw32_release_CFLAGS=-O2
+mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
+
+mingw32_debug_CFLAGS=-O1
+mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
+
+mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC

From 7e99df78c4e9f93f2f31298c00bb5568bfd42a43 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:02:22 -0400
Subject: [PATCH 0759/1819] depends: make sure openssl sees cppflags

---
 depends/packages/openssl.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index b1dcc6f81fa5..3ccdaf6f2fb4 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -9,7 +9,7 @@ $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$(
 $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl no-zlib no-shared no-dso
 $(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2
 $(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl3
-$(package)_config_opts+=$($(package)_cflags)
+$(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
 $(package)_config_opts_x86_64_linux=-fPIC linux-x86_64
 $(package)_config_opts_arm_linux=-fPIC linux-generic32
 $(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc

From 3b63df5fac7c65c87036aec2bdf8130b74873577 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:03:09 -0400
Subject: [PATCH 0760/1819] depends: boost: build for debug or release as
 requested

Also hook up cppflags there, which was missing before.
---
 depends/packages/boost.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index a3cacbcbb6f8..98ed3de77270 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -6,8 +6,10 @@ $(package)_sha256_hash=fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7
 $(package)_patches=darwin_boost_atomic-1.patch darwin_boost_atomic-2.patch
 
 define $(package)_set_vars
+$(package)_config_opts_release=variant=release
+$(package)_config_opts_debug=variant=debug
 $(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
-$(package)_config_opts+=variant=release threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
+$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
 $(package)_config_opts_linux=threadapi=pthread runtime-link=shared
 $(package)_config_opts_darwin=--toolset=darwin-4.2.1 runtime-link=shared
 $(package)_config_opts_mingw32=binary-format=pe target-os=windows threadapi=win32 runtime-link=static
@@ -26,7 +28,7 @@ endef
 define $(package)_preprocess_cmds
   patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-1.patch && \
   patch -p2 < $($(package)_patch_dir)/darwin_boost_atomic-2.patch && \
-  echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\"  <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
+  echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\"  <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
 endef
 
 define $(package)_config_cmds

From 1d154db4570a523362366ba5698b9692edc998a2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:41:42 -0400
Subject: [PATCH 0761/1819] depends: teach qt to honor debug/release

This means it also needs to honor our flags, so patch them in as necessary.
---
 depends/packages/qt.mk | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index e719e2e506c4..5fbab57dd422 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -10,8 +10,9 @@ $(package)_qt_libs=corelib network widgets gui plugins testlib
 $(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch
 
 define $(package)_set_vars
-$(package)_config_opts  = -release -opensource -confirm-license
-$(package)_config_opts += -no-audio-backend -no-sql-tds -no-glib -no-icu
+$(package)_config_opts_release = -release
+$(package)_config_opts_debug   = -debug
+$(package)_config_opts += -opensource -confirm-license -no-audio-backend -no-sql-tds -no-glib -no-icu
 $(package)_config_opts += -no-cups -no-iconv -no-gif -no-audio-backend -no-freetype
 $(package)_config_opts += -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch
 $(package)_config_opts += -no-gif -no-feature-style-plastique
@@ -53,7 +54,13 @@ define $(package)_preprocess_cmds
   cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
   cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
   patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
-  patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch
+  patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch && \
+  echo "QMAKE_CFLAGS     += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+  echo "QMAKE_CXXFLAGS   += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+  echo "QMAKE_LFLAGS     += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
+  sed -i.old "s|QMAKE_CFLAGS            = |QMAKE_CFLAGS            = $($(package)_cflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
+  sed -i.old "s|QMAKE_LFLAGS            = |QMAKE_LFLAGS            = $($(package)_ldflags) |" qtbase/mkspecs/win32-g++/qmake.conf && \
+  sed -i.old "s|QMAKE_CXXFLAGS          = |QMAKE_CXXFLAGS            = $($(package)_cxxflags) $($(package)_cppflags) |" qtbase/mkspecs/win32-g++/qmake.conf
 endef
 
 define $(package)_config_cmds

From b1efba82982ea9e120ced226bdbff6402bc99f64 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 19:27:57 -0400
Subject: [PATCH 0762/1819] depends: give miniupnpc cppflags

---
 depends/packages/miniupnpc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/miniupnpc.mk b/depends/packages/miniupnpc.mk
index 30f2d3f31588..00101f1b91af 100644
--- a/depends/packages/miniupnpc.mk
+++ b/depends/packages/miniupnpc.mk
@@ -8,7 +8,7 @@ define $(package)_set_vars
 $(package)_build_opts=CC="$($(package)_cc)"
 $(package)_build_opts_darwin=OS=Darwin
 $(package)_build_opts_mingw32=-f Makefile.mingw
-$(package)_build_env+=CFLAGS="$($(package)_cflags)" AR="$($(package)_ar)"
+$(package)_build_env+=CFLAGS="$($(package)_cflags) $($(package)_cppflags)" AR="$($(package)_ar)"
 endef
 
 define $(package)_preprocess_cmds

From dc66ff53b4b4d31fda4ec4ee500a6a8f98bae6ac Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:52:43 -0400
Subject: [PATCH 0763/1819] depends: make LDFLAGS act like the other flags

---
 depends/config.site.in | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/depends/config.site.in b/depends/config.site.in
index abd814ea6539..c80c3e8f20a1 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -52,7 +52,9 @@ export PATH=$prefix/native/bin:$PATH
 export PKG_CONFIG="`which pkg-config` --static"
 export PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
 export PKG_CONFIG_PATH=$prefix/share/pkgconfig
+
 export CPPFLAGS="-I$prefix/include/ $CPPFLAGS"
+export LDFLAGS="-L$prefix/lib $LDFLAGS"
 
 export CC="@CC@"
 export CXX="@CXX@"
@@ -84,4 +86,6 @@ fi
 if test -n "@CPPFLAGS@"; then
   export CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
 fi
-export LDFLAGS="-L$prefix/lib @LDFLAGS@ $LDFLAGS"
+if test -n "@LDFLAGS@"; then
+  export LDFLAGS="@LDFLAGS@ $LDFLAGS"
+fi

From 1f7fff2beea20c3f1bf5a4496f81cb9be9e0e07e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 17:51:10 -0400
Subject: [PATCH 0764/1819] depends: add docs for debug

---
 depends/README.packages | 12 ++++++++++++
 depends/README.usage    |  1 +
 2 files changed, 13 insertions(+)

diff --git a/depends/README.packages b/depends/README.packages
index c35abfbdc1ea..5ab7ed7dee00 100644
--- a/depends/README.packages
+++ b/depends/README.packages
@@ -65,10 +65,22 @@ These variables may be set to override or append their default values.
   $(package)_config_env
   $(package)_build_env
   $(package)_stage_env
+  $(package)_build_opts
+  $(package)_config_opts
 
 The *_env variables are used to add environment variables to the respective
 commands.
 
+Many variables respect a debug/release suffix as well, in order to use them for
+only the appropriate build config. For example:
+  $(package)_cflags_release = -O3
+  $(package)_cflags_i686_debug = -g
+  $(package)_config_opts_release = --disable-debug
+
+These will be used in addition to the options that do not specify
+debug/release. All builds are considered to be release unless DEBUG=1 is set by
+the user.
+
 Other variables may be defined as needed.
 
 Build commands:
diff --git a/depends/README.usage b/depends/README.usage
index 0aacefbf94ce..d3c57956f19e 100644
--- a/depends/README.usage
+++ b/depends/README.usage
@@ -22,6 +22,7 @@ FALLBACK_DOWNLOAD_PATH: If a source file can't be fetched, try here before givin
 NO_QT: Don't download/build/cache qt and its dependencies
 NO_WALLET: Don't download/build/cache libs needed to enable the wallet
 NO_UPNP: Don't download/build/cache packages needed for enabling upnp
+DEBUG: disable some optimizations and enable more runtime checking
 
 If some packages are not built, for example 'make NO_WALLET=1', the appropriate
 options will be passed to bitcoin's configure. In this case, --disable-wallet.

From 00522cd45b7c093975a7684876b26abeced58da9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 18:18:03 -0400
Subject: [PATCH 0765/1819] depends: disable reduced exports for debug builds

Some debug options may not be compatible.
---
 depends/config.site.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/depends/config.site.in b/depends/config.site.in
index c80c3e8f20a1..3426050cd3e8 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -77,6 +77,10 @@ if test -n "@NM@"; then
   ac_cv_path_ac_pt_NM=${NM}
 fi
 
+if test -n "@debug@"; then
+  enable_reduce_exports=no
+fi
+
 if test -n "@CFLAGS@"; then
   export CFLAGS="@CFLAGS@ $CFLAGS"
 fi

From a94496fbb672fce43b66f56ed0bbd69a560d5654 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 16:53:34 -0400
Subject: [PATCH 0766/1819] tests: don't split an empty string

---
 src/test/getarg_tests.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index 8cadcdd71622..8a984304f4e6 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -16,7 +16,8 @@ BOOST_AUTO_TEST_SUITE(getarg_tests)
 static void ResetArgs(const std::string& strArg)
 {
     std::vector<std::string> vecArg;
-    boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
+    if (strArg.size())
+      boost::split(vecArg, strArg, boost::is_space(), boost::token_compress_on);
 
     // Insert dummy executable name:
     vecArg.insert(vecArg.begin(), "testbitcoin");

From be6d87aa60c1aca886b557901a493119c2aac024 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 16:53:58 -0400
Subject: [PATCH 0767/1819] script: don't read past the end

---
 src/script/interpreter.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index d742fb9eb9e5..a71f55dd2684 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -839,7 +839,8 @@ class CTransactionSignatureSerializer {
                 itBegin = it;
             }
         }
-        s.write((char*)&itBegin[0], it-itBegin);
+        if (itBegin != scriptCode.end())
+            s.write((char*)&itBegin[0], it-itBegin);
     }
 
     /** Serialize an input of txTo */

From 93e24dddf3b7063a157b414c07e08ac7f31eaf03 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Sep 2014 18:19:09 -0400
Subject: [PATCH 0768/1819] travis: use debug for one build

For the all-off build, enable the wallet and debug. This ensures that debug
options will catch wallet problems as well.

In order to make sure the no-wallet path is still tested, disable the wallet
in the other x86_64 build.
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 54799362a23e..155ac012d89d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,9 +27,9 @@ matrix:
     - compiler: "true 1"
       env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 2"
-      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_WALLET=1 NO_UPNP=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
+      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
     - compiler: "true 3"
-      env: HOST=x86_64-unknown-linux-gnu RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 4"
       env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 5"

From 27c3e91014d65091b096b97680b95d1b130a284d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 24 Sep 2014 21:53:19 -0400
Subject: [PATCH 0769/1819] qt: add proxy to options overridden if necessary.

If proxy is disabled in the gui but enabled via the command line, it needs to
be added to the override list.
---
 src/qt/optionsmodel.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index bd747faeb684..21e390eb6dc3 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -119,6 +119,8 @@ void OptionsModel::Init()
     // Only try to set -proxy, if user has enabled fUseProxy
     if (settings.value("fUseProxy").toBool() && !SoftSetArg("-proxy", settings.value("addrProxy").toString().toStdString()))
         addOverriddenOption("-proxy");
+    else if(!settings.value("fUseProxy").toBool() && !GetArg("-proxy", "").empty())
+        addOverriddenOption("-proxy");
 
     // Display
     if (!settings.contains("language"))

From eee030f6bc62117b4d3c27aa78818964d95a7063 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 25 Sep 2014 19:25:19 -0400
Subject: [PATCH 0770/1819] autofile: don't copy CAutoFile by value

---
 src/init.cpp                  | 2 +-
 src/main.cpp                  | 8 ++++----
 src/net.cpp                   | 4 ++--
 src/test/checkblock_tests.cpp | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 7299bd0f4a73..27594ecbe315 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1058,7 +1058,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
-    CAutoFile est_filein = CAutoFile(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
+    CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
     // Allowed to fail as this file IS missing on first startup.
     if (est_filein)
         mempool.ReadFeeEstimates(est_filein);
diff --git a/src/main.cpp b/src/main.cpp
index 15c3916a6fb0..60e2a56795e0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1082,7 +1082,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
 bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
 {
     // Open history file to append
-    CAutoFile fileout = CAutoFile(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
+    CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
     if (!fileout)
         return error("WriteBlockToDisk : OpenBlockFile failed");
 
@@ -1110,7 +1110,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
     block.SetNull();
 
     // Open history file to read
-    CAutoFile filein = CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION);
+    CAutoFile filein(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION);
     if (!filein)
         return error("ReadBlockFromDisk : OpenBlockFile failed");
 
@@ -4503,7 +4503,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
 bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
 {
     // Open history file to append
-    CAutoFile fileout = CAutoFile(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
+    CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
     if (!fileout)
         return error("CBlockUndo::WriteToDisk : OpenUndoFile failed");
 
@@ -4535,7 +4535,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
 bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock)
 {
     // Open history file to read
-    CAutoFile filein = CAutoFile(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION);
+    CAutoFile filein(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION);
     if (!filein)
         return error("CBlockUndo::ReadFromDisk : OpenBlockFile failed");
 
diff --git a/src/net.cpp b/src/net.cpp
index ab547e2fd7a8..866bac2c0e86 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1957,7 +1957,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
     // open temp output file, and associate with CAutoFile
     boost::filesystem::path pathTmp = GetDataDir() / tmpfn;
     FILE *file = fopen(pathTmp.string().c_str(), "wb");
-    CAutoFile fileout = CAutoFile(file, SER_DISK, CLIENT_VERSION);
+    CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
     if (!fileout)
         return error("%s : Failed to open file %s", __func__, pathTmp.string());
 
@@ -1982,7 +1982,7 @@ bool CAddrDB::Read(CAddrMan& addr)
 {
     // open input file, and associate with CAutoFile
     FILE *file = fopen(pathAddr.string().c_str(), "rb");
-    CAutoFile filein = CAutoFile(file, SER_DISK, CLIENT_VERSION);
+    CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
     if (!filein)
         return error("%s : Failed to open file %s", __func__, pathAddr.string());
 
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index fdea12846a08..67d40a45c72a 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -35,7 +35,7 @@ bool read_block(const std::string& filename, CBlock& block)
 
     fseek(fp, 8, SEEK_SET); // skip msgheader/size
 
-    CAutoFile filein = CAutoFile(fp, SER_DISK, CLIENT_VERSION);
+    CAutoFile filein(fp, SER_DISK, CLIENT_VERSION);
     if (!filein) return false;
 
     filein >> block;

From 6eb67b0ed2b350b772f7edb67aee1bcf09c91b0b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 25 Sep 2014 19:25:47 -0400
Subject: [PATCH 0771/1819] autofile: Disallow by-value copies of CAutoFile

One might assume that CAutoFile would be ref-counted so that a copied object
would delay closing the underlying file until all copies have gone out of
scope. Since that's not the case with CAutoFile, explicitly disable copying.
---
 src/serialize.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/serialize.h b/src/serialize.h
index 447d808dee0e..7f8f93328434 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1154,7 +1154,7 @@ class CDataStream
 
 
 
-/** RAII wrapper for FILE*.
+/** Non-refcounted RAII wrapper for FILE*.
  *
  * Will automatically close the file when it goes out of scope if not null.
  * If you're returning the file pointer, return file.release().
@@ -1162,6 +1162,10 @@ class CDataStream
  */
 class CAutoFile
 {
+private:
+    // Disallow copies
+    CAutoFile(const CAutoFile&);
+    CAutoFile& operator=(const CAutoFile&);
 protected:
     FILE* file;
 public:

From 8138cbea3c405e142d70b43b6c452e1738de3332 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 20 Sep 2014 03:13:04 +0200
Subject: [PATCH 0772/1819] Add automatic script test generation, and actual
 checksig tests

---
 src/core_io.h                     |   1 +
 src/core_write.cpp                |  35 ++++
 src/key.cpp                       |   8 +-
 src/key.h                         |   2 +-
 src/test/data/script_invalid.json |  24 +--
 src/test/data/script_valid.json   |  25 +--
 src/test/script_tests.cpp         | 325 +++++++++++++++++++++++++++++-
 src/test/transaction_tests.cpp    |  42 ++--
 8 files changed, 413 insertions(+), 49 deletions(-)

diff --git a/src/core_io.h b/src/core_io.h
index 6268a3bf5834..94848f1c3da1 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -20,6 +20,7 @@ extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
 extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
 
 // core_write.cpp
+extern std::string FormatScript(const CScript& script);
 extern std::string EncodeHexTx(const CTransaction& tx);
 extern void ScriptPubKeyToUniv(const CScript& scriptPubKey,
                         UniValue& out, bool fIncludeHex);
diff --git a/src/core_write.cpp b/src/core_write.cpp
index cd64aabf63b5..40d547fb33e6 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -17,6 +17,41 @@
 
 using namespace std;
 
+string FormatScript(const CScript& script)
+{
+    string ret;
+    CScript::const_iterator it = script.begin();
+    opcodetype op;
+    while (it != script.end()) {
+        CScript::const_iterator it2 = it;
+        vector<unsigned char> vch;
+        if (script.GetOp2(it, op, &vch)) {
+            if (op == OP_0) {
+                ret += "0 ";
+                continue;
+            } else if ((op >= OP_1 && op <= OP_16) || op == OP_1NEGATE) {
+                ret += strprintf("%i ", op - OP_1NEGATE - 1);
+                continue;
+            } else if (op >= OP_NOP && op <= OP_CHECKMULTISIGVERIFY) {
+                string str(GetOpName(op));
+                if (str.substr(0, 3) == string("OP_")) {
+                    ret += str.substr(3, string::npos) + " ";
+                    continue;
+                }
+            }
+            if (vch.size() > 0) {
+                ret += strprintf("0x%x 0x%x ", HexStr(it2, it - vch.size()), HexStr(it - vch.size(), it));
+            } else {
+                ret += strprintf("0x%x", HexStr(it2, it));
+            }
+            continue;
+        }
+        ret += strprintf("0x%x ", HexStr(it2, script.end()));
+        break;
+    }
+    return ret.substr(0, ret.size() - 1);
+}
+
 string EncodeHexTx(const CTransaction& tx)
 {
     CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
diff --git a/src/key.cpp b/src/key.cpp
index 8ed787654aa5..c2251b4f2adc 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -220,7 +220,7 @@ class CECKey {
         return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size()) != NULL;
     }
 
-    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) {
+    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) {
         vchSig.clear();
         ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
         if (sig == NULL)
@@ -232,7 +232,7 @@ class CECKey {
         BIGNUM *halforder = BN_CTX_get(ctx);
         EC_GROUP_get_order(group, order, ctx);
         BN_rshift1(halforder, order);
-        if (BN_cmp(sig->s, halforder) > 0) {
+        if (lowS && BN_cmp(sig->s, halforder) > 0) {
             // enforce low S values, by negating the value (modulo the order) if above order/2.
             BN_sub(sig->s, order, sig->s);
         }
@@ -467,7 +467,7 @@ CPubKey CKey::GetPubKey() const {
     return pubkey;
 }
 
-bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
+bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) const {
     if (!fValid)
         return false;
 #ifdef USE_SECP256K1
@@ -484,7 +484,7 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
 #else
     CECKey key;
     key.SetSecretBytes(vch);
-    return key.Sign(hash, vchSig);
+    return key.Sign(hash, vchSig, lowS);
 #endif
 }
 
diff --git a/src/key.h b/src/key.h
index 3863e95cffb0..f6f6d35d3419 100644
--- a/src/key.h
+++ b/src/key.h
@@ -276,7 +276,7 @@ class CKey
     CPubKey GetPubKey() const;
 
     // Create a DER-serialized signature.
-    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig) const;
+    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, bool lowS = true) const;
 
     // Create a compact signature (65 bytes), which allows reconstructing the used public key.
     // The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 401031ad12b3..35a6794b010b 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -384,18 +384,18 @@ nSequences are max.
 
 ["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
-["0x48 0x3045022100ea4d62e1fb351ad977596457bb01dfce58e050541784277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with wrong signature"],
-["0x47 0x304402207d09de5e34968c3f8b27d8217f173629f1106ee5216aa11d6b1f9813b3a214060220610a6ed25c704f901c6278f4f57fb11eadefdf0b22df298cfb6ce7ea84c86bf401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash using an anyonecanpay sighash"],
-["0x47 0x3044022028686fb3c8d3e5068cc9924c494fb5026df201d23340896da62fe9bb73fd9d5f02202a239609524959c4ca3651fd0cc48245b0b240862146fc579f3a962a4f46942b01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkey with wrong signature"],
-["0x47 0x3044022054cb0a3fca8694a0c231848ed9f965078148fd653e49dd4b6981fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside with wrong signature"],
-["0 0x48 0x3045022100e1c4e8800bd00c9ec3cd3df0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey with wrong signature"],
-["0x49 0x304602220000ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too much R padding)"],
-["0x47 0x30440220ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too little R padding)"],
-["0x49 0x3046022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a950221003003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash with non-DER signature (too much S padding)"],
-["0x48 0x3045022100e6eda3fd34862078233463cae19f0b47995e3f892102e5b175175e92a9163cc402204bf58445819093638481084322b61a2d49b68c96fd6fea17ed494722d0d67b4f01", "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "P2SH,STRICTENC", "Pay to pubkey with hybrid pubkey encoding"],
-["0x48 0x304502203b56d65863e0cdb89313043c2402f46f518c31658648151b01ec6b5b6c89206a022100d71efefb4c24fab36abb44ade106963d8114c5af1bda033faa1923f54ec4ea6a01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC,LOW_S", "Pay to pubkey with high S"],
-["0x47 0x3044022054cb0a3fca8694a0c231848fd9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside with invalid signature"],
-["1 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC,NULLDUMMY", "Raw multisig with one pubkey with non-zero dummy"],
+["0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001", "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "", "P2PK, bad sig"],
+["0x47 0x3044022037fcdb8e08f41e27588de8bc036d2c4b16eb3d09c1ba53b8f47a0a9c27722a39022058664b7a53b507e71dfafb77193e3786c3f0c119d78ce9104480ee7ece04f09301 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", "DUP HASH160 0x14 0xc0834c0c158f53be706d234c38fd52de7eece656 EQUALVERIFY CHECKSIG", "", "P2PKH, bad pubkey"],
+["0x47 0x3044022035e5b6742d299861c84cebaf2ea64145ee427a95facab39e2594d6deebb0c1d602200acb16778faa2e467a59006f342f2535b1418d55ba63a8605b387b7f9ac86d9a01", "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG", "", "P2PK anyonecanpay marked with normal hashtype"],
+["0x47 0x3044022029b2b8765ca950cf75a69e80b73b7ddfcaa8b27080c2db4c23b36aae60688e790220598ff368e17872ee065aa54d7d3a590682ca5204325b23b31d7da3c4a21ae67901 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL", "P2SH", "P2SH(P2PK), bad redeemscript"],
+["0x47 0x30440220647f906e63890df5ef1d3fed47ba892b31976c634281079e2bd38504fb54a1fb022021e8811f38fbe90efb6b74cb78da01d9badbac3bafdf70a861d7538a220d0b2601 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac", "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL", "P2SH", "P2SH(P2PKH), bad sig"],
+["0 0x47 0x304402203ef170402f8887f2ac183f31b1f503b0bc60bfc968dd469b097ea6124aefac5002200612febadc4e4cacc086982cb85830a17af3680c1b6a3cf77c1708af7621cf1301 0 0x47 0x304402207821838251a24a2234844f68e7169e6d11945cdf052ea12bd3e4e37457aceb4402200b6b46c81361e314c740ae5133c072af5fa5c209d65d2db1679e1716f19a538101", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3, 2 sigs"],
+["0 0 0x47 0x304402204661f7795e8db7be3132e8974e9a76d1d24b31f23df94c6fbcea07d1c205789102203f5e45a1c0b085279b58d11b36d5fea5449c3cf16f844ad10124e9b65e8777d201 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae", "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL", "P2SH", "P2SH(2-of-3), 1 sig"],
+["0x47 0x304402200052bc1600ca45c71f3538720fe62a5e8548dffd137af04467598c98466e9c0a0220789318ddbc9991ee477974089220a2feb6a6298a7c93d5ff6c25a92a2f4b48d501", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too much R padding"],
+["0x48 0x304502206eb7b92628bfb3c4d2a04b65b986987bcbb1af4fceedb144d5a0437b7ee410590221005f57a52df4aa26366742eed0db182fce51fbcd7159011b0644a7c05943eb228901", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too much S padding"],
+["0x47 0x30440220d8ad1efd55a3d2b8896495c38aba72056e1b3ca4a6ca15760e843eb1a9b9907602203eb0e8f3d6bec998262dfd03eaeb0f31c4e5105965436dec77550724b3771f3201", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too little R padding"],
+["0x48 0x304502206c43e065c8a8db3bbe69015afb86a51fb2fc8870defd41d436da2a197d9d6c12022100fcec35816ee2d84ec271ad159fcabf5dd712157051169e48ac328a7818cdb51e01", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "LOW_S,STRICTENC", "P2PK with high S"],
+["0x01 0x01 0x47 0x304402200e48ba1cf4d7182db94ffb57bd72ea31b5545dc0d1c512e665779b4fb2badc52022054b8388dfc074c708a75b62359b7be46402751ee40c0a111aef38a837b6ed09801 0x47 0x304402201c9820f59c49107bb30e6175cfc9ec95f897b03beb628b4bc854d2b80392aa0602200235d986ae418bcd111b8814f4c26a0ab5f475fb542a44884fc14912a97a252301 0x47 0x304402204cd7894c6f10a871f5b0c1f9c13228f8cdd4050248f0d0f498ee86be69ee3080022051bd2932c7d585eb600c7194235c74da820935f0d67972fd9545673aa1fd023301", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "NULLDUMMY", "3-of-3 with nonzero dummy"],
 
 ["The End"]
 
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index e0b527996c13..653f60d98280 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -529,18 +529,19 @@ nSequences are max.
 
 ["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
-["0x48 0x3045022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkeyhash"],
-["0x47 0x304402207d09de5e34968c3f8b27d8217f173629f1106ee5216aa11d6b1f9813b3a214060220610a6ed25c704f901c6278f4f57fb11eadefdf0b22df298cfb6ce7ea84c86bf481 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH,STRICTENC", "Anyonecanpay pay to pubkeyhash"],
-["0x47 0x3044022028686fb3c8d3e5069cc9924c494fb5026df201d23340896da62fe9bb73fd9d5f02202a239609524959c4ca3651fd0cc48245b0b240862146fc579f3a962a4f46942b01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Normal pay to pubkey"],
-["0x47 0x3044022054cb0a3fca8694a0c231848ed9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "P2SH,STRICTENC", "P2SH with a pay to pubkeyhash inside"],
-["0 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey"],
-["0x49 0x304602220000ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too much R padding)"],
-["0x47 0x30440220ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a9502203003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too little R padding)"],
-["0x49 0x3046022100ea4d62e1fb351ad977596457bb01dfce58e050541774277bd825c33bd98c2a950221003003347cf04573be4dc786c3fc5e7db09821565bf45c7d60160709b962f0398401 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798", "DUP HASH160 0x14 0x751e76e8199196d454941c45d1b3a323f1433bd6 EQUALVERIFY CHECKSIG", "P2SH", "Normal pay to pubkeyhash with non-DER signature (too much S padding)"],
-["0x48 0x3045022100e6eda3fd34862078233463cae19f0b47995e3f892102e5b175175e92a9163cc402204bf58445819093638481084322b61a2d49b68c96fd6fea17ed494722d0d67b4f01", "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "P2SH", "Pay to pubkey with hybrid pubkey encoding"],
-["0x48 0x304502203b56d65863e0cdb89313043c2402f46f518c31658648151b01ec6b5b6c89206a022100d71efefb4c24fab36abb44ade106963d8114c5af1bda033faa1923f54ec4ea6a01", "0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 CHECKSIG", "P2SH,STRICTENC", "Pay to pubkey with high S"],
-["0x47 0x3044022054cb0a3fca8694a0c231848fd9f965078148fd653e49dd4b6980fadac0f5ba0702204085be5af427d4561f13a07fd5a1c5ab0ff02126e9ba191448f5a9dae0da585301 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x19 0x76a914751e76e8199196d454941c45d1b3a323f1433bd688ac", "HASH160 0x14 0xcd7b44d0b03f2d026d1e586d7ae18903b0d385f6 EQUAL", "STRICTENC", "P2SH with a pay to pubkeyhash inside with invalid signature"],
-["1 0x48 0x3045022100e1c4e8800bd00c9ec3cd3de0e53e63bc5e8c018d0b68099a652f0b121f1a7e020220108dab275be7d1358530d3451d48aed747af77cc54e0423cbae5c572b2e1abb801", "1 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 1 CHECKMULTISIG", "P2SH,STRICTENC", "Raw multisig with one pubkey with non-zero dummy"],
+["0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501", "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "", "P2PK"],
+["0x47 0x3044022069d40999786aeb2fd874f9eb2636461a062dc963471627ed8390a3a5f9556f640220350132a52415ce622f2aadd07f791c591500917ec1f8c5edbc5381ef7942534d01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", "DUP HASH160 0x14 0x1018853670f9f3b0582c5b9ee8ce93764ac32b93 EQUALVERIFY CHECKSIG", "", "P2PKH"],
+["0x47 0x30440220519f2a6632ffa134c7811ea2819e9dcc951f0c7baf461f2dffdd09133f3b080a02203ec6bab5eb6619ed7f41b8701d7c6d70cfc83bb26c5c97f54b2ca6e304fc2bb581", "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG", "", "P2PK anyonecanpay"],
+["0x47 0x30440220279dad2170ffb5639f0a1ea71fc462ee37d75d420d86f84c978bac523c09b7f20220683b2789f5c5528a9e0a0d78f6e40db3f616cf1adb5a5fdef117d5974795cfe201 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL", "P2SH", "P2SH(P2PK)"],
+["0x47 0x3044022066acbfb5ac96b7cbf3f05a2aaf358c32438c45d1d7359dee9fc1ee636940735f02205606a03fd8cbf6a6fcbcba60c8abb1e385c0b5753cb57a97538159106fd3684e01 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac", "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL", "", "P2SH(P2PKH), bad sig but no VERIFY_P2SH"],
+["0 0x47 0x3044022004e791dd30a64c70e55e84e150c002af9feb3ce0ab1f20e86c53d1209003927502205a60453987fcd72aebaaacebc8ce4b15449cdd79e54cc82cefb83e69dbcfeabf01 0x47 0x304402201d021808ce93dd8574cc4f99ae4f11b44305528b0aecbd9f156f08315173643802200944a0ea5c884bd86180aef76d8b1e444860776b251e47d2d6c651a1c6f9930801 0x47 0x30440220446336d7b7de05ebb5683b82b05248ec7d78e88ae8d6125985f5776c887a4cf90220674ab2b2c2f954ba1cf35457d273c90d0c0c1c224d0ae128628740e81129486801", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3"],
+["0 0x47 0x30440220288b06d057cf0eac434ed0c3be9257cc0ca144dd99c11cc8f1a49467a37d8e8002203c496c72253c528e6bc81c42e683aba974d46041a96ef7b00915c863eb2a702901 0x47 0x304402207ffb4da33f40cac839a43000a187bd76a1ee5bf95e46dc1534b38bb7bd0321db022038c078f29d1831f8eb68ffdc2634c654fb01c3467b6457b98ad220653bb2478501 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae", "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL", "P2SH", "P2SH(2-of-3)"],
+["0x47 0x304402200001cae94b795baaafb05db38cf24cd75560cab2c36c91e29fac7d0fd2a723a3022058e2e56e568ce7c4b2b106210d114e1faa079407a6ed4154f230667c7d3583bc01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too much R padding but no STRICTENC"],
+["0x48 0x304502206d01de7c2a40ac2bb1231ed97f3890a1782f421d4c28b97166deff317990288f0221005e720213b089355be2cf785d81a82c59307d30e1624f450ed9ca1ebbc11cca6d01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too much S padding but no STRICTENC"],
+["0x47 0x30440220f3d8889602147d60d26c1d3b21b8db183eac02bf6d2fec1424c0ef377ca6fd7b02202bae8bfe39d00a432d4538a592e338b0ffc44c17d4b7056043d55063cf91f5ef01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too little R padding but no STRICTENC"],
+["0x48 0x3045022021bf9184d94f208ac9f4757ebca9b1cbebf008cfc244fe5be1360b1b9aba0e92022100e55074f72f3a1bfddf2ea4ea7ba984f78822e136fe04c8f9c1363238e0233bd801", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "STRICTENC", "P2PK with high S but no LOW_S"],
+["0x48 0x304502205c3e81aaf2aad0673f349035b180eba783eba7797af91c979920dea6b17a16d6022100d1d46825c68da1b325f320a3503dad27bb818227f64a38d153554bfd360c0e5301", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "LOW_S", "P2PK with high S but no STRICTENC"],
+["0x01 0x01 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3 with nonzero dummy but no NULLDUMMY"],
 
 ["The End"]
 ]
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 178b35fa2d80..f9086b6a6466 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -5,12 +5,13 @@
 #include "data/script_invalid.json.h"
 #include "data/script_valid.json.h"
 
+#include "core_io.h"
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
 #include "script/sign.h"
-#include "core_io.h"
+#include "util.h"
 
 #include <fstream>
 #include <stdint.h>
@@ -36,6 +37,7 @@ using namespace boost::algorithm;
 static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
 unsigned int ParseScriptFlags(string strFlags);
+string FormatScriptFlags(unsigned int flags);
 
 Array
 read_json(const std::string& jsondata)
@@ -68,10 +70,8 @@ CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey)
     return txCredit;
 }
 
-CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScript& scriptPubKey)
+CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CTransaction& txCredit)
 {
-    CMutableTransaction txCredit = BuildCreditingTransaction(scriptPubKey);
-
     CMutableTransaction txSpend;
     txSpend.nVersion = 1;
     txSpend.nLockTime = 0;
@@ -87,6 +87,317 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CSc
     return txSpend;
 }
 
+void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bool expect, const std::string& message)
+{
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0, flags) == expect, message);
+}
+
+namespace
+{
+const unsigned char vchKey0[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
+const unsigned char vchKey1[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0};
+const unsigned char vchKey2[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0};
+
+struct KeyData
+{
+    CKey key0, key0C, key1, key1C, key2, key2C;
+    CPubKey pubkey0, pubkey0C, pubkey0H;
+    CPubKey pubkey1, pubkey1C;
+    CPubKey pubkey2, pubkey2C;
+
+    KeyData()
+    {
+
+        key0.Set(&vchKey0[0], &vchKey0[32], false);
+        key0C.Set(&vchKey0[0], &vchKey0[32], true);
+        pubkey0 = key0.GetPubKey();
+        pubkey0H = key0.GetPubKey();
+        pubkey0C = key0C.GetPubKey();
+        *const_cast<unsigned char*>(&pubkey0H[0]) = 0x06 | (pubkey0H[64] & 1);
+
+        key1.Set(&vchKey1[0], &vchKey1[32], false);
+        key1C.Set(&vchKey1[0], &vchKey1[32], true);
+        pubkey1 = key1.GetPubKey();
+        pubkey1C = key1C.GetPubKey();
+
+        key2.Set(&vchKey2[0], &vchKey2[32], false);
+        key2C.Set(&vchKey2[0], &vchKey2[32], true);
+        pubkey2 = key2.GetPubKey();
+        pubkey2C = key2C.GetPubKey();
+    }
+};
+
+const KeyData keys;
+
+class TestBuilder
+{
+private:
+    CScript scriptPubKey;
+    CTransaction creditTx;
+    CMutableTransaction spendTx;
+    bool havePush;
+    std::vector<unsigned char> push;
+    std::string comment;
+    int flags;
+
+    void DoPush()
+    {
+        if (havePush) {
+            spendTx.vin[0].scriptSig << push;
+            havePush = false;
+        }
+    }
+
+    void DoPush(const std::vector<unsigned char>& data)
+    {
+         DoPush();
+         push = data;
+         havePush = true;
+    }
+
+public:
+    TestBuilder(const CScript& redeemScript, const std::string& comment_, int flags_, bool P2SH = false) : scriptPubKey(redeemScript), havePush(false), comment(comment_), flags(flags_)
+    {
+        if (P2SH) {
+            creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << redeemScript.GetID() << OP_EQUAL);
+        } else {
+            creditTx = BuildCreditingTransaction(redeemScript);
+        }
+        spendTx = BuildSpendingTransaction(CScript(), creditTx);
+    }
+
+    TestBuilder& Add(const CScript& script)
+    {
+        spendTx.vin[0].scriptSig += script;
+        return *this;
+    }
+
+    TestBuilder& Num(int num)
+    {
+        spendTx.vin[0].scriptSig << CScriptNum(num);
+        return *this;
+    }
+
+    TestBuilder& Push(const std::string& hex)
+    {
+        DoPush(ParseHex(hex));
+        return *this;
+    }
+
+    TestBuilder& PushSig(const CKey& key, int nHashType = SIGHASH_ALL, unsigned int lenR = 32, unsigned int lenS = 32)
+    {
+        uint256 hash = SignatureHash(scriptPubKey, spendTx, 0, nHashType);
+        std::vector<unsigned char> vchSig, r, s;
+        do {
+            key.Sign(hash, vchSig, lenS <= 32);
+            r = std::vector<unsigned char>(&vchSig[4], &vchSig[4 + vchSig[3]]);
+            s = std::vector<unsigned char>(&vchSig[6 + vchSig[3]], &vchSig[6 + vchSig[3] + vchSig[5 + vchSig[3]]]);
+        } while (lenR != r.size() || lenS != s.size());
+        vchSig.push_back(static_cast<unsigned char>(nHashType));
+        DoPush(vchSig);
+        return *this;
+    }
+
+    TestBuilder& Push(const CPubKey& pubkey)
+    {
+        DoPush(std::vector<unsigned char>(pubkey.begin(), pubkey.end()));
+        return *this;
+    }
+
+    TestBuilder& PushRedeem()
+    {
+        DoPush(static_cast<std::vector<unsigned char> >(scriptPubKey));
+        return *this;
+    }
+
+    TestBuilder& EditPush(unsigned int pos, const std::string& hexin, const std::string& hexout)
+    {
+        assert(havePush);
+        std::vector<unsigned char> datain = ParseHex(hexin);
+        std::vector<unsigned char> dataout = ParseHex(hexout);
+        assert(pos + datain.size() <= push.size());
+        BOOST_CHECK_MESSAGE(std::vector<unsigned char>(push.begin() + pos, push.begin() + pos + datain.size()) == datain, comment);
+        push.erase(push.begin() + pos, push.begin() + pos + datain.size());
+        push.insert(push.begin() + pos, dataout.begin(), dataout.end());
+        return *this;
+    }
+
+    TestBuilder& DamagePush(unsigned int pos)
+    {
+        assert(havePush);
+        assert(pos < push.size());
+        push[pos] ^= 1;
+        return *this;
+    }
+
+    TestBuilder& Test(bool expect)
+    {
+        TestBuilder copy = *this; // Make a copy so we can rollback the push.
+        DoPush();
+        DoTest(creditTx.vout[0].scriptPubKey, spendTx.vin[0].scriptSig, flags, expect, comment);
+        *this = copy;
+        return *this;
+    }
+
+    operator std::string()
+    {
+        DoPush();
+        return "[\"" +
+               FormatScript(spendTx.vin[0].scriptSig) + "\", \"" +
+               FormatScript(creditTx.vout[0].scriptPubKey) + "\", \"" +
+               FormatScriptFlags(flags) + "\", \"" +
+               comment + "\"],\n";
+    }
+
+    std::string GetComment()
+    {
+        return comment;
+    }
+
+    const CScript& GetScriptPubKey()
+    {
+        return creditTx.vout[0].scriptPubKey;
+    }
+};
+}
+
+BOOST_AUTO_TEST_CASE(script_build)
+{
+    std::vector<TestBuilder> good;
+    std::vector<TestBuilder> bad;
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey0 << OP_CHECKSIG,
+                               "P2PK", 0
+                              ).PushSig(keys.key0));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey0 << OP_CHECKSIG,
+                              "P2PK, bad sig", 0
+                             ).PushSig(keys.key0).DamagePush(10));
+
+    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1C.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+                               "P2PKH", 0
+                              ).PushSig(keys.key1).Push(keys.pubkey1C));
+    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey2C.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+                              "P2PKH, bad pubkey", 0
+                             ).PushSig(keys.key2).Push(keys.pubkey2C).DamagePush(5));
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+                               "P2PK anyonecanpay", 0
+                              ).PushSig(keys.key1, SIGHASH_ALL | SIGHASH_ANYONECANPAY));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+                              "P2PK anyonecanpay marked with normal hashtype", 0
+                             ).PushSig(keys.key1, SIGHASH_ALL | SIGHASH_ANYONECANPAY).EditPush(70, "81", "01"));
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey0C << OP_CHECKSIG,
+                               "P2SH(P2PK)", SCRIPT_VERIFY_P2SH, true
+                              ).PushSig(keys.key0).PushRedeem());
+    bad.push_back(TestBuilder(CScript() << keys.pubkey0C << OP_CHECKSIG,
+                              "P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true
+                             ).PushSig(keys.key0).PushRedeem().DamagePush(10));
+
+    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+                               "P2SH(P2PKH), bad sig but no VERIFY_P2SH", 0, true
+                              ).PushSig(keys.key0).DamagePush(10).PushRedeem());
+    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+                              "P2SH(P2PKH), bad sig", SCRIPT_VERIFY_P2SH, true
+                             ).PushSig(keys.key0).DamagePush(10).PushRedeem());
+
+    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                               "3-of-3", 0
+                              ).Num(0).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                              "3-of-3, 2 sigs", 0
+                             ).Num(0).PushSig(keys.key0).PushSig(keys.key1).Num(0));
+
+    good.push_back(TestBuilder(CScript() << OP_2 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                               "P2SH(2-of-3)", SCRIPT_VERIFY_P2SH, true
+                              ).Num(0).PushSig(keys.key1).PushSig(keys.key2).PushRedeem());
+    bad.push_back(TestBuilder(CScript() << OP_2 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                              "P2SH(2-of-3), 1 sig", SCRIPT_VERIFY_P2SH, true
+                             ).Num(0).PushSig(keys.key1).Num(0).PushRedeem());
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                               "P2PK with too much R padding but no STRICTENC", 0
+                              ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                              "P2PK with too much R padding", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
+    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                               "P2PK with too much S padding but no STRICTENC", 0
+                              ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                              "P2PK with too much S padding", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
+    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                               "P2PK with too little R padding but no STRICTENC", 0
+                              ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+                              "P2PK with too little R padding", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
+                               "P2PK with high S but no LOW_S", SCRIPT_VERIFY_STRICTENC
+                              ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
+    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
+                               "P2PK with high S but no STRICTENC", SCRIPT_VERIFY_LOW_S
+                              ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
+                              "P2PK with high S", SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
+
+    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                               "3-of-3 with nonzero dummy but no NULLDUMMY", 0
+                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+                              "3-of-3 with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
+                             ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
+
+    std::map<std::string, Array> tests_good;
+    std::map<std::string, Array> tests_bad;
+
+    {
+        Array json_good = read_json(std::string(json_tests::script_valid, json_tests::script_valid + sizeof(json_tests::script_valid)));
+        Array json_bad = read_json(std::string(json_tests::script_invalid, json_tests::script_invalid + sizeof(json_tests::script_invalid)));
+
+        BOOST_FOREACH(Value& tv, json_good) {
+            Array test = tv.get_array();
+            if (test.size() >= 4) {
+                tests_good[test[3].get_str()] = test;
+            }
+        }
+        BOOST_FOREACH(Value& tv, json_bad) {
+            Array test = tv.get_array();
+            if (test.size() >= 4) {
+                tests_bad[test[3].get_str()] = test;
+            }
+        }
+    }
+
+    std::string strGood;
+    std::string strBad;
+
+    BOOST_FOREACH(TestBuilder& test, good) {
+        test.Test(true);
+        BOOST_CHECK_MESSAGE(tests_good.count(test.GetComment()) > 0, "Missing auto script_valid test: " + test.GetComment());
+        BOOST_CHECK_MESSAGE(ParseScript(tests_good[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_valid test: " + test.GetComment());
+        strGood += test;
+    }
+    BOOST_FOREACH(TestBuilder& test, bad) {
+        test.Test(false);
+        BOOST_CHECK_MESSAGE(tests_bad.count(test.GetComment()) > 0, "Missing auto script_invalid test: " + test.GetComment());
+        BOOST_CHECK_MESSAGE(ParseScript(tests_bad[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_invalid test: " + test.GetComment());
+        strBad += test;
+    }
+
+#if 0
+    FILE* valid = fopen("script_valid.json.gen", "w");
+    fputs(strGood.c_str(), valid);
+    fclose(valid);
+    FILE* invalid = fopen("script_invalid.json.gen", "w");
+    fputs(strBad.c_str(), invalid);
+    fclose(invalid);
+#endif
+}
+
 BOOST_AUTO_TEST_CASE(script_valid)
 {
     // Read tests from test/data/script_valid.json
@@ -113,8 +424,7 @@ BOOST_AUTO_TEST_CASE(script_valid)
         CScript scriptPubKey = ParseScript(scriptPubKeyString);
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
-        CTransaction tx;
-        BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, scriptPubKey), 0, scriptflags), strTest);
+        DoTest(scriptPubKey, scriptSig, scriptflags, true, strTest);
     }
 }
 
@@ -140,8 +450,7 @@ BOOST_AUTO_TEST_CASE(script_invalid)
         CScript scriptPubKey = ParseScript(scriptPubKeyString);
         unsigned int scriptflags = ParseScriptFlags(test[2].get_str());
 
-        CTransaction tx;
-        BOOST_CHECK_MESSAGE(!VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, scriptPubKey), 0, scriptflags), strTest);
+        DoTest(scriptPubKey, scriptSig, scriptflags, false, strTest);
     }
 }
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 41d8ee9f19d4..83116b51e5c4 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -17,6 +17,7 @@
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/split.hpp>
 #include <boost/test/unit_test.hpp>
+#include <boost/assign/list_of.hpp>
 #include "json/json_spirit_writer_template.h"
 
 using namespace std;
@@ -26,22 +27,23 @@ using namespace boost::algorithm;
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
 
-unsigned int ParseScriptFlags(string strFlags){
+// Note how NOCACHE is not included as it is a runtime-only flag.
+static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
+    (string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE)
+    (string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH)
+    (string("STRICTENC"), (unsigned int)SCRIPT_VERIFY_STRICTENC)
+    (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
+    (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY);
+
+unsigned int ParseScriptFlags(string strFlags)
+{
+    if (strFlags.empty()) {
+        return 0;
+    }
     unsigned int flags = 0;
     vector<string> words;
     split(words, strFlags, is_any_of(","));
 
-    // Note how NOCACHE is not included as it is a runtime-only flag.
-    static map<string, unsigned int> mapFlagNames;
-    if (mapFlagNames.size() == 0)
-    {
-        mapFlagNames["NONE"] = SCRIPT_VERIFY_NONE;
-        mapFlagNames["P2SH"] = SCRIPT_VERIFY_P2SH;
-        mapFlagNames["STRICTENC"] = SCRIPT_VERIFY_STRICTENC;
-        mapFlagNames["LOW_S"] = SCRIPT_VERIFY_LOW_S;
-        mapFlagNames["NULLDUMMY"] = SCRIPT_VERIFY_NULLDUMMY;
-    }
-
     BOOST_FOREACH(string word, words)
     {
         if (!mapFlagNames.count(word))
@@ -52,6 +54,22 @@ unsigned int ParseScriptFlags(string strFlags){
     return flags;
 }
 
+string FormatScriptFlags(unsigned int flags)
+{
+    if (flags == 0) {
+        return "";
+    }
+    string ret;
+    std::map<string, unsigned int>::const_iterator it = mapFlagNames.begin();
+    while (it != mapFlagNames.end()) {
+        if (flags & it->second) {
+            ret += it->first + ",";
+        }
+        it++;
+    }
+    return ret.substr(0, ret.size() - 1);
+}
+
 BOOST_AUTO_TEST_SUITE(transaction_tests)
 
 BOOST_AUTO_TEST_CASE(tx_valid)

From a372168e77a8a195613a02983f2589252698bf0f Mon Sep 17 00:00:00 2001
From: Mark Friedenbach <mark@friedenbach.org>
Date: Tue, 22 Apr 2014 15:46:19 -0700
Subject: [PATCH 0773/1819] Use a typedef for monetary values

---
 src/Makefile.am                   |   1 +
 src/amount.h                      |  13 ++++
 src/bitcoin-tx.cpp                |   4 +-
 src/coins.cpp                     |   4 +-
 src/coins.h                       |   4 +-
 src/core.cpp                      |  12 ++--
 src/core.h                        |  21 +++---
 src/init.cpp                      |   6 +-
 src/main.cpp                      |  26 +++----
 src/main.h                        |   6 +-
 src/miner.cpp                     |  10 +--
 src/qt/bitcoinamountfield.cpp     |  28 ++++----
 src/qt/bitcoinamountfield.h       |  10 +--
 src/qt/bitcoingui.cpp             |   2 +-
 src/qt/bitcoingui.h               |   4 +-
 src/qt/bitcoinunits.cpp           |  13 ++--
 src/qt/bitcoinunits.h             |  12 ++--
 src/qt/coincontroldialog.cpp      |  16 ++---
 src/qt/coincontroldialog.h        |   4 +-
 src/qt/guiutil.cpp                |   2 +-
 src/qt/guiutil.h                  |   4 +-
 src/qt/optionsmodel.cpp           |   4 +-
 src/qt/optionsmodel.h             |   4 +-
 src/qt/overviewpage.cpp           |   4 +-
 src/qt/overviewpage.h             |  18 ++---
 src/qt/paymentrequestplus.cpp     |   4 +-
 src/qt/paymentrequestplus.h       |   2 +-
 src/qt/paymentserver.cpp          |   4 +-
 src/qt/sendcoinsdialog.cpp        |  10 +--
 src/qt/sendcoinsdialog.h          |   4 +-
 src/qt/transactiondesc.cpp        |  14 ++--
 src/qt/transactionfilterproxy.cpp |   2 +-
 src/qt/transactionfilterproxy.h   |   6 +-
 src/qt/transactionrecord.cpp      |  12 ++--
 src/qt/transactionrecord.h        |   7 +-
 src/qt/transactiontablemodel.cpp  |   4 +-
 src/qt/transactionview.cpp        |   2 +-
 src/qt/walletmodel.cpp            |  40 +++++------
 src/qt/walletmodel.h              |  32 ++++-----
 src/qt/walletmodeltransaction.cpp |   8 +--
 src/qt/walletmodeltransaction.h   |   8 +--
 src/qt/walletview.cpp             |   2 +-
 src/qt/walletview.h               |   4 +-
 src/rpcmining.cpp                 |   2 +-
 src/rpcrawtransaction.cpp         |   4 +-
 src/rpcserver.cpp                 |   6 +-
 src/rpcserver.h                   |   5 +-
 src/rpcwallet.cpp                 |  62 ++++++++---------
 src/test/accounting_tests.cpp     |   4 +-
 src/test/main_tests.cpp           |   4 +-
 src/test/util_tests.cpp           |   2 +-
 src/test/wallet_tests.cpp         |   4 +-
 src/txdb.cpp                      |   2 +-
 src/txmempool.cpp                 |  17 ++---
 src/txmempool.h                   |  12 ++--
 src/util.h                        |   1 +
 src/utilmoneystr.cpp              |   8 +--
 src/utilmoneystr.h                |   8 ++-
 src/wallet.cpp                    | 108 +++++++++++++++---------------
 src/wallet.h                      | 100 +++++++++++++--------------
 src/walletdb.cpp                  |   4 +-
 src/walletdb.h                    |   3 +-
 62 files changed, 397 insertions(+), 356 deletions(-)
 create mode 100644 src/amount.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 94a582dfacef..48e4fc5d8f52 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -65,6 +65,7 @@ BITCOIN_CORE_H = \
   addrman.h \
   alert.h \
   allocators.h \
+  amount.h \
   base58.h \
   bloom.h \
   chainparams.h \
diff --git a/src/amount.h b/src/amount.h
new file mode 100644
index 000000000000..42006a0388eb
--- /dev/null
+++ b/src/amount.h
@@ -0,0 +1,13 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_AMOUNT_H
+#define BITCOIN_AMOUNT_H
+
+#include <stdint.h>
+
+typedef int64_t CAmount;
+
+#endif
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index b6e7a6c540c0..a61b4fe29db2 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -214,7 +214,7 @@ static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
 
     // extract and validate VALUE
     string strValue = strInput.substr(0, pos);
-    int64_t value;
+    CAmount value;
     if (!ParseMoney(strValue, value))
         throw runtime_error("invalid TX output value");
 
@@ -242,7 +242,7 @@ static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput
 
     // extract and validate VALUE
     string strValue = strInput.substr(0, pos);
-    int64_t value;
+    CAmount value;
     if (!ParseMoney(strValue, value))
         throw runtime_error("invalid TX output value");
 
diff --git a/src/coins.cpp b/src/coins.cpp
index 34485db2bd29..9b8d63d4e449 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -171,12 +171,12 @@ const CTxOut &CCoinsViewCache::GetOutputFor(const CTxIn& input) const
     return coins->vout[input.prevout.n];
 }
 
-int64_t CCoinsViewCache::GetValueIn(const CTransaction& tx) const
+CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const
 {
     if (tx.IsCoinBase())
         return 0;
 
-    int64_t nResult = 0;
+    CAmount nResult = 0;
     for (unsigned int i = 0; i < tx.vin.size(); i++)
         nResult += GetOutputFor(tx.vin[i]).nValue;
 
diff --git a/src/coins.h b/src/coins.h
index bf61f55aacd4..258347532330 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -266,7 +266,7 @@ struct CCoinsStats
     uint64_t nTransactionOutputs;
     uint64_t nSerializedSize;
     uint256 hashSerialized;
-    int64_t nTotalAmount;
+    CAmount nTotalAmount;
 
     CCoinsStats() : nHeight(0), hashBlock(0), nTransactions(0), nTransactionOutputs(0), nSerializedSize(0), hashSerialized(0), nTotalAmount(0) {}
 };
@@ -367,7 +367,7 @@ class CCoinsViewCache : public CCoinsViewBacked
         @param[in] tx	transaction for which we are checking input total
         @return	Sum of value of all inputs (scriptSigs)
      */
-    int64_t GetValueIn(const CTransaction& tx) const;
+    CAmount GetValueIn(const CTransaction& tx) const;
 
     // Check whether all prevouts of the transaction are present in the UTXO set represented by this view
     bool HaveInputs(const CTransaction& tx) const;
diff --git a/src/core.cpp b/src/core.cpp
index e52327ba8e7d..1489d77bb356 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -43,7 +43,7 @@ std::string CTxIn::ToString() const
     return str;
 }
 
-CTxOut::CTxOut(int64_t nValueIn, CScript scriptPubKeyIn)
+CTxOut::CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn)
 {
     nValue = nValueIn;
     scriptPubKey = scriptPubKeyIn;
@@ -59,7 +59,7 @@ std::string CTxOut::ToString() const
     return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
 }
 
-CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
+CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
 {
     if (nSize > 0)
         nSatoshisPerK = nFeePaid*1000/nSize;
@@ -67,9 +67,9 @@ CFeeRate::CFeeRate(int64_t nFeePaid, size_t nSize)
         nSatoshisPerK = 0;
 }
 
-int64_t CFeeRate::GetFee(size_t nSize) const
+CAmount CFeeRate::GetFee(size_t nSize) const
 {
-    int64_t nFee = nSatoshisPerK*nSize / 1000;
+    CAmount nFee = nSatoshisPerK*nSize / 1000;
 
     if (nFee == 0 && nSatoshisPerK > 0)
         nFee = nSatoshisPerK;
@@ -110,9 +110,9 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) {
     return *this;
 }
 
-int64_t CTransaction::GetValueOut() const
+CAmount CTransaction::GetValueOut() const
 {
-    int64_t nValueOut = 0;
+    CAmount nValueOut = 0;
     BOOST_FOREACH(const CTxOut& txout, vout)
     {
         nValueOut += txout.nValue;
diff --git a/src/core.h b/src/core.h
index 9a2ac4748780..e8435c8b0db6 100644
--- a/src/core.h
+++ b/src/core.h
@@ -6,6 +6,7 @@
 #ifndef BITCOIN_CORE_H
 #define BITCOIN_CORE_H
 
+#include "amount.h"
 #include "script/compressor.h"
 #include "script/script.h"
 #include "serialize.h"
@@ -19,8 +20,8 @@ static const int64_t COIN = 100000000;
 static const int64_t CENT = 1000000;
 
 /** No amount larger than this (in satoshi) is valid */
-static const int64_t MAX_MONEY = 21000000 * COIN;
-inline bool MoneyRange(int64_t nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
+static const CAmount MAX_MONEY = 21000000 * COIN;
+inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
 
 /** An outpoint - a combination of a transaction hash and an index n into its vout */
 class COutPoint
@@ -129,15 +130,15 @@ class CTxIn
 class CFeeRate
 {
 private:
-    int64_t nSatoshisPerK; // unit is satoshis-per-1,000-bytes
+    CAmount nSatoshisPerK; // unit is satoshis-per-1,000-bytes
 public:
     CFeeRate() : nSatoshisPerK(0) { }
-    explicit CFeeRate(int64_t _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
-    CFeeRate(int64_t nFeePaid, size_t nSize);
+    explicit CFeeRate(const CAmount& _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
+    CFeeRate(const CAmount& nFeePaid, size_t nSize);
     CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
 
-    int64_t GetFee(size_t size) const; // unit returned is satoshis
-    int64_t GetFeePerK() const { return GetFee(1000); } // satoshis-per-1000-bytes
+    CAmount GetFee(size_t size) const; // unit returned is satoshis
+    CAmount GetFeePerK() const { return GetFee(1000); } // satoshis-per-1000-bytes
 
     friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
     friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
@@ -161,7 +162,7 @@ class CFeeRate
 class CTxOut
 {
 public:
-    int64_t nValue;
+    CAmount nValue;
     CScript scriptPubKey;
 
     CTxOut()
@@ -169,7 +170,7 @@ class CTxOut
         SetNull();
     }
 
-    CTxOut(int64_t nValueIn, CScript scriptPubKeyIn);
+    CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn);
 
     ADD_SERIALIZE_METHODS;
 
@@ -276,7 +277,7 @@ class CTransaction
     }
 
     // Return sum of txouts.
-    int64_t GetValueOut() const;
+    CAmount GetValueOut() const;
     // GetValueIn() is a method on CCoinsViewCache, because
     // inputs must be known to compute value in.
 
diff --git a/src/init.cpp b/src/init.cpp
index 27594ecbe315..dfb984cb0d72 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -662,7 +662,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     // cost to you of processing a transaction.
     if (mapArgs.count("-minrelaytxfee"))
     {
-        int64_t n = 0;
+        CAmount n = 0;
         if (ParseMoney(mapArgs["-minrelaytxfee"], n) && n > 0)
             ::minRelayTxFee = CFeeRate(n);
         else
@@ -672,7 +672,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 #ifdef ENABLE_WALLET
     if (mapArgs.count("-mintxfee"))
     {
-        int64_t n = 0;
+        CAmount n = 0;
         if (ParseMoney(mapArgs["-mintxfee"], n) && n > 0)
             CWallet::minTxFee = CFeeRate(n);
         else
@@ -680,7 +680,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
     if (mapArgs.count("-paytxfee"))
     {
-        int64_t nFeePerK = 0;
+        CAmount nFeePerK = 0;
         if (!ParseMoney(mapArgs["-paytxfee"], nFeePerK))
             return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s'"), mapArgs["-paytxfee"]));
         if (nFeePerK > nHighTransactionFeeWarning)
diff --git a/src/main.cpp b/src/main.cpp
index 60e2a56795e0..234b343983e2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -781,7 +781,7 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
                          REJECT_INVALID, "bad-txns-oversize");
 
     // Check for negative or overflow output values
-    int64_t nValueOut = 0;
+    CAmount nValueOut = 0;
     BOOST_FOREACH(const CTxOut& txout, tx.vout)
     {
         if (txout.nValue < 0)
@@ -823,19 +823,19 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
     return true;
 }
 
-int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
+CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree)
 {
     {
         LOCK(mempool.cs);
         uint256 hash = tx.GetHash();
         double dPriorityDelta = 0;
-        int64_t nFeeDelta = 0;
+        CAmount nFeeDelta = 0;
         mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
         if (dPriorityDelta > 0 || nFeeDelta > 0)
             return 0;
     }
 
-    int64_t nMinFee = ::minRelayTxFee.GetFee(nBytes);
+    CAmount nMinFee = ::minRelayTxFee.GetFee(nBytes);
 
     if (fAllowFree)
     {
@@ -898,7 +898,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         CCoinsView dummy;
         CCoinsViewCache view(dummy);
 
-        int64_t nValueIn = 0;
+        CAmount nValueIn = 0;
         {
         LOCK(pool.cs);
         CCoinsViewMemPool viewMemPool(*pcoinsTip, pool);
@@ -950,15 +950,15 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
                                    hash.ToString(), nSigOps, MAX_TX_SIGOPS),
                              REJECT_NONSTANDARD, "bad-txns-too-many-sigops");
 
-        int64_t nValueOut = tx.GetValueOut();
-        int64_t nFees = nValueIn-nValueOut;
+        CAmount nValueOut = tx.GetValueOut();
+        CAmount nFees = nValueIn-nValueOut;
         double dPriority = view.GetPriority(tx, chainActive.Height());
 
         CTxMemPoolEntry entry(tx, nFees, GetTime(), dPriority, chainActive.Height());
         unsigned int nSize = entry.GetTxSize();
 
         // Don't accept it if it can't get into a block
-        int64_t txMinFee = GetMinRelayFee(tx, nSize, true);
+        CAmount txMinFee = GetMinRelayFee(tx, nSize, true);
         if (fLimitFree && nFees < txMinFee)
             return state.DoS(0, error("AcceptToMemoryPool : not enough fees %s, %d < %d",
                                       hash.ToString(), nFees, txMinFee),
@@ -1178,7 +1178,7 @@ void static PruneOrphanBlocks()
     mapOrphanBlocks.erase(hash);
 }
 
-int64_t GetBlockValue(int nHeight, int64_t nFees)
+CAmount GetBlockValue(int nHeight, const CAmount& nFees)
 {
     int64_t nSubsidy = 50 * COIN;
     int halvings = nHeight / Params().SubsidyHalvingInterval();
@@ -1389,8 +1389,8 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
         // This is also true for mempool checks.
         CBlockIndex *pindexPrev = mapBlockIndex.find(inputs.GetBestBlock())->second;
         int nSpendHeight = pindexPrev->nHeight + 1;
-        int64_t nValueIn = 0;
-        int64_t nFees = 0;
+        CAmount nValueIn = 0;
+        CAmount nFees = 0;
         for (unsigned int i = 0; i < tx.vin.size(); i++)
         {
             const COutPoint &prevout = tx.vin[i].prevout;
@@ -1418,7 +1418,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                              REJECT_INVALID, "bad-txns-in-belowout");
 
         // Tally transaction fees
-        int64_t nTxFee = nValueIn - tx.GetValueOut();
+        CAmount nTxFee = nValueIn - tx.GetValueOut();
         if (nTxFee < 0)
             return state.DoS(100, error("CheckInputs() : %s nTxFee < 0", tx.GetHash().ToString()),
                              REJECT_INVALID, "bad-txns-fee-negative");
@@ -1658,7 +1658,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     CCheckQueueControl<CScriptCheck> control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL);
 
     int64_t nTimeStart = GetTimeMicros();
-    int64_t nFees = 0;
+    CAmount nFees = 0;
     int nInputs = 0;
     unsigned int nSigOps = 0;
     CDiskTxPos pos(pindex->GetBlockPos(), GetSizeOfCompactSize(block.vtx.size()));
diff --git a/src/main.h b/src/main.h
index 5acc551793e6..93915db519ee 100644
--- a/src/main.h
+++ b/src/main.h
@@ -172,7 +172,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);
-int64_t GetBlockValue(int nHeight, int64_t nFees);
+CAmount GetBlockValue(int nHeight, const CAmount& nFees);
 
 /** Create a new block index entry for a given block hash */
 CBlockIndex * InsertBlockIndex(uint256 hash);
@@ -260,7 +260,7 @@ struct CDiskTxPos : public CDiskBlockPos
 };
 
 
-int64_t GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
+CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
 
 //
 // Check transaction inputs, and make sure any
@@ -970,7 +970,7 @@ extern CBlockTreeDB *pblocktree;
 struct CBlockTemplate
 {
     CBlock block;
-    std::vector<int64_t> vTxFees;
+    std::vector<CAmount> vTxFees;
     std::vector<int64_t> vTxSigOps;
 };
 
diff --git a/src/miner.cpp b/src/miner.cpp
index d05ddbeb1f8b..361a2bea4123 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -111,7 +111,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize);
 
     // Collect memory pool transactions into the block
-    int64_t nFees = 0;
+    CAmount nFees = 0;
 
     {
         LOCK2(cs_main, mempool.cs);
@@ -135,7 +135,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
             COrphan* porphan = NULL;
             double dPriority = 0;
-            int64_t nTotalIn = 0;
+            CAmount nTotalIn = 0;
             bool fMissingInputs = false;
             BOOST_FOREACH(const CTxIn& txin, tx.vin)
             {
@@ -170,7 +170,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 const CCoins* coins = view.AccessCoins(txin.prevout.hash);
                 assert(coins);
 
-                int64_t nValueIn = coins->vout[txin.prevout.n].nValue;
+                CAmount nValueIn = coins->vout[txin.prevout.n].nValue;
                 nTotalIn += nValueIn;
 
                 int nConf = pindexPrev->nHeight - coins->nHeight + 1;
@@ -229,7 +229,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             // Skip free transactions if we're past the minimum block size:
             const uint256& hash = tx.GetHash();
             double dPriorityDelta = 0;
-            int64_t nFeeDelta = 0;
+            CAmount nFeeDelta = 0;
             mempool.ApplyDeltas(hash, dPriorityDelta, nFeeDelta);
             if (fSortedByFee && (dPriorityDelta <= 0) && (nFeeDelta <= 0) && (feeRate < ::minRelayTxFee) && (nBlockSize + nTxSize >= nBlockMinSize))
                 continue;
@@ -247,7 +247,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             if (!view.HaveInputs(tx))
                 continue;
 
-            int64_t nTxFees = view.GetValueIn(tx)-tx.GetValueOut();
+            CAmount nTxFees = view.GetValueIn(tx)-tx.GetValueOut();
 
             nTxSigOps += GetP2SHSigOpCount(tx, view);
             if (nBlockSigOps + nTxSigOps >= MAX_BLOCK_SIGOPS)
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 64660390132e..6e35bf17b3d5 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -44,7 +44,7 @@ class AmountSpinBox: public QAbstractSpinBox
     void fixup(QString &input) const
     {
         bool valid = false;
-        qint64 val = parse(input, &valid);
+        CAmount val = parse(input, &valid);
         if(valid)
         {
             input = BitcoinUnits::format(currentUnit, val, false, BitcoinUnits::separatorAlways);
@@ -52,12 +52,12 @@ class AmountSpinBox: public QAbstractSpinBox
         }
     }
 
-    qint64 value(bool *valid_out=0) const
+    CAmount value(bool *valid_out=0) const
     {
         return parse(text(), valid_out);
     }
 
-    void setValue(qint64 value)
+    void setValue(const CAmount& value)
     {
         lineEdit()->setText(BitcoinUnits::format(currentUnit, value, false, BitcoinUnits::separatorAlways));
         emit valueChanged();
@@ -66,9 +66,9 @@ class AmountSpinBox: public QAbstractSpinBox
     void stepBy(int steps)
     {
         bool valid = false;
-        qint64 val = value(&valid);
+        CAmount val = value(&valid);
         val = val + steps * singleStep;
-        val = qMin(qMax(val, Q_INT64_C(0)), BitcoinUnits::maxMoney());
+        val = qMin(qMax(val, CAmount(0)), BitcoinUnits::maxMoney());
         setValue(val);
     }
 
@@ -78,7 +78,7 @@ class AmountSpinBox: public QAbstractSpinBox
         if(text().isEmpty()) // Allow step-up with empty field
             return StepUpEnabled;
         bool valid = false;
-        qint64 val = value(&valid);
+        CAmount val = value(&valid);
         if(valid)
         {
             if(val > 0)
@@ -92,7 +92,7 @@ class AmountSpinBox: public QAbstractSpinBox
     void setDisplayUnit(int unit)
     {
         bool valid = false;
-        qint64 val = value(&valid);
+        CAmount val = value(&valid);
 
         currentUnit = unit;
 
@@ -102,7 +102,7 @@ class AmountSpinBox: public QAbstractSpinBox
             clear();
     }
 
-    void setSingleStep(qint64 step)
+    void setSingleStep(const CAmount& step)
     {
         singleStep = step;
     }
@@ -140,7 +140,7 @@ class AmountSpinBox: public QAbstractSpinBox
     }
 private:
     int currentUnit;
-    qint64 singleStep;
+    CAmount singleStep;
     mutable QSize cachedMinimumSizeHint;
 
     /**
@@ -148,9 +148,9 @@ class AmountSpinBox: public QAbstractSpinBox
      * return validity.
      * @note Must return 0 if !valid.
      */
-    qint64 parse(const QString &text, bool *valid_out=0) const
+    CAmount parse(const QString &text, bool *valid_out=0) const
     {
-        qint64 val = 0;
+        CAmount val = 0;
         bool valid = BitcoinUnits::parse(currentUnit, text, &val);
         if(valid)
         {
@@ -253,12 +253,12 @@ QWidget *BitcoinAmountField::setupTabChain(QWidget *prev)
     return unit;
 }
 
-qint64 BitcoinAmountField::value(bool *valid_out) const
+CAmount BitcoinAmountField::value(bool *valid_out) const
 {
     return amount->value(valid_out);
 }
 
-void BitcoinAmountField::setValue(qint64 value)
+void BitcoinAmountField::setValue(const CAmount& value)
 {
     amount->setValue(value);
 }
@@ -285,7 +285,7 @@ void BitcoinAmountField::setDisplayUnit(int newUnit)
     unit->setValue(newUnit);
 }
 
-void BitcoinAmountField::setSingleStep(qint64 step)
+void BitcoinAmountField::setSingleStep(const CAmount& step)
 {
     amount->setSingleStep(step);
 }
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 84795a7e7a58..e52feeb46e88 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -5,6 +5,8 @@
 #ifndef BITCOINAMOUNTFIELD_H
 #define BITCOINAMOUNTFIELD_H
 
+#include "amount.h"
+
 #include <QWidget>
 
 class AmountSpinBox;
@@ -19,16 +21,16 @@ class BitcoinAmountField: public QWidget
 {
     Q_OBJECT
 
-    Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY valueChanged USER true)
+    Q_PROPERTY(CAmount value READ value WRITE setValue NOTIFY valueChanged USER true)
 
 public:
     explicit BitcoinAmountField(QWidget *parent = 0);
 
-    qint64 value(bool *valid=0) const;
-    void setValue(qint64 value);
+    CAmount value(bool *value=0) const;
+    void setValue(const CAmount& value);
 
     /** Set single step in satoshis **/
-    void setSingleStep(qint64 step);
+    void setSingleStep(const CAmount& step);
 
     /** Make read-only **/
     void setReadOnly(bool fReadOnly);
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 443bed14d706..7380fbd240f2 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -864,7 +864,7 @@ void BitcoinGUI::closeEvent(QCloseEvent *event)
 }
 
 #ifdef ENABLE_WALLET
-void BitcoinGUI::incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address)
+void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address)
 {
     // On new transaction, make an info balloon
     message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"),
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 30b05cb7d975..8af6eda867a2 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -9,6 +9,8 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include "amount.h"
+
 #include <QLabel>
 #include <QMainWindow>
 #include <QMap>
@@ -159,7 +161,7 @@ public slots:
     bool handlePaymentRequest(const SendCoinsRecipient& recipient);
 
     /** Show incoming transaction notification for new transactions. */
-    void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
+    void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address);
 #endif
 
 private slots:
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 3215363fa0aa..423b559bf7d9 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -91,12 +91,13 @@ int BitcoinUnits::decimals(int unit)
     }
 }
 
-QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle separators)
+QString BitcoinUnits::format(int unit, const CAmount& nIn, bool fPlus, SeparatorStyle separators)
 {
     // Note: not using straight sprintf here because we do NOT want
     // localized number formatting.
     if(!valid(unit))
         return QString(); // Refuse to format invalid unit
+    qint64 n = (qint64)nIn;
     qint64 coin = factor(unit);
     int num_decimals = decimals(unit);
     qint64 n_abs = (n > 0 ? n : -n);
@@ -138,12 +139,12 @@ QString BitcoinUnits::format(int unit, qint64 n, bool fPlus, SeparatorStyle sepa
 // Please take care to use formatHtmlWithUnit instead, when
 // appropriate.
 
-QString BitcoinUnits::formatWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
+QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
     return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
 }
 
-QString BitcoinUnits::formatHtmlWithUnit(int unit, qint64 amount, bool plussign, SeparatorStyle separators)
+QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
     QString str(formatWithUnit(unit, amount, plussign, separators));
     str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
@@ -151,7 +152,7 @@ QString BitcoinUnits::formatHtmlWithUnit(int unit, qint64 amount, bool plussign,
 }
 
 
-bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out)
+bool BitcoinUnits::parse(int unit, const QString &value, CAmount *val_out)
 {
     if(!valid(unit) || value.isEmpty())
         return false; // Refuse to parse invalid unit or empty string
@@ -182,7 +183,7 @@ bool BitcoinUnits::parse(int unit, const QString &value, qint64 *val_out)
     {
         return false; // Longer numbers will exceed 63 bits
     }
-    qint64 retvalue = str.toLongLong(&ok);
+    CAmount retvalue(str.toLongLong(&ok));
     if(val_out)
     {
         *val_out = retvalue;
@@ -226,7 +227,7 @@ QVariant BitcoinUnits::data(const QModelIndex &index, int role) const
     return QVariant();
 }
 
-qint64 BitcoinUnits::maxMoney()
+CAmount BitcoinUnits::maxMoney()
 {
     return MAX_MONEY;
 }
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index be9dca601235..a392c42b9b56 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -5,6 +5,8 @@
 #ifndef BITCOINUNITS_H
 #define BITCOINUNITS_H
 
+#include "amount.h"
+
 #include <QAbstractListModel>
 #include <QString>
 
@@ -85,12 +87,12 @@ class BitcoinUnits: public QAbstractListModel
     //! Number of decimals left
     static int decimals(int unit);
     //! Format as string
-    static QString format(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString format(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Format as string (with unit)
-    static QString formatWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
-    static QString formatHtmlWithUnit(int unit, qint64 amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString formatWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Parse string to coin amount
-    static bool parse(int unit, const QString &value, qint64 *val_out);
+    static bool parse(int unit, const QString &value, CAmount *val_out);
     //! Gets title for amount column including current display unit if optionsModel reference available */
     static QString getAmountColumnTitle(int unit);
     ///@}
@@ -117,7 +119,7 @@ class BitcoinUnits: public QAbstractListModel
     }
 
     //! Return maximum number of base units (Satoshis)
-    static qint64 maxMoney();
+    static CAmount maxMoney();
 
 private:
     QList<BitcoinUnits::Unit> unitlist;
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index d10463fd8f64..ba0febe546d9 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -29,7 +29,7 @@
 #include <QTreeWidgetItem>
 
 using namespace std;
-QList<qint64> CoinControlDialog::payAmounts;
+QList<CAmount> CoinControlDialog::payAmounts;
 CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
 
 CoinControlDialog::CoinControlDialog(QWidget *parent) :
@@ -443,10 +443,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         return;
 
     // nPayAmount
-    qint64 nPayAmount = 0;
+    CAmount nPayAmount = 0;
     bool fDust = false;
     CMutableTransaction txDummy;
-    foreach(const qint64 &amount, CoinControlDialog::payAmounts)
+    foreach(const CAmount &amount, CoinControlDialog::payAmounts)
     {
         nPayAmount += amount;
 
@@ -460,10 +460,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     }
 
     QString sPriorityLabel      = tr("none");
-    int64_t nAmount             = 0;
-    int64_t nPayFee             = 0;
-    int64_t nAfterFee           = 0;
-    int64_t nChange             = 0;
+    CAmount nAmount             = 0;
+    CAmount nPayFee             = 0;
+    CAmount nAfterFee           = 0;
+    CAmount nChange             = 0;
     unsigned int nBytes         = 0;
     unsigned int nBytesInputs   = 0;
     double dPriority            = 0;
@@ -684,7 +684,7 @@ void CoinControlDialog::updateView()
             itemWalletAddress->setText(COLUMN_ADDRESS, sWalletAddress);
         }
 
-        int64_t nSum = 0;
+        CAmount nSum = 0;
         double dPrioritySum = 0;
         int nChildren = 0;
         int nInputSum = 0;
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index a6f239a89871..9eaa8eb41d55 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -5,6 +5,8 @@
 #ifndef COINCONTROLDIALOG_H
 #define COINCONTROLDIALOG_H
 
+#include "amount.h"
+
 #include <QAbstractButton>
 #include <QAction>
 #include <QDialog>
@@ -37,7 +39,7 @@ class CoinControlDialog : public QDialog
     static void updateLabels(WalletModel*, QDialog*);
     static QString getPriorityLabel(const CTxMemPool& pool, double);
 
-    static QList<qint64> payAmounts;
+    static QList<CAmount> payAmounts;
     static CCoinControl *coinControl;
 
 private:
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index fc22871a6b04..91bb10755aa7 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -221,7 +221,7 @@ QString formatBitcoinURI(const SendCoinsRecipient &info)
     return ret;
 }
 
-bool isDust(const QString& address, qint64 amount)
+bool isDust(const QString& address, const CAmount& amount)
 {
     CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
     CScript script = GetScriptForDestination(dest);
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 67e11e59a0cf..0939c78f647f 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -5,6 +5,8 @@
 #ifndef GUIUTIL_H
 #define GUIUTIL_H
 
+#include "amount.h"
+
 #include <QHeaderView>
 #include <QMessageBox>
 #include <QObject>
@@ -46,7 +48,7 @@ namespace GUIUtil
     QString formatBitcoinURI(const SendCoinsRecipient &info);
 
     // Returns true if given address+amount meets "dust" definition
-    bool isDust(const QString& address, qint64 amount);
+    bool isDust(const QString& address, const CAmount& amount);
 
     // HTML escaping for rich text controls
     QString HtmlEscape(const QString& str, bool fMultiLine=false);
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index bd747faeb684..cb80bd0e3def 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -275,9 +275,9 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
 #ifdef ENABLE_WALLET
         case Fee: { // core option - can be changed on-the-fly
             // Todo: Add is valid check  and warn via message, if not
-            qint64 nTransactionFee = value.toLongLong();
+            CAmount nTransactionFee(value.toLongLong());
             payTxFee = CFeeRate(nTransactionFee, 1000);
-            settings.setValue("nTransactionFee", nTransactionFee);
+            settings.setValue("nTransactionFee", qint64(nTransactionFee));
             emit transactionFeeChanged(nTransactionFee);
             break;
         }
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 80adab89c824..42ea3bf8e5b3 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -5,6 +5,8 @@
 #ifndef OPTIONSMODEL_H
 #define OPTIONSMODEL_H
 
+#include "amount.h"
+
 #include <QAbstractListModel>
 
 QT_BEGIN_NAMESPACE
@@ -82,7 +84,7 @@ class OptionsModel : public QAbstractListModel
 
 signals:
     void displayUnitChanged(int unit);
-    void transactionFeeChanged(qint64);
+    void transactionFeeChanged(const CAmount&);
     void coinControlFeaturesChanged(bool);
 };
 
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 90762bea5d38..1d6c23f8a0f7 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -146,7 +146,7 @@ OverviewPage::~OverviewPage()
     delete ui;
 }
 
-void OverviewPage::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance, qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance)
+void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance)
 {
     int unit = walletModel->getOptionsModel()->getDisplayUnit();
     currentBalance = balance;
@@ -220,7 +220,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
         // Keep up to date with wallet
         setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64, qint64, qint64)));
+        connect(model, SIGNAL(balanceChanged(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)), this, SLOT(setBalance(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)));
 
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index f46374efbac7..03f239008f36 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -5,6 +5,8 @@
 #ifndef OVERVIEWPAGE_H
 #define OVERVIEWPAGE_H
 
+#include "amount.h"
+
 #include <QWidget>
 
 class ClientModel;
@@ -34,8 +36,8 @@ class OverviewPage : public QWidget
     void showOutOfSyncWarning(bool fShow);
 
 public slots:
-    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
-                    qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
+    void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
+                    const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
 
 signals:
     void transactionClicked(const QModelIndex &index);
@@ -44,12 +46,12 @@ public slots:
     Ui::OverviewPage *ui;
     ClientModel *clientModel;
     WalletModel *walletModel;
-    qint64 currentBalance;
-    qint64 currentUnconfirmedBalance;
-    qint64 currentImmatureBalance;
-    qint64 currentWatchOnlyBalance;
-    qint64 currentWatchUnconfBalance;
-    qint64 currentWatchImmatureBalance;
+    CAmount currentBalance;
+    CAmount currentUnconfirmedBalance;
+    CAmount currentImmatureBalance;
+    CAmount currentWatchOnlyBalance;
+    CAmount currentWatchUnconfBalance;
+    CAmount currentWatchImmatureBalance;
 
     TxViewDelegate *txdelegate;
     TransactionFilterProxy *filter;
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index 7b7de49831e4..7aefffe24afb 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -196,9 +196,9 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
     return fResult;
 }
 
-QList<std::pair<CScript,qint64> > PaymentRequestPlus::getPayTo() const
+QList<std::pair<CScript,CAmount> > PaymentRequestPlus::getPayTo() const
 {
-    QList<std::pair<CScript,qint64> > result;
+    QList<std::pair<CScript,CAmount> > result;
     for (int i = 0; i < details.outputs_size(); i++)
     {
         const unsigned char* scriptStr = (const unsigned char*)details.outputs(i).script().data();
diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h
index 3c4861a4d4bd..3d94d93269d0 100644
--- a/src/qt/paymentrequestplus.h
+++ b/src/qt/paymentrequestplus.h
@@ -33,7 +33,7 @@ class PaymentRequestPlus
     bool getMerchant(X509_STORE* certStore, QString& merchant) const;
 
     // Returns list of outputs, amount
-    QList<std::pair<CScript,qint64> > getPayTo() const;
+    QList<std::pair<CScript,CAmount> > getPayTo() const;
 
     const payments::PaymentDetails& getDetails() const { return details; }
 
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index cc4478f39f1b..707de55290ac 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -532,10 +532,10 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
 
     request.getMerchant(PaymentServer::certStore, recipient.authenticatedMerchant);
 
-    QList<std::pair<CScript, qint64> > sendingTos = request.getPayTo();
+    QList<std::pair<CScript, CAmount> > sendingTos = request.getPayTo();
     QStringList addresses;
 
-    foreach(const PAIRTYPE(CScript, qint64)& sendingTo, sendingTos) {
+    foreach(const PAIRTYPE(CScript, CAmount)& sendingTo, sendingTos) {
         // Extract and check destination addresses
         CTxDestination dest;
         if (ExtractDestination(sendingTo.first, dest)) {
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 25e3d2a0dc1f..d67cac57b462 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -92,7 +92,7 @@ void SendCoinsDialog::setModel(WalletModel *model)
 
         setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64, qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64, qint64, qint64, qint64)));
+        connect(model, SIGNAL(balanceChanged(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)), this, SLOT(setBalance(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)));
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
         // Coin Control
@@ -203,7 +203,7 @@ void SendCoinsDialog::on_sendButton_clicked()
         return;
     }
 
-    qint64 txFee = currentTransaction.getTransactionFee();
+    CAmount txFee = currentTransaction.getTransactionFee();
     QString questionString = tr("Are you sure you want to send?");
     questionString.append("<br /><br />%1");
 
@@ -218,7 +218,7 @@ void SendCoinsDialog::on_sendButton_clicked()
 
     // add total amount in all subdivision units
     questionString.append("<hr />");
-    qint64 totalAmount = currentTransaction.getTotalTransactionAmount() + txFee;
+    CAmount totalAmount = currentTransaction.getTotalTransactionAmount() + txFee;
     QStringList alternativeUnits;
     foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
     {
@@ -384,8 +384,8 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
     return true;
 }
 
-void SendCoinsDialog::setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance, 
-                                 qint64 watchBalance, qint64 watchUnconfirmedBalance, qint64 watchImmatureBalance)
+void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, 
+                                 const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance)
 {
     Q_UNUSED(unconfirmedBalance);
     Q_UNUSED(immatureBalance);
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index a090fa42d5c2..74cc4bde56e2 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -47,8 +47,8 @@ public slots:
     void accept();
     SendCoinsEntry *addEntry();
     void updateTabsAndLabels();
-    void setBalance(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
-                    qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
+    void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
+                    const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
 
 private:
     Ui::SendCoinsDialog *ui;
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 49237183412d..1efad8259bb6 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -56,9 +56,9 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
     strHTML += "<html><font face='verdana, arial, helvetica, sans-serif'>";
 
     int64_t nTime = wtx.GetTxTime();
-    int64_t nCredit = wtx.GetCredit(ISMINE_ALL);
-    int64_t nDebit = wtx.GetDebit(ISMINE_ALL);
-    int64_t nNet = nCredit - nDebit;
+    CAmount nCredit = wtx.GetCredit(ISMINE_ALL);
+    CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
+    CAmount nNet = nCredit - nDebit;
 
     strHTML += "<b>" + tr("Status") + ":</b> " + FormatTxStatus(wtx);
     int nRequests = wtx.GetRequestCount();
@@ -132,7 +132,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
         //
         // Coinbase
         //
-        int64_t nUnmatured = 0;
+        CAmount nUnmatured = 0;
         BOOST_FOREACH(const CTxOut& txout, wtx.vout)
             nUnmatured += wallet->GetCredit(txout, ISMINE_ALL);
         strHTML += "<b>" + tr("Credit") + ":</b> ";
@@ -206,13 +206,13 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
             if (fAllToMe)
             {
                 // Payment to self
-                int64_t nChange = wtx.GetChange();
-                int64_t nValue = nCredit - nChange;
+                CAmount nChange = wtx.GetChange();
+                CAmount nValue = nCredit - nChange;
                 strHTML += "<b>" + tr("Total debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nValue) + "<br>";
                 strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
             }
 
-            int64_t nTxFee = nDebit - wtx.GetValueOut();
+            CAmount nTxFee = nDebit - wtx.GetValueOut();
             if (nTxFee > 0)
                 strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
         }
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index 6ab029173b71..2a0f621d1e3a 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -78,7 +78,7 @@ void TransactionFilterProxy::setTypeFilter(quint32 modes)
     invalidateFilter();
 }
 
-void TransactionFilterProxy::setMinAmount(qint64 minimum)
+void TransactionFilterProxy::setMinAmount(const CAmount& minimum)
 {
     this->minAmount = minimum;
     invalidateFilter();
diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h
index f408317b53ce..ca31ee8f8720 100644
--- a/src/qt/transactionfilterproxy.h
+++ b/src/qt/transactionfilterproxy.h
@@ -5,6 +5,8 @@
 #ifndef TRANSACTIONFILTERPROXY_H
 #define TRANSACTIONFILTERPROXY_H
 
+#include "amount.h"
+
 #include <QDateTime>
 #include <QSortFilterProxyModel>
 
@@ -38,7 +40,7 @@ class TransactionFilterProxy : public QSortFilterProxyModel
       @note Type filter takes a bit field created with TYPE() or ALL_TYPES
      */
     void setTypeFilter(quint32 modes);
-    void setMinAmount(qint64 minimum);
+    void setMinAmount(const CAmount& minimum);
     void setWatchOnlyFilter(WatchOnlyFilter filter);
 
     /** Set maximum number of rows returned, -1 if unlimited. */
@@ -58,7 +60,7 @@ class TransactionFilterProxy : public QSortFilterProxyModel
     QString addrPrefix;
     quint32 typeFilter;
     WatchOnlyFilter watchOnlyFilter;
-    qint64 minAmount;
+    CAmount minAmount;
     int limitRows;
     bool showInactive;
 };
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 20c1449c9248..afb343f349ea 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -32,9 +32,9 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
 {
     QList<TransactionRecord> parts;
     int64_t nTime = wtx.GetTxTime();
-    int64_t nCredit = wtx.GetCredit(true);
-    int64_t nDebit = wtx.GetDebit(ISMINE_ALL);
-    int64_t nNet = nCredit - nDebit;
+    CAmount nCredit = wtx.GetCredit(true);
+    CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
+    CAmount nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash();
     std::map<std::string, std::string> mapValue = wtx.mapValue;
 
@@ -97,7 +97,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
         if (fAllFromMe && fAllToMe)
         {
             // Payment to self
-            int64_t nChange = wtx.GetChange();
+            CAmount nChange = wtx.GetChange();
 
             parts.append(TransactionRecord(hash, nTime, TransactionRecord::SendToSelf, "",
                             -(nDebit - nChange), nCredit - nChange));
@@ -108,7 +108,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
             //
             // Debit
             //
-            int64_t nTxFee = nDebit - wtx.GetValueOut();
+            CAmount nTxFee = nDebit - wtx.GetValueOut();
 
             for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
             {
@@ -138,7 +138,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
                     sub.address = mapValue["to"];
                 }
 
-                int64_t nValue = txout.nValue;
+                CAmount nValue = txout.nValue;
                 /* Add fee to first output */
                 if (nTxFee > 0)
                 {
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 626b7654c622..9276c9f0afcf 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -5,6 +5,7 @@
 #ifndef TRANSACTIONRECORD_H
 #define TRANSACTIONRECORD_H
 
+#include "amount.h"
 #include "uint256.h"
 
 #include <QList>
@@ -94,7 +95,7 @@ class TransactionRecord
 
     TransactionRecord(uint256 hash, qint64 time,
                 Type type, const std::string &address,
-                qint64 debit, qint64 credit):
+                const CAmount& debit, const CAmount& credit):
             hash(hash), time(time), type(type), address(address), debit(debit), credit(credit),
             idx(0)
     {
@@ -111,8 +112,8 @@ class TransactionRecord
     qint64 time;
     Type type;
     std::string address;
-    qint64 debit;
-    qint64 credit;
+    CAmount debit;
+    CAmount credit;
     /**@}*/
 
     /** Subtransaction index, for sort key */
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 2b869b4ea58c..e34d77681868 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -546,7 +546,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
         case ToAddress:
             return formatTxToAddress(rec, true);
         case Amount:
-            return rec->credit + rec->debit;
+            return qint64(rec->credit + rec->debit);
         }
         break;
     case Qt::ToolTipRole:
@@ -583,7 +583,7 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
     case LabelRole:
         return walletModel->getAddressTableModel()->labelForAddress(QString::fromStdString(rec->address));
     case AmountRole:
-        return rec->credit + rec->debit;
+        return qint64(rec->credit + rec->debit);
     case TxIDRole:
         return rec->getTxID();
     case TxHashRole:
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index a7ba100cd20e..d15397387218 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -304,7 +304,7 @@ void TransactionView::changedAmount(const QString &amount)
 {
     if(!transactionProxyModel)
         return;
-    qint64 amount_parsed = 0;
+    CAmount amount_parsed = 0;
     if(BitcoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), amount, &amount_parsed))
     {
         transactionProxyModel->setMinAmount(amount_parsed);
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index ed90914ba7fd..b8701a23a651 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -55,11 +55,11 @@ WalletModel::~WalletModel()
     unsubscribeFromCoreSignals();
 }
 
-qint64 WalletModel::getBalance(const CCoinControl *coinControl) const
+CAmount WalletModel::getBalance(const CCoinControl *coinControl) const
 {
     if (coinControl)
     {
-        qint64 nBalance = 0;
+        CAmount nBalance = 0;
         std::vector<COutput> vCoins;
         wallet->AvailableCoins(vCoins, true, coinControl);
         BOOST_FOREACH(const COutput& out, vCoins)
@@ -72,12 +72,12 @@ qint64 WalletModel::getBalance(const CCoinControl *coinControl) const
     return wallet->GetBalance();
 }
 
-qint64 WalletModel::getUnconfirmedBalance() const
+CAmount WalletModel::getUnconfirmedBalance() const
 {
     return wallet->GetUnconfirmedBalance();
 }
 
-qint64 WalletModel::getImmatureBalance() const
+CAmount WalletModel::getImmatureBalance() const
 {
     return wallet->GetImmatureBalance();
 }
@@ -87,17 +87,17 @@ bool WalletModel::haveWatchOnly() const
     return fHaveWatchOnly;
 }
 
-qint64 WalletModel::getWatchBalance() const
+CAmount WalletModel::getWatchBalance() const
 {
     return wallet->GetWatchOnlyBalance();
 }
 
-qint64 WalletModel::getWatchUnconfirmedBalance() const
+CAmount WalletModel::getWatchUnconfirmedBalance() const
 {
     return wallet->GetUnconfirmedWatchOnlyBalance();
 }
 
-qint64 WalletModel::getWatchImmatureBalance() const
+CAmount WalletModel::getWatchImmatureBalance() const
 {
     return wallet->GetImmatureWatchOnlyBalance();
 }
@@ -137,12 +137,12 @@ void WalletModel::pollBalanceChanged()
 
 void WalletModel::checkBalanceChanged()
 {
-    qint64 newBalance = getBalance();
-    qint64 newUnconfirmedBalance = getUnconfirmedBalance();
-    qint64 newImmatureBalance = getImmatureBalance();
-    qint64 newWatchOnlyBalance = 0;
-    qint64 newWatchUnconfBalance = 0;
-    qint64 newWatchImmatureBalance = 0;
+    CAmount newBalance = getBalance();
+    CAmount newUnconfirmedBalance = getUnconfirmedBalance();
+    CAmount newImmatureBalance = getImmatureBalance();
+    CAmount newWatchOnlyBalance = 0;
+    CAmount newWatchUnconfBalance = 0;
+    CAmount newWatchImmatureBalance = 0;
     if (haveWatchOnly())
     {
         newWatchOnlyBalance = getWatchBalance();
@@ -194,9 +194,9 @@ bool WalletModel::validateAddress(const QString &address)
 
 WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransaction &transaction, const CCoinControl *coinControl)
 {
-    qint64 total = 0;
+    CAmount total = 0;
     QList<SendCoinsRecipient> recipients = transaction.getRecipients();
-    std::vector<std::pair<CScript, int64_t> > vecSend;
+    std::vector<std::pair<CScript, CAmount> > vecSend;
 
     if(recipients.empty())
     {
@@ -211,7 +211,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
     {
         if (rcp.paymentRequest.IsInitialized())
         {   // PaymentRequest...
-            int64_t subtotal = 0;
+            CAmount subtotal = 0;
             const payments::PaymentDetails& details = rcp.paymentRequest.getDetails();
             for (int i = 0; i < details.outputs_size(); i++)
             {
@@ -220,7 +220,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
                 subtotal += out.amount();
                 const unsigned char* scriptStr = (const unsigned char*)out.script().data();
                 CScript scriptPubKey(scriptStr, scriptStr+out.script().size());
-                vecSend.push_back(std::pair<CScript, int64_t>(scriptPubKey, out.amount()));
+                vecSend.push_back(std::pair<CScript, CAmount>(scriptPubKey, out.amount()));
             }
             if (subtotal <= 0)
             {
@@ -242,7 +242,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
             ++nAddresses;
 
             CScript scriptPubKey = GetScriptForDestination(CBitcoinAddress(rcp.address.toStdString()).Get());
-            vecSend.push_back(std::pair<CScript, int64_t>(scriptPubKey, rcp.amount));
+            vecSend.push_back(std::pair<CScript, CAmount>(scriptPubKey, rcp.amount));
 
             total += rcp.amount;
         }
@@ -252,7 +252,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
         return DuplicateAddress;
     }
 
-    qint64 nBalance = getBalance(coinControl);
+    CAmount nBalance = getBalance(coinControl);
 
     if(total > nBalance)
     {
@@ -263,7 +263,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
         LOCK2(cs_main, wallet->cs_wallet);
 
         transaction.newPossibleKeyChange(wallet);
-        int64_t nFeeRequired = 0;
+        CAmount nFeeRequired = 0;
         std::string strFailReason;
 
         CWalletTx *newTx = transaction.getTransaction();
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 111ae2178c3c..b1d0f28f127f 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -37,7 +37,7 @@ class SendCoinsRecipient
 {
 public:
     explicit SendCoinsRecipient() : amount(0), nVersion(SendCoinsRecipient::CURRENT_VERSION) { }
-    explicit SendCoinsRecipient(const QString &addr, const QString &label, quint64 amount, const QString &message):
+    explicit SendCoinsRecipient(const QString &addr, const QString &label, const CAmount& amount, const QString &message):
         address(addr), label(label), amount(amount), message(message), nVersion(SendCoinsRecipient::CURRENT_VERSION) {}
 
     // If from an insecure payment request, this is used for storing
@@ -47,7 +47,7 @@ class SendCoinsRecipient
     // Todo: This is a hack, should be replaced with a cleaner solution!
     QString address;
     QString label;
-    qint64 amount;
+    CAmount amount;
     // If from a payment request, this is used for storing the memo
     QString message;
 
@@ -125,13 +125,13 @@ class WalletModel : public QObject
     TransactionTableModel *getTransactionTableModel();
     RecentRequestsTableModel *getRecentRequestsTableModel();
 
-    qint64 getBalance(const CCoinControl *coinControl = NULL) const;
-    qint64 getUnconfirmedBalance() const;
-    qint64 getImmatureBalance() const;
+    CAmount getBalance(const CCoinControl *coinControl = NULL) const;
+    CAmount getUnconfirmedBalance() const;
+    CAmount getImmatureBalance() const;
     bool haveWatchOnly() const;
-    qint64 getWatchBalance() const;
-    qint64 getWatchUnconfirmedBalance() const;
-    qint64 getWatchImmatureBalance() const;
+    CAmount getWatchBalance() const;
+    CAmount getWatchUnconfirmedBalance() const;
+    CAmount getWatchImmatureBalance() const;
     EncryptionStatus getEncryptionStatus() const;
     bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
 
@@ -210,12 +210,12 @@ class WalletModel : public QObject
     RecentRequestsTableModel *recentRequestsTableModel;
 
     // Cache some values to be able to detect changes
-    qint64 cachedBalance;
-    qint64 cachedUnconfirmedBalance;
-    qint64 cachedImmatureBalance;
-    qint64 cachedWatchOnlyBalance;
-    qint64 cachedWatchUnconfBalance;
-    qint64 cachedWatchImmatureBalance;
+    CAmount cachedBalance;
+    CAmount cachedUnconfirmedBalance;
+    CAmount cachedImmatureBalance;
+    CAmount cachedWatchOnlyBalance;
+    CAmount cachedWatchUnconfBalance;
+    CAmount cachedWatchImmatureBalance;
     EncryptionStatus cachedEncryptionStatus;
     int cachedNumBlocks;
 
@@ -227,8 +227,8 @@ class WalletModel : public QObject
 
 signals:
     // Signal that balance in wallet changed
-    void balanceChanged(qint64 balance, qint64 unconfirmedBalance, qint64 immatureBalance,
-                        qint64 watchOnlyBalance, qint64 watchUnconfBalance, qint64 watchImmatureBalance);
+    void balanceChanged(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
+                        const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
 
     // Encryption status of wallet changed
     void encryptionStatusChanged(int status);
diff --git a/src/qt/walletmodeltransaction.cpp b/src/qt/walletmodeltransaction.cpp
index 943f13e2089b..ddd2d09bb534 100644
--- a/src/qt/walletmodeltransaction.cpp
+++ b/src/qt/walletmodeltransaction.cpp
@@ -31,19 +31,19 @@ CWalletTx *WalletModelTransaction::getTransaction()
     return walletTransaction;
 }
 
-qint64 WalletModelTransaction::getTransactionFee()
+CAmount WalletModelTransaction::getTransactionFee()
 {
     return fee;
 }
 
-void WalletModelTransaction::setTransactionFee(qint64 newFee)
+void WalletModelTransaction::setTransactionFee(const CAmount& newFee)
 {
     fee = newFee;
 }
 
-qint64 WalletModelTransaction::getTotalTransactionAmount()
+CAmount WalletModelTransaction::getTotalTransactionAmount()
 {
-    qint64 totalTransactionAmount = 0;
+    CAmount totalTransactionAmount = 0;
     foreach(const SendCoinsRecipient &rcp, recipients)
     {
         totalTransactionAmount += rcp.amount;
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index b7e85bcd11a6..4eadfbe4d19f 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -26,10 +26,10 @@ class WalletModelTransaction
 
     CWalletTx *getTransaction();
 
-    void setTransactionFee(qint64 newFee);
-    qint64 getTransactionFee();
+    void setTransactionFee(const CAmount& newFee);
+    CAmount getTransactionFee();
 
-    qint64 getTotalTransactionAmount();
+    CAmount getTotalTransactionAmount();
 
     void newPossibleKeyChange(CWallet *wallet);
     CReserveKey *getPossibleKeyChange();
@@ -38,7 +38,7 @@ class WalletModelTransaction
     const QList<SendCoinsRecipient> recipients;
     CWalletTx *walletTransaction;
     CReserveKey *keyChange;
-    qint64 fee;
+    CAmount fee;
 };
 
 #endif // WALLETMODELTRANSACTION_H
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index b40ddc0a2f25..322d0a6ee606 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -92,7 +92,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
         connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int)));
 
         // Pass through transaction notifications
-        connect(this, SIGNAL(incomingTransaction(QString,int,qint64,QString,QString)), gui, SLOT(incomingTransaction(QString,int,qint64,QString,QString)));
+        connect(this, SIGNAL(incomingTransaction(QString,int,const CAmount&,QString,QString)), gui, SLOT(incomingTransaction(QString,int,const CAmount&,QString,QString)));
     }
 }
 
diff --git a/src/qt/walletview.h b/src/qt/walletview.h
index 9cfa8d67609c..cafba517fdf9 100644
--- a/src/qt/walletview.h
+++ b/src/qt/walletview.h
@@ -5,6 +5,8 @@
 #ifndef WALLETVIEW_H
 #define WALLETVIEW_H
 
+#include "amount.h"
+
 #include <QStackedWidget>
 
 class BitcoinGUI;
@@ -111,7 +113,7 @@ public slots:
     /** Encryption status of wallet changed */
     void encryptionStatusChanged(int status);
     /** Notify that a new transaction appeared */
-    void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
+    void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address);
 };
 
 #endif // WALLETVIEW_H
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 82eaf5d03793..e794bf69e002 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -273,7 +273,7 @@ Value prioritisetransaction(const Array& params, bool fHelp)
     uint256 hash;
     hash.SetHex(params[0].get_str());
 
-    int64_t nAmount = 0;
+    CAmount nAmount = 0;
     if (params[2].get_real() != 0.0)
         nAmount = AmountFromValue(params[2]);
 
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index dbb0966ae2c5..bd87d77704ca 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -269,7 +269,7 @@ Value listunspent(const Array& params, bool fHelp)
                 continue;
         }
 
-        int64_t nValue = out.tx->vout[out.i].nValue;
+        CAmount nValue = out.tx->vout[out.i].nValue;
         const CScript& pk = out.tx->vout[out.i].scriptPubKey;
         Object entry;
         entry.push_back(Pair("txid", out.tx->GetHash().GetHex()));
@@ -367,7 +367,7 @@ Value createrawtransaction(const Array& params, bool fHelp)
         setAddress.insert(address);
 
         CScript scriptPubKey = GetScriptForDestination(address.Get());
-        int64_t nAmount = AmountFromValue(s.value_);
+        CAmount nAmount = AmountFromValue(s.value_);
 
         CTxOut out(nAmount, scriptPubKey);
         rawTx.vout.push_back(out);
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 190de622827e..1a41344da53a 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -88,18 +88,18 @@ static inline int64_t roundint64(double d)
     return (int64_t)(d > 0 ? d + 0.5 : d - 0.5);
 }
 
-int64_t AmountFromValue(const Value& value)
+CAmount AmountFromValue(const Value& value)
 {
     double dAmount = value.get_real();
     if (dAmount <= 0.0 || dAmount > 21000000.0)
         throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
-    int64_t nAmount = roundint64(dAmount * COIN);
+    CAmount nAmount = roundint64(dAmount * COIN);
     if (!MoneyRange(nAmount))
         throw JSONRPCError(RPC_TYPE_ERROR, "Invalid amount");
     return nAmount;
 }
 
-Value ValueFromAmount(int64_t amount)
+Value ValueFromAmount(const CAmount& amount)
 {
     return (double)amount / (double)COIN;
 }
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 820c1bc08176..d440035f151d 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -6,6 +6,7 @@
 #ifndef _BITCOINRPC_SERVER_H_
 #define _BITCOINRPC_SERVER_H_
 
+#include "amount.h"
 #include "uint256.h"
 #include "rpcprotocol.h"
 
@@ -116,8 +117,8 @@ extern void InitRPCMining();
 extern void ShutdownRPCMining();
 
 extern int64_t nWalletUnlockTime;
-extern int64_t AmountFromValue(const json_spirit::Value& value);
-extern json_spirit::Value ValueFromAmount(int64_t amount);
+extern CAmount AmountFromValue(const json_spirit::Value& value);
+extern json_spirit::Value ValueFromAmount(const CAmount& amount);
 extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
 extern std::string HelpRequiringPassphrase();
 extern std::string HelpExampleCli(std::string methodname, std::string args);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 35637362a43e..632c46acd591 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -331,7 +331,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
 
     // Amount
-    int64_t nAmount = AmountFromValue(params[1]);
+    CAmount nAmount = AmountFromValue(params[1]);
 
     // Wallet comments
     CWalletTx wtx;
@@ -375,7 +375,7 @@ Value listaddressgroupings(const Array& params, bool fHelp)
         );
 
     Array jsonGroupings;
-    map<CTxDestination, int64_t> balances = pwalletMain->GetAddressBalances();
+    map<CTxDestination, CAmount> balances = pwalletMain->GetAddressBalances();
     BOOST_FOREACH(set<CTxDestination> grouping, pwalletMain->GetAddressGroupings())
     {
         Array jsonGrouping;
@@ -483,7 +483,7 @@ Value getreceivedbyaddress(const Array& params, bool fHelp)
         nMinDepth = params[1].get_int();
 
     // Tally
-    int64_t nAmount = 0;
+    CAmount nAmount = 0;
     for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
     {
         const CWalletTx& wtx = (*it).second;
@@ -532,7 +532,7 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
     set<CTxDestination> setAddress = pwalletMain->GetAccountAddresses(strAccount);
 
     // Tally
-    int64_t nAmount = 0;
+    CAmount nAmount = 0;
     for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
     {
         const CWalletTx& wtx = (*it).second;
@@ -552,9 +552,9 @@ Value getreceivedbyaccount(const Array& params, bool fHelp)
 }
 
 
-int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth, const isminefilter& filter)
+CAmount GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMinDepth, const isminefilter& filter)
 {
-    int64_t nBalance = 0;
+    CAmount nBalance = 0;
 
     // Tally wallet transactions
     for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
@@ -563,7 +563,7 @@ int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMi
         if (!IsFinalTx(wtx) || wtx.GetBlocksToMaturity() > 0 || wtx.GetDepthInMainChain() < 0)
             continue;
 
-        int64_t nReceived, nSent, nFee;
+        CAmount nReceived, nSent, nFee;
         wtx.GetAccountAmounts(strAccount, nReceived, nSent, nFee, filter);
 
         if (nReceived != 0 && wtx.GetDepthInMainChain() >= nMinDepth)
@@ -577,7 +577,7 @@ int64_t GetAccountBalance(CWalletDB& walletdb, const string& strAccount, int nMi
     return nBalance;
 }
 
-int64_t GetAccountBalance(const string& strAccount, int nMinDepth, const isminefilter& filter)
+CAmount GetAccountBalance(const string& strAccount, int nMinDepth, const isminefilter& filter)
 {
     CWalletDB walletdb(pwalletMain->strWalletFile);
     return GetAccountBalance(walletdb, strAccount, nMinDepth, filter);
@@ -627,14 +627,14 @@ Value getbalance(const Array& params, bool fHelp)
         // Calculate total balance a different way from GetBalance()
         // (GetBalance() sums up all unspent TxOuts)
         // getbalance and getbalance '*' 0 should return the same number
-        int64_t nBalance = 0;
+        CAmount nBalance = 0;
         for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
         {
             const CWalletTx& wtx = (*it).second;
             if (!wtx.IsTrusted() || wtx.GetBlocksToMaturity() > 0)
                 continue;
 
-            int64_t allFee;
+            CAmount allFee;
             string strSentAccount;
             list<COutputEntry> listReceived;
             list<COutputEntry> listSent;
@@ -653,7 +653,7 @@ Value getbalance(const Array& params, bool fHelp)
 
     string strAccount = AccountFromValue(params[0]);
 
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, filter);
+    CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, filter);
 
     return ValueFromAmount(nBalance);
 }
@@ -692,7 +692,7 @@ Value movecmd(const Array& params, bool fHelp)
 
     string strFrom = AccountFromValue(params[0]);
     string strTo = AccountFromValue(params[1]);
-    int64_t nAmount = AmountFromValue(params[2]);
+    CAmount nAmount = AmountFromValue(params[2]);
     if (params.size() > 3)
         // unused parameter, used to be nMinDepth, keep type-checking it though
         (void)params[3].get_int();
@@ -766,7 +766,7 @@ Value sendfrom(const Array& params, bool fHelp)
     CBitcoinAddress address(params[1].get_str());
     if (!address.IsValid())
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address");
-    int64_t nAmount = AmountFromValue(params[2]);
+    CAmount nAmount = AmountFromValue(params[2]);
     int nMinDepth = 1;
     if (params.size() > 3)
         nMinDepth = params[3].get_int();
@@ -781,7 +781,7 @@ Value sendfrom(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
+    CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
     if (nAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
@@ -834,9 +834,9 @@ Value sendmany(const Array& params, bool fHelp)
         wtx.mapValue["comment"] = params[3].get_str();
 
     set<CBitcoinAddress> setAddress;
-    vector<pair<CScript, int64_t> > vecSend;
+    vector<pair<CScript, CAmount> > vecSend;
 
-    int64_t totalAmount = 0;
+    CAmount totalAmount = 0;
     BOOST_FOREACH(const Pair& s, sendTo)
     {
         CBitcoinAddress address(s.name_);
@@ -848,7 +848,7 @@ Value sendmany(const Array& params, bool fHelp)
         setAddress.insert(address);
 
         CScript scriptPubKey = GetScriptForDestination(address.Get());
-        int64_t nAmount = AmountFromValue(s.value_);
+        CAmount nAmount = AmountFromValue(s.value_);
         totalAmount += nAmount;
 
         vecSend.push_back(make_pair(scriptPubKey, nAmount));
@@ -857,13 +857,13 @@ Value sendmany(const Array& params, bool fHelp)
     EnsureWalletIsUnlocked();
 
     // Check funds
-    int64_t nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
+    CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
     if (totalAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
     // Send
     CReserveKey keyChange(pwalletMain);
-    int64_t nFeeRequired = 0;
+    CAmount nFeeRequired = 0;
     string strFailReason;
     bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason);
     if (!fCreated)
@@ -923,7 +923,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
 
 struct tallyitem
 {
-    int64_t nAmount;
+    CAmount nAmount;
     int nConf;
     vector<uint256> txids;
     bool fIsWatchonly;
@@ -995,7 +995,7 @@ Value ListReceived(const Array& params, bool fByAccounts)
         if (it == mapTally.end() && !fIncludeEmpty)
             continue;
 
-        int64_t nAmount = 0;
+        CAmount nAmount = 0;
         int nConf = std::numeric_limits<int>::max();
         bool fIsWatchonly = false;
         if (it != mapTally.end())
@@ -1038,7 +1038,7 @@ Value ListReceived(const Array& params, bool fByAccounts)
     {
         for (map<string, tallyitem>::iterator it = mapAccountTally.begin(); it != mapAccountTally.end(); ++it)
         {
-            int64_t nAmount = (*it).second.nAmount;
+            CAmount nAmount = (*it).second.nAmount;
             int nConf = (*it).second.nConf;
             Object obj;
             if((*it).second.fIsWatchonly)
@@ -1125,7 +1125,7 @@ static void MaybePushAddress(Object & entry, const CTxDestination &dest)
 
 void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDepth, bool fLong, Array& ret, const isminefilter& filter)
 {
-    int64_t nFee;
+    CAmount nFee;
     string strSentAccount;
     list<COutputEntry> listReceived;
     list<COutputEntry> listSent;
@@ -1355,7 +1355,7 @@ Value listaccounts(const Array& params, bool fHelp)
         if(params[1].get_bool())
             includeWatchonly = includeWatchonly | ISMINE_WATCH_ONLY;
 
-    map<string, int64_t> mapAccountBalances;
+    map<string, CAmount> mapAccountBalances;
     BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& entry, pwalletMain->mapAddressBook) {
         if (IsMine(*pwalletMain, entry.first) & includeWatchonly) // This address belongs to me
             mapAccountBalances[entry.second.name] = 0;
@@ -1364,7 +1364,7 @@ Value listaccounts(const Array& params, bool fHelp)
     for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
     {
         const CWalletTx& wtx = (*it).second;
-        int64_t nFee;
+        CAmount nFee;
         string strSentAccount;
         list<COutputEntry> listReceived;
         list<COutputEntry> listSent;
@@ -1391,7 +1391,7 @@ Value listaccounts(const Array& params, bool fHelp)
         mapAccountBalances[entry.strAccount] += entry.nCreditDebit;
 
     Object ret;
-    BOOST_FOREACH(const PAIRTYPE(string, int64_t)& accountBalance, mapAccountBalances) {
+    BOOST_FOREACH(const PAIRTYPE(string, CAmount)& accountBalance, mapAccountBalances) {
         ret.push_back(Pair(accountBalance.first, ValueFromAmount(accountBalance.second)));
     }
     return ret;
@@ -1534,10 +1534,10 @@ Value gettransaction(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
     const CWalletTx& wtx = pwalletMain->mapWallet[hash];
 
-    int64_t nCredit = wtx.GetCredit(filter != 0);
-    int64_t nDebit = wtx.GetDebit(filter);
-    int64_t nNet = nCredit - nDebit;
-    int64_t nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
+    CAmount nCredit = wtx.GetCredit(filter != 0);
+    CAmount nDebit = wtx.GetDebit(filter);
+    CAmount nNet = nCredit - nDebit;
+    CAmount nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
 
     entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee)));
     if (wtx.IsFromMe(filter))
@@ -1937,7 +1937,7 @@ Value settxfee(const Array& params, bool fHelp)
         );
 
     // Amount
-    int64_t nAmount = 0;
+    CAmount nAmount = 0;
     if (params[0].get_real() != 0.0)
         nAmount = AmountFromValue(params[0]);        // rejects 0.0 amounts
 
diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp
index 4bee0f6b6e26..af2a9a214f0c 100644
--- a/src/test/accounting_tests.cpp
+++ b/src/test/accounting_tests.cpp
@@ -15,7 +15,7 @@ extern CWallet* pwalletMain;
 BOOST_AUTO_TEST_SUITE(accounting_tests)
 
 static void
-GetResults(CWalletDB& walletdb, std::map<int64_t, CAccountingEntry>& results)
+GetResults(CWalletDB& walletdb, std::map<CAmount, CAccountingEntry>& results)
 {
     std::list<CAccountingEntry> aes;
 
@@ -34,7 +34,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
     std::vector<CWalletTx*> vpwtx;
     CWalletTx wtx;
     CAccountingEntry ae;
-    std::map<int64_t, CAccountingEntry> results;
+    std::map<CAmount, CAccountingEntry> results;
 
     LOCK(pwalletMain->cs_wallet);
 
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index 8863ba400497..70a800af51b7 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -11,9 +11,9 @@ BOOST_AUTO_TEST_SUITE(main_tests)
 
 BOOST_AUTO_TEST_CASE(subsidy_limit_test)
 {
-    uint64_t nSum = 0;
+    CAmount nSum = 0;
     for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
-        uint64_t nSubsidy = GetBlockValue(nHeight, 0);
+        CAmount nSubsidy = GetBlockValue(nHeight, 0);
         BOOST_CHECK(nSubsidy <= 50 * COIN);
         nSum += nSubsidy * 1000;
         BOOST_CHECK(MoneyRange(nSum));
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index e077c9de3bf3..6378bd09418e 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE(util_FormatMoney)
 
 BOOST_AUTO_TEST_CASE(util_ParseMoney)
 {
-    int64_t ret = 0;
+    CAmount ret = 0;
     BOOST_CHECK(ParseMoney("0.0", ret));
     BOOST_CHECK_EQUAL(ret, 0);
 
diff --git a/src/test/wallet_tests.cpp b/src/test/wallet_tests.cpp
index 3887efbd0d98..90fc470e0645 100644
--- a/src/test/wallet_tests.cpp
+++ b/src/test/wallet_tests.cpp
@@ -28,7 +28,7 @@ BOOST_AUTO_TEST_SUITE(wallet_tests)
 static CWallet wallet;
 static vector<COutput> vCoins;
 
-static void add_coin(int64_t nValue, int nAge = 6*24, bool fIsFromMe = false, int nInput=0)
+static void add_coin(const CAmount& nValue, int nAge = 6*24, bool fIsFromMe = false, int nInput=0)
 {
     static int nextLockTime = 0;
     CMutableTransaction tx;
@@ -66,7 +66,7 @@ static bool equal_sets(CoinSet a, CoinSet b)
 BOOST_AUTO_TEST_CASE(coin_selection_tests)
 {
     CoinSet setCoinsRet, setCoinsRet2;
-    int64_t nValueRet;
+    CAmount nValueRet;
 
     LOCK(wallet.cs_wallet);
 
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 79838b6116e9..d5f424fabdde 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -117,7 +117,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
     CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
     stats.hashBlock = GetBestBlock();
     ss << stats.hashBlock;
-    int64_t nTotalAmount = 0;
+    CAmount nTotalAmount = 0;
     while (pcursor->Valid()) {
         boost::this_thread::interruption_point();
         try {
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 52d07bf6a08c..d923c2204a54 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -7,6 +7,7 @@
 
 #include "core.h"
 #include "util.h"
+#include "utilmoneystr.h"
 
 #include <boost/circular_buffer.hpp>
 
@@ -18,7 +19,7 @@ CTxMemPoolEntry::CTxMemPoolEntry():
     nHeight = MEMPOOL_HEIGHT;
 }
 
-CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, int64_t _nFee,
+CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
                                  int64_t _nTime, double _dPriority,
                                  unsigned int _nHeight):
     tx(_tx), nFee(_nFee), nTime(_nTime), dPriority(_dPriority), nHeight(_nHeight)
@@ -36,7 +37,7 @@ CTxMemPoolEntry::CTxMemPoolEntry(const CTxMemPoolEntry& other)
 double
 CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
 {
-    int64_t nValueIn = tx.GetValueOut()+nFee;
+    CAmount nValueIn = tx.GetValueOut()+nFee;
     double deltaPriority = ((double)(currentHeight-nHeight)*nValueIn)/nModSize;
     double dResult = dPriority + deltaPriority;
     return dResult;
@@ -601,24 +602,24 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
     return true;
 }
 
-void CTxMemPool::PrioritiseTransaction(const uint256 hash, const string strHash, double dPriorityDelta, int64_t nFeeDelta)
+void CTxMemPool::PrioritiseTransaction(const uint256 hash, const string strHash, double dPriorityDelta, const CAmount& nFeeDelta)
 {
     {
         LOCK(cs);
-        std::pair<double, int64_t> &deltas = mapDeltas[hash];
+        std::pair<double, CAmount> &deltas = mapDeltas[hash];
         deltas.first += dPriorityDelta;
         deltas.second += nFeeDelta;
     }
-    LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash, dPriorityDelta, nFeeDelta);
+    LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash, dPriorityDelta, FormatMoney(nFeeDelta));
 }
 
-void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta)
+void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta)
 {
     LOCK(cs);
-    std::map<uint256, std::pair<double, int64_t> >::iterator pos = mapDeltas.find(hash);
+    std::map<uint256, std::pair<double, CAmount> >::iterator pos = mapDeltas.find(hash);
     if (pos == mapDeltas.end())
         return;
-    const std::pair<double, int64_t> &deltas = pos->second;
+    const std::pair<double, CAmount> &deltas = pos->second;
     dPriorityDelta += deltas.first;
     nFeeDelta += deltas.second;
 }
diff --git a/src/txmempool.h b/src/txmempool.h
index b9d50ee0bc19..c35ea52d4e00 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -29,7 +29,7 @@ class CTxMemPoolEntry
 {
 private:
     CTransaction tx;
-    int64_t nFee; // Cached to avoid expensive parent-transaction lookups
+    CAmount nFee; // Cached to avoid expensive parent-transaction lookups
     size_t nTxSize; // ... and avoid recomputing tx size
     size_t nModSize; // ... and modified size for priority
     int64_t nTime; // Local time when entering the mempool
@@ -37,14 +37,14 @@ class CTxMemPoolEntry
     unsigned int nHeight; // Chain height when entering the mempool
 
 public:
-    CTxMemPoolEntry(const CTransaction& _tx, int64_t _nFee,
+    CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
                     int64_t _nTime, double _dPriority, unsigned int _nHeight);
     CTxMemPoolEntry();
     CTxMemPoolEntry(const CTxMemPoolEntry& other);
 
     const CTransaction& GetTx() const { return this->tx; }
     double GetPriority(unsigned int currentHeight) const;
-    int64_t GetFee() const { return nFee; }
+    CAmount GetFee() const { return nFee; }
     size_t GetTxSize() const { return nTxSize; }
     int64_t GetTime() const { return nTime; }
     unsigned int GetHeight() const { return nHeight; }
@@ -76,7 +76,7 @@ class CTxMemPool
     mutable CCriticalSection cs;
     std::map<uint256, CTxMemPoolEntry> mapTx;
     std::map<COutPoint, CInPoint> mapNextTx;
-    std::map<uint256, std::pair<double, int64_t> > mapDeltas;
+    std::map<uint256, std::pair<double, CAmount> > mapDeltas;
 
     CTxMemPool(const CFeeRate& _minRelayFee);
     ~CTxMemPool();
@@ -102,8 +102,8 @@ class CTxMemPool
     void AddTransactionsUpdated(unsigned int n);
 
     /** Affect CreateNewBlock prioritisation of transactions */
-    void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, int64_t nFeeDelta);
-    void ApplyDeltas(const uint256 hash, double &dPriorityDelta, int64_t &nFeeDelta);
+    void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta);
+    void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta);
     void ClearPrioritisation(const uint256 hash);
 
     unsigned long size()
diff --git a/src/util.h b/src/util.h
index 4b2415278ba3..fb1d3eacb575 100644
--- a/src/util.h
+++ b/src/util.h
@@ -14,6 +14,7 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include "amount.h"
 #include "compat.h"
 #include "tinyformat.h"
 #include "utiltime.h"
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index c169355f05a2..1a5635bfb8d0 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -10,7 +10,7 @@
 
 using namespace std;
 
-string FormatMoney(int64_t n, bool fPlus)
+string FormatMoney(const CAmount& n, bool fPlus)
 {
     // Note: not using straight sprintf here because we do NOT want
     // localized number formatting.
@@ -34,12 +34,12 @@ string FormatMoney(int64_t n, bool fPlus)
 }
 
 
-bool ParseMoney(const string& str, int64_t& nRet)
+bool ParseMoney(const string& str, CAmount& nRet)
 {
     return ParseMoney(str.c_str(), nRet);
 }
 
-bool ParseMoney(const char* pszIn, int64_t& nRet)
+bool ParseMoney(const char* pszIn, CAmount& nRet)
 {
     string strWhole;
     int64_t nUnits = 0;
@@ -73,7 +73,7 @@ bool ParseMoney(const char* pszIn, int64_t& nRet)
     if (nUnits < 0 || nUnits > COIN)
         return false;
     int64_t nWhole = atoi64(strWhole);
-    int64_t nValue = nWhole*COIN + nUnits;
+    CAmount nValue = nWhole*COIN + nUnits;
 
     nRet = nValue;
     return true;
diff --git a/src/utilmoneystr.h b/src/utilmoneystr.h
index f0c61aa13828..65415afd3f31 100644
--- a/src/utilmoneystr.h
+++ b/src/utilmoneystr.h
@@ -12,8 +12,10 @@
 #include <stdint.h>
 #include <string>
 
-std::string FormatMoney(int64_t n, bool fPlus=false);
-bool ParseMoney(const std::string& str, int64_t& nRet);
-bool ParseMoney(const char* pszIn, int64_t& nRet);
+#include "amount.h"
+
+std::string FormatMoney(const CAmount& n, bool fPlus=false);
+bool ParseMoney(const std::string& str, CAmount& nRet);
+bool ParseMoney(const char* pszIn, CAmount& nRet);
 
 #endif // BITCOIN_UTILMONEYSTR_H
diff --git a/src/wallet.cpp b/src/wallet.cpp
index e69f59aacdb9..b20b0007ce28 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -35,8 +35,8 @@ CFeeRate CWallet::minTxFee = CFeeRate(10000);  // Override with -mintxfee
 
 struct CompareValueOnly
 {
-    bool operator()(const pair<int64_t, pair<const CWalletTx*, unsigned int> >& t1,
-                    const pair<int64_t, pair<const CWalletTx*, unsigned int> >& t2) const
+    bool operator()(const pair<CAmount, pair<const CWalletTx*, unsigned int> >& t1,
+                    const pair<CAmount, pair<const CWalletTx*, unsigned int> >& t2) const
     {
         return t1.first < t2.first;
     }
@@ -697,7 +697,7 @@ isminetype CWallet::IsMine(const CTxIn &txin) const
     return ISMINE_NO;
 }
 
-int64_t CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
+CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
 {
     {
         LOCK(cs_wallet);
@@ -781,7 +781,7 @@ int CWalletTx::GetRequestCount() const
 }
 
 void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
-                           list<COutputEntry>& listSent, int64_t& nFee, string& strSentAccount, const isminefilter& filter) const
+                           list<COutputEntry>& listSent, CAmount& nFee, string& strSentAccount, const isminefilter& filter) const
 {
     nFee = 0;
     listReceived.clear();
@@ -789,10 +789,10 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
     strSentAccount = strFromAccount;
 
     // Compute fee:
-    int64_t nDebit = GetDebit(filter);
+    CAmount nDebit = GetDebit(filter);
     if (nDebit > 0) // debit>0 means we signed/sent this transaction
     {
-        int64_t nValueOut = GetValueOut();
+        CAmount nValueOut = GetValueOut();
         nFee = nDebit - nValueOut;
     }
 
@@ -835,12 +835,12 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
 
 }
 
-void CWalletTx::GetAccountAmounts(const string& strAccount, int64_t& nReceived,
-                                  int64_t& nSent, int64_t& nFee, const isminefilter& filter) const
+void CWalletTx::GetAccountAmounts(const string& strAccount, CAmount& nReceived,
+                                  CAmount& nSent, CAmount& nFee, const isminefilter& filter) const
 {
     nReceived = nSent = nFee = 0;
 
-    int64_t allFee;
+    CAmount allFee;
     string strSentAccount;
     list<COutputEntry> listReceived;
     list<COutputEntry> listSent;
@@ -1011,9 +1011,9 @@ void CWallet::ResendWalletTransactions()
 //
 
 
-int64_t CWallet::GetBalance() const
+CAmount CWallet::GetBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1027,9 +1027,9 @@ int64_t CWallet::GetBalance() const
     return nTotal;
 }
 
-int64_t CWallet::GetUnconfirmedBalance() const
+CAmount CWallet::GetUnconfirmedBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1042,9 +1042,9 @@ int64_t CWallet::GetUnconfirmedBalance() const
     return nTotal;
 }
 
-int64_t CWallet::GetImmatureBalance() const
+CAmount CWallet::GetImmatureBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1056,9 +1056,9 @@ int64_t CWallet::GetImmatureBalance() const
     return nTotal;
 }
 
-int64_t CWallet::GetWatchOnlyBalance() const
+CAmount CWallet::GetWatchOnlyBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1072,9 +1072,9 @@ int64_t CWallet::GetWatchOnlyBalance() const
     return nTotal;
 }
 
-int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
+CAmount CWallet::GetUnconfirmedWatchOnlyBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1087,9 +1087,9 @@ int64_t CWallet::GetUnconfirmedWatchOnlyBalance() const
     return nTotal;
 }
 
-int64_t CWallet::GetImmatureWatchOnlyBalance() const
+CAmount CWallet::GetImmatureWatchOnlyBalance() const
 {
-    int64_t nTotal = 0;
+    CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
         for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
@@ -1137,8 +1137,8 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
     }
 }
 
-static void ApproximateBestSubset(vector<pair<int64_t, pair<const CWalletTx*,unsigned int> > >vValue, int64_t nTotalLower, int64_t nTargetValue,
-                                  vector<char>& vfBest, int64_t& nBest, int iterations = 1000)
+static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,unsigned int> > >vValue, const CAmount& nTotalLower, const CAmount& nTargetValue,
+                                  vector<char>& vfBest, CAmount& nBest, int iterations = 1000)
 {
     vector<char> vfIncluded;
 
@@ -1150,7 +1150,7 @@ static void ApproximateBestSubset(vector<pair<int64_t, pair<const CWalletTx*,uns
     for (int nRep = 0; nRep < iterations && nBest != nTargetValue; nRep++)
     {
         vfIncluded.assign(vValue.size(), false);
-        int64_t nTotal = 0;
+        CAmount nTotal = 0;
         bool fReachedTarget = false;
         for (int nPass = 0; nPass < 2 && !fReachedTarget; nPass++)
         {
@@ -1183,18 +1183,18 @@ static void ApproximateBestSubset(vector<pair<int64_t, pair<const CWalletTx*,uns
     }
 }
 
-bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins,
-                                 set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet) const
+bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins,
+                                 set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const
 {
     setCoinsRet.clear();
     nValueRet = 0;
 
     // List of values less than target
-    pair<int64_t, pair<const CWalletTx*,unsigned int> > coinLowestLarger;
-    coinLowestLarger.first = std::numeric_limits<int64_t>::max();
+    pair<CAmount, pair<const CWalletTx*,unsigned int> > coinLowestLarger;
+    coinLowestLarger.first = std::numeric_limits<CAmount>::max();
     coinLowestLarger.second.first = NULL;
-    vector<pair<int64_t, pair<const CWalletTx*,unsigned int> > > vValue;
-    int64_t nTotalLower = 0;
+    vector<pair<CAmount, pair<const CWalletTx*,unsigned int> > > vValue;
+    CAmount nTotalLower = 0;
 
     random_shuffle(vCoins.begin(), vCoins.end(), GetRandInt);
 
@@ -1209,9 +1209,9 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
             continue;
 
         int i = output.i;
-        int64_t n = pcoin->vout[i].nValue;
+        CAmount n = pcoin->vout[i].nValue;
 
-        pair<int64_t,pair<const CWalletTx*,unsigned int> > coin = make_pair(n,make_pair(pcoin, i));
+        pair<CAmount,pair<const CWalletTx*,unsigned int> > coin = make_pair(n,make_pair(pcoin, i));
 
         if (n == nTargetValue)
         {
@@ -1252,7 +1252,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
     // Solve subset sum by stochastic approximation
     sort(vValue.rbegin(), vValue.rend(), CompareValueOnly());
     vector<char> vfBest;
-    int64_t nBest;
+    CAmount nBest;
 
     ApproximateBestSubset(vValue, nTotalLower, nTargetValue, vfBest, nBest, 1000);
     if (nBest != nTargetValue && nTotalLower >= nTargetValue + CENT)
@@ -1284,7 +1284,7 @@ bool CWallet::SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfT
     return true;
 }
 
-bool CWallet::SelectCoins(int64_t nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet, const CCoinControl* coinControl) const
+bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet, const CCoinControl* coinControl) const
 {
     vector<COutput> vCoins;
     AvailableCoins(vCoins, true, coinControl);
@@ -1310,11 +1310,11 @@ bool CWallet::SelectCoins(int64_t nTargetValue, set<pair<const CWalletTx*,unsign
 
 
 
-bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl)
+bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl)
 {
-    int64_t nValue = 0;
-    BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend)
+    CAmount nValue = 0;
+    BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
     {
         if (nValue < 0)
         {
@@ -1343,10 +1343,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 txNew.vout.clear();
                 wtxNew.fFromMe = true;
 
-                int64_t nTotalValue = nValue + nFeeRet;
+                CAmount nTotalValue = nValue + nFeeRet;
                 double dPriority = 0;
                 // vouts to the payees
-                BOOST_FOREACH (const PAIRTYPE(CScript, int64_t)& s, vecSend)
+                BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
                 {
                     CTxOut txout(s.second, s.first);
                     if (txout.IsDust(::minRelayTxFee))
@@ -1359,7 +1359,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
 
                 // Choose coins to use
                 set<pair<const CWalletTx*,unsigned int> > setCoins;
-                int64_t nValueIn = 0;
+                CAmount nValueIn = 0;
                 if (!SelectCoins(nTotalValue, setCoins, nValueIn, coinControl))
                 {
                     strFailReason = _("Insufficient funds");
@@ -1367,14 +1367,14 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 }
                 BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
                 {
-                    int64_t nCredit = pcoin.first->vout[pcoin.second].nValue;
+                    CAmount nCredit = pcoin.first->vout[pcoin.second].nValue;
                     //The priority after the next block (depth+1) is used instead of the current,
                     //reflecting an assumption the user would accept a bit more delay for
                     //a chance at a free transaction.
                     dPriority += (double)nCredit * (pcoin.first->GetDepthInMainChain()+1);
                 }
 
-                int64_t nChange = nValueIn - nValue - nFeeRet;
+                CAmount nChange = nValueIn - nValue - nFeeRet;
 
                 if (nChange > 0)
                 {
@@ -1450,7 +1450,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
                 }
                 dPriority = wtxNew.ComputePriority(dPriority, nBytes);
 
-                int64_t nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+                CAmount nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
 
                 if (nFeeRet >= nFeeNeeded)
                     break; // Done, enough fee included.
@@ -1481,10 +1481,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64_t> >& vecSend,
     return true;
 }
 
-bool CWallet::CreateTransaction(CScript scriptPubKey, int64_t nValue,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl)
+bool CWallet::CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl)
 {
-    vector< pair<CScript, int64_t> > vecSend;
+    vector< pair<CScript, CAmount> > vecSend;
     vecSend.push_back(make_pair(scriptPubKey, nValue));
     return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl);
 }
@@ -1539,7 +1539,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
 
 
 
-string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew)
+string CWallet::SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
 {
     // Check amount
     if (nValue <= 0)
@@ -1560,7 +1560,7 @@ string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWallet
 
     // Create and send the transaction
     CReserveKey reservekey(this);
-    int64_t nFeeRequired;
+    CAmount nFeeRequired;
     if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
     {
         if (nValue + nFeeRequired > GetBalance())
@@ -1576,10 +1576,10 @@ string CWallet::SendMoney(const CTxDestination &address, int64_t nValue, CWallet
 
 
 
-int64_t CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool)
+CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool)
 {
     // payTxFee is user-set "I want to pay this much"
-    int64_t nFeeNeeded = payTxFee.GetFee(nTxBytes);
+    CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes);
     // User didn't set: use -txconfirmtarget to estimate...
     if (nFeeNeeded == 0)
         nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);
@@ -1838,9 +1838,9 @@ int64_t CWallet::GetOldestKeyPoolTime()
     return keypool.nTime;
 }
 
-std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
+std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
 {
-    map<CTxDestination, int64_t> balances;
+    map<CTxDestination, CAmount> balances;
 
     {
         LOCK(cs_wallet);
@@ -1866,7 +1866,7 @@ std::map<CTxDestination, int64_t> CWallet::GetAddressBalances()
                 if(!ExtractDestination(pcoin->vout[i].scriptPubKey, addr))
                     continue;
 
-                int64_t n = IsSpent(walletEntry.first, i) ? 0 : pcoin->vout[i].nValue;
+                CAmount n = IsSpent(walletEntry.first, i) ? 0 : pcoin->vout[i].nValue;
 
                 if (!balances.count(addr))
                     balances[addr] = 0;
diff --git a/src/wallet.h b/src/wallet.h
index fde87a8a2f82..f3fffb22532f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -30,9 +30,9 @@ extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
 
 // -paytxfee default
-static const int64_t DEFAULT_TRANSACTION_FEE = 0;
+static const CAmount DEFAULT_TRANSACTION_FEE = 0;
 // -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
-static const int nHighTransactionFeeWarning = 0.01 * COIN;
+static const CAmount nHighTransactionFeeWarning = 0.01 * COIN;
 // Largest (in bytes) free transaction we're willing to create
 static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
 
@@ -98,7 +98,7 @@ class CAddressBookData
 class CWallet : public CCryptoKeyStore, public CWalletInterface
 {
 private:
-    bool SelectCoins(int64_t nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet, const CCoinControl *coinControl = NULL) const;
+    bool SelectCoins(const CAmount& nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet, const CCoinControl *coinControl = NULL) const;
 
     CWalletDB *pwalletdbEncryption;
 
@@ -182,7 +182,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     bool CanSupportFeature(enum WalletFeature wf) { AssertLockHeld(cs_wallet); return nWalletMaxVersion >= wf; }
 
     void AvailableCoins(std::vector<COutput>& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl = NULL) const;
-    bool SelectCoinsMinConf(int64_t nTargetValue, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet) const;
+    bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const;
 
     bool IsSpent(const uint256& hash, unsigned int n) const;
 
@@ -253,21 +253,21 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     int ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate = false);
     void ReacceptWalletTransactions();
     void ResendWalletTransactions();
-    int64_t GetBalance() const;
-    int64_t GetUnconfirmedBalance() const;
-    int64_t GetImmatureBalance() const;
-    int64_t GetWatchOnlyBalance() const;
-    int64_t GetUnconfirmedWatchOnlyBalance() const;
-    int64_t GetImmatureWatchOnlyBalance() const;
-    bool CreateTransaction(const std::vector<std::pair<CScript, int64_t> >& vecSend,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
-    bool CreateTransaction(CScript scriptPubKey, int64_t nValue,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, int64_t& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
+    CAmount GetBalance() const;
+    CAmount GetUnconfirmedBalance() const;
+    CAmount GetImmatureBalance() const;
+    CAmount GetWatchOnlyBalance() const;
+    CAmount GetUnconfirmedWatchOnlyBalance() const;
+    CAmount GetImmatureWatchOnlyBalance() const;
+    bool CreateTransaction(const std::vector<std::pair<CScript, CAmount> >& vecSend,
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
+    bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
-    std::string SendMoney(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew);
+    std::string SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew);
 
     static CFeeRate minTxFee;
-    static int64_t GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);
+    static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);
 
     bool NewKeyPool();
     bool TopUpKeyPool(unsigned int kpSize = 0);
@@ -279,24 +279,24 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     void GetAllReserveKeys(std::set<CKeyID>& setAddress) const;
 
     std::set< std::set<CTxDestination> > GetAddressGroupings();
-    std::map<CTxDestination, int64_t> GetAddressBalances();
+    std::map<CTxDestination, CAmount> GetAddressBalances();
 
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
     isminetype IsMine(const CTxIn& txin) const;
-    int64_t GetDebit(const CTxIn& txin, const isminefilter& filter) const;
+    CAmount GetDebit(const CTxIn& txin, const isminefilter& filter) const;
     isminetype IsMine(const CTxOut& txout) const
     {
         return ::IsMine(*this, txout.scriptPubKey);
     }
-    int64_t GetCredit(const CTxOut& txout, const isminefilter& filter) const
+    CAmount GetCredit(const CTxOut& txout, const isminefilter& filter) const
     {
         if (!MoneyRange(txout.nValue))
             throw std::runtime_error("CWallet::GetCredit() : value out of range");
         return ((IsMine(txout) & filter) ? txout.nValue : 0);
     }
     bool IsChange(const CTxOut& txout) const;
-    int64_t GetChange(const CTxOut& txout) const
+    CAmount GetChange(const CTxOut& txout) const
     {
         if (!MoneyRange(txout.nValue))
             throw std::runtime_error("CWallet::GetChange() : value out of range");
@@ -313,9 +313,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     {
         return (GetDebit(tx, ISMINE_ALL) > 0);
     }
-    int64_t GetDebit(const CTransaction& tx, const isminefilter& filter) const
+    CAmount GetDebit(const CTransaction& tx, const isminefilter& filter) const
     {
-        int64_t nDebit = 0;
+        CAmount nDebit = 0;
         BOOST_FOREACH(const CTxIn& txin, tx.vin)
         {
             nDebit += GetDebit(txin, filter);
@@ -324,9 +324,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         }
         return nDebit;
     }
-    int64_t GetCredit(const CTransaction& tx, const isminefilter& filter) const
+    CAmount GetCredit(const CTransaction& tx, const isminefilter& filter) const
     {
-        int64_t nCredit = 0;
+        CAmount nCredit = 0;
         BOOST_FOREACH(const CTxOut& txout, tx.vout)
         {
             nCredit += GetCredit(txout, filter);
@@ -335,9 +335,9 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         }
         return nCredit;
     }
-    int64_t GetChange(const CTransaction& tx) const
+    CAmount GetChange(const CTransaction& tx) const
     {
-        int64_t nChange = 0;
+        CAmount nChange = 0;
         BOOST_FOREACH(const CTxOut& txout, tx.vout)
         {
             nChange += GetChange(txout);
@@ -457,7 +457,7 @@ static void WriteOrderPos(const int64_t& nOrderPos, mapValue_t& mapValue)
 struct COutputEntry
 {
     CTxDestination destination;
-    int64_t amount;
+    CAmount amount;
     int vout;
 };
 
@@ -545,15 +545,15 @@ class CWalletTx : public CMerkleTx
     mutable bool fImmatureWatchCreditCached;
     mutable bool fAvailableWatchCreditCached;
     mutable bool fChangeCached;
-    mutable int64_t nDebitCached;
-    mutable int64_t nCreditCached;
-    mutable int64_t nImmatureCreditCached;
-    mutable int64_t nAvailableCreditCached;
-    mutable int64_t nWatchDebitCached;
-    mutable int64_t nWatchCreditCached;
-    mutable int64_t nImmatureWatchCreditCached;
-    mutable int64_t nAvailableWatchCreditCached;
-    mutable int64_t nChangeCached;
+    mutable CAmount nDebitCached;
+    mutable CAmount nCreditCached;
+    mutable CAmount nImmatureCreditCached;
+    mutable CAmount nAvailableCreditCached;
+    mutable CAmount nWatchDebitCached;
+    mutable CAmount nWatchCreditCached;
+    mutable CAmount nImmatureWatchCreditCached;
+    mutable CAmount nAvailableWatchCreditCached;
+    mutable CAmount nChangeCached;
 
     CWalletTx()
     {
@@ -670,12 +670,12 @@ class CWalletTx : public CMerkleTx
     }
 
     // filter decides which addresses will count towards the debit
-    int64_t GetDebit(const isminefilter& filter) const
+    CAmount GetDebit(const isminefilter& filter) const
     {
         if (vin.empty())
             return 0;
 
-        int64_t debit = 0;
+        CAmount debit = 0;
         if(filter & ISMINE_SPENDABLE)
         {
             if (fDebitCached)
@@ -701,7 +701,7 @@ class CWalletTx : public CMerkleTx
         return debit;
     }
 
-    int64_t GetCredit(bool fUseCache=true) const
+    CAmount GetCredit(bool fUseCache=true) const
     {
         // Must wait until coinbase is safely deep enough in the chain before valuing it
         if (IsCoinBase() && GetBlocksToMaturity() > 0)
@@ -715,7 +715,7 @@ class CWalletTx : public CMerkleTx
         return nCreditCached;
     }
 
-    int64_t GetImmatureCredit(bool fUseCache=true) const
+    CAmount GetImmatureCredit(bool fUseCache=true) const
     {
         if (IsCoinBase() && GetBlocksToMaturity() > 0 && IsInMainChain())
         {
@@ -729,7 +729,7 @@ class CWalletTx : public CMerkleTx
         return 0;
     }
 
-    int64_t GetAvailableCredit(bool fUseCache=true) const
+    CAmount GetAvailableCredit(bool fUseCache=true) const
     {
         if (pwallet == 0)
             return 0;
@@ -741,7 +741,7 @@ class CWalletTx : public CMerkleTx
         if (fUseCache && fAvailableCreditCached)
             return nAvailableCreditCached;
 
-        int64_t nCredit = 0;
+        CAmount nCredit = 0;
         uint256 hashTx = GetHash();
         for (unsigned int i = 0; i < vout.size(); i++)
         {
@@ -759,7 +759,7 @@ class CWalletTx : public CMerkleTx
         return nCredit;
     }
 
-    int64_t GetImmatureWatchOnlyCredit(const bool& fUseCache=true) const
+    CAmount GetImmatureWatchOnlyCredit(const bool& fUseCache=true) const
     {
         if (IsCoinBase() && GetBlocksToMaturity() > 0 && IsInMainChain())
         {
@@ -773,7 +773,7 @@ class CWalletTx : public CMerkleTx
         return 0;
     }
 
-    int64_t GetAvailableWatchOnlyCredit(const bool& fUseCache=true) const
+    CAmount GetAvailableWatchOnlyCredit(const bool& fUseCache=true) const
     {
         if (pwallet == 0)
             return 0;
@@ -785,7 +785,7 @@ class CWalletTx : public CMerkleTx
         if (fUseCache && fAvailableWatchCreditCached)
             return nAvailableWatchCreditCached;
 
-        int64_t nCredit = 0;
+        CAmount nCredit = 0;
         for (unsigned int i = 0; i < vout.size(); i++)
         {
             if (!pwallet->IsSpent(GetHash(), i))
@@ -802,7 +802,7 @@ class CWalletTx : public CMerkleTx
         return nCredit;
     }
 
-    int64_t GetChange() const
+    CAmount GetChange() const
     {
         if (fChangeCached)
             return nChangeCached;
@@ -812,10 +812,10 @@ class CWalletTx : public CMerkleTx
     }
 
     void GetAmounts(std::list<COutputEntry>& listReceived,
-                    std::list<COutputEntry>& listSent, int64_t& nFee, std::string& strSentAccount, const isminefilter& filter) const;
+                    std::list<COutputEntry>& listSent, CAmount& nFee, std::string& strSentAccount, const isminefilter& filter) const;
 
-    void GetAccountAmounts(const std::string& strAccount, int64_t& nReceived,
-                           int64_t& nSent, int64_t& nFee, const isminefilter& filter) const;
+    void GetAccountAmounts(const std::string& strAccount, CAmount& nReceived,
+                           CAmount& nSent, CAmount& nFee, const isminefilter& filter) const;
 
     bool IsFromMe(const isminefilter& filter) const
     {
@@ -949,7 +949,7 @@ class CAccountingEntry
 {
 public:
     std::string strAccount;
-    int64_t nCreditDebit;
+    CAmount nCreditDebit;
     int64_t nTime;
     std::string strOtherAccount;
     std::string strComment;
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index a84f44db01b3..67218bf2c851 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -187,12 +187,12 @@ bool CWalletDB::WriteAccountingEntry(const CAccountingEntry& acentry)
     return WriteAccountingEntry(++nAccountingEntryNumber, acentry);
 }
 
-int64_t CWalletDB::GetAccountCreditDebit(const string& strAccount)
+CAmount CWalletDB::GetAccountCreditDebit(const string& strAccount)
 {
     list<CAccountingEntry> entries;
     ListAccountCreditDebit(strAccount, entries);
 
-    int64_t nCreditDebit = 0;
+    CAmount nCreditDebit = 0;
     BOOST_FOREACH (const CAccountingEntry& entry, entries)
         nCreditDebit += entry.nCreditDebit;
 
diff --git a/src/walletdb.h b/src/walletdb.h
index 2c5b608f3db2..f3d6e61f8bc7 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -6,6 +6,7 @@
 #ifndef BITCOIN_WALLETDB_H
 #define BITCOIN_WALLETDB_H
 
+#include "amount.h"
 #include "db.h"
 #include "key.h"
 #include "keystore.h"
@@ -118,7 +119,7 @@ class CWalletDB : public CDB
     bool EraseDestData(const std::string &address, const std::string &key);
 
     bool WriteAccountingEntry(const CAccountingEntry& acentry);
-    int64_t GetAccountCreditDebit(const std::string& strAccount);
+    CAmount GetAccountCreditDebit(const std::string& strAccount);
     void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
 
     DBErrors ReorderTransactions(CWallet* pwallet);

From 0866948e18cb65d2afbc49e4103f3cce05875999 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Fri, 26 Sep 2014 20:50:52 -0700
Subject: [PATCH 0774/1819] Add 0.9.3 and fix control

---
 contrib/debian/changelog | 6 ++++++
 contrib/debian/control   | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/contrib/debian/changelog b/contrib/debian/changelog
index 4f22567f85a1..fe910b65a557 100644
--- a/contrib/debian/changelog
+++ b/contrib/debian/changelog
@@ -1,3 +1,9 @@
+bitcoin (0.9.3-precise1) precise; urgency=medium
+
+  * New upstream releases.
+
+ -- Matt Corallo (BlueMatt) <matt@mattcorallo.com>  Fri, 26 Sep 2014 12:01:00 -0700
+
 bitcoin (0.9.1-precise1) precise; urgency=medium
 
   * New upstream release.
diff --git a/contrib/debian/control b/contrib/debian/control
index ac635f43e0f1..a653260ad30e 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -39,7 +39,6 @@ Description: peer-to-peer network based digital currency - daemon
  Full transaction history is stored locally at each client.  This
  requires 20+ GB of space, slowly growing.
  .
-
  This package provides the daemon, bitcoind, and the CLI tool
  bitcoin-cli to interact with the daemon.
 

From a38eaea082692d0dac6996dcace2084cd7f29179 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sat, 27 Sep 2014 15:58:47 +0200
Subject: [PATCH 0775/1819] doc: Update SHA256SUMS.asc step in
 release-process.md

- The Hash: header is prepended by gpg, and states the hashing used by
  gpg, not what is used to hash the files

- Add more detailed steps
---
 doc/release-process.md | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 8934be66c405..5b8029955d9b 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -178,15 +178,11 @@ Commit your signature to gitian.sigs:
 
   Note: only Gavin has the code-signing keys currently.
 
-- Create `SHA256SUMS.asc` for builds, and PGP-sign it. This is done manually.
-  Include all the files to be uploaded. The file has `sha256sum` format with a
-  simple header at the top:
-
-```
-Hash: SHA256
-
-0060f7d38b98113ab912d4c184000291d7f026eaf77ca5830deec15059678f54  bitcoin-x.y.z-linux.tar.gz
-...
+- Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
+```bash
+sha256sum * > SHA256SUMS
+gpg --clearsign SHA256SUMS # outputs SHA256SUMS.asc
+rm SHA256SUMS
 ```
 
 - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server

From 0dcb0a55782d676798013f20d7e2ab826ad4d96d Mon Sep 17 00:00:00 2001
From: Saivann <saivann@gmail.com>
Date: Sat, 27 Sep 2014 14:47:12 -0400
Subject: [PATCH 0776/1819] doc: Add instructions for consistent Mac OS X build
 names

---
 doc/release-process.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/release-process.md b/doc/release-process.md
index 5b8029955d9b..7d9dd5edb45f 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -154,6 +154,10 @@ repackage gitian builds for release as stand-alone zip/tar/installer exe
 	zip -r bitcoin-${VERSION}-win.zip bitcoin-${VERSION}-win
 	rm -rf bitcoin-${VERSION}-win
 
+**Mac OS X .dmg:**
+
+	mv Bitcoin-Qt.dmg bitcoin-${VERSION}-osx.dmg
+
 ###Next steps:
 
 Commit your signature to gitian.sigs:

From 775b7b8d70da34029d3f29cbd67e82fbfcd30481 Mon Sep 17 00:00:00 2001
From: sinetek <pitwuu@gmail.com>
Date: Sun, 28 Sep 2014 18:22:44 -0400
Subject: [PATCH 0777/1819] LLu is standard, but not portable. use ULL

---
 src/serialize.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/serialize.h b/src/serialize.h
index 7f8f93328434..68501facf20a 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -245,7 +245,7 @@ uint64_t ReadCompactSize(Stream& is)
         uint64_t xSize;
         READDATA(is, xSize);
         nSizeRet = xSize;
-        if (nSizeRet < 0x100000000LLu)
+        if (nSizeRet < 0x100000000ULL)
             throw std::ios_base::failure("non-canonical ReadCompactSize()");
     }
     if (nSizeRet > (uint64_t)MAX_SIZE)

From 0db65d8798193cf9615f5693c66cafcd5af4be5c Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 27 Sep 2014 13:49:21 +0200
Subject: [PATCH 0778/1819] update license of compat and crypto

- change license to be just MIT for all files in compat and crypto
- also add missing header end comments
- ensure default header include style
---
 src/compat/glibc_compat.cpp   | 3 ++-
 src/compat/glibc_sanity.cpp   | 3 ++-
 src/compat/glibcxx_compat.cpp | 2 +-
 src/compat/glibcxx_sanity.cpp | 2 +-
 src/compat/sanity.h           | 2 +-
 src/crypto/common.h           | 6 ++++--
 src/crypto/ripemd160.cpp      | 2 +-
 src/crypto/ripemd160.h        | 4 ++--
 src/crypto/sha1.cpp           | 2 +-
 src/crypto/sha1.h             | 4 ++--
 src/crypto/sha2.cpp           | 2 +-
 src/crypto/sha2.h             | 4 ++--
 12 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/src/compat/glibc_compat.cpp b/src/compat/glibc_compat.cpp
index 94c79e4b9713..f149a08cd59a 100644
--- a/src/compat/glibc_compat.cpp
+++ b/src/compat/glibc_compat.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
@@ -7,6 +7,7 @@
 #endif
 
 #include <cstddef>
+
 #if defined(HAVE_SYS_SELECT_H)
 #include <sys/select.h>
 #endif
diff --git a/src/compat/glibc_sanity.cpp b/src/compat/glibc_sanity.cpp
index acc7809d773d..607e23b56822 100644
--- a/src/compat/glibc_sanity.cpp
+++ b/src/compat/glibc_sanity.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
@@ -7,6 +7,7 @@
 #endif
 
 #include <cstddef>
+
 #if defined(HAVE_SYS_SELECT_H)
 #include <sys/select.h>
 #endif
diff --git a/src/compat/glibcxx_compat.cpp b/src/compat/glibcxx_compat.cpp
index 41d8458cb272..e0b4ac51f59a 100644
--- a/src/compat/glibcxx_compat.cpp
+++ b/src/compat/glibcxx_compat.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include <cstddef>
diff --git a/src/compat/glibcxx_sanity.cpp b/src/compat/glibcxx_sanity.cpp
index 9b1fefd44818..aafa4a6aef86 100644
--- a/src/compat/glibcxx_sanity.cpp
+++ b/src/compat/glibcxx_sanity.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include <list>
diff --git a/src/compat/sanity.h b/src/compat/sanity.h
index e7df44307a1a..7016ac0ab745 100644
--- a/src/compat/sanity.h
+++ b/src/compat/sanity.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCON_COMPAT_SANITY_H
diff --git a/src/crypto/common.h b/src/crypto/common.h
index 7c3d0a135b19..67c30023c3c5 100644
--- a/src/crypto/common.h
+++ b/src/crypto/common.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CRYPTO_COMMON_H
@@ -8,7 +8,9 @@
 #if defined(HAVE_CONFIG_H)
 #include "bitcoin-config.h"
 #endif
+
 #include <stdint.h>
+
 #if defined(HAVE_ENDIAN_H)
 #include <endian.h>
 #endif
@@ -115,4 +117,4 @@ void static inline WriteBE64(unsigned char* ptr, uint64_t x)
 #endif
 }
 
-#endif
+#endif // BITCOIN_CRYPTO_COMMON_H
diff --git a/src/crypto/ripemd160.cpp b/src/crypto/ripemd160.cpp
index 90b196ba32c7..cb4a94a44da9 100644
--- a/src/crypto/ripemd160.cpp
+++ b/src/crypto/ripemd160.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "crypto/ripemd160.h"
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index 76197543beea..902e7ca83fc2 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_RIPEMD160_H
@@ -25,4 +25,4 @@ class CRIPEMD160
     CRIPEMD160& Reset();
 };
 
-#endif
+#endif // BITCOIN_RIPEMD160_H
diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp
index 5fbea002d652..7f78fdfc6d27 100644
--- a/src/crypto/sha1.cpp
+++ b/src/crypto/sha1.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "crypto/sha1.h"
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index 4fa2b333babd..68bd7ced9f05 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_SHA1_H
@@ -25,4 +25,4 @@ class CSHA1
     CSHA1& Reset();
 };
 
-#endif
+#endif // BITCOIN_SHA1_H
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha2.cpp
index 9a96c5125a7d..613aac2d710c 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha2.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "crypto/sha2.h"
diff --git a/src/crypto/sha2.h b/src/crypto/sha2.h
index 15ad5ac3830f..a6cbe58554a8 100644
--- a/src/crypto/sha2.h
+++ b/src/crypto/sha2.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_SHA2_H
@@ -61,4 +61,4 @@ class CHMAC_SHA512
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
 };
 
-#endif
+#endif // BITCOIN_SHA2_H

From 7bec6dd2305281255efc510c16297556b26268e2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 29 Sep 2014 08:22:03 +0200
Subject: [PATCH 0779/1819] cleanup license and header end comment in
 chain.cpp/.h

---
 src/chain.cpp | 2 +-
 src/chain.h   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index bcb497b2d491..05427a456993 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chain.h"
diff --git a/src/chain.h b/src/chain.h
index 91bdf383475f..0aafb40b9869 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_CHAIN
@@ -387,4 +387,4 @@ class CChain {
     const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
 };
 
-#endif 
+#endif // H_BITCOIN_CHAIN

From a25fd6be138ff2bff7e2ad6a1a789db523c0193f Mon Sep 17 00:00:00 2001
From: SergioDemianLerner <Sergio.d.Lerner@gmail.com>
Date: Thu, 4 Sep 2014 16:23:42 -0300
Subject: [PATCH 0780/1819] Switch testing framework from MAIN to new UNITTEST
 network

UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
---
 src/Makefile.test.include  |   1 +
 src/chainparams.cpp        |  44 +++++++
 src/chainparams.h          |  23 ++++
 src/chainparamsbase.cpp    |  17 +++
 src/chainparamsbase.h      |   1 +
 src/checkpoints.cpp        |   2 +
 src/main.cpp               |   1 +
 src/pow.cpp                |   4 +
 src/test/base58_tests.cpp  |   4 +-
 src/test/blockv2_tests.cpp | 232 +++++++++++++++++++++++++++++++++++++
 src/test/miner_tests.cpp   |   1 +
 src/test/test_bitcoin.cpp  |   2 +-
 12 files changed, 329 insertions(+), 3 deletions(-)
 create mode 100644 src/test/blockv2_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index ab449f3e711c..d376961996d0 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -51,6 +51,7 @@ BITCOIN_TESTS =\
   test/key_tests.cpp \
   test/main_tests.cpp \
   test/miner_tests.cpp \
+  test/blockv2_tests.cpp \
   test/mruset_tests.cpp \
   test/multisig_tests.cpp \
   test/netbase_tests.cpp \
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 179db5a818f3..d924a6a2b05c 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -214,8 +214,50 @@ class CRegTestParams : public CTestNetParams {
 };
 static CRegTestParams regTestParams;
 
+//
+// Regression test
+//
+class CUnitTestParams : public CMainParams, public CModifiableParams {
+public:
+    CUnitTestParams() {
+        networkID = CBaseChainParams::UNITTEST;
+        strNetworkID = "unittest";
+        nDefaultPort = 18445;
+        vFixedSeeds.clear();
+        vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
+
+        fRequireRPCPassword = false;
+        fMiningRequiresPeers = false;
+        fDefaultCheckMemPool = true;
+        fAllowMinDifficultyBlocks = false;
+        fMineBlocksOnDemand = true;
+        fSkipProofOfWorkCheck = false;
+    }
+    virtual bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
+protected:
+    bool fSkipProofOfWorkCheck;
+public:
+    // Published setters to allow changing values in unit test cases
+    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
+    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
+    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
+    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)  { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
+    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)  { fDefaultCheckMemPool=aDefaultCheckMemPool; }
+    virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=aAllowMinDifficultyBlocks; }
+    virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = aSkipProofOfWorkCheck; }
+};
+static CUnitTestParams unitTestParams;
+
+
 static CChainParams *pCurrentParams = 0;
 
+CModifiableParams *ModifiableParams()
+{
+   assert(pCurrentParams);
+   assert(pCurrentParams==&unitTestParams);
+   return (CModifiableParams*)&unitTestParams;
+}
+
 const CChainParams &Params() {
     assert(pCurrentParams);
     return *pCurrentParams;
@@ -229,6 +271,8 @@ CChainParams &Params(CBaseChainParams::Network network) {
             return testNetParams;
         case CBaseChainParams::REGTEST:
             return regTestParams;
+        case CBaseChainParams::UNITTEST:
+            return unitTestParams;
         default:
             assert(false && "Unimplemented network");
             return mainParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index e5dfc87c6dad..171a590a5f37 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -61,6 +61,8 @@ class CChainParams
     bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
     /* Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
+    /* Skip proof-of-work check: allow mining of any difficulty block */
+    virtual bool SkipProofOfWorkCheck() const { return false; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
@@ -105,6 +107,24 @@ class CChainParams
     bool fMineBlocksOnDemand;
 };
 
+/** Modifiable parameters interface is used by test cases to adapt the parameters in order
+*** to test specific features more easily. Test cases should always restore the previous
+*** values after finalization.
+**/
+
+class CModifiableParams {
+public:
+    // Published setters to allow changing values in unit test cases
+    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) =0;
+    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0;
+    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0;
+    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)=0;
+    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)=0;
+    virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks)=0;
+    virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck)=0;
+};
+
+
 /**
  * Return the currently selected parameters. This won't change after app startup
  * outside of the unit tests.
@@ -114,6 +134,9 @@ const CChainParams &Params();
 /** Return parameters for the given network. */
 CChainParams &Params(CBaseChainParams::Network network);
 
+/** Get modifyable network parameters (UNITTEST only) */
+CModifiableParams *ModifiableParams();
+
 /** Sets the params returned by Params() to those for the given network. */
 void SelectParams(CBaseChainParams::Network network);
 
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 98bb5b855fe3..e9d63197bd39 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -57,6 +57,20 @@ class CBaseRegTestParams : public CBaseTestNetParams
 };
 static CBaseRegTestParams regTestParams;
 
+//
+// Unit test
+//
+class CBaseUnitTestParams : public CBaseMainParams
+{
+public:
+    CBaseUnitTestParams()
+    {
+        networkID = CBaseChainParams::UNITTEST;
+        strDataDir = "unittest";
+    }
+};
+static CBaseUnitTestParams unitTestParams;
+
 static CBaseChainParams* pCurrentBaseParams = 0;
 
 const CBaseChainParams& BaseParams()
@@ -77,6 +91,9 @@ void SelectBaseParams(CBaseChainParams::Network network)
     case CBaseChainParams::REGTEST:
         pCurrentBaseParams = &regTestParams;
         break;
+    case CBaseChainParams::UNITTEST:
+        pCurrentBaseParams = &unitTestParams;
+        break;
     default:
         assert(false && "Unimplemented network");
         return;
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index c054f03f1739..cc154cf5012f 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -19,6 +19,7 @@ class CBaseChainParams
         MAIN,
         TESTNET,
         REGTEST,
+        UNITTEST,
 
         MAX_NETWORK_TYPES
     };
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index c41deea7ce64..9a6bc05e63d9 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -88,6 +88,8 @@ namespace Checkpoints {
             return dataTestnet;
         else if (Params().NetworkID() == CBaseChainParams::MAIN)
             return data;
+        else if (Params().NetworkID() == CBaseChainParams::UNITTEST) // UnitTest share the same checkpoints as MAIN
+            return data;
         else
             return dataRegtest;
     }
diff --git a/src/main.cpp b/src/main.cpp
index 9a4271eda2fd..4bd8fd6e3621 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2304,6 +2304,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
         nHeight = pindexPrev->nHeight+1;
 
         // Check proof of work
+        if (!Params().SkipProofOfWorkCheck())
         if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
             return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
                              REJECT_INVALID, "bad-diffbits");
diff --git a/src/pow.cpp b/src/pow.cpp
index 893f6c18be65..d50222849cc0 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -81,6 +81,10 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     bool fNegative;
     bool fOverflow;
     uint256 bnTarget;
+
+    if (Params().SkipProofOfWorkCheck())
+       return true;
+
     bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
 
     // Check range
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 58fffb6df40c..c298c805dae3 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
             BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest);
         }
     }
-    SelectParams(CBaseChainParams::MAIN);
+    SelectParams(CBaseChainParams::UNITTEST);
 }
 
 // Goal: check that generated keys match test vectors
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
     CTxDestination nodest = CNoDestination();
     BOOST_CHECK(!dummyAddr.Set(nodest));
 
-    SelectParams(CBaseChainParams::MAIN);
+    SelectParams(CBaseChainParams::UNITTEST);
 }
 
 // Goal: check that base58 parsing code is robust against a variety of corrupted data
diff --git a/src/test/blockv2_tests.cpp b/src/test/blockv2_tests.cpp
new file mode 100644
index 000000000000..0d59c8761b50
--- /dev/null
+++ b/src/test/blockv2_tests.cpp
@@ -0,0 +1,232 @@
+// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "main.h"
+#include "miner.h"
+#include "uint256.h"
+#include "util.h"
+
+#include <boost/test/unit_test.hpp>
+
+// Tests the majority rule which states that after 1000 v2 blocks no v1 block can go
+BOOST_AUTO_TEST_SUITE(blockv2_tests)
+
+static CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
+
+static void SetEmptyBlock(CBlock * pblock)
+{
+        pblock->nVersion = 2;
+        pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
+        pblock->nNonce = 0;
+}
+
+static void SetBlockDefaultAttributesAndHeight(CBlock * pblock,bool addHeight,int difValue)
+{
+        SetEmptyBlock(pblock);
+
+        // Add the coinbase
+        CMutableTransaction txCoinbase(pblock->vtx[0]);
+
+        if (addHeight)
+            txCoinbase.vin[0].scriptSig = (CScript() << (chainActive.Height()+1+difValue) << 0);
+            else
+            txCoinbase.vin[0].scriptSig = (CScript() << difValue << 0); // At least size 2, this is a protocol spec
+
+        txCoinbase.vout[0].scriptPubKey = CScript();
+        pblock->vtx[0] = CTransaction(txCoinbase);
+        pblock->hashMerkleRoot = pblock->BuildMerkleTree();
+}
+
+void CheckSubsidyHalving(CBlockTemplate * &pblocktemplate, CBlock * &pblock)
+{
+    if ((chainActive.Height()+1) % Params().SubsidyHalvingInterval() == 0)
+        {
+            // The RegTest network has a low subsidy halving interval (150) so
+            // we must recompute the coinbase subsidy if we reach the boundary.
+
+            // preserve parent hash
+            uint256 prevParent = pblock->hashPrevBlock;
+            delete pblocktemplate;
+            pblocktemplate = CreateNewBlock(scriptPubKey);
+            pblock = &pblocktemplate->block; // pointer for convenience
+            pblock->hashPrevBlock = prevParent;
+        }
+}
+
+void Blockv2test()
+{
+    assert(Params().NetworkID() == CBaseChainParams::UNITTEST);
+    ModifiableParams()->setSkipProofOfWorkCheck(true);
+
+    // We don't know the state of the block-chain here: it depends on which other tests are run before this test.
+    // See https://github.com/bitcoin/bitcoin/pull/4688 for a patch that allows the re-creation of the block-chain
+    // for each testcase that requires it.
+
+    // If miner_tests.cpp is run before, the chain will be 100 blocks long, and all of them will be v1
+
+
+    LogPrintf("Blockv2test testcase starts\n");
+
+    CBlockTemplate *pblocktemplate;
+    CScript script;
+    uint256 hash;
+    int PreviousHeight;
+
+
+    LOCK(cs_main);
+
+
+    // Simple block creation, nothing special yet.
+    pblocktemplate = CreateNewBlock(scriptPubKey);
+    CBlock *pblock = &pblocktemplate->block; // pointer for convenience
+
+    LogPrintf("Blockv2test block v1 add begin\n");
+    // First create a block v1, check that it is accepted. The block has an invalid height
+    SetBlockDefaultAttributesAndHeight(pblock,false,5000);
+    pblock->nVersion = 1;
+    CValidationState state1;
+    PreviousHeight = chainActive.Height();
+    BOOST_CHECK(ProcessBlock(state1, NULL, pblock));
+    BOOST_CHECK(state1.IsValid());
+    BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
+    pblock->hashPrevBlock = pblock->GetHash(); // update parent
+
+
+    // Now create exactly 1000 blocks v2
+
+    // First check that the supermajority threshold is exactly 1000 blocks
+    BOOST_CHECK(Params().ToCheckBlockUpgradeMajority()==1000);  //
+    BOOST_CHECK(Params().EnforceBlockUpgradeMajority()==750);
+    BOOST_CHECK(Params().RejectBlockOutdatedMajority()==950);
+
+    // Over the last 1000 blocks, 750 blocks must be v2 to switch to v2-only mode.
+    // Here we're testing only the last 750, not any subset.
+
+    LogPrintf("Blockv2test BIP30 repetition begin\n");
+
+    // First, if we try to add a block v2 with the same coinbase tx, we should get
+    // "bad-txns-BIP30" because the coinbase tx has the same hash as the previous.
+    // Unluckily, even if ConnectBlock returns a "bad-txns-BIP30", ActivateBestChainStep clears
+    // the state, so we get true here and the "bad-txns-BIP30" reason is lost.
+    // We verify instead that the chain height has not been incremented.
+
+    CValidationState state7;
+    PreviousHeight = chainActive.Height();
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetBlockDefaultAttributesAndHeight(pblock,false,5000); //
+    pblock->nVersion = 2;
+    BOOST_CHECK(ProcessBlock(state7, NULL, pblock)); // should we care about the return value?
+    BOOST_CHECK(state7.IsValid());
+    BOOST_CHECK(PreviousHeight == chainActive.Height()); // we check the block has not been added.
+
+    LogPrintf("Blockv2test 750 v2 blocks  begin\n");
+    for (int i=0;i<750;i++)
+    {
+
+        LogPrintf("Blockv2test block %d begin\n",i);
+
+        CheckSubsidyHalving(pblocktemplate,pblock);
+
+        // We add a value to the height to make is NOT equal to the actual height.
+        SetBlockDefaultAttributesAndHeight(pblock,true,1000); // blocks version 2 without height are allowed! for only 750 blocks
+        pblock->nVersion = 2;
+        CValidationState state;
+
+        PreviousHeight = chainActive.Height();
+        BOOST_CHECK(ProcessBlock(state, NULL, pblock));
+        BOOST_CHECK(state.IsValid());
+        BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
+        pblock->hashPrevBlock = pblock->GetHash(); // update parent
+    }
+
+    LogPrintf("Blockv2test v2 without height rejected begin\n");
+
+    // Now we try to add a block v2, with an invalid height and it should be rejected. We use 2000 because is not in the range [1000..1750].
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetBlockDefaultAttributesAndHeight(pblock,true,2000); //
+    pblock->nVersion = 2;
+    CValidationState state0;
+    BOOST_CHECK(ProcessBlock(state0, NULL, pblock)==false);
+    BOOST_CHECK(!state0.IsValid());
+    BOOST_CHECK(state0.GetRejectReason()=="bad-cb-height");
+    // Do not update parent since block has failed
+
+    LogPrintf("Blockv2test v2 with height accepted begin\n");
+
+
+    // Now we add a block with height, must be ok.
+    for (int i=0;i<200;i++)
+    {
+
+        LogPrintf("Blockv2test v2block %d begin\n",i);
+        CheckSubsidyHalving(pblocktemplate,pblock);
+        SetBlockDefaultAttributesAndHeight(pblock,true,0);
+        pblock->nVersion = 2;
+        CValidationState state;
+        PreviousHeight = chainActive.Height();
+        BOOST_CHECK(ProcessBlock(state, NULL, pblock));
+        BOOST_CHECK(state.IsValid());
+        BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
+
+        pblock->hashPrevBlock = pblock->GetHash(); // update parent
+    }
+
+
+    LogPrintf("Blockv2test block v1 rejected\n");
+    // Now we add 200 additional blocks, until we get 950 (the threshold were v1 blocks are not accepted anymore)
+    // Now we try to add a block v1, it should be rejected, even if it hash the height field
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetBlockDefaultAttributesAndHeight(pblock,true,0);
+    pblock->nVersion = 1;
+    CValidationState state2;
+    BOOST_CHECK(ProcessBlock(state2, NULL, pblock)==false);
+    BOOST_CHECK(!state2.IsValid());
+    BOOST_CHECK(state2.GetRejectReason()=="bad-version");
+    // Do not update parent since block has failed
+
+
+
+    // Some other missing tests, added here as bonus...
+
+    // Block time too old check
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetBlockDefaultAttributesAndHeight(pblock,true,0);
+    pblock->nVersion = 2;
+    pblock->nTime = chainActive.Tip()->GetMedianTimePast()-1;
+    CValidationState state4;
+    BOOST_CHECK(ProcessBlock(state4, NULL, pblock)==false);
+    BOOST_CHECK(!state4.IsValid());
+    BOOST_CHECK(state4.GetRejectReason()=="time-too-old");
+    // Do not update parent since block has failed
+
+    // Adding a non-final coinbase, must modify coinbase
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetEmptyBlock(pblock);
+    // Use a mutable coinbase to change nLockTime and  nSequence
+    CMutableTransaction txCoinbase(pblock->vtx[0]);
+    txCoinbase.vin[0].scriptSig = (CScript() << chainActive.Height() << 0);
+    txCoinbase.nLockTime = LOCKTIME_THRESHOLD-1; // refers to height
+    txCoinbase.vin[0].nSequence = 1; // non-zero sequence
+    pblock->vtx[0] = CTransaction(txCoinbase);
+    pblock->nVersion = 2;
+    pblock->hashMerkleRoot = pblock->BuildMerkleTree();
+    CValidationState state5;
+    BOOST_CHECK(ProcessBlock(state5, NULL, pblock)==false);
+    BOOST_CHECK(!state5.IsValid());
+    BOOST_CHECK(state5.GetRejectReason()=="bad-txns-nonfinal");
+    // Do not update parent since block has failed
+
+
+    delete pblocktemplate;
+
+    ModifiableParams()->setSkipProofOfWorkCheck(false);
+    LogPrintf("Blockv2test testcase ends\n");
+}
+
+BOOST_AUTO_TEST_CASE(Blockv2testcase)
+{
+    Blockv2test();
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 9e4669eba900..bad5c13ac2b6 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -253,6 +253,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
 
     chainActive.Tip()->nHeight--;
     SetMockTime(0);
+    mempool.clear();
 
     BOOST_FOREACH(CTransaction *tx, txFirst)
         delete tx;
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 68fad8d038e8..6e5f0e3facc9 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -31,7 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
-        SelectParams(CBaseChainParams::MAIN);
+        SelectParams(CBaseChainParams::UNITTEST);
         noui_connect();
 #ifdef ENABLE_WALLET
         bitdb.MakeMock();

From 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0 Mon Sep 17 00:00:00 2001
From: SergioDemianLerner <Sergio.d.Lerner@gmail.com>
Date: Tue, 9 Sep 2014 13:29:24 -0300
Subject: [PATCH 0781/1819] Suggested corrections on comments, variable names.
 Also new test case testing the PoW skip in UNITTEST.

---
 src/chainparams.cpp        |   8 +--
 src/main.cpp               |   4 +-
 src/test/blockv2_tests.cpp | 127 +++++++++++++++++++++++++------------
 3 files changed, 91 insertions(+), 48 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index d924a6a2b05c..8a00da0bb51f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -215,7 +215,7 @@ class CRegTestParams : public CTestNetParams {
 static CRegTestParams regTestParams;
 
 //
-// Regression test
+// Unit test
 //
 class CUnitTestParams : public CMainParams, public CModifiableParams {
 public:
@@ -242,9 +242,9 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
     virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
     virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)  { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
-    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)  { fDefaultCheckMemPool=aDefaultCheckMemPool; }
-    virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=aAllowMinDifficultyBlocks; }
-    virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = aSkipProofOfWorkCheck; }
+    virtual void setDefaultCheckMemPool(bool afDefaultCheckMemPool)  { fDefaultCheckMemPool=afDefaultCheckMemPool; }
+    virtual void setAllowMinDifficultyBlocks(bool afAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=afAllowMinDifficultyBlocks; }
+    virtual void setSkipProofOfWorkCheck(bool afSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = afSkipProofOfWorkCheck; }
 };
 static CUnitTestParams unitTestParams;
 
diff --git a/src/main.cpp b/src/main.cpp
index 4bd8fd6e3621..7e60fd4ff9ec 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2304,8 +2304,8 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
         nHeight = pindexPrev->nHeight+1;
 
         // Check proof of work
-        if (!Params().SkipProofOfWorkCheck())
-        if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
+        if ((!Params().SkipProofOfWorkCheck()) &&
+           (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
             return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
                              REJECT_INVALID, "bad-diffbits");
 
diff --git a/src/test/blockv2_tests.cpp b/src/test/blockv2_tests.cpp
index 0d59c8761b50..96c0df5e6b6f 100644
--- a/src/test/blockv2_tests.cpp
+++ b/src/test/blockv2_tests.cpp
@@ -9,33 +9,34 @@
 
 #include <boost/test/unit_test.hpp>
 
-// Tests the majority rule which states that after 1000 v2 blocks no v1 block can go
+// This test cheecks the majority rule which states that after 1000 v2 blocks no new v1 block can be part of that branch.
+
 BOOST_AUTO_TEST_SUITE(blockv2_tests)
 
 static CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
 
 static void SetEmptyBlock(CBlock * pblock)
 {
-        pblock->nVersion = 2;
-        pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
-        pblock->nNonce = 0;
+    pblock->nVersion = 2;
+    pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
+    pblock->nNonce = 0;
 }
 
-static void SetBlockDefaultAttributesAndHeight(CBlock * pblock,bool addHeight,int difValue)
+static void SetBlockDefaultAttributesAndHeight(CBlock * pblock,bool addHeight,int heightDifference)
 {
-        SetEmptyBlock(pblock);
+    SetEmptyBlock(pblock);
 
-        // Add the coinbase
-        CMutableTransaction txCoinbase(pblock->vtx[0]);
+    // Add the coinbase
+    CMutableTransaction txCoinbase(pblock->vtx[0]);
 
-        if (addHeight)
-            txCoinbase.vin[0].scriptSig = (CScript() << (chainActive.Height()+1+difValue) << 0);
-            else
-            txCoinbase.vin[0].scriptSig = (CScript() << difValue << 0); // At least size 2, this is a protocol spec
+    if (addHeight)
+        txCoinbase.vin[0].scriptSig = (CScript() << (chainActive.Height()+1+heightDifference) << 0);
+        else
+        txCoinbase.vin[0].scriptSig = (CScript() << heightDifference << 0); // At least size 2, this is a protocol spec
 
-        txCoinbase.vout[0].scriptPubKey = CScript();
-        pblock->vtx[0] = CTransaction(txCoinbase);
-        pblock->hashMerkleRoot = pblock->BuildMerkleTree();
+    txCoinbase.vout[0].scriptPubKey = CScript();
+    pblock->vtx[0] = CTransaction(txCoinbase);
+    pblock->hashMerkleRoot = pblock->BuildMerkleTree();
 }
 
 void CheckSubsidyHalving(CBlockTemplate * &pblocktemplate, CBlock * &pblock)
@@ -44,6 +45,8 @@ void CheckSubsidyHalving(CBlockTemplate * &pblocktemplate, CBlock * &pblock)
         {
             // The RegTest network has a low subsidy halving interval (150) so
             // we must recompute the coinbase subsidy if we reach the boundary.
+            // The unittest network allows modifying this interval. We check it so this
+            // test can work in any network.
 
             // preserve parent hash
             uint256 prevParent = pblock->hashPrevBlock;
@@ -54,6 +57,22 @@ void CheckSubsidyHalving(CBlockTemplate * &pblocktemplate, CBlock * &pblock)
         }
 }
 
+void CheckBlockAddedToBestChainSuccessfully(CBlock *pblock)
+{
+    int PreviousHeight;
+    CValidationState state;
+
+    PreviousHeight = chainActive.Height();
+    BOOST_CHECK(ProcessBlock(state, NULL, pblock));
+    BOOST_CHECK(state.IsValid());
+    BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
+
+    // Previous checks do not assure the current best chain has pblock as tip. It could be the case that a because
+    // of a malfunction in the chain reorganization code, a reorganization causes an increase of the chain length, but with another tip.
+    // So we also check that.
+    BOOST_CHECK(chainActive.Tip()->GetBlockHash()==pblock->GetHash());
+}
+
 void Blockv2test()
 {
     assert(Params().NetworkID() == CBaseChainParams::UNITTEST);
@@ -73,16 +92,17 @@ void Blockv2test()
     uint256 hash;
     int PreviousHeight;
 
-
     LOCK(cs_main);
 
-
     // Simple block creation, nothing special yet.
     pblocktemplate = CreateNewBlock(scriptPubKey);
     CBlock *pblock = &pblocktemplate->block; // pointer for convenience
 
     LogPrintf("Blockv2test block v1 add begin\n");
-    // First create a block v1, check that it is accepted. The block has an invalid height
+
+    ////////////////////////////////////////////////////////////////////////////////////////
+    // First create a block v1, check that it is accepted. The block has an invalid height.
+    ////////////////////////////////////////////////////////////////////////////////////////
     SetBlockDefaultAttributesAndHeight(pblock,false,5000);
     pblock->nVersion = 1;
     CValidationState state1;
@@ -93,7 +113,6 @@ void Blockv2test()
     pblock->hashPrevBlock = pblock->GetHash(); // update parent
 
 
-    // Now create exactly 1000 blocks v2
 
     // First check that the supermajority threshold is exactly 1000 blocks
     BOOST_CHECK(Params().ToCheckBlockUpgradeMajority()==1000);  //
@@ -105,11 +124,19 @@ void Blockv2test()
 
     LogPrintf("Blockv2test BIP30 repetition begin\n");
 
+    ///////////////////////////////////////////////////////////////////////////////////////////////////////
     // First, if we try to add a block v2 with the same coinbase tx, we should get
     // "bad-txns-BIP30" because the coinbase tx has the same hash as the previous.
-    // Unluckily, even if ConnectBlock returns a "bad-txns-BIP30", ActivateBestChainStep clears
-    // the state, so we get true here and the "bad-txns-BIP30" reason is lost.
-    // We verify instead that the chain height has not been incremented.
+    // Even if ConnectBlock returns a "bad-txns-BIP30", ActivateBestChainStep clears
+    // the state, so we get true here and the "bad-txns-BIP30" reason is lost. But this
+    // is the intended behaviour: Receiving a single block can cause zero or multiple blocks to be
+    // connected, and ActivateBestChain's responsibility is just switching the best block whatsoever.
+    // Feedback about failures causes a reject message to be sent to the peer from which we received
+    // the actual block (not necessarily the same as from whom we got the block that caused the reorg),
+    // for which we remember the peerid.
+    // Because we cannot access the failure reason here, we just verify instead that the chain
+    // height has not been incremented.
+    //////////////////////////////////////////////////////////////////////////////////////////////////////
 
     CValidationState state7;
     PreviousHeight = chainActive.Height();
@@ -121,6 +148,11 @@ void Blockv2test()
     BOOST_CHECK(PreviousHeight == chainActive.Height()); // we check the block has not been added.
 
     LogPrintf("Blockv2test 750 v2 blocks  begin\n");
+
+    ////////////////////////////
+    // Now create 750 v2 blocks
+    ////////////////////////////
+
     for (int i=0;i<750;i++)
     {
 
@@ -131,18 +163,17 @@ void Blockv2test()
         // We add a value to the height to make is NOT equal to the actual height.
         SetBlockDefaultAttributesAndHeight(pblock,true,1000); // blocks version 2 without height are allowed! for only 750 blocks
         pblock->nVersion = 2;
-        CValidationState state;
 
-        PreviousHeight = chainActive.Height();
-        BOOST_CHECK(ProcessBlock(state, NULL, pblock));
-        BOOST_CHECK(state.IsValid());
-        BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
+        CheckBlockAddedToBestChainSuccessfully(pblock);
         pblock->hashPrevBlock = pblock->GetHash(); // update parent
     }
 
     LogPrintf("Blockv2test v2 without height rejected begin\n");
 
-    // Now we try to add a block v2, with an invalid height and it should be rejected. We use 2000 because is not in the range [1000..1750].
+    /////////////////////////////////////////////////////////////////////////////////////
+    // Now we try to add a block v2, with an invalid height and it should be rejected.
+    // We use 2000 as argument heightDifference because is not in the range [1000..1750].
+    /////////////////////////////////////////////////////////////////////////////////////
     CheckSubsidyHalving(pblocktemplate,pblock);
     SetBlockDefaultAttributesAndHeight(pblock,true,2000); //
     pblock->nVersion = 2;
@@ -154,8 +185,10 @@ void Blockv2test()
 
     LogPrintf("Blockv2test v2 with height accepted begin\n");
 
-
-    // Now we add a block with height, must be ok.
+    /////////////////////////////////////////////////////////////
+    // Now we add 200 additional blocks, until we get 950
+    // (the threshold where v1 blocks are not accepted anymore)
+    /////////////////////////////////////////////////////////////
     for (int i=0;i<200;i++)
     {
 
@@ -163,19 +196,16 @@ void Blockv2test()
         CheckSubsidyHalving(pblocktemplate,pblock);
         SetBlockDefaultAttributesAndHeight(pblock,true,0);
         pblock->nVersion = 2;
-        CValidationState state;
-        PreviousHeight = chainActive.Height();
-        BOOST_CHECK(ProcessBlock(state, NULL, pblock));
-        BOOST_CHECK(state.IsValid());
-        BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
-
+        CheckBlockAddedToBestChainSuccessfully(pblock);
         pblock->hashPrevBlock = pblock->GetHash(); // update parent
     }
 
 
     LogPrintf("Blockv2test block v1 rejected\n");
-    // Now we add 200 additional blocks, until we get 950 (the threshold were v1 blocks are not accepted anymore)
+
+    /////////////////////////////////////////////////////////////////////////////////////////
     // Now we try to add a block v1, it should be rejected, even if it hash the height field
+    /////////////////////////////////////////////////////////////////////////////////////////
     CheckSubsidyHalving(pblocktemplate,pblock);
     SetBlockDefaultAttributesAndHeight(pblock,true,0);
     pblock->nVersion = 1;
@@ -185,11 +215,9 @@ void Blockv2test()
     BOOST_CHECK(state2.GetRejectReason()=="bad-version");
     // Do not update parent since block has failed
 
-
-
-    // Some other missing tests, added here as bonus...
-
+    ////////////////////////////////////////////////////////
     // Block time too old check
+    ////////////////////////////////////////////////////////
     CheckSubsidyHalving(pblocktemplate,pblock);
     SetBlockDefaultAttributesAndHeight(pblock,true,0);
     pblock->nVersion = 2;
@@ -200,7 +228,9 @@ void Blockv2test()
     BOOST_CHECK(state4.GetRejectReason()=="time-too-old");
     // Do not update parent since block has failed
 
+    ////////////////////////////////////////////////////////
     // Adding a non-final coinbase, must modify coinbase
+    ////////////////////////////////////////////////////////
     CheckSubsidyHalving(pblocktemplate,pblock);
     SetEmptyBlock(pblock);
     // Use a mutable coinbase to change nLockTime and  nSequence
@@ -217,10 +247,23 @@ void Blockv2test()
     BOOST_CHECK(state5.GetRejectReason()=="bad-txns-nonfinal");
     // Do not update parent since block has failed
 
+    ModifiableParams()->setSkipProofOfWorkCheck(false);
+
+    ////////////////////////////////////////////////////////////////////////////////
+    // Just to be sure that proof-of-work skipping is working ok, we submit a block
+    // without enought proof of work and it must be rejected.
+    ////////////////////////////////////////////////////////////////////////////////
+    CheckSubsidyHalving(pblocktemplate,pblock);
+    SetBlockDefaultAttributesAndHeight(pblock,true,0);
+    pblock->nVersion = 2;
+    CValidationState state6;
+    BOOST_CHECK(ProcessBlock(state6, NULL, pblock)==false);
+    BOOST_CHECK(!state6.IsValid());
+    BOOST_CHECK(state6.GetRejectReason()=="high-hash");
 
     delete pblocktemplate;
 
-    ModifiableParams()->setSkipProofOfWorkCheck(false);
+
     LogPrintf("Blockv2test testcase ends\n");
 }
 

From 470590277782cce2fe73275c74523aef59a51eab Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 29 Sep 2014 13:13:47 +0200
Subject: [PATCH 0782/1819] Avoid introducing a virtual into CChainParams

Treat fSkipProofOfWorkCheck the same as other parameters.
---
 src/chainparams.cpp | 5 +----
 src/chainparams.h   | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 8a00da0bb51f..31c67715c87f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -115,6 +115,7 @@ class CMainParams : public CChainParams {
         fAllowMinDifficultyBlocks = false;
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
+        fSkipProofOfWorkCheck = false;
     }
 };
 static CMainParams mainParams;
@@ -231,11 +232,7 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
         fDefaultCheckMemPool = true;
         fAllowMinDifficultyBlocks = false;
         fMineBlocksOnDemand = true;
-        fSkipProofOfWorkCheck = false;
     }
-    virtual bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
-protected:
-    bool fSkipProofOfWorkCheck;
 public:
     // Published setters to allow changing values in unit test cases
     virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
diff --git a/src/chainparams.h b/src/chainparams.h
index 171a590a5f37..50441a89f3de 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -62,7 +62,7 @@ class CChainParams
     /* Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /* Skip proof-of-work check: allow mining of any difficulty block */
-    virtual bool SkipProofOfWorkCheck() const { return false; }
+    bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
@@ -105,6 +105,7 @@ class CChainParams
     bool fAllowMinDifficultyBlocks;
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
+    bool fSkipProofOfWorkCheck;
 };
 
 /** Modifiable parameters interface is used by test cases to adapt the parameters in order

From 28fb5f388da2243386c26ab8793383db40715ea5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 29 Sep 2014 16:58:30 +0200
Subject: [PATCH 0783/1819] doc: update gpg command line for SHA256SUMS.asc in
 release process

---
 doc/release-process.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index 5b8029955d9b..940f934baff3 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -181,9 +181,10 @@ Commit your signature to gitian.sigs:
 - Create `SHA256SUMS.asc` for the builds, and GPG-sign it:
 ```bash
 sha256sum * > SHA256SUMS
-gpg --clearsign SHA256SUMS # outputs SHA256SUMS.asc
+gpg --digest-algo sha256 --clearsign SHA256SUMS # outputs SHA256SUMS.asc
 rm SHA256SUMS
 ```
+(the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
 
 - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
 

From 68af7d02cf63eb3d2ed015013d245fe5d3aadbd1 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 29 Sep 2014 19:16:24 +0200
Subject: [PATCH 0784/1819] Fix vector out of bounds in script tests

---
 src/test/script_tests.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index f9086b6a6466..7f09b3daa1b7 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -108,20 +108,20 @@ struct KeyData
     KeyData()
     {
 
-        key0.Set(&vchKey0[0], &vchKey0[32], false);
-        key0C.Set(&vchKey0[0], &vchKey0[32], true);
+        key0.Set(vchKey0, vchKey0 + 32, false);
+        key0C.Set(vchKey0, vchKey0 + 32, true);
         pubkey0 = key0.GetPubKey();
         pubkey0H = key0.GetPubKey();
         pubkey0C = key0C.GetPubKey();
         *const_cast<unsigned char*>(&pubkey0H[0]) = 0x06 | (pubkey0H[64] & 1);
 
-        key1.Set(&vchKey1[0], &vchKey1[32], false);
-        key1C.Set(&vchKey1[0], &vchKey1[32], true);
+        key1.Set(vchKey1, vchKey1 + 32, false);
+        key1C.Set(vchKey1, vchKey1 + 32, true);
         pubkey1 = key1.GetPubKey();
         pubkey1C = key1C.GetPubKey();
 
-        key2.Set(&vchKey2[0], &vchKey2[32], false);
-        key2C.Set(&vchKey2[0], &vchKey2[32], true);
+        key2.Set(vchKey2, vchKey2 + 32, false);
+        key2C.Set(vchKey2, vchKey2 + 32, true);
         pubkey2 = key2.GetPubKey();
         pubkey2C = key2C.GetPubKey();
     }
@@ -190,8 +190,8 @@ class TestBuilder
         std::vector<unsigned char> vchSig, r, s;
         do {
             key.Sign(hash, vchSig, lenS <= 32);
-            r = std::vector<unsigned char>(&vchSig[4], &vchSig[4 + vchSig[3]]);
-            s = std::vector<unsigned char>(&vchSig[6 + vchSig[3]], &vchSig[6 + vchSig[3] + vchSig[5 + vchSig[3]]]);
+            r = std::vector<unsigned char>(vchSig.begin() + 4, vchSig.begin() + 4 + vchSig[3]);
+            s = std::vector<unsigned char>(vchSig.begin() + 6 + vchSig[3], vchSig.begin() + 6 + vchSig[3] + vchSig[5 + vchSig[3]]);
         } while (lenR != r.size() || lenS != s.size());
         vchSig.push_back(static_cast<unsigned char>(nHashType));
         DoPush(vchSig);

From af0bd5ee7f8ad241830436e932af2486715327e9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 29 Sep 2014 22:03:11 -0400
Subject: [PATCH 0785/1819] osx: fix signing to make Gatekeeper happy (again)

The approach from 65f3fa8d1 worked for signing on 10.9.4, but not newer
versions. 10.9.5 (and up) want each framework to stand alone.

Now in addition to copying the plist's from Qt for each framework, we put them
in per-version dirs and only symlink to the latest, rather than using symlinks
for any contents.
---
 contrib/macdeploy/macdeployqtplus | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 5ab6a222dd4e..1b50981f0a75 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -283,8 +283,8 @@ def copyFramework(framework, path, verbose):
 
     if not framework.isDylib(): # Copy resources for real frameworks
 
-        linkfrom = os.path.join(path, "Contents/Frameworks/", framework.frameworkName, framework.binaryName)
-        linkto = os.path.join(framework.binaryPath)
+        linkfrom = os.path.join(path, "Contents","Frameworks", framework.frameworkName, "Versions", "Current")
+        linkto = framework.version
         if not os.path.exists(linkfrom):
             os.symlink(linkto, linkfrom)
             if verbose >= 2:
@@ -303,11 +303,6 @@ def copyFramework(framework, path, verbose):
             toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
             shutil.copytree(fromContentsDir, toContentsDir)
             contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
-            if not os.path.exists(contentslinkfrom):
-                contentslinkto = os.path.join("Versions/", framework.version, "Contents")
-                os.symlink(contentslinkto, contentslinkfrom)
-                if verbose >= 3:
-                    print "Linked:", contentslinkfrom, "->", contentslinkto
             if verbose >= 3:
                 print "Copied Contents:", fromContentsDir
                 print " to:", toContentsDir

From 41020ebe862416931b009256020a4e7a8191c8ae Mon Sep 17 00:00:00 2001
From: Whit J <whitj00@users.noreply.github.com>
Date: Tue, 30 Sep 2014 10:41:31 -0700
Subject: [PATCH 0786/1819] Fix formatting in  init.md

---
 doc/init.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/init.md b/doc/init.md
index 3d14025ab497..1f0559d80643 100644
--- a/doc/init.md
+++ b/doc/init.md
@@ -4,10 +4,10 @@ Sample init scripts and service configuration for bitcoind
 Sample scripts and configuration files for systemd, Upstart and OpenRC
 can be found in the contrib/init folder.
 
-contrib/init/bitcoind.service:    systemd service unit configuration
-contrib/init/bitcoind.openrc:     OpenRC compatible SysV style init script
-contrib/init/bitcoind.openrcconf: OpenRC conf.d file
-contrib/init/bitcoind.conf:       Upstart service configuration file
+    contrib/init/bitcoind.service:    systemd service unit configuration
+    contrib/init/bitcoind.openrc:     OpenRC compatible SysV style init script
+    contrib/init/bitcoind.openrcconf: OpenRC conf.d file
+    contrib/init/bitcoind.conf:       Upstart service configuration file
 
 1. Service User
 ---------------------------------

From 6d7a0fa4e5a691764dc532d64af40b2dd3dc9e8b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 3 Sep 2014 16:36:06 -0400
Subject: [PATCH 0787/1819] depends: update the comparison tool to a more
 recent version

---
 depends/packages/native_comparisontool.mk | 39 +++++------------------
 1 file changed, 8 insertions(+), 31 deletions(-)

diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
index 003923d7dde2..d9f77221902d 100644
--- a/depends/packages/native_comparisontool.mk
+++ b/depends/packages/native_comparisontool.mk
@@ -1,30 +1,12 @@
 package=native_comparisontool
-$(package)_version=1
-$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/master/BitcoindComparisonTool_jar
-$(package)_file_name=BitcoindComparisonTool.jar
-$(package)_sha256_hash=a08b1a55523e7f57768cb66c35f47a926710e5b6c82822e1ccfbe38fcce37db2
-$(package)_guava_file_name=guava-13.0.1.jar
-$(package)_guava_sha256_hash=feb4b5b2e79a63b72ec47a693b1cf35cf1cea1f60a2bb2615bf21f74c7a60bb0
-$(package)_h2_file_name=h2-1.3.167.jar
-$(package)_h2_sha256_hash=fa97521a2e72174485a96276bcf6f573d5e44ca6aba2f62de87b33b5bb0d4b91
-$(package)_sc-light-jdk15on_file_name=sc-light-jdk15on-1.47.0.2.jar
-$(package)_sc-light-jdk15on_sha256_hash=931f39d351429fb96c2f749e7ecb1a256a8ebbf5edca7995c9cc085b94d1841d
-$(package)_slf4j-api_file_name=slf4j-api-1.6.4.jar
-$(package)_slf4j-api_sha256_hash=367b909030f714ee1176ab096b681e06348f03385e98d1bce0ed801b5452357e
-$(package)_slf4j-jdk14_file_name=slf4j-jdk14-1.6.4.jar
-$(package)_slf4j-jdk14_sha256_hash=064bd81796710f713f9f4a2309c0e032309934c2d2b4f7d3b6958325e584e13f
-
-define $(package)_fetch_cmds
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_file_name),$($(package)_file_name),$($(package)_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_guava_file_name),$($(package)_guava_file_name),$($(package)_guava_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_h2_file_name),$($(package)_h2_file_name),$($(package)_h2_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_file_name),$($(package)_sc-light-jdk15on_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_file_name),$($(package)_slf4j-api_sha256_hash)) && \
-$(call fetch_file,$(package),$($(package)_download_path),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_file_name),$($(package)_slf4j-jdk14_sha256_hash))
-endef
+$(package)_version=adfd3de7
+$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/10222bfdace65a0c5f3bd4a766eeb6b3a8b869fb/
+$(package)_file_name=pull-tests-$($(package)_version).jar
+$(package)_sha256_hash=fd2282b112e35f339dbe3729b08a04834ad719f8c9c10eeec1178465e6d36a18
+$(package)_install_dirname=BitcoindComparisonTool_jar
+$(package)_install_filename=BitcoindComparisonTool.jar
 
 define $(package)_extract_cmds
-echo none
 endef
 
 define $(package)_configure_cmds
@@ -34,11 +16,6 @@ define $(package)_build_cmds
 endef
 
 define $(package)_stage_cmds
-  mkdir -p $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar && \
-  cp $(SOURCES_PATH)/$($(package)_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
-  cp $(SOURCES_PATH)/$($(package)_guava_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
-  cp $(SOURCES_PATH)/$($(package)_h2_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
-  cp $(SOURCES_PATH)/$($(package)_sc-light-jdk15on_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
-  cp $(SOURCES_PATH)/$($(package)_slf4j-api_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/  && \
-  cp $(SOURCES_PATH)/$($(package)_slf4j-jdk14_file_name) $($(package)_staging_prefix_dir)/share/BitcoindComparisonTool_jar/
+  mkdir -p $($(package)_staging_prefix_dir)/share/$($(package)_install_dirname) && \
+  mv $(SOURCES_PATH)/$($(package)_file_name) $($(package)_staging_prefix_dir)/share/$($(package)_install_dirname)/$($(package)_install_filename)
 endef

From e166c177bccdaf5b3c1b2238e8e04d53554d138e Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Mon, 29 Sep 2014 22:51:47 -0700
Subject: [PATCH 0788/1819] Revert "travis: retry tests before giving up"

This reverts commit 7e3821c097c05a4790abac53ddd26ef28cb7cf4d.
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 155ac012d89d..f7d94df64687 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,6 +58,6 @@ script:
     - cd bitcoin-$HOST
     - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
-    - if [ "$RUN_TESTS" = "true" ]; then travis_retry make check; fi
+    - if [ "$RUN_TESTS" = "true" ]; then make check; fi
 after_script:
     - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi

From 41d67c78bf66c8c171947148e18b9ec01768ba65 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Sep 2014 16:05:27 -0400
Subject: [PATCH 0789/1819] tests: fix python test-runner for windows

Windows needed a few fixups to get the tests running:
1. bitcoin-tx needs a file extension in Windows. Take this opportunity to
   add an env file, which pulls variables out of our build config. This can
   be extended as needed, for now it's very simple.
2. After #1, split the args out of the exec key in the test data.
3. Correct the line-endings from windows stdout
---
 configure.ac                         |  2 +-
 src/test/bctest.py                   | 15 +++++++-------
 src/test/bitcoin-util-test.py        |  3 ++-
 src/test/buildenv.py.in              |  2 ++
 src/test/data/bitcoin-util-test.json | 29 ++++++++++++++++++----------
 5 files changed, 32 insertions(+), 19 deletions(-)
 create mode 100644 src/test/buildenv.py.in

diff --git a/configure.ac b/configure.ac
index 0f9e78b74fbe..7025249abab0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -793,7 +793,7 @@ AC_SUBST(BUILD_TEST)
 AC_SUBST(BUILD_QT)
 AC_SUBST(BUILD_TEST_QT)
 AC_SUBST(MINIUPNPC_CPPFLAGS)
-AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist])
+AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
 AC_OUTPUT
diff --git a/src/test/bctest.py b/src/test/bctest.py
index 1839f4fef460..ef461014eab1 100644
--- a/src/test/bctest.py
+++ b/src/test/bctest.py
@@ -7,9 +7,11 @@
 import json
 import sys
 
-def bctest(testDir, testObj):
-	execargs = testObj['exec']
+def bctest(testDir, testObj, exeext):
 
+	execprog = testObj['exec'] + exeext
+	execargs = testObj['args']
+	execrun = [execprog] + execargs
 	stdinCfg = None
 	inputData = None
 	if "input" in testObj:
@@ -22,12 +24,11 @@ def bctest(testDir, testObj):
 	if "output_cmp" in testObj:
 		outputFn = testObj['output_cmp']
 		outputData = open(testDir + "/" + outputFn).read()
-
-	proc = subprocess.Popen(execargs, stdin=stdinCfg, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+	proc = subprocess.Popen(execrun, stdin=stdinCfg, stdout=subprocess.PIPE, stderr=subprocess.PIPE,universal_newlines=True)
 	try:
 		outs = proc.communicate(input=inputData)
 	except OSError:
-		print("OSError, Failed to execute " + execargs[0])
+		print("OSError, Failed to execute " + execprog)
 		sys.exit(1)
 
 	if outputData and (outs[0] != outputData):
@@ -41,13 +42,13 @@ def bctest(testDir, testObj):
 		print("Return code mismatch for " + outputFn)
 		sys.exit(1)
 
-def bctester(testDir, input_basename):
+def bctester(testDir, input_basename, buildenv):
 	input_filename = testDir + "/" + input_basename
 	raw_data = open(input_filename).read()
 	input_data = json.loads(raw_data)
 
 	for testObj in input_data:
-		bctest(testDir, testObj)
+		bctest(testDir, testObj, buildenv.exeext)
 
 	sys.exit(0)
 
diff --git a/src/test/bitcoin-util-test.py b/src/test/bitcoin-util-test.py
index 40690c2fed89..0eece14cfe3a 100755
--- a/src/test/bitcoin-util-test.py
+++ b/src/test/bitcoin-util-test.py
@@ -5,8 +5,9 @@
 
 import os
 import bctest
+import buildenv
 
 if __name__ == '__main__':
 	bctest.bctester(os.environ["srcdir"] + "/test/data",
-			"bitcoin-util-test.json")
+			"bitcoin-util-test.json",buildenv)
 
diff --git a/src/test/buildenv.py.in b/src/test/buildenv.py.in
new file mode 100644
index 000000000000..1618bdeb764b
--- /dev/null
+++ b/src/test/buildenv.py.in
@@ -0,0 +1,2 @@
+#!/usr/bin/python
+exeext="@EXEEXT@"
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index cb74d73ef2ae..f8424b72a34c 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -1,33 +1,41 @@
 [
-  { "exec": ["./bitcoin-tx", "-create"],
+  { "exec": "././bitcoin-tx",
+    "args": ["-create"],
     "output_cmp": "blanktx.hex"
   },
-  { "exec": ["./bitcoin-tx", "-"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-"],
     "input": "blanktx.hex",
     "output_cmp": "blanktx.hex"
   },
-  { "exec": ["./bitcoin-tx", "-", "delin=1"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-", "delin=1"],
     "input": "tx394b54bb.hex",
     "output_cmp": "tt-delin1-out.hex"
   },
-  { "exec": ["./bitcoin-tx", "-", "delin=31"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-", "delin=31"],
     "input": "tx394b54bb.hex",
     "return_code": 1
   },
-  { "exec": ["./bitcoin-tx", "-", "delout=1"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-", "delout=1"],
     "input": "tx394b54bb.hex",
     "output_cmp": "tt-delout1-out.hex"
   },
-  { "exec": ["./bitcoin-tx", "-", "delout=2"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-", "delout=2"],
     "input": "tx394b54bb.hex",
     "return_code": 1
   },
-  { "exec": ["./bitcoin-tx", "-", "locktime=317000"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-", "locktime=317000"],
     "input": "tx394b54bb.hex",
     "output_cmp": "tt-locktime317000-out.hex"
   },
-  { "exec":
-    ["./bitcoin-tx", "-create",
+  { "exec": "./bitcoin-tx",
+    "args":
+    ["-create",
      "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
      "in=bf829c6bcf84579331337659d31f89dfd138f7f7785802d5501c92333145ca7c:18",
      "in=22a6f904655d53ae2ff70e701a0bbd90aa3975c0f40bfc6cc996a9049e31cdfc:1",
@@ -35,7 +43,8 @@
      "outaddr=4:1P8yWvZW8jVihP1bzHeqfE4aoXNX8AVa46"],
     "output_cmp": "txcreate1.hex"
   },
-  { "exec": ["./bitcoin-tx", "-create", "outscript=0:"],
+  { "exec": "./bitcoin-tx",
+    "args": ["-create", "outscript=0:"],
     "output_cmp": "txcreate2.hex"
   }
 ]

From 63c17613ab808208c8a760fc750e0429c8e53a39 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Sep 2014 16:29:01 -0400
Subject: [PATCH 0790/1819] tests: fix false-positive under win64

BN_ULONG isn't necessarily an unsigned long, as is the case on win64.
---
 src/test/bignum.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/bignum.h b/src/test/bignum.h
index a75f5250fa89..86980b2af62f 100644
--- a/src/test/bignum.h
+++ b/src/test/bignum.h
@@ -63,11 +63,11 @@ class CBigNum : public BIGNUM
 
     int getint() const
     {
-        unsigned long n = BN_get_word(this);
+        BN_ULONG n = BN_get_word(this);
         if (!BN_is_negative(this))
-            return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
+            return (n > (BN_ULONG)std::numeric_limits<int>::max() ? std::numeric_limits<int>::max() : n);
         else
-            return (n > (unsigned long)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
+            return (n > (BN_ULONG)std::numeric_limits<int>::max() ? std::numeric_limits<int>::min() : -(int)n);
     }
 
     void setint64(int64_t sn)

From 347a3a3eaad4096af668b67b2ae236258d63287c Mon Sep 17 00:00:00 2001
From: JL2035 <jl2035@users.noreply.github.com>
Date: Wed, 1 Oct 2014 01:53:46 +0200
Subject: [PATCH 0791/1819] Update build-unix.md

Debian also need libboost-all-dev installed.
---
 doc/build-unix.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index 8a76a8b2cd05..0c3376df4b03 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -63,7 +63,7 @@ Build requirements:
 
 	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
 	
-for Ubuntu 12.04 and later:
+for Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:
 
 	sudo apt-get install libboost-all-dev
 

From f606bb9bafafb12bcf9bc0834125c884da97f9e1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 28 Sep 2014 16:09:19 +0200
Subject: [PATCH 0792/1819] fix a possible memory leak in CWalletDB::Recover

- convert pdbCopy into a boost::scoped_ptr to ensure memory gets freed
  in all cases (e.g. after "ret > 0")
---
 src/walletdb.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index a84f44db01b3..e13830a8f450 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -15,11 +15,11 @@
 
 #include <boost/filesystem.hpp>
 #include <boost/foreach.hpp>
+#include <boost/scoped_ptr.hpp>
 #include <boost/thread.hpp>
 
-using namespace std;
 using namespace boost;
-
+using namespace std;
 
 static uint64_t nAccountingEntryNumber = 0;
 
@@ -926,7 +926,7 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
     LogPrintf("Salvage(aggressive) found %u records\n", salvagedData.size());
 
     bool fSuccess = allOK;
-    Db* pdbCopy = new Db(&dbenv.dbenv, 0);
+    boost::scoped_ptr<Db> pdbCopy(new Db(&dbenv.dbenv, 0));
     int ret = pdbCopy->open(NULL,               // Txn pointer
                             filename.c_str(),   // Filename
                             "main",             // Logical db name
@@ -967,7 +967,6 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename, bool fOnlyKeys)
     }
     ptxn->commit(0);
     pdbCopy->close(0);
-    delete pdbCopy;
 
     return fSuccess;
 }

From 870da77da632501e8eec58ed73e8f30549cc41e9 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 28 Sep 2014 16:11:17 +0200
Subject: [PATCH 0793/1819] fix possible memory leaks in CWallet::EncryptWallet

- add missing deletes for pwalletdbEncryption
- add an assert before trying to reserve memory for pwalletdbEncryption
- add a destructor to CWallet, which ensures deletion of
  pwalletdbEncryption on object destruction
---
 src/wallet.cpp | 24 ++++++++++++++++++------
 src/wallet.h   |  8 ++++++++
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index e69f59aacdb9..897f53b8b7d5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -426,17 +426,25 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
         mapMasterKeys[++nMasterKeyMaxID] = kMasterKey;
         if (fFileBacked)
         {
+            assert(!pwalletdbEncryption);
             pwalletdbEncryption = new CWalletDB(strWalletFile);
-            if (!pwalletdbEncryption->TxnBegin())
+            if (!pwalletdbEncryption->TxnBegin()) {
+                delete pwalletdbEncryption;
+                pwalletdbEncryption = NULL;
                 return false;
+            }
             pwalletdbEncryption->WriteMasterKey(nMasterKeyMaxID, kMasterKey);
         }
 
         if (!EncryptKeys(vMasterKey))
         {
-            if (fFileBacked)
+            if (fFileBacked) {
                 pwalletdbEncryption->TxnAbort();
-            exit(1); //We now probably have half of our keys encrypted in memory, and half not...die and let the user reload their unencrypted wallet.
+                delete pwalletdbEncryption;
+            }
+            // We now probably have half of our keys encrypted in memory, and half not...
+            // die and let the user reload their unencrypted wallet.
+            exit(1);
         }
 
         // Encryption was introduced in version 0.4.0
@@ -444,8 +452,12 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
 
         if (fFileBacked)
         {
-            if (!pwalletdbEncryption->TxnCommit())
-                exit(1); //We now have keys encrypted in memory, but no on disk...die to avoid confusion and let the user reload their unencrypted wallet.
+            if (!pwalletdbEncryption->TxnCommit()) {
+                delete pwalletdbEncryption;
+                // We now have keys encrypted in memory, but no on disk...
+                // die to avoid confusion and let the user reload their unencrypted wallet.
+                exit(1);
+            }
 
             delete pwalletdbEncryption;
             pwalletdbEncryption = NULL;
@@ -1068,7 +1080,7 @@ int64_t CWallet::GetWatchOnlyBalance() const
                 nTotal += pcoin->GetAvailableWatchOnlyCredit();
         }
     }
-    
+
     return nTotal;
 }
 
diff --git a/src/wallet.h b/src/wallet.h
index fde87a8a2f82..344f9c0e0402 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -143,6 +143,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
     {
         SetNull();
     }
+
     CWallet(std::string strWalletFileIn)
     {
         SetNull();
@@ -150,6 +151,13 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
         strWalletFile = strWalletFileIn;
         fFileBacked = true;
     }
+
+    ~CWallet()
+    {
+        delete pwalletdbEncryption;
+        pwalletdbEncryption = NULL;
+    }
+
     void SetNull()
     {
         nWalletVersion = FEATURE_BASE;

From d0c4197ef6ecfdaff792579810107e2f1b8b319e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 1 Oct 2014 08:50:24 +0200
Subject: [PATCH 0794/1819] change exit(1) to an assert in
 CWallet::EncryptWallet

---
 src/wallet.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 897f53b8b7d5..be063ccb42a6 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -15,6 +15,8 @@
 #include "util.h"
 #include "utilmoneystr.h"
 
+#include <assert.h>
+
 #include <boost/algorithm/string/replace.hpp>
 #include <boost/thread.hpp>
 
@@ -444,7 +446,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
             }
             // We now probably have half of our keys encrypted in memory, and half not...
             // die and let the user reload their unencrypted wallet.
-            exit(1);
+            assert(false);
         }
 
         // Encryption was introduced in version 0.4.0
@@ -456,7 +458,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
                 delete pwalletdbEncryption;
                 // We now have keys encrypted in memory, but no on disk...
                 // die to avoid confusion and let the user reload their unencrypted wallet.
-                exit(1);
+                assert(false);
             }
 
             delete pwalletdbEncryption;

From b5ec5fe0cb0a85cb626167b66fdda3bed8c5ba19 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 25 Sep 2014 11:56:05 +0200
Subject: [PATCH 0795/1819] update getnetworkinfo help with subversion

- add missing subversion field to getnetworkinfo help
- fix style and format errors in help string
- remove unneeded int casts
---
 src/rpcnet.cpp | 42 ++++++++++++++++++++++++------------------
 1 file changed, 24 insertions(+), 18 deletions(-)

diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index fb159d96f6af..bc19d1372a75 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -368,23 +368,29 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "Returns an object containing various state info regarding P2P networking.\n"
             "\nResult:\n"
             "{\n"
-            "  \"version\": xxxxx,           (numeric) the server version\n"
-            "  \"protocolversion\": xxxxx,   (numeric) the protocol version\n"
-            "  \"localservices\": \"xxxxxxxxxxxxxxxx\",   (string) the services we offer to the network\n"
-            "  \"timeoffset\": xxxxx,        (numeric) the time offset\n"
-            "  \"connections\": xxxxx,       (numeric) the number of connections\n"
-            "  \"networks\": [               (array) information per network\n"
-            "      \"name\": \"xxx\",        (string) network (ipv4, ipv6 or onion)\n"
-            "      \"limited\": xxx,         (boolean) is the network limited using -onlynet?\n"
-            "      \"reachable\": xxx,       (boolean) is the network reachable?\n"
-            "      \"proxy\": \"host:port\"  (string) the proxy that is used for this network, or empty if none\n"
-            "    },\n"
+            "  \"version\": xxxxx,                      (numeric) the server version\n"
+            "  \"subversion\": \"/Satoshi:x.x.x/\",     (string) the server subversion string\n"
+            "  \"protocolversion\": xxxxx,              (numeric) the protocol version\n"
+            "  \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
+            "  \"timeoffset\": xxxxx,                   (numeric) the time offset\n"
+            "  \"connections\": xxxxx,                  (numeric) the number of connections\n"
+            "  \"networks\": [                          (array) information per network\n"
+            "  {\n"
+            "    \"name\": \"xxx\",                     (string) network (ipv4, ipv6 or onion)\n"
+            "    \"limited\": true|false,               (boolean) is the network limited using -onlynet?\n"
+            "    \"reachable\": true|false,             (boolean) is the network reachable?\n"
+            "    \"proxy\": \"host:port\"               (string) the proxy that is used for this network, or empty if none\n"
+            "  }\n"
+            "  ,...\n"
             "  ],\n"
-            "  \"relayfee\": x.xxxx,         (numeric) minimum relay fee for non-free transactions in btc/kb\n"
-            "  \"localaddresses\": [,        (array) list of local addresses\n"
-            "    \"address\": \"xxxx\",      (string) network address\n"
-            "    \"port\": xxx,              (numeric) network port\n"
-            "    \"score\": xxx              (numeric) relative score\n"
+            "  \"relayfee\": x.xxxxxxxx,                (numeric) minimum relay fee for non-free transactions in btc/kb\n"
+            "  \"localaddresses\": [                    (array) list of local addresses\n"
+            "  {\n"
+            "    \"address\": \"xxxx\",                 (string) network address\n"
+            "    \"port\": xxx,                         (numeric) network port\n"
+            "    \"score\": xxx                         (numeric) relative score\n"
+            "  }\n"
+            "  ,...\n"
             "  ]\n"
             "}\n"
             "\nExamples:\n"
@@ -393,10 +399,10 @@ Value getnetworkinfo(const Array& params, bool fHelp)
         );
 
     Object obj;
-    obj.push_back(Pair("version",       (int)CLIENT_VERSION));
+    obj.push_back(Pair("version",       CLIENT_VERSION));
     obj.push_back(Pair("subversion",
         FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, std::vector<string>())));
-    obj.push_back(Pair("protocolversion",(int)PROTOCOL_VERSION));
+    obj.push_back(Pair("protocolversion",PROTOCOL_VERSION));
     obj.push_back(Pair("localservices",       strprintf("%016x", nLocalServices)));
     obj.push_back(Pair("timeoffset",    GetTimeOffset()));
     obj.push_back(Pair("connections",   (int)vNodes.size()));

From c375b5c102971abfefaaf07776b5b65f1cca54f1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 1 Oct 2014 11:00:29 +0200
Subject: [PATCH 0796/1819] remove dead/unused code in walletdb.cpp

- closes #5021
---
 src/walletdb.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index a84f44db01b3..b21cb4eabde4 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -391,13 +391,6 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
                 wss.fAnyUnordered = true;
 
             pwallet->AddToWallet(wtx, true);
-            //// debug print
-            //LogPrintf("LoadWallet  %s\n", wtx.GetHash().ToString());
-            //LogPrintf(" %12d  %s  %s  %s\n",
-            //    wtx.vout[0].nValue,
-            //    DateTimeStrFormat("%Y-%m-%d %H:%M:%S", wtx.GetBlockTime()),
-            //    wtx.hashBlock.ToString(),
-            //    wtx.mapValue["message"]);
         }
         else if (strType == "acentry")
         {
@@ -708,7 +701,6 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
 DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash, vector<CWalletTx>& vWtx)
 {
     pwallet->vchDefaultKey = CPubKey();
-    CWalletScanState wss;
     bool fNoncriticalErrors = false;
     DBErrors result = DB_LOAD_OK;
 

From c122f5528c882efc8aebe31fd4d84612175f66aa Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 1 Oct 2014 10:09:08 +0200
Subject: [PATCH 0797/1819] qt: Register CAmount metatype

This allows sending the type over queued connections.
Also normalize signal/slot names.
---
 src/qt/bitcoin.cpp         | 4 ++++
 src/qt/overviewpage.cpp    | 2 +-
 src/qt/sendcoinsdialog.cpp | 4 ++--
 src/qt/walletview.cpp      | 2 +-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index bd686041c1b9..5e2fdc6c30e8 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -73,6 +73,7 @@ Q_IMPORT_PLUGIN(QCocoaIntegrationPlugin);
 
 // Declare meta types used for QMetaObject::invokeMethod
 Q_DECLARE_METATYPE(bool*)
+Q_DECLARE_METATYPE(CAmount)
 
 static void InitMessage(const std::string &message)
 {
@@ -509,6 +510,9 @@ int main(int argc, char *argv[])
 
     // Register meta types used for QMetaObject::invokeMethod
     qRegisterMetaType< bool* >();
+    //   Need to pass name here as CAmount is a typedef (see http://qt-project.org/doc/qt-5/qmetatype.html#qRegisterMetaType)
+    //   IMPORTANT if it is no longer a typedef use the normal variant above
+    qRegisterMetaType< CAmount >("CAmount");
 
     /// 3. Application identification
     // must be set before OptionsModel is initialized or translations are loaded,
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1d6c23f8a0f7..669d5474fd69 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -220,7 +220,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
         // Keep up to date with wallet
         setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)), this, SLOT(setBalance(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)));
+        connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));
 
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index d67cac57b462..ce94131cce01 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -92,13 +92,13 @@ void SendCoinsDialog::setModel(WalletModel *model)
 
         setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(),
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
-        connect(model, SIGNAL(balanceChanged(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)), this, SLOT(setBalance(const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&, const CAmount&)));
+        connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
 
         // Coin Control
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels()));
         connect(model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool)));
-        connect(model->getOptionsModel(), SIGNAL(transactionFeeChanged(qint64)), this, SLOT(coinControlUpdateLabels()));
+        connect(model->getOptionsModel(), SIGNAL(transactionFeeChanged(CAmount)), this, SLOT(coinControlUpdateLabels()));
         ui->frameCoinControl->setVisible(model->getOptionsModel()->getCoinControlFeatures());
         coinControlUpdateLabels();
     }
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 322d0a6ee606..eff50593bd4c 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -92,7 +92,7 @@ void WalletView::setBitcoinGUI(BitcoinGUI *gui)
         connect(this, SIGNAL(encryptionStatusChanged(int)), gui, SLOT(setEncryptionStatus(int)));
 
         // Pass through transaction notifications
-        connect(this, SIGNAL(incomingTransaction(QString,int,const CAmount&,QString,QString)), gui, SLOT(incomingTransaction(QString,int,const CAmount&,QString,QString)));
+        connect(this, SIGNAL(incomingTransaction(QString,int,CAmount,QString,QString)), gui, SLOT(incomingTransaction(QString,int,CAmount,QString,QString)));
     }
 }
 

From f60dc15c50e8fad52f8ee3e313041e2d224be667 Mon Sep 17 00:00:00 2001
From: Whit J <whitj00@users.noreply.github.com>
Date: Tue, 30 Sep 2014 10:48:40 -0700
Subject: [PATCH 0798/1819] doc: add make install to build-osx.md and
 build-unix.md

---
 doc/build-osx.md  | 4 ++++
 doc/build-unix.md | 9 ++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index 0364d3a01b50..dc55f8259e07 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -81,6 +81,10 @@ After exiting, you'll get a warning that the install is keg-only, which means it
 
         make check
 
+4.  (Optional) You can also install bitcoind to your path:
+
+        make install
+
 Creating a release build
 ------------------------
 You can ignore this section if you are building `bitcoind` for your own use.
diff --git a/doc/build-unix.md b/doc/build-unix.md
index 0c3376df4b03..fb5eaec43136 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -15,9 +15,12 @@ the usage of the absolute path.
 To Build
 ---------------------
 
-	./autogen.sh
-	./configure
-	make
+```bash
+./autogen.sh
+./configure
+make
+make install # optional
+```
 
 This will build bitcoin-qt as well if the dependencies are met.
 

From e9f3fa7c0b2c605f2ecd9733ca11979bad75d3e8 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Sep 2014 21:52:19 -0400
Subject: [PATCH 0799/1819] travis: enable windows tests

---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index f7d94df64687..eae07ead8e56 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,9 +35,9 @@ matrix:
     - compiler: "true 5"
       env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
     - compiler: "true 6"
-      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev" GOAL="deploy"
+      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
     - compiler: "true 7"
-      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev" GOAL="deploy"
+      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
 install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi

From 965c306d6d6ee3695dc50615a87e25c248c41a89 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Mon, 29 Sep 2014 12:09:46 -0400
Subject: [PATCH 0800/1819] Keep symlinks when copying into .app bundle

Code signing failed for me on OSX 10.9.5 because the
Versions/Current symbolic links were being replaced
with a duplicate copy of the frameworks' code.

Releases were bigger than they needed to be, for the
same reason.
---
 contrib/macdeploy/macdeployqtplus | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 1b50981f0a75..8f826ace09b5 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -292,7 +292,7 @@ def copyFramework(framework, path, verbose):
         fromResourcesDir = framework.sourceResourcesDirectory
         if os.path.exists(fromResourcesDir):
             toResourcesDir = os.path.join(path, framework.destinationResourcesDirectory)
-            shutil.copytree(fromResourcesDir, toResourcesDir)
+            shutil.copytree(fromResourcesDir, toResourcesDir, symlinks=True)
             if verbose >= 3:
                 print "Copied resources:", fromResourcesDir
                 print " to:", toResourcesDir
@@ -301,7 +301,7 @@ def copyFramework(framework, path, verbose):
             fromContentsDir = framework.sourceContentsDirectory
         if os.path.exists(fromContentsDir):
             toContentsDir = os.path.join(path, framework.destinationVersionContentsDirectory)
-            shutil.copytree(fromContentsDir, toContentsDir)
+            shutil.copytree(fromContentsDir, toContentsDir, symlinks=True)
             contentslinkfrom = os.path.join(path, framework.destinationContentsDirectory)
             if verbose >= 3:
                 print "Copied Contents:", fromContentsDir
@@ -310,7 +310,7 @@ def copyFramework(framework, path, verbose):
         qtMenuNibSourcePath = os.path.join(framework.frameworkDirectory, "Resources", "qt_menu.nib")
         qtMenuNibDestinationPath = os.path.join(path, "Contents", "Resources", "qt_menu.nib")
         if os.path.exists(qtMenuNibSourcePath) and not os.path.exists(qtMenuNibDestinationPath):
-            shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath)
+            shutil.copytree(qtMenuNibSourcePath, qtMenuNibDestinationPath, symlinks=True)
             if verbose >= 3:
                 print "Copied for libQtGui:", qtMenuNibSourcePath
                 print " to:", qtMenuNibDestinationPath
@@ -584,7 +584,7 @@ if verbose >= 3:
     print app_bundle, "->", target
 
 os.mkdir("dist")
-shutil.copytree(app_bundle, target)
+shutil.copytree(app_bundle, target, symlinks=True)
 
 applicationBundle = ApplicationBundleInfo(target)
 
@@ -671,7 +671,7 @@ for p in config.add_resources:
     if verbose >= 3:
         print p, "->", t
     if os.path.isdir(p):
-        shutil.copytree(p, t)
+        shutil.copytree(p, t, symlinks=True)
     else:
         shutil.copy2(p, t)
 

From 217a5c92380173ac43d303b1ba9548544121eefd Mon Sep 17 00:00:00 2001
From: Mark Friedenbach <mark@monetize.io>
Date: Mon, 5 Aug 2013 18:27:09 -0700
Subject: [PATCH 0801/1819] When transaction outputs exceed inputs, show the
 offending amounts so as to aid debugging.

---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 9a4271eda2fd..c1fabdd55e55 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,6 +17,7 @@
 #include "txmempool.h"
 #include "ui_interface.h"
 #include "util.h"
+#include "utilmoneystr.h"
 
 #include <sstream>
 
@@ -1361,7 +1362,8 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
         }
 
         if (nValueIn < tx.GetValueOut())
-            return state.DoS(100, error("CheckInputs() : %s value in < value out", tx.GetHash().ToString()),
+            return state.DoS(100, error("CheckInputs() : %s value in (%s) < value out (%s)",
+                                        tx.GetHash().ToString(), FormatMoney(nValueIn), FormatMoney(tx.GetValueOut())),
                              REJECT_INVALID, "bad-txns-in-belowout");
 
         // Tally transaction fees

From f74fc9b22d7f39e36d0cbf80f5c06958c516c8ec Mon Sep 17 00:00:00 2001
From: Mark Friedenbach <mark@monetize.io>
Date: Fri, 21 Mar 2014 12:27:44 -0700
Subject: [PATCH 0802/1819] Print input index when signature validation fails,
 to aid debugging.

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index c1fabdd55e55..7bb61f251cf3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1317,7 +1317,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 bool CScriptCheck::operator()() const {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
     if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags))
-        return error("CScriptCheck() : %s VerifySignature failed", ptxTo->GetHash().ToString());
+        return error("CScriptCheck() : %s:%d VerifySignature failed", ptxTo->GetHash().ToString(), nIn);
     return true;
 }
 

From 5ad450a65ad2b0e7760d77816800bd51826ed175 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 1 Oct 2014 16:47:33 -0400
Subject: [PATCH 0803/1819] travis: If the comparison-tool fails, dump the tail
 of the debug log

The entire debug log would be huge, and could cause issues for automated tools
like travis. Printing 200 lines is an initial guess at a reasonable number,
more may be required.
---
 qa/pull-tester/run-bitcoind-for-test.sh.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index 67318e5a4c11..210fc3c42f7b 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -29,4 +29,8 @@ fi
 kill $BITCOIND && wait $BITCOIND
 
 # timeout returns 124 on timeout, otherwise the return value of the child
+
+# If $RETURN is not 0, the test failed. Dump the tail of the debug log.
+if [ $RETURN -ne 0 ]; then tail -n 200 $DATADIR/regtest/debug.log; fi
+
 exit $RETURN

From 9fedafba4b903d7f3af044eb86dc313856e40b08 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 29 Sep 2014 15:26:31 -0400
Subject: [PATCH 0804/1819] build: Fix OSX build when using Homebrew and qt5

Qt5 is bottled, so configure won't find it without some help. Use
brew to find out its prefix.

Also, qt5 added the host_bins variable to pkg-config, use it.
---
 build-aux/m4/bitcoin_qt.m4 |  7 +++++++
 configure.ac               | 25 +++++++++++++++++++------
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index edfde4cd7978..71b1484894ca 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -152,6 +152,13 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   fi
   CPPFLAGS=$TEMP_CPPFLAGS
   ])
+
+  if test x$use_pkgconfig$qt_bin_path = xyes; then
+    if test x$bitcoin_qt_got_major_vers = x5; then
+      qt_bin_path="`$PKG_CONFIG --variable=host_bins Qt5Core 2>/dev/null`"
+    fi
+  fi
+
   BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
   BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
   BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
diff --git a/configure.ac b/configure.ac
index 7025249abab0..abf9f39e65f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,12 +240,25 @@ case $host in
 
        AC_CHECK_PROG([BREW],brew, brew)
        if test x$BREW = xbrew; then
-         dnl add default homebrew paths
-         openssl_prefix=`$BREW --prefix openssl`
-         bdb_prefix=`$BREW --prefix berkeley-db4`
-         export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-         CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
-         LIBS="$LIBS -L$bdb_prefix/lib"
+         dnl These Homebrew packages may be bottled, meaning that they won't be found
+         dnl in expected paths because they may conflict with system files. Ask
+         dnl Homebrew where each one is located, then adjust paths accordingly.
+         dnl It's safe to add these paths even if the functionality is disabled by
+         dnl the user (--without-wallet or --without-gui for example).
+
+         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
+         bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
+         qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
+         if test x$openssl_prefix != x; then
+           export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+         fi
+         if test x$bdb_prefix != x; then
+           CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
+           LIBS="$LIBS -L$bdb_prefix/lib"
+         fi
+         if test x$qt5_prefix != x; then
+           export PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+         fi
        fi
      else
        case $build_os in

From dd367ff8c93c2f9e112a324f5cd737c7fa7a2ffa Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 1 Oct 2014 19:22:20 -0400
Subject: [PATCH 0805/1819] build: macdeploy: filter out irrelevant qt5
 frameworks and dylibs

---
 contrib/macdeploy/macdeployqtplus | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 8f826ace09b5..541136001fce 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -393,7 +393,7 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
             # Deploy the script plugins only if QtScript is in use
             if not deploymentInfo.usesFramework("QtScript"):
                 continue
-        elif pluginDirectory == "qmltooling":
+        elif pluginDirectory == "qmltooling" or pluginDirectory == "qml1tooling":
             # Deploy the qml plugins only if QtDeclarative is in use
             if not deploymentInfo.usesFramework("QtDeclarative"):
                 continue
@@ -401,7 +401,23 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
             # Deploy the bearer plugins only if QtNetwork is in use
             if not deploymentInfo.usesFramework("QtNetwork"):
                 continue
-        
+        elif pluginDirectory == "position":
+            # Deploy the position plugins only if QtPositioning is in use
+            if not deploymentInfo.usesFramework("QtPositioning"):
+                continue
+        elif pluginDirectory == "sensors" or pluginDirectory == "sensorgestures":
+            # Deploy the sensor plugins only if QtSensors is in use
+            if not deploymentInfo.usesFramework("QtSensors"):
+                continue
+        elif pluginDirectory == "audio" or pluginDirectory == "playlistformats":
+            # Deploy the audio plugins only if QtMultimedia is in use
+            if not deploymentInfo.usesFramework("QtMultimedia"):
+                continue
+        elif pluginDirectory == "mediaservice":
+            # Deploy the mediaservice plugins only if QtMultimediaWidgets is in use
+            if not deploymentInfo.usesFramework("QtMultimediaWidgets"):
+                continue
+
         for pluginName in filenames:
             pluginPath = os.path.join(pluginDirectory, pluginName)
             if pluginName.endswith("_debug.dylib"):
@@ -419,7 +435,11 @@ def deployPlugins(appBundleInfo, deploymentInfo, strip, verbose):
                 # Deploy the opengl graphicssystem plugin only if QtOpenGL is in use
                 if not deploymentInfo.usesFramework("QtOpenGL"):
                     continue
-            
+            elif pluginPath == "accessible/libqtaccessiblequick.dylib":
+                # Deploy the accessible qtquick plugin only if QtQuick is in use
+                if not deploymentInfo.usesFramework("QtQuick"):
+                    continue
+
             plugins.append((pluginDirectory, pluginName))
     
     for pluginDirectory, pluginName in plugins:

From 0f78a0a2eb2e19e0d41b8f913f15358886cd6238 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 2 Oct 2014 03:19:32 +0200
Subject: [PATCH 0806/1819] Upgrade comparison tool further

---
 depends/packages/native_comparisontool.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
index d9f77221902d..4c40f8b12302 100644
--- a/depends/packages/native_comparisontool.mk
+++ b/depends/packages/native_comparisontool.mk
@@ -1,8 +1,8 @@
 package=native_comparisontool
-$(package)_version=adfd3de7
-$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/10222bfdace65a0c5f3bd4a766eeb6b3a8b869fb/
+$(package)_version=5caed78
+$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/2d76ce92d68e6746988adde731318605a70e252c
 $(package)_file_name=pull-tests-$($(package)_version).jar
-$(package)_sha256_hash=fd2282b112e35f339dbe3729b08a04834ad719f8c9c10eeec1178465e6d36a18
+$(package)_sha256_hash=b55a98828b17060e327c5dabe5e4631898f422c0cba07c46170930a9eaf5e7c0
 $(package)_install_dirname=BitcoindComparisonTool_jar
 $(package)_install_filename=BitcoindComparisonTool.jar
 

From 8d132431b4f6a7676482815231cd923d9047d541 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 2 Oct 2014 10:27:36 +0200
Subject: [PATCH 0807/1819] Revert merge of pull #4845

It breaks the new mingw tests!

See

- https://travis-ci.org/bitcoin/bitcoin/jobs/36845581
- https://travis-ci.org/bitcoin/bitcoin/jobs/36845582

This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
---
 src/Makefile.test.include  |   1 -
 src/chainparams.cpp        |  41 ------
 src/chainparams.h          |  24 ----
 src/chainparamsbase.cpp    |  17 ---
 src/chainparamsbase.h      |   1 -
 src/checkpoints.cpp        |   2 -
 src/main.cpp               |   3 +-
 src/pow.cpp                |   4 -
 src/test/base58_tests.cpp  |   4 +-
 src/test/blockv2_tests.cpp | 275 -------------------------------------
 src/test/miner_tests.cpp   |   1 -
 src/test/test_bitcoin.cpp  |   2 +-
 12 files changed, 4 insertions(+), 371 deletions(-)
 delete mode 100644 src/test/blockv2_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index d376961996d0..ab449f3e711c 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -51,7 +51,6 @@ BITCOIN_TESTS =\
   test/key_tests.cpp \
   test/main_tests.cpp \
   test/miner_tests.cpp \
-  test/blockv2_tests.cpp \
   test/mruset_tests.cpp \
   test/multisig_tests.cpp \
   test/netbase_tests.cpp \
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 31c67715c87f..179db5a818f3 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -115,7 +115,6 @@ class CMainParams : public CChainParams {
         fAllowMinDifficultyBlocks = false;
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
-        fSkipProofOfWorkCheck = false;
     }
 };
 static CMainParams mainParams;
@@ -215,46 +214,8 @@ class CRegTestParams : public CTestNetParams {
 };
 static CRegTestParams regTestParams;
 
-//
-// Unit test
-//
-class CUnitTestParams : public CMainParams, public CModifiableParams {
-public:
-    CUnitTestParams() {
-        networkID = CBaseChainParams::UNITTEST;
-        strNetworkID = "unittest";
-        nDefaultPort = 18445;
-        vFixedSeeds.clear();
-        vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
-
-        fRequireRPCPassword = false;
-        fMiningRequiresPeers = false;
-        fDefaultCheckMemPool = true;
-        fAllowMinDifficultyBlocks = false;
-        fMineBlocksOnDemand = true;
-    }
-public:
-    // Published setters to allow changing values in unit test cases
-    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
-    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
-    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
-    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)  { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
-    virtual void setDefaultCheckMemPool(bool afDefaultCheckMemPool)  { fDefaultCheckMemPool=afDefaultCheckMemPool; }
-    virtual void setAllowMinDifficultyBlocks(bool afAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=afAllowMinDifficultyBlocks; }
-    virtual void setSkipProofOfWorkCheck(bool afSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = afSkipProofOfWorkCheck; }
-};
-static CUnitTestParams unitTestParams;
-
-
 static CChainParams *pCurrentParams = 0;
 
-CModifiableParams *ModifiableParams()
-{
-   assert(pCurrentParams);
-   assert(pCurrentParams==&unitTestParams);
-   return (CModifiableParams*)&unitTestParams;
-}
-
 const CChainParams &Params() {
     assert(pCurrentParams);
     return *pCurrentParams;
@@ -268,8 +229,6 @@ CChainParams &Params(CBaseChainParams::Network network) {
             return testNetParams;
         case CBaseChainParams::REGTEST:
             return regTestParams;
-        case CBaseChainParams::UNITTEST:
-            return unitTestParams;
         default:
             assert(false && "Unimplemented network");
             return mainParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index 50441a89f3de..e5dfc87c6dad 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -61,8 +61,6 @@ class CChainParams
     bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
     /* Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
-    /* Skip proof-of-work check: allow mining of any difficulty block */
-    bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
@@ -105,27 +103,8 @@ class CChainParams
     bool fAllowMinDifficultyBlocks;
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
-    bool fSkipProofOfWorkCheck;
 };
 
-/** Modifiable parameters interface is used by test cases to adapt the parameters in order
-*** to test specific features more easily. Test cases should always restore the previous
-*** values after finalization.
-**/
-
-class CModifiableParams {
-public:
-    // Published setters to allow changing values in unit test cases
-    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) =0;
-    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0;
-    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0;
-    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)=0;
-    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)=0;
-    virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks)=0;
-    virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck)=0;
-};
-
-
 /**
  * Return the currently selected parameters. This won't change after app startup
  * outside of the unit tests.
@@ -135,9 +114,6 @@ const CChainParams &Params();
 /** Return parameters for the given network. */
 CChainParams &Params(CBaseChainParams::Network network);
 
-/** Get modifyable network parameters (UNITTEST only) */
-CModifiableParams *ModifiableParams();
-
 /** Sets the params returned by Params() to those for the given network. */
 void SelectParams(CBaseChainParams::Network network);
 
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index e9d63197bd39..98bb5b855fe3 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -57,20 +57,6 @@ class CBaseRegTestParams : public CBaseTestNetParams
 };
 static CBaseRegTestParams regTestParams;
 
-//
-// Unit test
-//
-class CBaseUnitTestParams : public CBaseMainParams
-{
-public:
-    CBaseUnitTestParams()
-    {
-        networkID = CBaseChainParams::UNITTEST;
-        strDataDir = "unittest";
-    }
-};
-static CBaseUnitTestParams unitTestParams;
-
 static CBaseChainParams* pCurrentBaseParams = 0;
 
 const CBaseChainParams& BaseParams()
@@ -91,9 +77,6 @@ void SelectBaseParams(CBaseChainParams::Network network)
     case CBaseChainParams::REGTEST:
         pCurrentBaseParams = &regTestParams;
         break;
-    case CBaseChainParams::UNITTEST:
-        pCurrentBaseParams = &unitTestParams;
-        break;
     default:
         assert(false && "Unimplemented network");
         return;
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index cc154cf5012f..c054f03f1739 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -19,7 +19,6 @@ class CBaseChainParams
         MAIN,
         TESTNET,
         REGTEST,
-        UNITTEST,
 
         MAX_NETWORK_TYPES
     };
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 9a6bc05e63d9..c41deea7ce64 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -88,8 +88,6 @@ namespace Checkpoints {
             return dataTestnet;
         else if (Params().NetworkID() == CBaseChainParams::MAIN)
             return data;
-        else if (Params().NetworkID() == CBaseChainParams::UNITTEST) // UnitTest share the same checkpoints as MAIN
-            return data;
         else
             return dataRegtest;
     }
diff --git a/src/main.cpp b/src/main.cpp
index 55485c86ff55..a3e36ff87204 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2305,8 +2305,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
         nHeight = pindexPrev->nHeight+1;
 
         // Check proof of work
-        if ((!Params().SkipProofOfWorkCheck()) &&
-           (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
+        if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
             return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
                              REJECT_INVALID, "bad-diffbits");
 
diff --git a/src/pow.cpp b/src/pow.cpp
index d50222849cc0..893f6c18be65 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -81,10 +81,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     bool fNegative;
     bool fOverflow;
     uint256 bnTarget;
-
-    if (Params().SkipProofOfWorkCheck())
-       return true;
-
     bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
 
     // Check range
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index c298c805dae3..58fffb6df40c 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
             BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest);
         }
     }
-    SelectParams(CBaseChainParams::UNITTEST);
+    SelectParams(CBaseChainParams::MAIN);
 }
 
 // Goal: check that generated keys match test vectors
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
     CTxDestination nodest = CNoDestination();
     BOOST_CHECK(!dummyAddr.Set(nodest));
 
-    SelectParams(CBaseChainParams::UNITTEST);
+    SelectParams(CBaseChainParams::MAIN);
 }
 
 // Goal: check that base58 parsing code is robust against a variety of corrupted data
diff --git a/src/test/blockv2_tests.cpp b/src/test/blockv2_tests.cpp
deleted file mode 100644
index 96c0df5e6b6f..000000000000
--- a/src/test/blockv2_tests.cpp
+++ /dev/null
@@ -1,275 +0,0 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "main.h"
-#include "miner.h"
-#include "uint256.h"
-#include "util.h"
-
-#include <boost/test/unit_test.hpp>
-
-// This test cheecks the majority rule which states that after 1000 v2 blocks no new v1 block can be part of that branch.
-
-BOOST_AUTO_TEST_SUITE(blockv2_tests)
-
-static CScript scriptPubKey = CScript() << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f") << OP_CHECKSIG;
-
-static void SetEmptyBlock(CBlock * pblock)
-{
-    pblock->nVersion = 2;
-    pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
-    pblock->nNonce = 0;
-}
-
-static void SetBlockDefaultAttributesAndHeight(CBlock * pblock,bool addHeight,int heightDifference)
-{
-    SetEmptyBlock(pblock);
-
-    // Add the coinbase
-    CMutableTransaction txCoinbase(pblock->vtx[0]);
-
-    if (addHeight)
-        txCoinbase.vin[0].scriptSig = (CScript() << (chainActive.Height()+1+heightDifference) << 0);
-        else
-        txCoinbase.vin[0].scriptSig = (CScript() << heightDifference << 0); // At least size 2, this is a protocol spec
-
-    txCoinbase.vout[0].scriptPubKey = CScript();
-    pblock->vtx[0] = CTransaction(txCoinbase);
-    pblock->hashMerkleRoot = pblock->BuildMerkleTree();
-}
-
-void CheckSubsidyHalving(CBlockTemplate * &pblocktemplate, CBlock * &pblock)
-{
-    if ((chainActive.Height()+1) % Params().SubsidyHalvingInterval() == 0)
-        {
-            // The RegTest network has a low subsidy halving interval (150) so
-            // we must recompute the coinbase subsidy if we reach the boundary.
-            // The unittest network allows modifying this interval. We check it so this
-            // test can work in any network.
-
-            // preserve parent hash
-            uint256 prevParent = pblock->hashPrevBlock;
-            delete pblocktemplate;
-            pblocktemplate = CreateNewBlock(scriptPubKey);
-            pblock = &pblocktemplate->block; // pointer for convenience
-            pblock->hashPrevBlock = prevParent;
-        }
-}
-
-void CheckBlockAddedToBestChainSuccessfully(CBlock *pblock)
-{
-    int PreviousHeight;
-    CValidationState state;
-
-    PreviousHeight = chainActive.Height();
-    BOOST_CHECK(ProcessBlock(state, NULL, pblock));
-    BOOST_CHECK(state.IsValid());
-    BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
-
-    // Previous checks do not assure the current best chain has pblock as tip. It could be the case that a because
-    // of a malfunction in the chain reorganization code, a reorganization causes an increase of the chain length, but with another tip.
-    // So we also check that.
-    BOOST_CHECK(chainActive.Tip()->GetBlockHash()==pblock->GetHash());
-}
-
-void Blockv2test()
-{
-    assert(Params().NetworkID() == CBaseChainParams::UNITTEST);
-    ModifiableParams()->setSkipProofOfWorkCheck(true);
-
-    // We don't know the state of the block-chain here: it depends on which other tests are run before this test.
-    // See https://github.com/bitcoin/bitcoin/pull/4688 for a patch that allows the re-creation of the block-chain
-    // for each testcase that requires it.
-
-    // If miner_tests.cpp is run before, the chain will be 100 blocks long, and all of them will be v1
-
-
-    LogPrintf("Blockv2test testcase starts\n");
-
-    CBlockTemplate *pblocktemplate;
-    CScript script;
-    uint256 hash;
-    int PreviousHeight;
-
-    LOCK(cs_main);
-
-    // Simple block creation, nothing special yet.
-    pblocktemplate = CreateNewBlock(scriptPubKey);
-    CBlock *pblock = &pblocktemplate->block; // pointer for convenience
-
-    LogPrintf("Blockv2test block v1 add begin\n");
-
-    ////////////////////////////////////////////////////////////////////////////////////////
-    // First create a block v1, check that it is accepted. The block has an invalid height.
-    ////////////////////////////////////////////////////////////////////////////////////////
-    SetBlockDefaultAttributesAndHeight(pblock,false,5000);
-    pblock->nVersion = 1;
-    CValidationState state1;
-    PreviousHeight = chainActive.Height();
-    BOOST_CHECK(ProcessBlock(state1, NULL, pblock));
-    BOOST_CHECK(state1.IsValid());
-    BOOST_CHECK((PreviousHeight+1) == chainActive.Height()); // to differentiate from orphan blocks, which also get accepted in ProcessBlock()
-    pblock->hashPrevBlock = pblock->GetHash(); // update parent
-
-
-
-    // First check that the supermajority threshold is exactly 1000 blocks
-    BOOST_CHECK(Params().ToCheckBlockUpgradeMajority()==1000);  //
-    BOOST_CHECK(Params().EnforceBlockUpgradeMajority()==750);
-    BOOST_CHECK(Params().RejectBlockOutdatedMajority()==950);
-
-    // Over the last 1000 blocks, 750 blocks must be v2 to switch to v2-only mode.
-    // Here we're testing only the last 750, not any subset.
-
-    LogPrintf("Blockv2test BIP30 repetition begin\n");
-
-    ///////////////////////////////////////////////////////////////////////////////////////////////////////
-    // First, if we try to add a block v2 with the same coinbase tx, we should get
-    // "bad-txns-BIP30" because the coinbase tx has the same hash as the previous.
-    // Even if ConnectBlock returns a "bad-txns-BIP30", ActivateBestChainStep clears
-    // the state, so we get true here and the "bad-txns-BIP30" reason is lost. But this
-    // is the intended behaviour: Receiving a single block can cause zero or multiple blocks to be
-    // connected, and ActivateBestChain's responsibility is just switching the best block whatsoever.
-    // Feedback about failures causes a reject message to be sent to the peer from which we received
-    // the actual block (not necessarily the same as from whom we got the block that caused the reorg),
-    // for which we remember the peerid.
-    // Because we cannot access the failure reason here, we just verify instead that the chain
-    // height has not been incremented.
-    //////////////////////////////////////////////////////////////////////////////////////////////////////
-
-    CValidationState state7;
-    PreviousHeight = chainActive.Height();
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetBlockDefaultAttributesAndHeight(pblock,false,5000); //
-    pblock->nVersion = 2;
-    BOOST_CHECK(ProcessBlock(state7, NULL, pblock)); // should we care about the return value?
-    BOOST_CHECK(state7.IsValid());
-    BOOST_CHECK(PreviousHeight == chainActive.Height()); // we check the block has not been added.
-
-    LogPrintf("Blockv2test 750 v2 blocks  begin\n");
-
-    ////////////////////////////
-    // Now create 750 v2 blocks
-    ////////////////////////////
-
-    for (int i=0;i<750;i++)
-    {
-
-        LogPrintf("Blockv2test block %d begin\n",i);
-
-        CheckSubsidyHalving(pblocktemplate,pblock);
-
-        // We add a value to the height to make is NOT equal to the actual height.
-        SetBlockDefaultAttributesAndHeight(pblock,true,1000); // blocks version 2 without height are allowed! for only 750 blocks
-        pblock->nVersion = 2;
-
-        CheckBlockAddedToBestChainSuccessfully(pblock);
-        pblock->hashPrevBlock = pblock->GetHash(); // update parent
-    }
-
-    LogPrintf("Blockv2test v2 without height rejected begin\n");
-
-    /////////////////////////////////////////////////////////////////////////////////////
-    // Now we try to add a block v2, with an invalid height and it should be rejected.
-    // We use 2000 as argument heightDifference because is not in the range [1000..1750].
-    /////////////////////////////////////////////////////////////////////////////////////
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetBlockDefaultAttributesAndHeight(pblock,true,2000); //
-    pblock->nVersion = 2;
-    CValidationState state0;
-    BOOST_CHECK(ProcessBlock(state0, NULL, pblock)==false);
-    BOOST_CHECK(!state0.IsValid());
-    BOOST_CHECK(state0.GetRejectReason()=="bad-cb-height");
-    // Do not update parent since block has failed
-
-    LogPrintf("Blockv2test v2 with height accepted begin\n");
-
-    /////////////////////////////////////////////////////////////
-    // Now we add 200 additional blocks, until we get 950
-    // (the threshold where v1 blocks are not accepted anymore)
-    /////////////////////////////////////////////////////////////
-    for (int i=0;i<200;i++)
-    {
-
-        LogPrintf("Blockv2test v2block %d begin\n",i);
-        CheckSubsidyHalving(pblocktemplate,pblock);
-        SetBlockDefaultAttributesAndHeight(pblock,true,0);
-        pblock->nVersion = 2;
-        CheckBlockAddedToBestChainSuccessfully(pblock);
-        pblock->hashPrevBlock = pblock->GetHash(); // update parent
-    }
-
-
-    LogPrintf("Blockv2test block v1 rejected\n");
-
-    /////////////////////////////////////////////////////////////////////////////////////////
-    // Now we try to add a block v1, it should be rejected, even if it hash the height field
-    /////////////////////////////////////////////////////////////////////////////////////////
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetBlockDefaultAttributesAndHeight(pblock,true,0);
-    pblock->nVersion = 1;
-    CValidationState state2;
-    BOOST_CHECK(ProcessBlock(state2, NULL, pblock)==false);
-    BOOST_CHECK(!state2.IsValid());
-    BOOST_CHECK(state2.GetRejectReason()=="bad-version");
-    // Do not update parent since block has failed
-
-    ////////////////////////////////////////////////////////
-    // Block time too old check
-    ////////////////////////////////////////////////////////
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetBlockDefaultAttributesAndHeight(pblock,true,0);
-    pblock->nVersion = 2;
-    pblock->nTime = chainActive.Tip()->GetMedianTimePast()-1;
-    CValidationState state4;
-    BOOST_CHECK(ProcessBlock(state4, NULL, pblock)==false);
-    BOOST_CHECK(!state4.IsValid());
-    BOOST_CHECK(state4.GetRejectReason()=="time-too-old");
-    // Do not update parent since block has failed
-
-    ////////////////////////////////////////////////////////
-    // Adding a non-final coinbase, must modify coinbase
-    ////////////////////////////////////////////////////////
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetEmptyBlock(pblock);
-    // Use a mutable coinbase to change nLockTime and  nSequence
-    CMutableTransaction txCoinbase(pblock->vtx[0]);
-    txCoinbase.vin[0].scriptSig = (CScript() << chainActive.Height() << 0);
-    txCoinbase.nLockTime = LOCKTIME_THRESHOLD-1; // refers to height
-    txCoinbase.vin[0].nSequence = 1; // non-zero sequence
-    pblock->vtx[0] = CTransaction(txCoinbase);
-    pblock->nVersion = 2;
-    pblock->hashMerkleRoot = pblock->BuildMerkleTree();
-    CValidationState state5;
-    BOOST_CHECK(ProcessBlock(state5, NULL, pblock)==false);
-    BOOST_CHECK(!state5.IsValid());
-    BOOST_CHECK(state5.GetRejectReason()=="bad-txns-nonfinal");
-    // Do not update parent since block has failed
-
-    ModifiableParams()->setSkipProofOfWorkCheck(false);
-
-    ////////////////////////////////////////////////////////////////////////////////
-    // Just to be sure that proof-of-work skipping is working ok, we submit a block
-    // without enought proof of work and it must be rejected.
-    ////////////////////////////////////////////////////////////////////////////////
-    CheckSubsidyHalving(pblocktemplate,pblock);
-    SetBlockDefaultAttributesAndHeight(pblock,true,0);
-    pblock->nVersion = 2;
-    CValidationState state6;
-    BOOST_CHECK(ProcessBlock(state6, NULL, pblock)==false);
-    BOOST_CHECK(!state6.IsValid());
-    BOOST_CHECK(state6.GetRejectReason()=="high-hash");
-
-    delete pblocktemplate;
-
-
-    LogPrintf("Blockv2test testcase ends\n");
-}
-
-BOOST_AUTO_TEST_CASE(Blockv2testcase)
-{
-    Blockv2test();
-}
-
-BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index bad5c13ac2b6..9e4669eba900 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -253,7 +253,6 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
 
     chainActive.Tip()->nHeight--;
     SetMockTime(0);
-    mempool.clear();
 
     BOOST_FOREACH(CTransaction *tx, txFirst)
         delete tx;
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 6e5f0e3facc9..68fad8d038e8 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -31,7 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
-        SelectParams(CBaseChainParams::UNITTEST);
+        SelectParams(CBaseChainParams::MAIN);
         noui_connect();
 #ifdef ENABLE_WALLET
         bitdb.MakeMock();

From c9fb27da0a72135417956dca8dafa959ebb67c10 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 25 Sep 2014 08:53:43 +0200
Subject: [PATCH 0808/1819] CBufferedFile: convert into a non-refcounted RAII
 wrapper

- it now takes over the passed file descriptor and closes it in the
  destructor
- this fixes a leak in LoadExternalBlockFile(), where an exception could
  cause the file to not getting closed

- disallow copies (like recently added for CAutoFile)
- make nType and nVersion private
---
 src/main.cpp    |  2 +-
 src/serialize.h | 30 +++++++++++++++++++++---------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index a3e36ff87204..033373888798 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3084,6 +3084,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
 
     int nLoaded = 0;
     try {
+        // This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
         CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
         uint64_t nStartByte = 0;
         if (dbp) {
@@ -3140,7 +3141,6 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                 LogPrintf("%s : Deserialize or I/O error - %s", __func__, e.what());
             }
         }
-        fclose(fileIn);
     } catch(std::runtime_error &e) {
         AbortNode(_("Error: system error: ") + e.what());
     }
diff --git a/src/serialize.h b/src/serialize.h
index 68501facf20a..f56dce1481e7 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1256,13 +1256,19 @@ class CAutoFile
     }
 };
 
-/** Wrapper around a FILE* that implements a ring buffer to
- *  deserialize from. It guarantees the ability to rewind
- *  a given number of bytes. */
+/** Non-refcounted RAII wrapper around a FILE* that implements a ring buffer to
+ *  deserialize from. It guarantees the ability to rewind a given number of bytes. */
 class CBufferedFile
 {
 private:
-    FILE *src;          // source file
+    // Disallow copies
+    CBufferedFile(const CBufferedFile&);
+    CBufferedFile& operator=(const CBufferedFile&);
+
+    int nType;
+    int nVersion;
+
+    FILE *src;            // source file
     uint64_t nSrcPos;     // how many bytes have been read from source
     uint64_t nReadPos;    // how many bytes have been read from this
     uint64_t nReadLimit;  // up to which position we're allowed to read
@@ -1289,12 +1295,18 @@ class CBufferedFile
     }
 
 public:
-    int nType;
-    int nVersion;
-
     CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
-        src(fileIn), nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0),
-        nType(nTypeIn), nVersion(nVersionIn) {
+        nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
+    {
+        src = fileIn;
+        nType = nTypeIn;
+        nVersion = nVersionIn;
+    }
+
+    ~CBufferedFile()
+    {
+        if (src)
+            fclose(src);
     }
 
     // check whether we're at the end of the source file

From 0c35486dc97909cea67b24e8758bd0f40ac33a9a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 29 Sep 2014 16:10:29 +0200
Subject: [PATCH 0809/1819] CBufferedFile: add explicit close function

- also use identical close function for CAutoFile (avoids setting file to
  NULL under wrong conditions)
---
 src/serialize.h | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index f56dce1481e7..63c72cb8e86f 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1154,7 +1154,7 @@ class CDataStream
 
 
 
-/** Non-refcounted RAII wrapper for FILE*.
+/** Non-refcounted RAII wrapper for FILE*
  *
  * Will automatically close the file when it goes out of scope if not null.
  * If you're returning the file pointer, return file.release().
@@ -1186,9 +1186,10 @@ class CAutoFile
 
     void fclose()
     {
-        if (file != NULL && file != stdin && file != stdout && file != stderr)
+        if (file) {
             ::fclose(file);
-        file = NULL;
+            file = NULL;
+        }
     }
 
     FILE* release()             { FILE* ret = file; file = NULL; return ret; }
@@ -1257,7 +1258,11 @@ class CAutoFile
 };
 
 /** Non-refcounted RAII wrapper around a FILE* that implements a ring buffer to
- *  deserialize from. It guarantees the ability to rewind a given number of bytes. */
+ *  deserialize from. It guarantees the ability to rewind a given number of bytes.
+ *
+ *  Will automatically close the file when it goes out of scope if not null.
+ *  If you need to close the file early, use file.fclose() instead of fclose(file).
+ */
 class CBufferedFile
 {
 private:
@@ -1305,8 +1310,15 @@ class CBufferedFile
 
     ~CBufferedFile()
     {
-        if (src)
-            fclose(src);
+        fclose();
+    }
+
+    void fclose()
+    {
+        if (src) {
+            ::fclose(src);
+            src = NULL;
+        }
     }
 
     // check whether we're at the end of the source file

From 938bccebf1cb3ed6c7b8bfb8236a5172433bf890 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 2 Oct 2014 10:59:28 +0200
Subject: [PATCH 0810/1819] CAutoFile: make file private

---
 src/serialize.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index 63c72cb8e86f..ff11edc06c76 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1166,12 +1166,13 @@ class CAutoFile
     // Disallow copies
     CAutoFile(const CAutoFile&);
     CAutoFile& operator=(const CAutoFile&);
-protected:
-    FILE* file;
-public:
+
     int nType;
     int nVersion;
+	
+    FILE* file;	
 
+public:
     CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn)
     {
         file = filenew;

From e2efdf3937e71c0ae91b7a1e5d381d04bc814bb6 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 2 Oct 2014 11:25:21 +0200
Subject: [PATCH 0811/1819] amount.h: update license, add header end comment +
 rem from util.h

---
 src/amount.h | 4 ++--
 src/util.h   | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/amount.h b/src/amount.h
index 42006a0388eb..831fa1f6cad6 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_AMOUNT_H
@@ -10,4 +10,4 @@
 
 typedef int64_t CAmount;
 
-#endif
+#endif //  BITCOIN_AMOUNT_H
diff --git a/src/util.h b/src/util.h
index fb1d3eacb575..4b2415278ba3 100644
--- a/src/util.h
+++ b/src/util.h
@@ -14,7 +14,6 @@
 #include "config/bitcoin-config.h"
 #endif
 
-#include "amount.h"
 #include "compat.h"
 #include "tinyformat.h"
 #include "utiltime.h"

From 4bd11852802f3ed11e17e8d66660ce2e60f02287 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 2 Oct 2014 11:26:36 +0200
Subject: [PATCH 0812/1819] Qt: allow "emergency" shutdown during startup

- allows closing our splash screen to abort startup
---
 src/qt/splashscreen.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 4fe610794f79..74512e62aab2 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -177,5 +177,6 @@ void SplashScreen::paintEvent(QPaintEvent *event)
 
 void SplashScreen::closeEvent(QCloseEvent *event)
 {
+    StartShutdown(); // allows an "emergency" shutdown during startup
     event->ignore();
 }

From f0fd00cb77d91ec9ac729bc4cf35ff7d9f676d8f Mon Sep 17 00:00:00 2001
From: SergioDemianLerner <Sergio.d.Lerner@gmail.com>
Date: Thu, 4 Sep 2014 16:23:42 -0300
Subject: [PATCH 0813/1819] Switch testing framework from MAIN to new UNITTEST
 network

UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
---
 src/chainparams.cpp       | 44 +++++++++++++++++++++++++++++++++++++++
 src/chainparams.h         | 23 ++++++++++++++++++++
 src/chainparamsbase.cpp   | 17 +++++++++++++++
 src/chainparamsbase.h     |  1 +
 src/checkpoints.cpp       |  2 ++
 src/main.cpp              |  3 ++-
 src/pow.cpp               |  4 ++++
 src/test/base58_tests.cpp |  4 ++--
 src/test/miner_tests.cpp  |  1 +
 src/test/test_bitcoin.cpp |  2 +-
 10 files changed, 97 insertions(+), 4 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 179db5a818f3..8a00da0bb51f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -214,8 +214,50 @@ class CRegTestParams : public CTestNetParams {
 };
 static CRegTestParams regTestParams;
 
+//
+// Unit test
+//
+class CUnitTestParams : public CMainParams, public CModifiableParams {
+public:
+    CUnitTestParams() {
+        networkID = CBaseChainParams::UNITTEST;
+        strNetworkID = "unittest";
+        nDefaultPort = 18445;
+        vFixedSeeds.clear();
+        vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
+
+        fRequireRPCPassword = false;
+        fMiningRequiresPeers = false;
+        fDefaultCheckMemPool = true;
+        fAllowMinDifficultyBlocks = false;
+        fMineBlocksOnDemand = true;
+        fSkipProofOfWorkCheck = false;
+    }
+    virtual bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
+protected:
+    bool fSkipProofOfWorkCheck;
+public:
+    // Published setters to allow changing values in unit test cases
+    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
+    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
+    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
+    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)  { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
+    virtual void setDefaultCheckMemPool(bool afDefaultCheckMemPool)  { fDefaultCheckMemPool=afDefaultCheckMemPool; }
+    virtual void setAllowMinDifficultyBlocks(bool afAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=afAllowMinDifficultyBlocks; }
+    virtual void setSkipProofOfWorkCheck(bool afSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = afSkipProofOfWorkCheck; }
+};
+static CUnitTestParams unitTestParams;
+
+
 static CChainParams *pCurrentParams = 0;
 
+CModifiableParams *ModifiableParams()
+{
+   assert(pCurrentParams);
+   assert(pCurrentParams==&unitTestParams);
+   return (CModifiableParams*)&unitTestParams;
+}
+
 const CChainParams &Params() {
     assert(pCurrentParams);
     return *pCurrentParams;
@@ -229,6 +271,8 @@ CChainParams &Params(CBaseChainParams::Network network) {
             return testNetParams;
         case CBaseChainParams::REGTEST:
             return regTestParams;
+        case CBaseChainParams::UNITTEST:
+            return unitTestParams;
         default:
             assert(false && "Unimplemented network");
             return mainParams;
diff --git a/src/chainparams.h b/src/chainparams.h
index e5dfc87c6dad..171a590a5f37 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -61,6 +61,8 @@ class CChainParams
     bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
     /* Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
+    /* Skip proof-of-work check: allow mining of any difficulty block */
+    virtual bool SkipProofOfWorkCheck() const { return false; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
@@ -105,6 +107,24 @@ class CChainParams
     bool fMineBlocksOnDemand;
 };
 
+/** Modifiable parameters interface is used by test cases to adapt the parameters in order
+*** to test specific features more easily. Test cases should always restore the previous
+*** values after finalization.
+**/
+
+class CModifiableParams {
+public:
+    // Published setters to allow changing values in unit test cases
+    virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) =0;
+    virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0;
+    virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0;
+    virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)=0;
+    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)=0;
+    virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks)=0;
+    virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck)=0;
+};
+
+
 /**
  * Return the currently selected parameters. This won't change after app startup
  * outside of the unit tests.
@@ -114,6 +134,9 @@ const CChainParams &Params();
 /** Return parameters for the given network. */
 CChainParams &Params(CBaseChainParams::Network network);
 
+/** Get modifyable network parameters (UNITTEST only) */
+CModifiableParams *ModifiableParams();
+
 /** Sets the params returned by Params() to those for the given network. */
 void SelectParams(CBaseChainParams::Network network);
 
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 98bb5b855fe3..e9d63197bd39 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -57,6 +57,20 @@ class CBaseRegTestParams : public CBaseTestNetParams
 };
 static CBaseRegTestParams regTestParams;
 
+//
+// Unit test
+//
+class CBaseUnitTestParams : public CBaseMainParams
+{
+public:
+    CBaseUnitTestParams()
+    {
+        networkID = CBaseChainParams::UNITTEST;
+        strDataDir = "unittest";
+    }
+};
+static CBaseUnitTestParams unitTestParams;
+
 static CBaseChainParams* pCurrentBaseParams = 0;
 
 const CBaseChainParams& BaseParams()
@@ -77,6 +91,9 @@ void SelectBaseParams(CBaseChainParams::Network network)
     case CBaseChainParams::REGTEST:
         pCurrentBaseParams = &regTestParams;
         break;
+    case CBaseChainParams::UNITTEST:
+        pCurrentBaseParams = &unitTestParams;
+        break;
     default:
         assert(false && "Unimplemented network");
         return;
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index c054f03f1739..cc154cf5012f 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -19,6 +19,7 @@ class CBaseChainParams
         MAIN,
         TESTNET,
         REGTEST,
+        UNITTEST,
 
         MAX_NETWORK_TYPES
     };
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index c41deea7ce64..9a6bc05e63d9 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -88,6 +88,8 @@ namespace Checkpoints {
             return dataTestnet;
         else if (Params().NetworkID() == CBaseChainParams::MAIN)
             return data;
+        else if (Params().NetworkID() == CBaseChainParams::UNITTEST) // UnitTest share the same checkpoints as MAIN
+            return data;
         else
             return dataRegtest;
     }
diff --git a/src/main.cpp b/src/main.cpp
index a3e36ff87204..55485c86ff55 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2305,7 +2305,8 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
         nHeight = pindexPrev->nHeight+1;
 
         // Check proof of work
-        if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
+        if ((!Params().SkipProofOfWorkCheck()) &&
+           (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
             return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
                              REJECT_INVALID, "bad-diffbits");
 
diff --git a/src/pow.cpp b/src/pow.cpp
index 893f6c18be65..d50222849cc0 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -81,6 +81,10 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     bool fNegative;
     bool fOverflow;
     uint256 bnTarget;
+
+    if (Params().SkipProofOfWorkCheck())
+       return true;
+
     bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
 
     // Check range
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index 58fffb6df40c..c298c805dae3 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
             BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest);
         }
     }
-    SelectParams(CBaseChainParams::MAIN);
+    SelectParams(CBaseChainParams::UNITTEST);
 }
 
 // Goal: check that generated keys match test vectors
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
     CTxDestination nodest = CNoDestination();
     BOOST_CHECK(!dummyAddr.Set(nodest));
 
-    SelectParams(CBaseChainParams::MAIN);
+    SelectParams(CBaseChainParams::UNITTEST);
 }
 
 // Goal: check that base58 parsing code is robust against a variety of corrupted data
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 9e4669eba900..bad5c13ac2b6 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -253,6 +253,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
 
     chainActive.Tip()->nHeight--;
     SetMockTime(0);
+    mempool.clear();
 
     BOOST_FOREACH(CTransaction *tx, txFirst)
         delete tx;
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 68fad8d038e8..6e5f0e3facc9 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -31,7 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
-        SelectParams(CBaseChainParams::MAIN);
+        SelectParams(CBaseChainParams::UNITTEST);
         noui_connect();
 #ifdef ENABLE_WALLET
         bitdb.MakeMock();

From fbd36d8fb5245a5511b2db7a35270fb1250e21d5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 29 Sep 2014 13:13:47 +0200
Subject: [PATCH 0814/1819] Avoid introducing a virtual into CChainParams

Treat fSkipProofOfWorkCheck the same as other parameters.
---
 src/chainparams.cpp | 5 +----
 src/chainparams.h   | 3 ++-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 8a00da0bb51f..31c67715c87f 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -115,6 +115,7 @@ class CMainParams : public CChainParams {
         fAllowMinDifficultyBlocks = false;
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
+        fSkipProofOfWorkCheck = false;
     }
 };
 static CMainParams mainParams;
@@ -231,11 +232,7 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
         fDefaultCheckMemPool = true;
         fAllowMinDifficultyBlocks = false;
         fMineBlocksOnDemand = true;
-        fSkipProofOfWorkCheck = false;
     }
-    virtual bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
-protected:
-    bool fSkipProofOfWorkCheck;
 public:
     // Published setters to allow changing values in unit test cases
     virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
diff --git a/src/chainparams.h b/src/chainparams.h
index 171a590a5f37..50441a89f3de 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -62,7 +62,7 @@ class CChainParams
     /* Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /* Skip proof-of-work check: allow mining of any difficulty block */
-    virtual bool SkipProofOfWorkCheck() const { return false; }
+    bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
     /* Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
@@ -105,6 +105,7 @@ class CChainParams
     bool fAllowMinDifficultyBlocks;
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
+    bool fSkipProofOfWorkCheck;
 };
 
 /** Modifiable parameters interface is used by test cases to adapt the parameters in order

From 31d6390fd17803ab9870e239a0c0c4d0a6be5c68 Mon Sep 17 00:00:00 2001
From: Eric Shaw <ericshaw.linux@gmail.com>
Date: Thu, 25 Sep 2014 18:39:28 -0400
Subject: [PATCH 0815/1819] Fixed setaccount accepting foreign address

Fixed issue #4209 where using setaccount with a foreign
address causes the address to be added to your receiving addresses.
---
 src/rpcwallet.cpp             | 19 ++++++++++++-------
 src/test/rpc_wallet_tests.cpp |  8 ++++++--
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 35637362a43e..b361e67911e4 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -230,15 +230,20 @@ Value setaccount(const Array& params, bool fHelp)
     if (params.size() > 1)
         strAccount = AccountFromValue(params[1]);
 
-    // Detect when changing the account of an address that is the 'unused current key' of another account:
-    if (pwalletMain->mapAddressBook.count(address.Get()))
+    // Only add the account if the address is yours.
+    if (IsMine(*pwalletMain, address.Get()))
     {
-        string strOldAccount = pwalletMain->mapAddressBook[address.Get()].name;
-        if (address == GetAccountAddress(strOldAccount))
-            GetAccountAddress(strOldAccount, true);
+        // Detect when changing the account of an address that is the 'unused current key' of another account:
+        if (pwalletMain->mapAddressBook.count(address.Get()))
+        {
+            string strOldAccount = pwalletMain->mapAddressBook[address.Get()].name;
+            if (address == GetAccountAddress(strOldAccount))
+                GetAccountAddress(strOldAccount, true);
+        }
+        pwalletMain->SetAddressBook(address.Get(), strAccount, "receive");
     }
-
-    pwalletMain->SetAddressBook(address.Get(), strAccount, "receive");
+    else
+        throw JSONRPCError(RPC_MISC_ERROR, "setaccount can only be used with own address");
 
     return Value::null;
 }
diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp
index 1dc2a3d82fb1..8c1d2900bcc7 100644
--- a/src/test/rpc_wallet_tests.cpp
+++ b/src/test/rpc_wallet_tests.cpp
@@ -80,11 +80,15 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
 		walletdb.WriteAccount(strAccount, account);
 	});
 
-
+    CPubKey setaccountDemoPubkey = pwalletMain->GenerateNewKey();
+        CBitcoinAddress setaccountDemoAddress = CBitcoinAddress(CTxDestination(setaccountDemoPubkey.GetID()));
+        
 	/*********************************
 	 * 			setaccount
 	 *********************************/
-	BOOST_CHECK_NO_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ nullaccount"));
+	BOOST_CHECK_NO_THROW(CallRPC("setaccount " + setaccountDemoAddress.ToString() + " nullaccount"));
+	/* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ is not owned by the test wallet. */
+	BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ nullaccount"), runtime_error);
 	BOOST_CHECK_THROW(CallRPC("setaccount"), runtime_error);
 	/* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X (33 chars) is an illegal address (should be 34 chars) */
 	BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X nullaccount"), runtime_error);

From bc470c43eecd40057a54fbfe4f34eb6fbda7134d Mon Sep 17 00:00:00 2001
From: Eric Shaw <ericshawlinux@users.noreply.github.com>
Date: Thu, 2 Oct 2014 12:19:18 -0400
Subject: [PATCH 0816/1819] Changed mixed indentation to four spaces

Put `test/rpc_wallet_tests.cpp` through clang-format.
---
 src/test/rpc_wallet_tests.cpp | 147 +++++++++++++++++-----------------
 1 file changed, 73 insertions(+), 74 deletions(-)

diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp
index 8c1d2900bcc7..91da0c4420d5 100644
--- a/src/test/rpc_wallet_tests.cpp
+++ b/src/test/rpc_wallet_tests.cpp
@@ -14,7 +14,7 @@
 using namespace std;
 using namespace json_spirit;
 
-extern Array createArgs(int nRequired, const char* address1=NULL, const char* address2=NULL);
+extern Array createArgs(int nRequired, const char* address1 = NULL, const char* address2 = NULL);
 extern Value CallRPC(string args);
 
 extern CWallet* pwalletMain;
@@ -53,10 +53,10 @@ BOOST_AUTO_TEST_CASE(rpc_addmultisig)
     BOOST_CHECK_THROW(addmultisig(createArgs(1, ""), false), runtime_error);
     BOOST_CHECK_THROW(addmultisig(createArgs(1, "NotAValidPubkey"), false), runtime_error);
 
-    string short1(address1Hex, address1Hex+sizeof(address1Hex)-2); // last byte missing
+    string short1(address1Hex, address1Hex + sizeof(address1Hex) - 2); // last byte missing
     BOOST_CHECK_THROW(addmultisig(createArgs(2, short1.c_str()), false), runtime_error);
 
-    string short2(address1Hex+1, address1Hex+sizeof(address1Hex)); // first byte missing
+    string short2(address1Hex + 1, address1Hex + sizeof(address1Hex)); // first byte missing
     BOOST_CHECK_THROW(addmultisig(createArgs(2, short2.c_str()), false), runtime_error);
 }
 
@@ -68,30 +68,30 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     LOCK2(cs_main, pwalletMain->cs_wallet);
 
     CPubKey demoPubkey = pwalletMain->GenerateNewKey();
-	CBitcoinAddress demoAddress = CBitcoinAddress(CTxDestination(demoPubkey.GetID()));
-	Value retValue;
-	string strAccount = "walletDemoAccount";
-	string strPurpose = "receive";
-	BOOST_CHECK_NO_THROW({ /*Initialize Wallet with an account */
-		CWalletDB walletdb(pwalletMain->strWalletFile);
-		CAccount account;
-		account.vchPubKey = demoPubkey;
-		pwalletMain->SetAddressBook(account.vchPubKey.GetID(), strAccount, strPurpose);
-		walletdb.WriteAccount(strAccount, account);
-	});
+    CBitcoinAddress demoAddress = CBitcoinAddress(CTxDestination(demoPubkey.GetID()));
+    Value retValue;
+    string strAccount = "walletDemoAccount";
+    string strPurpose = "receive";
+    BOOST_CHECK_NO_THROW({ /*Initialize Wallet with an account */
+        CWalletDB walletdb(pwalletMain->strWalletFile);
+        CAccount account;
+        account.vchPubKey = demoPubkey;
+        pwalletMain->SetAddressBook(account.vchPubKey.GetID(), strAccount, strPurpose);
+        walletdb.WriteAccount(strAccount, account);
+    });
 
     CPubKey setaccountDemoPubkey = pwalletMain->GenerateNewKey();
-        CBitcoinAddress setaccountDemoAddress = CBitcoinAddress(CTxDestination(setaccountDemoPubkey.GetID()));
-        
-	/*********************************
-	 * 			setaccount
-	 *********************************/
-	BOOST_CHECK_NO_THROW(CallRPC("setaccount " + setaccountDemoAddress.ToString() + " nullaccount"));
-	/* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ is not owned by the test wallet. */
-	BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ nullaccount"), runtime_error);
-	BOOST_CHECK_THROW(CallRPC("setaccount"), runtime_error);
-	/* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X (33 chars) is an illegal address (should be 34 chars) */
-	BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X nullaccount"), runtime_error);
+    CBitcoinAddress setaccountDemoAddress = CBitcoinAddress(CTxDestination(setaccountDemoPubkey.GetID()));
+
+    /*********************************
+     * 			setaccount
+     *********************************/
+    BOOST_CHECK_NO_THROW(CallRPC("setaccount " + setaccountDemoAddress.ToString() + " nullaccount"));
+    /* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ is not owned by the test wallet. */
+    BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ nullaccount"), runtime_error);
+    BOOST_CHECK_THROW(CallRPC("setaccount"), runtime_error);
+    /* 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X (33 chars) is an illegal address (should be 34 chars) */
+    BOOST_CHECK_THROW(CallRPC("setaccount 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X nullaccount"), runtime_error);
 
     /*********************************
      * 			listunspent
@@ -101,12 +101,12 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     BOOST_CHECK_THROW(CallRPC("listunspent 0 string"), runtime_error);
     BOOST_CHECK_THROW(CallRPC("listunspent 0 1 not_array"), runtime_error);
     BOOST_CHECK_THROW(CallRPC("listunspent 0 1 [] extra"), runtime_error);
-    BOOST_CHECK_NO_THROW(r=CallRPC("listunspent 0 1 []"));
+    BOOST_CHECK_NO_THROW(r = CallRPC("listunspent 0 1 []"));
     BOOST_CHECK(r.get_array().empty());
 
     /*********************************
-	 * 		listreceivedbyaddress
-	 *********************************/
+     * 		listreceivedbyaddress
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaddress"));
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaddress 0"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaddress not_int"), runtime_error);
@@ -115,8 +115,8 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaddress 0 true extra"), runtime_error);
 
     /*********************************
-	 * 		listreceivedbyaccount
-	 *********************************/
+     * 		listreceivedbyaccount
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaccount"));
     BOOST_CHECK_NO_THROW(CallRPC("listreceivedbyaccount 0"));
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaccount not_int"), runtime_error);
@@ -125,59 +125,58 @@ BOOST_AUTO_TEST_CASE(rpc_wallet)
     BOOST_CHECK_THROW(CallRPC("listreceivedbyaccount 0 true extra"), runtime_error);
 
     /*********************************
-	 * 		getrawchangeaddress
-	 *********************************/
+     * 		getrawchangeaddress
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("getrawchangeaddress"));
 
     /*********************************
-	 * 		getnewaddress
-	 *********************************/
+     * 		getnewaddress
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("getnewaddress"));
     BOOST_CHECK_NO_THROW(CallRPC("getnewaddress getnewaddress_demoaccount"));
 
     /*********************************
-	 * 		getaccountaddress
-	 *********************************/
+     * 		getaccountaddress
+     *********************************/
     BOOST_CHECK_NO_THROW(CallRPC("getaccountaddress \"\""));
-	BOOST_CHECK_NO_THROW(CallRPC("getaccountaddress accountThatDoesntExists")); // Should generate a new account
-	BOOST_CHECK_NO_THROW(retValue = CallRPC("getaccountaddress " + strAccount));
-	BOOST_CHECK(CBitcoinAddress(retValue.get_str()).Get() == demoAddress.Get());
-
-	/*********************************
-	 * 			getaccount
-	 *********************************/
-	BOOST_CHECK_THROW(CallRPC("getaccount"), runtime_error);
-	BOOST_CHECK_NO_THROW(CallRPC("getaccount " + demoAddress.ToString()));
-
-	/*********************************
-	 * 	signmessage + verifymessage
-	 *********************************/
-	BOOST_CHECK_NO_THROW(retValue = CallRPC("signmessage " + demoAddress.ToString() + " mymessage"));
-	BOOST_CHECK_THROW(CallRPC("signmessage"), runtime_error);
-	/* Should throw error because this address is not loaded in the wallet */
-	BOOST_CHECK_THROW(CallRPC("signmessage 1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ mymessage"), runtime_error);
-
-	/* missing arguments */
-	BOOST_CHECK_THROW(CallRPC("verifymessage "+ demoAddress.ToString()), runtime_error);
-	BOOST_CHECK_THROW(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str()), runtime_error);
-	/* Illegal address */
-	BOOST_CHECK_THROW(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X " + retValue.get_str() + " mymessage"), runtime_error);
-	/* wrong address */
-	BOOST_CHECK(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ " + retValue.get_str() + " mymessage").get_bool() == false);
-	/* Correct address and signature but wrong message */
-	BOOST_CHECK(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str() + " wrongmessage").get_bool() == false);
-	/* Correct address, message and signature*/
-	BOOST_CHECK(CallRPC("verifymessage "+ demoAddress.ToString() + " " + retValue.get_str() + " mymessage").get_bool() == true);
-
-	/*********************************
-	 * 		getaddressesbyaccount
-	 *********************************/
-	BOOST_CHECK_THROW(CallRPC("getaddressesbyaccount"), runtime_error);
-	BOOST_CHECK_NO_THROW(retValue = CallRPC("getaddressesbyaccount " + strAccount));
-	Array arr = retValue.get_array();
-	BOOST_CHECK(arr.size() > 0);
-	BOOST_CHECK(CBitcoinAddress(arr[0].get_str()).Get() == demoAddress.Get());
+    BOOST_CHECK_NO_THROW(CallRPC("getaccountaddress accountThatDoesntExists")); // Should generate a new account
+    BOOST_CHECK_NO_THROW(retValue = CallRPC("getaccountaddress " + strAccount));
+    BOOST_CHECK(CBitcoinAddress(retValue.get_str()).Get() == demoAddress.Get());
 
+    /*********************************
+     * 			getaccount
+     *********************************/
+    BOOST_CHECK_THROW(CallRPC("getaccount"), runtime_error);
+    BOOST_CHECK_NO_THROW(CallRPC("getaccount " + demoAddress.ToString()));
+
+    /*********************************
+     * 	signmessage + verifymessage
+     *********************************/
+    BOOST_CHECK_NO_THROW(retValue = CallRPC("signmessage " + demoAddress.ToString() + " mymessage"));
+    BOOST_CHECK_THROW(CallRPC("signmessage"), runtime_error);
+    /* Should throw error because this address is not loaded in the wallet */
+    BOOST_CHECK_THROW(CallRPC("signmessage 1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ mymessage"), runtime_error);
+
+    /* missing arguments */
+    BOOST_CHECK_THROW(CallRPC("verifymessage " + demoAddress.ToString()), runtime_error);
+    BOOST_CHECK_THROW(CallRPC("verifymessage " + demoAddress.ToString() + " " + retValue.get_str()), runtime_error);
+    /* Illegal address */
+    BOOST_CHECK_THROW(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4X " + retValue.get_str() + " mymessage"), runtime_error);
+    /* wrong address */
+    BOOST_CHECK(CallRPC("verifymessage 1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ " + retValue.get_str() + " mymessage").get_bool() == false);
+    /* Correct address and signature but wrong message */
+    BOOST_CHECK(CallRPC("verifymessage " + demoAddress.ToString() + " " + retValue.get_str() + " wrongmessage").get_bool() == false);
+    /* Correct address, message and signature*/
+    BOOST_CHECK(CallRPC("verifymessage " + demoAddress.ToString() + " " + retValue.get_str() + " mymessage").get_bool() == true);
+
+    /*********************************
+     * 		getaddressesbyaccount
+     *********************************/
+    BOOST_CHECK_THROW(CallRPC("getaddressesbyaccount"), runtime_error);
+    BOOST_CHECK_NO_THROW(retValue = CallRPC("getaddressesbyaccount " + strAccount));
+    Array arr = retValue.get_array();
+    BOOST_CHECK(arr.size() > 0);
+    BOOST_CHECK(CBitcoinAddress(arr[0].get_str()).Get() == demoAddress.Get());
 }
 
 

From 4bb30a1eb81009cf75b75c8371e361ef149e3744 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Wed, 10 Sep 2014 11:06:34 +0700
Subject: [PATCH 0817/1819] Correct logging AcceptBlock()->AcceptBlockHeader()

---
 src/main.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 55485c86ff55..f49c4dcedebe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2274,7 +2274,7 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     if (miSelf != mapBlockIndex.end()) {
         pindex = miSelf->second;
         if (pindex->nStatus & BLOCK_FAILED_MASK)
-            return state.Invalid(error("AcceptBlock() : block is marked invalid"), 0, "duplicate");
+            return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
     }
 
     CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
@@ -2284,12 +2284,12 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
         int64_t deltaTime = block.GetBlockTime() - pcheckpoint->GetBlockTime();
         if (deltaTime < 0)
         {
-            return state.DoS(100, error("CheckBlockHeader() : block with timestamp before last checkpoint"),
+            return state.DoS(100, error("%s : block with timestamp before last checkpoint", __func__),
                              REJECT_CHECKPOINT, "time-too-old");
         }
         if (!CheckMinWork(block.nBits, pcheckpoint->nBits, deltaTime))
         {
-            return state.DoS(100, error("CheckBlockHeader() : block with too little proof-of-work"),
+            return state.DoS(100, error("%s : block with too little proof-of-work", __func__),
                              REJECT_INVALID, "bad-diffbits");
         }
     }
@@ -2300,36 +2300,36 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     if (hash != Params().HashGenesisBlock()) {
         BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
         if (mi == mapBlockIndex.end())
-            return state.DoS(10, error("AcceptBlock() : prev block not found"), 0, "bad-prevblk");
+            return state.DoS(10, error("%s : prev block not found", __func__), 0, "bad-prevblk");
         pindexPrev = (*mi).second;
         nHeight = pindexPrev->nHeight+1;
 
         // Check proof of work
         if ((!Params().SkipProofOfWorkCheck()) &&
            (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
-            return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
+            return state.DoS(100, error("%s : incorrect proof of work", __func__),
                              REJECT_INVALID, "bad-diffbits");
 
         // Check timestamp against prev
         if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())
-            return state.Invalid(error("AcceptBlock() : block's timestamp is too early"),
+            return state.Invalid(error("%s : block's timestamp is too early", __func__),
                                  REJECT_INVALID, "time-too-old");
 
         // Check that the block chain matches the known block chain up to a checkpoint
         if (!Checkpoints::CheckBlock(nHeight, hash))
-            return state.DoS(100, error("AcceptBlock() : rejected by checkpoint lock-in at %d", nHeight),
+            return state.DoS(100, error("%s : rejected by checkpoint lock-in at %d", __func__, nHeight),
                              REJECT_CHECKPOINT, "checkpoint mismatch");
 
         // Don't accept any forks from the main chain prior to last checkpoint
         CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
         if (pcheckpoint && nHeight < pcheckpoint->nHeight)
-            return state.DoS(100, error("AcceptBlock() : forked chain older than last checkpoint (height %d)", nHeight));
+            return state.DoS(100, error("%s : forked chain older than last checkpoint (height %d)", __func__, nHeight));
 
         // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
         if (block.nVersion < 2 && 
             CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
         {
-            return state.Invalid(error("AcceptBlock() : rejected nVersion=1 block"),
+            return state.Invalid(error("%s : rejected nVersion=1 block", __func__),
                                  REJECT_OBSOLETE, "bad-version");
         }
     }

From 609adc7660dd94bd683e65268c27716beed2de89 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 2 Oct 2014 13:39:32 -0400
Subject: [PATCH 0818/1819] depends: disable unused bdb replication manager.
 Fixes new mingw builds

Newer mingw supports the features necessary to enable this api, whereas older
versions didn't. However once enabled (automatically by configure), it triggers
an unrelated build bug.

Since it was not enabled previously anyway, and we don't depend on the
functionality, just disable it across the board.
---
 depends/packages/bdb.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
index 503409c5e5bc..f39925723b5a 100644
--- a/depends/packages/bdb.mk
+++ b/depends/packages/bdb.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b857327
 $(package)_build_subdir=build_unix
 
 define $(package)_set_vars
-$(package)_config_opts=--disable-shared --enable-cxx
+$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
 $(package)_config_opts_mingw32=--enable-mingw
 $(package)_config_opts_x86_64_linux=--with-pic
 $(package)_config_opts_arm_linux=--with-pic

From c7829ea797c840dda7888ee860a50b7a3308069d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 10 Sep 2014 14:42:22 +0200
Subject: [PATCH 0819/1819] Abstract out SignatureChecker

---
 src/script/interpreter.cpp | 19 ++++++++++---------
 src/script/interpreter.h   | 28 +++++++++++++++++++++++++---
 src/script/sign.cpp        |  2 +-
 src/test/script_tests.cpp  |  2 +-
 4 files changed, 37 insertions(+), 14 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index a71f55dd2684..048d298f0bd9 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -132,7 +132,7 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
     return true;
 }
 
-bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const SignatureChecker& checker)
 {
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
@@ -675,7 +675,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
                     scriptCode.FindAndDelete(CScript(vchSig));
 
                     bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                        CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, flags);
+                        checker.CheckSig(vchSig, vchPubKey, scriptCode, flags);
 
                     popstack(stack);
                     popstack(stack);
@@ -736,7 +736,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, co
 
                         // Check signature
                         bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                            CheckSig(vchSig, vchPubKey, scriptCode, txTo, nIn, flags);
+                            checker.CheckSig(vchSig, vchPubKey, scriptCode, flags);
 
                         if (fOk) {
                             isig++;
@@ -897,7 +897,7 @@ class CTransactionSignatureSerializer {
 
 } // anon namespace
 
-uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
+uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
 {
     if (nIn >= txTo.vin.size()) {
         LogPrintf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn);
@@ -976,7 +976,7 @@ class CSignatureCache
     }
 };
 
-bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int flags)
+bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, int flags) const
 {
     static CSignatureCache signatureCache;
 
@@ -985,6 +985,7 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char>& vchPubK
         return false;
 
     // Hash type is one byte tacked on to the end of the signature
+    vector<unsigned char> vchSig(vchSigIn);
     if (vchSig.empty())
         return false;
     int nHashType = vchSig.back();
@@ -1004,14 +1005,14 @@ bool CheckSig(vector<unsigned char> vchSig, const vector<unsigned char>& vchPubK
     return true;
 }
 
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const SignatureChecker& checker)
 {
     vector<vector<unsigned char> > stack, stackCopy;
-    if (!EvalScript(stack, scriptSig, txTo, nIn, flags))
+    if (!EvalScript(stack, scriptSig, flags, checker))
         return false;
     if (flags & SCRIPT_VERIFY_P2SH)
         stackCopy = stack;
-    if (!EvalScript(stack, scriptPubKey, txTo, nIn, flags))
+    if (!EvalScript(stack, scriptPubKey, flags, checker))
         return false;
     if (stack.empty())
         return false;
@@ -1034,7 +1035,7 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const C
         CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
         popstack(stackCopy);
 
-        if (!EvalScript(stackCopy, pubKey2, txTo, nIn, flags))
+        if (!EvalScript(stackCopy, pubKey2, flags, checker))
             return false;
         if (stackCopy.empty())
             return false;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index adca2142ac40..f3fd49a3b6bc 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -38,8 +38,30 @@ bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int
 bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
-bool CheckSig(std::vector<unsigned char> vchSig, const std::vector<unsigned char> &vchPubKey, const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int flags);
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags);
+
+class SignatureChecker
+{
+private:
+    const CTransaction& txTo;
+    unsigned int nIn;
+
+public:
+    SignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
+    bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, int nFlags) const;
+};
+
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const SignatureChecker& checker);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const SignatureChecker& checker);
+
+// Wrappers using a default SignatureChecker.
+bool inline EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+{
+    return EvalScript(stack, script, flags, SignatureChecker(txTo, nIn));
+}
+
+bool inline VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+{
+    return VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(txTo, nIn));
+}
 
 #endif // H_BITCOIN_SCRIPT_INTERPRETER
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 8abd8d221d63..a17fb58787a1 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -174,7 +174,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
             if (sigs.count(pubkey))
                 continue; // Already got a sig for this pubkey
 
-            if (CheckSig(sig, pubkey, scriptPubKey, txTo, nIn, 0))
+            if (SignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey, 0))
             {
                 sigs[pubkey] = sig;
                 break;
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 7f09b3daa1b7..992f32cc4c1e 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -89,7 +89,7 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CTr
 
 void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bool expect, const std::string& message)
 {
-    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0, flags) == expect, message);
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0)) == expect, message);
 }
 
 namespace

From 5c1e798a8e9df15f8fbd120e57fc67e585f13843 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 10 Sep 2014 16:16:09 +0200
Subject: [PATCH 0820/1819] Make signature cache optional

---
 src/Makefile.am            |  2 +
 src/bitcoin-tx.cpp         |  2 +-
 src/main.cpp               |  2 +-
 src/main.h                 |  1 +
 src/script/interpreter.cpp | 74 +++-----------------------------
 src/script/interpreter.h   | 34 ++++++++-------
 src/script/sigcache.cpp    | 88 ++++++++++++++++++++++++++++++++++++++
 src/script/sigcache.h      | 34 +++++++++++++++
 src/script/sign.cpp        |  6 +--
 9 files changed, 155 insertions(+), 88 deletions(-)
 create mode 100644 src/script/sigcache.cpp
 create mode 100644 src/script/sigcache.h

diff --git a/src/Makefile.am b/src/Makefile.am
index bd6f1ba0d5de..155adfef7d34 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -103,6 +103,7 @@ BITCOIN_CORE_H = \
   script/compressor.h \
   script/interpreter.h \
   script/script.h \
+  script/sigcache.h \
   script/sign.h \
   script/standard.h \
   serialize.h \
@@ -218,6 +219,7 @@ libbitcoin_common_a_SOURCES = \
   script/compressor.cpp \
   script/interpreter.cpp \
   script/script.cpp \
+  script/sigcache.cpp \
   script/sign.cpp \
   script/standard.cpp \
   $(BITCOIN_CORE_H)
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index a61b4fe29db2..a198eb586eed 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -435,7 +435,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
         BOOST_FOREACH(const CTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index 55485c86ff55..5faa0086f5a5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -645,7 +645,7 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
         // IsStandard() will have already returned false
         // and this method isn't called.
         vector<vector<unsigned char> > stack;
-        if (!EvalScript(stack, tx.vin[i].scriptSig, tx, i, false))
+        if (!EvalScript(stack, tx.vin[i].scriptSig, false, BaseSignatureChecker()))
             return false;
 
         if (whichType == TX_SCRIPTHASH)
diff --git a/src/main.h b/src/main.h
index 7e849505dd68..ded6c155308f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -17,6 +17,7 @@
 #include "net.h"
 #include "pow.h"
 #include "script/script.h"
+#include "script/sigcache.h"
 #include "script/standard.h"
 #include "sync.h"
 #include "txmempool.h"
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 048d298f0bd9..f0b426839042 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -9,14 +9,10 @@
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
-#include "random.h"
 #include "script/script.h"
 #include "uint256.h"
 #include "util.h"
 
-#include <boost/thread.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
-
 using namespace std;
 
 typedef vector<unsigned char> valtype;
@@ -132,7 +128,7 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
     return true;
 }
 
-bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const SignatureChecker& checker)
+bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker)
 {
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
@@ -921,65 +917,13 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig
     return ss.GetHash();
 }
 
-// Valid signature cache, to avoid doing expensive ECDSA signature checking
-// twice for every transaction (once when accepted into memory pool, and
-// again when accepted into the block chain)
-class CSignatureCache
+bool SignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash, int flags) const
 {
-private:
-     // sigdata_type is (signature hash, signature, public key):
-    typedef boost::tuple<uint256, std::vector<unsigned char>, CPubKey> sigdata_type;
-    std::set< sigdata_type> setValid;
-    boost::shared_mutex cs_sigcache;
-
-public:
-    bool
-    Get(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
-    {
-        boost::shared_lock<boost::shared_mutex> lock(cs_sigcache);
-
-        sigdata_type k(hash, vchSig, pubKey);
-        std::set<sigdata_type>::iterator mi = setValid.find(k);
-        if (mi != setValid.end())
-            return true;
-        return false;
-    }
-
-    void Set(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
-    {
-        // DoS prevention: limit cache size to less than 10MB
-        // (~200 bytes per cache entry times 50,000 entries)
-        // Since there are a maximum of 20,000 signature operations per block
-        // 50,000 is a reasonable default.
-        int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 50000);
-        if (nMaxCacheSize <= 0) return;
-
-        boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
-
-        while (static_cast<int64_t>(setValid.size()) > nMaxCacheSize)
-        {
-            // Evict a random entry. Random because that helps
-            // foil would-be DoS attackers who might try to pre-generate
-            // and re-use a set of valid signatures just-slightly-greater
-            // than our cache size.
-            uint256 randomHash = GetRandHash();
-            std::vector<unsigned char> unused;
-            std::set<sigdata_type>::iterator it =
-                setValid.lower_bound(sigdata_type(randomHash, unused, unused));
-            if (it == setValid.end())
-                it = setValid.begin();
-            setValid.erase(*it);
-        }
-
-        sigdata_type k(hash, vchSig, pubKey);
-        setValid.insert(k);
-    }
-};
+    return pubkey.Verify(sighash, vchSig);
+}
 
 bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, int flags) const
 {
-    static CSignatureCache signatureCache;
-
     CPubKey pubkey(vchPubKey);
     if (!pubkey.IsValid())
         return false;
@@ -993,19 +937,13 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec
 
     uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
 
-    if (signatureCache.Get(sighash, vchSig, pubkey))
-        return true;
-
-    if (!pubkey.Verify(sighash, vchSig))
+    if (!VerifySignature(vchSig, pubkey, sighash, flags))
         return false;
 
-    if (!(flags & SCRIPT_VERIFY_NOCACHE))
-        signatureCache.Set(sighash, vchSig, pubkey);
-
     return true;
 }
 
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const SignatureChecker& checker)
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker)
 {
     vector<vector<unsigned char> > stack, stackCopy;
     if (!EvalScript(stack, scriptSig, flags, checker))
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index f3fd49a3b6bc..801f7e0ce15a 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -10,9 +10,10 @@
 #include <stdint.h>
 #include <string>
 
+class uint256;
+class CPubKey;
 class CScript;
 class CTransaction;
-class uint256;
 
 /** Signature hash types/flags */
 enum
@@ -39,29 +40,32 @@ bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
 
-class SignatureChecker
+class BaseSignatureChecker
+{
+public:
+    virtual bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, int nFlags) const
+    {
+        return false;
+    }
+
+    virtual ~BaseSignatureChecker() {}
+};
+
+class SignatureChecker : public BaseSignatureChecker
 {
 private:
     const CTransaction& txTo;
     unsigned int nIn;
 
+protected:
+    virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash, int flags) const;
+
 public:
     SignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
     bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, int nFlags) const;
 };
 
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const SignatureChecker& checker);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const SignatureChecker& checker);
-
-// Wrappers using a default SignatureChecker.
-bool inline EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
-    return EvalScript(stack, script, flags, SignatureChecker(txTo, nIn));
-}
-
-bool inline VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
-    return VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(txTo, nIn));
-}
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker);
 
 #endif // H_BITCOIN_SCRIPT_INTERPRETER
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
new file mode 100644
index 000000000000..a1dec64dbc33
--- /dev/null
+++ b/src/script/sigcache.cpp
@@ -0,0 +1,88 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "sigcache.h"
+
+#include "key.h"
+#include "random.h"
+#include "uint256.h"
+#include "util.h"
+
+#include <boost/thread.hpp>
+#include <boost/tuple/tuple_comparison.hpp>
+
+namespace {
+
+// Valid signature cache, to avoid doing expensive ECDSA signature checking
+// twice for every transaction (once when accepted into memory pool, and
+// again when accepted into the block chain)
+class CSignatureCache
+{
+private:
+     // sigdata_type is (signature hash, signature, public key):
+    typedef boost::tuple<uint256, std::vector<unsigned char>, CPubKey> sigdata_type;
+    std::set< sigdata_type> setValid;
+    boost::shared_mutex cs_sigcache;
+
+public:
+    bool
+    Get(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
+    {
+        boost::shared_lock<boost::shared_mutex> lock(cs_sigcache);
+
+        sigdata_type k(hash, vchSig, pubKey);
+        std::set<sigdata_type>::iterator mi = setValid.find(k);
+        if (mi != setValid.end())
+            return true;
+        return false;
+    }
+
+    void Set(const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubKey)
+    {
+        // DoS prevention: limit cache size to less than 10MB
+        // (~200 bytes per cache entry times 50,000 entries)
+        // Since there are a maximum of 20,000 signature operations per block
+        // 50,000 is a reasonable default.
+        int64_t nMaxCacheSize = GetArg("-maxsigcachesize", 50000);
+        if (nMaxCacheSize <= 0) return;
+
+        boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
+
+        while (static_cast<int64_t>(setValid.size()) > nMaxCacheSize)
+        {
+            // Evict a random entry. Random because that helps
+            // foil would-be DoS attackers who might try to pre-generate
+            // and re-use a set of valid signatures just-slightly-greater
+            // than our cache size.
+            uint256 randomHash = GetRandHash();
+            std::vector<unsigned char> unused;
+            std::set<sigdata_type>::iterator it =
+                setValid.lower_bound(sigdata_type(randomHash, unused, unused));
+            if (it == setValid.end())
+                it = setValid.begin();
+            setValid.erase(*it);
+        }
+
+        sigdata_type k(hash, vchSig, pubKey);
+        setValid.insert(k);
+    }
+};
+
+}
+
+bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash, int flags) const
+{
+    static CSignatureCache signatureCache;
+
+    if (signatureCache.Get(sighash, vchSig, pubkey))
+        return true;
+
+    if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash, flags))
+        return false;
+
+    if (!(flags & SCRIPT_VERIFY_NOCACHE))
+        signatureCache.Set(sighash, vchSig, pubkey);
+    return true;
+}
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
new file mode 100644
index 000000000000..8faa7ae01f5e
--- /dev/null
+++ b/src/script/sigcache.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_SCRIPT_SIGCACHE
+#define H_BITCOIN_SCRIPT_SIGCACHE
+
+#include "script/interpreter.h"
+
+#include <vector>
+
+class CPubKey;
+
+class CachingSignatureChecker : public SignatureChecker
+{
+public:
+    CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : SignatureChecker(txToIn, nInIn) {}
+
+    bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash, int flags) const;
+};
+
+// Wrappers using a default SignatureChecker.
+bool inline EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+{
+    return EvalScript(stack, script, flags, CachingSignatureChecker(txTo, nIn));
+}
+
+bool inline VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
+{
+    return VerifyScript(scriptSig, scriptPubKey, flags, CachingSignatureChecker(txTo, nIn));
+}
+
+#endif
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index a17fb58787a1..a524ac8e5e9c 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
     }
 
     // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, STANDARD_SCRIPT_VERIFY_FLAGS);
+    return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(txTo, nIn));
 }
 
 bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
@@ -252,9 +252,9 @@ CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsign
     Solver(scriptPubKey, txType, vSolutions);
 
     vector<valtype> stack1;
-    EvalScript(stack1, scriptSig1, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
+    EvalScript(stack1, scriptSig1, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker());
     vector<valtype> stack2;
-    EvalScript(stack2, scriptSig2, CTransaction(), 0, SCRIPT_VERIFY_STRICTENC);
+    EvalScript(stack2, scriptSig2, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker());
 
     return CombineSignatures(scriptPubKey, txTo, nIn, txType, vSolutions, stack1, stack2);
 }

From e790c370b5971dd096d1bbfd55960ccf71b7594a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 14 Sep 2014 04:48:32 +0200
Subject: [PATCH 0821/1819] Replace SCRIPT_VERIFY_NOCACHE by flag directly to
 checker

---
 src/main.cpp                   | 15 +++++++--------
 src/main.h                     | 13 +++++++------
 src/miner.cpp                  |  2 +-
 src/rpcrawtransaction.cpp      |  2 +-
 src/script/interpreter.cpp     | 10 +++++-----
 src/script/interpreter.h       |  9 ++++-----
 src/script/sigcache.cpp        |  6 +++---
 src/script/sigcache.h          | 18 +++++-------------
 src/script/sign.cpp            |  2 +-
 src/test/multisig_tests.cpp    | 18 +++++++++---------
 src/test/script_P2SH_tests.cpp |  4 ++--
 src/test/script_tests.cpp      | 34 +++++++++++++++++-----------------
 src/test/transaction_tests.cpp |  5 ++---
 13 files changed, 64 insertions(+), 74 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5faa0086f5a5..61d5f2c177d3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -943,7 +943,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 
         // Check against previous transactions
         // This is done last to help prevent CPU exhaustion denial-of-service attacks.
-        if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS))
+        if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true))
         {
             return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString());
         }
@@ -1316,12 +1316,12 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 
 bool CScriptCheck::operator()() const {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, *ptxTo, nIn, nFlags))
+    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingSignatureChecker(*ptxTo, nIn, cacheStore)))
         return error("CScriptCheck() : %s:%d VerifySignature failed", ptxTo->GetHash().ToString(), nIn);
     return true;
 }
 
-bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, std::vector<CScriptCheck> *pvChecks)
+bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &inputs, bool fScriptChecks, unsigned int flags, bool cacheStore, std::vector<CScriptCheck> *pvChecks)
 {
     if (!tx.IsCoinBase())
     {
@@ -1390,7 +1390,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                 assert(coins);
 
                 // Verify signature
-                CScriptCheck check(*coins, tx, i, flags);
+                CScriptCheck check(*coins, tx, i, flags, cacheStore);
                 if (pvChecks) {
                     pvChecks->push_back(CScriptCheck());
                     check.swap(pvChecks->back());
@@ -1403,7 +1403,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                         // avoid splitting the network between upgraded and
                         // non-upgraded nodes.
                         CScriptCheck check(*coins, tx, i,
-                                flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS);
+                                flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore);
                         if (check())
                             return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag");
                     }
@@ -1599,8 +1599,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     int64_t nBIP16SwitchTime = 1333238400;
     bool fStrictPayToScriptHash = (pindex->GetBlockTime() >= nBIP16SwitchTime);
 
-    unsigned int flags = SCRIPT_VERIFY_NOCACHE |
-                         (fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE);
+    unsigned int flags = fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE;
 
     CBlockUndo blockundo;
 
@@ -1644,7 +1643,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
             nFees += view.GetValueIn(tx)-tx.GetValueOut();
 
             std::vector<CScriptCheck> vChecks;
-            if (!CheckInputs(tx, state, view, fScriptChecks, flags, nScriptCheckThreads ? &vChecks : NULL))
+            if (!CheckInputs(tx, state, view, fScriptChecks, flags, false, nScriptCheckThreads ? &vChecks : NULL))
                 return false;
             control.Add(vChecks);
         }
diff --git a/src/main.h b/src/main.h
index ded6c155308f..c09a139b2405 100644
--- a/src/main.h
+++ b/src/main.h
@@ -259,9 +259,8 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& ma
 // Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
 // This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
 // instead of being performed inline.
-bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks = true,
-                 unsigned int flags = STANDARD_SCRIPT_VERIFY_FLAGS,
-                 std::vector<CScriptCheck> *pvChecks = NULL);
+bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks,
+                 unsigned int flags, bool cacheStore, std::vector<CScriptCheck> *pvChecks = NULL);
 
 // Apply the effects of this transaction on the UTXO set represented by view
 void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight);
@@ -303,12 +302,13 @@ class CScriptCheck
     const CTransaction *ptxTo;
     unsigned int nIn;
     unsigned int nFlags;
+    bool cacheStore;
 
 public:
-    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0) {}
-    CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn) :
+    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), cacheStore(false) {}
+    CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn) :
         scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey),
-        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn) { }
+        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn) { }
 
     bool operator()() const;
 
@@ -317,6 +317,7 @@ class CScriptCheck
         std::swap(ptxTo, check.ptxTo);
         std::swap(nIn, check.nIn);
         std::swap(nFlags, check.nFlags);
+        std::swap(cacheStore, check.cacheStore);
     }
 };
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 361a2bea4123..280349e8c2d5 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -257,7 +257,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             // policy here, but we still have to ensure that the block we
             // create only contains transactions that are valid in new blocks.
             CValidationState state;
-            if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS))
+            if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true))
                 continue;
 
             CTxUndo txundo;
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index bd87d77704ca..e50a278bc8eb 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -687,7 +687,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         BOOST_FOREACH(const CMutableTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx, i, STANDARD_SCRIPT_VERIFY_FLAGS))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index f0b426839042..56140f19dba9 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -671,7 +671,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     scriptCode.FindAndDelete(CScript(vchSig));
 
                     bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                        checker.CheckSig(vchSig, vchPubKey, scriptCode, flags);
+                        checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                     popstack(stack);
                     popstack(stack);
@@ -732,7 +732,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
 
                         // Check signature
                         bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                            checker.CheckSig(vchSig, vchPubKey, scriptCode, flags);
+                            checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                         if (fOk) {
                             isig++;
@@ -917,12 +917,12 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig
     return ss.GetHash();
 }
 
-bool SignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash, int flags) const
+bool SignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
 {
     return pubkey.Verify(sighash, vchSig);
 }
 
-bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, int flags) const
+bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode) const
 {
     CPubKey pubkey(vchPubKey);
     if (!pubkey.IsValid())
@@ -937,7 +937,7 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec
 
     uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
 
-    if (!VerifySignature(vchSig, pubkey, sighash, flags))
+    if (!VerifySignature(vchSig, pubkey, sighash))
         return false;
 
     return true;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 801f7e0ce15a..f5363a7535a6 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -31,8 +31,7 @@ enum
     SCRIPT_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
     SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
     SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC)
-    SCRIPT_VERIFY_NOCACHE   = (1U << 3), // do not store results in signature cache (but do query it)
-    SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
+    SCRIPT_VERIFY_NULLDUMMY = (1U << 3), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
 };
 
 bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
@@ -43,7 +42,7 @@ uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsig
 class BaseSignatureChecker
 {
 public:
-    virtual bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, int nFlags) const
+    virtual bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const
     {
         return false;
     }
@@ -58,11 +57,11 @@ class SignatureChecker : public BaseSignatureChecker
     unsigned int nIn;
 
 protected:
-    virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash, int flags) const;
+    virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 
 public:
     SignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
-    bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode, int nFlags) const;
+    bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
 };
 
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker);
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index a1dec64dbc33..981563b7aea0 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -72,17 +72,17 @@ class CSignatureCache
 
 }
 
-bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash, int flags) const
+bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
 {
     static CSignatureCache signatureCache;
 
     if (signatureCache.Get(sighash, vchSig, pubkey))
         return true;
 
-    if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash, flags))
+    if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash))
         return false;
 
-    if (!(flags & SCRIPT_VERIFY_NOCACHE))
+    if (store)
         signatureCache.Set(sighash, vchSig, pubkey);
     return true;
 }
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 8faa7ae01f5e..9537efbd118e 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -14,21 +14,13 @@ class CPubKey;
 
 class CachingSignatureChecker : public SignatureChecker
 {
+private:
+    bool store;
+
 public:
-    CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : SignatureChecker(txToIn, nInIn) {}
+    CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn, bool storeIn=true) : SignatureChecker(txToIn, nInIn), store(storeIn) {}
 
-    bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash, int flags) const;
+    bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 };
 
-// Wrappers using a default SignatureChecker.
-bool inline EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
-    return EvalScript(stack, script, flags, CachingSignatureChecker(txTo, nIn));
-}
-
-bool inline VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, unsigned int flags)
-{
-    return VerifyScript(scriptSig, scriptPubKey, flags, CachingSignatureChecker(txTo, nIn));
-}
-
 #endif
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index a524ac8e5e9c..da77e7d1f1be 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -174,7 +174,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
             if (sigs.count(pubkey))
                 continue; // Already got a sig for this pubkey
 
-            if (SignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey, 0))
+            if (SignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
             {
                 sigs[pubkey] = sig;
                 break;
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index cb37740068e4..5a2ec1cb3194 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -82,19 +82,19 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     keys.clear();
     keys += key[0],key[1]; // magic operator+= from boost.assign
     s = sign_multisig(a_and_b, keys, txTo[0], 0);
-    BOOST_CHECK(VerifyScript(s, a_and_b, txTo[0], 0, flags));
+    BOOST_CHECK(VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)));
 
     for (int i = 0; i < 4; i++)
     {
         keys.clear();
         keys += key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)), strprintf("a&b 1: %d", i));
 
         keys.clear();
         keys += key[1],key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, txTo[0], 0, flags), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)), strprintf("a&b 2: %d", i));
     }
 
     // Test a OR b:
@@ -104,16 +104,16 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         keys += key[i];
         s = sign_multisig(a_or_b, keys, txTo[1], 0);
         if (i == 0 || i == 1)
-            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, txTo[1], 0, flags), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)), strprintf("a|b: %d", i));
         else
-            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, txTo[1], 0, flags), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)), strprintf("a|b: %d", i));
     }
     s.clear();
     s << OP_0 << OP_0;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)));
     s.clear();
     s << OP_0 << OP_1;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, txTo[1], 0, flags));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)));
 
 
     for (int i = 0; i < 4; i++)
@@ -123,9 +123,9 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
             keys += key[i],key[j];
             s = sign_multisig(escrow, keys, txTo[2], 0);
             if (i < j && i < 3 && j < 3)
-                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, txTo[2], 0, flags), strprintf("escrow 1: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0)), strprintf("escrow 1: %d %d", i, j));
             else
-                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, txTo[2], 0, flags), strprintf("escrow 2: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0)), strprintf("escrow 2: %d %d", i, j));
         }
 }
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index e6cf00c2d07b..6c32a263a971 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -42,7 +42,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict)
     txTo.vin[0].scriptSig = scriptSig;
     txTo.vout[0].nValue = 1;
 
-    return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE);
+    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, SignatureChecker(txTo, 0));
 }
 
 
@@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(sign)
         {
             CScript sigSave = txTo[i].vin[0].scriptSig;
             txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig;
-            bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC)();
+            bool sigOK = CScriptCheck(CCoins(txFrom, 0), txTo[i], 0, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, false)();
             if (i == j)
                 BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j));
             else
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 992f32cc4c1e..bfba0ea7fe96 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -464,18 +464,18 @@ BOOST_AUTO_TEST_CASE(script_PushData)
     static const unsigned char pushdata4[] = { OP_PUSHDATA4, 1, 0, 0, 0, 0x5a };
 
     vector<vector<unsigned char> > directStack;
-    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), CTransaction(), 0, true));
+    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), true, BaseSignatureChecker()));
 
     vector<vector<unsigned char> > pushdata1Stack;
-    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), CTransaction(), 0, true));
+    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), true, BaseSignatureChecker()));
     BOOST_CHECK(pushdata1Stack == directStack);
 
     vector<vector<unsigned char> > pushdata2Stack;
-    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), CTransaction(), 0, true));
+    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), true, BaseSignatureChecker()));
     BOOST_CHECK(pushdata2Stack == directStack);
 
     vector<vector<unsigned char> > pushdata4Stack;
-    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), CTransaction(), 0, true));
+    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), true, BaseSignatureChecker()));
     BOOST_CHECK(pushdata4Stack == directStack);
 }
 
@@ -533,15 +533,15 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     txTo12.vout[0].nValue = 1;
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
     txTo12.vout[0].nValue = 2;
-    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags));
+    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
 
     CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, txTo12, 0, flags));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
 
     CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, txTo12, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
 }
 
 BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
@@ -569,46 +569,46 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
     CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key3);
     CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key3);
     CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
     CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
     CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
     CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
     CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
     CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 
     keys.clear(); // Must have signatures
     CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, txTo23, 0, flags));
+    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
 }    
 
 BOOST_AUTO_TEST_CASE(script_combineSigs)
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 83116b51e5c4..823afa168050 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -27,7 +27,6 @@ using namespace boost::algorithm;
 // In script_tests.cpp
 extern Array read_json(const std::string& jsondata);
 
-// Note how NOCACHE is not included as it is a runtime-only flag.
 static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
     (string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE)
     (string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH)
@@ -139,7 +138,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                                 tx, i, verify_flags),
+                                                 verify_flags, SignatureChecker(tx, i)),
                                     strTest);
             }
         }
@@ -212,7 +211,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                      tx, i, verify_flags);
+                                      verify_flags, SignatureChecker(tx, i));
             }
 
             BOOST_CHECK_MESSAGE(!fValid, strTest);

From 54510f267228e3f6934fdcf8d02d02a95a06d876 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sun, 28 Sep 2014 06:33:33 +0200
Subject: [PATCH 0822/1819] DRY: Avoid repetitions in script_test

---
 src/test/script_tests.cpp | 37 +++++++------------------------------
 1 file changed, 7 insertions(+), 30 deletions(-)

diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 7f09b3daa1b7..48a5635d8fd3 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -70,7 +70,7 @@ CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey)
     return txCredit;
 }
 
-CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CTransaction& txCredit)
+CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMutableTransaction& txCredit)
 {
     CMutableTransaction txSpend;
     txSpend.nVersion = 1;
@@ -521,16 +521,8 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     CScript scriptPubKey12;
     scriptPubKey12 << OP_1 << key1.GetPubKey() << key2.GetPubKey() << OP_2 << OP_CHECKMULTISIG;
 
-    CMutableTransaction txFrom12;
-    txFrom12.vout.resize(1);
-    txFrom12.vout[0].scriptPubKey = scriptPubKey12;
-
-    CMutableTransaction txTo12;
-    txTo12.vin.resize(1);
-    txTo12.vout.resize(1);
-    txTo12.vin[0].prevout.n = 0;
-    txTo12.vin[0].prevout.hash = txFrom12.GetHash();
-    txTo12.vout[0].nValue = 1;
+    CMutableTransaction txFrom12 = BuildCreditingTransaction(scriptPubKey12);
+    CMutableTransaction txTo12 = BuildSpendingTransaction(CScript(), txFrom12);
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
     BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, txTo12, 0, flags));
@@ -555,16 +547,8 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     CScript scriptPubKey23;
     scriptPubKey23 << OP_2 << key1.GetPubKey() << key2.GetPubKey() << key3.GetPubKey() << OP_3 << OP_CHECKMULTISIG;
 
-    CMutableTransaction txFrom23;
-    txFrom23.vout.resize(1);
-    txFrom23.vout[0].scriptPubKey = scriptPubKey23;
-
-    CMutableTransaction txTo23;
-    txTo23.vin.resize(1);
-    txTo23.vout.resize(1);
-    txTo23.vin[0].prevout.n = 0;
-    txTo23.vin[0].prevout.hash = txFrom23.GetHash();
-    txTo23.vout[0].nValue = 1;
+    CMutableTransaction txFrom23 = BuildCreditingTransaction(scriptPubKey23);
+    CMutableTransaction txTo23 = BuildSpendingTransaction(CScript(), txFrom23);
 
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
@@ -626,17 +610,10 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
         keystore.AddKey(key);
     }
 
-    CMutableTransaction txFrom;
-    txFrom.vout.resize(1);
-    txFrom.vout[0].scriptPubKey = GetScriptForDestination(keys[0].GetPubKey().GetID());
+    CMutableTransaction txFrom = BuildCreditingTransaction(GetScriptForDestination(keys[0].GetPubKey().GetID()));
+    CMutableTransaction txTo = BuildSpendingTransaction(CScript(), txFrom);
     CScript& scriptPubKey = txFrom.vout[0].scriptPubKey;
-    CMutableTransaction txTo;
-    txTo.vin.resize(1);
-    txTo.vout.resize(1);
-    txTo.vin[0].prevout.n = 0;
-    txTo.vin[0].prevout.hash = txFrom.GetHash();
     CScript& scriptSig = txTo.vin[0].scriptSig;
-    txTo.vout[0].nValue = 1;
 
     CScript empty;
     CScript combined = CombineSignatures(scriptPubKey, txTo, 0, empty, empty);

From b9b2e3fabd36b9f93b09c2deb53aa626c26df9e2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 2 Oct 2014 22:17:57 +0200
Subject: [PATCH 0823/1819] Don't translate state.Abort() messages

There is only one message passed to AbortNode() that makes sense to
translate to the user specifically: Disk space is low. For the others
show a generic message and refer to debug.log for details.

Reduces the number of confusing jargon translation messages.
---
 src/main.cpp | 38 ++++++++++++++++++++------------------
 src/main.h   |  2 +-
 2 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 55485c86ff55..793b3511aa98 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1688,7 +1688,7 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
             if (!FindUndoPos(state, pindex->nFile, pos, ::GetSerializeSize(blockundo, SER_DISK, CLIENT_VERSION) + 40))
                 return error("ConnectBlock() : FindUndoPos failed");
             if (!blockundo.WriteToDisk(pos, pindex->pprev->GetBlockHash()))
-                return state.Abort(_("Failed to write undo data"));
+                return state.Abort("Failed to write undo data");
 
             // update nUndoPos in block index
             pindex->nUndoPos = pos.nPos;
@@ -1699,12 +1699,12 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 
         CDiskBlockIndex blockindex(pindex);
         if (!pblocktree->WriteBlockIndex(blockindex))
-            return state.Abort(_("Failed to write block index"));
+            return state.Abort("Failed to write block index");
     }
 
     if (fTxIndex)
         if (!pblocktree->WriteTxIndex(vPos))
-            return state.Abort(_("Failed to write transaction index"));
+            return state.Abort("Failed to write transaction index");
 
     // add this block to the view's block chain
     bool ret;
@@ -1739,7 +1739,7 @@ bool static WriteChainState(CValidationState &state) {
         FlushBlockFile();
         pblocktree->Sync();
         if (!pcoinsTip->Flush())
-            return state.Abort(_("Failed to write to coin database"));
+            return state.Abort("Failed to write to coin database");
         nLastWrite = GetTimeMicros();
     }
     return true;
@@ -1787,7 +1787,7 @@ bool static DisconnectTip(CValidationState &state) {
     // Read block from disk.
     CBlock block;
     if (!ReadBlockFromDisk(block, pindexDelete))
-        return state.Abort(_("Failed to read block"));
+        return state.Abort("Failed to read block");
     // Apply the block atomically to the chain state.
     int64_t nStart = GetTimeMicros();
     {
@@ -1836,7 +1836,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 state.Abort("Failed to read block");
         pblock = &block;
     }
     // Apply the block atomically to the chain state.
@@ -1990,7 +1990,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
         CheckForkWarningConditions();
 
     if (!pblocktree->Flush())
-        return state.Abort(_("Failed to sync block index"));
+        return state.Abort("Failed to sync block index");
 
     return true;
 }
@@ -2097,7 +2097,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
         setBlockIndexValid.insert(pindexNew);
 
     if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
-        return state.Abort(_("Failed to write block index"));
+        return state.Abort("Failed to write block index");
 
     return true;
 }
@@ -2149,7 +2149,7 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
     }
 
     if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, infoLastBlockFile))
-        return state.Abort(_("Failed to write file info"));
+        return state.Abort("Failed to write file info");
     if (fUpdatedLast)
         pblocktree->WriteLastBlockFile(nLastBlockFile);
 
@@ -2167,15 +2167,15 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
         pos.nPos = infoLastBlockFile.nUndoSize;
         nNewSize = (infoLastBlockFile.nUndoSize += nAddSize);
         if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, infoLastBlockFile))
-            return state.Abort(_("Failed to write block info"));
+            return state.Abort("Failed to write block info");
     } else {
         CBlockFileInfo info;
         if (!pblocktree->ReadBlockFileInfo(nFile, info))
-            return state.Abort(_("Failed to read block info"));
+            return state.Abort("Failed to read block info");
         pos.nPos = info.nUndoSize;
         nNewSize = (info.nUndoSize += nAddSize);
         if (!pblocktree->WriteBlockFileInfo(nFile, info))
-            return state.Abort(_("Failed to write block info"));
+            return state.Abort("Failed to write block info");
     }
 
     unsigned int nOldChunks = (pos.nPos + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
@@ -2392,11 +2392,11 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
             return error("AcceptBlock() : FindBlockPos failed");
         if (dbp == NULL)
             if (!WriteBlockToDisk(block, blockPos))
-                return state.Abort(_("Failed to write block"));
+                return state.Abort("Failed to write block");
         if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
             return error("AcceptBlock() : ReceivedBlockTransactions failed");
     } catch(std::runtime_error &e) {
-        return state.Abort(_("System error: ") + e.what());
+        return state.Abort(std::string("System error: ") + e.what());
     }
 
     return true;
@@ -2719,10 +2719,12 @@ uint256 CPartialMerkleTree::ExtractMatches(std::vector<uint256> &vMatch) {
 
 
 
-bool AbortNode(const std::string &strMessage) {
+bool AbortNode(const std::string &strMessage, const std::string &userMessage) {
     strMiscWarning = strMessage;
     LogPrintf("*** %s\n", strMessage);
-    uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_ERROR);
+    uiInterface.ThreadSafeMessageBox(
+        userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
+        "", CClientUIInterface::MSG_ERROR);
     StartShutdown();
     return false;
 }
@@ -2733,7 +2735,7 @@ bool CheckDiskSpace(uint64_t nAdditionalBytes)
 
     // Check for nMinDiskSpace bytes (currently 50MB)
     if (nFreeBytesAvailable < nMinDiskSpace + nAdditionalBytes)
-        return AbortNode(_("Error: Disk space is low!"));
+        return AbortNode("Disk space is low!", _("Error: Disk space is low!"));
 
     return true;
 }
@@ -3143,7 +3145,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
         }
         fclose(fileIn);
     } catch(std::runtime_error &e) {
-        AbortNode(_("Error: system error: ") + e.what());
+        AbortNode(std::string("System error: ") + e.what());
     }
     if (nLoaded > 0)
         LogPrintf("Loaded %i blocks from external file in %dms\n", nLoaded, GetTimeMillis() - nStart);
diff --git a/src/main.h b/src/main.h
index 7e849505dd68..156a0af19fed 100644
--- a/src/main.h
+++ b/src/main.h
@@ -177,7 +177,7 @@ CAmount GetBlockValue(int nHeight, const CAmount& nFees);
 /** 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);
+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. */

From eb6b3b245cab5bb172ba27a0072edf9c2de32c29 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 2 Oct 2014 22:20:23 +0200
Subject: [PATCH 0824/1819] Update English translation

---
 src/qt/bitcoinstrings.cpp   |  16 +-
 src/qt/locale/bitcoin_en.ts | 346 ++++++++++++++++--------------------
 2 files changed, 161 insertions(+), 201 deletions(-)

diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 3b4b40aae307..25c811183fa9 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -195,21 +195,11 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Bitcoin Core"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: A fatal internal error occured, see debug.log for details"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unsupported argument -tor found, use -onion."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction!"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Error: system error: "),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to read block info"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to read block"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to sync block index"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block index"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block info"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write block"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write file info"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write to coin database"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write transaction index"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Failed to write undo data"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in BTC/kB) to add to transactions you send (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: 0)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: 0)"),
@@ -231,6 +221,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'")
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: 50000)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 8333 or testnet: 18333)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
@@ -245,7 +236,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"
 QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: 1)"),
@@ -282,7 +273,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)")
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Stop running after importing blocks from disk (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "System error: "),
 QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is intended for regression testing tools and app development."),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index a527602b5a9d..5c3abef2e7f8 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -19,7 +19,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copy the currently selected address to the system clipboard</translation>
     </message>
@@ -29,7 +29,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+58"/>
+        <location line="+67"/>
         <source>C&amp;lose</source>
         <translation type="unfinished"></translation>
     </message>
@@ -39,12 +39,12 @@
         <translation>&amp;Copy Address</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="-47"/>
+        <location filename="../forms/addressbookpage.ui" line="-53"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Delete the currently selected address from the list</translation>
     </message>
     <message>
-        <location line="+27"/>
+        <location line="+30"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Export the data in the current tab to a file</translation>
     </message>
@@ -54,7 +54,7 @@
         <translation>&amp;Export</translation>
     </message>
     <message>
-        <location line="-27"/>
+        <location line="-30"/>
         <source>&amp;Delete</source>
         <translation>&amp;Delete</translation>
     </message>
@@ -286,17 +286,17 @@
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+300"/>
+        <location filename="../bitcoingui.cpp" line="+327"/>
         <source>Sign &amp;message...</source>
         <translation>Sign &amp;message...</translation>
     </message>
     <message>
-        <location line="+339"/>
+        <location line="+348"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location line="-411"/>
+        <location line="-420"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
@@ -377,13 +377,13 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+168"/>
+        <location line="+175"/>
         <location line="+5"/>
         <source>Bitcoin Core client</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+156"/>
+        <location line="+158"/>
         <source>Importing blocks from disk...</source>
         <translation>Importing blocks from disk...</translation>
     </message>
@@ -393,7 +393,7 @@
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location line="-409"/>
+        <location line="-418"/>
         <source>Send coins to a Bitcoin address</source>
         <translation>Send coins to a Bitcoin address</translation>
     </message>
@@ -428,12 +428,12 @@
         <translation>&amp;Verify message...</translation>
     </message>
     <message>
-        <location line="+437"/>
+        <location line="+446"/>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <location line="-655"/>
+        <location line="-664"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
@@ -500,12 +500,12 @@
     </message>
     <message>
         <location line="-289"/>
-        <location line="+386"/>
+        <location line="+393"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
     <message>
-        <location line="-411"/>
+        <location line="-418"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -546,7 +546,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message numerus="yes">
-        <location line="+310"/>
+        <location line="+316"/>
         <source>%n active connection(s) to Bitcoin network</source>
         <translation>
             <numerusform>%n active connection to Bitcoin network</numerusform>
@@ -554,7 +554,7 @@
         </translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+25"/>
         <source>No block source available...</source>
         <translation>No block source available...</translation>
     </message>
@@ -665,7 +665,7 @@ Address: %4
 </translation>
     </message>
     <message>
-        <location line="+69"/>
+        <location line="+68"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</translation>
     </message>
@@ -678,7 +678,7 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+138"/>
+        <location filename="../clientmodel.cpp" line="+139"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -736,7 +736,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1059,7 +1059,7 @@ Address: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="+29"/>
+        <location filename="../utilitydialog.cpp" line="+31"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -1201,7 +1201,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1430,12 +1430,12 @@ Address: %4
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Cancel</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+68"/>
+        <location filename="../optionsdialog.cpp" line="+71"/>
         <source>default</source>
         <translation>default</translation>
     </message>
@@ -1479,23 +1479,18 @@ Address: %4
         <translation>Form</translation>
     </message>
     <message>
-        <location line="+52"/>
-        <location line="+394"/>
+        <location line="+53"/>
+        <location line="+372"/>
         <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>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.</translation>
     </message>
     <message>
-        <location line="-401"/>
-        <source>Wallet</source>
-        <translation>Wallet</translation>
-    </message>
-    <message>
-        <location line="+33"/>
+        <location line="-133"/>
         <source>Watch-only:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+43"/>
+        <location line="+10"/>
         <source>Available:</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1505,62 +1500,72 @@ Address: %4
         <translation>Your current spendable balance</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Immature:</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Mined balance that has not yet matured</translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="-163"/>
+        <source>Balances</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+147"/>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Your current total balance</translation>
     </message>
     <message>
-        <location line="+38"/>
+        <location line="+92"/>
         <source>Your current balance in watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+25"/>
+        <location line="+23"/>
+        <source>Spendable:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+49"/>
+        <source>Recent transactions</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="-317"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+25"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+44"/>
+        <location line="+128"/>
         <source>Current total balance in watch-only addresses</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+67"/>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Recent transactions&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="+123"/>
+        <location filename="../overviewpage.cpp" line="+131"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>out of sync</translation>
@@ -1569,7 +1574,7 @@ Address: %4
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="+405"/>
+        <location filename="../paymentserver.cpp" line="+410"/>
         <location line="+14"/>
         <location line="+7"/>
         <source>URI handling</source>
@@ -1681,7 +1686,7 @@ Address: %4
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="+112"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>User Agent</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1699,17 +1704,17 @@ Address: %4
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+200"/>
+        <location filename="../bitcoinunits.cpp" line="+196"/>
         <source>Amount</source>
         <translation type="unfinished">Amount</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="+97"/>
+        <location filename="../guiutil.cpp" line="+106"/>
         <source>Enter a Bitcoin address (e.g. %1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+673"/>
+        <location line="+698"/>
         <source>%1 d</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1795,7 +1800,7 @@ Address: %4
         <location line="+23"/>
         <location line="+36"/>
         <location line="+23"/>
-        <location line="+462"/>
+        <location line="+465"/>
         <location line="+23"/>
         <location line="+23"/>
         <location line="+23"/>
@@ -1813,7 +1818,7 @@ Address: %4
         <translation>N/A</translation>
     </message>
     <message>
-        <location line="-987"/>
+        <location line="-990"/>
         <source>Client version</source>
         <translation>Client version</translation>
     </message>
@@ -1873,7 +1878,7 @@ Address: %4
         <translation>Current number of blocks</translation>
     </message>
     <message>
-        <location line="+300"/>
+        <location line="+303"/>
         <source>Received</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1889,7 +1894,7 @@ Address: %4
     </message>
     <message>
         <location line="+39"/>
-        <location filename="../rpcconsole.cpp" line="+234"/>
+        <location filename="../rpcconsole.cpp" line="+236"/>
         <location line="+327"/>
         <source>Select a peer to view detailed information.</source>
         <translation type="unfinished"></translation>
@@ -1965,7 +1970,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-761"/>
+        <location line="-764"/>
         <source>Last block time</source>
         <translation>Last block time</translation>
     </message>
@@ -1990,7 +1995,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2005,7 +2010,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="-354"/>
+        <location filename="../forms/rpcconsole.ui" line="-357"/>
         <source>Build date</source>
         <translation>Build date</translation>
     </message>
@@ -2163,12 +2168,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+78"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-98"/>
+        <location line="-95"/>
         <source>&amp;Request payment</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2183,7 +2188,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2221,12 +2226,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2279,7 +2284,7 @@ Address: %4
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="+24"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+26"/>
         <source>Date</source>
         <translation type="unfinished">Date</translation>
     </message>
@@ -2333,7 +2338,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2398,22 +2403,22 @@ Address: %4
         <translation>Add &amp;Recipient</translation>
     </message>
     <message>
-        <location line="-23"/>
+        <location line="-20"/>
         <source>Clear all fields of the form.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-271"/>
+        <location line="-274"/>
         <source>Dust:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+274"/>
+        <location line="+277"/>
         <source>Clear &amp;All</source>
         <translation>Clear &amp;All</translation>
     </message>
     <message>
-        <location line="+58"/>
+        <location line="+55"/>
         <source>Balance:</source>
         <translation>Balance:</translation>
     </message>
@@ -2653,7 +2658,7 @@ Address: %4
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="+51"/>
+        <location filename="../utilitydialog.cpp" line="+47"/>
         <source>Bitcoin Core is shutting down...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2671,7 +2676,7 @@ Address: %4
         <translation>Signatures - Sign / Verify a Message</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Sign Message</translation>
     </message>
@@ -2848,7 +2853,7 @@ Address: %4
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="+32"/>
+        <location filename="../splashscreen.cpp" line="+34"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -2874,7 +2879,7 @@ Address: %4
 <context>
     <name>TransactionDesc</name>
     <message>
-        <location filename="../transactiondesc.cpp" line="+33"/>
+        <location filename="../transactiondesc.cpp" line="+34"/>
         <source>Open until %1</source>
         <translation>Open until %1</translation>
     </message>
@@ -3098,7 +3103,7 @@ Address: %4
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="+237"/>
+        <location filename="../transactiontablemodel.cpp" line="+235"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
@@ -3166,7 +3171,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+51"/>
+        <location line="+48"/>
         <source>Received with</source>
         <translation>Received with</translation>
     </message>
@@ -3191,12 +3196,17 @@ Address: %4
         <translation>Mined</translation>
     </message>
     <message>
-        <location line="+41"/>
+        <location line="+28"/>
+        <source>watch-only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+15"/>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
     </message>
     <message>
-        <location line="+193"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Transaction status. Hover over this field to show number of confirmations.</translation>
     </message>
@@ -3210,6 +3220,11 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>Type of transaction.</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Destination address of transaction.</source>
@@ -3224,7 +3239,7 @@ Address: %4
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+60"/>
+        <location filename="../transactionview.cpp" line="+67"/>
         <location line="+16"/>
         <source>All</source>
         <translation>All</translation>
@@ -3325,12 +3340,17 @@ Address: %4
         <translation>Show transaction details</translation>
     </message>
     <message>
-        <location line="+163"/>
+        <location line="+179"/>
         <source>Export Transaction History</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+19"/>
+        <location line="+12"/>
+        <source>Watch-only</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Exporting Failed</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3350,7 +3370,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-22"/>
+        <location line="-24"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma separated file (*.csv)</translation>
     </message>
@@ -3360,7 +3380,7 @@ Address: %4
         <translation>Confirmed</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
@@ -3398,7 +3418,7 @@ Address: %4
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+101"/>
+        <location filename="../bitcoingui.cpp" line="+103"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3465,7 +3485,7 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+249"/>
+        <location filename="../bitcoinstrings.cpp" line="+240"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
@@ -3495,22 +3515,22 @@ Address: %4
         <translation>Maintain at most &lt;n&gt; connections to peers (default: 125)</translation>
     </message>
     <message>
-        <location line="-62"/>
+        <location line="-53"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+103"/>
+        <location line="+94"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
         <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
     </message>
     <message>
-        <location line="-181"/>
+        <location line="-171"/>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
         <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
     </message>
@@ -3525,17 +3545,17 @@ Address: %4
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
     <message>
-        <location line="+99"/>
+        <location line="+90"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
     <message>
-        <location line="+36"/>
+        <location line="+35"/>
         <source>Use the test network</source>
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location line="-134"/>
+        <location line="-124"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
@@ -3756,6 +3776,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <location line="+2"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Error: Disk space is low!</source>
         <translation>Error: Disk space is low!</translation>
     </message>
@@ -3764,66 +3789,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: Wallet locked, unable to create transaction!</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Error: system error: </source>
-        <translation>Error: system error: </translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Failed to listen on any port. Use -listen=0 if you want this.</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to read block info</source>
-        <translation>Failed to read block info</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to read block</source>
-        <translation>Failed to read block</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to sync block index</source>
-        <translation>Failed to sync block index</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write block index</source>
-        <translation>Failed to write block index</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write block info</source>
-        <translation>Failed to write block info</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write block</source>
-        <translation>Failed to write block</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write file info</source>
-        <translation>Failed to write file info</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write to coin database</source>
-        <translation>Failed to write to coin database</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write transaction index</source>
-        <translation>Failed to write transaction index</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Failed to write undo data</source>
-        <translation>Failed to write undo data</translation>
-    </message>
     <message>
         <location line="+2"/>
         <source>Force safe mode (default: 0)</source>
@@ -3860,12 +3830,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+22"/>
         <source>Not enough file descriptors available.</source>
         <translation>Not enough file descriptors available.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Prepend debug output with timestamp (default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3905,7 +3880,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>This is intended for regression testing tools and app development.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3940,7 +3915,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-195"/>
+        <location line="-185"/>
         <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4080,12 +4055,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+3"/>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4129,6 +4104,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
@@ -4170,12 +4150,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Only accept block chain matching built-in checkpoints (default: 1)</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Print block on startup, if found in block index</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4255,12 +4230,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Specify connection timeout in milliseconds (default: 5000)</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>System error: </source>
-        <translation>System error: </translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+8"/>
         <source>This is experimental software.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4340,22 +4310,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>
     <message>
-        <location line="-64"/>
+        <location line="-63"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-164"/>
+        <location line="-155"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+210"/>
+        <location line="+200"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
     <message>
-        <location line="-27"/>
+        <location line="-26"/>
         <source>Set key pool size to &lt;n&gt; (default: 100)</source>
         <translation>Set key pool size to &lt;n&gt; (default: 100)</translation>
     </message>
@@ -4365,12 +4335,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Rescan the block chain for missing wallet transactions</translation>
     </message>
     <message>
-        <location line="+36"/>
+        <location line="+35"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Use OpenSSL (https) for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-31"/>
+        <location line="-30"/>
         <source>Server certificate file (default: server.cert)</source>
         <translation>Server certificate file (default: server.cert)</translation>
     </message>
@@ -4380,22 +4350,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Server private key (default: server.pem)</translation>
     </message>
     <message>
-        <location line="+19"/>
+        <location line="+18"/>
         <source>This help message</source>
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="-118"/>
+        <location line="-108"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location line="+68"/>
+        <location line="+59"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location line="-42"/>
+        <location line="-33"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
@@ -4405,7 +4375,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat</translation>
     </message>
     <message>
-        <location line="+33"/>
+        <location line="+23"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Invalid -proxy address: &apos;%s&apos;</translation>
     </message>
@@ -4415,7 +4385,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-112"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4425,7 +4395,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot resolve -externalip address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+56"/>
+        <location line="+46"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
@@ -4440,22 +4410,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Insufficient funds</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+14"/>
         <source>Loading block index...</source>
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location line="-70"/>
+        <location line="-61"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location line="+71"/>
+        <location line="+62"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="-66"/>
+        <location line="-57"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
@@ -4465,22 +4435,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location line="+86"/>
+        <location line="+77"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location line="-73"/>
+        <location line="-64"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+101"/>
+        <location line="+91"/>
         <source>To use the %s option</source>
         <translation>To use the %s option</translation>
     </message>
     <message>
-        <location line="-93"/>
+        <location line="-83"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>

From c9c51cba4e3e1905c154ecf9f6559ced7606dc75 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Thu, 2 Oct 2014 13:15:59 -0700
Subject: [PATCH 0825/1819] Make comptool more deterministic

---
 depends/packages/native_comparisontool.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
index 4c40f8b12302..3d430d4306a5 100644
--- a/depends/packages/native_comparisontool.mk
+++ b/depends/packages/native_comparisontool.mk
@@ -1,8 +1,8 @@
 package=native_comparisontool
-$(package)_version=5caed78
-$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/2d76ce92d68e6746988adde731318605a70e252c
+$(package)_version=0f7b5d8
+$(package)_download_path=https://github.com/TheBlueMatt/test-scripts/raw/38b490a2599d422b12d5ce8f165792f63fd8f54f
 $(package)_file_name=pull-tests-$($(package)_version).jar
-$(package)_sha256_hash=b55a98828b17060e327c5dabe5e4631898f422c0cba07c46170930a9eaf5e7c0
+$(package)_sha256_hash=ecd43b988a8b673b483e4f69f931596360a5e90fc415c75c4c259faa690df198
 $(package)_install_dirname=BitcoindComparisonTool_jar
 $(package)_install_filename=BitcoindComparisonTool.jar
 

From ccca27a788fe1ae13661308243c20a1d7a3d0074 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 26 Jul 2014 21:05:11 +0200
Subject: [PATCH 0826/1819] [Wallet] Watch-only fixes

---
 src/keystore.cpp             |  7 +++++++
 src/keystore.h               |  2 ++
 src/qt/transactionrecord.cpp |  2 +-
 src/qt/walletmodel.cpp       |  3 ++-
 src/rpcdump.cpp              |  5 ++---
 src/rpcwallet.cpp            |  2 +-
 src/wallet.cpp               | 21 +++++++++++++++++++++
 src/wallet.h                 | 34 +++++++++++++++++++++++++++-------
 src/walletdb.cpp             |  6 ++++++
 src/walletdb.h               |  1 +
 10 files changed, 70 insertions(+), 13 deletions(-)

diff --git a/src/keystore.cpp b/src/keystore.cpp
index 98bc0e9e28b4..755defa26de9 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -67,6 +67,13 @@ bool CBasicKeyStore::AddWatchOnly(const CScript &dest)
     return true;
 }
 
+bool CBasicKeyStore::RemoveWatchOnly(const CScript &dest)
+{
+    LOCK(cs_KeyStore);
+    setWatchOnly.erase(dest);
+    return true;
+}
+
 bool CBasicKeyStore::HaveWatchOnly(const CScript &dest) const
 {
     LOCK(cs_KeyStore);
diff --git a/src/keystore.h b/src/keystore.h
index 3b49e282d960..d3478f7672ae 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -40,6 +40,7 @@ class CKeyStore
 
     // Support for Watch-only addresses
     virtual bool AddWatchOnly(const CScript &dest) =0;
+    virtual bool RemoveWatchOnly(const CScript &dest) =0;
     virtual bool HaveWatchOnly(const CScript &dest) const =0;
     virtual bool HaveWatchOnly() const =0;
 };
@@ -98,6 +99,7 @@ class CBasicKeyStore : public CKeyStore
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const;
 
     virtual bool AddWatchOnly(const CScript &dest);
+    virtual bool RemoveWatchOnly(const CScript &dest);
     virtual bool HaveWatchOnly(const CScript &dest) const;
     virtual bool HaveWatchOnly() const;
 };
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index afb343f349ea..5278c8673a2c 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -32,7 +32,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
 {
     QList<TransactionRecord> parts;
     int64_t nTime = wtx.GetTxTime();
-    CAmount nCredit = wtx.GetCredit(true);
+    CAmount nCredit = wtx.GetCredit(ISMINE_ALL);
     CAmount nDebit = wtx.GetDebit(ISMINE_ALL);
     CAmount nNet = nCredit - nDebit;
     uint256 hash = wtx.GetHash();
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index b8701a23a651..b4733d369ea3 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -605,7 +605,8 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
         int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
         if (nDepth < 0) continue;
         COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true);
-        vCoins.push_back(out);
+        if (outpoint.n < out.tx->vout.size() && wallet->IsMine(out.tx->vout[outpoint.n]) == ISMINE_SPENDABLE)
+            vCoins.push_back(out);
     }
 
     BOOST_FOREACH(const COutput& out, vCoins)
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 1ac7024550c6..9da0a7d091b3 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -114,8 +114,6 @@ Value importprivkey(const Array& params, bool fHelp)
     CPubKey pubkey = key.GetPubKey();
     CKeyID vchAddress = pubkey.GetID();
     {
-        LOCK2(cs_main, pwalletMain->cs_wallet);
-
         pwalletMain->MarkDirty();
         pwalletMain->SetAddressBook(vchAddress, strLabel, "receive");
 
@@ -181,7 +179,8 @@ Value importaddress(const Array& params, bool fHelp)
         fRescan = params[2].get_bool();
 
     {
-        LOCK2(cs_main, pwalletMain->cs_wallet);
+        if (::IsMine(*pwalletMain, script) == ISMINE_SPENDABLE)
+            throw JSONRPCError(RPC_WALLET_ERROR, "The wallet already contains the private key for this address or script");
 
         // add to address book or update label
         if (address.IsValid())
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index d7c0c0ef5c85..d11455e389aa 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1539,7 +1539,7 @@ Value gettransaction(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid or non-wallet transaction id");
     const CWalletTx& wtx = pwalletMain->mapWallet[hash];
 
-    CAmount nCredit = wtx.GetCredit(filter != 0);
+    CAmount nCredit = wtx.GetCredit(filter);
     CAmount nDebit = wtx.GetDebit(filter);
     CAmount nNet = nCredit - nDebit;
     CAmount nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index b20b0007ce28..1653084495e4 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -87,6 +87,13 @@ bool CWallet::AddKeyPubKey(const CKey& secret, const CPubKey &pubkey)
     AssertLockHeld(cs_wallet); // mapKeyMetadata
     if (!CCryptoKeyStore::AddKeyPubKey(secret, pubkey))
         return false;
+
+    // check if we need to remove from watch-only
+    CScript script;
+    script = GetScriptForDestination(pubkey.GetID());
+    if (HaveWatchOnly(script))
+        RemoveWatchOnly(script);
+
     if (!fFileBacked)
         return true;
     if (!IsCrypted()) {
@@ -169,6 +176,20 @@ bool CWallet::AddWatchOnly(const CScript &dest)
     return CWalletDB(strWalletFile).WriteWatchOnly(dest);
 }
 
+bool CWallet::RemoveWatchOnly(const CScript &dest)
+{
+    AssertLockHeld(cs_wallet);
+    if (!CCryptoKeyStore::RemoveWatchOnly(dest))
+        return false;
+    if (!HaveWatchOnly())
+        NotifyWatchonlyChanged(false);
+    if (fFileBacked)
+        if (!CWalletDB(strWalletFile).EraseWatchOnly(dest))
+            return false;
+
+    return true;
+}
+
 bool CWallet::LoadWatchOnly(const CScript &dest)
 {
     return CCryptoKeyStore::AddWatchOnly(dest);
diff --git a/src/wallet.h b/src/wallet.h
index f3fffb22532f..1ccc29d3c8fb 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -222,6 +222,7 @@ class CWallet : public CCryptoKeyStore, public CWalletInterface
 
     // Adds a watch-only address to the store, and saves it to disk.
     bool AddWatchOnly(const CScript &dest);
+    bool RemoveWatchOnly(const CScript &dest);
     // Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
     bool LoadWatchOnly(const CScript &dest);
 
@@ -701,18 +702,37 @@ class CWalletTx : public CMerkleTx
         return debit;
     }
 
-    CAmount GetCredit(bool fUseCache=true) const
+    CAmount GetCredit(const isminefilter& filter) const
     {
         // Must wait until coinbase is safely deep enough in the chain before valuing it
         if (IsCoinBase() && GetBlocksToMaturity() > 0)
             return 0;
 
-        // GetBalance can assume transactions in mapWallet won't change
-        if (fUseCache && fCreditCached)
-            return nCreditCached;
-        nCreditCached = pwallet->GetCredit(*this, ISMINE_ALL);
-        fCreditCached = true;
-        return nCreditCached;
+        int64_t credit = 0;
+        if (filter & ISMINE_SPENDABLE)
+        {
+            // GetBalance can assume transactions in mapWallet won't change
+            if (fCreditCached)
+                credit += nCreditCached;
+            else
+            {
+                nCreditCached = pwallet->GetCredit(*this, ISMINE_SPENDABLE);
+                fCreditCached = true;
+                credit += nCreditCached;
+            }
+        }
+        if (filter & ISMINE_WATCH_ONLY)
+        {
+            if (fWatchCreditCached)
+                credit += nWatchCreditCached;
+            else
+            {
+                nWatchCreditCached = pwallet->GetCredit(*this, ISMINE_WATCH_ONLY);
+                fWatchCreditCached = true;
+                credit += nWatchCreditCached;
+            }
+        }
+        return credit;
     }
 
     CAmount GetImmatureCredit(bool fUseCache=true) const
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 3e5a664a5d8e..a851db65cd86 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -121,6 +121,12 @@ bool CWalletDB::WriteWatchOnly(const CScript &dest)
     return Write(std::make_pair(std::string("watchs"), dest), '1');
 }
 
+bool CWalletDB::EraseWatchOnly(const CScript &dest)
+{
+    nWalletDBUpdated++;
+    return Erase(std::make_pair(std::string("watchs"), dest));
+}
+
 bool CWalletDB::WriteBestBlock(const CBlockLocator& locator)
 {
     nWalletDBUpdated++;
diff --git a/src/walletdb.h b/src/walletdb.h
index f3d6e61f8bc7..7ff41c7c8d47 100644
--- a/src/walletdb.h
+++ b/src/walletdb.h
@@ -96,6 +96,7 @@ class CWalletDB : public CDB
     bool WriteCScript(const uint160& hash, const CScript& redeemScript);
 
     bool WriteWatchOnly(const CScript &script);
+    bool EraseWatchOnly(const CScript &script);
 
     bool WriteBestBlock(const CBlockLocator& locator);
     bool ReadBestBlock(CBlockLocator& locator);

From d6b0539f452527d340c6d7e6c57652147214196d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 3 Oct 2014 17:34:34 -0400
Subject: [PATCH 0827/1819] travis: add non-default shell testing to travis.

---
 .travis.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index eae07ead8e56..89b2238655fc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,7 +31,7 @@ matrix:
     - compiler: "true 3"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: "true 4"
-      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
+      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
     - compiler: "true 5"
       env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
     - compiler: "true 6"
@@ -48,11 +48,12 @@ before_script:
     - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
     - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS || (echo "Build failure. Verbose build follows." && make -C depends V=1 HOST=$HOST $DEP_OPTS)
 script:
+    - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
     - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
     - BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
     - depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
     - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
-    - ./autogen.sh
+    - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
     - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make distdir PACKAGE=bitcoin VERSION=$HOST
     - cd bitcoin-$HOST

From b77b4eda8db4e7ebd7762d8543c713c15b207e90 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 3 Oct 2014 18:58:59 +0000
Subject: [PATCH 0828/1819] Bugfix: Replace bashisms with standard sh to fix
 build on non-BASH systems

---
 autogen.sh                 |  3 ++-
 build-aux/m4/bitcoin_qt.m4 | 32 ++++++++++++++++----------------
 configure.ac               | 34 ++++++++++++++++++----------------
 3 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index ddfc09607e16..3e26a183059c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,6 +3,7 @@ set -e
 srcdir="$(dirname $0)"
 cd "$srcdir"
 if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
-  export LIBTOOLIZE="${GLIBTOOLIZE}"
+  LIBTOOLIZE="${GLIBTOOLIZE}"
+  export LIBTOOLIZE
 fi
 autoreconf --install --force --warnings=all
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index 71b1484894ca..2a72262653f1 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -84,7 +84,7 @@ dnl Outputs: bitcoin_enable_qt, bitcoin_enable_qt_dbus, bitcoin_enable_qt_test
 AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   use_pkgconfig=$1
 
-  if test x$use_pkgconfig == x; then
+  if test x$use_pkgconfig = x; then
     use_pkgconfig=yes
   fi
 
@@ -106,9 +106,9 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
   BITCOIN_QT_CHECK([
   TEMP_CPPFLAGS=$CPPFLAGS
   CPPFLAGS=$QT_INCLUDES
-  if test x$bitcoin_qt_got_major_vers == x5; then
+  if test x$bitcoin_qt_got_major_vers = x5; then
     _BITCOIN_QT_IS_STATIC
-    if test x$bitcoin_cv_static_qt == xyes; then
+    if test x$bitcoin_cv_static_qt = xyes; then
       AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
       if test x$qt_plugin_path != x; then
         QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
@@ -118,14 +118,14 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
         PKG_CHECK_MODULES([QTPLATFORM], [Qt5PlatformSupport], [QT_LIBS="$QTPLATFORM_LIBS $QT_LIBS"])
       fi
       _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(AccessibleFactory)], [-lqtaccessiblewidgets])
-      if test x$TARGET_OS == xwindows; then
+      if test x$TARGET_OS = xwindows; then
         _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin)],[-lqwindows])
         AC_DEFINE(QT_QPA_PLATFORM_WINDOWS, 1, [Define this symbol if the qt platform is windows])
-      elif test x$TARGET_OS == xlinux; then
+      elif test x$TARGET_OS = xlinux; then
         PKG_CHECK_MODULES([X11XCB], [x11-xcb], [QT_LIBS="$X11XCB_LIBS $QT_LIBS"])
         _BITCOIN_QT_CHECK_STATIC_PLUGINS([Q_IMPORT_PLUGIN(QXcbIntegrationPlugin)],[-lqxcb -lxcb-static])
         AC_DEFINE(QT_QPA_PLATFORM_XCB, 1, [Define this symbol if the qt platform is xcb])
-      elif test x$TARGET_OS == xdarwin; then
+      elif test x$TARGET_OS = xdarwin; then
         if test x$use_pkgconfig = xyes; then
           PKG_CHECK_MODULES([QTPRINT], [Qt5PrintSupport], [QT_LIBS="$QTPRINT_LIBS $QT_LIBS"])
         fi
@@ -135,7 +135,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
       fi
     fi
   else
-    if test x$TARGET_OS == xwindows; then
+    if test x$TARGET_OS = xwindows; then
       AC_DEFINE(QT_STATICPLUGIN, 1, [Define this symbol if qt plugins are static])
       if test x$qt_plugin_path != x; then
         QT_LIBS="$QT_LIBS -L$qt_plugin_path/accessible"
@@ -196,7 +196,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
     if test x$use_dbus = xyes && test x$have_qt_dbus = xno; then
       AC_MSG_ERROR("libQtDBus not found. Install libQtDBus or remove --with-qtdbus.")
     fi
-    if test x$LUPDATE == x; then
+    if test x$LUPDATE = x; then
       AC_MSG_WARN("lupdate is required to update qt translations")
     fi
   ],[
@@ -291,10 +291,10 @@ dnl Outputs: have_qt_test and have_qt_dbus are set (if applicable) to yes|no.
 AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
   m4_ifdef([PKG_CHECK_MODULES],[
   auto_priority_version=$1
-  if test x$auto_priority_version == x; then
+  if test x$auto_priority_version = x; then
     auto_priority_version=qt5
   fi
-    if test x$bitcoin_qt_want_version == xqt5 ||  ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt5 ); then
+    if test x$bitcoin_qt_want_version = xqt5 ||  ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
       QT_LIB_PREFIX=Qt5
       bitcoin_qt_got_major_vers=5
     else
@@ -304,14 +304,14 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITH_PKGCONFIG],[
     qt5_modules="Qt5Core Qt5Gui Qt5Network Qt5Widgets"
     qt4_modules="QtCore QtGui QtNetwork"
     BITCOIN_QT_CHECK([
-      if test x$bitcoin_qt_want_version == xqt5 || ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt5 ); then
+      if test x$bitcoin_qt_want_version = xqt5 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt5 ); then
         PKG_CHECK_MODULES([QT], [$qt5_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes],[have_qt=no])
-      elif test x$bitcoin_qt_want_version == xqt4 || ( test x$bitcoin_qt_want_version == xauto && test x$auto_priority_version == xqt4 ); then
+      elif test x$bitcoin_qt_want_version = xqt4 || ( test x$bitcoin_qt_want_version = xauto && test x$auto_priority_version = xqt4 ); then
         PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes], [have_qt=no])
       fi
 
       dnl qt version is set to 'auto' and the preferred version wasn't found. Now try the other.
-      if test x$have_qt == xno && test x$bitcoin_qt_want_version == xauto; then
+      if test x$have_qt = xno && test x$bitcoin_qt_want_version = xauto; then
         if test x$auto_priority_version = x$qt5; then
           PKG_CHECK_MODULES([QT], [$qt4_modules], [QT_INCLUDES="$QT_CFLAGS"; have_qt=yes; QT_LIB_PREFIX=Qt; bitcoin_qt_got_major_vers=4], [have_qt=no])
         else
@@ -358,7 +358,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
     if test x$bitcoin_qt_want_version = xauto; then
       _BITCOIN_QT_CHECK_QT5
     fi
-    if test x$bitcoin_cv_qt5 == xyes || test x$bitcoin_qt_want_version = xqt5; then
+    if test x$bitcoin_cv_qt5 = xyes || test x$bitcoin_qt_want_version = xqt5; then
       QT_LIB_PREFIX=Qt5
       bitcoin_qt_got_major_vers=5
     else
@@ -373,7 +373,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
       LIBS="$LIBS -L$qt_lib_path"
     fi
 
-    if test x$TARGET_OS == xwindows; then
+    if test x$TARGET_OS = xwindows; then
       AC_CHECK_LIB([imm32],      [main],, BITCOIN_QT_FAIL(libimm32 not found))
     fi
   ])
@@ -385,7 +385,7 @@ AC_DEFUN([_BITCOIN_QT_FIND_LIBS_WITHOUT_PKGCONFIG],[
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Core]   ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXCore not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Gui]    ,[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXGui not found)))
   BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Network],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXNetwork not found)))
-  if test x$bitcoin_qt_got_major_vers == x5; then
+  if test x$bitcoin_qt_got_major_vers = x5; then
     BITCOIN_QT_CHECK(AC_CHECK_LIB([${QT_LIB_PREFIX}Widgets],[main],,BITCOIN_QT_FAIL(lib$QT_LIB_PREFIXWidgets not found)))
   fi
   QT_LIBS="$LIBS"
diff --git a/configure.ac b/configure.ac
index abf9f39e65f0..0bd309a3a843 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,14 +250,16 @@ case $host in
          bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null`
          qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
          if test x$openssl_prefix != x; then
-           export PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           export PKG_CONFIG_PATH
          fi
          if test x$bdb_prefix != x; then
            CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
            LIBS="$LIBS -L$bdb_prefix/lib"
          fi
          if test x$qt5_prefix != x; then
-           export PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           export PKG_CONFIG_PATH
          fi
        fi
      else
@@ -287,7 +289,7 @@ if test x$use_comparison_tool != xno; then
 fi
 
 if test x$use_comparison_tool_reorg_tests != xno; then
-  if test x$use_comparison_tool == x; then
+  if test x$use_comparison_tool = x; then
     AC_MSG_ERROR("comparison tool reorg tests but comparison tool was not specified")
   fi
   AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 1)
@@ -295,20 +297,20 @@ else
   AC_SUBST(COMPARISON_TOOL_REORG_TESTS, 0)
 fi
 
-if test x$use_lcov == xyes; then
-  if test x$LCOV == x; then
+if test x$use_lcov = xyes; then
+  if test x$LCOV = x; then
     AC_MSG_ERROR("lcov testing requested but lcov not found")
   fi
-  if test x$GCOV == x; then
+  if test x$GCOV = x; then
     AC_MSG_ERROR("lcov testing requested but gcov not found")
   fi
-  if test x$JAVA == x; then
+  if test x$JAVA = x; then
     AC_MSG_ERROR("lcov testing requested but java not found")
   fi
-  if test x$GENHTML == x; then
+  if test x$GENHTML = x; then
     AC_MSG_ERROR("lcov testing requested but genhtml not found")
   fi
-  if test x$use_comparison_tool == x; then
+  if test x$use_comparison_tool = x; then
     AC_MSG_ERROR("lcov testing requested but comparison tool was not specified")
   fi
   LCOV="$LCOV --gcov-tool=$GCOV"
@@ -607,7 +609,7 @@ BITCOIN_QT_INIT
 
 if test x$use_pkgconfig = xyes; then
 
-  if test x"$PKG_CONFIG" == "x"; then
+  if test x"$PKG_CONFIG" = "x"; then
     AC_MSG_ERROR(pkg-config not found.)
   fi
 
@@ -721,7 +723,7 @@ if test x$bitcoin_enable_qt != xno; then
   dnl enable qr support
   AC_MSG_CHECKING([whether to build GUI with support for QR codes])
   if test x$have_qrencode = xno; then
-    if test x$use_qr == xyes; then
+    if test x$use_qr = xyes; then
      AC_MSG_ERROR("QR support requested but cannot be built. use --without-qrencode")
     fi
     AC_MSG_RESULT(no)
@@ -735,7 +737,7 @@ if test x$bitcoin_enable_qt != xno; then
     fi
   fi
 
-  if test x$XGETTEXT == x; then
+  if test x$XGETTEXT = x; then
     AC_MSG_WARN("xgettext is required to update qt translations")
   fi
 
@@ -770,12 +772,12 @@ fi
 AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
 AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
 AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
-AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet == xyes])
-AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests == xyes])
-AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt == xyes])
+AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
+AM_CONDITIONAL([ENABLE_TESTS],[test x$use_tests = xyes])
+AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
 AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$use_tests$bitcoin_enable_qt_test = xyesyes])
 AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
-AM_CONDITIONAL([USE_LCOV],[test x$use_lcov == xyes])
+AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
 AM_CONDITIONAL([USE_COMPARISON_TOOL],[test x$use_comparison_tool != xno])
 AM_CONDITIONAL([USE_COMPARISON_TOOL_REORG_TESTS],[test x$use_comparison_tool_reorg_test != xno])
 AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])

From ab72068565e4417799843d2445da39d9e98efffd Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 3 Oct 2014 18:58:59 +0000
Subject: [PATCH 0829/1819] Bugfix: Replace bashisms with standard sh in gitian
 descriptors

---
 contrib/gitian-descriptors/boost-win.yml    | 2 +-
 contrib/gitian-descriptors/deps-win.yml     | 4 ++--
 contrib/gitian-descriptors/gitian-win.yml   | 4 ++--
 contrib/gitian-descriptors/protobuf-win.yml | 2 +-
 contrib/gitian-descriptors/qt-linux.yml     | 4 ++--
 contrib/gitian-descriptors/qt-win.yml       | 2 +-
 depends/config.site.in                      | 4 ++--
 7 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/contrib/gitian-descriptors/boost-win.yml b/contrib/gitian-descriptors/boost-win.yml
index db5d6bab1d92..347952e3a663 100644
--- a/contrib/gitian-descriptors/boost-win.yml
+++ b/contrib/gitian-descriptors/boost-win.yml
@@ -29,7 +29,7 @@ script: |
     #
     INSTALLPREFIX=$HOME/staging${BITS}
     BUILDDIR=$HOME/build${BITS}
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       HOST=i686-w64-mingw32
     else
       HOST=x86_64-w64-mingw32
diff --git a/contrib/gitian-descriptors/deps-win.yml b/contrib/gitian-descriptors/deps-win.yml
index fabc2949ebb3..fe02950ef9c0 100644
--- a/contrib/gitian-descriptors/deps-win.yml
+++ b/contrib/gitian-descriptors/deps-win.yml
@@ -39,7 +39,7 @@ script: |
     #
     INSTALLPREFIX=$HOME/staging${BITS}
     BUILDDIR=$HOME/build${BITS}
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       HOST=i686-w64-mingw32
     else
       HOST=x86_64-w64-mingw32
@@ -50,7 +50,7 @@ script: |
     #
     tar xzf $INDIR/openssl-1.0.1h.tar.gz
     cd openssl-1.0.1h
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       OPENSSL_TGT=mingw
     else
       OPENSSL_TGT=mingw64
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 245f15ccab87..b2795c537694 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -50,7 +50,7 @@ script: |
     STAGING=$HOME/staging${BITS}
     BUILDDIR=$HOME/build${BITS}
     BINDIR=$OUTDIR/$BITS
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       HOST=i686-w64-mingw32
     else
       HOST=x86_64-w64-mingw32
@@ -63,7 +63,7 @@ script: |
     unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip
     unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
     unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip
-    if [ "$NEEDDIST" == "1" ]; then
+    if [ "x$NEEDDIST" = "x1" ]; then
       # Make source code archive which is architecture independent so it only needs to be done once
       cd $HOME/build/bitcoin
       ./autogen.sh
diff --git a/contrib/gitian-descriptors/protobuf-win.yml b/contrib/gitian-descriptors/protobuf-win.yml
index d2fdcaa7f20e..1b7af08843df 100644
--- a/contrib/gitian-descriptors/protobuf-win.yml
+++ b/contrib/gitian-descriptors/protobuf-win.yml
@@ -26,7 +26,7 @@ script: |
     #
     INSTALLPREFIX=$HOME/staging${BITS}
     BUILDDIR=$HOME/build${BITS}
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       HOST=i686-w64-mingw32
     else
       HOST=x86_64-w64-mingw32
diff --git a/contrib/gitian-descriptors/qt-linux.yml b/contrib/gitian-descriptors/qt-linux.yml
index b163b4bb8c1f..fd86b4df1dce 100644
--- a/contrib/gitian-descriptors/qt-linux.yml
+++ b/contrib/gitian-descriptors/qt-linux.yml
@@ -18,7 +18,7 @@ files:
 script: |
   export FAKETIME=$REFERENCE_DATETIME
   export TZ=UTC
-  if [ "$GBUILD_BITS" == "32" ]; then
+  if [ "x$GBUILD_BITS" = "x32" ]; then
     ARCH='i386-linux-gnu'
   else
     ARCH='x86_64-linux-gnu'
@@ -74,7 +74,7 @@ script: |
   #endif
   ' > $QCONFIG
 
-  if [ "$GBUILD_BITS" == "32" ]; then
+  if [ "x$GBUILD_BITS" = "x32" ]; then
     echo '
   /* Machine byte-order */
   #define Q_BIG_ENDIAN 4321
diff --git a/contrib/gitian-descriptors/qt-win.yml b/contrib/gitian-descriptors/qt-win.yml
index 7000c7005118..57bc4c318049 100644
--- a/contrib/gitian-descriptors/qt-win.yml
+++ b/contrib/gitian-descriptors/qt-win.yml
@@ -38,7 +38,7 @@ script: |
     INSTALLPREFIX=$HOME/staging${BITS}
     BUILDDIR=$HOME/build${BITS}
     DEPSDIR=$HOME/deps${BITS}
-    if [ "$BITS" == "32" ]; then
+    if [ "x$BITS" = "x32" ]; then
       HOST=i686-w64-mingw32
     else
       HOST=x86_64-w64-mingw32
diff --git a/depends/config.site.in b/depends/config.site.in
index 3426050cd3e8..df076956bd3e 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -34,12 +34,12 @@ if test -z $with_gui && test -n "@no_qt@"; then
   with_gui=no
 fi
 
-if test @host_os@ == darwin; then
+if test x@host_os@ = xdarwin; then
   BREW=no
   PORT=no
 fi
 
-if test @host_os@ == mingw32; then
+if test x@host_os@ = xmingw32; then
   if test -z $with_qt_incdir; then
     with_qt_incdir=$prefix/include
   fi

From 0b17964131c78daa6a3ee01c41f47a43ee2e1947 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 3 Oct 2014 18:58:59 +0000
Subject: [PATCH 0830/1819] Bugfix: Replace bashisms with standard sh in
 tests/tools

---
 contrib/devtools/github-merge.sh | 26 +++++++++++++-------------
 qa/rpc-tests/send.sh             |  2 +-
 qa/rpc-tests/walletbackup.sh     |  2 +-
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
index 3217a0619502..a83a2a59be30 100755
--- a/contrib/devtools/github-merge.sh
+++ b/contrib/devtools/github-merge.sh
@@ -13,7 +13,7 @@
 # name $BRANCH is overwritten with the merged result, and optionally pushed.
 
 REPO="$(git config --get githubmerge.repository)"
-if [[ "d$REPO" == "d" ]]; then
+if [ "d$REPO" = "d" ]; then
   echo "ERROR: No repository configured. Use this command to set:" >&2
   echo "git config githubmerge.repository <owner>/<repo>" >&2
   echo "In addition, you can set the following variables:" >&2
@@ -24,12 +24,12 @@ if [[ "d$REPO" == "d" ]]; then
 fi
 
 HOST="$(git config --get githubmerge.host)"
-if [[ "d$HOST" == "d" ]]; then
+if [ "d$HOST" = "d" ]; then
   HOST="git@github.com"
 fi
 
 BRANCH="$(git config --get githubmerge.branch)"
-if [[ "d$BRANCH" == "d" ]]; then
+if [ "d$BRANCH" = "d" ]; then
   BRANCH="master"
 fi
 
@@ -37,12 +37,12 @@ TESTCMD="$(git config --get githubmerge.testcmd)"
 
 PULL="$1"
 
-if [[ "d$PULL" == "d" ]]; then
+if [ "d$PULL" = "d" ]; then
   echo "Usage: $0 pullnumber [branch]" >&2
   exit 2
 fi
 
-if [[ "d$2" != "d" ]]; then
+if [ "d$2" != "d" ]; then
   BRANCH="$2"
 fi
 
@@ -101,7 +101,7 @@ else
 fi
 
 # Run test command if configured.
-if [[ "d$TESTCMD" != "d" ]]; then
+if [ "d$TESTCMD" != "d" ]; then
   # Go up to the repository's root.
   while [ ! -d .git ]; do cd ..; done
   if ! $TESTCMD; then
@@ -112,10 +112,10 @@ if [[ "d$TESTCMD" != "d" ]]; then
   # Show the created merge.
   git diff pull/"$PULL"/merge..pull/"$PULL"/local-merge >"$TMPDIR"/diff
   git diff pull/"$PULL"/base..pull/"$PULL"/local-merge
-  if [[ "$(<"$TMPDIR"/diff)" != "" ]]; then
+  if [ "$(<"$TMPDIR"/diff)" != "" ]; then
     echo "WARNING: merge differs from github!" >&2
     read -p "Type 'ignore' to continue. " -r >&2
-    if [[ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]]; then
+    if [ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]; then
       echo "Difference with github ignored." >&2
     else
       cleanup
@@ -124,7 +124,7 @@ if [[ "d$TESTCMD" != "d" ]]; then
   fi
   read -p "Press 'd' to accept the diff. " -n 1 -r >&2
   echo
-  if [[ "d$REPLY" =~ ^d[dD]$ ]]; then
+  if [ "d$REPLY" =~ ^d[dD]$ ]; then
     echo "Diff accepted." >&2
   else
     echo "ERROR: Diff rejected." >&2
@@ -139,7 +139,7 @@ else
   bash -i
   read -p "Press 'm' to accept the merge. " -n 1 -r >&2
   echo
-  if [[ "d$REPLY" =~ ^d[Mm]$ ]]; then
+  if [ "d$REPLY" =~ ^d[Mm]$ ]; then
     echo "Merge accepted." >&2
   else
     echo "ERROR: Merge rejected." >&2
@@ -151,8 +151,8 @@ fi
 # Sign the merge commit.
 read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
 echo
-if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then
-  if [[ "$(git config --get user.signingkey)" == "" ]]; then
+if [ "d$REPLY" =~ ^d[Ss]$ ]; then
+  if [ "$(git config --get user.signingkey)" = "" ]; then
     echo "WARNING: No GPG signing key set, not signing. Set one using:" >&2
     echo "git config --global user.signingkey <key>" >&2
     git commit -q --signoff --amend --no-edit
@@ -168,6 +168,6 @@ cleanup
 
 # Push the result.
 read -p "Type 'push' to push the result to $HOST:$REPO, branch $BRANCH. " -r >&2
-if [[ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]]; then
+if [ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]; then
   git push "$HOST":"$REPO" refs/heads/"$BRANCH"
 fi
diff --git a/qa/rpc-tests/send.sh b/qa/rpc-tests/send.sh
index bfbf791d07dd..8c0f114590cf 100755
--- a/qa/rpc-tests/send.sh
+++ b/qa/rpc-tests/send.sh
@@ -14,7 +14,7 @@ if [ $# -eq 0 ]; then
   exit 0
 fi
 
-if [ $1 == "-STOP" ]; then
+if [ $1 = "-STOP" ]; then
   if [ -s ${PIDFILE} ]; then
       kill -s ${SIGNAL} $(<${PIDFILE})
   fi
diff --git a/qa/rpc-tests/walletbackup.sh b/qa/rpc-tests/walletbackup.sh
index 7444670980c1..b88d5920f7a9 100755
--- a/qa/rpc-tests/walletbackup.sh
+++ b/qa/rpc-tests/walletbackup.sh
@@ -149,7 +149,7 @@ echo "Creating transactions..."
 
 function S {
   TXID=$( $CLI -datadir=${D}/node${1} sendtoaddress ${2} "${3}" 0 )
-  if [[ $TXID == "" ]] ; then
+  if [ x$TXID = x ] ; then
       echoerr "node${1}: error sending ${3} btc"
       echo -n "node${1} balance: "
       $CLI -datadir=${D}/node${1} getbalance "*" 0

From 1f9be984db13e9bed98d2aadb8f0577a2057f7cc Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 4 Oct 2014 19:34:15 +0800
Subject: [PATCH 0831/1819] Disable App Nap on OSX 10.9+

---
 share/qt/Info.plist.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in
index e79e59a568fe..dd6edde8d285 100644
--- a/share/qt/Info.plist.in
+++ b/share/qt/Info.plist.in
@@ -91,6 +91,9 @@
   <key>NSHighResolutionCapable</key>
     <string>True</string>
 
+  <key>LSAppNapIsDisabled</key>
+    <string>True</string>
+  
   <key>LSApplicationCategoryType</key>
     <string>public.app-category.finance</string>
 </dict>

From ed6d1a2c7be9d046d5e78330d5e163023a6b302a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 25 Sep 2014 08:21:21 +0200
Subject: [PATCH 0832/1819] Keep information about all block files in memory

---
 src/main.cpp | 76 +++++++++++++++++++++++++++-------------------------
 1 file changed, 39 insertions(+), 37 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 44ac232aadec..9cf3afef7d90 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -108,7 +108,7 @@ namespace {
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
 
     CCriticalSection cs_LastBlockFile;
-    CBlockFileInfo infoLastBlockFile;
+    std::vector<CBlockFileInfo> vinfoBlockFile;
     int nLastBlockFile = 0;
 
     // Every received block is assigned a unique and increasing identifier, so we
@@ -1522,7 +1522,7 @@ void static FlushBlockFile(bool fFinalize = false)
     FILE *fileOld = OpenBlockFile(posOld);
     if (fileOld) {
         if (fFinalize)
-            TruncateFile(fileOld, infoLastBlockFile.nSize);
+            TruncateFile(fileOld, vinfoBlockFile[nLastBlockFile].nSize);
         FileCommit(fileOld);
         fclose(fileOld);
     }
@@ -1530,7 +1530,7 @@ void static FlushBlockFile(bool fFinalize = false)
     fileOld = OpenUndoFile(posOld);
     if (fileOld) {
         if (fFinalize)
-            TruncateFile(fileOld, infoLastBlockFile.nUndoSize);
+            TruncateFile(fileOld, vinfoBlockFile[nLastBlockFile].nUndoSize);
         FileCommit(fileOld);
         fclose(fileOld);
     }
@@ -2107,32 +2107,32 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
 
     LOCK(cs_LastBlockFile);
 
-    if (fKnown) {
-        if (nLastBlockFile != pos.nFile) {
-            nLastBlockFile = pos.nFile;
-            infoLastBlockFile.SetNull();
-            pblocktree->ReadBlockFileInfo(nLastBlockFile, infoLastBlockFile);
-            fUpdatedLast = true;
-        }
-    } else {
-        while (infoLastBlockFile.nSize + nAddSize >= MAX_BLOCKFILE_SIZE) {
-            LogPrintf("Leaving block file %i: %s\n", nLastBlockFile, infoLastBlockFile.ToString());
+    unsigned int nFile = fKnown ? pos.nFile : nLastBlockFile;
+    if (vinfoBlockFile.size() <= nFile) {
+        vinfoBlockFile.resize(nFile + 1);
+    }
+
+    if (!fKnown) {
+        while (vinfoBlockFile[nFile].nSize + nAddSize >= MAX_BLOCKFILE_SIZE) {
+            LogPrintf("Leaving block file %i: %s\n", nFile, vinfoBlockFile[nFile].ToString());
             FlushBlockFile(true);
-            nLastBlockFile++;
-            infoLastBlockFile.SetNull();
-            pblocktree->ReadBlockFileInfo(nLastBlockFile, infoLastBlockFile); // check whether data for the new file somehow already exist; can fail just fine
+            nFile++;
+            if (vinfoBlockFile.size() <= nFile) {
+                vinfoBlockFile.resize(nFile + 1);
+            }
             fUpdatedLast = true;
         }
-        pos.nFile = nLastBlockFile;
-        pos.nPos = infoLastBlockFile.nSize;
+        pos.nFile = nFile;
+        pos.nPos = vinfoBlockFile[nFile].nSize;
     }
 
-    infoLastBlockFile.nSize += nAddSize;
-    infoLastBlockFile.AddBlock(nHeight, nTime);
+    nLastBlockFile = nFile;
+    vinfoBlockFile[nFile].nSize += nAddSize;
+    vinfoBlockFile[nFile].AddBlock(nHeight, nTime);
 
     if (!fKnown) {
         unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;
-        unsigned int nNewChunks = (infoLastBlockFile.nSize + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;
+        unsigned int nNewChunks = (vinfoBlockFile[nFile].nSize + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;
         if (nNewChunks > nOldChunks) {
             if (CheckDiskSpace(nNewChunks * BLOCKFILE_CHUNK_SIZE - pos.nPos)) {
                 FILE *file = OpenBlockFile(pos);
@@ -2147,7 +2147,7 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
         }
     }
 
-    if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, infoLastBlockFile))
+    if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, vinfoBlockFile[nFile]))
         return state.Abort("Failed to write file info");
     if (fUpdatedLast)
         pblocktree->WriteLastBlockFile(nLastBlockFile);
@@ -2162,19 +2162,10 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
     LOCK(cs_LastBlockFile);
 
     unsigned int nNewSize;
-    if (nFile == nLastBlockFile) {
-        pos.nPos = infoLastBlockFile.nUndoSize;
-        nNewSize = (infoLastBlockFile.nUndoSize += nAddSize);
-        if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, infoLastBlockFile))
-            return state.Abort("Failed to write block info");
-    } else {
-        CBlockFileInfo info;
-        if (!pblocktree->ReadBlockFileInfo(nFile, info))
-            return state.Abort("Failed to read block info");
-        pos.nPos = info.nUndoSize;
-        nNewSize = (info.nUndoSize += nAddSize);
-        if (!pblocktree->WriteBlockFileInfo(nFile, info))
-            return state.Abort("Failed to write block info");
+    pos.nPos = vinfoBlockFile[nFile].nUndoSize;
+    nNewSize = vinfoBlockFile[nFile].nUndoSize += nAddSize;
+    if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, vinfoBlockFile[nLastBlockFile])) {
+        return state.Abort("Failed to write block info");
     }
 
     unsigned int nOldChunks = (pos.nPos + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
@@ -2826,9 +2817,20 @@ bool static LoadBlockIndexDB()
 
     // Load block file info
     pblocktree->ReadLastBlockFile(nLastBlockFile);
+    vinfoBlockFile.resize(nLastBlockFile + 1);
     LogPrintf("LoadBlockIndexDB(): last block file = %i\n", nLastBlockFile);
-    if (pblocktree->ReadBlockFileInfo(nLastBlockFile, infoLastBlockFile))
-        LogPrintf("LoadBlockIndexDB(): last block file info: %s\n", infoLastBlockFile.ToString());
+    for (int nFile = 0; nFile <= nLastBlockFile; nFile++) {
+        pblocktree->ReadBlockFileInfo(nFile, vinfoBlockFile[nFile]);
+    }
+    LogPrintf("LoadBlockIndexDB(): last block file info: %s\n", vinfoBlockFile[nLastBlockFile].ToString());
+    for (int nFile = nLastBlockFile + 1; true; nFile++) {
+        CBlockFileInfo info;
+        if (pblocktree->ReadBlockFileInfo(nFile, info)) {
+            vinfoBlockFile.push_back(info);
+        } else {
+            break;
+        }
+    }
 
     // Check presence of blk files
     LogPrintf("Checking all blk files are present...\n");

From 5eed8c21c7be355a2b5368843e383f40aa4642d6 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 6 Oct 2014 13:00:55 +0200
Subject: [PATCH 0833/1819] minor license, header end comment etc. cleanup in
 /script

- ensure all licenses are just MIT
- add a missing header end comment
- ensure alphabetical ordering
---
 src/script/interpreter.h | 2 +-
 src/script/sigcache.cpp  | 4 ++--
 src/script/sigcache.h    | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index f5363a7535a6..0ff73964ba81 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -10,10 +10,10 @@
 #include <stdint.h>
 #include <string>
 
-class uint256;
 class CPubKey;
 class CScript;
 class CTransaction;
+class uint256;
 
 /** Signature hash types/flags */
 enum
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index 981563b7aea0..ab366898d825 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "sigcache.h"
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 9537efbd118e..46b8f4d33599 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef H_BITCOIN_SCRIPT_SIGCACHE
@@ -23,4 +23,4 @@ class CachingSignatureChecker : public SignatureChecker
     bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 };
 
-#endif
+#endif // H_BITCOIN_SCRIPT_SIGCACHE

From 4dc5eb057c1d3b3cab8eb6462a0e134b128de1fd Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Mon, 6 Oct 2014 13:04:02 +0200
Subject: [PATCH 0834/1819] fix a lock indentation in main.cpp

- also ensure alphabetical ordering in file header
---
 src/main.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 44ac232aadec..5d46c30a9be6 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -26,8 +26,8 @@
 #include <boost/filesystem/fstream.hpp>
 #include <boost/thread.hpp>
 
-using namespace std;
 using namespace boost;
+using namespace std;
 
 #if defined(NDEBUG)
 # error "Bitcoin cannot be compiled without assertions."
@@ -2026,10 +2026,10 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
             // Relay inventory, but don't relay old inventory during initial block download.
             int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
             {
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-                if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
-                    pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
+                LOCK(cs_vNodes);
+                BOOST_FOREACH(CNode* pnode, vNodes)
+                    if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
+                        pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
             }
 
             uiInterface.NotifyBlockTip(hashNewTip);

From de10efd154d6c02fe8549a2dc9649a96cf601fd2 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 25 Sep 2014 09:01:54 +0200
Subject: [PATCH 0835/1819] add -timeout default as constant and use them

- update help message text
- simplify code in init to check for -timeout
---
 src/init.cpp    | 11 ++++-------
 src/netbase.cpp |  2 +-
 src/netbase.h   |  3 +++
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 980c589b293e..d3cb3c32d568 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -260,7 +260,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
     strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
     strUsage += "  -seednode=<ip>         " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n";
-    strUsage += "  -timeout=<n>           " + _("Specify connection timeout in milliseconds (default: 5000)") + "\n";
+    strUsage += "  -timeout=<n>           " + strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT) + "\n";
 #ifdef USE_UPNP
 #if USE_UPNP
     strUsage += "  -upnp                  " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n";
@@ -641,12 +641,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     bool fDisableWallet = GetBoolArg("-disablewallet", false);
 #endif
 
-    if (mapArgs.count("-timeout"))
-    {
-        int nNewTimeout = GetArg("-timeout", 5000);
-        if (nNewTimeout > 0 && nNewTimeout < 600000)
-            nConnectTimeout = nNewTimeout;
-    }
+    nConnectTimeout = GetArg("-timeout", DEFAULT_CONNECT_TIMEOUT);
+    if (nConnectTimeout <= 0)
+        nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
 
     // Continue to put "/P2SH/" in the coinbase to monitor
     // BIP16 support.
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 5819c152a361..b3d1001547e5 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -40,7 +40,7 @@ using namespace std;
 static proxyType proxyInfo[NET_MAX];
 static CService nameProxy;
 static CCriticalSection cs_proxyInfos;
-int nConnectTimeout = 5000;
+int nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
 bool fNameLookup = false;
 
 static const unsigned char pchIPv4[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff };
diff --git a/src/netbase.h b/src/netbase.h
index 9fc5c72eb813..1455cd8c33d3 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -19,6 +19,9 @@
 extern int nConnectTimeout;
 extern bool fNameLookup;
 
+/** -timeout default */
+static const int DEFAULT_CONNECT_TIMEOUT = 5000;
+
 #ifdef WIN32
 // In MSVC, this is defined as a macro, undefine it to prevent a compile and link error
 #undef SetPort

From 772ab0ea98b31020095eaf9baa6a6504957507af Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 6 Oct 2014 13:23:27 +0200
Subject: [PATCH 0836/1819] contrib: use batched JSON-RPC in linarize-hashes

Batch up to 10000 requests for a ~30x speedup.
---
 contrib/linearize/linearize-hashes.py | 71 +++++++++++++++------------
 1 file changed, 39 insertions(+), 32 deletions(-)

diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index 791b71bc3306..dc7f65404996 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -2,11 +2,12 @@
 #
 # linearize-hashes.py:  List blocks in a linear, no-fork version of the chain.
 #
-# Copyright (c) 2013 The Bitcoin developers
+# Copyright (c) 2013-2014 The Bitcoin developers
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 #
 
+from __future__ import print_function
 import json
 import struct
 import re
@@ -17,59 +18,65 @@
 settings = {}
 
 class BitcoinRPC:
-	OBJID = 1
-
 	def __init__(self, host, port, username, password):
 		authpair = "%s:%s" % (username, password)
 		self.authhdr = "Basic %s" % (base64.b64encode(authpair))
 		self.conn = httplib.HTTPConnection(host, port, False, 30)
-	def rpc(self, method, params=None):
-		self.OBJID += 1
-		obj = { 'version' : '1.1',
-			'method' : method,
-			'id' : self.OBJID }
-		if params is None:
-			obj['params'] = []
-		else:
-			obj['params'] = params
+
+	def execute(self, obj):
 		self.conn.request('POST', '/', json.dumps(obj),
 			{ 'Authorization' : self.authhdr,
 			  'Content-type' : 'application/json' })
 
 		resp = self.conn.getresponse()
 		if resp is None:
-			print "JSON-RPC: no response"
+			print("JSON-RPC: no response", file=sys.stderr)
 			return None
 
 		body = resp.read()
 		resp_obj = json.loads(body)
-		if resp_obj is None:
-			print "JSON-RPC: cannot JSON-decode body"
-			return None
-		if 'error' in resp_obj and resp_obj['error'] != None:
-			return resp_obj['error']
-		if 'result' not in resp_obj:
-			print "JSON-RPC: no result in object"
-			return None
+		return resp_obj
 
-		return resp_obj['result']
-	def getblock(self, hash, verbose=True):
-		return self.rpc('getblock', [hash, verbose])
-	def getblockhash(self, index):
-		return self.rpc('getblockhash', [index])
+	@staticmethod
+	def build_request(idx, method, params):
+		obj = { 'version' : '1.1',
+			'method' : method,
+			'id' : idx }
+		if params is None:
+			obj['params'] = []
+		else:
+			obj['params'] = params
+		return obj
+
+	@staticmethod
+	def response_is_error(resp_obj):
+		return 'error' in resp_obj and resp_obj['error'] is not None
 
-def get_block_hashes(settings):
+def get_block_hashes(settings, max_blocks_per_call=10000):
 	rpc = BitcoinRPC(settings['host'], settings['port'],
 			 settings['rpcuser'], settings['rpcpassword'])
 
-	for height in xrange(settings['min_height'], settings['max_height']+1):
-		hash = rpc.getblockhash(height)
+	height = settings['min_height']
+	while height < settings['max_height']+1:
+		num_blocks = min(settings['max_height']+1-height, max_blocks_per_call)
+		batch = []
+		for x in range(num_blocks):
+			batch.append(rpc.build_request(x, 'getblockhash', [height + x]))
+
+		reply = rpc.execute(batch)
+
+		for x,resp_obj in enumerate(reply):
+			if rpc.response_is_error(resp_obj):
+				print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
+				exit(1)
+			assert(resp_obj['id'] == x) # assume replies are in-sequence
+			print(resp_obj['result'])
 
-		print(hash)
+		height += num_blocks
 
 if __name__ == '__main__':
 	if len(sys.argv) != 2:
-		print "Usage: linearize-hashes.py CONFIG-FILE"
+		print("Usage: linearize-hashes.py CONFIG-FILE")
 		sys.exit(1)
 
 	f = open(sys.argv[1])
@@ -95,7 +102,7 @@ def get_block_hashes(settings):
 	if 'max_height' not in settings:
 		settings['max_height'] = 313000
 	if 'rpcuser' not in settings or 'rpcpassword' not in settings:
-		print "Missing username and/or password in cfg file"
+		print("Missing username and/or password in cfg file", file=stderr)
 		sys.exit(1)
 
 	settings['port'] = int(settings['port'])

From aedc74dfa688306c5a139a88782da74f69ba6757 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 6 Oct 2014 17:55:55 +0200
Subject: [PATCH 0837/1819] contrib: make linearize-data.py cope with
 out-of-order blocks

Make it possible to read blocks in any order. This will be required
after headers-first (#4468), so should be merged before that.

- Read block header. For expected blocks, continue, else skip.
- For in-order blocks: copy block contents directly. Write prior
  out-of-order blocks if this connects a consecutive span.
- For out-of-order blocks, store extents of block data for later
  retrieval. Cache out-of-order blocks in memory up to 100MB
  (configurable).
---
 contrib/linearize/example-linearize.cfg |   2 +
 contrib/linearize/linearize-data.py     | 258 +++++++++++++++---------
 2 files changed, 162 insertions(+), 98 deletions(-)

diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index 071345f23a0b..e0fef13886d9 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -15,3 +15,5 @@ output_file=/home/example/Downloads/bootstrap.dat
 hashlist=hashlist.txt
 split_year=1
 
+# Maxmimum size in bytes of out-of-order blocks cache in memory
+out_of_order_cache_sz = 100000000
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 3b5d198c1492..2dac3a614b03 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -2,11 +2,12 @@
 #
 # linearize-data.py: Construct a linear, no-fork version of the chain.
 #
-# Copyright (c) 2013 The Bitcoin developers
+# Copyright (c) 2013-2014 The Bitcoin developers
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 #
 
+from __future__ import print_function, division
 import json
 import struct
 import re
@@ -17,10 +18,10 @@
 import hashlib
 import datetime
 import time
+from collections import namedtuple
 
 settings = {}
 
-
 def uint32(x):
 	return x & 0xffffffffL
 
@@ -78,116 +79,174 @@ def get_block_hashes(settings):
 
 	return blkindex
 
-def mkblockset(blkindex):
+def mkblockmap(blkindex):
 	blkmap = {}
-	for hash in blkindex:
-		blkmap[hash] = True
+	for height,hash in enumerate(blkindex):
+		blkmap[hash] = height
 	return blkmap
 
-def copydata(settings, blkindex, blkset):
-	inFn = 0
-	inF = None
-	outFn = 0
-	outsz = 0
-	outF = None
-	outFname = None
-	blkCount = 0
-
-	lastDate = datetime.datetime(2000, 1, 1)
-	highTS = 1408893517 - 315360000
-	timestampSplit = False
-	fileOutput = True
-	setFileTime = False
-	maxOutSz = settings['max_out_sz']
-	if 'output' in settings:
-		fileOutput = False
-	if settings['file_timestamp'] != 0:
-		setFileTime = True
-	if settings['split_timestamp'] != 0:
-		timestampSplit = True
-
-	while True:
-		if not inF:
-			fname = "%s/blk%05d.dat" % (settings['input'], inFn)
-			print("Input file" + fname)
-			try:
-				inF = open(fname, "rb")
-			except IOError:
-				print "Done"
-				return
-
-		inhdr = inF.read(8)
-		if (not inhdr or (inhdr[0] == "\0")):
-			inF.close()
-			inF = None
-			inFn = inFn + 1
-			continue
-
-		inMagic = inhdr[:4]
-		if (inMagic != settings['netmagic']):
-			print("Invalid magic:" + inMagic)
-			return
-		inLenLE = inhdr[4:]
-		su = struct.unpack("<I", inLenLE)
-		inLen = su[0]
-		rawblock = inF.read(inLen)
-		blk_hdr = rawblock[:80]
-
-		hash_str = calc_hash_str(blk_hdr)
-		if not hash_str in blkset:
-			print("Skipping unknown block " + hash_str)
-			continue
-
-		if blkindex[blkCount] != hash_str:
-			print("Out of order block.")
-			print("Expected " + blkindex[blkCount])
-			print("Got " + hash_str)
-			sys.exit(1)
-
-		if not fileOutput and ((outsz + inLen) > maxOutSz):
-			outF.close()
-			if setFileTime:
+# Block header and extent on disk
+BlockExtent = namedtuple('BlockExtent', ['fn', 'offset', 'inhdr', 'blkhdr', 'size'])
+
+class BlockDataCopier:
+	def __init__(self, settings, blkindex, blkmap):
+		self.settings = settings
+		self.blkindex = blkindex
+		self.blkmap = blkmap
+
+		self.inFn = 0
+		self.inF = None
+		self.outFn = 0
+		self.outsz = 0
+		self.outF = None
+		self.outFname = None
+		self.blkCountIn = 0
+		self.blkCountOut = 0
+
+		self.lastDate = datetime.datetime(2000, 1, 1)
+		self.highTS = 1408893517 - 315360000
+		self.timestampSplit = False
+		self.fileOutput = True
+		self.setFileTime = False
+		self.maxOutSz = settings['max_out_sz']
+		if 'output' in settings:
+			self.fileOutput = False
+		if settings['file_timestamp'] != 0:
+			self.setFileTime = True
+		if settings['split_timestamp'] != 0:
+			self.timestampSplit = True
+        # Extents and cache for out-of-order blocks
+		self.blockExtents = {}
+		self.outOfOrderData = {}
+		self.outOfOrderSize = 0 # running total size for items in outOfOrderData
+
+	def writeBlock(self, inhdr, blk_hdr, rawblock):
+		if not self.fileOutput and ((self.outsz + self.inLen) > self.maxOutSz):
+			self.outF.close()
+			if self.setFileTime:
 				os.utime(outFname, (int(time.time()), highTS))
-			outF = None
-			outFname = None
-			outFn = outFn + 1
-			outsz = 0
+			self.outF = None
+			self.outFname = None
+			self.outFn = outFn + 1
+			self.outsz = 0
 
 		(blkDate, blkTS) = get_blk_dt(blk_hdr)
-		if timestampSplit and (blkDate > lastDate):
+		if self.timestampSplit and (blkDate > self.lastDate):
 			print("New month " + blkDate.strftime("%Y-%m") + " @ " + hash_str)
 			lastDate = blkDate
 			if outF:
 				outF.close()
 				if setFileTime:
 					os.utime(outFname, (int(time.time()), highTS))
-				outF = None
-				outFname = None
-				outFn = outFn + 1
-				outsz = 0
-
-		if not outF:
-			if fileOutput:
-				outFname = settings['output_file']
+				self.outF = None
+				self.outFname = None
+				self.outFn = self.outFn + 1
+				self.outsz = 0
+
+		if not self.outF:
+			if self.fileOutput:
+				outFname = self.settings['output_file']
 			else:
-				outFname = "%s/blk%05d.dat" % (settings['output'], outFn)
+				outFname = "%s/blk%05d.dat" % (self.settings['output'], outFn)
 			print("Output file" + outFname)
-			outF = open(outFname, "wb")
-
-		outF.write(inhdr)
-		outF.write(rawblock)
-		outsz = outsz + inLen + 8
-
-		blkCount = blkCount + 1
-		if blkTS > highTS:
-			highTS = blkTS
-
-		if (blkCount % 1000) == 0:
-			print("Wrote " + str(blkCount) + " blocks")
+			self.outF = open(outFname, "wb")
+
+		self.outF.write(inhdr)
+		self.outF.write(blk_hdr)
+		self.outF.write(rawblock)
+		self.outsz = self.outsz + len(inhdr) + len(blk_hdr) + len(rawblock)
+
+		self.blkCountOut = self.blkCountOut + 1
+		if blkTS > self.highTS:
+			self.highTS = blkTS
+
+		if (self.blkCountOut % 1000) == 0:
+			print('%i blocks scanned, %i blocks written (of %i, %.1f%% complete)' % 
+					(self.blkCountIn, self.blkCountOut, len(self.blkindex), 100.0 * self.blkCountOut / len(self.blkindex)))
+
+	def inFileName(self, fn):
+		return "%s/blk%05d.dat" % (self.settings['input'], fn)
+
+	def fetchBlock(self, extent):
+		'''Fetch block contents from disk given extents'''
+		with open(self.inFileName(extent.fn), "rb") as f:
+			f.seek(extent.offset)
+			return f.read(extent.size)
+
+	def copyOneBlock(self):
+		'''Find the next block to be written in the input, and copy it to the output.'''
+		extent = self.blockExtents.pop(self.blkCountOut)
+		if self.blkCountOut in self.outOfOrderData:
+			# If the data is cached, use it from memory and remove from the cache
+			rawblock = self.outOfOrderData.pop(self.blkCountOut)
+			self.outOfOrderSize -= len(rawblock)
+		else: # Otherwise look up data on disk
+			rawblock = self.fetchBlock(extent)
+
+		self.writeBlock(extent.inhdr, extent.blkhdr, rawblock)
+
+	def run(self):
+		while self.blkCountOut < len(self.blkindex):
+			if not self.inF:
+				fname = self.inFileName(self.inFn)
+				print("Input file" + fname)
+				try:
+					self.inF = open(fname, "rb")
+				except IOError:
+					print("Premature end of block data")
+					return
+
+			inhdr = self.inF.read(8)
+			if (not inhdr or (inhdr[0] == "\0")):
+				self.inF.close()
+				self.inF = None
+				self.inFn = self.inFn + 1
+				continue
+
+			inMagic = inhdr[:4]
+			if (inMagic != self.settings['netmagic']):
+				print("Invalid magic:" + inMagic)
+				return
+			inLenLE = inhdr[4:]
+			su = struct.unpack("<I", inLenLE)
+			inLen = su[0] - 80 # length without header
+			blk_hdr = self.inF.read(80)
+			inExtent = BlockExtent(self.inFn, self.inF.tell(), inhdr, blk_hdr, inLen)
+
+			hash_str = calc_hash_str(blk_hdr)
+			if not hash_str in blkmap:
+				print("Skipping unknown block " + hash_str)
+				self.inF.seek(inLen, os.SEEK_CUR)
+				continue
+
+			blkHeight = self.blkmap[hash_str]
+			self.blkCountIn += 1
+
+			if self.blkCountOut == blkHeight:
+				# If in-order block, just copy
+				rawblock = self.inF.read(inLen)
+				self.writeBlock(inhdr, blk_hdr, rawblock)
+
+				# See if we can catch up to prior out-of-order blocks
+				while self.blkCountOut in self.blockExtents:
+					self.copyOneBlock()
+
+			else: # If out-of-order, skip over block data for now
+				self.blockExtents[blkHeight] = inExtent
+				if self.outOfOrderSize < self.settings['out_of_order_cache_sz']:
+					# If there is space in the cache, read the data
+					# Reading the data in file sequence instead of seeking and fetching it later is preferred,
+					# but we don't want to fill up memory
+					self.outOfOrderData[blkHeight] = self.inF.read(inLen)
+					self.outOfOrderSize += inLen
+				else: # If no space in cache, seek forward
+					self.inF.seek(inLen, os.SEEK_CUR)
+
+		print("Done (%i blocks written)" % (self.blkCountOut))
 
 if __name__ == '__main__':
 	if len(sys.argv) != 2:
-		print "Usage: linearize-data.py CONFIG-FILE"
+		print("Usage: linearize-data.py CONFIG-FILE")
 		sys.exit(1)
 
 	f = open(sys.argv[1])
@@ -216,22 +275,25 @@ def copydata(settings, blkindex, blkset):
 		settings['split_timestamp'] = 0
 	if 'max_out_sz' not in settings:
 		settings['max_out_sz'] = 1000L * 1000 * 1000
+	if 'out_of_order_cache_sz' not in settings:
+		settings['out_of_order_cache_sz'] = 100 * 1000 * 1000
 
 	settings['max_out_sz'] = long(settings['max_out_sz'])
 	settings['split_timestamp'] = int(settings['split_timestamp'])
 	settings['file_timestamp'] = int(settings['file_timestamp'])
 	settings['netmagic'] = settings['netmagic'].decode('hex')
+	settings['out_of_order_cache_sz'] = int(settings['out_of_order_cache_sz'])
 
 	if 'output_file' not in settings and 'output' not in settings:
 		print("Missing output file / directory")
 		sys.exit(1)
 
 	blkindex = get_block_hashes(settings)
-	blkset = mkblockset(blkindex)
+	blkmap = mkblockmap(blkindex)
 
-	if not "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" in blkset:
+	if not "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" in blkmap:
 		print("not found")
 	else:
-		copydata(settings, blkindex, blkset)
+		BlockDataCopier(settings, blkindex, blkmap).run()
 
 

From 3e61eb9c51b57e5b38133cb35842c471044e1ad6 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sat, 4 Oct 2014 01:48:12 +0200
Subject: [PATCH 0838/1819] minor txindex documentation improvement

---
 src/init.cpp              | 3 +--
 src/rpcrawtransaction.cpp | 5 ++++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 980c589b293e..36ba13b941fb 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -237,7 +237,7 @@ std::string HelpMessage(HelpMessageMode mode)
 #if !defined(WIN32)
     strUsage += "  -sysperms              " + _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)") + "\n";
 #endif
-    strUsage += "  -txindex               " + _("Maintain a full transaction index (default: 0)") + "\n";
+    strUsage += "  -txindex               " + _("Maintain a full transaction index, used by the getrawtransaction rpc call (default: 0)") + "\n";
 
     strUsage += "\n" + _("Connection options:") + "\n";
     strUsage += "  -addnode=<ip>          " + _("Add a node to connect to and attempt to keep the connection open") + "\n";
@@ -280,7 +280,6 @@ std::string HelpMessage(HelpMessageMode mode)
         strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
-    strUsage += "  -respendnotify=<cmd>   " + _("Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -spendzeroconfchange   " + _("Spend unconfirmed change when sending transactions (default: 1)") + "\n";
     strUsage += "  -txconfirmtarget=<n>   " + _("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)") + "\n";
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index bd87d77704ca..3c62272ecb70 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -110,6 +110,9 @@ Value getrawtransaction(const Array& params, bool fHelp)
     if (fHelp || params.size() < 1 || params.size() > 2)
         throw runtime_error(
             "getrawtransaction \"txid\" ( verbose )\n"
+            "\nNOTE: By default this function only works sometimes. This is when the tx is in the mempool\n"
+            "or there is an unspent output in the utxo for this transaction. To make it always work,\n"
+            "you need to maintain a transaction index, using the -txindex command line option.\n"
             "\nReturn the raw transaction data.\n"
             "\nIf verbose=0, returns a string that is serialized, hex-encoded data for 'txid'.\n"
             "If verbose is non-zero, returns an Object with information about 'txid'.\n"
@@ -202,7 +205,7 @@ Value listunspent(const Array& params, bool fHelp)
             "Results are an array of Objects, each of which has:\n"
             "{txid, vout, scriptPubKey, amount, confirmations}\n"
             "\nArguments:\n"
-            "1. minconf          (numeric, optional, default=1) The minimum confirmationsi to filter\n"
+            "1. minconf          (numeric, optional, default=1) The minimum confirmations to filter\n"
             "2. maxconf          (numeric, optional, default=9999999) The maximum confirmations to filter\n"
             "3. \"addresses\"    (string) A json array of bitcoin addresses to filter\n"
             "    [\n"

From 27368e76260564268a7994d7e179a675750dbd05 Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <DomT4@users.noreply.github.com>
Date: Mon, 6 Oct 2014 21:36:24 +0100
Subject: [PATCH 0839/1819] Homebrew lang fix

Very small tweak to correct the language on Homebrew's sandboxing process.

Discussed in [this commit](https://github.com/bitcoin/bitcoin/commit/9fedafba4b903d7f3af044eb86dc313856e40b08).
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index abf9f39e65f0..7a54a16c42f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -240,7 +240,7 @@ case $host in
 
        AC_CHECK_PROG([BREW],brew, brew)
        if test x$BREW = xbrew; then
-         dnl These Homebrew packages may be bottled, meaning that they won't be found
+         dnl These Homebrew packages may be keg-only, meaning that they won't be found
          dnl in expected paths because they may conflict with system files. Ask
          dnl Homebrew where each one is located, then adjust paths accordingly.
          dnl It's safe to add these paths even if the functionality is disabled by

From 9d7cd4c598edfff12f1f80629c9149b3f1cf75a6 Mon Sep 17 00:00:00 2001
From: Andy Alness <andy@coinbase.com>
Date: Sat, 20 Sep 2014 16:13:18 -0700
Subject: [PATCH 0840/1819] Don't return an address for invalid pubkeys

---
 src/script/standard.cpp | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 407baf621d04..53ae254d59ac 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -203,7 +203,11 @@ bool ExtractDestination(const CScript& scriptPubKey, CTxDestination& addressRet)
 
     if (whichType == TX_PUBKEY)
     {
-        addressRet = CPubKey(vSolutions[0]).GetID();
+        CPubKey pubKey(vSolutions[0]);
+        if (!pubKey.IsValid())
+            return false;
+
+        addressRet = pubKey.GetID();
         return true;
     }
     else if (whichType == TX_PUBKEYHASH)
@@ -237,9 +241,16 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, vecto
         nRequiredRet = vSolutions.front()[0];
         for (unsigned int i = 1; i < vSolutions.size()-1; i++)
         {
-            CTxDestination address = CPubKey(vSolutions[i]).GetID();
+            CPubKey pubKey(vSolutions[i]);
+            if (!pubKey.IsValid())
+                continue;
+
+            CTxDestination address = pubKey.GetID();
             addressRet.push_back(address);
         }
+
+        if (addressRet.empty())
+            return false;
     }
     else
     {

From 2c930d932bdd4e1306f60dbb89f60c9a0149468b Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 7 Oct 2014 02:22:47 +0200
Subject: [PATCH 0841/1819] Prettify JSON tests and minimize diffs

---
 src/test/data/script_invalid.json | 85 ++++++++++++++++++++++++-----
 src/test/data/script_valid.json   | 91 ++++++++++++++++++++++++++-----
 src/test/script_tests.cpp         | 43 ++++++++++-----
 3 files changed, 179 insertions(+), 40 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 35a6794b010b..e62b8eeb75ef 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -384,19 +384,78 @@ nSequences are max.
 
 ["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
-["0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001", "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "", "P2PK, bad sig"],
-["0x47 0x3044022037fcdb8e08f41e27588de8bc036d2c4b16eb3d09c1ba53b8f47a0a9c27722a39022058664b7a53b507e71dfafb77193e3786c3f0c119d78ce9104480ee7ece04f09301 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640", "DUP HASH160 0x14 0xc0834c0c158f53be706d234c38fd52de7eece656 EQUALVERIFY CHECKSIG", "", "P2PKH, bad pubkey"],
-["0x47 0x3044022035e5b6742d299861c84cebaf2ea64145ee427a95facab39e2594d6deebb0c1d602200acb16778faa2e467a59006f342f2535b1418d55ba63a8605b387b7f9ac86d9a01", "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG", "", "P2PK anyonecanpay marked with normal hashtype"],
-["0x47 0x3044022029b2b8765ca950cf75a69e80b73b7ddfcaa8b27080c2db4c23b36aae60688e790220598ff368e17872ee065aa54d7d3a590682ca5204325b23b31d7da3c4a21ae67901 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL", "P2SH", "P2SH(P2PK), bad redeemscript"],
-["0x47 0x30440220647f906e63890df5ef1d3fed47ba892b31976c634281079e2bd38504fb54a1fb022021e8811f38fbe90efb6b74cb78da01d9badbac3bafdf70a861d7538a220d0b2601 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac", "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL", "P2SH", "P2SH(P2PKH), bad sig"],
-["0 0x47 0x304402203ef170402f8887f2ac183f31b1f503b0bc60bfc968dd469b097ea6124aefac5002200612febadc4e4cacc086982cb85830a17af3680c1b6a3cf77c1708af7621cf1301 0 0x47 0x304402207821838251a24a2234844f68e7169e6d11945cdf052ea12bd3e4e37457aceb4402200b6b46c81361e314c740ae5133c072af5fa5c209d65d2db1679e1716f19a538101", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3, 2 sigs"],
-["0 0 0x47 0x304402204661f7795e8db7be3132e8974e9a76d1d24b31f23df94c6fbcea07d1c205789102203f5e45a1c0b085279b58d11b36d5fea5449c3cf16f844ad10124e9b65e8777d201 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae", "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL", "P2SH", "P2SH(2-of-3), 1 sig"],
-["0x47 0x304402200052bc1600ca45c71f3538720fe62a5e8548dffd137af04467598c98466e9c0a0220789318ddbc9991ee477974089220a2feb6a6298a7c93d5ff6c25a92a2f4b48d501", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too much R padding"],
-["0x48 0x304502206eb7b92628bfb3c4d2a04b65b986987bcbb1af4fceedb144d5a0437b7ee410590221005f57a52df4aa26366742eed0db182fce51fbcd7159011b0644a7c05943eb228901", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too much S padding"],
-["0x47 0x30440220d8ad1efd55a3d2b8896495c38aba72056e1b3ca4a6ca15760e843eb1a9b9907602203eb0e8f3d6bec998262dfd03eaeb0f31c4e5105965436dec77550724b3771f3201", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "STRICTENC", "P2PK with too little R padding"],
-["0x48 0x304502206c43e065c8a8db3bbe69015afb86a51fb2fc8870defd41d436da2a197d9d6c12022100fcec35816ee2d84ec271ad159fcabf5dd712157051169e48ac328a7818cdb51e01", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "LOW_S,STRICTENC", "P2PK with high S"],
-["0x01 0x01 0x47 0x304402200e48ba1cf4d7182db94ffb57bd72ea31b5545dc0d1c512e665779b4fb2badc52022054b8388dfc074c708a75b62359b7be46402751ee40c0a111aef38a837b6ed09801 0x47 0x304402201c9820f59c49107bb30e6175cfc9ec95f897b03beb628b4bc854d2b80392aa0602200235d986ae418bcd111b8814f4c26a0ab5f475fb542a44884fc14912a97a252301 0x47 0x304402204cd7894c6f10a871f5b0c1f9c13228f8cdd4050248f0d0f498ee86be69ee3080022051bd2932c7d585eb600c7194235c74da820935f0d67972fd9545673aa1fd023301", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "NULLDUMMY", "3-of-3 with nonzero dummy"],
+[
+    "0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001",
+    "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
+    "",
+    "P2PK, bad sig"
+],
+[
+    "0x47 0x3044022037fcdb8e08f41e27588de8bc036d2c4b16eb3d09c1ba53b8f47a0a9c27722a39022058664b7a53b507e71dfafb77193e3786c3f0c119d78ce9104480ee7ece04f09301 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
+    "DUP HASH160 0x14 0xc0834c0c158f53be706d234c38fd52de7eece656 EQUALVERIFY CHECKSIG",
+    "",
+    "P2PKH, bad pubkey"
+],
+[
+    "0x47 0x3044022035e5b6742d299861c84cebaf2ea64145ee427a95facab39e2594d6deebb0c1d602200acb16778faa2e467a59006f342f2535b1418d55ba63a8605b387b7f9ac86d9a01",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
+    "",
+    "P2PK anyonecanpay marked with normal hashtype"
+],
+[
+    "0x47 0x3044022029b2b8765ca950cf75a69e80b73b7ddfcaa8b27080c2db4c23b36aae60688e790220598ff368e17872ee065aa54d7d3a590682ca5204325b23b31d7da3c4a21ae67901 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
+    "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
+    "P2SH",
+    "P2SH(P2PK), bad redeemscript"
+],
+[
+    "0x47 0x30440220647f906e63890df5ef1d3fed47ba892b31976c634281079e2bd38504fb54a1fb022021e8811f38fbe90efb6b74cb78da01d9badbac3bafdf70a861d7538a220d0b2601 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
+    "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
+    "P2SH",
+    "P2SH(P2PKH), bad sig"
+],
+[
+    "0 0x47 0x304402203ef170402f8887f2ac183f31b1f503b0bc60bfc968dd469b097ea6124aefac5002200612febadc4e4cacc086982cb85830a17af3680c1b6a3cf77c1708af7621cf1301 0 0x47 0x304402207821838251a24a2234844f68e7169e6d11945cdf052ea12bd3e4e37457aceb4402200b6b46c81361e314c740ae5133c072af5fa5c209d65d2db1679e1716f19a538101",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
+    "",
+    "3-of-3, 2 sigs"
+],
+[
+    "0 0 0x47 0x304402204661f7795e8db7be3132e8974e9a76d1d24b31f23df94c6fbcea07d1c205789102203f5e45a1c0b085279b58d11b36d5fea5449c3cf16f844ad10124e9b65e8777d201 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
+    "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
+    "P2SH",
+    "P2SH(2-of-3), 1 sig"
+],
+[
+    "0x47 0x304402200052bc1600ca45c71f3538720fe62a5e8548dffd137af04467598c98466e9c0a0220789318ddbc9991ee477974089220a2feb6a6298a7c93d5ff6c25a92a2f4b48d501",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "STRICTENC",
+    "P2PK with too much R padding"
+],
+[
+    "0x48 0x304502206eb7b92628bfb3c4d2a04b65b986987bcbb1af4fceedb144d5a0437b7ee410590221005f57a52df4aa26366742eed0db182fce51fbcd7159011b0644a7c05943eb228901",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "STRICTENC",
+    "P2PK with too much S padding"
+],
+[
+    "0x47 0x30440220d8ad1efd55a3d2b8896495c38aba72056e1b3ca4a6ca15760e843eb1a9b9907602203eb0e8f3d6bec998262dfd03eaeb0f31c4e5105965436dec77550724b3771f3201",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "STRICTENC",
+    "P2PK with too little R padding"
+],
+[
+    "0x48 0x304502206c43e065c8a8db3bbe69015afb86a51fb2fc8870defd41d436da2a197d9d6c12022100fcec35816ee2d84ec271ad159fcabf5dd712157051169e48ac328a7818cdb51e01",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+    "LOW_S,STRICTENC",
+    "P2PK with high S"
+],
+[
+    "0x01 0x01 0x47 0x304402200e48ba1cf4d7182db94ffb57bd72ea31b5545dc0d1c512e665779b4fb2badc52022054b8388dfc074c708a75b62359b7be46402751ee40c0a111aef38a837b6ed09801 0x47 0x304402201c9820f59c49107bb30e6175cfc9ec95f897b03beb628b4bc854d2b80392aa0602200235d986ae418bcd111b8814f4c26a0ab5f475fb542a44884fc14912a97a252301 0x47 0x304402204cd7894c6f10a871f5b0c1f9c13228f8cdd4050248f0d0f498ee86be69ee3080022051bd2932c7d585eb600c7194235c74da820935f0d67972fd9545673aa1fd023301",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
+    "NULLDUMMY",
+    "3-of-3 with nonzero dummy"
+],
 
 ["The End"]
-
 ]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 653f60d98280..49c7abbb312b 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -529,19 +529,84 @@ nSequences are max.
 
 ["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
-["0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501", "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG", "", "P2PK"],
-["0x47 0x3044022069d40999786aeb2fd874f9eb2636461a062dc963471627ed8390a3a5f9556f640220350132a52415ce622f2aadd07f791c591500917ec1f8c5edbc5381ef7942534d01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508", "DUP HASH160 0x14 0x1018853670f9f3b0582c5b9ee8ce93764ac32b93 EQUALVERIFY CHECKSIG", "", "P2PKH"],
-["0x47 0x30440220519f2a6632ffa134c7811ea2819e9dcc951f0c7baf461f2dffdd09133f3b080a02203ec6bab5eb6619ed7f41b8701d7c6d70cfc83bb26c5c97f54b2ca6e304fc2bb581", "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG", "", "P2PK anyonecanpay"],
-["0x47 0x30440220279dad2170ffb5639f0a1ea71fc462ee37d75d420d86f84c978bac523c09b7f20220683b2789f5c5528a9e0a0d78f6e40db3f616cf1adb5a5fdef117d5974795cfe201 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac", "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL", "P2SH", "P2SH(P2PK)"],
-["0x47 0x3044022066acbfb5ac96b7cbf3f05a2aaf358c32438c45d1d7359dee9fc1ee636940735f02205606a03fd8cbf6a6fcbcba60c8abb1e385c0b5753cb57a97538159106fd3684e01 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac", "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL", "", "P2SH(P2PKH), bad sig but no VERIFY_P2SH"],
-["0 0x47 0x3044022004e791dd30a64c70e55e84e150c002af9feb3ce0ab1f20e86c53d1209003927502205a60453987fcd72aebaaacebc8ce4b15449cdd79e54cc82cefb83e69dbcfeabf01 0x47 0x304402201d021808ce93dd8574cc4f99ae4f11b44305528b0aecbd9f156f08315173643802200944a0ea5c884bd86180aef76d8b1e444860776b251e47d2d6c651a1c6f9930801 0x47 0x30440220446336d7b7de05ebb5683b82b05248ec7d78e88ae8d6125985f5776c887a4cf90220674ab2b2c2f954ba1cf35457d273c90d0c0c1c224d0ae128628740e81129486801", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3"],
-["0 0x47 0x30440220288b06d057cf0eac434ed0c3be9257cc0ca144dd99c11cc8f1a49467a37d8e8002203c496c72253c528e6bc81c42e683aba974d46041a96ef7b00915c863eb2a702901 0x47 0x304402207ffb4da33f40cac839a43000a187bd76a1ee5bf95e46dc1534b38bb7bd0321db022038c078f29d1831f8eb68ffdc2634c654fb01c3467b6457b98ad220653bb2478501 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae", "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL", "P2SH", "P2SH(2-of-3)"],
-["0x47 0x304402200001cae94b795baaafb05db38cf24cd75560cab2c36c91e29fac7d0fd2a723a3022058e2e56e568ce7c4b2b106210d114e1faa079407a6ed4154f230667c7d3583bc01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too much R padding but no STRICTENC"],
-["0x48 0x304502206d01de7c2a40ac2bb1231ed97f3890a1782f421d4c28b97166deff317990288f0221005e720213b089355be2cf785d81a82c59307d30e1624f450ed9ca1ebbc11cca6d01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too much S padding but no STRICTENC"],
-["0x47 0x30440220f3d8889602147d60d26c1d3b21b8db183eac02bf6d2fec1424c0ef377ca6fd7b02202bae8bfe39d00a432d4538a592e338b0ffc44c17d4b7056043d55063cf91f5ef01", "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG", "", "P2PK with too little R padding but no STRICTENC"],
-["0x48 0x3045022021bf9184d94f208ac9f4757ebca9b1cbebf008cfc244fe5be1360b1b9aba0e92022100e55074f72f3a1bfddf2ea4ea7ba984f78822e136fe04c8f9c1363238e0233bd801", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "STRICTENC", "P2PK with high S but no LOW_S"],
-["0x48 0x304502205c3e81aaf2aad0673f349035b180eba783eba7797af91c979920dea6b17a16d6022100d1d46825c68da1b325f320a3503dad27bb818227f64a38d153554bfd360c0e5301", "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG", "LOW_S", "P2PK with high S but no STRICTENC"],
-["0x01 0x01 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01", "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG", "", "3-of-3 with nonzero dummy but no NULLDUMMY"],
+[
+    "0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501",
+    "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
+    "",
+    "P2PK"
+],
+[
+    "0x47 0x3044022069d40999786aeb2fd874f9eb2636461a062dc963471627ed8390a3a5f9556f640220350132a52415ce622f2aadd07f791c591500917ec1f8c5edbc5381ef7942534d01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
+    "DUP HASH160 0x14 0x1018853670f9f3b0582c5b9ee8ce93764ac32b93 EQUALVERIFY CHECKSIG",
+    "",
+    "P2PKH"
+],
+[
+    "0x47 0x30440220519f2a6632ffa134c7811ea2819e9dcc951f0c7baf461f2dffdd09133f3b080a02203ec6bab5eb6619ed7f41b8701d7c6d70cfc83bb26c5c97f54b2ca6e304fc2bb581",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
+    "",
+    "P2PK anyonecanpay"
+],
+[
+    "0x47 0x30440220279dad2170ffb5639f0a1ea71fc462ee37d75d420d86f84c978bac523c09b7f20220683b2789f5c5528a9e0a0d78f6e40db3f616cf1adb5a5fdef117d5974795cfe201 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
+    "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
+    "P2SH",
+    "P2SH(P2PK)"
+],
+[
+    "0x47 0x3044022066acbfb5ac96b7cbf3f05a2aaf358c32438c45d1d7359dee9fc1ee636940735f02205606a03fd8cbf6a6fcbcba60c8abb1e385c0b5753cb57a97538159106fd3684e01 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
+    "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
+    "",
+    "P2SH(P2PKH), bad sig but no VERIFY_P2SH"
+],
+[
+    "0 0x47 0x3044022004e791dd30a64c70e55e84e150c002af9feb3ce0ab1f20e86c53d1209003927502205a60453987fcd72aebaaacebc8ce4b15449cdd79e54cc82cefb83e69dbcfeabf01 0x47 0x304402201d021808ce93dd8574cc4f99ae4f11b44305528b0aecbd9f156f08315173643802200944a0ea5c884bd86180aef76d8b1e444860776b251e47d2d6c651a1c6f9930801 0x47 0x30440220446336d7b7de05ebb5683b82b05248ec7d78e88ae8d6125985f5776c887a4cf90220674ab2b2c2f954ba1cf35457d273c90d0c0c1c224d0ae128628740e81129486801",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
+    "",
+    "3-of-3"
+],
+[
+    "0 0x47 0x30440220288b06d057cf0eac434ed0c3be9257cc0ca144dd99c11cc8f1a49467a37d8e8002203c496c72253c528e6bc81c42e683aba974d46041a96ef7b00915c863eb2a702901 0x47 0x304402207ffb4da33f40cac839a43000a187bd76a1ee5bf95e46dc1534b38bb7bd0321db022038c078f29d1831f8eb68ffdc2634c654fb01c3467b6457b98ad220653bb2478501 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
+    "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
+    "P2SH",
+    "P2SH(2-of-3)"
+],
+[
+    "0x47 0x304402200001cae94b795baaafb05db38cf24cd75560cab2c36c91e29fac7d0fd2a723a3022058e2e56e568ce7c4b2b106210d114e1faa079407a6ed4154f230667c7d3583bc01",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "P2PK with too much R padding but no STRICTENC"
+],
+[
+    "0x48 0x304502206d01de7c2a40ac2bb1231ed97f3890a1782f421d4c28b97166deff317990288f0221005e720213b089355be2cf785d81a82c59307d30e1624f450ed9ca1ebbc11cca6d01",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "P2PK with too much S padding but no STRICTENC"
+],
+[
+    "0x47 0x30440220f3d8889602147d60d26c1d3b21b8db183eac02bf6d2fec1424c0ef377ca6fd7b02202bae8bfe39d00a432d4538a592e338b0ffc44c17d4b7056043d55063cf91f5ef01",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "P2PK with too little R padding but no STRICTENC"
+],
+[
+    "0x48 0x3045022021bf9184d94f208ac9f4757ebca9b1cbebf008cfc244fe5be1360b1b9aba0e92022100e55074f72f3a1bfddf2ea4ea7ba984f78822e136fe04c8f9c1363238e0233bd801",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+    "STRICTENC",
+    "P2PK with high S but no LOW_S"
+],
+[
+    "0x48 0x304502205c3e81aaf2aad0673f349035b180eba783eba7797af91c979920dea6b17a16d6022100d1d46825c68da1b325f320a3503dad27bb818227f64a38d153554bfd360c0e5301",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+    "LOW_S",
+    "P2PK with high S but no STRICTENC"
+],
+[
+    "0x01 0x01 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
+    "",
+    "3-of-3 with nonzero dummy but no NULLDUMMY"
+],
 
 ["The End"]
 ]
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 6ed3e03f5313..424eea11f581 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -34,6 +34,9 @@ using namespace std;
 using namespace json_spirit;
 using namespace boost::algorithm;
 
+// Uncomment if you want to output updated JSON tests.
+// #define UPDATE_JSON_TESTS
+
 static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
 unsigned int ParseScriptFlags(string strFlags);
@@ -239,14 +242,14 @@ class TestBuilder
         return *this;
     }
 
-    operator std::string()
+    Array GetJSON() const
     {
-        DoPush();
-        return "[\"" +
-               FormatScript(spendTx.vin[0].scriptSig) + "\", \"" +
-               FormatScript(creditTx.vout[0].scriptPubKey) + "\", \"" +
-               FormatScriptFlags(flags) + "\", \"" +
-               comment + "\"],\n";
+        Array array;
+        array.push_back(FormatScript(spendTx.vin[0].scriptSig));
+        array.push_back(FormatScript(creditTx.vout[0].scriptPubKey));
+        array.push_back(FormatScriptFlags(flags));
+        array.push_back(comment);
+        return array;
     }
 
     std::string GetComment()
@@ -377,18 +380,30 @@ BOOST_AUTO_TEST_CASE(script_build)
 
     BOOST_FOREACH(TestBuilder& test, good) {
         test.Test(true);
-        BOOST_CHECK_MESSAGE(tests_good.count(test.GetComment()) > 0, "Missing auto script_valid test: " + test.GetComment());
-        BOOST_CHECK_MESSAGE(ParseScript(tests_good[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_valid test: " + test.GetComment());
-        strGood += test;
+        if (tests_good.count(test.GetComment()) == 0) {
+#ifndef UPDATE_JSON_TESTS
+            BOOST_CHECK_MESSAGE(false, "Missing auto script_valid test: " + test.GetComment());
+#endif
+            strGood += write_string(Value(test.GetJSON()), true) + ",\n";
+        } else {
+            BOOST_CHECK_MESSAGE(ParseScript(tests_good[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_valid test: " + test.GetComment());
+            strGood += write_string(Value(tests_good[test.GetComment()]), true) + ",\n";
+        }
     }
     BOOST_FOREACH(TestBuilder& test, bad) {
         test.Test(false);
-        BOOST_CHECK_MESSAGE(tests_bad.count(test.GetComment()) > 0, "Missing auto script_invalid test: " + test.GetComment());
-        BOOST_CHECK_MESSAGE(ParseScript(tests_bad[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_invalid test: " + test.GetComment());
-        strBad += test;
+        if (tests_bad.count(test.GetComment()) == 0) {
+#ifndef UPDATE_JSON_TESTS
+            BOOST_CHECK_MESSAGE(false, "Missing auto script_invalid test: " + test.GetComment());
+#endif
+            strBad += write_string(Value(test.GetJSON()), true) + ",\n";
+        } else {
+            BOOST_CHECK_MESSAGE(ParseScript(tests_bad[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_invalid test: " + test.GetComment());
+            strBad += write_string(Value(tests_bad[test.GetComment()]), true) + ",\n";
+        }
     }
 
-#if 0
+#ifdef UPDATE_JSON_TESTS
     FILE* valid = fopen("script_valid.json.gen", "w");
     fputs(strGood.c_str(), valid);
     fclose(valid);

From cd3269e38e082df3370463221d399e353516ebdc Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 7 Oct 2014 09:34:46 +0200
Subject: [PATCH 0842/1819] contrib: revert changes to github-merge.sh in #5038

---
 contrib/devtools/github-merge.sh | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
index a83a2a59be30..3217a0619502 100755
--- a/contrib/devtools/github-merge.sh
+++ b/contrib/devtools/github-merge.sh
@@ -13,7 +13,7 @@
 # name $BRANCH is overwritten with the merged result, and optionally pushed.
 
 REPO="$(git config --get githubmerge.repository)"
-if [ "d$REPO" = "d" ]; then
+if [[ "d$REPO" == "d" ]]; then
   echo "ERROR: No repository configured. Use this command to set:" >&2
   echo "git config githubmerge.repository <owner>/<repo>" >&2
   echo "In addition, you can set the following variables:" >&2
@@ -24,12 +24,12 @@ if [ "d$REPO" = "d" ]; then
 fi
 
 HOST="$(git config --get githubmerge.host)"
-if [ "d$HOST" = "d" ]; then
+if [[ "d$HOST" == "d" ]]; then
   HOST="git@github.com"
 fi
 
 BRANCH="$(git config --get githubmerge.branch)"
-if [ "d$BRANCH" = "d" ]; then
+if [[ "d$BRANCH" == "d" ]]; then
   BRANCH="master"
 fi
 
@@ -37,12 +37,12 @@ TESTCMD="$(git config --get githubmerge.testcmd)"
 
 PULL="$1"
 
-if [ "d$PULL" = "d" ]; then
+if [[ "d$PULL" == "d" ]]; then
   echo "Usage: $0 pullnumber [branch]" >&2
   exit 2
 fi
 
-if [ "d$2" != "d" ]; then
+if [[ "d$2" != "d" ]]; then
   BRANCH="$2"
 fi
 
@@ -101,7 +101,7 @@ else
 fi
 
 # Run test command if configured.
-if [ "d$TESTCMD" != "d" ]; then
+if [[ "d$TESTCMD" != "d" ]]; then
   # Go up to the repository's root.
   while [ ! -d .git ]; do cd ..; done
   if ! $TESTCMD; then
@@ -112,10 +112,10 @@ if [ "d$TESTCMD" != "d" ]; then
   # Show the created merge.
   git diff pull/"$PULL"/merge..pull/"$PULL"/local-merge >"$TMPDIR"/diff
   git diff pull/"$PULL"/base..pull/"$PULL"/local-merge
-  if [ "$(<"$TMPDIR"/diff)" != "" ]; then
+  if [[ "$(<"$TMPDIR"/diff)" != "" ]]; then
     echo "WARNING: merge differs from github!" >&2
     read -p "Type 'ignore' to continue. " -r >&2
-    if [ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]; then
+    if [[ "d$REPLY" =~ ^d[iI][gG][nN][oO][rR][eE]$ ]]; then
       echo "Difference with github ignored." >&2
     else
       cleanup
@@ -124,7 +124,7 @@ if [ "d$TESTCMD" != "d" ]; then
   fi
   read -p "Press 'd' to accept the diff. " -n 1 -r >&2
   echo
-  if [ "d$REPLY" =~ ^d[dD]$ ]; then
+  if [[ "d$REPLY" =~ ^d[dD]$ ]]; then
     echo "Diff accepted." >&2
   else
     echo "ERROR: Diff rejected." >&2
@@ -139,7 +139,7 @@ else
   bash -i
   read -p "Press 'm' to accept the merge. " -n 1 -r >&2
   echo
-  if [ "d$REPLY" =~ ^d[Mm]$ ]; then
+  if [[ "d$REPLY" =~ ^d[Mm]$ ]]; then
     echo "Merge accepted." >&2
   else
     echo "ERROR: Merge rejected." >&2
@@ -151,8 +151,8 @@ fi
 # Sign the merge commit.
 read -p "Press 's' to sign off on the merge. " -n 1 -r >&2
 echo
-if [ "d$REPLY" =~ ^d[Ss]$ ]; then
-  if [ "$(git config --get user.signingkey)" = "" ]; then
+if [[ "d$REPLY" =~ ^d[Ss]$ ]]; then
+  if [[ "$(git config --get user.signingkey)" == "" ]]; then
     echo "WARNING: No GPG signing key set, not signing. Set one using:" >&2
     echo "git config --global user.signingkey <key>" >&2
     git commit -q --signoff --amend --no-edit
@@ -168,6 +168,6 @@ cleanup
 
 # Push the result.
 read -p "Type 'push' to push the result to $HOST:$REPO, branch $BRANCH. " -r >&2
-if [ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]; then
+if [[ "d$REPLY" =~ ^d[Pp][Uu][Ss][Hh]$ ]]; then
   git push "$HOST":"$REPO" refs/heads/"$BRANCH"
 fi

From 9df9cf5a9f5f56261b0b226dec6249f9dfbefed6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 7 Oct 2014 02:22:47 +0200
Subject: [PATCH 0843/1819] Make SCRIPT_VERIFY_STRICTENC compatible with BIP62

* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
---
 src/Makefile.test.include         |   1 -
 src/script/interpreter.cpp        |  76 ++++++++++++++------
 src/script/interpreter.h          |  25 +++++--
 src/test/canonical_tests.cpp      | 113 ------------------------------
 src/test/data/script_invalid.json |  48 +++++++++++++
 src/test/data/script_valid.json   |  62 +++++++++++++---
 src/test/script_tests.cpp         |  72 +++++++++++++++----
 src/test/transaction_tests.cpp    |   1 +
 8 files changed, 234 insertions(+), 164 deletions(-)
 delete mode 100644 src/test/canonical_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 99ac09e1a474..b20e226c3dd8 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -40,7 +40,6 @@ BITCOIN_TESTS =\
   test/base58_tests.cpp \
   test/base64_tests.cpp \
   test/bloom_tests.cpp \
-  test/canonical_tests.cpp \
   test/checkblock_tests.cpp \
   test/Checkpoints_tests.cpp \
   test/compress_tests.cpp \
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 56140f19dba9..ae66217b7ca0 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -52,10 +52,7 @@ static inline void popstack(vector<valtype>& stack)
     stack.pop_back();
 }
 
-bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
-    if (!(flags & SCRIPT_VERIFY_STRICTENC))
-        return true;
-
+bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
     if (vchPubKey.size() < 33)
         return error("Non-canonical public key: too short");
     if (vchPubKey[0] == 0x04) {
@@ -70,10 +67,7 @@ bool IsCanonicalPubKey(const valtype &vchPubKey, unsigned int flags) {
     return true;
 }
 
-bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
-    if (!(flags & SCRIPT_VERIFY_STRICTENC))
-        return true;
-
+bool static IsDERSignature(const valtype &vchSig) {
     // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
     // A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
     // Where R and S are not negative (their first byte has its highest bit not set), and not
@@ -83,9 +77,6 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
         return error("Non-canonical signature: too short");
     if (vchSig.size() > 73)
         return error("Non-canonical signature: too long");
-    unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
-    if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
-        return error("Non-canonical signature: unknown hashtype byte");
     if (vchSig[0] != 0x30)
         return error("Non-canonical signature: wrong type");
     if (vchSig[1] != vchSig.size()-3)
@@ -117,17 +108,54 @@ bool IsCanonicalSignature(const valtype &vchSig, unsigned int flags) {
     if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80))
         return error("Non-canonical signature: S value excessively padded");
 
-    if (flags & SCRIPT_VERIFY_LOW_S) {
-        // If the S value is above the order of the curve divided by two, its
-        // complement modulo the order could have been used instead, which is
-        // one byte shorter when encoded correctly.
-        if (!CKey::CheckSignatureElement(S, nLenS, true))
-            return error("Non-canonical signature: S value is unnecessarily high");
+    return true;
+}
+
+bool static IsLowDERSignature(const valtype &vchSig) {
+    if (!IsDERSignature(vchSig)) {
+        return false;
     }
+    unsigned int nLenR = vchSig[3];
+    unsigned int nLenS = vchSig[5+nLenR];
+    const unsigned char *S = &vchSig[6+nLenR];
+    // If the S value is above the order of the curve divided by two, its
+    // complement modulo the order could have been used instead, which is
+    // one byte shorter when encoded correctly.
+    if (!CKey::CheckSignatureElement(S, nLenS, true))
+        return error("Non-canonical signature: S value is unnecessarily high");
 
     return true;
 }
 
+bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
+    if (vchSig.size() == 0) {
+        return false;
+    }
+    unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
+    if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
+        return error("Non-canonical signature: unknown hashtype byte");
+
+    return true;
+}
+
+bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags) {
+    if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsDERSignature(vchSig)) {
+        return false;
+    } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig)) {
+        return false;
+    } else if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsDefinedHashtypeSignature(vchSig)) {
+        return false;
+    }
+    return true;
+}
+
+bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags) {
+    if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchSig)) {
+        return false;
+    }
+    return true;
+}
+
 bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker)
 {
     CScript::const_iterator pc = script.begin();
@@ -670,8 +698,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // Drop the signature, since there's no way for a signature to sign itself
                     scriptCode.FindAndDelete(CScript(vchSig));
 
-                    bool fSuccess = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                        checker.CheckSig(vchSig, vchPubKey, scriptCode);
+                    if (!CheckSignatureEncoding(vchSig, flags)) {
+                        return false;
+                    }
+
+                    bool fSuccess = CheckPubKeyEncoding(vchPubKey, flags) && checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                     popstack(stack);
                     popstack(stack);
@@ -730,9 +761,12 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         valtype& vchSig    = stacktop(-isig);
                         valtype& vchPubKey = stacktop(-ikey);
 
+                        if (!CheckSignatureEncoding(vchSig, flags)) {
+                            return false;
+                        }
+
                         // Check signature
-                        bool fOk = IsCanonicalSignature(vchSig, flags) && IsCanonicalPubKey(vchPubKey, flags) &&
-                            checker.CheckSig(vchSig, vchPubKey, scriptCode);
+                        bool fOk = CheckPubKeyEncoding(vchPubKey, flags) && checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                         if (fOk) {
                             isig++;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 0ff73964ba81..de5ce2ced1a3 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -28,14 +28,25 @@ enum
 enum
 {
     SCRIPT_VERIFY_NONE      = 0,
-    SCRIPT_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
-    SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
-    SCRIPT_VERIFY_LOW_S     = (1U << 2), // enforce low S values (<n/2) in signatures (depends on STRICTENC)
-    SCRIPT_VERIFY_NULLDUMMY = (1U << 3), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length
-};
 
-bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
-bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
+    // Evaluate P2SH subscripts (softfork safe, BIP16).
+    SCRIPT_VERIFY_P2SH      = (1U << 0),
+
+    // Passing a non-strict-DER signature or one with undefined hashtype to a checksig operation causes script failure.
+    // Passing a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) to checksig causes that pubkey to be
+    // skipped (not softfork safe: this flag can widen the validity of OP_CHECKSIG OP_NOT).
+    SCRIPT_VERIFY_STRICTENC = (1U << 1),
+
+    // Passing a non-strict-DER signature to a checksig operation causes script failure (softfork safe, BIP62 rule 1)
+    SCRIPT_VERIFY_DERSIG    = (1U << 2),
+
+    // Passing a non-strict-DER signature or one with S > order/2 to a checksig operation causes script failure
+    // (softfork safe, BIP62 rule 5).
+    SCRIPT_VERIFY_LOW_S     = (1U << 3),
+
+    // verify dummy stack item consumed by CHECKMULTISIG is of zero-length (softfork safe, BIP62 rule 7).
+    SCRIPT_VERIFY_NULLDUMMY = (1U << 4),
+};
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
 
diff --git a/src/test/canonical_tests.cpp b/src/test/canonical_tests.cpp
deleted file mode 100644
index a17099de7275..000000000000
--- a/src/test/canonical_tests.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright (c) 2012-2013 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-//
-// Unit tests for canonical signatures
-//
-
-#include "data/sig_noncanonical.json.h"
-#include "data/sig_canonical.json.h"
-#include "key.h"
-#include "random.h"
-#include "script/interpreter.h"
-#include "util.h"
-#include "utilstrencodings.h"
-
-#include <boost/foreach.hpp>
-#include <boost/test/unit_test.hpp>
-#include "json/json_spirit_writer_template.h"
-#include <openssl/ecdsa.h>
-
-using namespace std;
-using namespace json_spirit;
-
-// In script_tests.cpp
-extern Array read_json(const std::string& jsondata);
-
-BOOST_AUTO_TEST_SUITE(canonical_tests)
-
-// OpenSSL-based test for canonical signature (without test for hashtype byte)
-bool static IsCanonicalSignature_OpenSSL_inner(const std::vector<unsigned char>& vchSig)
-{
-    if (vchSig.size() == 0)
-        return false;
-    const unsigned char *input = &vchSig[0];
-    ECDSA_SIG *psig = NULL;
-    d2i_ECDSA_SIG(&psig, &input, vchSig.size());
-    if (psig == NULL)
-        return false;
-    unsigned char buf[256];
-    unsigned char *pbuf = buf;
-    unsigned int nLen = i2d_ECDSA_SIG(psig, NULL);
-    if (nLen != vchSig.size()) {
-        ECDSA_SIG_free(psig);
-        return false;
-    }
-    nLen = i2d_ECDSA_SIG(psig, &pbuf);
-    ECDSA_SIG_free(psig);
-    return (memcmp(&vchSig[0], &buf[0], nLen) == 0);
-}
-
-// OpenSSL-based test for canonical signature
-bool static IsCanonicalSignature_OpenSSL(const std::vector<unsigned char> &vchSignature) {
-    if (vchSignature.size() < 1)
-        return false;
-    if (vchSignature.size() > 127)
-        return false;
-    if (vchSignature[vchSignature.size() - 1] & 0x7C)
-        return false;
-
-    std::vector<unsigned char> vchSig(vchSignature);
-    vchSig.pop_back();
-    if (!IsCanonicalSignature_OpenSSL_inner(vchSig))
-        return false;
-    return true;
-}
-
-BOOST_AUTO_TEST_CASE(script_canon)
-{
-    Array tests = read_json(std::string(json_tests::sig_canonical, json_tests::sig_canonical + sizeof(json_tests::sig_canonical)));
-
-    BOOST_FOREACH(Value &tv, tests) {
-        string test = tv.get_str();
-        if (IsHex(test)) {
-            std::vector<unsigned char> sig = ParseHex(test);
-            BOOST_CHECK_MESSAGE(IsCanonicalSignature(sig, SCRIPT_VERIFY_STRICTENC), test);
-            BOOST_CHECK_MESSAGE(IsCanonicalSignature_OpenSSL(sig), test);
-        }
-    }
-}
-
-BOOST_AUTO_TEST_CASE(script_noncanon)
-{
-    Array tests = read_json(std::string(json_tests::sig_noncanonical, json_tests::sig_noncanonical + sizeof(json_tests::sig_noncanonical)));
-
-    BOOST_FOREACH(Value &tv, tests) {
-        string test = tv.get_str();
-        if (IsHex(test)) {
-            std::vector<unsigned char> sig = ParseHex(test);
-            BOOST_CHECK_MESSAGE(!IsCanonicalSignature(sig, SCRIPT_VERIFY_STRICTENC), test);
-            BOOST_CHECK_MESSAGE(!IsCanonicalSignature_OpenSSL(sig), test);
-        }
-    }
-}
-
-BOOST_AUTO_TEST_CASE(script_signstrict)
-{
-    for (int i=0; i<100; i++) {
-        CKey key;
-        key.MakeNewKey(i & 1);
-        std::vector<unsigned char> sig;
-        uint256 hash = GetRandHash();
-
-        BOOST_CHECK(key.Sign(hash, sig)); // Generate a random signature.
-        BOOST_CHECK(key.GetPubKey().Verify(hash, sig)); // Check it.
-        sig.push_back(0x01); // Append a sighash type.
-
-        BOOST_CHECK(IsCanonicalSignature(sig, SCRIPT_VERIFY_STRICTENC | SCRIPT_VERIFY_LOW_S));
-        BOOST_CHECK(IsCanonicalSignature_OpenSSL(sig));
-    }
-}
-
-BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index e62b8eeb75ef..b6447cb2213f 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -444,18 +444,66 @@ nSequences are max.
     "STRICTENC",
     "P2PK with too little R padding"
 ],
+[
+    "0x47 0x30440220001d0f82c127470cb38316c96b1719b33382353687a1146a776dee8259606905022062cd1fc8eacef819d68f0f41cc9ae9fdc2e29b70c3c7ad2c6c18f39b4e35c42701",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
+    "DERSIG",
+    "P2PK NOT with bad sig with too much R padding"
+],
+[
+    "0x47 0x30440220005d727e2a82d6e8a98a6da6fbc281325644d1a40455e386fdb17883a8e6bc4d02202d15cca42ce136047a980d288e60c679d7e84cce18c3ceffb6bc81b9e9ba517801",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
+    "",
+    "P2PK NOT with too much R padding but no DERSIG"
+],
+[
+    "0x47 0x30440220006e8bc4f82032b12bd594847c16d8b2986de734aa3b0528bd89d664d41e6d1c02200cfd582694891bcfa2e630e899bda257486eba00a007222fae71144dba07dc2901",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
+    "DERSIG",
+    "P2PK NOT with too much R padding"
+],
 [
     "0x48 0x304502206c43e065c8a8db3bbe69015afb86a51fb2fc8870defd41d436da2a197d9d6c12022100fcec35816ee2d84ec271ad159fcabf5dd712157051169e48ac328a7818cdb51e01",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
     "LOW_S,STRICTENC",
     "P2PK with high S"
 ],
+[
+    "0x47 0x304402203aab50cd7c30cc1e1475dee615b295bcee6ccf8aa8a7f6cda6b696c70d79cbb40220558e43fe7596c31146e2d077698d5a9c38351d8ba567549a2ae43ca97231c39501",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
+    "STRICTENC",
+    "P2PK with hybrid pubkey"
+],
+[
+    "0x47 0x304402205745e8f846110c185ee1185c01843a108588b81463d2c34d4a3f2445529f12fe02206ee6a2657bbc4e2bb74bfc44c3a5c4f410ed6356ca68982465de6ca807c807c201",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "",
+    "P2PK NOT with hybrid pubkey but no STRICTENC"
+],
+[
+    "0x47 0x304402201f82b99a813c9c48c8dee8d2c43b8f637b72353fe9bdcc084537bc17e2ab770402200c43b96a5f7e115f0114eabda32e068145965cb6c7b5ef64833bb4fcf9fc1b3b05",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
+    "STRICTENC",
+    "P2PK with undefined hashtype"
+],
+[
+    "0x47 0x30440220166848cd5b82a32b5944d90de3c35249354b43773c2ece1844ee8d1103e2f6c602203b6b046da4243c77adef80ada9201b27bbfdf7f9d5428f40434b060432afd62005",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
+    "STRICTENC",
+    "P2PK NOT with invalid sig and undefined hashtype"
+],
 [
     "0x01 0x01 0x47 0x304402200e48ba1cf4d7182db94ffb57bd72ea31b5545dc0d1c512e665779b4fb2badc52022054b8388dfc074c708a75b62359b7be46402751ee40c0a111aef38a837b6ed09801 0x47 0x304402201c9820f59c49107bb30e6175cfc9ec95f897b03beb628b4bc854d2b80392aa0602200235d986ae418bcd111b8814f4c26a0ab5f475fb542a44884fc14912a97a252301 0x47 0x304402204cd7894c6f10a871f5b0c1f9c13228f8cdd4050248f0d0f498ee86be69ee3080022051bd2932c7d585eb600c7194235c74da820935f0d67972fd9545673aa1fd023301",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "NULLDUMMY",
     "3-of-3 with nonzero dummy"
 ],
+[
+    "0x01 0x01 0x47 0x304402201847fc3b8f7597768e7f543c58da1fca6e8e35eb28979431e6b637572ce6eaa4022048dd58608e040841d0bf52a70cfb70e1a9c8d2826fad068f4e9d2bf5c87766a501 0x47 0x30440220711311a72516affed73363763983d05c3d6a06a2eadf5d76b90b4354162ba94302204841a69e5955a7dc8e4ab3105fd0c86040c1dac6016297a51ddbf5079c28756801 0x47 0x30440220267e331a378191e7282fd10d61c97bf74bc97c233c5833d677936424ac08dee502201eee83d88b91988e1c4d9b979df2404aa190e0987a8ca09c4e5cd61da1d48ecc01",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
+    "NULLDUMMY",
+    "3-of-3 NOT with invalid sig with nonzero dummy"
+],
 
 ["The End"]
 ]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 49c7abbb312b..88bec7238c77 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -572,22 +572,28 @@ nSequences are max.
     "P2SH(2-of-3)"
 ],
 [
-    "0x47 0x304402200001cae94b795baaafb05db38cf24cd75560cab2c36c91e29fac7d0fd2a723a3022058e2e56e568ce7c4b2b106210d114e1faa079407a6ed4154f230667c7d3583bc01",
+    "0x47 0x30440220001fff8863c84c0efc8eea5bffb7f388313f966f23a00ad3c0acc30ff5339684022016e6d78f51a3a1c362745931ca40b24f71cba2903dbfe5a6d392a9189127d83701",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
-    "P2PK with too much R padding but no STRICTENC"
+    "P2PK with too much R padding but no DERSIG"
 ],
 [
-    "0x48 0x304502206d01de7c2a40ac2bb1231ed97f3890a1782f421d4c28b97166deff317990288f0221005e720213b089355be2cf785d81a82c59307d30e1624f450ed9ca1ebbc11cca6d01",
+    "0x48 0x304502202323d56f293842b544cacedd06baafb999196dfa1c2975314848c158ac606655022100514bd98186b8a3a1cc87f4aff76aed797781389f13f50d87bf95b2df6e488fcc01",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
-    "P2PK with too much S padding but no STRICTENC"
+    "P2PK with too much S padding but no DERSIG"
 ],
 [
-    "0x47 0x30440220f3d8889602147d60d26c1d3b21b8db183eac02bf6d2fec1424c0ef377ca6fd7b02202bae8bfe39d00a432d4538a592e338b0ffc44c17d4b7056043d55063cf91f5ef01",
+    "0x47 0x30440220d31c24bb6c08a496e7698a08fd41975115d7b55bfaa31cb2d573e09481e59a6702206a691239996434076b78a4e1cf46fc8e993b468a9c77fb1832186aa8040a61a201",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
-    "P2PK with too little R padding but no STRICTENC"
+    "P2PK with too little R padding but no DERSIG"
+],
+[
+    "0x47 0x30440220007c2cc7aef1801c2937447703c87ef2a3744209ad98da2abadd4ba8bb2e3ea00220503a275582c9f9e9ff30260c81b7f64b8b696f22105605cc8241fb76a797316201",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
+    "",
+    "P2PK NOT with bad sig with too much R padding but no DERSIG"
 ],
 [
     "0x48 0x3045022021bf9184d94f208ac9f4757ebca9b1cbebf008cfc244fe5be1360b1b9aba0e92022100e55074f72f3a1bfddf2ea4ea7ba984f78822e136fe04c8f9c1363238e0233bd801",
@@ -596,10 +602,40 @@ nSequences are max.
     "P2PK with high S but no LOW_S"
 ],
 [
-    "0x48 0x304502205c3e81aaf2aad0673f349035b180eba783eba7797af91c979920dea6b17a16d6022100d1d46825c68da1b325f320a3503dad27bb818227f64a38d153554bfd360c0e5301",
-    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
-    "LOW_S",
-    "P2PK with high S but no STRICTENC"
+    "0x47 0x304402202163bc732c21b7de0251297d3c6c2ece182782e85fc5e19d6036f1130a79051e022033827811634924ebba68767537d78dd7bd9109ae2a89a60587927abdc25eb06401",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
+    "",
+    "P2PK with hybrid pubkey but no STRICTENC"
+],
+[
+    "0x47 0x3044022078033e4227aa05ded69d8da579966578e230d8a7fb44d5f1a0620c3853c24f78022006a2e3f4d872ac8dfdc529110aa37301d65a76255a4b6cce2992adacd4d2c4e201",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "STRICTENC",
+    "P2PK NOT with hybrid pubkey"
+],
+[
+    "0x47 0x3044022078d6c447887e88dcbe1bc5b613645280df6f4e5935648bc226e9d91da71b3216022047d6b7ef0949b228fc1b359afb8d50500268711354298217b983c26970790c7601",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "",
+    "P2PK NOT with invalid hybrid pubkey but no STRICTENC"
+],
+[
+    "0x47 0x304402207592427de20e315d644839754f2a5cca5b978b983a15e6da82109ede01722baa022032ceaf78590faa3f7743821e1b47b897ed1a57f6ee1c8a7519d23774d8de3c4401",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "STRICTENC",
+    "P2PK NOT with invalid hybrid pubkey"
+],
+[
+    "0x47 0x304402204649e9517ef0377a8f8270bd423053fd98ddff62d74ea553e9579558abbb75e4022044a2b2344469c12e35ed898987711272b634733dd0f5e051288eceb04bd4669e05",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
+    "",
+    "P2PK with undefined hashtype but no STRICTENC"
+],
+[
+    "0x47 0x304402207f1cf1866a2df0bb4b8d84d0ade72aa3abb6aaab0639d608b23d9e10ead0c48202203caa97f22c3439443eea4b89f7f6729854df0f567a8184d6ecc6e8b6c68c3e9d05",
+    "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
+    "",
+    "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC"
 ],
 [
     "0x01 0x01 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01",
@@ -607,6 +643,12 @@ nSequences are max.
     "",
     "3-of-3 with nonzero dummy but no NULLDUMMY"
 ],
+[
+    "0x01 0x01 0x47 0x30440220195038dbc6b2ae1199f86a6777824f7c5149789d85f655a3534a4422b8fba38c02204df9db87d2eb9fe06edc66870d9ac4c9ce673459f9d43cee0347ce4ffb02ee5a01 0x47 0x3044022010a45f30c6fa97a186eba9e6b595ab87d3dfcbf05dcaf1f1b8e3e7bf39515bb802203474e78d3d372e5f5c0f8c257ce8300c4bb8f37c51d4a894e11a91b5817da6ed01 0x47 0x30440220039cffd8e39850f95112662b1220b14b3c0d3d8a2772e13c947bfbf96345a64e02204154bfa77e2c0134d5434353bed82141e5da1cc479954aa288d5f0671480a04b01",
+    "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
+    "",
+    "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY"
+],
 
 ["The End"]
 ]
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 424eea11f581..a4b0212494e1 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -242,8 +242,9 @@ class TestBuilder
         return *this;
     }
 
-    Array GetJSON() const
+    Array GetJSON()
     {
+        DoPush();
         Array array;
         array.push_back(FormatScript(spendTx.vin[0].scriptSig));
         array.push_back(FormatScript(creditTx.vout[0].scriptPubKey));
@@ -319,40 +320,87 @@ BOOST_AUTO_TEST_CASE(script_build)
                              ).Num(0).PushSig(keys.key1).Num(0).PushRedeem());
 
     good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                               "P2PK with too much R padding but no STRICTENC", 0
+                               "P2PK with too much R padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
     bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                              "P2PK with too much R padding", SCRIPT_VERIFY_STRICTENC
+                              "P2PK with too much R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
     good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                               "P2PK with too much S padding but no STRICTENC", 0
+                               "P2PK with too much S padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
     bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                              "P2PK with too much S padding", SCRIPT_VERIFY_STRICTENC
+                              "P2PK with too much S padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
     good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                               "P2PK with too little R padding but no STRICTENC", 0
+                               "P2PK with too little R padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
     bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
-                              "P2PK with too little R padding", SCRIPT_VERIFY_STRICTENC
+                              "P2PK with too little R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+                               "P2PK NOT with bad sig with too much R padding but no DERSIG", 0
+                              ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000").DamagePush(10));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with bad sig with too much R padding", SCRIPT_VERIFY_DERSIG
+                             ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000").DamagePush(10));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with too much R padding but no DERSIG", 0
+                             ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with too much R padding", SCRIPT_VERIFY_DERSIG
+                             ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
 
     good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
-                               "P2PK with high S but no LOW_S", SCRIPT_VERIFY_STRICTENC
-                              ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
-    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
-                               "P2PK with high S but no STRICTENC", SCRIPT_VERIFY_LOW_S
+                               "P2PK with high S but no LOW_S", 0
                               ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
     bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
-                              "P2PK with high S", SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC
+                              "P2PK with high S", SCRIPT_VERIFY_LOW_S
                              ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
 
+    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG,
+                               "P2PK with hybrid pubkey but no STRICTENC", 0
+                              ).PushSig(keys.key0, SIGHASH_ALL));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG,
+                              "P2PK with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key0, SIGHASH_ALL));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with hybrid pubkey but no STRICTENC", 0
+                             ).PushSig(keys.key0, SIGHASH_ALL));
+    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+                               "P2PK NOT with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                              ).PushSig(keys.key0, SIGHASH_ALL));
+    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+                               "P2PK NOT with invalid hybrid pubkey but no STRICTENC", 0
+                              ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
+    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+                               "P2PK NOT with invalid hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                              ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
+
+    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+                               "P2PK with undefined hashtype but no STRICTENC", 0
+                              ).PushSig(keys.key1, 5));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+                              "P2PK with undefined hashtype", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key1, 5));
+    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG << OP_NOT,
+                               "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC", 0
+                              ).PushSig(keys.key1, 5).DamagePush(10));
+    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with invalid sig and undefined hashtype", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key1, 5).DamagePush(10));
+
     good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
                                "3-of-3 with nonzero dummy but no NULLDUMMY", 0
                               ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
     bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
                               "3-of-3 with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
+    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG << OP_NOT,
+                               "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY", 0
+                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2).DamagePush(10));
+    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG << OP_NOT,
+                              "3-of-3 NOT with invalid sig with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
+                             ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2).DamagePush(10));
 
     std::map<std::string, Array> tests_good;
     std::map<std::string, Array> tests_bad;
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index f14f600bbe88..18cb8f3d1ba7 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -31,6 +31,7 @@ static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
     (string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE)
     (string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH)
     (string("STRICTENC"), (unsigned int)SCRIPT_VERIFY_STRICTENC)
+    (string("DERSIG"), (unsigned int)SCRIPT_VERIFY_DERSIG)
     (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
     (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY);
 

From e01a7939d3a3b231f68ae2f36cbc4de0cf4d4999 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 7 Oct 2014 13:11:48 -0400
Subject: [PATCH 0844/1819] Refactor -alertnotify code

Refactor common -alertnotify code into static CAlert::Notify method.
---
 src/alert.cpp | 37 +++++++++++++++++++++----------------
 src/alert.h   |  3 ++-
 src/main.cpp  | 11 +++--------
 3 files changed, 26 insertions(+), 25 deletions(-)

diff --git a/src/alert.cpp b/src/alert.cpp
index 3271ecfbfd30..d495849206d4 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -233,25 +233,30 @@ bool CAlert::ProcessAlert(bool fThread)
         if(AppliesToMe())
         {
             uiInterface.NotifyAlertChanged(GetHash(), CT_NEW);
-            std::string strCmd = GetArg("-alertnotify", "");
-            if (!strCmd.empty())
-            {
-                // Alert text should be plain ascii coming from a trusted source, but to
-                // be safe we first strip anything not in safeChars, then add single quotes around
-                // the whole string before passing it to the shell:
-                std::string singleQuote("'");
-                std::string safeStatus = SanitizeString(strStatusBar);
-                safeStatus = singleQuote+safeStatus+singleQuote;
-                boost::replace_all(strCmd, "%s", safeStatus);
-
-                if (fThread)
-                    boost::thread t(runCommand, strCmd); // thread runs free
-                else
-                    runCommand(strCmd);
-            }
+            Notify(strStatusBar, fThread);
         }
     }
 
     LogPrint("alert", "accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe());
     return true;
 }
+
+void
+CAlert::Notify(const std::string& strMessage, bool fThread)
+{
+    std::string strCmd = GetArg("-alertnotify", "");
+    if (strCmd.empty()) return;
+
+    // Alert text should be plain ascii coming from a trusted source, but to
+    // be safe we first strip anything not in safeChars, then add single quotes around
+    // the whole string before passing it to the shell:
+    std::string singleQuote("'");
+    std::string safeStatus = SanitizeString(strMessage);
+    safeStatus = singleQuote+safeStatus+singleQuote;
+    boost::replace_all(strCmd, "%s", safeStatus);
+
+    if (fThread)
+        boost::thread t(runCommand, strCmd); // thread runs free
+    else
+        runCommand(strCmd);
+}
diff --git a/src/alert.h b/src/alert.h
index 5ecf94cea8c9..ba3235858dbb 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -101,7 +101,8 @@ class CAlert : public CUnsignedAlert
     bool AppliesToMe() const;
     bool RelayTo(CNode* pnode) const;
     bool CheckSignature() const;
-    bool ProcessAlert(bool fThread = true);
+    bool ProcessAlert(bool fThread = true); // fThread means run -alertnotify in a free-running thread
+    static void Notify(const std::string& strMessage, bool fThread);
 
     /*
      * Get copy of (active) alert object by hash. Returns a null alert if it is not found.
diff --git a/src/main.cpp b/src/main.cpp
index 5d46c30a9be6..106c336a8358 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1178,14 +1178,9 @@ void CheckForkWarningConditions()
     {
         if (!fLargeWorkForkFound)
         {
-            std::string strCmd = GetArg("-alertnotify", "");
-            if (!strCmd.empty())
-            {
-                std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
-                                      pindexBestForkBase->phashBlock->ToString() + std::string("'");
-                boost::replace_all(strCmd, "%s", warning);
-                boost::thread t(runCommand, strCmd); // thread runs free
-            }
+            std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
+                pindexBestForkBase->phashBlock->ToString() + std::string("'");
+            CAlert::Notify(warning, true);
         }
         if (pindexBestForkTip)
         {

From dbca89b74b76610331d21656cd6747f5bf8375d6 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 7 Oct 2014 14:22:58 -0400
Subject: [PATCH 0845/1819] Trigger -alertnotify if network is upgrading
 without you

This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.

Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.

And adds a forknotify.py regression test to make sure it works.

Tested using forknotify.py:

Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks

Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks

After final code in this pull:
Tests successful
---
 qa/pull-tester/build-tests.sh.in |  1 +
 qa/rpc-tests/forknotify.py       | 65 ++++++++++++++++++++++++++++++++
 src/main.cpp                     |  7 +++-
 src/miner.cpp                    |  5 +++
 4 files changed, 77 insertions(+), 1 deletion(-)
 create mode 100755 qa/rpc-tests/forknotify.py

diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in
index ebf377a489c2..1ef47d77f4d1 100755
--- a/qa/pull-tester/build-tests.sh.in
+++ b/qa/pull-tester/build-tests.sh.in
@@ -75,6 +75,7 @@ make check
 # Run RPC integration test on Linux:
 @abs_top_srcdir@/qa/rpc-tests/wallet.sh @abs_top_srcdir@/linux-build/src
 @abs_top_srcdir@/qa/rpc-tests/listtransactions.py --srcdir @abs_top_srcdir@/linux-build/src
+@abs_top_srcdir@/qa/rpc-tests/forknotify.py --srcdir @abs_top_srcdir@/linux-build/src
 # Clean up cache/ directory that the python regression tests create
 rm -rf cache
 
diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
new file mode 100755
index 000000000000..a482f7cc5ad6
--- /dev/null
+++ b/qa/rpc-tests/forknotify.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#
+# Test -alertnotify 
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os
+import shutil
+
+class ForkNotifyTest(BitcoinTestFramework):
+
+    alert_filename = None  # Set by setup_network
+
+    def setup_network(self, test_dir):
+        nodes = []
+        self.alert_filename = os.path.join(test_dir, "alert.txt")
+        with open(self.alert_filename, 'w') as f:
+            pass  # Just open then close to create zero-length file
+        nodes.append(start_node(0, test_dir,
+                            ["-blockversion=2", "-alertnotify=echo %s >> '" + self.alert_filename + "'"]))
+        # Node1 mines block.version=211 blocks
+        nodes.append(start_node(1, test_dir,
+                                ["-blockversion=211"]))
+        connect_nodes(nodes[1], 0)
+
+        sync_blocks(nodes)
+        return nodes
+        
+
+    def run_test(self, nodes):
+        # Mine 51 up-version blocks
+        nodes[1].setgenerate(True, 51)
+        sync_blocks(nodes)
+        # -alertnotify should trigger on the 51'st,
+        # but mine and sync another to give
+        # -alertnotify time to write
+        nodes[1].setgenerate(True, 1)
+        sync_blocks(nodes)
+
+        with open(self.alert_filename, 'r') as f:
+            alert_text = f.read()
+
+        if len(alert_text) == 0:
+            raise AssertionError("-alertnotify did not warn of up-version blocks")
+
+        # Mine more up-version blocks, should not get more alerts:
+        nodes[1].setgenerate(True, 1)
+        sync_blocks(nodes)
+        nodes[1].setgenerate(True, 1)
+        sync_blocks(nodes)
+
+        with open(self.alert_filename, 'r') as f:
+            alert_text2 = f.read()
+
+        if alert_text != alert_text2:
+            raise AssertionError("-alertnotify excessive warning of up-version blocks")
+
+if __name__ == '__main__':
+    ForkNotifyTest().main()
diff --git a/src/main.cpp b/src/main.cpp
index 106c336a8358..43b81aaef837 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1755,7 +1755,8 @@ void static UpdateTip(CBlockIndex *pindexNew) {
     cvBlockChange.notify_all();
 
     // Check the version of the last 100 blocks to see if we need to upgrade:
-    if (!IsInitialBlockDownload())
+    static bool fWarned = false;
+    if (!IsInitialBlockDownload() && !fWarned)
     {
         int nUpgraded = 0;
         const CBlockIndex* pindex = chainActive.Tip();
@@ -1768,8 +1769,12 @@ void static UpdateTip(CBlockIndex *pindexNew) {
         if (nUpgraded > 0)
             LogPrintf("SetBestChain: %d of last 100 blocks above version %d\n", nUpgraded, (int)CBlock::CURRENT_VERSION);
         if (nUpgraded > 100/2)
+        {
             // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
             strMiscWarning = _("Warning: This version is obsolete, upgrade required!");
+            CAlert::Notify(strMiscWarning, true);
+            fWarned = true;
+        }
     }
 }
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 280349e8c2d5..2eb028b1d32b 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -83,6 +83,11 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         return NULL;
     CBlock *pblock = &pblocktemplate->block; // pointer for convenience
 
+    // -regtest only: allow overriding block.nVersion with
+    // -blockversion=N to test forking scenarios
+    if (Params().MineBlocksOnDemand())
+        pblock->nVersion = GetArg("-blockversion", pblock->nVersion);
+
     // Create coinbase tx
     CMutableTransaction txNew;
     txNew.vin.resize(1);

From caecb42b3863634aa2c2301f85b1297e5044ecf4 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 10 Oct 2014 03:23:44 +0000
Subject: [PATCH 0846/1819] Travis: Descriptive build names

---
 .travis.yml | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 89b2238655fc..94d1c15f80a5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,8 @@
 # errata:
 # - A travis bug causes caches to trample eachother when using the same
 #   compiler key (which we don't use anyway). This is worked around for now by
-#   using the phony compilers "true X". These can be removed when the travis
-#   bug is fixed. See: https://github.com/travis-ci/casher/issues/6
+#   replacing the "compilers" with a build name prefixed by the no-op ":"
+#   command. See: https://github.com/travis-ci/casher/issues/6
 
 os: linux
 language: cpp
@@ -24,19 +24,19 @@ cache:
 matrix:
   fast_finish: true
   include:
-    - compiler: "true 1"
+    - compiler: ": ARM"
       env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
-    - compiler: "true 2"
+    - compiler: ": bitcoind"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
-    - compiler: "true 3"
+    - compiler: ": No wallet"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
-    - compiler: "true 4"
+    - compiler: ": 32-bit + dash"
       env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
-    - compiler: "true 5"
+    - compiler: ": Cross-Mac"
       env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
-    - compiler: "true 6"
+    - compiler: ": Win64"
       env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
-    - compiler: "true 7"
+    - compiler: ": Win32"
       env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
 install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi

From 6de50c3c9a89e72f3152a1df7775572d5c8ad0e7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 9 Oct 2014 11:04:49 +0200
Subject: [PATCH 0847/1819] qt: add network-specific style object

Mainly cleanups: Gets rid of isTestNet everywhere, by keeping track
of network-specific theming in a central place.

Also makes GUI no longer dependent on the network ID enumeration, which
alleviates concerns about #4802.
---
 src/Makefile.qt.include |  2 ++
 src/qt/bitcoin.cpp      | 25 +++++++++---------
 src/qt/bitcoingui.cpp   | 57 +++++++++++------------------------------
 src/qt/bitcoingui.h     |  7 ++---
 src/qt/networkstyle.cpp | 47 +++++++++++++++++++++++++++++++++
 src/qt/networkstyle.h   | 33 ++++++++++++++++++++++++
 src/qt/splashscreen.cpp | 25 +++++++-----------
 src/qt/splashscreen.h   |  4 ++-
 8 files changed, 125 insertions(+), 75 deletions(-)
 create mode 100644 src/qt/networkstyle.cpp
 create mode 100644 src/qt/networkstyle.h

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 1ea039adb392..872a0cf1c535 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -178,6 +178,7 @@ BITCOIN_QT_H = \
   qt/macdockiconhandler.h \
   qt/macnotificationhandler.h \
   qt/monitoreddatamapper.h \
+  qt/networkstyle.h \
   qt/notificator.h \
   qt/openuridialog.h \
   qt/optionsdialog.h \
@@ -269,6 +270,7 @@ BITCOIN_QT_CPP = \
   qt/guiutil.cpp \
   qt/intro.cpp \
   qt/monitoreddatamapper.cpp \
+  qt/networkstyle.cpp \
   qt/notificator.cpp \
   qt/optionsdialog.cpp \
   qt/optionsmodel.cpp \
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 5e2fdc6c30e8..9872ebc1f640 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -12,6 +12,7 @@
 #include "guiconstants.h"
 #include "guiutil.h"
 #include "intro.h"
+#include "networkstyle.h"
 #include "optionsmodel.h"
 #include "splashscreen.h"
 #include "utilitydialog.h"
@@ -190,9 +191,9 @@ class BitcoinApplication: public QApplication
     /// Create options model
     void createOptionsModel();
     /// Create main window
-    void createWindow(bool isaTestNet);
+    void createWindow(const NetworkStyle *networkStyle);
     /// Create splash screen
-    void createSplashScreen(bool isaTestNet);
+    void createSplashScreen(const NetworkStyle *networkStyle);
 
     /// Request core initialization
     void requestInitialize();
@@ -331,18 +332,18 @@ void BitcoinApplication::createOptionsModel()
     optionsModel = new OptionsModel();
 }
 
-void BitcoinApplication::createWindow(bool isaTestNet)
+void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
 {
-    window = new BitcoinGUI(isaTestNet, 0);
+    window = new BitcoinGUI(networkStyle, 0);
 
     pollShutdownTimer = new QTimer(window);
     connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
     pollShutdownTimer->start(200);
 }
 
-void BitcoinApplication::createSplashScreen(bool isaTestNet)
+void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
 {
-    SplashScreen *splash = new SplashScreen(0, isaTestNet);
+    SplashScreen *splash = new SplashScreen(0, networkStyle);
     // We don't hold a direct pointer to the splash screen after creation, so use
     // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
     splash->setAttribute(Qt::WA_DeleteOnClose);
@@ -572,12 +573,10 @@ int main(int argc, char *argv[])
     if (!PaymentServer::ipcParseCommandLine(argc, argv))
         exit(0);
 #endif
-    bool isaTestNet = Params().NetworkID() != CBaseChainParams::MAIN;
+    QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
+    assert(!networkStyle.isNull());
     // Allow for separate UI settings for testnets
-    if (isaTestNet)
-        QApplication::setApplicationName(QAPP_APP_NAME_TESTNET);
-    else
-        QApplication::setApplicationName(QAPP_APP_NAME_DEFAULT);
+    QApplication::setApplicationName(networkStyle->getAppName());
     // Re-initialize translations after changing application name (language in network-specific settings can be different)
     initTranslations(qtTranslatorBase, qtTranslator, translatorBase, translator);
 
@@ -617,11 +616,11 @@ int main(int argc, char *argv[])
     uiInterface.InitMessage.connect(InitMessage);
 
     if (GetBoolArg("-splash", true) && !GetBoolArg("-min", false))
-        app.createSplashScreen(isaTestNet);
+        app.createSplashScreen(networkStyle.data());
 
     try
     {
-        app.createWindow(isaTestNet);
+        app.createWindow(networkStyle.data());
         app.requestInitialize();
 #if defined(Q_OS_WIN) && QT_VERSION >= 0x050000
         WinShutdownMonitor::registerShutdownBlockReason(QObject::tr("Bitcoin Core didn't yet exit safely..."), (HWND)app.getMainWinId());
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 7380fbd240f2..8a945606dcd0 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -8,6 +8,7 @@
 #include "clientmodel.h"
 #include "guiconstants.h"
 #include "guiutil.h"
+#include "networkstyle.h"
 #include "notificator.h"
 #include "openuridialog.h"
 #include "optionsdialog.h"
@@ -59,7 +60,7 @@
 
 const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
 
-BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
+BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     QMainWindow(parent),
     clientModel(0),
     walletFrame(0),
@@ -112,26 +113,13 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     } else {
         windowTitle += tr("Node");
     }
-
-    if (!fIsTestnet)
-    {
+    windowTitle += " " + networkStyle->getTitleAddText();
 #ifndef Q_OS_MAC
-        QApplication::setWindowIcon(QIcon(":icons/bitcoin"));
-        setWindowIcon(QIcon(":icons/bitcoin"));
+    QApplication::setWindowIcon(networkStyle->getAppIcon());
+    setWindowIcon(networkStyle->getAppIcon());
 #else
-        MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin"));
+    MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
 #endif
-    }
-    else
-    {
-        windowTitle += " " + tr("[testnet]");
-#ifndef Q_OS_MAC
-        QApplication::setWindowIcon(QIcon(":icons/bitcoin_testnet"));
-        setWindowIcon(QIcon(":icons/bitcoin_testnet"));
-#else
-        MacDockIconHandler::instance()->setIcon(QIcon(":icons/bitcoin_testnet"));
-#endif
-    }
     setWindowTitle(windowTitle);
 
 #if defined(Q_OS_MAC) && QT_VERSION < 0x050000
@@ -161,7 +149,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
 
     // Create actions for the toolbar, menu bar and tray/dock icon
     // Needs walletFrame to be initialized
-    createActions(fIsTestnet);
+    createActions(networkStyle);
 
     // Create application menu bar
     createMenuBar();
@@ -170,7 +158,7 @@ BitcoinGUI::BitcoinGUI(bool fIsTestnet, QWidget *parent) :
     createToolBars();
 
     // Create system tray icon and notification
-    createTrayIcon(fIsTestnet);
+    createTrayIcon(networkStyle);
 
     // Create status bar
     statusBar();
@@ -248,7 +236,7 @@ BitcoinGUI::~BitcoinGUI()
 #endif
 }
 
-void BitcoinGUI::createActions(bool fIsTestnet)
+void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
 {
     QActionGroup *tabGroup = new QActionGroup(this);
 
@@ -295,10 +283,7 @@ void BitcoinGUI::createActions(bool fIsTestnet)
     quitAction->setStatusTip(tr("Quit application"));
     quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
     quitAction->setMenuRole(QAction::QuitRole);
-    if (!fIsTestnet)
-        aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Bitcoin Core"), this);
-    else
-        aboutAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&About Bitcoin Core"), this);
+    aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About Bitcoin Core"), this);
     aboutAction->setStatusTip(tr("Show information about Bitcoin Core"));
     aboutAction->setMenuRole(QAction::AboutRole);
 #if QT_VERSION < 0x050000
@@ -311,10 +296,7 @@ void BitcoinGUI::createActions(bool fIsTestnet)
     optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
     optionsAction->setStatusTip(tr("Modify configuration options for Bitcoin"));
     optionsAction->setMenuRole(QAction::PreferencesRole);
-    if (!fIsTestnet)
-        toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Show / Hide"), this);
-    else
-        toggleHideAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&Show / Hide"), this);
+    toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this);
     toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
 
     encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
@@ -505,22 +487,13 @@ void BitcoinGUI::setWalletActionsEnabled(bool enabled)
     openAction->setEnabled(enabled);
 }
 
-void BitcoinGUI::createTrayIcon(bool fIsTestnet)
+void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
 {
 #ifndef Q_OS_MAC
     trayIcon = new QSystemTrayIcon(this);
-
-    if (!fIsTestnet)
-    {
-        trayIcon->setToolTip(tr("Bitcoin Core client"));
-        trayIcon->setIcon(QIcon(":/icons/bitcoin"));
-    }
-    else
-    {
-        trayIcon->setToolTip(tr("Bitcoin Core client") + " " + tr("[testnet]"));
-        trayIcon->setIcon(QIcon(":/icons/bitcoin_testnet"));
-    }
-
+    QString toolTip = tr("Bitcoin Core client") + " " + networkStyle->getTitleAddText();
+    trayIcon->setToolTip(toolTip);
+    trayIcon->setIcon(networkStyle->getAppIcon());
     trayIcon->show();
 #endif
 
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 8af6eda867a2..f65f0e91379d 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -19,6 +19,7 @@
 #include <QSystemTrayIcon>
 
 class ClientModel;
+class NetworkStyle;
 class Notificator;
 class OptionsModel;
 class RPCConsole;
@@ -46,7 +47,7 @@ class BitcoinGUI : public QMainWindow
 public:
     static const QString DEFAULT_WALLET;
 
-    explicit BitcoinGUI(bool fIsTestnet = false, QWidget *parent = 0);
+    explicit BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent = 0);
     ~BitcoinGUI();
 
     /** Set the client model.
@@ -114,13 +115,13 @@ class BitcoinGUI : public QMainWindow
     int spinnerFrame;
 
     /** Create the main UI actions. */
-    void createActions(bool fIsTestnet);
+    void createActions(const NetworkStyle *networkStyle);
     /** Create the menu bar and sub-menus. */
     void createMenuBar();
     /** Create the toolbars */
     void createToolBars();
     /** Create system tray icon and notification */
-    void createTrayIcon(bool fIsTestnet);
+    void createTrayIcon(const NetworkStyle *networkStyle);
     /** Create system tray menu (or setup the dock menu) */
     void createTrayIconMenu();
 
diff --git a/src/qt/networkstyle.cpp b/src/qt/networkstyle.cpp
new file mode 100644
index 000000000000..62c44703f470
--- /dev/null
+++ b/src/qt/networkstyle.cpp
@@ -0,0 +1,47 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "networkstyle.h"
+
+#include "guiconstants.h"
+
+#include <QApplication>
+
+static const struct {
+    const char *networkId;
+    const char *appName;
+    const char *appIcon;
+    const char *titleAddText;
+    const char *splashImage;
+} network_styles[] = {
+    {"main", QAPP_APP_NAME_DEFAULT, ":/icons/bitcoin", "", ":/images/splash"},
+    {"test", QAPP_APP_NAME_TESTNET, ":/icons/bitcoin_testnet", QT_TRANSLATE_NOOP("SplashScreen", "[testnet]"), ":/images/splash_testnet"},
+    {"regtest", QAPP_APP_NAME_TESTNET, ":/icons/bitcoin_testnet", "[regtest]", ":/images/splash_testnet"}
+};
+static const unsigned network_styles_count = sizeof(network_styles)/sizeof(*network_styles);
+
+// titleAddText needs to be const char* for tr()
+NetworkStyle::NetworkStyle(const QString &appName, const QString &appIcon, const char *titleAddText, const QString &splashImage):
+    appName(appName),
+    appIcon(appIcon),
+    titleAddText(qApp->translate("SplashScreen", titleAddText)),
+    splashImage(splashImage)
+{
+}
+
+const NetworkStyle *NetworkStyle::instantiate(const QString &networkId)
+{
+    for (unsigned x=0; x<network_styles_count; ++x)
+    {
+        if (networkId == network_styles[x].networkId)
+        {
+            return new NetworkStyle(
+                    network_styles[x].appName,
+                    network_styles[x].appIcon,
+                    network_styles[x].titleAddText,
+                    network_styles[x].splashImage);
+        }
+    }
+    return 0;
+}
diff --git a/src/qt/networkstyle.h b/src/qt/networkstyle.h
new file mode 100644
index 000000000000..99304d61a3ab
--- /dev/null
+++ b/src/qt/networkstyle.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_NETWORKSTYLE
+#define H_NETWORKSTYLE
+
+#include <QIcon>
+#include <QPixmap>
+#include <QString>
+
+/* Coin network-specific GUI style information */
+class NetworkStyle
+{
+public:
+    /** Get style associated with provided BIP70 network id, or 0 if not known */
+    static const NetworkStyle *instantiate(const QString &networkId);
+
+    const QString &getAppName() const { return appName; }
+    const QIcon &getAppIcon() const { return appIcon; }
+    const QString &getTitleAddText() const { return titleAddText; }
+    const QPixmap &getSplashImage() const { return splashImage; }
+
+private:
+    NetworkStyle(const QString &appName, const QString &appIcon, const char *titleAddText, const QString &splashImage);
+
+    QString appName;
+    QIcon appIcon;
+    QString titleAddText;
+    QPixmap splashImage;
+};
+
+#endif // H_NETWORKSTYLE
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index 4fe610794f79..360008ea8336 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -6,6 +6,7 @@
 
 #include "clientversion.h"
 #include "init.h"
+#include "networkstyle.h"
 #include "ui_interface.h"
 #include "util.h"
 #include "version.h"
@@ -19,7 +20,7 @@
 #include <QDesktopWidget>
 #include <QPainter>
 
-SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
+SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle) :
     QWidget(0, f), curAlignment(0)
 {
     // set reference point, paddings
@@ -34,17 +35,12 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
     QString titleText       = tr("Bitcoin Core");
     QString versionText     = QString("Version %1").arg(QString::fromStdString(FormatFullVersion()));
     QString copyrightText   = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Bitcoin Core developers"));
-    QString testnetAddText  = QString(tr("[testnet]")); // define text to place as single text object
+    QString titleAddText    = networkStyle->getTitleAddText();
 
     QString font            = "Arial";
 
     // load the bitmap for writing some text over it
-    if(isTestNet) {
-        pixmap     = QPixmap(":/images/splash_testnet");
-    }
-    else {
-        pixmap     = QPixmap(":/images/splash");
-    }
+    pixmap     = networkStyle->getSplashImage();
 
     QPainter pixPaint(&pixmap);
     pixPaint.setPen(QColor(100,100,100));
@@ -78,23 +74,20 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, bool isTestNet) :
     pixPaint.setFont(QFont(font, 10*fontFactor));
     pixPaint.drawText(pixmap.width()-titleTextWidth-paddingRight,paddingTop+titleCopyrightVSpace,copyrightText);
 
-    // draw testnet string if testnet is on
-    if(isTestNet) {
+    // draw additional text if special network
+    if(!titleAddText.isEmpty()) {
         QFont boldFont = QFont(font, 10*fontFactor);
         boldFont.setWeight(QFont::Bold);
         pixPaint.setFont(boldFont);
         fm = pixPaint.fontMetrics();
-        int testnetAddTextWidth  = fm.width(testnetAddText);
-        pixPaint.drawText(pixmap.width()-testnetAddTextWidth-10,15,testnetAddText);
+        int titleAddTextWidth  = fm.width(titleAddText);
+        pixPaint.drawText(pixmap.width()-titleAddTextWidth-10,15,titleAddText);
     }
 
     pixPaint.end();
 
     // Set window title
-    if(isTestNet)
-        setWindowTitle(titleText + " " + testnetAddText);
-    else
-        setWindowTitle(titleText);
+    setWindowTitle(titleText + " " + titleAddText);
 
     // Resize window and move to center of desktop, disallow resizing
     QRect r(QPoint(), pixmap.size());
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index 89c21e64579f..128edadbee40 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -7,6 +7,8 @@
 
 #include <QSplashScreen>
 
+class NetworkStyle;
+
 /** Class for the splashscreen with information of the running client.
  *
  * @note this is intentionally not a QSplashScreen. Bitcoin Core initialization
@@ -18,7 +20,7 @@ class SplashScreen : public QWidget
     Q_OBJECT
 
 public:
-    explicit SplashScreen(Qt::WindowFlags f, bool isTestNet);
+    explicit SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle);
     ~SplashScreen();
 
 protected:

From e11712df7ea5e946c5ec008d1c761187b495f872 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sun, 31 Aug 2014 21:32:23 +0200
Subject: [PATCH 0848/1819] Move checkpoint data selection to chainparams

---
 src/chainparams.cpp | 72 +++++++++++++++++++++++++++++++++++++++-
 src/chainparams.h   |  2 ++
 src/checkpoints.cpp | 81 +++------------------------------------------
 src/checkpoints.h   | 12 ++++++-
 4 files changed, 89 insertions(+), 78 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 31c67715c87f..a81b618208e1 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -44,6 +44,57 @@ static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data
     }
 }
 
+    // What makes a good checkpoint block?
+    // + Is surrounded by blocks with reasonable timestamps
+    //   (no blocks before with a timestamp after, none after with
+    //    timestamp before)
+    // + Contains no strange transactions
+static Checkpoints::MapCheckpoints mapCheckpoints =
+        boost::assign::map_list_of
+        ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
+        ( 33333, uint256("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"))
+        ( 74000, uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))
+        (105000, uint256("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"))
+        (134444, uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"))
+        (168000, uint256("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"))
+        (193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
+        (210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
+        (216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
+        (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
+        (250000, uint256("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"))
+        (279000, uint256("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"))
+        (295000, uint256("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))
+        ;
+static const Checkpoints::CCheckpointData data = {
+        &mapCheckpoints,
+        1397080064, // * UNIX timestamp of last checkpoint block
+        36544669,   // * total number of transactions between genesis and last checkpoint
+                    //   (the tx=... number in the SetBestChain debug.log lines)
+        60000.0     // * estimated number of transactions per day after checkpoint
+    };
+
+static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
+        boost::assign::map_list_of
+        ( 546, uint256("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
+        ;
+static const Checkpoints::CCheckpointData dataTestnet = {
+        &mapCheckpointsTestnet,
+        1337966069,
+        1488,
+        300
+    };
+
+static Checkpoints::MapCheckpoints mapCheckpointsRegtest =
+        boost::assign::map_list_of
+        ( 0, uint256("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"))
+        ;
+static const Checkpoints::CCheckpointData dataRegtest = {
+        &mapCheckpointsRegtest,
+        0,
+        0,
+        0
+    };
+
 class CMainParams : public CChainParams {
 public:
     CMainParams() {
@@ -117,6 +168,11 @@ class CMainParams : public CChainParams {
         fMineBlocksOnDemand = false;
         fSkipProofOfWorkCheck = false;
     }
+
+    const Checkpoints::CCheckpointData& Checkpoints() const 
+    {
+        return data;
+    }
 };
 static CMainParams mainParams;
 
@@ -173,6 +229,10 @@ class CTestNetParams : public CMainParams {
         fRequireStandard = false;
         fMineBlocksOnDemand = false;
     }
+    const Checkpoints::CCheckpointData& Checkpoints() const 
+    {
+        return dataTestnet;
+    }
 };
 static CTestNetParams testNetParams;
 
@@ -212,6 +272,10 @@ class CRegTestParams : public CTestNetParams {
         fRequireStandard = false;
         fMineBlocksOnDemand = true;
     }
+    const Checkpoints::CCheckpointData& Checkpoints() const 
+    {
+        return dataRegtest;
+    }
 };
 static CRegTestParams regTestParams;
 
@@ -233,7 +297,13 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
         fAllowMinDifficultyBlocks = false;
         fMineBlocksOnDemand = true;
     }
-public:
+
+    const Checkpoints::CCheckpointData& Checkpoints() const 
+    {
+        // UnitTest share the same checkpoints as MAIN
+        return data;
+    }
+
     // Published setters to allow changing values in unit test cases
     virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
diff --git a/src/chainparams.h b/src/chainparams.h
index 50441a89f3de..d3b1781b4d8b 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -8,6 +8,7 @@
 
 #include "core.h"
 #include "chainparamsbase.h"
+#include "checkpoints.h"
 #include "protocol.h"
 #include "uint256.h"
 
@@ -77,6 +78,7 @@ class CChainParams
     const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
     const std::vector<CAddress>& FixedSeeds() const { return vFixedSeeds; }
+    virtual const Checkpoints::CCheckpointData& Checkpoints() const = 0;
 protected:
     CChainParams() {}
 
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index 9a6bc05e63d9..fbde47339d9c 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -4,18 +4,16 @@
 
 #include "checkpoints.h"
 
+#include "chainparams.h"
 #include "main.h"
 #include "uint256.h"
 
 #include <stdint.h>
 
-#include <boost/assign/list_of.hpp> // for 'map_list_of()'
 #include <boost/foreach.hpp>
 
 namespace Checkpoints {
 
-    typedef std::map<int, uint256> MapCheckpoints;
-
     // How many times we expect transactions after the last checkpoint to
     // be slower. This number is a compromise, as it can't be accurate for
     // every system. When reindexing from a fast disk with a slow CPU, it
@@ -23,83 +21,14 @@ namespace Checkpoints {
     // fast multicore CPU, it won't be much higher than 1.
     static const double SIGCHECK_VERIFICATION_FACTOR = 5.0;
 
-    struct CCheckpointData {
-        const MapCheckpoints *mapCheckpoints;
-        int64_t nTimeLastCheckpoint;
-        int64_t nTransactionsLastCheckpoint;
-        double fTransactionsPerDay;
-    };
-
     bool fEnabled = true;
 
-    // What makes a good checkpoint block?
-    // + Is surrounded by blocks with reasonable timestamps
-    //   (no blocks before with a timestamp after, none after with
-    //    timestamp before)
-    // + Contains no strange transactions
-    static MapCheckpoints mapCheckpoints =
-        boost::assign::map_list_of
-        ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
-        ( 33333, uint256("0x000000002dd5588a74784eaa7ab0507a18ad16a236e7b1ce69f00d7ddfb5d0a6"))
-        ( 74000, uint256("0x0000000000573993a3c9e41ce34471c079dcf5f52a0e824a81e7f953b8661a20"))
-        (105000, uint256("0x00000000000291ce28027faea320c8d2b054b2e0fe44a773f3eefb151d6bdc97"))
-        (134444, uint256("0x00000000000005b12ffd4cd315cd34ffd4a594f430ac814c91184a0d42d2b0fe"))
-        (168000, uint256("0x000000000000099e61ea72015e79632f216fe6cb33d7899acb35b75c8303b763"))
-        (193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
-        (210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
-        (216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
-        (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
-        (250000, uint256("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"))
-        (279000, uint256("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"))
-        (295000, uint256("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))
-        ;
-    static const CCheckpointData data = {
-        &mapCheckpoints,
-        1397080064, // * UNIX timestamp of last checkpoint block
-        36544669,   // * total number of transactions between genesis and last checkpoint
-                    //   (the tx=... number in the SetBestChain debug.log lines)
-        60000.0     // * estimated number of transactions per day after checkpoint
-    };
-
-    static MapCheckpoints mapCheckpointsTestnet =
-        boost::assign::map_list_of
-        ( 546, uint256("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70"))
-        ;
-    static const CCheckpointData dataTestnet = {
-        &mapCheckpointsTestnet,
-        1337966069,
-        1488,
-        300
-    };
-
-    static MapCheckpoints mapCheckpointsRegtest =
-        boost::assign::map_list_of
-        ( 0, uint256("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"))
-        ;
-    static const CCheckpointData dataRegtest = {
-        &mapCheckpointsRegtest,
-        0,
-        0,
-        0
-    };
-
-    const CCheckpointData &Checkpoints() {
-        if (Params().NetworkID() == CBaseChainParams::TESTNET)
-            return dataTestnet;
-        else if (Params().NetworkID() == CBaseChainParams::MAIN)
-            return data;
-        else if (Params().NetworkID() == CBaseChainParams::UNITTEST) // UnitTest share the same checkpoints as MAIN
-            return data;
-        else
-            return dataRegtest;
-    }
-
     bool CheckBlock(int nHeight, const uint256& hash)
     {
         if (!fEnabled)
             return true;
 
-        const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
+        const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
 
         MapCheckpoints::const_iterator i = checkpoints.find(nHeight);
         if (i == checkpoints.end()) return true;
@@ -119,7 +48,7 @@ namespace Checkpoints {
         // Work is defined as: 1.0 per transaction before the last checkpoint, and
         // fSigcheckVerificationFactor per transaction after.
 
-        const CCheckpointData &data = Checkpoints();
+        const CCheckpointData &data = Params().Checkpoints();
 
         if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
             double nCheapBefore = pindex->nChainTx;
@@ -143,7 +72,7 @@ namespace Checkpoints {
         if (!fEnabled)
             return 0;
 
-        const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
+        const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
 
         return checkpoints.rbegin()->first;
     }
@@ -153,7 +82,7 @@ namespace Checkpoints {
         if (!fEnabled)
             return NULL;
 
-        const MapCheckpoints& checkpoints = *Checkpoints().mapCheckpoints;
+        const MapCheckpoints& checkpoints = *Params().Checkpoints().mapCheckpoints;
 
         BOOST_REVERSE_FOREACH(const MapCheckpoints::value_type& i, checkpoints)
         {
diff --git a/src/checkpoints.h b/src/checkpoints.h
index fca046559ae9..b5b620fa6b2e 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -5,16 +5,26 @@
 #ifndef BITCOIN_CHECKPOINT_H
 #define BITCOIN_CHECKPOINT_H
 
+#include "uint256.h"
+
 #include <map>
 
 class CBlockIndex;
-class uint256;
 
 /** Block-chain checkpoints are compiled-in sanity checks.
  * They are updated every release or three.
  */
 namespace Checkpoints
 {
+typedef std::map<int, uint256> MapCheckpoints;
+
+struct CCheckpointData {
+    const MapCheckpoints *mapCheckpoints;
+    int64_t nTimeLastCheckpoint;
+    int64_t nTransactionsLastCheckpoint;
+    double fTransactionsPerDay;
+};
+
 // Returns true if block passes checkpoint checks
 bool CheckBlock(int nHeight, const uint256& hash);
 

From cc972107997122cb31f015b4e70f81781dbce784 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sun, 31 Aug 2014 22:32:52 +0200
Subject: [PATCH 0849/1819] Add fTestnetToBeDeprecatedFieldRPC to CChainParams

---
 src/chainparams.cpp | 3 +++
 src/chainparams.h   | 3 +++
 src/rpcmining.cpp   | 2 +-
 src/rpcmisc.cpp     | 2 +-
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index a81b618208e1..f2a14b8293cb 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -167,6 +167,7 @@ class CMainParams : public CChainParams {
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
         fSkipProofOfWorkCheck = false;
+        fTestnetToBeDeprecatedFieldRPC = false;
     }
 
     const Checkpoints::CCheckpointData& Checkpoints() const 
@@ -228,6 +229,7 @@ class CTestNetParams : public CMainParams {
         fAllowMinDifficultyBlocks = true;
         fRequireStandard = false;
         fMineBlocksOnDemand = false;
+        fTestnetToBeDeprecatedFieldRPC = true;
     }
     const Checkpoints::CCheckpointData& Checkpoints() const 
     {
@@ -271,6 +273,7 @@ class CRegTestParams : public CTestNetParams {
         fAllowMinDifficultyBlocks = true;
         fRequireStandard = false;
         fMineBlocksOnDemand = true;
+        fTestnetToBeDeprecatedFieldRPC = false;
     }
     const Checkpoints::CCheckpointData& Checkpoints() const 
     {
diff --git a/src/chainparams.h b/src/chainparams.h
index d3b1781b4d8b..21d3b4d526a5 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -72,6 +72,8 @@ class CChainParams
     /* Make miner stop after a block is found. In RPC, don't return
      * until nGenProcLimit blocks are generated */
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
+    /* In the future use NetworkIDString() for RPC fields */
+    bool TestnetToBeDeprecatedFieldRPC() const { return fTestnetToBeDeprecatedFieldRPC; }
     CBaseChainParams::Network NetworkID() const { return networkID; }
     /* Return the BIP70 network string (main, test or regtest) */
     std::string NetworkIDString() const { return strNetworkID; }
@@ -108,6 +110,7 @@ class CChainParams
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
     bool fSkipProofOfWorkCheck;
+    bool fTestnetToBeDeprecatedFieldRPC;
 };
 
 /** Modifiable parameters interface is used by test cases to adapt the parameters in order
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index e794bf69e002..c767835a27ff 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -239,7 +239,7 @@ Value getmininginfo(const Array& params, bool fHelp)
     obj.push_back(Pair("genproclimit",     (int)GetArg("-genproclimit", -1)));
     obj.push_back(Pair("networkhashps",    getnetworkhashps(params, false)));
     obj.push_back(Pair("pooledtx",         (uint64_t)mempool.size()));
-    obj.push_back(Pair("testnet",          Params().NetworkID() == CBaseChainParams::TESTNET));
+    obj.push_back(Pair("testnet",          Params().TestnetToBeDeprecatedFieldRPC()));
     obj.push_back(Pair("chain",            Params().NetworkIDString()));
 #ifdef ENABLE_WALLET
     obj.push_back(Pair("generate",         getgenerate(params, false)));
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index dd45eefd58a9..8be14b567cc9 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -87,7 +87,7 @@ Value getinfo(const Array& params, bool fHelp)
     obj.push_back(Pair("connections",   (int)vNodes.size()));
     obj.push_back(Pair("proxy",         (proxy.IsValid() ? proxy.ToStringIPPort() : string())));
     obj.push_back(Pair("difficulty",    (double)GetDifficulty()));
-    obj.push_back(Pair("testnet",       Params().NetworkID() == CBaseChainParams::TESTNET));
+    obj.push_back(Pair("testnet",       Params().TestnetToBeDeprecatedFieldRPC()));
 #ifdef ENABLE_WALLET
     if (pwalletMain) {
         obj.push_back(Pair("keypoololdest", pwalletMain->GetOldestKeyPoolTime()));

From 6fd546dd9680fff2c442075e511875acbd18b486 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sun, 31 Aug 2014 23:01:54 +0200
Subject: [PATCH 0850/1819] Remove CChainParams::NetworkID()

---
 src/chainparams.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/chainparams.h b/src/chainparams.h
index 21d3b4d526a5..f157419bb26f 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -74,7 +74,6 @@ class CChainParams
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
     /* In the future use NetworkIDString() for RPC fields */
     bool TestnetToBeDeprecatedFieldRPC() const { return fTestnetToBeDeprecatedFieldRPC; }
-    CBaseChainParams::Network NetworkID() const { return networkID; }
     /* Return the BIP70 network string (main, test or regtest) */
     std::string NetworkIDString() const { return strNetworkID; }
     const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }

From b796cb084bd3865d094d86da2f33cd5c68294a43 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Thu, 9 Oct 2014 19:15:38 +0200
Subject: [PATCH 0851/1819] SQUASHME: NetworkIdFromCommandLine() function
 instead of method

---
 src/chainparams.cpp     |  2 +-
 src/chainparamsbase.cpp | 12 ++++++------
 src/chainparamsbase.h   | 13 +++++++------
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f561877d9f43..ec05f592b937 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -242,7 +242,7 @@ void SelectParams(CBaseChainParams::Network network) {
 
 bool SelectParamsFromCommandLine() 
 {
-    CBaseChainParams::Network network = CBaseChainParams::NetworkIdFromCommandLine();
+    CBaseChainParams::Network network = NetworkIdFromCommandLine();
     if (network == CBaseChainParams::MAX_NETWORK_TYPES)
         return false;
 
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 05ef5dd463b6..f275bd544fd2 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -83,23 +83,23 @@ void SelectBaseParams(CBaseChainParams::Network network)
     }
 }
 
-CBaseChainParams::Network CBaseChainParams::NetworkIdFromCommandLine()
+CBaseChainParams::Network NetworkIdFromCommandLine()
 {
     bool fRegTest = GetBoolArg("-regtest", false);
     bool fTestNet = GetBoolArg("-testnet", false);
 
     if (fTestNet && fRegTest)
-        return MAX_NETWORK_TYPES;
+        return CBaseChainParams::MAX_NETWORK_TYPES;
     if (fRegTest)
-        return REGTEST;
+        return CBaseChainParams::REGTEST;
     if (fTestNet)
-        return TESTNET;
-    return MAIN;
+        return CBaseChainParams::TESTNET;
+    return CBaseChainParams::MAIN;
 }
 
 bool SelectBaseParamsFromCommandLine() 
 {
-    CBaseChainParams::Network network = CBaseChainParams::NetworkIdFromCommandLine();
+    CBaseChainParams::Network network = NetworkIdFromCommandLine();
     if (network == CBaseChainParams::MAX_NETWORK_TYPES)
         return false;
 
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index f24337cef0b4..ff3e811988d6 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -26,11 +26,6 @@ class CBaseChainParams
     const std::string& DataDir() const { return strDataDir; }
     int RPCPort() const { return nRPCPort; }
 
-    /**
-     * Looks for -regtest or -testnet and returns the appropriate Network ID.
-     * Returns MAX_NETWORK_TYPES if an invalid combination is given.
-     */
-    static Network NetworkIdFromCommandLine();
 protected:
     CBaseChainParams() {}
 
@@ -49,7 +44,13 @@ const CBaseChainParams& BaseParams();
 void SelectBaseParams(CBaseChainParams::Network network);
 
 /**
- * Calls CBaseChainParams::NetworkIdFromCommandLine() and then calls SelectParams as appropriate.
+ * Looks for -regtest or -testnet and returns the appropriate Network ID.
+ * Returns MAX_NETWORK_TYPES if an invalid combination is given.
+ */
+CBaseChainParams::Network NetworkIdFromCommandLine();
+
+/**
+ * Calls NetworkIdFromCommandLine() and then calls SelectParams as appropriate.
  * Returns false if an invalid combination is given.
  */
 bool SelectBaseParamsFromCommandLine();

From a7d1f035ae2b33d5242d9aee5da1b538a0f5adba Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 10 Oct 2014 13:00:50 -0400
Subject: [PATCH 0852/1819] build: fix dynamic boost check when --with-boost=
 is used

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 87c7833bcee9..90aa11242166 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,7 +521,7 @@ if test x$use_tests = xyes; then
   dnl Determine if -DBOOST_TEST_DYN_LINK is needed
   AC_MSG_CHECKING([for dynamic linked boost test])
   TEMP_LIBS="$LIBS"
-  LIBS="$LIBS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
+  LIBS="$LIBS $BOOST_LDFLAGS $BOOST_UNIT_TEST_FRAMEWORK_LIB"
   TEMP_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
   AC_LINK_IFELSE([AC_LANG_SOURCE([

From d5fd094569e74595af18d42d2aa06738304b715b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 10 Oct 2014 13:03:28 -0400
Subject: [PATCH 0853/1819] build: fix qt test build when libprotobuf is in a
 non-standard path

---
 src/Makefile.qttest.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 2cba5b7e1ef7..23375bef82c5 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -13,7 +13,7 @@ TEST_QT_H = \
   qt/test/paymentservertests.h
 
 qt_test_test_bitcoin_qt_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
-  $(QT_INCLUDES) $(QT_TEST_INCLUDES)
+  $(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
 
 qt_test_test_bitcoin_qt_SOURCES = \
   qt/test/test_main.cpp \

From 005b5af6e2d32cc2a4a37b6edb60aacdfb5e8ed0 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 10 Oct 2014 13:11:47 -0400
Subject: [PATCH 0854/1819] rpc-tests: don't spew non-errors to stdout

There's a brief race here, the process might've already exited and cleaned up
after itself. If that's the case, reading from the pidfile will harmlessly
fail. Keep those quiet.
---
 qa/rpc-tests/send.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/rpc-tests/send.sh b/qa/rpc-tests/send.sh
index 8c0f114590cf..37367865c19f 100755
--- a/qa/rpc-tests/send.sh
+++ b/qa/rpc-tests/send.sh
@@ -16,7 +16,7 @@ fi
 
 if [ $1 = "-STOP" ]; then
   if [ -s ${PIDFILE} ]; then
-      kill -s ${SIGNAL} $(<${PIDFILE})
+      kill -s ${SIGNAL} $(<$PIDFILE 2>/dev/null) 2>/dev/null
   fi
   exit 0
 fi

From 0a08aa8f2ae9acd8e83e09bfae41de2c0a02e1d8 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 10 Oct 2014 21:59:04 +0000
Subject: [PATCH 0855/1819] Parameterise command line option defaults, so
 translations are independent of them

---
 src/bitcoin-cli.cpp |  6 ++--
 src/init.cpp        | 86 ++++++++++++++++++++++-----------------------
 2 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index badb376cb385..aa5e285b104d 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -25,13 +25,13 @@ std::string HelpMessageCli()
     string strUsage;
     strUsage += _("Options:") + "\n";
     strUsage += "  -?                     " + _("This help message") + "\n";
-    strUsage += "  -conf=<file>           " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
+    strUsage += "  -conf=<file>           " + strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf") + "\n";
     strUsage += "  -datadir=<dir>         " + _("Specify data directory") + "\n";
     strUsage += "  -testnet               " + _("Use the test network") + "\n";
     strUsage += "  -regtest               " + _("Enter regression test mode, which uses a special chain in which blocks can be "
                                                 "solved instantly. This is intended for regression testing tools and app development.") + "\n";
-    strUsage += "  -rpcconnect=<ip>       " + _("Send commands to node running on <ip> (default: 127.0.0.1)") + "\n";
-    strUsage += "  -rpcport=<port>        " + _("Connect to JSON-RPC on <port> (default: 8332 or testnet: 18332)") + "\n";
+    strUsage += "  -rpcconnect=<ip>       " + strprintf(_("Send commands to node running on <ip> (default: %s)"), "127.0.0.1") + "\n";
+    strUsage += "  -rpcport=<port>        " + strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"), 8332, 18332) + "\n";
     strUsage += "  -rpcwait               " + _("Wait for RPC server to start") + "\n";
     strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
     strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
diff --git a/src/init.cpp b/src/init.cpp
index 8dcd35fb8f6f..1150bb1f5ee3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -215,9 +215,9 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -?                     " + _("This help message") + "\n";
     strUsage += "  -alertnotify=<cmd>     " + _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)") + "\n";
     strUsage += "  -blocknotify=<cmd>     " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
-    strUsage += "  -checkblocks=<n>       " + _("How many blocks to check at startup (default: 288, 0 = all)") + "\n";
-    strUsage += "  -checklevel=<n>        " + _("How thorough the block verification of -checkblocks is (0-4, default: 3)") + "\n";
-    strUsage += "  -conf=<file>           " + _("Specify configuration file (default: bitcoin.conf)") + "\n";
+    strUsage += "  -checkblocks=<n>       " + strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288) + "\n";
+    strUsage += "  -checklevel=<n>        " + strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3) + "\n";
+    strUsage += "  -conf=<file>           " + strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf") + "\n";
     if (mode == HMM_BITCOIND)
     {
 #if !defined(WIN32)
@@ -231,33 +231,33 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -maxorphantx=<n>       " + strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
 #ifndef WIN32
-    strUsage += "  -pid=<file>            " + _("Specify pid file (default: bitcoind.pid)") + "\n";
+    strUsage += "  -pid=<file>            " + strprintf(_("Specify pid file (default: %s)"), "bitcoind.pid") + "\n";
 #endif
     strUsage += "  -reindex               " + _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup") + "\n";
 #if !defined(WIN32)
     strUsage += "  -sysperms              " + _("Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)") + "\n";
 #endif
-    strUsage += "  -txindex               " + _("Maintain a full transaction index, used by the getrawtransaction rpc call (default: 0)") + "\n";
+    strUsage += "  -txindex               " + strprintf(_("Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)"), 0) + "\n";
 
     strUsage += "\n" + _("Connection options:") + "\n";
     strUsage += "  -addnode=<ip>          " + _("Add a node to connect to and attempt to keep the connection open") + "\n";
-    strUsage += "  -banscore=<n>          " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n";
-    strUsage += "  -bantime=<n>           " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n";
+    strUsage += "  -banscore=<n>          " + strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), 100) + "\n";
+    strUsage += "  -bantime=<n>           " + strprintf(_("Number of seconds to keep misbehaving peers from reconnecting (default: %u)"), 86400) + "\n";
     strUsage += "  -bind=<addr>           " + _("Bind to given address and always listen on it. Use [host]:port notation for IPv6") + "\n";
     strUsage += "  -connect=<ip>          " + _("Connect only to the specified node(s)") + "\n";
     strUsage += "  -discover              " + _("Discover own IP address (default: 1 when listening and no -externalip)") + "\n";
     strUsage += "  -dns                   " + _("Allow DNS lookups for -addnode, -seednode and -connect") + " " + _("(default: 1)") + "\n";
     strUsage += "  -dnsseed               " + _("Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)") + "\n";
     strUsage += "  -externalip=<ip>       " + _("Specify your own public address") + "\n";
-    strUsage += "  -forcednsseed          " + _("Always query for peer addresses via DNS lookup (default: 0)") + "\n";
+    strUsage += "  -forcednsseed          " + strprintf(_("Always query for peer addresses via DNS lookup (default: %u)"), 0) + "\n";
     strUsage += "  -listen                " + _("Accept connections from outside (default: 1 if no -proxy or -connect)") + "\n";
-    strUsage += "  -maxconnections=<n>    " + _("Maintain at most <n> connections to peers (default: 125)") + "\n";
-    strUsage += "  -maxreceivebuffer=<n>  " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n";
-    strUsage += "  -maxsendbuffer=<n>     " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n";
-    strUsage += "  -onion=<ip:port>       " + _("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)") + "\n";
+    strUsage += "  -maxconnections=<n>    " + strprintf(_("Maintain at most <n> connections to peers (default: %u)"), 125) + "\n";
+    strUsage += "  -maxreceivebuffer=<n>  " + strprintf(_("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"), 5000) + "\n";
+    strUsage += "  -maxsendbuffer=<n>     " + strprintf(_("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"), 1000) + "\n";
+    strUsage += "  -onion=<ip:port>       " + strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy") + "\n";
     strUsage += "  -onlynet=<net>         " + _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)") + "\n";
-    strUsage += "  -permitbaremultisig    " + _("Relay non-P2SH multisig (default: 1)") + "\n";
-    strUsage += "  -port=<port>           " + _("Listen for connections on <port> (default: 8333 or testnet: 18333)") + "\n";
+    strUsage += "  -permitbaremultisig    " + strprintf(_("Relay non-P2SH multisig (default: %u)"), 1) + "\n";
+    strUsage += "  -port=<port>           " + strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 8333, 18333) + "\n";
     strUsage += "  -proxy=<ip:port>       " + _("Connect through SOCKS5 proxy") + "\n";
     strUsage += "  -seednode=<ip>         " + _("Connect to a node to retrieve peer addresses, and disconnect") + "\n";
     strUsage += "  -timeout=<n>           " + strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT) + "\n";
@@ -265,7 +265,7 @@ std::string HelpMessage(HelpMessageMode mode)
 #if USE_UPNP
     strUsage += "  -upnp                  " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n";
 #else
-    strUsage += "  -upnp                  " + _("Use UPnP to map the listening port (default: 0)") + "\n";
+    strUsage += "  -upnp                  " + strprintf(_("Use UPnP to map the listening port (default: %u)"), 0) + "\n";
 #endif
 #endif
     strUsage += "  -whitebind=<addr>      " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n";
@@ -275,34 +275,34 @@ std::string HelpMessage(HelpMessageMode mode)
 #ifdef ENABLE_WALLET
     strUsage += "\n" + _("Wallet options:") + "\n";
     strUsage += "  -disablewallet         " + _("Do not load the wallet and disable wallet RPC calls") + "\n";
-    strUsage += "  -keypool=<n>           " + _("Set key pool size to <n> (default: 100)") + "\n";
+    strUsage += "  -keypool=<n>           " + strprintf(_("Set key pool size to <n> (default: %u)"), 100) + "\n";
     if (GetBoolArg("-help-debug", false))
         strUsage += "  -mintxfee=<amt>        " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
-    strUsage += "  -spendzeroconfchange   " + _("Spend unconfirmed change when sending transactions (default: 1)") + "\n";
-    strUsage += "  -txconfirmtarget=<n>   " + _("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)") + "\n";
+    strUsage += "  -spendzeroconfchange   " + strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1) + "\n";
+    strUsage += "  -txconfirmtarget=<n>   " + strprintf(_("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)"), 1) + "\n";
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
-    strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + _("(default: wallet.dat)") + "\n";
+    strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
     strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n";
-    strUsage += "                         " + _("(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
+    strUsage += "                         " + strprintf(_("(default: %u, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"), 1) + "\n";
 #endif
 
     strUsage += "\n" + _("Debugging/Testing options:") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
-        strUsage += "  -checkpoints           " + _("Only accept block chain matching built-in checkpoints (default: 1)") + "\n";
-        strUsage += "  -dblogsize=<n>         " + _("Flush database activity from memory pool to disk log every <n> megabytes (default: 100)") + "\n";
-        strUsage += "  -disablesafemode       " + _("Disable safemode, override a real safe mode event (default: 0)") + "\n";
-        strUsage += "  -testsafemode          " + _("Force safe mode (default: 0)") + "\n";
+        strUsage += "  -checkpoints           " + strprintf(_("Only accept block chain matching built-in checkpoints (default: %u)"), 1) + "\n";
+        strUsage += "  -dblogsize=<n>         " + strprintf(_("Flush database activity from memory pool to disk log every <n> megabytes (default: %u)"), 100) + "\n";
+        strUsage += "  -disablesafemode       " + strprintf(_("Disable safemode, override a real safe mode event (default: %u)"), 0) + "\n";
+        strUsage += "  -testsafemode          " + strprintf(_("Force safe mode (default: %u)"), 0) + "\n";
         strUsage += "  -dropmessagestest=<n>  " + _("Randomly drop 1 of every <n> network messages") + "\n";
         strUsage += "  -fuzzmessagestest=<n>  " + _("Randomly fuzz 1 of every <n> network messages") + "\n";
-        strUsage += "  -flushwallet           " + _("Run a thread to flush wallet periodically (default: 1)") + "\n";
-        strUsage += "  -stopafterblockimport  " + _("Stop running after importing blocks from disk (default: 0)") + "\n";
+        strUsage += "  -flushwallet           " + strprintf(_("Run a thread to flush wallet periodically (default: %u)"), 1) + "\n";
+        strUsage += "  -stopafterblockimport  " + strprintf(_("Stop running after importing blocks from disk (default: %u)"), 0) + "\n";
     }
-    strUsage += "  -debug=<category>      " + _("Output debugging information (default: 0, supplying <category> is optional)") + "\n";
+    strUsage += "  -debug=<category>      " + strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + "\n";
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:");
     strUsage +=                                 " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below
@@ -310,25 +310,25 @@ std::string HelpMessage(HelpMessageMode mode)
         strUsage += ", qt";
     strUsage += ".\n";
 #ifdef ENABLE_WALLET
-    strUsage += "  -gen                   " + _("Generate coins (default: 0)") + "\n";
-    strUsage += "  -genproclimit=<n>      " + _("Set the processor limit for when generation is on (-1 = unlimited, default: -1)") + "\n";
+    strUsage += "  -gen                   " + strprintf(_("Generate coins (default: %u)"), 0) + "\n";
+    strUsage += "  -genproclimit=<n>      " + strprintf(_("Set the processor limit for when generation is on (-1 = unlimited, default: %d)"), -1) + "\n";
 #endif
     strUsage += "  -help-debug            " + _("Show all debugging options (usage: --help -help-debug)") + "\n";
-    strUsage += "  -logips                " + _("Include IP addresses in debug output (default: 0)") + "\n";
-    strUsage += "  -logtimestamps         " + _("Prepend debug output with timestamp (default: 1)") + "\n";
+    strUsage += "  -logips                " + strprintf(_("Include IP addresses in debug output (default: %u)"), 0) + "\n";
+    strUsage += "  -logtimestamps         " + strprintf(_("Prepend debug output with timestamp (default: %u)"), 1) + "\n";
     if (GetBoolArg("-help-debug", false))
     {
-        strUsage += "  -limitfreerelay=<n>    " + _("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:15)") + "\n";
-        strUsage += "  -maxsigcachesize=<n>   " + _("Limit size of signature cache to <n> entries (default: 50000)") + "\n";
+        strUsage += "  -limitfreerelay=<n>    " + strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u)"), 15) + "\n";
+        strUsage += "  -maxsigcachesize=<n>   " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n";
     }
     strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
         strUsage += "  -printblock=<hash>     " + _("Print block on startup, if found in block index") + "\n";
-        strUsage += "  -printblocktree        " + _("Print block tree on startup (default: 0)") + "\n";
-        strUsage += "  -printpriority         " + _("Log transaction priority and fee per kB when mining blocks (default: 0)") + "\n";
-        strUsage += "  -privdb                " + _("Sets the DB_PRIVATE flag in the wallet db environment (default: 1)") + "\n";
+        strUsage += "  -printblocktree        " + strprintf(_("Print block tree on startup (default: %u)"), 0) + "\n";
+        strUsage += "  -printpriority         " + strprintf(_("Log transaction priority and fee per kB when mining blocks (default: %u)"), 0) + "\n";
+        strUsage += "  -privdb                " + strprintf(_("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), 1) + "\n";
         strUsage += "  -regtest               " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
         strUsage += "                         " + _("This is intended for regression testing tools and app development.") + "\n";
         strUsage += "                         " + _("In this mode -genproclimit controls how many blocks are generated immediately.") + "\n";
@@ -337,10 +337,10 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -testnet               " + _("Use the test network") + "\n";
 
     strUsage += "\n" + _("Node relay options:") + "\n";
-    strUsage += "  -datacarrier           " + _("Relay and mine data carrier transactions (default: 1)") + "\n";
+    strUsage += "  -datacarrier           " + strprintf(_("Relay and mine data carrier transactions (default: %u)"), 1) + "\n";
 
     strUsage += "\n" + _("Block creation options:") + "\n";
-    strUsage += "  -blockminsize=<n>      " + _("Set minimum block size in bytes (default: 0)") + "\n";
+    strUsage += "  -blockminsize=<n>      " + strprintf(_("Set minimum block size in bytes (default: %u)"), 0) + "\n";
     strUsage += "  -blockmaxsize=<n>      " + strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE) + "\n";
     strUsage += "  -blockprioritysize=<n> " + strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE) + "\n";
 
@@ -349,15 +349,15 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -rpcbind=<addr>        " + _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)") + "\n";
     strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
     strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
-    strUsage += "  -rpcport=<port>        " + _("Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)") + "\n";
+    strUsage += "  -rpcport=<port>        " + strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 8332, 18332) + "\n";
     strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times") + "\n";
-    strUsage += "  -rpcthreads=<n>        " + _("Set the number of threads to service RPC calls (default: 4)") + "\n";
+    strUsage += "  -rpcthreads=<n>        " + strprintf(_("Set the number of threads to service RPC calls (default: %d)"), 4) + "\n";
 
     strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
     strUsage += "  -rpcssl                                  " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
-    strUsage += "  -rpcsslcertificatechainfile=<file.cert>  " + _("Server certificate file (default: server.cert)") + "\n";
-    strUsage += "  -rpcsslprivatekeyfile=<file.pem>         " + _("Server private key (default: server.pem)") + "\n";
-    strUsage += "  -rpcsslciphers=<ciphers>                 " + _("Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)") + "\n";
+    strUsage += "  -rpcsslcertificatechainfile=<file.cert>  " + strprintf(_("Server certificate file (default: %s)"), "server.cert") + "\n";
+    strUsage += "  -rpcsslprivatekeyfile=<file.pem>         " + strprintf(_("Server private key (default: %s)"), "server.pem") + "\n";
+    strUsage += "  -rpcsslciphers=<ciphers>                 " + strprintf(_("Acceptable ciphers (default: %s)"), "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH") + "\n";
 
     return strUsage;
 }

From ebdb9ff63992fe685688f6d47cd1f3a2938ee607 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sat, 11 Oct 2014 20:56:27 +0200
Subject: [PATCH 0856/1819] SQUASHME: fix "Reserve only one network specific
 cached path per session"

---
 src/util.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 7bb65f65846b..ae7767a1f5c2 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -395,7 +395,8 @@ boost::filesystem::path GetDefaultDataDir()
 #endif
 }
 
-static boost::filesystem::path pathCached[2];
+static boost::filesystem::path pathCached;
+static boost::filesystem::path pathCachedNetSpecific;
 static CCriticalSection csPathCached;
 
 const boost::filesystem::path &GetDataDir(bool fNetSpecific)
@@ -404,7 +405,7 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
     LOCK(csPathCached);
 
-    fs::path &path = pathCached[fNetSpecific ? 1 : 0];
+    fs::path &path = fNetSpecific ? pathCachedNetSpecific : pathCached;
 
     // This can be called during exceptions by LogPrintf(), so we cache the
     // value so we don't have to do memory allocations after that.
@@ -430,7 +431,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
 
 void ClearDatadirCache()
 {
-    std::fill(&pathCached[0], &pathCached[2], boost::filesystem::path());
+    pathCached = boost::filesystem::path();
+    pathCachedNetSpecific = boost::filesystem::path();
 }
 
 boost::filesystem::path GetConfigFile()

From e21b2e0d5f621de5d8d5a9daae910ec512e29aa2 Mon Sep 17 00:00:00 2001
From: Luke <lukem512@users.noreply.github.com>
Date: Mon, 13 Oct 2014 16:57:09 +0100
Subject: [PATCH 0857/1819] Typo in test

---
 src/test/key_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index 203c20731afc..b32f3774fe3e 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(key_test1)
     CKey key1C = bsecret1C.GetKey();
     BOOST_CHECK(key1C.IsCompressed() == true);
     CKey key2C = bsecret2C.GetKey();
-    BOOST_CHECK(key1C.IsCompressed() == true);
+    BOOST_CHECK(key2C.IsCompressed() == true);
 
     CPubKey pubkey1  = key1. GetPubKey();
     CPubKey pubkey2  = key2. GetPubKey();

From 28d412ff20309b275da1375839dae0ee236a5ac2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Sun, 12 Oct 2014 23:28:58 -0400
Subject: [PATCH 0858/1819] build: quit abusing LIBS for Windows builds.

Similar to the INCLUDES changes in 6b099402b40, split out LIBS into individual
entries for more fine-grained control.

Also add MINIUPNPC_LIBS which was missing before, and hook it up to
executables.
---
 configure.ac                | 7 ++++---
 src/Makefile.am             | 9 ++++++---
 src/Makefile.qt.include     | 2 +-
 src/Makefile.qttest.include | 2 +-
 src/Makefile.test.include   | 2 +-
 5 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 90aa11242166..dbc86c6f395a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -462,7 +462,7 @@ dnl Check for libminiupnpc (optional)
 if test x$use_upnp != xno; then
   AC_CHECK_HEADERS(
     [miniupnpc/miniwget.h miniupnpc/miniupnpc.h miniupnpc/upnpcommands.h miniupnpc/upnperrors.h],
-    [AC_CHECK_LIB([miniupnpc], [main],, [have_miniupnpc=no])],
+    [AC_CHECK_LIB([miniupnpc], [main],[MINIUPNPC_LIBS=-lminiupnpc], [have_miniupnpc=no])],
     [have_miniupnpc=no]
   )
 fi
@@ -632,9 +632,9 @@ else
   AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
   AC_CHECK_LIB([ssl],         [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
 
-  BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],,BITCOIN_QT_FAIL(libprotobuf not found)))
+  BITCOIN_QT_CHECK(AC_CHECK_LIB([protobuf] ,[main],[PROTOBUF_LIBS=-lprotobuf], BITCOIN_QT_FAIL(libprotobuf not found)))
   if test x$use_qr != xno; then
-    BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],, [have_qrencode=no])])
+    BITCOIN_QT_CHECK([AC_CHECK_LIB([qrencode], [main],[QR_LIBS=-lqrencode], [have_qrencode=no])])
     BITCOIN_QT_CHECK([AC_CHECK_HEADER([qrencode.h],, have_qrencode=no)])
   fi
 fi
@@ -808,6 +808,7 @@ AC_SUBST(BUILD_TEST)
 AC_SUBST(BUILD_QT)
 AC_SUBST(BUILD_TEST_QT)
 AC_SUBST(MINIUPNPC_CPPFLAGS)
+AC_SUBST(MINIUPNPC_LIBS)
 AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
diff --git a/src/Makefile.am b/src/Makefile.am
index 155adfef7d34..42ecda155cdc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -281,7 +281,7 @@ if TARGET_WINDOWS
 bitcoind_SOURCES += bitcoind-res.rc
 endif
 
-bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
 bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
@@ -293,7 +293,8 @@ bitcoin_cli_LDADD = \
   $(LIBBITCOIN_CRYPTO) \
   $(BOOST_LIBS) \
   $(SSL_LIBS) \
-  $(CRYPTO_LIBS)
+  $(CRYPTO_LIBS) \
+  $(MINIUPNPC_LIBS)
 
 bitcoin_cli_SOURCES = \
   bitcoin-cli.cpp
@@ -317,7 +318,9 @@ endif
 
   bitcoin_tx_LDADD += $(BOOST_LIBS) \
   $(SSL_LIBS) \
-  $(CRYPTO_LIBS)
+  $(CRYPTO_LIBS) \
+  $(MINIUPNPC_LIBS)
+
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 872a0cf1c535..1c6977364794 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -363,7 +363,7 @@ if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 23375bef82c5..064b531b9353 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -32,7 +32,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
-  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 if USE_LIBSECP256K1
   qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b20e226c3dd8..340eb9f1a734 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -89,7 +89,7 @@ if USE_LIBSECP256K1
   test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la
 endif
 
-test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS)
+test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)

From c0195b1c31042a7e5d80fa902b149fe2c7f67bb0 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 14 Oct 2014 20:13:44 +0000
Subject: [PATCH 0859/1819] Bugfix: Remove default from -zapwallettxes
 description (inaccurate)

---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 1150bb1f5ee3..ce72b415aa29 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -287,7 +287,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
     strUsage += "  -zapwallettxes=<mode>  " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n";
-    strUsage += "                         " + strprintf(_("(default: %u, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)"), 1) + "\n";
+    strUsage += "                         " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
 
     strUsage += "\n" + _("Debugging/Testing options:") + "\n";

From 341735eb8f42e898cf9d4d130709471e5d01abe2 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 12 Jul 2014 00:02:35 +0200
Subject: [PATCH 0860/1819] Headers-first synchronization

Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
  limited moving window. When one peer stalls the movement of the window, it is
  disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
  verified the headers, and store it to disk immediately. This means that a
  disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
  initial *headers* sync).
* Introduce some extra named constants, comments and asserts.
---
 src/chain.h                |  32 +-
 src/main.cpp               | 608 ++++++++++++++++++++-----------------
 src/main.h                 |  21 +-
 src/net.cpp                |  50 ---
 src/net.h                  |   4 -
 src/qt/forms/rpcconsole.ui |  23 --
 src/qt/rpcconsole.cpp      |   1 -
 src/rpcnet.cpp             |   1 -
 src/version.h              |   5 +-
 9 files changed, 375 insertions(+), 370 deletions(-)

diff --git a/src/chain.h b/src/chain.h
index 0aafb40b9869..4e6a466c6a38 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -49,12 +49,29 @@ struct CDiskBlockPos
 };
 
 enum BlockStatus {
+    // Unused.
     BLOCK_VALID_UNKNOWN      =    0,
-    BLOCK_VALID_HEADER       =    1, // parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
-    BLOCK_VALID_TREE         =    2, // parent found, difficulty matches, timestamp >= median previous, checkpoint
-    BLOCK_VALID_TRANSACTIONS =    3, // only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids, sigops, size, merkle root
-    BLOCK_VALID_CHAIN        =    4, // outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30
-    BLOCK_VALID_SCRIPTS      =    5, // scripts/signatures ok
+
+    // Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
+    BLOCK_VALID_HEADER       =    1,
+
+    // All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
+    // are also at least TREE.
+    BLOCK_VALID_TREE         =    2,
+
+    // Only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids,
+    // sigops, size, merkle root. Implies all parents are at least TREE but not necessarily TRANSACTIONS. When all
+    // parent blocks also have TRANSACTIONS, CBlockIndex::nChainTx will be set.
+    BLOCK_VALID_TRANSACTIONS =    3,
+
+    // Outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30.
+    // Implies all parents are also at least CHAIN.
+    BLOCK_VALID_CHAIN        =    4,
+
+    // Scripts & signatures ok. Implies all parents are also at least SCRIPTS.
+    BLOCK_VALID_SCRIPTS      =    5,
+
+    // All validity bits.
     BLOCK_VALID_MASK         =   BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
                                  BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
 
@@ -103,7 +120,8 @@ class CBlockIndex
     // Note: in a potential headers-first mode, this number cannot be relied upon
     unsigned int nTx;
 
-    // (memory only) Number of transactions in the chain up to and including this block
+    // (memory only) Number of transactions in the chain up to and including this block.
+    // This value will be non-zero only if and only if transactions for this block and all its parents are available.
     unsigned int nChainTx; // change to 64-bit type when necessary; won't happen before 2030
 
     // Verification status of this block. See enum BlockStatus
@@ -146,7 +164,7 @@ class CBlockIndex
         SetNull();
     }
 
-    CBlockIndex(CBlockHeader& block)
+    CBlockIndex(const CBlockHeader& block)
     {
         SetNull();
 
diff --git a/src/main.cpp b/src/main.cpp
index fc8167e40ece..816cab7e1f99 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -56,14 +56,6 @@ CFeeRate minRelayTxFee = CFeeRate(1000);
 
 CTxMemPool mempool(::minRelayTxFee);
 
-struct COrphanBlock {
-    uint256 hashBlock;
-    uint256 hashPrev;
-    vector<unsigned char> vchBlock;
-};
-map<uint256, COrphanBlock*> mapOrphanBlocks;
-multimap<uint256, COrphanBlock*> mapOrphanBlocksByPrev;
-
 struct COrphanTx {
     CTransaction tx;
     NodeId fromPeer;
@@ -106,6 +98,12 @@ namespace {
     // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
     // as good as our current tip. Entries may be failed, though.
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
+    // Best header we've seen so far (used for getheaders queries' starting points).
+    CBlockIndex *pindexBestHeader = NULL;
+    // Number of nodes with fSyncStarted.
+    int nSyncStarted = 0;
+    // All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
+    multimap<CBlockIndex*, CBlockIndex*> mapBlocksUnlinked;
 
     CCriticalSection cs_LastBlockFile;
     CBlockFileInfo infoLastBlockFile;
@@ -125,11 +123,10 @@ namespace {
     // Protected by cs_main.
     struct QueuedBlock {
         uint256 hash;
+        CBlockIndex *pindex;  // Optional.
         int64_t nTime;  // Time of "getdata" request in microseconds.
-        int nQueuedBefore;  // Number of blocks in flight at the time of request.
     };
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
-    map<uint256, pair<NodeId, list<uint256>::iterator> > mapBlocksToDownload;
 
 } // anon namespace
 
@@ -220,22 +217,24 @@ struct CNodeState {
     CBlockIndex *pindexBestKnownBlock;
     // The hash of the last unknown block this peer has announced.
     uint256 hashLastUnknownBlock;
+    // The last full block we both have.
+    CBlockIndex *pindexLastCommonBlock;
+    // Whether we've started headers synchronization with this peer.
+    bool fSyncStarted;
+    // Since when we're stalling block download progress (in microseconds), or 0.
+    int64_t nStallingSince;
     list<QueuedBlock> vBlocksInFlight;
     int nBlocksInFlight;
-    list<uint256> vBlocksToDownload;
-    int nBlocksToDownload;
-    int64_t nLastBlockReceive;
-    int64_t nLastBlockProcess;
 
     CNodeState() {
         nMisbehavior = 0;
         fShouldBan = false;
         pindexBestKnownBlock = NULL;
         hashLastUnknownBlock = uint256(0);
-        nBlocksToDownload = 0;
+        pindexLastCommonBlock = NULL;
+        fSyncStarted = false;
+        nStallingSince = 0;
         nBlocksInFlight = 0;
-        nLastBlockReceive = 0;
-        nLastBlockProcess = 0;
     }
 };
 
@@ -266,64 +265,37 @@ void FinalizeNode(NodeId nodeid) {
     LOCK(cs_main);
     CNodeState *state = State(nodeid);
 
+    if (state->fSyncStarted)
+        nSyncStarted--;
+
     BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight)
         mapBlocksInFlight.erase(entry.hash);
-    BOOST_FOREACH(const uint256& hash, state->vBlocksToDownload)
-        mapBlocksToDownload.erase(hash);
     EraseOrphansFor(nodeid);
 
     mapNodeState.erase(nodeid);
 }
 
 // Requires cs_main.
-void MarkBlockAsReceived(const uint256 &hash, NodeId nodeFrom = -1) {
-    map<uint256, pair<NodeId, list<uint256>::iterator> >::iterator itToDownload = mapBlocksToDownload.find(hash);
-    if (itToDownload != mapBlocksToDownload.end()) {
-        CNodeState *state = State(itToDownload->second.first);
-        state->vBlocksToDownload.erase(itToDownload->second.second);
-        state->nBlocksToDownload--;
-        mapBlocksToDownload.erase(itToDownload);
-    }
-
+void MarkBlockAsReceived(const uint256& hash) {
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
     if (itInFlight != mapBlocksInFlight.end()) {
         CNodeState *state = State(itInFlight->second.first);
         state->vBlocksInFlight.erase(itInFlight->second.second);
         state->nBlocksInFlight--;
-        if (itInFlight->second.first == nodeFrom)
-            state->nLastBlockReceive = GetTimeMicros();
+        state->nStallingSince = 0;
         mapBlocksInFlight.erase(itInFlight);
     }
 }
 
 // Requires cs_main.
-bool AddBlockToQueue(NodeId nodeid, const uint256 &hash) {
-    if (mapBlocksToDownload.count(hash) || mapBlocksInFlight.count(hash))
-        return false;
-
-    CNodeState *state = State(nodeid);
-    if (state == NULL)
-        return false;
-
-    list<uint256>::iterator it = state->vBlocksToDownload.insert(state->vBlocksToDownload.end(), hash);
-    state->nBlocksToDownload++;
-    if (state->nBlocksToDownload > 5000)
-        Misbehaving(nodeid, 10);
-    mapBlocksToDownload[hash] = std::make_pair(nodeid, it);
-    return true;
-}
-
-// Requires cs_main.
-void MarkBlockAsInFlight(NodeId nodeid, const uint256 &hash) {
+void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, CBlockIndex *pindex = NULL) {
     CNodeState *state = State(nodeid);
     assert(state != NULL);
 
     // Make sure it's not listed somewhere already.
     MarkBlockAsReceived(hash);
 
-    QueuedBlock newentry = {hash, GetTimeMicros(), state->nBlocksInFlight};
-    if (state->nBlocksInFlight == 0)
-        state->nLastBlockReceive = newentry.nTime; // Reset when a first request is sent.
+    QueuedBlock newentry = {hash, pindex, GetTimeMicros()};
     list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry);
     state->nBlocksInFlight++;
     mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
@@ -362,6 +334,103 @@ void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
     }
 }
 
+/** Find the last common ancestor two blocks have.
+ *  Both pa and pb must be non-NULL. */
+CBlockIndex* LastCommonAncestor(CBlockIndex* pa, CBlockIndex* pb) {
+    if (pa->nHeight > pb->nHeight) {
+        pa = pa->GetAncestor(pb->nHeight);
+    } else if (pb->nHeight > pa->nHeight) {
+        pb = pb->GetAncestor(pa->nHeight);
+    }
+
+    while (pa != pb && pa && pb) {
+        pa = pa->pprev;
+        pb = pb->pprev;
+    }
+
+    // Eventually all chain branches meet at the genesis block.
+    assert(pa == pb);
+    return pa;
+}
+
+/** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has
+ *  at most count entries. */
+void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBlockIndex*>& vBlocks, NodeId& nodeStaller) {
+    if (count == 0)
+        return;
+
+    vBlocks.reserve(vBlocks.size() + count);
+    CNodeState *state = State(nodeid);
+    assert(state != NULL);
+
+    // Make sure pindexBestKnownBlock is up to date, we'll need it.
+    ProcessBlockAvailability(nodeid);
+
+    if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork) {
+        // This peer has nothing interesting.
+        return;
+    }
+
+    if (state->pindexLastCommonBlock == NULL) {
+        // Bootstrap quickly by guessing a parent of our best tip is the forking point.
+        // Guessing wrong in either direction is not a problem.
+        state->pindexLastCommonBlock = chainActive[std::min(state->pindexBestKnownBlock->nHeight, chainActive.Height())];
+    }
+
+    // If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor
+    // of their current tip anymore. Go back enough to fix that.
+    state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock);
+    if (state->pindexLastCommonBlock == state->pindexBestKnownBlock)
+        return;
+
+    std::vector<CBlockIndex*> vToFetch;
+    CBlockIndex *pindexWalk = state->pindexLastCommonBlock;
+    // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond our
+    // current tip. The +1 is so we can detect stalling, namely if we would be able to download that next block if the
+    // window were 1 larger.
+    int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, chainActive.Height() + BLOCK_DOWNLOAD_WINDOW + 1);
+    NodeId waitingfor = -1;
+    while (pindexWalk->nHeight < nMaxHeight) {
+        // Read up to 128 (or more, if more blocks than that are needed) successors of pindexWalk (towards
+        // pindexBestKnownBlock) into vToFetch. We fetch 128, because CBlockIndex::GetAncestor may be as expensive
+        // as iterating over ~100 CBlockIndex* entries anyway.
+        int nToFetch = std::min(nMaxHeight - pindexWalk->nHeight, std::max<int>(count - vBlocks.size(), 128));
+        vToFetch.resize(nToFetch);
+        pindexWalk = state->pindexBestKnownBlock->GetAncestor(pindexWalk->nHeight + nToFetch);
+        vToFetch[nToFetch - 1] = pindexWalk;
+        for (unsigned int i = nToFetch - 1; i > 0; i--) {
+            vToFetch[i - 1] = vToFetch[i]->pprev;
+        }
+
+        // Iterate over those blocks in vToFetch (in forward direction), adding the ones that
+        // are not yet downloaded and not in flight to vBlocks. In the mean time, update
+        // pindexLastCommonBlock as long as all ancestors are already downloaded.
+        BOOST_FOREACH(CBlockIndex* pindex, vToFetch) {
+            if (pindex->nStatus & BLOCK_HAVE_DATA) {
+                if (pindex->nChainTx)
+                    state->pindexLastCommonBlock = pindex;
+            } else if (mapBlocksInFlight.count(pindex->GetBlockHash()) == 0) {
+                // The block is not already downloaded, and not yet in flight.
+                if (pindex->nHeight > chainActive.Height() + (int)BLOCK_DOWNLOAD_WINDOW) {
+                    // We reached the end of the window.
+                    if (vBlocks.size() == 0 && waitingfor != nodeid) {
+                        // We aren't able to fetch anything, but we would be if the download window was one larger.
+                        nodeStaller = waitingfor;
+                    }
+                    return;
+                }
+                vBlocks.push_back(pindex);
+                if (vBlocks.size() == count) {
+                    return;
+                }
+            } else if (waitingfor == -1) {
+                // This is the first already-in-flight block.
+                waitingfor = mapBlocksInFlight[pindex->GetBlockHash()].first;
+            }
+        }
+    }
+}
+
 } // anon namespace
 
 bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
@@ -1086,46 +1155,6 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
     return true;
 }
 
-uint256 static GetOrphanRoot(const uint256& hash)
-{
-    map<uint256, COrphanBlock*>::iterator it = mapOrphanBlocks.find(hash);
-    if (it == mapOrphanBlocks.end())
-        return hash;
-
-    // Work back to the first block in the orphan chain
-    do {
-        map<uint256, COrphanBlock*>::iterator it2 = mapOrphanBlocks.find(it->second->hashPrev);
-        if (it2 == mapOrphanBlocks.end())
-            return it->first;
-        it = it2;
-    } while(true);
-}
-
-// Remove a random orphan block (which does not have any dependent orphans).
-void static PruneOrphanBlocks()
-{
-    if (mapOrphanBlocksByPrev.size() <= (size_t)std::max((int64_t)0, GetArg("-maxorphanblocks", DEFAULT_MAX_ORPHAN_BLOCKS)))
-        return;
-
-    // Pick a random orphan block.
-    int pos = insecure_rand() % mapOrphanBlocksByPrev.size();
-    std::multimap<uint256, COrphanBlock*>::iterator it = mapOrphanBlocksByPrev.begin();
-    while (pos--) it++;
-
-    // As long as this block has other orphans depending on it, move to one of those successors.
-    do {
-        std::multimap<uint256, COrphanBlock*>::iterator it2 = mapOrphanBlocksByPrev.find(it->second->hashBlock);
-        if (it2 == mapOrphanBlocksByPrev.end())
-            break;
-        it = it2;
-    } while(1);
-
-    uint256 hash = it->second->hashBlock;
-    delete it->second;
-    mapOrphanBlocksByPrev.erase(it);
-    mapOrphanBlocks.erase(hash);
-}
-
 CAmount GetBlockValue(int nHeight, const CAmount& nFees)
 {
     int64_t nSubsidy = 50 * COIN;
@@ -1664,11 +1693,6 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
     if (fJustCheck)
         return true;
 
-    // Correct transaction counts.
-    pindex->nTx = block.vtx.size();
-    if (pindex->pprev)
-        pindex->nChainTx = pindex->pprev->nChainTx + block.vtx.size();
-
     // Write undo information to disk
     if (pindex->GetUndoPos().IsNull() || !pindex->IsValid(BLOCK_VALID_SCRIPTS))
     {
@@ -1900,6 +1924,8 @@ static CBlockIndex* FindMostWorkChain() {
         CBlockIndex *pindexTest = pindexNew;
         bool fInvalidAncestor = false;
         while (pindexTest && !chainActive.Contains(pindexTest)) {
+            assert(pindexTest->nStatus & BLOCK_HAVE_DATA);
+            assert(pindexTest->nChainTx || pindexTest->nHeight == 0);
             if (pindexTest->nStatus & BLOCK_FAILED_MASK) {
                 // Candidate has an invalid ancestor, remove entire chain from the set.
                 if (pindexBestInvalid == NULL || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
@@ -2032,7 +2058,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     return true;
 }
 
-CBlockIndex* AddToBlockIndex(CBlockHeader& block)
+CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
 {
     // Check for duplicate
     uint256 hash = block.GetHash();
@@ -2043,10 +2069,10 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
     // Construct new block index object
     CBlockIndex* pindexNew = new CBlockIndex(block);
     assert(pindexNew);
-    {
-         LOCK(cs_nBlockSequenceId);
-         pindexNew->nSequenceId = nBlockSequenceId++;
-    }
+    // We assign the sequence id to blocks only when the full data is available,
+    // to avoid miners withholding blocks but broadcasting headers, to get a
+    // competitive advantage.
+    pindexNew->nSequenceId = 0;
     BlockMap::iterator mi = mapBlockIndex.insert(make_pair(hash, pindexNew)).first;
     pindexNew->phashBlock = &((*mi).first);
     BlockMap::iterator miPrev = mapBlockIndex.find(block.hashPrevBlock);
@@ -2058,6 +2084,11 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
     }
     pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork();
     pindexNew->RaiseValidity(BLOCK_VALID_TREE);
+    if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork)
+        pindexBestHeader = pindexNew;
+
+    // Ok if it fails, we'll download the header again next time.
+    pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew));
 
     return pindexNew;
 }
@@ -2066,30 +2097,45 @@ CBlockIndex* AddToBlockIndex(CBlockHeader& block)
 bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
 {
     pindexNew->nTx = block.vtx.size();
-    if (pindexNew->pprev) {
-        // Not the genesis block.
-        if (pindexNew->pprev->nChainTx) {
-            // This parent's block's total number transactions is known, so compute outs.
-            pindexNew->nChainTx = pindexNew->pprev->nChainTx + pindexNew->nTx;
-        } else {
-            // The total number of transactions isn't known yet.
-            // We will compute it when the block is connected.
-            pindexNew->nChainTx = 0;
-        }
-    } else {
-        // Genesis block.
-        pindexNew->nChainTx = pindexNew->nTx;
-    }
+    pindexNew->nChainTx = 0;
     pindexNew->nFile = pos.nFile;
     pindexNew->nDataPos = pos.nPos;
     pindexNew->nUndoPos = 0;
     pindexNew->nStatus |= BLOCK_HAVE_DATA;
+    pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS);
+    {
+         LOCK(cs_nBlockSequenceId);
+         pindexNew->nSequenceId = nBlockSequenceId++;
+    }
 
-    if (pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS))
-        setBlockIndexValid.insert(pindexNew);
+    if (pindexNew->pprev == NULL || pindexNew->pprev->nChainTx) {
+        // If pindexNew is the genesis block or all parents are BLOCK_VALID_TRANSACTIONS.
+        deque<CBlockIndex*> queue;
+        queue.push_back(pindexNew);
 
-    if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
-        return state.Abort("Failed to write block index");
+        // Recursively process any descendant blocks that now may be eligible to be connected.
+        while (!queue.empty()) {
+            CBlockIndex *pindex = queue.front();
+            queue.pop_front();
+            pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
+            setBlockIndexValid.insert(pindex);
+            std::pair<std::multimap<CBlockIndex*, CBlockIndex*>::iterator, std::multimap<CBlockIndex*, CBlockIndex*>::iterator> range = mapBlocksUnlinked.equal_range(pindex);
+            while (range.first != range.second) {
+                std::multimap<CBlockIndex*, CBlockIndex*>::iterator it = range.first;
+                queue.push_back(it->second);
+                range.first++;
+                mapBlocksUnlinked.erase(it);
+            }
+            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex)))
+                return state.Abort("Failed to write block index");
+        }
+    } else {
+        if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) {
+            mapBlocksUnlinked.insert(std::make_pair(pindexNew->pprev, pindexNew));
+        }
+        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
+            return state.Abort("Failed to write block index");
+    }
 
     return true;
 }
@@ -2205,12 +2251,31 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool f
 
 bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bool fCheckMerkleRoot)
 {
-    // These are checks that are independent of context
-    // that can be verified before saving an orphan block.
+    // These are checks that are independent of context.
 
     if (!CheckBlockHeader(block, state, fCheckPOW))
         return false;
 
+    // Check the merkle root.
+    if (fCheckMerkleRoot) {
+        bool mutated;
+        uint256 hashMerkleRoot2 = block.BuildMerkleTree(&mutated);
+        if (block.hashMerkleRoot != hashMerkleRoot2)
+            return state.DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"),
+                             REJECT_INVALID, "bad-txnmrklroot", true);
+
+        // Check for merkle tree malleability (CVE-2012-2459): repeating sequences
+        // of transactions in a block without affecting the merkle root of a block,
+        // while still invalidating it.
+        if (mutated)
+            return state.DoS(100, error("CheckBlock() : duplicate transaction"),
+                             REJECT_INVALID, "bad-txns-duplicate", true);
+    }
+
+    // All potential-corruption validation must be done before we do any
+    // transaction validation, as otherwise we may mark the header as invalid
+    // because we receive the wrong transactions for it.
+
     // Size limits
     if (block.vtx.empty() || block.vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(block, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
         return state.DoS(100, error("CheckBlock() : size limits failed"),
@@ -2230,15 +2295,6 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         if (!CheckTransaction(tx, state))
             return error("CheckBlock() : CheckTransaction failed");
 
-    // Check for merkle tree malleability (CVE-2012-2459): repeating sequences
-    // of transactions in a block without affecting the merkle root of a block,
-    // while still invalidating it.
-    bool mutated;
-    uint256 hashMerkleRoot2 = block.BuildMerkleTree(&mutated);
-    if (mutated)
-        return state.DoS(100, error("CheckBlock() : duplicate transaction"),
-                         REJECT_INVALID, "bad-txns-duplicate", true);
-
     unsigned int nSigOps = 0;
     BOOST_FOREACH(const CTransaction& tx, block.vtx)
     {
@@ -2248,15 +2304,10 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         return state.DoS(100, error("CheckBlock() : out-of-bounds SigOpCount"),
                          REJECT_INVALID, "bad-blk-sigops", true);
 
-    // Check merkle root
-    if (fCheckMerkleRoot && block.hashMerkleRoot != hashMerkleRoot2)
-        return state.DoS(100, error("CheckBlock() : hashMerkleRoot mismatch"),
-                         REJECT_INVALID, "bad-txnmrklroot", true);
-
     return true;
 }
 
-bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex** ppindex)
+bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex** ppindex)
 {
     AssertLockHeld(cs_main);
     // Check for duplicate
@@ -2264,9 +2315,13 @@ bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex
     BlockMap::iterator miSelf = mapBlockIndex.find(hash);
     CBlockIndex *pindex = NULL;
     if (miSelf != mapBlockIndex.end()) {
+        // Block header is already known.
         pindex = miSelf->second;
+        if (ppindex)
+            *ppindex = pindex;
         if (pindex->nStatus & BLOCK_FAILED_MASK)
             return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
+        return true;
     }
 
     CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
@@ -2344,6 +2399,12 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
     if (!AcceptBlockHeader(block, state, &pindex))
         return false;
 
+    if (pindex->nStatus & BLOCK_HAVE_DATA) {
+        // TODO: deal better with duplicate blocks.
+        // return state.DoS(20, error("AcceptBlock() : already have block %d %s", pindex->nHeight, pindex->GetBlockHash().ToString()), REJECT_DUPLICATE, "duplicate");
+        return true;
+    }
+
     if (!CheckBlock(block, state)) {
         if (state.IsInvalid() && !state.CorruptionPossible()) {
             pindex->nStatus |= BLOCK_FAILED_VALID;
@@ -2456,93 +2517,26 @@ void CBlockIndex::BuildSkip()
         pskip = pprev->GetAncestor(GetSkipHeight(nHeight));
 }
 
-void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
-{
-    AssertLockHeld(cs_main);
-    // Filter out duplicate requests
-    if (pindexBegin == pnode->pindexLastGetBlocksBegin && hashEnd == pnode->hashLastGetBlocksEnd)
-        return;
-    pnode->pindexLastGetBlocksBegin = pindexBegin;
-    pnode->hashLastGetBlocksEnd = hashEnd;
-
-    pnode->PushMessage("getblocks", chainActive.GetLocator(pindexBegin), hashEnd);
-}
-
 bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
 {
-    // Check for duplicate
-    uint256 hash = pblock->GetHash();
-
-    {
-    LOCK(cs_main);
-    if (mapBlockIndex.count(hash))
-        return state.Invalid(error("ProcessBlock() : already have block %d %s", mapBlockIndex[hash]->nHeight, hash.ToString()), 0, "duplicate");
-    if (mapOrphanBlocks.count(hash))
-        return state.Invalid(error("ProcessBlock() : already have block (orphan) %s", hash.ToString()), 0, "duplicate");
-
     // Preliminary checks
-    if (!CheckBlock(*pblock, state))
-        return error("ProcessBlock() : CheckBlock FAILED");
+    bool checked = CheckBlock(*pblock, state);
 
-    // If we don't already have its previous block (with full data), shunt it off to holding area until we get it
-    BlockMap::iterator it = mapBlockIndex.find(pblock->hashPrevBlock);
-    if (pblock->hashPrevBlock != 0 && (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)))
     {
-        LogPrintf("ProcessBlock: ORPHAN BLOCK %lu, prev=%s\n", (unsigned long)mapOrphanBlocks.size(), pblock->hashPrevBlock.ToString());
-
-        // Accept orphans as long as there is a node to request its parents from
-        if (pfrom) {
-            PruneOrphanBlocks();
-            COrphanBlock* pblock2 = new COrphanBlock();
-            {
-                CDataStream ss(SER_DISK, CLIENT_VERSION);
-                ss << *pblock;
-                pblock2->vchBlock = std::vector<unsigned char>(ss.begin(), ss.end());
-            }
-            pblock2->hashBlock = hash;
-            pblock2->hashPrev = pblock->hashPrevBlock;
-            mapOrphanBlocks.insert(make_pair(hash, pblock2));
-            mapOrphanBlocksByPrev.insert(make_pair(pblock2->hashPrev, pblock2));
-
-            // Ask this guy to fill in what we're missing
-            PushGetBlocks(pfrom, chainActive.Tip(), GetOrphanRoot(hash));
+        LOCK(cs_main);
+        MarkBlockAsReceived(pblock->GetHash());
+        if (!checked) {
+            return error("ProcessBlock() : CheckBlock FAILED");
         }
-        return true;
-    }
 
-    // Store to disk
-    CBlockIndex *pindex = NULL;
-    bool ret = AcceptBlock(*pblock, state, &pindex, dbp);
-    if (!ret)
-        return error("ProcessBlock() : AcceptBlock FAILED");
-
-    // Recursively process any orphan blocks that depended on this one
-    vector<uint256> vWorkQueue;
-    vWorkQueue.push_back(hash);
-    for (unsigned int i = 0; i < vWorkQueue.size(); i++)
-    {
-        uint256 hashPrev = vWorkQueue[i];
-        for (multimap<uint256, COrphanBlock*>::iterator mi = mapOrphanBlocksByPrev.lower_bound(hashPrev);
-             mi != mapOrphanBlocksByPrev.upper_bound(hashPrev);
-             ++mi)
-        {
-            CBlock block;
-            {
-                CDataStream ss(mi->second->vchBlock, SER_DISK, CLIENT_VERSION);
-                ss >> block;
-            }
-            block.BuildMerkleTree();
-            // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan resolution (that is, feeding people an invalid block based on LegitBlockX in order to get anyone relaying LegitBlockX banned)
-            CValidationState stateDummy;
-            CBlockIndex *pindexChild = NULL;
-            if (AcceptBlock(block, stateDummy, &pindexChild))
-                vWorkQueue.push_back(mi->second->hashBlock);
-            mapOrphanBlocks.erase(mi->second->hashBlock);
-            delete mi->second;
+        // Store to disk
+        CBlockIndex *pindex = NULL;
+        bool ret = AcceptBlock(*pblock, state, &pindex, dbp);
+        if (pindex && pfrom) {
+            mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
         }
-        mapOrphanBlocksByPrev.erase(hashPrev);
-    }
-
+        if (!ret)
+            return error("ProcessBlock() : AcceptBlock FAILED");
     }
 
     if (!ActivateBestChain(state, pblock))
@@ -2808,13 +2802,26 @@ bool static LoadBlockIndexDB()
     {
         CBlockIndex* pindex = item.second;
         pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + pindex->GetBlockWork();
-        pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
-        if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS))
+        if (pindex->nStatus & BLOCK_HAVE_DATA) {
+            if (pindex->pprev) {
+                if (pindex->pprev->nChainTx) {
+                    pindex->nChainTx = pindex->pprev->nChainTx + pindex->nTx;
+                } else {
+                    pindex->nChainTx = 0;
+                    mapBlocksUnlinked.insert(std::make_pair(pindex->pprev, pindex));
+                }
+            } else {
+                pindex->nChainTx = pindex->nTx;
+            }
+        }
+        if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS) && (pindex->nChainTx || pindex->pprev == NULL))
             setBlockIndexValid.insert(pindex);
         if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork))
             pindexBestInvalid = pindex;
         if (pindex->pprev)
             pindex->BuildSkip();
+        if (pindex->IsValid(BLOCK_VALID_TREE) && (pindexBestHeader == NULL || CBlockIndexWorkComparator()(pindexBestHeader, pindex)))
+            pindexBestHeader = pindex;
     }
 
     // Load block file info
@@ -3226,8 +3233,7 @@ bool static AlreadyHave(const CInv& inv)
                 pcoinsTip->HaveCoins(inv.hash);
         }
     case MSG_BLOCK:
-        return mapBlockIndex.count(inv.hash) ||
-               mapOrphanBlocks.count(inv.hash);
+        return mapBlockIndex.count(inv.hash);
     }
     // Don't know what it is, just say we already got one
     return true;
@@ -3375,10 +3381,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         return true;
     }
 
-    {
-        LOCK(cs_main);
-        State(pfrom->GetId())->nLastBlockProcess = GetTimeMicros();
-    }
 
 
 
@@ -3587,6 +3589,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         LOCK(cs_main);
 
+        std::vector<CInv> vToFetch;
+
         for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
         {
             const CInv &inv = vInv[nInv];
@@ -3597,19 +3601,29 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             bool fAlreadyHave = AlreadyHave(inv);
             LogPrint("net", "got inv: %s  %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
 
-            if (!fAlreadyHave) {
-                if (!fImporting && !fReindex) {
-                    if (inv.type == MSG_BLOCK)
-                        AddBlockToQueue(pfrom->GetId(), inv.hash);
-                    else
-                        pfrom->AskFor(inv);
-                }
-            } else if (inv.type == MSG_BLOCK && mapOrphanBlocks.count(inv.hash)) {
-                PushGetBlocks(pfrom, chainActive.Tip(), GetOrphanRoot(inv.hash));
-            }
+            if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK)
+                pfrom->AskFor(inv);
 
-            if (inv.type == MSG_BLOCK)
+            if (inv.type == MSG_BLOCK) {
                 UpdateBlockAvailability(pfrom->GetId(), inv.hash);
+                if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
+                    // First request the headers preceeding the announced block. In the normal fully-synced
+                    // case where a new block is announced that succeeds the current tip (no reorganization),
+                    // there are no such headers.
+                    // Secondly, and only when we are close to being synced, we request the announced block directly,
+                    // to avoid an extra round-trip. Note that we must *first* ask for the headers, so by the
+                    // time the block arrives, the header chain leading up to it is already validated. Not
+                    // doing this will result in the received block being rejected as an orphan in case it is
+                    // not a direct successor.
+                    pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexBestHeader), inv.hash);
+                    if (chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - Params().TargetSpacing() * 20) {
+                        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);
+                    }
+                }
+            }
 
             // Track requests for our stuff
             g_signals.Inventory(inv.hash);
@@ -3619,6 +3633,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                 return error("send buffer size() = %u", pfrom->nSendSize);
             }
         }
+
+        if (!vToFetch.empty())
+            pfrom->PushMessage("getdata", vToFetch);
     }
 
 
@@ -3706,7 +3723,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
         vector<CBlock> vHeaders;
-        int nLimit = 2000;
+        int nLimit = MAX_HEADERS_RESULTS;
         LogPrint("net", "getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString());
         for (; pindex; pindex = chainActive.Next(pindex))
         {
@@ -3826,22 +3843,66 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
+    else if (strCommand == "headers" && !fImporting && !fReindex) // Ignore headers received while importing
+    {
+        std::vector<CBlockHeader> headers;
+
+        // Bypass the normal CBlock deserialization, as we don't want to risk deserializing 2000 full blocks.
+        unsigned int nCount = ReadCompactSize(vRecv);
+        if (nCount > MAX_HEADERS_RESULTS) {
+            Misbehaving(pfrom->GetId(), 20);
+            return error("headers message size = %u", nCount);
+        }
+        headers.resize(nCount);
+        for (unsigned int n = 0; n < nCount; n++) {
+            vRecv >> headers[n];
+            ReadCompactSize(vRecv); // ignore tx count; assume it is 0.
+        }
+
+        LOCK(cs_main);
+
+        if (nCount == 0) {
+            // Nothing interesting. Stop asking this peers for more headers.
+            return true;
+        }
+
+        CBlockIndex *pindexLast = NULL;
+        BOOST_FOREACH(const CBlockHeader& header, headers) {
+            CValidationState state;
+            if (pindexLast != NULL && header.hashPrevBlock != pindexLast->GetBlockHash()) {
+                Misbehaving(pfrom->GetId(), 20);
+                return error("non-continuous headers sequence");
+            }
+            if (!AcceptBlockHeader(header, state, &pindexLast)) {
+                int nDoS;
+                if (state.IsInvalid(nDoS)) {
+                    if (nDoS > 0)
+                        Misbehaving(pfrom->GetId(), nDoS);
+                    return error("invalid header received");
+                }
+            }
+        }
+
+        if (pindexLast)
+            UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash());
+
+        if (nCount == MAX_HEADERS_RESULTS && pindexLast) {
+            // Headers message had its maximum size; the peer may have more headers.
+            // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue
+            // from there instead.
+            pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexLast), uint256(0));
+        }
+    }
+
     else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
     {
         CBlock block;
         vRecv >> block;
 
-        LogPrint("net", "received block %s peer=%d\n", block.GetHash().ToString(), pfrom->id);
-
         CInv inv(MSG_BLOCK, block.GetHash());
-        pfrom->AddInventoryKnown(inv);
+        LogPrint("net", "received block %s peer=%d\n", inv.hash.ToString(), pfrom->id);
 
-        {
-            LOCK(cs_main);
-            // Remember who we got this block from.
-            mapBlockSource[inv.hash] = pfrom->GetId();
-            MarkBlockAsReceived(inv.hash, pfrom->GetId());
-        }
+        pfrom->AddInventoryKnown(inv);
 
         CValidationState state;
         ProcessBlock(state, pfrom, &block);
@@ -4323,9 +4384,17 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         state.rejects.clear();
 
         // Start block sync
-        if (pto->fStartSync && !fImporting && !fReindex) {
-            pto->fStartSync = false;
-            PushGetBlocks(pto, chainActive.Tip(), uint256(0));
+        if (pindexBestHeader == NULL)
+            pindexBestHeader = chainActive.Tip();
+        bool fFetch = !pto->fInbound || (pindexBestHeader && (state.pindexLastCommonBlock ? state.pindexLastCommonBlock->nHeight : 0) + 144 > pindexBestHeader->nHeight);
+        if (!state.fSyncStarted && !pto->fClient && fFetch && !fImporting && !fReindex) {
+            // Only actively request headers from a single peer, unless we're close to today.
+            if (nSyncStarted == 0 || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) {
+                state.fSyncStarted = true;
+                nSyncStarted++;
+                CBlockIndex *pindexStart = pindexBestHeader->pprev ? pindexBestHeader->pprev : pindexBestHeader;
+                pto->PushMessage("getheaders", chainActive.GetLocator(pindexStart), uint256(0));
+            }
         }
 
         // Resend wallet transactions that haven't gotten in a block yet
@@ -4384,35 +4453,32 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         if (!vInv.empty())
             pto->PushMessage("inv", vInv);
 
-
-        // Detect stalled peers. Require that blocks are in flight, we haven't
-        // received a (requested) block in one minute, and that all blocks are
-        // in flight for over two minutes, since we first had a chance to
-        // process an incoming block.
+        // Detect whether we're stalling
         int64_t nNow = GetTimeMicros();
-        if (!pto->fDisconnect && state.nBlocksInFlight &&
-            state.nLastBlockReceive < state.nLastBlockProcess - BLOCK_DOWNLOAD_TIMEOUT*1000000 &&
-            state.vBlocksInFlight.front().nTime < state.nLastBlockProcess - 2*BLOCK_DOWNLOAD_TIMEOUT*1000000) {
-            LogPrintf("Peer %s is stalling block download, disconnecting\n", state.name);
+        if (!pto->fDisconnect && state.nStallingSince && state.nStallingSince < nNow - 1000000 * BLOCK_STALLING_TIMEOUT) {
+            // Stalling only triggers when the block download window cannot move. During normal steady state,
+            // the download window should be much larger than the to-be-downloaded set of blocks, so disconnection
+            // should only happen during initial block download.
+            LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id);
             pto->fDisconnect = true;
         }
 
-        // Update knowledge of peer's block availability.
-        ProcessBlockAvailability(pto->GetId());
-
         //
         // Message: getdata (blocks)
         //
         vector<CInv> vGetData;
-        while (!pto->fDisconnect && state.nBlocksToDownload && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
-            uint256 hash = state.vBlocksToDownload.front();
-            vGetData.push_back(CInv(MSG_BLOCK, hash));
-            MarkBlockAsInFlight(pto->GetId(), hash);
-            LogPrint("net", "Requesting block %s peer=%d\n", hash.ToString(), pto->id);
-            if (vGetData.size() >= 1000)
-            {
-                pto->PushMessage("getdata", vGetData);
-                vGetData.clear();
+        if (!pto->fDisconnect && !pto->fClient && fFetch && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
+            vector<CBlockIndex*> vToDownload;
+            NodeId staller = -1;
+            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);
+                LogPrint("net", "Requesting block %s peer=%d\n", pindex->GetBlockHash().ToString(), pto->id);
+            }
+            if (state.nBlocksInFlight == 0 && staller != -1) {
+                if (State(staller)->nStallingSince == 0)
+                    State(staller)->nStallingSince = nNow;
             }
         }
 
@@ -4519,12 +4585,6 @@ class CMainCleanup
             delete (*it1).second;
         mapBlockIndex.clear();
 
-        // orphan blocks
-        std::map<uint256, COrphanBlock*>::iterator it2 = mapOrphanBlocks.begin();
-        for (; it2 != mapOrphanBlocks.end(); it2++)
-            delete (*it2).second;
-        mapOrphanBlocks.clear();
-
         // orphan transactions
         mapOrphanTransactions.clear();
         mapOrphanTransactionsByPrev.clear();
diff --git a/src/main.h b/src/main.h
index cad7eebfb752..674f2fe4a4f7 100644
--- a/src/main.h
+++ b/src/main.h
@@ -72,9 +72,17 @@ static const int MAX_SCRIPTCHECK_THREADS = 16;
 /** -par default (number of script-checking threads, 0 = auto) */
 static const int DEFAULT_SCRIPTCHECK_THREADS = 0;
 /** Number of blocks that can be requested at any given time from a single peer. */
-static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 128;
-/** Timeout in seconds before considering a block download peer unresponsive. */
-static const unsigned int BLOCK_DOWNLOAD_TIMEOUT = 60;
+static const int MAX_BLOCKS_IN_TRANSIT_PER_PEER = 16;
+/** Timeout in seconds during which a peer must stall block download progress before being disconnected. */
+static const unsigned int BLOCK_STALLING_TIMEOUT = 2;
+/** Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends
+ *  less than this number, we reached their tip. Changing this value is a protocol upgrade. */
+static const unsigned int MAX_HEADERS_RESULTS = 2000;
+/** Size of the "block download window": how far ahead of our current height do we fetch?
+ *  Larger windows tolerate larger download speed differences between peer, but increase the potential
+ *  degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning
+ *  harder). We'll probably want to make this a per-peer adaptive value at some point. */
+static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;
 
 /** "reject" message codes **/
 static const unsigned char REJECT_MALFORMED = 0x01;
@@ -137,8 +145,6 @@ void RegisterNodeSignals(CNodeSignals& nodeSignals);
 /** Unregister a network node */
 void UnregisterNodeSignals(CNodeSignals& nodeSignals);
 
-void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd);
-
 /** Process an incoming block */
 bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp = NULL);
 /** Check whether enough disk space is available for an incoming block */
@@ -439,9 +445,6 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
 // Apply the effects of this block (with given index) on the UTXO set represented by coins
 bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
 
-// Add this block to the block index, and if necessary, switch the active block chain to this
-bool AddToBlockIndex(CBlock& block, CValidationState& state, const CDiskBlockPos& pos);
-
 // Context-independent validity checks
 bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
 bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
@@ -449,7 +452,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = t
 // Store block on disk
 // if dbp is provided, the file is known to already reside on disk
 bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex **pindex, CDiskBlockPos* dbp = NULL);
-bool AcceptBlockHeader(CBlockHeader& block, CValidationState& state, CBlockIndex **ppindex= NULL);
+bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex **ppindex= NULL);
 
 
 
diff --git a/src/net.cpp b/src/net.cpp
index dd5cb480cc1c..50b435cf14da 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -73,7 +73,6 @@ map<CNetAddr, LocalServiceInfo> mapLocalHost;
 static bool vfReachable[NET_MAX] = {};
 static bool vfLimited[NET_MAX] = {};
 static CNode* pnodeLocalHost = NULL;
-static CNode* pnodeSync = NULL;
 uint64_t nLocalHostNonce = 0;
 static std::vector<ListenSocket> vhListenSocket;
 CAddrMan addrman;
@@ -519,10 +518,6 @@ void CNode::CloseSocketDisconnect()
     TRY_LOCK(cs_vRecvMsg, lockRecv);
     if (lockRecv)
         vRecvMsg.clear();
-
-    // if this was the sync node, we'll need a new one
-    if (this == pnodeSync)
-        pnodeSync = NULL;
 }
 
 void CNode::PushVersion()
@@ -615,7 +610,6 @@ void CNode::copyStats(CNodeStats &stats)
     X(nSendBytes);
     X(nRecvBytes);
     X(fWhitelisted);
-    stats.fSyncNode = (this == pnodeSync);
 
     // It is common for nodes with good ping times to suddenly become lagged,
     // due to a new block arriving or other large transfer.
@@ -1487,61 +1481,20 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
 }
 
 
-// for now, use a very simple selection metric: the node from which we received
-// most recently
-static int64_t NodeSyncScore(const CNode *pnode) {
-    return pnode->nLastRecv;
-}
-
-void static StartSync(const vector<CNode*> &vNodes) {
-    CNode *pnodeNewSync = NULL;
-    int64_t nBestScore = 0;
-
-    int nBestHeight = g_signals.GetHeight().get_value_or(0);
-
-    // Iterate over all nodes
-    BOOST_FOREACH(CNode* pnode, vNodes) {
-        // check preconditions for allowing a sync
-        if (!pnode->fClient && !pnode->fOneShot &&
-            !pnode->fDisconnect && pnode->fSuccessfullyConnected &&
-            (pnode->nStartingHeight > (nBestHeight - 144)) &&
-            (pnode->nVersion < NOBLKS_VERSION_START || pnode->nVersion >= NOBLKS_VERSION_END)) {
-            // if ok, compare node's score with the best so far
-            int64_t nScore = NodeSyncScore(pnode);
-            if (pnodeNewSync == NULL || nScore > nBestScore) {
-                pnodeNewSync = pnode;
-                nBestScore = nScore;
-            }
-        }
-    }
-    // if a new sync candidate was found, start sync!
-    if (pnodeNewSync) {
-        pnodeNewSync->fStartSync = true;
-        pnodeSync = pnodeNewSync;
-    }
-}
-
 void ThreadMessageHandler()
 {
     SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
     while (true)
     {
-        bool fHaveSyncNode = false;
-
         vector<CNode*> vNodesCopy;
         {
             LOCK(cs_vNodes);
             vNodesCopy = vNodes;
             BOOST_FOREACH(CNode* pnode, vNodesCopy) {
                 pnode->AddRef();
-                if (pnode == pnodeSync)
-                    fHaveSyncNode = true;
             }
         }
 
-        if (!fHaveSyncNode)
-            StartSync(vNodesCopy);
-
         // Poll the connected nodes for messages
         CNode* pnodeTrickle = NULL;
         if (!vNodesCopy.empty())
@@ -2078,10 +2031,7 @@ CNode::CNode(SOCKET hSocketIn, CAddress addrIn, std::string addrNameIn, bool fIn
     nSendSize = 0;
     nSendOffset = 0;
     hashContinue = 0;
-    pindexLastGetBlocksBegin = 0;
-    hashLastGetBlocksEnd = 0;
     nStartingHeight = -1;
-    fStartSync = false;
     fGetAddr = false;
     fRelayTxes = false;
     setInventoryKnown.max_size(SendBufferSize() / 1000);
diff --git a/src/net.h b/src/net.h
index ad0a1df7e2b7..18da24183f6e 100644
--- a/src/net.h
+++ b/src/net.h
@@ -158,7 +158,6 @@ class CNodeStats
     int nStartingHeight;
     uint64_t nSendBytes;
     uint64_t nRecvBytes;
-    bool fSyncNode;
     bool fWhitelisted;
     double dPingTime;
     double dPingWait;
@@ -276,10 +275,7 @@ class CNode
 
 public:
     uint256 hashContinue;
-    CBlockIndex* pindexLastGetBlocksBegin;
-    uint256 hashLastGetBlocksEnd;
     int nStartingHeight;
-    bool fStartSync;
 
     // flood relay
     std::vector<CAddress> vAddrToSend;
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 7f28209c9a9c..898df2b080b3 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -836,29 +836,6 @@
             </property>
            </widget>
           </item>
-          <item row="4" column="0">
-           <widget class="QLabel" name="label_25">
-            <property name="text">
-             <string>Sync Node</string>
-            </property>
-           </widget>
-          </item>
-          <item row="4" column="2">
-           <widget class="QLabel" name="peerSyncNode">
-            <property name="cursor">
-             <cursorShape>IBeamCursor</cursorShape>
-            </property>
-            <property name="text">
-             <string>N/A</string>
-            </property>
-            <property name="textFormat">
-             <enum>Qt::PlainText</enum>
-            </property>
-            <property name="textInteractionFlags">
-             <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
-            </property>
-           </widget>
-          </item>
           <item row="5" column="0">
            <widget class="QLabel" name="label_29">
             <property name="text">
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 8129353d4b0b..2d2d448b49f4 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -611,7 +611,6 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
     ui->peerSubversion->setText(QString::fromStdString(stats->nodeStats.cleanSubVer));
     ui->peerDirection->setText(stats->nodeStats.fInbound ? tr("Inbound") : tr("Outbound"));
     ui->peerHeight->setText(QString("%1").arg(stats->nodeStats.nStartingHeight));
-    ui->peerSyncNode->setText(stats->nodeStats.fSyncNode ? tr("Yes") : tr("No"));
 
     // This check fails for example if the lock was busy and
     // nodeStateStats couldn't be fetched.
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index bc19d1372a75..3bc4bb30c3df 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -139,7 +139,6 @@ Value getpeerinfo(const Array& params, bool fHelp)
             obj.push_back(Pair("banscore", statestats.nMisbehavior));
             obj.push_back(Pair("syncheight", statestats.nSyncHeight));
         }
-        obj.push_back(Pair("syncnode", stats.fSyncNode));
         obj.push_back(Pair("whitelisted", stats.fWhitelisted));
 
         ret.push_back(obj);
diff --git a/src/version.h b/src/version.h
index 75cbec39b724..a1e440de24dd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -33,8 +33,11 @@ static const int PROTOCOL_VERSION = 70002;
 // initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
 
+// In this version, 'getheaders' was introduced.
+static const int GETHEADERS_VERSION = 31800;
+
 // disconnect from peers older than this proto version
-static const int MIN_PEER_PROTO_VERSION = 209;
+static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
 
 // nTime field added to CAddress, starting with this version;
 // if possible, avoid requesting addresses nodes older than this

From ad6e6017127ec2a3a8d1a71aaab7a6e945c5b0f9 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 12 Jul 2014 00:03:10 +0200
Subject: [PATCH 0861/1819] RPC additions after headers-first

---
 src/main.cpp          |  9 +++++++--
 src/main.h            |  5 +++++
 src/rpcblockchain.cpp |  2 ++
 src/rpcnet.cpp        | 15 +++++++++++++--
 4 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 816cab7e1f99..604ca670ef38 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -41,6 +41,7 @@ CCriticalSection cs_main;
 
 BlockMap mapBlockIndex;
 CChain chainActive;
+CBlockIndex *pindexBestHeader = NULL;
 int64_t nTimeBestReceived = 0;
 CWaitableCriticalSection csBestBlock;
 CConditionVariable cvBlockChange;
@@ -51,6 +52,7 @@ bool fTxIndex = false;
 bool fIsBareMultisigStd = true;
 unsigned int nCoinCacheSize = 5000;
 
+
 /** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
 CFeeRate minRelayTxFee = CFeeRate(1000);
 
@@ -98,8 +100,6 @@ namespace {
     // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
     // as good as our current tip. Entries may be failed, though.
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
-    // Best header we've seen so far (used for getheaders queries' starting points).
-    CBlockIndex *pindexBestHeader = NULL;
     // Number of nodes with fSyncStarted.
     int nSyncStarted = 0;
     // All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
@@ -440,6 +440,11 @@ bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
         return false;
     stats.nMisbehavior = state->nMisbehavior;
     stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1;
+    stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock->nHeight : -1;
+    BOOST_FOREACH(const QueuedBlock& queue, state->vBlocksInFlight) {
+        if (queue.pindex)
+            stats.vHeightInFlight.push_back(queue.pindex->nHeight);
+    }
     return true;
 }
 
diff --git a/src/main.h b/src/main.h
index 674f2fe4a4f7..7939b087ecc1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -118,6 +118,9 @@ extern bool fIsBareMultisigStd;
 extern unsigned int nCoinCacheSize;
 extern CFeeRate minRelayTxFee;
 
+// Best header we've seen so far (used for getheaders queries' starting points).
+extern CBlockIndex *pindexBestHeader;
+
 // Minimum disk space required - used in CheckDiskSpace()
 static const uint64_t nMinDiskSpace = 52428800;
 
@@ -199,6 +202,8 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
 struct CNodeStateStats {
     int nMisbehavior;
     int nSyncHeight;
+    int nCommonHeight;
+    std::vector<int> vHeightInFlight;
 };
 
 struct CDiskTxPos : public CDiskBlockPos
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 24175215bf71..5beac0512ab0 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -445,6 +445,7 @@ Value getblockchaininfo(const Array& params, bool fHelp)
             "{\n"
             "  \"chain\": \"xxxx\",        (string) current network name as defined in BIP70 (main, test, regtest)\n"
             "  \"blocks\": xxxxxx,         (numeric) the current number of blocks processed in the server\n"
+            "  \"headers\": xxxxxx,        (numeric) the current number of headers we have validated\n"
             "  \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"
             "  \"difficulty\": xxxxxx,     (numeric) the current difficulty\n"
             "  \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n"
@@ -458,6 +459,7 @@ Value getblockchaininfo(const Array& params, bool fHelp)
     Object obj;
     obj.push_back(Pair("chain",                 Params().NetworkIDString()));
     obj.push_back(Pair("blocks",                (int)chainActive.Height()));
+    obj.push_back(Pair("headers",               pindexBestHeader ? pindexBestHeader->nHeight : -1));
     obj.push_back(Pair("bestblockhash",         chainActive.Tip()->GetBlockHash().GetHex()));
     obj.push_back(Pair("difficulty",            (double)GetDifficulty()));
     obj.push_back(Pair("verificationprogress",  Checkpoints::GuessVerificationProgress(chainActive.Tip())));
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 3bc4bb30c3df..12dcd5b5401f 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -97,7 +97,12 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"inbound\": true|false,     (boolean) Inbound (true) or Outbound (false)\n"
             "    \"startingheight\": n,       (numeric) The starting height (block) of the peer\n"
             "    \"banscore\": n,             (numeric) The ban score\n"
-            "    \"syncnode\": true|false     (boolean) if sync node\n"
+            "    \"synced_headers\": n,       (numeric) The last header we have in common with this peer\n"
+            "    \"synced_blocks\": n,        (numeric) The last block we have in common with this peer\n"
+            "    \"inflight\": [\n"
+            "       n,                        (numeric) The heights of blocks we're currently asking from this peer\n"
+            "       ...\n"
+            "    ]\n"
             "  }\n"
             "  ,...\n"
             "]\n"
@@ -137,7 +142,13 @@ Value getpeerinfo(const Array& params, bool fHelp)
         obj.push_back(Pair("startingheight", stats.nStartingHeight));
         if (fStateStats) {
             obj.push_back(Pair("banscore", statestats.nMisbehavior));
-            obj.push_back(Pair("syncheight", statestats.nSyncHeight));
+            obj.push_back(Pair("synced_headers", statestats.nSyncHeight));
+            obj.push_back(Pair("synced_blocks", statestats.nCommonHeight));
+            Array heights;
+            BOOST_FOREACH(int height, statestats.vHeightInFlight) {
+                heights.push_back(height);
+            }
+            obj.push_back(Pair("inflight", heights));
         }
         obj.push_back(Pair("whitelisted", stats.fWhitelisted));
 

From f244c99c96636136678f17e7ef3952a864613ad0 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 6 Sep 2014 21:16:25 +0200
Subject: [PATCH 0862/1819] Remove CheckMinWork, as we always know all parent
 headers

---
 src/main.cpp           | 17 ----------------
 src/pow.cpp            | 33 -------------------------------
 src/pow.h              |  2 --
 src/test/DoS_tests.cpp | 45 ------------------------------------------
 4 files changed, 97 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 604ca670ef38..dba4292f50db 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2329,23 +2329,6 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
         return true;
     }
 
-    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
-    if (pcheckpoint && block.hashPrevBlock != (chainActive.Tip() ? chainActive.Tip()->GetBlockHash() : uint256(0)))
-    {
-        // Extra checks to prevent "fill up memory by spamming with bogus blocks"
-        int64_t deltaTime = block.GetBlockTime() - pcheckpoint->GetBlockTime();
-        if (deltaTime < 0)
-        {
-            return state.DoS(100, error("%s : block with timestamp before last checkpoint", __func__),
-                             REJECT_CHECKPOINT, "time-too-old");
-        }
-        if (!CheckMinWork(block.nBits, pcheckpoint->nBits, deltaTime))
-        {
-            return state.DoS(100, error("%s : block with too little proof-of-work", __func__),
-                             REJECT_INVALID, "bad-diffbits");
-        }
-    }
-
     // Get prev block index
     CBlockIndex* pindexPrev = NULL;
     int nHeight = 0;
diff --git a/src/pow.cpp b/src/pow.cpp
index d50222849cc0..75fbfc6a6d50 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -98,39 +98,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     return true;
 }
 
-//
-// true if nBits is greater than the minimum amount of work that could
-// possibly be required deltaTime after minimum work required was nBase
-//
-bool CheckMinWork(unsigned int nBits, unsigned int nBase, int64_t deltaTime)
-{
-    bool fOverflow = false;
-    uint256 bnNewBlock;
-    bnNewBlock.SetCompact(nBits, NULL, &fOverflow);
-    if (fOverflow)
-        return false;
-
-    const uint256 &bnLimit = Params().ProofOfWorkLimit();
-    // Testnet has min-difficulty blocks
-    // after Params().TargetSpacing()*2 time between blocks:
-    if (Params().AllowMinDifficultyBlocks() && deltaTime > Params().TargetSpacing()*2)
-        return bnNewBlock <= bnLimit;
-
-    uint256 bnResult;
-    bnResult.SetCompact(nBase);
-    while (deltaTime > 0 && bnResult < bnLimit)
-    {
-        // Maximum 400% adjustment...
-        bnResult *= 4;
-        // ... in best-case exactly 4-times-normal target time
-        deltaTime -= Params().TargetTimespan()*4;
-    }
-    if (bnResult > bnLimit)
-        bnResult = bnLimit;
-
-    return bnNewBlock <= bnResult;
-}
-
 void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
 {
     pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
diff --git a/src/pow.h b/src/pow.h
index 5d91108ac4f5..233d1f37953f 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -16,8 +16,6 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
 
 /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
 bool CheckProofOfWork(uint256 hash, unsigned int nBits);
-/** Check the work is more than the minimum a received block needs, without knowing its direct parent */
-bool CheckMinWork(unsigned int nBits, unsigned int nBase, int64_t deltaTime);
 
 void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
 
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 7bec12b665c2..f9746fdaa5c6 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -106,51 +106,6 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
     BOOST_CHECK(!CNode::IsBanned(addr));
 }
 
-static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2, int64_t time2)\
-{
-    if (time1 > time2)
-        return CheckNBits(nbits2, time2, nbits1, time1);
-    int64_t deltaTime = time2-time1;
-
-    return CheckMinWork(nbits2, nbits1, deltaTime);
-}
-
-BOOST_AUTO_TEST_CASE(DoS_checknbits)
-{
-    using namespace boost::assign; // for 'map_list_of()'
-
-    // Timestamps,nBits from the bitcoin block chain.
-    // These are the block-chain checkpoint blocks
-    typedef std::map<int64_t, unsigned int> BlockData;
-    BlockData chainData =
-        map_list_of(1239852051,486604799)(1262749024,486594666)
-        (1279305360,469854461)(1280200847,469830746)(1281678674,469809688)
-        (1296207707,453179945)(1302624061,453036989)(1309640330,437004818)
-        (1313172719,436789733);
-
-    // Make sure CheckNBits considers every combination of block-chain-lock-in-points
-    // "sane":
-    BOOST_FOREACH(const BlockData::value_type& i, chainData)
-    {
-        BOOST_FOREACH(const BlockData::value_type& j, chainData)
-        {
-            BOOST_CHECK(CheckNBits(i.second, i.first, j.second, j.first));
-        }
-    }
-
-    // Test a couple of insane combinations:
-    BlockData::value_type firstcheck = *(chainData.begin());
-    BlockData::value_type lastcheck = *(chainData.rbegin());
-
-    // First checkpoint difficulty at or a while after the last checkpoint time should fail when
-    // compared to last checkpoint
-    BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*10, lastcheck.second, lastcheck.first));
-    BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*60*24*14, lastcheck.second, lastcheck.first));
-
-    // ... but OK if enough time passed for difficulty to adjust downward:
-    BOOST_CHECK(CheckNBits(firstcheck.second, lastcheck.first+60*60*24*365*4, lastcheck.second, lastcheck.first));
-}
-
 CTransaction RandomOrphan()
 {
     std::map<uint256, COrphanTx>::iterator it;

From 4c93322923130b1554937de44545d949c54a6e39 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Tue, 2 Sep 2014 17:16:32 +0700
Subject: [PATCH 0863/1819] Improve getheaders (sending) logging

---
 src/main.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index dba4292f50db..f032882ff89f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3610,6 +3610,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                         // later (within the same cs_main lock, though).
                         MarkBlockAsInFlight(pfrom->GetId(), inv.hash);
                     }
+                    LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
                 }
             }
 
@@ -3712,7 +3713,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
         vector<CBlock> vHeaders;
         int nLimit = MAX_HEADERS_RESULTS;
-        LogPrint("net", "getheaders %d to %s\n", (pindex ? pindex->nHeight : -1), hashStop.ToString());
+        LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.ToString(), pfrom->id);
         for (; pindex; pindex = chainActive.Next(pindex))
         {
             vHeaders.push_back(pindex->GetBlockHeader());
@@ -3878,6 +3879,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             // Headers message had its maximum size; the peer may have more headers.
             // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue
             // from there instead.
+            LogPrint("net", "more getheaders (%d) to end to peer=%d (startheight:%d)\n", pindexLast->nHeight, pfrom->id, pfrom->nStartingHeight);
             pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexLast), uint256(0));
         }
     }
@@ -4381,6 +4383,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
                 state.fSyncStarted = true;
                 nSyncStarted++;
                 CBlockIndex *pindexStart = pindexBestHeader->pprev ? pindexBestHeader->pprev : pindexBestHeader;
+                LogPrint("net", "initial getheaders (%d) to peer=%d (startheight:%d)\n", pindexStart->nHeight, pto->id, pto->nStartingHeight);
                 pto->PushMessage("getheaders", chainActive.GetLocator(pindexStart), uint256(0));
             }
         }

From 1bcee67ee780bc44d22b2e44783a04bc330d4f1f Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Thu, 4 Sep 2014 01:31:01 +0700
Subject: [PATCH 0864/1819] Better logging of stalling

---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index f032882ff89f..c5ad82c14e89 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4468,8 +4468,10 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
                 LogPrint("net", "Requesting block %s peer=%d\n", pindex->GetBlockHash().ToString(), pto->id);
             }
             if (state.nBlocksInFlight == 0 && staller != -1) {
-                if (State(staller)->nStallingSince == 0)
+                if (State(staller)->nStallingSince == 0) {
                     State(staller)->nStallingSince = nNow;
+                    LogPrint("net", "Stall started peer=%d\n", staller);
+                }
             }
         }
 

From 1af838b3393ac3d4f6b75ef56f907cb760695952 Mon Sep 17 00:00:00 2001
From: R E Broadley <rebroad+github@gmail.com>
Date: Fri, 5 Sep 2014 22:32:22 +0700
Subject: [PATCH 0865/1819] Add height to "Requesting block" debug

---
 src/main.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index c5ad82c14e89..a2e50b293495 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4465,7 +4465,8 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             BOOST_FOREACH(CBlockIndex *pindex, vToDownload) {
                 vGetData.push_back(CInv(MSG_BLOCK, pindex->GetBlockHash()));
                 MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), pindex);
-                LogPrint("net", "Requesting block %s peer=%d\n", pindex->GetBlockHash().ToString(), pto->id);
+                LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
+                    pindex->nHeight, pto->id);
             }
             if (state.nBlocksInFlight == 0 && staller != -1) {
                 if (State(staller)->nStallingSince == 0) {

From e17bd58392bb81d5343d0b73e4aa6b113f5828f9 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 6 Oct 2014 08:31:33 +0200
Subject: [PATCH 0866/1819] Rename setBlockIndexValid to
 setBlockIndexCandidates

---
 src/main.cpp | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index a2e50b293495..bb16b716dcbe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -99,7 +99,7 @@ namespace {
 
     // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
     // as good as our current tip. Entries may be failed, though.
-    set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexValid;
+    set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexCandidates;
     // Number of nodes with fSyncStarted.
     int nSyncStarted = 0;
     // All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
@@ -1318,7 +1318,7 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
     if (!state.CorruptionPossible()) {
         pindex->nStatus |= BLOCK_FAILED_VALID;
         pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex));
-        setBlockIndexValid.erase(pindex);
+        setBlockIndexCandidates.erase(pindex);
         InvalidChainFound(pindex);
     }
 }
@@ -1918,8 +1918,8 @@ static CBlockIndex* FindMostWorkChain() {
 
         // Find the best candidate header.
         {
-            std::set<CBlockIndex*, CBlockIndexWorkComparator>::reverse_iterator it = setBlockIndexValid.rbegin();
-            if (it == setBlockIndexValid.rend())
+            std::set<CBlockIndex*, CBlockIndexWorkComparator>::reverse_iterator it = setBlockIndexCandidates.rbegin();
+            if (it == setBlockIndexCandidates.rend())
                 return NULL;
             pindexNew = *it;
         }
@@ -1938,10 +1938,10 @@ static CBlockIndex* FindMostWorkChain() {
                 CBlockIndex *pindexFailed = pindexNew;
                 while (pindexTest != pindexFailed) {
                     pindexFailed->nStatus |= BLOCK_FAILED_CHILD;
-                    setBlockIndexValid.erase(pindexFailed);
+                    setBlockIndexCandidates.erase(pindexFailed);
                     pindexFailed = pindexFailed->pprev;
                 }
-                setBlockIndexValid.erase(pindexTest);
+                setBlockIndexCandidates.erase(pindexTest);
                 fInvalidAncestor = true;
                 break;
             }
@@ -1990,15 +1990,15 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
                 return false;
             }
         } else {
-            // Delete all entries in setBlockIndexValid that are worse than our new current block.
+            // Delete all entries in setBlockIndexCandidates that are worse than our new current block.
             // Note that we can't delete the current block itself, as we may need to return to it later in case a
             // reorganization to a better block fails.
-            std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexValid.begin();
-            while (setBlockIndexValid.value_comp()(*it, chainActive.Tip())) {
-                setBlockIndexValid.erase(it++);
+            std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexCandidates.begin();
+            while (setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) {
+                setBlockIndexCandidates.erase(it++);
             }
-            // Either the current tip or a successor of it we're working towards is left in setBlockIndexValid.
-            assert(!setBlockIndexValid.empty());
+            // Either the current tip or a successor of it we're working towards is left in setBlockIndexCandidates.
+            assert(!setBlockIndexCandidates.empty());
             if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
                 // We're in a better position than we were. Return temporarily to release the lock.
                 break;
@@ -2123,7 +2123,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
             CBlockIndex *pindex = queue.front();
             queue.pop_front();
             pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
-            setBlockIndexValid.insert(pindex);
+            setBlockIndexCandidates.insert(pindex);
             std::pair<std::multimap<CBlockIndex*, CBlockIndex*>::iterator, std::multimap<CBlockIndex*, CBlockIndex*>::iterator> range = mapBlocksUnlinked.equal_range(pindex);
             while (range.first != range.second) {
                 std::multimap<CBlockIndex*, CBlockIndex*>::iterator it = range.first;
@@ -2803,7 +2803,7 @@ bool static LoadBlockIndexDB()
             }
         }
         if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS) && (pindex->nChainTx || pindex->pprev == NULL))
-            setBlockIndexValid.insert(pindex);
+            setBlockIndexCandidates.insert(pindex);
         if (pindex->nStatus & BLOCK_FAILED_MASK && (!pindexBestInvalid || pindex->nChainWork > pindexBestInvalid->nChainWork))
             pindexBestInvalid = pindex;
         if (pindex->pprev)
@@ -2947,7 +2947,7 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
 void UnloadBlockIndex()
 {
     mapBlockIndex.clear();
-    setBlockIndexValid.clear();
+    setBlockIndexCandidates.clear();
     chainActive.SetTip(NULL);
     pindexBestInvalid = NULL;
 }

From ad96e7ccd94679d9125a436ceb5b476aacdfca82 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 7 Oct 2014 18:06:30 +0200
Subject: [PATCH 0867/1819] Make -reindex cope with out-of-order blocks

Remember out-of-order block headers along with disk positions. This is
likely the simplest and least-impact way to make -reindex work with
headers first.

Based on top of #4468.
---
 src/main.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 54 insertions(+), 8 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index bb16b716dcbe..ad133e1bb818 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3070,6 +3070,8 @@ void PrintBlockTree()
 
 bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
 {
+    // Map of disk positions for blocks with unknown parent (only used for reindex)
+    static std::multimap<uint256, CDiskBlockPos> mapBlocksUnknownParent;
     int64_t nStart = GetTimeMillis();
 
     int nLoaded = 0;
@@ -3112,20 +3114,64 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
             try {
                 // read block
                 uint64_t nBlockPos = blkdat.GetPos();
+                if (nBlockPos < nStartByte) // skip already indexed part
+                    continue;
+                if (dbp)
+                    dbp->nPos = nBlockPos;
                 blkdat.SetLimit(nBlockPos + nSize);
+
+                // read block header
+                CBlockHeader blockhdr;
+                blkdat >> blockhdr;
+                nRewind = blkdat.GetPos();
+
+                // process block header
+                uint256 hash = blockhdr.GetHash();
+                if (hash != Params().HashGenesisBlock() && mapBlockIndex.find(blockhdr.hashPrevBlock) == mapBlockIndex.end()) {
+                    LogPrint("reindex", "%s: Out of order block %s, parent %s not known\n", __func__, hash.ToString(),
+                            blockhdr.hashPrevBlock.ToString());
+                    if (dbp)
+                        mapBlocksUnknownParent.insert(std::make_pair(blockhdr.hashPrevBlock, *dbp));
+                    // TODO a slight optimization would be: blkdat.Skip(nSize - 80)
+                    continue;
+                }
+
+                // read block
+                blkdat.SetPos(nBlockPos);
                 CBlock block;
                 blkdat >> block;
                 nRewind = blkdat.GetPos();
 
                 // process block
-                if (nBlockPos >= nStartByte) {
-                    if (dbp)
-                        dbp->nPos = nBlockPos;
-                    CValidationState state;
-                    if (ProcessBlock(state, NULL, &block, dbp))
-                        nLoaded++;
-                    if (state.IsError())
-                        break;
+                CValidationState state;
+                if (ProcessBlock(state, NULL, &block, dbp))
+                    nLoaded++;
+                if (state.IsError())
+                    break;
+
+                // Recursively process earlier encountered successors of this block
+                deque<uint256> queue;
+                queue.push_back(hash);
+                while (!queue.empty()) {
+                    uint256 head = queue.front();
+                    queue.pop_front();
+                    std::pair<std::multimap<uint256, CDiskBlockPos>::iterator, std::multimap<uint256, CDiskBlockPos>::iterator> range = mapBlocksUnknownParent.equal_range(head);
+                    while (range.first != range.second) {
+                        std::multimap<uint256, CDiskBlockPos>::iterator it = range.first;
+                        if (ReadBlockFromDisk(block, it->second))
+                        {
+                            LogPrintf("%s: Processing out of order child %s of %s\n", __func__, block.GetHash().ToString(),
+                                    head.ToString());
+                            CValidationState dummy;
+                            if (ProcessBlock(dummy, NULL, &block, &it->second))
+                            {
+                                nLoaded++;
+                                queue.push_back(block.GetHash());
+                            }
+                        }
+                        range.first++;
+                        mapBlocksUnknownParent.erase(it);
+                    }
                 }
             } catch (std::exception &e) {
                 LogPrintf("%s : Deserialize or I/O error - %s", __func__, e.what());

From 16d5194165c8c83492b95f431a664d98c40ff254 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 7 Oct 2014 21:15:32 +0200
Subject: [PATCH 0868/1819] Skip reindexed blocks individually

Instead of skipping to the last reindexed block in each file (which could
jump over processed out-of-order blocks), just skip each already processed
block individually.
---
 src/main.cpp | 49 ++++++++++++++++---------------------------------
 1 file changed, 16 insertions(+), 33 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ad133e1bb818..908f4c95b62f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3078,15 +3078,6 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
     try {
         // This takes over fileIn and calls fclose() on it in the CBufferedFile destructor
         CBufferedFile blkdat(fileIn, 2*MAX_BLOCK_SIZE, MAX_BLOCK_SIZE+8, SER_DISK, CLIENT_VERSION);
-        uint64_t nStartByte = 0;
-        if (dbp) {
-            // (try to) skip already indexed part
-            CBlockFileInfo info;
-            if (pblocktree->ReadBlockFileInfo(dbp->nFile, info)) {
-                nStartByte = info.nSize;
-                blkdat.Seek(info.nSize);
-            }
-        }
         uint64_t nRewind = blkdat.GetPos();
         while (!blkdat.eof()) {
             boost::this_thread::interruption_point();
@@ -3114,40 +3105,32 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
             try {
                 // read block
                 uint64_t nBlockPos = blkdat.GetPos();
-                if (nBlockPos < nStartByte) // skip already indexed part
-                    continue;
                 if (dbp)
                     dbp->nPos = nBlockPos;
                 blkdat.SetLimit(nBlockPos + nSize);
-
-                // read block header
-                CBlockHeader blockhdr;
-                blkdat >> blockhdr;
+                blkdat.SetPos(nBlockPos);
+                CBlock block;
+                blkdat >> block;
                 nRewind = blkdat.GetPos();
 
-                // process block header
-                uint256 hash = blockhdr.GetHash();
-                if (hash != Params().HashGenesisBlock() && mapBlockIndex.find(blockhdr.hashPrevBlock) == mapBlockIndex.end()) {
+                // detect out of order blocks, and store them for later
+                uint256 hash = block.GetHash();
+                if (hash != Params().HashGenesisBlock() && mapBlockIndex.find(block.hashPrevBlock) == mapBlockIndex.end()) {
                     LogPrint("reindex", "%s: Out of order block %s, parent %s not known\n", __func__, hash.ToString(),
-                            blockhdr.hashPrevBlock.ToString());
+                            block.hashPrevBlock.ToString());
                     if (dbp)
-                        mapBlocksUnknownParent.insert(std::make_pair(blockhdr.hashPrevBlock, *dbp));
-                    // TODO a slight optimization would be: blkdat.Skip(nSize - 80)
+                        mapBlocksUnknownParent.insert(std::make_pair(block.hashPrevBlock, *dbp));
                     continue;
                 }
 
-                // read block
-                blkdat.SetPos(nBlockPos);
-                CBlock block;
-                blkdat >> block;
-                nRewind = blkdat.GetPos();
-
-                // process block
-                CValidationState state;
-                if (ProcessBlock(state, NULL, &block, dbp))
-                    nLoaded++;
-                if (state.IsError())
-                    break;
+                // process in case the block isn't known yet
+                if (mapBlockIndex.count(hash) == 0) {
+                    CValidationState state;
+                    if (ProcessBlock(state, NULL, &block, dbp))
+                        nLoaded++;
+                    if (state.IsError())
+                        break;
+                }
 
                 // Recursively process earlier encountered successors of this block
                 deque<uint256> queue;

From afc32c5eeada01b141706e32f0405bdb86c00f04 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 10 Oct 2014 13:13:47 -0700
Subject: [PATCH 0869/1819] Fix rebuild-chainstate feature and improve its
 performance

Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.

Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
---
 src/init.cpp |  2 +-
 src/main.cpp | 17 ++++++++++++++---
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 8772be553955..55991ac9b32b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -974,7 +974,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
                 // If the loaded chain has a wrong genesis, bail out immediately
                 // (we're likely using a testnet datadir, or the other way around).
-                if (!mapBlockIndex.empty() && chainActive.Genesis() == NULL)
+                if (!mapBlockIndex.empty() && mapBlockIndex.count(Params().HashGenesisBlock()) == 0)
                     return InitError(_("Incorrect or no genesis block found. Wrong datadir for network?"));
 
                 // Initialize the block index (no-op if non-empty database was already loaded)
diff --git a/src/main.cpp b/src/main.cpp
index 908f4c95b62f..0612f584ac1f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1968,12 +1968,20 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
 
     // Build list of new blocks to connect.
     std::vector<CBlockIndex*> vpindexToConnect;
-    vpindexToConnect.reserve(pindexMostWork->nHeight - (pindexFork ? pindexFork->nHeight : -1));
-    CBlockIndex *pindexIter = pindexMostWork;
-    while (pindexIter && pindexIter != pindexFork) {
+    bool fContinue = true;
+    int nHeight = pindexFork ? pindexFork->nHeight : -1;
+    while (fContinue && nHeight != pindexMostWork->nHeight) {
+    // Don't iterate the entire list of potential improvements toward the best tip, as we likely only need
+    // a few blocks along the way.
+    int nTargetHeight = std::min(nHeight + 32, pindexMostWork->nHeight);
+    vpindexToConnect.clear();
+    vpindexToConnect.reserve(nTargetHeight - nHeight);
+    CBlockIndex *pindexIter = pindexMostWork->GetAncestor(nTargetHeight);
+    while (pindexIter && pindexIter->nHeight != nHeight) {
         vpindexToConnect.push_back(pindexIter);
         pindexIter = pindexIter->pprev;
     }
+    nHeight = nTargetHeight;
 
     // Connect new blocks.
     BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
@@ -1984,6 +1992,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
                     InvalidChainFound(vpindexToConnect.back());
                 state = CValidationState();
                 fInvalidFound = true;
+                fContinue = false;
                 break;
             } else {
                 // A system error occurred (disk space, database error, ...).
@@ -2001,10 +2010,12 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
             assert(!setBlockIndexCandidates.empty());
             if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
                 // We're in a better position than we were. Return temporarily to release the lock.
+                fContinue = false;
                 break;
             }
         }
     }
+    }
 
     // Callbacks/notifications for a new best chain.
     if (fInvalidFound)

From e11b2ce4c63b87efa60b163b50d155969ccd7e08 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 14 Oct 2014 15:41:23 -0700
Subject: [PATCH 0870/1819] Fix large reorgs

---
 qa/pull-tester/run-bitcoind-for-test.sh.in |  2 +-
 src/main.cpp                               | 11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index 210fc3c42f7b..15363d09a66e 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -10,7 +10,7 @@ touch "$DATADIR/regtest/debug.log"
 tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
 WAITER=$!
 PORT=`expr 10000 + $$ % 55536`
-"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
+"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
 BITCOIND=$!
 
 #Install a watchdog.
diff --git a/src/main.cpp b/src/main.cpp
index 0612f584ac1f..f5fd7561c669 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -385,10 +385,11 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
 
     std::vector<CBlockIndex*> vToFetch;
     CBlockIndex *pindexWalk = state->pindexLastCommonBlock;
-    // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond our
-    // current tip. The +1 is so we can detect stalling, namely if we would be able to download that next block if the
-    // window were 1 larger.
-    int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, chainActive.Height() + BLOCK_DOWNLOAD_WINDOW + 1);
+    // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond the last
+    // linked block we have in common with this peer. The +1 is so we can detect stalling, namely if we would be able to
+    // download that next block if the window were 1 larger.
+    int nWindowEnd = state->pindexLastCommonBlock->nHeight + BLOCK_DOWNLOAD_WINDOW;
+    int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, nWindowEnd + 1);
     NodeId waitingfor = -1;
     while (pindexWalk->nHeight < nMaxHeight) {
         // Read up to 128 (or more, if more blocks than that are needed) successors of pindexWalk (towards
@@ -411,7 +412,7 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
                     state->pindexLastCommonBlock = pindex;
             } else if (mapBlocksInFlight.count(pindex->GetBlockHash()) == 0) {
                 // The block is not already downloaded, and not yet in flight.
-                if (pindex->nHeight > chainActive.Height() + (int)BLOCK_DOWNLOAD_WINDOW) {
+                if (pindex->nHeight > nWindowEnd) {
                     // We reached the end of the window.
                     if (vBlocks.size() == 0 && waitingfor != nodeid) {
                         // We aren't able to fetch anything, but we would be if the download window was one larger.

From 1723862e82926ef24ccf1d098dc02933f893cf48 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 13 Oct 2014 21:59:59 -0400
Subject: [PATCH 0871/1819] build: fix libtool's refusal to link static libs
 into a dll

---
 configure.ac | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index dbc86c6f395a..b603d1766d5c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,8 +11,21 @@ AC_CONFIG_SRCDIR([src/main.cpp])
 AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([build-aux/m4])
-LT_INIT([disable-shared])
+
 AC_CANONICAL_HOST
+
+dnl By default, libtool for mingw refuses to link static libs into a dll for
+dnl fear of mixing pic/non-pic objects, and import/export complications. Since
+dnl we have those under control, re-enable that functionality.
+
+case $host in
+  *mingw*)
+     lt_cv_deplibs_check_method="pass_all"
+  ;;
+esac
+
+LT_INIT([disable-shared])
+
 AH_TOP([#ifndef BITCOIN_CONFIG_H])
 AH_TOP([#define BITCOIN_CONFIG_H])
 AH_BOTTOM([#endif //BITCOIN_CONFIG_H])

From 1d9b86d584542fbc34bf49726badaba2ca764228 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 8 Oct 2014 14:27:07 -0400
Subject: [PATCH 0872/1819] boost: drop dependency on is_fundamental in
 serialization

There's only one case where a vector containing a fundamental type is
serialized all-at-once, unsigned char. Anything else would lead to
strange results.

Use a dummy argument to overload in that case.
---
 src/serialize.h | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index ff11edc06c76..8220fecb9c6c 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -21,7 +21,6 @@
 #include <vector>
 
 #include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/is_fundamental.hpp>
 
 class CAutoFile;
 class CDataStream;
@@ -432,14 +431,15 @@ template<typename Stream, typename C> void Serialize(Stream& os, const std::basi
 template<typename Stream, typename C> void Unserialize(Stream& is, std::basic_string<C>& str, int, int=0);
 
 // vector
-template<typename T, typename A> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&);
-template<typename T, typename A> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&);
+// vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.
+template<typename T, typename A> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
+template<typename T, typename A, typename V> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const V&);
 template<typename T, typename A> inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion);
-template<typename Stream, typename T, typename A> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&);
-template<typename Stream, typename T, typename A> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&);
+template<typename Stream, typename T, typename A> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
+template<typename Stream, typename T, typename A, typename V> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const V&);
 template<typename Stream, typename T, typename A> inline void Serialize(Stream& os, const std::vector<T, A>& v, int nType, int nVersion);
-template<typename Stream, typename T, typename A> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&);
-template<typename Stream, typename T, typename A> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&);
+template<typename Stream, typename T, typename A> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
+template<typename Stream, typename T, typename A, typename V> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const V&);
 template<typename Stream, typename T, typename A> inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion);
 
 // others derived from vector
@@ -536,13 +536,13 @@ void Unserialize(Stream& is, std::basic_string<C>& str, int, int)
 // vector
 //
 template<typename T, typename A>
-unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&)
+unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
 {
     return (GetSizeOfCompactSize(v.size()) + v.size() * sizeof(T));
 }
 
-template<typename T, typename A>
-unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&)
+template<typename T, typename A, typename V>
+unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const V&)
 {
     unsigned int nSize = GetSizeOfCompactSize(v.size());
     for (typename std::vector<T, A>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
@@ -553,20 +553,20 @@ unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nV
 template<typename T, typename A>
 inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion)
 {
-    return GetSerializeSize_impl(v, nType, nVersion, boost::is_fundamental<T>());
+    return GetSerializeSize_impl(v, nType, nVersion, T());
 }
 
 
 template<typename Stream, typename T, typename A>
-void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&)
+void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
 {
     WriteCompactSize(os, v.size());
     if (!v.empty())
         os.write((char*)&v[0], v.size() * sizeof(T));
 }
 
-template<typename Stream, typename T, typename A>
-void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&)
+template<typename Stream, typename T, typename A, typename V>
+void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const V&)
 {
     WriteCompactSize(os, v.size());
     for (typename std::vector<T, A>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
@@ -576,12 +576,12 @@ void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVers
 template<typename Stream, typename T, typename A>
 inline void Serialize(Stream& os, const std::vector<T, A>& v, int nType, int nVersion)
 {
-    Serialize_impl(os, v, nType, nVersion, boost::is_fundamental<T>());
+    Serialize_impl(os, v, nType, nVersion, T());
 }
 
 
 template<typename Stream, typename T, typename A>
-void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const boost::true_type&)
+void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
 {
     // Limit size per read so bogus size value won't cause out of memory
     v.clear();
@@ -596,8 +596,8 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
     }
 }
 
-template<typename Stream, typename T, typename A>
-void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const boost::false_type&)
+template<typename Stream, typename T, typename A, typename V>
+void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const V&)
 {
     v.clear();
     unsigned int nSize = ReadCompactSize(is);
@@ -617,7 +617,7 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
 template<typename Stream, typename T, typename A>
 inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion)
 {
-    Unserialize_impl(is, v, nType, nVersion, boost::is_fundamental<T>());
+    Unserialize_impl(is, v, nType, nVersion, T());
 }
 
 

From 52955068b70fdd4166ffe443e716b0b2f6fe9f6d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 8 Oct 2014 14:28:03 -0400
Subject: [PATCH 0873/1819] boost: drop dependency on tuple in serialization

There's only one user of this form of serialization, so it can be easily
dropped. It could be re-added if desired when we switch to c++11.
---
 src/serialize.h  | 77 ------------------------------------------------
 src/walletdb.cpp |  8 ++---
 2 files changed, 4 insertions(+), 81 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index 8220fecb9c6c..55b6891394ba 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -20,8 +20,6 @@
 #include <utility>
 #include <vector>
 
-#include <boost/tuple/tuple.hpp>
-
 class CAutoFile;
 class CDataStream;
 class CScript;
@@ -452,16 +450,6 @@ template<typename K, typename T> unsigned int GetSerializeSize(const std::pair<K
 template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion);
 template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion);
 
-// 3 tuple
-template<typename T0, typename T1, typename T2> unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2>& item, int nType, int nVersion);
-template<typename Stream, typename T0, typename T1, typename T2> void Serialize(Stream& os, const boost::tuple<T0, T1, T2>& item, int nType, int nVersion);
-template<typename Stream, typename T0, typename T1, typename T2> void Unserialize(Stream& is, boost::tuple<T0, T1, T2>& item, int nType, int nVersion);
-
-// 4 tuple
-template<typename T0, typename T1, typename T2, typename T3> unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion);
-template<typename Stream, typename T0, typename T1, typename T2, typename T3> void Serialize(Stream& os, const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion);
-template<typename Stream, typename T0, typename T1, typename T2, typename T3> void Unserialize(Stream& is, boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion);
-
 // map
 template<typename K, typename T, typename Pred, typename A> unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion);
 template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion);
@@ -669,71 +657,6 @@ void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion)
 
 
 
-//
-// 3 tuple
-//
-template<typename T0, typename T1, typename T2>
-unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
-{
-    unsigned int nSize = 0;
-    nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion);
-    nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion);
-    nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion);
-    return nSize;
-}
-
-template<typename Stream, typename T0, typename T1, typename T2>
-void Serialize(Stream& os, const boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
-{
-    Serialize(os, boost::get<0>(item), nType, nVersion);
-    Serialize(os, boost::get<1>(item), nType, nVersion);
-    Serialize(os, boost::get<2>(item), nType, nVersion);
-}
-
-template<typename Stream, typename T0, typename T1, typename T2>
-void Unserialize(Stream& is, boost::tuple<T0, T1, T2>& item, int nType, int nVersion)
-{
-    Unserialize(is, boost::get<0>(item), nType, nVersion);
-    Unserialize(is, boost::get<1>(item), nType, nVersion);
-    Unserialize(is, boost::get<2>(item), nType, nVersion);
-}
-
-
-
-//
-// 4 tuple
-//
-template<typename T0, typename T1, typename T2, typename T3>
-unsigned int GetSerializeSize(const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
-{
-    unsigned int nSize = 0;
-    nSize += GetSerializeSize(boost::get<0>(item), nType, nVersion);
-    nSize += GetSerializeSize(boost::get<1>(item), nType, nVersion);
-    nSize += GetSerializeSize(boost::get<2>(item), nType, nVersion);
-    nSize += GetSerializeSize(boost::get<3>(item), nType, nVersion);
-    return nSize;
-}
-
-template<typename Stream, typename T0, typename T1, typename T2, typename T3>
-void Serialize(Stream& os, const boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
-{
-    Serialize(os, boost::get<0>(item), nType, nVersion);
-    Serialize(os, boost::get<1>(item), nType, nVersion);
-    Serialize(os, boost::get<2>(item), nType, nVersion);
-    Serialize(os, boost::get<3>(item), nType, nVersion);
-}
-
-template<typename Stream, typename T0, typename T1, typename T2, typename T3>
-void Unserialize(Stream& is, boost::tuple<T0, T1, T2, T3>& item, int nType, int nVersion)
-{
-    Unserialize(is, boost::get<0>(item), nType, nVersion);
-    Unserialize(is, boost::get<1>(item), nType, nVersion);
-    Unserialize(is, boost::get<2>(item), nType, nVersion);
-    Unserialize(is, boost::get<3>(item), nType, nVersion);
-}
-
-
-
 //
 // map
 //
diff --git a/src/walletdb.cpp b/src/walletdb.cpp
index 783f766f6fe9..ffddd8106b31 100644
--- a/src/walletdb.cpp
+++ b/src/walletdb.cpp
@@ -185,7 +185,7 @@ bool CWalletDB::WriteAccount(const string& strAccount, const CAccount& account)
 
 bool CWalletDB::WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccountingEntry& acentry)
 {
-    return Write(boost::make_tuple(string("acentry"), acentry.strAccount, nAccEntryNum), acentry);
+    return Write(std::make_pair(std::string("acentry"), std::make_pair(acentry.strAccount, nAccEntryNum)), acentry);
 }
 
 bool CWalletDB::WriteAccountingEntry(const CAccountingEntry& acentry)
@@ -218,7 +218,7 @@ void CWalletDB::ListAccountCreditDebit(const string& strAccount, list<CAccountin
         // Read next record
         CDataStream ssKey(SER_DISK, CLIENT_VERSION);
         if (fFlags == DB_SET_RANGE)
-            ssKey << boost::make_tuple(string("acentry"), (fAllAccounts? string("") : strAccount), uint64_t(0));
+            ssKey << std::make_pair(std::string("acentry"), std::make_pair((fAllAccounts ? string("") : strAccount), uint64_t(0)));
         CDataStream ssValue(SER_DISK, CLIENT_VERSION);
         int ret = ReadAtCursor(pcursor, ssKey, ssValue, fFlags);
         fFlags = DB_NEXT;
@@ -977,11 +977,11 @@ bool CWalletDB::Recover(CDBEnv& dbenv, std::string filename)
 bool CWalletDB::WriteDestData(const std::string &address, const std::string &key, const std::string &value)
 {
     nWalletDBUpdated++;
-    return Write(boost::make_tuple(std::string("destdata"), address, key), value);
+    return Write(std::make_pair(std::string("destdata"), std::make_pair(address, key)), value);
 }
 
 bool CWalletDB::EraseDestData(const std::string &address, const std::string &key)
 {
     nWalletDBUpdated++;
-    return Erase(boost::make_tuple(string("destdata"), address, key));
+    return Erase(std::make_pair(std::string("destdata"), std::make_pair(address, key)));
 }

From e405aa48c7221017467f50daf29ff6794c76332d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 9 Oct 2014 16:38:38 -0400
Subject: [PATCH 0874/1819] boost: remove CPrivKey dependency from CECKey

This allows CECKey to be used without directly depending on the secure
allocators
---
 src/key.cpp | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index c2251b4f2adc..079e2c65405a 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -179,19 +179,17 @@ class CECKey {
         BN_clear_free(&bn);
     }
 
-    void GetPrivKey(CPrivKey &privkey, bool fCompressed) {
+    int GetPrivKeySize(bool fCompressed) {
         EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-        int nSize = i2d_ECPrivateKey(pkey, NULL);
-        assert(nSize);
-        privkey.resize(nSize);
-        unsigned char* pbegin = &privkey[0];
-        int nSize2 = i2d_ECPrivateKey(pkey, &pbegin);
-        assert(nSize == nSize2);
+        return i2d_ECPrivateKey(pkey, NULL);
+    }
+    int GetPrivKey(unsigned char* privkey, bool fCompressed) {
+        EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
+        return i2d_ECPrivateKey(pkey, &privkey);
     }
 
-    bool SetPrivKey(const CPrivKey &privkey, bool fSkipCheck=false) {
-        const unsigned char* pbegin = &privkey[0];
-        if (d2i_ECPrivateKey(&pkey, &pbegin, privkey.size())) {
+    bool SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck=false) {
+        if (d2i_ECPrivateKey(&pkey, &privkey, size)) {
             if(fSkipCheck)
                 return true;
 
@@ -424,7 +422,7 @@ bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
         return false;
 #else
     CECKey key;
-    if (!key.SetPrivKey(privkey))
+    if (!key.SetPrivKey(&privkey[0], privkey.size()))
         return false;
     key.GetSecretBytes(vch);
 #endif
@@ -436,16 +434,21 @@ bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
 CPrivKey CKey::GetPrivKey() const {
     assert(fValid);
     CPrivKey privkey;
+    int privkeylen, ret;
 #ifdef USE_SECP256K1
     privkey.resize(279);
-    int privkeylen = 279;
-    int ret = secp256k1_ecdsa_privkey_export(begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
+    privkeylen = 279;
+    ret = secp256k1_ecdsa_privkey_export(begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
     assert(ret);
     privkey.resize(privkeylen);
 #else
     CECKey key;
     key.SetSecretBytes(vch);
-    key.GetPrivKey(privkey, fCompressed);
+    privkeylen = key.GetPrivKeySize(fCompressed);
+    assert(privkeylen);
+    privkey.resize(privkeylen);
+    ret = key.GetPrivKey(&privkey[0], fCompressed);
+    assert(ret == (int)privkey.size());
 #endif
     return privkey;
 }
@@ -517,7 +520,7 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
         return false;
 #else
     CECKey key;
-    if (!key.SetPrivKey(privkey, fSkipCheck))
+    if (!key.SetPrivKey(&privkey[0], privkey.size(), fSkipCheck))
         return false;
     key.GetSecretBytes(vch);
 #endif

From e1c946776652a177e3b46db02391263cc24bfd5a Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 10 Oct 2014 00:42:03 -0400
Subject: [PATCH 0875/1819] boost: drop boost dependency in core.cpp

---
 src/core.cpp | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/core.cpp b/src/core.cpp
index 380b1c38e017..6a7a9ff378e9 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -7,8 +7,6 @@
 
 #include "tinyformat.h"
 
-#include <boost/foreach.hpp>
-
 std::string COutPoint::ToString() const
 {
     return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
@@ -113,10 +111,10 @@ CTransaction& CTransaction::operator=(const CTransaction &tx) {
 CAmount CTransaction::GetValueOut() const
 {
     CAmount nValueOut = 0;
-    BOOST_FOREACH(const CTxOut& txout, vout)
+    for (std::vector<CTxOut>::const_iterator it(vout.begin()); it != vout.end(); ++it)
     {
-        nValueOut += txout.nValue;
-        if (!MoneyRange(txout.nValue) || !MoneyRange(nValueOut))
+        nValueOut += it->nValue;
+        if (!MoneyRange(it->nValue) || !MoneyRange(nValueOut))
             throw std::runtime_error("CTransaction::GetValueOut() : value out of range");
     }
     return nValueOut;
@@ -139,10 +137,9 @@ unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
     // risk encouraging people to create junk outputs to redeem later.
     if (nTxSize == 0)
         nTxSize = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
-
-    BOOST_FOREACH(const CTxIn& txin, vin)
+    for (std::vector<CTxIn>::const_iterator it(vin.begin()); it != vin.end(); ++it)
     {
-        unsigned int offset = 41U + std::min(110U, (unsigned int)txin.scriptSig.size());
+        unsigned int offset = 41U + std::min(110U, (unsigned int)it->scriptSig.size());
         if (nTxSize > offset)
             nTxSize -= offset;
     }
@@ -263,8 +260,8 @@ uint256 CBlock::BuildMerkleTree(bool* fMutated) const
     */
     vMerkleTree.clear();
     vMerkleTree.reserve(vtx.size() * 2 + 16); // Safe upper bound for the number of total nodes.
-    BOOST_FOREACH(const CTransaction& tx, vtx)
-        vMerkleTree.push_back(tx.GetHash());
+    for (std::vector<CTransaction>::const_iterator it(vtx.begin()); it != vtx.end(); ++it)
+        vMerkleTree.push_back(it->GetHash());
     int j = 0;
     bool mutated = false;
     for (int nSize = vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
@@ -307,12 +304,12 @@ uint256 CBlock::CheckMerkleBranch(uint256 hash, const std::vector<uint256>& vMer
 {
     if (nIndex == -1)
         return 0;
-    BOOST_FOREACH(const uint256& otherside, vMerkleBranch)
+    for (std::vector<uint256>::const_iterator it(vMerkleBranch.begin()); it != vMerkleBranch.end(); ++it)
     {
         if (nIndex & 1)
-            hash = Hash(BEGIN(otherside), END(otherside), BEGIN(hash), END(hash));
+            hash = Hash(BEGIN(*it), END(*it), BEGIN(hash), END(hash));
         else
-            hash = Hash(BEGIN(hash), END(hash), BEGIN(otherside), END(otherside));
+            hash = Hash(BEGIN(hash), END(hash), BEGIN(*it), END(*it));
         nIndex >>= 1;
     }
     return hash;

From 352058e8b0da4ec37b2f1891716c53adc2957a02 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 10 Oct 2014 13:24:12 -0400
Subject: [PATCH 0876/1819] boost: drop boost dependency in
 utilstrencodings.cpp

---
 src/utilstrencodings.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index b9e64c5fe10c..81e156f43f96 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -9,8 +9,8 @@
 
 #include <errno.h>
 #include <limits>
-
-#include <boost/foreach.hpp>
+#include <cstdlib>
+#include <cstring>
 
 using namespace std;
 
@@ -53,9 +53,9 @@ signed char HexDigit(char c)
 
 bool IsHex(const string& str)
 {
-    BOOST_FOREACH(char c, str)
+    for(std::string::const_iterator it(str.begin()); it != str.end(); ++it)
     {
-        if (HexDigit(c) < 0)
+        if (HexDigit(*it) < 0)
             return false;
     }
     return (str.size() > 0) && (str.size()%2 == 0);

From 5f4bcf6b14eb45da408e19295332d2a8486d70df Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 13 Oct 2014 14:15:19 -0400
Subject: [PATCH 0877/1819] boost: drop boost dependency in version.cpp.

Also add a test to verify.
---
 src/test/util_tests.cpp | 12 ++++++++++++
 src/version.cpp         | 10 +++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 6378bd09418e..61daa0a3fe76 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -9,6 +9,7 @@
 #include "sync.h"
 #include "utilstrencodings.h"
 #include "utilmoneystr.h"
+#include "version.h"
 
 #include <stdint.h>
 #include <vector>
@@ -341,4 +342,15 @@ BOOST_AUTO_TEST_CASE(test_FormatParagraph)
     BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n    test");
 }
 
+BOOST_AUTO_TEST_CASE(test_FormatSubVersion)
+{
+    std::vector<std::string> comments;
+    comments.push_back(std::string("comment1"));
+    std::vector<std::string> comments2;
+    comments2.push_back(std::string("comment1"));
+    comments2.push_back(std::string("comment2"));
+    BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, std::vector<std::string>()),std::string("/Test:0.9.99/"));
+    BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments),std::string("/Test:0.9.99(comment1)/"));
+    BOOST_CHECK_EQUAL(FormatSubVersion("Test", 99900, comments2),std::string("/Test:0.9.99(comment1; comment2)/"));
+}
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/version.cpp b/src/version.cpp
index 95632fdab706..d12b681e5c3b 100644
--- a/src/version.cpp
+++ b/src/version.cpp
@@ -8,8 +8,6 @@
 
 #include <string>
 
-#include <boost/algorithm/string/join.hpp>
-
 // Name of client reported in the 'version' message. Report the same name
 // for both bitcoind and bitcoin-qt, to make it harder for attackers to
 // target servers or GUI users specifically.
@@ -94,7 +92,13 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
     ss << "/";
     ss << name << ":" << FormatVersion(nClientVersion);
     if (!comments.empty())
-        ss << "(" << boost::algorithm::join(comments, "; ") << ")";
+    {
+        std::vector<std::string>::const_iterator it(comments.begin());
+        ss << "(" << *it;
+        for(++it; it != comments.end(); ++it)
+            ss << "; " << *it;
+        ss << ")";
+    }
     ss << "/";
     return ss.str();
 }

From 6f155bdb80f045f8542550a5a9b97a00201fa0c5 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Thu, 16 Oct 2014 19:50:49 +0800
Subject: [PATCH 0878/1819] Add LIBTOOLFLAGS CXX tag to qt makefile include

Related #4993
---
 src/Makefile.qt.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 872a0cf1c535..f8f4439159a2 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -368,6 +368,7 @@ if USE_LIBSECP256K1
   qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
 endif
 qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
 
 #locale/foo.ts -> locale/foo.qm
 QT_QM=$(QT_TS:.ts=.qm)

From 4b0e2d75d78036e7e76fd9584e17b0379ba08d24 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 16 Oct 2014 12:23:50 -0700
Subject: [PATCH 0879/1819] Squashed 'src/leveldb/' changes from
 7924331..7d41e6f

7d41e6f Merge upstream LevelDB 1.18
803d692 Release 1.18

git-subtree-dir: src/leveldb
git-subtree-split: 7d41e6f89ff04ce9e6a742932924796f69c6e23d
---
 CONTRIBUTING.md               |  36 ++++++
 Makefile                      |  28 +++--
 README.md                     | 138 +++++++++++++++++++++
 build_detect_platform         |  15 ++-
 db/db_bench.cc                |   3 +-
 db/db_impl.cc                 |   4 +-
 db/db_test.cc                 |   2 +-
 db/dbformat.h                 |   6 +-
 db/dumpfile.cc                | 225 ++++++++++++++++++++++++++++++++++
 db/leveldb_main.cc            | 204 +++---------------------------
 db/log_format.h               |   4 +-
 db/log_reader.cc              |   6 +-
 db/log_reader.h               |   4 +-
 db/log_test.cc                |   2 +-
 db/repair.cc                  |   2 +-
 db/skiplist.h                 |   5 +
 db/write_batch_internal.h     |   4 +-
 doc/bench/db_bench_tree_db.cc |   2 +-
 doc/impl.html                 |   4 +-
 doc/log_format.txt            |   6 +-
 helpers/memenv/memenv.cc      |   9 +-
 include/leveldb/cache.h       |   2 +-
 include/leveldb/db.h          |   2 +-
 include/leveldb/dumpfile.h    |  25 ++++
 include/leveldb/env.h         |   2 +-
 include/leveldb/iterator.h    |   2 +-
 include/leveldb/options.h     |   2 +-
 port/atomic_pointer.h         |  21 ++--
 port/port_posix.h             |   9 +-
 port/thread_annotations.h     |   5 +-
 table/block.cc                |   2 +-
 table/block_builder.h         |   2 +-
 table/format.cc               |   2 +-
 table/table.cc                |  14 ++-
 util/bloom.cc                 |   2 +-
 util/env_posix.cc             |  10 +-
 util/hash.cc                  |   6 +-
 util/hash_test.cc             |  54 ++++++++
 util/logging.cc               |   9 --
 util/logging.h                |   4 -
 40 files changed, 602 insertions(+), 282 deletions(-)
 create mode 100644 CONTRIBUTING.md
 create mode 100644 README.md
 create mode 100644 db/dumpfile.cc
 create mode 100644 include/leveldb/dumpfile.h
 create mode 100644 util/hash_test.cc

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000000000000..cd600ff46b88
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,36 @@
+# Contributing
+
+We'd love to accept your code patches! However, before we can take them, we
+have to jump a couple of legal hurdles.
+
+## Contributor License Agreements
+
+Please fill out either the individual or corporate Contributor License
+Agreement as appropriate.
+
+* If you are an individual writing original source code and you're sure you
+own the intellectual property, then sign an [individual CLA](https://developers.google.com/open-source/cla/individual).
+* If you work for a company that wants to allow you to contribute your work,
+then sign a [corporate CLA](https://developers.google.com/open-source/cla/corporate).
+
+Follow either of the two links above to access the appropriate CLA and
+instructions for how to sign and return it.
+
+## Submitting a Patch
+
+1. Sign the contributors license agreement above.
+2. Decide which code you want to submit. A submission should be a set of changes
+that addresses one issue in the [issue tracker](https://github.com/google/leveldb/issues).
+Please don't mix more than one logical change per submission, because it makes
+the history hard to follow. If you want to make a change
+(e.g. add a sample or feature) that doesn't have a corresponding issue in the
+issue tracker, please create one.
+3. **Submitting**: When you are ready to submit, send us a Pull Request. Be
+sure to include the issue number you fixed and the name you used to sign
+the CLA.
+
+## Writing Code ##
+
+If your contribution contains code, please make sure that it follows 
+[the style guide](http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml).
+Otherwise we will have to ask you to make changes, and that's no fun for anyone.
diff --git a/Makefile b/Makefile
index f8903b69e4b4..2bd2cadcddeb 100644
--- a/Makefile
+++ b/Makefile
@@ -6,9 +6,12 @@
 # Uncomment exactly one of the lines labelled (A), (B), and (C) below
 # to switch between compilation modes.
 
-OPT ?= -O2 -DNDEBUG       # (A) Production use (optimized mode)
-# OPT ?= -g2              # (B) Debug mode, w/ full line-level debugging symbols
-# OPT ?= -O2 -g2 -DNDEBUG # (C) Profiling mode: opt, but w/debugging symbols
+# (A) Production use (optimized mode)
+OPT ?= -O2 -DNDEBUG
+# (B) Debug mode, w/ full line-level debugging symbols
+# OPT ?= -g2
+# (C) Profiling mode: opt, but w/debugging symbols
+# OPT ?= -O2 -g2 -DNDEBUG
 #-----------------------------------------------
 
 # detect what platform we're building on
@@ -29,6 +32,11 @@ MEMENVOBJECTS = $(MEMENV_SOURCES:.cc=.o)
 TESTUTIL = ./util/testutil.o
 TESTHARNESS = ./util/testharness.o $(TESTUTIL)
 
+# Note: iOS should probably be using libtool, not ar.
+ifeq ($(PLATFORM), IOS)
+AR=xcrun ar
+endif
+
 TESTS = \
 	arena_test \
 	autocompact_test \
@@ -43,6 +51,7 @@ TESTS = \
 	env_test \
 	filename_test \
 	filter_block_test \
+	hash_test \
 	issue178_test \
 	issue200_test \
 	log_test \
@@ -72,7 +81,7 @@ SHARED = $(SHARED1)
 else
 # Update db.h if you change these.
 SHARED_MAJOR = 1
-SHARED_MINOR = 17
+SHARED_MINOR = 18
 SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
 SHARED2 = $(SHARED1).$(SHARED_MAJOR)
 SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
@@ -152,6 +161,9 @@ filename_test: db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS)
 filter_block_test: table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS)
 	$(CXX) $(LDFLAGS) table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
 
+hash_test: util/hash_test.o $(LIBOBJECTS) $(TESTHARNESS)
+	$(CXX) $(LDFLAGS) util/hash_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
 issue178_test: issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS)
 	$(CXX) $(LDFLAGS) issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
 
@@ -194,17 +206,17 @@ IOSARCH=-arch armv6 -arch armv7 -arch armv7s -arch arm64
 
 .cc.o:
 	mkdir -p ios-x86/$(dir $@)
-	$(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
+	xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
 	mkdir -p ios-arm/$(dir $@)
 	xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
-	lipo ios-x86/$@ ios-arm/$@ -create -output $@
+	xcrun lipo ios-x86/$@ ios-arm/$@ -create -output $@
 
 .c.o:
 	mkdir -p ios-x86/$(dir $@)
-	$(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
+	xcrun -sdk iphonesimulator $(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
 	mkdir -p ios-arm/$(dir $@)
 	xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
-	lipo ios-x86/$@ ios-arm/$@ -create -output $@
+	xcrun lipo ios-x86/$@ ios-arm/$@ -create -output $@
 
 else
 .cc.o:
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..480affb5ca1d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,138 @@
+**LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.**
+
+Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)
+
+# Features
+  * Keys and values are arbitrary byte arrays.
+  * Data is stored sorted by key.
+  * Callers can provide a custom comparison function to override the sort order.
+  * The basic operations are `Put(key,value)`, `Get(key)`, `Delete(key)`.
+  * Multiple changes can be made in one atomic batch.
+  * Users can create a transient snapshot to get a consistent view of data.
+  * Forward and backward iteration is supported over the data.
+  * Data is automatically compressed using the [Snappy compression library](http://code.google.com/p/snappy).
+  * External activity (file system operations etc.) is relayed through a virtual interface so users can customize the operating system interactions.
+  * [Detailed documentation](http://htmlpreview.github.io/?https://github.com/google/leveldb/blob/master/doc/index.html) about how to use the library is included with the source code.
+
+
+# Limitations
+  * This is not a SQL database.  It does not have a relational data model, it does not support SQL queries, and it has no support for indexes.
+  * Only a single process (possibly multi-threaded) can access a particular database at a time.
+  * There is no client-server support builtin to the library.  An application that needs such support will have to wrap their own server around the library.
+
+# Performance
+
+Here is a performance report (with explanations) from the run of the
+included db_bench program.  The results are somewhat noisy, but should
+be enough to get a ballpark performance estimate.
+
+## Setup
+
+We use a database with a million entries.  Each entry has a 16 byte
+key, and a 100 byte value.  Values used by the benchmark compress to
+about half their original size.
+
+    LevelDB:    version 1.1
+    Date:       Sun May  1 12:11:26 2011
+    CPU:        4 x Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
+    CPUCache:   4096 KB
+    Keys:       16 bytes each
+    Values:     100 bytes each (50 bytes after compression)
+    Entries:    1000000
+    Raw Size:   110.6 MB (estimated)
+    File Size:  62.9 MB (estimated)
+
+## Write performance
+
+The "fill" benchmarks create a brand new database, in either
+sequential, or random order.  The "fillsync" benchmark flushes data
+from the operating system to the disk after every operation; the other
+write operations leave the data sitting in the operating system buffer
+cache for a while.  The "overwrite" benchmark does random writes that
+update existing keys in the database.
+
+    fillseq      :       1.765 micros/op;   62.7 MB/s
+    fillsync     :     268.409 micros/op;    0.4 MB/s (10000 ops)
+    fillrandom   :       2.460 micros/op;   45.0 MB/s
+    overwrite    :       2.380 micros/op;   46.5 MB/s
+
+Each "op" above corresponds to a write of a single key/value pair.
+I.e., a random write benchmark goes at approximately 400,000 writes per second.
+
+Each "fillsync" operation costs much less (0.3 millisecond)
+than a disk seek (typically 10 milliseconds).  We suspect that this is
+because the hard disk itself is buffering the update in its memory and
+responding before the data has been written to the platter.  This may
+or may not be safe based on whether or not the hard disk has enough
+power to save its memory in the event of a power failure.
+
+## Read performance
+
+We list the performance of reading sequentially in both the forward
+and reverse direction, and also the performance of a random lookup.
+Note that the database created by the benchmark is quite small.
+Therefore the report characterizes the performance of leveldb when the
+working set fits in memory.  The cost of reading a piece of data that
+is not present in the operating system buffer cache will be dominated
+by the one or two disk seeks needed to fetch the data from disk.
+Write performance will be mostly unaffected by whether or not the
+working set fits in memory.
+
+    readrandom   :      16.677 micros/op;  (approximately 60,000 reads per second)
+    readseq      :       0.476 micros/op;  232.3 MB/s
+    readreverse  :       0.724 micros/op;  152.9 MB/s
+
+LevelDB compacts its underlying storage data in the background to
+improve read performance.  The results listed above were done
+immediately after a lot of random writes.  The results after
+compactions (which are usually triggered automatically) are better.
+
+    readrandom   :      11.602 micros/op;  (approximately 85,000 reads per second)
+    readseq      :       0.423 micros/op;  261.8 MB/s
+    readreverse  :       0.663 micros/op;  166.9 MB/s
+
+Some of the high cost of reads comes from repeated decompression of blocks
+read from disk.  If we supply enough cache to the leveldb so it can hold the
+uncompressed blocks in memory, the read performance improves again:
+
+    readrandom   :       9.775 micros/op;  (approximately 100,000 reads per second before compaction)
+    readrandom   :       5.215 micros/op;  (approximately 190,000 reads per second after compaction)
+
+## Repository contents
+
+See doc/index.html for more explanation. See doc/impl.html for a brief overview of the implementation.
+
+The public interface is in include/*.h.  Callers should not include or
+rely on the details of any other header files in this package.  Those
+internal APIs may be changed without warning.
+
+Guide to header files:
+
+* **include/db.h**: Main interface to the DB: Start here
+
+* **include/options.h**: Control over the behavior of an entire database,
+and also control over the behavior of individual reads and writes.
+
+* **include/comparator.h**: Abstraction for user-specified comparison function. 
+If you want just bytewise comparison of keys, you can use the default
+comparator, but clients can write their own comparator implementations if they
+want custom ordering (e.g. to handle different character encodings, etc.)
+
+* **include/iterator.h**: Interface for iterating over data. You can get
+an iterator from a DB object.
+
+* **include/write_batch.h**: Interface for atomically applying multiple
+updates to a database.
+
+* **include/slice.h**: A simple module for maintaining a pointer and a
+length into some other byte array.
+
+* **include/status.h**: Status is returned from many of the public interfaces
+and is used to report success and various kinds of errors.
+
+* **include/env.h**: 
+Abstraction of the OS environment.  A posix implementation of this interface is
+in util/env_posix.cc
+
+* **include/table.h, include/table_builder.h**: Lower-level modules that most
+clients probably won't use directly
diff --git a/build_detect_platform b/build_detect_platform
index 85b1ce02241a..a1101c1bdad8 100755
--- a/build_detect_platform
+++ b/build_detect_platform
@@ -20,7 +20,7 @@
 #
 # The PLATFORM_CCFLAGS and PLATFORM_CXXFLAGS might include the following:
 #
-#       -DLEVELDB_CSTDATOMIC_PRESENT if <cstdatomic> is present
+#       -DLEVELDB_ATOMIC_PRESENT     if <atomic> is present
 #       -DLEVELDB_PLATFORM_POSIX     for Posix-based platforms
 #       -DSNAPPY                     if the Snappy library is present
 #
@@ -72,6 +72,12 @@ if [ "$CXX" = "g++" ]; then
 fi
 
 case "$TARGET_OS" in
+    CYGWIN_*)
+        PLATFORM=OS_LINUX
+        COMMON_FLAGS="$MEMCMP_FLAG -lpthread -DOS_LINUX -DCYGWIN"
+        PLATFORM_LDFLAGS="-lpthread"
+        PORT_FILE=port/port_posix.cc
+        ;;
     Darwin)
         PLATFORM=OS_MACOSX
         COMMON_FLAGS="$MEMCMP_FLAG -DOS_MACOSX"
@@ -185,13 +191,14 @@ if [ "$CROSS_COMPILE" = "true" ]; then
 else
     CXXOUTPUT="${TMPDIR}/leveldb_build_detect_platform-cxx.$$"
 
-    # If -std=c++0x works, use <cstdatomic>.  Otherwise use port_posix.h.
+    # If -std=c++0x works, use <atomic> as fallback for when memory barriers
+    # are not available.
     $CXX $CXXFLAGS -std=c++0x -x c++ - -o $CXXOUTPUT 2>/dev/null  <<EOF
-      #include <cstdatomic>
+      #include <atomic>
       int main() {}
 EOF
     if [ "$?" = 0 ]; then
-        COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_CSTDATOMIC_PRESENT"
+        COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT"
         PLATFORM_CXXFLAGS="-std=c++0x"
     else
         COMMON_FLAGS="$COMMON_FLAGS -DLEVELDB_PLATFORM_POSIX"
diff --git a/db/db_bench.cc b/db/db_bench.cc
index fc46d89693ee..705a170aae47 100644
--- a/db/db_bench.cc
+++ b/db/db_bench.cc
@@ -431,7 +431,7 @@ class Benchmark {
         benchmarks = sep + 1;
       }
 
-      // Reset parameters that may be overriddden bwlow
+      // Reset parameters that may be overridden below
       num_ = FLAGS_num;
       reads_ = (FLAGS_reads < 0 ? FLAGS_num : FLAGS_reads);
       value_size_ = FLAGS_value_size;
@@ -811,7 +811,6 @@ class Benchmark {
 
   void SeekRandom(ThreadState* thread) {
     ReadOptions options;
-    std::string value;
     int found = 0;
     for (int i = 0; i < reads_; i++) {
       Iterator* iter = db_->NewIterator(options);
diff --git a/db/db_impl.cc b/db/db_impl.cc
index faf5e7d7ba2b..49b95953b4e9 100644
--- a/db/db_impl.cc
+++ b/db/db_impl.cc
@@ -392,7 +392,7 @@ Status DBImpl::RecoverLogFile(uint64_t log_number,
   reporter.info_log = options_.info_log;
   reporter.fname = fname.c_str();
   reporter.status = (options_.paranoid_checks ? &status : NULL);
-  // We intentially make log::Reader do checksumming even if
+  // We intentionally make log::Reader do checksumming even if
   // paranoid_checks==false so that corruptions cause entire commits
   // to be skipped instead of propagating bad information (like overly
   // large sequence numbers).
@@ -1267,7 +1267,7 @@ WriteBatch* DBImpl::BuildBatchGroup(Writer** last_writer) {
         break;
       }
 
-      // Append to *reuslt
+      // Append to *result
       if (result == first->batch) {
         // Switch to temporary batch instead of disturbing caller's batch
         result = tmp_batch_;
diff --git a/db/db_test.cc b/db/db_test.cc
index 280b01c14b59..0fed9137d5ff 100644
--- a/db/db_test.cc
+++ b/db/db_test.cc
@@ -626,7 +626,7 @@ TEST(DBTest, GetEncountersEmptyLevel) {
     //   * sstable B in level 2
     // Then do enough Get() calls to arrange for an automatic compaction
     // of sstable A.  A bug would cause the compaction to be marked as
-    // occuring at level 1 (instead of the correct level 0).
+    // occurring at level 1 (instead of the correct level 0).
 
     // Step 1: First place sstables in levels 0 and 2
     int compaction_count = 0;
diff --git a/db/dbformat.h b/db/dbformat.h
index 5d8a032bd316..ea897b13c017 100644
--- a/db/dbformat.h
+++ b/db/dbformat.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
 
-#ifndef STORAGE_LEVELDB_DB_FORMAT_H_
-#define STORAGE_LEVELDB_DB_FORMAT_H_
+#ifndef STORAGE_LEVELDB_DB_DBFORMAT_H_
+#define STORAGE_LEVELDB_DB_DBFORMAT_H_
 
 #include <stdio.h>
 #include "leveldb/comparator.h"
@@ -227,4 +227,4 @@ inline LookupKey::~LookupKey() {
 
 }  // namespace leveldb
 
-#endif  // STORAGE_LEVELDB_DB_FORMAT_H_
+#endif  // STORAGE_LEVELDB_DB_DBFORMAT_H_
diff --git a/db/dumpfile.cc b/db/dumpfile.cc
new file mode 100644
index 000000000000..61c47c2ff999
--- /dev/null
+++ b/db/dumpfile.cc
@@ -0,0 +1,225 @@
+// Copyright (c) 2012 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#include <stdio.h>
+#include "db/dbformat.h"
+#include "db/filename.h"
+#include "db/log_reader.h"
+#include "db/version_edit.h"
+#include "db/write_batch_internal.h"
+#include "leveldb/env.h"
+#include "leveldb/iterator.h"
+#include "leveldb/options.h"
+#include "leveldb/status.h"
+#include "leveldb/table.h"
+#include "leveldb/write_batch.h"
+#include "util/logging.h"
+
+namespace leveldb {
+
+namespace {
+
+bool GuessType(const std::string& fname, FileType* type) {
+  size_t pos = fname.rfind('/');
+  std::string basename;
+  if (pos == std::string::npos) {
+    basename = fname;
+  } else {
+    basename = std::string(fname.data() + pos + 1, fname.size() - pos - 1);
+  }
+  uint64_t ignored;
+  return ParseFileName(basename, &ignored, type);
+}
+
+// Notified when log reader encounters corruption.
+class CorruptionReporter : public log::Reader::Reporter {
+ public:
+  WritableFile* dst_;
+  virtual void Corruption(size_t bytes, const Status& status) {
+    std::string r = "corruption: ";
+    AppendNumberTo(&r, bytes);
+    r += " bytes; ";
+    r += status.ToString();
+    r.push_back('\n');
+    dst_->Append(r);
+  }
+};
+
+// Print contents of a log file. (*func)() is called on every record.
+Status PrintLogContents(Env* env, const std::string& fname,
+                        void (*func)(uint64_t, Slice, WritableFile*),
+                        WritableFile* dst) {
+  SequentialFile* file;
+  Status s = env->NewSequentialFile(fname, &file);
+  if (!s.ok()) {
+    return s;
+  }
+  CorruptionReporter reporter;
+  reporter.dst_ = dst;
+  log::Reader reader(file, &reporter, true, 0);
+  Slice record;
+  std::string scratch;
+  while (reader.ReadRecord(&record, &scratch)) {
+    (*func)(reader.LastRecordOffset(), record, dst);
+  }
+  delete file;
+  return Status::OK();
+}
+
+// Called on every item found in a WriteBatch.
+class WriteBatchItemPrinter : public WriteBatch::Handler {
+ public:
+  WritableFile* dst_;
+  virtual void Put(const Slice& key, const Slice& value) {
+    std::string r = "  put '";
+    AppendEscapedStringTo(&r, key);
+    r += "' '";
+    AppendEscapedStringTo(&r, value);
+    r += "'\n";
+    dst_->Append(r);
+  }
+  virtual void Delete(const Slice& key) {
+    std::string r = "  del '";
+    AppendEscapedStringTo(&r, key);
+    r += "'\n";
+    dst_->Append(r);
+  }
+};
+
+
+// Called on every log record (each one of which is a WriteBatch)
+// found in a kLogFile.
+static void WriteBatchPrinter(uint64_t pos, Slice record, WritableFile* dst) {
+  std::string r = "--- offset ";
+  AppendNumberTo(&r, pos);
+  r += "; ";
+  if (record.size() < 12) {
+    r += "log record length ";
+    AppendNumberTo(&r, record.size());
+    r += " is too small\n";
+    dst->Append(r);
+    return;
+  }
+  WriteBatch batch;
+  WriteBatchInternal::SetContents(&batch, record);
+  r += "sequence ";
+  AppendNumberTo(&r, WriteBatchInternal::Sequence(&batch));
+  r.push_back('\n');
+  dst->Append(r);
+  WriteBatchItemPrinter batch_item_printer;
+  batch_item_printer.dst_ = dst;
+  Status s = batch.Iterate(&batch_item_printer);
+  if (!s.ok()) {
+    dst->Append("  error: " + s.ToString() + "\n");
+  }
+}
+
+Status DumpLog(Env* env, const std::string& fname, WritableFile* dst) {
+  return PrintLogContents(env, fname, WriteBatchPrinter, dst);
+}
+
+// Called on every log record (each one of which is a WriteBatch)
+// found in a kDescriptorFile.
+static void VersionEditPrinter(uint64_t pos, Slice record, WritableFile* dst) {
+  std::string r = "--- offset ";
+  AppendNumberTo(&r, pos);
+  r += "; ";
+  VersionEdit edit;
+  Status s = edit.DecodeFrom(record);
+  if (!s.ok()) {
+    r += s.ToString();
+    r.push_back('\n');
+  } else {
+    r += edit.DebugString();
+  }
+  dst->Append(r);
+}
+
+Status DumpDescriptor(Env* env, const std::string& fname, WritableFile* dst) {
+  return PrintLogContents(env, fname, VersionEditPrinter, dst);
+}
+
+Status DumpTable(Env* env, const std::string& fname, WritableFile* dst) {
+  uint64_t file_size;
+  RandomAccessFile* file = NULL;
+  Table* table = NULL;
+  Status s = env->GetFileSize(fname, &file_size);
+  if (s.ok()) {
+    s = env->NewRandomAccessFile(fname, &file);
+  }
+  if (s.ok()) {
+    // We use the default comparator, which may or may not match the
+    // comparator used in this database. However this should not cause
+    // problems since we only use Table operations that do not require
+    // any comparisons.  In particular, we do not call Seek or Prev.
+    s = Table::Open(Options(), file, file_size, &table);
+  }
+  if (!s.ok()) {
+    delete table;
+    delete file;
+    return s;
+  }
+
+  ReadOptions ro;
+  ro.fill_cache = false;
+  Iterator* iter = table->NewIterator(ro);
+  std::string r;
+  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
+    r.clear();
+    ParsedInternalKey key;
+    if (!ParseInternalKey(iter->key(), &key)) {
+      r = "badkey '";
+      AppendEscapedStringTo(&r, iter->key());
+      r += "' => '";
+      AppendEscapedStringTo(&r, iter->value());
+      r += "'\n";
+      dst->Append(r);
+    } else {
+      r = "'";
+      AppendEscapedStringTo(&r, key.user_key);
+      r += "' @ ";
+      AppendNumberTo(&r, key.sequence);
+      r += " : ";
+      if (key.type == kTypeDeletion) {
+        r += "del";
+      } else if (key.type == kTypeValue) {
+        r += "val";
+      } else {
+        AppendNumberTo(&r, key.type);
+      }
+      r += " => '";
+      AppendEscapedStringTo(&r, iter->value());
+      r += "'\n";
+      dst->Append(r);
+    }
+  }
+  s = iter->status();
+  if (!s.ok()) {
+    dst->Append("iterator error: " + s.ToString() + "\n");
+  }
+
+  delete iter;
+  delete table;
+  delete file;
+  return Status::OK();
+}
+
+}  // namespace
+
+Status DumpFile(Env* env, const std::string& fname, WritableFile* dst) {
+  FileType ftype;
+  if (!GuessType(fname, &ftype)) {
+    return Status::InvalidArgument(fname + ": unknown file type");
+  }
+  switch (ftype) {
+    case kLogFile:         return DumpLog(env, fname, dst);
+    case kDescriptorFile:  return DumpDescriptor(env, fname, dst);
+    case kTableFile:       return DumpTable(env, fname, dst);
+    default:
+      break;
+  }
+  return Status::InvalidArgument(fname + ": not a dump-able file type");
+}
+
+}  // namespace leveldb
diff --git a/db/leveldb_main.cc b/db/leveldb_main.cc
index 995d76107a16..9f4b7dd70c24 100644
--- a/db/leveldb_main.cc
+++ b/db/leveldb_main.cc
@@ -3,212 +3,38 @@
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
 
 #include <stdio.h>
-#include "db/dbformat.h"
-#include "db/filename.h"
-#include "db/log_reader.h"
-#include "db/version_edit.h"
-#include "db/write_batch_internal.h"
+#include "leveldb/dumpfile.h"
 #include "leveldb/env.h"
-#include "leveldb/iterator.h"
-#include "leveldb/options.h"
 #include "leveldb/status.h"
-#include "leveldb/table.h"
-#include "leveldb/write_batch.h"
-#include "util/logging.h"
 
 namespace leveldb {
-
 namespace {
 
-bool GuessType(const std::string& fname, FileType* type) {
-  size_t pos = fname.rfind('/');
-  std::string basename;
-  if (pos == std::string::npos) {
-    basename = fname;
-  } else {
-    basename = std::string(fname.data() + pos + 1, fname.size() - pos - 1);
-  }
-  uint64_t ignored;
-  return ParseFileName(basename, &ignored, type);
-}
-
-// Notified when log reader encounters corruption.
-class CorruptionReporter : public log::Reader::Reporter {
- public:
-  virtual void Corruption(size_t bytes, const Status& status) {
-    printf("corruption: %d bytes; %s\n",
-            static_cast<int>(bytes),
-            status.ToString().c_str());
-  }
-};
-
-// Print contents of a log file. (*func)() is called on every record.
-bool PrintLogContents(Env* env, const std::string& fname,
-                      void (*func)(Slice)) {
-  SequentialFile* file;
-  Status s = env->NewSequentialFile(fname, &file);
-  if (!s.ok()) {
-    fprintf(stderr, "%s\n", s.ToString().c_str());
-    return false;
-  }
-  CorruptionReporter reporter;
-  log::Reader reader(file, &reporter, true, 0);
-  Slice record;
-  std::string scratch;
-  while (reader.ReadRecord(&record, &scratch)) {
-    printf("--- offset %llu; ",
-           static_cast<unsigned long long>(reader.LastRecordOffset()));
-    (*func)(record);
-  }
-  delete file;
-  return true;
-}
-
-// Called on every item found in a WriteBatch.
-class WriteBatchItemPrinter : public WriteBatch::Handler {
+class StdoutPrinter : public WritableFile {
  public:
-  uint64_t offset_;
-  uint64_t sequence_;
-
-  virtual void Put(const Slice& key, const Slice& value) {
-    printf("  put '%s' '%s'\n",
-           EscapeString(key).c_str(),
-           EscapeString(value).c_str());
-  }
-  virtual void Delete(const Slice& key) {
-    printf("  del '%s'\n",
-           EscapeString(key).c_str());
+  virtual Status Append(const Slice& data) {
+    fwrite(data.data(), 1, data.size(), stdout);
+    return Status::OK();
   }
+  virtual Status Close() { return Status::OK(); }
+  virtual Status Flush() { return Status::OK(); }
+  virtual Status Sync() { return Status::OK(); }
 };
 
-
-// Called on every log record (each one of which is a WriteBatch)
-// found in a kLogFile.
-static void WriteBatchPrinter(Slice record) {
-  if (record.size() < 12) {
-    printf("log record length %d is too small\n",
-           static_cast<int>(record.size()));
-    return;
-  }
-  WriteBatch batch;
-  WriteBatchInternal::SetContents(&batch, record);
-  printf("sequence %llu\n",
-         static_cast<unsigned long long>(WriteBatchInternal::Sequence(&batch)));
-  WriteBatchItemPrinter batch_item_printer;
-  Status s = batch.Iterate(&batch_item_printer);
-  if (!s.ok()) {
-    printf("  error: %s\n", s.ToString().c_str());
-  }
-}
-
-bool DumpLog(Env* env, const std::string& fname) {
-  return PrintLogContents(env, fname, WriteBatchPrinter);
-}
-
-// Called on every log record (each one of which is a WriteBatch)
-// found in a kDescriptorFile.
-static void VersionEditPrinter(Slice record) {
-  VersionEdit edit;
-  Status s = edit.DecodeFrom(record);
-  if (!s.ok()) {
-    printf("%s\n", s.ToString().c_str());
-    return;
-  }
-  printf("%s", edit.DebugString().c_str());
-}
-
-bool DumpDescriptor(Env* env, const std::string& fname) {
-  return PrintLogContents(env, fname, VersionEditPrinter);
-}
-
-bool DumpTable(Env* env, const std::string& fname) {
-  uint64_t file_size;
-  RandomAccessFile* file = NULL;
-  Table* table = NULL;
-  Status s = env->GetFileSize(fname, &file_size);
-  if (s.ok()) {
-    s = env->NewRandomAccessFile(fname, &file);
-  }
-  if (s.ok()) {
-    // We use the default comparator, which may or may not match the
-    // comparator used in this database. However this should not cause
-    // problems since we only use Table operations that do not require
-    // any comparisons.  In particular, we do not call Seek or Prev.
-    s = Table::Open(Options(), file, file_size, &table);
-  }
-  if (!s.ok()) {
-    fprintf(stderr, "%s\n", s.ToString().c_str());
-    delete table;
-    delete file;
-    return false;
-  }
-
-  ReadOptions ro;
-  ro.fill_cache = false;
-  Iterator* iter = table->NewIterator(ro);
-  for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
-    ParsedInternalKey key;
-    if (!ParseInternalKey(iter->key(), &key)) {
-      printf("badkey '%s' => '%s'\n",
-             EscapeString(iter->key()).c_str(),
-             EscapeString(iter->value()).c_str());
-    } else {
-      char kbuf[20];
-      const char* type;
-      if (key.type == kTypeDeletion) {
-        type = "del";
-      } else if (key.type == kTypeValue) {
-        type = "val";
-      } else {
-        snprintf(kbuf, sizeof(kbuf), "%d", static_cast<int>(key.type));
-        type = kbuf;
-      }
-      printf("'%s' @ %8llu : %s => '%s'\n",
-             EscapeString(key.user_key).c_str(),
-             static_cast<unsigned long long>(key.sequence),
-             type,
-             EscapeString(iter->value()).c_str());
-    }
-  }
-  s = iter->status();
-  if (!s.ok()) {
-    printf("iterator error: %s\n", s.ToString().c_str());
-  }
-
-  delete iter;
-  delete table;
-  delete file;
-  return true;
-}
-
-bool DumpFile(Env* env, const std::string& fname) {
-  FileType ftype;
-  if (!GuessType(fname, &ftype)) {
-    fprintf(stderr, "%s: unknown file type\n", fname.c_str());
-    return false;
-  }
-  switch (ftype) {
-    case kLogFile:         return DumpLog(env, fname);
-    case kDescriptorFile:  return DumpDescriptor(env, fname);
-    case kTableFile:       return DumpTable(env, fname);
-
-    default: {
-      fprintf(stderr, "%s: not a dump-able file type\n", fname.c_str());
-      break;
-    }
-  }
-  return false;
-}
-
 bool HandleDumpCommand(Env* env, char** files, int num) {
+  StdoutPrinter printer;
   bool ok = true;
   for (int i = 0; i < num; i++) {
-    ok &= DumpFile(env, files[i]);
+    Status s = DumpFile(env, files[i], &printer);
+    if (!s.ok()) {
+      fprintf(stderr, "%s\n", s.ToString().c_str());
+      ok = false;
+    }
   }
   return ok;
 }
 
-}
+}  // namespace
 }  // namespace leveldb
 
 static void Usage() {
diff --git a/db/log_format.h b/db/log_format.h
index 2690cb9789ee..a8c06efe185a 100644
--- a/db/log_format.h
+++ b/db/log_format.h
@@ -26,8 +26,8 @@ static const int kMaxRecordType = kLastType;
 
 static const int kBlockSize = 32768;
 
-// Header is checksum (4 bytes), type (1 byte), length (2 bytes).
-static const int kHeaderSize = 4 + 1 + 2;
+// Header is checksum (4 bytes), length (2 bytes), type (1 byte).
+static const int kHeaderSize = 4 + 2 + 1;
 
 }  // namespace log
 }  // namespace leveldb
diff --git a/db/log_reader.cc b/db/log_reader.cc
index 4919216d044f..e44b66c85bf7 100644
--- a/db/log_reader.cc
+++ b/db/log_reader.cc
@@ -167,14 +167,14 @@ uint64_t Reader::LastRecordOffset() {
   return last_record_offset_;
 }
 
-void Reader::ReportCorruption(size_t bytes, const char* reason) {
+void Reader::ReportCorruption(uint64_t bytes, const char* reason) {
   ReportDrop(bytes, Status::Corruption(reason));
 }
 
-void Reader::ReportDrop(size_t bytes, const Status& reason) {
+void Reader::ReportDrop(uint64_t bytes, const Status& reason) {
   if (reporter_ != NULL &&
       end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) {
-    reporter_->Corruption(bytes, reason);
+    reporter_->Corruption(static_cast<size_t>(bytes), reason);
   }
 }
 
diff --git a/db/log_reader.h b/db/log_reader.h
index 82d4bee68d0e..6aff7917162b 100644
--- a/db/log_reader.h
+++ b/db/log_reader.h
@@ -94,8 +94,8 @@ class Reader {
 
   // Reports dropped bytes to the reporter.
   // buffer_ must be updated to remove the dropped bytes prior to invocation.
-  void ReportCorruption(size_t bytes, const char* reason);
-  void ReportDrop(size_t bytes, const Status& reason);
+  void ReportCorruption(uint64_t bytes, const char* reason);
+  void ReportDrop(uint64_t bytes, const Status& reason);
 
   // No copying allowed
   Reader(const Reader&);
diff --git a/db/log_test.cc b/db/log_test.cc
index 91d3caafc3bb..dcf056265297 100644
--- a/db/log_test.cc
+++ b/db/log_test.cc
@@ -463,7 +463,7 @@ TEST(LogTest, ErrorJoinsRecords) {
 
   ASSERT_EQ("correct", Read());
   ASSERT_EQ("EOF", Read());
-  const int dropped = DroppedBytes();
+  const size_t dropped = DroppedBytes();
   ASSERT_LE(dropped, 2*kBlockSize + 100);
   ASSERT_GE(dropped, 2*kBlockSize);
 }
diff --git a/db/repair.cc b/db/repair.cc
index 7727fafc58e5..4cd4bb047f48 100644
--- a/db/repair.cc
+++ b/db/repair.cc
@@ -186,7 +186,7 @@ class Repairer {
     reporter.env = env_;
     reporter.info_log = options_.info_log;
     reporter.lognum = log;
-    // We intentially make log::Reader do checksumming so that
+    // We intentionally make log::Reader do checksumming so that
     // corruptions cause entire commits to be skipped instead of
     // propagating bad information (like overly large sequence
     // numbers).
diff --git a/db/skiplist.h b/db/skiplist.h
index af85be6d0162..ed8b092203b6 100644
--- a/db/skiplist.h
+++ b/db/skiplist.h
@@ -1,3 +1,6 @@
+#ifndef STORAGE_LEVELDB_DB_SKIPLIST_H_
+#define STORAGE_LEVELDB_DB_SKIPLIST_H_
+
 // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
@@ -377,3 +380,5 @@ bool SkipList<Key,Comparator>::Contains(const Key& key) const {
 }
 
 }  // namespace leveldb
+
+#endif  // STORAGE_LEVELDB_DB_SKIPLIST_H_
diff --git a/db/write_batch_internal.h b/db/write_batch_internal.h
index 4423a7f31842..310a3c891220 100644
--- a/db/write_batch_internal.h
+++ b/db/write_batch_internal.h
@@ -21,10 +21,10 @@ class WriteBatchInternal {
   // Set the count for the number of entries in the batch.
   static void SetCount(WriteBatch* batch, int n);
 
-  // Return the seqeunce number for the start of this batch.
+  // Return the sequence number for the start of this batch.
   static SequenceNumber Sequence(const WriteBatch* batch);
 
-  // Store the specified number as the seqeunce number for the start of
+  // Store the specified number as the sequence number for the start of
   // this batch.
   static void SetSequence(WriteBatch* batch, SequenceNumber seq);
 
diff --git a/doc/bench/db_bench_tree_db.cc b/doc/bench/db_bench_tree_db.cc
index ed86f031c25f..4ca381f11f35 100644
--- a/doc/bench/db_bench_tree_db.cc
+++ b/doc/bench/db_bench_tree_db.cc
@@ -338,7 +338,7 @@ class Benchmark {
       bool write_sync = false;
       if (name == Slice("fillseq")) {
         Write(write_sync, SEQUENTIAL, FRESH, num_, FLAGS_value_size, 1);
-        
+        DBSynchronize(db_);
       } else if (name == Slice("fillrandom")) {
         Write(write_sync, RANDOM, FRESH, num_, FLAGS_value_size, 1);
         DBSynchronize(db_);
diff --git a/doc/impl.html b/doc/impl.html
index 28817fe0da5a..6a468be0955d 100644
--- a/doc/impl.html
+++ b/doc/impl.html
@@ -111,7 +111,7 @@ <h1>Compactions</h1>
 sequence of level-(L+1) files.  We switch to producing a new
 level-(L+1) file after the current output file has reached the target
 file size (2MB).  We also switch to a new output file when the key
-range of the current output file has grown enough to overlap more then
+range of the current output file has grown enough to overlap more than
 ten level-(L+2) files.  This last rule ensures that a later compaction
 of a level-(L+1) file will not pick up too much data from level-(L+2).
 
@@ -151,7 +151,7 @@ <h2>Timing</h2>
 If we throttle the background writing to something small, say 10% of
 the full 100MB/s speed, a compaction may take up to 5 seconds.  If the
 user is writing at 10MB/s, we might build up lots of level-0 files
-(~50 to hold the 5*10MB).  This may signficantly increase the cost of
+(~50 to hold the 5*10MB).  This may significantly increase the cost of
 reads due to the overhead of merging more files together on every
 read.
 
diff --git a/doc/log_format.txt b/doc/log_format.txt
index 5228f624de43..4cca5ef6ead3 100644
--- a/doc/log_format.txt
+++ b/doc/log_format.txt
@@ -11,7 +11,7 @@ Each block consists of a sequence of records:
 
 A record never starts within the last six bytes of a block (since it
 won't fit).  Any leftover bytes here form the trailer, which must
-consist entirely of zero bytes and must be skipped by readers.  
+consist entirely of zero bytes and must be skipped by readers.
 
 Aside: if exactly seven bytes are left in the current block, and a new
 non-zero length record is added, the writer must emit a FIRST record
@@ -33,8 +33,8 @@ The FULL record contains the contents of an entire user record.
 FIRST, MIDDLE, LAST are types used for user records that have been
 split into multiple fragments (typically because of block boundaries).
 FIRST is the type of the first fragment of a user record, LAST is the
-type of the last fragment of a user record, and MID is the type of all
-interior fragments of a user record.
+type of the last fragment of a user record, and MIDDLE is the type of
+all interior fragments of a user record.
 
 Example: consider a sequence of user records:
    A: length 1000
diff --git a/helpers/memenv/memenv.cc b/helpers/memenv/memenv.cc
index 5879de121456..43ef2e072975 100644
--- a/helpers/memenv/memenv.cc
+++ b/helpers/memenv/memenv.cc
@@ -55,14 +55,15 @@ class FileState {
     }
     const uint64_t available = size_ - offset;
     if (n > available) {
-      n = available;
+      n = static_cast<size_t>(available);
     }
     if (n == 0) {
       *result = Slice();
       return Status::OK();
     }
 
-    size_t block = offset / kBlockSize;
+    assert(offset / kBlockSize <= SIZE_MAX);
+    size_t block = static_cast<size_t>(offset / kBlockSize);
     size_t block_offset = offset % kBlockSize;
 
     if (n <= kBlockSize - block_offset) {
@@ -167,7 +168,7 @@ class SequentialFileImpl : public SequentialFile {
     if (pos_ > file_->Size()) {
       return Status::IOError("pos_ > file_->Size()");
     }
-    const size_t available = file_->Size() - pos_;
+    const uint64_t available = file_->Size() - pos_;
     if (n > available) {
       n = available;
     }
@@ -177,7 +178,7 @@ class SequentialFileImpl : public SequentialFile {
 
  private:
   FileState* file_;
-  size_t pos_;
+  uint64_t pos_;
 };
 
 class RandomAccessFileImpl : public RandomAccessFile {
diff --git a/include/leveldb/cache.h b/include/leveldb/cache.h
index 5e3b47637d49..1a201e5e0a99 100644
--- a/include/leveldb/cache.h
+++ b/include/leveldb/cache.h
@@ -96,4 +96,4 @@ class Cache {
 
 }  // namespace leveldb
 
-#endif  // STORAGE_LEVELDB_UTIL_CACHE_H_
+#endif  // STORAGE_LEVELDB_INCLUDE_CACHE_H_
diff --git a/include/leveldb/db.h b/include/leveldb/db.h
index 40851b2aa83d..4c169bf22ed9 100644
--- a/include/leveldb/db.h
+++ b/include/leveldb/db.h
@@ -14,7 +14,7 @@ namespace leveldb {
 
 // Update Makefile if you change these
 static const int kMajorVersion = 1;
-static const int kMinorVersion = 17;
+static const int kMinorVersion = 18;
 
 struct Options;
 struct ReadOptions;
diff --git a/include/leveldb/dumpfile.h b/include/leveldb/dumpfile.h
new file mode 100644
index 000000000000..3f97fda16baa
--- /dev/null
+++ b/include/leveldb/dumpfile.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2014 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#ifndef STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
+#define STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
+
+#include <string>
+#include "leveldb/env.h"
+#include "leveldb/status.h"
+
+namespace leveldb {
+
+// Dump the contents of the file named by fname in text format to
+// *dst.  Makes a sequence of dst->Append() calls; each call is passed
+// the newline-terminated text corresponding to a single item found
+// in the file.
+//
+// Returns a non-OK result if fname does not name a leveldb storage
+// file, or if the file cannot be read.
+Status DumpFile(Env* env, const std::string& fname, WritableFile* dst);
+
+}  // namespace leveldb
+
+#endif  // STORAGE_LEVELDB_INCLUDE_DUMPFILE_H_
diff --git a/include/leveldb/env.h b/include/leveldb/env.h
index b2072d02c1c1..f709514da6c2 100644
--- a/include/leveldb/env.h
+++ b/include/leveldb/env.h
@@ -142,7 +142,7 @@ class Env {
   // useful for computing deltas of time.
   virtual uint64_t NowMicros() = 0;
 
-  // Sleep/delay the thread for the perscribed number of micro-seconds.
+  // Sleep/delay the thread for the prescribed number of micro-seconds.
   virtual void SleepForMicroseconds(int micros) = 0;
 
  private:
diff --git a/include/leveldb/iterator.h b/include/leveldb/iterator.h
index ad543eb46cde..76aced04bddf 100644
--- a/include/leveldb/iterator.h
+++ b/include/leveldb/iterator.h
@@ -61,7 +61,7 @@ class Iterator {
   // Return the value for the current entry.  The underlying storage for
   // the returned slice is valid only until the next modification of
   // the iterator.
-  // REQUIRES: !AtEnd() && !AtStart()
+  // REQUIRES: Valid()
   virtual Slice value() const = 0;
 
   // If an error has occurred, return it.  Else return an ok status.
diff --git a/include/leveldb/options.h b/include/leveldb/options.h
index fdda718d3090..7c9b973454e2 100644
--- a/include/leveldb/options.h
+++ b/include/leveldb/options.h
@@ -153,7 +153,7 @@ struct ReadOptions {
 
   // If "snapshot" is non-NULL, read as of the supplied snapshot
   // (which must belong to the DB that is being read and which must
-  // not have been released).  If "snapshot" is NULL, use an impliicit
+  // not have been released).  If "snapshot" is NULL, use an implicit
   // snapshot of the state at the beginning of this read operation.
   // Default: NULL
   const Snapshot* snapshot;
diff --git a/port/atomic_pointer.h b/port/atomic_pointer.h
index a9866b2302fd..9bf091f757c2 100644
--- a/port/atomic_pointer.h
+++ b/port/atomic_pointer.h
@@ -5,14 +5,13 @@
 // AtomicPointer provides storage for a lock-free pointer.
 // Platform-dependent implementation of AtomicPointer:
 // - If the platform provides a cheap barrier, we use it with raw pointers
-// - If cstdatomic is present (on newer versions of gcc, it is), we use
-//   a cstdatomic-based AtomicPointer.  However we prefer the memory
+// - If <atomic> is present (on newer versions of gcc, it is), we use
+//   a <atomic>-based AtomicPointer.  However we prefer the memory
 //   barrier based version, because at least on a gcc 4.4 32-bit build
-//   on linux, we have encountered a buggy <cstdatomic>
-//   implementation.  Also, some <cstdatomic> implementations are much
-//   slower than a memory-barrier based implementation (~16ns for
-//   <cstdatomic> based acquire-load vs. ~1ns for a barrier based
-//   acquire-load).
+//   on linux, we have encountered a buggy <atomic> implementation.
+//   Also, some <atomic> implementations are much slower than a memory-barrier
+//   based implementation (~16ns for <atomic> based acquire-load vs. ~1ns for
+//   a barrier based acquire-load).
 // This code is based on atomicops-internals-* in Google's perftools:
 // http://code.google.com/p/google-perftools/source/browse/#svn%2Ftrunk%2Fsrc%2Fbase
 
@@ -20,8 +19,8 @@
 #define PORT_ATOMIC_POINTER_H_
 
 #include <stdint.h>
-#ifdef LEVELDB_CSTDATOMIC_PRESENT
-#include <cstdatomic>
+#ifdef LEVELDB_ATOMIC_PRESENT
+#include <atomic>
 #endif
 #ifdef OS_WIN
 #include <windows.h>
@@ -126,7 +125,7 @@ class AtomicPointer {
 };
 
 // AtomicPointer based on <cstdatomic>
-#elif defined(LEVELDB_CSTDATOMIC_PRESENT)
+#elif defined(LEVELDB_ATOMIC_PRESENT)
 class AtomicPointer {
  private:
   std::atomic<void*> rep_;
@@ -207,7 +206,7 @@ class AtomicPointer {
   inline void NoBarrier_Store(void* v) { rep_ = v; }
 };
 
-// We have neither MemoryBarrier(), nor <cstdatomic>
+// We have neither MemoryBarrier(), nor <atomic>
 #else
 #error Please implement AtomicPointer for this platform.
 
diff --git a/port/port_posix.h b/port/port_posix.h
index 21c845e211ff..ccca9939d3dc 100644
--- a/port/port_posix.h
+++ b/port/port_posix.h
@@ -21,14 +21,11 @@
   #else
     #define PLATFORM_IS_LITTLE_ENDIAN false
   #endif
-#elif defined(OS_FREEBSD)
+#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) ||\
+      defined(OS_NETBSD) || defined(OS_DRAGONFLYBSD)
   #include <sys/types.h>
   #include <sys/endian.h>
   #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
-#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
-      defined(OS_DRAGONFLYBSD)
-  #include <sys/types.h>
-  #include <sys/endian.h>
 #elif defined(OS_HPUX)
   #define PLATFORM_IS_LITTLE_ENDIAN false
 #elif defined(OS_ANDROID)
@@ -55,7 +52,7 @@
 
 #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
     defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
-    defined(OS_ANDROID) || defined(OS_HPUX)
+    defined(OS_ANDROID) || defined(OS_HPUX) || defined(CYGWIN)
 // Use fread/fwrite/fflush on platforms without _unlocked variants
 #define fread_unlocked fread
 #define fwrite_unlocked fwrite
diff --git a/port/thread_annotations.h b/port/thread_annotations.h
index 6f9b6a7924d6..9470ef587c94 100644
--- a/port/thread_annotations.h
+++ b/port/thread_annotations.h
@@ -2,7 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
 
-#ifndef STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H
+#ifndef STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H_
+#define STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H_
 
 // Some environments provide custom macros to aid in static thread-safety
 // analysis.  Provide empty definitions of such macros unless they are already
@@ -56,4 +57,4 @@
 #define NO_THREAD_SAFETY_ANALYSIS
 #endif
 
-#endif  // STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H
+#endif  // STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H_
diff --git a/table/block.cc b/table/block.cc
index 79ea9d9ee5fe..43e402c9c07a 100644
--- a/table/block.cc
+++ b/table/block.cc
@@ -46,7 +46,7 @@ Block::~Block() {
 // Helper routine: decode the next block entry starting at "p",
 // storing the number of shared key bytes, non_shared key bytes,
 // and the length of the value in "*shared", "*non_shared", and
-// "*value_length", respectively.  Will not derefence past "limit".
+// "*value_length", respectively.  Will not dereference past "limit".
 //
 // If any errors are detected, returns NULL.  Otherwise, returns a
 // pointer to the key delta (just past the three decoded values).
diff --git a/table/block_builder.h b/table/block_builder.h
index 5b545bd1afb4..4fbcb33972fd 100644
--- a/table/block_builder.h
+++ b/table/block_builder.h
@@ -21,7 +21,7 @@ class BlockBuilder {
   // Reset the contents as if the BlockBuilder was just constructed.
   void Reset();
 
-  // REQUIRES: Finish() has not been callled since the last call to Reset().
+  // REQUIRES: Finish() has not been called since the last call to Reset().
   // REQUIRES: key is larger than any previously added key
   void Add(const Slice& key, const Slice& value);
 
diff --git a/table/format.cc b/table/format.cc
index cda1decdf354..aa63144c9e7a 100644
--- a/table/format.cc
+++ b/table/format.cc
@@ -48,7 +48,7 @@ Status Footer::DecodeFrom(Slice* input) {
   const uint64_t magic = ((static_cast<uint64_t>(magic_hi) << 32) |
                           (static_cast<uint64_t>(magic_lo)));
   if (magic != kTableMagicNumber) {
-    return Status::InvalidArgument("not an sstable (bad magic number)");
+    return Status::Corruption("not an sstable (bad magic number)");
   }
 
   Status result = metaindex_handle_.DecodeFrom(input);
diff --git a/table/table.cc b/table/table.cc
index 71c1756e5f44..dff8a82590a6 100644
--- a/table/table.cc
+++ b/table/table.cc
@@ -41,7 +41,7 @@ Status Table::Open(const Options& options,
                    Table** table) {
   *table = NULL;
   if (size < Footer::kEncodedLength) {
-    return Status::InvalidArgument("file is too short to be an sstable");
+    return Status::Corruption("file is too short to be an sstable");
   }
 
   char footer_space[Footer::kEncodedLength];
@@ -58,7 +58,11 @@ Status Table::Open(const Options& options,
   BlockContents contents;
   Block* index_block = NULL;
   if (s.ok()) {
-    s = ReadBlock(file, ReadOptions(), footer.index_handle(), &contents);
+    ReadOptions opt;
+    if (options.paranoid_checks) {
+      opt.verify_checksums = true;
+    }
+    s = ReadBlock(file, opt, footer.index_handle(), &contents);
     if (s.ok()) {
       index_block = new Block(contents);
     }
@@ -92,6 +96,9 @@ void Table::ReadMeta(const Footer& footer) {
   // TODO(sanjay): Skip this if footer.metaindex_handle() size indicates
   // it is an empty block.
   ReadOptions opt;
+  if (rep_->options.paranoid_checks) {
+    opt.verify_checksums = true;
+  }
   BlockContents contents;
   if (!ReadBlock(rep_->file, opt, footer.metaindex_handle(), &contents).ok()) {
     // Do not propagate errors since meta info is not needed for operation
@@ -120,6 +127,9 @@ void Table::ReadFilter(const Slice& filter_handle_value) {
   // We might want to unify with ReadBlock() if we start
   // requiring checksum verification in Table::Open.
   ReadOptions opt;
+  if (rep_->options.paranoid_checks) {
+    opt.verify_checksums = true;
+  }
   BlockContents block;
   if (!ReadBlock(rep_->file, opt, filter_handle, &block).ok()) {
     return;
diff --git a/util/bloom.cc b/util/bloom.cc
index d7941cd21fab..a27a2ace2886 100644
--- a/util/bloom.cc
+++ b/util/bloom.cc
@@ -29,7 +29,7 @@ class BloomFilterPolicy : public FilterPolicy {
   }
 
   virtual const char* Name() const {
-    return "leveldb.BuiltinBloomFilter";
+    return "leveldb.BuiltinBloomFilter2";
   }
 
   virtual void CreateFilter(const Slice* keys, int n, std::string* dst) const {
diff --git a/util/env_posix.cc b/util/env_posix.cc
index 93eadb1a4f5c..ba2667864acb 100644
--- a/util/env_posix.cc
+++ b/util/env_posix.cc
@@ -3,8 +3,6 @@
 // found in the LICENSE file. See the AUTHORS file for names of contributors.
 #if !defined(LEVELDB_PLATFORM_WINDOWS)
 
-#include <deque>
-#include <set>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -18,9 +16,8 @@
 #include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
-#if defined(LEVELDB_PLATFORM_ANDROID)
-#include <sys/stat.h>
-#endif
+#include <deque>
+#include <set>
 #include "leveldb/env.h"
 #include "leveldb/slice.h"
 #include "port/port.h"
@@ -296,7 +293,8 @@ class PosixEnv : public Env {
  public:
   PosixEnv();
   virtual ~PosixEnv() {
-    fprintf(stderr, "Destroying Env::Default()\n");
+    char msg[] = "Destroying Env::Default()\n";
+    fwrite(msg, 1, sizeof(msg), stderr);
     abort();
   }
 
diff --git a/util/hash.cc b/util/hash.cc
index 07cf022060d4..ed439ce7a2ad 100644
--- a/util/hash.cc
+++ b/util/hash.cc
@@ -34,13 +34,13 @@ uint32_t Hash(const char* data, size_t n, uint32_t seed) {
   // Pick up remaining bytes
   switch (limit - data) {
     case 3:
-      h += data[2] << 16;
+      h += static_cast<unsigned char>(data[2]) << 16;
       FALLTHROUGH_INTENDED;
     case 2:
-      h += data[1] << 8;
+      h += static_cast<unsigned char>(data[1]) << 8;
       FALLTHROUGH_INTENDED;
     case 1:
-      h += data[0];
+      h += static_cast<unsigned char>(data[0]);
       h *= m;
       h ^= (h >> r);
       break;
diff --git a/util/hash_test.cc b/util/hash_test.cc
new file mode 100644
index 000000000000..eaa1c92c2324
--- /dev/null
+++ b/util/hash_test.cc
@@ -0,0 +1,54 @@
+// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#include "util/hash.h"
+#include "util/testharness.h"
+
+namespace leveldb {
+
+class HASH { };
+
+TEST(HASH, SignedUnsignedIssue) {
+  const unsigned char data1[1] = {0x62};
+  const unsigned char data2[2] = {0xc3, 0x97};
+  const unsigned char data3[3] = {0xe2, 0x99, 0xa5};
+  const unsigned char data4[4] = {0xe1, 0x80, 0xb9, 0x32};
+  const unsigned char data5[48] = {
+    0x01, 0xc0, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x14, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x04, 0x00,
+    0x00, 0x00, 0x00, 0x14,
+    0x00, 0x00, 0x00, 0x18,
+    0x28, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+    0x02, 0x00, 0x00, 0x00,
+    0x00, 0x00, 0x00, 0x00,
+  };
+
+  ASSERT_EQ(Hash(0, 0, 0xbc9f1d34), 0xbc9f1d34);
+  ASSERT_EQ(
+      Hash(reinterpret_cast<const char*>(data1), sizeof(data1), 0xbc9f1d34),
+      0xef1345c4);
+  ASSERT_EQ(
+      Hash(reinterpret_cast<const char*>(data2), sizeof(data2), 0xbc9f1d34),
+      0x5b663814);
+  ASSERT_EQ(
+      Hash(reinterpret_cast<const char*>(data3), sizeof(data3), 0xbc9f1d34),
+      0x323c078f);
+  ASSERT_EQ(
+      Hash(reinterpret_cast<const char*>(data4), sizeof(data4), 0xbc9f1d34),
+      0xed21633a);
+  ASSERT_EQ(
+      Hash(reinterpret_cast<const char*>(data5), sizeof(data5), 0x12345678),
+      0xf333dabb);
+}
+
+}  // namespace leveldb
+
+int main(int argc, char** argv) {
+  return leveldb::test::RunAllTests();
+}
diff --git a/util/logging.cc b/util/logging.cc
index 22cf2785123c..ca6b3244038e 100644
--- a/util/logging.cc
+++ b/util/logging.cc
@@ -45,15 +45,6 @@ std::string EscapeString(const Slice& value) {
   return r;
 }
 
-bool ConsumeChar(Slice* in, char c) {
-  if (!in->empty() && (*in)[0] == c) {
-    in->remove_prefix(1);
-    return true;
-  } else {
-    return false;
-  }
-}
-
 bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
   uint64_t v = 0;
   int digits = 0;
diff --git a/util/logging.h b/util/logging.h
index b0c5da813e86..1b450d2480e6 100644
--- a/util/logging.h
+++ b/util/logging.h
@@ -32,10 +32,6 @@ extern std::string NumberToString(uint64_t num);
 // Escapes any non-printable characters found in "value".
 extern std::string EscapeString(const Slice& value);
 
-// If *in starts with "c", advances *in past the first character and
-// returns true.  Otherwise, returns false.
-extern bool ConsumeChar(Slice* in, char c);
-
 // Parse a human-readable number from "*in" into *value.  On success,
 // advances "*in" past the consumed number and sets "*val" to the
 // numeric value.  Otherwise, returns false and leaves *in in an

From ca3ce0fa037a94f2c357ad04d42e5f526cbcb78e Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Thu, 16 Oct 2014 22:49:33 +0200
Subject: [PATCH 0880/1819] squashme on 3fdb9e8c (Bluematt's bikeshedding)

---
 src/chainparams.cpp     | 2 +-
 src/chainparamsbase.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index ec05f592b937..317726606953 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -240,7 +240,7 @@ void SelectParams(CBaseChainParams::Network network) {
     pCurrentParams = &Params(network);
 }
 
-bool SelectParamsFromCommandLine() 
+bool SelectParamsFromCommandLine()
 {
     CBaseChainParams::Network network = NetworkIdFromCommandLine();
     if (network == CBaseChainParams::MAX_NETWORK_TYPES)
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index f275bd544fd2..a602d8e30e5c 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -97,7 +97,7 @@ CBaseChainParams::Network NetworkIdFromCommandLine()
     return CBaseChainParams::MAIN;
 }
 
-bool SelectBaseParamsFromCommandLine() 
+bool SelectBaseParamsFromCommandLine()
 {
     CBaseChainParams::Network network = NetworkIdFromCommandLine();
     if (network == CBaseChainParams::MAX_NETWORK_TYPES)

From e8ea0fd19e16abdcc95a0cdd8f9ae1d348a53168 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Fri, 17 Oct 2014 01:58:43 +0200
Subject: [PATCH 0881/1819] MOVEONLY: CInPoint from core to txmempool

---
 src/core.h      | 13 -------------
 src/txmempool.h | 13 +++++++++++++
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/core.h b/src/core.h
index a348293578b5..a024dad7407a 100644
--- a/src/core.h
+++ b/src/core.h
@@ -61,19 +61,6 @@ class COutPoint
     std::string ToString() const;
 };
 
-/** An inpoint - a combination of a transaction and an index n into its vin */
-class CInPoint
-{
-public:
-    const CTransaction* ptx;
-    uint32_t n;
-
-    CInPoint() { SetNull(); }
-    CInPoint(const CTransaction* ptxIn, uint32_t nIn) { ptx = ptxIn; n = nIn; }
-    void SetNull() { ptx = NULL; n = (uint32_t) -1; }
-    bool IsNull() const { return (ptx == NULL && n == (uint32_t) -1); }
-};
-
 /** An input of a transaction.  It contains the location of the previous
  * transaction's output that it claims and a signature that matches the
  * output's public key.
diff --git a/src/txmempool.h b/src/txmempool.h
index c63fd6f59035..ad190eea9dde 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -52,6 +52,19 @@ class CTxMemPoolEntry
 
 class CMinerPolicyEstimator;
 
+/** An inpoint - a combination of a transaction and an index n into its vin */
+class CInPoint
+{
+public:
+    const CTransaction* ptx;
+    uint32_t n;
+
+    CInPoint() { SetNull(); }
+    CInPoint(const CTransaction* ptxIn, uint32_t nIn) { ptx = ptxIn; n = nIn; }
+    void SetNull() { ptx = NULL; n = (uint32_t) -1; }
+    bool IsNull() const { return (ptx == NULL && n == (uint32_t) -1); }
+};
+
 /*
  * CTxMemPool stores valid-according-to-the-current-best-chain
  * transactions that may be included in the next block.

From d4746d56c0c45b8721da36bc19b2bdaba5d7d094 Mon Sep 17 00:00:00 2001
From: Mark Friedenbach <mark@blockstream.io>
Date: Thu, 16 Oct 2014 16:16:29 -0700
Subject: [PATCH 0882/1819] Add a SECURE style flag for ThreadSafeMessageBox,
 which indicates that the message contains sensitive information. This keeps
 the message from being output to the debug log by bitcoind. Fixes a possible
 security risk when starting bitcoind in server mode without the 'rpcpassword'
 option configured, resulting in the "suggested" password being output to the
 debug log.

---
 src/noui.cpp          | 6 +++++-
 src/qt/bitcoingui.cpp | 3 +++
 src/rpcserver.cpp     | 2 +-
 src/ui_interface.h    | 3 +++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/noui.cpp b/src/noui.cpp
index f786a20db507..8f3b0275b004 100644
--- a/src/noui.cpp
+++ b/src/noui.cpp
@@ -14,6 +14,9 @@
 
 static bool noui_ThreadSafeMessageBox(const std::string& message, const std::string& caption, unsigned int style)
 {
+    bool fSecure = style & CClientUIInterface::SECURE;
+    style &= ~CClientUIInterface::SECURE;
+
     std::string strCaption;
     // Check for usage of predefined caption
     switch (style) {
@@ -30,7 +33,8 @@ static bool noui_ThreadSafeMessageBox(const std::string& message, const std::str
         strCaption += caption; // Use supplied caption (can be empty)
     }
 
-    LogPrintf("%s: %s\n", strCaption, message);
+    if (!fSecure)
+        LogPrintf("%s: %s\n", strCaption, message);
     fprintf(stderr, "%s: %s\n", strCaption.c_str(), message.c_str());
     return false;
 }
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 8a945606dcd0..9d6d07a56bd4 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -992,6 +992,9 @@ void BitcoinGUI::showProgress(const QString &title, int nProgress)
 static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
 {
     bool modal = (style & CClientUIInterface::MODAL);
+    // The SECURE flag has no effect in the Qt GUI.
+    // bool secure = (style & CClientUIInterface::SECURE);
+    style &= ~CClientUIInterface::SECURE;
     bool ret = false;
     // In case of modal message, use blocking connection to wait for user to click a button
     QMetaObject::invokeMethod(gui, "message",
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 1a41344da53a..9668c7883144 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -581,7 +581,7 @@ void StartRPCThreads()
                 strWhatAmI,
                 GetConfigFile().string(),
                 EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)),
-                "", CClientUIInterface::MSG_ERROR);
+                "", CClientUIInterface::MSG_ERROR | CClientUIInterface::SECURE);
         StartShutdown();
         return;
     }
diff --git a/src/ui_interface.h b/src/ui_interface.h
index f5224ba57dbf..1231d5ed0bcd 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -63,6 +63,9 @@ class CClientUIInterface
         /** Force blocking, modal message box dialog (not just OS notification) */
         MODAL               = 0x10000000U,
 
+        /** Do not print contents of message to debug log */
+        SECURE              = 0x40000000U,
+
         /** Predefined combinations for certain default usage cases */
         MSG_INFORMATION = ICON_INFORMATION,
         MSG_WARNING = (ICON_WARNING | BTN_OK | MODAL),

From 8e9a665f5518637b618d8b1f74d440ac07b482cf Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 17 Oct 2014 11:12:34 +0200
Subject: [PATCH 0883/1819] doc: Add historical release notes for 0.9.3

---
 doc/release-notes/release-notes-0.9.3.md | 101 +++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 doc/release-notes/release-notes-0.9.3.md

diff --git a/doc/release-notes/release-notes-0.9.3.md b/doc/release-notes/release-notes-0.9.3.md
new file mode 100644
index 000000000000..0765a360b29d
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.3.md
@@ -0,0 +1,101 @@
+Bitcoin Core version 0.9.3 is now available from:
+
+  https://bitcoin.org/bin/0.9.3/
+
+This is a new minor version release, bringing only bug fixes and updated
+translations. Upgrading to this release is recommended.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+Upgrading and downgrading
+==========================
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+If you are upgrading from version 0.7.2 or earlier, the first time you run
+0.9.3 your blockchain files will be re-indexed, which will take anywhere from 
+30 minutes to several hours, depending on the speed of your machine.
+
+Downgrading warnings
+--------------------
+
+The 'chainstate' for this release is not always compatible with previous
+releases, so if you run 0.9.x and then decide to switch back to a
+0.8.x release you might get a blockchain validation error when starting the
+old release (due to 'pruned outputs' being omitted from the index of
+unspent transaction outputs).
+
+Running the old release with the -reindex option will rebuild the chainstate
+data structures and correct the problem.
+
+Also, the first time you run a 0.8.x release on a 0.9 wallet it will rescan
+the blockchain for missing spent coins, which will take a long time (tens
+of minutes on a typical machine).
+
+0.9.3 Release notes
+=======================
+
+RPC:
+- Avoid a segfault on getblock if it can't read a block from disk
+- Add paranoid return value checks in base58
+
+Protocol and network code:
+- Don't poll showmyip.com, it doesn't exist anymore
+- Add a way to limit deserialized string lengths and use it
+- Add a new checkpoint at block 295,000
+- Increase IsStandard() scriptSig length
+- Avoid querying DNS seeds, if we have open connections
+- Remove a useless millisleep in socket handler
+- Stricter memory limits on CNode
+- Better orphan transaction handling
+- Add `-maxorphantx=<n>` and `-maxorphanblocks=<n>` options for control over the maximum orphan transactions and blocks
+
+Wallet:
+- Check redeemScript size does not exceed 520 byte limit
+- Ignore (and warn about) too-long redeemScripts while loading wallet
+
+GUI:
+- fix 'opens in testnet mode when presented with a BIP-72 link with no fallback'
+- AvailableCoins: acquire cs_main mutex
+- Fix unicode character display on MacOSX
+
+Miscellaneous:
+- key.cpp: fail with a friendlier message on missing ssl EC support
+- Remove bignum dependency for scripts
+- Upgrade OpenSSL to 1.0.1i (see https://www.openssl.org/news/secadv_20140806.txt - just to be sure, no critical issues for Bitcoin Core)
+- Upgrade miniupnpc to 1.9.20140701
+- Fix boost detection in build system on some platforms
+
+Credits
+--------
+
+Thanks to everyone who contributed to this release:
+
+- Andrew Poelstra
+- Cory Fields
+- Gavin Andresen
+- Jeff Garzik
+- Johnathan Corgan
+- Julian Haight
+- Michael Ford
+- Pavel Vasin
+- Peter Todd
+- phantomcircuit
+- Pieter Wuille
+- Rose Toomey
+- Ruben Dario Ponticelli
+- shshshsh
+- Trevin Hofmann
+- Warren Togami
+- Wladimir J. van der Laan
+- Zak Wilcox
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

From 1d66bbcbfc6a792ff9827e706024f03b37200afc Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Fri, 17 Oct 2014 20:48:43 +0800
Subject: [PATCH 0884/1819] Add buildenv.py to gitignore

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index 7d00051f2302..9f1b2a469558 100644
--- a/.gitignore
+++ b/.gitignore
@@ -75,6 +75,7 @@ Bitcoin-Qt.app
 # Unit-tests
 Makefile.test
 bitcoin-qt_test
+src/test/buildenv.py
 
 # Resources cpp
 qrc_*.cpp

From 066e2a1403fe306787a2ce0c8571aa9de57386cf Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 24 Sep 2014 22:24:46 -0400
Subject: [PATCH 0885/1819] script: move CScriptID to standard.h and add a ctor
 for creating them from CScripts

This allows for a reversal of the current behavior.

This:
CScript foo;
CScriptID bar(foo.GetID());

Becomes:
CScript foo;
CScriptID bar(foo);

This way, CScript is no longer dependent on CScriptID or Hash();
---
 src/crypter.cpp                |  1 +
 src/key.h                      |  8 --------
 src/keystore.cpp               |  3 ++-
 src/keystore.h                 |  1 +
 src/rpcmisc.cpp                |  2 +-
 src/rpcrawtransaction.cpp      |  2 +-
 src/rpcwallet.cpp              |  2 +-
 src/script/compressor.cpp      |  1 +
 src/script/compressor.h        |  2 ++
 src/script/script.h            |  6 ------
 src/script/standard.cpp        |  2 ++
 src/script/standard.h          |  9 +++++++++
 src/test/miner_tests.cpp       |  2 +-
 src/test/script_P2SH_tests.cpp | 20 ++++++++++----------
 src/test/script_tests.cpp      |  4 ++--
 src/test/sigopcount_tests.cpp  |  4 ++--
 src/wallet.cpp                 |  2 +-
 17 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/src/crypter.cpp b/src/crypter.cpp
index a872df7024b0..756538836df9 100644
--- a/src/crypter.cpp
+++ b/src/crypter.cpp
@@ -5,6 +5,7 @@
 #include "crypter.h"
 
 #include "script/script.h"
+#include "script/standard.h"
 #include "util.h"
 
 #include <string>
diff --git a/src/key.h b/src/key.h
index f6f6d35d3419..48b165253639 100644
--- a/src/key.h
+++ b/src/key.h
@@ -30,14 +30,6 @@ class CKeyID : public uint160
     CKeyID(const uint160& in) : uint160(in) {}
 };
 
-/** A reference to a CScript: the Hash160 of its serialization (see script.h) */
-class CScriptID : public uint160
-{
-public:
-    CScriptID() : uint160(0) {}
-    CScriptID(const uint160& in) : uint160(in) {}
-};
-
 /** An encapsulated public key. */
 class CPubKey
 {
diff --git a/src/keystore.cpp b/src/keystore.cpp
index 755defa26de9..039c690625d8 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -8,6 +8,7 @@
 #include "crypter.h"
 #include "key.h"
 #include "script/script.h"
+#include "script/standard.h"
 #include "util.h"
 
 #include <boost/foreach.hpp>
@@ -38,7 +39,7 @@ bool CBasicKeyStore::AddCScript(const CScript& redeemScript)
         return error("CBasicKeyStore::AddCScript() : redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE);
 
     LOCK(cs_KeyStore);
-    mapScripts[redeemScript.GetID()] = redeemScript;
+    mapScripts[CScriptID(redeemScript)] = redeemScript;
     return true;
 }
 
diff --git a/src/keystore.h b/src/keystore.h
index d3478f7672ae..4f8189c8f560 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -13,6 +13,7 @@
 #include <boost/variant.hpp>
 
 class CScript;
+class CScriptID;
 
 /** A virtual base class for key stores */
 class CKeyStore
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 8be14b567cc9..92ed1c3e2bd5 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -292,7 +292,7 @@ Value createmultisig(const Array& params, bool fHelp)
 
     // Construct using pay-to-script-hash:
     CScript inner = _createmultisig_redeemScript(params);
-    CScriptID innerID = inner.GetID();
+    CScriptID innerID(inner);
     CBitcoinAddress address(innerID);
 
     Object result;
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 78372da685aa..fdfcb59eeb91 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -480,7 +480,7 @@ Value decodescript(const Array& params, bool fHelp)
     }
     ScriptPubKeyToJSON(script, r, false);
 
-    r.push_back(Pair("p2sh", CBitcoinAddress(script.GetID()).ToString()));
+    r.push_back(Pair("p2sh", CBitcoinAddress(CScriptID(script)).ToString()));
     return r;
 }
 
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index d11455e389aa..68bb4068b82a 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -918,7 +918,7 @@ Value addmultisigaddress(const Array& params, bool fHelp)
 
     // Construct using pay-to-script-hash:
     CScript inner = _createmultisig_redeemScript(params);
-    CScriptID innerID = inner.GetID();
+    CScriptID innerID(inner);
     pwalletMain->AddCScript(inner);
 
     pwalletMain->SetAddressBook(innerID, strAccount, "send");
diff --git a/src/script/compressor.cpp b/src/script/compressor.cpp
index 51a3cf6025e8..dbb4df8b7c1a 100644
--- a/src/script/compressor.cpp
+++ b/src/script/compressor.cpp
@@ -4,6 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "compressor.h"
+#include "script/standard.h"
 
 bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
 {
diff --git a/src/script/compressor.h b/src/script/compressor.h
index 53c6bf3ecc73..f48ecf500179 100644
--- a/src/script/compressor.h
+++ b/src/script/compressor.h
@@ -8,6 +8,8 @@
 
 #include "script/script.h"
 
+class CScriptID;
+
 /** Compact serializer for scripts.
  *
  *  It detects common cases and encodes them much more efficiently.
diff --git a/src/script/script.h b/src/script/script.h
index caf176476f18..4d685f55965f 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -610,12 +610,6 @@ class CScript : public std::vector<unsigned char>
         }
         return str;
     }
-
-    CScriptID GetID() const
-    {
-        return CScriptID(Hash160(*this));
-    }
-
     void clear()
     {
         // The default std::vector::clear() does not release memory.
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 53ae254d59ac..adbec01f2ebc 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -14,6 +14,8 @@ using namespace std;
 
 typedef vector<unsigned char> valtype;
 
+CScriptID::CScriptID(const CScript& in) : uint160(in.size() ? Hash160(in.begin(), in.end()) : 0) {}
+
 const char* GetTxnOutputType(txnouttype t)
 {
     switch (t)
diff --git a/src/script/standard.h b/src/script/standard.h
index ead79b82a23d..38d0b59885da 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -13,6 +13,15 @@
 
 class CScript;
 
+/** A reference to a CScript: the Hash160 of its serialization (see script.h) */
+class CScriptID : public uint160
+{
+public:
+    CScriptID() : uint160(0) {}
+    CScriptID(const CScript& in);
+    CScriptID(const uint160& in) : uint160(in) {}
+};
+
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
 
 // Mandatory script verification flags that all new blocks must comply with for
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index bad5c13ac2b6..93b7fe189a38 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -170,7 +170,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
     tx.vin[0].scriptSig = CScript() << OP_1;
     tx.vout[0].nValue = 4900000000LL;
     script = CScript() << OP_0;
-    tx.vout[0].scriptPubKey = GetScriptForDestination(script.GetID());
+    tx.vout[0].scriptPubKey = GetScriptForDestination(CScriptID(script));
     hash = tx.GetHash();
     mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
     tx.vin[0].prevout.hash = hash;
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index f8361a0dc8bb..a23792a4f346 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE(sign)
     for (int i = 0; i < 4; i++)
     {
         keystore.AddCScript(standardScripts[i]);
-        evalScripts[i] = GetScriptForDestination(standardScripts[i].GetID());
+        evalScripts[i] = GetScriptForDestination(CScriptID(standardScripts[i]));
     }
 
     CMutableTransaction txFrom;  // Funding transaction:
@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE(norecurse)
     CScript invalidAsScript;
     invalidAsScript << OP_INVALIDOPCODE << OP_INVALIDOPCODE;
 
-    CScript p2sh = GetScriptForDestination(invalidAsScript.GetID());
+    CScript p2sh = GetScriptForDestination(CScriptID(invalidAsScript));
 
     CScript scriptSig;
     scriptSig << Serialize(invalidAsScript);
@@ -139,7 +139,7 @@ BOOST_AUTO_TEST_CASE(norecurse)
 
     // Try to recur, and verification should succeed because
     // the inner HASH160 <> EQUAL should only check the hash:
-    CScript p2sh2 = GetScriptForDestination(p2sh.GetID());
+    CScript p2sh2 = GetScriptForDestination(CScriptID(p2sh));
     CScript scriptSig2;
     scriptSig2 << Serialize(invalidAsScript) << Serialize(p2sh);
 
@@ -169,7 +169,7 @@ BOOST_AUTO_TEST_CASE(set)
     CScript outer[4];
     for (int i = 0; i < 4; i++)
     {
-        outer[i] = GetScriptForDestination(inner[i].GetID());
+        outer[i] = GetScriptForDestination(CScriptID(inner[i]));
         keystore.AddCScript(inner[i]);
     }
 
@@ -242,7 +242,7 @@ BOOST_AUTO_TEST_CASE(switchover)
     CScript scriptSig;
     scriptSig << Serialize(notValid);
 
-    CScript fund = GetScriptForDestination(notValid.GetID());
+    CScript fund = GetScriptForDestination(CScriptID(notValid));
 
 
     // Validation should succeed under old rules (hash is correct):
@@ -275,7 +275,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     keystore.AddCScript(pay1);
     CScript pay1of3 = GetScriptForMultisig(1, keys);
 
-    txFrom.vout[0].scriptPubKey = GetScriptForDestination(pay1.GetID()); // P2SH (OP_CHECKSIG)
+    txFrom.vout[0].scriptPubKey = GetScriptForDestination(CScriptID(pay1)); // P2SH (OP_CHECKSIG)
     txFrom.vout[0].nValue = 1000;
     txFrom.vout[1].scriptPubKey = pay1; // ordinary OP_CHECKSIG
     txFrom.vout[1].nValue = 2000;
@@ -290,7 +290,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     oneAndTwo << OP_2 << key[3].GetPubKey() << key[4].GetPubKey() << key[5].GetPubKey();
     oneAndTwo << OP_3 << OP_CHECKMULTISIG;
     keystore.AddCScript(oneAndTwo);
-    txFrom.vout[3].scriptPubKey = GetScriptForDestination(oneAndTwo.GetID());
+    txFrom.vout[3].scriptPubKey = GetScriptForDestination(CScriptID(oneAndTwo));
     txFrom.vout[3].nValue = 4000;
 
     // vout[4] is max sigops:
@@ -299,17 +299,17 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
         fifteenSigops << key[i%3].GetPubKey();
     fifteenSigops << OP_15 << OP_CHECKMULTISIG;
     keystore.AddCScript(fifteenSigops);
-    txFrom.vout[4].scriptPubKey = GetScriptForDestination(fifteenSigops.GetID());
+    txFrom.vout[4].scriptPubKey = GetScriptForDestination(CScriptID(fifteenSigops));
     txFrom.vout[4].nValue = 5000;
 
     // vout[5/6] are non-standard because they exceed MAX_P2SH_SIGOPS
     CScript sixteenSigops; sixteenSigops << OP_16 << OP_CHECKMULTISIG;
     keystore.AddCScript(sixteenSigops);
-    txFrom.vout[5].scriptPubKey = GetScriptForDestination(fifteenSigops.GetID());
+    txFrom.vout[5].scriptPubKey = GetScriptForDestination(CScriptID(fifteenSigops));
     txFrom.vout[5].nValue = 5000;
     CScript twentySigops; twentySigops << OP_CHECKMULTISIG;
     keystore.AddCScript(twentySigops);
-    txFrom.vout[6].scriptPubKey = GetScriptForDestination(twentySigops.GetID());
+    txFrom.vout[6].scriptPubKey = GetScriptForDestination(CScriptID(twentySigops));
     txFrom.vout[6].nValue = 6000;
 
     coins.ModifyCoins(txFrom.GetHash())->FromTx(txFrom, 0);
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index a4b0212494e1..cfb4fa6e7da8 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -162,7 +162,7 @@ class TestBuilder
     TestBuilder(const CScript& redeemScript, const std::string& comment_, int flags_, bool P2SH = false) : scriptPubKey(redeemScript), havePush(false), comment(comment_), flags(flags_)
     {
         if (P2SH) {
-            creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << redeemScript.GetID() << OP_EQUAL);
+            creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << CScriptID(redeemScript) << OP_EQUAL);
         } else {
             creditTx = BuildCreditingTransaction(redeemScript);
         }
@@ -697,7 +697,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
     // P2SH, single-signature case:
     CScript pkSingle; pkSingle << keys[0].GetPubKey() << OP_CHECKSIG;
     keystore.AddCScript(pkSingle);
-    scriptPubKey = GetScriptForDestination(pkSingle.GetID());
+    scriptPubKey = GetScriptForDestination(CScriptID(pkSingle));
     SignSignature(keystore, txFrom, txTo, 0);
     combined = CombineSignatures(scriptPubKey, txTo, 0, scriptSig, empty);
     BOOST_CHECK(combined == scriptSig);
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 62a6cd63d65a..4ce2c87a0d24 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U);
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 21U);
 
-    CScript p2sh = GetScriptForDestination(s1.GetID());
+    CScript p2sh = GetScriptForDestination(CScriptID(s1));
     CScript scriptSig;
     scriptSig << OP_0 << Serialize(s1);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig), 3U);
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(true), 3U);
     BOOST_CHECK_EQUAL(s2.GetSigOpCount(false), 20U);
 
-    p2sh = GetScriptForDestination(s2.GetID());
+    p2sh = GetScriptForDestination(CScriptID(s2));
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U);
     CScript scriptSig2;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 19e43f6ec2b4..65944587f8b8 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -158,7 +158,7 @@ bool CWallet::LoadCScript(const CScript& redeemScript)
      * these. Do not add them to the wallet and warn. */
     if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE)
     {
-        std::string strAddr = CBitcoinAddress(redeemScript.GetID()).ToString();
+        std::string strAddr = CBitcoinAddress(CScriptID(redeemScript)).ToString();
         LogPrintf("%s: Warning: This wallet contains a redeemScript of size %i which exceeds maximum size %i thus can never be redeemed. Do not use address %s.\n",
             __func__, redeemScript.size(), MAX_SCRIPT_ELEMENT_SIZE, strAddr);
         return true;

From e9ca4280f3abb8b2b6fa35a41e881996278ebfff Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 24 Sep 2014 22:54:08 -0400
Subject: [PATCH 0886/1819] script: add ToByteVector() for converting anything
 with begin/end

This should move to a util header once their dependencies are cleaned up.
---
 src/miner.cpp                  |  2 +-
 src/script/script.h            | 29 +++--------
 src/script/sign.cpp            |  2 +-
 src/script/standard.cpp        |  6 +--
 src/test/multisig_tests.cpp    | 42 ++++++++--------
 src/test/script_P2SH_tests.cpp | 20 ++++----
 src/test/script_tests.cpp      | 88 +++++++++++++++++-----------------
 src/test/sigopcount_tests.cpp  |  6 +--
 src/test/transaction_tests.cpp |  4 +-
 9 files changed, 91 insertions(+), 108 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index c2762bf44e39..6a2718e40340 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -398,7 +398,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey)
     if (!reservekey.GetReservedKey(pubkey))
         return NULL;
 
-    CScript scriptPubKey = CScript() << pubkey << OP_CHECKSIG;
+    CScript scriptPubKey = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
     return CreateNewBlock(scriptPubKey);
 }
 
diff --git a/src/script/script.h b/src/script/script.h
index 4d685f55965f..6676e852ae43 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -16,6 +16,12 @@
 
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 
+template <typename T>
+std::vector<unsigned char> ToByteVector(const T& in)
+{
+    return std::vector<unsigned char>(in.begin(), in.end());
+}
+
 /** Script opcodes */
 enum opcodetype
 {
@@ -358,7 +364,6 @@ class CScript : public std::vector<unsigned char>
     CScript(int64_t b)        { operator<<(b); }
 
     explicit CScript(opcodetype b)     { operator<<(b); }
-    explicit CScript(const uint256& b) { operator<<(b); }
     explicit CScript(const CScriptNum& b) { operator<<(b); }
     explicit CScript(const std::vector<unsigned char>& b) { operator<<(b); }
 
@@ -373,28 +378,6 @@ class CScript : public std::vector<unsigned char>
         return *this;
     }
 
-    CScript& operator<<(const uint160& b)
-    {
-        insert(end(), sizeof(b));
-        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
-        return *this;
-    }
-
-    CScript& operator<<(const uint256& b)
-    {
-        insert(end(), sizeof(b));
-        insert(end(), (unsigned char*)&b, (unsigned char*)&b + sizeof(b));
-        return *this;
-    }
-
-    CScript& operator<<(const CPubKey& key)
-    {
-        assert(key.size() < OP_PUSHDATA1);
-        insert(end(), (unsigned char)key.size());
-        insert(end(), key.begin(), key.end());
-        return *this;
-    }
-
     CScript& operator<<(const CScriptNum& b)
     {
         *this << b.getvch();
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index da77e7d1f1be..bf98c40394f7 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -78,7 +78,7 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash
         {
             CPubKey vch;
             keystore.GetPubKey(keyID, vch);
-            scriptSigRet << vch;
+            scriptSigRet << ToByteVector(vch);
         }
         return true;
     case TX_SCRIPTHASH:
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index adbec01f2ebc..7e6b136a28d4 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -282,13 +282,13 @@ class CScriptVisitor : public boost::static_visitor<bool>
 
     bool operator()(const CKeyID &keyID) const {
         script->clear();
-        *script << OP_DUP << OP_HASH160 << keyID << OP_EQUALVERIFY << OP_CHECKSIG;
+        *script << OP_DUP << OP_HASH160 << ToByteVector(keyID) << OP_EQUALVERIFY << OP_CHECKSIG;
         return true;
     }
 
     bool operator()(const CScriptID &scriptID) const {
         script->clear();
-        *script << OP_HASH160 << scriptID << OP_EQUAL;
+        *script << OP_HASH160 << ToByteVector(scriptID) << OP_EQUAL;
         return true;
     }
 };
@@ -308,7 +308,7 @@ CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys)
 
     script << CScript::EncodeOP_N(nRequired);
     BOOST_FOREACH(const CPubKey& key, keys)
-        script << key;
+        script << ToByteVector(key);
     script << CScript::EncodeOP_N(keys.size()) << OP_CHECKMULTISIG;
     return script;
 }
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 5a2ec1cb3194..e9fc86779abe 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -51,13 +51,13 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         key[i].MakeNewKey(true);
 
     CScript a_and_b;
-    a_and_b << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_and_b << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
 
     CScript a_or_b;
-    a_or_b << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_or_b << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
 
     CScript escrow;
-    escrow << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
+    escrow << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
 
     CMutableTransaction txFrom;  // Funding transaction
     txFrom.vout.resize(3);
@@ -138,28 +138,28 @@ BOOST_AUTO_TEST_CASE(multisig_IsStandard)
     txnouttype whichType;
 
     CScript a_and_b;
-    a_and_b << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_and_b << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
     BOOST_CHECK(::IsStandard(a_and_b, whichType));
 
     CScript a_or_b;
-    a_or_b  << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_or_b  << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
     BOOST_CHECK(::IsStandard(a_or_b, whichType));
 
     CScript escrow;
-    escrow << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
+    escrow << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
     BOOST_CHECK(::IsStandard(escrow, whichType));
 
     CScript one_of_four;
-    one_of_four << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << key[3].GetPubKey() << OP_4 << OP_CHECKMULTISIG;
+    one_of_four << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << ToByteVector(key[3].GetPubKey()) << OP_4 << OP_CHECKMULTISIG;
     BOOST_CHECK(!::IsStandard(one_of_four, whichType));
 
     CScript malformed[6];
-    malformed[0] << OP_3 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
-    malformed[1] << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
-    malformed[2] << OP_0 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
-    malformed[3] << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_0 << OP_CHECKMULTISIG;
-    malformed[4] << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_CHECKMULTISIG;
-    malformed[5] << OP_1 << key[0].GetPubKey() << key[1].GetPubKey();
+    malformed[0] << OP_3 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
+    malformed[1] << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
+    malformed[2] << OP_0 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
+    malformed[3] << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_0 << OP_CHECKMULTISIG;
+    malformed[4] << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_CHECKMULTISIG;
+    malformed[5] << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey());
 
     for (int i = 0; i < 6; i++)
         BOOST_CHECK(!::IsStandard(malformed[i], whichType));
@@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         vector<valtype> solutions;
         txnouttype whichType;
         CScript s;
-        s << key[0].GetPubKey() << OP_CHECKSIG;
+        s << ToByteVector(key[0].GetPubKey()) << OP_CHECKSIG;
         BOOST_CHECK(Solver(s, whichType, solutions));
         BOOST_CHECK(solutions.size() == 1);
         CTxDestination addr;
@@ -207,7 +207,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         vector<valtype> solutions;
         txnouttype whichType;
         CScript s;
-        s << OP_DUP << OP_HASH160 << key[0].GetPubKey().GetID() << OP_EQUALVERIFY << OP_CHECKSIG;
+        s << OP_DUP << OP_HASH160 << ToByteVector(key[0].GetPubKey().GetID()) << OP_EQUALVERIFY << OP_CHECKSIG;
         BOOST_CHECK(Solver(s, whichType, solutions));
         BOOST_CHECK(solutions.size() == 1);
         CTxDestination addr;
@@ -222,7 +222,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         vector<valtype> solutions;
         txnouttype whichType;
         CScript s;
-        s << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+        s << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
         BOOST_CHECK(Solver(s, whichType, solutions));
         BOOST_CHECK_EQUAL(solutions.size(), 4U);
         CTxDestination addr;
@@ -237,7 +237,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         vector<valtype> solutions;
         txnouttype whichType;
         CScript s;
-        s << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+        s << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
         BOOST_CHECK(Solver(s, whichType, solutions));
         BOOST_CHECK_EQUAL(solutions.size(), 4U);
         vector<CTxDestination> addrs;
@@ -256,7 +256,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
         vector<valtype> solutions;
         txnouttype whichType;
         CScript s;
-        s << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
+        s << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
         BOOST_CHECK(Solver(s, whichType, solutions));
         BOOST_CHECK(solutions.size() == 5);
     }
@@ -274,13 +274,13 @@ BOOST_AUTO_TEST_CASE(multisig_Sign)
     }
 
     CScript a_and_b;
-    a_and_b << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_and_b << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
 
     CScript a_or_b;
-    a_or_b  << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    a_or_b  << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
 
     CScript escrow;
-    escrow << OP_2 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey() << OP_3 << OP_CHECKMULTISIG;
+    escrow << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
 
     CMutableTransaction txFrom;  // Funding transaction
     txFrom.vout.resize(3);
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index a23792a4f346..fcab652783e6 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -67,9 +67,9 @@ BOOST_AUTO_TEST_CASE(sign)
     // 8 Scripts: checking all combinations of
     // different keys, straight/P2SH, pubkey/pubkeyhash
     CScript standardScripts[4];
-    standardScripts[0] << key[0].GetPubKey() << OP_CHECKSIG;
+    standardScripts[0] << ToByteVector(key[0].GetPubKey()) << OP_CHECKSIG;
     standardScripts[1] = GetScriptForDestination(key[1].GetPubKey().GetID());
-    standardScripts[2] << key[1].GetPubKey() << OP_CHECKSIG;
+    standardScripts[2] << ToByteVector(key[1].GetPubKey()) << OP_CHECKSIG;
     standardScripts[3] = GetScriptForDestination(key[2].GetPubKey().GetID());
     CScript evalScripts[4];
     for (int i = 0; i < 4; i++)
@@ -206,9 +206,9 @@ BOOST_AUTO_TEST_CASE(set)
 BOOST_AUTO_TEST_CASE(is)
 {
     // Test CScript::IsPayToScriptHash()
-    uint160 dummy;
+    uint160 dummy(0);
     CScript p2sh;
-    p2sh << OP_HASH160 << dummy << OP_EQUAL;
+    p2sh << OP_HASH160 << ToByteVector(dummy) << OP_EQUAL;
     BOOST_CHECK(p2sh.IsPayToScriptHash());
 
     // Not considered pay-to-script-hash if using one of the OP_PUSHDATA opcodes:
@@ -224,13 +224,13 @@ BOOST_AUTO_TEST_CASE(is)
     CScript not_p2sh;
     BOOST_CHECK(!not_p2sh.IsPayToScriptHash());
 
-    not_p2sh.clear(); not_p2sh << OP_HASH160 << dummy << dummy << OP_EQUAL;
+    not_p2sh.clear(); not_p2sh << OP_HASH160 << ToByteVector(dummy) << ToByteVector(dummy) << OP_EQUAL;
     BOOST_CHECK(!not_p2sh.IsPayToScriptHash());
 
-    not_p2sh.clear(); not_p2sh << OP_NOP << dummy << OP_EQUAL;
+    not_p2sh.clear(); not_p2sh << OP_NOP << ToByteVector(dummy) << OP_EQUAL;
     BOOST_CHECK(!not_p2sh.IsPayToScriptHash());
 
-    not_p2sh.clear(); not_p2sh << OP_HASH160 << dummy << OP_CHECKSIG;
+    not_p2sh.clear(); not_p2sh << OP_HASH160 << ToByteVector(dummy) << OP_CHECKSIG;
     BOOST_CHECK(!not_p2sh.IsPayToScriptHash());
 }
 
@@ -285,9 +285,9 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     // vout[3] is complicated 1-of-3 AND 2-of-3
     // ... that is OK if wrapped in P2SH:
     CScript oneAndTwo;
-    oneAndTwo << OP_1 << key[0].GetPubKey() << key[1].GetPubKey() << key[2].GetPubKey();
+    oneAndTwo << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey());
     oneAndTwo << OP_3 << OP_CHECKMULTISIGVERIFY;
-    oneAndTwo << OP_2 << key[3].GetPubKey() << key[4].GetPubKey() << key[5].GetPubKey();
+    oneAndTwo << OP_2 << ToByteVector(key[3].GetPubKey()) << ToByteVector(key[4].GetPubKey()) << ToByteVector(key[5].GetPubKey());
     oneAndTwo << OP_3 << OP_CHECKMULTISIG;
     keystore.AddCScript(oneAndTwo);
     txFrom.vout[3].scriptPubKey = GetScriptForDestination(CScriptID(oneAndTwo));
@@ -296,7 +296,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
     // vout[4] is max sigops:
     CScript fifteenSigops; fifteenSigops << OP_1;
     for (unsigned i = 0; i < MAX_P2SH_SIGOPS; i++)
-        fifteenSigops << key[i%3].GetPubKey();
+        fifteenSigops << ToByteVector(key[i%3].GetPubKey());
     fifteenSigops << OP_15 << OP_CHECKMULTISIG;
     keystore.AddCScript(fifteenSigops);
     txFrom.vout[4].scriptPubKey = GetScriptForDestination(CScriptID(fifteenSigops));
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index cfb4fa6e7da8..d3fc673a7934 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -162,7 +162,7 @@ class TestBuilder
     TestBuilder(const CScript& redeemScript, const std::string& comment_, int flags_, bool P2SH = false) : scriptPubKey(redeemScript), havePush(false), comment(comment_), flags(flags_)
     {
         if (P2SH) {
-            creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << CScriptID(redeemScript) << OP_EQUAL);
+            creditTx = BuildCreditingTransaction(CScript() << OP_HASH160 << ToByteVector(CScriptID(redeemScript)) << OP_EQUAL);
         } else {
             creditTx = BuildCreditingTransaction(redeemScript);
         }
@@ -270,135 +270,135 @@ BOOST_AUTO_TEST_CASE(script_build)
     std::vector<TestBuilder> good;
     std::vector<TestBuilder> bad;
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey0 << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0) << OP_CHECKSIG,
                                "P2PK", 0
                               ).PushSig(keys.key0));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey0 << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0) << OP_CHECKSIG,
                               "P2PK, bad sig", 0
                              ).PushSig(keys.key0).DamagePush(10));
 
-    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1C.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey1C.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG,
                                "P2PKH", 0
                               ).PushSig(keys.key1).Push(keys.pubkey1C));
-    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey2C.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey2C.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG,
                               "P2PKH, bad pubkey", 0
                              ).PushSig(keys.key2).Push(keys.pubkey2C).DamagePush(5));
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG,
                                "P2PK anyonecanpay", 0
                               ).PushSig(keys.key1, SIGHASH_ALL | SIGHASH_ANYONECANPAY));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG,
                               "P2PK anyonecanpay marked with normal hashtype", 0
                              ).PushSig(keys.key1, SIGHASH_ALL | SIGHASH_ANYONECANPAY).EditPush(70, "81", "01"));
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey0C << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG,
                                "P2SH(P2PK)", SCRIPT_VERIFY_P2SH, true
                               ).PushSig(keys.key0).PushRedeem());
-    bad.push_back(TestBuilder(CScript() << keys.pubkey0C << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0C) << OP_CHECKSIG,
                               "P2SH(P2PK), bad redeemscript", SCRIPT_VERIFY_P2SH, true
                              ).PushSig(keys.key0).PushRedeem().DamagePush(10));
 
-    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey1.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG,
                                "P2SH(P2PKH), bad sig but no VERIFY_P2SH", 0, true
                               ).PushSig(keys.key0).DamagePush(10).PushRedeem());
-    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << keys.pubkey1.GetID() << OP_EQUALVERIFY << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << OP_DUP << OP_HASH160 << ToByteVector(keys.pubkey1.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG,
                               "P2SH(P2PKH), bad sig", SCRIPT_VERIFY_P2SH, true
                              ).PushSig(keys.key0).DamagePush(10).PushRedeem());
 
-    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    good.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                                "3-of-3", 0
                               ).Num(0).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
-    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    bad.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                               "3-of-3, 2 sigs", 0
                              ).Num(0).PushSig(keys.key0).PushSig(keys.key1).Num(0));
 
-    good.push_back(TestBuilder(CScript() << OP_2 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                                "P2SH(2-of-3)", SCRIPT_VERIFY_P2SH, true
                               ).Num(0).PushSig(keys.key1).PushSig(keys.key2).PushRedeem());
-    bad.push_back(TestBuilder(CScript() << OP_2 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                               "P2SH(2-of-3), 1 sig", SCRIPT_VERIFY_P2SH, true
                              ).Num(0).PushSig(keys.key1).Num(0).PushRedeem());
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                                "P2PK with too much R padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                               "P2PK with too much R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
-    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                                "P2PK with too much S padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                               "P2PK with too much S padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL).EditPush(1, "44", "45").EditPush(37, "20", "2100"));
-    good.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                                "P2PK with too little R padding but no DERSIG", 0
                               ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1C << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
                               "P2PK with too little R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
-    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with bad sig with too much R padding but no DERSIG", 0
                               ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000").DamagePush(10));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with bad sig with too much R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000").DamagePush(10));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with too much R padding but no DERSIG", 0
                              ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with too much R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG,
                                "P2PK with high S but no LOW_S", 0
                               ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey2C << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG,
                               "P2PK with high S", SCRIPT_VERIFY_LOW_S
                              ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG,
                                "P2PK with hybrid pubkey but no STRICTENC", 0
                               ).PushSig(keys.key0, SIGHASH_ALL));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG,
                               "P2PK with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
                              ).PushSig(keys.key0, SIGHASH_ALL));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with hybrid pubkey but no STRICTENC", 0
                              ).PushSig(keys.key0, SIGHASH_ALL));
-    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
                               ).PushSig(keys.key0, SIGHASH_ALL));
-    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with invalid hybrid pubkey but no STRICTENC", 0
                               ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
-    good.push_back(TestBuilder(CScript() << keys.pubkey0H << OP_CHECKSIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with invalid hybrid pubkey", SCRIPT_VERIFY_STRICTENC
                               ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
 
-    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG,
                                "P2PK with undefined hashtype but no STRICTENC", 0
                               ).PushSig(keys.key1, 5));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG,
                               "P2PK with undefined hashtype", SCRIPT_VERIFY_STRICTENC
                              ).PushSig(keys.key1, 5));
-    good.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC", 0
                               ).PushSig(keys.key1, 5).DamagePush(10));
-    bad.push_back(TestBuilder(CScript() << keys.pubkey1 << OP_CHECKSIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with invalid sig and undefined hashtype", SCRIPT_VERIFY_STRICTENC
                              ).PushSig(keys.key1, 5).DamagePush(10));
 
-    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    good.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                                "3-of-3 with nonzero dummy but no NULLDUMMY", 0
                               ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
-    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG,
+    bad.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG,
                               "3-of-3 with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2));
-    good.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG << OP_NOT,
+    good.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG << OP_NOT,
                                "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY", 0
                               ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2).DamagePush(10));
-    bad.push_back(TestBuilder(CScript() << OP_3 << keys.pubkey0C << keys.pubkey1C << keys.pubkey2C << OP_3 << OP_CHECKMULTISIG << OP_NOT,
+    bad.push_back(TestBuilder(CScript() << OP_3 << ToByteVector(keys.pubkey0C) << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_3 << OP_CHECKMULTISIG << OP_NOT,
                               "3-of-3 NOT with invalid sig with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2).DamagePush(10));
 
@@ -582,7 +582,7 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     key3.MakeNewKey(true);
 
     CScript scriptPubKey12;
-    scriptPubKey12 << OP_1 << key1.GetPubKey() << key2.GetPubKey() << OP_2 << OP_CHECKMULTISIG;
+    scriptPubKey12 << OP_1 << ToByteVector(key1.GetPubKey()) << ToByteVector(key2.GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
 
     CMutableTransaction txFrom12 = BuildCreditingTransaction(scriptPubKey12);
     CMutableTransaction txTo12 = BuildSpendingTransaction(CScript(), txFrom12);
@@ -608,7 +608,7 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     key4.MakeNewKey(false);
 
     CScript scriptPubKey23;
-    scriptPubKey23 << OP_2 << key1.GetPubKey() << key2.GetPubKey() << key3.GetPubKey() << OP_3 << OP_CHECKMULTISIG;
+    scriptPubKey23 << OP_2 << ToByteVector(key1.GetPubKey()) << ToByteVector(key2.GetPubKey()) << ToByteVector(key3.GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
 
     CMutableTransaction txFrom23 = BuildCreditingTransaction(scriptPubKey23);
     CMutableTransaction txTo23 = BuildSpendingTransaction(CScript(), txFrom23);
@@ -695,7 +695,7 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
     BOOST_CHECK(combined == scriptSigCopy || combined == scriptSig);
 
     // P2SH, single-signature case:
-    CScript pkSingle; pkSingle << keys[0].GetPubKey() << OP_CHECKSIG;
+    CScript pkSingle; pkSingle << ToByteVector(keys[0].GetPubKey()) << OP_CHECKSIG;
     keystore.AddCScript(pkSingle);
     scriptPubKey = GetScriptForDestination(CScriptID(pkSingle));
     SignSignature(keystore, txFrom, txTo, 0);
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 4ce2c87a0d24..7b27703b6223 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -31,8 +31,8 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(false), 0U);
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 0U);
 
-    uint160 dummy;
-    s1 << OP_1 << dummy << dummy << OP_2 << OP_CHECKMULTISIG;
+    uint160 dummy(0);
+    s1 << OP_1 << ToByteVector(dummy) << ToByteVector(dummy) << OP_2 << OP_CHECKMULTISIG;
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 2U);
     s1 << OP_IF << OP_CHECKSIG << OP_ENDIF;
     BOOST_CHECK_EQUAL(s1.GetSigOpCount(true), 3U);
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE(GetSigOpCount)
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(true), 0U);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(false), 0U);
     CScript scriptSig2;
-    scriptSig2 << OP_1 << dummy << dummy << Serialize(s2);
+    scriptSig2 << OP_1 << ToByteVector(dummy) << ToByteVector(dummy) << Serialize(s2);
     BOOST_CHECK_EQUAL(p2sh.GetSigOpCount(scriptSig2), 3U);
 }
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 18cb8f3d1ba7..41ccaaac9452 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -259,9 +259,9 @@ SetupDummyInputs(CBasicKeyStore& keystoreRet, CCoinsViewCache& coinsRet)
     // Create some dummy input transactions
     dummyTransactions[0].vout.resize(2);
     dummyTransactions[0].vout[0].nValue = 11*CENT;
-    dummyTransactions[0].vout[0].scriptPubKey << key[0].GetPubKey() << OP_CHECKSIG;
+    dummyTransactions[0].vout[0].scriptPubKey << ToByteVector(key[0].GetPubKey()) << OP_CHECKSIG;
     dummyTransactions[0].vout[1].nValue = 50*CENT;
-    dummyTransactions[0].vout[1].scriptPubKey << key[1].GetPubKey() << OP_CHECKSIG;
+    dummyTransactions[0].vout[1].scriptPubKey << ToByteVector(key[1].GetPubKey()) << OP_CHECKSIG;
     coinsRet.ModifyCoins(dummyTransactions[0].GetHash())->FromTx(dummyTransactions[0], 0);
 
     dummyTransactions[1].vout.resize(2);

From db8eb54bd7239ff2b046fe34b1c8d692860c6b5b Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Sep 2014 19:45:20 -0400
Subject: [PATCH 0887/1819] script: move ToString and ValueString out of the
 header

---
 src/script/script.cpp | 33 +++++++++++++++++++++++++++++++++
 src/script/script.h   | 30 +-----------------------------
 2 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/src/script/script.cpp b/src/script/script.cpp
index a5126e7cc26f..1ce8ddb6df3e 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -7,6 +7,16 @@
 
 #include <boost/foreach.hpp>
 
+namespace {
+inline std::string ValueString(const std::vector<unsigned char>& vch)
+{
+    if (vch.size() <= 4)
+        return strprintf("%d", CScriptNum(vch).getint());
+    else
+        return HexStr(vch);
+}
+} // anon namespace
+
 using namespace std;
 
 const char* GetOpName(opcodetype opcode)
@@ -253,3 +263,26 @@ bool CScript::HasCanonicalPushes() const
     }
     return true;
 }
+
+std::string CScript::ToString() const
+{
+    std::string str;
+    opcodetype opcode;
+    std::vector<unsigned char> vch;
+    const_iterator pc = begin();
+    while (pc < end())
+    {
+        if (!str.empty())
+            str += " ";
+        if (!GetOp(pc, opcode, vch))
+        {
+            str += "[error]";
+            return str;
+        }
+        if (0 <= opcode && opcode <= OP_PUSHDATA4)
+            str += ValueString(vch);
+        else
+            str += GetOpName(opcode);
+    }
+    return str;
+}
diff --git a/src/script/script.h b/src/script/script.h
index 6676e852ae43..4f6ee0c52114 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -318,13 +318,6 @@ class CScriptNum
     int64_t m_value;
 };
 
-inline std::string ValueString(const std::vector<unsigned char>& vch)
-{
-    if (vch.size() <= 4)
-        return strprintf("%d", CScriptNum(vch).getint());
-    else
-        return HexStr(vch);
-}
 
 /** Serialized script, used inside transaction inputs and outputs */
 class CScript : public std::vector<unsigned char>
@@ -571,28 +564,7 @@ class CScript : public std::vector<unsigned char>
         return (size() > 0 && *begin() == OP_RETURN);
     }
 
-    std::string ToString() const
-    {
-        std::string str;
-        opcodetype opcode;
-        std::vector<unsigned char> vch;
-        const_iterator pc = begin();
-        while (pc < end())
-        {
-            if (!str.empty())
-                str += " ";
-            if (!GetOp(pc, opcode, vch))
-            {
-                str += "[error]";
-                return str;
-            }
-            if (0 <= opcode && opcode <= OP_PUSHDATA4)
-                str += ValueString(vch);
-            else
-                str += GetOpName(opcode);
-        }
-        return str;
-    }
+    std::string ToString() const;
     void clear()
     {
         // The default std::vector::clear() does not release memory.

From 85c579e3a63cf505d6cedc454755265572e97d3e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 24 Sep 2014 23:32:36 -0400
Subject: [PATCH 0888/1819] script: add a slew of includes all around and drop
 includes from script.h

Lots of files ended up with indirect includes from script.h.
---
 src/chain.h                        |  1 +
 src/chainparams.cpp                |  1 +
 src/core.cpp                       |  2 ++
 src/core_read.cpp                  |  2 ++
 src/core_write.cpp                 |  1 +
 src/main.h                         |  1 +
 src/protocol.cpp                   |  1 +
 src/qt/test/paymentservertests.cpp |  1 +
 src/script/compressor.cpp          |  2 ++
 src/script/compressor.h            |  3 +++
 src/script/interpreter.cpp         |  1 +
 src/script/script.cpp              |  3 ++-
 src/script/script.h                | 12 ++++++------
 src/script/standard.cpp            |  1 +
 src/script/standard.h              |  3 +++
 src/test/base58_tests.cpp          |  1 +
 src/txmempool.cpp                  |  1 +
 src/utilmoneystr.cpp               |  1 +
 18 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/src/chain.h b/src/chain.h
index 0aafb40b9869..961919d97eab 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -8,6 +8,7 @@
 
 #include "core.h"
 #include "pow.h"
+#include "tinyformat.h"
 #include "uint256.h"
 
 #include <vector>
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index f2a14b8293cb..68960762455d 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -7,6 +7,7 @@
 
 #include "random.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <assert.h>
 
diff --git a/src/core.cpp b/src/core.cpp
index 6a7a9ff378e9..73e6de88e1f5 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -5,7 +5,9 @@
 
 #include "core.h"
 
+#include "hash.h"
 #include "tinyformat.h"
+#include "utilstrencodings.h"
 
 std::string COutPoint::ToString() const
 {
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 6bd3d9a4fae9..8b85a03c548f 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -9,6 +9,8 @@
 #include "serialize.h"
 #include "univalue/univalue.h"
 #include "util.h"
+#include "utilstrencodings.h"
+#include "version.h"
 
 #include <boost/algorithm/string/classification.hpp>
 #include <boost/algorithm/string/predicate.hpp>
diff --git a/src/core_write.cpp b/src/core_write.cpp
index 40d547fb33e6..e42e0b62a941 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -12,6 +12,7 @@
 #include "univalue/univalue.h"
 #include "util.h"
 #include "utilmoneystr.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
 
diff --git a/src/main.h b/src/main.h
index cad7eebfb752..9f9401653e7f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -20,6 +20,7 @@
 #include "script/sigcache.h"
 #include "script/standard.h"
 #include "sync.h"
+#include "tinyformat.h"
 #include "txmempool.h"
 #include "uint256.h"
 
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 0e28f3abbd4a..72fdd753a81b 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -7,6 +7,7 @@
 
 #include "chainparams.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #ifndef WIN32
 # include <arpa/inet.h>
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index 5d7fe96285cc..84cab01c5053 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -8,6 +8,7 @@
 #include "paymentrequestdata.h"
 
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <openssl/x509.h>
 #include <openssl/x509_vfy.h>
diff --git a/src/script/compressor.cpp b/src/script/compressor.cpp
index dbb4df8b7c1a..af1acf48db38 100644
--- a/src/script/compressor.cpp
+++ b/src/script/compressor.cpp
@@ -4,6 +4,8 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "compressor.h"
+
+#include "key.h"
 #include "script/standard.h"
 
 bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
diff --git a/src/script/compressor.h b/src/script/compressor.h
index f48ecf500179..154e0b266243 100644
--- a/src/script/compressor.h
+++ b/src/script/compressor.h
@@ -7,7 +7,10 @@
 #define H_BITCOIN_SCRIPT_COMPRESSOR
 
 #include "script/script.h"
+#include "serialize.h"
 
+class CKeyID;
+class CPubKey;
 class CScriptID;
 
 /** Compact serializer for scripts.
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index ae66217b7ca0..cd73b88210c0 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -9,6 +9,7 @@
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
+#include "key.h"
 #include "script/script.h"
 #include "uint256.h"
 #include "util.h"
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 1ce8ddb6df3e..3e19d0c2bf04 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -5,7 +5,8 @@
 
 #include "script.h"
 
-#include <boost/foreach.hpp>
+#include "tinyformat.h"
+#include "utilstrencodings.h"
 
 namespace {
 inline std::string ValueString(const std::vector<unsigned char>& vch)
diff --git a/src/script/script.h b/src/script/script.h
index 4f6ee0c52114..a68924c73a3b 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -6,13 +6,13 @@
 #ifndef H_BITCOIN_SCRIPT
 #define H_BITCOIN_SCRIPT
 
-#include "key.h"
-#include "tinyformat.h"
-#include "utilstrencodings.h"
-
+#include <assert.h>
+#include <climits>
+#include <limits>
 #include <stdexcept>
-
-#include <boost/variant.hpp>
+#include <stdint.h>
+#include <string.h>
+#include <vector>
 
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes
 
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 7e6b136a28d4..05938961bc6d 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -7,6 +7,7 @@
 
 #include "script/script.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
 
diff --git a/src/script/standard.h b/src/script/standard.h
index 38d0b59885da..961b214c8949 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -6,9 +6,12 @@
 #ifndef H_BITCOIN_SCRIPT_STANDARD
 #define H_BITCOIN_SCRIPT_STANDARD
 
+#include "key.h"
 #include "script/script.h"
 #include "script/interpreter.h"
 
+#include <boost/variant.hpp>
+
 #include <stdint.h>
 
 class CScript;
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index c298c805dae3..e495435b8175 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -12,6 +12,7 @@
 #include "script/script.h"
 #include "uint256.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <boost/foreach.hpp>
 #include <boost/test/unit_test.hpp>
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index fa1802ad31ed..4522c63617be 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -8,6 +8,7 @@
 #include "core.h"
 #include "util.h"
 #include "utilmoneystr.h"
+#include "version.h"
 
 #include <boost/circular_buffer.hpp>
 
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index 1a5635bfb8d0..95be06aa1875 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -7,6 +7,7 @@
 
 #include "core.h"
 #include "tinyformat.h"
+#include "utilstrencodings.h"
 
 using namespace std;
 

From fef24cab1a4a13a864783dfcd6613ce8100f990d Mon Sep 17 00:00:00 2001
From: Ruben Dario Ponticeli <rdponticelli@gmail.com>
Date: Mon, 13 Oct 2014 20:48:34 -0300
Subject: [PATCH 0889/1819] Add IsNull() to class CAutoFile and remove operator
 !

---
 src/main.cpp    | 8 ++++----
 src/net.cpp     | 4 ++--
 src/serialize.h | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index f5fd7561c669..05f1a2eb4dd5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1106,7 +1106,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
 {
     // Open history file to append
     CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
-    if (!fileout)
+    if (fileout.IsNull())
         return error("WriteBlockToDisk : OpenBlockFile failed");
 
     // Write index header
@@ -1134,7 +1134,7 @@ bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos)
 
     // Open history file to read
     CAutoFile filein(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION);
-    if (!filein)
+    if (filein.IsNull())
         return error("ReadBlockFromDisk : OpenBlockFile failed");
 
     // Read block
@@ -4548,7 +4548,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
 {
     // Open history file to append
     CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
-    if (!fileout)
+    if (fileout.IsNull())
         return error("CBlockUndo::WriteToDisk : OpenUndoFile failed");
 
     // Write index header
@@ -4580,7 +4580,7 @@ bool CBlockUndo::ReadFromDisk(const CDiskBlockPos &pos, const uint256 &hashBlock
 {
     // Open history file to read
     CAutoFile filein(OpenUndoFile(pos, true), SER_DISK, CLIENT_VERSION);
-    if (!filein)
+    if (filein.IsNull())
         return error("CBlockUndo::ReadFromDisk : OpenBlockFile failed");
 
     // Read block
diff --git a/src/net.cpp b/src/net.cpp
index 50b435cf14da..b7c958143cf1 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1929,7 +1929,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
     boost::filesystem::path pathTmp = GetDataDir() / tmpfn;
     FILE *file = fopen(pathTmp.string().c_str(), "wb");
     CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
-    if (!fileout)
+    if (fileout.IsNull())
         return error("%s : Failed to open file %s", __func__, pathTmp.string());
 
     // Write and commit header, data
@@ -1954,7 +1954,7 @@ bool CAddrDB::Read(CAddrMan& addr)
     // open input file, and associate with CAutoFile
     FILE *file = fopen(pathAddr.string().c_str(), "rb");
     CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
-    if (!filein)
+    if (filein.IsNull())
         return error("%s : Failed to open file %s", __func__, pathAddr.string());
 
     // use file size to size memory buffer
diff --git a/src/serialize.h b/src/serialize.h
index 55b6891394ba..d8f0b76d594d 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1122,7 +1122,7 @@ class CAutoFile
     FILE& operator*()           { return *file; }
     FILE** operator&()          { return &file; }
     FILE* operator=(FILE* pnew) { return file = pnew; }
-    bool operator!()            { return (file == NULL); }
+    bool IsNull() const         { return (file == NULL); }
 
 
     //

From a96d113962b92b550a04d6ab0f580d29401039da Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 19 Oct 2014 18:17:01 -0700
Subject: [PATCH 0890/1819] Rename CWalletInterface to CValidationInterface

It's useful for much more than wallets.
---
 src/init.cpp              |  4 ++--
 src/main.cpp              | 30 +++++++++++++++---------------
 src/main.h                | 28 ++++++++++++++--------------
 src/test/test_bitcoin.cpp |  2 +-
 src/wallet.h              |  2 +-
 5 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 55991ac9b32b..273c21f12f2a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -170,7 +170,7 @@ void Shutdown()
 #ifndef WIN32
     boost::filesystem::remove(GetPidFile());
 #endif
-    UnregisterAllWallets();
+    UnregisterAllValidationInterfaces();
 #ifdef ENABLE_WALLET
     delete pwalletMain;
     pwalletMain = NULL;
@@ -1154,7 +1154,7 @@ bool AppInit2(boost::thread_group& threadGroup)
         LogPrintf("%s", strErrors.str());
         LogPrintf(" wallet      %15dms\n", GetTimeMillis() - nStart);
 
-        RegisterWallet(pwalletMain);
+        RegisterValidationInterface(pwalletMain);
 
         CBlockIndex *pindexRescan = chainActive.Tip();
         if (GetBoolArg("-rescan", false))
diff --git a/src/main.cpp b/src/main.cpp
index f5fd7561c669..630891bd3f90 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -156,25 +156,25 @@ struct CMainSignals {
 
 } // anon namespace
 
-void RegisterWallet(CWalletInterface* pwalletIn) {
-    g_signals.SyncTransaction.connect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
-    g_signals.EraseTransaction.connect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
-    g_signals.UpdatedTransaction.connect(boost::bind(&CWalletInterface::UpdatedTransaction, pwalletIn, _1));
-    g_signals.SetBestChain.connect(boost::bind(&CWalletInterface::SetBestChain, pwalletIn, _1));
-    g_signals.Inventory.connect(boost::bind(&CWalletInterface::Inventory, pwalletIn, _1));
-    g_signals.Broadcast.connect(boost::bind(&CWalletInterface::ResendWalletTransactions, pwalletIn));
+void RegisterValidationInterface(CValidationInterface* pwalletIn) {
+    g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2));
+    g_signals.EraseTransaction.connect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1));
+    g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
+    g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
+    g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
+    g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn));
 }
 
-void UnregisterWallet(CWalletInterface* pwalletIn) {
-    g_signals.Broadcast.disconnect(boost::bind(&CWalletInterface::ResendWalletTransactions, pwalletIn));
-    g_signals.Inventory.disconnect(boost::bind(&CWalletInterface::Inventory, pwalletIn, _1));
-    g_signals.SetBestChain.disconnect(boost::bind(&CWalletInterface::SetBestChain, pwalletIn, _1));
-    g_signals.UpdatedTransaction.disconnect(boost::bind(&CWalletInterface::UpdatedTransaction, pwalletIn, _1));
-    g_signals.EraseTransaction.disconnect(boost::bind(&CWalletInterface::EraseFromWallet, pwalletIn, _1));
-    g_signals.SyncTransaction.disconnect(boost::bind(&CWalletInterface::SyncTransaction, pwalletIn, _1, _2));
+void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
+    g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn));
+    g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
+    g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
+    g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
+    g_signals.EraseTransaction.disconnect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1));
+    g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2));
 }
 
-void UnregisterAllWallets() {
+void UnregisterAllValidationInterfaces() {
     g_signals.Broadcast.disconnect_all_slots();
     g_signals.Inventory.disconnect_all_slots();
     g_signals.SetBestChain.disconnect_all_slots();
diff --git a/src/main.h b/src/main.h
index 7939b087ecc1..c0c1fb270789 100644
--- a/src/main.h
+++ b/src/main.h
@@ -129,17 +129,17 @@ class CBlockTreeDB;
 class CTxUndo;
 class CScriptCheck;
 class CValidationState;
-class CWalletInterface;
+class CValidationInterface;
 struct CNodeStateStats;
 
 struct CBlockTemplate;
 
 /** Register a wallet to receive updates from core */
-void RegisterWallet(CWalletInterface* pwalletIn);
+void RegisterValidationInterface(CValidationInterface* pwalletIn);
 /** Unregister a wallet from core */
-void UnregisterWallet(CWalletInterface* pwalletIn);
+void UnregisterValidationInterface(CValidationInterface* pwalletIn);
 /** Unregister all wallets from core */
-void UnregisterAllWallets();
+void UnregisterAllValidationInterfaces();
 /** Push an updated transaction to all registered wallets */
 void SyncWithWallets(const CTransaction& tx, const CBlock* pblock = NULL);
 
@@ -640,17 +640,17 @@ class CMerkleBlock
 };
 
 
-class CWalletInterface {
+class CValidationInterface {
 protected:
-    virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) =0;
-    virtual void EraseFromWallet(const uint256 &hash) =0;
-    virtual void SetBestChain(const CBlockLocator &locator) =0;
-    virtual void UpdatedTransaction(const uint256 &hash) =0;
-    virtual void Inventory(const uint256 &hash) =0;
-    virtual void ResendWalletTransactions() =0;
-    friend void ::RegisterWallet(CWalletInterface*);
-    friend void ::UnregisterWallet(CWalletInterface*);
-    friend void ::UnregisterAllWallets();
+    virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {};
+    virtual void EraseFromWallet(const uint256 &hash) {};
+    virtual void SetBestChain(const CBlockLocator &locator) {};
+    virtual void UpdatedTransaction(const uint256 &hash) {};
+    virtual void Inventory(const uint256 &hash) {};
+    virtual void ResendWalletTransactions() {};
+    friend void ::RegisterValidationInterface(CValidationInterface*);
+    friend void ::UnregisterValidationInterface(CValidationInterface*);
+    friend void ::UnregisterAllValidationInterfaces();
 };
 
 #endif // BITCOIN_MAIN_H
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index afd63d271726..e50218d8efb5 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -47,7 +47,7 @@ struct TestingSetup {
         bool fFirstRun;
         pwalletMain = new CWallet("wallet.dat");
         pwalletMain->LoadWallet(fFirstRun);
-        RegisterWallet(pwalletMain);
+        RegisterValidationInterface(pwalletMain);
 #endif
         nScriptCheckThreads = 3;
         for (int i=0; i < nScriptCheckThreads-1; i++)
diff --git a/src/wallet.h b/src/wallet.h
index fa8a94dfc119..06706655f8db 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -95,7 +95,7 @@ class CAddressBookData
 /** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,
  * and provides the ability to create new transactions.
  */
-class CWallet : public CCryptoKeyStore, public CWalletInterface
+class CWallet : public CCryptoKeyStore, public CValidationInterface
 {
 private:
     bool SelectCoins(const CAmount& nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet, const CCoinControl *coinControl = NULL) const;

From b7ae2c172a93489fc621622e36dc4258c3934cb7 Mon Sep 17 00:00:00 2001
From: 21E14 <21xe14@gmail.com>
Date: Sun, 19 Oct 2014 21:41:37 -0400
Subject: [PATCH 0891/1819] Chain::SetTip return type to void

---
 src/chain.cpp | 5 ++---
 src/chain.h   | 4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index 05427a456993..56ed22ce71ea 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -9,17 +9,16 @@ using namespace std;
 
 // CChain implementation
 
-CBlockIndex *CChain::SetTip(CBlockIndex *pindex) {
+void CChain::SetTip(CBlockIndex *pindex) {
     if (pindex == NULL) {
         vChain.clear();
-        return NULL;
+        return;
     }
     vChain.resize(pindex->nHeight + 1);
     while (pindex && vChain[pindex->nHeight] != pindex) {
         vChain[pindex->nHeight] = pindex;
         pindex = pindex->pprev;
     }
-    return pindex;
 }
 
 CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
diff --git a/src/chain.h b/src/chain.h
index 4e6a466c6a38..0533eeb730cb 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -395,8 +395,8 @@ class CChain {
         return vChain.size() - 1;
     }
 
-    /** Set/initialize a chain with a given tip. Returns the forking point. */
-    CBlockIndex *SetTip(CBlockIndex *pindex);
+    /** Set/initialize a chain with a given tip. */
+    void SetTip(CBlockIndex *pindex);
 
     /** Return a CBlockLocator that refers to a block in this chain (by default the tip). */
     CBlockLocator GetLocator(const CBlockIndex *pindex = NULL) const;

From a3c26c2e856c53706efd2932203dc3539445c66c Mon Sep 17 00:00:00 2001
From: randy-waterhouse <noone@yodasan>
Date: Tue, 21 Oct 2014 17:33:06 +1300
Subject: [PATCH 0892/1819] Fixes for missing boost tuple.hpp header include.

---
 src/miner.cpp            | 1 +
 src/test/bloom_tests.cpp | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/miner.cpp b/src/miner.cpp
index c2762bf44e39..a1f9bd597fe0 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -17,6 +17,7 @@
 #endif
 
 #include <boost/thread.hpp>
+#include <boost/tuple/tuple.hpp>
 
 using namespace std;
 
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 2cdafa4bdde7..99b21a23a03c 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -14,6 +14,7 @@
 #include <vector>
 
 #include <boost/test/unit_test.hpp>
+#include <boost/tuple/tuple.hpp>
 
 using namespace std;
 using namespace boost::tuples;

From 24e8896430ca73f0642ed1c5f3bdd1406cdd66f6 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 20 Oct 2014 03:55:04 +0000
Subject: [PATCH 0893/1819] Add CValidationInterface::BlockChecked notification

---
 src/main.cpp | 9 ++++++++-
 src/main.h   | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 630891bd3f90..d2f999ee5662 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -152,6 +152,8 @@ struct CMainSignals {
     boost::signals2::signal<void (const uint256 &)> Inventory;
     // Tells listeners to broadcast their data.
     boost::signals2::signal<void ()> Broadcast;
+    // Notifies listeners of a block validation result
+    boost::signals2::signal<void (const CBlock&, const CValidationState&)> BlockChecked;
 } g_signals;
 
 } // anon namespace
@@ -163,9 +165,11 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn) {
     g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
     g_signals.Inventory.connect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
     g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn));
+    g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
 }
 
 void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
+    g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
     g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn));
     g_signals.Inventory.disconnect(boost::bind(&CValidationInterface::Inventory, pwalletIn, _1));
     g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1));
@@ -175,6 +179,7 @@ void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
 }
 
 void UnregisterAllValidationInterfaces() {
+    g_signals.BlockChecked.disconnect_all_slots();
     g_signals.Broadcast.disconnect_all_slots();
     g_signals.Inventory.disconnect_all_slots();
     g_signals.SetBestChain.disconnect_all_slots();
@@ -1868,7 +1873,9 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     {
         CCoinsViewCache view(pcoinsTip);
         CInv inv(MSG_BLOCK, pindexNew->GetBlockHash());
-        if (!ConnectBlock(*pblock, state, pindexNew, view)) {
+        bool rv = ConnectBlock(*pblock, state, pindexNew, view);
+        g_signals.BlockChecked(*pblock, state);
+        if (!rv) {
             if (state.IsInvalid())
                 InvalidBlockFound(pindexNew, state);
             return error("ConnectTip() : ConnectBlock %s failed", pindexNew->GetBlockHash().ToString());
diff --git a/src/main.h b/src/main.h
index c0c1fb270789..69be26a4ee50 100644
--- a/src/main.h
+++ b/src/main.h
@@ -648,6 +648,7 @@ class CValidationInterface {
     virtual void UpdatedTransaction(const uint256 &hash) {};
     virtual void Inventory(const uint256 &hash) {};
     virtual void ResendWalletTransactions() {};
+    virtual void BlockChecked(const CBlock&, const CValidationState&) {};
     friend void ::RegisterValidationInterface(CValidationInterface*);
     friend void ::UnregisterValidationInterface(CValidationInterface*);
     friend void ::UnregisterAllValidationInterfaces();

From f877aaaf16e40254bf685b4195b809138501feab Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 20 Oct 2014 04:18:00 +0000
Subject: [PATCH 0894/1819] Bugfix: submitblock: Use a temporary
 CValidationState to determine accurately the outcome of ProcessBlock, now
 that it no longer does the full block validity check

---
 src/rpcmining.cpp | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index c767835a27ff..a6494163aa85 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -526,6 +526,24 @@ Value getblocktemplate(const Array& params, bool fHelp)
     return result;
 }
 
+class submitblock_StateCatcher : public CValidationInterface
+{
+public:
+    uint256 hash;
+    bool found;
+    CValidationState state;
+
+    submitblock_StateCatcher(const uint256 &hashIn) : hash(hashIn), found(false), state() {};
+
+protected:
+    virtual void BlockChecked(const CBlock& block, const CValidationState& stateIn) {
+        if (block.GetHash() != hash)
+            return;
+        found = true;
+        state = stateIn;
+    };
+};
+
 Value submitblock(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() < 1 || params.size() > 2)
@@ -558,8 +576,22 @@ Value submitblock(const Array& params, bool fHelp)
     }
 
     CValidationState state;
+    submitblock_StateCatcher sc(pblock.GetHash());
+    RegisterValidationInterface(&sc);
     bool fAccepted = ProcessBlock(state, NULL, &pblock);
-    if (!fAccepted)
+    UnregisterValidationInterface(&sc);
+    if (fAccepted)
+    {
+        if (!sc.found)
+            return "inconclusive";
+        state = sc.state;
+    }
+    if (state.IsError())
+    {
+        std::string strRejectReason = state.GetRejectReason();
+        throw JSONRPCError(RPC_MISC_ERROR, strRejectReason);
+    }
+    if (state.IsInvalid())
         return "rejected"; // TODO: report validation state
 
     return Value::null;

From d29a2917ff73f7e82b32bd94a87df3ee211a27c2 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Thu, 26 Jun 2014 14:39:27 +0000
Subject: [PATCH 0895/1819] Rename RPC_TRANSACTION_* errors to RPC_VERIFY_* and
 use RPC_VERIFY_ERROR for submitblock

---
 src/rpcmining.cpp |  2 +-
 src/rpcprotocol.h | 11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index a6494163aa85..28076607b429 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -589,7 +589,7 @@ Value submitblock(const Array& params, bool fHelp)
     if (state.IsError())
     {
         std::string strRejectReason = state.GetRejectReason();
-        throw JSONRPCError(RPC_MISC_ERROR, strRejectReason);
+        throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
     }
     if (state.IsInvalid())
         return "rejected"; // TODO: report validation state
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index a9adb5880393..9117248506fa 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -49,9 +49,14 @@ enum RPCErrorCode
     RPC_INVALID_PARAMETER           = -8,  // Invalid, missing or duplicate parameter
     RPC_DATABASE_ERROR              = -20, // Database error
     RPC_DESERIALIZATION_ERROR       = -22, // Error parsing or validating structure in raw format
-    RPC_TRANSACTION_ERROR           = -25, // General error during transaction submission
-    RPC_TRANSACTION_REJECTED        = -26, // Transaction was rejected by network rules
-    RPC_TRANSACTION_ALREADY_IN_CHAIN= -27, // Transaction already in chain
+    RPC_VERIFY_ERROR                = -25, // General error during transaction or block submission
+    RPC_VERIFY_REJECTED             = -26, // Transaction or block was rejected by network rules
+    RPC_VERIFY_ALREADY_IN_CHAIN     = -27, // Transaction already in chain
+
+    // Aliases for backward compatibility
+    RPC_TRANSACTION_ERROR           = RPC_VERIFY_ERROR,
+    RPC_TRANSACTION_REJECTED        = RPC_VERIFY_REJECTED,
+    RPC_TRANSACTION_ALREADY_IN_CHAIN= RPC_VERIFY_ALREADY_IN_CHAIN,
 
     // P2P client errors
     RPC_CLIENT_NOT_CONNECTED        = -9,  // Bitcoin is not connected

From 6d3ab8564c3d4cd03e3f193d9029a4e271131edc Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 21 Oct 2014 14:55:10 +0200
Subject: [PATCH 0896/1819] qt: English translation update after 0a08aa8

---
 src/qt/bitcoinstrings.cpp   | 100 +++---
 src/qt/locale/bitcoin_en.ts | 630 +++++++++++++++++-------------------
 2 files changed, 348 insertions(+), 382 deletions(-)

diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 25c811183fa9..e397857faa60 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -22,11 +22,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "It is also recommended to set alertnotify so you are notified of problems;\n"
 "for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"(default: 1, 1 = keep tx meta data e.g. account owner and payment request "
-"information, 2 = drop tx meta data)"),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
-"3DES:@STRENGTH)"),
+"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
+"= drop tx meta data)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Allow JSON-RPC connections from specified source. Valid for <ip> are a "
 "single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
@@ -49,7 +46,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Continuously rate-limit free transactions to <n>*1000 bytes per minute "
-"(default:15)"),
+"(default:%u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Create new files with system default permissions, instead of umask 077 (only "
 "effective with disabled wallet functionality)"),
@@ -75,9 +72,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: Unsupported argument -socks found. Setting SOCKS version isn't "
 "possible anymore, only SOCKS5 proxies are supported."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Execute command when a network tx respends wallet tx input (%s=respend TxID, "
-"%t=wallet TxID)"),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Execute command when a relevant alert is received or we see a really long "
 "fork (%s in cmd is replaced by message)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -94,22 +88,24 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "creation (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Flush database activity from memory pool to disk log every <n> megabytes "
-"(default: 100)"),
+"(default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"How thorough the block verification of -checkblocks is (0-4, default: 3)"),
+"How thorough the block verification of -checkblocks is (0-4, default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "If paytxfee is not set, include enough fee so transactions are confirmed on "
-"average within n blocks (default: 1)"),
+"average within n blocks (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "In this mode -genproclimit controls how many blocks are generated "
 "immediately."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Listen for JSON-RPC connections on <port> (default: 8332 or testnet: 18332)"),
+"Log transaction priority and fee per kB when mining blocks (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Maintain a full transaction index, used by the getrawtransaction rpc call "
+"(default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Number of seconds to keep misbehaving peers from reconnecting (default: "
-"86400)"),
+"Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Output debugging information (default: 0, supplying <category> is optional)"),
+"Output debugging information (default: %u, supplying <category> is optional)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
 "unless -connect)"),
@@ -120,7 +116,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "leave that many cores free, default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set the processor limit for when generation is on (-1 = unlimited, default: "
-"-1)"),
+"%d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
@@ -132,8 +128,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Unable to bind to %s on this computer. Bitcoin Core is probably already "
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -"
-"proxy)"),
+"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: "
+"%s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: -paytxfee is set very high! This is the transaction fee you will "
 "pay if you send a transaction."),
@@ -159,14 +155,15 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Whitelisted peers cannot be DoS banned and their transactions are always "
 "relayed, even if they are already in the mempool, useful e.g. for a gateway"),
+QT_TRANSLATE_NOOP("bitcoin-core", "(default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "(default: 1)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "(default: wallet.dat)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Acceptable ciphers (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
@@ -182,7 +179,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Copyright (C) 2009-%i The Bitcoin Core Develo
 QT_TRANSLATE_NOOP("bitcoin-core", "Corrupted block database detected"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Could not parse -rpcbind value %s as network address"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Debugging/Testing options:"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Disable safemode, override a real safe mode event (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Disable safemode, override a real safe mode event (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Do not load the wallet and disable wallet RPC calls"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Do you want to rebuild the block database now?"),
@@ -201,13 +198,13 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unsupported argument -tor found, use -
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in BTC/kB) to add to transactions you send (default: %s)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: 288, 0 = all)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Generate coins (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "How many blocks to check at startup (default: %u, 0 = all)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "If <category> is not supplied, output all debugging information."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Imports blocks from external blk000??.dat file"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Include IP addresses in debug output (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Include IP addresses in debug output (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Information"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Bitcoin Core is shutting down."),
@@ -222,61 +219,60 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: 50000)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: 8333 or testnet: 18333)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading block index..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Loading wallet..."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Log transaction priority and fee per kB when mining blocks (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Maintain a full transaction index (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: 125)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Only accept block chain matching built-in checkpoints (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Print block on startup, if found in block index"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Print block tree on startup (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Print block tree on startup (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild block chain index from current blk000??.dat files"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Relay and mine data carrier transactions (default: 1)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Relay non-P2SH multisig (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Relay and mine data carrier transactions (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Relay non-P2SH multisig (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescan the block chain for missing wallet transactions"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: server.cert)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: server.pem)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: 100)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: %d)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: 0)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: 4)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: 1)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Set minimum block size in bytes (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: %d)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Signing transaction failed"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: bitcoin.conf)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (default: 5000)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Specify configuration file (default: %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify data directory"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: bitcoind.pid)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: 1)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Stop running after importing blocks from disk (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Stop running after importing blocks from disk (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is intended for regression testing tools and app development."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: 100)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
@@ -285,7 +281,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind r
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use OpenSSL (https) for JSON-RPC connections"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 0)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: 1 when listening)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Use the test network"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 5c3abef2e7f8..f16af5f201aa 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -286,27 +286,27 @@
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+327"/>
+        <location filename="../bitcoingui.cpp" line="+309"/>
         <source>Sign &amp;message...</source>
         <translation>Sign &amp;message...</translation>
     </message>
     <message>
-        <location line="+348"/>
+        <location line="+339"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location line="-420"/>
+        <location line="-405"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
     <message>
-        <location line="-142"/>
+        <location line="-129"/>
         <source>Node</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+143"/>
+        <location line="+130"/>
         <source>Show general overview of wallet</source>
         <translation>Show general overview of wallet</translation>
     </message>
@@ -331,7 +331,7 @@
         <translation>Quit application</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+7"/>
         <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>About &amp;Qt</translation>
@@ -347,7 +347,7 @@
         <translation>&amp;Options...</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+6"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Encrypt Wallet...</translation>
     </message>
@@ -377,13 +377,12 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+175"/>
-        <location line="+5"/>
+        <location line="+172"/>
         <source>Bitcoin Core client</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+158"/>
+        <location line="+157"/>
         <source>Importing blocks from disk...</source>
         <translation>Importing blocks from disk...</translation>
     </message>
@@ -393,17 +392,17 @@
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location line="-418"/>
+        <location line="-403"/>
         <source>Send coins to a Bitcoin address</source>
         <translation>Send coins to a Bitcoin address</translation>
     </message>
     <message>
-        <location line="+49"/>
+        <location line="+46"/>
         <source>Modify configuration options for Bitcoin</source>
         <translation>Modify configuration options for Bitcoin</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+9"/>
         <source>Backup wallet to another location</source>
         <translation>Backup wallet to another location</translation>
     </message>
@@ -428,17 +427,17 @@
         <translation>&amp;Verify message...</translation>
     </message>
     <message>
-        <location line="+446"/>
+        <location line="+437"/>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <location line="-664"/>
+        <location line="-636"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
     <message>
-        <location line="+151"/>
+        <location line="+138"/>
         <source>&amp;Send</source>
         <translation>&amp;Send</translation>
     </message>
@@ -448,13 +447,12 @@
         <translation>&amp;Receive</translation>
     </message>
     <message>
-        <location line="+33"/>
+        <location line="+30"/>
         <source>Show information about Bitcoin Core</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
-        <location line="+2"/>
+        <location line="+12"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Show / Hide</translation>
     </message>
@@ -499,29 +497,22 @@
         <translation>Tabs toolbar</translation>
     </message>
     <message>
-        <location line="-289"/>
-        <location line="+393"/>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
-    <message>
-        <location line="-418"/>
+        <location line="-295"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
     <message>
-        <location line="+168"/>
+        <location line="+155"/>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+29"/>
-        <location line="+2"/>
+        <location line="+28"/>
         <source>&amp;About Bitcoin Core</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+35"/>
+        <location line="+32"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation type="unfinished"></translation>
     </message>
@@ -546,7 +537,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message numerus="yes">
-        <location line="+316"/>
+        <location line="+307"/>
         <source>%n active connection(s) to Bitcoin network</source>
         <translation>
             <numerusform>%n active connection to Bitcoin network</numerusform>
@@ -1813,12 +1804,11 @@ Address: %4
         <location line="+23"/>
         <location line="+23"/>
         <location line="+23"/>
-        <location line="+23"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location line="-990"/>
+        <location line="-967"/>
         <source>Client version</source>
         <translation>Client version</translation>
     </message>
@@ -1919,11 +1909,6 @@ Address: %4
         <source>Services</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+23"/>
-        <source>Sync Node</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+23"/>
         <source>Starting Height</source>
@@ -1970,7 +1955,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-764"/>
+        <location line="-741"/>
         <source>Last block time</source>
         <translation>Last block time</translation>
     </message>
@@ -2086,17 +2071,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Yes</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+0"/>
-        <source>No</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+12"/>
+        <location line="+13"/>
         <source>Unknown</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2853,7 +2828,7 @@ Address: %4
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="+34"/>
+        <location filename="../splashscreen.cpp" line="+35"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -2863,7 +2838,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3418,7 +3393,7 @@ Address: %4
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+103"/>
+        <location filename="../bitcoingui.cpp" line="+106"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3485,62 +3460,27 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+240"/>
+        <location filename="../bitcoinstrings.cpp" line="+236"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location line="+28"/>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specify configuration file (default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specify pid file (default: bitcoind.pid)</translation>
-    </message>
-    <message>
-        <location line="-1"/>
+        <location line="+30"/>
         <source>Specify data directory</source>
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location line="-44"/>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <location line="+6"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Maintain at most &lt;n&gt; connections to peers (default: 125)</translation>
-    </message>
-    <message>
-        <location line="-53"/>
+        <location line="-90"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+94"/>
+        <location line="+93"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
-    </message>
-    <message>
-        <location line="-171"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
-    </message>
-    <message>
-        <location line="-2"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</translation>
-    </message>
-    <message>
-        <location line="+59"/>
+        <location line="-108"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
@@ -3560,7 +3500,7 @@ Address: %4
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location line="-154"/>
+        <location line="-150"/>
         <source>%s, you must set a rpcpassword in the configuration file:
 %s
 It is recommended you use the following random password:
@@ -3585,22 +3525,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
 </translation>
     </message>
     <message>
-        <location line="+15"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+10"/>
+        <location line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+19"/>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3620,37 +3550,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</translation>
     </message>
     <message>
-        <location line="+12"/>
+        <location line="+9"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+15"/>
+        <location line="+17"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
     </message>
@@ -3660,12 +3575,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation>
     </message>
@@ -3690,22 +3600,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>(default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>(default: wallet.dat)</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>&lt;category&gt; can be:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Attempt to recover private keys from a corrupt wallet.dat</translation>
     </message>
@@ -3735,12 +3640,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Discover own IP address (default: 1 when listening and no -externalip)</translation>
     </message>
@@ -3795,22 +3695,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Failed to listen on any port. Use -listen=0 if you want this.</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generate coins (default: 0)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>How many blocks to check at startup (default: 288, 0 = all)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+5"/>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3830,7 +3715,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+22"/>
+        <location line="+21"/>
         <source>Not enough file descriptors available.</source>
         <translation>Not enough file descriptors available.</translation>
     </message>
@@ -3840,12 +3725,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+10"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
@@ -3860,32 +3740,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Set the number of threads to service RPC calls (default: 4)</translation>
-    </message>
-    <message>
-        <location line="+9"/>
+        <location line="+11"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specify wallet file (within data directory)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
+        <location line="+6"/>
+        <source>This is intended for regression testing tools and app development.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>This is intended for regression testing tools and app development.</source>
+        <location line="+10"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+4"/>
         <source>Verifying blocks...</source>
         <translation>Verifying blocks...</translation>
     </message>
@@ -3910,17 +3780,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
     <message>
-        <location line="-92"/>
+        <location line="-91"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-185"/>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="-179"/>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3945,7 +3810,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3964,11 +3834,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+3"/>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+3"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -3985,17 +3850,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+11"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+23"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4025,12 +3880,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+17"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4065,12 +3915,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+9"/>
         <source>Information</source>
         <translation>Information</translation>
     </message>
@@ -4110,32 +3955,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+5"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Maintain a full transaction index (default: 0)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+10"/>
         <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4145,22 +3965,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Only accept block chain matching built-in checkpoints (default: 1)</translation>
-    </message>
-    <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Print block on startup, if found in block index</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4180,37 +3990,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+8"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Send trace/debug info to console instead of debug.log file</translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Set minimum block size in bytes (default: 0)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+9"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4225,12 +4010,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Signing transaction failed</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specify connection timeout in milliseconds (default: 5000)</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+10"/>
         <source>This is experimental software.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4255,12 +4035,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Use UPnP to map the listening port (default: 0)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+5"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Use UPnP to map the listening port (default: 1 when listening)</translation>
     </message>
@@ -4315,22 +4090,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-155"/>
+        <location line="-157"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+200"/>
+        <location line="+202"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
     <message>
-        <location line="-26"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Set key pool size to &lt;n&gt; (default: 100)</translation>
-    </message>
-    <message>
-        <location line="-8"/>
+        <location line="-34"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescan the block chain for missing wallet transactions</translation>
     </message>
@@ -4340,52 +4110,252 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Use OpenSSL (https) for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-30"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Server certificate file (default: server.cert)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Server private key (default: server.pem)</translation>
-    </message>
-    <message>
-        <location line="+18"/>
+        <location line="-11"/>
         <source>This help message</source>
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="-108"/>
+        <location line="-107"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location line="+59"/>
+        <location line="+60"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location line="-33"/>
+        <location line="-34"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location line="-1"/>
+        <location line="-167"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+65"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+28"/>
+        <source>(default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>Error loading wallet.dat</source>
         <translation>Error loading wallet.dat</translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="+11"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Invalid -proxy address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+69"/>
+        <location line="+9"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-112"/>
+        <location line="-111"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4410,22 +4380,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Insufficient funds</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+15"/>
         <source>Loading block index...</source>
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location line="-61"/>
+        <location line="-62"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location line="+62"/>
+        <location line="+63"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="-57"/>
+        <location line="-58"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
@@ -4435,22 +4405,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location line="+77"/>
+        <location line="+76"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location line="-64"/>
+        <location line="-63"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+91"/>
+        <location line="+90"/>
         <source>To use the %s option</source>
         <translation>To use the %s option</translation>
     </message>
     <message>
-        <location line="-83"/>
+        <location line="-82"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>

From c313d6ecb945f8d908b061989d31d53cb6d0297d Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 17 Oct 2014 13:11:59 +0200
Subject: [PATCH 0897/1819] doc: add headers first backwards compat warning

---
 doc/release-notes.md | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 967a39a0e7fa..de13daf3e4e5 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,6 +1,27 @@
 (note: this is a temporary file, to be added-to by anybody, and moved to
 release-notes at release time)
 
+Block file backwards-compatibility warning
+===========================================
+
+Because release 0.10.0 makes use of headers-first synchronization and parallel
+block download, the block files and databases are not backwards-compatible
+with older versions of Bitcoin Core:
+
+* Blocks will be stored on disk out of order (in the order they are
+received, really), which makes it incompatible with some tools or
+other programs. Reindexing using earlier versions will also not work
+anymore as a result of this.
+
+* The block index database will now hold headers for which no block is
+stored on disk, which earlier versions won't support.
+
+If you want to be able to downgrade smoothly, make a backup of your entire data
+directory. Without this your node will need start syncing (or importing from
+bootstrap.dat) anew afterwards.
+
+This does not affect wallet forward or backward compatibility.
+
 Transaction fee changes
 =======================
 

From 9acbb4180a383ff123e07887a24b439cef846e89 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 21 Oct 2014 15:40:00 +0200
Subject: [PATCH 0898/1819] qt: small English language updates from translators

More friendly language, use placeholders where possible
---
 src/init.cpp                |  2 +-
 src/qt/bitcoingui.cpp       |  2 +-
 src/qt/bitcoinstrings.cpp   |  4 +--
 src/qt/intro.cpp            |  4 +--
 src/qt/locale/bitcoin_en.ts | 49 ++++++++++++++++++++++---------------
 5 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 8b2a32532c56..743cdd4386f4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -276,7 +276,7 @@ std::string HelpMessage(HelpMessageMode mode)
 #endif
 #endif
     strUsage += "  -whitebind=<addr>      " + _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6") + "\n";
-    strUsage += "  -whitelist=<netmask>   " + _("Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.") + "\n";
+    strUsage += "  -whitelist=<netmask>   " + _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") + "\n";
     strUsage += "                         " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway") + "\n";
 
 #ifdef ENABLE_WALLET
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 9d6d07a56bd4..f0471c32f906 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -665,7 +665,7 @@ void BitcoinGUI::setNumBlocks(int count)
     QDateTime currentDate = QDateTime::currentDateTime();
     int secs = lastBlockDate.secsTo(currentDate);
 
-    tooltip = tr("Processed %1 blocks of transaction history.").arg(count);
+    tooltip = tr("Processed %n blocks of transaction history.", "", count);
 
     // Set icon state: spinning if catching up, tick otherwise
     if(secs < 90*60)
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index e397857faa60..1073b6a47261 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -150,8 +150,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect "
 "you should restore from a backup."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Whitelist peers connecting from the given netmask or ip. Can be specified "
-"multiple times."),
+"Whitelist peers connecting from the given netmask or IP address. Can be "
+"specified multiple times."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Whitelisted peers cannot be DoS banned and their transactions are always "
 "relayed, even if they are already in the mempool, useful e.g. for a gateway"),
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index d469c9a0bd60..7618bff69d9b 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -215,10 +215,10 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable
     {
         ui->freeSpace->setText("");
     } else {
-        QString freeString = QString::number(bytesAvailable/GB_BYTES) + tr("GB of free space available");
+        QString freeString = tr("%n GB of free space available", "", bytesAvailable/GB_BYTES);
         if(bytesAvailable < BLOCK_CHAIN_SIZE)
         {
-            freeString += " " + tr("(of %1GB needed)").arg(BLOCK_CHAIN_SIZE/GB_BYTES);
+            freeString += " " + tr("(of %n GB needed)", "", BLOCK_CHAIN_SIZE/GB_BYTES);
             ui->freeSpace->setStyleSheet("QLabel { color: #800000 }");
         } else {
             ui->freeSpace->setStyleSheet("");
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index f16af5f201aa..df285441e19e 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -549,13 +549,8 @@
         <source>No block source available...</source>
         <translation>No block source available...</translation>
     </message>
-    <message>
-        <location line="+10"/>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Processed %1 blocks of transaction history.</translation>
-    </message>
     <message numerus="yes">
-        <location line="+26"/>
+        <location line="+36"/>
         <source>%n hour(s)</source>
         <translation>
             <numerusform>%n hour</numerusform>
@@ -627,8 +622,16 @@
         <source>Up to date</source>
         <translation>Up to date</translation>
     </message>
+    <message numerus="yes">
+        <location line="-5"/>
+        <source>Processed %n blocks of transaction history.</source>
+        <translation type="unfinished">
+            <numerusform></numerusform>
+            <numerusform></numerusform>
+        </translation>
+    </message>
     <message>
-        <location line="+44"/>
+        <location line="+49"/>
         <source>Catching up...</source>
         <translation>Catching up...</translation>
     </message>
@@ -1163,15 +1166,21 @@ Address: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
+    <message numerus="yes">
         <location line="+9"/>
-        <source>GB of free space available</source>
-        <translation>GB of free space available</translation>
+        <source>%n GB of free space available</source>
+        <translation type="unfinished">
+            <numerusform></numerusform>
+            <numerusform></numerusform>
+        </translation>
     </message>
-    <message>
+    <message numerus="yes">
         <location line="+3"/>
-        <source>(of %1GB needed)</source>
-        <translation>(of %1GB needed)</translation>
+        <source>(of %n GB needed)</source>
+        <translation type="unfinished">
+            <numerusform></numerusform>
+            <numerusform></numerusform>
+        </translation>
     </message>
 </context>
 <context>
@@ -3600,7 +3609,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+4"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>(default: 1)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3870,12 +3884,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+19"/>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation type="unfinished"></translation>
     </message>

From 33dfbf57d34882aef7b83bc5ea9bf561e1f3e7b0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 21 Oct 2014 16:08:20 +0200
Subject: [PATCH 0899/1819] rpc: Fix leveldb iterator leak, and flush before
 `gettxoutsetinfo`

This fixes an iterator leak resulting in

    bitcoind: db/version_set.cc:789: leveldb::VersionSet::~VersionSet(): Assertion `dummy_versions_.next_ == &dummy_versions_' failed."

exception on shutdown.

Also make sure to flush pcoinsTip before calling GetStats() to make
sure we apply them to the current height.
---
 src/rpcblockchain.cpp | 1 +
 src/txdb.cpp          | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5beac0512ab0..b0da1d6a5cc5 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -319,6 +319,7 @@ Value gettxoutsetinfo(const Array& params, bool fHelp)
     Object ret;
 
     CCoinsStats stats;
+    pcoinsTip->Flush();
     if (pcoinsTip->GetStats(stats)) {
         ret.push_back(Pair("height", (int64_t)stats.nHeight));
         ret.push_back(Pair("bestblock", stats.hashBlock.GetHex()));
diff --git a/src/txdb.cpp b/src/txdb.cpp
index cb9f15001160..8a73ce961cfd 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -104,7 +104,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
     /* It seems that there are no "const iterators" for LevelDB.  Since we
        only need read operations on it, use a const-cast to get around
        that restriction.  */
-    leveldb::Iterator *pcursor = const_cast<CLevelDBWrapper*>(&db)->NewIterator();
+    boost::scoped_ptr<leveldb::Iterator> pcursor(const_cast<CLevelDBWrapper*>(&db)->NewIterator());
     pcursor->SeekToFirst();
 
     CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);

From a6a3f141b1b62a816510ba78d9e6aca991f4815b Mon Sep 17 00:00:00 2001
From: Dominyk Tiller <DomT4@users.noreply.github.com>
Date: Tue, 21 Oct 2014 21:49:45 +0100
Subject: [PATCH 0900/1819] openssl version bump

Bumps the OpenSSL version to the latest release, and kills SSL2. (SSL3 was already killed here, so I'm not sure why SSL2 was left around?)

No other changes.
---
 depends/packages/openssl.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 3ccdaf6f2fb4..70b0b8d39f20 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -1,14 +1,14 @@
 package=openssl
-$(package)_version=1.0.1i
+$(package)_version=1.0.1j
 $(package)_download_path=https://www.openssl.org/source
 $(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=3c179f46ca77069a6a0bac70212a9b3b838b2f66129cb52d568837fc79d8fcc7
+$(package)_sha256_hash=1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3
 
 define $(package)_set_vars
 $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
 $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/openssl no-zlib no-shared no-dso
 $(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2
-$(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl3
+$(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3
 $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
 $(package)_config_opts_x86_64_linux=-fPIC linux-x86_64
 $(package)_config_opts_arm_linux=-fPIC linux-generic32

From 7b2bb96271cb456c2b958b502788ac5ca94c84d4 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 21 Oct 2014 16:17:13 -0700
Subject: [PATCH 0901/1819] Replace some function names with __func__

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 9cf3afef7d90..8b4c03c190ae 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2818,11 +2818,11 @@ bool static LoadBlockIndexDB()
     // Load block file info
     pblocktree->ReadLastBlockFile(nLastBlockFile);
     vinfoBlockFile.resize(nLastBlockFile + 1);
-    LogPrintf("LoadBlockIndexDB(): last block file = %i\n", nLastBlockFile);
+    LogPrintf("%s: last block file = %i\n", __func__, nLastBlockFile);
     for (int nFile = 0; nFile <= nLastBlockFile; nFile++) {
         pblocktree->ReadBlockFileInfo(nFile, vinfoBlockFile[nFile]);
     }
-    LogPrintf("LoadBlockIndexDB(): last block file info: %s\n", vinfoBlockFile[nLastBlockFile].ToString());
+    LogPrintf("%s: last block file info: %s\n", __func__, vinfoBlockFile[nLastBlockFile].ToString());
     for (int nFile = nLastBlockFile + 1; true; nFile++) {
         CBlockFileInfo info;
         if (pblocktree->ReadBlockFileInfo(nFile, info)) {

From a873823864a00f68772eb2b85a70e933839ca3f5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 20 Oct 2014 12:45:50 +0200
Subject: [PATCH 0902/1819] CAutoFile: Explicit Get() and remove unused methods

Also add documentation to some methods.
---
 src/init.cpp                  |  4 ++--
 src/main.cpp                  | 16 ++++++++--------
 src/net.cpp                   |  2 +-
 src/serialize.h               | 19 +++++++++++++------
 src/test/checkblock_tests.cpp |  2 +-
 5 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 55991ac9b32b..76eb48a17776 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -139,7 +139,7 @@ void Shutdown()
     {
         boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
         CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
-        if (est_fileout)
+        if (!est_fileout.IsNull())
             mempool.WriteFeeEstimates(est_fileout);
         else
             LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
@@ -1064,7 +1064,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
     CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
     // Allowed to fail as this file IS missing on first startup.
-    if (est_filein)
+    if (!est_filein.IsNull())
         mempool.ReadFeeEstimates(est_filein);
     fFeeEstimatesInitialized = true;
 
diff --git a/src/main.cpp b/src/main.cpp
index 05f1a2eb4dd5..45e679b3c31f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1051,7 +1051,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
                 CBlockHeader header;
                 try {
                     file >> header;
-                    fseek(file, postx.nTxOffset, SEEK_CUR);
+                    fseek(file.Get(), postx.nTxOffset, SEEK_CUR);
                     file >> txOut;
                 } catch (std::exception &e) {
                     return error("%s : Deserialize or I/O error - %s", __func__, e.what());
@@ -1114,16 +1114,16 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
     fileout << FLATDATA(Params().MessageStart()) << nSize;
 
     // Write block
-    long fileOutPos = ftell(fileout);
+    long fileOutPos = ftell(fileout.Get());
     if (fileOutPos < 0)
         return error("WriteBlockToDisk : ftell failed");
     pos.nPos = (unsigned int)fileOutPos;
     fileout << block;
 
     // Flush stdio buffers and commit to disk before returning
-    fflush(fileout);
+    fflush(fileout.Get());
     if (!IsInitialBlockDownload())
-        FileCommit(fileout);
+        FileCommit(fileout.Get());
 
     return true;
 }
@@ -2843,7 +2843,7 @@ bool static LoadBlockIndexDB()
     for (std::set<int>::iterator it = setBlkDataFiles.begin(); it != setBlkDataFiles.end(); it++)
     {
         CDiskBlockPos pos(*it, 0);
-        if (!CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION)) {
+        if (CAutoFile(OpenBlockFile(pos, true), SER_DISK, CLIENT_VERSION).IsNull()) {
             return false;
         }
     }
@@ -4556,7 +4556,7 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
     fileout << FLATDATA(Params().MessageStart()) << nSize;
 
     // Write undo data
-    long fileOutPos = ftell(fileout);
+    long fileOutPos = ftell(fileout.Get());
     if (fileOutPos < 0)
         return error("CBlockUndo::WriteToDisk : ftell failed");
     pos.nPos = (unsigned int)fileOutPos;
@@ -4569,9 +4569,9 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
     fileout << hasher.GetHash();
 
     // Flush stdio buffers and commit to disk before returning
-    fflush(fileout);
+    fflush(fileout.Get());
     if (!IsInitialBlockDownload())
-        FileCommit(fileout);
+        FileCommit(fileout.Get());
 
     return true;
 }
diff --git a/src/net.cpp b/src/net.cpp
index b7c958143cf1..6cf64f51c3e6 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1939,7 +1939,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
     catch (std::exception &e) {
         return error("%s : Serialize or I/O error - %s", __func__, e.what());
     }
-    FileCommit(fileout);
+    FileCommit(fileout.Get());
     fileout.fclose();
 
     // replace existing peers.dat, if any, with new peers.dat.XXXX
diff --git a/src/serialize.h b/src/serialize.h
index d8f0b76d594d..b9d5f954631e 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1116,14 +1116,21 @@ class CAutoFile
         }
     }
 
+    /** Get wrapped FILE* with transfer of ownership.
+     * @note This will invalidate the CAutoFile object, and makes it the responsibility of the caller
+     * of this function to clean up the returned FILE*.
+     */
     FILE* release()             { FILE* ret = file; file = NULL; return ret; }
-    operator FILE*()            { return file; }
-    FILE* operator->()          { return file; }
-    FILE& operator*()           { return *file; }
-    FILE** operator&()          { return &file; }
-    FILE* operator=(FILE* pnew) { return file = pnew; }
-    bool IsNull() const         { return (file == NULL); }
 
+    /** Get wrapped FILE* without transfer of ownership.
+     * @note Ownership of the FILE* will remain with this class. Use this only if the scope of the
+     * CAutoFile outlives use of the passed pointer.
+     */
+    FILE* Get() const           { return file; }
+
+    /** Return true if the wrapped FILE* is NULL, false otherwise.
+     */
+    bool IsNull() const         { return (file == NULL); }
 
     //
     // Stream subset
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 67d40a45c72a..9151fdc0c833 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -36,7 +36,7 @@ bool read_block(const std::string& filename, CBlock& block)
     fseek(fp, 8, SEEK_SET); // skip msgheader/size
 
     CAutoFile filein(fp, SER_DISK, CLIENT_VERSION);
-    if (!filein) return false;
+    if (filein.IsNull()) return false;
 
     filein >> block;
 

From fa7361907a0a5d6698bb7e8e45fa5ac034b81066 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 22 Oct 2014 15:08:30 -0400
Subject: [PATCH 0903/1819] boost: split stream classes out of serialize.h

serialization now has no dependencies.
---
 src/Makefile.am                     |   1 +
 src/addrman.cpp                     |   1 +
 src/allocators.h                    |   4 +
 src/bloom.cpp                       |   1 +
 src/core_read.cpp                   |   1 +
 src/core_write.cpp                  |   1 +
 src/db.h                            |   1 +
 src/leveldbwrapper.h                |   1 +
 src/net.h                           |   1 +
 src/qt/recentrequeststablemodel.cpp |   1 +
 src/serialize.h                     | 553 ---------------------------
 src/streams.h                       | 571 ++++++++++++++++++++++++++++
 src/test/alert_tests.cpp            |   1 +
 src/test/serialize_tests.cpp        |   1 +
 src/txmempool.cpp                   |   1 +
 src/txmempool.h                     |   2 +
 16 files changed, 589 insertions(+), 553 deletions(-)
 create mode 100644 src/streams.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 155adfef7d34..77443686db18 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,6 +107,7 @@ BITCOIN_CORE_H = \
   script/sign.h \
   script/standard.h \
   serialize.h \
+  streams.h \
   sync.h \
   threadsafety.h \
   timedata.h \
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 7b674a66e7cb..3c6f8d9e7216 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -6,6 +6,7 @@
 
 #include "hash.h"
 #include "serialize.h"
+#include "streams.h"
 
 using namespace std;
 
diff --git a/src/allocators.h b/src/allocators.h
index 6b69e7ae69cf..78a3b76d0cd9 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -9,6 +9,7 @@
 #include <map>
 #include <string>
 #include <string.h>
+#include <vector>
 
 #include <boost/thread/mutex.hpp>
 #include <boost/thread/once.hpp>
@@ -261,4 +262,7 @@ struct zero_after_free_allocator : public std::allocator<T> {
 // This is exactly like std::string, but with a custom allocator.
 typedef std::basic_string<char, std::char_traits<char>, secure_allocator<char> > SecureString;
 
+// Byte-vector that clears its contents before deletion.
+typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
+
 #endif // BITCOIN_ALLOCATORS_H
diff --git a/src/bloom.cpp b/src/bloom.cpp
index cef74a3a545a..cac71fdbbf79 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -7,6 +7,7 @@
 #include "core.h"
 #include "script/script.h"
 #include "script/standard.h"
+#include "streams.h"
 
 #include <math.h>
 #include <stdlib.h>
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 8b85a03c548f..dcbcf4b4f74b 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -7,6 +7,7 @@
 #include "core.h"
 #include "script/script.h"
 #include "serialize.h"
+#include "streams.h"
 #include "univalue/univalue.h"
 #include "util.h"
 #include "utilstrencodings.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index e42e0b62a941..b2b29fb367af 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -9,6 +9,7 @@
 #include "script/script.h"
 #include "script/standard.h"
 #include "serialize.h"
+#include "streams.h"
 #include "univalue/univalue.h"
 #include "util.h"
 #include "utilmoneystr.h"
diff --git a/src/db.h b/src/db.h
index d20239938377..0cbdd8b91b5e 100644
--- a/src/db.h
+++ b/src/db.h
@@ -7,6 +7,7 @@
 #define BITCOIN_DB_H
 
 #include "serialize.h"
+#include "streams.h"
 #include "sync.h"
 #include "version.h"
 
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index da5ba61c7b04..d997d56e00b7 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -6,6 +6,7 @@
 #define BITCOIN_LEVELDBWRAPPER_H
 
 #include "serialize.h"
+#include "streams.h"
 #include "util.h"
 #include "version.h"
 
diff --git a/src/net.h b/src/net.h
index 18da24183f6e..340158512df3 100644
--- a/src/net.h
+++ b/src/net.h
@@ -14,6 +14,7 @@
 #include "netbase.h"
 #include "protocol.h"
 #include "random.h"
+#include "streams.h"
 #include "sync.h"
 #include "uint256.h"
 #include "utilstrencodings.h"
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 0e5802922c4c..5deac8007c65 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -7,6 +7,7 @@
 #include "bitcoinunits.h"
 #include "guiutil.h"
 #include "optionsmodel.h"
+#include "streams.h"
 
 #include <boost/foreach.hpp>
 
diff --git a/src/serialize.h b/src/serialize.h
index b9d5f954631e..877ef8640a43 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -6,8 +6,6 @@
 #ifndef BITCOIN_SERIALIZE_H
 #define BITCOIN_SERIALIZE_H
 
-#include "allocators.h"
-
 #include <algorithm>
 #include <assert.h>
 #include <ios>
@@ -20,8 +18,6 @@
 #include <utility>
 #include <vector>
 
-class CAutoFile;
-class CDataStream;
 class CScript;
 
 static const unsigned int MAX_SIZE = 0x02000000;
@@ -761,8 +757,6 @@ inline void SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionU
 
 
 
-typedef std::vector<char, zero_after_free_allocator<char> > CSerializeData;
-
 class CSizeComputer
 {
 protected:
@@ -792,551 +786,4 @@ class CSizeComputer
     }
 };
 
-/** Double ended buffer combining vector and stream-like interfaces.
- *
- * >> and << read and write unformatted data using the above serialization templates.
- * Fills with data in linear time; some stringstream implementations take N^2 time.
- */
-class CDataStream
-{
-protected:
-    typedef CSerializeData vector_type;
-    vector_type vch;
-    unsigned int nReadPos;
-public:
-    int nType;
-    int nVersion;
-
-    typedef vector_type::allocator_type   allocator_type;
-    typedef vector_type::size_type        size_type;
-    typedef vector_type::difference_type  difference_type;
-    typedef vector_type::reference        reference;
-    typedef vector_type::const_reference  const_reference;
-    typedef vector_type::value_type       value_type;
-    typedef vector_type::iterator         iterator;
-    typedef vector_type::const_iterator   const_iterator;
-    typedef vector_type::reverse_iterator reverse_iterator;
-
-    explicit CDataStream(int nTypeIn, int nVersionIn)
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-
-    CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1300
-    CDataStream(const char* pbegin, const char* pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-#endif
-
-    CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-
-    CDataStream(const std::vector<char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-
-    CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
-    {
-        Init(nTypeIn, nVersionIn);
-    }
-
-    void Init(int nTypeIn, int nVersionIn)
-    {
-        nReadPos = 0;
-        nType = nTypeIn;
-        nVersion = nVersionIn;
-    }
-
-    CDataStream& operator+=(const CDataStream& b)
-    {
-        vch.insert(vch.end(), b.begin(), b.end());
-        return *this;
-    }
-
-    friend CDataStream operator+(const CDataStream& a, const CDataStream& b)
-    {
-        CDataStream ret = a;
-        ret += b;
-        return (ret);
-    }
-
-    std::string str() const
-    {
-        return (std::string(begin(), end()));
-    }
-
-
-    //
-    // Vector subset
-    //
-    const_iterator begin() const                     { return vch.begin() + nReadPos; }
-    iterator begin()                                 { return vch.begin() + nReadPos; }
-    const_iterator end() const                       { return vch.end(); }
-    iterator end()                                   { return vch.end(); }
-    size_type size() const                           { return vch.size() - nReadPos; }
-    bool empty() const                               { return vch.size() == nReadPos; }
-    void resize(size_type n, value_type c=0)         { vch.resize(n + nReadPos, c); }
-    void reserve(size_type n)                        { vch.reserve(n + nReadPos); }
-    const_reference operator[](size_type pos) const  { return vch[pos + nReadPos]; }
-    reference operator[](size_type pos)              { return vch[pos + nReadPos]; }
-    void clear()                                     { vch.clear(); nReadPos = 0; }
-    iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
-    void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
-
-    void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
-    {
-        assert(last - first >= 0);
-        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
-        {
-            // special case for inserting at the front when there's room
-            nReadPos -= (last - first);
-            memcpy(&vch[nReadPos], &first[0], last - first);
-        }
-        else
-            vch.insert(it, first, last);
-    }
-
-#if !defined(_MSC_VER) || _MSC_VER >= 1300
-    void insert(iterator it, const char* first, const char* last)
-    {
-        assert(last - first >= 0);
-        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
-        {
-            // special case for inserting at the front when there's room
-            nReadPos -= (last - first);
-            memcpy(&vch[nReadPos], &first[0], last - first);
-        }
-        else
-            vch.insert(it, first, last);
-    }
-#endif
-
-    iterator erase(iterator it)
-    {
-        if (it == vch.begin() + nReadPos)
-        {
-            // special case for erasing from the front
-            if (++nReadPos >= vch.size())
-            {
-                // whenever we reach the end, we take the opportunity to clear the buffer
-                nReadPos = 0;
-                return vch.erase(vch.begin(), vch.end());
-            }
-            return vch.begin() + nReadPos;
-        }
-        else
-            return vch.erase(it);
-    }
-
-    iterator erase(iterator first, iterator last)
-    {
-        if (first == vch.begin() + nReadPos)
-        {
-            // special case for erasing from the front
-            if (last == vch.end())
-            {
-                nReadPos = 0;
-                return vch.erase(vch.begin(), vch.end());
-            }
-            else
-            {
-                nReadPos = (last - vch.begin());
-                return last;
-            }
-        }
-        else
-            return vch.erase(first, last);
-    }
-
-    inline void Compact()
-    {
-        vch.erase(vch.begin(), vch.begin() + nReadPos);
-        nReadPos = 0;
-    }
-
-    bool Rewind(size_type n)
-    {
-        // Rewind by n characters if the buffer hasn't been compacted yet
-        if (n > nReadPos)
-            return false;
-        nReadPos -= n;
-        return true;
-    }
-
-
-    //
-    // Stream subset
-    //
-    bool eof() const             { return size() == 0; }
-    CDataStream* rdbuf()         { return this; }
-    int in_avail()               { return size(); }
-
-    void SetType(int n)          { nType = n; }
-    int GetType()                { return nType; }
-    void SetVersion(int n)       { nVersion = n; }
-    int GetVersion()             { return nVersion; }
-    void ReadVersion()           { *this >> nVersion; }
-    void WriteVersion()          { *this << nVersion; }
-
-    CDataStream& read(char* pch, size_t nSize)
-    {
-        // Read from the beginning of the buffer
-        unsigned int nReadPosNext = nReadPos + nSize;
-        if (nReadPosNext >= vch.size())
-        {
-            if (nReadPosNext > vch.size())
-            {
-                throw std::ios_base::failure("CDataStream::read() : end of data");
-            }
-            memcpy(pch, &vch[nReadPos], nSize);
-            nReadPos = 0;
-            vch.clear();
-            return (*this);
-        }
-        memcpy(pch, &vch[nReadPos], nSize);
-        nReadPos = nReadPosNext;
-        return (*this);
-    }
-
-    CDataStream& ignore(int nSize)
-    {
-        // Ignore from the beginning of the buffer
-        assert(nSize >= 0);
-        unsigned int nReadPosNext = nReadPos + nSize;
-        if (nReadPosNext >= vch.size())
-        {
-            if (nReadPosNext > vch.size())
-                throw std::ios_base::failure("CDataStream::ignore() : end of data");
-            nReadPos = 0;
-            vch.clear();
-            return (*this);
-        }
-        nReadPos = nReadPosNext;
-        return (*this);
-    }
-
-    CDataStream& write(const char* pch, size_t nSize)
-    {
-        // Write to the end of the buffer
-        vch.insert(vch.end(), pch, pch + nSize);
-        return (*this);
-    }
-
-    template<typename Stream>
-    void Serialize(Stream& s, int nType, int nVersion) const
-    {
-        // Special case: stream << stream concatenates like stream += stream
-        if (!vch.empty())
-            s.write((char*)&vch[0], vch.size() * sizeof(vch[0]));
-    }
-
-    template<typename T>
-    unsigned int GetSerializeSize(const T& obj)
-    {
-        // Tells the size of the object if serialized to this stream
-        return ::GetSerializeSize(obj, nType, nVersion);
-    }
-
-    template<typename T>
-    CDataStream& operator<<(const T& obj)
-    {
-        // Serialize to this stream
-        ::Serialize(*this, obj, nType, nVersion);
-        return (*this);
-    }
-
-    template<typename T>
-    CDataStream& operator>>(T& obj)
-    {
-        // Unserialize from this stream
-        ::Unserialize(*this, obj, nType, nVersion);
-        return (*this);
-    }
-
-    void GetAndClear(CSerializeData &data) {
-        data.insert(data.end(), begin(), end());
-        clear();
-    }
-};
-
-
-
-
-
-
-
-
-
-
-/** Non-refcounted RAII wrapper for FILE*
- *
- * Will automatically close the file when it goes out of scope if not null.
- * If you're returning the file pointer, return file.release().
- * If you need to close the file early, use file.fclose() instead of fclose(file).
- */
-class CAutoFile
-{
-private:
-    // Disallow copies
-    CAutoFile(const CAutoFile&);
-    CAutoFile& operator=(const CAutoFile&);
-
-    int nType;
-    int nVersion;
-	
-    FILE* file;	
-
-public:
-    CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn)
-    {
-        file = filenew;
-        nType = nTypeIn;
-        nVersion = nVersionIn;
-    }
-
-    ~CAutoFile()
-    {
-        fclose();
-    }
-
-    void fclose()
-    {
-        if (file) {
-            ::fclose(file);
-            file = NULL;
-        }
-    }
-
-    /** Get wrapped FILE* with transfer of ownership.
-     * @note This will invalidate the CAutoFile object, and makes it the responsibility of the caller
-     * of this function to clean up the returned FILE*.
-     */
-    FILE* release()             { FILE* ret = file; file = NULL; return ret; }
-
-    /** Get wrapped FILE* without transfer of ownership.
-     * @note Ownership of the FILE* will remain with this class. Use this only if the scope of the
-     * CAutoFile outlives use of the passed pointer.
-     */
-    FILE* Get() const           { return file; }
-
-    /** Return true if the wrapped FILE* is NULL, false otherwise.
-     */
-    bool IsNull() const         { return (file == NULL); }
-
-    //
-    // Stream subset
-    //
-    void SetType(int n)          { nType = n; }
-    int GetType()                { return nType; }
-    void SetVersion(int n)       { nVersion = n; }
-    int GetVersion()             { return nVersion; }
-    void ReadVersion()           { *this >> nVersion; }
-    void WriteVersion()          { *this << nVersion; }
-
-    CAutoFile& read(char* pch, size_t nSize)
-    {
-        if (!file)
-            throw std::ios_base::failure("CAutoFile::read : file handle is NULL");
-        if (fread(pch, 1, nSize, file) != nSize)
-            throw std::ios_base::failure(feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed");
-        return (*this);
-    }
-
-    CAutoFile& write(const char* pch, size_t nSize)
-    {
-        if (!file)
-            throw std::ios_base::failure("CAutoFile::write : file handle is NULL");
-        if (fwrite(pch, 1, nSize, file) != nSize)
-            throw std::ios_base::failure("CAutoFile::write : write failed");
-        return (*this);
-    }
-
-    template<typename T>
-    unsigned int GetSerializeSize(const T& obj)
-    {
-        // Tells the size of the object if serialized to this stream
-        return ::GetSerializeSize(obj, nType, nVersion);
-    }
-
-    template<typename T>
-    CAutoFile& operator<<(const T& obj)
-    {
-        // Serialize to this stream
-        if (!file)
-            throw std::ios_base::failure("CAutoFile::operator<< : file handle is NULL");
-        ::Serialize(*this, obj, nType, nVersion);
-        return (*this);
-    }
-
-    template<typename T>
-    CAutoFile& operator>>(T& obj)
-    {
-        // Unserialize from this stream
-        if (!file)
-            throw std::ios_base::failure("CAutoFile::operator>> : file handle is NULL");
-        ::Unserialize(*this, obj, nType, nVersion);
-        return (*this);
-    }
-};
-
-/** Non-refcounted RAII wrapper around a FILE* that implements a ring buffer to
- *  deserialize from. It guarantees the ability to rewind a given number of bytes.
- *
- *  Will automatically close the file when it goes out of scope if not null.
- *  If you need to close the file early, use file.fclose() instead of fclose(file).
- */
-class CBufferedFile
-{
-private:
-    // Disallow copies
-    CBufferedFile(const CBufferedFile&);
-    CBufferedFile& operator=(const CBufferedFile&);
-
-    int nType;
-    int nVersion;
-
-    FILE *src;            // source file
-    uint64_t nSrcPos;     // how many bytes have been read from source
-    uint64_t nReadPos;    // how many bytes have been read from this
-    uint64_t nReadLimit;  // up to which position we're allowed to read
-    uint64_t nRewind;     // how many bytes we guarantee to rewind
-    std::vector<char> vchBuf; // the buffer
-
-protected:
-    // read data from the source to fill the buffer
-    bool Fill() {
-        unsigned int pos = nSrcPos % vchBuf.size();
-        unsigned int readNow = vchBuf.size() - pos;
-        unsigned int nAvail = vchBuf.size() - (nSrcPos - nReadPos) - nRewind;
-        if (nAvail < readNow)
-            readNow = nAvail;
-        if (readNow == 0)
-            return false;
-        size_t read = fread((void*)&vchBuf[pos], 1, readNow, src);
-        if (read == 0) {
-            throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill : end of file" : "CBufferedFile::Fill : fread failed");
-        } else {
-            nSrcPos += read;
-            return true;
-        }
-    }
-
-public:
-    CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
-        nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
-    {
-        src = fileIn;
-        nType = nTypeIn;
-        nVersion = nVersionIn;
-    }
-
-    ~CBufferedFile()
-    {
-        fclose();
-    }
-
-    void fclose()
-    {
-        if (src) {
-            ::fclose(src);
-            src = NULL;
-        }
-    }
-
-    // check whether we're at the end of the source file
-    bool eof() const {
-        return nReadPos == nSrcPos && feof(src);
-    }
-
-    // read a number of bytes
-    CBufferedFile& read(char *pch, size_t nSize) {
-        if (nSize + nReadPos > nReadLimit)
-            throw std::ios_base::failure("Read attempted past buffer limit");
-        if (nSize + nRewind > vchBuf.size())
-            throw std::ios_base::failure("Read larger than buffer size");
-        while (nSize > 0) {
-            if (nReadPos == nSrcPos)
-                Fill();
-            unsigned int pos = nReadPos % vchBuf.size();
-            size_t nNow = nSize;
-            if (nNow + pos > vchBuf.size())
-                nNow = vchBuf.size() - pos;
-            if (nNow + nReadPos > nSrcPos)
-                nNow = nSrcPos - nReadPos;
-            memcpy(pch, &vchBuf[pos], nNow);
-            nReadPos += nNow;
-            pch += nNow;
-            nSize -= nNow;
-        }
-        return (*this);
-    }
-
-    // return the current reading position
-    uint64_t GetPos() {
-        return nReadPos;
-    }
-
-    // rewind to a given reading position
-    bool SetPos(uint64_t nPos) {
-        nReadPos = nPos;
-        if (nReadPos + nRewind < nSrcPos) {
-            nReadPos = nSrcPos - nRewind;
-            return false;
-        } else if (nReadPos > nSrcPos) {
-            nReadPos = nSrcPos;
-            return false;
-        } else {
-            return true;
-        }
-    }
-
-    bool Seek(uint64_t nPos) {
-        long nLongPos = nPos;
-        if (nPos != (uint64_t)nLongPos)
-            return false;
-        if (fseek(src, nLongPos, SEEK_SET))
-            return false;
-        nLongPos = ftell(src);
-        nSrcPos = nLongPos;
-        nReadPos = nLongPos;
-        return true;
-    }
-
-    // prevent reading beyond a certain position
-    // no argument removes the limit
-    bool SetLimit(uint64_t nPos = (uint64_t)(-1)) {
-        if (nPos < nReadPos)
-            return false;
-        nReadLimit = nPos;
-        return true;
-    }
-
-    template<typename T>
-    CBufferedFile& operator>>(T& obj) {
-        // Unserialize from this stream
-        ::Unserialize(*this, obj, nType, nVersion);
-        return (*this);
-    }
-
-    // search for a given byte in the stream, and remain positioned on it
-    void FindByte(char ch) {
-        while (true) {
-            if (nReadPos == nSrcPos)
-                Fill();
-            if (vchBuf[nReadPos % vchBuf.size()] == ch)
-                break;
-            nReadPos++;
-        }
-    }
-};
-
 #endif // BITCOIN_SERIALIZE_H
diff --git a/src/streams.h b/src/streams.h
new file mode 100644
index 000000000000..b07b11eb3da1
--- /dev/null
+++ b/src/streams.h
@@ -0,0 +1,571 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_STREAMS_H
+#define BITCOIN_STREAMS_H
+
+#include "allocators.h"
+#include "serialize.h"
+
+#include <algorithm>
+#include <assert.h>
+#include <ios>
+#include <limits>
+#include <map>
+#include <set>
+#include <stdint.h>
+#include <string>
+#include <string.h>
+#include <utility>
+#include <vector>
+
+/** Double ended buffer combining vector and stream-like interfaces.
+ *
+ * >> and << read and write unformatted data using the above serialization templates.
+ * Fills with data in linear time; some stringstream implementations take N^2 time.
+ */
+class CDataStream
+{
+protected:
+    typedef CSerializeData vector_type;
+    vector_type vch;
+    unsigned int nReadPos;
+public:
+    int nType;
+    int nVersion;
+
+    typedef vector_type::allocator_type   allocator_type;
+    typedef vector_type::size_type        size_type;
+    typedef vector_type::difference_type  difference_type;
+    typedef vector_type::reference        reference;
+    typedef vector_type::const_reference  const_reference;
+    typedef vector_type::value_type       value_type;
+    typedef vector_type::iterator         iterator;
+    typedef vector_type::const_iterator   const_iterator;
+    typedef vector_type::reverse_iterator reverse_iterator;
+
+    explicit CDataStream(int nTypeIn, int nVersionIn)
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+
+    CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+
+#if !defined(_MSC_VER) || _MSC_VER >= 1300
+    CDataStream(const char* pbegin, const char* pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+#endif
+
+    CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+
+    CDataStream(const std::vector<char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+
+    CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
+    {
+        Init(nTypeIn, nVersionIn);
+    }
+
+    void Init(int nTypeIn, int nVersionIn)
+    {
+        nReadPos = 0;
+        nType = nTypeIn;
+        nVersion = nVersionIn;
+    }
+
+    CDataStream& operator+=(const CDataStream& b)
+    {
+        vch.insert(vch.end(), b.begin(), b.end());
+        return *this;
+    }
+
+    friend CDataStream operator+(const CDataStream& a, const CDataStream& b)
+    {
+        CDataStream ret = a;
+        ret += b;
+        return (ret);
+    }
+
+    std::string str() const
+    {
+        return (std::string(begin(), end()));
+    }
+
+
+    //
+    // Vector subset
+    //
+    const_iterator begin() const                     { return vch.begin() + nReadPos; }
+    iterator begin()                                 { return vch.begin() + nReadPos; }
+    const_iterator end() const                       { return vch.end(); }
+    iterator end()                                   { return vch.end(); }
+    size_type size() const                           { return vch.size() - nReadPos; }
+    bool empty() const                               { return vch.size() == nReadPos; }
+    void resize(size_type n, value_type c=0)         { vch.resize(n + nReadPos, c); }
+    void reserve(size_type n)                        { vch.reserve(n + nReadPos); }
+    const_reference operator[](size_type pos) const  { return vch[pos + nReadPos]; }
+    reference operator[](size_type pos)              { return vch[pos + nReadPos]; }
+    void clear()                                     { vch.clear(); nReadPos = 0; }
+    iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
+    void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
+
+    void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
+    {
+        assert(last - first >= 0);
+        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
+        {
+            // special case for inserting at the front when there's room
+            nReadPos -= (last - first);
+            memcpy(&vch[nReadPos], &first[0], last - first);
+        }
+        else
+            vch.insert(it, first, last);
+    }
+
+#if !defined(_MSC_VER) || _MSC_VER >= 1300
+    void insert(iterator it, const char* first, const char* last)
+    {
+        assert(last - first >= 0);
+        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
+        {
+            // special case for inserting at the front when there's room
+            nReadPos -= (last - first);
+            memcpy(&vch[nReadPos], &first[0], last - first);
+        }
+        else
+            vch.insert(it, first, last);
+    }
+#endif
+
+    iterator erase(iterator it)
+    {
+        if (it == vch.begin() + nReadPos)
+        {
+            // special case for erasing from the front
+            if (++nReadPos >= vch.size())
+            {
+                // whenever we reach the end, we take the opportunity to clear the buffer
+                nReadPos = 0;
+                return vch.erase(vch.begin(), vch.end());
+            }
+            return vch.begin() + nReadPos;
+        }
+        else
+            return vch.erase(it);
+    }
+
+    iterator erase(iterator first, iterator last)
+    {
+        if (first == vch.begin() + nReadPos)
+        {
+            // special case for erasing from the front
+            if (last == vch.end())
+            {
+                nReadPos = 0;
+                return vch.erase(vch.begin(), vch.end());
+            }
+            else
+            {
+                nReadPos = (last - vch.begin());
+                return last;
+            }
+        }
+        else
+            return vch.erase(first, last);
+    }
+
+    inline void Compact()
+    {
+        vch.erase(vch.begin(), vch.begin() + nReadPos);
+        nReadPos = 0;
+    }
+
+    bool Rewind(size_type n)
+    {
+        // Rewind by n characters if the buffer hasn't been compacted yet
+        if (n > nReadPos)
+            return false;
+        nReadPos -= n;
+        return true;
+    }
+
+
+    //
+    // Stream subset
+    //
+    bool eof() const             { return size() == 0; }
+    CDataStream* rdbuf()         { return this; }
+    int in_avail()               { return size(); }
+
+    void SetType(int n)          { nType = n; }
+    int GetType()                { return nType; }
+    void SetVersion(int n)       { nVersion = n; }
+    int GetVersion()             { return nVersion; }
+    void ReadVersion()           { *this >> nVersion; }
+    void WriteVersion()          { *this << nVersion; }
+
+    CDataStream& read(char* pch, size_t nSize)
+    {
+        // Read from the beginning of the buffer
+        unsigned int nReadPosNext = nReadPos + nSize;
+        if (nReadPosNext >= vch.size())
+        {
+            if (nReadPosNext > vch.size())
+            {
+                throw std::ios_base::failure("CDataStream::read() : end of data");
+            }
+            memcpy(pch, &vch[nReadPos], nSize);
+            nReadPos = 0;
+            vch.clear();
+            return (*this);
+        }
+        memcpy(pch, &vch[nReadPos], nSize);
+        nReadPos = nReadPosNext;
+        return (*this);
+    }
+
+    CDataStream& ignore(int nSize)
+    {
+        // Ignore from the beginning of the buffer
+        assert(nSize >= 0);
+        unsigned int nReadPosNext = nReadPos + nSize;
+        if (nReadPosNext >= vch.size())
+        {
+            if (nReadPosNext > vch.size())
+                throw std::ios_base::failure("CDataStream::ignore() : end of data");
+            nReadPos = 0;
+            vch.clear();
+            return (*this);
+        }
+        nReadPos = nReadPosNext;
+        return (*this);
+    }
+
+    CDataStream& write(const char* pch, size_t nSize)
+    {
+        // Write to the end of the buffer
+        vch.insert(vch.end(), pch, pch + nSize);
+        return (*this);
+    }
+
+    template<typename Stream>
+    void Serialize(Stream& s, int nType, int nVersion) const
+    {
+        // Special case: stream << stream concatenates like stream += stream
+        if (!vch.empty())
+            s.write((char*)&vch[0], vch.size() * sizeof(vch[0]));
+    }
+
+    template<typename T>
+    unsigned int GetSerializeSize(const T& obj)
+    {
+        // Tells the size of the object if serialized to this stream
+        return ::GetSerializeSize(obj, nType, nVersion);
+    }
+
+    template<typename T>
+    CDataStream& operator<<(const T& obj)
+    {
+        // Serialize to this stream
+        ::Serialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+
+    template<typename T>
+    CDataStream& operator>>(T& obj)
+    {
+        // Unserialize from this stream
+        ::Unserialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+
+    void GetAndClear(CSerializeData &data) {
+        data.insert(data.end(), begin(), end());
+        clear();
+    }
+};
+
+
+
+
+
+
+
+
+
+
+/** Non-refcounted RAII wrapper for FILE*
+ *
+ * Will automatically close the file when it goes out of scope if not null.
+ * If you're returning the file pointer, return file.release().
+ * If you need to close the file early, use file.fclose() instead of fclose(file).
+ */
+class CAutoFile
+{
+private:
+    // Disallow copies
+    CAutoFile(const CAutoFile&);
+    CAutoFile& operator=(const CAutoFile&);
+
+    int nType;
+    int nVersion;
+	
+    FILE* file;	
+
+public:
+    CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn)
+    {
+        file = filenew;
+        nType = nTypeIn;
+        nVersion = nVersionIn;
+    }
+
+    ~CAutoFile()
+    {
+        fclose();
+    }
+
+    void fclose()
+    {
+        if (file) {
+            ::fclose(file);
+            file = NULL;
+        }
+    }
+
+    /** Get wrapped FILE* with transfer of ownership.
+     * @note This will invalidate the CAutoFile object, and makes it the responsibility of the caller
+     * of this function to clean up the returned FILE*.
+     */
+    FILE* release()             { FILE* ret = file; file = NULL; return ret; }
+
+    /** Get wrapped FILE* without transfer of ownership.
+     * @note Ownership of the FILE* will remain with this class. Use this only if the scope of the
+     * CAutoFile outlives use of the passed pointer.
+     */
+    FILE* Get() const           { return file; }
+
+    /** Return true if the wrapped FILE* is NULL, false otherwise.
+     */
+    bool IsNull() const         { return (file == NULL); }
+
+    //
+    // Stream subset
+    //
+    void SetType(int n)          { nType = n; }
+    int GetType()                { return nType; }
+    void SetVersion(int n)       { nVersion = n; }
+    int GetVersion()             { return nVersion; }
+    void ReadVersion()           { *this >> nVersion; }
+    void WriteVersion()          { *this << nVersion; }
+
+    CAutoFile& read(char* pch, size_t nSize)
+    {
+        if (!file)
+            throw std::ios_base::failure("CAutoFile::read : file handle is NULL");
+        if (fread(pch, 1, nSize, file) != nSize)
+            throw std::ios_base::failure(feof(file) ? "CAutoFile::read : end of file" : "CAutoFile::read : fread failed");
+        return (*this);
+    }
+
+    CAutoFile& write(const char* pch, size_t nSize)
+    {
+        if (!file)
+            throw std::ios_base::failure("CAutoFile::write : file handle is NULL");
+        if (fwrite(pch, 1, nSize, file) != nSize)
+            throw std::ios_base::failure("CAutoFile::write : write failed");
+        return (*this);
+    }
+
+    template<typename T>
+    unsigned int GetSerializeSize(const T& obj)
+    {
+        // Tells the size of the object if serialized to this stream
+        return ::GetSerializeSize(obj, nType, nVersion);
+    }
+
+    template<typename T>
+    CAutoFile& operator<<(const T& obj)
+    {
+        // Serialize to this stream
+        if (!file)
+            throw std::ios_base::failure("CAutoFile::operator<< : file handle is NULL");
+        ::Serialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+
+    template<typename T>
+    CAutoFile& operator>>(T& obj)
+    {
+        // Unserialize from this stream
+        if (!file)
+            throw std::ios_base::failure("CAutoFile::operator>> : file handle is NULL");
+        ::Unserialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+};
+
+/** Non-refcounted RAII wrapper around a FILE* that implements a ring buffer to
+ *  deserialize from. It guarantees the ability to rewind a given number of bytes.
+ *
+ *  Will automatically close the file when it goes out of scope if not null.
+ *  If you need to close the file early, use file.fclose() instead of fclose(file).
+ */
+class CBufferedFile
+{
+private:
+    // Disallow copies
+    CBufferedFile(const CBufferedFile&);
+    CBufferedFile& operator=(const CBufferedFile&);
+
+    int nType;
+    int nVersion;
+
+    FILE *src;            // source file
+    uint64_t nSrcPos;     // how many bytes have been read from source
+    uint64_t nReadPos;    // how many bytes have been read from this
+    uint64_t nReadLimit;  // up to which position we're allowed to read
+    uint64_t nRewind;     // how many bytes we guarantee to rewind
+    std::vector<char> vchBuf; // the buffer
+
+protected:
+    // read data from the source to fill the buffer
+    bool Fill() {
+        unsigned int pos = nSrcPos % vchBuf.size();
+        unsigned int readNow = vchBuf.size() - pos;
+        unsigned int nAvail = vchBuf.size() - (nSrcPos - nReadPos) - nRewind;
+        if (nAvail < readNow)
+            readNow = nAvail;
+        if (readNow == 0)
+            return false;
+        size_t read = fread((void*)&vchBuf[pos], 1, readNow, src);
+        if (read == 0) {
+            throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill : end of file" : "CBufferedFile::Fill : fread failed");
+        } else {
+            nSrcPos += read;
+            return true;
+        }
+    }
+
+public:
+    CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
+        nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
+    {
+        src = fileIn;
+        nType = nTypeIn;
+        nVersion = nVersionIn;
+    }
+
+    ~CBufferedFile()
+    {
+        fclose();
+    }
+
+    void fclose()
+    {
+        if (src) {
+            ::fclose(src);
+            src = NULL;
+        }
+    }
+
+    // check whether we're at the end of the source file
+    bool eof() const {
+        return nReadPos == nSrcPos && feof(src);
+    }
+
+    // read a number of bytes
+    CBufferedFile& read(char *pch, size_t nSize) {
+        if (nSize + nReadPos > nReadLimit)
+            throw std::ios_base::failure("Read attempted past buffer limit");
+        if (nSize + nRewind > vchBuf.size())
+            throw std::ios_base::failure("Read larger than buffer size");
+        while (nSize > 0) {
+            if (nReadPos == nSrcPos)
+                Fill();
+            unsigned int pos = nReadPos % vchBuf.size();
+            size_t nNow = nSize;
+            if (nNow + pos > vchBuf.size())
+                nNow = vchBuf.size() - pos;
+            if (nNow + nReadPos > nSrcPos)
+                nNow = nSrcPos - nReadPos;
+            memcpy(pch, &vchBuf[pos], nNow);
+            nReadPos += nNow;
+            pch += nNow;
+            nSize -= nNow;
+        }
+        return (*this);
+    }
+
+    // return the current reading position
+    uint64_t GetPos() {
+        return nReadPos;
+    }
+
+    // rewind to a given reading position
+    bool SetPos(uint64_t nPos) {
+        nReadPos = nPos;
+        if (nReadPos + nRewind < nSrcPos) {
+            nReadPos = nSrcPos - nRewind;
+            return false;
+        } else if (nReadPos > nSrcPos) {
+            nReadPos = nSrcPos;
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    bool Seek(uint64_t nPos) {
+        long nLongPos = nPos;
+        if (nPos != (uint64_t)nLongPos)
+            return false;
+        if (fseek(src, nLongPos, SEEK_SET))
+            return false;
+        nLongPos = ftell(src);
+        nSrcPos = nLongPos;
+        nReadPos = nLongPos;
+        return true;
+    }
+
+    // prevent reading beyond a certain position
+    // no argument removes the limit
+    bool SetLimit(uint64_t nPos = (uint64_t)(-1)) {
+        if (nPos < nReadPos)
+            return false;
+        nReadLimit = nPos;
+        return true;
+    }
+
+    template<typename T>
+    CBufferedFile& operator>>(T& obj) {
+        // Unserialize from this stream
+        ::Unserialize(*this, obj, nType, nVersion);
+        return (*this);
+    }
+
+    // search for a given byte in the stream, and remain positioned on it
+    void FindByte(char ch) {
+        while (true) {
+            if (nReadPos == nSrcPos)
+                Fill();
+            if (vchBuf[nReadPos % vchBuf.size()] == ch)
+                break;
+            nReadPos++;
+        }
+    }
+};
+
+#endif // BITCOIN_STREAMS_H
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index 4af87cf8ef79..28610f0d2e49 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -10,6 +10,7 @@
 #include "data/alertTests.raw.h"
 
 #include "serialize.h"
+#include "streams.h"
 #include "util.h"
 #include "utilstrencodings.h"
 #include "version.h"
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index 867a7df88809..59e95f2fd123 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -3,6 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "serialize.h"
+#include "streams.h"
 
 #include <stdint.h>
 
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 4522c63617be..b0d6b4aefa8a 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -6,6 +6,7 @@
 #include "txmempool.h"
 
 #include "core.h"
+#include "streams.h"
 #include "util.h"
 #include "utilmoneystr.h"
 #include "version.h"
diff --git a/src/txmempool.h b/src/txmempool.h
index ad190eea9dde..85cf5310ff4d 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -12,6 +12,8 @@
 #include "core.h"
 #include "sync.h"
 
+class CAutoFile;
+
 inline bool AllowFree(double dPriority)
 {
     // Large (in bytes) low-priority (new, small-coin) transactions

From 214091d584506f23b1c02e9c8a280d5b04791d7f Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Thu, 23 Oct 2014 09:48:19 +0800
Subject: [PATCH 0904/1819] Update license in pull-tester and rpc-tests

Add missing copyright/license header where necessary
---
 qa/pull-tester/build-tests.sh.in           | 4 ++--
 qa/pull-tester/pull-tester.py              | 4 ++--
 qa/pull-tester/pull-tester.sh              | 4 ++--
 qa/pull-tester/run-bitcoind-for-test.sh.in | 4 ++--
 qa/rpc-tests/conflictedbalance.sh          | 2 +-
 qa/rpc-tests/forknotify.py                 | 2 +-
 qa/rpc-tests/getblocktemplate.py           | 2 +-
 qa/rpc-tests/getchaintips.py               | 2 +-
 qa/rpc-tests/keypool.py                    | 2 +-
 qa/rpc-tests/listtransactions.py           | 2 +-
 qa/rpc-tests/netutil.py                    | 5 +++++
 qa/rpc-tests/receivedby.py                 | 2 +-
 qa/rpc-tests/rpcbind_test.py               | 2 +-
 qa/rpc-tests/send.sh                       | 2 +-
 qa/rpc-tests/smartfees.py                  | 3 +++
 qa/rpc-tests/test_framework.py             | 2 +-
 qa/rpc-tests/txnmall.sh                    | 2 +-
 qa/rpc-tests/util.py                       | 2 +-
 qa/rpc-tests/util.sh                       | 2 +-
 qa/rpc-tests/wallet.sh                     | 2 +-
 qa/rpc-tests/walletbackup.sh               | 2 +-
 qa/rpc-tests/zapwallettxes.sh              | 3 +++
 22 files changed, 34 insertions(+), 23 deletions(-)

diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in
index 1ef47d77f4d1..f5c5f0bf7087 100755
--- a/qa/pull-tester/build-tests.sh.in
+++ b/qa/pull-tester/build-tests.sh.in
@@ -1,6 +1,6 @@
 #!/bin/bash
-# Copyright (c) 2013 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Copyright (c) 2013-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.
 #
 # Param1: The prefix to mingw staging
diff --git a/qa/pull-tester/pull-tester.py b/qa/pull-tester/pull-tester.py
index 61ce813d80d0..66688dd4b5e5 100755
--- a/qa/pull-tester/pull-tester.py
+++ b/qa/pull-tester/pull-tester.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
-# Copyright (c) 2013 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Copyright (c) 2013-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.
 #
 import json
diff --git a/qa/pull-tester/pull-tester.sh b/qa/pull-tester/pull-tester.sh
index d3356f736a48..3fe4a05c765e 100755
--- a/qa/pull-tester/pull-tester.sh
+++ b/qa/pull-tester/pull-tester.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
-# Copyright (c) 2013 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Copyright (c) 2013-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.
 #
 # Helper script for pull-tester.
diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index 15363d09a66e..42d8ad52e886 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -1,6 +1,6 @@
 #!/bin/bash
-# Copyright (c) 2013 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Copyright (c) 2013-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.
 #
 DATADIR="@abs_top_builddir@/.bitcoin"
diff --git a/qa/rpc-tests/conflictedbalance.sh b/qa/rpc-tests/conflictedbalance.sh
index 849ad31fb823..71761321ed18 100755
--- a/qa/rpc-tests/conflictedbalance.sh
+++ b/qa/rpc-tests/conflictedbalance.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Test marking of spent outputs
diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index a482f7cc5ad6..772f9a035b44 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #
diff --git a/qa/rpc-tests/getblocktemplate.py b/qa/rpc-tests/getblocktemplate.py
index 8d97719ec346..828373f9a535 100755
--- a/qa/rpc-tests/getblocktemplate.py
+++ b/qa/rpc-tests/getblocktemplate.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Exercise the listtransactions API
diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
index a83c4997436b..a2019917d698 100755
--- a/qa/rpc-tests/getchaintips.py
+++ b/qa/rpc-tests/getchaintips.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Exercise the getchaintips API.
diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py
index 86ad20de525d..354ee0822ca5 100755
--- a/qa/rpc-tests/keypool.py
+++ b/qa/rpc-tests/keypool.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Exercise the wallet keypool, and interaction with wallet encryption/locking
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index 50385b437208..fdc6c6e45231 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Exercise the listtransactions API
diff --git a/qa/rpc-tests/netutil.py b/qa/rpc-tests/netutil.py
index 9bea2e355e15..b740ee0f9842 100644
--- a/qa/rpc-tests/netutil.py
+++ b/qa/rpc-tests/netutil.py
@@ -1,3 +1,8 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
 # Linux network utilities
 import sys
 import socket
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 61f5e0452b58..c3c387db7251 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Exercise the listreceivedbyaddress API
diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py
index a823404e0046..5e476e2505bb 100755
--- a/qa/rpc-tests/rpcbind_test.py
+++ b/qa/rpc-tests/rpcbind_test.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Test for -rpcbind, as well as -rpcallowip and -rpcconnect
diff --git a/qa/rpc-tests/send.sh b/qa/rpc-tests/send.sh
index 37367865c19f..2d54cc6ded42 100755
--- a/qa/rpc-tests/send.sh
+++ b/qa/rpc-tests/send.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 TIMEOUT=10
 SIGNAL=HUP
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index 352a1de2d005..405cbb4412f5 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -1,4 +1,7 @@
 #!/usr/bin/env python
+# Copyright (c) 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.
 
 #
 # Test fee estimation code
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index 5a185566553f..be56c45b2598 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Base class for RPC testing
diff --git a/qa/rpc-tests/txnmall.sh b/qa/rpc-tests/txnmall.sh
index bd36967a63b0..035e7ee15fa9 100755
--- a/qa/rpc-tests/txnmall.sh
+++ b/qa/rpc-tests/txnmall.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Test proper accounting with malleable transactions
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 87baadc5d640..f111839deec2 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -1,5 +1,5 @@
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 #
 # Helpful routines for regression testing
diff --git a/qa/rpc-tests/util.sh b/qa/rpc-tests/util.sh
index b726ef627fac..c2b700430809 100644
--- a/qa/rpc-tests/util.sh
+++ b/qa/rpc-tests/util.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Functions used by more than one test
diff --git a/qa/rpc-tests/wallet.sh b/qa/rpc-tests/wallet.sh
index 98532fa8586e..bb5f34f590af 100755
--- a/qa/rpc-tests/wallet.sh
+++ b/qa/rpc-tests/wallet.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 # Copyright (c) 2013-2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Test block generation and basic wallet sending
diff --git a/qa/rpc-tests/walletbackup.sh b/qa/rpc-tests/walletbackup.sh
index b88d5920f7a9..ee11418beffd 100755
--- a/qa/rpc-tests/walletbackup.sh
+++ b/qa/rpc-tests/walletbackup.sh
@@ -1,6 +1,6 @@
 #!/usr/bin/env bash
 # Copyright (c) 2014 The Bitcoin Core developers
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 # Test wallet backup / dump / restore functionality
diff --git a/qa/rpc-tests/zapwallettxes.sh b/qa/rpc-tests/zapwallettxes.sh
index bc52a7dacd20..e6d490cccc21 100755
--- a/qa/rpc-tests/zapwallettxes.sh
+++ b/qa/rpc-tests/zapwallettxes.sh
@@ -1,4 +1,7 @@
 #!/usr/bin/env bash
+# Copyright (c) 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.
 
 # Test -zapwallettxes=<mode>
 

From c8a25189bcb1381eddf46b9a9743ba48e929439e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 23 Oct 2014 13:24:58 +0200
Subject: [PATCH 0905/1819] doc: release notes update for `rpcallowip` syntax
 change

---
 doc/release-notes.md | 46 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 35 insertions(+), 11 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index de13daf3e4e5..169ad71a0f6c 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -34,29 +34,53 @@ confirmation times.
 Prior releases used hard-coded fees (and priorities), and would
 sometimes create transactions that took a very long time to confirm.
 
+Statistics used to estimate fees and priorities are saved in the
+data directory in the `fee_estimates.dat` file just before
+program shutdown, and are read in at startup.
 
 New Command Line Options
-========================
+---------------------------
 
--txconfirmtarget=n : create transactions that have enough fees (or priority)
+- `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
 so they are likely to confirm within n blocks (default: 1). This setting
 is over-ridden by the -paytxfee option.
 
 New RPC methods
-===============
+----------------
 
-Fee/Priority estimation
------------------------
-
-estimatefee nblocks : Returns approximate fee-per-1,000-bytes needed for
+- `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
 a transaction to be confirmed within nblocks. Returns -1 if not enough
 transactions have been observed to compute a good estimate.
 
-estimatepriority nblocks : Returns approximate priority needed for
+- `estimatepriority nblocks` : Returns approximate priority needed for
 a zero-fee transaction to confirm within nblocks. Returns -1 if not
 enough free transactions have been observed to compute a good
 estimate.
 
-Statistics used to estimate fees and priorities are saved in the
-data directory in the 'fee_estimates.dat' file just before
-program shutdown, and are read in at startup.
+RPC access control changes
+==========================================
+
+Subnet matching for the purpose of access control is now done
+by matching the binary network address, instead of with string wildcard matching.
+For the user this means that `-rpcallowip` takes a subnet specification, which can be
+
+- a single IP address (e.g. `1.2.3.4` or `fe80::0012:3456:789a:bcde`)
+- a network/CIDR (e.g. `1.2.3.0/24` or `fe80::0000/64`)
+- a network/netmask (e.g. `1.2.3.4/255.255.255.0` or `fe80::0012:3456:789a:bcde/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff`)
+
+An arbitrary number of `-rpcallow` arguments can be given. An incoming connection will be accepted if its origin address
+matches one of them.
+
+For example:
+
+| 0.9.x and before                           | 0.10.x                                |
+|--------------------------------------------|---------------------------------------|
+| `-rpcallowip=192.168.1.1`                  | `-rpcallowip=192.168.1.1` (unchanged) |
+| `-rpcallowip=192.168.1.*`                  | `-rpcallowip=192.168.1.0/24`          |
+| `-rpcallowip=192.168.*`                    | `-rpcallowip=192.168.0.0/16`          |
+| `-rpcallowip=*` (dangerous!)               | `-rpcallowip=::/0`                    |
+
+Using wildcards will result in the rule being rejected with the following error in debug.log:
+
+    Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).
+

From d2833de42430b7771eb572d71ba81eec1079f91f Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 23 Oct 2014 19:08:10 +0200
Subject: [PATCH 0906/1819] qt: remove monitoreddatamapper

We haven't used the viewModified signal in ages, so we can use a normal
QDataWidgetMapper.
---
 src/Makefile.qt.include        |  3 ---
 src/qt/monitoreddatamapper.cpp | 39 ----------------------------------
 src/qt/monitoreddatamapper.h   | 34 -----------------------------
 src/qt/optionsdialog.cpp       |  4 ++--
 src/qt/optionsdialog.h         |  4 ++--
 5 files changed, 4 insertions(+), 80 deletions(-)
 delete mode 100644 src/qt/monitoreddatamapper.cpp
 delete mode 100644 src/qt/monitoreddatamapper.h

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index f8f4439159a2..8fb4af81ac4c 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -110,7 +110,6 @@ QT_MOC_CPP = \
   qt/moc_intro.cpp \
   qt/moc_macdockiconhandler.cpp \
   qt/moc_macnotificationhandler.cpp \
-  qt/moc_monitoreddatamapper.cpp \
   qt/moc_notificator.cpp \
   qt/moc_openuridialog.cpp \
   qt/moc_optionsdialog.cpp \
@@ -177,7 +176,6 @@ BITCOIN_QT_H = \
   qt/intro.h \
   qt/macdockiconhandler.h \
   qt/macnotificationhandler.h \
-  qt/monitoreddatamapper.h \
   qt/networkstyle.h \
   qt/notificator.h \
   qt/openuridialog.h \
@@ -269,7 +267,6 @@ BITCOIN_QT_CPP = \
   qt/csvmodelwriter.cpp \
   qt/guiutil.cpp \
   qt/intro.cpp \
-  qt/monitoreddatamapper.cpp \
   qt/networkstyle.cpp \
   qt/notificator.cpp \
   qt/optionsdialog.cpp \
diff --git a/src/qt/monitoreddatamapper.cpp b/src/qt/monitoreddatamapper.cpp
deleted file mode 100644
index 5931c538729e..000000000000
--- a/src/qt/monitoreddatamapper.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "monitoreddatamapper.h"
-
-#include <QMetaObject>
-#include <QMetaProperty>
-#include <QWidget>
-
-MonitoredDataMapper::MonitoredDataMapper(QObject *parent) :
-    QDataWidgetMapper(parent)
-{
-}
-
-void MonitoredDataMapper::addMapping(QWidget *widget, int section)
-{
-    QDataWidgetMapper::addMapping(widget, section);
-    addChangeMonitor(widget);
-}
-
-void MonitoredDataMapper::addMapping(QWidget *widget, int section, const QByteArray &propertyName)
-{
-    QDataWidgetMapper::addMapping(widget, section, propertyName);
-    addChangeMonitor(widget);
-}
-
-void MonitoredDataMapper::addChangeMonitor(QWidget *widget)
-{
-    // Watch user property of widget for changes, and connect
-    //  the signal to our viewModified signal.
-    QMetaProperty prop = widget->metaObject()->userProperty();
-    int signal = prop.notifySignalIndex();
-    int method = this->metaObject()->indexOfMethod("viewModified()");
-    if(signal != -1 && method != -1)
-    {
-        QMetaObject::connect(widget, signal, this, method);
-    }
-}
diff --git a/src/qt/monitoreddatamapper.h b/src/qt/monitoreddatamapper.h
deleted file mode 100644
index b3237d3e095c..000000000000
--- a/src/qt/monitoreddatamapper.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#ifndef MONITOREDDATAMAPPER_H
-#define MONITOREDDATAMAPPER_H
-
-#include <QDataWidgetMapper>
-
-QT_BEGIN_NAMESPACE
-class QWidget;
-QT_END_NAMESPACE
-
-/** Data to Widget mapper that watches for edits and notifies listeners when a field is edited.
-   This can be used, for example, to enable a commit/apply button in a configuration dialog.
- */
-class MonitoredDataMapper : public QDataWidgetMapper
-{
-    Q_OBJECT
-
-public:
-    explicit MonitoredDataMapper(QObject *parent=0);
-
-    void addMapping(QWidget *widget, int section);
-    void addMapping(QWidget *widget, int section, const QByteArray &propertyName);
-
-private:
-    void addChangeMonitor(QWidget *widget);
-
-signals:
-    void viewModified();
-};
-
-#endif // MONITOREDDATAMAPPER_H
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 279467129fc2..67be174d556f 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -11,7 +11,6 @@
 
 #include "bitcoinunits.h"
 #include "guiutil.h"
-#include "monitoreddatamapper.h"
 #include "optionsmodel.h"
 
 #include "main.h" // for MAX_SCRIPTCHECK_THREADS
@@ -24,6 +23,7 @@
 
 #include <boost/thread.hpp>
 
+#include <QDataWidgetMapper>
 #include <QDir>
 #include <QIntValidator>
 #include <QLocale>
@@ -105,7 +105,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
 #endif
 
     /* Widget-to-option mapper */
-    mapper = new MonitoredDataMapper(this);
+    mapper = new QDataWidgetMapper(this);
     mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
     mapper->setOrientation(Qt::Vertical);
 
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 6b62069660ff..39c53f43915f 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -7,7 +7,7 @@
 
 #include <QDialog>
 
-class MonitoredDataMapper;
+class QDataWidgetMapper;
 class OptionsModel;
 class QValidatedLineEdit;
 
@@ -52,7 +52,7 @@ private slots:
 private:
     Ui::OptionsDialog *ui;
     OptionsModel *model;
-    MonitoredDataMapper *mapper;
+    QDataWidgetMapper *mapper;
     bool fProxyIpValid;
 };
 

From 3a757c52947a5a1beefb456ca7d3ebab7a5a14a2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 23 Oct 2014 14:24:22 -0400
Subject: [PATCH 0907/1819] fix build with libc++ after 85c579e

---
 src/script/script.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/script/script.h b/src/script/script.h
index a68924c73a3b..d450db5cad93 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -12,6 +12,7 @@
 #include <stdexcept>
 #include <stdint.h>
 #include <string.h>
+#include <string>
 #include <vector>
 
 static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytes

From c772f4cb04aa2edc04d849039b07c5a454d3f666 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Fri, 24 Oct 2014 11:23:14 +0800
Subject: [PATCH 0908/1819] Add doc/doxygen to .gitignore

---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index 9f1b2a469558..bafc5919c1f0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,3 +102,5 @@ qa/pull-tester/run-bitcoind-for-test.sh
 qa/pull-tester/build-tests.sh
 
 !src/leveldb*/Makefile
+
+/doc/doxygen/

From dcb98466b4f8193fc28656d17b2317f21665fa3a Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Mon, 20 Oct 2014 14:14:04 +0200
Subject: [PATCH 0909/1819] Extend getchaintips RPC test.

Add the capability to simulate network splits to the RPC test framework
and use it to do more extensive testing of 'getchaintips'.
---
 qa/rpc-tests/forknotify.py       | 35 ++++++++--------
 qa/rpc-tests/getblocktemplate.py | 20 ++++-----
 qa/rpc-tests/getchaintips.py     | 50 +++++++++++++++++-----
 qa/rpc-tests/listtransactions.py | 50 +++++++++++-----------
 qa/rpc-tests/receivedby.py       | 68 +++++++++++++++---------------
 qa/rpc-tests/smartfees.py        | 48 ++++++++++-----------
 qa/rpc-tests/test_framework.py   | 71 +++++++++++++++++++++++++-------
 7 files changed, 207 insertions(+), 135 deletions(-)

diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index a482f7cc5ad6..23bfb74175e0 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -17,31 +17,30 @@ class ForkNotifyTest(BitcoinTestFramework):
 
     alert_filename = None  # Set by setup_network
 
-    def setup_network(self, test_dir):
-        nodes = []
-        self.alert_filename = os.path.join(test_dir, "alert.txt")
+    def setup_network(self):
+        self.nodes = []
+        self.alert_filename = os.path.join(self.options.tmpdir, "alert.txt")
         with open(self.alert_filename, 'w') as f:
             pass  # Just open then close to create zero-length file
-        nodes.append(start_node(0, test_dir,
+        self.nodes.append(start_node(0, self.options.tmpdir,
                             ["-blockversion=2", "-alertnotify=echo %s >> '" + self.alert_filename + "'"]))
         # Node1 mines block.version=211 blocks
-        nodes.append(start_node(1, test_dir,
+        self.nodes.append(start_node(1, self.options.tmpdir,
                                 ["-blockversion=211"]))
-        connect_nodes(nodes[1], 0)
+        connect_nodes(self.nodes[1], 0)
 
-        sync_blocks(nodes)
-        return nodes
-        
+        self.is_network_split = False
+        self.sync_all()
 
-    def run_test(self, nodes):
+    def run_test(self):
         # Mine 51 up-version blocks
-        nodes[1].setgenerate(True, 51)
-        sync_blocks(nodes)
+        self.nodes[1].setgenerate(True, 51)
+        self.sync_all()
         # -alertnotify should trigger on the 51'st,
         # but mine and sync another to give
         # -alertnotify time to write
-        nodes[1].setgenerate(True, 1)
-        sync_blocks(nodes)
+        self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
 
         with open(self.alert_filename, 'r') as f:
             alert_text = f.read()
@@ -50,10 +49,10 @@ def run_test(self, nodes):
             raise AssertionError("-alertnotify did not warn of up-version blocks")
 
         # Mine more up-version blocks, should not get more alerts:
-        nodes[1].setgenerate(True, 1)
-        sync_blocks(nodes)
-        nodes[1].setgenerate(True, 1)
-        sync_blocks(nodes)
+        self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
+        self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
 
         with open(self.alert_filename, 'r') as f:
             alert_text2 = f.read()
diff --git a/qa/rpc-tests/getblocktemplate.py b/qa/rpc-tests/getblocktemplate.py
index 8d97719ec346..5ae5d096013d 100755
--- a/qa/rpc-tests/getblocktemplate.py
+++ b/qa/rpc-tests/getblocktemplate.py
@@ -51,40 +51,40 @@ class GetBlockTemplateTest(BitcoinTestFramework):
     Test longpolling with getblocktemplate.
     '''
 
-    def run_test(self, nodes):
+    def run_test(self):
         print "Warning: this test will take about 70 seconds in the best case. Be patient."
-        nodes[0].setgenerate(True, 10)
-        templat = nodes[0].getblocktemplate()
+        self.nodes[0].setgenerate(True, 10)
+        templat = self.nodes[0].getblocktemplate()
         longpollid = templat['longpollid']
         # longpollid should not change between successive invocations if nothing else happens
-        templat2 = nodes[0].getblocktemplate()
+        templat2 = self.nodes[0].getblocktemplate()
         assert(templat2['longpollid'] == longpollid)
 
         # Test 1: test that the longpolling wait if we do nothing
-        thr = LongpollThread(nodes[0])
+        thr = LongpollThread(self.nodes[0])
         thr.start()
         # check that thread still lives
         thr.join(5)  # wait 5 seconds or until thread exits
         assert(thr.is_alive())
 
         # Test 2: test that longpoll will terminate if another node generates a block
-        nodes[1].setgenerate(True, 1)  # generate a block on another node
+        self.nodes[1].setgenerate(True, 1)  # generate a block on another node
         # check that thread will exit now that new transaction entered mempool
         thr.join(5)  # wait 5 seconds or until thread exits
         assert(not thr.is_alive())
 
         # Test 3: test that longpoll will terminate if we generate a block ourselves
-        thr = LongpollThread(nodes[0])
+        thr = LongpollThread(self.nodes[0])
         thr.start()
-        nodes[0].setgenerate(True, 1)  # generate a block on another node
+        self.nodes[0].setgenerate(True, 1)  # generate a block on another node
         thr.join(5)  # wait 5 seconds or until thread exits
         assert(not thr.is_alive())
 
         # Test 4: test that introducing a new transaction into the mempool will terminate the longpoll
-        thr = LongpollThread(nodes[0])
+        thr = LongpollThread(self.nodes[0])
         thr.start()
         # generate a random transaction and submit it
-        (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"), Decimal("0.0"), Decimal("0.001"), 20)
+        (txid, txhex, fee) = random_transaction(self.nodes, Decimal("1.1"), Decimal("0.0"), Decimal("0.001"), 20)
         # after one minute, every 10 seconds the mempool is probed, so in 80 seconds it should have returned
         thr.join(60 + 20)
         assert(not thr.is_alive())
diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
index a83c4997436b..842fcad2b282 100755
--- a/qa/rpc-tests/getchaintips.py
+++ b/qa/rpc-tests/getchaintips.py
@@ -3,22 +3,52 @@
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-# Exercise the getchaintips API.
-
-# Since the test framework does not generate orphan blocks, we can
-# unfortunately not check for them!
+# Exercise the getchaintips API.  We introduce a network split, work
+# on chains of different lengths, and join the network together again.
+# This gives us two tips, verify that it works.
 
 from test_framework import BitcoinTestFramework
 from util import assert_equal
 
 class GetChainTipsTest (BitcoinTestFramework):
 
-    def run_test (self, nodes):
-        res = nodes[0].getchaintips ()
-        assert_equal (len (res), 1)
-        res = res[0]
-        assert_equal (res['branchlen'], 0)
-        assert_equal (res['height'], 200)
+    def run_test (self):
+        BitcoinTestFramework.run_test (self)
+
+        tips = self.nodes[0].getchaintips ()
+        assert_equal (len (tips), 1)
+        assert_equal (tips[0]['branchlen'], 0)
+        assert_equal (tips[0]['height'], 200)
+
+        # Split the network and build two chains of different lengths.
+        self.split_network ()
+        self.nodes[0].setgenerate (True, 10);
+        self.nodes[2].setgenerate (True, 20);
+        self.sync_all ()
+
+        tips = self.nodes[1].getchaintips ()
+        assert_equal (len (tips), 1)
+        shortTip = tips[0]
+        assert_equal (shortTip['branchlen'], 0)
+        assert_equal (shortTip['height'], 210)
+
+        tips = self.nodes[3].getchaintips ()
+        assert_equal (len (tips), 1)
+        longTip = tips[0]
+        assert_equal (longTip['branchlen'], 0)
+        assert_equal (longTip['height'], 220)
+
+        # Join the network halves and check that we now have two tips
+        # (at least at the nodes that previously had the short chain).
+        self.join_network ()
+
+        tips = self.nodes[0].getchaintips ()
+        assert_equal (len (tips), 2)
+        assert_equal (tips[0], longTip)
+
+        assert_equal (tips[1]['branchlen'], 10)
+        tips[1]['branchlen'] = 0;
+        assert_equal (tips[1], shortTip)
 
 if __name__ == '__main__':
     GetChainTipsTest ().main ()
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index 50385b437208..6102052a6f97 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -33,62 +33,64 @@ def check_array_result(object_array, to_match, expected):
 
 class ListTransactionsTest(BitcoinTestFramework):
 
-    def run_test(self, nodes):
+    def run_test(self):
         # Simple send, 0 to 1:
-        txid = nodes[0].sendtoaddress(nodes[1].getnewaddress(), 0.1)
-        sync_mempools(nodes)
-        check_array_result(nodes[0].listtransactions(),
+        txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
+        self.sync_all()
+        check_array_result(self.nodes[0].listtransactions(),
                            {"txid":txid},
                            {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":0})
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"txid":txid},
                            {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":0})
         # mine a block, confirmations should change:
-        nodes[0].setgenerate(True, 1)
-        sync_blocks(nodes)
-        check_array_result(nodes[0].listtransactions(),
+        self.nodes[0].setgenerate(True, 1)
+        self.sync_all()
+        check_array_result(self.nodes[0].listtransactions(),
                            {"txid":txid},
                            {"category":"send","account":"","amount":Decimal("-0.1"),"confirmations":1})
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"txid":txid},
                            {"category":"receive","account":"","amount":Decimal("0.1"),"confirmations":1})
 
         # send-to-self:
-        txid = nodes[0].sendtoaddress(nodes[0].getnewaddress(), 0.2)
-        check_array_result(nodes[0].listtransactions(),
+        txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 0.2)
+        check_array_result(self.nodes[0].listtransactions(),
                            {"txid":txid, "category":"send"},
                            {"amount":Decimal("-0.2")})
-        check_array_result(nodes[0].listtransactions(),
+        check_array_result(self.nodes[0].listtransactions(),
                            {"txid":txid, "category":"receive"},
                            {"amount":Decimal("0.2")})
 
         # sendmany from node1: twice to self, twice to node2:
-        send_to = { nodes[0].getnewaddress() : 0.11, nodes[1].getnewaddress() : 0.22,
-                    nodes[0].getaccountaddress("from1") : 0.33, nodes[1].getaccountaddress("toself") : 0.44 }
-        txid = nodes[1].sendmany("", send_to)
-        sync_mempools(nodes)
-        check_array_result(nodes[1].listtransactions(),
+        send_to = { self.nodes[0].getnewaddress() : 0.11,
+                    self.nodes[1].getnewaddress() : 0.22,
+                    self.nodes[0].getaccountaddress("from1") : 0.33,
+                    self.nodes[1].getaccountaddress("toself") : 0.44 }
+        txid = self.nodes[1].sendmany("", send_to)
+        self.sync_all()
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"send","amount":Decimal("-0.11")},
                            {"txid":txid} )
-        check_array_result(nodes[0].listtransactions(),
+        check_array_result(self.nodes[0].listtransactions(),
                            {"category":"receive","amount":Decimal("0.11")},
                            {"txid":txid} )
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"send","amount":Decimal("-0.22")},
                            {"txid":txid} )
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"receive","amount":Decimal("0.22")},
                            {"txid":txid} )
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"send","amount":Decimal("-0.33")},
                            {"txid":txid} )
-        check_array_result(nodes[0].listtransactions(),
+        check_array_result(self.nodes[0].listtransactions(),
                            {"category":"receive","amount":Decimal("0.33")},
                            {"txid":txid, "account" : "from1"} )
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"send","amount":Decimal("-0.44")},
                            {"txid":txid, "account" : ""} )
-        check_array_result(nodes[1].listtransactions(),
+        check_array_result(self.nodes[1].listtransactions(),
                            {"category":"receive","amount":Decimal("0.44")},
                            {"txid":txid, "account" : "toself"} )
 
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 61f5e0452b58..717025524211 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -54,36 +54,36 @@ def check_array_result(object_array, to_match, expected, should_not_find = False
 
 class ReceivedByTest(BitcoinTestFramework):
 
-    def run_test(self, nodes):
+    def run_test(self):
         '''
         listreceivedbyaddress Test
         '''
         # Send from node 0 to 1
-        addr = nodes[1].getnewaddress()
-        txid = nodes[0].sendtoaddress(addr, 0.1)
-        sync_mempools(nodes)
+        addr = self.nodes[1].getnewaddress()
+        txid = self.nodes[0].sendtoaddress(addr, 0.1)
+        self.sync_all()
 
         #Check not listed in listreceivedbyaddress because has 0 confirmations
-        check_array_result(nodes[1].listreceivedbyaddress(),
+        check_array_result(self.nodes[1].listreceivedbyaddress(),
                            {"address":addr},
                            { },
                            True)
         #Bury Tx under 10 block so it will be returned by listreceivedbyaddress
-        nodes[1].setgenerate(True, 10)
-        sync_blocks(nodes)
-        check_array_result(nodes[1].listreceivedbyaddress(),
+        self.nodes[1].setgenerate(True, 10)
+        self.sync_all()
+        check_array_result(self.nodes[1].listreceivedbyaddress(),
                            {"address":addr},
                            {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
         #With min confidence < 10
-        check_array_result(nodes[1].listreceivedbyaddress(5),
+        check_array_result(self.nodes[1].listreceivedbyaddress(5),
                            {"address":addr},
                            {"address":addr, "account":"", "amount":Decimal("0.1"), "confirmations":10, "txids":[txid,]})
         #With min confidence > 10, should not find Tx
-        check_array_result(nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True)
+        check_array_result(self.nodes[1].listreceivedbyaddress(11),{"address":addr},{ },True)
 
         #Empty Tx
-        addr = nodes[1].getnewaddress()
-        check_array_result(nodes[1].listreceivedbyaddress(0,True),
+        addr = self.nodes[1].getnewaddress()
+        check_array_result(self.nodes[1].listreceivedbyaddress(0,True),
                            {"address":addr},
                            {"address":addr, "account":"", "amount":0, "confirmations":0, "txids":[]})
 
@@ -91,24 +91,24 @@ def run_test(self, nodes):
             getreceivedbyaddress Test
         '''
         # Send from node 0 to 1
-        addr = nodes[1].getnewaddress()
-        txid = nodes[0].sendtoaddress(addr, 0.1)
-        sync_mempools(nodes)
+        addr = self.nodes[1].getnewaddress()
+        txid = self.nodes[0].sendtoaddress(addr, 0.1)
+        self.sync_all()
 
         #Check balance is 0 because of 0 confirmations
-        balance = nodes[1].getreceivedbyaddress(addr)
+        balance = self.nodes[1].getreceivedbyaddress(addr)
         if balance != Decimal("0.0"):
             raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
 
         #Check balance is 0.1
-        balance = nodes[1].getreceivedbyaddress(addr,0)
+        balance = self.nodes[1].getreceivedbyaddress(addr,0)
         if balance != Decimal("0.1"):
             raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
 
         #Bury Tx under 10 block so it will be returned by the default getreceivedbyaddress
-        nodes[1].setgenerate(True, 10)
-        sync_blocks(nodes)
-        balance = nodes[1].getreceivedbyaddress(addr)
+        self.nodes[1].setgenerate(True, 10)
+        self.sync_all()
+        balance = self.nodes[1].getreceivedbyaddress(addr)
         if balance != Decimal("0.1"):
             raise AssertionError("Wrong balance returned by getreceivedbyaddress, %0.2f"%(balance))
 
@@ -116,40 +116,40 @@ def run_test(self, nodes):
             listreceivedbyaccount + getreceivedbyaccount Test
         '''
         #set pre-state
-        addrArr = nodes[1].getnewaddress()
-        account = nodes[1].getaccount(addrArr)
-        received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(),{"account":account})
+        addrArr = self.nodes[1].getnewaddress()
+        account = self.nodes[1].getaccount(addrArr)
+        received_by_account_json = get_sub_array_from_array(self.nodes[1].listreceivedbyaccount(),{"account":account})
         if len(received_by_account_json) == 0:
             raise AssertionError("No accounts found in node")
-        balance_by_account = rec_by_accountArr = nodes[1].getreceivedbyaccount(account)
+        balance_by_account = rec_by_accountArr = self.nodes[1].getreceivedbyaccount(account)
 
-        txid = nodes[0].sendtoaddress(addr, 0.1)
+        txid = self.nodes[0].sendtoaddress(addr, 0.1)
 
         # listreceivedbyaccount should return received_by_account_json because of 0 confirmations
-        check_array_result(nodes[1].listreceivedbyaccount(),
+        check_array_result(self.nodes[1].listreceivedbyaccount(),
                            {"account":account},
                            received_by_account_json)
 
         # getreceivedbyaddress should return same balance because of 0 confirmations
-        balance = nodes[1].getreceivedbyaccount(account)
+        balance = self.nodes[1].getreceivedbyaccount(account)
         if balance != balance_by_account:
             raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
 
-        nodes[1].setgenerate(True, 10)
-        sync_blocks(nodes)
+        self.nodes[1].setgenerate(True, 10)
+        self.sync_all()
         # listreceivedbyaccount should return updated account balance
-        check_array_result(nodes[1].listreceivedbyaccount(),
+        check_array_result(self.nodes[1].listreceivedbyaccount(),
                            {"account":account},
                            {"account":received_by_account_json["account"], "amount":(received_by_account_json["amount"] + Decimal("0.1"))})
 
         # getreceivedbyaddress should return updates balance
-        balance = nodes[1].getreceivedbyaccount(account)
+        balance = self.nodes[1].getreceivedbyaccount(account)
         if balance != balance_by_account + Decimal("0.1"):
             raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
 
         #Create a new account named "mynewaccount" that has a 0 balance
-        nodes[1].getaccountaddress("mynewaccount")
-        received_by_account_json = get_sub_array_from_array(nodes[1].listreceivedbyaccount(0,True),{"account":"mynewaccount"})
+        self.nodes[1].getaccountaddress("mynewaccount")
+        received_by_account_json = get_sub_array_from_array(self.nodes[1].listreceivedbyaccount(0,True),{"account":"mynewaccount"})
         if len(received_by_account_json) == 0:
             raise AssertionError("No accounts found in node")
 
@@ -158,7 +158,7 @@ def run_test(self, nodes):
             raise AssertionError("Wrong balance returned by listreceivedbyaccount, %0.2f"%(received_by_account_json["amount"]))
 
         # Test getreceivedbyaccount for 0 amount accounts
-        balance = nodes[1].getreceivedbyaccount("mynewaccount")
+        balance = self.nodes[1].getreceivedbyaccount("mynewaccount")
         if balance != Decimal("0.0"):
             raise AssertionError("Wrong balance returned by getreceivedbyaccount, %0.2f"%(balance))
 
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index 352a1de2d005..065bdb01c336 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -10,48 +10,48 @@
 
 class EstimateFeeTest(BitcoinTestFramework):
 
-    def setup_network(self, test_dir):
-        nodes = []
-        nodes.append(start_node(0, test_dir,
+    def setup_network(self):
+        self.nodes = []
+        self.nodes.append(start_node(0, self.options.tmpdir,
                             ["-debug=mempool", "-debug=estimatefee"]))
         # Node1 mines small-but-not-tiny blocks, and allows free transactions.
         # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
         # so blockmaxsize of 2,000 is really just 1,000 bytes (room enough for
         # 6 or 7 transactions)
-        nodes.append(start_node(1, test_dir,
+        self.nodes.append(start_node(1, self.options.tmpdir,
                                 ["-blockprioritysize=1500", "-blockmaxsize=2000",
                                  "-debug=mempool", "-debug=estimatefee"]))
-        connect_nodes(nodes[1], 0)
+        connect_nodes(self.nodes[1], 0)
 
         # Node2 is a stingy miner, that
         # produces very small blocks (room for only 3 or so transactions)
         node2args = [ "-blockprioritysize=0", "-blockmaxsize=1500",
                       "-debug=mempool", "-debug=estimatefee"]
-        nodes.append(start_node(2, test_dir, node2args))
-        connect_nodes(nodes[2], 0)
+        self.nodes.append(start_node(2, self.options.tmpdir, node2args))
+        connect_nodes(self.nodes[2], 0)
 
-        sync_blocks(nodes)
-        return nodes
+        self.is_network_split = False
+        self.sync_all()
         
 
-    def run_test(self, nodes):
+    def run_test(self):
         # Prime the memory pool with pairs of transactions
         # (high-priority, random fee and zero-priority, random fee)
         min_fee = Decimal("0.001")
         fees_per_kb = [];
         for i in range(12):
-            (txid, txhex, fee) = random_zeropri_transaction(nodes, Decimal("1.1"),
+            (txid, txhex, fee) = random_zeropri_transaction(self.nodes, Decimal("1.1"),
                                                             min_fee, min_fee, 20)
             tx_kbytes = (len(txhex)/2)/1000.0
             fees_per_kb.append(float(fee)/tx_kbytes)
 
         # Mine blocks with node2 until the memory pool clears:
-        count_start = nodes[2].getblockcount()
-        while len(nodes[2].getrawmempool()) > 0:
-            nodes[2].setgenerate(True, 1)
-            sync_blocks(nodes)
+        count_start = self.nodes[2].getblockcount()
+        while len(self.nodes[2].getrawmempool()) > 0:
+            self.nodes[2].setgenerate(True, 1)
+            self.sync_all()
 
-        all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        all_estimates = [ self.nodes[0].estimatefee(i) for i in range(1,20) ]
         print("Fee estimates, super-stingy miner: "+str([str(e) for e in all_estimates]))
 
         # Estimates should be within the bounds of what transactions fees actually were:
@@ -63,25 +63,25 @@ def run_test(self, nodes):
         # Generate transactions while mining 30 more blocks, this time with node1:
         for i in range(30):
             for j in range(random.randrange(6-4,6+4)):
-                (txid, txhex, fee) = random_transaction(nodes, Decimal("1.1"),
+                (txid, txhex, fee) = random_transaction(self.nodes, Decimal("1.1"),
                                                         Decimal("0.0"), min_fee, 20)
                 tx_kbytes = (len(txhex)/2)/1000.0
                 fees_per_kb.append(float(fee)/tx_kbytes)
-            nodes[1].setgenerate(True, 1)
-            sync_blocks(nodes)
+            self.nodes[1].setgenerate(True, 1)
+            self.sync_all()
 
-        all_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        all_estimates = [ self.nodes[0].estimatefee(i) for i in range(1,20) ]
         print("Fee estimates, more generous miner: "+str([ str(e) for e in all_estimates]))
         for e in filter(lambda x: x >= 0, all_estimates):
             if float(e)+delta < min(fees_per_kb) or float(e)-delta > max(fees_per_kb):
                 raise AssertionError("Estimated fee (%f) out of range (%f,%f)"%(float(e), min_fee_kb, max_fee_kb))
 
         # Finish by mining a normal-sized block:
-        while len(nodes[0].getrawmempool()) > 0:
-            nodes[0].setgenerate(True, 1)
-            sync_blocks(nodes)
+        while len(self.nodes[0].getrawmempool()) > 0:
+            self.nodes[0].setgenerate(True, 1)
+            self.sync_all()
 
-        final_estimates = [ nodes[0].estimatefee(i) for i in range(1,20) ]
+        final_estimates = [ self.nodes[0].estimatefee(i) for i in range(1,20) ]
         print("Final fee estimates: "+str([ str(e) for e in final_estimates]))
 
 
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index 5a185566553f..f226496d0fc5 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -21,22 +21,64 @@
 class BitcoinTestFramework(object):
 
     # These may be over-ridden by subclasses:
-    def run_test(self, nodes):
+    def run_test(self):
+        for node in self.nodes:
             assert_equal(node.getblockcount(), 200)
             assert_equal(node.getbalance(), 25*50)
 
     def add_options(self, parser):
         pass
 
-    def setup_chain(self, tmp_directory):
-        print("Initializing test directory "+tmp_directory)
-        initialize_chain(tmp_directory)
-
-    def setup_network(self, tmp_directory):
-        nodes = start_nodes(2, tmp_directory)
-        connect_nodes(nodes[1], 0)
-        sync_blocks(nodes)
-        return nodes
+    def setup_chain(self):
+        print("Initializing test directory "+self.options.tmpdir)
+        initialize_chain(self.options.tmpdir)
+
+    def setup_network(self, split = False):
+        self.nodes = start_nodes(4, self.options.tmpdir)
+
+        # Connect the nodes as a "chain".  This allows us
+        # to split the network between nodes 1 and 2 to get
+        # two halves that can work on competing chains.
+
+        # If we joined network halves, connect the nodes from the joint
+        # on outward.  This ensures that chains are properly reorganised.
+        if not split:
+            connect_nodes(self.nodes[2], 1)
+            sync_blocks(self.nodes[1:2])
+            sync_mempools(self.nodes[1:2])
+
+        connect_nodes(self.nodes[1], 0)
+        connect_nodes(self.nodes[3], 2)
+        self.is_network_split = split
+        self.sync_all()
+
+    def split_network(self):
+        """
+        Split the network of four nodes into nodes 0/1 and 2/3.
+        """
+        assert not self.is_network_split
+        stop_nodes(self.nodes)
+        wait_bitcoinds()
+        self.setup_network(True)
+
+    def sync_all(self):
+        if self.is_network_split:
+            sync_blocks(self.nodes[:1])
+            sync_blocks(self.nodes[2:])
+            sync_mempools(self.nodes[:1])
+            sync_mempools(self.nodes[2:])
+        else:
+            sync_blocks(self.nodes)
+            sync_mempools(self.nodes)
+
+    def join_network(self):
+        """
+        Join the (previously split) network halves together.
+        """
+        assert self.is_network_split
+        stop_nodes(self.nodes)
+        wait_bitcoinds()
+        self.setup_network(False)
 
     def main(self):
         import optparse
@@ -56,15 +98,14 @@ def main(self):
         check_json_precision()
 
         success = False
-        nodes = []
         try:
             if not os.path.isdir(self.options.tmpdir):
                 os.makedirs(self.options.tmpdir)
-            self.setup_chain(self.options.tmpdir)
+            self.setup_chain()
 
-            nodes = self.setup_network(self.options.tmpdir)
+            self.setup_network()
 
-            self.run_test(nodes)
+            self.run_test()
 
             success = True
 
@@ -80,7 +121,7 @@ def main(self):
 
         if not self.options.nocleanup:
             print("Cleaning up")
-            stop_nodes(nodes)
+            stop_nodes(self.nodes)
             wait_bitcoinds()
             shutil.rmtree(self.options.tmpdir)
 

From 2290ed01bc1b4176a0c6b976707bf7dd6bc49f43 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Fri, 24 Oct 2014 09:06:37 +0200
Subject: [PATCH 0910/1819] Work around #5113.

---
 qa/rpc-tests/test_framework.py | 6 +++---
 qa/rpc-tests/util.py           | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index f226496d0fc5..1746294691ba 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -43,12 +43,12 @@ def setup_network(self, split = False):
         # If we joined network halves, connect the nodes from the joint
         # on outward.  This ensures that chains are properly reorganised.
         if not split:
-            connect_nodes(self.nodes[2], 1)
+            connect_nodes_bi(self.nodes, 1, 2)
             sync_blocks(self.nodes[1:2])
             sync_mempools(self.nodes[1:2])
 
-        connect_nodes(self.nodes[1], 0)
-        connect_nodes(self.nodes[3], 2)
+        connect_nodes_bi(self.nodes, 0, 1)
+        connect_nodes_bi(self.nodes, 2, 3)
         self.is_network_split = split
         self.sync_all()
 
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 87baadc5d640..036ac577e6a2 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -194,6 +194,10 @@ def connect_nodes(from_connection, node_num):
     while any(peer['version'] == 0 for peer in from_connection.getpeerinfo()):
         time.sleep(0.1)
 
+def connect_nodes_bi(nodes, a, b):
+    connect_nodes(nodes[a], b)
+    connect_nodes(nodes[b], a)
+
 def find_output(node, txid, amount):
     """
     Return index to output of txid with value amount

From 7c0f36c431532c787f55b256bd1d6fadbd5b8468 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 24 Oct 2014 09:33:16 +0200
Subject: [PATCH 0911/1819] Clear vFixedSeeds for regtest network

It shouldn't inherit these from testnet.
(seems to be already done for unit test network but forgotten here...)
Fixes #5127.
---
 src/chainparams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index dd76ca6c26c0..1ab292517a42 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -266,6 +266,7 @@ class CRegTestParams : public CTestNetParams {
         nDefaultPort = 18444;
         assert(hashGenesisBlock == uint256("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
 
+        vFixedSeeds.clear(); // Regtest mode doesn't have any fixed seeds.
         vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
 
         fRequireRPCPassword = false;

From 24f5c94015cd15adbf9a7018e11667ee36799cec Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Fri, 24 Oct 2014 12:04:27 +0800
Subject: [PATCH 0912/1819] Update comments in addrman to be doxygen compatible

Also correct the file license
---
 src/addrman.cpp |   8 +-
 src/addrman.h   | 239 +++++++++++++++++++++++++-----------------------
 2 files changed, 128 insertions(+), 119 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 7b674a66e7cb..7ff21b00ec5c 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2012 Pieter Wuille
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "addrman.h"
@@ -39,7 +39,7 @@ int CAddrInfo::GetNewBucket(const std::vector<unsigned char>& nKey, const CNetAd
 
 bool CAddrInfo::IsTerrible(int64_t nNow) const
 {
-    if (nLastTry && nLastTry >= nNow - 60) // never remove things tried the last minute
+    if (nLastTry && nLastTry >= nNow - 60) // never remove things tried in the last minute
         return false;
 
     if (nTime > nNow + 10 * 60) // came in a flying DeLorean
@@ -131,7 +131,7 @@ int CAddrMan::SelectTried(int nKBucket)
 {
     std::vector<int>& vTried = vvTried[nKBucket];
 
-    // random shuffle the first few elements (using the entire list)
+    // randomly shuffle the first few elements (using the entire list)
     // find the least recently tried among them
     int64_t nOldest = -1;
     int nOldestPos = -1;
@@ -211,7 +211,7 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
 
     assert(info.nRefCount == 0);
 
-    // what tried bucket to move the entry to
+    // which tried bucket to move the entry to
     int nKBucket = info.GetTriedBucket(nKey);
     std::vector<int>& vTried = vvTried[nKBucket];
 
diff --git a/src/addrman.h b/src/addrman.h
index 5fd698f18a25..914086fc7614 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2012 Pieter Wuille
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOIN_ADDRMAN
@@ -17,29 +17,31 @@
 #include <stdint.h>
 #include <vector>
 
-/** Extended statistics about a CAddress */
+/** 
+ * Extended statistics about a CAddress 
+ */
 class CAddrInfo : public CAddress
 {
 private:
-    // where knowledge about this address first came from
+    //! where knowledge about this address first came from
     CNetAddr source;
 
-    // last successful connection by us
+    //! last successful connection by us
     int64_t nLastSuccess;
 
-    // last try whatsoever by us:
+    //! last try whatsoever by us:
     // int64_t CAddress::nLastTry
 
-    // connection attempts since last successful attempt
+    //! connection attempts since last successful attempt
     int nAttempts;
 
-    // reference count in new sets (memory only)
+    //! reference count in new sets (memory only)
     int nRefCount;
 
-    // in tried set? (memory only)
+    //! in tried set? (memory only)
     bool fInTried;
 
-    // position in vRandom
+    //! position in vRandom
     int nRandomPos;
 
     friend class CAddrMan;
@@ -76,200 +78,205 @@ class CAddrInfo : public CAddress
         Init();
     }
 
-    // Calculate in which "tried" bucket this entry belongs
+    //! Calculate in which "tried" bucket this entry belongs
     int GetTriedBucket(const std::vector<unsigned char> &nKey) const;
 
-    // Calculate in which "new" bucket this entry belongs, given a certain source
+    //! Calculate in which "new" bucket this entry belongs, given a certain source
     int GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAddr& src) const;
 
-    // Calculate in which "new" bucket this entry belongs, using its default source
+    //! Calculate in which "new" bucket this entry belongs, using its default source
     int GetNewBucket(const std::vector<unsigned char> &nKey) const
     {
         return GetNewBucket(nKey, source);
     }
 
-    // Determine whether the statistics about this entry are bad enough so that it can just be deleted
+    //! Determine whether the statistics about this entry are bad enough so that it can just be deleted
     bool IsTerrible(int64_t nNow = GetAdjustedTime()) const;
 
-    // Calculate the relative chance this entry should be given when selecting nodes to connect to
+    //! Calculate the relative chance this entry should be given when selecting nodes to connect to
     double GetChance(int64_t nNow = GetAdjustedTime()) const;
 
 };
 
-// Stochastic address manager
-//
-// Design goals:
-//  * Only keep a limited number of addresses around, so that addr.dat and memory requirements do not grow without bound.
-//  * Keep the address tables in-memory, and asynchronously dump the entire to able in addr.dat.
-//  * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.
-//
-// To that end:
-//  * Addresses are organized into buckets.
-//    * Address that have not yet been tried go into 256 "new" buckets.
-//      * Based on the address range (/16 for IPv4) of source of the information, 32 buckets are selected at random
-//      * The actual bucket is chosen from one of these, based on the range the address itself is located.
-//      * One single address can occur in up to 4 different buckets, to increase selection chances for addresses that
-//        are seen frequently. The chance for increasing this multiplicity decreases exponentially.
-//      * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen
-//        ones) is removed from it first.
-//    * Addresses of nodes that are known to be accessible go into 64 "tried" buckets.
-//      * Each address range selects at random 4 of these buckets.
-//      * The actual bucket is chosen from one of these, based on the full address.
-//      * When adding a new good address to a full bucket, a randomly chosen entry (with a bias favoring less recently
-//        tried ones) is evicted from it, back to the "new" buckets.
-//    * Bucket selection is based on cryptographic hashing, using a randomly-generated 256-bit key, which should not
-//      be observable by adversaries.
-//    * Several indexes are kept for high performance. Defining DEBUG_ADDRMAN will introduce frequent (and expensive)
-//      consistency checks for the entire data structure.
-
-// total number of buckets for tried addresses
+/** Stochastic address manager
+ *
+ * Design goals:
+ *  * Keep the address tables in-memory, and asynchronously dump the entire to able in peers.dat.
+ *  * Make sure no (localized) attacker can fill the entire table with his nodes/addresses.
+ *
+ * To that end:
+ *  * Addresses are organized into buckets.
+ *    * Address that have not yet been tried go into 256 "new" buckets.
+ *      * Based on the address range (/16 for IPv4) of source of the information, 32 buckets are selected at random
+ *      * The actual bucket is chosen from one of these, based on the range the address itself is located.
+ *      * One single address can occur in up to 4 different buckets, to increase selection chances for addresses that
+ *        are seen frequently. The chance for increasing this multiplicity decreases exponentially.
+ *      * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen
+ *        ones) is removed from it first.
+ *    * Addresses of nodes that are known to be accessible go into 64 "tried" buckets.
+ *      * Each address range selects at random 4 of these buckets.
+ *      * The actual bucket is chosen from one of these, based on the full address.
+ *      * When adding a new good address to a full bucket, a randomly chosen entry (with a bias favoring less recently
+ *        tried ones) is evicted from it, back to the "new" buckets.
+ *    * Bucket selection is based on cryptographic hashing, using a randomly-generated 256-bit key, which should not
+ *      be observable by adversaries.
+ *    * Several indexes are kept for high performance. Defining DEBUG_ADDRMAN will introduce frequent (and expensive)
+ *      consistency checks for the entire data structure.
+ */
+
+//! total number of buckets for tried addresses
 #define ADDRMAN_TRIED_BUCKET_COUNT 64
 
-// maximum allowed number of entries in buckets for tried addresses
+//! maximum allowed number of entries in buckets for tried addresses
 #define ADDRMAN_TRIED_BUCKET_SIZE 64
 
-// total number of buckets for new addresses
+//! total number of buckets for new addresses
 #define ADDRMAN_NEW_BUCKET_COUNT 256
 
-// maximum allowed number of entries in buckets for new addresses
+//! maximum allowed number of entries in buckets for new addresses
 #define ADDRMAN_NEW_BUCKET_SIZE 64
 
-// over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread
+//! over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread
 #define ADDRMAN_TRIED_BUCKETS_PER_GROUP 4
 
-// over how many buckets entries with new addresses originating from a single group are spread
+//! over how many buckets entries with new addresses originating from a single group are spread
 #define ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP 32
 
-// in how many buckets for entries with new addresses a single address may occur
+//! in how many buckets for entries with new addresses a single address may occur
 #define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 4
 
-// how many entries in a bucket with tried addresses are inspected, when selecting one to replace
+//! how many entries in a bucket with tried addresses are inspected, when selecting one to replace
 #define ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT 4
 
-// how old addresses can maximally be
+//! how old addresses can maximally be
 #define ADDRMAN_HORIZON_DAYS 30
 
-// after how many failed attempts we give up on a new node
+//! after how many failed attempts we give up on a new node
 #define ADDRMAN_RETRIES 3
 
-// how many successive failures are allowed ...
+//! how many successive failures are allowed ...
 #define ADDRMAN_MAX_FAILURES 10
 
-// ... in at least this many days
+//! ... in at least this many days
 #define ADDRMAN_MIN_FAIL_DAYS 7
 
-// the maximum percentage of nodes to return in a getaddr call
+//! the maximum percentage of nodes to return in a getaddr call
 #define ADDRMAN_GETADDR_MAX_PCT 23
 
-// the maximum number of nodes to return in a getaddr call
+//! the maximum number of nodes to return in a getaddr call
 #define ADDRMAN_GETADDR_MAX 2500
 
-/** Stochastical (IP) address manager */
+/** 
+ * Stochastical (IP) address manager 
+ */
 class CAddrMan
 {
 private:
-    // critical section to protect the inner data structures
+    //! critical section to protect the inner data structures
     mutable CCriticalSection cs;
 
-    // secret key to randomize bucket select with
+    //! secret key to randomize bucket select with
     std::vector<unsigned char> nKey;
 
-    // last used nId
+    //! last used nId
     int nIdCount;
 
-    // table with information about all nIds
+    //! table with information about all nIds
     std::map<int, CAddrInfo> mapInfo;
 
-    // find an nId based on its network address
+    //! find an nId based on its network address
     std::map<CNetAddr, int> mapAddr;
 
-    // randomly-ordered vector of all nIds
+    //! randomly-ordered vector of all nIds
     std::vector<int> vRandom;
 
     // number of "tried" entries
     int nTried;
 
-    // list of "tried" buckets
+    //! list of "tried" buckets
     std::vector<std::vector<int> > vvTried;
 
-    // number of (unique) "new" entries
+    //! number of (unique) "new" entries
     int nNew;
 
-    // list of "new" buckets
+    //! list of "new" buckets
     std::vector<std::set<int> > vvNew;
 
 protected:
 
-    // Find an entry.
+    //! Find an entry.
     CAddrInfo* Find(const CNetAddr& addr, int *pnId = NULL);
 
-    // find an entry, creating it if necessary.
-    // nTime and nServices of found node is updated, if necessary.
+    //! find an entry, creating it if necessary.
+    //! nTime and nServices of the found node are updated, if necessary.
     CAddrInfo* Create(const CAddress &addr, const CNetAddr &addrSource, int *pnId = NULL);
 
-    // Swap two elements in vRandom.
+    //! Swap two elements in vRandom.
     void SwapRandom(unsigned int nRandomPos1, unsigned int nRandomPos2);
 
-    // Return position in given bucket to replace.
+    //! Return position in given bucket to replace.
     int SelectTried(int nKBucket);
 
-    // Remove an element from a "new" bucket.
-    // This is the only place where actual deletes occur.
-    // They are never deleted while in the "tried" table, only possibly evicted back to the "new" table.
+    //! Remove an element from a "new" bucket.
+    //! This is the only place where actual deletions occur.
+    //! Elements are never deleted while in the "tried" table, only possibly evicted back to the "new" table.
     int ShrinkNew(int nUBucket);
 
-    // Move an entry from the "new" table(s) to the "tried" table
-    // @pre vvUnkown[nOrigin].count(nId) != 0
+    //! Move an entry from the "new" table(s) to the "tried" table
+    //! @pre vvUnkown[nOrigin].count(nId) != 0
     void MakeTried(CAddrInfo& info, int nId, int nOrigin);
 
-    // Mark an entry "good", possibly moving it from "new" to "tried".
+    //! Mark an entry "good", possibly moving it from "new" to "tried".
     void Good_(const CService &addr, int64_t nTime);
 
-    // Add an entry to the "new" table.
+    //! Add an entry to the "new" table.
     bool Add_(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty);
 
-    // Mark an entry as attempted to connect.
+    //! Mark an entry as attempted to connect.
     void Attempt_(const CService &addr, int64_t nTime);
 
-    // Select an address to connect to.
-    // nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100)
+    //! Select an address to connect to.
+    //! nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100)
     CAddress Select_(int nUnkBias);
 
 #ifdef DEBUG_ADDRMAN
-    // Perform consistency check. Returns an error code or zero.
+    //! Perform consistency check. Returns an error code or zero.
     int Check_();
 #endif
 
-    // Select several addresses at once.
+    //! Select several addresses at once.
     void GetAddr_(std::vector<CAddress> &vAddr);
 
-    // Mark an entry as currently-connected-to.
+    //! Mark an entry as currently-connected-to.
     void Connected_(const CService &addr, int64_t nTime);
 
 public:
-    // serialized format:
-    // * version byte (currently 0)
-    // * nKey
-    // * nNew
-    // * nTried
-    // * number of "new" buckets
-    // * all nNew addrinfos in vvNew
-    // * all nTried addrinfos in vvTried
-    // * for each bucket:
-    //   * number of elements
-    //   * for each element: index
-    //
-    // Notice that vvTried, mapAddr and vVector are never encoded explicitly;
-    // they are instead reconstructed from the other information.
-    //
-    // vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change,
-    // otherwise it is reconstructed as well.
-    //
-    // This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
-    // changes to the ADDRMAN_ parameters without breaking the on-disk structure.
-    //
-    // We don't use ADD_SERIALIZE_METHODS since the serialization and deserialization code has
-    // very little in common.
+    /**
+     * serialized format:
+     * * version byte (currently 0)
+     * * nKey
+     * * nNew
+     * * nTried
+     * * number of "new" buckets
+     * * all nNew addrinfos in vvNew
+     * * all nTried addrinfos in vvTried
+     * * for each bucket:
+     *   * number of elements
+     *   * for each element: index
+     *
+     * Notice that vvTried, mapAddr and vVector are never encoded explicitly;
+     * they are instead reconstructed from the other information.
+     *
+     * vvNew is serialized, but only used if ADDRMAN_UNKOWN_BUCKET_COUNT didn't change,
+     * otherwise it is reconstructed as well.
+     *
+     * This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
+     * changes to the ADDRMAN_ parameters without breaking the on-disk structure.
+     *
+     * We don't use ADD_SERIALIZE_METHODS since the serialization and deserialization code has
+     * very little in common.
+     *
+     */
     template<typename Stream>
     void Serialize(Stream &s, int nType, int nVersionDummy) const
     {
@@ -394,13 +401,13 @@ class CAddrMan
          nNew = 0;
     }
 
-    // Return the number of (unique) addresses in all tables.
+    //! Return the number of (unique) addresses in all tables.
     int size()
     {
         return vRandom.size();
     }
 
-    // Consistency check
+    //! Consistency check
     void Check()
     {
 #ifdef DEBUG_ADDRMAN
@@ -413,7 +420,7 @@ class CAddrMan
 #endif
     }
 
-    // Add a single address.
+    //! Add a single address.
     bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
     {
         bool fRet = false;
@@ -428,7 +435,7 @@ class CAddrMan
         return fRet;
     }
 
-    // Add multiple addresses.
+    //! Add multiple addresses.
     bool Add(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64_t nTimePenalty = 0)
     {
         int nAdd = 0;
@@ -444,7 +451,7 @@ class CAddrMan
         return nAdd > 0;
     }
 
-    // Mark an entry as accessible.
+    //! Mark an entry as accessible.
     void Good(const CService &addr, int64_t nTime = GetAdjustedTime())
     {
         {
@@ -455,7 +462,7 @@ class CAddrMan
         }
     }
 
-    // Mark an entry as connection attempted to.
+    //! Mark an entry as connection attempted to.
     void Attempt(const CService &addr, int64_t nTime = GetAdjustedTime())
     {
         {
@@ -466,8 +473,10 @@ class CAddrMan
         }
     }
 
-    // Choose an address to connect to.
-    // nUnkBias determines how much "new" entries are favored over "tried" ones (0-100).
+    /**
+     * Choose an address to connect to.
+     * nUnkBias determines how much "new" entries are favored over "tried" ones (0-100).
+     */
     CAddress Select(int nUnkBias = 50)
     {
         CAddress addrRet;
@@ -480,7 +489,7 @@ class CAddrMan
         return addrRet;
     }
 
-    // Return a bunch of addresses, selected at random.
+    //! Return a bunch of addresses, selected at random.
     std::vector<CAddress> GetAddr()
     {
         Check();
@@ -493,7 +502,7 @@ class CAddrMan
         return vAddr;
     }
 
-    // Mark an entry as currently-connected-to.
+    //! Mark an entry as currently-connected-to.
     void Connected(const CService &addr, int64_t nTime = GetAdjustedTime())
     {
         {

From a31e8bad53e44629b26e7f36e0431b9fa01c1ed6 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Fri, 24 Oct 2014 16:13:41 +0200
Subject: [PATCH 0913/1819] Make CBlockIndex* returned by GetDepthInMainChain
 const.

Make the CBlockIndex* (optionally) returned by GetDepthInMainChain
const.  This prevents accidental modification.  The result is for
reading its properties rather than modifying it.
---
 src/wallet.cpp | 4 ++--
 src/wallet.h   | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 65944587f8b8..3812c22fe28e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2298,7 +2298,7 @@ int CMerkleTx::SetMerkleBranch(const CBlock& block)
     return chainActive.Height() - pindex->nHeight + 1;
 }
 
-int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
+int CMerkleTx::GetDepthInMainChainINTERNAL(const CBlockIndex* &pindexRet) const
 {
     if (hashBlock == 0 || nIndex == -1)
         return 0;
@@ -2324,7 +2324,7 @@ int CMerkleTx::GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const
     return chainActive.Height() - pindex->nHeight + 1;
 }
 
-int CMerkleTx::GetDepthInMainChain(CBlockIndex* &pindexRet) const
+int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const
 {
     AssertLockHeld(cs_main);
     int nResult = GetDepthInMainChainINTERNAL(pindexRet);
diff --git a/src/wallet.h b/src/wallet.h
index 06706655f8db..9b6895090c96 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -474,7 +474,7 @@ struct COutputEntry
 class CMerkleTx : public CTransaction
 {
 private:
-    int GetDepthInMainChainINTERNAL(CBlockIndex* &pindexRet) const;
+    int GetDepthInMainChainINTERNAL(const CBlockIndex* &pindexRet) const;
 
 public:
     uint256 hashBlock;
@@ -519,9 +519,9 @@ class CMerkleTx : public CTransaction
     // -1  : not in blockchain, and not in memory pool (conflicted transaction)
     //  0  : in memory pool, waiting to be included in a block
     // >=1 : this many blocks deep in the main chain
-    int GetDepthInMainChain(CBlockIndex* &pindexRet) const;
-    int GetDepthInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
-    bool IsInMainChain() const { CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
+    int GetDepthInMainChain(const CBlockIndex* &pindexRet) const;
+    int GetDepthInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
+    bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
     int GetBlocksToMaturity() const;
     bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
 };

From ec01243c14294c0e6f25d093156aae6b4458466e Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 23 Oct 2014 13:11:20 -0400
Subject: [PATCH 0914/1819] --tracerpc option for regression tests

Run tests with --tracerpc and all RPC calls will dump to the console.
Very helpful for debugging.
---
 qa/rpc-tests/test_framework.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index 5a185566553f..bd20d4c9fefb 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -48,9 +48,15 @@ def main(self):
                           help="Source directory containing bitcoind/bitcoin-cli (default: %default%)")
         parser.add_option("--tmpdir", dest="tmpdir", default=tempfile.mkdtemp(prefix="test"),
                           help="Root directory for datadirs")
+        parser.add_option("--tracerpc", dest="trace_rpc", default=False, action="store_true",
+                          help="Print out all RPC calls as they are made")
         self.add_options(parser)
         (self.options, self.args) = parser.parse_args()
 
+        if self.options.trace_rpc:
+            import logging
+            logging.basicConfig(level=logging.DEBUG)
+
         os.environ['PATH'] = self.options.srcdir+":"+os.environ['PATH']
 
         check_json_precision()

From 6261e6e6e0ae9860d322efe0f11d0960b300dad4 Mon Sep 17 00:00:00 2001
From: dexX7 <ugithub@bitwatch.co>
Date: Fri, 24 Oct 2014 15:43:40 +0200
Subject: [PATCH 0915/1819] getblockhash: throw JSONRPCError (not
 runtime_error)

---
 src/rpcblockchain.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5beac0512ab0..02b510aa41de 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -225,7 +225,7 @@ Value getblockhash(const Array& params, bool fHelp)
 
     int nHeight = params[0].get_int();
     if (nHeight < 0 || nHeight > chainActive.Height())
-        throw runtime_error("Block number out of range.");
+        throw JSONRPCError(RPC_INVALID_PARAMETER, "Block height out of range");
 
     CBlockIndex* pblockindex = chainActive[nHeight];
     return pblockindex->GetBlockHash().GetHex();

From 9f87325b220e6766ffee524ff54528d7bc2eb13f Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Fri, 24 Oct 2014 15:48:06 -0400
Subject: [PATCH 0916/1819] Start with tidier cache directories

Remove more files from the cached, 200-block-chain data directories.
---
 qa/rpc-tests/util.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 036ac577e6a2..276b5c635fe4 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -110,11 +110,14 @@ def initialize_chain(test_dir):
             rpcs[i].setgenerate(True, 25)
             sync_blocks(rpcs)
 
-        # Shut them down, and remove debug.logs:
+        # Shut them down, and clean up cache directories:
         stop_nodes(rpcs)
         wait_bitcoinds()
         for i in range(4):
-            os.remove(debug_log("cache", i))
+            os.remove(log_filename("cache", i, "debug.log"))
+            os.remove(log_filename("cache", i, "db.log"))
+            os.remove(log_filename("cache", i, "peers.dat"))
+            os.remove(log_filename("cache", i, "fee_estimates.dat"))
 
     for i in range(4):
         from_dir = os.path.join("cache", "node"+str(i))
@@ -167,8 +170,8 @@ def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
     if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
     return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
 
-def debug_log(dir, n_node):
-    return os.path.join(dir, "node"+str(n_node), "regtest", "debug.log")
+def log_filename(dir, n_node, logname):
+    return os.path.join(dir, "node"+str(n_node), "regtest", logname)
 
 def stop_node(node, i):
     node.stop()

From 7014f382e3fd99226b7d844984e50706e2f67247 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Wed, 22 Oct 2014 06:07:59 +0200
Subject: [PATCH 0917/1819] [Qt] Remove CAmount from BitcoinAmountField
 Q_PROPERTY

---
 src/qt/bitcoinamountfield.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index e52feeb46e88..040a2341776b 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -21,7 +21,9 @@ class BitcoinAmountField: public QWidget
 {
     Q_OBJECT
 
-    Q_PROPERTY(CAmount value READ value WRITE setValue NOTIFY valueChanged USER true)
+    // ugly hack: for some unknown reason CAmount (instead of qint64) does not work here as expected
+    // discussion: https://github.com/bitcoin/bitcoin/pull/5117
+    Q_PROPERTY(qint64 value READ value WRITE setValue NOTIFY valueChanged USER true)
 
 public:
     explicit BitcoinAmountField(QWidget *parent = 0);

From 2fdc3351d72af2ad26280cd0ca07c2ae4080db55 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 25 Oct 2014 16:46:54 +0800
Subject: [PATCH 0918/1819] Update comments in chain to be doxygen compatible

---
 src/chain.cpp |  5 ++--
 src/chain.h   | 75 ++++++++++++++++++++++++++-------------------------
 2 files changed, 42 insertions(+), 38 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index 56ed22ce71ea..e13c0478614b 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -7,8 +7,9 @@
 
 using namespace std;
 
-// CChain implementation
-
+/**
+ * CChain implementation
+ */
 void CChain::SetTip(CBlockIndex *pindex) {
     if (pindex == NULL) {
         vChain.clear();
diff --git a/src/chain.h b/src/chain.h
index 290150476e75..07e72d3498db 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -50,38 +50,40 @@ struct CDiskBlockPos
 };
 
 enum BlockStatus {
-    // Unused.
+    //! Unused.
     BLOCK_VALID_UNKNOWN      =    0,
 
-    // Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
+    //! Parsed, version ok, hash satisfies claimed PoW, 1 <= vtx count <= max, timestamp not in future
     BLOCK_VALID_HEADER       =    1,
 
-    // All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
-    // are also at least TREE.
+    //! All parent headers found, difficulty matches, timestamp >= median previous, checkpoint. Implies all parents
+    //! are also at least TREE.
     BLOCK_VALID_TREE         =    2,
 
-    // Only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids,
-    // sigops, size, merkle root. Implies all parents are at least TREE but not necessarily TRANSACTIONS. When all
-    // parent blocks also have TRANSACTIONS, CBlockIndex::nChainTx will be set.
+    /**
+     * Only first tx is coinbase, 2 <= coinbase input script length <= 100, transactions valid, no duplicate txids,
+     * sigops, size, merkle root. Implies all parents are at least TREE but not necessarily TRANSACTIONS. When all
+     * parent blocks also have TRANSACTIONS, CBlockIndex::nChainTx will be set.
+     */
     BLOCK_VALID_TRANSACTIONS =    3,
 
-    // Outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30.
-    // Implies all parents are also at least CHAIN.
+    //! Outputs do not overspend inputs, no double spends, coinbase output ok, immature coinbase spends, BIP30.
+    //! Implies all parents are also at least CHAIN.
     BLOCK_VALID_CHAIN        =    4,
 
-    // Scripts & signatures ok. Implies all parents are also at least SCRIPTS.
+    //! Scripts & signatures ok. Implies all parents are also at least SCRIPTS.
     BLOCK_VALID_SCRIPTS      =    5,
 
-    // All validity bits.
+    //! All validity bits.
     BLOCK_VALID_MASK         =   BLOCK_VALID_HEADER | BLOCK_VALID_TREE | BLOCK_VALID_TRANSACTIONS |
                                  BLOCK_VALID_CHAIN | BLOCK_VALID_SCRIPTS,
 
-    BLOCK_HAVE_DATA          =    8, // full block available in blk*.dat
-    BLOCK_HAVE_UNDO          =   16, // undo data available in rev*.dat
+    BLOCK_HAVE_DATA          =    8, //! full block available in blk*.dat
+    BLOCK_HAVE_UNDO          =   16, //! undo data available in rev*.dat
     BLOCK_HAVE_MASK          =   BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO,
 
-    BLOCK_FAILED_VALID       =   32, // stage after last reached validness failed
-    BLOCK_FAILED_CHILD       =   64, // descends from failed block
+    BLOCK_FAILED_VALID       =   32, //! stage after last reached validness failed
+    BLOCK_FAILED_CHILD       =   64, //! descends from failed block
     BLOCK_FAILED_MASK        =   BLOCK_FAILED_VALID | BLOCK_FAILED_CHILD,
 };
 
@@ -93,49 +95,50 @@ enum BlockStatus {
 class CBlockIndex
 {
 public:
-    // pointer to the hash of the block, if any. memory is owned by this CBlockIndex
+    //! pointer to the hash of the block, if any. memory is owned by this CBlockIndex
     const uint256* phashBlock;
 
-    // pointer to the index of the predecessor of this block
+    //! pointer to the index of the predecessor of this block
     CBlockIndex* pprev;
 
-    // pointer to the index of some further predecessor of this block
+    //! pointer to the index of some further predecessor of this block
     CBlockIndex* pskip;
 
-    // height of the entry in the chain. The genesis block has height 0
+    //! height of the entry in the chain. The genesis block has height 0
     int nHeight;
 
-    // Which # file this block is stored in (blk?????.dat)
+    //! Which # file this block is stored in (blk?????.dat)
     int nFile;
 
-    // Byte offset within blk?????.dat where this block's data is stored
+    //! Byte offset within blk?????.dat where this block's data is stored
     unsigned int nDataPos;
 
-    // Byte offset within rev?????.dat where this block's undo data is stored
+    //! Byte offset within rev?????.dat where this block's undo data is stored
     unsigned int nUndoPos;
 
-    // (memory only) Total amount of work (expected number of hashes) in the chain up to and including this block
+    //! (memory only) Total amount of work (expected number of hashes) in the chain up to and including this block
     uint256 nChainWork;
 
-    // Number of transactions in this block.
-    // Note: in a potential headers-first mode, this number cannot be relied upon
+    //! Number of transactions in this block.
+    //! Note: in a potential headers-first mode, this number cannot be relied upon
     unsigned int nTx;
 
-    // (memory only) Number of transactions in the chain up to and including this block.
-    // This value will be non-zero only if and only if transactions for this block and all its parents are available.
-    unsigned int nChainTx; // change to 64-bit type when necessary; won't happen before 2030
+    //! (memory only) Number of transactions in the chain up to and including this block.
+    //! This value will be non-zero only if and only if transactions for this block and all its parents are available.
+    //! Change to 64-bit type when necessary; won't happen before 2030
+    unsigned int nChainTx;
 
-    // Verification status of this block. See enum BlockStatus
+    //! Verification status of this block. See enum BlockStatus
     unsigned int nStatus;
 
-    // block header
+    //! block header
     int nVersion;
     uint256 hashMerkleRoot;
     unsigned int nTime;
     unsigned int nBits;
     unsigned int nNonce;
 
-    // (memory only) Sequencial id assigned to distinguish order in which blocks are received.
+    //! (memory only) Sequential id assigned to distinguish order in which blocks are received.
     uint32_t nSequenceId;
 
     void SetNull()
@@ -254,7 +257,7 @@ class CBlockIndex
             GetBlockHash().ToString());
     }
 
-    // Check whether this block index entry is valid up to the passed validity level.
+    //! Check whether this block index entry is valid up to the passed validity level.
     bool IsValid(enum BlockStatus nUpTo = BLOCK_VALID_TRANSACTIONS) const
     {
         assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
@@ -263,8 +266,8 @@ class CBlockIndex
         return ((nStatus & BLOCK_VALID_MASK) >= nUpTo);
     }
 
-    // Raise the validity level of this block index entry.
-    // Returns true if the validity was changed.
+    //! Raise the validity level of this block index entry.
+    //! Returns true if the validity was changed.
     bool RaiseValidity(enum BlockStatus nUpTo)
     {
         assert(!(nUpTo & ~BLOCK_VALID_MASK)); // Only validity flags allowed.
@@ -277,10 +280,10 @@ class CBlockIndex
         return false;
     }
 
-    // Build the skiplist pointer for this entry.
+    //! Build the skiplist pointer for this entry.
     void BuildSkip();
 
-    // Efficiently find an ancestor of this block.
+    //! Efficiently find an ancestor of this block.
     CBlockIndex* GetAncestor(int height);
     const CBlockIndex* GetAncestor(int height) const;
 };

From f2e03ffae92ec1333c0eb724835ad56138f54716 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sat, 25 Oct 2014 17:24:16 +0800
Subject: [PATCH 0919/1819] Update comments in chainparams to be doxygen
 compatible

---
 src/chainparams.cpp     | 91 ++++++++++++++++++++++-------------------
 src/chainparams.h       | 40 +++++++++---------
 src/chainparamsbase.cpp | 27 ++++++------
 src/chainparamsbase.h   |  2 +-
 src/chainparamsseeds.h  | 11 +++--
 5 files changed, 90 insertions(+), 81 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 1ab292517a42..9ffc369b405c 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chainparams.h"
@@ -23,11 +23,11 @@ struct SeedSpec6 {
 
 #include "chainparamsseeds.h"
 
-//
-// Main network
-//
+/**
+ * Main network
+ */
 
-// Convert the pnSeeds6 array into usable address objects.
+//! Convert the pnSeeds6 array into usable address objects.
 static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data, unsigned int count)
 {
     // It'll only connect to one or two seed nodes because once it connects,
@@ -45,11 +45,13 @@ static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data
     }
 }
 
-    // What makes a good checkpoint block?
-    // + Is surrounded by blocks with reasonable timestamps
-    //   (no blocks before with a timestamp after, none after with
-    //    timestamp before)
-    // + Contains no strange transactions
+/**
+ * What makes a good checkpoint block?
+ * + Is surrounded by blocks with reasonable timestamps
+ *   (no blocks before with a timestamp after, none after with
+ *    timestamp before)
+ * + Contains no strange transactions
+ */
 static Checkpoints::MapCheckpoints mapCheckpoints =
         boost::assign::map_list_of
         ( 11111, uint256("0x0000000069e244f73d78e8fd29ba2fd2ed618bd6fa2ee92559f542fdb26e7c1d"))
@@ -101,9 +103,11 @@ class CMainParams : public CChainParams {
     CMainParams() {
         networkID = CBaseChainParams::MAIN;
         strNetworkID = "main";
-        // The message start string is designed to be unlikely to occur in normal data.
-        // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
-        // a large 4-byte int at any alignment.
+        /** 
+         * The message start string is designed to be unlikely to occur in normal data.
+         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
+         * a large 4-byte int at any alignment.
+         */
         pchMessageStart[0] = 0xf9;
         pchMessageStart[1] = 0xbe;
         pchMessageStart[2] = 0xb4;
@@ -119,14 +123,16 @@ class CMainParams : public CChainParams {
         nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
         nTargetSpacing = 10 * 60;
 
-        // Build the genesis block. Note that the output of the genesis coinbase cannot
-        // be spent as it did not originally exist in the database.
-        //
-        // CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
-        //   CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
-        //     CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
-        //     CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
-        //   vMerkleTree: 4a5e1e
+        /**
+         * Build the genesis block. Note that the output of the genesis coinbase cannot
+         * be spent as it did not originally exist in the database.
+         * 
+         * CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
+         *   CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
+         *     CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
+         *     CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
+         *   vMerkleTree: 4a5e1e
+         */
         const char* pszTimestamp = "The Times 03/Jan/2009 Chancellor on brink of second bailout for banks";
         CMutableTransaction txNew;
         txNew.vin.resize(1);
@@ -178,18 +184,19 @@ class CMainParams : public CChainParams {
 };
 static CMainParams mainParams;
 
-//
-// Testnet (v3)
-//
-
+/**
+ * Testnet (v3)
+ */
 class CTestNetParams : public CMainParams {
 public:
     CTestNetParams() {
         networkID = CBaseChainParams::TESTNET;
         strNetworkID = "test";
-        // The message start string is designed to be unlikely to occur in normal data.
-        // The characters are rarely used upper ASCII, not valid as UTF-8, and produce
-        // a large 4-byte int at any alignment.
+        /** 
+         * The message start string is designed to be unlikely to occur in normal data.
+         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
+         * a large 4-byte int at any alignment.
+         */
         pchMessageStart[0] = 0x0b;
         pchMessageStart[1] = 0x11;
         pchMessageStart[2] = 0x09;
@@ -200,10 +207,10 @@ class CTestNetParams : public CMainParams {
         nRejectBlockOutdatedMajority = 75;
         nToCheckBlockUpgradeMajority = 100;
         nMinerThreads = 0;
-        nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+        nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks
         nTargetSpacing = 10 * 60;
 
-        // Modify the testnet genesis block so the timestamp is valid for a later start.
+        //! Modify the testnet genesis block so the timestamp is valid for a later start.
         genesis.nTime = 1296688602;
         genesis.nNonce = 414098458;
         hashGenesisBlock = genesis.GetHash();
@@ -239,9 +246,9 @@ class CTestNetParams : public CMainParams {
 };
 static CTestNetParams testNetParams;
 
-//
-// Regression test
-//
+/**
+ * Regression test
+ */
 class CRegTestParams : public CTestNetParams {
 public:
     CRegTestParams() {
@@ -256,7 +263,7 @@ class CRegTestParams : public CTestNetParams {
         nRejectBlockOutdatedMajority = 950;
         nToCheckBlockUpgradeMajority = 1000;
         nMinerThreads = 1;
-        nTargetTimespan = 14 * 24 * 60 * 60; // two weeks
+        nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks
         nTargetSpacing = 10 * 60;
         bnProofOfWorkLimit = ~uint256(0) >> 1;
         genesis.nTime = 1296688602;
@@ -266,8 +273,8 @@ class CRegTestParams : public CTestNetParams {
         nDefaultPort = 18444;
         assert(hashGenesisBlock == uint256("0x0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"));
 
-        vFixedSeeds.clear(); // Regtest mode doesn't have any fixed seeds.
-        vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
+        vFixedSeeds.clear(); //! Regtest mode doesn't have any fixed seeds.
+        vSeeds.clear();  //! Regtest mode doesn't have any DNS seeds.
 
         fRequireRPCPassword = false;
         fMiningRequiresPeers = false;
@@ -284,17 +291,17 @@ class CRegTestParams : public CTestNetParams {
 };
 static CRegTestParams regTestParams;
 
-//
-// Unit test
-//
+/**
+ * Unit test
+ */
 class CUnitTestParams : public CMainParams, public CModifiableParams {
 public:
     CUnitTestParams() {
         networkID = CBaseChainParams::UNITTEST;
         strNetworkID = "unittest";
         nDefaultPort = 18445;
-        vFixedSeeds.clear();
-        vSeeds.clear();  // Regtest mode doesn't have any DNS seeds.
+        vFixedSeeds.clear(); //! Unit test mode doesn't have any fixed seeds.
+        vSeeds.clear();  //! Unit test mode doesn't have any DNS seeds.
 
         fRequireRPCPassword = false;
         fMiningRequiresPeers = false;
@@ -309,7 +316,7 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
         return data;
     }
 
-    // Published setters to allow changing values in unit test cases
+    //! Published setters to allow changing values in unit test cases
     virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval)  { nSubsidyHalvingInterval=anSubsidyHalvingInterval; }
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
     virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
diff --git a/src/chainparams.h b/src/chainparams.h
index f157419bb26f..6eba970cccb2 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CHAIN_PARAMS_H
@@ -47,34 +47,33 @@ class CChainParams
     int GetDefaultPort() const { return nDefaultPort; }
     const uint256& ProofOfWorkLimit() const { return bnProofOfWorkLimit; }
     int SubsidyHalvingInterval() const { return nSubsidyHalvingInterval; }
-    /* Used to check majorities for block version upgrade */
+    /** Used to check majorities for block version upgrade */
     int EnforceBlockUpgradeMajority() const { return nEnforceBlockUpgradeMajority; }
     int RejectBlockOutdatedMajority() const { return nRejectBlockOutdatedMajority; }
     int ToCheckBlockUpgradeMajority() const { return nToCheckBlockUpgradeMajority; }
 
-    /* Used if GenerateBitcoins is called with a negative number of threads */
+    /** Used if GenerateBitcoins is called with a negative number of threads */
     int DefaultMinerThreads() const { return nMinerThreads; }
     const CBlock& GenesisBlock() const { return genesis; }
     bool RequireRPCPassword() const { return fRequireRPCPassword; }
-    /* Make miner wait to have peers to avoid wasting work */
+    /** Make miner wait to have peers to avoid wasting work */
     bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
-    /* Default value for -checkmempool argument */
+    /** Default value for -checkmempool argument */
     bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
-    /* Allow mining of a min-difficulty block */
+    /** Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
-    /* Skip proof-of-work check: allow mining of any difficulty block */
+    /** Skip proof-of-work check: allow mining of any difficulty block */
     bool SkipProofOfWorkCheck() const { return fSkipProofOfWorkCheck; }
-    /* Make standard checks */
+    /** Make standard checks */
     bool RequireStandard() const { return fRequireStandard; }
     int64_t TargetTimespan() const { return nTargetTimespan; }
     int64_t TargetSpacing() const { return nTargetSpacing; }
     int64_t Interval() const { return nTargetTimespan / nTargetSpacing; }
-    /* Make miner stop after a block is found. In RPC, don't return
-     * until nGenProcLimit blocks are generated */
+    /** Make miner stop after a block is found. In RPC, don't return until nGenProcLimit blocks are generated */
     bool MineBlocksOnDemand() const { return fMineBlocksOnDemand; }
-    /* In the future use NetworkIDString() for RPC fields */
+    /** In the future use NetworkIDString() for RPC fields */
     bool TestnetToBeDeprecatedFieldRPC() const { return fTestnetToBeDeprecatedFieldRPC; }
-    /* Return the BIP70 network string (main, test or regtest) */
+    /** Return the BIP70 network string (main, test or regtest) */
     std::string NetworkIDString() const { return strNetworkID; }
     const std::vector<CDNSSeedData>& DNSSeeds() const { return vSeeds; }
     const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
@@ -85,7 +84,7 @@ class CChainParams
 
     uint256 hashGenesisBlock;
     MessageStartChars pchMessageStart;
-    // Raw pub key bytes for the broadcast alert signing key.
+    //! Raw pub key bytes for the broadcast alert signing key.
     std::vector<unsigned char> vAlertPubKey;
     int nDefaultPort;
     uint256 bnProofOfWorkLimit;
@@ -112,14 +111,15 @@ class CChainParams
     bool fTestnetToBeDeprecatedFieldRPC;
 };
 
-/** Modifiable parameters interface is used by test cases to adapt the parameters in order
-*** to test specific features more easily. Test cases should always restore the previous
-*** values after finalization.
-**/
+/** 
+ * Modifiable parameters interface is used by test cases to adapt the parameters in order
+ * to test specific features more easily. Test cases should always restore the previous
+ * values after finalization.
+ */
 
 class CModifiableParams {
 public:
-    // Published setters to allow changing values in unit test cases
+    //! Published setters to allow changing values in unit test cases
     virtual void setSubsidyHalvingInterval(int anSubsidyHalvingInterval) =0;
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0;
     virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0;
@@ -139,7 +139,7 @@ const CChainParams &Params();
 /** Return parameters for the given network. */
 CChainParams &Params(CBaseChainParams::Network network);
 
-/** Get modifyable network parameters (UNITTEST only) */
+/** Get modifiable network parameters (UNITTEST only) */
 CModifiableParams *ModifiableParams();
 
 /** Sets the params returned by Params() to those for the given network. */
diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 5d9ec7927bb6..8646a31603c0 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chainparamsbase.h"
@@ -13,10 +13,9 @@
 
 using namespace boost::assign;
 
-//
-// Main network
-//
-
+/**
+ * Main network
+ */
 class CBaseMainParams : public CBaseChainParams
 {
 public:
@@ -28,9 +27,9 @@ class CBaseMainParams : public CBaseChainParams
 };
 static CBaseMainParams mainParams;
 
-//
-// Testnet (v3)
-//
+/**
+ * Testnet (v3)
+ */
 class CBaseTestNetParams : public CBaseMainParams
 {
 public:
@@ -43,9 +42,9 @@ class CBaseTestNetParams : public CBaseMainParams
 };
 static CBaseTestNetParams testNetParams;
 
-//
-// Regression test
-//
+/*
+ * Regression test
+ */
 class CBaseRegTestParams : public CBaseTestNetParams
 {
 public:
@@ -57,9 +56,9 @@ class CBaseRegTestParams : public CBaseTestNetParams
 };
 static CBaseRegTestParams regTestParams;
 
-//
-// Unit test
-//
+/*
+ * Unit test
+ */
 class CBaseUnitTestParams : public CBaseMainParams
 {
 public:
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 911d1181acf8..4042b8c879bc 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CHAIN_PARAMS_BASE_H
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
index 3f3278361eb6..c3323c48bd5d 100644
--- a/src/chainparamsseeds.h
+++ b/src/chainparamsseeds.h
@@ -1,10 +1,13 @@
 #ifndef H_CHAINPARAMSSEEDS
 #define H_CHAINPARAMSSEEDS
-// List of fixed seed nodes for the bitcoin network
-// AUTOGENERATED by contrib/devtools/generate-seeds.py
 
-// Each line contains a 16-byte IPv6 address and a port.
-// IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
+/**
+ * List of fixed seed nodes for the bitcoin network
+ * AUTOGENERATED by contrib/devtools/generate-seeds.py
+ * 
+ * Each line contains a 16-byte IPv6 address and a port.
+ * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
+ */
 static SeedSpec6 pnSeed6_main[] = {
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x6a,0x7e}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd1,0x04,0x7d}, 8333},

From d752ba86c1872f64a4641cf77008826d32bde65f Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 8 Oct 2014 16:29:45 -0700
Subject: [PATCH 0920/1819] Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2)

---
 src/script/interpreter.cpp        |  4 ++++
 src/script/interpreter.h          |  3 +++
 src/script/script.cpp             |  2 +-
 src/script/script.h               |  2 +-
 src/test/data/script_invalid.json | 18 ++++++++++++++++++
 src/test/data/script_valid.json   | 12 ++++++++++++
 src/test/script_tests.cpp         | 23 +++++++++++++++++++++--
 src/test/transaction_tests.cpp    |  1 +
 8 files changed, 61 insertions(+), 4 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index cd73b88210c0..e463de8cc270 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -980,6 +980,10 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec
 
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker)
 {
+    if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) != 0 && !scriptSig.IsPushOnly()) {
+        return false;
+    }
+
     vector<vector<unsigned char> > stack, stackCopy;
     if (!EvalScript(stack, scriptSig, flags, checker))
         return false;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index de5ce2ced1a3..085cd867dac9 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -46,6 +46,9 @@ enum
 
     // verify dummy stack item consumed by CHECKMULTISIG is of zero-length (softfork safe, BIP62 rule 7).
     SCRIPT_VERIFY_NULLDUMMY = (1U << 4),
+
+    // Using a non-push operator in the scriptSig causes script failure (softfork safe, BIP62 rule 2).
+    SCRIPT_VERIFY_SIGPUSHONLY = (1U << 5),
 };
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 3e19d0c2bf04..bbcfe9dfdd51 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -230,7 +230,7 @@ bool CScript::IsPushOnly() const
             return false;
         // Note that IsPushOnly() *does* consider OP_RESERVED to be a
         // push-type opcode, however execution of OP_RESERVED fails, so
-        // it's not relevant to P2SH as the scriptSig would fail prior to
+        // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
         // the P2SH special validation code being executed.
         if (opcode > OP_16)
             return false;
diff --git a/src/script/script.h b/src/script/script.h
index d450db5cad93..706a85a29b97 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -551,7 +551,7 @@ class CScript : public std::vector<unsigned char>
 
     bool IsPayToScriptHash() const;
 
-    // Called by IsStandardTx and P2SH VerifyScript (which makes it consensus-critical).
+    // Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
     bool IsPushOnly() const;
 
     // Called by IsStandardTx.
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index b6447cb2213f..e4dd8fe9aad5 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -504,6 +504,24 @@ nSequences are max.
     "NULLDUMMY",
     "3-of-3 NOT with invalid sig with nonzero dummy"
 ],
+[
+    "0 0x47 0x3044022035341cc377b19138f944f90c45772cb06338c6d56a4c0c31a65bf1a8a105fadc022046dd232850b6bacb25879c9da82a7a628982aa19d055f1753468f68047662e0301 DUP",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
+    "SIGPUSHONLY",
+    "2-of-2 with two identical keys and sigs pushed using OP_DUP"
+],
+[
+    "0x47 0x304402204d8b99eea2f53382fd67e0dbc8ed0596bd614aa0dad6bc6843c7860c79b901c3022062f022a71993013e3d9b22302a8e4b40109d7bb057aeb250b9aab2197b3e96b801 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+    "",
+    "P2SH(P2PK) with non-push scriptSig but no SIGPUSHONLY"
+],
+[
+    "0x47 0x30440220078c887c33abc67fbbd827ceb3f661c1c459e78218161b652f23e3ca76cfabbd022047df245eacb8a88d8c5ca7b5228e3b4d070c102d2f542433362d3f443cd24eda01 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
+    "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+    "SIGPUSHONLY",
+    "P2SH(P2PK) with non-push scriptSig"
+],
 
 ["The End"]
 ]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 88bec7238c77..f7d153169860 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -649,6 +649,18 @@ nSequences are max.
     "",
     "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY"
 ],
+[
+    "0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 DUP",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
+    "",
+    "2-of-2 with two identical keys and sigs pushed using OP_DUP but no SIGPUSHONLY"
+],
+[
+    "0 0x47 0x304402203acf75dd59bbef171aeeedae4f1020b824195820db82575c2b323b8899f95de9022067df297d3a5fad049ba0bb81255d0e495643cbcf9abae9e396988618bc0c6dfe01 0x47 0x304402205f8b859230c1cab7d4e8de38ff244d2ebe046b64e8d3f4219b01e483c203490a022071bdc488e31b557f7d9e5c8a8bec90dc92289ca70fa317685f4f140e38b30c4601",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
+    "SIGPUSHONLY",
+    "2-of-2 with two identical keys and sigs pushed"
+],
 
 ["The End"]
 ]
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index d3fc673a7934..07291190177c 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2011-2013 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2011-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.
 
 #include "data/script_invalid.json.h"
@@ -171,12 +171,14 @@ class TestBuilder
 
     TestBuilder& Add(const CScript& script)
     {
+        DoPush();
         spendTx.vin[0].scriptSig += script;
         return *this;
     }
 
     TestBuilder& Num(int num)
     {
+        DoPush();
         spendTx.vin[0].scriptSig << CScriptNum(num);
         return *this;
     }
@@ -402,6 +404,23 @@ BOOST_AUTO_TEST_CASE(script_build)
                               "3-of-3 NOT with invalid sig with nonzero dummy", SCRIPT_VERIFY_NULLDUMMY
                              ).Num(1).PushSig(keys.key0).PushSig(keys.key1).PushSig(keys.key2).DamagePush(10));
 
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey1C) << OP_2 << OP_CHECKMULTISIG,
+                               "2-of-2 with two identical keys and sigs pushed using OP_DUP but no SIGPUSHONLY", 0
+                              ).Num(0).PushSig(keys.key1).Add(CScript() << OP_DUP));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey1C) << OP_2 << OP_CHECKMULTISIG,
+                              "2-of-2 with two identical keys and sigs pushed using OP_DUP", SCRIPT_VERIFY_SIGPUSHONLY
+                             ).Num(0).PushSig(keys.key1).Add(CScript() << OP_DUP));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG,
+                              "P2SH(P2PK) with non-push scriptSig but no SIGPUSHONLY", 0
+                             ).PushSig(keys.key2).PushRedeem());
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG,
+                              "P2SH(P2PK) with non-push scriptSig", SCRIPT_VERIFY_SIGPUSHONLY
+                             ).PushSig(keys.key2).PushRedeem());
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey1C) << OP_2 << OP_CHECKMULTISIG,
+                               "2-of-2 with two identical keys and sigs pushed", SCRIPT_VERIFY_SIGPUSHONLY
+                              ).Num(0).PushSig(keys.key1).PushSig(keys.key1));
+
+
     std::map<std::string, Array> tests_good;
     std::map<std::string, Array> tests_bad;
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 41ccaaac9452..9209c6697fad 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -33,6 +33,7 @@ static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
     (string("STRICTENC"), (unsigned int)SCRIPT_VERIFY_STRICTENC)
     (string("DERSIG"), (unsigned int)SCRIPT_VERIFY_DERSIG)
     (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
+    (string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY)
     (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY);
 
 unsigned int ParseScriptFlags(string strFlags)

From 698c6abb25c1fbbc7fa4ba46b60e9f17d97332ef Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 8 Oct 2014 18:48:59 -0700
Subject: [PATCH 0921/1819] Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4)

Also use the new flag as a standard rule, and replace the IsCanonicalPush
standardness check with it (as it is more complete).
---
 src/main.cpp                      |  4 ---
 src/script/interpreter.cpp        | 51 ++++++++++++++++++++++++-------
 src/script/interpreter.h          |  7 +++++
 src/script/script.cpp             | 29 +-----------------
 src/script/script.h               | 18 ++++++-----
 src/script/standard.h             |  1 +
 src/test/data/script_invalid.json |  4 +++
 src/test/data/script_valid.json   | 31 +++++++++++++++++--
 src/test/script_tests.cpp         | 10 +++---
 src/test/scriptnum_tests.cpp      |  4 +--
 src/test/transaction_tests.cpp    |  1 +
 11 files changed, 101 insertions(+), 59 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0cfe90beda1d..008a0591032b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -633,10 +633,6 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
             reason = "scriptsig-not-pushonly";
             return false;
         }
-        if (!txin.scriptSig.HasCanonicalPushes()) {
-            reason = "scriptsig-non-canonical-push";
-            return false;
-        }
     }
 
     unsigned int nDataOut = 0;
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index e463de8cc270..11c909472a0c 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -157,6 +157,29 @@ bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags) {
     return true;
 }
 
+bool static CheckMinimalPush(const valtype& data, opcodetype opcode) {
+    if (data.size() == 0) {
+        // Could have used OP_0.
+        return opcode == OP_0;
+    } else if (data.size() == 1 && data[0] >= 1 && data[0] <= 16) {
+        // Could have used OP_1 .. OP_16.
+        return opcode == OP_1 + (data[0] - 1);
+    } else if (data.size() == 1 && data[0] == 0x81) {
+        // Could have used OP_1NEGATE.
+        return opcode == OP_1NEGATE;
+    } else if (data.size() <= 75) {
+        // Could have used a direct push (opcode indicating number of bytes pushed + those bytes).
+        return opcode == data.size();
+    } else if (data.size() <= 255) {
+        // Could have used OP_PUSHDATA.
+        return opcode == OP_PUSHDATA1;
+    } else if (data.size() <= 65535) {
+        // Could have used OP_PUSHDATA2.
+        return opcode == OP_PUSHDATA2;
+    }
+    return true;
+}
+
 bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker)
 {
     CScript::const_iterator pc = script.begin();
@@ -169,6 +192,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
     if (script.size() > 10000)
         return false;
     int nOpCount = 0;
+    bool fRequireMinimal = (flags & SCRIPT_VERIFY_MINIMALDATA) != 0;
 
     try
     {
@@ -205,9 +229,12 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 opcode == OP_RSHIFT)
                 return false; // Disabled opcodes.
 
-            if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4)
+            if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) {
+                if (fRequireMinimal && !CheckMinimalPush(vchPushValue, opcode)) {
+                    return false;
+                }
                 stack.push_back(vchPushValue);
-            else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
+            } else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
             switch (opcode)
             {
                 //
@@ -234,6 +261,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // ( -- value)
                     CScriptNum bn((int)opcode - (int)(OP_1 - 1));
                     stack.push_back(bn.getvch());
+                    // The result of these opcodes should always be the minimal way to push the data
+                    // they push, so no need for a CheckMinimalPush here.
                 }
                 break;
 
@@ -458,7 +487,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
                     if (stack.size() < 2)
                         return false;
-                    int n = CScriptNum(stacktop(-1)).getint();
+                    int n = CScriptNum(stacktop(-1), fRequireMinimal).getint();
                     popstack(stack);
                     if (n < 0 || n >= (int)stack.size())
                         return false;
@@ -557,7 +586,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (in -- out)
                     if (stack.size() < 1)
                         return false;
-                    CScriptNum bn(stacktop(-1));
+                    CScriptNum bn(stacktop(-1), fRequireMinimal);
                     switch (opcode)
                     {
                     case OP_1ADD:       bn += bnOne; break;
@@ -590,8 +619,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (x1 x2 -- out)
                     if (stack.size() < 2)
                         return false;
-                    CScriptNum bn1(stacktop(-2));
-                    CScriptNum bn2(stacktop(-1));
+                    CScriptNum bn1(stacktop(-2), fRequireMinimal);
+                    CScriptNum bn2(stacktop(-1), fRequireMinimal);
                     CScriptNum bn(0);
                     switch (opcode)
                     {
@@ -635,9 +664,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (x min max -- out)
                     if (stack.size() < 3)
                         return false;
-                    CScriptNum bn1(stacktop(-3));
-                    CScriptNum bn2(stacktop(-2));
-                    CScriptNum bn3(stacktop(-1));
+                    CScriptNum bn1(stacktop(-3), fRequireMinimal);
+                    CScriptNum bn2(stacktop(-2), fRequireMinimal);
+                    CScriptNum bn3(stacktop(-1), fRequireMinimal);
                     bool fValue = (bn2 <= bn1 && bn1 < bn3);
                     popstack(stack);
                     popstack(stack);
@@ -727,7 +756,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     if ((int)stack.size() < i)
                         return false;
 
-                    int nKeysCount = CScriptNum(stacktop(-i)).getint();
+                    int nKeysCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
                     if (nKeysCount < 0 || nKeysCount > 20)
                         return false;
                     nOpCount += nKeysCount;
@@ -738,7 +767,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     if ((int)stack.size() < i)
                         return false;
 
-                    int nSigsCount = CScriptNum(stacktop(-i)).getint();
+                    int nSigsCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
                     if (nSigsCount < 0 || nSigsCount > nKeysCount)
                         return false;
                     int isig = ++i;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 085cd867dac9..5133c80aabc7 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -49,6 +49,13 @@ enum
 
     // Using a non-push operator in the scriptSig causes script failure (softfork safe, BIP62 rule 2).
     SCRIPT_VERIFY_SIGPUSHONLY = (1U << 5),
+
+    // Require minimal encodings for all push operations (OP_0... OP_16, OP_1NEGATE where possible, direct
+    // pushes up to 75 bytes, OP_PUSHDATA up to 255 bytes, OP_PUSHDATA2 for anything larger). Evaluating
+    // any other push causes the script to fail (BIP62 rule 3).
+    // In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4).
+    // (softfork safe)
+    SCRIPT_VERIFY_MINIMALDATA = (1U << 6)
 };
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
diff --git a/src/script/script.cpp b/src/script/script.cpp
index bbcfe9dfdd51..b879d72d6b96 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -12,7 +12,7 @@ namespace {
 inline std::string ValueString(const std::vector<unsigned char>& vch)
 {
     if (vch.size() <= 4)
-        return strprintf("%d", CScriptNum(vch).getint());
+        return strprintf("%d", CScriptNum(vch, false).getint());
     else
         return HexStr(vch);
 }
@@ -238,33 +238,6 @@ bool CScript::IsPushOnly() const
     return true;
 }
 
-bool CScript::HasCanonicalPushes() const
-{
-    const_iterator pc = begin();
-    while (pc < end())
-    {
-        opcodetype opcode;
-        std::vector<unsigned char> data;
-        if (!GetOp(pc, opcode, data))
-            return false;
-        if (opcode > OP_16)
-            continue;
-        if (opcode < OP_PUSHDATA1 && opcode > OP_0 && (data.size() == 1 && data[0] <= 16))
-            // Could have used an OP_n code, rather than a 1-byte push.
-            return false;
-        if (opcode == OP_PUSHDATA1 && data.size() < OP_PUSHDATA1)
-            // Could have used a normal n-byte push, rather than OP_PUSHDATA1.
-            return false;
-        if (opcode == OP_PUSHDATA2 && data.size() <= 0xFF)
-            // Could have used an OP_PUSHDATA1.
-            return false;
-        if (opcode == OP_PUSHDATA4 && data.size() <= 0xFFFF)
-            // Could have used an OP_PUSHDATA2.
-            return false;
-    }
-    return true;
-}
-
 std::string CScript::ToString() const
 {
     std::string str;
diff --git a/src/script/script.h b/src/script/script.h
index 706a85a29b97..e97967dcea64 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -192,10 +192,14 @@ class CScriptNum
         m_value = n;
     }
 
-    explicit CScriptNum(const std::vector<unsigned char>& vch)
+    explicit CScriptNum(const std::vector<unsigned char>& vch, bool fRequireMinimal)
     {
-        if (vch.size() > nMaxNumSize)
-            throw scriptnum_error("CScriptNum(const std::vector<unsigned char>&) : overflow");
+        if (vch.size() > nMaxNumSize) {
+            throw scriptnum_error("script number overflow");
+        }
+        if (fRequireMinimal && vch.size() > 0 && (vch.back() & 0x7f) == 0 && (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0)) {
+            throw scriptnum_error("non-minimally encoded script number");
+        }
         m_value = set_vch(vch);
     }
 
@@ -319,7 +323,6 @@ class CScriptNum
     int64_t m_value;
 };
 
-
 /** Serialized script, used inside transaction inputs and outputs */
 class CScript : public std::vector<unsigned char>
 {
@@ -330,6 +333,10 @@ class CScript : public std::vector<unsigned char>
         {
             push_back(n + (OP_1 - 1));
         }
+        else if (n == 0)
+        {
+            push_back(OP_0);
+        }
         else
         {
             *this << CScriptNum::serialize(n);
@@ -554,9 +561,6 @@ class CScript : public std::vector<unsigned char>
     // Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
     bool IsPushOnly() const;
 
-    // Called by IsStandardTx.
-    bool HasCanonicalPushes() const;
-
     // Returns whether the script is guaranteed to fail at execution,
     // regardless of the initial stack. This allows outputs to be pruned
     // instantly when entering the UTXO set.
diff --git a/src/script/standard.h b/src/script/standard.h
index 961b214c8949..248b941a64ac 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -41,6 +41,7 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
 // blocks and we must accept those blocks.
 static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
                                                          SCRIPT_VERIFY_STRICTENC |
+                                                         SCRIPT_VERIFY_MINIMALDATA |
                                                          SCRIPT_VERIFY_NULLDUMMY;
 
 // For convenience, standard but not mandatory verify flags.
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index e4dd8fe9aad5..5ead65f17f12 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -384,6 +384,10 @@ nSequences are max.
 
 ["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
+["1 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
+["1 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
+["1 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
+
 [
     "0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index f7d153169860..89619a9ddc17 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -529,6 +529,33 @@ nSequences are max.
 
 ["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
+["0x01 0x81", "0x4f EQUAL", "", "direct push of 0x81 equals 1NEGATE"],
+["0x01 0x05", "5 EQUAL", "", "direct push of 0x05 equals 5"],
+["0x4c 0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA1 of 75 bytes equals direct push of it"],
+["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4c 0xFF 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
+["0x02 0x8000", "128 NUMEQUAL", "", "0x8000 equals 128"],
+["0x01 0x00", "0 NUMEQUAL", "", "0x00 numequals 0"],
+["0x01 0x80", "0 NUMEQUAL", "", "0x80 (negative zero) numequals 0"],
+["0x02 0x0080", "0 NUMEQUAL", "", "0x0080 numequals 0"],
+["0x02 0x0500", "5 NUMEQUAL", "", "0x0500 numequals 5"],
+["0x03 0xff7f80", "0x02 0xffff NUMEQUAL", "", ""],
+["0x03 0xff7f00", "0x02 0xff7f NUMEQUAL", "", ""],
+["0x04 0xffff7f80", "0x03 0xffffff NUMEQUAL", "", ""],
+["0x04 0xffff7f00", "0x03 0xffff7f NUMEQUAL", "", ""],
+["0 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x02 0x8000 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x01 0x00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x01 0x80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x02 0x0080 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x02 0x0400 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x03 0xff7f80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x03 0xff7f00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x04 0xffff7f80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x04 0xffff7f00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+["0 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
+
+
 [
     "0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
@@ -638,13 +665,13 @@ nSequences are max.
     "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC"
 ],
 [
-    "0x01 0x01 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01",
+    "1 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "",
     "3-of-3 with nonzero dummy but no NULLDUMMY"
 ],
 [
-    "0x01 0x01 0x47 0x30440220195038dbc6b2ae1199f86a6777824f7c5149789d85f655a3534a4422b8fba38c02204df9db87d2eb9fe06edc66870d9ac4c9ce673459f9d43cee0347ce4ffb02ee5a01 0x47 0x3044022010a45f30c6fa97a186eba9e6b595ab87d3dfcbf05dcaf1f1b8e3e7bf39515bb802203474e78d3d372e5f5c0f8c257ce8300c4bb8f37c51d4a894e11a91b5817da6ed01 0x47 0x30440220039cffd8e39850f95112662b1220b14b3c0d3d8a2772e13c947bfbf96345a64e02204154bfa77e2c0134d5434353bed82141e5da1cc479954aa288d5f0671480a04b01",
+    "1 0x47 0x30440220195038dbc6b2ae1199f86a6777824f7c5149789d85f655a3534a4422b8fba38c02204df9db87d2eb9fe06edc66870d9ac4c9ce673459f9d43cee0347ce4ffb02ee5a01 0x47 0x3044022010a45f30c6fa97a186eba9e6b595ab87d3dfcbf05dcaf1f1b8e3e7bf39515bb802203474e78d3d372e5f5c0f8c257ce8300c4bb8f37c51d4a894e11a91b5817da6ed01 0x47 0x30440220039cffd8e39850f95112662b1220b14b3c0d3d8a2772e13c947bfbf96345a64e02204154bfa77e2c0134d5434353bed82141e5da1cc479954aa288d5f0671480a04b01",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
     "",
     "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY"
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 07291190177c..a41552fea142 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -179,7 +179,7 @@ class TestBuilder
     TestBuilder& Num(int num)
     {
         DoPush();
-        spendTx.vin[0].scriptSig << CScriptNum(num);
+        spendTx.vin[0].scriptSig << num;
         return *this;
     }
 
@@ -788,19 +788,19 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
 
 BOOST_AUTO_TEST_CASE(script_standard_push)
 {
-    for (int i=0; i<1000; i++) {
+    for (int i=0; i<67000; i++) {
         CScript script;
         script << i;
         BOOST_CHECK_MESSAGE(script.IsPushOnly(), "Number " << i << " is not pure push.");
-        BOOST_CHECK_MESSAGE(script.HasCanonicalPushes(), "Number " << i << " push is not canonical.");
+        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker()), "Number " << i << " push is not minimal data.");
     }
 
-    for (int i=0; i<1000; i++) {
+    for (unsigned int i=0; i<=MAX_SCRIPT_ELEMENT_SIZE; i++) {
         std::vector<unsigned char> data(i, '\111');
         CScript script;
         script << data;
         BOOST_CHECK_MESSAGE(script.IsPushOnly(), "Length " << i << " is not pure push.");
-        BOOST_CHECK_MESSAGE(script.HasCanonicalPushes(), "Length " << i << " push is not canonical.");
+        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker()), "Length " << i << " push is not minimal data.");
     }
 }
 
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp
index ac60fa426f89..5621e1272933 100644
--- a/src/test/scriptnum_tests.cpp
+++ b/src/test/scriptnum_tests.cpp
@@ -25,11 +25,11 @@ static void CheckCreateVch(const int64_t& num)
     BOOST_CHECK(verify(bignum, scriptnum));
 
     CBigNum bignum2(bignum.getvch());
-    CScriptNum scriptnum2(scriptnum.getvch());
+    CScriptNum scriptnum2(scriptnum.getvch(), false);
     BOOST_CHECK(verify(bignum2, scriptnum2));
 
     CBigNum bignum3(scriptnum2.getvch());
-    CScriptNum scriptnum3(bignum2.getvch());
+    CScriptNum scriptnum3(bignum2.getvch(), false);
     BOOST_CHECK(verify(bignum3, scriptnum3));
 }
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 9209c6697fad..c46c31e99faf 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -34,6 +34,7 @@ static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
     (string("DERSIG"), (unsigned int)SCRIPT_VERIFY_DERSIG)
     (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
     (string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY)
+    (string("MINIMALDATA"), (unsigned int)SCRIPT_VERIFY_MINIMALDATA)
     (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY);
 
 unsigned int ParseScriptFlags(string strFlags)

From 6004e77b926b5588e4b8eebdff843fe6652e5885 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 14 Oct 2014 11:18:24 -0400
Subject: [PATCH 0922/1819] Improve CScriptNum() comment

Edited-by: Pieter Wuille <pieter.wuille@gmail.com>
---
 src/script/script.h | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/src/script/script.h b/src/script/script.h
index e97967dcea64..05f2e7e3a94f 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -197,8 +197,23 @@ class CScriptNum
         if (vch.size() > nMaxNumSize) {
             throw scriptnum_error("script number overflow");
         }
-        if (fRequireMinimal && vch.size() > 0 && (vch.back() & 0x7f) == 0 && (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0)) {
-            throw scriptnum_error("non-minimally encoded script number");
+        if (fRequireMinimal && vch.size() > 0) {
+            // Check that the number is encoded with the minimum possible
+            // number of bytes.
+            //
+            // If the most-significant-byte - excluding the sign bit - is zero
+            // then we're not minimal. Note how this test also rejects the
+            // negative-zero encoding, 0x80.
+            if ((vch.back() & 0x7f) == 0) {
+                // One exception: if there's more than one byte and the most
+                // significant bit of the second-most-significant-byte is set
+                // it would conflict with the sign bit. An example of this case
+                // is +-255, which encode to 0xff00 and 0xff80 respectively.
+                // (big-endian).
+                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
+                    throw scriptnum_error("non-minimally encoded script number");
+                }
+            }
         }
         m_value = set_vch(vch);
     }

From 554147ad9e6fee1c1d3827ca971647a97a5c0d66 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 14 Oct 2014 13:38:17 -0400
Subject: [PATCH 0923/1819] Ensure MINIMALDATA invalid tests can only fail one
 way

Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.
---
 src/test/data/script_invalid.json | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 5ead65f17f12..c5d878102902 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -384,6 +384,18 @@ nSequences are max.
 
 ["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
+["0x01 0x81", "DROP 1", "MINIMALDATA", "direct push of 0x81 equals 1NEGATE"],
+["0x01 0x05", "DROP 1", "MINIMALDATA", "direct push of 0x05 equals 5"],
+["0x4c 0x48 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA1 of 72 bytes equals direct push of it"],
+["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
+["0x01 0x00", "NOT DROP 1", "MINIMALDATA", "0x00 numequals 0"],
+["0x01 0x80", "NOT DROP 1", "MINIMALDATA", "0x80 (negative zero) numequals 0"],
+["0x02 0x0080", "NOT DROP 1", "MINIMALDATA", "0x0080 numequals 0"],
+["0x02 0x0500", "NOT DROP 1", "MINIMALDATA", "0x0500 numequals 5"],
+["0x03 0xff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff"],
+["0x03 0xff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ff7f"],
+["0x04 0xffff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffffff"],
+["0x04 0xffff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff7f"],
 ["1 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
 ["1 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
 ["1 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],

From dfeec18b85a3a209899dddd6af0ca47dfe48c4d4 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 14 Oct 2014 14:24:13 -0400
Subject: [PATCH 0924/1819] Test every numeric-accepting opcode for correct
 handling of the numeric minimal encoding rule

---
 src/test/data/script_invalid.json | 50 +++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index c5d878102902..3e7bbe73de0c 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -400,6 +400,56 @@ nSequences are max.
 ["1 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
 ["1 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
 
+
+["Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule"],
+
+["1 0x02 0x0000", "PICK DROP", "MINIMALDATA"],
+["1 0x02 0x0000", "ROLL DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "1ADD DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "1SUB DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "NEGATE DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "ABS DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "NOT DROP 1", "MINIMALDATA"],
+["0x02 0x0000", "0NOTEQUAL DROP 1", "MINIMALDATA"],
+
+["0 0x02 0x0000", "ADD DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "ADD DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "SUB DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "SUB DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "BOOLAND DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "BOOLAND DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "BOOLOR DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "BOOLOR DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "NUMEQUAL DROP 1", "MINIMALDATA"],
+["0x02 0x0000 1", "NUMEQUAL DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "NUMEQUALVERIFY 1", "MINIMALDATA"],
+["0x02 0x0000 0", "NUMEQUALVERIFY 1", "MINIMALDATA"],
+["0 0x02 0x0000", "NUMNOTEQUAL DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "NUMNOTEQUAL DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "LESSTHAN DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "LESSTHAN DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "GREATERTHAN DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "GREATERTHAN DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "LESSTHANOREQUAL DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "LESSTHANOREQUAL DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "GREATERTHANOREQUAL DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "GREATERTHANOREQUAL DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "MIN DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "MIN DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000", "MAX DROP 1", "MINIMALDATA"],
+["0x02 0x0000 0", "MAX DROP 1", "MINIMALDATA"],
+
+["0x02 0x0000 0 0", "WITHIN DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000 0", "WITHIN DROP 1", "MINIMALDATA"],
+["0 0 0x02 0x0000", "WITHIN DROP 1", "MINIMALDATA"],
+
+["0 0 0x02 0x0000", "CHECKMULTISIG DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000 0", "CHECKMULTISIG DROP 1", "MINIMALDATA"],
+["0 0x02 0x0000 0 1", "CHECKMULTISIG DROP 1", "MINIMALDATA"],
+["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", "MINIMALDATA"],
+["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "MINIMALDATA"],
+
+
 [
     "0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",

From 2b62e1796bb58d1ef2e2a83e42958111467f0562 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 14 Oct 2014 15:08:48 -0400
Subject: [PATCH 0925/1819] Clearly separate PUSHDATA and numeric argument
 MINIMALDATA tests

---
 src/test/data/script_invalid.json | 59 +++++++++++++++------
 src/test/data/script_valid.json   | 85 +++++++++++++++++++++++++------
 2 files changed, 114 insertions(+), 30 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 3e7bbe73de0c..6f451a36eedf 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -384,22 +384,51 @@ nSequences are max.
 
 ["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
 
-["0x01 0x81", "DROP 1", "MINIMALDATA", "direct push of 0x81 equals 1NEGATE"],
-["0x01 0x05", "DROP 1", "MINIMALDATA", "direct push of 0x05 equals 5"],
-["0x4c 0x48 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA1 of 72 bytes equals direct push of it"],
-["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
-["0x01 0x00", "NOT DROP 1", "MINIMALDATA", "0x00 numequals 0"],
+["MINIMALDATA enforcement for PUSHDATAs"],
+
+["0x4c 0x00", "DROP 1", "MINIMALDATA", "Empty vector minimally represented by OP_0"],
+["0x01 0x81", "DROP 1", "MINIMALDATA", "-1 minimally represented by OP_1NEGATE"],
+["0x01 0x01", "DROP 1", "MINIMALDATA", "1 to 16 minimally represented by OP_1 to OP_16"],
+["0x01 0x02", "DROP 1", "MINIMALDATA"],
+["0x01 0x03", "DROP 1", "MINIMALDATA"],
+["0x01 0x04", "DROP 1", "MINIMALDATA"],
+["0x01 0x05", "DROP 1", "MINIMALDATA"],
+["0x01 0x06", "DROP 1", "MINIMALDATA"],
+["0x01 0x07", "DROP 1", "MINIMALDATA"],
+["0x01 0x08", "DROP 1", "MINIMALDATA"],
+["0x01 0x09", "DROP 1", "MINIMALDATA"],
+["0x01 0x0a", "DROP 1", "MINIMALDATA"],
+["0x01 0x0b", "DROP 1", "MINIMALDATA"],
+["0x01 0x0c", "DROP 1", "MINIMALDATA"],
+["0x01 0x0d", "DROP 1", "MINIMALDATA"],
+["0x01 0x0e", "DROP 1", "MINIMALDATA"],
+["0x01 0x0f", "DROP 1", "MINIMALDATA"],
+["0x01 0x10", "DROP 1", "MINIMALDATA"],
+
+["0x4c 0x48 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA",
+ "PUSHDATA1 of 72 bytes minimally represented by direct push"],
+
+["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA",
+ "PUSHDATA2 of 255 bytes minimally represented by PUSHDATA1"],
+
+["0x4f 0x00100000 0x11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA",
+ "PUSHDATA4 of 256 bytes minimally represented by PUSHDATA2"],
+
+
+["MINIMALDATA enforcement for numeric arguments"],
+
+["0x01 0x00", "NOT DROP 1", "MINIMALDATA", "numequals 0"],
+["0x02 0x0000", "NOT DROP 1", "MINIMALDATA", "numequals 0"],
 ["0x01 0x80", "NOT DROP 1", "MINIMALDATA", "0x80 (negative zero) numequals 0"],
-["0x02 0x0080", "NOT DROP 1", "MINIMALDATA", "0x0080 numequals 0"],
-["0x02 0x0500", "NOT DROP 1", "MINIMALDATA", "0x0500 numequals 5"],
-["0x03 0xff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff"],
-["0x03 0xff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ff7f"],
-["0x04 0xffff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffffff"],
-["0x04 0xffff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff7f"],
-["1 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
-["1 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
-["1 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
-
+["0x02 0x0080", "NOT DROP 1", "MINIMALDATA", "numequals 0"],
+["0x02 0x0500", "NOT DROP 1", "MINIMALDATA", "numequals 5"],
+["0x03 0x050000", "NOT DROP 1", "MINIMALDATA", "numequals 5"],
+["0x02 0x0580", "NOT DROP 1", "MINIMALDATA", "numequals -5"],
+["0x03 0x050080", "NOT DROP 1", "MINIMALDATA", "numequals -5"],
+["0x03 0xff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is 0xffff"],
+["0x03 0xff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is 0xff7f"],
+["0x04 0xffff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is 0xffffff"],
+["0x04 0xffff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is 0xffff7f"],
 
 ["Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule"],
 
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 89619a9ddc17..b2601deb5338 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -527,12 +527,35 @@ nSequences are max.
 "P2SH,STRICTENC",
 "Basic PUSHDATA1 signedness check"],
 
-["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
+["all PUSHDATA forms are equivalent"],
 
-["0x01 0x81", "0x4f EQUAL", "", "direct push of 0x81 equals 1NEGATE"],
-["0x01 0x05", "5 EQUAL", "", "direct push of 0x05 equals 5"],
 ["0x4c 0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4b 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA1 of 75 bytes equals direct push of it"],
 ["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "0x4c 0xFF 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 EQUAL", "", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
+
+["0x00", "SIZE 0 EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
+
+["Numeric pushes"],
+
+["0x01 0x81", "0x4f EQUAL", "", "OP1_NEGATE pushes 0x81"],
+["0x01 0x01", "0x51 EQUAL", "", "OP_1  pushes 0x01"],
+["0x01 0x02", "0x52 EQUAL", "", "OP_2  pushes 0x02"],
+["0x01 0x03", "0x53 EQUAL", "", "OP_3  pushes 0x03"],
+["0x01 0x04", "0x54 EQUAL", "", "OP_4  pushes 0x04"],
+["0x01 0x05", "0x55 EQUAL", "", "OP_5  pushes 0x05"],
+["0x01 0x06", "0x56 EQUAL", "", "OP_6  pushes 0x06"],
+["0x01 0x07", "0x57 EQUAL", "", "OP_7  pushes 0x07"],
+["0x01 0x08", "0x58 EQUAL", "", "OP_8  pushes 0x08"],
+["0x01 0x09", "0x59 EQUAL", "", "OP_9  pushes 0x09"],
+["0x01 0x0a", "0x5a EQUAL", "", "OP_10 pushes 0x0a"],
+["0x01 0x0b", "0x5b EQUAL", "", "OP_11 pushes 0x0b"],
+["0x01 0x0c", "0x5c EQUAL", "", "OP_12 pushes 0x0c"],
+["0x01 0x0d", "0x5d EQUAL", "", "OP_13 pushes 0x0d"],
+["0x01 0x0e", "0x5e EQUAL", "", "OP_14 pushes 0x0e"],
+["0x01 0x0f", "0x5f EQUAL", "", "OP_15 pushes 0x0f"],
+["0x01 0x10", "0x60 EQUAL", "", "OP_16 pushes 0x10"],
+
+["Equivalency of different numeric encodings"],
+
 ["0x02 0x8000", "128 NUMEQUAL", "", "0x8000 equals 128"],
 ["0x01 0x00", "0 NUMEQUAL", "", "0x00 numequals 0"],
 ["0x01 0x80", "0 NUMEQUAL", "", "0x80 (negative zero) numequals 0"],
@@ -542,19 +565,51 @@ nSequences are max.
 ["0x03 0xff7f00", "0x02 0xff7f NUMEQUAL", "", ""],
 ["0x04 0xffff7f80", "0x03 0xffffff NUMEQUAL", "", ""],
 ["0x04 0xffff7f00", "0x03 0xffff7f NUMEQUAL", "", ""],
-["0 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x02 0x8000 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x01 0x00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x01 0x80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x02 0x0080 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x02 0x0400 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x03 0xff7f80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x03 0xff7f00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x04 0xffff7f80 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x04 0xffff7f00 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
-["0 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "unevaluated non-minimal data"],
 
+["Unevaluated non-minimal pushes are ignored"],
+
+["0 IF 0x4c 0x00 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA1 ignored"],
+["0 IF 0x4d 0x0000 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA2 ignored"],
+["0 IF 0x4c 0x00000000 ENDIF 1", "", "MINIMALDATA", "non-minimal PUSHDATA4 ignored"],
+["0 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "1NEGATE equiv"],
+["0 IF 0x01 0x01 ENDIF 1", "", "MINIMALDATA", "OP_1  equiv"],
+["0 IF 0x01 0x02 ENDIF 1", "", "MINIMALDATA", "OP_2  equiv"],
+["0 IF 0x01 0x03 ENDIF 1", "", "MINIMALDATA", "OP_3  equiv"],
+["0 IF 0x01 0x04 ENDIF 1", "", "MINIMALDATA", "OP_4  equiv"],
+["0 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "OP_5  equiv"],
+["0 IF 0x01 0x06 ENDIF 1", "", "MINIMALDATA", "OP_6  equiv"],
+["0 IF 0x01 0x07 ENDIF 1", "", "MINIMALDATA", "OP_7  equiv"],
+["0 IF 0x01 0x08 ENDIF 1", "", "MINIMALDATA", "OP_8  equiv"],
+["0 IF 0x01 0x09 ENDIF 1", "", "MINIMALDATA", "OP_9  equiv"],
+["0 IF 0x01 0x0a ENDIF 1", "", "MINIMALDATA", "OP_10 equiv"],
+["0 IF 0x01 0x0b ENDIF 1", "", "MINIMALDATA", "OP_11 equiv"],
+["0 IF 0x01 0x0c ENDIF 1", "", "MINIMALDATA", "OP_12 equiv"],
+["0 IF 0x01 0x0d ENDIF 1", "", "MINIMALDATA", "OP_13 equiv"],
+["0 IF 0x01 0x0e ENDIF 1", "", "MINIMALDATA", "OP_14 equiv"],
+["0 IF 0x01 0x0f ENDIF 1", "", "MINIMALDATA", "OP_15 equiv"],
+["0 IF 0x01 0x10 ENDIF 1", "", "MINIMALDATA", "OP_16 equiv"],
+
+["Numeric minimaldata rules are only applied when a stack item is numerically evaluated; the push itself is allowed"],
+
+["0x01 0x00", "1", "MINIMALDATA"],
+["0x01 0x80", "1", "MINIMALDATA"],
+["0x02 0x0180", "1", "MINIMALDATA"],
+["0x02 0x0100", "1", "MINIMALDATA"],
+["0x02 0x0200", "1", "MINIMALDATA"],
+["0x02 0x0300", "1", "MINIMALDATA"],
+["0x02 0x0400", "1", "MINIMALDATA"],
+["0x02 0x0500", "1", "MINIMALDATA"],
+["0x02 0x0600", "1", "MINIMALDATA"],
+["0x02 0x0700", "1", "MINIMALDATA"],
+["0x02 0x0800", "1", "MINIMALDATA"],
+["0x02 0x0900", "1", "MINIMALDATA"],
+["0x02 0x0a00", "1", "MINIMALDATA"],
+["0x02 0x0b00", "1", "MINIMALDATA"],
+["0x02 0x0c00", "1", "MINIMALDATA"],
+["0x02 0x0d00", "1", "MINIMALDATA"],
+["0x02 0x0e00", "1", "MINIMALDATA"],
+["0x02 0x0f00", "1", "MINIMALDATA"],
+["0x02 0x1000", "1", "MINIMALDATA"],
 
 [
     "0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501",

From 16d78bd68e1488a2a84e368b50bf511c77392d2e Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 14 Oct 2014 16:00:29 -0400
Subject: [PATCH 0926/1819] Add valid invert of invalid every numeric opcode
 tests

---
 src/test/data/script_valid.json | 49 +++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index b2601deb5338..439c82ef3200 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -611,6 +611,55 @@ nSequences are max.
 ["0x02 0x0f00", "1", "MINIMALDATA"],
 ["0x02 0x1000", "1", "MINIMALDATA"],
 
+["Valid version of the 'Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule' script_invalid test"],
+
+["1 0x02 0x0000", "PICK DROP", ""],
+["1 0x02 0x0000", "ROLL DROP 1", ""],
+["0x02 0x0000", "1ADD DROP 1", ""],
+["0x02 0x0000", "1SUB DROP 1", ""],
+["0x02 0x0000", "NEGATE DROP 1", ""],
+["0x02 0x0000", "ABS DROP 1", ""],
+["0x02 0x0000", "NOT DROP 1", ""],
+["0x02 0x0000", "0NOTEQUAL DROP 1", ""],
+
+["0 0x02 0x0000", "ADD DROP 1", ""],
+["0x02 0x0000 0", "ADD DROP 1", ""],
+["0 0x02 0x0000", "SUB DROP 1", ""],
+["0x02 0x0000 0", "SUB DROP 1", ""],
+["0 0x02 0x0000", "BOOLAND DROP 1", ""],
+["0x02 0x0000 0", "BOOLAND DROP 1", ""],
+["0 0x02 0x0000", "BOOLOR DROP 1", ""],
+["0x02 0x0000 0", "BOOLOR DROP 1", ""],
+["0 0x02 0x0000", "NUMEQUAL DROP 1", ""],
+["0x02 0x0000 1", "NUMEQUAL DROP 1", ""],
+["0 0x02 0x0000", "NUMEQUALVERIFY 1", ""],
+["0x02 0x0000 0", "NUMEQUALVERIFY 1", ""],
+["0 0x02 0x0000", "NUMNOTEQUAL DROP 1", ""],
+["0x02 0x0000 0", "NUMNOTEQUAL DROP 1", ""],
+["0 0x02 0x0000", "LESSTHAN DROP 1", ""],
+["0x02 0x0000 0", "LESSTHAN DROP 1", ""],
+["0 0x02 0x0000", "GREATERTHAN DROP 1", ""],
+["0x02 0x0000 0", "GREATERTHAN DROP 1", ""],
+["0 0x02 0x0000", "LESSTHANOREQUAL DROP 1", ""],
+["0x02 0x0000 0", "LESSTHANOREQUAL DROP 1", ""],
+["0 0x02 0x0000", "GREATERTHANOREQUAL DROP 1", ""],
+["0x02 0x0000 0", "GREATERTHANOREQUAL DROP 1", ""],
+["0 0x02 0x0000", "MIN DROP 1", ""],
+["0x02 0x0000 0", "MIN DROP 1", ""],
+["0 0x02 0x0000", "MAX DROP 1", ""],
+["0x02 0x0000 0", "MAX DROP 1", ""],
+
+["0x02 0x0000 0 0", "WITHIN DROP 1", ""],
+["0 0x02 0x0000 0", "WITHIN DROP 1", ""],
+["0 0 0x02 0x0000", "WITHIN DROP 1", ""],
+
+["0 0 0x02 0x0000", "CHECKMULTISIG DROP 1", ""],
+["0 0x02 0x0000 0", "CHECKMULTISIG DROP 1", ""],
+["0 0x02 0x0000 0 1", "CHECKMULTISIG DROP 1", ""],
+["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
+["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
+
+
 [
     "0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",

From 2aa632921efd861a7c9968e8faf6c73cb3d62c4a Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Fri, 10 Oct 2014 23:55:14 +0000
Subject: [PATCH 0927/1819] Enable customising node policy for datacarrier data
 size with a -datacarriersize option

---
 src/init.cpp            | 3 +++
 src/script/standard.cpp | 6 ++++--
 src/script/standard.h   | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 70ac5190d30c..a33452aa30f9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -17,6 +17,7 @@
 #include "miner.h"
 #include "net.h"
 #include "rpcserver.h"
+#include "script/standard.h"
 #include "txdb.h"
 #include "ui_interface.h"
 #include "util.h"
@@ -345,6 +346,7 @@ std::string HelpMessage(HelpMessageMode mode)
 
     strUsage += "\n" + _("Node relay options:") + "\n";
     strUsage += "  -datacarrier           " + strprintf(_("Relay and mine data carrier transactions (default: %u)"), 1) + "\n";
+    strUsage += "  -datacarriersize       " + strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY) + "\n";
 
     strUsage += "\n" + _("Block creation options:") + "\n";
     strUsage += "  -blockminsize=<n>      " + strprintf(_("Set minimum block size in bytes (default: %u)"), 0) + "\n";
@@ -702,6 +704,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 #endif // ENABLE_WALLET
 
     fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
+    nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
 
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
 
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 05938961bc6d..7356e541a678 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -15,6 +15,8 @@ using namespace std;
 
 typedef vector<unsigned char> valtype;
 
+unsigned nMaxDatacarrierBytes = MAX_OP_RETURN_RELAY;
+
 CScriptID::CScriptID(const CScript& in) : uint160(in.size() ? Hash160(in.begin(), in.end()) : 0) {}
 
 const char* GetTxnOutputType(txnouttype t)
@@ -139,8 +141,8 @@ bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsi
             }
             else if (opcode2 == OP_SMALLDATA)
             {
-                // small pushdata, <= MAX_OP_RETURN_RELAY bytes
-                if (vch1.size() > MAX_OP_RETURN_RELAY)
+                // small pushdata, <= nMaxDatacarrierBytes
+                if (vch1.size() > nMaxDatacarrierBytes)
                     break;
             }
             else if (opcode1 != opcode2 || vch1 != vch2)
diff --git a/src/script/standard.h b/src/script/standard.h
index 961b214c8949..d795121e3cbf 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -26,6 +26,7 @@ class CScriptID : public uint160
 };
 
 static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
+extern unsigned nMaxDatacarrierBytes;
 
 // Mandatory script verification flags that all new blocks must comply with for
 // them to be valid. (but old blocks may not comply with) Currently just P2SH,

From 071473c55c11c267fe1dec898faf4e3286a3916e Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Tue, 21 Oct 2014 08:36:09 +0200
Subject: [PATCH 0928/1819] Build util and common before building server

---
 src/Makefile.am | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 42f325e09df1..dbefa71fc678 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,13 +36,15 @@ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
 LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
 LIBBITCOINQT=qt/libbitcoinqt.a
 
+# Make is not made aware of per-object dependencies to avoid limiting building parallelization
+# But to build the less dependent modules first, we manually select their order here:
 noinst_LIBRARIES = \
-  libbitcoin_server.a \
-  libbitcoin_common.a \
-  libbitcoin_cli.a \
+  crypto/libbitcoin_crypto.a \
   libbitcoin_util.a \
+  libbitcoin_common.a \
   univalue/libbitcoin_univalue.a \
-  crypto/libbitcoin_crypto.a
+  libbitcoin_server.a \
+  libbitcoin_cli.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
 noinst_LIBRARIES += libbitcoin_wallet.a

From eda37330911b005f4be0c2d934346b26247d50f5 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Thu, 23 Oct 2014 02:05:11 +0200
Subject: [PATCH 0929/1819] MOVEONLY: Move CFeeRate and Amount constants to
 amount.o

---
 src/Makefile.am         |  1 +
 src/amount.cpp          | 31 +++++++++++++++++++++++++++++
 src/amount.h            | 43 ++++++++++++++++++++++++++++++++++++++++-
 src/core.cpp            | 23 ----------------------
 src/core.h              | 41 ---------------------------------------
 src/init.cpp            |  1 +
 src/main.h              |  1 +
 src/miner.cpp           |  1 +
 src/qt/optionsmodel.cpp |  1 +
 src/rpcmining.cpp       |  1 +
 src/rpcwallet.cpp       |  1 +
 src/txmempool.h         |  1 +
 src/wallet.h            |  1 +
 13 files changed, 82 insertions(+), 65 deletions(-)
 create mode 100644 src/amount.cpp

diff --git a/src/Makefile.am b/src/Makefile.am
index dbefa71fc678..d5abbc17d3d5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -208,6 +208,7 @@ univalue_libbitcoin_univalue_a_SOURCES = \
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
   allocators.cpp \
+  amount.cpp \
   base58.cpp \
   chainparams.cpp \
   coins.cpp \
diff --git a/src/amount.cpp b/src/amount.cpp
new file mode 100644
index 000000000000..e6f5b7d4407d
--- /dev/null
+++ b/src/amount.cpp
@@ -0,0 +1,31 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "amount.h"
+
+#include "tinyformat.h"
+
+CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
+{
+    if (nSize > 0)
+        nSatoshisPerK = nFeePaid*1000/nSize;
+    else
+        nSatoshisPerK = 0;
+}
+
+CAmount CFeeRate::GetFee(size_t nSize) const
+{
+    CAmount nFee = nSatoshisPerK*nSize / 1000;
+
+    if (nFee == 0 && nSatoshisPerK > 0)
+        nFee = nSatoshisPerK;
+
+    return nFee;
+}
+
+std::string CFeeRate::ToString() const
+{
+    return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
+}
diff --git a/src/amount.h b/src/amount.h
index 831fa1f6cad6..c0d37954cb04 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -6,8 +6,49 @@
 #ifndef BITCOIN_AMOUNT_H
 #define BITCOIN_AMOUNT_H
 
-#include <stdint.h>
+#include "serialize.h"
+
+#include <stdlib.h>
+#include <string>
 
 typedef int64_t CAmount;
 
+static const CAmount COIN = 100000000;
+static const CAmount CENT = 1000000;
+
+/** No amount larger than this (in satoshi) is valid */
+static const CAmount MAX_MONEY = 21000000 * COIN;
+inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
+
+/** Type-safe wrapper class to for fee rates
+ * (how much to pay based on transaction size)
+ */
+class CFeeRate
+{
+private:
+    CAmount nSatoshisPerK; // unit is satoshis-per-1,000-bytes
+public:
+    CFeeRate() : nSatoshisPerK(0) { }
+    explicit CFeeRate(const CAmount& _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
+    CFeeRate(const CAmount& nFeePaid, size_t nSize);
+    CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
+
+    CAmount GetFee(size_t size) const; // unit returned is satoshis
+    CAmount GetFeePerK() const { return GetFee(1000); } // satoshis-per-1000-bytes
+
+    friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
+    friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
+    friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
+    friend bool operator<=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK <= b.nSatoshisPerK; }
+    friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
+    std::string ToString() const;
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(nSatoshisPerK);
+    }
+};
+
 #endif //  BITCOIN_AMOUNT_H
diff --git a/src/core.cpp b/src/core.cpp
index 73e6de88e1f5..ac180cc50983 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -59,29 +59,6 @@ std::string CTxOut::ToString() const
     return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
 }
 
-CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
-{
-    if (nSize > 0)
-        nSatoshisPerK = nFeePaid*1000/nSize;
-    else
-        nSatoshisPerK = 0;
-}
-
-CAmount CFeeRate::GetFee(size_t nSize) const
-{
-    CAmount nFee = nSatoshisPerK*nSize / 1000;
-
-    if (nFee == 0 && nSatoshisPerK > 0)
-        nFee = nSatoshisPerK;
-
-    return nFee;
-}
-
-std::string CFeeRate::ToString() const
-{
-    return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
-}
-
 CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
 CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {}
 
diff --git a/src/core.h b/src/core.h
index a024dad7407a..f7a46da2c135 100644
--- a/src/core.h
+++ b/src/core.h
@@ -16,13 +16,6 @@
 
 class CTransaction;
 
-static const int64_t COIN = 100000000;
-static const int64_t CENT = 1000000;
-
-/** No amount larger than this (in satoshi) is valid */
-static const CAmount MAX_MONEY = 21000000 * COIN;
-inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
-
 /** An outpoint - a combination of a transaction hash and an index n into its vout */
 class COutPoint
 {
@@ -109,40 +102,6 @@ class CTxIn
     std::string ToString() const;
 };
 
-
-
-/** Type-safe wrapper class to for fee rates
- * (how much to pay based on transaction size)
- */
-class CFeeRate
-{
-private:
-    CAmount nSatoshisPerK; // unit is satoshis-per-1,000-bytes
-public:
-    CFeeRate() : nSatoshisPerK(0) { }
-    explicit CFeeRate(const CAmount& _nSatoshisPerK): nSatoshisPerK(_nSatoshisPerK) { }
-    CFeeRate(const CAmount& nFeePaid, size_t nSize);
-    CFeeRate(const CFeeRate& other) { nSatoshisPerK = other.nSatoshisPerK; }
-
-    CAmount GetFee(size_t size) const; // unit returned is satoshis
-    CAmount GetFeePerK() const { return GetFee(1000); } // satoshis-per-1000-bytes
-
-    friend bool operator<(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK < b.nSatoshisPerK; }
-    friend bool operator>(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK > b.nSatoshisPerK; }
-    friend bool operator==(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK == b.nSatoshisPerK; }
-    friend bool operator<=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK <= b.nSatoshisPerK; }
-    friend bool operator>=(const CFeeRate& a, const CFeeRate& b) { return a.nSatoshisPerK >= b.nSatoshisPerK; }
-    std::string ToString() const;
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(nSatoshisPerK);
-    }
-};
-
-
 /** An output of a transaction.  It contains the public key that the next input
  * must be able to sign with to claim it.
  */
diff --git a/src/init.cpp b/src/init.cpp
index 70ac5190d30c..d928094bbae5 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -10,6 +10,7 @@
 #include "init.h"
 
 #include "addrman.h"
+#include "amount.h"
 #include "checkpoints.h"
 #include "compat/sanity.h"
 #include "key.h"
diff --git a/src/main.h b/src/main.h
index 1ef51918c5ca..2686ed948f15 100644
--- a/src/main.h
+++ b/src/main.h
@@ -10,6 +10,7 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include "amount.h"
 #include "chain.h"
 #include "chainparams.h"
 #include "coins.h"
diff --git a/src/miner.cpp b/src/miner.cpp
index eefccfd64184..897f7c56d7e5 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -5,6 +5,7 @@
 
 #include "miner.h"
 
+#include "amount.h"
 #include "core.h"
 #include "hash.h"
 #include "main.h"
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 6db654dff712..c941ebd4caf1 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -11,6 +11,7 @@
 #include "bitcoinunits.h"
 #include "guiutil.h"
 
+#include "amount.h"
 #include "init.h"
 #include "main.h"
 #include "net.h"
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index c767835a27ff..8af3c46348fb 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -3,6 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "amount.h"
 #include "chainparams.h"
 #include "core_io.h"
 #include "init.h"
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 68bb4068b82a..2728fb4fb359 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -3,6 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "amount.h"
 #include "base58.h"
 #include "core_io.h"
 #include "rpcserver.h"
diff --git a/src/txmempool.h b/src/txmempool.h
index 85cf5310ff4d..df2fbc78c37d 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -8,6 +8,7 @@
 
 #include <list>
 
+#include "amount.h"
 #include "coins.h"
 #include "core.h"
 #include "sync.h"
diff --git a/src/wallet.h b/src/wallet.h
index 06706655f8db..6a4b4b7f8d8f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -6,6 +6,7 @@
 #ifndef BITCOIN_WALLET_H
 #define BITCOIN_WALLET_H
 
+#include "amount.h"
 #include "core.h"
 #include "crypter.h"
 #include "key.h"

From 4a3587d8db9f651866ce70312ac9de11316b42c9 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sat, 18 Oct 2014 02:34:06 +0200
Subject: [PATCH 0930/1819] MOVEONLY: Separate CTransaction and dependencies
 from core

---
 src/Makefile.am            |   2 +
 src/bitcoin-tx.cpp         |   2 +-
 src/bloom.cpp              |   2 +-
 src/coincontrol.h          |   2 +-
 src/coins.h                |   3 +-
 src/core.cpp               | 132 ------------------
 src/core.h                 | 270 +-----------------------------------
 src/core/transaction.cpp   | 142 +++++++++++++++++++
 src/core/transaction.h     | 276 +++++++++++++++++++++++++++++++++++++
 src/core_read.cpp          |   2 +-
 src/core_write.cpp         |   2 +-
 src/main.h                 |   1 +
 src/miner.cpp              |   1 +
 src/net.cpp                |   2 +-
 src/qt/bitcoinunits.cpp    |   2 +-
 src/qt/guiutil.cpp         |   2 +-
 src/rpcrawtransaction.cpp  |   2 +-
 src/script/interpreter.cpp |   2 +-
 src/script/sign.cpp        |   2 +-
 src/test/main_tests.cpp    |   2 +-
 src/test/util_tests.cpp    |   2 +-
 src/txdb.cpp               |   1 -
 src/txmempool.cpp          |   1 -
 src/txmempool.h            |   2 +-
 src/utilmoneystr.cpp       |   2 +-
 src/wallet.h               |   1 +
 26 files changed, 441 insertions(+), 419 deletions(-)
 create mode 100644 src/core/transaction.cpp
 create mode 100644 src/core/transaction.h

diff --git a/src/Makefile.am b/src/Makefile.am
index d5abbc17d3d5..5485127e6811 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,6 +81,7 @@ BITCOIN_CORE_H = \
   coins.h \
   compat.h \
   core.h \
+  core/transaction.h \
   core_io.h \
   crypter.h \
   db.h \
@@ -213,6 +214,7 @@ libbitcoin_common_a_SOURCES = \
   chainparams.cpp \
   coins.cpp \
   core.cpp \
+  core/transaction.cpp \
   core_read.cpp \
   core_write.cpp \
   hash.cpp \
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index da37e60c7f4a..6f3409edf30a 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -3,7 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
-#include "core.h"
+#include "core/transaction.h"
 #include "core_io.h"
 #include "keystore.h"
 #include "main.h" // for MAX_BLOCK_SIZE
diff --git a/src/bloom.cpp b/src/bloom.cpp
index cac71fdbbf79..c1e7aeb3bf19 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -4,7 +4,7 @@
 
 #include "bloom.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "script/script.h"
 #include "script/standard.h"
 #include "streams.h"
diff --git a/src/coincontrol.h b/src/coincontrol.h
index 033092c01954..c8f12d92de64 100644
--- a/src/coincontrol.h
+++ b/src/coincontrol.h
@@ -5,7 +5,7 @@
 #ifndef COINCONTROL_H
 #define COINCONTROL_H
 
-#include "core.h"
+#include "core/transaction.h"
 
 /** Coin Control Features. */
 class CCoinControl
diff --git a/src/coins.h b/src/coins.h
index b8f1e5bcc560..eafe3bec6413 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -6,7 +6,8 @@
 #ifndef BITCOIN_COINS_H
 #define BITCOIN_COINS_H
 
-#include "core.h"
+#include "core.h" // Only for CTxOutCompressor
+#include "core/transaction.h"
 #include "serialize.h"
 #include "uint256.h"
 
diff --git a/src/core.cpp b/src/core.cpp
index ac180cc50983..34188bca63a3 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -9,138 +9,6 @@
 #include "tinyformat.h"
 #include "utilstrencodings.h"
 
-std::string COutPoint::ToString() const
-{
-    return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
-}
-
-CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, uint32_t nSequenceIn)
-{
-    prevout = prevoutIn;
-    scriptSig = scriptSigIn;
-    nSequence = nSequenceIn;
-}
-
-CTxIn::CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn, uint32_t nSequenceIn)
-{
-    prevout = COutPoint(hashPrevTx, nOut);
-    scriptSig = scriptSigIn;
-    nSequence = nSequenceIn;
-}
-
-std::string CTxIn::ToString() const
-{
-    std::string str;
-    str += "CTxIn(";
-    str += prevout.ToString();
-    if (prevout.IsNull())
-        str += strprintf(", coinbase %s", HexStr(scriptSig));
-    else
-        str += strprintf(", scriptSig=%s", scriptSig.ToString().substr(0,24));
-    if (nSequence != std::numeric_limits<unsigned int>::max())
-        str += strprintf(", nSequence=%u", nSequence);
-    str += ")";
-    return str;
-}
-
-CTxOut::CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn)
-{
-    nValue = nValueIn;
-    scriptPubKey = scriptPubKeyIn;
-}
-
-uint256 CTxOut::GetHash() const
-{
-    return SerializeHash(*this);
-}
-
-std::string CTxOut::ToString() const
-{
-    return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
-}
-
-CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
-CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {}
-
-uint256 CMutableTransaction::GetHash() const
-{
-    return SerializeHash(*this);
-}
-
-void CTransaction::UpdateHash() const
-{
-    *const_cast<uint256*>(&hash) = SerializeHash(*this);
-}
-
-CTransaction::CTransaction() : hash(0), nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0) { }
-
-CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {
-    UpdateHash();
-}
-
-CTransaction& CTransaction::operator=(const CTransaction &tx) {
-    *const_cast<int*>(&nVersion) = tx.nVersion;
-    *const_cast<std::vector<CTxIn>*>(&vin) = tx.vin;
-    *const_cast<std::vector<CTxOut>*>(&vout) = tx.vout;
-    *const_cast<unsigned int*>(&nLockTime) = tx.nLockTime;
-    *const_cast<uint256*>(&hash) = tx.hash;
-    return *this;
-}
-
-CAmount CTransaction::GetValueOut() const
-{
-    CAmount nValueOut = 0;
-    for (std::vector<CTxOut>::const_iterator it(vout.begin()); it != vout.end(); ++it)
-    {
-        nValueOut += it->nValue;
-        if (!MoneyRange(it->nValue) || !MoneyRange(nValueOut))
-            throw std::runtime_error("CTransaction::GetValueOut() : value out of range");
-    }
-    return nValueOut;
-}
-
-double CTransaction::ComputePriority(double dPriorityInputs, unsigned int nTxSize) const
-{
-    nTxSize = CalculateModifiedSize(nTxSize);
-    if (nTxSize == 0) return 0.0;
-
-    return dPriorityInputs / nTxSize;
-}
-
-unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
-{
-    // In order to avoid disincentivizing cleaning up the UTXO set we don't count
-    // the constant overhead for each txin and up to 110 bytes of scriptSig (which
-    // is enough to cover a compressed pubkey p2sh redemption) for priority.
-    // Providing any more cleanup incentive than making additional inputs free would
-    // risk encouraging people to create junk outputs to redeem later.
-    if (nTxSize == 0)
-        nTxSize = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
-    for (std::vector<CTxIn>::const_iterator it(vin.begin()); it != vin.end(); ++it)
-    {
-        unsigned int offset = 41U + std::min(110U, (unsigned int)it->scriptSig.size());
-        if (nTxSize > offset)
-            nTxSize -= offset;
-    }
-    return nTxSize;
-}
-
-std::string CTransaction::ToString() const
-{
-    std::string str;
-    str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
-        GetHash().ToString().substr(0,10),
-        nVersion,
-        vin.size(),
-        vout.size(),
-        nLockTime);
-    for (unsigned int i = 0; i < vin.size(); i++)
-        str += "    " + vin[i].ToString() + "\n";
-    for (unsigned int i = 0; i < vout.size(); i++)
-        str += "    " + vout[i].ToString() + "\n";
-    return str;
-}
-
 // Amount compression:
 // * If the amount is 0, output 0
 // * first, divide the amount (in base units) by the largest power of 10 possible; call the exponent e (e is max 9)
diff --git a/src/core.h b/src/core.h
index f7a46da2c135..ad4c8832503d 100644
--- a/src/core.h
+++ b/src/core.h
@@ -6,279 +6,11 @@
 #ifndef BITCOIN_CORE_H
 #define BITCOIN_CORE_H
 
-#include "amount.h"
+#include "core/transaction.h"
 #include "script/compressor.h"
-#include "script/script.h"
 #include "serialize.h"
 #include "uint256.h"
 
-#include <stdint.h>
-
-class CTransaction;
-
-/** An outpoint - a combination of a transaction hash and an index n into its vout */
-class COutPoint
-{
-public:
-    uint256 hash;
-    uint32_t n;
-
-    COutPoint() { SetNull(); }
-    COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(FLATDATA(*this));
-    }
-
-    void SetNull() { hash = 0; n = (uint32_t) -1; }
-    bool IsNull() const { return (hash == 0 && n == (uint32_t) -1); }
-
-    friend bool operator<(const COutPoint& a, const COutPoint& b)
-    {
-        return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n));
-    }
-
-    friend bool operator==(const COutPoint& a, const COutPoint& b)
-    {
-        return (a.hash == b.hash && a.n == b.n);
-    }
-
-    friend bool operator!=(const COutPoint& a, const COutPoint& b)
-    {
-        return !(a == b);
-    }
-
-    std::string ToString() const;
-};
-
-/** An input of a transaction.  It contains the location of the previous
- * transaction's output that it claims and a signature that matches the
- * output's public key.
- */
-class CTxIn
-{
-public:
-    COutPoint prevout;
-    CScript scriptSig;
-    uint32_t nSequence;
-
-    CTxIn()
-    {
-        nSequence = std::numeric_limits<unsigned int>::max();
-    }
-
-    explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
-    CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(prevout);
-        READWRITE(scriptSig);
-        READWRITE(nSequence);
-    }
-
-    bool IsFinal() const
-    {
-        return (nSequence == std::numeric_limits<uint32_t>::max());
-    }
-
-    friend bool operator==(const CTxIn& a, const CTxIn& b)
-    {
-        return (a.prevout   == b.prevout &&
-                a.scriptSig == b.scriptSig &&
-                a.nSequence == b.nSequence);
-    }
-
-    friend bool operator!=(const CTxIn& a, const CTxIn& b)
-    {
-        return !(a == b);
-    }
-
-    std::string ToString() const;
-};
-
-/** An output of a transaction.  It contains the public key that the next input
- * must be able to sign with to claim it.
- */
-class CTxOut
-{
-public:
-    CAmount nValue;
-    CScript scriptPubKey;
-
-    CTxOut()
-    {
-        SetNull();
-    }
-
-    CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn);
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(nValue);
-        READWRITE(scriptPubKey);
-    }
-
-    void SetNull()
-    {
-        nValue = -1;
-        scriptPubKey.clear();
-    }
-
-    bool IsNull() const
-    {
-        return (nValue == -1);
-    }
-
-    uint256 GetHash() const;
-
-    bool IsDust(CFeeRate minRelayTxFee) const
-    {
-        // "Dust" is defined in terms of CTransaction::minRelayTxFee,
-        // which has units satoshis-per-kilobyte.
-        // If you'd pay more than 1/3 in fees
-        // to spend something, then we consider it dust.
-        // A typical txout is 34 bytes big, and will
-        // need a CTxIn of at least 148 bytes to spend:
-        // so dust is a txout less than 546 satoshis 
-        // with default minRelayTxFee.
-        size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
-        return (nValue < 3*minRelayTxFee.GetFee(nSize));
-    }
-
-    friend bool operator==(const CTxOut& a, const CTxOut& b)
-    {
-        return (a.nValue       == b.nValue &&
-                a.scriptPubKey == b.scriptPubKey);
-    }
-
-    friend bool operator!=(const CTxOut& a, const CTxOut& b)
-    {
-        return !(a == b);
-    }
-
-    std::string ToString() const;
-};
-
-
-struct CMutableTransaction;
-
-/** The basic transaction that is broadcasted on the network and contained in
- * blocks.  A transaction can contain multiple inputs and outputs.
- */
-class CTransaction
-{
-private:
-    /** Memory only. */
-    const uint256 hash;
-    void UpdateHash() const;
-
-public:
-    static const int32_t CURRENT_VERSION=1;
-
-    // The local variables are made const to prevent unintended modification
-    // without updating the cached hash value. However, CTransaction is not
-    // actually immutable; deserialization and assignment are implemented,
-    // and bypass the constness. This is safe, as they update the entire
-    // structure, including the hash.
-    const int32_t nVersion;
-    const std::vector<CTxIn> vin;
-    const std::vector<CTxOut> vout;
-    const uint32_t nLockTime;
-
-    /** Construct a CTransaction that qualifies as IsNull() */
-    CTransaction();
-
-    /** Convert a CMutableTransaction into a CTransaction. */
-    CTransaction(const CMutableTransaction &tx);
-
-    CTransaction& operator=(const CTransaction& tx);
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(*const_cast<int32_t*>(&this->nVersion));
-        nVersion = this->nVersion;
-        READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
-        READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
-        READWRITE(*const_cast<uint32_t*>(&nLockTime));
-        if (ser_action.ForRead())
-            UpdateHash();
-    }
-
-    bool IsNull() const {
-        return vin.empty() && vout.empty();
-    }
-
-    const uint256& GetHash() const {
-        return hash;
-    }
-
-    // Return sum of txouts.
-    CAmount GetValueOut() const;
-    // GetValueIn() is a method on CCoinsViewCache, because
-    // inputs must be known to compute value in.
-
-    // Compute priority, given priority of inputs and (optionally) tx size
-    double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const;
-
-    // Compute modified tx size for priority calculation (optionally given tx size)
-    unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
-
-    bool IsCoinBase() const
-    {
-        return (vin.size() == 1 && vin[0].prevout.IsNull());
-    }
-
-    friend bool operator==(const CTransaction& a, const CTransaction& b)
-    {
-        return a.hash == b.hash;
-    }
-
-    friend bool operator!=(const CTransaction& a, const CTransaction& b)
-    {
-        return a.hash != b.hash;
-    }
-
-    std::string ToString() const;
-};
-
-/** A mutable version of CTransaction. */
-struct CMutableTransaction
-{
-    int32_t nVersion;
-    std::vector<CTxIn> vin;
-    std::vector<CTxOut> vout;
-    uint32_t nLockTime;
-
-    CMutableTransaction();
-    CMutableTransaction(const CTransaction& tx);
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(this->nVersion);
-        nVersion = this->nVersion;
-        READWRITE(vin);
-        READWRITE(vout);
-        READWRITE(nLockTime);
-    }
-
-    /** Compute the hash of this CMutableTransaction. This is computed on the
-     * fly, as opposed to GetHash() in CTransaction, which uses a cached result.
-     */
-    uint256 GetHash() const;
-};
-
 /** wrapper for CTxOut that provides a more compact serialization */
 class CTxOutCompressor
 {
diff --git a/src/core/transaction.cpp b/src/core/transaction.cpp
new file mode 100644
index 000000000000..f835bafb9f7e
--- /dev/null
+++ b/src/core/transaction.cpp
@@ -0,0 +1,142 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "core/transaction.h"
+
+#include "hash.h"
+#include "tinyformat.h"
+#include "utilstrencodings.h"
+
+std::string COutPoint::ToString() const
+{
+    return strprintf("COutPoint(%s, %u)", hash.ToString().substr(0,10), n);
+}
+
+CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, uint32_t nSequenceIn)
+{
+    prevout = prevoutIn;
+    scriptSig = scriptSigIn;
+    nSequence = nSequenceIn;
+}
+
+CTxIn::CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn, uint32_t nSequenceIn)
+{
+    prevout = COutPoint(hashPrevTx, nOut);
+    scriptSig = scriptSigIn;
+    nSequence = nSequenceIn;
+}
+
+std::string CTxIn::ToString() const
+{
+    std::string str;
+    str += "CTxIn(";
+    str += prevout.ToString();
+    if (prevout.IsNull())
+        str += strprintf(", coinbase %s", HexStr(scriptSig));
+    else
+        str += strprintf(", scriptSig=%s", scriptSig.ToString().substr(0,24));
+    if (nSequence != std::numeric_limits<unsigned int>::max())
+        str += strprintf(", nSequence=%u", nSequence);
+    str += ")";
+    return str;
+}
+
+CTxOut::CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn)
+{
+    nValue = nValueIn;
+    scriptPubKey = scriptPubKeyIn;
+}
+
+uint256 CTxOut::GetHash() const
+{
+    return SerializeHash(*this);
+}
+
+std::string CTxOut::ToString() const
+{
+    return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, scriptPubKey.ToString().substr(0,30));
+}
+
+CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
+CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {}
+
+uint256 CMutableTransaction::GetHash() const
+{
+    return SerializeHash(*this);
+}
+
+void CTransaction::UpdateHash() const
+{
+    *const_cast<uint256*>(&hash) = SerializeHash(*this);
+}
+
+CTransaction::CTransaction() : hash(0), nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0) { }
+
+CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {
+    UpdateHash();
+}
+
+CTransaction& CTransaction::operator=(const CTransaction &tx) {
+    *const_cast<int*>(&nVersion) = tx.nVersion;
+    *const_cast<std::vector<CTxIn>*>(&vin) = tx.vin;
+    *const_cast<std::vector<CTxOut>*>(&vout) = tx.vout;
+    *const_cast<unsigned int*>(&nLockTime) = tx.nLockTime;
+    *const_cast<uint256*>(&hash) = tx.hash;
+    return *this;
+}
+
+CAmount CTransaction::GetValueOut() const
+{
+    CAmount nValueOut = 0;
+    for (std::vector<CTxOut>::const_iterator it(vout.begin()); it != vout.end(); ++it)
+    {
+        nValueOut += it->nValue;
+        if (!MoneyRange(it->nValue) || !MoneyRange(nValueOut))
+            throw std::runtime_error("CTransaction::GetValueOut() : value out of range");
+    }
+    return nValueOut;
+}
+
+double CTransaction::ComputePriority(double dPriorityInputs, unsigned int nTxSize) const
+{
+    nTxSize = CalculateModifiedSize(nTxSize);
+    if (nTxSize == 0) return 0.0;
+
+    return dPriorityInputs / nTxSize;
+}
+
+unsigned int CTransaction::CalculateModifiedSize(unsigned int nTxSize) const
+{
+    // In order to avoid disincentivizing cleaning up the UTXO set we don't count
+    // the constant overhead for each txin and up to 110 bytes of scriptSig (which
+    // is enough to cover a compressed pubkey p2sh redemption) for priority.
+    // Providing any more cleanup incentive than making additional inputs free would
+    // risk encouraging people to create junk outputs to redeem later.
+    if (nTxSize == 0)
+        nTxSize = ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION);
+    for (std::vector<CTxIn>::const_iterator it(vin.begin()); it != vin.end(); ++it)
+    {
+        unsigned int offset = 41U + std::min(110U, (unsigned int)it->scriptSig.size());
+        if (nTxSize > offset)
+            nTxSize -= offset;
+    }
+    return nTxSize;
+}
+
+std::string CTransaction::ToString() const
+{
+    std::string str;
+    str += strprintf("CTransaction(hash=%s, ver=%d, vin.size=%u, vout.size=%u, nLockTime=%u)\n",
+        GetHash().ToString().substr(0,10),
+        nVersion,
+        vin.size(),
+        vout.size(),
+        nLockTime);
+    for (unsigned int i = 0; i < vin.size(); i++)
+        str += "    " + vin[i].ToString() + "\n";
+    for (unsigned int i = 0; i < vout.size(); i++)
+        str += "    " + vout[i].ToString() + "\n";
+    return str;
+}
diff --git a/src/core/transaction.h b/src/core/transaction.h
new file mode 100644
index 000000000000..c21558cfeb43
--- /dev/null
+++ b/src/core/transaction.h
@@ -0,0 +1,276 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_CORE_TRANSACTION
+#define H_BITCOIN_CORE_TRANSACTION
+
+#include "amount.h"
+#include "script/script.h"
+#include "serialize.h"
+#include "uint256.h"
+
+/** An outpoint - a combination of a transaction hash and an index n into its vout */
+class COutPoint
+{
+public:
+    uint256 hash;
+    uint32_t n;
+
+    COutPoint() { SetNull(); }
+    COutPoint(uint256 hashIn, uint32_t nIn) { hash = hashIn; n = nIn; }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(FLATDATA(*this));
+    }
+
+    void SetNull() { hash = 0; n = (uint32_t) -1; }
+    bool IsNull() const { return (hash == 0 && n == (uint32_t) -1); }
+
+    friend bool operator<(const COutPoint& a, const COutPoint& b)
+    {
+        return (a.hash < b.hash || (a.hash == b.hash && a.n < b.n));
+    }
+
+    friend bool operator==(const COutPoint& a, const COutPoint& b)
+    {
+        return (a.hash == b.hash && a.n == b.n);
+    }
+
+    friend bool operator!=(const COutPoint& a, const COutPoint& b)
+    {
+        return !(a == b);
+    }
+
+    std::string ToString() const;
+};
+
+/** An input of a transaction.  It contains the location of the previous
+ * transaction's output that it claims and a signature that matches the
+ * output's public key.
+ */
+class CTxIn
+{
+public:
+    COutPoint prevout;
+    CScript scriptSig;
+    uint32_t nSequence;
+
+    CTxIn()
+    {
+        nSequence = std::numeric_limits<unsigned int>::max();
+    }
+
+    explicit CTxIn(COutPoint prevoutIn, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max());
+    CTxIn(uint256 hashPrevTx, uint32_t nOut, CScript scriptSigIn=CScript(), uint32_t nSequenceIn=std::numeric_limits<uint32_t>::max());
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(prevout);
+        READWRITE(scriptSig);
+        READWRITE(nSequence);
+    }
+
+    bool IsFinal() const
+    {
+        return (nSequence == std::numeric_limits<uint32_t>::max());
+    }
+
+    friend bool operator==(const CTxIn& a, const CTxIn& b)
+    {
+        return (a.prevout   == b.prevout &&
+                a.scriptSig == b.scriptSig &&
+                a.nSequence == b.nSequence);
+    }
+
+    friend bool operator!=(const CTxIn& a, const CTxIn& b)
+    {
+        return !(a == b);
+    }
+
+    std::string ToString() const;
+};
+
+/** An output of a transaction.  It contains the public key that the next input
+ * must be able to sign with to claim it.
+ */
+class CTxOut
+{
+public:
+    CAmount nValue;
+    CScript scriptPubKey;
+
+    CTxOut()
+    {
+        SetNull();
+    }
+
+    CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(nValue);
+        READWRITE(scriptPubKey);
+    }
+
+    void SetNull()
+    {
+        nValue = -1;
+        scriptPubKey.clear();
+    }
+
+    bool IsNull() const
+    {
+        return (nValue == -1);
+    }
+
+    uint256 GetHash() const;
+
+    bool IsDust(CFeeRate minRelayTxFee) const
+    {
+        // "Dust" is defined in terms of CTransaction::minRelayTxFee,
+        // which has units satoshis-per-kilobyte.
+        // If you'd pay more than 1/3 in fees
+        // to spend something, then we consider it dust.
+        // A typical txout is 34 bytes big, and will
+        // need a CTxIn of at least 148 bytes to spend:
+        // so dust is a txout less than 546 satoshis 
+        // with default minRelayTxFee.
+        size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
+        return (nValue < 3*minRelayTxFee.GetFee(nSize));
+    }
+
+    friend bool operator==(const CTxOut& a, const CTxOut& b)
+    {
+        return (a.nValue       == b.nValue &&
+                a.scriptPubKey == b.scriptPubKey);
+    }
+
+    friend bool operator!=(const CTxOut& a, const CTxOut& b)
+    {
+        return !(a == b);
+    }
+
+    std::string ToString() const;
+};
+
+struct CMutableTransaction;
+
+/** The basic transaction that is broadcasted on the network and contained in
+ * blocks.  A transaction can contain multiple inputs and outputs.
+ */
+class CTransaction
+{
+private:
+    /** Memory only. */
+    const uint256 hash;
+    void UpdateHash() const;
+
+public:
+    static const int32_t CURRENT_VERSION=1;
+
+    // The local variables are made const to prevent unintended modification
+    // without updating the cached hash value. However, CTransaction is not
+    // actually immutable; deserialization and assignment are implemented,
+    // and bypass the constness. This is safe, as they update the entire
+    // structure, including the hash.
+    const int32_t nVersion;
+    const std::vector<CTxIn> vin;
+    const std::vector<CTxOut> vout;
+    const uint32_t nLockTime;
+
+    /** Construct a CTransaction that qualifies as IsNull() */
+    CTransaction();
+
+    /** Convert a CMutableTransaction into a CTransaction. */
+    CTransaction(const CMutableTransaction &tx);
+
+    CTransaction& operator=(const CTransaction& tx);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(*const_cast<int32_t*>(&this->nVersion));
+        nVersion = this->nVersion;
+        READWRITE(*const_cast<std::vector<CTxIn>*>(&vin));
+        READWRITE(*const_cast<std::vector<CTxOut>*>(&vout));
+        READWRITE(*const_cast<uint32_t*>(&nLockTime));
+        if (ser_action.ForRead())
+            UpdateHash();
+    }
+
+    bool IsNull() const {
+        return vin.empty() && vout.empty();
+    }
+
+    const uint256& GetHash() const {
+        return hash;
+    }
+
+    // Return sum of txouts.
+    CAmount GetValueOut() const;
+    // GetValueIn() is a method on CCoinsViewCache, because
+    // inputs must be known to compute value in.
+
+    // Compute priority, given priority of inputs and (optionally) tx size
+    double ComputePriority(double dPriorityInputs, unsigned int nTxSize=0) const;
+
+    // Compute modified tx size for priority calculation (optionally given tx size)
+    unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
+
+    bool IsCoinBase() const
+    {
+        return (vin.size() == 1 && vin[0].prevout.IsNull());
+    }
+
+    friend bool operator==(const CTransaction& a, const CTransaction& b)
+    {
+        return a.hash == b.hash;
+    }
+
+    friend bool operator!=(const CTransaction& a, const CTransaction& b)
+    {
+        return a.hash != b.hash;
+    }
+
+    std::string ToString() const;
+};
+
+/** A mutable version of CTransaction. */
+struct CMutableTransaction
+{
+    int32_t nVersion;
+    std::vector<CTxIn> vin;
+    std::vector<CTxOut> vout;
+    uint32_t nLockTime;
+
+    CMutableTransaction();
+    CMutableTransaction(const CTransaction& tx);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(this->nVersion);
+        nVersion = this->nVersion;
+        READWRITE(vin);
+        READWRITE(vout);
+        READWRITE(nLockTime);
+    }
+
+    /** Compute the hash of this CMutableTransaction. This is computed on the
+     * fly, as opposed to GetHash() in CTransaction, which uses a cached result.
+     */
+    uint256 GetHash() const;
+};
+
+#endif // H_BITCOIN_CORE_TRANSACTION
diff --git a/src/core_read.cpp b/src/core_read.cpp
index dcbcf4b4f74b..d39bc9a78089 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -4,7 +4,7 @@
 
 #include "core_io.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "script/script.h"
 #include "serialize.h"
 #include "streams.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index b2b29fb367af..a3ae8eec07be 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -5,7 +5,7 @@
 #include "core_io.h"
 
 #include "base58.h"
-#include "core.h"
+#include "core/transaction.h"
 #include "script/script.h"
 #include "script/standard.h"
 #include "serialize.h"
diff --git a/src/main.h b/src/main.h
index 2686ed948f15..3a3687ec1df0 100644
--- a/src/main.h
+++ b/src/main.h
@@ -15,6 +15,7 @@
 #include "chainparams.h"
 #include "coins.h"
 #include "core.h"
+#include "core/transaction.h"
 #include "net.h"
 #include "pow.h"
 #include "script/script.h"
diff --git a/src/miner.cpp b/src/miner.cpp
index 897f7c56d7e5..cf47b65a5cf9 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -7,6 +7,7 @@
 
 #include "amount.h"
 #include "core.h"
+#include "core/transaction.h"
 #include "hash.h"
 #include "main.h"
 #include "net.h"
diff --git a/src/net.cpp b/src/net.cpp
index 6cf64f51c3e6..6cccdca9522c 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -11,7 +11,7 @@
 
 #include "addrman.h"
 #include "chainparams.h"
-#include "core.h"
+#include "core/transaction.h"
 #include "ui_interface.h"
 
 #ifdef WIN32
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 423b559bf7d9..c85f569fd33c 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -4,7 +4,7 @@
 
 #include "bitcoinunits.h"
 
-#include "core.h"
+#include "core/transaction.h"
 
 #include <QStringList>
 
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 91bb10755aa7..22a1f019e995 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -9,7 +9,7 @@
 #include "qvalidatedlineedit.h"
 #include "walletmodel.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "init.h"
 #include "main.h"
 #include "protocol.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index fdfcb59eeb91..d3ce3b3191c5 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
-#include "core.h"
+#include "core/transaction.h"
 #include "core_io.h"
 #include "init.h"
 #include "keystore.h"
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index cd73b88210c0..44f5df28f3cf 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -5,7 +5,7 @@
 
 #include "interpreter.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index bf98c40394f7..0eab0626e59f 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -5,7 +5,7 @@
 
 #include "script/sign.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "key.h"
 #include "keystore.h"
 #include "script/standard.h"
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index 70a800af51b7..78c41814093e 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core.h"
+#include "core/transaction.h"
 #include "main.h"
 
 #include <boost/test/unit_test.hpp>
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 61daa0a3fe76..761210feac72 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -4,7 +4,7 @@
 
 #include "util.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "random.h"
 #include "sync.h"
 #include "utilstrencodings.h"
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 8a73ce961cfd..0731d843f3ee 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -5,7 +5,6 @@
 
 #include "txdb.h"
 
-#include "core.h"
 #include "pow.h"
 #include "uint256.h"
 
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index b0d6b4aefa8a..c042dd8467cb 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -5,7 +5,6 @@
 
 #include "txmempool.h"
 
-#include "core.h"
 #include "streams.h"
 #include "util.h"
 #include "utilmoneystr.h"
diff --git a/src/txmempool.h b/src/txmempool.h
index df2fbc78c37d..2ec80cb86090 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -10,7 +10,7 @@
 
 #include "amount.h"
 #include "coins.h"
-#include "core.h"
+#include "core/transaction.h"
 #include "sync.h"
 
 class CAutoFile;
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index 95be06aa1875..267a5b845c62 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -5,7 +5,7 @@
 
 #include "utilmoneystr.h"
 
-#include "core.h"
+#include "core/transaction.h"
 #include "tinyformat.h"
 #include "utilstrencodings.h"
 
diff --git a/src/wallet.h b/src/wallet.h
index 6a4b4b7f8d8f..4c559cb7b153 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -8,6 +8,7 @@
 
 #include "amount.h"
 #include "core.h"
+#include "core/transaction.h"
 #include "crypter.h"
 #include "key.h"
 #include "keystore.h"

From 999a2ab41ec96311c145d74822c246a3b92a9b33 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sat, 18 Oct 2014 19:53:37 +0200
Subject: [PATCH 0931/1819] MOVEONLY: separate CTxUndo out of core

---
 src/Makefile.am |  1 +
 src/coins.h     |  1 +
 src/core.h      | 59 ----------------------------------------
 src/main.h      |  2 +-
 src/undo.h      | 71 +++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 74 insertions(+), 60 deletions(-)
 create mode 100644 src/undo.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 5485127e6811..6d0e1ed7b879 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -119,6 +119,7 @@ BITCOIN_CORE_H = \
   txmempool.h \
   ui_interface.h \
   uint256.h \
+  undo.h \
   util.h \
   utilstrencodings.h \
   utilmoneystr.h \
diff --git a/src/coins.h b/src/coins.h
index eafe3bec6413..295b3d70d14b 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -10,6 +10,7 @@
 #include "core/transaction.h"
 #include "serialize.h"
 #include "uint256.h"
+#include "undo.h"
 
 #include <assert.h>
 #include <stdint.h>
diff --git a/src/core.h b/src/core.h
index ad4c8832503d..aeae9a1911cd 100644
--- a/src/core.h
+++ b/src/core.h
@@ -40,65 +40,6 @@ class CTxOutCompressor
     }
 };
 
-/** Undo information for a CTxIn
- *
- *  Contains the prevout's CTxOut being spent, and if this was the
- *  last output of the affected transaction, its metadata as well
- *  (coinbase or not, height, transaction version)
- */
-class CTxInUndo
-{
-public:
-    CTxOut txout;         // the txout data before being spent
-    bool fCoinBase;       // if the outpoint was the last unspent: whether it belonged to a coinbase
-    unsigned int nHeight; // if the outpoint was the last unspent: its height
-    int nVersion;         // if the outpoint was the last unspent: its version
-
-    CTxInUndo() : txout(), fCoinBase(false), nHeight(0), nVersion(0) {}
-    CTxInUndo(const CTxOut &txoutIn, bool fCoinBaseIn = false, unsigned int nHeightIn = 0, int nVersionIn = 0) : txout(txoutIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), nVersion(nVersionIn) { }
-
-    unsigned int GetSerializeSize(int nType, int nVersion) const {
-        return ::GetSerializeSize(VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion) +
-               (nHeight > 0 ? ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion) : 0) +
-               ::GetSerializeSize(CTxOutCompressor(REF(txout)), nType, nVersion);
-    }
-
-    template<typename Stream>
-    void Serialize(Stream &s, int nType, int nVersion) const {
-        ::Serialize(s, VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion);
-        if (nHeight > 0)
-            ::Serialize(s, VARINT(this->nVersion), nType, nVersion);
-        ::Serialize(s, CTxOutCompressor(REF(txout)), nType, nVersion);
-    }
-
-    template<typename Stream>
-    void Unserialize(Stream &s, int nType, int nVersion) {
-        unsigned int nCode = 0;
-        ::Unserialize(s, VARINT(nCode), nType, nVersion);
-        nHeight = nCode / 2;
-        fCoinBase = nCode & 1;
-        if (nHeight > 0)
-            ::Unserialize(s, VARINT(this->nVersion), nType, nVersion);
-        ::Unserialize(s, REF(CTxOutCompressor(REF(txout))), nType, nVersion);
-    }
-};
-
-/** Undo information for a CTransaction */
-class CTxUndo
-{
-public:
-    // undo information for all txins
-    std::vector<CTxInUndo> vprevout;
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(vprevout);
-    }
-};
-
-
 /** Nodes collect new transactions into a block, hash them into a hash tree,
  * and scan through nonce values to make the block's hash satisfy proof-of-work
  * requirements.  When they solve the proof-of-work, they broadcast the block
diff --git a/src/main.h b/src/main.h
index 3a3687ec1df0..09f22471d63b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -25,6 +25,7 @@
 #include "tinyformat.h"
 #include "txmempool.h"
 #include "uint256.h"
+#include "undo.h"
 
 #include <algorithm>
 #include <exception>
@@ -129,7 +130,6 @@ static const uint64_t nMinDiskSpace = 52428800;
 
 
 class CBlockTreeDB;
-class CTxUndo;
 class CScriptCheck;
 class CValidationState;
 class CValidationInterface;
diff --git a/src/undo.h b/src/undo.h
new file mode 100644
index 000000000000..78e37f628ca2
--- /dev/null
+++ b/src/undo.h
@@ -0,0 +1,71 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef H_BITCOIN_TXUNDO
+#define H_BITCOIN_TXUNDO
+
+#include "core.h" // Only for CTxOutCompressor
+#include "core/transaction.h"
+#include "serialize.h"
+
+/** Undo information for a CTxIn
+ *
+ *  Contains the prevout's CTxOut being spent, and if this was the
+ *  last output of the affected transaction, its metadata as well
+ *  (coinbase or not, height, transaction version)
+ */
+class CTxInUndo
+{
+public:
+    CTxOut txout;         // the txout data before being spent
+    bool fCoinBase;       // if the outpoint was the last unspent: whether it belonged to a coinbase
+    unsigned int nHeight; // if the outpoint was the last unspent: its height
+    int nVersion;         // if the outpoint was the last unspent: its version
+
+    CTxInUndo() : txout(), fCoinBase(false), nHeight(0), nVersion(0) {}
+    CTxInUndo(const CTxOut &txoutIn, bool fCoinBaseIn = false, unsigned int nHeightIn = 0, int nVersionIn = 0) : txout(txoutIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), nVersion(nVersionIn) { }
+
+    unsigned int GetSerializeSize(int nType, int nVersion) const {
+        return ::GetSerializeSize(VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion) +
+               (nHeight > 0 ? ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion) : 0) +
+               ::GetSerializeSize(CTxOutCompressor(REF(txout)), nType, nVersion);
+    }
+
+    template<typename Stream>
+    void Serialize(Stream &s, int nType, int nVersion) const {
+        ::Serialize(s, VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion);
+        if (nHeight > 0)
+            ::Serialize(s, VARINT(this->nVersion), nType, nVersion);
+        ::Serialize(s, CTxOutCompressor(REF(txout)), nType, nVersion);
+    }
+
+    template<typename Stream>
+    void Unserialize(Stream &s, int nType, int nVersion) {
+        unsigned int nCode = 0;
+        ::Unserialize(s, VARINT(nCode), nType, nVersion);
+        nHeight = nCode / 2;
+        fCoinBase = nCode & 1;
+        if (nHeight > 0)
+            ::Unserialize(s, VARINT(this->nVersion), nType, nVersion);
+        ::Unserialize(s, REF(CTxOutCompressor(REF(txout))), nType, nVersion);
+    }
+};
+
+/** Undo information for a CTransaction */
+class CTxUndo
+{
+public:
+    // undo information for all txins
+    std::vector<CTxInUndo> vprevout;
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vprevout);
+    }
+};
+
+#endif // H_BITCOIN_TXUNDO

From 561e9e9de9793c187f29ab2d41b43a36447e9357 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Sun, 19 Oct 2014 04:28:43 +0200
Subject: [PATCH 0932/1819] MOVEONLY: Move script/compressor out of script and
 put CTxOutCompressor (from core) with it

---
 src/Makefile.am                 |  4 +--
 src/coins.h                     |  3 +-
 src/{script => }/compressor.cpp | 55 +++++++++++++++++++++++++++++++++
 src/{script => }/compressor.h   | 36 +++++++++++++++++++--
 src/core.cpp                    | 54 --------------------------------
 src/core.h                      | 30 ------------------
 src/test/compress_tests.cpp     |  2 +-
 src/undo.h                      |  2 +-
 8 files changed, 93 insertions(+), 93 deletions(-)
 rename src/{script => }/compressor.cpp (73%)
 rename src/{script => }/compressor.h (76%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 6d0e1ed7b879..0385ad902558 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -80,6 +80,7 @@ BITCOIN_CORE_H = \
   coincontrol.h \
   coins.h \
   compat.h \
+  compressor.h \
   core.h \
   core/transaction.h \
   core_io.h \
@@ -103,7 +104,6 @@ BITCOIN_CORE_H = \
   rpcclient.h \
   rpcprotocol.h \
   rpcserver.h \
-  script/compressor.h \
   script/interpreter.h \
   script/script.h \
   script/sigcache.h \
@@ -214,6 +214,7 @@ libbitcoin_common_a_SOURCES = \
   base58.cpp \
   chainparams.cpp \
   coins.cpp \
+  compressor.cpp \
   core.cpp \
   core/transaction.cpp \
   core_read.cpp \
@@ -223,7 +224,6 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
-  script/compressor.cpp \
   script/interpreter.cpp \
   script/script.cpp \
   script/sigcache.cpp \
diff --git a/src/coins.h b/src/coins.h
index 295b3d70d14b..ee9051562bf4 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -6,8 +6,7 @@
 #ifndef BITCOIN_COINS_H
 #define BITCOIN_COINS_H
 
-#include "core.h" // Only for CTxOutCompressor
-#include "core/transaction.h"
+#include "compressor.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "undo.h"
diff --git a/src/script/compressor.cpp b/src/compressor.cpp
similarity index 73%
rename from src/script/compressor.cpp
rename to src/compressor.cpp
index af1acf48db38..806175dd3ecd 100644
--- a/src/script/compressor.cpp
+++ b/src/compressor.cpp
@@ -5,6 +5,7 @@
 
 #include "compressor.h"
 
+#include "hash.h"
 #include "key.h"
 #include "script/standard.h"
 
@@ -128,3 +129,57 @@ bool CScriptCompressor::Decompress(unsigned int nSize, const std::vector<unsigne
     }
     return false;
 }
+
+// Amount compression:
+// * If the amount is 0, output 0
+// * first, divide the amount (in base units) by the largest power of 10 possible; call the exponent e (e is max 9)
+// * if e<9, the last digit of the resulting number cannot be 0; store it as d, and drop it (divide by 10)
+//   * call the result n
+//   * output 1 + 10*(9*n + d - 1) + e
+// * if e==9, we only know the resulting number is not zero, so output 1 + 10*(n - 1) + 9
+// (this is decodable, as d is in [1-9] and e is in [0-9])
+
+uint64_t CTxOutCompressor::CompressAmount(uint64_t n)
+{
+    if (n == 0)
+        return 0;
+    int e = 0;
+    while (((n % 10) == 0) && e < 9) {
+        n /= 10;
+        e++;
+    }
+    if (e < 9) {
+        int d = (n % 10);
+        assert(d >= 1 && d <= 9);
+        n /= 10;
+        return 1 + (n*9 + d - 1)*10 + e;
+    } else {
+        return 1 + (n - 1)*10 + 9;
+    }
+}
+
+uint64_t CTxOutCompressor::DecompressAmount(uint64_t x)
+{
+    // x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
+    if (x == 0)
+        return 0;
+    x--;
+    // x = 10*(9*n + d - 1) + e
+    int e = x % 10;
+    x /= 10;
+    uint64_t n = 0;
+    if (e < 9) {
+        // x = 9*n + d - 1
+        int d = (x % 9) + 1;
+        x /= 9;
+        // x = n
+        n = x*10 + d;
+    } else {
+        n = x+1;
+    }
+    while (e) {
+        n *= 10;
+        e--;
+    }
+    return n;
+}
diff --git a/src/script/compressor.h b/src/compressor.h
similarity index 76%
rename from src/script/compressor.h
rename to src/compressor.h
index 154e0b266243..a612c3a883df 100644
--- a/src/script/compressor.h
+++ b/src/compressor.h
@@ -3,9 +3,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT_COMPRESSOR
-#define H_BITCOIN_SCRIPT_COMPRESSOR
+#ifndef H_BITCOIN_COMPRESSOR
+#define H_BITCOIN_COMPRESSOR
 
+#include "core/transaction.h"
 #include "script/script.h"
 #include "serialize.h"
 
@@ -86,4 +87,33 @@ class CScriptCompressor
     }
 };
 
-#endif // H_BITCOIN_SCRIPT_COMPRESSOR
+/** wrapper for CTxOut that provides a more compact serialization */
+class CTxOutCompressor
+{
+private:
+    CTxOut &txout;
+
+public:
+    static uint64_t CompressAmount(uint64_t nAmount);
+    static uint64_t DecompressAmount(uint64_t nAmount);
+
+    CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        if (!ser_action.ForRead()) {
+            uint64_t nVal = CompressAmount(txout.nValue);
+            READWRITE(VARINT(nVal));
+        } else {
+            uint64_t nVal = 0;
+            READWRITE(VARINT(nVal));
+            txout.nValue = DecompressAmount(nVal);
+        }
+        CScriptCompressor cscript(REF(txout.scriptPubKey));
+        READWRITE(cscript);
+    }
+};
+
+#endif // H_BITCOIN_COMPRESSOR
diff --git a/src/core.cpp b/src/core.cpp
index 34188bca63a3..08139d54249e 100644
--- a/src/core.cpp
+++ b/src/core.cpp
@@ -9,60 +9,6 @@
 #include "tinyformat.h"
 #include "utilstrencodings.h"
 
-// Amount compression:
-// * If the amount is 0, output 0
-// * first, divide the amount (in base units) by the largest power of 10 possible; call the exponent e (e is max 9)
-// * if e<9, the last digit of the resulting number cannot be 0; store it as d, and drop it (divide by 10)
-//   * call the result n
-//   * output 1 + 10*(9*n + d - 1) + e
-// * if e==9, we only know the resulting number is not zero, so output 1 + 10*(n - 1) + 9
-// (this is decodable, as d is in [1-9] and e is in [0-9])
-
-uint64_t CTxOutCompressor::CompressAmount(uint64_t n)
-{
-    if (n == 0)
-        return 0;
-    int e = 0;
-    while (((n % 10) == 0) && e < 9) {
-        n /= 10;
-        e++;
-    }
-    if (e < 9) {
-        int d = (n % 10);
-        assert(d >= 1 && d <= 9);
-        n /= 10;
-        return 1 + (n*9 + d - 1)*10 + e;
-    } else {
-        return 1 + (n - 1)*10 + 9;
-    }
-}
-
-uint64_t CTxOutCompressor::DecompressAmount(uint64_t x)
-{
-    // x = 0  OR  x = 1+10*(9*n + d - 1) + e  OR  x = 1+10*(n - 1) + 9
-    if (x == 0)
-        return 0;
-    x--;
-    // x = 10*(9*n + d - 1) + e
-    int e = x % 10;
-    x /= 10;
-    uint64_t n = 0;
-    if (e < 9) {
-        // x = 9*n + d - 1
-        int d = (x % 9) + 1;
-        x /= 9;
-        // x = n
-        n = x*10 + d;
-    } else {
-        n = x+1;
-    }
-    while (e) {
-        n *= 10;
-        e--;
-    }
-    return n;
-}
-
 uint256 CBlockHeader::GetHash() const
 {
     return Hash(BEGIN(nVersion), END(nNonce));
diff --git a/src/core.h b/src/core.h
index aeae9a1911cd..b2288e24ca48 100644
--- a/src/core.h
+++ b/src/core.h
@@ -7,39 +7,9 @@
 #define BITCOIN_CORE_H
 
 #include "core/transaction.h"
-#include "script/compressor.h"
 #include "serialize.h"
 #include "uint256.h"
 
-/** wrapper for CTxOut that provides a more compact serialization */
-class CTxOutCompressor
-{
-private:
-    CTxOut &txout;
-
-public:
-    static uint64_t CompressAmount(uint64_t nAmount);
-    static uint64_t DecompressAmount(uint64_t nAmount);
-
-    CTxOutCompressor(CTxOut &txoutIn) : txout(txoutIn) { }
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        if (!ser_action.ForRead()) {
-            uint64_t nVal = CompressAmount(txout.nValue);
-            READWRITE(VARINT(nVal));
-        } else {
-            uint64_t nVal = 0;
-            READWRITE(VARINT(nVal));
-            txout.nValue = DecompressAmount(nVal);
-        }
-        CScriptCompressor cscript(REF(txout.scriptPubKey));
-        READWRITE(cscript);
-    }
-};
-
 /** Nodes collect new transactions into a block, hash them into a hash tree,
  * and scan through nonce values to make the block's hash satisfy proof-of-work
  * requirements.  When they solve the proof-of-work, they broadcast the block
diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp
index 719955ba852b..bf404cf0cfa8 100644
--- a/src/test/compress_tests.cpp
+++ b/src/test/compress_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "main.h"
+#include "compressor.h"
 #include "util.h"
 
 #include <stdint.h>
diff --git a/src/undo.h b/src/undo.h
index 78e37f628ca2..232c19342999 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -6,7 +6,7 @@
 #ifndef H_BITCOIN_TXUNDO
 #define H_BITCOIN_TXUNDO
 
-#include "core.h" // Only for CTxOutCompressor
+#include "compressor.h" 
 #include "core/transaction.h"
 #include "serialize.h"
 

From 99f41b9cf7b8e039cea75500a905498a1f6969f3 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Tue, 21 Oct 2014 00:13:47 +0200
Subject: [PATCH 0933/1819] MOVEONLY: core.o -> core/block.o

---
 src/Makefile.am                  | 4 ++--
 src/chain.h                      | 2 +-
 src/chainparams.h                | 2 +-
 src/{core.cpp => core/block.cpp} | 2 +-
 src/{core.h => core/block.h}     | 6 +++---
 src/main.h                       | 2 +-
 src/miner.cpp                    | 2 +-
 src/pow.cpp                      | 2 +-
 src/wallet.h                     | 2 +-
 9 files changed, 12 insertions(+), 12 deletions(-)
 rename src/{core.cpp => core/block.cpp} (99%)
 rename src/{core.h => core/block.h} (97%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 0385ad902558..4ca75d6a775a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,7 +81,7 @@ BITCOIN_CORE_H = \
   coins.h \
   compat.h \
   compressor.h \
-  core.h \
+  core/block.h \
   core/transaction.h \
   core_io.h \
   crypter.h \
@@ -215,7 +215,7 @@ libbitcoin_common_a_SOURCES = \
   chainparams.cpp \
   coins.cpp \
   compressor.cpp \
-  core.cpp \
+  core/block.cpp \
   core/transaction.cpp \
   core_read.cpp \
   core_write.cpp \
diff --git a/src/chain.h b/src/chain.h
index 290150476e75..2a5577162291 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -6,7 +6,7 @@
 #ifndef H_BITCOIN_CHAIN
 #define H_BITCOIN_CHAIN
 
-#include "core.h"
+#include "core/block.h"
 #include "pow.h"
 #include "tinyformat.h"
 #include "uint256.h"
diff --git a/src/chainparams.h b/src/chainparams.h
index f157419bb26f..e27728dbd541 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -6,9 +6,9 @@
 #ifndef BITCOIN_CHAIN_PARAMS_H
 #define BITCOIN_CHAIN_PARAMS_H
 
-#include "core.h"
 #include "chainparamsbase.h"
 #include "checkpoints.h"
+#include "core/block.h"
 #include "protocol.h"
 #include "uint256.h"
 
diff --git a/src/core.cpp b/src/core/block.cpp
similarity index 99%
rename from src/core.cpp
rename to src/core/block.cpp
index 08139d54249e..2010d44dac4b 100644
--- a/src/core.cpp
+++ b/src/core/block.cpp
@@ -3,7 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core.h"
+#include "core/block.h"
 
 #include "hash.h"
 #include "tinyformat.h"
diff --git a/src/core.h b/src/core/block.h
similarity index 97%
rename from src/core.h
rename to src/core/block.h
index b2288e24ca48..f1eb7a844fdb 100644
--- a/src/core.h
+++ b/src/core/block.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CORE_H
-#define BITCOIN_CORE_H
+#ifndef H_BITCOIN_CORE_BLOCK
+#define H_BITCOIN_CORE_BLOCK
 
 #include "core/transaction.h"
 #include "serialize.h"
@@ -165,4 +165,4 @@ struct CBlockLocator
     }
 };
 
-#endif // BITCOIN_CORE_H
+#endif // H_BITCOIN_CORE_BLOCK
diff --git a/src/main.h b/src/main.h
index 09f22471d63b..1941ca705981 100644
--- a/src/main.h
+++ b/src/main.h
@@ -14,7 +14,7 @@
 #include "chain.h"
 #include "chainparams.h"
 #include "coins.h"
-#include "core.h"
+#include "core/block.h"
 #include "core/transaction.h"
 #include "net.h"
 #include "pow.h"
diff --git a/src/miner.cpp b/src/miner.cpp
index cf47b65a5cf9..0235de3ab3d3 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -6,7 +6,7 @@
 #include "miner.h"
 
 #include "amount.h"
-#include "core.h"
+#include "core/block.h"
 #include "core/transaction.h"
 #include "hash.h"
 #include "main.h"
diff --git a/src/pow.cpp b/src/pow.cpp
index 75fbfc6a6d50..af7fc488ef36 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -6,7 +6,7 @@
 #include "pow.h"
 
 #include "chainparams.h"
-#include "core.h"
+#include "core/block.h"
 #include "main.h"
 #include "timedata.h"
 #include "uint256.h"
diff --git a/src/wallet.h b/src/wallet.h
index 4c559cb7b153..acb30970c64f 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -7,7 +7,7 @@
 #define BITCOIN_WALLET_H
 
 #include "amount.h"
-#include "core.h"
+#include "core/block.h"
 #include "core/transaction.h"
 #include "crypter.h"
 #include "key.h"

From bdaec6abd35dd93ae6b29f44b8cbf9c3af3f6805 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 21 Oct 2014 14:38:25 -0400
Subject: [PATCH 0934/1819] boost: remove CPubKey dependency from CECKey.
 Follow-up of e405aa48

---
 src/key.cpp | 49 ++++++++++++++++++++++++++++---------------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 079e2c65405a..d2001717f1ab 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -201,21 +201,20 @@ class CECKey {
         return false;
     }
 
-    void GetPubKey(CPubKey &pubkey, bool fCompressed) {
+    void GetPubKey(std::vector<unsigned char> &pubkey, bool fCompressed) {
         EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
         int nSize = i2o_ECPublicKey(pkey, NULL);
         assert(nSize);
         assert(nSize <= 65);
-        unsigned char c[65];
-        unsigned char *pbegin = c;
+        pubkey.clear();
+        pubkey.resize(nSize);
+        unsigned char *pbegin(begin_ptr(pubkey));
         int nSize2 = i2o_ECPublicKey(pkey, &pbegin);
         assert(nSize == nSize2);
-        pubkey.Set(&c[0], &c[nSize]);
     }
 
-    bool SetPubKey(const CPubKey &pubkey) {
-        const unsigned char* pbegin = pubkey.begin();
-        return o2i_ECPublicKey(&pkey, &pbegin, pubkey.size()) != NULL;
+    bool SetPubKey(const unsigned char* pubkey, size_t size) {
+        return o2i_ECPublicKey(&pkey, &pubkey, size) != NULL;
     }
 
     bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) {
@@ -261,12 +260,12 @@ class CECKey {
         int nBitsR = BN_num_bits(sig->r);
         int nBitsS = BN_num_bits(sig->s);
         if (nBitsR <= 256 && nBitsS <= 256) {
-            CPubKey pubkey;
+            std::vector<unsigned char> pubkey;
             GetPubKey(pubkey, true);
             for (int i=0; i<4; i++) {
                 CECKey keyRec;
                 if (ECDSA_SIG_recover_key_GFp(keyRec.pkey, sig, (unsigned char*)&hash, sizeof(hash), i, 1) == 1) {
-                    CPubKey pubkeyRec;
+                    std::vector<unsigned char> pubkeyRec;
                     keyRec.GetPubKey(pubkeyRec, true);
                     if (pubkeyRec == pubkey) {
                         rec = i;
@@ -455,19 +454,21 @@ CPrivKey CKey::GetPrivKey() const {
 
 CPubKey CKey::GetPubKey() const {
     assert(fValid);
-    CPubKey pubkey;
+    CPubKey result;
 #ifdef USE_SECP256K1
     int clen = 65;
-    int ret = secp256k1_ecdsa_pubkey_create((unsigned char*)pubkey.begin(), &clen, begin(), fCompressed);
+    int ret = secp256k1_ecdsa_pubkey_create((unsigned char*)result.begin(), &clen, begin(), fCompressed);
+    assert((int)result.size() == clen);
     assert(ret);
-    assert(pubkey.IsValid());
-    assert((int)pubkey.size() == clen);
 #else
+    std::vector<unsigned char> pubkey;
     CECKey key;
     key.SetSecretBytes(vch);
     key.GetPubKey(pubkey, fCompressed);
+    result.Set(pubkey.begin(), pubkey.end());
 #endif
-    return pubkey;
+    assert(result.IsValid());
+    return result;
 }
 
 bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) const {
@@ -544,7 +545,7 @@ bool CPubKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchS
         return false;
 #else
     CECKey key;
-    if (!key.SetPubKey(*this))
+    if (!key.SetPubKey(begin(), size()))
         return false;
     if (!key.Verify(hash, vchSig))
         return false;
@@ -566,7 +567,9 @@ bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned cha
     CECKey key;
     if (!key.Recover(hash, &vchSig[1], recid))
         return false;
-    key.GetPubKey(*this, fComp);
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, fComp);
+    Set(pubkey.begin(), pubkey.end());
 #endif
     return true;
 }
@@ -579,7 +582,7 @@ bool CPubKey::IsFullyValid() const {
         return false;
 #else
     CECKey key;
-    if (!key.SetPubKey(*this))
+    if (!key.SetPubKey(begin(), size()))
         return false;
 #endif
     return true;
@@ -595,9 +598,11 @@ bool CPubKey::Decompress() {
     assert(clen == (int)size());
 #else
     CECKey key;
-    if (!key.SetPubKey(*this))
+    if (!key.SetPubKey(begin(), size()))
         return false;
-    key.GetPubKey(*this, false);
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, false);
+    Set(pubkey.begin(), pubkey.end());
 #endif
     return true;
 }
@@ -652,9 +657,11 @@ bool CPubKey::Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned i
     bool ret = secp256k1_ecdsa_pubkey_tweak_add((unsigned char*)pubkeyChild.begin(), pubkeyChild.size(), out);
 #else
     CECKey key;
-    bool ret = key.SetPubKey(*this);
+    bool ret = key.SetPubKey(begin(), size());
     ret &= key.TweakPublic(out);
-    key.GetPubKey(pubkeyChild, true);
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, true);
+    pubkeyChild.Set(pubkey.begin(), pubkey.end());
 #endif
     return ret;
 }

From 50f71cd52e1eb35b10564f73a54fe5ea5b245418 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 21 Oct 2014 15:04:03 -0400
Subject: [PATCH 0935/1819] boost: code movement only: split CECKey into
 separate files

---
 src/Makefile.am   |   2 +
 src/ecwrapper.cpp | 333 ++++++++++++++++++++++++++++++++++++++++++++++
 src/ecwrapper.h   |  46 +++++++
 src/key.cpp       | 333 +---------------------------------------------
 4 files changed, 384 insertions(+), 330 deletions(-)
 create mode 100644 src/ecwrapper.cpp
 create mode 100644 src/ecwrapper.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 155adfef7d34..00da8b237235 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -82,6 +82,7 @@ BITCOIN_CORE_H = \
   core_io.h \
   crypter.h \
   db.h \
+  ecwrapper.h \
   hash.h \
   init.h \
   key.h \
@@ -211,6 +212,7 @@ libbitcoin_common_a_SOURCES = \
   core.cpp \
   core_read.cpp \
   core_write.cpp \
+  ecwrapper.cpp \
   hash.cpp \
   key.cpp \
   keystore.cpp \
diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
new file mode 100644
index 000000000000..e5db6709272d
--- /dev/null
+++ b/src/ecwrapper.cpp
@@ -0,0 +1,333 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "ecwrapper.h"
+
+#include "serialize.h"
+#include "uint256.h"
+
+#include <openssl/bn.h>
+#include <openssl/ecdsa.h>
+#include <openssl/obj_mac.h>
+
+namespace {
+
+// Generate a private key from just the secret parameter
+int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
+{
+    int ok = 0;
+    BN_CTX *ctx = NULL;
+    EC_POINT *pub_key = NULL;
+
+    if (!eckey) return 0;
+
+    const EC_GROUP *group = EC_KEY_get0_group(eckey);
+
+    if ((ctx = BN_CTX_new()) == NULL)
+        goto err;
+
+    pub_key = EC_POINT_new(group);
+
+    if (pub_key == NULL)
+        goto err;
+
+    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
+        goto err;
+
+    EC_KEY_set_private_key(eckey,priv_key);
+    EC_KEY_set_public_key(eckey,pub_key);
+
+    ok = 1;
+
+err:
+
+    if (pub_key)
+        EC_POINT_free(pub_key);
+    if (ctx != NULL)
+        BN_CTX_free(ctx);
+
+    return(ok);
+}
+
+// Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
+// recid selects which key is recovered
+// if check is non-zero, additional checks are performed
+int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check)
+{
+    if (!eckey) return 0;
+
+    int ret = 0;
+    BN_CTX *ctx = NULL;
+
+    BIGNUM *x = NULL;
+    BIGNUM *e = NULL;
+    BIGNUM *order = NULL;
+    BIGNUM *sor = NULL;
+    BIGNUM *eor = NULL;
+    BIGNUM *field = NULL;
+    EC_POINT *R = NULL;
+    EC_POINT *O = NULL;
+    EC_POINT *Q = NULL;
+    BIGNUM *rr = NULL;
+    BIGNUM *zero = NULL;
+    int n = 0;
+    int i = recid / 2;
+
+    const EC_GROUP *group = EC_KEY_get0_group(eckey);
+    if ((ctx = BN_CTX_new()) == NULL) { ret = -1; goto err; }
+    BN_CTX_start(ctx);
+    order = BN_CTX_get(ctx);
+    if (!EC_GROUP_get_order(group, order, ctx)) { ret = -2; goto err; }
+    x = BN_CTX_get(ctx);
+    if (!BN_copy(x, order)) { ret=-1; goto err; }
+    if (!BN_mul_word(x, i)) { ret=-1; goto err; }
+    if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; }
+    field = BN_CTX_get(ctx);
+    if (!EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx)) { ret=-2; goto err; }
+    if (BN_cmp(x, field) >= 0) { ret=0; goto err; }
+    if ((R = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
+    if (!EC_POINT_set_compressed_coordinates_GFp(group, R, x, recid % 2, ctx)) { ret=0; goto err; }
+    if (check)
+    {
+        if ((O = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
+        if (!EC_POINT_mul(group, O, NULL, R, order, ctx)) { ret=-2; goto err; }
+        if (!EC_POINT_is_at_infinity(group, O)) { ret = 0; goto err; }
+    }
+    if ((Q = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
+    n = EC_GROUP_get_degree(group);
+    e = BN_CTX_get(ctx);
+    if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; }
+    if (8*msglen > n) BN_rshift(e, e, 8-(n & 7));
+    zero = BN_CTX_get(ctx);
+    if (!BN_zero(zero)) { ret=-1; goto err; }
+    if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }
+    rr = BN_CTX_get(ctx);
+    if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; }
+    sor = BN_CTX_get(ctx);
+    if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; }
+    eor = BN_CTX_get(ctx);
+    if (!BN_mod_mul(eor, e, rr, order, ctx)) { ret=-1; goto err; }
+    if (!EC_POINT_mul(group, Q, eor, R, sor, ctx)) { ret=-2; goto err; }
+    if (!EC_KEY_set_public_key(eckey, Q)) { ret=-2; goto err; }
+
+    ret = 1;
+
+err:
+    if (ctx) {
+        BN_CTX_end(ctx);
+        BN_CTX_free(ctx);
+    }
+    if (R != NULL) EC_POINT_free(R);
+    if (O != NULL) EC_POINT_free(O);
+    if (Q != NULL) EC_POINT_free(Q);
+    return ret;
+}
+
+} // anon namespace
+
+CECKey::CECKey() {
+    pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
+    assert(pkey != NULL);
+}
+
+CECKey::~CECKey() {
+    EC_KEY_free(pkey);
+}
+
+void CECKey::GetSecretBytes(unsigned char vch[32]) const {
+    const BIGNUM *bn = EC_KEY_get0_private_key(pkey);
+    assert(bn);
+    int nBytes = BN_num_bytes(bn);
+    int n=BN_bn2bin(bn,&vch[32 - nBytes]);
+    assert(n == nBytes);
+    memset(vch, 0, 32 - nBytes);
+}
+
+void CECKey::SetSecretBytes(const unsigned char vch[32]) {
+    bool ret;
+    BIGNUM bn;
+    BN_init(&bn);
+    ret = BN_bin2bn(vch, 32, &bn) != NULL;
+    assert(ret);
+    ret = EC_KEY_regenerate_key(pkey, &bn) != 0;
+    assert(ret);
+    BN_clear_free(&bn);
+}
+
+int CECKey::GetPrivKeySize(bool fCompressed) {
+    EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
+    return i2d_ECPrivateKey(pkey, NULL);
+}
+int CECKey::GetPrivKey(unsigned char* privkey, bool fCompressed) {
+    EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
+    return i2d_ECPrivateKey(pkey, &privkey);
+}
+
+bool CECKey::SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck) {
+    if (d2i_ECPrivateKey(&pkey, &privkey, size)) {
+        if(fSkipCheck)
+            return true;
+
+        // d2i_ECPrivateKey returns true if parsing succeeds.
+        // This doesn't necessarily mean the key is valid.
+        if (EC_KEY_check_key(pkey))
+            return true;
+    }
+    return false;
+}
+
+void CECKey::GetPubKey(std::vector<unsigned char> &pubkey, bool fCompressed) {
+    EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
+    int nSize = i2o_ECPublicKey(pkey, NULL);
+    assert(nSize);
+    assert(nSize <= 65);
+    pubkey.clear();
+    pubkey.resize(nSize);
+    unsigned char *pbegin(begin_ptr(pubkey));
+    int nSize2 = i2o_ECPublicKey(pkey, &pbegin);
+    assert(nSize == nSize2);
+}
+
+bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
+    return o2i_ECPublicKey(&pkey, &pubkey, size) != NULL;
+}
+
+bool CECKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) {
+    vchSig.clear();
+    ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
+    if (sig == NULL)
+        return false;
+    BN_CTX *ctx = BN_CTX_new();
+    BN_CTX_start(ctx);
+    const EC_GROUP *group = EC_KEY_get0_group(pkey);
+    BIGNUM *order = BN_CTX_get(ctx);
+    BIGNUM *halforder = BN_CTX_get(ctx);
+    EC_GROUP_get_order(group, order, ctx);
+    BN_rshift1(halforder, order);
+    if (lowS && BN_cmp(sig->s, halforder) > 0) {
+        // enforce low S values, by negating the value (modulo the order) if above order/2.
+        BN_sub(sig->s, order, sig->s);
+    }
+    BN_CTX_end(ctx);
+    BN_CTX_free(ctx);
+    unsigned int nSize = ECDSA_size(pkey);
+    vchSig.resize(nSize); // Make sure it is big enough
+    unsigned char *pos = &vchSig[0];
+    nSize = i2d_ECDSA_SIG(sig, &pos);
+    ECDSA_SIG_free(sig);
+    vchSig.resize(nSize); // Shrink to fit actual size
+    return true;
+}
+
+bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+    // -1 = error, 0 = bad sig, 1 = good
+    if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
+        return false;
+    return true;
+}
+
+bool CECKey::SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
+    bool fOk = false;
+    ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
+    if (sig==NULL)
+        return false;
+    memset(p64, 0, 64);
+    int nBitsR = BN_num_bits(sig->r);
+    int nBitsS = BN_num_bits(sig->s);
+    if (nBitsR <= 256 && nBitsS <= 256) {
+        std::vector<unsigned char> pubkey;
+        GetPubKey(pubkey, true);
+        for (int i=0; i<4; i++) {
+            CECKey keyRec;
+            if (ECDSA_SIG_recover_key_GFp(keyRec.pkey, sig, (unsigned char*)&hash, sizeof(hash), i, 1) == 1) {
+                std::vector<unsigned char> pubkeyRec;
+                keyRec.GetPubKey(pubkeyRec, true);
+                if (pubkeyRec == pubkey) {
+                    rec = i;
+                    fOk = true;
+                    break;
+                }
+            }
+        }
+        assert(fOk);
+        BN_bn2bin(sig->r,&p64[32-(nBitsR+7)/8]);
+        BN_bn2bin(sig->s,&p64[64-(nBitsS+7)/8]);
+    }
+    ECDSA_SIG_free(sig);
+    return fOk;
+}
+
+bool CECKey::Recover(const uint256 &hash, const unsigned char *p64, int rec)
+{
+    if (rec<0 || rec>=3)
+        return false;
+    ECDSA_SIG *sig = ECDSA_SIG_new();
+    BN_bin2bn(&p64[0],  32, sig->r);
+    BN_bin2bn(&p64[32], 32, sig->s);
+    bool ret = ECDSA_SIG_recover_key_GFp(pkey, sig, (unsigned char*)&hash, sizeof(hash), rec, 0) == 1;
+    ECDSA_SIG_free(sig);
+    return ret;
+}
+
+bool CECKey::TweakSecret(unsigned char vchSecretOut[32], const unsigned char vchSecretIn[32], const unsigned char vchTweak[32])
+{
+    bool ret = true;
+    BN_CTX *ctx = BN_CTX_new();
+    BN_CTX_start(ctx);
+    BIGNUM *bnSecret = BN_CTX_get(ctx);
+    BIGNUM *bnTweak = BN_CTX_get(ctx);
+    BIGNUM *bnOrder = BN_CTX_get(ctx);
+    EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);
+    EC_GROUP_get_order(group, bnOrder, ctx); // what a grossly inefficient way to get the (constant) group order...
+    BN_bin2bn(vchTweak, 32, bnTweak);
+    if (BN_cmp(bnTweak, bnOrder) >= 0)
+        ret = false; // extremely unlikely
+    BN_bin2bn(vchSecretIn, 32, bnSecret);
+    BN_add(bnSecret, bnSecret, bnTweak);
+    BN_nnmod(bnSecret, bnSecret, bnOrder, ctx);
+    if (BN_is_zero(bnSecret))
+        ret = false; // ridiculously unlikely
+    int nBits = BN_num_bits(bnSecret);
+    memset(vchSecretOut, 0, 32);
+    BN_bn2bin(bnSecret, &vchSecretOut[32-(nBits+7)/8]);
+    EC_GROUP_free(group);
+    BN_CTX_end(ctx);
+    BN_CTX_free(ctx);
+    return ret;
+}
+
+bool CECKey::TweakPublic(const unsigned char vchTweak[32]) {
+    bool ret = true;
+    BN_CTX *ctx = BN_CTX_new();
+    BN_CTX_start(ctx);
+    BIGNUM *bnTweak = BN_CTX_get(ctx);
+    BIGNUM *bnOrder = BN_CTX_get(ctx);
+    BIGNUM *bnOne = BN_CTX_get(ctx);
+    const EC_GROUP *group = EC_KEY_get0_group(pkey);
+    EC_GROUP_get_order(group, bnOrder, ctx); // what a grossly inefficient way to get the (constant) group order...
+    BN_bin2bn(vchTweak, 32, bnTweak);
+    if (BN_cmp(bnTweak, bnOrder) >= 0)
+        ret = false; // extremely unlikely
+    EC_POINT *point = EC_POINT_dup(EC_KEY_get0_public_key(pkey), group);
+    BN_one(bnOne);
+    EC_POINT_mul(group, point, bnTweak, point, bnOne, ctx);
+    if (EC_POINT_is_at_infinity(group, point))
+        ret = false; // ridiculously unlikely
+    EC_KEY_set_public_key(pkey, point);
+    EC_POINT_free(point);
+    BN_CTX_end(ctx);
+    BN_CTX_free(ctx);
+    return ret;
+}
+
+bool CECKey::SanityCheck()
+{
+    EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
+    if(pkey == NULL)
+        return false;
+    EC_KEY_free(pkey);
+
+    // TODO Is there more EC functionality that could be missing?
+    return true;
+}
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
new file mode 100644
index 000000000000..072da4a942f1
--- /dev/null
+++ b/src/ecwrapper.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_EC_WRAPPER_H
+#define BITCOIN_EC_WRAPPER_H
+
+#include <cstddef>
+#include <vector>
+
+#include <openssl/ec.h>
+
+class uint256;
+
+// RAII Wrapper around OpenSSL's EC_KEY
+class CECKey {
+private:
+    EC_KEY *pkey;
+
+public:
+    CECKey();
+    ~CECKey();
+
+    void GetSecretBytes(unsigned char vch[32]) const;
+    void SetSecretBytes(const unsigned char vch[32]);
+    int GetPrivKeySize(bool fCompressed);
+    int GetPrivKey(unsigned char* privkey, bool fCompressed);
+    bool SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck=false);
+    void GetPubKey(std::vector<unsigned char>& pubkey, bool fCompressed);
+    bool SetPubKey(const unsigned char* pubkey, size_t size);
+    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS);
+    bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig);
+    bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec);
+
+    // reconstruct public key from a compact signature
+    // This is only slightly more CPU intensive than just verifying it.
+    // If this function succeeds, the recovered public key is guaranteed to be valid
+    // (the signature is a valid signature of the given data for that key)
+    bool Recover(const uint256 &hash, const unsigned char *p64, int rec);
+
+    static bool TweakSecret(unsigned char vchSecretOut[32], const unsigned char vchSecretIn[32], const unsigned char vchTweak[32]);
+    bool TweakPublic(const unsigned char vchTweak[32]);
+    static bool SanityCheck();
+};
+
+#endif
diff --git a/src/key.cpp b/src/key.cpp
index d2001717f1ab..0f4bc6652c8c 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -10,12 +10,10 @@
 #ifdef USE_SECP256K1
 #include <secp256k1.h>
 #else
-#include <openssl/bn.h>
-#include <openssl/ecdsa.h>
-#include <openssl/obj_mac.h>
+#include "ecwrapper.h"
 #endif
 
-// anonymous namespace with local implementation code (OpenSSL interaction)
+// anonymous namespace
 namespace {
 
 #ifdef USE_SECP256K1
@@ -31,325 +29,6 @@ class CSecp256k1Init {
 };
 static CSecp256k1Init instance_of_csecp256k1;
 
-#else
-
-// Generate a private key from just the secret parameter
-int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
-{
-    int ok = 0;
-    BN_CTX *ctx = NULL;
-    EC_POINT *pub_key = NULL;
-
-    if (!eckey) return 0;
-
-    const EC_GROUP *group = EC_KEY_get0_group(eckey);
-
-    if ((ctx = BN_CTX_new()) == NULL)
-        goto err;
-
-    pub_key = EC_POINT_new(group);
-
-    if (pub_key == NULL)
-        goto err;
-
-    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
-        goto err;
-
-    EC_KEY_set_private_key(eckey,priv_key);
-    EC_KEY_set_public_key(eckey,pub_key);
-
-    ok = 1;
-
-err:
-
-    if (pub_key)
-        EC_POINT_free(pub_key);
-    if (ctx != NULL)
-        BN_CTX_free(ctx);
-
-    return(ok);
-}
-
-// Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
-// recid selects which key is recovered
-// if check is non-zero, additional checks are performed
-int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check)
-{
-    if (!eckey) return 0;
-
-    int ret = 0;
-    BN_CTX *ctx = NULL;
-
-    BIGNUM *x = NULL;
-    BIGNUM *e = NULL;
-    BIGNUM *order = NULL;
-    BIGNUM *sor = NULL;
-    BIGNUM *eor = NULL;
-    BIGNUM *field = NULL;
-    EC_POINT *R = NULL;
-    EC_POINT *O = NULL;
-    EC_POINT *Q = NULL;
-    BIGNUM *rr = NULL;
-    BIGNUM *zero = NULL;
-    int n = 0;
-    int i = recid / 2;
-
-    const EC_GROUP *group = EC_KEY_get0_group(eckey);
-    if ((ctx = BN_CTX_new()) == NULL) { ret = -1; goto err; }
-    BN_CTX_start(ctx);
-    order = BN_CTX_get(ctx);
-    if (!EC_GROUP_get_order(group, order, ctx)) { ret = -2; goto err; }
-    x = BN_CTX_get(ctx);
-    if (!BN_copy(x, order)) { ret=-1; goto err; }
-    if (!BN_mul_word(x, i)) { ret=-1; goto err; }
-    if (!BN_add(x, x, ecsig->r)) { ret=-1; goto err; }
-    field = BN_CTX_get(ctx);
-    if (!EC_GROUP_get_curve_GFp(group, field, NULL, NULL, ctx)) { ret=-2; goto err; }
-    if (BN_cmp(x, field) >= 0) { ret=0; goto err; }
-    if ((R = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
-    if (!EC_POINT_set_compressed_coordinates_GFp(group, R, x, recid % 2, ctx)) { ret=0; goto err; }
-    if (check)
-    {
-        if ((O = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
-        if (!EC_POINT_mul(group, O, NULL, R, order, ctx)) { ret=-2; goto err; }
-        if (!EC_POINT_is_at_infinity(group, O)) { ret = 0; goto err; }
-    }
-    if ((Q = EC_POINT_new(group)) == NULL) { ret = -2; goto err; }
-    n = EC_GROUP_get_degree(group);
-    e = BN_CTX_get(ctx);
-    if (!BN_bin2bn(msg, msglen, e)) { ret=-1; goto err; }
-    if (8*msglen > n) BN_rshift(e, e, 8-(n & 7));
-    zero = BN_CTX_get(ctx);
-    if (!BN_zero(zero)) { ret=-1; goto err; }
-    if (!BN_mod_sub(e, zero, e, order, ctx)) { ret=-1; goto err; }
-    rr = BN_CTX_get(ctx);
-    if (!BN_mod_inverse(rr, ecsig->r, order, ctx)) { ret=-1; goto err; }
-    sor = BN_CTX_get(ctx);
-    if (!BN_mod_mul(sor, ecsig->s, rr, order, ctx)) { ret=-1; goto err; }
-    eor = BN_CTX_get(ctx);
-    if (!BN_mod_mul(eor, e, rr, order, ctx)) { ret=-1; goto err; }
-    if (!EC_POINT_mul(group, Q, eor, R, sor, ctx)) { ret=-2; goto err; }
-    if (!EC_KEY_set_public_key(eckey, Q)) { ret=-2; goto err; }
-
-    ret = 1;
-
-err:
-    if (ctx) {
-        BN_CTX_end(ctx);
-        BN_CTX_free(ctx);
-    }
-    if (R != NULL) EC_POINT_free(R);
-    if (O != NULL) EC_POINT_free(O);
-    if (Q != NULL) EC_POINT_free(Q);
-    return ret;
-}
-
-// RAII Wrapper around OpenSSL's EC_KEY
-class CECKey {
-private:
-    EC_KEY *pkey;
-
-public:
-    CECKey() {
-        pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
-        assert(pkey != NULL);
-    }
-
-    ~CECKey() {
-        EC_KEY_free(pkey);
-    }
-
-    void GetSecretBytes(unsigned char vch[32]) const {
-        const BIGNUM *bn = EC_KEY_get0_private_key(pkey);
-        assert(bn);
-        int nBytes = BN_num_bytes(bn);
-        int n=BN_bn2bin(bn,&vch[32 - nBytes]);
-        assert(n == nBytes);
-        memset(vch, 0, 32 - nBytes);
-    }
-
-    void SetSecretBytes(const unsigned char vch[32]) {
-        bool ret;
-        BIGNUM bn;
-        BN_init(&bn);
-        ret = BN_bin2bn(vch, 32, &bn) != NULL;
-        assert(ret);
-        ret = EC_KEY_regenerate_key(pkey, &bn) != 0;
-        assert(ret);
-        BN_clear_free(&bn);
-    }
-
-    int GetPrivKeySize(bool fCompressed) {
-        EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-        return i2d_ECPrivateKey(pkey, NULL);
-    }
-    int GetPrivKey(unsigned char* privkey, bool fCompressed) {
-        EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-        return i2d_ECPrivateKey(pkey, &privkey);
-    }
-
-    bool SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck=false) {
-        if (d2i_ECPrivateKey(&pkey, &privkey, size)) {
-            if(fSkipCheck)
-                return true;
-
-            // d2i_ECPrivateKey returns true if parsing succeeds.
-            // This doesn't necessarily mean the key is valid.
-            if (EC_KEY_check_key(pkey))
-                return true;
-        }
-        return false;
-    }
-
-    void GetPubKey(std::vector<unsigned char> &pubkey, bool fCompressed) {
-        EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-        int nSize = i2o_ECPublicKey(pkey, NULL);
-        assert(nSize);
-        assert(nSize <= 65);
-        pubkey.clear();
-        pubkey.resize(nSize);
-        unsigned char *pbegin(begin_ptr(pubkey));
-        int nSize2 = i2o_ECPublicKey(pkey, &pbegin);
-        assert(nSize == nSize2);
-    }
-
-    bool SetPubKey(const unsigned char* pubkey, size_t size) {
-        return o2i_ECPublicKey(&pkey, &pubkey, size) != NULL;
-    }
-
-    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) {
-        vchSig.clear();
-        ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
-        if (sig == NULL)
-            return false;
-        BN_CTX *ctx = BN_CTX_new();
-        BN_CTX_start(ctx);
-        const EC_GROUP *group = EC_KEY_get0_group(pkey);
-        BIGNUM *order = BN_CTX_get(ctx);
-        BIGNUM *halforder = BN_CTX_get(ctx);
-        EC_GROUP_get_order(group, order, ctx);
-        BN_rshift1(halforder, order);
-        if (lowS && BN_cmp(sig->s, halforder) > 0) {
-            // enforce low S values, by negating the value (modulo the order) if above order/2.
-            BN_sub(sig->s, order, sig->s);
-        }
-        BN_CTX_end(ctx);
-        BN_CTX_free(ctx);
-        unsigned int nSize = ECDSA_size(pkey);
-        vchSig.resize(nSize); // Make sure it is big enough
-        unsigned char *pos = &vchSig[0];
-        nSize = i2d_ECDSA_SIG(sig, &pos);
-        ECDSA_SIG_free(sig);
-        vchSig.resize(nSize); // Shrink to fit actual size
-        return true;
-    }
-
-    bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
-        // -1 = error, 0 = bad sig, 1 = good
-        if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
-            return false;
-        return true;
-    }
-
-    bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
-        bool fOk = false;
-        ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
-        if (sig==NULL)
-            return false;
-        memset(p64, 0, 64);
-        int nBitsR = BN_num_bits(sig->r);
-        int nBitsS = BN_num_bits(sig->s);
-        if (nBitsR <= 256 && nBitsS <= 256) {
-            std::vector<unsigned char> pubkey;
-            GetPubKey(pubkey, true);
-            for (int i=0; i<4; i++) {
-                CECKey keyRec;
-                if (ECDSA_SIG_recover_key_GFp(keyRec.pkey, sig, (unsigned char*)&hash, sizeof(hash), i, 1) == 1) {
-                    std::vector<unsigned char> pubkeyRec;
-                    keyRec.GetPubKey(pubkeyRec, true);
-                    if (pubkeyRec == pubkey) {
-                        rec = i;
-                        fOk = true;
-                        break;
-                    }
-                }
-            }
-            assert(fOk);
-            BN_bn2bin(sig->r,&p64[32-(nBitsR+7)/8]);
-            BN_bn2bin(sig->s,&p64[64-(nBitsS+7)/8]);
-        }
-        ECDSA_SIG_free(sig);
-        return fOk;
-    }
-
-    // reconstruct public key from a compact signature
-    // This is only slightly more CPU intensive than just verifying it.
-    // If this function succeeds, the recovered public key is guaranteed to be valid
-    // (the signature is a valid signature of the given data for that key)
-    bool Recover(const uint256 &hash, const unsigned char *p64, int rec)
-    {
-        if (rec<0 || rec>=3)
-            return false;
-        ECDSA_SIG *sig = ECDSA_SIG_new();
-        BN_bin2bn(&p64[0],  32, sig->r);
-        BN_bin2bn(&p64[32], 32, sig->s);
-        bool ret = ECDSA_SIG_recover_key_GFp(pkey, sig, (unsigned char*)&hash, sizeof(hash), rec, 0) == 1;
-        ECDSA_SIG_free(sig);
-        return ret;
-    }
-
-    static bool TweakSecret(unsigned char vchSecretOut[32], const unsigned char vchSecretIn[32], const unsigned char vchTweak[32])
-    {
-        bool ret = true;
-        BN_CTX *ctx = BN_CTX_new();
-        BN_CTX_start(ctx);
-        BIGNUM *bnSecret = BN_CTX_get(ctx);
-        BIGNUM *bnTweak = BN_CTX_get(ctx);
-        BIGNUM *bnOrder = BN_CTX_get(ctx);
-        EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);
-        EC_GROUP_get_order(group, bnOrder, ctx); // what a grossly inefficient way to get the (constant) group order...
-        BN_bin2bn(vchTweak, 32, bnTweak);
-        if (BN_cmp(bnTweak, bnOrder) >= 0)
-            ret = false; // extremely unlikely
-        BN_bin2bn(vchSecretIn, 32, bnSecret);
-        BN_add(bnSecret, bnSecret, bnTweak);
-        BN_nnmod(bnSecret, bnSecret, bnOrder, ctx);
-        if (BN_is_zero(bnSecret))
-            ret = false; // ridiculously unlikely
-        int nBits = BN_num_bits(bnSecret);
-        memset(vchSecretOut, 0, 32);
-        BN_bn2bin(bnSecret, &vchSecretOut[32-(nBits+7)/8]);
-        EC_GROUP_free(group);
-        BN_CTX_end(ctx);
-        BN_CTX_free(ctx);
-        return ret;
-    }
-
-    bool TweakPublic(const unsigned char vchTweak[32]) {
-        bool ret = true;
-        BN_CTX *ctx = BN_CTX_new();
-        BN_CTX_start(ctx);
-        BIGNUM *bnTweak = BN_CTX_get(ctx);
-        BIGNUM *bnOrder = BN_CTX_get(ctx);
-        BIGNUM *bnOne = BN_CTX_get(ctx);
-        const EC_GROUP *group = EC_KEY_get0_group(pkey);
-        EC_GROUP_get_order(group, bnOrder, ctx); // what a grossly inefficient way to get the (constant) group order...
-        BN_bin2bn(vchTweak, 32, bnTweak);
-        if (BN_cmp(bnTweak, bnOrder) >= 0)
-            ret = false; // extremely unlikely
-        EC_POINT *point = EC_POINT_dup(EC_KEY_get0_public_key(pkey), group);
-        BN_one(bnOne);
-        EC_POINT_mul(group, point, bnTweak, point, bnOne, ctx);
-        if (EC_POINT_is_at_infinity(group, point))
-            ret = false; // ridiculously unlikely
-        EC_KEY_set_public_key(pkey, point);
-        EC_POINT_free(point);
-        BN_CTX_end(ctx);
-        BN_CTX_free(ctx);
-        return ret;
-    }
-};
-
 #endif
 
 int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) {
@@ -746,12 +425,6 @@ bool ECC_InitSanityCheck() {
 #ifdef USE_SECP256K1
     return true;
 #else
-    EC_KEY *pkey = EC_KEY_new_by_curve_name(NID_secp256k1);
-    if(pkey == NULL)
-        return false;
-    EC_KEY_free(pkey);
-
-    // TODO Is there more EC functionality that could be missing?
-    return true;
+    return CECKey::SanityCheck();
 #endif
 }

From 02fe12dcf4414eaff0161c6b5df7334135958485 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Tue, 28 Oct 2014 10:10:59 +0800
Subject: [PATCH 0936/1819] Update generate-seeds.py to produce doxygen
 compatible comments

---
 share/seeds/generate-seeds.py | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/share/seeds/generate-seeds.py b/share/seeds/generate-seeds.py
index 6c1b4ed86012..5f0674056078 100755
--- a/share/seeds/generate-seeds.py
+++ b/share/seeds/generate-seeds.py
@@ -1,6 +1,6 @@
 #!/usr/bin/python
 # Copyright (c) 2014 Wladmir J. van der Laan
-# Distributed under the MIT/X11 software license, see the accompanying
+# Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 '''
 Script to generate list of seed nodes for chainparams.cpp.
@@ -116,10 +116,13 @@ def main():
     indir = sys.argv[1]
     g.write('#ifndef H_CHAINPARAMSSEEDS\n')
     g.write('#define H_CHAINPARAMSSEEDS\n')
-    g.write('// List of fixed seed nodes for the bitcoin network\n')
-    g.write('// AUTOGENERATED by contrib/devtools/generate-seeds.py\n\n')
-    g.write('// Each line contains a 16-byte IPv6 address and a port.\n')
-    g.write('// IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
+    g.write('/**\n')
+    g.write(' * List of fixed seed nodes for the bitcoin network\n')
+    g.write(' * AUTOGENERATED by share/seeds/generate-seeds.py\n')
+    g.write(' *\n')
+    g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
+    g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
+    g.write(' */\n')
     with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
         process_nodes(g, f, 'pnSeed6_main', 8333)
     g.write('\n')

From 5b40d8868820265adb24fec097905e84edb85762 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 26 Oct 2014 15:03:12 +0800
Subject: [PATCH 0937/1819] Update comments in wallet to be doxygen compatible

---
 src/wallet.cpp |  76 ++++++++++++++++-----------
 src/wallet.h   | 138 ++++++++++++++++++++++++++++---------------------
 2 files changed, 125 insertions(+), 89 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3812c22fe28e..d392149dbb3b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "wallet.h"
@@ -22,18 +22,23 @@
 
 using namespace std;
 
-// Settings
+/**
+ * Settings
+ */
 CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
 
-/** Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) */
-CFeeRate CWallet::minTxFee = CFeeRate(10000);  // Override with -mintxfee
+/** 
+ * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) 
+ * Override with -mintxfee
+ */
+CFeeRate CWallet::minTxFee = CFeeRate(10000);
 
-//////////////////////////////////////////////////////////////////////////////
-//
-// mapWallet
-//
+/** @defgroup mapWallet
+ *
+ * @{
+ */
 
 struct CompareValueOnly
 {
@@ -367,8 +372,10 @@ void CWallet::SyncMetaData(pair<TxSpends::iterator, TxSpends::iterator> range)
     }
 }
 
-// Outpoint is spent if any non-conflicted transaction
-// spends it:
+/**
+ * Outpoint is spent if any non-conflicted transaction
+ * spends it:
+ */
 bool CWallet::IsSpent(const uint256& hash, unsigned int n) const
 {
     const COutPoint outpoint(hash, n);
@@ -477,7 +484,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
         {
             if (!pwalletdbEncryption->TxnCommit()) {
                 delete pwalletdbEncryption;
-                // We now have keys encrypted in memory, but no on disk...
+                // We now have keys encrypted in memory, but not on disk...
                 // die to avoid confusion and let the user reload their unencrypted wallet.
                 assert(false);
             }
@@ -667,9 +674,11 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
     return true;
 }
 
-// Add a transaction to the wallet, or update it.
-// pblock is optional, but should be provided if the transaction is known to be in a block.
-// If fUpdate is true, existing transactions will be updated.
+/**
+ * Add a transaction to the wallet, or update it.
+ * pblock is optional, but should be provided if the transaction is known to be in a block.
+ * If fUpdate is true, existing transactions will be updated.
+ */
 bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate)
 {
     {
@@ -911,9 +920,11 @@ bool CWalletTx::WriteToDisk()
     return CWalletDB(pwallet->strWalletFile).WriteTx(GetHash(), *this);
 }
 
-// Scan the block chain (starting in pindexStart) for transactions
-// from or to us. If fUpdate is true, found transactions that already
-// exist in the wallet will be updated.
+/**
+ * Scan the block chain (starting in pindexStart) for transactions
+ * from or to us. If fUpdate is true, found transactions that already
+ * exist in the wallet will be updated.
+ */
 int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
 {
     int ret = 0;
@@ -1035,15 +1046,15 @@ void CWallet::ResendWalletTransactions()
     }
 }
 
+/** @} */ // end of mapWallet
 
 
 
 
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Actions
-//
+/** @defgroup Actions
+ *
+ * @{
+ */
 
 
 CAmount CWallet::GetBalance() const
@@ -1136,7 +1147,9 @@ CAmount CWallet::GetImmatureWatchOnlyBalance() const
     return nTotal;
 }
 
-// populate vCoins with vector of available COutputs.
+/**
+ * populate vCoins with vector of available COutputs.
+ */
 void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const CCoinControl *coinControl) const
 {
     vCoins.clear();
@@ -1194,7 +1207,7 @@ static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,uns
                 //The solver here uses a randomized algorithm,
                 //the randomness serves no real security purpose but is just
                 //needed to prevent degenerate behavior and it is important
-                //that the rng fast. We do not use a constant random sequence,
+                //that the rng is fast. We do not use a constant random sequence,
                 //because there may be some privacy improvement by making
                 //the selection random.
                 if (nPass == 0 ? insecure_rand()&1 : !vfIncluded[i])
@@ -1524,7 +1537,9 @@ bool CWallet::CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
     return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl);
 }
 
-// Call after CreateTransaction unless you want to abort
+/**
+ * Call after CreateTransaction unless you want to abort
+ */
 bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
 {
     {
@@ -1669,7 +1684,7 @@ DBErrors CWallet::ZapWalletTx(std::vector<CWalletTx>& vWtx)
             setKeyPool.clear();
             // Note: can't top-up keypool here, because wallet is locked.
             // User will be prompted to unlock wallet the next operation
-            // the requires a new key.
+            // that requires a new key.
         }
     }
 
@@ -1736,10 +1751,10 @@ bool CWallet::SetDefaultKey(const CPubKey &vchPubKey)
     return true;
 }
 
-//
-// Mark old keypool keys as used,
-// and generate all new keys
-//
+/**
+ * Mark old keypool keys as used,
+ * and generate all new keys 
+ */
 bool CWallet::NewKeyPool()
 {
     {
@@ -2120,6 +2135,7 @@ void CWallet::ListLockedCoins(std::vector<COutPoint>& vOutpts)
     }
 }
 
+/** @} */ // end of Actions
 
 class CAffectedKeysVisitor : public boost::static_visitor<void> {
 private:
diff --git a/src/wallet.h b/src/wallet.h
index 9b6895090c96..6ef830f22055 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_WALLET_H
@@ -24,16 +24,18 @@
 #include <utility>
 #include <vector>
 
-// Settings
+/**
+ * Settings
+ */
 extern CFeeRate payTxFee;
 extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
 
-// -paytxfee default
+//! -paytxfee default
 static const CAmount DEFAULT_TRANSACTION_FEE = 0;
-// -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
+//! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
 static const CAmount nHighTransactionFeeWarning = 0.01 * COIN;
-// Largest (in bytes) free transaction we're willing to create
+//! Largest (in bytes) free transaction we're willing to create
 static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
 
 class CAccountingEntry;
@@ -92,7 +94,8 @@ class CAddressBookData
     StringMap destdata;
 };
 
-/** A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,
+/** 
+ * A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,
  * and provides the ability to create new transactions.
  */
 class CWallet : public CCryptoKeyStore, public CValidationInterface
@@ -102,18 +105,20 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     CWalletDB *pwalletdbEncryption;
 
-    // the current wallet version: clients below this version are not able to load the wallet
+    //! the current wallet version: clients below this version are not able to load the wallet
     int nWalletVersion;
 
-    // the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded
+    //! the maximum wallet format version: memory-only variable that specifies to what version this wallet may be upgraded
     int nWalletMaxVersion;
 
     int64_t nNextResend;
     int64_t nLastResend;
 
-    // Used to keep track of spent outpoints, and
-    // detect and report conflicts (double-spends or
-    // mutated transactions where the mutant gets mined).
+    /**
+     * Used to keep track of spent outpoints, and
+     * detect and report conflicts (double-spends or
+     * mutated transactions where the mutant gets mined).
+     */
     typedef std::multimap<COutPoint, uint256> TxSpends;
     TxSpends mapTxSpends;
     void AddToSpends(const COutPoint& outpoint, const uint256& wtxid);
@@ -122,11 +127,13 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>);
 
 public:
-    /// Main wallet lock.
-    /// This lock protects all the fields added by CWallet
-    ///   except for:
-    ///      fFileBacked (immutable after instantiation)
-    ///      strWalletFile (immutable after instantiation)
+    /*
+     * Main wallet lock.
+     * This lock protects all the fields added by CWallet
+     *   except for:
+     *      fFileBacked (immutable after instantiation)
+     *      strWalletFile (immutable after instantiation)
+     */
     mutable CCriticalSection cs_wallet;
 
     bool fFileBacked;
@@ -186,7 +193,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     const CWalletTx* GetWalletTx(const uint256& hash) const;
 
-    // check whether we are allowed to upgrade (or already support) to the named feature
+    //! check whether we are allowed to upgrade (or already support) to the named feature
     bool CanSupportFeature(enum WalletFeature wf) { AssertLockHeld(cs_wallet); return nWalletMaxVersion >= wf; }
 
     void AvailableCoins(std::vector<COutput>& vCoins, bool fOnlyConfirmed=true, const CCoinControl *coinControl = NULL) const;
@@ -200,38 +207,40 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     void UnlockAllCoins();
     void ListLockedCoins(std::vector<COutPoint>& vOutpts);
 
-    // keystore implementation
-    // Generate a new key
+    /**
+     * keystore implementation
+     * Generate a new key
+     */
     CPubKey GenerateNewKey();
-    // Adds a key to the store, and saves it to disk.
+    //! Adds a key to the store, and saves it to disk.
     bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey);
-    // Adds a key to the store, without saving it to disk (used by LoadWallet)
+    //! Adds a key to the store, without saving it to disk (used by LoadWallet)
     bool LoadKey(const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); }
-    // Load metadata (used by LoadWallet)
+    //! Load metadata (used by LoadWallet)
     bool LoadKeyMetadata(const CPubKey &pubkey, const CKeyMetadata &metadata);
 
     bool LoadMinVersion(int nVersion) { AssertLockHeld(cs_wallet); nWalletVersion = nVersion; nWalletMaxVersion = std::max(nWalletMaxVersion, nVersion); return true; }
 
-    // Adds an encrypted key to the store, and saves it to disk.
+    //! Adds an encrypted key to the store, and saves it to disk.
     bool AddCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
-    // Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
+    //! Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
     bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
     bool AddCScript(const CScript& redeemScript);
     bool LoadCScript(const CScript& redeemScript);
 
-    /// Adds a destination data tuple to the store, and saves it to disk
+    //! Adds a destination data tuple to the store, and saves it to disk
     bool AddDestData(const CTxDestination &dest, const std::string &key, const std::string &value);
-    /// Erases a destination data tuple in the store and on disk
+    //! Erases a destination data tuple in the store and on disk
     bool EraseDestData(const CTxDestination &dest, const std::string &key);
-    /// Adds a destination data tuple to the store, without saving it to disk
+    //! Adds a destination data tuple to the store, without saving it to disk
     bool LoadDestData(const CTxDestination &dest, const std::string &key, const std::string &value);
-    /// Look up a destination data tuple in the store, return true if found false otherwise
+    //! Look up a destination data tuple in the store, return true if found false otherwise
     bool GetDestData(const CTxDestination &dest, const std::string &key, std::string *value) const;
 
-    // Adds a watch-only address to the store, and saves it to disk.
+    //! Adds a watch-only address to the store, and saves it to disk.
     bool AddWatchOnly(const CScript &dest);
     bool RemoveWatchOnly(const CScript &dest);
-    // Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
+    //! Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
     bool LoadWatchOnly(const CScript &dest);
 
     bool Unlock(const SecureString& strWalletPassphrase);
@@ -240,17 +249,19 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     void GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const;
 
-    /** Increment the next transaction order id
-        @return next transaction order id
+    /** 
+     * Increment the next transaction order id
+     * @return next transaction order id
      */
     int64_t IncOrderPosNext(CWalletDB *pwalletdb = NULL);
 
     typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
     typedef std::multimap<int64_t, TxPair > TxItems;
 
-    /** Get the wallet's activity log
-        @return multimap of ordered transactions and accounting entries
-        @warning Returned pointers are *only* valid within the scope of passed acentries
+    /**
+     * Get the wallet's activity log
+     * @return multimap of ordered transactions and accounting entries
+     * @warning Returned pointers are *only* valid within the scope of passed acentries
      */
     TxItems OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount = "");
 
@@ -318,7 +329,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
                 return true;
         return false;
     }
-    bool IsFromMe(const CTransaction& tx) const     // should probably be renamed to IsRelevantToMe
+    /** should probably be renamed to IsRelevantToMe */
+    bool IsFromMe(const CTransaction& tx) const
     {
         return (GetDebit(tx, ISMINE_ALL) > 0);
     }
@@ -384,19 +396,20 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     bool SetDefaultKey(const CPubKey &vchPubKey);
 
-    // signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower
+    //! signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower
     bool SetMinVersion(enum WalletFeature, CWalletDB* pwalletdbIn = NULL, bool fExplicit = false);
 
-    // change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format)
+    //! change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format)
     bool SetMaxVersion(int nVersion);
 
-    // get the current wallet format (the oldest client version guaranteed to understand this wallet)
+    //! get the current wallet format (the oldest client version guaranteed to understand this wallet)
     int GetVersion() { LOCK(cs_wallet); return nWalletVersion; }
 
-    // Get wallet transactions that conflict with given transaction (spend same outputs)
+    //! Get wallet transactions that conflict with given transaction (spend same outputs)
     std::set<uint256> GetConflicts(const uint256& txid) const;
 
-    /** Address book entry changed.
+    /** 
+     * Address book entry changed.
      * @note called with lock cs_wallet held.
      */
     boost::signals2::signal<void (CWallet *wallet, const CTxDestination
@@ -404,7 +417,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
             const std::string &purpose,
             ChangeType status)> NotifyAddressBookChanged;
 
-    /** Wallet transaction added, removed or updated.
+    /** 
+     * Wallet transaction added, removed or updated.
      * @note called with lock cs_wallet held.
      */
     boost::signals2::signal<void (CWallet *wallet, const uint256 &hashTx,
@@ -515,10 +529,13 @@ class CMerkleTx : public CTransaction
 
     int SetMerkleBranch(const CBlock& block);
 
-    // Return depth of transaction in blockchain:
-    // -1  : not in blockchain, and not in memory pool (conflicted transaction)
-    //  0  : in memory pool, waiting to be included in a block
-    // >=1 : this many blocks deep in the main chain
+
+    /**
+     * Return depth of transaction in blockchain:
+     * -1  : not in blockchain, and not in memory pool (conflicted transaction)
+     *  0  : in memory pool, waiting to be included in a block
+     * >=1 : this many blocks deep in the main chain
+     */
     int GetDepthInMainChain(const CBlockIndex* &pindexRet) const;
     int GetDepthInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet); }
     bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
@@ -526,7 +543,8 @@ class CMerkleTx : public CTransaction
     bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
 };
 
-/** A transaction with a bunch of additional info that only the owner cares about.
+/** 
+ * A transaction with a bunch of additional info that only the owner cares about.
  * It includes any unrecorded transactions needed to link it back to the block chain.
  */
 class CWalletTx : public CMerkleTx
@@ -538,11 +556,11 @@ class CWalletTx : public CMerkleTx
     mapValue_t mapValue;
     std::vector<std::pair<std::string, std::string> > vOrderForm;
     unsigned int fTimeReceivedIsTxTime;
-    unsigned int nTimeReceived;  // time received by this node
+    unsigned int nTimeReceived; //! time received by this node
     unsigned int nTimeSmart;
     char fFromMe;
     std::string strFromAccount;
-    int64_t nOrderPos;  // position in ordered transaction list
+    int64_t nOrderPos; //! position in ordered transaction list
 
     // memory only
     mutable bool fDebitCached;
@@ -634,7 +652,7 @@ class CWalletTx : public CMerkleTx
         }
 
         READWRITE(*(CMerkleTx*)this);
-        std::vector<CMerkleTx> vUnused; // Used to be vtxPrev
+        std::vector<CMerkleTx> vUnused; //! Used to be vtxPrev
         READWRITE(vUnused);
         READWRITE(mapValue);
         READWRITE(vOrderForm);
@@ -659,7 +677,7 @@ class CWalletTx : public CMerkleTx
         mapValue.erase("timesmart");
     }
 
-    // make sure balances are recalculated
+    //! make sure balances are recalculated
     void MarkDirty()
     {
         fCreditCached = false;
@@ -678,7 +696,7 @@ class CWalletTx : public CMerkleTx
         MarkDirty();
     }
 
-    // filter decides which addresses will count towards the debit
+    //! filter decides which addresses will count towards the debit
     CAmount GetDebit(const isminefilter& filter) const
     {
         if (vin.empty())
@@ -917,8 +935,8 @@ class CWalletKey
     int64_t nTimeCreated;
     int64_t nTimeExpires;
     std::string strComment;
-    //// todo: add something to note what created it (user, getnewaddress, change)
-    ////   maybe should have a map<string, string> property map
+    //! todo: add something to note what created it (user, getnewaddress, change)
+    //!   maybe should have a map<string, string> property map
 
     CWalletKey(int64_t nExpires=0);
 
@@ -940,7 +958,8 @@ class CWalletKey
 
 
 
-/** Account information.
+/** 
+ * Account information.
  * Stored in wallet with key "acc"+string account name.
  */
 class CAccount
@@ -970,7 +989,8 @@ class CAccount
 
 
 
-/** Internal transfers.
+/** 
+ * Internal transfers.
  * Database key is acentry<account><counter>.
  */
 class CAccountingEntry
@@ -982,7 +1002,7 @@ class CAccountingEntry
     std::string strOtherAccount;
     std::string strComment;
     mapValue_t mapValue;
-    int64_t nOrderPos;  // position in ordered transaction list
+    int64_t nOrderPos;  //! position in ordered transaction list
     uint64_t nEntryNo;
 
     CAccountingEntry()
@@ -1007,7 +1027,7 @@ class CAccountingEntry
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         if (!(nType & SER_GETHASH))
             READWRITE(nVersion);
-        // Note: strAccount is serialized as part of the key, not here.
+        //! Note: strAccount is serialized as part of the key, not here.
         READWRITE(nCreditDebit);
         READWRITE(nTime);
         READWRITE(LIMITED_STRING(strOtherAccount, 65536));

From ffd8eddab540a9692bef681f2637f757d84e28a2 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 26 Oct 2014 16:33:52 +0800
Subject: [PATCH 0938/1819] Update comments in key to be doxygen compatible

---
 src/key.cpp |   8 +--
 src/key.h   | 139 +++++++++++++++++++++++++++++-----------------------
 2 files changed, 82 insertions(+), 65 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 0f4bc6652c8c..48431f3dc57f 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "key.h"
@@ -13,7 +13,7 @@
 #include "ecwrapper.h"
 #endif
 
-// anonymous namespace
+//! anonymous namespace with local implementation code (OpenSSL interaction)
 namespace {
 
 #ifdef USE_SECP256K1
@@ -56,7 +56,7 @@ int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char
     return 0;
 }
 
-// Order of secp256k1's generator minus 1.
+/** Order of secp256k1's generator minus 1. */
 const unsigned char vchMaxModOrder[32] = {
     0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
@@ -64,7 +64,7 @@ const unsigned char vchMaxModOrder[32] = {
     0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
 };
 
-// Half of the order of secp256k1's generator minus 1.
+/** Half of the order of secp256k1's generator minus 1. */
 const unsigned char vchMaxModHalfOrder[32] = {
     0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
     0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
diff --git a/src/key.h b/src/key.h
index 48b165253639..b4cb64768115 100644
--- a/src/key.h
+++ b/src/key.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_KEY_H
@@ -14,13 +14,15 @@
 #include <stdexcept>
 #include <vector>
 
-// secp256k1:
-// const unsigned int PRIVATE_KEY_SIZE = 279;
-// const unsigned int PUBLIC_KEY_SIZE  = 65;
-// const unsigned int SIGNATURE_SIZE   = 72;
-//
-// see www.keylength.com
-// script supports up to 75 for single byte push
+/** 
+ * secp256k1:
+ * const unsigned int PRIVATE_KEY_SIZE = 279;
+ * const unsigned int PUBLIC_KEY_SIZE  = 65;
+ * const unsigned int SIGNATURE_SIZE   = 72;
+ *
+ * see www.keylength.com
+ * script supports up to 75 for single byte push
+ */
 
 /** A reference to a CKey: the Hash160 of its serialized public key */
 class CKeyID : public uint160
@@ -34,11 +36,14 @@ class CKeyID : public uint160
 class CPubKey
 {
 private:
-    // Just store the serialized data.
-    // Its length can very cheaply be computed from the first byte.
+
+    /**
+     * Just store the serialized data.
+     * Its length can very cheaply be computed from the first byte.
+     */
     unsigned char vch[65];
 
-    // Compute the length of a pubkey with a given first byte.
+    //! Compute the length of a pubkey with a given first byte.
     unsigned int static GetLen(unsigned char chHeader)
     {
         if (chHeader == 2 || chHeader == 3)
@@ -48,20 +53,20 @@ class CPubKey
         return 0;
     }
 
-    // Set this key data to be invalid
+    //! Set this key data to be invalid
     void Invalidate()
     {
         vch[0] = 0xFF;
     }
 
 public:
-    // Construct an invalid public key.
+    //! Construct an invalid public key.
     CPubKey()
     {
         Invalidate();
     }
 
-    // Initialize a public key using begin/end iterators to byte data.
+    //! Initialize a public key using begin/end iterators to byte data.
     template <typename T>
     void Set(const T pbegin, const T pend)
     {
@@ -72,26 +77,26 @@ class CPubKey
             Invalidate();
     }
 
-    // Construct a public key using begin/end iterators to byte data.
+    //! Construct a public key using begin/end iterators to byte data.
     template <typename T>
     CPubKey(const T pbegin, const T pend)
     {
         Set(pbegin, pend);
     }
 
-    // Construct a public key from a byte vector.
+    //! Construct a public key from a byte vector.
     CPubKey(const std::vector<unsigned char>& vch)
     {
         Set(vch.begin(), vch.end());
     }
 
-    // Simple read-only vector-like interface to the pubkey data.
+    //! Simple read-only vector-like interface to the pubkey data.
     unsigned int size() const { return GetLen(vch[0]); }
     const unsigned char* begin() const { return vch; }
     const unsigned char* end() const { return vch + size(); }
     const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
 
-    // Comparator implementation.
+    //! Comparator implementation.
     friend bool operator==(const CPubKey& a, const CPubKey& b)
     {
         return a.vch[0] == b.vch[0] &&
@@ -107,7 +112,7 @@ class CPubKey
                (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
     }
 
-    // Implement serialization, as if this was a byte vector.
+    //! Implement serialization, as if this was a byte vector.
     unsigned int GetSerializeSize(int nType, int nVersion) const
     {
         return size() + 1;
@@ -134,86 +139,92 @@ class CPubKey
         }
     }
 
-    // Get the KeyID of this public key (hash of its serialization)
+    //! Get the KeyID of this public key (hash of its serialization)
     CKeyID GetID() const
     {
         return CKeyID(Hash160(vch, vch + size()));
     }
 
-    // Get the 256-bit hash of this public key.
+    //! Get the 256-bit hash of this public key.
     uint256 GetHash() const
     {
         return Hash(vch, vch + size());
     }
 
-    // Check syntactic correctness.
-    //
-    // Note that this is consensus critical as CheckSig() calls it!
+    /*
+     * Check syntactic correctness.
+     * 
+     * Note that this is consensus critical as CheckSig() calls it!
+     */
     bool IsValid() const
     {
         return size() > 0;
     }
 
-    // fully validate whether this is a valid public key (more expensive than IsValid())
+    //! fully validate whether this is a valid public key (more expensive than IsValid())
     bool IsFullyValid() const;
 
-    // Check whether this is a compressed public key.
+    //! Check whether this is a compressed public key.
     bool IsCompressed() const
     {
         return size() == 33;
     }
 
-    // Verify a DER signature (~72 bytes).
-    // If this public key is not fully valid, the return value will be false.
+    /**
+     * Verify a DER signature (~72 bytes).
+     * If this public key is not fully valid, the return value will be false.
+     */
     bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
 
-    // Recover a public key from a compact signature.
+    //! Recover a public key from a compact signature.
     bool RecoverCompact(const uint256& hash, const std::vector<unsigned char>& vchSig);
 
-    // Turn this public key into an uncompressed public key.
+    //! Turn this public key into an uncompressed public key.
     bool Decompress();
 
-    // Derive BIP32 child pubkey.
+    //! Derive BIP32 child pubkey.
     bool Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
 };
 
 
-// secure_allocator is defined in allocators.h
-// CPrivKey is a serialized private key, with all parameters included (279 bytes)
+/**
+ * secure_allocator is defined in allocators.h
+ * CPrivKey is a serialized private key, with all parameters included (279 bytes)
+ */
 typedef std::vector<unsigned char, secure_allocator<unsigned char> > CPrivKey;
 
 /** An encapsulated private key. */
 class CKey
 {
 private:
-    // Whether this private key is valid. We check for correctness when modifying the key
-    // data, so fValid should always correspond to the actual state.
+    //! Whether this private key is valid. We check for correctness when modifying the key
+    //! data, so fValid should always correspond to the actual state.
     bool fValid;
 
-    // Whether the public key corresponding to this private key is (to be) compressed.
+    //! Whether the public key corresponding to this private key is (to be) compressed.
     bool fCompressed;
 
-    // The actual byte data
+    //! The actual byte data
     unsigned char vch[32];
 
-    // Check whether the 32-byte array pointed to be vch is valid keydata.
+    //! Check whether the 32-byte array pointed to be vch is valid keydata.
     bool static Check(const unsigned char* vch);
 
 public:
-    // Construct an invalid private key.
+    //! Construct an invalid private key.
     CKey() : fValid(false), fCompressed(false)
     {
         LockObject(vch);
     }
 
-    // Copy constructor. This is necessary because of memlocking.
+    //! Copy constructor. This is necessary because of memlocking.
     CKey(const CKey& secret) : fValid(secret.fValid), fCompressed(secret.fCompressed)
     {
         LockObject(vch);
         memcpy(vch, secret.vch, sizeof(vch));
     }
 
-    // Destructor (again necessary because of memlocking).
+    //! Destructor (again necessary because of memlocking).
     ~CKey()
     {
         UnlockObject(vch);
@@ -225,7 +236,7 @@ class CKey
                memcmp(&a.vch[0], &b.vch[0], a.size()) == 0;
     }
 
-    // Initialize using begin and end iterators to byte data.
+    //! Initialize using begin and end iterators to byte data.
     template <typename T>
     void Set(const T pbegin, const T pend, bool fCompressedIn)
     {
@@ -242,48 +253,54 @@ class CKey
         }
     }
 
-    // Simple read-only vector-like interface.
+    //! Simple read-only vector-like interface.
     unsigned int size() const { return (fValid ? 32 : 0); }
     const unsigned char* begin() const { return vch; }
     const unsigned char* end() const { return vch + size(); }
 
-    // Check whether this private key is valid.
+    //! Check whether this private key is valid.
     bool IsValid() const { return fValid; }
 
-    // Check whether the public key corresponding to this private key is (to be) compressed.
+    //! Check whether the public key corresponding to this private key is (to be) compressed.
     bool IsCompressed() const { return fCompressed; }
 
-    // Initialize from a CPrivKey (serialized OpenSSL private key data).
+    //! Initialize from a CPrivKey (serialized OpenSSL private key data).
     bool SetPrivKey(const CPrivKey& vchPrivKey, bool fCompressed);
 
-    // Generate a new private key using a cryptographic PRNG.
+    //! Generate a new private key using a cryptographic PRNG.
     void MakeNewKey(bool fCompressed);
 
-    // Convert the private key to a CPrivKey (serialized OpenSSL private key data).
-    // This is expensive.
+    /**
+     * Convert the private key to a CPrivKey (serialized OpenSSL private key data).
+     * This is expensive. 
+     */
     CPrivKey GetPrivKey() const;
 
-    // Compute the public key from a private key.
-    // This is expensive.
+    /**
+     * Compute the public key from a private key.
+     * This is expensive.
+     */
     CPubKey GetPubKey() const;
 
-    // Create a DER-serialized signature.
+    //! Create a DER-serialized signature.
     bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, bool lowS = true) const;
 
-    // Create a compact signature (65 bytes), which allows reconstructing the used public key.
-    // The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
-    // The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
-    //                  0x1D = second key with even y, 0x1E = second key with odd y,
-    //                  add 0x04 for compressed keys.
+    /**
+     * Create a compact signature (65 bytes), which allows reconstructing the used public key.
+     * The format is one header byte, followed by two times 32 bytes for the serialized r and s values.
+     * The header byte: 0x1B = first key with even y, 0x1C = first key with odd y,
+     *                  0x1D = second key with even y, 0x1E = second key with odd y,
+     *                  add 0x04 for compressed keys.
+     */
     bool SignCompact(const uint256& hash, std::vector<unsigned char>& vchSig) const;
 
-    // Derive BIP32 child key.
+    //! Derive BIP32 child key.
     bool Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
 
-    // Load private key and check that public key matches.
+    //! Load private key and check that public key matches.
     bool Load(CPrivKey& privkey, CPubKey& vchPubKey, bool fSkipCheck);
 
-    // Check whether an element of a signature (r or s) is valid.
+    //! Check whether an element of a signature (r or s) is valid.
     static bool CheckSignatureElement(const unsigned char* vch, int len, bool half);
 };
 

From 2b173d3bcca8fdd89a92eb2058be341b3a61a1c8 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 26 Oct 2014 16:35:06 +0800
Subject: [PATCH 0939/1819] Update comments in keystore to be doxygen
 compatible

---
 src/key.cpp      |  2 +-
 src/keystore.cpp |  4 ++--
 src/keystore.h   | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 48431f3dc57f..c466e84f2691 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -13,7 +13,7 @@
 #include "ecwrapper.h"
 #endif
 
-//! anonymous namespace with local implementation code (OpenSSL interaction)
+//! anonymous namespace
 namespace {
 
 #ifdef USE_SECP256K1
diff --git a/src/keystore.cpp b/src/keystore.cpp
index 039c690625d8..879f09972014 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "keystore.h"
diff --git a/src/keystore.h b/src/keystore.h
index 4f8189c8f560..66f8771d4a80 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_KEYSTORE_H
@@ -24,22 +24,22 @@ class CKeyStore
 public:
     virtual ~CKeyStore() {}
 
-    // Add a key to the store.
+    //! Add a key to the store.
     virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey) =0;
     virtual bool AddKey(const CKey &key);
 
-    // Check whether a key corresponding to a given address is present in the store.
+    //! Check whether a key corresponding to a given address is present in the store.
     virtual bool HaveKey(const CKeyID &address) const =0;
     virtual bool GetKey(const CKeyID &address, CKey& keyOut) const =0;
     virtual void GetKeys(std::set<CKeyID> &setAddress) const =0;
     virtual bool GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const;
 
-    // Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
+    //! Support for BIP 0013 : see https://github.com/bitcoin/bips/blob/master/bip-0013.mediawiki
     virtual bool AddCScript(const CScript& redeemScript) =0;
     virtual bool HaveCScript(const CScriptID &hash) const =0;
     virtual bool GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const =0;
 
-    // Support for Watch-only addresses
+    //! Support for Watch-only addresses
     virtual bool AddWatchOnly(const CScript &dest) =0;
     virtual bool RemoveWatchOnly(const CScript &dest) =0;
     virtual bool HaveWatchOnly(const CScript &dest) const =0;

From 1bea2bbddce6abaf2640c4aab56ad08de53c4b90 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 28 Oct 2014 07:41:33 +0000
Subject: [PATCH 0940/1819] Rename ProcessBlock to ProcessNewBlock to indicate
 change of behaviour, and document it

---
 src/main.cpp             | 14 +++++++-------
 src/main.h               | 12 ++++++++++--
 src/miner.cpp            |  4 ++--
 src/rpcmining.cpp        |  2 +-
 src/test/miner_tests.cpp |  2 +-
 5 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index d2f999ee5662..ce1211cca56c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2524,7 +2524,7 @@ void CBlockIndex::BuildSkip()
         pskip = pprev->GetAncestor(GetSkipHeight(nHeight));
 }
 
-bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
+bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp)
 {
     // Preliminary checks
     bool checked = CheckBlock(*pblock, state);
@@ -2533,7 +2533,7 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
         LOCK(cs_main);
         MarkBlockAsReceived(pblock->GetHash());
         if (!checked) {
-            return error("ProcessBlock() : CheckBlock FAILED");
+            return error("%s : CheckBlock FAILED", __func__);
         }
 
         // Store to disk
@@ -2543,11 +2543,11 @@ bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBl
             mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
         }
         if (!ret)
-            return error("ProcessBlock() : AcceptBlock FAILED");
+            return error("%s : AcceptBlock FAILED", __func__);
     }
 
     if (!ActivateBestChain(state, pblock))
-        return error("ProcessBlock() : ActivateBestChain failed");
+        return error("%s : ActivateBestChain failed", __func__);
 
     return true;
 }
@@ -3145,7 +3145,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                 // process in case the block isn't known yet
                 if (mapBlockIndex.count(hash) == 0) {
                     CValidationState state;
-                    if (ProcessBlock(state, NULL, &block, dbp))
+                    if (ProcessNewBlock(state, NULL, &block, dbp))
                         nLoaded++;
                     if (state.IsError())
                         break;
@@ -3165,7 +3165,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                             LogPrintf("%s: Processing out of order child %s of %s\n", __func__, block.GetHash().ToString(),
                                     head.ToString());
                             CValidationState dummy;
-                            if (ProcessBlock(dummy, NULL, &block, &it->second))
+                            if (ProcessNewBlock(dummy, NULL, &block, &it->second))
                             {
                                 nLoaded++;
                                 queue.push_back(block.GetHash());
@@ -3943,7 +3943,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         pfrom->AddInventoryKnown(inv);
 
         CValidationState state;
-        ProcessBlock(state, pfrom, &block);
+        ProcessNewBlock(state, pfrom, &block);
         int nDoS;
         if (state.IsInvalid(nDoS)) {
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
diff --git a/src/main.h b/src/main.h
index 69be26a4ee50..9d08b3c09fff 100644
--- a/src/main.h
+++ b/src/main.h
@@ -148,8 +148,16 @@ void RegisterNodeSignals(CNodeSignals& nodeSignals);
 /** Unregister a network node */
 void UnregisterNodeSignals(CNodeSignals& nodeSignals);
 
-/** Process an incoming block */
-bool ProcessBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp = NULL);
+/** Process an incoming block. This only returns after the best known valid
+    block is made active. Note that it does not, however, guarantee that the
+    specific block passed to it has been checked for validity!
+    @param[out]  state   This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state iff pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface - this will have its BlockChecked method called whenever *any* block completes validation.
+    @param[in]   pfrom   The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
+    @param[in]   pblock  The block we want to process.
+    @param[out]  dbp     If pblock is stored to disk (or already there), this will be set to its location.
+    @return True if state.IsValid()
+*/
+bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp = NULL);
 /** Check whether enough disk space is available for an incoming block */
 bool CheckDiskSpace(uint64_t nAdditionalBytes = 0);
 /** Open a block file (blk?????.dat) */
diff --git a/src/miner.cpp b/src/miner.cpp
index c2762bf44e39..3ad33a0062ab 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -425,8 +425,8 @@ bool ProcessBlockFound(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
 
     // Process this block the same as if we had received it from another node
     CValidationState state;
-    if (!ProcessBlock(state, NULL, pblock))
-        return error("BitcoinMiner : ProcessBlock, block not accepted");
+    if (!ProcessNewBlock(state, NULL, pblock))
+        return error("BitcoinMiner : ProcessNewBlock, block not accepted");
 
     return true;
 }
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 28076607b429..b063159721b2 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -578,7 +578,7 @@ Value submitblock(const Array& params, bool fHelp)
     CValidationState state;
     submitblock_StateCatcher sc(pblock.GetHash());
     RegisterValidationInterface(&sc);
-    bool fAccepted = ProcessBlock(state, NULL, &pblock);
+    bool fAccepted = ProcessNewBlock(state, NULL, &pblock);
     UnregisterValidationInterface(&sc);
     if (fAccepted)
     {
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index bad5c13ac2b6..6e1fcf0a7d10 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
         pblock->hashMerkleRoot = pblock->BuildMerkleTree();
         pblock->nNonce = blockinfo[i].nonce;
         CValidationState state;
-        BOOST_CHECK(ProcessBlock(state, NULL, pblock));
+        BOOST_CHECK(ProcessNewBlock(state, NULL, pblock));
         BOOST_CHECK(state.IsValid());
         pblock->hashPrevBlock = pblock->GetHash();
     }

From 023e63df78b847812040bf6958c97476606dfbfd Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 28 Oct 2014 19:52:21 +0100
Subject: [PATCH 0941/1819] qt: Move transaction notification to transaction
 table model

Move transaction new/update notification to TransactionTableModel.
This moves the concerns to where they're actually handled.
No need to bounce this through wallet model.

- Do wallet transaction preprocessing on signal handler side;
  avoids locking cs_main/cs_wallet on notification in GUI thread
  (except for new transactions)
---
 src/qt/transactiontablemodel.cpp | 206 +++++++++++++++++++++----------
 src/qt/transactiontablemodel.h   |  10 +-
 src/qt/walletmodel.cpp           |  43 +------
 src/qt/walletmodel.h             |   6 +-
 src/qt/walletview.cpp            |   4 +-
 5 files changed, 159 insertions(+), 110 deletions(-)

diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index e34d77681868..79cb4a629661 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -91,87 +91,80 @@ class TransactionTablePriv
 
        Call with transaction that was added, removed or changed.
      */
-    void updateWallet(const uint256 &hash, int status)
+    void updateWallet(const uint256 &hash, int status, bool showTransaction)
     {
         qDebug() << "TransactionTablePriv::updateWallet : " + QString::fromStdString(hash.ToString()) + " " + QString::number(status);
-        {
-            LOCK2(cs_main, wallet->cs_wallet);
 
-            // Find transaction in wallet
-            std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(hash);
-            bool inWallet = mi != wallet->mapWallet.end();
+        // Find bounds of this transaction in model
+        QList<TransactionRecord>::iterator lower = qLowerBound(
+            cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan());
+        QList<TransactionRecord>::iterator upper = qUpperBound(
+            cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan());
+        int lowerIndex = (lower - cachedWallet.begin());
+        int upperIndex = (upper - cachedWallet.begin());
+        bool inModel = (lower != upper);
 
-            // Find bounds of this transaction in model
-            QList<TransactionRecord>::iterator lower = qLowerBound(
-                cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan());
-            QList<TransactionRecord>::iterator upper = qUpperBound(
-                cachedWallet.begin(), cachedWallet.end(), hash, TxLessThan());
-            int lowerIndex = (lower - cachedWallet.begin());
-            int upperIndex = (upper - cachedWallet.begin());
-            bool inModel = (lower != upper);
+        if(status == CT_UPDATED)
+        {
+            if(showTransaction && !inModel)
+                status = CT_NEW; /* Not in model, but want to show, treat as new */
+            if(!showTransaction && inModel)
+                status = CT_DELETED; /* In model, but want to hide, treat as deleted */
+        }
 
-            // Determine whether to show transaction or not
-            bool showTransaction = (inWallet && TransactionRecord::showTransaction(mi->second));
+        qDebug() << "    inModel=" + QString::number(inModel) +
+                    " Index=" + QString::number(lowerIndex) + "-" + QString::number(upperIndex) +
+                    " showTransaction=" + QString::number(showTransaction) + " derivedStatus=" + QString::number(status);
 
-            if(status == CT_UPDATED)
+        switch(status)
+        {
+        case CT_NEW:
+            if(inModel)
             {
-                if(showTransaction && !inModel)
-                    status = CT_NEW; /* Not in model, but want to show, treat as new */
-                if(!showTransaction && inModel)
-                    status = CT_DELETED; /* In model, but want to hide, treat as deleted */
+                qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is already in model";
+                break;
             }
-
-            qDebug() << "   inWallet=" + QString::number(inWallet) + " inModel=" + QString::number(inModel) +
-                        " Index=" + QString::number(lowerIndex) + "-" + QString::number(upperIndex) +
-                        " showTransaction=" + QString::number(showTransaction) + " derivedStatus=" + QString::number(status);
-
-            switch(status)
+            if(showTransaction)
             {
-            case CT_NEW:
-                if(inModel)
-                {
-                    qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is already in model";
-                    break;
-                }
-                if(!inWallet)
+                LOCK2(cs_main, wallet->cs_wallet);
+                // Find transaction in wallet
+                std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(hash);
+                if(mi == wallet->mapWallet.end())
                 {
                     qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_NEW, but transaction is not in wallet";
                     break;
                 }
-                if(showTransaction)
+                // Added -- insert at the right position
+                QList<TransactionRecord> toInsert =
+                        TransactionRecord::decomposeTransaction(wallet, mi->second);
+                if(!toInsert.isEmpty()) /* only if something to insert */
                 {
-                    // Added -- insert at the right position
-                    QList<TransactionRecord> toInsert =
-                            TransactionRecord::decomposeTransaction(wallet, mi->second);
-                    if(!toInsert.isEmpty()) /* only if something to insert */
+                    parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex+toInsert.size()-1);
+                    int insert_idx = lowerIndex;
+                    foreach(const TransactionRecord &rec, toInsert)
                     {
-                        parent->beginInsertRows(QModelIndex(), lowerIndex, lowerIndex+toInsert.size()-1);
-                        int insert_idx = lowerIndex;
-                        foreach(const TransactionRecord &rec, toInsert)
-                        {
-                            cachedWallet.insert(insert_idx, rec);
-                            insert_idx += 1;
-                        }
-                        parent->endInsertRows();
+                        cachedWallet.insert(insert_idx, rec);
+                        insert_idx += 1;
                     }
+                    parent->endInsertRows();
                 }
-                break;
-            case CT_DELETED:
-                if(!inModel)
-                {
-                    qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_DELETED, but transaction is not in model";
-                    break;
-                }
-                // Removed -- remove entire transaction from table
-                parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1);
-                cachedWallet.erase(lower, upper);
-                parent->endRemoveRows();
-                break;
-            case CT_UPDATED:
-                // Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
-                // visible transactions.
+            }
+            break;
+        case CT_DELETED:
+            if(!inModel)
+            {
+                qWarning() << "TransactionTablePriv::updateWallet : Warning: Got CT_DELETED, but transaction is not in model";
                 break;
             }
+            // Removed -- remove entire transaction from table
+            parent->beginRemoveRows(QModelIndex(), lowerIndex, upperIndex-1);
+            cachedWallet.erase(lower, upper);
+            parent->endRemoveRows();
+            break;
+        case CT_UPDATED:
+            // Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
+            // visible transactions.
+            break;
         }
     }
 
@@ -230,16 +223,20 @@ TransactionTableModel::TransactionTableModel(CWallet* wallet, WalletModel *paren
         QAbstractTableModel(parent),
         wallet(wallet),
         walletModel(parent),
-        priv(new TransactionTablePriv(wallet, this))
+        priv(new TransactionTablePriv(wallet, this)),
+        fProcessingQueuedTransactions(false)
 {
     columns << QString() << QString() << tr("Date") << tr("Type") << tr("Address") << BitcoinUnits::getAmountColumnTitle(walletModel->getOptionsModel()->getDisplayUnit());
     priv->refreshWallet();
 
     connect(walletModel->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
+
+    subscribeToCoreSignals();
 }
 
 TransactionTableModel::~TransactionTableModel()
 {
+    unsubscribeFromCoreSignals();
     delete priv;
 }
 
@@ -250,12 +247,12 @@ void TransactionTableModel::updateAmountColumnTitle()
     emit headerDataChanged(Qt::Horizontal,Amount,Amount);
 }
 
-void TransactionTableModel::updateTransaction(const QString &hash, int status)
+void TransactionTableModel::updateTransaction(const QString &hash, int status, bool showTransaction)
 {
     uint256 updated;
     updated.SetHex(hash.toStdString());
 
-    priv->updateWallet(updated, status);
+    priv->updateWallet(updated, status, showTransaction);
 }
 
 void TransactionTableModel::updateConfirmations()
@@ -649,3 +646,82 @@ void TransactionTableModel::updateDisplayUnit()
     updateAmountColumnTitle();
     emit dataChanged(index(0, Amount), index(priv->size()-1, Amount));
 }
+
+// queue notifications to show a non freezing progress dialog e.g. for rescan
+struct TransactionNotification
+{
+public:
+    TransactionNotification() {}
+    TransactionNotification(uint256 hash, ChangeType status, bool showTransaction):
+        hash(hash), status(status), showTransaction(showTransaction) {}
+
+    void invoke(QObject *ttm)
+    {
+        QString strHash = QString::fromStdString(hash.GetHex());
+        qDebug() << "NotifyTransactionChanged : " + strHash + " status= " + QString::number(status);
+        QMetaObject::invokeMethod(ttm, "updateTransaction", Qt::QueuedConnection,
+                                  Q_ARG(QString, strHash),
+                                  Q_ARG(int, status),
+                                  Q_ARG(bool, showTransaction));
+    }
+private:
+    uint256 hash;
+    ChangeType status;
+    bool showTransaction;
+};
+
+static bool fQueueNotifications = false;
+static std::vector< TransactionNotification > vQueueNotifications;
+
+static void NotifyTransactionChanged(TransactionTableModel *ttm, CWallet *wallet, const uint256 &hash, ChangeType status)
+{
+    // Find transaction in wallet
+    std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(hash);
+    // Determine whether to show transaction or not (determine this here so that no relocking is needed in GUI thread)
+    bool inWallet = mi != wallet->mapWallet.end();
+    bool showTransaction = (inWallet && TransactionRecord::showTransaction(mi->second));
+
+    TransactionNotification notification(hash, status, showTransaction);
+
+    if (fQueueNotifications)
+    {
+        vQueueNotifications.push_back(notification);
+        return;
+    }
+    notification.invoke(ttm);
+}
+
+static void ShowProgress(TransactionTableModel *ttm, const std::string &title, int nProgress)
+{
+    if (nProgress == 0)
+        fQueueNotifications = true;
+
+    if (nProgress == 100)
+    {
+        fQueueNotifications = false;
+        if (vQueueNotifications.size() > 10) // prevent balloon spam, show maximum 10 balloons
+            QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
+        for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
+        {
+            if (vQueueNotifications.size() - i <= 10)
+                QMetaObject::invokeMethod(ttm, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
+
+            vQueueNotifications[i].invoke(ttm);
+        }
+        std::vector<TransactionNotification >().swap(vQueueNotifications); // clear
+    }
+}
+
+void TransactionTableModel::subscribeToCoreSignals()
+{
+    // Connect signals to wallet
+    wallet->NotifyTransactionChanged.connect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
+    wallet->ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
+}
+
+void TransactionTableModel::unsubscribeFromCoreSignals()
+{
+    // Disconnect signals from wallet
+    wallet->NotifyTransactionChanged.disconnect(boost::bind(NotifyTransactionChanged, this, _1, _2, _3));
+    wallet->ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
+}
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 413f3f9bf1e8..bb517a969c9e 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -72,12 +72,17 @@ class TransactionTableModel : public QAbstractTableModel
     QVariant data(const QModelIndex &index, int role) const;
     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
     QModelIndex index(int row, int column, const QModelIndex & parent = QModelIndex()) const;
+    bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
 
 private:
     CWallet* wallet;
     WalletModel *walletModel;
     QStringList columns;
     TransactionTablePriv *priv;
+    bool fProcessingQueuedTransactions;
+
+    void subscribeToCoreSignals();
+    void unsubscribeFromCoreSignals();
 
     QString lookupAddress(const std::string &address, bool tooltip) const;
     QVariant addressColor(const TransactionRecord *wtx) const;
@@ -92,11 +97,14 @@ class TransactionTableModel : public QAbstractTableModel
     QVariant txAddressDecoration(const TransactionRecord *wtx) const;
 
 public slots:
-    void updateTransaction(const QString &hash, int status);
+    /* New transaction, or transaction changed status */
+    void updateTransaction(const QString &hash, int status, bool showTransaction);
     void updateConfirmations();
     void updateDisplayUnit();
     /** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
     void updateAmountColumnTitle();
+    /* Needed to update fProcessingQueuedTransactions through a QueuedConnection */
+    void setProcessingQueuedTransactions(bool value) { fProcessingQueuedTransactions = value; }
 
     friend class TransactionTablePriv;
 };
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index b4733d369ea3..f7b1552f3ee1 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -34,7 +34,6 @@ WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *p
     cachedEncryptionStatus(Unencrypted),
     cachedNumBlocks(0)
 {
-    fProcessingQueuedTransactions = false;
     fHaveWatchOnly = wallet->HaveWatchOnly();
     fForceCheckBalanceChanged = false;
 
@@ -164,11 +163,8 @@ void WalletModel::checkBalanceChanged()
     }
 }
 
-void WalletModel::updateTransaction(const QString &hash, int status)
+void WalletModel::updateTransaction()
 {
-    if(transactionTableModel)
-        transactionTableModel->updateTransaction(hash, status);
-
     // Balance and number of transactions might have changed
     fForceCheckBalanceChanged = true;
 }
@@ -455,45 +451,16 @@ static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet,
                               Q_ARG(int, status));
 }
 
-// queue notifications to show a non freezing progress dialog e.g. for rescan
-static bool fQueueNotifications = false;
-static std::vector<std::pair<uint256, ChangeType> > vQueueNotifications;
 static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet, const uint256 &hash, ChangeType status)
 {
-    if (fQueueNotifications)
-    {
-        vQueueNotifications.push_back(make_pair(hash, status));
-        return;
-    }
-
-    QString strHash = QString::fromStdString(hash.GetHex());
-
-    qDebug() << "NotifyTransactionChanged : " + strHash + " status= " + QString::number(status);
-    QMetaObject::invokeMethod(walletmodel, "updateTransaction", Qt::QueuedConnection,
-                              Q_ARG(QString, strHash),
-                              Q_ARG(int, status));
+    Q_UNUSED(wallet);
+    Q_UNUSED(hash);
+    Q_UNUSED(status);
+    QMetaObject::invokeMethod(walletmodel, "updateTransaction", Qt::QueuedConnection);
 }
 
 static void ShowProgress(WalletModel *walletmodel, const std::string &title, int nProgress)
 {
-    if (nProgress == 0)
-        fQueueNotifications = true;
-
-    if (nProgress == 100)
-    {
-        fQueueNotifications = false;
-        if (vQueueNotifications.size() > 10) // prevent balloon spam, show maximum 10 balloons
-            QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, true));
-        for (unsigned int i = 0; i < vQueueNotifications.size(); ++i)
-        {
-            if (vQueueNotifications.size() - i <= 10)
-                QMetaObject::invokeMethod(walletmodel, "setProcessingQueuedTransactions", Qt::QueuedConnection, Q_ARG(bool, false));
-
-            NotifyTransactionChanged(walletmodel, NULL, vQueueNotifications[i].first, vQueueNotifications[i].second);
-        }
-        std::vector<std::pair<uint256, ChangeType> >().swap(vQueueNotifications); // clear
-    }
-
     // emits signal "showProgress"
     QMetaObject::invokeMethod(walletmodel, "showProgress", Qt::QueuedConnection,
                               Q_ARG(QString, QString::fromStdString(title)),
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index b1d0f28f127f..fe91e9d9faee 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -133,7 +133,6 @@ class WalletModel : public QObject
     CAmount getWatchUnconfirmedBalance() const;
     CAmount getWatchImmatureBalance() const;
     EncryptionStatus getEncryptionStatus() const;
-    bool processingQueuedTransactions() { return fProcessingQueuedTransactions; }
 
     // Check address for validity
     bool validateAddress(const QString &address);
@@ -197,7 +196,6 @@ class WalletModel : public QObject
 
 private:
     CWallet *wallet;
-    bool fProcessingQueuedTransactions;
     bool fHaveWatchOnly;
     bool fForceCheckBalanceChanged;
 
@@ -254,15 +252,13 @@ public slots:
     /* Wallet status might have changed */
     void updateStatus();
     /* New transaction, or transaction changed status */
-    void updateTransaction(const QString &hash, int status);
+    void updateTransaction();
     /* New, updated or removed address book entry */
     void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status);
     /* Watch-only added */
     void updateWatchOnlyFlag(bool fHaveWatchonly);
     /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
     void pollBalanceChanged();
-    /* Needed to update fProcessingQueuedTransactions through a QueuedConnection */
-    void setProcessingQueuedTransactions(bool value) { fProcessingQueuedTransactions = value; }
 };
 
 #endif // WALLETMODEL_H
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index eff50593bd4c..3b8fdd7e5fdf 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -137,10 +137,12 @@ void WalletView::setWalletModel(WalletModel *walletModel)
 void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
 {
     // Prevent balloon-spam when initial block download is in progress
-    if (!walletModel || walletModel->processingQueuedTransactions() || !clientModel || clientModel->inInitialBlockDownload())
+    if (!walletModel || !clientModel || clientModel->inInitialBlockDownload())
         return;
 
     TransactionTableModel *ttm = walletModel->getTransactionTableModel();
+    if (!ttm || ttm->processingQueuedTransactions())
+        return;
 
     QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString();
     qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong();

From a2d0fc658a7b21d2d41ef2a6c657d24114b6c49e Mon Sep 17 00:00:00 2001
From: Ruben Dario Ponticelli <rdponticelli@gmail.com>
Date: Tue, 28 Oct 2014 14:48:50 -0300
Subject: [PATCH 0942/1819] Fix IsInitialBlockDownload which was broken by
 headers first.

---
 src/main.cpp | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 008a0591032b..bf487df39f3e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1177,15 +1177,8 @@ bool IsInitialBlockDownload()
     LOCK(cs_main);
     if (fImporting || fReindex || chainActive.Height() < Checkpoints::GetTotalBlocksEstimate())
         return true;
-    static int64_t nLastUpdate;
-    static CBlockIndex* pindexLastBest;
-    if (chainActive.Tip() != pindexLastBest)
-    {
-        pindexLastBest = chainActive.Tip();
-        nLastUpdate = GetTime();
-    }
-    return (GetTime() - nLastUpdate < 10 &&
-            chainActive.Tip()->GetBlockTime() < GetTime() - 24 * 60 * 60);
+    return (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
+            pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
 }
 
 bool fLargeWorkForkFound = false;

From 71697f97d3f9512f0af934070690c14f1c0d95ea Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 28 Oct 2014 21:33:23 -0400
Subject: [PATCH 0943/1819] Separate protocol versioning from clientversion

---
 .gitattributes                         |  2 +-
 Makefile.am                            |  2 +-
 src/Makefile.am                        |  6 +++---
 src/alert.cpp                          |  1 +
 src/bitcoin-cli.cpp                    |  2 +-
 src/bitcoin-tx.cpp                     |  1 +
 src/bitcoind.cpp                       |  1 +
 src/{version.cpp => clientversion.cpp} |  2 +-
 src/clientversion.h                    | 27 ++++++++++++++++++++++++++
 src/db.h                               |  1 +
 src/leveldbwrapper.h                   |  1 +
 src/net.cpp                            |  1 +
 src/qt/clientmodel.cpp                 |  1 +
 src/qt/recentrequeststablemodel.cpp    |  1 +
 src/qt/utilitydialog.cpp               |  2 +-
 src/rpcmisc.cpp                        |  1 +
 src/rpcnet.cpp                         |  1 +
 src/rpcprotocol.cpp                    |  1 +
 src/test/alert_tests.cpp               |  2 +-
 src/test/bloom_tests.cpp               |  1 +
 src/test/checkblock_tests.cpp          |  1 +
 src/test/transaction_tests.cpp         |  1 +
 src/test/util_tests.cpp                |  2 +-
 src/txmempool.cpp                      |  1 +
 src/version.h                          | 22 ---------------------
 25 files changed, 52 insertions(+), 32 deletions(-)
 rename src/{version.cpp => clientversion.cpp} (99%)

diff --git a/.gitattributes b/.gitattributes
index 26d7549356a2..c9cf4a7d9cd0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1 @@
-src/version.cpp export-subst
+src/clientversion.cpp export-subst
diff --git a/Makefile.am b/Makefile.am
index fe7244edf82c..7fe381147610 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -36,7 +36,7 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
 dist-hook:
 	-$(MAKE) -C $(top_distdir)/src/leveldb clean
 	-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
-	-$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
+	-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
 
 distcheck-hook:
 	$(MKDIR_P) $(top_distdir)/_build/src/leveldb
diff --git a/src/Makefile.am b/src/Makefile.am
index 91cc1b96e722..8253c4ab142c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -146,7 +146,7 @@ obj/build.h: FORCE
 	@$(MKDIR_P) $(builddir)/obj
 	@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
 	  $(abs_top_srcdir)
-libbitcoin_util_a-version.$(OBJEXT): obj/build.h
+libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
 
 # server: shared between bitcoind and bitcoin-qt
 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
@@ -241,6 +241,7 @@ libbitcoin_util_a_SOURCES = \
   compat/glibc_sanity.cpp \
   compat/glibcxx_sanity.cpp \
   chainparamsbase.cpp \
+  clientversion.cpp \
   random.cpp \
   rpcprotocol.cpp \
   sync.cpp \
@@ -249,7 +250,6 @@ libbitcoin_util_a_SOURCES = \
   utilstrencodings.cpp \
   utilmoneystr.cpp \
   utiltime.cpp \
-  version.cpp \
   $(BITCOIN_CORE_H)
 
 if GLIBC_BACK_COMPAT
@@ -354,7 +354,7 @@ clean-local:
 
 .rc.o:
 	@test -f $(WINDRES)
-	$(AM_V_GEN) $(WINDRES) -i $< -o $@
+	$(AM_V_GEN) $(WINDRES) -DWINDRES_PREPROC -i $< -o $@
 
 .mm.o:
 	$(AM_V_CXX) $(OBJCXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
diff --git a/src/alert.cpp b/src/alert.cpp
index d495849206d4..f16898dc3896 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -6,6 +6,7 @@
 #include "alert.h"
 
 #include "chainparams.h"
+#include "clientversion.h"
 #include "key.h"
 #include "net.h"
 #include "timedata.h"
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index aa5e285b104d..38fbc29faf1f 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -4,12 +4,12 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chainparamsbase.h"
+#include "clientversion.h"
 #include "init.h"
 #include "rpcclient.h"
 #include "rpcprotocol.h"
 #include "util.h"
 #include "utilstrencodings.h"
-#include "version.h"
 
 #include <boost/filesystem/operations.hpp>
 
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 6f3409edf30a..c0d21ed36f90 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -3,6 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
+#include "clientversion.h"
 #include "core/transaction.h"
 #include "core_io.h"
 #include "keystore.h"
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 0737b5a83dad..a79e581a8034 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -3,6 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "clientversion.h"
 #include "rpcserver.h"
 #include "init.h"
 #include "main.h"
diff --git a/src/version.cpp b/src/clientversion.cpp
similarity index 99%
rename from src/version.cpp
rename to src/clientversion.cpp
index d12b681e5c3b..4987c3ed38e1 100644
--- a/src/version.cpp
+++ b/src/clientversion.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "version.h"
+#include "clientversion.h"
 
 #include "tinyformat.h"
 
diff --git a/src/clientversion.h b/src/clientversion.h
index cd7ceb78f0eb..acaf54c6af37 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -35,4 +35,31 @@
 // Copyright string used in Windows .rc files
 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
 
+/*
+  bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
+  WINDRES_PREPROC is defined to indicate that its pre-processor is running.
+  Anything other than a define should be guarded below.
+*/
+
+#if !defined(WINDRES_PREPROC)
+
+#include <string>
+#include <vector>
+
+static const int CLIENT_VERSION =
+                           1000000 * CLIENT_VERSION_MAJOR
+                         +   10000 * CLIENT_VERSION_MINOR
+                         +     100 * CLIENT_VERSION_REVISION
+                         +       1 * CLIENT_VERSION_BUILD;
+
+extern const std::string CLIENT_NAME;
+extern const std::string CLIENT_BUILD;
+extern const std::string CLIENT_DATE;
+
+
+std::string FormatFullVersion();
+std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
+
+#endif // WINDRES_PREPROC
+
 #endif // CLIENTVERSION_H
diff --git a/src/db.h b/src/db.h
index 0cbdd8b91b5e..85ffbae1cb43 100644
--- a/src/db.h
+++ b/src/db.h
@@ -6,6 +6,7 @@
 #ifndef BITCOIN_DB_H
 #define BITCOIN_DB_H
 
+#include "clientversion.h"
 #include "serialize.h"
 #include "streams.h"
 #include "sync.h"
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index d997d56e00b7..10b7a2427c81 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -5,6 +5,7 @@
 #ifndef BITCOIN_LEVELDBWRAPPER_H
 #define BITCOIN_LEVELDBWRAPPER_H
 
+#include "clientversion.h"
 #include "serialize.h"
 #include "streams.h"
 #include "util.h"
diff --git a/src/net.cpp b/src/net.cpp
index 6cccdca9522c..5ceb82cf8b0f 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -11,6 +11,7 @@
 
 #include "addrman.h"
 #include "chainparams.h"
+#include "clientversion.h"
 #include "core/transaction.h"
 #include "ui_interface.h"
 
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 738fb48ef894..aedda4907190 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -10,6 +10,7 @@
 #include "alert.h"
 #include "chainparams.h"
 #include "checkpoints.h"
+#include "clientversion.h"
 #include "main.h"
 #include "net.h"
 #include "ui_interface.h"
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 5deac8007c65..5533adab8b99 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -5,6 +5,7 @@
 #include "recentrequeststablemodel.h"
 
 #include "bitcoinunits.h"
+#include "clientversion.h"
 #include "guiutil.h"
 #include "optionsmodel.h"
 #include "streams.h"
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 84f88dff5af8..58bf0406248b 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -10,8 +10,8 @@
 #include "clientmodel.h"
 #include "guiutil.h"
 
+#include "clientversion.h"
 #include "init.h"
-#include "version.h"
 
 #include <stdio.h>
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 92ed1c3e2bd5..08e956c96112 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -4,6 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
+#include "clientversion.h"
 #include "init.h"
 #include "main.h"
 #include "net.h"
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 12dcd5b5401f..46b5f3d7ad85 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -4,6 +4,7 @@
 
 #include "rpcserver.h"
 
+#include "clientversion.h"
 #include "main.h"
 #include "net.h"
 #include "netbase.h"
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index c99d113bc39d..c2ce73106f42 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -5,6 +5,7 @@
 
 #include "rpcprotocol.h"
 
+#include "clientversion.h"
 #include "tinyformat.h"
 #include "util.h"
 #include "utilstrencodings.h"
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index 28610f0d2e49..9cf7a98f46e2 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -7,13 +7,13 @@
 //
 
 #include "alert.h"
+#include "clientversion.h"
 #include "data/alertTests.raw.h"
 
 #include "serialize.h"
 #include "streams.h"
 #include "util.h"
 #include "utilstrencodings.h"
-#include "version.h"
 
 #include <fstream>
 
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 99b21a23a03c..783e284af579 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -5,6 +5,7 @@
 #include "bloom.h"
 
 #include "base58.h"
+#include "clientversion.h"
 #include "key.h"
 #include "main.h"
 #include "serialize.h"
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 9151fdc0c833..fc36b43e16e9 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -8,6 +8,7 @@
 
 
 
+#include "clientversion.h"
 #include "main.h"
 #include "utiltime.h"
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index c46c31e99faf..d4c9b1a0ea07 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -5,6 +5,7 @@
 #include "data/tx_invalid.json.h"
 #include "data/tx_valid.json.h"
 
+#include "clientversion.h"
 #include "key.h"
 #include "keystore.h"
 #include "main.h"
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 761210feac72..67d50fccf4f7 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -4,12 +4,12 @@
 
 #include "util.h"
 
+#include "clientversion.h"
 #include "core/transaction.h"
 #include "random.h"
 #include "sync.h"
 #include "utilstrencodings.h"
 #include "utilmoneystr.h"
-#include "version.h"
 
 #include <stdint.h>
 #include <vector>
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index c042dd8467cb..d3d9cb8a0131 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -5,6 +5,7 @@
 
 #include "txmempool.h"
 
+#include "clientversion.h"
 #include "streams.h"
 #include "util.h"
 #include "utilmoneystr.h"
diff --git a/src/version.h b/src/version.h
index a1e440de24dd..6ee08c205bf4 100644
--- a/src/version.h
+++ b/src/version.h
@@ -5,25 +5,6 @@
 #ifndef BITCOIN_VERSION_H
 #define BITCOIN_VERSION_H
 
-#include "clientversion.h"
-
-#include <string>
-#include <vector>
-
-//
-// client versioning
-//
-
-static const int CLIENT_VERSION =
-                           1000000 * CLIENT_VERSION_MAJOR
-                         +   10000 * CLIENT_VERSION_MINOR
-                         +     100 * CLIENT_VERSION_REVISION
-                         +       1 * CLIENT_VERSION_BUILD;
-
-extern const std::string CLIENT_NAME;
-extern const std::string CLIENT_BUILD;
-extern const std::string CLIENT_DATE;
-
 //
 // network protocol versioning
 //
@@ -53,7 +34,4 @@ static const int BIP0031_VERSION = 60000;
 // "mempool" command, enhanced "getdata" behavior starts with this version
 static const int MEMPOOL_GD_VERSION = 60002;
 
-std::string FormatFullVersion();
-std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments);
-
 #endif // BITCOIN_VERSION_H

From 2d06c0febfbe073c166717e4108deceefba38830 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Tue, 28 Oct 2014 23:54:06 -0700
Subject: [PATCH 0944/1819] Add missing reserved address spaces.

---
 src/netbase.cpp | 19 ++++++++++++++++++-
 src/netbase.h   |  3 +++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index b3d1001547e5..ea05b8766f5a 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -667,11 +667,28 @@ bool CNetAddr::IsRFC1918() const
         (GetByte(3) == 172 && (GetByte(2) >= 16 && GetByte(2) <= 31)));
 }
 
+bool CNetAddr::IsRFC2544() const
+{
+    return IsIPv4() && GetByte(3) == 198 && (GetByte(2) == 18 || GetByte(2) == 19);
+}
+
 bool CNetAddr::IsRFC3927() const
 {
     return IsIPv4() && (GetByte(3) == 169 && GetByte(2) == 254);
 }
 
+bool CNetAddr::IsRFC6598() const
+{
+    return IsIPv4() && GetByte(3) == 100 && GetByte(2) >= 64 && GetByte(2) <= 127;
+}
+
+bool CNetAddr::IsRFC5737() const
+{
+    return IsIPv4() && ((GetByte(3) == 192 && GetByte(2) == 0 && GetByte(1) == 2) ||
+        (GetByte(3) == 198 && GetByte(2) == 51 && GetByte(1) == 100) ||
+        (GetByte(3) == 203 && GetByte(2) == 0 && GetByte(1) == 113));
+}
+
 bool CNetAddr::IsRFC3849() const
 {
     return GetByte(15) == 0x20 && GetByte(14) == 0x01 && GetByte(13) == 0x0D && GetByte(12) == 0xB8;
@@ -778,7 +795,7 @@ bool CNetAddr::IsValid() const
 
 bool CNetAddr::IsRoutable() const
 {
-    return IsValid() && !(IsRFC1918() || IsRFC3927() || IsRFC4862() || (IsRFC4193() && !IsTor()) || IsRFC4843() || IsLocal());
+    return IsValid() && !(IsRFC1918() || IsRFC2544() || IsRFC3927() || IsRFC4862() || IsRFC6598() || IsRFC5737() || (IsRFC4193() && !IsTor()) || IsRFC4843() || IsLocal());
 }
 
 enum Network CNetAddr::GetNetwork() const
diff --git a/src/netbase.h b/src/netbase.h
index 1455cd8c33d3..9d8697dcc63a 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -61,6 +61,9 @@ class CNetAddr
         bool IsIPv4() const;    // IPv4 mapped address (::FFFF:0:0/96, 0.0.0.0/0)
         bool IsIPv6() const;    // IPv6 address (not mapped IPv4, not Tor)
         bool IsRFC1918() const; // IPv4 private networks (10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12)
+        bool IsRFC2544() const; // IPv4 inter-network communcations (192.18.0.0/15)
+        bool IsRFC6598() const; // IPv4 ISP-level NAT (100.64.0.0/10)
+        bool IsRFC5737() const; // IPv4 documentation addresses (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24)
         bool IsRFC3849() const; // IPv6 documentation address (2001:0DB8::/32)
         bool IsRFC3927() const; // IPv4 autoconfig (169.254.0.0/16)
         bool IsRFC3964() const; // IPv6 6to4 tunnelling (2002::/16)

From 20a5f610d344dfc1dc0c6e5e9e4b0211370aa563 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 29 Oct 2014 16:03:09 +0100
Subject: [PATCH 0945/1819] Don't relay alerts to peers before version
 negotiation

Fixes #1436
---
 src/alert.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/alert.cpp b/src/alert.cpp
index d495849206d4..b6d380479211 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -127,6 +127,9 @@ bool CAlert::RelayTo(CNode* pnode) const
 {
     if (!IsInEffect())
         return false;
+    // don't relay to nodes which haven't sent their version message
+    if (pnode->nVersion == 0)
+        return false;
     // returns true if wasn't already contained in the set
     if (pnode->setKnown.insert(GetHash()).second)
     {

From b4ee0bddad94cb580c1b56c592021bb102ed7b1a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 28 Oct 2014 09:33:55 -0700
Subject: [PATCH 0946/1819] Introduce preferred download peers

---
 src/main.cpp | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 008a0591032b..36af1c28277c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -128,6 +128,8 @@ namespace {
     };
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
 
+    // Number of preferrable block download peers.
+    int nPreferredDownload = 0;
 } // anon namespace
 
 //////////////////////////////////////////////////////////////////////////////
@@ -225,6 +227,8 @@ struct CNodeState {
     int64_t nStallingSince;
     list<QueuedBlock> vBlocksInFlight;
     int nBlocksInFlight;
+    // Whether we consider this a preferred download peer.
+    bool fPreferredDownload;
 
     CNodeState() {
         nMisbehavior = 0;
@@ -235,6 +239,7 @@ struct CNodeState {
         fSyncStarted = false;
         nStallingSince = 0;
         nBlocksInFlight = 0;
+        fPreferredDownload = false;
     }
 };
 
@@ -255,6 +260,16 @@ int GetHeight()
     return chainActive.Height();
 }
 
+void UpdatePreferredDownload(CNode* node, CNodeState* state)
+{
+    nPreferredDownload -= state->fPreferredDownload;
+
+    // Whether this node should be marked as a preferred download node.
+    state->fPreferredDownload = (!node->fInbound || node->fWhitelisted) && !node->fOneShot && !node->fClient;
+
+    nPreferredDownload += state->fPreferredDownload;
+}
+
 void InitializeNode(NodeId nodeid, const CNode *pnode) {
     LOCK(cs_main);
     CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second;
@@ -271,6 +286,7 @@ void FinalizeNode(NodeId nodeid) {
     BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight)
         mapBlocksInFlight.erase(entry.hash);
     EraseOrphansFor(nodeid);
+    nPreferredDownload -= state->fPreferredDownload;
 
     mapNodeState.erase(nodeid);
 }
@@ -3471,6 +3487,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
 
+        // Potentially mark this peer as a preferred download peer.
+        UpdatePreferredDownload(pfrom, State(pfrom->GetId()));
 
         // Change version
         pfrom->PushMessage("verack");
@@ -4415,7 +4433,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         // Start block sync
         if (pindexBestHeader == NULL)
             pindexBestHeader = chainActive.Tip();
-        bool fFetch = !pto->fInbound || (pindexBestHeader && (state.pindexLastCommonBlock ? state.pindexLastCommonBlock->nHeight : 0) + 144 > pindexBestHeader->nHeight);
+        bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do.
         if (!state.fSyncStarted && !pto->fClient && fFetch && !fImporting && !fReindex) {
             // Only actively request headers from a single peer, unless we're close to today.
             if (nSyncStarted == 0 || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) {

From 22c4272bf4ea04689fc0ea08e637caa46ba12c98 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 22 Oct 2014 01:31:01 +0200
Subject: [PATCH 0947/1819] MOVEONLY: Move void UpdateTime() from pow.o to
 miner.o (plus fix include main.h -> chain.h)

---
 src/miner.cpp | 10 ++++++++++
 src/miner.h   |  2 ++
 src/pow.cpp   | 12 +-----------
 src/pow.h     |  2 --
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 0235de3ab3d3..d3bbc6235ecf 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -12,6 +12,7 @@
 #include "main.h"
 #include "net.h"
 #include "pow.h"
+#include "timedata.h"
 #include "util.h"
 #include "utilmoneystr.h"
 #ifdef ENABLE_WALLET
@@ -78,6 +79,15 @@ class TxPriorityCompare
     }
 };
 
+void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
+{
+    pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
+
+    // Updating time can change work required on testnet:
+    if (Params().AllowMinDifficultyBlocks())
+        pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
+}
+
 CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 {
     // Create new block
diff --git a/src/miner.h b/src/miner.h
index 1fa499dc5b9f..aede0e6d4b06 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -9,6 +9,7 @@
 #include <stdint.h>
 
 class CBlock;
+class CBlockHeader;
 class CBlockIndex;
 class CReserveKey;
 class CScript;
@@ -25,6 +26,7 @@ CBlockTemplate* CreateNewBlockWithKey(CReserveKey& reservekey);
 void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce);
 /** Check mined block */
 bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey);
+void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
 
 extern double dHashesPerSec;
 extern int64_t nHPSTimerStart;
diff --git a/src/pow.cpp b/src/pow.cpp
index af7fc488ef36..483122a76a89 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -5,10 +5,9 @@
 
 #include "pow.h"
 
+#include "chain.h"
 #include "chainparams.h"
 #include "core/block.h"
-#include "main.h"
-#include "timedata.h"
 #include "uint256.h"
 #include "util.h"
 
@@ -98,15 +97,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     return true;
 }
 
-void UpdateTime(CBlockHeader* pblock, const CBlockIndex* pindexPrev)
-{
-    pblock->nTime = std::max(pindexPrev->GetMedianTimePast()+1, GetAdjustedTime());
-
-    // Updating time can change work required on testnet:
-    if (Params().AllowMinDifficultyBlocks())
-        pblock->nBits = GetNextWorkRequired(pindexPrev, pblock);
-}
-
 uint256 GetProofIncrement(unsigned int nBits)
 {
     uint256 bnTarget;
diff --git a/src/pow.h b/src/pow.h
index 233d1f37953f..9ee6ce44d6f8 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -17,8 +17,6 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
 /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
 bool CheckProofOfWork(uint256 hash, unsigned int nBits);
 
-void UpdateTime(CBlockHeader* block, const CBlockIndex* pindexPrev);
-
 uint256 GetProofIncrement(unsigned int nBits);
 
 #endif // BITCOIN_POW_H

From 092b58d13d658baebbf03a6d5209f368f19e50a8 Mon Sep 17 00:00:00 2001
From: jtimon <jtimon@blockstream.io>
Date: Wed, 29 Oct 2014 17:00:02 +0100
Subject: [PATCH 0948/1819] CBlockIndex::GetBlockWork() +
 GetProofIncrement(nBits) -> GetBlockProof(CBlockIndex)

---
 src/chain.h  | 5 -----
 src/main.cpp | 8 ++++----
 src/pow.cpp  | 4 ++--
 src/pow.h    | 3 +--
 4 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/chain.h b/src/chain.h
index 2a5577162291..0f513019d0ca 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -217,11 +217,6 @@ class CBlockIndex
         return (int64_t)nTime;
     }
 
-    uint256 GetBlockWork() const
-    {
-        return GetProofIncrement(nBits);
-    }
-
     enum { nMedianTimeSpan=11 };
 
     int64_t GetMedianTimePast() const
diff --git a/src/main.cpp b/src/main.cpp
index 008a0591032b..0ac23ab87600 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1205,7 +1205,7 @@ void CheckForkWarningConditions()
     if (pindexBestForkTip && chainActive.Height() - pindexBestForkTip->nHeight >= 72)
         pindexBestForkTip = NULL;
 
-    if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6)))
+    if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (GetBlockProof(*chainActive.Tip()) * 6)))
     {
         if (!fLargeWorkForkFound)
         {
@@ -1256,7 +1256,7 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
     // We define it this way because it allows us to only store the highest fork tip (+ base) which meets
     // the 7-block condition and from this always have the most-likely-to-cause-warning fork
     if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) &&
-            pindexNewForkTip->nChainWork - pfork->nChainWork > (pfork->GetBlockWork() * 7) &&
+            pindexNewForkTip->nChainWork - pfork->nChainWork > (GetBlockProof(*pfork) * 7) &&
             chainActive.Height() - pindexNewForkTip->nHeight < 72)
     {
         pindexBestForkTip = pindexNewForkTip;
@@ -2095,7 +2095,7 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
         pindexNew->nHeight = pindexNew->pprev->nHeight + 1;
         pindexNew->BuildSkip();
     }
-    pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + pindexNew->GetBlockWork();
+    pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + GetBlockProof(*pindexNew);
     pindexNew->RaiseValidity(BLOCK_VALID_TREE);
     if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork)
         pindexBestHeader = pindexNew;
@@ -2788,7 +2788,7 @@ bool static LoadBlockIndexDB()
     BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight)
     {
         CBlockIndex* pindex = item.second;
-        pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + pindex->GetBlockWork();
+        pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + GetBlockProof(*pindex);
         if (pindex->nStatus & BLOCK_HAVE_DATA) {
             if (pindex->pprev) {
                 if (pindex->pprev->nChainTx) {
diff --git a/src/pow.cpp b/src/pow.cpp
index 483122a76a89..e07e7ff7702d 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -97,12 +97,12 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
     return true;
 }
 
-uint256 GetProofIncrement(unsigned int nBits)
+uint256 GetBlockProof(const CBlockIndex& block)
 {
     uint256 bnTarget;
     bool fNegative;
     bool fOverflow;
-    bnTarget.SetCompact(nBits, &fNegative, &fOverflow);
+    bnTarget.SetCompact(block.nBits, &fNegative, &fOverflow);
     if (fNegative || fOverflow || bnTarget == 0)
         return 0;
     // We need to compute 2**256 / (bnTarget+1), but we can't represent 2**256
diff --git a/src/pow.h b/src/pow.h
index 9ee6ce44d6f8..cf28656bd8af 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -16,7 +16,6 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
 
 /** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
 bool CheckProofOfWork(uint256 hash, unsigned int nBits);
-
-uint256 GetProofIncrement(unsigned int nBits);
+uint256 GetBlockProof(const CBlockIndex& block);
 
 #endif // BITCOIN_POW_H

From 4ead850fe54ae0bdfb4b3724cbefb3425a16b74a Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Wed, 29 Oct 2014 17:01:01 -0700
Subject: [PATCH 0949/1819] Fix for crash during block download

---
 src/main.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 008a0591032b..0506a7f598c3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1739,9 +1739,9 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 }
 
 // Update the on-disk chain state.
-bool static WriteChainState(CValidationState &state) {
+bool static WriteChainState(CValidationState &state, bool forceWrite=false) {
     static int64_t nLastWrite = 0;
-    if (pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
+    if (forceWrite || pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
         // Typical CCoins structures on disk are around 100 bytes in size.
         // Pushing a new one to the database can cause it to be written
         // twice (once in the log, and once in the tables). This is already
@@ -2999,6 +2999,8 @@ bool InitBlockIndex() {
                 return error("LoadBlockIndex() : genesis block not accepted");
             if (!ActivateBestChain(state, &block))
                 return error("LoadBlockIndex() : genesis block cannot be activated");
+            // Force a chainstate write so that when we VerifyDB in a moment, it doesnt check stale data
+            return WriteChainState(state, true);
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
         }

From 8375e2215f24ff4b92c634d2dc56898e9cda437b Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Wed, 29 Oct 2014 17:01:18 -0700
Subject: [PATCH 0950/1819] Fix -loadblock after shutdown during IBD

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0506a7f598c3..238b0400ea0e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3136,7 +3136,7 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                 }
 
                 // process in case the block isn't known yet
-                if (mapBlockIndex.count(hash) == 0) {
+                if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) {
                     CValidationState state;
                     if (ProcessBlock(state, NULL, &block, dbp))
                         nLoaded++;

From 50b43fda08afeeaf22e0ad991a9885ee078a7c78 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Wed, 29 Oct 2014 17:02:48 -0700
Subject: [PATCH 0951/1819] Be a bit more verbose during -loadblock if we
 already have blocks

---
 src/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 238b0400ea0e..5302f0bcb457 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3142,6 +3142,8 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
                         nLoaded++;
                     if (state.IsError())
                         break;
+                } else if (hash != Params().HashGenesisBlock() && mapBlockIndex[hash]->nHeight % 1000 == 0) {
+                    LogPrintf("Block Import: already had block %s at height %d\n", hash.ToString(), mapBlockIndex[hash]->nHeight);
                 }
 
                 // Recursively process earlier encountered successors of this block

From e69a5873e705b132b787415b375c206b1f615bac Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 10 Sep 2012 02:02:35 +0000
Subject: [PATCH 0952/1819] RPC: submitblock: Support for returning specific
 rejection reasons

---
 src/rpcmining.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index b063159721b2..6b390b1b9514 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -592,7 +592,12 @@ Value submitblock(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
     }
     if (state.IsInvalid())
-        return "rejected"; // TODO: report validation state
+    {
+        std::string strRejectReason = state.GetRejectReason();
+        if (strRejectReason.empty())
+            return "rejected";
+        return strRejectReason;
+    }
 
     return Value::null;
 }

From eadcd0c802fecce1486cc5be4740e078292facff Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Wed, 29 Oct 2014 18:55:53 -0700
Subject: [PATCH 0953/1819] Print parameter interactions to console, too

---
 src/init.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index d928094bbae5..3fd08ce0066c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -548,6 +548,10 @@ bool AppInit2(boost::thread_group& threadGroup)
 #endif
 
     // ********************************************************* Step 2: parameter interactions
+    // Set this early so that parameter interactions go to console
+    fPrintToConsole = GetBoolArg("-printtoconsole", false);
+    fLogTimestamps = GetBoolArg("-logtimestamps", true);
+    fLogIPs = GetBoolArg("-logips", false);
 
     if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
         // when specifying an explicit binding address, you want to listen on it
@@ -641,9 +645,6 @@ bool AppInit2(boost::thread_group& threadGroup)
         nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS;
 
     fServer = GetBoolArg("-server", false);
-    fPrintToConsole = GetBoolArg("-printtoconsole", false);
-    fLogTimestamps = GetBoolArg("-logtimestamps", true);
-    fLogIPs = GetBoolArg("-logips", false);
 #ifdef ENABLE_WALLET
     bool fDisableWallet = GetBoolArg("-disablewallet", false);
 #endif

From 779204029463ed89fa74c52510017954f4cb2411 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Thu, 30 Oct 2014 10:14:08 +0800
Subject: [PATCH 0954/1819] Update comments in rpcserver to be doxygen
 compatible

---
 src/rpcserver.cpp | 22 ++++++++++------------
 src/rpcserver.h   | 39 ++++++++++++++++++++-------------------
 2 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 9668c7883144..08ed73f6de62 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "rpcserver.h"
@@ -34,7 +34,7 @@ using namespace std;
 static std::string strRPCUserColonPass;
 
 static bool fRPCRunning = false;
-// These are created by StartRPCThreads, destroyed in StopRPCThreads
+//! These are created by StartRPCThreads, destroyed in StopRPCThreads
 static asio::io_service* rpc_io_service = NULL;
 static map<string, boost::shared_ptr<deadline_timer> > deadlineTimers;
 static ssl::context* rpc_ssl_context = NULL;
@@ -134,9 +134,9 @@ vector<unsigned char> ParseHexO(const Object& o, string strKey)
 }
 
 
-///
-/// Note: This interface may still be subject to change.
-///
+/**
+ * Note: This interface may still be subject to change.
+ */
 
 string CRPCTable::help(string strCommand) const
 {
@@ -232,11 +232,9 @@ Value stop(const Array& params, bool fHelp)
 
 
 
-//
-// Call Table
-//
-
-
+/**
+ * Call Table
+ */
 static const CRPCCommand vRPCCommands[] =
 { //  category              name                      actor (function)         okSafeMode threadSafe reqWallet
   //  --------------------- ------------------------  -----------------------  ---------- ---------- ---------
@@ -453,7 +451,7 @@ class AcceptedConnectionImpl : public AcceptedConnection
 
 void ServiceConnection(AcceptedConnection *conn);
 
-// Forward declaration required for RPCListen
+//! Forward declaration required for RPCListen
 template <typename Protocol, typename SocketAcceptorService>
 static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
                              ssl::context& context,
@@ -669,7 +667,7 @@ void StartRPCThreads()
 
             fListening = true;
             rpc_acceptors.push_back(acceptor);
-            // If dual IPv6/IPv4 bind succesful, skip binding to IPv4 separately
+            // If dual IPv6/IPv4 bind successful, skip binding to IPv4 separately
             if(bBindAny && bindAddress == asio::ip::address_v6::any() && !v6_only_error)
                 break;
         }
diff --git a/src/rpcserver.h b/src/rpcserver.h
index d440035f151d..cc444cef1fad 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef _BITCOINRPC_SERVER_H_
@@ -32,9 +32,10 @@ class AcceptedConnection
     virtual void close() = 0;
 };
 
-/* Start RPC threads */
+/** Start RPC threads */
 void StartRPCThreads();
-/* Alternative to StartRPCThreads for the GUI, when no server is
+/**
+ * Alternative to StartRPCThreads for the GUI, when no server is
  * used. The RPC thread in this case is only used to handle timeouts.
  * If real RPC threads have already been started this is a no-op.
  */
@@ -44,23 +45,23 @@ void StopRPCThreads();
 /* Query whether RPC is running */
 bool IsRPCRunning();
 
-/*
-  Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
-  the right number of arguments are passed, just that any passed are the correct type.
-  Use like:  RPCTypeCheck(params, boost::assign::list_of(str_type)(int_type)(obj_type));
-*/
+/**
+ * Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
+ * the right number of arguments are passed, just that any passed are the correct type.
+ * Use like:  RPCTypeCheck(params, boost::assign::list_of(str_type)(int_type)(obj_type));
+ */
 void RPCTypeCheck(const json_spirit::Array& params,
                   const std::list<json_spirit::Value_type>& typesExpected, bool fAllowNull=false);
-/*
-  Check for expected keys/value types in an Object.
-  Use like: RPCTypeCheck(object, boost::assign::map_list_of("name", str_type)("value", int_type));
-*/
+/**
+ * Check for expected keys/value types in an Object.
+ * Use like: RPCTypeCheck(object, boost::assign::map_list_of("name", str_type)("value", int_type));
+ */
 void RPCTypeCheck(const json_spirit::Object& o,
                   const std::map<std::string, json_spirit::Value_type>& typesExpected, bool fAllowNull=false);
 
-/*
-  Run func nSeconds from now. Uses boost deadline timers.
-  Overrides previous timer <name> (if any).
+/**
+ * Run func nSeconds from now. Uses boost deadline timers.
+ * Overrides previous timer <name> (if any).
  */
 void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds);
 
@@ -104,10 +105,10 @@ class CRPCTable
 
 extern const CRPCTable tableRPC;
 
-//
-// Utilities: convert hex-encoded Values
-// (throws error if not hex).
-//
+/**
+ * Utilities: convert hex-encoded Values
+ * (throws error if not hex).
+ */
 extern uint256 ParseHashV(const json_spirit::Value& v, std::string strName);
 extern uint256 ParseHashO(const json_spirit::Object& o, std::string strKey);
 extern std::vector<unsigned char> ParseHexV(const json_spirit::Value& v, std::string strName);

From 981f7907c48580623125230aa5082f3d67f72633 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 30 Oct 2014 07:31:34 +0100
Subject: [PATCH 0955/1819] [Qt] fix slot connection problems when no wallet is
 loaded

- guard 4 connect calls by an #ifdef when no wallet is loaded to fix "No
  such slot" warnings
- also add comments when #ifdef ENABLE_WALLET end
- fixes #5175
---
 src/qt/bitcoingui.cpp | 24 +++++++++++++-----------
 src/qt/bitcoingui.h   |  6 +++---
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index f0471c32f906..77cfdceef0a7 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -19,7 +19,7 @@
 #ifdef ENABLE_WALLET
 #include "walletframe.h"
 #include "walletmodel.h"
-#endif
+#endif // ENABLE_WALLET
 
 #ifdef Q_OS_MAC
 #include "macdockiconhandler.h"
@@ -106,7 +106,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     bool enableWallet = !GetBoolArg("-disablewallet", false);
 #else
     bool enableWallet = false;
-#endif
+#endif // ENABLE_WALLET
     if(enableWallet)
     {
         windowTitle += tr("Wallet");
@@ -136,7 +136,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
         walletFrame = new WalletFrame(this);
         setCentralWidget(walletFrame);
     } else
-#endif
+#endif // ENABLE_WALLET
     {
         /* When compiled without wallet or -disablewallet is provided,
          * the central widget is the rpc console.
@@ -268,6 +268,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
     tabGroup->addAction(historyAction);
 
+#ifdef ENABLE_WALLET
     // These showNormalIfMinimized are needed because Send Coins and Receive Coins
     // can be triggered from the tray menu, and need to show the GUI to be useful.
     connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
@@ -278,6 +279,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
     connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
     connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
+#endif // ENABLE_WALLET
 
     quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
     quitAction->setStatusTip(tr("Quit application"));
@@ -343,7 +345,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
         connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
         connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
     }
-#endif
+#endif // ENABLE_WALLET
 }
 
 void BitcoinGUI::createMenuBar()
@@ -433,7 +435,7 @@ void BitcoinGUI::setClientModel(ClientModel *clientModel)
         {
             walletFrame->setClientModel(clientModel);
         }
-#endif
+#endif // ENABLE_WALLET
         unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
     } else {
         // Disable possibility to show main window via action
@@ -469,7 +471,7 @@ void BitcoinGUI::removeAllWallets()
     setWalletActionsEnabled(false);
     walletFrame->removeAllWallets();
 }
-#endif
+#endif // ENABLE_WALLET
 
 void BitcoinGUI::setWalletActionsEnabled(bool enabled)
 {
@@ -616,7 +618,7 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr)
 {
     if (walletFrame) walletFrame->gotoVerifyMessageTab(addr);
 }
-#endif
+#endif // ENABLE_WALLET
 
 void BitcoinGUI::setNumConnections(int count)
 {
@@ -676,7 +678,7 @@ void BitcoinGUI::setNumBlocks(int count)
 #ifdef ENABLE_WALLET
         if(walletFrame)
             walletFrame->showOutOfSyncWarning(false);
-#endif
+#endif // ENABLE_WALLET
 
         progressBarLabel->setVisible(false);
         progressBar->setVisible(false);
@@ -727,7 +729,7 @@ void BitcoinGUI::setNumBlocks(int count)
 #ifdef ENABLE_WALLET
         if(walletFrame)
             walletFrame->showOutOfSyncWarning(true);
-#endif
+#endif // ENABLE_WALLET
 
         tooltip += QString("<br>");
         tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
@@ -850,7 +852,7 @@ void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmoun
                   .arg(type)
                   .arg(address), CClientUIInterface::MSG_INFORMATION);
 }
-#endif
+#endif // ENABLE_WALLET
 
 void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
 {
@@ -924,7 +926,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
         break;
     }
 }
-#endif
+#endif // ENABLE_WALLET
 
 void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
 {
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index f65f0e91379d..0ef410112766 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -63,7 +63,7 @@ class BitcoinGUI : public QMainWindow
     bool addWallet(const QString& name, WalletModel *walletModel);
     bool setCurrentWallet(const QString& name);
     void removeAllWallets();
-#endif
+#endif // ENABLE_WALLET
 
 protected:
     void changeEvent(QEvent *e);
@@ -163,7 +163,7 @@ public slots:
 
     /** Show incoming transaction notification for new transactions. */
     void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address);
-#endif
+#endif // ENABLE_WALLET
 
 private slots:
 #ifdef ENABLE_WALLET
@@ -183,7 +183,7 @@ private slots:
 
     /** Show open dialog */
     void openClicked();
-#endif
+#endif // ENABLE_WALLET
     /** Show configuration dialog */
     void optionsClicked();
     /** Show about dialog */

From 6395ba30366949b8631a7bf56c1898f1667284c8 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 26 Oct 2014 14:32:29 +0800
Subject: [PATCH 0956/1819] Update comments in version to be doxygen compatible

---
 src/clientversion.cpp | 54 +++++++++++++++++++++++++------------------
 src/version.h         | 26 ++++++++++-----------
 2 files changed, 44 insertions(+), 36 deletions(-)

diff --git a/src/clientversion.cpp b/src/clientversion.cpp
index 4987c3ed38e1..b3414fdb4b5d 100644
--- a/src/clientversion.cpp
+++ b/src/clientversion.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "clientversion.h"
@@ -8,35 +8,41 @@
 
 #include <string>
 
-// Name of client reported in the 'version' message. Report the same name
-// for both bitcoind and bitcoin-qt, to make it harder for attackers to
-// target servers or GUI users specifically.
+/**
+ * Name of client reported in the 'version' message. Report the same name
+ * for both bitcoind and bitcoin-core, to make it harder for attackers to
+ * target servers or GUI users specifically.
+ */
 const std::string CLIENT_NAME("Satoshi");
 
-// Client version number
+/**
+ * Client version number
+ */
 #define CLIENT_VERSION_SUFFIX ""
 
 
-// The following part of the code determines the CLIENT_BUILD variable.
-// Several mechanisms are used for this:
-// * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is
-//   generated by the build environment, possibly containing the output
-//   of git-describe in a macro called BUILD_DESC
-// * secondly, if this is an exported version of the code, GIT_ARCHIVE will
-//   be defined (automatically using the export-subst git attribute), and
-//   GIT_COMMIT will contain the commit id.
-// * then, three options exist for determining CLIENT_BUILD:
-//   * if BUILD_DESC is defined, use that literally (output of git-describe)
-//   * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit]
-//   * otherwise, use v[maj].[min].[rev].[build]-unk
-// finally CLIENT_VERSION_SUFFIX is added
-
-// First, include build.h if requested
+/**
+ * The following part of the code determines the CLIENT_BUILD variable.
+ * Several mechanisms are used for this:
+ * * first, if HAVE_BUILD_INFO is defined, include build.h, a file that is
+ *   generated by the build environment, possibly containing the output
+ *   of git-describe in a macro called BUILD_DESC
+ * * secondly, if this is an exported version of the code, GIT_ARCHIVE will
+ *   be defined (automatically using the export-subst git attribute), and
+ *   GIT_COMMIT will contain the commit id.
+ * * then, three options exist for determining CLIENT_BUILD:
+ *   * if BUILD_DESC is defined, use that literally (output of git-describe)
+ *   * if not, but GIT_COMMIT is defined, use v[maj].[min].[rev].[build]-g[commit]
+ *   * otherwise, use v[maj].[min].[rev].[build]-unk
+ * finally CLIENT_VERSION_SUFFIX is added
+ */
+
+//! First, include build.h if requested
 #ifdef HAVE_BUILD_INFO
 #include "build.h"
 #endif
 
-// git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$
+//! git will put "#define GIT_ARCHIVE 1" on the next line inside archives. $Format:%n#define GIT_ARCHIVE 1$
 #ifdef GIT_ARCHIVE
 #define GIT_COMMIT_ID "$Format:%h$"
 #define GIT_COMMIT_DATE "$Format:%cD$"
@@ -85,7 +91,9 @@ std::string FormatFullVersion()
     return CLIENT_BUILD;
 }
 
-// Format the subversion field according to BIP 14 spec (https://en.bitcoin.it/wiki/BIP_0014)
+/** 
+ * Format the subversion field according to BIP 14 spec (https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki) 
+ */
 std::string FormatSubVersion(const std::string& name, int nClientVersion, const std::vector<std::string>& comments)
 {
     std::ostringstream ss;
diff --git a/src/version.h b/src/version.h
index 6ee08c205bf4..a5a72c5467b3 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,37 +1,37 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_VERSION_H
 #define BITCOIN_VERSION_H
 
-//
-// network protocol versioning
-//
+/**
+ * network protocol versioning
+ */
 
 static const int PROTOCOL_VERSION = 70002;
 
-// initial proto version, to be increased after version/verack negotiation
+//! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
 
-// In this version, 'getheaders' was introduced.
+//! In this version, 'getheaders' was introduced.
 static const int GETHEADERS_VERSION = 31800;
 
-// disconnect from peers older than this proto version
+//! disconnect from peers older than this proto version
 static const int MIN_PEER_PROTO_VERSION = GETHEADERS_VERSION;
 
-// nTime field added to CAddress, starting with this version;
-// if possible, avoid requesting addresses nodes older than this
+//! nTime field added to CAddress, starting with this version;
+//! if possible, avoid requesting addresses nodes older than this
 static const int CADDR_TIME_VERSION = 31402;
 
-// only request blocks from nodes outside this range of versions
+//! only request blocks from nodes outside this range of versions
 static const int NOBLKS_VERSION_START = 32000;
 static const int NOBLKS_VERSION_END = 32400;
 
-// BIP 0031, pong message, is enabled for all versions AFTER this one
+//! BIP 0031, pong message, is enabled for all versions AFTER this one
 static const int BIP0031_VERSION = 60000;
 
-// "mempool" command, enhanced "getdata" behavior starts with this version
+//! "mempool" command, enhanced "getdata" behavior starts with this version
 static const int MEMPOOL_GD_VERSION = 60002;
 
 #endif // BITCOIN_VERSION_H

From 484e350f0428d3d0ad067238866b99b2780cb0cf Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 26 Oct 2014 16:32:04 +0800
Subject: [PATCH 0957/1819] Update comments in client version to be doxygen
 compatible

---
 src/clientversion.h | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/src/clientversion.h b/src/clientversion.h
index acaf54c6af37..a187e185c11d 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef CLIENTVERSION_H
@@ -8,38 +8,43 @@
 #if defined(HAVE_CONFIG_H)
 #include "config/bitcoin-config.h"
 #else
-//
-// client versioning and copyright year
-//
 
-// These need to be macros, as version.cpp's and bitcoin*-res.rc's voodoo requires it
+/**
+ * client versioning and copyright year
+ */
+
+//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 9
 #define CLIENT_VERSION_REVISION 99
 #define CLIENT_VERSION_BUILD 0
 
-// Set to true for release, false for prerelease or test build
+//! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE false
 
-// Copyright year (2009-this)
-// Todo: update this when changing our copyright comments in the source
+/**
+ * Copyright year (2009-this)
+ * Todo: update this when changing our copyright comments in the source
+ */
 #define COPYRIGHT_YEAR 2014
 
 #endif //HAVE_CONFIG_H
 
-// Converts the parameter X to a string after macro replacement on X has been performed.
-// Don't merge these into one macro!
+/**
+ * Converts the parameter X to a string after macro replacement on X has been performed.
+ * Don't merge these into one macro!
+ */
 #define STRINGIZE(X) DO_STRINGIZE(X)
 #define DO_STRINGIZE(X) #X
 
-// Copyright string used in Windows .rc files
+//! Copyright string used in Windows .rc files
 #define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers"
 
-/*
-  bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
-  WINDRES_PREPROC is defined to indicate that its pre-processor is running.
-  Anything other than a define should be guarded below.
-*/
+/**
+ * bitcoind-res.rc includes this file, but it cannot cope with real c++ code.
+ * WINDRES_PREPROC is defined to indicate that its pre-processor is running.
+ * Anything other than a define should be guarded below.
+ */
 
 #if !defined(WINDRES_PREPROC)
 

From f635269cd154eb69ad67a6fb004ed360b6112e27 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 30 Oct 2014 18:47:08 -0400
Subject: [PATCH 0958/1819] tests: enable alertnotify test for Windows

The semantics of "echo" are different there and they change the resulting text,
but they're still correct and predictable.
---
 src/test/alert_tests.cpp | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index 9cf7a98f46e2..4869ba52acce 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -154,9 +154,6 @@ BOOST_AUTO_TEST_CASE(AlertApplies)
 }
 
 
-// This uses sh 'echo' to test the -alertnotify function, writing to a
-// /tmp file. So skip it on Windows:
-#ifndef WIN32
 BOOST_AUTO_TEST_CASE(AlertNotify)
 {
     SetMockTime(11);
@@ -171,15 +168,24 @@ BOOST_AUTO_TEST_CASE(AlertNotify)
 
     std::vector<std::string> r = read_lines(temp);
     BOOST_CHECK_EQUAL(r.size(), 4u);
+
+// Windows built-in echo semantics are different than posixy shells. Quotes and
+// whitespace are printed literally.
+
+#ifndef WIN32
     BOOST_CHECK_EQUAL(r[0], "Alert 1");
     BOOST_CHECK_EQUAL(r[1], "Alert 2, cancels 1");
     BOOST_CHECK_EQUAL(r[2], "Alert 2, cancels 1");
     BOOST_CHECK_EQUAL(r[3], "Evil Alert; /bin/ls; echo "); // single-quotes should be removed
-
+#else
+    BOOST_CHECK_EQUAL(r[0], "'Alert 1' ");
+    BOOST_CHECK_EQUAL(r[1], "'Alert 2, cancels 1' ");
+    BOOST_CHECK_EQUAL(r[2], "'Alert 2, cancels 1' ");
+    BOOST_CHECK_EQUAL(r[3], "'Evil Alert; /bin/ls; echo ' ");
+#endif
     boost::filesystem::remove(temp);
 
     SetMockTime(0);
 }
-#endif
 
 BOOST_AUTO_TEST_SUITE_END()

From 7a41614aa27b9d3855b6145831cb4ad958f78823 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 30 Oct 2014 18:59:58 -0400
Subject: [PATCH 0959/1819] tests: allow rpc-tests to get filenames for
 bitcoind and bitcoin-cli from the environment

This will allow for windows tests to run with bitcoind.exe and bitcoin-cli.exe
---
 qa/rpc-tests/conflictedbalance.sh | 5 +++--
 qa/rpc-tests/txnmall.sh           | 5 +++--
 qa/rpc-tests/util.py              | 8 ++++----
 qa/rpc-tests/wallet.sh            | 5 +++--
 qa/rpc-tests/walletbackup.sh      | 5 +++--
 qa/rpc-tests/zapwallettxes.sh     | 5 +++--
 6 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/qa/rpc-tests/conflictedbalance.sh b/qa/rpc-tests/conflictedbalance.sh
index 71761321ed18..a112244c744e 100755
--- a/qa/rpc-tests/conflictedbalance.sh
+++ b/qa/rpc-tests/conflictedbalance.sh
@@ -18,13 +18,14 @@
 if [ $# -lt 1 ]; then
         echo "Usage: $0 path_to_binaries"
         echo "e.g. $0 ../../src"
+        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
         exit 1
 fi
 
 set -f
 
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
 
 DIR="${BASH_SOURCE%/*}"
 SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/txnmall.sh b/qa/rpc-tests/txnmall.sh
index 035e7ee15fa9..1296d54d92d7 100755
--- a/qa/rpc-tests/txnmall.sh
+++ b/qa/rpc-tests/txnmall.sh
@@ -8,13 +8,14 @@
 if [ $# -lt 1 ]; then
         echo "Usage: $0 path_to_binaries"
         echo "e.g. $0 ../../src"
+        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
         exit 1
 fi
 
 set -f
 
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
 
 DIR="${BASH_SOURCE%/*}"
 SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 6d0b21c927b1..c895eb1619b8 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -85,11 +85,11 @@ def initialize_chain(test_dir):
         # Create cache directories, run bitcoinds:
         for i in range(4):
             datadir=initialize_datadir("cache", i)
-            args = [ "bitcoind", "-keypool=1", "-datadir="+datadir, "-discover=0" ]
+            args = [ os.getenv("BITCOIND", "bitcoind"), "-keypool=1", "-datadir="+datadir, "-discover=0" ]
             if i > 0:
                 args.append("-connect=127.0.0.1:"+str(p2p_port(0)))
             bitcoind_processes[i] = subprocess.Popen(args)
-            subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir,
+            subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir,
                                     "-rpcwait", "getblockcount"], stdout=devnull)
         devnull.close()
         rpcs = []
@@ -150,11 +150,11 @@ def start_node(i, dir, extra_args=None, rpchost=None):
     Start a bitcoind and return RPC connection to it
     """
     datadir = os.path.join(dir, "node"+str(i))
-    args = [ "bitcoind", "-datadir="+datadir, "-keypool=1", "-discover=0" ]
+    args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
     if extra_args is not None: args.extend(extra_args)
     bitcoind_processes[i] = subprocess.Popen(args)
     devnull = open("/dev/null", "w+")
-    subprocess.check_call([ "bitcoin-cli", "-datadir="+datadir] +
+    subprocess.check_call([ os.getenv("BITCOINCLI", "bitcoin-cli"), "-datadir="+datadir] +
                           _rpchost_to_args(rpchost)  +
                           ["-rpcwait", "getblockcount"], stdout=devnull)
     devnull.close()
diff --git a/qa/rpc-tests/wallet.sh b/qa/rpc-tests/wallet.sh
index bb5f34f590af..c9ad0f2a7872 100755
--- a/qa/rpc-tests/wallet.sh
+++ b/qa/rpc-tests/wallet.sh
@@ -8,13 +8,14 @@
 if [ $# -lt 1 ]; then
         echo "Usage: $0 path_to_binaries"
         echo "e.g. $0 ../../src"
+        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
         exit 1
 fi
 
 set -f
 
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
 
 DIR="${BASH_SOURCE%/*}"
 SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/walletbackup.sh b/qa/rpc-tests/walletbackup.sh
index ee11418beffd..4af3d97f351d 100755
--- a/qa/rpc-tests/walletbackup.sh
+++ b/qa/rpc-tests/walletbackup.sh
@@ -36,11 +36,12 @@
 if [ $# -lt 1 ]; then
         echo "Usage: $0 path_to_binaries"
         echo "e.g. $0 ../../src"
+        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
         exit 1
 fi
 
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
 
 DIR="${BASH_SOURCE%/*}"
 SENDANDWAIT="${DIR}/send.sh"
diff --git a/qa/rpc-tests/zapwallettxes.sh b/qa/rpc-tests/zapwallettxes.sh
index e6d490cccc21..4312d84e9446 100755
--- a/qa/rpc-tests/zapwallettxes.sh
+++ b/qa/rpc-tests/zapwallettxes.sh
@@ -8,13 +8,14 @@
 if [ $# -lt 1 ]; then
         echo "Usage: $0 path_to_binaries"
         echo "e.g. $0 ../../src"
+        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
         exit 1
 fi
 
 set -f
 
-BITCOIND=${1}/bitcoind
-CLI=${1}/bitcoin-cli
+BITCOIND=${BITCOIND:-${1}/bitcoind}
+CLI=${BITCOINCLI:-${1}/bitcoin-cli}
 
 DIR="${BASH_SOURCE%/*}"
 SENDANDWAIT="${DIR}/send.sh"

From 5122ea7190f85952ef27153bb1778831efb3e0ec Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 30 Oct 2014 23:01:34 -0400
Subject: [PATCH 0960/1819] tests: fix forknotify.py on windows

Windows interprets 'foo.txt' as a literal filename while "foo.txt" is treated
as expected.
---
 qa/rpc-tests/forknotify.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index a4c2dc944eba..1d2c4a996635 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -23,7 +23,7 @@ def setup_network(self):
         with open(self.alert_filename, 'w') as f:
             pass  # Just open then close to create zero-length file
         self.nodes.append(start_node(0, self.options.tmpdir,
-                            ["-blockversion=2", "-alertnotify=echo %s >> '" + self.alert_filename + "'"]))
+                            ["-blockversion=2", "-alertnotify=echo %s >> \"" + self.alert_filename + "\""]))
         # Node1 mines block.version=211 blocks
         self.nodes.append(start_node(1, self.options.tmpdir,
                                 ["-blockversion=211"]))

From fa7f8cdc1ac92047cd876d750851cf4230fc8295 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 30 Oct 2014 22:29:35 -0400
Subject: [PATCH 0961/1819] tests: remove old pull-tester scripts

They're unused since the switch to Travis
---
 Makefile.am                   |   2 +-
 qa/pull-tester/pull-tester.py | 193 ----------------------------------
 qa/pull-tester/pull-tester.sh |  22 ----
 3 files changed, 1 insertion(+), 216 deletions(-)
 delete mode 100755 qa/pull-tester/pull-tester.py
 delete mode 100755 qa/pull-tester/pull-tester.sh

diff --git a/Makefile.am b/Makefile.am
index 7fe381147610..c6a045150e3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,7 +172,7 @@ check-local:
 	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
 endif
 
-EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
+EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
 
 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
 
diff --git a/qa/pull-tester/pull-tester.py b/qa/pull-tester/pull-tester.py
deleted file mode 100755
index 66688dd4b5e5..000000000000
--- a/qa/pull-tester/pull-tester.py
+++ /dev/null
@@ -1,193 +0,0 @@
-#!/usr/bin/python
-# Copyright (c) 2013-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.
-#
-import json
-from urllib import urlopen
-import requests
-import getpass
-from string import Template
-import sys
-import os
-import subprocess
-
-class RunError(Exception):
-    def __init__(self, value):
-        self.value = value
-    def __str__(self):
-        return repr(self.value)
-
-def run(command, **kwargs):
-    fail_hard = kwargs.pop("fail_hard", True)
-    # output to /dev/null by default:
-    kwargs.setdefault("stdout", open('/dev/null', 'w'))
-    kwargs.setdefault("stderr", open('/dev/null', 'w'))
-    command = Template(command).substitute(os.environ)
-    if "TRACE" in os.environ:
-        if 'cwd' in kwargs:
-            print("[cwd=%s] %s"%(kwargs['cwd'], command))
-        else: print(command)
-    try:
-        process = subprocess.Popen(command.split(' '), **kwargs)
-        process.wait()
-    except KeyboardInterrupt:
-        process.terminate()
-        raise
-    if process.returncode != 0 and fail_hard:
-        raise RunError("Failed: "+command)
-    return process.returncode
-
-def checkout_pull(clone_url, commit, out):
-    # Init
-    build_dir=os.environ["BUILD_DIR"]
-    run("umount ${CHROOT_COPY}/proc", fail_hard=False)
-    run("rsync --delete -apv ${CHROOT_MASTER}/ ${CHROOT_COPY}")
-    run("rm -rf ${CHROOT_COPY}${SCRIPTS_DIR}")
-    run("cp -a ${SCRIPTS_DIR} ${CHROOT_COPY}${SCRIPTS_DIR}")
-    # Merge onto upstream/master
-    run("rm -rf ${BUILD_DIR}")
-    run("mkdir -p ${BUILD_DIR}")
-    run("git clone ${CLONE_URL} ${BUILD_DIR}")
-    run("git remote add pull "+clone_url, cwd=build_dir, stdout=out, stderr=out)
-    run("git fetch pull", cwd=build_dir, stdout=out, stderr=out)
-    if run("git merge "+ commit, fail_hard=False, cwd=build_dir, stdout=out, stderr=out) != 0:
-        return False
-    run("chown -R ${BUILD_USER}:${BUILD_GROUP} ${BUILD_DIR}", stdout=out, stderr=out)
-    run("mount --bind /proc ${CHROOT_COPY}/proc")
-    return True
-
-def commentOn(commentUrl, success, inMerge, needTests, linkUrl):
-    common_message = """
-This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly.  If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/
-Contact BlueMatt on freenode if something looks broken."""
-
-    # Remove old BitcoinPullTester comments (I'm being lazy and not paginating here)
-    recentcomments = requests.get(commentUrl+"?sort=created&direction=desc",
-                                  auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"])).json
-    for comment in recentcomments:
-        if comment["user"]["login"] == os.environ["GITHUB_USER"] and common_message in comment["body"]:
-            requests.delete(comment["url"],
-                                  auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"]))
-
-    if success == True:
-        if needTests:
-            message = "Automatic sanity-testing: PLEASE ADD TEST-CASES, though technically passed. See " + linkUrl + " for binaries and test log."
-        else:
-            message = "Automatic sanity-testing: PASSED, see " + linkUrl + " for binaries and test log."
-
-        post_data = { "body" : message + common_message}
-    elif inMerge:
-        post_data = { "body" : "Automatic sanity-testing: FAILED MERGE, see " + linkUrl + " for test log." + """
-
-This pull does not merge cleanly onto current master""" + common_message}
-    else:
-        post_data = { "body" : "Automatic sanity-testing: FAILED BUILD/TEST, see " + linkUrl + " for binaries and test log." + """
-
-This could happen for one of several reasons:
-1. It chanages changes build scripts in a way that made them incompatible with the automated testing scripts (please tweak those patches in qa/pull-tester)
-2. It adds/modifies tests which test network rules (thanks for doing that), which conflicts with a patch applied at test time
-3. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
-4. The test suite fails on either Linux i386 or Win32
-5. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)
-
-If you believe this to be in error, please ping BlueMatt on freenode or TheBlueMatt here.
-""" + common_message}
-
-    resp = requests.post(commentUrl, json.dumps(post_data), auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"]))
-
-def testpull(number, comment_url, clone_url, commit):
-    print("Testing pull %d: %s : %s"%(number, clone_url,commit))
-
-    dir = os.environ["RESULTS_DIR"] + "/" + commit + "/"
-    print(" ouput to %s"%dir)
-    if os.path.exists(dir):
-        os.system("rm -r " + dir)
-    os.makedirs(dir)
-    currentdir = os.environ["RESULTS_DIR"] + "/current"
-    os.system("rm -r "+currentdir)
-    os.system("ln -s " + dir + " " + currentdir)
-    out = open(dir + "test.log", 'w+')
-
-    resultsurl = os.environ["RESULTS_URL"] + commit
-    checkedout = checkout_pull(clone_url, commit, out)
-    if checkedout != True:
-        print("Failed to test pull - sending comment to: " + comment_url)
-        commentOn(comment_url, False, True, False, resultsurl)
-        open(os.environ["TESTED_DB"], "a").write(commit + "\n")
-        return
-
-    run("rm -rf ${CHROOT_COPY}/${OUT_DIR}", fail_hard=False);
-    run("mkdir -p ${CHROOT_COPY}/${OUT_DIR}", fail_hard=False);
-    run("chown -R ${BUILD_USER}:${BUILD_GROUP} ${CHROOT_COPY}/${OUT_DIR}", fail_hard=False)
-
-    script = os.environ["BUILD_PATH"]+"/qa/pull-tester/pull-tester.sh"
-    script += " ${BUILD_PATH} ${MINGW_DEPS_DIR} ${SCRIPTS_DIR}/BitcoindComparisonTool_jar/BitcoindComparisonTool.jar 0 6 ${OUT_DIR}"
-    returncode = run("chroot ${CHROOT_COPY} sudo -u ${BUILD_USER} -H timeout ${TEST_TIMEOUT} "+script,
-                     fail_hard=False, stdout=out, stderr=out)
-
-    run("mv ${CHROOT_COPY}/${OUT_DIR} " + dir)
-    run("mv ${BUILD_DIR} " + dir)
-
-    if returncode == 42:
-        print("Successfully tested pull (needs tests) - sending comment to: " + comment_url)
-        commentOn(comment_url, True, False, True, resultsurl)
-    elif returncode != 0:
-        print("Failed to test pull - sending comment to: " + comment_url)
-        commentOn(comment_url, False, False, False, resultsurl)
-    else:
-        print("Successfully tested pull - sending comment to: " + comment_url)
-        commentOn(comment_url, True, False, False, resultsurl)
-    open(os.environ["TESTED_DB"], "a").write(commit + "\n")
-
-def environ_default(setting, value):
-    if not setting in os.environ:
-        os.environ[setting] = value
-
-if getpass.getuser() != "root":
-	print("Run me as root!")
-	sys.exit(1)
-
-if "GITHUB_USER" not in os.environ or "GITHUB_AUTH_TOKEN" not in os.environ:
-    print("GITHUB_USER and/or GITHUB_AUTH_TOKEN environment variables not set")
-    sys.exit(1)
-
-environ_default("CLONE_URL", "https://github.com/bitcoin/bitcoin.git")
-environ_default("MINGW_DEPS_DIR", "/mnt/w32deps")
-environ_default("SCRIPTS_DIR", "/mnt/test-scripts")
-environ_default("CHROOT_COPY", "/mnt/chroot-tmp")
-environ_default("CHROOT_MASTER", "/mnt/chroot")
-environ_default("OUT_DIR", "/mnt/out")
-environ_default("BUILD_PATH", "/mnt/bitcoin")
-os.environ["BUILD_DIR"] = os.environ["CHROOT_COPY"] + os.environ["BUILD_PATH"]
-environ_default("RESULTS_DIR", "/mnt/www/pull-tester")
-environ_default("RESULTS_URL", "http://jenkins.bluematt.me/pull-tester/")
-environ_default("GITHUB_REPO", "bitcoin/bitcoin")
-environ_default("TESTED_DB", "/mnt/commits-tested.txt")
-environ_default("BUILD_USER", "matt")
-environ_default("BUILD_GROUP", "matt")
-environ_default("TEST_TIMEOUT", str(60*60*2))
-
-print("Optional usage: pull-tester.py 2112")
-
-f = open(os.environ["TESTED_DB"])
-tested = set( line.rstrip() for line in f.readlines() )
-f.close()
-
-if len(sys.argv) > 1:
-    pull = requests.get("https://api.github.com/repos/"+os.environ["GITHUB_REPO"]+"/pulls/"+sys.argv[1],
-                        auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"])).json
-    testpull(pull["number"], pull["_links"]["comments"]["href"],
-             pull["head"]["repo"]["clone_url"], pull["head"]["sha"])
-
-else:
-    for page in range(1,100):
-        result = requests.get("https://api.github.com/repos/"+os.environ["GITHUB_REPO"]+"/pulls?state=open&page=%d"%(page,),
-                              auth=(os.environ['GITHUB_USER'], os.environ["GITHUB_AUTH_TOKEN"])).json
-        if len(result) == 0: break;
-        for pull in result:
-            if pull["head"]["sha"] in tested:
-                print("Pull %d already tested"%(pull["number"],))
-                continue
-            testpull(pull["number"], pull["_links"]["comments"]["href"],
-                     pull["head"]["repo"]["clone_url"], pull["head"]["sha"])
diff --git a/qa/pull-tester/pull-tester.sh b/qa/pull-tester/pull-tester.sh
deleted file mode 100755
index 3fe4a05c765e..000000000000
--- a/qa/pull-tester/pull-tester.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2013-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.
-#
-# Helper script for pull-tester.
-#Param 1: path to bitcoin srcroot
-#Param ...: arguments for build-test.sh
-
-if [ $# -lt 1 ]; then
-  echo "usage: $0 [bitcoin srcroot] build-test arguments..."
-fi
-
-killall -q bitcoin-cli
-killall -q bitcoind
-
-cd $1
-shift
-
-./autogen.sh
-./configure
-./qa/pull-tester/build-tests.sh "$@"

From 7667850dbfac0ced6eb2711d922c263b65ffaeee Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 30 Oct 2014 22:58:13 -0400
Subject: [PATCH 0962/1819] tests: replace the old (unused since Travis) tests
 with new rpc test scripts

---
 .gitignore                        |   4 +-
 Makefile.am                       |   2 +-
 configure.ac                      |   2 +-
 qa/pull-tester/build-tests.sh.in  | 102 ------------------------------
 qa/pull-tester/rpc-tests.sh       |  19 ++++++
 qa/pull-tester/run-bitcoin-cli    |  13 ++++
 qa/pull-tester/tests-config.sh.in |  16 +++++
 7 files changed, 53 insertions(+), 105 deletions(-)
 delete mode 100755 qa/pull-tester/build-tests.sh.in
 create mode 100755 qa/pull-tester/rpc-tests.sh
 create mode 100755 qa/pull-tester/run-bitcoin-cli
 create mode 100755 qa/pull-tester/tests-config.sh.in

diff --git a/.gitignore b/.gitignore
index bafc5919c1f0..c97432df920e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -99,7 +99,9 @@ linux-coverage-build
 linux-build
 win32-build
 qa/pull-tester/run-bitcoind-for-test.sh
-qa/pull-tester/build-tests.sh
+qa/pull-tester/tests-config.sh
+qa/pull-tester/cache/*
+qa/pull-tester/test.*/*
 
 !src/leveldb*/Makefile
 
diff --git a/Makefile.am b/Makefile.am
index c6a045150e3e..6bc004431346 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -172,7 +172,7 @@ check-local:
 	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
 endif
 
-EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
+EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
 
 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
 
diff --git a/configure.ac b/configure.ac
index b603d1766d5c..17efd987acc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -824,7 +824,7 @@ AC_SUBST(MINIUPNPC_CPPFLAGS)
 AC_SUBST(MINIUPNPC_LIBS)
 AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
-AC_CONFIG_FILES([qa/pull-tester/build-tests.sh],[chmod +x qa/pull-tester/build-tests.sh])
+AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
 AC_OUTPUT
 
 dnl Taken from https://wiki.debian.org/RpathIssue
diff --git a/qa/pull-tester/build-tests.sh.in b/qa/pull-tester/build-tests.sh.in
deleted file mode 100755
index f5c5f0bf7087..000000000000
--- a/qa/pull-tester/build-tests.sh.in
+++ /dev/null
@@ -1,102 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2013-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.
-#
-# Param1: The prefix to mingw staging
-# Param2: Path to java comparison tool
-# Param3: Number of make jobs. Defaults to 1.
-
-# Exit immediately if anything fails:
-set -e
-set -o xtrace
-
-MINGWPREFIX=$1
-JAVA_COMPARISON_TOOL=$2
-RUN_EXPENSIVE_TESTS=$3
-JOBS=${4-1}
-OUT_DIR=${5-}
-
-if [ $# -lt 2 ]; then
-  echo "Usage: $0 [mingw-prefix] [java-comparison-tool] <make jobs> <save output dir>"
-  exit 1
-fi
-
-DISTDIR=@PACKAGE@-@VERSION@
-
-# Cross-compile for windows first (breaking the mingw/windows build is most common)
-cd @abs_top_srcdir@
-make distdir
-mkdir -p win32-build
-rsync -av $DISTDIR/ win32-build/
-rm -r $DISTDIR
-cd win32-build
-
-if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
-  ./configure --disable-silent-rules --disable-ccache --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib --with-comparison-tool="$JAVA_COMPARISON_TOOL"
-else
-  ./configure --disable-silent-rules --disable-ccache --prefix=$MINGWPREFIX --host=i586-mingw32msvc --with-qt-bindir=$MINGWPREFIX/host/bin --with-qt-plugindir=$MINGWPREFIX/plugins --with-qt-incdir=$MINGWPREFIX/include --with-boost=$MINGWPREFIX --with-protoc-bindir=$MINGWPREFIX/host/bin CPPFLAGS=-I$MINGWPREFIX/include LDFLAGS=-L$MINGWPREFIX/lib
-fi
-make -j$JOBS
-
-# And compile for Linux:
-cd @abs_top_srcdir@
-make distdir
-mkdir -p linux-build
-rsync -av $DISTDIR/ linux-build/
-rm -r $DISTDIR
-cd linux-build
-if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
-  ./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL" --enable-comparison-tool-reorg-tests
-else
-  ./configure --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
-fi
-make -j$JOBS
-
-# link interesting binaries to parent out/ directory, if it exists. Do this before
-# running unit tests (we want bad binaries to be easy to find)
-if [ -d "$OUT_DIR" -a -w "$OUT_DIR" ]; then
-  set +e
-  # Windows:
-  cp @abs_top_srcdir@/win32-build/src/bitcoind.exe $OUT_DIR/bitcoind.exe
-  cp @abs_top_srcdir@/win32-build/src/test/test_bitcoin.exe $OUT_DIR/test_bitcoin.exe
-  cp @abs_top_srcdir@/win32-build/src/qt/bitcoind-qt.exe $OUT_DIR/bitcoin-qt.exe
-  # Linux:
-  cp @abs_top_srcdir@/linux-build/src/bitcoind $OUT_DIR/bitcoind
-  cp @abs_top_srcdir@/linux-build/src/test/test_bitcoin $OUT_DIR/test_bitcoin
-  cp @abs_top_srcdir@/linux-build/src/qt/bitcoind-qt $OUT_DIR/bitcoin-qt
-  set -e
-fi
-
-# Run unit tests and blockchain-tester on Linux:
-cd @abs_top_srcdir@/linux-build
-make check
-
-# Run RPC integration test on Linux:
-@abs_top_srcdir@/qa/rpc-tests/wallet.sh @abs_top_srcdir@/linux-build/src
-@abs_top_srcdir@/qa/rpc-tests/listtransactions.py --srcdir @abs_top_srcdir@/linux-build/src
-@abs_top_srcdir@/qa/rpc-tests/forknotify.py --srcdir @abs_top_srcdir@/linux-build/src
-# Clean up cache/ directory that the python regression tests create
-rm -rf cache
-
-if [ $RUN_EXPENSIVE_TESTS = 1 ]; then
-  # Run unit tests and blockchain-tester on Windows:
-  cd @abs_top_srcdir@/win32-build
-  make check
-fi
-
-# Clean up builds (pull-tester machine doesn't have infinite disk space)
-cd @abs_top_srcdir@/linux-build
-make clean
-cd @abs_top_srcdir@/win32-build
-make clean
-
-# TODO: Fix code coverage builds on pull-tester machine
-# # Test code coverage
-# cd @abs_top_srcdir@
-# make distdir
-# mv $DISTDIR linux-coverage-build
-# cd linux-coverage-build
-# ./configure --enable-lcov --disable-silent-rules --disable-ccache --with-comparison-tool="$JAVA_COMPARISON_TOOL"
-# make -j$JOBS
-# make cov
diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
new file mode 100755
index 000000000000..f07e3c6d9dd7
--- /dev/null
+++ b/qa/pull-tester/rpc-tests.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+set -e
+
+CURDIR=$(cd $(dirname "$0"); pwd)
+# Get BUILDDIR and REAL_BITCOIND
+. "${CURDIR}/tests-config.sh"
+
+export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
+export BITCOIND=${REAL_BITCOIND}
+
+#Run the tests
+
+if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
+  ${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
+else
+  echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
+fi
diff --git a/qa/pull-tester/run-bitcoin-cli b/qa/pull-tester/run-bitcoin-cli
new file mode 100755
index 000000000000..93c25bb9fca2
--- /dev/null
+++ b/qa/pull-tester/run-bitcoin-cli
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This is a thin wrapper around bitcoin-cli that strips the Windows-style EOLs
+# from the output if present. It is necessary when using bitcoin-cli.exe on
+# Linux since shells will interpret the line-endings as part of the result.
+
+CURDIR=$(cd $(dirname "$0"); pwd)
+# Get BUILDDIR and REAL_BITCOIND
+
+# Grab the value of $REAL_BITCOINCLI which may be bitcoin-cli.exe.
+. "${CURDIR}/tests-config.sh"
+
+"${REAL_BITCOINCLI}" "$@" | sed 's/\r//'
diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in
new file mode 100755
index 000000000000..10f4d33e47cf
--- /dev/null
+++ b/qa/pull-tester/tests-config.sh.in
@@ -0,0 +1,16 @@
+#!/bin/bash
+# Copyright (c) 2013-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.
+
+BUILDDIR="@abs_top_builddir@"
+EXEEXT="@EXEEXT@"
+
+# These will turn into comments if they were disabled when configuring.
+@ENABLE_WALLET_TRUE@ENABLE_WALLET=1
+@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
+@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
+
+REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
+REAL_BITCOINCLI="$BUILDDIR/src/bitcoin-cli${EXEEXT}"
+

From 2191eac812a72fe57167be882bddd2e6a3f0340e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 31 Oct 2014 00:00:02 -0400
Subject: [PATCH 0963/1819] add tests to travis

---
 .travis.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 94d1c15f80a5..b685fbb5cd93 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,17 +27,17 @@ matrix:
     - compiler: ": ARM"
       env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: ": bitcoind"
-      env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
+      env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
     - compiler: ": No wallet"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
     - compiler: ": 32-bit + dash"
-      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
+      env: HOST=i686-pc-linux-gnu PACKAGES="g++-multilib bc" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat" USE_SHELL="/bin/dash"
     - compiler: ": Cross-Mac"
       env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
     - compiler: ": Win64"
-      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
+      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy"
     - compiler: ": Win32"
-      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine" RUN_TESTS=true GOAL="deploy"
+      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy"
 install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi
@@ -60,5 +60,6 @@ script:
     - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
     - if [ "$RUN_TESTS" = "true" ]; then make check; fi
+    - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi
 after_script:
     - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then (echo "Upload goes here. Something like: scp -r $BASE_OUTDIR server" || echo "upload failed"); fi

From 1c0aa9110e0cbe207f16e8bf2cc6c410b9ec1cef Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Fri, 31 Oct 2014 11:34:30 +0800
Subject: [PATCH 0964/1819] Update serialize comments to be doxygen compatible

---
 src/serialize.h | 178 +++++++++++++++++++++++++++---------------------
 1 file changed, 100 insertions(+), 78 deletions(-)

diff --git a/src/serialize.h b/src/serialize.h
index 877ef8640a43..ad38a3fa22a1 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_SERIALIZE_H
@@ -22,23 +22,28 @@ class CScript;
 
 static const unsigned int MAX_SIZE = 0x02000000;
 
-// Used to bypass the rule against non-const reference to temporary
-// where it makes sense with wrappers such as CFlatData or CTxDB
+/**
+ * Used to bypass the rule against non-const reference to temporary
+ * where it makes sense with wrappers such as CFlatData or CTxDB
+ */
 template<typename T>
 inline T& REF(const T& val)
 {
     return const_cast<T&>(val);
 }
 
-// Used to acquire a non-const pointer "this" to generate bodies
-// of const serialization operations from a template
+/**
+ * Used to acquire a non-const pointer "this" to generate bodies
+ * of const serialization operations from a template
+ */
 template<typename T>
 inline T* NCONST_PTR(const T* val)
 {
     return const_cast<T*>(val);
 }
 
-/** Get begin pointer of vector (non-const version).
+/** 
+ * Get begin pointer of vector (non-const version).
  * @note These functions avoid the undefined case of indexing into an empty
  * vector, as well as that of indexing after the end of the vector.
  */
@@ -82,10 +87,12 @@ enum
 
 #define READWRITE(obj)      (::SerReadWrite(s, (obj), nType, nVersion, ser_action))
 
-/* Implement three methods for serializable objects. These are actually wrappers over
+/** 
+ * Implement three methods for serializable objects. These are actually wrappers over
  * "SerializationOp" template, which implements the body of each class' serialization
  * code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be
- * added as members. */
+ * added as members. 
+ */
 #define ADD_SERIALIZE_METHODS                                                          \
     size_t GetSerializeSize(int nType, int nVersion) const {                         \
         CSizeComputer s(nType, nVersion);                                            \
@@ -103,9 +110,9 @@ enum
 
 
 
-//
-// Basic types
-//
+/*
+ * Basic Types
+ */
 #define WRITEDATA(s, obj)   s.write((char*)&(obj), sizeof(obj))
 #define READDATA(s, obj)    s.read((char*)&(obj), sizeof(obj))
 
@@ -160,13 +167,13 @@ template<typename Stream> inline void Unserialize(Stream& s, bool& a, int, int=0
 
 
 
-//
-// Compact size
-//  size <  253        -- 1 byte
-//  size <= USHRT_MAX  -- 3 bytes  (253 + 2 bytes)
-//  size <= UINT_MAX   -- 5 bytes  (254 + 4 bytes)
-//  size >  UINT_MAX   -- 9 bytes  (255 + 8 bytes)
-//
+/**
+ * Compact Size
+ * size <  253        -- 1 byte
+ * size <= USHRT_MAX  -- 3 bytes  (253 + 2 bytes)
+ * size <= UINT_MAX   -- 5 bytes  (254 + 4 bytes)
+ * size >  UINT_MAX   -- 9 bytes  (255 + 8 bytes)
+ */
 inline unsigned int GetSizeOfCompactSize(uint64_t nSize)
 {
     if (nSize < 253)             return sizeof(unsigned char);
@@ -246,27 +253,29 @@ uint64_t ReadCompactSize(Stream& is)
     return nSizeRet;
 }
 
-// Variable-length integers: bytes are a MSB base-128 encoding of the number.
-// The high bit in each byte signifies whether another digit follows. To make
-// the encoding is one-to-one, one is subtracted from all but the last digit.
-// Thus, the byte sequence a[] with length len, where all but the last byte
-// has bit 128 set, encodes the number:
-//
-//   (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))
-//
-// Properties:
-// * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
-// * Every integer has exactly one encoding
-// * Encoding does not depend on size of original integer type
-// * No redundancy: every (infinite) byte sequence corresponds to a list
-//   of encoded integers.
-//
-// 0:         [0x00]  256:        [0x81 0x00]
-// 1:         [0x01]  16383:      [0xFE 0x7F]
-// 127:       [0x7F]  16384:      [0xFF 0x00]
-// 128:  [0x80 0x00]  16511: [0x80 0xFF 0x7F]
-// 255:  [0x80 0x7F]  65535: [0x82 0xFD 0x7F]
-// 2^32:           [0x8E 0xFE 0xFE 0xFF 0x00]
+/**
+ * Variable-length integers: bytes are a MSB base-128 encoding of the number.
+ * The high bit in each byte signifies whether another digit follows. To make
+ * sure the encoding is one-to-one, one is subtracted from all but the last digit.
+ * Thus, the byte sequence a[] with length len, where all but the last byte
+ * has bit 128 set, encodes the number:
+ * 
+ *  (a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))
+ * 
+ * Properties:
+ * * Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
+ * * Every integer has exactly one encoding
+ * * Encoding does not depend on size of original integer type
+ * * No redundancy: every (infinite) byte sequence corresponds to a list
+ *   of encoded integers.
+ * 
+ * 0:         [0x00]  256:        [0x81 0x00]
+ * 1:         [0x01]  16383:      [0xFE 0x7F]
+ * 127:       [0x7F]  16384:      [0xFF 0x00]
+ * 128:  [0x80 0x00]  16511: [0x80 0xFF 0x7F]
+ * 255:  [0x80 0x7F]  65535: [0x82 0xFD 0x7F]
+ * 2^32:           [0x8E 0xFE 0xFE 0xFF 0x00]
+ */
 
 template<typename I>
 inline unsigned int GetSizeOfVarInt(I n)
@@ -317,7 +326,8 @@ I ReadVarInt(Stream& is)
 #define VARINT(obj) REF(WrapVarInt(REF(obj)))
 #define LIMITED_STRING(obj,n) REF(LimitedString< n >(REF(obj)))
 
-/** Wrapper for serializing arrays and POD.
+/** 
+ * Wrapper for serializing arrays and POD.
  */
 class CFlatData
 {
@@ -415,17 +425,21 @@ class LimitedString
 template<typename I>
 CVarInt<I> WrapVarInt(I& n) { return CVarInt<I>(n); }
 
-//
-// Forward declarations
-//
+/**
+ * Forward declarations
+ */
 
-// string
+/**
+ *  string
+ */
 template<typename C> unsigned int GetSerializeSize(const std::basic_string<C>& str, int, int=0);
 template<typename Stream, typename C> void Serialize(Stream& os, const std::basic_string<C>& str, int, int=0);
 template<typename Stream, typename C> void Unserialize(Stream& is, std::basic_string<C>& str, int, int=0);
 
-// vector
-// vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.
+/**
+ * vector
+ * vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.
+ */
 template<typename T, typename A> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
 template<typename T, typename A, typename V> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const V&);
 template<typename T, typename A> inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion);
@@ -436,22 +450,30 @@ template<typename Stream, typename T, typename A> void Unserialize_impl(Stream&
 template<typename Stream, typename T, typename A, typename V> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const V&);
 template<typename Stream, typename T, typename A> inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion);
 
-// others derived from vector
+/**
+ * others derived from vector
+ */
 extern inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion);
 template<typename Stream> void Serialize(Stream& os, const CScript& v, int nType, int nVersion);
 template<typename Stream> void Unserialize(Stream& is, CScript& v, int nType, int nVersion);
 
-// pair
+/**
+ * pair
+ */
 template<typename K, typename T> unsigned int GetSerializeSize(const std::pair<K, T>& item, int nType, int nVersion);
 template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion);
 template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion);
 
-// map
+/**
+ * map
+ */
 template<typename K, typename T, typename Pred, typename A> unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion);
 template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion);
 template<typename Stream, typename K, typename T, typename Pred, typename A> void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion);
 
-// set
+/**
+ * set
+ */
 template<typename K, typename Pred, typename A> unsigned int GetSerializeSize(const std::set<K, Pred, A>& m, int nType, int nVersion);
 template<typename Stream, typename K, typename Pred, typename A> void Serialize(Stream& os, const std::set<K, Pred, A>& m, int nType, int nVersion);
 template<typename Stream, typename K, typename Pred, typename A> void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion);
@@ -460,12 +482,12 @@ template<typename Stream, typename K, typename Pred, typename A> void Unserializ
 
 
 
-//
-// If none of the specialized versions above matched, default to calling member function.
-// "int nType" is changed to "long nType" to keep from getting an ambiguous overload error.
-// The compiler will only cast int to long if none of the other templates matched.
-// Thanks to Boost serialization for this idea.
-//
+/**
+ * If none of the specialized versions above matched, default to calling member function.
+ * "int nType" is changed to "long nType" to keep from getting an ambiguous overload error.
+ * The compiler will only cast int to long if none of the other templates matched.
+ * Thanks to Boost serialization for this idea.
+ */
 template<typename T>
 inline unsigned int GetSerializeSize(const T& a, long nType, int nVersion)
 {
@@ -488,9 +510,9 @@ inline void Unserialize(Stream& is, T& a, long nType, int nVersion)
 
 
 
-//
-// string
-//
+/**
+ * string
+ */
 template<typename C>
 unsigned int GetSerializeSize(const std::basic_string<C>& str, int, int)
 {
@@ -516,9 +538,9 @@ void Unserialize(Stream& is, std::basic_string<C>& str, int, int)
 
 
 
-//
-// vector
-//
+/**
+ * vector
+ */
 template<typename T, typename A>
 unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
 {
@@ -606,9 +628,9 @@ inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersio
 
 
 
-//
-// others derived from vector
-//
+/**
+ * others derived from vector
+ */
 inline unsigned int GetSerializeSize(const CScript& v, int nType, int nVersion)
 {
     return GetSerializeSize((const std::vector<unsigned char>&)v, nType, nVersion);
@@ -628,9 +650,9 @@ void Unserialize(Stream& is, CScript& v, int nType, int nVersion)
 
 
 
-//
-// pair
-//
+/**
+ * pair
+ */
 template<typename K, typename T>
 unsigned int GetSerializeSize(const std::pair<K, T>& item, int nType, int nVersion)
 {
@@ -653,9 +675,9 @@ void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion)
 
 
 
-//
-// map
-//
+/**
+ * map
+ */
 template<typename K, typename T, typename Pred, typename A>
 unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion)
 {
@@ -689,9 +711,9 @@ void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion
 
 
 
-//
-// set
-//
+/**
+ * set
+ */
 template<typename K, typename Pred, typename A>
 unsigned int GetSerializeSize(const std::set<K, Pred, A>& m, int nType, int nVersion)
 {
@@ -725,9 +747,9 @@ void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
 
 
 
-//
-// Support for ADD_SERIALIZE_METHODS and READWRITE macro
-//
+/**
+ * Support for ADD_SERIALIZE_METHODS and READWRITE macro
+ */
 struct CSerActionSerialize
 {
     bool ForRead() const { return false; }

From 900078aeb4088b63ee271e774a00ccd126628528 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 21 Oct 2014 16:05:51 -0400
Subject: [PATCH 0965/1819] boost: moveonly: create eccryptoverify.h|cpp and
 move helper functions there

Eventually (after 0.10) these files will hold the logic for crypto
verification routines, and CKey/CPubKey will call into them.
---
 src/Makefile.am            |  2 ++
 src/eccryptoverify.cpp     | 63 ++++++++++++++++++++++++++++++++++++++
 src/eccryptoverify.h       | 19 ++++++++++++
 src/key.cpp                | 53 ++------------------------------
 src/script/interpreter.cpp |  3 +-
 5 files changed, 88 insertions(+), 52 deletions(-)
 create mode 100644 src/eccryptoverify.cpp
 create mode 100644 src/eccryptoverify.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 8253c4ab142c..c9adf859f43d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -86,6 +86,7 @@ BITCOIN_CORE_H = \
   core_io.h \
   crypter.h \
   db.h \
+  eccryptoverify.h \
   ecwrapper.h \
   hash.h \
   init.h \
@@ -220,6 +221,7 @@ libbitcoin_common_a_SOURCES = \
   core/transaction.cpp \
   core_read.cpp \
   core_write.cpp \
+  eccryptoverify.cpp \
   ecwrapper.cpp \
   hash.cpp \
   key.cpp \
diff --git a/src/eccryptoverify.cpp b/src/eccryptoverify.cpp
new file mode 100644
index 000000000000..0a904f44bad4
--- /dev/null
+++ b/src/eccryptoverify.cpp
@@ -0,0 +1,63 @@
+#include "eccryptoverify.h"
+
+namespace {
+
+int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) {
+    while (c1len > c2len) {
+        if (*c1)
+            return 1;
+        c1++;
+        c1len--;
+    }
+    while (c2len > c1len) {
+        if (*c2)
+            return -1;
+        c2++;
+        c2len--;
+    }
+    while (c1len > 0) {
+        if (*c1 > *c2)
+            return 1;
+        if (*c2 > *c1)
+            return -1;
+        c1++;
+        c2++;
+        c1len--;
+    }
+    return 0;
+}
+
+/** Order of secp256k1's generator minus 1. */
+const unsigned char vchMaxModOrder[32] = {
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+    0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
+    0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
+};
+
+/** Half of the order of secp256k1's generator minus 1. */
+const unsigned char vchMaxModHalfOrder[32] = {
+    0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+    0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D,
+    0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0
+};
+
+const unsigned char vchZero[1] = {0};
+} // anon namespace
+
+namespace eccrypto {
+
+bool Check(const unsigned char *vch) {
+    return vch &&
+           CompareBigEndian(vch, 32, vchZero, 0) > 0 &&
+           CompareBigEndian(vch, 32, vchMaxModOrder, 32) <= 0;
+}
+
+bool CheckSignatureElement(const unsigned char *vch, int len, bool half) {
+    return vch &&
+           CompareBigEndian(vch, len, vchZero, 0) > 0 &&
+           CompareBigEndian(vch, len, half ? vchMaxModHalfOrder : vchMaxModOrder, 32) <= 0;
+}
+
+} // namespace eccrypto
diff --git a/src/eccryptoverify.h b/src/eccryptoverify.h
new file mode 100644
index 000000000000..7740e31db10f
--- /dev/null
+++ b/src/eccryptoverify.h
@@ -0,0 +1,19 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_EC_CRYPTO_VERIFY_H
+#define BITCOIN_EC_CRYPTO_VERIFY_H
+
+#include <vector>
+#include <cstdlib>
+class uint256;
+
+namespace eccrypto {
+
+bool Check(const unsigned char *vch);
+bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
+
+} // eccrypto namespace
+#endif
diff --git a/src/key.cpp b/src/key.cpp
index c466e84f2691..925b80ba0fcc 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -5,6 +5,7 @@
 #include "key.h"
 
 #include "crypto/sha2.h"
+#include "eccryptoverify.h"
 #include "random.h"
 
 #ifdef USE_SECP256K1
@@ -30,60 +31,10 @@ class CSecp256k1Init {
 static CSecp256k1Init instance_of_csecp256k1;
 
 #endif
-
-int CompareBigEndian(const unsigned char *c1, size_t c1len, const unsigned char *c2, size_t c2len) {
-    while (c1len > c2len) {
-        if (*c1)
-            return 1;
-        c1++;
-        c1len--;
-    }
-    while (c2len > c1len) {
-        if (*c2)
-            return -1;
-        c2++;
-        c2len--;
-    }
-    while (c1len > 0) {
-        if (*c1 > *c2)
-            return 1;
-        if (*c2 > *c1)
-            return -1;
-        c1++;
-        c2++;
-        c1len--;
-    }
-    return 0;
-}
-
-/** Order of secp256k1's generator minus 1. */
-const unsigned char vchMaxModOrder[32] = {
-    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
-    0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
-    0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x40
-};
-
-/** Half of the order of secp256k1's generator minus 1. */
-const unsigned char vchMaxModHalfOrder[32] = {
-    0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-    0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-    0x5D,0x57,0x6E,0x73,0x57,0xA4,0x50,0x1D,
-    0xDF,0xE9,0x2F,0x46,0x68,0x1B,0x20,0xA0
-};
-
-const unsigned char vchZero[1] = {0};
-
 } // anon namespace
 
 bool CKey::Check(const unsigned char *vch) {
-    return CompareBigEndian(vch, 32, vchZero, 0) > 0 &&
-           CompareBigEndian(vch, 32, vchMaxModOrder, 32) <= 0;
-}
-
-bool CKey::CheckSignatureElement(const unsigned char *vch, int len, bool half) {
-    return CompareBigEndian(vch, len, vchZero, 0) > 0 &&
-           CompareBigEndian(vch, len, half ? vchMaxModHalfOrder : vchMaxModOrder, 32) <= 0;
+    return eccrypto::Check(vch);
 }
 
 void CKey::MakeNewKey(bool fCompressedIn) {
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 3625972ebfb4..e1e242882fb8 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -9,6 +9,7 @@
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
+#include "eccryptoverify.h"
 #include "key.h"
 #include "script/script.h"
 #include "uint256.h"
@@ -122,7 +123,7 @@ bool static IsLowDERSignature(const valtype &vchSig) {
     // If the S value is above the order of the curve divided by two, its
     // complement modulo the order could have been used instead, which is
     // one byte shorter when encoded correctly.
-    if (!CKey::CheckSignatureElement(S, nLenS, true))
+    if (!eccrypto::CheckSignatureElement(S, nLenS, true))
         return error("Non-canonical signature: S value is unnecessarily high");
 
     return true;

From 78c228c6e5f35b6f2e1917d8677694779f837618 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 28 Oct 2014 17:35:24 -0400
Subject: [PATCH 0966/1819] boost: moveonly: move BIP32Hash to hash.h

---
 src/hash.cpp | 13 +++++++++++++
 src/hash.h   |  1 +
 src/key.cpp  | 12 ------------
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/hash.cpp b/src/hash.cpp
index 218607a6fdfc..29376b45aa71 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -63,3 +63,16 @@ unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char
 
     return h1;
 }
+
+void BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64])
+{
+    unsigned char num[4];
+    num[0] = (nChild >> 24) & 0xFF;
+    num[1] = (nChild >> 16) & 0xFF;
+    num[2] = (nChild >>  8) & 0xFF;
+    num[3] = (nChild >>  0) & 0xFF;
+    CHMAC_SHA512(chainCode, 32).Write(&header, 1)
+                               .Write(data, 32)
+                               .Write(num, 4)
+                               .Finalize(output);
+}
diff --git a/src/hash.h b/src/hash.h
index bdcd4afb4742..53a7672a8f07 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -159,4 +159,5 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL
 
 unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
 
+void BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]);
 #endif // BITCOIN_HASH_H
diff --git a/src/key.cpp b/src/key.cpp
index 925b80ba0fcc..2369aa252121 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -237,18 +237,6 @@ bool CPubKey::Decompress() {
     return true;
 }
 
-void static BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]) {
-    unsigned char num[4];
-    num[0] = (nChild >> 24) & 0xFF;
-    num[1] = (nChild >> 16) & 0xFF;
-    num[2] = (nChild >>  8) & 0xFF;
-    num[3] = (nChild >>  0) & 0xFF;
-    CHMAC_SHA512(chainCode, 32).Write(&header, 1)
-                               .Write(data, 32)
-                               .Write(num, 4)
-                               .Finalize(output);
-}
-
 bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
     assert(IsValid());
     assert(IsCompressed());

From d2e74c55bdd8cee6a0cca49aca0e2ab1a182c9b5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 28 Oct 2014 17:47:18 -0400
Subject: [PATCH 0967/1819] boost: moveonly: split CPubKey and friends to new
 files

---
 src/Makefile.am               |   2 +
 src/alert.cpp                 |   2 +-
 src/base58.h                  |   1 +
 src/bloom.cpp                 |   1 +
 src/compressor.cpp            |   2 +-
 src/key.cpp                   | 118 +------------------
 src/key.h                     | 185 +-----------------------------
 src/keystore.h                |   1 +
 src/pubkey.cpp                | 131 +++++++++++++++++++++
 src/pubkey.h                  | 206 ++++++++++++++++++++++++++++++++++
 src/script/interpreter.cpp    |   2 +-
 src/script/sigcache.cpp       |   2 +-
 src/script/standard.cpp       |   1 +
 src/script/standard.h         |   4 +-
 src/test/miner_tests.cpp      |   1 +
 src/test/sigopcount_tests.cpp |   1 +
 src/wallet_ismine.cpp         |   1 +
 17 files changed, 356 insertions(+), 305 deletions(-)
 create mode 100644 src/pubkey.cpp
 create mode 100644 src/pubkey.h

diff --git a/src/Makefile.am b/src/Makefile.am
index c9adf859f43d..3089b2ff4017 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,6 +102,7 @@ BITCOIN_CORE_H = \
   noui.h \
   pow.h \
   protocol.h \
+  pubkey.h \
   random.h \
   rpcclient.h \
   rpcprotocol.h \
@@ -228,6 +229,7 @@ libbitcoin_common_a_SOURCES = \
   keystore.cpp \
   netbase.cpp \
   protocol.cpp \
+  pubkey.cpp \
   script/interpreter.cpp \
   script/script.cpp \
   script/sigcache.cpp \
diff --git a/src/alert.cpp b/src/alert.cpp
index f16898dc3896..ee8c4966919f 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -7,7 +7,7 @@
 
 #include "chainparams.h"
 #include "clientversion.h"
-#include "key.h"
+#include "pubkey.h"
 #include "net.h"
 #include "timedata.h"
 #include "ui_interface.h"
diff --git a/src/base58.h b/src/base58.h
index c5e230c72ef9..7cd2d651a18a 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -16,6 +16,7 @@
 
 #include "chainparams.h"
 #include "key.h"
+#include "pubkey.h"
 #include "script/script.h"
 #include "script/standard.h"
 
diff --git a/src/bloom.cpp b/src/bloom.cpp
index c1e7aeb3bf19..df8cedaf6afe 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -5,6 +5,7 @@
 #include "bloom.h"
 
 #include "core/transaction.h"
+#include "hash.h"
 #include "script/script.h"
 #include "script/standard.h"
 #include "streams.h"
diff --git a/src/compressor.cpp b/src/compressor.cpp
index 806175dd3ecd..c47a0f6f8c5b 100644
--- a/src/compressor.cpp
+++ b/src/compressor.cpp
@@ -6,7 +6,7 @@
 #include "compressor.h"
 
 #include "hash.h"
-#include "key.h"
+#include "pubkey.h"
 #include "script/standard.h"
 
 bool CScriptCompressor::IsToKeyID(CKeyID &hash) const
diff --git a/src/key.cpp b/src/key.cpp
index 2369aa252121..1b539d073a3c 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -6,6 +6,7 @@
 
 #include "crypto/sha2.h"
 #include "eccryptoverify.h"
+#include "pubkey.h"
 #include "random.h"
 
 #ifdef USE_SECP256K1
@@ -167,76 +168,6 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
     return true;
 }
 
-bool CPubKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const {
-    if (!IsValid())
-        return false;
-#ifdef USE_SECP256K1
-    if (secp256k1_ecdsa_verify((const unsigned char*)&hash, 32, &vchSig[0], vchSig.size(), begin(), size()) != 1)
-        return false;
-#else
-    CECKey key;
-    if (!key.SetPubKey(begin(), size()))
-        return false;
-    if (!key.Verify(hash, vchSig))
-        return false;
-#endif
-    return true;
-}
-
-bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
-    if (vchSig.size() != 65)
-        return false;
-    int recid = (vchSig[0] - 27) & 3;
-    bool fComp = ((vchSig[0] - 27) & 4) != 0;
-#ifdef USE_SECP256K1
-    int pubkeylen = 65;
-    if (!secp256k1_ecdsa_recover_compact((const unsigned char*)&hash, 32, &vchSig[1], (unsigned char*)begin(), &pubkeylen, fComp, recid))
-        return false;
-    assert((int)size() == pubkeylen);
-#else
-    CECKey key;
-    if (!key.Recover(hash, &vchSig[1], recid))
-        return false;
-    std::vector<unsigned char> pubkey;
-    key.GetPubKey(pubkey, fComp);
-    Set(pubkey.begin(), pubkey.end());
-#endif
-    return true;
-}
-
-bool CPubKey::IsFullyValid() const {
-    if (!IsValid())
-        return false;
-#ifdef USE_SECP256K1
-    if (!secp256k1_ecdsa_pubkey_verify(begin(), size()))
-        return false;
-#else
-    CECKey key;
-    if (!key.SetPubKey(begin(), size()))
-        return false;
-#endif
-    return true;
-}
-
-bool CPubKey::Decompress() {
-    if (!IsValid())
-        return false;
-#ifdef USE_SECP256K1
-    int clen = size();
-    int ret = secp256k1_ecdsa_pubkey_decompress((unsigned char*)begin(), &clen);
-    assert(ret);
-    assert(clen == (int)size());
-#else
-    CECKey key;
-    if (!key.SetPubKey(begin(), size()))
-        return false;
-    std::vector<unsigned char> pubkey;
-    key.GetPubKey(pubkey, false);
-    Set(pubkey.begin(), pubkey.end());
-#endif
-    return true;
-}
-
 bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
     assert(IsValid());
     assert(IsCompressed());
@@ -263,27 +194,6 @@ bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild
     return ret;
 }
 
-bool CPubKey::Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
-    assert(IsValid());
-    assert((nChild >> 31) == 0);
-    assert(begin() + 33 == end());
-    unsigned char out[64];
-    BIP32Hash(cc, nChild, *begin(), begin()+1, out);
-    memcpy(ccChild, out+32, 32);
-#ifdef USE_SECP256K1
-    pubkeyChild = *this;
-    bool ret = secp256k1_ecdsa_pubkey_tweak_add((unsigned char*)pubkeyChild.begin(), pubkeyChild.size(), out);
-#else
-    CECKey key;
-    bool ret = key.SetPubKey(begin(), size());
-    ret &= key.TweakPublic(out);
-    std::vector<unsigned char> pubkey;
-    key.GetPubKey(pubkey, true);
-    pubkeyChild.Set(pubkey.begin(), pubkey.end());
-#endif
-    return ret;
-}
-
 bool CExtKey::Derive(CExtKey &out, unsigned int nChild) const {
     out.nDepth = nDepth + 1;
     CKeyID id = key.GetPubKey().GetID();
@@ -334,32 +244,6 @@ void CExtKey::Decode(const unsigned char code[74]) {
     key.Set(code+42, code+74, true);
 }
 
-void CExtPubKey::Encode(unsigned char code[74]) const {
-    code[0] = nDepth;
-    memcpy(code+1, vchFingerprint, 4);
-    code[5] = (nChild >> 24) & 0xFF; code[6] = (nChild >> 16) & 0xFF;
-    code[7] = (nChild >>  8) & 0xFF; code[8] = (nChild >>  0) & 0xFF;
-    memcpy(code+9, vchChainCode, 32);
-    assert(pubkey.size() == 33);
-    memcpy(code+41, pubkey.begin(), 33);
-}
-
-void CExtPubKey::Decode(const unsigned char code[74]) {
-    nDepth = code[0];
-    memcpy(vchFingerprint, code+1, 4);
-    nChild = (code[5] << 24) | (code[6] << 16) | (code[7] << 8) | code[8];
-    memcpy(vchChainCode, code+9, 32);
-    pubkey.Set(code+41, code+74);
-}
-
-bool CExtPubKey::Derive(CExtPubKey &out, unsigned int nChild) const {
-    out.nDepth = nDepth + 1;
-    CKeyID id = pubkey.GetID();
-    memcpy(&out.vchFingerprint[0], &id, 4);
-    out.nChild = nChild;
-    return pubkey.Derive(out.pubkey, out.vchChainCode, nChild, vchChainCode);
-}
-
 bool ECC_InitSanityCheck() {
 #ifdef USE_SECP256K1
     return true;
diff --git a/src/key.h b/src/key.h
index b4cb64768115..b35cf0cad555 100644
--- a/src/key.h
+++ b/src/key.h
@@ -7,13 +7,15 @@
 #define BITCOIN_KEY_H
 
 #include "allocators.h"
-#include "hash.h"
 #include "serialize.h"
 #include "uint256.h"
 
 #include <stdexcept>
 #include <vector>
 
+class CPubKey;
+class CExtPubKey;
+
 /** 
  * secp256k1:
  * const unsigned int PRIVATE_KEY_SIZE = 279;
@@ -24,169 +26,6 @@
  * script supports up to 75 for single byte push
  */
 
-/** A reference to a CKey: the Hash160 of its serialized public key */
-class CKeyID : public uint160
-{
-public:
-    CKeyID() : uint160(0) {}
-    CKeyID(const uint160& in) : uint160(in) {}
-};
-
-/** An encapsulated public key. */
-class CPubKey
-{
-private:
-
-    /**
-     * Just store the serialized data.
-     * Its length can very cheaply be computed from the first byte.
-     */
-    unsigned char vch[65];
-
-    //! Compute the length of a pubkey with a given first byte.
-    unsigned int static GetLen(unsigned char chHeader)
-    {
-        if (chHeader == 2 || chHeader == 3)
-            return 33;
-        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
-            return 65;
-        return 0;
-    }
-
-    //! Set this key data to be invalid
-    void Invalidate()
-    {
-        vch[0] = 0xFF;
-    }
-
-public:
-    //! Construct an invalid public key.
-    CPubKey()
-    {
-        Invalidate();
-    }
-
-    //! Initialize a public key using begin/end iterators to byte data.
-    template <typename T>
-    void Set(const T pbegin, const T pend)
-    {
-        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
-        if (len && len == (pend - pbegin))
-            memcpy(vch, (unsigned char*)&pbegin[0], len);
-        else
-            Invalidate();
-    }
-
-    //! Construct a public key using begin/end iterators to byte data.
-    template <typename T>
-    CPubKey(const T pbegin, const T pend)
-    {
-        Set(pbegin, pend);
-    }
-
-    //! Construct a public key from a byte vector.
-    CPubKey(const std::vector<unsigned char>& vch)
-    {
-        Set(vch.begin(), vch.end());
-    }
-
-    //! Simple read-only vector-like interface to the pubkey data.
-    unsigned int size() const { return GetLen(vch[0]); }
-    const unsigned char* begin() const { return vch; }
-    const unsigned char* end() const { return vch + size(); }
-    const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
-
-    //! Comparator implementation.
-    friend bool operator==(const CPubKey& a, const CPubKey& b)
-    {
-        return a.vch[0] == b.vch[0] &&
-               memcmp(a.vch, b.vch, a.size()) == 0;
-    }
-    friend bool operator!=(const CPubKey& a, const CPubKey& b)
-    {
-        return !(a == b);
-    }
-    friend bool operator<(const CPubKey& a, const CPubKey& b)
-    {
-        return a.vch[0] < b.vch[0] ||
-               (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
-    }
-
-    //! Implement serialization, as if this was a byte vector.
-    unsigned int GetSerializeSize(int nType, int nVersion) const
-    {
-        return size() + 1;
-    }
-    template <typename Stream>
-    void Serialize(Stream& s, int nType, int nVersion) const
-    {
-        unsigned int len = size();
-        ::WriteCompactSize(s, len);
-        s.write((char*)vch, len);
-    }
-    template <typename Stream>
-    void Unserialize(Stream& s, int nType, int nVersion)
-    {
-        unsigned int len = ::ReadCompactSize(s);
-        if (len <= 65) {
-            s.read((char*)vch, len);
-        } else {
-            // invalid pubkey, skip available data
-            char dummy;
-            while (len--)
-                s.read(&dummy, 1);
-            Invalidate();
-        }
-    }
-
-    //! Get the KeyID of this public key (hash of its serialization)
-    CKeyID GetID() const
-    {
-        return CKeyID(Hash160(vch, vch + size()));
-    }
-
-    //! Get the 256-bit hash of this public key.
-    uint256 GetHash() const
-    {
-        return Hash(vch, vch + size());
-    }
-
-    /*
-     * Check syntactic correctness.
-     * 
-     * Note that this is consensus critical as CheckSig() calls it!
-     */
-    bool IsValid() const
-    {
-        return size() > 0;
-    }
-
-    //! fully validate whether this is a valid public key (more expensive than IsValid())
-    bool IsFullyValid() const;
-
-    //! Check whether this is a compressed public key.
-    bool IsCompressed() const
-    {
-        return size() == 33;
-    }
-
-    /**
-     * Verify a DER signature (~72 bytes).
-     * If this public key is not fully valid, the return value will be false.
-     */
-    bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
-
-    //! Recover a public key from a compact signature.
-    bool RecoverCompact(const uint256& hash, const std::vector<unsigned char>& vchSig);
-
-    //! Turn this public key into an uncompressed public key.
-    bool Decompress();
-
-    //! Derive BIP32 child pubkey.
-    bool Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
-};
-
-
 /**
  * secure_allocator is defined in allocators.h
  * CPrivKey is a serialized private key, with all parameters included (279 bytes)
@@ -304,24 +143,6 @@ class CKey
     static bool CheckSignatureElement(const unsigned char* vch, int len, bool half);
 };
 
-struct CExtPubKey {
-    unsigned char nDepth;
-    unsigned char vchFingerprint[4];
-    unsigned int nChild;
-    unsigned char vchChainCode[32];
-    CPubKey pubkey;
-
-    friend bool operator==(const CExtPubKey& a, const CExtPubKey& b)
-    {
-        return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
-               memcmp(&a.vchChainCode[0], &b.vchChainCode[0], 32) == 0 && a.pubkey == b.pubkey;
-    }
-
-    void Encode(unsigned char code[74]) const;
-    void Decode(const unsigned char code[74]);
-    bool Derive(CExtPubKey& out, unsigned int nChild) const;
-};
-
 struct CExtKey {
     unsigned char nDepth;
     unsigned char vchFingerprint[4];
diff --git a/src/keystore.h b/src/keystore.h
index 66f8771d4a80..60502e9a29c9 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -7,6 +7,7 @@
 #define BITCOIN_KEYSTORE_H
 
 #include "key.h"
+#include "pubkey.h"
 #include "sync.h"
 
 #include <boost/signals2/signal.hpp>
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
new file mode 100644
index 000000000000..3f16a4b4be4c
--- /dev/null
+++ b/src/pubkey.cpp
@@ -0,0 +1,131 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "pubkey.h"
+
+#include "crypto/sha2.h"
+#include "eccryptoverify.h"
+
+#ifdef USE_SECP256K1
+#include <secp256k1.h>
+#else
+#include "ecwrapper.h"
+#endif
+
+bool CPubKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) const {
+    if (!IsValid())
+        return false;
+#ifdef USE_SECP256K1
+    if (secp256k1_ecdsa_verify((const unsigned char*)&hash, 32, &vchSig[0], vchSig.size(), begin(), size()) != 1)
+        return false;
+#else
+    CECKey key;
+    if (!key.SetPubKey(begin(), size()))
+        return false;
+    if (!key.Verify(hash, vchSig))
+        return false;
+#endif
+    return true;
+}
+
+bool CPubKey::RecoverCompact(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+    if (vchSig.size() != 65)
+        return false;
+    int recid = (vchSig[0] - 27) & 3;
+    bool fComp = ((vchSig[0] - 27) & 4) != 0;
+#ifdef USE_SECP256K1
+    int pubkeylen = 65;
+    if (!secp256k1_ecdsa_recover_compact((const unsigned char*)&hash, 32, &vchSig[1], (unsigned char*)begin(), &pubkeylen, fComp, recid))
+        return false;
+    assert((int)size() == pubkeylen);
+#else
+    CECKey key;
+    if (!key.Recover(hash, &vchSig[1], recid))
+        return false;
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, fComp);
+    Set(pubkey.begin(), pubkey.end());
+#endif
+    return true;
+}
+
+bool CPubKey::IsFullyValid() const {
+    if (!IsValid())
+        return false;
+#ifdef USE_SECP256K1
+    if (!secp256k1_ecdsa_pubkey_verify(begin(), size()))
+        return false;
+#else
+    CECKey key;
+    if (!key.SetPubKey(begin(), size()))
+        return false;
+#endif
+    return true;
+}
+
+bool CPubKey::Decompress() {
+    if (!IsValid())
+        return false;
+#ifdef USE_SECP256K1
+    int clen = size();
+    int ret = secp256k1_ecdsa_pubkey_decompress((unsigned char*)begin(), &clen);
+    assert(ret);
+    assert(clen == (int)size());
+#else
+    CECKey key;
+    if (!key.SetPubKey(begin(), size()))
+        return false;
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, false);
+    Set(pubkey.begin(), pubkey.end());
+#endif
+    return true;
+}
+
+bool CPubKey::Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
+    assert(IsValid());
+    assert((nChild >> 31) == 0);
+    assert(begin() + 33 == end());
+    unsigned char out[64];
+    BIP32Hash(cc, nChild, *begin(), begin()+1, out);
+    memcpy(ccChild, out+32, 32);
+#ifdef USE_SECP256K1
+    pubkeyChild = *this;
+    bool ret = secp256k1_ecdsa_pubkey_tweak_add((unsigned char*)pubkeyChild.begin(), pubkeyChild.size(), out);
+#else
+    CECKey key;
+    bool ret = key.SetPubKey(begin(), size());
+    ret &= key.TweakPublic(out);
+    std::vector<unsigned char> pubkey;
+    key.GetPubKey(pubkey, true);
+    pubkeyChild.Set(pubkey.begin(), pubkey.end());
+#endif
+    return ret;
+}
+
+void CExtPubKey::Encode(unsigned char code[74]) const {
+    code[0] = nDepth;
+    memcpy(code+1, vchFingerprint, 4);
+    code[5] = (nChild >> 24) & 0xFF; code[6] = (nChild >> 16) & 0xFF;
+    code[7] = (nChild >>  8) & 0xFF; code[8] = (nChild >>  0) & 0xFF;
+    memcpy(code+9, vchChainCode, 32);
+    assert(pubkey.size() == 33);
+    memcpy(code+41, pubkey.begin(), 33);
+}
+
+void CExtPubKey::Decode(const unsigned char code[74]) {
+    nDepth = code[0];
+    memcpy(vchFingerprint, code+1, 4);
+    nChild = (code[5] << 24) | (code[6] << 16) | (code[7] << 8) | code[8];
+    memcpy(vchChainCode, code+9, 32);
+    pubkey.Set(code+41, code+74);
+}
+
+bool CExtPubKey::Derive(CExtPubKey &out, unsigned int nChild) const {
+    out.nDepth = nDepth + 1;
+    CKeyID id = pubkey.GetID();
+    memcpy(&out.vchFingerprint[0], &id, 4);
+    out.nChild = nChild;
+    return pubkey.Derive(out.pubkey, out.vchChainCode, nChild, vchChainCode);
+}
diff --git a/src/pubkey.h b/src/pubkey.h
new file mode 100644
index 000000000000..ccf967345367
--- /dev/null
+++ b/src/pubkey.h
@@ -0,0 +1,206 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2013 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_PUBKEY_H
+#define BITCOIN_PUBKEY_H
+
+#include "hash.h"
+#include "serialize.h"
+#include "uint256.h"
+
+#include <stdexcept>
+#include <vector>
+
+/** 
+ * secp256k1:
+ * const unsigned int PRIVATE_KEY_SIZE = 279;
+ * const unsigned int PUBLIC_KEY_SIZE  = 65;
+ * const unsigned int SIGNATURE_SIZE   = 72;
+ *
+ * see www.keylength.com
+ * script supports up to 75 for single byte push
+ */
+
+/** A reference to a CKey: the Hash160 of its serialized public key */
+class CKeyID : public uint160
+{
+public:
+    CKeyID() : uint160(0) {}
+    CKeyID(const uint160& in) : uint160(in) {}
+};
+
+/** An encapsulated public key. */
+class CPubKey
+{
+private:
+
+    /**
+     * Just store the serialized data.
+     * Its length can very cheaply be computed from the first byte.
+     */
+    unsigned char vch[65];
+
+    //! Compute the length of a pubkey with a given first byte.
+    unsigned int static GetLen(unsigned char chHeader)
+    {
+        if (chHeader == 2 || chHeader == 3)
+            return 33;
+        if (chHeader == 4 || chHeader == 6 || chHeader == 7)
+            return 65;
+        return 0;
+    }
+
+    //! Set this key data to be invalid
+    void Invalidate()
+    {
+        vch[0] = 0xFF;
+    }
+
+public:
+    //! Construct an invalid public key.
+    CPubKey()
+    {
+        Invalidate();
+    }
+
+    //! Initialize a public key using begin/end iterators to byte data.
+    template <typename T>
+    void Set(const T pbegin, const T pend)
+    {
+        int len = pend == pbegin ? 0 : GetLen(pbegin[0]);
+        if (len && len == (pend - pbegin))
+            memcpy(vch, (unsigned char*)&pbegin[0], len);
+        else
+            Invalidate();
+    }
+
+    //! Construct a public key using begin/end iterators to byte data.
+    template <typename T>
+    CPubKey(const T pbegin, const T pend)
+    {
+        Set(pbegin, pend);
+    }
+
+    //! Construct a public key from a byte vector.
+    CPubKey(const std::vector<unsigned char>& vch)
+    {
+        Set(vch.begin(), vch.end());
+    }
+
+    //! Simple read-only vector-like interface to the pubkey data.
+    unsigned int size() const { return GetLen(vch[0]); }
+    const unsigned char* begin() const { return vch; }
+    const unsigned char* end() const { return vch + size(); }
+    const unsigned char& operator[](unsigned int pos) const { return vch[pos]; }
+
+    //! Comparator implementation.
+    friend bool operator==(const CPubKey& a, const CPubKey& b)
+    {
+        return a.vch[0] == b.vch[0] &&
+               memcmp(a.vch, b.vch, a.size()) == 0;
+    }
+    friend bool operator!=(const CPubKey& a, const CPubKey& b)
+    {
+        return !(a == b);
+    }
+    friend bool operator<(const CPubKey& a, const CPubKey& b)
+    {
+        return a.vch[0] < b.vch[0] ||
+               (a.vch[0] == b.vch[0] && memcmp(a.vch, b.vch, a.size()) < 0);
+    }
+
+    //! Implement serialization, as if this was a byte vector.
+    unsigned int GetSerializeSize(int nType, int nVersion) const
+    {
+        return size() + 1;
+    }
+    template <typename Stream>
+    void Serialize(Stream& s, int nType, int nVersion) const
+    {
+        unsigned int len = size();
+        ::WriteCompactSize(s, len);
+        s.write((char*)vch, len);
+    }
+    template <typename Stream>
+    void Unserialize(Stream& s, int nType, int nVersion)
+    {
+        unsigned int len = ::ReadCompactSize(s);
+        if (len <= 65) {
+            s.read((char*)vch, len);
+        } else {
+            // invalid pubkey, skip available data
+            char dummy;
+            while (len--)
+                s.read(&dummy, 1);
+            Invalidate();
+        }
+    }
+
+    //! Get the KeyID of this public key (hash of its serialization)
+    CKeyID GetID() const
+    {
+        return CKeyID(Hash160(vch, vch + size()));
+    }
+
+    //! Get the 256-bit hash of this public key.
+    uint256 GetHash() const
+    {
+        return Hash(vch, vch + size());
+    }
+
+    /*
+     * Check syntactic correctness.
+     * 
+     * Note that this is consensus critical as CheckSig() calls it!
+     */
+    bool IsValid() const
+    {
+        return size() > 0;
+    }
+
+    //! fully validate whether this is a valid public key (more expensive than IsValid())
+    bool IsFullyValid() const;
+
+    //! Check whether this is a compressed public key.
+    bool IsCompressed() const
+    {
+        return size() == 33;
+    }
+
+    /**
+     * Verify a DER signature (~72 bytes).
+     * If this public key is not fully valid, the return value will be false.
+     */
+    bool Verify(const uint256& hash, const std::vector<unsigned char>& vchSig) const;
+
+    //! Recover a public key from a compact signature.
+    bool RecoverCompact(const uint256& hash, const std::vector<unsigned char>& vchSig);
+
+    //! Turn this public key into an uncompressed public key.
+    bool Decompress();
+
+    //! Derive BIP32 child pubkey.
+    bool Derive(CPubKey& pubkeyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
+};
+
+struct CExtPubKey {
+    unsigned char nDepth;
+    unsigned char vchFingerprint[4];
+    unsigned int nChild;
+    unsigned char vchChainCode[32];
+    CPubKey pubkey;
+
+    friend bool operator==(const CExtPubKey& a, const CExtPubKey& b)
+    {
+        return a.nDepth == b.nDepth && memcmp(&a.vchFingerprint[0], &b.vchFingerprint[0], 4) == 0 && a.nChild == b.nChild &&
+               memcmp(&a.vchChainCode[0], &b.vchChainCode[0], 32) == 0 && a.pubkey == b.pubkey;
+    }
+
+    void Encode(unsigned char code[74]) const;
+    void Decode(const unsigned char code[74]);
+    bool Derive(CExtPubKey& out, unsigned int nChild) const;
+};
+
+#endif // BITCOIN_PUBKEY_H
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index e1e242882fb8..54c2847f79ac 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -10,7 +10,7 @@
 #include "crypto/sha1.h"
 #include "crypto/sha2.h"
 #include "eccryptoverify.h"
-#include "key.h"
+#include "pubkey.h"
 #include "script/script.h"
 #include "uint256.h"
 #include "util.h"
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index ab366898d825..d76a5acd6366 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -5,7 +5,7 @@
 
 #include "sigcache.h"
 
-#include "key.h"
+#include "pubkey.h"
 #include "random.h"
 #include "uint256.h"
 #include "util.h"
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index 05938961bc6d..9cae0508e146 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -5,6 +5,7 @@
 
 #include "script/standard.h"
 
+#include "pubkey.h"
 #include "script/script.h"
 #include "util.h"
 #include "utilstrencodings.h"
diff --git a/src/script/standard.h b/src/script/standard.h
index 248b941a64ac..171178ce3d74 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -6,8 +6,7 @@
 #ifndef H_BITCOIN_SCRIPT_STANDARD
 #define H_BITCOIN_SCRIPT_STANDARD
 
-#include "key.h"
-#include "script/script.h"
+#include "uint256.h"
 #include "script/interpreter.h"
 
 #include <boost/variant.hpp>
@@ -15,6 +14,7 @@
 #include <stdint.h>
 
 class CScript;
+class CKeyID;
 
 /** A reference to a CScript: the Hash160 of its serialization (see script.h) */
 class CScriptID : public uint160
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 93b7fe189a38..fa10ca1298b3 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -4,6 +4,7 @@
 
 #include "main.h"
 #include "miner.h"
+#include "pubkey.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index 7b27703b6223..5bf0862c714a 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -2,6 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "pubkey.h"
 #include "key.h"
 #include "script/script.h"
 #include "script/standard.h"
diff --git a/src/wallet_ismine.cpp b/src/wallet_ismine.cpp
index 07149ebd0b6c..05dc40aaee57 100644
--- a/src/wallet_ismine.cpp
+++ b/src/wallet_ismine.cpp
@@ -7,6 +7,7 @@
 
 #include "key.h"
 #include "keystore.h"
+#include "script/script.h"
 #include "script/standard.h"
 
 #include <boost/foreach.hpp>

From 771d500283129cf19d14045a58d0e2fb0ce2cba1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 31 Oct 2014 09:36:30 +0100
Subject: [PATCH 0968/1819] minor cleanup: include orders, end comments etc.

- no code changes
---
 src/Makefile.test.include |  8 ++++----
 src/ecwrapper.cpp         |  2 +-
 src/ecwrapper.h           |  4 ++--
 src/main.h                | 16 +++++++---------
 src/qt/optionsdialog.h    |  5 ++++-
 src/rpcblockchain.cpp     |  2 +-
 src/rpcserver.h           |  2 +-
 src/txmempool.cpp         |  6 +++---
 src/utilstrencodings.cpp  |  4 ++--
 9 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 340eb9f1a734..6a8d9e58a4b6 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -42,8 +42,8 @@ BITCOIN_TESTS =\
   test/bloom_tests.cpp \
   test/checkblock_tests.cpp \
   test/Checkpoints_tests.cpp \
-  test/compress_tests.cpp \
   test/coins_tests.cpp \
+  test/compress_tests.cpp \
   test/crypto_tests.cpp \
   test/DoS_tests.cpp \
   test/getarg_tests.cpp \
@@ -58,7 +58,9 @@ BITCOIN_TESTS =\
   test/rpc_tests.cpp \
   test/script_P2SH_tests.cpp \
   test/script_tests.cpp \
+  test/scriptnum_tests.cpp \
   test/serialize_tests.cpp \
+  test/sighash_tests.cpp \
   test/sigopcount_tests.cpp \
   test/skiplist_tests.cpp \
   test/test_bitcoin.cpp \
@@ -66,9 +68,7 @@ BITCOIN_TESTS =\
   test/transaction_tests.cpp \
   test/uint256_tests.cpp \
   test/univalue_tests.cpp \
-  test/util_tests.cpp \
-  test/scriptnum_tests.cpp \
-  test/sighash_tests.cpp
+  test/util_tests.cpp
 
 if ENABLE_WALLET
 BITCOIN_TESTS += \
diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index e5db6709272d..ebaa350264e9 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "ecwrapper.h"
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index 072da4a942f1..e2d1e7edc4f0 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_EC_WRAPPER_H
@@ -43,4 +43,4 @@ class CECKey {
     static bool SanityCheck();
 };
 
-#endif
+#endif // BITCOIN_EC_WRAPPER_H
diff --git a/src/main.h b/src/main.h
index 1941ca705981..e5ce924a481f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -39,8 +39,15 @@
 #include <boost/unordered_map.hpp>
 
 class CBlockIndex;
+class CBlockTreeDB;
 class CBloomFilter;
 class CInv;
+class CScriptCheck;
+class CValidationInterface;
+class CValidationState;
+
+struct CBlockTemplate;
+struct CNodeStateStats;
 
 /** The maximum allowed size for a serialized block, in bytes (network rule) */
 static const unsigned int MAX_BLOCK_SIZE = 1000000;
@@ -128,15 +135,6 @@ extern CBlockIndex *pindexBestHeader;
 // Minimum disk space required - used in CheckDiskSpace()
 static const uint64_t nMinDiskSpace = 52428800;
 
-
-class CBlockTreeDB;
-class CScriptCheck;
-class CValidationState;
-class CValidationInterface;
-struct CNodeStateStats;
-
-struct CBlockTemplate;
-
 /** Register a wallet to receive updates from core */
 void RegisterValidationInterface(CValidationInterface* pwalletIn);
 /** Unregister a wallet from core */
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 39c53f43915f..2abd92cae593 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -7,10 +7,13 @@
 
 #include <QDialog>
 
-class QDataWidgetMapper;
 class OptionsModel;
 class QValidatedLineEdit;
 
+QT_BEGIN_NAMESPACE
+class QDataWidgetMapper;
+QT_END_NAMESPACE
+
 namespace Ui {
 class OptionsDialog;
 }
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 78f556989542..a7cd63bd957b 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -474,7 +474,7 @@ struct CompareBlocksByHeight
     bool operator()(const CBlockIndex* a, const CBlockIndex* b) const
     {
         /* Make sure that unequal blocks with the same height do not compare
-           equal.  Use the pointers themselves to make a distinction.  */
+           equal. Use the pointers themselves to make a distinction. */
 
         if (a->nHeight != b->nHeight)
           return (a->nHeight > b->nHeight);
diff --git a/src/rpcserver.h b/src/rpcserver.h
index cc444cef1fad..dc4663739964 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -7,8 +7,8 @@
 #define _BITCOINRPC_SERVER_H_
 
 #include "amount.h"
-#include "uint256.h"
 #include "rpcprotocol.h"
+#include "uint256.h"
 
 #include <list>
 #include <map>
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index d3d9cb8a0131..b5070d5104a4 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -332,7 +332,7 @@ class CMinerPolicyEstimator
         size_t numEntries;
         filein >> numEntries;
         if (numEntries <= 0 || numEntries > 10000)
-            throw runtime_error("Corrupt estimates file.  Must have between 1 and 10k entires.");
+            throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entires.");
 
         std::vector<CBlockAverage> fileHistory;
         
@@ -343,8 +343,8 @@ class CMinerPolicyEstimator
             fileHistory.push_back(entry);
         }
 
-        //Now that we've processed the entire fee estimate data file and not
-        //thrown any errors, we can copy it to our history
+        // Now that we've processed the entire fee estimate data file and not
+        // thrown any errors, we can copy it to our history
         nBestSeenHeight = nFileBestSeenHeight;
         history = fileHistory;
         assert(history.size() > 0);
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index 81e156f43f96..15094e599912 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -7,10 +7,10 @@
 
 #include "tinyformat.h"
 
-#include <errno.h>
-#include <limits>
 #include <cstdlib>
 #include <cstring>
+#include <errno.h>
+#include <limits>
 
 using namespace std;
 

From 917b83127de0163f829cda48aa1c65f11b586faa Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 31 Oct 2014 11:19:05 +0100
Subject: [PATCH 0969/1819] qt: translations update from Transifex

---
 src/qt/locale/bitcoin_af_ZA.ts       |   20 -
 src/qt/locale/bitcoin_ar.ts          |  114 +-
 src/qt/locale/bitcoin_be_BY.ts       |  178 ++-
 src/qt/locale/bitcoin_bg.ts          |   68 --
 src/qt/locale/bitcoin_ca.ts          |  422 +++----
 src/qt/locale/bitcoin_ca@valencia.ts |  638 +++++++----
 src/qt/locale/bitcoin_ca_ES.ts       |  274 +----
 src/qt/locale/bitcoin_cs.ts          |  278 +----
 src/qt/locale/bitcoin_cy.ts          |    8 -
 src/qt/locale/bitcoin_da.ts          |  656 +++++------
 src/qt/locale/bitcoin_de.ts          |  474 ++++----
 src/qt/locale/bitcoin_el_GR.ts       |  166 +--
 src/qt/locale/bitcoin_eo.ts          |  162 +--
 src/qt/locale/bitcoin_es.ts          |  465 ++++----
 src/qt/locale/bitcoin_es_CL.ts       |   97 --
 src/qt/locale/bitcoin_es_DO.ts       |  179 +--
 src/qt/locale/bitcoin_es_MX.ts       |    4 -
 src/qt/locale/bitcoin_es_UY.ts       |    8 -
 src/qt/locale/bitcoin_et.ts          |  144 ---
 src/qt/locale/bitcoin_eu_ES.ts       |   16 -
 src/qt/locale/bitcoin_fa.ts          |  158 +--
 src/qt/locale/bitcoin_fa_IR.ts       |   56 -
 src/qt/locale/bitcoin_fi.ts          |  292 ++---
 src/qt/locale/bitcoin_fr.ts          |  298 +----
 src/qt/locale/bitcoin_gl.ts          |  162 +--
 src/qt/locale/bitcoin_he.ts          | 1546 ++++++++++++++++---------
 src/qt/locale/bitcoin_hi_IN.ts       |   20 -
 src/qt/locale/bitcoin_hr.ts          |  244 ++--
 src/qt/locale/bitcoin_hu.ts          |  155 +--
 src/qt/locale/bitcoin_id_ID.ts       |  164 +--
 src/qt/locale/bitcoin_it.ts          |  504 ++++----
 src/qt/locale/bitcoin_ja.ts          |  178 +--
 src/qt/locale/bitcoin_ka.ts          |  178 +--
 src/qt/locale/bitcoin_ko_KR.ts       |  230 +---
 src/qt/locale/bitcoin_ky.ts          |    4 -
 src/qt/locale/bitcoin_la.ts          |  148 ---
 src/qt/locale/bitcoin_lt.ts          |  330 ++++--
 src/qt/locale/bitcoin_lv_LV.ts       |   82 +-
 src/qt/locale/bitcoin_mn.ts          |   12 -
 src/qt/locale/bitcoin_ms_MY.ts       |   32 +
 src/qt/locale/bitcoin_nb.ts          |  488 ++++----
 src/qt/locale/bitcoin_nl.ts          |  372 +++---
 src/qt/locale/bitcoin_pam.ts         |  140 +--
 src/qt/locale/bitcoin_pl.ts          |  190 +--
 src/qt/locale/bitcoin_pt_BR.ts       |  328 ++----
 src/qt/locale/bitcoin_pt_PT.ts       |  186 +--
 src/qt/locale/bitcoin_ro_RO.ts       |  186 +--
 src/qt/locale/bitcoin_ru.ts          |  334 +-----
 src/qt/locale/bitcoin_sk.ts          |  244 +---
 src/qt/locale/bitcoin_sl_SI.ts       |  274 +++--
 src/qt/locale/bitcoin_sq.ts          |    8 -
 src/qt/locale/bitcoin_sr.ts          |   41 +-
 src/qt/locale/bitcoin_sv.ts          |  278 +----
 src/qt/locale/bitcoin_th_TH.ts       |    8 -
 src/qt/locale/bitcoin_tr.ts          |  488 ++++----
 src/qt/locale/bitcoin_uk.ts          | 1586 ++++++++++++++++++++++----
 src/qt/locale/bitcoin_ur_PK.ts       |   32 +
 src/qt/locale/bitcoin_uz@Cyrl.ts     | 1406 +++++++++++++++++++----
 src/qt/locale/bitcoin_zh_CN.ts       |  255 +----
 src/qt/locale/bitcoin_zh_TW.ts       |  302 +----
 60 files changed, 7204 insertions(+), 9106 deletions(-)

diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index 474b6b329818..851c261d0be3 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -277,14 +277,6 @@
         <source>Form</source>
         <translation>Vorm</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Beursie</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Onlangse transaksies&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -650,14 +642,6 @@
         <source>Options:</source>
         <translation>Opsies:</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Luister vir konneksies op &lt;port&gt; (standaard: 8333 of testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Onderhou op die meeste &lt;n&gt; konneksies na eweknieë (standaard: 125)</translation>
-    </message>
     <message>
         <source>Use the test network</source>
         <translation>Gebruik die toets netwerk</translation>
@@ -670,10 +654,6 @@
         <source>Information</source>
         <translation>Informasie</translation>
     </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sisteem fout:</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Hierdie help boodskap</translation>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index ea1bc0ea4b96..f05270a9fa46 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -33,6 +33,10 @@
         <source>Delete the currently selected address from the list</source>
         <translation>حذف العنوان المحدد من القائمة</translation>
     </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>تحميل البيانات في علامة التبويب الحالية إلى ملف.</translation>
+    </message>
     <message>
         <source>&amp;Export</source>
         <translation>&amp;تصدير</translation>
@@ -61,6 +65,14 @@
         <source>Receiving addresses</source>
         <translation>استقبال العناوين</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+        <translation>هذه هي عناوين Bitcion التابعة لك من أجل إرسال الدفعات. تحقق دائما من المبلغ و عنوان المرسل المستقبل قبل إرسال العملات</translation>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>هذه هي عناوين Bitcion التابعة لك من أجل إستقبال الدفعات. ينصح استخدام عنوان جديد من أجل كل صفقة</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>نسخ &amp;الوصف</translation>
@@ -73,6 +85,10 @@
         <source>Export Address List</source>
         <translation>تصدير قائمة العناوين</translation>
     </message>
+    <message>
+        <source>Comma separated file (*.csv)</source>
+        <translation>ملف مفصول بفواصل (*.csv)</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>فشل التصدير</translation>
@@ -95,6 +111,10 @@
 </context>
 <context>
     <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation>حوار جملة السر</translation>
+    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>ادخل كلمة المرور</translation>
@@ -139,6 +159,18 @@
         <source>Confirm wallet encryption</source>
         <translation>تأكيد تشفير المحفظة</translation>
     </message>
+    <message>
+        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+        <translation>تحذير: إذا قمت بتشفير محفظتك وفقدت كلمة المرور الخاص بك, ستفقد كل عملات BITCOINS الخاصة بك.</translation>
+    </message>
+    <message>
+        <source>Are you sure you wish to encrypt your wallet?</source>
+        <translation>هل أنت متأكد من رغبتك في تشفير محفظتك ؟</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>هام: أي نسخة إحتياطية سابقة  قمت بها لمحفظتك يجب استبدالها  بأخرى حديثة، مشفرة. لأسباب أمنية، النسخ الاحتياطية السابقة لملفات المحفظة الغير مشفرة تصبح عديمة الفائدة مع بداية استخدام المحفظة المشفرة الجديدة.</translation>
+    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>تحذير: مفتاح الحروف الكبيرة مفعل</translation>
@@ -147,6 +179,10 @@
         <source>Wallet encrypted</source>
         <translation>محفظة مشفرة</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>أدخل عبارة مرور جديدة إلى المحفظة. الرجاء استخدام عبارة مرور تتكون من10 حروف عشوائية على الاقل, أو أكثر من 7 كلمات</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>بتكوين سوف يغلق الآن لإنهاء عملية التشفير. تذكر أن التشفير لا يستطيع حماية محفظتك تمامًا من السرقة من خلال البرمجيات الخبيثة التي تصيب جهازك </translation>
@@ -175,7 +211,11 @@
         <source>Wallet decryption failed</source>
         <translation>فشل   فك التشفير المحفظة</translation>
     </message>
-    </context>
+    <message>
+        <source>Wallet passphrase was successfully changed.</source>
+        <translation>لقد تم تغير عبارة مرور المحفظة بنجاح</translation>
+    </message>
+</context>
 <context>
     <name>BitcoinGUI</name>
     <message>
@@ -238,14 +278,30 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;تغيير كلمة المرور</translation>
     </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>ارسال العناوين.</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>استقبال العناوين</translation>
+    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>افتح &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>عميل bitcion core</translation>
+    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>ارسل عملات الى عنوان بيتكوين</translation>
     </message>
+    <message>
+        <source>Modify configuration options for Bitcoin</source>
+        <translation>تعديل إعدادات bitcoin</translation>
+    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>احفظ نسخة احتياطية للمحفظة في مكان آخر</translation>
@@ -274,6 +330,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;استقبل</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>  اظهار معلومات حول bitcion core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;عرض / اخفاء</translation>
@@ -282,6 +342,10 @@
         <source>Show or hide the main Window</source>
         <translation>عرض او اخفاء النافذة الرئيسية</translation>
     </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>تشفير المفتاح الخاص لمحفظتك</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;ملف</translation>
@@ -298,14 +362,14 @@
         <source>Tabs toolbar</source>
         <translation>شريط أدوات علامات التبويب</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>جوهر البيت كوين</translation>
     </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>حول bitcoin core</translation>
+    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform></translation>
@@ -596,10 +660,6 @@
         <source>Error</source>
         <translation>خطأ</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>قيقا بايت مساحة متاحة</translation>
-    </message>
     </context>
 <context>
     <name>OpenURIDialog</name>
@@ -709,10 +769,6 @@
         <source>Form</source>
         <translation>نمودج</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>محفظة</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>متوفر</translation>
@@ -733,10 +789,6 @@
         <source>Your current total balance</source>
         <translation>رصيدك الكلي الحالي</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>اخر المعملات </translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>خارج المزامنه</translation>
@@ -876,14 +928,6 @@
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>استخدم اسهم الاعلى و الاسفل للتنقل بين السجلات و &lt;b&gt;Ctrl-L&lt;/b&gt;  لمسح الشاشة</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>نعم</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>لا</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>غير معرف</translation>
@@ -1539,6 +1583,10 @@
         <source>Exporting Successful</source>
         <translation>نجح التصدير</translation>
     </message>
+    <message>
+        <source>Comma separated file (*.csv)</source>
+        <translation>ملف مفصول بفواصل (*.csv)</translation>
+    </message>
     <message>
         <source>Confirmed</source>
         <translation>تأكيد</translation>
@@ -1591,6 +1639,10 @@
         <source>&amp;Export</source>
         <translation>&amp;تصدير</translation>
     </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>تحميل البيانات في علامة التبويب الحالية إلى ملف.</translation>
+    </message>
     <message>
         <source>Backup Wallet</source>
         <translation>نسخ احتياط للمحفظة</translation>
@@ -1630,10 +1682,6 @@
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>تحذير: المحفظة مغلقة , لا تستطيع تنفيذ المعاملة</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>خطأ: خطأ في النظام:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>فشل في الاستماع على أي منفذ. استخدام الاستماع = 0 إذا كنت تريد هذا.</translation>
@@ -1658,10 +1706,6 @@
         <source>Signing transaction failed</source>
         <translation>فشل توقيع المعاملة</translation>
     </message>
-    <message>
-        <source>System error: </source>
-        <translation>خطأ في النظام :</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>قيمة العملية صغيره جدا</translation>
@@ -1686,10 +1730,6 @@
         <source>Upgrade wallet to latest format</source>
         <translation>تحديث المحفظة للنسخة الاخيرة</translation>
     </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>المفتاح الخاص بالسيرفر (default: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>رسالة المساعدة هذه</translation>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 8fac417b73b2..f4b82ce2cc81 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -9,10 +9,34 @@
         <source>Create a new address</source>
         <translation>Стварыць новы адрас</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>Новы</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Капіяваць пазначаны адрас у сістэмны буфер абмену</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>Капіяваць</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>Зачыніць</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>Капіяваць адрас</translation>
+    </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Выдаліць абраны адрас са спісу</translation>
+    </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Экспартаваць гэтыя звесткі у файл</translation>
+    </message>
     <message>
         <source>&amp;Export</source>
         <translation>Экспарт</translation>
@@ -21,10 +45,38 @@
         <source>&amp;Delete</source>
         <translation>Выдаліць</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Выбраць адрас, куды выслаць сродкі</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Выбраць адрас, на які атрымаць сродкі</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>Выбраць</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>адрасы Адпраўкі</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>адрасы Прымання</translation>
+    </message>
+    <message>
+        <source>&amp;Edit</source>
+        <translation>Рэдагаваць</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Коскамі падзелены файл (*.csv)</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Экспартаванне няўдалае</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
@@ -87,6 +139,18 @@
         <source>Confirm wallet encryption</source>
         <translation>Пацвердзіце шыфраванне гаманца</translation>
     </message>
+    <message>
+        <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+        <translation>Увага: калі вы зашыфруеце свой гаманец і страціце парольную фразу, то &lt;b&gt;СТРАЦІЦЕ ЎСЕ СВАЕ БІТКОЙНЫ&lt;/b&gt;!</translation>
+    </message>
+    <message>
+        <source>Are you sure you wish to encrypt your wallet?</source>
+        <translation>Ці ўпэўненыя вы, што жадаеце зашыфраваць свой гаманец?</translation>
+    </message>
+    <message>
+        <source>Warning: The Caps Lock key is on!</source>
+        <translation>Увага: Caps Lock уключаны!</translation>
+    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Гаманец зашыфраваны</translation>
@@ -119,9 +183,17 @@
         <source>Wallet decryption failed</source>
         <translation>Расшыфраванне гаманца няўдалае</translation>
     </message>
-    </context>
+    <message>
+        <source>Wallet passphrase was successfully changed.</source>
+        <translation>Парольная фраза гаманца паспяхова зменена.</translation>
+    </message>
+</context>
 <context>
     <name>BitcoinGUI</name>
+    <message>
+        <source>Sign &amp;message...</source>
+        <translation>Падпісаць паведамленне...</translation>
+    </message>
     <message>
         <source>Synchronizing with network...</source>
         <translation>Сінхранізацыя з сецівам...</translation>
@@ -130,6 +202,10 @@
         <source>&amp;Overview</source>
         <translation>Агляд</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Вузел</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Паказвае агульныя звесткі аб гаманцы</translation>
@@ -162,6 +238,14 @@
         <source>&amp;Options...</source>
         <translation>Опцыі...</translation>
     </message>
+    <message>
+        <source>&amp;Encrypt Wallet...</source>
+        <translation>Зашыфраваць Гаманец...</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Адчыниць &amp;URI...</translation>
+    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>Зрабіце копію гаманца ў іншае месца</translation>
@@ -170,6 +254,14 @@
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Змяніць пароль шыфравання гаманца</translation>
     </message>
+    <message>
+        <source>&amp;Debug window</source>
+        <translation>Вакно адладкі</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Гаманец</translation>
+    </message>
     <message>
         <source>&amp;Send</source>
         <translation>Даслаць</translation>
@@ -178,6 +270,18 @@
         <source>&amp;Receive</source>
         <translation>Атрымаць</translation>
     </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>&amp;Паказаць / Схаваць</translation>
+    </message>
+    <message>
+        <source>Show or hide the main Window</source>
+        <translation>Паказаць альбо схаваць галоўнае вакно</translation>
+    </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>Зашыфраваць прыватныя ключы, якия належаць вашаму гаманцу</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>Ф&amp;айл</translation>
@@ -190,10 +294,6 @@
         <source>&amp;Help</source>
         <translation>Дапамога</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n актыўнае злучэнне з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform></translation>
@@ -244,6 +344,10 @@ Address: %4
     </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Amount:</source>
+        <translation>Колькасць:</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Колькасць</translation>
@@ -329,6 +433,14 @@ Address: %4
     </context>
 <context>
     <name>HelpMessageDialog</name>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-біт)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Аб Bitcoin Core</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Ужыванне:</translation>
@@ -357,10 +469,6 @@ Address: %4
         <source>Form</source>
         <translation>Форма</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Нядаўнія транзаццыі&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -436,6 +544,10 @@ Address: %4
         <source>Send Coins</source>
         <translation>Даслаць Манеты</translation>
     </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Колькасць:</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Даслаць адразу некалькім атрымальнікам</translation>
@@ -516,6 +628,10 @@ Address: %4
     </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation>Распрацоўнікі Bitcoin Core</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -715,6 +831,10 @@ Address: %4
         <source>Edit label</source>
         <translation>Рэдагаваць пазнаку</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Экспартаванне няўдалае</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Коскамі падзелены файл (*.csv)</translation>
@@ -771,6 +891,10 @@ Address: %4
         <source>&amp;Export</source>
         <translation>Экспарт</translation>
     </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Экспартаваць гэтыя звесткі у файл</translation>
+    </message>
     </context>
 <context>
     <name>bitcoin-core</name>
@@ -778,34 +902,10 @@ Address: %4
         <source>Options:</source>
         <translation>Опцыі:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Вызначыць канфігурацыйны файл (зыходна: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Вызначыць pid-файл (зыходна: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Вызначыць каталог даных</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Слухаць злучэнні на &lt;port&gt; (зыходна: 8333 ці testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Трымаць не больш за &lt;n&gt; злучэнняў на асобу (зыходна: 125)</translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Парог для адлучэння злаўмысных карыстальнікаў (тыпова: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Колькасць секунд для ўстрымання асобаў да перадалучэння (заходна: 86400)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Прымаць камандны радок і JSON-RPC каманды</translation>
@@ -838,10 +938,6 @@ Address: %4
         <source>Upgrade wallet to latest format</source>
         <translation>Абнавіць гаманец на новы фармат</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Устанавіць памер фонда ключоў у &lt;n&gt; (тыпова: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Перасканаваць ланцуг блокаў дзеля пошуку адсутных транзакцый</translation>
@@ -850,14 +946,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Ужываць OpenSSL (https) для JSON-RPC злучэнняў</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Файл-сертыфікат сервера (зыходна: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Прыватны ключ сервера (зыходна: server.pem)</translation>
-    </message>
     <message>
         <source>Loading addresses...</source>
         <translation>Загружаем адрасы...</translation>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 11bf594a42e8..a1f3dd092a25 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -278,10 +278,6 @@
         <source>Tabs toolbar</source>
         <translation>Раздели</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n връзка към Биткоин мрежата</numerusform><numerusform>%n връзки към Биткоин мрежата</numerusform></translation>
@@ -609,10 +605,6 @@
         <source>Form</source>
         <translation>Форма</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Портфейл</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Налично:</translation>
@@ -629,10 +621,6 @@
         <source>Your current total balance</source>
         <translation>Текущият ви общ баланс</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Последни трансакции&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>несинхронизиран</translation>
@@ -1426,22 +1414,10 @@
         <source>Options:</source>
         <translation>Опции:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Задаване на файл с настройки (по подразбиране bitcoin.conf)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Определете директория за данните</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Праг на прекъсване на връзката при непорядъчно държащи се пиъри (по подразбиране:100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Брой секунди до възтановяване на връзката за зле държащите се пиъри (по подразбиране:86400)</translation>
-    </message>
     <message>
         <source>Use the test network</source>
         <translation>Използвайте тестовата мрежа</translation>
@@ -1454,10 +1430,6 @@
         <source>(default: 1)</source>
         <translation>(по подразбиране 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(по подразбиране wallet.dat)</translation>
-    </message>
     <message>
         <source>Connection options:</source>
         <translation>Настройки на връзката:</translation>
@@ -1466,30 +1438,10 @@
         <source>Error: Disk space is low!</source>
         <translation>Грешка: мястото на диска е малко!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Грешка: системна грешка:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Провалено "слушане" на всеки порт. Използвайте -listen=0 ако искате това.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Грешка при четене данни на блок</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Грешка при четене на блок</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Грешка при запис данни на блок</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Грешка при запис на блок</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Внасяне...</translation>
@@ -1514,18 +1466,6 @@
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Изпрати локализиращата или дебъг информацията към конзолата, вместо файлът debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Задайте минимален размер на блок-а в байтове (подразбиране: 0)</translation>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Определете таймаут за свързване в милисекунди (подразбиране: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Системна грешка:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Сумата на трансакцията е твърде малка</translation>
@@ -1566,14 +1506,6 @@
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Използвайте OpenSSL (https) за JSON-RPC връзките</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Сертификатен файл на сървъра (По подразбиране:server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Поверителен ключ за сървъра (default: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Това помощно съобщение</translation>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 0d45ab63b642..1e19a3ff18b1 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra d'eines de les pestanyes</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Nucli de Bitcoin</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Proccessats %1 blocs del històric de transaccions.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
@@ -912,15 +904,7 @@ Address: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB d'espai lliure disponible</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(d' %1GB necessari)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1162,8 +1146,8 @@ Address: %4
         <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establert connexió, però aquest proces no s'ha completat encara.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Moneder</translation>
+        <source>Watch-only:</source>
+        <translation>Només lectura:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1198,8 +1182,20 @@ Address: %4
         <translation>El balanç total actual</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaccions recents&lt;/b&gt;</translation>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>El vostre balanç actual en adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transaccions sense confirmar a adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Balanç minat en adreces de només lectura que encara no ha madurat</translation>
+    </message>
+    <message>
+        <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>
@@ -1461,8 +1457,36 @@ Address: %4
         <translation>Serveis</translation>
     </message>
     <message>
-        <source>Sync Node</source>
-        <translation>Node de sincronització</translation>
+        <source>Starting Height</source>
+        <translation>Alçada inicial</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Sincronitza l'alçada</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Puntuació de bandeig</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Temps de connexió</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Darrer enviament</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Darrera recepció</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes enviats</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes rebuts</translation>
     </message>
     <message>
         <source>Ping Time</source>
@@ -1544,7 +1568,31 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>a través de %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>mai</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrant</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Sortint</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconegut</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>S'està obtenint...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1927,6 +1975,10 @@ Address: %4
         <source>This is a normal payment.</source>
         <translation>Això és un pagament normal.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>L'adreça Bitcoin on enviar el pagament</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alta+A</translation>
@@ -1997,6 +2049,10 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Podeu signar missatges amb la vostra adreça per provar que són vostres. Aneu amb compte no signar qualsevol cosa, ja que els atacs de pesca electrònica (phishing) poden provar de confondre-us perquè els signeu amb la vostra identitat. Només signeu als documents completament detallats amb què hi esteu d'acord.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>L'adreça Bitcoin amb què signar el missatge</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Tria les adreces fetes servir amb anterioritat</translation>
@@ -2049,6 +2105,10 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>Introdueixi l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>L'adreça Bitcoin amb què va ser signat el missatge</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verificar el missatge per assegurar-se que ha estat signat amb una adreça Bitcoin específica</translation>
@@ -2190,6 +2250,10 @@ Address: %4
         <source>own address</source>
         <translation>Adreça pròpia</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etiqueta</translation>
@@ -2210,6 +2274,14 @@ Address: %4
         <source>Debit</source>
         <translation>Dèbit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Dèbit total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Crèdit total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Comissió de transacció</translation>
@@ -2360,6 +2432,10 @@ Address: %4
         <source>Mined</source>
         <translation>Minat</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2526,7 +2602,11 @@ Address: %4
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unitat en què mostrar els imports. Feu clic per seleccionar una altra unitat.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2582,26 +2662,10 @@ Address: %4
         <source>Options:</source>
         <translation>Opcions:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especifica el directori de dades</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connecta al node per obtenir les adreces de les connexions, i desconnecta</translation>
@@ -2610,18 +2674,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Límit per a desconectar connexions errònies (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepta la línia d'ordres i ordres JSON-RPC </translation>
@@ -2661,17 +2713,13 @@ També es recomana establir la notificació d'alertes i així sereu notificat de
 per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
     <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
@@ -2689,14 +2737,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En aquest mode -genproclimit controla quants blocs es generen immediatament.</translation>
@@ -2705,10 +2745,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Aquesta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
@@ -2717,10 +2753,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>No es pot enllaçar %s a aquest ordinador. El Bitcoin Core probablement ja estigui executant-s'hi.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Avís: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagareu si envieu una transacció.</translation>
@@ -2745,10 +2777,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(per defecte: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(per defecte: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; pot ser:</translation>
@@ -2777,10 +2805,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Opcions de depuració/proves:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
@@ -2817,66 +2841,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Ha fallat la lectura de la informació del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Ha fallat la lectura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Ha fallat la escriptura de la informació de bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Ha fallat l'escriptura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Ha fallat el desfer de dades</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Força el mode segur (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera monedes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
@@ -2897,10 +2865,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
@@ -2913,18 +2877,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Estableix el nombre de fils per atendre trucades RPC (per defecte: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
@@ -2953,26 +2909,106 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocs de un fitxer blk000??.dat extern</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar aquesta opció moltes vegades</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Vincula l'adreça donada i posa a la llista blanca els iguals que s'hi connectin. Feu servir la notació [host]:port per a IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Vincula a l'adreça donada per a escoltar les connexions JSON-RPC. Feu servir la notació [host]:port per a IPv6. Aquesta opció pot ser especificada moltes vegades (per defecte: vincula a totes les interfícies)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>No es pot obtenir un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estigui executant.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: s'ha trobat un argument no permès de -socks. Ja no es pot definir més la versió de SOCKS, només s'accepten els proxies de SOCKS5.ç</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executa l'ordre quan es rebi un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informació de la depuració de sortida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la transmissió (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</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>Avís: comproveu que la data i hora del vostre ordinador siguin correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connecta a través del proxy SOCKS5</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Els desenvolupadors del Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>No s'ha pogut analitzar el valor -rpcbind %s com una adreça de xarxa</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Error en carregar wallet.dat: el moneder requereix una versió més nova del Bitcoin core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: s'ha trobat un argument -tor no acceptat. Feu servir -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Comissió en (BTC/kB) per afegir a les transaccions que envieu (per defecte: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>&amp;Informació</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Ha fallat la inicialització de la comprovació de validesa. El Bitcoin Core s'està aturant.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
@@ -2982,41 +3018,29 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s» (ha de ser com a mínim %s)</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Mida màxima del buffer de recepció per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Cal especificar un port amb -whitebind: «%s»</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Només accepta cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Opcions de transmissió del node:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -3033,22 +3057,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
@@ -3062,12 +3074,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
+        <source>This is experimental software.</source>
+        <translation>Això és programari experimental.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
@@ -3082,8 +3090,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>La transacció és massa gran</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>No s'ha pogut vincular a %s en aquest ordinador (la vinculació ha retornat l'error %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
@@ -3093,6 +3101,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Username for JSON-RPC connections</source>
         <translation>Nom d'usuari per a connexions JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Cal reescriure el moneder: reiniceu el Bitcoin Core per completar-ho.</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Avís</translation>
@@ -3101,6 +3113,14 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Avís: aquesta versió està obsoleta. És necessari actualitzar-la!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -benchmark. Feu servir -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -debugnet. Feu servir -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Se suprimeixen totes les transaccions del moneder...</translation>
@@ -3125,10 +3145,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualitza el moneder a l'últim format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
@@ -3137,14 +3153,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clau privada del servidor (per defecte: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Aquest misatge d'ajuda</translation>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 0d43d95d2a23..9d49da2dbddc 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -3,11 +3,11 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Doble click per editar la direccio o la etiqueta</translation>
+        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Crear nova direccio</translation>
+        <translation>Crea una nova adreça</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -15,7 +15,7 @@
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copieu l'adreça seleccionada al porta-retalls del sistema</translation>
+        <translation>Copia l'adreça seleccionada al porta-retalls del sistema</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -43,7 +43,7 @@
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>Eliminar</translation>
+        <translation>&amp;Elimina</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>L'exportació ha fallat</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>S'ha produït un error en guardar la llista d'adreces a %1. Torneu-ho a provar.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -179,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Moneder encriptat</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin es tancarà ara per acabar el procés d'encriptació. Recordeu que encriptar el moneder no protegeix completament els bitcoins de ser robats per programari maliciós instal·lat a l'ordinador.</translation>
@@ -286,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Obri un &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Client del Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>S'estan important els blocs del disc...</translation>
@@ -338,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Rep</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostra informació del Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostra / Amaga</translation>
@@ -374,13 +390,9 @@
         <source>Tabs toolbar</source>
         <translation>Barra d'eines de les pestanyes</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
@@ -414,10 +426,6 @@
         <source>No block source available...</source>
         <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Proccessats %1 blocs del històric de transaccions.</translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation>%1 i %2</translation>
@@ -512,9 +520,13 @@ Address: %4
         <source>Fee:</source>
         <translation>Quota:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
-        <translation>Comissió posterior:</translation>
+        <translation>Quota posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -534,7 +546,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Import</translation>
+        <translation>Quantitat</translation>
     </message>
     <message>
         <source>Address</source>
@@ -600,6 +612,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>Copia la prioritat</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Copia el canvi</translation>
@@ -648,6 +664,10 @@ Address: %4
         <source>none</source>
         <translation>cap</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Pot variar +/- %1 satoshi(s) per entrada.</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>sí</translation>
@@ -775,7 +795,7 @@ Address: %4
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
         <source>version</source>
@@ -789,6 +809,10 @@ Address: %4
         <source>About Bitcoin Core</source>
         <translation>Quant al Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Opcions de línia d'ordes</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Ús:</translation>
@@ -850,21 +874,17 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucli de Bitcoin</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Error</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB d'espai lliure disponible</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Error: el directori de dades «%1» especificat no pot ser creat.</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation>(d' %1GB necessari)</translation>
+        <source>Error</source>
+        <translation>Error</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -926,6 +946,14 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Nombre de fils de &amp;verificació d'scripts</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accepta connexions de fora</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permet connexions entrants</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
@@ -1098,8 +1126,8 @@ Address: %4
         <translation>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establit connexió, però este proces no s'ha completat encara.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Moneder</translation>
+        <source>Watch-only:</source>
+        <translation>Només lectura:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1134,8 +1162,20 @@ Address: %4
         <translation>El balanç total actual</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaccions recents&lt;/b&gt;</translation>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>El vostre balanç actual en adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transaccions sense confirmar a adreces de només lectura</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Balanç minat en adreces de només lectura que encara no ha madurat</translation>
+    </message>
+    <message>
+        <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>
@@ -1152,6 +1192,22 @@ Address: %4
         <source>Invalid payment address %1</source>
         <translation>Adreça de pagament no vàlida %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>La sol·licitud de pagament s'ha rebutjat</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>La sol·licitud de pagament ha caducat.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>La sol·licitud de pagament no està inicialitzada.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
@@ -1168,10 +1224,18 @@ Address: %4
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
     </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
     </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
+    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
@@ -1184,6 +1248,10 @@ Address: %4
         <source>Error communicating with %1: %2</source>
         <translation>Error en comunicar amb %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>No es pot analitzar la sol·licitud de pagament!</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Mala resposta del servidor %1</translation>
@@ -1199,12 +1267,32 @@ Address: %4
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adreça / nom de l'ordinador</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
-        <translation>Import</translation>
+        <translation>Quantitat</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Introduïu una adreça de Bitcoin (p. ex. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
     </message>
     <message>
         <source>%1 h</source>
@@ -1214,11 +1302,31 @@ Address: %4
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>XARXA</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>DESCONEGUT</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Cap</translation>
+    </message>
     <message>
         <source>N/A</source>
-        <translation>N/D</translation>
+        <translation>N/A</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1246,7 +1354,7 @@ Address: %4
     </message>
     <message>
         <source>N/A</source>
-        <translation>N/D</translation>
+        <translation>N/A</translation>
     </message>
     <message>
         <source>Client version</source>
@@ -1268,6 +1376,10 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>Utilitzant OpenSSL versió</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Utilitzant BerkeleyDB versió</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>&amp;Temps d'inici</translation>
@@ -1292,6 +1404,74 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>Nombre de blocs actuals</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Rebut</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviat</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Iguals</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Seleccioneu un igual per mostrar informació detallada.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direcció</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versió</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent d'usuari</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Serveis</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Alçada inicial</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Sincronitza l'alçada</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Puntuació de bandeig</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Temps de connexió</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Darrer enviament</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Darrera recepció</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes enviats</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes rebuts</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Temps de ping</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Últim temps de bloc</translation>
@@ -1368,7 +1548,31 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>a través de %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>mai</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrant</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Eixint</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconegut</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>S'està obtenint...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1409,7 +1613,7 @@ Address: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Neteja tots els camps del formulari.</translation>
+        <translation>Esborra tots els camps del formuari.</translation>
     </message>
     <message>
         <source>Clear</source>
@@ -1441,7 +1645,7 @@ Address: %4
     </message>
     <message>
         <source>Copy label</source>
-        <translation>Copiar etiqueta</translation>
+        <translation>Copia l'etiqueta</translation>
     </message>
     <message>
         <source>Copy message</source>
@@ -1578,11 +1782,11 @@ Address: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Quota:</translation>
+        <translation>Comissió:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Comissió posterior:</translation>
+        <translation>Quota posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1606,7 +1810,11 @@ Address: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Neteja tots els camps del formulari.</translation>
+        <translation>Netejar tots els camps del formulari.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Polsim:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1642,7 +1850,7 @@ Address: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copia la comissió</translation>
+        <translation>Copia la comissi</translation>
     </message>
     <message>
         <source>Copy after fee</source>
@@ -1708,6 +1916,10 @@ Address: %4
         <source>Warning: Unknown change address</source>
         <translation>Avís: adreça de canvi desconeguda</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copia el polsim</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Esteu segur que ho voleu enviar?</translation>
@@ -1737,19 +1949,23 @@ Address: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>Tria les adreces fetes servir amb anterioritat</translation>
+        <translation>Trieu una adreça feta servir anteriorment</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
         <translation>Això és un pagament normal.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>L'adreça Bitcoin on enviar el pagament</translation>
+    </message>
     <message>
         <source>Alt+A</source>
-        <translation>Alt+A</translation>
+        <translation>Alta+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Apega l'adreça del porta-retalls</translation>
+        <translation>Apegar adreça del porta-retalls</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1813,6 +2029,10 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Podeu signar missatges amb la vostra adreça per provar que són vostres. Aneu amb compte no signar qualsevol cosa, ja que els atacs de pesca electrònica (phishing) poden provar de confondre-vos perquè els signeu amb la vostra identitat. Només signeu als documents completament detallats amb què hi esteu d'acord.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>L'adreça Bitcoin amb què signar el missatge</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Tria les adreces fetes servir amb anterioritat</translation>
@@ -1865,6 +2085,10 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>Introduïsca l'adreça signant, missatge (assegura't que copies salts de línia, espais, tabuladors, etc excactament tot el text) i la signatura a sota per verificar el missatge. Per evitar ser enganyat per un atac home-entre-mig, vés amb compte de no llegir més en la signatura del que hi ha al missatge signat mateix.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>L'adreça Bitcoin amb què va ser signat el missatge</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verificar el missatge per assegurar-se que ha estat signat amb una adreça Bitcoin específica</translation>
@@ -2002,6 +2226,10 @@ Address: %4
         <source>own address</source>
         <translation>Adreça pròpia</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etiqueta</translation>
@@ -2018,6 +2246,14 @@ Address: %4
         <source>Debit</source>
         <translation>Dèbit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Dèbit total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Crèdit total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Comissió de transacció</translation>
@@ -2060,7 +2296,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Import</translation>
+        <translation>Quantitat</translation>
     </message>
     <message>
         <source>true</source>
@@ -2160,6 +2396,10 @@ Address: %4
         <source>Mined</source>
         <translation>Minat</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2245,7 +2485,7 @@ Address: %4
     </message>
     <message>
         <source>Copy address</source>
-        <translation>Copiar adreça </translation>
+        <translation>Copia l'adreça</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -2289,7 +2529,7 @@ Address: %4
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Fitxer de separació amb comes (*.csv)</translation>
+        <translation>Fitxer separat per comes (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2326,7 +2566,11 @@ Address: %4
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unitat en què mostrar els imports. Feu clic per seleccionar una altra unitat.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2382,26 +2626,10 @@ Address: %4
         <source>Options:</source>
         <translation>Opcions:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especifica el directori de dades</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connecta al node per obtindre les adreces de les connexions, i desconnecta</translation>
@@ -2410,18 +2638,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Límit per a desconectar connexions errònies (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepta la línia d'ordes i ordes JSON-RPC </translation>
@@ -2461,17 +2677,13 @@ També es recomana establir la notificació d'alertes i així sereu notificat de
 per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
     <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
@@ -2489,14 +2701,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una orde quan una transacció del moneder canvie (%s en cmd es canvia per TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En este mode -genproclimit controla quants blocs es generen immediatament.</translation>
@@ -2505,10 +2709,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
@@ -2517,10 +2717,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>No es pot enllaçar %s a este ordinador. El Bitcoin Core probablement ja estiga executant-s'hi.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Avís: el -paytxfee és molt elevat! Esta és la comissió de transacció que pagareu si envieu una transacció.</translation>
@@ -2545,10 +2741,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(per defecte: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(per defecte: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; pot ser:</translation>
@@ -2577,10 +2769,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Opcions de depuració/proves:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
@@ -2617,66 +2805,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Ha fallat la lectura de la informació del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Ha fallat la lectura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Ha fallat la escriptura de la informació de bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Ha fallat l'escriptura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Ha fallat el desfer de dades</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Força el mode segur (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera monedes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
@@ -2697,10 +2829,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Posa davant de l'eixida de depuració una marca horària (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
@@ -2713,18 +2841,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Estableix el nombre de fils per atendre trucades RPC (per defecte: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Això s'així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
@@ -2753,25 +2873,105 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocs d'un fitxer blk000??.dat extern</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar esta opció moltes vegades</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Vincula l'adreça donada i posa a la llista blanca els iguals que s'hi connecten. Feu servir la notació [host]:port per a IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Vincula a l'adreça donada per a escoltar les connexions JSON-RPC. Feu servir la notació [host]:port per a IPv6. Esta opció pot ser especificada moltes vegades (per defecte: vincula a totes les interfícies)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>No es pot obtindre un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estiga executant.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: s'ha trobat un argument no permés de -socks. Ja no es pot definir més la versió de SOCKS, només s'accepten els proxies de SOCKS5.ç</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executa l'orde quan es reba un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informació de la depuració d'eixida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la transmissió (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Este producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</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>Avís: comproveu que la data i hora del vostre ordinador siguen correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connecta a través del proxy SOCKS5</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Els desenvolupadors del Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>No s'ha pogut analitzar el valor -rpcbind %s com una adreça de xarxa</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Error en carregar wallet.dat: el moneder requereix una versió més nova del Bitcoin core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: s'ha trobat un argument -tor no acceptat. Feu servir -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Comissió en (BTC/kB) per afegir a les transaccions que envieu (per defecte: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
-        <translation>Informació</translation>
+        <translation>&amp;Informació</translation>
+    </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Ha fallat la inicialització de la comprovació de validesa. El Bitcoin Core s'està parant.</translation>
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
@@ -2782,41 +2982,29 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s» (ha de ser com a mínim %s)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Mida màxima del buffer de recepció per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Només accepta cadenes de blocs que coincidisquen amb els punts de prova (per defecte: 1)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Cal especificar un port amb -whitebind: «%s»</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Opcions de transmissió del node:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -2833,22 +3021,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
@@ -2862,12 +3038,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
+        <source>This is experimental software.</source>
+        <translation>Això és programari experimental.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
@@ -2882,8 +3054,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>La transacció és massa gran</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>No s'ha pogut vincular a %s en este ordinador (la vinculació ha retornat l'error %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
@@ -2893,6 +3065,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Username for JSON-RPC connections</source>
         <translation>Nom d'usuari per a connexions JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Cal reescriure el moneder: reiniceu el Bitcoin Core per completar-ho.</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Avís</translation>
@@ -2901,6 +3077,14 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Avís: esta versió està obsoleta. És necessari actualitzar-la!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -benchmark. Feu servir -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Avís: s'ha ignorat l'argument no acceptat de -debugnet. Feu servir -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Se suprimeixen totes les transaccions del moneder...</translation>
@@ -2925,10 +3109,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualitza el moneder a l'últim format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
@@ -2937,14 +3117,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clau privada del servidor (per defecte: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Este misatge d'ajuda</translation>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index f3b2b4a9266f..5fa69e798d3a 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra d'eines de les pestanyes</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Nucli de Bitcoin</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>No hi ha cap font de bloc disponible...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Proccessats %1 blocs del històric de transaccions.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
@@ -912,15 +904,7 @@ Address: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB d'espai lliure disponible</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(d' %1GB necessari)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1161,10 +1145,6 @@ Address: %4
         <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>La informació mostrada pot no estar al día. El teu moneder es sincronitza automàticament amb la xarxa Bitcoin un cop s'ha establert connexió, però aquest proces no s'ha completat encara.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Moneder</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Només lectura:</translation>
@@ -1217,10 +1197,6 @@ Address: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Balanç total actual en adreces de només lectura</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaccions recents&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>Fora de sincronia</translation>
@@ -1480,10 +1456,6 @@ Address: %4
         <source>Services</source>
         <translation>Serveis</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Node de sincronització</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Alçada inicial</translation>
@@ -1612,14 +1584,6 @@ Address: %4
         <source>Outbound</source>
         <translation>Sortint</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Sí</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>No</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Desconegut</translation>
@@ -2468,6 +2432,10 @@ Address: %4
         <source>Mined</source>
         <translation>Minat</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>només lectura</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2694,26 +2662,10 @@ Address: %4
         <source>Options:</source>
         <translation>Opcions:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifica un fitxer de configuració (per defecte: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifica un fitxer pid (per defecte: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especifica el directori de dades</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escolta connexions a &lt;port&gt; (per defecte: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manté com a molt &lt;n&gt; connexions a iguals (per defecte: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connecta al node per obtenir les adreces de les connexions, i desconnecta</translation>
@@ -2722,18 +2674,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Especifiqueu la vostra adreça pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Límit per a desconectar connexions errònies (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Nombre de segons abans de reconectar amb connexions errònies (per defecte: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escolta connexions JSON-RPC al port &lt;port&gt; (per defecte: 8332 o testnet:18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepta la línia d'ordres i ordres JSON-RPC </translation>
@@ -2773,18 +2713,10 @@ També es recomana establir la notificació d'alertes i així sereu notificat de
 per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Xifrats acceptables (per defecte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limita contínuament les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
@@ -2805,14 +2737,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Com d'exhaustiva és la verificació de blocs de -checkblocks is (0-4, per defecte: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En aquest mode -genproclimit controla quants blocs es generen immediatament.</translation>
@@ -2821,10 +2745,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Defineix el límit de processadors quan està activada la generació (-1 = sense límit, per defecte: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Aquesta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
@@ -2833,10 +2753,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>No es pot enllaçar %s a aquest ordinador. El Bitcoin Core probablement ja estigui executant-s'hi.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utilitza un proxy SOCKS5 apart per arribar a iguals a través de serveis de Tor ocults (per defecte: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Avís: el -paytxfee és molt elevat! Aquesta és la comissió de transacció que pagareu si envieu una transacció.</translation>
@@ -2861,10 +2777,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(per defecte: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(per defecte: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; pot ser:</translation>
@@ -2893,10 +2805,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Opcions de depuració/proves:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Inhabilia el mode segur (safemode), invalida un esdeveniment de mode segur real (per defecte: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobreix la pròpia adreça IP (per defecte: 1 quan escoltant i no -externalip)</translation>
@@ -2933,66 +2841,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Ha fallat la lectura de la informació del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Ha fallat la lectura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Ha fallat la sincronització de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Ha fallat la escriptura de l'índex de blocs</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Ha fallat la escriptura de la informació de bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Ha fallat l'escriptura del bloc</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Ha fallat l'escriptura de la informació de fitxer</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Ha fallat l'escriptura de la basse de dades de monedes</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Ha fallat l'escriptura de l'índex de transaccions</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Ha fallat el desfer de dades</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Força el mode segur (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera monedes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quants blocs s'han de confirmar a l'inici (per defecte: 288, 0 = tots)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se subministra &lt;category&gt;, mostra tota la informació de depuració.</translation>
@@ -3013,10 +2865,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
@@ -3029,22 +2877,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Defineix la mida màxim del bloc en bytes (per defecte: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Estableix el nombre de fils per atendre trucades RPC (per defecte: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especifica un fitxer de moneder (dins del directori de dades)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gasta el canvi sense confirmar en enviar transaccions (per defecte: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Atura l'execució després d'importar blocs del disc (per defecte: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
@@ -3073,10 +2909,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocs de un fitxer blk000??.dat extern</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(per defecte: 1, 1 = mantingues les metadades de les tx, p. ex., el propietari del compte i la informació de sol·licitud de pagament, 2 = descarta les metadades de tx) </translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar aquesta opció moltes vegades</translation>
@@ -3109,10 +2941,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Error: s'ha trobat un argument no permès de -socks. Ja no es pot definir més la versió de SOCKS, només s'accepten els proxies de SOCKS5.ç</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Executa l'ordre quan una tx de xarxa gasta de nou una tx d'entrada del moneder (%s=torna a gastar TxID, %t=TxID del moneder)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executa l'ordre quan es rebi un avís rellevant o veiem una forquilla molt llarga (%s en cmd és reemplaçat per un missatge)</translation>
@@ -3125,14 +2953,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Si no s'ha definit paytxfee, inclou comissió suficient per tal que les transaccions siguin confirmades dins d'una mitja de n blocs (per defecte: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informació de la depuració de sortida (per defecte: 0, proporcionar &lt;category&gt; és opcional)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
@@ -3149,18 +2969,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Avís: comproveu que la data i hora del vostre ordinador siguin correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Posa en la llista blanca els iguals que es connectin de la màscara de xarxa o ip donada. Es pot especificar moltes vegades.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Consulta sempre adreces d'iguals a través de consultes DNS (per defecte: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
@@ -3189,14 +3001,14 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Comissió en (BTC/kB) per afegir a les transaccions que envieu (per defecte: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Inclou adreces IP en la sortida de depuració (per defecte: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>&amp;Informació</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Ha fallat la inicialització de la comprovació de validesa. El Bitcoin Core s'està aturant.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
@@ -3206,41 +3018,29 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Import no vàlid per a -mintxfee=&lt;amount&gt;: «%s»</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Mida límit de la memòria cau de signatura per a &lt;n&gt; entrades (per defecte: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registra la prioritat de transacció i comissió per kB en minar blocs (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manté l'índex sencer de transaccions (per defecte: 0)</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s» (ha de ser com a mínim %s)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Mida màxima del buffer de recepció per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Mida màxima del buffer d'enviament per a cada connexió, &lt;n&gt;*1000 bytes (default: 5000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Només accepta cadenes de blocs que coincideixin amb els punts de prova (per defecte: 1)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Cal especificar un port amb -whitebind: «%s»</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Opcions de transmissió del node:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -3257,22 +3057,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Introdueix incertesa en 1 de cada &lt;n&gt; missatges de la xarxa</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Defineix una mida mínima de bloc en bytes (per defecte: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Defineix el senyal DB_PRIVATE en l'entorn db del moneder (per defecte: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
@@ -3286,12 +3074,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Ha fallat la signatura de la transacció</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especifica el temps limit per a un intent de connexió en mil·lisegons (per defecte: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
+        <source>This is experimental software.</source>
+        <translation>Això és programari experimental.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
@@ -3306,8 +3090,8 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>La transacció és massa gran</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utilitza UPnP per a mapejar els ports d'escolta (per defecte: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>No s'ha pogut vincular a %s en aquest ordinador (la vinculació ha retornat l'error %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
@@ -3361,10 +3145,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualitza el moneder a l'últim format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Defineix el límit de nombre de claus a &lt;n&gt; (per defecte: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
@@ -3373,14 +3153,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utilitza OpenSSL (https) per a connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Fitxer del certificat de servidor (per defecte: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clau privada del servidor (per defecte: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Aquest misatge d'ajuda</translation>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index 2aa017fdf8dc..44fda5afed44 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Panel s listy</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Není dostupný žádný zdroj bloků...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Zpracováno %1 bloků transakční historie.</translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation>%1 a %2</translation>
@@ -900,15 +892,7 @@ Adresa: %4
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB volného místa</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(z potřebných %1 GB)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1149,10 +1133,6 @@ Adresa: %4
         <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>Zobrazené informace nemusí být aktuální. Tvá peněženka se automaticky sesynchronizuje s Bitcoinovou sítí, jakmile se s ní spojí. Zatím ale ještě není synchronizace dokončena.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Peněženka</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Sledované:</translation>
@@ -1205,10 +1185,6 @@ Adresa: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Aktuální stav účtu sledovaných adres</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Poslední transakce&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nesynchronizováno</translation>
@@ -1468,10 +1444,6 @@ Adresa: %4
         <source>Services</source>
         <translation>Služby</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Synchronizační uzel</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Prvotní výška</translation>
@@ -1600,14 +1572,6 @@ Adresa: %4
         <source>Outbound</source>
         <translation>Ven</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Ano</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Ne</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Neznámá</translation>
@@ -2452,6 +2416,10 @@ Adresa: %4
         <source>Mined</source>
         <translation>Vytěženo</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>sledovací</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2678,26 +2646,10 @@ Adresa: %4
         <source>Options:</source>
         <translation>Možnosti:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Konfigurační soubor (výchozí: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>PID soubor (výchozí: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Adresář pro data</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Čekat na spojení na &lt;portu&gt; (výchozí: 8333 nebo testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Povolit nejvýše &lt;n&gt; protějšků (výchozí: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Připojit se k uzlu, získat adresy jeho protějšků a odpojit se</translation>
@@ -2706,18 +2658,6 @@ Adresa: %4
         <source>Specify your own public address</source>
         <translation>Specifikuj svou veřejnou adresu</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Práh pro odpojování zlobivých protějšků (výchozí: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Doba ve vteřinách, po kterou se nebudou moci zlobivé protějšky znovu připojit (výchozí: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Čekat na JSON RPC spojení na &lt;portu&gt; (výchozí: 8332 nebo testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akceptovat příkazy z příkazové řádky a přes JSON-RPC</translation>
@@ -2758,18 +2698,10 @@ Je také doporučeno si nastavit alertnotify, abys byl upozorněn na případné
 například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Akceptovatelné šifry (výchozí: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Kontinuálně omezovat bezpoplatkové transakce na &lt;n&gt;*1000 bajtů za minutu (výchozí: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Smazat všechny transakce peněženky a při startu obnovit pouze relevantní části řetězce bloků pomocí -rescan</translation>
@@ -2790,14 +2722,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Promítnout databázovou aktivitu z paměťového prostoru do záznamu na disku každých &lt;n&gt; megabajtů (výchozí: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Jak moc důkladná má být verifikace bloků -checkblocks (0-4, výchozí: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>V tomto módu -genproclimit určuje, kolik bloků je vygenerováno okamžitě.</translation>
@@ -2806,10 +2730,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Nastavení počtu vláken pro verifikaci skriptů (%u až %d, 0 = automaticky, &lt;0 = nechat daný počet jader volný, výchozí: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Nastavit omezení procesoru pro zapnuté generování (-1 = bez omezení, výchozí: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Tohle je testovací verze – používej ji jen na vlastní riziko, ale rozhodně ji nepoužívej k těžbě nebo pro obchodní aplikace</translation>
@@ -2818,10 +2738,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Nedaří se mi připojit na %s na tomhle počítači. Bitcoin Core už pravděpodobně jednou běží.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru (výchozí: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Upozornění: -paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci.</translation>
@@ -2846,10 +2762,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(výchozí: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(výchozí: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; může být:</translation>
@@ -2878,10 +2790,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Možnosti ladění/testování:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Vypnout bezpečný režim (safemode), překrýt skutečnou událost bezpečného režimu (výchozí: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Zjistit vlastní IP adresu (výchozí: 1, pokud naslouchá a není zadáno -externalip)</translation>
@@ -2918,66 +2826,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Chyba: Peněženka je zamčená, nemohu vytvořit transakci!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Chyba: systémová chyba: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Nepodařilo se naslouchat na žádném portu. Použij -listen=0, pokud to byl tvůj záměr.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Nepodařilo se přečíst informace o bloku</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Nepodařilo se přečíst blok</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Nepodařilo se sesynchronizovat index bloků</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Nepodařilo se zapsat index bloků</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Nepodařilo se zapsat informace o bloku</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Nepodařilo se zapsat blok</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Nepodařilo se zapsat informace o souboru</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Selhal zápis do databáze mincí</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Nepodařilo se zapsat index transakcí</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Nepodařilo se zapsat data o vracení změn</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Vynutit bezpečný mód (výchozí: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generovat mince (výchozí: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Kolik bloků při startu zkontrolovat (výchozí: 288, 0 = všechny)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Pokud není &lt;category&gt; zadána, bude tisknout veškeré ladicí informace.</translation>
@@ -2998,10 +2850,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>Je nedostatek deskriptorů souborů.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Připojit před ladicí výstup časové razítko (výchozí: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Znovu vytvořit index řetězce bloků z aktuálních blk000??.dat souborů</translation>
@@ -3014,22 +2862,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Nastavit maximální velikost bloku v bajtech (výchozí: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Nastavení počtu vláken pro servisní RPC volání (výchozí: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Udej název souboru s peněženkou (v rámci datového adresáře)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Utrácet i ještě nepotvrzené drobné při posílání transakcí (výchozí: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Ukončit se po importu bloků z disku (výchozí: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Tohle je určeno pro nástroje na regresní testování a vyvíjení aplikací.</translation>
@@ -3058,10 +2894,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importovat bloky z externího souboru blk000??.dat</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(výchozí: 1, 1 = ukládat transakční metadata, např. majitele účtu a informace o platebním požadavku, 2 = mazat transakční metadata)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Povolit JSON-RPC spojení ze specifikovaného zdroje. Platnou hodnotou &lt;ip&gt; je jednotlivá IP adresa (např. 1.2.3.4), síť/maska (např. 1.2.3.4/255.255.255.0) nebo síť/CIDR (např. 1.2.3.4/24). Tuto volbu lze použít i vícekrát</translation>
@@ -3098,10 +2930,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Chyba: Byl použit nepodporovaný argument -socks. Nastavení verze SOCKS už není možné, podporovány jsou pouze SOCKS5 proxy.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Spustit příkaz, když nějaká transakce na síti znovu utrácí vstup transakce této peněženky (%s=TxID cizí transakce, %t=TxID transakce peněženky)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Spustit příkaz, když přijde relevantní upozornění nebo když dojde k opravdu dlouhému rozštěpení řetezce bloků (%s se v příkazu nahradí zprávou)</translation>
@@ -3114,14 +2942,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Poplatky (v BTC/Kb) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Pokud paytxfee není nastaveno, platit dostatečný poplatek na to, aby byly transakce potvrzeny v průměru během n bloků (výchozí: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Tisknout ladicí informace (výchozí: 0, zadání &lt;category&gt; je volitelné)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Při nedostatku adres získat další protějšky z DNS (výchozí: 1, pokud není použito -connect)</translation>
@@ -3138,18 +2958,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Upozornění: Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, Bitcoin Core nebude fungovat správně.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Umístit na bílou listinu protějšky připojující se z dané podsítě či ip. Lze zadat i vícekrát.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Na protějšky na bílé listině se nevztahuje DoS klatba a jejich transakce jsou vždy přeposílány, i když už třeba jsou v mempoolu, což je užitečné např. pro bránu</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Vždy získávat adresy dalších protějšků přes DNS (výchozí: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Nemohu přeložit -whitebind adresu: '%s'</translation>
@@ -3178,10 +2990,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Poplatek (v BTC/kB), který se přidá ke každé odeslané transakci (výchozí: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Zaznamenávat do ladicích výstupů i IP adresy (výchozí: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informace</translation>
@@ -3210,26 +3018,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Držet v paměti nejvýše &lt;n&gt; nespojitelných bloků (výchozí: %u)</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Omezit velikost vyrovnávací paměti pro podpisy na &lt;n&gt; položek (výchozí: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Zaznamenávat během těžení bloků prioritu transakce a poplatek za kB (výchozí: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Spravovat úplný index transakcí (výchozí: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximální velikost přijímacího bufferu pro každé spojení, &lt;n&gt;*1000 bajtů (výchozí: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximální velikost odesílacího bufferu pro každé spojení, &lt;n&gt;*1000 bajtů (výchozí: 1000)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>V rámci -whitebind je třeba specifikovat i port: '%s'</translation>
@@ -3238,22 +3026,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Možnosti přeposílání:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Uznávat pouze řetězec bloků, který odpovídá vnitřním kontrolním bodům (výchozí: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Připojit se pouze k uzlům v &lt;net&gt; síti (IPv4, IPv6 nebo Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Vypsat při startu blok,pokud se nachází v indexu bloků</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Vypsat při startu strom bloků (výchozí: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Možnosti SSL pro RPC: (viz instrukce nastavení SSL na Bitcoin Wiki)</translation>
@@ -3270,30 +3046,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Náhodně pozměňovat jednu z každých &lt;n&gt; síťových zpráv</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Přeposílat a těžit transakce nesoucí data (výchozí: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Přeposílat ne-P2SH multisig (výchozí: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Spustit vlákno pročišťující periodicky peněženku (výchozí: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Posílat stopovací/ladicí informace do konzole místo do souboru debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Nastavit minimální velikost bloku v bajtech (výchozí: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Nastavit příznak DB_PRIVATE v databázovém prostředí peněženky (výchozí: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zobrazit všechny možnosti ladění (užití: --help -help-debug)</translation>
@@ -3306,14 +3062,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Nepodařilo se podepsat transakci</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Zadej časový limit spojení v milisekundách (výchozí: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systémová chyba: </translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Tohle je experimentální program.</translation>
@@ -3334,10 +3082,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Nedaří se mi připojit na %s na tomhle počítači (operace bind vrátila chybu %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Použít UPnP k namapování naslouchacího portu (výchozí: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Použít UPnP k namapování naslouchacího portu (výchozí: 1, pokud naslouchá)</translation>
@@ -3390,10 +3134,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Převést peněženku na nejnovější formát</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Nastavit zásobník klíčů na velikost &lt;n&gt; (výchozí: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Přeskenovat řetězec bloků na chybějící transakce tvé pěněženky</translation>
@@ -3402,14 +3142,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Použít OpenSSL (https) pro JSON-RPC spojení</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Soubor se serverovým certifikátem (výchozí: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Soubor se serverovým soukromým klíčem (výchozí: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Tato nápověda</translation>
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index 3380733c6372..cf82f2be27d5 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -154,10 +154,6 @@
         <source>Tabs toolbar</source>
         <translation>Bar offer tabiau</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Gwall</translation>
@@ -285,10 +281,6 @@
         <source>Form</source>
         <translation>Ffurflen</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Trafodion diweddar&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index f292766ec8d1..05ee62e020fc 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -11,7 +11,7 @@
     </message>
     <message>
         <source>&amp;New</source>
-        <translation>Ny</translation>
+        <translation>&amp;Ny</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
@@ -19,15 +19,15 @@
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation>Kopiér</translation>
+        <translation>&amp;Kopiér</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation>Luk</translation>
+        <translation>&amp;Luk</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>Kopiér adresse</translation>
+        <translation>&amp;Kopiér adresse</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
@@ -39,11 +39,11 @@
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>Eksportér</translation>
+        <translation>&amp;Eksportér</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>Slet</translation>
+        <translation>&amp;Slet</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -55,7 +55,7 @@
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation>Vælg</translation>
+        <translation>&amp;Vælg</translation>
     </message>
     <message>
         <source>Sending addresses</source>
@@ -75,11 +75,11 @@
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Kopiér mærkat</translation>
+        <translation>Kopiér &amp;mærkat</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation>Redigér</translation>
+        <translation>&amp;Redigér</translation>
     </message>
     <message>
         <source>Export Address List</source>
@@ -224,7 +224,7 @@
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>Underskriv besked …</translation>
+        <translation>Underskriv &amp;besked …</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
@@ -232,7 +232,7 @@
     </message>
     <message>
         <source>&amp;Overview</source>
-        <translation>Oversigt</translation>
+        <translation>&amp;Oversigt</translation>
     </message>
     <message>
         <source>Node</source>
@@ -244,7 +244,7 @@
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation>Transaktioner</translation>
+        <translation>&amp;Transaktioner</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
@@ -252,7 +252,7 @@
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation>Luk</translation>
+        <translation>&amp;Luk</translation>
     </message>
     <message>
         <source>Quit application</source>
@@ -260,7 +260,7 @@
     </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation>Om Qt</translation>
+        <translation>Om &amp;Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
@@ -268,31 +268,31 @@
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>Indstillinger …</translation>
+        <translation>&amp;Indstillinger …</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>Kryptér tegnebog …</translation>
+        <translation>&amp;Kryptér tegnebog …</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>Sikkerhedskopiér tegnebog …</translation>
+        <translation>&amp;Sikkerhedskopiér tegnebog …</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>Skift adgangskode …</translation>
+        <translation>&amp;Skift adgangskode …</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>Afsendelsesadresser …</translation>
+        <translation>&amp;Afsendelsesadresser …</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>Modtagelsesadresser …</translation>
+        <translation>&amp;Modtagelsesadresser …</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation>Åbn URI …</translation>
+        <translation>&amp;Åbn URI …</translation>
     </message>
     <message>
         <source>Bitcoin Core client</source>
@@ -324,7 +324,7 @@
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>Fejlsøgningsvindue</translation>
+        <translation>&amp;Fejlsøgningsvindue</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
@@ -332,7 +332,7 @@
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>Verificér besked …</translation>
+        <translation>&amp;Verificér besked …</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -344,11 +344,11 @@
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation>Send</translation>
+        <translation>&amp;Send</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>Modtag</translation>
+        <translation>&amp;Modtag</translation>
     </message>
     <message>
         <source>Show information about Bitcoin Core</source>
@@ -356,7 +356,7 @@
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation>Vis / skjul</translation>
+        <translation>&amp;Vis / skjul</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
@@ -376,24 +376,20 @@
     </message>
     <message>
         <source>&amp;File</source>
-        <translation>Fil</translation>
+        <translation>&amp;Fil</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation>Opsætning</translation>
+        <translation>&amp;Opsætning</translation>
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation>Hjælp</translation>
+        <translation>&amp;Hjælp</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
         <translation>Faneværktøjslinje</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnetværk]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -404,7 +400,7 @@
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation>Om Bitcoin Core</translation>
+        <translation>&amp;Om Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -420,7 +416,7 @@
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>Tilvalg for kommandolinje</translation>
+        <translation>Tilvalg for &amp;kommandolinje</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Ingen blokkilde tilgængelig …</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Behandlet %1 blokke af transaktionshistorikken.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
@@ -486,6 +478,10 @@
         <source>Up to date</source>
         <translation>Opdateret</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>%n blok af transaktionshistorikken er blevet behandlet.</numerusform><numerusform>%n blokke af transaktionshistorikken er blevet behandlet.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Indhenter …</translation>
@@ -753,7 +749,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Label</source>
-        <translation>Mærkat</translation>
+        <translation>&amp;Mærkat</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
@@ -765,7 +761,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Address</source>
-        <translation>Adresse</translation>
+        <translation>&amp;Adresse</translation>
     </message>
     <message>
         <source>New receiving address</source>
@@ -916,15 +912,11 @@ Adresse: %4
         <source>Error</source>
         <translation>Fejl</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB fri plads tilgængelig</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(ud af %1 GB behøvet)</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB fri plads tilgængelig</numerusform><numerusform>%n GB fri plads tilgængelig</numerusform></translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -956,7 +948,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation>Generelt</translation>
+        <translation>&amp;Generelt</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
@@ -964,7 +956,7 @@ Adresse: %4
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation>Betal transaktionsgebyr</translation>
+        <translation>Betal transaktions&amp;gebyr</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
@@ -972,11 +964,11 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>Start Bitcoin ved systemlogin</translation>
+        <translation>&amp;Start Bitcoin ved systemlogin</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation>Størrelsen på databasens cache</translation>
+        <translation>Størrelsen på &amp;databasens cache</translation>
     </message>
     <message>
         <source>MB</source>
@@ -984,7 +976,7 @@ Adresse: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation>Antallet af scriptverificeringstråde</translation>
+        <translation>Antallet af script&amp;verificeringstråde</translation>
     </message>
     <message>
         <source>Accept connections from outside</source>
@@ -1000,7 +992,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>Forbind gennem SOCKS-proxy (standard-proxy):</translation>
+        <translation>&amp;Forbind gennem SOCKS-proxy (standard-proxy):</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
@@ -1024,11 +1016,11 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation>Nulstil indstillinger</translation>
+        <translation>&amp;Nulstil indstillinger</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation>Netværk</translation>
+        <translation>&amp;Netværk</translation>
     </message>
     <message>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
@@ -1036,7 +1028,7 @@ Adresse: %4
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation>Tegnebog</translation>
+        <translation>&amp;Tegnebog</translation>
     </message>
     <message>
         <source>Expert</source>
@@ -1044,7 +1036,7 @@ Adresse: %4
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation>Slå egenskaber for coin-styring til</translation>
+        <translation>Slå egenskaber for &amp;coin-styring til</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>
@@ -1052,7 +1044,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation>Brug ubekræftede byttepenge</translation>
+        <translation>&amp;Brug ubekræftede byttepenge</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>
@@ -1060,15 +1052,15 @@ Adresse: %4
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>Konfigurér port vha. UPnP</translation>
+        <translation>Konfigurér port vha. &amp;UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation>Proxy-IP:</translation>
+        <translation>Proxy-&amp;IP:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation>Port:</translation>
+        <translation>&amp;Port:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
@@ -1076,7 +1068,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Window</source>
-        <translation>Vindue</translation>
+        <translation>&amp;Vindue</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
@@ -1084,7 +1076,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>Minimér til statusfeltet i stedet for proceslinjen</translation>
+        <translation>&amp;Minimér til statusfeltet i stedet for proceslinjen</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 Quit in the menu.</source>
@@ -1092,15 +1084,15 @@ Adresse: %4
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation>Minimér ved lukning</translation>
+        <translation>M&amp;inimér ved lukning</translation>
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation>Visning</translation>
+        <translation>&amp;Visning</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>Sprog for brugergrænseflade:</translation>
+        <translation>&amp;Sprog for brugergrænseflade:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
@@ -1108,7 +1100,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation>Enhed at vise beløb i:</translation>
+        <translation>&amp;Enhed at vise beløb i:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
@@ -1120,11 +1112,11 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation>OK</translation>
+        <translation>&amp;O.k.</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation>Annullér</translation>
+        <translation>&amp;Annullér</translation>
     </message>
     <message>
         <source>default</source>
@@ -1165,10 +1157,6 @@ Adresse: %4
         <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>Den viste information kan være forældet. Din tegnebog synkroniserer automatisk med Bitcoin-netværket, når en forbindelse etableres, men denne proces er ikke gennemført endnu.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Tegnebog</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Kigge:</translation>
@@ -1197,6 +1185,10 @@ Adresse: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Minet saldo, som endnu ikke er modnet</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldi:</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1209,6 +1201,14 @@ Adresse: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Din nuværende saldo på kigge-adresser</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Spendérbar:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Nylige transaktioner</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Ubekræftede transaktioner til kigge-adresser</translation>
@@ -1221,10 +1221,6 @@ Adresse: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Nuværende totalsaldo på kigge-adresser</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Nyeste transaktioner&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>ikke synkroniseret</translation>
@@ -1379,11 +1375,11 @@ Adresse: %4
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>Gem billede …</translation>
+        <translation>&amp;Gem billede …</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation>Kopiér foto</translation>
+        <translation>&amp;Kopiér foto</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1410,7 +1406,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>Information</translation>
+        <translation>&amp;Information</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1462,7 +1458,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Peers</source>
-        <translation>Andre knuder</translation>
+        <translation>Andre &amp;knuder</translation>
     </message>
     <message>
         <source>Select a peer to view detailed information.</source>
@@ -1484,10 +1480,6 @@ Adresse: %4
         <source>Services</source>
         <translation>Tjenester</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Synkroniseringsknude</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Starthøjde</translation>
@@ -1530,19 +1522,19 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Open</source>
-        <translation>Åbn</translation>
+        <translation>&amp;Åbn</translation>
     </message>
     <message>
         <source>&amp;Console</source>
-        <translation>Konsol</translation>
+        <translation>&amp;Konsol</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation>Netværkstrafik</translation>
+        <translation>&amp;Netværkstrafik</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation>Ryd</translation>
+        <translation>&amp;Ryd</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1616,14 +1608,6 @@ Adresse: %4
         <source>Outbound</source>
         <translation>Udgående</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Nej</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Ukendt</translation>
@@ -1637,15 +1621,15 @@ Adresse: %4
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation>Beløb:</translation>
+        <translation>&amp;Beløb:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>Mærkat:</translation>
+        <translation>&amp;Mærkat:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation>Besked:</translation>
+        <translation>&amp;Besked:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
@@ -1653,7 +1637,7 @@ Adresse: %4
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation>Genbrug en eksisterende modtagelsesadresse (anbefales ikke)</translation>
+        <translation>&amp;Genbrug en eksisterende modtagelsesadresse (anbefales ikke)</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
@@ -1685,7 +1669,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation>Anmod om betaling</translation>
+        <translation>&amp;Anmod om betaling</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
@@ -1724,15 +1708,15 @@ Adresse: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Kopiér URI</translation>
+        <translation>Kopiér &amp;URI</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>Kopiér adresse</translation>
+        <translation>Kopiér &amp;adresse</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>Gem billede …</translation>
+        <translation>&amp;Gem billede …</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1866,7 +1850,7 @@ Adresse: %4
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation>Tilføj modtager</translation>
+        <translation>Tilføj &amp;modtager</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
@@ -1878,7 +1862,7 @@ Adresse: %4
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Ryd alle</translation>
+        <translation>Ryd &amp;alle</translation>
     </message>
     <message>
         <source>Balance:</source>
@@ -1890,7 +1874,7 @@ Adresse: %4
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation>Afsend</translation>
+        <translation>&amp;Afsend</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
@@ -1993,11 +1977,11 @@ Adresse: %4
     <name>SendCoinsEntry</name>
     <message>
         <source>A&amp;mount:</source>
-        <translation>Beløb:</translation>
+        <translation>&amp;Beløb:</translation>
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation>Betal til:</translation>
+        <translation>Betal &amp;til:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
@@ -2005,7 +1989,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>Mærkat:</translation>
+        <translation>&amp;Mærkat:</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2083,7 +2067,7 @@ Adresse: %4
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>Underskriv besked</translation>
+        <translation>&amp;Underskriv besked</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
@@ -2127,7 +2111,7 @@ Adresse: %4
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation>Underskriv besked</translation>
+        <translation>Underskriv &amp;besked</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
@@ -2135,11 +2119,11 @@ Adresse: %4
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Ryd alle</translation>
+        <translation>Ryd &amp;alle</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation>Verificér besked</translation>
+        <translation>&amp;Verificér besked</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
@@ -2155,7 +2139,7 @@ Adresse: %4
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation>Verificér besked</translation>
+        <translation>Verificér &amp;besked</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
@@ -2472,6 +2456,10 @@ Adresse: %4
         <source>Mined</source>
         <translation>Minet</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>kigge</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2488,6 +2476,10 @@ Adresse: %4
         <source>Type of transaction.</source>
         <translation>Transaktionstype.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Afgør hvorvidt en kigge-adresse er involveret i denne transaktion.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Destinationsadresse for transaktion.</translation>
@@ -2583,6 +2575,10 @@ Adresse: %4
         <source>Export Transaction History</source>
         <translation>Historik for eksport af transaktioner</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Kigge</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Eksport mislykkedes</translation>
@@ -2661,7 +2657,7 @@ Adresse: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>Eksportér</translation>
+        <translation>&amp;Eksportér</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -2698,26 +2694,10 @@ Adresse: %4
         <source>Options:</source>
         <translation>Indstillinger:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Angiv konfigurationsfil (standard: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Angiv pid-fil (default: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Angiv datamappe</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Lyt til forbindelser på &lt;port&gt; (standard: 8333 eller testnetværk: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Oprethold højest &lt;n&gt; forbindelser til andre knuder i netværket (standard: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Forbind til en knude for at modtage adresser på andre knuder, og afbryd derefter</translation>
@@ -2726,18 +2706,6 @@ Adresse: %4
         <source>Specify your own public address</source>
         <translation>Angiv din egen offentlige adresse</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Grænse for frakobling fra andre knuder, der opfører sig dårligt (standard: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Antal sekunder, som andre knuder der opfører sig dårligt, skal vente før reetablering af forbindelse (standard: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Lyt til JSON-RPC-forbindelser på &lt;port&gt; (standard: 8332 eller testnetværk: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Acceptér kommandolinje- og JSON-RPC-kommandoer</translation>
@@ -2778,18 +2746,10 @@ Det anbefales også at angive alertnotify, så du påmindes om problemer;
 fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Accepterede krypteringer (standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Tildel til den givne adresse og lyt altid på den. Brug [vært]:port-notation for IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Rate-begræns kontinuerligt frie transaktioner til &lt;n&gt;*1000 byte i minuttet (standard:15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Slet alle transaktioner i tegnebogen og genskab kun disse dele af blokkæden gennem -rescan under opstart</translation>
@@ -2810,14 +2770,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Flyt databaseaktivitet fra hukommelsespulje til disklog hver &lt;n&gt; megabytes (standard: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Hvor gennemarbejdet blokverificeringen for -checkblocks er (0-4; standard: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>I denne tilstand styrer -genproclimit hvor mange blokke, der genereres med det samme.</translation>
@@ -2826,10 +2778,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Sæt antallet af scriptverificeringstråde (%u til %d, 0 = auto, &lt;0 = efterlad det antal kernet fri, standard: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Sæt processorbegrænsning for når generering er slået til (-1 = ubegrænset, standard: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Dette er en foreløbig testudgivelse - brug på eget ansvar - brug ikke til udvinding eller handelsprogrammer</translation>
@@ -2838,10 +2786,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Ikke i stand til at tildele til %s på denne computer. Bitcoin Core kører sansynligvis allerede.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Brug separat SOCS5-proxy for at nå andre knuder via tjenester skjult med Tor (standard: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Advarsel: -paytxfee er sat meget højt! Dette er det gebyr du vil betale, hvis du sender en transaktion.</translation>
@@ -2863,12 +2807,12 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Advarsel: wallet.dat ødelagt, data reddet! Oprindelig wallet.dat gemt som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaktioner er forkert, bør du genskabe fra en sikkerhedskopi.</translation>
     </message>
     <message>
-        <source>(default: 1)</source>
-        <translation>(standard: 1)</translation>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Sæt andre knuder, der forbinder fra den angivne netmaske eller IP, på hvidliste. Kan angives flere gange.</translation>
     </message>
     <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(standard: wallet.dat)</translation>
+        <source>(default: 1)</source>
+        <translation>(standard: 1)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2898,10 +2842,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Tilvalg for fejlfinding/test:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Slå sikker tilstand fra, tilsidesæt hændelser fra sikker tilstand (standard: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Find egen IP-adresse (standard: 1 når lytter og ingen -externalip)</translation>
@@ -2930,6 +2870,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Åbning af blokdatabase mislykkedes</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Fejl: En fatal intern fejl opstod; se debug.log for detaljer</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Fejl: Mangel på ledig diskplads!</translation>
@@ -2938,66 +2882,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Fejl: Tegnebog låst, kan ikke oprette transaktion!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Fejl: systemfejl: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Lytning på enhver port mislykkedes. Brug -listen=0, hvis du ønsker dette.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Læsning af blokinformation mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Læsning af blok mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Synkronisering af blokindeks mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Skrivning af blokindeks mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Skrivning af blokinformation mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Skrivning af blok mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Skriving af filinformation mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Skrivning af bitcoin-database mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Skrivning af transaktionsindeks mislykkedes</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Skrivning af genskabelsesdata mislykkedes</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Gennemtving sikker tilstand (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generér bitcoins (standard: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Antal blokke som tjekkes ved opstart (standard: 288, 0=alle)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Hvis &lt;kategori&gt; ikke angives, udskriv al fejlsøgningsinformation.</translation>
@@ -3019,8 +2907,8 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>For få tilgængelige fildeskriptorer.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Føj tidsstempel foran fejlsøgningsoutput (standard: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Tilslut kun til knuder i netværk &lt;net&gt; (IPv4, IPv6 eller Onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3034,26 +2922,18 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Sæt maksimum blokstørrelse i byte (standard: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Angiv antallet af tråde til at håndtere RPC-kald (standard: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Angiv tegnebogsfil (inden for datamappe)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Brug ubekræftede byttepenge under afsendelse af transaktioner (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Stop kørsel efter import af blokke fra disk (standard: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>This is intended for regression testing tools and app development.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Brug UPnP til at konfigurere den lyttende port (standard: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificerer blokke …</translation>
@@ -3078,10 +2958,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerer blokke fra ekstern blk000??.dat fil</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(standard: 1, 1 = behold metadata for transaktion, fx kontoindehaver og information om betalingsanmodning, 2 = drop metadata for transaktion)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Tillad JSON-RPC-forbindelser fra angivet kilde. Gyldig for &lt;ip&gt; er en enkelt IP (fx 1.2.3.4), et netværk/netmaske (fx 1.2.3.4/255.255.255.0) eller et netværk/CIDR (fx 1.2.3.4/24). Dette tilvalg kan angives flere gange</translation>
@@ -3102,6 +2978,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Kan ikke opnå en lås på datamappe %s. Bitcoin Core kører sansynligvis allerede.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Rate-begræns kontinuerligt gratis transaktioner til &lt;n&gt;*1000 byte i minuttet (standard: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Opret nye filer med systemstandard for rettigheder i stedet for umask 077 (kun virksomt med tegnebogsfunktionalitet slået fra)</translation>
@@ -3118,10 +2998,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Fejl: Ikke understøttet argument -socks blev fundet. Det er ikke muligt at angive SOCKS-version længere, da kun SOCKS5-proxier er understøttet.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Udfør kommando når en netværkstransaktion genspenderer input fra tegnebogstransaktion (%s=transaktions-ID fra genspendering, %t=transaktions-ID fra tegnebog)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Udfør kommando, når en relevant alarm modtages eller vi ser en virkelig lang udsplitning (%s i cmd erstattes af besked)</translation>
@@ -3134,14 +3010,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre end dette opfattes som nulgebyr for oprettelse af transaktion (standard: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Hvis paytxfee ikke er angivet, inkludér da nok gebyr til at transaktioner gennemsnitligt bekræftes inden for n blokke (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Udskriv fejlsøgningsinformation (standard: 0, angivelse af &lt;kategori&gt; er valgfri)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Forespørgsel</translation>
@@ -3158,18 +3026,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Advarsel: Undersøg venligst at din computers dato og klokkeslet er korrekt indstillet! Hvis der er fejl i disse vil Bitcoin Core ikke fungere korrekt.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Sæt andre knuder, der forbinder fra den angivne netmaske eller ip, på hvidliste. Kan angives flere gange.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Andre knuder på hvidliste kan ikke DoS-bandlyses, og deres transaktioner videresendes altid, selv hvis de allerede er i mempool'en. Brugbart til fx et adgangspunkt</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Forespørg altid adresser på andre knuder via DNS-opslag (default: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan ikke løse -whitebind adresse: "%s"</translation>
@@ -3198,10 +3058,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Gebyr (i BTC/kB) som skal føjes til transaktioner, du sender (standard: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Inkludér IP-adresser i fejlretningsoutput (standard: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Information</translation>
@@ -3231,24 +3087,8 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Behold højest &lt;n&gt; uforbindelige blokke i hukommelsen (standard: %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Begræns størrelsen på signaturcache til &lt;n&gt; indgange (standard: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Prioritet for transaktionslog og gebyr pr. kB under udvinding af blokke (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Vedligehold et komplet transaktionsindeks (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksimum for modtagelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksimum for afsendelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Behold højest &lt;n&gt; uforbindelige transaktioner i hukommelsen (standard: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3258,22 +3098,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Videresendelsesvalgmuligheder for knude:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Acceptér kun blokkæde, som matcher indbyggede kontrolposter (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Tilslut kun til knuder i netværk &lt;net&gt; (IPv4, IPv6 eller Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Udskriv blok under opstart, hvis den findes i blokindeks</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Udskriv bloktræ under startop (standard: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Tilvalg for RPC SSL: (se Bitcoin Wiki for instruktioner i SSL-opstart)</translation>
@@ -3290,30 +3118,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Slør tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Videresend og mine databærer-transaktioner (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Videresend ikke-P2SH multisig (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kør en tråd for at rydde tegnebog periodisk (standard: 1)</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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Angiv minimumsblokstørrelse i byte (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Sætter DB_PRIVATE-flaget i tegnebogens db-miljø (standard: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle tilvalg for fejlsøgning (brug: --help -help-debug)</translation>
@@ -3326,14 +3134,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Underskrift af transaktion mislykkedes</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Angiv tilslutningstimeout i millisekunder (standard: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systemfejl: </translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Dette er eksperimentelt software.</translation>
@@ -3354,10 +3154,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Ikke i stand til at tildele til %s på denne computer (bind returnerede fejl %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Brug UPnP til at konfigurere den lyttende port (standard: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Brug UPnP til at konfigurere den lyttende port (standard: 1 under lytning)</translation>
@@ -3410,10 +3206,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Opgrader tegnebog til seneste format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Angiv nøglepoolstørrelse til &lt;n&gt; (standard: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Gennemsøg blokkæden for manglende tegnebogstransaktioner</translation>
@@ -3422,14 +3214,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Brug OpenSSL (https) for JSON-RPC-forbindelser</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Servercertifikat-fil (standard: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Serverens private nøgle (standard: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Denne hjælpebesked</translation>
@@ -3446,14 +3230,184 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fejl ved indlæsning af wallet.dat: Tegnebog ødelagt</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = behold metadata for transaktion, fx kontoindehaver og information om betalingsanmodning, 2 = drop metadata for transaktion)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Flyt databaseaktivitet fra hukommelsespulje til disklog hver &lt;n&gt; megabyte (standard: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Hvor gennemarbejdet blokverificeringen for -checkblocks er (0-4; standard: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Hvis paytxfee ikke er angivet, inkludér da nok gebyr til at transaktioner gennemsnitligt bekræftes inden for n blokke (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Prioritet for transaktionslog og gebyr pr. kB under udvinding af blokke (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Vedligehold et komplet transaktionsindeks, der bruges af rpc-kaldet getrawtransaction (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Antal sekunder, som knuder der opfører sig upassende, skal vente før reetablering (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Udskriv fejlsøgningsinformation (standard: %u, angivelse af &lt;kategori&gt; er valgfri)</translation>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation>Sæt processorbegrænsning for når generering er slået til (-1 = ubegrænset, standard: %d)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Brug separat SOCS5-proxy for at nå andre knuder via Tor skjulte tjenester (standard: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(standard: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Accepterede kodninger (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Forespørg altid adresser på andre knuder via DNS-opslag (default: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Slå sikker tilstand fra, tilsidesæt hændelser fra sikker tilstand (standard: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fejl ved indlæsning af wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Gennemtving sikker tilstand (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generér bitcoins (standard: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Antal blokke som tjekkes ved opstart (standard: %u, 0 = alle)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inkludér IP-adresser i fejlretningsoutput (standard: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ugyldig -proxy adresse: "%s"</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Begræns størrelsen på signaturcache til &lt;n&gt; indgange (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lyt efter JSON-RPC-forbindelser på &lt;port&gt; (standard: %u eller testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lyt efter forbindelser på &lt;port&gt; (standard: %u eller testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Oprethold højest &lt;n&gt; forbindelser til andre knuder (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksimum for modtagelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksimum for afsendelsesbuffer pr. forbindelse, &lt;n&gt;*1000 byte (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Acceptér kun indbyggede kontrolposter, der matcher blokkæden (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Føj tidsstempel foran fejlsøgningsoutput (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Udskriv bloktræ under opstart (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Videresend og udvind databærer-transaktioner (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Videresend ikke-P2SH multisig (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Kør en tråd for periodisk at rydde tegnebog (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Servercertifikat-fil (standard: %s)
+</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Serverens private nøgle (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Sæt nøglepuljestørrelse til &lt;n&gt; (standard: %u)
+</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Angiv minimumsblokstørrelse i byte (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Angiv antallet af tråde til at håndtere RPC-kald (standard: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Sætter DB_PRIVATE-flaget i tegnebogens db-miljø (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Angiv konfigurationsfil (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Angiv tilslutningstimeout i millisekunder (minimum: 1, standard: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Angiv pid-fil (standard: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Brug ubekræftede byttepenge under afsendelse af transaktioner (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Stop kørsel efter import af blokke fra disk (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Grænse for afbrydelse af forbindelse til knuder, der opfører sig upassende (standard: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Ukendt netværk anført i -onlynet: "%s"</translation>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 667f0eb23999..8bc1c046a1f3 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Registerkartenleiste</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[Testnetz]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Keine Blockquelle verfügbar...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
@@ -915,13 +907,13 @@ Adresse: %4</translation>
         <source>Error</source>
         <translation>Fehler</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB freier Speicherplatz verfügbar</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB freier Speicherplatz verfügbar</numerusform><numerusform>%n GB freier Speicherplatz verfügbar</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(von benötigten %1GB)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(von benötigtem %n GB)</numerusform><numerusform>(von benötigten %n GB)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -1164,10 +1156,6 @@ Adresse: %4</translation>
         <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>Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Wallet wird automatisch synchronisiert, nachdem eine Verbindung zum Bitcoin-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Wallet</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Beobachtet:</translation>
@@ -1196,6 +1184,10 @@ Adresse: %4</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Erarbeiteter Betrag der noch nicht gereift ist</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Kontostände</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Gesamtbetrag:</translation>
@@ -1208,6 +1200,14 @@ Adresse: %4</translation>
         <source>Your current balance in watch-only addresses</source>
         <translation>Ihr aktueller Kontostand beobachteter Adressen</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Verfügbar:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Letzte Transaktionen</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Unbestätigte Transaktionen von beobachteten Adressen</translation>
@@ -1220,10 +1220,6 @@ Adresse: %4</translation>
         <source>Current total balance in watch-only addresses</source>
         <translation>Aktueller Gesamtbetrag in beobachteten Adressen aus obigen Kategorien</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Letzte Transaktionen&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nicht synchron</translation>
@@ -1483,10 +1479,6 @@ Adresse: %4</translation>
         <source>Services</source>
         <translation>Dienste</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Sync-Knoten</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Start-Höhe</translation>
@@ -1615,14 +1607,6 @@ Adresse: %4</translation>
         <source>Outbound</source>
         <translation>ausgehend</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Nein</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Unbekannt</translation>
@@ -2471,6 +2455,10 @@ Adresse: %4</translation>
         <source>Mined</source>
         <translation>Erarbeitet</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>beobachtet</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(k.A.)</translation>
@@ -2487,6 +2475,10 @@ Adresse: %4</translation>
         <source>Type of transaction.</source>
         <translation>Art der Transaktion</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Zeigt an, ob eine beobachtete Adresse in diese Transaktion involviert ist.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Zieladresse der Transaktion.</translation>
@@ -2582,6 +2574,10 @@ Adresse: %4</translation>
         <source>Export Transaction History</source>
         <translation>Transaktionsverlauf exportieren</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Beobachtet</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Exportieren fehlgeschlagen</translation>
@@ -2697,26 +2693,10 @@ Adresse: %4</translation>
         <source>Options:</source>
         <translation>Optionen:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Konfigurationsdatei festlegen (Standard: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>PID-Datei festlegen (Standard: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Datenverzeichnis festlegen</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>&lt;port&gt; nach Verbindungen abhören (Standard: 8333 oder Testnetz: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Mit dem angegebenen Knoten verbinden, um Adressen von Gegenstellen abzufragen, danach trennen</translation>
@@ -2725,18 +2705,6 @@ Adresse: %4</translation>
         <source>Specify your own public address</source>
         <translation>Die eigene öffentliche Adresse angeben</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>&lt;port&gt; nach JSON-RPC-Verbindungen abhören (Standard: 8332 oder Testnetz: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Kommandozeilen- und JSON-RPC-Befehle annehmen</translation>
@@ -2777,17 +2745,9 @@ Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachricht
 zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Zulässige Chiffren (Standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Schreibweise verwenden</translation>
-    </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Anzahl der freien Transaktionen auf &lt;n&gt; * 1000 Byte pro Minute begrenzen (Standard: 15)</translation>
+        <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Notation verwenden</translation>
     </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
@@ -2807,15 +2767,7 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die TxID ersetzt)</translation>
-    </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: 3)</translation>
+        <translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die Transaktions-ID ersetzt)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
@@ -2825,10 +2777,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <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>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Legt ein Prozessor-/CPU-Kernlimit fest, wenn CPU-Mining aktiviert ist (-1 = unbegrenzt, Standard: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</translation>
@@ -2837,10 +2785,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Kann auf diesem Computer nicht an %s binden, da Bitcoin Core wahrscheinlich bereits gestartet wurde.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
@@ -2865,10 +2809,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>(default: 1)</source>
         <translation>(Standard: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(Standard: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; kann sein:</translation>
@@ -2897,10 +2837,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Debugging-/Testoptionen:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Sicherheitsmodus deaktivieren, übergeht ein echtes Sicherheitsmodusereignis (Standard: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation>
@@ -2929,6 +2865,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error opening block database</source>
         <translation>Fehler beim Öffnen der Blockdatenbank</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Fehler: Ein schwerer Fehler ist aufgetreten, für Details debug.log ansehen.</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Fehler: Zu wenig freier Speicherplatz auf dem Datenträger!</translation>
@@ -2937,66 +2877,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Fehler: Wallet gesperrt, Transaktion kann nicht erstellt werden!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Fehler: Systemfehler: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Lesen der Blockinformationen fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Lesen des Blocks fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Synchronisation des Blockindex fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Schreiben des Blockindex fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Schreiben der Blockinformationen fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Schreiben des Blocks fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Schreiben der Dateiinformationen fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Schreiben in die Münzendatenbank fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Schreiben des Transaktionsindex fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Sicherheitsmodus erzwingen (Standard: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Bitcoins erzeugen (Standard: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Wieviele Blöcke beim Starten geprüft werden sollen (Standard: 288, 0 = alle)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Wenn &lt;category&gt; nicht angegeben wird, jegliche Debugginginformationen ausgeben.</translation>
@@ -3018,8 +2902,8 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <translation>Nicht genügend Datei-Deskriptoren verfügbar.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Nur zu Knoten des Netzwerktyps &lt;net&gt; verbinden (ipv4, ipv6 oder onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3033,26 +2917,18 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Maximale Blockgröße in Byte festlegen (Standard: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Wallet-Datei angeben (innerhalb des Datenverzeichnisses)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Unbestätigtes Wechselgeld beim Senden von Transaktionen ausgeben (Standard: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Beenden, nachdem Blöcke vom Datenträger importiert wurden (Standard: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verifiziere Blöcke...</translation>
@@ -3078,13 +2954,33 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <translation>Blöcke aus externer Datei blk000??.dat importieren</translation>
     </message>
     <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(Standard: 1, 1 = TX-Metadaten wie z.B. Accountbesitzer und Zahlungsanforderungsinformationen behalten, 2 = TX-Metadaten verwerfen)</translation>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>JSON-RPC-Verbindungen von der angegeben Quelle erlauben. Gültig für &lt;ip&gt; ist eine einzelne IP-Adresse (z.B. 1.2.3.4), ein Netzwerk bzw. eine Netzmaske (z.B. 1.2.3.4/255.255.255.0), oder die CIDR-Notation (z.B. 1.2.3.4/24). Kann mehrmals angegeben werden.</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Beim Einrichten der abzuhörenden RPC-Adresse %s auf Port %u ist ein Fehler aufgetreten: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>An die angegebene Adresse binden und Gegenstellen, die sich dorthin verbinden, immer zulassen. Für IPv6 "[Host]:Port"-Notation verwenden</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>An die angegebene Adresse binden und nach eingehenden JSON-RPC-Verbindungen abhören. Für IPv6 "[Host]:Port"-Notation verwenden. Kann mehrmals angegeben werden. (Standard: an alle Schnittstellen binden)</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Datenverzeichnis %s kann nicht gesperrt werden, da Bitcoin Core wahrscheinlich bereits gestartet wurde.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Anzahl der freien Transaktionen auf &lt;n&gt; * 1000 Byte pro Minute begrenzen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Neue Dateien mit Standard-Systemrechten erzeugen, anstatt mit umask 077 (nur mit deaktivierter Walletfunktion nutzbar)</translation>
+    </message>
     <message>
         <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
         <translation>Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
@@ -3103,15 +2999,15 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
     </message>
     <message>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
-        <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Vermittlung als gebührenfrei angesehen (Standard: %s)</translation>
+        <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Weiterleitung als gebührenfrei angesehen (Standard: %s)</translation>
     </message>
     <message>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s)</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Debugginginformationen ausgeben (Standard: 0, &lt;category&gt; anzugeben ist optional)</translation>
+        <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>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
@@ -3123,7 +3019,15 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
     </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>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Bitcoin Core ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
+        <translation>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Bitcoin Core ansonsten nicht ordnungsgemäß funktionieren wird.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>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>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Kann Adresse in -whitebind nicht auflösen: '%s'</translation>
     </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
@@ -3145,10 +3049,18 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Fehler: Nicht unterstütztes Argument -tor gefunden, bitte -onion verwenden.</translation>
     </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Gebühr (in BTC/kB), die von Ihnen gesendeten Transaktionen hinzugefügt wird (Standard: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Hinweis</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Initialisierungsplausibilitätsprüfung fehlgeschlagen. Bitcoin Core wird beendet.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -3158,45 +3070,33 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <translation>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Größe des Signaturcaches auf &lt;n&gt; Einträge begrenzen (Standard: 50000)</translation>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: '%s' (muss mindestens %s sein)</translation>
     </message>
     <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: 0)</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ungültige Netzmaske angegeben in -whitelist: '%s'</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Einen vollständigen Transaktionsindex führen (Standard: 0)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Maximal &lt;n&gt; nicht-verbindbare Blöcke im Speicher halten (Standard: %u)</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximale Größe des Empfangspuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: 5000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Maximal &lt;n&gt; nicht-verbindbare Transaktionen im Speicher halten (Standard: %u)</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximale Größe des Sendepuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: 1000)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Angabe eines Ports benötigt für -whitebind: '%s'</translation>
     </message>
     <message>
         <source>Node relay options:</source>
-        <translation>Knoten-Vermittlungsoptionen:</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Blockkette nur als gültig ansehen, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Verbinde nur zu Knoten des Netztyps &lt;net&gt; (IPv4, IPv6 oder Tor)</translation>
+        <translation>Knoten-Weiterleitungsoptionen:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Block beim Starten ausgeben, wenn dieser im Blockindex gefunden wurde.</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Blockbaum beim Starten ausgeben (Standard: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC-SSL-Optionen (siehe Bitcoin-Wiki für SSL-Einrichtung):</translation>
@@ -3213,22 +3113,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwürfeln</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Einen Thread starten, der periodisch die Wallet sicher auf den Datenträger schreibt (Standard: 1)</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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>DB_PRIVATE-Flag in der Wallet-Datenbankumgebung setzen (Standard: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zeige alle Debuggingoptionen (Benutzung: --help -help-debug)</translation>
@@ -3241,14 +3129,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Signierung der Transaktion fehlgeschlagen</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Verbindungzeitüberschreitung in Millisekunden festlegen (Standard: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systemfehler: </translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Dies ist experimentelle Software.</translation>
@@ -3266,8 +3146,8 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <translation>Transaktion zu groß</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Kann auf diesem Computer nicht an %s binden (bind meldete Fehler %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
@@ -3321,10 +3201,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Wallet auf das neueste Format aktualisieren</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Blockkette erneut nach fehlenden Wallet-Transaktionen durchsuchen</translation>
@@ -3333,14 +3209,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serverzertifikat (Standard: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Privater Serverschlüssel (Standard: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Dieser Hilfetext</translation>
@@ -3357,14 +3225,162 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fehler beim Laden von wallet.dat: Wallet beschädigt</translation>
     </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Einen vollständigen Transaktionsindex führen, der vom RPC-Befehl "getrawtransaction" genutzt wird (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Debugginginformationen ausgeben (Standard: %u, &lt;category&gt; anzugeben ist optional)</translation>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation>Legt ein Prozessor-/CPU-Kernlimit fest, wenn CPU-Mining aktiviert ist (-1 = unbegrenzt, Standard: %d)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Zulässige Chiffren (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Sicherheitsmodus deaktivieren, übergeht ein echtes Sicherheitsmodusereignis (Standard: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fehler beim Laden von wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Sicherheitsmodus erzwingen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Bitcoins erzeugen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Wieviele Blöcke beim Starten geprüft werden sollen (Standard: %u, 0 = alle)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>IP-Adressen in Debugausgabe einschließen (Standard: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ungültige Adresse in -proxy: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Größe des Signaturcaches auf &lt;n&gt; Einträge begrenzen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>&lt;port&gt; nach JSON-RPC-Verbindungen abhören (Standard: %u oder Testnetz: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximale Größe des Empfangspuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximale Größe des Sendepuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Blockkette nur als gültig ansehen, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Blockbaum beim Starten ausgeben (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>"Data Carrier"-Transaktionen weiterleiten und erarbeiten (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Nicht-"P2SH-Multisig" weiterleiten (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Einen Thread starten, der periodisch die Wallet sicher auf den Datenträger schreibt (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Serverzertifikat (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Privater Serverschlüssel (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Minimale Blockgröße in Byte festlegen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>"DB_PRIVATE"-Flag in der Wallet-Datenbankumgebung setzen (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Konfigurationsdatei festlegen (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Verbindungzeitüberschreitung in Millisekunden festlegen (Minimum: 1, Standard: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>PID-Datei festlegen (Standard: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Unbestätigtes Wechselgeld darf beim Senden von Transaktionen ausgegeben werden (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index d5e9b57d99a7..b4e15ae2dfba 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -351,10 +351,6 @@
         <source>Tabs toolbar</source>
         <translation>Εργαλειοθήκη καρτελών</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -383,10 +379,6 @@
         <source>No block source available...</source>
         <translation>Η πηγή του μπλοκ δεν ειναι διαθέσιμη... </translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Έγινε λήψη %1 μπλοκ ιστορικού συναλλαγών</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n ώρες </numerusform><numerusform>%n ώρες </numerusform></translation>
@@ -609,6 +601,10 @@ Address: %4
         <source>no</source>
         <translation>όχι</translation>
     </message>
+    <message>
+        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
+        <translation>Η ετικετα γινετε κοκκινη , αν το μεγεθος της συναλαγης ειναι μεγαλητερο απο 1000 bytes.</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(χωρίς ετικέτα)</translation>
@@ -766,15 +762,7 @@ Address: %4
         <source>Error</source>
         <translation>Σφάλμα</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB ελεύθερου χώρου διαθέσιμα</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(από τα %1GB που χρειάζονται)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     </context>
@@ -923,10 +911,6 @@ Address: %4
         <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>Οι πληροφορίες που εμφανίζονται μπορεί να είναι ξεπερασμένες. Το πορτοφόλι σας συγχρονίζεται αυτόματα με το δίκτυο Bitcoin μετά από μια σύνδεση, αλλά αυτή η διαδικασία δεν έχει ακόμη ολοκληρωθεί. </translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Πορτοφόλι</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Διαθέσιμο:</translation>
@@ -955,10 +939,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>Το τρέχον συνολικό υπόλοιπο</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Πρόσφατες συναλλαγές&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>εκτός συγχρονισμού</translation>
@@ -2052,26 +2032,10 @@ Address: %4
         <source>Options:</source>
         <translation>Επιλογές:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Ορίστε αρχείο ρυθμίσεων (προεπιλογή: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Ορίστε αρχείο pid (προεπιλογή: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Ορισμός φακέλου δεδομένων</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Εισερχόμενες συνδέσεις στη θύρα &lt;port&gt; (προεπιλογή: 8333 ή στο testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Μέγιστες αριθμός συνδέσεων με τους peers &lt;n&gt; (προεπιλογή: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Σύνδεση σε έναν κόμβο για την ανάκτηση διευθύνσεων από ομοτίμους, και αποσυνδέσh</translation>
@@ -2080,18 +2044,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Διευκρινίστε τη δικιά σας δημόσια διεύθυνση.</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Όριο αποσύνδεσης προβληματικών peers (προεπιλογή: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Δευτερόλεπτα πριν επιτραπεί ξανά η σύνδεση των προβληματικών peers (προεπιλογή: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Εισερχόμενες συνδέσεις JSON-RPC στη θύρα &lt;port&gt; (προεπιλογή: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Αποδοχή εντολών κονσόλας και JSON-RPC</translation>
@@ -2169,10 +2121,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(προεπιλογή: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(προεπιλογή: wallet.dat)</translation>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Προσπάθεια για ανακτησει ιδιωτικων κλειδιων από ενα διεφθαρμένο αρχειο wallet.dat </translation>
@@ -2225,62 +2173,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Σφάλμα: το πορτοφόλι είναι κλειδωμένο, δεν μπορεί να δημιουργηθεί συναλλαγή</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Λάθος: λάθος συστήματος:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ταλαιπωρηθειτε για να ακούσετε σε οποιαδήποτε θύρα. Χρήση - ακούστε = 0 , αν θέλετε αυτό.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Αποτυχία αναγνωσης των block πληροφοριων</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Η αναγνωση του μπλοκ απετυχε</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Ο συγχρονισμος του μπλοκ ευρετηριου απετυχε</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Η δημιουργια του μπλοκ ευρετηριου απετυχε</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Η δημιουργια των μπλοκ πληροφοριων απετυχε</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Η δημιουργια του μπλοκ απετυχε</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Αδυναμία εγγραφής πληροφοριων αρχειου</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Αποτυχία εγγραφής στη βάση δεδομένων νομίσματος</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Αποτυχία εγγραφής δείκτη συναλλαγών </translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Αποτυχία εγγραφής αναίρεσης δεδομένων </translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Δημιουργία νομισμάτων (προκαθορισμος: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Πόσα μπλοκ να ελέγχθουν κατά την εκκίνηση (προεπιλογή:288,0=όλα)</translation>
-    </message>
     <message>
         <source>Invalid -onion address: '%s'</source>
         <translation>Άκυρη διεύθυνση -onion : '%s'</translation>
@@ -2293,10 +2189,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Ορίσμος του αριθμόυ θεματων στην υπηρεσία κλήσεων RPC (προεπιλογή: 4) </translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Επαλήθευση των μπλοκ... </translation>
@@ -2325,34 +2217,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Διατηρήση ένος πλήρες ευρετήριου συναλλαγών (προεπιλογή: 0) </translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Μέγιστος buffer λήψης ανά σύνδεση, &lt;n&gt;*1000 bytes (προεπιλογή: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Μέγιστος buffer αποστολής ανά σύνδεση, &lt;n&gt;*1000 bytes (προεπιλογή: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Μονο αποδοχη αλυσίδας μπλοκ που ταιριάζει με τα ενσωματωμένα σημεία ελέγχου (προεπιλογή: 1) </translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation> Συνδέση μόνο σε κόμβους του δικτύου &lt;net&gt; (IPv4, IPv6 ή Tor) </translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Ορίστε το μέγιστο μέγεθος μπλοκ σε bytes (προεπιλογή: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Συρρίκνωση του αρχείο debug.log κατα την εκκίνηση του πελάτη (προεπιλογή: 1 όταν δεν-debug)</translation>
@@ -2361,14 +2229,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Η υπογραφή συναλλαγής απέτυχε </translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Ορισμός λήξης χρονικού ορίου σε χιλιοστά του δευτερολέπτου(προεπιλογή:5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Λάθος Συστήματος:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Το ποσό της συναλλαγής είναι πολύ μικρο </translation>
@@ -2381,10 +2241,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction too large</source>
         <translation>Η συναλλαγή ειναι πολύ μεγάλη </translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Χρησιμοποίηση του  UPnP για την χρήση της πόρτας αναμονής (προεπιλογή:0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Χρησιμοποίηση του  UPnP για την χρήση της πόρτας αναμονής (προεπιλογή:1)</translation>
@@ -2421,10 +2277,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Αναβάθμισε το πορτοφόλι στην τελευταία έκδοση</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Όριο πλήθους κλειδιών pool &lt;n&gt; (προεπιλογή: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Επανέλεγχος της αλυσίδας μπλοκ για απούσες συναλλαγές</translation>
@@ -2433,14 +2285,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Χρήση του OpenSSL (https) για συνδέσεις JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Αρχείο πιστοποιητικού του διακομιστή  (προεπιλογή: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Προσωπικό κλειδί του διακομιστή (προεπιλογή: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Αυτό το κείμενο βοήθειας</translation>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 652ee2d9bf18..4496dcc3d98c 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -370,10 +370,6 @@
         <source>Tabs toolbar</source>
         <translation>Langeto-breto</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Kerno de Bitmono</translation>
@@ -410,10 +406,6 @@
         <source>No block source available...</source>
         <translation>Neniu fonto de blokoj trovebla...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Traktis %1 blokoj de la transakcia historio.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n horo</numerusform><numerusform>%n horoj</numerusform></translation>
@@ -856,15 +848,7 @@ Adreso: %4
         <source>Error</source>
         <translation>Eraro</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de libera loko disponebla</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(el %1GB bezonataj)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1033,10 +1017,6 @@ Adreso: %4
         <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>Eblas, ke la informoj videblaj ĉi tie estas eksdataj. Via monujo aŭtomate sinkoniĝas kun la bitmona reto kiam ili konektiĝas, sed tiu procezo ankoraŭ ne finfariĝis.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Monujo</translation>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>via aktuala elspezebla saldo</translation>
@@ -1061,10 +1041,6 @@ Adreso: %4
         <source>Your current total balance</source>
         <translation>via aktuala totala saldo</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Lastaj transakcioj&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nesinkronigita</translation>
@@ -2198,26 +2174,10 @@ Adreso: %4
         <source>Options:</source>
         <translation>Agordoj:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specifi konfiguran dosieron (defaŭlte: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specifi pid-dosieron (defaŭlte: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Specifi dosieron por datumoj</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Aŭskulti al &lt;port&gt; por konektoj (defaŭlte: 8333 aŭ testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Subteni maksimume &lt;n&gt; konektojn al samtavolanoj (defaŭlte: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Konekti al nodo por ricevi adresojn de samtavolanoj, kaj malkonekti</translation>
@@ -2226,18 +2186,6 @@ Adreso: %4
         <source>Specify your own public address</source>
         <translation>Specifi vian propran publikan adreson</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Sojlo por malkonekti misagantajn samtavolanojn (defaŭlte: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Nombro da sekundoj por rifuzi rekonekton de misagantaj samtavolanoj (defaŭlte: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Aŭskulti al &lt;port&gt; por JSON-RPC-konektoj (defaŭlte: 8332 aŭ testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akcepti komandojn JSON-RPC kaj el komandlinio</translation>
@@ -2278,10 +2226,6 @@ Estas konsilinde ankaŭ agordi alertnotify por ke vi ricevu avertojn pri eventu
 ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Akcepteblaj ĉifroj (defaŭlte: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bindi al donita adreso kaj ĉiam aŭskulti per ĝi. Uzu la formaton [gastigo]:pordo por IPv6</translation>
@@ -2374,62 +2318,10 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Eraro: monujo ŝlosita, ne eblas krei transakcion!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Eraro: sistema eraro: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ne sukcesis aŭskulti ajnan pordon. Uzu -listen=0 se tion vi volas.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Malsukcesis legi blokinformojn</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Malsukcesis legi blokon</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Malsukcesis sinkronigi blokindekson</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Malsukcesis skribi blokindekson</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Malsukcesis skribi blokinformojn</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Malsukcesis skribi blokon</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Malsukcesis skribi dosierinformojn</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Malsukcesis skribi Bitmon-datumbazon</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Malsukcesis skribi transakcian indekson</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Malsukcesis skribi malfarajn datumojn</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generi Bitmonon (defaŭlte: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Kiom da blokoj kontrolendas dum lanĉo (defaŭlte: 288, 0=ĉiuj)</translation>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Geneza bloko aŭ netrovita aŭ neĝusta. Ĉu eble la datadir de la reto malĝustas?</translation>
@@ -2446,10 +2338,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rekontrui blokĉenan indekson el la aktualaj blk000??.dat dosieroj</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Specifi la nombron de fadenoj por priatenti RPC-alvokojn (defaŭlte: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specifi monujan dosieron (ene de dosierujo por datumoj)</translation>
@@ -2494,34 +2382,10 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nevalida sumo por -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Varti kompletan transakcian indekton (defaŭlte: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksimuma po riceva bufro por konektoj, &lt;n&gt;*1000 bajtoj (defaŭlte: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksimuma po senda bufro por konektoj, &lt;n&gt;*1000 bajtoj (defaŭlte: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Akcepti nur blokĉenon, kiu kongruas kun integritaj kontrolpunktoj (defaŭlte: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Konekti nur la nodoj en la reto &lt;net&gt; (IPv4, IPv6 aŭ Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Sendi spurajn/sencimigajn informojn al la konzolo anstataŭ al dosiero debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Agordi minimuman grandon de blokoj je bajtoj (defaŭlte: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Malpligrandigi la sencimigan protokol-dosieron kiam kliento lanĉiĝas (defaŭlte: 1 kiam mankas -debug)</translation>
@@ -2530,14 +2394,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Subskriba transakcio fiaskis</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specifi konektan tempolimon je milisekundoj (defaŭlte: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sistema eraro: </translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transakcia sumo tro malgranda</translation>
@@ -2550,10 +2406,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Transaction too large</source>
         <translation>Transakcio estas tro granda</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Uzi UPnP por mapi la aŭskultan pordon (defaŭlte: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Uzi UPnP por mapi la aŭskultan pordon (defaŭlte: 1 dum aŭskultado)</translation>
@@ -2586,10 +2438,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Ĝisdatigi monujon al plej lasta formato</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Agordi la grandon de la ŝlosilo-vico al &lt;n&gt; (defaŭlte: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Reskani la blokĉenon por mankantaj monujaj transakcioj</translation>
@@ -2598,14 +2446,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Uzi OpenSSL (https) por konektoj JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Dosiero de servila atestilo (defaŭlte: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Dosiero de servila privata ŝlosilo (defaŭlte: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Tiu ĉi helpmesaĝo</translation>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index fad8c9bbe835..0cb8991e11db 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de pestañas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Ninguna fuente de bloques disponible ...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Procesados %1 bloques del historial de transacciones.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
@@ -486,6 +478,10 @@
         <source>Up to date</source>
         <translation>Actualizado</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>%n bloques procesados del historial de transacciones</numerusform><numerusform>Procesados %n bloques del historial de transacciones</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Actualizando...</translation>
@@ -916,13 +912,13 @@ Dirección: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de espacio libre disponible</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB de espacio libre</numerusform><numerusform>%n GB de espacio disponible</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(de los %1GB necesarios)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(de %n GB necesitados)</numerusform><numerusform>(de %n GB requeridos)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -1165,10 +1161,6 @@ Dirección: %4
         <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>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red Bitcoin después de que se haya establecido una conexión, pero este proceso aún no se ha completado.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Monedero</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>De observación:</translation>
@@ -1197,6 +1189,10 @@ Dirección: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Saldo recién minado que aún no ha madurado.</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldos</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1209,6 +1205,14 @@ Dirección: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Su saldo actual en direcciones watch-only</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Gastable:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transacciones recientes</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Transacciones sin confirmar en direcciones watch-only</translation>
@@ -1221,10 +1225,6 @@ Dirección: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Saldo total en las direcciones watch-only</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>desincronizado</translation>
@@ -1484,10 +1484,6 @@ Dirección: %4
         <source>Services</source>
         <translation>Servicios</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Sincronizar Nodo</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Altura de comienzo</translation>
@@ -1616,14 +1612,6 @@ Dirección: %4
         <source>Outbound</source>
         <translation>Saliente</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Sí</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>No</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Desconocido</translation>
@@ -2472,6 +2460,10 @@ Dirección: %4
         <source>Mined</source>
         <translation>Minado</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>de observación</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(nd)</translation>
@@ -2583,6 +2575,10 @@ Dirección: %4
         <source>Export Transaction History</source>
         <translation>Exportar historial de transacciones</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>De observación</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Error exportando</translation>
@@ -2697,30 +2693,12 @@ Dirección: %4
     <message>
         <source>Options:</source>
         <translation>Opciones:
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especificar archivo de configuración (predeterminado: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especificar archivo pid (predeterminado: bitcoin.pid)
 </translation>
     </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especificar directorio para los datos</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escuchar conexiones en &lt;puerto&gt; (predeterminado: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
@@ -2729,18 +2707,6 @@ Dirección: %4
         <source>Specify your own public address</source>
         <translation>Especifique su propia dirección pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet:18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar comandos consola y JSON-RPC
@@ -2784,17 +2750,13 @@ Se recomienda también establecer alertnotify para recibir notificaciones de pro
 Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifrados aceptables (predeterminados: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
     </message>
     <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limitar continuamente las transacciones gratuitas a &lt;n&gt;*1000 bytes por minuto (predeterminado:15)</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Borrar todas las transacciones del monedero y sólo recuperar aquellas partes de la cadena de bloques por medio de -rescan on startup.</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
@@ -2812,14 +2774,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Volcar la actividad de la base de datos de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En este modo -genproclimit controla cuántos bloques se generan de inmediato.</translation>
@@ -2828,10 +2782,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Establecer el número de hilos (threads) de verificación de scripts (entre %u y %d, 0 = automático, &lt;0 = dejar libres ese número de núcleos; predeterminado: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Establecer el límite de procesadores cuando está activada la generación (-1 = sin límite; predeterminado: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
@@ -2840,10 +2790,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>No se ha podido acceder a %s en esta máquina. Probablemente ya se está ejecutando Bitcoin Core.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usar proxy SOCKS5 distinto para comunicarse vía Tor de forma anónima (Predeterminado: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
@@ -2865,12 +2811,12 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation>
     </message>
     <message>
-        <source>(default: 1)</source>
-        <translation>(predeterminado: 1)</translation>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Poner en lista blanca a los equipos que se conecten desde la máscara de subred o dirección IP especificada. Se puede especificar múltiples veces.</translation>
     </message>
     <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(predeterminado: wallet.dat)</translation>
+        <source>(default: 1)</source>
+        <translation>(predeterminado: 1)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2900,10 +2846,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Opciones de depuración/pruebas:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Inhabilitar el modo seguro, no considerar un suceso real de modo seguro (predeterminado: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation>
@@ -2932,6 +2874,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Error al abrir base de datos de bloques.</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Error: un error grave interno ocurrió, sea debug.log para más detalles.</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Error: ¡Espacio en disco bajo!</translation>
@@ -2940,66 +2886,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>No se ha podido leer la información de bloque</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>No se ha podido leer el bloque</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>No se ha podido sincronizar el índice de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>No se ha podido escribir en el índice de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>No se ha podido escribir la información de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>No se ha podido escribir el bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>No se ha podido escribir la información de archivo</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>No se ha podido escribir en la base de datos de bitcoins</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>No se ha podido escribir en el índice de transacciones</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>No se han podido escribir los datos de deshacer</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forzar modo seguro (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generar bitcoins (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se proporciona &lt;category&gt;, mostrar toda la depuración</translation>
@@ -3021,8 +2911,8 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>No hay suficientes descriptores de archivo disponibles. </translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Anteponer marca temporal a la información de depuración (predeterminado: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Sólo conectar a nodos en redes &lt;net&gt; (ipv4, ipv6 o onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3036,22 +2926,18 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de bloque en bytes (predeterminado: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Establecer el número de procesos para atender las llamadas RPC (predeterminado: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar archivo de monedero (dentro del directorio de datos)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gastar cambio no confirmado al enviar transacciones (predeterminado: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Esto afecta a las herramientas de prueba de regresión y al desarrollo informático de la aplicación.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Usar UPnP para asignar el puerto de escucha (predeterminado:: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificando bloques...</translation>
@@ -3076,17 +2962,41 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
     </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Ocurrió un error al configurar la dirección de RPC %s puerto %u para escuchar en: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Ligar a las direcciones especificadas y poner en lista blanca a los equipos conectados a ellas. Usar la notación para IPv6 [host]:puerto.</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Ligar a las direcciones especificadas para escuchar por conexiones JSON-RPC. Usar la notación para IPv6 [host]:puerto. Esta opción se puede especificar múltiples veces (por defecto: ligar a todas las interfaces)</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>No se ha podido bloquear el directorio de datos %s. Probablemente ya se está ejecutando Bitcoin Core.</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limitar continuamente las transacciones gratuitas a &lt;n&gt;*1000 bytes por minuto (predeterminado:%u)</translation>
+    </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crear nuevos archivos con permisos por defecto del sistema, en lugar de umask 077 (sólo efectivo con la funcionalidad de monedero desactivada)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuido bajo la licencia de software MIT/X11, vea la copia del archivo adjunto o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Mostrar información de depuración (predeterminado: 0, proporcionar &lt;category&gt; es opcional)</translation>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Error: la escucha para conexiones entrantes falló (la escucha regresó el error %s)</translation>
+    </message>
+    <message>
+        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+        <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
@@ -3108,6 +3018,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
         <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
     </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin Core</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Información</translation>
@@ -3121,41 +3035,13 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Cantidad inválida para -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limitar tamaño de la cache de firmas a &lt;n&gt; entradas (predeterminado: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registrar en el log la prioridad de transacciones y la comisión por kB al minar bloques (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantener índice de transacciones completo (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Búfer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Búfer de recepción máximo por conexión, , &lt;n&gt;*1000 bytes (predeterminado: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Conectarse solo a nodos de la red &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Opciones de nodos de retransmisión:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprimir bloque al iniciar, si se encuentra en el índice de bloques</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimir árbol de bloques al iniciar (predeterminado: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opciones SSL de RPC: (véase la wiki de Bitcoin para las instrucciones de instalación de SSL)</translation>
@@ -3172,22 +3058,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Introducir datos fuzz en 1 de cada &lt;n&gt; mensajes de red al azar</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Ejecutar un hilo (thread) para limpiar de la memoria el monedero periódicamente (predeterminado: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Establece la opción DB_PRIVATE en el entorno de base de datos del monedero (predeterminado: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Muestra todas las opciones de depuración (uso: --help -help-debug)</translation>
@@ -3200,14 +3074,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Transacción falló</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Este software es experimental.</translation>
@@ -3225,8 +3091,8 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Transacción demasiado grande</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>No es posible conectar con %s en este sistema (bind ha dado el error %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
@@ -3237,6 +3103,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Nombre de usuario para las conexiones JSON-RPC
 </translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Monedero es necesario volver a escribir: reiniciar Bitcoin Core para completar</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Aviso</translation>
@@ -3245,6 +3115,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Aviso: Argumento no sportado -debugnet anticuado, utilice -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Eliminando todas las transacciones del monedero...</translation>
@@ -3270,11 +3144,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizar el monedero al último formato</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: 100)
-</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
@@ -3282,16 +3151,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSL (https) para las conexiones JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificado del servidor (predeterminado: server.cert)
-</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clave privada del servidor (predeterminado: server.pem)
 </translation>
     </message>
     <message>
@@ -3311,14 +3170,158 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error al cargar wallet.dat: el monedero está dañado</translation>
     </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Volcar la actividad de la base de datos de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Registrar prioridad de las transacciones y cuota por kB cuando se minen bloques (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Mostrar depuración (por defecto: %u, proporcionar &lt;category&gt; es opcional)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(predeterminado: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Aceptar cifrado (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Siempre consultar direcciones de otros equipos por medio de DNS lookup (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Inhabilitar el modo seguro, no considerar un suceso real de modo seguro (predeterminado: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error al cargar wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forzar modo seguro (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generar monedas (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Cuántos bloques comprobar al iniciar (predeterminado: %u, 0 = todos)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Incluir direcciones IP en la salida de depuración (por defecto: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Dirección -proxy inválida: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limitar tamaño de la cache de firmas a &lt;n&gt; entradas (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escuchar conexiones en &lt;puerto&gt; (predeterminado: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Búfer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Búfer de recepción máximo por conexión, , &lt;n&gt;*1000 bytes (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Anteponer marca temporal a la información de depuración (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Imprimir árbol de bloques al iniciar (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Ejecutar un hilo para limpiar de la memoria el monedero periódicamente (predeterminado:  %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Archivo de certificado del servidor (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Llave privada del servidor (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Establecer tamaño mínimo de bloque en bytes (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Establecer el número de procesos para llamadas del servicio RPC (por defecto: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Establece la opción DB_PRIVATE en el entorno de base de datos del monedero (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Especificar archivo de configuración (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Especificar tiempo de espera de la conexión (mínimo: 1, por defecto: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Especificar archivo pid (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Gastar cambio no confirmado al enviar transacciones (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Detener después de importar los bloques del disco (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>La red especificada en -onlynet '%s' es desconocida</translation>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index b22ad3fb8e68..930aac844910 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -274,10 +274,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de pestañas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[red-de-pruebas]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexión activa hacia la red Bitcoin</numerusform><numerusform>%n conexiones activas hacia la red Bitcoin</numerusform></translation>
@@ -573,18 +569,10 @@ Dirección: %4</translation>
         <source>Form</source>
         <translation>Formulario</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Cartera</translation>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>desincronizado</translation>
@@ -1277,16 +1265,6 @@ Dirección: %4</translation>
     <message>
         <source>Options:</source>
         <translation>Opciones:
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifica archivo de configuración (predeterminado: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifica archivo pid (predeterminado: bitcoin.pid)
 </translation>
     </message>
     <message>
@@ -1294,22 +1272,6 @@ Dirección: %4</translation>
         <translation>Especifica directorio para los datos
 </translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escuchar por conecciones en &lt;puerto&gt; (Por defecto: 8333 o red de prueba: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantener al menos &lt;n&gt; conecciones por cliente (por defecto: 125) </translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral de desconección de clientes con mal comportamiento (por defecto: 100)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escucha conexiones JSON-RPC en el puerto &lt;port&gt; (predeterminado: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar comandos consola y JSON-RPC
@@ -1342,34 +1304,6 @@ Dirección: %4</translation>
         <source>Error: Disk space is low!</source>
         <translation>Atención: Poco espacio en el disco duro</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema:</translation>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Falló la lectura de la información del bloque</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Falló la lectura del bloque</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Falló sincronización del índice del bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Falló la escritura del bloque del índice</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Falló la escritura de la información del bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Falló la escritura del bloque</translation>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importar bloques desde el archivo externo blk000??.dat </translation>
@@ -1382,22 +1316,6 @@ Dirección: %4</translation>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar informacion de seguimiento a la consola en vez del archivo debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Establezca el tamaño mínimo del bloque en bytes (por defecto: 0)</translation>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especifica tiempo de espera para conexion en milisegundos (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema:</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Intenta usar UPnP para mapear el puerto de escucha (default: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Intenta usar UPnP para mapear el puerto de escucha (default: 1 when listening)</translation>
@@ -1428,11 +1346,6 @@ Dirección: %4</translation>
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizar billetera al formato actual</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ajusta el numero de claves en reserva &lt;n&gt; (predeterminado: 100)
-</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescanea la cadena de bloques para transacciones perdidas de la cartera
@@ -1441,16 +1354,6 @@ Dirección: %4</translation>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usa OpenSSL (https) para las conexiones JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificado del servidor (Predeterminado: server.cert)
-</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clave privada del servidor (Predeterminado: server.pem)
 </translation>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index a9cfe90895f7..8099b182aed5 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -374,10 +374,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de pestañas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Núcleo de Bitcoin</translation>
@@ -410,10 +406,6 @@
         <source>No block source available...</source>
         <translation>Ninguna fuente de bloques disponible ...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Procesados %1 bloques del historial de transacciones.</translation>
-    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 atrás</translation>
@@ -848,15 +840,7 @@ Dirección: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de espacio libre disponible</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(de los %1GB necesarios)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1041,10 +1025,6 @@ Dirección: %4
         <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>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red Bitcoin después de que se haya establecido una conexión, pero este proceso aún no se ha completado.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Monedero</translation>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>Su balance actual gastable</translation>
@@ -1069,10 +1049,6 @@ Dirección: %4
         <source>Your current total balance</source>
         <translation>Su balance actual total</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Movimientos recientes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>desincronizado</translation>
@@ -2241,30 +2217,12 @@ Dirección: %4
     <message>
         <source>Options:</source>
         <translation>Opciones:
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especificar archivo de configuración (predeterminado: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especificar archivo pid (predeterminado: bitcoin.pid)
 </translation>
     </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especificar directorio para los datos</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escuchar conexiones en &lt;puerto&gt; (predeterminado: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
@@ -2273,18 +2231,6 @@ Dirección: %4
         <source>Specify your own public address</source>
         <translation>Especifique su propia dirección pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: 8332 o testnet:18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar comandos consola y JSON-RPC
@@ -2328,10 +2274,6 @@ Se recomienda también establecer alertnotify para recibir notificaciones de pro
 Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifradores aceptables (por defecto: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
@@ -2352,10 +2294,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
@@ -2428,62 +2366,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>No se ha podido leer la información de bloque</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>No se ha podido leer el bloque</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>No se ha podido sincronizar el índice de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>No se ha podido escribir en el índice de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>No se ha podido escribir la información de bloques</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>No se ha podido escribir el bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>No se ha podido escribir la información de archivo</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>No se ha podido escribir en la base de datos de monedas</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>No se ha podido escribir en el índice de transacciones</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>No se han podido escribir los datos de deshacer</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generar monedas (por defecto: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Cuántos bloques comprobar al iniciar (predeterminado: 288, 0 = todos)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si no se proporciona &lt;category&gt;, mostrar toda la depuración</translation>
@@ -2500,10 +2386,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hay suficientes descriptores de archivo disponibles. </translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Anteponer marca temporal a la información de depuración (por defecto: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
@@ -2512,10 +2394,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de bloque en bytes (por defecto: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar archivo de monedero (dentro del directorio de datos)</translation>
@@ -2544,10 +2422,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Mostrar depuración (por defecto: 0, proporcionar &lt;category&gt; es opcional)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/comisión baja en bytes (por defecto: %d)</translation>
@@ -2564,34 +2438,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Inválido por el monto -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantener índice de transacciones completo (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Búfer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Búfer de recepción máximo por conexión, , &lt;n&gt;*1000 bytes (predeterminado: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Conectarse solo a nodos de la red &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
@@ -2600,14 +2450,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Transacción falló</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar el tiempo máximo de conexión en milisegundos (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Monto de la transacción muy pequeño</translation>
@@ -2620,10 +2462,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction too large</source>
         <translation>Transacción demasiado grande</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar)</translation>
@@ -2658,11 +2496,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizar el monedero al último formato</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: 100)
-</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
@@ -2670,16 +2503,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSL (https) para las conexiones JSON-RPC
-</translation>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificado del servidor (predeterminado: server.cert)
-</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clave privada del servidor (predeterminado: server.pem)
 </translation>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index c89ac5c6eff4..93d9f6473d1f 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -569,10 +569,6 @@
         <source>Form</source>
         <translation>Formulario</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index 321e5312ad7a..8bca84c21935 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -162,10 +162,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de herramientas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[prueba_de_red]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexión activa a la red Bitcoin </numerusform><numerusform>%n conexiones activas a la red Bitcoin</numerusform></translation>
@@ -277,10 +273,6 @@
         <source>Form</source>
         <translation>Formulario</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index cd3a39b6b9cb..82ed0337abe1 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -310,10 +310,6 @@
         <source>Tabs toolbar</source>
         <translation>Vahelehe tööriistariba</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
@@ -322,10 +318,6 @@
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktiivne ühendus Bitcoini võrku</numerusform><numerusform>%n aktiivset ühendust Bitcoini võrku</numerusform></translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Protsessitud %1 tehingute ajaloo blokki.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n tund</numerusform><numerusform>%n tundi</numerusform></translation>
@@ -672,10 +664,6 @@ Aadress: %4⏎</translation>
         <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>Kuvatav info ei pruugi olla ajakohane. Ühenduse loomisel süngitakse sinu rahakott automaatselt Bitconi võrgustikuga, kuid see toiming on hetkel lõpetamata.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Rahakott</translation>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Ebaküps:</translation>
@@ -684,10 +672,6 @@ Aadress: %4⏎</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Mitte aegunud mine'itud jääk</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Uuesti saadetud tehingud&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>sünkimata</translation>
@@ -1493,26 +1477,10 @@ Aadress: %4⏎</translation>
         <source>Options:</source>
         <translation>Valikud:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Täpsusta sätete fail (vaikimisi: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Täpsusta PID fail (vaikimisi: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Täpsusta andmekataloog</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Kuula ühendusi pordil &lt;port&gt; (vaikeväärtus: 8333 või testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Säilita vähemalt &lt;n&gt; ühendust peeridega (vaikeväärtus: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Peeri aadressi saamiseks ühendu korraks node'iga</translation>
@@ -1521,18 +1489,6 @@ Aadress: %4⏎</translation>
         <source>Specify your own public address</source>
         <translation>Täpsusta enda avalik aadress</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Ulakate peeride valulävi (vaikeväärtus: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Mitme sekundi pärast ulakad peerid tagasi võivad tulla (vaikeväärtus: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Kuula JSON-RPC ühendusel seda porti &lt;port&gt; (vaikeväärtus: 8332 või testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Luba käsurea ning JSON-RPC käsklusi</translation>
@@ -1653,66 +1609,14 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Tõrge: Rahakott on lukus, tehingu loomine ei ole võimalik!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Tõrge: süsteemi tõrge:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Pordi kuulamine nurjus. Soovikorral kasuta -listen=0.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Tõrge bloki sisu lugemisel</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Bloki lugemine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Bloki indeksi sünkimine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Bloki indeksi kirjutamine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Bloki sisu kirjutamine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Tõrge bloki sisu kirjutamisel</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Tõrge faili info kirjutamisel</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Tõrge mündi andmebaasi kirjutamisel</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Tehingu indeksi kirjutamine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Tagasivõtmise andmete kirjutamine ebaõnnestus</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Käivitamisel kontrollitavate blokkide arv (vaikeväärtus: 288, 0=kõik)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Taasta bloki jada indeks blk000??.dat failist</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Määra RPC kõnede haldurite arv (vaikeväärtus: 4)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Kontrollin blokke...</translation>
@@ -1729,50 +1633,14 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Information</source>
         <translation>Informatsioon</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Säilita kogu tehingu indeks (vaikeväärtus: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksimaalne saamise puhver -connection kohta , &lt;n&gt;*1000 baiti (vaikeväärtus: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksimaalne saatmise puhver -connection kohta , &lt;n&gt;*1000 baiti (vaikeväärtus: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Tunnusta ainult sisseehitatud turvapunktidele vastavaid bloki jadu (vaikeväärtus: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Ühenda ainult node'idega &lt;net&gt; võrgus (IPv4, IPv6 või Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Saada jälitus/debug, debug.log faili asemel, konsooli</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Sea minimaalne bloki suurus baitides (vaikeväärtus: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Kahanda programmi käivitamisel debug.log faili (vaikeväärtus: 1, kui ei ole -debug)</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Sea ühenduse timeout millisekundites (vaikeväärtus: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Süsteemi tõrge:</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 1, kui kuulatakse)</translation>
@@ -1805,10 +1673,6 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Uuenda rahakott uusimasse vormingusse</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Sea võtmete hulgaks &lt;n&gt; (vaikeväärtus: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Otsi ploki jadast rahakoti kadunud tehinguid</translation>
@@ -1817,14 +1681,6 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Kasuta JSON-RPC ühenduste jaoks OpenSSL'i (https)</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serveri sertifikaadifail (vaikeväärtus: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Serveri privaatvõti (vaikeväärtus: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Käesolev abitekst</translation>
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index f8f03c3d29d6..9a570890a198 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -174,10 +174,6 @@
         <source>Tabs toolbar</source>
         <translation>Fitxen tresna-barra</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Egunean</translation>
@@ -305,10 +301,6 @@
         <source>Form</source>
         <translation>Inprimakia</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Azken transakzioak&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -694,14 +686,6 @@
         <source>Options:</source>
         <translation>Aukerak</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Ezarpen fitxategia aukeratu (berezkoa: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid fitxategia aukeratu (berezkoa: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Laguntza mezu hau</translation>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index d806fa47efc1..c33bbdf6b4bf 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -9,6 +9,10 @@
         <source>Create a new address</source>
         <translation>ایجاد نشانی جدید</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;جدید</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>کپی نشانی انتخاب شده به حافظهٔ سیستم</translation>
@@ -61,6 +65,10 @@
         <source>Comma separated file (*.csv)</source>
         <translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>استخراج انجام نشد</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
@@ -326,10 +334,6 @@
         <source>Tabs toolbar</source>
         <translation>نوارابزار برگه‌ها</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[شبکهٔ آزمایش]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation> هسته Bitcoin </translation>
@@ -342,10 +346,6 @@
         <source>No block source available...</source>
         <translation>منبعی برای دریافت بلاک در دسترس نیست...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 بلاک از تاریخچهٔ تراکنش‌ها پردازش شده است.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n ساعت</numerusform></translation>
@@ -612,15 +612,7 @@ Address: %4
         <source>Error</source>
         <translation>خطا</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>گیگابات فضا موجود است</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(از %1 گیگابایت فضای مورد نیاز)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     </context>
@@ -761,10 +753,6 @@ Address: %4
         <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>اطلاعات نمایش‌داده شده ممکن است قدیمی باشند. بعد از این که یک اتصال با شبکه برقرار شد، کیف پول شما به‌صورت خودکار با شبکهٔ بیت‌کوین همگام‌سازی می‌شود. اما این روند هنوز کامل نشده است.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>کیف پول</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>در دسترس:</translation>
@@ -793,10 +781,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>تراز کل فعلی شما</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;تراکنش‌های اخیر&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>ناهمگام</translation>
@@ -924,6 +908,10 @@ Address: %4
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>برای نمایش یک مرور کلی از دستورات ممکن، عبارت &lt;b&gt;help&lt;/b&gt; را بنویسید.</translation>
     </message>
+    <message>
+        <source>Unknown</source>
+        <translation>ناشناخته</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -1543,6 +1531,10 @@ Address: %4
         <source>Show transaction details</source>
         <translation>نمایش جزئیات تراکنش</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>استخراج انجام نشد</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>پروندهٔ نوع CSV جداشونده با کاما (*.csv)</translation>
@@ -1626,26 +1618,10 @@ Address: %4
         <source>Options:</source>
         <translation>گزینه‌ها:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>مشخص کردن فایل پیکربندی (پیش‌فرض: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>مشخص کردن فایل شناسهٔ پردازش - pid - (پیش‌فرض: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>مشخص کردن دایرکتوری داده‌ها</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>پذیرش اتصالات روی پورت &lt;port&gt; (پیش‌فرض: 8833 یا شبکهٔ آزمایشی: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>حداکثر &lt;n&gt; اتصال با همتایان برقرار شود (پیش‌فرض: ۱۲۵)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>اتصال به یک گره برای دریافت آدرس‌های همتا و قطع اتصال پس از اتمام عملیات</translation>
@@ -1654,18 +1630,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>آدرس عمومی خود را مشخص کنید</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>حد آستانه برای قطع ارتباط با همتایان بدرفتار (پیش‌فرض: ۱۰۰)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>مدت زمان جلوگیری از اتصال مجدد همتایان بدرفتار، به ثانیه (پیش‌فرض: ۸۴۶۰۰)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>پورت مورد شنود برای اتصالات JSON-RPC (پیش‌فرض: 8332 برای شبکهٔ تست 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>پذیرش دستورات خط فرمان و دستورات JSON-RPC</translation>
@@ -1738,58 +1702,10 @@ Address: %4
         <source>Error opening block database</source>
         <translation>خطا در بازگشایی پایگاه داده ی بلوک</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>خطا: خطای سامانه:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>شنیدن هر گونه درگاه انجام پذیر نیست. ازlisten=0  برای اینکار استفاده کیند.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>خواندن اطلاعات بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>خواندن بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>همگام سازی فهرست بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>نوشتن فهرست بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>نوشتن اطلاعات بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>نوشتن بلوک با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>نوشتن اطلاعات پرونده با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>نوشتن اطلاعات در پایگاه داده ی سکه ها با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>نوشتن فهرست تراکنش ها با شکست مواجه شد</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>عملیات بازگشت دادن اطلاعات با شکست مواجه شدن</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>چند بلوک نیاز است که در ابتدای راه اندازی بررسی شوند(پیش فرض:288 ،0=همه)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>در حال بازبینی بلوک ها...</translation>
@@ -1802,42 +1718,14 @@ Address: %4
         <source>Information</source>
         <translation>اطلاعات</translation>
     </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;*  1000 بایت  (پیش فرض:5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>حداکثر بافر دریافت شده بر اساس اتصال &lt;n&gt;*  1000 بایت  (پیش فرض:1000)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>تنها =به گره ها در شبکه متصا شوید  &lt;net&gt; (IPv4, IPv6 or Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>اطلاعات ردگیری/اشکال‌زدایی را به جای فایل لاگ اشکال‌زدایی به کنسول بفرستید</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>حداقل سایز بلاک بر اساس بایت تنظیم شود (پیش فرض: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>فایل debug.log  را در startup مشتری کوچک کن (پیش فرض:1 اگر اشکال زدایی روی نداد)</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>(میلی ثانیه )فاصله ارتباط خاص</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>خطای سامانه</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>از UPnP  برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>از UPnP  برای شناسایی درگاه شنیداری استفاده کنید (پیش فرض:1 در زمان شنیدن)</translation>
@@ -1866,10 +1754,6 @@ Address: %4
         <source>Upgrade wallet to latest format</source>
         <translation>wallet  را به جدیدترین فرمت روزآمد کنید</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation> (100پیش فرض:)&amp;lt;n&amp;gt; گذاشتن اندازه کلید روی </translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation>
@@ -1878,14 +1762,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPCبرای ارتباطات   استفاده کنید OpenSSL (https)</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation> (server.certپیش فرض: )گواهی نامه سرور</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>(server.pemپیش فرض: ) کلید خصوصی سرور</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>پیام کمکی</translation>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 92e0722767d2..5ff33fee1a79 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -234,10 +234,6 @@
         <source>Tabs toolbar</source>
         <translation>نوار ابزار</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطا</translation>
@@ -419,14 +415,6 @@ Address: %4
         <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>Wallet</source>
-        <translation>کیف پول</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>تراکنشهای اخیر</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>خارج از روزآمد سازی</translation>
@@ -937,38 +925,10 @@ Address: %4
         <source>Options:</source>
         <translation>انتخابها:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>فایل پیکربندیِ را مشخص کنید (پیش فرض: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>فایل pid  را مشخص کنید (پیش فرض: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>دایرکتوری داده را مشخص کن</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>ارتباطات را در &lt;PORT&gt; بشنوید (پیش فرض: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>نگهداری &lt;N&gt; ارتباطات برای قرینه سازی  (پیش فرض:125)</translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>آستانه قطع برای قرینه سازی اشتباه (پیش فرض:100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>تعداد ثانیه ها برای اتصال دوباره قرینه های اشتباه (پیش فرض:86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>ارتباطاتِ JSON-RPC  را در &lt;port&gt;  گوش کنید (پیش فرض:8332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>command line  و JSON-RPC commands را قبول کنید</translation>
@@ -985,10 +945,6 @@ Address: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>ارسال اطلاعات پیگیری/خطایابی به کنسول به جای ارسال به فایل debug.log</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>تعیین مدت زمان وقفه (time out) به هزارم ثانیه</translation>
-    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>شناسه کاربری برای ارتباطاتِ JSON-RPC</translation>
@@ -1005,10 +961,6 @@ Address: %4
         <source>Upgrade wallet to latest format</source>
         <translation>wallet را به جدیدترین نسخه روزآمد کنید</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>حجم key pool  را به اندازه &lt;n&gt; تنظیم کنید (پیش فرض:100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>زنجیره بلاک را برای تراکنش جا افتاده در WALLET دوباره اسکن کنید</translation>
@@ -1017,14 +969,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>برای ارتباطاتِ JSON-RPC  از OpenSSL (https) استفاده کنید</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>فایل certificate  سرور (پیش فرض server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>رمز اختصاصی سرور  (پیش فرض: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>این پیام راهنما</translation>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 3541c58fcfe3..76ec6d4bf5d0 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Välilehtipalkki</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin-ydin</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Lohkojen lähdettä ei saatavilla...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Käsitelty %1 lohkoa rahansiirtohistoriasta</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n tunti</numerusform><numerusform>%n tuntia</numerusform></translation>
@@ -915,15 +907,7 @@ Osoite: %4</translation>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB vapaata tilaa</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(tarvitaan %1GB)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1164,10 +1148,6 @@ Osoite: %4</translation>
         <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>Näytetyt tiedot eivät välttämättä ole ajantasalla. Lompakkosi synkronoituu Bitcoin-verkon kanssa automaattisesti yhteyden muodostamisen jälkeen, mutta synkronointi on vielä meneillään.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Lompakko</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Seuranta:</translation>
@@ -1209,8 +1189,8 @@ Osoite: %4</translation>
         <translation>Nykyinen tase seurantaosoitetteissa</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Viimeisimmät rahansiirrot&lt;/b&gt;</translation>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Nykyinen tase seurantaosoitetteissa</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1227,6 +1207,14 @@ Osoite: %4</translation>
         <source>Invalid payment address %1</source>
         <translation>Virheellinen maksuosoite %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Maksupyyntö hylätty</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Maksupyyntö on vanhentunut.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Maksupyyntö %1 on liian pieni (huomioidaan tomuna).</translation>
@@ -1243,6 +1231,10 @@ Osoite: %4</translation>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Maksupyynnön haku URL on virheellinen: %1</translation>
     </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>URIa ei voitu jäsentää! Tämä voi johtua kelvottomasta Bitcoin-osoitteesta tai virheellisistä URI parametreista.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Maksupyynnön tiedoston käsittely</translation>
@@ -1274,6 +1266,10 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Käyttöliittymä</translation>
+    </message>
     </context>
 <context>
     <name>QObject</name>
@@ -1281,6 +1277,10 @@ Osoite: %4</translation>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1289,11 +1289,19 @@ Osoite: %4</translation>
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>Ei saatavilla</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1367,6 +1375,22 @@ Osoite: %4</translation>
         <source>Current number of blocks</source>
         <translation>Nykyinen Lohkojen määrä</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Vastaanotetut</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Lähetetyt</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versio</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Käyttöliittymä</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Viimeisimmän lohkon aika</translation>
@@ -1443,6 +1467,10 @@ Osoite: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Tuntematon</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -2481,26 +2509,10 @@ Osoite: %4</translation>
         <source>Options:</source>
         <translation>Asetukset:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Määritä asetustiedosto (oletus: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Määritä pid-tiedosto (oletus: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Määritä data-hakemisto</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Kuuntele yhteyksiä portista &lt;port&gt; (oletus: 8333 tai testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Pidä enintään &lt;n&gt; yhteyttä verkkoihin (oletus: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Yhdistä noodiin hakeaksesi naapurien osoitteet ja katkaise yhteys</translation>
@@ -2509,18 +2521,6 @@ Osoite: %4</translation>
         <source>Specify your own public address</source>
         <translation>Määritä julkinen osoitteesi</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Kynnysarvo aikakatkaisulle heikosti toimiville verkoille (oletus: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Sekuntien määrä, kuinka kauan uudelleenkytkeydytään verkkoihin (oletus: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Kuuntele JSON-RPC -yhteyksiä portista &lt;port&gt; (oletus: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Hyväksy merkkipohjaiset- ja JSON-RPC-käskyt</translation>
@@ -2561,18 +2561,10 @@ Suositellaan asettaa alertnotify jotta saat tietoa ongelmista;
 esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Hyväksytyt koodit (oletus: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle.</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Yhtäaikaisesti rajaa vapaat rahansiirrot &lt;n&gt;*1000 tavua per minuutti (oletus: 15)</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Aloita regression testimoodi joka käyttää erikoisketjua jossa lohkoja voidaan ratkaista välittömästi.</translation>
@@ -2589,14 +2581,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Aja tietokannan toimet muistivarannosta kovalevylogiin joka &lt;n&gt; megatavu (oletus: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Kuinka vaativa lohkonvarmistus -checkblocks on (0-4, oletus:  3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Tässä moodissa -genproclimit ohjaa kuinka monta lohkoa luodaan välittömästi.</translation>
@@ -2605,10 +2589,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Aseta script varmistuksen threadien lukumäärä (%u - %d, 0= auto, &lt;0 = jätä näin monta ydintä vapaaksi, oletus: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Aseta prosessorin raja kun luonti on päällä (-1 = rajoittamaton, oletus: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Tämä on esi-julkaistu testiversio - Käytä omalla riskillä - Ei saa käytää louhimiseen tai kauppasovelluksiin.</translation>
@@ -2617,10 +2597,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Ei voida yhdistää %s tässä tietokoneessa. Bitcoin Core on luultavasti jo käynnissä.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Käytä erillistä SOCKS5 proxya tavoittaaksesi vertaiset Tor palvelun kautta (oletus: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varoitus: -paytxfee on asetettu erittäin korkeaksi! Tämä on maksukulu jonka tulet maksamaan kun lähetät siirron.</translation>
@@ -2645,10 +2621,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(oletus: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(oletus: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; voi olla:</translation>
@@ -2677,10 +2649,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Debuggaus/Testauksen valinnat:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Poista safemode, ohita oikea turvallinen mooditapahtuma (oletus: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Hae oma IP osoite (vakioasetus: 1 kun kuuntelemassa ja ei -externalip)</translation>
@@ -2717,66 +2685,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Virhe: Lompakko on lukittu, rahansiirtoa ei voida luoda</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Virhe: Järjestelmävirhe</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ei onnistuttu kuuntelemaan missään portissa. Käytä -listen=0 jos haluat tätä.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Lohkotietojen luku epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Lohkon luku epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Lohkoindeksin synkronointi epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Lohkoindeksin kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Lohkotiedon kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Lohkon kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Tiedoston tietojen kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Kolikkotietokannan kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Rahasiirtojen indeksin kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Palautustiedon kirjoitus epäonnistui</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Pakota safe moodi (oletus: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generoi kolikoita (vakio: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Kuinka monta lohkoa tarkistetaan käynnistettäessä (oletus: 288, 0 = kaikki)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Jos &lt;kategoria&gt; ei annettu, tulosta kaikki debuggaustieto.</translation>
@@ -2797,10 +2709,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>Ei tarpeeksi tiedostomerkintöjä vapaana.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Lisää aikamerkki debug tulosteen eteen (oletus: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Uudelleenrakenna lohkoketjuindeksi nykyisistä blk000??.dat tiedostoista</translation>
@@ -2813,18 +2721,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Aseta lohkon maksimikoko tavuissa (oletus: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Aseta threadien lukumäärä RPC kutsuille (oletus: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Aseta lompakkotiedosto (data-hakemiston sisällä)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Käytä varmistamattomia vaihtorahoja lähetettäessä rahansiirtoja (oletus: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Tämä on tarkoitettu regression testityökaluille ja ohjelman kehittämiseen.</translation>
@@ -2861,62 +2761,38 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Aja komento kun olennainen hälytys vastaanotetaan tai nähdään todella pitkä haara (%s komennossa korvataan viestillä)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Tulosta debuggaustieto (oletus: 0, annettu &lt;kategoria&gt; valinnainen)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Aseta maksimikoko korkea prioriteetti/pieni palkkio rahansiirtoihin tavuissa (oletus: %d)</translation>
     </message>
     <message>
-        <source>Information</source>
-        <translation>Tietoa</translation>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Yhdistä SOCKS5 proxin kautta</translation>
     </message>
     <message>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Virheellinen määrä -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i  Bitcoin kehittäjät</translation>
     </message>
     <message>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: '%s'</translation>
-    </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Rajaa allekirjoituksen välimuistin koko &lt;n&gt; alkioon (oletus: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Kirjaa rahansiirron prioriteetti ja palkkio per kB kun louhitaan lohkoja (oletus: 0)</translation>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Virhe ladattaessa wallet.dat-tiedostoa: Tarvitset uudemman version Bitcoinista</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Ylläpidä täydellistä rahasiirtojen indeksiä (oletus: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Suurin vastaanottopuskuri yksittäiselle yhteydelle, &lt;n&gt;*1000 tavua (vakioasetus: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Suurin lähetyspuskuri yksittäiselle yhteydelle, &lt;n&gt;*1000 tavua (vakioasetus: 1000)</translation>
+        <source>Information</source>
+        <translation>Tietoa</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Hyväksy vain lohkoketjua vastaavat sisäänrakennetut varmistuspisteet (Oletus: 1)</translation>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Virheellinen määrä -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Yhdistä vain noodeihin verkossa &lt;net&gt; (IPv4, IPv6 tai Tor)</translation>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Tulosta lohko käynnistyksessä jos löydetään lohkoindeksistä</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Tulosta lohkopuu käynnistyksessä (oletus: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL valinnat: (katso Bitcoin Wikistä SSL-asennuksen ohjeet)</translation>
@@ -2933,22 +2809,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Satunnaisesti sekoita 1 joka &lt;n&gt; verkkoviestistä</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Aja threadi jossa tallennetaan lompakko ajoittain (oletus: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Lähetä jäljitys/debug-tieto konsoliin, debug.log-tiedoston sijaan</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Asetan pienin lohkon koko tavuissa (vakioasetus: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Asettaa DB_PRIVATE lipun lompakon tietokantaympäristössä (oletus: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Näytä kaikki debuggaus valinnat: (käyttö: --help -help-debug)</translation>
@@ -2961,14 +2825,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Siirron vahvistus epäonnistui</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Määritä yhteyden aikakataisu millisekunneissa (vakioasetus: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Järjestelmävirhe:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Siirtosumma liian pieni</translation>
@@ -2981,10 +2837,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction too large</source>
         <translation>Siirtosumma liian iso</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Käytä UPnP:tä kuunneltavan portin avaamiseen (vakioasetus: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Käytä UPnP:tä kuunneltavan portin avaamiseen (vakioasetus: 1 kun kuuntelemassa)</translation>
@@ -2993,6 +2845,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Username for JSON-RPC connections</source>
         <translation>Käyttäjätunnus JSON-RPC-yhteyksille</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Lompakko tarvitsee uudelleenkirjoittaa: käynnistä Bitcoin uudelleen</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Varoitus</translation>
@@ -3025,10 +2881,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Päivitä lompakko uusimpaan formaattiin</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Aseta avainpoolin koko arvoon &lt;n&gt; (oletus: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Skannaa uudelleen lohkoketju lompakon puuttuvien rahasiirtojen vuoksi</translation>
@@ -3037,14 +2889,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Käytä OpenSSL:ää (https) JSON-RPC-yhteyksille</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Palvelimen sertifikaatti-tiedosto (oletus: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Palvelimen yksityisavain (oletus: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Tämä ohjeviesti</translation>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index dfd7081593c8..86c23b6c3e79 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barre d'outils des onglets</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Aucune source de blocs disponible...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>À traité %1 blocs de l'historique des transactions.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n heure</numerusform><numerusform>%n heures</numerusform></translation>
@@ -912,15 +904,7 @@ Adresse : %4
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>Go d'espace libre disponible</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(sur %1Go nécessaires)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1161,10 +1145,6 @@ Adresse : %4
         <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>Les informations affichées peuvent être obsolètes. Votre portefeuille est automatiquement synchronisé avec le réseau Bitcoin lorsque la connexion s'établit, or ce processus n'est pas encore terminé.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Portefeuille</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Juste-regarder :</translation>
@@ -1193,6 +1173,10 @@ Adresse : %4
         <source>Mined balance that has not yet matured</source>
         <translation>Le solde généré n'est pas encore mûr</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Soldes</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total :</translation>
@@ -1205,6 +1189,14 @@ Adresse : %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Votre balance actuelle en adresses juste-regarder</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Disponible:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transactions récentes</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Transactions non confirmées vers des adresses juste-regarder</translation>
@@ -1217,10 +1209,6 @@ Adresse : %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Solde total actuel dans des adresses juste-regarder</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transactions récentes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>désynchronisé</translation>
@@ -1480,10 +1468,6 @@ Adresse : %4
         <source>Services</source>
         <translation>Services</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Nœud de synchro</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Hauteur de démarrage</translation>
@@ -1612,14 +1596,6 @@ Adresse : %4
         <source>Outbound</source>
         <translation>Sortant</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Oui</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Non</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Inconnu</translation>
@@ -2468,6 +2444,10 @@ Adresse : %4
         <source>Mined</source>
         <translation>Miné</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>juste-regarder</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n.d)</translation>
@@ -2484,6 +2464,10 @@ Adresse : %4
         <source>Type of transaction.</source>
         <translation>Type de transaction.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Détermine si une adresse de type watch-only est impliquée dans cette transaction.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>L’adresse de destination de la transaction.</translation>
@@ -2694,26 +2678,10 @@ Adresse : %4
         <source>Options:</source>
         <translation>Options :</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Spécifier le fichier de configuration (par défaut : bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Spécifier le fichier PID (par défaut : bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Spécifier le répertoire de données</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Écouter les connexions sur le &lt;port&gt; (par défaut : 8333 ou testnet : 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Garder au plus &lt;n&gt; connexions avec les pairs (par défaut : 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Se connecter à un nœud pour obtenir des adresses de pairs puis se déconnecter</translation>
@@ -2722,18 +2690,6 @@ Adresse : %4
         <source>Specify your own public address</source>
         <translation>Spécifier votre propre adresse publique</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Seuil de déconnexion des pairs de mauvaise qualité (par défaut : 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Délai en secondes de refus de reconnexion aux pairs de mauvaise qualité (par défaut : 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Écouter les connexions JSON-RPC sur le &lt;port&gt; (par défaut : 8332 ou tesnet : 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepter les commandes de JSON-RPC et de la ligne de commande</translation>
@@ -2774,18 +2730,10 @@ Il est aussi conseillé de régler alertnotify pour être prévenu des problème
 par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Chiffrements acceptables (par défaut : TLSv1.2+HIGH : TLSv1+HIGH : !SSLv2 : !aNULL : !eNULL : !3DES : @STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limiter continuellement les transactions gratuites à &lt;n&gt;*1000 octets par minute (par défaut : 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Supprimer toutes les transactions du portefeuille et ne récupérer que ces parties de la chaîne de bloc avec -rescan au démarrage</translation>
@@ -2806,14 +2754,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exécuter la commande lorsqu'une transaction de portefeuille change (%s dans la commande est remplacée par TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Purger l’activité de la base de données de la mémoire vers le journal sur disque tous les &lt;n&gt; mégaoctets (par défaut : 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>À quel point la vérification des blocs -checkblocks est approfondie (0-4, par défaut : 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Dans ce mode -genproclimit contrôle combien de blocs sont générés immédiatement.</translation>
@@ -2822,10 +2762,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Définir le nombre d'exétrons de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Définir la limite processeur définissant quand la génération est en fonction (-1 = illimité, par défaut : -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Ceci est une pré-version de test - l'utiliser à vos risques et périls - ne pas l'utiliser pour miner ou pour des applications marchandes</translation>
@@ -2834,10 +2770,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Impossible de se lier à %s sur cet ordinateur. Bitcoin Core fonctionne probablement déjà.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utiliser un serveur mandataire SOCKS5 séparé pour atteindre les pairs par les services cachés de Tor (par défaut : -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Avertissement : -paytxfee est réglé sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
@@ -2862,10 +2794,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>(default: 1)</source>
         <translation>(par défaut : 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(par défaut : wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; peut être :</translation>
@@ -2894,10 +2822,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Options de test/de débogage :</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Désactiver le mode sans échec, passer outre un événement sans échec réel (par défaut : 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Découvrir sa propre adresse IP (par défaut : 1 lors de l'écoute et si aucun -externalip)</translation>
@@ -2926,6 +2850,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error opening block database</source>
         <translation>Erreur lors de l'ouverture de la base de données des blocs</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Erreur: Une erreur fatale s'est produite, voir debug.log pour plus de détails</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Erreur : l'espace disque est faible !</translation>
@@ -2934,66 +2862,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erreur : Portefeuille verrouillé, impossible de créer la transaction !</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Erreur : erreur système :</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>La lecture des informations de bloc a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>La lecture du bloc a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>La synchronisation de l'index des blocs a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>L''écriture de l'index des blocs a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>L'écriture des informations du bloc a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>L'écriture du bloc a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>L'écriture des informations de fichier a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>L'écriture dans la base de données des pièces a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>L'écriture de l'index des transactions a échoué</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>L'écriture des données d'annulation a échoué</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forcer le mode sans échec (par défaut : 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Générer des pièces (défaut : 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Nombre de blocs à vérifier au démarrage (par défaut : 288, 0 = tout)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Si &lt;category&gt; n'est pas indiqué, extraire toutes les données de débogage.</translation>
@@ -3015,8 +2887,8 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <translation>Pas assez de descripteurs de fichiers de disponibles.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Ajouter l'horodatage au début des résultats de débogage (par défaut : 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Se connecter uniquement aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3030,22 +2902,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Définir la taille minimale de bloc en octets (par défaut : %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Spécifiez le fichier de portefeuille (dans le répertoire de données)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Dépenser la monnaie non confirmée lors de l'envoi de transactions (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Arrêter l'exécution après l'importation des blocs du disque (par défaut : 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Ceci est à l'intention des outils de test de régression et du développement applicatif.</translation>
@@ -3074,10 +2934,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importe des blocs depuis un fichier blk000??.dat externe</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(par défaut : 1, 1 = conserver les données de transmission c.-à-d. propriétaire du compte et information de demande de paiement, 2 = abandonner les données de transmission)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Permettre les connexions JSON-RPC de sources spécifiques. Valide pour &lt;ip&gt; qui sont une IP simple (p. ex. 1.2.3.4), un réseau/masque réseau (p. ex. 1.2.3.4/255.255.255.0) ou un réseau/CIDR (p. ex. 1.2.3.4/24). Cette option peut être être spécifiée plusieurs fois</translation>
@@ -3114,10 +2970,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Erreur : l'argument non pris en charge -socks a été trouvé. Il n'est plus possible de définir la version de SOCKS, seuls les serveurs mandataires SOCKS5 sont pris en charge.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Exécuter la commande quand une transmission réseau redépense l'entrée d'une transmission du portefeuille (%s=respend TxID, %t=wallet TxID)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Exécuter une commande lorsqu'une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
@@ -3130,14 +2982,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Les frais (en BTC/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour la création de transactions (par défaut : %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Si paytxfee n'est pas défini, inclure suffisamment de frais afin que les transactions soient confirmées avant n blocs (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informations du résultat de débogage (par défaut : 0, fournir &lt;category&gt; est optionnel)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Demander les adresses des pairs par recherche DNS si l'on manque d'adresses (par défaut : 1 sauf si -connect)</translation>
@@ -3154,18 +2998,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <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>Avertissement : veuillez vérifier que l'heure et la date de votre ordinateur sont correctes ! Si votre horloge n'est pas à l'heure, Bitcoin Core ne fonctionnera pas correctement.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Pairs de la liste blanche se connectant à partir du masque réseau ou de l'IP donné. Peut être spécifié plusieurs fois.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Les pairs de la liste blanche ne peuvent pas être bannis DoS et leurs transactions sont toujours relayées, même si elles sont déjà dans le mempool, utile p. ex. pour une passerelle</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Toujours demander les adresses de pairs par recherche DNS (par défaut : 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Impossible de résoudre l'adresse -whitebind : « %s »</translation>
@@ -3194,10 +3030,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Les frais (en BTC/ko) à ajouter aux transactions que vous envoyez (par défaut : %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Inclure les adresses IP dans la sortie de débogage (par défaut : 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informations</translation>
@@ -3227,24 +3059,8 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <translation>Garder au plus &lt;n&gt; blocs non connectables en mémoire (par défaut : %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limiter la taille du cache des signatures à &lt;n&gt; entrées (par défaut : 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Journaliser la priorité des transactions et les frais par ko lors du minage (par défaut : 0) </translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Maintenir un index complet des transactions (par défaut : 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Tampon maximal de réception par « -connection » &lt;n&gt;*1 000 octets (par défaut : 5 000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tampon maximal d'envoi par « -connection », &lt;n&gt;*1 000 octets (par défaut : 1 000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Garder au plus &lt;n&gt; blocs non connectables en mémoire (par défaut : %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3254,22 +3070,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Node relay options:</source>
         <translation>Options de relais du nœud :</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>N'accepter que la chaîne de blocs correspondant aux points de vérification internes (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Se connecter uniquement aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprimer le bloc au démarrage s'il est trouvé dans l'index des blocs</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimer l'arborescence des blocs au démarrage (par défaut : 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Options RPC SSL : (voir le wiki Bitcoin pour les instructions de configuration de SSL)</translation>
@@ -3286,30 +3090,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Relayer et miner les transactions du porteur de données (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Relayer les multisig non-P2SH (par défaut : 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Exécuter un exétron pour purger le portefeuille périodiquement (par défaut : 1) </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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Définir la taille minimale de bloc en octets (par défaut : 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Définit le drapeau DB_PRIVATE dans l'environnement de la base de données du portefeuille (par défaut : 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Montrer toutes les options de débogage (utilisation : --help --help-debug)</translation>
@@ -3322,14 +3106,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>La signature de la transaction a échoué</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Spécifier le délai d'expiration de la connexion en millisecondes (par défaut : 5 000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Erreur système :</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Ceci est un logiciel expérimental.</translation>
@@ -3350,10 +3126,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Impossible de se lier à %s sur cet ordinateur (bind a retourné l'erreur %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 1 lors de l'écoute)</translation>
@@ -3406,10 +3178,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Mettre à niveau le portefeuille vers le format le plus récent</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Régler la taille de la réserve de clefs sur &lt;n&gt; (par défaut : 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Réanalyser la chaîne de blocs pour les transactions de portefeuille manquantes</translation>
@@ -3418,14 +3186,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utiliser OpenSSL (https) pour les connexions JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Fichier de certificat serveur (par défaut : server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clef privée du serveur (par défaut : server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Ce message d'aide</translation>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index b047bb5a4b8a..8d9295e5c92a 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -358,10 +358,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de ferramentas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Core de Bitcoin</translation>
@@ -394,10 +390,6 @@
         <source>No block source available...</source>
         <translation>Non hai orixe de bloques dispoñible...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Procesados %1 bloques do historial de transacccións.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
@@ -792,15 +784,7 @@ Dirección: %4
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de espacio libre dispoñible</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(de %1 GB precisados)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -953,10 +937,6 @@ Dirección: %4
         <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>A información amosada por estar desactualizada. O teu moedeiro sincronízase automáticamente coa rede Bitcoin despois de que se estableza unha conexión, pero este proceso non está todavía rematado.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Moedeiro</translation>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>O teu balance actualmente dispoñible</translation>
@@ -981,10 +961,6 @@ Dirección: %4
         <source>Your current total balance</source>
         <translation>O teu balance actual total</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaccións recentes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>non sincronizado</translation>
@@ -2070,26 +2046,10 @@ Dirección: %4
         <source>Options:</source>
         <translation>Opcións:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especificar arquivo de configuración (por defecto: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especificar arquivo de pid (por defecto: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especificar directorio de datos</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escoitar conexións no &lt;porto&gt; (por defecto: 8333 ou testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manter como moito &lt;n&gt; conexións con pares (por defecto: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectar a nodo para recuperar direccións de pares, e desconectar</translation>
@@ -2098,18 +2058,6 @@ Dirección: %4
         <source>Specify your own public address</source>
         <translation>Especificar a túa propia dirección pública</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral para desconectar pares con mal comportamento (por defecto: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos para manter sen reconectar aos pares con mal comportamento (por defecto: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escoitar conexións JSON-RPC no &lt;porto&gt; (por defecto: 8332 ou testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar liña de comandos e comandos JSON-RPC</translation>
@@ -2150,10 +2098,6 @@ Tamén é recomendable fixar alertnotify de modo que recibas notificación dos p
 por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifradores aceptables (por defecto: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Enlazar a unha dirección dada e escoitar sempre nela. Emprega a notación [host]:post para IPv6</translation>
@@ -2246,62 +2190,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erro: Moedeiro bloqueado, imposible crear transacción!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Erro: erro do sistema:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Fallou escoitar en calquera porto. Emprega -listen=0 se queres esto.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Fallou a lectura da información do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Fallou a lectura do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Fallou a sincronización do índice do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Fallou a escritura do índice do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Fallou a escritura da información do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Fallou a escritura do bloque</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Fallou a escritura da información do arquivo</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Fallou a escritura na base de datos de moedas</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Fallou a escritura do índice de transaccións</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Fallou a escritura dos datos para desfacer</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Xerar moedas (por defecto: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Cantos bloques para chequear ao arrancar (por defecto: 288, 0 = todos)</translation>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloque genesis incorrecto o no existente. Datadir erróneo para a rede?</translation>
@@ -2318,10 +2210,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruír índice de cadea de bloque dende os ficheiros actuais blk000??.dat</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Fixar o número de fíos para as chamadas aos servicios RPC (por defecto: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar arquivo do moedeiro (dentro do directorio de datos)</translation>
@@ -2362,34 +2250,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidade inválida para -mintxfee=&lt;cantidade&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manter un índice completo de transaccións (por defecto: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Máximo buffer por-conexión para recibir, &lt;n&gt;*1000 bytes (por defecto: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Máximo buffer por-conexión para enviar, &lt;n&gt;*1000 bytes (por defecto: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Aceptar so cadeas de bloques coincidentes con check-points incorporados (por defecto: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Conectar so a nodos na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar traza/información de depuración á consola en lugar de ao arquivo debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Fixar tamaño mínimo de bloque en bytes (por defecto: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Recortar o arquivo debug.log ao arrancar o cliente (por defecto: 1 cando no-debug)</translation>
@@ -2398,14 +2262,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Fallou a sinatura da transacción</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar tempo límite da conexión en milisegundos (por defecto: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Erro do sistema:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>A cantidade da transacción é demasiado pequena</translation>
@@ -2418,10 +2274,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction too large</source>
         <translation>A transacción é demasiado grande</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para mapear o porto de escoita (por defecto: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para mapear o porto de escoita (por defecto: 1 se á escoita)</translation>
@@ -2454,10 +2306,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizar moedeiro ao formato máis recente</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Fixar tamaño do pool de claves a &lt;n&gt; (por defecto: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescanear transaccións ausentes na cadea de bloques</translation>
@@ -2466,14 +2314,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Empregar OpenSSL (https) para conexións JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Arquivo de certificado do servidor (por defecto: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clave privada do servidor (por defecto: server.perm)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Esta mensaxe de axuda</translation>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index ae96d9f57073..8c05228dbfab 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -3,7 +3,7 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>לחץ לחיצה כפולה לערוך כתובת או תוית</translation>
+        <translation>לחיצה כפולה לעריכת כתובת או תווית</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -11,15 +11,15 @@
     </message>
     <message>
         <source>&amp;New</source>
-        <translation>&amp;חדש</translation>
+        <translation>&amp;חדשה</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>העתק את הכתובת המסומנת ללוח העריכה</translation>
+        <translation>העתקת הכתובת המסומנת ללוח הגזירים</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation>&amp;העתק</translation>
+        <translation>ה&amp;עתקה</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
@@ -27,78 +27,82 @@
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>העתק כתובת</translation>
+        <translation>העתקת כתובת</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>מחק את הכתובת שנבחרה מהרשימה</translation>
+        <translation>מחיקת הכתובת שנבחרה מהרשימה</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>יצוא הנתונים בטאב הנוכחי לקובץ</translation>
+        <translation>יצוא הנתונים מהלשונית הנוכחית לקובץ</translation>
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;ייצא</translation>
+        <translation>י&amp;צוא</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>&amp;מחק</translation>
+        <translation>מ&amp;חיקה</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>בחר את הכתובת אליה תרצה לשלוח את המטבעות</translation>
+        <translation>נא לבחור את הכתובת המבוקשת לשליחת המטבעות</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>בחר את הכתובת איתה תרצה לקבל את המטבעות</translation>
+        <translation>נא לבחור את הכתובת המבוקשת לקבלת המטבעות</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation>בחר</translation>
+        <translation>בחירה</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>כתובת לשליחה</translation>
+        <translation>כתובות לשליחה</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation>קבל כתובות</translation>
+        <translation>כתובות לקבלה</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>אלה כתובת הביטקוין שלך עבור שליחת תשלומים. תמיד בדוק את מספר ואת כתובות מקבלי התשלומים לפני שליחת מטבעות.</translation>
+        <translation>אלה כתובת הביטקוין שלך לצורך שליחת תשלומים. תמיד יש לבדוק את הכמות ואת כתובות מקבלי התשלומים לפני שליחת מטבעות.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>אלה כתובות הביטקוין שלך עבור קבלת תשלומים. מומלץ להשתמש בכתובת חדשה לכל פעולה.</translation>
+        <translation>אלה כתובות הביטקוין שלך לצורך קבלת תשלומים. מומלץ להשתמש בכתובת קבלה חדשה לכל העברה.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>העתק תוית</translation>
+        <translation>העתקת &amp;תווית</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation>עריכה</translation>
+        <translation>ע&amp;ריכה</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation>ייצוא רשימת כתובות</translation>
+        <translation>יצוא רשימת כתובות</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>קובץ מופרד בפסיקים (*.csv)</translation>
+        <translation>קובץ מופרד בפסיקים (‎*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>הייצוא נכשל</translation>
+        <translation>היצוא נכשל</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>אירעה שגיאה בעת הניסיון לשמור את רשימת הכתובת אל %1. נא לנסות שוב.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
         <source>Label</source>
-        <translation>תוית</translation>
+        <translation>תווית</translation>
     </message>
     <message>
         <source>Address</source>
@@ -106,34 +110,34 @@
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(ללא תוית)</translation>
+        <translation>(ללא תווית)</translation>
     </message>
 </context>
 <context>
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>שיח סיסמא</translation>
+        <translation>דו־שיח מילת צופן</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>הכנס סיסמה</translation>
+        <translation>נא להזין מילת צופן</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>סיסמה חדשה</translation>
+        <translation>מילת צופן חדשה</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>חזור על הסיסמה החדשה</translation>
+        <translation>נא לחזור על מילת הצופן החדשה</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>הצפן ארנק</translation>
+        <translation>הצפנת הארנק</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>הפעולה הזו דורשת את סיסמת הארנק שלך בשביל לפתוח את הארנק.</translation>
+        <translation>פעולה זו דורשת את מילת הצופן של הארנק שלך כדי לפתוח את הארנק.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -141,7 +145,7 @@
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>הפעולה הזו דורשת את סיסמת הארנק שלך בשביל לפענח את הארנק.</translation>
+        <translation>פעולה זו דורשת את מילת הצופן של הארנק שלך כדי לפענח את הארנק.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
@@ -149,39 +153,43 @@
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation>שינוי סיסמה</translation>
+        <translation>שינוי מילת צופן</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>הכנס את הסיסמות הישנה והחדשה לארנק.</translation>
+        <translation>נא להכניס את מילות הצופן הישנה והחדשה לארנק.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>אשר הצפנת ארנק</translation>
+        <translation>אישור הצפנת הארנק</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>אזהרה: אם אתה מצפין את הארנק ומאבד את הסיסמא, אתה &lt;b&gt;תאבד את כל הביטקוינים שלך&lt;/b&gt;!</translation>
+        <translation>אזהרה: הצפנת הארנק ואיבוד מילת הצופן עשויה להוביל &lt;b&gt;לאיבוד כל הביטקוינים שלך&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>האם אתה בטוח שברצונך להצפין את הארנק?</translation>
+        <translation>האם אכן להצפין את הארנק?</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>חשוב! כל גיבוי קודם שעשית לארנק שלך יש להחליף עם קובץ הארנק המוצפן שזה עתה נוצר. מסיבות אבטחה, גיבויים קודמים של קובץ הארנק הלא-מוצפן יהפכו לחסרי שימוש ברגע שתתחיל להשתמש בארנק החדש המוצפן.</translation>
+        <translation>לתשומת לבך: כל גיבוי קודם שביצעת לארנק שלך יש להחליף בקובץ הארנק המוצפן שזה עתה נוצר. מטעמי אבטחה, גיבויים קודמים של קובץ הארנק הבלתי-מוצפן יהפכו לחסרי תועלת עם התחלת השימוש בארנק החדש המוצפן.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>זהירות: מקש Caps Lock מופעל!</translation>
+        <translation>זהירות: מקש Caps Lock פעיל!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>הארנק הוצפן</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>נא להזין את מילת הצופן החדשה לארנק.&lt;br/&gt;כדאי להשתמש במילת צופן המורכבת מ&lt;b&gt;עשרה תווים אקראיים ומעלה&lt;/b&gt;, או &lt;b&gt;שמונה מילים ומעלה&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>ביטקוין ייסגר עכשיו כדי להשלים את תהליך ההצפנה. זכור שהצפנת הארנק שלך אינו יכול להגן באופן מלא על הביטקוינים שלך מתוכנות זדוניות המושתלות על המחשב.</translation>
+        <translation>ביטקוין ייסגר כעת כדי להשלים את תהליך ההצפנה. עליך לזכור שהצפנת הארנק שלך אינה מגנה באופן מלא על הביטקוינים שלך מתכניות זדוניות המושתלות על המחשב.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -193,7 +201,7 @@
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
-        <translation>הסיסמות שניתנו אינן תואמות.</translation>
+        <translation>מילות הצופן שסופקו אינן תואמות.</translation>
     </message>
     <message>
         <source>Wallet unlock failed</source>
@@ -201,7 +209,7 @@
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>הסיסמה שהוכנסה לפענוח הארנק שגויה.</translation>
+        <translation>מילת הצופן שהוכנסה לפענוח הארנק שגויה.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
@@ -209,34 +217,38 @@
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation>סיסמת הארנק שונתה בהצלחה.</translation>
+        <translation>מילת הצופן של הארנק שונתה בהצלחה.</translation>
     </message>
 </context>
 <context>
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>חתום על הודעה</translation>
+        <translation>&amp;חתימה על הודעה…</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>מסתנכרן עם הרשת...</translation>
+        <translation>בסנכרון עם הרשת…</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
         <translation>&amp;סקירה</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>מפרק</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>הצג סקירה כללית של הארנק</translation>
+        <translation>הצגת סקירה כללית של הארנק</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation>&amp;פעולות</translation>
+        <translation>ה&amp;עברות</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>דפדף בהיסטוריית הפעולות</translation>
+        <translation>עיון בהיסטוריית ההעברות</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
@@ -244,67 +256,83 @@
     </message>
     <message>
         <source>Quit application</source>
-        <translation>סגור תוכנה</translation>
+        <translation>יציאה מהתכנית</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
-        <translation>אודות Qt</translation>
+        <translation>על אודות Qt</translation>
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation>הצג מידע על Qt</translation>
+        <translation>הצגת מידע על Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>&amp;אפשרויות</translation>
+        <translation>&amp;אפשרויות…</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>הצפן ארנק</translation>
+        <translation>ה&amp;צפנת הארנק…</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>גיבוי ארנק</translation>
+        <translation>&amp;גיבוי הארנק…</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>שנה סיסמא</translation>
+        <translation>ה&amp;חלפת מילת הצופן…</translation>
+    </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>כתובת ה&amp;שליחה…</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>כתובות ה&amp;קבלה…</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>פתיחת &amp;כתובת משאב…</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>לקוח ליבה של ביטקוין</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation>מייבא בלוקים מהדיסק...</translation>
+        <translation>מקטעים מיובאים מהכונן…</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
-        <translation>מחדש את אינדקס הבלוקים בדיסק...</translation>
+        <translation>המקטעים נוספים למפתח בכונן…</translation>
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation>שלח מטבעות לכתובת ביטקוין</translation>
+        <translation>שליחת מטבעות לכתובת ביטקוין</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation>שנה אפשרויות תצורה עבור ביטקוין</translation>
+        <translation>שינוי התצורה של ביטקוין</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation>גיבוי הארנק למקום אחר</translation>
+        <translation>גיבוי הארנק למיקום אחר</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>שנה את הסיסמה להצפנת הארנק</translation>
+        <translation>החלפת מילת הצופן להצפנת הארנק</translation>
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>חלון ניפוי</translation>
+        <translation>חלון &amp;ניפוי</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation>פתח את לוח הבקרה לאבחון וניפוי</translation>
+        <translation>פתיחת לוח הבקרה לאבחון ולניפוי</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>אמת הודעה...</translation>
+        <translation>&amp;אימות הודעה…</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -316,23 +344,27 @@
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation>&amp;שלח</translation>
+        <translation>&amp;שליחה</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>וקבל</translation>
+        <translation>&amp;קבלה</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>הצגת מידע על ליבת ביטקוין</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation>הצג / הסתר</translation>
+        <translation>ה&amp;צגה / הסתרה</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
-        <translation>הצג או הסתר את החלון הראשי</translation>
+        <translation>הצגה או הסתרה של החלון הראשי</translation>
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>הצפן את המפתחות הפרטיים ששייכים לארנק שלך</translation>
+        <translation>הצפנת המפתחות הפרטיים ששייכים לארנק שלך</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
@@ -352,15 +384,11 @@
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation>&amp;עזרה</translation>
+        <translation>ע&amp;זרה</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>סרגל כלים טאבים</translation>
-    </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[רשת-בדיקה]</translation>
+        <translation>סרגל כלים לשוניות</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
@@ -368,11 +396,11 @@
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>בקש תשלומים (מייצר קודיי QR וסכימות URI של :bitcoin)</translation>
+        <translation>בקשת תשלומים (יצירה של קודים מסוג QR וסכימות כתובות משאב של :bitcoin)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation>&amp;אודות קליינט ביטקוין</translation>
+        <translation>על &amp;אודות ליבת ביטקוין</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -380,19 +408,23 @@
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation>הצג את רשימת הכתובות והתויות המשומשות</translation>
+        <translation>הצגת רשימת הכתובות והתוויות הנמצאות בשימוש</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>פתח ביטקוין: URI או בקשת תשלום</translation>
+        <translation>פתיחת ביטקוין: כתובת משאב או בקשת תשלום</translation>
     </message>
     <message>
-        <source>No block source available...</source>
-        <translation>אין קוד נתון</translation>
+        <source>&amp;Command-line options</source>
+        <translation>אפשרויות &amp;שורת הפקודה</translation>
+    </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>הצגת הודעות העזרה של ליבת ביטקוין כדי לקבל רשימה עם אפשרויות שורת הפקודה האפשריות של ביטקוין</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>הושלם עיבוד של %1 בלוקים של היסטוריית פעולות.</translation>
+        <source>No block source available...</source>
+        <translation>אין מקור מקטעים זמין…</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -406,13 +438,17 @@
         <source>%n week(s)</source>
         <translation><numerusform>%n שבוע</numerusform><numerusform>%n שבועות</numerusform></translation>
     </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation>%1 ו%2</translation>
+    </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation>הבלוק האחרון שהתקבל נוצר לפני %1</translation>
+        <translation>המקטע האחרון שהתקבל נוצר לפני %1.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>לאחר זאת פעולות נספות טרם יהיו גלויות</translation>
+        <translation>ההעברות שבוצעו לאחר העברה זו לא יופיעו.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -432,15 +468,15 @@
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>מתעדכן...</translation>
+        <translation>מתבצע עדכון…</translation>
     </message>
     <message>
         <source>Sent transaction</source>
-        <translation>פעולה שנשלחה</translation>
+        <translation>העברת שליחה</translation>
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>פעולה שהתקבלה</translation>
+        <translation>העברת קבלה</translation>
     </message>
     <message>
         <source>Date: %1
@@ -455,11 +491,11 @@ Address: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; וכרגע &lt;b&gt;פתוח&lt;/b&gt;</translation>
+        <translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; ו&lt;b&gt;פתוח&lt;/b&gt; כרגע</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; וכרגע &lt;b&gt;נעול&lt;/b&gt;</translation>
+        <translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; ו&lt;b&gt;נעול&lt;/b&gt; כרגע</translation>
     </message>
 </context>
 <context>
@@ -473,7 +509,7 @@ Address: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Control Address Selection</source>
-        <translation>בחירת כתובת שליטת מטבעות</translation>
+        <translation>בחירת כתובת שליטה במטבעות</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -481,7 +517,7 @@ Address: %4
     </message>
     <message>
         <source>Bytes:</source>
-        <translation>בייטים:</translation>
+        <translation>בתים:</translation>
     </message>
     <message>
         <source>Amount:</source>
@@ -489,12 +525,16 @@ Address: %4
     </message>
     <message>
         <source>Priority:</source>
-        <translation>קדימות:</translation>
+        <translation>עדיפות:</translation>
     </message>
     <message>
         <source>Fee:</source>
         <translation>תשלום:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>אבק:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>לאחר עמלה:</translation>
@@ -505,7 +545,7 @@ Address: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation>(מחק)(בחר) הכל</translation>
+        <translation>ביטול/אישור הבחירה</translation>
     </message>
     <message>
         <source>Tree mode</source>
@@ -513,7 +553,7 @@ Address: %4
     </message>
     <message>
         <source>List mode</source>
-        <translation>מצר רשימה</translation>
+        <translation>מצב רשימה</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -537,63 +577,67 @@ Address: %4
     </message>
     <message>
         <source>Priority</source>
-        <translation>קדימות</translation>
+        <translation>עדיפות</translation>
     </message>
     <message>
         <source>Copy address</source>
-        <translation>העתק כתובת</translation>
+        <translation>העתקת כתובת</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>העתק תוית</translation>
+        <translation>העתקת תווית</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת כמות</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>העתק מזהה פעולה</translation>
+        <translation>העתקת מזהה העברה</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation>נעל יתרה</translation>
+        <translation>נעילת יתרה</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation>פתח יתרה</translation>
+        <translation>פתיחת יתרה</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת כמות</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>העתק מחיר</translation>
+        <translation>העתקת מחיר</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>העתק אחרי עמלה</translation>
+        <translation>העתקת אחרי עמלה</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation>העתק בייטים</translation>
+        <translation>העתקת בתים</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation>העתק קדימות</translation>
+        <translation>העתקת עדיפות</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>העתקת אבק</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation>העתק עודף</translation>
+        <translation>העתקת עודף</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation>הכי גבוה</translation>
+        <translation>הגבוה ביותר</translation>
     </message>
     <message>
         <source>higher</source>
-        <translation>גבוהה יותר</translation>
+        <translation>גבוה יותר</translation>
     </message>
     <message>
         <source>high</source>
@@ -601,7 +645,7 @@ Address: %4
     </message>
     <message>
         <source>medium-high</source>
-        <translation>בנוני גבוה</translation>
+        <translation>בינוני - גבוה</translation>
     </message>
     <message>
         <source>medium</source>
@@ -621,7 +665,15 @@ Address: %4
     </message>
     <message>
         <source>lowest</source>
-        <translation>הכי נמוך</translation>
+        <translation>הנמוך ביותר</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>ללא</translation>
+    </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>יכולה להשתנות ב+/- %1 סטושי לקלט.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -633,23 +685,27 @@ Address: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation>תווית זו מאדימה במידה וגודל הפעולה עולה על 1000 בייט</translation>
+        <translation>תווית זו מאדימה אם גודל ההעברה עולה על 1000 בתים.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>זאת אומרת שנחוצה עמלה של לא פחות מ־%1 לכל קילו בייט.</translation>
+        <translation>זאת אומרת שנחוצה עמלה של לא פחות מ־%1 לכל קילו בית.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
-        <translation>הערך יכול להיות +/- בייט 1 פר כניסה</translation>
+        <translation>הערך יכול להיות +/- בית אחד לכל קלט.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation>העברות עם עדיפות גבוהה, יותר סיכוי שיכנסו לתוך הבלוק</translation>
+        <translation>העברות עם עדיפות גבוהה, יותר סיכוי שיכנסו לתוך המקטע.</translation>
+    </message>
+    <message>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>תווית זו מאדימה אם העדיפות היא פחות מ„בינוני“</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(ללא תוית)</translation>
+        <translation>(אין תווית)</translation>
     </message>
     <message>
         <source>change from %1 (%2)</source>
@@ -664,15 +720,15 @@ Address: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>ערוך כתובת</translation>
+        <translation>עריכת כתובת</translation>
     </message>
     <message>
         <source>&amp;Label</source>
-        <translation>ת&amp;וית</translation>
+        <translation>ת&amp;ווית</translation>
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation>התוית המשויכת לרשומה הזו ברשימת הכתובות</translation>
+        <translation>התווית המשויכת לרשומה הזו ברשימת הכתובות</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
@@ -692,19 +748,19 @@ Address: %4
     </message>
     <message>
         <source>Edit receiving address</source>
-        <translation>ערוך כתובת לקבלה</translation>
+        <translation>עריכת כתובת לקבלה</translation>
     </message>
     <message>
         <source>Edit sending address</source>
-        <translation>ערוך כתובת לשליחה</translation>
+        <translation>עריכת כתובת לשליחה</translation>
     </message>
     <message>
         <source>The entered address "%1" is already in the address book.</source>
-        <translation>הכתובת שהכנסת "%1" כבר נמצאת בפנקס הכתובות.</translation>
+        <translation>הכתובת שהוכנסה „%1“ כבר נמצאת בפנקס הכתובות.</translation>
     </message>
     <message>
         <source>The entered address "%1" is not a valid Bitcoin address.</source>
-        <translation>הכתובת שהוכנסה "%1" אינה כתובת ביטקוין תקינה.</translation>
+        <translation>הכתובת שהוכנסה „%1“ אינה כתובת ביטקוין תקנית.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -719,7 +775,7 @@ Address: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation>ספריית מידע חדשה תיווצר.</translation>
+        <translation>תיקיית נתונים חדשה תיווצר.</translation>
     </message>
     <message>
         <source>name</source>
@@ -727,15 +783,15 @@ Address: %4
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation>הספריה כבר קיימת. הוסף %1 אם ברצונך ליצור ספריה חדשה כאן.</translation>
+        <translation>התיקייה כבר קיימת. ניתן להוסיף %1 אם יש ליצור תיקייה חדשה כאן.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation>הנתיב כבר קיים ואינו מצביע על ספרייה.</translation>
+        <translation>הנתיב כבר קיים ואינו מצביע על תיקייה.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation>לא ניתן ליצור ספריית מידע כאן.</translation>
+        <translation>לא ניתן ליצור כאן תיקיית נתונים.</translation>
     </message>
 </context>
 <context>
@@ -748,6 +804,10 @@ Address: %4
         <source>version</source>
         <translation>גרסה</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-סיביות)</translation>
+    </message>
     <message>
         <source>About Bitcoin Core</source>
         <translation>על אודות ליבת ביטקוין</translation>
@@ -766,21 +826,29 @@ Address: %4
     </message>
     <message>
         <source>UI options</source>
-        <translation>אפשרויות ממשק</translation>
+        <translation>אפשרויות מנשק</translation>
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
-        <translation>קבע שפה, למשל "he_il" (ברירת מחדל: שפת המערכת)</translation>
+        <translation>הגדרת שפה, למשל „he_il“ (בררת מחדל: שפת המערכת)</translation>
     </message>
     <message>
         <source>Start minimized</source>
-        <translation>התחל ממוזער</translation>
+        <translation>התחלה במצב ממוזער</translation>
+    </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>הגדרות אישורי בסיס של SSL לבקשות תשלום (בררת המחדל: -מערכת-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>הצג מסך פתיחה בעת הפעלה (ברירת מחדל: 1)</translation>
+        <translation>הצגת מסך פתיחה בעת הפעלה (בררת מחדל: 1)</translation>
     </message>
-    </context>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation>בחירת תיקיית נתונים עם ההפעלה (בררת מחדל: 0)</translation>
+    </message>
+</context>
 <context>
     <name>Intro</name>
     <message>
@@ -789,54 +857,50 @@ Address: %4
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation>ברוך הבא לקליינט ביטקוין</translation>
+        <translation>ברוך בואך לליבת ביטקוין</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation>מכיוון שזאת הפעם הראשונה שהתוכנה הופעלה תוכל לבחור איפה ביטקויין קור תאכסן את </translation>
+        <translation>מכיוון שזאת הפעם הראשונה שהתכנית פועלת ניתן לבחור איפה ליבת ביטקוין תאחסן את הנתונים שלה.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>קליינט ביטקוין יוריד וישמור העתק של שרשרת הבלוקים של ביטקוין. לפחות %1GB מהנתונים יאוכסנו בתיקיה הזו, ויגדל עם הזמן. הארנק גם יאוחסן בתיקיה הזו.</translation>
+        <translation>לקוח ביטקוין יוריד וישמור העתק של שרשרת המקטעים של ביטקוין. לפחות %1 ג״ב מהנתונים יאוחסנו בתיקייה זו, והיא תגדל עם הזמן. הארנק גם יאוחסן בתיקייה הזו.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation>השתמש בברירת המחדל עבור ספריית המידע.</translation>
+        <translation>שימוש בבררת המחדל של תיקיית הנתונים.</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation>השתמש בספריית מידע מותאמת אישית:</translation>
+        <translation>שימוש בתיקיית נתונים מותאמת אישית:</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>ליבת ביטקוין</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>שגיאה</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>ג"ב של שטח אחסון פנוי</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>שגיאה: לא ניתן ליצור את תיקיית הנתונים שצוינה „%1“.</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation>(מתוך %1 ג"ב נחוצים)</translation>
+        <source>Error</source>
+        <translation>שגיאה</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation>פתח URI</translation>
+        <translation>פתיחת כתובת משאב</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
-        <translation>פתח בקשת תשלום מ-URI או קובץ</translation>
+        <translation>פתיחת בקשת תשלום מכתובת משאב או מקובץ</translation>
     </message>
     <message>
         <source>URI:</source>
-        <translation>כתובת:</translation>
+        <translation>כתובת משאב:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
@@ -855,63 +919,127 @@ Address: %4
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation>ראשי</translation>
+        <translation>&amp;ראשי</translation>
     </message>
     <message>
         <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>עמלת פעולה אופציונלית לכל kB תבטיח שהפעולה שלך תעובד בזריזות. רוב הפעולות הן 1 kB.</translation>
+        <translation>עמלת העברה כרשות לכל ק״ב תבטיח שההעברה שלך תעובד בזריזות. רוב ההעברות הן בנפח של ק״ב אחד.</translation>
     </message>
     <message>
         <source>Pay transaction &amp;fee</source>
-        <translation>שלם &amp;עמלת פעולה</translation>
+        <translation>תשלום &amp;עמלת העברה</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>הפעל את ביטקוין באופן עצמאי לאחר התחברות למערכת.</translation>
+        <translation>הפעלת ביטקוין אוטומטית לאחר כניסה למערכת.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>התחל את ביטקוין בעת התחברות למערכת</translation>
+        <translation>ה&amp;פעלת ביטקוין בעת הכניסה למערכת</translation>
+    </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>גודל מ&amp;טמון מסד הנתונים</translation>
     </message>
     <message>
         <source>MB</source>
-        <translation>מגה בייט</translation>
+        <translation>מ״ב</translation>
+    </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>מספר תהליכי ה&amp;אימות של הסקריפט</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>קבלת חיבורים מבחוץ</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>לאפשר חיבורים נכנסים</translation>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>התחברות לרשת ביטקוין דרך מתווך SOCKS.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
+        <translation>הת&amp;חברות באמצעות מתווך SOCKS (מתווך בררת מחדל):</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>כתובת ה־IP של המתווך (לדוגמה IPv4: 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>כתובות צד־שלישי (כגון: סייר מקטעים) שמופיעים בלשונית ההעברות בתור פריטים בתפריט ההקשר. %s בכתובת מוחלף בגיבוב ההעברה. מספר כתובות יופרדו בפס אנכי |.</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>אפס כל אפשרויות התוכנה לברירת המחדל.</translation>
+        <translation>איפוס כל אפשרויות התכנית לבררת המחדל.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation>איפוס אפשרויות</translation>
+        <translation>&amp;איפוס אפשרויות</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation>רשת</translation>
+        <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>
+    <message>
+        <source>Expert</source>
+        <translation>מומחה</translation>
+    </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>הפעלת תכונות &amp;בקרת מטבעות</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>פתח את פורט ביטקוין בנתב באופן אוטומטי. עובד רק אם UPnP מאופשר ונתמך ע"י הנתב.</translation>
+        <translation>פתיחת הפתחה של ביטקוין בנתב באופן אוטומטי. עובד רק אם UPnP מופעל ונתמך בנתב.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>מיפוי פורט באמצעות UPnP</translation>
+        <translation>מיפוי פתחה באמצעות UPnP</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
-        <translation>כתובת IP של פרוקסי:</translation>
+        <translation>כתובת ה־IP של המ&amp;תווך:</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation>פורט:</translation>
+        <translation>&amp;פתחה:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>הפורט של הפרוקסי (למשל 9050)</translation>
+        <translation>הפתחה של המתווך (למשל 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
-        <translation>חלון</translation>
+        <translation>&amp;חלון</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
@@ -919,59 +1047,75 @@ Address: %4
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>מ&amp;זער למגש במקום לשורת המשימות</translation>
+        <translation>מ&amp;זעור למגש במקום לשורת המשימות</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 Quit in the menu.</source>
-        <translation>מזער את התוכנה במקום לצאת ממנה כשהחלון נסגר. כשאפשרות זו פעילה, התוכנה תיסגר רק לאחר בחירת יציאה מהתפריט.</translation>
+        <translation>מזעור התכנית במקום לצאת ממנה כשהחלון נסגר. כשאפשרות זו פעילה, התכנית תיסגר רק לאחר בחירת יציאה מהתפריט.</translation>
     </message>
     <message>
         <source>M&amp;inimize on close</source>
-        <translation>מזער בעת סגירה</translation>
+        <translation>מ&amp;זעור עם סגירה</translation>
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation>תצוגה</translation>
+        <translation>ת&amp;צוגה</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>שפת ממשק המשתמש:</translation>
+        <translation>&amp;שפת מנשק המשתמש:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>ניתן לקבוע כאן את שפת ממשק המשתמש. הגדרה זו תחול לאחר הפעלה מחדש של ביטקוין.</translation>
+        <translation>להלן ניתן לקבוע את שפת מנשק המשתמש. הגדרה זו תיכנס לתוקף לאחר הפעלה מחדש של ביטקוין.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
-        <translation>יחידת מדידה להצגת כמויות:</translation>
+        <translation>י&amp;חידת מידה להצגת כמויות:</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>בחר את ברירת המחדל ליחידת החלוקה אשר תוצג בממשק ובעת שליחת מטבעות.</translation>
+        <translation>ניתן לבחור את בררת המחדל ליחידת החלוקה שתוצג במנשק ובעת שליחת מטבעות.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation>הצג תכונות שליטת מטבע או לא.</translation>
+        <translation>האם להציג תכונות שליטת מטבע או לא.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation>אישור</translation>
+        <translation>&amp;אישור</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation>ביטול</translation>
+        <translation>&amp;ביטול</translation>
     </message>
     <message>
         <source>default</source>
-        <translation>ברירת מחדל</translation>
+        <translation>בררת מחדל</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>ללא</translation>
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation>אשר את איפוס האפשרויות</translation>
+        <translation>אישור איפוס האפשרויות</translation>
+    </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>נדרשת הפעלה מחדש של הלקוח כדי להפעיל את השינויים.</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>הלקוח יכבה, האם להמשיך?</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>שינוי זה ידרוש הפעלה מחדש של תכנית הלקוח.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>כתובת הפרוקסי שסופקה אינה תקינה.</translation>
+        <translation>כתובת המתווך שסופקה אינה תקינה.</translation>
     </message>
 </context>
 <context>
@@ -982,19 +1126,27 @@ Address: %4
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>המידע המוצג עשוי להיות מיושן. הארנק שלך מסתנכרן באופן אוטומטי עם רשת הביטקוין לאחר כינון חיבור, אך התהליך טרם הסתיים.</translation>
+        <translation>המידע המוצג עשוי להיות מיושן. הארנק שלך מסתנכרן באופן אוטומטי עם רשת הביטקוין לאחר יצירת החיבור, אך התהליך טרם הסתיים.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>ארנק</translation>
+        <source>Watch-only:</source>
+        <translation>צפייה בלבד:</translation>
+    </message>
+    <message>
+        <source>Available:</source>
+        <translation>זמין:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>היתרה הזמינה הנוכחית</translation>
     </message>
+    <message>
+        <source>Pending:</source>
+        <translation>בהמתנה:</translation>
+    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>הסכום הכולל של פעולות שטרם אושרו, ועוד אינן נספרות בחישוב היתרה הזמינה</translation>
+        <translation>הסכום הכולל של העברות שטרם אושרו ועדיין אינן נספרות בחישוב היתרה הזמינה</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1004,6 +1156,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>מאזן שנכרה וטרם הבשיל</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>מאזנים</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>סך הכול:</translation>
@@ -1013,27 +1169,59 @@ Address: %4
         <translation>סך כל היתרה הנוכחית שלך</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;פעולות אחרונות&lt;/b&gt;</translation>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>המאזן הנוכחי שלך בכתובות לקריאה בלבד</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>העברות אחרונות</translation>
+    </message>
+    <message>
+        <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>
     <message>
         <source>out of sync</source>
-        <translation>לא מסונכרן</translation>
+        <translation>לא בסנכרון</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
         <source>URI handling</source>
-        <translation>תפעול URI</translation>
+        <translation>תפעול כתובות משאב</translation>
     </message>
     <message>
         <source>Invalid payment address %1</source>
         <translation>כתובת תשלום שגויה %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>בקשת התשלום נדחתה</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>רשת בקשת התשלום אינה תואמת לרשת הלקוח.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>בקשת התשלום פגה.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>בקשת התשלום לא החלה.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>הסכום הנדרש לתשלום %1 קטן מדי (נחשב לאבק)</translation>
+        <translation>הסכום על סך %1 הנדרש לתשלום קטן מדי (נחשב לאבק)</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1041,11 +1229,27 @@ Address: %4
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>לא ניתן להתחיל את ביטקוין: מפעיל לחץ-לתשלום </translation>
+        <translation>לא ניתן להתחיל את ביטקוין: טיפול בלחיצה–לתשלום </translation>
+    </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>כתובת אחזור בקשת התשלום שגויה: %1</translation>
+    </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>לא ניתן לנתח את כתובת המשאב! מצב זה יכול לקרות עקב כתובת ביטקוין שגויה או פרמטרים שגויים בכתובת המשאב.</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>טיפול בקובצי בקשות תשלום</translation>
+    </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>לא ניתן לקרוא את קובץ בקשת התשלום! מצב כזה יכול לקרות בעקבות קובץ בקשת תשלום פגום.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation>בקשות לתשלום לסקריפטיי תשלום מותאמים אישית אינן נתמכות.</translation>
+        <translation>בקשות תשלום בלתי מאומתות לסקריפטים לתשלום מותאמים אישית אינן נתמכות.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1055,6 +1259,10 @@ Address: %4
         <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>
@@ -1070,62 +1278,106 @@ Address: %4
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>סוכן משתמש</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>כתובת/שם מארח</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>זמן המענה</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>כמות</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>נא להזין כתובת ביטקוין (למשל: %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 ימים</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 שעות</translation>
     </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 דקות</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 שניות</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>רשת</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>לא ידוע</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>ללא</translation>
+    </message>
     <message>
         <source>N/A</source>
-        <translation>N/A</translation>
+        <translation>לא זמין</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 מילישניות</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;שמור תמונה..</translation>
+        <translation>&amp;שמירת תמונה…</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation>&amp;העתק תמונה</translation>
+        <translation>ה&amp;עתקת תמונה</translation>
     </message>
     <message>
         <source>Save QR Code</source>
-        <translation>שמור קוד QR</translation>
+        <translation>שמירת קוד QR</translation>
     </message>
     <message>
         <source>PNG Image (*.png)</source>
-        <translation>תמונת PNG (*.png)</translation>
+        <translation>תמונת PNG ‏(‎*.png)</translation>
     </message>
 </context>
 <context>
     <name>RPCConsole</name>
     <message>
         <source>Client name</source>
-        <translation>שם ממשק</translation>
+        <translation>שם לקוח</translation>
     </message>
     <message>
         <source>N/A</source>
-        <translation>N/A</translation>
+        <translation>לא זמין</translation>
     </message>
     <message>
         <source>Client version</source>
-        <translation>גרסת ממשק</translation>
+        <translation>גרסת מנשק</translation>
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>מידע</translation>
+        <translation>מי&amp;דע</translation>
     </message>
     <message>
         <source>Debug window</source>
-        <translation>חלון דיבאג</translation>
+        <translation>חלון ניפוי</translation>
     </message>
     <message>
         <source>General</source>
@@ -1133,11 +1385,15 @@ Address: %4
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation>משתמש ב-OpenSSL גרסה</translation>
+        <translation>שימוש ב־OpenSSL גרסה</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>שימוש ב־BerkeleyDB גרסה</translation>
     </message>
     <message>
         <source>Startup time</source>
-        <translation>זמן אתחול</translation>
+        <translation>זמן עלייה</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1153,23 +1409,91 @@ Address: %4
     </message>
     <message>
         <source>Block chain</source>
-        <translation>שרשרת הבלוקים</translation>
+        <translation>שרשרת מקטעים</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
-        <translation>מספר הבלוקים הנוכחי</translation>
+        <translation>מספר המקטעים הנוכחי</translation>
+    </message>
+    <message>
+        <source>Received</source>
+        <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>Direction</source>
+        <translation>כיוון</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>גרסה</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>סוכן משתמש</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <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>בתים שנשלחו</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>בתים שהתקבלו</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>זמן המענה</translation>
     </message>
     <message>
         <source>Last block time</source>
-        <translation>זמן הבלוק האחרון</translation>
+        <translation>זמן המקטע האחרון</translation>
     </message>
     <message>
         <source>&amp;Open</source>
-        <translation>פתח</translation>
+        <translation>&amp;פתיחה</translation>
     </message>
     <message>
         <source>&amp;Console</source>
-        <translation>לוח בקרה</translation>
+        <translation>מ&amp;סוף בקרה</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
@@ -1177,7 +1501,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation>&amp; נקה</translation>
+        <translation>&amp;ניקוי</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1193,7 +1517,7 @@ Address: %4
     </message>
     <message>
         <source>Build date</source>
-        <translation>תאריך בניה</translation>
+        <translation>תאריך בנייה</translation>
     </message>
     <message>
         <source>Debug log file</source>
@@ -1201,41 +1525,65 @@ Address: %4
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>פתח את קובץ יומן הניפוי מתיקיית הנתונים הנוכחית. זה עשוי לקחת מספר שניות עבור קובצי יומן גדולים.</translation>
+        <translation>פתיחת קובץ יומן הניפוי מתיקיית הנתונים הנוכחית. פעולה זו עשויה להימשך מספר שניות עבור קובצי יומן גדולים.</translation>
     </message>
     <message>
         <source>Clear console</source>
-        <translation>נקה לוח בקרה</translation>
+        <translation>ניקוי מסוף הבקרה</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>ברוכים הבאים ללוח בקרת RPC של ביטקוין</translation>
+        <translation>ברוכים הבאים למסוף ה־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>השתמש בחיצים למעלה ולמטה כדי לנווט בהיסטוריה, ו- &lt;b&gt;Ctrl-L&lt;/b&gt; כדי לנקות את המסך.</translation>
+        <translation>יש להשתמש בחצים למעלה ולמטה כדי לנווט בהיסטוריה, וב־&lt;b&gt;Ctrl-L&lt;/b&gt; כדי לנקות את המסך.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>הקלד &lt;b&gt;help&lt;/b&gt; בשביל סקירה של הפקודות הזמינות.</translation>
+        <translation>ניתן להקליד &lt;b&gt;help&lt;/b&gt; לקבלת סקירה של הפקודות הזמינות.</translation>
     </message>
     <message>
         <source>%1 B</source>
-        <translation>%1 בייט</translation>
+        <translation>%1 ב׳</translation>
     </message>
     <message>
         <source>%1 KB</source>
-        <translation>%1 קילו בייט</translation>
+        <translation>%1 ק״ב</translation>
     </message>
     <message>
         <source>%1 MB</source>
-        <translation>%1 מגה בייט</translation>
+        <translation>%1 מ״ב</translation>
     </message>
     <message>
         <source>%1 GB</source>
-        <translation>%1 ג'יגה בייט</translation>
+        <translation>%1 ג״ב</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>דרך %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>לעולם לא</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>תעבורה נכנסת</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>תעבורה יוצאת</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>לא ידוע</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>מתקבל…</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1244,55 +1592,79 @@ Address: %4
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>ת&amp;וית:</translation>
+        <translation>ת&amp;ווית:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation>&amp;הודעה:</translation>
+        <translation>הו&amp;דעה:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>השתמש שוב באחת מכתובות הקבלה שכבר נעשה בהן שימוש. לשימוש חוזר בכתובות ישהן השלכות אבטחה ופרטיות. השתמש בזה רק אם אתה מייצר מחדש בקשת תשלום שכבר נעשתה.</translation>
+        <translation>ניתן להשתמש שוב באחת מכתובות הקבלה שכבר נעשה בהן שימוש. לשימוש חוזר בכתובות ישנן השלכות אבטחה ופרטיות. מומלץ שלא להשתמש באפשרות זו למעט יצירה מחדש של בקשת תשלום שנוצרה בעבר.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation>ש&amp;ימוש חוזר בכתובת קבלה קיימת(לא מומלץ)</translation>
+        <translation>ש&amp;ימוש &amp;חוזר בכתובת קבלה קיימת (לא מומלץ)</translation>
+    </message>
+    <message>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation>הודעת רשות לצירוף לבקשת התשלום שתוצג בעת פתיחת הבקשה. לתשומת לבך: ההודעה לא תישלח עם התשלום ברשת ביטקוין.</translation>
+    </message>
+    <message>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation>תווית רשות לשיוך עם כתובת הקבלה החדשה.</translation>
+    </message>
+    <message>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>יש להשתמש בטופס זה כדי לבקש תשלומים. כל השדות הם בגדר &lt;b&gt;רשות&lt;/b&gt;.</translation>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>סכום כרשות לבקשה. ניתן להשאיר זאת ריק כדי לא לבקש סכום מסוים.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>נקה את כל השדות</translation>
+        <translation>ניקוי כל השדות של הטופס.</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation>נקה</translation>
+        <translation>ניקוי</translation>
+    </message>
+    <message>
+        <source>Requested payments history</source>
+        <translation>היסטוריית בקשות תשלום</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation>&amp;בקש תשלום</translation>
+        <translation>&amp;בקשת תשלום</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation>הצג בקשות נבחרות (דומה ללחיצה כפולה על רשומה)</translation>
+        <translation>הצגת בקשות נבחרות (דומה ללחיצה כפולה על רשומה)</translation>
     </message>
     <message>
         <source>Show</source>
-        <translation>הצג</translation>
+        <translation>הצגה</translation>
     </message>
     <message>
         <source>Remove the selected entries from the list</source>
-        <translation>הסר הרשומות הנבחרות מהרשימה</translation>
+        <translation>הסרת הרשומות הנבחרות מהרשימה</translation>
     </message>
     <message>
         <source>Remove</source>
-        <translation>הסר</translation>
+        <translation>הסרה</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>העתק תוית</translation>
+        <translation>העתקת תווית</translation>
+    </message>
+    <message>
+        <source>Copy message</source>
+        <translation>העתקת הודעה</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת כמות</translation>
     </message>
 </context>
 <context>
@@ -1303,27 +1675,27 @@ Address: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>העתק &amp;URI</translation>
+        <translation>העתקת &amp;כתובת משאב</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>התעק &amp;כתובת</translation>
+        <translation>העתקת &amp;כתובת</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;שמור תמונה..</translation>
+        <translation>&amp;שמירת תמונה…</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation>בקש תשלום ל %1</translation>
+        <translation>בקשת תשלום לטובת %1</translation>
     </message>
     <message>
         <source>Payment information</source>
-        <translation>אנפרומצייה על התשלום</translation>
+        <translation>מידע על תשלום</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation>כתובת (אתר או משאב)</translation>
+        <translation>כתובת משאב</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1335,7 +1707,7 @@ Address: %4
     </message>
     <message>
         <source>Label</source>
-        <translation>תוית</translation>
+        <translation>תווית</translation>
     </message>
     <message>
         <source>Message</source>
@@ -1343,11 +1715,11 @@ Address: %4
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>המזהה המתקבל ארוך מדי, נסה להפחית את הטקסט בתוית / הודעה.</translation>
+        <translation>כתובת המשאב המתקבלת ארוכה מדי, כדאי לנסות לצמצם את הטקסט בתווית / הודעה.</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>שגיאה בקידוד URI לקוד QR</translation>
+        <translation>שגיאה בקידוד כתובת משאב לקוד QR</translation>
     </message>
 </context>
 <context>
@@ -1358,7 +1730,7 @@ Address: %4
     </message>
     <message>
         <source>Label</source>
-        <translation>תוית</translation>
+        <translation>תווית</translation>
     </message>
     <message>
         <source>Message</source>
@@ -1370,30 +1742,34 @@ Address: %4
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(ללא תוית)</translation>
+        <translation>(אין תווית)</translation>
     </message>
     <message>
         <source>(no message)</source>
-        <translation>(אין הודעות)</translation>
+        <translation>(אין הודעה)</translation>
     </message>
-    </context>
+    <message>
+        <source>(no amount)</source>
+        <translation>(אין סכום)</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation>שלח מטבעות</translation>
+        <translation>שליחת מטבעות</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation>ה</translation>
+        <translation>תכונות בקרת מטבעות</translation>
     </message>
     <message>
         <source>Inputs...</source>
-        <translation>כניסות...</translation>
+        <translation>קלטים…</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation>נבחר אוטומאטית</translation>
+        <translation>בבחירה אוטומטית</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1405,19 +1781,19 @@ Address: %4
     </message>
     <message>
         <source>Bytes:</source>
-        <translation>בייטים:</translation>
+        <translation>בתים:</translation>
     </message>
     <message>
         <source>Amount:</source>
-        <translation>כמות:</translation>
+        <translation>סכום:</translation>
     </message>
     <message>
         <source>Priority:</source>
-        <translation>קדימות:</translation>
+        <translation>עדיפות:</translation>
     </message>
     <message>
         <source>Fee:</source>
-        <translation>תשלום:</translation>
+        <translation>עמלה:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -1425,7 +1801,11 @@ Address: %4
     </message>
     <message>
         <source>Change:</source>
-        <translation>שינוי:</translation>
+        <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>
@@ -1433,35 +1813,39 @@ Address: %4
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation>שלח למספר מקבלים בו-זמנית</translation>
+        <translation>שליחה למספר מוטבים בו־זמנית</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation>הוסף מקבל</translation>
+        <translation>הוספת &amp;מוטב</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>נקה את כל השדות</translation>
+        <translation>ניקוי של כל השדות בטופס.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>אבק:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>נקה הכל</translation>
+        <translation>ניקוי ה&amp;כול</translation>
     </message>
     <message>
         <source>Balance:</source>
-        <translation>יתרה:</translation>
+        <translation>מאזן:</translation>
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation>אשר את פעולת השליחה</translation>
+        <translation>אישור פעולת השליחה</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation>שלח</translation>
+        <translation>&amp;שליחה</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation>אשר שליחת מטבעות</translation>
+        <translation>אישור שליחת מטבעות</translation>
     </message>
     <message>
         <source>%1 to %2</source>
@@ -1469,31 +1853,35 @@ Address: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת כמות</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת סכום</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>העתק מחיר</translation>
+        <translation>העתקת עמלה</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>העתק אחרי עמלה</translation>
+        <translation>העתקת אחרי עמלה</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation>העתק בייטים</translation>
+        <translation>העתקת בתים</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation>העתק קדימות</translation>
+        <translation>העתקת עדיפות</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation>העתק עודף</translation>
+        <translation>העתקת עודף</translation>
+    </message>
+    <message>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>הסכום הכולל %1 (= %2)</translation>
     </message>
     <message>
         <source>or</source>
@@ -1501,11 +1889,11 @@ Address: %4
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation>כתובת המקבל אינה תקינה, אנא בדוק שנית.</translation>
+        <translation>כתובת המוטב אינה תקינה, נא לבדוק שוב.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>הכמות לשלם חייבת להיות גדולה מ-0.</translation>
+        <translation>הכמות לתשלום חייבת להיות גדולה מ־0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
@@ -1513,7 +1901,7 @@ Address: %4
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>הכמות הכוללת, ובכללה עמלת פעולה בסך %1, עולה על המאזן שלך.</translation>
+        <translation>הכמות הכוללת, ובכללה עמלת העברה בסך %1, עולה על המאזן שלך.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -1521,11 +1909,27 @@ Address: %4
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation>יצירת הפעולה נכשלה!</translation>
+        <translation>יצירת ההעברה נכשלה!</translation>
+    </message>
+    <message>
+        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation>ההעברה נדחתה! מצב כזה עשוי לקרות אם חלק מהמטבעות בארנק שלך כבר הושקעו, כמו למשל עקב שימוש בעותק של wallet.dat והמטבעות הושקעו בעותק אבל לא סומנו כאילו הושקעו דרך כאן.</translation>
+    </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>אזהרה: כתובת ביטקוין שגויה</translation>
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(ללא תוית)</translation>
+        <translation>(אין תווית)</translation>
+    </message>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation>אזהרה: כתובת עודף בלתי ידועה</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>העתקת אבק</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1533,47 +1937,55 @@ Address: %4
     </message>
     <message>
         <source>added as transaction fee</source>
-        <translation>הוסף מחיר טיפול</translation>
+        <translation>נוסף כעמלת העברה</translation>
     </message>
 </context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
         <source>A&amp;mount:</source>
-        <translation>כ&amp;מות:</translation>
+        <translation>&amp;כמות:</translation>
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation>שלם &amp;ל:</translation>
+        <translation>לשלם ל&amp;טובת:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation>הכנס תוית לכתובת הזאת כדי להכניס לפנקס הכתובות</translation>
+        <translation>נא להכניס תווית לכתובת הזאת כדי להוסיף לפנקס הכתובות</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>ת&amp;וית:</translation>
+        <translation>ת&amp;ווית:</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>בחר כתובת שהייתה בשימוש</translation>
+        <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>כתובת הביטקוין של המוטב</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>הדבר כתובת מהלוח</translation>
+        <translation>הדבקת כתובת מלוח הגזירים</translation>
     </message>
     <message>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
+    <message>
+        <source>Remove this entry</source>
+        <translation>הסרת רשומה זו</translation>
+    </message>
     <message>
         <source>Message:</source>
         <translation>הודעה:</translation>
@@ -1584,7 +1996,11 @@ Address: %4
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation>הקלד תווית עבור כתובת זו בכדי להוסיף אותה לרשימת הכתובות בשימוש</translation>
+        <translation>יש להזין תווית עבור כתובת זו כדי להוסיף אותה לרשימת הכתובות בשימוש</translation>
+    </message>
+    <message>
+        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation>הודעה שצורפה לביטקוין: כתובת שתאוחסן בהעברה לצורך מעקב מצדך. לתשומת לבך: הודעה זו לא תישלח ברשת הביטקוין.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
@@ -1592,7 +2008,7 @@ Address: %4
     </message>
     <message>
         <source>Pay To:</source>
-        <translation>תשלום ל:</translation>
+        <translation>תשלום לטובת:</translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -1601,6 +2017,10 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
+    <message>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>ליבת ביטקוין נסגרת…</translation>
+    </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>אין לכבות את המחשב עד שחלון זה נעלם.</translation>
@@ -1610,19 +2030,23 @@ Address: %4
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation>חתימות - חתום או אמת הודעה</translation>
+        <translation>חתימות - חתימה או אימות של הודעה</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>חתום על הו&amp;דעה</translation>
+        <translation>חתימה על הו&amp;דעה</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>אתה יכול לחתום על הודעות עם הכתובות שלך כדי להוכיח שהן בבעלותך. היזהר לא לחתום על משהו מעורפל, שכן התקפות פישינג עשויות לגרום לך בעורמה למסור את זהותך. חתום רק על אמרות מפורטות לחלוטין שאתה מסכים עימן.</translation>
+        <translation>ניתן לחתום על הודעות עם הכתובות שלך כדי להוכיח שהן בבעלותך. מומלץ להיזהר לא לחתום על משהו מפוקפק, שכן התקפות דיוג עשויות לגרום לך בעורמה למסור את זהותך. רצוי לחתום רק על הצהרות מפורטות לחלוטין שהסכמת עמן.</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>כתובת הביטקוין אתה לחתום אתה את ההודעה</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>בחר כתובת שהייתה בשימוש</translation>
+        <translation>בחירת כתובת שהייתה בשימוש</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1630,7 +2054,7 @@ Address: %4
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>הדבק כתובת מהלוח</translation>
+        <translation>הדבקת כתובת מלוח הגזירים</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1638,7 +2062,7 @@ Address: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation>הכנס כאן את ההודעה שעליך ברצונך לחתום</translation>
+        <translation>יש להוסיף כאן את ההודעה עליה לחתום</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -1646,47 +2070,51 @@ Address: %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>העתק את החתימה הנוכחית ללוח המערכת</translation>
+        <translation>העתקת החתימה הנוכחית ללוח הגזירים</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>חתום על ההודעה כדי להוכיח שכתובת הביטקוין הזו בבעלותך.</translation>
+        <translation>ניתן לחתום על ההודעה כדי להוכיח שכתובת הביטקוין הזו בבעלותך.</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation>חתום על הודעה</translation>
+        <translation>&amp;חתימה על הודעה</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation>אפס את כל שדות החתימה על הודעה</translation>
+        <translation>איפוס כל שדות החתימה על הודעה</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>נקה הכל</translation>
+        <translation>&amp;ניקוי הכול</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation>אמת הודעה</translation>
+        <translation>&amp;אימות הודעה</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
         <translation>הכנס למטה את הכתובת החותמת, ההודעה (ודא שאתה מעתיק מעברי שורה, רווחים, טאבים וכו' באופן מדויק) והחתימה כדי לאמת את ההודעה. היזהר לא לפרש את החתימה כיותר ממה שמופיע בהודעה החתומה בעצמה, כדי להימנע מליפול קורבן למתקפת איש-באמצע.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>כתובת הביטקוין שאתה נחתמה ההודעה</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>אמת את ההודעה כדי להבטיח שהיא נחתמה עם כתובת הביטקוין הנתונה</translation>
+        <translation>ניתן לאמת את ההודעה כדי להבטיח שהיא נחתמה עם כתובת הביטקוין הנתונה</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation>אימות הודעה</translation>
+        <translation>&amp;אימות הודעה</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation>אפס את כל שדות אימות הודעה</translation>
+        <translation>איפוס כל שדות אימות ההודעה</translation>
     </message>
     <message>
         <source>Click "Sign Message" to generate signature</source>
-        <translation>לחץ "חתום על ההודעה" כדי לחולל חתימה</translation>
+        <translation>יש ללחוץ על „חתימה על ההודעה“ כדי לחולל חתימה</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
@@ -1694,7 +2122,7 @@ Address: %4
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>אנא בדוק את הכתובת ונסה שנית.</translation>
+        <translation>נא לבדוק את הכתובת לנסות שנית.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
@@ -1722,7 +2150,7 @@ Address: %4
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation>אנא בדוק את החתימה ונסה שנית.</translation>
+        <translation>נא לבדוק את החתימה ולנסות שנית.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
@@ -1743,6 +2171,10 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>ליבת ביטקוין</translation>
     </message>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation>מתכנתי ליבת ביטקוין</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[רשת-בדיקה]</translation>
@@ -1752,14 +2184,18 @@ Address: %4
     <name>TrafficGraphWidget</name>
     <message>
         <source>KB/s</source>
-        <translation>קילו בייט לשניה</translation>
+        <translation>ק״ב/ש׳</translation>
     </message>
 </context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation>פתוח עד %1</translation>
+        <translation>פתוחה עד %1</translation>
+    </message>
+    <message>
+        <source>conflicted</source>
+        <translation>מתנגש</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -1767,7 +2203,7 @@ Address: %4
     </message>
     <message>
         <source>%1/unconfirmed</source>
-        <translation>%1/ממתין לאישור</translation>
+        <translation>%1/המתנה לאישור</translation>
     </message>
     <message>
         <source>%1 confirmations</source>
@@ -1801,9 +2237,13 @@ Address: %4
         <source>own address</source>
         <translation>כתובת עצמית</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>צפייה בלבד</translation>
+    </message>
     <message>
         <source>label</source>
-        <translation>תוית</translation>
+        <translation>תווית</translation>
     </message>
     <message>
         <source>Credit</source>
@@ -1817,13 +2257,21 @@ Address: %4
         <source>Debit</source>
         <translation>חיוב</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>סך כל החיוב</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>סך כל האשראי</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
-        <translation>עמלת פעולה</translation>
+        <translation>עמלת העברה</translation>
     </message>
     <message>
         <source>Net amount</source>
-        <translation>כמות נקיה</translation>
+        <translation>כמות נקייה</translation>
     </message>
     <message>
         <source>Message</source>
@@ -1835,7 +2283,7 @@ Address: %4
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>זיהוי פעולה</translation>
+        <translation>מזהה העברה</translation>
     </message>
     <message>
         <source>Merchant</source>
@@ -1843,7 +2291,7 @@ Address: %4
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>מטבעות חדשים שנוצרו חייבים להבשיל במשך %1 בלוקים לפני שניתן לנצל אותם. כשבלוק זה נוצר הוא שודר ברשת על מנת שייכנס לשרשרת הבלוקים. במקרה והוא לא ייכנס לשרשרת, מצבו ישתנה ל"לא התקבל" ולא ניתן יהיה לנצלו. זה יכול לקרות מדי פעם אם במקרה צומת אחרת ייצרה בלוק בהבדל של שניות בודדות ממך.</translation>
+        <translation>מטבעות חדשים שנוצרו חייבים להבשיל במשך %1 מקטעים לפני שניתן לנצל אותם. כשמקטע זה נוצר הוא משודר ברשת על מנת שייכנס לשרשרת המקטעים. אם הוא לא ייכנס לשרשרת, מצבו ישתנה ל„לא התקבל“ ולא ניתן יהיה לנצלו. מצב כזה יכול לקרות מדי פעם אם במקרה מפרק אחר יצר מקטע בהבדל של שניות בודדות ממך.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -1851,7 +2299,7 @@ Address: %4
     </message>
     <message>
         <source>Transaction</source>
-        <translation>פעולה</translation>
+        <translation>העברה</translation>
     </message>
     <message>
         <source>Inputs</source>
@@ -1875,7 +2323,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>פתח למשך בלוק %n יותר</numerusform><numerusform>פתח למשך %n בלוקים נוספים</numerusform></translation>
+        <translation><numerusform>פתיחה למשך מקטע %n נוסף</numerusform><numerusform>פתיחה למשך %n מקטעים נוספים</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -1886,11 +2334,11 @@ Address: %4
     <name>TransactionDescDialog</name>
     <message>
         <source>Transaction details</source>
-        <translation>פרטי הפעולה</translation>
+        <translation>פרטי ההעברה</translation>
     </message>
     <message>
         <source>This pane shows a detailed description of the transaction</source>
-        <translation>חלונית זו מציגה תיאור מפורט של הפעולה</translation>
+        <translation>חלונית זו מציגה תיאור מפורט של ההעברה</translation>
     </message>
 </context>
 <context>
@@ -1907,13 +2355,17 @@ Address: %4
         <source>Address</source>
         <translation>כתובת</translation>
     </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation>לא בשל (%1 אישורים, יהיו זמינים לאחר %2)</translation>
+    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>פתח למשך בלוק %n יותר</numerusform><numerusform>פתח למשך %n בלוקים נוספים</numerusform></translation>
+        <translation><numerusform>פתח למשך בלוק %n יותר</numerusform><numerusform>פתיחה למשך %n מקטעים נוספים</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
-        <translation>פתוח עד %1</translation>
+        <translation>פתוחה עד %1</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
@@ -1921,12 +2373,28 @@ Address: %4
     </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>הבלוק הזה לא נקלט על ידי אף צומת אחר, וכנראה לא יתקבל!</translation>
+        <translation>המקטע הזה לא נקלט על ידי אף מפרק אחר, וכנראה לא יתקבל!</translation>
     </message>
     <message>
         <source>Generated but not accepted</source>
         <translation>נוצר אך לא התקבל</translation>
     </message>
+    <message>
+        <source>Offline</source>
+        <translation>מנותק</translation>
+    </message>
+    <message>
+        <source>Unconfirmed</source>
+        <translation>ללא אישור</translation>
+    </message>
+    <message>
+        <source>Confirming (%1 of %2 recommended confirmations)</source>
+        <translation>מתקבל אישור (%1 מתוך %2 אישורים מומלצים)</translation>
+    </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>מתנגש</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>התקבל עם</translation>
@@ -1937,7 +2405,7 @@ Address: %4
     </message>
     <message>
         <source>Sent to</source>
-        <translation>נשלח ל</translation>
+        <translation>נשלח אל</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
@@ -1947,25 +2415,33 @@ Address: %4
         <source>Mined</source>
         <translation>נכרה</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>צפייה בלבד</translation>
+    </message>
     <message>
         <source>(n/a)</source>
-        <translation>(n/a)</translation>
+        <translation>(לא זמין)</translation>
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>מצב הפעולה. השהה את הסמן מעל שדה זה כדי לראות את מספר האישורים.</translation>
+        <translation>מצב ההעברה. יש להמתין עם הסמן מעל שדה זה כדי לראות את מספר האישורים.</translation>
     </message>
     <message>
         <source>Date and time that the transaction was received.</source>
-        <translation>התאריך והשעה בה הפעולה הזאת התקבלה.</translation>
+        <translation>התאריך והשעה בה ההעברה הזאת התקבלה.</translation>
     </message>
     <message>
         <source>Type of transaction.</source>
-        <translation>סוג הפעולה.</translation>
+        <translation>סוג ההעברה.</translation>
+    </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>האם כתובות לצפייה בלבד מעורבות בהעברה זאת או שלא.</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
-        <translation>כתובת היעד של הפעולה.</translation>
+        <translation>כתובת היעד של ההעברה.</translation>
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
@@ -1976,7 +2452,7 @@ Address: %4
     <name>TransactionView</name>
     <message>
         <source>All</source>
-        <translation>הכל</translation>
+        <translation>הכול</translation>
     </message>
     <message>
         <source>Today</source>
@@ -2000,7 +2476,7 @@ Address: %4
     </message>
     <message>
         <source>Range...</source>
-        <translation>טווח...</translation>
+        <translation>טווח…</translation>
     </message>
     <message>
         <source>Received with</source>
@@ -2008,7 +2484,7 @@ Address: %4
     </message>
     <message>
         <source>Sent to</source>
-        <translation>נשלח ל</translation>
+        <translation>נשלח אל</translation>
     </message>
     <message>
         <source>To yourself</source>
@@ -2024,7 +2500,7 @@ Address: %4
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation>הכנס כתובת או תוית לחפש</translation>
+        <translation>נא להכניס כתובת או תווית לחיפוש</translation>
     </message>
     <message>
         <source>Min amount</source>
@@ -2032,47 +2508,55 @@ Address: %4
     </message>
     <message>
         <source>Copy address</source>
-        <translation>העתק כתובת</translation>
+        <translation>העתקת כתובת</translation>
     </message>
     <message>
         <source>Copy label</source>
-        <translation>העתק תוית</translation>
+        <translation>העתקת תווית</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>העתק כמות</translation>
+        <translation>העתקת כמות</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>העתק מזהה פעולה</translation>
+        <translation>העתקת מזהה העברה</translation>
     </message>
     <message>
         <source>Edit label</source>
-        <translation>ערוך תוית</translation>
+        <translation>עריכת תווית</translation>
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation>הצג פרטי פעולה</translation>
+        <translation>הצגת פרטי העברה</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation>יצוא היסטוריית פעולות</translation>
+        <translation>יצוא היסטוריית העברות</translation>
+    </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>צפייה בלבד</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>הייצוא נכשל</translation>
+        <translation>היצוא נכשל</translation>
+    </message>
+    <message>
+        <source>There was an error trying to save the transaction history to %1.</source>
+        <translation>אירעה שגיאה בעת ניסיון לשמור את היסטוריית ההעברות אל %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation>הייצוא בוצע בהצלחה</translation>
+        <translation>היצוא בוצע בהצלחה</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
-        <translation>היסטוריית הפעולות נשמרה ל־%1 בהצלחה.</translation>
+        <translation>היסטוריית ההעברות נשמרה ל־%1 בהצלחה.</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>קובץ מופרד בפסיקים (*.csv)</translation>
+        <translation>קובץ מופרד בפסיקים (‎*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2088,7 +2572,7 @@ Address: %4
     </message>
     <message>
         <source>Label</source>
-        <translation>תוית</translation>
+        <translation>תווית</translation>
     </message>
     <message>
         <source>Address</source>
@@ -2109,7 +2593,11 @@ Address: %4
 </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>
@@ -2121,34 +2609,42 @@ Address: %4
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation>שלח מטבעות</translation>
+        <translation>שליחת מטבעות</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;ייצא</translation>
+        <translation>י&amp;צוא</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>יצוא הנתונים בטאב הנוכחי לקובץ</translation>
+        <translation>יצוא הנתונים מהלשונית הנוכחית לקובץ</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation>גבה ארנק</translation>
+        <translation>גיבוי ארנק</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
-        <translation>נתוני ארנק (*.dat)</translation>
+        <translation>נתוני ארנק (‎*.dat)</translation>
     </message>
     <message>
         <source>Backup Failed</source>
         <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>
     <message>
         <source>Backup Successful</source>
-        <translation>גיבוי הושלם בהצלחה</translation>
+        <translation>הגיבוי הושלם בהצלחה</translation>
     </message>
 </context>
 <context>
@@ -2157,61 +2653,33 @@ Address: %4
         <source>Options:</source>
         <translation>אפשרויות:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>ציין קובץ הגדרות (ברירת מחדל: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>ציין קובץ pid (ברירת מחדל: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
-        <translation>ציין תיקיית נתונים</translation>
-    </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>האזן לחיבורים ב&lt;פורט&gt; (ברירת מחדל: 8333 או ברשת הבדיקה: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>החזק לכל היותר &lt;n&gt; חיבורים לעמיתים (ברירת מחדל: 125)</translation>
+        <translation>ציון תיקיית נתונים</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>התחבר לצומת כדי לדלות כתובות עמיתים, ואז התנתק</translation>
+        <translation>יש להתחבר למפרק כדי לדלות כתובות עמיתים ואז להתנתק</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation>ציין את הכתובת הפומבית שלך</translation>
-    </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>סף להתנתקות מעמיתים הנוהגים שלא כהלכה (ברירת מחדל: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>מספר שניות למנוע מעמיתים הנוהגים שלא כהלכה מלהתחבר מחדש (ברירת מחדל: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>האזן לחיבורי JSON-RPC ב- &lt;port&gt; (ברירת מחדל: 8332 או רשת בדיקה: 18332)</translation>
+        <translation>נא לציין את הכתובת הפומבית שלך</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>קבל פקודות משורת הפקודה ו- JSON-RPC</translation>
+        <translation>קבלת פקודות משורת הפקודה ומ־JSON-RPC</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation>רוץ ברקע כדימון וקבל פקודות</translation>
+        <translation>ריצה כסוכן ברקע וקבלת פקודות</translation>
     </message>
     <message>
         <source>Use the test network</source>
-        <translation>השתמש ברשת הבדיקה</translation>
+        <translation>שימוש ברשת הבדיקה</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>קבל חיבורים מבחוץ (ברירת מחדל: 1 ללא -proxy או -connect)</translation>
+        <translation>קבלת חיבורים מבחוץ (בררת מחדל: 1 ללא ‎-proxy או ‎-connect)</translation>
     </message>
     <message>
         <source>%s, you must set a rpcpassword in the configuration file:
@@ -2225,61 +2693,77 @@ If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
 for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </source>
-        <translation>%s, עליך לקבוע סיסמת RPC בקובץ הקונפיגורציה:
+        <translation>%s, עליך להגדיר את ססמת ה־RPC בקובץ התצורה:
  %s
-מומלץ להשתמש בסיסמא האקראית הבאה:
+מומלץ להשתמש בססמה האקראית הבאה:
 rpcuser=bitcoinrpc
 rpcpassword=%s
-(אין צורך לזכור את הסיסמה)
-אסור ששם המשתמש והסיסמא יהיו זהים.
-אם הקובץ אינו קיים, צור אותו עם הרשאות קריאה לבעלים בלבד.
-זה מומלץ לסמן alertnotify כדי לקבל דיווח על תקלות;
+(אין צורך לזכור את הססמה)
+אסור ששם המשתמש והססמה יהיו זהים.
+אם הקובץ אינו קיים, יש ליצור אותו עם הרשאות קריאה לבעלים בלבד.
+כמו כן, מומלץ להגדיר את alertnotify כדי לקבל דיווח על תקלות;
 למשל: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com 
 </translation>
     </message>
     <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>צפנים קבילים (ברירת מחדל: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
+        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
+        <translation>להתאגד לכתובת נתונה להאזין לה תמיד. יש להשתמש בצורה ‎[host]:port עבור IPv6.</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>
     <message>
-        <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>קשור עם כתובת נתונה והאזן לה תמיד. השתמש בסימון [host]:port עבוד IPv6.</translation>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation>כניסה למצב בדיקת נסיגה, שמשתמש בשרשרת מיוחדת בה ניתן לפתור את המקטעים במהירות.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>שגיאה: הפעולה נדחתה! זה עלול לקרות אם כמה מהמטבעות בארנק שלך כבר נוצלו, למשל אם השתמשת בעותק של wallet.dat ומטבעות נשלחו בעותק אך לא סומנו כמנוצלות כאן.</translation>
+        <translation>שגיאה: ההעברה נדחתה! מצב כזה עלול לקרות אם כמה מהמטבעות בארנק שלך כבר נוצלו, למשל אם השתמשת בעותק של wallet.dat ומטבעות נשלחו בעותק אך לא סומנו כמושקעות כאן.</translation>
     </message>
     <message>
         <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>שגיאה: הפעולה הזאת דורשת עמלת פעולה של לפחות %s עקב הכמות, המורכבות, או השימוש בכספים שהתקבלו לאחרונה!</translation>
+        <translation>שגיאה: ההעברה הזאת דורשת עמלת פעולה של לפחות %s עקב הכמות, המורכבות או השימוש בכספים שהתקבלו לאחרונה!</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>בצע פקודה כאשר פעולת ארנק משתנה (%s ב cmd יוחלף ב TxID)</translation>
+        <translation>ביצוע פקודה כאשר העברה בארנק משתנה (%s ב־cmd יוחלף ב־TxID)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>זוהי בניית ניסיון טרום-שחרור - השימוש בה על אחריותך - אין להשתמש לצורך כריה או יישומי מסחר</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation>לא ניתן להתאגד אל %s במחשב זה. כנראה שליבת ביטקוין כבר פועלת.</translation>
+    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>אזהרה: -paytxfee נקבע לערך מאד גבוה! זוהי עמלת הפעולה שתשלם אם אתה שולח פעולה.</translation>
+        <translation>אזהרה: ‎-paytxfee נקבע לערך מאד גבוה! זוהי עמלת הפעולה שתשולם בעת העברת שליחה.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation>אזהרה: נראה שלא כל הרשת מסכימה! נראה שישנם כורים אשר נתקלים בבעיות.</translation>
+        <translation>אזהרה: נראה שלא כל הרשת מסכימה! נראה שישנם כורים שנתקלים בבעיות.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>אזהרה: נראה שאנחנו לא מסכימים לחלוטין עם העמיתים שלנו! ייתכן ואנחנו צריכים לשדרג, או שצמתים אחרות צריכות לשדרג.</translation>
+        <translation>אזהרה: נראה שישנה אי־הסכמה בינינו לבין שאר העמיתים שלנו! יתכן שעדיף לשדרג או שכל שאר העמיתים צריכים לשדרג.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>אזהרה: שגיאה בקריאת wallet.dat! כל המתפחות נקראו באופן תקין, אך נתוני הפעולות או ספר הכתובות עלולים להיות חסרים או שגויים.</translation>
+        <translation>אזהרה: שגיאה בקריאת wallet.dat! כל המפתחות נקראו באופן תקין, אך נתוני ההעברות או ספר הכתובות עלולים להיות חסרים או שגויים.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>אזהרה: קובץ wallet.dat מושחת, המידע חולץ! קובץ wallet.dat המקורח נשמר כ - wallet.{timestamp}.bak ב - %s; אם המאזן או הפעולות שגויים עליך לשחזר גיבוי.</translation>
+        <translation>אזהרה: הקובץ wallet.dat הושחת, המידע חולץ! קובץ ה־wallet.dat המקורי נשמר בשם wallet.{timestamp}.bak במיקום %s; אם המאזן או ההעברות שגויים עליך לשחזר גיבוי.</translation>
+    </message>
+    <message>
+        <source>(default: 1)</source>
+        <translation>(בררת מחדל: 1)</translation>
+    </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;קטגוריה&gt; יכולה להיות:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
@@ -2287,7 +2771,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Block creation options:</source>
-        <translation>אפשרויות יצירת בלוק:</translation>
+        <translation>אפשרויות יצירת מקטע:</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
@@ -2299,19 +2783,27 @@ rpcpassword=%s
     </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation>התגלה מסד נתוני בלוקים לא תקין</translation>
+        <translation>התגלה מסד נתוני מקטעים לא תקין</translation>
+    </message>
+    <message>
+        <source>Debugging/Testing options:</source>
+        <translation>אפשרויות ניפוי/בדיקה:</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>גלה את כתובת ה-IP העצמית (ברירת מחדל: 1 כשמאזינים וללא -externalip)</translation>
+        <translation>לגלות את כתובת ה־IP העצמית (בררת מחדל: 1 בעת האזנה וללא ‎-externalip)</translation>
+    </message>
+    <message>
+        <source>Do not load the wallet and disable wallet RPC calls</source>
+        <translation>לא לטעון את הארנק ולנטרל קריאות RPC</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation>האם תרצה כעט לבנות מחדש את מסד נתוני הבלוקים?</translation>
+        <translation>האם לבנות מחדש את מסד נתוני המקטעים?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation>שגיאה באתחול מסד נתוני הבלוקים</translation>
+        <translation>שגיאה באתחול מסד נתוני המקטעים</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
@@ -2319,208 +2811,228 @@ rpcpassword=%s
     </message>
     <message>
         <source>Error loading block database</source>
-        <translation>שגיאה בטעינת מסד נתוני הבלוקים</translation>
+        <translation>שגיאה בטעינת מסד נתוני המקטעים</translation>
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation>שגיאה בטעינת מסד נתוני הבלוקים</translation>
+        <translation>שגיאה בטעינת מסד נתוני המקטעים</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation>שגיאה: מעט מקום פנוי בדיסק!</translation>
+        <translation>שגיאה: מעט מקום פנוי בכונן!</translation>
     </message>
     <message>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>שגיאה: הארנק נעול, אין אפשרות ליצור פעולה!</translation>
-    </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>שגיאה: שגיאת מערכת:</translation>
+        <translation>שגיאה: הארנק נעול, אין אפשרות ליצור העברה!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>האזנה נכשלה בכל פורט. השתמש ב- -listen=0 אם ברצונך בכך.</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation>קריאת מידע הבלוקים נכשלה</translation>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>אם לא סופקה &lt;קטגוריה&gt; יש לייצא את כל פרטי הניפוי.</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation>קריאת הבלוק נכשלה</translation>
+        <source>Importing...</source>
+        <translation>מתבצע יבוא…</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation>סנכרון אינדקס הבלוקים נכשל</translation>
+        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+        <translation>מקטע הפתיח הוא שגוי או לא נמצא. תיקיית נתונים שגויה עבור הרשת?</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation>כתיבת אינדקס הבלוקים נכשל</translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>כתובת onion- שגויה: '%s'</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation>כתיבת מידע הבלוקים נכשל</translation>
+        <source>Not enough file descriptors available.</source>
+        <translation>אין מספיק מידע על הקובץ</translation>
     </message>
     <message>
-        <source>Failed to write block</source>
-        <translation>כתיבת הבלוק נכשלה</translation>
+        <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>Failed to write file info</source>
-        <translation>כתיבת מידע הקבצים נכשלה</translation>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation>בנייה מחדש של מפתח שרשרת המקטעים מקובצי ה־blk000??.dat הנוכחיים.</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation>כתיבת מסד נתוני המטבעות נכשלה</translation>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>הגדרת גודל מטמון מסדי הנתונים במגה בתים (%d עד %d, בררת מחדל: %d)</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation>כתיבת אינדקס הפעולות נכשלה</translation>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>הגדרת קובץ מקטע מרבי בבתים (בררת מחדל: %d)</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation>כתיבת נתוני ביטול נכשלה</translation>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>ציון קובץ ארנק (בתוך תיקיית הנתונים)</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>ייצר מטבעות (ברגיל: 0)</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>תכונה זו מיועדת לכלי בדיקות נסיגה ופיתוח יישומים.</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>מספר הבלוקים לבדוק בעת אתחול (ברירת מחדל: 288, 0 = כולם)</translation>
+        <source>Verifying blocks...</source>
+        <translation>המקטעים מאומתים…</translation>
     </message>
     <message>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation>בלוק בראשית הינו שגוי או לא נמצא. ספריית מידע לא נכונה עבור הרשת?</translation>
+        <source>Verifying wallet...</source>
+        <translation>הארנק מאומת…</translation>
     </message>
     <message>
-        <source>Invalid -onion address: '%s'</source>
-        <translation>כתובת onion- שגויה: '%s'</translation>
+        <source>Wallet %s resides outside data directory %s</source>
+        <translation>הארנק %s יושב מחוץ לתיקיית הנתונים %s</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation>אין מספיק מידע על הקובץ</translation>
+        <source>Wallet options:</source>
+        <translation>אפשרויות הארנק:</translation>
     </message>
     <message>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>בנה מחדש את אינדק שרשרת הבלוקים מקבצי ה-blk000??.dat הנוכחיים.</translation>
+        <source>You need to rebuild the database using -reindex to change -txindex</source>
+        <translation>עליך לבנות מחדש את מסד הנתונים תוך שימוש ב־‎-reindex על מנת לשנות את ‎-txindex</translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>קבע את מספר תהליכוני לשירות קריאות RPC (ברירת מחדל: 4)</translation>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>מיובאים מקטעים מקובצי blk000??.dat חיצוניים</translation>
     </message>
     <message>
-        <source>Specify wallet file (within data directory)</source>
-        <translation>ציין קובץ ארנק (בתוך ספריית המידע)</translation>
+        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+        <translation>הרץ פקודה כאשר ההתראה הרלוונטית מתקבלת או כשאנחנו עדים לפיצול ארוך מאוד (%s בשורת הפקודה יוחלף ע"י ההודעה)</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation>מאמת את שלמות מסד הנתונים...</translation>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>העמלות (ב־BTC/ק״ב) הנמוכות מהסכום הזה נחשבות לעמלות אפס ליצירת העברה (בררת מחדל: %s)</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation>מאמת את יושרת הארנק...</translation>
+        <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>אזהרה: נא לבדוק שהתאריך והשעה של המחשב שלך נכונים! אם השעון שלך שגוי ליבת ביטקוין לא תעבוד כראוי.</translation>
     </message>
     <message>
-        <source>Wallet %s resides outside data directory %s</source>
-        <translation>הארנק %s יושב מחוץ לספריית המידע %s</translation>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>לא ניתן לפתור את הכתובת ‎-whitebind:‏ '%s'</translation>
     </message>
     <message>
-        <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation>עליך לבנות מחדש את מסד הנתונים תוך שימוש ב- -reindex על מנת לשנות את -txindex</translation>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>התחברות דרך מתווך SOCKS5</translation>
     </message>
     <message>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation>מייבא בלוקים מקובצי blk000??.dat חיצוניים</translation>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>כל הזכויות שמורות (C)‏ 2009‏-%i מתכנתי ליבת ביטקוין</translation>
     </message>
     <message>
-        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>הרץ פקודה כאשר ההתראה הרלוונטית מתקבלת או כשאנחנו עדים לפיצול ארוך מאוד (%s בשורת הפקודה יוחלף ע"י ההודעה)</translation>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>לא ניתן לנתח את הערך של ‎-rpcbind שצוין בתור %s ככתובת רשת</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>אירעה שגיאה בטעינת wallet.dat: הארנק דורש גרסה חדשה יותר של ליבת ביטקוין</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>שגיאה: נמצא ארגומנט בלתי נתמך ‎-tor, יש להשתמש ב־‎-onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>עמלה (ב־BTC/ק״ב) להוספה להעברות שנשלחות ממך (בררת מחדל: %s)</translation>
     </message>
     <message>
         <source>Information</source>
         <translation>מידע</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>בדיקת התקינות ההתחלתית נכשלה. ליבת ביטקוין תיסגר כעת.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
-        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
+        <translation>כמות לא תקינה עבור ‎-mintxfee=&lt;amount&gt;‎:‏ '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>כמות לא תקינה עבור ‎-paytxfee=&lt;amount&gt;‎:‏ '%s' (חייבת להיות לפחות %s)</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>תחזק אינדקס פעולות מלא (ברירת מחדל: 0)</translation>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>מסכת הרשת שצוינה עם ‎-whitelist שגויה: '%s'</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>חוצץ קבלה מירבי לכל חיבור, &lt;n&gt;*1000 בתים (ברירת מחדל: 5000)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>עליך לציין פתחה עם ‎-whitebind:‏ '%s'</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>חוצץ שליחה מירבי לכל חיבור, &lt;n&gt;*1000 בתים (ברירת מחדל: 1000)</translation>
+        <source>Node relay options:</source>
+        <translation>אפשרויות ממסר מפרק:</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>קבל רק שרשרת בלוקים התואמת נקודות ביקורת מובנות (ברירת מחדל: 1)</translation>
+        <source>Print block on startup, if found in block index</source>
+        <translation>הצגת מקטע בהפעלה, אם נמצא במפתח המקטעים</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>התחבר רק לצמתים ברשת &lt;net&gt; (IPv4, IPv6 או Tor)</translation>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>אפשרויות RPC SSL: (נא לעיין בוויקי של ביטקוין לקבלת הנחיות על הגדרת SSL)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
         <translation>הגדרות שרת RPC</translation>
     </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>להשמיט אקראית אחת מתוך כל &lt;n&gt; הודעות רשת</translation>
+    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>שלח מידע דיבאג ועקבה לקונסולה במקום לקובץ debug.log</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>קבע את גודל הבלוק המינימלי בבתים (ברירת מחדל: 0)</translation>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>הצגת כל אפשרויות הניפוי (שימוש: ‎--help -help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>כווץ את קובץ debug.log בהפעלת הקליינט (ברירת מחדל: 1 ללא -debug)</translation>
+        <translation>כיווץ הקובץ debug.log בהפעלת הלקוח (בררת מחדל: 1 ללא ‎-debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation>פעולה העברה נכשלה</translation>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>ציין הגבלת זמן לחיבור במילישניות (ברירת מחדל: 5000)</translation>
+        <translation>החתימה על ההעברה נכשלה</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation>שגיאת מערכת:</translation>
+        <source>This is experimental software.</source>
+        <translation>זוהי תכנית נסיונית.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation>סכום העברה קטן מדי</translation>
+        <translation>סכום ההעברה קטן מדי</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation>סכום ההעברה חייב להיות חיובי</translation>
+        <translation>סכומי ההעברות חייבים להיות חיוביים</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation>סכום העברה גדול מדי</translation>
+        <translation>סכום ההעברה גדול מדי</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>השתמש ב-UPnP כדי למפות את הפורט להאזנה (ברירת מחדל: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>לא ניתן להתאגד עם הפתחה %s במחשב זה (פעולת האיגוד החזירה את השגיאה %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>השתמש ב-UPnP כדי למפות את הפורט להאזנה (ברירת מחדל: 1 בעת האזנה)</translation>
+        <translation>יש להשתמש ב־UPnP כדי למפות את הפתחה להאזנה (בררת מחדל: 1 בעת האזנה)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>שם משתמש לחיבורי JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>יש לכתוב את הארנק מחדש: נא להפעיל את ליבת ביטקוין מחדש כדי להשלים את הפעולה</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>אזהרה</translation>
@@ -2529,9 +3041,17 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>אזהרה: הגרסה הזאת מיושנת, יש צורך בשדרוג!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>אזהרה: הארגומנט שאינו נתמך עוד ‎-benchmark לא הופעל, נא להשתמש ב־‎-debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>אזהרה: הארגומנט שאינו נתמך עוד ‎-debugnet לא הופעל, נא להשתמש ב־‎-debug=net.</translation>
+    </message>
     <message>
         <source>on startup</source>
-        <translation>בפתיחה</translation>
+        <translation>עם ההפעלה</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
@@ -2539,35 +3059,23 @@ rpcpassword=%s
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation>סיסמה לחיבורי JSON-RPC</translation>
+        <translation>ססמה לחיבורי JSON-RPC</translation>
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>בצע פקודה זו כשהבלוק הטוב ביותר משתנה (%s בפקודה יוחלף בגיבוב הבלוק)</translation>
+        <translation>יש לבצע פקודה זו כשהמקטע הטוב ביותר משתנה (%s בפקודה יוחלף בגיבוב המקטע)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation>שדרג את הארנק לפורמט העדכני</translation>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>קבע את גודל המאגר ל -&lt;n&gt; (ברירת מחדל: 100)</translation>
+        <translation>שדרוג הארנק למבנה העדכני</translation>
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>סרוק מחדש את שרשרת הבלוקים למציאת פעולות חסרות בארנק</translation>
+        <translation>יש לסרוק מחדש את שרשרת המקטעים למציאת העברות חסרות בארנק</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>השתמש ב-OpenSSL (https( עבור חיבורי JSON-RPC</translation>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>קובץ תעודת שרת (ברירת מחדל: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>מפתח פרטי של השרת (ברירת מחדל: server.pem)</translation>
+        <translation>שימוש ב־OpenSSL (https)‎ עבור חיבורי JSON-RPC</translation>
     </message>
     <message>
         <source>This help message</source>
@@ -2575,11 +3083,11 @@ rpcpassword=%s
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation>אפשר בדיקת DNS עבור -addnode, -seednode ו- -connect</translation>
+        <translation>הפעלת בדיקת DNS עבור ‎-addnode,‏ ‎-seednode ו־‎-connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation>טוען כתובות...</translation>
+        <translation>הכתובות בטעינה…</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
@@ -2591,23 +3099,23 @@ rpcpassword=%s
     </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
-        <translation>כתובת -proxy לא תקינה: '%s'</translation>
+        <translation>כתובת ‎-proxy לא תקינה: '%s'</translation>
     </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
-        <translation>רשת לא ידועה צוינה ב- -onlynet: '%s'</translation>
+        <translation>רשת לא ידועה צוינה דרך ‎-onlynet:‏ '%s'</translation>
     </message>
     <message>
         <source>Cannot resolve -bind address: '%s'</source>
-        <translation>לא מסוגל לפתור כתובת -bind: '%s'</translation>
+        <translation>לא ניתן לפתור את הכתובת ‎-bind:‏ '%s'</translation>
     </message>
     <message>
         <source>Cannot resolve -externalip address: '%s'</source>
-        <translation>לא מסוגל לפתור כתובת -externalip: '%s'</translation>
+        <translation>לא ניתן לפתור את הכתובת ‎-externalip:‏ '%s'</translation>
     </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
-        <translation>כמות לא תקינה עבור -paytxfee=&lt;amount&gt;: '%s'</translation>
+        <translation>כמות לא תקינה עבור ‎-paytxfee=&lt;amount&gt;‎:‏ '%s'</translation>
     </message>
     <message>
         <source>Invalid amount</source>
@@ -2619,27 +3127,27 @@ rpcpassword=%s
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>טוען את אינדקס הבלוקים...</translation>
+        <translation>מפתח המקטעים נטען…</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation>הוסף צומת להתחברות ונסה לשמור את החיבור פתוח</translation>
+        <translation>הוספת מפרק להתחברות ולנסות לשמור על החיבור פתוח</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation>טוען ארנק...</translation>
+        <translation>הארנק בטעינה…</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
-        <translation>לא יכול להוריד דרגת הארנק</translation>
+        <translation>לא ניתן להחזיר את גרסת הארנק</translation>
     </message>
     <message>
         <source>Cannot write default address</source>
-        <translation>לא יכול לכתוב את כתובת ברירת המחדל</translation>
+        <translation>לא ניתן לכתוב את כתובת בררת המחדל</translation>
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation>סורק מחדש...</translation>
+        <translation>סריקה מחדש…</translation>
     </message>
     <message>
         <source>Done loading</source>
@@ -2647,7 +3155,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>To use the %s option</source>
-        <translation>להשתמש באפשרות %s</translation>
+        <translation>שימוש באפשרות %s</translation>
     </message>
     <message>
         <source>Error</source>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index 28778a0258f0..fcb094703f8a 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -191,10 +191,6 @@
         <source>Tabs toolbar</source>
         <translation>टैबस टूलबार</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[टेस्टनेट]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n सक्रिया संपर्क बीटकोइन नेटवर्क से</numerusform><numerusform>%n सक्रिया संपर्क बीटकोइन नेटवर्क से</numerusform></translation>
@@ -389,14 +385,6 @@ Address: %4
         <source>Form</source>
         <translation>फार्म</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>वॉलेट</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;हाल का लेन-देन&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -860,14 +848,6 @@ Address: %4
         <source>Options:</source>
         <translation>विकल्प:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>configuraion की फाइल का विवरण दें (default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid फाइल का विवरण दें (default: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>डेटा डायरेक्टरी बताएं </translation>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index bf365bb57e44..794a7167e378 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -9,14 +9,30 @@
         <source>Create a new address</source>
         <translation>Dodajte novu adresu</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Nova</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopiraj trenutno odabranu adresu u međuspremnik</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Kopiraj</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>&amp;Zatvori</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopirati adresu</translation>
     </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Brisanje trenutno odabrane adrese s popisa.</translation>
+    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Izvoz podataka iz trenutnog taba u datoteku</translation>
@@ -29,6 +45,34 @@
         <source>&amp;Delete</source>
         <translation>&amp;Brisanje</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Odaberi adresu na koju šalješ novac</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Odaberi adresu na koju primaš novac</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>&amp;Odaberi</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Adresa za slanje</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Adresa za primanje</translation>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+        <translation>Ovo su vaše Bitcoin adrese za slanje uplate. Uvijek provjerite iznos i adresu primatelja prije slanja novca.</translation>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>Ovo su vaše Bitcoin adrese za primanje isplate. Preporučamo da koristite novu primateljsku adresu za svaku transakciju.</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopirati &amp;oznaku</translation>
@@ -37,11 +81,23 @@
         <source>&amp;Edit</source>
         <translation>&amp;Izmjeniti</translation>
     </message>
+    <message>
+        <source>Export Address List</source>
+        <translation>Izvezi listu adresa</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Datoteka vrijednosti odvojenih zarezom (*. csv)</translation>
     </message>
-    </context>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Izvoz neuspješan</translation>
+    </message>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Došlo je do pogreške kod spremanja liste adresa na %1. Molimo pokušajte ponovno.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -59,6 +115,10 @@
 </context>
 <context>
     <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation>Dijalog lozinke</translation>
+    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Unesite lozinku</translation>
@@ -111,6 +171,10 @@
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Jeste li sigurni da želite šifrirati svoj novčanik?</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>VAŽNO: Sve prethodne pričuve vašeg novčanika trebale bi biti zamijenjene novo stvorenom, šifriranom datotekom novčanika. Zbog sigurnosnih razloga, prethodne pričuve nešifriranog novčanika će postati beskorisne čim počnete koristiti novi, šifrirani novčanik.</translation>
+    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Upozorenje: Tipka Caps Lock je uključena!</translation>
@@ -119,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Novčanik šifriran</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Unesite novu lozinku za novčanik. &lt;br/&gt;Molimo Vas da koristite zaporku od &lt;b&gt;deset ili više slučajnih znakova&lt;/b&gt;, ili &lt;b&gt;osam ili više riječi.&lt;/b&gt;</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin će se sada zatvoriti kako bi dovršio postupak šifriranja. Zapamtite da šifriranje vašeg novčanika ne može u potpunosti zaštititi vaše bitcoine od krađe preko zloćudnog softvera koji bi bio na vašem računalu.</translation>
@@ -156,7 +224,7 @@
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>&amp;Potpišite poruku...</translation>
+        <translation>P&amp;otpišite poruku...</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
@@ -166,6 +234,10 @@
         <source>&amp;Overview</source>
         <translation>&amp;Pregled</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Čvor</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Prikaži opći pregled novčanika</translation>
@@ -196,19 +268,35 @@
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>&amp;Postavke</translation>
+        <translation>Pos&amp;tavke</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>&amp;Šifriraj novčanik...</translation>
+        <translation>Ši&amp;friraj novčanik...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Backup novčanika...</translation>
+        <translation>Si&amp;gurnosno kopiraj novčanik...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>&amp;Promijena lozinke...</translation>
+        <translation>&amp;Promjena lozinke...</translation>
+    </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>Adrese za s&amp;lanje</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>Adrese za p&amp;rimanje</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Otvori &amp;URI...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klijent</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -234,6 +322,14 @@
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Promijenite lozinku za šifriranje novčanika</translation>
     </message>
+    <message>
+        <source>&amp;Debug window</source>
+        <translation>&amp;Ispravljanje programerskih pogrešaka</translation>
+    </message>
+    <message>
+        <source>Open debugging and diagnostic console</source>
+        <translation>Otvori konzolu za dijagnostiku i otklanjanje programskih pogrešaka.</translation>
+    </message>
     <message>
         <source>&amp;Verify message...</source>
         <translation>&amp;Potvrdite poruku...</translation>
@@ -250,13 +346,41 @@
         <source>&amp;Send</source>
         <translation>&amp;Pošalji</translation>
     </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>Pri&amp;miti</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Prikaži informacije o Bitcoin Coreu</translation>
+    </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>Po&amp;kaži / Sakrij</translation>
+    </message>
+    <message>
+        <source>Show or hide the main Window</source>
+        <translation>Prikaži ili sakrij glavni prozor</translation>
+    </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>Šifriraj privatne ključeve koji pripadaju tvom novčaniku</translation>
+    </message>
+    <message>
+        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+        <translation>Potpiši poruke svojim Bitcoin adresama kako bi dokazao da si njihov vlasnik</translation>
+    </message>
+    <message>
+        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+        <translation>Provjerite porkue kako bi se uvjerili da su potpisane navedenim Bitcoin adresama</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Datoteka</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation>&amp;Konfiguracija</translation>
+        <translation>&amp;Postavke</translation>
     </message>
     <message>
         <source>&amp;Help</source>
@@ -266,22 +390,30 @@
         <source>Tabs toolbar</source>
         <translation>Traka kartica</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Jezgra</translation>
     </message>
+    <message>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation>Zatraži uplate (Stvara QR kodove i bitcoin: URIje)</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>&amp;O Bitcoin Jezgri</translation>
+    </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>Prikaži popis korištenih adresa i oznaka za slanje isplate</translation>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation>Prikaži popis korištenih adresa i oznaka za primanje isplate</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n aktivna veza na Bitcoin mrežu</numerusform><numerusform>%n aktivne veze na Bitcoin mrežu</numerusform><numerusform>%n aktivnih veza na Bitcoin mrežu</numerusform></translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Obrađeno %1 blokova povijesti transakcije.</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Greška</translation>
@@ -468,11 +600,7 @@ Adresa:%4
         <source>Error</source>
         <translation>Pogreška</translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(od potrebnog %1GB)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     </context>
@@ -577,18 +705,10 @@ Adresa:%4
         <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>Prikazani podatci mogu biti zastarjeli. Vaš novčanik se automatski sinkronizira s Bitcoin mrežom kada je veza uspostavljena, ali taj proces još nije završen.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Novčanik</translation>
-    </message>
     <message>
         <source>Total:</source>
         <translation>Ukupno:</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Nedavne transakcije&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -1199,6 +1319,10 @@ Adresa:%4
         <source>Show transaction details</source>
         <translation>Prikaži detalje transakcije</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Izvoz neuspješan</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Datoteka podataka odvojenih zarezima (*.csv)</translation>
@@ -1278,42 +1402,14 @@ Adresa:%4
         <source>Options:</source>
         <translation>Postavke:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Odredi konfiguracijsku datoteku (ugrađeni izbor: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Odredi proces ID datoteku (ugrađeni izbor: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Odredi direktorij za datoteke</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Slušaj na &lt;port&gt;u (default: 8333 ili testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Održavaj najviše &lt;n&gt; veza sa članovima (default: 125)</translation>
-    </message>
     <message>
         <source>Specify your own public address</source>
         <translation>Odaberi vlastitu javnu adresu</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Prag za odspajanje članova koji se čudno ponašaju (default: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Broj sekundi koliko se članovima koji se čudno ponašaju neće dopustiti da se opet spoje (default: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Prihvaćaj JSON-RPC povezivanje na portu broj &lt;port&gt; (ugrađeni izbor: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Prihvati komande iz tekst moda i JSON-RPC</translation>
@@ -1342,10 +1438,6 @@ Adresa:%4
         <source>Error: Disk space is low!</source>
         <translation>Pogreška: Nema prostora na disku!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Pogreška: sistemska pogreška:</translation>
-    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importiraj blokove sa vanjskog blk000??.dat fajla</translation>
@@ -1354,30 +1446,10 @@ Adresa:%4
         <source>Information</source>
         <translation>Informacija</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Prihvati samo lance blokova koji se podudaraju sa ugrađenim checkpoint-ovima (default: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Šalji trace/debug informacije na konzolu umjesto u debug.log datoteku</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Podesite minimalnu veličinu bloka u bajtovima (default: 0)</translation>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Odredi vremenski prozor za spajanje na mrežu u milisekundama (ugrađeni izbor: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Pogreška sistema:</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Pokušaj koristiti UPnP da otvoriš port za uslugu (default: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Pokušaj koristiti UPnP da otvoriš port za uslugu (default: 1 when listening)</translation>
@@ -1402,10 +1474,6 @@ Adresa:%4
         <source>Upgrade wallet to latest format</source>
         <translation>Nadogradite novčanik u posljednji format.</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Podesi memorijski prostor za ključeve na &lt;n&gt; (ugrađeni izbor: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Ponovno pretraži lanac blokova za transakcije koje nedostaju</translation>
@@ -1414,14 +1482,6 @@ Adresa:%4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Koristi OpenSSL (https) za JSON-RPC povezivanje</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Uslužnikov SSL certifikat (ugrađeni izbor: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Uslužnikov privatni ključ (ugrađeni izbor: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Ova poruka za pomoć</translation>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index b5eb262442f3..1edd2511eb0b 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Fül eszköztár</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[teszthálózat]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Blokk forrása ismeretlen...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>A tranzakció-történet %1 blokkja feldolgozva.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n óra</numerusform><numerusform>%n óra</numerusform></translation>
@@ -893,15 +885,7 @@ Cím: %4
         <source>Error</source>
         <translation>Hiba</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB hely érhető el</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>( ebből %1GB szükséges)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1062,10 +1046,6 @@ Cím: %4
         <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>A kijelzett információ lehet, hogy elavult. A pénztárcája automatikusan szinkronizálja magát a Bitcoin hálózattal miután a kapcsolat létrejön, de ez e folyamat még nem fejeződött be.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Tárca</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Elérhető:</translation>
@@ -1098,10 +1078,6 @@ Cím: %4
         <source>Your current total balance</source>
         <translation>Aktuális egyenleged</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Legutóbbi tranzakciók&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>Nincs szinkronban.</translation>
@@ -1289,14 +1265,6 @@ Cím: %4
         <source>never</source>
         <translation>soha</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Igen</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Nem</translation>
-    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -2075,16 +2043,6 @@ Cím: %4
     <message>
         <source>Options:</source>
         <translation>Opciók
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Konfigurációs fájl (alapértelmezett: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid-fájl (alapértelmezett: bitcoind.pid)
 </translation>
     </message>
     <message>
@@ -2092,14 +2050,6 @@ Cím: %4
         <translation>Adatkönyvtár
 </translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Csatlakozásokhoz figyelendő &lt;port&gt; (alapértelmezett: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Maximálisan &lt;n&gt; számú kapcsolat fenntartása a peerekkel (alapértelmezés: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Kapcsolódás egy csomóponthoz a peerek címeinek megszerzése miatt, majd szétkapcsolás</translation>
@@ -2108,18 +2058,6 @@ Cím: %4
         <source>Specify your own public address</source>
         <translation>Adja meg az Ön saját nyilvános címét</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Helytelenül viselkedő peerek leválasztási határértéke (alapértelmezés: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Helytelenül viselkedő peerek kizárási ideje másodpercben (alapértelmezés: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>JSON-RPC csatlakozásokhoz figyelendő &lt;port&gt; (alapértelmezett: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Parancssoros és JSON-RPC parancsok elfogadása
@@ -2187,62 +2125,10 @@ Cím: %4
         <source>Error: Disk space is low!</source>
         <translation>Hiba: kevés a hely a lemezen!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Hiba: rendszerhiba:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Egyik hálózati porton sem sikerül hallgatni. Használja a -listen=0 kapcsolót, ha ezt szeretné.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>A blokkinformáció olvasása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>A blokk olvasása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>A blokkindex szinkronizálása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>A blokkindex írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>A blokkinformáció írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>A blokk írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>A fájlinformáció írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Az érme-adatbázis írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>A tranzakcióindex írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>A stornóadatok írása nem sikerült</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Érmék generálása (alapértelmezett: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Hány blokkot ellenőrizzen induláskor (alapértelmezett: 288, 0 = mindet)</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Importálás</translation>
@@ -2283,18 +2169,6 @@ Cím: %4
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Érvénytelen -mintxfee=&lt;amount&gt;: '%s' összeg</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Teljes tranzakcióindex megőrzése (alapértelmezett: 0)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Csak blokklánccal egyező beépített ellenőrző pontok elfogadása (alapértelmezés: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Csak a &lt;net&gt; hálózat csomópontjaihoz kapcsolódjon (IPv4, IPv6 vagy Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>trace/debug információ küldése a konzolra a debog.log fájl helyett</translation>
@@ -2303,14 +2177,6 @@ Cím: %4
         <source>Signing transaction failed</source>
         <translation>Tranzakció aláírása sikertelen</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Csatlakozás időkerete milliszekundumban (alapértelmezett: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Rendszerhiba:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Ez egy kísérleti szoftver.</translation>
@@ -2327,10 +2193,6 @@ Cím: %4
         <source>Transaction too large</source>
         <translation>Túl nagy tranzakció</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>UPnP-használat engedélyezése a figyelő port feltérképezésénél (default: 1 when listening)</translation>
@@ -2357,11 +2219,6 @@ Cím: %4
         <source>Upgrade wallet to latest format</source>
         <translation>A Tárca frissítése a legfrissebb formátumra</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Kulcskarika mérete &lt;n&gt; (alapértelmezett: 100)
-</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Blokklánc újraszkennelése hiányzó tárca-tranzakciók után
@@ -2370,16 +2227,6 @@ Cím: %4
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>OpenSSL (https) használata JSON-RPC csatalkozásokhoz
-</translation>
-    </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Szervertanúsítvány-fájl (alapértelmezett: server.cert)
-</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Szerver titkos kulcsa (alapértelmezett: server.pem)
 </translation>
     </message>
     <message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 80d4141beb96..6056c3a736fc 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -278,6 +278,10 @@
         <source>Open &amp;URI...</source>
         <translation>Buka &amp;URI</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Client Bitcoin Inti</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Blok-blok sedang di-impor dari disk</translation>
@@ -330,6 +334,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Menerima</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Tampilkan informasi tentang Bitcoin Inti</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Sunjukkan / Menyembungi</translation>
@@ -366,10 +374,6 @@
         <source>Tabs toolbar</source>
         <translation>Baris tab</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -410,10 +414,6 @@
         <source>No block source available...</source>
         <translation>Sumber blok tidak tersedia...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 blok-blok riwayat transaksi telah diproses</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n jam</numerusform></translation>
@@ -852,15 +852,11 @@ Alamat: %4
         <source>Error</source>
         <translation>Gagal</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB di hard disk yang masih tersedia</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(dari %1GB yang diperlu)</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB dari ruang yang tersedia</numerusform></translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1077,10 +1073,6 @@ Alamat: %4
         <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>Informasi terlampir mungkin sudah kedaluwarsa. Dompet Anda secara otomatis mensinkronisasi dengan jaringan Bitcoin ketika sebuah hubungan terbentuk, namun proses ini belum selesai.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Dompet</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Tersedia:</translation>
@@ -1113,10 +1105,6 @@ Alamat: %4
         <source>Your current total balance</source>
         <translation>Jumlah saldo Anda sekarang</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaksi sebelumnya&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>tidak tersinkron</translation>
@@ -2314,26 +2302,10 @@ Alamat: %4
         <source>Options:</source>
         <translation>Pilihan:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Tentukan berkas konfigurasi (standar: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Tentukan berkas pid (standar: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Tentukan direktori data</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Menerima hubungan pada &lt;port&gt; (standar: 8333 atau testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mengatur hubungan paling banyak &lt;n&gt; ke peer (standar: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Hubungkan ke node untuk menerima alamat peer, dan putuskan</translation>
@@ -2342,14 +2314,6 @@ Alamat: %4
         <source>Specify your own public address</source>
         <translation>Tentukan alamat publik Anda sendiri</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Batas untuk memutuskan peer buruk (standar: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Jumlah kedua untuk menjaga peer buruk dari hubung-ulang (standar: 86400)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Menerima perintah baris perintah dan JSON-RPC</translation>
@@ -2366,10 +2330,6 @@ Alamat: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Terima hubungan dari luar (standar: 1 kalau -proxy atau -connect tidak dipilih)</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Sandi yang diterima (biasanya: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Gagal: Transaksi ditolak. Ini mungkin terjadi jika beberapa dari koin dalam dompet Anda telah digunakan, seperti ketika Anda menggunakan salinan wallet.dat dan beberapa koin telah dibelanjakan dalam salinan tersebut tetapi disini tidak tertandai sebagai terpakai.</translation>
@@ -2382,10 +2342,6 @@ Alamat: %4
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Tidak bisa mengikat dengan %s di computer ini. Kemungkinan Bitcoin Core sudah mulai.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Gunakanlah proxy SOCKS5 yang tersendiri supaya menghubungkan peer dengan layanan tersembunyi Tor (biasanya: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Peringatan: -paytxfee sangat besar! Ini adalah biaya pengiriman yang akan dibayar oleh Anda jika transaksi terkirim.</translation>
@@ -2406,10 +2362,6 @@ Alamat: %4
         <source>(default: 1)</source>
         <translation>(pengaturan awal: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(pengaturan awal: wallet.dat)</translation>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Coba memulihkan kunci-kunci pribadi dari wallet.dat yang rusak</translation>
@@ -2466,58 +2418,6 @@ Alamat: %4
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Gagal: Dompet terkunci, transaksi tidak bisa dibuat!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: system error:</translation>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Gagal membaca informasi dari blok</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Gagal membaca blok</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Gagal menyamakan daftar isi blok</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Gagal menulis daftar isi blok</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Gagal menulis info blok</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Gagal menulis blok</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Gagal menulis info arsip</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Gagal menuliskan ke dalam database koin</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Gagal menulis daftar isi transaksi</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Gagal menulis ulang data</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Buatlah koin (biasanya: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Periksakan berapa blok waktu mulai (biasanya: 288, 0 = setiapnya)</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>mengimpor...</translation>
@@ -2538,18 +2438,10 @@ Alamat: %4
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Atur ukuran maksimal untuk blok dalam byte (biasanya: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Mengatur jumlah urutan untuk layanan panggilan RPC (pengaturan awal: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Tentukan arsip dompet (dalam direktori data)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Perubahan saldo untuk transaksi yang belum dikonfirmasi setelah transaksi terkirim (default: 1)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Blok-blok sedang diverifikasi...</translation>
@@ -2590,14 +2482,6 @@ Alamat: %4
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nilai yang salah untuk -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Jaga daftar transaksi yang lengkap (biasanya: 0)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Dilarang menghubungkan node-node selain &lt;net&gt; (IPv4, IPv6 atau Tor)</translation>
-    </message>
     <message>
         <source>RPC server options:</source>
         <translation>Opsi server RPC:</translation>
@@ -2606,10 +2490,6 @@ Alamat: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Kirim info jejak/debug ke konsol bukan berkas debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Atur ukuran minimal untuk blok dalam byte (standar: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Mengecilkan berkas debug.log saat klien berjalan  (Standar: 1 jika tidak -debug)</translation>
@@ -2618,14 +2498,6 @@ Alamat: %4
         <source>Signing transaction failed</source>
         <translation>Tandatangani transaksi tergagal</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Menetapkan waktu berakhir koneksi di milidetik (biasanya: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Kesalahan sistem:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Nilai transaksi terlalu kecil</translation>
@@ -2670,10 +2542,6 @@ Alamat: %4
         <source>Upgrade wallet to latest format</source>
         <translation>Perbarui dompet ke format terbaru</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Kirim ukuran kolam kunci ke &lt;n&gt; (standar: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Pindai ulang rantai-blok untuk transaksi dompet yang hilang</translation>
@@ -2682,14 +2550,6 @@ Alamat: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Gunakan OpenSSL (https) untuk hubungan JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Berkas sertifikat server (standar: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Kunci pribadi server (standar: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Pesan bantuan ini</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index a803241d10db..ddc7e44c472b 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -35,7 +35,7 @@
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Esporta su file i dati della tabella corrente </translation>
+        <translation>Esporta i dati  nella tabella corrente  in un file</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Esportazione Fallita.</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Si è verificato un errore tentando di salvare la lista degli indirizzi. %1. Riprova</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -113,19 +117,19 @@
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Finestra passphrase</translation>
+        <translation>Finestra parola d'ordine</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>Inserisci la passphrase</translation>
+        <translation>Inserisci la parola d'ordine</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>Nuova passphrase</translation>
+        <translation>Nuova parola d'ordine</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Ripeti la nuova passphrase</translation>
+        <translation>Ripeti la nuova parola d'ordine</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -179,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Portamonete cifrato</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Inserisci una nuona password per il postafoglio.&lt;br/&gt;Perfavore usa una password di&lt;b&gt;dieci o più caratteri&lt;/b&gt;, o &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin si chiuderà per portare a termine il processo di cifratura. Ricorda che cifrare il tuo portamonete non può fornire una protezione totale contro i furti causati da infezioni malware.</translation>
@@ -286,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Apri &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core client</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importazione blocchi dal disco...</translation>
@@ -338,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Ricevi</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostra le informazioni riguardo a Bitcoin core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostra / Nascondi</translation>
@@ -374,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra degli strumenti "Tabs"</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -418,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Nessuna fonte di blocchi disponibile</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Processati %1 blocchi della cronologia transazioni.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n ora</numerusform><numerusform>%n ore</numerusform></translation>
@@ -537,6 +545,10 @@ Indirizzo: %4
         <source>Fee:</source>
         <translation>Commissione:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Importo</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>Dopo Commissione:</translation>
@@ -625,6 +637,10 @@ Indirizzo: %4
         <source>Copy priority</source>
         <translation>Copia priorità</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copia l'importo</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Copia resto</translation>
@@ -673,6 +689,10 @@ Indirizzo: %4
         <source>none</source>
         <translation>nessuno</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Può variare +/- %1 satoshi(s) per input.</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>sì</translation>
@@ -882,18 +902,14 @@ Indirizzo: %4
         <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Errore</translation>
-    </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB di spazio libero disponibile</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Errore: La cartella dati "%1" specificata non può essere creata.</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation>(di %1GB richiesti)</translation>
+        <source>Error</source>
+        <translation>Errore</translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -955,6 +971,14 @@ Indirizzo: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Numero di thread di &amp;verifica degli script </translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accetta connessioni da fuori</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permetti connessioni in entrata</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Connessione alla rete Bitcoin attraverso un proxy SOCKS.</translation>
@@ -1128,8 +1152,8 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Le informazioni visualizzate potrebbero non essere aggiornate. Il portamonete si sincronizza automaticamente con la rete Bitcoin una volta stabilita una connessione, ma questo processo non è ancora stato completato.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Portamonete</translation>
+        <source>Watch-only:</source>
+        <translation>Guarda solo</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1155,6 +1179,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Importo generato dal mining e non ancora maturato</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldo</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Totale:</translation>
@@ -1164,8 +1192,20 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Saldo totale attuale</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transazioni recenti&lt;/b&gt;</translation>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Il tuo saldo attuale negli indirizzi watch-only</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Saldo Spendibile:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transazioni recenti</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transazioni non confermate su indirizzi di sola lettura</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1182,6 +1222,22 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Invalid payment address %1</source>
         <translation>Indirizzo di pagamento non valido %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Richiesta di pagamento rifiutata</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Il network della richiesta di pagamento non corrisponde al network del client.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Richieda di pagamento scaduta</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>La richiesta di pagamento non è stata inizializzata.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>L'importo di pagamento richiesto di %1 è troppo basso (considerato come trascurabile).</translation>
@@ -1198,10 +1254,18 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL di recupero della Richiesta di pagamento non valido: %1</translation>
     </message>
+    <message>
+        <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+        <translation>Impossibile interpretare l'URI! Ciò può essere causato da un indirizzo Bitcoin invalido o da parametri URI non corretti.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Gestione del file di richiesta del pagamento</translation>
     </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Il file di richiesta del pagamento non può essere letto o elaborato! Questo può essere causato da una richiesta di pagamento non valida.</translation>
+    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Le richieste di pagamento non verificate verso script di pagamento personalizzati non sono supportate.</translation>
@@ -1214,6 +1278,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Error communicating with %1: %2</source>
         <translation>Errore di comunicazione con %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>La richiesta di pagamento non può essere analizzata.</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Risposta errata da parte del server %1</translation>
@@ -1229,13 +1297,29 @@ Più URL vengono separati da una barra verticale |.</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Indirizzo/Hostname</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo di ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Inserisci un indirizzo Bitcoin (e.g. %1)</translation>
+    </message>
     <message>
         <source>%1 d</source>
         <translation>%1 d</translation>
@@ -1252,11 +1336,27 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>%1 s</source>
         <translation>%1 s</translation>
     </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>RETE</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>SCONOSCIUTO</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Nessuno</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1306,6 +1406,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Using OpenSSL version</source>
         <translation>Versione OpenSSL in uso</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Versione BerkeleyDB in uso</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Tempo di avvio</translation>
@@ -1330,6 +1434,66 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Current number of blocks</source>
         <translation>Numero attuale di blocchi</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Ricevuto</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Inviato</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Peers</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Seleziona un peer per visualizzare informazioni più dettagliate.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direzione</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versione</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Servizi</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Blocco di partenza</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Tempo di connessione</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Ultimo invio</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Ultima ricevuta</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes Inviati</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes Ricevuti</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo di Ping</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Ora del blocco più recente</translation>
@@ -1406,17 +1570,25 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
+    <message>
+        <source>via %1</source>
+        <translation>via %1</translation>
+    </message>
     <message>
         <source>never</source>
         <translation>mai</translation>
     </message>
     <message>
-        <source>Yes</source>
-        <translation>Si</translation>
+        <source>Inbound</source>
+        <translation>In entrata</translation>
     </message>
     <message>
-        <source>No</source>
-        <translation>No</translation>
+        <source>Outbound</source>
+        <translation>In uscita</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Sconosciuto</translation>
     </message>
     </context>
 <context>
@@ -1658,6 +1830,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Clear all fields of the form.</source>
         <translation>Cancellare tutti i campi del modulo.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Trascurabile</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Cancella &amp;tutto</translation>
@@ -1758,6 +1934,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Warning: Unknown change address</source>
         <translation>Attenzione: Indirizzo per il resto sconosciuto</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copia l'importo</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Sei sicuro di voler inviare?</translation>
@@ -1793,6 +1973,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>This is a normal payment.</source>
         <translation>Questo è un normale pagamento.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>L'indirizzo Bitcoin a cui vuoi inviare il pagamento</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1863,6 +2047,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puoi firmare messaggi con i tuoi indirizzi in modo da dimostrarne il possesso. Presta attenzione a non firmare dichiarazioni vaghe, attacchi di phishing potrebbero cercare di spingerti ad apporre la tua firma su di esse. Firma solo dichiarazioni completamente dettagliate e delle quali condividi in pieno il contenuto.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>L'indirizzo Bitcoin con cui vuoi contrassegnare il messaggio</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Scegli un indirizzo usato precedentemente</translation>
@@ -1915,6 +2103,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Enter the signing 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.</source>
         <translation>Inserisci l'indirizzo del firmatario, il messaggio (assicurati di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella firma più di quanto non sia riportato nel messaggio stesso, per evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>L'indirizzo Bitcoin con cui è stato contrassegnato il messaggio</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verifica il messaggio per accertare che sia stato firmato con l'indirizzo specificato</translation>
@@ -2056,6 +2248,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>own address</source>
         <translation>proprio indirizzo</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Guarda solo</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>etichetta</translation>
@@ -2076,6 +2272,14 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Debit</source>
         <translation>Debito</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Credito Totale</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Credito totale</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Commissione transazione</translation>
@@ -2226,6 +2430,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Mined</source>
         <translation>Ottenuto dal mining</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Guarda solo</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(N / a)</translation>
@@ -2337,6 +2545,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Export Transaction History</source>
         <translation>Esporta lo storico delle transazioni</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Sola lettura</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Esportazione Fallita.</translation>
@@ -2392,7 +2604,11 @@ Più URL vengono separati da una barra verticale |.</translation>
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Tipo di unità visualizzata. Clicca per selezionare un altra unità</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2448,26 +2664,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Options:</source>
         <translation>Opzioni:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specifica il file di configurazione (predefinito: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specifica il file pid (predefinito: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Specifica la cartella dati</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Attendi le connessioni su &lt;porta&gt; (predefinita: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantieni al massimo &lt;n&gt; connessioni ai peer (predefinite: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connettiti ad un nodo per recuperare gli indirizzi dei peer e scollegati</translation>
@@ -2476,18 +2676,6 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Specify your own public address</source>
         <translation>Specifica il tuo indirizzo pubblico</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Soglia di disconnessione dei peer di cattiva qualità (predefinita: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Numero di secondi di sospensione che i peer di cattiva qualità devono attendere prima di potersi riconnettere (predefiniti: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Attendi le connessioni JSON-RPC su &lt;porta&gt; (predefinita: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accetta comandi da riga di comando e JSON-RPC</translation>
@@ -2528,17 +2716,13 @@ Si raccomanda anche di impostare alertnotify così sarai avvisato di eventuali p
 ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifrature accettabili (predefinito: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associa all'indirizzo indicato e resta permanentemente in ascolto su questo. Usa la notazione [host]:porta per l'IPv6</translation>
     </message>
     <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limita la quantità di transazioni gratuite ad &lt;n&gt;*1000 byte al minuto (predefinito: 15)</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Elimina tutte le transazioni dal wallet e recupera solo le parti della blockchain con il comando -rescan all'avvio.</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
@@ -2556,14 +2740,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Esegui comando quando una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Scarica l'attività del database dalla memoria al log su disco ogni &lt;n&gt; megabytes (predefinito: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Determina quanto sarà approfondita la verifica da parte di -checkblocks (0-4, predefinito: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In questa modalità -genproclimit determina quanti blocchi saranno generati immediatamente.</translation>
@@ -2572,10 +2748,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Imposta il numero di thread per la verifica degli script (da %u a %d, 0 = automatico, &lt;0 = lascia questo numero di core liberi, predefinito: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Imposta il limite della cpu quando la generazione è abilitata (-1 = non limitato, predefinito: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Questa versione è una compilazione pre-rilascio - usala a tuo rischio - non utilizzarla per la generazione o per applicazioni di commercio</translation>
@@ -2584,10 +2756,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Impossibile associarsi a %s su questo computer. Probabilmente Bitcoin Core è già in esecuzione.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usa un SOCKS5 proxy separato per raggiungere servizi nascosti di Tor (predefinito: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione.</translation>
@@ -2612,10 +2780,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>(default: 1)</source>
         <translation>(predefinito: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(predefinito: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; può essere:</translation>
@@ -2644,10 +2808,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Opzioni di Debug/Test:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Disabilita la modalità sicura, escludi effettivamente gli eventi di modalità sicura (predefinito: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Scopre il proprio indirizzo IP (predefinito: 1 se in ascolto e no -externalip)</translation>
@@ -2676,6 +2836,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error opening block database</source>
         <translation>Errore caricamento database blocchi</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Errore: si è verificato un errore fatale, consulta il file debug.log for maggiori dettagli.</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Errore: la spazio libero sul disco è insufficiente!</translation>
@@ -2684,66 +2848,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Errore: portamonete bloccato, impossibile creare la transazione!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Errore: errore di sistema:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Nessuna porta disponibile per l'ascolto. Usa -listen=0 se vuoi procedere comunque.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Lettura informazioni blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Lettura blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Sincronizzazione dell'indice del blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Scrittura dell'indice del blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Scrittura informazioni blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Scrittura blocco fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Scrittura informazioni file fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Scrittura nel database dei bitcoin fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Scrittura dell'indice di transazione fallita</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Scrittura dei dati di ripristino fallita</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forza modalità provvisoria (predefinito: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera Bitcoin (predefinito: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Numero di blocchi da controllare all'avvio (predefinito: 288, 0 = tutti)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Se &lt;category&gt; non è specificata, mostra tutte le informazioni di debug.</translation>
@@ -2765,8 +2873,8 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <translation>Non ci sono abbastanza descrittori di file disponibili.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Preponi timestamp all'output di debug (predefinito: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Connetti solo ai nodi nella rete &lt;net&gt; (ipv4, ipv6 o Tor)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -2780,18 +2888,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Imposta la dimensione massima del blocco in byte (predefinita: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Specifica il numero massimo di richieste RPC in parallelo (predefinito: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specifica il file portamonete (all'interno della cartella dati)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Spendi il resto non confermato quando si inviano transazioni (predefinito: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Questo è previsto per l'uso con test di regressione e per lo sviluppo di applicazioni.</translation>
@@ -2820,17 +2920,29 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocchi da un file blk000??.dat esterno</translation>
     </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Si è verificato un errore durante l'impostazione della %s porta %u RPC per l'ascolto su: %s</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Non è possibile ottenere un lock sulla cartella %s. Probabilmente Bitcoin Core è già in esecuzione.</translation>
     </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Errore: l'ascolto per per connessioni in arrivo fallito (errore riportato %s)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Esegue un comando quando viene ricevuto un allarme rilevante o quando vediamo un fork veramente lungo (%s in cmd è sostituito dal messaggio)</translation>
     </message>
     <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Emette informazioni di debug in output (predefinito: 0, fornire &lt;category&gt; è opzionale)</translation>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Le commissioni (in BTC/kb) minori di questa saranno considerate nulle per la trasmissione (predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Le commissioni inferiori a questo valore saranno considerate nulle per la creazione della transazione (predefinito: %s)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
@@ -2849,41 +2961,13 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <translation>Importo non valido per -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limita la dimensione della cache delle firme a &lt;n&gt; voci (predefinito: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Abilita il log della priorità di transazione e della commissione per kB quando si generano blocchi (default: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantieni un indice di transazione completo (predefinito: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Buffer di ricezione massimo per connessione, &lt;n&gt;*1000 byte (predefinito: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Buffer di invio massimo per connessione, &lt;n&gt;*1000 byte (predefinito: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Accetta solo una catena di blocchi che corrisponde ai checkpoint predefiniti (predefinito: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Connetti solo a nodi nella rete &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Opzioni  relay nodo:</translation>
     </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Stampa il blocco all'avvio, se presente nell'indice dei blocchi</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Stampa l'albero dei blocchi all'avvio (default: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opzioni RPC SSL: (consulta la Bitcoin Wiki per le istruzioni relative alla configurazione SSL)</translation>
@@ -2900,22 +2984,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Altera casualmente 1 ogni &lt;n&gt; messaggi di rete</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Mantieni in esecuzione un thread per scaricare periodicamente il portafoglio (predefinito: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Invia le informazioni di trace/debug alla console invece che al file debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Imposta dimensione minima del blocco in bytes (predefinita: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Imposta il flag DB_PRIVATE nell'ambiente di database del portamonete (predefinito: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra tutte le opzioni di debug (utilizzo: --help -help-debug)</translation>
@@ -2928,14 +3000,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Transazione di firma fallita</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specifica il timeout di connessione in millisecondi (predefinito: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Errore di sistema:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Questo è un software sperimentale.</translation>
@@ -2952,10 +3016,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Transaction too large</source>
         <translation>Transazione troppo grande</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 1 when listening)</translation>
@@ -2965,6 +3025,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <translation>Nome utente per connessioni JSON-RPC
 </translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Il wallet ha bisogno di essere reiscritto : riavvia Bitcoin Core per completare l'operazione</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Attenzione</translation>
@@ -2998,10 +3062,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Aggiorna il wallet all'ultimo formato</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Impostare la quantità di chiavi nel key pool a &lt;n&gt; (predefinita: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Ripeti analisi della catena dei blocchi per cercare le transazioni mancanti dal portamonete
@@ -3012,14 +3072,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <translation>Utilizzare OpenSSL (https) per le connessioni JSON-RPC
 </translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>File certificato del server (predefinito: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Chiave privata del server (predefinito: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Questo messaggio di aiuto
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index f056dd401ee9..c6ba60ec481f 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -370,10 +370,6 @@
         <source>Tabs toolbar</source>
         <translation>タブツールバー</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin のコア</translation>
@@ -398,10 +394,6 @@
         <source>No block source available...</source>
         <translation>利用可能なブロックがありません...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>取引履歴の %1 ブロックを処理しました。</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n 時間</numerusform></translation>
@@ -727,6 +719,10 @@ Address: %4
         <source>Welcome</source>
         <translation>ようこそ</translation>
     </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>ようこそ！</translation>
+    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>初期値のデータ ディレクトリを使用</translation>
@@ -743,15 +739,7 @@ Address: %4
         <source>Error</source>
         <translation>エラー</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GBの利用可能な空き領域</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(%1GB が必要)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -932,10 +920,6 @@ Address: %4
         <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>表示された情報は古いかもしれません。接続が確立されると、あなたのウォレットは Bitcoin ネットワークと自動的に同期しますが、このプロセスはまだ完了していません。</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>ウォレット</translation>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>あなたの利用可能残高</translation>
@@ -960,10 +944,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>あなたの現在の残高</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;最近の取引&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>同期していない</translation>
@@ -2029,26 +2009,10 @@ Address: %4
         <source>Options:</source>
         <translation>オプション:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>設定ファイルの指定 (初期値: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid ファイルの指定 (初期値: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>データ ディレクトリの指定</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>接続のポート番号 (初期値: 8333、testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>ピアの最大接続数 (初期値: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>ピア アドレスを取得するためにノードに接続し、そして切断します</translation>
@@ -2057,18 +2021,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>あなた自身のパブリックなアドレスを指定</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>不正なピアを切断するためのしきい値 (初期値: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>不正なピアを再接続するまでの秒数 (初期値: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>&lt;port&gt; で JSON-RPC 接続をリスン (初期値: 8332、testnet は 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>コマンドラインと JSON-RPC コマンドを許可</translation>
@@ -2152,10 +2104,6 @@ rpcpassword=%s
         <source>(default: 1)</source>
         <translation>(デフォルト: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(デフォルト: wallet.dat)</translation>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>壊れた wallet.dat から秘密鍵を復旧することを試す</translation>
@@ -2209,66 +2157,10 @@ rpcpassword=%s
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>エラー: ウォレットはロックされ、取引を作成できません!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>エラー: システム エラー:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ポートのリスンに失敗しました。必要であれば -listen=0 を使用してください。</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>ブロック情報の読み取りに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>ブロックの読み取りに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>ブロック インデックスの同期に失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>ブロック インデックスの書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>ブロック情報の書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>ブロックの書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>ファイル情報の書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>コインデータベースへの書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>取引インデックスの書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>元へ戻すデータの書き込みに失敗しました</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>セーフモードを矯正する (デフォルト: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>コインを生成 (初期値: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>起動時に点検するブロック数 (初期値: 288, 0=すべて)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>&lt;category&gt; が与えられなかった場合には、すべてのデバッグ情報が出力されます。</translation>
@@ -2285,10 +2177,6 @@ rpcpassword=%s
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>現在の blk000??.dat ファイルからブロック チェーンのインデックスを再構築</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>RPC サービスのスレッド数を設定 (初期値: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>ウォレットのファイルを指定　(データ・ディレクトリの中に)</translation>
@@ -2329,34 +2217,6 @@ rpcpassword=%s
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>署名キャッシュのサイズを &lt;n&gt; エントリーに制限する (デフォルト: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>ブロックの採掘時にトランザクションの優先度と1kBあたりの手数料をログに残す (デフォルト: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>完全な取引インデックスを維持する (初期値: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>接続毎の最大受信バッファ &lt;n&gt;*1000 バイト (初期値: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>接続毎の最大送信バッファ &lt;n&gt;*1000 バイト (初期値: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>内蔵のチェックポイントと一致するブロック チェーンのみを許可 (初期値: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>&lt;net&gt; (IPv4, IPv6, Tor) ネットワーク内のノードだけに接続する</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL オプション: (SSLのセットアップ手順はビットコインWikiを参照してください)</translation>
@@ -2369,10 +2229,6 @@ rpcpassword=%s
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>最小ブロックサイズをバイトで設定 (初期値: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>クライアント起動時に debug.log ファイルを縮小 (初期値: -debug オプションを指定しない場合は1)</translation>
@@ -2381,14 +2237,6 @@ rpcpassword=%s
         <source>Signing transaction failed</source>
         <translation>取引の署名に失敗しました</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>接続のタイムアウトをミリセコンドで指定 (初期値: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>システム エラー:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>取引の額が小さ過ぎます</translation>
@@ -2401,10 +2249,6 @@ rpcpassword=%s
         <source>Transaction too large</source>
         <translation>取引が大き過ぎます</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>リスン ポートの割当に UPnP を使用 (初期値: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>リスン ポートの割当に UPnP を使用 (初期値: リスン中は1)</translation>
@@ -2437,10 +2281,6 @@ rpcpassword=%s
         <source>Upgrade wallet to latest format</source>
         <translation>ウォレットを最新のフォーマットにアップグレード</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>key pool のサイズを &lt;n&gt; (初期値: 100) にセット</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>失ったウォレットの取引のブロック チェーンを再スキャン</translation>
@@ -2449,14 +2289,6 @@ rpcpassword=%s
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPC 接続に OpenSSL (https) を使用</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>サーバ証明書ファイル (初期値: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>サーバの秘密鍵 (初期値: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>このヘルプ メッセージ</translation>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index c23367171da2..5a566d4445ba 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -374,10 +374,6 @@
         <source>Tabs toolbar</source>
         <translation>ბარათების პანელი</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -414,10 +410,6 @@
         <source>No block source available...</source>
         <translation>ბლოკების წყარო მიუწვდომელია...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>დამუშავებულია ტრანსაქციების ისტორიის %1 ბლოკი.</translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation>%1 და %2</translation>
@@ -852,15 +844,7 @@ Address: %4
         <source>Error</source>
         <translation>შეცდომა</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>გიგაბაიტია თავისუფალი</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(საჭიროა  %1GB)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1069,10 +1053,6 @@ Address: %4
         <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>ნაჩვენები ინფორმაცია შეიძლება მოძველებული იყოს. თქვენი საფულე ავტომატურად სინქრონიზდება Bitcoin-ის ქსელთან კავშირის დამყარების შემდეგ, ეს პროცესი ჯერ არ არის დასრულებული.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>საფულე</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>ხელმისაწვდომია:</translation>
@@ -1105,10 +1085,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>თქვენი სრული მიმდინარე ბალანსი</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;ბოლო ტრანსაქციები&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>არ არის სინქრონიზებული</translation>
@@ -2350,26 +2326,10 @@ Address: %4
         <source>Options:</source>
         <translation>ოპციები:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>მიუთითეთ საკონფიგურაციო ფაილი (ნაგულისხმევია: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>მიუთითეთ pid ფაილი (ნაგულისხმევია: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>მიუთითეთ მონაცემთა კატალოგი</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>მიყურადება პორტზე &lt;port&gt; (ნაგულისხმევი: 8333 ან სატესტო ქსელში: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>არაუმეტეს &lt;n&gt; შეერთებისა პირებზე (ნაგულისხმევი: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>მიერთება კვანძთან, პირების მისამართების მიღება და გათიშვა</translation>
@@ -2378,18 +2338,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>მიუთითეთ თქვენი საჯარო მისამართი</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>არასწორად მოქმედი პირების გათიშვის ზღვარი (ნაგულისხმევი:100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>არასწორად მოქმედი პირების ბლოკირების დრო წამებში (ნაგულისხმევი: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation> JSON-RPC-შეერთებების მიყურადება პორტზე &lt;port&gt; (ნაგულისხმევი: 8332 ან სატესტო ქსელში: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>საკომანდო სტრიქონისა და JSON-RPC-კომამდების ნებართვა</translation>
@@ -2430,10 +2378,6 @@ rpcpassword=%s
 მაგალითად: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>დაშვებული ალგორითმები (ნაგულისხმევი: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>მოცემულ მისამართზე მიჯაჭვა მუდმივად მასზე მიყურადებით. გამოიყენეთ [host]:port ფორმა IPv6-სათვის</translation>
@@ -2458,10 +2402,6 @@ rpcpassword=%s
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>ეს არის წინასწარი სატესტო ვერსია - გამოიყენეთ საკუთარი რისკით - არ გამოიყენოთ მოპოვებისა ან კომერციული მიზნებისათვის</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>ფარული Tor-სერვისებით პირების წვდომისათვის სხვა SOCKS5 პროქსის გამოყენება (ნაგულისხმევია: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>ყურადღება:  ძალიან მაღალია -paytxfee - საკომისო, რომელსაც თქვენ გადაიხდით ამ ტრანსაქციის გაგზავნის საფასურად.</translation>
@@ -2538,62 +2478,10 @@ rpcpassword=%s
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>შეცდომა: საფულე დაბლოკილია, ტრანსაქცია ვერ შეიქმნება!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>შეცდომა: სისტემური შეცდომა:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ვერ ხერხდება პორტების მიყურადება. თუ გსურთ, გამოიყენეთ -listen=0.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>ბლოკის ინფორმაცია არ იკითხება</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>ბლოკი არ იკითხება</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>ბლოკების ინდექსის სინქრონიზება ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>ბლოკების ინდექსის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>ბლოკის ინფორმაციის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>ბლოკის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>ფაილის ინფორმაციის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>მონეტების ბაზის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>ტრანსაქციების ინდექსის ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>ცვლილებების გაუქმების მონაცემთა ჩაწერა ვერ მოხერხდა</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>მონეტების გენერირება (ნაგულისხმევი: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>რამდენი ბლოკი შემოწმდეს გაშვებისას (ნაგულისხმევი: 288, 0 - ყველა)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>თუ &lt;category&gt; არ არის მითითებული, ნაჩვენები იქნება სრული დახვეწის ინფორმაცია.</translation>
@@ -2610,10 +2498,6 @@ rpcpassword=%s
         <source>Not enough file descriptors available.</source>
         <translation>არ არის საკმარისი ფაილ-დესკრიპტორები.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>დაემატოს დახვეწის ინფორმაციას დროის ჭდეები (ნაგულისხმევი: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>ბლოკთა ჯაჭვის ინდექსის  ხელახლა აგება blk000??.dat ფაილიდან</translation>
@@ -2622,18 +2506,10 @@ rpcpassword=%s
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>ბლოკის მაქსიმალური ზომის განსაზღვრა ბაიტებში (ნადულისხმევი: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>RPC-ნაკადების რაოდენობა (ნაგულისხმევი: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>მიუთითეთ საფულის ფაილი (კატალოგში)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>დაუდასტურებელი ხურდის გამოყენება ტრანსაქციის გაგზავნისას (ნაგულისხმევი: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>გამოიყენება რეგრესული ტესტირების ინსტრუმენტებისა და პროგრამების შემუშავებისას.</translation>
@@ -2666,10 +2542,6 @@ rpcpassword=%s
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>ბრძანების შესრულება შესაბამისი უწყების მიღებისას ან როცა შეინიშნება საგრძნობი გახლეჩა (cmd-ში %s შეიცვლება მესიჯით)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>დახვეწის ინფორმაციის გამოყვანა (ნაგულისხმევი: 0, &lt;category&gt; - არააუცილებელი არგუმენტია)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>მაღალპრიორიტეტული/დაბალსაკომისიოიანი ტრანსაქციების მაქსიმალური ზომა ბაიტებში (ნაგულისხმევი: %d)</translation>
@@ -2686,34 +2558,10 @@ rpcpassword=%s
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>დაუშვებელი მნიშვნელობა -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>ტრანსაქციის სრული ინდექსი (ნაგულისხმევი: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>მიღების ბუფერის მაქსიმალური ზომა შეერთებაზე, &lt;n&gt;*1000 ბაიტი (ნაგულისხმევი: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>გაგზავნის ბუფერის მაქსიმალური ზომა შეერთებაზე, &lt;n&gt;*1000 ბაიტი (ნაგულისხმევი: 5000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>ბლოკთა ჯაჭვი მიიღეთ მხოლოდ მაშინ, თუ ემთხვევა შიდა ჩეკპოინტები (ნაგულისხმევი: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>შეერთება მხოლოდ &lt;net&gt; ქსელის კვანძებთან (IPv4, IPv6 ან Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>ტრასირების/დახვეწის ინფოს გაგზავნა კონსოლზე debug.log ფაილის ნაცვლად</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>დააყენეთ ბლოკის მინიმალური ზომა ბაიტებში (ნაგულისხმევი: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>debug.log ფაილის შეკუმშვა გაშვებისას (ნაგულისხმევია: 1 როცა არ აყენია -debug)</translation>
@@ -2722,14 +2570,6 @@ rpcpassword=%s
         <source>Signing transaction failed</source>
         <translation>ტრანსაქციების ხელმოწერა ვერ მოხერხდა</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>მიუთითეთ შეერთების ტაიმაუტი მილიწამებში (ნაგულისხმევი: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>სისტემური შეცდომა:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>ტრანსაქციების რაოდენობა ძალიან ცოტაა</translation>
@@ -2742,10 +2582,6 @@ rpcpassword=%s
         <source>Transaction too large</source>
         <translation>ტრანსაქცია ძალიან დიდია</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>გამოიყენეთ UPnP მისაყურადებელი პორტის გადასამისამართებლად (ნაგულისხმევი: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>გამოიყენეთ UPnP მისაყურადებელი პორტის გადასამისამართებლად (ნაგულისხმევი: 1 როცა ჩართულია მიყურადება)</translation>
@@ -2782,10 +2618,6 @@ rpcpassword=%s
         <source>Upgrade wallet to latest format</source>
         <translation>საფულის ფორმატის განახლება</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>გასაღების პულის ზომა იქნება &lt;n&gt; (ნაგულისხმევი: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>ბლოკების ჯაჭვის გადამოწმება საფულეში გამორჩენილ ტრანსაქციებზე</translation>
@@ -2794,14 +2626,6 @@ rpcpassword=%s
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>OpenSSL-ის (https) გამოყენება JSON-RPC-შეერთებებისათვის</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>სერვერის სერტიფიკატის ფაილი (ნაგულისხმევი: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>სერვერის პირადი გასაღები (ნაგულისხმევი: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>ეს ტექსტი</translation>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index 9fe31b4330b0..a8a2fbd16a9e 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -286,6 +286,10 @@
         <source>Open &amp;URI...</source>
         <translation>URI&amp;열기...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>비트코인 코어 클라이언트</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>디스크에서 블록 가져오는 중...</translation>
@@ -338,6 +342,10 @@
         <source>&amp;Receive</source>
         <translation>받기(&amp;R)</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>비트코인 코어에 관한 정보입니다.</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>보이기/숨기기(&amp;S)</translation>
@@ -374,10 +382,6 @@
         <source>Tabs toolbar</source>
         <translation>툴바 색인표</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[테스트넷]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>비트코인 코어</translation>
@@ -414,10 +418,6 @@
         <source>No block source available...</source>
         <translation>사용 가능한 블록이 없습니다...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 블록의 거래 기록들이 처리됨.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n시간</numerusform></translation>
@@ -528,10 +528,18 @@ Address: %4
         <source>Fee:</source>
         <translation>수수료:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>더스트:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>수수료 이후:</translation>
     </message>
+    <message>
+        <source>Change:</source>
+        <translation>체인지:</translation>
+    </message>
     <message>
         <source>(un)select all</source>
         <translation>모두 선택(하지 않음)</translation>
@@ -852,15 +860,7 @@ Address: %4
         <source>Error</source>
         <translation>오류</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB가 사용가능</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(%1GB가 필요)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -922,6 +922,14 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>스크립트 인증 쓰레드의 개수</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>외부로부터의 연결을 승인합니다.</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>연결 요청을 허용합니다.</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>SOCKS 프록시를 통해 비트코인 네트워크 연결</translation>
@@ -1082,8 +1090,8 @@ Address: %4
         <translation>표시한 정보가 오래된 것 같습니다. 비트코인 네트워크에 연결하고 난 다음에 지갑을 자동으로 동기화 하지만, 아직 과정이 끝나지는 않았습니다.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>지갑</translation>
+        <source>Watch-only:</source>
+        <translation>모니터링 지갑:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1118,8 +1126,8 @@ Address: %4
         <translation>당신의 현재 총액</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;최근 거래내역&lt;/b&gt;</translation>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>모니터링 지갑의 현재 잔액</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1536,6 +1544,10 @@ Address: %4
         <source>After Fee:</source>
         <translation>수수료 이후:</translation>
     </message>
+    <message>
+        <source>Change:</source>
+        <translation>체인지:</translation>
+    </message>
     <message>
         <source>Custom change address</source>
         <translation>주소변경</translation>
@@ -1552,6 +1564,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>양식의 모든 필드를 지웁니다</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>더스트:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>모두 지우기(&amp;A)</translation>
@@ -2318,26 +2334,10 @@ Address: %4
         <source>Options:</source>
         <translation>옵션:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>설정파일 지정 (기본값: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid 파일 지정 (기본값: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>데이터 폴더 지정</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>&lt;port&gt;로 연결을 허용한다 (기본값: 8333 또는 테스트넷: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>가장 잘 연결되는 사용자를 유지합니다(기본값: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>피어 주소를 받기 위해 노드에 연결하고, 받은 후에 연결을 끊습니다</translation>
@@ -2346,18 +2346,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>공인 주소를 지정하십시오</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>이상행동 네트워크 참여자의 연결을 차단시키기 위한 한계치 (기본값: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>이상행동을 하는 네트워크 참여자들을 다시 연결시키는데 걸리는 시간 (기본값: 86400초)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>포트 &lt;port&gt;을 통해 JSON-RPC 연결 (기본값: 8332 또는 testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>명령줄과 JSON-RPC 명령 수락</translation>
@@ -2374,10 +2362,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>외부 접속을 승인합니다</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>암호 허용(기본값: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>선택된 주소로 고정하며 항상 리슨(Listen)합니다. IPv6 프로토콜인 경우  [host]:port 방식의 명령어 표기법을 사용합니다.</translation>
@@ -2400,10 +2384,6 @@ Address: %4
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>이 빌드 버전은 정식 출시 전 테스트의 목적이며, 예기치 않은 위험과 오류가 발생할 수 있습니다. 채굴과 상점용 소프트웨어로 사용하는 것을 권하지 않습니다.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Tor 서비스를 이용하여 네트워크에 참여하기 위해서 SOCKS5 프록시를 따로 사용함 (기본값: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>경고: -paytxfee값이 너무 큽니다! 이 값은 송금할때 지불할 송금 수수료입니다.</translation>
@@ -2428,10 +2408,6 @@ Address: %4
         <source>(default: 1)</source>
         <translation>(기본값: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(기본값: wallet.dat)</translation>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>손상된 wallet.dat에서 개인키 복원을 시도합니다</translation>
@@ -2456,10 +2432,6 @@ Address: %4
         <source>Debugging/Testing options:</source>
         <translation>디버그 및 테스트 설정</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>안전 모드를 비활성화하고 안전 모드의 이벤트가 발생하더라도 무시합니다. (기본값: 0, 비활성화)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>자신의 아이피 주소를 발견합니다 (기본값: 1 반응이 없거나 외부 아이피가 없을 때)</translation>
@@ -2492,66 +2464,10 @@ Address: %4
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>오류: 지갑이 잠금상태여서 거래를 생성할 수 없습니다!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>오류: 시스템 오류:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>어떤 포트도 반응하지 않습니다. 사용자 반응=0 만약 원한다면</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>블록 정보를 읽는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>블록을 읽는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>블록 인덱스를 동기화하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>블록 인덱스를 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>블록 정보를 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>블록을 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>파일 정보를 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>코인 데이터베이스에 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>송금 인덱스에 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>데이터 실행 취소를 기록하는데 실패했습니다</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>안전 모드로 강제 진입하는 기능입니다.(기본값: 0) </translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>코인 생성(기본값: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>시작할때 검사할 블록 갯수입니다(기본값: 288, 0 = 모두)</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>들여오기 중...</translation>
@@ -2580,10 +2496,6 @@ Address: %4
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>최대 블락 크기를 Bytes로 지정하세요 (기본: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>원격 프로시져 호출 서비스를 위한 쓰레드 개수를 설정합니다 (기본값 : 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>데이터 폴더 안에 지갑 파일을 선택하세요.</translation>
@@ -2620,10 +2532,6 @@ Address: %4
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>이 사항과 관련있는 경고가 발생하거나 아주 긴 포크가 발생했을 때 명령어를 실행해 주세요. (cmd 명령어 목록에서 %s는 메시지로 대체됩니다) </translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>출력 오류 정보(기본값:0, 임의의 공급 카테고리)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>최대 크기를 최우선으로 설정 / 바이트당 최소 수수료로 거래(기본값: %d)</translation>
@@ -2640,42 +2548,10 @@ Address: %4
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>최저 거래 수수료가 부족합니다. -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>&lt;n&gt;번 째 순서에서 전자서명 캐쉬의 용량을 제한합니다. (기본값: 50000) </translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>블럭을 채굴할 때 kB당 거래 우선 순위와 수수료를 로그에 남깁니다. (기본값: 0, 비활성화)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>전체 거래 지수를 유지합니다(기본값: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>최대 연결마다 1000bytes 버퍼를 받는다. (기본값: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>최대 연결 마다 1000bytes 버퍼를 보낸다.(기본값: 1000) </translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>내부 중단점에 일치하는 블록 체인만 수용(기본값: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>노드가 있는 네트워크에만 접속 합니다(IPv4, IPv6 또는 Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>블럭 색인을 발견하면 구동 시 블럭을 출력합니다.</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>구동 시 블럭 트리를 출력합니다. (기본값: 0, 비활성화)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL 옵션: (비트코인 위키의 SSL 설정 설명서 참고)</translation>
@@ -2692,14 +2568,6 @@ Address: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>추적오류 정보를 degug.log 자료로 보내는 대신 콘솔로 보내기</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>바이트 단위의 최소 블록 크기 설정(기본값: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>전자지갑 데이터베이스 환경에 DB_PRIVATE 플래그를 설정합니다. (기본값: 1, 활성화)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>모든 디버그 설정 보기(설정: --help -help-debug)</translation>
@@ -2712,14 +2580,6 @@ Address: %4
         <source>Signing transaction failed</source>
         <translation>거래를 서명하는것을 실패하였습니다.</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>밀리초 단위로 연결 제한시간을 설정하십시오(기본값: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>시스템 오류:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>거래량이 너무 적습니다</translation>
@@ -2732,10 +2592,6 @@ Address: %4
         <source>Transaction too large</source>
         <translation>너무 큰 거래</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>UPnP사용하여 지도에서 포트 반응기다리는 중  (기본값: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>UPnP사용하여 지도에서 포트 반응기다리는 중  (기본값: 1 반응이 생기면)</translation>
@@ -2776,10 +2632,6 @@ Address: %4
         <source>Upgrade wallet to latest format</source>
         <translation>지갑을 최근 형식으로 개선하시오</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>키 풀 크기 설정 &lt;n&gt;(기본값: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>누락된 지갑 송금에 대한 블록 체인 다시 검색</translation>
@@ -2788,14 +2640,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPC 연결에 OpenSSL(https) 사용</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>서버 인증 파일 (기본값: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>서버 개인 키(기본값: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>도움말 메시지입니다</translation>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index ad4b5eae03f1..91b3ccaf10fb 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -153,10 +153,6 @@
     </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Wallet</source>
-        <translation>Капчык</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>синхрондоштурулган эмес</translation>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 450228b22147..cc43762310d8 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -314,10 +314,6 @@
         <source>Tabs toolbar</source>
         <translation>Tabella instrumentorum "Tabs"</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Nucleus</translation>
@@ -330,10 +326,6 @@
         <source>No block source available...</source>
         <translation>Nulla fons frustorum absens...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Processae %1 frusta historiae transactionum.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horae</numerusform></translation>
@@ -689,10 +681,6 @@ Inscriptio: %4
         <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>Monstrata informatio fortasse non recentissima est.  Tuum cassidile per se synchronizat cum rete Bitcoin postquam conexio constabilita est, sed hoc actio nondum perfecta est.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Cassidile</translation>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Immatura:</translation>
@@ -701,10 +689,6 @@ Inscriptio: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Fossum pendendum quod nondum maturum est</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Recentes transactiones&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>non synchronizato</translation>
@@ -1514,26 +1498,10 @@ Inscriptio: %4
         <source>Options:</source>
         <translation>Optiones:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specifica configurationis plicam (praedefinitum: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specifica pid plicam (praedefinitum: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Specifica indicem datorum</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Ausculta pro conexionibus in &lt;porta&gt; (praedefinitum: 8333 vel testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manutene non plures quam &lt;n&gt; conexiones ad paria (praedefinitum: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conecta ad nodum acceptare inscriptiones parium, et disconecte</translation>
@@ -1542,18 +1510,6 @@ Inscriptio: %4
         <source>Specify your own public address</source>
         <translation>Specifica tuam propriam publicam inscriptionem</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Limen pro disconectendo paria improba (praedefinitum: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Numerum secundorum prohibere ne paria improba reconectant (praedefinitum: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Ausculta pro conexionibus JSON-RPC in &lt;porta&gt; (praedefinitum: 8332 vel testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accipe terminalis et JSON-RPC mandata.</translation>
@@ -1674,62 +1630,10 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: Cassidile seratum, non posse transactionem creare!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Error: systematis error:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Non potuisse auscultare in ulla porta.  Utere -listen=0 si hoc vis.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Non potuisse informationem frusti legere </translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Non potuisse frustum legere</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Synchronizare indicem frustorum abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Scribere indicem frustorum abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Scribere informationem abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Scribere frustum abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Scribere informationem plicae abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Scribere databasem nummorum abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Scribere indicem transactionum abortum est</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Scribere data pro cancellando mutationes abortum est</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera nummos (praedefinitum: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quot frusta proba ad initium (praedefinitum: 288, 0 = omnia)</translation>
-    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <translation>Inopia descriptorum plicarum.</translation>
@@ -1738,10 +1642,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Restituere indicem catenae frustorum ex activis plicis blk000??.dat</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Constitue numerum filorum ad tractandum RPC postulationes (praedefinitum: 4)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificante frusta...</translation>
@@ -1766,34 +1666,10 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantitas non valida pro -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manutene completam indicem transactionum (praedefinitum: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maxima magnitudo memoriae pro datis accipendis singulis conexionibus, &lt;n&gt;*1000 octetis/bytes (praedefinitum: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maxima magnitudo memoriae pro datis mittendis singulis conexionibus, &lt;n&gt;*1000 octetis/bytes (praedefinitum: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Tantum accipe catenam frustorum convenientem internis lapidibus (praedefinitum: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Tantum conecte ad nodos in rete &lt;net&gt; (IPv4, IPv6 aut Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Mitte informationem vestigii/debug ad terminale potius quam plicam debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Constitue minimam magnitudinem frusti in octetis/bytes (praedefinitum: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Diminue plicam debug.log ad initium clientis (praedefinitum: 1 nisi -debug)</translation>
@@ -1802,14 +1678,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Signing transaction failed</source>
         <translation>Signandum transactionis abortum est</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specifica tempumfati conexionis in millisecundis (praedefinitum: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systematis error:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Magnitudo transactionis nimis parva</translation>
@@ -1822,10 +1690,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Transaction too large</source>
         <translation>Transactio nimis magna</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utere UPnP designare portam auscultandi (praedefinitum: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Utere UPnP designare portam auscultandi (praedefinitum: 1 quando auscultans)</translation>
@@ -1858,10 +1722,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Upgrade wallet to latest format</source>
         <translation>Progredere cassidile ad formam recentissimam</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Constitue magnitudinem stagni clavium ad &lt;n&gt; (praedefinitum: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Iterum perlege catenam frustorum propter absentes cassidilis transactiones</translation>
@@ -1870,14 +1730,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utere OpenSSL (https) pro conexionibus JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Plica certificationis daemonis moderantis (praedefinitum: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clavis privata daemonis moderans (praedefinitum: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Hic nuntius auxilii</translation>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index 6d0fb684daa0..b195a75d0fdc 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -37,6 +37,18 @@
         <source>&amp;Delete</source>
         <translation>&amp;Trinti</translation>
     </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>P&amp;asirinkti</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Siunčiami adresai</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Gaunami adresai</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopijuoti ž&amp;ymę</translation>
@@ -45,11 +57,23 @@
         <source>&amp;Edit</source>
         <translation>&amp;Keisti</translation>
     </message>
+    <message>
+        <source>Export Address List</source>
+        <translation>Eksportuoti adresų sąrašą</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Kableliais išskirtas failas (*.csv)</translation>
     </message>
-    </context>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Eksportavimas nepavyko</translation>
+    </message>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Bandant išsaugoti adresų sąrašą - įvyko klaida keliant į %1. Prašome bandyti dar kartą.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -178,6 +202,10 @@
         <source>&amp;Overview</source>
         <translation>&amp;Apžvalga</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Taškas</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Rodyti piniginės bendrą apžvalgą</translation>
@@ -222,6 +250,18 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Keisti slaptafrazę...</translation>
     </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>&amp;Siunčiami adresai...</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>&amp;Gaunami adresai...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klientas</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Blokai importuojami iš disko...</translation>
@@ -274,6 +314,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Gauti</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Rodyti informaciją apie Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Rodyti / Slėpti</translation>
@@ -282,6 +326,10 @@
         <source>Show or hide the main Window</source>
         <translation>Rodyti arba slėpti pagrindinį langą</translation>
     </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>Užšifruoti privačius raktus, kurie priklauso jūsų piniginei</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Failas</translation>
@@ -298,14 +346,14 @@
         <source>Tabs toolbar</source>
         <translation>Kortelių įrankinė</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testavimotinklas]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin branduolys</translation>
     </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>&amp;Apie Bitcoin Core</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n Bitcoin tinklo aktyvus ryšys</numerusform><numerusform>%n Bitcoin tinklo aktyvūs ryšiai</numerusform><numerusform>%n Bitcoin tinklo aktyvūs ryšiai</numerusform></translation>
@@ -322,6 +370,10 @@
         <source>%n week(s)</source>
         <translation><numerusform>%n savaitė</numerusform><numerusform>%n savaitės</numerusform><numerusform>%n savaičių</numerusform></translation>
     </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n metas</numerusform><numerusform>%n metai</numerusform><numerusform>%n metų</numerusform></translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Klaida</translation>
@@ -379,10 +431,46 @@ Adresas: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Quantity:</source>
+        <translation>Kiekis:</translation>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Baitai:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Suma:</translation>
     </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Pirmumas:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Mokestis:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Po mokesčio:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Graža:</translation>
+    </message>
+    <message>
+        <source>(un)select all</source>
+        <translation>(ne)pasirinkti viską</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Medžio režimas</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Sąrašo režimas</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Suma</translation>
@@ -395,10 +483,18 @@ Adresas: %4</translation>
         <source>Date</source>
         <translation>Data</translation>
     </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Patvirtinimai</translation>
+    </message>
     <message>
         <source>Confirmed</source>
         <translation>Patvirtintas</translation>
     </message>
+    <message>
+        <source>Priority</source>
+        <translation>Pirmumas</translation>
+    </message>
     <message>
         <source>Copy address</source>
         <translation>Kopijuoti adresą</translation>
@@ -411,6 +507,74 @@ Adresas: %4</translation>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
     </message>
+    <message>
+        <source>Copy quantity</source>
+        <translation>Kopijuoti kiekį</translation>
+    </message>
+    <message>
+        <source>Copy fee</source>
+        <translation>Kopijuoti mokestį</translation>
+    </message>
+    <message>
+        <source>Copy after fee</source>
+        <translation>Kopijuoti po mokesčio</translation>
+    </message>
+    <message>
+        <source>Copy bytes</source>
+        <translation>Kopijuoti baitus</translation>
+    </message>
+    <message>
+        <source>Copy priority</source>
+        <translation>Kopijuoti pirmumą</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation>auksčiausias</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>aukštesnis</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>aukštas</translation>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation>vidutiniškai aukštas</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>vidutiniškai</translation>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation>žemai-vidutiniškas</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>žemas</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>žemesnis</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>žemiausias</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>niekas</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>taip</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>ne</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(nėra žymės)</translation>
@@ -465,6 +629,10 @@ Adresas: %4</translation>
 </context>
 <context>
     <name>FreespaceChecker</name>
+    <message>
+        <source>name</source>
+        <translation>pavadinimas</translation>
+    </message>
     </context>
 <context>
     <name>HelpMessageDialog</name>
@@ -476,6 +644,10 @@ Adresas: %4</translation>
         <source>version</source>
         <translation>versija</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Apie Bitcoin Core</translation>
+    </message>
     <message>
         <source>Command-line options</source>
         <translation>Komandinės eilutės parametrai</translation>
@@ -507,6 +679,10 @@ Adresas: %4</translation>
         <source>Welcome</source>
         <translation>Sveiki</translation>
     </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>Sveiki atvykę į Bitcoin Core.</translation>
+    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin branduolys</translation>
@@ -617,6 +793,10 @@ Adresas: %4</translation>
         <source>default</source>
         <translation>numatyta</translation>
     </message>
+    <message>
+        <source>none</source>
+        <translation>niekas</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Nurodytas tarpinio serverio adresas negalioja.</translation>
@@ -628,10 +808,6 @@ Adresas: %4</translation>
         <source>Form</source>
         <translation>Forma</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Piniginė</translation>
-    </message>
     <message>
         <source>Immature:</source>
         <translation>Nepribrendę:</translation>
@@ -644,10 +820,6 @@ Adresas: %4</translation>
         <source>Your current total balance</source>
         <translation>Jūsų balansas</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Naujausi sandoriai&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nesinchronizuota</translation>
@@ -859,10 +1031,34 @@ Adresas: %4</translation>
         <source>Send Coins</source>
         <translation>Siųsti monetas</translation>
     </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Kiekis:</translation>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Baitai:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Suma:</translation>
     </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Pirmumas:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Mokestis:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Po mokesčio:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Graža:</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Siųsti keliems gavėjams vienu metu</translation>
@@ -891,10 +1087,30 @@ Adresas: %4</translation>
         <source>Confirm send coins</source>
         <translation>Patvirtinti monetų siuntimą</translation>
     </message>
+    <message>
+        <source>Copy quantity</source>
+        <translation>Kopijuoti kiekį</translation>
+    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopijuoti sumą</translation>
     </message>
+    <message>
+        <source>Copy fee</source>
+        <translation>Kopijuoti mokestį</translation>
+    </message>
+    <message>
+        <source>Copy after fee</source>
+        <translation>Kopijuoti po mokesčio</translation>
+    </message>
+    <message>
+        <source>Copy bytes</source>
+        <translation>Kopijuoti baitus</translation>
+    </message>
+    <message>
+        <source>Copy priority</source>
+        <translation>Kopijuoti pirmumą</translation>
+    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Negaliojantis gavėjo adresas. Patikrinkite.</translation>
@@ -1338,6 +1554,10 @@ Adresas: %4</translation>
         <source>Show transaction details</source>
         <translation>Rodyti sandėrio detales</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Eksportavimas nepavyko</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Kableliais atskirtų duomenų failas (*.csv)</translation>
@@ -1417,42 +1637,14 @@ Adresas: %4</translation>
         <source>Options:</source>
         <translation>Parinktys:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Nurodyti konfigūracijos failą (pagal nutylėjimąt: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Nurodyti pid failą (pagal nutylėjimą: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Nustatyti duomenų aplanką</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Sujungimo klausymas prijungčiai  &lt;port&gt; (pagal nutylėjimą: 8333 arba testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Palaikyti ne daugiau &lt;n&gt; jungčių kolegoms (pagal nutylėjimą: 125)</translation>
-    </message>
     <message>
         <source>Specify your own public address</source>
         <translation>Nurodykite savo nuosavą viešą adresą</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Atjungimo dėl netinkamo kolegų elgesio riba  (pagal nutylėjimą: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Sekundžių kiekis eikiamas palaikyti ryšį dėl lygiarangių nestabilumo (pagal nutylėjimą: 86.400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Klausymas JSON-RPC sujungimui prijungčiai &lt;port&gt; (pagal nutylėjimą: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Priimti komandinę eilutę ir JSON-RPC komandas</translation>
@@ -1477,30 +1669,6 @@ Adresas: %4</translation>
         <source>Error opening block database</source>
         <translation>Klaida atveriant blokų duombazę</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Klaida: sistemos klaida:</translation>
-    </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Nepavyko nuskaityti bloko informacijos</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Nepavyko nuskaityti bloko</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Nepavyko įrašyti bloko</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Nepavyko įrašyti failo informacijos</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generuoti monetas (numatyta: 0)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Tikrinami blokai...</translation>
@@ -1513,30 +1681,10 @@ Adresas: %4</translation>
         <source>Information</source>
         <translation>Informacija</translation>
     </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksimalus buferis priėmimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksimalus buferis siuntimo sujungimui &lt;n&gt;*1000 bitų (pagal nutylėjimą: 1000)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Siųsti atsekimo/derinimo info į konsolę vietoj debug.log failo</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Nustatyti sujungimo trukmę milisekundėmis (pagal nutylėjimą: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sistemos klaida:</translation>
-    </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Bandymas naudoti UPnP struktūra klausymosi prievadui (default: 1 when listening)</translation>
@@ -1557,10 +1705,6 @@ Adresas: %4</translation>
         <source>Upgrade wallet to latest format</source>
         <translation>Atnaujinti piniginę į naujausią formatą</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Nustatyti rakto apimties dydį &lt;n&gt; (pagal nutylėjimą: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Ieškoti  prarastų piniginės sandorių blokų grandinėje</translation>
@@ -1569,14 +1713,6 @@ Adresas: %4</translation>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Naudoti OpenSSL (https) jungimuisi JSON-RPC </translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serverio sertifikato failas (pagal nutylėjimą: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Serverio privatus raktas (pagal nutylėjimą: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Pagelbos žinutė</translation>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index 81b2688d031e..f901b14d3680 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -362,10 +362,6 @@
         <source>Tabs toolbar</source>
         <translation>Ciļņu rīkjosla</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -394,10 +390,6 @@
         <source>No block source available...</source>
         <translation>Nav pieejams neviens bloku avots...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Apstrādāti %1 bloki no transakciju vēstures.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n stundas</numerusform><numerusform>%n stunda</numerusform><numerusform>%n stundas</numerusform></translation>
@@ -800,15 +792,7 @@ Adrese: %4
         <source>Error</source>
         <translation>Kļūda</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB ar brīvo vietu pieejams</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(no %1GB nepieciešams)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1017,10 +1001,6 @@ Adrese: %4
         <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>Attēlotā informācija var būt novecojusi. Jūsu maciņš pēc savienojuma izveides automātiski sinhronizējas ar Bitcoin tīklu, taču šis process vēl nav beidzies.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Maciņš</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Pieejams:</translation>
@@ -1049,10 +1029,6 @@ Adrese: %4
         <source>Your current total balance</source>
         <translation>Jūsu kopējā tekošā bilance</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Pēdējās transakcijas&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nav sinhronizēts</translation>
@@ -2210,26 +2186,10 @@ Adrese: %4
         <source>Options:</source>
         <translation>Iespējas:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Norādiet konfigurācijas failu (pēc noklusēšanas: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Norādiet pid failu (pēc noklusēšanas: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Norādiet datu direktoriju</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Gaidīt savienojumus portā &lt;port&gt; (pēc noklusēšanas: 8333 vai testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Uzturēt līdz &lt;n&gt; savienojumiem ar citiem mezgliem(pēc noklusēšanas: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Pievienoties mezglam, lai iegūtu citu mezglu adreses, un atvienoties</translation>
@@ -2238,14 +2198,6 @@ Adrese: %4
         <source>Specify your own public address</source>
         <translation>Norādiet savu publisko adresi</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Slieksnis pārkāpējmezglu atvienošanai (pēc noklusēšanas: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Sekundes, cik ilgi atturēt pārkāpējmezglus no atkārtotas pievienošanās (pēc noklusēšanas: 86400)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Pieņemt komandrindas un JSON-RPC komandas</translation>
@@ -2262,10 +2214,6 @@ Adrese: %4
         <source>(default: 1)</source>
         <translation>(noklusējums: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(noklusējums: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; var būt:</translation>
@@ -2302,14 +2250,6 @@ Adrese: %4
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Kļūda: Maciņš ir aizslēgts, nevar izveidot transakciju!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Kļūda: sistēmas kļūda:</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Piespiest drošo režīmu (noklusējums: 0)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Ja &lt;category&gt; nav norādīta, izvadīt visu atkļūdošanas informāciju.</translation>
@@ -2318,10 +2258,6 @@ Adrese: %4
         <source>Importing...</source>
         <translation>Importē...</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Tērēt neapstiprinātu atlikumu kad sūta transakcijas (noklusējums: 1)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Pārbauda blokus...</translation>
@@ -2354,10 +2290,6 @@ Adrese: %4
         <source>Signing transaction failed</source>
         <translation>Transakcijas parakstīšana neizdevās</translation>
     </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sistēmas kļūda:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transakcijas summa ir pārāk maza</translation>
@@ -2402,10 +2334,6 @@ Adrese: %4
         <source>Upgrade wallet to latest format</source>
         <translation>Atjaunot maciņa formātu uz jaunāko</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Uzstādīt atslēgu bufera izmēru uz &lt;n&gt; (pēc noklusēšanas: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Atkārtoti skanēt bloku virkni, meklējot trūkstošās maciņa transakcijas</translation>
@@ -2414,14 +2342,6 @@ Adrese: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPC savienojumiem izmantot OpenSSL (https)</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Servera sertifikāta fails (pēc noklusēšanas: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Servera privātā atslēga (pēc noklusēšanas: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Šis palīdzības paziņojums</translation>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index 4a296dfce7bf..515d1b90df69 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -424,18 +424,10 @@ Address: %4
     </context>
 <context>
     <name>OverviewPage</name>
-    <message>
-        <source>Wallet</source>
-        <translation>Түрүйвч</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Хэрэглэж болох хэмжээ:</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Сүүлд хийгдсэн гүйлгээнүүд&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -1029,10 +1021,6 @@ Address: %4
         <source>Options:</source>
         <translation>Сонголтууд:</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>&lt;port&gt; дээрх холболтуудыг чагна (ѳгѳгдмѳл: 8333 эсвэл testnet: 18333)</translation>
-    </message>
     <message>
         <source>Wallet options:</source>
         <translation>Түрүйвчийн сонголтууд:</translation>
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index 428819e92f14..47e74111c2da 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -9,14 +9,42 @@
         <source>Create a new address</source>
         <translation>Cipta alamat baru</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Baru</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Salin alamat terpilih ke dalam sistem papan klip</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Salin</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>&amp;Salin Alamat</translation>
+    </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>&amp;Eksport</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Padam</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Pilih alamat untuk menghantar syiling</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Pilih alamat untuk menerima syiling</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>&amp;Pilih</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Fail yang dipisahkan dengan koma</translation>
@@ -163,6 +191,10 @@
     </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>&amp;Eksport</translation>
+    </message>
     </context>
 <context>
     <name>bitcoin-core</name>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index bb6b78849c65..435a412d09be 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Verktøylinje for faner</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnett]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Ingen kilde for blokker tilgjengelig...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Lastet %1 blokker med transaksjonshistorikk.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
@@ -486,6 +478,10 @@
         <source>Up to date</source>
         <translation>Ajour</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Lastet %n blokk med transaksjonshistorikk.</numerusform><numerusform>Lastet %n blokker med transaksjonshistorikk.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Kommer ajour...</translation>
@@ -916,13 +912,13 @@ Adresse: %4
         <source>Error</source>
         <translation>Feil</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB ledig lagringsplass</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB med ledig lagringsplass</numerusform><numerusform>%n GB med ledig lagringsplass</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(av %1GB behøvd)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(av %n GB som trengs)</numerusform><numerusform>(av %n GB som trengs)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -1165,10 +1161,6 @@ Adresse: %4
         <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>Informasjonen som vises kan være foreldet. Din lommebok synkroniseres automatisk med Bitcoin-nettverket etter at tilkobling er opprettet, men denne prosessen er ikke ferdig enda.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Lommebok</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Kun observerbar:</translation>
@@ -1197,6 +1189,10 @@ Adresse: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Minet saldo har ikke modnet enda</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldoer</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Totalt:</translation>
@@ -1209,6 +1205,14 @@ Adresse: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Din nåværende balanse i kun observerbare adresser</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Kan brukes:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Nylige transaksjoner</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Ubekreftede transaksjoner til kun observerbare adresser</translation>
@@ -1221,10 +1225,6 @@ Adresse: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Nåværende totale balanse i kun observerbare adresser</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Siste transaksjoner&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>ute av synk</translation>
@@ -1484,10 +1484,6 @@ Adresse: %4
         <source>Services</source>
         <translation>Tjenester</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Synk-node</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Starthøyde</translation>
@@ -1616,14 +1612,6 @@ Adresse: %4
         <source>Outbound</source>
         <translation>Utgående</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Nei</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Ukjent</translation>
@@ -2472,6 +2460,10 @@ Adresse: %4
         <source>Mined</source>
         <translation>Utvunnet</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>kun observerbar</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>-</translation>
@@ -2488,6 +2480,10 @@ Adresse: %4
         <source>Type of transaction.</source>
         <translation>Type transaksjon.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Hvorvidt en kun observerbar adresse er involvert i denne transaksjonen.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Mottaksadresse for transaksjonen.</translation>
@@ -2583,6 +2579,10 @@ Adresse: %4
         <source>Export Transaction History</source>
         <translation>Eksporter Transaksjonshistorikk</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Kun observer</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Ekport Feilet</translation>
@@ -2698,26 +2698,10 @@ Adresse: %4
         <source>Options:</source>
         <translation>Innstillinger:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Angi konfigurasjonsfil (standardverdi: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Angi pid-fil (standardverdi: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Angi mappe for datafiler</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Lytt etter tilkoblinger på &lt;port&gt; (standardverdi: 8333 eller testnett: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Hold maks &lt;n&gt; koblinger åpne til andre noder (standardverdi: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Koble til node for å hente adresser til andre noder, koble så fra igjen</translation>
@@ -2726,18 +2710,6 @@ Adresse: %4
         <source>Specify your own public address</source>
         <translation>Angi din egen offentlige adresse</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Grenseverdi for å koble fra noder med dårlig oppførsel (standardverdi: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Antall sekunder noder med dårlig oppførsel hindres fra å koble til på nytt (standardverdi: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Lytt etter JSON-RPC tilkoblinger på &lt;port&gt; (standardverdi: 8332 eller testnett: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Ta imot kommandolinje- og JSON-RPC-kommandoer</translation>
@@ -2777,18 +2749,10 @@ Om filen ikke eksisterer, opprett den nå med eier-kun-les filrettigheter.
 Det er også anbefalt at å sette varselsmelding slik du får melding om problemer.
 For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Akseptable krypteringsmetoder (standardverdi: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind til angitt adresse. Bruk [vertsmaskin]:port notasjon for IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Ratebegrens gratistransaksjoner kontinuerlig til &lt;n&gt;*1000 bytes per minutt (standard: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Slett alle transaksjoner i lommeboken og gjenopprett kun de delene av blokkjeden gjennom -rescan ved oppstart</translation>
@@ -2809,14 +2773,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Kjør kommando når en lommeboktransaksjon endres (%s i kommando er erstattet med TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Overfør aktiviteten i databasen fra minnelageret til loggen på harddisken for hver &lt;n&gt; megabytes (standardverdi: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Hvor grundig blokkverifiseringen til -checkblocks er (0-4, standard: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>I denne modusen kontrollerer -genproclimit hvor mange blokker som genereres øyeblikkelig.</translation>
@@ -2825,10 +2781,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Angi antall tråder for skriptverifisering (%u til %d, 0 = auto, &lt;0 = la det antallet kjerner være ledig, standard: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Sett prosessorgrensen for når blokkutvinning er på (-1 = ubegrenset, standard: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Dette er en forhåndssluppet testversjon - bruk på egen risiko - ikke for bruk til blokkutvinning eller bedriftsapplikasjoner</translation>
@@ -2837,10 +2789,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Ute av stand til å binde til %s på denne datamaskinen. Bitcoin Core kjører sannsynligvis allerede.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Bruk separate SOCKS5 proxyer for å nå noder via Tor skjulte tjenester (standardverdi: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Advarsel: -paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner.</translation>
@@ -2862,12 +2810,12 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <translation>Advarsel: wallet.dat korrupt, data reddet! Original wallet.dat lagret som wallet.{timestamp}.bak i %s; hvis din saldo eller dine transaksjoner ikke er korrekte bør du gjenopprette fra en backup.</translation>
     </message>
     <message>
-        <source>(default: 1)</source>
-        <translation>(standardverdi: 1)</translation>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Hvitelist noder som kobler til fra den oppgitte nettmasken eller IP-adressen. Kan oppgis flere ganger.</translation>
     </message>
     <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(standardverdi: wallet.dat)</translation>
+        <source>(default: 1)</source>
+        <translation>(standardverdi: 1)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2897,10 +2845,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Debugging/Testing options:</source>
         <translation>Valg for feilsøking/testing:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Slå av sikkerhetsmodus, overstyr en virkelig sikkerhetsmodushendelse (standard: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Oppdag egen IP-adresse (standardverdi: 1 ved lytting og uten -externalip)</translation>
@@ -2929,6 +2873,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Error opening block database</source>
         <translation>Feil under åpning av blokkdatabase</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Feil: En fatal intern feil oppstod, se debug.log for detaljer</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Feil: Lite ledig lagringsplass!</translation>
@@ -2937,66 +2885,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Feil: Lommebok låst, kan ikke opprette transaksjon!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Feil: systemfeil:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Kunne ikke lytte på noen port. Bruk -listen=0 hvis det er dette du vil.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Feil ved lesing av blokkinfo</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Feil ved lesing av blokk</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Feil ved synkronisering av blokkindeks</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Ved feil skriving av blokkindeks</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Feil ved skriving av blokkinfo</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Feil ved skriving av blokk</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Feil ved skriving av filinfo</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Feil ved skriving til bitcoin sin database</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Feil ved skriving av transaksjonsindeks</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Feil ved skriving av angredata</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Tving sikkerhetsmodus (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generer bitcoins (standardverdi: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Hvor mange blokker skal sjekkes ved oppstart (standardverdi: 288, 0 = alle)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Hvis &lt;category&gt; ikke er oppgitt, ta ut all informasjon om feilsøking.</translation>
@@ -3018,8 +2910,8 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <translation>For få fildeskriptorer tilgjengelig.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Sett inn tidsstempel i front av feilsøkingsdata (standardverdi: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Bare koble til noder i nettverket &lt;net&gt; (IPv4, IPv6 eller onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3033,26 +2925,18 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Sett maks blokkstørrelse i bytes (standardverdi: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Sett nummer av tråder til betjening av RPC-kall (standardverdi: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Angi lommebokfil (inne i datamappe)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Bruk ubekreftet veksel ved sending av transaksjoner (standardverdi: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Avslutt etter import av blokker fra disk (standard: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Dette er tiltenkt verktøy for regresjonstesting og apputvikling.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Bruk UPnP for å sette opp lytteport (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verifiserer blokker...</translation>
@@ -3077,10 +2961,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerer blokker fra ekstern fil blk000??.dat</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(standardverdi: 1, 1 = behold metadata for transaksjon som f. eks. kontoeier og informasjon om betalingsanmodning, 2 = dropp metadata for transaksjon)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Tillat JSON-RPC-tilkoblinger fra angitt kilde. Gyldig for &lt;ip&gt; er en enkelt IP (f. eks. 1.2.3.4), et nettverk/nettmaske (f. eks. 1.2.3.4/255.255.255.0) eller et nettverk/CIDR (f. eks. 1.2.3.4/24). Dette alternativet kan angis flere ganger</translation>
@@ -3101,6 +2981,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Ute av stand til å låse datamappen %s. Bitcoin Core kjører sannsynligvis allerede.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Ratebegrens gratistransaksjoner kontinuerlig til &lt;n&gt;*1000 bytes per minutt (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Opprett nye filer med standardtillatelser i systemet, i stedet for umask 077 (kun virksom med lommebokfunksjonalitet slått av)</translation>
@@ -3117,10 +3001,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Feil: Argumentet -socks er ikke støttet. Det er ikke lenger mulig å sette SOCKS-versjon; bare SOCKS5-proxyer er støttet.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Utfør kommando når et nettverkstransaksjon gjenbruker inndata fra lommeboktransaksjonen (%s=gjenbruk TxID, %t=lommebok TxID)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Utfør kommando når et relevant varsel er mottatt eller vi ser en veldig lang gaffel (%s i kommando er erstattet med melding)</translation>
@@ -3133,14 +3013,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre enn dette anses som null gebyr for laging av transaksjoner (standardverdi: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Hvis paytxfee ikke er angitt, inkluderer da nok gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Ta ut feilsøkingsinformasjon (standardverdi: 0, bruk av &lt;category&gt; er valgfritt)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
@@ -3157,18 +3029,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <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>Advarsel: Vennligst undersøk at din datamaskin har riktig dato og klokkeslett! Hvis klokken er stilt feil vil ikke Bitcoin Core fungere riktig.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Hvitelist noder som kobler til fra den oppgitte nettmasken eller IP-adressen. Kan oppgis flere ganger.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Hvitlistede noder kan ikke DoS-blokkeres, og deres transaksjoner videresendes alltid, selv om de allerede er i minnelageret. Nyttig f.eks. for en gateway.</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Alltid søk etter nodeadresser via DNS-oppslag (standardverdi: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan ikke løse -whitebind-adresse: '%s'</translation>
@@ -3197,10 +3061,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Gebyr (i BTC/kB) for å legge til i transaksjoner du sender (standardverdi: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Inkludere IP-adresser i feilsøkingslogg (standard: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informasjon</translation>
@@ -3230,24 +3090,8 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <translation>Behold på det meste &lt;n&gt; blokker i minnet som ikke er mulig å koble (standardverdi: %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Begrens størrelsen på signatur-hurtigbufferen til &lt;n&gt; oppføringer (standard: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Logg transaksjonsprioritet og gebyr per kB under blokkutvinning (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Oppretthold en full transaksjonsindeks (standard: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maks mottaksbuffer per forbindelse, &lt;n&gt;*1000 bytes (standardverdi: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maks sendebuffer per forbindelse, &lt;n&gt;*1000 bytes (standardverdi: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Hold på det meste &lt;n&gt; transaksjoner som ikke kobles i minnet (standardverdi: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3257,22 +3101,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Node relay options:</source>
         <translation>Node alternativer for videresending:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Aksepter kun en blokkjede som passer med innebygde sjekkpunkter (standardvalg: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Koble kun til noder i nettverket &lt;nett&gt; (IPv4, IPv6 eller Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Skriv ut blokken ved oppstart, hvis funnet i blokkindeksen</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Skriv ut blokktreet ved oppstart (standardverdi: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL-valg: (se Bitcoin Wiki for oppsettsinstruksjoner for SSL)</translation>
@@ -3289,30 +3121,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Slumpvis bland 1 av hver &lt;n&gt; nettverksmeldinger</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Videresend og ufør graving av databærende transaksjoner (standardverdi: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Videresende ikke-P2SH multisig (standard: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kjør en tråd som skriver lommeboken til disk periodisk (standard: 1)</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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Sett minimum blokkstørrelse i bytes (standardverdi: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Setter flagget DB_PRIVATE i miljøet til lommebokdatabasen (standard: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle feilsøkingsvalg (bruk: --help -help-debug)</translation>
@@ -3325,14 +3137,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Signing transaction failed</source>
         <translation>Signering av transaksjon feilet</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Angi tidsavbrudd for forbindelse i millisekunder (standardverdi: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systemfeil:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Dette er eksperimentell programvare.</translation>
@@ -3353,10 +3157,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Kan ikke binde til %s på denne datamaskinen (binding returnerte feilen %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Bruk UPnP for lytteport (standardverdi: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Bruk UPnP for lytteport (standardverdi: 1 ved lytting)</translation>
@@ -3409,10 +3209,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Upgrade wallet to latest format</source>
         <translation>Oppgrader lommebok til nyeste format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Angi størrelsen på nøkkellageret til &lt;n&gt; (standardverdi: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Se gjennom blokkjeden etter manglende lommeboktransaksjoner</translation>
@@ -3421,14 +3217,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Bruk OpenSSL (https) for JSON-RPC forbindelser</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Servers sertifikat (standardverdi: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Servers private nøkkel (standardverdi: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Denne hjelpemeldingen</translation>
@@ -3445,14 +3233,182 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Feil ved lasting av wallet.dat: Lommeboken er skadet</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = behold metadata for transaksjon som f. eks. kontoeier og informasjon om betalingsanmodning, 2 = dropp metadata for transaksjon)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Overfør aktiviteten i databasen fra minnelageret til loggen på harddisken for hver &lt;n&gt; megabytes (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Hvor grundig blokkverifiseringen til -checkblocks er (0-4, standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Hvis paytxfee ikke er angitt, inkluderer da nok gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Logg transaksjonsprioritet og gebyr per kB under blokkutvinning (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Oppretthold en full transaksjonsindeks, brukt av getrawtransaction RPC-kall (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Antall sekunder noder med dårlig oppførsel hindres fra å koble til på nytt (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Ta ut feilsøkingsinformasjon (standardverdi: %u, bruk av &lt;category&gt; er valgfritt)</translation>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation>Sett prosessorgrensen for når blokkutvinning er på (-1 = ubegrenset, standardverdi: %d)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Bruk separate SOCKS5 proxyer for å nå noder via Tor skjulte tjenester (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Akseptable sifre (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Alltid søk etter nodeadresser via DNS-oppslag (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Slå av sikkerhetsmodus, overstyr en virkelig sikkerhetsmodushendelse (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Feil ved lasting av wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Tving sikkerhetsmodus (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generer mynter (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Hvor mange blokker skal sjekkes ved oppstart (standardverdi: %u, 0 = alle)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inkludere IP-adresser i feilsøkingslogg (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ugyldig -proxy adresse: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Begrens størrelsen på hurtigbufferen for signaturer til &lt;n&gt; oppføringer (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lytt etter JSON-RPC tilkoblinger på &lt;port&gt; (standardverdi: %u eller testnett: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lytt etter tilkoblinger på &lt;port&gt; (standardverdi: %u eller testnett: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Hold maks &lt;n&gt; koblinger åpne til andre noder (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maks mottaksbuffer per forbindelse, &lt;n&gt;*1000 bytes (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maks sendebuffer per forbindelse, &lt;n&gt;*1000 bytes (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Aksepter kun blokkjeden som stemmer med innebygde sjekkpunkter (standardvalg: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Sett inn tidsstempel i front av feilsøkingsdata (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Skriv ut blokktreet ved oppstart (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Videresend og ufør graving av databærende transaksjoner (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Videresend ikke-P2SH multisig (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Kjør en tråd som skriver lommeboken til disk periodisk (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Fil for tjenersertifikat (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Privat nøkkel for tjener (standardverdi: %s) </translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Angi størrelse på nøkkel-lager til &lt;n&gt; (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Sett minimum blokkstørrelse i bytes (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Sett antall tråder til betjening av RPC-kall (standardverdi: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Setter flagget DB_PRIVATE i miljøet til lommebokdatabasen (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Angi konfigurasjonsfil (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Angi tidsavbrudd for forbindelse i millisekunder (minimum: 1, standardverdi: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Angi pid-fil (standardverdi: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Bruk ubekreftet veksel ved sending av transaksjoner (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Avslutt etter import av blokker fra disk (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Grenseverdi for å koble fra noder med dårlig oppførsel (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Ukjent nettverk angitt i -onlynet '%s'</translation>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 0a9c6e2efae8..fb81042d8e6d 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -3,7 +3,7 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Dubbelklik om adres of label te wijzigen</translation>
+        <translation>Dubbelklik om het adres of label te wijzigen</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -59,7 +59,7 @@
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Bezig met versturen adressen</translation>
+        <translation>Bezig met het versturen van de adressen</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
@@ -290,6 +290,10 @@
         <source>Open &amp;URI...</source>
         <translation>Open &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin kern applicatie</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Blokken aan het importeren vanaf harde schijf...</translation>
@@ -342,6 +346,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Ontvangen</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Toon informatie over bitcoin kern</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Toon / Verberg</translation>
@@ -378,10 +386,6 @@
         <source>Tabs toolbar</source>
         <translation>Tab-werkbalk</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnetwerk]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Kern</translation>
@@ -422,10 +426,6 @@
         <source>No block source available...</source>
         <translation>Geen bron van blokken beschikbaar...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>%1 blokken van transactiehistorie verwerkt.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n uur</numerusform><numerusform>%n uur</numerusform></translation>
@@ -540,6 +540,10 @@ Adres: %4
         <source>Fee:</source>
         <translation>Vergoeding:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Stof:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>Na vergoeding:</translation>
@@ -628,6 +632,10 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Kopieer prioriteit</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopieër stof</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopieer wisselgeld</translation>
@@ -676,6 +684,10 @@ Adres: %4
         <source>none</source>
         <translation>geen</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Kan per input +/- %1 satoshi(s)  variëren.</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>ja</translation>
@@ -885,18 +897,18 @@ Adres: %4
         <translation>Bitcoin Kern</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Fout</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Fout: De gespecificeerde directory "%1" kan niet worden gecreëerd.</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation>GB aan vrije opslagruimte beschikbaar</translation>
+        <source>Error</source>
+        <translation>Fout</translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(van %1GB benodigd)</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB aan vrije oplsagruimte beschikbaar</numerusform><numerusform>%n GB aan vrije oplsagruimte beschikbaar</numerusform></translation>
     </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -958,6 +970,14 @@ Adres: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Aantal threads voor &amp;scriptverificatie</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Accepteer binnenkomende verbindingen</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Sta inkomende verbindingen toe</translation>
+    </message>
     <message>
         <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
         <translation>Verbind met het Bitcoin-netwerk via een SOCKS-proxy.</translation>
@@ -1129,10 +1149,6 @@ Adres: %4
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
         <translation>De weergegeven informatie kan verouderd zijn. Uw portemonnee synchroniseert automaticsh met het Bitcoinnetwerk nadat een verbinding is gelegd, maar dit proces is nog niet voltooid.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Portemonnee</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Beschikbaar:</translation>
@@ -1166,8 +1182,8 @@ Adres: %4
         <translation>Uw totale saldo</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Recente transacties&lt;/b&gt;</translation>
+        <source>Recent transactions</source>
+        <translation>Recente transacties</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1184,6 +1200,14 @@ Adres: %4
         <source>Invalid payment address %1</source>
         <translation>Ongeldig betalingsadres %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Betalingsverzoek geweigerd</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Betalingsverzoek is verlopen.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Het gevraagde betalingsbedrag van %1 is te weinig (beschouwd als stof).</translation>
@@ -1231,6 +1255,10 @@ Adres: %4
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
     </context>
 <context>
     <name>QObject</name>
@@ -1238,6 +1266,14 @@ Adres: %4
         <source>Amount</source>
         <translation>Bedrag</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Voer een Bitcoin-adres in (bijv. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 uur</translation>
@@ -1246,11 +1282,31 @@ Adres: %4
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>Netwerk</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>ONBEKEND</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Geen</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N.v.t.</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1324,6 +1380,50 @@ Adres: %4
         <source>Current number of blocks</source>
         <translation>Huidig aantal blokken</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Ontvangen</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Verstuurd</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Directie</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versie</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Services</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Connectie tijd</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Laatst verstuurd</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Laatst ontvangen</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes Verzonden</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes Ontvangen</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Tijd laatste blok</translation>
@@ -1400,6 +1500,18 @@ Adres: %4
         <source>%1 GB</source>
         <translation>%1 Gb</translation>
     </message>
+    <message>
+        <source>via %1</source>
+        <translation>via %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>nooit</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Onbekend</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -1640,6 +1752,10 @@ Adres: %4
         <source>Clear all fields of the form.</source>
         <translation>Wis alle velden van het formulier.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Stof:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Verwijder &amp;Alles</translation>
@@ -1740,6 +1856,10 @@ Adres: %4
         <source>Warning: Unknown change address</source>
         <translation>Waarschuwing: Onbekend wisselgeldadres</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopieër stof</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Weet u zeker dat u wilt verzenden?</translation>
@@ -2430,28 +2550,10 @@ Adres: %4
         <source>Options:</source>
         <translation>Opties:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specificeer configuratiebestand (standaard: bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specificeer pid-bestand (standaard: bitcoind.pid)
-</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Stel datamap in</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Luister voor verbindingen op &lt;poort&gt; (standaard: 8333 of testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Onderhoud maximaal &lt;n&gt; verbindingen naar peers (standaard: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Verbind naar een node om adressen van anderen op te halen, en verbreek vervolgens de verbinding</translation>
@@ -2460,18 +2562,6 @@ Adres: %4
         <source>Specify your own public address</source>
         <translation>Specificeer uw eigen publieke adres</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Drempel om verbinding te verbreken naar zich misdragende peers (standaard: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Aantal seconden dat zich misdragende peers niet opnieuw mogen verbinden (standaard: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Wacht op JSON-RPC-connecties op poort &lt;port&gt; (standaard: 8332 of testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aanvaard commandoregel- en JSON-RPC-commando's</translation>
@@ -2510,18 +2600,10 @@ Als het bestand niet bestaat, make hem dan aan met leesrechten voor enkel de eig
 Het is ook aan te bevelen "alertnotify" in te stellen zodat u op de hoogte gesteld wordt van problemen;
 bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Aanvaardbare cijfers (standaard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind aan opgegeven adres en luister er altijd op. Gebruik [host]:port notatie voor IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Doorlopend tarief-limiet op gratis transacties toepassen tot &lt;n&gt;*1000 bytes per minuut (standaard: 15)</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Schakel regressietest-modus in, die een speciale blokketen gebruikt waarin blokken onmiddellijk opgelost kunnen worden.</translation>
@@ -2538,14 +2620,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Leeg database-activiteit uit de geheugenpool naar schijf log elke &lt;n&gt; megabytes (standaard: 100) </translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Hoe grondig de blokverificatie van -checkblocks is (0-4, standaard: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In deze modus, -genproclimit controleert hoeveel blokken er onmiddellijk worden gegenereerd.</translation>
@@ -2554,10 +2628,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Kies het aantal script verificatie processen (%u tot %d, 0 = auto, &lt;0 = laat dit aantal kernen vrij, standaard: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Kies de processorlimiet wanneer generation is aan (-1 = ongelimiteerd, standaard: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Dit is een pre-release testversie - gebruik op eigen risico! Gebruik deze niet voor het delven van munten of handelsdoeleinden</translation>
@@ -2566,10 +2636,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Niet in staat om %s te verbinden op deze computer. Bitcoin Core draait waarschijnlijk al.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Gebruik een aparte SOCKS5 proxy om 'Tor hidden services' te bereiken (standaard: hetzelfde als -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Waarschuwing: -paytxfee is zeer hoog ingesteld.  Dit zijn de transactiekosten die u betaalt bij het versturen van een transactie.</translation>
@@ -2594,10 +2660,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>(default: 1)</source>
         <translation>(standaard: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(standaard: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; kan zijn:</translation>
@@ -2626,10 +2688,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Debugging/Testing options:</source>
         <translation>Foutopsporing/Testopties:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Veilige modus uitschakelen, hef een echte veilige modus gebeurtenis uit (default: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Ontdek eigen IP-adres (standaard: 1 als er wordt geluisterd en geen -externalip is opgegeven)</translation>
@@ -2666,66 +2724,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Fout: Portemonnee vergrendeld, aanmaak transactie niet mogelijk!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Fout: Systeemfout:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Mislukt om op welke poort dan ook te luisteren. Gebruik -listen=0 as u dit wilt.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Lezen van blokinformatie mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Lezen van blok mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Synchroniseren van blokindex mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Schrijven van blokindex mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Schrijven van blokinformatie mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Schrijven van blok mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Schrijven van bestandsinformatie mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Schrijven naar coindatabase mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Schrijven van transactieindex mislukt</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Schrijven van undo-data mislukt</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forceer veilige modus (default: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genereer munten (standaard: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Aantal te checken blokken bij het opstarten (standaard: 288, 0 = allemaal)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Als er geen &lt;category&gt; is opgegeven, laat dan alle debugging informatie zien.</translation>
@@ -2746,10 +2748,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Not enough file descriptors available.</source>
         <translation>Niet genoeg file descriptors beschikbaar.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Prepend debug output met tijdstempel (standaard: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blokketen opnieuw opbouwen met behulp van huidige blk000??.dat-bestanden</translation>
@@ -2762,18 +2760,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Stel maximum blokgrootte in in bytes (standaard: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Stel het aantal threads in om RPC-aanvragen mee te bedienen (standaard: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specificeer het portemonnee bestand (vanuit de gegevensmap)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Spendeer onbevestigd wisselgeld wanneer transacties verstuurd worden (standaard: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Dit is bedoeld voor regressie test toepassingen en applicatie onwikkeling.</translation>
@@ -2810,10 +2800,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Voer commando uit zodra een waarschuwing is ontvangen of wanneer we een erg lange fork detecteren (%s in commando wordt vervangen door bericht)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Output extra debugginginformatie (standaard: 0, het leveren van &lt;category&gt; is optioneel)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Stel maximumgrootte in bytes in voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: %d)</translation>
@@ -2830,42 +2816,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ongeldig bedrag voor -mintxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limiteer grootte van de handtekening cache tot &lt;n&gt; entries (default: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Log transactieprioriteit en vergoeding per kB bij mijnen blocks (standaard: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Onderhoud een volledige transactieindex (standaard: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximum per-connectie ontvangstbuffer, &lt;n&gt;*1000 bytes (standaard: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximum per-connectie zendbuffer, &lt;n&gt;*1000 bytes (standaard: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Accepteer alleen blokketen die overeenkomt met de ingebouwde checkpoints (standaard: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Verbind alleen naar nodes in netwerk &lt;net&gt; (IPv4, IPv6 of Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Toon block bij opstarten, wanneer gevonden in block index</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Toon block structuur bij opstarten (default: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL opties: (zie de Bitcoin Wiki voor SSL installatie-instructies)</translation>
@@ -2882,22 +2836,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Fuzz willekeurig 1 van elke &lt;n&gt; netwerkberichten</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Draai een proces om de wallet periodiek te flushen (default: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Stuur trace/debug-info naar de console in plaats van het debug.log bestand</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Stel minimum blokgrootte in in bytes (standaard: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Plaatst de DB_PRIVATE vlag in de wallet db omgeving (default: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Toon alle foutopsporingsopties (gebruik: --help -help-debug)</translation>
@@ -2911,12 +2853,8 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <translation>Ondertekenen van transactie mislukt</translation>
     </message>
     <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specificeer de time-outtijd in milliseconden (standaard: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systeemfout:</translation>
+        <source>This is experimental software.</source>
+        <translation>Dit is experimentele software.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
@@ -2930,10 +2868,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Transaction too large</source>
         <translation>Transactie te groot</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Gebruik UPnP om de luisterende poort te mappen (standaard: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Gebruik UPnP om de luisterende poort te mappen (standaard: 1 als er wordt geluisterd)</translation>
@@ -2974,10 +2908,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Upgrade wallet to latest format</source>
         <translation>Vernieuw portemonnee naar nieuwste versie</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Stel sleutelpoelgrootte in op &lt;n&gt; (standaard: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Doorzoek de blokketen op ontbrekende portemonnee-transacties</translation>
@@ -2986,14 +2916,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Gebruik OpenSSL (https) voor JSON-RPC-verbindingen</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificaat-bestand voor server (standaard: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Geheime sleutel voor server (standaard: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Dit helpbericht</translation>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index d109c2442327..c42cc73484ec 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -9,10 +9,22 @@
         <source>Create a new address</source>
         <translation>Maglalang kang bayung address</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Bayu</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopyan me ing salukuyan at makipiling address keng system clipboard</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Kopyan</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>I&amp;sara</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopyan ing address</translation>
@@ -25,10 +37,34 @@
         <source>&amp;Delete</source>
         <translation>&amp;Ilako</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Pilinan ing address a magpadalang coins kang</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Pilinan ing address a tumanggap coins a atin</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>P&amp;ilinan</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Address king pamag-Padala</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Address king pamag-Tanggap</translation>
+    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Reni reng kekang Bitcoin address king pamagpadalang kabayaran. Lawan mulang masalese reng alaga ampo ing address na ning tumanggap bayu ka magpadalang barya.</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>Reni reng kekang Bitcoin addresses keng pamananggap bayad. Rerekomenda mi na gumamit kang bayung address keng balang transaksiyon.</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Kopyan ing &amp;Label</translation>
@@ -278,10 +314,6 @@
         <source>Tabs toolbar</source>
         <translation>Gamit para king Tabs</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Kapilubluban ning Bitcoin</translation>
@@ -605,10 +637,6 @@ Address: %4
         <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>Ing makaltong impormasion mapalyaring luma ne. Ing kekang wallet otomatiku yang mag-synchronize keng Bitcoin network istung mekakonekta ne king network, oneng ing prosesung ini ali ya pa kumpletu.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Wallet</translation>
-    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>Ing kekang kasalungsungan balanse a malyari mung gastusan</translation>
@@ -633,10 +661,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>Ing kekang kasalungsungan kabuuang balanse</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Reng kapilan pamung transaksion&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>ali ya maka-sync</translation>
@@ -1374,26 +1398,10 @@ Address: %4
         <source>Options:</source>
         <translation>Pipamilian:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Pilinan ing configuration file(default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Pilinan ing pid file(default: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Pilinan ing data directory</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Makiramdam king koneksion king &lt;port&gt;(default: 8333 o testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mag-maintain peka &lt;n&gt; koneksion keng peers (default: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Kumunekta king note ban ayakua mula reng peer address, at mako king panga konekta</translation>
@@ -1402,14 +1410,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Sabyan me ing kekang pampublikong address</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Tumanggap command line at JSON-RPC commands</translation>
@@ -1462,58 +1462,10 @@ Address: %4
         <source>Error: Disk space is low!</source>
         <translation>Kamalian: Mababa ne ing espasyu king disk!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Kamalian: kamalian na ning sistema:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Memali ya ing pamakiramdam kareng gang nanung port. Gamita me ini -listen=0 nung buri me ini.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Me-mali king pamagbasa king impormasion ning block</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Me-mali king pamagbasa keng block</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Me-mali para i-sync ing block index</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Me-mali king pamanyulat king block index</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Me-mali king pamanyulat king block info</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Me-mali king pamanyulat block</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Me-mali king pamanyulat king file info</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Me-mali king pamanyulat king coin database</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Me-mali king pamanyulat king index ning transaksion</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Me-mali king pamanyulat king undo data</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Pilan la reng block a lawan keng umpisa (default: 288, 0 = all)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>&amp;Impormasion</translation>
@@ -1522,14 +1474,6 @@ Address: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Magpadalang trace/debug info okeng console kesa keng debug.log file</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Ilage ing pekaditak a dagul na ning block king bytes (default: 0)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Kamalian ning sistema:</translation>
-    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Maragul yang masiadu ing transaksion</translation>
@@ -1558,10 +1502,6 @@ Address: %4
         <source>Upgrade wallet to latest format</source>
         <translation>I-upgrade ing wallet king pekabayung porma</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>I-set ing key pool size king &lt;n&gt;(default: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>I-scan pasibayu ing block chain para kareng mauaualang transaksion</translation>
@@ -1570,14 +1510,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Gumamit OpenSSL(https) para king JSON-RPC koneksion</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Server certificate file (default: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Server private key (default: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Ining saup a mensayi</translation>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index 7cf3d042a12d..25d04a0d497f 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -386,10 +386,6 @@
         <source>Tabs toolbar</source>
         <translation>Pasek zakładek</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Rdzeń BitCoin</translation>
@@ -426,10 +422,6 @@
         <source>No block source available...</source>
         <translation>Brak dostępnych źródeł bloków...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Pobrano %1 bloków z historią transakcji.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n godzina</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation>
@@ -888,15 +880,7 @@ Adres: %4
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB dostępnego wolnego miejsca</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(z %1GB potrzebnego)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1101,10 +1085,6 @@ Adres: %4
         <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>Wyświetlana informacja może być nieaktualna. Twój portfel synchronizuje się automatycznie z siecią bitcoin, zaraz po tym jak uzyskano połączenie, ale proces ten nie został jeszcze ukończony.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Portfel</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Dostępne:</translation>
@@ -1137,10 +1117,6 @@ Adres: %4
         <source>Your current total balance</source>
         <translation>Twoje obecne saldo</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Ostatnie transakcje&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>desynchronizacja</translation>
@@ -2346,26 +2322,10 @@ Adres: %4
         <source>Options:</source>
         <translation>Opcje:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Wskaż plik konfiguracyjny (domyślnie: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Wskaż plik pid (domyślnie: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Wskaż folder danych</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Nasłuchuj połączeń na &lt;port&gt; (domyślnie: 8333 lub testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Utrzymuj maksymalnie &lt;n&gt; połączeń z peerami (domyślnie: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Podłącz się do węzła aby otrzymać adresy peerów i rozłącz</translation>
@@ -2374,18 +2334,6 @@ Adres: %4
         <source>Specify your own public address</source>
         <translation>Podaj swój publiczny adres</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Próg po którym nastąpi rozłączenie nietrzymających się zasad peerów (domyślnie: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Czas w sekundach, przez jaki nietrzymający się zasad peerzy nie będą mogli ponownie się podłączyć (domyślnie: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Nasłuchuj połączeń JSON-RPC na &lt;port&gt; (domyślnie: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Akceptuj linię poleceń oraz polecenia JSON-RPC</translation>
@@ -2425,10 +2373,6 @@ Jeśli plik nie istnieje, utwórz go z uprawnieniami tylko-do-odczytu dla właś
 Zalecane jest ustawienie alertnotify aby poinformować o problemach:⏎
 na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Dopuszczalne szyfry (domyślnie: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Skojarz z podanym adresem. Użyj formatu [host]:port dla IPv6 </translation>
@@ -2473,10 +2417,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>(default: 1)</source>
         <translation>(domyślnie: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(domyślnie: wallet.dat)</translation>
-    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
@@ -2537,66 +2477,10 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Błąd: Zablokowany portfel, nie można utworzyć transakcji!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Błąd: błąd systemu:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Nie udało się odczytać informacji bloku</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Nie udało się odczytać bloku.</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Nie udało się zsynchronizować indeksu bloków.</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Nie udało się zapisać indeksu bloków.</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Nie udało się zapisać informacji bloku</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Nie udało się zapisać bloku</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Nie udało się zapisać informacji o pliku</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Nie udało się zapisać do bazy monet</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Nie udało się zapisać indeksu transakcji</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Nie udało się zapisać danych odtwarzających</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Wymuś tryb bezpieczny (domyślnie: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generuj monety (domyślnie: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Ile bloków sprawdzić przy starcie (domyślnie: 288, 0 = wszystkie)</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Importowanie…</translation>
@@ -2625,18 +2509,10 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Ustaw maksymalną wielkość bloku w bajtach (domyślnie: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Ustaw liczbę wątków do odwołań RPC (domyślnie: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Określ plik portfela (w obrębie folderu danych)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Wydawaj niepotwierdzoną resztę podczas wysyłania transakcji (domyślnie: 1)</translation>
-    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Weryfikacja bloków...</translation>
@@ -2681,46 +2557,14 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nieprawidłowa kwota dla -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Ogranicz rozmiar pamięci podręcznej sygnatur do &lt;n&gt; wpisów (domyslnie: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Loguj priorytety transakcji i opłaty na kB podczas kopania bloków (domyślnie: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Utrzymuj pełen indeks transakcji (domyślnie: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksymalny bufor odbioru na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksymalny bufor wysyłu na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: 1000)</translation>
-    </message>
     <message>
         <source>Node relay options:</source>
         <translation>Opcje przekaźnikowe węzła:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Akceptuj tylko łańcuch bloków zgodny z wbudowanymi punktami kontrolnymi (domyślnie: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Łącz z węzłami tylko w sieci &lt;net&gt; (IPv4, IPv6 lub Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Wyświetlaj blok podczas uruchamiania, jeżeli znaleziono indeks bloków</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Wypisz drzewo bloków podczas uruchomienia (domyślnie: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcje RPC SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation>
@@ -2737,18 +2581,10 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Losowo ignoruje 1 z wszystkich &lt;n&gt; wiadomości sieciowych.</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Uruchom wątek do okresowego zapisywania portfela (domyślnie: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: 0)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Pokaż wszystkie opcje odpluskwiania (użycie: --help -help-debug)</translation>
@@ -2761,14 +2597,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Signing transaction failed</source>
         <translation>Podpisywanie transakcji nie powiodło się</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Wskaż czas oczekiwania bezczynności połączenia w milisekundach (domyślnie: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Błąd systemu:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>To oprogramowanie eksperymentalne.</translation>
@@ -2785,10 +2613,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Transaction too large</source>
         <translation>Transakcja zbyt duża</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje)</translation>
@@ -2829,10 +2653,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Upgrade wallet to latest format</source>
         <translation>Zaktualizuj portfel do najnowszego formatu.</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ustaw rozmiar puli kluczy na &lt;n&gt; (domyślnie: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela</translation>
@@ -2841,14 +2661,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Użyj OpenSSL (https) do połączeń JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Plik certyfikatu serwera (domyślnie: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Klucz prywatny serwera (domyślnie: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Ta wiadomość pomocy</translation>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 0cdb7d669414..cbd730bde4b3 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de ferramentas</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Núcleo Bitcoin</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Nenhum servidor disponível...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Processado %1 blocos do histórico de transações.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
@@ -915,15 +907,7 @@ Endereço: %4</translation>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de espaço disponível</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(Mais de %1GB necessário)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1164,10 +1148,6 @@ Endereço: %4</translation>
         <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>A informação mostrada pode estar desatualizada. Sua carteira sincroniza automaticamente com a rede Bitcoin depois que a conexão é estabelecida, mas este processo pode não estar completo ainda.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Carteira</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Apenas visualizar:</translation>
@@ -1208,10 +1188,6 @@ Endereço: %4</translation>
         <source>Your current balance in watch-only addresses</source>
         <translation>Sua balança atual em endereços apenas visualizados</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transações recentes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
@@ -1282,7 +1258,11 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo de Ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
@@ -1415,6 +1395,10 @@ Endereço: %4</translation>
         <source>&amp;Peers</source>
         <translation>&amp;Pares</translation>
     </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direção</translation>
+    </message>
     <message>
         <source>Version</source>
         <translation>Versão</translation>
@@ -1423,6 +1407,30 @@ Endereço: %4</translation>
         <source>Services</source>
         <translation>Serviços</translation>
     </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Banir pontuação</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Ultimo Envio</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Ultimo Recebido</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes Enviados</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>bytes Recebidos</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo de Ping</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Horário do último bloco</translation>
@@ -1515,14 +1523,6 @@ Endereço: %4</translation>
         <source>Outbound</source>
         <translation>Saída</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Sim</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Não</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Desconhecido</translation>
@@ -1910,6 +1910,10 @@ Endereço: %4</translation>
         <source>This is a normal payment.</source>
         <translation>Este é um pagamento normal.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>O enderesso Bitcoin que enviarár o pagamento</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1980,6 +1984,10 @@ Endereço: %4</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Você pode assinar mensagens com seus endereços para provar que você é o dono deles. Seja cuidadoso para não assinar algo vago, pois ataques de pishing podem tentar te enganar para dar sua assinatura de identidade para eles. Apenas assine afirmações completamente detalhadas com as quais você concorda.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>O enderesso Bitcoin que assinará a mensagem</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escolha um endereço usado anteriormente</translation>
@@ -2032,6 +2040,10 @@ Endereço: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Forneça o endereço da assinatura, a mensagem (se assegure que você copiou quebras de linha, espaços, tabs, etc. exatamente) e a assinatura abaixo para verificar a mensagem. Cuidado para não ler mais na assinatura do que está escrito na mensagem propriamente, para evitar ser vítima de uma ataque do tipo "man-in-the-middle".</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>O enderesso Bitcoin que assionou a mesnagem</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verificar mensagem para se assegurar que ela foi assinada pelo dono de um endereço Bitcoin específico.</translation>
@@ -2173,6 +2185,10 @@ Endereço: %4</translation>
         <source>own address</source>
         <translation>seu próprio endereço</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Vizualização apenas</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>rótulo</translation>
@@ -2193,6 +2209,14 @@ Endereço: %4</translation>
         <source>Debit</source>
         <translation>Débito</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Débito total</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Credito total</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Taxa de transação</translation>
@@ -2343,6 +2367,10 @@ Endereço: %4</translation>
         <source>Mined</source>
         <translation>Minerado</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Vizualização apenas</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2454,6 +2482,10 @@ Endereço: %4</translation>
         <source>Export Transaction History</source>
         <translation>Exportar Histórico de Transação</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Vizualização apenas</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Exportação Falhou</translation>
@@ -2565,26 +2597,10 @@ Endereço: %4</translation>
         <source>Options:</source>
         <translation>Opções:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especifique um arquivo de configurações (padrão: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especifique um arquivo de pid (padrão: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especificar diretório de dados</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Procurar por conexões em &lt;port&gt; (padrão: 8333 ou testnet:18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manter no máximo &lt;n&gt; conexões aos peers (padrão: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectar a um nó para receber endereços de participantes, e desconectar.</translation>
@@ -2593,18 +2609,6 @@ Endereço: %4</translation>
         <source>Specify your own public address</source>
         <translation>Especificar seu próprio endereço público</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Limite para desconectar peers mal comportados (padrão: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos para impedir que peers mal comportados reconectem (padrão: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escutar conexões JSON-RPC na porta &lt;porta&gt; (padrão: 8332 ou testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar linha de comando e comandos JSON-RPC</translation>
@@ -2645,18 +2649,10 @@ Se o arquivo não existir, crie um com permissão de leitura apenas para o dono.
 por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Codificadores aceitos (padrão: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular ao endereço fornecido e sempre escutar nele. Use a notação [host]:port para IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Restringe a taxa de transações gratuitas para &lt;n&gt;*1000 bytes por minuto (padrão:15)</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra no modo de teste de regressão, que usa uma cadeia especial onde os blocos podem ser resolvidos instantaneamente.</translation>
@@ -2673,14 +2669,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando uma transação da carteira mudar (%s no comando será substituído por TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Descarrega a atividade do banco de dados da memória para log em disco a cada &lt;n&gt; megabytes (padrão: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Quão completa a verificação de blocos do -checkblocks é (0-4, padrão: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Neste modo -genproclimit controla quantos blocos são gerados imediatamente.</translation>
@@ -2689,10 +2677,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Define o número de threads de verificação de script (%u a %d, 0 = automático, &lt;0 = número de cores deixados livres, padrão: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Define o limite de processador para quando geração está ativa (-1 = ilimitada, padrão: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Este pode ser um build de teste pré-lançamento - use por sua conta e risco - não use para mineração ou aplicações de comércio.</translation>
@@ -2701,10 +2685,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Impossível ouvir em %s neste computador. Bitcoin Core já está sendo executado provavelmente.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Use proxy SOCKS5 separado para alcançar nós via Tor hidden services (padrão: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atenção: valor de -paytxfee escolhido é muito alto! Este é o valor da taxa de transação que você irá pagar se enviar a transação.</translation>
@@ -2729,10 +2709,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>(default: 1)</source>
         <translation>(padrão: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(padrão: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; pode ser:</translation>
@@ -2761,10 +2737,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Debugging/Testing options:</source>
         <translation>Opções de Debug/Teste:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Desabilita modo seguro, sobrepõe um evento de modo seguro real (padrão: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobrir os próprios endereços IP (padrão: 1 quando no modo listening e opção -externalip não estiver presente)</translation>
@@ -2793,6 +2765,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Error opening block database</source>
         <translation>Erro ao abrir banco de dados de blocos</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Erro: Um erro interno fatal ocorreu, ver o debug.log para detalhes</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Erro: Espaço em disco insuficiente!</translation>
@@ -2801,66 +2777,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erro: Carteira bloqueada, impossível criar transação!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Erro: erro de sistema</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Falha ao escutar em qualquer porta. Use -listen=0 se você quiser isso.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Falha ao ler informação de bloco</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Falha ao ler bloco</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Falha ao sincronizar índice de blocos</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Falha ao escrever índice de blocos</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Falha ao escrever informações de bloco</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Falha ao escrever bloco</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Falha ao escrever informções de arquivo</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Falha ao escrever banco de dados de moedas</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Falha ao escrever índice de transações</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Falha ao escrever dados para desfazer ações</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Força modo seguro (padrão: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Gerar moedas (padrão: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quantos blocos checar ao inicializar (padrão: 288, 0 = todos)</translation>
-    </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>
@@ -2881,10 +2801,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Not enough file descriptors available.</source>
         <translation>Decriptadores de arquivos disponíveis insuficientes.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Adiciona timestamp como prefixo no debug (padrão: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir índice de blockchain a partir dos arquivos atuais blk000??.dat</translation>
@@ -2897,22 +2813,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Define o tamanho máximo de cada bloco em bytes (padrão: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Defina o número de threads de chamadas RPC (padrão: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especifique o arquivo da carteira (dentro do diretório de dados)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Permite gastar troco não confirmado ao criar transações (padrão: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Parar de executar após importar blocos do disco (padrão: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Isso é usado para testes de regressão e ferramentas de desenvolvimento.</translation>
@@ -2953,10 +2857,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Erro: Escutar por conexões de entrada falhou (escutar retornou erro %s)</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Executa comando quando uma transação da rede gasta novamente uma transação de entrada da carteira (%s=TxID do gasto duplo, %t=TxID da Carteira)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executa o comando quando um alerta relevante é recebido ou vemos uma longa segregação (%s em cmd é substituído pela mensagem)</translation>
@@ -2969,10 +2869,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Taxas (em BTC/Kb) menores do que este valor são consideradas inexistentes para a criação da transação (padrão: %s)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informação de saída de debug (padrão: 0, definir &lt;category&gt; é opcional)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Define o tamanho máximo de alta-prioridade por taxa baixa nas transações em bytes (padrão: %d)</translation>
@@ -2981,6 +2877,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Impossível resolver endereço -whitebind: '%s'</translation>
     </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connecte-se através de um proxy SOCKS5</translation>
+    </message>
     <message>
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
         <translation>Copyright (C) 2009-%i Desenvolvedores Bitcoin Core</translation>
@@ -2993,10 +2893,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Taxa (em BTC/kB) a adicionar nas transações que você envia (padrão: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Incluir endereços IP na saída de depuração (padrão: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Informação</translation>
@@ -3021,46 +2917,14 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Manter no máximo &lt;n&gt; blocos pendentes em memória (padrão: %u)</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limita tamanho do cache de assinaturas em &lt;n&gt; entradas (padrão: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registra log da prioridade de transação e taxa por kB quando minerando blocos (padrão: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manter índice completo de transações (padrão: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Buffer máximo de recebimento por conexão, &lt;n&gt;*1000 bytes (padrão: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Buffer máximo de envio por conexão, &lt;n&gt;*1000 bytes (padrão: 1000)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Necessário informar uma porta com -whitebind: '%s'</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Apenas aceitar cadeia de blocos correspondente a marcas de verificação internas (padrão: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Apenas conectar em nós na rede &lt;net&gt; (IPv4, IPv6, ou Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Imprime bloco ao iniciar, se encontrado no índice de blocos</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprime árvore de blocos ao iniciar (padrão: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opções RPC SSL: (veja o Bitcoin Wiki para instruções de configuração SSL)</translation>
@@ -3077,22 +2941,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Aleatoriamente embaralha 1 em cada &lt;n&gt; mensagens da rede</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Executa uma thread para limpar a carteira periodicamente (padrão: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Mandar informação de trace/debug para o console em vez de para o arquivo debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Determinar tamanho mínimo de bloco em bytes (padrão: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Define a flag DB_PRIVATE no ambiente de banco de dados da carteira (padrão: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Exibir todas opções de debug (uso: --help -help-debug)</translation>
@@ -3105,14 +2957,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Signing transaction failed</source>
         <translation>Assinatura de transação falhou</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especifique o tempo limite (timeout) da conexão em milissegundos (padrão: 5000) </translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Erro de sistema:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Este é um software experimental.</translation>
@@ -3133,10 +2977,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Impossível se ligar a %s neste computador (bind retornou erro %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para mapear porta de escuta (padrão: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para mapear porta de escuta (padrão: 1 quando estiver escutando)</translation>
@@ -3145,6 +2985,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Username for JSON-RPC connections</source>
         <translation>Nome de usuário para conexões JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Sua carteira precisou ser reescrita: favor reiniciar o Bitcoin para completar</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Atenção</translation>
@@ -3177,10 +3021,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Upgrade wallet to latest format</source>
         <translation>Atualizar carteira para o formato mais recente</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Determinar tamanho do pool de endereços para &lt;n&gt; (padrão: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Re-escanear blocos procurando por transações perdidas da carteira</translation>
@@ -3189,14 +3029,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSL (https) para conexões JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Arquivo de certificado do servidor (padrão: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Chave privada do servidor (padrão: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Esta mensagem de ajuda</translation>
@@ -3221,6 +3053,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Invalid -proxy address: '%s'</source>
         <translation>Endereço -proxy inválido: '%s'</translation>
     </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Especificar aqrquivo pid (default: %s)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Rede desconhecida especificada em -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 2d277528b1bf..edb1e87b6fce 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -179,6 +179,10 @@
         <source>Wallet encrypted</source>
         <translation>Carteira encriptada</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Escreva a nova frase de seguraça da sua carteira. &lt;br/&gt; Por favor, use uma frase de &lt;b&gt;10 ou mais caracteres aleatórios,&lt;/b&gt; ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>O cliente Bitcoin irá agora ser fechado para terminar o processo de encriptação. Recorde que a encriptação da sua carteira não protegerá totalmente os seus bitcoins de serem roubados por programas maliciosos que infectem o seu computador.</translation>
@@ -374,10 +378,6 @@
         <source>Tabs toolbar</source>
         <translation>Barra de separadores</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[rede de testes]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -418,10 +418,6 @@
         <source>No block source available...</source>
         <translation>Nenhuma fonte de blocos disponível...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Processados %1 blocos do histórico de transações.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
@@ -875,15 +871,7 @@ Endereço: %4</translation>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de espaço livre disponível</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(de %1GB necessários)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1104,10 +1092,6 @@ Endereço: %4</translation>
         <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>A informação mostrada poderá estar desatualizada. A sua carteira sincroniza automaticamente com a rede Bitcoin depois de estabelecer ligação, mas este processo ainda não está completo.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Carteira</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Disponível:</translation>
@@ -1140,10 +1124,6 @@ Endereço: %4</translation>
         <source>Your current total balance</source>
         <translation>O seu saldo total actual</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transações recentes&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
@@ -1159,6 +1139,10 @@ Endereço: %4</translation>
         <source>Invalid payment address %1</source>
         <translation>Endereço de pagamento inválido %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Pedido de pagamento rejeitado</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Quantia solicitada para pagamento de %1 é muito pequena (considerada "pó").</translation>
@@ -2405,26 +2389,10 @@ Endereço: %4</translation>
         <source>Options:</source>
         <translation>Opções:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Especificar ficheiro de configuração (por defeito: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Especificar ficheiro pid (por defeito: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Especificar pasta de dados</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Escute ligações na porta &lt;n&gt; (por defeito: 8333 ou testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manter no máximo &lt;n&gt; ligações a outros nós da rede (por defeito: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Ligar a um nó para recuperar endereços de pares, e desligar</translation>
@@ -2433,18 +2401,6 @@ Endereço: %4</translation>
         <source>Specify your own public address</source>
         <translation>Especifique o seu endereço público</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Tolerância para desligar nós com comportamento indesejável (por defeito: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos a impedir que nós com comportamento indesejado se liguem de novo (por defeito: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Escutar por ligações JSON-RPC na porta &lt;n&gt; (por defeito: 8332 ou rede de testes: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar comandos de linha de comandos e JSON-RPC</translation>
@@ -2484,10 +2440,6 @@ Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono
 Também é recomendado definir um alertnotify para que seja alertado sobre problemas;
 por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifras aceitáveis (por defeito: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associar a endereço específico e escutar sempre nele. Use a notação [anfitrião]:porta para IPv6</translation>
@@ -2516,10 +2468,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Incapaz de vincular à porta %s neste computador. O Bitcoin Core provavelmente já está a correr.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usar um proxy SOCKS5 separado para aceder a pares através de Tor hidden services (por defeito: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atenção: -paytxfee está definida com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transação.</translation>
@@ -2596,62 +2544,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erro: Carteira bloqueada, incapaz de criar transação!  </translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Erro: erro do sistema:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Falhou a escutar em qualquer porta. Use -listen=0 se quiser isto.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Falha ao ler informação do bloco</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Falha ao ler bloco</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Falha ao sincronizar índice de blocos</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Falha ao escrever índice de blocos</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Falha ao escrever informação do bloco</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Falha ao escrever bloco</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Falha ao escrever informação do ficheiro</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Falha ao escrever na base de dados de moedas</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Falha ao escrever índice de transações</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Falha ao escrever histórico de modificações</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Gerar moedas (por defeito: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quantos blocos verificar ao inicializar (por defeito: 288, 0 = todos)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Se uma &lt;categoria&gt; não é fornecida, imprimir toda a informação de depuração.</translation>
@@ -2668,10 +2564,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Not enough file descriptors available.</source>
         <translation>Os descritores de ficheiros disponíveis são insuficientes.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Adicionar data e hora à informação de depuração (por defeito: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir a cadeia de blocos a partir dos ficheiros blk000??.dat atuais</translation>
@@ -2684,18 +2576,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Definir tamanho máximo por bloco em bytes (por defeito: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Defina o número de processos para servir as chamadas RPC (por defeito: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especifique ficheiro de carteira (dentro da pasta de dados)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gastar saldo não confirmado ao enviar transações (padrão: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Isto têm como fim a realização de testes de regressão para pools e desenvolvimento de aplicações.</translation>
@@ -2732,10 +2616,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executar comando quando um alerta relevante for recebido ou em caso de uma divisão longa da cadeia de blocos (no comando, %s é substituído pela mensagem)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informação de depuração (por defeito: 0, fornecer uma &lt;categoria&gt; é opcional)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Definir tamanho máximo de transações com alta-prioridade/baixa-taxa em bytes (por defeito: %d)</translation>
@@ -2752,34 +2632,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantia inválida para -mintxfee=&lt;quantidade&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manter índice de transações completo (por defeito: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximo armazenamento intermédio de recepção por ligação, &lt;n&gt;*1000 bytes (por defeito: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximo armazenamento intermédio de envio por ligação, &lt;n&gt;*1000 bytes (por defeito: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Apenas aceitar cadeia de blocos coincidente com pontos de controle internos (por defeito: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Apenas ligar a nós na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar informação de rastreio/depuração para a consola e não para o ficheiro debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Definir tamanho minímo de um bloco em bytes (por defeito: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Encolher ficheiro debug.log ao iniciar o cliente (por defeito: 1 sem -debug definido)</translation>
@@ -2788,14 +2644,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Signing transaction failed</source>
         <translation>Falhou assinatura da transação</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar tempo de espera da ligação em millisegundos (por defeito: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Erro de sistema:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Quantia da transação é muito baixa</translation>
@@ -2808,10 +2656,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Transaction too large</source>
         <translation>Transação grande demais</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para mapear a porta de escuta (padrão: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para mapear a porta de escuta (padrão: 1 ao escutar)</translation>
@@ -2848,10 +2692,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Upgrade wallet to latest format</source>
         <translation>Atualize a carteira para o formato mais recente</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Definir o tamanho da memória de chaves para &lt;n&gt; (por defeito: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Procurar transações em falta na cadeia de blocos</translation>
@@ -2860,14 +2700,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSL (https) para ligações JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Ficheiro de certificado do servidor (por defeito: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Chave privada do servidor (por defeito: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Esta mensagem de ajuda</translation>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index c9cad3d92a9f..a20bc677a043 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -274,6 +274,14 @@
         <source>&amp;Change Passphrase...</source>
         <translation>S&amp;chimbă parola...</translation>
     </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>&amp;Trimitere adrese...</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>&amp;Primire adrese...</translation>
+    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>Vizitaţi &amp;URI...</translation>
@@ -366,10 +374,6 @@
         <source>Tabs toolbar</source>
         <translation>Bara de file</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -398,6 +402,10 @@
         <source>&amp;Command-line options</source>
         <translation>Command-line setări</translation>
     </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>Arată mesajul de ajutor Bitcoin Core pentru a obține o listă cu opțiunile posibile de linii de comandă Bitcoin</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexiune activă către rețeaua Bitcoin</numerusform><numerusform>%n conexiuni active către rețeaua Bitcoin</numerusform><numerusform>%n de conexiuni active către rețeaua Bitcoin</numerusform></translation>
@@ -406,10 +414,6 @@
         <source>No block source available...</source>
         <translation>Nici o sursă de bloc disponibil ...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>S-au procesat %1 blocuri din istoricul tranzacțiilor.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n oră</numerusform><numerusform>%n ore</numerusform><numerusform>%n ore</numerusform></translation>
@@ -844,15 +848,7 @@ Adresa: %4
         <source>Error</source>
         <translation>Eroare</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB de spațiu liber disponibil</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(din %1GB necesari)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1037,10 +1033,6 @@ Adresa: %4
         <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>Informațiile afișate pot neactualizate. Portofelul tău se sincronizează automat cu rețeaua Bitcoin după ce o conexiune este stabilită, dar acest proces nu a fost finalizat încă.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Portofel</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Disponibil:</translation>
@@ -1073,10 +1065,6 @@ Adresa: %4
         <source>Your current total balance</source>
         <translation>Balanța totală curentă</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Tranzacții recente&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>Nu este sincronizat</translation>
@@ -2278,26 +2266,10 @@ Adresa: %4
         <source>Options:</source>
         <translation>Setări:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Specifică fișierul de configurare (implicit: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Specifică fișierul pid (implicit bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Specifică dosarul de date</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Ascultă pentru conectări pe &lt;port&gt; (implicit:  8333 sau testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Menține cel mult &lt;n&gt; conexiuni cu partenerii (implicit: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectează-te la nod pentru a obține adresele partenerilor, și apoi deconectează-te</translation>
@@ -2306,18 +2278,6 @@ Adresa: %4
         <source>Specify your own public address</source>
         <translation>Specifică adresa ta publică</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Prag pentru deconectarea partenerilor care nu funcționează corect (implicit: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Numărul de secunde pentru a preveni reconectarea partenerilor care nu funcționează corect (implicit: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Ascultă pentru conexiuni JSON-RPC pe &lt;port&gt; (implicit:8332 sau testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Se acceptă comenzi din linia de comandă și comenzi JSON-RPC</translation>
@@ -2359,10 +2319,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
 
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifruri acceptabile (implicit: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Atasati adresei date si ascultati totdeauna pe ea. Folositi [host]:port notatia pentru IPv6</translation>
@@ -2383,10 +2339,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Aceasta este o versiune de test preliminara - va asumati riscul folosind-o - nu folositi pentru minerit sau aplicatiile comerciantilor.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utilizare proxy SOCKS5 separat pentru a ajunge la servicii ascunse TOR (implicit: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Atentie: setarea -paytxfee este foarte ridicata! Aceasta este taxa tranzactiei pe care o vei plati daca trimiti o tranzactie.</translation>
@@ -2459,66 +2411,10 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Eroare: Portofel blocat, nu se poate crea o tranzacție!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Eroare: eroare de sistem:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Am esuat ascultarea pe orice port. Folositi -listen=0 daca vreti asta.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Citirea informațiilor despre bloc a eșuat</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Citirea blocului a eșuat</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>A eșuat sincronizarea indexului de blocuri</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>A eșuat scrierea indexului de blocuri</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Scrierea informațiilor despre bloc a eșuat</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Scrierea blocului a eșuat</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Nu a reușit scrierea informației în fișier</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Eșuarea scrierii în baza de date de monede</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Nu a reușit scrierea indexului de tranzacție</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Esuare in scrierea datelor anulate</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Pornire fortata a modului safe mode (prestabilit: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generează monede (implicit: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Cate block-uri se verifica la initializare (implicit: 288, 0=toate)</translation>
-    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorect sau nici un bloc de Geneza găsite. Directorul de retea greşit?</translation>
@@ -2539,10 +2435,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Setaţi dimensiunea maximă a unui block în bytes (implicit: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Stabileste numarul de thread-uri care servesc apeluri RPC (implicit: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specifică fișierul wallet (în dosarul de date)</translation>
@@ -2591,42 +2483,14 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Suma invalida pentru -mintxfee=&lt;suma&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Păstrează un index complet al tranzacțiilor (implicit: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Tampon maxim pentru recepție per conexiune, &lt;n&gt;*1000 baiți (implicit: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tampon maxim pentru transmitere per conexiune, &lt;n&gt;*1000 baiți (implicit: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Se accepta decat lantul de block care se potriveste punctului de control implementat (implicit: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Efectuează conexiuni doar către nodurile din rețeaua &lt;net&gt; (IPv4, IPv6 sau Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Publica bloc la pornire daca exista in index-ul de blocuri. </translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Publicare arbore blocuri la pornire (prestabilit: 0)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Trimite informațiile trace/debug la consolă în locul fișierului debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Setează mărimea minimă a blocului în baiți (implicit: 0)</translation>
-    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Micsorati fisierul debug.log la inceperea clientului (implicit: 1 cand nu -debug)</translation>
@@ -2635,14 +2499,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Semnarea tranzacției a eșuat</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specifică intervalul maxim de conectare în milisecunde (implicit: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Eroare de sistem:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Suma tranzacționată este prea mică</translation>
@@ -2655,10 +2511,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Transaction too large</source>
         <translation>Tranzacția este prea mare</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Foloseste UPnP pentru a vedea porturile (initial: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Foloseste UPnP pentru a vedea porturile (initial: 1 cand listezi)</translation>
@@ -2695,10 +2547,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Actualizează portofelul la ultimul format</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Setează mărimea bazinului de chei la &lt;n&gt; (implicit: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescanează lanțul de bloc pentru tranzacțiile portofel lipsă</translation>
@@ -2707,14 +2555,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Folosește OpenSSL (https) pentru conexiunile JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificatul serverului (implicit: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Cheia privată a serverului (implicit: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Acest mesaj de ajutor</translation>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index d6a145928c52..93c116d0a2aa 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -264,7 +264,7 @@
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>Опции</translation>
+        <translation>&amp;Параметры</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
@@ -386,10 +386,6 @@
         <source>Tabs toolbar</source>
         <translation>Панель вкладок</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[тестовая сеть]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
@@ -416,11 +412,11 @@
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>&amp;Опции командной строки</translation>
+        <translation>&amp;Пармаетры командной строки</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>
+        <translation>Показать помощь по Bitcoin Core и получить список доступных параметров командной строки.</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -430,10 +426,6 @@
         <source>No block source available...</source>
         <translation>Источник блоков недоступен...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Обработано %1 блоков истории транзакций.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform></translation>
@@ -482,6 +474,10 @@
         <source>Up to date</source>
         <translation>Синхронизировано</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Обработан %n блок истории транзакций.</numerusform><numerusform>Обработано %n блока истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Синхронизируется...</translation>
@@ -847,11 +843,11 @@ Address: %4
     </message>
     <message>
         <source>command-line options</source>
-        <translation>опции командной строки</translation>
+        <translation>параметры командной строки</translation>
     </message>
     <message>
         <source>UI options</source>
-        <translation>Опции интерфейса</translation>
+        <translation>Настройки интерфейса</translation>
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
@@ -912,13 +908,13 @@ Address: %4
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>ГБ свободного места доступно</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(из необходимых %1ГБ)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -948,7 +944,7 @@ Address: %4
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
-        <translation>Опции</translation>
+        <translation>Параметры</translation>
     </message>
     <message>
         <source>&amp;Main</source>
@@ -1016,11 +1012,11 @@ Address: %4
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation>Сбросить все опции клиента на значения по умолчанию.</translation>
+        <translation>Сбросить все настройки клиента на значения по умолчанию.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation>&amp;Сбросить опции</translation>
+        <translation>&amp;Сбросить параметры</translation>
     </message>
     <message>
         <source>&amp;Network</source>
@@ -1132,7 +1128,7 @@ Address: %4
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation>Подтвердите сброс опций</translation>
+        <translation>Подтвердите сброс параметров</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
@@ -1161,10 +1157,6 @@ Address: %4
         <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>Отображаемая информация может быть устаревшей. Ваш бумажник автоматически синхронизируется с сетью Bitcoin после подключения, но этот процесс пока не завершён.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Бумажник</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Только наблюдение:</translation>
@@ -1193,6 +1185,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Баланс добытых монет, который ещё не созрел</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Балансы</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Итого:</translation>
@@ -1205,6 +1201,14 @@ Address: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Ваш текущий баланс в адресах наблюдения</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Доступно:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Последние транзакции</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Неподтверждённые транзакции на адреса наблюдения</translation>
@@ -1217,10 +1221,6 @@ Address: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Текущий общий баланс на адресах наблюдения</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Недавние транзакции&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>не синхронизировано</translation>
@@ -1480,10 +1480,6 @@ Address: %4
         <source>Services</source>
         <translation>Сервисы</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Узел синхронизации</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Начальная высота</translation>
@@ -1612,14 +1608,6 @@ Address: %4
         <source>Outbound</source>
         <translation>Исходящие</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Да</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Нет</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Неизвестно</translation>
@@ -2464,6 +2452,10 @@ Address: %4
         <source>Mined</source>
         <translation>Добыто</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>только наблюдение</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>[не доступно]</translation>
@@ -2480,6 +2472,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>Тип транзакции.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Использовался ли в транзакции адрес для наблюдения.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Адрес назначения транзакции.</translation>
@@ -2575,6 +2571,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>Экспортировать историю транзакций</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Для наблюдения</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Экспорт не удался</translation>
@@ -2688,28 +2688,12 @@ Address: %4
     <name>bitcoin-core</name>
     <message>
         <source>Options:</source>
-        <translation>Опции:</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Указать конфигурационный файл (по умолчанию: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Задать pid-файл (по умолчанию: bitcoin.pid)</translation>
+        <translation>Параметры:</translation>
     </message>
     <message>
         <source>Specify data directory</source>
         <translation>Задать каталог данных</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Принимать входящие подключения на &lt;port&gt; (по умолчанию: 8333 или 18333 в тестовой сети)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Поддерживать не более &lt;n&gt; подключений к участникам (по умолчанию: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Подключиться к участнику, чтобы получить список адресов других участников и отключиться</translation>
@@ -2718,18 +2702,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Укажите ваш собственный публичный адрес</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Порог для отключения неправильно ведущих себя участников (по умолчанию: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Число секунд блокирования неправильно ведущих себя участников (по умолчанию: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Прослушивать подключения JSON-RPC на &lt;порту&gt; (по умолчанию: 8332 или для testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Принимать командную строку и команды JSON-RPC</translation>
@@ -2770,18 +2742,10 @@ rpcpassword=%s
 Например: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Разрешённые алгоритмы(по умолчанию: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Привязаться к указанному адресу и всегда прослушивать только его. Используйте [хост]:порт для IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Ограничить скорость передачи бесплатных транзакций до &lt;n&gt;*1000 байт в минуту (по умолчанию: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Удалить все транзакции бумажника с возможностью восстановить эти части цепи блоков с помощью -rescan при запуске</translation>
@@ -2802,14 +2766,6 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Сбрасывать активность базы данных из памяти на диск каждые &lt;n&gt; мегабайт (по умолчанию: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>В этом режиме -genproclimit определяет, сколько блоков генерируется немедленно.</translation>
@@ -2818,10 +2774,6 @@ rpcpassword=%s
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Задать число потоков проверки скрипта (от %u до %d, 0=авто, &lt;0 = оставить столько ядер свободными, по умолчанию: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Задать лимит процессора, когда генерация работает (-1 = безлимитно, по умолчанию: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Это пре-релизная тестовая сборка - используйте на свой страх и риск - не используйте для добычи или торговых приложений</translation>
@@ -2830,10 +2782,6 @@ rpcpassword=%s
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Не удалось забиндиться на %s на этом компьютере. Возможно, Bitcoin Core уже запущен.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Использовать отдельный прокси SOCKS5 для соединения с участниками через скрытые сервисы Tor (по умолчанию: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: установлено очень большое значение -paytxfee. Это комиссия, которую вы заплатите при проведении транзакции.</translation>
@@ -2858,10 +2806,6 @@ rpcpassword=%s
         <source>(default: 1)</source>
         <translation>(по умолчанию: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(по умолчанию: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; может быть:</translation>
@@ -2890,10 +2834,6 @@ rpcpassword=%s
         <source>Debugging/Testing options:</source>
         <translation>Параметры отладки/тестирования:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Отключить безопасный режим, отклонить реальное событие безопасного режима (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Определить свой IP (по умолчанию: 1 при прослушивании и если не используется -externalip)</translation>
@@ -2922,6 +2862,10 @@ rpcpassword=%s
         <source>Error opening block database</source>
         <translation>Не удалось открыть БД блоков</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Ошибка: произошла неустранимая ошибка, детали в debug.log</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Ошибка: мало места на диске!</translation>
@@ -2930,66 +2874,10 @@ rpcpassword=%s
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Ошибка: бумажник заблокирован, невозможно создать транзакцию!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Ошибка: системная ошибка:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Не удалось начать прослушивание на порту. Используйте -listen=0 если вас это устраивает.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Не удалось прочитать информацию блока</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Не удалось прочитать блок</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Не удалось синхронизировать индекс блоков</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Не удалось записать индекс блоков</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Не удалось записать информацию блока</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Не удалось записать блок</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Не удалось записать информацию файла</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Не удалось записать БД монет</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Не удалось записать индекс транзакций</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Не удалось записать данные для отмены</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Принудительный безопасный режим (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Включить добычу монет (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Сколько блоков проверять при запуске (по умолчанию: 288, 0 = все)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Если &lt;category&gt; не предоставлена, выводить всю отладочную информацию.</translation>
@@ -3011,8 +2899,8 @@ rpcpassword=%s
         <translation>Недостаточно файловых дескрипторов.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Дописывать отметки времени к отладочному выводу (по умолчанию: 1)</translation>
+        <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>Rebuild block chain index from current blk000??.dat files</source>
@@ -3026,22 +2914,10 @@ rpcpassword=%s
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Задать максимальный размер блока в байтах (по умолчанию: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Задать число потоков выполнения(по умолчанию: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Укажите файл бумажника (внутри каталога данных)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Остановиться после импорта блоков с диска (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
@@ -3060,7 +2936,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation>Опции бумажника:</translation>
+        <translation>Настройки бумажника:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
@@ -3070,10 +2946,6 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Импортировать блоки из внешнего файла blk000??.dat</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(по умолчанию: 1, 1 = сохранять метаданные транзакции, например, владельца аккаунта и информацию запроса платежа, 2 = отбросить метаданные)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Разрешить подключения JSON-RPC с указанного источника. Разрешённые значения для &lt;ip&gt; — отдельный IP (например, 1.2.3.4), сеть/маска сети (например, 1.2.3.4/255.255.255.0) или сеть/CIDR (например, 1.2.3.4/24). Эту опцию можно использовать многократно</translation>
@@ -3110,10 +2982,6 @@ rpcpassword=%s
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Ошибка: обнаружен неподдерживаемый аргумент -socks. Выбор версии SOCKS более невозможен, поддерживаются только прокси SOCKS5.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Выполнить команду, когда транзакция из сети повторно тратит вход транзакции в бумажнике (%s=TxID транзакции сети, %t=TxID транзакции в бумажнике)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Выполнить команду, когда приходит соответствующее сообщение о тревоге или наблюдается очень длинное расщепление цепи (%s в команде заменяется на сообщение)</translation>
@@ -3126,14 +2994,6 @@ rpcpassword=%s
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Комиссии (в BTC/Кб) меньшие этого значения считаются нулевыми для создания транзакции (по умолчанию: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Выводить отладочную информацию (по умолчанию: 0, указание &lt;category&gt; необязательно)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
@@ -3150,18 +3010,10 @@ rpcpassword=%s
         <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>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Вносить в белый список участников, подключающихся с указанной маски сети или ip. Можно использовать многократно.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Участники из белого списка не могуть быть забанены за DoS, и их транзакции всегда транслируются, даже если они уже содержатся в памяти. Полезно, например, для шлюза.</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Всегда запрашивать адреса участников с помощью DNS (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Не удаётся разрешить адрес в параметре -whitebind: '%s'</translation>
@@ -3190,10 +3042,6 @@ rpcpassword=%s
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Комиссия (в BTC/Кб) для добавления к вашим транзакциям (по умолчанию: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Включать IP-адреса в отладочный вывод (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Информация</translation>
@@ -3223,24 +3071,8 @@ rpcpassword=%s
         <translation>Хранить максимум &lt;n&gt; несоединённых блоков в памяти (по умолчанию: %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Ограничить размер кэша подписей &lt;n&gt; записями (по умолчанию: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Записывать в лог приоритет транзакции и комиссию на килобайт во время добычи блоков (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Держать полный индекс транзакций (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Максимальный размер буфера приёма на соединение, &lt;n&gt;*1000 байт (по умолчанию: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Максимальный размер буфера отправки на соединение, &lt;n&gt;*1000 байт (по умолчанию: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Держать в памяти до &lt;n&gt; несвязных транзакций (по умолчанию: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3250,22 +3082,10 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>Параметры трансляции узла:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Принимать цепь блоков, только если она соответствует встроенным контрольным точкам (по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Подключаться только к узлам из сети &lt;net&gt; (IPv4, IPv6 или Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Печатать блок при запуске, если он найден в индексе блоков</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Печатать дерево блоков при запуске (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Параметры RPC SSL: (см. Bitcoin вики для инструкций по настройке SSL)</translation>
@@ -3282,30 +3102,10 @@ rpcpassword=%s
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Случайно разбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Транслировать и генерировать транзакции носители данных (по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Транслировать не-P2SH мультиподпись (по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Запустить поток для периодического сохранения бумажника (по умолчанию: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Минимальный размер блока в байтах (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Установить флаг DB_PRIVATE в окружении базы данных бумажника (по умолчанию: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Показать все отладочные параметры (использование: --help -help-debug)</translation>
@@ -3318,14 +3118,6 @@ rpcpassword=%s
         <source>Signing transaction failed</source>
         <translation>Не удалось подписать транзакцию</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Тайм-аут соединения в миллисекундах (по умолчанию: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Системная ошибка:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Это экспериментальное ПО.</translation>
@@ -3346,10 +3138,6 @@ rpcpassword=%s
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Невозможно привязаться к %s на этом компьютере (bind вернул ошибку %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Использовать UPnP для проброса порта (по умолчанию: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Использовать UPnP для проброса порта (по умолчанию: 1, если используется прослушивание)</translation>
@@ -3402,10 +3190,6 @@ rpcpassword=%s
         <source>Upgrade wallet to latest format</source>
         <translation>Обновить бумажник до последнего формата</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Установить размер запаса ключей в &lt;n&gt; (по умолчанию: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Перепроверить цепь блоков на предмет отсутствующих в бумажнике транзакций</translation>
@@ -3414,14 +3198,6 @@ rpcpassword=%s
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Использовать OpenSSL (https) для подключений JSON-RPC</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Файл серверного сертификата (по умолчанию: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Приватный ключ сервера (по умолчанию: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Эта справка</translation>
@@ -3438,6 +3214,10 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Ошибка загрузки wallet.dat: Бумажник поврежден</translation>
     </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(по умолчанию: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Ошибка при загрузке wallet.dat</translation>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index 793cbfa37761..7768288294a9 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Export zlyhal</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Nastala chyba pri pokuse uložiť zoznam adries do %1. Skúste znovu.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -179,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Peňaženka zašifrovaná</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Zadajte nové heslo k peňaženke.&lt;br/&gt;Prosím použite heslo s dĺžkou aspoň &lt;b&gt;10 alebo viac náhodných znakov&lt;/b&gt;, alebo &lt;b&gt;8 alebo viac slov&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin sa teraz ukončí pre dokončenie procesu šifrovania. Pamätaj že šifrovanie peňaženky Ťa nemôže úplne ochrániť pred kráďežou bitcoinov pomocou škodlivého software.</translation>
@@ -286,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Otvoriť &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klient</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importujem bloky z disku...</translation>
@@ -338,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Prijať</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Zobraziť informácie o Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>Zobraziť / skryť</translation>
@@ -374,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Lišta záložiek</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testovacia sieť]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Jadro Bitcoin</translation>
@@ -414,10 +426,6 @@
         <source>No block source available...</source>
         <translation>Nedostupný zdroj blokov...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Spracovaných %1 blokov transakčnej histórie.</translation>
-    </message>
     <message>
         <source>%1 and %2</source>
         <translation> %1 a  %2</translation>
@@ -863,15 +871,7 @@ Adresa: %4</translation>
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB dostupného voľného miesta</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(z %1GB potrebných)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1104,10 +1104,6 @@ Adresa: %4</translation>
         <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>Zobrazené informácie môžu byť neaktuápne. Vaša peňaženka sa automaticky synchronizuje so sieťou Bitcoin po nadviazaní spojenia ale tento proces ešte nieje ukončený.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Peňaženka</translation>
-    </message>
     <message>
         <source>Available:</source>
         <translation>Disponibilné:</translation>
@@ -1140,10 +1136,6 @@ Adresa: %4</translation>
         <source>Your current total balance</source>
         <translation>Váš súčasný celkový zostatok</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Nedávne transakcie&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>nesynchronizované</translation>
@@ -2389,26 +2381,10 @@ Adresa: %4</translation>
         <source>Options:</source>
         <translation>Možnosti:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Určiť súbor s nastaveniami (predvolené: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Určiť súbor pid (predvolené: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Určiť priečinok s dátami</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Načúvať spojeniam na &lt;port&gt; (prednastavené: 8333 alebo testovacia sieť: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Udržiavať maximálne &lt;n&gt; spojení (predvolené: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Pripojiť sa k nóde, získať adresy ďaľších počítačov v sieti a odpojit sa.</translation>
@@ -2417,18 +2393,6 @@ Adresa: %4</translation>
         <source>Specify your own public address</source>
         <translation>Určite vašu vlastnú verejnú adresu</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Hranica pre odpojenie zle sa správajúcich peerov (predvolené: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Počet sekúnd kedy sa zabráni zle sa správajúcim peerom znovupripojenie (predvolené: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Počúvať JSON-RPC spojeniam na &lt;port&gt; (predvolené: 8332 or testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Prijímať príkazy z príkazového riadku a JSON-RPC</translation>
@@ -2469,18 +2433,10 @@ Tiež sa odporúča nastaviť alertnotify aby ste boli upozorňovaní na problé
 napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Prijateľlné šifry (prednastavené: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Priebežne obmedzuj transakcie bez poplatku na &lt;n&gt;*1000 bajtov za minútu (prednastavené: 15)</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Vojsť do režimu regresného testovania, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené.</translation>
@@ -2497,14 +2453,6 @@ napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Odložiť aktivitu databázy spoločnej pamäti do logu na disku každých &lt;n&gt; megabajtov (prednastavené: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Ako dôkladne sú overované bloky -checkblocks (0-4, prednastavené: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>V tomto režime -getproclimit kontroluje koľko blokov sa vytvorí okamžite.</translation>
@@ -2513,10 +2461,6 @@ napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Nastaviť počeť vlákien overujúcich skripty (%u až %d, 0 = auto, &lt;0 = nechať toľkoto jadier voľných, prednastavené: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Nastaviť obmedzenie pre procesor keď je zapnuté generovanie (-1 = bez obmedzenia, prednastavené: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Toto je pred-testovacia verzia - použitie je na vlastné riziko - nepoužívajte na tvorbu bitcoin ani obchodovanie.</translation>
@@ -2525,10 +2469,6 @@ napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Nepodarilo sa pripojiť na %s na tomto počítači. Bitcoin Jadro je už pravdepodobne spustené.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Použite rozdielne SOCKS5 proxy pre dosiahnutie peer-ov cez Tor skryté služby (prednastavené: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varovanie: -paytxfee je nastavené veľmi vysoko. Toto sú transakčné poplatky ktoré zaplatíte ak odošlete transakciu.</translation>
@@ -2555,10 +2495,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>(default: 1)</source>
         <translation>(predvolené: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(predvolené: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; môže byť:</translation>
@@ -2587,10 +2523,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Debugging/Testing options:</source>
         <translation>Možnosti ladenia/testovania:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Vypnúť bezpečný režim, vypnúť udalosť skutočný bezpečný režim (prednastavené: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Zisti vlastnú IP adresu (predvolené: 1 pri počúvaní/listening a žiadnej -externalip)</translation>
@@ -2627,66 +2559,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Chyba: Peňaženka je zamknutá, nemôžem vytvoriť transakciu!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Chyba: systémová chyba:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Chyba počúvania na ktoromkoľvek porte. Použi -listen=0 ak toto chcete.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Zlyhalo čítanie info o bloku</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Zlyhalo čítanie bloku</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Zlyhalo synchronizovanie zoznamu blokov</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Zlyhalo zapisovanie do zoznamu blokov</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Zlyhal zápis info o bloku</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Zlyhal zápis bloku</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Zlyhalo zapisovanie informácié o súbore</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Zlyhalo zapisovanie do databázy coins</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Zlyhal zápis zoznamu transakcií</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Zlyhalo zapisovanie </translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Vnútiť bezpečný režim (prenastavené: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Vytvárať mince (predvolené: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Koľko blokov skontrolovať pri spustení (predvolené: 288, 0 = všetky)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Ak nie je uvedená &lt;category&gt;, na výstupe zobrazuj všetky informácie pre ladenie.</translation>
@@ -2707,10 +2583,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Not enough file descriptors available.</source>
         <translation>Nedostatok kľúčových slov súboru.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Na začiatok logu pre ladenie vlož dátum a čas (prednastavené: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Znovu vytvoriť zoznam blokov zo súčasných blk000??.dat súborov</translation>
@@ -2723,18 +2595,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Nastaviť najväčšiu veľkosť bloku v bytoch (predvolené: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Nastaviť množstvo vlákien na obsluhu RPC volaní (predvolené: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Označ súbor peňaženky (v priečinku s dátami)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Míňať nepotvrdený výdavok pri odosielaní (prednastavené: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Toto je mienené nástrojom pre regresné testovania a vývoj programu.</translation>
@@ -2771,10 +2635,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Vykonať príkaz keď po prijatí patričné varovanie alebo vidíme veľmi dlhé rozdvojenie siete (%s v cmd je nahradené správou)</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Výstup informácií pre ladenie (prednastavené: 0, uvádzanie &lt;category&gt; je voliteľné)</translation>
-    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Nastaviť najväčšiu veľkosť vysoká-dôležitosť/nízke-poplatky transakcií v bajtoch (prednastavené: %d)</translation>
@@ -2791,42 +2651,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neplatná suma pre -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Obmedziť veľkosť pomocnej pamäti pre podpisy na &lt;n&gt; vstupov (prednastavené: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Zaznamenávať dôležitosť transakcií a poplatky za kB ak hľadáme bloky (prednastavené: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Udržiavaj úplný zoznam transakcií (prednastavené: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximálna veľkosť prijímacieho zásobníka pre jedno spojenie, &lt;n&gt;*1000 bytov (predvolené: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximálna veľkosť vysielacieho zásobníka pre jedno spojenie, &lt;n&gt;*1000 bytov (predvolené: 1000)</translation>
-    </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Akceptuj iba kontrolné body zhodné s blockchain (prednastavené: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Pripájať sa len k nódam v sieti &lt;net&gt; (IPv4, IPv6 alebo Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Vytlač blok pri spustení, ak nájdený v zozname blokov</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Vytlačiť strom blokov pri spustení (prednastavené: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Možnosti RPC SSL: (Pozri v Bitcoin Wiki pokyny pre SSL nastavenie)</translation>
@@ -2843,22 +2671,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Náhodne premiešaj 1 z každých &lt;n&gt; sieťových správ</translation>
     </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Mať spustené vlákno pravidelného čístenia peňaženky (predvolené: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Nastaviť minimálnu veľkosť bloku v bytoch (predvolené: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Nastaví DB_PRIVATE možnosť v db prostredí peňaženky (prednastavené: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zobraziť všetky možnosti ladenia (použitie: --help --help-debug)</translation>
@@ -2871,14 +2687,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Signing transaction failed</source>
         <translation>Podpísanie správy zlyhalo</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Určiť aut spojenia v milisekundách (predvolené: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systémová chyba:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Suma transakcie príliš malá</translation>
@@ -2891,10 +2699,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Transaction too large</source>
         <translation>Transakcia príliš veľká</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Skúsiť použiť UPnP pre mapovanie počúvajúceho portu (default: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Skúsiť použiť UPnP pre mapovanie počúvajúceho portu (default: 1 when listening)</translation>
@@ -2935,10 +2739,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Upgrade wallet to latest format</source>
         <translation>Aktualizuj peňaženku na najnovší formát.</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Nastaviť zásobu adries na &lt;n&gt; (predvolené: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Znovu skenovať reťaz blokov pre chýbajúce transakcie</translation>
@@ -2947,14 +2747,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Použiť OpenSSL (https) pre JSON-RPC spojenia</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Súbor s certifikátom servra (predvolené: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Súkromný kľúč servra (predvolené: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Táto pomocná správa</translation>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index f615d3134313..ed6f813e7da9 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -330,6 +330,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Sprejmi</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Pokaži informacije o Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Prikaži / Skrij</translation>
@@ -362,10 +366,6 @@
         <source>Tabs toolbar</source>
         <translation>Orodna vrstica zavihkov</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Jedro Bitcoina</translation>
@@ -402,6 +402,10 @@
         <source>%n week(s)</source>
         <translation><numerusform>%n teden</numerusform><numerusform>%n tedna</numerusform><numerusform>%n tedni</numerusform><numerusform>%n tednov</numerusform></translation>
     </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation>%1 in %2</translation>
+    </message>
     <message numerus="yes">
         <source>%n year(s)</source>
         <translation><numerusform>%n leto</numerusform><numerusform>%n leti</numerusform><numerusform>%n leta</numerusform><numerusform>%n let</numerusform></translation>
@@ -500,6 +504,18 @@ Naslov: %4
         <source>Change:</source>
         <translation>Sprememba:</translation>
     </message>
+    <message>
+        <source>(un)select all</source>
+        <translation>(ne)izberi vse</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Drevo</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Seznam</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Količina</translation>
@@ -540,6 +556,14 @@ Naslov: %4
         <source>Copy transaction ID</source>
         <translation>Kopiraj ID transakcije</translation>
     </message>
+    <message>
+        <source>Lock unspent</source>
+        <translation>Zakleni neporabljeno</translation>
+    </message>
+    <message>
+        <source>Unlock unspent</source>
+        <translation>Odkleni neporabljeno</translation>
+    </message>
     <message>
         <source>Copy quantity</source>
         <translation>Kopiraj količino</translation>
@@ -556,6 +580,14 @@ Naslov: %4
         <source>Copy priority</source>
         <translation>Kopiraj prednostno mesto</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiraj prah</translation>
+    </message>
+    <message>
+        <source>Copy change</source>
+        <translation>Kopiraj drobiž</translation>
+    </message>
     <message>
         <source>highest</source>
         <translation>najvišja</translation>
@@ -596,6 +628,14 @@ Naslov: %4
         <source>(%1 locked)</source>
         <translation>(%1 zaklenjeno)</translation>
     </message>
+    <message>
+        <source>none</source>
+        <translation>Nič</translation>
+    </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Se lahko razlikuje +/- %1 satošijev na vnos.</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>da</translation>
@@ -608,11 +648,31 @@ Naslov: %4
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>V primeru, da je velikost transakcije večja od 1000 bitov, se ta oznaka se obarva rdeče.</translation>
     </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</source>
+        <translation>Se lahko razlikuje +/- 1 byte na vnos.</translation>
+    </message>
+    <message>
+        <source>Transactions with higher priority are more likely to get included into a block.</source>
+        <translation>Transakcije z višjo prioriteto imajo boljše možnosti za vključitev v blok.</translation>
+    </message>
+    <message>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Oznaka se obarva rdeče, kadar je prioriteta manjša od "srednje".</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(ni oznake)</translation>
     </message>
-    </context>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation>drobiž od %1 (%2)</translation>
+    </message>
+    <message>
+        <source>(change)</source>
+        <translation>(drobiž)</translation>
+    </message>
+</context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -627,6 +687,10 @@ Naslov: %4
         <source>The label associated with this address list entry</source>
         <translation>Oznaka je povezana s tem vnosom seznama naslovov</translation>
     </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation>Naslov povezan s tem vnosom seznama naslovov. Sprememba je mogoča le za naslove namenjene pošiljanju.</translation>
+    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Naslov</translation>
@@ -662,11 +726,27 @@ Naslov: %4
 </context>
 <context>
     <name>FreespaceChecker</name>
+    <message>
+        <source>A new data directory will be created.</source>
+        <translation>Ustvarjena bo nova mapa za shranjevanje podatkov.</translation>
+    </message>
     <message>
         <source>name</source>
         <translation>ime</translation>
     </message>
-    </context>
+    <message>
+        <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+        <translation>Mapa že obstaja. Dodaj %1, če tu želiš ustvariti novo mapo.</translation>
+    </message>
+    <message>
+        <source>Path already exists, and is not a directory.</source>
+        <translation>Pot že obstaja, vendar ni mapa.</translation>
+    </message>
+    <message>
+        <source>Cannot create data directory here.</source>
+        <translation>Na tem mestu ne moreš ustvariti nove mape.</translation>
+    </message>
+</context>
 <context>
     <name>HelpMessageDialog</name>
     <message>
@@ -677,6 +757,10 @@ Naslov: %4
         <source>version</source>
         <translation>različica</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
     <message>
         <source>About Bitcoin Core</source>
         <translation>O jedru Bitcoina</translation>
@@ -705,7 +789,19 @@ Naslov: %4
         <source>Start minimized</source>
         <translation>Zaženi pomanjšano</translation>
     </message>
-    </context>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Nastavi korenske SSL certifikate za plačilni zahtevek (privzeto: -system-)</translation>
+    </message>
+    <message>
+        <source>Show splash screen on startup (default: 1)</source>
+        <translation>Ob zagonu prikaži uvodni zaslon (privzeto: 1)</translation>
+    </message>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation>Ob zagonu izberi mapo za shranjevanje podatkov (privzeto: 0)</translation>
+    </message>
+</context>
 <context>
     <name>Intro</name>
     <message>
@@ -716,17 +812,33 @@ Naslov: %4
         <source>Welcome to Bitcoin Core.</source>
         <translation>Dobrodošli v jedru Bitcoina</translation>
     </message>
+    <message>
+        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
+        <translation>Program poganjaš prvič. Izberi kje bo Bitcoin Core shranjeval svoje podatke.</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+        <translation>Bitcoin Core bo prenesel in shranil kopijo Bitcoin verige blokov. V izbrano mapo bo shranjenih vsaj %1 GB podatkov, ta količina pa bo sčasoma še naraščala. Denarnica bo prav tako shranjena v to mapo.</translation>
+    </message>
+    <message>
+        <source>Use the default data directory</source>
+        <translation>Uporabi privzeto mapo za shranjevanje podatkov.</translation>
+    </message>
+    <message>
+        <source>Use a custom data directory:</source>
+        <translation>Uporabi to mapo za shranjevanje podatkov:</translation>
+    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Jedro Bitcoina</translation>
     </message>
     <message>
-        <source>Error</source>
-        <translation>Napaka</translation>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Napaka: Ne morem ustvariti mape "%1".</translation>
     </message>
     <message>
-        <source>GB of free space available</source>
-        <translation>GB prostora na voljo</translation>
+        <source>Error</source>
+        <translation>Napaka</translation>
     </message>
     </context>
 <context>
@@ -743,7 +855,15 @@ Naslov: %4
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
-    </context>
+    <message>
+        <source>Select payment request file</source>
+        <translation>Izberi datoteko plačilnega zahtevka</translation>
+    </message>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation>Izberi datoteko plačilnega zahtevka</translation>
+    </message>
+</context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -754,6 +874,10 @@ Naslov: %4
         <source>&amp;Main</source>
         <translation>&amp;Glavno</translation>
     </message>
+    <message>
+        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
+        <translation>Neobvezna pristojbina k transakciji poskrbi, da je transackcija hitro opravljena. Velikost povprečne transakcije je 1 kB.</translation>
+    </message>
     <message>
         <source>Pay transaction &amp;fee</source>
         <translation>Nakazilo plačila &amp; provizija</translation>
@@ -766,10 +890,38 @@ Naslov: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Zaženi Bitcoin ob prijavi v sistem</translation>
     </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Velikost lokalne zbirke &amp;podatkovne baze</translation>
+    </message>
     <message>
         <source>MB</source>
         <translation>megabite</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Sprejmi povezave od zunaj</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Dovoli prihajajoče povezave</translation>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>V Bitcoin omrežje se poveži skozu SOCKS proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
+        <translation>&amp;Poveži se skozi SOCKS proxy (privzet proxy):</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>IP naslov proxy strežnika (npr. IPv4: 127.0.0.1 ali IPv6: ::1)</translation>
+    </message>
+    <message>
+        <source>&amp;Reset Options</source>
+        <translation>&amp;Opcije resetiranja</translation>
+    </message>
     <message>
         <source>&amp;Network</source>
         <translation>&amp;Omrežje</translation>
@@ -782,6 +934,10 @@ Naslov: %4
         <source>Expert</source>
         <translation>Poznavalec</translation>
     </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>Omogoči Coin &amp; Control funkcijo</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>Avtomatično odpri vrata Bitcoin odjemalca na usmerjevalniku. To deluje samo, če vaš usmerjevalnik podpira UPnP in je omogočen.</translation>
@@ -850,6 +1006,10 @@ Naslov: %4
         <source>default</source>
         <translation>privzeto</translation>
     </message>
+    <message>
+        <source>none</source>
+        <translation>Nič</translation>
+    </message>
     </context>
 <context>
     <name>OverviewPage</name>
@@ -862,8 +1022,8 @@ Naslov: %4
         <translation>Prikazanim podatkom je lahko potekel rok. Vaša denarnica bo po vzpostavitvi povezave samodejno sinhronizirana z Bitcoin omrežjem, ampak ta proces še ni bil zaključen.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Denarnica</translation>
+        <source>Watch-only:</source>
+        <translation>Samo gledanje</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -885,10 +1045,6 @@ Naslov: %4
         <source>Your current total balance</source>
         <translation>Vaše trenutno skupno stanje</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Nedavne transakcije&lt;/&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>iz sinhronizacije</translation>
@@ -1104,14 +1260,6 @@ Naslov: %4
         <source>never</source>
         <translation>nikoli</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Da</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Ne</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Neznano</translation>
@@ -1348,6 +1496,10 @@ Naslov: %4
         <source>Copy priority</source>
         <translation>Kopiraj prednostno mesto</translation>
     </message>
+    <message>
+        <source>Copy change</source>
+        <translation>Kopiraj drobiž</translation>
+    </message>
     <message>
         <source>or</source>
         <translation>ali</translation>
@@ -1372,6 +1524,10 @@ Naslov: %4
         <source>(no label)</source>
         <translation>(ni oznake)</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiraj prah</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Ali ste prepričani, da želite poslati?</translation>
@@ -1922,26 +2078,10 @@ Naslov: %4
         <source>Options:</source>
         <translation>Možnosti:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Določi datoteko z nastavitvami (privzeta: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Določi pid datoteko (privzeta: bitcoin.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Določi podatkovni imenik</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Sprejmi povezave na &lt;port&gt; (privzeta vrata: 8333 ali testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Obdrži maksimalno število &lt;n&gt; povezav (privzeto: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Povežite se z vozliščem za pridobitev naslovov uporabnikov in nato prekinite povezavo.</translation>
@@ -1950,14 +2090,6 @@ Naslov: %4
         <source>Specify your own public address</source>
         <translation>Določite vaš lasten javni naslov</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Prag za prekinitev povezav s slabimi odjemalci (privzeto: 1000)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Število sekund za težavo pri vzpostavitvi povezave med uporabniki (privzeto: 86400)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Sprejmi ukaze iz ukazne vrstice in JSON-RPC</translation>
@@ -1986,10 +2118,6 @@ Naslov: %4
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>To je pred izdana poizkusna verzija - uporaba na lastno odgovornost - ne uporabljajte je za rudarstvo ali trgovske aplikacije</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Za doseg soležnikov preko Tor skritih storitev uporabi ločen SOCKS5 proxy (privzeto: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Opozorilo: napaka pri branju wallet.dat! Vsi ključi so bili pravilno prebrani, podatki o transakciji ali imenik vnešenih naslovov so morda izgubljeni ali nepravilni.</translation>
@@ -1998,13 +2126,9 @@ Naslov: %4
         <source>(default: 1)</source>
         <translation>(privzeto: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(privzeto: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation>&lt;kategorija&gt; je lahko:</translation>
+        <translation>&lt;category&gt; je lahko:</translation>
     </message>
     <message>
         <source>Block creation options:</source>
@@ -2018,22 +2142,6 @@ Naslov: %4
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Opozorilo: Denarnica je zaklenjena, ni mogoče opraviti transkacijo! </translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Napaka: sistemska napaka:</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Zapisovanje informacij o datoteki neuspešno</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Neuspešno zapisovanje na bazi podatkov kovancev</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Ustvari kovance (privzeto: 0)</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Uvažam...</translation>
@@ -2050,10 +2158,6 @@ Naslov: %4
         <source>Signing transaction failed</source>
         <translation>Podpisovanje transakcije spodletelo</translation>
     </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sistemska napaka:</translation>
-    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Količina transakcije je pramajhna</translation>
@@ -2094,10 +2198,6 @@ Naslov: %4
         <source>Upgrade wallet to latest format</source>
         <translation>Posodobi denarnico v najnovejši zapis</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Nastavi velikost ključa bazena na &lt;n&gt; (privzeto: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Ponovno preglej verigo blokov za manjkajoče transakcije denarnice</translation>
@@ -2106,14 +2206,6 @@ Naslov: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Uporabi OpenSSL (https) za JSON-RPC povezave</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Datoteka potrdila strežnika (privzeta: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Zasebni ključ strežnika (privzet: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>To sporočilo pomoči</translation>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index f779e391c029..0c60e482fe63 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -162,10 +162,6 @@
         <source>Tabs toolbar</source>
         <translation>Shiriti i mjeteve</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testo rrjetin]</translation>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>I azhornuar</translation>
@@ -281,10 +277,6 @@
         <source>Form</source>
         <translation>Formilarë</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Transaksionet e fundit&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index f5723efece37..c3dc42e2f31b 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -218,10 +218,6 @@
         <source>Tabs toolbar</source>
         <translation>Трака са картицама</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Up to date</source>
         <translation>Ажурно</translation>
@@ -329,6 +325,10 @@ Address: %4
         <source>version</source>
         <translation>верзија</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>O Bitcoin Coru</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Korišćenje:</translation>
@@ -361,14 +361,6 @@ Address: %4
         <source>Form</source>
         <translation>Форма</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>новчаник</translation>
-    </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Недавне трансакције&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
@@ -762,27 +754,10 @@ Address: %4
         <source>Options:</source>
         <translation>Opcije</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Potvrdi željeni konfiguracioni fajl (podrazumevani:bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Konkretizuj pid fajl (podrazumevani: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Gde je konkretni data direktorijum </translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Slušaj konekcije na &lt;port&gt; (default: 8333 or testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Održavaj najviše &lt;n&gt; konekcija  po priključku (default: 125)
-</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Prihvati komandnu liniju i JSON-RPC komande</translation>
@@ -803,10 +778,6 @@ Address: %4
         <source>Password for JSON-RPC connections</source>
         <translation>Lozinka za JSON-RPC konekcije</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Odredi veličinu zaštićenih ključeva na &lt;n&gt; (default: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Ponovo skeniraj lanac blokova za nedostajuće transakcije iz novčanika</translation>
@@ -815,10 +786,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Koristi OpenSSL (https) za  JSON-RPC konekcije</translation>
     </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>privatni ključ za Server (podrazumevan: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Ova poruka Pomoći</translation>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 8e771c5ce7db..39cca4b27876 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -391,10 +391,6 @@ Var vänlig och försök igen.</translation>
         <source>Tabs toolbar</source>
         <translation>Verktygsfält för Tabbar</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Kärna</translation>
@@ -435,10 +431,6 @@ Var vänlig och försök igen.</translation>
         <source>No block source available...</source>
         <translation>Ingen block-källa tillgänglig...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Bearbetat %1 block i transaktionshistoriken.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n timme</numerusform><numerusform>%n timmar</numerusform></translation>
@@ -913,15 +905,7 @@ Adress: %4
         <source>Error</source>
         <translation>Fel</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB ledigt utrymme är tillgängligt</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(av %1GB behövs)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1162,10 +1146,6 @@ Adress: %4
         <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>Den visade informationen kan vara inaktuell. Plånboken synkroniseras automatiskt med Bitcoin-nätverket efter att anslutningen är upprättad, men denna process har inte slutförts ännu.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Plånbok</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Granska-bara:</translation>
@@ -1218,10 +1198,6 @@ Adress: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Nuvarande total balans i granska-bara adresser</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Nyligen genomförda transaktioner&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>osynkroniserad</translation>
@@ -1481,10 +1457,6 @@ Adress: %4
         <source>Services</source>
         <translation>Tjänster</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Syncnod</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Starthöjd</translation>
@@ -1613,14 +1585,6 @@ Adress: %4
         <source>Outbound</source>
         <translation>Utgående</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Ja</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Nej</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Okänd</translation>
@@ -2465,6 +2429,10 @@ Adress: %4
         <source>Mined</source>
         <translation>Genererade</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>granska-bara</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -2691,26 +2659,10 @@ Adress: %4
         <source>Options:</source>
         <translation>Inställningar:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Ange konfigurationsfil (förvalt: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Ange pid fil (förvalt: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Ange katalog för data</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Lyssna efter anslutningar på &lt;port&gt; (förvalt: 8333 eller testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Ha som mest &lt;n&gt; anslutningar till andra klienter (förvalt: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Anslut till en nod för att hämta klientadresser, och koppla från</translation>
@@ -2719,18 +2671,6 @@ Adress: %4
         <source>Specify your own public address</source>
         <translation>Ange din egen publika adress</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Tröskelvärde för att koppla ifrån klienter som missköter sig (förvalt: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Lyssna på JSON-RPC-anslutningar på &lt;port&gt; (förvalt: 8332 eller testnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Tillåt kommandon från kommandotolken och JSON-RPC-kommandon</translation>
@@ -2771,18 +2711,10 @@ Det är också rekommenderat att sätta alertnotify så du meddelas om problem;
 till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Accepterade krypteringsalgoritmer  (förvalt: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind till given adress och lyssna alltid på den. Använd [värd]:port notation för IPv6</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Antalsbegränsa kontinuerligt fria transaktioner till &lt;n&gt;*1000 bytes per minut (förvalt:15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Ta bort alla plånbokstransaktioner och återskapa bara dom som är en del av blockkedjan genom att ange -rescan vid uppstart</translation>
@@ -2803,14 +2735,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Töm databasens minnespool till disk varje &lt;n&gt; megabytes (förvalt: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Hur grundlig blockverifikationen vid -checkblocks är (0-4, förvalt: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>I denna mode kontrollerar -genproclimit hur många block som genereras på en gång.</translation>
@@ -2819,10 +2743,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Ange antalet skriptkontrolltrådar (%u till %d, 0 = auto, &lt;0 = lämna så många kärnor lediga, förval: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Sätt processorbegränsning när blockgenereringen är på (-1 = obegränsad, förvalt: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Detta är ett förhands testbygge - använd på egen risk - använd inte för mining eller handels applikationer</translation>
@@ -2831,10 +2751,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Det går inte att binda till %s på den här datorn. Bitcoin Core är förmodligen redan igång.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Använd separat SOCKS5 proxy för att nå kollegor via dolda tjänster i Tor (default: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion.</translation>
@@ -2859,10 +2775,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>(default: 1)</source>
         <translation>(förvalt: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(förvalt: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; Kan vara:</translation>
@@ -2891,10 +2803,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Avlusnings/Testnings optioner:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Avaktivera säkert läge. Åsidosätt en riktigt säkert läge händelse (förvalt: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Hitta egen IP-adress (förvalt: 1 under lyssning och utan -externalip)</translation>
@@ -2931,66 +2839,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Fel: Plånboken är låst, det går ej att skapa en transaktion!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Fel: systemfel:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Misslyckades att lyssna på någon port. Använd -listen=0 om du vill detta.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Misslyckades att läsa blockinformation</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Misslyckades att läsa blocket</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Misslyckades att synkronisera blockindex</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Misslyckades att skriva blockindex</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Misslyckades att skriva blockinformation</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Misslyckades att skriva blocket</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Misslyckades att skriva filinformation</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Misslyckades att skriva till myntdatabas</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Misslyckades att skriva transaktionsindex</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Misslyckades att skriva ångradata</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Tvångskör i säkert läge (förvalt: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generera mynt (förvalt: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Hur många block att kontrollera vid uppstart (standardvärde: 288, 0 = alla)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Om &lt;category&gt; inte anges, skrivs all avlusningsinformation ut.</translation>
@@ -3011,10 +2863,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>Inte tillräckligt med filbeskrivningar tillgängliga.</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Skriv ut tidsstämpel i avlusningsinformationen (förvalt: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer</translation>
@@ -3027,22 +2875,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Sätt maximal blockstorlek i byte (förvalt: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Ange antalet trådar för att hantera RPC anrop (standard: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Ange plånboksfil (inom datakatalogen)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Spendera okonfirmerad växel när transaktioner sänds (förvalt: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Sluta köra efter importen av block från disk är klar (förvalt: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Detta är avsett för regressionstestningsverktyg och applikationsutveckling.</translation>
@@ -3071,10 +2907,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importerar block från extern blk000??.dat fil</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(förvalt: 1, 1 = spara tx metadata t.ex. kontoägare och betalningsbegäransinformation, 2 = släng tx metadata)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Tillåt JSON-RPC anslutningar från specifik kalla. Tillåtet för &lt;ip&gt; är enkel IP (t.ex 1.2.3.4), en nätverk/nätmask (t.ex. 1.2.3.4/255.255.255.0) eller ett nätverk/CIDR (t.ex. 1.2.3.4/24). Denna option kan specificeras flera gånger</translation>
@@ -3111,10 +2943,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Fel: Argumentet -socks stöds inte. Att sätta SOCKS version är inte möjligt längre. Endast SOCKS5 proxy stöds.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Kör kommando när en nätverks tx återspenderar plånbokens tx input (%s=återspendera TxID, %t=plånbok TxID)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Exekvera kommando när ett relevant meddelande är mottagen eller när vi ser en väldigt lång förgrening (%s i cmd är utbytt med ett meddelande)</translation>
@@ -3127,14 +2955,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Avgifter (i BTC/Kb) mindre än detta betraktas som nollavgift för transaktionsskapande (förvalt: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Om paytxfee inte är satt, inkludera tillräcklig avgift så att transaktionen konfirmeras inom n blocks (förvalt: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Skriv ut avlusningsinformation (förvalt: 0, att ange &lt;category&gt; är frivilligt)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
@@ -3151,18 +2971,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer Bitcoin Core inte att fungera korrekt.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Vitlista klienter som ansluter från angivna nätmasker eller ip adresser. Kan specificeras flera gånger.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Vitlistade klienter kan inte bli DoS bannade och deras transaktioner reläas alltid, även om dom redan är i mempoolen, användbart för t.ex en gateway  </translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Sök alltid efter klientadresser med DNS sökningen (förvalt: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan inte matcha -whitebind adress: '%s'</translation>
@@ -3191,10 +3003,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Avgift (i BTC/Kb) att lägga till på transaktioner du skickar (förvalt: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Inkludera IP-adresser i debugutskrift (förvalt: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Information</translation>
@@ -3223,26 +3031,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Håll som mest &lt;n&gt; oanslutningsbara block i minnet (förvalt: %u)</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Begränsa signaturcachestorleken till &lt;n&gt; poster (förvalt: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Logga transaktionsprioritet och avgift per kB vid blockbrytning (förvalt: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Upprätthåll ett fullständigt transaktionsindex (förval: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximal buffert för mottagning per anslutning, &lt;n&gt;*1000 byte (förvalt: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximal buffert för sändning per anslutning, &lt;n&gt;*1000 byte (förvalt: 5000)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Port måste anges med -whitelist: '%s'</translation>
@@ -3251,22 +3039,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Nodreläoptioner:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Acceptera bara blockkedjans matchande inbyggda kontrollpunkter (förvalt: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Anslut enbart till noder i nätverket &lt;net&gt; (IPv4, IPv6 eller Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Skriv ut block vid uppstart, om det hittas i blockindexet</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Skriv ut blockträdet vid uppstart (förvalt: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL optioner: (se Bitcoin Wiki för SSL inställningsinstruktioner)</translation>
@@ -3283,30 +3059,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Slupmässigt brus 1 gång varje &lt;n&gt; nätverksmeddelande</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Reläa och bearbeta databärartransaktioner (förvalt: 1) </translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>Reläa icke P2SH multisig (förvalt: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Kör en tråd för att tömma plånboken periodiskt (förvalt: 1)</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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Sätt minsta blockstorlek i byte (förvalt: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Sätt DB_PRIVATE flaggan i plånbokens databasmiljö (förvalt: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Visa alla avlusningsoptioner (använd: --help -help-debug)</translation>
@@ -3319,14 +3075,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Signering av transaktion misslyckades</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Ange timeout för uppkoppling i millisekunder (förvalt: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Systemfel:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Detta är experimentmjukvara.</translation>
@@ -3347,10 +3095,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 1 under lyssning)</translation>
@@ -3403,10 +3147,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Uppgradera plånboken till senaste formatet</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Sätt storleken på nyckelpoolen till &lt;n&gt; (förvalt: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Sök i blockkedjan efter saknade plånboks transaktioner</translation>
@@ -3415,14 +3155,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Använd OpenSSL (https) för JSON-RPC-anslutningar</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serverns certifikatfil (förvalt: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Serverns privata nyckel (förvalt: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Det här hjälp medelandet</translation>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index cb52be61b295..e4b1e069cd10 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -162,10 +162,6 @@
         <source>Tabs toolbar</source>
         <translation>แถบเครื่องมือ</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ที่ใช้งานการเชื่อมต่อกับเครือข่าย Bitcoin</numerusform></translation>
@@ -277,10 +273,6 @@
         <source>Form</source>
         <translation>รูป</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;รายการทำธุรกรรมล่าสุด&lt;/b&gt;</translation>
-    </message>
     </context>
 <context>
     <name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index b2a14c92fc4f..b5d00bc24ed7 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>Sekme araç çubuğu</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Çekirdeği</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>Hiçbir blok kaynağı mevcut değil...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Muamele tarihçesinde %1 blok işlendi.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n saat</numerusform><numerusform>%n saat</numerusform></translation>
@@ -486,6 +478,10 @@
         <source>Up to date</source>
         <translation>Güncel</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Muamele tarihçesinden %n blok işlendi</numerusform><numerusform>Muamele tarihçesinden %n blok işlendi</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Aralık kapatılıyor...</translation>
@@ -916,13 +912,13 @@ Adres: %4
         <source>Error</source>
         <translation>Hata</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB boş alan mevcuttur</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB boş alan mevcuttur</numerusform><numerusform>%n GB boş alan mevcuttur</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(gereken boyut: %1GB)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(gereken %n GB alandan)</numerusform><numerusform>(gereken %n GB alandan)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -1165,10 +1161,6 @@ Adres: %4
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
         <translation>Görüntülenen veriler zaman aşımına uğramış olabilir. Bağlantı kurulduğunda cüzdanınız otomatik olarak şebeke ile eşleşir ancak bu işlem henüz tamamlanmamıştır.</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>Cüzdan</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>Sadece-izlenen:</translation>
@@ -1197,6 +1189,10 @@ Adres: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Oluşturulan bakiye henüz olgunlaşmamıştır</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Bakiyeler</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Toplam:</translation>
@@ -1209,6 +1205,14 @@ Adres: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Sadece izlenen adreslerdeki güncel bakiyeniz</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Harcanabilir:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Son muameleler</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Sadece izlenen adreslere gelen teyit edilmemiş muameleler</translation>
@@ -1221,10 +1225,6 @@ Adres: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>Sadece izlenen adreslerdeki güncel toplam bakiye</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Son muameleler&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>eşleşme dışı</translation>
@@ -1484,10 +1484,6 @@ Adres: %4
         <source>Services</source>
         <translation>Servisler</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>Eşleşme Düğümü</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>Başlama Yüksekliği</translation>
@@ -1616,14 +1612,6 @@ Adres: %4
         <source>Outbound</source>
         <translation>Giden</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>Evet</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>Hayır</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>Bilinmiyor</translation>
@@ -2472,6 +2460,10 @@ Adres: %4
         <source>Mined</source>
         <translation>Madenden çıkarılan</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>sadece-izlenen</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(mevcut değil)</translation>
@@ -2488,6 +2480,10 @@ Adres: %4
         <source>Type of transaction.</source>
         <translation>Muamele türü.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Bu muamelede sadece izlenen bir adresin bulunup bulunmadığı.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Muamelenin alıcı adresi.</translation>
@@ -2583,6 +2579,10 @@ Adres: %4
         <source>Export Transaction History</source>
         <translation>Muamele tarihçesini dışa aktar</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Sadece izlenen</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Dışa aktarım başarısız oldu</translation>
@@ -2698,26 +2698,10 @@ Adres: %4
         <source>Options:</source>
         <translation>Seçenekler:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Yapılandırma dosyası belirt (varsayılan: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Pid dosyası belirt (varsayılan: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Veri dizinini belirt</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Bağlantılar için dinlenecek &lt;port&gt; (varsayılan: 8333 ya da testnet: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Eşler ile en çok &lt;n&gt; adet bağlantı kur (varsayılan: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Eş adresleri elde etmek için bir düğüme bağlan ve ardından bağlantıyı kes</translation>
@@ -2726,18 +2710,6 @@ Adres: %4
         <source>Specify your own public address</source>
         <translation>Kendi genel adresinizi tanımlayın</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Aksaklık gösteren eşlerle bağlantıyı kesme sınırı (varsayılan: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Aksaklık gösteren eşlerle yeni bağlantıları engelleme süresi, saniye olarak (varsayılan: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>JSON-RPC bağlantılarını &lt;port&gt; üzerinde dinle (varsayılan: 8332 veya tesnet: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Komut satırı ve JSON-RPC komutlarını kabul et</translation>
@@ -2778,18 +2750,10 @@ Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye
 mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Kabul edilebilir şifreler (varsayılan: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Belirtilen adrese bağlan ve daima ondan dinle. IPv6 için [makine]:port yazımını kullanınız</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Devamlı olarak ücretsiz muameleleri dakikada &lt;n&gt;*1000 bayt olarak sınırla (varsayılan: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Tüm cüzdan muamelelerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation>
@@ -2810,14 +2774,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Veritabanı etkinliğini bellekten disk kütüğüne her &lt;n&gt; megabaytta aktar (varsayılan: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>-checkblocks'un blok kontrolünün ne kadar kapsamlı olacağı (0 ilâ 4, varsayılan: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Bu kipte -genproclimit kaç sayıda bloğun anında oluşturulduğunu kontrol eder.</translation>
@@ -2826,10 +2782,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Betik kontrolü iş parçacıklarının sayısını belirler (%u ilâ %d, 0 = otomatik, &lt;0 = bu sayıda çekirdeği kullanma, varsayılan: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Oluşturma etkinken işlemci sınırını belirler (-1 = sınırsız, varsayılan: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Bu yayın öncesi bir deneme sürümüdür - tüm riski siz üstlenmiş olursunuz - bitcoin oluşturmak ya da ticari uygulamalar için kullanmayınız</translation>
@@ -2838,10 +2790,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>Bu bilgisayarda %s unsuruna bağlanılamadı. Bitcoin Çekirdeği muhtemelen hâlihazırda çalışmaktadır.</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Eşlere gizli Tor servisleri ile ulaşmak için ayrı SOCKS5 vekil sunucusu kullan (varsayılan: -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Uyarı: -paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir.</translation>
@@ -2863,12 +2811,12 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Uyarı: wallet.dat bozuk, veriler geri kazanıldı! Özgün wallet.dat, wallet.{zamandamgası}.bak olarak %s klasörüne kaydedildi; bakiyeniz ya da muameleleriniz yanlışsa bir yedeklemeden tekrar yüklemeniz gerekir.</translation>
     </message>
     <message>
-        <source>(default: 1)</source>
-        <translation>(varsayılan: 1)</translation>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Belirtilen ağ maskesi ya da IP adresinden bağlanan eşleri beyaz listeye al. Birden fazla kez belirtilebilir.</translation>
     </message>
     <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(varsayılan: wallet.dat)</translation>
+        <source>(default: 1)</source>
+        <translation>(varsayılan: 1)</translation>
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
@@ -2898,10 +2846,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Debugging/Testing options:</source>
         <translation>Hata ayıklama/deneme seçenekleri:</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Güvenli kipi devre dışı bırak, gerçek bir güvenli olayı geçersiz kıl (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Kendi IP adresini keşfet (varsayılan: dinlenildiğinde ve -externalip yoksa 1)</translation>
@@ -2930,6 +2874,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Blok veritabanının açılışı sırasında hata</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Hata: Ölümcül dahili bir hata meydana geldi, ayrıntılar için debug.log dosyasına bakınız</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Hata: Disk alanı düşük!</translation>
@@ -2938,66 +2886,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Hata: Cüzdan kilitli, muamele oluşturulamadı!</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>Hata: sistem hatası:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Herhangi bir portun dinlenmesi başarısız oldu. Bunu istiyorsanız -listen=0 seçeneğini kullanınız.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>Blok verileri okunamadı</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>Blok okunamadı</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>Blok indeksi eşleştirilemedi</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>Blok indeksi yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>Blok verileri yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>Blok yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>Dosya verileri yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>Madenî para veritabanına yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>Muamele indeksi yazılamadı</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>Geri alma verilerinin yazılamadı</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Güvenli kipi zorla (varsayılan: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Bitcoin oluştur (varsayılan: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Başlangıçta kontrol edilecek blok sayısı (varsayılan: 288, 0 = hepsi)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>&lt;kategori&gt; sağlanmamışsa tüm hata ayıklama verilerini dök.</translation>
@@ -3019,8 +2911,8 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Kafi derecede dosya tanımlayıcıları mevcut değil.</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Hata ayıklama verilerinin önüne zaman damgası ekle (varsayılan: 1)</translation>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Sadece &lt;net&gt; şebekesindeki düğümlere bağlan (ipv4, ipv6 veya onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -3034,26 +2926,18 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Azami blok boyutunu bayt olarak ayarla (varsayılan: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>RPC aramaları için iş parçacığı sayısını belirle (varsayılan: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>Cüzdan dosyası belirtiniz (veri klasörünün içinde)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gönderme muamelelerinde teyit edilmemiş para üstünü harca (varsayılan: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>Diskten blokları içeri aktardıktan sonra çalışmayı durdur (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Bu, regresyon deneme araçları ve uygulama geliştirmesi için tasarlanmıştır. </translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Dinleme portunu haritalamak için UPnP kullan (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Bloklar kontrol ediliyor...</translation>
@@ -3078,10 +2962,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Harici blk000??.dat dosyasından blokları içe aktarır</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(varsayılan: 1, 1 = tx meta verilerini tut mesela hesap sahibi ve ödeme talebi bilgileri, 2 = tx meta verilerini at)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Belirtilen kaynaktan JSON-RPC bağlantılarını kabul et. Bir &lt;ip&gt; için geçerli olanlar şunlardır: salt IP adresi (mesela 1.2.3.4), bir şebeke/ağ maskesi (örneğin 1.2.3.4/255.255.255.0) ya da bir şebeke/CIDR (mesela 1.2.3.4/24). Bu seçenek birden fazla kez belirtilebilir</translation>
@@ -3102,6 +2982,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>%s veri dizininde kilit elde edilemedi. Bitcoin Çekirdeği muhtemelen hâlihazırda çalışmaktadır.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Devamlı olarak ücretsiz muameleleri dakikada &lt;n&gt;*1000 bayt olarak sınırla (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Yeni dosyaları umask 077 yerine varsayılan izinlerle oluştur (sadece devre dışı cüzdan işlevselliği ile etkilidir)</translation>
@@ -3118,10 +3002,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>Hata: Desteklenmeyen -socks argümanı bulundu. SOCKS sürümünün ayarlanması artık mümkün değildir, sadece SOCKS5 vekilleri desteklenmektedir.</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>Bir şebeke muamelesi cüzdan muamele girdisini tekrar harcadığında komut çalıştır (%s=tekrar harcama muamele kimliği, %t=cüzdan muamele kimliği)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>İlgili bir uyarı alındığında ya da gerçekten uzun bir çatallama gördüğümüzde komutu çalıştır (komuttaki %s mesaj ile değiştirilir)</translation>
@@ -3134,14 +3014,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Kb başına BTC olarak bundan düşük ücretler muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>Eğer paytxfee ayarlanmadıysa, kafi derecede ücret ekleyin ki muameleler vasati n blok içinde teyit edilsin (varsayılan: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Hata ayıklama bilgisi dök (varsayılan:0, &lt;kategori&gt; sağlanması seçime dayalıdır)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
@@ -3158,18 +3030,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Uyarı: Lütfen bilgisayarınızın saat ve tarihinin doğru olduğunu kontol ediniz! Saatinizde gecikme varsa Bitcoin Çekirdeği doğru şekilde çalışamaz.</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>Belirtilen ağ maskesi ya da IP adresinden bağlanan eşleri beyaz listeye al. Birden fazla kez belirtilebilir.</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Beyaz listeye alınan eşler DoS yasaklamasına uğramazlar ve muameleleri zaten mempool'da olsalar da daima aktarılır, bu mesela bir geçit için kullanışlıdır</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Eş adreslerini daima DNS araması ile sorgula (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>-whitebind adresi çözümlenemedi: '%s'</translation>
@@ -3198,10 +3062,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Yolladığınız muamelelere kB başına BTC olarak eklenecek ücret (varsayılan: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>Hata ayıklama çıktısına IP adreslerini dahil et (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>Bilgi</translation>
@@ -3231,24 +3091,8 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Hafızada en çok &lt;n&gt; bağlanılamaz blok tut (varsaylan: %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>İmza arabelleğinin boyutunu &lt;n&gt; unsurla sınırla (varsayılan: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Blok oluşturulduğunda muamele önceliğini ve kB başı ücreti kütüğe al (varsayılan: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Muamelelerin tamamının indeksini tut (varsayılan: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Bağlantı başına azami alım tamponu, &lt;n&gt;*1000 bayt (varsayılan: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Bağlantı başına azami yollama tamponu, &lt;n&gt;*1000 bayt (varsayılan: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Hafızada en çok &lt;n&gt; bağlanılamaz muamele tut (varsayılan: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3258,22 +3102,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Düğüm röle seçenekleri:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Sadece yerleşik kontrol noktalarıyla eşleşen blok zincirini kabul et (varsayılan: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Sadece &lt;net&gt; şebekesindeki düğümlere bağlan (IPv4, IPv6 ya da Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Başlangıçta bloğu göster, blok indeksinde bulunduysa</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Başlangıçta blok ağacını göster (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL seçenekleri: (SSL kurulumu yönergeleri için Bitcoin vikisine bakınız)</translation>
@@ -3290,30 +3122,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Her &lt;n&gt; şebeke mesajından rastgele birini bulanıklaştır</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>Veri taşıyıcı muameleleri oluştur ve aktar (varsayılan: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>P2SH olmayan çoklu imzaları aktar (varsayılan: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Periyodik olarak cüdanı diske yazdırmak için bir iş parçacığı çalıştır (varsayılan: 1)</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>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Bayt olarak asgari blok boyutunu tanımla (varsayılan: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Cüzdan veritabanı ortamında DB_PRIVATE bayrağını koyar (varsayılan: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Tüm hata ayıklama seçeneklerini göster (kullanımı: --help -help-debug)</translation>
@@ -3326,14 +3138,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Muamelenin imzalanması başarısız oldu</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (varsayılan: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>Sistem hatası:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>Bu, deneysel bir yazılımdır.</translation>
@@ -3354,10 +3158,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>Bu bilgisayarda %s unsuruna bağlanılamadı (bağlanma %s hatasını verdi)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: dinlenildiğinde 1)</translation>
@@ -3410,10 +3210,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Upgrade wallet to latest format</source>
         <translation>Cüzdanı en yeni biçime güncelle</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Anahtar alan boyutunu &lt;n&gt; değerine ayarla (varsayılan: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Blok zincirini eksik cüzdan muameleleri için tekrar tara</translation>
@@ -3422,14 +3218,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPC bağlantıları için OpenSSL (https) kullan</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Sunucu sertifika dosyası (varsayılan: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Sunucu özel anahtarı (varsayılan: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Bu yardım mesajı</translation>
@@ -3446,14 +3234,182 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat dosyasının yüklenmesinde hata oluştu: bozuk cüzdan</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = tx meta verilerini tut mesela hesap sahibi ve ödeme talebi bilgileri, 2 = tx meta verilerini at)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Veritabanı etkinliğini bellekten disk kütüğüne her &lt;n&gt; megabaytta aktar (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>-checkblocks'un blok kontrolünün ne kadar kapsamlı olacağı (0 ilâ 4, varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Eğer paytxfee ayarlanmadıysa, kafi derecede ücret ekleyin ki muameleler vasati n blok içinde teyit edilsin (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Blok oluşturulduğunda muamele önceliğini ve kB başı ücreti kütüğe al (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Muamelelerin tamamının indeksini tut, getrawtransaction rpc çağrısı tarafından kullanılır (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Aksaklık gösteren eşlerle terkar bağlantıyı engelleme süresi, saniye olarak (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Hata ayıklama bilgisi dök (varsayılan: %u, &lt;kategori&gt; sağlanması seçime dayalıdır)</translation>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation>Oluşturma etkinken işlemci sınırını belirle (-1 = sınırsız, varsayılan: %d)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Eşlere gizli Tor servisleri ile ulaşmak için ayrı SOCKS5 vekil sunucusu kullan (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Kabul edilebilir şifreler (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Eş adresleri sorgulaması için daima DNS aramasını kullan (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Güvenli kipi devre dışı bırak, gerçek bir güvenli olayı geçersiz kıl (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat dosyasının yüklenmesinde hata oluştu</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Güvenli kipi zorla (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Bitcoin oluştur (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Başlangıçta kontrol edilecek blok sayısı (varsayılan: %u, 0 = hepsi)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Hata ayıklama çıktısına IP adreslerini dahil et (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Geçersiz -proxy adresi: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>İmza arabelleğinin boyutunu &lt;n&gt; unsurla sınırla (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>JSON-RPC bağlantılarını &lt;port&gt; üzerinde dinle (varsayılan: %u veya tesnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Bağlantılar için dinlenecek &lt;port&gt; (varsayılan: %u ya da testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Eşler ile en çok &lt;n&gt; adet bağlantı kur (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Her bağlantı için azami alım tamponu, &lt;n&gt;*1000 bayt (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Her bağlantı için azami yollama tamponu, &lt;n&gt;*1000 bayt (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Sadece yerleşik kontrol noktalarıyla eşleşen blok zincirini kabul et (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Hata ayıklama verilerinin önüne zaman damgası ekle (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Başlangıçta blok ağacını göster (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Veri taşıyıcı muameleleri oluştur ve aktar (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>P2SH olmayan çoklu imzaları aktar (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Periyodik olarak cüdanı diske yazdırmak için bir iş parçacığı çalıştır (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Sunucu sertifika dosyası (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Sunucu özel anahtarı (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Anahtar alan boyutunu &lt;n&gt; değerine ayarla (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Bayt olarak asgari blok boyutunu tanımla (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Hizmet RCP aramaları iş parçacığı sayısını belirle (varsayılan: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Cüzdan veritabanı ortamında DB_PRIVATE bayrağını koyar (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Yapılandırma dosyası belirtiniz (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Bağlantı zaman aşım süresini milisaniye olarak belirt (asgari: 1, varsayılan: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Pid dosyası belirtiniz (varsayılan: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Gönderme muamelelerinde teyit edilmemiş para üstünü harca (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Diskten blokları içeri aktardıktan sonra çalışmayı durdur (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Aksaklık gösteren eşlerle bağlantıyı kesme sınırı (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>-onlynet için bilinmeyen bir şebeke belirtildi: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index ff8ac6802236..c8fe1df9bf66 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -9,10 +9,22 @@
         <source>Create a new address</source>
         <translation>Створити нову адресу</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Нова</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копіювати виділену адресу в буфер обміну</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Копіювати</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>З&amp;акрити</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Скопіювати адресу</translation>
@@ -33,13 +45,29 @@
         <source>&amp;Delete</source>
         <translation>&amp;Видалити</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Виберіть адресу для відправлення монет</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Виберіть адресу для отримання монет</translation>
+    </message>
     <message>
         <source>C&amp;hoose</source>
         <translation>&amp;Обрати</translation>
     </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Адреси для відправлення</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Адреси для отримання</translation>
+    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Це ваші Bitcoin адреси для відправки платежів. Перед відправкою монети Завжди перевіряйте суму та адресу прийому.</translation>
+        <translation>Це ваші Bitcoin-адреси для відправлення платежів. Перед відправленням монет завжди перевіряйте суму та адресу прийому.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
@@ -61,9 +89,13 @@
         <source>Comma separated file (*.csv)</source>
         <translation>Файли, розділені комою (*.csv)</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Помилка експорту</translation>
+    </message>
     <message>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation>Сталася помилка підчас зберігання адрес до %1. Будь ласка спробуйте ще.</translation>
+        <translation>Виникла помилка при спробі зберігання адрес до %1. Будь ласка спробуйте ще.</translation>
     </message>
 </context>
 <context>
@@ -141,7 +173,7 @@
     </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>ВАЖЛИВО: Всі попередні резервні копії, які ви зробили з вашого файла гаманця повинні бути замінені новоствореним, зашифрованим файлом гаманця. З міркувань безпеки, попередні резервні копії в незашифрованого файла гаманця стануть марним, як тільки ви починаєте використовувати новий, зашифрований гаманець.</translation>
+        <translation>ВАЖЛИВО: Всі попередні резервні копії, які ви зробили з вашого файлу гаманця повинні бути замінені новоствореним, зашифрованим файлом гаманця. З міркувань безпеки, попередні резервні копії незашифрованого файла гаманця стануть марними одразу ж, як тільки ви почнете використовувати новий, зашифрований гаманець.</translation>
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
@@ -151,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Гаманець зашифровано</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Введіть нову кодову фразу для гаманця.&lt;br/&gt;Будь ласка, використовуйте кодові фрази що містять &lt;b&gt; як мінімум десять випадкових символів &lt;/b&gt; або &lt;b&gt; як мінімум вісім слів &lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Біткоін-клієнт буде закрито для завершення процесу шифрування. Пам'ятайте, що шифрування гаманця не може повністю захистити ваші біткоіни від крадіжки, у випадку якщо ваш комп'ютер буде інфіковано шкідливими програмами.</translation>
@@ -173,7 +209,7 @@
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>Введений пароль є невірним.</translation>
+        <translation>Введений пароль є неправильним.</translation>
     </message>
     <message>
         <source>Wallet decryption failed</source>
@@ -198,6 +234,10 @@
         <source>&amp;Overview</source>
         <translation>&amp;Огляд</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Вузол</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Показати загальний огляд гаманця</translation>
@@ -254,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Відкрити &amp;URI</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Клієнт «Bitcoin Core»</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Імпорт блоків з диску...</translation>
@@ -288,7 +332,7 @@
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>Перевірити повідомлення...</translation>
+        <translation>П&amp;еревірити повідомлення...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -347,29 +391,45 @@
         <translation>Панель вкладок</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation>[тестова мережа]</translation>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
-        <source>Bitcoin Core</source>
-        <translation>Bitcoin Ядро</translation>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation>Створити запит платежу (генерує QR-код та bitcoin: URI)</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>&amp;Про Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>Показати список адрес і міток, що були використані для відправлення</translation>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation>Показати список адрес і міток, що були використані для отримання</translation>
+    </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation>Відкрити bitcoin: 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></translation>
+        <translation><numerusform>%n активне з'єднання з мережею</numerusform><numerusform>%n активні з'єднання з мережею</numerusform><numerusform>%n активних з'єднань з мережею Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
         <translation>Недоступно жодного джерела блоків...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Оброблено %1 блоків історії транзакцій.</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform><numerusform>%n годин</numerusform></translation>
@@ -418,6 +478,10 @@
         <source>Up to date</source>
         <translation>Синхронізовано</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Оброблено %n блок історії транзакцій.</numerusform><numerusform>Оброблено %n блоки історії транзакцій.</numerusform><numerusform>Оброблено %n блоків історії транзакцій.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Синхронізується...</translation>
@@ -428,7 +492,7 @@
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>Отримані перекази</translation>
+        <translation>Отримані транзакції</translation>
     </message>
     <message>
         <source>Date: %1
@@ -460,10 +524,18 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Control Address Selection</source>
+        <translation>Вибір адрес для керування монетами</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Кількість:</translation>
     </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Байтів:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Кількість:</translation>
@@ -476,14 +548,30 @@ Address: %4
         <source>Fee:</source>
         <translation>Комісія:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Пил:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
-        <translation>Після комісії</translation>
+        <translation>Після комісії:</translation>
     </message>
     <message>
         <source>Change:</source>
         <translation>Решта:</translation>
     </message>
+    <message>
+        <source>(un)select all</source>
+        <translation>Вибрати/зняти всі</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Деревом</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Списком</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Кількість</translation>
@@ -496,10 +584,18 @@ Address: %4
         <source>Date</source>
         <translation>Дата</translation>
     </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Підтверджень</translation>
+    </message>
     <message>
         <source>Confirmed</source>
         <translation>Підтверджені</translation>
     </message>
+    <message>
+        <source>Priority</source>
+        <translation>Пріоритет</translation>
+    </message>
     <message>
         <source>Copy address</source>
         <translation>Скопіювати адресу</translation>
@@ -516,6 +612,14 @@ Address: %4
         <source>Copy transaction ID</source>
         <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>
@@ -536,6 +640,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>Копіювати пріорітет</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Копіювати пил</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Копіювати решту</translation>
@@ -576,6 +684,18 @@ Address: %4
         <source>lowest</source>
         <translation>найнижчий</translation>
     </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation>(%1 заблоковано)</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>відсутній</translation>
+    </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Може відрізнятися на +/- %1 сатоші за вхід</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>так</translation>
@@ -588,9 +708,21 @@ Address: %4
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Ця позначка буде червоною, якщо розмір транзакції вищий за 1000 байт.</translation>
     </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation>Це означає, що необхідно внести комісію (щонайменше %1 за КБ).</translation>
+    </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</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>This label turns red, if the priority is smaller than "medium".</source>
-        <translation>Ця позначка буде червоною, якщо пріорітет транзакції нижчий за «середній»".</translation>
+        <translation>Ця позначка буде червоною, якщо пріоритет транзакції нижчий за «середній».</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
@@ -600,7 +732,15 @@ Address: %4
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
-    </context>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation>решта з %1 (%2)</translation>
+    </message>
+    <message>
+        <source>(change)</source>
+        <translation>(решта)</translation>
+    </message>
+</context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -611,6 +751,14 @@ Address: %4
         <source>&amp;Label</source>
         <translation>&amp;Мітка</translation>
     </message>
+    <message>
+        <source>The label associated with this address list entry</source>
+        <translation>Мітка, пов'язана з цим записом списку адрес</translation>
+    </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation>Адреса, пов'язана з цим записом списку адрес. Це поле може бути модифіковане лише для адрес відправлення.</translation>
+    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Адреса</translation>
@@ -675,11 +823,19 @@ Address: %4
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Ядро</translation>
+        <translation>Bitcoin Core</translation>
     </message>
     <message>
         <source>version</source>
-        <translation>версія</translation>
+        <translation>версії</translation>
+    </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-бітний)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Про Bitcoin Core</translation>
     </message>
     <message>
         <source>Command-line options</source>
@@ -705,6 +861,10 @@ Address: %4
         <source>Start minimized</source>
         <translation>Запускати згорнутим</translation>
     </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Вказати кореневі SSL-сертифікати для запиту платежу (типово: -системні-)</translation>
+    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Показувати заставку під час запуску (типово: 1)</translation>
@@ -730,7 +890,7 @@ Address: %4
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Bitcoin Core завантажить та збереже копію ланцюга Bitcoin блоків. Щонайменше %1Gb даних буде збережено в цьому каталозі. Гаманець теж буде збережено в цьому каталозі.</translation>
+        <translation>Bitcoin Core завантажить та збереже копію ланцюжка блоків Bitcoin. Щонайменше %1ГБ даних буде збережено в цьому каталозі. Гаманець теж буде збережено в цьому каталозі.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -746,19 +906,19 @@ Address: %4
     </message>
     <message>
         <source>Error: Specified data directory "%1" cannot be created.</source>
-        <translation>Помилка: неожливо створити обраний каталог даних «%1».</translation>
+        <translation>Помилка: неможливо створити обраний каталог даних «%1».</translation>
     </message>
     <message>
         <source>Error</source>
         <translation>Помилка</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>Gb вільного простору доступно</translation>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>Доступно %n ГБ вільного простору</numerusform><numerusform>Доступно %n ГБ вільного простору</numerusform><numerusform>Доступно %n ГБ вільного простору</numerusform></translation>
     </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(з %1Gb, що потрібно)</translation>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(в той час, як необхідно %n ГБ)</numerusform><numerusform>(в той час, як необхідно %n ГБ)</numerusform><numerusform>(в той час, як необхідно %n ГБ)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -767,11 +927,23 @@ Address: %4
         <source>Open URI</source>
         <translation>Відкрити URI</translation>
     </message>
+    <message>
+        <source>Open payment request from URI or file</source>
+        <translation>Відкрити запит платежу з URI або файлу</translation>
+    </message>
     <message>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
-    </context>
+    <message>
+        <source>Select payment request file</source>
+        <translation>Виберіть файл запиту платежу</translation>
+    </message>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation>Виберіть файл запиту платежу для відкриття</translation>
+    </message>
+</context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -798,6 +970,50 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Запускати гаманець при вході в систему</translation>
     </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Розмір &amp;кешу бази даних</translation>
+    </message>
+    <message>
+        <source>MB</source>
+        <translation>МБ</translation>
+    </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>Кількість потоків сценарію перевірки</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Приймати підключення ззовні</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Дозволити вхідні з’єднання</translation>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>Підключатись до мережі Bitcoin через SOCKS-проксі.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
+        <translation>&amp;Підключатись через SOCKS-проксі (типовий проксі):</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>IP-адреса проксі-сервера (наприклад IPv4: 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>Сторонні URL (наприклад, block explorer), що з'являться на вкладці транзакцій у вигляді пункту контекстного меню. %s в URL буде замінено на хеш транзакції. Для відокремлення URLів використовуйте вертикальну риску |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Сторонні URL транзакцій</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>Скинути всі параметри клієнта на типові.</translation>
@@ -810,6 +1026,30 @@ Address: %4
         <source>&amp;Network</source>
         <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>
+    <message>
+        <source>Expert</source>
+        <translation>Експерт</translation>
+    </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>Ввімкнути &amp;керування входами</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>Автоматично відкривати порт для клієнту біткоін на роутері. Працює лише якщо ваш роутер підтримує UPnP і ця функція увімкнена.</translation>
@@ -856,7 +1096,7 @@ Address: %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>Мова інтерфейсу користувача:</translation>
+        <translation>Мов&amp;а інтерфейсу користувача:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
@@ -870,6 +1110,10 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Виберіть одиницю вимірювання монет, яка буде відображатись в гаманці та при відправленні.</translation>
     </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation>Показати або сховати керування входами.</translation>
+    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;Гаразд</translation>
@@ -882,10 +1126,26 @@ Address: %4
         <source>default</source>
         <translation>типово</translation>
     </message>
+    <message>
+        <source>none</source>
+        <translation>відсутні</translation>
+    </message>
     <message>
         <source>Confirm options reset</source>
         <translation>Підтвердження скидання параметрів</translation>
     </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>Для застосування змін необхідно перезапустити клієнта.</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>Клієнт вимкнеться, продовжувати?</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>Ця зміна вступить в силу після перезапуску клієнта</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Невірно вказано адресу проксі.</translation>
@@ -902,36 +1162,68 @@ Address: %4
         <translation>Показана інформація вже може бути застарілою. Ваш гаманець буде автоматично синхронізовано з мережею Bitcoin після встановлення підключення, але цей процес ще не завершено.</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation>Гаманець</translation>
+        <source>Watch-only:</source>
+        <translation>Тільки спостереження:</translation>
+    </message>
+    <message>
+        <source>Available:</source>
+        <translation>Наявно:</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation>Ваш поточний баланс расходуемого</translation>
+        <translation>Ваш поточний підтверджений баланс</translation>
+    </message>
+    <message>
+        <source>Pending:</source>
+        <translation>Очікується:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Всього угод, які ще мають бути підтверджені, і до цих пір не враховуються в расходуемого балансу</translation>
+        <translation>Сума монет у непідтверджених транзакціях</translation>
     </message>
     <message>
         <source>Immature:</source>
-        <translation>незрілі:</translation>
+        <translation>Незрілі:</translation>
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Замінований баланс, який ще не дозрів</translation>
+        <translation>Баланс видобутих та ще недозрілих монет</translation>
+    </message>
+    <message>
+        <source>Balances</source>
+        <translation>Баланси</translation>
     </message>
     <message>
         <source>Total:</source>
-        <translation>всього:</translation>
+        <translation>Всього:</translation>
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation>Ваше поточне Сукупний баланс</translation>
+        <translation>Ваш поточний сукупний баланс</translation>
+    </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Ваш поточний баланс в адресах для спостереження</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Доступно:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Недавні транзакції</translation>
+    </message>
+    <message>
+        <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>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Недавні транзакції&lt;/b&gt;</translation>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Поточний сукупний баланс в адресах для спостереження</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -944,16 +1236,108 @@ Address: %4
         <source>URI handling</source>
         <translation>Обробка URI</translation>
     </message>
-    </context>
+    <message>
+        <source>Invalid payment address %1</source>
+        <translation>Помилка в адресі платежу %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Запит платежу відхилено</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Мережа запиту платежу не є мережею клієнта.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Запит платежу прострочено.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <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>
+    <message>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation>Неможливо запустити bitcoin: обробник click-to-pay</translation>
+    </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>URL запиту платежу є некоректним: %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! Це може бути викликано неправильною Bitcoin-адресою, чи невірними параметрами URI.</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>Обробка файлу запиту платежу</translation>
+    </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Неможливо прочитати файл запиту платежу! Ймовірно, файл пошкоджено.</translation>
+    </message>
+    <message>
+        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+        <translation>Неперевірені запити платежів з власними платіжними сценаріями не підтримуються.</translation>
+    </message>
+    <message>
+        <source>Refund from %1</source>
+        <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>
+    <message>
+        <source>Network request error</source>
+        <translation>Помилка мережевого запиту</translation>
+    </message>
+</context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>Клієнт користувача</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Адреса/Ім'я хоста</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Затримка</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Кількість</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Введіть адресу Bitcoin (наприклад %1)</translation>
+    </message>
     <message>
         <source>%1 d</source>
         <translation>%1 д</translation>
@@ -970,6 +1354,18 @@ Address: %4
         <source>%1 s</source>
         <translation>%1 с</translation>
     </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>МЕРЕЖА</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>НЕВІДОМО</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Відсутні</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>Н/Д</translation>
@@ -993,7 +1389,11 @@ Address: %4
         <source>Save QR Code</source>
         <translation>Зберегти QR-код</translation>
     </message>
-    </context>
+    <message>
+        <source>PNG Image (*.png)</source>
+        <translation>Зображення PNG (*.png)</translation>
+    </message>
+</context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -1016,10 +1416,18 @@ Address: %4
         <source>Debug window</source>
         <translation>Вікно зневадження</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>Загальна</translation>
+    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Використовується OpenSSL версії</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Використовується BerkeleyDB версії</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Час запуску</translation>
@@ -1053,71 +1461,171 @@ Address: %4
         <translation>Відправлено</translation>
     </message>
     <message>
-        <source>Version</source>
-        <translation>Версія</translation>
+        <source>&amp;Peers</source>
+        <translation>&amp;Учасники</translation>
     </message>
     <message>
-        <source>Last block time</source>
-        <translation>Час останнього блоку</translation>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Виберіть учасника для перегляду детальнішої інформації</translation>
     </message>
     <message>
-        <source>&amp;Open</source>
-        <translation>Відкрити</translation>
+        <source>Direction</source>
+        <translation>Напрямок</translation>
     </message>
     <message>
-        <source>&amp;Console</source>
-        <translation>Консоль</translation>
+        <source>Version</source>
+        <translation>Версія</translation>
     </message>
     <message>
-        <source>Totals</source>
-        <translation>всього:</translation>
+        <source>User Agent</source>
+        <translation>Клієнт користувача</translation>
     </message>
     <message>
-        <source>Build date</source>
-        <translation>Дата збирання</translation>
+        <source>Services</source>
+        <translation>Сервіси</translation>
     </message>
     <message>
-        <source>Debug log file</source>
-        <translation>Файл звіту зневадження</translation>
+        <source>Starting Height</source>
+        <translation>Початкова висота</translation>
     </message>
     <message>
-        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Відкрийте налагодження файл журналу Bitcoin з поточного каталогу даних. Це може зайняти кілька секунд для великих файлів журналів.</translation>
+        <source>Sync Height</source>
+        <translation>Висота синхронізації</translation>
     </message>
     <message>
-        <source>Clear console</source>
-        <translation>Очистити консоль</translation>
+        <source>Ban Score</source>
+        <translation>Очки бану</translation>
     </message>
     <message>
-        <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Вітаємо у консолі Bitcoin RPC.</translation>
+        <source>Connection Time</source>
+        <translation>Час з'єднання</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>Використовуйте стрілки вгору вниз для навігації по історії, і &lt;b&gt;Ctrl-L&lt;/b&gt; для очищення екрана.</translation>
+        <source>Last Send</source>
+        <translation>Востаннє відправлено</translation>
     </message>
     <message>
-        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Наберіть &lt;b&gt;help&lt;/b&gt; для перегляду доступних команд.</translation>
+        <source>Last Receive</source>
+        <translation>Востаннє отримано</translation>
     </message>
     <message>
-        <source>Inbound</source>
-        <translation>Вхідний</translation>
+        <source>Bytes Sent</source>
+        <translation>Байтів відправлено</translation>
     </message>
     <message>
-        <source>Yes</source>
-        <translation>Так</translation>
+        <source>Bytes Received</source>
+        <translation>Байтів отримано</translation>
     </message>
     <message>
-        <source>No</source>
-        <translation>Ні</translation>
+        <source>Ping Time</source>
+        <translation>Затримка</translation>
     </message>
-    </context>
-<context>
-    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>&amp;Amount:</source>
-        <translation>&amp;Кількість:</translation>
+        <source>Last block time</source>
+        <translation>Час останнього блоку</translation>
+    </message>
+    <message>
+        <source>&amp;Open</source>
+        <translation>Відкрити</translation>
+    </message>
+    <message>
+        <source>&amp;Console</source>
+        <translation>Консоль</translation>
+    </message>
+    <message>
+        <source>&amp;Network Traffic</source>
+        <translation>&amp;Мережевий трафік</translation>
+    </message>
+    <message>
+        <source>&amp;Clear</source>
+        <translation>&amp;Очистити</translation>
+    </message>
+    <message>
+        <source>Totals</source>
+        <translation>Всього</translation>
+    </message>
+    <message>
+        <source>In:</source>
+        <translation>Вхідних:</translation>
+    </message>
+    <message>
+        <source>Out:</source>
+        <translation>Вихідних:</translation>
+    </message>
+    <message>
+        <source>Build date</source>
+        <translation>Дата збирання</translation>
+    </message>
+    <message>
+        <source>Debug log file</source>
+        <translation>Файл звіту зневадження</translation>
+    </message>
+    <message>
+        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
+        <translation>Відкрийте файл журналу налагодження Bitcoin з поточного каталогу даних. Це може зайняти кілька секунд для великих файлів журналів.</translation>
+    </message>
+    <message>
+        <source>Clear console</source>
+        <translation>Очистити консоль</translation>
+    </message>
+    <message>
+        <source>Welcome to the Bitcoin RPC console.</source>
+        <translation>Вітаємо у консолі 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>Використовуйте стрілки вгору вниз для навігації по історії, і &lt;b&gt;Ctrl-L&lt;/b&gt; для очищення екрана.</translation>
+    </message>
+    <message>
+        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+        <translation>Наберіть &lt;b&gt;help&lt;/b&gt; для перегляду доступних команд.</translation>
+    </message>
+    <message>
+        <source>%1 B</source>
+        <translation>%1 Б</translation>
+    </message>
+    <message>
+        <source>%1 KB</source>
+        <translation>%1 КБ</translation>
+    </message>
+    <message>
+        <source>%1 MB</source>
+        <translation>%1 МБ</translation>
+    </message>
+    <message>
+        <source>%1 GB</source>
+        <translation>%1 ГБ</translation>
+    </message>
+    <message>
+        <source>via %1</source>
+        <translation>через %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>ніколи</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Вхідний</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Вихідний</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Невідома</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Отримання...</translation>
+    </message>
+</context>
+<context>
+    <name>ReceiveCoinsDialog</name>
+    <message>
+        <source>&amp;Amount:</source>
+        <translation>&amp;Кількість:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1127,6 +1635,30 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>&amp;Повідомлення:</translation>
     </message>
+    <message>
+        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
+        <translation>Повторно використати одну з адрес. Повторне використання адрес створює ризики безпеки та конфіденційності. Не використовуйте її, окрім як для створення повторного запиту платежу.</translation>
+    </message>
+    <message>
+        <source>R&amp;euse an existing receiving address (not recommended)</source>
+        <translation>По&amp;вторно використати адресу для отримання (не рекомендується)</translation>
+    </message>
+    <message>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation>Необов'язкове повідомлення на додаток до запиту платежу, котре буде показане під час відкриття запиту. Примітка: Це повідомлення не буде відправлено з платежем через мережу Bitcoin.</translation>
+    </message>
+    <message>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation>Необов'язкове поле для мітки нової адреси отримувача.</translation>
+    </message>
+    <message>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>Використовуйте цю форму, щоб отримати платежі. Всі поля є &lt;b&gt;необов'язковими&lt;/b&gt;.</translation>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>Необов'язкове поле для суми запиту. Залиште це поле пустим або впишіть нуль, щоб не надсилати у запиті конкретної суми.</translation>
+    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Очистити всі поля в формі</translation>
@@ -1135,6 +1667,30 @@ Address: %4
         <source>Clear</source>
         <translation>Очистити</translation>
     </message>
+    <message>
+        <source>Requested payments history</source>
+        <translation>Історія запитів платежу</translation>
+    </message>
+    <message>
+        <source>&amp;Request payment</source>
+        <translation>Н&amp;адіслати запит платежу</translation>
+    </message>
+    <message>
+        <source>Show the selected request (does the same as double clicking an entry)</source>
+        <translation>Показати вибраний запит (робить те ж саме, що й подвійний клік по запису)</translation>
+    </message>
+    <message>
+        <source>Show</source>
+        <translation>Показати</translation>
+    </message>
+    <message>
+        <source>Remove the selected entries from the list</source>
+        <translation>Вилучити вибрані записи зі списку</translation>
+    </message>
+    <message>
+        <source>Remove</source>
+        <translation>Вилучити</translation>
+    </message>
     <message>
         <source>Copy label</source>
         <translation>Скопіювати мітку</translation>
@@ -1166,6 +1722,14 @@ Address: %4
         <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>
     <message>
         <source>URI</source>
         <translation>URI</translation>
@@ -1217,20 +1781,48 @@ Address: %4
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
-    </context>
+    <message>
+        <source>(no message)</source>
+        <translation>(без повідомлення)</translation>
+    </message>
+    <message>
+        <source>(no amount)</source>
+        <translation>(без суми)</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Відправити</translation>
     </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation>Керування монетами</translation>
+    </message>
+    <message>
+        <source>Inputs...</source>
+        <translation>Входи...</translation>
+    </message>
+    <message>
+        <source>automatically selected</source>
+        <translation>вибираються автоматично</translation>
+    </message>
+    <message>
+        <source>Insufficient funds!</source>
+        <translation>Недостатньо коштів!</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Кількість:</translation>
     </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Байтів:</translation>
+    </message>
     <message>
         <source>Amount:</source>
-        <translation>Кількість:</translation>
+        <translation>Сума:</translation>
     </message>
     <message>
         <source>Priority:</source>
@@ -1248,6 +1840,14 @@ Address: %4
         <source>Change:</source>
         <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>Send to multiple recipients at once</source>
         <translation>Відправити на декілька адрес</translation>
@@ -1260,6 +1860,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>Очистити всі поля в формі</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Пил:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Очистити &amp;все</translation>
@@ -1280,6 +1884,10 @@ Address: %4
         <source>Confirm send coins</source>
         <translation>Підтвердіть відправлення</translation>
     </message>
+    <message>
+        <source>%1 to %2</source>
+        <translation>%1 на %2</translation>
+    </message>
     <message>
         <source>Copy quantity</source>
         <translation>Копіювати кількість</translation>
@@ -1308,13 +1916,21 @@ Address: %4
         <source>Copy change</source>
         <translation>Копіювати решту</translation>
     </message>
+    <message>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>Всього %1 (= %2)</translation>
+    </message>
+    <message>
+        <source>or</source>
+        <translation>або</translation>
+    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Адреса отримувача невірна, будь ласка перепровірте.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>Кількість монет для відправлення повинна бути більшою 0.</translation>
+        <translation>Кількість монет для відправлення повинна бути більше 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
@@ -1328,15 +1944,39 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Знайдено адресу що дублюється. Відправлення на кожну адресу дозволяється лише один раз на кожну операцію переказу.</translation>
     </message>
+    <message>
+        <source>Transaction creation failed!</source>
+        <translation>Не вдалося створити транзакцію!</translation>
+    </message>
+    <message>
+        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation>Транзакцію відхилено! Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій.</translation>
+    </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Увага: Неправильна Bitcoin-адреса</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(немає назви)</translation>
     </message>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation>Увага: Невідома адреса для решти</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Копіювати пил</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Ви впевнені, що хочете відправити?</translation>
     </message>
-    </context>
+    <message>
+        <source>added as transaction fee</source>
+        <translation>додано як комісія за транзакцію</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -1359,6 +1999,14 @@ Address: %4
         <source>Choose previously used address</source>
         <translation>Обрати ранiш використовувану адресу</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>
@@ -1371,10 +2019,34 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
+    <message>
+        <source>Remove this entry</source>
+        <translation>Видалити цей запис</translation>
+    </message>
     <message>
         <source>Message:</source>
         <translation>Повідомлення:</translation>
     </message>
+    <message>
+        <source>This is a verified payment request.</source>
+        <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>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation>Повідомлення, що було додане до bitcoin:URI та буде збережено разом з транзакцією для довідки. Примітка: Це повідомлення не буде відправлено в мережу Bitcoin.</translation>
+    </message>
+    <message>
+        <source>This is an unverified payment request.</source>
+        <translation>Це неперевірений запит платежу.</translation>
+    </message>
+    <message>
+        <source>Pay To:</source>
+        <translation>Отримувач:</translation>
+    </message>
     <message>
         <source>Memo:</source>
         <translation>Нотатка:</translation>
@@ -1382,7 +2054,15 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    </context>
+    <message>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Bitcoin Core вимикається...</translation>
+    </message>
+    <message>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>Не вимикайте комп’ютер до зникнення цього вікна.</translation>
+    </message>
+</context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1395,7 +2075,11 @@ Address: %4
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Ви можете зареєструватися повідомленнями зі своїми адресами, щоб довести, що ви є їх власником. Будьте обережні, щоб не підписувати що-небудь неясне, як фішинг-атак може спробувати обдурити вас в підписанні вашу особистість до них. Тільки підписати повністю докладні свідчення, користувач зобов'язується.</translation>
+        <translation>Ви можете підписувати повідомлення зі своїми адресами, щоб довести, що ви є їх власником. Остерігайтеся підписувати будь-що незрозуміле, так як за допомогою фішинг-атаки вас можуть спробувати обдурити для отримання вашого підпису під чужими словами. Підписуйте тільки ті повідомлення, з якими ви повністю згодні.</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Адреса Bitcoin для підпису цього повідомлення</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -1447,7 +2131,11 @@ Address: %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Введіть адресу підписання, повідомлення (забезпечення копіюванні розриви рядків, прогалини, вкладки і т.д. точно) і підпис нижче, щоб перевірити повідомлення. Будьте обережні, щоб не читати далі в підпис, ніж те, що в підписаному самого повідомлення, щоб уникнути обдурять нападу чоловік-в-середній.</translation>
+        <translation>Введіть нижче адресу підпису, повідомлення (впевніться, що ви точно скопіювали символи завершення рядку, табуляцію, пробіли тощо) та підпис для перевірки повідомлення. Впевніться, що в підпис не було додано зайвих символів: це допоможе уникнути атак типу «людина посередині».</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Адреса Bitcoin, якою було підписано це повідомлення</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
@@ -1475,11 +2163,11 @@ Address: %4
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation>Введений адреса не відноситься до ключа.</translation>
+        <translation>Введена адреса не відноситься до ключа.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation>Розблокування Гаманець був скасований.</translation>
+        <translation>Розблокування гаманця було скасоване.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
@@ -1503,7 +2191,7 @@ Address: %4
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>Підпис не відповідає дайджест повідомлення.</translation>
+        <translation>Підпис не збігається з хешем повідомлення.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -1518,7 +2206,11 @@ Address: %4
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Ядро</translation>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation>Розробники Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -1536,7 +2228,11 @@ Address: %4
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation>Відкрити до %1</translation>
+        <translation>Відкрито до %1</translation>
+    </message>
+    <message>
+        <source>conflicted</source>
+        <translation>суперечить</translation>
     </message>
     <message>
         <source>%1/offline</source>
@@ -1554,6 +2250,10 @@ Address: %4
         <source>Status</source>
         <translation>Статус</translation>
     </message>
+    <message numerus="yes">
+        <source>, broadcast through %n node(s)</source>
+        <translation><numerusform>, розіслано через %n вузол</numerusform><numerusform>, розіслано через %n вузли</numerusform><numerusform>, розіслано через %n вузлів</numerusform></translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
@@ -1578,6 +2278,10 @@ Address: %4
         <source>own address</source>
         <translation>Власна адреса</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>тільки спостереження</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>Мітка</translation>
@@ -1586,6 +2290,10 @@ Address: %4
         <source>Credit</source>
         <translation>Кредит</translation>
     </message>
+    <message numerus="yes">
+        <source>matures in %n more block(s)</source>
+        <translation><numerusform>«дозріє» через %n блок</numerusform><numerusform>«дозріє» через %n блоки</numerusform><numerusform>«дозріє» через %n блоків</numerusform></translation>
+    </message>
     <message>
         <source>not accepted</source>
         <translation>не прийнято</translation>
@@ -1594,6 +2302,14 @@ Address: %4
         <source>Debit</source>
         <translation>Дебет</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Загальний дебет</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Загальний кредит</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Комісія за транзакцію</translation>
@@ -1614,9 +2330,17 @@ Address: %4
         <source>Transaction ID</source>
         <translation>ID транзакції</translation>
     </message>
+    <message>
+        <source>Merchant</source>
+        <translation>Продавець</translation>
+    </message>
+    <message>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Після генерації монет, потрібно зачекати %1 блоків, перш ніж їх можна буде використати. Коли ви згенерували цей блок, його було відправлено в мережу для того, щоб він був доданий до ланцюжка блоків. Якщо ця процедура не вдасться, статус буде змінено на «не підтверджено» і ви не зможете витратити згенеровані монети. Таке може статись, якщо хтось інший згенерував блок на декілька секунд раніше.</translation>
+    </message>
     <message>
         <source>Debug information</source>
-        <translation>Отладочна інформація</translation>
+        <translation>Налагоджувальна інформація</translation>
     </message>
     <message>
         <source>Transaction</source>
@@ -1642,6 +2366,10 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>, ще не було успішно розіслано</translation>
     </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation><numerusform>Відкрито на %n блок</numerusform><numerusform>Відкрито на %n блоки</numerusform><numerusform>Відкрито на %n блоків</numerusform></translation>
+    </message>
     <message>
         <source>unknown</source>
         <translation>невідомо</translation>
@@ -1672,9 +2400,17 @@ Address: %4
         <source>Address</source>
         <translation>Адреса</translation>
     </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation>Незрілі (%1 підтверджень, будуть доступні після %2)</translation>
+    </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation><numerusform>Відкрито на %n блок</numerusform><numerusform>Відкрито на %n блоки</numerusform><numerusform>Відкрито на %n блоків</numerusform></translation>
+    </message>
     <message>
         <source>Open until %1</source>
-        <translation>Відкрити до %1</translation>
+        <translation>Відкрито до %1</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
@@ -1688,6 +2424,22 @@ Address: %4
         <source>Generated but not accepted</source>
         <translation>Згенеровано, але не підтверджено</translation>
     </message>
+    <message>
+        <source>Offline</source>
+        <translation>Поза мережею</translation>
+    </message>
+    <message>
+        <source>Unconfirmed</source>
+        <translation>Не підтверджено</translation>
+    </message>
+    <message>
+        <source>Confirming (%1 of %2 recommended confirmations)</source>
+        <translation>Підтверджується (%1 з %2 рекомендованих підтверджень)</translation>
+    </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>Суперечить</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>Отримані на</translation>
@@ -1708,6 +2460,10 @@ Address: %4
         <source>Mined</source>
         <translation>Добуті</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>тільки спостереження</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(недоступно)</translation>
@@ -1724,6 +2480,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>Тип транзакції.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Показує, чи було залучено адресу для спостереження в цій транзакції.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Адреса отримувача транзакції.</translation>
@@ -1815,6 +2575,30 @@ Address: %4
         <source>Show transaction details</source>
         <translation>Показати деталі транзакції</translation>
     </message>
+    <message>
+        <source>Export Transaction History</source>
+        <translation>Експортувати історію транзакцій</translation>
+    </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Для спостереження</translation>
+    </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Помилка експорту</translation>
+    </message>
+    <message>
+        <source>There was an error trying to save the transaction history to %1.</source>
+        <translation>Виникла помилка при спробі зберігання історії транзакцій до %1.</translation>
+    </message>
+    <message>
+        <source>Exporting Successful</source>
+        <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>
@@ -1854,10 +2638,18 @@ Address: %4
 </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>
-    </context>
+    <message>
+        <source>No wallet has been loaded.</source>
+        <translation>Гаманець не завантажувався</translation>
+    </message>
+</context>
 <context>
     <name>WalletModel</name>
     <message>
@@ -1869,7 +2661,7 @@ Address: %4
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp; Експорт</translation>
+        <translation>&amp;Експорт</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
@@ -1887,6 +2679,14 @@ Address: %4
         <source>Backup Failed</source>
         <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>
     <message>
         <source>Backup Successful</source>
         <translation>Успішне створення резервної копії</translation>
@@ -1898,26 +2698,10 @@ Address: %4
         <source>Options:</source>
         <translation>Параметри:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Вкажіть файл конфігурації (типово: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>Вкажіть pid-файл (типово: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Вкажіть робочий каталог</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>Чекати на з'єднання на &lt;port&gt; (типово: 8333 або тестова мережа: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Підтримувати не більше &lt;n&gt; зв'язків з колегами (типово: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Підключитись до вузла, щоб отримати список адрес інших учасників та від'єднатись</translation>
@@ -1926,18 +2710,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>Вкажіть вашу власну публічну адресу</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Поріг відключення неправильно під'єднаних пірів (типово: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Максимальній розмір вхідного буферу на одне з'єднання (типово: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>Прослуховувати &lt;port&gt; для JSON-RPC-з'єднань (типово: 8332 або тестова мережа: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Приймати команди із командного рядка та команди JSON-RPC</translation>
@@ -1952,24 +2724,84 @@ Address: %4
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Приймати з'єднання ззовні (за замовчуванням: 1, якщо ні-проксі або-з'єднання)</translation>
+        <translation>Приймати підключення ззовні (типово: 1 за відсутності -proxy чи -connect)</translation>
+    </message>
+    <message>
+        <source>%s, you must set a rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>%s, ви повинні встановити rpcpassword в файлі конфігурації:
+%s
+Рекомендується використати такий випадковий пароль:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(ви не повинні пам'ятати цей пароль)
+Ім’я користувача та пароль ПОВИННІ бути різними.
+Якщо файлу не існує, створіть його, обмеживши доступ правом читання для власника.
+Також рекомендується використовувати alertnotify для того, щоб отримувати сповіщення про проблеми;
+наприклад: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Прив'язка до даного адресою і завжди слухати на ньому. Використовуйте [господаря]: позначення порту для IPv6</translation>
+        <translation>Прив'язатися до даної адреси та прослуховувати її. Використовуйте запис виду [хост]:порт для IPv6</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>
+    <message>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation>Ввійти в режим регресивного тестування, що використовує спеціальний ланцюг з миттєвим знаходженням блоків.</translation>
     </message>
     <message>
         <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Помилка: транзакцію було відхилено. Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій.</translation>
     </message>
+    <message>
+        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
+        <translation>Помилка: Ця транзакція потребує додавання комісії щонайменше в %s через її розмір, складність, або внаслідок використання недавно отриманих коштів!</translation>
+    </message>
+    <message>
+        <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
+        <translation>Виконати команду, коли транзакція гаманця зміниться (замість %s в команді буде підставлено ідентифікатор транзакції)</translation>
+    </message>
+    <message>
+        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
+        <translation>В цьому режимі -genproclimit встановлює кількість блоків, що можуть бути згенеровані негайно.</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>Встановити кількість потоків скрипту перевірки (від %u до %d, 0 = автоматично, &lt;0 = вказує кількість вільних ядер, типово: %d)</translation>
+    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation>Це тест збірки попередньою версією - використовуйте на свій страх і ризик - не використовувати для гірничодобувних або торгових додатків</translation>
+        <translation>Це тестова збірка пре-релізної версії - використовуйте на свій страх і ризик - не застосовувати для добування монет або торгівлі</translation>
+    </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation>Неможливо прив'язатися до %s на цьому комп'ютері. Можливо, Bitcoin Core вже запущено.</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Увага: встановлено занадто велику комісію (-paytxfee). Комісія зніматиметься кожен раз коли ви проводитимете транзакції.</translation>
     </message>
+    <message>
+        <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
+        <translation>Увага: Частина мережі використовує інший головний ланцюжок! Деякі добувачі, можливо, зазнають проблем.</translation>
+    </message>
+    <message>
+        <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+        <translation>Увага: Наш ланцюжок блоків відрізняється від ланцюжків підключених учасників! Можливо, вам, або іншим вузлам, необхідно оновитися.</translation>
+    </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Увага: помилка читання wallet.dat! Всі ключі прочитано коректно, але дані транзакцій чи записи адресної книги можуть бути пропущені, або пошкоджені.</translation>
@@ -1978,6 +2810,18 @@ Address: %4
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Увага: файл wallet.dat пошкоджено, дані врятовано! Оригінальний wallet.dat збережено як wallet.{timestamp}.bak до %s; якщо Ваш баланс чи транзакції неправильні, Ви можете відновити їх з резервної копії. </translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Додати учасників, що під'єднуються з заданої підмережі чи IP-адреси, в білий список. Можна вказувати декілька разів.</translation>
+    </message>
+    <message>
+        <source>(default: 1)</source>
+        <translation>(типово: 1)</translation>
+    </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;category&gt; може бути:</translation>
+    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Спроба відновити закриті ключі з пошкодженого wallet.dat</translation>
@@ -1990,22 +2834,38 @@ Address: %4
         <source>Connect only to the specified node(s)</source>
         <translation>Підключитись лише до вказаного вузла</translation>
     </message>
+    <message>
+        <source>Connection options:</source>
+        <translation>Параметри з'єднання:</translation>
+    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Виявлено пошкоджений блок бази даних</translation>
     </message>
+    <message>
+        <source>Debugging/Testing options:</source>
+        <translation>Параметри тестування/налагодження:</translation>
+    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Відкрийте власну IP-адресу (за замовчуванням: 1, коли не чує і-externalip)</translation>
+        <translation>Визначити власну IP-адресу (типово: 1 при прослуховуванні та за відсутності -externalip)</translation>
+    </message>
+    <message>
+        <source>Do not load the wallet and disable wallet RPC calls</source>
+        <translation>Не завантажувати гаманець та вимкнути звернення до нього через RPC</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation>Ви хочете перебудувати базу даних блоку зараз?</translation>
+        <translation>Ви хочете перебудувати базу даних блоків зараз?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
         <translation>Помилка ініціалізації бази даних блоків</translation>
     </message>
+    <message>
+        <source>Error initializing wallet database environment %s!</source>
+        <translation>Помилка ініціалізації середовища бази даних гаманця %s!</translation>
+    </message>
     <message>
         <source>Error loading block database</source>
         <translation>Помилка завантаження бази даних блоків</translation>
@@ -2014,6 +2874,10 @@ Address: %4
         <source>Error opening block database</source>
         <translation>Помилка відкриття блоку бази даних </translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Помилка: Сталася фатальна помилка (детальніший опис наведено в debug.log)</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Помилка: Мало вільного місця на диску!</translation>
@@ -2023,153 +2887,289 @@ Address: %4
         <translation>Помилка: Гаманець заблокований, неможливо створити транзакцію!</translation>
     </message>
     <message>
-        <source>Error: system error: </source>
-        <translation>Помилка: системна помилка: </translation>
+        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
+        <translation>Не вдалося слухати на жодному порту. Використовуйте -listen=0, якщо ви хочете цього.</translation>
     </message>
     <message>
-        <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Не вдалося слухати на будь-якому порту. Використовуйте-слухати = 0, якщо ви хочете цього.</translation>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Якщо &lt;category&gt; не задано, виводить всю налагоджувальну інформацію.</translation>
     </message>
     <message>
-        <source>Failed to read block info</source>
-        <translation>Не вдалося розпізнати блок інформації </translation>
+        <source>Importing...</source>
+        <translation>Імпорт...</translation>
     </message>
     <message>
-        <source>Failed to read block</source>
-        <translation>Не вдалося розпізнати блок</translation>
+        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+        <translation>Початковий блок некоректний/відсутній. Чи правильно вказано каталог даних для обраної мережі?</translation>
     </message>
     <message>
-        <source>Failed to sync block index</source>
-        <translation>Не вдалося синхронізувати індекс блоку </translation>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>Помилка в адресі -onion: «%s»</translation>
     </message>
     <message>
-        <source>Failed to write block index</source>
-        <translation>Не вдалося записати індекс блоку</translation>
+        <source>Not enough file descriptors available.</source>
+        <translation>Бракує доступних дескрипторів файлів.</translation>
     </message>
     <message>
-        <source>Failed to write block info</source>
-        <translation>Не вдалося записати інформацію індекса</translation>
+        <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>Failed to write block</source>
-        <translation>Не вдалося записати блок</translation>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation>Перебудувати індекс ланцюжка блоків з поточних файлів blk000??.dat</translation>
     </message>
     <message>
-        <source>Failed to write file info</source>
-        <translation>Не вдалося записати інформацію файла</translation>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>Встановити розмір кешу бази даних в мегабайтах (від %d до %d, типово: %d)</translation>
     </message>
     <message>
-        <source>Failed to write to coin database</source>
-        <translation>Не вдалося записати до бази даних монет</translation>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>Встановити максимальний розмір блоку у байтах (типово: %d)</translation>
     </message>
     <message>
-        <source>Failed to write transaction index</source>
-        <translation>Не вдалося записати індекс транзакції</translation>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>Вкажіть файл гаманця (в межах каталогу даних)</translation>
     </message>
     <message>
-        <source>Failed to write undo data</source>
-        <translation>Не вдалося записати скасувати дані</translation>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Це призначено для інструментів регресивного тестування та розробки додатків.</translation>
     </message>
     <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>Генерація монети (за замовчуванням: 0)</translation>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Намагатись використовувати UPnP для відображення порту, що прослуховується, на роутері (типово: %u)</translation>
     </message>
     <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Скільки блоків перевіряти під час запуску (типово: 288, 0 = всі)</translation>
+        <source>Verifying blocks...</source>
+        <translation>Перевірка блоків...</translation>
     </message>
     <message>
-        <source>Not enough file descriptors available.</source>
-        <translation>Бракує дескрипторів файлів, доступних.</translation>
+        <source>Verifying wallet...</source>
+        <translation>Перевірка гаманця... </translation>
     </message>
     <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Встановити число потоків до дзвінків служба RPC (за замовчуванням: 4)</translation>
+        <source>Wallet %s resides outside data directory %s</source>
+        <translation>Гаманець %s знаходиться поза каталогом даних %s</translation>
     </message>
     <message>
-        <source>Verifying blocks...</source>
-        <translation>Перевірка блоків...</translation>
+        <source>Wallet options:</source>
+        <translation>Параметри гаманця:</translation>
     </message>
     <message>
-        <source>Verifying wallet...</source>
-        <translation>Перевірка гаманця... </translation>
+        <source>You need to rebuild the database using -reindex to change -txindex</source>
+        <translation>Вам необхідно перебудувати базу даних з використанням -reindex для того, щоб змінити -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Імпорт блоків з зовнішнього файлу blk000??.dat</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Дозволити підключення по протоколу JSON-RPC зі вказаного джерела. Правильною для &lt;ip&gt; є окрема IP-адреса (наприклад, 1.2.3.4), IP-адреса та маска підмережі (наприклад, 1.2.3.4/255.255.255.0) або CIDR-адреса (наприклад, 1.2.3.4/24). Цей параметр можна вказувати декілька разів.</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Сталася помилка при спробі відкрити порт RPC-адреси %s:%u для прослуховування: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Прив'язатися до даної адреси та вносити до білого списку учасників, що під'єднуються до неї. Використовуйте запис виду [хост]:порт для IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Прив'язатися до даної адреси для прослуховування JSON-RPC підключень. Використовуйте запис виду [хост]:порт для IPv6. Цей параметр можна вказувати декілька разів (типово: прив'язуватися до всіх інтерфейсів)</translation>
+    </message>
+    <message>
+        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
+        <translation>Не вдалося встановити блокування на каталог даних %s. Bitcoin Core, ймовірно, вже запущений.</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>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Створювати нові файли з типовими для системи атрибутами доступу замість маски 077 (діє тільки при вимкненому гаманці)</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Поширюється за ліцензією MIT/X11, додаткова інформація міститься у файлі COPYING, а також за адресою &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Помилка: Не вдалося налаштувати прослуховування вхідних підключень (listen повернув помилку: %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Помилка: Параметр -socks не підтримується. Можливість вказувати версію SOCKS було видалено, так як підтримується лише SOCKS5.</translation>
+    </message>
+    <message>
+        <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+        <translation>Виконати команду при надходженні важливого попереджувального повідомлення або при спостереженні тривалого розгалуження ланцюжка (замість %s буде підставлено повідомлення)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Комісії (в BTC/КБ), що менші за вказану, вважатимуться нульовими (для ретрансляції) (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Комісії (в BTC/КБ), що менші за вказану, вважатимуться нульовими (для створення транзакції) (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Дізнаватися адреси учасників через DNS при замалій кількості відомих адрес (типово: 1 за відсутності -connect)</translation>
+    </message>
+    <message>
+        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+        <translation>Встановити максимальний розмір транзакцій з високим пріоритетом та низькою комісією (в байтах) (типово: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL &lt;https://www.openssl.org/&gt;, криптографічне програмне забезпечення, написане Еріком Янгом, та функції для роботи з UPnP, написані Томасом Бернардом.</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>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Учасники, що знаходяться в білому списку, не можуть бути заблоковані за DoS та їхні транзакції завжди ретранслюватимуться (навіть якщо вони є в пам'яті), що може бути корисним, наприклад, для шлюзу</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Не вдалося розпізнати адресу для -whitebind: «%s»</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Підключитись через SOCKS5-проксі</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>(C) 2009-%i Розробники Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Неможливо розпізнати мережеву адресу для параметру -rpcbind (%s)</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Помилка при завантаженні wallet.dat: Гаманець потребує новішої версії Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Помилка: Параметр -tor не підтримується, використовуйте -onion</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Комісія (в BTC/КБ), що додаватиметься до вихідних транзакцій (типово: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Інформація</translation>
     </message>
     <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Підтримувати індекс повний транзакцій (за замовчуванням: 0)</translation>
+        <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>Вказано некоректну суму для параметру -minrelaytxfee: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Вказано некоректну суму для параметру -mintxfee: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Вказано некоректну суму для параметру -paytxfee: '%s' (повинно бути щонайменше %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Вказано неправильну маску підмережі для -whitelist: «%s»</translation>
     </message>
     <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Максимальний буфер, &lt;n&gt;*1000 байт (типово: 5000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Утримувати в пам'яті щонайбільше &lt;n&gt; блоків, не під'єднаних до основного ланцюжка (типово: %u)</translation>
     </message>
     <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Максимальній розмір вихідного буферу на одне з'єднання, &lt;n&gt;*1000 байт (типово: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Утримувати в пам'яті щонайбільше &lt;n&gt; транзакцій, що споживають невідомі входи (типово: %u)</translation>
     </message>
     <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Тільки приймати блок відповідності ланцюга вбудованих контрольно-пропускних пунктів (за замовчуванням: 1)</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Необхідно вказати порт для -whitebind: «%s»</translation>
     </message>
     <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Підключити тільки до вузлів в мережі &lt;net&gt; (IPv4, IPv6 або Tor)</translation>
+        <source>Node relay options:</source>
+        <translation>Параметри вузла ретрансляції:</translation>
+    </message>
+    <message>
+        <source>Print block on startup, if found in block index</source>
+        <translation>Роздрукувати блок під час запуску (якщо він буде знайдений в індексі)</translation>
+    </message>
+    <message>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>Параметри RPC SSL: (див. Bitcoin Wiki для налаштування SSL)</translation>
+    </message>
+    <message>
+        <source>RPC server options:</source>
+        <translation>Параметри сервера RPC:</translation>
+    </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Випадковим чином відкидати 1 з &lt;n&gt; мережевих повідомлень</translation>
+    </message>
+    <message>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>Випадковим чином пошкоджувати 1 з &lt;n&gt; мережевих повідомлень</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Відсилати налагоджувальну інформацію на консоль, а не у файл debug.log</translation>
     </message>
     <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Встановити мінімальний розмір блоку у байтах (типово: 0)</translation>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Показати всі налагоджувальні параметри (використання: --help -help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Стискати файл debug.log під час старту клієнта (типово: 1 коли відсутутній параметр -debug)</translation>
+        <translation>Стискати файл debug.log під час старту клієнта (типово: 1 коли відсутній параметр -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation>Підписання угоди не вдалося</translation>
-    </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Вказати тайм-аут підключення у мілісекундах (типово: 5000)</translation>
+        <translation>Підписання транзакції не вдалося</translation>
     </message>
     <message>
-        <source>System error: </source>
-        <translation>Системна помилка: </translation>
+        <source>This is experimental software.</source>
+        <translation>Це програмне забезпечення є експериментальним.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation>Сума угоди занадто малий</translation>
+        <translation>Сума транзакції занадто мала</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation>Суми угоди має бути позитивним</translation>
+        <translation>Суми монет у транзакції мають бути позитивними</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation>Угода занадто великий</translation>
+        <translation>Транзакція занадто велика</translation>
     </message>
     <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Намагатись використовувати UPnP для відображення порту, що прослуховується на роутері (default: 0)</translation>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Неможливо прив'язатися до %s на цьому комп'ютері (bind повернув помилку: %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Намагатись використовувати UPnP для відображення порту, що прослуховується на роутері (default: 1 when listening)</translation>
+        <translation>Намагатись використовувати UPnP для відображення порту, що прослуховується на роутері (типово: 1 коли прослуховується)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Ім'я користувача для JSON-RPC-з'єднань</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Потрібно перезаписати гаманець: перезапустіть Bitcoin Core для завершення</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Попередження</translation>
@@ -2178,6 +3178,22 @@ Address: %4
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Увага: Поточна версія застаріла, необхідне оновлення!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Увага: Параметр -benchmark не підтримується та буде проігнорований, використовуйте -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Увага: Параметр -debugnet не підтримується та буде проігнорований, використовуйте -debug=net.</translation>
+    </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>Видалення всіх транзакцій з гаманця...</translation>
+    </message>
+    <message>
+        <source>on startup</source>
+        <translation>під час запуску</translation>
+    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat пошкоджено, відновлення не вдалося</translation>
@@ -2192,11 +3208,7 @@ Address: %4
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
-        <translation>Модернізувати гаманець до останнього формату</translation>
-    </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Встановити розмір пулу ключів &lt;n&gt; (типово: 100)</translation>
+        <translation>Модернізувати гаманець до найновішого формату</translation>
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
@@ -2206,14 +3218,6 @@ Address: %4
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Використовувати OpenSSL (https) для JSON-RPC-з'єднань</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Файл сертифіката сервера (типово: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Закритий ключ сервера (типово: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Дана довідка</translation>
@@ -2230,18 +3234,194 @@ Address: %4
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Помилка при завантаженні wallet.dat: Гаманець пошкоджено</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = утримувати метадані транзакцій (до яких відноситься інформація про власника рахунку та запити платежів), 2 - відкинути)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Записувати зміни в базі даних до файлу кожні &lt;n&gt; мегабайтів (типово: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Рівень ретельності перевірки блоків (0-4, типово: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Якщо параметр paytxfee не встановлено, включити комісію, достатню для підтвердження транзакцій протягом n блоків (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Записувати в лог-файл пріоритет транзакції та комісію за кБ під час добування блоків (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Утримувати повний індекс транзакцій (використовується RPC-викликом getrawtransaction) (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Час в секундах, протягом якого відключені учасники з поганою поведінкою не зможуть підключитися (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Виводити налагоджувальну інформацію (типово: %u, вказання &lt;category&gt; необов'язкове)</translation>
+    </message>
+    <message>
+        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
+        <translation>Встановити максимальну кількість процесорів, що будуть використовуватися при ввімкненій генерації (-1 = необмежено, типово: %d)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Використовувати окремий SOCKS5-проксі для з'єднання з учасниками через приховані сервіси Tor (типово: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(типово: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Допустимі шифри (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Завжди дізнаватися адреси учасників через DNS (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Вимкнути безпечний режим та ігнорувати події, що здатні ввімкнути його (типово: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Помилка при завантаженні wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Ввімкнути безпечний режим (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Генерація монет (типово: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Скільки блоків перевіряти під час запуску (типово: %u, 0 = всі)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Включити IP-адреси до налагоджувального виводу (типово: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Помилка в адресі проксі-сервера: «%s»</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Обмежити розмір кешу підписів до &lt;n&gt; записів (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Прослуховувати &lt;port&gt; для JSON-RPC з'єднань (типово: %u, для тестової мережі: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Чекати на з'єднання на &lt;port&gt; (типово: %u, для тестової мережі: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Підтримувати щонайбільше &lt;n&gt; з'єднань з учасниками (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальний розмір вхідного буферу на одне з'єднання, &lt;n&gt;*1000 байтів (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальний розмір вихідного буферу на одне з'єднання, &lt;n&gt;*1000 байтів (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Приймати тільки той ланцюжок блоків, що не суперечить вбудованим контрольним точкам (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Доповнювати налагоджувальний вивід відміткою часу (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Роздрукувати дерево блоків під час запуску (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Ретранслювати та створювати транзакції носіїв даних (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Ретранслювати не-P2SH транзакції з мультипідписом (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Запустити потік для періодичного збереження даних гаманця (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Файл сертифіката сервера (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Закритий ключ сервера (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Встановити розмір пулу ключів &lt;n&gt; (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Встановити мінімальний розмір блоку в байтах (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Встановити число потоків для обслуговування викликів RPC (типово: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Встановити прапорець DB_PRIVATE в середовищі бази даних гаманця (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Вказати файл конфігурації (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Вказати тайм-аут підключення в мілісекундах (щонайменше: 1, типово: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Вказати pid-файл (типово: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Витрачати непідтверджену решту при відправленні транзакцій (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Вимкнутися після імпорту блоків з диску (типово: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Поріг відключення учасників з поганою поведінкою (типово: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Невідома мережа вказана в -onlynet: «%s»</translation>
     </message>
+    <message>
+        <source>Cannot resolve -bind address: '%s'</source>
+        <translation>Не вдалося розпізнати адресу для -bind: «%s»</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -externalip address: '%s'</source>
+        <translation>Не вдалося розпізнати адресу для -externalip: «%s»</translation>
+    </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Помилка у величині комісії -paytxfee=&lt;amount&gt;: «%s»</translation>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index ab9106ca0361..5bf7ce434430 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -9,6 +9,34 @@
         <source>Create a new address</source>
         <translation>نیا ایڈریس بنائیں</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>نیا</translation>
+    </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>نقل</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>بند</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>کاپی پتہ</translation>
+    </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>برآمد</translation>
+    </message>
+    <message>
+        <source>&amp;Delete</source>
+        <translation>مٹا</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>چننا</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
@@ -291,6 +319,10 @@
     </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>برآمد</translation>
+    </message>
     </context>
 <context>
     <name>bitcoin-core</name>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 1a4d9f8108ae..ab4439b419ce 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Экспорт қилиб бўлмади</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Манзил рўйхатини %1.га сақлашда хатолик юз берди. Яна уриниб кўринг.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -167,6 +171,10 @@
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Ҳамёнингизни кодлашни ростдан хоҳлайсизми?</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>МУҲИМ: Сиз қилган олдинги ҳамён файли заҳиралари янги яратилган, кодланган ҳамён файли билан алмаштирилиши керак. Хавфсизлик сабабларига кўра олдинги кодланган ҳамён файли заҳираси янги кодланган ҳамёндан фойдаланишингиз билан яроқсиз ҳолга келади.</translation>
+    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Диққат: Caps Lock тугмаси ёқилган!</translation>
@@ -196,300 +204,1216 @@
         <translation>Киритилган пароллар мос келмади.</translation>
     </message>
     <message>
-        <source>Wallet unlock failed</source>
-        <translation>Ҳамённи қулфдан чиқариш амалга ошмади</translation>
+        <source>Wallet unlock failed</source>
+        <translation>Ҳамённи қулфдан чиқариш амалга ошмади</translation>
+    </message>
+    <message>
+        <source>The passphrase entered for the wallet decryption was incorrect.</source>
+        <translation>Ҳамённи коддан чиқариш учун киритилган парол нотўғри.</translation>
+    </message>
+    <message>
+        <source>Wallet decryption failed</source>
+        <translation>Ҳамённи коддан чиқариш амалга ошмади</translation>
+    </message>
+    <message>
+        <source>Wallet passphrase was successfully changed.</source>
+        <translation>Ҳамён пароли муваффақиятли алмаштирилди.</translation>
+    </message>
+</context>
+<context>
+    <name>BitcoinGUI</name>
+    <message>
+        <source>Sign &amp;message...</source>
+        <translation>&amp;Хабар ёзиш...</translation>
+    </message>
+    <message>
+        <source>Synchronizing with network...</source>
+        <translation>Тармоқ билан синхронланмоқда...</translation>
+    </message>
+    <message>
+        <source>&amp;Overview</source>
+        <translation>&amp;Кўриб чиқиш</translation>
+    </message>
+    <message>
+        <source>Node</source>
+        <translation>Улам</translation>
+    </message>
+    <message>
+        <source>Show general overview of wallet</source>
+        <translation>Ҳамённинг умумий кўринишини кўрсатиш</translation>
+    </message>
+    <message>
+        <source>&amp;Transactions</source>
+        <translation>&amp;Пул ўтказмалари</translation>
+    </message>
+    <message>
+        <source>Browse transaction history</source>
+        <translation>Пул ўтказмалари тарихини кўриш</translation>
+    </message>
+    <message>
+        <source>E&amp;xit</source>
+        <translation>Ч&amp;иқиш</translation>
+    </message>
+    <message>
+        <source>Quit application</source>
+        <translation>Иловадан чиқиш</translation>
+    </message>
+    <message>
+        <source>About &amp;Qt</source>
+        <translation>&amp;Qt ҳақида</translation>
+    </message>
+    <message>
+        <source>Show information about Qt</source>
+        <translation>Qt ҳақидаги маълумотларни кўрсатиш</translation>
+    </message>
+    <message>
+        <source>&amp;Options...</source>
+        <translation>&amp;Мосламалар...</translation>
+    </message>
+    <message>
+        <source>&amp;Encrypt Wallet...</source>
+        <translation>Ҳамённи &amp;кодлаш...</translation>
+    </message>
+    <message>
+        <source>&amp;Backup Wallet...</source>
+        <translation>Ҳамённи &amp;заҳиралаш...</translation>
+    </message>
+    <message>
+        <source>&amp;Change Passphrase...</source>
+        <translation>Махфий сўзни &amp;ўзгартириш...</translation>
+    </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>&amp;Жўнатилувчи манзиллар...</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>&amp;Қабул қилувчи манзиллар...</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Интернет манзилни очиш</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin асос мижози</translation>
+    </message>
+    <message>
+        <source>Importing blocks from disk...</source>
+        <translation>Дискдан блоклар импорт қилинмоқда...</translation>
+    </message>
+    <message>
+        <source>Reindexing blocks on disk...</source>
+        <translation>Дискдаги блоклар қайта индексланмоқда...</translation>
+    </message>
+    <message>
+        <source>Send coins to a Bitcoin address</source>
+        <translation>Тангаларни Bitcoin манзилига жўнатиш</translation>
+    </message>
+    <message>
+        <source>Modify configuration options for Bitcoin</source>
+        <translation>Bitcoin учун мослаш танловларини ўзгартириш</translation>
+    </message>
+    <message>
+        <source>Backup wallet to another location</source>
+        <translation>Ҳамённи бошқа манзилга заҳиралаш</translation>
+    </message>
+    <message>
+        <source>Change the passphrase used for wallet encryption</source>
+        <translation>Паролни ўзгартириш ҳамённи кодлашда фойдаланилади</translation>
+    </message>
+    <message>
+        <source>&amp;Debug window</source>
+        <translation>&amp;Носозликни ҳал қилиш ойнаси</translation>
+    </message>
+    <message>
+        <source>Open debugging and diagnostic console</source>
+        <translation>Носозликни ҳал қилиш ва ташхис терминали</translation>
+    </message>
+    <message>
+        <source>&amp;Verify message...</source>
+        <translation>Хабарни &amp;тасдиқлаш...</translation>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Bitcoin</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Ҳамён</translation>
+    </message>
+    <message>
+        <source>&amp;Send</source>
+        <translation>&amp;Жўнатиш</translation>
+    </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>&amp;Қабул қилиш</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Bitcoin Core ҳақидаги маълумотларни кўрсатиш</translation>
+    </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>&amp;Кўрсатиш / Яшириш</translation>
+    </message>
+    <message>
+        <source>Show or hide the main Window</source>
+        <translation>Асосий ойнани кўрсатиш ёки яшириш</translation>
+    </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>Ҳамёнингизга тегишли махфий калитларни кодлаш</translation>
+    </message>
+    <message>
+        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+        <translation>Bitcoin манзилидан унинг эгаси эканлигингизни исботлаш учун хабарлар ёзинг</translation>
+    </message>
+    <message>
+        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+        <translation>Хабарларни махсус Bitcoin манзилларингиз билан ёзилганлигига ишонч ҳосил қилиш учун уларни тасдиқланг</translation>
+    </message>
+    <message>
+        <source>&amp;File</source>
+        <translation>&amp;Файл</translation>
+    </message>
+    <message>
+        <source>&amp;Settings</source>
+        <translation>&amp; Созламалар</translation>
+    </message>
+    <message>
+        <source>&amp;Help</source>
+        <translation>&amp;Ёрдам</translation>
+    </message>
+    <message>
+        <source>Tabs toolbar</source>
+        <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 кодлари ва bitcoin ёрдамида яратишлар: URI’лар) сўраш</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>Bitcoin Core &amp;ҳақида</translation>
+    </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>Фойдаланилган жўнатилган манзиллар ва ёрлиқлар рўйхатини кўрсатиш</translation>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation>Фойдаланилган қабул қилинган манзиллар ва ёрлиқлар рўйхатини кўрсатиш</translation>
+    </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation>Bitcoin’ни очиш: URI ёки тўлов сўрови</translation>
+    </message>
+    <message>
+        <source>&amp;Command-line options</source>
+        <translation>&amp;Буйруқлар сатри мосламалари</translation>
+    </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>Мавжуд Bitcoin буйруқлар матни мосламалари билан  Bitcoin Core ёрдам хабарларини олиш рўйхатини кўрсатиш</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n active connection(s) to Bitcoin network</source>
+        <translation><numerusform>%n та Bitcoin тармоғига фаол уланиш мавжуд</numerusform></translation>
+    </message>
+    <message>
+        <source>No block source available...</source>
+        <translation>Блок манбалари мавжуд эмас...</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n соат</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n кун</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><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></translation>
+    </message>
+    <message>
+        <source>%1 behind</source>
+        <translation>%1 орқада</translation>
+    </message>
+    <message>
+        <source>Last received block was generated %1 ago.</source>
+        <translation>Сўнги қабул қилинган блок %1 олдин яратилган.</translation>
+    </message>
+    <message>
+        <source>Transactions after this will not yet be visible.</source>
+        <translation>Бундан кейинги пул ўтказмалари кўринмайдиган бўлади.</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Хатолик</translation>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation>Диққат</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Маълумот</translation>
+    </message>
+    <message>
+        <source>Up to date</source>
+        <translation>Янгиланган</translation>
+    </message>
+    <message>
+        <source>Catching up...</source>
+        <translation>Банд қилинмоқда...</translation>
+    </message>
+    <message>
+        <source>Sent transaction</source>
+        <translation>Жўнатилган операция</translation>
+    </message>
+    <message>
+        <source>Incoming transaction</source>
+        <translation>Кирувчи операция</translation>
+    </message>
+    <message>
+        <source>Date: %1
+Amount: %2
+Type: %3
+Address: %4
+</source>
+        <translation>Санаси: %1
+Миқдори: %2
+Тури: %3
+Манзили: %4
+</translation>
+    </message>
+    <message>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфдан чиқарилган&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфланган&lt;/b&gt;</translation>
+    </message>
+</context>
+<context>
+    <name>ClientModel</name>
+    <message>
+        <source>Network Alert</source>
+        <translation>Тармоқ огоҳлантиргичи</translation>
+    </message>
+</context>
+<context>
+    <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Control Address Selection</source>
+        <translation>Танга бошқарув манзилини танлаш</translation>
+    </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Сони:</translation>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Байт:</translation>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Миқдори:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Муҳимлиги:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Солиқ:</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Ахлат қутиси:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Солиқдан сўнг:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Ўзгартириш:</translation>
+    </message>
+    <message>
+        <source>(un)select all</source>
+        <translation>барчасини танаш (бекор қилиш)</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Дарахт усулида</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Рўйхат усулида</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Манзил</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Сана</translation>
+    </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Тасдиқлашлар</translation>
+    </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Тасдиқланди</translation>
+    </message>
+    <message>
+        <source>Priority</source>
+        <translation>Муҳимлиги</translation>
+    </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Манзилни нусхалаш</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Ёрликни нусхала</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Кийматни нусхала</translation>
+    </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation>Ўтказам рақамидан нусха олиш</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>Copy change</source>
+        <translation>Нусха қайтими</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation>энг юқори</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>юқорирок</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>юқори</translation>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation>ўртача-юқори</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>ўрта</translation>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation>паст-юқори</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>паст</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>пастроқ</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>энг паст</translation>
+    </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation>(%1 қулфланган)</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>йўқ</translation>
+    </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Ҳар бир кирим +/- %1 сатоши(лар) билан ўзгариши мумкин.</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>ҳа</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>йўқ</translation>
+    </message>
+    <message>
+        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
+        <translation>Агар ўтказманинг ҳажми 1000 байтдан ошса, ёрлиқ қизаради.</translation>
+    </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation>Бу дегани солиқ ҳар кб учун камида %1  талаб қилинади.</translation>
+    </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</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>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Агар муҳимлиги "ўртача"дан паст бўлса, ушбу ёрлиқ қизил бўлиб ёнади.</translation>
+    </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation>Агар қабул қилувчи %1дан кичик миқдорни қабул қилса, ушбу ёрлиқ қизил бўлиб ёнади.</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(Ёрлик мавжуд эмас)</translation>
+    </message>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation>%1 (%2)дан ўзгартириш</translation>
+    </message>
+    <message>
+        <source>(change)</source>
+        <translation>(ўзгартириш)</translation>
+    </message>
+</context>
+<context>
+    <name>EditAddressDialog</name>
+    <message>
+        <source>Edit Address</source>
+        <translation>Манзилларни таҳрирлаш</translation>
+    </message>
+    <message>
+        <source>&amp;Label</source>
+        <translation>&amp;Ёрлик</translation>
+    </message>
+    <message>
+        <source>The label associated with this address list entry</source>
+        <translation>Ёрлиқ ушбу манзилар рўйхати ёзуви билан боғланган</translation>
+    </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation>Манзил ушбу манзиллар рўйхати ёзуви билан боғланган. Уни фақат жўнатиладиган манзиллар учун ўзгартирса бўлади.</translation>
+    </message>
+    <message>
+        <source>&amp;Address</source>
+        <translation>&amp;Манзил</translation>
+    </message>
+    <message>
+        <source>New receiving address</source>
+        <translation>Янги кабул килувчи манзил</translation>
+    </message>
+    <message>
+        <source>New sending address</source>
+        <translation>Янги жунатилувчи манзил</translation>
+    </message>
+    <message>
+        <source>Edit receiving address</source>
+        <translation>Кабул килувчи манзилни тахрирлаш</translation>
+    </message>
+    <message>
+        <source>Edit sending address</source>
+        <translation>Жунатилувчи манзилни тахрирлаш</translation>
+    </message>
+    <message>
+        <source>The entered address "%1" is already in the address book.</source>
+        <translation>Киритилган "%1" манзили аллақачон манзил китобида.</translation>
+    </message>
+    <message>
+        <source>The entered address "%1" is not a valid Bitcoin address.</source>
+        <translation>Киритилган "%1" манзили тўғри Bitcoin манзили эмас.</translation>
+    </message>
+    <message>
+        <source>Could not unlock wallet.</source>
+        <translation>Ҳамён қулфдан чиқмади.</translation>
+    </message>
+    <message>
+        <source>New key generation failed.</source>
+        <translation>Янги калит яратиш амалга ошмади.</translation>
+    </message>
+</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>
+    <message>
+        <source>Path already exists, and is not a directory.</source>
+        <translation>Йўл аллақачон мавжуд. У директория эмас.</translation>
+    </message>
+    <message>
+        <source>Cannot create data directory here.</source>
+        <translation>Маълумотлар директориясини бу ерда яратиб бўлмайди..</translation>
+    </message>
+</context>
+<context>
+    <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>version</source>
+        <translation>версияси</translation>
+    </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Bitcoin Core ҳақида</translation>
+    </message>
+    <message>
+        <source>Usage:</source>
+        <translation>Фойдаланиш:</translation>
+    </message>
+    <message>
+        <source>command-line options</source>
+        <translation>буйруқлар қатори орқали мослаш</translation>
+    </message>
+    <message>
+        <source>UI options</source>
+        <translation>UI мосламалари</translation>
+    </message>
+    <message>
+        <source>Start minimized</source>
+        <translation>Йиғилганларни бошлаш</translation>
+    </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Тўлов сўровлари учун SSL асос сертификатларини ўрнатиш (стандарт: -system-)</translation>
+    </message>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation>Ишга тушиш вақтида маълумотлар директориясини танлаш (стандарт: 0)</translation>
+    </message>
+</context>
+<context>
+    <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>Хуш келибсиз</translation>
+    </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>"Bitcoin Core"га хуш келибсиз.</translation>
+    </message>
+    <message>
+        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
+        <translation>Биринчи марта дастур ишга тушгани каби сиз Bitcoin Core маълумотларини жойлаштирадиган жойни танлашингиз мумкин.</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+        <translation>Bitcoin Core юклаб олинади ва Bitcoin блок занжири нусхаси жойлаштирилади. Камида %1GB  маълумот ушбу директорияга жойлаштирилади ва вақт давомида ўсиб боради. Ҳамён ҳам ушбу директорияда жойлашади.</translation>
+    </message>
+    <message>
+        <source>Use the default data directory</source>
+        <translation>Стандарт маълумотлар директориясидан фойдаланиш</translation>
+    </message>
+    <message>
+        <source>Use a custom data directory:</source>
+        <translation>Бошқа маълумотлар директориясида фойдаланинг:</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Хато: кўрсатилган "%1" маълумотлар директориясини яратиб бўлмайди.</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Хатолик</translation>
+    </message>
+    </context>
+<context>
+    <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation>URI ни очиш</translation>
+    </message>
+    <message>
+        <source>Open payment request from URI or file</source>
+        <translation>URL файлдан тўлов сўровларини очиш</translation>
+    </message>
+    <message>
+        <source>URI:</source>
+        <translation>URI:</translation>
+    </message>
+    <message>
+        <source>Select payment request file</source>
+        <translation>Тўлов сўрови файлини танлаш</translation>
+    </message>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation>Очиш учун тўлов сўрови файлини танлаш</translation>
+    </message>
+</context>
+<context>
+    <name>OptionsDialog</name>
+    <message>
+        <source>Options</source>
+        <translation>Танламалар</translation>
+    </message>
+    <message>
+        <source>&amp;Main</source>
+        <translation>&amp;Асосий</translation>
+    </message>
+    <message>
+        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
+        <translation>Ҳар бир кб учун ўтказма солиғи ўтказмаларингизни тезроқ ўтишига ишонишингизга ёрдам беради. Кўпгина ўтказмалар 1 кб.</translation>
+    </message>
+    <message>
+        <source>Pay transaction &amp;fee</source>
+        <translation>Ўтказма &amp;солиғини тўлаш</translation>
+    </message>
+    <message>
+        <source>Automatically start Bitcoin after logging in to the system.</source>
+        <translation>Тизимга киргандан сўнг Bitcoin дастури автоматик ишга туширилсин.</translation>
+    </message>
+    <message>
+        <source>&amp;Start Bitcoin on system login</source>
+        <translation>Тизимга кирганда Bitcoin &amp;ишга туширилсин</translation>
+    </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>&amp;Маълумотлар базаси кеши</translation>
+    </message>
+    <message>
+        <source>MB</source>
+        <translation>МБ</translation>
+    </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>Мавзуларни &amp;тўғрилаш скрипти миқдори</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Ташқаридан уланишларга рози бўлиш</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Кирувчи уланишларга рухсат бериш</translation>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
+        <translation>Bitcoin тармоққа SOCKS прокси орқали уланинг.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
+        <translation>SOCKS прокси орқали &amp;уланинг (стандарт прокси):</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>Прокси IP манзили (масалан: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Бегона тараф ўтказмалари URL манзиллари</translation>
+    </message>
+    <message>
+        <source>Proxy &amp;IP:</source>
+        <translation>Прокси &amp;IP рақами:</translation>
+    </message>
+    <message>
+        <source>&amp;Port:</source>
+        <translation>&amp;Порт:</translation>
+    </message>
+    <message>
+        <source>Port of the proxy (e.g. 9050)</source>
+        <translation>Прокси порти (e.g. 9050)</translation>
+    </message>
+    <message>
+        <source>&amp;Window</source>
+        <translation>&amp;Ойна</translation>
+    </message>
+    <message>
+        <source>Show only a tray icon after minimizing the window.</source>
+        <translation>Ойна йиғилгандан сўнг фақат трэй нишончаси кўрсатилсин.</translation>
+    </message>
+    <message>
+        <source>&amp;Minimize to the tray instead of the taskbar</source>
+        <translation>Манзиллар панели ўрнига трэйни &amp;йиғиш</translation>
+    </message>
+    <message>
+        <source>M&amp;inimize on close</source>
+        <translation>Ёпишда й&amp;иғиш</translation>
+    </message>
+    <message>
+        <source>&amp;Display</source>
+        <translation>&amp;Кўрсатиш</translation>
+    </message>
+    <message>
+        <source>User Interface &amp;language:</source>
+        <translation>Фойдаланувчи интерфейси &amp;тили:</translation>
+    </message>
+    <message>
+        <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
+        <translation>Фойдаланувчи тили интерфесини шу ерда ўрнатиш мумкин. TУшбу созлама Bitcoin қайта ишга туширилганда кучга киради.</translation>
+    </message>
+    <message>
+        <source>&amp;Unit to show amounts in:</source>
+        <translation>Миқдорларни кўрсатиш учун &amp;қисм:</translation>
+    </message>
+    <message>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Бекор қилиш</translation>
+    </message>
+    <message>
+        <source>default</source>
+        <translation>стандарт</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>йўқ</translation>
+    </message>
+    <message>
+        <source>Confirm options reset</source>
+        <translation>Тасдиқлаш танловларини рад қилиш</translation>
+    </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>Ўзгаришлар амалга ошиши учун мижозни қайта ишга тушириш талаб қилинади.</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>Мижоз ўчирилади. Давом эттиришни хоҳлайсизми?</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>Ушбу ўзгариш мижозни қайтадан ишга туширишни талаб қилади.</translation>
+    </message>
+    <message>
+        <source>The supplied proxy address is invalid.</source>
+        <translation>Келтирилган прокси манзили ишламайди.</translation>
+    </message>
+</context>
+<context>
+    <name>OverviewPage</name>
+    <message>
+        <source>Form</source>
+        <translation>Шакл</translation>
+    </message>
+    <message>
+        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
+        <translation>Кўрсатилган маълумот эскирган бўлиши мумкин. Ҳамёнингиз алоқа ўрнатилгандан сўнг Bitcoin тармоқ билан автоматик тарзда синхронланади, аммо жараён ҳалигача тугалланмади.</translation>
+    </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Фақат кўришга</translation>
+    </message>
+    <message>
+        <source>Available:</source>
+        <translation>Мавжуд:</translation>
+    </message>
+    <message>
+        <source>Your current spendable balance</source>
+        <translation>Жорий сарфланадиган балансингиз</translation>
+    </message>
+    <message>
+        <source>Pending:</source>
+        <translation>Кутилмоқда:</translation>
+    </message>
+    <message>
+        <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
+        <translation>Жами ўтказмалар ҳозиргача тасдиқланган ва сафланадиган баланс томонга ҳали ҳам ҳисобланмади</translation>
+    </message>
+    <message>
+        <source>Immature:</source>
+        <translation>Тайёр эмас:</translation>
+    </message>
+    <message>
+        <source>Mined balance that has not yet matured</source>
+        <translation>Миналаштирилган баланс ҳалигача тайёр эмас</translation>
+    </message>
+    <message>
+        <source>Balances</source>
+        <translation>Баланслар</translation>
+    </message>
+    <message>
+        <source>Total:</source>
+        <translation>Жами:</translation>
+    </message>
+    <message>
+        <source>Your current total balance</source>
+        <translation>Жорий умумий балансингиз</translation>
+    </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Жорий балансингиз фақат кўринадиган манзилларда</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Сарфланадиган:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Сўнгги пул ўтказмалари</translation>
+    </message>
+    </context>
+<context>
+    <name>PaymentServer</name>
+    </context>
+<context>
+    <name>PeerTableModel</name>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping вақти</translation>
+    </message>
+</context>
+<context>
+    <name>QObject</name>
+    <message>
+        <source>Amount</source>
+        <translation>Миқдори</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 д</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 с</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>ТАРМОҚ</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>НОМАЪЛУМ</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Йўқ</translation>
     </message>
     <message>
-        <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>Ҳамённи коддан чиқариш учун киритилган парол нотўғри.</translation>
+        <source>N/A</source>
+        <translation>Тўғри келмайди</translation>
     </message>
     <message>
-        <source>Wallet decryption failed</source>
-        <translation>Ҳамённи коддан чиқариш амалга ошмади</translation>
+        <source>%1 ms</source>
+        <translation>%1 мс</translation>
     </message>
-    </context>
+</context>
 <context>
-    <name>BitcoinGUI</name>
+    <name>QRImageWidget</name>
     <message>
-        <source>Synchronizing with network...</source>
-        <translation>Тармоқ билан синхронланмоқда...</translation>
+        <source>&amp;Save Image...</source>
+        <translation>Расмни &amp;сақлаш</translation>
     </message>
     <message>
-        <source>&amp;Overview</source>
-        <translation>&amp;Кўриб чиқиш</translation>
+        <source>&amp;Copy Image</source>
+        <translation>Расмдан &amp;нусха олиш</translation>
     </message>
     <message>
-        <source>Show general overview of wallet</source>
-        <translation>Ҳамённинг умумий кўринишини кўрсатиш</translation>
+        <source>Save QR Code</source>
+        <translation>QR кодни сақлаш</translation>
     </message>
     <message>
-        <source>&amp;Transactions</source>
-        <translation>&amp;Пул ўтказмалари</translation>
+        <source>PNG Image (*.png)</source>
+        <translation>PNG расм (*.png)</translation>
     </message>
+</context>
+<context>
+    <name>RPCConsole</name>
     <message>
-        <source>Browse transaction history</source>
-        <translation>Пул ўтказмалари тарихини кўриш</translation>
+        <source>Client name</source>
+        <translation>Мижоз номи</translation>
     </message>
     <message>
-        <source>E&amp;xit</source>
-        <translation>Ч&amp;иқиш</translation>
+        <source>N/A</source>
+        <translation>Тўғри келмайди</translation>
     </message>
     <message>
-        <source>Quit application</source>
-        <translation>Иловадан чиқиш</translation>
+        <source>Client version</source>
+        <translation>Мижоз номи</translation>
     </message>
     <message>
-        <source>&amp;Options...</source>
-        <translation>&amp;Мосламалар...</translation>
+        <source>&amp;Information</source>
+        <translation>&amp;Маълумот</translation>
     </message>
     <message>
-        <source>&amp;Sending addresses...</source>
-        <translation>&amp;Жўнатилувчи манзиллар...</translation>
+        <source>Debug window</source>
+        <translation>Тузатиш ойнаси</translation>
     </message>
     <message>
-        <source>&amp;Receiving addresses...</source>
-        <translation>&amp;Қабул қилувчи манзиллар...</translation>
+        <source>General</source>
+        <translation>Асосий</translation>
     </message>
     <message>
-        <source>Open &amp;URI...</source>
-        <translation>Интернет манзилни очиш</translation>
+        <source>Using OpenSSL version</source>
+        <translation>Фойдаланилаётган OpenSSL версияси</translation>
     </message>
     <message>
-        <source>Change the passphrase used for wallet encryption</source>
-        <translation>Паролни ўзгартириш ҳамённи кодлашда фойдаланилади</translation>
+        <source>Using BerkeleyDB version</source>
+        <translation>Фойдаланилаётган BerkeleyDB версияси</translation>
     </message>
     <message>
-        <source>&amp;File</source>
-        <translation>&amp; файл</translation>
+        <source>Startup time</source>
+        <translation>Бошланиш вақти</translation>
     </message>
     <message>
-        <source>&amp;Settings</source>
-        <translation>&amp; Созламалар</translation>
+        <source>Network</source>
+        <translation>Тармоқ</translation>
     </message>
     <message>
-        <source>&amp;Help</source>
-        <translation>&amp;Ёрдам</translation>
+        <source>Name</source>
+        <translation>Ном</translation>
     </message>
     <message>
-        <source>Tabs toolbar</source>
-        <translation>Ички ойналар асбоблар панели</translation>
+        <source>&amp;Peers</source>
+        <translation>&amp;Уламлар</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Батафсил маълумотларни кўриш учун уламни танланг.</translation>
     </message>
-    <message numerus="yes">
-        <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n та Bitcoin тармоғига фаол уланиш мавжуд</numerusform></translation>
+    <message>
+        <source>Starting Height</source>
+        <translation>Узунликнинг бошланиши</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>Ўтказма тарихи блоклари %1 та амалга оширилган. </translation>
+        <source>Sync Height</source>
+        <translation>Узунликни синхронлаш</translation>
     </message>
-    <message numerus="yes">
-        <source>%n hour(s)</source>
-        <translation><numerusform>%n соат</numerusform></translation>
+    <message>
+        <source>Ban Score</source>
+        <translation>Тезликни бан қилиш</translation>
     </message>
-    <message numerus="yes">
-        <source>%n day(s)</source>
-        <translation><numerusform>%n кун</numerusform></translation>
+    <message>
+        <source>Connection Time</source>
+        <translation>Уланиш вақти</translation>
     </message>
-    <message numerus="yes">
-        <source>%n week(s)</source>
-        <translation><numerusform>%n ҳафта</numerusform></translation>
+    <message>
+        <source>Last Send</source>
+        <translation>Сўнгги жўнатилган</translation>
     </message>
     <message>
-        <source>%1 and %2</source>
-        <translation>%1 ва %2</translation>
+        <source>Last Receive</source>
+        <translation>Сўнгги қабул қилинган</translation>
     </message>
-    <message numerus="yes">
-        <source>%n year(s)</source>
-        <translation><numerusform>%n йил</numerusform></translation>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Жўнатилган байтлар</translation>
     </message>
     <message>
-        <source>Up to date</source>
-        <translation>Янгиланган</translation>
+        <source>Bytes Received</source>
+        <translation>Қабул қилинган байтлар</translation>
     </message>
     <message>
-        <source>Sent transaction</source>
-        <translation>Жўнатилган операция</translation>
+        <source>Ping Time</source>
+        <translation>Ping вақти</translation>
     </message>
     <message>
-        <source>Incoming transaction</source>
-        <translation>Кирувчи операция</translation>
+        <source>Last block time</source>
+        <translation>Сўнгги блок вақти</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфдан чиқарилган&lt;/b&gt;</translation>
+        <source>&amp;Open</source>
+        <translation>&amp;Очиш</translation>
     </message>
     <message>
-        <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфланган&lt;/b&gt;</translation>
+        <source>&amp;Console</source>
+        <translation>&amp;Терминал</translation>
     </message>
-</context>
-<context>
-    <name>ClientModel</name>
-    </context>
-<context>
-    <name>CoinControlDialog</name>
     <message>
-        <source>Bytes:</source>
-        <translation>Байт:</translation>
+        <source>&amp;Network Traffic</source>
+        <translation>&amp;Тармоқ трафиги</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation>Миқдори</translation>
+        <source>&amp;Clear</source>
+        <translation>&amp;Тозалаш</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Манзил</translation>
+        <source>Totals</source>
+        <translation>Жами</translation>
     </message>
     <message>
-        <source>Date</source>
-        <translation>Сана</translation>
+        <source>In:</source>
+        <translation>Ичига:</translation>
     </message>
     <message>
-        <source>Confirmed</source>
-        <translation>Тасдиқланди</translation>
+        <source>Out:</source>
+        <translation>Ташқарига:</translation>
     </message>
     <message>
-        <source>Copy address</source>
-        <translation>Манзилни нусхалаш</translation>
+        <source>Build date</source>
+        <translation>Тузилган санаси</translation>
     </message>
     <message>
-        <source>Copy label</source>
-        <translation>Ёрликни нусхала</translation>
+        <source>Debug log file</source>
+        <translation>Тузатиш журнали файли</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation>Кийматни нусхала</translation>
+        <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
+        <translation>Жорий махлумотлар директориясидан Bitcoin тузатиш журнали файлини очинг. Бу катта журнал файллари учун бир неча сонияни олиши мумкин.</translation>
     </message>
     <message>
-        <source>medium</source>
-        <translation>ўрта</translation>
+        <source>Clear console</source>
+        <translation>Терминални тозалаш</translation>
     </message>
     <message>
-        <source>(no label)</source>
-        <translation>(Ёрлик мавжуд эмас)</translation>
+        <source>Welcome to the Bitcoin RPC console.</source>
+        <translation>Bitcoin RPC терминлга хуш келибсиз.</translation>
     </message>
-    </context>
-<context>
-    <name>EditAddressDialog</name>
     <message>
-        <source>Edit Address</source>
-        <translation>Манзилларни таҳрирлаш</translation>
+        <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
+        <translation>Тарихни кўриш учун тепага ва пастга кўрсаткичларидан фойдаланинг, экранни тозалаш учун &lt;b&gt;Ctrl-L&lt;/b&gt; тугмалар бирикмасидан фойдаланинг.</translation>
     </message>
     <message>
-        <source>&amp;Label</source>
-        <translation>&amp;Ёрлик</translation>
+        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+        <translation>Мавжуд буйруқларни кўриш учун &lt;b&gt;help&lt;/b&gt; деб ёзинг.</translation>
     </message>
     <message>
-        <source>&amp;Address</source>
-        <translation>&amp;Манзил</translation>
+        <source>%1 B</source>
+        <translation>%1 Б</translation>
     </message>
     <message>
-        <source>New receiving address</source>
-        <translation>Янги кабул килувчи манзил</translation>
+        <source>%1 KB</source>
+        <translation>%1 КБ</translation>
     </message>
     <message>
-        <source>New sending address</source>
-        <translation>Янги жунатилувчи манзил</translation>
+        <source>%1 MB</source>
+        <translation>%1 МБ</translation>
     </message>
     <message>
-        <source>Edit receiving address</source>
-        <translation>Кабул килувчи манзилни тахрирлаш</translation>
+        <source>%1 GB</source>
+        <translation>%1 ГБ</translation>
     </message>
     <message>
-        <source>Edit sending address</source>
-        <translation>Жунатилувчи манзилни тахрирлаш</translation>
+        <source>via %1</source>
+        <translation>%1 орқали</translation>
     </message>
     <message>
-        <source>The entered address "%1" is already in the address book.</source>
-        <translation>Киритилган "%1" манзили аллақачон манзил китобида.</translation>
+        <source>never</source>
+        <translation>ҳеч қачон</translation>
     </message>
     <message>
-        <source>Could not unlock wallet.</source>
-        <translation>Ҳамён қулфдан чиқмади.</translation>
+        <source>Unknown</source>
+        <translation>Номаълум</translation>
     </message>
     <message>
-        <source>New key generation failed.</source>
-        <translation>Янги калит яратиш амалга ошмади.</translation>
+        <source>Fetching...</source>
+        <translation>Олинмоқда...</translation>
     </message>
 </context>
 <context>
-    <name>FreespaceChecker</name>
-    </context>
-<context>
-    <name>HelpMessageDialog</name>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>(%1-bit)</source>
-        <translation>(%1-bit)</translation>
+        <source>&amp;Amount:</source>
+        <translation>&amp;Миқдор:</translation>
     </message>
     <message>
-        <source>About Bitcoin Core</source>
-        <translation>Bitcoin Core ҳақида</translation>
+        <source>&amp;Label:</source>
+        <translation>&amp;Ёрлиқ:</translation>
     </message>
     <message>
-        <source>Usage:</source>
-        <translation>Фойдаланиш:</translation>
+        <source>&amp;Message:</source>
+        <translation>&amp;Хабар:</translation>
     </message>
-    </context>
-<context>
-    <name>Intro</name>
-    </context>
-<context>
-    <name>OpenURIDialog</name>
-    </context>
-<context>
-    <name>OptionsDialog</name>
     <message>
-        <source>Options</source>
-        <translation>Танламалар</translation>
+        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
+        <translation>Олдинги фойдаланилган қабул қилинган манзиллардан биридан қайта фойдаланилсин. Хавсизлик ва махфийлик муаммолар мавжуд манзиллардан қайта фойдаланилмоқда. Бундан тўлов сўров қайта яратилмагунича фойдаланманг.</translation>
     </message>
-    </context>
-<context>
-    <name>OverviewPage</name>
     <message>
-        <source>Form</source>
-        <translation>Шакл</translation>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation>Янги қабул қилинаётган манзил билан боғланган танланадиган ёрлиқ.</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;Жорий утказмалар&lt;/b&gt;</translation>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>Ушбу сўровдан тўловларни сўраш учун фойдаланинг. Барча майдонлар &lt;b&gt;мажбурий эмас&lt;/b&gt;.</translation>
     </message>
-    </context>
-<context>
-    <name>PaymentServer</name>
-    </context>
-<context>
-    <name>PeerTableModel</name>
-    </context>
-<context>
-    <name>QObject</name>
     <message>
-        <source>Amount</source>
-        <translation>Миқдори</translation>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>Хоҳланган миқдор сўрови. Кўрсатилган миқдорни сўраш учун буни бўш ёки ноль қолдиринг.</translation>
     </message>
-    </context>
-<context>
-    <name>QRImageWidget</name>
-    </context>
-<context>
-    <name>RPCConsole</name>
     <message>
-        <source>General</source>
-        <translation>Асосий</translation>
+        <source>Clear all fields of the form.</source>
+        <translation>Шаклнинг барча майдончаларини тозалаш</translation>
     </message>
     <message>
-        <source>Name</source>
-        <translation>Ном</translation>
+        <source>Clear</source>
+        <translation>Тозалаш</translation>
     </message>
-    </context>
-<context>
-    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>&amp;Label:</source>
-        <translation>&amp;Ёрлиқ:</translation>
+        <source>Requested payments history</source>
+        <translation>Сўралган тўлов тарихи</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -506,6 +1430,10 @@
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
+    <message>
+        <source>&amp;Save Image...</source>
+        <translation>Расмни &amp;сақлаш</translation>
+    </message>
     <message>
         <source>Address</source>
         <translation>Манзил</translation>
@@ -544,14 +1472,54 @@
         <source>Send Coins</source>
         <translation>Тангаларни жунат</translation>
     </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Сони:</translation>
+    </message>
     <message>
         <source>Bytes:</source>
         <translation>Байт:</translation>
     </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Миқдори:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Муҳимлиги:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Солиқ:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Солиқдан сўнг:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <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>Send to multiple recipients at once</source>
         <translation>Бирданига бир нечта қабул қилувчиларга жўнатиш</translation>
     </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>Шаклнинг барча майдончаларини тозалаш</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Ахлат қутиси:</translation>
+    </message>
     <message>
         <source>Balance:</source>
         <translation>Баланс</translation>
@@ -564,19 +1532,63 @@
         <source>Confirm send coins</source>
         <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>Copy change</source>
+        <translation>Нусха қайтими</translation>
+    </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Тўлов миқдори 0. дан катта бўлиши керак. </translation>
     </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Диққат: Нотўғр Bitcoin манзили</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(Ёрлик мавжуд эмас)</translation>
     </message>
-    </context>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation>Диққат: Номаълум ўзгариш манзили</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Нусха чангги</translation>
+    </message>
+    <message>
+        <source>Are you sure you want to send?</source>
+        <translation>Жўнатишни хоҳлашингизга ишончингиз комилми?</translation>
+    </message>
+    <message>
+        <source>added as transaction fee</source>
+        <translation>ўтказма солиғи қўшилди</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsEntry</name>
     <message>
@@ -625,9 +1637,17 @@
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
+    <message>
+        <source>Signature</source>
+        <translation>Имзо</translation>
+    </message>
     </context>
 <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>
@@ -827,6 +1847,10 @@
         <source>Copy amount</source>
         <translation>Кийматни нусхала</translation>
     </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation>Ўтказам рақамидан нусха олиш</translation>
+    </message>
     <message>
         <source>Edit label</source>
         <translation>Ёрликни тахрирлаш</translation>
@@ -902,14 +1926,6 @@
         <source>Options:</source>
         <translation>Танламалар:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>Мослаш файлини кўрсатинг (default: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>pid файлини кўрсатинг (default: bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>Маълумотлар директориясини кўрсатинг</translation>
@@ -926,10 +1942,18 @@
         <source>Use the test network</source>
         <translation>Синов тармоғидан фойдаланинг</translation>
     </message>
+    <message>
+        <source>Information</source>
+        <translation>Маълумот</translation>
+    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC уланишлари учун фойдаланувчи номи</translation>
     </message>
+    <message>
+        <source>Warning</source>
+        <translation>Диққат</translation>
+    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>JSON-RPC уланишлари учун парол</translation>
@@ -938,14 +1962,6 @@
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>JSON-RPC уланишлари учун OpenSSL (https)дан фойдаланиш</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Сервер сертификат файли (default: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Сервер махфий калити (бирламчи: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>Бу ёрдам хабари</translation>
@@ -970,5 +1986,9 @@
         <source>Done loading</source>
         <translation>Юклаш тайёр</translation>
     </message>
-    </context>
+    <message>
+        <source>Error</source>
+        <translation>Хатолик</translation>
+    </message>
+</context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index cd0caf53a19a..75867460ab8c 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -386,10 +386,6 @@
         <source>Tabs toolbar</source>
         <translation>分页工具栏</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[测试网络]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>比特币核心</translation>
@@ -430,10 +426,6 @@
         <source>No block source available...</source>
         <translation>沒有可用的区块来源...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>已处理 %1 个交易历史数据块。</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n 小时</numerusform></translation>
@@ -905,15 +897,7 @@ Address: %4
         <source>Error</source>
         <translation>错误</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>可用空间（GB）</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>（需要 %1GB）</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1154,10 +1138,6 @@ Address: %4
         <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>现在显示的消息可能是过期的. 在连接上比特币网络节点后，您的钱包将自动与网络同步，但是这个过程还没有完成。</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>钱包</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>查看-只有:</translation>
@@ -1194,10 +1174,6 @@ Address: %4
         <source>Your current total balance</source>
         <translation>您当前的总余额</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;最近交易记录&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>数据同步中</translation>
@@ -1437,10 +1413,6 @@ Address: %4
         <source>Services</source>
         <translation>服务</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>同步节点</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>开始高度</translation>
@@ -1569,14 +1541,6 @@ Address: %4
         <source>Outbound</source>
         <translation>传出</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>是</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>否</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>未知</translation>
@@ -2606,16 +2570,6 @@ Address: %4
     <message>
         <source>Options:</source>
         <translation>选项：
-</translation>
-    </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>指定配置文件 (默认为 bitcoin.conf)
-</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>指定 pid 文件 (默认为 bitcoind.pid)
 </translation>
     </message>
     <message>
@@ -2623,14 +2577,6 @@ Address: %4
         <translation>指定数据目录
 </translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>监听端口连接 &lt;port&gt;（缺省: 8333 或测试网络: 18333）</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>最大连接数 &lt;n&gt; （缺省: 125）</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>连接一个节点并获取对端地址，然后断开连接</translation>
@@ -2639,18 +2585,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>指定您的公共地址</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>断开行为不端对端阀值（缺省: 100）</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>重新连接异常节点的秒数(缺省: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>JSON-RPC连接监听端口&lt;port&gt; (缺省：8332　testnet：18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>接受命令行和 JSON-RPC 命令
@@ -2695,18 +2629,10 @@ rpcpassword=%s
 像这样: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
 </translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>可接受的密码（默认：TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH）</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>绑定指定的IP地址开始监听。IPv6地址请使用[host]:port 格式</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>自由交易不断的速率限制为&lt;n&gt;*1000 字节每分钟(默认值:15)</translation>
-    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>进入回归测试模式，它采用一种特殊的可立即解决的区块链模拟情况。</translation>
@@ -2723,14 +2649,6 @@ rpcpassword=%s
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>当最佳区块变化时执行命令 (命令行中的 %s 会被替换成区块哈希值)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>从缓冲池清理磁盘数据库活动日志每&lt;n&gt;兆字节 (默认值: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>如何有效的验证checkblocks区块(0-4, 默认值: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>在-genproclimit这种模式下控制产出多少区块</translation>
@@ -2739,10 +2657,6 @@ rpcpassword=%s
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>设置脚本验证的程序 (%u 到 %d, 0 = 自动, &lt;0 = 保留自由的核心, 默认值: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>设置处理器生成的限制 (-1 = 无限, 默认值: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>这是测试用的预发布版本 - 请谨慎使用 - 不要用来挖矿，或者在正式商用环境下使用</translation>
@@ -2751,10 +2665,6 @@ rpcpassword=%s
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>无法 %s的绑定到电脑上，比特币核心钱包可能已经在运行。</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>连接至 Tor隐藏服务器时 使用不同的SOCKS5代理 (缺省: -proxy) </translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告：-paytxfee 交易费设置得太高了！每笔交易都将支付交易费。</translation>
@@ -2779,10 +2689,6 @@ rpcpassword=%s
         <source>(default: 1)</source>
         <translation>(默认值: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(默认: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; 可能是：</translation>
@@ -2811,10 +2717,6 @@ rpcpassword=%s
         <source>Debugging/Testing options:</source>
         <translation>调试/测试选项：</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>禁止使用安全模式，重新写入一个真正的安全模式日志(默认值: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>发现自己的IP地址(缺省:不带 -externalip 参数监听时设置为1)</translation>
@@ -2851,66 +2753,10 @@ rpcpassword=%s
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>错误：钱包被锁定，无法创建交易！</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>错误：系统出错。</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>监听端口失败。请使用 -listen=0 参数。</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>无法读取数据块信息</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>读取数据块失败</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>无法同步数据块索引</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>无法写入数据块索引</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>无法写入数据块信息</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>无法写数据块</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>无法写入文件信息</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>无法写入coin数据库</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>无法写入交易索引</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>无法写入回滚信息</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>强制安全模式(默认值: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>生成比特币（默认为 0）</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>启动时检测多少个数据块(缺省：288，0=所有)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>如果&lt;category&gt;未提供，将输出所有调试信息。</translation>
@@ -2931,10 +2777,6 @@ rpcpassword=%s
         <source>Not enough file descriptors available.</source>
         <translation>没有足够的文件描述符可用。</translation>
     </message>
-    <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>调试信息输出时，前面加上时间戳 (缺省: 1)</translation>
-    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>重新为当前的blk000??.dat文件建立索引</translation>
@@ -2947,18 +2789,10 @@ rpcpassword=%s
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>设置最大区块大小 (默认: %d，单位字节)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>设置使用调用服务 RPC 的线程数量（默认：4）</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>指定钱包文件（数据目录内）</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>付款时允许使用未确认的零钱 (缺省: 1)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>这是用于回归测试和应用开发目的。</translation>
@@ -2995,10 +2829,6 @@ rpcpassword=%s
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>当收到相关提醒或者我们看到一个长分叉时执行命令（%s 将替换为消息）</translation>
     </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>输出调试信息（默认为0，提供  &lt;category&gt; 是可选的）</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>通过DNS查询每个地址，如果短地址 (默认值: 1 除非 -连接)</translation>
@@ -3007,10 +2837,6 @@ rpcpassword=%s
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>设置 高优先级/低交易费 交易的最大字节  (缺省: %d)</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>始终通过 DNS 查询对等端地址 (默认: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>无法解析 -whitebind 地址: '%s'</translation>
@@ -3035,10 +2861,6 @@ rpcpassword=%s
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>错误：发现了不支持的参数 -tor，请使用 -onion。</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>在调试输出中包含IP地址 (默认: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>信息</translation>
@@ -3063,26 +2885,6 @@ rpcpassword=%s
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>-whitelist: '%s' 指定的网络掩码无效</translation>
     </message>
-    <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>签名缓冲大小限制每&lt;n&gt; 条目 (默认值: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>开采区块时，日志优先级和手续费每KB (默认值: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>维护一份完整的交易索引(缺省：0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>每个连接的最大接收缓存，&lt;n&gt;*1000 字节(缺省：5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>每个连接的最大发送缓存，&lt;n&gt;*1000 字节(缺省：1000)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>-whitebind: '%s' 需要指定一个端口</translation>
@@ -3091,22 +2893,10 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>节点中继选项:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>仅接受符合客户端检查点设置的数据块文件</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>仅连接至指定网络的节点&lt;net&gt;(IPv4, IPv6 或者 Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>如果在搜索区块中找到，请启动打印区块</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>启动时打印区块树 (默认值: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL选项：(见有关比特币设置用于SSL说明的维基百科)</translation>
@@ -3123,26 +2913,10 @@ rpcpassword=%s
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>随机每1个模拟测试&lt;n&gt;网络信息</translation>
     </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>中转non-P2SH multisig (默认值: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>运行一个程序，定时清理钱包 (默认值：1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>跟踪/调试信息输出到控制台，不输出到 debug.log 文件</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>设置最小数据块大小(缺省:0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>设置DB_PRIVATE钱包标志DB环境 (默认值: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>显示所有调试选项 (用法: --帮助 -帮助调试)</translation>
@@ -3155,14 +2929,6 @@ rpcpassword=%s
         <source>Signing transaction failed</source>
         <translation>签署交易失败</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>设置连接超时时间(缺省：5000毫秒)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>系统错误：</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>这是实验性的软件。</translation>
@@ -3183,10 +2949,6 @@ rpcpassword=%s
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>无法在此计算机上绑定 %s (绑定返回错误 %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>使用UPnP映射监听端口 (缺省: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>使用UPnp映射监听端口(缺省: 监听状态设为1)</translation>
@@ -3240,11 +3002,6 @@ rpcpassword=%s
         <source>Upgrade wallet to latest format</source>
         <translation>将钱包升级到最新的格式</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>设置密钥池大小为 &lt;n&gt; (缺省: 100)
-</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>重新扫描区块链以查找遗漏的钱包交易</translation>
@@ -3253,16 +3010,6 @@ rpcpassword=%s
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>为 JSON-RPC 连接使用 OpenSSL (https) 连接</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>服务器证书 (默认为 server.cert)
-</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>服务器私钥 (默认为 server.pem)
-</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>本帮助信息
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 51c0780ab09a..6301bd45871d 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -390,10 +390,6 @@
         <source>Tabs toolbar</source>
         <translation>分頁工具列</translation>
     </message>
-    <message>
-        <source>[testnet]</source>
-        <translation>[testnet]</translation>
-    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>位元幣核心</translation>
@@ -434,10 +430,6 @@
         <source>No block source available...</source>
         <translation>沒有可用的區塊來源...</translation>
     </message>
-    <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation>已處理了 %1 個區塊的交易紀錄。</translation>
-    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n 個小時</numerusform></translation>
@@ -916,15 +908,7 @@ Address: %4
         <source>Error</source>
         <translation>錯誤</translation>
     </message>
-    <message>
-        <source>GB of free space available</source>
-        <translation>GB 可用空間</translation>
-    </message>
-    <message>
-        <source>(of %1GB needed)</source>
-        <translation>(需要 %1GB)</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1165,10 +1149,6 @@ Address: %4
         <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>顯示的資訊可能是過期的。跟位元幣網路的連線建立後，你的錢包會自動和網路同步，但是這個步驟還沒完成。</translation>
     </message>
-    <message>
-        <source>Wallet</source>
-        <translation>錢包</translation>
-    </message>
     <message>
         <source>Watch-only:</source>
         <translation>只能看:</translation>
@@ -1197,6 +1177,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>還沒成熟的開採金額</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>餘額</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>總金額:</translation>
@@ -1209,6 +1193,14 @@ Address: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>所有只能看位址的目前餘額</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>可支配:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>最近的交易</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>所有只能看位址還沒確認的交易</translation>
@@ -1221,10 +1213,6 @@ Address: %4
         <source>Current total balance in watch-only addresses</source>
         <translation>所有只能看位址的目前全部餘額</translation>
     </message>
-    <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation>&lt;b&gt;最近交易&lt;/b&gt;</translation>
-    </message>
     <message>
         <source>out of sync</source>
         <translation>還沒同步</translation>
@@ -1484,10 +1472,6 @@ Address: %4
         <source>Services</source>
         <translation>服務</translation>
     </message>
-    <message>
-        <source>Sync Node</source>
-        <translation>同步節點</translation>
-    </message>
     <message>
         <source>Starting Height</source>
         <translation>起始高度</translation>
@@ -1616,14 +1600,6 @@ Address: %4
         <source>Outbound</source>
         <translation>出去</translation>
     </message>
-    <message>
-        <source>Yes</source>
-        <translation>是</translation>
-    </message>
-    <message>
-        <source>No</source>
-        <translation>否</translation>
-    </message>
     <message>
         <source>Unknown</source>
         <translation>不明</translation>
@@ -2472,6 +2448,10 @@ Address: %4
         <source>Mined</source>
         <translation>開採所得</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>只能看</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(不適用)</translation>
@@ -2488,6 +2468,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>交易的種類。</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>不論如何有一個只能觀看的地只有參與這次的交易</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>交易的目的地位址。</translation>
@@ -2583,6 +2567,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>匯出交易記錄</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>只能觀看的</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>匯出失敗</translation>
@@ -2698,26 +2686,10 @@ Address: %4
         <source>Options:</source>
         <translation>選項:</translation>
     </message>
-    <message>
-        <source>Specify configuration file (default: bitcoin.conf)</source>
-        <translation>指定設定檔(預設值: bitcoin.conf)</translation>
-    </message>
-    <message>
-        <source>Specify pid file (default: bitcoind.pid)</source>
-        <translation>指定行程識別碼(PID)檔(預設值:  bitcoind.pid)</translation>
-    </message>
     <message>
         <source>Specify data directory</source>
         <translation>指定資料目錄</translation>
     </message>
-    <message>
-        <source>Listen for connections on &lt;port&gt; (default: 8333 or testnet: 18333)</source>
-        <translation>在通訊埠 &lt;port&gt; 聽候連線(預設值: 8333, 或若是測試網路: 18333)</translation>
-    </message>
-    <message>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>維持連線節點數的上限為 &lt;n&gt; 個(預設值: 125)</translation>
-    </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>連線到某個節點來取得其它節點的位址，然後斷線</translation>
@@ -2726,18 +2698,6 @@ Address: %4
         <source>Specify your own public address</source>
         <translation>指定自己的公開位址</translation>
     </message>
-    <message>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>把異常節點斷線的臨界值(預設值: 100)</translation>
-    </message>
-    <message>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>拒絕跟異常節點連線的秒數(預設值: 86400)</translation>
-    </message>
-    <message>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 8332 or testnet: 18332)</source>
-        <translation>在通訊埠 &lt;port&gt; 聽候 JSON-RPC 連線(預設值: 8332, 或若是測試網路: 18332)</translation>
-    </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>接受指令列和 JSON-RPC 指令
@@ -2779,18 +2739,10 @@ rpcpassword=%s
 比如說設定成:
 alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
-    <message>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>可接受的加密演算法 (預設值: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>和指定的位址繫結，並且一直在指定位址聽候連線。IPv6 請用 [主機]:通訊埠 這種格式</translation>
     </message>
-    <message>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>對沒付手續費的交易持續限制一分鐘內最多只能有 &lt;n&gt; 千位元組 (預設值: 15)</translation>
-    </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>清掉錢包裡的所有交易，並且在下次啟動時，使用 -rescan 來從區塊鏈中復原回來。</translation>
@@ -2811,14 +2763,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>當錢包有交易改變時要執行的指令(指令中的 %s 會被取代成交易識別碼)</translation>
     </message>
-    <message>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>每當累積到 &lt;n&gt; 百萬位元組(MB)時，才將資料庫的變動從記憶體暫存池中寫進磁碟紀錄檔 (預設值: 100)</translation>
-    </message>
-    <message>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>使用 -checkblocks 檢查區塊的仔細程度 (0 到 4，預設值: 3)</translation>
-    </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>在這個運作模式下，-genproclimit 選項控制立刻產生出的區塊數目。</translation>
@@ -2827,10 +2771,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>設定指令碼驗證的執行緒數目 (%u 到 %d，0 表示程式自動決定，小於 0 表示保留處理器核心不用的數目，預設值: %d)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>當生產位元幣打開時，設定處理器使用數目限制 (-1 表示不限制，預設值: -1)</translation>
-    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>這是個還沒發表的測試版本 - 使用請自負風險 - 請不要用來開採或商業應用</translation>
@@ -2839,10 +2779,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation>沒辦法繫結在這台電腦上的 %s 。位元幣核心可能已經在執行了。</translation>
     </message>
-    <message>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>使用另外的 SOCK5 代理伺服器，來透過 Tor 隱藏服務跟節點聯繫(預設值: 同 -proxy)</translation>
-    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告: -paytxfee 設定了很高的金額！這可是你交易付款所要付的手續費。</translation>
@@ -2867,10 +2803,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>(default: 1)</source>
         <translation>(預設值: 1)</translation>
     </message>
-    <message>
-        <source>(default: wallet.dat)</source>
-        <translation>(預設值: wallet.dat)</translation>
-    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; 可以是:</translation>
@@ -2899,10 +2831,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Debugging/Testing options:</source>
         <translation>除錯與測試選項</translation>
     </message>
-    <message>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>不進入安全模式，用在真的發生需要進入安全模式的事件時，強制不進入 (預設值: 0)</translation>
-    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>找出自己的網際網路位址(預設值: 當有聽候連線且沒有 -externalip 時為 1)</translation>
@@ -2931,6 +2859,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Error opening block database</source>
         <translation>打開區塊資料庫時發生錯誤</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>錯誤:一個致命的內部錯誤,到debug.log看更多細節</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>錯誤: 磁碟空間很少！</translation>
@@ -2939,66 +2871,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>錯誤: 錢包被上鎖了，沒辦法製造新的交易！</translation>
     </message>
-    <message>
-        <source>Error: system error: </source>
-        <translation>錯誤: 系統錯誤:</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>在任意的通訊埠聽候失敗。如果你希望這樣的話，可以設定 -listen=0.</translation>
     </message>
-    <message>
-        <source>Failed to read block info</source>
-        <translation>讀取區塊資訊失敗</translation>
-    </message>
-    <message>
-        <source>Failed to read block</source>
-        <translation>讀取區塊失敗</translation>
-    </message>
-    <message>
-        <source>Failed to sync block index</source>
-        <translation>同步區塊索引失敗</translation>
-    </message>
-    <message>
-        <source>Failed to write block index</source>
-        <translation>把區塊索引寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write block info</source>
-        <translation>把區塊資訊寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write block</source>
-        <translation>把區塊資料寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write file info</source>
-        <translation>把檔案資訊寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write to coin database</source>
-        <translation>寫進錢幣資料庫失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write transaction index</source>
-        <translation>把交易索引寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Failed to write undo data</source>
-        <translation>把回復資料寫進去失敗了</translation>
-    </message>
-    <message>
-        <source>Force safe mode (default: 0)</source>
-        <translation>強制進入安全模式 (預設值: 0)</translation>
-    </message>
-    <message>
-        <source>Generate coins (default: 0)</source>
-        <translation>生產位元幣(預設值: 0)</translation>
-    </message>
-    <message>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>啓動時檢查的區塊數(預設值: 288, 指定 0 表示全部)</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>如果沒有提供 &lt;category&gt; 就會輸出所有的除錯資訊。</translation>
@@ -3020,8 +2896,8 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <translation>檔案描述元不足。</translation>
     </message>
     <message>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>在除錯輸出內容前附加時間(預設值: 1)</translation>
+        <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>Rebuild block chain index from current blk000??.dat files</source>
@@ -3035,22 +2911,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>設定區塊大小上限成多少位元組(預設值: %d)</translation>
     </message>
-    <message>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>設定處理 RPC 服務請求的執行緒數目(預設值: 4)</translation>
-    </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
         <translation>指定錢包檔(會在資料目錄中)</translation>
     </message>
-    <message>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>傳送交易時可以花還沒確認的零錢(預設值: 1)</translation>
-    </message>
-    <message>
-        <source>Stop running after importing blocks from disk (default: 0)</source>
-        <translation>從磁碟匯入區塊資料後停止執行(預設值: 0)</translation>
-    </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>這是設計用來給回歸測試工具和應用程式開發用的。</translation>
@@ -3079,10 +2943,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>從其它來源的 blk000??.dat 檔匯入區塊</translation>
     </message>
-    <message>
-        <source>(default: 1, 1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation>(預設值: 1。1 表示保留交易描述資料，像是帳戶使用者和付款請求資訊；2 表示丟掉交易描述資料)</translation>
-    </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>允許指定的來源建立 JSON-RPC 連線。&lt;ip&gt; 的有效值可以是一個單獨位址(像是 1.2.3.4)，一個網段/網段罩遮值(像是 1.2.3.4/255.255.255.0)，或是網段/CIDR值(像是 1.2.3.4/24)。這個選項可以設定多次。</translation>
@@ -3119,10 +2979,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
         <translation>錯誤: 找到不再支援的 -socks 參數。現在只支援 SOCKS5 協定的代理伺服器了，因為不再能夠指定 SOCKS 協定版本。</translation>
     </message>
-    <message>
-        <source>Execute command when a network tx respends wallet tx input (%s=respend TxID, %t=wallet TxID)</source>
-        <translation>當發現網路上有重複花用錢包裡的交易輸入時所要執行的指令(指令中的 %s 會被取代為重複花用的交易代碼，%t 會被取代為錢包中的交易代碼)</translation>
-    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>當收到相關警示，或發現相當長的分支時，所要執行的指令(指令中的 %s 會被取代成警示訊息)</translation>
@@ -3135,14 +2991,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>當製造交易時，如果每千位元組(Kb)的手續費比這個值低，就視為沒付手續費 (預設值: %s)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: 1)</source>
-        <translation>當沒有設定 paytxfee 時，自動包含可以讓交易能在平均 n 個區塊內確認的手續費  (預設值: 1)</translation>
-    </message>
-    <message>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>輸出除錯資訊(預設值: 0, 可以不指定 &lt;category&gt;)</translation>
-    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>是否允許在節點位址數目不足時，使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
@@ -3159,18 +3007,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <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>警告: 請檢查電腦日期和時間是否正確！位元幣核心沒辦法在時鐘不準的情況下正常運作。</translation>
     </message>
-    <message>
-        <source>Whitelist peers connecting from the given netmask or ip. Can be specified multiple times.</source>
-        <translation>把來自指定網域或位址的節點放進白名單。這個選項可以設定多次。</translation>
-    </message>
     <message>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>在白名單中的節點不會因為偵測到阻斷服務攻擊而被停用。來自這些節點的交易也一定會被轉發，即使說交易本來就在記憶池裡了也一樣。適用於像是閘道伺服器。</translation>
     </message>
-    <message>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>是否一定要用域名查詢來搜尋節點 (預設值: 0)</translation>
-    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>沒辦法解析 -whitebind 指定的位址: '%s'</translation>
@@ -3199,10 +3039,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>交易付款時每千位元組(kB)的交易手續費 (預設值: %s)</translation>
     </message>
-    <message>
-        <source>Include IP addresses in debug output (default: 0)</source>
-        <translation>在除錯輸出內容中包含網際網路位址(預設值: 0)</translation>
-    </message>
     <message>
         <source>Information</source>
         <translation>資訊</translation>
@@ -3232,24 +3068,8 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <translation>在記憶體中保存最多 &lt;n&gt; 個不和其他區塊相連結的區塊(預設值 : %u)</translation>
     </message>
     <message>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>限制簽章快取大小為 &lt;n&gt; 筆 (預設值: 50000)</translation>
-    </message>
-    <message>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>開採區塊的時候紀錄交易的優先度以及每千位元組(kB)的手續費 (預設值: 0)</translation>
-    </message>
-    <message>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>維護全部交易的索引(預設值: 0)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>每個連線的接收緩衝區大小上限為 &lt;n&gt;*1000 個位元組(預設值: 5000)</translation>
-    </message>
-    <message>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>每個連線的傳送緩衝區大小上限為 &lt;n&gt;*1000 位元組(預設值: 1000)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>保持最多 &lt;n&gt; 無法連結的交易在記憶體 (預設: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3259,22 +3079,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Node relay options:</source>
         <translation>節點轉發選項:</translation>
     </message>
-    <message>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>只接受跟內建的檢查段點吻合的區塊鏈(預設值: 1)</translation>
-    </message>
-    <message>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>只和 &lt;net&gt; 網路上的節點連線(IPv4, IPv6, 或 Tor)</translation>
-    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>啟動時輸出指定的區塊內容，如果有在區塊索引中找到的話</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>啟動時輸出區塊樹 (預設值: 0)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL 選項: (SSL 設定程序請見 Bitcoin Wiki)</translation>
@@ -3291,30 +3099,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>隨機亂動 &lt;n&gt; 分之一的網路訊息裡的資料</translation>
     </message>
-    <message>
-        <source>Relay and mine data carrier transactions (default: 1)</source>
-        <translation>允許轉發和開採只帶資料的交易 (預設值: 1)</translation>
-    </message>
-    <message>
-        <source>Relay non-P2SH multisig (default: 1)</source>
-        <translation>允許轉發非 P2SH 的多簽章交易 (預設值: 1)</translation>
-    </message>
-    <message>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>啟用定期將變動寫入錢包檔的執行緒 (預設值: 1)</translation>
-    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>在終端機顯示追蹤或除錯資訊，而不是寫到檔案 debug.log 中</translation>
     </message>
-    <message>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>設定區塊大小下限成多少位元組(預設值: 0)</translation>
-    </message>
-    <message>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>在錢包資料庫環境變數設定 DB_PRIVATE 旗標 (預設值: 1)</translation>
-    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>顯示所有的除錯選項 (用法: --help --help-debug)</translation>
@@ -3327,14 +3115,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Signing transaction failed</source>
         <translation>簽署交易失敗</translation>
     </message>
-    <message>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>指定連線在幾毫秒後逾時(預設值: 5000)</translation>
-    </message>
-    <message>
-        <source>System error: </source>
-        <translation>系統錯誤:</translation>
-    </message>
     <message>
         <source>This is experimental software.</source>
         <translation>這套軟體屬於實驗性質。</translation>
@@ -3355,10 +3135,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
         <translation>無法和這台電腦上的 %s 繫結(回傳錯誤 %s)</translation>
     </message>
-    <message>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>是否要使用「通用即插即用」協定(UPnP)，來設定聽候連線的通訊埠的對應(預設值: 0)</translation>
-    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>是否要使用「通用即插即用」協定(UPnP)，來設定聽候連線的通訊埠的對應(預設值: 當有聽候連線時為 1)</translation>
@@ -3411,10 +3187,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Upgrade wallet to latest format</source>
         <translation>把錢包檔案升級成最新的格式</translation>
     </message>
-    <message>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>設定密鑰池大小成 &lt;n&gt; (預設值: 100)</translation>
-    </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>重新掃描區塊鏈，來尋找錢包可能漏掉的交易。</translation>
@@ -3423,14 +3195,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>在 JSON-RPC 連線使用 OpenSSL (https)</translation>
     </message>
-    <message>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>伺服器憑證檔(預設值: server.cert)</translation>
-    </message>
-    <message>
-        <source>Server private key (default: server.pem)</source>
-        <translation>伺服器私鑰檔(預設值: server.pem)</translation>
-    </message>
     <message>
         <source>This help message</source>
         <translation>這些說明訊息</translation>

From e743678d5a8d14288073606c5a7fe19096caaf74 Mon Sep 17 00:00:00 2001
From: Yoichi Hirai <i@yoichihirai.com>
Date: Fri, 31 Oct 2014 20:51:05 +0900
Subject: [PATCH 0970/1819] fix a typo

---
 src/rpcwallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 2728fb4fb359..f2b5e2061ef7 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -314,7 +314,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
     if (fHelp || params.size() < 2 || params.size() > 4)
         throw runtime_error(
             "sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" )\n"
-            "\nSent an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+            "\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
             + HelpRequiringPassphrase() +
             "\nArguments:\n"
             "1. \"bitcoinaddress\"  (string, required) The bitcoin address to send to.\n"

From a2cfae8e18a5d4270d471ac226c963a7c5e7c39b Mon Sep 17 00:00:00 2001
From: 21E14 <21xe14@gmail.com>
Date: Sat, 1 Nov 2014 09:41:48 -0400
Subject: [PATCH 0971/1819] util.cpp comment correction

---
 src/util.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 544ffc98b830..0f5c03635236 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -159,8 +159,8 @@ instance_of_cinit;
 // the mutex).
 
 static boost::once_flag debugPrintInitFlag = BOOST_ONCE_INIT;
-// We use boost::call_once() to make sure these are initialized in
-// in a thread-safe manner the first time it is called:
+// We use boost::call_once() to make sure these are initialized
+// in a thread-safe manner the first time called:
 static FILE* fileout = NULL;
 static boost::mutex* mutexDebugLog = NULL;
 

From be0e0703f28c575619cb671a4a44813206a3f388 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 3 Nov 2014 01:00:19 -0800
Subject: [PATCH 0972/1819] Remove file and class order guidelines

---
 doc/coding.md | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/doc/coding.md b/doc/coding.md
index ceed8c18b40f..b9d2006e3c17 100644
--- a/doc/coding.md
+++ b/doc/coding.md
@@ -12,20 +12,6 @@ gradually.
   - No indentation for public/protected/private or for namespaces.
   - No extra spaces inside parenthesis; don't do ( this )
   - No space after function names; one space after if, for and while.
-- Includes need to be ordered alphabetically, separate own and foreign headers with a new-line (example key.cpp):
-```c++
-#include "key.h"
-
-#include "crypto/sha2.h"
-#include "util.h"
-
-#include <openssl/foo.h>
-```
-- Class or struct keywords in header files need to be ordered alphabetically:
-```c++
-class CAlpha;
-class CBeta;
-```
 
 Block style example:
 ```c++

From 84738627ce32767bacb86e1ba109147fab29cafb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Mon, 3 Nov 2014 16:16:40 +0100
Subject: [PATCH 0973/1819] Fix all header defines

---
 share/seeds/generate-seeds.py     |  6 +++---
 src/addrman.h                     |  6 +++---
 src/alert.h                       |  6 +++---
 src/chain.h                       |  6 +++---
 src/chainparams.h                 |  6 +++---
 src/chainparamsbase.h             |  6 +++---
 src/chainparamsseeds.h            | 11 +++++------
 src/checkpoints.h                 |  6 +++---
 src/checkqueue.h                  |  6 +++---
 src/clientversion.h               |  6 +++---
 src/coincontrol.h                 |  6 +++---
 src/compat.h                      |  6 +++---
 src/compat/sanity.h               |  6 +++---
 src/compressor.h                  |  6 +++---
 src/core/block.h                  |  6 +++---
 src/core/transaction.h            |  6 +++---
 src/core_io.h                     |  6 +++---
 src/crypter.h                     |  6 +++---
 src/crypto/ripemd160.h            |  6 +++---
 src/crypto/sha1.h                 |  6 +++---
 src/crypto/sha2.h                 |  6 +++---
 src/ecwrapper.h                   |  4 ++--
 src/protocol.h                    |  6 +++---
 src/qt/addressbookpage.h          |  6 +++---
 src/qt/addresstablemodel.h        |  6 +++---
 src/qt/askpassphrasedialog.h      |  6 +++---
 src/qt/bitcoinaddressvalidator.h  |  6 +++---
 src/qt/bitcoinamountfield.h       |  6 +++---
 src/qt/bitcoingui.h               |  6 +++---
 src/qt/bitcoinunits.h             |  6 +++---
 src/qt/clientmodel.h              |  6 +++---
 src/qt/coincontroldialog.h        |  6 +++---
 src/qt/coincontroltreewidget.h    |  6 +++---
 src/qt/csvmodelwriter.h           |  6 +++---
 src/qt/editaddressdialog.h        |  6 +++---
 src/qt/guiconstants.h             |  6 +++---
 src/qt/guiutil.h                  |  6 +++---
 src/qt/intro.h                    |  6 +++---
 src/qt/macdockiconhandler.h       |  6 +++---
 src/qt/macnotificationhandler.h   |  6 +++---
 src/qt/networkstyle.h             |  6 +++---
 src/qt/notificator.h              |  6 +++---
 src/qt/openuridialog.h            |  6 +++---
 src/qt/optionsdialog.h            |  6 +++---
 src/qt/optionsmodel.h             |  6 +++---
 src/qt/overviewpage.h             |  6 +++---
 src/qt/paymentrequestplus.h       |  7 +++----
 src/qt/paymentserver.h            |  7 ++++---
 src/qt/peertablemodel.h           |  6 +++---
 src/qt/qvalidatedlineedit.h       |  6 +++---
 src/qt/qvaluecombobox.h           |  6 +++---
 src/qt/receivecoinsdialog.h       |  6 +++---
 src/qt/receiverequestdialog.h     |  6 +++---
 src/qt/recentrequeststablemodel.h |  6 +++---
 src/qt/rpcconsole.h               |  6 +++---
 src/qt/sendcoinsdialog.h          |  6 +++---
 src/qt/sendcoinsentry.h           |  6 +++---
 src/qt/signverifymessagedialog.h  |  6 +++---
 src/qt/splashscreen.h             |  6 +++---
 src/qt/test/paymentservertests.h  |  6 +++---
 src/qt/test/uritests.h            |  6 +++---
 src/qt/trafficgraphwidget.h       |  6 +++---
 src/qt/transactiondesc.h          |  6 +++---
 src/qt/transactiondescdialog.h    |  6 +++---
 src/qt/transactionfilterproxy.h   |  6 +++---
 src/qt/transactionrecord.h        |  6 +++---
 src/qt/transactiontablemodel.h    |  6 +++---
 src/qt/transactionview.h          |  6 +++---
 src/qt/utilitydialog.h            |  6 +++---
 src/qt/walletframe.h              |  6 +++---
 src/qt/walletmodel.h              |  6 +++---
 src/qt/walletmodeltransaction.h   |  6 +++---
 src/qt/walletview.h               |  6 +++---
 src/qt/winshutdownmonitor.h       |  6 +++---
 src/rpcclient.h                   |  6 +++---
 src/rpcprotocol.h                 |  6 +++---
 src/rpcserver.h                   |  6 +++---
 src/script/interpreter.h          |  6 +++---
 src/script/script.h               |  6 +++---
 src/script/sigcache.h             |  6 +++---
 src/script/sign.h                 |  6 +++---
 src/script/standard.h             |  6 +++---
 src/test/bignum.h                 |  6 +++---
 src/txdb.h                        |  6 +++---
 src/undo.h                        |  6 +++---
 src/univalue/gen.cpp              |  6 +++---
 src/univalue/univalue.h           |  6 +++---
 src/univalue/univalue_escapes.h   |  6 +++---
 src/wallet_ismine.h               |  6 +++---
 89 files changed, 269 insertions(+), 270 deletions(-)

diff --git a/share/seeds/generate-seeds.py b/share/seeds/generate-seeds.py
index 5f0674056078..cdd683121856 100755
--- a/share/seeds/generate-seeds.py
+++ b/share/seeds/generate-seeds.py
@@ -114,8 +114,8 @@ def main():
         exit(1)
     g = sys.stdout
     indir = sys.argv[1]
-    g.write('#ifndef H_CHAINPARAMSSEEDS\n')
-    g.write('#define H_CHAINPARAMSSEEDS\n')
+    g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
+    g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
     g.write('/**\n')
     g.write(' * List of fixed seed nodes for the bitcoin network\n')
     g.write(' * AUTOGENERATED by share/seeds/generate-seeds.py\n')
@@ -128,7 +128,7 @@ def main():
     g.write('\n')
     with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
         process_nodes(g, f, 'pnSeed6_test', 18333)
-    g.write('#endif\n')
+    g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
             
 if __name__ == '__main__':
     main()
diff --git a/src/addrman.h b/src/addrman.h
index 914086fc7614..d47217683c73 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOIN_ADDRMAN
-#define _BITCOIN_ADDRMAN
+#ifndef BITCOIN_ADDRMAN_H
+#define BITCOIN_ADDRMAN_H
 
 #include "netbase.h"
 #include "protocol.h"
@@ -514,4 +514,4 @@ class CAddrMan
     }
 };
 
-#endif // _BITCOIN_ADDRMAN
+#endif // BITCOIN_ADDRMAN_H
diff --git a/src/alert.h b/src/alert.h
index ba3235858dbb..96c203b557c6 100644
--- a/src/alert.h
+++ b/src/alert.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOINALERT_H_
-#define _BITCOINALERT_H_
+#ifndef BITCOIN_ALERT_H
+#define BITCOIN_ALERT_H
 
 #include "serialize.h"
 #include "sync.h"
@@ -110,4 +110,4 @@ class CAlert : public CUnsignedAlert
     static CAlert getAlertByHash(const uint256 &hash);
 };
 
-#endif // _BITCOINALERT_H_
+#endif // BITCOIN_ALERT_H
diff --git a/src/chain.h b/src/chain.h
index 7c5603dafc3b..f99fd113b7ec 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_CHAIN
-#define H_BITCOIN_CHAIN
+#ifndef BITCOIN_CHAIN_H
+#define BITCOIN_CHAIN_H
 
 #include "core/block.h"
 #include "pow.h"
@@ -409,4 +409,4 @@ class CChain {
     const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
 };
 
-#endif // H_BITCOIN_CHAIN
+#endif // BITCOIN_CHAIN_H
diff --git a/src/chainparams.h b/src/chainparams.h
index 9279edd6c0b3..9f24b70a2618 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CHAIN_PARAMS_H
-#define BITCOIN_CHAIN_PARAMS_H
+#ifndef BITCOIN_CHAINPARAMS_H
+#define BITCOIN_CHAINPARAMS_H
 
 #include "chainparamsbase.h"
 #include "checkpoints.h"
@@ -151,4 +151,4 @@ void SelectParams(CBaseChainParams::Network network);
  */
 bool SelectParamsFromCommandLine();
 
-#endif // BITCOIN_CHAIN_PARAMS_H
+#endif // BITCOIN_CHAINPARAMS_H
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index 4042b8c879bc..eaf3fea1b6f8 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CHAIN_PARAMS_BASE_H
-#define BITCOIN_CHAIN_PARAMS_BASE_H
+#ifndef BITCOIN_CHAINPARAMSBASE_H
+#define BITCOIN_CHAINPARAMSBASE_H
 
 #include <string>
 #include <vector>
@@ -62,4 +62,4 @@ bool SelectBaseParamsFromCommandLine();
  */
 bool AreBaseParamsConfigured();
 
-#endif // BITCOIN_CHAIN_PARAMS_BASE_H
+#endif // BITCOIN_CHAINPARAMSBASE_H
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
index c3323c48bd5d..575e12933428 100644
--- a/src/chainparamsseeds.h
+++ b/src/chainparamsseeds.h
@@ -1,10 +1,9 @@
-#ifndef H_CHAINPARAMSSEEDS
-#define H_CHAINPARAMSSEEDS
-
+#ifndef BITCOIN_CHAINPARAMSSEEDS_H
+#define BITCOIN_CHAINPARAMSSEEDS_H
 /**
  * List of fixed seed nodes for the bitcoin network
- * AUTOGENERATED by contrib/devtools/generate-seeds.py
- * 
+ * AUTOGENERATED by share/seeds/generate-seeds.py
+ *
  * Each line contains a 16-byte IPv6 address and a port.
  * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
  */
@@ -638,4 +637,4 @@ static SeedSpec6 pnSeed6_test[] = {
     {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x99,0xcb,0x26,0x31,0xba,0x48,0x51,0x31,0x39,0x0d}, 18333},
     {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x44,0xf4,0xf4,0xf0,0xbf,0xf7,0x7e,0x6d,0xc4,0xe8}, 18333}
 };
-#endif
+#endif // BITCOIN_CHAINPARAMSSEEDS_H
diff --git a/src/checkpoints.h b/src/checkpoints.h
index b5b620fa6b2e..847524a9f2fe 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CHECKPOINT_H
-#define BITCOIN_CHECKPOINT_H
+#ifndef BITCOIN_CHECKPOINTS_H
+#define BITCOIN_CHECKPOINTS_H
 
 #include "uint256.h"
 
@@ -40,4 +40,4 @@ extern bool fEnabled;
 
 } //namespace Checkpoints
 
-#endif // BITCOIN_CHECKPOINT_H
+#endif // BITCOIN_CHECKPOINTS_H
diff --git a/src/checkqueue.h b/src/checkqueue.h
index b2a713e64671..afecfeede51b 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef CHECKQUEUE_H
-#define CHECKQUEUE_H
+#ifndef BITCOIN_CHECKQUEUE_H
+#define BITCOIN_CHECKQUEUE_H
 
 #include <algorithm>
 #include <vector>
@@ -204,4 +204,4 @@ class CCheckQueueControl
     }
 };
 
-#endif // CHECKQUEUE_H
+#endif // BITCOIN_CHECKQUEUE_H
diff --git a/src/clientversion.h b/src/clientversion.h
index a187e185c11d..0a36eb80123a 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef CLIENTVERSION_H
-#define CLIENTVERSION_H
+#ifndef BITCOIN_CLIENTVERSION_H
+#define BITCOIN_CLIENTVERSION_H
 
 #if defined(HAVE_CONFIG_H)
 #include "config/bitcoin-config.h"
@@ -67,4 +67,4 @@ std::string FormatSubVersion(const std::string& name, int nClientVersion, const
 
 #endif // WINDRES_PREPROC
 
-#endif // CLIENTVERSION_H
+#endif // BITCOIN_CLIENTVERSION_H
diff --git a/src/coincontrol.h b/src/coincontrol.h
index c8f12d92de64..c9057017d830 100644
--- a/src/coincontrol.h
+++ b/src/coincontrol.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef COINCONTROL_H
-#define COINCONTROL_H
+#ifndef BITCOIN_COINCONTROL_H
+#define BITCOIN_COINCONTROL_H
 
 #include "core/transaction.h"
 
@@ -59,4 +59,4 @@ class CCoinControl
     std::set<COutPoint> setSelected;
 };
 
-#endif // COINCONTROL_H
+#endif // BITCOIN_COINCONTROL_H
diff --git a/src/compat.h b/src/compat.h
index 4fc28a36e005..dade79aae0fd 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOIN_COMPAT_H
-#define _BITCOIN_COMPAT_H
+#ifndef BITCOIN_COMPAT_H
+#define BITCOIN_COMPAT_H
 
 #ifdef WIN32
 #ifdef _WIN32_WINNT
@@ -84,4 +84,4 @@ typedef u_int SOCKET;
 #define THREAD_PRIORITY_ABOVE_NORMAL    (-2)
 #endif
 
-#endif // _BITCOIN_COMPAT_H
+#endif // BITCOIN_COMPAT_H
diff --git a/src/compat/sanity.h b/src/compat/sanity.h
index 7016ac0ab745..7f5bc1a4fb53 100644
--- a/src/compat/sanity.h
+++ b/src/compat/sanity.h
@@ -2,10 +2,10 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCON_COMPAT_SANITY_H
-#define BITCON_COMPAT_SANITY_H
+#ifndef BITCOIN_COMPAT_SANITY_H
+#define BITCOIN_COMPAT_SANITY_H
 
 bool glibc_sanity_test();
 bool glibcxx_sanity_test();
 
-#endif // BITCON_COMPAT_SANITY_H
+#endif // BITCOIN_COMPAT_SANITY_H
diff --git a/src/compressor.h b/src/compressor.h
index a612c3a883df..226be620e83f 100644
--- a/src/compressor.h
+++ b/src/compressor.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_COMPRESSOR
-#define H_BITCOIN_COMPRESSOR
+#ifndef BITCOIN_COMPRESSOR_H
+#define BITCOIN_COMPRESSOR_H
 
 #include "core/transaction.h"
 #include "script/script.h"
@@ -116,4 +116,4 @@ class CTxOutCompressor
     }
 };
 
-#endif // H_BITCOIN_COMPRESSOR
+#endif // BITCOIN_COMPRESSOR_H
diff --git a/src/core/block.h b/src/core/block.h
index f1eb7a844fdb..6e119c369953 100644
--- a/src/core/block.h
+++ b/src/core/block.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_CORE_BLOCK
-#define H_BITCOIN_CORE_BLOCK
+#ifndef BITCOIN_CORE_BLOCK_H
+#define BITCOIN_CORE_BLOCK_H
 
 #include "core/transaction.h"
 #include "serialize.h"
@@ -165,4 +165,4 @@ struct CBlockLocator
     }
 };
 
-#endif // H_BITCOIN_CORE_BLOCK
+#endif // BITCOIN_CORE_BLOCK_H
diff --git a/src/core/transaction.h b/src/core/transaction.h
index c21558cfeb43..724348020aee 100644
--- a/src/core/transaction.h
+++ b/src/core/transaction.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_CORE_TRANSACTION
-#define H_BITCOIN_CORE_TRANSACTION
+#ifndef BITCOIN_CORE_TRANSACTION_H
+#define BITCOIN_CORE_TRANSACTION_H
 
 #include "amount.h"
 #include "script/script.h"
@@ -273,4 +273,4 @@ struct CMutableTransaction
     uint256 GetHash() const;
 };
 
-#endif // H_BITCOIN_CORE_TRANSACTION
+#endif // BITCOIN_CORE_TRANSACTION_H
diff --git a/src/core_io.h b/src/core_io.h
index 94848f1c3da1..b5ed03b8c84c 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef __BITCOIN_CORE_IO_H__
-#define __BITCOIN_CORE_IO_H__
+#ifndef BITCOIN_CORE_IO_H
+#define BITCOIN_CORE_IO_H
 
 #include <string>
 #include <vector>
@@ -26,4 +26,4 @@ extern void ScriptPubKeyToUniv(const CScript& scriptPubKey,
                         UniValue& out, bool fIncludeHex);
 extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
 
-#endif // __BITCOIN_CORE_IO_H__
+#endif // BITCOIN_CORE_IO_H
diff --git a/src/crypter.h b/src/crypter.h
index c7424c9b20e5..4d486c4313a3 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef __CRYPTER_H__
-#define __CRYPTER_H__
+#ifndef BITCOIN_CRYPTER_H
+#define BITCOIN_CRYPTER_H
 
 #include "allocators.h"
 #include "serialize.h"
@@ -195,4 +195,4 @@ class CCryptoKeyStore : public CBasicKeyStore
     boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;
 };
 
-#endif // __CRYPTER_H__
+#endif // BITCOIN_CRYPTER_H
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index 902e7ca83fc2..f468ec67227c 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_RIPEMD160_H
-#define BITCOIN_RIPEMD160_H
+#ifndef BITCOIN_CRYPTO_RIPEMD160_H
+#define BITCOIN_CRYPTO_RIPEMD160_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -25,4 +25,4 @@ class CRIPEMD160
     CRIPEMD160& Reset();
 };
 
-#endif // BITCOIN_RIPEMD160_H
+#endif // BITCOIN_CRYPTO_RIPEMD160_H
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index 68bd7ced9f05..e28f98decdb5 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_SHA1_H
-#define BITCOIN_SHA1_H
+#ifndef BITCOIN_CRYPTO_SHA1_H
+#define BITCOIN_CRYPTO_SHA1_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -25,4 +25,4 @@ class CSHA1
     CSHA1& Reset();
 };
 
-#endif // BITCOIN_SHA1_H
+#endif // BITCOIN_CRYPTO_SHA1_H
diff --git a/src/crypto/sha2.h b/src/crypto/sha2.h
index a6cbe58554a8..329c6675ab06 100644
--- a/src/crypto/sha2.h
+++ b/src/crypto/sha2.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_SHA2_H
-#define BITCOIN_SHA2_H
+#ifndef BITCOIN_CRYPTO_SHA2_H
+#define BITCOIN_CRYPTO_SHA2_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -61,4 +61,4 @@ class CHMAC_SHA512
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
 };
 
-#endif // BITCOIN_SHA2_H
+#endif // BITCOIN_CRYPTO_SHA2_H
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index e2d1e7edc4f0..52e9e5dab047 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_EC_WRAPPER_H
-#define BITCOIN_EC_WRAPPER_H
+#ifndef BITCOIN_ECWRAPPER_H
+#define BITCOIN_ECWRAPPER_H
 
 #include <cstddef>
 #include <vector>
diff --git a/src/protocol.h b/src/protocol.h
index b73041a9fdc5..2ac8f3d8f7fe 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -7,8 +7,8 @@
 #error This header can only be compiled as C++.
 #endif
 
-#ifndef __INCLUDED_PROTOCOL_H__
-#define __INCLUDED_PROTOCOL_H__
+#ifndef BITCOIN_PROTOCOL_H
+#define BITCOIN_PROTOCOL_H
 
 #include "netbase.h"
 #include "serialize.h"
@@ -149,4 +149,4 @@ enum {
     MSG_FILTERED_BLOCK,
 };
 
-#endif // __INCLUDED_PROTOCOL_H__
+#endif // BITCOIN_PROTOCOL_H
diff --git a/src/qt/addressbookpage.h b/src/qt/addressbookpage.h
index 20beb51ec478..031c424785f1 100644
--- a/src/qt/addressbookpage.h
+++ b/src/qt/addressbookpage.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef ADDRESSBOOKPAGE_H
-#define ADDRESSBOOKPAGE_H
+#ifndef BITCOIN_QT_ADDRESSBOOKPAGE_H
+#define BITCOIN_QT_ADDRESSBOOKPAGE_H
 
 #include <QDialog>
 
@@ -84,4 +84,4 @@ private slots:
     void sendCoins(QString addr);
 };
 
-#endif // ADDRESSBOOKPAGE_H
+#endif // BITCOIN_QT_ADDRESSBOOKPAGE_H
diff --git a/src/qt/addresstablemodel.h b/src/qt/addresstablemodel.h
index 71691f5a262f..310647d7c309 100644
--- a/src/qt/addresstablemodel.h
+++ b/src/qt/addresstablemodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef ADDRESSTABLEMODEL_H
-#define ADDRESSTABLEMODEL_H
+#ifndef BITCOIN_QT_ADDRESSTABLEMODEL_H
+#define BITCOIN_QT_ADDRESSTABLEMODEL_H
 
 #include <QAbstractTableModel>
 #include <QStringList>
@@ -92,4 +92,4 @@ public slots:
     friend class AddressTablePriv;
 };
 
-#endif // ADDRESSTABLEMODEL_H
+#endif // BITCOIN_QT_ADDRESSTABLEMODEL_H
diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h
index 1119e0861f16..660508606061 100644
--- a/src/qt/askpassphrasedialog.h
+++ b/src/qt/askpassphrasedialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef ASKPASSPHRASEDIALOG_H
-#define ASKPASSPHRASEDIALOG_H
+#ifndef BITCOIN_QT_ASKPASSPHRASEDIALOG_H
+#define BITCOIN_QT_ASKPASSPHRASEDIALOG_H
 
 #include <QDialog>
 
@@ -48,4 +48,4 @@ private slots:
     bool eventFilter(QObject *object, QEvent *event);
 };
 
-#endif // ASKPASSPHRASEDIALOG_H
+#endif // BITCOIN_QT_ASKPASSPHRASEDIALOG_H
diff --git a/src/qt/bitcoinaddressvalidator.h b/src/qt/bitcoinaddressvalidator.h
index 0fb779f7d8f7..15a6245da4e9 100644
--- a/src/qt/bitcoinaddressvalidator.h
+++ b/src/qt/bitcoinaddressvalidator.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOINADDRESSVALIDATOR_H
-#define BITCOINADDRESSVALIDATOR_H
+#ifndef BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
+#define BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
 
 #include <QValidator>
 
@@ -32,4 +32,4 @@ class BitcoinAddressCheckValidator : public QValidator
     State validate(QString &input, int &pos) const;
 };
 
-#endif // BITCOINADDRESSVALIDATOR_H
+#endif // BITCOIN_QT_BITCOINADDRESSVALIDATOR_H
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 040a2341776b..4ab66001f0dd 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOINAMOUNTFIELD_H
-#define BITCOINAMOUNTFIELD_H
+#ifndef BITCOIN_QT_BITCOINAMOUNTFIELD_H
+#define BITCOIN_QT_BITCOINAMOUNTFIELD_H
 
 #include "amount.h"
 
@@ -69,4 +69,4 @@ private slots:
 
 };
 
-#endif // BITCOINAMOUNTFIELD_H
+#endif // BITCOIN_QT_BITCOINAMOUNTFIELD_H
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 0ef410112766..35b36811c42e 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOINGUI_H
-#define BITCOINGUI_H
+#ifndef BITCOIN_QT_BITCOINGUI_H
+#define BITCOIN_QT_BITCOINGUI_H
 
 #if defined(HAVE_CONFIG_H)
 #include "config/bitcoin-config.h"
@@ -236,4 +236,4 @@ private slots:
     void onMenuSelection(QAction* action);
 };
 
-#endif // BITCOINGUI_H
+#endif // BITCOIN_QT_BITCOINGUI_H
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index a392c42b9b56..7a4f38274d57 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOINUNITS_H
-#define BITCOINUNITS_H
+#ifndef BITCOIN_QT_BITCOINUNITS_H
+#define BITCOIN_QT_BITCOINUNITS_H
 
 #include "amount.h"
 
@@ -126,4 +126,4 @@ class BitcoinUnits: public QAbstractListModel
 };
 typedef BitcoinUnits::Unit BitcoinUnit;
 
-#endif // BITCOINUNITS_H
+#endif // BITCOIN_QT_BITCOINUNITS_H
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index c7bd60bd4131..c7a05e287d0e 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef CLIENTMODEL_H
-#define CLIENTMODEL_H
+#ifndef BITCOIN_QT_CLIENTMODEL_H
+#define BITCOIN_QT_CLIENTMODEL_H
 
 #include <QObject>
 
@@ -102,4 +102,4 @@ public slots:
     void updateAlert(const QString &hash, int status);
 };
 
-#endif // CLIENTMODEL_H
+#endif // BITCOIN_QT_CLIENTMODEL_H
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index 9eaa8eb41d55..cc388d626ee1 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef COINCONTROLDIALOG_H
-#define COINCONTROLDIALOG_H
+#ifndef BITCOIN_QT_COINCONTROLDIALOG_H
+#define BITCOIN_QT_COINCONTROLDIALOG_H
 
 #include "amount.h"
 
@@ -124,4 +124,4 @@ private slots:
     void updateLabelLocked();
 };
 
-#endif // COINCONTROLDIALOG_H
+#endif // BITCOIN_QT_COINCONTROLDIALOG_H
diff --git a/src/qt/coincontroltreewidget.h b/src/qt/coincontroltreewidget.h
index a2cd34eb88b0..643eaf0c7098 100644
--- a/src/qt/coincontroltreewidget.h
+++ b/src/qt/coincontroltreewidget.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef COINCONTROLTREEWIDGET_H
-#define COINCONTROLTREEWIDGET_H
+#ifndef BITCOIN_QT_COINCONTROLTREEWIDGET_H
+#define BITCOIN_QT_COINCONTROLTREEWIDGET_H
 
 #include <QKeyEvent>
 #include <QTreeWidget>
@@ -19,4 +19,4 @@ class CoinControlTreeWidget : public QTreeWidget
     virtual void keyPressEvent(QKeyEvent *event);
 };
 
-#endif // COINCONTROLTREEWIDGET_H
\ No newline at end of file
+#endif // BITCOIN_QT_COINCONTROLTREEWIDGET_H
diff --git a/src/qt/csvmodelwriter.h b/src/qt/csvmodelwriter.h
index 29de251efe10..c613ce73eb5c 100644
--- a/src/qt/csvmodelwriter.h
+++ b/src/qt/csvmodelwriter.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef CSVMODELWRITER_H
-#define CSVMODELWRITER_H
+#ifndef BITCOIN_QT_CSVMODELWRITER_H
+#define BITCOIN_QT_CSVMODELWRITER_H
 
 #include <QList>
 #include <QObject>
@@ -43,4 +43,4 @@ class CSVModelWriter : public QObject
     QList<Column> columns;
 };
 
-#endif // CSVMODELWRITER_H
+#endif // BITCOIN_QT_CSVMODELWRITER_H
diff --git a/src/qt/editaddressdialog.h b/src/qt/editaddressdialog.h
index 6910c667cd53..aa1103a2f516 100644
--- a/src/qt/editaddressdialog.h
+++ b/src/qt/editaddressdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef EDITADDRESSDIALOG_H
-#define EDITADDRESSDIALOG_H
+#ifndef BITCOIN_QT_EDITADDRESSDIALOG_H
+#define BITCOIN_QT_EDITADDRESSDIALOG_H
 
 #include <QDialog>
 
@@ -54,4 +54,4 @@ public slots:
     QString address;
 };
 
-#endif // EDITADDRESSDIALOG_H
+#endif // BITCOIN_QT_EDITADDRESSDIALOG_H
diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index 4c8a67b663e3..f23175049a48 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef GUICONSTANTS_H
-#define GUICONSTANTS_H
+#ifndef BITCOIN_QT_GUICONSTANTS_H
+#define BITCOIN_QT_GUICONSTANTS_H
 
 /* Milliseconds between model updates */
 static const int MODEL_UPDATE_DELAY = 250;
@@ -52,4 +52,4 @@ static const int MAX_PAYMENT_REQUEST_SIZE = 50000; // bytes
 #define QAPP_APP_NAME_DEFAULT "Bitcoin-Qt"
 #define QAPP_APP_NAME_TESTNET "Bitcoin-Qt-testnet"
 
-#endif // GUICONSTANTS_H
+#endif // BITCOIN_QT_GUICONSTANTS_H
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 0939c78f647f..5666744bd31c 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef GUIUTIL_H
-#define GUIUTIL_H
+#ifndef BITCOIN_QT_GUIUTIL_H
+#define BITCOIN_QT_GUIUTIL_H
 
 #include "amount.h"
 
@@ -188,4 +188,4 @@ namespace GUIUtil
     QString formatPingTime(double dPingTime);
 } // namespace GUIUtil
 
-#endif // GUIUTIL_H
+#endif // BITCOIN_QT_GUIUTIL_H
diff --git a/src/qt/intro.h b/src/qt/intro.h
index e3e396d3693b..c9c0d448faa4 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef INTRO_H
-#define INTRO_H
+#ifndef BITCOIN_QT_INTRO_H
+#define BITCOIN_QT_INTRO_H
 
 #include <QDialog>
 #include <QMutex>
@@ -70,4 +70,4 @@ private slots:
     friend class FreespaceChecker;
 };
 
-#endif // INTRO_H
+#endif // BITCOIN_QT_INTRO_H
diff --git a/src/qt/macdockiconhandler.h b/src/qt/macdockiconhandler.h
index b21a61cb071d..1ffab75c9a11 100644
--- a/src/qt/macdockiconhandler.h
+++ b/src/qt/macdockiconhandler.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef MACDOCKICONHANDLER_H
-#define MACDOCKICONHANDLER_H
+#ifndef BITCOIN_QT_MACDOCKICONHANDLER_H
+#define BITCOIN_QT_MACDOCKICONHANDLER_H
 
 #include <QMainWindow>
 #include <QObject>
@@ -48,4 +48,4 @@ class MacDockIconHandler : public QObject
     QMainWindow *mainWindow;
 };
 
-#endif // MACDOCKICONCLICKHANDLER_H
+#endif // BITCOIN_QT_MACDOCKICONHANDLER_H
diff --git a/src/qt/macnotificationhandler.h b/src/qt/macnotificationhandler.h
index bc335edede37..f7a4cb7f5b05 100644
--- a/src/qt/macnotificationhandler.h
+++ b/src/qt/macnotificationhandler.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef MACNOTIFICATIONHANDLER_H
-#define MACNOTIFICATIONHANDLER_H
+#ifndef BITCOIN_QT_MACNOTIFICATIONHANDLER_H
+#define BITCOIN_QT_MACNOTIFICATIONHANDLER_H
 
 #include <QObject>
 
@@ -27,4 +27,4 @@ class MacNotificationHandler : public QObject
 };
 
 
-#endif // MACNOTIFICATIONHANDLER_H
+#endif // BITCOIN_QT_MACNOTIFICATIONHANDLER_H
diff --git a/src/qt/networkstyle.h b/src/qt/networkstyle.h
index 99304d61a3ab..e49b86c9503e 100644
--- a/src/qt/networkstyle.h
+++ b/src/qt/networkstyle.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_NETWORKSTYLE
-#define H_NETWORKSTYLE
+#ifndef BITCOIN_QT_NETWORKSTYLE_H
+#define BITCOIN_QT_NETWORKSTYLE_H
 
 #include <QIcon>
 #include <QPixmap>
@@ -30,4 +30,4 @@ class NetworkStyle
     QPixmap splashImage;
 };
 
-#endif // H_NETWORKSTYLE
+#endif // BITCOIN_QT_NETWORKSTYLE_H
diff --git a/src/qt/notificator.h b/src/qt/notificator.h
index 3395e6435098..61c27e7ff887 100644
--- a/src/qt/notificator.h
+++ b/src/qt/notificator.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef NOTIFICATOR_H
-#define NOTIFICATOR_H
+#ifndef BITCOIN_QT_NOTIFICATOR_H
+#define BITCOIN_QT_NOTIFICATOR_H
 
 #if defined(HAVE_CONFIG_H)
 #include "config/bitcoin-config.h"
@@ -77,4 +77,4 @@ public slots:
 #endif
 };
 
-#endif // NOTIFICATOR_H
+#endif // BITCOIN_QT_NOTIFICATOR_H
diff --git a/src/qt/openuridialog.h b/src/qt/openuridialog.h
index 67a5f167d153..f04ec71b32ce 100644
--- a/src/qt/openuridialog.h
+++ b/src/qt/openuridialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef OPENURIDIALOG_H
-#define OPENURIDIALOG_H
+#ifndef BITCOIN_QT_OPENURIDIALOG_H
+#define BITCOIN_QT_OPENURIDIALOG_H
 
 #include <QDialog>
 
@@ -31,4 +31,4 @@ private slots:
     Ui::OpenURIDialog *ui;
 };
 
-#endif // OPENURIDIALOG_H
+#endif // BITCOIN_QT_OPENURIDIALOG_H
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 2abd92cae593..108609610db6 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef OPTIONSDIALOG_H
-#define OPTIONSDIALOG_H
+#ifndef BITCOIN_QT_OPTIONSDIALOG_H
+#define BITCOIN_QT_OPTIONSDIALOG_H
 
 #include <QDialog>
 
@@ -59,4 +59,4 @@ private slots:
     bool fProxyIpValid;
 };
 
-#endif // OPTIONSDIALOG_H
+#endif // BITCOIN_QT_OPTIONSDIALOG_H
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 42ea3bf8e5b3..e2dc067edbd6 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef OPTIONSMODEL_H
-#define OPTIONSMODEL_H
+#ifndef BITCOIN_QT_OPTIONSMODEL_H
+#define BITCOIN_QT_OPTIONSMODEL_H
 
 #include "amount.h"
 
@@ -88,4 +88,4 @@ class OptionsModel : public QAbstractListModel
     void coinControlFeaturesChanged(bool);
 };
 
-#endif // OPTIONSMODEL_H
+#endif // BITCOIN_QT_OPTIONSMODEL_H
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 03f239008f36..e889eae8be0f 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef OVERVIEWPAGE_H
-#define OVERVIEWPAGE_H
+#ifndef BITCOIN_QT_OVERVIEWPAGE_H
+#define BITCOIN_QT_OVERVIEWPAGE_H
 
 #include "amount.h"
 
@@ -63,4 +63,4 @@ private slots:
     void updateWatchOnlyLabels(bool showWatchOnly);
 };
 
-#endif // OVERVIEWPAGE_H
+#endif // BITCOIN_QT_OVERVIEWPAGE_H
diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h
index 3d94d93269d0..91c704c520f4 100644
--- a/src/qt/paymentrequestplus.h
+++ b/src/qt/paymentrequestplus.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef PAYMENTREQUESTPLUS_H
-#define PAYMENTREQUESTPLUS_H
+#ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H
+#define BITCOIN_QT_PAYMENTREQUESTPLUS_H
 
 #include "paymentrequest.pb.h"
 
@@ -42,5 +42,4 @@ class PaymentRequestPlus
     payments::PaymentDetails details;
 };
 
-#endif // PAYMENTREQUESTPLUS_H
-
+#endif // BITCOIN_QT_PAYMENTREQUESTPLUS_H
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index d84d09c57d6c..25b08cde49bb 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -2,8 +2,9 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef PAYMENTSERVER_H
-#define PAYMENTSERVER_H
+#ifndef BITCOIN_QT_PAYMENTSERVER_H
+#define BITCOIN_QT_PAYMENTSERVER_H
+
 // This class handles payment requests from clicking on
 // bitcoin: URIs
 //
@@ -135,4 +136,4 @@ private slots:
     OptionsModel *optionsModel;
 };
 
-#endif // PAYMENTSERVER_H
+#endif // BITCOIN_QT_PAYMENTSERVER_H
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index 38f2662f8931..23e71fc685f6 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef PEERTABLEMODEL_H
-#define PEERTABLEMODEL_H
+#ifndef BITCOIN_QT_PEERTABLEMODEL_H
+#define BITCOIN_QT_PEERTABLEMODEL_H
 
 #include "main.h"
 #include "net.h"
@@ -78,4 +78,4 @@ public slots:
     QTimer *timer;
 };
 
-#endif // PEERTABLEMODEL_H
+#endif // BITCOIN_QT_PEERTABLEMODEL_H
diff --git a/src/qt/qvalidatedlineedit.h b/src/qt/qvalidatedlineedit.h
index c2a4817e6539..0996164b0fe7 100644
--- a/src/qt/qvalidatedlineedit.h
+++ b/src/qt/qvalidatedlineedit.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef QVALIDATEDLINEEDIT_H
-#define QVALIDATEDLINEEDIT_H
+#ifndef BITCOIN_QT_QVALIDATEDLINEEDIT_H
+#define BITCOIN_QT_QVALIDATEDLINEEDIT_H
 
 #include <QLineEdit>
 
@@ -36,4 +36,4 @@ private slots:
     void checkValidity();
 };
 
-#endif // QVALIDATEDLINEEDIT_H
+#endif // BITCOIN_QT_QVALIDATEDLINEEDIT_H
diff --git a/src/qt/qvaluecombobox.h b/src/qt/qvaluecombobox.h
index 5f2182913cef..821f41716b55 100644
--- a/src/qt/qvaluecombobox.h
+++ b/src/qt/qvaluecombobox.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef QVALUECOMBOBOX_H
-#define QVALUECOMBOBOX_H
+#ifndef BITCOIN_QT_QVALUECOMBOBOX_H
+#define BITCOIN_QT_QVALUECOMBOBOX_H
 
 #include <QComboBox>
 #include <QVariant>
@@ -34,4 +34,4 @@ private slots:
     void handleSelectionChanged(int idx);
 };
 
-#endif // QVALUECOMBOBOX_H
+#endif // BITCOIN_QT_QVALUECOMBOBOX_H
diff --git a/src/qt/receivecoinsdialog.h b/src/qt/receivecoinsdialog.h
index 7a7e38e25e9e..220fb5c7a81c 100644
--- a/src/qt/receivecoinsdialog.h
+++ b/src/qt/receivecoinsdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef RECEIVECOINSDIALOG_H
-#define RECEIVECOINSDIALOG_H
+#ifndef BITCOIN_QT_RECEIVECOINSDIALOG_H
+#define BITCOIN_QT_RECEIVECOINSDIALOG_H
 
 #include "guiutil.h"
 
@@ -73,4 +73,4 @@ private slots:
     void copyAmount();
 };
 
-#endif // RECEIVECOINSDIALOG_H
+#endif // BITCOIN_QT_RECEIVECOINSDIALOG_H
diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h
index 9b78e495c364..6f3b9838e26d 100644
--- a/src/qt/receiverequestdialog.h
+++ b/src/qt/receiverequestdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef QRCODEDIALOG_H
-#define QRCODEDIALOG_H
+#ifndef BITCOIN_QT_RECEIVEREQUESTDIALOG_H
+#define BITCOIN_QT_RECEIVEREQUESTDIALOG_H
 
 #include "walletmodel.h"
 
@@ -67,4 +67,4 @@ private slots:
     SendCoinsRecipient info;
 };
 
-#endif // QRCODEDIALOG_H
+#endif // BITCOIN_QT_RECEIVEREQUESTDIALOG_H
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 3df5971823b1..ec6a49070daa 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef RECENTREQUESTSTABLEMODEL_H
-#define RECENTREQUESTSTABLEMODEL_H
+#ifndef BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
+#define BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
 
 #include "walletmodel.h"
 
@@ -105,4 +105,4 @@ public slots:
     QString getAmountTitle();
 };
 
-#endif
+#endif // BITCOIN_QT_RECENTREQUESTSTABLEMODEL_H
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 1ffff927586a..4bb9b62e9327 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef RPCCONSOLE_H
-#define RPCCONSOLE_H
+#ifndef BITCOIN_QT_RPCCONSOLE_H
+#define BITCOIN_QT_RPCCONSOLE_H
 
 #include "guiutil.h"
 #include "peertablemodel.h"
@@ -100,4 +100,4 @@ public slots:
     NodeId cachedNodeid;
 };
 
-#endif // RPCCONSOLE_H
+#endif // BITCOIN_QT_RPCCONSOLE_H
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 74cc4bde56e2..eec661cbd0b5 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef SENDCOINSDIALOG_H
-#define SENDCOINSDIALOG_H
+#ifndef BITCOIN_QT_SENDCOINSDIALOG_H
+#define BITCOIN_QT_SENDCOINSDIALOG_H
 
 #include "walletmodel.h"
 
@@ -83,4 +83,4 @@ private slots:
     void message(const QString &title, const QString &message, unsigned int style);
 };
 
-#endif // SENDCOINSDIALOG_H
+#endif // BITCOIN_QT_SENDCOINSDIALOG_H
diff --git a/src/qt/sendcoinsentry.h b/src/qt/sendcoinsentry.h
index 2b696c77fbc8..69ad1032df95 100644
--- a/src/qt/sendcoinsentry.h
+++ b/src/qt/sendcoinsentry.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef SENDCOINSENTRY_H
-#define SENDCOINSENTRY_H
+#ifndef BITCOIN_QT_SENDCOINSENTRY_H
+#define BITCOIN_QT_SENDCOINSENTRY_H
 
 #include "walletmodel.h"
 
@@ -67,4 +67,4 @@ private slots:
     bool updateLabel(const QString &address);
 };
 
-#endif // SENDCOINSENTRY_H
+#endif // BITCOIN_QT_SENDCOINSENTRY_H
diff --git a/src/qt/signverifymessagedialog.h b/src/qt/signverifymessagedialog.h
index bba861649a1d..36550edc8d7d 100644
--- a/src/qt/signverifymessagedialog.h
+++ b/src/qt/signverifymessagedialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef SIGNVERIFYMESSAGEDIALOG_H
-#define SIGNVERIFYMESSAGEDIALOG_H
+#ifndef BITCOIN_QT_SIGNVERIFYMESSAGEDIALOG_H
+#define BITCOIN_QT_SIGNVERIFYMESSAGEDIALOG_H
 
 #include <QDialog>
 
@@ -48,4 +48,4 @@ private slots:
     void on_clearButton_VM_clicked();
 };
 
-#endif // SIGNVERIFYMESSAGEDIALOG_H
+#endif // BITCOIN_QT_SIGNVERIFYMESSAGEDIALOG_H
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index 128edadbee40..4d9651f022ff 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef SPLASHSCREEN_H
-#define SPLASHSCREEN_H
+#ifndef BITCOIN_QT_SPLASHSCREEN_H
+#define BITCOIN_QT_SPLASHSCREEN_H
 
 #include <QSplashScreen>
 
@@ -46,4 +46,4 @@ public slots:
     int curAlignment;
 };
 
-#endif // SPLASHSCREEN_H
+#endif // BITCOIN_QT_SPLASHSCREEN_H
diff --git a/src/qt/test/paymentservertests.h b/src/qt/test/paymentservertests.h
index 9b6400b0d58a..0717111f6648 100644
--- a/src/qt/test/paymentservertests.h
+++ b/src/qt/test/paymentservertests.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef PAYMENTSERVERTESTS_H
-#define PAYMENTSERVERTESTS_H
+#ifndef BITCOIN_QT_TEST_PAYMENTSERVERTESTS_H
+#define BITCOIN_QT_TEST_PAYMENTSERVERTESTS_H
 
 #include "../paymentserver.h"
 
@@ -32,4 +32,4 @@ public slots:
     SendCoinsRecipient recipient;
 };
 
-#endif // PAYMENTSERVERTESTS_H
+#endif // BITCOIN_QT_TEST_PAYMENTSERVERTESTS_H
diff --git a/src/qt/test/uritests.h b/src/qt/test/uritests.h
index 1ea6d9f075ee..ed30a9f4a78d 100644
--- a/src/qt/test/uritests.h
+++ b/src/qt/test/uritests.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef URITESTS_H
-#define URITESTS_H
+#ifndef BITCOIN_QT_TEST_URITESTS_H
+#define BITCOIN_QT_TEST_URITESTS_H
 
 #include <QObject>
 #include <QTest>
@@ -16,4 +16,4 @@ private slots:
     void uriTests();
 };
 
-#endif // URITESTS_H
+#endif // BITCOIN_QT_TEST_URITESTS_H
diff --git a/src/qt/trafficgraphwidget.h b/src/qt/trafficgraphwidget.h
index efab6e7fc5c8..50571e0b2d2e 100644
--- a/src/qt/trafficgraphwidget.h
+++ b/src/qt/trafficgraphwidget.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRAFFICGRAPHWIDGET_H
-#define TRAFFICGRAPHWIDGET_H
+#ifndef BITCOIN_QT_TRAFFICGRAPHWIDGET_H
+#define BITCOIN_QT_TRAFFICGRAPHWIDGET_H
 
 #include <QWidget>
 #include <QQueue>
@@ -45,4 +45,4 @@ public slots:
     ClientModel *clientModel;
 };
 
-#endif // TRAFFICGRAPHWIDGET_H
+#endif // BITCOIN_QT_TRAFFICGRAPHWIDGET_H
diff --git a/src/qt/transactiondesc.h b/src/qt/transactiondesc.h
index 4bd429321069..fc958a097c4a 100644
--- a/src/qt/transactiondesc.h
+++ b/src/qt/transactiondesc.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONDESC_H
-#define TRANSACTIONDESC_H
+#ifndef BITCOIN_QT_TRANSACTIONDESC_H
+#define BITCOIN_QT_TRANSACTIONDESC_H
 
 #include <QObject>
 #include <QString>
@@ -28,4 +28,4 @@ class TransactionDesc: public QObject
     static QString FormatTxStatus(const CWalletTx& wtx);
 };
 
-#endif // TRANSACTIONDESC_H
+#endif // BITCOIN_QT_TRANSACTIONDESC_H
diff --git a/src/qt/transactiondescdialog.h b/src/qt/transactiondescdialog.h
index d4719975b2d0..c12c18e824c3 100644
--- a/src/qt/transactiondescdialog.h
+++ b/src/qt/transactiondescdialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONDESCDIALOG_H
-#define TRANSACTIONDESCDIALOG_H
+#ifndef BITCOIN_QT_TRANSACTIONDESCDIALOG_H
+#define BITCOIN_QT_TRANSACTIONDESCDIALOG_H
 
 #include <QDialog>
 
@@ -28,4 +28,4 @@ class TransactionDescDialog : public QDialog
     Ui::TransactionDescDialog *ui;
 };
 
-#endif // TRANSACTIONDESCDIALOG_H
+#endif // BITCOIN_QT_TRANSACTIONDESCDIALOG_H
diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h
index ca31ee8f8720..5836b114ab2a 100644
--- a/src/qt/transactionfilterproxy.h
+++ b/src/qt/transactionfilterproxy.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONFILTERPROXY_H
-#define TRANSACTIONFILTERPROXY_H
+#ifndef BITCOIN_QT_TRANSACTIONFILTERPROXY_H
+#define BITCOIN_QT_TRANSACTIONFILTERPROXY_H
 
 #include "amount.h"
 
@@ -65,4 +65,4 @@ class TransactionFilterProxy : public QSortFilterProxyModel
     bool showInactive;
 };
 
-#endif // TRANSACTIONFILTERPROXY_H
+#endif // BITCOIN_QT_TRANSACTIONFILTERPROXY_H
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 9276c9f0afcf..e26453cda474 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONRECORD_H
-#define TRANSACTIONRECORD_H
+#ifndef BITCOIN_QT_TRANSACTIONRECORD_H
+#define BITCOIN_QT_TRANSACTIONRECORD_H
 
 #include "amount.h"
 #include "uint256.h"
@@ -140,4 +140,4 @@ class TransactionRecord
     bool statusUpdateNeeded();
 };
 
-#endif // TRANSACTIONRECORD_H
+#endif // BITCOIN_QT_TRANSACTIONRECORD_H
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index bb517a969c9e..cfefe4cf193e 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONTABLEMODEL_H
-#define TRANSACTIONTABLEMODEL_H
+#ifndef BITCOIN_QT_TRANSACTIONTABLEMODEL_H
+#define BITCOIN_QT_TRANSACTIONTABLEMODEL_H
 
 #include "bitcoinunits.h"
 
@@ -109,4 +109,4 @@ public slots:
     friend class TransactionTablePriv;
 };
 
-#endif // TRANSACTIONTABLEMODEL_H
+#endif // BITCOIN_QT_TRANSACTIONTABLEMODEL_H
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index b249e0041102..be6989adee29 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef TRANSACTIONVIEW_H
-#define TRANSACTIONVIEW_H
+#ifndef BITCOIN_QT_TRANSACTIONVIEW_H
+#define BITCOIN_QT_TRANSACTIONVIEW_H
 
 #include "guiutil.h"
 
@@ -112,4 +112,4 @@ public slots:
 
 };
 
-#endif // TRANSACTIONVIEW_H
+#endif // BITCOIN_QT_TRANSACTIONVIEW_H
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
index ae5045cca905..e10b4dc8afa2 100644
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef UTILITYDIALOG_H
-#define UTILITYDIALOG_H
+#ifndef BITCOIN_QT_UTILITYDIALOG_H
+#define BITCOIN_QT_UTILITYDIALOG_H
 
 #include <QDialog>
 #include <QObject>
@@ -49,4 +49,4 @@ class ShutdownWindow : public QWidget
     void closeEvent(QCloseEvent *event);
 };
 
-#endif // UTILITYDIALOG_H
+#endif // BITCOIN_QT_UTILITYDIALOG_H
diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h
index f1830a0d6bdc..ae8592840d51 100644
--- a/src/qt/walletframe.h
+++ b/src/qt/walletframe.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef WALLETFRAME_H
-#define WALLETFRAME_H
+#ifndef BITCOIN_QT_WALLETFRAME_H
+#define BITCOIN_QT_WALLETFRAME_H
 
 #include <QFrame>
 #include <QMap>
@@ -77,4 +77,4 @@ public slots:
     void usedReceivingAddresses();
 };
 
-#endif // WALLETFRAME_H
+#endif // BITCOIN_QT_WALLETFRAME_H
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index fe91e9d9faee..0c6077963dbb 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef WALLETMODEL_H
-#define WALLETMODEL_H
+#ifndef BITCOIN_QT_WALLETMODEL_H
+#define BITCOIN_QT_WALLETMODEL_H
 
 #include "paymentrequestplus.h"
 #include "walletmodeltransaction.h"
@@ -261,4 +261,4 @@ public slots:
     void pollBalanceChanged();
 };
 
-#endif // WALLETMODEL_H
+#endif // BITCOIN_QT_WALLETMODEL_H
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index 4eadfbe4d19f..a880384ed634 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef WALLETMODELTRANSACTION_H
-#define WALLETMODELTRANSACTION_H
+#ifndef BITCOIN_QT_WALLETMODELTRANSACTION_H
+#define BITCOIN_QT_WALLETMODELTRANSACTION_H
 
 #include "walletmodel.h"
 
@@ -41,4 +41,4 @@ class WalletModelTransaction
     CAmount fee;
 };
 
-#endif // WALLETMODELTRANSACTION_H
+#endif // BITCOIN_QT_WALLETMODELTRANSACTION_H
diff --git a/src/qt/walletview.h b/src/qt/walletview.h
index cafba517fdf9..95890ccd67e5 100644
--- a/src/qt/walletview.h
+++ b/src/qt/walletview.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef WALLETVIEW_H
-#define WALLETVIEW_H
+#ifndef BITCOIN_QT_WALLETVIEW_H
+#define BITCOIN_QT_WALLETVIEW_H
 
 #include "amount.h"
 
@@ -116,4 +116,4 @@ public slots:
     void incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address);
 };
 
-#endif // WALLETVIEW_H
+#endif // BITCOIN_QT_WALLETVIEW_H
diff --git a/src/qt/winshutdownmonitor.h b/src/qt/winshutdownmonitor.h
index 4c76d2c816b6..26f5d803616b 100644
--- a/src/qt/winshutdownmonitor.h
+++ b/src/qt/winshutdownmonitor.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef WINSHUTDOWNMONITOR_H
-#define WINSHUTDOWNMONITOR_H
+#ifndef BITCOIN_QT_WINSHUTDOWNMONITOR_H
+#define BITCOIN_QT_WINSHUTDOWNMONITOR_H
 
 #ifdef WIN32
 #include <QByteArray>
@@ -26,4 +26,4 @@ class WinShutdownMonitor : public QAbstractNativeEventFilter
 #endif
 #endif
 
-#endif // WINSHUTDOWNMONITOR_H
+#endif // BITCOIN_QT_WINSHUTDOWNMONITOR_H
diff --git a/src/rpcclient.h b/src/rpcclient.h
index 307aa2aab8b0..cd11f177e829 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOINRPC_CLIENT_H_
-#define _BITCOINRPC_CLIENT_H_
+#ifndef BITCOIN_RPCCLIENT_H
+#define BITCOIN_RPCCLIENT_H
 
 #include "json/json_spirit_reader_template.h"
 #include "json/json_spirit_utils.h"
@@ -12,4 +12,4 @@
 
 json_spirit::Array RPCConvertValues(const std::string& strMethod, const std::vector<std::string>& strParams);
 
-#endif // _BITCOINRPC_CLIENT_H_
+#endif // BITCOIN_RPCCLIENT_H
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 9117248506fa..9926daaf3de7 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOINRPC_PROTOCOL_H_
-#define _BITCOINRPC_PROTOCOL_H_
+#ifndef BITCOIN_RPCPROTOCOL_H
+#define BITCOIN_RPCPROTOCOL_H
 
 #include <list>
 #include <map>
@@ -164,4 +164,4 @@ json_spirit::Object JSONRPCReplyObj(const json_spirit::Value& result, const json
 std::string JSONRPCReply(const json_spirit::Value& result, const json_spirit::Value& error, const json_spirit::Value& id);
 json_spirit::Object JSONRPCError(int code, const std::string& message);
 
-#endif // _BITCOINRPC_PROTOCOL_H_
+#endif // BITCOIN_RPCPROTOCOL_H
diff --git a/src/rpcserver.h b/src/rpcserver.h
index dc4663739964..2f34b11d22bb 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef _BITCOINRPC_SERVER_H_
-#define _BITCOINRPC_SERVER_H_
+#ifndef BITCOIN_RPCSERVER_H
+#define BITCOIN_RPCSERVER_H
 
 #include "amount.h"
 #include "rpcprotocol.h"
@@ -211,4 +211,4 @@ extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp)
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
 
-#endif // _BITCOINRPC_SERVER_H_
+#endif // BITCOIN_RPCSERVER_H
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 5133c80aabc7..ed899fc411f9 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT_INTERPRETER
-#define H_BITCOIN_SCRIPT_INTERPRETER
+#ifndef BITCOIN_SCRIPT_INTERPRETER_H
+#define BITCOIN_SCRIPT_INTERPRETER_H
 
 #include <vector>
 #include <stdint.h>
@@ -88,4 +88,4 @@ class SignatureChecker : public BaseSignatureChecker
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker);
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker);
 
-#endif // H_BITCOIN_SCRIPT_INTERPRETER
+#endif // BITCOIN_SCRIPT_INTERPRETER_H
diff --git a/src/script/script.h b/src/script/script.h
index 05f2e7e3a94f..e525ad13ee83 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT
-#define H_BITCOIN_SCRIPT
+#ifndef BITCOIN_SCRIPT_SCRIPT_H
+#define BITCOIN_SCRIPT_SCRIPT_H
 
 #include <assert.h>
 #include <climits>
@@ -592,4 +592,4 @@ class CScript : public std::vector<unsigned char>
     }
 };
 
-#endif // H_BITCOIN_SCRIPT
+#endif // BITCOIN_SCRIPT_SCRIPT_H
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 46b8f4d33599..df2a2ea13c8c 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT_SIGCACHE
-#define H_BITCOIN_SCRIPT_SIGCACHE
+#ifndef BITCOIN_SCRIPT_SIGCACHE_H
+#define BITCOIN_SCRIPT_SIGCACHE_H
 
 #include "script/interpreter.h"
 
@@ -23,4 +23,4 @@ class CachingSignatureChecker : public SignatureChecker
     bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 };
 
-#endif // H_BITCOIN_SCRIPT_SIGCACHE
+#endif // BITCOIN_SCRIPT_SIGCACHE_H
diff --git a/src/script/sign.h b/src/script/sign.h
index f218a64562c2..c84d3f9a9437 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT_SIGN
-#define H_BITCOIN_SCRIPT_SIGN
+#ifndef BITCOIN_SCRIPT_SIGN_H
+#define BITCOIN_SCRIPT_SIGN_H
 
 #include "script/interpreter.h"
 
@@ -21,4 +21,4 @@ bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutab
 // combine them intelligently and return the result.
 CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
-#endif // H_BITCOIN_SCRIPT_SIGN
+#endif // BITCOIN_SCRIPT_SIGN_H
diff --git a/src/script/standard.h b/src/script/standard.h
index 504d98c68697..495a19de2fc7 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_SCRIPT_STANDARD
-#define H_BITCOIN_SCRIPT_STANDARD
+#ifndef BITCOIN_SCRIPT_STANDARD_H
+#define BITCOIN_SCRIPT_STANDARD_H
 
 #include "key.h"
 #include "script/script.h"
@@ -84,4 +84,4 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::
 CScript GetScriptForDestination(const CTxDestination& dest);
 CScript GetScriptForMultisig(int nRequired, const std::vector<CPubKey>& keys);
 
-#endif // H_BITCOIN_SCRIPT_STANDARD
+#endif // BITCOIN_SCRIPT_STANDARD_H
diff --git a/src/test/bignum.h b/src/test/bignum.h
index 86980b2af62f..f64c9872025f 100644
--- a/src/test/bignum.h
+++ b/src/test/bignum.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_BIGNUM_H
-#define BITCOIN_BIGNUM_H
+#ifndef BITCOIN_TEST_BIGNUM_H
+#define BITCOIN_TEST_BIGNUM_H
 
 #include <algorithm>
 #include <limits>
@@ -177,4 +177,4 @@ inline bool operator>=(const CBigNum& a, const CBigNum& b) { return (BN_cmp(&a,
 inline bool operator<(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) < 0); }
 inline bool operator>(const CBigNum& a, const CBigNum& b)  { return (BN_cmp(&a, &b) > 0); }
 
-#endif
+#endif // BITCOIN_TEST_BIGNUM_H
diff --git a/src/txdb.h b/src/txdb.h
index 8f2bd9af4d15..147c186990d3 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_TXDB_LEVELDB_H
-#define BITCOIN_TXDB_LEVELDB_H
+#ifndef BITCOIN_TXDB_H
+#define BITCOIN_TXDB_H
 
 #include "leveldbwrapper.h"
 #include "main.h"
@@ -62,4 +62,4 @@ class CBlockTreeDB : public CLevelDBWrapper
     bool LoadBlockIndexGuts();
 };
 
-#endif // BITCOIN_TXDB_LEVELDB_H
+#endif // BITCOIN_TXDB_H
diff --git a/src/undo.h b/src/undo.h
index 232c19342999..4f5f4047dd42 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_TXUNDO
-#define H_BITCOIN_TXUNDO
+#ifndef BITCOIN_UNDO_H
+#define BITCOIN_UNDO_H
 
 #include "compressor.h" 
 #include "core/transaction.h"
@@ -68,4 +68,4 @@ class CTxUndo
     }
 };
 
-#endif // H_BITCOIN_TXUNDO
+#endif // BITCOIN_UNDO_H
diff --git a/src/univalue/gen.cpp b/src/univalue/gen.cpp
index 881948f46ecc..f0b352eef089 100644
--- a/src/univalue/gen.cpp
+++ b/src/univalue/gen.cpp
@@ -35,8 +35,8 @@ static void initJsonEscape()
 static void outputEscape()
 {
 	printf(	"// Automatically generated file. Do not modify.\n"
-		"#ifndef __UNIVALUE_ESCAPES_H__\n"
-		"#define __UNIVALUE_ESCAPES_H__\n"
+		"#ifndef BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H\n"
+		"#define BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H\n"
 		"static const char *escapes[256] = {\n");
 
 	for (unsigned int i = 0; i < 256; i++) {
@@ -66,7 +66,7 @@ static void outputEscape()
 	}
 
 	printf(	"};\n"
-		"#endif // __UNIVALUE_ESCAPES_H__\n");
+		"#endif // BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H\n");
 }
 
 int main (int argc, char *argv[])
diff --git a/src/univalue/univalue.h b/src/univalue/univalue.h
index 0a7bf3ccebac..5ac301d9e5c9 100644
--- a/src/univalue/univalue.h
+++ b/src/univalue/univalue.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef __UNIVALUE_H__
-#define __UNIVALUE_H__
+#ifndef BITCOIN_UNIVALUE_UNIVALUE_H
+#define BITCOIN_UNIVALUE_UNIVALUE_H
 
 #include <stdint.h>
 #include <string>
@@ -152,4 +152,4 @@ extern enum jtokentype getJsonToken(std::string& tokenVal,
                                     unsigned int& consumed, const char *raw);
 extern const char *uvTypeName(UniValue::VType t);
 
-#endif // __UNIVALUE_H__
+#endif // BITCOIN_UNIVALUE_UNIVALUE_H
diff --git a/src/univalue/univalue_escapes.h b/src/univalue/univalue_escapes.h
index 1d3a70a968ed..05141182859a 100644
--- a/src/univalue/univalue_escapes.h
+++ b/src/univalue/univalue_escapes.h
@@ -1,6 +1,6 @@
 // Automatically generated file. Do not modify.
-#ifndef __UNIVALUE_ESCAPES_H__
-#define __UNIVALUE_ESCAPES_H__
+#ifndef BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H
+#define BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H
 static const char *escapes[256] = {
 	NULL,
 	NULL,
@@ -259,4 +259,4 @@ static const char *escapes[256] = {
 	NULL,
 	NULL,
 };
-#endif // __UNIVALUE_ESCAPES_H__
+#endif // BITCOIN_UNIVALUE_UNIVALUE_ESCAPES_H
diff --git a/src/wallet_ismine.h b/src/wallet_ismine.h
index f326b86815b3..5f0c0c1a012f 100644
--- a/src/wallet_ismine.h
+++ b/src/wallet_ismine.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef H_BITCOIN_WALLET_ISMINE
-#define H_BITCOIN_WALLET_ISMINE
+#ifndef BITCOIN_WALLET_ISMINE_H
+#define BITCOIN_WALLET_ISMINE_H
 
 #include "key.h"
 #include "script/standard.h"
@@ -26,4 +26,4 @@ typedef uint8_t isminefilter;
 isminetype IsMine(const CKeyStore& keystore, const CScript& scriptPubKey);
 isminetype IsMine(const CKeyStore& keystore, const CTxDestination& dest);
 
-#endif // H_BITCOIN_WALLET_ISMINE
+#endif // BITCOIN_WALLET_ISMINE_H

From 0d91ae308c5dea9c8e6ac600b94c9c9b53b92b61 Mon Sep 17 00:00:00 2001
From: mruddy <mruddy@users.noreply.github.com>
Date: Tue, 4 Nov 2014 07:24:47 -0500
Subject: [PATCH 0974/1819] The first thing that SelectParams does is call
 SelectBaseParams. Therefore, we do not need to call SelectBaseParams
 immediately prior to calling SelectParams.

---
 src/chainparams.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 9ffc369b405c..e539eb7bd704 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -369,7 +369,6 @@ bool SelectParamsFromCommandLine()
     if (network == CBaseChainParams::MAX_NETWORK_TYPES)
         return false;
 
-    SelectBaseParams(network);
     SelectParams(network);
     return true;
 }

From b4347f60352a7134f95a0f35e74607a167090516 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 4 Nov 2014 14:34:04 +0100
Subject: [PATCH 0975/1819] minor code style cleanup after recent merges

- add a missing license header
- correct some header orderings etc.
---
 src/alert.cpp          |  4 ++--
 src/crypter.h          |  4 ++--
 src/eccryptoverify.cpp |  5 +++++
 src/eccryptoverify.h   | 12 +++++++-----
 src/ecwrapper.h        |  2 +-
 src/hash.h             |  3 ++-
 src/key.h              |  2 +-
 src/leveldbwrapper.cpp |  3 ++-
 src/pubkey.cpp         |  2 +-
 src/pubkey.h           |  4 ++--
 src/script/standard.h  |  4 ++--
 11 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/alert.cpp b/src/alert.cpp
index ce8dfbf507b1..64399a426070 100644
--- a/src/alert.cpp
+++ b/src/alert.cpp
@@ -1,14 +1,14 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "alert.h"
 
 #include "chainparams.h"
 #include "clientversion.h"
-#include "pubkey.h"
 #include "net.h"
+#include "pubkey.h"
 #include "timedata.h"
 #include "ui_interface.h"
 #include "util.h"
diff --git a/src/crypter.h b/src/crypter.h
index 4d486c4313a3..b589987c4f4f 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -1,13 +1,13 @@
 // Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CRYPTER_H
 #define BITCOIN_CRYPTER_H
 
 #include "allocators.h"
-#include "serialize.h"
 #include "keystore.h"
+#include "serialize.h"
 
 class uint256;
 
diff --git a/src/eccryptoverify.cpp b/src/eccryptoverify.cpp
index 0a904f44bad4..435154d608ec 100644
--- a/src/eccryptoverify.cpp
+++ b/src/eccryptoverify.cpp
@@ -1,3 +1,8 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include "eccryptoverify.h"
 
 namespace {
diff --git a/src/eccryptoverify.h b/src/eccryptoverify.h
index 7740e31db10f..da7e80c7c32c 100644
--- a/src/eccryptoverify.h
+++ b/src/eccryptoverify.h
@@ -1,13 +1,14 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_EC_CRYPTO_VERIFY_H
-#define BITCOIN_EC_CRYPTO_VERIFY_H
+#ifndef BITCOIN_ECCRYPTOVERIFY_H
+#define BITCOIN_ECCRYPTOVERIFY_H
 
 #include <vector>
 #include <cstdlib>
+
 class uint256;
 
 namespace eccrypto {
@@ -16,4 +17,5 @@ bool Check(const unsigned char *vch);
 bool CheckSignatureElement(const unsigned char *vch, int len, bool half);
 
 } // eccrypto namespace
-#endif
+
+#endif // BITCOIN_ECCRYPTOVERIFY_H
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index 52e9e5dab047..3457ca5f5a3c 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -43,4 +43,4 @@ class CECKey {
     static bool SanityCheck();
 };
 
-#endif // BITCOIN_EC_WRAPPER_H
+#endif // BITCOIN_ECWRAPPER_H
diff --git a/src/hash.h b/src/hash.h
index 53a7672a8f07..75695160e6e4 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_HASH_H
@@ -160,4 +160,5 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL
 unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
 
 void BIP32Hash(const unsigned char chainCode[32], unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]);
+
 #endif // BITCOIN_HASH_H
diff --git a/src/key.h b/src/key.h
index b35cf0cad555..8c2f44801dfe 100644
--- a/src/key.h
+++ b/src/key.h
@@ -13,8 +13,8 @@
 #include <stdexcept>
 #include <vector>
 
-class CPubKey;
 class CExtPubKey;
+class CPubKey;
 
 /** 
  * secp256k1:
diff --git a/src/leveldbwrapper.cpp b/src/leveldbwrapper.cpp
index 8ce3e7b47088..70980fede5ae 100644
--- a/src/leveldbwrapper.cpp
+++ b/src/leveldbwrapper.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2012-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "leveldbwrapper.h"
@@ -7,6 +7,7 @@
 #include "util.h"
 
 #include <boost/filesystem.hpp>
+
 #include <leveldb/cache.h>
 #include <leveldb/env.h>
 #include <leveldb/filter_policy.h>
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 3f16a4b4be4c..9c6f536f21ff 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "pubkey.h"
diff --git a/src/pubkey.h b/src/pubkey.h
index ccf967345367..37351cff0e8d 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_PUBKEY_H
diff --git a/src/script/standard.h b/src/script/standard.h
index faa77476046f..55a27881aa0e 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -6,15 +6,15 @@
 #ifndef BITCOIN_SCRIPT_STANDARD_H
 #define BITCOIN_SCRIPT_STANDARD_H
 
-#include "uint256.h"
 #include "script/interpreter.h"
+#include "uint256.h"
 
 #include <boost/variant.hpp>
 
 #include <stdint.h>
 
-class CScript;
 class CKeyID;
+class CScript;
 
 /** A reference to a CScript: the Hash160 of its serialization (see script.h) */
 class CScriptID : public uint160

From 70d80cc7bf89211a5aa157cb624fff3b7097c48e Mon Sep 17 00:00:00 2001
From: Francis GASCHET <fg@numlog.fr>
Date: Mon, 3 Nov 2014 11:14:57 +0100
Subject: [PATCH 0976/1819] build: Fix "too many arguments" error

Closes #5141
---
 share/genbuild.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/genbuild.sh b/share/genbuild.sh
index 679566e5969a..ffa89ca6e47b 100755
--- a/share/genbuild.sh
+++ b/share/genbuild.sh
@@ -16,7 +16,7 @@ fi
 DESC=""
 SUFFIX=""
 LAST_COMMIT_DATE=""
-if [ -e "$(which git 2>/dev/null)" -a $(git rev-parse --is-inside-work-tree 2>/dev/null) = "true" ]; then
+if [ -e "$(which git 2>/dev/null)" -a "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
     # clean 'dirty' status of touched files that haven't been modified
     git diff >/dev/null 2>/dev/null 
 

From af82884ab7c485c8b4c5ac93c308127c39c196be Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Wed, 29 Oct 2014 18:08:31 +0100
Subject: [PATCH 0977/1819] Add "warmup mode" for RPC server.

Start the RPC server before doing all the (expensive) startup
initialisations like loading the block index.  Until the node is ready,
return all calls immediately with a new error signalling "in warmup"
with an appropriate status message (similar to the init message).

This is useful for RPC clients to know that the server is there (e. g.,
they don't have to start it) but not yet available.  It is used in
Namecoin and Huntercoin already for some time, and there exists a UI
hooked onto the RPC interface that actively uses this to its advantage.
---
 doc/release-notes.md | 11 ++++++
 src/bitcoin-cli.cpp  | 85 ++++++++++++++++++++++++++++----------------
 src/init.cpp         | 14 ++++++--
 src/rpcprotocol.h    |  1 +
 src/rpcserver.cpp    | 24 +++++++++++++
 src/rpcserver.h      |  7 ++++
 6 files changed, 110 insertions(+), 32 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 169ad71a0f6c..6aaea677901a 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -84,3 +84,14 @@ Using wildcards will result in the rule being rejected with the following error
 
     Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).
 
+RPC Server "Warm-Up" Mode
+=========================
+
+The RPC server is started earlier now, before most of the expensive
+intialisations like loading the block index.  It is available now almost
+immediately after starting the process.  However, until all initialisations
+are done, it always returns an immediate error with code -28 to all calls.
+
+This new behaviour can be useful for clients to know that a server is already
+started and will be available soon (for instance, so that they do not
+have to start it themselves).
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 38fbc29faf1f..11840e62a8d3 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -46,6 +46,21 @@ std::string HelpMessageCli()
 //
 // Start
 //
+
+//
+// Exception thrown on connection error.  This error is used to determine
+// when to wait if -rpcwait is given.
+//
+class CConnectionFailed : public std::runtime_error
+{
+public:
+
+    explicit inline CConnectionFailed(const std::string& msg) :
+        std::runtime_error(msg)
+    {}
+
+};
+
 static bool AppInitRPC(int argc, char* argv[])
 {
     //
@@ -101,15 +116,9 @@ Object CallRPC(const string& strMethod, const Array& params)
     SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
     iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
 
-    bool fWait = GetBoolArg("-rpcwait", false); // -rpcwait means try until server has started
-    do {
-        bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(BaseParams().RPCPort())));
-        if (fConnected) break;
-        if (fWait)
-            MilliSleep(1000);
-        else
-            throw runtime_error("couldn't connect to server");
-    } while (fWait);
+    const bool fConnected = d.connect(GetArg("-rpcconnect", "127.0.0.1"), GetArg("-rpcport", itostr(BaseParams().RPCPort())));
+    if (!fConnected)
+        throw CConnectionFailed("couldn't connect to server");
 
     // HTTP basic authentication
     string strUserPass64 = EncodeBase64(mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"]);
@@ -168,27 +177,43 @@ int CommandLineRPC(int argc, char *argv[])
         std::vector<std::string> strParams(&argv[2], &argv[argc]);
         Array params = RPCConvertValues(strMethod, strParams);
 
-        // Execute
-        Object reply = CallRPC(strMethod, params);
-
-        // Parse reply
-        const Value& result = find_value(reply, "result");
-        const Value& error  = find_value(reply, "error");
-
-        if (error.type() != null_type) {
-            // Error
-            strPrint = "error: " + write_string(error, false);
-            int code = find_value(error.get_obj(), "code").get_int();
-            nRet = abs(code);
-        } else {
-            // Result
-            if (result.type() == null_type)
-                strPrint = "";
-            else if (result.type() == str_type)
-                strPrint = result.get_str();
-            else
-                strPrint = write_string(result, true);
-        }
+        // Execute and handle connection failures with -rpcwait
+        const bool fWait = GetBoolArg("-rpcwait", false);
+        do {
+            try {
+                const Object reply = CallRPC(strMethod, params);
+
+                // Parse reply
+                const Value& result = find_value(reply, "result");
+                const Value& error  = find_value(reply, "error");
+
+                if (error.type() != null_type) {
+                    // Error
+                    const int code = find_value(error.get_obj(), "code").get_int();
+                    if (fWait && code == RPC_IN_WARMUP)
+                        throw CConnectionFailed("server in warmup");
+                    strPrint = "error: " + write_string(error, false);
+                    nRet = abs(code);
+                } else {
+                    // Result
+                    if (result.type() == null_type)
+                        strPrint = "";
+                    else if (result.type() == str_type)
+                        strPrint = result.get_str();
+                    else
+                        strPrint = write_string(result, true);
+                }
+
+                // Connection succeeded, no need to retry.
+                break;
+            }
+            catch (const CConnectionFailed& e) {
+                if (fWait)
+                    MilliSleep(1000);
+                else
+                    throw;
+            }
+        } while (fWait);
     }
     catch (boost::thread_interrupted) {
         throw;
diff --git a/src/init.cpp b/src/init.cpp
index d622af69efc8..fe58c68fdac6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -752,6 +752,17 @@ bool AppInit2(boost::thread_group& threadGroup)
             threadGroup.create_thread(&ThreadScriptCheck);
     }
 
+    /* Start the RPC server already.  It will be started in "warmup" mode
+     * and not really process calls already (but it will signify connections
+     * that the server is there and will be ready later).  Warmup mode will
+     * be disabled when initialisation is finished.
+     */
+    if (fServer)
+    {
+        uiInterface.InitMessage.connect(SetRPCWarmupStatus);
+        StartRPCThreads();
+    }
+
     int64_t nStart;
 
     // ********************************************************* Step 5: verify wallet database integrity
@@ -1248,8 +1259,6 @@ bool AppInit2(boost::thread_group& threadGroup)
 #endif
 
     StartNode(threadGroup);
-    if (fServer)
-        StartRPCThreads();
 
 #ifdef ENABLE_WALLET
     // Generate coins in the background
@@ -1259,6 +1268,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     // ********************************************************* Step 11: finished
 
+    SetRPCWarmupFinished();
     uiInterface.InitMessage(_("Done loading"));
 
 #ifdef ENABLE_WALLET
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index 9926daaf3de7..f0d0f3445cd4 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -52,6 +52,7 @@ enum RPCErrorCode
     RPC_VERIFY_ERROR                = -25, // General error during transaction or block submission
     RPC_VERIFY_REJECTED             = -26, // Transaction or block was rejected by network rules
     RPC_VERIFY_ALREADY_IN_CHAIN     = -27, // Transaction already in chain
+    RPC_IN_WARMUP                   = -28, // Client still warming up
 
     // Aliases for backward compatibility
     RPC_TRANSACTION_ERROR           = RPC_VERIFY_ERROR,
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 08ed73f6de62..cc80887ba4dc 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -34,6 +34,10 @@ using namespace std;
 static std::string strRPCUserColonPass;
 
 static bool fRPCRunning = false;
+static bool fRPCInWarmup = true;
+static std::string rpcWarmupStatus("RPC server started");
+static CCriticalSection cs_rpcWarmup;
+
 //! These are created by StartRPCThreads, destroyed in StopRPCThreads
 static asio::io_service* rpc_io_service = NULL;
 static map<string, boost::shared_ptr<deadline_timer> > deadlineTimers;
@@ -744,6 +748,19 @@ bool IsRPCRunning()
     return fRPCRunning;
 }
 
+void SetRPCWarmupStatus(const std::string& newStatus)
+{
+    LOCK(cs_rpcWarmup);
+    rpcWarmupStatus = newStatus;
+}
+
+void SetRPCWarmupFinished()
+{
+    LOCK(cs_rpcWarmup);
+    assert(fRPCInWarmup);
+    fRPCInWarmup = false;
+}
+
 void RPCRunHandler(const boost::system::error_code& err, boost::function<void(void)> func)
 {
     if (!err)
@@ -870,6 +887,13 @@ static bool HTTPReq_JSONRPC(AcceptedConnection *conn,
         if (!read_string(strRequest, valRequest))
             throw JSONRPCError(RPC_PARSE_ERROR, "Parse error");
 
+        // Return immediately if in warmup
+        {
+            LOCK(cs_rpcWarmup);
+            if (fRPCInWarmup)
+                throw JSONRPCError(RPC_IN_WARMUP, rpcWarmupStatus);
+        }
+
         string strReply;
 
         // singleton request
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 2f34b11d22bb..2a258dd89a91 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -45,6 +45,13 @@ void StopRPCThreads();
 /* Query whether RPC is running */
 bool IsRPCRunning();
 
+/* Set the RPC warmup status.  When this is done, all RPC calls will error out
+ * immediately with RPC_IN_WARMUP.
+ */
+void SetRPCWarmupStatus(const std::string& newStatus);
+/* Mark warmup as done.  RPC calls will be processed from now on.  */
+void SetRPCWarmupFinished();
+
 /**
  * Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
  * the right number of arguments are passed, just that any passed are the correct type.

From 9b1627d13ecbd6a22c284521ac9351a59af4b129 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 2 Nov 2014 21:25:27 +0100
Subject: [PATCH 0978/1819] [Wallet] Reduce minTxFee for transaction creation
 to 1000 satoshis

---
 src/wallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index d392149dbb3b..99d4ac2e5565 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -33,7 +33,7 @@ bool bSpendZeroConfChange = true;
  * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) 
  * Override with -mintxfee
  */
-CFeeRate CWallet::minTxFee = CFeeRate(10000);
+CFeeRate CWallet::minTxFee = CFeeRate(1000);
 
 /** @defgroup mapWallet
  *

From 1f847936c9622f53fca25a1174961a799174b7fd Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 4 Nov 2014 13:59:41 -0800
Subject: [PATCH 0979/1819] Avoid a bunch of copying/conversion in script/sign

---
 src/script/sign.cpp | 8 ++++----
 src/script/sign.h   | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 0eab0626e59f..9dfd640dfb26 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -144,9 +144,9 @@ static CScript PushAll(const vector<valtype>& values)
     return result;
 }
 
-static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction& txTo, unsigned int nIn,
+static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
                                const vector<valtype>& vSolutions,
-                               vector<valtype>& sigs1, vector<valtype>& sigs2)
+                               const vector<valtype>& sigs1, const vector<valtype>& sigs2)
 {
     // Combine all the signatures we've got:
     set<valtype> allsigs;
@@ -199,7 +199,7 @@ static CScript CombineMultisig(CScript scriptPubKey, const CMutableTransaction&
     return result;
 }
 
-static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+static CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
                                  const txnouttype txType, const vector<valtype>& vSolutions,
                                  vector<valtype>& sigs1, vector<valtype>& sigs2)
 {
@@ -244,7 +244,7 @@ static CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo,
     return CScript();
 }
 
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn,
+CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
                           const CScript& scriptSig1, const CScript& scriptSig2)
 {
     txnouttype txType;
diff --git a/src/script/sign.h b/src/script/sign.h
index c84d3f9a9437..99d5516adb54 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -19,6 +19,6 @@ bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutab
 
 // Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
 // combine them intelligently and return the result.
-CScript CombineSignatures(CScript scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
+CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
 #endif // BITCOIN_SCRIPT_SIGN_H

From 84877904c0f4c4d403e2c768f437c81226c1e137 Mon Sep 17 00:00:00 2001
From: mruddy <mruddy@users.noreply.github.com>
Date: Tue, 4 Nov 2014 13:01:41 -0500
Subject: [PATCH 0980/1819] bitcoin-tx: Add the "-txid" option. Also add the
 hex-encoded transaction to the JSON output as the "hex" property.

---
 src/bitcoin-tx.cpp | 10 ++++++++++
 src/core_write.cpp |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index c0d21ed36f90..b35b8ba53a45 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -57,6 +57,7 @@ static bool AppInitRawTx(int argc, char* argv[])
         strUsage += "  -?                      " + _("This help message") + "\n";
         strUsage += "  -create                 " + _("Create new, empty TX.") + "\n";
         strUsage += "  -json                   " + _("Select JSON output") + "\n";
+        strUsage += "  -txid                   " + _("Output only the hex-encoded transaction id of the resultant transaction.") + "\n";
         strUsage += "  -regtest                " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
         strUsage += "  -testnet                " + _("Use the test network") + "\n";
         strUsage += "\n";
@@ -488,6 +489,13 @@ static void OutputTxJSON(const CTransaction& tx)
     fprintf(stdout, "%s\n", jsonOutput.c_str());
 }
 
+static void OutputTxHash(const CTransaction& tx)
+{
+    string strHexHash = tx.GetHash().GetHex(); // the hex-encoded transaction hash (aka the transaction id)
+
+    fprintf(stdout, "%s\n", strHexHash.c_str());
+}
+
 static void OutputTxHex(const CTransaction& tx)
 {
     string strHex = EncodeHexTx(tx);
@@ -499,6 +507,8 @@ static void OutputTx(const CTransaction& tx)
 {
     if (GetBoolArg("-json", false))
         OutputTxJSON(tx);
+    else if (GetBoolArg("-txid", false))
+        OutputTxHash(tx);
     else
         OutputTxHex(tx);
 }
diff --git a/src/core_write.cpp b/src/core_write.cpp
index a3ae8eec07be..1d92cf87b5a4 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -129,4 +129,6 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
 
     if (hashBlock != 0)
         entry.pushKV("blockhash", hashBlock.GetHex());
+
+    entry.pushKV("hex", EncodeHexTx(tx)); // the hex-encoded transaction. used the name "hex" to be consistent with the verbose output of "getrawtransaction".
 }

From 0246ab6088dc45507792fb152f72c42694c4f385 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 5 Nov 2014 00:49:26 -0500
Subject: [PATCH 0981/1819] depends: boost: hard-code hidden symbol visibility

tl;dr: This solves boost visibility problems for default/release build configs
on non-Linux platforms.

When Bitcoin builds against boost's header-only classes, it ends up with
objects containing symbols that the upstream boost libs also have. Since
Bitcoin builds by default with hidden symbol visibility, it can end up trying
to link against a copy of the same symbols with default visibility.
This is not a problem on Linux because 3rd party static libs are un-exported
by default (--exclude-libs,ALL), but that is not available for MinGW and OSX.

Those platforms (and maybe others?) end up confused about which version to use.

The OSX linker spews hundreds of: "ld: warning: direct access in <foo> to
global weak symbol guard variable for <bar> means the weak symbol cannot be
overridden at runtime. This was likely caused by different translation units
being compiled with different visibility settings."

MinGW's linker complains similarly.

Since the default symbol visibility for Bitcoin is hidden and releases are
built that way as well, build Boost with hidden visibility. Linux builds Boost
this way also, but only for the sake of continuity.

This means that the linker confusion logic is reversed, so the problem will
will now be encountered if Bitcoin is built with --disable-reduce-exports, but
that's better than the current situation.
---
 depends/packages/boost.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index 98ed3de77270..53c4c3c74e10 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -21,6 +21,7 @@ $(package)_archiver_$(host_os)=$($(package)_ar)
 $(package)_toolset_darwin=darwin
 $(package)_archiver_darwin=$($(package)_libtool)
 $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
+$(package)_cxxflags=-fvisibility=hidden
 $(package)_cxxflags_x86_64_linux=-fPIC
 $(package)_cxxflags_arm_linux=-fPIC
 endef

From 93a3f0e7fea8699fca7e062156d7a22293d533b8 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 5 Nov 2014 11:39:47 +0100
Subject: [PATCH 0982/1819] Qt: Network-Traffic-Graph: make some distance
 between line and text

Text directly glued on the graph-line looks not so good.
---
 src/qt/trafficgraphwidget.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/qt/trafficgraphwidget.cpp b/src/qt/trafficgraphwidget.cpp
index 74565bb6d079..5f14b8079764 100644
--- a/src/qt/trafficgraphwidget.cpp
+++ b/src/qt/trafficgraphwidget.cpp
@@ -76,10 +76,12 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
     int base = floor(log10(fMax));
     float val = pow(10.0f, base);
 
-    const QString units = tr("KB/s");
+    const QString units     = tr("KB/s");
+    const float yMarginText = 2.0;
+    
     // draw lines
     painter.setPen(axisCol);
-    painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax, QString("%1 %2").arg(val).arg(units));
+    painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
     for(float y = val; y < fMax; y += val) {
         int yy = YMARGIN + h - h * y / fMax;
         painter.drawLine(XMARGIN, yy, width() - XMARGIN, yy);
@@ -89,7 +91,7 @@ void TrafficGraphWidget::paintEvent(QPaintEvent *)
         axisCol = axisCol.darker();
         val = pow(10.0f, base - 1);
         painter.setPen(axisCol);
-        painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax, QString("%1 %2").arg(val).arg(units));
+        painter.drawText(XMARGIN, YMARGIN + h - h * val / fMax-yMarginText, QString("%1 %2").arg(val).arg(units));
         int count = 1;
         for(float y = val; y < fMax; y += val, count++) {
             // don't overwrite lines drawn above

From 236d96e0a3702fecfa7fae2e87aa883bdbb035e1 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 5 Nov 2014 11:45:37 +0100
Subject: [PATCH 0983/1819] Qt: Add support for missing scrollbar in peers
 table

---
 src/qt/forms/rpcconsole.ui | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 898df2b080b3..c5ac371619c4 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -689,7 +689,7 @@
        <item row="0" column="0" rowspan="2">
         <widget class="QTableView" name="peerWidget">
          <property name="horizontalScrollBarPolicy">
-          <enum>Qt::ScrollBarAlwaysOff</enum>
+          <enum>Qt::ScrollBarAsNeeded</enum>
          </property>
          <property name="sortingEnabled">
           <bool>true</bool>

From 93a602240006aed6bc192b854c3927dba6e01f82 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 12:12:04 -0800
Subject: [PATCH 0984/1819] Reduce bitcoin-cli dependencies

---
 src/Makefile.am     | 5 +----
 src/bitcoin-cli.cpp | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 3089b2ff4017..a38840320521 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -301,13 +301,10 @@ bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
   $(LIBBITCOIN_CLI) \
-  $(LIBBITCOIN_COMMON) \
   $(LIBBITCOIN_UTIL) \
-  $(LIBBITCOIN_CRYPTO) \
   $(BOOST_LIBS) \
   $(SSL_LIBS) \
-  $(CRYPTO_LIBS) \
-  $(MINIUPNPC_LIBS)
+  $(CRYPTO_LIBS)
 
 bitcoin_cli_SOURCES = \
   bitcoin-cli.cpp
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 11840e62a8d3..a2b95d5086e4 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -5,7 +5,6 @@
 
 #include "chainparamsbase.h"
 #include "clientversion.h"
-#include "init.h"
 #include "rpcclient.h"
 #include "rpcprotocol.h"
 #include "util.h"

From eefb766c77048127123622bf9972fd5c844b7966 Mon Sep 17 00:00:00 2001
From: kiwigb <kiwigb@localhost.localdomain>
Date: Thu, 6 Nov 2014 14:30:59 +1300
Subject: [PATCH 0985/1819] Rearrange initial config checks: AC, AM, compiler,
 libtool. Removed some repeated and unused prog checks.

---
 configure.ac | 67 +++++++++++++++++++++++-----------------------------
 1 file changed, 29 insertions(+), 38 deletions(-)

diff --git a/configure.ac b/configure.ac
index 17efd987acc2..837810401ab9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,42 +14,14 @@ AC_CONFIG_MACRO_DIR([build-aux/m4])
 
 AC_CANONICAL_HOST
 
-dnl By default, libtool for mingw refuses to link static libs into a dll for
-dnl fear of mixing pic/non-pic objects, and import/export complications. Since
-dnl we have those under control, re-enable that functionality.
-
-case $host in
-  *mingw*)
-     lt_cv_deplibs_check_method="pass_all"
-  ;;
-esac
-
-LT_INIT([disable-shared])
-
 AH_TOP([#ifndef BITCOIN_CONFIG_H])
 AH_TOP([#define BITCOIN_CONFIG_H])
 AH_BOTTOM([#endif //BITCOIN_CONFIG_H])
 
-# This m4 will only be used if a system copy cannot be found. This is helpful
-# on systems where autotools are installed but the pkg-config macros are not in
-# a default location. It is currently used for building on OSX where autotools
-# are preinstalled but pkg-config comes from macports or homebrew. It should
-# probably be removed when building on <= 10.6 is no longer supported.
-m4_include([pkg.m4])
-
 dnl faketime breaks configure and is only needed for make. Disable it here.
 unset FAKETIME
 
-if test "x${CXXFLAGS+set}" = "xset"; then
-  CXXFLAGS_overridden=yes
-else
-  CXXFLAGS_overridden=no
-fi
-
-dnl ==============================================================
-dnl Setup for automake
-dnl ==============================================================
-
+dnl Automake init set-up and checks
 AM_INIT_AUTOMAKE([no-define subdir-objects foreign])
 
 dnl faketime messes with timestamps and causes configure to be re-run.
@@ -59,17 +31,27 @@ AM_MAINTAINER_MODE([enable])
 dnl make the compilation flags quiet unless V=1 is used
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-dnl Checks for programs.
+dnl Compiler checks (here before libtool).
+if test "x${CXXFLAGS+set}" = "xset"; then
+  CXXFLAGS_overridden=yes
+else
+  CXXFLAGS_overridden=no
+fi
 AC_PROG_CXX
-AC_PROG_CC
-AC_PROG_CPP
-AC_PROG_CXXCPP
-AC_PROG_INSTALL
-AC_PROG_OBJC
-AC_PROG_LN_S
 m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
-AC_PROG_MKDIR_P
-AC_PROG_SED
+
+dnl By default, libtool for mingw refuses to link static libs into a dll for
+dnl fear of mixing pic/non-pic objects, and import/export complications. Since
+dnl we have those under control, re-enable that functionality.
+case $host in
+  *mingw*)
+     lt_cv_deplibs_check_method="pass_all"
+  ;;
+esac
+dnl Libtool init checks.
+LT_INIT([disable-shared])
+
+dnl Check/return PATH for base programs.
 AC_PATH_TOOL(AR, ar)
 AC_PATH_TOOL(RANLIB, ranlib)
 AC_PATH_TOOL(STRIP, strip)
@@ -81,6 +63,15 @@ AC_PATH_PROG([GIT], [git])
 AC_PATH_PROG(CCACHE,ccache)
 AC_PATH_PROG(XGETTEXT,xgettext)
 AC_PATH_PROG(HEXDUMP,hexdump)
+
+# This m4 will only be used if a system copy cannot be found. This is helpful
+# on systems where autotools are installed but the pkg-config macros are not in
+# a default location. It is currently used for building on OSX where autotools
+# are preinstalled but pkg-config comes from macports or homebrew. It should
+# probably be removed when building on <= 10.6 is no longer supported.
+m4_include([pkg.m4])
+
+dnl pkg-config check.
 PKG_PROG_PKG_CONFIG
 
 # Enable wallet

From 9bdec7603713d269767dfd86dbd9b8342d0120fe Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 6 Nov 2014 08:47:48 +0100
Subject: [PATCH 0986/1819] Always log number of threads for script
 verification

Helps for troubleshooting.
---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index fe58c68fdac6..158713b32186 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -746,8 +746,8 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("Using at most %i connections (%i file descriptors available)\n", nMaxConnections, nFD);
     std::ostringstream strErrors;
 
+    LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
     if (nScriptCheckThreads) {
-        LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
         for (int i=0; i<nScriptCheckThreads-1; i++)
             threadGroup.create_thread(&ThreadScriptCheck);
     }

From f654f0040be5872a7fe21226dc7ed424abf55fb9 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 6 Nov 2014 08:52:32 +0100
Subject: [PATCH 0987/1819] Change -genproclimit default to 1

This is less surprising.

Avoids the overload-the-CPU default of using N threads for script
verification as well as N threads for generation where N is number of cores.
---
 src/init.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 158713b32186..22ec80e17b44 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -320,7 +320,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += ".\n";
 #ifdef ENABLE_WALLET
     strUsage += "  -gen                   " + strprintf(_("Generate coins (default: %u)"), 0) + "\n";
-    strUsage += "  -genproclimit=<n>      " + strprintf(_("Set the processor limit for when generation is on (-1 = unlimited, default: %d)"), -1) + "\n";
+    strUsage += "  -genproclimit=<n>      " + strprintf(_("Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)"), 1) + "\n";
 #endif
     strUsage += "  -help-debug            " + _("Show all debugging options (usage: --help -help-debug)") + "\n";
     strUsage += "  -logips                " + strprintf(_("Include IP addresses in debug output (default: %u)"), 0) + "\n";
@@ -1263,7 +1263,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 #ifdef ENABLE_WALLET
     // Generate coins in the background
     if (pwalletMain)
-        GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", -1));
+        GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain, GetArg("-genproclimit", 1));
 #endif
 
     // ********************************************************* Step 11: finished

From bfe029feebc8ff753c829f5f376003e5b90d3c89 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 6 Nov 2014 00:24:41 -0800
Subject: [PATCH 0988/1819] Reduce bitcoin-tx dependencies

---
 src/Makefile.am | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index a38840320521..8b5d009842a0 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -171,6 +171,7 @@ libbitcoin_server_a_SOURCES = \
   rpcnet.cpp \
   rpcrawtransaction.cpp \
   rpcserver.cpp \
+  script/sigcache.cpp \
   timedata.cpp \
   txdb.cpp \
   txmempool.cpp \
@@ -232,7 +233,6 @@ libbitcoin_common_a_SOURCES = \
   pubkey.cpp \
   script/interpreter.cpp \
   script/script.cpp \
-  script/sigcache.cpp \
   script/sign.cpp \
   script/standard.cpp \
   $(BITCOIN_CORE_H)
@@ -327,9 +327,7 @@ if USE_LIBSECP256K1
 endif
 
   bitcoin_tx_LDADD += $(BOOST_LIBS) \
-  $(SSL_LIBS) \
-  $(CRYPTO_LIBS) \
-  $(MINIUPNPC_LIBS)
+  $(CRYPTO_LIBS)
 
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)

From 5985ba9e61466bbdb8416896ecfaadf040b6e4d9 Mon Sep 17 00:00:00 2001
From: ENikS <evgeni@eniks.com>
Date: Thu, 6 Nov 2014 17:53:25 -0500
Subject: [PATCH 0989/1819] Fixing warning C4099: 'CExtPubKey' : type name
 first seen using 'class' now seen using 'struct'

---
 src/key.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/key.h b/src/key.h
index 8c2f44801dfe..f36e658deece 100644
--- a/src/key.h
+++ b/src/key.h
@@ -13,7 +13,7 @@
 #include <stdexcept>
 #include <vector>
 
-class CExtPubKey;
+struct CExtPubKey;
 class CPubKey;
 
 /** 

From 2db4c8a24d47065bdd6e80560cc5e458088849ff Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Fri, 7 Nov 2014 10:23:21 +0100
Subject: [PATCH 0990/1819] Fix node ranges in the test framework.

---
 qa/rpc-tests/test_framework.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index c3396a5a83d9..9591c024fb34 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -44,8 +44,8 @@ def setup_network(self, split = False):
         # on outward.  This ensures that chains are properly reorganised.
         if not split:
             connect_nodes_bi(self.nodes, 1, 2)
-            sync_blocks(self.nodes[1:2])
-            sync_mempools(self.nodes[1:2])
+            sync_blocks(self.nodes[1:3])
+            sync_mempools(self.nodes[1:3])
 
         connect_nodes_bi(self.nodes, 0, 1)
         connect_nodes_bi(self.nodes, 2, 3)
@@ -63,9 +63,9 @@ def split_network(self):
 
     def sync_all(self):
         if self.is_network_split:
-            sync_blocks(self.nodes[:1])
+            sync_blocks(self.nodes[:2])
             sync_blocks(self.nodes[2:])
-            sync_mempools(self.nodes[:1])
+            sync_mempools(self.nodes[:2])
             sync_mempools(self.nodes[2:])
         else:
             sync_blocks(self.nodes)

From 369be584f9c6d43a074d35e7791f60d91a679734 Mon Sep 17 00:00:00 2001
From: sandakersmann <sandakersmann@users.noreply.github.com>
Date: Thu, 6 Nov 2014 13:04:45 +0100
Subject: [PATCH 0991/1819] doc: Correct several typos in bootstrap.md

- Also remove references to the blockchain size
---
 doc/bootstrap.md       |  26 ++++++++------------------
 doc/img/bootstrap3.png | Bin 56598 -> 0 bytes
 2 files changed, 8 insertions(+), 18 deletions(-)
 delete mode 100644 doc/img/bootstrap3.png

diff --git a/doc/bootstrap.md b/doc/bootstrap.md
index 7ce71abaadbc..b84fd24b11d9 100644
--- a/doc/bootstrap.md
+++ b/doc/bootstrap.md
@@ -1,41 +1,31 @@
 ### Bootstrap the Blockchain Synchronization
 
-Normally the Bitcoin client will download the transaction and network information, called the blockchain, from the network by syncing with the other clients. This can be a process that can take multiple days as the [Bitcoin block chain](https://blockchain.info/charts/blocks-size) has grown to more than 15 gigabytes, and is growing almost a gigabyte every month. Luckily there is a safe and fast way to speed up this process. We’ll show you how to bootstrap your blockchain to bring your client up to speed in just a few simple steps.
+Normally the Bitcoin client will download the transaction and network information, called the blockchain, from the network by syncing with the other clients. This process can take quite some time as the [Bitcoin blockchain](https://blockchain.info/charts/blocks-size) is growing bigger and bigger for each day. Luckily there is a safe and fast way to speed up this process. We'll show you how to bootstrap your blockchain to bring your client up to speed in just a few simple steps.
 
 ### Requirements
 
 - A fresh install of the Bitcoin client software.
 
-### Download the blockchain via Bittorent
+### Download the blockchain via BitTorrent
 
-Jeff Garzik, Bitcoin core developer, offers an [torrent file](https://bitcointalk.org/index.php?topic=145386.0) for bootstrapping purposes that is updated often. Bittorrent is a protocol that speeds up the downloading of large files by using the other clients in the network. Examples of free and safe open-source clients are [Deluge](http://deluge-torrent.org/) or [QBittorent](http://www.qbittorrent.org/). A guide to installing and configuring the torrent clients can be found [here](http://dev.deluge-torrent.org/wiki/UserGuide) for Deluge and [here](http://qbforums.shiki.hu/) for QBittorent. A further in-depth tutorial on Bittorent can be found [here](http://www.howtogeek.com/howto/31846/bittorrent-for-beginners-how-get-started-downloading-torrents/).
+Jeff Garzik, Bitcoin Core developer, offers an [torrent file](https://bitcointalk.org/index.php?topic=145386.0) for bootstrapping purposes that is updated often. BitTorrent is a protocol that speeds up the downloading of large files by using the other clients in the network. Examples of free and safe open source clients are [Deluge](http://deluge-torrent.org/) or [qBittorrent](http://www.qbittorrent.org/). A guide to installing and configuring the torrent clients can be found [here](http://dev.deluge-torrent.org/wiki/UserGuide) for Deluge and [here](http://qbforums.shiki.hu/) for qBittorrent. A further in-depth tutorial on BitTorrent can be found [here](http://www.howtogeek.com/howto/31846/bittorrent-for-beginners-how-get-started-downloading-torrents/).
 
-With the client installed we’ll proceed to download the blockchain torrent file. Use the following magnet link:
+With the client installed we'll proceed to download the blockchain torrent file. Use the following magnet link:
 
 	magnet:?xt=urn:btih:2d4e6c1f96c5d5fb260dff92aea4e600227f1aea&dn=bootstrap.dat&tr=udp://tracker.openbittorrent.com:80&tr=udp://tracker.publicbt.com:80&tr=udp://tracker.ccc.de:80&tr=udp://tracker.istole.it:80
 	
- or go to [Jeff Garzik's topic](https://bitcointalk.org/index.php?topic=145386.0) for a signed magnet link. Alternately you can use the [.torrent file](http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bootstrap.dat.torrent/download) found on Sourceforge.
+ or go to [Jeff Garzik's topic](https://bitcointalk.org/index.php?topic=145386.0) for a signed magnet link. Alternatively you can use the [.torrent file](http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bootstrap.dat.torrent/download) found on SourceForge.
      
 ![Fig1](img/bootstrap1.png)
 
 The download page should look like this, with a countdown to the download. If it does not work click the direct download link.
 
-The torrent client installed will recognize the download of the torrent file. Save the bootstrap.dat file to a folder you use for downloads. The image below shows the torrent download in QBittorent, with current speed and ETA highlighted.
+The torrent client installed will recognize the download of the torrent file. Save the bootstrap.dat file to the folder you use for downloads. The image below shows the torrent download in qBittorrent, with current speed and ETA highlighted.
 
 ![Fig2](img/bootstrap2.png)
 
-### Download the block chain directly from official repositories
-The Bittorent version, see above, of the block chain download is refreshed more often than the direct download available. If Bittorent is blocked on your network then you can use the direct download method. Be sure to only use official repositories as the link displayed below. This download will only update the client to March 2013.
-
-Click [here](http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bitcoin_blockchain_170000.zip/download) to download or copy and paste the link below.
-
-	http://sourceforge.net/projects/bitcoin/files/Bitcoin/blockchain/bitcoin_blockchain_170000.zip/download
-    
-The download page should look like this, with a countdown to the download. If it does not work directly click the download. Save the file to a folder you use for downloads.
-![Fig3](img/bootstrap3.png)
-
 ### Importing the blockchain
-Exit the Bitcoin Client software if you have it running. Be sure not to have an actively used wallet in use. We are going to copy the download of the blockchain to the Bitcoin client data directory. You should run the client software at least once so it can generate the data directory. Copy the downloaded bootstrap.dat file into the Bitcoin data folder.
+Exit the Bitcoin client software if you have it running. Be sure not to have an actively used wallet in use. We are going to copy the download of the blockchain to the Bitcoin client data directory. You should run the client software at least once so it can generate the data directory. Copy the downloaded bootstrap.dat file into the Bitcoin data folder.
 
 **For Windows users:**
 Open explorer, and type into the address bar:
@@ -63,4 +53,4 @@ Wait until the import finishes. The client will download the last days not cover
 
 ### Is this safe?
 
-Yes, the above method is safe. The download contains only raw block chain data and the client verifies this on import. Do not download the blockchain from unofficial sources, especially if they provide `*.rev` and `*.sst` files. These files are not verified and can contain malicious edits.
+Yes, the above method is safe. The download contains only raw blockchain data and the client verifies this on import. Do not download the blockchain from unofficial sources, especially if they provide `*.rev` and `*.sst` files. These files are not verified and can contain malicious edits.
diff --git a/doc/img/bootstrap3.png b/doc/img/bootstrap3.png
deleted file mode 100644
index 8a6754e3e00156122dd1b44fe4603e4f2beb67cd..0000000000000000000000000000000000000000
GIT binary patch

From 9ec75c5ef4182a38e261beaafdc94325785cc7c5 Mon Sep 17 00:00:00 2001
From: Ruben Dario Ponticelli <rdponticelli@gmail.com>
Date: Wed, 5 Nov 2014 20:52:27 -0300
Subject: [PATCH 0992/1819] Add a locking mechanism to IsInitialBlockDownload
 to ensure it never goes from false to true.

---
 src/main.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index bf487df39f3e..0fd8065342e1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1177,8 +1177,14 @@ bool IsInitialBlockDownload()
     LOCK(cs_main);
     if (fImporting || fReindex || chainActive.Height() < Checkpoints::GetTotalBlocksEstimate())
         return true;
-    return (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
+    static bool lockIBDState = false;
+    if (lockIBDState)
+        return false;
+    bool state = (chainActive.Height() < pindexBestHeader->nHeight - 24 * 6 ||
             pindexBestHeader->GetBlockTime() < GetTime() - 24 * 60 * 60);
+    if (!state)
+        lockIBDState = true;
+    return state;
 }
 
 bool fLargeWorkForkFound = false;

From 65e3a1e76202b9a695fc6319dbd527ac563e0895 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 7 Nov 2014 13:42:52 +0100
Subject: [PATCH 0993/1819] Make sure that GetRandomBytes never fails

We're using GetRandomBytes in several contexts where it's either
unwieldy to return an error, or an error would mean a fatal exception
anyhow.

@gmaxwell checked OpenSSL a while ago and discovered that it never
actually fails, but it can't hurt to be a bit paranoid here.
---
 src/random.cpp | 5 ++---
 src/random.h   | 2 +-
 src/wallet.cpp | 6 ++----
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/random.cpp b/src/random.cpp
index 998e7dfb08a0..fc9505ae73db 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -82,13 +82,12 @@ void RandAddSeedPerfmon()
 #endif
 }
 
-bool GetRandBytes(unsigned char* buf, int num)
+void GetRandBytes(unsigned char* buf, int num)
 {
     if (RAND_bytes(buf, num) != 1) {
         LogPrintf("%s: OpenSSL RAND_bytes() failed with error: %s\n", __func__, ERR_error_string(ERR_get_error(), NULL));
-        return false;
+        assert(false);
     }
-    return true;
 }
 
 uint64_t GetRand(uint64_t nMax)
diff --git a/src/random.h b/src/random.h
index 161ebe89860a..ec73d910c48d 100644
--- a/src/random.h
+++ b/src/random.h
@@ -19,7 +19,7 @@ void RandAddSeedPerfmon();
 /**
  * Functions to gather random data via the OpenSSL PRNG
  */
-bool GetRandBytes(unsigned char* buf, int num);
+void GetRandBytes(unsigned char* buf, int num);
 uint64_t GetRand(uint64_t nMax);
 int GetRandInt(int nMax);
 uint256 GetRandHash();
diff --git a/src/wallet.cpp b/src/wallet.cpp
index d392149dbb3b..ec439c5aad90 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -422,15 +422,13 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
     RandAddSeedPerfmon();
 
     vMasterKey.resize(WALLET_CRYPTO_KEY_SIZE);
-    if (!GetRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE))
-        return false;
+    GetRandBytes(&vMasterKey[0], WALLET_CRYPTO_KEY_SIZE);
 
     CMasterKey kMasterKey;
     RandAddSeedPerfmon();
 
     kMasterKey.vchSalt.resize(WALLET_CRYPTO_SALT_SIZE);
-    if (!GetRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE))
-        return false;
+    GetRandBytes(&kMasterKey.vchSalt[0], WALLET_CRYPTO_SALT_SIZE);
 
     CCrypter crypter;
     int64_t nStartTime = GetTimeMillis();

From 5e2dcaebc44660de1e886e58fd7797318c45ef1e Mon Sep 17 00:00:00 2001
From: dexX7 <ugithub@bitwatch.co>
Date: Fri, 7 Nov 2014 15:47:29 +0100
Subject: [PATCH 0994/1819] gather_inputs: use correct variable in error
 message

"amount" and "fee" do not exist (anymore?).
---
 qa/rpc-tests/util.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index c895eb1619b8..e5383b6c5734 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -225,7 +225,7 @@ def gather_inputs(from_node, amount_needed):
         total_in += t["amount"]
         inputs.append({ "txid" : t["txid"], "vout" : t["vout"], "address" : t["address"] } )
     if total_in < amount_needed:
-        raise RuntimeError("Insufficient funds: need %d, have %d"%(amount+fee*2, total_in))
+        raise RuntimeError("Insufficient funds: need %d, have %d"%(amount_needed, total_in))
     return (total_in, inputs)
 
 def make_change(from_node, amount_in, amount_out, fee):

From 845c86d128fb97d55d125e63653def38729bd2ed Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 20 Jul 2014 23:32:25 -0700
Subject: [PATCH 0995/1819] Do not use third party services for IP detection.

This is a simplified re-do of closed pull #3088.

This patch eliminates the privacy and reliability problematic use
of centralized web services for discovering the node's addresses
for advertisement.

The Bitcoin protocol already allows your peers to tell you what
IP they think you have, but this data isn't trustworthy since
they could lie. So the challenge is using it without creating a
DOS vector.

To accomplish this we adopt an approach similar to the one used
by P2Pool: If we're announcing and don't have a better address
discovered (e.g. via UPNP) or configured we just announce to
each peer the address that peer told us. Since peers could
already replace, forge, or drop our address messages this cannot
create a new vulnerability... but if even one of our peers is
giving us a good address we'll eventually make a useful
advertisement.

We also may randomly use the peer-provided address for the
daily rebroadcast even if we otherwise have a seemingly routable
address, just in case we've been misconfigured (e.g. by UPNP).

To avoid privacy problems, we only do these things if discovery
is enabled.
---
 src/init.cpp |   3 +
 src/main.cpp |  41 +++++++------
 src/net.cpp  | 161 ++++++++++++---------------------------------------
 src/net.h    |   4 +-
 4 files changed, 61 insertions(+), 148 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index fe58c68fdac6..ee93fedd2587 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -574,6 +574,9 @@ bool AppInit2(boost::thread_group& threadGroup)
         // to protect privacy, do not listen by default if a default proxy server is specified
         if (SoftSetBoolArg("-listen", false))
             LogPrintf("AppInit2 : parameter interaction: -proxy set -> setting -listen=0\n");
+        // to protect privacy, do not discover addresses by default
+        if (SoftSetBoolArg("-discover", false))
+            LogPrintf("AppInit2 : parameter interaction: -proxy set -> setting -discover=0\n");
     }
 
     if (!GetBoolArg("-listen", true)) {
diff --git a/src/main.cpp b/src/main.cpp
index 82d52913a00a..9f87a1100798 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3474,12 +3474,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         else
             pfrom->fRelayTxes = true;
 
-        if (pfrom->fInbound && addrMe.IsRoutable())
-        {
-            pfrom->addrLocal = addrMe;
-            SeenLocal(addrMe);
-        }
-
         // Disconnect if we connected to ourself
         if (nNonce == nLocalHostNonce && nNonce > 1)
         {
@@ -3488,6 +3482,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             return true;
         }
 
+        pfrom->addrLocal = addrMe;
+        if (pfrom->fInbound && addrMe.IsRoutable())
+        {
+            SeenLocal(addrMe);
+        }
+
         // Be shy and don't send version until we hear
         if (pfrom->fInbound)
             pfrom->PushVersion();
@@ -3508,7 +3508,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             {
                 CAddress addr = GetLocalAddress(&pfrom->addr);
                 if (addr.IsRoutable())
+                {
+                    pfrom->PushAddress(addr);
+                } else if (IsPeerAddrLocalGood(pfrom)) {
+                    addr.SetIP(pfrom->addrLocal);
                     pfrom->PushAddress(addr);
+                }
             }
 
             // Get recent addresses
@@ -4371,24 +4376,18 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
         static int64_t nLastRebroadcast;
         if (!IsInitialBlockDownload() && (GetTime() - nLastRebroadcast > 24 * 60 * 60))
         {
+            LOCK(cs_vNodes);
+            BOOST_FOREACH(CNode* pnode, vNodes)
             {
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes)
-                {
-                    // Periodically clear setAddrKnown to allow refresh broadcasts
-                    if (nLastRebroadcast)
-                        pnode->setAddrKnown.clear();
+                // Periodically clear setAddrKnown to allow refresh broadcasts
+                if (nLastRebroadcast)
+                    pnode->setAddrKnown.clear();
 
-                    // Rebroadcast our address
-                    if (fListen)
-                    {
-                        CAddress addr = GetLocalAddress(&pnode->addr);
-                        if (addr.IsRoutable())
-                            pnode->PushAddress(addr);
-                    }
-                }
+                // Rebroadcast our address
+                AdvertizeLocal(pnode);
             }
-            nLastRebroadcast = GetTime();
+            if (!vNodes.empty())
+                nLastRebroadcast = GetTime();
         }
 
         //
diff --git a/src/net.cpp b/src/net.cpp
index 5ceb82cf8b0f..a66875a89447 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -142,16 +142,19 @@ bool GetLocal(CService& addr, const CNetAddr *paddrPeer)
 }
 
 // get best local address for a particular peer as a CAddress
+// Otherwise, return the unroutable 0.0.0.0 but filled in with
+// the normal parameters, since the IP may be changed to a useful
+// one by discovery.
 CAddress GetLocalAddress(const CNetAddr *paddrPeer)
 {
-    CAddress ret(CService("0.0.0.0",0),0);
+    CAddress ret(CService("0.0.0.0",GetListenPort()),0);
     CService addr;
     if (GetLocal(addr, paddrPeer))
     {
         ret = CAddress(addr);
-        ret.nServices = nLocalServices;
-        ret.nTime = GetAdjustedTime();
     }
+    ret.nServices = nLocalServices;
+    ret.nTime = GetAdjustedTime();
     return ret;
 }
 
@@ -205,21 +208,38 @@ bool RecvLine(SOCKET hSocket, string& strLine)
     }
 }
 
-// used when scores of local addresses may have changed
-// pushes better local address to peers
-void static AdvertizeLocal()
+int GetnScore(const CService& addr)
 {
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
+    LOCK(cs_mapLocalHost);
+    if (mapLocalHost.count(addr) == LOCAL_NONE)
+        return 0;
+    return mapLocalHost[addr].nScore;
+}
+
+// Is our peer's addrLocal potentially useful as an external IP source?
+bool IsPeerAddrLocalGood(CNode *pnode)
+{
+    return fDiscover && pnode->addr.IsRoutable() && pnode->addrLocal.IsRoutable() &&
+           !IsLimited(pnode->addrLocal.GetNetwork());
+}
+
+// pushes our own address to a peer
+void AdvertizeLocal(CNode *pnode)
+{
+    if (fListen && pnode->fSuccessfullyConnected)
     {
-        if (pnode->fSuccessfullyConnected)
+        CAddress addrLocal = GetLocalAddress(&pnode->addr);
+        // If discovery is enabled, sometimes give our peer the address it
+        // tells us that it sees us as in case it has a better idea of our
+        // address than we do.
+        if (IsPeerAddrLocalGood(pnode) && (!addrLocal.IsRoutable() ||
+             GetRand((GetnScore(addrLocal) > LOCAL_MANUAL) ? 8:2) == 0))
         {
-            CAddress addrLocal = GetLocalAddress(&pnode->addr);
-            if (addrLocal.IsRoutable() && (CService)addrLocal != (CService)pnode->addrLocal)
-            {
-                pnode->PushAddress(addrLocal);
-                pnode->addrLocal = addrLocal;
-            }
+            addrLocal.SetIP(pnode->addrLocal);
+        }
+        if (addrLocal.IsRoutable())
+        {
+            pnode->PushAddress(addrLocal);
         }
     }
 }
@@ -257,8 +277,6 @@ bool AddLocal(const CService& addr, int nScore)
         SetReachable(addr.GetNetwork());
     }
 
-    AdvertizeLocal();
-
     return true;
 }
 
@@ -296,12 +314,10 @@ bool SeenLocal(const CService& addr)
             return false;
         mapLocalHost[addr].nScore++;
     }
-
-    AdvertizeLocal();
-
     return true;
 }
 
+
 /** check whether a given address is potentially local */
 bool IsLocal(const CService& addr)
 {
@@ -323,114 +339,12 @@ bool IsReachable(const CNetAddr& addr)
     return IsReachable(net);
 }
 
-bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const char* pszKeyword, CNetAddr& ipRet)
-{
-    SOCKET hSocket;
-    if (!ConnectSocket(addrConnect, hSocket))
-        return error("GetMyExternalIP() : connection to %s failed", addrConnect.ToString());
-
-    send(hSocket, pszGet, strlen(pszGet), MSG_NOSIGNAL);
-
-    string strLine;
-    while (RecvLine(hSocket, strLine))
-    {
-        if (strLine.empty()) // HTTP response is separated from headers by blank line
-        {
-            while (true)
-            {
-                if (!RecvLine(hSocket, strLine))
-                {
-                    CloseSocket(hSocket);
-                    return false;
-                }
-                if (pszKeyword == NULL)
-                    break;
-                if (strLine.find(pszKeyword) != string::npos)
-                {
-                    strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword));
-                    break;
-                }
-            }
-            CloseSocket(hSocket);
-            if (strLine.find("<") != string::npos)
-                strLine = strLine.substr(0, strLine.find("<"));
-            strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r"));
-            while (strLine.size() > 0 && isspace(strLine[strLine.size()-1]))
-                strLine.resize(strLine.size()-1);
-            CService addr(strLine,0,true);
-            LogPrintf("GetMyExternalIP() received [%s] %s\n", strLine, addr.ToString());
-            if (!addr.IsValid() || !addr.IsRoutable())
-                return false;
-            ipRet.SetIP(addr);
-            return true;
-        }
-    }
-    CloseSocket(hSocket);
-    return error("GetMyExternalIP() : connection closed");
-}
-
-bool GetMyExternalIP(CNetAddr& ipRet)
-{
-    CService addrConnect;
-    const char* pszGet;
-    const char* pszKeyword;
-
-    for (int nLookup = 0; nLookup <= 1; nLookup++)
-    for (int nHost = 1; nHost <= 1; nHost++)
-    {
-        // We should be phasing out our use of sites like these. If we need
-        // replacements, we should ask for volunteers to put this simple
-        // php file on their web server that prints the client IP:
-        //  <?php echo $_SERVER["REMOTE_ADDR"]; ?>
-        if (nHost == 1)
-        {
-            addrConnect = CService("91.198.22.70", 80); // checkip.dyndns.org
-
-            if (nLookup == 1)
-            {
-                CService addrIP("checkip.dyndns.org", 80, true);
-                if (addrIP.IsValid())
-                    addrConnect = addrIP;
-            }
-
-            pszGet = "GET / HTTP/1.1\r\n"
-                     "Host: checkip.dyndns.org\r\n"
-                     "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"
-                     "Connection: close\r\n"
-                     "\r\n";
-
-            pszKeyword = "Address:";
-        }
-
-        if (GetMyExternalIP2(addrConnect, pszGet, pszKeyword, ipRet))
-            return true;
-    }
-
-    return false;
-}
-
-void ThreadGetMyExternalIP()
-{
-    CNetAddr addrLocalHost;
-    if (GetMyExternalIP(addrLocalHost))
-    {
-        LogPrintf("GetMyExternalIP() returned %s\n", addrLocalHost.ToStringIP());
-        AddLocal(addrLocalHost, LOCAL_HTTP);
-    }
-}
-
-
-
-
-
 void AddressCurrentlyConnected(const CService& addr)
 {
     addrman.Connected(addr);
 }
 
 
-
-
 uint64_t CNode::nTotalBytesRecv = 0;
 uint64_t CNode::nTotalBytesSent = 0;
 CCriticalSection CNode::cs_totalBytesRecv;
@@ -1687,9 +1601,6 @@ void static Discover(boost::thread_group& threadGroup)
     }
 #endif
 
-    // Don't use external IPv4 discovery, when -onlynet="IPv6"
-    if (!IsLimited(NET_IPV4))
-        threadGroup.create_thread(boost::bind(&TraceThread<void (*)()>, "ext-ip", &ThreadGetMyExternalIP));
 }
 
 void StartNode(boost::thread_group& threadGroup)
diff --git a/src/net.h b/src/net.h
index 340158512df3..e48acf564463 100644
--- a/src/net.h
+++ b/src/net.h
@@ -60,7 +60,6 @@ unsigned int SendBufferSize();
 
 void AddOneShot(std::string strDest);
 bool RecvLine(SOCKET hSocket, std::string& strLine);
-bool GetMyExternalIP(CNetAddr& ipRet);
 void AddressCurrentlyConnected(const CService& addr);
 CNode* FindNode(const CNetAddr& ip);
 CNode* FindNode(const std::string& addrName);
@@ -96,12 +95,13 @@ enum
     LOCAL_IF,     // address a local interface listens on
     LOCAL_BIND,   // address explicit bound to
     LOCAL_UPNP,   // address reported by UPnP
-    LOCAL_HTTP,   // address reported by whatismyip.com and similar
     LOCAL_MANUAL, // address explicitly specified (-externalip=)
 
     LOCAL_MAX
 };
 
+bool IsPeerAddrLocalGood(CNode *pnode);
+void AdvertizeLocal(CNode *pnode);
 void SetLimited(enum Network net, bool fLimited = true);
 bool IsLimited(enum Network net);
 bool IsLimited(const CNetAddr& addr);

From a8a5e0133abbc7cbb3e5d526e626292a2dce5e91 Mon Sep 17 00:00:00 2001
From: sinetek <pitwuu@gmail.com>
Date: Sat, 8 Nov 2014 15:38:11 -0500
Subject: [PATCH 0996/1819] Adding license.

---
 src/hash.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/hash.cpp b/src/hash.cpp
index 29376b45aa71..2cca06ae239d 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -1,3 +1,7 @@
+// Copyright (c) 2013-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
 #include "hash.h"
 
 inline uint32_t ROTL32(uint32_t x, int8_t r)

From 38c62aec0d21a3f5b76df7ba5aa449dfe3bfa038 Mon Sep 17 00:00:00 2001
From: sinetek <pitwuu@gmail.com>
Date: Sat, 8 Nov 2014 18:09:06 -0500
Subject: [PATCH 0997/1819] Adding const.

---
 src/coincontrol.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/coincontrol.h b/src/coincontrol.h
index c9057017d830..c8bdd3b39d5b 100644
--- a/src/coincontrol.h
+++ b/src/coincontrol.h
@@ -35,12 +35,12 @@ class CCoinControl
         return (setSelected.count(outpt) > 0);
     }
 
-    void Select(COutPoint& output)
+    void Select(const COutPoint& output)
     {
         setSelected.insert(output);
     }
 
-    void UnSelect(COutPoint& output)
+    void UnSelect(const COutPoint& output)
     {
         setSelected.erase(output);
     }

From b9a36b15bff6a6fc0bb7f8bf6e7361dac3919e78 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Mon, 10 Nov 2014 14:40:01 +0800
Subject: [PATCH 0998/1819] Make comments in /src/script doxygen compatible

---
 src/script/interpreter.cpp | 39 ++++++++++++++++++---------------
 src/script/script.h        | 44 ++++++++++++++++++++++----------------
 src/script/sigcache.cpp    | 10 +++++----
 src/script/sign.cpp        | 12 +++++------
 src/script/sign.h          |  6 ++++--
 src/script/standard.cpp    |  6 +++---
 src/script/standard.h      | 31 ++++++++++++++++-----------
 7 files changed, 85 insertions(+), 63 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 54c2847f79ac..5fda6248c2ee 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -41,10 +41,10 @@ bool CastToBool(const valtype& vch)
     return false;
 }
 
-//
-// Script is a stack machine (like Forth) that evaluates a predicate
-// returning a bool indicating valid or not.  There are no loops.
-//
+/**
+ * Script is a stack machine (like Forth) that evaluates a predicate
+ * returning a bool indicating valid or not.  There are no loops.
+ */
 #define stacktop(i)  (stack.at(stack.size()+(i)))
 #define altstacktop(i)  (altstack.at(altstack.size()+(i)))
 static inline void popstack(vector<valtype>& stack)
@@ -69,12 +69,16 @@ bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
     return true;
 }
 
+/**
+ * A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
+ * Where R and S are not negative (their first byte has its highest bit not set), and not
+ * excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
+ * in which case a single 0 byte is necessary and even required).
+ * 
+ * See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
+ */
 bool static IsDERSignature(const valtype &vchSig) {
-    // See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
-    // A canonical signature exists of: <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
-    // Where R and S are not negative (their first byte has its highest bit not set), and not
-    // excessively padded (do not start with a 0 byte, unless an otherwise negative number follows,
-    // in which case a single 0 byte is necessary and even required).
+
     if (vchSig.size() < 9)
         return error("Non-canonical signature: too short");
     if (vchSig.size() > 73)
@@ -862,17 +866,18 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
 
 namespace {
 
-/** Wrapper that serializes like CTransaction, but with the modifications
+/**
+ * Wrapper that serializes like CTransaction, but with the modifications
  *  required for the signature hash done in-place
  */
 class CTransactionSignatureSerializer {
 private:
-    const CTransaction &txTo;  // reference to the spending transaction (the one being serialized)
-    const CScript &scriptCode; // output script being consumed
-    const unsigned int nIn;    // input index of txTo being signed
-    const bool fAnyoneCanPay;  // whether the hashtype has the SIGHASH_ANYONECANPAY flag set
-    const bool fHashSingle;    // whether the hashtype is SIGHASH_SINGLE
-    const bool fHashNone;      // whether the hashtype is SIGHASH_NONE
+    const CTransaction &txTo;  //! reference to the spending transaction (the one being serialized)
+    const CScript &scriptCode; //! output script being consumed
+    const unsigned int nIn;    //! input index of txTo being signed
+    const bool fAnyoneCanPay;  //! whether the hashtype has the SIGHASH_ANYONECANPAY flag set
+    const bool fHashSingle;    //! whether the hashtype is SIGHASH_SINGLE
+    const bool fHashNone;      //! whether the hashtype is SIGHASH_NONE
 
 public:
     CTransactionSignatureSerializer(const CTransaction &txToIn, const CScript &scriptCodeIn, unsigned int nInIn, int nHashTypeIn) :
@@ -951,7 +956,7 @@ class CTransactionSignatureSerializer {
         ::WriteCompactSize(s, nOutputs);
         for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
              SerializeOutput(s, nOutput, nType, nVersion);
-        // Serialie nLockTime
+        // Serialize nLockTime
         ::Serialize(s, txTo.nLockTime, nType, nVersion);
     }
 };
diff --git a/src/script/script.h b/src/script/script.h
index e525ad13ee83..9c22cb908cfd 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -179,12 +179,14 @@ class scriptnum_error : public std::runtime_error
 
 class CScriptNum
 {
-// Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
-// The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
-// but results may overflow (and are valid as long as they are not used in a subsequent
-// numeric operation). CScriptNum enforces those semantics by storing results as
-// an int64 and allowing out-of-range values to be returned as a vector of bytes but
-// throwing an exception if arithmetic is done or the result is interpreted as an integer.
+/**
+ * Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
+ * The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
+ * but results may overflow (and are valid as long as they are not used in a subsequent
+ * numeric operation). CScriptNum enforces those semantics by storing results as
+ * an int64 and allowing out-of-range values to be returned as a vector of bytes but
+ * throwing an exception if arithmetic is done or the result is interpreted as an integer.
+ */
 public:
 
     explicit CScriptNum(const int64_t& n)
@@ -516,7 +518,7 @@ class CScript : public std::vector<unsigned char>
         return true;
     }
 
-    // Encode/decode small integers:
+    /** Encode/decode small integers: */
     static int DecodeOP_N(opcodetype opcode)
     {
         if (opcode == OP_0)
@@ -560,25 +562,31 @@ class CScript : public std::vector<unsigned char>
         return nFound;
     }
 
-    // Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
-    // as 20 sigops. With pay-to-script-hash, that changed:
-    // CHECKMULTISIGs serialized in scriptSigs are
-    // counted more accurately, assuming they are of the form
-    //  ... OP_N CHECKMULTISIG ...
+    /**
+     * Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
+     * as 20 sigops. With pay-to-script-hash, that changed:
+     * CHECKMULTISIGs serialized in scriptSigs are
+     * counted more accurately, assuming they are of the form
+     *  ... OP_N CHECKMULTISIG ...
+     */
     unsigned int GetSigOpCount(bool fAccurate) const;
 
-    // Accurately count sigOps, including sigOps in
-    // pay-to-script-hash transactions:
+    /**
+     * Accurately count sigOps, including sigOps in
+     * pay-to-script-hash transactions:
+     */
     unsigned int GetSigOpCount(const CScript& scriptSig) const;
 
     bool IsPayToScriptHash() const;
 
-    // Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical).
+    /** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */
     bool IsPushOnly() const;
 
-    // Returns whether the script is guaranteed to fail at execution,
-    // regardless of the initial stack. This allows outputs to be pruned
-    // instantly when entering the UTXO set.
+    /**
+     * Returns whether the script is guaranteed to fail at execution,
+     * regardless of the initial stack. This allows outputs to be pruned
+     * instantly when entering the UTXO set.
+     */
     bool IsUnspendable() const
     {
         return (size() > 0 && *begin() == OP_RETURN);
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index d76a5acd6366..5580a5933e6d 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -15,13 +15,15 @@
 
 namespace {
 
-// Valid signature cache, to avoid doing expensive ECDSA signature checking
-// twice for every transaction (once when accepted into memory pool, and
-// again when accepted into the block chain)
+/**
+ * Valid signature cache, to avoid doing expensive ECDSA signature checking
+ * twice for every transaction (once when accepted into memory pool, and
+ * again when accepted into the block chain)
+ */
 class CSignatureCache
 {
 private:
-     // sigdata_type is (signature hash, signature, public key):
+     //! sigdata_type is (signature hash, signature, public key):
     typedef boost::tuple<uint256, std::vector<unsigned char>, CPubKey> sigdata_type;
     std::set< sigdata_type> setValid;
     boost::shared_mutex cs_sigcache;
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 9dfd640dfb26..7dfed751b6bf 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -46,12 +46,12 @@ bool SignN(const vector<valtype>& multisigdata, const CKeyStore& keystore, uint2
     return nSigned==nRequired;
 }
 
-//
-// Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.
-// Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed),
-// unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
-// Returns false if scriptPubKey could not be completely satisfied.
-//
+/**
+ * Sign scriptPubKey with private keys stored in keystore, given transaction hash and hash type.
+ * Signatures are returned in scriptSigRet (or returns false if scriptPubKey can't be signed),
+ * unless whichTypeRet is TX_SCRIPTHASH, in which case scriptSigRet is the redemption script.
+ * Returns false if scriptPubKey could not be completely satisfied.
+ */
 bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash, int nHashType,
                   CScript& scriptSigRet, txnouttype& whichTypeRet)
 {
diff --git a/src/script/sign.h b/src/script/sign.h
index 99d5516adb54..45a5e0dea330 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -17,8 +17,10 @@ struct CMutableTransaction;
 bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
 
-// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
-// combine them intelligently and return the result.
+/**
+ * Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
+ * combine them intelligently and return the result.
+ */
 CScript CombineSignatures(const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, const CScript& scriptSig1, const CScript& scriptSig2);
 
 #endif // BITCOIN_SCRIPT_SIGN_H
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index e238ecedb00e..ab6e6cde0deb 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -34,9 +34,9 @@ const char* GetTxnOutputType(txnouttype t)
     return NULL;
 }
 
-//
-// Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
-//
+/**
+ * Return public keys or hashes from scriptPubKey, for 'standard' transaction types.
+ */
 bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, vector<vector<unsigned char> >& vSolutionsRet)
 {
     // Templates
diff --git a/src/script/standard.h b/src/script/standard.h
index 55a27881aa0e..f3dcc75fdc82 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -25,27 +25,31 @@ class CScriptID : public uint160
     CScriptID(const uint160& in) : uint160(in) {}
 };
 
-static const unsigned int MAX_OP_RETURN_RELAY = 40;      // bytes
+static const unsigned int MAX_OP_RETURN_RELAY = 40;      //! bytes
 extern unsigned nMaxDatacarrierBytes;
 
-// Mandatory script verification flags that all new blocks must comply with for
-// them to be valid. (but old blocks may not comply with) Currently just P2SH,
-// but in the future other flags may be added, such as a soft-fork to enforce
-// strict DER encoding.
-//
-// Failing one of these tests may trigger a DoS ban - see CheckInputs() for
-// details.
+/**
+ * Mandatory script verification flags that all new blocks must comply with for
+ * them to be valid. (but old blocks may not comply with) Currently just P2SH,
+ * but in the future other flags may be added, such as a soft-fork to enforce
+ * strict DER encoding.
+ * 
+ * Failing one of these tests may trigger a DoS ban - see CheckInputs() for
+ * details.
+ */
 static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
 
-// Standard script verification flags that standard transactions will comply
-// with. However scripts violating these flags may still be present in valid
-// blocks and we must accept those blocks.
+/**
+ * Standard script verification flags that standard transactions will comply
+ * with. However scripts violating these flags may still be present in valid
+ * blocks and we must accept those blocks.
+ */
 static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
                                                          SCRIPT_VERIFY_STRICTENC |
                                                          SCRIPT_VERIFY_MINIMALDATA |
                                                          SCRIPT_VERIFY_NULLDUMMY;
 
-// For convenience, standard but not mandatory verify flags.
+/** For convenience, standard but not mandatory verify flags. */
 static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
 
 enum txnouttype
@@ -65,7 +69,8 @@ class CNoDestination {
     friend bool operator<(const CNoDestination &a, const CNoDestination &b) { return true; }
 };
 
-/** A txout script template with a specific destination. It is either:
+/** 
+ * A txout script template with a specific destination. It is either:
  *  * CNoDestination: no destination set
  *  * CKeyID: TX_PUBKEYHASH destination
  *  * CScriptID: TX_SCRIPTHASH destination

From f4e0aefadcc9f37611a6d5a13e3f7b4b9a37bf76 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 10:53:59 -0800
Subject: [PATCH 0999/1819] Do signature-s negation inside the tests

To avoid the need for libsecp256k1 to expose such functionality.
---
 src/ecwrapper.cpp         |  4 ++--
 src/ecwrapper.h           |  2 +-
 src/key.cpp               |  4 ++--
 src/key.h                 |  2 +-
 src/test/script_tests.cpp | 47 ++++++++++++++++++++++++++++++++++++++-
 5 files changed, 52 insertions(+), 7 deletions(-)

diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index ebaa350264e9..3377dce0c124 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -193,7 +193,7 @@ bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
     return o2i_ECPublicKey(&pkey, &pubkey, size) != NULL;
 }
 
-bool CECKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) {
+bool CECKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) {
     vchSig.clear();
     ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
     if (sig == NULL)
@@ -205,7 +205,7 @@ bool CECKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool
     BIGNUM *halforder = BN_CTX_get(ctx);
     EC_GROUP_get_order(group, order, ctx);
     BN_rshift1(halforder, order);
-    if (lowS && BN_cmp(sig->s, halforder) > 0) {
+    if (BN_cmp(sig->s, halforder) > 0) {
         // enforce low S values, by negating the value (modulo the order) if above order/2.
         BN_sub(sig->s, order, sig->s);
     }
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index 3457ca5f5a3c..a7847d190c1e 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -28,7 +28,7 @@ class CECKey {
     bool SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck=false);
     void GetPubKey(std::vector<unsigned char>& pubkey, bool fCompressed);
     bool SetPubKey(const unsigned char* pubkey, size_t size);
-    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS);
+    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig);
     bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig);
     bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec);
 
diff --git a/src/key.cpp b/src/key.cpp
index 1b539d073a3c..0ca9a681a3ba 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -102,7 +102,7 @@ CPubKey CKey::GetPubKey() const {
     return result;
 }
 
-bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lowS) const {
+bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     if (!fValid)
         return false;
 #ifdef USE_SECP256K1
@@ -119,7 +119,7 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, bool lo
 #else
     CECKey key;
     key.SetSecretBytes(vch);
-    return key.Sign(hash, vchSig, lowS);
+    return key.Sign(hash, vchSig);
 #endif
 }
 
diff --git a/src/key.h b/src/key.h
index f36e658deece..0bb05482c9ce 100644
--- a/src/key.h
+++ b/src/key.h
@@ -122,7 +122,7 @@ class CKey
     CPubKey GetPubKey() const;
 
     //! Create a DER-serialized signature.
-    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, bool lowS = true) const;
+    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig) const;
 
     /**
      * Create a compact signature (65 bytes), which allows reconstructing the used public key.
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index a41552fea142..cff1664a1e9f 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -95,6 +95,48 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bo
     BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0)) == expect, message);
 }
 
+void static NegateSignatureS(std::vector<unsigned char>& vchSig) {
+    // Parse the signature.
+    std::vector<unsigned char> r, s;
+    r = std::vector<unsigned char>(vchSig.begin() + 4, vchSig.begin() + 4 + vchSig[3]);
+    s = std::vector<unsigned char>(vchSig.begin() + 6 + vchSig[3], vchSig.begin() + 6 + vchSig[3] + vchSig[5 + vchSig[3]]);
+    unsigned char hashtype = vchSig.back();
+
+    // Really ugly to implement mod-n negation here, but it would be feature creep to expose such functionality from libsecp256k1.
+    static const unsigned char order[33] = {
+        0x00,
+        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE,
+        0xBA, 0xAE, 0xDC, 0xE6, 0xAF, 0x48, 0xA0, 0x3B,
+        0xBF, 0xD2, 0x5E, 0x8C, 0xD0, 0x36, 0x41, 0x41
+    };
+    while (s.size() < 33) {
+        s.insert(s.begin(), 0x00);
+    }
+    int carry = 0;
+    for (int p = 32; p >= 1; p--) {
+        int n = (int)order[p] - s[p] - carry;
+        s[p] = (n + 256) & 0xFF;
+        carry = (n < 0);
+    }
+    assert(carry == 0);
+    if (s.size() > 1 && s[0] == 0 && s[1] < 0x80) {
+        s.erase(s.begin());
+    }
+
+    // Reconstruct the signature.
+    vchSig.clear();
+    vchSig.push_back(0x30);
+    vchSig.push_back(4 + r.size() + s.size());
+    vchSig.push_back(0x02);
+    vchSig.push_back(r.size());
+    vchSig.insert(vchSig.end(), r.begin(), r.end());
+    vchSig.push_back(0x02);
+    vchSig.push_back(s.size());
+    vchSig.insert(vchSig.end(), s.begin(), s.end());
+    vchSig.push_back(hashtype);
+}
+
 namespace
 {
 const unsigned char vchKey0[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
@@ -194,7 +236,10 @@ class TestBuilder
         uint256 hash = SignatureHash(scriptPubKey, spendTx, 0, nHashType);
         std::vector<unsigned char> vchSig, r, s;
         do {
-            key.Sign(hash, vchSig, lenS <= 32);
+            key.Sign(hash, vchSig);
+            if ((lenS == 33) != (vchSig[5 + vchSig[3]] == 33)) {
+                NegateSignatureS(vchSig);
+            }
             r = std::vector<unsigned char>(vchSig.begin() + 4, vchSig.begin() + 4 + vchSig[3]);
             s = std::vector<unsigned char>(vchSig.begin() + 6 + vchSig[3], vchSig.begin() + 6 + vchSig[3] + vchSig[5 + vchSig[3]]);
         } while (lenR != r.size() || lenS != s.size());

From d52f07260582f7b1ffef05953bcc821bcee8af61 Mon Sep 17 00:00:00 2001
From: sinetek <pitwuu@gmail.com>
Date: Sat, 8 Nov 2014 13:48:35 -0500
Subject: [PATCH 1000/1819] Don't show wallet options in the preferences menu
 when running with -disablewallet

---
 src/qt/bitcoingui.cpp    | 6 +++---
 src/qt/bitcoingui.h      | 1 +
 src/qt/optionsdialog.cpp | 7 ++++++-
 src/qt/optionsdialog.h   | 2 +-
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 77cfdceef0a7..450b83a8c63e 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -103,9 +103,9 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     QString windowTitle = tr("Bitcoin Core") + " - ";
 #ifdef ENABLE_WALLET
     /* if compiled with wallet support, -disablewallet can still disable the wallet */
-    bool enableWallet = !GetBoolArg("-disablewallet", false);
+    enableWallet = !GetBoolArg("-disablewallet", false);
 #else
-    bool enableWallet = false;
+    enableWallet = false;
 #endif // ENABLE_WALLET
     if(enableWallet)
     {
@@ -554,7 +554,7 @@ void BitcoinGUI::optionsClicked()
     if(!clientModel || !clientModel->getOptionsModel())
         return;
 
-    OptionsDialog dlg(this);
+    OptionsDialog dlg(this, enableWallet);
     dlg.setModel(clientModel->getOptionsModel());
     dlg.exec();
 }
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 35b36811c42e..662ef9d9e841 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -64,6 +64,7 @@ class BitcoinGUI : public QMainWindow
     bool setCurrentWallet(const QString& name);
     void removeAllWallets();
 #endif // ENABLE_WALLET
+    bool enableWallet;
 
 protected:
     void changeEvent(QEvent *e);
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 67be174d556f..f5a0759c923b 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -30,7 +30,7 @@
 #include <QMessageBox>
 #include <QTimer>
 
-OptionsDialog::OptionsDialog(QWidget *parent) :
+OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
     QDialog(parent),
     ui(new Ui::OptionsDialog),
     model(0),
@@ -66,6 +66,11 @@ OptionsDialog::OptionsDialog(QWidget *parent) :
     ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWindow));
 #endif
 
+    /* remove Wallet tab in case of -disablewallet */
+    if (!enableWallet) {
+        ui->tabWidget->removeTab(ui->tabWidget->indexOf(ui->tabWallet));
+    }
+
     /* Display elements init */
     QDir translations(":translations");
     ui->lang->addItem(QString("(") + tr("default") + QString(")"), QVariant(""));
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 108609610db6..794a39590c89 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -24,7 +24,7 @@ class OptionsDialog : public QDialog
     Q_OBJECT
 
 public:
-    explicit OptionsDialog(QWidget *parent);
+    explicit OptionsDialog(QWidget *parent, bool enableWallet);
     ~OptionsDialog();
 
     void setModel(OptionsModel *model);

From e2655e0ab1fc36cd4a58a5145c53500cb7b2d4d0 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 11 Nov 2014 04:52:43 -0500
Subject: [PATCH 1001/1819] Add unauthenticated HTTP REST interface to public
 blockchain data.

---
 src/Makefile.am   |   1 +
 src/rest.cpp      | 201 ++++++++++++++++++++++++++++++++++++++++++++++
 src/rpcserver.cpp |   9 ++-
 src/rpcserver.h   |   6 ++
 4 files changed, 216 insertions(+), 1 deletion(-)
 create mode 100644 src/rest.cpp

diff --git a/src/Makefile.am b/src/Makefile.am
index 8b5d009842a0..2c2a96b198e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -165,6 +165,7 @@ libbitcoin_server_a_SOURCES = \
   net.cpp \
   noui.cpp \
   pow.cpp \
+  rest.cpp \
   rpcblockchain.cpp \
   rpcmining.cpp \
   rpcmisc.cpp \
diff --git a/src/rest.cpp b/src/rest.cpp
new file mode 100644
index 000000000000..48c1672ae862
--- /dev/null
+++ b/src/rest.cpp
@@ -0,0 +1,201 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2012 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <boost/algorithm/string.hpp>
+#include "rpcserver.h"
+#include "streams.h"
+#include "utilstrencodings.h"
+#include "core/block.h"
+#include "core/transaction.h"
+#include "version.h"
+#include "main.h"
+
+using namespace std;
+using namespace json_spirit;
+
+enum RetFormat {
+    RF_BINARY,
+    RF_HEX,
+    RF_JSON,
+};
+
+static const struct {
+    enum RetFormat rf;
+    const char *name;
+} rf_names[] = {
+    { RF_BINARY, "binary" },            // default, if match not found
+    { RF_HEX, "hex" },
+    { RF_JSON, "json" },
+};
+
+class RestErr {
+public:
+    enum HTTPStatusCode status;
+    string message;
+};
+
+extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry);
+extern Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex);
+
+static RestErr RESTERR(enum HTTPStatusCode status, string message)
+{
+    RestErr re;
+    re.status = status;
+    re.message = message;
+    return re;
+}
+
+static enum RetFormat ParseDataFormat(const string& format)
+{
+    for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
+        if (format == rf_names[i].name)
+            return rf_names[i].rf;
+
+    return rf_names[0].rf;
+}
+
+static bool ParseHashStr(string& strReq, uint256& v)
+{
+    if (!IsHex(strReq) || (strReq.size() != 64))
+        return false;
+
+    v.SetHex(strReq);
+    return true;
+}
+
+static bool rest_block(AcceptedConnection *conn,
+                       string& strReq,
+                       map<string, string>& mapHeaders,
+                       bool fRun)
+{
+    vector<string> params;
+    boost::split(params, strReq, boost::is_any_of("/"));
+
+    enum RetFormat rf = ParseDataFormat(params.size() > 1 ? params[1] : string(""));
+
+    string hashStr = params[0];
+    uint256 hash;
+    if (!ParseHashStr(hashStr, hash))
+        throw RESTERR(HTTP_BAD_REQUEST, "Invalid hash: " + hashStr);
+
+    if (mapBlockIndex.count(hash) == 0)
+        throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+
+    CBlock block;
+    CBlockIndex* pblockindex = mapBlockIndex[hash];
+    if (!ReadBlockFromDisk(block, pblockindex))
+        throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+
+    CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION);
+    ssBlock << block;
+
+    switch (rf) {
+    case RF_BINARY: {
+        string binaryBlock = ssBlock.str();
+        conn->stream() << HTTPReply(HTTP_OK, binaryBlock, fRun, true, "application/octet-stream") << binaryBlock << std::flush;
+        return true;
+    }
+
+    case RF_HEX: {
+        string strHex = HexStr(ssBlock.begin(), ssBlock.end()) + "\n";;
+        conn->stream() << HTTPReply(HTTP_OK, strHex, fRun, false, "text/plain") << std::flush;
+        return true;
+    }
+
+    case RF_JSON: {
+        Object objBlock = blockToJSON(block, pblockindex);
+        string strJSON = write_string(Value(objBlock), false) + "\n";
+        conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
+        return true;
+     }
+    }
+
+    // not reached
+    return true;     // continue to process further HTTP reqs on this cxn
+}
+
+static bool rest_tx(AcceptedConnection *conn,
+                    string& strReq,
+                    map<string, string>& mapHeaders,
+                    bool fRun)
+{
+    vector<string> params;
+    boost::split(params, strReq, boost::is_any_of("/"));
+
+    enum RetFormat rf = ParseDataFormat(params.size() > 1 ? params[1] : string(""));
+
+    string hashStr = params[0];
+    uint256 hash;
+    if (!ParseHashStr(hashStr, hash))
+        throw RESTERR(HTTP_BAD_REQUEST, "Invalid hash: " + hashStr);
+
+    CTransaction tx;
+    uint256 hashBlock = 0;
+    if (!GetTransaction(hash, tx, hashBlock, true))
+        throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+
+    CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+    ssTx << tx;
+
+    switch (rf) {
+    case RF_BINARY: {
+        string binaryTx = ssTx.str();
+        conn->stream() << HTTPReply(HTTP_OK, binaryTx, fRun, true, "application/octet-stream") << binaryTx << std::flush;
+        return true;
+    }
+
+    case RF_HEX: {
+        string strHex = HexStr(ssTx.begin(), ssTx.end()) + "\n";;
+        conn->stream() << HTTPReply(HTTP_OK, strHex, fRun, false, "text/plain") << std::flush;
+        return true;
+    }
+
+    case RF_JSON: {
+        Object objTx;
+        TxToJSON(tx, hashBlock, objTx);
+        string strJSON = write_string(Value(objTx), false) + "\n";
+        conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
+        return true;
+     }
+    }
+
+    // not reached
+    return true;     // continue to process further HTTP reqs on this cxn
+}
+
+static const struct {
+    const char *prefix;
+    bool (*handler)(AcceptedConnection *conn,
+                    string& strURI,
+                    map<string, string>& mapHeaders,
+                    bool fRun);
+} uri_prefixes[] = {
+    { "/rest/tx/", rest_tx },
+    { "/rest/block/", rest_block },
+};
+
+bool HTTPReq_REST(AcceptedConnection *conn,
+                  string& strURI,
+                  map<string, string>& mapHeaders,
+                  bool fRun)
+{
+    try {
+        for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++) {
+            unsigned int plen = strlen(uri_prefixes[i].prefix);
+            if (strURI.substr(0, plen) == uri_prefixes[i].prefix) {
+                string strReq = strURI.substr(plen);
+                return uri_prefixes[i].handler(conn, strReq, mapHeaders, fRun);
+            }
+        }
+    }
+    catch (RestErr& re) {
+        conn->stream() << HTTPReply(re.status, re.message + "\r\n", false, false, "text/plain") << std::flush;
+        return false;
+    }
+
+    conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
+    return false;
+}
+
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index cc80887ba4dc..d072f18e36de 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -946,11 +946,18 @@ void ServiceConnection(AcceptedConnection *conn)
         if (mapHeaders["connection"] == "close")
             fRun = false;
 
+        // Process via JSON-RPC API
         if (strURI == "/") {
             if (!HTTPReq_JSONRPC(conn, strRequest, mapHeaders, fRun))
                 break;
+
+        // Process via HTTP REST API
+        } else if (strURI.substr(0, 6) == "/rest/") {
+            if (!HTTPReq_REST(conn, strURI, mapHeaders, fRun))
+                break;
+
         } else {
-            conn->stream() << HTTPError(HTTP_NOT_FOUND, false) << std::flush;
+            conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
             break;
         }
     }
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 2a258dd89a91..60793f79aee8 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -218,4 +218,10 @@ extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp)
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
 
+// in rest.cpp
+extern bool HTTPReq_REST(AcceptedConnection *conn,
+                  std::string& strURI,
+                  std::map<std::string, std::string>& mapHeaders,
+                  bool fRun);
+
 #endif // BITCOIN_RPCSERVER_H

From cca48f69b04462c5c9bfefd34443e0b8401dbd6c Mon Sep 17 00:00:00 2001
From: 21E14 <21xe14@gmail.com>
Date: Sat, 1 Nov 2014 17:42:12 -0400
Subject: [PATCH 1002/1819] Reset setBlockIndexCandidates once block index db
 loaded

---
 src/main.cpp | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 008a0591032b..1ba17614df19 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1949,6 +1949,16 @@ static CBlockIndex* FindMostWorkChain() {
     } while(true);
 }
 
+// Delete all entries in setBlockIndexCandidates that are worse than the current tip.
+static void PruneBlockIndexCandidates() {
+    // Note that we can't delete the current block itself, as we may need to return to it later in case a
+    // reorganization to a better block fails.
+    std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexCandidates.begin();
+    while (setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) {
+        setBlockIndexCandidates.erase(it++);
+    }
+}
+
 // Try to make some progress towards making pindexMostWork the active block.
 // pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
 static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork, CBlock *pblock) {
@@ -1996,13 +2006,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
                 return false;
             }
         } else {
-            // Delete all entries in setBlockIndexCandidates that are worse than our new current block.
-            // Note that we can't delete the current block itself, as we may need to return to it later in case a
-            // reorganization to a better block fails.
-            std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexCandidates.begin();
-            while (setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) {
-                setBlockIndexCandidates.erase(it++);
-            }
+            PruneBlockIndexCandidates();
             // Either the current tip or a successor of it we're working towards is left in setBlockIndexCandidates.
             assert(!setBlockIndexCandidates.empty());
             if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
@@ -2860,6 +2864,9 @@ bool static LoadBlockIndexDB()
     if (it == mapBlockIndex.end())
         return true;
     chainActive.SetTip(it->second);
+
+    PruneBlockIndexCandidates();
+
     LogPrintf("LoadBlockIndexDB(): hashBestChain=%s height=%d date=%s progress=%f\n",
         chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(),
         DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),

From 096efc5812f09f2d858707c6573acd6dbf4eadc3 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 12 Nov 2014 18:35:18 -0500
Subject: [PATCH 1003/1819] travis: install less packages from apt-get

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index b685fbb5cd93..b0c8580e6c8b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -40,7 +40,7 @@ matrix:
       env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy"
 install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
-    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi
+    - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES; fi
 before_script:
     - unset CC; unset CXX
     - mkdir -p depends/SDKs depends/sdk-sources

From 560e99636c0175044ca098f30e10ee7585654a19 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 12 Nov 2014 17:35:14 -0500
Subject: [PATCH 1004/1819] travis: attempt to fix unlikely build issue

This is a long chain of errors, and there are likely other changes that could
be made to cope in other places along that chain.

If depends don't build successfully, don't bother trying again for the sake of
better logging. That's likely to hurt more than help. In this case, qt build
failed, and on the second attempt, it appeared to be successful. However, due
to a bad object from an internal gcc error on the first build, the resulting
lib was unusable. This caused bitcoin-qt to not be built, and tests and
packaging which expected bitcoin-qt to be there failed.

The root cause:
Mingw is especially crashy when using -jX, likely compounded by low-memory
environments. I've seen multiple problems with this combo in Gitian as well.

In this case:
i686-w64-mingw32-g++: internal compiler error: Killed (program cc1plus)
...
make[3]: *** [.obj/release/qdrawhelper.o] Error 4

The workaround:
Bump Travis down to using -j2 by default. Additionaly, enable --with-gui for
the windows builds. This will cause configure to fail if qt is not working
while also testing the config flag.

Other failures which may be worth revisiting separately:
- If a depends package fails, maybe remove the workdir so that it doesn't taint
  subsequent runs
- See if there's anything repeatable about the ICE when building qt
---
 .travis.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b685fbb5cd93..f6b011ee1cf0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -35,9 +35,9 @@ matrix:
     - compiler: ": Cross-Mac"
       env: HOST=x86_64-apple-darwin11 PACKAGES="gcc-multilib g++-multilib cmake libcap-dev libz-dev libbz2-dev" OSX_SDK=10.7 GOAL="deploy"
     - compiler: ": Win64"
-      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy"
+      env: HOST=x86_64-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 binutils-mingw-w64-x86-64 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2"
     - compiler: ": Win32"
-      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy"
+      env: HOST=i686-w64-mingw32 PACKAGES="nsis gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686 mingw-w64-dev wine bc" RUN_TESTS=true GOAL="deploy" BITCOIN_CONFIG="--enable-gui" MAKEJOBS="-j2"
 install:
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get update; fi
     - if [ -n "$PACKAGES" ]; then travis_retry sudo apt-get install --no-upgrade -qq $PACKAGES; fi
@@ -46,7 +46,7 @@ before_script:
     - mkdir -p depends/SDKs depends/sdk-sources
     - if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then wget $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -O depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
     - if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz; fi
-    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS || (echo "Build failure. Verbose build follows." && make -C depends V=1 HOST=$HOST $DEP_OPTS)
+    - make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
 script:
     - if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
     - OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST

From 187739006c3e064b5628719adee02b4fbcb5fabc Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 12 Nov 2014 18:02:08 -0500
Subject: [PATCH 1005/1819] depends: cleanup better after qt and force a bump

qt needs to be rebuilt for travis. The previous commit should help ensure that
this won't need to be done again.
---
 depends/packages/qt.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 5fbab57dd422..51f2ea663ba9 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -93,5 +93,5 @@ endef
 
 define $(package)_postprocess_cmds
   rm -rf mkspecs/ lib/cmake/ && \
-  rm lib/libQt5Bootstrap.a lib/lib*.la lib/lib*.prl
+  rm lib/libQt5Bootstrap.a lib/lib*.la lib/*.prl plugins/*/*.prl
 endef

From c8b115e20ba8bc0deff7d94a91dfadf9822a561e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 12 Nov 2014 19:24:29 -0500
Subject: [PATCH 1006/1819] travis: temporarily disable the forknotify test

It appears to be breaking randomly on Windows
---
 qa/pull-tester/rpc-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index f07e3c6d9dd7..a0056c141b7f 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -13,7 +13,7 @@ export BITCOIND=${REAL_BITCOIND}
 if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
-  ${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
+  #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
 fi

From 8fa0494e9205e1c2151046010cc200c7c9ee022e Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 13 Nov 2014 15:20:57 +0100
Subject: [PATCH 1007/1819] Win32: log addresses found in Discover() calls

---
 src/net.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index a66875a89447..695adeec5439 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1567,7 +1567,8 @@ void static Discover(boost::thread_group& threadGroup)
         {
             BOOST_FOREACH (const CNetAddr &addr, vaddr)
             {
-                AddLocal(addr, LOCAL_IF);
+                if (AddLocal(addr, LOCAL_IF))
+                    LogPrintf("%s: %s - %s\n", __func__, pszHostName, addr.ToString());
             }
         }
     }
@@ -1587,20 +1588,19 @@ void static Discover(boost::thread_group& threadGroup)
                 struct sockaddr_in* s4 = (struct sockaddr_in*)(ifa->ifa_addr);
                 CNetAddr addr(s4->sin_addr);
                 if (AddLocal(addr, LOCAL_IF))
-                    LogPrintf("IPv4 %s: %s\n", ifa->ifa_name, addr.ToString());
+                    LogPrintf("%s: IPv4 %s: %s\n", __func__, ifa->ifa_name, addr.ToString());
             }
             else if (ifa->ifa_addr->sa_family == AF_INET6)
             {
                 struct sockaddr_in6* s6 = (struct sockaddr_in6*)(ifa->ifa_addr);
                 CNetAddr addr(s6->sin6_addr);
                 if (AddLocal(addr, LOCAL_IF))
-                    LogPrintf("IPv6 %s: %s\n", ifa->ifa_name, addr.ToString());
+                    LogPrintf("%s: IPv6 %s: %s\n", __func__, ifa->ifa_name, addr.ToString());
             }
         }
         freeifaddrs(myaddrs);
     }
 #endif
-
 }
 
 void StartNode(boost::thread_group& threadGroup)

From cd4d3f1915f56278d83ca00d7a970d08970f2fa4 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 13 Nov 2014 15:23:15 +0100
Subject: [PATCH 1008/1819] Win32: change buffer size for gethotsname in
 Discover()

- 256 byte is the maximum, as per
  http://msdn.microsoft.com/en-us/library/windows/desktop/ms738527%28v=vs.85%29.aspx
---
 src/net.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/net.cpp b/src/net.cpp
index 695adeec5439..6bf72d22c593 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1559,7 +1559,7 @@ void static Discover(boost::thread_group& threadGroup)
 
 #ifdef WIN32
     // Get local host IP
-    char pszHostName[1000] = "";
+    char pszHostName[256] = "";
     if (gethostname(pszHostName, sizeof(pszHostName)) != SOCKET_ERROR)
     {
         vector<CNetAddr> vaddr;

From a7af9839d688bee9b0b15add61259140b3c00014 Mon Sep 17 00:00:00 2001
From: Bryan Bishop <kanzure@gmail.com>
Date: Fri, 14 Nov 2014 09:12:41 -0600
Subject: [PATCH 1009/1819] don't override dir() in qa rpc tests

Replace "dir" with "dirname" in util.py in qa/rpc-tests/ because "dir"
is the name of a function in python.
---
 qa/rpc-tests/util.py | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index e5383b6c5734..0d5eeefa793e 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -61,8 +61,8 @@ def sync_mempools(rpc_connections):
 
 bitcoind_processes = {}
 
-def initialize_datadir(dir, n):
-    datadir = os.path.join(dir, "node"+str(n))
+def initialize_datadir(dirname, n):
+    datadir = os.path.join(dirname, "node"+str(n))
     if not os.path.isdir(datadir):
         os.makedirs(datadir)
     with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
@@ -145,11 +145,11 @@ def _rpchost_to_args(rpchost):
         rv += ['-rpcport=' + rpcport]
     return rv
 
-def start_node(i, dir, extra_args=None, rpchost=None):
+def start_node(i, dirname, extra_args=None, rpchost=None):
     """
     Start a bitcoind and return RPC connection to it
     """
-    datadir = os.path.join(dir, "node"+str(i))
+    datadir = os.path.join(dirname, "node"+str(i))
     args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
     if extra_args is not None: args.extend(extra_args)
     bitcoind_processes[i] = subprocess.Popen(args)
@@ -163,15 +163,15 @@ def start_node(i, dir, extra_args=None, rpchost=None):
     proxy.url = url # store URL on proxy for info
     return proxy
 
-def start_nodes(num_nodes, dir, extra_args=None, rpchost=None):
+def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None):
     """
     Start multiple bitcoinds, return RPC connections to them
     """
     if extra_args is None: extra_args = [ None for i in range(num_nodes) ]
-    return [ start_node(i, dir, extra_args[i], rpchost) for i in range(num_nodes) ]
+    return [ start_node(i, dirname, extra_args[i], rpchost) for i in range(num_nodes) ]
 
-def log_filename(dir, n_node, logname):
-    return os.path.join(dir, "node"+str(n_node), "regtest", logname)
+def log_filename(dirname, n_node, logname):
+    return os.path.join(dirname, "node"+str(n_node), "regtest", logname)
 
 def stop_node(node, i):
     node.stop()

From 18379875bf7dd91637e4a206db58cd0968b5d47f Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 13 Nov 2014 14:52:04 -0500
Subject: [PATCH 1010/1819] Optimize -regtest setgenerate block generation

Speed up generating blocks in regression test mode, by moving
block-creating and nonce-finding directly into the setgenerate
RPC call (instead of starting up a mining thread and waiting for
it to find a block).

This makes the forknotify RPC test three times quicker, for
example (10 seconds runtime instead of 30 seconds, assuming
the initial blockchain cache is already built).
---
 src/rpcmining.cpp | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 879a50411546..2bde02c0a12b 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -121,6 +121,8 @@ Value setgenerate(const Array& params, bool fHelp)
             "1. generate         (boolean, required) Set to true to turn on generation, off to turn off.\n"
             "2. genproclimit     (numeric, optional) Set the processor limit for when generation is on. Can be -1 for unlimited.\n"
             "                    Note: in -regtest mode, genproclimit controls how many blocks are generated immediately.\n"
+            "\nResult\n"
+            "[ blockhashes ]     (array, -regtest only) hashes of blocks generated\n"
             "\nExamples:\n"
             "\nSet the generation on with a limit of one processor\n"
             + HelpExampleCli("setgenerate", "true 1") +
@@ -154,26 +156,38 @@ Value setgenerate(const Array& params, bool fHelp)
         int nHeightEnd = 0;
         int nHeight = 0;
         int nGenerate = (nGenProcLimit > 0 ? nGenProcLimit : 1);
+        CReserveKey reservekey(pwalletMain);
+
         {   // Don't keep cs_main locked
             LOCK(cs_main);
             nHeightStart = chainActive.Height();
             nHeight = nHeightStart;
             nHeightEnd = nHeightStart+nGenerate;
         }
-        int nHeightLast = -1;
+        unsigned int nExtraNonce = 0;
+        Array blockHashes;
         while (nHeight < nHeightEnd)
         {
-            if (nHeightLast != nHeight)
+            auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlockWithKey(reservekey));
+            if (!pblocktemplate.get())
+                throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet keypool empty");
+            CBlock *pblock = &pblocktemplate->block;
             {
-                nHeightLast = nHeight;
-                GenerateBitcoins(fGenerate, pwalletMain, 1);
-            }
-            MilliSleep(1);
-            {   // Don't keep cs_main locked
                 LOCK(cs_main);
-                nHeight = chainActive.Height();
+                IncrementExtraNonce(pblock, chainActive.Tip(), nExtraNonce);
+            }
+            while (!CheckProofOfWork(pblock->GetHash(), pblock->nBits)) {
+                // Yes, there is a chance every nonce could fail to satisfy the -regtest
+                // target -- 1 in 2^(2^32). That ain't gonna happen.
+                ++pblock->nNonce;
             }
+            CValidationState state;
+            if (!ProcessNewBlock(state, NULL, pblock))
+                throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
+            ++nHeight;
+            blockHashes.push_back(pblock->GetHash().GetHex());
         }
+        return blockHashes;
     }
     else // Not -regtest: start generate thread, return immediately
     {

From ab9edbd6b6eb3efbca11f16fa467c3c0ef905708 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 31 Oct 2014 23:29:12 -0400
Subject: [PATCH 1011/1819] script: create sane error return codes for script
 validation and remove logging

Attempt to codify the possible error statuses associated with script
validation. script/types.h has been created with the expectation that it will
be part of the public lib interface. The other flag enums will be moved here in
a future commit.

Logging has also been removed in order to drop the dependency on core.h. It can
be re-added to bitcoind as-needed. This makes script verification finally free
of application state and boost!
---
 src/Makefile.am             |   2 +
 src/script/interpreter.cpp  | 297 ++++++++++++++++++++++--------------
 src/script/interpreter.h    |   6 +-
 src/script/script_error.cpp |  67 ++++++++
 src/script/script_error.h   |  53 +++++++
 5 files changed, 306 insertions(+), 119 deletions(-)
 create mode 100644 src/script/script_error.cpp
 create mode 100644 src/script/script_error.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 8b5d009842a0..b3b41e3d170d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -112,6 +112,7 @@ BITCOIN_CORE_H = \
   script/sigcache.h \
   script/sign.h \
   script/standard.h \
+  script/script_error.h \
   serialize.h \
   streams.h \
   sync.h \
@@ -235,6 +236,7 @@ libbitcoin_common_a_SOURCES = \
   script/script.cpp \
   script/sign.cpp \
   script/standard.cpp \
+  script/script_error.cpp \
   $(BITCOIN_CORE_H)
 
 # util: shared between all executables.
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 5fda6248c2ee..cf81fe30a291 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -13,7 +13,6 @@
 #include "pubkey.h"
 #include "script/script.h"
 #include "uint256.h"
-#include "util.h"
 
 using namespace std;
 
@@ -26,6 +25,24 @@ static const CScriptNum bnOne(1);
 static const CScriptNum bnFalse(0);
 static const CScriptNum bnTrue(1);
 
+namespace {
+
+inline bool set_success(ScriptError* ret)
+{
+    if (ret)
+        *ret = SCRIPT_ERR_OK;
+    return true;
+}
+
+inline bool set_error(ScriptError* ret, const ScriptError serror)
+{
+    if (ret)
+        *ret = serror;
+    return false;
+}
+
+} // anon namespace
+
 bool CastToBool(const valtype& vch)
 {
     for (unsigned int i = 0; i < vch.size(); i++)
@@ -55,16 +72,23 @@ static inline void popstack(vector<valtype>& stack)
 }
 
 bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
-    if (vchPubKey.size() < 33)
-        return error("Non-canonical public key: too short");
+    if (vchPubKey.size() < 33) {
+        //  Non-canonical public key: too short
+        return false;
+    }
     if (vchPubKey[0] == 0x04) {
-        if (vchPubKey.size() != 65)
-            return error("Non-canonical public key: invalid length for uncompressed key");
+        if (vchPubKey.size() != 65) {
+            //  Non-canonical public key: invalid length for uncompressed key
+            return false;
+        }
     } else if (vchPubKey[0] == 0x02 || vchPubKey[0] == 0x03) {
-        if (vchPubKey.size() != 33)
-            return error("Non-canonical public key: invalid length for compressed key");
+        if (vchPubKey.size() != 33) {
+            //  Non-canonical public key: invalid length for compressed key
+            return false;
+        }
     } else {
-        return error("Non-canonical public key: neither compressed nor uncompressed");
+          //  Non-canonical public key: neither compressed nor uncompressed
+          return false;
     }
     return true;
 }
@@ -79,47 +103,74 @@ bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
  */
 bool static IsDERSignature(const valtype &vchSig) {
 
-    if (vchSig.size() < 9)
-        return error("Non-canonical signature: too short");
-    if (vchSig.size() > 73)
-        return error("Non-canonical signature: too long");
-    if (vchSig[0] != 0x30)
-        return error("Non-canonical signature: wrong type");
-    if (vchSig[1] != vchSig.size()-3)
-        return error("Non-canonical signature: wrong length marker");
+    if (vchSig.size() < 9) {
+        //  Non-canonical signature: too short
+        return false;
+    }
+    if (vchSig.size() > 73) {
+        // Non-canonical signature: too long
+        return false;
+    }
+    if (vchSig[0] != 0x30) {
+        //  Non-canonical signature: wrong type
+        return false;
+    }
+    if (vchSig[1] != vchSig.size()-3) {
+        //  Non-canonical signature: wrong length marker
+        return false;
+    }
     unsigned int nLenR = vchSig[3];
-    if (5 + nLenR >= vchSig.size())
-        return error("Non-canonical signature: S length misplaced");
+    if (5 + nLenR >= vchSig.size()) {
+        //  Non-canonical signature: S length misplaced
+        return false;
+    }
     unsigned int nLenS = vchSig[5+nLenR];
-    if ((unsigned long)(nLenR+nLenS+7) != vchSig.size())
-        return error("Non-canonical signature: R+S length mismatch");
+    if ((unsigned long)(nLenR+nLenS+7) != vchSig.size()) {
+        //  Non-canonical signature: R+S length mismatch
+        return false;
+    }
 
     const unsigned char *R = &vchSig[4];
-    if (R[-2] != 0x02)
-        return error("Non-canonical signature: R value type mismatch");
-    if (nLenR == 0)
-        return error("Non-canonical signature: R length is zero");
-    if (R[0] & 0x80)
-        return error("Non-canonical signature: R value negative");
-    if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80))
-        return error("Non-canonical signature: R value excessively padded");
+    if (R[-2] != 0x02) {
+        //  Non-canonical signature: R value type mismatch
+        return false;
+    }
+    if (nLenR == 0) {
+        //  Non-canonical signature: R length is zero
+        return false;
+    }
+    if (R[0] & 0x80) {
+        //  Non-canonical signature: R value negative
+        return false;
+    }
+    if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80)) {
+        //  Non-canonical signature: R value excessively padded
+        return false;
+    }
 
     const unsigned char *S = &vchSig[6+nLenR];
-    if (S[-2] != 0x02)
-        return error("Non-canonical signature: S value type mismatch");
-    if (nLenS == 0)
-        return error("Non-canonical signature: S length is zero");
-    if (S[0] & 0x80)
-        return error("Non-canonical signature: S value negative");
-    if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80))
-        return error("Non-canonical signature: S value excessively padded");
-
+    if (S[-2] != 0x02) {
+        //  Non-canonical signature: S value type mismatch
+        return false;
+    }
+    if (nLenS == 0) {
+        //  Non-canonical signature: S length is zero
+        return false;
+    }
+    if (S[0] & 0x80) {
+        //  Non-canonical signature: S value negative
+        return false;
+    }
+    if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80)) {
+        //  Non-canonical signature: S value excessively padded
+        return false;
+    }
     return true;
 }
 
-bool static IsLowDERSignature(const valtype &vchSig) {
+bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
     if (!IsDERSignature(vchSig)) {
-        return false;
+        return set_error(serror, SCRIPT_ERR_SIG_DER);
     }
     unsigned int nLenR = vchSig[3];
     unsigned int nLenS = vchSig[5+nLenR];
@@ -128,7 +179,7 @@ bool static IsLowDERSignature(const valtype &vchSig) {
     // complement modulo the order could have been used instead, which is
     // one byte shorter when encoded correctly.
     if (!eccrypto::CheckSignatureElement(S, nLenS, true))
-        return error("Non-canonical signature: S value is unnecessarily high");
+        return set_error(serror, SCRIPT_ERR_SIG_HIGH_S);
 
     return true;
 }
@@ -139,18 +190,19 @@ bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
     }
     unsigned char nHashType = vchSig[vchSig.size() - 1] & (~(SIGHASH_ANYONECANPAY));
     if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
-        return error("Non-canonical signature: unknown hashtype byte");
+        return false;
 
     return true;
 }
 
-bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags) {
+bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags, ScriptError* serror) {
     if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsDERSignature(vchSig)) {
-        return false;
-    } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig)) {
+        return set_error(serror, SCRIPT_ERR_SIG_DER);
+    } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig, serror)) {
+        // serror is set
         return false;
     } else if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsDefinedHashtypeSignature(vchSig)) {
-        return false;
+        return set_error(serror, SCRIPT_ERR_SIG_HASHTYPE);
     }
     return true;
 }
@@ -185,7 +237,7 @@ bool static CheckMinimalPush(const valtype& data, opcodetype opcode) {
     return true;
 }
 
-bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker)
+bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror)
 {
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
@@ -194,8 +246,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
     valtype vchPushValue;
     vector<bool> vfExec;
     vector<valtype> altstack;
+    set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
     if (script.size() > 10000)
-        return false;
+        return set_error(serror, SCRIPT_ERR_SCRIPT_SIZE);
     int nOpCount = 0;
     bool fRequireMinimal = (flags & SCRIPT_VERIFY_MINIMALDATA) != 0;
 
@@ -209,13 +262,13 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
             // Read instruction
             //
             if (!script.GetOp(pc, opcode, vchPushValue))
-                return false;
+                return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
             if (vchPushValue.size() > MAX_SCRIPT_ELEMENT_SIZE)
-                return false;
+                return set_error(serror, SCRIPT_ERR_PUSH_SIZE);
 
             // Note how OP_RESERVED does not count towards the opcode limit.
             if (opcode > OP_16 && ++nOpCount > 201)
-                return false;
+                return set_error(serror, SCRIPT_ERR_OP_COUNT);
 
             if (opcode == OP_CAT ||
                 opcode == OP_SUBSTR ||
@@ -232,11 +285,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 opcode == OP_MOD ||
                 opcode == OP_LSHIFT ||
                 opcode == OP_RSHIFT)
-                return false; // Disabled opcodes.
+                return set_error(serror, SCRIPT_ERR_DISABLED_OPCODE); // Disabled opcodes.
 
             if (fExec && 0 <= opcode && opcode <= OP_PUSHDATA4) {
                 if (fRequireMinimal && !CheckMinimalPush(vchPushValue, opcode)) {
-                    return false;
+                    return set_error(serror, SCRIPT_ERR_MINIMALDATA);
                 }
                 stack.push_back(vchPushValue);
             } else if (fExec || (OP_IF <= opcode && opcode <= OP_ENDIF))
@@ -288,7 +341,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     if (fExec)
                     {
                         if (stack.size() < 1)
-                            return false;
+                            return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
                         valtype& vch = stacktop(-1);
                         fValue = CastToBool(vch);
                         if (opcode == OP_NOTIF)
@@ -302,7 +355,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 case OP_ELSE:
                 {
                     if (vfExec.empty())
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
                     vfExec.back() = !vfExec.back();
                 }
                 break;
@@ -310,7 +363,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 case OP_ENDIF:
                 {
                     if (vfExec.empty())
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
                     vfExec.pop_back();
                 }
                 break;
@@ -320,18 +373,18 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (true -- ) or
                     // (false -- false) and return
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     bool fValue = CastToBool(stacktop(-1));
                     if (fValue)
                         popstack(stack);
                     else
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_VERIFY);
                 }
                 break;
 
                 case OP_RETURN:
                 {
-                    return false;
+                    return set_error(serror, SCRIPT_ERR_OP_RETURN);
                 }
                 break;
 
@@ -342,7 +395,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 case OP_TOALTSTACK:
                 {
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     altstack.push_back(stacktop(-1));
                     popstack(stack);
                 }
@@ -351,7 +404,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 case OP_FROMALTSTACK:
                 {
                     if (altstack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_ALTSTACK_OPERATION);
                     stack.push_back(altstacktop(-1));
                     popstack(altstack);
                 }
@@ -361,7 +414,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- )
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     popstack(stack);
                     popstack(stack);
                 }
@@ -371,7 +424,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- x1 x2 x1 x2)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch1 = stacktop(-2);
                     valtype vch2 = stacktop(-1);
                     stack.push_back(vch1);
@@ -383,7 +436,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 x3 -- x1 x2 x3 x1 x2 x3)
                     if (stack.size() < 3)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch1 = stacktop(-3);
                     valtype vch2 = stacktop(-2);
                     valtype vch3 = stacktop(-1);
@@ -397,7 +450,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2)
                     if (stack.size() < 4)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch1 = stacktop(-4);
                     valtype vch2 = stacktop(-3);
                     stack.push_back(vch1);
@@ -409,7 +462,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2)
                     if (stack.size() < 6)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch1 = stacktop(-6);
                     valtype vch2 = stacktop(-5);
                     stack.erase(stack.end()-6, stack.end()-4);
@@ -422,7 +475,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 x3 x4 -- x3 x4 x1 x2)
                     if (stack.size() < 4)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     swap(stacktop(-4), stacktop(-2));
                     swap(stacktop(-3), stacktop(-1));
                 }
@@ -432,7 +485,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x - 0 | x x)
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch = stacktop(-1);
                     if (CastToBool(vch))
                         stack.push_back(vch);
@@ -451,7 +504,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x -- )
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     popstack(stack);
                 }
                 break;
@@ -460,7 +513,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x -- x x)
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch = stacktop(-1);
                     stack.push_back(vch);
                 }
@@ -470,7 +523,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- x2)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     stack.erase(stack.end() - 2);
                 }
                 break;
@@ -479,7 +532,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- x1 x2 x1)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch = stacktop(-2);
                     stack.push_back(vch);
                 }
@@ -491,11 +544,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // (xn ... x2 x1 x0 n - xn ... x2 x1 x0 xn)
                     // (xn ... x2 x1 x0 n - ... x2 x1 x0 xn)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     int n = CScriptNum(stacktop(-1), fRequireMinimal).getint();
                     popstack(stack);
                     if (n < 0 || n >= (int)stack.size())
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch = stacktop(-n-1);
                     if (opcode == OP_ROLL)
                         stack.erase(stack.end()-n-1);
@@ -509,7 +562,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     //  x2 x1 x3  after first swap
                     //  x2 x3 x1  after second swap
                     if (stack.size() < 3)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     swap(stacktop(-3), stacktop(-2));
                     swap(stacktop(-2), stacktop(-1));
                 }
@@ -519,7 +572,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- x2 x1)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     swap(stacktop(-2), stacktop(-1));
                 }
                 break;
@@ -528,7 +581,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- x2 x1 x2)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype vch = stacktop(-1);
                     stack.insert(stack.end()-2, vch);
                 }
@@ -539,7 +592,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (in -- in size)
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     CScriptNum bn(stacktop(-1).size());
                     stack.push_back(bn.getvch());
                 }
@@ -555,7 +608,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 - bool)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype& vch1 = stacktop(-2);
                     valtype& vch2 = stacktop(-1);
                     bool fEqual = (vch1 == vch2);
@@ -572,7 +625,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         if (fEqual)
                             popstack(stack);
                         else
-                            return false;
+                            return set_error(serror, SCRIPT_ERR_EQUALVERIFY);
                     }
                 }
                 break;
@@ -590,7 +643,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (in -- out)
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     CScriptNum bn(stacktop(-1), fRequireMinimal);
                     switch (opcode)
                     {
@@ -623,7 +676,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x1 x2 -- out)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     CScriptNum bn1(stacktop(-2), fRequireMinimal);
                     CScriptNum bn2(stacktop(-1), fRequireMinimal);
                     CScriptNum bn(0);
@@ -659,7 +712,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         if (CastToBool(stacktop(-1)))
                             popstack(stack);
                         else
-                            return false;
+                            return set_error(serror, SCRIPT_ERR_NUMEQUALVERIFY);
                     }
                 }
                 break;
@@ -668,7 +721,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (x min max -- out)
                     if (stack.size() < 3)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     CScriptNum bn1(stacktop(-3), fRequireMinimal);
                     CScriptNum bn2(stacktop(-2), fRequireMinimal);
                     CScriptNum bn3(stacktop(-1), fRequireMinimal);
@@ -692,7 +745,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (in -- hash)
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     valtype& vch = stacktop(-1);
                     valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
                     if (opcode == OP_RIPEMD160)
@@ -722,7 +775,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 {
                     // (sig pubkey -- bool)
                     if (stack.size() < 2)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 
                     valtype& vchSig    = stacktop(-2);
                     valtype& vchPubKey = stacktop(-1);
@@ -733,10 +786,10 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // Drop the signature, since there's no way for a signature to sign itself
                     scriptCode.FindAndDelete(CScript(vchSig));
 
-                    if (!CheckSignatureEncoding(vchSig, flags)) {
+                    if (!CheckSignatureEncoding(vchSig, flags, serror)) {
+                        //serror is set
                         return false;
                     }
-
                     bool fSuccess = CheckPubKeyEncoding(vchPubKey, flags) && checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                     popstack(stack);
@@ -747,7 +800,7 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         if (fSuccess)
                             popstack(stack);
                         else
-                            return false;
+                            return set_error(serror, SCRIPT_ERR_CHECKSIGVERIFY);
                     }
                 }
                 break;
@@ -759,26 +812,26 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
 
                     int i = 1;
                     if ((int)stack.size() < i)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 
                     int nKeysCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
                     if (nKeysCount < 0 || nKeysCount > 20)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_PUBKEY_COUNT);
                     nOpCount += nKeysCount;
                     if (nOpCount > 201)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_OP_COUNT);
                     int ikey = ++i;
                     i += nKeysCount;
                     if ((int)stack.size() < i)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 
                     int nSigsCount = CScriptNum(stacktop(-i), fRequireMinimal).getint();
                     if (nSigsCount < 0 || nSigsCount > nKeysCount)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_SIG_COUNT);
                     int isig = ++i;
                     i += nSigsCount;
                     if ((int)stack.size() < i)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
 
                     // Subset of script starting at the most recent codeseparator
                     CScript scriptCode(pbegincodehash, pend);
@@ -796,7 +849,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         valtype& vchSig    = stacktop(-isig);
                         valtype& vchPubKey = stacktop(-ikey);
 
-                        if (!CheckSignatureEncoding(vchSig, flags)) {
+                        if (!CheckSignatureEncoding(vchSig, flags, serror)) {
+                            // serror is set
                             return false;
                         }
 
@@ -827,9 +881,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // so optionally verify it is exactly equal to zero prior
                     // to removing it from the stack.
                     if (stack.size() < 1)
-                        return false;
+                        return set_error(serror, SCRIPT_ERR_INVALID_STACK_OPERATION);
                     if ((flags & SCRIPT_VERIFY_NULLDUMMY) && stacktop(-1).size())
-                        return error("CHECKMULTISIG dummy argument not null");
+                        return set_error(serror, SCRIPT_ERR_SIG_NULLDUMMY);
                     popstack(stack);
 
                     stack.push_back(fSuccess ? vchTrue : vchFalse);
@@ -839,29 +893,29 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         if (fSuccess)
                             popstack(stack);
                         else
-                            return false;
+                            return set_error(serror, SCRIPT_ERR_CHECKMULTISIGVERIFY);
                     }
                 }
                 break;
 
                 default:
-                    return false;
+                    return set_error(serror, SCRIPT_ERR_BAD_OPCODE);
             }
 
             // Size limits
             if (stack.size() + altstack.size() > 1000)
-                return false;
+                return set_error(serror, SCRIPT_ERR_STACK_SIZE);
         }
     }
     catch (...)
     {
-        return false;
+        return set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
     }
 
     if (!vfExec.empty())
-        return false;
+        return set_error(serror, SCRIPT_ERR_UNBALANCED_CONDITIONAL);
 
-    return true;
+    return set_success(serror);
 }
 
 namespace {
@@ -966,14 +1020,14 @@ class CTransactionSignatureSerializer {
 uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType)
 {
     if (nIn >= txTo.vin.size()) {
-        LogPrintf("ERROR: SignatureHash() : nIn=%d out of range\n", nIn);
+        //  nIn out of range
         return 1;
     }
 
     // Check for invalid use of SIGHASH_SINGLE
     if ((nHashType & 0x1f) == SIGHASH_SINGLE) {
         if (nIn >= txTo.vout.size()) {
-            LogPrintf("ERROR: SignatureHash() : nOut=%d out of range\n", nIn);
+            //  nOut out of range
             return 1;
         }
     }
@@ -1013,30 +1067,35 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec
     return true;
 }
 
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker)
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror)
 {
+    set_error(serror, SCRIPT_ERR_UNKNOWN_ERROR);
+
     if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) != 0 && !scriptSig.IsPushOnly()) {
-        return false;
+        return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
     }
 
     vector<vector<unsigned char> > stack, stackCopy;
-    if (!EvalScript(stack, scriptSig, flags, checker))
+    if (!EvalScript(stack, scriptSig, flags, checker, serror))
+        // serror is set
         return false;
     if (flags & SCRIPT_VERIFY_P2SH)
         stackCopy = stack;
-    if (!EvalScript(stack, scriptPubKey, flags, checker))
+    if (!EvalScript(stack, scriptPubKey, flags, checker, serror))
+        // serror is set
         return false;
     if (stack.empty())
-        return false;
+        return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 
     if (CastToBool(stack.back()) == false)
-        return false;
+        return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
 
     // Additional validation for spend-to-script-hash transactions:
     if ((flags & SCRIPT_VERIFY_P2SH) && scriptPubKey.IsPayToScriptHash())
     {
-        if (!scriptSig.IsPushOnly()) // scriptSig must be literals-only
-            return false;            // or validation fails
+        // scriptSig must be literals-only or validation fails
+        if (!scriptSig.IsPushOnly())
+            return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
 
         // stackCopy cannot be empty here, because if it was the
         // P2SH  HASH <> EQUAL  scriptPubKey would be evaluated with
@@ -1047,12 +1106,16 @@ bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigne
         CScript pubKey2(pubKeySerialized.begin(), pubKeySerialized.end());
         popstack(stackCopy);
 
-        if (!EvalScript(stackCopy, pubKey2, flags, checker))
+        if (!EvalScript(stackCopy, pubKey2, flags, checker, serror))
+            // serror is set
             return false;
         if (stackCopy.empty())
-            return false;
-        return CastToBool(stackCopy.back());
+            return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
+        if (!CastToBool(stackCopy.back()))
+            return set_error(serror, SCRIPT_ERR_EVAL_FALSE);
+        else
+            return set_success(serror);
     }
 
-    return true;
+    return set_success(serror);
 }
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index ed899fc411f9..14cccc558f32 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -6,6 +6,8 @@
 #ifndef BITCOIN_SCRIPT_INTERPRETER_H
 #define BITCOIN_SCRIPT_INTERPRETER_H
 
+#include "script_error.h"
+
 #include <vector>
 #include <stdint.h>
 #include <string>
@@ -85,7 +87,7 @@ class SignatureChecker : public BaseSignatureChecker
     bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
 };
 
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker);
-bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker);
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
+bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
 
 #endif // BITCOIN_SCRIPT_INTERPRETER_H
diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp
new file mode 100644
index 000000000000..4a3df268ec8b
--- /dev/null
+++ b/src/script/script_error.cpp
@@ -0,0 +1,67 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "script_error.h"
+
+const char* ScriptErrorString(const ScriptError serror)
+{
+    switch (serror)
+    {
+        case SCRIPT_ERR_OK:
+            return "No error";
+        case SCRIPT_ERR_EVAL_FALSE:
+            return "Script evaluated without error but finished with a false/empty top stack element";
+        case SCRIPT_ERR_VERIFY:
+            return "Script failed an OP_VERIFY operation";
+        case SCRIPT_ERR_EQUALVERIFY:
+            return "Script failed an OP_EQUALVERIFY operation";
+        case SCRIPT_ERR_CHECKMULTISIGVERIFY:
+            return "Script failed an OP_CHECKMULTISIGVERIFY operation";
+        case SCRIPT_ERR_CHECKSIGVERIFY:
+            return "Script failed an OP_CHECKSIGVERIFY operation";
+        case SCRIPT_ERR_NUMEQUALVERIFY:
+            return "Script failed an OP_NUMEQUALVERIFY operation";
+        case SCRIPT_ERR_SCRIPT_SIZE:
+            return "Script is too big";
+        case SCRIPT_ERR_PUSH_SIZE:
+            return "Push value size limit exceeded";
+        case SCRIPT_ERR_OP_COUNT:
+            return "Operation limit exceeded";
+        case SCRIPT_ERR_STACK_SIZE:
+            return "Stack size limit exceeded";
+        case SCRIPT_ERR_SIG_COUNT:
+            return "Signature count negative or greater than pubkey count";
+        case SCRIPT_ERR_PUBKEY_COUNT:
+            return "Pubkey count negative or limit exceeded";
+        case SCRIPT_ERR_BAD_OPCODE:
+            return "Opcode missing or not understood";
+        case SCRIPT_ERR_DISABLED_OPCODE:
+            return "Attempted to use a disabled opcode";
+        case SCRIPT_ERR_INVALID_STACK_OPERATION:
+            return "Operation not valid with the current stack size";
+        case SCRIPT_ERR_INVALID_ALTSTACK_OPERATION:
+            return "Operation not valid with the current altstack size";
+        case SCRIPT_ERR_OP_RETURN:
+            return "OP_RETURN was encountered";
+        case SCRIPT_ERR_UNBALANCED_CONDITIONAL:
+            return "Invalid OP_IF construction";
+        case SCRIPT_ERR_SIG_HASHTYPE:
+            return "Signature hash type missing or not understood";
+        case SCRIPT_ERR_SIG_DER:
+            return "Non-canonical DER signature";
+        case SCRIPT_ERR_MINIMALDATA:
+            return "Data push larger than necessary";
+        case SCRIPT_ERR_SIG_PUSHONLY:
+            return "Only non-push operators allowed in signatures";
+        case SCRIPT_ERR_SIG_HIGH_S:
+            return "Non-canonical signature: S value is unnecessarily high";
+        case SCRIPT_ERR_SIG_NULLDUMMY:
+            return "Dummy CHECKMULTISIG argument must be zero";
+        case SCRIPT_ERR_UNKNOWN_ERROR:
+        case SCRIPT_ERR_ERROR_COUNT:
+        default: break;
+    }
+    return "unknown error";
+}
diff --git a/src/script/script_error.h b/src/script/script_error.h
new file mode 100644
index 000000000000..ae6626b25739
--- /dev/null
+++ b/src/script/script_error.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SCRIPT_ERROR_H
+#define BITCOIN_SCRIPT_ERROR_H
+
+typedef enum ScriptError_t
+{
+    SCRIPT_ERR_OK = 0,
+    SCRIPT_ERR_UNKNOWN_ERROR,
+    SCRIPT_ERR_EVAL_FALSE,
+    SCRIPT_ERR_OP_RETURN,
+
+    /* Max sizes */
+    SCRIPT_ERR_SCRIPT_SIZE,
+    SCRIPT_ERR_PUSH_SIZE,
+    SCRIPT_ERR_OP_COUNT,
+    SCRIPT_ERR_STACK_SIZE,
+    SCRIPT_ERR_SIG_COUNT,
+    SCRIPT_ERR_PUBKEY_COUNT,
+
+    /* Failed verify operations */
+    SCRIPT_ERR_VERIFY,
+    SCRIPT_ERR_EQUALVERIFY,
+    SCRIPT_ERR_CHECKMULTISIGVERIFY,
+    SCRIPT_ERR_CHECKSIGVERIFY,
+    SCRIPT_ERR_NUMEQUALVERIFY,
+
+    /* Logical/Format/Canonical errors */
+    SCRIPT_ERR_BAD_OPCODE,
+    SCRIPT_ERR_DISABLED_OPCODE,
+    SCRIPT_ERR_INVALID_STACK_OPERATION,
+    SCRIPT_ERR_INVALID_ALTSTACK_OPERATION,
+    SCRIPT_ERR_UNBALANCED_CONDITIONAL,
+
+    /* BIP62 */
+    SCRIPT_ERR_SIG_HASHTYPE,
+    SCRIPT_ERR_SIG_DER,
+    SCRIPT_ERR_MINIMALDATA,
+    SCRIPT_ERR_SIG_PUSHONLY,
+    SCRIPT_ERR_SIG_HIGH_S,
+    SCRIPT_ERR_SIG_NULLDUMMY,
+
+    SCRIPT_ERR_ERROR_COUNT
+} ScriptError;
+
+#define SCRIPT_ERR_LAST SCRIPT_ERR_ERROR_COUNT
+
+const char* ScriptErrorString(const ScriptError error);
+
+#endif // BITCOIN_SCRIPT_ERROR_H

From 219a1470c4ca05579cf5f3d75db0d632d17c13d4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 13 Nov 2014 14:27:38 -0500
Subject: [PATCH 1012/1819] script: check ScriptError values in script tests

---
 src/test/multisig_tests.cpp    | 37 ++++++++++++++-----
 src/test/script_P2SH_tests.cpp | 19 ++++++----
 src/test/script_tests.cpp      | 66 +++++++++++++++++++++++-----------
 src/test/transaction_tests.cpp | 10 ++++--
 4 files changed, 94 insertions(+), 38 deletions(-)

diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index e9fc86779abe..8d06caa147c3 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -6,6 +6,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/script_error.h"
 #include "script/interpreter.h"
 #include "script/sign.h"
 #include "uint256.h"
@@ -46,6 +47,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
 {
     unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
 
+    ScriptError err;
     CKey key[4];
     for (int i = 0; i < 4; i++)
         key[i].MakeNewKey(true);
@@ -82,19 +84,22 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     keys.clear();
     keys += key[0],key[1]; // magic operator+= from boost.assign
     s = sign_multisig(a_and_b, keys, txTo[0], 0);
-    BOOST_CHECK(VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)));
+    BOOST_CHECK(VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     for (int i = 0; i < 4; i++)
     {
         keys.clear();
         keys += key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 
         keys.clear();
         keys += key[1],key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0)), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
     }
 
     // Test a OR b:
@@ -104,16 +109,24 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         keys += key[i];
         s = sign_multisig(a_or_b, keys, txTo[1], 0);
         if (i == 0 || i == 1)
-            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)), strprintf("a|b: %d", i));
+        {
+            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
+        }
         else
-            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)), strprintf("a|b: %d", i));
+        {
+            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
+        }
     }
     s.clear();
     s << OP_0 << OP_0;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));
     s.clear();
     s << OP_0 << OP_1;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0)));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));
 
 
     for (int i = 0; i < 4; i++)
@@ -123,9 +136,15 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
             keys += key[i],key[j];
             s = sign_multisig(escrow, keys, txTo[2], 0);
             if (i < j && i < 3 && j < 3)
-                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0)), strprintf("escrow 1: %d %d", i, j));
+            {
+                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0), &err), strprintf("escrow 1: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
+            }
             else
-                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0)), strprintf("escrow 2: %d %d", i, j));
+            {
+                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0), &err), strprintf("escrow 2: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
+            }
         }
 }
 
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index fcab652783e6..a969eefa0537 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -6,6 +6,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/script_error.h"
 #include "script/sign.h"
 
 #ifdef ENABLE_WALLET
@@ -27,7 +28,7 @@ Serialize(const CScript& s)
 }
 
 static bool
-Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict)
+Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict, ScriptError& err)
 {
     // Create dummy to/from transactions:
     CMutableTransaction txFrom;
@@ -42,7 +43,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict)
     txTo.vin[0].scriptSig = scriptSig;
     txTo.vout[0].nValue = 1;
 
-    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, SignatureChecker(txTo, 0));
+    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, SignatureChecker(txTo, 0), &err);
 }
 
 
@@ -124,6 +125,7 @@ BOOST_AUTO_TEST_CASE(sign)
 
 BOOST_AUTO_TEST_CASE(norecurse)
 {
+    ScriptError err;
     // Make sure only the outer pay-to-script-hash does the
     // extra-validation thing:
     CScript invalidAsScript;
@@ -135,7 +137,8 @@ BOOST_AUTO_TEST_CASE(norecurse)
     scriptSig << Serialize(invalidAsScript);
 
     // Should not verify, because it will try to execute OP_INVALIDOPCODE
-    BOOST_CHECK(!Verify(scriptSig, p2sh, true));
+    BOOST_CHECK(!Verify(scriptSig, p2sh, true, err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_BAD_OPCODE, ScriptErrorString(err));
 
     // Try to recur, and verification should succeed because
     // the inner HASH160 <> EQUAL should only check the hash:
@@ -143,7 +146,8 @@ BOOST_AUTO_TEST_CASE(norecurse)
     CScript scriptSig2;
     scriptSig2 << Serialize(invalidAsScript) << Serialize(p2sh);
 
-    BOOST_CHECK(Verify(scriptSig2, p2sh2, true));
+    BOOST_CHECK(Verify(scriptSig2, p2sh2, true, err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 }
 
 BOOST_AUTO_TEST_CASE(set)
@@ -238,6 +242,7 @@ BOOST_AUTO_TEST_CASE(switchover)
 {
     // Test switch over code
     CScript notValid;
+    ScriptError err;
     notValid << OP_11 << OP_12 << OP_EQUALVERIFY;
     CScript scriptSig;
     scriptSig << Serialize(notValid);
@@ -246,9 +251,11 @@ BOOST_AUTO_TEST_CASE(switchover)
 
 
     // Validation should succeed under old rules (hash is correct):
-    BOOST_CHECK(Verify(scriptSig, fund, false));
+    BOOST_CHECK(Verify(scriptSig, fund, false, err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     // Fail under new:
-    BOOST_CHECK(!Verify(scriptSig, fund, true));
+    BOOST_CHECK(!Verify(scriptSig, fund, true, err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EQUALVERIFY, ScriptErrorString(err));
 }
 
 BOOST_AUTO_TEST_CASE(AreInputsStandard)
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index cff1664a1e9f..ede13b23c292 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -10,6 +10,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/script_error.h"
 #include "script/sign.h"
 #include "util.h"
 
@@ -92,7 +93,9 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMu
 
 void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bool expect, const std::string& message)
 {
-    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0)) == expect, message);
+    ScriptError err;
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0), &err) == expect, message);
+    BOOST_CHECK_MESSAGE(expect == (err == SCRIPT_ERR_OK), std::string(ScriptErrorString(err)) + ": " + message);
 }
 
 void static NegateSignatureS(std::vector<unsigned char>& vchSig) {
@@ -590,20 +593,25 @@ BOOST_AUTO_TEST_CASE(script_PushData)
     static const unsigned char pushdata2[] = { OP_PUSHDATA2, 1, 0, 0x5a };
     static const unsigned char pushdata4[] = { OP_PUSHDATA4, 1, 0, 0, 0, 0x5a };
 
+    ScriptError err;
     vector<vector<unsigned char> > directStack;
-    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), true, BaseSignatureChecker()));
+    BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), true, BaseSignatureChecker(), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     vector<vector<unsigned char> > pushdata1Stack;
-    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), true, BaseSignatureChecker()));
+    BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), true, BaseSignatureChecker(), &err));
     BOOST_CHECK(pushdata1Stack == directStack);
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     vector<vector<unsigned char> > pushdata2Stack;
-    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), true, BaseSignatureChecker()));
+    BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), true, BaseSignatureChecker(), &err));
     BOOST_CHECK(pushdata2Stack == directStack);
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     vector<vector<unsigned char> > pushdata4Stack;
-    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), true, BaseSignatureChecker()));
+    BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), true, BaseSignatureChecker(), &err));
     BOOST_CHECK(pushdata4Stack == directStack);
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 }
 
 CScript
@@ -640,6 +648,7 @@ sign_multisig(CScript scriptPubKey, const CKey &key, CTransaction transaction)
 
 BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
 {
+    ScriptError err;
     CKey key1, key2, key3;
     key1.MakeNewKey(true);
     key2.MakeNewKey(false);
@@ -652,19 +661,24 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     CMutableTransaction txTo12 = BuildSpendingTransaction(CScript(), txFrom12);
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     txTo12.vout[0].nValue = 2;
-    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
+    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0)));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 }
 
 BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
 {
+    ScriptError err;
     CKey key1, key2, key3, key4;
     key1.MakeNewKey(true);
     key2.MakeNewKey(false);
@@ -680,46 +694,55 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
     CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key3);
     CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key3);
     CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
     CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
     CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
     CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
     CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
     CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear(); // Must have signatures
     CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, SignatureChecker(txTo23, 0)));
+    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 }    
 
 BOOST_AUTO_TEST_CASE(script_combineSigs)
@@ -833,11 +856,13 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
 
 BOOST_AUTO_TEST_CASE(script_standard_push)
 {
+    ScriptError err;
     for (int i=0; i<67000; i++) {
         CScript script;
         script << i;
         BOOST_CHECK_MESSAGE(script.IsPushOnly(), "Number " << i << " is not pure push.");
-        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker()), "Number " << i << " push is not minimal data.");
+        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker(), &err), "Number " << i << " push is not minimal data.");
+        BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     }
 
     for (unsigned int i=0; i<=MAX_SCRIPT_ELEMENT_SIZE; i++) {
@@ -845,7 +870,8 @@ BOOST_AUTO_TEST_CASE(script_standard_push)
         CScript script;
         script << data;
         BOOST_CHECK_MESSAGE(script.IsPushOnly(), "Length " << i << " is not pure push.");
-        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker()), "Length " << i << " push is not minimal data.");
+        BOOST_CHECK_MESSAGE(VerifyScript(script, CScript() << OP_1, SCRIPT_VERIFY_MINIMALDATA, BaseSignatureChecker(), &err), "Length " << i << " push is not minimal data.");
+        BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     }
 }
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index d4c9b1a0ea07..bf3a60c04f55 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -10,6 +10,7 @@
 #include "keystore.h"
 #include "main.h"
 #include "script/script.h"
+#include "script/script_error.h"
 #include "core_io.h"
 
 #include <map>
@@ -86,6 +87,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
     // verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
     Array tests = read_json(std::string(json_tests::tx_valid, json_tests::tx_valid + sizeof(json_tests::tx_valid)));
 
+    ScriptError err;
     BOOST_FOREACH(Value& tv, tests)
     {
         Array test = tv.get_array();
@@ -142,8 +144,9 @@ BOOST_AUTO_TEST_CASE(tx_valid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                                 verify_flags, SignatureChecker(tx, i)),
+                                                 verify_flags, SignatureChecker(tx, i), &err),
                                     strTest);
+                BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
             }
         }
     }
@@ -160,6 +163,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
     // verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
     Array tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid)));
 
+    ScriptError err;
     BOOST_FOREACH(Value& tv, tests)
     {
         Array test = tv.get_array();
@@ -215,10 +219,10 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                      verify_flags, SignatureChecker(tx, i));
+                                      verify_flags, SignatureChecker(tx, i), &err);
             }
-
             BOOST_CHECK_MESSAGE(!fValid, strTest);
+            BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err));
         }
     }
 }

From 7335ca1a057c49c1c921af0c93b4ea7eeecb9e3f Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 16 Nov 2014 01:07:09 +0100
Subject: [PATCH 1013/1819] [Qt] Fix height of BitcoinAmountField

---
 src/qt/bitcoinamountfield.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 6e35bf17b3d5..2c100337d24b 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -130,6 +130,7 @@ class AmountSpinBox: public QAbstractSpinBox
             extra += hint - style()->subControlRect(QStyle::CC_SpinBox, &opt,
                                                     QStyle::SC_SpinBoxEditField, this).size();
             hint += extra;
+            hint.setHeight(h);
 
             opt.rect = rect();
 

From 6c8c704bb43e6bb78a1162468a9075da366e0007 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 14 Nov 2014 15:04:46 +0100
Subject: [PATCH 1014/1819] [docs] Add mini-"howto" using Qt Creator (osx)

---
 doc/build-osx.md | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index dc55f8259e07..f07c58fd1741 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -85,6 +85,22 @@ After exiting, you'll get a warning that the install is keg-only, which means it
 
         make install
 
+Use Qt Creator as IDE
+------------------------
+You can use Qt Creator as IDE, for debugging and for manipulating forms, etc.
+Download Qt Creator from http://www.qt.io/download/. Download the "community edition" and only install Qt Creator (uncheck the rest during the installation process).
+
+1. Make sure you installed everything through homebrew mentioned above 
+2. Do a proper ./configure --with-gui=qt5 --enable-debug
+3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
+4. Enter "bitcoin-qt" as project name, enter src/qt as location
+5. Leave the file selection as it is
+6. Confirm the "summary page"
+7. In the "Projects" tab select "Manage Kits..."
+8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
+9. Select LLDB as debugger (you might need to set the path to your installtion)
+10. Start debugging with Qt Creator
+
 Creating a release build
 ------------------------
 You can ignore this section if you are building `bitcoind` for your own use.

From 5617267cd5dde76848e902bd436a9d21330c6cce Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Sun, 16 Nov 2014 22:02:21 +0800
Subject: [PATCH 1015/1819] Fix typo in listreceivedbyaddress and listaccounts 
 help text

---
 src/rpcwallet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index f2b5e2061ef7..4d9e5ea137d3 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1067,7 +1067,7 @@ Value listreceivedbyaddress(const Array& params, bool fHelp)
             "\nList balances by receiving address.\n"
             "\nArguments:\n"
             "1. minconf       (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
-            "2. includeempty  (numeric, optional, dafault=false) Whether to include addresses that haven't received any payments.\n"
+            "2. includeempty  (numeric, optional, default=false) Whether to include addresses that haven't received any payments.\n"
             "3. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n"
 
             "\nResult:\n"
@@ -1335,7 +1335,7 @@ Value listaccounts(const Array& params, bool fHelp)
             "listaccounts ( minconf includeWatchonly)\n"
             "\nReturns Object that has account names as keys, account balances as values.\n"
             "\nArguments:\n"
-            "1. minconf          (numeric, optional, default=1) Only onclude transactions with at least this many confirmations\n"
+            "1. minconf          (numeric, optional, default=1) Only include transactions with at least this many confirmations\n"
             "2. includeWatchonly (bool, optional, default=false) Include balances in watchonly addresses (see 'importaddress')\n"
             "\nResult:\n"
             "{                      (json object where keys are account names, and values are numeric balances\n"

From 4ff81d60929df67817a2f3d5d25af3c847e7f24c Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 16 Nov 2014 17:16:14 +0000
Subject: [PATCH 1016/1819] Bugfix: Clarify coin control dialog labels

---
 src/qt/forms/coincontroldialog.ui | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index cbe58fec65c6..bc50d738372a 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -11,7 +11,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Coin Control Address Selection</string>
+   <string>Coin Selection</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
@@ -451,12 +451,12 @@
      </column>
      <column>
       <property name="text">
-       <string notr="true">Label</string>
+       <string>Received with label</string>
       </property>
      </column>
      <column>
       <property name="text">
-       <string>Address</string>
+       <string>Received with address</string>
       </property>
      </column>
      <column>

From 5d60b694e95fe20b1f3f56ec8bfa55ab8c11bcb6 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 16 Nov 2014 17:27:19 +0000
Subject: [PATCH 1017/1819] Coin Control: Make list mode default

---
 src/qt/forms/coincontroldialog.ui | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index bc50d738372a..c1fef6b9b171 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -379,9 +379,6 @@
           <property name="text">
            <string>Tree mode</string>
           </property>
-          <property name="checked">
-           <bool>true</bool>
-          </property>
          </widget>
         </item>
         <item>
@@ -395,6 +392,9 @@
           <property name="text">
            <string>List mode</string>
           </property>
+          <property name="checked">
+           <bool>true</bool>
+          </property>
          </widget>
         </item>
         <item>

From 7ab43583b04a21655e000c35316f7be6622bae88 Mon Sep 17 00:00:00 2001
From: Christian von Roques <roques@mti.ag>
Date: Sun, 16 Nov 2014 13:02:52 -0400
Subject: [PATCH 1018/1819] Update bash-completion for v0.10

* Support new rpc commands.
* Several commands now take an optional boolean includeWatchonly argument.
* "help" now has section headers, ignore them when compiling list of commands.
---
 contrib/bitcoind.bash-completion | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/contrib/bitcoind.bash-completion b/contrib/bitcoind.bash-completion
index 03ef173c09eb..37ece258996a 100644
--- a/contrib/bitcoind.bash-completion
+++ b/contrib/bitcoind.bash-completion
@@ -39,6 +39,10 @@ _bitcoind() {
 
     if ((cword > 4)); then
         case ${words[cword-4]} in
+            listtransactions)
+                COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
+                return 0
+                ;;
             signrawtransaction)
                 COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
                 return 0
@@ -52,7 +56,7 @@ _bitcoind() {
                 _bitcoin_accounts
                 return 0
                 ;;
-            gettxout|importprivkey)
+            getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
                 COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
                 return 0
                 ;;
@@ -65,7 +69,7 @@ _bitcoind() {
                 COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) )
                 return 0
                 ;;
-            getblock|getrawtransaction|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
+            getblock|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction)
                 COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
                 return 0
                 ;;
@@ -115,7 +119,7 @@ _bitcoind() {
 
             # only parse help if senseful
             if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
-                commands=$(_bitcoin_rpc help 2>/dev/null | awk '{ print $1; }')
+                commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
             fi
 
             COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )

From 7329fdd1bae6793fb505994ccd241eca2afc3841 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Mon, 17 Nov 2014 10:29:09 +0800
Subject: [PATCH 1019/1819] Update comments in txmempool to be doxygen
 compatible

Fix typo in Read() error message
---
 src/txmempool.cpp | 38 ++++++++++++++++++++++++--------------
 src/txmempool.h   | 44 +++++++++++++++++++++++---------------------
 2 files changed, 47 insertions(+), 35 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index b5070d5104a4..e13f1cc350f5 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "txmempool.h"
@@ -45,9 +45,9 @@ CTxMemPoolEntry::GetPriority(unsigned int currentHeight) const
     return dResult;
 }
 
-//
-// Keep track of fee/priority for transactions confirmed within N blocks
-//
+/**
+ * Keep track of fee/priority for transactions confirmed within N blocks
+ */
 class CBlockAverage
 {
 private:
@@ -86,8 +86,10 @@ class CBlockAverage
         return prioritySamples.size();
     }
 
-    // Used as belt-and-suspenders check when reading to detect
-    // file corruption
+    /**
+     * Used as belt-and-suspenders check when reading to detect
+     * file corruption
+     */
     bool AreSane(const std::vector<CFeeRate>& vecFee, const CFeeRate& minRelayFee)
     {
         BOOST_FOREACH(CFeeRate fee, vecFee)
@@ -139,16 +141,20 @@ class CBlockAverage
 class CMinerPolicyEstimator
 {
 private:
-    // Records observed averages transactions that confirmed within one block, two blocks,
-    // three blocks etc.
+    /**
+     * Records observed averages transactions that confirmed within one block, two blocks,
+     * three blocks etc.
+     */
     std::vector<CBlockAverage> history;
     std::vector<CFeeRate> sortedFeeSamples;
     std::vector<double> sortedPrioritySamples;
 
     int nBestSeenHeight;
 
-    // nBlocksAgo is 0 based, i.e. transactions that confirmed in the highest seen block are
-    // nBlocksAgo == 0, transactions in the block before that are nBlocksAgo == 1 etc.
+    /**
+     * nBlocksAgo is 0 based, i.e. transactions that confirmed in the highest seen block are
+     * nBlocksAgo == 0, transactions in the block before that are nBlocksAgo == 1 etc.
+     */
     void seenTxConfirm(const CFeeRate& feeRate, const CFeeRate& minRelayFee, double dPriority, int nBlocksAgo)
     {
         // Last entry records "everything else".
@@ -248,7 +254,9 @@ class CMinerPolicyEstimator
         }
     }
 
-    // Can return CFeeRate(0) if we don't have any data for that many blocks back. nBlocksToConfirm is 1 based.
+    /**
+     * Can return CFeeRate(0) if we don't have any data for that many blocks back. nBlocksToConfirm is 1 based.
+     */
     CFeeRate estimateFee(int nBlocksToConfirm)
     {
         nBlocksToConfirm--;
@@ -332,7 +340,7 @@ class CMinerPolicyEstimator
         size_t numEntries;
         filein >> numEntries;
         if (numEntries <= 0 || numEntries > 10000)
-            throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entires.");
+            throw runtime_error("Corrupt estimates file. Must have between 1 and 10k entries.");
 
         std::vector<CBlockAverage> fileHistory;
         
@@ -462,7 +470,9 @@ void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>
     }
 }
 
-// Called when a block is connected. Removes from mempool and updates the miner fee estimator.
+/**
+ * Called when a block is connected. Removes from mempool and updates the miner fee estimator.
+ */
 void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
                                 std::list<CTransaction>& conflicts)
 {
diff --git a/src/txmempool.h b/src/txmempool.h
index 2ec80cb86090..0d3c8bba6a2c 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_TXMEMPOOL_H
@@ -25,19 +25,19 @@ inline bool AllowFree(double dPriority)
 /** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */
 static const unsigned int MEMPOOL_HEIGHT = 0x7FFFFFFF;
 
-/*
+/**
  * CTxMemPool stores these:
  */
 class CTxMemPoolEntry
 {
 private:
     CTransaction tx;
-    CAmount nFee; // Cached to avoid expensive parent-transaction lookups
-    size_t nTxSize; // ... and avoid recomputing tx size
-    size_t nModSize; // ... and modified size for priority
-    int64_t nTime; // Local time when entering the mempool
-    double dPriority; // Priority when entering the mempool
-    unsigned int nHeight; // Chain height when entering the mempool
+    CAmount nFee; //! Cached to avoid expensive parent-transaction lookups
+    size_t nTxSize; //! ... and avoid recomputing tx size
+    size_t nModSize; //! ... and modified size for priority
+    int64_t nTime; //! Local time when entering the mempool
+    double dPriority; //! Priority when entering the mempool
+    unsigned int nHeight; //! Chain height when entering the mempool
 
 public:
     CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
@@ -68,7 +68,7 @@ class CInPoint
     bool IsNull() const { return (ptx == NULL && n == (uint32_t) -1); }
 };
 
-/*
+/**
  * CTxMemPool stores valid-according-to-the-current-best-chain
  * transactions that may be included in the next block.
  *
@@ -81,12 +81,12 @@ class CInPoint
 class CTxMemPool
 {
 private:
-    bool fSanityCheck; // Normally false, true if -checkmempool or -regtest
+    bool fSanityCheck; //! Normally false, true if -checkmempool or -regtest
     unsigned int nTransactionsUpdated;
     CMinerPolicyEstimator* minerPolicyEstimator;
 
-    CFeeRate minRelayFee; // Passed to constructor to avoid dependency on main
-    uint64_t totalTxSize; // sum of all mempool tx' byte sizes
+    CFeeRate minRelayFee; //! Passed to constructor to avoid dependency on main
+    uint64_t totalTxSize; //! sum of all mempool tx' byte sizes
 
 public:
     mutable CCriticalSection cs;
@@ -97,7 +97,7 @@ class CTxMemPool
     CTxMemPool(const CFeeRate& _minRelayFee);
     ~CTxMemPool();
 
-    /*
+    /**
      * If sanity-checking is turned on, check makes sure the pool is
      * consistent (does not contain two transactions that spend the same inputs,
      * all inputs are in the mapNextTx array). If sanity-checking is turned off,
@@ -141,19 +141,21 @@ class CTxMemPool
 
     bool lookup(uint256 hash, CTransaction& result) const;
 
-    // Estimate fee rate needed to get into the next
-    // nBlocks
+    /** Estimate fee rate needed to get into the next nBlocks */
     CFeeRate estimateFee(int nBlocks) const;
-    // Estimate priority needed to get into the next
-    // nBlocks
+
+    /** Estimate priority needed to get into the next nBlocks */
     double estimatePriority(int nBlocks) const;
-    // Write/Read estimates to disk
+    
+    /** Write/Read estimates to disk */
     bool WriteFeeEstimates(CAutoFile& fileout) const;
     bool ReadFeeEstimates(CAutoFile& filein);
 };
 
-/** CCoinsView that brings transactions from a memorypool into view.
-    It does not check for spendings by memory pool transactions. */
+/** 
+ * CCoinsView that brings transactions from a memorypool into view.
+ * It does not check for spendings by memory pool transactions.
+ */
 class CCoinsViewMemPool : public CCoinsViewBacked
 {
 protected:

From c63a73d18aa60207790f24b9a910fd45eb3afaa3 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Mon, 17 Nov 2014 11:04:01 +0800
Subject: [PATCH 1020/1819] Update comments in util to be doxygen compatible

---
 src/util.cpp             | 48 ++++++++++++++++++++++++----------------
 src/util.h               | 37 ++++++++++++++++++-------------
 src/utilmoneystr.cpp     |  2 +-
 src/utilmoneystr.h       |  2 +-
 src/utilstrencodings.cpp |  8 ++++---
 src/utilstrencodings.h   |  9 ++++----
 src/utiltime.cpp         | 13 ++++++-----
 src/utiltime.h           |  2 +-
 8 files changed, 72 insertions(+), 49 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 0f5c03635236..0cdf4e614d8d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
@@ -105,7 +105,7 @@ bool fLogTimestamps = false;
 bool fLogIPs = false;
 volatile bool fReopenDebugLog = false;
 
-// Init OpenSSL library multithreading support
+/** Init OpenSSL library multithreading support */
 static CCriticalSection** ppmutexOpenSSL;
 void locking_callback(int mode, int i, const char* file, int line)
 {
@@ -149,18 +149,22 @@ class CInit
 }
 instance_of_cinit;
 
-// LogPrintf() has been broken a couple of times now
-// by well-meaning people adding mutexes in the most straightforward way.
-// It breaks because it may be called by global destructors during shutdown.
-// Since the order of destruction of static/global objects is undefined,
-// defining a mutex as a global object doesn't work (the mutex gets
-// destroyed, and then some later destructor calls OutputDebugStringF,
-// maybe indirectly, and you get a core dump at shutdown trying to lock
-// the mutex).
+/**
+ * LogPrintf() has been broken a couple of times now
+ * by well-meaning people adding mutexes in the most straightforward way.
+ * It breaks because it may be called by global destructors during shutdown.
+ * Since the order of destruction of static/global objects is undefined,
+ * defining a mutex as a global object doesn't work (the mutex gets
+ * destroyed, and then some later destructor calls OutputDebugStringF,
+ * maybe indirectly, and you get a core dump at shutdown trying to lock
+ * the mutex).
+ */
 
 static boost::once_flag debugPrintInitFlag = BOOST_ONCE_INIT;
-// We use boost::call_once() to make sure these are initialized
-// in a thread-safe manner the first time called:
+/**
+ * We use boost::call_once() to make sure these are initialized
+ * in a thread-safe manner the first time called:
+ */
 static FILE* fileout = NULL;
 static boost::mutex* mutexDebugLog = NULL;
 
@@ -500,9 +504,11 @@ bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
 #endif /* WIN32 */
 }
 
-// Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
-// Specifically handles case where path p exists, but it wasn't possible for the user to
-// write to the parent directory.
+/**
+ * Ignores exceptions thrown by Boost's create_directory if the requested directory exists.
+ * Specifically handles case where path p exists, but it wasn't possible for the user to
+ * write to the parent directory.
+ */
 bool TryCreateDirectory(const boost::filesystem::path& p)
 {
     try
@@ -542,8 +548,10 @@ bool TruncateFile(FILE *file, unsigned int length) {
 #endif
 }
 
-// this function tries to raise the file descriptor limit to the requested number.
-// It returns the actual file descriptor limit (which may be more or less than nMinFD)
+/**
+ * this function tries to raise the file descriptor limit to the requested number.
+ * It returns the actual file descriptor limit (which may be more or less than nMinFD)
+ */
 int RaiseFileDescriptorLimit(int nMinFD) {
 #if defined(WIN32)
     return 2048;
@@ -563,8 +571,10 @@ int RaiseFileDescriptorLimit(int nMinFD) {
 #endif
 }
 
-// this function tries to make a particular range of a file allocated (corresponding to disk space)
-// it is advisory, and the range specified in the arguments will never contain live data
+/**
+ * this function tries to make a particular range of a file allocated (corresponding to disk space)
+ * it is advisory, and the range specified in the arguments will never contain live data
+ */
 void AllocateFileRange(FILE *file, unsigned int offset, unsigned int length) {
 #if defined(WIN32)
     // Windows-specific version
diff --git a/src/util.h b/src/util.h
index 4b2415278ba3..a4aaf29f914a 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 /**
@@ -40,25 +40,26 @@ extern volatile bool fReopenDebugLog;
 
 void SetupEnvironment();
 
-/* Return true if log accepts specified category */
+/** Return true if log accepts specified category */
 bool LogAcceptCategory(const char* category);
-/* Send a string to the log output */
+/** Send a string to the log output */
 int LogPrintStr(const std::string &str);
 
 #define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)
 
-/* When we switch to C++11, this can be switched to variadic templates instead
+/**
+ * When we switch to C++11, this can be switched to variadic templates instead
  * of this macro-based construction (see tinyformat.h).
  */
 #define MAKE_ERROR_AND_LOG_FUNC(n)                                        \
-    /*   Print to debug.log if -debug=category switch is given OR category is NULL. */ \
+    /**   Print to debug.log if -debug=category switch is given OR category is NULL. */ \
     template<TINYFORMAT_ARGTYPES(n)>                                          \
     static inline int LogPrint(const char* category, const char* format, TINYFORMAT_VARARGS(n))  \
     {                                                                         \
         if(!LogAcceptCategory(category)) return 0;                            \
         return LogPrintStr(tfm::format(format, TINYFORMAT_PASSARGS(n))); \
     }                                                                         \
-    /*   Log error and return false */                                        \
+    /**   Log error and return false */                                        \
     template<TINYFORMAT_ARGTYPES(n)>                                          \
     static inline bool error(const char* format, TINYFORMAT_VARARGS(n))                     \
     {                                                                         \
@@ -68,7 +69,8 @@ int LogPrintStr(const std::string &str);
 
 TINYFORMAT_FOREACH_ARGNUM(MAKE_ERROR_AND_LOG_FUNC)
 
-/* Zero-arg versions of logging and error, these are not covered by
+/**
+ * Zero-arg versions of logging and error, these are not covered by
  * TINYFORMAT_FOREACH_ARGNUM
  */
 static inline int LogPrint(const char* category, const char* format)
@@ -162,13 +164,15 @@ bool SoftSetBoolArg(const std::string& strArg, bool fValue);
 void SetThreadPriority(int nPriority);
 void RenameThread(const char* name);
 
-// Standard wrapper for do-something-forever thread functions.
-// "Forever" really means until the thread is interrupted.
-// Use it like:
-//   new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 900000));
-// or maybe:
-//    boost::function<void()> f = boost::bind(&FunctionWithArg, argument);
-//    threadGroup.create_thread(boost::bind(&LoopForever<boost::function<void()> >, "nothing", f, milliseconds));
+/**
+ * Standard wrapper for do-something-forever thread functions.
+ * "Forever" really means until the thread is interrupted.
+ * Use it like:
+ *   new boost::thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, 900000));
+ * or maybe:
+ *    boost::function<void()> f = boost::bind(&FunctionWithArg, argument);
+ *    threadGroup.create_thread(boost::bind(&LoopForever<boost::function<void()> >, "nothing", f, milliseconds));
+ */
 template <typename Callable> void LoopForever(const char* name,  Callable func, int64_t msecs)
 {
     std::string s = strprintf("bitcoin-%s", name);
@@ -196,7 +200,10 @@ template <typename Callable> void LoopForever(const char* name,  Callable func,
         throw;
     }
 }
-// .. and a wrapper that just calls func once
+
+/**
+ * .. and a wrapper that just calls func once
+ */
 template <typename Callable> void TraceThread(const char* name,  Callable func)
 {
     std::string s = strprintf("bitcoin-%s", name);
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index 267a5b845c62..085adae85e90 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "utilmoneystr.h"
diff --git a/src/utilmoneystr.h b/src/utilmoneystr.h
index 65415afd3f31..6a153db5fa7e 100644
--- a/src/utilmoneystr.h
+++ b/src/utilmoneystr.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 /**
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index 15094e599912..a961b3c5cdc5 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "utilstrencodings.h"
@@ -14,8 +14,10 @@
 
 using namespace std;
 
-// safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
-// even possibly remotely dangerous like & or >
+/**
+ * safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
+ * even possibly remotely dangerous like & or >
+ */
 static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
 string SanitizeString(const string& str)
 {
diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h
index 0b8c1a17818a..0c0171b8944c 100644
--- a/src/utilstrencodings.h
+++ b/src/utilstrencodings.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 /**
@@ -19,7 +19,7 @@
 #define UEND(a)             ((unsigned char*)&((&(a))[1]))
 #define ARRAYLEN(array)     (sizeof(array)/sizeof((array)[0]))
 
-// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
+/** This is needed because the foreach macro can't get over the comma in pair<t1, t2> */
 #define PAIRTYPE(t1, t2)    std::pair<t1, t2>
 
 std::string SanitizeString(const std::string& str);
@@ -45,7 +45,7 @@ int atoi(const std::string& str);
 /**
  * Convert string to signed 32-bit integer with strict parse error feedback.
  * @returns true if the entire string could be parsed as valid integer,
- *   false if not the entire string could be parsed or when overflow or underflow occured.
+ *   false if not the entire string could be parsed or when overflow or underflow occurred.
  */
 bool ParseInt32(const std::string& str, int32_t *out);
 
@@ -74,7 +74,8 @@ inline std::string HexStr(const T& vch, bool fSpaces=false)
     return HexStr(vch.begin(), vch.end(), fSpaces);
 }
 
-/** Format a paragraph of text to a fixed width, adding spaces for
+/** 
+ * Format a paragraph of text to a fixed width, adding spaces for
  * indentation to any added line.
  */
 std::string FormatParagraph(const std::string in, size_t width=79, size_t indent=0);
diff --git a/src/utiltime.cpp b/src/utiltime.cpp
index 78f0342cbab3..9c137e8aa0a6 100644
--- a/src/utiltime.cpp
+++ b/src/utiltime.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
@@ -14,7 +14,7 @@
 
 using namespace std;
 
-static int64_t nMockTime = 0;  // For unit testing
+static int64_t nMockTime = 0;  //! For unit testing
 
 int64_t GetTime()
 {
@@ -42,9 +42,12 @@ int64_t GetTimeMicros()
 
 void MilliSleep(int64_t n)
 {
-// Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
-// until fixed in 1.52. Use the deprecated sleep method for the broken case.
-// See: https://svn.boost.org/trac/boost/ticket/7238
+
+/**
+ * Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
+ * until fixed in 1.52. Use the deprecated sleep method for the broken case.
+ * See: https://svn.boost.org/trac/boost/ticket/7238
+ */
 #if defined(HAVE_WORKING_BOOST_SLEEP_FOR)
     boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
 #elif defined(HAVE_WORKING_BOOST_SLEEP)
diff --git a/src/utiltime.h b/src/utiltime.h
index 6f82e5a836fc..9d7d42fe473b 100644
--- a/src/utiltime.h
+++ b/src/utiltime.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_UTILTIME_H

From 409e9ef04cae479cda547500dfb1937633275b49 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Mon, 10 Nov 2014 13:25:51 +0100
Subject: [PATCH 1021/1819] [OSX, docs] update some release build informations

- switching release builds to 10.7
- release binary looks like 64bit only
- tested up to 10.10
- gitian builder builds against 10.7. The docs should be consistant.
- remove 32bit text because nowadays it's obvious to support 64bit only on OSX.
---
 doc/README_osx.txt | 8 --------
 doc/build-osx.md   | 7 +++----
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/doc/README_osx.txt b/doc/README_osx.txt
index 2be56c15926c..8831649bd8cd 100644
--- a/doc/README_osx.txt
+++ b/doc/README_osx.txt
@@ -20,14 +20,6 @@ https://github.com/mingwandroid/toolchain4
 In order to build a working toolchain, the following source packages are needed
 from Apple: cctools, dyld, and ld64.
 
-Beware. This part is ugly. Very very very ugly. In the future, this should be
-broken out into a new repository and cleaned up. Additionally, the binaries
-only work when built as x86 and not x86_64. This is an especially nasty
-limitation because it must be linked with the toolchain's libLTO.so, meaning
-that the entire toolchain must be x86. Gitian x86_64 should not be used until
-this has been fixed, because it would mean that several native dependencies
-(openssl, libuuid, etc) would need to be built as x86 first.
-
 These tools inject timestamps by default, which produce non-deterministic
 binaries. The ZERO_AR_DATE environment variable is used to disable that.
 
diff --git a/doc/build-osx.md b/doc/build-osx.md
index dc55f8259e07..c79c1317b095 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -5,8 +5,7 @@ This guide will show you how to build bitcoind(headless client) for OSX.
 Notes
 -----
 
-* Tested on OS X 10.6 through 10.9 on 64-bit Intel processors only.
-Older OSX releases or 32-bit processors are no longer supported.
+* Tested on OS X 10.7 through 10.10 on 64-bit Intel processors only.
 
 * All of the commands should be executed in a Terminal application. The
 built-in one is located in `/Applications/Utilities`.
@@ -96,9 +95,9 @@ as follows for maximum compatibility:
 
 All dependencies should be compiled with these flags:
 
- -mmacosx-version-min=10.6
+ -mmacosx-version-min=10.7
  -arch x86_64
- -isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
+ -isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
 
 Once dependencies are compiled, see release-process.md for how the Bitcoin-Qt.app
 bundle is packaged and signed to create the .dmg disk image that is distributed.

From 6093aa1bb03b03331cc2f48d8f6b749f8817c016 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Mon, 17 Nov 2014 15:51:33 +0100
Subject: [PATCH 1022/1819] [Qt, OSX] QProgressBar CPU-Issue workaround

fixes #5295
---
 src/qt/bitcoingui.cpp | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 450b83a8c63e..06e53ea1e6a6 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -58,6 +58,20 @@
 #include <QUrlQuery>
 #endif
 
+#ifdef Q_OS_MAC
+#include <QEvent>
+
+// workaround for Qt OSX Bug:
+// https://bugreports.qt-project.org/browse/QTBUG-15631
+// QProgressBar uses around 10% CPU even when app is in background
+class QProgressBarMac : public QProgressBar
+{
+    bool event(QEvent *e) {
+        return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false;
+    }
+};
+#endif
+
 const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
 
 BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
@@ -190,7 +204,11 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     // Progress bar and label for blocks download
     progressBarLabel = new QLabel();
     progressBarLabel->setVisible(false);
+#ifdef Q_OS_MAC
+    progressBar = new QProgressBarMac();
+#else
     progressBar = new QProgressBar();
+#endif
     progressBar->setAlignment(Qt::AlignCenter);
     progressBar->setVisible(false);
 

From a8b2ce557dbcee5e75001be0ec3aecf06165775f Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 12 Nov 2014 18:59:41 -0500
Subject: [PATCH 1023/1819] regression test only setmocktime RPC call

---
 src/rpcclient.cpp |  1 +
 src/rpcmisc.cpp   | 20 ++++++++++++++++++++
 src/rpcserver.cpp |  1 +
 src/rpcserver.h   |  1 +
 4 files changed, 23 insertions(+)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index a9c491cede2a..7a1f1918f634 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -25,6 +25,7 @@ class CRPCConvertParam
 static const CRPCConvertParam vRPCConvertParams[] =
 {
     { "stop", 0 },
+    { "setmocktime", 0 },
     { "getaddednodeinfo", 0 },
     { "setgenerate", 0 },
     { "setgenerate", 1 },
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 08e956c96112..31eaae616288 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -354,3 +354,23 @@ Value verifymessage(const Array& params, bool fHelp)
 
     return (pubkey.GetID() == keyID);
 }
+
+Value setmocktime(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "setmocktime timestamp\n"
+            "\nSet the local time to given timestamp (-regtest only)\n"
+            "\nArguments:\n"
+            "1. timestamp  (integer, required) Unix seconds-since-epoch timestamp\n"
+            "   Pass 0 to go back to using the system time."
+        );
+
+    if (!Params().MineBlocksOnDemand())
+        throw runtime_error("setmocktime for regression testing (-regtest mode) only");
+
+    RPCTypeCheck(params, boost::assign::list_of(int_type));
+    SetMockTime(params[0].get_int64());
+
+    return Value::null;
+}
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index cc80887ba4dc..709e9e94020d 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -246,6 +246,7 @@ static const CRPCCommand vRPCCommands[] =
     { "control",            "getinfo",                &getinfo,                true,      false,      false }, /* uses wallet if enabled */
     { "control",            "help",                   &help,                   true,      true,       false },
     { "control",            "stop",                   &stop,                   true,      true,       false },
+    { "control",            "setmocktime",            &setmocktime,            true,      false,      false },
 
     /* P2P networking */
     { "network",            "getnetworkinfo",         &getnetworkinfo,         true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 2a258dd89a91..9a0681bfa30c 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -194,6 +194,7 @@ extern json_spirit::Value getinfo(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getwalletinfo(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getblockchaininfo(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getnetworkinfo(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value setmocktime(const json_spirit::Array& params, bool fHelp);
 
 extern json_spirit::Value getrawtransaction(const json_spirit::Array& params, bool fHelp); // in rcprawtransaction.cpp
 extern json_spirit::Value listunspent(const json_spirit::Array& params, bool fHelp);

From daf03e7c92c155e3c9c010969192c60872af7bdb Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Thu, 13 Nov 2014 13:27:13 -0500
Subject: [PATCH 1024/1819] RPC tests: create initial chain with specific
 timestamps

Use setmocktime to create the initial block chain with
10-minute-apart-blocks starting 1 Jan 2014.
---
 qa/rpc-tests/util.py | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 0d5eeefa793e..c6d918a81cb0 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -103,12 +103,17 @@ def initialize_chain(test_dir):
 
         # Create a 200-block-long chain; each of the 4 nodes
         # gets 25 mature blocks and 25 immature.
-        for i in range(4):
-            rpcs[i].setgenerate(True, 25)
-            sync_blocks(rpcs)
-        for i in range(4):
-            rpcs[i].setgenerate(True, 25)
-            sync_blocks(rpcs)
+        # blocks are created with timestamps 10 minutes apart, starting
+        # at 1 Jan 2014
+        block_time = 1388534400
+        for i in range(2):
+            for peer in range(4):
+                for j in range(25):
+                    set_node_times(rpcs, block_time)
+                    rpcs[peer].setgenerate(True, 1)
+                    block_time += 10*60
+                # Must sync before next peer starts generating blocks
+                sync_blocks(rpcs)
 
         # Shut them down, and clean up cache directories:
         stop_nodes(rpcs)
@@ -179,10 +184,14 @@ def stop_node(node, i):
     del bitcoind_processes[i]
 
 def stop_nodes(nodes):
-    for i in range(len(nodes)):
-        nodes[i].stop()
+    for node in nodes:
+        node.stop()
     del nodes[:] # Emptying array closes connections as a side effect
 
+def set_node_times(nodes, t):
+    for node in nodes:
+        node.setmocktime(t)
+
 def wait_bitcoinds():
     # Wait for all bitcoinds to cleanly exit
     for bitcoind in bitcoind_processes.values():

From 3c30f27f342c15af17c6f7e160be5ee60f28194d Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 17 Nov 2014 14:08:08 -0500
Subject: [PATCH 1025/1819] travis: disable rpc tests for windows until they're
 not so flaky

---
 qa/pull-tester/rpc-tests.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index a0056c141b7f..0b5ad2064261 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -8,6 +8,11 @@ CURDIR=$(cd $(dirname "$0"); pwd)
 export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
 export BITCOIND=${REAL_BITCOIND}
 
+if [ "x${EXEEXT}" = "x.exe" ]; then
+  echo "Win tests currently disabled"
+  exit 0
+fi
+
 #Run the tests
 
 if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then

From 03914234b3c9c35d66b51d580fe727a0707394ca Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sun, 28 Sep 2014 21:17:36 -0400
Subject: [PATCH 1026/1819] Discourage NOPs reserved for soft-fork upgrades

NOP1 to NOP10 are reserved for future soft-fork upgrades. In the event
of an upgrade such NOPs have *VERIFY behavior, meaning that if their
arguments are not correct the script fails. Discouraging these NOPs by
rejecting transactions containing them from the mempool ensures that
we'll never accept transactions, nor mine blocks, with scripts that are
now invalid according to the majority of hashing power even if we're not
yet upgraded. Previously this wasn't an issue as the IsStandard() rules
didn't allow upgradable NOPs anyway, but 7f3b4e95 relaxed the
IsStandard() rules for P2SH redemptions allowing any redeemScript to be
spent.

We *do* allow upgradable NOPs in scripts so long as they are not
executed. This is harmless as there is no opportunity for the script to
be invalid post-upgrade.
---
 src/script/interpreter.cpp        |  6 ++++++
 src/script/interpreter.h          | 13 ++++++++++++-
 src/script/script_error.cpp       |  2 ++
 src/script/script_error.h         |  3 +++
 src/script/standard.h             |  3 ++-
 src/test/data/script_invalid.json | 17 +++++++++++++++++
 src/test/data/script_valid.json   |  5 +++++
 src/test/transaction_tests.cpp    |  3 ++-
 8 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index cf81fe30a291..760086eaba31 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -329,8 +329,14 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                 // Control
                 //
                 case OP_NOP:
+                break;
+
                 case OP_NOP1: case OP_NOP2: case OP_NOP3: case OP_NOP4: case OP_NOP5:
                 case OP_NOP6: case OP_NOP7: case OP_NOP8: case OP_NOP9: case OP_NOP10:
+                {
+                    if (flags & SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)
+                        return set_error(serror, SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS);
+                }
                 break;
 
                 case OP_IF:
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 14cccc558f32..12b271941420 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -57,7 +57,18 @@ enum
     // any other push causes the script to fail (BIP62 rule 3).
     // In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4).
     // (softfork safe)
-    SCRIPT_VERIFY_MINIMALDATA = (1U << 6)
+    SCRIPT_VERIFY_MINIMALDATA = (1U << 6),
+
+    // Discourage use of NOPs reserved for upgrades (NOP1-10)
+    //
+    // Provided so that nodes can avoid accepting or mining transactions
+    // containing executed NOP's whose meaning may change after a soft-fork,
+    // thus rendering the script invalid; with this flag set executing
+    // discouraged NOPs fails the script. This verification flag will never be
+    // a mandatory flag applied to scripts in a block. NOPs that are not
+    // executed, e.g.  within an unexecuted IF ENDIF block, are *not* rejected.
+    SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS  = (1U << 7)
+
 };
 
 uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType);
diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp
index 4a3df268ec8b..793fc0da417b 100644
--- a/src/script/script_error.cpp
+++ b/src/script/script_error.cpp
@@ -59,6 +59,8 @@ const char* ScriptErrorString(const ScriptError serror)
             return "Non-canonical signature: S value is unnecessarily high";
         case SCRIPT_ERR_SIG_NULLDUMMY:
             return "Dummy CHECKMULTISIG argument must be zero";
+        case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS:
+            return "NOPx reserved for soft-fork upgrades";
         case SCRIPT_ERR_UNKNOWN_ERROR:
         case SCRIPT_ERR_ERROR_COUNT:
         default: break;
diff --git a/src/script/script_error.h b/src/script/script_error.h
index ae6626b25739..21153f1bd1ce 100644
--- a/src/script/script_error.h
+++ b/src/script/script_error.h
@@ -43,6 +43,9 @@ typedef enum ScriptError_t
     SCRIPT_ERR_SIG_HIGH_S,
     SCRIPT_ERR_SIG_NULLDUMMY,
 
+    /* softfork safeness */
+    SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS,
+
     SCRIPT_ERR_ERROR_COUNT
 } ScriptError;
 
diff --git a/src/script/standard.h b/src/script/standard.h
index f3dcc75fdc82..c4b82b4c45ae 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -47,7 +47,8 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
 static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
                                                          SCRIPT_VERIFY_STRICTENC |
                                                          SCRIPT_VERIFY_MINIMALDATA |
-                                                         SCRIPT_VERIFY_NULLDUMMY;
+                                                         SCRIPT_VERIFY_NULLDUMMY |
+                                                         SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS;
 
 /** For convenience, standard but not mandatory verify flags. */
 static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS;
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 6f451a36eedf..0356d0be1c7f 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -163,6 +163,23 @@ nSequences are max.
 ["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 2 EQUAL", "P2SH,STRICTENC"],
 ["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_11' EQUAL", "P2SH,STRICTENC"],
 
+["Ensure 100% coverage of discouraged NOPS"],
+["1", "NOP1",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP2",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP3",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP4",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP5",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP6",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP7",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP8",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP9",  "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+["1", "NOP10", "P2SH,DISCOURAGE_UPGRADABLE_NOPS"],
+
+["NOP10", "1", "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in scriptSig"],
+
+["1 0x01 0xb9", "HASH160 0x14 0x15727299b05b45fdaf9ac9ecf7565cfe27c3e567 EQUAL",
+ "P2SH,DISCOURAGE_UPGRADABLE_NOPS", "Discouraged NOP10 in redeemScript"],
+
 ["0x50","1", "P2SH,STRICTENC", "opcode 0x50 is reserved"],
 ["1", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "opcodes above NOP10 invalid if executed"],
 ["1", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC"],
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 439c82ef3200..0cf15631630f 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -235,6 +235,11 @@ nSequences are max.
 ["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL", "P2SH,STRICTENC"],
 ["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL", "P2SH,STRICTENC"],
 
+["1", "NOP", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS", "Discourage NOPx flag allows OP_NOP"],
+
+["0", "IF NOP10 ENDIF 1", "P2SH,STRICTENC,DISCOURAGE_UPGRADABLE_NOPS",
+ "Discouraged NOPs are allowed if not executed"],
+
 ["0", "IF 0xba ELSE 1 ENDIF", "P2SH,STRICTENC", "opcodes above NOP10 invalid if executed"],
 ["0", "IF 0xbb ELSE 1 ENDIF", "P2SH,STRICTENC"],
 ["0", "IF 0xbc ELSE 1 ENDIF", "P2SH,STRICTENC"],
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index bf3a60c04f55..e939e8997259 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -37,7 +37,8 @@ static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
     (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
     (string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY)
     (string("MINIMALDATA"), (unsigned int)SCRIPT_VERIFY_MINIMALDATA)
-    (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY);
+    (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY)
+    (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS);
 
 unsigned int ParseScriptFlags(string strFlags)
 {

From a7f29410681b367620c780453b0abb9688831766 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Tue, 18 Nov 2014 10:55:55 +0100
Subject: [PATCH 1027/1819] [Qt, OSX] fix usage of osx 10.8+ user notification
 center

Currently Bitcoin-Qts support for OSX User Notification Center is broken. This pull will fix a known issue of non-official-apple-built apps having problems sending user notifications.
---
 src/qt/macnotificationhandler.mm | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm
index 8a4c94cc5c52..aa50a0d9fbb0 100644
--- a/src/qt/macnotificationhandler.mm
+++ b/src/qt/macnotificationhandler.mm
@@ -5,8 +5,21 @@
 #include "macnotificationhandler.h"
 
 #undef slots
+#import <objc/runtime.h>
 #include <Cocoa/Cocoa.h>
 
+// Add an obj-c category (extension) to return the expected bundle identifier
+@implementation NSBundle(returnCorrectIdentifier)
+- (NSString *)__bundleIdentifier
+{
+    if (self == [NSBundle mainBundle]) {
+        return @"org.bitcoinfoundation.Bitcoin-Qt";
+    } else {
+        return [self __bundleIdentifier];
+    }
+}
+@end
+
 void MacNotificationHandler::showNotification(const QString &title, const QString &text)
 {
     // check if users OS has support for NSUserNotification
@@ -63,7 +76,16 @@
 MacNotificationHandler *MacNotificationHandler::instance()
 {
     static MacNotificationHandler *s_instance = NULL;
-    if (!s_instance)
+    if (!s_instance) {
         s_instance = new MacNotificationHandler();
+        
+        Class aPossibleClass = objc_getClass("NSBundle");
+        if (aPossibleClass) {
+            // change NSBundle -bundleIdentifier method to return a correct bundle identifier
+            // a bundle identifier is required to use OSXs User Notification Center
+            method_exchangeImplementations(class_getInstanceMethod(aPossibleClass, @selector(bundleIdentifier)),
+                                           class_getInstanceMethod(aPossibleClass, @selector(__bundleIdentifier)));
+        }
+    }
     return s_instance;
 }

From 7715c847472f565ca79429db0d8505f126617878 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 18 Nov 2014 10:27:45 -0500
Subject: [PATCH 1028/1819] HTTP REST: minor fixes

1) const-ify internal helper ParseHashStr()

2) use HTTPError() helper when returning HTTP_NOT_FOUND
---
 src/rest.cpp      | 4 ++--
 src/rpcserver.cpp | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rest.cpp b/src/rest.cpp
index 48c1672ae862..89075887a0b1 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -56,7 +56,7 @@ static enum RetFormat ParseDataFormat(const string& format)
     return rf_names[0].rf;
 }
 
-static bool ParseHashStr(string& strReq, uint256& v)
+static bool ParseHashStr(const string& strReq, uint256& v)
 {
     if (!IsHex(strReq) || (strReq.size() != 64))
         return false;
@@ -195,7 +195,7 @@ bool HTTPReq_REST(AcceptedConnection *conn,
         return false;
     }
 
-    conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
+    conn->stream() << HTTPError(HTTP_NOT_FOUND, false) << std::flush;
     return false;
 }
 
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index d072f18e36de..8b042e60037c 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -957,7 +957,7 @@ void ServiceConnection(AcceptedConnection *conn)
                 break;
 
         } else {
-            conn->stream() << HTTPReply(HTTP_NOT_FOUND, "", false) << std::flush;
+            conn->stream() << HTTPError(HTTP_NOT_FOUND, false) << std::flush;
             break;
         }
     }

From e2f30d547f733ee33e7814ab500c08d12958e66a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 18 Nov 2014 16:30:51 +0100
Subject: [PATCH 1029/1819] Properly lock cs_main in rest_block

---
 src/rest.cpp | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/rest.cpp b/src/rest.cpp
index 89075887a0b1..9a8793a5173a 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -11,6 +11,7 @@
 #include "core/transaction.h"
 #include "version.h"
 #include "main.h"
+#include "sync.h"
 
 using namespace std;
 using namespace json_spirit;
@@ -80,13 +81,17 @@ static bool rest_block(AcceptedConnection *conn,
     if (!ParseHashStr(hashStr, hash))
         throw RESTERR(HTTP_BAD_REQUEST, "Invalid hash: " + hashStr);
 
-    if (mapBlockIndex.count(hash) == 0)
-        throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
-
     CBlock block;
-    CBlockIndex* pblockindex = mapBlockIndex[hash];
-    if (!ReadBlockFromDisk(block, pblockindex))
-        throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+    CBlockIndex* pblockindex = NULL;
+    {
+        LOCK(cs_main);
+        if (mapBlockIndex.count(hash) == 0)
+            throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+
+        pblockindex = mapBlockIndex[hash];
+        if (!ReadBlockFromDisk(block, pblockindex))
+            throw RESTERR(HTTP_NOT_FOUND, hashStr + " not found");
+    }
 
     CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION);
     ssBlock << block;

From 7a7e10913989aca949a2d42f29e3ffdcd14313f3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 18 Nov 2014 18:06:36 +0100
Subject: [PATCH 1030/1819] Delete src/secp256k1 before subtree import

---
 src/secp256k1/.empty | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 src/secp256k1/.empty

diff --git a/src/secp256k1/.empty b/src/secp256k1/.empty
deleted file mode 100644
index e69de29bb2d1..000000000000

From d48555b36ac512161b81f9b6bca7bea16a0cd806 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 18 Nov 2014 18:06:36 +0100
Subject: [PATCH 1031/1819] Squashed 'src/secp256k1/' content from commit
 ad2028f

git-subtree-dir: src/secp256k1
git-subtree-split: ad2028f9890ca40bdd32055aa0fe5c1c9af0e485
---
 .gitignore                                |   35 +
 .travis.yml                               |   25 +
 COPYING                                   |   19 +
 Makefile.am                               |   88 ++
 README.md                                 |   55 ++
 TODO                                      |    3 +
 autogen.sh                                |    3 +
 build-aux/m4/bitcoin_secp.m4              |   90 ++
 configure.ac                              |  259 +++++
 include/secp256k1.h                       |  252 +++++
 libsecp256k1.pc.in                        |   13 +
 nasm_lt.sh                                |   57 ++
 obj/.gitignore                            |    0
 src/bench_inv.c                           |   41 +
 src/bench_sign.c                          |   49 +
 src/bench_verify.c                        |   44 +
 src/ecdsa.h                               |   23 +
 src/ecdsa_impl.h                          |  183 ++++
 src/eckey.h                               |   25 +
 src/eckey_impl.h                          |  200 ++++
 src/ecmult.h                              |   19 +
 src/ecmult_gen.h                          |   19 +
 src/ecmult_gen_impl.h                     |  118 +++
 src/ecmult_impl.h                         |  222 +++++
 src/field.h                               |  114 +++
 src/field_10x26.h                         |   21 +
 src/field_10x26_impl.h                    |  884 +++++++++++++++++
 src/field_5x52.h                          |   21 +
 src/field_5x52_asm.asm                    |  469 +++++++++
 src/field_5x52_asm_impl.h                 |   13 +
 src/field_5x52_impl.h                     |  260 +++++
 src/field_5x52_int128_impl.h              |  279 ++++++
 src/field_gmp.h                           |   18 +
 src/field_gmp_impl.h                      |  163 ++++
 src/field_impl.h                          |  293 ++++++
 src/group.h                               |  128 +++
 src/group_impl.h                          |  519 ++++++++++
 src/java/org/bitcoin/NativeSecp256k1.java |   60 ++
 src/java/org_bitcoin_NativeSecp256k1.c    |   23 +
 src/java/org_bitcoin_NativeSecp256k1.h    |   21 +
 src/num.h                                 |  100 ++
 src/num_gmp.h                             |   20 +
 src/num_gmp_impl.h                        |  376 +++++++
 src/num_impl.h                            |   22 +
 src/scalar.h                              |   63 ++
 src/scalar_4x64.h                         |   17 +
 src/scalar_4x64_impl.h                    |  359 +++++++
 src/scalar_8x32.h                         |   17 +
 src/scalar_8x32_impl.h                    |  572 +++++++++++
 src/scalar_impl.h                         |  184 ++++
 src/secp256k1.c                           |  305 ++++++
 src/testrand.h                            |   26 +
 src/testrand_impl.h                       |   60 ++
 src/tests.c                               | 1080 +++++++++++++++++++++
 src/util.h                                |   64 ++
 55 files changed, 8393 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 .travis.yml
 create mode 100644 COPYING
 create mode 100644 Makefile.am
 create mode 100644 README.md
 create mode 100644 TODO
 create mode 100755 autogen.sh
 create mode 100644 build-aux/m4/bitcoin_secp.m4
 create mode 100644 configure.ac
 create mode 100644 include/secp256k1.h
 create mode 100644 libsecp256k1.pc.in
 create mode 100755 nasm_lt.sh
 create mode 100644 obj/.gitignore
 create mode 100644 src/bench_inv.c
 create mode 100644 src/bench_sign.c
 create mode 100644 src/bench_verify.c
 create mode 100644 src/ecdsa.h
 create mode 100644 src/ecdsa_impl.h
 create mode 100644 src/eckey.h
 create mode 100644 src/eckey_impl.h
 create mode 100644 src/ecmult.h
 create mode 100644 src/ecmult_gen.h
 create mode 100644 src/ecmult_gen_impl.h
 create mode 100644 src/ecmult_impl.h
 create mode 100644 src/field.h
 create mode 100644 src/field_10x26.h
 create mode 100644 src/field_10x26_impl.h
 create mode 100644 src/field_5x52.h
 create mode 100644 src/field_5x52_asm.asm
 create mode 100644 src/field_5x52_asm_impl.h
 create mode 100644 src/field_5x52_impl.h
 create mode 100644 src/field_5x52_int128_impl.h
 create mode 100644 src/field_gmp.h
 create mode 100644 src/field_gmp_impl.h
 create mode 100644 src/field_impl.h
 create mode 100644 src/group.h
 create mode 100644 src/group_impl.h
 create mode 100644 src/java/org/bitcoin/NativeSecp256k1.java
 create mode 100644 src/java/org_bitcoin_NativeSecp256k1.c
 create mode 100644 src/java/org_bitcoin_NativeSecp256k1.h
 create mode 100644 src/num.h
 create mode 100644 src/num_gmp.h
 create mode 100644 src/num_gmp_impl.h
 create mode 100644 src/num_impl.h
 create mode 100644 src/scalar.h
 create mode 100644 src/scalar_4x64.h
 create mode 100644 src/scalar_4x64_impl.h
 create mode 100644 src/scalar_8x32.h
 create mode 100644 src/scalar_8x32_impl.h
 create mode 100644 src/scalar_impl.h
 create mode 100644 src/secp256k1.c
 create mode 100644 src/testrand.h
 create mode 100644 src/testrand_impl.h
 create mode 100644 src/tests.c
 create mode 100644 src/util.h

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f0a54077a540
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,35 @@
+bench_inv
+bench_sign
+bench_verify
+tests
+*.exe
+*.so
+*.a
+!.gitignore
+
+Makefile
+configure
+.libs/
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.log
+config.status
+*.tar.gz
+*.la
+libtool
+.deps/
+.dirstamp
+build-aux/
+*.lo
+*.o
+*~
+src/libsecp256k1-config.h
+src/libsecp256k1-config.h.in
+m4/libtool.m4
+m4/ltoptions.m4
+m4/ltsugar.m4
+m4/ltversion.m4
+m4/lt~obsolete.m4
+src/stamp-h1
+libsecp256k1.pc
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..24a86b561b36
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,25 @@
+language: cpp
+compiler: gcc
+install:
+  - sudo apt-get install -qq libssl-dev
+  - if [ "$BIGNUM" = "gmp" -o "$BIGNUM" = "auto" -o "$FIELD" = "gmp" ]; then sudo apt-get install -qq libgmp-dev; fi
+  - if [ "$FIELD" = "64bit_asm" ]; then sudo apt-get install -qq yasm; fi
+env:
+  global:
+    - FIELD=auto  BIGNUM=auto  SCALAR=auto  ENDOMORPHISM=no  BUILD=check  EXTRAFLAGS=
+  matrix:
+    - SCALAR=32bit
+    - SCALAR=64bit
+    - FIELD=gmp
+    - FIELD=gmp       ENDOMORPHISM=yes
+    - FIELD=64bit_asm
+    - FIELD=64bit_asm ENDOMORPHISM=yes
+    - FIELD=64bit
+    - FIELD=64bit     ENDOMORPHISM=yes
+    - FIELD=32bit
+    - FIELD=32bit     ENDOMORPHISM=yes
+    - BUILD=distcheck
+    - EXTRAFLAGS=CFLAGS=-DDETERMINISTIC
+before_script: ./autogen.sh
+script: ./configure --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR $EXTRAFLAGS && make -j2 $BUILD
+os: linux
diff --git a/COPYING b/COPYING
new file mode 100644
index 000000000000..4522a5990e28
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Pieter Wuille
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 000000000000..d527da6b77f7
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,88 @@
+ACLOCAL_AMFLAGS = -I build-aux/m4
+
+lib_LTLIBRARIES = libsecp256k1.la
+if USE_ASM
+COMMON_LIB = libsecp256k1_common.la
+else
+COMMON_LIB =
+endif
+noinst_LTLIBRARIES = $(COMMON_LIB)
+include_HEADERS = include/secp256k1.h
+noinst_HEADERS =
+noinst_HEADERS += src/scalar.h
+noinst_HEADERS += src/scalar_4x64.h
+noinst_HEADERS += src/scalar_8x32.h
+noinst_HEADERS += src/scalar_impl.h
+noinst_HEADERS += src/scalar_4x64_impl.h
+noinst_HEADERS += src/scalar_8x32_impl.h
+noinst_HEADERS += src/group.h
+noinst_HEADERS += src/group_impl.h
+noinst_HEADERS += src/num_gmp.h
+noinst_HEADERS += src/num_gmp_impl.h
+noinst_HEADERS += src/ecdsa.h
+noinst_HEADERS += src/ecdsa_impl.h
+noinst_HEADERS += src/eckey.h
+noinst_HEADERS += src/eckey_impl.h
+noinst_HEADERS += src/ecmult.h
+noinst_HEADERS += src/ecmult_impl.h
+noinst_HEADERS += src/ecmult_gen.h
+noinst_HEADERS += src/ecmult_gen_impl.h
+noinst_HEADERS += src/num.h
+noinst_HEADERS += src/num_impl.h
+noinst_HEADERS += src/field_10x26.h
+noinst_HEADERS += src/field_10x26_impl.h
+noinst_HEADERS += src/field_5x52.h
+noinst_HEADERS += src/field_5x52_impl.h
+noinst_HEADERS += src/field_5x52_int128_impl.h
+noinst_HEADERS += src/field_5x52_asm_impl.h
+noinst_HEADERS += src/java/org_bitcoin_NativeSecp256k1.h
+noinst_HEADERS += src/util.h
+noinst_HEADERS += src/testrand.h
+noinst_HEADERS += src/testrand_impl.h
+noinst_HEADERS += src/field_gmp.h
+noinst_HEADERS += src/field_gmp_impl.h
+noinst_HEADERS += src/field.h
+noinst_HEADERS += src/field_impl.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libsecp256k1.pc
+
+if USE_ASM
+libsecp256k1_common_la_SOURCES = src/field_5x52_asm.asm
+endif
+
+libsecp256k1_la_SOURCES = src/secp256k1.c
+libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include $(SECP_INCLUDES)
+libsecp256k1_la_LIBADD = $(COMMON_LIB) $(SECP_LIBS)
+
+
+noinst_PROGRAMS =
+if USE_BENCHMARK
+noinst_PROGRAMS += bench_verify bench_sign bench_inv
+bench_verify_SOURCES = src/bench_verify.c
+bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS)
+bench_verify_LDFLAGS = -static
+bench_sign_SOURCES = src/bench_sign.c
+bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS)
+bench_sign_LDFLAGS = -static
+bench_inv_SOURCES = src/bench_inv.c
+bench_inv_LDADD = $(COMMON_LIB) $(SECP_LIBS)
+bench_inv_LDFLAGS = -static
+endif
+
+if USE_TESTS
+noinst_PROGRAMS += tests
+tests_SOURCES = src/tests.c
+tests_CPPFLAGS = -DVERIFY $(SECP_TEST_INCLUDES)
+tests_LDADD = $(COMMON_LIB) $(SECP_LIBS) $(SECP_TEST_LIBS)
+tests_LDFLAGS = -static
+TESTS = tests
+endif
+
+EXTRA_DIST = autogen.sh nasm_lt.sh
+
+#x86_64 only
+if USE_ASM
+.asm.lo:
+	$(LIBTOOL) --mode=compile --tag YASM $(srcdir)/nasm_lt.sh $(YASM) -f $(YASM_BINFMT) $(YAFLAGS) -I$(srcdir) -I. $< -o $@
+endif
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..1e49f4941660
--- /dev/null
+++ b/README.md
@@ -0,0 +1,55 @@
+libsecp256k1
+============
+
+[![Build Status](https://travis-ci.org/bitcoin/secp256k1.svg?branch=master)](https://travis-ci.org/bitcoin/secp256k1)
+
+Optimized C library for EC operations on curve secp256k1.
+
+This library is experimental, so use at your own risk.
+
+Features:
+* Low-level field and group operations on secp256k1.
+* ECDSA signing/verification and key generation.
+* Adding/multiplying private/public keys.
+* Serialization/parsing of private keys, public keys, signatures.
+* Very efficient implementation.
+
+Implementation details
+----------------------
+
+* General
+  * Avoid dynamic memory usage almost everywhere.
+* Field operations
+  * Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
+    * Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys).
+    * Using 10 26-bit limbs.
+    * Using GMP.
+  * Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman).
+* Scalar operations
+  * Optimized implementation without data-dependent branches of arithmetic modulo the curve's order.
+    * Using 4 64-bit limbs (relying on __int128 support in the compiler).
+    * Using 8 32-bit limbs.
+* Group operations
+  * Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7).
+  * Use addition between points in Jacobian and affine coordinates where possible.
+  * Use a unified addition/doubling formula where necessary to avoid data-dependent branches.
+* Point multiplication for verification (a*P + b*G).
+  * Use wNAF notation for point multiplicands.
+  * Use a much larger window for multiples of G, using precomputed multiples.
+  * Use Shamir's trick to do the multiplication with the public key and the generator simultaneously.
+  * Optionally use secp256k1's efficiently-computable endomorphism to split the multiplicands into 4 half-sized ones first.
+* Point multiplication for signing
+  * Use a precomputed table of multiples of powers of 16 multiplied with the generator, so general multiplication becomes a series of additions.
+  * Slice the precomputed table in memory per byte, so memory access to the table becomes uniform.
+  * No data-dependent branches
+  * The precomputed tables add and eventually subtract points for which no known scalar (private key) is known, preventing even an attacker with control over the private key used to control the data internally.
+
+Build steps
+-----------
+
+libsecp256k1 is built using autotools:
+
+    $ ./autogen.sh
+    $ ./configure
+    $ make
+    $ sudo make install  # optional
diff --git a/TODO b/TODO
new file mode 100644
index 000000000000..a300e1c5eb9b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,3 @@
+* Unit tests for fieldelem/groupelem, including ones intended to
+  trigger fieldelem's boundary cases.
+* Complete constant-time operations for signing/keygen
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 000000000000..65286b935303
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+set -e
+autoreconf -if --warnings=all
diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4
new file mode 100644
index 000000000000..e6f3470ed72a
--- /dev/null
+++ b/build-aux/m4/bitcoin_secp.m4
@@ -0,0 +1,90 @@
+dnl libsecp25k1 helper checks
+AC_DEFUN([SECP_INT128_CHECK],[
+has_int128=$ac_cv_type___int128
+if test x"$has_int128" != x"yes" && test x"$set_field" = x"64bit"; then
+  AC_MSG_ERROR([$set_field field support explicitly requested but is not compatible with this host])
+fi
+if test x"$has_int128" != x"yes" && test x"$set_scalar" = x"64bit"; then
+  AC_MSG_ERROR([$set_scalar scalar support explicitly requested but is not compatible with this host])
+fi
+])
+
+dnl 
+AC_DEFUN([SECP_64BIT_ASM_CHECK],[
+if test x"$host_cpu" == x"x86_64"; then
+  AC_CHECK_PROG(YASM, yasm, yasm)
+else
+  if test x"$set_field" = x"64bit_asm"; then
+    AC_MSG_ERROR([$set_field field support explicitly requested but is not compatible with this host])
+  fi
+fi
+if test x$YASM = x; then
+  if test x"$set_field" = x"64bit_asm"; then
+    AC_MSG_ERROR([$set_field field support explicitly requested but yasm was not found])
+  fi
+  has_64bit_asm=no
+else
+  case x"$host_os" in
+  xdarwin*)
+    YASM_BINFMT=macho64
+    ;;
+  x*-gnux32)
+    YASM_BINFMT=elfx32
+    ;;
+  *)
+    YASM_BINFMT=elf64
+    ;;
+  esac
+  if $YASM -f help | grep -q $YASM_BINFMT; then
+    has_64bit_asm=yes
+  else
+    if test x"$set_field" = x"64bit_asm"; then
+      AC_MSG_ERROR([$set_field field support explicitly requested but yasm doesn't support $YASM_BINFMT format])
+    fi
+    AC_MSG_WARN([yasm too old for $YASM_BINFMT format])
+    has_64bit_asm=no
+  fi
+fi
+])
+
+dnl
+AC_DEFUN([SECP_OPENSSL_CHECK],[
+if test x"$use_pkgconfig" = x"yes"; then
+    : #NOP
+  m4_ifdef([PKG_CHECK_MODULES],[
+    PKG_CHECK_MODULES([CRYPTO], [libcrypto], [has_libcrypto=yes; AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])],[has_libcrypto=no])
+    : #NOP
+  ])
+else
+  AC_CHECK_HEADER(openssl/crypto.h,[AC_CHECK_LIB(crypto, main,[has_libcrypto=yes; CRYPTO_LIBS=-lcrypto; AC_DEFINE(HAVE_LIBCRYPTO,1,[Define this symbol if libcrypto is installed])]
+)])
+  LIBS=
+fi
+if test x"$has_libcrypto" == x"yes" && test x"$has_openssl_ec" = x; then
+  AC_MSG_CHECKING(for EC functions in libcrypto)
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    #include <openssl/ec.h>
+    #include <openssl/ecdsa.h>
+    #include <openssl/obj_mac.h>]],[[
+    EC_KEY *eckey = EC_KEY_new_by_curve_name(NID_secp256k1);
+    ECDSA_sign(0, NULL, 0, NULL, NULL, eckey);
+    ECDSA_verify(0, NULL, 0, NULL, 0, eckey);
+    EC_KEY_free(eckey);
+  ]])],[has_openssl_ec=yes],[has_openssl_ec=no])
+  AC_MSG_RESULT([$has_openssl_ec])
+fi
+])
+
+dnl
+AC_DEFUN([SECP_GMP_CHECK],[
+if test x"$has_gmp" != x"yes"; then
+  AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS=-lgmp; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])])
+fi
+if test x"$set_field" = x"gmp" && test x"$has_gmp" != x"yes"; then
+    AC_MSG_ERROR([$set_field field support explicitly requested but libgmp was not found])
+fi
+if test x"$set_bignum" = x"gmp" && test x"$has_gmp" != x"yes"; then
+    AC_MSG_ERROR([$set_bignum field support explicitly requested but libgmp was not found])
+fi
+])
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 000000000000..2da5709834af
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,259 @@
+AC_PREREQ([2.60])
+AC_INIT([libsecp256k1],[0.1])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([build-aux/m4])
+AC_CANONICAL_HOST
+AH_TOP([#ifndef LIBSECP256K1_CONFIG_H])
+AH_TOP([#define LIBSECP256K1_CONFIG_H])
+AH_BOTTOM([#endif //LIBSECP256K1_CONFIG_H])
+AM_INIT_AUTOMAKE([foreign])
+LT_INIT
+
+dnl make the compilation flags quiet unless V=1 is used
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+PKG_PROG_PKG_CONFIG
+
+AC_PATH_TOOL(AR, ar)
+AC_PATH_TOOL(RANLIB, ranlib)
+AC_PATH_TOOL(STRIP, strip)
+
+AC_PROG_CC_C99
+if test x"$ac_cv_prog_cc_c99" == x"no"; then
+  AC_MSG_ERROR([c99 compiler support required])
+fi
+
+case $host in
+  *mingw*)
+     use_pkgconfig=no
+     ;;
+   *)
+     use_pkgconfig=yes
+     ;;
+esac
+
+case $host_os in
+  darwin*)
+     CPPFLAGS="$CPPFLAGS -I/opt/local/include"
+     LDFLAGS="$LDFLAGS -L/opt/local/lib"
+     ;;
+esac
+
+CFLAGS="$CFLAGS -W"
+
+warn_CFLAGS="-Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function"
+saved_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $warn_CFLAGS"
+AC_MSG_CHECKING([if ${CC} supports ${warn_CFLAGS}])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
+    [ AC_MSG_RESULT([yes]) ],
+    [ AC_MSG_RESULT([no])
+      CFLAGS="$saved_CFLAGS"
+    ])
+
+
+AC_ARG_ENABLE(benchmark,
+    AS_HELP_STRING([--enable-benchmark],[compile benchmark (default is yes)]),
+    [use_benchmark=$enableval],
+    [use_benchmark=yes])
+
+AC_ARG_ENABLE(tests,
+    AS_HELP_STRING([--enable-tests],[compile tests (default is yes)]),
+    [use_tests=$enableval],
+    [use_tests=yes])
+
+AC_ARG_ENABLE(endomorphism,
+    AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]),
+    [use_endomorphism=$enableval],
+    [use_endomorphism=no])
+
+AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|64bit_asm|32bit|auto],
+[Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto])
+
+AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|auto],
+[Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto])
+
+AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto],
+[Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto])
+
+AC_CHECK_TYPES([__int128])
+
+AC_CHECK_DECL(__builtin_expect,AC_DEFINE(HAVE_BUILTIN_EXPECT,1,[Define this symbol if __builtin_expect is available]),,)
+
+if test x"$req_field" = x"auto"; then
+  SECP_64BIT_ASM_CHECK
+  if test x"$has_64bit_asm" = x"yes"; then
+    set_field=64bit_asm
+  fi
+
+  if test x"$set_field" = x; then
+    SECP_INT128_CHECK
+    if test x"$has_int128" = x"yes"; then
+      set_field=64bit
+    fi
+  fi
+
+  if test x"$set_field" = x; then
+    SECP_GMP_CHECK
+    if test x"$has_gmp" = x"yes"; then
+      set_field=gmp
+    fi
+  fi
+
+  if test x"$set_field" = x; then
+    set_field=32bit
+  fi
+else
+  set_field=$req_field
+  case $set_field in
+  64bit_asm)
+    SECP_64BIT_ASM_CHECK
+    ;;
+  64bit)
+    SECP_INT128_CHECK
+    ;;
+  gmp)
+    SECP_GMP_CHECK
+    ;;
+  32bit)
+    ;;
+  *)
+    AC_MSG_ERROR([invalid field implementation selection])
+    ;;
+  esac
+fi
+
+if test x"$req_scalar" = x"auto"; then
+  if test x"$set_scalar" = x; then
+    SECP_INT128_CHECK
+    if test x"$has_int128" = x"yes"; then
+      set_scalar=64bit
+    fi
+  fi
+  if test x"$set_scalar" = x; then
+    set_scalar=32bit
+  fi
+else
+  set_scalar=$req_scalar
+  case $set_scalar in
+  64bit)
+    SECP_INT128_CHECK
+    ;;
+  32bit)
+    ;;
+  *)
+    AC_MSG_ERROR([invalid scalar implementation selected])
+    ;;
+  esac
+fi
+
+if test x"$req_bignum" = x"auto"; then
+  SECP_GMP_CHECK
+  if test x"$has_gmp" = x"yes"; then
+    set_bignum=gmp
+  fi
+
+  if test x"$set_bignum" = x; then
+    AC_MSG_ERROR([no working bignum implementation found])
+  fi
+else
+  set_bignum=$req_bignum
+  case $set_bignum in
+  gmp)
+    SECP_GMP_CHECK
+    ;;
+  openssl)
+    SECP_OPENSSL_CHECK
+    ;;
+  *)
+    AC_MSG_ERROR([invalid bignum implementation selection])
+    ;;
+  esac
+fi
+
+# select field implementation
+case $set_field in
+64bit_asm)
+  AC_DEFINE(USE_FIELD_5X52_ASM, 1, [Define this symbol to use the assembly version for the 5x52 field implementation])
+  AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
+  ;;
+64bit)
+  AC_DEFINE(USE_FIELD_5X52_INT128, 1, [Define this symbol to use the __int128 version for the 5x52 field implementation])
+  AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
+  ;;
+gmp)
+  AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])
+  AC_DEFINE(USE_FIELD_GMP, 1, [Define this symbol to use the FIELD_GMP implementation])
+  ;;
+32bit)
+  AC_DEFINE(USE_FIELD_10X26, 1, [Define this symbol to use the FIELD_10X26 implementation])
+  ;;
+*)
+  AC_MSG_ERROR([invalid field implementation])
+  ;;
+esac
+
+# select bignum implementation
+case $set_bignum in
+gmp)
+  AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])
+  AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation])
+  AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the USE_FIELD_INV_NUM implementation])
+  ;;
+*)
+  AC_MSG_ERROR([invalid bignum implementation])
+  ;;
+esac
+
+#select scalar implementation
+case $set_scalar in
+64bit)
+  AC_DEFINE(USE_SCALAR_4X64, 1, [Define this symbol to use the 4x64 scalar implementation])
+  ;;
+32bit)
+  AC_DEFINE(USE_SCALAR_8X32, 1, [Define this symbol to use the 8x32 scalar implementation])
+  ;;
+*)
+  AC_MSG_ERROR([invalid scalar implementation])
+  ;;
+esac
+
+if test x"$use_tests" = x"yes"; then
+  SECP_OPENSSL_CHECK
+  if test x"$has_openssl_ec" == x"yes"; then
+    AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
+    SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS"
+    SECP_TEST_LIBS="$CRYPTO_LIBS"
+
+    case $host in
+    *mingw*)
+      SECP_TEST_LIBS="$SECP_TEST_LIBS -lgdi32"
+      ;;
+    esac
+
+  fi
+fi
+
+if test x"$set_field" = x"gmp" || test x"$set_bignum" = x"gmp"; then
+  SECP_LIBS="$SECP_LIBS $GMP_LIBS"
+fi
+
+if test x"$use_endomorphism" = x"yes"; then
+  AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism])
+fi
+
+AC_MSG_NOTICE([Using field implementation: $set_field])
+AC_MSG_NOTICE([Using bignum implementation: $set_bignum])
+AC_MSG_NOTICE([Using scalar implementation: $set_scalar])
+
+AC_CONFIG_HEADERS([src/libsecp256k1-config.h])
+AC_CONFIG_FILES([Makefile libsecp256k1.pc])
+AC_SUBST(SECP_INCLUDES)
+AC_SUBST(SECP_LIBS)
+AC_SUBST(SECP_TEST_LIBS)
+AC_SUBST(SECP_TEST_INCLUDES)
+AC_SUBST(YASM_BINFMT)
+AM_CONDITIONAL([USE_ASM], [test x"$set_field" == x"64bit_asm"])
+AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
+AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" != x"no"])
+AC_OUTPUT
diff --git a/include/secp256k1.h b/include/secp256k1.h
new file mode 100644
index 000000000000..932bf0279fc7
--- /dev/null
+++ b/include/secp256k1.h
@@ -0,0 +1,252 @@
+#ifndef _SECP256K1_
+# define _SECP256K1_
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# if !defined(SECP256K1_GNUC_PREREQ)
+#  if defined(__GNUC__)&&defined(__GNUC_MINOR__)
+#   define SECP256K1_GNUC_PREREQ(_maj,_min) \
+ ((__GNUC__<<16)+__GNUC_MINOR__>=((_maj)<<16)+(_min))
+#  else
+#   define SECP256K1_GNUC_PREREQ(_maj,_min) 0
+#  endif
+# endif
+
+# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
+#  if SECP256K1_GNUC_PREREQ(3,0)
+#   define SECP256K1_RESTRICT __restrict__
+#  elif (defined(_MSC_VER) && _MSC_VER >= 1400)
+#   define SECP256K1_RESTRICT __restrict
+#  else
+#   define SECP256K1_RESTRICT
+#  endif
+# else
+#  define SECP256K1_RESTRICT restrict
+# endif
+
+# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
+#  if SECP256K1_GNUC_PREREQ(2,7)
+#   define SECP256K1_INLINE __inline__
+#  elif (defined(_MSC_VER))
+#   define SECP256K1_INLINE __inline
+#  else
+#   define SECP256K1_INLINE
+#  endif
+# else
+#  define SECP256K1_INLINE inline
+# endif
+
+/**Warning attributes
+  * NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out
+  * some paranoid null checks. */
+# if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4)
+#  define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
+# else
+#  define SECP256K1_WARN_UNUSED_RESULT
+# endif
+# if !defined(SECP256K1_BUILD) && defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4)
+#  define SECP256K1_ARG_NONNULL(_x)  __attribute__ ((__nonnull__(_x)))
+# else
+#  define SECP256K1_ARG_NONNULL(_x)
+# endif
+
+
+/** Flags to pass to secp256k1_start. */
+# define SECP256K1_START_VERIFY (1 << 0)
+# define SECP256K1_START_SIGN   (1 << 1)
+
+/** Initialize the library. This may take some time (10-100 ms).
+ *  You need to call this before calling any other function.
+ *  It cannot run in parallel with any other functions, but once
+ *  secp256k1_start() returns, all other functions are thread-safe.
+ */
+void secp256k1_start(unsigned int flags);
+
+/** Free all memory associated with this library. After this, no
+ *  functions can be called anymore, except secp256k1_start()
+ */
+void secp256k1_stop(void);
+
+/** Verify an ECDSA signature.
+ *  Returns: 1: correct signature
+ *           0: incorrect signature
+ *          -1: invalid public key
+ *          -2: invalid signature
+ * In:       msg:       the message being verified (cannot be NULL)
+ *           msglen:    the length of the message (at most 32)
+ *           sig:       the signature being verified (cannot be NULL)
+ *           siglen:    the length of the signature
+ *           pubkey:    the public key to verify with (cannot be NULL)
+ *           pubkeylen: the length of pubkey
+ * Requires starting using SECP256K1_START_VERIFY.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify(
+  const unsigned char *msg,
+  int msglen,
+  const unsigned char *sig,
+  int siglen,
+  const unsigned char *pubkey,
+  int pubkeylen
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(5);
+
+/** Create an ECDSA signature.
+ *  Returns: 1: signature created
+ *           0: nonce invalid, try another one
+ *  In:      msg:    the message being signed (cannot be NULL)
+ *           msglen: the length of the message being signed (at most 32)
+ *           seckey: pointer to a 32-byte secret key (cannot be NULL, assumed to be valid)
+ *           nonce:  pointer to a 32-byte nonce (cannot be NULL, generated with a cryptographic PRNG)
+ *  Out:     sig:    pointer to an array where the signature will be placed (cannot be NULL)
+ *  In/Out:  siglen: pointer to an int with the length of sig, which will be updated
+ *                   to contain the actual signature length (<=72).
+ * Requires starting using SECP256K1_START_SIGN.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_sign(
+  const unsigned char *msg,
+  int msglen,
+  unsigned char *sig,
+  int *siglen,
+  const unsigned char *seckey,
+  const unsigned char *nonce
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6);
+
+/** Create a compact ECDSA signature (64 byte + recovery id).
+ *  Returns: 1: signature created
+ *           0: nonce invalid, try another one
+ *  In:      msg:    the message being signed (cannot be NULL)
+ *           msglen: the length of the message being signed (at most 32)
+ *           seckey: pointer to a 32-byte secret key (cannot be NULL, assumed to be valid)
+ *           nonce:  pointer to a 32-byte nonce (cannot be NULL, generated with a cryptographic PRNG)
+ *  Out:     sig:    pointer to a 64-byte array where the signature will be placed (cannot be NULL)
+ *           recid:  pointer to an int, which will be updated to contain the recovery id (can be NULL)
+ * Requires starting using SECP256K1_START_SIGN.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_sign_compact(
+  const unsigned char *msg,
+  int msglen,
+  unsigned char *sig64,
+  const unsigned char *seckey,
+  const unsigned char *nonce,
+  int *recid
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5);
+
+/** Recover an ECDSA public key from a compact signature.
+ *  Returns: 1: public key successfully recovered (which guarantees a correct signature).
+ *           0: otherwise.
+ *  In:      msg:        the message assumed to be signed (cannot be NULL)
+ *           msglen:     the length of the message (at most 32)
+ *           sig64:      signature as 64 byte array (cannot be NULL)
+ *           compressed: whether to recover a compressed or uncompressed pubkey
+ *           recid:      the recovery id (0-3, as returned by ecdsa_sign_compact)
+ *  Out:     pubkey:     pointer to a 33 or 65 byte array to put the pubkey (cannot be NULL)
+ *           pubkeylen:  pointer to an int that will contain the pubkey length (cannot be NULL)
+ * Requires starting using SECP256K1_START_VERIFY.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover_compact(
+  const unsigned char *msg,
+  int msglen,
+  const unsigned char *sig64,
+  unsigned char *pubkey,
+  int *pubkeylen,
+  int compressed,
+  int recid
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5);
+
+/** Verify an ECDSA secret key.
+ *  Returns: 1: secret key is valid
+ *           0: secret key is invalid
+ *  In:      seckey: pointer to a 32-byte secret key (cannot be NULL)
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(const unsigned char *seckey) SECP256K1_ARG_NONNULL(1);
+
+/** Just validate a public key.
+ *  Returns: 1: valid public key
+ *           0: invalid public key
+ *  In:      pubkey:    pointer to a 33-byte or 65-byte public key (cannot be NULL).
+ *           pubkeylen: length of pubkey
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_verify(const unsigned char *pubkey, int pubkeylen) SECP256K1_ARG_NONNULL(1);
+
+/** Compute the public key for a secret key.
+ *  In:     compressed: whether the computed public key should be compressed
+ *          seckey:     pointer to a 32-byte private key (cannot be NULL)
+ *  Out:    pubkey:     pointer to a 33-byte (if compressed) or 65-byte (if uncompressed)
+ *                      area to store the public key (cannot be NULL)
+ *          pubkeylen:  pointer to int that will be updated to contains the pubkey's
+ *                      length (cannot be NULL)
+ *  Returns: 1: secret was valid, public key stores
+ *           0: secret was invalid, try again.
+ * Requires starting using SECP256K1_START_SIGN.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(
+  unsigned char *pubkey,
+  int *pubkeylen,
+  const unsigned char *seckey,
+  int compressed
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
+
+/** Decompress a public key.
+ * In/Out: pubkey:    pointer to a 65-byte array to put the decompressed public key.
+                      It must contain a 33-byte or 65-byte public key already (cannot be NULL)
+ *         pubkeylen: pointer to the size of the public key pointed to by pubkey (cannot be NULL)
+                      It will be updated to reflect the new size.
+ * Returns: 0 if the passed public key was invalid, 1 otherwise. If 1 is returned, the
+            pubkey is replaced with its decompressed version.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_decompress(
+  unsigned char *pubkey,
+  int *pubkeylen
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
+
+/** Export a private key in DER format. */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export(
+  const unsigned char *seckey,
+  unsigned char *privkey,
+  int *privkeylen,
+  int compressed
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
+
+/** Import a private key in DER format. */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import(
+  unsigned char *seckey,
+  const unsigned char *privkey,
+  int privkeylen
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
+
+/** Tweak a private key by adding tweak to it. */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
+  unsigned char *seckey,
+  const unsigned char *tweak
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
+
+/** Tweak a public key by adding tweak times the generator to it.
+ * Requires starting with SECP256K1_START_VERIFY.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
+  unsigned char *pubkey,
+  int pubkeylen,
+  const unsigned char *tweak
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3);
+
+/** Tweak a private key by multiplying it with tweak. */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul(
+  unsigned char *seckey,
+  const unsigned char *tweak
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
+
+/** Tweak a public key by multiplying it with tweak.
+ * Requires starting with SECP256K1_START_VERIFY.
+ */
+SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul(
+  unsigned char *pubkey,
+  int pubkeylen,
+  const unsigned char *tweak
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(3);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/libsecp256k1.pc.in b/libsecp256k1.pc.in
new file mode 100644
index 000000000000..1c72dd00037b
--- /dev/null
+++ b/libsecp256k1.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libsecp256k1
+Description: Optimized C library for EC operations on curve secp256k1
+URL: https://github.com/bitcoin/secp256k1
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
+Libs.private: @SECP_LIBS@
+Libs: -L${libdir} -lsecp256k1
+
diff --git a/nasm_lt.sh b/nasm_lt.sh
new file mode 100755
index 000000000000..6cd73294c061
--- /dev/null
+++ b/nasm_lt.sh
@@ -0,0 +1,57 @@
+#! /bin/sh
+command=""
+infile=""
+o_opt=no
+pic=no
+while [ $# -gt 0 ]; do
+    case "$1" in
+        -DPIC|-fPIC|-fpic|-Kpic|-KPIC)
+            if [ "$pic" != "yes" ] ; then
+                command="$command -DPIC"
+                pic=yes
+            fi
+            ;;
+        -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-fas86| \
+        -fobj|-fwin32|-fwin64|-frdf|-fieee|-fmacho|-fmacho64)
+            # it's a file format specifier for nasm.
+            command="$command $1"
+            ;;
+        -f*)
+            # maybe a code-generation flag for gcc.
+            ;;
+        -[Ii]*)
+            incdir=`echo "$1" | sed 's/^-[Ii]//'`
+            if [ "x$incdir" = x -a "x$2" != x ] ; then
+                case "$2" in
+                    -*) ;;
+                    *) incdir="$2"; shift;;
+                esac
+            fi
+            if [ "x$incdir" != x ] ; then
+                # In the case of NASM, the trailing slash is necessary.
+                incdir=`echo "$incdir" | sed 's%/*$%/%'`
+                command="$command -I$incdir"
+            fi
+            ;;
+        -o*)
+            o_opt=yes
+            command="$command $1"
+            ;;
+        *.asm)
+            infile=$1
+            command="$command $1"
+            ;;
+        *)
+            command="$command $1"
+            ;;
+    esac
+    shift
+done
+if [ "$o_opt" != yes ] ; then
+    # By default, NASM creates an output file
+    # in the same directory as the input file.
+    outfile="-o `echo $infile | sed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.o"
+    command="$command $outfile"
+fi
+echo $command
+exec $command
diff --git a/obj/.gitignore b/obj/.gitignore
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/src/bench_inv.c b/src/bench_inv.c
new file mode 100644
index 000000000000..d6f664333fd9
--- /dev/null
+++ b/src/bench_inv.c
@@ -0,0 +1,41 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+#include <stdio.h>
+
+#include "include/secp256k1.h"
+
+#include "util.h"
+#include "num_impl.h"
+#include "field_impl.h"
+#include "group_impl.h"
+#include "scalar_impl.h"
+
+int main(void) {
+    static const unsigned char init[32] = {
+        0x02, 0x03, 0x05, 0x07, 0x0b, 0x0d, 0x11, 0x13,
+        0x17, 0x1d, 0x1f, 0x25, 0x29, 0x2b, 0x2f, 0x35,
+        0x3b, 0x3d, 0x43, 0x47, 0x49, 0x4f, 0x53, 0x59,
+        0x61, 0x65, 0x67, 0x6b, 0x6d, 0x71, 0x7f, 0x83
+    };
+    static const unsigned char fini[32] = {
+        0xba, 0x28, 0x58, 0xd8, 0xaa, 0x11, 0xd6, 0xf2,
+        0xfa, 0xce, 0x50, 0xb1, 0x67, 0x19, 0xb1, 0xa6,
+        0xe0, 0xaa, 0x84, 0x53, 0xf6, 0x80, 0xfc, 0x23,
+        0x88, 0x3c, 0xd6, 0x74, 0x9f, 0x27, 0x09, 0x03
+    };
+    secp256k1_ge_start();
+    secp256k1_scalar_t base, x;
+    secp256k1_scalar_set_b32(&base, init, NULL);
+    secp256k1_scalar_set_b32(&x, init, NULL);
+    for (int i=0; i<1000000; i++) {
+        secp256k1_scalar_inverse(&x, &x);
+        secp256k1_scalar_add(&x, &x, &base);
+    }
+    unsigned char res[32];
+    secp256k1_scalar_get_b32(res, &x);
+    CHECK(memcmp(res, fini, 32) == 0);
+    return 0;
+}
diff --git a/src/bench_sign.c b/src/bench_sign.c
new file mode 100644
index 000000000000..f01f11d689bb
--- /dev/null
+++ b/src/bench_sign.c
@@ -0,0 +1,49 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+#include <stdio.h>
+#include <string.h>
+
+#include "include/secp256k1.h"
+#include "util.h"
+
+int main(void) {
+    secp256k1_start(SECP256K1_START_SIGN);
+
+    unsigned char msg[32];
+    unsigned char nonce[32];
+    unsigned char key[32];
+
+    for (int i = 0; i < 32; i++) msg[i] = i + 1;
+    for (int i = 0; i < 32; i++) nonce[i] = i + 33;
+    for (int i = 0; i < 32; i++) key[i] = i + 65;
+
+    unsigned char sig[64];
+
+    for (int i=0; i<1000000; i++) {
+        int recid = 0;
+        CHECK(secp256k1_ecdsa_sign_compact(msg, 32, sig, key, nonce, &recid));
+        for (int j = 0; j < 32; j++) {
+            nonce[j] = key[j];     /* Move former key to nonce  */
+            msg[j] = sig[j];       /* Move former R to message. */
+            key[j] = sig[j + 32];  /* Move former S to key.     */
+        }
+    }
+
+    static const unsigned char fini[64] = {
+        0x92, 0x03, 0xef, 0xf1, 0x58, 0x0b, 0x49, 0x8d,
+        0x22, 0x3d, 0x49, 0x0e, 0xbf, 0x26, 0x50, 0x0e,
+        0x2d, 0x62, 0x90, 0xd7, 0x82, 0xbd, 0x3d, 0x5c,
+        0xa9, 0x10, 0xa5, 0x49, 0xb1, 0xd8, 0x8c, 0xc0,
+        0x5b, 0x5e, 0x9e, 0x68, 0x51, 0x3d, 0xe8, 0xec,
+        0x82, 0x30, 0x82, 0x88, 0x8c, 0xfd, 0xe7, 0x71,
+        0x15, 0x92, 0xfc, 0x14, 0x59, 0x78, 0x31, 0xb3,
+        0xf6, 0x07, 0x91, 0x18, 0x00, 0x8d, 0x4c, 0xb2
+    };
+    CHECK(memcmp(sig, fini, 64) == 0);
+
+    secp256k1_stop();
+    return 0;
+}
diff --git a/src/bench_verify.c b/src/bench_verify.c
new file mode 100644
index 000000000000..690595516d72
--- /dev/null
+++ b/src/bench_verify.c
@@ -0,0 +1,44 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+
+#include "include/secp256k1.h"
+#include "util.h"
+
+int main(void) {
+    secp256k1_start(SECP256K1_START_VERIFY);
+
+    unsigned char msg[32];
+    unsigned char sig[64];
+
+    for (int i = 0; i < 32; i++) msg[i] = 1 + i;
+    for (int i = 0; i < 64; i++) sig[i] = 65 + i;
+
+    unsigned char pubkey[33];
+    for (int i=0; i<1000000; i++) {
+        int pubkeylen = 33;
+        CHECK(secp256k1_ecdsa_recover_compact(msg, 32, sig, pubkey, &pubkeylen, 1, i % 2));
+        for (int j = 0; j < 32; j++) {
+            sig[j + 32] = msg[j];    /* Move former message to S. */
+            msg[j] = sig[j];         /* Move former R to message. */
+            sig[j] = pubkey[j + 1];  /* Move recovered pubkey X coordinate to R (which must be a valid X coordinate). */
+        }
+    }
+
+    static const unsigned char fini[33] = {
+        0x02,
+        0x52, 0x63, 0xae, 0x9a, 0x9d, 0x47, 0x1f, 0x1a,
+        0xb2, 0x36, 0x65, 0x89, 0x11, 0xe7, 0xcc, 0x86,
+        0xa3, 0xab, 0x97, 0xb6, 0xf1, 0xaf, 0xfd, 0x8f,
+        0x9b, 0x38, 0xb6, 0x18, 0x55, 0xe5, 0xc2, 0x43
+    };
+    CHECK(memcmp(fini, pubkey, 33) == 0);
+
+    secp256k1_stop();
+    return 0;
+}
diff --git a/src/ecdsa.h b/src/ecdsa.h
new file mode 100644
index 000000000000..3b1e0484eac6
--- /dev/null
+++ b/src/ecdsa.h
@@ -0,0 +1,23 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECDSA_
+#define _SECP256K1_ECDSA_
+
+#include "num.h"
+
+typedef struct {
+    secp256k1_num_t r, s;
+} secp256k1_ecdsa_sig_t;
+
+static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size);
+static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a);
+static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message);
+static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *seckey, const secp256k1_scalar_t *message, const secp256k1_scalar_t *nonce, int *recid);
+static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_num_t *message, int recid);
+static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_num_t *r, const secp256k1_num_t *s);
+
+#endif
diff --git a/src/ecdsa_impl.h b/src/ecdsa_impl.h
new file mode 100644
index 000000000000..4c05ec39f8e4
--- /dev/null
+++ b/src/ecdsa_impl.h
@@ -0,0 +1,183 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                               *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+
+#ifndef _SECP256K1_ECDSA_IMPL_H_
+#define _SECP256K1_ECDSA_IMPL_H_
+
+#include "num.h"
+#include "field.h"
+#include "group.h"
+#include "ecmult.h"
+#include "ecmult_gen.h"
+#include "ecdsa.h"
+
+static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size) {
+    if (sig[0] != 0x30) return 0;
+    int lenr = sig[3];
+    if (5+lenr >= size) return 0;
+    int lens = sig[lenr+5];
+    if (sig[1] != lenr+lens+4) return 0;
+    if (lenr+lens+6 > size) return 0;
+    if (sig[2] != 0x02) return 0;
+    if (lenr == 0) return 0;
+    if (sig[lenr+4] != 0x02) return 0;
+    if (lens == 0) return 0;
+    secp256k1_num_set_bin(&r->r, sig+4, lenr);
+    secp256k1_num_set_bin(&r->s, sig+6+lenr, lens);
+    return 1;
+}
+
+static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a) {
+    int lenR = (secp256k1_num_bits(&a->r) + 7)/8;
+    if (lenR == 0 || secp256k1_num_get_bit(&a->r, lenR*8-1))
+        lenR++;
+    int lenS = (secp256k1_num_bits(&a->s) + 7)/8;
+    if (lenS == 0 || secp256k1_num_get_bit(&a->s, lenS*8-1))
+        lenS++;
+    if (*size < 6+lenS+lenR)
+        return 0;
+    *size = 6 + lenS + lenR;
+    sig[0] = 0x30;
+    sig[1] = 4 + lenS + lenR;
+    sig[2] = 0x02;
+    sig[3] = lenR;
+    secp256k1_num_get_bin(sig+4, lenR, &a->r);
+    sig[4+lenR] = 0x02;
+    sig[5+lenR] = lenS;
+    secp256k1_num_get_bin(sig+lenR+6, lenS, &a->s);
+    return 1;
+}
+
+static int secp256k1_ecdsa_sig_recompute(secp256k1_num_t *r2, const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message) {
+    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
+
+    if (secp256k1_num_is_neg(&sig->r) || secp256k1_num_is_neg(&sig->s))
+        return 0;
+    if (secp256k1_num_is_zero(&sig->r) || secp256k1_num_is_zero(&sig->s))
+        return 0;
+    if (secp256k1_num_cmp(&sig->r, &c->order) >= 0 || secp256k1_num_cmp(&sig->s, &c->order) >= 0)
+        return 0;
+
+    int ret = 0;
+    secp256k1_num_t sn, u1, u2;
+    secp256k1_num_init(&sn);
+    secp256k1_num_init(&u1);
+    secp256k1_num_init(&u2);
+    secp256k1_num_mod_inverse(&sn, &sig->s, &c->order);
+    secp256k1_num_mod_mul(&u1, &sn, message, &c->order);
+    secp256k1_num_mod_mul(&u2, &sn, &sig->r, &c->order);
+    secp256k1_gej_t pubkeyj; secp256k1_gej_set_ge(&pubkeyj, pubkey);
+    secp256k1_gej_t pr; secp256k1_ecmult(&pr, &pubkeyj, &u2, &u1);
+    if (!secp256k1_gej_is_infinity(&pr)) {
+        secp256k1_fe_t xr; secp256k1_gej_get_x_var(&xr, &pr);
+        secp256k1_fe_normalize(&xr);
+        unsigned char xrb[32]; secp256k1_fe_get_b32(xrb, &xr);
+        secp256k1_num_set_bin(r2, xrb, 32);
+        secp256k1_num_mod(r2, &c->order);
+        ret = 1;
+    }
+    secp256k1_num_free(&sn);
+    secp256k1_num_free(&u1);
+    secp256k1_num_free(&u2);
+    return ret;
+}
+
+static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_num_t *message, int recid) {
+    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
+
+    if (secp256k1_num_is_neg(&sig->r) || secp256k1_num_is_neg(&sig->s))
+        return 0;
+    if (secp256k1_num_is_zero(&sig->r) || secp256k1_num_is_zero(&sig->s))
+        return 0;
+    if (secp256k1_num_cmp(&sig->r, &c->order) >= 0 || secp256k1_num_cmp(&sig->s, &c->order) >= 0)
+        return 0;
+
+    secp256k1_num_t rx;
+    secp256k1_num_init(&rx);
+    secp256k1_num_copy(&rx, &sig->r);
+    if (recid & 2) {
+        secp256k1_num_add(&rx, &rx, &c->order);
+        if (secp256k1_num_cmp(&rx, &secp256k1_fe_consts->p) >= 0)
+            return 0;
+    }
+    unsigned char brx[32];
+    secp256k1_num_get_bin(brx, 32, &rx);
+    secp256k1_num_free(&rx);
+    secp256k1_fe_t fx;
+    secp256k1_fe_set_b32(&fx, brx);
+    secp256k1_ge_t x;
+    if (!secp256k1_ge_set_xo(&x, &fx, recid & 1))
+        return 0;
+    secp256k1_gej_t xj;
+    secp256k1_gej_set_ge(&xj, &x);
+    secp256k1_num_t rn, u1, u2;
+    secp256k1_num_init(&rn);
+    secp256k1_num_init(&u1);
+    secp256k1_num_init(&u2);
+    secp256k1_num_mod_inverse(&rn, &sig->r, &c->order);
+    secp256k1_num_mod_mul(&u1, &rn, message, &c->order);
+    secp256k1_num_sub(&u1, &c->order, &u1);
+    secp256k1_num_mod_mul(&u2, &rn, &sig->s, &c->order);
+    secp256k1_gej_t qj;
+    secp256k1_ecmult(&qj, &xj, &u2, &u1);
+    secp256k1_ge_set_gej_var(pubkey, &qj);
+    secp256k1_num_free(&rn);
+    secp256k1_num_free(&u1);
+    secp256k1_num_free(&u2);
+    return !secp256k1_gej_is_infinity(&qj);
+}
+
+static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message) {
+    secp256k1_num_t r2;
+    secp256k1_num_init(&r2);
+    int ret = 0;
+    ret = secp256k1_ecdsa_sig_recompute(&r2, sig, pubkey, message) && secp256k1_num_cmp(&sig->r, &r2) == 0;
+    secp256k1_num_free(&r2);
+    return ret;
+}
+
+static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *seckey, const secp256k1_scalar_t *message, const secp256k1_scalar_t *nonce, int *recid) {
+    secp256k1_gej_t rp;
+    secp256k1_ecmult_gen(&rp, nonce);
+    secp256k1_ge_t r;
+    secp256k1_ge_set_gej(&r, &rp);
+    unsigned char b[32];
+    secp256k1_fe_normalize(&r.x);
+    secp256k1_fe_normalize(&r.y);
+    secp256k1_fe_get_b32(b, &r.x);
+    int overflow = 0;
+    secp256k1_scalar_t sigr;
+    secp256k1_scalar_set_b32(&sigr, b, &overflow);
+    if (recid)
+        *recid = (overflow ? 2 : 0) | (secp256k1_fe_is_odd(&r.y) ? 1 : 0);
+    secp256k1_scalar_t n;
+    secp256k1_scalar_mul(&n, &sigr, seckey);
+    secp256k1_scalar_add(&n, &n, message);
+    secp256k1_scalar_t sigs;
+    secp256k1_scalar_inverse(&sigs, nonce);
+    secp256k1_scalar_mul(&sigs, &sigs, &n);
+    secp256k1_scalar_clear(&n);
+    secp256k1_gej_clear(&rp);
+    secp256k1_ge_clear(&r);
+    if (secp256k1_scalar_is_zero(&sigs))
+        return 0;
+    if (secp256k1_scalar_is_high(&sigs)) {
+        secp256k1_scalar_negate(&sigs, &sigs);
+        if (recid)
+            *recid ^= 1;
+    }
+    secp256k1_scalar_get_num(&sig->s, &sigs);
+    secp256k1_scalar_get_num(&sig->r, &sigr);
+    return 1;
+}
+
+static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_num_t *r, const secp256k1_num_t *s) {
+    secp256k1_num_copy(&sig->r, r);
+    secp256k1_num_copy(&sig->s, s);
+}
+
+#endif
diff --git a/src/eckey.h b/src/eckey.h
new file mode 100644
index 000000000000..024c8b821bc5
--- /dev/null
+++ b/src/eckey.h
@@ -0,0 +1,25 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECKEY_
+#define _SECP256K1_ECKEY_
+
+#include "group.h"
+#include "scalar.h"
+#include "num.h"
+
+static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size);
+static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed);
+
+static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned char *privkey, int privkeylen);
+static int secp256k1_eckey_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed);
+
+static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak);
+static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_num_t *tweak);
+static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak);
+static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_num_t *tweak);
+
+#endif
diff --git a/src/eckey_impl.h b/src/eckey_impl.h
new file mode 100644
index 000000000000..290b1f0900e7
--- /dev/null
+++ b/src/eckey_impl.h
@@ -0,0 +1,200 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECKEY_IMPL_H_
+#define _SECP256K1_ECKEY_IMPL_H_
+
+#include "eckey.h"
+
+#include "num.h"
+#include "field.h"
+#include "group.h"
+#include "ecmult_gen.h"
+
+static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size) {
+    if (size == 33 && (pub[0] == 0x02 || pub[0] == 0x03)) {
+        secp256k1_fe_t x;
+        secp256k1_fe_set_b32(&x, pub+1);
+        return secp256k1_ge_set_xo(elem, &x, pub[0] == 0x03);
+    } else if (size == 65 && (pub[0] == 0x04 || pub[0] == 0x06 || pub[0] == 0x07)) {
+        secp256k1_fe_t x, y;
+        secp256k1_fe_set_b32(&x, pub+1);
+        secp256k1_fe_set_b32(&y, pub+33);
+        secp256k1_ge_set_xy(elem, &x, &y);
+        if ((pub[0] == 0x06 || pub[0] == 0x07) && secp256k1_fe_is_odd(&y) != (pub[0] == 0x07))
+            return 0;
+        return secp256k1_ge_is_valid(elem);
+    } else {
+        return 0;
+    }
+}
+
+static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed) {
+    if (secp256k1_ge_is_infinity(elem)) {
+        return 0;
+    }
+    secp256k1_fe_normalize(&elem->x);
+    secp256k1_fe_normalize(&elem->y);
+    secp256k1_fe_get_b32(&pub[1], &elem->x);
+    if (compressed) {
+        *size = 33;
+        pub[0] = 0x02 | (secp256k1_fe_is_odd(&elem->y) ? 0x01 : 0x00);
+    } else {
+        *size = 65;
+        pub[0] = 0x04;
+        secp256k1_fe_get_b32(&pub[33], &elem->y);
+    }
+    return 1;
+}
+
+static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned char *privkey, int privkeylen) {
+    const unsigned char *end = privkey + privkeylen;
+    /* sequence header */
+    if (end < privkey+1 || *privkey != 0x30)
+        return 0;
+    privkey++;
+    /* sequence length constructor */
+    int lenb = 0;
+    if (end < privkey+1 || !(*privkey & 0x80))
+        return 0;
+    lenb = *privkey & ~0x80; privkey++;
+    if (lenb < 1 || lenb > 2)
+        return 0;
+    if (end < privkey+lenb)
+        return 0;
+    /* sequence length */
+    int len = 0;
+    len = privkey[lenb-1] | (lenb > 1 ? privkey[lenb-2] << 8 : 0);
+    privkey += lenb;
+    if (end < privkey+len)
+        return 0;
+    /* sequence element 0: version number (=1) */
+    if (end < privkey+3 || privkey[0] != 0x02 || privkey[1] != 0x01 || privkey[2] != 0x01)
+        return 0;
+    privkey += 3;
+    /* sequence element 1: octet string, up to 32 bytes */
+    if (end < privkey+2 || privkey[0] != 0x04 || privkey[1] > 0x20 || end < privkey+2+privkey[1])
+        return 0;
+    int overflow = 0;
+    unsigned char c[32] = {0};
+    memcpy(c + 32 - privkey[1], privkey + 2, privkey[1]);
+    secp256k1_scalar_set_b32(key, c, &overflow);
+    memset(c, 0, 32);
+    return !overflow;
+}
+
+static int secp256k1_eckey_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed) {
+    secp256k1_gej_t rp;
+    secp256k1_ecmult_gen(&rp, key);
+    secp256k1_ge_t r;
+    secp256k1_ge_set_gej(&r, &rp);
+    if (compressed) {
+        static const unsigned char begin[] = {
+            0x30,0x81,0xD3,0x02,0x01,0x01,0x04,0x20
+        };
+        static const unsigned char middle[] = {
+            0xA0,0x81,0x85,0x30,0x81,0x82,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48,
+            0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04,
+            0x21,0x02,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87,
+            0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8,
+            0x17,0x98,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E,
+            0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x24,0x03,0x22,0x00
+        };
+        unsigned char *ptr = privkey;
+        memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin);
+        secp256k1_scalar_get_b32(ptr, key); ptr += 32;
+        memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
+        int pubkeylen = 0;
+        if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 1)) {
+            return 0;
+        }
+        ptr += pubkeylen;
+        *privkeylen = ptr - privkey;
+    } else {
+        static const unsigned char begin[] = {
+            0x30,0x82,0x01,0x13,0x02,0x01,0x01,0x04,0x20
+        };
+        static const unsigned char middle[] = {
+            0xA0,0x81,0xA5,0x30,0x81,0xA2,0x02,0x01,0x01,0x30,0x2C,0x06,0x07,0x2A,0x86,0x48,
+            0xCE,0x3D,0x01,0x01,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F,0x30,0x06,0x04,0x01,0x00,0x04,0x01,0x07,0x04,
+            0x41,0x04,0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,0x55,0xA0,0x62,0x95,0xCE,0x87,
+            0x0B,0x07,0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,0x59,0xF2,0x81,0x5B,0x16,0xF8,
+            0x17,0x98,0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,0x5D,0xA4,0xFB,0xFC,0x0E,0x11,
+            0x08,0xA8,0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,0x9C,0x47,0xD0,0x8F,0xFB,0x10,
+            0xD4,0xB8,0x02,0x21,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+            0xFF,0xFF,0xFF,0xFF,0xFE,0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,0xBF,0xD2,0x5E,
+            0x8C,0xD0,0x36,0x41,0x41,0x02,0x01,0x01,0xA1,0x44,0x03,0x42,0x00
+        };
+        unsigned char *ptr = privkey;
+        memcpy(ptr, begin, sizeof(begin)); ptr += sizeof(begin);
+        secp256k1_scalar_get_b32(ptr, key); ptr += 32;
+        memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
+        int pubkeylen = 0;
+        if (!secp256k1_eckey_pubkey_serialize(&r, ptr, &pubkeylen, 0)) {
+            return 0;
+        }
+        ptr += pubkeylen;
+        *privkeylen = ptr - privkey;
+    }
+    return 1;
+}
+
+static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak) {
+    secp256k1_scalar_add(key, key, tweak);
+    if (secp256k1_scalar_is_zero(key))
+        return 0;
+    return 1;
+}
+
+static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_num_t *tweak) {
+    if (secp256k1_num_cmp(tweak, &secp256k1_ge_consts->order) >= 0)
+        return 0;
+
+    secp256k1_gej_t pt;
+    secp256k1_gej_set_ge(&pt, key);
+    secp256k1_num_t one;
+    secp256k1_num_init(&one);
+    secp256k1_num_set_int(&one, 1);
+    secp256k1_ecmult(&pt, &pt, &one, tweak);
+    secp256k1_num_free(&one);
+
+    if (secp256k1_gej_is_infinity(&pt))
+        return 0;
+    secp256k1_ge_set_gej(key, &pt);
+    return 1;
+}
+
+static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak) {
+    if (secp256k1_scalar_is_zero(tweak))
+        return 0;
+
+    secp256k1_scalar_mul(key, key, tweak);
+    return 1;
+}
+
+static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_num_t *tweak) {
+    if (secp256k1_num_is_zero(tweak))
+        return 0;
+    if (secp256k1_num_cmp(tweak, &secp256k1_ge_consts->order) >= 0)
+        return 0;
+
+    secp256k1_num_t zero;
+    secp256k1_num_init(&zero);
+    secp256k1_num_set_int(&zero, 0);
+    secp256k1_gej_t pt;
+    secp256k1_gej_set_ge(&pt, key);
+    secp256k1_ecmult(&pt, &pt, tweak, &zero);
+    secp256k1_num_free(&zero);
+    secp256k1_ge_set_gej(key, &pt);
+    return 1;
+}
+
+#endif
diff --git a/src/ecmult.h b/src/ecmult.h
new file mode 100644
index 000000000000..e3cf18b6807a
--- /dev/null
+++ b/src/ecmult.h
@@ -0,0 +1,19 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECMULT_
+#define _SECP256K1_ECMULT_
+
+#include "num.h"
+#include "group.h"
+
+static void secp256k1_ecmult_start(void);
+static void secp256k1_ecmult_stop(void);
+
+/** Double multiply: R = na*A + ng*G */
+static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_num_t *na, const secp256k1_num_t *ng);
+
+#endif
diff --git a/src/ecmult_gen.h b/src/ecmult_gen.h
new file mode 100644
index 000000000000..42f822f9cef2
--- /dev/null
+++ b/src/ecmult_gen.h
@@ -0,0 +1,19 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECMULT_GEN_
+#define _SECP256K1_ECMULT_GEN_
+
+#include "scalar.h"
+#include "group.h"
+
+static void secp256k1_ecmult_gen_start(void);
+static void secp256k1_ecmult_gen_stop(void);
+
+/** Multiply with the generator: R = a*G */
+static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *a);
+
+#endif
diff --git a/src/ecmult_gen_impl.h b/src/ecmult_gen_impl.h
new file mode 100644
index 000000000000..07859ab04bd3
--- /dev/null
+++ b/src/ecmult_gen_impl.h
@@ -0,0 +1,118 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECMULT_GEN_IMPL_H_
+#define _SECP256K1_ECMULT_GEN_IMPL_H_
+
+#include "scalar.h"
+#include "group.h"
+#include "ecmult_gen.h"
+
+typedef struct {
+    /* For accelerating the computation of a*G:
+     * To harden against timing attacks, use the following mechanism:
+     * * Break up the multiplicand into groups of 4 bits, called n_0, n_1, n_2, ..., n_63.
+     * * Compute sum(n_i * 16^i * G + U_i, i=0..63), where:
+     *   * U_i = U * 2^i (for i=0..62)
+     *   * U_i = U * (1-2^63) (for i=63)
+     *   where U is a point with no known corresponding scalar. Note that sum(U_i, i=0..63) = 0.
+     * For each i, and each of the 16 possible values of n_i, (n_i * 16^i * G + U_i) is
+     * precomputed (call it prec(i, n_i)). The formula now becomes sum(prec(i, n_i), i=0..63).
+     * None of the resulting prec group elements have a known scalar, and neither do any of
+     * the intermediate sums while computing a*G.
+     * To make memory access uniform, the bytes of prec(i, n_i) are sliced per value of n_i. */
+    unsigned char prec[64][sizeof(secp256k1_ge_t)][16]; /* prec[j][k][i] = k'th byte of (16^j * i * G + U_i) */
+} secp256k1_ecmult_gen_consts_t;
+
+static const secp256k1_ecmult_gen_consts_t *secp256k1_ecmult_gen_consts = NULL;
+
+static void secp256k1_ecmult_gen_start(void) {
+    if (secp256k1_ecmult_gen_consts != NULL)
+        return;
+
+    /* Allocate the precomputation table. */
+    secp256k1_ecmult_gen_consts_t *ret = (secp256k1_ecmult_gen_consts_t*)malloc(sizeof(secp256k1_ecmult_gen_consts_t));
+
+    /* get the generator */
+    const secp256k1_ge_t *g = &secp256k1_ge_consts->g;
+    secp256k1_gej_t gj; secp256k1_gej_set_ge(&gj, g);
+
+    /* Construct a group element with no known corresponding scalar (nothing up my sleeve). */
+    secp256k1_gej_t nums_gej;
+    {
+        static const unsigned char nums_b32[32] = "The scalar for this x is unknown";
+        secp256k1_fe_t nums_x;
+        secp256k1_fe_set_b32(&nums_x, nums_b32);
+        secp256k1_ge_t nums_ge;
+        VERIFY_CHECK(secp256k1_ge_set_xo(&nums_ge, &nums_x, 0));
+        secp256k1_gej_set_ge(&nums_gej, &nums_ge);
+        /* Add G to make the bits in x uniformly distributed. */
+        secp256k1_gej_add_ge_var(&nums_gej, &nums_gej, g);
+    }
+
+    /* compute prec. */
+    secp256k1_ge_t prec[1024];
+    {
+        secp256k1_gej_t precj[1024]; /* Jacobian versions of prec. */
+        secp256k1_gej_t gbase; gbase = gj; /* 16^j * G */
+        secp256k1_gej_t numsbase; numsbase = nums_gej; /* 2^j * nums. */
+        for (int j=0; j<64; j++) {
+            /* Set precj[j*16 .. j*16+15] to (numsbase, numsbase + gbase, ..., numsbase + 15*gbase). */
+            precj[j*16] = numsbase;
+            for (int i=1; i<16; i++) {
+                secp256k1_gej_add_var(&precj[j*16 + i], &precj[j*16 + i - 1], &gbase);
+            }
+            /* Multiply gbase by 16. */
+            for (int i=0; i<4; i++) {
+                secp256k1_gej_double_var(&gbase, &gbase);
+            }
+            /* Multiply numbase by 2. */
+            secp256k1_gej_double_var(&numsbase, &numsbase);
+            if (j == 62) {
+                /* In the last iteration, numsbase is (1 - 2^j) * nums instead. */
+                secp256k1_gej_neg(&numsbase, &numsbase);
+                secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej);
+            }
+        }
+        secp256k1_ge_set_all_gej_var(1024, prec, precj);
+    }
+    for (int j=0; j<64; j++) {
+        for (int i=0; i<16; i++) {
+            const unsigned char* raw = (const unsigned char*)(&prec[j*16 + i]);
+            for (size_t k=0; k<sizeof(secp256k1_ge_t); k++)
+                ret->prec[j][k][i] = raw[k];
+        }
+    }
+
+    /* Set the global pointer to the precomputation table. */
+    secp256k1_ecmult_gen_consts = ret;
+}
+
+static void secp256k1_ecmult_gen_stop(void) {
+    if (secp256k1_ecmult_gen_consts == NULL)
+        return;
+
+    secp256k1_ecmult_gen_consts_t *c = (secp256k1_ecmult_gen_consts_t*)secp256k1_ecmult_gen_consts;
+    secp256k1_ecmult_gen_consts = NULL;
+    free(c);
+}
+
+static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *gn) {
+    const secp256k1_ecmult_gen_consts_t *c = secp256k1_ecmult_gen_consts;
+    secp256k1_gej_set_infinity(r);
+    secp256k1_ge_t add;
+    int bits;
+    for (int j=0; j<64; j++) {
+        bits = secp256k1_scalar_get_bits(gn, j * 4, 4);
+        for (size_t k=0; k<sizeof(secp256k1_ge_t); k++)
+            ((unsigned char*)(&add))[k] = c->prec[j][k][bits];
+        secp256k1_gej_add_ge(r, r, &add);
+    }
+    bits = 0;
+    secp256k1_ge_clear(&add);
+}
+
+#endif
diff --git a/src/ecmult_impl.h b/src/ecmult_impl.h
new file mode 100644
index 000000000000..508902564e98
--- /dev/null
+++ b/src/ecmult_impl.h
@@ -0,0 +1,222 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_ECMULT_IMPL_H_
+#define _SECP256K1_ECMULT_IMPL_H_
+
+#include "num.h"
+#include "group.h"
+#include "ecmult.h"
+
+/* optimal for 128-bit and 256-bit exponents. */
+#define WINDOW_A 5
+
+/** larger numbers may result in slightly better performance, at the cost of
+    exponentially larger precomputed tables. WINDOW_G == 14 results in 640 KiB. */
+#define WINDOW_G 14
+
+/** Fill a table 'pre' with precomputed odd multiples of a. W determines the size of the table.
+ *  pre will contains the values [1*a,3*a,5*a,...,(2^(w-1)-1)*a], so it needs place for
+ *  2^(w-2) entries.
+ *
+ *  There are two versions of this function:
+ *  - secp256k1_ecmult_precomp_wnaf_gej, which operates on group elements in jacobian notation,
+ *    fast to precompute, but slower to use in later additions.
+ *  - secp256k1_ecmult_precomp_wnaf_ge, which operates on group elements in affine notations,
+ *    (much) slower to precompute, but a bit faster to use in later additions.
+ *  To compute a*P + b*G, we use the jacobian version for P, and the affine version for G, as
+ *  G is constant, so it only needs to be done once in advance.
+ */
+static void secp256k1_ecmult_table_precomp_gej_var(secp256k1_gej_t *pre, const secp256k1_gej_t *a, int w) {
+    pre[0] = *a;
+    secp256k1_gej_t d; secp256k1_gej_double_var(&d, &pre[0]);
+    for (int i=1; i<(1 << (w-2)); i++)
+        secp256k1_gej_add_var(&pre[i], &d, &pre[i-1]);
+}
+
+static void secp256k1_ecmult_table_precomp_ge_var(secp256k1_ge_t *pre, const secp256k1_gej_t *a, int w) {
+    const int table_size = 1 << (w-2);
+    secp256k1_gej_t prej[table_size];
+    prej[0] = *a;
+    secp256k1_gej_t d; secp256k1_gej_double_var(&d, a);
+    for (int i=1; i<table_size; i++) {
+        secp256k1_gej_add_var(&prej[i], &d, &prej[i-1]);
+    }
+    secp256k1_ge_set_all_gej_var(table_size, pre, prej);
+}
+
+/** The number of entries a table with precomputed multiples needs to have. */
+#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2))
+
+/** The following two macro retrieves a particular odd multiple from a table
+ *  of precomputed multiples. */
+#define ECMULT_TABLE_GET(r,pre,n,w,neg) do { \
+    VERIFY_CHECK(((n) & 1) == 1); \
+    VERIFY_CHECK((n) >= -((1 << ((w)-1)) - 1)); \
+    VERIFY_CHECK((n) <=  ((1 << ((w)-1)) - 1)); \
+    if ((n) > 0) \
+        *(r) = (pre)[((n)-1)/2]; \
+    else \
+        (neg)((r), &(pre)[(-(n)-1)/2]); \
+} while(0)
+
+#define ECMULT_TABLE_GET_GEJ(r,pre,n,w) ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_gej_neg)
+#define ECMULT_TABLE_GET_GE(r,pre,n,w)  ECMULT_TABLE_GET((r),(pre),(n),(w),secp256k1_ge_neg)
+
+typedef struct {
+    /* For accelerating the computation of a*P + b*G: */
+    secp256k1_ge_t pre_g[ECMULT_TABLE_SIZE(WINDOW_G)];    /* odd multiples of the generator */
+    secp256k1_ge_t pre_g_128[ECMULT_TABLE_SIZE(WINDOW_G)]; /* odd multiples of 2^128*generator */
+} secp256k1_ecmult_consts_t;
+
+static const secp256k1_ecmult_consts_t *secp256k1_ecmult_consts = NULL;
+
+static void secp256k1_ecmult_start(void) {
+    if (secp256k1_ecmult_consts != NULL)
+        return;
+
+    /* Allocate the precomputation table. */
+    secp256k1_ecmult_consts_t *ret = (secp256k1_ecmult_consts_t*)malloc(sizeof(secp256k1_ecmult_consts_t));
+
+    /* get the generator */
+    const secp256k1_ge_t *g = &secp256k1_ge_consts->g;
+    secp256k1_gej_t gj; secp256k1_gej_set_ge(&gj, g);
+
+    /* calculate 2^128*generator */
+    secp256k1_gej_t g_128j = gj;
+    for (int i=0; i<128; i++)
+        secp256k1_gej_double_var(&g_128j, &g_128j);
+
+    /* precompute the tables with odd multiples */
+    secp256k1_ecmult_table_precomp_ge_var(ret->pre_g, &gj, WINDOW_G);
+    secp256k1_ecmult_table_precomp_ge_var(ret->pre_g_128, &g_128j, WINDOW_G);
+
+    /* Set the global pointer to the precomputation table. */
+    secp256k1_ecmult_consts = ret;
+}
+
+static void secp256k1_ecmult_stop(void) {
+    if (secp256k1_ecmult_consts == NULL)
+        return;
+
+    secp256k1_ecmult_consts_t *c = (secp256k1_ecmult_consts_t*)secp256k1_ecmult_consts;
+    secp256k1_ecmult_consts = NULL;
+    free(c);
+}
+
+/** Convert a number to WNAF notation. The number becomes represented by sum(2^i * wnaf[i], i=0..bits),
+ *  with the following guarantees:
+ *  - each wnaf[i] is either 0, or an odd integer between -(1<<(w-1) - 1) and (1<<(w-1) - 1)
+ *  - two non-zero entries in wnaf are separated by at least w-1 zeroes.
+ *  - the index of the highest non-zero entry in wnaf (=return value-1) is at most bits, where
+ *    bits is the number of bits necessary to represent the absolute value of the input.
+ */
+static int secp256k1_ecmult_wnaf(int *wnaf, const secp256k1_num_t *a, int w) {
+    int ret = 0;
+    int zeroes = 0;
+    secp256k1_num_t x;
+    secp256k1_num_copy(&x, a);
+    int sign = 1;
+    if (secp256k1_num_is_neg(&x)) {
+        sign = -1;
+        secp256k1_num_negate(&x);
+    }
+    while (!secp256k1_num_is_zero(&x)) {
+        while (!secp256k1_num_is_odd(&x)) {
+            zeroes++;
+            secp256k1_num_shift(&x, 1);
+        }
+        int word = secp256k1_num_shift(&x, w);
+        while (zeroes) {
+            wnaf[ret++] = 0;
+            zeroes--;
+        }
+        if (word & (1 << (w-1))) {
+            secp256k1_num_inc(&x);
+            wnaf[ret++] = sign * (word - (1 << w));
+        } else {
+            wnaf[ret++] = sign * word;
+        }
+        zeroes = w-1;
+    }
+    return ret;
+}
+
+static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_num_t *na, const secp256k1_num_t *ng) {
+    const secp256k1_ecmult_consts_t *c = secp256k1_ecmult_consts;
+
+#ifdef USE_ENDOMORPHISM
+    secp256k1_num_t na_1, na_lam;
+    /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */
+    secp256k1_gej_split_exp_var(&na_1, &na_lam, na);
+
+    /* build wnaf representation for na_1 and na_lam. */
+    int wnaf_na_1[129];   int bits_na_1   = secp256k1_ecmult_wnaf(wnaf_na_1,   &na_1,   WINDOW_A);
+    int wnaf_na_lam[129]; int bits_na_lam = secp256k1_ecmult_wnaf(wnaf_na_lam, &na_lam, WINDOW_A);
+    int bits = bits_na_1;
+    if (bits_na_lam > bits) bits = bits_na_lam;
+#else
+    /* build wnaf representation for na. */
+    int wnaf_na[257];     int bits_na     = secp256k1_ecmult_wnaf(wnaf_na,     na,      WINDOW_A);
+    int bits = bits_na;
+#endif
+
+    /* calculate odd multiples of a */
+    secp256k1_gej_t pre_a[ECMULT_TABLE_SIZE(WINDOW_A)];
+    secp256k1_ecmult_table_precomp_gej_var(pre_a, a, WINDOW_A);
+
+#ifdef USE_ENDOMORPHISM
+    secp256k1_gej_t pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)];
+    for (int i=0; i<ECMULT_TABLE_SIZE(WINDOW_A); i++)
+        secp256k1_gej_mul_lambda(&pre_a_lam[i], &pre_a[i]);
+#endif
+
+    /* Splitted G factors. */
+    secp256k1_num_t ng_1, ng_128;
+
+    /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */
+    secp256k1_num_split(&ng_1, &ng_128, ng, 128);
+
+    /* Build wnaf representation for ng_1 and ng_128 */
+    int wnaf_ng_1[129];   int bits_ng_1   = secp256k1_ecmult_wnaf(wnaf_ng_1,   &ng_1,   WINDOW_G);
+    int wnaf_ng_128[129]; int bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, &ng_128, WINDOW_G);
+    if (bits_ng_1 > bits) bits = bits_ng_1;
+    if (bits_ng_128 > bits) bits = bits_ng_128;
+
+    secp256k1_gej_set_infinity(r);
+    secp256k1_gej_t tmpj;
+    secp256k1_ge_t tmpa;
+
+    for (int i=bits-1; i>=0; i--) {
+        secp256k1_gej_double_var(r, r);
+        int n;
+#ifdef USE_ENDOMORPHISM
+        if (i < bits_na_1 && (n = wnaf_na_1[i])) {
+            ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A);
+            secp256k1_gej_add_var(r, r, &tmpj);
+        }
+        if (i < bits_na_lam && (n = wnaf_na_lam[i])) {
+            ECMULT_TABLE_GET_GEJ(&tmpj, pre_a_lam, n, WINDOW_A);
+            secp256k1_gej_add_var(r, r, &tmpj);
+        }
+#else
+        if (i < bits_na && (n = wnaf_na[i])) {
+            ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A);
+            secp256k1_gej_add_var(r, r, &tmpj);
+        }
+#endif
+        if (i < bits_ng_1 && (n = wnaf_ng_1[i])) {
+            ECMULT_TABLE_GET_GE(&tmpa, c->pre_g, n, WINDOW_G);
+            secp256k1_gej_add_ge_var(r, r, &tmpa);
+        }
+        if (i < bits_ng_128 && (n = wnaf_ng_128[i])) {
+            ECMULT_TABLE_GET_GE(&tmpa, c->pre_g_128, n, WINDOW_G);
+            secp256k1_gej_add_ge_var(r, r, &tmpa);
+        }
+    }
+}
+
+#endif
diff --git a/src/field.h b/src/field.h
new file mode 100644
index 000000000000..c7feead900ec
--- /dev/null
+++ b/src/field.h
@@ -0,0 +1,114 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_
+#define _SECP256K1_FIELD_
+
+/** Field element module.
+ *
+ *  Field elements can be represented in several ways, but code accessing
+ *  it (and implementations) need to take certain properaties into account:
+ *  - Each field element can be normalized or not.
+ *  - Each field element has a magnitude, which represents how far away
+ *    its representation is away from normalization. Normalized elements
+ *    always have a magnitude of 1, but a magnitude of 1 doesn't imply
+ *    normality.
+ */
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#if defined(USE_FIELD_GMP)
+#include "field_gmp.h"
+#elif defined(USE_FIELD_10X26)
+#include "field_10x26.h"
+#elif defined(USE_FIELD_5X52)
+#include "field_5x52.h"
+#else
+#error "Please select field implementation"
+#endif
+
+typedef struct {
+    secp256k1_num_t p;
+} secp256k1_fe_consts_t;
+
+static const secp256k1_fe_consts_t *secp256k1_fe_consts = NULL;
+
+/** Initialize field element precomputation data. */
+static void secp256k1_fe_start(void);
+
+/** Unload field element precomputation data. */
+static void secp256k1_fe_stop(void);
+
+/** Normalize a field element. */
+static void secp256k1_fe_normalize(secp256k1_fe_t *r);
+
+/** Set a field element equal to a small integer. Resulting field element is normalized. */
+static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a);
+
+/** Verify whether a field element is zero. Requires the input to be normalized. */
+static int secp256k1_fe_is_zero(const secp256k1_fe_t *a);
+
+/** Check the "oddness" of a field element. Requires the input to be normalized. */
+static int secp256k1_fe_is_odd(const secp256k1_fe_t *a);
+
+/** Compare two field elements. Requires both inputs to be normalized */
+static int secp256k1_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b);
+
+/** Set a field element equal to 32-byte big endian value. Resulting field element is normalized. */
+static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a);
+
+/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
+static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a);
+
+/** Set a field element equal to the additive inverse of another. Takes a maximum magnitude of the input
+ *  as an argument. The magnitude of the output is one higher. */
+static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m);
+
+/** Multiplies the passed field element with a small integer constant. Multiplies the magnitude by that
+ *  small integer. */
+static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a);
+
+/** Adds a field element to another. The result has the sum of the inputs' magnitudes as magnitude. */
+static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a);
+
+/** Sets a field element to be the product of two others. Requires the inputs' magnitudes to be at most 8.
+ *  The output magnitude is 1 (but not guaranteed to be normalized). */
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b);
+
+/** Sets a field element to be the square of another. Requires the input's magnitude to be at most 8.
+ *  The output magnitude is 1 (but not guaranteed to be normalized). */
+static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a);
+
+/** Sets a field element to be the (modular) square root (if any exist) of another. Requires the
+ *  input's magnitude to be at most 8. The output magnitude is 1 (but not guaranteed to be
+ *  normalized). Return value indicates whether a square root was found. */
+static int secp256k1_fe_sqrt(secp256k1_fe_t *r, const secp256k1_fe_t *a);
+
+/** Sets a field element to be the (modular) inverse of another. Requires the input's magnitude to be
+ *  at most 8. The output magnitude is 1 (but not guaranteed to be normalized). */
+static void secp256k1_fe_inv(secp256k1_fe_t *r, const secp256k1_fe_t *a);
+
+/** Potentially faster version of secp256k1_fe_inv, without constant-time guarantee. */
+static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a);
+
+/** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be
+ *  at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and
+ *  outputs must not overlap in memory. */
+static void secp256k1_fe_inv_all(size_t len, secp256k1_fe_t r[len], const secp256k1_fe_t a[len]);
+
+/** Potentially faster version of secp256k1_fe_inv_all, without constant-time guarantee. */
+static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t r[len], const secp256k1_fe_t a[len]);
+
+
+/** Convert a field element to a hexadecimal string. */
+static void secp256k1_fe_get_hex(char *r, int *rlen, const secp256k1_fe_t *a);
+
+/** Convert a hexadecimal string to a field element. */
+static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen);
+
+#endif
diff --git a/src/field_10x26.h b/src/field_10x26.h
new file mode 100644
index 000000000000..66fb3f2563a6
--- /dev/null
+++ b/src/field_10x26.h
@@ -0,0 +1,21 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_
+#define _SECP256K1_FIELD_REPR_
+
+#include <stdint.h>
+
+typedef struct {
+    /* X = sum(i=0..9, elem[i]*2^26) mod n */
+    uint32_t n[10];
+#ifdef VERIFY
+    int magnitude;
+    int normalized;
+#endif
+} secp256k1_fe_t;
+
+#endif
diff --git a/src/field_10x26_impl.h b/src/field_10x26_impl.h
new file mode 100644
index 000000000000..c0f1be0b2d80
--- /dev/null
+++ b/src/field_10x26_impl.h
@@ -0,0 +1,884 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_IMPL_H_
+#define _SECP256K1_FIELD_REPR_IMPL_H_
+
+#include <stdio.h>
+#include <string.h>
+#include "util.h"
+#include "num.h"
+#include "field.h"
+
+static void secp256k1_fe_inner_start(void) {}
+static void secp256k1_fe_inner_stop(void) {}
+
+#ifdef VERIFY
+static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
+    const uint32_t *d = a->n;
+    int m = a->normalized ? 1 : 2 * a->magnitude, r = 1;
+    r &= (d[0] <= 0x3FFFFFFUL * m);
+    r &= (d[1] <= 0x3FFFFFFUL * m);
+    r &= (d[2] <= 0x3FFFFFFUL * m);
+    r &= (d[3] <= 0x3FFFFFFUL * m);
+    r &= (d[4] <= 0x3FFFFFFUL * m);
+    r &= (d[5] <= 0x3FFFFFFUL * m);
+    r &= (d[6] <= 0x3FFFFFFUL * m);
+    r &= (d[7] <= 0x3FFFFFFUL * m);
+    r &= (d[8] <= 0x3FFFFFFUL * m);
+    r &= (d[9] <= 0x03FFFFFUL * m);
+    r &= (a->magnitude >= 0);
+    if (a->normalized) {
+        r &= (a->magnitude <= 1);
+        if (r && (d[9] == 0x03FFFFFUL)) {
+            uint32_t mid = d[8] & d[7] & d[6] & d[5] & d[4] & d[3] & d[2];
+            if (mid == 0x3FFFFFFUL) {
+                r &= ((d[1] + 0x40UL + ((d[0] + 0x3D1UL) >> 26)) <= 0x3FFFFFFUL);
+            }
+        }
+    }
+    VERIFY_CHECK(r == 1);
+}
+#else
+static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
+    (void)a;
+}
+#endif
+
+static void secp256k1_fe_normalize(secp256k1_fe_t *r) {
+    uint32_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4],
+             t5 = r->n[5], t6 = r->n[6], t7 = r->n[7], t8 = r->n[8], t9 = r->n[9];
+
+    /* Reduce t9 at the start so there will be at most a single carry from the first pass */
+    uint32_t x = t9 >> 22; t9 &= 0x03FFFFFUL;
+    uint32_t m;
+
+    /* The first pass ensures the magnitude is 1, ... */
+    t0 += x * 0x3D1UL; t1 += (x << 6);
+    t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL;
+    t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL;
+    t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL; m = t2;
+    t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL; m &= t3;
+    t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL; m &= t4;
+    t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL; m &= t5;
+    t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL; m &= t6;
+    t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL; m &= t7;
+    t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL; m &= t8;
+
+    /* ... except for a possible carry at bit 22 of t9 (i.e. bit 256 of the field element) */
+    VERIFY_CHECK(t9 >> 23 == 0);
+
+    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
+    x = (t9 >> 22) | ((t9 == 0x03FFFFFUL) & (m == 0x3FFFFFFUL)
+        & ((t1 + 0x40UL + ((t0 + 0x3D1UL) >> 26)) > 0x3FFFFFFUL));
+
+    /* Apply the final reduction (for constant-time behaviour, we do it always) */
+    t0 += x * 0x3D1UL; t1 += (x << 6);
+    t1 += (t0 >> 26); t0 &= 0x3FFFFFFUL;
+    t2 += (t1 >> 26); t1 &= 0x3FFFFFFUL;
+    t3 += (t2 >> 26); t2 &= 0x3FFFFFFUL;
+    t4 += (t3 >> 26); t3 &= 0x3FFFFFFUL;
+    t5 += (t4 >> 26); t4 &= 0x3FFFFFFUL;
+    t6 += (t5 >> 26); t5 &= 0x3FFFFFFUL;
+    t7 += (t6 >> 26); t6 &= 0x3FFFFFFUL;
+    t8 += (t7 >> 26); t7 &= 0x3FFFFFFUL;
+    t9 += (t8 >> 26); t8 &= 0x3FFFFFFUL;
+
+    /* If t9 didn't carry to bit 22 already, then it should have after any final reduction */
+    VERIFY_CHECK(t9 >> 22 == x);
+
+    /* Mask off the possible multiple of 2^256 from the final reduction */
+    t9 &= 0x03FFFFFUL;
+
+    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
+    r->n[5] = t5; r->n[6] = t6; r->n[7] = t7; r->n[8] = t8; r->n[9] = t9;
+
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a) {
+    r->n[0] = a;
+    r->n[1] = r->n[2] = r->n[3] = r->n[4] = r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0;
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    const uint32_t *t = a->n;
+    return (t[0] | t[1] | t[2] | t[3] | t[4] | t[5] | t[6] | t[7] | t[8] | t[9]) == 0;
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    return a->n[0] & 1;
+}
+
+SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe_t *a) {
+#ifdef VERIFY
+    a->magnitude = 0;
+    a->normalized = 1;
+#endif
+    for (int i=0; i<10; i++) {
+        a->n[i] = 0;
+    }
+}
+
+SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    VERIFY_CHECK(b->normalized);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    const uint32_t *t = a->n, *u = b->n;
+    return ((t[0]^u[0]) | (t[1]^u[1]) | (t[2]^u[2]) | (t[3]^u[3]) | (t[4]^u[4])
+          | (t[5]^u[5]) | (t[6]^u[6]) | (t[7]^u[7]) | (t[8]^u[8]) | (t[9]^u[9])) == 0;
+}
+
+static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+    r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
+    r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0;
+    for (int i=0; i<32; i++) {
+        for (int j=0; j<4; j++) {
+            int limb = (8*i+2*j)/26;
+            int shift = (8*i+2*j)%26;
+            r->n[limb] |= (uint32_t)((a[31-i] >> (2*j)) & 0x3) << shift;
+        }
+    }
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
+static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    for (int i=0; i<32; i++) {
+        int c = 0;
+        for (int j=0; j<4; j++) {
+            int limb = (8*i+2*j)/26;
+            int shift = (8*i+2*j)%26;
+            c |= ((a->n[limb] >> shift) & 0x3) << (2 * j);
+        }
+        r[31-i] = c;
+    }
+}
+
+SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= m);
+    secp256k1_fe_verify(a);
+#endif
+    r->n[0] = 0x3FFFC2FUL * 2 * (m + 1) - a->n[0];
+    r->n[1] = 0x3FFFFBFUL * 2 * (m + 1) - a->n[1];
+    r->n[2] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[2];
+    r->n[3] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[3];
+    r->n[4] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[4];
+    r->n[5] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[5];
+    r->n[6] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[6];
+    r->n[7] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[7];
+    r->n[8] = 0x3FFFFFFUL * 2 * (m + 1) - a->n[8];
+    r->n[9] = 0x03FFFFFUL * 2 * (m + 1) - a->n[9];
+#ifdef VERIFY
+    r->magnitude = m + 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a) {
+    r->n[0] *= a;
+    r->n[1] *= a;
+    r->n[2] *= a;
+    r->n[3] *= a;
+    r->n[4] *= a;
+    r->n[5] *= a;
+    r->n[6] *= a;
+    r->n[7] *= a;
+    r->n[8] *= a;
+    r->n[9] *= a;
+#ifdef VERIFY
+    r->magnitude *= a;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    secp256k1_fe_verify(a);
+#endif
+    r->n[0] += a->n[0];
+    r->n[1] += a->n[1];
+    r->n[2] += a->n[2];
+    r->n[3] += a->n[3];
+    r->n[4] += a->n[4];
+    r->n[5] += a->n[5];
+    r->n[6] += a->n[6];
+    r->n[7] += a->n[7];
+    r->n[8] += a->n[8];
+    r->n[9] += a->n[9];
+#ifdef VERIFY
+    r->magnitude += a->magnitude;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+#ifdef VERIFY
+#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0)
+#else
+#define VERIFY_BITS(x, n) do { } while(0)
+#endif
+
+SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint32_t *a, const uint32_t *b, uint32_t *r) {
+    VERIFY_BITS(a[0], 30);
+    VERIFY_BITS(a[1], 30);
+    VERIFY_BITS(a[2], 30);
+    VERIFY_BITS(a[3], 30);
+    VERIFY_BITS(a[4], 30);
+    VERIFY_BITS(a[5], 30);
+    VERIFY_BITS(a[6], 30);
+    VERIFY_BITS(a[7], 30);
+    VERIFY_BITS(a[8], 30);
+    VERIFY_BITS(a[9], 26);
+    VERIFY_BITS(b[0], 30);
+    VERIFY_BITS(b[1], 30);
+    VERIFY_BITS(b[2], 30);
+    VERIFY_BITS(b[3], 30);
+    VERIFY_BITS(b[4], 30);
+    VERIFY_BITS(b[5], 30);
+    VERIFY_BITS(b[6], 30);
+    VERIFY_BITS(b[7], 30);
+    VERIFY_BITS(b[8], 30);
+    VERIFY_BITS(b[9], 26);
+
+    const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL;
+    /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n.
+     *  px is a shorthand for sum(a[i]*b[x-i], i=0..x).
+     *  Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0].
+     */
+
+    uint64_t c, d;
+
+    d  = (uint64_t)a[0] * b[9]
+       + (uint64_t)a[1] * b[8]
+       + (uint64_t)a[2] * b[7]
+       + (uint64_t)a[3] * b[6]
+       + (uint64_t)a[4] * b[5]
+       + (uint64_t)a[5] * b[4]
+       + (uint64_t)a[6] * b[3]
+       + (uint64_t)a[7] * b[2]
+       + (uint64_t)a[8] * b[1]
+       + (uint64_t)a[9] * b[0];
+    /* VERIFY_BITS(d, 64); */
+    /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */
+    uint32_t t9 = d & M; d >>= 26;
+    VERIFY_BITS(t9, 26);
+    VERIFY_BITS(d, 38);
+    /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */
+
+    c  = (uint64_t)a[0] * b[0];
+    VERIFY_BITS(c, 60);
+    /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */
+    d += (uint64_t)a[1] * b[9]
+       + (uint64_t)a[2] * b[8]
+       + (uint64_t)a[3] * b[7]
+       + (uint64_t)a[4] * b[6]
+       + (uint64_t)a[5] * b[5]
+       + (uint64_t)a[6] * b[4]
+       + (uint64_t)a[7] * b[3]
+       + (uint64_t)a[8] * b[2]
+       + (uint64_t)a[9] * b[1];
+    VERIFY_BITS(d, 63);
+    /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    uint64_t u0 = d & M; d >>= 26; c += u0 * R0;
+    VERIFY_BITS(u0, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 61);
+    /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    uint32_t t0 = c & M; c >>= 26; c += u0 * R1;
+    VERIFY_BITS(t0, 26);
+    VERIFY_BITS(c, 37);
+    /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+
+    c += (uint64_t)a[0] * b[1]
+       + (uint64_t)a[1] * b[0];
+    VERIFY_BITS(c, 62);
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    d += (uint64_t)a[2] * b[9]
+       + (uint64_t)a[3] * b[8]
+       + (uint64_t)a[4] * b[7]
+       + (uint64_t)a[5] * b[6]
+       + (uint64_t)a[6] * b[5]
+       + (uint64_t)a[7] * b[4]
+       + (uint64_t)a[8] * b[3]
+       + (uint64_t)a[9] * b[2];
+    VERIFY_BITS(d, 63);
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    uint64_t u1 = d & M; d >>= 26; c += u1 * R0;
+    VERIFY_BITS(u1, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 63);
+    /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    uint32_t t1 = c & M; c >>= 26; c += u1 * R1;
+    VERIFY_BITS(t1, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+
+    c += (uint64_t)a[0] * b[2]
+       + (uint64_t)a[1] * b[1]
+       + (uint64_t)a[2] * b[0];
+    VERIFY_BITS(c, 62);
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    d += (uint64_t)a[3] * b[9]
+       + (uint64_t)a[4] * b[8]
+       + (uint64_t)a[5] * b[7]
+       + (uint64_t)a[6] * b[6]
+       + (uint64_t)a[7] * b[5]
+       + (uint64_t)a[8] * b[4]
+       + (uint64_t)a[9] * b[3];
+    VERIFY_BITS(d, 63);
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    uint64_t u2 = d & M; d >>= 26; c += u2 * R0;
+    VERIFY_BITS(u2, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 63);
+    /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    uint32_t t2 = c & M; c >>= 26; c += u2 * R1;
+    VERIFY_BITS(t2, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[3]
+       + (uint64_t)a[1] * b[2]
+       + (uint64_t)a[2] * b[1]
+       + (uint64_t)a[3] * b[0];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    d += (uint64_t)a[4] * b[9]
+       + (uint64_t)a[5] * b[8]
+       + (uint64_t)a[6] * b[7]
+       + (uint64_t)a[7] * b[6]
+       + (uint64_t)a[8] * b[5]
+       + (uint64_t)a[9] * b[4];
+    VERIFY_BITS(d, 63);
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    uint64_t u3 = d & M; d >>= 26; c += u3 * R0;
+    VERIFY_BITS(u3, 26);
+    VERIFY_BITS(d, 37);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    uint32_t t3 = c & M; c >>= 26; c += u3 * R1;
+    VERIFY_BITS(t3, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[4]
+       + (uint64_t)a[1] * b[3]
+       + (uint64_t)a[2] * b[2]
+       + (uint64_t)a[3] * b[1]
+       + (uint64_t)a[4] * b[0];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[5] * b[9]
+       + (uint64_t)a[6] * b[8]
+       + (uint64_t)a[7] * b[7]
+       + (uint64_t)a[8] * b[6]
+       + (uint64_t)a[9] * b[5];
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    uint64_t u4 = d & M; d >>= 26; c += u4 * R0;
+    VERIFY_BITS(u4, 26);
+    VERIFY_BITS(d, 36);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    uint32_t t4 = c & M; c >>= 26; c += u4 * R1;
+    VERIFY_BITS(t4, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[5]
+       + (uint64_t)a[1] * b[4]
+       + (uint64_t)a[2] * b[3]
+       + (uint64_t)a[3] * b[2]
+       + (uint64_t)a[4] * b[1]
+       + (uint64_t)a[5] * b[0];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[6] * b[9]
+       + (uint64_t)a[7] * b[8]
+       + (uint64_t)a[8] * b[7]
+       + (uint64_t)a[9] * b[6];
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    uint64_t u5 = d & M; d >>= 26; c += u5 * R0;
+    VERIFY_BITS(u5, 26);
+    VERIFY_BITS(d, 36);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    uint32_t t5 = c & M; c >>= 26; c += u5 * R1;
+    VERIFY_BITS(t5, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[6]
+       + (uint64_t)a[1] * b[5]
+       + (uint64_t)a[2] * b[4]
+       + (uint64_t)a[3] * b[3]
+       + (uint64_t)a[4] * b[2]
+       + (uint64_t)a[5] * b[1]
+       + (uint64_t)a[6] * b[0];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[7] * b[9]
+       + (uint64_t)a[8] * b[8]
+       + (uint64_t)a[9] * b[7];
+    VERIFY_BITS(d, 61);
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u6 = d & M; d >>= 26; c += u6 * R0;
+    VERIFY_BITS(u6, 26);
+    VERIFY_BITS(d, 35);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    uint32_t t6 = c & M; c >>= 26; c += u6 * R1;
+    VERIFY_BITS(t6, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[7]
+       + (uint64_t)a[1] * b[6]
+       + (uint64_t)a[2] * b[5]
+       + (uint64_t)a[3] * b[4]
+       + (uint64_t)a[4] * b[3]
+       + (uint64_t)a[5] * b[2]
+       + (uint64_t)a[6] * b[1]
+       + (uint64_t)a[7] * b[0];
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x8000007C00000007ULL);
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[8] * b[9]
+       + (uint64_t)a[9] * b[8];
+    VERIFY_BITS(d, 58);
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u7 = d & M; d >>= 26; c += u7 * R0;
+    VERIFY_BITS(u7, 26);
+    VERIFY_BITS(d, 32);
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL);
+    /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint32_t t7 = c & M; c >>= 26; c += u7 * R1;
+    VERIFY_BITS(t7, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)a[0] * b[8]
+       + (uint64_t)a[1] * b[7]
+       + (uint64_t)a[2] * b[6]
+       + (uint64_t)a[3] * b[5]
+       + (uint64_t)a[4] * b[4]
+       + (uint64_t)a[5] * b[3]
+       + (uint64_t)a[6] * b[2]
+       + (uint64_t)a[7] * b[1]
+       + (uint64_t)a[8] * b[0];
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x9000007B80000008ULL);
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[9] * b[9];
+    VERIFY_BITS(d, 57);
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u8 = d & M; d >>= 26; c += u8 * R0;
+    VERIFY_BITS(u8, 26);
+    VERIFY_BITS(d, 31);
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    r[3] = t3;
+    VERIFY_BITS(r[3], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[4] = t4;
+    VERIFY_BITS(r[4], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[5] = t5;
+    VERIFY_BITS(r[5], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[6] = t6;
+    VERIFY_BITS(r[6], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[7] = t7;
+    VERIFY_BITS(r[7], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    r[8] = c & M; c >>= 26; c += u8 * R1;
+    VERIFY_BITS(r[8], 26);
+    VERIFY_BITS(c, 39);
+    /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c   += d * R0 + t9;
+    VERIFY_BITS(c, 45);
+    /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4);
+    VERIFY_BITS(r[9], 22);
+    VERIFY_BITS(c, 46);
+    /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    d    = c * (R0 >> 4) + t0;
+    VERIFY_BITS(d, 56);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[0] = d & M; d >>= 26;
+    VERIFY_BITS(r[0], 26);
+    VERIFY_BITS(d, 30);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d   += c * (R1 >> 4) + t1;
+    VERIFY_BITS(d, 53);
+    VERIFY_CHECK(d <= 0x10000003FFFFBFULL);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[1] = d & M; d >>= 26;
+    VERIFY_BITS(r[1], 26);
+    VERIFY_BITS(d, 27);
+    VERIFY_CHECK(d <= 0x4000000ULL);
+    /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d   += t2;
+    VERIFY_BITS(d, 27);
+    /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[2] = d;
+    VERIFY_BITS(r[2], 27);
+    /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+}
+
+SECP256K1_INLINE static void secp256k1_fe_sqr_inner(const uint32_t *a, uint32_t *r) {
+    VERIFY_BITS(a[0], 30);
+    VERIFY_BITS(a[1], 30);
+    VERIFY_BITS(a[2], 30);
+    VERIFY_BITS(a[3], 30);
+    VERIFY_BITS(a[4], 30);
+    VERIFY_BITS(a[5], 30);
+    VERIFY_BITS(a[6], 30);
+    VERIFY_BITS(a[7], 30);
+    VERIFY_BITS(a[8], 30);
+    VERIFY_BITS(a[9], 26);
+
+    const uint32_t M = 0x3FFFFFFUL, R0 = 0x3D10UL, R1 = 0x400UL;
+    /** [... a b c] is a shorthand for ... + a<<52 + b<<26 + c<<0 mod n.
+     *  px is a shorthand for sum(a[i]*a[x-i], i=0..x).
+     *  Note that [x 0 0 0 0 0 0 0 0 0 0] = [x*R1 x*R0].
+     */
+
+    uint64_t c, d;
+
+    d  = (uint64_t)(a[0]*2) * a[9]
+       + (uint64_t)(a[1]*2) * a[8]
+       + (uint64_t)(a[2]*2) * a[7]
+       + (uint64_t)(a[3]*2) * a[6]
+       + (uint64_t)(a[4]*2) * a[5];
+    /* VERIFY_BITS(d, 64); */
+    /* [d 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */
+    uint32_t t9 = d & M; d >>= 26;
+    VERIFY_BITS(t9, 26);
+    VERIFY_BITS(d, 38);
+    /* [d t9 0 0 0 0 0 0 0 0 0] = [p9 0 0 0 0 0 0 0 0 0] */
+
+    c  = (uint64_t)a[0] * a[0];
+    VERIFY_BITS(c, 60);
+    /* [d t9 0 0 0 0 0 0 0 0 c] = [p9 0 0 0 0 0 0 0 0 p0] */
+    d += (uint64_t)(a[1]*2) * a[9]
+       + (uint64_t)(a[2]*2) * a[8]
+       + (uint64_t)(a[3]*2) * a[7]
+       + (uint64_t)(a[4]*2) * a[6]
+       + (uint64_t)a[5] * a[5];
+    VERIFY_BITS(d, 63);
+    /* [d t9 0 0 0 0 0 0 0 0 c] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    uint64_t u0 = d & M; d >>= 26; c += u0 * R0;
+    VERIFY_BITS(u0, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 61);
+    /* [d u0 t9 0 0 0 0 0 0 0 0 c-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    uint32_t t0 = c & M; c >>= 26; c += u0 * R1;
+    VERIFY_BITS(t0, 26);
+    VERIFY_BITS(c, 37);
+    /* [d u0 t9 0 0 0 0 0 0 0 c-u0*R1 t0-u0*R0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 0 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[1];
+    VERIFY_BITS(c, 62);
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    d += (uint64_t)(a[2]*2) * a[9]
+       + (uint64_t)(a[3]*2) * a[8]
+       + (uint64_t)(a[4]*2) * a[7]
+       + (uint64_t)(a[5]*2) * a[6];
+    VERIFY_BITS(d, 63);
+    /* [d 0 t9 0 0 0 0 0 0 0 c t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    uint64_t u1 = d & M; d >>= 26; c += u1 * R0;
+    VERIFY_BITS(u1, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 63);
+    /* [d u1 0 t9 0 0 0 0 0 0 0 c-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    uint32_t t1 = c & M; c >>= 26; c += u1 * R1;
+    VERIFY_BITS(t1, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u1 0 t9 0 0 0 0 0 0 c-u1*R1 t1-u1*R0 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 0 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[2]
+       + (uint64_t)a[1] * a[1];
+    VERIFY_BITS(c, 62);
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    d += (uint64_t)(a[3]*2) * a[9]
+       + (uint64_t)(a[4]*2) * a[8]
+       + (uint64_t)(a[5]*2) * a[7]
+       + (uint64_t)a[6] * a[6];
+    VERIFY_BITS(d, 63);
+    /* [d 0 0 t9 0 0 0 0 0 0 c t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    uint64_t u2 = d & M; d >>= 26; c += u2 * R0;
+    VERIFY_BITS(u2, 26);
+    VERIFY_BITS(d, 37);
+    VERIFY_BITS(c, 63);
+    /* [d u2 0 0 t9 0 0 0 0 0 0 c-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    uint32_t t2 = c & M; c >>= 26; c += u2 * R1;
+    VERIFY_BITS(t2, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u2 0 0 t9 0 0 0 0 0 c-u2*R1 t2-u2*R0 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 0 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[3]
+       + (uint64_t)(a[1]*2) * a[2];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    d += (uint64_t)(a[4]*2) * a[9]
+       + (uint64_t)(a[5]*2) * a[8]
+       + (uint64_t)(a[6]*2) * a[7];
+    VERIFY_BITS(d, 63);
+    /* [d 0 0 0 t9 0 0 0 0 0 c t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    uint64_t u3 = d & M; d >>= 26; c += u3 * R0;
+    VERIFY_BITS(u3, 26);
+    VERIFY_BITS(d, 37);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u3 0 0 0 t9 0 0 0 0 0 c-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    uint32_t t3 = c & M; c >>= 26; c += u3 * R1;
+    VERIFY_BITS(t3, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u3 0 0 0 t9 0 0 0 0 c-u3*R1 t3-u3*R0 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 0 p3 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[4]
+       + (uint64_t)(a[1]*2) * a[3]
+       + (uint64_t)a[2] * a[2];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    d += (uint64_t)(a[5]*2) * a[9]
+       + (uint64_t)(a[6]*2) * a[8]
+       + (uint64_t)a[7] * a[7];
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 0 t9 0 0 0 0 c t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    uint64_t u4 = d & M; d >>= 26; c += u4 * R0;
+    VERIFY_BITS(u4, 26);
+    VERIFY_BITS(d, 36);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u4 0 0 0 0 t9 0 0 0 0 c-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    uint32_t t4 = c & M; c >>= 26; c += u4 * R1;
+    VERIFY_BITS(t4, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u4 0 0 0 0 t9 0 0 0 c-u4*R1 t4-u4*R0 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 0 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[5]
+       + (uint64_t)(a[1]*2) * a[4]
+       + (uint64_t)(a[2]*2) * a[3];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)(a[6]*2) * a[9]
+       + (uint64_t)(a[7]*2) * a[8];
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 0 0 t9 0 0 0 c t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    uint64_t u5 = d & M; d >>= 26; c += u5 * R0;
+    VERIFY_BITS(u5, 26);
+    VERIFY_BITS(d, 36);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u5 0 0 0 0 0 t9 0 0 0 c-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    uint32_t t5 = c & M; c >>= 26; c += u5 * R1;
+    VERIFY_BITS(t5, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u5 0 0 0 0 0 t9 0 0 c-u5*R1 t5-u5*R0 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 0 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[6]
+       + (uint64_t)(a[1]*2) * a[5]
+       + (uint64_t)(a[2]*2) * a[4]
+       + (uint64_t)a[3] * a[3];
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)(a[7]*2) * a[9]
+       + (uint64_t)a[8] * a[8];
+    VERIFY_BITS(d, 61);
+    /* [d 0 0 0 0 0 0 t9 0 0 c t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u6 = d & M; d >>= 26; c += u6 * R0;
+    VERIFY_BITS(u6, 26);
+    VERIFY_BITS(d, 35);
+    /* VERIFY_BITS(c, 64); */
+    /* [d u6 0 0 0 0 0 0 t9 0 0 c-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    uint32_t t6 = c & M; c >>= 26; c += u6 * R1;
+    VERIFY_BITS(t6, 26);
+    VERIFY_BITS(c, 39);
+    /* [d u6 0 0 0 0 0 0 t9 0 c-u6*R1 t6-u6*R0 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 0 p6 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[7]
+       + (uint64_t)(a[1]*2) * a[6]
+       + (uint64_t)(a[2]*2) * a[5]
+       + (uint64_t)(a[3]*2) * a[4];
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x8000007C00000007ULL);
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)(a[8]*2) * a[9];
+    VERIFY_BITS(d, 58);
+    /* [d 0 0 0 0 0 0 0 t9 0 c t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u7 = d & M; d >>= 26; c += u7 * R0;
+    VERIFY_BITS(u7, 26);
+    VERIFY_BITS(d, 32);
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x800001703FFFC2F7ULL);
+    /* [d u7 0 0 0 0 0 0 0 t9 0 c-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint32_t t7 = c & M; c >>= 26; c += u7 * R1;
+    VERIFY_BITS(t7, 26);
+    VERIFY_BITS(c, 38);
+    /* [d u7 0 0 0 0 0 0 0 t9 c-u7*R1 t7-u7*R0 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 0 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    c += (uint64_t)(a[0]*2) * a[8]
+       + (uint64_t)(a[1]*2) * a[7]
+       + (uint64_t)(a[2]*2) * a[6]
+       + (uint64_t)(a[3]*2) * a[5]
+       + (uint64_t)a[4] * a[4];
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x9000007B80000008ULL);
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d += (uint64_t)a[9] * a[9];
+    VERIFY_BITS(d, 57);
+    /* [d 0 0 0 0 0 0 0 0 t9 c t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    uint64_t u8 = d & M; d >>= 26; c += u8 * R0;
+    VERIFY_BITS(u8, 26);
+    VERIFY_BITS(d, 31);
+    /* VERIFY_BITS(c, 64); */
+    VERIFY_CHECK(c <= 0x9000016FBFFFC2F8ULL);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 t3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    r[3] = t3;
+    VERIFY_BITS(r[3], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 t4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[4] = t4;
+    VERIFY_BITS(r[4], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 t5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[5] = t5;
+    VERIFY_BITS(r[5], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 t6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[6] = t6;
+    VERIFY_BITS(r[6], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 t7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[7] = t7;
+    VERIFY_BITS(r[7], 26);
+    /* [d u8 0 0 0 0 0 0 0 0 t9 c-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    r[8] = c & M; c >>= 26; c += u8 * R1;
+    VERIFY_BITS(r[8], 26);
+    VERIFY_BITS(c, 39);
+    /* [d u8 0 0 0 0 0 0 0 0 t9+c-u8*R1 r8-u8*R0 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 0 0 t9+c r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c   += d * R0 + t9;
+    VERIFY_BITS(c, 45);
+    /* [d 0 0 0 0 0 0 0 0 0 c-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[9] = c & (M >> 4); c >>= 22; c += d * (R1 << 4);
+    VERIFY_BITS(r[9], 22);
+    VERIFY_BITS(c, 46);
+    /* [d 0 0 0 0 0 0 0 0 r9+((c-d*R1<<4)<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 0 0 0 0 -d*R1 r9+(c<<22)-d*R0 r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 t0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    d    = c * (R0 >> 4) + t0;
+    VERIFY_BITS(d, 56);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1 d-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[0] = d & M; d >>= 26;
+    VERIFY_BITS(r[0], 26);
+    VERIFY_BITS(d, 30);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 t1+d r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d   += c * (R1 >> 4) + t1;
+    VERIFY_BITS(d, 53);
+    VERIFY_CHECK(d <= 0x10000003FFFFBFULL);
+    /* [r9+(c<<22) r8 r7 r6 r5 r4 r3 t2 d-c*R1>>4 r0-c*R0>>4] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [r9 r8 r7 r6 r5 r4 r3 t2 d r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[1] = d & M; d >>= 26;
+    VERIFY_BITS(r[1], 26);
+    VERIFY_BITS(d, 27);
+    VERIFY_CHECK(d <= 0x4000000ULL);
+    /* [r9 r8 r7 r6 r5 r4 r3 t2+d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    d   += t2;
+    VERIFY_BITS(d, 27);
+    /* [r9 r8 r7 r6 r5 r4 r3 d r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[2] = d;
+    VERIFY_BITS(r[2], 27);
+    /* [r9 r8 r7 r6 r5 r4 r3 r2 r1 r0] = [p18 p17 p16 p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+}
+
+
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= 8);
+    VERIFY_CHECK(b->magnitude <= 8);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    secp256k1_fe_mul_inner(a->n, b->n, r->n);
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= 8);
+    secp256k1_fe_verify(a);
+#endif
+    secp256k1_fe_sqr_inner(a->n, r->n);
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+#endif
diff --git a/src/field_5x52.h b/src/field_5x52.h
new file mode 100644
index 000000000000..aeb0a6a1e861
--- /dev/null
+++ b/src/field_5x52.h
@@ -0,0 +1,21 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_
+#define _SECP256K1_FIELD_REPR_
+
+#include <stdint.h>
+
+typedef struct {
+    /* X = sum(i=0..4, elem[i]*2^52) mod n */
+    uint64_t n[5];
+#ifdef VERIFY
+    int magnitude;
+    int normalized;
+#endif
+} secp256k1_fe_t;
+
+#endif
diff --git a/src/field_5x52_asm.asm b/src/field_5x52_asm.asm
new file mode 100644
index 000000000000..5e785f763055
--- /dev/null
+++ b/src/field_5x52_asm.asm
@@ -0,0 +1,469 @@
+	;; Added by Diederik Huys, March 2013
+	;;
+	;; Provided public procedures:
+	;; 	secp256k1_fe_mul_inner
+	;; 	secp256k1_fe_sqr_inner
+	;;
+	;; Needed tools: YASM (http://yasm.tortall.net)
+	;;
+	;; 
+
+	BITS 64
+
+%ifidn   __OUTPUT_FORMAT__,macho64
+%define SYM(x) _ %+ x
+%else
+%define SYM(x) x
+%endif
+
+	;;  Procedure ExSetMult
+	;;  Register Layout:
+	;;  INPUT: 	rdi	= a->n
+	;; 	   	rsi  	= b->n
+	;; 	   	rdx  	= r->a
+	;; 
+	;;  INTERNAL:	rdx:rax  = multiplication accumulator
+	;; 		r9:r8    = c
+	;; 		r10-r13  = t0-t3
+	;; 		r14	 = b.n[0] / t4
+	;; 		r15	 = b.n[1] / t5
+	;; 		rbx	 = b.n[2] / t6
+	;; 		rcx	 = b.n[3] / t7
+	;; 		rbp	 = Constant 0FFFFFFFFFFFFFh / t8
+	;; 		rsi	 = b.n / b.n[4] / t9
+
+	GLOBAL SYM(secp256k1_fe_mul_inner)
+	ALIGN 32
+SYM(secp256k1_fe_mul_inner):
+	push rbp
+	push rbx
+	push r12
+	push r13
+	push r14
+	push r15
+	push rdx
+	mov r14,[rsi+8*0]	; preload b.n[0]. This will be the case until
+				; b.n[0] is no longer needed, then we reassign
+				; r14 to t4
+	;; c=a.n[0] * b.n[0]
+   	mov rax,[rdi+0*8]	; load a.n[0]
+	mov rbp,0FFFFFFFFFFFFFh
+	mul r14			; rdx:rax=a.n[0]*b.n[0]
+	mov r15,[rsi+1*8]
+	mov r10,rbp		; load modulus into target register for t0
+	mov r8,rax
+	and r10,rax		; only need lower qword of c
+	shrd r8,rdx,52
+	xor r9,r9		; c < 2^64, so we ditch the HO part 
+
+	;; c+=a.n[0] * b.n[1] + a.n[1] * b.n[0]
+	mov rax,[rdi+0*8]
+	mul r15			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+1*8]
+	mul r14			
+	mov r11,rbp
+	mov rbx,[rsi+2*8]
+	add r8,rax
+	adc r9,rdx
+	and r11,r8
+	shrd r8,r9,52
+	xor r9,r9
+	
+	;; c+=a.n[0 1 2] * b.n[2 1 0]
+	mov rax,[rdi+0*8]
+	mul rbx			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+1*8]
+	mul r15			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+2*8]
+	mul r14
+	mov r12,rbp		
+	mov rcx,[rsi+3*8]
+	add r8,rax
+	adc r9,rdx
+	and r12,r8		
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[0 1 2 3] * b.n[3 2 1 0]
+	mov rax,[rdi+0*8]
+	mul rcx			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+1*8]
+	mul rbx			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+2*8]
+	mul r15			
+	add r8,rax
+	adc r9,rdx
+	
+	mov rax,[rdi+3*8]
+	mul r14			
+	mov r13,rbp             
+	mov rsi,[rsi+4*8]	; load b.n[4] and destroy pointer
+	add r8,rax
+	adc r9,rdx
+	and r13,r8
+
+	shrd r8,r9,52
+	xor r9,r9		
+
+
+	;; c+=a.n[0 1 2 3 4] * b.n[4 3 2 1 0]
+	mov rax,[rdi+0*8]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+1*8]
+	mul rcx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+2*8]
+	mul rbx			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+3*8]
+	mul r15			
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+4*8]
+	mul r14			
+	mov r14,rbp             ; load modulus into t4 and destroy a.n[0]
+	add r8,rax
+	adc r9,rdx
+	and r14,r8
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[1 2 3 4] * b.n[4 3 2 1]
+	mov rax,[rdi+1*8]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+2*8]
+	mul rcx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+3*8]
+	mul rbx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+4*8]
+	mul r15
+	mov r15,rbp		
+	add r8,rax
+	adc r9,rdx
+
+	and r15,r8
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[2 3 4] * b.n[4 3 2]
+	mov rax,[rdi+2*8]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+3*8]
+	mul rcx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+4*8]
+	mul rbx
+	mov rbx,rbp		
+	add r8,rax
+	adc r9,rdx
+
+	and rbx,r8		
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[3 4] * b.n[4 3]
+	mov rax,[rdi+3*8]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,[rdi+4*8]
+	mul rcx
+	mov rcx,rbp		
+	add r8,rax
+	adc r9,rdx
+	and rcx,r8		
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[4] * b.n[4]
+	mov rax,[rdi+4*8]
+	mul rsi
+	;; mov rbp,rbp		; modulus already there!
+	add r8,rax
+	adc r9,rdx
+	and rbp,r8 
+	shrd r8,r9,52
+	xor r9,r9		
+
+	mov rsi,r8		; load c into t9 and destroy b.n[4]
+
+	;; *******************************************************
+common_exit_norm:
+	mov rdi,01000003D10h	; load constant
+
+	mov rax,r15		; get t5
+	mul rdi
+	add rax,r10    		; +t0
+	adc rdx,0
+	mov r10,0FFFFFFFFFFFFFh ; modulus. Sadly, we ran out of registers!
+	mov r8,rax		; +c
+	and r10,rax
+	shrd r8,rdx,52
+	xor r9,r9
+
+	mov rax,rbx		; get t6
+	mul rdi
+	add rax,r11		; +t1
+	adc rdx,0
+	mov r11,0FFFFFFFFFFFFFh ; modulus
+	add r8,rax		; +c
+	adc r9,rdx
+	and r11,r8
+	shrd r8,r9,52
+	xor r9,r9
+
+	mov rax,rcx    		; get t7
+	mul rdi
+	add rax,r12		; +t2
+	adc rdx,0
+	pop rbx			; retrieve pointer to this.n	
+	mov r12,0FFFFFFFFFFFFFh ; modulus
+	add r8,rax		; +c
+	adc r9,rdx
+	and r12,r8
+	mov [rbx+2*8],r12	; mov into this.n[2]
+	shrd r8,r9,52
+	xor r9,r9
+	
+	mov rax,rbp    		; get t8
+	mul rdi
+	add rax,r13    		; +t3
+	adc rdx,0
+	mov r13,0FFFFFFFFFFFFFh ; modulus
+	add r8,rax		; +c
+	adc r9,rdx
+	and r13,r8
+	mov [rbx+3*8],r13	; -> this.n[3]
+	shrd r8,r9,52
+	xor r9,r9
+	
+	mov rax,rsi    		; get t9
+	mul rdi
+	add rax,r14    		; +t4
+	adc rdx,0
+	mov r14,0FFFFFFFFFFFFh	; !!!
+	add r8,rax		; +c
+	adc r9,rdx
+	and r14,r8
+	mov [rbx+4*8],r14	; -> this.n[4]
+	shrd r8,r9,48		; !!!
+	xor r9,r9
+	
+	mov rax,01000003D1h
+	mul r8		
+	add rax,r10
+	adc rdx,0
+	mov r10,0FFFFFFFFFFFFFh ; modulus
+	mov r8,rax
+	and rax,r10
+	shrd r8,rdx,52
+	mov [rbx+0*8],rax	; -> this.n[0]
+	add r8,r11
+	mov [rbx+1*8],r8	; -> this.n[1]
+
+	pop r15
+	pop r14
+	pop r13
+	pop r12
+	pop rbx
+	pop rbp
+	ret
+
+	
+	;;  PROC ExSetSquare
+	;;  Register Layout:
+	;;  INPUT: 	rdi	 = a.n
+	;; 	   	rsi  	 = this.a
+	;;  INTERNAL:	rdx:rax  = multiplication accumulator
+	;; 		r9:r8    = c
+	;; 		r10-r13  = t0-t3
+	;; 		r14	 = a.n[0] / t4
+	;; 		r15	 = a.n[1] / t5
+	;; 		rbx	 = a.n[2] / t6
+	;; 		rcx	 = a.n[3] / t7
+	;; 		rbp	 = 0FFFFFFFFFFFFFh / t8
+	;; 		rsi	 = a.n[4] / t9
+	GLOBAL SYM(secp256k1_fe_sqr_inner)
+	ALIGN 32
+SYM(secp256k1_fe_sqr_inner):
+	push rbp
+	push rbx
+	push r12
+	push r13
+	push r14
+	push r15
+	push rsi
+	mov rbp,0FFFFFFFFFFFFFh
+	
+	;; c=a.n[0] * a.n[0]
+   	mov r14,[rdi+0*8]	; r14=a.n[0]
+	mov r10,rbp		; modulus 
+	mov rax,r14
+	mul rax
+	mov r15,[rdi+1*8]	; a.n[1]
+	add r14,r14		; r14=2*a.n[0]
+	mov r8,rax
+	and r10,rax		; only need lower qword
+	shrd r8,rdx,52
+	xor r9,r9
+
+	;; c+=2*a.n[0] * a.n[1]
+	mov rax,r14		; r14=2*a.n[0]
+	mul r15
+	mov rbx,[rdi+2*8]	; rbx=a.n[2]
+	mov r11,rbp 		; modulus
+	add r8,rax
+	adc r9,rdx
+	and r11,r8
+	shrd r8,r9,52
+	xor r9,r9
+	
+	;; c+=2*a.n[0]*a.n[2]+a.n[1]*a.n[1]
+	mov rax,r14
+	mul rbx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,r15
+	mov r12,rbp		; modulus
+	mul rax
+	mov rcx,[rdi+3*8]	; rcx=a.n[3]
+	add r15,r15		; r15=a.n[1]*2
+	add r8,rax
+	adc r9,rdx
+	and r12,r8		; only need lower dword
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=2*a.n[0]*a.n[3]+2*a.n[1]*a.n[2]
+	mov rax,r14
+	mul rcx
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,r15		; rax=2*a.n[1]
+	mov r13,rbp		; modulus
+	mul rbx
+	mov rsi,[rdi+4*8]	; rsi=a.n[4]
+	add r8,rax
+	adc r9,rdx
+	and r13,r8
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=2*a.n[0]*a.n[4]+2*a.n[1]*a.n[3]+a.n[2]*a.n[2]
+	mov rax,r14		; last time we need 2*a.n[0]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,r15
+	mul rcx
+	mov r14,rbp		; modulus
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,rbx
+	mul rax
+	add rbx,rbx		; rcx=2*a.n[2]
+	add r8,rax
+	adc r9,rdx
+	and r14,r8
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=2*a.n[1]*a.n[4]+2*a.n[2]*a.n[3]
+	mov rax,r15		; last time we need 2*a.n[1]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,rbx
+	mul rcx
+	mov r15,rbp		; modulus
+	add r8,rax
+	adc r9,rdx
+	and r15,r8
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=2*a.n[2]*a.n[4]+a.n[3]*a.n[3]
+	mov rax,rbx		; last time we need 2*a.n[2]
+	mul rsi
+	add r8,rax
+	adc r9,rdx
+
+	mov rax,rcx		; a.n[3]
+	mul rax
+	mov rbx,rbp		; modulus
+	add r8,rax
+	adc r9,rdx
+	and rbx,r8		; only need lower dword
+	lea rax,[2*rcx]
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=2*a.n[3]*a.n[4]
+	mul rsi
+	mov rcx,rbp		; modulus
+	add r8,rax
+	adc r9,rdx
+	and rcx,r8		; only need lower dword
+	shrd r8,r9,52
+	xor r9,r9		
+
+	;; c+=a.n[4]*a.n[4]
+	mov rax,rsi
+	mul rax
+	;; mov rbp,rbp		; modulus is already there!
+	add r8,rax
+	adc r9,rdx
+	and rbp,r8 
+	shrd r8,r9,52
+	xor r9,r9		
+
+	mov rsi,r8
+
+	;; *******************************************************
+	jmp common_exit_norm
+	end
+
+	
diff --git a/src/field_5x52_asm_impl.h b/src/field_5x52_asm_impl.h
new file mode 100644
index 000000000000..f29605b11b98
--- /dev/null
+++ b/src/field_5x52_asm_impl.h
@@ -0,0 +1,13 @@
+/**********************************************************************
+ * Copyright (c) 2013 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_
+#define _SECP256K1_FIELD_INNER5X52_IMPL_H_
+
+void __attribute__ ((sysv_abi)) secp256k1_fe_mul_inner(const uint64_t *a, const uint64_t *b, uint64_t *r);
+void __attribute__ ((sysv_abi)) secp256k1_fe_sqr_inner(const uint64_t *a, uint64_t *r);
+
+#endif
diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h
new file mode 100644
index 000000000000..d1b06d05a480
--- /dev/null
+++ b/src/field_5x52_impl.h
@@ -0,0 +1,260 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_IMPL_H_
+#define _SECP256K1_FIELD_REPR_IMPL_H_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include <string.h>
+#include "util.h"
+#include "num.h"
+#include "field.h"
+
+#if defined(USE_FIELD_5X52_ASM)
+#include "field_5x52_asm_impl.h"
+#elif defined(USE_FIELD_5X52_INT128)
+#include "field_5x52_int128_impl.h"
+#else
+#error "Please select field_5x52 implementation"
+#endif
+
+/** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F,
+ *  represented as 5 uint64_t's in base 2^52. The values are allowed to contain >52 each. In particular,
+ *  each FieldElem has a 'magnitude' associated with it. Internally, a magnitude M means each element
+ *  is at most M*(2^53-1), except the most significant one, which is limited to M*(2^49-1). All operations
+ *  accept any input with magnitude at most M, and have different rules for propagating magnitude to their
+ *  output.
+ */
+
+static void secp256k1_fe_inner_start(void) {}
+static void secp256k1_fe_inner_stop(void) {}
+
+#ifdef VERIFY
+static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
+    const uint64_t *d = a->n;
+    int m = a->normalized ? 1 : 2 * a->magnitude, r = 1;
+    r &= (d[0] <= 0xFFFFFFFFFFFFFULL * m);
+    r &= (d[1] <= 0xFFFFFFFFFFFFFULL * m);
+    r &= (d[2] <= 0xFFFFFFFFFFFFFULL * m);
+    r &= (d[3] <= 0xFFFFFFFFFFFFFULL * m);
+    r &= (d[4] <= 0x0FFFFFFFFFFFFULL * m);
+    r &= (a->magnitude >= 0);
+    if (a->normalized) {
+        r &= (a->magnitude <= 1);
+        if (r && (d[4] == 0x0FFFFFFFFFFFFULL) && ((d[3] & d[2] & d[1]) == 0xFFFFFFFFFFFFFULL)) {
+            r &= (d[0] < 0xFFFFEFFFFFC2FULL);
+        }
+    }
+    VERIFY_CHECK(r == 1);
+}
+#else
+static void secp256k1_fe_verify(const secp256k1_fe_t *a) {
+    (void)a;
+}
+#endif
+
+static void secp256k1_fe_normalize(secp256k1_fe_t *r) {
+    uint64_t t0 = r->n[0], t1 = r->n[1], t2 = r->n[2], t3 = r->n[3], t4 = r->n[4];
+
+    /* Reduce t4 at the start so there will be at most a single carry from the first pass */
+    uint64_t x = t4 >> 48; t4 &= 0x0FFFFFFFFFFFFULL;
+    uint64_t m;
+
+    /* The first pass ensures the magnitude is 1, ... */
+    t0 += x * 0x1000003D1ULL;
+    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
+    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL; m = t1;
+    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL; m &= t2;
+    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL; m &= t3;
+
+    /* ... except for a possible carry at bit 48 of t4 (i.e. bit 256 of the field element) */
+    VERIFY_CHECK(t4 >> 49 == 0);
+
+    /* At most a single final reduction is needed; check if the value is >= the field characteristic */
+    x = (t4 >> 48) | ((t4 == 0x0FFFFFFFFFFFFULL) & (m == 0xFFFFFFFFFFFFFULL)
+        & (t0 >= 0xFFFFEFFFFFC2FULL));
+
+    /* Apply the final reduction (for constant-time behaviour, we do it always) */
+    t0 += x * 0x1000003D1ULL;
+    t1 += (t0 >> 52); t0 &= 0xFFFFFFFFFFFFFULL;
+    t2 += (t1 >> 52); t1 &= 0xFFFFFFFFFFFFFULL;
+    t3 += (t2 >> 52); t2 &= 0xFFFFFFFFFFFFFULL;
+    t4 += (t3 >> 52); t3 &= 0xFFFFFFFFFFFFFULL;
+
+    /* If t4 didn't carry to bit 48 already, then it should have after any final reduction */
+    VERIFY_CHECK(t4 >> 48 == x);
+
+    /* Mask off the possible multiple of 2^256 from the final reduction */
+    t4 &= 0x0FFFFFFFFFFFFULL;
+
+    r->n[0] = t0; r->n[1] = t1; r->n[2] = t2; r->n[3] = t3; r->n[4] = t4;
+
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a) {
+    r->n[0] = a;
+    r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    const uint64_t *t = a->n;
+    return (t[0] | t[1] | t[2] | t[3] | t[4]) == 0;
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    return a->n[0] & 1;
+}
+
+SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe_t *a) {
+#ifdef VERIFY
+    a->magnitude = 0;
+    a->normalized = 1;
+#endif
+    for (int i=0; i<5; i++) {
+        a->n[i] = 0;
+    }
+}
+
+SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    VERIFY_CHECK(b->normalized);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    const uint64_t *t = a->n, *u = b->n;
+    return ((t[0]^u[0]) | (t[1]^u[1]) | (t[2]^u[2]) | (t[3]^u[3]) | (t[4]^u[4])) == 0;
+}
+
+static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+    r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
+    for (int i=0; i<32; i++) {
+        for (int j=0; j<2; j++) {
+            int limb = (8*i+4*j)/52;
+            int shift = (8*i+4*j)%52;
+            r->n[limb] |= (uint64_t)((a[31-i] >> (4*j)) & 0xF) << shift;
+        }
+    }
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 1;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
+static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    secp256k1_fe_verify(a);
+#endif
+    for (int i=0; i<32; i++) {
+        int c = 0;
+        for (int j=0; j<2; j++) {
+            int limb = (8*i+4*j)/52;
+            int shift = (8*i+4*j)%52;
+            c |= ((a->n[limb] >> shift) & 0xF) << (4 * j);
+        }
+        r[31-i] = c;
+    }
+}
+
+SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= m);
+    secp256k1_fe_verify(a);
+#endif
+    r->n[0] = 0xFFFFEFFFFFC2FULL * 2 * (m + 1) - a->n[0];
+    r->n[1] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[1];
+    r->n[2] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[2];
+    r->n[3] = 0xFFFFFFFFFFFFFULL * 2 * (m + 1) - a->n[3];
+    r->n[4] = 0x0FFFFFFFFFFFFULL * 2 * (m + 1) - a->n[4];
+#ifdef VERIFY
+    r->magnitude = m + 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a) {
+    r->n[0] *= a;
+    r->n[1] *= a;
+    r->n[2] *= a;
+    r->n[3] *= a;
+    r->n[4] *= a;
+#ifdef VERIFY
+    r->magnitude *= a;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    secp256k1_fe_verify(a);
+#endif
+    r->n[0] += a->n[0];
+    r->n[1] += a->n[1];
+    r->n[2] += a->n[2];
+    r->n[3] += a->n[3];
+    r->n[4] += a->n[4];
+#ifdef VERIFY
+    r->magnitude += a->magnitude;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= 8);
+    VERIFY_CHECK(b->magnitude <= 8);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    secp256k1_fe_mul_inner(a->n, b->n, r->n);
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->magnitude <= 8);
+    secp256k1_fe_verify(a);
+#endif
+    secp256k1_fe_sqr_inner(a->n, r->n);
+#ifdef VERIFY
+    r->magnitude = 1;
+    r->normalized = 0;
+    secp256k1_fe_verify(r);
+#endif
+}
+
+#endif
diff --git a/src/field_5x52_int128_impl.h b/src/field_5x52_int128_impl.h
new file mode 100644
index 000000000000..c47642867247
--- /dev/null
+++ b/src/field_5x52_int128_impl.h
@@ -0,0 +1,279 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_INNER5X52_IMPL_H_
+#define _SECP256K1_FIELD_INNER5X52_IMPL_H_
+
+#include <stdint.h>
+
+#ifdef VERIFY
+#define VERIFY_BITS(x, n) VERIFY_CHECK(((x) >> (n)) == 0)
+#else
+#define VERIFY_BITS(x, n) do { } while(0)
+#endif
+
+SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uint64_t *b, uint64_t *r) {
+    VERIFY_BITS(a[0], 56);
+    VERIFY_BITS(a[1], 56);
+    VERIFY_BITS(a[2], 56);
+    VERIFY_BITS(a[3], 56);
+    VERIFY_BITS(a[4], 52);
+    VERIFY_BITS(b[0], 56);
+    VERIFY_BITS(b[1], 56);
+    VERIFY_BITS(b[2], 56);
+    VERIFY_BITS(b[3], 56);
+    VERIFY_BITS(b[4], 52);
+
+    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
+    /*  [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
+     *  px is a shorthand for sum(a[i]*b[x-i], i=0..x).
+     *  Note that [x 0 0 0 0 0] = [x*R].
+     */
+
+    __int128 c, d;
+
+    d  = (__int128)a[0] * b[3]
+       + (__int128)a[1] * b[2]
+       + (__int128)a[2] * b[1]
+       + (__int128)a[3] * b[0];
+    VERIFY_BITS(d, 114);
+    /* [d 0 0 0] = [p3 0 0 0] */
+    c  = (__int128)a[4] * b[4];
+    VERIFY_BITS(c, 112);
+    /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+    d += (c & M) * R; c >>= 52;
+    VERIFY_BITS(d, 115);
+    VERIFY_BITS(c, 60);
+    /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+    uint64_t t3 = d & M; d >>= 52;
+    VERIFY_BITS(t3, 52);
+    VERIFY_BITS(d, 63);
+    /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+
+    d += (__int128)a[0] * b[4]
+       + (__int128)a[1] * b[3]
+       + (__int128)a[2] * b[2]
+       + (__int128)a[3] * b[1]
+       + (__int128)a[4] * b[0];
+    VERIFY_BITS(d, 115);
+    /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    d += c * R;
+    VERIFY_BITS(d, 116);
+    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    uint64_t t4 = d & M; d >>= 52;
+    VERIFY_BITS(t4, 52);
+    VERIFY_BITS(d, 64);
+    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    uint64_t tx = (t4 >> 48); t4 &= (M >> 4);
+    VERIFY_BITS(tx, 4);
+    VERIFY_BITS(t4, 48);
+    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+
+    c  = (__int128)a[0] * b[0];
+    VERIFY_BITS(c, 112);
+    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
+    d += (__int128)a[1] * b[4]
+       + (__int128)a[2] * b[3]
+       + (__int128)a[3] * b[2]
+       + (__int128)a[4] * b[1];
+    VERIFY_BITS(d, 115);
+    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    uint64_t u0 = d & M; d >>= 52;
+    VERIFY_BITS(u0, 52);
+    VERIFY_BITS(d, 63);
+    /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    u0 = (u0 << 4) | tx;
+    VERIFY_BITS(u0, 56);
+    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    c += (__int128)u0 * (R >> 4);
+    VERIFY_BITS(c, 115);
+    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    uint64_t t0 = c & M; c >>= 52;
+    VERIFY_BITS(t0, 52);
+    VERIFY_BITS(c, 61);
+    /* [d 0 t4 t3 0 c t0] = [p8 0 0 p5 p4 p3 0 0 p0] */
+
+    c += (__int128)a[0] * b[1]
+       + (__int128)a[1] * b[0];
+    VERIFY_BITS(c, 114);
+    /* [d 0 t4 t3 0 c t0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
+    d += (__int128)a[2] * b[4]
+       + (__int128)a[3] * b[3]
+       + (__int128)a[4] * b[2];
+    VERIFY_BITS(d, 114);
+    /* [d 0 t4 t3 0 c t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    c += (d & M) * R; d >>= 52;
+    VERIFY_BITS(c, 115);
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 t4 t3 0 c t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    uint64_t t1 = c & M; c >>= 52;
+    VERIFY_BITS(t1, 52);
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 t4 t3 c t1 t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+
+    c += (__int128)a[0] * b[2]
+       + (__int128)a[1] * b[1]
+       + (__int128)a[2] * b[0];
+    VERIFY_BITS(c, 114);
+    /* [d 0 0 t4 t3 c t1 t0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
+    d += (__int128)a[3] * b[4]
+       + (__int128)a[4] * b[3];
+    VERIFY_BITS(d, 114);
+    /* [d 0 0 t4 t3 c t1 t0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c += (d & M) * R; d >>= 52;
+    VERIFY_BITS(c, 115);
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 t4 t3 c t1 t0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    r[0] = t0;
+    VERIFY_BITS(r[0], 52);
+    /* [d 0 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[1] = t1;
+    VERIFY_BITS(r[1], 52);
+    /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[2] = c & M; c >>= 52;
+    VERIFY_BITS(r[2], 52);
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c   += d * R + t3;;
+    VERIFY_BITS(c, 100);
+    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[3] = c & M; c >>= 52;
+    VERIFY_BITS(r[3], 52);
+    VERIFY_BITS(c, 48);
+    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c   += t4;
+    VERIFY_BITS(c, 49);
+    /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[4] = c;
+    VERIFY_BITS(r[4], 49);
+    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+}
+
+SECP256K1_INLINE static void secp256k1_fe_sqr_inner(const uint64_t *a, uint64_t *r) {
+    VERIFY_BITS(a[0], 56);
+    VERIFY_BITS(a[1], 56);
+    VERIFY_BITS(a[2], 56);
+    VERIFY_BITS(a[3], 56);
+    VERIFY_BITS(a[4], 52);
+
+    const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
+    /**  [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
+     *  px is a shorthand for sum(a[i]*a[x-i], i=0..x).
+     *  Note that [x 0 0 0 0 0] = [x*R].
+     */
+
+    __int128 c, d;
+
+    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
+
+    d  = (__int128)(a0*2) * a3
+       + (__int128)(a1*2) * a2;
+    VERIFY_BITS(d, 114);
+    /* [d 0 0 0] = [p3 0 0 0] */
+    c  = (__int128)a4 * a4;
+    VERIFY_BITS(c, 112);
+    /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+    d += (c & M) * R; c >>= 52;
+    VERIFY_BITS(d, 115);
+    VERIFY_BITS(c, 60);
+    /* [c 0 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+    uint64_t t3 = d & M; d >>= 52;
+    VERIFY_BITS(t3, 52);
+    VERIFY_BITS(d, 63);
+    /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
+
+    a4 *= 2;
+    d += (__int128)a0 * a4
+       + (__int128)(a1*2) * a3
+       + (__int128)a2 * a2;
+    VERIFY_BITS(d, 115);
+    /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    d += c * R;
+    VERIFY_BITS(d, 116);
+    /* [d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    uint64_t t4 = d & M; d >>= 52;
+    VERIFY_BITS(t4, 52);
+    VERIFY_BITS(d, 64);
+    /* [d t4 t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+    uint64_t tx = (t4 >> 48); t4 &= (M >> 4);
+    VERIFY_BITS(tx, 4);
+    VERIFY_BITS(t4, 48);
+    /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
+
+    c  = (__int128)a0 * a0;
+    VERIFY_BITS(c, 112);
+    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
+    d += (__int128)a1 * a4
+       + (__int128)(a2*2) * a3;
+    VERIFY_BITS(d, 114);
+    /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    uint64_t u0 = d & M; d >>= 52;
+    VERIFY_BITS(u0, 52);
+    VERIFY_BITS(d, 62);
+    /* [d u0 t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    /* [d 0 t4+(tx<<48)+(u0<<52) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    u0 = (u0 << 4) | tx;
+    VERIFY_BITS(u0, 56);
+    /* [d 0 t4+(u0<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    c += (__int128)u0 * (R >> 4);
+    VERIFY_BITS(c, 113);
+    /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    r[0] = c & M; c >>= 52;
+    VERIFY_BITS(r[0], 52);
+    VERIFY_BITS(c, 61);
+    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
+
+    a0 *= 2;
+    c += (__int128)a0 * a1;
+    VERIFY_BITS(c, 114);
+    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
+    d += (__int128)a2 * a4
+       + (__int128)a3 * a3;
+    VERIFY_BITS(d, 114);
+    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    c += (d & M) * R; d >>= 52;
+    VERIFY_BITS(c, 115);
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    r[1] = c & M; c >>= 52;
+    VERIFY_BITS(r[1], 52);
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+
+    c += (__int128)a0 * a2
+       + (__int128)a1 * a1;
+    VERIFY_BITS(c, 114);
+    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
+    d += (__int128)a3 * a4;
+    VERIFY_BITS(d, 114);
+    /* [d 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c += (d & M) * R; d >>= 52;
+    VERIFY_BITS(c, 115);
+    VERIFY_BITS(d, 62);
+    /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[2] = c & M; c >>= 52;
+    VERIFY_BITS(r[2], 52);
+    VERIFY_BITS(c, 63);
+    /* [d 0 0 0 t4 t3+c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+
+    c   += d * R + t3;;
+    VERIFY_BITS(c, 100);
+    /* [t4 c r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[3] = c & M; c >>= 52;
+    VERIFY_BITS(r[3], 52);
+    VERIFY_BITS(c, 48);
+    /* [t4+c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    c   += t4;
+    VERIFY_BITS(c, 49);
+    /* [c r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    r[4] = c;
+    VERIFY_BITS(r[4], 49);
+    /* [r4 r3 r2 r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+}
+
+#endif
diff --git a/src/field_gmp.h b/src/field_gmp.h
new file mode 100644
index 000000000000..b390fd9de8d4
--- /dev/null
+++ b/src/field_gmp.h
@@ -0,0 +1,18 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_
+#define _SECP256K1_FIELD_REPR_
+
+#include <gmp.h>
+
+#define FIELD_LIMBS ((256 + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS)
+
+typedef struct {
+    mp_limb_t n[FIELD_LIMBS+1];
+} secp256k1_fe_t;
+
+#endif
diff --git a/src/field_gmp_impl.h b/src/field_gmp_impl.h
new file mode 100644
index 000000000000..af4728e5b4d1
--- /dev/null
+++ b/src/field_gmp_impl.h
@@ -0,0 +1,163 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_REPR_IMPL_H_
+#define _SECP256K1_FIELD_REPR_IMPL_H_
+
+#include <stdio.h>
+#include <string.h>
+#include "num.h"
+#include "field.h"
+
+static mp_limb_t secp256k1_field_p[FIELD_LIMBS];
+static mp_limb_t secp256k1_field_pc[(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS];
+
+static void secp256k1_fe_inner_start(void) {
+    for (int i=0; i<(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS; i++)
+        secp256k1_field_pc[i] = 0;
+    secp256k1_field_pc[0] += 0x3D1UL;
+    secp256k1_field_pc[32/GMP_NUMB_BITS] += (((mp_limb_t)1) << (32 % GMP_NUMB_BITS));
+    for (int i=0; i<FIELD_LIMBS; i++) {
+        secp256k1_field_p[i] = 0;
+    }
+    mpn_sub(secp256k1_field_p, secp256k1_field_p, FIELD_LIMBS, secp256k1_field_pc, (33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
+}
+
+static void secp256k1_fe_inner_stop(void) {
+}
+
+static void secp256k1_fe_normalize(secp256k1_fe_t *r) {
+    if (r->n[FIELD_LIMBS] != 0) {
+#if (GMP_NUMB_BITS >= 40)
+        mp_limb_t carry = mpn_add_1(r->n, r->n, FIELD_LIMBS, 0x1000003D1ULL * r->n[FIELD_LIMBS]);
+        mpn_add_1(r->n, r->n, FIELD_LIMBS, 0x1000003D1ULL * carry);
+#else
+        mp_limb_t carry = mpn_add_1(r->n, r->n, FIELD_LIMBS, 0x3D1UL * r->n[FIELD_LIMBS]) +
+                          mpn_add_1(r->n+(32/GMP_NUMB_BITS), r->n+(32/GMP_NUMB_BITS), FIELD_LIMBS-(32/GMP_NUMB_BITS), r->n[FIELD_LIMBS] << (32 % GMP_NUMB_BITS));
+        mpn_add_1(r->n, r->n, FIELD_LIMBS, 0x3D1UL * carry);
+        mpn_add_1(r->n+(32/GMP_NUMB_BITS), r->n+(32/GMP_NUMB_BITS), FIELD_LIMBS-(32/GMP_NUMB_BITS), carry << (32%GMP_NUMB_BITS));
+#endif
+        r->n[FIELD_LIMBS] = 0;
+    }
+    if (mpn_cmp(r->n, secp256k1_field_p, FIELD_LIMBS) >= 0)
+        mpn_sub(r->n, r->n, FIELD_LIMBS, secp256k1_field_p, FIELD_LIMBS);
+}
+
+SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe_t *r, int a) {
+    r->n[0] = a;
+    for (int i=1; i<FIELD_LIMBS+1; i++)
+        r->n[i] = 0;
+}
+
+SECP256K1_INLINE static void secp256k1_fe_clear(secp256k1_fe_t *r) {
+    for (int i=0; i<FIELD_LIMBS+1; i++)
+        r->n[i] = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_zero(const secp256k1_fe_t *a) {
+    int ret = 1;
+    for (int i=0; i<FIELD_LIMBS+1; i++)
+        ret &= (a->n[i] == 0);
+    return ret;
+}
+
+SECP256K1_INLINE static int secp256k1_fe_is_odd(const secp256k1_fe_t *a) {
+    return a->n[0] & 1;
+}
+
+SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+    int ret = 1;
+    for (int i=0; i<FIELD_LIMBS+1; i++)
+        ret &= (a->n[i] == b->n[i]);
+    return ret;
+}
+
+static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+    for (int i=0; i<FIELD_LIMBS+1; i++)
+        r->n[i] = 0;
+    for (int i=0; i<256; i++) {
+        int limb = i/GMP_NUMB_BITS;
+        int shift = i%GMP_NUMB_BITS;
+        r->n[limb] |= (mp_limb_t)((a[31-i/8] >> (i%8)) & 0x1) << shift;
+    }
+}
+
+/** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
+static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a) {
+    for (int i=0; i<32; i++) {
+        int c = 0;
+        for (int j=0; j<8; j++) {
+            int limb = (8*i+j)/GMP_NUMB_BITS;
+            int shift = (8*i+j)%GMP_NUMB_BITS;
+            c |= ((a->n[limb] >> shift) & 0x1) << j;
+        }
+        r[31-i] = c;
+    }
+}
+
+SECP256K1_INLINE static void secp256k1_fe_negate(secp256k1_fe_t *r, const secp256k1_fe_t *a, int m) {
+    (void)m;
+    *r = *a;
+    secp256k1_fe_normalize(r);
+    for (int i=0; i<FIELD_LIMBS; i++)
+        r->n[i] = ~(r->n[i]);
+#if (GMP_NUMB_BITS >= 33)
+    mpn_sub_1(r->n, r->n, FIELD_LIMBS, 0x1000003D0ULL);
+#else
+    mpn_sub_1(r->n, r->n, FIELD_LIMBS, 0x3D0UL);
+    mpn_sub_1(r->n+(32/GMP_NUMB_BITS), r->n+(32/GMP_NUMB_BITS), FIELD_LIMBS-(32/GMP_NUMB_BITS), 0x1UL << (32%GMP_NUMB_BITS));
+#endif
+}
+
+SECP256K1_INLINE static void secp256k1_fe_mul_int(secp256k1_fe_t *r, int a) {
+    mpn_mul_1(r->n, r->n, FIELD_LIMBS+1, a);
+}
+
+SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+    mpn_add(r->n, r->n, FIELD_LIMBS+1, a->n, FIELD_LIMBS+1);
+}
+
+static void secp256k1_fe_reduce(secp256k1_fe_t *r, mp_limb_t *tmp) {
+    /** <A1 A2 A3 A4> <B1 B2 B3 B4>
+     *        B1 B2 B3 B4
+     *  + C * A1 A2 A3 A4
+     *  +  A1 A2 A3 A4
+     */
+
+#if (GMP_NUMB_BITS >= 33)
+    mp_limb_t o = mpn_addmul_1(tmp, tmp+FIELD_LIMBS, FIELD_LIMBS, 0x1000003D1ULL);
+#else
+    mp_limb_t o = mpn_addmul_1(tmp, tmp+FIELD_LIMBS, FIELD_LIMBS, 0x3D1UL) +
+                  mpn_addmul_1(tmp+(32/GMP_NUMB_BITS), tmp+FIELD_LIMBS, FIELD_LIMBS-(32/GMP_NUMB_BITS), 0x1UL << (32%GMP_NUMB_BITS));
+#endif
+    mp_limb_t q[1+(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS];
+    q[(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS] = mpn_mul_1(q, secp256k1_field_pc, (33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS, o);
+#if (GMP_NUMB_BITS <= 32)
+    mp_limb_t o2 = tmp[2*FIELD_LIMBS-(32/GMP_NUMB_BITS)] << (32%GMP_NUMB_BITS);
+    q[(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS] += mpn_addmul_1(q, secp256k1_field_pc, (33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS, o2);
+#endif
+    r->n[FIELD_LIMBS] = mpn_add(r->n, tmp, FIELD_LIMBS, q, 1+(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
+}
+
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+    secp256k1_fe_t ac = *a;
+    secp256k1_fe_t bc = *b;
+    secp256k1_fe_normalize(&ac);
+    secp256k1_fe_normalize(&bc);
+    mp_limb_t tmp[2*FIELD_LIMBS];
+    mpn_mul_n(tmp, ac.n, bc.n, FIELD_LIMBS);
+    secp256k1_fe_reduce(r, tmp);
+}
+
+static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+    secp256k1_fe_t ac = *a;
+    secp256k1_fe_normalize(&ac);
+    mp_limb_t tmp[2*FIELD_LIMBS];
+    mpn_sqr(tmp, ac.n, FIELD_LIMBS);
+    secp256k1_fe_reduce(r, tmp);
+}
+
+#endif
diff --git a/src/field_impl.h b/src/field_impl.h
new file mode 100644
index 000000000000..3a31e1844e85
--- /dev/null
+++ b/src/field_impl.h
@@ -0,0 +1,293 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_FIELD_IMPL_H_
+#define _SECP256K1_FIELD_IMPL_H_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include "util.h"
+
+#if defined(USE_FIELD_GMP)
+#include "field_gmp_impl.h"
+#elif defined(USE_FIELD_10X26)
+#include "field_10x26_impl.h"
+#elif defined(USE_FIELD_5X52)
+#include "field_5x52_impl.h"
+#else
+#error "Please select field implementation"
+#endif
+
+static void secp256k1_fe_get_hex(char *r, int *rlen, const secp256k1_fe_t *a) {
+    if (*rlen < 65) {
+        *rlen = 65;
+        return;
+    }
+    *rlen = 65;
+    unsigned char tmp[32];
+    secp256k1_fe_t b = *a;
+    secp256k1_fe_normalize(&b);
+    secp256k1_fe_get_b32(tmp, &b);
+    for (int i=0; i<32; i++) {
+        static const char *c = "0123456789ABCDEF";
+        r[2*i]   = c[(tmp[i] >> 4) & 0xF];
+        r[2*i+1] = c[(tmp[i]) & 0xF];
+    }
+    r[64] = 0x00;
+}
+
+static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
+    unsigned char tmp[32] = {};
+    static const int cvt[256] = {0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 1, 2, 3, 4, 5, 6,7,8,9,0,0,0,0,0,0,
+                                 0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+                                 0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0};
+    for (int i=0; i<32; i++) {
+        if (alen > i*2)
+            tmp[32 - alen/2 + i] = (cvt[(unsigned char)a[2*i]] << 4) + cvt[(unsigned char)a[2*i+1]];
+    }
+    secp256k1_fe_set_b32(r, tmp);
+}
+
+static int secp256k1_fe_sqrt(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+
+    /** The binary representation of (p + 1)/4 has 3 blocks of 1s, with lengths in
+     *  { 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block:
+     *  1, [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223]
+     */
+
+    secp256k1_fe_t x2;
+    secp256k1_fe_sqr(&x2, a);
+    secp256k1_fe_mul(&x2, &x2, a);
+
+    secp256k1_fe_t x3;
+    secp256k1_fe_sqr(&x3, &x2);
+    secp256k1_fe_mul(&x3, &x3, a);
+
+    secp256k1_fe_t x6 = x3;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x6, &x6);
+    secp256k1_fe_mul(&x6, &x6, &x3);
+
+    secp256k1_fe_t x9 = x6;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x9, &x9);
+    secp256k1_fe_mul(&x9, &x9, &x3);
+
+    secp256k1_fe_t x11 = x9;
+    for (int j=0; j<2; j++) secp256k1_fe_sqr(&x11, &x11);
+    secp256k1_fe_mul(&x11, &x11, &x2);
+
+    secp256k1_fe_t x22 = x11;
+    for (int j=0; j<11; j++) secp256k1_fe_sqr(&x22, &x22);
+    secp256k1_fe_mul(&x22, &x22, &x11);
+
+    secp256k1_fe_t x44 = x22;
+    for (int j=0; j<22; j++) secp256k1_fe_sqr(&x44, &x44);
+    secp256k1_fe_mul(&x44, &x44, &x22);
+
+    secp256k1_fe_t x88 = x44;
+    for (int j=0; j<44; j++) secp256k1_fe_sqr(&x88, &x88);
+    secp256k1_fe_mul(&x88, &x88, &x44);
+
+    secp256k1_fe_t x176 = x88;
+    for (int j=0; j<88; j++) secp256k1_fe_sqr(&x176, &x176);
+    secp256k1_fe_mul(&x176, &x176, &x88);
+
+    secp256k1_fe_t x220 = x176;
+    for (int j=0; j<44; j++) secp256k1_fe_sqr(&x220, &x220);
+    secp256k1_fe_mul(&x220, &x220, &x44);
+
+    secp256k1_fe_t x223 = x220;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x223, &x223);
+    secp256k1_fe_mul(&x223, &x223, &x3);
+
+    /* The final result is then assembled using a sliding window over the blocks. */
+
+    secp256k1_fe_t t1 = x223;
+    for (int j=0; j<23; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(&t1, &t1, &x22);
+    for (int j=0; j<6; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(&t1, &t1, &x2);
+    secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_sqr(r, &t1);
+
+    /* Check that a square root was actually calculated */
+
+    secp256k1_fe_sqr(&t1, r);
+    secp256k1_fe_negate(&t1, &t1, 1);
+    secp256k1_fe_add(&t1, a);
+    secp256k1_fe_normalize(&t1);
+    return secp256k1_fe_is_zero(&t1);
+}
+
+static void secp256k1_fe_inv(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+
+    /** The binary representation of (p - 2) has 5 blocks of 1s, with lengths in
+     *  { 1, 2, 22, 223 }. Use an addition chain to calculate 2^n - 1 for each block:
+     *  [1], [2], 3, 6, 9, 11, [22], 44, 88, 176, 220, [223]
+     */
+
+    secp256k1_fe_t x2;
+    secp256k1_fe_sqr(&x2, a);
+    secp256k1_fe_mul(&x2, &x2, a);
+
+    secp256k1_fe_t x3;
+    secp256k1_fe_sqr(&x3, &x2);
+    secp256k1_fe_mul(&x3, &x3, a);
+
+    secp256k1_fe_t x6 = x3;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x6, &x6);
+    secp256k1_fe_mul(&x6, &x6, &x3);
+
+    secp256k1_fe_t x9 = x6;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x9, &x9);
+    secp256k1_fe_mul(&x9, &x9, &x3);
+
+    secp256k1_fe_t x11 = x9;
+    for (int j=0; j<2; j++) secp256k1_fe_sqr(&x11, &x11);
+    secp256k1_fe_mul(&x11, &x11, &x2);
+
+    secp256k1_fe_t x22 = x11;
+    for (int j=0; j<11; j++) secp256k1_fe_sqr(&x22, &x22);
+    secp256k1_fe_mul(&x22, &x22, &x11);
+
+    secp256k1_fe_t x44 = x22;
+    for (int j=0; j<22; j++) secp256k1_fe_sqr(&x44, &x44);
+    secp256k1_fe_mul(&x44, &x44, &x22);
+
+    secp256k1_fe_t x88 = x44;
+    for (int j=0; j<44; j++) secp256k1_fe_sqr(&x88, &x88);
+    secp256k1_fe_mul(&x88, &x88, &x44);
+
+    secp256k1_fe_t x176 = x88;
+    for (int j=0; j<88; j++) secp256k1_fe_sqr(&x176, &x176);
+    secp256k1_fe_mul(&x176, &x176, &x88);
+
+    secp256k1_fe_t x220 = x176;
+    for (int j=0; j<44; j++) secp256k1_fe_sqr(&x220, &x220);
+    secp256k1_fe_mul(&x220, &x220, &x44);
+
+    secp256k1_fe_t x223 = x220;
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&x223, &x223);
+    secp256k1_fe_mul(&x223, &x223, &x3);
+
+    /* The final result is then assembled using a sliding window over the blocks. */
+
+    secp256k1_fe_t t1 = x223;
+    for (int j=0; j<23; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(&t1, &t1, &x22);
+    for (int j=0; j<5; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(&t1, &t1, a);
+    for (int j=0; j<3; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(&t1, &t1, &x2);
+    for (int j=0; j<2; j++) secp256k1_fe_sqr(&t1, &t1);
+    secp256k1_fe_mul(r, &t1, a);
+}
+
+static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
+#if defined(USE_FIELD_INV_BUILTIN)
+    secp256k1_fe_inv(r, a);
+#elif defined(USE_FIELD_INV_NUM)
+    unsigned char b[32];
+    secp256k1_fe_t c = *a;
+    secp256k1_fe_normalize(&c);
+    secp256k1_fe_get_b32(b, &c);
+    secp256k1_num_t n;
+    secp256k1_num_set_bin(&n, b, 32);
+    secp256k1_num_mod_inverse(&n, &n, &secp256k1_fe_consts->p);
+    secp256k1_num_get_bin(b, 32, &n);
+    secp256k1_fe_set_b32(r, b);
+#else
+#error "Please select field inverse implementation"
+#endif
+}
+
+static void secp256k1_fe_inv_all(size_t len, secp256k1_fe_t r[len], const secp256k1_fe_t a[len]) {
+    if (len < 1)
+        return;
+
+    VERIFY_CHECK((r + len <= a) || (a + len <= r));
+
+    r[0] = a[0];
+
+    size_t i = 0;
+    while (++i < len) {
+        secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]);
+    }
+
+    secp256k1_fe_t u; secp256k1_fe_inv(&u, &r[--i]);
+
+    while (i > 0) {
+        int j = i--;
+        secp256k1_fe_mul(&r[j], &r[i], &u);
+        secp256k1_fe_mul(&u, &u, &a[j]);
+    }
+
+    r[0] = u;
+}
+
+static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t r[len], const secp256k1_fe_t a[len]) {
+    if (len < 1)
+        return;
+
+    VERIFY_CHECK((r + len <= a) || (a + len <= r));
+
+    r[0] = a[0];
+
+    size_t i = 0;
+    while (++i < len) {
+        secp256k1_fe_mul(&r[i], &r[i - 1], &a[i]);
+    }
+
+    secp256k1_fe_t u; secp256k1_fe_inv_var(&u, &r[--i]);
+
+    while (i > 0) {
+        int j = i--;
+        secp256k1_fe_mul(&r[j], &r[i], &u);
+        secp256k1_fe_mul(&u, &u, &a[j]);
+    }
+
+    r[0] = u;
+}
+
+static void secp256k1_fe_start(void) {
+    static const unsigned char secp256k1_fe_consts_p[] = {
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F
+    };
+    if (secp256k1_fe_consts == NULL) {
+        secp256k1_fe_inner_start();
+        secp256k1_fe_consts_t *ret = (secp256k1_fe_consts_t*)malloc(sizeof(secp256k1_fe_consts_t));
+        secp256k1_num_set_bin(&ret->p, secp256k1_fe_consts_p, sizeof(secp256k1_fe_consts_p));
+        secp256k1_fe_consts = ret;
+    }
+}
+
+static void secp256k1_fe_stop(void) {
+    if (secp256k1_fe_consts != NULL) {
+        secp256k1_fe_consts_t *c = (secp256k1_fe_consts_t*)secp256k1_fe_consts;
+        free((void*)c);
+        secp256k1_fe_consts = NULL;
+        secp256k1_fe_inner_stop();
+    }
+}
+
+#endif
diff --git a/src/group.h b/src/group.h
new file mode 100644
index 000000000000..ba0254982113
--- /dev/null
+++ b/src/group.h
@@ -0,0 +1,128 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_GROUP_
+#define _SECP256K1_GROUP_
+
+#include "num.h"
+#include "field.h"
+
+/** A group element of the secp256k1 curve, in affine coordinates. */
+typedef struct {
+    secp256k1_fe_t x;
+    secp256k1_fe_t y;
+    int infinity; /* whether this represents the point at infinity */
+} secp256k1_ge_t;
+
+/** A group element of the secp256k1 curve, in jacobian coordinates. */
+typedef struct {
+    secp256k1_fe_t x; /* actual X: x/z^2 */
+    secp256k1_fe_t y; /* actual Y: y/z^3 */
+    secp256k1_fe_t z;
+    int infinity; /* whether this represents the point at infinity */
+} secp256k1_gej_t;
+
+/** Global constants related to the group */
+typedef struct {
+    secp256k1_num_t order; /* the order of the curve (= order of its generator) */
+    secp256k1_num_t half_order; /* half the order of the curve (= order of its generator) */
+    secp256k1_ge_t g; /* the generator point */
+
+#ifdef USE_ENDOMORPHISM
+    /* constants related to secp256k1's efficiently computable endomorphism */
+    secp256k1_fe_t beta;
+    secp256k1_num_t lambda, a1b2, b1, a2;
+#endif
+} secp256k1_ge_consts_t;
+
+static const secp256k1_ge_consts_t *secp256k1_ge_consts = NULL;
+
+/** Initialize the group module. */
+static void secp256k1_ge_start(void);
+
+/** De-initialize the group module. */
+static void secp256k1_ge_stop(void);
+
+/** Set a group element equal to the point at infinity */
+static void secp256k1_ge_set_infinity(secp256k1_ge_t *r);
+
+/** Set a group element equal to the point with given X and Y coordinates */
+static void secp256k1_ge_set_xy(secp256k1_ge_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y);
+
+/** Set a group element (affine) equal to the point with the given X coordinate, and given oddness
+ *  for Y. Return value indicates whether the result is valid. */
+static int secp256k1_ge_set_xo(secp256k1_ge_t *r, const secp256k1_fe_t *x, int odd);
+
+/** Check whether a group element is the point at infinity. */
+static int secp256k1_ge_is_infinity(const secp256k1_ge_t *a);
+
+/** Check whether a group element is valid (i.e., on the curve). */
+static int secp256k1_ge_is_valid(const secp256k1_ge_t *a);
+
+static void secp256k1_ge_neg(secp256k1_ge_t *r, const secp256k1_ge_t *a);
+
+/** Get a hex representation of a point. *rlen will be overwritten with the real length. */
+static void secp256k1_ge_get_hex(char *r, int *rlen, const secp256k1_ge_t *a);
+
+/** Set a group element equal to another which is given in jacobian coordinates */
+static void secp256k1_ge_set_gej(secp256k1_ge_t *r, secp256k1_gej_t *a);
+
+/** Set a batch of group elements equal to the inputs given in jacobian coordinates */
+static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge_t r[len], const secp256k1_gej_t a[len]);
+
+
+/** Set a group element (jacobian) equal to the point at infinity. */
+static void secp256k1_gej_set_infinity(secp256k1_gej_t *r);
+
+/** Set a group element (jacobian) equal to the point with given X and Y coordinates. */
+static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y);
+
+/** Set a group element (jacobian) equal to another which is given in affine coordinates. */
+static void secp256k1_gej_set_ge(secp256k1_gej_t *r, const secp256k1_ge_t *a);
+
+/** Get the X coordinate of a group element (jacobian). */
+static void secp256k1_gej_get_x_var(secp256k1_fe_t *r, const secp256k1_gej_t *a);
+
+/** Set r equal to the inverse of a (i.e., mirrored around the X axis) */
+static void secp256k1_gej_neg(secp256k1_gej_t *r, const secp256k1_gej_t *a);
+
+/** Check whether a group element is the point at infinity. */
+static int secp256k1_gej_is_infinity(const secp256k1_gej_t *a);
+
+/** Set r equal to the double of a. */
+static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *a);
+
+/** Set r equal to the sum of a and b. */
+static void secp256k1_gej_add_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_gej_t *b);
+
+/** Set r equal to the sum of a and b (with b given in affine coordinates, and not infinity). */
+static void secp256k1_gej_add_ge(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b);
+
+/** Set r equal to the sum of a and b (with b given in affine coordinates). This is more efficient
+    than secp256k1_gej_add_var. It is identical to secp256k1_gej_add_ge but without constant-time
+    guarantee, and b is allowed to be infinity. */
+static void secp256k1_gej_add_ge_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b);
+
+/** Get a hex representation of a point. *rlen will be overwritten with the real length. */
+static void secp256k1_gej_get_hex(char *r, int *rlen, const secp256k1_gej_t *a);
+
+#ifdef USE_ENDOMORPHISM
+/** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */
+static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *a);
+
+/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (given that a is
+    not more than 256 bits). */
+static void secp256k1_gej_split_exp_var(secp256k1_num_t *r1, secp256k1_num_t *r2, const secp256k1_num_t *a);
+#endif
+
+/** Clear a secp256k1_gej_t to prevent leaking sensitive information. */
+static void secp256k1_gej_clear(secp256k1_gej_t *r);
+
+/** Clear a secp256k1_ge_t to prevent leaking sensitive information. */
+static void secp256k1_ge_clear(secp256k1_ge_t *r);
+
+
+#endif
diff --git a/src/group_impl.h b/src/group_impl.h
new file mode 100644
index 000000000000..1edbc6e09940
--- /dev/null
+++ b/src/group_impl.h
@@ -0,0 +1,519 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_GROUP_IMPL_H_
+#define _SECP256K1_GROUP_IMPL_H_
+
+#include <string.h>
+
+#include "num.h"
+#include "field.h"
+#include "group.h"
+
+static void secp256k1_ge_set_infinity(secp256k1_ge_t *r) {
+    r->infinity = 1;
+}
+
+static void secp256k1_ge_set_xy(secp256k1_ge_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y) {
+    r->infinity = 0;
+    r->x = *x;
+    r->y = *y;
+}
+
+static int secp256k1_ge_is_infinity(const secp256k1_ge_t *a) {
+    return a->infinity;
+}
+
+static void secp256k1_ge_neg(secp256k1_ge_t *r, const secp256k1_ge_t *a) {
+    r->infinity = a->infinity;
+    r->x = a->x;
+    r->y = a->y;
+    secp256k1_fe_normalize(&r->y);
+    secp256k1_fe_negate(&r->y, &r->y, 1);
+}
+
+static void secp256k1_ge_get_hex(char *r, int *rlen, const secp256k1_ge_t *a) {
+    char cx[65]; int lx=65;
+    char cy[65]; int ly=65;
+    secp256k1_fe_get_hex(cx, &lx, &a->x);
+    secp256k1_fe_get_hex(cy, &ly, &a->y);
+    lx = strlen(cx);
+    ly = strlen(cy);
+    int len = lx + ly + 3 + 1;
+    if (*rlen < len) {
+        *rlen = len;
+        return;
+    }
+    *rlen = len;
+    r[0] = '(';
+    memcpy(r+1, cx, lx);
+    r[1+lx] = ',';
+    memcpy(r+2+lx, cy, ly);
+    r[2+lx+ly] = ')';
+    r[3+lx+ly] = 0;
+}
+
+static void secp256k1_ge_set_gej(secp256k1_ge_t *r, secp256k1_gej_t *a) {
+    r->infinity = a->infinity;
+    secp256k1_fe_inv(&a->z, &a->z);
+    secp256k1_fe_t z2; secp256k1_fe_sqr(&z2, &a->z);
+    secp256k1_fe_t z3; secp256k1_fe_mul(&z3, &a->z, &z2);
+    secp256k1_fe_mul(&a->x, &a->x, &z2);
+    secp256k1_fe_mul(&a->y, &a->y, &z3);
+    secp256k1_fe_set_int(&a->z, 1);
+    r->x = a->x;
+    r->y = a->y;
+}
+
+static void secp256k1_ge_set_gej_var(secp256k1_ge_t *r, secp256k1_gej_t *a) {
+    r->infinity = a->infinity;
+    if (a->infinity) {
+        return;
+    }
+    secp256k1_fe_inv_var(&a->z, &a->z);
+    secp256k1_fe_t z2; secp256k1_fe_sqr(&z2, &a->z);
+    secp256k1_fe_t z3; secp256k1_fe_mul(&z3, &a->z, &z2);
+    secp256k1_fe_mul(&a->x, &a->x, &z2);
+    secp256k1_fe_mul(&a->y, &a->y, &z3);
+    secp256k1_fe_set_int(&a->z, 1);
+    r->x = a->x;
+    r->y = a->y;
+}
+
+static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge_t r[len], const secp256k1_gej_t a[len]) {
+    size_t count = 0;
+    secp256k1_fe_t az[len];
+    for (size_t i=0; i<len; i++) {
+        if (!a[i].infinity) {
+            az[count++] = a[i].z;
+        }
+    }
+
+    secp256k1_fe_t azi[count];
+    secp256k1_fe_inv_all_var(count, azi, az);
+
+    count = 0;
+    for (size_t i=0; i<len; i++) {
+        r[i].infinity = a[i].infinity;
+        if (!a[i].infinity) {
+            secp256k1_fe_t *zi = &azi[count++];
+            secp256k1_fe_t zi2; secp256k1_fe_sqr(&zi2, zi);
+            secp256k1_fe_t zi3; secp256k1_fe_mul(&zi3, &zi2, zi);
+            secp256k1_fe_mul(&r[i].x, &a[i].x, &zi2);
+            secp256k1_fe_mul(&r[i].y, &a[i].y, &zi3);
+        }
+    }
+}
+
+static void secp256k1_gej_set_infinity(secp256k1_gej_t *r) {
+    r->infinity = 1;
+    secp256k1_fe_set_int(&r->x, 0);
+    secp256k1_fe_set_int(&r->y, 0);
+    secp256k1_fe_set_int(&r->z, 0);
+}
+
+static void secp256k1_gej_set_xy(secp256k1_gej_t *r, const secp256k1_fe_t *x, const secp256k1_fe_t *y) {
+    r->infinity = 0;
+    r->x = *x;
+    r->y = *y;
+    secp256k1_fe_set_int(&r->z, 1);
+}
+
+static void secp256k1_gej_clear(secp256k1_gej_t *r) {
+    r->infinity = 0;
+    secp256k1_fe_clear(&r->x);
+    secp256k1_fe_clear(&r->y);
+    secp256k1_fe_clear(&r->z);
+}
+
+static void secp256k1_ge_clear(secp256k1_ge_t *r) {
+    r->infinity = 0;
+    secp256k1_fe_clear(&r->x);
+    secp256k1_fe_clear(&r->y);
+}
+
+static int secp256k1_ge_set_xo(secp256k1_ge_t *r, const secp256k1_fe_t *x, int odd) {
+    r->x = *x;
+    secp256k1_fe_t x2; secp256k1_fe_sqr(&x2, x);
+    secp256k1_fe_t x3; secp256k1_fe_mul(&x3, x, &x2);
+    r->infinity = 0;
+    secp256k1_fe_t c; secp256k1_fe_set_int(&c, 7);
+    secp256k1_fe_add(&c, &x3);
+    if (!secp256k1_fe_sqrt(&r->y, &c))
+        return 0;
+    secp256k1_fe_normalize(&r->y);
+    if (secp256k1_fe_is_odd(&r->y) != odd)
+        secp256k1_fe_negate(&r->y, &r->y, 1);
+    return 1;
+}
+
+static void secp256k1_gej_set_ge(secp256k1_gej_t *r, const secp256k1_ge_t *a) {
+   r->infinity = a->infinity;
+   r->x = a->x;
+   r->y = a->y;
+   secp256k1_fe_set_int(&r->z, 1);
+}
+
+static void secp256k1_gej_get_x_var(secp256k1_fe_t *r, const secp256k1_gej_t *a) {
+    secp256k1_fe_t zi2; secp256k1_fe_inv_var(&zi2, &a->z); secp256k1_fe_sqr(&zi2, &zi2);
+    secp256k1_fe_mul(r, &a->x, &zi2);
+}
+
+static void secp256k1_gej_neg(secp256k1_gej_t *r, const secp256k1_gej_t *a) {
+    r->infinity = a->infinity;
+    r->x = a->x;
+    r->y = a->y;
+    r->z = a->z;
+    secp256k1_fe_normalize(&r->y);
+    secp256k1_fe_negate(&r->y, &r->y, 1);
+}
+
+static int secp256k1_gej_is_infinity(const secp256k1_gej_t *a) {
+    return a->infinity;
+}
+
+static int secp256k1_gej_is_valid(const secp256k1_gej_t *a) {
+    if (a->infinity)
+        return 0;
+    /** y^2 = x^3 + 7
+     *  (Y/Z^3)^2 = (X/Z^2)^3 + 7
+     *  Y^2 / Z^6 = X^3 / Z^6 + 7
+     *  Y^2 = X^3 + 7*Z^6
+     */
+    secp256k1_fe_t y2; secp256k1_fe_sqr(&y2, &a->y);
+    secp256k1_fe_t x3; secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
+    secp256k1_fe_t z2; secp256k1_fe_sqr(&z2, &a->z);
+    secp256k1_fe_t z6; secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2);
+    secp256k1_fe_mul_int(&z6, 7);
+    secp256k1_fe_add(&x3, &z6);
+    secp256k1_fe_normalize(&y2);
+    secp256k1_fe_normalize(&x3);
+    return secp256k1_fe_equal(&y2, &x3);
+}
+
+static int secp256k1_ge_is_valid(const secp256k1_ge_t *a) {
+    if (a->infinity)
+        return 0;
+    /* y^2 = x^3 + 7 */
+    secp256k1_fe_t y2; secp256k1_fe_sqr(&y2, &a->y);
+    secp256k1_fe_t x3; secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
+    secp256k1_fe_t c; secp256k1_fe_set_int(&c, 7);
+    secp256k1_fe_add(&x3, &c);
+    secp256k1_fe_normalize(&y2);
+    secp256k1_fe_normalize(&x3);
+    return secp256k1_fe_equal(&y2, &x3);
+}
+
+static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *a) {
+    if (a->infinity) {
+        r->infinity = 1;
+        return;
+    }
+
+    secp256k1_fe_t t5 = a->y;
+    secp256k1_fe_normalize(&t5);
+    if (secp256k1_fe_is_zero(&t5)) {
+        r->infinity = 1;
+        return;
+    }
+
+    secp256k1_fe_t t1,t2,t3,t4;
+    secp256k1_fe_mul(&r->z, &t5, &a->z);
+    secp256k1_fe_mul_int(&r->z, 2);       /* Z' = 2*Y*Z (2) */
+    secp256k1_fe_sqr(&t1, &a->x);
+    secp256k1_fe_mul_int(&t1, 3);         /* T1 = 3*X^2 (3) */
+    secp256k1_fe_sqr(&t2, &t1);           /* T2 = 9*X^4 (1) */
+    secp256k1_fe_sqr(&t3, &t5);
+    secp256k1_fe_mul_int(&t3, 2);         /* T3 = 2*Y^2 (2) */
+    secp256k1_fe_sqr(&t4, &t3);
+    secp256k1_fe_mul_int(&t4, 2);         /* T4 = 8*Y^4 (2) */
+    secp256k1_fe_mul(&t3, &a->x, &t3);    /* T3 = 2*X*Y^2 (1) */
+    r->x = t3;
+    secp256k1_fe_mul_int(&r->x, 4);       /* X' = 8*X*Y^2 (4) */
+    secp256k1_fe_negate(&r->x, &r->x, 4); /* X' = -8*X*Y^2 (5) */
+    secp256k1_fe_add(&r->x, &t2);         /* X' = 9*X^4 - 8*X*Y^2 (6) */
+    secp256k1_fe_negate(&t2, &t2, 1);     /* T2 = -9*X^4 (2) */
+    secp256k1_fe_mul_int(&t3, 6);         /* T3 = 12*X*Y^2 (6) */
+    secp256k1_fe_add(&t3, &t2);           /* T3 = 12*X*Y^2 - 9*X^4 (8) */
+    secp256k1_fe_mul(&r->y, &t1, &t3);    /* Y' = 36*X^3*Y^2 - 27*X^6 (1) */
+    secp256k1_fe_negate(&t2, &t4, 2);     /* T2 = -8*Y^4 (3) */
+    secp256k1_fe_add(&r->y, &t2);         /* Y' = 36*X^3*Y^2 - 27*X^6 - 8*Y^4 (4) */
+    r->infinity = 0;
+}
+
+static void secp256k1_gej_add_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_gej_t *b) {
+    if (a->infinity) {
+        *r = *b;
+        return;
+    }
+    if (b->infinity) {
+        *r = *a;
+        return;
+    }
+    r->infinity = 0;
+    secp256k1_fe_t z22; secp256k1_fe_sqr(&z22, &b->z);
+    secp256k1_fe_t z12; secp256k1_fe_sqr(&z12, &a->z);
+    secp256k1_fe_t u1; secp256k1_fe_mul(&u1, &a->x, &z22);
+    secp256k1_fe_t u2; secp256k1_fe_mul(&u2, &b->x, &z12);
+    secp256k1_fe_t s1; secp256k1_fe_mul(&s1, &a->y, &z22); secp256k1_fe_mul(&s1, &s1, &b->z);
+    secp256k1_fe_t s2; secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
+    secp256k1_fe_normalize(&u1);
+    secp256k1_fe_normalize(&u2);
+    if (secp256k1_fe_equal(&u1, &u2)) {
+        secp256k1_fe_normalize(&s1);
+        secp256k1_fe_normalize(&s2);
+        if (secp256k1_fe_equal(&s1, &s2)) {
+            secp256k1_gej_double_var(r, a);
+        } else {
+            r->infinity = 1;
+        }
+        return;
+    }
+    secp256k1_fe_t h; secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2);
+    secp256k1_fe_t i; secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2);
+    secp256k1_fe_t i2; secp256k1_fe_sqr(&i2, &i);
+    secp256k1_fe_t h2; secp256k1_fe_sqr(&h2, &h);
+    secp256k1_fe_t h3; secp256k1_fe_mul(&h3, &h, &h2);
+    secp256k1_fe_mul(&r->z, &a->z, &b->z); secp256k1_fe_mul(&r->z, &r->z, &h);
+    secp256k1_fe_t t; secp256k1_fe_mul(&t, &u1, &h2);
+    r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2);
+    secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i);
+    secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1);
+    secp256k1_fe_add(&r->y, &h3);
+}
+
+static void secp256k1_gej_add_ge_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b) {
+    if (a->infinity) {
+        r->infinity = b->infinity;
+        r->x = b->x;
+        r->y = b->y;
+        secp256k1_fe_set_int(&r->z, 1);
+        return;
+    }
+    if (b->infinity) {
+        *r = *a;
+        return;
+    }
+    r->infinity = 0;
+    secp256k1_fe_t z12; secp256k1_fe_sqr(&z12, &a->z);
+    secp256k1_fe_t u1 = a->x; secp256k1_fe_normalize(&u1);
+    secp256k1_fe_t u2; secp256k1_fe_mul(&u2, &b->x, &z12);
+    secp256k1_fe_t s1 = a->y; secp256k1_fe_normalize(&s1);
+    secp256k1_fe_t s2; secp256k1_fe_mul(&s2, &b->y, &z12); secp256k1_fe_mul(&s2, &s2, &a->z);
+    secp256k1_fe_normalize(&u1);
+    secp256k1_fe_normalize(&u2);
+    if (secp256k1_fe_equal(&u1, &u2)) {
+        secp256k1_fe_normalize(&s1);
+        secp256k1_fe_normalize(&s2);
+        if (secp256k1_fe_equal(&s1, &s2)) {
+            secp256k1_gej_double_var(r, a);
+        } else {
+            r->infinity = 1;
+        }
+        return;
+    }
+    secp256k1_fe_t h; secp256k1_fe_negate(&h, &u1, 1); secp256k1_fe_add(&h, &u2);
+    secp256k1_fe_t i; secp256k1_fe_negate(&i, &s1, 1); secp256k1_fe_add(&i, &s2);
+    secp256k1_fe_t i2; secp256k1_fe_sqr(&i2, &i);
+    secp256k1_fe_t h2; secp256k1_fe_sqr(&h2, &h);
+    secp256k1_fe_t h3; secp256k1_fe_mul(&h3, &h, &h2);
+    r->z = a->z; secp256k1_fe_mul(&r->z, &r->z, &h);
+    secp256k1_fe_t t; secp256k1_fe_mul(&t, &u1, &h2);
+    r->x = t; secp256k1_fe_mul_int(&r->x, 2); secp256k1_fe_add(&r->x, &h3); secp256k1_fe_negate(&r->x, &r->x, 3); secp256k1_fe_add(&r->x, &i2);
+    secp256k1_fe_negate(&r->y, &r->x, 5); secp256k1_fe_add(&r->y, &t); secp256k1_fe_mul(&r->y, &r->y, &i);
+    secp256k1_fe_mul(&h3, &h3, &s1); secp256k1_fe_negate(&h3, &h3, 1);
+    secp256k1_fe_add(&r->y, &h3);
+}
+
+static void secp256k1_gej_add_ge(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_ge_t *b) {
+    VERIFY_CHECK(!b->infinity);
+    VERIFY_CHECK(a->infinity == 0 || a->infinity == 1);
+
+    /** In:
+     *    Eric Brier and Marc Joye, Weierstrass Elliptic Curves and Side-Channel Attacks.
+     *    In D. Naccache and P. Paillier, Eds., Public Key Cryptography, vol. 2274 of Lecture Notes in Computer Science, pages 335-345. Springer-Verlag, 2002.
+     *  we find as solution for a unified addition/doubling formula:
+     *    lambda = ((x1 + x2)^2 - x1 * x2 + a) / (y1 + y2), with a = 0 for secp256k1's curve equation.
+     *    x3 = lambda^2 - (x1 + x2)
+     *    2*y3 = lambda * (x1 + x2 - 2 * x3) - (y1 + y2).
+     *
+     *  Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives:
+     *    U1 = X1*Z2^2, U2 = X2*Z1^2
+     *    S1 = X1*Z2^3, S2 = X2*Z2^3
+     *    Z = Z1*Z2
+     *    T = U1+U2
+     *    M = S1+S2
+     *    Q = T*M^2
+     *    R = T^2-U1*U2
+     *    X3 = 4*(R^2-Q)
+     *    Y3 = 4*(R*(3*Q-2*R^2)-M^4)
+     *    Z3 = 2*M*Z
+     *  (Note that the paper uses xi = Xi / Zi and yi = Yi / Zi instead.)
+     */
+
+    secp256k1_fe_t zz; secp256k1_fe_sqr(&zz, &a->z);                /* z = Z1^2 */
+    secp256k1_fe_t u1 = a->x; secp256k1_fe_normalize(&u1);          /* u1 = U1 = X1*Z2^2 (1) */
+    secp256k1_fe_t u2; secp256k1_fe_mul(&u2, &b->x, &zz);           /* u2 = U2 = X2*Z1^2 (1) */
+    secp256k1_fe_t s1 = a->y; secp256k1_fe_normalize(&s1);          /* s1 = S1 = Y1*Z2^3 (1) */
+    secp256k1_fe_t s2; secp256k1_fe_mul(&s2, &b->y, &zz);           /* s2 = Y2*Z2^2 (1) */
+    secp256k1_fe_mul(&s2, &s2, &a->z);                              /* s2 = S2 = Y2*Z1^3 (1) */
+    secp256k1_fe_t z = a->z;                                        /* z = Z = Z1*Z2 (8) */
+    secp256k1_fe_t t = u1; secp256k1_fe_add(&t, &u2);               /* t = T = U1+U2 (2) */
+    secp256k1_fe_t m = s1; secp256k1_fe_add(&m, &s2);               /* m = M = S1+S2 (2) */
+    secp256k1_fe_t n; secp256k1_fe_sqr(&n, &m);                     /* n = M^2 (1) */
+    secp256k1_fe_t q; secp256k1_fe_mul(&q, &n, &t);                 /* q = Q = T*M^2 (1) */
+    secp256k1_fe_sqr(&n, &n);                                       /* n = M^4 (1) */
+    secp256k1_fe_t rr; secp256k1_fe_sqr(&rr, &t);                   /* rr = T^2 (1) */
+    secp256k1_fe_mul(&t, &u1, &u2); secp256k1_fe_negate(&t, &t, 1); /* t = -U1*U2 (2) */
+    secp256k1_fe_add(&rr, &t);                                      /* rr = R = T^2-U1*U2 (3) */
+    secp256k1_fe_sqr(&t, &rr);                                      /* t = R^2 (1) */
+    secp256k1_fe_mul(&r->z, &m, &z);                                /* r->z = M*Z (1) */
+    secp256k1_fe_normalize(&r->z);
+    int infinity = secp256k1_fe_is_zero(&r->z) * (1 - a->infinity);
+    secp256k1_fe_mul_int(&r->z, 2 * (1 - a->infinity)); /* r->z = Z3 = 2*M*Z (2) */
+    r->x = t;                                           /* r->x = R^2 (1) */
+    secp256k1_fe_negate(&q, &q, 1);                     /* q = -Q (2) */
+    secp256k1_fe_add(&r->x, &q);                        /* r->x = R^2-Q (3) */
+    secp256k1_fe_normalize(&r->x);
+    secp256k1_fe_mul_int(&q, 3);                        /* q = -3*Q (6) */
+    secp256k1_fe_mul_int(&t, 2);                        /* t = 2*R^2 (2) */
+    secp256k1_fe_add(&t, &q);                           /* t = 2*R^2-3*Q (8) */
+    secp256k1_fe_mul(&t, &t, &rr);                      /* t = R*(2*R^2-3*Q) (1) */
+    secp256k1_fe_add(&t, &n);                           /* t = R*(2*R^2-3*Q)+M^4 (2) */
+    secp256k1_fe_negate(&r->y, &t, 2);                  /* r->y = R*(3*Q-2*R^2)-M^4 (3) */
+    secp256k1_fe_normalize(&r->y);
+    secp256k1_fe_mul_int(&r->x, 4 * (1 - a->infinity)); /* r->x = X3 = 4*(R^2-Q) */
+    secp256k1_fe_mul_int(&r->y, 4 * (1 - a->infinity)); /* r->y = Y3 = 4*R*(3*Q-2*R^2)-4*M^4 (4) */
+
+    /** In case a->infinity == 1, the above code results in r->x, r->y, and r->z all equal to 0.
+     *  Add b->x to x, b->y to y, and 1 to z in that case.
+     */
+    t = b->x; secp256k1_fe_mul_int(&t, a->infinity);
+    secp256k1_fe_add(&r->x, &t);
+    t = b->y; secp256k1_fe_mul_int(&t, a->infinity);
+    secp256k1_fe_add(&r->y, &t);
+    secp256k1_fe_set_int(&t, a->infinity);
+    secp256k1_fe_add(&r->z, &t);
+    r->infinity = infinity;
+}
+
+
+
+static void secp256k1_gej_get_hex(char *r, int *rlen, const secp256k1_gej_t *a) {
+    secp256k1_gej_t c = *a;
+    secp256k1_ge_t t; secp256k1_ge_set_gej(&t, &c);
+    secp256k1_ge_get_hex(r, rlen, &t);
+}
+
+#ifdef USE_ENDOMORPHISM
+static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *a) {
+    const secp256k1_fe_t *beta = &secp256k1_ge_consts->beta;
+    *r = *a;
+    secp256k1_fe_mul(&r->x, &r->x, beta);
+}
+
+static void secp256k1_gej_split_exp_var(secp256k1_num_t *r1, secp256k1_num_t *r2, const secp256k1_num_t *a) {
+    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
+    secp256k1_num_t bnc1, bnc2, bnt1, bnt2, bnn2;
+
+    secp256k1_num_copy(&bnn2, &c->order);
+    secp256k1_num_shift(&bnn2, 1);
+
+    secp256k1_num_mul(&bnc1, a, &c->a1b2);
+    secp256k1_num_add(&bnc1, &bnc1, &bnn2);
+    secp256k1_num_div(&bnc1, &bnc1, &c->order);
+
+    secp256k1_num_mul(&bnc2, a, &c->b1);
+    secp256k1_num_add(&bnc2, &bnc2, &bnn2);
+    secp256k1_num_div(&bnc2, &bnc2, &c->order);
+
+    secp256k1_num_mul(&bnt1, &bnc1, &c->a1b2);
+    secp256k1_num_mul(&bnt2, &bnc2, &c->a2);
+    secp256k1_num_add(&bnt1, &bnt1, &bnt2);
+    secp256k1_num_sub(r1, a, &bnt1);
+    secp256k1_num_mul(&bnt1, &bnc1, &c->b1);
+    secp256k1_num_mul(&bnt2, &bnc2, &c->a1b2);
+    secp256k1_num_sub(r2, &bnt1, &bnt2);
+}
+#endif
+
+
+static void secp256k1_ge_start(void) {
+    static const unsigned char secp256k1_ge_consts_order[] = {
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+        0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
+        0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
+    };
+    static const unsigned char secp256k1_ge_consts_g_x[] = {
+        0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,
+        0x55,0xA0,0x62,0x95,0xCE,0x87,0x0B,0x07,
+        0x02,0x9B,0xFC,0xDB,0x2D,0xCE,0x28,0xD9,
+        0x59,0xF2,0x81,0x5B,0x16,0xF8,0x17,0x98
+    };
+    static const unsigned char secp256k1_ge_consts_g_y[] = {
+        0x48,0x3A,0xDA,0x77,0x26,0xA3,0xC4,0x65,
+        0x5D,0xA4,0xFB,0xFC,0x0E,0x11,0x08,0xA8,
+        0xFD,0x17,0xB4,0x48,0xA6,0x85,0x54,0x19,
+        0x9C,0x47,0xD0,0x8F,0xFB,0x10,0xD4,0xB8
+    };
+#ifdef USE_ENDOMORPHISM
+    /* properties of secp256k1's efficiently computable endomorphism */
+    static const unsigned char secp256k1_ge_consts_lambda[] = {
+        0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,
+        0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a,
+        0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,
+        0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72
+    };
+    static const unsigned char secp256k1_ge_consts_beta[] = {
+        0x7a,0xe9,0x6a,0x2b,0x65,0x7c,0x07,0x10,
+        0x6e,0x64,0x47,0x9e,0xac,0x34,0x34,0xe9,
+        0x9c,0xf0,0x49,0x75,0x12,0xf5,0x89,0x95,
+        0xc1,0x39,0x6c,0x28,0x71,0x95,0x01,0xee
+    };
+    static const unsigned char secp256k1_ge_consts_a1b2[] = {
+        0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,
+        0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15
+    };
+    static const unsigned char secp256k1_ge_consts_b1[] = {
+        0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,
+        0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3
+    };
+    static const unsigned char secp256k1_ge_consts_a2[] = {
+        0x01,
+        0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,
+        0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8
+    };
+#endif
+    if (secp256k1_ge_consts == NULL) {
+        secp256k1_ge_consts_t *ret = (secp256k1_ge_consts_t*)malloc(sizeof(secp256k1_ge_consts_t));
+        secp256k1_num_set_bin(&ret->order,  secp256k1_ge_consts_order,  sizeof(secp256k1_ge_consts_order));
+        secp256k1_num_copy(&ret->half_order, &ret->order);
+        secp256k1_num_shift(&ret->half_order, 1);
+#ifdef USE_ENDOMORPHISM
+        secp256k1_num_set_bin(&ret->lambda, secp256k1_ge_consts_lambda, sizeof(secp256k1_ge_consts_lambda));
+        secp256k1_num_set_bin(&ret->a1b2,   secp256k1_ge_consts_a1b2,   sizeof(secp256k1_ge_consts_a1b2));
+        secp256k1_num_set_bin(&ret->a2,     secp256k1_ge_consts_a2,     sizeof(secp256k1_ge_consts_a2));
+        secp256k1_num_set_bin(&ret->b1,     secp256k1_ge_consts_b1,     sizeof(secp256k1_ge_consts_b1));
+        secp256k1_fe_set_b32(&ret->beta, secp256k1_ge_consts_beta);
+#endif
+        secp256k1_fe_t g_x, g_y;
+        secp256k1_fe_set_b32(&g_x, secp256k1_ge_consts_g_x);
+        secp256k1_fe_set_b32(&g_y, secp256k1_ge_consts_g_y);
+        secp256k1_ge_set_xy(&ret->g, &g_x, &g_y);
+        secp256k1_ge_consts = ret;
+    }
+}
+
+static void secp256k1_ge_stop(void) {
+    if (secp256k1_ge_consts != NULL) {
+        secp256k1_ge_consts_t *c = (secp256k1_ge_consts_t*)secp256k1_ge_consts;
+        free((void*)c);
+        secp256k1_ge_consts = NULL;
+    }
+}
+
+#endif
diff --git a/src/java/org/bitcoin/NativeSecp256k1.java b/src/java/org/bitcoin/NativeSecp256k1.java
new file mode 100644
index 000000000000..90a498eaa2c4
--- /dev/null
+++ b/src/java/org/bitcoin/NativeSecp256k1.java
@@ -0,0 +1,60 @@
+package org.bitcoin;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import com.google.common.base.Preconditions;
+
+
+/**
+ * This class holds native methods to handle ECDSA verification.
+ * You can find an example library that can be used for this at
+ * https://github.com/sipa/secp256k1
+ */
+public class NativeSecp256k1 {
+    public static final boolean enabled;
+    static {
+        boolean isEnabled = true;
+        try {
+            System.loadLibrary("javasecp256k1");
+        } catch (UnsatisfiedLinkError e) {
+            isEnabled = false;
+        }
+        enabled = isEnabled;
+    }
+    
+    private static ThreadLocal<ByteBuffer> nativeECDSABuffer = new ThreadLocal<ByteBuffer>();
+    /**
+     * Verifies the given secp256k1 signature in native code.
+     * Calling when enabled == false is undefined (probably library not loaded)
+     * 
+     * @param data The data which was signed, must be exactly 32 bytes
+     * @param signature The signature
+     * @param pub The public key which did the signing
+     */
+    public static boolean verify(byte[] data, byte[] signature, byte[] pub) {
+        Preconditions.checkArgument(data.length == 32 && signature.length <= 520 && pub.length <= 520);
+
+        ByteBuffer byteBuff = nativeECDSABuffer.get();
+        if (byteBuff == null) {
+            byteBuff = ByteBuffer.allocateDirect(32 + 8 + 520 + 520);
+            byteBuff.order(ByteOrder.nativeOrder());
+            nativeECDSABuffer.set(byteBuff);
+        }
+        byteBuff.rewind();
+        byteBuff.put(data);
+        byteBuff.putInt(signature.length);
+        byteBuff.putInt(pub.length);
+        byteBuff.put(signature);
+        byteBuff.put(pub);
+        return secp256k1_ecdsa_verify(byteBuff) == 1;
+    }
+
+    /**
+     * @param byteBuff signature format is byte[32] data,
+     *        native-endian int signatureLength, native-endian int pubkeyLength,
+     *        byte[signatureLength] signature, byte[pubkeyLength] pub
+     * @returns 1 for valid signature, anything else for invalid
+     */
+    private static native int secp256k1_ecdsa_verify(ByteBuffer byteBuff);
+}
diff --git a/src/java/org_bitcoin_NativeSecp256k1.c b/src/java/org_bitcoin_NativeSecp256k1.c
new file mode 100644
index 000000000000..bb4cd707280a
--- /dev/null
+++ b/src/java/org_bitcoin_NativeSecp256k1.c
@@ -0,0 +1,23 @@
+#include "org_bitcoin_NativeSecp256k1.h"
+#include "include/secp256k1.h"
+
+JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify
+  (JNIEnv* env, jclass classObject, jobject byteBufferObject)
+{
+	unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject);
+	int sigLen = *((int*)(data + 32));
+	int pubLen = *((int*)(data + 32 + 4));
+
+	return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen);
+}
+
+static void __javasecp256k1_attach(void) __attribute__((constructor));
+static void __javasecp256k1_detach(void) __attribute__((destructor));
+
+static void __javasecp256k1_attach(void) {
+	secp256k1_start(SECP256K1_START_VERIFY);
+}
+
+static void __javasecp256k1_detach(void) {
+	secp256k1_stop();
+}
diff --git a/src/java/org_bitcoin_NativeSecp256k1.h b/src/java/org_bitcoin_NativeSecp256k1.h
new file mode 100644
index 000000000000..d7fb004fa841
--- /dev/null
+++ b/src/java/org_bitcoin_NativeSecp256k1.h
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_bitcoin_NativeSecp256k1 */
+
+#ifndef _Included_org_bitcoin_NativeSecp256k1
+#define _Included_org_bitcoin_NativeSecp256k1
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_bitcoin_NativeSecp256k1
+ * Method:    secp256k1_ecdsa_verify
+ * Signature: (Ljava/nio/ByteBuffer;)I
+ */
+JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify
+  (JNIEnv *, jclass, jobject);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/num.h b/src/num.h
new file mode 100644
index 000000000000..c86f847858fe
--- /dev/null
+++ b/src/num.h
@@ -0,0 +1,100 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_NUM_
+#define _SECP256K1_NUM_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#if defined(USE_NUM_GMP)
+#include "num_gmp.h"
+#else
+#error "Please select num implementation"
+#endif
+
+/** Clear a number to prevent the leak of sensitive data. */
+static void secp256k1_num_clear(secp256k1_num_t *r);
+
+/** Copy a number. */
+static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a);
+
+/** Convert a number's absolute value to a binary big-endian string.
+ *  There must be enough place. */
+static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a);
+
+/** Set a number to the value of a binary big-endian string. */
+static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen);
+
+/** Set a number equal to a (signed) integer. */
+static void secp256k1_num_set_int(secp256k1_num_t *r, int a);
+
+/** Compute a modular inverse. The input must be less than the modulus. */
+static void secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *m);
+
+/** Multiply two numbers modulo another. */
+static void secp256k1_num_mod_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, const secp256k1_num_t *m);
+
+/** Compare the absolute value of two numbers. */
+static int secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Test whether two number are equal (including sign). */
+static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Add two (signed) numbers. */
+static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Subtract two (signed) numbers. */
+static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Multiply two (signed) numbers. */
+static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Divide two (signed) numbers. */
+static void secp256k1_num_div(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
+
+/** Replace a number by its remainder modulo m. M's sign is ignored. The result is a number between 0 and m-1,
+    even if r was negative. */
+static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m);
+
+/** Calculate the number of bits in (the absolute value of) a number. */
+static int secp256k1_num_bits(const secp256k1_num_t *a);
+
+/** Right-shift the passed number by bits bits, and return those bits. */
+static int secp256k1_num_shift(secp256k1_num_t *r, int bits);
+
+/** Check whether a number is zero. */
+static int secp256k1_num_is_zero(const secp256k1_num_t *a);
+
+/** Check whether a number is odd. */
+static int secp256k1_num_is_odd(const secp256k1_num_t *a);
+
+/** Check whether a number is strictly negative. */
+static int secp256k1_num_is_neg(const secp256k1_num_t *a);
+
+/** Check whether a particular bit is set in a number. */
+static int secp256k1_num_get_bit(const secp256k1_num_t *a, int pos);
+
+/** Increase a number by 1. */
+static void secp256k1_num_inc(secp256k1_num_t *r);
+
+/** Set a number equal to the value of a hex string (unsigned). */
+static void secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen);
+
+/** Convert (the absolute value of) a number to a hexadecimal string. */
+static void secp256k1_num_get_hex(char *r, int rlen, const secp256k1_num_t *a);
+
+/** Split a number into a low and high part. */
+static void secp256k1_num_split(secp256k1_num_t *rl, secp256k1_num_t *rh, const secp256k1_num_t *a, int bits);
+
+/** Change a number's sign. */
+static void secp256k1_num_negate(secp256k1_num_t *r);
+
+/** Get a bunch of bits from a number. */
+static int secp256k1_num_get_bits(const secp256k1_num_t *a, int offset, int count);
+
+#endif
diff --git a/src/num_gmp.h b/src/num_gmp.h
new file mode 100644
index 000000000000..baa1f2bf2e4d
--- /dev/null
+++ b/src/num_gmp.h
@@ -0,0 +1,20 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_NUM_REPR_
+#define _SECP256K1_NUM_REPR_
+
+#include <gmp.h>
+
+#define NUM_LIMBS ((256+GMP_NUMB_BITS-1)/GMP_NUMB_BITS)
+
+typedef struct {
+    mp_limb_t data[2*NUM_LIMBS];
+    int neg;
+    int limbs;
+} secp256k1_num_t;
+
+#endif
diff --git a/src/num_gmp_impl.h b/src/num_gmp_impl.h
new file mode 100644
index 000000000000..e45a59e0cdc4
--- /dev/null
+++ b/src/num_gmp_impl.h
@@ -0,0 +1,376 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_NUM_REPR_IMPL_H_
+#define _SECP256K1_NUM_REPR_IMPL_H_
+
+#include <string.h>
+#include <stdlib.h>
+#include <gmp.h>
+
+#include "util.h"
+#include "num.h"
+
+#ifdef VERIFY
+static void secp256k1_num_sanity(const secp256k1_num_t *a) {
+    VERIFY_CHECK(a->limbs == 1 || (a->limbs > 1 && a->data[a->limbs-1] != 0));
+}
+#else
+#define secp256k1_num_sanity(a) do { } while(0)
+#endif
+
+static void secp256k1_num_init(secp256k1_num_t *r) {
+    r->neg = 0;
+    r->limbs = 1;
+    r->data[0] = 0;
+}
+
+static void secp256k1_num_clear(secp256k1_num_t *r) {
+    memset(r, 0, sizeof(*r));
+}
+
+static void secp256k1_num_free(secp256k1_num_t *r) {
+    (void)r;
+}
+
+static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) {
+    *r = *a;
+}
+
+static int secp256k1_num_bits(const secp256k1_num_t *a) {
+    int ret=(a->limbs-1)*GMP_NUMB_BITS;
+    mp_limb_t x=a->data[a->limbs-1];
+    while (x) {
+        x >>= 1;
+        ret++;
+    }
+    return ret;
+}
+
+
+static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a) {
+    unsigned char tmp[65];
+    int len = 0;
+    if (a->limbs>1 || a->data[0] != 0) {
+        len = mpn_get_str(tmp, 256, (mp_limb_t*)a->data, a->limbs);
+    }
+    int shift = 0;
+    while (shift < len && tmp[shift] == 0) shift++;
+    VERIFY_CHECK(len-shift <= (int)rlen);
+    memset(r, 0, rlen - len + shift);
+    if (len > shift) {
+        memcpy(r + rlen - len + shift, tmp + shift, len - shift);
+    }
+    memset(tmp, 0, sizeof(tmp));
+}
+
+static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen) {
+    VERIFY_CHECK(alen > 0);
+    VERIFY_CHECK(alen <= 64);
+    int len = mpn_set_str(r->data, a, alen, 256);
+    VERIFY_CHECK(len <= NUM_LIMBS*2);
+    r->limbs = len;
+    r->neg = 0;
+    while (r->limbs > 1 && r->data[r->limbs-1]==0) r->limbs--;
+}
+
+static void secp256k1_num_set_int(secp256k1_num_t *r, int a) {
+    r->limbs = 1;
+    r->neg = (a < 0);
+    r->data[0] = (a < 0) ? -a : a;
+}
+
+static void secp256k1_num_add_abs(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    mp_limb_t c = mpn_add(r->data, a->data, a->limbs, b->data, b->limbs);
+    r->limbs = a->limbs;
+    if (c != 0) {
+        VERIFY_CHECK(r->limbs < 2*NUM_LIMBS);
+        r->data[r->limbs++] = c;
+    }
+}
+
+static void secp256k1_num_sub_abs(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    mp_limb_t c = mpn_sub(r->data, a->data, a->limbs, b->data, b->limbs);
+    VERIFY_CHECK(c == 0);
+    r->limbs = a->limbs;
+    while (r->limbs > 1 && r->data[r->limbs-1]==0) r->limbs--;
+}
+
+static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m) {
+    secp256k1_num_sanity(r);
+    secp256k1_num_sanity(m);
+
+    if (r->limbs >= m->limbs) {
+        mp_limb_t t[2*NUM_LIMBS];
+        mpn_tdiv_qr(t, r->data, 0, r->data, r->limbs, m->data, m->limbs);
+        memset(t, 0, sizeof(t));
+        r->limbs = m->limbs;
+        while (r->limbs > 1 && r->data[r->limbs-1]==0) r->limbs--;
+    }
+
+    if (r->neg && (r->limbs > 1 || r->data[0] != 0)) {
+        secp256k1_num_sub_abs(r, m, r);
+        r->neg = 0;
+    }
+}
+
+static void secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *m) {
+    secp256k1_num_sanity(a);
+    secp256k1_num_sanity(m);
+
+    /** mpn_gcdext computes: (G,S) = gcdext(U,V), where
+     *  * G = gcd(U,V)
+     *  * G = U*S + V*T
+     *  * U has equal or more limbs than V, and V has no padding
+     *  If we set U to be (a padded version of) a, and V = m:
+     *    G = a*S + m*T
+     *    G = a*S mod m
+     *  Assuming G=1:
+     *    S = 1/a mod m
+     */
+    VERIFY_CHECK(m->limbs <= NUM_LIMBS);
+    VERIFY_CHECK(m->data[m->limbs-1] != 0);
+    mp_limb_t g[NUM_LIMBS+1];
+    mp_limb_t u[NUM_LIMBS+1];
+    mp_limb_t v[NUM_LIMBS+1];
+    for (int i=0; i < m->limbs; i++) {
+        u[i] = (i < a->limbs) ? a->data[i] : 0;
+        v[i] = m->data[i];
+    }
+    mp_size_t sn = NUM_LIMBS+1;
+    mp_size_t gn = mpn_gcdext(g, r->data, &sn, u, m->limbs, v, m->limbs);
+    VERIFY_CHECK(gn == 1);
+    VERIFY_CHECK(g[0] == 1);
+    r->neg = a->neg ^ m->neg;
+    if (sn < 0) {
+        mpn_sub(r->data, m->data, m->limbs, r->data, -sn);
+        r->limbs = m->limbs;
+        while (r->limbs > 1 && r->data[r->limbs-1]==0) r->limbs--;
+    } else {
+        r->limbs = sn;
+    }
+    memset(g, 0, sizeof(g));
+    memset(u, 0, sizeof(u));
+    memset(v, 0, sizeof(v));
+}
+
+static int secp256k1_num_is_zero(const secp256k1_num_t *a) {
+    return (a->limbs == 1 && a->data[0] == 0);
+}
+
+static int secp256k1_num_is_odd(const secp256k1_num_t *a) {
+    return a->data[0] & 1;
+}
+
+static int secp256k1_num_is_neg(const secp256k1_num_t *a) {
+    return (a->limbs > 1 || a->data[0] != 0) && a->neg;
+}
+
+static int secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    if (a->limbs > b->limbs) return 1;
+    if (a->limbs < b->limbs) return -1;
+    return mpn_cmp(a->data, b->data, a->limbs);
+}
+
+static int secp256k1_num_eq(const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    if (a->limbs > b->limbs) return 0;
+    if (a->limbs < b->limbs) return 0;
+    if ((a->neg && !secp256k1_num_is_zero(a)) != (b->neg && !secp256k1_num_is_zero(b))) return 0;
+    return mpn_cmp(a->data, b->data, a->limbs) == 0;
+}
+
+static void secp256k1_num_subadd(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, int bneg) {
+    if (!(b->neg ^ bneg ^ a->neg)) { /* a and b have the same sign */
+        r->neg = a->neg;
+        if (a->limbs >= b->limbs) {
+            secp256k1_num_add_abs(r, a, b);
+        } else {
+            secp256k1_num_add_abs(r, b, a);
+        }
+    } else {
+        if (secp256k1_num_cmp(a, b) > 0) {
+            r->neg = a->neg;
+            secp256k1_num_sub_abs(r, a, b);
+        } else {
+            r->neg = b->neg ^ bneg;
+            secp256k1_num_sub_abs(r, b, a);
+        }
+    }
+}
+
+static void secp256k1_num_add(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    secp256k1_num_sanity(a);
+    secp256k1_num_sanity(b);
+    secp256k1_num_subadd(r, a, b, 0);
+}
+
+static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    secp256k1_num_sanity(a);
+    secp256k1_num_sanity(b);
+    secp256k1_num_subadd(r, a, b, 1);
+}
+
+static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    secp256k1_num_sanity(a);
+    secp256k1_num_sanity(b);
+
+    mp_limb_t tmp[2*NUM_LIMBS+1];
+    VERIFY_CHECK(a->limbs + b->limbs <= 2*NUM_LIMBS+1);
+    if ((a->limbs==1 && a->data[0]==0) || (b->limbs==1 && b->data[0]==0)) {
+        r->limbs = 1;
+        r->neg = 0;
+        r->data[0] = 0;
+        return;
+    }
+    if (a->limbs >= b->limbs)
+        mpn_mul(tmp, a->data, a->limbs, b->data, b->limbs);
+    else
+        mpn_mul(tmp, b->data, b->limbs, a->data, a->limbs);
+    r->limbs = a->limbs + b->limbs;
+    if (r->limbs > 1 && tmp[r->limbs - 1]==0) r->limbs--;
+    VERIFY_CHECK(r->limbs <= 2*NUM_LIMBS);
+    mpn_copyi(r->data, tmp, r->limbs);
+    r->neg = a->neg ^ b->neg;
+    memset(tmp, 0, sizeof(tmp));
+}
+
+static void secp256k1_num_div(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
+    secp256k1_num_sanity(a);
+    secp256k1_num_sanity(b);
+    if (b->limbs > a->limbs) {
+        r->limbs = 1;
+        r->data[0] = 0;
+        r->neg = 0;
+        return;
+    }
+
+    mp_limb_t quo[2*NUM_LIMBS+1];
+    mp_limb_t rem[2*NUM_LIMBS+1];
+    mpn_tdiv_qr(quo, rem, 0, a->data, a->limbs, b->data, b->limbs);
+    mpn_copyi(r->data, quo, a->limbs - b->limbs + 1);
+    r->limbs = a->limbs - b->limbs + 1;
+    while (r->limbs > 1 && r->data[r->limbs - 1]==0) r->limbs--;
+    r->neg = a->neg ^ b->neg;
+}
+
+static void secp256k1_num_mod_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, const secp256k1_num_t *m) {
+    secp256k1_num_mul(r, a, b);
+    secp256k1_num_mod(r, m);
+}
+
+
+static int secp256k1_num_shift(secp256k1_num_t *r, int bits) {
+    VERIFY_CHECK(bits <= GMP_NUMB_BITS);
+    mp_limb_t ret = mpn_rshift(r->data, r->data, r->limbs, bits);
+    if (r->limbs>1 && r->data[r->limbs-1]==0) r->limbs--;
+    ret >>= (GMP_NUMB_BITS - bits);
+    return ret;
+}
+
+static int secp256k1_num_get_bit(const secp256k1_num_t *a, int pos) {
+    return (a->limbs*GMP_NUMB_BITS > pos) && ((a->data[pos/GMP_NUMB_BITS] >> (pos % GMP_NUMB_BITS)) & 1);
+}
+
+static void secp256k1_num_inc(secp256k1_num_t *r) {
+    mp_limb_t ret = mpn_add_1(r->data, r->data, r->limbs, (mp_limb_t)1);
+    if (ret) {
+        VERIFY_CHECK(r->limbs < 2*NUM_LIMBS);
+        r->data[r->limbs++] = ret;
+    }
+}
+
+static void secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen) {
+    static const unsigned char cvt[256] = {
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 1, 2, 3, 4, 5, 6,7,8,9,0,0,0,0,0,0,
+        0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
+        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0
+    };
+    unsigned char num[257] = {};
+    for (int i=0; i<alen; i++) {
+        num[i] = cvt[(unsigned char)a[i]];
+    }
+    r->limbs = mpn_set_str(r->data, num, alen, 16);
+    r->neg = 0;
+    while (r->limbs > 1 && r->data[r->limbs-1] == 0) r->limbs--;
+}
+
+static void secp256k1_num_get_hex(char *r, int rlen, const secp256k1_num_t *a) {
+    static const unsigned char cvt[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
+    unsigned char *tmp = malloc(257);
+    mp_size_t len = mpn_get_str(tmp, 16, (mp_limb_t*)a->data, a->limbs);
+    VERIFY_CHECK(len <= rlen);
+    for (int i=0; i<len; i++) {
+        VERIFY_CHECK(rlen-len+i >= 0);
+        VERIFY_CHECK(rlen-len+i < rlen);
+        VERIFY_CHECK(tmp[i] < 16);
+        r[rlen-len+i] = cvt[tmp[i]];
+    }
+    for (int i=0; i<rlen-len; i++) {
+        VERIFY_CHECK(i >= 0);
+        VERIFY_CHECK(i < rlen);
+        r[i] = cvt[0];
+    }
+    free(tmp);
+}
+
+static void secp256k1_num_split(secp256k1_num_t *rl, secp256k1_num_t *rh, const secp256k1_num_t *a, int bits) {
+    VERIFY_CHECK(bits > 0);
+    rh->neg = a->neg;
+    if (bits >= a->limbs * GMP_NUMB_BITS) {
+        *rl = *a;
+        rh->limbs = 1;
+        rh->data[0] = 0;
+        return;
+    }
+    rl->limbs = 0;
+    rl->neg = a->neg;
+    int left = bits;
+    while (left >= GMP_NUMB_BITS) {
+        rl->data[rl->limbs] = a->data[rl->limbs];
+        rl->limbs++;
+        left -= GMP_NUMB_BITS;
+    }
+    if (left == 0) {
+        mpn_copyi(rh->data, a->data + rl->limbs, a->limbs - rl->limbs);
+        rh->limbs = a->limbs - rl->limbs;
+    } else {
+        mpn_rshift(rh->data, a->data + rl->limbs, a->limbs - rl->limbs, left);
+        rh->limbs = a->limbs - rl->limbs;
+        while (rh->limbs>1 && rh->data[rh->limbs-1]==0) rh->limbs--;
+    }
+    if (left > 0) {
+        rl->data[rl->limbs] = a->data[rl->limbs] & ((((mp_limb_t)1) << left) - 1);
+        rl->limbs++;
+    }
+    while (rl->limbs>1 && rl->data[rl->limbs-1]==0) rl->limbs--;
+}
+
+static void secp256k1_num_negate(secp256k1_num_t *r) {
+    r->neg ^= 1;
+}
+
+static int secp256k1_num_get_bits(const secp256k1_num_t *a, int offset, int count) {
+    int ret = 0;
+    for (int i = 0; i < count; i++) {
+        ret |= ((a->data[(offset + i) / GMP_NUMB_BITS] >> ((offset + i) % GMP_NUMB_BITS)) & 1) << i;
+    }
+    return ret;
+}
+
+#endif
diff --git a/src/num_impl.h b/src/num_impl.h
new file mode 100644
index 000000000000..f73d3ceea865
--- /dev/null
+++ b/src/num_impl.h
@@ -0,0 +1,22 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_NUM_IMPL_H_
+#define _SECP256K1_NUM_IMPL_H_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include "num.h"
+
+#if defined(USE_NUM_GMP)
+#include "num_gmp_impl.h"
+#else
+#error "Please select num implementation"
+#endif
+
+#endif
diff --git a/src/scalar.h b/src/scalar.h
new file mode 100644
index 000000000000..3baacb37215a
--- /dev/null
+++ b/src/scalar.h
@@ -0,0 +1,63 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_
+#define _SECP256K1_SCALAR_
+
+#include "num.h"
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#if defined(USE_SCALAR_4X64)
+#include "scalar_4x64.h"
+#elif defined(USE_SCALAR_8X32)
+#include "scalar_8x32.h"
+#else
+#error "Please select scalar implementation"
+#endif
+
+/** Clear a scalar to prevent the leak of sensitive data. */
+static void secp256k1_scalar_clear(secp256k1_scalar_t *r);
+
+/** Access bits from a scalar. */
+static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count);
+
+/** Set a scalar from a big endian byte array. */
+static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *bin, int *overflow);
+
+/** Convert a scalar to a byte array. */
+static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a);
+
+/** Add two scalars together (modulo the group order). */
+static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
+
+/** Multiply two scalars (modulo the group order). */
+static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
+
+/** Compute the square of a scalar (modulo the group order). */
+static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
+
+/** Compute the inverse of a scalar (modulo the group order). */
+static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
+
+/** Compute the complement of a scalar (modulo the group order). */
+static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
+
+/** Check whether a scalar equals zero. */
+static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a);
+
+/** Check whether a scalar equals one. */
+static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a);
+
+/** Check whether a scalar is higher than the group order divided by 2. */
+static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a);
+
+/** Convert a scalar to a number. */
+static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a);
+
+#endif
diff --git a/src/scalar_4x64.h b/src/scalar_4x64.h
new file mode 100644
index 000000000000..5a751c686223
--- /dev/null
+++ b/src/scalar_4x64.h
@@ -0,0 +1,17 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_
+#define _SECP256K1_SCALAR_REPR_
+
+#include <stdint.h>
+
+/** A scalar modulo the group order of the secp256k1 curve. */
+typedef struct {
+    uint64_t d[4];
+} secp256k1_scalar_t;
+
+#endif
diff --git a/src/scalar_4x64_impl.h b/src/scalar_4x64_impl.h
new file mode 100644
index 000000000000..f78718234fe1
--- /dev/null
+++ b/src/scalar_4x64_impl.h
@@ -0,0 +1,359 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_
+#define _SECP256K1_SCALAR_REPR_IMPL_H_
+
+typedef unsigned __int128 uint128_t;
+
+/* Limbs of the secp256k1 order. */
+#define SECP256K1_N_0 ((uint64_t)0xBFD25E8CD0364141ULL)
+#define SECP256K1_N_1 ((uint64_t)0xBAAEDCE6AF48A03BULL)
+#define SECP256K1_N_2 ((uint64_t)0xFFFFFFFFFFFFFFFEULL)
+#define SECP256K1_N_3 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
+
+/* Limbs of 2^256 minus the secp256k1 order. */
+#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
+#define SECP256K1_N_C_1 (~SECP256K1_N_1)
+#define SECP256K1_N_C_2 (1)
+
+/* Limbs of half the secp256k1 order. */
+#define SECP256K1_N_H_0 ((uint64_t)0xDFE92F46681B20A0ULL)
+#define SECP256K1_N_H_1 ((uint64_t)0x5D576E7357A4501DULL)
+#define SECP256K1_N_H_2 ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
+#define SECP256K1_N_H_3 ((uint64_t)0x7FFFFFFFFFFFFFFFULL)
+
+SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) {
+    r->d[0] = 0;
+    r->d[1] = 0;
+    r->d[2] = 0;
+    r->d[3] = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count) {
+    VERIFY_CHECK((offset + count - 1) / 64 == offset / 64);
+    return (a->d[offset / 64] >> (offset % 64)) & ((((uint64_t)1) << count) - 1);
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) {
+    int yes = 0;
+    int no = 0;
+    no |= (a->d[3] < SECP256K1_N_3); /* No need for a > check. */
+    no |= (a->d[2] < SECP256K1_N_2);
+    yes |= (a->d[2] > SECP256K1_N_2) & ~no;
+    no |= (a->d[1] < SECP256K1_N_1);
+    yes |= (a->d[1] > SECP256K1_N_1) & ~no;
+    yes |= (a->d[0] >= SECP256K1_N_0) & ~no;
+    return yes;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, unsigned int overflow) {
+    VERIFY_CHECK(overflow <= 1);
+    uint128_t t = (uint128_t)r->d[0] + overflow * SECP256K1_N_C_0;
+    r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)r->d[1] + overflow * SECP256K1_N_C_1;
+    r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)r->d[2] + overflow * SECP256K1_N_C_2;
+    r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint64_t)r->d[3];
+    r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL;
+    return overflow;
+}
+
+static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    uint128_t t = (uint128_t)a->d[0] + b->d[0];
+    r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)a->d[1] + b->d[1];
+    r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)a->d[2] + b->d[2];
+    r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)a->d[3] + b->d[3];
+    r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    secp256k1_scalar_reduce(r, t + secp256k1_scalar_check_overflow(r));
+}
+
+static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) {
+    r->d[0] = (uint64_t)b32[31] | (uint64_t)b32[30] << 8 | (uint64_t)b32[29] << 16 | (uint64_t)b32[28] << 24 | (uint64_t)b32[27] << 32 | (uint64_t)b32[26] << 40 | (uint64_t)b32[25] << 48 | (uint64_t)b32[24] << 56;
+    r->d[1] = (uint64_t)b32[23] | (uint64_t)b32[22] << 8 | (uint64_t)b32[21] << 16 | (uint64_t)b32[20] << 24 | (uint64_t)b32[19] << 32 | (uint64_t)b32[18] << 40 | (uint64_t)b32[17] << 48 | (uint64_t)b32[16] << 56;
+    r->d[2] = (uint64_t)b32[15] | (uint64_t)b32[14] << 8 | (uint64_t)b32[13] << 16 | (uint64_t)b32[12] << 24 | (uint64_t)b32[11] << 32 | (uint64_t)b32[10] << 40 | (uint64_t)b32[9] << 48 | (uint64_t)b32[8] << 56;
+    r->d[3] = (uint64_t)b32[7] | (uint64_t)b32[6] << 8 | (uint64_t)b32[5] << 16 | (uint64_t)b32[4] << 24 | (uint64_t)b32[3] << 32 | (uint64_t)b32[2] << 40 | (uint64_t)b32[1] << 48 | (uint64_t)b32[0] << 56;
+    int over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r));
+    if (overflow) {
+        *overflow = over;
+    }
+}
+
+static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a) {
+    bin[0] = a->d[3] >> 56; bin[1] = a->d[3] >> 48; bin[2] = a->d[3] >> 40; bin[3] = a->d[3] >> 32; bin[4] = a->d[3] >> 24; bin[5] = a->d[3] >> 16; bin[6] = a->d[3] >> 8; bin[7] = a->d[3];
+    bin[8] = a->d[2] >> 56; bin[9] = a->d[2] >> 48; bin[10] = a->d[2] >> 40; bin[11] = a->d[2] >> 32; bin[12] = a->d[2] >> 24; bin[13] = a->d[2] >> 16; bin[14] = a->d[2] >> 8; bin[15] = a->d[2];
+    bin[16] = a->d[1] >> 56; bin[17] = a->d[1] >> 48; bin[18] = a->d[1] >> 40; bin[19] = a->d[1] >> 32; bin[20] = a->d[1] >> 24; bin[21] = a->d[1] >> 16; bin[22] = a->d[1] >> 8; bin[23] = a->d[1];
+    bin[24] = a->d[0] >> 56; bin[25] = a->d[0] >> 48; bin[26] = a->d[0] >> 40; bin[27] = a->d[0] >> 32; bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0];
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a) {
+    return (a->d[0] | a->d[1] | a->d[2] | a->d[3]) == 0;
+}
+
+static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    uint64_t nonzero = 0xFFFFFFFFFFFFFFFFULL * (secp256k1_scalar_is_zero(a) == 0);
+    uint128_t t = (uint128_t)(~a->d[0]) + SECP256K1_N_0 + 1;
+    r->d[0] = t & nonzero; t >>= 64;
+    t += (uint128_t)(~a->d[1]) + SECP256K1_N_1;
+    r->d[1] = t & nonzero; t >>= 64;
+    t += (uint128_t)(~a->d[2]) + SECP256K1_N_2;
+    r->d[2] = t & nonzero; t >>= 64;
+    t += (uint128_t)(~a->d[3]) + SECP256K1_N_3;
+    r->d[3] = t & nonzero;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a) {
+    return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3]) == 0;
+}
+
+static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) {
+    int yes = 0;
+    int no = 0;
+    no |= (a->d[3] < SECP256K1_N_H_3);
+    yes |= (a->d[3] > SECP256K1_N_H_3) & ~no;
+    no |= (a->d[2] < SECP256K1_N_H_2) & ~yes; /* No need for a > check. */
+    no |= (a->d[1] < SECP256K1_N_H_1) & ~yes;
+    yes |= (a->d[1] > SECP256K1_N_H_1) & ~no;
+    yes |= (a->d[0] > SECP256K1_N_H_0) & ~no;
+    return yes;
+}
+
+/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */
+
+/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define muladd(a,b) { \
+    uint64_t tl, th; \
+    { \
+        uint128_t t = (uint128_t)a * b; \
+        th = t >> 64;         /* at most 0xFFFFFFFFFFFFFFFE */ \
+        tl = t; \
+    } \
+    c0 += tl;                 /* overflow is handled on the next line */ \
+    th += (c0 < tl) ? 1 : 0;  /* at most 0xFFFFFFFFFFFFFFFF */ \
+    c1 += th;                 /* overflow is handled on the next line */ \
+    c2 += (c1 < th) ? 1 : 0;  /* never overflows by contract (verified in the next line) */ \
+    VERIFY_CHECK((c1 >= th) || (c2 != 0)); \
+}
+
+/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */
+#define muladd_fast(a,b) { \
+    uint64_t tl, th; \
+    { \
+        uint128_t t = (uint128_t)a * b; \
+        th = t >> 64;         /* at most 0xFFFFFFFFFFFFFFFE */ \
+        tl = t; \
+    } \
+    c0 += tl;                 /* overflow is handled on the next line */ \
+    th += (c0 < tl) ? 1 : 0;  /* at most 0xFFFFFFFFFFFFFFFF */ \
+    c1 += th;                 /* never overflows by contract (verified in the next line) */ \
+    VERIFY_CHECK(c1 >= th); \
+}
+
+/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define muladd2(a,b) { \
+    uint64_t tl, th; \
+    { \
+        uint128_t t = (uint128_t)a * b; \
+        th = t >> 64;               /* at most 0xFFFFFFFFFFFFFFFE */ \
+        tl = t; \
+    } \
+    uint64_t th2 = th + th;         /* at most 0xFFFFFFFFFFFFFFFE (in case th was 0x7FFFFFFFFFFFFFFF) */ \
+    c2 += (th2 < th) ? 1 : 0;       /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((th2 >= th) || (c2 != 0)); \
+    uint64_t tl2 = tl + tl;         /* at most 0xFFFFFFFFFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFFFFFFFFFF) */ \
+    th2 += (tl2 < tl) ? 1 : 0;      /* at most 0xFFFFFFFFFFFFFFFF */ \
+    c0 += tl2;                      /* overflow is handled on the next line */ \
+    th2 += (c0 < tl2) ? 1 : 0;      /* second overflow is handled on the next line */ \
+    c2 += (c0 < tl2) & (th2 == 0);  /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \
+    c1 += th2;                      /* overflow is handled on the next line */ \
+    c2 += (c1 < th2) ? 1 : 0;       /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \
+}
+
+/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define sumadd(a) { \
+    c0 += (a);                  /* overflow is handled on the next line */ \
+    unsigned int over = (c0 < (a)) ? 1 : 0; \
+    c1 += over;                 /* overflow is handled on the next line */ \
+    c2 += (c1 < over) ? 1 : 0;  /* never overflows by contract */ \
+}
+
+/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */
+#define sumadd_fast(a) { \
+    c0 += (a);                 /* overflow is handled on the next line */ \
+    c1 += (c0 < (a)) ? 1 : 0;  /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \
+    VERIFY_CHECK(c2 == 0); \
+}
+
+/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. */
+#define extract(n) { \
+    (n) = c0; \
+    c0 = c1; \
+    c1 = c2; \
+    c2 = 0; \
+}
+
+/** Extract the lowest 64 bits of (c0,c1,c2) into n, and left shift the number 64 bits. c2 is required to be zero. */
+#define extract_fast(n) { \
+    (n) = c0; \
+    c0 = c1; \
+    c1 = 0; \
+    VERIFY_CHECK(c2 == 0); \
+}
+
+static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint64_t *l) {
+    uint64_t n0 = l[4], n1 = l[5], n2 = l[6], n3 = l[7];
+
+    /* 160 bit accumulator. */
+    uint64_t c0, c1;
+    uint32_t c2;
+
+    /* Reduce 512 bits into 385. */
+    /* m[0..6] = l[0..3] + n[0..3] * SECP256K1_N_C. */
+    c0 = l[0]; c1 = 0; c2 = 0;
+    muladd_fast(n0, SECP256K1_N_C_0);
+    uint64_t m0; extract_fast(m0);
+    sumadd_fast(l[1]);
+    muladd(n1, SECP256K1_N_C_0);
+    muladd(n0, SECP256K1_N_C_1);
+    uint64_t m1; extract(m1);
+    sumadd(l[2]);
+    muladd(n2, SECP256K1_N_C_0);
+    muladd(n1, SECP256K1_N_C_1);
+    sumadd(n0);
+    uint64_t m2; extract(m2);
+    sumadd(l[3]);
+    muladd(n3, SECP256K1_N_C_0);
+    muladd(n2, SECP256K1_N_C_1);
+    sumadd(n1);
+    uint64_t m3; extract(m3);
+    muladd(n3, SECP256K1_N_C_1);
+    sumadd(n2);
+    uint64_t m4; extract(m4);
+    sumadd_fast(n3);
+    uint64_t m5; extract_fast(m5);
+    VERIFY_CHECK(c0 <= 1);
+    uint32_t m6 = c0;
+
+    /* Reduce 385 bits into 258. */
+    /* p[0..4] = m[0..3] + m[4..6] * SECP256K1_N_C. */
+    c0 = m0; c1 = 0; c2 = 0;
+    muladd_fast(m4, SECP256K1_N_C_0);
+    uint64_t p0; extract_fast(p0);
+    sumadd_fast(m1);
+    muladd(m5, SECP256K1_N_C_0);
+    muladd(m4, SECP256K1_N_C_1);
+    uint64_t p1; extract(p1);
+    sumadd(m2);
+    muladd(m6, SECP256K1_N_C_0);
+    muladd(m5, SECP256K1_N_C_1);
+    sumadd(m4);
+    uint64_t p2; extract(p2);
+    sumadd_fast(m3);
+    muladd_fast(m6, SECP256K1_N_C_1);
+    sumadd_fast(m5);
+    uint64_t p3; extract_fast(p3);
+    uint32_t p4 = c0 + m6;
+    VERIFY_CHECK(p4 <= 2);
+
+    /* Reduce 258 bits into 256. */
+    /* r[0..3] = p[0..3] + p[4] * SECP256K1_N_C. */
+    uint128_t c = p0 + (uint128_t)SECP256K1_N_C_0 * p4;
+    r->d[0] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64;
+    c += p1 + (uint128_t)SECP256K1_N_C_1 * p4;
+    r->d[1] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64;
+    c += p2 + (uint128_t)p4;
+    r->d[2] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64;
+    c += p3;
+    r->d[3] = c & 0xFFFFFFFFFFFFFFFFULL; c >>= 64;
+
+    /* Final reduction of r. */
+    secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
+}
+
+static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    /* 160 bit accumulator. */
+    uint64_t c0 = 0, c1 = 0;
+    uint32_t c2 = 0;
+
+    uint64_t l[8];
+
+    /* l[0..7] = a[0..3] * b[0..3]. */
+    muladd_fast(a->d[0], b->d[0]);
+    extract_fast(l[0]);
+    muladd(a->d[0], b->d[1]);
+    muladd(a->d[1], b->d[0]);
+    extract(l[1]);
+    muladd(a->d[0], b->d[2]);
+    muladd(a->d[1], b->d[1]);
+    muladd(a->d[2], b->d[0]);
+    extract(l[2]);
+    muladd(a->d[0], b->d[3]);
+    muladd(a->d[1], b->d[2]);
+    muladd(a->d[2], b->d[1]);
+    muladd(a->d[3], b->d[0]);
+    extract(l[3]);
+    muladd(a->d[1], b->d[3]);
+    muladd(a->d[2], b->d[2]);
+    muladd(a->d[3], b->d[1]);
+    extract(l[4]);
+    muladd(a->d[2], b->d[3]);
+    muladd(a->d[3], b->d[2]);
+    extract(l[5]);
+    muladd_fast(a->d[3], b->d[3]);
+    extract_fast(l[6]);
+    VERIFY_CHECK(c1 <= 0);
+    l[7] = c0;
+
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    /* 160 bit accumulator. */
+    uint64_t c0 = 0, c1 = 0;
+    uint32_t c2 = 0;
+
+    uint64_t l[8];
+
+    /* l[0..7] = a[0..3] * b[0..3]. */
+    muladd_fast(a->d[0], a->d[0]);
+    extract_fast(l[0]);
+    muladd2(a->d[0], a->d[1]);
+    extract(l[1]);
+    muladd2(a->d[0], a->d[2]);
+    muladd(a->d[1], a->d[1]);
+    extract(l[2]);
+    muladd2(a->d[0], a->d[3]);
+    muladd2(a->d[1], a->d[2]);
+    extract(l[3]);
+    muladd2(a->d[1], a->d[3]);
+    muladd(a->d[2], a->d[2]);
+    extract(l[4]);
+    muladd2(a->d[2], a->d[3]);
+    extract(l[5]);
+    muladd_fast(a->d[3], a->d[3]);
+    extract_fast(l[6]);
+    VERIFY_CHECK(c1 == 0);
+    l[7] = c0;
+
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+#undef sumadd
+#undef sumadd_fast
+#undef muladd
+#undef muladd_fast
+#undef muladd2
+#undef extract
+#undef extract_fast
+
+#endif
diff --git a/src/scalar_8x32.h b/src/scalar_8x32.h
new file mode 100644
index 000000000000..f70328cfc933
--- /dev/null
+++ b/src/scalar_8x32.h
@@ -0,0 +1,17 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_
+#define _SECP256K1_SCALAR_REPR_
+
+#include <stdint.h>
+
+/** A scalar modulo the group order of the secp256k1 curve. */
+typedef struct {
+    uint32_t d[8];
+} secp256k1_scalar_t;
+
+#endif
diff --git a/src/scalar_8x32_impl.h b/src/scalar_8x32_impl.h
new file mode 100644
index 000000000000..e58be1365f95
--- /dev/null
+++ b/src/scalar_8x32_impl.h
@@ -0,0 +1,572 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_
+#define _SECP256K1_SCALAR_REPR_IMPL_H_
+
+/* Limbs of the secp256k1 order. */
+#define SECP256K1_N_0 ((uint32_t)0xD0364141UL)
+#define SECP256K1_N_1 ((uint32_t)0xBFD25E8CUL)
+#define SECP256K1_N_2 ((uint32_t)0xAF48A03BUL)
+#define SECP256K1_N_3 ((uint32_t)0xBAAEDCE6UL)
+#define SECP256K1_N_4 ((uint32_t)0xFFFFFFFEUL)
+#define SECP256K1_N_5 ((uint32_t)0xFFFFFFFFUL)
+#define SECP256K1_N_6 ((uint32_t)0xFFFFFFFFUL)
+#define SECP256K1_N_7 ((uint32_t)0xFFFFFFFFUL)
+
+/* Limbs of 2^256 minus the secp256k1 order. */
+#define SECP256K1_N_C_0 (~SECP256K1_N_0 + 1)
+#define SECP256K1_N_C_1 (~SECP256K1_N_1)
+#define SECP256K1_N_C_2 (~SECP256K1_N_2)
+#define SECP256K1_N_C_3 (~SECP256K1_N_3)
+#define SECP256K1_N_C_4 (1)
+
+/* Limbs of half the secp256k1 order. */
+#define SECP256K1_N_H_0 ((uint32_t)0x681B20A0UL)
+#define SECP256K1_N_H_1 ((uint32_t)0xDFE92F46UL)
+#define SECP256K1_N_H_2 ((uint32_t)0x57A4501DUL)
+#define SECP256K1_N_H_3 ((uint32_t)0x5D576E73UL)
+#define SECP256K1_N_H_4 ((uint32_t)0xFFFFFFFFUL)
+#define SECP256K1_N_H_5 ((uint32_t)0xFFFFFFFFUL)
+#define SECP256K1_N_H_6 ((uint32_t)0xFFFFFFFFUL)
+#define SECP256K1_N_H_7 ((uint32_t)0x7FFFFFFFUL)
+
+SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) {
+    r->d[0] = 0;
+    r->d[1] = 0;
+    r->d[2] = 0;
+    r->d[3] = 0;
+    r->d[4] = 0;
+    r->d[5] = 0;
+    r->d[6] = 0;
+    r->d[7] = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count) {
+    VERIFY_CHECK((offset + count - 1) / 32 == offset / 32);
+    return (a->d[offset / 32] >> (offset % 32)) & ((1 << count) - 1);
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) {
+    int yes = 0;
+    int no = 0;
+    no |= (a->d[7] < SECP256K1_N_7); /* No need for a > check. */
+    no |= (a->d[6] < SECP256K1_N_6); /* No need for a > check. */
+    no |= (a->d[5] < SECP256K1_N_5); /* No need for a > check. */
+    no |= (a->d[4] < SECP256K1_N_4);
+    yes |= (a->d[4] > SECP256K1_N_4) & ~no;
+    no |= (a->d[3] < SECP256K1_N_3) & ~yes;
+    yes |= (a->d[3] > SECP256K1_N_3) & ~no;
+    no |= (a->d[2] < SECP256K1_N_2) & ~yes;
+    yes |= (a->d[2] > SECP256K1_N_2) & ~no;
+    no |= (a->d[1] < SECP256K1_N_1) & ~yes;
+    yes |= (a->d[1] > SECP256K1_N_1) & ~no;
+    yes |= (a->d[0] >= SECP256K1_N_0) & ~no;
+    return yes;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, uint32_t overflow) {
+    VERIFY_CHECK(overflow <= 1);
+    uint64_t t = (uint64_t)r->d[0] + overflow * SECP256K1_N_C_0;
+    r->d[0] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[1] + overflow * SECP256K1_N_C_1;
+    r->d[1] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[2] + overflow * SECP256K1_N_C_2;
+    r->d[2] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[3] + overflow * SECP256K1_N_C_3;
+    r->d[3] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[4] + overflow * SECP256K1_N_C_4;
+    r->d[4] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[5];
+    r->d[5] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[6];
+    r->d[6] = t & 0xFFFFFFFFUL; t >>= 32;
+    t += (uint64_t)r->d[7];
+    r->d[7] = t & 0xFFFFFFFFUL;
+    return overflow;
+}
+
+static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    uint64_t t = (uint64_t)a->d[0] + b->d[0];
+    r->d[0] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[1] + b->d[1];
+    r->d[1] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[2] + b->d[2];
+    r->d[2] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[3] + b->d[3];
+    r->d[3] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[4] + b->d[4];
+    r->d[4] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[5] + b->d[5];
+    r->d[5] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[6] + b->d[6];
+    r->d[6] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)a->d[7] + b->d[7];
+    r->d[7] = t & 0xFFFFFFFFULL; t >>= 32;
+    secp256k1_scalar_reduce(r, t + secp256k1_scalar_check_overflow(r));
+}
+
+static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) {
+    r->d[0] = (uint32_t)b32[31] | (uint32_t)b32[30] << 8 | (uint32_t)b32[29] << 16 | (uint32_t)b32[28] << 24;
+    r->d[1] = (uint32_t)b32[27] | (uint32_t)b32[26] << 8 | (uint32_t)b32[25] << 16 | (uint32_t)b32[24] << 24;
+    r->d[2] = (uint32_t)b32[23] | (uint32_t)b32[22] << 8 | (uint32_t)b32[21] << 16 | (uint32_t)b32[20] << 24;
+    r->d[3] = (uint32_t)b32[19] | (uint32_t)b32[18] << 8 | (uint32_t)b32[17] << 16 | (uint32_t)b32[16] << 24;
+    r->d[4] = (uint32_t)b32[15] | (uint32_t)b32[14] << 8 | (uint32_t)b32[13] << 16 | (uint32_t)b32[12] << 24;
+    r->d[5] = (uint32_t)b32[11] | (uint32_t)b32[10] << 8 | (uint32_t)b32[9] << 16 | (uint32_t)b32[8] << 24;
+    r->d[6] = (uint32_t)b32[7] | (uint32_t)b32[6] << 8 | (uint32_t)b32[5] << 16 | (uint32_t)b32[4] << 24;
+    r->d[7] = (uint32_t)b32[3] | (uint32_t)b32[2] << 8 | (uint32_t)b32[1] << 16 | (uint32_t)b32[0] << 24;
+    int over = secp256k1_scalar_reduce(r, secp256k1_scalar_check_overflow(r));
+    if (overflow) {
+        *overflow = over;
+    }
+}
+
+static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a) {
+    bin[0] = a->d[7] >> 24; bin[1] = a->d[7] >> 16; bin[2] = a->d[7] >> 8; bin[3] = a->d[7];
+    bin[4] = a->d[6] >> 24; bin[5] = a->d[6] >> 16; bin[6] = a->d[6] >> 8; bin[7] = a->d[6];
+    bin[8] = a->d[5] >> 24; bin[9] = a->d[5] >> 16; bin[10] = a->d[5] >> 8; bin[11] = a->d[5];
+    bin[12] = a->d[4] >> 24; bin[13] = a->d[4] >> 16; bin[14] = a->d[4] >> 8; bin[15] = a->d[4];
+    bin[16] = a->d[3] >> 24; bin[17] = a->d[3] >> 16; bin[18] = a->d[3] >> 8; bin[19] = a->d[3];
+    bin[20] = a->d[2] >> 24; bin[21] = a->d[2] >> 16; bin[22] = a->d[2] >> 8; bin[23] = a->d[2];
+    bin[24] = a->d[1] >> 24; bin[25] = a->d[1] >> 16; bin[26] = a->d[1] >> 8; bin[27] = a->d[1];
+    bin[28] = a->d[0] >> 24; bin[29] = a->d[0] >> 16; bin[30] = a->d[0] >> 8; bin[31] = a->d[0];
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar_t *a) {
+    return (a->d[0] | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0;
+}
+
+static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    uint32_t nonzero = 0xFFFFFFFFUL * (secp256k1_scalar_is_zero(a) == 0);
+    uint64_t t = (uint64_t)(~a->d[0]) + SECP256K1_N_0 + 1;
+    r->d[0] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[1]) + SECP256K1_N_1;
+    r->d[1] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[2]) + SECP256K1_N_2;
+    r->d[2] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[3]) + SECP256K1_N_3;
+    r->d[3] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[4]) + SECP256K1_N_4;
+    r->d[4] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[5]) + SECP256K1_N_5;
+    r->d[5] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[6]) + SECP256K1_N_6;
+    r->d[6] = t & nonzero; t >>= 32;
+    t += (uint64_t)(~a->d[7]) + SECP256K1_N_7;
+    r->d[7] = t & nonzero;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a) {
+    return ((a->d[0] ^ 1) | a->d[1] | a->d[2] | a->d[3] | a->d[4] | a->d[5] | a->d[6] | a->d[7]) == 0;
+}
+
+static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a) {
+    int yes = 0;
+    int no = 0;
+    no |= (a->d[7] < SECP256K1_N_H_7);
+    yes |= (a->d[7] > SECP256K1_N_H_7) & ~no;
+    no |= (a->d[6] < SECP256K1_N_H_6) & ~yes; /* No need for a > check. */
+    no |= (a->d[5] < SECP256K1_N_H_5) & ~yes; /* No need for a > check. */
+    no |= (a->d[4] < SECP256K1_N_H_4) & ~yes; /* No need for a > check. */
+    no |= (a->d[3] < SECP256K1_N_H_3) & ~yes;
+    yes |= (a->d[3] > SECP256K1_N_H_3) & ~no;
+    no |= (a->d[2] < SECP256K1_N_H_2) & ~yes;
+    yes |= (a->d[2] > SECP256K1_N_H_2) & ~no;
+    no |= (a->d[1] < SECP256K1_N_H_1) & ~yes;
+    yes |= (a->d[1] > SECP256K1_N_H_1) & ~no;
+    yes |= (a->d[0] > SECP256K1_N_H_0) & ~no;
+    return yes;
+}
+
+/* Inspired by the macros in OpenSSL's crypto/bn/asm/x86_64-gcc.c. */
+
+/** Add a*b to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define muladd(a,b) { \
+    uint32_t tl, th; \
+    { \
+        uint64_t t = (uint64_t)a * b; \
+        th = t >> 32;         /* at most 0xFFFFFFFE */ \
+        tl = t; \
+    } \
+    c0 += tl;                 /* overflow is handled on the next line */ \
+    th += (c0 < tl) ? 1 : 0;  /* at most 0xFFFFFFFF */ \
+    c1 += th;                 /* overflow is handled on the next line */ \
+    c2 += (c1 < th) ? 1 : 0;  /* never overflows by contract (verified in the next line) */ \
+    VERIFY_CHECK((c1 >= th) || (c2 != 0)); \
+}
+
+/** Add a*b to the number defined by (c0,c1). c1 must never overflow. */
+#define muladd_fast(a,b) { \
+    uint32_t tl, th; \
+    { \
+        uint64_t t = (uint64_t)a * b; \
+        th = t >> 32;         /* at most 0xFFFFFFFE */ \
+        tl = t; \
+    } \
+    c0 += tl;                 /* overflow is handled on the next line */ \
+    th += (c0 < tl) ? 1 : 0;  /* at most 0xFFFFFFFF */ \
+    c1 += th;                 /* never overflows by contract (verified in the next line) */ \
+    VERIFY_CHECK(c1 >= th); \
+}
+
+/** Add 2*a*b to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define muladd2(a,b) { \
+    uint32_t tl, th; \
+    { \
+        uint64_t t = (uint64_t)a * b; \
+        th = t >> 32;               /* at most 0xFFFFFFFE */ \
+        tl = t; \
+    } \
+    uint32_t th2 = th + th;         /* at most 0xFFFFFFFE (in case th was 0x7FFFFFFF) */ \
+    c2 += (th2 < th) ? 1 : 0;       /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((th2 >= th) || (c2 != 0)); \
+    uint32_t tl2 = tl + tl;         /* at most 0xFFFFFFFE (in case the lowest 63 bits of tl were 0x7FFFFFFF) */ \
+    th2 += (tl2 < tl) ? 1 : 0;      /* at most 0xFFFFFFFF */ \
+    c0 += tl2;                      /* overflow is handled on the next line */ \
+    th2 += (c0 < tl2) ? 1 : 0;      /* second overflow is handled on the next line */ \
+    c2 += (c0 < tl2) & (th2 == 0);  /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c0 >= tl2) || (th2 != 0) || (c2 != 0)); \
+    c1 += th2;                      /* overflow is handled on the next line */ \
+    c2 += (c1 < th2) ? 1 : 0;       /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c1 >= th2) || (c2 != 0)); \
+}
+
+/** Add a to the number defined by (c0,c1,c2). c2 must never overflow. */
+#define sumadd(a) { \
+    c0 += (a);                  /* overflow is handled on the next line */ \
+    unsigned int over = (c0 < (a)) ? 1 : 0; \
+    c1 += over;                 /* overflow is handled on the next line */ \
+    c2 += (c1 < over) ? 1 : 0;  /* never overflows by contract */ \
+}
+
+/** Add a to the number defined by (c0,c1). c1 must never overflow, c2 must be zero. */
+#define sumadd_fast(a) { \
+    c0 += (a);                 /* overflow is handled on the next line */ \
+    c1 += (c0 < (a)) ? 1 : 0;  /* never overflows by contract (verified the next line) */ \
+    VERIFY_CHECK((c1 != 0) | (c0 >= (a))); \
+    VERIFY_CHECK(c2 == 0); \
+}
+
+/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. */
+#define extract(n) { \
+    (n) = c0; \
+    c0 = c1; \
+    c1 = c2; \
+    c2 = 0; \
+}
+
+/** Extract the lowest 32 bits of (c0,c1,c2) into n, and left shift the number 32 bits. c2 is required to be zero. */
+#define extract_fast(n) { \
+    (n) = c0; \
+    c0 = c1; \
+    c1 = 0; \
+    VERIFY_CHECK(c2 == 0); \
+}
+
+static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint32_t *l) {
+    uint32_t n0 = l[8], n1 = l[9], n2 = l[10], n3 = l[11], n4 = l[12], n5 = l[13], n6 = l[14], n7 = l[15];
+
+    /* 96 bit accumulator. */
+    uint32_t c0, c1, c2;
+
+    /* Reduce 512 bits into 385. */
+    /* m[0..12] = l[0..7] + n[0..7] * SECP256K1_N_C. */
+    c0 = l[0]; c1 = 0; c2 = 0;
+    muladd_fast(n0, SECP256K1_N_C_0);
+    uint32_t m0; extract_fast(m0);
+    sumadd_fast(l[1]);
+    muladd(n1, SECP256K1_N_C_0);
+    muladd(n0, SECP256K1_N_C_1);
+    uint32_t m1; extract(m1);
+    sumadd(l[2]);
+    muladd(n2, SECP256K1_N_C_0);
+    muladd(n1, SECP256K1_N_C_1);
+    muladd(n0, SECP256K1_N_C_2);
+    uint32_t m2; extract(m2);
+    sumadd(l[3]);
+    muladd(n3, SECP256K1_N_C_0);
+    muladd(n2, SECP256K1_N_C_1);
+    muladd(n1, SECP256K1_N_C_2);
+    muladd(n0, SECP256K1_N_C_3);
+    uint32_t m3; extract(m3);
+    sumadd(l[4]);
+    muladd(n4, SECP256K1_N_C_0);
+    muladd(n3, SECP256K1_N_C_1);
+    muladd(n2, SECP256K1_N_C_2);
+    muladd(n1, SECP256K1_N_C_3);
+    sumadd(n0);
+    uint32_t m4; extract(m4);
+    sumadd(l[5]);
+    muladd(n5, SECP256K1_N_C_0);
+    muladd(n4, SECP256K1_N_C_1);
+    muladd(n3, SECP256K1_N_C_2);
+    muladd(n2, SECP256K1_N_C_3);
+    sumadd(n1);
+    uint32_t m5; extract(m5);
+    sumadd(l[6]);
+    muladd(n6, SECP256K1_N_C_0);
+    muladd(n5, SECP256K1_N_C_1);
+    muladd(n4, SECP256K1_N_C_2);
+    muladd(n3, SECP256K1_N_C_3);
+    sumadd(n2);
+    uint32_t m6; extract(m6);
+    sumadd(l[7]);
+    muladd(n7, SECP256K1_N_C_0);
+    muladd(n6, SECP256K1_N_C_1);
+    muladd(n5, SECP256K1_N_C_2);
+    muladd(n4, SECP256K1_N_C_3);
+    sumadd(n3);
+    uint32_t m7; extract(m7);
+    muladd(n7, SECP256K1_N_C_1);
+    muladd(n6, SECP256K1_N_C_2);
+    muladd(n5, SECP256K1_N_C_3);
+    sumadd(n4);
+    uint32_t m8; extract(m8);
+    muladd(n7, SECP256K1_N_C_2);
+    muladd(n6, SECP256K1_N_C_3);
+    sumadd(n5);
+    uint32_t m9; extract(m9);
+    muladd(n7, SECP256K1_N_C_3);
+    sumadd(n6);
+    uint32_t m10; extract(m10);
+    sumadd_fast(n7);
+    uint32_t m11; extract_fast(m11);
+    VERIFY_CHECK(c0 <= 1);
+    uint32_t m12 = c0;
+
+    /* Reduce 385 bits into 258. */
+    /* p[0..8] = m[0..7] + m[8..12] * SECP256K1_N_C. */
+    c0 = m0; c1 = 0; c2 = 0;
+    muladd_fast(m8, SECP256K1_N_C_0);
+    uint32_t p0; extract_fast(p0);
+    sumadd_fast(m1);
+    muladd(m9, SECP256K1_N_C_0);
+    muladd(m8, SECP256K1_N_C_1);
+    uint32_t p1; extract(p1);
+    sumadd(m2);
+    muladd(m10, SECP256K1_N_C_0);
+    muladd(m9, SECP256K1_N_C_1);
+    muladd(m8, SECP256K1_N_C_2);
+    uint32_t p2; extract(p2);
+    sumadd(m3);
+    muladd(m11, SECP256K1_N_C_0);
+    muladd(m10, SECP256K1_N_C_1);
+    muladd(m9, SECP256K1_N_C_2);
+    muladd(m8, SECP256K1_N_C_3);
+    uint32_t p3; extract(p3);
+    sumadd(m4);
+    muladd(m12, SECP256K1_N_C_0);
+    muladd(m11, SECP256K1_N_C_1);
+    muladd(m10, SECP256K1_N_C_2);
+    muladd(m9, SECP256K1_N_C_3);
+    sumadd(m8);
+    uint32_t p4; extract(p4);
+    sumadd(m5);
+    muladd(m12, SECP256K1_N_C_1);
+    muladd(m11, SECP256K1_N_C_2);
+    muladd(m10, SECP256K1_N_C_3);
+    sumadd(m9);
+    uint32_t p5; extract(p5);
+    sumadd(m6);
+    muladd(m12, SECP256K1_N_C_2);
+    muladd(m11, SECP256K1_N_C_3);
+    sumadd(m10);
+    uint32_t p6; extract(p6);
+    sumadd_fast(m7);
+    muladd_fast(m12, SECP256K1_N_C_3);
+    sumadd_fast(m11);
+    uint32_t p7; extract_fast(p7);
+    uint32_t p8 = c0 + m12;
+    VERIFY_CHECK(p8 <= 2);
+
+    /* Reduce 258 bits into 256. */
+    /* r[0..7] = p[0..7] + p[8] * SECP256K1_N_C. */
+    uint64_t c = p0 + (uint64_t)SECP256K1_N_C_0 * p8;
+    r->d[0] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p1 + (uint64_t)SECP256K1_N_C_1 * p8;
+    r->d[1] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p2 + (uint64_t)SECP256K1_N_C_2 * p8;
+    r->d[2] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p3 + (uint64_t)SECP256K1_N_C_3 * p8;
+    r->d[3] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p4 + (uint64_t)p8;
+    r->d[4] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p5;
+    r->d[5] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p6;
+    r->d[6] = c & 0xFFFFFFFFUL; c >>= 32;
+    c += p7;
+    r->d[7] = c & 0xFFFFFFFFUL; c >>= 32;
+
+    /* Final reduction of r. */
+    secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
+}
+
+static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    /* 96 bit accumulator. */
+    uint32_t c0 = 0, c1 = 0, c2 = 0;
+
+    uint32_t l[16];
+
+    /* l[0..15] = a[0..7] * b[0..7]. */
+    muladd_fast(a->d[0], b->d[0]);
+    extract_fast(l[0]);
+    muladd(a->d[0], b->d[1]);
+    muladd(a->d[1], b->d[0]);
+    extract(l[1]);
+    muladd(a->d[0], b->d[2]);
+    muladd(a->d[1], b->d[1]);
+    muladd(a->d[2], b->d[0]);
+    extract(l[2]);
+    muladd(a->d[0], b->d[3]);
+    muladd(a->d[1], b->d[2]);
+    muladd(a->d[2], b->d[1]);
+    muladd(a->d[3], b->d[0]);
+    extract(l[3]);
+    muladd(a->d[0], b->d[4]);
+    muladd(a->d[1], b->d[3]);
+    muladd(a->d[2], b->d[2]);
+    muladd(a->d[3], b->d[1]);
+    muladd(a->d[4], b->d[0]);
+    extract(l[4]);
+    muladd(a->d[0], b->d[5]);
+    muladd(a->d[1], b->d[4]);
+    muladd(a->d[2], b->d[3]);
+    muladd(a->d[3], b->d[2]);
+    muladd(a->d[4], b->d[1]);
+    muladd(a->d[5], b->d[0]);
+    extract(l[5]);
+    muladd(a->d[0], b->d[6]);
+    muladd(a->d[1], b->d[5]);
+    muladd(a->d[2], b->d[4]);
+    muladd(a->d[3], b->d[3]);
+    muladd(a->d[4], b->d[2]);
+    muladd(a->d[5], b->d[1]);
+    muladd(a->d[6], b->d[0]);
+    extract(l[6]);
+    muladd(a->d[0], b->d[7]);
+    muladd(a->d[1], b->d[6]);
+    muladd(a->d[2], b->d[5]);
+    muladd(a->d[3], b->d[4]);
+    muladd(a->d[4], b->d[3]);
+    muladd(a->d[5], b->d[2]);
+    muladd(a->d[6], b->d[1]);
+    muladd(a->d[7], b->d[0]);
+    extract(l[7]);
+    muladd(a->d[1], b->d[7]);
+    muladd(a->d[2], b->d[6]);
+    muladd(a->d[3], b->d[5]);
+    muladd(a->d[4], b->d[4]);
+    muladd(a->d[5], b->d[3]);
+    muladd(a->d[6], b->d[2]);
+    muladd(a->d[7], b->d[1]);
+    extract(l[8]);
+    muladd(a->d[2], b->d[7]);
+    muladd(a->d[3], b->d[6]);
+    muladd(a->d[4], b->d[5]);
+    muladd(a->d[5], b->d[4]);
+    muladd(a->d[6], b->d[3]);
+    muladd(a->d[7], b->d[2]);
+    extract(l[9]);
+    muladd(a->d[3], b->d[7]);
+    muladd(a->d[4], b->d[6]);
+    muladd(a->d[5], b->d[5]);
+    muladd(a->d[6], b->d[4]);
+    muladd(a->d[7], b->d[3]);
+    extract(l[10]);
+    muladd(a->d[4], b->d[7]);
+    muladd(a->d[5], b->d[6]);
+    muladd(a->d[6], b->d[5]);
+    muladd(a->d[7], b->d[4]);
+    extract(l[11]);
+    muladd(a->d[5], b->d[7]);
+    muladd(a->d[6], b->d[6]);
+    muladd(a->d[7], b->d[5]);
+    extract(l[12]);
+    muladd(a->d[6], b->d[7]);
+    muladd(a->d[7], b->d[6]);
+    extract(l[13]);
+    muladd_fast(a->d[7], b->d[7]);
+    extract_fast(l[14]);
+    VERIFY_CHECK(c1 == 0);
+    l[15] = c0;
+
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    /* 96 bit accumulator. */
+    uint32_t c0 = 0, c1 = 0, c2 = 0;
+
+    uint32_t l[16];
+
+    /* l[0..15] = a[0..7]^2. */
+    muladd_fast(a->d[0], a->d[0]);
+    extract_fast(l[0]);
+    muladd2(a->d[0], a->d[1]);
+    extract(l[1]);
+    muladd2(a->d[0], a->d[2]);
+    muladd(a->d[1], a->d[1]);
+    extract(l[2]);
+    muladd2(a->d[0], a->d[3]);
+    muladd2(a->d[1], a->d[2]);
+    extract(l[3]);
+    muladd2(a->d[0], a->d[4]);
+    muladd2(a->d[1], a->d[3]);
+    muladd(a->d[2], a->d[2]);
+    extract(l[4]);
+    muladd2(a->d[0], a->d[5]);
+    muladd2(a->d[1], a->d[4]);
+    muladd2(a->d[2], a->d[3]);
+    extract(l[5]);
+    muladd2(a->d[0], a->d[6]);
+    muladd2(a->d[1], a->d[5]);
+    muladd2(a->d[2], a->d[4]);
+    muladd(a->d[3], a->d[3]);
+    extract(l[6]);
+    muladd2(a->d[0], a->d[7]);
+    muladd2(a->d[1], a->d[6]);
+    muladd2(a->d[2], a->d[5]);
+    muladd2(a->d[3], a->d[4]);
+    extract(l[7]);
+    muladd2(a->d[1], a->d[7]);
+    muladd2(a->d[2], a->d[6]);
+    muladd2(a->d[3], a->d[5]);
+    muladd(a->d[4], a->d[4]);
+    extract(l[8]);
+    muladd2(a->d[2], a->d[7]);
+    muladd2(a->d[3], a->d[6]);
+    muladd2(a->d[4], a->d[5]);
+    extract(l[9]);
+    muladd2(a->d[3], a->d[7]);
+    muladd2(a->d[4], a->d[6]);
+    muladd(a->d[5], a->d[5]);
+    extract(l[10]);
+    muladd2(a->d[4], a->d[7]);
+    muladd2(a->d[5], a->d[6]);
+    extract(l[11]);
+    muladd2(a->d[5], a->d[7]);
+    muladd(a->d[6], a->d[6]);
+    extract(l[12]);
+    muladd2(a->d[6], a->d[7]);
+    extract(l[13]);
+    muladd_fast(a->d[7], a->d[7]);
+    extract_fast(l[14]);
+    VERIFY_CHECK(c1 == 0);
+    l[15] = c0;
+
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+#undef sumadd
+#undef sumadd_fast
+#undef muladd
+#undef muladd_fast
+#undef muladd2
+#undef extract
+#undef extract_fast
+
+#endif
diff --git a/src/scalar_impl.h b/src/scalar_impl.h
new file mode 100644
index 000000000000..ddc5061c7699
--- /dev/null
+++ b/src/scalar_impl.h
@@ -0,0 +1,184 @@
+/**********************************************************************
+ * Copyright (c) 2014 Pieter Wuille                                   *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_IMPL_H_
+#define _SECP256K1_SCALAR_IMPL_H_
+
+#include <string.h>
+
+#include "scalar.h"
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#if defined(USE_SCALAR_4X64)
+#include "scalar_4x64_impl.h"
+#elif defined(USE_SCALAR_8X32)
+#include "scalar_8x32_impl.h"
+#else
+#error "Please select scalar implementation"
+#endif
+
+static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) {
+    unsigned char c[32];
+    secp256k1_scalar_get_b32(c, a);
+    secp256k1_num_set_bin(r, c, 32);
+}
+
+
+static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *x) {
+    /* First compute x ^ (2^N - 1) for some values of N. */
+    secp256k1_scalar_t x2, x3, x4, x6, x7, x8, x15, x30, x60, x120, x127;
+
+    secp256k1_scalar_sqr(&x2,  x);
+    secp256k1_scalar_mul(&x2, &x2,  x);
+
+    secp256k1_scalar_sqr(&x3, &x2);
+    secp256k1_scalar_mul(&x3, &x3,  x);
+
+    secp256k1_scalar_sqr(&x4, &x3);
+    secp256k1_scalar_mul(&x4, &x4,  x);
+
+    secp256k1_scalar_sqr(&x6, &x4);
+    secp256k1_scalar_sqr(&x6, &x6);
+    secp256k1_scalar_mul(&x6, &x6, &x2);
+
+    secp256k1_scalar_sqr(&x7, &x6);
+    secp256k1_scalar_mul(&x7, &x7,  x);
+
+    secp256k1_scalar_sqr(&x8, &x7);
+    secp256k1_scalar_mul(&x8, &x8,  x);
+
+    secp256k1_scalar_sqr(&x15, &x8);
+    for (int i=0; i<6; i++)
+        secp256k1_scalar_sqr(&x15, &x15);
+    secp256k1_scalar_mul(&x15, &x15, &x7);
+
+    secp256k1_scalar_sqr(&x30, &x15);
+    for (int i=0; i<14; i++)
+        secp256k1_scalar_sqr(&x30, &x30);
+    secp256k1_scalar_mul(&x30, &x30, &x15);
+
+    secp256k1_scalar_sqr(&x60, &x30);
+    for (int i=0; i<29; i++)
+        secp256k1_scalar_sqr(&x60, &x60);
+    secp256k1_scalar_mul(&x60, &x60, &x30);
+
+    secp256k1_scalar_sqr(&x120, &x60);
+    for (int i=0; i<59; i++)
+        secp256k1_scalar_sqr(&x120, &x120);
+    secp256k1_scalar_mul(&x120, &x120, &x60);
+
+    secp256k1_scalar_sqr(&x127, &x120);
+    for (int i=0; i<6; i++)
+        secp256k1_scalar_sqr(&x127, &x127);
+    secp256k1_scalar_mul(&x127, &x127, &x7);
+
+    /* Then accumulate the final result (t starts at x127). */
+    secp256k1_scalar_t *t = &x127;
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<4; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<4; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<3; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<4; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<5; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<4; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<5; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x4); /* 1111 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<3; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<4; i++) /* 000 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<10; i++) /* 0000000 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<4; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x3); /* 111 */
+    for (int i=0; i<9; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x8); /* 11111111 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<3; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<3; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<5; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x4); /* 1111 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<5; i++) /* 000 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<4; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<2; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<8; i++) /* 000000 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<3; i++) /* 0 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, &x2); /* 11 */
+    for (int i=0; i<3; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<6; i++) /* 00000 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(t, t, x); /* 1 */
+    for (int i=0; i<8; i++) /* 00 */
+        secp256k1_scalar_sqr(t, t);
+    secp256k1_scalar_mul(r, t, &x6); /* 111111 */
+}
+
+#endif
diff --git a/src/secp256k1.c b/src/secp256k1.c
new file mode 100644
index 000000000000..1ab5b3722ce7
--- /dev/null
+++ b/src/secp256k1.c
@@ -0,0 +1,305 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#define SECP256K1_BUILD (1)
+
+#include "include/secp256k1.h"
+
+#include "util.h"
+#include "num_impl.h"
+#include "field_impl.h"
+#include "scalar_impl.h"
+#include "group_impl.h"
+#include "ecmult_impl.h"
+#include "ecmult_gen_impl.h"
+#include "ecdsa_impl.h"
+#include "eckey_impl.h"
+
+void secp256k1_start(unsigned int flags) {
+    secp256k1_fe_start();
+    secp256k1_ge_start();
+    if (flags & SECP256K1_START_SIGN) {
+        secp256k1_ecmult_gen_start();
+    }
+    if (flags & SECP256K1_START_VERIFY) {
+        secp256k1_ecmult_start();
+    }
+}
+
+void secp256k1_stop(void) {
+    secp256k1_ecmult_stop();
+    secp256k1_ecmult_gen_stop();
+    secp256k1_ge_stop();
+    secp256k1_fe_stop();
+}
+
+int secp256k1_ecdsa_verify(const unsigned char *msg, int msglen, const unsigned char *sig, int siglen, const unsigned char *pubkey, int pubkeylen) {
+    DEBUG_CHECK(secp256k1_ecmult_consts != NULL);
+    DEBUG_CHECK(msg != NULL);
+    DEBUG_CHECK(msglen <= 32);
+    DEBUG_CHECK(sig != NULL);
+    DEBUG_CHECK(pubkey != NULL);
+
+    int ret = -3;
+    secp256k1_num_t m;
+    secp256k1_ecdsa_sig_t s;
+    secp256k1_ge_t q;
+    secp256k1_num_set_bin(&m, msg, msglen);
+
+    if (!secp256k1_eckey_pubkey_parse(&q, pubkey, pubkeylen)) {
+        ret = -1;
+        goto end;
+    }
+    if (!secp256k1_ecdsa_sig_parse(&s, sig, siglen)) {
+        ret = -2;
+        goto end;
+    }
+    if (!secp256k1_ecdsa_sig_verify(&s, &q, &m)) {
+        ret = 0;
+        goto end;
+    }
+    ret = 1;
+end:
+    return ret;
+}
+
+int secp256k1_ecdsa_sign(const unsigned char *message, int messagelen, unsigned char *signature, int *signaturelen, const unsigned char *seckey, const unsigned char *nonce) {
+    DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL);
+    DEBUG_CHECK(message != NULL);
+    DEBUG_CHECK(messagelen <= 32);
+    DEBUG_CHECK(signature != NULL);
+    DEBUG_CHECK(signaturelen != NULL);
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(nonce != NULL);
+
+    secp256k1_scalar_t sec, non, msg;
+    secp256k1_scalar_set_b32(&sec, seckey, NULL);
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&non, nonce, &overflow);
+    {
+        unsigned char c[32] = {0};
+        memcpy(c + 32 - messagelen, message, messagelen);
+        secp256k1_scalar_set_b32(&msg, c, NULL);
+        memset(c, 0, 32);
+    }
+    int ret = !secp256k1_scalar_is_zero(&non) && !overflow;
+    secp256k1_ecdsa_sig_t sig;
+    if (ret) {
+        ret = secp256k1_ecdsa_sig_sign(&sig, &sec, &msg, &non, NULL);
+    }
+    if (ret) {
+        secp256k1_ecdsa_sig_serialize(signature, signaturelen, &sig);
+    }
+    secp256k1_scalar_clear(&msg);
+    secp256k1_scalar_clear(&non);
+    secp256k1_scalar_clear(&sec);
+    return ret;
+}
+
+int secp256k1_ecdsa_sign_compact(const unsigned char *message, int messagelen, unsigned char *sig64, const unsigned char *seckey, const unsigned char *nonce, int *recid) {
+    DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL);
+    DEBUG_CHECK(message != NULL);
+    DEBUG_CHECK(messagelen <= 32);
+    DEBUG_CHECK(sig64 != NULL);
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(nonce != NULL);
+
+    secp256k1_scalar_t sec, non, msg;
+    secp256k1_scalar_set_b32(&sec, seckey, NULL);
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&non, nonce, &overflow);
+    {
+        unsigned char c[32] = {0};
+        memcpy(c + 32 - messagelen, message, messagelen);
+        secp256k1_scalar_set_b32(&msg, c, NULL);
+        memset(c, 0, 32);
+    }
+    int ret = !secp256k1_scalar_is_zero(&non) && !overflow;
+    secp256k1_ecdsa_sig_t sig;
+    if (ret) {
+        ret = secp256k1_ecdsa_sig_sign(&sig, &sec, &msg, &non, recid);
+    }
+    if (ret) {
+        secp256k1_num_get_bin(sig64, 32, &sig.r);
+        secp256k1_num_get_bin(sig64 + 32, 32, &sig.s);
+    }
+    secp256k1_scalar_clear(&msg);
+    secp256k1_scalar_clear(&non);
+    secp256k1_scalar_clear(&sec);
+    return ret;
+}
+
+int secp256k1_ecdsa_recover_compact(const unsigned char *msg, int msglen, const unsigned char *sig64, unsigned char *pubkey, int *pubkeylen, int compressed, int recid) {
+    DEBUG_CHECK(secp256k1_ecmult_consts != NULL);
+    DEBUG_CHECK(msg != NULL);
+    DEBUG_CHECK(msglen <= 32);
+    DEBUG_CHECK(sig64 != NULL);
+    DEBUG_CHECK(pubkey != NULL);
+    DEBUG_CHECK(pubkeylen != NULL);
+    DEBUG_CHECK(recid >= 0 && recid <= 3);
+
+    int ret = 0;
+    secp256k1_num_t m;
+    secp256k1_ecdsa_sig_t sig;
+    secp256k1_num_set_bin(&sig.r, sig64, 32);
+    secp256k1_num_set_bin(&sig.s, sig64 + 32, 32);
+    secp256k1_num_set_bin(&m, msg, msglen);
+
+    secp256k1_ge_t q;
+    if (secp256k1_ecdsa_sig_recover(&sig, &q, &m, recid)) {
+        ret = secp256k1_eckey_pubkey_serialize(&q, pubkey, pubkeylen, compressed);
+    }
+    return ret;
+}
+
+int secp256k1_ec_seckey_verify(const unsigned char *seckey) {
+    DEBUG_CHECK(seckey != NULL);
+
+    secp256k1_scalar_t sec;
+    int overflow;
+    secp256k1_scalar_set_b32(&sec, seckey, &overflow);
+    int ret = !secp256k1_scalar_is_zero(&sec) && !overflow;
+    secp256k1_scalar_clear(&sec);
+    return ret;
+}
+
+int secp256k1_ec_pubkey_verify(const unsigned char *pubkey, int pubkeylen) {
+    DEBUG_CHECK(pubkey != NULL);
+
+    secp256k1_ge_t q;
+    return secp256k1_eckey_pubkey_parse(&q, pubkey, pubkeylen);
+}
+
+int secp256k1_ec_pubkey_create(unsigned char *pubkey, int *pubkeylen, const unsigned char *seckey, int compressed) {
+    DEBUG_CHECK(secp256k1_ecmult_gen_consts != NULL);
+    DEBUG_CHECK(pubkey != NULL);
+    DEBUG_CHECK(pubkeylen != NULL);
+    DEBUG_CHECK(seckey != NULL);
+
+    secp256k1_scalar_t sec;
+    secp256k1_scalar_set_b32(&sec, seckey, NULL);
+    secp256k1_gej_t pj;
+    secp256k1_ecmult_gen(&pj, &sec);
+    secp256k1_scalar_clear(&sec);
+    secp256k1_ge_t p;
+    secp256k1_ge_set_gej(&p, &pj);
+    return secp256k1_eckey_pubkey_serialize(&p, pubkey, pubkeylen, compressed);
+}
+
+int secp256k1_ec_pubkey_decompress(unsigned char *pubkey, int *pubkeylen) {
+    DEBUG_CHECK(pubkey != NULL);
+    DEBUG_CHECK(pubkeylen != NULL);
+
+    secp256k1_ge_t p;
+    if (!secp256k1_eckey_pubkey_parse(&p, pubkey, *pubkeylen))
+        return 0;
+    return secp256k1_eckey_pubkey_serialize(&p, pubkey, pubkeylen, 0);
+}
+
+int secp256k1_ec_privkey_tweak_add(unsigned char *seckey, const unsigned char *tweak) {
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(tweak != NULL);
+
+    secp256k1_scalar_t term;
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&term, tweak, &overflow);
+    secp256k1_scalar_t sec;
+    secp256k1_scalar_set_b32(&sec, seckey, NULL);
+
+    int ret = secp256k1_eckey_privkey_tweak_add(&sec, &term) && !overflow;
+    if (ret) {
+        secp256k1_scalar_get_b32(seckey, &sec);
+    }
+
+    secp256k1_scalar_clear(&sec);
+    secp256k1_scalar_clear(&term);
+    return ret;
+}
+
+int secp256k1_ec_pubkey_tweak_add(unsigned char *pubkey, int pubkeylen, const unsigned char *tweak) {
+    DEBUG_CHECK(secp256k1_ecmult_consts != NULL);
+    DEBUG_CHECK(pubkey != NULL);
+    DEBUG_CHECK(tweak != NULL);
+
+    secp256k1_num_t term;
+    secp256k1_num_set_bin(&term, tweak, 32);
+    secp256k1_ge_t p;
+    int ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen);
+    if (ret) {
+        ret = secp256k1_eckey_pubkey_tweak_add(&p, &term);
+    }
+    if (ret) {
+        int oldlen = pubkeylen;
+        ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, &pubkeylen, oldlen <= 33);
+        VERIFY_CHECK(pubkeylen == oldlen);
+    }
+
+    return ret;
+}
+
+int secp256k1_ec_privkey_tweak_mul(unsigned char *seckey, const unsigned char *tweak) {
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(tweak != NULL);
+
+    secp256k1_scalar_t factor;
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&factor, tweak, &overflow);
+    secp256k1_scalar_t sec;
+    secp256k1_scalar_set_b32(&sec, seckey, NULL);
+    int ret = secp256k1_eckey_privkey_tweak_mul(&sec, &factor) && !overflow;
+    if (ret) {
+        secp256k1_scalar_get_b32(seckey, &sec);
+    }
+
+    secp256k1_scalar_clear(&sec);
+    secp256k1_scalar_clear(&factor);
+    return ret;
+}
+
+int secp256k1_ec_pubkey_tweak_mul(unsigned char *pubkey, int pubkeylen, const unsigned char *tweak) {
+    DEBUG_CHECK(secp256k1_ecmult_consts != NULL);
+    DEBUG_CHECK(pubkey != NULL);
+    DEBUG_CHECK(tweak != NULL);
+
+    secp256k1_num_t factor;
+    secp256k1_num_set_bin(&factor, tweak, 32);
+    secp256k1_ge_t p;
+    int ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen);
+    if (ret) {
+        ret = secp256k1_eckey_pubkey_tweak_mul(&p, &factor);
+    }
+    if (ret) {
+        int oldlen = pubkeylen;
+        ret = secp256k1_eckey_pubkey_serialize(&p, pubkey, &pubkeylen, oldlen <= 33);
+        VERIFY_CHECK(pubkeylen == oldlen);
+    }
+
+    return ret;
+}
+
+int secp256k1_ec_privkey_export(const unsigned char *seckey, unsigned char *privkey, int *privkeylen, int compressed) {
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(privkey != NULL);
+    DEBUG_CHECK(privkeylen != NULL);
+
+    secp256k1_scalar_t key;
+    secp256k1_scalar_set_b32(&key, seckey, NULL);
+    int ret = secp256k1_eckey_privkey_serialize(privkey, privkeylen, &key, compressed);
+    secp256k1_scalar_clear(&key);
+    return ret;
+}
+
+int secp256k1_ec_privkey_import(unsigned char *seckey, const unsigned char *privkey, int privkeylen) {
+    DEBUG_CHECK(seckey != NULL);
+    DEBUG_CHECK(privkey != NULL);
+
+    secp256k1_scalar_t key;
+    int ret = secp256k1_eckey_privkey_parse(&key, privkey, privkeylen);
+    if (ret)
+        secp256k1_scalar_get_b32(seckey, &key);
+    secp256k1_scalar_clear(&key);
+    return ret;
+}
diff --git a/src/testrand.h b/src/testrand.h
new file mode 100644
index 000000000000..018b65cd53f1
--- /dev/null
+++ b/src/testrand.h
@@ -0,0 +1,26 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_TESTRAND_H_
+#define _SECP256K1_TESTRAND_H_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+/** Seed the pseudorandom number generator. */
+SECP256K1_INLINE static void secp256k1_rand_seed(uint64_t v);
+
+/** Generate a pseudorandom 32-bit number. */
+static uint32_t secp256k1_rand32(void);
+
+/** Generate a pseudorandom 32-byte array. */
+static void secp256k1_rand256(unsigned char *b32);
+
+/** Generate a pseudorandom 32-byte array with long sequences of zero and one bits. */
+static void secp256k1_rand256_test(unsigned char *b32);
+
+#endif
diff --git a/src/testrand_impl.h b/src/testrand_impl.h
new file mode 100644
index 000000000000..677c4b9a0e4c
--- /dev/null
+++ b/src/testrand_impl.h
@@ -0,0 +1,60 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_TESTRAND_IMPL_H_
+#define _SECP256K1_TESTRAND_IMPL_H_
+
+#include <stdint.h>
+#include <string.h>
+
+#include "testrand.h"
+
+static uint32_t secp256k1_Rz = 11, secp256k1_Rw = 11;
+
+SECP256K1_INLINE static void secp256k1_rand_seed(uint64_t v) {
+    secp256k1_Rz = v >> 32;
+    secp256k1_Rw = v;
+
+    if (secp256k1_Rz == 0 || secp256k1_Rz == 0x9068ffffU) {
+        secp256k1_Rz = 111;
+    }
+    if (secp256k1_Rw == 0 || secp256k1_Rw == 0x464fffffU) {
+        secp256k1_Rw = 111;
+    }
+}
+
+SECP256K1_INLINE static uint32_t secp256k1_rand32(void) {
+    secp256k1_Rz = 36969 * (secp256k1_Rz & 0xFFFF) + (secp256k1_Rz >> 16);
+    secp256k1_Rw = 18000 * (secp256k1_Rw & 0xFFFF) + (secp256k1_Rw >> 16);
+    return (secp256k1_Rw << 16) + (secp256k1_Rw >> 16) + secp256k1_Rz;
+}
+
+static void secp256k1_rand256(unsigned char *b32) {
+    for (int i=0; i<8; i++) {
+        uint32_t r = secp256k1_rand32();
+        b32[i*4 + 0] = (r >>  0) & 0xFF;
+        b32[i*4 + 1] = (r >>  8) & 0xFF;
+        b32[i*4 + 2] = (r >> 16) & 0xFF;
+        b32[i*4 + 3] = (r >> 24) & 0xFF;
+    }
+}
+
+static void secp256k1_rand256_test(unsigned char *b32) {
+    int bits=0;
+    memset(b32, 0, 32);
+    while (bits < 256) {
+        uint32_t ent = secp256k1_rand32();
+        int now = 1 + ((ent % 64)*((ent >> 6) % 32)+16)/31;
+        uint32_t val = 1 & (ent >> 11);
+        while (now > 0 && bits < 256) {
+            b32[bits / 8] |= val << (bits % 8);
+            now--;
+            bits++;
+        }
+    }
+}
+
+#endif
diff --git a/src/tests.c b/src/tests.c
new file mode 100644
index 000000000000..5d9b8344d901
--- /dev/null
+++ b/src/tests.c
@@ -0,0 +1,1080 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "secp256k1.c"
+#include "testrand_impl.h"
+
+#ifdef ENABLE_OPENSSL_TESTS
+#include "openssl/bn.h"
+#include "openssl/ec.h"
+#include "openssl/ecdsa.h"
+#include "openssl/obj_mac.h"
+#endif
+
+static int count = 64;
+
+/***** NUM TESTS *****/
+
+void random_num_negate(secp256k1_num_t *num) {
+    if (secp256k1_rand32() & 1)
+        secp256k1_num_negate(num);
+}
+
+void random_field_element_test(secp256k1_fe_t *fe) {
+    do {
+        unsigned char b32[32];
+        secp256k1_rand256_test(b32);
+        secp256k1_num_t num;
+        secp256k1_num_set_bin(&num, b32, 32);
+        if (secp256k1_num_cmp(&num, &secp256k1_fe_consts->p) >= 0)
+            continue;
+        secp256k1_fe_set_b32(fe, b32);
+        break;
+    } while(1);
+}
+
+void random_field_element_magnitude(secp256k1_fe_t *fe) {
+    secp256k1_fe_normalize(fe);
+    int n = secp256k1_rand32() % 4;
+    for (int i = 0; i < n; i++) {
+        secp256k1_fe_negate(fe, fe, 1 + 2*i);
+        secp256k1_fe_negate(fe, fe, 2 + 2*i);
+    }
+}
+
+void random_group_element_test(secp256k1_ge_t *ge) {
+    secp256k1_fe_t fe;
+    do {
+        random_field_element_test(&fe);
+        if (secp256k1_ge_set_xo(ge, &fe, secp256k1_rand32() & 1))
+            break;
+    } while(1);
+}
+
+void random_group_element_jacobian_test(secp256k1_gej_t *gej, const secp256k1_ge_t *ge) {
+    do {
+        random_field_element_test(&gej->z);
+        if (!secp256k1_fe_is_zero(&gej->z)) {
+            break;
+        }
+    } while(1);
+    secp256k1_fe_t z2; secp256k1_fe_sqr(&z2, &gej->z);
+    secp256k1_fe_t z3; secp256k1_fe_mul(&z3, &z2, &gej->z);
+    secp256k1_fe_mul(&gej->x, &ge->x, &z2);
+    secp256k1_fe_mul(&gej->y, &ge->y, &z3);
+    gej->infinity = ge->infinity;
+}
+
+void random_num_order_test(secp256k1_num_t *num) {
+    do {
+        unsigned char b32[32];
+        secp256k1_rand256_test(b32);
+        secp256k1_num_set_bin(num, b32, 32);
+        if (secp256k1_num_is_zero(num))
+            continue;
+        if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
+            continue;
+        break;
+    } while(1);
+}
+
+void random_scalar_order_test(secp256k1_scalar_t *num) {
+    do {
+        unsigned char b32[32];
+        secp256k1_rand256_test(b32);
+        int overflow = 0;
+        secp256k1_scalar_set_b32(num, b32, &overflow);
+        if (overflow || secp256k1_scalar_is_zero(num))
+            continue;
+        break;
+    } while(1);
+}
+
+void random_num_order(secp256k1_num_t *num) {
+    do {
+        unsigned char b32[32];
+        secp256k1_rand256(b32);
+        secp256k1_num_set_bin(num, b32, 32);
+        if (secp256k1_num_is_zero(num))
+            continue;
+        if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
+            continue;
+        break;
+    } while(1);
+}
+
+void test_num_copy_inc_cmp(void) {
+    secp256k1_num_t n1,n2;
+    random_num_order(&n1);
+    secp256k1_num_copy(&n2, &n1);
+    CHECK(secp256k1_num_eq(&n1, &n2));
+    CHECK(secp256k1_num_eq(&n2, &n1));
+    secp256k1_num_inc(&n2);
+    CHECK(!secp256k1_num_eq(&n1, &n2));
+    CHECK(!secp256k1_num_eq(&n2, &n1));
+}
+
+
+void test_num_get_set_hex(void) {
+    secp256k1_num_t n1,n2;
+    random_num_order_test(&n1);
+    char c[64];
+    secp256k1_num_get_hex(c, 64, &n1);
+    secp256k1_num_set_hex(&n2, c, 64);
+    CHECK(secp256k1_num_eq(&n1, &n2));
+    for (int i=0; i<64; i++) {
+        /* check whether the lower 4 bits correspond to the last hex character */
+        int low1 = secp256k1_num_shift(&n1, 4);
+        int lowh = c[63];
+        int low2 = ((lowh>>6)*9+(lowh-'0'))&15;
+        CHECK(low1 == low2);
+        /* shift bits off the hex representation, and compare */
+        memmove(c+1, c, 63);
+        c[0] = '0';
+        secp256k1_num_set_hex(&n2, c, 64);
+        CHECK(secp256k1_num_eq(&n1, &n2));
+    }
+}
+
+void test_num_get_set_bin(void) {
+    secp256k1_num_t n1,n2;
+    random_num_order_test(&n1);
+    unsigned char c[32];
+    secp256k1_num_get_bin(c, 32, &n1);
+    secp256k1_num_set_bin(&n2, c, 32);
+    CHECK(secp256k1_num_eq(&n1, &n2));
+    for (int i=0; i<32; i++) {
+        /* check whether the lower 8 bits correspond to the last byte */
+        int low1 = secp256k1_num_shift(&n1, 8);
+        int low2 = c[31];
+        CHECK(low1 == low2);
+        /* shift bits off the byte representation, and compare */
+        memmove(c+1, c, 31);
+        c[0] = 0;
+        secp256k1_num_set_bin(&n2, c, 32);
+        CHECK(secp256k1_num_eq(&n1, &n2));
+    }
+}
+
+void run_num_int(void) {
+    secp256k1_num_t n1;
+    for (int i=-255; i<256; i++) {
+        unsigned char c1[3] = {};
+        c1[2] = abs(i);
+        unsigned char c2[3] = {0x11,0x22,0x33};
+        secp256k1_num_set_int(&n1, i);
+        secp256k1_num_get_bin(c2, 3, &n1);
+        CHECK(memcmp(c1, c2, 3) == 0);
+    }
+}
+
+void test_num_negate(void) {
+    secp256k1_num_t n1;
+    secp256k1_num_t n2;
+    random_num_order_test(&n1); /* n1 = R */
+    random_num_negate(&n1);
+    secp256k1_num_copy(&n2, &n1); /* n2 = R */
+    secp256k1_num_sub(&n1, &n2, &n1); /* n1 = n2-n1 = 0 */
+    CHECK(secp256k1_num_is_zero(&n1));
+    secp256k1_num_copy(&n1, &n2); /* n1 = R */
+    secp256k1_num_negate(&n1); /* n1 = -R */
+    CHECK(!secp256k1_num_is_zero(&n1));
+    secp256k1_num_add(&n1, &n2, &n1); /* n1 = n2+n1 = 0 */
+    CHECK(secp256k1_num_is_zero(&n1));
+    secp256k1_num_copy(&n1, &n2); /* n1 = R */
+    secp256k1_num_negate(&n1); /* n1 = -R */
+    CHECK(secp256k1_num_is_neg(&n1) != secp256k1_num_is_neg(&n2));
+    secp256k1_num_negate(&n1); /* n1 = R */
+    CHECK(secp256k1_num_eq(&n1, &n2));
+}
+
+void test_num_add_sub(void) {
+    int r = secp256k1_rand32();
+    secp256k1_num_t n1;
+    secp256k1_num_t n2;
+    random_num_order_test(&n1); /* n1 = R1 */
+    if (r & 1) {
+        random_num_negate(&n1);
+    }
+    random_num_order_test(&n2); /* n2 = R2 */
+    if (r & 2) {
+        random_num_negate(&n2);
+    }
+    secp256k1_num_t n1p2, n2p1, n1m2, n2m1;
+    secp256k1_num_add(&n1p2, &n1, &n2); /* n1p2 = R1 + R2 */
+    secp256k1_num_add(&n2p1, &n2, &n1); /* n2p1 = R2 + R1 */
+    secp256k1_num_sub(&n1m2, &n1, &n2); /* n1m2 = R1 - R2 */
+    secp256k1_num_sub(&n2m1, &n2, &n1); /* n2m1 = R2 - R1 */
+    CHECK(secp256k1_num_eq(&n1p2, &n2p1));
+    CHECK(!secp256k1_num_eq(&n1p2, &n1m2));
+    secp256k1_num_negate(&n2m1); /* n2m1 = -R2 + R1 */
+    CHECK(secp256k1_num_eq(&n2m1, &n1m2));
+    CHECK(!secp256k1_num_eq(&n2m1, &n1));
+    secp256k1_num_add(&n2m1, &n2m1, &n2); /* n2m1 = -R2 + R1 + R2 = R1 */
+    CHECK(secp256k1_num_eq(&n2m1, &n1));
+    CHECK(!secp256k1_num_eq(&n2p1, &n1));
+    secp256k1_num_sub(&n2p1, &n2p1, &n2); /* n2p1 = R2 + R1 - R2 = R1 */
+    CHECK(secp256k1_num_eq(&n2p1, &n1));
+}
+
+void run_num_smalltests(void) {
+    for (int i=0; i<100*count; i++) {
+        test_num_copy_inc_cmp();
+        test_num_get_set_hex();
+        test_num_get_set_bin();
+        test_num_negate();
+        test_num_add_sub();
+    }
+    run_num_int();
+}
+
+/***** SCALAR TESTS *****/
+
+int secp256k1_scalar_eq(const secp256k1_scalar_t *s1, const secp256k1_scalar_t *s2) {
+    secp256k1_scalar_t t;
+    secp256k1_scalar_negate(&t, s2);
+    secp256k1_scalar_add(&t, &t, s1);
+    int ret = secp256k1_scalar_is_zero(&t);
+    return ret;
+}
+
+void scalar_test(void) {
+    unsigned char c[32];
+
+    /* Set 's' to a random scalar, with value 'snum'. */
+    secp256k1_rand256_test(c);
+    secp256k1_scalar_t s;
+    secp256k1_scalar_set_b32(&s, c, NULL);
+    secp256k1_num_t snum;
+    secp256k1_num_set_bin(&snum, c, 32);
+    secp256k1_num_mod(&snum, &secp256k1_ge_consts->order);
+
+    /* Set 's1' to a random scalar, with value 's1num'. */
+    secp256k1_rand256_test(c);
+    secp256k1_scalar_t s1;
+    secp256k1_scalar_set_b32(&s1, c, NULL);
+    secp256k1_num_t s1num;
+    secp256k1_num_set_bin(&s1num, c, 32);
+    secp256k1_num_mod(&s1num, &secp256k1_ge_consts->order);
+
+    /* Set 's2' to a random scalar, with value 'snum2', and byte array representation 'c'. */
+    secp256k1_rand256_test(c);
+    secp256k1_scalar_t s2;
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&s2, c, &overflow);
+    secp256k1_num_t s2num;
+    secp256k1_num_set_bin(&s2num, c, 32);
+    secp256k1_num_mod(&s2num, &secp256k1_ge_consts->order);
+
+    {
+        /* Test that fetching groups of 4 bits from a scalar and recursing n(i)=16*n(i-1)+p(i) reconstructs it. */
+        secp256k1_num_t n, t, m;
+        secp256k1_num_set_int(&n, 0);
+        secp256k1_num_set_int(&m, 16);
+        for (int i = 0; i < 256; i += 4) {
+            secp256k1_num_set_int(&t, secp256k1_scalar_get_bits(&s, 256 - 4 - i, 4));
+            secp256k1_num_mul(&n, &n, &m);
+            secp256k1_num_add(&n, &n, &t);
+        }
+        CHECK(secp256k1_num_eq(&n, &snum));
+    }
+
+    {
+        /* Test that get_b32 returns the same as get_bin on the number. */
+        unsigned char r1[32];
+        secp256k1_scalar_get_b32(r1, &s2);
+        unsigned char r2[32];
+        secp256k1_num_get_bin(r2, 32, &s2num);
+        CHECK(memcmp(r1, r2, 32) == 0);
+        /* If no overflow occurred when assigning, it should also be equal to the original byte array. */
+        CHECK((memcmp(r1, c, 32) == 0) == (overflow == 0));
+    }
+
+    {
+        /* Test that adding the scalars together is equal to adding their numbers together modulo the order. */
+        secp256k1_num_t rnum;
+        secp256k1_num_add(&rnum, &snum, &s2num);
+        secp256k1_num_mod(&rnum, &secp256k1_ge_consts->order);
+        secp256k1_scalar_t r;
+        secp256k1_scalar_add(&r, &s, &s2);
+        secp256k1_num_t r2num;
+        secp256k1_scalar_get_num(&r2num, &r);
+        CHECK(secp256k1_num_eq(&rnum, &r2num));
+    }
+
+    {
+        /* Test that multipying the scalars is equal to multiplying their numbers modulo the order. */
+        secp256k1_num_t rnum;
+        secp256k1_num_mul(&rnum, &snum, &s2num);
+        secp256k1_num_mod(&rnum, &secp256k1_ge_consts->order);
+        secp256k1_scalar_t r;
+        secp256k1_scalar_mul(&r, &s, &s2);
+        secp256k1_num_t r2num;
+        secp256k1_scalar_get_num(&r2num, &r);
+        CHECK(secp256k1_num_eq(&rnum, &r2num));
+        /* The result can only be zero if at least one of the factors was zero. */
+        CHECK(secp256k1_scalar_is_zero(&r) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_zero(&s2)));
+        /* The results can only be equal to one of the factors if that factor was zero, or the other factor was one. */
+        CHECK(secp256k1_num_eq(&rnum, &snum) == (secp256k1_scalar_is_zero(&s) || secp256k1_scalar_is_one(&s2)));
+        CHECK(secp256k1_num_eq(&rnum, &s2num) == (secp256k1_scalar_is_zero(&s2) || secp256k1_scalar_is_one(&s)));
+    }
+
+    {
+        /* Check that comparison with zero matches comparison with zero on the number. */
+        CHECK(secp256k1_num_is_zero(&snum) == secp256k1_scalar_is_zero(&s));
+        /* Check that comparison with the half order is equal to testing for high scalar. */
+        CHECK(secp256k1_scalar_is_high(&s) == (secp256k1_num_cmp(&snum, &secp256k1_ge_consts->half_order) > 0));
+        secp256k1_scalar_t neg;
+        secp256k1_scalar_negate(&neg, &s);
+        secp256k1_num_t negnum;
+        secp256k1_num_sub(&negnum, &secp256k1_ge_consts->order, &snum);
+        secp256k1_num_mod(&negnum, &secp256k1_ge_consts->order);
+        /* Check that comparison with the half order is equal to testing for high scalar after negation. */
+        CHECK(secp256k1_scalar_is_high(&neg) == (secp256k1_num_cmp(&negnum, &secp256k1_ge_consts->half_order) > 0));
+        /* Negating should change the high property, unless the value was already zero. */
+        CHECK((secp256k1_scalar_is_high(&s) == secp256k1_scalar_is_high(&neg)) == secp256k1_scalar_is_zero(&s));
+        secp256k1_num_t negnum2;
+        secp256k1_scalar_get_num(&negnum2, &neg);
+        /* Negating a scalar should be equal to (order - n) mod order on the number. */
+        CHECK(secp256k1_num_eq(&negnum, &negnum2));
+        secp256k1_scalar_add(&neg, &neg, &s);
+        /* Adding a number to its negation should result in zero. */
+        CHECK(secp256k1_scalar_is_zero(&neg));
+        secp256k1_scalar_negate(&neg, &neg);
+        /* Negating zero should still result in zero. */
+        CHECK(secp256k1_scalar_is_zero(&neg));
+    }
+
+    {
+        /* Test that scalar inverses are equal to the inverse of their number modulo the order. */
+        if (!secp256k1_scalar_is_zero(&s)) {
+            secp256k1_scalar_t inv;
+            secp256k1_scalar_inverse(&inv, &s);
+            secp256k1_num_t invnum;
+            secp256k1_num_mod_inverse(&invnum, &snum, &secp256k1_ge_consts->order);
+            secp256k1_num_t invnum2;
+            secp256k1_scalar_get_num(&invnum2, &inv);
+            CHECK(secp256k1_num_eq(&invnum, &invnum2));
+            secp256k1_scalar_mul(&inv, &inv, &s);
+            /* Multiplying a scalar with its inverse must result in one. */
+            CHECK(secp256k1_scalar_is_one(&inv));
+            secp256k1_scalar_inverse(&inv, &inv);
+            /* Inverting one must result in one. */
+            CHECK(secp256k1_scalar_is_one(&inv));
+        }
+    }
+
+    {
+        /* Test commutativity of add. */
+        secp256k1_scalar_t r1, r2;
+        secp256k1_scalar_add(&r1, &s1, &s2);
+        secp256k1_scalar_add(&r2, &s2, &s1);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+
+    {
+        /* Test commutativity of mul. */
+        secp256k1_scalar_t r1, r2;
+        secp256k1_scalar_mul(&r1, &s1, &s2);
+        secp256k1_scalar_mul(&r2, &s2, &s1);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+
+    {
+        /* Test associativity of add. */
+        secp256k1_scalar_t r1, r2;
+        secp256k1_scalar_add(&r1, &s1, &s2);
+        secp256k1_scalar_add(&r1, &r1, &s);
+        secp256k1_scalar_add(&r2, &s2, &s);
+        secp256k1_scalar_add(&r2, &s1, &r2);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+
+    {
+        /* Test associativity of mul. */
+        secp256k1_scalar_t r1, r2;
+        secp256k1_scalar_mul(&r1, &s1, &s2);
+        secp256k1_scalar_mul(&r1, &r1, &s);
+        secp256k1_scalar_mul(&r2, &s2, &s);
+        secp256k1_scalar_mul(&r2, &s1, &r2);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+
+    {
+        /* Test distributitivity of mul over add. */
+        secp256k1_scalar_t r1, r2, t;
+        secp256k1_scalar_add(&r1, &s1, &s2);
+        secp256k1_scalar_mul(&r1, &r1, &s);
+        secp256k1_scalar_mul(&r2, &s1, &s);
+        secp256k1_scalar_mul(&t, &s2, &s);
+        secp256k1_scalar_add(&r2, &r2, &t);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+
+    {
+        /* Test square. */
+        secp256k1_scalar_t r1, r2;
+        secp256k1_scalar_sqr(&r1, &s1);
+        secp256k1_scalar_mul(&r2, &s1, &s1);
+        CHECK(secp256k1_scalar_eq(&r1, &r2));
+    }
+}
+
+void run_scalar_tests(void) {
+    for (int i = 0; i < 128 * count; i++) {
+        scalar_test();
+    }
+}
+
+/***** FIELD TESTS *****/
+
+void random_fe(secp256k1_fe_t *x) {
+    unsigned char bin[32];
+    secp256k1_rand256(bin);
+    secp256k1_fe_set_b32(x, bin);
+}
+
+void random_fe_non_zero(secp256k1_fe_t *nz) {
+    int tries = 10;
+    while (--tries >= 0) {
+        random_fe(nz);
+        secp256k1_fe_normalize(nz);
+        if (!secp256k1_fe_is_zero(nz))
+            break;
+    }
+    /* Infinitesimal probability of spurious failure here */
+    CHECK(tries >= 0);
+}
+
+void random_fe_non_square(secp256k1_fe_t *ns) {
+    random_fe_non_zero(ns);
+    secp256k1_fe_t r;
+    if (secp256k1_fe_sqrt(&r, ns)) {
+        secp256k1_fe_negate(ns, ns, 1);
+    }
+}
+
+int check_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+    secp256k1_fe_t an = *a; secp256k1_fe_normalize(&an);
+    secp256k1_fe_t bn = *b; secp256k1_fe_normalize(&bn);
+    return secp256k1_fe_equal(&an, &bn);
+}
+
+int check_fe_inverse(const secp256k1_fe_t *a, const secp256k1_fe_t *ai) {
+    secp256k1_fe_t x; secp256k1_fe_mul(&x, a, ai);
+    secp256k1_fe_t one; secp256k1_fe_set_int(&one, 1);
+    return check_fe_equal(&x, &one);
+}
+
+void run_field_inv(void) {
+    secp256k1_fe_t x, xi, xii;
+    for (int i=0; i<10*count; i++) {
+        random_fe_non_zero(&x);
+        secp256k1_fe_inv(&xi, &x);
+        CHECK(check_fe_inverse(&x, &xi));
+        secp256k1_fe_inv(&xii, &xi);
+        CHECK(check_fe_equal(&x, &xii));
+    }
+}
+
+void run_field_inv_var(void) {
+    secp256k1_fe_t x, xi, xii;
+    for (int i=0; i<10*count; i++) {
+        random_fe_non_zero(&x);
+        secp256k1_fe_inv_var(&xi, &x);
+        CHECK(check_fe_inverse(&x, &xi));
+        secp256k1_fe_inv_var(&xii, &xi);
+        CHECK(check_fe_equal(&x, &xii));
+    }
+}
+
+void run_field_inv_all(void) {
+    secp256k1_fe_t x[16], xi[16], xii[16];
+    /* Check it's safe to call for 0 elements */
+    secp256k1_fe_inv_all(0, xi, x);
+    for (int i=0; i<count; i++) {
+        size_t len = (secp256k1_rand32() & 15) + 1;
+        for (size_t j=0; j<len; j++)
+            random_fe_non_zero(&x[j]);
+        secp256k1_fe_inv_all(len, xi, x);
+        for (size_t j=0; j<len; j++)
+            CHECK(check_fe_inverse(&x[j], &xi[j]));
+        secp256k1_fe_inv_all(len, xii, xi);
+        for (size_t j=0; j<len; j++)
+            CHECK(check_fe_equal(&x[j], &xii[j]));
+    }
+}
+
+void run_field_inv_all_var(void) {
+    secp256k1_fe_t x[16], xi[16], xii[16];
+    /* Check it's safe to call for 0 elements */
+    secp256k1_fe_inv_all_var(0, xi, x);
+    for (int i=0; i<count; i++) {
+        size_t len = (secp256k1_rand32() & 15) + 1;
+        for (size_t j=0; j<len; j++)
+            random_fe_non_zero(&x[j]);
+        secp256k1_fe_inv_all_var(len, xi, x);
+        for (size_t j=0; j<len; j++)
+            CHECK(check_fe_inverse(&x[j], &xi[j]));
+        secp256k1_fe_inv_all_var(len, xii, xi);
+        for (size_t j=0; j<len; j++)
+            CHECK(check_fe_equal(&x[j], &xii[j]));
+    }
+}
+
+void run_sqr(void) {
+    secp256k1_fe_t x, s;
+
+    {
+        secp256k1_fe_set_int(&x, 1);
+        secp256k1_fe_negate(&x, &x, 1);
+
+        for (int i=1; i<=512; ++i) {
+            secp256k1_fe_mul_int(&x, 2);
+            secp256k1_fe_normalize(&x);
+            secp256k1_fe_sqr(&s, &x);
+        }
+    }
+}
+
+void test_sqrt(const secp256k1_fe_t *a, const secp256k1_fe_t *k) {
+    secp256k1_fe_t r1, r2;
+    int v = secp256k1_fe_sqrt(&r1, a);
+    CHECK((v == 0) == (k == NULL));
+
+    if (k != NULL) {
+        /* Check that the returned root is +/- the given known answer */
+        secp256k1_fe_negate(&r2, &r1, 1);
+        secp256k1_fe_add(&r1, k); secp256k1_fe_add(&r2, k);
+        secp256k1_fe_normalize(&r1); secp256k1_fe_normalize(&r2);
+        CHECK(secp256k1_fe_is_zero(&r1) || secp256k1_fe_is_zero(&r2));
+    }
+}
+
+void run_sqrt(void) {
+    secp256k1_fe_t ns, x, s, t;
+
+    /* Check sqrt(0) is 0 */
+    secp256k1_fe_set_int(&x, 0);
+    secp256k1_fe_sqr(&s, &x);
+    test_sqrt(&s, &x);
+
+    /* Check sqrt of small squares (and their negatives) */
+    for (int i=1; i<=100; i++) {
+        secp256k1_fe_set_int(&x, i);
+        secp256k1_fe_sqr(&s, &x);
+        test_sqrt(&s, &x);
+        secp256k1_fe_negate(&t, &s, 1);
+        test_sqrt(&t, NULL);
+    }
+
+    /* Consistency checks for large random values */
+    for (int i=0; i<10; i++) {
+        random_fe_non_square(&ns);
+        for (int j=0; j<count; j++) {
+            random_fe(&x);
+            secp256k1_fe_sqr(&s, &x);
+            test_sqrt(&s, &x);
+            secp256k1_fe_negate(&t, &s, 1);
+            test_sqrt(&t, NULL);
+            secp256k1_fe_mul(&t, &s, &ns);
+            test_sqrt(&t, NULL);
+        }
+    }
+}
+
+/***** GROUP TESTS *****/
+
+int ge_equals_ge(const secp256k1_ge_t *a, const secp256k1_ge_t *b) {
+    if (a->infinity && b->infinity)
+        return 1;
+    return check_fe_equal(&a->x, &b->x) && check_fe_equal(&a->y, &b->y);
+}
+
+void ge_equals_gej(const secp256k1_ge_t *a, const secp256k1_gej_t *b) {
+    secp256k1_ge_t bb;
+    secp256k1_gej_t bj = *b;
+    secp256k1_ge_set_gej_var(&bb, &bj);
+    CHECK(ge_equals_ge(a, &bb));
+}
+
+void gej_equals_gej(const secp256k1_gej_t *a, const secp256k1_gej_t *b) {
+    secp256k1_ge_t aa, bb;
+    secp256k1_gej_t aj = *a, bj = *b;
+    secp256k1_ge_set_gej_var(&aa, &aj);
+    secp256k1_ge_set_gej_var(&bb, &bj);
+    CHECK(ge_equals_ge(&aa, &bb));
+}
+
+void test_ge(void) {
+    secp256k1_ge_t a, b, i, n;
+    random_group_element_test(&a);
+    random_group_element_test(&b);
+    n = a;
+    secp256k1_fe_normalize(&a.y);
+    secp256k1_fe_negate(&n.y, &a.y, 1);
+    secp256k1_ge_set_infinity(&i);
+    random_field_element_magnitude(&a.x);
+    random_field_element_magnitude(&a.y);
+    random_field_element_magnitude(&b.x);
+    random_field_element_magnitude(&b.y);
+    random_field_element_magnitude(&n.x);
+    random_field_element_magnitude(&n.y);
+
+    secp256k1_gej_t aj, bj, ij, nj;
+    random_group_element_jacobian_test(&aj, &a);
+    random_group_element_jacobian_test(&bj, &b);
+    secp256k1_gej_set_infinity(&ij);
+    random_group_element_jacobian_test(&nj, &n);
+    random_field_element_magnitude(&aj.x);
+    random_field_element_magnitude(&aj.y);
+    random_field_element_magnitude(&aj.z);
+    random_field_element_magnitude(&bj.x);
+    random_field_element_magnitude(&bj.y);
+    random_field_element_magnitude(&bj.z);
+    random_field_element_magnitude(&nj.x);
+    random_field_element_magnitude(&nj.y);
+    random_field_element_magnitude(&nj.z);
+
+    /* gej + gej adds */
+    secp256k1_gej_t aaj; secp256k1_gej_add_var(&aaj, &aj, &aj);
+    secp256k1_gej_t abj; secp256k1_gej_add_var(&abj, &aj, &bj);
+    secp256k1_gej_t aij; secp256k1_gej_add_var(&aij, &aj, &ij);
+    secp256k1_gej_t anj; secp256k1_gej_add_var(&anj, &aj, &nj);
+    secp256k1_gej_t iaj; secp256k1_gej_add_var(&iaj, &ij, &aj);
+    secp256k1_gej_t iij; secp256k1_gej_add_var(&iij, &ij, &ij);
+
+    /* gej + ge adds */
+    secp256k1_gej_t aa; secp256k1_gej_add_ge_var(&aa, &aj, &a);
+    secp256k1_gej_t ab; secp256k1_gej_add_ge_var(&ab, &aj, &b);
+    secp256k1_gej_t ai; secp256k1_gej_add_ge_var(&ai, &aj, &i);
+    secp256k1_gej_t an; secp256k1_gej_add_ge_var(&an, &aj, &n);
+    secp256k1_gej_t ia; secp256k1_gej_add_ge_var(&ia, &ij, &a);
+    secp256k1_gej_t ii; secp256k1_gej_add_ge_var(&ii, &ij, &i);
+
+    /* const gej + ge adds */
+    secp256k1_gej_t aac; secp256k1_gej_add_ge(&aac, &aj, &a);
+    secp256k1_gej_t abc; secp256k1_gej_add_ge(&abc, &aj, &b);
+    secp256k1_gej_t anc; secp256k1_gej_add_ge(&anc, &aj, &n);
+    secp256k1_gej_t iac; secp256k1_gej_add_ge(&iac, &ij, &a);
+
+    CHECK(secp256k1_gej_is_infinity(&an));
+    CHECK(secp256k1_gej_is_infinity(&anj));
+    CHECK(secp256k1_gej_is_infinity(&anc));
+    gej_equals_gej(&aa, &aaj);
+    gej_equals_gej(&aa, &aac);
+    gej_equals_gej(&ab, &abj);
+    gej_equals_gej(&ab, &abc);
+    gej_equals_gej(&an, &anj);
+    gej_equals_gej(&an, &anc);
+    gej_equals_gej(&ia, &iaj);
+    gej_equals_gej(&ai, &aij);
+    gej_equals_gej(&ii, &iij);
+    ge_equals_gej(&a, &ai);
+    ge_equals_gej(&a, &ai);
+    ge_equals_gej(&a, &iaj);
+    ge_equals_gej(&a, &iaj);
+    ge_equals_gej(&a, &iac);
+}
+
+void run_ge(void) {
+    for (int i = 0; i < 2000*count; i++) {
+        test_ge();
+    }
+}
+
+/***** ECMULT TESTS *****/
+
+void run_ecmult_chain(void) {
+    /* random starting point A (on the curve) */
+    secp256k1_fe_t ax; secp256k1_fe_set_hex(&ax, "8b30bbe9ae2a990696b22f670709dff3727fd8bc04d3362c6c7bf458e2846004", 64);
+    secp256k1_fe_t ay; secp256k1_fe_set_hex(&ay, "a357ae915c4a65281309edf20504740f0eb3343990216b4f81063cb65f2f7e0f", 64);
+    secp256k1_gej_t a; secp256k1_gej_set_xy(&a, &ax, &ay);
+    /* two random initial factors xn and gn */
+    secp256k1_num_t xn;
+    secp256k1_num_set_hex(&xn, "84cc5452f7fde1edb4d38a8ce9b1b84ccef31f146e569be9705d357a42985407", 64);
+    secp256k1_num_t gn;
+    secp256k1_num_set_hex(&gn, "a1e58d22553dcd42b23980625d4c57a96e9323d42b3152e5ca2c3990edc7c9de", 64);
+    /* two small multipliers to be applied to xn and gn in every iteration: */
+    secp256k1_num_t xf;
+    secp256k1_num_set_hex(&xf, "1337", 4);
+    secp256k1_num_t gf;
+    secp256k1_num_set_hex(&gf, "7113", 4);
+    /* accumulators with the resulting coefficients to A and G */
+    secp256k1_num_t ae;
+    secp256k1_num_set_int(&ae, 1);
+    secp256k1_num_t ge;
+    secp256k1_num_set_int(&ge, 0);
+    /* the point being computed */
+    secp256k1_gej_t x = a;
+    const secp256k1_num_t *order = &secp256k1_ge_consts->order;
+    for (int i=0; i<200*count; i++) {
+        /* in each iteration, compute X = xn*X + gn*G; */
+        secp256k1_ecmult(&x, &x, &xn, &gn);
+        /* also compute ae and ge: the actual accumulated factors for A and G */
+        /* if X was (ae*A+ge*G), xn*X + gn*G results in (xn*ae*A + (xn*ge+gn)*G) */
+        secp256k1_num_mod_mul(&ae, &ae, &xn, order);
+        secp256k1_num_mod_mul(&ge, &ge, &xn, order);
+        secp256k1_num_add(&ge, &ge, &gn);
+        secp256k1_num_mod(&ge, order);
+        /* modify xn and gn */
+        secp256k1_num_mod_mul(&xn, &xn, &xf, order);
+        secp256k1_num_mod_mul(&gn, &gn, &gf, order);
+
+        /* verify */
+        if (i == 19999) {
+            char res[132]; int resl = 132;
+            secp256k1_gej_get_hex(res, &resl, &x);
+            CHECK(strcmp(res, "(D6E96687F9B10D092A6F35439D86CEBEA4535D0D409F53586440BD74B933E830,B95CBCA2C77DA786539BE8FD53354D2D3B4F566AE658045407ED6015EE1B2A88)") == 0);
+        }
+    }
+    /* redo the computation, but directly with the resulting ae and ge coefficients: */
+    secp256k1_gej_t x2; secp256k1_ecmult(&x2, &a, &ae, &ge);
+    char res[132]; int resl = 132;
+    char res2[132]; int resl2 = 132;
+    secp256k1_gej_get_hex(res, &resl, &x);
+    secp256k1_gej_get_hex(res2, &resl2, &x2);
+    CHECK(strcmp(res, res2) == 0);
+    CHECK(strlen(res) == 131);
+}
+
+void test_point_times_order(const secp256k1_gej_t *point) {
+    /* multiplying a point by the order results in O */
+    const secp256k1_num_t *order = &secp256k1_ge_consts->order;
+    secp256k1_num_t zero;
+    secp256k1_num_set_int(&zero, 0);
+    secp256k1_gej_t res;
+    secp256k1_ecmult(&res, point, order, order); /* calc res = order * point + order * G; */
+    CHECK(secp256k1_gej_is_infinity(&res));
+}
+
+void run_point_times_order(void) {
+    secp256k1_fe_t x; secp256k1_fe_set_hex(&x, "02", 2);
+    for (int i=0; i<500; i++) {
+        secp256k1_ge_t p;
+        if (secp256k1_ge_set_xo(&p, &x, 1)) {
+            CHECK(secp256k1_ge_is_valid(&p));
+            secp256k1_gej_t j;
+            secp256k1_gej_set_ge(&j, &p);
+            CHECK(secp256k1_gej_is_valid(&j));
+            test_point_times_order(&j);
+        }
+        secp256k1_fe_sqr(&x, &x);
+    }
+    char c[65]; int cl=65;
+    secp256k1_fe_get_hex(c, &cl, &x);
+    CHECK(strcmp(c, "7603CB59B0EF6C63FE6084792A0C378CDB3233A80F8A9A09A877DEAD31B38C45") == 0);
+}
+
+void test_wnaf(const secp256k1_num_t *number, int w) {
+    secp256k1_num_t x, two, t;
+    secp256k1_num_set_int(&x, 0);
+    secp256k1_num_set_int(&two, 2);
+    int wnaf[257];
+    int bits = secp256k1_ecmult_wnaf(wnaf, number, w);
+    int zeroes = -1;
+    for (int i=bits-1; i>=0; i--) {
+        secp256k1_num_mul(&x, &x, &two);
+        int v = wnaf[i];
+        if (v) {
+            CHECK(zeroes == -1 || zeroes >= w-1); /* check that distance between non-zero elements is at least w-1 */
+            zeroes=0;
+            CHECK((v & 1) == 1); /* check non-zero elements are odd */
+            CHECK(v <= (1 << (w-1)) - 1); /* check range below */
+            CHECK(v >= -(1 << (w-1)) - 1); /* check range above */
+        } else {
+            CHECK(zeroes != -1); /* check that no unnecessary zero padding exists */
+            zeroes++;
+        }
+        secp256k1_num_set_int(&t, v);
+        secp256k1_num_add(&x, &x, &t);
+    }
+    CHECK(secp256k1_num_eq(&x, number)); /* check that wnaf represents number */
+}
+
+void run_wnaf(void) {
+    secp256k1_num_t n;
+    for (int i=0; i<count; i++) {
+        random_num_order(&n);
+        if (i % 1)
+            secp256k1_num_negate(&n);
+        test_wnaf(&n, 4+(i%10));
+    }
+}
+
+void random_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *key, const secp256k1_scalar_t *msg, int *recid) {
+    secp256k1_scalar_t nonce;
+    do {
+        random_scalar_order_test(&nonce);
+    } while(!secp256k1_ecdsa_sig_sign(sig, key, msg, &nonce, recid));
+}
+
+void test_ecdsa_sign_verify(void) {
+    secp256k1_scalar_t msg, key;
+    random_scalar_order_test(&msg);
+    random_scalar_order_test(&key);
+    secp256k1_gej_t pubj; secp256k1_ecmult_gen(&pubj, &key);
+    secp256k1_ge_t pub; secp256k1_ge_set_gej(&pub, &pubj);
+    secp256k1_ecdsa_sig_t sig;
+    random_sign(&sig, &key, &msg, NULL);
+    secp256k1_num_t msg_num;
+    secp256k1_scalar_get_num(&msg_num, &msg);
+    CHECK(secp256k1_ecdsa_sig_verify(&sig, &pub, &msg_num));
+    secp256k1_num_inc(&msg_num);
+    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &pub, &msg_num));
+}
+
+void run_ecdsa_sign_verify(void) {
+    for (int i=0; i<10*count; i++) {
+        test_ecdsa_sign_verify();
+    }
+}
+
+void test_ecdsa_end_to_end(void) {
+    unsigned char privkey[32];
+    unsigned char message[32];
+
+    /* Generate a random key and message. */
+    {
+        secp256k1_num_t msg, key;
+        random_num_order_test(&msg);
+        random_num_order_test(&key);
+        secp256k1_num_get_bin(privkey, 32, &key);
+        secp256k1_num_get_bin(message, 32, &msg);
+    }
+
+    /* Construct and verify corresponding public key. */
+    CHECK(secp256k1_ec_seckey_verify(privkey) == 1);
+    unsigned char pubkey[65]; int pubkeylen = 65;
+    CHECK(secp256k1_ec_pubkey_create(pubkey, &pubkeylen, privkey, secp256k1_rand32() % 2) == 1);
+    CHECK(secp256k1_ec_pubkey_verify(pubkey, pubkeylen));
+
+    /* Verify private key import and export. */
+    unsigned char seckey[300]; int seckeylen = 300;
+    CHECK(secp256k1_ec_privkey_export(privkey, seckey, &seckeylen, secp256k1_rand32() % 2) == 1);
+    unsigned char privkey2[32];
+    CHECK(secp256k1_ec_privkey_import(privkey2, seckey, seckeylen) == 1);
+    CHECK(memcmp(privkey, privkey2, 32) == 0);
+
+    /* Optionally tweak the keys using addition. */
+    if (secp256k1_rand32() % 3 == 0) {
+        unsigned char rnd[32];
+        secp256k1_rand256_test(rnd);
+        int ret1 = secp256k1_ec_privkey_tweak_add(privkey, rnd);
+        int ret2 = secp256k1_ec_pubkey_tweak_add(pubkey, pubkeylen, rnd);
+        CHECK(ret1 == ret2);
+        if (ret1 == 0) return;
+        unsigned char pubkey2[65]; int pubkeylen2 = 65;
+        CHECK(secp256k1_ec_pubkey_create(pubkey2, &pubkeylen2, privkey, pubkeylen == 33) == 1);
+        CHECK(memcmp(pubkey, pubkey2, pubkeylen) == 0);
+    }
+
+    /* Optionally tweak the keys using multiplication. */
+    if (secp256k1_rand32() % 3 == 0) {
+        unsigned char rnd[32];
+        secp256k1_rand256_test(rnd);
+        int ret1 = secp256k1_ec_privkey_tweak_mul(privkey, rnd);
+        int ret2 = secp256k1_ec_pubkey_tweak_mul(pubkey, pubkeylen, rnd);
+        CHECK(ret1 == ret2);
+        if (ret1 == 0) return;
+        unsigned char pubkey2[65]; int pubkeylen2 = 65;
+        CHECK(secp256k1_ec_pubkey_create(pubkey2, &pubkeylen2, privkey, pubkeylen == 33) == 1);
+        CHECK(memcmp(pubkey, pubkey2, pubkeylen) == 0);
+    }
+
+    /* Sign. */
+    unsigned char signature[72]; int signaturelen = 72;
+    while(1) {
+        unsigned char rnd[32];
+        secp256k1_rand256_test(rnd);
+        if (secp256k1_ecdsa_sign(message, 32, signature, &signaturelen, privkey, rnd) == 1) {
+            break;
+        }
+    }
+    /* Verify. */
+    CHECK(secp256k1_ecdsa_verify(message, 32, signature, signaturelen, pubkey, pubkeylen) == 1);
+    /* Destroy signature and verify again. */
+    signature[signaturelen - 1 - secp256k1_rand32() % 20] += 1 + (secp256k1_rand32() % 255);
+    CHECK(secp256k1_ecdsa_verify(message, 32, signature, signaturelen, pubkey, pubkeylen) != 1);
+
+    /* Compact sign. */
+    unsigned char csignature[64]; int recid = 0;
+    while(1) {
+        unsigned char rnd[32];
+        secp256k1_rand256_test(rnd);
+        if (secp256k1_ecdsa_sign_compact(message, 32, csignature, privkey, rnd, &recid) == 1) {
+            break;
+        }
+    }
+    /* Recover. */
+    unsigned char recpubkey[65]; int recpubkeylen = 0;
+    CHECK(secp256k1_ecdsa_recover_compact(message, 32, csignature, recpubkey, &recpubkeylen, pubkeylen == 33, recid) == 1);
+    CHECK(recpubkeylen == pubkeylen);
+    CHECK(memcmp(pubkey, recpubkey, pubkeylen) == 0);
+    /* Destroy signature and verify again. */
+    csignature[secp256k1_rand32() % 64] += 1 + (secp256k1_rand32() % 255);
+    CHECK(secp256k1_ecdsa_recover_compact(message, 32, csignature, recpubkey, &recpubkeylen, pubkeylen == 33, recid) != 1 ||
+          memcmp(pubkey, recpubkey, pubkeylen) != 0);
+    CHECK(recpubkeylen == pubkeylen);
+
+}
+
+void run_ecdsa_end_to_end(void) {
+    for (int i=0; i<64*count; i++) {
+        test_ecdsa_end_to_end();
+    }
+}
+
+void test_ecdsa_infinity(void) {
+    const unsigned char msg32[32] = {
+        'T', 'h', 'i', 's', ' ', 'i', 's', ' ',
+        'a', ' ', 'v', 'e', 'r', 'y', ' ', 's',
+        'e', 'c', 'r', 'e', 't', ' ', 'm', 'e',
+        's', 's', 'a', 'g', 'e', '.', '.', '.'
+    };
+    const unsigned char sig64[64] = {
+        // Generated by signing the above message with nonce 'This is the nonce we will use...'
+        // and secret key 0 (which is not valid), resulting in recid 0.
+        0x67, 0xCB, 0x28, 0x5F, 0x9C, 0xD1, 0x94, 0xE8,
+        0x40, 0xD6, 0x29, 0x39, 0x7A, 0xF5, 0x56, 0x96,
+        0x62, 0xFD, 0xE4, 0x46, 0x49, 0x99, 0x59, 0x63,
+        0x17, 0x9A, 0x7D, 0xD1, 0x7B, 0xD2, 0x35, 0x32,
+        0x4B, 0x1B, 0x7D, 0xF3, 0x4C, 0xE1, 0xF6, 0x8E,
+        0x69, 0x4F, 0xF6, 0xF1, 0x1A, 0xC7, 0x51, 0xDD,
+        0x7D, 0xD7, 0x3E, 0x38, 0x7E, 0xE4, 0xFC, 0x86,
+        0x6E, 0x1B, 0xE8, 0xEC, 0xC7, 0xDD, 0x95, 0x57
+    };
+    unsigned char pubkey[65];
+    int pubkeylen = 65;
+    CHECK(!secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 0));
+    CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 1));
+    CHECK(!secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 2));
+    CHECK(!secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 3));
+}
+
+void run_ecdsa_infinity(void) {
+    test_ecdsa_infinity();
+}
+
+#ifdef ENABLE_OPENSSL_TESTS
+EC_KEY *get_openssl_key(const secp256k1_scalar_t *key) {
+    unsigned char privkey[300];
+    int privkeylen;
+    int compr = secp256k1_rand32() & 1;
+    const unsigned char* pbegin = privkey;
+    EC_KEY *ec_key = EC_KEY_new_by_curve_name(NID_secp256k1);
+    CHECK(secp256k1_eckey_privkey_serialize(privkey, &privkeylen, key, compr));
+    CHECK(d2i_ECPrivateKey(&ec_key, &pbegin, privkeylen));
+    CHECK(EC_KEY_check_key(ec_key));
+    return ec_key;
+}
+
+void test_ecdsa_openssl(void) {
+    secp256k1_scalar_t key, msg;
+    unsigned char message[32];
+    secp256k1_rand256_test(message);
+    secp256k1_scalar_set_b32(&msg, message, NULL);
+    random_scalar_order_test(&key);
+    secp256k1_gej_t qj;
+    secp256k1_ecmult_gen(&qj, &key);
+    secp256k1_ge_t q;
+    secp256k1_ge_set_gej(&q, &qj);
+    EC_KEY *ec_key = get_openssl_key(&key);
+    CHECK(ec_key);
+    unsigned char signature[80];
+    unsigned int sigsize = 80;
+    CHECK(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key));
+    secp256k1_ecdsa_sig_t sig;
+    CHECK(secp256k1_ecdsa_sig_parse(&sig, signature, sigsize));
+    secp256k1_num_t msg_num;
+    secp256k1_scalar_get_num(&msg_num, &msg);
+    CHECK(secp256k1_ecdsa_sig_verify(&sig, &q, &msg_num));
+    secp256k1_num_inc(&sig.r);
+    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &q, &msg_num));
+
+    random_sign(&sig, &key, &msg, NULL);
+    int secp_sigsize = 80;
+    CHECK(secp256k1_ecdsa_sig_serialize(signature, &secp_sigsize, &sig));
+    CHECK(ECDSA_verify(0, message, sizeof(message), signature, secp_sigsize, ec_key) == 1);
+
+    EC_KEY_free(ec_key);
+}
+
+void run_ecdsa_openssl(void) {
+    for (int i=0; i<10*count; i++) {
+        test_ecdsa_openssl();
+    }
+}
+#endif
+
+int main(int argc, char **argv) {
+    /* find iteration count */
+    if (argc > 1) {
+        count = strtol(argv[1], NULL, 0);
+    }
+
+    /* find random seed */
+    uint64_t seed;
+    if (argc > 2) {
+        seed = strtoull(argv[2], NULL, 0);
+    } else {
+        FILE *frand = fopen("/dev/urandom", "r");
+        if (!frand || !fread(&seed, sizeof(seed), 1, frand)) {
+            seed = time(NULL) * 1337;
+        }
+        fclose(frand);
+    }
+    secp256k1_rand_seed(seed);
+
+    printf("test count = %i\n", count);
+    printf("random seed = %llu\n", (unsigned long long)seed);
+
+    /* initialize */
+    secp256k1_start(SECP256K1_START_SIGN | SECP256K1_START_VERIFY);
+
+    /* num tests */
+    run_num_smalltests();
+
+    /* scalar tests */
+    run_scalar_tests();
+
+    /* field tests */
+    run_field_inv();
+    run_field_inv_var();
+    run_field_inv_all();
+    run_field_inv_all_var();
+    run_sqr();
+    run_sqrt();
+
+    /* group tests */
+    run_ge();
+
+    /* ecmult tests */
+    run_wnaf();
+    run_point_times_order();
+    run_ecmult_chain();
+
+    /* ecdsa tests */
+    run_ecdsa_sign_verify();
+    run_ecdsa_end_to_end();
+    run_ecdsa_infinity();
+#ifdef ENABLE_OPENSSL_TESTS
+    run_ecdsa_openssl();
+#endif
+
+    printf("random run = %llu\n", (unsigned long long)secp256k1_rand32() + ((unsigned long long)secp256k1_rand32() << 32));
+
+    /* shutdown */
+    secp256k1_stop();
+    return 0;
+}
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 000000000000..96b47057c02c
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,64 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille                             *
+ * Distributed under the MIT software license, see the accompanying   *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_UTIL_H_
+#define _SECP256K1_UTIL_H_
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdio.h>
+
+#ifdef DETERMINISTIC
+#define TEST_FAILURE(msg) do { \
+    fprintf(stderr, "%s\n", msg); \
+    abort(); \
+} while(0);
+#else
+#define TEST_FAILURE(msg) do { \
+    fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, msg); \
+    abort(); \
+} while(0)
+#endif
+
+#ifndef HAVE_BUILTIN_EXPECT
+#define EXPECT(x,c) __builtin_expect((x),(c))
+#else
+#define EXPECT(x,c) (x)
+#endif
+
+#ifdef DETERMINISTIC
+#define CHECK(cond) do { \
+    if (EXPECT(!(cond), 0)) { \
+        TEST_FAILURE("test condition failed"); \
+    } \
+} while(0)
+#else
+#define CHECK(cond) do { \
+    if (EXPECT(!(cond), 0)) { \
+        TEST_FAILURE("test condition failed: " #cond); \
+    } \
+} while(0)
+#endif
+
+/* Like assert(), but safe to use on expressions with side effects. */
+#ifndef NDEBUG
+#define DEBUG_CHECK CHECK
+#else
+#define DEBUG_CHECK(cond) do { (void)(cond); } while(0)
+#endif
+
+/* Like DEBUG_CHECK(), but when VERIFY is defined instead of NDEBUG not defined. */
+#ifdef VERIFY
+#define VERIFY_CHECK CHECK
+#else
+#define VERIFY_CHECK(cond) do { (void)(cond); } while(0)
+#endif
+
+#endif

From 07a99017033b23f840f602d768efa87e0e914e90 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 07:58:37 -0800
Subject: [PATCH 1032/1819] Always build and link libsecp256k1

---
 configure.ac                | 11 ++++++++++-
 src/Makefile.am             | 30 +++++++++---------------------
 src/Makefile.qt.include     |  5 +----
 src/Makefile.qttest.include |  5 +----
 src/Makefile.test.include   |  6 +-----
 5 files changed, 22 insertions(+), 35 deletions(-)

diff --git a/configure.ac b/configure.ac
index 837810401ab9..89b856e664e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -800,7 +800,6 @@ AC_SUBST(CLIENT_VERSION_BUILD, _CLIENT_VERSION_BUILD)
 AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
-
 AC_SUBST(RELDFLAGS)
 AC_SUBST(LIBTOOL_LDFLAGS)
 AC_SUBST(USE_UPNP)
@@ -816,6 +815,16 @@ AC_SUBST(MINIUPNPC_LIBS)
 AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
 AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
 AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-config.sh])
+
+dnl boost's m4 checks do something really nasty: they export these vars. As a
+dnl result, they leak into secp256k1's configure and crazy things happen.
+dnl Until this is fixed upstream and we've synced, we'll just un-export them.
+export -n CPPFLAGS
+export -n LIBS
+export -n LDFLAGS
+ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
+AC_CONFIG_SUBDIRS([src/secp256k1])
+
 AC_OUTPUT
 
 dnl Taken from https://wiki.debian.org/RpathIssue
diff --git a/src/Makefile.am b/src/Makefile.am
index 3da833d7333f..517bded3693b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,5 @@
 AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
 
-if USE_LIBSECP256K1
-secp256k1/libsecp256k1.la: $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
-	@$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-endif
 
 if EMBEDDED_LEVELDB
 LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -23,9 +19,7 @@ endif
 BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
 BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
 
-if USE_LIBSECP256K1
 BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
-endif
 
 LIBBITCOIN_SERVER=libbitcoin_server.a
 LIBBITCOIN_WALLET=libbitcoin_wallet.a
@@ -35,6 +29,10 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
 LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
 LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
 LIBBITCOINQT=qt/libbitcoinqt.a
+LIBSECP256K1=secp256k1/libsecp256k1.la
+
+$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+	@$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
 
 # Make is not made aware of per-object dependencies to avoid limiting building parallelization
 # But to build the less dependent modules first, we manually select their order here:
@@ -281,11 +279,8 @@ bitcoind_LDADD = \
   $(LIBBITCOIN_UTIL) \
   $(LIBBITCOIN_CRYPTO) \
   $(LIBLEVELDB) \
-  $(LIBMEMENV)
-
-if USE_LIBSECP256K1
-  bitcoind_LDADD += secp256k1/libsecp256k1.la
-endif
+  $(LIBMEMENV) \
+  $(LIBSECP256K1)
 
 if ENABLE_WALLET
 bitcoind_LDADD += libbitcoin_wallet.a
@@ -312,9 +307,6 @@ bitcoin_cli_LDADD = \
 bitcoin_cli_SOURCES = \
   bitcoin-cli.cpp
 
-if USE_LIBSECP256K1
-  bitcoin_cli_LDADD += secp256k1/libsecp256k1.la
-endif
 bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
@@ -323,13 +315,9 @@ bitcoin_tx_LDADD = \
   $(LIBBITCOIN_UNIVALUE) \
   $(LIBBITCOIN_COMMON) \
   $(LIBBITCOIN_UTIL) \
-  $(LIBBITCOIN_CRYPTO)
-
-if USE_LIBSECP256K1
-  bitcoin_tx_LDADD += secp256k1/libsecp256k1.la
-endif
-
-  bitcoin_tx_LDADD += $(BOOST_LIBS) \
+  $(LIBBITCOIN_CRYPTO) \
+  $(LIBSECP256K1) \
+  $(BOOST_LIBS) \
   $(CRYPTO_LIBS)
 
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index ac6d60df03cd..fac214bdcaa0 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -360,10 +360,7 @@ if ENABLE_WALLET
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-if USE_LIBSECP256K1
-  qt_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
-endif
+  $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
 qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
 
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 064b531b9353..622411ca686d 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -32,10 +32,7 @@ qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
-  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-if USE_LIBSECP256K1
-  qt_test_test_bitcoin_qt_LDADD += secp256k1/libsecp256k1.la
-endif
+  $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
 qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 6a8d9e58a4b6..da5c746cc21d 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -80,15 +80,11 @@ endif
 test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
 test_test_bitcoin_CPPFLAGS = $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
 test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
-  $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB)
+  $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
 if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
 
-if USE_LIBSECP256K1
-  test_test_bitcoin_LDADD += secp256k1/libsecp256k1.la
-endif
-
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
 

From 4c97c64bf68a8e57c84fc00a97d16723cf828a0a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 09:43:44 -0800
Subject: [PATCH 1033/1819] Do not use EC code in global constructors

---
 src/test/script_tests.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index ede13b23c292..d98154571b80 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -175,7 +175,6 @@ struct KeyData
     }
 };
 
-const KeyData keys;
 
 class TestBuilder
 {
@@ -317,6 +316,8 @@ class TestBuilder
 
 BOOST_AUTO_TEST_CASE(script_build)
 {
+    const KeyData keys;
+
     std::vector<TestBuilder> good;
     std::vector<TestBuilder> bad;
 

From dffb8f81b83e1a10100365c696d6a04fc6344728 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 09:47:06 -0800
Subject: [PATCH 1034/1819] Use libsecp256k1 in key.cpp

---
 src/key.cpp | 71 +++++------------------------------------------------
 1 file changed, 6 insertions(+), 65 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 0ca9a681a3ba..76256b864ce9 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -9,21 +9,16 @@
 #include "pubkey.h"
 #include "random.h"
 
-#ifdef USE_SECP256K1
 #include <secp256k1.h>
-#else
 #include "ecwrapper.h"
-#endif
 
 //! anonymous namespace
 namespace {
 
-#ifdef USE_SECP256K1
-#include <secp256k1.h>
 class CSecp256k1Init {
 public:
     CSecp256k1Init() {
-        secp256k1_start();
+        secp256k1_start(SECP256K1_START_SIGN);
     }
     ~CSecp256k1Init() {
         secp256k1_stop();
@@ -31,7 +26,6 @@ class CSecp256k1Init {
 };
 static CSecp256k1Init instance_of_csecp256k1;
 
-#endif
 } // anon namespace
 
 bool CKey::Check(const unsigned char *vch) {
@@ -47,15 +41,8 @@ void CKey::MakeNewKey(bool fCompressedIn) {
 }
 
 bool CKey::SetPrivKey(const CPrivKey &privkey, bool fCompressedIn) {
-#ifdef USE_SECP256K1
-    if (!secp256k1_ecdsa_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
-        return false;
-#else
-    CECKey key;
-    if (!key.SetPrivKey(&privkey[0], privkey.size()))
+    if (!secp256k1_ec_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
         return false;
-    key.GetSecretBytes(vch);
-#endif
     fCompressed = fCompressedIn;
     fValid = true;
     return true;
@@ -65,39 +52,21 @@ CPrivKey CKey::GetPrivKey() const {
     assert(fValid);
     CPrivKey privkey;
     int privkeylen, ret;
-#ifdef USE_SECP256K1
     privkey.resize(279);
     privkeylen = 279;
-    ret = secp256k1_ecdsa_privkey_export(begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
+    ret = secp256k1_ec_privkey_export(begin(), (unsigned char*)&privkey[0], &privkeylen, fCompressed);
     assert(ret);
     privkey.resize(privkeylen);
-#else
-    CECKey key;
-    key.SetSecretBytes(vch);
-    privkeylen = key.GetPrivKeySize(fCompressed);
-    assert(privkeylen);
-    privkey.resize(privkeylen);
-    ret = key.GetPrivKey(&privkey[0], fCompressed);
-    assert(ret == (int)privkey.size());
-#endif
     return privkey;
 }
 
 CPubKey CKey::GetPubKey() const {
     assert(fValid);
     CPubKey result;
-#ifdef USE_SECP256K1
     int clen = 65;
-    int ret = secp256k1_ecdsa_pubkey_create((unsigned char*)result.begin(), &clen, begin(), fCompressed);
+    int ret = secp256k1_ec_pubkey_create((unsigned char*)result.begin(), &clen, begin(), fCompressed);
     assert((int)result.size() == clen);
     assert(ret);
-#else
-    std::vector<unsigned char> pubkey;
-    CECKey key;
-    key.SetSecretBytes(vch);
-    key.GetPubKey(pubkey, fCompressed);
-    result.Set(pubkey.begin(), pubkey.end());
-#endif
     assert(result.IsValid());
     return result;
 }
@@ -105,7 +74,6 @@ CPubKey CKey::GetPubKey() const {
 bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     if (!fValid)
         return false;
-#ifdef USE_SECP256K1
     vchSig.resize(72);
     int nSigLen = 72;
     CKey nonce;
@@ -116,11 +84,6 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     } while(true);
     vchSig.resize(nSigLen);
     return true;
-#else
-    CECKey key;
-    key.SetSecretBytes(vch);
-    return key.Sign(hash, vchSig);
-#endif
 }
 
 bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
@@ -128,34 +91,20 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig)
         return false;
     vchSig.resize(65);
     int rec = -1;
-#ifdef USE_SECP256K1
     CKey nonce;
     do {
         nonce.MakeNewKey(true);
         if (secp256k1_ecdsa_sign_compact((const unsigned char*)&hash, 32, &vchSig[1], begin(), nonce.begin(), &rec))
             break;
     } while(true);
-#else
-    CECKey key;
-    key.SetSecretBytes(vch);
-    if (!key.SignCompact(hash, &vchSig[1], rec))
-        return false;
-#endif
     assert(rec != -1);
     vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);
     return true;
 }
 
 bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
-#ifdef USE_SECP256K1
-    if (!secp256k1_ecdsa_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
-        return false;
-#else
-    CECKey key;
-    if (!key.SetPrivKey(&privkey[0], privkey.size(), fSkipCheck))
+    if (!secp256k1_ec_privkey_import((unsigned char*)begin(), &privkey[0], privkey.size()))
         return false;
-    key.GetSecretBytes(vch);
-#endif
     fCompressed = vchPubKey.IsCompressed();
     fValid = true;
 
@@ -182,12 +131,8 @@ bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild
         BIP32Hash(cc, nChild, 0, begin(), out);
     }
     memcpy(ccChild, out+32, 32);
-#ifdef USE_SECP256K1
     memcpy((unsigned char*)keyChild.begin(), begin(), 32);
-    bool ret = secp256k1_ecdsa_privkey_tweak_add((unsigned char*)keyChild.begin(), out);
-#else
-    bool ret = CECKey::TweakSecret((unsigned char*)keyChild.begin(), begin(), out);
-#endif
+    bool ret = secp256k1_ec_privkey_tweak_add((unsigned char*)keyChild.begin(), out);
     UnlockObject(out);
     keyChild.fCompressed = true;
     keyChild.fValid = ret;
@@ -245,9 +190,5 @@ void CExtKey::Decode(const unsigned char code[74]) {
 }
 
 bool ECC_InitSanityCheck() {
-#ifdef USE_SECP256K1
-    return true;
-#else
     return CECKey::SanityCheck();
-#endif
 }

From cf61b5441bd6d7232a50f66f28c1b5c6bbdb1570 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 5 Nov 2014 11:48:11 -0800
Subject: [PATCH 1035/1819] Don't use bashisms in configure

---
 configure.ac | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 89b856e664e2..6fdcc22b473d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -819,9 +819,8 @@ AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-
 dnl boost's m4 checks do something really nasty: they export these vars. As a
 dnl result, they leak into secp256k1's configure and crazy things happen.
 dnl Until this is fixed upstream and we've synced, we'll just un-export them.
-export -n CPPFLAGS
-export -n LIBS
-export -n LDFLAGS
+unset CPPFLAGS
+unset LDFLAGS
 ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
 AC_CONFIG_SUBDIRS([src/secp256k1])
 

From ff1e5ba8c75254ccfb08f408c607e98859d88a74 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 5 Nov 2014 19:59:29 -0500
Subject: [PATCH 1036/1819] depends: add gmp package

---
 depends/packages/gmp.mk                       | 30 +++++++++++++++++++
 depends/packages/packages.mk                  |  2 +-
 depends/patches/gmp/arm_gmp_build_fix.patch   | 21 +++++++++++++
 .../patches/gmp/darwin_gmp_build_fix.patch    | 29 ++++++++++++++++++
 4 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 depends/packages/gmp.mk
 create mode 100644 depends/patches/gmp/arm_gmp_build_fix.patch
 create mode 100644 depends/patches/gmp/darwin_gmp_build_fix.patch

diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk
new file mode 100644
index 000000000000..bcbf50ceaede
--- /dev/null
+++ b/depends/packages/gmp.mk
@@ -0,0 +1,30 @@
+package=gmp
+$(package)_version=6.0.0a
+$(package)_download_path=https://gmplib.org/download/gmp
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf
+$(package)_patches=arm_gmp_build_fix.patch darwin_gmp_build_fix.patch
+
+define $(package)_preprocess_cmds
+  patch -p1 < $($(package)_patch_dir)/arm_gmp_build_fix.patch && \
+  patch -p1 < $($(package)_patch_dir)/darwin_gmp_build_fix.patch
+endef
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-shared CC_FOR_BUILD=$(build_CC)
+  $(package)_config_opts_x86_64_darwin=--with-pic
+  $(package)_config_opts_x86_64_linux=--with-pic
+  $(package)_config_opts_arm_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 260cadb214b8..0e1fbeffaae4 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -1,4 +1,4 @@
-packages:=boost openssl
+packages:=boost openssl gmp
 native_packages := native_ccache native_comparisontool
 
 qt_native_packages = native_protobuf
diff --git a/depends/patches/gmp/arm_gmp_build_fix.patch b/depends/patches/gmp/arm_gmp_build_fix.patch
new file mode 100644
index 000000000000..666cf58cf69c
--- /dev/null
+++ b/depends/patches/gmp/arm_gmp_build_fix.patch
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1396602422 -7200
+# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40
+# Parent  0194a75b56b21a9196626430af86c5bd9110c42d
+Conditionalise ARM asm on !__thumb__.
+
+diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c
+--- a/mpn/generic/div_qr_1n_pi1.c	Thu Apr 03 23:58:51 2014 +0200
++++ b/mpn/generic/div_qr_1n_pi1.c	Fri Apr 04 11:07:02 2014 +0200
+@@ -130,7 +130,7 @@
+ 	     "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC)
+ #endif
+ 
+-#if defined (__arm__) && W_TYPE_SIZE == 32
++#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
+ #define add_mssaaaa(m, sh, sl, ah, al, bh, bl)				\
+   __asm__ (  "adds	%2, %5, %6\n\t"					\
+ 	     "adcs	%1, %3, %4\n\t"					\
+
diff --git a/depends/patches/gmp/darwin_gmp_build_fix.patch b/depends/patches/gmp/darwin_gmp_build_fix.patch
new file mode 100644
index 000000000000..b9cfd80e778a
--- /dev/null
+++ b/depends/patches/gmp/darwin_gmp_build_fix.patch
@@ -0,0 +1,29 @@
+
+# HG changeset patch
+# User Torbjorn Granlund <tege@gmplib.org>
+# Date 1396470504 -7200
+# Node ID 1fab0adc5ff7d9ecddcbda96f407da58347bb49c
+# Parent  db645603dcdb41afcf78b19b551ecd5a01c3841c
+Workaround for Darwin assembler quirk.
+
+diff -r db645603dcdb -r 1fab0adc5ff7 mpn/x86_64/k8/redc_1.asm
+--- a/mpn/x86_64/k8/redc_1.asm	Mon Mar 31 23:04:32 2014 +0200
++++ b/mpn/x86_64/k8/redc_1.asm	Wed Apr 02 22:28:24 2014 +0200
+@@ -114,7 +114,7 @@
+ 
+ 	JUMPTABSECT
+ 	ALIGN(8)
+-L(tab):	JMPENT(	L(0m4), L(tab))
++L(tab):	JMPENT(	L(0), L(tab))
+ 	JMPENT(	L(1), L(tab))
+ 	JMPENT(	L(2), L(tab))
+ 	JMPENT(	L(3), L(tab))
+@@ -397,6 +397,7 @@
+ 
+ 
+ 	ALIGN(16)
++L(0):
+ L(0m4):
+ L(lo0):	mov	(mp,nneg,8), %rax
+ 	mov	nneg, i
+

From 54566de29d988a201a6fe2ae6b2b8d54e13bd780 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 5 Nov 2014 20:00:34 -0500
Subject: [PATCH 1037/1819] depends: quit exporting in config.site

---
 depends/config.site.in | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/depends/config.site.in b/depends/config.site.in
index df076956bd3e..873f66018d11 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -48,32 +48,37 @@ if test x@host_os@ = xmingw32; then
   fi
 fi
 
-export PATH=$prefix/native/bin:$PATH
-export PKG_CONFIG="`which pkg-config` --static"
+PATH=$prefix/native/bin:$PATH
+PKG_CONFIG="`which pkg-config` --static"
+
+# These two need to remain exported because pkg-config does not see them
+# otherwise. That means they must be unexported at the end of configure.ac to
+# avoid ruining the cache. Sigh.
+
 export PKG_CONFIG_LIBDIR=$prefix/lib/pkgconfig
 export PKG_CONFIG_PATH=$prefix/share/pkgconfig
 
-export CPPFLAGS="-I$prefix/include/ $CPPFLAGS"
-export LDFLAGS="-L$prefix/lib $LDFLAGS"
+CPPFLAGS="-I$prefix/include/ $CPPFLAGS"
+LDFLAGS="-L$prefix/lib $LDFLAGS"
 
-export CC="@CC@"
-export CXX="@CXX@"
-export OBJC="${CC}"
-export OBJCXX="${CXX}"
-export CCACHE=$prefix/native/bin/ccache
+CC="@CC@"
+CXX="@CXX@"
+OBJC="${CC}"
+OBJCXX="${CXX}"
+CCACHE=$prefix/native/bin/ccache
 
 if test -n "@AR@"; then
-  export AR=@AR@
+  AR=@AR@
   ac_cv_path_ac_pt_AR=${AR}
 fi
 
 if test -n "@RANLIB@"; then
-  export RANLIB=@RANLIB@
+  RANLIB=@RANLIB@
   ac_cv_path_ac_pt_RANLIB=${RANLIB}
 fi
 
 if test -n "@NM@"; then
-  export NM=@NM@
+  NM=@NM@
   ac_cv_path_ac_pt_NM=${NM}
 fi
 
@@ -82,14 +87,14 @@ if test -n "@debug@"; then
 fi
 
 if test -n "@CFLAGS@"; then
-  export CFLAGS="@CFLAGS@ $CFLAGS"
+  CFLAGS="@CFLAGS@ $CFLAGS"
 fi
 if test -n "@CXXFLAGS@"; then
-  export CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
+  CXXFLAGS="@CXXFLAGS@ $CXXFLAGS"
 fi
 if test -n "@CPPFLAGS@"; then
-  export CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
+  CPPFLAGS="@CPPFLAGS@ $CPPFLAGS"
 fi
 if test -n "@LDFLAGS@"; then
-  export LDFLAGS="@LDFLAGS@ $LDFLAGS"
+  LDFLAGS="@LDFLAGS@ $LDFLAGS"
 fi

From 0dc8613864052172447d32338f4492669918cefa Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 5 Nov 2014 20:01:42 -0500
Subject: [PATCH 1038/1819] build: fixup configure to not export anything

---
 configure.ac | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6fdcc22b473d..4904dd72cacd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,7 +255,6 @@ case $host in
          qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
          if test x$openssl_prefix != x; then
            PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-           export PKG_CONFIG_PATH
          fi
          if test x$bdb_prefix != x; then
            CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
@@ -263,7 +262,6 @@ case $host in
          fi
          if test x$qt5_prefix != x; then
            PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
-           export PKG_CONFIG_PATH
          fi
        fi
      else
@@ -819,8 +817,26 @@ AC_CONFIG_FILES([qa/pull-tester/tests-config.sh],[chmod +x qa/pull-tester/tests-
 dnl boost's m4 checks do something really nasty: they export these vars. As a
 dnl result, they leak into secp256k1's configure and crazy things happen.
 dnl Until this is fixed upstream and we've synced, we'll just un-export them.
+CPPFLAGS_TEMP="$CPPFLAGS"
 unset CPPFLAGS
+CPPFLAGS="$CPPFLAGS_TEMP"
+
+LDFLAGS_TEMP="$LDFLAGS"
 unset LDFLAGS
+LDFLAGS="$LDFLAGS_TEMP"
+
+LIBS_TEMP="$LIBS"
+unset LIBS
+LIBS="$LIBS_TEMP"
+
+PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"
+unset PKG_CONFIG_PATH
+PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP"
+
+PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+unset PKG_CONFIG_LIBDIR
+PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
 ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
 AC_CONFIG_SUBDIRS([src/secp256k1])
 

From 4300876c81c03f90a6f1dfca675e74bc0bcf46a5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 5 Nov 2014 20:56:45 -0500
Subject: [PATCH 1039/1819] build: secp256k1 as a subdir, since it's required

---
 src/Makefile.am           | 7 ++++---
 src/Makefile.test.include | 3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 517bded3693b..556fd49c0ba1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,4 @@
+DIST_SUBDIRS = secp256k1
 AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
 
 
@@ -32,7 +33,7 @@ LIBBITCOINQT=qt/libbitcoinqt.a
 LIBSECP256K1=secp256k1/libsecp256k1.la
 
 $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
-	@$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
+	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
 
 # Make is not made aware of per-object dependencies to avoid limiting building parallelization
 # But to build the less dependent modules first, we manually select their order here:
@@ -334,11 +335,11 @@ CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
 DISTCLEANFILES = obj/build.h
 
-EXTRA_DIST = leveldb secp256k1
+EXTRA_DIST = leveldb
 
 clean-local:
 	-$(MAKE) -C leveldb clean
-	-$(MAKE) -C secp256k1 clean 2>/dev/null
+	-$(MAKE) -C secp256k1 clean
 	rm -f leveldb/*/*.gcno leveldb/helpers/memenv/*.gcno
 	-rm -f config.h
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index da5c746cc21d..79509c9a3edc 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -104,6 +104,9 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
 bitcoin_test_clean : FORCE
 	rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
 
+check-local:
+	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
+
 %.json.h: %.json
 	@$(MKDIR_P) $(@D)
 	@echo "namespace json_tests{" > $@

From f9e40fb075aa639094213c47e135b2c363e2dc4c Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 6 Nov 2014 15:40:39 -0500
Subject: [PATCH 1040/1819] revert part of 9eda1620b

This probably would've broken native OSX builds
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 4904dd72cacd..c0489f5be7d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -255,6 +255,7 @@ case $host in
          qt5_prefix=`$BREW --prefix qt5 2>/dev/null`
          if test x$openssl_prefix != x; then
            PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           export PKG_CONFIG_PATH
          fi
          if test x$bdb_prefix != x; then
            CPPFLAGS="$CPPFLAGS -I$bdb_prefix/include"
@@ -262,6 +263,7 @@ case $host in
          fi
          if test x$qt5_prefix != x; then
            PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           export PKG_CONFIG_PATH
          fi
        fi
      else

From a48f2d6ddd8a438a126bfb7940d993f2da598476 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 19 Oct 2014 23:09:50 +0000
Subject: [PATCH 1041/1819] Abstract context-dependent block checking from
 acceptance

---
 src/main.cpp | 124 +++++++++++++++++++++++++++++----------------------
 src/main.h   |   4 ++
 2 files changed, 75 insertions(+), 53 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 82d52913a00a..2781c6f3fb41 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2334,6 +2334,73 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     return true;
 }
 
+bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex * const pindexPrev)
+{
+    uint256 hash = block.GetHash();
+    if (hash == Params().HashGenesisBlock())
+        return true;
+
+    assert(pindexPrev);
+
+    int nHeight = pindexPrev->nHeight+1;
+
+    // Check proof of work
+    if ((!Params().SkipProofOfWorkCheck()) &&
+       (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
+        return state.DoS(100, error("%s : incorrect proof of work", __func__),
+                         REJECT_INVALID, "bad-diffbits");
+
+    // Check timestamp against prev
+    if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())
+        return state.Invalid(error("%s : block's timestamp is too early", __func__),
+                             REJECT_INVALID, "time-too-old");
+
+    // Check that the block chain matches the known block chain up to a checkpoint
+    if (!Checkpoints::CheckBlock(nHeight, hash))
+        return state.DoS(100, error("%s : rejected by checkpoint lock-in at %d", __func__, nHeight),
+                         REJECT_CHECKPOINT, "checkpoint mismatch");
+
+    // Don't accept any forks from the main chain prior to last checkpoint
+    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
+    if (pcheckpoint && nHeight < pcheckpoint->nHeight)
+        return state.DoS(100, error("%s : forked chain older than last checkpoint (height %d)", __func__, nHeight));
+
+    // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
+    if (block.nVersion < 2 && 
+        CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
+    {
+        return state.Invalid(error("%s : rejected nVersion=1 block", __func__),
+                             REJECT_OBSOLETE, "bad-version");
+    }
+
+    return true;
+}
+
+bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex * const pindexPrev)
+{
+    const int nHeight = pindexPrev == NULL ? 0 : pindexPrev->nHeight + 1;
+
+    // Check that all transactions are finalized
+    BOOST_FOREACH(const CTransaction& tx, block.vtx)
+        if (!IsFinalTx(tx, nHeight, block.GetBlockTime())) {
+            return state.DoS(10, error("%s : contains a non-final transaction", __func__), REJECT_INVALID, "bad-txns-nonfinal");
+        }
+
+    // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
+    // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
+    if (block.nVersion >= 2 && 
+        CBlockIndex::IsSuperMajority(2, pindexPrev, Params().EnforceBlockUpgradeMajority()))
+    {
+        CScript expect = CScript() << nHeight;
+        if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
+            !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
+            return state.DoS(100, error("%s : block height mismatch in coinbase", __func__), REJECT_INVALID, "bad-cb-height");
+        }
+    }
+
+    return true;
+}
+
 bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex** ppindex)
 {
     AssertLockHeld(cs_main);
@@ -2353,44 +2420,16 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
 
     // Get prev block index
     CBlockIndex* pindexPrev = NULL;
-    int nHeight = 0;
     if (hash != Params().HashGenesisBlock()) {
         BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
         if (mi == mapBlockIndex.end())
             return state.DoS(10, error("%s : prev block not found", __func__), 0, "bad-prevblk");
         pindexPrev = (*mi).second;
-        nHeight = pindexPrev->nHeight+1;
-
-        // Check proof of work
-        if ((!Params().SkipProofOfWorkCheck()) &&
-           (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
-            return state.DoS(100, error("%s : incorrect proof of work", __func__),
-                             REJECT_INVALID, "bad-diffbits");
-
-        // Check timestamp against prev
-        if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())
-            return state.Invalid(error("%s : block's timestamp is too early", __func__),
-                                 REJECT_INVALID, "time-too-old");
-
-        // Check that the block chain matches the known block chain up to a checkpoint
-        if (!Checkpoints::CheckBlock(nHeight, hash))
-            return state.DoS(100, error("%s : rejected by checkpoint lock-in at %d", __func__, nHeight),
-                             REJECT_CHECKPOINT, "checkpoint mismatch");
-
-        // Don't accept any forks from the main chain prior to last checkpoint
-        CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
-        if (pcheckpoint && nHeight < pcheckpoint->nHeight)
-            return state.DoS(100, error("%s : forked chain older than last checkpoint (height %d)", __func__, nHeight));
-
-        // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
-        if (block.nVersion < 2 && 
-            CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
-        {
-            return state.Invalid(error("%s : rejected nVersion=1 block", __func__),
-                                 REJECT_OBSOLETE, "bad-version");
-        }
     }
 
+    if (!ContextualCheckBlockHeader(block, state, pindexPrev))
+        return false;
+
     if (pindex == NULL)
         pindex = AddToBlockIndex(block);
 
@@ -2415,7 +2454,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
         return true;
     }
 
-    if (!CheckBlock(block, state)) {
+    if ((!CheckBlock(block, state)) || !ContextualCheckBlock(block, state, pindex->pprev)) {
         if (state.IsInvalid() && !state.CorruptionPossible()) {
             pindex->nStatus |= BLOCK_FAILED_VALID;
         }
@@ -2424,27 +2463,6 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
 
     int nHeight = pindex->nHeight;
 
-    // Check that all transactions are finalized
-    BOOST_FOREACH(const CTransaction& tx, block.vtx)
-        if (!IsFinalTx(tx, nHeight, block.GetBlockTime())) {
-            pindex->nStatus |= BLOCK_FAILED_VALID;
-            return state.DoS(10, error("AcceptBlock() : contains a non-final transaction"),
-                             REJECT_INVALID, "bad-txns-nonfinal");
-        }
-
-    // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
-    // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
-    if (block.nVersion >= 2 && 
-        CBlockIndex::IsSuperMajority(2, pindex->pprev, Params().EnforceBlockUpgradeMajority()))
-    {
-        CScript expect = CScript() << nHeight;
-        if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
-            !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
-            pindex->nStatus |= BLOCK_FAILED_VALID;
-            return state.DoS(100, error("AcceptBlock() : block height mismatch in coinbase"), REJECT_INVALID, "bad-cb-height");
-        }
-    }
-
     // Write block to history file
     try {
         unsigned int nBlockSize = ::GetSerializeSize(block, SER_DISK, CLIENT_VERSION);
diff --git a/src/main.h b/src/main.h
index 1bb091981746..6e684be8c0e4 100644
--- a/src/main.h
+++ b/src/main.h
@@ -463,6 +463,10 @@ bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, C
 bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
 bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
 
+// Context-dependent validity checks
+bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex *pindexPrev);
+bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex *pindexPrev);
+
 // Store block on disk
 // if dbp is provided, the file is known to already reside on disk
 bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex **pindex, CDiskBlockPos* dbp = NULL);

From 4ea1be7fb84a397222754473c2bc315e3665ff18 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Thu, 16 Oct 2014 03:50:33 +0000
Subject: [PATCH 1042/1819] CreateNewBlock and miner_tests: Also check
 generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader,
 CheckBlock, and ContextualCheckBlock

---
 src/miner.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/miner.cpp b/src/miner.cpp
index b5bfa9c7be71..d7ecd5e40e32 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -326,8 +326,17 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         indexDummy.nHeight = pindexPrev->nHeight + 1;
         CCoinsViewCache viewNew(pcoinsTip);
         CValidationState state;
+        // NOTE: CheckBlockHeader is called by CheckBlock
+        if (!ContextualCheckBlockHeader(*pblock, state, pindexPrev))
+            throw std::runtime_error("CreateNewBlock() : ContextualCheckBlockHeader failed");
+        if (!CheckBlock(*pblock, state, false, false))
+            throw std::runtime_error("CreateNewBlock() : CheckBlock failed");
+        if (!ContextualCheckBlock(*pblock, state, pindexPrev))
+            throw std::runtime_error("CreateNewBlock() : ContextualCheckBlock failed");
         if (!ConnectBlock(*pblock, state, &indexDummy, viewNew, true))
             throw std::runtime_error("CreateNewBlock() : ConnectBlock failed");
+        if (!state.IsValid())
+            throw std::runtime_error("CreateNewBlock() : State is not valid");
     }
 
     return pblocktemplate.release();

From df08a626e0440457ae0d1966439fd956c27ae2fe Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 20 Oct 2014 02:10:03 +0000
Subject: [PATCH 1043/1819] TestBlockValidity function for CBlock proposals
 (used by CreateNewBlock)

---
 src/main.cpp  | 26 +++++++++++++++++++++++++-
 src/main.h    |  5 ++++-
 src/miner.cpp | 17 ++---------------
 3 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2781c6f3fb41..fda71a365dd3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1593,7 +1593,7 @@ static int64_t nTimeIndex = 0;
 static int64_t nTimeCallbacks = 0;
 static int64_t nTimeTotal = 0;
 
-bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck)
+bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& view, bool fJustCheck)
 {
     AssertLockHeld(cs_main);
     // Check it again in case a previous version let a bad block in
@@ -2573,6 +2573,30 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
     return true;
 }
 
+bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex * const pindexPrev, bool fCheckPOW, bool fCheckMerkleRoot)
+{
+    AssertLockHeld(cs_main);
+    assert(pindexPrev == chainActive.Tip());
+
+    CCoinsViewCache viewNew(pcoinsTip);
+    CBlockIndex indexDummy(block);
+    indexDummy.pprev = pindexPrev;
+    indexDummy.nHeight = pindexPrev->nHeight + 1;
+
+    // NOTE: CheckBlockHeader is called by CheckBlock
+    if (!ContextualCheckBlockHeader(block, state, pindexPrev))
+        return false;
+    if (!CheckBlock(block, state, fCheckPOW, fCheckMerkleRoot))
+        return false;
+    if (!ContextualCheckBlock(block, state, pindexPrev))
+        return false;
+    if (!ConnectBlock(block, state, &indexDummy, viewNew, true))
+        return false;
+    assert(state.IsValid());
+
+    return true;
+}
+
 
 
 
diff --git a/src/main.h b/src/main.h
index 6e684be8c0e4..b49f0a06ebba 100644
--- a/src/main.h
+++ b/src/main.h
@@ -457,7 +457,7 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
 bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);
 
 // Apply the effects of this block (with given index) on the UTXO set represented by coins
-bool ConnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
+bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
 
 // Context-independent validity checks
 bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
@@ -467,6 +467,9 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = t
 bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex *pindexPrev);
 bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex *pindexPrev);
 
+// Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held)
+bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex *pindexPrev, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
+
 // Store block on disk
 // if dbp is provided, the file is known to already reside on disk
 bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex **pindex, CDiskBlockPos* dbp = NULL);
diff --git a/src/miner.cpp b/src/miner.cpp
index d7ecd5e40e32..200498d109aa 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -321,22 +321,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         pblock->nNonce         = 0;
         pblocktemplate->vTxSigOps[0] = GetLegacySigOpCount(pblock->vtx[0]);
 
-        CBlockIndex indexDummy(*pblock);
-        indexDummy.pprev = pindexPrev;
-        indexDummy.nHeight = pindexPrev->nHeight + 1;
-        CCoinsViewCache viewNew(pcoinsTip);
         CValidationState state;
-        // NOTE: CheckBlockHeader is called by CheckBlock
-        if (!ContextualCheckBlockHeader(*pblock, state, pindexPrev))
-            throw std::runtime_error("CreateNewBlock() : ContextualCheckBlockHeader failed");
-        if (!CheckBlock(*pblock, state, false, false))
-            throw std::runtime_error("CreateNewBlock() : CheckBlock failed");
-        if (!ContextualCheckBlock(*pblock, state, pindexPrev))
-            throw std::runtime_error("CreateNewBlock() : ContextualCheckBlock failed");
-        if (!ConnectBlock(*pblock, state, &indexDummy, viewNew, true))
-            throw std::runtime_error("CreateNewBlock() : ConnectBlock failed");
-        if (!state.IsValid())
-            throw std::runtime_error("CreateNewBlock() : State is not valid");
+        if (!TestBlockValidity(state, *pblock, pindexPrev, false, false))
+            throw std::runtime_error("CreateNewBlock() : TestBlockValidity failed");
     }
 
     return pblocktemplate.release();

From 132ea9b48f65dcb4784a7e9688f3b194d5578c80 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Thu, 30 Oct 2014 04:26:31 +0000
Subject: [PATCH 1044/1819] miner_tests: Disable checkpoints so they don't fail
 the subsidy-change test

---
 src/test/miner_tests.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index 032ae983ce35..1caee13c3362 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -56,6 +56,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
     uint256 hash;
 
     LOCK(cs_main);
+    Checkpoints::fEnabled = false;
 
     // Simple block creation, nothing special yet:
     BOOST_CHECK(pblocktemplate = CreateNewBlock(scriptPubKey));
@@ -258,6 +259,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
     BOOST_FOREACH(CTransaction *tx, txFirst)
         delete tx;
 
+    Checkpoints::fEnabled = true;
 }
 
 BOOST_AUTO_TEST_SUITE_END()

From 3dcbb9b6b488f077d4ab7e4296dffbf3aea4a0fb Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Thu, 30 Oct 2014 02:56:33 +0000
Subject: [PATCH 1045/1819] Abstract DecodeHexBlk and BIP22ValidationResult
 functions out of submitblock

---
 src/core_io.h     |  2 ++
 src/core_read.cpp | 18 ++++++++++++++++++
 src/rpcmining.cpp | 42 +++++++++++++++++++++---------------------
 3 files changed, 41 insertions(+), 21 deletions(-)

diff --git a/src/core_io.h b/src/core_io.h
index 94848f1c3da1..8777aa3b8509 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -8,6 +8,7 @@
 #include <string>
 #include <vector>
 
+class CBlock;
 class CScript;
 class CTransaction;
 class uint256;
@@ -16,6 +17,7 @@ class UniValue;
 // core_read.cpp
 extern CScript ParseScript(std::string s);
 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
+extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
 extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
 extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
 
diff --git a/src/core_read.cpp b/src/core_read.cpp
index d39bc9a78089..42e2f8d2003a 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -4,6 +4,7 @@
 
 #include "core_io.h"
 
+#include "core/block.h"
 #include "core/transaction.h"
 #include "script/script.h"
 #include "serialize.h"
@@ -108,6 +109,23 @@ bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx)
     return true;
 }
 
+bool DecodeHexBlk(CBlock& block, const std::string& strHexBlk)
+{
+    if (!IsHex(strHexBlk))
+        return false;
+
+    std::vector<unsigned char> blockData(ParseHex(strHexBlk));
+    CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION);
+    try {
+        ssBlock >> block;
+    }
+    catch (const std::exception &) {
+        return false;
+    }
+
+    return true;
+}
+
 uint256 ParseHashUV(const UniValue& v, const string& strName)
 {
     string strHex;
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 879a50411546..577f377796f3 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -283,6 +283,25 @@ Value prioritisetransaction(const Array& params, bool fHelp)
 }
 
 
+// NOTE: Assumes a conclusive result; if result is inconclusive, it must be handled by caller
+static Value BIP22ValidationResult(const CValidationState& state)
+{
+    if (state.IsValid())
+        return Value::null;
+
+    std::string strRejectReason = state.GetRejectReason();
+    if (state.IsError())
+        throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
+    if (state.IsInvalid())
+    {
+        if (strRejectReason.empty())
+            return "rejected";
+        return strRejectReason;
+    }
+    // Should be impossible
+    return "valid?";
+}
+
 Value getblocktemplate(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() > 1)
@@ -566,15 +585,9 @@ Value submitblock(const Array& params, bool fHelp)
             + HelpExampleRpc("submitblock", "\"mydata\"")
         );
 
-    vector<unsigned char> blockData(ParseHex(params[0].get_str()));
-    CDataStream ssBlock(blockData, SER_NETWORK, PROTOCOL_VERSION);
     CBlock pblock;
-    try {
-        ssBlock >> pblock;
-    }
-    catch (const std::exception &) {
+    if (!DecodeHexBlk(pblock, params[0].get_str()))
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
-    }
 
     CValidationState state;
     submitblock_StateCatcher sc(pblock.GetHash());
@@ -587,20 +600,7 @@ Value submitblock(const Array& params, bool fHelp)
             return "inconclusive";
         state = sc.state;
     }
-    if (state.IsError())
-    {
-        std::string strRejectReason = state.GetRejectReason();
-        throw JSONRPCError(RPC_VERIFY_ERROR, strRejectReason);
-    }
-    if (state.IsInvalid())
-    {
-        std::string strRejectReason = state.GetRejectReason();
-        if (strRejectReason.empty())
-            return "rejected";
-        return strRejectReason;
-    }
-
-    return Value::null;
+    return BIP22ValidationResult(state);
 }
 
 Value estimatefee(const Array& params, bool fHelp)

From 60d1ecd378d8aeb366da566d9c791399d77ffafc Mon Sep 17 00:00:00 2001
From: HarryWu <imharrywu@users.noreply.github.com>
Date: Wed, 19 Nov 2014 14:01:18 +0800
Subject: [PATCH 1046/1819] change nSubsidy's type from int64_t to CAmount

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2bff781bfa17..512df775d005 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1180,7 +1180,7 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
 
 CAmount GetBlockValue(int nHeight, const CAmount& nFees)
 {
-    int64_t nSubsidy = 50 * COIN;
+    CAmount nSubsidy = 50 * COIN;
     int halvings = nHeight / Params().SubsidyHalvingInterval();
 
     // Force block reward to zero when right shift is undefined.

From 230f7a833d52dcaa6eaeab46fe0a56a6487c86d1 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 19 Nov 2014 12:29:41 +0100
Subject: [PATCH 1047/1819] Remove unused ecwrapper code

---
 src/ecwrapper.cpp | 164 ----------------------------------------------
 src/ecwrapper.h   |   8 ---
 2 files changed, 172 deletions(-)

diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index 3377dce0c124..68cdbf2eda86 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -13,43 +13,6 @@
 
 namespace {
 
-// Generate a private key from just the secret parameter
-int EC_KEY_regenerate_key(EC_KEY *eckey, BIGNUM *priv_key)
-{
-    int ok = 0;
-    BN_CTX *ctx = NULL;
-    EC_POINT *pub_key = NULL;
-
-    if (!eckey) return 0;
-
-    const EC_GROUP *group = EC_KEY_get0_group(eckey);
-
-    if ((ctx = BN_CTX_new()) == NULL)
-        goto err;
-
-    pub_key = EC_POINT_new(group);
-
-    if (pub_key == NULL)
-        goto err;
-
-    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx))
-        goto err;
-
-    EC_KEY_set_private_key(eckey,priv_key);
-    EC_KEY_set_public_key(eckey,pub_key);
-
-    ok = 1;
-
-err:
-
-    if (pub_key)
-        EC_POINT_free(pub_key);
-    if (ctx != NULL)
-        BN_CTX_free(ctx);
-
-    return(ok);
-}
-
 // Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
 // recid selects which key is recovered
 // if check is non-zero, additional checks are performed
@@ -135,48 +98,6 @@ CECKey::~CECKey() {
     EC_KEY_free(pkey);
 }
 
-void CECKey::GetSecretBytes(unsigned char vch[32]) const {
-    const BIGNUM *bn = EC_KEY_get0_private_key(pkey);
-    assert(bn);
-    int nBytes = BN_num_bytes(bn);
-    int n=BN_bn2bin(bn,&vch[32 - nBytes]);
-    assert(n == nBytes);
-    memset(vch, 0, 32 - nBytes);
-}
-
-void CECKey::SetSecretBytes(const unsigned char vch[32]) {
-    bool ret;
-    BIGNUM bn;
-    BN_init(&bn);
-    ret = BN_bin2bn(vch, 32, &bn) != NULL;
-    assert(ret);
-    ret = EC_KEY_regenerate_key(pkey, &bn) != 0;
-    assert(ret);
-    BN_clear_free(&bn);
-}
-
-int CECKey::GetPrivKeySize(bool fCompressed) {
-    EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-    return i2d_ECPrivateKey(pkey, NULL);
-}
-int CECKey::GetPrivKey(unsigned char* privkey, bool fCompressed) {
-    EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
-    return i2d_ECPrivateKey(pkey, &privkey);
-}
-
-bool CECKey::SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck) {
-    if (d2i_ECPrivateKey(&pkey, &privkey, size)) {
-        if(fSkipCheck)
-            return true;
-
-        // d2i_ECPrivateKey returns true if parsing succeeds.
-        // This doesn't necessarily mean the key is valid.
-        if (EC_KEY_check_key(pkey))
-            return true;
-    }
-    return false;
-}
-
 void CECKey::GetPubKey(std::vector<unsigned char> &pubkey, bool fCompressed) {
     EC_KEY_set_conv_form(pkey, fCompressed ? POINT_CONVERSION_COMPRESSED : POINT_CONVERSION_UNCOMPRESSED);
     int nSize = i2o_ECPublicKey(pkey, NULL);
@@ -193,33 +114,6 @@ bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
     return o2i_ECPublicKey(&pkey, &pubkey, size) != NULL;
 }
 
-bool CECKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) {
-    vchSig.clear();
-    ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
-    if (sig == NULL)
-        return false;
-    BN_CTX *ctx = BN_CTX_new();
-    BN_CTX_start(ctx);
-    const EC_GROUP *group = EC_KEY_get0_group(pkey);
-    BIGNUM *order = BN_CTX_get(ctx);
-    BIGNUM *halforder = BN_CTX_get(ctx);
-    EC_GROUP_get_order(group, order, ctx);
-    BN_rshift1(halforder, order);
-    if (BN_cmp(sig->s, halforder) > 0) {
-        // enforce low S values, by negating the value (modulo the order) if above order/2.
-        BN_sub(sig->s, order, sig->s);
-    }
-    BN_CTX_end(ctx);
-    BN_CTX_free(ctx);
-    unsigned int nSize = ECDSA_size(pkey);
-    vchSig.resize(nSize); // Make sure it is big enough
-    unsigned char *pos = &vchSig[0];
-    nSize = i2d_ECDSA_SIG(sig, &pos);
-    ECDSA_SIG_free(sig);
-    vchSig.resize(nSize); // Shrink to fit actual size
-    return true;
-}
-
 bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
     // -1 = error, 0 = bad sig, 1 = good
     if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
@@ -227,37 +121,6 @@ bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSi
     return true;
 }
 
-bool CECKey::SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
-    bool fOk = false;
-    ECDSA_SIG *sig = ECDSA_do_sign((unsigned char*)&hash, sizeof(hash), pkey);
-    if (sig==NULL)
-        return false;
-    memset(p64, 0, 64);
-    int nBitsR = BN_num_bits(sig->r);
-    int nBitsS = BN_num_bits(sig->s);
-    if (nBitsR <= 256 && nBitsS <= 256) {
-        std::vector<unsigned char> pubkey;
-        GetPubKey(pubkey, true);
-        for (int i=0; i<4; i++) {
-            CECKey keyRec;
-            if (ECDSA_SIG_recover_key_GFp(keyRec.pkey, sig, (unsigned char*)&hash, sizeof(hash), i, 1) == 1) {
-                std::vector<unsigned char> pubkeyRec;
-                keyRec.GetPubKey(pubkeyRec, true);
-                if (pubkeyRec == pubkey) {
-                    rec = i;
-                    fOk = true;
-                    break;
-                }
-            }
-        }
-        assert(fOk);
-        BN_bn2bin(sig->r,&p64[32-(nBitsR+7)/8]);
-        BN_bn2bin(sig->s,&p64[64-(nBitsS+7)/8]);
-    }
-    ECDSA_SIG_free(sig);
-    return fOk;
-}
-
 bool CECKey::Recover(const uint256 &hash, const unsigned char *p64, int rec)
 {
     if (rec<0 || rec>=3)
@@ -270,33 +133,6 @@ bool CECKey::Recover(const uint256 &hash, const unsigned char *p64, int rec)
     return ret;
 }
 
-bool CECKey::TweakSecret(unsigned char vchSecretOut[32], const unsigned char vchSecretIn[32], const unsigned char vchTweak[32])
-{
-    bool ret = true;
-    BN_CTX *ctx = BN_CTX_new();
-    BN_CTX_start(ctx);
-    BIGNUM *bnSecret = BN_CTX_get(ctx);
-    BIGNUM *bnTweak = BN_CTX_get(ctx);
-    BIGNUM *bnOrder = BN_CTX_get(ctx);
-    EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);
-    EC_GROUP_get_order(group, bnOrder, ctx); // what a grossly inefficient way to get the (constant) group order...
-    BN_bin2bn(vchTweak, 32, bnTweak);
-    if (BN_cmp(bnTweak, bnOrder) >= 0)
-        ret = false; // extremely unlikely
-    BN_bin2bn(vchSecretIn, 32, bnSecret);
-    BN_add(bnSecret, bnSecret, bnTweak);
-    BN_nnmod(bnSecret, bnSecret, bnOrder, ctx);
-    if (BN_is_zero(bnSecret))
-        ret = false; // ridiculously unlikely
-    int nBits = BN_num_bits(bnSecret);
-    memset(vchSecretOut, 0, 32);
-    BN_bn2bin(bnSecret, &vchSecretOut[32-(nBits+7)/8]);
-    EC_GROUP_free(group);
-    BN_CTX_end(ctx);
-    BN_CTX_free(ctx);
-    return ret;
-}
-
 bool CECKey::TweakPublic(const unsigned char vchTweak[32]) {
     bool ret = true;
     BN_CTX *ctx = BN_CTX_new();
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index a7847d190c1e..30c3db79317f 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -21,16 +21,9 @@ class CECKey {
     CECKey();
     ~CECKey();
 
-    void GetSecretBytes(unsigned char vch[32]) const;
-    void SetSecretBytes(const unsigned char vch[32]);
-    int GetPrivKeySize(bool fCompressed);
-    int GetPrivKey(unsigned char* privkey, bool fCompressed);
-    bool SetPrivKey(const unsigned char* privkey, size_t size, bool fSkipCheck=false);
     void GetPubKey(std::vector<unsigned char>& pubkey, bool fCompressed);
     bool SetPubKey(const unsigned char* pubkey, size_t size);
-    bool Sign(const uint256 &hash, std::vector<unsigned char>& vchSig);
     bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig);
-    bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec);
 
     // reconstruct public key from a compact signature
     // This is only slightly more CPU intensive than just verifying it.
@@ -38,7 +31,6 @@ class CECKey {
     // (the signature is a valid signature of the given data for that key)
     bool Recover(const uint256 &hash, const unsigned char *p64, int rec);
 
-    static bool TweakSecret(unsigned char vchSecretOut[32], const unsigned char vchSecretIn[32], const unsigned char vchTweak[32]);
     bool TweakPublic(const unsigned char vchTweak[32]);
     static bool SanityCheck();
 };

From 0ceab00d16a1d23da06a748889db25662b16bfb3 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Tue, 18 Nov 2014 09:55:39 +0100
Subject: [PATCH 1048/1819] [Qt, OSX] move QProgressBarMac to guiutil.h

---
 src/qt/bitcoingui.cpp | 20 +-------------------
 src/qt/guiutil.h      | 17 +++++++++++++++++
 2 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 06e53ea1e6a6..6a457d361fe5 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -58,20 +58,6 @@
 #include <QUrlQuery>
 #endif
 
-#ifdef Q_OS_MAC
-#include <QEvent>
-
-// workaround for Qt OSX Bug:
-// https://bugreports.qt-project.org/browse/QTBUG-15631
-// QProgressBar uses around 10% CPU even when app is in background
-class QProgressBarMac : public QProgressBar
-{
-    bool event(QEvent *e) {
-        return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false;
-    }
-};
-#endif
-
 const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
 
 BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
@@ -204,11 +190,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     // Progress bar and label for blocks download
     progressBarLabel = new QLabel();
     progressBarLabel->setVisible(false);
-#ifdef Q_OS_MAC
-    progressBar = new QProgressBarMac();
-#else
-    progressBar = new QProgressBar();
-#endif
+    progressBar = new GUIUtil::ProgressBar();
     progressBar->setAlignment(Qt::AlignCenter);
     progressBar->setVisible(false);
 
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 5666744bd31c..a6ecfbcc8230 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -7,9 +7,11 @@
 
 #include "amount.h"
 
+#include <QEvent>
 #include <QHeaderView>
 #include <QMessageBox>
 #include <QObject>
+#include <QProgressBar>
 #include <QString>
 #include <QTableView>
 
@@ -186,6 +188,21 @@ namespace GUIUtil
 
     /* Format a CNodeCombinedStats.dPingTime into a user-readable string or display N/A, if 0*/
     QString formatPingTime(double dPingTime);
+    
+#ifdef Q_OS_MAC
+    // workaround for Qt OSX Bug:
+    // https://bugreports.qt-project.org/browse/QTBUG-15631
+    // QProgressBar uses around 10% CPU even when app is in background
+    class ProgressBar : public QProgressBar
+    {
+        bool event(QEvent *e) {
+            return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false;
+        }
+    };
+#else
+    typedef QProgressBar ProgressBar;
+#endif
+    
 } // namespace GUIUtil
 
 #endif // BITCOIN_QT_GUIUTIL_H

From 8c4185338001b8ba3ef247b09fb63afb65961c10 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 19 Nov 2014 09:55:51 -0500
Subject: [PATCH 1049/1819] gmp needed to build on OSX

---
 doc/build-osx.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/build-osx.md b/doc/build-osx.md
index c41820f2b1be..491c5c4683af 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -38,7 +38,7 @@ Instructions: Homebrew
 
 #### Install dependencies using Homebrew
 
-        brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
+        brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt gmp
 
 #### Installing berkeley-db4 using Homebrew
 

From 0ed9675be4a28b6240e10c0d3fdb81373bd56bbc Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 2 Nov 2014 00:43:31 +0100
Subject: [PATCH 1050/1819] [Wallet] Add global boolean whether to send free
 transactions (default=true)

---
 src/wallet.cpp | 3 ++-
 src/wallet.h   | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index ec439c5aad90..1b8e387e4466 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -28,6 +28,7 @@ using namespace std;
 CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
+bool fSendFreeTransactions = true;
 
 /** 
  * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) 
@@ -1502,7 +1503,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     break; // Done, enough fee included.
 
                 // Too big to send for free? Include more fee and try again:
-                if (nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE)
+                if (!fSendFreeTransactions || nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE)
                 {
                     nFeeRet = nFeeNeeded;
                     continue;
diff --git a/src/wallet.h b/src/wallet.h
index b692ad056b29..ebe52d4ab948 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -32,6 +32,7 @@
 extern CFeeRate payTxFee;
 extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
+extern bool fSendFreeTransactions;
 
 //! -paytxfee default
 static const CAmount DEFAULT_TRANSACTION_FEE = 0;

From ed3e5e468c5b7973d71efe51c90c3a301d570e27 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 2 Nov 2014 00:47:39 +0100
Subject: [PATCH 1051/1819] [Wallet] Add global boolean whether to pay at least
 the custom fee (default=true)

---
 src/wallet.cpp | 6 +++++-
 src/wallet.h   | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 1b8e387e4466..f1cf10497425 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -29,6 +29,7 @@ CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
 bool fSendFreeTransactions = true;
+bool fPayAtLeastCustomFee = true;
 
 /** 
  * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) 
@@ -1383,7 +1384,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
     {
         LOCK2(cs_main, cs_wallet);
         {
-            nFeeRet = payTxFee.GetFeePerK();
+            if (fPayAtLeastCustomFee)
+                nFeeRet = payTxFee.GetFeePerK();
+            else
+                nFeeRet = 0;
             while (true)
             {
                 txNew.vin.clear();
diff --git a/src/wallet.h b/src/wallet.h
index ebe52d4ab948..0244ce236802 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -33,6 +33,7 @@ extern CFeeRate payTxFee;
 extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
 extern bool fSendFreeTransactions;
+extern bool fPayAtLeastCustomFee;
 
 //! -paytxfee default
 static const CAmount DEFAULT_TRANSACTION_FEE = 0;

From e7876b297901a4b49daafc9ccd2b5c34a6214039 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 2 Nov 2014 18:28:43 +0100
Subject: [PATCH 1052/1819] [Wallet] Prevent user from paying a non-sense fee

---
 src/wallet.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index f1cf10497425..2d59506baba9 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1633,6 +1633,9 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
 {
     // payTxFee is user-set "I want to pay this much"
     CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes);
+    // prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
+    if (nFeeNeeded > 0 && nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
+        nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
     // User didn't set: use -txconfirmtarget to estimate...
     if (nFeeNeeded == 0)
         nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);

From c1c9d5b415fda7d1310c23857e57d98ac14c3063 Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Sun, 2 Nov 2014 00:14:47 +0100
Subject: [PATCH 1053/1819] [Qt] Add Smartfee to GUI

---
 src/init.cpp                      |   2 +
 src/qt/bitcoinamountfield.cpp     |   6 +
 src/qt/bitcoinamountfield.h       |   3 +
 src/qt/coincontroldialog.cpp      |  95 +++--
 src/qt/coincontroldialog.h        |   2 +-
 src/qt/forms/optionsdialog.ui     |  78 +---
 src/qt/forms/sendcoinsdialog.ui   | 600 +++++++++++++++++++++++++++++-
 src/qt/optionsdialog.cpp          |  18 -
 src/qt/optionsdialog.h            |   1 -
 src/qt/optionsmodel.cpp           |  24 --
 src/qt/optionsmodel.h             |   2 -
 src/qt/sendcoinsdialog.cpp        | 196 +++++++++-
 src/qt/sendcoinsdialog.h          |  13 +
 src/qt/walletmodel.cpp            |   4 +
 src/qt/walletmodel.h              |   3 +-
 src/qt/walletmodeltransaction.cpp |   5 +
 src/qt/walletmodeltransaction.h   |   1 +
 src/qt/walletview.cpp             |   1 +
 src/txmempool.h                   |   7 +-
 src/wallet.cpp                    |  10 +-
 20 files changed, 904 insertions(+), 167 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b290d5415889..4a9982a1cdef 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -290,6 +290,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -paytxfee=<amt>        " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
+    strUsage += "  -sendfreetransactions  " + strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0) + "\n";
     strUsage += "  -spendzeroconfchange   " + strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1) + "\n";
     strUsage += "  -txconfirmtarget=<n>   " + strprintf(_("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)"), 1) + "\n";
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
@@ -704,6 +705,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
     nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
+    fSendFreeTransactions = GetArg("-sendfreetransactions", false);
 
     std::string strWalletFile = GetArg("-wallet", "wallet.dat");
 #endif // ENABLE_WALLET
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 2c100337d24b..5b8ab23b26a7 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -221,6 +221,12 @@ void BitcoinAmountField::clear()
     unit->setCurrentIndex(0);
 }
 
+void BitcoinAmountField::setEnabled(bool fEnabled)
+{
+    amount->setEnabled(fEnabled);
+    unit->setEnabled(fEnabled);
+}
+
 bool BitcoinAmountField::validate()
 {
     bool valid = false;
diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h
index 4ab66001f0dd..1bad8ce1b8cc 100644
--- a/src/qt/bitcoinamountfield.h
+++ b/src/qt/bitcoinamountfield.h
@@ -48,6 +48,9 @@ class BitcoinAmountField: public QWidget
     /** Make field empty and ready for new input. */
     void clear();
 
+    /** Enable/Disable. */
+    void setEnabled(bool fEnabled);
+
     /** Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907),
         in these cases we have to set it up manually.
     */
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index ba0febe546d9..85b43b7b1f58 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -24,6 +24,7 @@
 #include <QDialogButtonBox>
 #include <QFlags>
 #include <QIcon>
+#include <QSettings>
 #include <QString>
 #include <QTreeWidget>
 #include <QTreeWidgetItem>
@@ -130,10 +131,22 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
 
     // default view is sorted by amount desc
     sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder);
+
+    // restore list mode and sortorder as a convenience feature
+    QSettings settings;
+    if (settings.contains("nCoinControlMode") && !settings.value("nCoinControlMode").toBool())
+        ui->radioTreeMode->click();
+    if (settings.contains("nCoinControlSortColumn") && settings.contains("nCoinControlSortOrder"))
+        sortView(settings.value("nCoinControlSortColumn").toInt(), ((Qt::SortOrder)settings.value("nCoinControlSortOrder").toInt()));
 }
 
 CoinControlDialog::~CoinControlDialog()
 {
+    QSettings settings;
+    settings.setValue("nCoinControlMode", ui->radioListMode->isChecked());
+    settings.setValue("nCoinControlSortColumn", sortColumn);
+    settings.setValue("nCoinControlSortOrder", (int)sortOrder);
+
     delete ui;
 }
 
@@ -290,19 +303,19 @@ void CoinControlDialog::clipboardAmount()
 // copy label "Fee" to clipboard
 void CoinControlDialog::clipboardFee()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", ""));
 }
 
 // copy label "After fee" to clipboard
 void CoinControlDialog::clipboardAfterFee()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", ""));
 }
 
 // copy label "Bytes" to clipboard
 void CoinControlDialog::clipboardBytes()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlBytes->text());
+    GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", ""));
 }
 
 // copy label "Priority" to clipboard
@@ -320,7 +333,7 @@ void CoinControlDialog::clipboardLowOutput()
 // copy label "Change" to clipboard
 void CoinControlDialog::clipboardChange()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", ""));
 }
 
 // treeview: sort
@@ -402,26 +415,22 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
 }
 
 // return human readable label for priority number
-QString CoinControlDialog::getPriorityLabel(const CTxMemPool& pool, double dPriority)
+QString CoinControlDialog::getPriorityLabel(double dPriority, double mempoolEstimatePriority)
 {
-    // confirmations -> textual description
-    typedef std::map<unsigned int, QString> PriorityDescription;
-    const static PriorityDescription priorityDescriptions = boost::assign::map_list_of
-        (1, tr("highest"))(2, tr("higher"))(3, tr("high"))
-        (5, tr("medium-high"))(6, tr("medium"))
-        (10, tr("low-medium"))(15, tr("low"))
-        (20, tr("lower"));
-
-    BOOST_FOREACH(const PriorityDescription::value_type& i, priorityDescriptions)
-    {
-        double p = mempool.estimatePriority(i.first);
-        if (p > 0 && dPriority >= p) return i.second;
-    }
-    // Note: if mempool hasn't accumulated enough history (estimatePriority
-    // returns -1) we're conservative and classify as "lowest"
-    if (mempool.estimatePriority(nTxConfirmTarget) <= 0 && AllowFree(dPriority))
-        return ">=" + tr("medium");
-    return tr("lowest");
+    double dPriorityMedium = mempoolEstimatePriority;
+
+    if (dPriorityMedium <= 0)
+        dPriorityMedium = AllowFreeThreshold(); // not enough data, back to hard-coded
+
+    if      (dPriority / 1000000 > dPriorityMedium) return tr("highest");
+    else if (dPriority / 100000 > dPriorityMedium)  return tr("higher");
+    else if (dPriority / 10000 > dPriorityMedium)   return tr("high");
+    else if (dPriority / 1000 > dPriorityMedium)    return tr("medium-high");
+    else if (dPriority > dPriorityMedium)           return tr("medium");
+    else if (dPriority * 10 > dPriorityMedium)      return tr("low-medium");
+    else if (dPriority * 100 > dPriorityMedium)     return tr("low");
+    else if (dPriority * 1000 > dPriorityMedium)    return tr("lower");
+    else                                            return tr("lowest");
 }
 
 // shows count of locked unspent outputs
@@ -470,6 +479,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     double dPriorityInputs      = 0;
     unsigned int nQuantity      = 0;
     int nQuantityUncompressed   = 0;
+    bool fAllowFree             = false;
 
     vector<COutPoint> vCoinControl;
     vector<COutput>   vOutputs;
@@ -522,24 +532,22 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         nBytes = nBytesInputs + ((CoinControlDialog::payAmounts.size() > 0 ? CoinControlDialog::payAmounts.size() + 1 : 2) * 34) + 10; // always assume +1 output for change here
 
         // Priority
+        double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
         dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
-        sPriorityLabel = CoinControlDialog::getPriorityLabel(mempool, dPriority);
+        sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority);
 
-        // Voluntary Fee
-        nPayFee = payTxFee.GetFee(max((unsigned int)1000, nBytes));
+        // Fee
+        nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
 
-        // Min Fee
-        if (nPayFee == 0)
-        {
-            nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
-
-            double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
-            if (dPriorityNeeded <= 0 && !AllowFree(dPriority)) // not enough mempool history: never send free
-                dPriorityNeeded = std::numeric_limits<double>::max();
+        // Allow free?
+        double dPriorityNeeded = mempoolEstimatePriority;
+        if (dPriorityNeeded <= 0)
+            dPriorityNeeded = AllowFreeThreshold(); // not enough data, back to hard-coded
+        fAllowFree = (dPriority >= dPriorityNeeded);
 
-            if (nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE && dPriority >= dPriorityNeeded)
+        if (fSendFreeTransactions)
+            if (fAllowFree && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE)
                 nPayFee = 0;
-        }
 
         if (nPayAmount > 0)
         {
@@ -595,7 +603,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     l6->setText(sPriorityLabel);                                             // Priority
     l7->setText(fDust ? tr("yes") : tr("no"));                               // Dust
     l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange));        // Change
-    if (nPayFee > 0)
+    if (nPayFee > 0 && !(payTxFee.GetFeePerK() > 0 && fPayAtLeastCustomFee && nBytes < 1000))
     {
         l3->setText("~" + l3->text());
         l4->setText("~" + l4->text());
@@ -605,7 +613,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
 
     // turn labels "red"
     l5->setStyleSheet((nBytes >= MAX_FREE_TRANSACTION_CREATE_SIZE) ? "color:red;" : "");// Bytes >= 1000
-    l6->setStyleSheet((dPriority > 0 && !AllowFree(dPriority)) ? "color:red;" : "");    // Priority < "medium"
+    l6->setStyleSheet((dPriority > 0 && !fAllowFree) ? "color:red;" : "");              // Priority < "medium"
     l7->setStyleSheet((fDust) ? "color:red;" : "");                                     // Dust = "yes"
 
     // tool tips
@@ -620,7 +628,11 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
     QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
 
     // how many satoshis the estimated fee can vary per byte we guess wrong
-    double dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), std::max(payTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK())) / 1000;
+    double dFeeVary;
+    if (payTxFee.GetFeePerK() > 0)
+        dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
+    else
+        dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK()) / 1000;
     QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
 
     l3->setToolTip(toolTip4);
@@ -656,6 +668,7 @@ void CoinControlDialog::updateView()
     QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
 
     int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
+    double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
 
     map<QString, vector<COutput> > mapCoins;
     model->listCoins(mapCoins);
@@ -745,7 +758,7 @@ void CoinControlDialog::updateView()
 
             // priority
             double dPriority = ((double)out.tx->vout[out.i].nValue  / (nInputSize + 78)) * (out.nDepth+1); // 78 = 2 * 34 + 10
-            itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(mempool, dPriority));
+            itemOutput->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority));
             itemOutput->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPriority), 20, " "));
             dPrioritySum += (double)out.tx->vout[out.i].nValue  * (out.nDepth+1);
             nInputSum    += nInputSize;
@@ -778,7 +791,7 @@ void CoinControlDialog::updateView()
             itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
             itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
             itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
-            itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(mempool, dPrioritySum));
+            itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority));
             itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " "));
         }
     }
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index cc388d626ee1..bd4f5d7f1ed6 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -37,7 +37,7 @@ class CoinControlDialog : public QDialog
 
     // static because also called from sendcoinsdialog
     static void updateLabels(WalletModel*, QDialog*);
-    static QString getPriorityLabel(const CTxMemPool& pool, double);
+    static QString getPriorityLabel(double dPriority, double mempoolEstimatePriority);
 
     static QList<CAmount> payAmounts;
     static CCoinControl *coinControl;
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 9d094c1a73c6..3446cf5c3313 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -137,65 +137,6 @@
        <string>W&amp;allet</string>
       </attribute>
       <layout class="QVBoxLayout" name="verticalLayout_Wallet">
-       <item>
-        <widget class="QLabel" name="transactionFeeInfoLabel">
-         <property name="text">
-          <string>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</string>
-         </property>
-         <property name="textFormat">
-          <enum>Qt::PlainText</enum>
-         </property>
-         <property name="wordWrap">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item>
-        <layout class="QHBoxLayout" name="horizontalLayout_1_Wallet">
-         <item>
-          <widget class="QLabel" name="transactionFeeLabel">
-           <property name="text">
-            <string>Pay transaction &amp;fee</string>
-           </property>
-           <property name="textFormat">
-            <enum>Qt::PlainText</enum>
-           </property>
-           <property name="buddy">
-            <cstring>transactionFee</cstring>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="BitcoinAmountField" name="transactionFee"/>
-         </item>
-         <item>
-          <spacer name="horizontalSpacer_1_Wallet">
-           <property name="orientation">
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeHint" stdset="0">
-            <size>
-             <width>40</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <spacer name="verticalSpacer_Wallet">
-         <property name="orientation">
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>20</width>
-           <height>40</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
        <item>
         <widget class="QGroupBox" name="groupBox">
          <property name="title">
@@ -225,6 +166,19 @@
          </layout>
         </widget>
        </item>
+       <item>
+        <spacer name="verticalSpacer_Wallet">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
       </layout>
      </widget>
      <widget class="QWidget" name="tabNetwork">
@@ -632,12 +586,6 @@
   </layout>
  </widget>
  <customwidgets>
-  <customwidget>
-   <class>BitcoinAmountField</class>
-   <extends>QLineEdit</extends>
-   <header>bitcoinamountfield.h</header>
-   <container>1</container>
-  </customwidget>
   <customwidget>
    <class>QValidatedLineEdit</class>
    <extends>QLineEdit</extends>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index dce7f4ce4c12..0bf04c75eb37 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -7,13 +7,13 @@
     <x>0</x>
     <y>0</y>
     <width>850</width>
-    <height>400</height>
+    <height>526</height>
    </rect>
   </property>
   <property name="windowTitle">
    <string>Send Coins</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0">
+  <layout class="QVBoxLayout" name="verticalLayout" stretch="0,1,0,0">
    <property name="bottomMargin">
     <number>8</number>
    </property>
@@ -617,7 +617,7 @@
         <x>0</x>
         <y>0</y>
         <width>830</width>
-        <height>178</height>
+        <height>68</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@@ -657,6 +657,590 @@
      </widget>
     </widget>
    </item>
+   <item>
+    <widget class="QFrame" name="frameFee">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="maximumSize">
+      <size>
+       <width>16777215</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Sunken</enum>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayoutFee1">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <property name="leftMargin">
+       <number>0</number>
+      </property>
+      <property name="topMargin">
+       <number>0</number>
+      </property>
+      <property name="rightMargin">
+       <number>0</number>
+      </property>
+      <property name="bottomMargin">
+       <number>0</number>
+      </property>
+      <item>
+       <layout class="QVBoxLayout" name="verticalLayoutFee2" stretch="0,0,0">
+        <property name="spacing">
+         <number>0</number>
+        </property>
+        <property name="leftMargin">
+         <number>10</number>
+        </property>
+        <property name="topMargin">
+         <number>0</number>
+        </property>
+        <item>
+         <layout class="QHBoxLayout" name="horizontalLayoutFee1">
+          <property name="bottomMargin">
+           <number>0</number>
+          </property>
+          <item>
+           <layout class="QVBoxLayout" name="verticalLayoutFee7">
+            <property name="spacing">
+             <number>0</number>
+            </property>
+            <item>
+             <spacer name="verticalSpacerSmartFee">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeType">
+               <enum>QSizePolicy::Fixed</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>1</width>
+                <height>4</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+            <item>
+             <layout class="QHBoxLayout" name="horizontalLayoutSmartFee">
+              <property name="spacing">
+               <number>10</number>
+              </property>
+              <item>
+               <widget class="QLabel" name="labelFeeHeadline">
+                <property name="sizePolicy">
+                 <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+                  <horstretch>0</horstretch>
+                  <verstretch>0</verstretch>
+                 </sizepolicy>
+                </property>
+                <property name="font">
+                 <font>
+                  <weight>75</weight>
+                  <bold>true</bold>
+                 </font>
+                </property>
+                <property name="styleSheet">
+                 <string notr="true">font-weight:bold;</string>
+                </property>
+                <property name="text">
+                 <string>Transaction Fee:</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="labelFeeMinimized">
+                <property name="text">
+                 <string/>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonChooseFee">
+                <property name="text">
+                 <string>Choose...</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QPushButton" name="buttonMinimizeFee">
+                <property name="toolTip">
+                 <string>collapse fee-settings</string>
+                </property>
+                <property name="text">
+                 <string>Minimize</string>
+                </property>
+               </widget>
+              </item>
+             </layout>
+            </item>
+            <item>
+             <spacer name="verticalSpacer_5">
+              <property name="orientation">
+               <enum>Qt::Vertical</enum>
+              </property>
+              <property name="sizeHint" stdset="0">
+               <size>
+                <width>1</width>
+                <height>1</height>
+               </size>
+              </property>
+             </spacer>
+            </item>
+           </layout>
+          </item>
+          <item>
+           <spacer name="horizontalSpacer_4">
+            <property name="orientation">
+             <enum>Qt::Horizontal</enum>
+            </property>
+            <property name="sizeHint" stdset="0">
+             <size>
+              <width>40</width>
+              <height>20</height>
+             </size>
+            </property>
+           </spacer>
+          </item>
+         </layout>
+        </item>
+        <item>
+         <widget class="QFrame" name="frameFeeSelection">
+          <layout class="QVBoxLayout" name="verticalLayoutFee12">
+           <property name="spacing">
+            <number>0</number>
+           </property>
+           <property name="leftMargin">
+            <number>0</number>
+           </property>
+           <property name="topMargin">
+            <number>0</number>
+           </property>
+           <property name="rightMargin">
+            <number>0</number>
+           </property>
+           <property name="bottomMargin">
+            <number>0</number>
+           </property>
+           <item>
+            <layout class="QGridLayout" name="gridLayoutFee">
+             <property name="topMargin">
+              <number>10</number>
+             </property>
+             <property name="bottomMargin">
+              <number>4</number>
+             </property>
+             <property name="horizontalSpacing">
+              <number>10</number>
+             </property>
+             <property name="verticalSpacing">
+              <number>4</number>
+             </property>
+             <item row="1" column="1">
+              <layout class="QVBoxLayout" name="verticalLayoutFee8">
+               <property name="spacing">
+                <number>6</number>
+               </property>
+               <item>
+                <layout class="QHBoxLayout" name="horizontalLayoutFee13">
+                 <item>
+                  <widget class="QRadioButton" name="radioCustomPerKilobyte">
+                   <property name="toolTip">
+                    <string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
+                   </property>
+                   <property name="text">
+                    <string>per kilobyte</string>
+                   </property>
+                   <property name="checked">
+                    <bool>true</bool>
+                   </property>
+                   <attribute name="buttonGroup">
+                    <string notr="true">groupCustomFee</string>
+                   </attribute>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QRadioButton" name="radioCustomAtLeast">
+                   <property name="toolTip">
+                    <string>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;total at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</string>
+                   </property>
+                   <property name="text">
+                    <string>total at least</string>
+                   </property>
+                   <attribute name="buttonGroup">
+                    <string notr="true">groupCustomFee</string>
+                   </attribute>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="BitcoinAmountField" name="customFee"/>
+                 </item>
+                 <item>
+                  <spacer name="horizontalSpacer_6">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>1</width>
+                     <height>1</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                </layout>
+               </item>
+               <item>
+                <layout class="QHBoxLayout" name="horizontalLayoutFee8">
+                 <item>
+                  <widget class="QCheckBox" name="checkBoxMinimumFee">
+                   <property name="toolTip">
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</string>
+                   </property>
+                   <property name="text">
+                    <string/>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QLabel" name="labelMinFeeWarning">
+                   <property name="enabled">
+                    <bool>true</bool>
+                   </property>
+                   <property name="toolTip">
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</string>
+                   </property>
+                   <property name="text">
+                    <string>(read the tooltip)</string>
+                   </property>
+                   <property name="margin">
+                    <number>5</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <spacer name="horizontalSpacer_2">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>1</width>
+                     <height>1</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                </layout>
+               </item>
+              </layout>
+             </item>
+             <item row="0" column="0">
+              <layout class="QVBoxLayout" name="verticalLayoutFee4" stretch="0,1">
+               <item>
+                <widget class="QRadioButton" name="radioSmartFee">
+                 <property name="text">
+                  <string>Recommended:</string>
+                 </property>
+                 <property name="checked">
+                  <bool>true</bool>
+                 </property>
+                 <attribute name="buttonGroup">
+                  <string notr="true">groupFee</string>
+                 </attribute>
+                </widget>
+               </item>
+               <item>
+                <spacer name="verticalSpacer_2">
+                 <property name="orientation">
+                  <enum>Qt::Vertical</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>1</width>
+                   <height>1</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+             <item row="1" column="0">
+              <layout class="QVBoxLayout" name="verticalLayoutFee9" stretch="0,1">
+               <item>
+                <widget class="QRadioButton" name="radioCustomFee">
+                 <property name="text">
+                  <string>Custom:</string>
+                 </property>
+                 <attribute name="buttonGroup">
+                  <string notr="true">groupFee</string>
+                 </attribute>
+                </widget>
+               </item>
+               <item>
+                <spacer name="verticalSpacer_6">
+                 <property name="orientation">
+                  <enum>Qt::Vertical</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>1</width>
+                   <height>1</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+             <item row="0" column="1">
+              <layout class="QVBoxLayout" name="verticalLayoutFee3" stretch="0,0,1">
+               <property name="spacing">
+                <number>6</number>
+               </property>
+               <property name="topMargin">
+                <number>2</number>
+               </property>
+               <item>
+                <layout class="QHBoxLayout" name="horizontalLayoutFee12">
+                 <item>
+                  <widget class="QLabel" name="labelSmartFee">
+                   <property name="text">
+                    <string/>
+                   </property>
+                   <property name="margin">
+                    <number>2</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QLabel" name="labelFeeEstimation">
+                   <property name="text">
+                    <string/>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <widget class="QLabel" name="labelSmartFee2">
+                   <property name="text">
+                    <string>(Smart fee not initialized yet. This usually takes a few blocks...)</string>
+                   </property>
+                   <property name="margin">
+                    <number>2</number>
+                   </property>
+                  </widget>
+                 </item>
+                 <item>
+                  <spacer name="horizontalSpacer_5">
+                   <property name="orientation">
+                    <enum>Qt::Horizontal</enum>
+                   </property>
+                   <property name="sizeHint" stdset="0">
+                    <size>
+                     <width>1</width>
+                     <height>1</height>
+                    </size>
+                   </property>
+                  </spacer>
+                 </item>
+                </layout>
+               </item>
+               <item>
+                <layout class="QHBoxLayout" name="horizontalLayoutFee9">
+                 <item>
+                  <layout class="QVBoxLayout" name="verticalLayoutFee6">
+                   <item>
+                    <widget class="QLabel" name="labelSmartFee3">
+                     <property name="text">
+                      <string>Confirmation time:</string>
+                     </property>
+                     <property name="margin">
+                      <number>2</number>
+                     </property>
+                    </widget>
+                   </item>
+                   <item>
+                    <spacer name="verticalSpacer_3">
+                     <property name="orientation">
+                      <enum>Qt::Vertical</enum>
+                     </property>
+                     <property name="sizeHint" stdset="0">
+                      <size>
+                       <width>1</width>
+                       <height>1</height>
+                      </size>
+                     </property>
+                    </spacer>
+                   </item>
+                  </layout>
+                 </item>
+                 <item>
+                  <layout class="QVBoxLayout" name="verticalLayoutFee5">
+                   <property name="rightMargin">
+                    <number>30</number>
+                   </property>
+                   <item>
+                    <widget class="QSlider" name="sliderSmartFee">
+                     <property name="minimum">
+                      <number>0</number>
+                     </property>
+                     <property name="maximum">
+                      <number>24</number>
+                     </property>
+                     <property name="pageStep">
+                      <number>1</number>
+                     </property>
+                     <property name="value">
+                      <number>0</number>
+                     </property>
+                     <property name="orientation">
+                      <enum>Qt::Horizontal</enum>
+                     </property>
+                     <property name="invertedAppearance">
+                      <bool>false</bool>
+                     </property>
+                     <property name="invertedControls">
+                      <bool>false</bool>
+                     </property>
+                     <property name="tickPosition">
+                      <enum>QSlider::NoTicks</enum>
+                     </property>
+                    </widget>
+                   </item>
+                   <item>
+                    <layout class="QHBoxLayout" name="horizontalLayoutFee10">
+                     <item>
+                      <widget class="QLabel" name="labelSmartFeeNormal">
+                       <property name="text">
+                        <string>normal</string>
+                       </property>
+                      </widget>
+                     </item>
+                     <item>
+                      <spacer name="horizontalSpacer_3">
+                       <property name="orientation">
+                        <enum>Qt::Horizontal</enum>
+                       </property>
+                       <property name="sizeHint" stdset="0">
+                        <size>
+                         <width>40</width>
+                         <height>20</height>
+                        </size>
+                       </property>
+                      </spacer>
+                     </item>
+                     <item>
+                      <widget class="QLabel" name="labelSmartFeeFast">
+                       <property name="text">
+                        <string>fast</string>
+                       </property>
+                      </widget>
+                     </item>
+                    </layout>
+                   </item>
+                  </layout>
+                 </item>
+                </layout>
+               </item>
+               <item>
+                <spacer name="verticalSpacer_4">
+                 <property name="orientation">
+                  <enum>Qt::Vertical</enum>
+                 </property>
+                 <property name="sizeHint" stdset="0">
+                  <size>
+                   <width>1</width>
+                   <height>1</height>
+                  </size>
+                 </property>
+                </spacer>
+               </item>
+              </layout>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <layout class="QHBoxLayout" name="horizontalLayoutFee5" stretch="0,0,0">
+             <property name="spacing">
+              <number>8</number>
+             </property>
+             <property name="bottomMargin">
+              <number>4</number>
+             </property>
+             <item>
+              <widget class="QCheckBox" name="checkBoxFreeTx">
+               <property name="text">
+                <string>Send as zero-fee transaction if possible</string>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <widget class="QLabel" name="labelFreeTx">
+               <property name="text">
+                <string>(confirmation may take longer)</string>
+               </property>
+               <property name="margin">
+                <number>5</number>
+               </property>
+              </widget>
+             </item>
+             <item>
+              <spacer name="horizontalSpacerFee5">
+               <property name="orientation">
+                <enum>Qt::Horizontal</enum>
+               </property>
+               <property name="sizeHint" stdset="0">
+                <size>
+                 <width>1</width>
+                 <height>1</height>
+                </size>
+               </property>
+              </spacer>
+             </item>
+            </layout>
+           </item>
+           <item>
+            <spacer name="verticalSpacerFee2">
+             <property name="orientation">
+              <enum>Qt::Vertical</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>1</width>
+               <height>1</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
+          </layout>
+         </widget>
+        </item>
+        <item>
+         <spacer name="verticalSpacerFee">
+          <property name="orientation">
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0">
+           <size>
+            <width>800</width>
+            <height>1</height>
+           </size>
+          </property>
+         </spacer>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
@@ -787,9 +1371,19 @@
    <extends>QLineEdit</extends>
    <header>qvalidatedlineedit.h</header>
   </customwidget>
+  <customwidget>
+   <class>BitcoinAmountField</class>
+   <extends>QLineEdit</extends>
+   <header>bitcoinamountfield.h</header>
+   <container>1</container>
+  </customwidget>
  </customwidgets>
  <resources>
   <include location="../bitcoin.qrc"/>
  </resources>
  <connections/>
+ <buttongroups>
+  <buttongroup name="groupFee"/>
+  <buttongroup name="groupCustomFee"/>
+ </buttongroups>
 </ui>
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index f5a0759c923b..069080219e24 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -105,9 +105,6 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
 #endif
 
     ui->unit->setModel(new BitcoinUnits(this));
-#ifdef ENABLE_WALLET
-    ui->transactionFee->setSingleStep(CWallet::minTxFee.GetFeePerK());
-#endif
 
     /* Widget-to-option mapper */
     mapper = new QDataWidgetMapper(this);
@@ -139,16 +136,11 @@ void OptionsDialog::setModel(OptionsModel *model)
             strLabel = tr("none");
         ui->overriddenByCommandLineLabel->setText(strLabel);
 
-        connect(model, SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
-
         mapper->setModel(model);
         setMapper();
         mapper->toFirst();
     }
 
-    /* update the display unit, to not use the default ("BTC") */
-    updateDisplayUnit();
-
     /* warn when one of the following settings changes by user action (placed here so init via mapper doesn't trigger them) */
 
     /* Main */
@@ -172,7 +164,6 @@ void OptionsDialog::setMapper()
     mapper->addMapping(ui->databaseCache, OptionsModel::DatabaseCache);
 
     /* Wallet */
-    mapper->addMapping(ui->transactionFee, OptionsModel::Fee);
     mapper->addMapping(ui->spendZeroConfChange, OptionsModel::SpendZeroConfChange);
     mapper->addMapping(ui->coinControlFeatures, OptionsModel::CoinControlFeatures);
 
@@ -264,15 +255,6 @@ void OptionsDialog::clearStatusLabel()
     ui->statusLabel->clear();
 }
 
-void OptionsDialog::updateDisplayUnit()
-{
-    if(model)
-    {
-        /* Update transactionFee with the current unit */
-        ui->transactionFee->setDisplayUnit(model->getDisplayUnit());
-    }
-}
-
 void OptionsDialog::doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort)
 {
     Q_UNUSED(nProxyPort);
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 794a39590c89..511719f53c58 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -46,7 +46,6 @@ private slots:
 
     void showRestartWarning(bool fPersistent = false);
     void clearStatusLabel();
-    void updateDisplayUnit();
     void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
 
 signals:
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index c941ebd4caf1..7054509fe6f5 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -90,12 +90,6 @@ void OptionsModel::Init()
 
     // Wallet
 #ifdef ENABLE_WALLET
-    if (!settings.contains("nTransactionFee"))
-        settings.setValue("nTransactionFee", (qint64)DEFAULT_TRANSACTION_FEE);
-    payTxFee = CFeeRate(settings.value("nTransactionFee").toLongLong()); // if -paytxfee is set, this will be overridden later in init.cpp
-    if (mapArgs.count("-paytxfee"))
-        addOverriddenOption("-paytxfee");
-
     if (!settings.contains("bSpendZeroConfChange"))
         settings.setValue("bSpendZeroConfChange", true);
     if (!SoftSetBoolArg("-spendzeroconfchange", settings.value("bSpendZeroConfChange").toBool()))
@@ -185,16 +179,6 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
         }
 
 #ifdef ENABLE_WALLET
-        case Fee: {
-            // Attention: Init() is called before payTxFee is set in AppInit2()!
-            // To ensure we can change the fee on-the-fly update our QSetting when
-            // opening OptionsDialog, which queries Fee via the mapper.
-            if (!(payTxFee == CFeeRate(settings.value("nTransactionFee").toLongLong(), 1000)))
-                settings.setValue("nTransactionFee", (qint64)payTxFee.GetFeePerK());
-            // Todo: Consider to revert back to use just payTxFee here, if we don't want
-            // -paytxfee to update our QSettings!
-            return settings.value("nTransactionFee");
-        }
         case SpendZeroConfChange:
             return settings.value("bSpendZeroConfChange");
 #endif
@@ -276,14 +260,6 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
         }
         break;
 #ifdef ENABLE_WALLET
-        case Fee: { // core option - can be changed on-the-fly
-            // Todo: Add is valid check  and warn via message, if not
-            CAmount nTransactionFee(value.toLongLong());
-            payTxFee = CFeeRate(nTransactionFee, 1000);
-            settings.setValue("nTransactionFee", qint64(nTransactionFee));
-            emit transactionFeeChanged(nTransactionFee);
-            break;
-        }
         case SpendZeroConfChange:
             if (settings.value("bSpendZeroConfChange") != value) {
                 settings.setValue("bSpendZeroConfChange", value);
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index e2dc067edbd6..84fd49a7b8bf 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -34,7 +34,6 @@ class OptionsModel : public QAbstractListModel
         ProxyUse,               // bool
         ProxyIP,                // QString
         ProxyPort,              // int
-        Fee,                    // qint64
         DisplayUnit,            // BitcoinUnits::Unit
         ThirdPartyTxUrls,       // QString
         Language,               // QString
@@ -84,7 +83,6 @@ class OptionsModel : public QAbstractListModel
 
 signals:
     void displayUnitChanged(int unit);
-    void transactionFeeChanged(const CAmount&);
     void coinControlFeaturesChanged(bool);
 };
 
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index ce94131cce01..ff39829b95d8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -7,10 +7,12 @@
 
 #include "addresstablemodel.h"
 #include "bitcoinunits.h"
+#include "clientmodel.h"
 #include "coincontroldialog.h"
 #include "guiutil.h"
 #include "optionsmodel.h"
 #include "sendcoinsentry.h"
+#include "wallet.h"
 #include "walletmodel.h"
 
 #include "base58.h"
@@ -19,6 +21,7 @@
 
 #include <QMessageBox>
 #include <QScrollBar>
+#include <QSettings>
 #include <QTextDocument>
 
 SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
@@ -72,9 +75,46 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     ui->labelCoinControlLowOutput->addAction(clipboardLowOutputAction);
     ui->labelCoinControlChange->addAction(clipboardChangeAction);
 
+    // init transaction fee section
+    QSettings settings;
+    if (!settings.contains("fFeeSectionMinimized"))
+        settings.setValue("fFeeSectionMinimized", true);
+    if (!settings.contains("nFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
+        settings.setValue("nFeeRadio", 1); // custom
+    if (!settings.contains("nFeeRadio"))
+        settings.setValue("nFeeRadio", 0); // recommended
+    if (!settings.contains("nCustomFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
+        settings.setValue("nCustomFeeRadio", 1); // total at least
+    if (!settings.contains("nCustomFeeRadio"))
+        settings.setValue("nCustomFeeRadio", 0); // per kilobyte
+    if (!settings.contains("nSmartFeeSliderPosition"))
+        settings.setValue("nSmartFeeSliderPosition", 0);
+    if (!settings.contains("nTransactionFee"))
+        settings.setValue("nTransactionFee", (qint64)DEFAULT_TRANSACTION_FEE);
+    if (!settings.contains("fPayOnlyMinFee"))
+        settings.setValue("fPayOnlyMinFee", false);
+    if (!settings.contains("fSendFreeTransactions"))
+        settings.setValue("fSendFreeTransactions", false);
+    ui->groupFee->setId(ui->radioSmartFee, 0);
+    ui->groupFee->setId(ui->radioCustomFee, 1);
+    ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
+    ui->groupCustomFee->setId(ui->radioCustomPerKilobyte, 0);
+    ui->groupCustomFee->setId(ui->radioCustomAtLeast, 1);
+    ui->groupCustomFee->button((int)std::max(0, std::min(1, settings.value("nCustomFeeRadio").toInt())))->setChecked(true);
+    ui->sliderSmartFee->setValue(settings.value("nSmartFeeSliderPosition").toInt());
+    ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
+    ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
+    ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
+    minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
+
     fNewRecipientAllowed = true;
 }
 
+void SendCoinsDialog::setClientModel(ClientModel *clientModel)
+{
+    this->clientModel = clientModel;
+}
+
 void SendCoinsDialog::setModel(WalletModel *model)
 {
     this->model = model;
@@ -94,18 +134,51 @@ void SendCoinsDialog::setModel(WalletModel *model)
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
         connect(model, SIGNAL(balanceChanged(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)), this, SLOT(setBalance(CAmount,CAmount,CAmount,CAmount,CAmount,CAmount)));
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
+        updateDisplayUnit();
 
         // Coin Control
         connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(coinControlUpdateLabels()));
         connect(model->getOptionsModel(), SIGNAL(coinControlFeaturesChanged(bool)), this, SLOT(coinControlFeatureChanged(bool)));
-        connect(model->getOptionsModel(), SIGNAL(transactionFeeChanged(CAmount)), this, SLOT(coinControlUpdateLabels()));
         ui->frameCoinControl->setVisible(model->getOptionsModel()->getCoinControlFeatures());
         coinControlUpdateLabels();
+
+        // fee section
+        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
+        connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
+        connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
+        connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateFeeSectionControls()));
+        connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->groupFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
+        connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->groupCustomFee, SIGNAL(buttonClicked(int)), this, SLOT(coinControlUpdateLabels()));
+        connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->customFee, SIGNAL(valueChanged()), this, SLOT(coinControlUpdateLabels()));
+        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(setMinimumFee()));
+        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateFeeSectionControls()));
+        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->checkBoxMinimumFee, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
+        connect(ui->checkBoxFreeTx, SIGNAL(stateChanged(int)), this, SLOT(updateGlobalFeeVariables()));
+        connect(ui->checkBoxFreeTx, SIGNAL(stateChanged(int)), this, SLOT(coinControlUpdateLabels()));
+        ui->customFee->setSingleStep(CWallet::minTxFee.GetFeePerK());
+        updateFeeSectionControls();
+        updateMinFeeLabel();
+        updateSmartFeeLabel();
+        updateGlobalFeeVariables();
     }
 }
 
 SendCoinsDialog::~SendCoinsDialog()
 {
+    QSettings settings;
+    settings.setValue("fFeeSectionMinimized", fFeeMinimized);
+    settings.setValue("nFeeRadio", ui->groupFee->checkedId());
+    settings.setValue("nCustomFeeRadio", ui->groupCustomFee->checkedId());
+    settings.setValue("nSmartFeeSliderPosition", ui->sliderSmartFee->value());
+    settings.setValue("nTransactionFee", (qint64)ui->customFee->value());
+    settings.setValue("fPayOnlyMinFee", ui->checkBoxMinimumFee->isChecked());
+    settings.setValue("fSendFreeTransactions", ui->checkBoxFreeTx->isChecked());
+
     delete ui;
 }
 
@@ -214,6 +287,9 @@ void SendCoinsDialog::on_sendButton_clicked()
         questionString.append(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), txFee));
         questionString.append("</span> ");
         questionString.append(tr("added as transaction fee"));
+
+        // append transaction size
+        questionString.append(" (" + QString::number((double)currentTransaction.getTransactionSize() / 1000) + " kB)");
     }
 
     // add total amount in all subdivision units
@@ -402,6 +478,9 @@ void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfir
 void SendCoinsDialog::updateDisplayUnit()
 {
     setBalance(model->getBalance(), 0, 0, 0, 0, 0);
+    ui->customFee->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
+    updateMinFeeLabel();
+    updateSmartFeeLabel();
 }
 
 void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg)
@@ -438,6 +517,9 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
         msgParams.first = tr("The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
         msgParams.second = CClientUIInterface::MSG_ERROR;
         break;
+    case WalletModel::InsaneFee:
+        msgParams.first = tr("A fee higher than %1 is considered an insanely high fee.").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), 10000000));
+        break;
     // included to prevent a compiler warning.
     case WalletModel::OK:
     default:
@@ -447,6 +529,110 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
     emit message(tr("Send Coins"), msgParams.first, msgParams.second);
 }
 
+void SendCoinsDialog::minimizeFeeSection(bool fMinimize)
+{
+    ui->labelFeeMinimized->setVisible(fMinimize);
+    ui->buttonChooseFee  ->setVisible(fMinimize);
+    ui->buttonMinimizeFee->setVisible(!fMinimize);
+    ui->frameFeeSelection->setVisible(!fMinimize);
+    ui->horizontalLayoutSmartFee->setContentsMargins(0, (fMinimize ? 0 : 6), 0, 0);
+    fFeeMinimized = fMinimize;
+}
+
+void SendCoinsDialog::on_buttonChooseFee_clicked()
+{
+    minimizeFeeSection(false);
+}
+
+void SendCoinsDialog::on_buttonMinimizeFee_clicked()
+{
+    updateFeeMinimizedLabel();
+    minimizeFeeSection(true);
+}
+
+void SendCoinsDialog::setMinimumFee()
+{
+    ui->radioCustomPerKilobyte->setChecked(true);
+    ui->customFee->setValue(CWallet::minTxFee.GetFeePerK());
+}
+
+void SendCoinsDialog::updateFeeSectionControls()
+{
+    ui->sliderSmartFee          ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelSmartFee           ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelSmartFee2          ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelSmartFee3          ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelFeeEstimation      ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelSmartFeeNormal     ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->labelSmartFeeFast       ->setEnabled(ui->radioSmartFee->isChecked());
+    ui->checkBoxMinimumFee      ->setEnabled(ui->radioCustomFee->isChecked());
+    ui->labelMinFeeWarning      ->setEnabled(ui->radioCustomFee->isChecked());
+    ui->radioCustomPerKilobyte  ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
+    ui->radioCustomAtLeast      ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
+    ui->customFee               ->setEnabled(ui->radioCustomFee->isChecked() && !ui->checkBoxMinimumFee->isChecked());
+}
+
+void SendCoinsDialog::updateGlobalFeeVariables()
+{
+    if (ui->radioSmartFee->isChecked())
+    {
+        nTxConfirmTarget = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
+        payTxFee = CFeeRate(0);
+    }
+    else
+    {
+        nTxConfirmTarget = 25;
+        payTxFee = CFeeRate(ui->customFee->value());
+        fPayAtLeastCustomFee = ui->radioCustomAtLeast->isChecked();
+    }
+
+    fSendFreeTransactions = ui->checkBoxFreeTx->isChecked();
+}
+
+void SendCoinsDialog::updateFeeMinimizedLabel()
+{
+    if(!model || !model->getOptionsModel())
+        return;
+
+    if (ui->radioSmartFee->isChecked())
+        ui->labelFeeMinimized->setText(ui->labelSmartFee->text());
+    else {
+        ui->labelFeeMinimized->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ui->customFee->value()) +
+            ((ui->radioCustomPerKilobyte->isChecked()) ? "/kB" : ""));
+    }
+}
+
+void SendCoinsDialog::updateMinFeeLabel()
+{
+    if (model && model->getOptionsModel())
+        ui->checkBoxMinimumFee->setText(tr("Pay only the minimum fee of %1").arg(
+            BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::minTxFee.GetFeePerK()) + "/kB")
+        );
+}
+
+void SendCoinsDialog::updateSmartFeeLabel()
+{
+    if(!model || !model->getOptionsModel())
+        return;
+
+    int nBlocksToConfirm = (int)25 - (int)std::max(0, std::min(24, ui->sliderSmartFee->value()));
+    CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
+    if (feeRate <= CFeeRate(0)) // not enough data => minfee
+    {
+        ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::minTxFee.GetFeePerK()) + "/kB");
+        ui->labelSmartFee2->show(); // (Smart fee not initialized yet. This usually takes a few blocks...)
+        ui->labelFeeEstimation->setText("");
+    }
+    else
+    {
+        ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB");
+        ui->labelSmartFee2->hide();
+        ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %1 block(s).").arg(nBlocksToConfirm));
+    }
+
+    updateFeeMinimizedLabel();
+}
+
 // Coin Control: copy label "Quantity" to clipboard
 void SendCoinsDialog::coinControlClipboardQuantity()
 {
@@ -462,19 +648,19 @@ void SendCoinsDialog::coinControlClipboardAmount()
 // Coin Control: copy label "Fee" to clipboard
 void SendCoinsDialog::coinControlClipboardFee()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlFee->text().left(ui->labelCoinControlFee->text().indexOf(" ")).replace("~", ""));
 }
 
 // Coin Control: copy label "After fee" to clipboard
 void SendCoinsDialog::coinControlClipboardAfterFee()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlAfterFee->text().left(ui->labelCoinControlAfterFee->text().indexOf(" ")).replace("~", ""));
 }
 
 // Coin Control: copy label "Bytes" to clipboard
 void SendCoinsDialog::coinControlClipboardBytes()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlBytes->text());
+    GUIUtil::setClipboard(ui->labelCoinControlBytes->text().replace("~", ""));
 }
 
 // Coin Control: copy label "Priority" to clipboard
@@ -492,7 +678,7 @@ void SendCoinsDialog::coinControlClipboardLowOutput()
 // Coin Control: copy label "Change" to clipboard
 void SendCoinsDialog::coinControlClipboardChange()
 {
-    GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")));
+    GUIUtil::setClipboard(ui->labelCoinControlChange->text().left(ui->labelCoinControlChange->text().indexOf(" ")).replace("~", ""));
 }
 
 // Coin Control: settings menu - coin control enabled/disabled by user
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index eec661cbd0b5..15d39782a1ed 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -10,6 +10,7 @@
 #include <QDialog>
 #include <QString>
 
+class ClientModel;
 class OptionsModel;
 class SendCoinsEntry;
 class SendCoinsRecipient;
@@ -31,6 +32,7 @@ class SendCoinsDialog : public QDialog
     explicit SendCoinsDialog(QWidget *parent = 0);
     ~SendCoinsDialog();
 
+    void setClientModel(ClientModel *clientModel);
     void setModel(WalletModel *model);
 
     /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
@@ -52,16 +54,22 @@ public slots:
 
 private:
     Ui::SendCoinsDialog *ui;
+    ClientModel *clientModel;
     WalletModel *model;
     bool fNewRecipientAllowed;
+    bool fFeeMinimized;
 
     // Process WalletModel::SendCoinsReturn and generate a pair consisting
     // of a message and message flags for use in emit message().
     // Additional parameter msgArg can be used via .arg(msgArg).
     void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg = QString());
+    void minimizeFeeSection(bool fMinimize);
+    void updateFeeMinimizedLabel();
 
 private slots:
     void on_sendButton_clicked();
+    void on_buttonChooseFee_clicked();
+    void on_buttonMinimizeFee_clicked();
     void removeEntry(SendCoinsEntry* entry);
     void updateDisplayUnit();
     void coinControlFeatureChanged(bool);
@@ -77,6 +85,11 @@ private slots:
     void coinControlClipboardPriority();
     void coinControlClipboardLowOutput();
     void coinControlClipboardChange();
+    void setMinimumFee();
+    void updateFeeSectionControls();
+    void updateMinFeeLabel();
+    void updateSmartFeeLabel();
+    void updateGlobalFeeVariables();
 
 signals:
     // Fired when a message should be reported to the user
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index f7b1552f3ee1..b20465794d0a 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -277,6 +277,10 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
                          CClientUIInterface::MSG_ERROR);
             return TransactionCreationFailed;
         }
+
+        // reject insane fee > 0.1 bitcoin
+        if (nFeeRequired > 10000000)
+            return InsaneFee;
     }
 
     return SendCoinsReturn(OK);
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 0c6077963dbb..d7e391f8d16d 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -110,7 +110,8 @@ class WalletModel : public QObject
         AmountWithFeeExceedsBalance,
         DuplicateAddress,
         TransactionCreationFailed, // Error returned when wallet is still locked
-        TransactionCommitFailed
+        TransactionCommitFailed,
+        InsaneFee
     };
 
     enum EncryptionStatus
diff --git a/src/qt/walletmodeltransaction.cpp b/src/qt/walletmodeltransaction.cpp
index ddd2d09bb534..e9e20c7d5192 100644
--- a/src/qt/walletmodeltransaction.cpp
+++ b/src/qt/walletmodeltransaction.cpp
@@ -31,6 +31,11 @@ CWalletTx *WalletModelTransaction::getTransaction()
     return walletTransaction;
 }
 
+unsigned int WalletModelTransaction::getTransactionSize()
+{
+    return (!walletTransaction ? 0 : (::GetSerializeSize(*(CTransaction*)walletTransaction, SER_NETWORK, PROTOCOL_VERSION)));
+}
+
 CAmount WalletModelTransaction::getTransactionFee()
 {
     return fee;
diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h
index a880384ed634..4272529abe02 100644
--- a/src/qt/walletmodeltransaction.h
+++ b/src/qt/walletmodeltransaction.h
@@ -25,6 +25,7 @@ class WalletModelTransaction
     QList<SendCoinsRecipient> getRecipients();
 
     CWalletTx *getTransaction();
+    unsigned int getTransactionSize();
 
     void setTransactionFee(const CAmount& newFee);
     CAmount getTransactionFee();
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index 3b8fdd7e5fdf..9bab180108c4 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -101,6 +101,7 @@ void WalletView::setClientModel(ClientModel *clientModel)
     this->clientModel = clientModel;
 
     overviewPage->setClientModel(clientModel);
+    sendCoinsPage->setClientModel(clientModel);
 }
 
 void WalletView::setWalletModel(WalletModel *walletModel)
diff --git a/src/txmempool.h b/src/txmempool.h
index 0d3c8bba6a2c..e68b2181542f 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -15,11 +15,16 @@
 
 class CAutoFile;
 
+inline double AllowFreeThreshold()
+{
+    return COIN * 144 / 250;
+}
+
 inline bool AllowFree(double dPriority)
 {
     // Large (in bytes) low-priority (new, small-coin) transactions
     // need a fee.
-    return dPriority > COIN * 144 / 250;
+    return dPriority > AllowFreeThreshold();
 }
 
 /** Fake height value used in CCoins to signify they are only in the memory pool (since 0.8) */
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 2d59506baba9..5aea9881cd59 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -28,7 +28,7 @@ using namespace std;
 CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
-bool fSendFreeTransactions = true;
+bool fSendFreeTransactions = false;
 bool fPayAtLeastCustomFee = true;
 
 /** 
@@ -1384,10 +1384,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
     {
         LOCK2(cs_main, cs_wallet);
         {
-            if (fPayAtLeastCustomFee)
-                nFeeRet = payTxFee.GetFeePerK();
-            else
-                nFeeRet = 0;
+            nFeeRet = 0;
             while (true)
             {
                 txNew.vin.clear();
@@ -1636,6 +1633,9 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
     // prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
     if (nFeeNeeded > 0 && nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
         nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
+    // user selected total at least (default=true)
+    if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK())
+        nFeeNeeded = payTxFee.GetFeePerK();
     // User didn't set: use -txconfirmtarget to estimate...
     if (nFeeNeeded == 0)
         nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);

From b5d1b1092998bc95313856d535c632ea5a8f9104 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 19 Nov 2014 16:15:39 +0100
Subject: [PATCH 1054/1819] doc: add libgmp dependency for secp256k1

Also reorganize the document a bit.
---
 doc/build-unix.md | 43 ++++++++++++++++++++++++-------------------
 1 file changed, 24 insertions(+), 19 deletions(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index fb5eaec43136..e03dc8181a2b 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -27,31 +27,25 @@ This will build bitcoin-qt as well if the dependencies are met.
 Dependencies
 ---------------------
 
+These dependencies are required:
+
  Library     | Purpose          | Description
  ------------|------------------|----------------------
  libssl      | SSL Support      | Secure communications
- libdb4.8    | Berkeley DB      | Wallet storage
  libboost    | Boost            | C++ Library
- miniupnpc   | UPnP Support     | Optional firewall-jumping support
- qt          | GUI              | GUI toolkit
- protobuf    | Payments in GUI  | Data interchange format used for payment protocol
- libqrencode | QR codes in GUI  | Optional for generating QR codes
-
-[miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping.  It can be downloaded from [here](
-http://miniupnp.tuxfamily.org/files/).  UPnP support is compiled in and
-turned off by default.  See the configure options for upnp behavior desired:
+ libgmp      | secp256k1        | Arbitrary-precision arithmetic (version >= 3.1)
 
-	--without-miniupnpc      No UPnP support miniupnp not required
-	--disable-upnp-default   (the default) UPnP support turned off by default at runtime
-	--enable-upnp-default    UPnP support turned on by default at runtime
+Optional dependencies:
 
-Licenses of statically linked libraries:
- Berkeley DB   New BSD license with additional requirement that linked
-               software must be free open source
- Boost         MIT-like license
- miniupnpc     New (3-clause) BSD license
+ Library     | Purpose          | Description
+ ------------|------------------|----------------------
+ miniupnpc   | UPnP Support     | Firewall-jumping support
+ libdb4.8    | Berkeley DB      | Wallet storage (only needed when wallet enabled)
+ qt          | GUI              | GUI toolkit (only needed when GUI enabled)
+ protobuf    | Payments in GUI  | Data interchange format used for payment protocol (only needed when GUI enabled)
+ libqrencode | QR codes in GUI  | Optional for generating QR codes (only needed when GUI enabled)
 
-- For the versions used in the release, see doc/release-process.md under *Fetch and build inputs*.
+For the versions used in the release, see [release-process.md](release-process.md) under *Fetch and build inputs*.
 
 System requirements
 --------------------
@@ -64,7 +58,7 @@ Dependency Build Instructions: Ubuntu & Debian
 ----------------------------------------------
 Build requirements:
 
-	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
+	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libgmp-dev
 	
 for Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:
 
@@ -129,6 +123,17 @@ symbols, which reduces the executable size by about 90%.
 
 miniupnpc
 ---------
+
+[miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping.  It can be downloaded from [here](
+http://miniupnp.tuxfamily.org/files/).  UPnP support is compiled in and
+turned off by default.  See the configure options for upnp behavior desired:
+
+	--without-miniupnpc      No UPnP support miniupnp not required
+	--disable-upnp-default   (the default) UPnP support turned off by default at runtime
+	--enable-upnp-default    UPnP support turned on by default at runtime
+
+To build:
+
 	tar -xzvf miniupnpc-1.6.tar.gz
 	cd miniupnpc-1.6
 	make

From 8656dbb095bc392d8d348bb68124696a033997f8 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 19 Nov 2014 15:36:10 -0500
Subject: [PATCH 1055/1819] Port/fix txnmall.sh regression test

Ported txnmall.sh to Python, and updated to match
recent transaction malleability changes.

I also modified it so it tests both double-spending
confirmed and unconfirmed (only-in-mempool) transactions.

Renamed to txn_doublespend, since that is really what is
being tested. And told the pull-tester to run both
variations on this test.
---
 qa/pull-tester/rpc-tests.sh     |   2 +
 qa/rpc-tests/txn_doublespend.py | 120 +++++++++++++++++++++++++
 qa/rpc-tests/txnmall.sh         | 152 --------------------------------
 3 files changed, 122 insertions(+), 152 deletions(-)
 create mode 100755 qa/rpc-tests/txn_doublespend.py
 delete mode 100755 qa/rpc-tests/txnmall.sh

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index 0b5ad2064261..cc24a67c0852 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -18,6 +18,8 @@ fi
 if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --mineblock --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/txn_doublespend.py b/qa/rpc-tests/txn_doublespend.py
new file mode 100755
index 000000000000..6125147ebcc1
--- /dev/null
+++ b/qa/rpc-tests/txn_doublespend.py
@@ -0,0 +1,120 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
+#
+# Test proper accounting with malleable transactions
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from decimal import Decimal
+from util import *
+import os
+import shutil
+
+class TxnMallTest(BitcoinTestFramework):
+
+    def add_options(self, parser):
+        parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true",
+                          help="Test double-spend of 1-confirmed transaction")
+
+    def setup_network(self):
+        # Start with split network:
+        return super(TxnMallTest, self).setup_network(True)
+
+    def run_test(self):
+        # All nodes should start with 1,250 BTC:
+        starting_balance = 1250
+        for i in range(4):
+            assert_equal(self.nodes[i].getbalance(), starting_balance)
+            self.nodes[i].getnewaddress("")  # bug workaround, coins generated assigned to first getnewaddress!
+        
+        # Assign coins to foo and bar accounts:
+        self.nodes[0].move("", "foo", 1220)
+        self.nodes[0].move("", "bar", 30)
+        assert_equal(self.nodes[0].getbalance(""), 0)
+
+        # Coins are sent to node1_address
+        node1_address = self.nodes[1].getnewaddress("from0")
+
+        # First: use raw transaction API to send 1210 BTC to node1_address,
+        # but don't broadcast:
+        (total_in, inputs) = gather_inputs(self.nodes[0], 1210)
+        change_address = self.nodes[0].getnewaddress("foo")
+        outputs = {}
+        outputs[change_address] = 40
+        outputs[node1_address] = 1210
+        rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
+        doublespend = self.nodes[0].signrawtransaction(rawtx)
+        assert_equal(doublespend["complete"], True)
+
+        # Create two transaction from node[0] to node[1]; the
+        # second must spend change from the first because the first
+        # spends all mature inputs:
+        txid1 = self.nodes[0].sendfrom("foo", node1_address, 1210, 0)
+        txid2 = self.nodes[0].sendfrom("bar", node1_address, 20, 0)
+        
+        # Have node0 mine a block:
+        if (self.options.mine_block):
+            self.nodes[0].setgenerate(True, 1)
+            sync_blocks(self.nodes[0:2])
+
+        tx1 = self.nodes[0].gettransaction(txid1)
+        tx2 = self.nodes[0].gettransaction(txid2)
+
+        # Node0's balance should be starting balance, plus 50BTC for another
+        # matured block, minus 1210, minus 20, and minus transaction fees:
+        expected = starting_balance
+        if self.options.mine_block: expected += 50
+        expected += tx1["amount"] + tx1["fee"]
+        expected += tx2["amount"] + tx2["fee"]
+        assert_equal(self.nodes[0].getbalance(), expected)
+
+        # foo and bar accounts should be debited:
+        assert_equal(self.nodes[0].getbalance("foo"), 1220+tx1["amount"]+tx1["fee"])
+        assert_equal(self.nodes[0].getbalance("bar"), 30+tx2["amount"]+tx2["fee"])
+
+        if self.options.mine_block:
+            assert_equal(tx1["confirmations"], 1)
+            assert_equal(tx2["confirmations"], 1)
+            # Node1's "from0" balance should be both transaction amounts:
+            assert_equal(self.nodes[1].getbalance("from0"), -(tx1["amount"]+tx2["amount"]))
+        else:
+            assert_equal(tx1["confirmations"], 0)
+            assert_equal(tx2["confirmations"], 0)
+        
+        # Now give doublespend to miner:
+        mutated_txid = self.nodes[2].sendrawtransaction(doublespend["hex"])
+        # ... mine a block...
+        self.nodes[2].setgenerate(True, 1)
+
+        # Reconnect the split network, and sync chain:
+        connect_nodes(self.nodes[1], 2)
+        self.nodes[2].setgenerate(True, 1)  # Mine another block to make sure we sync
+        sync_blocks(self.nodes)
+
+        # Re-fetch transaction info:
+        tx1 = self.nodes[0].gettransaction(txid1)
+        tx2 = self.nodes[0].gettransaction(txid2)
+        
+        # Both transactions should be conflicted
+        assert_equal(tx1["confirmations"], -1)
+        assert_equal(tx2["confirmations"], -1)
+
+        # Node0's total balance should be starting balance, plus 100BTC for 
+        # two more matured blocks, minus 1210 for the double-spend:
+        expected = starting_balance + 100 - 1210
+        assert_equal(self.nodes[0].getbalance(), expected)
+        assert_equal(self.nodes[0].getbalance("*"), expected)
+
+        # foo account should be debited, but bar account should not:
+        assert_equal(self.nodes[0].getbalance("foo"), 1220-1210)
+        assert_equal(self.nodes[0].getbalance("bar"), 30)
+
+        # Node1's "from" account balance should be just the mutated send:
+        assert_equal(self.nodes[1].getbalance("from0"), 1210)
+
+if __name__ == '__main__':
+    TxnMallTest().main()
diff --git a/qa/rpc-tests/txnmall.sh b/qa/rpc-tests/txnmall.sh
deleted file mode 100755
index 1296d54d92d7..000000000000
--- a/qa/rpc-tests/txnmall.sh
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 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.
-
-# Test proper accounting with malleable transactions
-
-if [ $# -lt 1 ]; then
-        echo "Usage: $0 path_to_binaries"
-        echo "e.g. $0 ../../src"
-        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
-        exit 1
-fi
-
-set -f
-
-BITCOIND=${BITCOIND:-${1}/bitcoind}
-CLI=${BITCOINCLI:-${1}/bitcoin-cli}
-
-DIR="${BASH_SOURCE%/*}"
-SENDANDWAIT="${DIR}/send.sh"
-if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
-. "$DIR/util.sh"
-
-D=$(mktemp -d test.XXXXX)
-
-# Two nodes; one will play the part of merchant, the
-# other an evil transaction-mutating miner.
-
-D1=${D}/node1
-CreateDataDir $D1 port=11000 rpcport=11001
-B1ARGS="-datadir=$D1"
-$BITCOIND $B1ARGS &
-B1PID=$!
-
-D2=${D}/node2
-CreateDataDir $D2 port=11010 rpcport=11011
-B2ARGS="-datadir=$D2"
-$BITCOIND $B2ARGS &
-B2PID=$!
-
-# Wait until both nodes are at the same block number
-function WaitBlocks {
-    while :
-    do
-        sleep 1
-        declare -i BLOCKS1=$( GetBlocks $B1ARGS )
-        declare -i BLOCKS2=$( GetBlocks $B2ARGS )
-        if (( BLOCKS1 == BLOCKS2 ))
-        then
-            break
-        fi
-    done
-}
-
-# Wait until node has $N peers
-function WaitPeers {
-    while :
-    do
-        declare -i PEERS=$( $CLI $1 getconnectioncount )
-        if (( PEERS == "$2" ))
-        then
-            break
-        fi
-        sleep 1
-    done
-}
-
-echo "Generating test blockchain..."
-
-# Start with B2 connected to B1:
-$CLI $B2ARGS addnode 127.0.0.1:11000 onetry
-WaitPeers "$B1ARGS" 1
-
-# 1 block, 50 XBT each == 50 XBT
-$CLI $B1ARGS setgenerate true 1
-
-WaitBlocks
-# 100 blocks, 0 mature == 0 XBT
-$CLI $B2ARGS setgenerate true 100
-WaitBlocks
-
-CheckBalance "$B1ARGS" 50
-CheckBalance "$B2ARGS" 0
-
-# restart B2 with no connection
-$CLI $B2ARGS stop > /dev/null 2>&1
-wait $B2PID
-$BITCOIND $B2ARGS &
-B2PID=$!
-
-B2ADDRESS=$( $CLI $B2ARGS getaccountaddress "from1" )
-
-# Have B1 create two transactions; second will
-# spend change from first, since B1 starts with only a single
-# 50 bitcoin output:
-$CLI $B1ARGS move "" "foo" 10.0 > /dev/null
-$CLI $B1ARGS move "" "bar" 10.0 > /dev/null
-TXID1=$( $CLI $B1ARGS sendfrom foo $B2ADDRESS 1.0 0)
-TXID2=$( $CLI $B1ARGS sendfrom bar $B2ADDRESS 2.0 0)
-
-# Mutate TXID1 and add it to B2's memory pool:
-RAWTX1=$( $CLI $B1ARGS getrawtransaction $TXID1 )
-# RAWTX1 is hex-encoded, serialized transaction. So each
-# byte is two characters; we'll prepend the first
-# "push" in the scriptsig with OP_PUSHDATA1 (0x4c),
-# and add one to the length of the signature.
-# Fields are fixed; from the beginning:
-# 4-byte version
-# 1-byte varint number-of inputs (one in this case)
-# 32-byte previous txid
-# 4-byte previous output
-# 1-byte varint length-of-scriptsig
-# 1-byte PUSH this many bytes onto stack
-#  ... etc
-# So: to mutate, we want to get byte 41 (hex characters 82-83),
-# increment it, and insert 0x4c after it.
-L=${RAWTX1:82:2}
-NEWLEN=$( printf "%x" $(( 16#$L + 1 )) )
-MUTATEDTX1=${RAWTX1:0:82}${NEWLEN}4c${RAWTX1:84}
-# ... give mutated tx1 to B2:
-MUTATEDTXID=$( $CLI $B2ARGS sendrawtransaction $MUTATEDTX1 )
-
-echo "TXID1: " $TXID1
-echo "Mutated: " $MUTATEDTXID
-
-# Re-connect nodes, and have B2 mine a block
-# containing the mutant:
-$CLI $B2ARGS addnode 127.0.0.1:11000 onetry
-$CLI $B2ARGS setgenerate true 1
-WaitBlocks
-
-# B1 should have 49 BTC; the 2 BTC send is
-# conflicted, and should not count in
-# balances.
-CheckBalance "$B1ARGS" 49
-CheckBalance "$B1ARGS" 49 "*"
-CheckBalance "$B1ARGS" 9 "foo"
-CheckBalance "$B1ARGS" 10 "bar"
-
-# B2 should have 51 BTC
-CheckBalance "$B2ARGS" 51
-CheckBalance "$B2ARGS" 1 "from1"
-
-$CLI $B2ARGS stop > /dev/null 2>&1
-wait $B2PID
-$CLI $B1ARGS stop > /dev/null 2>&1
-wait $B1PID
-
-echo "Tests successful, cleaning up"
-rm -rf $D
-exit 0

From 77c38bb5cc7349b5b0159f04e769f863e76aad7b Mon Sep 17 00:00:00 2001
From: Glenn Willen <gwillen@nerdnet.org>
Date: Wed, 19 Nov 2014 15:13:02 -0800
Subject: [PATCH 1056/1819] Truthier error message when rpcpassword is missing

---
 src/rpcserver.cpp | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 01005c1ceec9..7022c5037580 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -565,13 +565,8 @@ void StartRPCThreads()
     {
         unsigned char rand_pwd[32];
         GetRandBytes(rand_pwd, 32);
-        string strWhatAmI = "To use bitcoind";
-        if (mapArgs.count("-server"))
-            strWhatAmI = strprintf(_("To use the %s option"), "\"-server\"");
-        else if (mapArgs.count("-daemon"))
-            strWhatAmI = strprintf(_("To use the %s option"), "\"-daemon\"");
         uiInterface.ThreadSafeMessageBox(strprintf(
-            _("%s, you must set a rpcpassword in the configuration file:\n"
+            _("To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:\n"
               "%s\n"
               "It is recommended you use the following random password:\n"
               "rpcuser=bitcoinrpc\n"
@@ -581,7 +576,6 @@ void StartRPCThreads()
               "If the file does not exist, create it with owner-readable-only file permissions.\n"
               "It is also recommended to set alertnotify so you are notified of problems;\n"
               "for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
-                strWhatAmI,
                 GetConfigFile().string(),
                 EncodeBase58(&rand_pwd[0],&rand_pwd[0]+32)),
                 "", CClientUIInterface::MSG_ERROR | CClientUIInterface::SECURE);

From 9765a50cbdbcb45cc87c51e301663c2b29ff1bf8 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 10 Sep 2012 02:55:03 +0000
Subject: [PATCH 1057/1819] Implement BIP 23 Block Proposal

---
 src/rpcmining.cpp | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 577f377796f3..0d49fb34d2dd 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -379,6 +379,36 @@ Value getblocktemplate(const Array& params, bool fHelp)
         else
             throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
         lpval = find_value(oparam, "longpollid");
+
+        if (strMode == "proposal")
+        {
+            const Value& dataval = find_value(oparam, "data");
+            if (dataval.type() != str_type)
+                throw JSONRPCError(RPC_TYPE_ERROR, "Missing data String key for proposal");
+
+            CBlock block;
+            if (!DecodeHexBlk(block, dataval.get_str()))
+                throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
+
+            uint256 hash = block.GetHash();
+            BlockMap::iterator mi = mapBlockIndex.find(hash);
+            if (mi != mapBlockIndex.end()) {
+                CBlockIndex *pindex = mi->second;
+                if (pindex->IsValid(BLOCK_VALID_SCRIPTS))
+                    return "duplicate";
+                if (pindex->nStatus & BLOCK_FAILED_MASK)
+                    return "duplicate-invalid";
+                return "duplicate-inconclusive";
+            }
+
+            CBlockIndex* const pindexPrev = chainActive.Tip();
+            // TestBlockValidity only supports blocks built on the current Tip
+            if (block.hashPrevBlock != pindexPrev->GetBlockHash())
+                return "inconclusive-not-best-prevblk";
+            CValidationState state;
+            TestBlockValidity(state, block, pindexPrev, false, true);
+            return BIP22ValidationResult(state);
+        }
     }
 
     if (strMode != "template")
@@ -481,6 +511,8 @@ Value getblocktemplate(const Array& params, bool fHelp)
     UpdateTime(pblock, pindexPrev);
     pblock->nNonce = 0;
 
+    static const Array aCaps = boost::assign::list_of("proposal");
+
     Array transactions;
     map<uint256, int64_t> setTxIndex;
     int i = 0;
@@ -527,6 +559,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     }
 
     Object result;
+    result.push_back(Pair("capabilities", aCaps));
     result.push_back(Pair("version", pblock->nVersion));
     result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex()));
     result.push_back(Pair("transactions", transactions));

From bc6cb4177b143bf1c3d0fad065d3a4de6df97ef9 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 17 Nov 2014 18:47:40 +0000
Subject: [PATCH 1058/1819] QA RPC tests: Add tests block block proposals

---
 ...mplate.py => getblocktemplate_longpoll.py} |   6 +-
 qa/rpc-tests/getblocktemplate_proposals.py    | 182 ++++++++++++++++++
 2 files changed, 184 insertions(+), 4 deletions(-)
 rename qa/rpc-tests/{getblocktemplate.py => getblocktemplate_longpoll.py} (96%)
 create mode 100755 qa/rpc-tests/getblocktemplate_proposals.py

diff --git a/qa/rpc-tests/getblocktemplate.py b/qa/rpc-tests/getblocktemplate_longpoll.py
similarity index 96%
rename from qa/rpc-tests/getblocktemplate.py
rename to qa/rpc-tests/getblocktemplate_longpoll.py
index 500662bf87f1..263a5f6d59c6 100755
--- a/qa/rpc-tests/getblocktemplate.py
+++ b/qa/rpc-tests/getblocktemplate_longpoll.py
@@ -3,8 +3,6 @@
 # Distributed under the MIT software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-# Exercise the listtransactions API
-
 from test_framework import BitcoinTestFramework
 from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
 from util import *
@@ -46,7 +44,7 @@ def __init__(self, node):
     def run(self):
         self.node.getblocktemplate({'longpollid':self.longpollid})
 
-class GetBlockTemplateTest(BitcoinTestFramework):
+class GetBlockTemplateLPTest(BitcoinTestFramework):
     '''
     Test longpolling with getblocktemplate.
     '''
@@ -90,5 +88,5 @@ def run_test(self):
         assert(not thr.is_alive())
 
 if __name__ == '__main__':
-    GetBlockTemplateTest().main()
+    GetBlockTemplateLPTest().main()
 
diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py
new file mode 100755
index 000000000000..0f7859584a42
--- /dev/null
+++ b/qa/rpc-tests/getblocktemplate_proposals.py
@@ -0,0 +1,182 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+from binascii import a2b_hex, b2a_hex
+from hashlib import sha256
+from struct import pack
+
+
+def check_array_result(object_array, to_match, expected):
+    """
+    Pass in array of JSON objects, a dictionary with key/value pairs
+    to match against, and another dictionary with expected key/value
+    pairs.
+    """
+    num_matched = 0
+    for item in object_array:
+        all_match = True
+        for key,value in to_match.items():
+            if item[key] != value:
+                all_match = False
+        if not all_match:
+            continue
+        for key,value in expected.items():
+            if item[key] != value:
+                raise AssertionError("%s : expected %s=%s"%(str(item), str(key), str(value)))
+            num_matched = num_matched+1
+    if num_matched == 0:
+        raise AssertionError("No objects matched %s"%(str(to_match)))
+
+def b2x(b):
+    return b2a_hex(b).decode('ascii')
+
+# NOTE: This does not work for signed numbers (set the high bit) or zero (use b'\0')
+def encodeUNum(n):
+    s = bytearray(b'\1')
+    while n > 127:
+        s[0] += 1
+        s.append(n % 256)
+        n //= 256
+    s.append(n)
+    return bytes(s)
+
+def varlenEncode(n):
+    if n < 0xfd:
+        return pack('<B', n)
+    if n <= 0xffff:
+        return b'\xfd' + pack('<H', n)
+    if n <= 0xffffffff:
+        return b'\xfe' + pack('<L', n)
+    return b'\xff' + pack('<Q', n)
+
+def dblsha(b):
+    return sha256(sha256(b).digest()).digest()
+
+def genmrklroot(leaflist):
+    cur = leaflist
+    while len(cur) > 1:
+        n = []
+        if len(cur) & 1:
+            cur.append(cur[-1])
+        for i in range(0, len(cur), 2):
+            n.append(dblsha(cur[i] + cur[i+1]))
+        cur = n
+    return cur[0]
+
+def template_to_bytes(tmpl, txlist):
+    blkver = pack('<L', tmpl['version'])
+    mrklroot = genmrklroot(list(dblsha(a) for a in txlist))
+    timestamp = pack('<L', tmpl['curtime'])
+    nonce = b'\0\0\0\0'
+    blk = blkver + a2b_hex(tmpl['previousblockhash'])[::-1] + mrklroot + timestamp + a2b_hex(tmpl['bits'])[::-1] + nonce
+    blk += varlenEncode(len(txlist))
+    for tx in txlist:
+        blk += tx
+    return blk
+
+def template_to_hex(tmpl, txlist):
+    return b2x(template_to_bytes(tmpl, txlist))
+
+def assert_template(node, tmpl, txlist, expect):
+    rsp = node.getblocktemplate({'data':template_to_hex(tmpl, txlist),'mode':'proposal'})
+    if rsp != expect:
+        raise AssertionError('unexpected: %s' % (rsp,))
+
+class GetBlockTemplateProposalTest(BitcoinTestFramework):
+    '''
+    Test block proposals with getblocktemplate.
+    '''
+
+    def run_test(self):
+        node = self.nodes[0]
+        tmpl = node.getblocktemplate()
+        if 'coinbasetxn' not in tmpl:
+            rawcoinbase = encodeUNum(tmpl['height'])
+            rawcoinbase += b'\x01-'
+            hexcoinbase = b2x(rawcoinbase)
+            hexoutval = b2x(pack('<Q', tmpl['coinbasevalue']))
+            tmpl['coinbasetxn'] = {'data': '01000000' + '01' + '0000000000000000000000000000000000000000000000000000000000000000ffffffff' + ('%02x' % (len(rawcoinbase),)) + hexcoinbase + 'fffffffe' + '01' + hexoutval + '00' + '00000000'}
+        txlist = list(bytearray(a2b_hex(a['data'])) for a in (tmpl['coinbasetxn'],) + tuple(tmpl['transactions']))
+
+        # Test 0: Capability advertised
+        assert('proposal' in tmpl['capabilities'])
+
+        # NOTE: This test currently FAILS (regtest mode doesn't enforce block height in coinbase)
+        ## Test 1: Bad height in coinbase
+        #txlist[0][4+1+36+1+1] += 1
+        #assert_template(node, tmpl, txlist, 'FIXME')
+        #txlist[0][4+1+36+1+1] -= 1
+
+        # Test 2: Bad input hash for gen tx
+        txlist[0][4+1] += 1
+        assert_template(node, tmpl, txlist, 'bad-cb-missing')
+        txlist[0][4+1] -= 1
+
+        # Test 3: Truncated final tx
+        lastbyte = txlist[-1].pop()
+        try:
+            assert_template(node, tmpl, txlist, 'n/a')
+        except JSONRPCException:
+            pass  # Expected
+        txlist[-1].append(lastbyte)
+
+        # Test 4: Add an invalid tx to the end (duplicate of gen tx)
+        txlist.append(txlist[0])
+        assert_template(node, tmpl, txlist, 'bad-txns-duplicate')
+        txlist.pop()
+
+        # Test 5: Add an invalid tx to the end (non-duplicate)
+        txlist.append(bytearray(txlist[0]))
+        txlist[-1][4+1] = b'\xff'
+        assert_template(node, tmpl, txlist, 'bad-txns-inputs-missingorspent')
+        txlist.pop()
+
+        # Test 6: Future tx lock time
+        txlist[0][-4:] = b'\xff\xff\xff\xff'
+        assert_template(node, tmpl, txlist, 'bad-txns-nonfinal')
+        txlist[0][-4:] = b'\0\0\0\0'
+
+        # Test 7: Bad tx count
+        txlist.append(b'')
+        try:
+            assert_template(node, tmpl, txlist, 'n/a')
+        except JSONRPCException:
+            pass  # Expected
+        txlist.pop()
+
+        # Test 8: Bad bits
+        realbits = tmpl['bits']
+        tmpl['bits'] = '1c0000ff'  # impossible in the real world
+        assert_template(node, tmpl, txlist, 'bad-diffbits')
+        tmpl['bits'] = realbits
+
+        # Test 9: Bad merkle root
+        rawtmpl = template_to_bytes(tmpl, txlist)
+        rawtmpl[4+32] = (rawtmpl[4+32] + 1) % 0x100
+        rsp = node.getblocktemplate({'data':b2x(rawtmpl),'mode':'proposal'})
+        if rsp != 'bad-txnmrklroot':
+            raise AssertionError('unexpected: %s' % (rsp,))
+
+        # Test 10: Bad timestamps
+        realtime = tmpl['curtime']
+        tmpl['curtime'] = 0x7fffffff
+        assert_template(node, tmpl, txlist, 'time-too-new')
+        tmpl['curtime'] = 0
+        assert_template(node, tmpl, txlist, 'time-too-old')
+        tmpl['curtime'] = realtime
+
+        # Test 11: Valid block
+        assert_template(node, tmpl, txlist, None)
+
+        # Test 12: Orphan block
+        tmpl['previousblockhash'] = 'ff00' * 16
+        assert_template(node, tmpl, txlist, 'inconclusive-not-best-prevblk')
+
+if __name__ == '__main__':
+    GetBlockTemplateProposalTest().main()

From 60755dbf762cd36bb01859b5e9b0bd4447f23229 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 18 Nov 2014 19:09:20 +0000
Subject: [PATCH 1059/1819] submitblock: Check for duplicate submissions
 explicitly

---
 src/rpcmining.cpp | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 0d49fb34d2dd..7a2b6c778928 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -618,15 +618,32 @@ Value submitblock(const Array& params, bool fHelp)
             + HelpExampleRpc("submitblock", "\"mydata\"")
         );
 
-    CBlock pblock;
-    if (!DecodeHexBlk(pblock, params[0].get_str()))
+    CBlock block;
+    if (!DecodeHexBlk(block, params[0].get_str()))
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
 
+    uint256 hash = block.GetHash();
+    BlockMap::iterator mi = mapBlockIndex.find(hash);
+    if (mi != mapBlockIndex.end()) {
+        CBlockIndex *pindex = mi->second;
+        if (pindex->IsValid(BLOCK_VALID_SCRIPTS))
+            return "duplicate";
+        if (pindex->nStatus & BLOCK_FAILED_MASK)
+            return "duplicate-invalid";
+        // Otherwise, we might only have the header - process the block before returning
+    }
+
     CValidationState state;
-    submitblock_StateCatcher sc(pblock.GetHash());
+    submitblock_StateCatcher sc(block.GetHash());
     RegisterValidationInterface(&sc);
-    bool fAccepted = ProcessNewBlock(state, NULL, &pblock);
+    bool fAccepted = ProcessNewBlock(state, NULL, &block);
     UnregisterValidationInterface(&sc);
+    if (mi != mapBlockIndex.end())
+    {
+        if (fAccepted && !sc.found)
+            return "duplicate-inconclusive";
+        return "duplicate";
+    }
     if (fAccepted)
     {
         if (!sc.found)

From 72fb3d295ab14d7e6b876d709be23bae1289dab2 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Thu, 20 Nov 2014 10:19:29 +0800
Subject: [PATCH 1060/1819] Update comments in src/rpc* to be doxygen
 compatible

---
 src/rpcblockchain.cpp     |  6 ++--
 src/rpcclient.cpp         | 10 +++---
 src/rpcclient.h           |  4 +--
 src/rpcdump.cpp           |  2 +-
 src/rpcmining.cpp         | 12 ++++---
 src/rpcmisc.cpp           | 10 +++---
 src/rpcnet.cpp            |  2 +-
 src/rpcprotocol.cpp       | 34 +++++++++---------
 src/rpcprotocol.h         | 72 +++++++++++++++++++--------------------
 src/rpcrawtransaction.cpp |  2 +-
 src/rpcserver.h           |  7 ++--
 src/rpcwallet.cpp         |  2 +-
 12 files changed, 83 insertions(+), 80 deletions(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index a7cd63bd957b..7919fb1a0cb4 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "checkpoints.h"
@@ -468,7 +468,7 @@ Value getblockchaininfo(const Array& params, bool fHelp)
     return obj;
 }
 
-/* Comparison function for sorting the getchaintips heads.  */
+/** Comparison function for sorting the getchaintips heads.  */
 struct CompareBlocksByHeight
 {
     bool operator()(const CBlockIndex* a, const CBlockIndex* b) const
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 7a1f1918f634..03ce9acbbf7b 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "rpcclient.h"
@@ -18,8 +18,8 @@ using namespace json_spirit;
 class CRPCConvertParam
 {
 public:
-    std::string methodName;            // method whose params want conversion
-    int paramIdx;                      // 0-based idx of param to convert
+    std::string methodName;            //! method whose params want conversion
+    int paramIdx;                      //! 0-based idx of param to convert
 };
 
 static const CRPCConvertParam vRPCConvertParams[] =
@@ -116,7 +116,7 @@ CRPCConvertTable::CRPCConvertTable()
 
 static CRPCConvertTable rpcCvtTable;
 
-// Convert strings to command-specific RPC representation
+/** Convert strings to command-specific RPC representation */
 Array RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
 {
     Array params;
diff --git a/src/rpcclient.h b/src/rpcclient.h
index cd11f177e829..a91c2eb0332a 100644
--- a/src/rpcclient.h
+++ b/src/rpcclient.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_RPCCLIENT_H
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 9da0a7d091b3..c3ffe38cc3ea 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 2bde02c0a12b..81120ba9819e 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "amount.h"
@@ -28,9 +28,11 @@
 using namespace json_spirit;
 using namespace std;
 
-// Return average network hashes per second based on the last 'lookup' blocks,
-// or from the last difficulty change if 'lookup' is nonpositive.
-// If 'height' is nonnegative, compute the estimate at the time when a given block was found.
+/**
+ * Return average network hashes per second based on the last 'lookup' blocks,
+ * or from the last difficulty change if 'lookup' is nonpositive.
+ * If 'height' is nonnegative, compute the estimate at the time when a given block was found.
+ */
 Value GetNetworkHashPS(int lookup, int height) {
     CBlockIndex *pb = chainActive.Tip();
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 31eaae616288..90b9c99caa0b 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
@@ -30,7 +30,7 @@ using namespace std;
 
 /**
  * @note Do not add or change anything in the information returned by this
- * method. `getinfo` exists for backwards-compatibilty only. It combines
+ * method. `getinfo` exists for backwards-compatibility only. It combines
  * information from wildly different sources in the program, which is a mess,
  * and is thus planned to be deprecated eventually.
  *
@@ -198,9 +198,9 @@ Value validateaddress(const Array& params, bool fHelp)
     return ret;
 }
 
-//
-// Used by addmultisigaddress / createmultisig:
-//
+/**
+ * Used by addmultisigaddress / createmultisig:
+ */
 CScript _createmultisig_redeemScript(const Array& params)
 {
     int nRequired = params[0].get_int();
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 46b5f3d7ad85..6ddbd62fca8a 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "rpcserver.h"
diff --git a/src/rpcprotocol.cpp b/src/rpcprotocol.cpp
index c2ce73106f42..2f7c491f3d41 100644
--- a/src/rpcprotocol.cpp
+++ b/src/rpcprotocol.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "rpcprotocol.h"
@@ -30,15 +30,15 @@ using namespace boost;
 using namespace boost::asio;
 using namespace json_spirit;
 
-// Number of bytes to allocate and read at most at once in post data
+//! Number of bytes to allocate and read at most at once in post data
 const size_t POST_READ_SIZE = 256 * 1024;
 
-//
-// HTTP protocol
-//
-// This ain't Apache.  We're just using HTTP header for the length field
-// and to be compatible with other JSON-RPC implementations.
-//
+/**
+ * HTTP protocol
+ * 
+ * This ain't Apache.  We're just using HTTP header for the length field
+ * and to be compatible with other JSON-RPC implementations.
+ */
 
 string HTTPPost(const string& strMsg, const map<string,string>& mapRequestHeaders)
 {
@@ -246,15 +246,15 @@ int ReadHTTPMessage(std::basic_istream<char>& stream, map<string,
     return HTTP_OK;
 }
 
-//
-// JSON-RPC protocol.  Bitcoin speaks version 1.0 for maximum compatibility,
-// but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
-// unspecified (HTTP errors and contents of 'error').
-//
-// 1.0 spec: http://json-rpc.org/wiki/specification
-// 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
-// http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
-//
+/**
+ * JSON-RPC protocol.  Bitcoin speaks version 1.0 for maximum compatibility,
+ * but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
+ * unspecified (HTTP errors and contents of 'error').
+ * 
+ * 1.0 spec: http://json-rpc.org/wiki/specification
+ * 1.2 spec: http://jsonrpc.org/historical/json-rpc-over-http.html
+ * http://www.codeproject.com/KB/recipes/JSON_Spirit.aspx
+ */
 
 string JSONRPCRequest(const string& strMethod, const Array& params, const Value& id)
 {
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index f0d0f3445cd4..a32133817657 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_RPCPROTOCOL_H
@@ -19,7 +19,7 @@
 #include "json/json_spirit_utils.h"
 #include "json/json_spirit_writer_template.h"
 
-// HTTP status codes
+//! HTTP status codes
 enum HTTPStatusCode
 {
     HTTP_OK                    = 200,
@@ -30,56 +30,56 @@ enum HTTPStatusCode
     HTTP_INTERNAL_SERVER_ERROR = 500,
 };
 
-// Bitcoin RPC error codes
+//! Bitcoin RPC error codes
 enum RPCErrorCode
 {
-    // Standard JSON-RPC 2.0 errors
+    //! Standard JSON-RPC 2.0 errors
     RPC_INVALID_REQUEST  = -32600,
     RPC_METHOD_NOT_FOUND = -32601,
     RPC_INVALID_PARAMS   = -32602,
     RPC_INTERNAL_ERROR   = -32603,
     RPC_PARSE_ERROR      = -32700,
 
-    // General application defined errors
-    RPC_MISC_ERROR                  = -1,  // std::exception thrown in command handling
-    RPC_FORBIDDEN_BY_SAFE_MODE      = -2,  // Server is in safe mode, and command is not allowed in safe mode
-    RPC_TYPE_ERROR                  = -3,  // Unexpected type was passed as parameter
-    RPC_INVALID_ADDRESS_OR_KEY      = -5,  // Invalid address or key
-    RPC_OUT_OF_MEMORY               = -7,  // Ran out of memory during operation
-    RPC_INVALID_PARAMETER           = -8,  // Invalid, missing or duplicate parameter
-    RPC_DATABASE_ERROR              = -20, // Database error
-    RPC_DESERIALIZATION_ERROR       = -22, // Error parsing or validating structure in raw format
-    RPC_VERIFY_ERROR                = -25, // General error during transaction or block submission
-    RPC_VERIFY_REJECTED             = -26, // Transaction or block was rejected by network rules
-    RPC_VERIFY_ALREADY_IN_CHAIN     = -27, // Transaction already in chain
-    RPC_IN_WARMUP                   = -28, // Client still warming up
+    //! General application defined errors
+    RPC_MISC_ERROR                  = -1,  //! std::exception thrown in command handling
+    RPC_FORBIDDEN_BY_SAFE_MODE      = -2,  //! Server is in safe mode, and command is not allowed in safe mode
+    RPC_TYPE_ERROR                  = -3,  //! Unexpected type was passed as parameter
+    RPC_INVALID_ADDRESS_OR_KEY      = -5,  //! Invalid address or key
+    RPC_OUT_OF_MEMORY               = -7,  //! Ran out of memory during operation
+    RPC_INVALID_PARAMETER           = -8,  //! Invalid, missing or duplicate parameter
+    RPC_DATABASE_ERROR              = -20, //! Database error
+    RPC_DESERIALIZATION_ERROR       = -22, //! Error parsing or validating structure in raw format
+    RPC_VERIFY_ERROR                = -25, //! General error during transaction or block submission
+    RPC_VERIFY_REJECTED             = -26, //! Transaction or block was rejected by network rules
+    RPC_VERIFY_ALREADY_IN_CHAIN     = -27, //! Transaction already in chain
+    RPC_IN_WARMUP                   = -28, //! Client still warming up
 
-    // Aliases for backward compatibility
+    //! Aliases for backward compatibility
     RPC_TRANSACTION_ERROR           = RPC_VERIFY_ERROR,
     RPC_TRANSACTION_REJECTED        = RPC_VERIFY_REJECTED,
     RPC_TRANSACTION_ALREADY_IN_CHAIN= RPC_VERIFY_ALREADY_IN_CHAIN,
 
-    // P2P client errors
-    RPC_CLIENT_NOT_CONNECTED        = -9,  // Bitcoin is not connected
-    RPC_CLIENT_IN_INITIAL_DOWNLOAD  = -10, // Still downloading initial blocks
-    RPC_CLIENT_NODE_ALREADY_ADDED   = -23, // Node is already added
-    RPC_CLIENT_NODE_NOT_ADDED       = -24, // Node has not been added before
+    //! P2P client errors
+    RPC_CLIENT_NOT_CONNECTED        = -9,  //! Bitcoin is not connected
+    RPC_CLIENT_IN_INITIAL_DOWNLOAD  = -10, //! Still downloading initial blocks
+    RPC_CLIENT_NODE_ALREADY_ADDED   = -23, //! Node is already added
+    RPC_CLIENT_NODE_NOT_ADDED       = -24, //! Node has not been added before
 
-    // Wallet errors
-    RPC_WALLET_ERROR                = -4,  // Unspecified problem with wallet (key not found etc.)
-    RPC_WALLET_INSUFFICIENT_FUNDS   = -6,  // Not enough funds in wallet or account
-    RPC_WALLET_INVALID_ACCOUNT_NAME = -11, // Invalid account name
-    RPC_WALLET_KEYPOOL_RAN_OUT      = -12, // Keypool ran out, call keypoolrefill first
-    RPC_WALLET_UNLOCK_NEEDED        = -13, // Enter the wallet passphrase with walletpassphrase first
-    RPC_WALLET_PASSPHRASE_INCORRECT = -14, // The wallet passphrase entered was incorrect
-    RPC_WALLET_WRONG_ENC_STATE      = -15, // Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
-    RPC_WALLET_ENCRYPTION_FAILED    = -16, // Failed to encrypt the wallet
-    RPC_WALLET_ALREADY_UNLOCKED     = -17, // Wallet is already unlocked
+    //! Wallet errors
+    RPC_WALLET_ERROR                = -4,  //! Unspecified problem with wallet (key not found etc.)
+    RPC_WALLET_INSUFFICIENT_FUNDS   = -6,  //! Not enough funds in wallet or account
+    RPC_WALLET_INVALID_ACCOUNT_NAME = -11, //! Invalid account name
+    RPC_WALLET_KEYPOOL_RAN_OUT      = -12, //! Keypool ran out, call keypoolrefill first
+    RPC_WALLET_UNLOCK_NEEDED        = -13, //! Enter the wallet passphrase with walletpassphrase first
+    RPC_WALLET_PASSPHRASE_INCORRECT = -14, //! The wallet passphrase entered was incorrect
+    RPC_WALLET_WRONG_ENC_STATE      = -15, //! Command given in wrong wallet encryption state (encrypting an encrypted wallet etc.)
+    RPC_WALLET_ENCRYPTION_FAILED    = -16, //! Failed to encrypt the wallet
+    RPC_WALLET_ALREADY_UNLOCKED     = -17, //! Wallet is already unlocked
 };
 
-//
-// IOStream device that speaks SSL but can also speak non-SSL
-//
+/**
+ * IOStream device that speaks SSL but can also speak non-SSL
+ */
 template <typename Protocol>
 class SSLIOStreamDevice : public boost::iostreams::device<boost::iostreams::bidirectional> {
 public:
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index d3ce3b3191c5..25734f49305d 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
diff --git a/src/rpcserver.h b/src/rpcserver.h
index b3234f65f2bf..7395fc23c6cc 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -40,12 +40,13 @@ void StartRPCThreads();
  * If real RPC threads have already been started this is a no-op.
  */
 void StartDummyRPCThread();
-/* Stop RPC threads */
+/** Stop RPC threads */
 void StopRPCThreads();
-/* Query whether RPC is running */
+/** Query whether RPC is running */
 bool IsRPCRunning();
 
-/* Set the RPC warmup status.  When this is done, all RPC calls will error out
+/** 
+ * Set the RPC warmup status.  When this is done, all RPC calls will error out
  * immediately with RPC_IN_WARMUP.
  */
 void SetRPCWarmupStatus(const std::string& newStatus);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 4d9e5ea137d3..d2d14ad9f402 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "amount.h"

From e0077de5de538dd51b5dbd04e05c998d40b20b30 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 18:03:52 -0400
Subject: [PATCH 1061/1819] build: make a distinction between static app
 ldflags and static lib ldflags

For windows builds, exe's are always static, but libs should still conform to
--enabled-shared and --enable-static.
---
 configure.ac                | 7 ++-----
 src/Makefile.am             | 6 +++---
 src/Makefile.qt.include     | 2 +-
 src/Makefile.qttest.include | 2 +-
 src/Makefile.test.include   | 2 +-
 5 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/configure.ac b/configure.ac
index c0489f5be7d6..765b39892510 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,12 +201,9 @@ case $host in
      AC_CHECK_LIB([iphlpapi],      [main],, AC_MSG_ERROR(lib missing))
      AC_CHECK_LIB([crypt32],      [main],, AC_MSG_ERROR(lib missing))
 
-     AX_CHECK_LINK_FLAG([[-static-libgcc]],[LDFLAGS="$LDFLAGS -static-libgcc"])
-     AX_CHECK_LINK_FLAG([[-static-libstdc++]],[LDFLAGS="$LDFLAGS -static-libstdc++"])
-
      # -static is interpreted by libtool, where it has a different meaning.
      # In libtool-speak, it's -all-static.
-     AX_CHECK_LINK_FLAG([[-static]],[LDFLAGS="$LDFLAGS -static"; LIBTOOL_LDFLAGS="$LIBTOOL_LDFLAGS -all-static"])
+     AX_CHECK_LINK_FLAG([[-static]],[LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"])
 
      AC_PATH_PROG([MAKENSIS], [makensis], none)
      if test x$MAKENSIS = xnone; then
@@ -801,7 +798,7 @@ AC_SUBST(CLIENT_VERSION_IS_RELEASE, _CLIENT_VERSION_IS_RELEASE)
 AC_SUBST(COPYRIGHT_YEAR, _COPYRIGHT_YEAR)
 
 AC_SUBST(RELDFLAGS)
-AC_SUBST(LIBTOOL_LDFLAGS)
+AC_SUBST(LIBTOOL_APP_LDFLAGS)
 AC_SUBST(USE_UPNP)
 AC_SUBST(USE_QRCODE)
 AC_SUBST(BOOST_LIBS)
diff --git a/src/Makefile.am b/src/Makefile.am
index 556fd49c0ba1..83dcaeed7998 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -295,7 +295,7 @@ endif
 
 bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
-bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 # bitcoin-cli binary #
 bitcoin_cli_LDADD = \
@@ -324,12 +324,12 @@ bitcoin_tx_LDADD = \
 bitcoin_tx_SOURCES = bitcoin-tx.cpp
 bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
-bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 if TARGET_WINDOWS
 bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
-bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index fac214bdcaa0..898337ad6fe3 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -361,7 +361,7 @@ qt_bitcoin_qt_LDADD += $(LIBBITCOIN_WALLET)
 endif
 qt_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
   $(BOOST_LIBS) $(QT_LIBS) $(QT_DBUS_LIBS) $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
-qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 qt_bitcoin_qt_LIBTOOLFLAGS = --tag CXX
 
 #locale/foo.ts -> locale/foo.qm
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index 622411ca686d..c5392cf307a5 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -33,7 +33,7 @@ endif
 qt_test_test_bitcoin_qt_LDADD += $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CRYPTO) $(LIBBITCOIN_UNIVALUE) $(LIBLEVELDB) \
   $(LIBMEMENV) $(BOOST_LIBS) $(QT_DBUS_LIBS) $(QT_TEST_LIBS) $(QT_LIBS) \
   $(QR_LIBS) $(PROTOBUF_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(LIBSECP256K1)
-qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS)
+qt_test_test_bitcoin_qt_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(QT_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 CLEAN_BITCOIN_QT_TEST = $(TEST_QT_MOC_CPP) qt/test/*.gcda qt/test/*.gcno
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 79509c9a3edc..c3cd7db1434c 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -86,7 +86,7 @@ test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
 
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS)
+test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From 811a765bef5701b167ce51a047745140df9bd04f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 18:24:25 -0400
Subject: [PATCH 1062/1819] build: mingw needs libssp for hardening with dlls

---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index 765b39892510..ef759a44b412 100644
--- a/configure.ac
+++ b/configure.ac
@@ -386,6 +386,12 @@ if test x$use_hardening != xno; then
     AX_CHECK_LINK_FLAG([[-pie]], [HARDENED_LDFLAGS="$HARDENED_LDFLAGS -pie"])
   fi
 
+  case $host in
+    *mingw*)
+       AC_CHECK_LIB([ssp],      [main],, AC_MSG_ERROR(lib missing))
+    ;;
+  esac
+
   CXXFLAGS="$CXXFLAGS $HARDENED_CXXFLAGS"
   CPPFLAGS="$CPPFLAGS $HARDENED_CPPFLAGS"
   LDFLAGS="$LDFLAGS $HARDENED_LDFLAGS"

From f36a40f7fd948781656e730338a1ae647e7c4928 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 17:31:16 -0400
Subject: [PATCH 1063/1819] build: check visibility attributes

---
 build-aux/m4/ax_gcc_func_attribute.m4 | 219 ++++++++++++++++++++++++++
 configure.ac                          |   4 +
 2 files changed, 223 insertions(+)
 create mode 100644 build-aux/m4/ax_gcc_func_attribute.m4

diff --git a/build-aux/m4/ax_gcc_func_attribute.m4 b/build-aux/m4/ax_gcc_func_attribute.m4
new file mode 100644
index 000000000000..de11303e7b61
--- /dev/null
+++ b/build-aux/m4/ax_gcc_func_attribute.m4
@@ -0,0 +1,219 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_gcc_func_attribute.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_GCC_FUNC_ATTRIBUTE(ATTRIBUTE)
+#
+# DESCRIPTION
+#
+#   This macro checks if the compiler supports one of GCC's function
+#   attributes; many other compilers also provide function attributes with
+#   the same syntax. Compiler warnings are used to detect supported
+#   attributes as unsupported ones are ignored by default so quieting
+#   warnings when using this macro will yield false positives.
+#
+#   The ATTRIBUTE parameter holds the name of the attribute to be checked.
+#
+#   If ATTRIBUTE is supported define HAVE_FUNC_ATTRIBUTE_<ATTRIBUTE>.
+#
+#   The macro caches its result in the ax_cv_have_func_attribute_<attribute>
+#   variable.
+#
+#   The macro currently supports the following function attributes:
+#
+#    alias
+#    aligned
+#    alloc_size
+#    always_inline
+#    artificial
+#    cold
+#    const
+#    constructor
+#    deprecated
+#    destructor
+#    dllexport
+#    dllimport
+#    error
+#    externally_visible
+#    flatten
+#    format
+#    format_arg
+#    gnu_inline
+#    hot
+#    ifunc
+#    leaf
+#    malloc
+#    noclone
+#    noinline
+#    nonnull
+#    noreturn
+#    nothrow
+#    optimize
+#    pure
+#    unused
+#    used
+#    visibility
+#    warning
+#    warn_unused_result
+#    weak
+#    weakref
+#
+#   Unsuppored function attributes will be tested with a prototype returning
+#   an int and not accepting any arguments and the result of the check might
+#   be wrong or meaningless so use with care.
+#
+# LICENSE
+#
+#   Copyright (c) 2013 Gabriele Svelto <gabriele.svelto@gmail.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved.  This file is offered as-is, without any
+#   warranty.
+
+#serial 2
+
+AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
+    AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
+
+    AC_CACHE_CHECK([for __attribute__(($1))], [ac_var], [
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([
+            m4_case([$1],
+                [alias], [
+                    int foo( void ) { return 0; }
+                    int bar( void ) __attribute__(($1("foo")));
+                ],
+                [aligned], [
+                    int foo( void ) __attribute__(($1(32)));
+                ],
+                [alloc_size], [
+                    void *foo(int a) __attribute__(($1(1)));
+                ],
+                [always_inline], [
+                    inline __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [artificial], [
+                    inline __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [cold], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [const], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [constructor], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [deprecated], [
+                    int foo( void ) __attribute__(($1("")));
+                ],
+                [destructor], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [dllexport], [
+                    __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [dllimport], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [error], [
+                    int foo( void ) __attribute__(($1("")));
+                ],
+                [externally_visible], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [flatten], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [format], [
+                    int foo(const char *p, ...) __attribute__(($1(printf, 1, 2)));
+                ],
+                [format_arg], [
+                    char *foo(const char *p) __attribute__(($1(1)));
+                ],
+                [gnu_inline], [
+                    inline __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [hot], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [ifunc], [
+                    int my_foo( void ) { return 0; }
+                    static int (*resolve_foo(void))(void) { return my_foo; }
+                    int foo( void ) __attribute__(($1("resolve_foo")));
+                ],
+                [leaf], [
+                    __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [malloc], [
+                    void *foo( void ) __attribute__(($1));
+                ],
+                [noclone], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [noinline], [
+                    __attribute__(($1)) int foo( void ) { return 0; }
+                ],
+                [nonnull], [
+                    int foo(char *p) __attribute__(($1(1)));
+                ],
+                [noreturn], [
+                    void foo( void ) __attribute__(($1));
+                ],
+                [nothrow], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [optimize], [
+                    __attribute__(($1(3))) int foo( void ) { return 0; }
+                ],
+                [pure], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [unused], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [used], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [visibility], [
+                    int foo_def( void ) __attribute__(($1("default")));
+                    int foo_hid( void ) __attribute__(($1("hidden")));
+                    int foo_int( void ) __attribute__(($1("internal")));
+                    int foo_pro( void ) __attribute__(($1("protected")));
+                ],
+                [warning], [
+                    int foo( void ) __attribute__(($1("")));
+                ],
+                [warn_unused_result], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [weak], [
+                    int foo( void ) __attribute__(($1));
+                ],
+                [weakref], [
+                    static int foo( void ) { return 0; }
+                    static int bar( void ) __attribute__(($1("foo")));
+                ],
+                [
+                 m4_warn([syntax], [Unsupported attribute $1, the test may fail])
+                 int foo( void ) __attribute__(($1));
+                ]
+            )], [])
+            ],
+            dnl GCC doesn't exit with an error if an unknown attribute is
+            dnl provided but only outputs a warning, so accept the attribute
+            dnl only if no warning were issued.
+            [AS_IF([test -s conftest.err],
+                [AS_VAR_SET([ac_var], [no])],
+                [AS_VAR_SET([ac_var], [yes])])],
+            [AS_VAR_SET([ac_var], [no])])
+    ])
+
+    AS_IF([test yes = AS_VAR_GET([ac_var])],
+        [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_FUNC_ATTRIBUTE_$1), 1,
+            [Define to 1 if the system has the `$1' function attribute])], [])
+
+    AS_VAR_POPDEF([ac_var])
+])
diff --git a/configure.ac b/configure.ac
index ef759a44b412..e2efdf203b63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,10 @@ fi
 
 AX_CHECK_LINK_FLAG([[-Wl,--large-address-aware]], [LDFLAGS="$LDFLAGS -Wl,--large-address-aware"])
 
+AX_GCC_FUNC_ATTRIBUTE([visibility])
+AX_GCC_FUNC_ATTRIBUTE([dllexport])
+AX_GCC_FUNC_ATTRIBUTE([dllimport])
+
 if test x$use_glibc_compat != xno; then
 
   #__fdelt_chk's params and return type have changed from long unsigned int to long int.

From ee64c53c1fdcadf00138b7e6fdf44a1c433db9f8 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 6 Nov 2014 22:18:08 -0500
Subject: [PATCH 1064/1819] build: remove internal/protected build attribute
 checks

They're not necessary, and not always supported. We only need to know about
hidden and default.
---
 build-aux/m4/ax_gcc_func_attribute.m4 | 2 --
 1 file changed, 2 deletions(-)

diff --git a/build-aux/m4/ax_gcc_func_attribute.m4 b/build-aux/m4/ax_gcc_func_attribute.m4
index de11303e7b61..275ca63a2c21 100644
--- a/build-aux/m4/ax_gcc_func_attribute.m4
+++ b/build-aux/m4/ax_gcc_func_attribute.m4
@@ -180,8 +180,6 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
                 [visibility], [
                     int foo_def( void ) __attribute__(($1("default")));
                     int foo_hid( void ) __attribute__(($1("hidden")));
-                    int foo_int( void ) __attribute__(($1("internal")));
-                    int foo_pro( void ) __attribute__(($1("protected")));
                 ],
                 [warning], [
                     int foo( void ) __attribute__(($1("")));

From 2cf5f16c25ac81eac3a09c4f15dad9d2154c03d4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 18:22:55 -0400
Subject: [PATCH 1065/1819] build: add libbitcoinconsensus files and hook up
 the lib build

Credit BlueMatt for libbitcoinsonsensus.h/cpp
---
 .gitignore                      |  5 ++
 src/Makefile.am                 | 31 +++++++++++
 src/Makefile.test.include       |  2 +-
 src/script/bitcoinconsensus.cpp | 91 +++++++++++++++++++++++++++++++++
 src/script/bitcoinconsensus.h   | 67 ++++++++++++++++++++++++
 5 files changed, 195 insertions(+), 1 deletion(-)
 create mode 100644 src/script/bitcoinconsensus.cpp
 create mode 100644 src/script/bitcoinconsensus.h

diff --git a/.gitignore b/.gitignore
index c97432df920e..7343e722d5c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,6 +45,7 @@ src/qt/test/moc*.cpp
 
 .deps
 .dirstamp
+.libs
 .*.swp
 *.*~*
 *.bak
@@ -66,6 +67,10 @@ src/qt/test/moc*.cpp
 *.json.h
 *.raw.h
 
+#libtool object files
+*.lo
+*.la
+
 # Compilation and Qt preprocessor part
 *.qm
 Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index 83dcaeed7998..63f2375c86d8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,6 +49,8 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
 noinst_LIBRARIES += libbitcoin_wallet.a
 endif
 
+lib_LTLIBRARIES = libbitcoinconsensus.la
+
 bin_PROGRAMS =
 TESTS =
 
@@ -331,6 +333,35 @@ bitcoin_cli_SOURCES += bitcoin-cli-res.rc
 endif
 bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
+if BUILD_BITCOIN_LIBS
+include_HEADERS = script/bitcoinconsensus.h
+libbitcoinconsensus_la_SOURCES = \
+  core/transaction.cpp \
+  crypto/sha1.cpp \
+  crypto/sha2.cpp \
+  crypto/ripemd160.cpp \
+  eccryptoverify.cpp \
+  ecwrapper.cpp \
+  hash.cpp \
+  pubkey.cpp \
+  script/script.cpp \
+  script/interpreter.cpp \
+  script/bitcoinconsensus.cpp \
+  uint256.cpp \
+  utilstrencodings.cpp
+
+if GLIBC_BACK_COMPAT
+  libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
+  libbitcoinconsensus_la_SOURCES += compat/glibcxx_compat.cpp
+endif
+
+libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
+libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
+libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
+if USE_LIBSECP256K1
+libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la
+endif
+
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
 DISTCLEANFILES = obj/build.h
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index c3cd7db1434c..f8711f03876e 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -86,7 +86,7 @@ test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
 
 test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static-libtool-libs
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
new file mode 100644
index 000000000000..4faa760ad714
--- /dev/null
+++ b/src/script/bitcoinconsensus.cpp
@@ -0,0 +1,91 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "bitcoinconsensus.h"
+
+#include "core/transaction.h"
+#include "script/interpreter.h"
+#include "version.h"
+
+namespace {
+
+/** A class that deserializes a single CTransaction one time. */
+class TxInputStream
+{
+public:
+    TxInputStream(int nTypeIn, int nVersionIn, const unsigned char *txTo, size_t txToLen) :
+    m_type(nTypeIn),
+    m_version(nVersionIn),
+    m_data(txTo),
+    m_remaining(txToLen)
+    {}
+
+    TxInputStream& read(char* pch, size_t nSize)
+    {
+        if (nSize > m_remaining)
+            throw std::ios_base::failure(std::string(__func__) + ": end of data");
+
+        if (pch == NULL)
+            throw std::ios_base::failure(std::string(__func__) + ": bad destination buffer");
+
+        if (m_data == NULL)
+            throw std::ios_base::failure(std::string(__func__) + ": bad source buffer");
+
+        memcpy(pch, m_data, nSize);
+        m_remaining -= nSize;
+        m_data += nSize;
+        return *this;
+    }
+
+    template<typename T>
+    TxInputStream& operator>>(T& obj)
+    {
+        ::Unserialize(*this, obj, m_type, m_version);
+        return *this;
+    }
+
+private:
+    const int m_type;
+    const int m_version;
+    const unsigned char* m_data;
+    size_t m_remaining;
+};
+
+inline int set_error(bitcoinconsensus_error* ret, bitcoinconsensus_error serror)
+{
+    if (ret)
+        *ret = serror;
+    return 0;
+}
+
+} // anon namespace
+
+int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
+                                    const unsigned char *txTo        , unsigned int txToLen,
+                                    unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
+{
+    try {
+        TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
+        CTransaction tx;
+        stream >> tx;
+        if (nIn >= tx.vin.size())
+            return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
+        if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen)
+            return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH);
+
+         // Regardless of the verification result, the tx did not error.
+         set_error(err, bitcoinconsensus_ERR_OK);
+
+        return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, SignatureChecker(tx, nIn), NULL);
+    } catch (std::exception &e) {
+        return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
+    }
+}
+
+unsigned int bitcoinconsensus_version()
+{
+    // Just use the API version for now
+    return BITCOINCONSENSUS_API_VER;
+}
diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h
new file mode 100644
index 000000000000..15e3337a8ded
--- /dev/null
+++ b/src/script/bitcoinconsensus.h
@@ -0,0 +1,67 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_BITCOINCONSENSUS_H
+#define BITCOIN_BITCOINCONSENSUS_H
+
+#if defined(BUILD_BITCOIN_INTERNAL) && defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+  #if defined(_WIN32)
+    #if defined(DLL_EXPORT)
+      #if defined(HAVE_FUNC_ATTRIBUTE_DLLEXPORT)
+        #define EXPORT_SYMBOL __declspec(dllexport)
+      #else
+        #define EXPORT_SYMBOL
+      #endif
+    #endif
+  #elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
+    #define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
+  #endif
+#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)
+  #define EXPORT_SYMBOL __declspec(dllimport)
+#endif
+
+#ifndef EXPORT_SYMBOL
+  #define EXPORT_SYMBOL
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define BITCOINCONSENSUS_API_VER 0
+
+typedef enum bitcoinconsensus_error_t
+{
+    bitcoinconsensus_ERR_OK = 0,
+    bitcoinconsensus_ERR_TX_INDEX,
+    bitcoinconsensus_ERR_TX_SIZE_MISMATCH,
+    bitcoinconsensus_ERR_TX_DESERIALIZE,
+} bitcoinconsensus_error;
+
+/** Script verification flags */
+enum
+{
+    bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE      = 0,
+    bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
+};
+
+/// Returns 1 if the input nIn of the serialized transaction pointed to by
+/// txTo correctly spends the scriptPubKey pointed to by scriptPubKey under
+/// the additional constraints specified by flags.
+/// If not NULL, err will contain an error/success code for the operation
+EXPORT_SYMBOL int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen,
+                                    const unsigned char *txTo        , unsigned int txToLen,
+                                    unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err);
+
+EXPORT_SYMBOL unsigned int bitcoinconsensus_version();
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#undef EXPORT_SYMBOL
+
+#endif // BITCOIN_BITCOINCONSENSUS_H

From cdd36c6c5cc309d98f941a4c78d9642c92c1e46f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 6 Nov 2014 22:43:19 -0500
Subject: [PATCH 1066/1819] build: add --with-libs so that libs are optional

---
 configure.ac              | 17 +++++++++++++++--
 src/Makefile.am           |  6 ++++++
 src/Makefile.test.include |  2 +-
 3 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index e2efdf203b63..7a00d57ae933 100644
--- a/configure.ac
+++ b/configure.ac
@@ -610,6 +610,12 @@ AC_ARG_WITH([utils],
   [build_bitcoin_utils=$withval],
   [build_bitcoin_utils=yes])
 
+AC_ARG_WITH([libs],
+  [AS_HELP_STRING([--with-libs],
+  [build libraries (default=yes)])],
+  [build_bitcoin_libs=$withval],
+  [build_bitcoin_libs=yes])
+
 AC_ARG_WITH([daemon],
   [AS_HELP_STRING([--with-daemon],
   [build bitcoind daemon (default=yes)])],
@@ -660,6 +666,13 @@ AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
 AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
 AC_MSG_RESULT($build_bitcoin_utils)
 
+AC_MSG_CHECKING([whether to build libraries])
+AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
+if test x$build_bitcoin_libs = xyes; then
+  AC_DEFINE(HAVE_CONSENSUS_LIB, 1, [Define this symbol if the consensus lib has been built])
+fi
+AC_MSG_RESULT($build_bitcoin_libs)
+
 dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
 BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
 
@@ -776,8 +789,8 @@ else
   AC_MSG_RESULT([no])
 fi
 
-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
-  AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-daemon --with-gui or --enable-tests])
+if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
+  AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
 fi
 
 AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
diff --git a/src/Makefile.am b/src/Makefile.am
index 63f2375c86d8..0d45203c9005 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -49,7 +49,12 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
 noinst_LIBRARIES += libbitcoin_wallet.a
 endif
 
+if BUILD_BITCOIN_LIBS
 lib_LTLIBRARIES = libbitcoinconsensus.la
+LIBBITCOIN_CONSENSUS=libbitcoinconsensus.la
+else
+LIBBITCOIN_CONSENSUS=
+endif
 
 bin_PROGRAMS =
 TESTS =
@@ -361,6 +366,7 @@ libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BIT
 if USE_LIBSECP256K1
 libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la
 endif
+endif
 
 CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a *.gcda *.gcno
 
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index f8711f03876e..5fd2afe50d4a 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -85,7 +85,7 @@ if ENABLE_WALLET
 test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
 
-test_test_bitcoin_LDADD += $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
+test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
 test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static-libtool-libs
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)

From 269efa30ed57feb5dd7d4d30c64b98fa7aad4267 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 18:23:46 -0400
Subject: [PATCH 1067/1819] build: add quick consensus lib tests

They should be hooked up in other places as well, but this is a start.
---
 src/test/script_tests.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index d98154571b80..36aaa6903f4d 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -14,6 +14,10 @@
 #include "script/sign.h"
 #include "util.h"
 
+#if defined(HAVE_CONSENSUS_LIB)
+#include "script/bitcoinconsensus.h"
+#endif
+
 #include <fstream>
 #include <stdint.h>
 #include <string>
@@ -94,8 +98,15 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMu
 void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bool expect, const std::string& message)
 {
     ScriptError err;
-    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey)), 0), &err) == expect, message);
+    CMutableTransaction tx = BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey));
+    CMutableTransaction tx2 = tx;
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(tx, 0), &err) == expect, message);
     BOOST_CHECK_MESSAGE(expect == (err == SCRIPT_ERR_OK), std::string(ScriptErrorString(err)) + ": " + message);
+#if defined(HAVE_CONSENSUS_LIB)
+    CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
+    stream << tx2;
+    BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message);
+#endif
 }
 
 void static NegateSignatureS(std::vector<unsigned char>& vchSig) {

From 19df238a7ba7a6cdfbf48bc663c39ddbf9f6c7d0 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 14 Oct 2014 18:25:35 -0400
Subject: [PATCH 1068/1819] build: shared lib build should work reasonably well
 now

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7a00d57ae933..70a9c15ffb5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,7 @@ case $host in
   ;;
 esac
 dnl Libtool init checks.
-LT_INIT([disable-shared])
+LT_INIT([pic-only])
 
 dnl Check/return PATH for base programs.
 AC_PATH_TOOL(AR, ar)

From 9ed8979e294fb7a42e26a6b6541f614554663bea Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 18 Nov 2014 15:49:56 -0500
Subject: [PATCH 1069/1819] build: fix static dll link for mingw

dll's are no longer dynamically linked to libgcc/libstdc++/libssp
---
 configure.ac | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/configure.ac b/configure.ac
index 70a9c15ffb5b..77ab5eb03c4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -226,6 +226,15 @@ case $host in
        *) AC_MSG_ERROR("Could not determine win32/win64 for installer") ;;
      esac
      AC_SUBST(WINDOWS_BITS)
+
+     dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
+     dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override
+     dnl its command here, with the predeps/postdeps removed, and -static inserted. Postdeps are
+     dnl also overridden to prevent their insertion later.
+     dnl This should only affect dll's.
+     archive_cmds_CXX="\$CC -shared \$libobjs \$deplibs \$compiler_flags -static -o \$output_objdir/\$soname \${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker \$lib"
+     postdeps_CXX=
+
      ;;
   *darwin*)
      TARGET_OS=darwin

From 9eb5a5fbef5270fda10c15c60a297b4cd19b681e Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 18 Nov 2014 17:06:23 -0500
Subject: [PATCH 1070/1819] build: pad header for osx libs

This ensures that users of the lib will be able to mangle the paths to work
in their bundles.
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 77ab5eb03c4a..6784521d818a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,7 @@ case $host in
        esac
      fi
 
+     AX_CHECK_LINK_FLAG([[-Wl,-headerpad_max_install_names]], [LDFLAGS="$LDFLAGS -Wl,-headerpad_max_install_names"])
      CPPFLAGS="$CPPFLAGS -DMAC_OSX"
      ;;
    *linux*)

From 4302fa67b12794648abb40a9e9f18230041691b4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 11 Nov 2014 18:21:23 -0500
Subject: [PATCH 1071/1819] depends: Use pic for all linux dependencies

This avoids textrels, and matches previous gitian behavior.
---
 depends/packages/bdb.mk       | 3 +--
 depends/packages/boost.mk     | 3 +--
 depends/packages/freetype.mk  | 2 +-
 depends/packages/libX11.mk    | 2 +-
 depends/packages/libXau.mk    | 2 +-
 depends/packages/openssl.mk   | 7 ++++---
 depends/packages/protobuf.mk  | 2 +-
 depends/packages/qrencode.mk  | 2 +-
 depends/packages/xcb_proto.mk | 2 +-
 depends/packages/xtrans.mk    | 2 +-
 10 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
index f39925723b5a..68841afdb84c 100644
--- a/depends/packages/bdb.mk
+++ b/depends/packages/bdb.mk
@@ -8,8 +8,7 @@ $(package)_build_subdir=build_unix
 define $(package)_set_vars
 $(package)_config_opts=--disable-shared --enable-cxx --disable-replication
 $(package)_config_opts_mingw32=--enable-mingw
-$(package)_config_opts_x86_64_linux=--with-pic
-$(package)_config_opts_arm_linux=--with-pic
+$(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_preprocess_cmds
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index 53c4c3c74e10..f50828c546da 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -22,8 +22,7 @@ $(package)_toolset_darwin=darwin
 $(package)_archiver_darwin=$($(package)_libtool)
 $(package)_config_libraries=chrono,filesystem,program_options,system,thread,test
 $(package)_cxxflags=-fvisibility=hidden
-$(package)_cxxflags_x86_64_linux=-fPIC
-$(package)_cxxflags_arm_linux=-fPIC
+$(package)_cxxflags_linux=-fPIC
 endef
 
 define $(package)_preprocess_cmds
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
index b83cbd93eafe..f7d6e0f9fc58 100644
--- a/depends/packages/freetype.mk
+++ b/depends/packages/freetype.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=c0848b29d52ef3ca27ad92e08351f023c5e24ce8cea7d8fe69fc96358
 
 define $(package)_set_vars
   $(package)_config_opts=--without-zlib --without-png --disable-static
-  $(package)_config_opts_x86_64_linux=--with-pic
+  $(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk
index 144021e34b04..178d592ee63f 100644
--- a/depends/packages/libX11.mk
+++ b/depends/packages/libX11.mk
@@ -7,7 +7,7 @@ $(package)_dependencies=libxcb xtrans xextproto xproto
 
 define $(package)_set_vars
 $(package)_config_opts=--disable-xkb --disable-static
-$(package)_config_opts_x86_64_linux=--with-pic
+$(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk
index 8c9b21846b26..e87df2e4de67 100644
--- a/depends/packages/libXau.mk
+++ b/depends/packages/libXau.mk
@@ -7,7 +7,7 @@ $(package)_dependencies=xproto
 
 define $(package)_set_vars
   $(package)_config_opts=--disable-shared
-  $(package)_config_opts_x86_64_linux=--with-pic
+  $(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 70b0b8d39f20..6d7a556c1100 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -10,12 +10,13 @@ $(package)_config_opts=--prefix=$(host_prefix) --openssldir=$(host_prefix)/etc/o
 $(package)_config_opts+=no-krb5 no-camellia no-capieng no-cast no-cms no-dtls1 no-gost no-gmp no-heartbeats no-idea no-jpake no-md2
 $(package)_config_opts+=no-mdc2 no-rc5 no-rdrand no-rfc3779 no-rsax no-sctp no-seed no-sha0 no-static_engine no-whirlpool no-rc2 no-rc4 no-ssl2 no-ssl3
 $(package)_config_opts+=$($(package)_cflags) $($(package)_cppflags)
-$(package)_config_opts_x86_64_linux=-fPIC linux-x86_64
-$(package)_config_opts_arm_linux=-fPIC linux-generic32
+$(package)_config_opts_linux=-fPIC
+$(package)_config_opts_x86_64_linux=linux-x86_64
+$(package)_config_opts_i686_linux=linux-generic32
+$(package)_config_opts_arm_linux=linux-generic32
 $(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
 $(package)_config_opts_x86_64_mingw32=mingw64
 $(package)_config_opts_i686_mingw32=mingw
-$(package)_config_opts_i686_linux=linux-generic32 -fPIC
 endef
 
 define $(package)_preprocess_cmds
diff --git a/depends/packages/protobuf.mk b/depends/packages/protobuf.mk
index 716f837853b5..5affad28375a 100644
--- a/depends/packages/protobuf.mk
+++ b/depends/packages/protobuf.mk
@@ -7,7 +7,7 @@ $(package)_dependencies=native_$(package)
 
 define $(package)_set_vars
   $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
-  $(package)_config_opts_x86_64_linux=--with-pic
+  $(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk
index 69d2982cbcb9..1ad329e94d7a 100644
--- a/depends/packages/qrencode.mk
+++ b/depends/packages/qrencode.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b5
 
 define $(package)_set_vars
 $(package)_config_opts=--disable-shared -without-tools --disable-sdltest
-$(package)_config_opts_x86_64_linux=--with-pic
+$(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/xcb_proto.mk b/depends/packages/xcb_proto.mk
index 726e3048c30c..0c7c958d62d4 100644
--- a/depends/packages/xcb_proto.mk
+++ b/depends/packages/xcb_proto.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=7ef40ddd855b750bc597d2a435da21e55e502a0fefa85b274f2c92280
 
 define $(package)_set_vars
   $(package)_config_opts=--disable-shared
-  $(package)_config_opts_x86_64_linux=--with-pic
+  $(package)_config_opts_linux=--with-pic
 endef
 
 define $(package)_config_cmds
diff --git a/depends/packages/xtrans.mk b/depends/packages/xtrans.mk
index b973149797f4..99eefa6d5ea2 100644
--- a/depends/packages/xtrans.mk
+++ b/depends/packages/xtrans.mk
@@ -6,7 +6,7 @@ $(package)_sha256_hash=054d4ee3efd52508c753e9f7bc655ef185a29bd2850dd9e2fc2ccc335
 $(package)_dependencies=
 
 define $(package)_set_vars
-$(package)_config_opts_x86_64_linux=--with-pic --disable-static
+$(package)_config_opts_linux=--with-pic --disable-static
 endef
 
 define $(package)_config_cmds

From 5f93ec202810c1bc082f181fbfe6af4438b395fe Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 28 Aug 2014 23:21:18 -0400
Subject: [PATCH 1072/1819] depends: Add a package for qt4.6. Linux uses it by
 default.

We're not ready to switch to a static qt5 for Linux yet due to missing plugin
support. This adds a recipe for building a shared qt4 that we build and link
against, but don't distribute.

make USE_LINUX_STATIC_QT5=1 can be used to build static qt5 as before.
---
 depends/Makefile                  |  1 +
 depends/README.usage              |  1 +
 depends/packages/libICE.mk        | 23 +++++++++++
 depends/packages/libSM.mk         | 23 +++++++++++
 depends/packages/packages.mk      | 13 +++++-
 depends/packages/qt46.mk          | 67 +++++++++++++++++++++++++++++++
 depends/patches/qt46/stlfix.patch | 10 +++++
 7 files changed, 136 insertions(+), 2 deletions(-)
 create mode 100644 depends/packages/libICE.mk
 create mode 100644 depends/packages/libSM.mk
 create mode 100644 depends/packages/qt46.mk
 create mode 100644 depends/patches/qt46/stlfix.patch

diff --git a/depends/Makefile b/depends/Makefile
index fc763bedeb5f..5de015971429 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -6,6 +6,7 @@ SDK_PATH ?= $(BASEDIR)/SDKs
 NO_QT ?=
 NO_WALLET ?=
 NO_UPNP ?=
+USE_LINUX_STATIC_QT5 ?=
 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
 
 BUILD = $(shell ./config.guess)
diff --git a/depends/README.usage b/depends/README.usage
index d3c57956f19e..e768feecf76a 100644
--- a/depends/README.usage
+++ b/depends/README.usage
@@ -23,6 +23,7 @@ NO_QT: Don't download/build/cache qt and its dependencies
 NO_WALLET: Don't download/build/cache libs needed to enable the wallet
 NO_UPNP: Don't download/build/cache packages needed for enabling upnp
 DEBUG: disable some optimizations and enable more runtime checking
+USE_LINUX_STATIC_QT5: Build a static qt5 rather than shared qt4. Linux only.
 
 If some packages are not built, for example 'make NO_WALLET=1', the appropriate
 options will be passed to bitcoin's configure. In this case, --disable-wallet.
diff --git a/depends/packages/libICE.mk b/depends/packages/libICE.mk
new file mode 100644
index 000000000000..fc60323b1c91
--- /dev/null
+++ b/depends/packages/libICE.mk
@@ -0,0 +1,23 @@
+package=libICE
+$(package)_version=1.0.9
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202
+$(package)_dependencies=xtrans xproto
+
+define $(package)_set_vars
+  $(package)_config_opts=--disable-static --disable-docs --disable-specs --without-xsltproc
+  $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/libSM.mk b/depends/packages/libSM.mk
new file mode 100644
index 000000000000..0f9307ca76ac
--- /dev/null
+++ b/depends/packages/libSM.mk
@@ -0,0 +1,23 @@
+package=libSM
+$(package)_version=1.2.2
+$(package)_download_path=http://xorg.freedesktop.org/releases/individual/lib/
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
+$(package)_sha256_hash=0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd
+$(package)_dependencies=xtrans xproto libICE
+
+define $(package)_set_vars
+  $(package)_config_opts=--without-libuuid  --without-xsltproc  --disable-docs --disable-static
+  $(package)_config_opts_linux=--with-pic
+endef
+
+define $(package)_config_cmds
+  $($(package)_autoconf)
+endef
+
+define $(package)_build_cmds
+  $(MAKE)
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) DESTDIR=$($(package)_staging_dir) install
+endef
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 0e1fbeffaae4..305d21cb2daf 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -2,8 +2,17 @@ packages:=boost openssl gmp
 native_packages := native_ccache native_comparisontool
 
 qt_native_packages = native_protobuf
-qt_packages = qt qrencode protobuf
-qt_linux_packages=expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
+qt_packages = qrencode protobuf
+
+qt46_linux_packages = qt46 expat dbus libxcb xcb_proto libXau xproto freetype libX11 xextproto libXext xtrans libICE libSM
+qt5_linux_packages= qt expat dbus libxcb xcb_proto libXau xproto freetype fontconfig libX11 xextproto libXext xtrans
+
+qt_darwin_packages=qt
+qt_mingw32_packages=qt
+
+qt_linux_$(USE_LINUX_STATIC_QT5):=$(qt5_linux_packages)
+qt_linux_:=$(qt46_linux_packages)
+qt_linux_packages:=$(qt_linux_$(USE_LINUX_STATIC_QT5))
 
 wallet_packages=bdb
 
diff --git a/depends/packages/qt46.mk b/depends/packages/qt46.mk
new file mode 100644
index 000000000000..6af805293198
--- /dev/null
+++ b/depends/packages/qt46.mk
@@ -0,0 +1,67 @@
+PACKAGE=qt46
+$(package)_version=4.6.2
+$(package)_download_path=http://download.qt-project.org/archive/qt/4.6/
+$(package)_file_name=qt-everywhere-opensource-src-$($(package)_version).tar.gz
+$(package)_sha256_hash=176f51ddb06dce67ab4b2efc6b327dc21ed8f764c5d97acc15ff1f907c2affae
+$(package)_dependencies=openssl
+$(package)_linux_dependencies=freetype dbus libX11 xproto libXext libICE libSM
+$(package)_patches=stlfix.patch 
+
+define $(package)_set_vars
+$(package)_config_opts  = -prefix $(host_prefix) -headerdir $(host_prefix)/include/qt4 -bindir $(build_prefix)/bin
+$(package)_config_opts += -release -no-separate-debug-info -opensource -confirm-license
+$(package)_config_opts += -stl -qt-zlib
+
+$(package)_config_opts += -nomake examples -nomake tests -nomake tools -nomake translations -nomake demos -nomake docs
+$(package)_config_opts += -no-audio-backend -no-glib -no-nis -no-cups -no-iconv -no-gif -no-pch
+$(package)_config_opts += -no-xkb -no-xrender -no-xrandr -no-xfixes -no-xcursor -no-xinerama -no-xsync -no-xinput -no-mitshm -no-xshape
+$(package)_config_opts += -no-libtiff -no-fontconfig -openssl-linked
+$(package)_config_opts += -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql
+$(package)_config_opts += -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2
+$(package)_config_opts += -no-xmlpatterns -no-multimedia -no-phonon -no-scripttools -no-declarative
+$(package)_config_opts += -no-phonon-backend -no-webkit -no-javascript-jit -no-script
+$(package)_config_opts += -no-svg -no-libjpeg -no-libtiff -no-libpng -no-libmng -no-qt3support -no-opengl
+
+$(package)_config_opts_x86_64_linux  += -platform linux-g++-64
+$(package)_config_opts_i686_linux  = -platform linux-g++-32
+$(package)_build_env  = QT_RCC_TEST=1
+endef
+
+define $(package)_preprocess_cmds
+   sed -i.old "s|/include /usr/include||" config.tests/unix/freetype/freetype.pri && \
+   sed -i.old "s|src_plugins.depends = src_gui src_sql src_svg|src_plugins.depends = src_gui src_sql|" src/src.pro && \
+   sed -i.old "s|\.lower(|\.toLower(|g" src/network/ssl/qsslsocket_openssl.cpp && \
+   sed -i.old "s|Key_BackSpace|Key_Backspace|" src/gui/itemviews/qabstractitemview.cpp && \
+   sed -i.old "s|/usr/X11R6/lib64|$(host_prefix)/lib|" mkspecs/*/*.conf && \
+   sed -i.old "s|/usr/X11R6/lib|$(host_prefix)/lib|" mkspecs/*/*.conf && \
+   sed -i.old "s|/usr/X11R6/include|$(host_prefix)/include|" mkspecs/*/*.conf && \
+   sed -i.old "s|QMAKE_LFLAGS_SHLIB  += -shared|QMAKE_LFLAGS_SHLIB  += -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
+   sed -i.old "/SSLv2_client_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
+   sed -i.old "/SSLv2_server_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
+   patch -p1 < $($(package)_patch_dir)/stlfix.patch 
+endef
+
+define $(package)_config_cmds
+  export PKG_CONFIG_SYSROOT_DIR=/ && \
+  export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \
+  export PKG_CONFIG_PATH=$(host_prefix)/share/pkgconfig  && \
+  export CPATH=$(host_prefix)/include && \
+  OPENSSL_LIBS='-L$(host_prefix)/lib -lssl -lcrypto' ./configure $($(package)_config_opts) && \
+  cd tools/linguist/lrelease; ../../../bin/qmake  -o Makefile lrelease.pro
+endef
+
+define $(package)_build_cmds
+  export CPATH=$(host_prefix)/include && \
+  $(MAKE) -C src && \
+  $(MAKE) -C tools/linguist/lrelease
+endef
+
+define $(package)_stage_cmds
+  $(MAKE) -C src INSTALL_ROOT=$($(package)_staging_dir) install && \
+  $(MAKE) -C tools/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install
+endef
+
+define $(package)_postprocess_cmds
+  rm -rf mkspecs/ lib/cmake/ && \
+  find native/bin -type f -exec mv {} {}-qt4 \;
+endef
diff --git a/depends/patches/qt46/stlfix.patch b/depends/patches/qt46/stlfix.patch
new file mode 100644
index 000000000000..f8f6fb04b0b7
--- /dev/null
+++ b/depends/patches/qt46/stlfix.patch
@@ -0,0 +1,10 @@
+--- old/config.tests/unix/stl/stltest.cpp	2011-06-23 03:45:23.000000000 -0400
++++ new/config.tests/unix/stl/stltest.cpp	2014-08-28 00:54:04.154837604 -0400
+@@ -49,6 +49,7 @@
+ #include <vector>
+ #include <algorithm>
+ #include <iostream>
++#include <cstddef>
+ 
+ // something mean to see if the compiler and C++ standard lib are good enough
+ template<class K, class T>

From 1aead42d41178d0eeeae2c1b7d0131af9d6fffd2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 12 Aug 2014 19:13:04 -0400
Subject: [PATCH 1073/1819] gitian: descriptors overhaul

Descriptors now make use of the dependencies builder, so results are cached.
A very new version (>= e9741525c) of Gitian should be used in order to take
advantage of caching.
---
 contrib/gitian-descriptors/boost-linux.yml    |  55 ----
 contrib/gitian-descriptors/boost-win.yml      |  86 ------
 contrib/gitian-descriptors/deps-linux.yml     |  98 -------
 contrib/gitian-descriptors/deps-win.yml       | 128 ---------
 contrib/gitian-descriptors/gitian-linux.yml   | 128 +++++----
 .../gitian-descriptors/gitian-osx-bitcoin.yml |  61 ----
 .../gitian-descriptors/gitian-osx-depends.yml | 159 -----------
 .../gitian-descriptors/gitian-osx-native.yml  | 178 ------------
 contrib/gitian-descriptors/gitian-osx-qt.yml  | 186 ------------
 contrib/gitian-descriptors/gitian-osx.yml     | 104 +++++++
 contrib/gitian-descriptors/gitian-win.yml     | 157 +++++------
 contrib/gitian-descriptors/protobuf-win.yml   |  65 -----
 contrib/gitian-descriptors/qt-linux.yml       | 264 ------------------
 contrib/gitian-descriptors/qt-win.yml         |  92 ------
 depends/packages/qt46.mk                      |  11 +-
 15 files changed, 256 insertions(+), 1516 deletions(-)
 delete mode 100644 contrib/gitian-descriptors/boost-linux.yml
 delete mode 100644 contrib/gitian-descriptors/boost-win.yml
 delete mode 100644 contrib/gitian-descriptors/deps-linux.yml
 delete mode 100644 contrib/gitian-descriptors/deps-win.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-bitcoin.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-depends.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-native.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-qt.yml
 create mode 100644 contrib/gitian-descriptors/gitian-osx.yml
 delete mode 100644 contrib/gitian-descriptors/protobuf-win.yml
 delete mode 100644 contrib/gitian-descriptors/qt-linux.yml
 delete mode 100644 contrib/gitian-descriptors/qt-win.yml

diff --git a/contrib/gitian-descriptors/boost-linux.yml b/contrib/gitian-descriptors/boost-linux.yml
deleted file mode 100644
index bd3534633737..000000000000
--- a/contrib/gitian-descriptors/boost-linux.yml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-name: "boost"
-suites:
-- "precise"
-architectures:
-- "i386"
-- "amd64"
-packages:
-- "g++"
-- "unzip"
-- "pkg-config"
-- "libtool"
-- "faketime"
-- "bsdmainutils"
-- "zip"
-- "libz-dev"
-reference_datetime: "2011-01-30 00:00:00"
-remotes: []
-files:
-- "boost_1_55_0.tar.bz2"
-script: |
-  STAGING="$HOME/install"
-  TEMPDIR="$HOME/tmp"
-  export LIBRARY_PATH="$STAGING/lib"
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  # Input Integrity Check
-  echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | shasum -c
-
-  mkdir -p "$STAGING"
-  tar --warning=no-timestamp -xjf boost_1_55_0.tar.bz2
-  cd boost_1_55_0
-  GCCVERSION=$(g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
-  # note: bjam with -d+2 reveals that -O3 is implied by default, no need to provide it in cxxflags
-  echo "using gcc : $GCCVERSION : g++
-        :
-        <cxxflags>\"-frandom-seed=boost1 -fPIC\"
-  ;" > user-config.jam
-
-  ./bootstrap.sh --without-icu
-
-  ./bjam toolset=gcc threadapi=pthread threading=multi variant=release link=static runtime-link=shared --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 --layout=tagged --build-type=complete --prefix="$STAGING" $MAKEOPTS -d+2 install
-
-  # post-process all generated libraries to be deterministic
-  # extract them to a temporary directory then re-build them deterministically
-  for LIB in $(find $STAGING -name \*.a); do
-    rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-    ar xv $LIB | cut -b5- > /tmp/list.txt
-    rm $LIB
-    ar crsD $LIB $(cat /tmp/list.txt)
-  done
-  #
-  cd "$STAGING"
-  find | sort | zip -X@ $OUTDIR/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
diff --git a/contrib/gitian-descriptors/boost-win.yml b/contrib/gitian-descriptors/boost-win.yml
deleted file mode 100644
index 347952e3a663..000000000000
--- a/contrib/gitian-descriptors/boost-win.yml
+++ /dev/null
@@ -1,86 +0,0 @@
----
-name: "boost"
-suites:
-- "precise"
-architectures:
-- "amd64"
-packages:
-- "mingw-w64"
-- "g++-mingw-w64"
-- "faketime"
-- "zip"
-reference_datetime: "2011-01-30 00:00:00"
-remotes: []
-files:
-- "boost_1_55_0.tar.bz2"
-- "boost-mingw-gas-cross-compile-2013-03-03.patch"
-script: |
-  # Defines
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  INDIR=$HOME/build
-  TEMPDIR=$HOME/tmp
-  # Input Integrity Check
-  echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | shasum -c
-  echo "d2b7f6a1d7051faef3c9cf41a92fa3671d905ef1e1da920d07651a43299f6268  boost-mingw-gas-cross-compile-2013-03-03.patch" | shasum -c
-
-  for BITS in 32 64; do # for architectures
-    #
-    INSTALLPREFIX=$HOME/staging${BITS}
-    BUILDDIR=$HOME/build${BITS}
-    if [ "x$BITS" = "x32" ]; then
-      HOST=i686-w64-mingw32
-    else
-      HOST=x86_64-w64-mingw32
-    fi
-    #
-    mkdir -p $INSTALLPREFIX $BUILDDIR
-    cd $BUILDDIR
-    #
-    tar --warning=no-timestamp -xjf $INDIR/boost_1_55_0.tar.bz2
-    cd boost_1_55_0
-    GCCVERSION=$($HOST-g++ -E -dM $(mktemp --suffix=.h) | grep __VERSION__ | cut -d ' ' -f 3 | cut -d '"' -f 2)
-    echo "using gcc : $GCCVERSION : $HOST-g++
-        :
-        <rc>$HOST-windres
-        <archiver>$HOST-ar
-        <cxxflags>-frandom-seed=boost1
-        <ranlib>$HOST-ranlib
-  ;" > user-config.jam
-    ./bootstrap.sh --without-icu
-
-    # Workaround: Upstream boost dev refuses to include patch that would allow Free Software cross-compile toolchain to work
-    #             This patch was authored by the Fedora package developer and ships in Fedora's mingw32-boost.
-    #             Please obtain the exact patch that matches the above sha256sum from one of the following mirrors.
-    #
-    # Read History:   https://svn.boost.org/trac/boost/ticket/7262
-    # History Mirror: http://rose.makesad.us/~paulproteus/mirrors/7262%20Boost.Context%20fails%20to%20build%20using%20MinGW.html
-    #
-    # Patch:          https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch
-    # Patch Mirror:   http://wtogami.fedorapeople.org/boost-mingw-gas-cross-compile-2013-03-03.patch
-    # Patch Mirror:   http://mindstalk.net/host/boost-mingw-gas-cross-compile-2013-03-03.patch
-    # Patch Mirror:   http://rose.makesad.us/~paulproteus/mirrors/boost-mingw-gas-cross-compile-2013-03-03.patch
-    patch -p0 < $INDIR/boost-mingw-gas-cross-compile-2013-03-03.patch
-
-    # Bug Workaround: boost-1.54.0 broke the ability to disable zlib, still broken in 1.55
-    # https://svn.boost.org/trac/boost/ticket/9156
-    sed -i 's^\[ ac.check-library /zlib//zlib : <library>/zlib//zlib^^' libs/iostreams/build/Jamfile.v2
-    sed -i 's^<source>zlib.cpp <source>gzip.cpp \]^^' libs/iostreams/build/Jamfile.v2
-
-    # http://statmt.org/~s0565741/software/boost_1_52_0/libs/context/doc/html/context/requirements.html
-    # "For cross-compiling the lib you must specify certain additional properties at bjam command line: target-os, abi, binary-format, architecture and address-model."
-    ./bjam toolset=gcc binary-format=pe target-os=windows threadapi=win32 address-model=$BITS threading=multi variant=release link=static runtime-link=static --user-config=user-config.jam --without-mpi --without-python -sNO_BZIP2=1 -sNO_ZLIB=1 --layout=tagged --build-type=complete --prefix="$INSTALLPREFIX" $MAKEOPTS install
-    # post-process all generated libraries to be deterministic
-    # extract them to a temporary directory then re-build them deterministically
-    for LIB in $(find $INSTALLPREFIX -name \*.a); do
-        rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-        $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
-        rm $LIB
-        $HOST-ar crsD $LIB $(cat /tmp/list.txt)
-    done
-    #
-    cd "$INSTALLPREFIX"
-    find | sort | zip -X@ $OUTDIR/boost-win$BITS-1.55.0-gitian-r6.zip
-  done # for BITS in
-
diff --git a/contrib/gitian-descriptors/deps-linux.yml b/contrib/gitian-descriptors/deps-linux.yml
deleted file mode 100644
index 82212221334a..000000000000
--- a/contrib/gitian-descriptors/deps-linux.yml
+++ /dev/null
@@ -1,98 +0,0 @@
----
-name: "bitcoin"
-suites:
-- "precise"
-architectures:
-- "i386"
-- "amd64"
-packages:
-- "g++"
-- "unzip"
-- "zip"
-- "pkg-config"
-- "libtool"
-- "faketime"
-- "bsdmainutils"
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "openssl-1.0.1h.tar.gz"
-- "miniupnpc-1.9.tar.gz"
-- "qrencode-3.4.3.tar.bz2"
-- "protobuf-2.5.0.tar.bz2"
-- "db-4.8.30.NC.tar.gz"
-script: |
-  STAGING="$HOME/install"
-  TEMPDIR="$HOME/tmp"
-  OPTFLAGS='-O2'
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  export LIBRARY_PATH="$STAGING/lib"
-  # Integrity Check
-  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz"  | sha256sum -c
-  echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz"   | sha256sum -c
-  echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz"    | sha256sum -c
-
-  #
-  tar xzf openssl-1.0.1h.tar.gz
-  cd openssl-1.0.1h
-  #   need -fPIC to avoid relocation error in 64 bit builds
-  ./config no-shared no-zlib no-dso no-krb5 --openssldir=$STAGING -fPIC
-  #   need to build OpenSSL with faketime because a timestamp is embedded into cversion.o
-  make
-  make install_sw
-  cd ..
-  #
-  tar xzfm miniupnpc-1.9.tar.gz
-  cd miniupnpc-1.9
-  #   miniupnpc is always built with -fPIC
-  INSTALLPREFIX=$STAGING make $MAKEOPTS install
-  rm -f $STAGING/lib/libminiupnpc.so* # no way to skip shared lib build
-  cd ..
-  #
-  tar xjf qrencode-3.4.3.tar.bz2
-  cd qrencode-3.4.3
-  unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
-  #   need --with-pic to avoid relocation error in 64 bit builds
-  ./configure --prefix=$STAGING --enable-static --disable-shared --with-pic --without-tools --disable-dependency-tracking
-  # Workaround to prevent re-configuring by make; make all files have a date in the past
-  find . -print0 | xargs -r0 touch -t 200001010000
-  export FAKETIME=$REFERENCE_DATETIME
-  make $MAKEOPTS install
-  cd ..
-  #
-  tar xjf protobuf-2.5.0.tar.bz2
-  cd protobuf-2.5.0
-  mkdir -p $STAGING/host/bin
-  unset FAKETIME # unset fake time during configure, as it does some clock sanity tests
-  #   need --with-pic to avoid relocation error in 64 bit builds
-  ./configure --prefix=$STAGING --bindir=$STAGING/host/bin --enable-static --disable-shared --with-pic --without-zlib
-  # Workaround to prevent re-configuring by make; make all files have a date in the past
-  find . -print0 | xargs -r0 touch -t 200001010000
-  export FAKETIME=$REFERENCE_DATETIME
-  make $MAKEOPTS install
-  cd ..
-  #
-  tar xzf db-4.8.30.NC.tar.gz
-  cd db-4.8.30.NC/build_unix
-  #   need --with-pic to avoid relocation error in 64 bit builds
-  ../dist/configure --prefix=$STAGING --enable-cxx --disable-shared --with-pic
-  # Workaround to prevent re-configuring by make; make all files have a date in the past
-  find . -print0 | xargs -r0 touch -t 200001010000
-  make $MAKEOPTS library_build
-  make install_lib install_include
-  cd ../..
-  # post-process all generated libraries to be deterministic
-  # extract them to a temporary directory then re-build them deterministically
-  for LIB in $(find $STAGING -name \*.a); do
-    rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-    ar xv $LIB | cut -b5- > /tmp/list.txt
-    rm $LIB
-    ar crsD $LIB $(cat /tmp/list.txt)
-  done
-  #
-  cd $STAGING
-  find include lib bin host | sort | zip -X@ $OUTDIR/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip
diff --git a/contrib/gitian-descriptors/deps-win.yml b/contrib/gitian-descriptors/deps-win.yml
deleted file mode 100644
index fe02950ef9c0..000000000000
--- a/contrib/gitian-descriptors/deps-win.yml
+++ /dev/null
@@ -1,128 +0,0 @@
----
-name: "bitcoin-deps"
-suites:
-- "precise"
-architectures:
-- "amd64"
-packages:
-- "mingw-w64"
-- "g++-mingw-w64"
-- "git-core"
-- "zip"
-- "faketime"
-- "psmisc"
-reference_datetime: "2011-01-30 00:00:00"
-remotes: []
-files:
-- "openssl-1.0.1h.tar.gz"
-- "db-4.8.30.NC.tar.gz"
-- "miniupnpc-1.9.tar.gz"
-- "zlib-1.2.8.tar.gz"
-- "libpng-1.6.8.tar.gz"
-- "qrencode-3.4.3.tar.bz2"
-script: |
-  #
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  INDIR=$HOME/build
-  TEMPDIR=$HOME/tmp
-  # Input Integrity Check
-  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz"  | sha256sum -c
-  echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz"    | sha256sum -c
-  echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz"   | sha256sum -c
-  echo "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d  zlib-1.2.8.tar.gz"      | sha256sum -c
-  echo "32c7acf1608b9c8b71b743b9780adb7a7b347563dbfb4a5263761056da44cc96  libpng-1.6.8.tar.gz"    | sha256sum -c
-  echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
-
-  for BITS in 32 64; do # for architectures
-    #
-    INSTALLPREFIX=$HOME/staging${BITS}
-    BUILDDIR=$HOME/build${BITS}
-    if [ "x$BITS" = "x32" ]; then
-      HOST=i686-w64-mingw32
-    else
-      HOST=x86_64-w64-mingw32
-    fi
-    #
-    mkdir -p $INSTALLPREFIX $BUILDDIR
-    cd $BUILDDIR
-    #
-    tar xzf $INDIR/openssl-1.0.1h.tar.gz
-    cd openssl-1.0.1h
-    if [ "x$BITS" = "x32" ]; then
-      OPENSSL_TGT=mingw
-    else
-      OPENSSL_TGT=mingw64
-    fi
-    ./Configure --cross-compile-prefix=$HOST- ${OPENSSL_TGT} no-shared no-dso --openssldir=$INSTALLPREFIX
-    make
-    make install_sw
-    cd ..
-    #
-    tar xzf $INDIR/db-4.8.30.NC.tar.gz
-    cd db-4.8.30.NC/build_unix
-    ../dist/configure --prefix=$INSTALLPREFIX --enable-mingw --enable-cxx --host=$HOST --disable-shared
-    make $MAKEOPTS library_build
-    make install_lib install_include
-    cd ../..
-    #
-    tar xzf $INDIR/miniupnpc-1.9.tar.gz
-    cd miniupnpc-1.9
-    echo "
-  --- miniupnpc-1.9/Makefile.mingw.orig   2013-09-29 18:52:51.014087958 -1000
-  +++ miniupnpc-1.9/Makefile.mingw        2013-09-29 19:09:29.663318691 -1000
-  @@ -67,8 +67,8 @@
-   
-   wingenminiupnpcstrings.o:	wingenminiupnpcstrings.c
-   
-  -miniupnpcstrings.h: miniupnpcstrings.h.in wingenminiupnpcstrings
-  -	wingenminiupnpcstrings \$< \$@
-  +miniupnpcstrings.h: miniupnpcstrings.h.in 
-  +	sed -e 's|OS/version|MSWindows/5.1.2600|' -e 's|MINIUPNPC_VERSION_STRING \"version\"|MINIUPNPC_VERSION_STRING \"VERSIONHERE\"|' \$< > \$@
-   
-   minixml.o:	minixml.c minixml.h miniupnpcstrings.h
-   
-  " | sed "s/VERSIONHERE/$(cat VERSION)/" | patch -p1
-    mkdir -p dll
-    make -f Makefile.mingw CC=$HOST-gcc AR=$HOST-ar libminiupnpc.a
-    install -d $INSTALLPREFIX/include/miniupnpc
-    install *.h $INSTALLPREFIX/include/miniupnpc
-    install libminiupnpc.a  $INSTALLPREFIX/lib
-    cd ..
-    #
-    tar xzf $INDIR/zlib-1.2.8.tar.gz
-    cd zlib-1.2.8
-    CROSS_PREFIX=$HOST- ./configure --prefix=$INSTALLPREFIX --static
-    make
-    make install
-    cd ..
-    #
-    tar xzf $INDIR/libpng-1.6.8.tar.gz
-    cd libpng-1.6.8
-    OPT="-O2"
-    CPPFLAGS="${OPT} -I$INSTALLPREFIX/include" CFLAGS="${OPT} -I$INSTALLPREFIX/include" LDFLAGS="${OPT} -L$INSTALLPREFIX/lib" ./configure --disable-shared --prefix=$INSTALLPREFIX --host=$HOST
-    make $MAKEOPTS
-    make install
-    cd ..
-    #
-    tar xjf $INDIR/qrencode-3.4.3.tar.bz2
-    cd qrencode-3.4.3
-    png_CFLAGS="-I$INSTALLPREFIX/include" png_LIBS="-L$INSTALLPREFIX/lib -lpng" ./configure --prefix=$INSTALLPREFIX --host=$HOST --enable-static --disable-shared --without-tools --disable-dependency-tracking
-    # Workaround to prevent re-configuring by make (resulting in missing m4 error); make all files have a date in the past
-    find . -print0 | xargs -r0 touch -t 200001010000
-    make
-    make install
-    cd ..
-    # post-process all generated libraries to be deterministic
-    # extract them to a temporary directory then re-build them deterministically
-    for LIB in $(find $INSTALLPREFIX -name \*.a); do
-        rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-        $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
-        rm $LIB
-        $HOST-ar crsD $LIB $(cat /tmp/list.txt)
-    done
-    #
-    cd $INSTALLPREFIX
-    find include lib | sort | zip -X@ $OUTDIR/bitcoin-deps-win$BITS-gitian-r13.zip
-  done # for BITS in
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 30b0227bdd0e..69de6bf62391 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,86 +1,94 @@
 ---
-name: "bitcoin"
+name: "bitcoin-linux-0.10"
+enable_cache: true
 suites:
 - "precise"
 architectures:
-- "i386"
 - "amd64"
 packages: 
-- "g++"
+- "g++-multilib"
 - "git-core"
-- "unzip"
 - "pkg-config"
 - "autoconf2.13"
 - "libtool"
 - "automake"
 - "faketime"
 - "bsdmainutils"
-- "libqt4-core"
-- "libqt4-gui"
-- "libqt4-dbus"
-- "libqt4-network"
-- "libqt4-test"
+- "binutils-gold"
 reference_datetime: "2013-06-01 00:00:00"
 remotes:
 - "url": "https://github.com/bitcoin/bitcoin.git"
   "dir": "bitcoin"
-files:
-- "bitcoin-deps-linux32-gitian-r6.zip"
-- "bitcoin-deps-linux64-gitian-r6.zip"
-- "boost-linux32-1.55.0-gitian-r1.zip"
-- "boost-linux64-1.55.0-gitian-r1.zip"
-- "qt-linux32-4.6.4-gitian-r1.tar.gz"
-- "qt-linux64-4.6.4-gitian-r1.tar.gz"
+files: []
 script: |
-  STAGING="$HOME/install"
-  OPTFLAGS='-O2'
-  BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
-  TEMPDIR="$HOME/tempdir"
-  export TZ=UTC
-  export LIBRARY_PATH="$STAGING/lib"
-  export PATH="$STAGING/bin:$PATH"
-  mkdir -p ${BINDIR}
-  #
-  mkdir -p $STAGING
-  cd $STAGING
-  unzip ../build/bitcoin-deps-linux${GBUILD_BITS}-gitian-r6.zip
-  unzip ../build/boost-linux${GBUILD_BITS}-1.55.0-gitian-r1.zip
-  tar -zxf ../build/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz
-  cd ../build
+  WRAP_DIR=$HOME/wrapped
+  HOSTS="i686-pc-linux-gnu x86_64-unknown-linux-gnu"
+  CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat"
+  FAKETIME_HOST_PROGS=""
+  FAKETIME_PROGS="date ar ranlib nm strip"
+
+  export QT_RCC_TEST=1
+  export GZIP="-9n"
+  export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export TZ="UTC"
+  export BUILD_DIR=`pwd`
+  mkdir -p ${WRAP_DIR}
+  if test -n "$GBUILD_CACHE_ENABLED"; then
+    export SOURCES_PATH=${GBUILD_COMMON_CACHE}
+    export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
+    mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
+  fi
+
+  # Create global faketime wrappers
+  for prog in ${FAKETIME_PROGS}; do
+    echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+    echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+    echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+    echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+    echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+    chmod +x ${WRAP_DIR}/${prog}
+  done
+
+  # Create per-host faketime wrappers
+  for i in $HOSTS; do
+    for prog in ${FAKETIME_HOST_PROGS}; do
+        echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+        echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+        echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+        echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+        echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+        chmod +x ${WRAP_DIR}/${i}-${prog}
+    done
+  done
+  export PATH=${WRAP_DIR}:${PATH}
 
-  # Avoid exporting *any* symbols from the executable
-  # This avoids conflicts between the libraries statically linked into bitcoin and any
-  # libraries we may link dynamically (such as Qt and OpenSSL, see issue #4094).
-  # It also avoids start-up overhead to not export any unnecessary symbols.
-  # To do this, build a linker script that marks all symbols as local.
-  LINKER_SCRIPT=$HOME/build/linker_version_script
-  echo '
-  {
-    local: *;
-  };' > $LINKER_SCRIPT
-  function do_configure {
-      ./configure "$@" --enable-upnp-default --prefix=$STAGING --with-protoc-bindir=$STAGING/host/bin --with-qt-bindir=$STAGING/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib -Wl,--version-script=$LINKER_SCRIPT ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" --enable-glibc-back-compat
-  }
-  #
   cd bitcoin
+  BASEPREFIX=`pwd`/depends
+  # Build dependencies for each host
+  for i in $HOSTS; do
+    make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
+  done
+
+  # Create the release tarball using (arbitrarily) the first host
   ./autogen.sh
-  do_configure
+  ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
   make dist
   DISTNAME=`echo bitcoin-*.tar.gz`
 
-  # Build dynamic versions of everything
-  # (with static linking to boost and openssl as well a some non-OS deps)
-  mkdir -p distsrc
-  cd distsrc
-  tar --strip-components=1 -xf ../$DISTNAME
-  do_configure --bindir=$BINDIR 
-  make $MAKEOPTS
-  make $MAKEOPTS install-strip
-  make $MAKEOPTS clean
+  ORIGPATH="$PATH"
+  # Extract the release tarball into a dir for each host and build
+  for i in ${HOSTS}; do
+    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
+    mkdir -p distsrc-${i}
+    cd distsrc-${i}
+    tar --strip-components=1 -xf ../$DISTNAME
 
-  # sort distribution tar file and normalize user/group/mtime information for deterministic output
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    make ${MAKEOPTS}
+    make install-strip
+    cd ..
+  done
   mkdir -p $OUTDIR/src
-  rm -rf $TEMPDIR
-  mkdir -p $TEMPDIR
-  cd $TEMPDIR
-  tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
+  mv $DISTNAME $OUTDIR/src
+  mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
+  mv ${OUTDIR}/i686-* ${OUTDIR}/32
diff --git a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml b/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
deleted file mode 100644
index bc3d561c3570..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-name: "bitcoin"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "faketime"
-- "bsdmainutils"
-- "pkg-config"
-- "p7zip-full"
-- "libtool"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes:
-- "url": "https://github.com/bitcoin/bitcoin.git"
-  "dir": "bitcoin"
-files:
-- "osx-native-depends-r3.tar.gz"
-- "osx-depends-r4.tar.gz"
-- "osx-depends-qt-5.2.1-r4.tar.gz"
-- "MacOSX10.7.sdk.tar.gz"
-
-script: |
-
-  HOST=x86_64-apple-darwin11
-  PREFIX=`pwd`/osx-cross-depends/prefix
-  SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.7.sdk
-  NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-
-  export SOURCES_PATH=`pwd`
-
-  mkdir -p osx-cross-depends/SDKs
-
-  tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-r4.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r4.tar.gz
-  export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
-
-  cd bitcoin
-
-  export ZERO_AR_DATE=1
-  export QT_RCC_TEST=1
-  ./autogen.sh
-  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode
-  make dist
-  mkdir -p distsrc
-  cd distsrc
-  tar --strip-components=1 -xf ../bitcoin-*.tar*
-  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig"  --disable-dependency-tracking --disable-maintainer-mode
-  make $MAKEOPTS
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  make deploy
-  dmg dmg Bitcoin-Qt.dmg $OUTDIR/Bitcoin-Qt.dmg
diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml
deleted file mode 100644
index 07a021cf0c59..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-depends.yml
+++ /dev/null
@@ -1,159 +0,0 @@
----
-name: "osx-depends"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "p7zip-full"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "boost_1_55_0.tar.bz2"
-- "db-4.8.30.NC.tar.gz"
-- "miniupnpc-1.9.tar.gz"
-- "openssl-1.0.1h.tar.gz"
-- "protobuf-2.5.0.tar.bz2"
-- "qrencode-3.4.3.tar.bz2"
-- "MacOSX10.7.sdk.tar.gz"
-- "osx-native-depends-r3.tar.gz"
-
-script: |
-
-  echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | sha256sum -c
-  echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz" | sha256sum -c
-  echo "2923e453e880bb949e3d4da9f83dd3cb6f08946d35de0b864d0339cf70934464  miniupnpc-1.9.tar.gz" | sha256sum -c
-  echo "9d1c8a9836aa63e2c6adb684186cbd4371c9e9dcc01d6e3bb447abf2d4d3d093  openssl-1.0.1h.tar.gz" | sha256sum -c
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
-
-  REVISION=r4
-  export SOURCES_PATH=`pwd`
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export PATH=$HOME:$PATH
-  export SOURCES_PATH=`pwd`
-  export ZERO_AR_DATE=1
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  PREFIX=`pwd`/prefix
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
-  INT_CXXFLAGS="${INT_CFLAGS}"
-  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
-  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
-  INT_CPPFLAGS="-I${PREFIX}/include"
-  INT_CC=clang
-  INT_CXX=clang++
-  INT_OBJC=clang
-  INT_OBJCXX=clang++
-  INT_AR=${HOST}-ar
-  INT_RANLIB=${HOST}-ranlib
-  INT_LIBTOOL=${HOST}-libtool
-  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-  mkdir -p ${PREFIX}/bin
-  mkdir -p ${PREFIX}/lib
-  mkdir -p ${BUILD_BASE}
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
-
-  # bdb
-  SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz
-  BUILD_DIR=${BUILD_BASE}/db-4.8.30.NC
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ${BUILD_DIR}/dbinc/atomic.h
-  pushd ${BUILD_DIR}
-  cd build_unix;
-  ../dist/configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}"
-  make $MAKEOPTS libdb.a libdb_cxx.a
-  make  install_lib install_include
-  popd
-
-  # openssl
-  SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1h.tar.gz
-  BUILD_DIR=${BUILD_BASE}/openssl-1.0.1h
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  sed -ie "s|cc:|${INT_CC}:|" ${BUILD_DIR}/Configure
-  sed -ie "s|\(-arch [_a-zA-Z0-9]*\)|\1 --sysroot ${SDK}  -target ${HOST} -msse2|" ${BUILD_DIR}/Configure
-  AR="${INT_AR}" RANLIB="${INT_RANLIB}" ./Configure --prefix=${PREFIX} --openssldir=${PREFIX}/etc/openssl zlib shared no-krb5 darwin64-x86_64-cc ${INT_LDFLAGS} ${INT_CLANG_LDFLAGS} ${INT_CPPFLAGS}
-  sed -i "s|engines apps test|engines|" ${BUILD_DIR}/Makefile
-  sed -i "/define DATE/d" ${BUILD_DIR}/crypto/Makefile
-  make -j1 build_libs libcrypto.pc libssl.pc openssl.pc
-  make -j1 install_sw
-  popd
-
-  #libminiupnpc
-  SOURCE_FILE=${SOURCES_PATH}/miniupnpc-1.9.tar.gz
-  BUILD_DIR=${BUILD_BASE}/miniupnpc-1.9
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  CFLAGS="${INT_CFLAGS} ${INT_CPPFLAGS}" make $MAKEOPTS OS=Darwin CC="${INT_CC}" AR="${INT_AR}" libminiupnpc.a
-  install -d ${PREFIX}/include/miniupnpc
-  install *.h ${PREFIX}/include/miniupnpc
-  install libminiupnpc.a  ${PREFIX}/lib
-  popd
-
-  # qrencode
-  SOURCE_FILE=${SOURCES_PATH}/qrencode-3.4.3.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/qrencode-3.4.3
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-
-  # m4 folder is not included in the stable release, which can confuse aclocal
-  # if its timestamp ends up being earlier than configure.ac when extracted
-  touch aclocal.m4
-  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --disable-shared -without-tools --disable-sdltest --disable-dependency-tracking
-  make $MAKEOPTS
-  make install
-  popd
-
-  # libprotobuf
-  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
-
-  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --enable-shared=no --disable-dependency-tracking --with-protoc=${NATIVEPREFIX}/bin/protoc
-  cd src
-  make $MAKEOPTS libprotobuf.la
-  make install-libLTLIBRARIES install-nobase_includeHEADERS
-  cd ..
-  make install-pkgconfigDATA
-  popd
-
-  # boost
-  SOURCE_FILE=${SOURCES_PATH}/boost_1_55_0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/boost_1_55_0
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  ./bootstrap.sh --with-libraries=chrono,filesystem,program_options,system,thread,test
-  echo "using darwin : : ${INT_CXX} : <cxxflags>\"${INT_CFLAGS} ${INT_CPPFLAGS}\" <linkflags>\"${INT_LDFLAGS} ${INT_CLANG_LDFLAGS}\" <archiver>\"${INT_LIBTOOL}\" <striper>\"${INT_STRIP}\" : ;" > "user-config.jam"
-  ./b2 -d2 --layout=tagged --build-type=complete --prefix="${PREFIX}" --toolset=darwin-4.2.1 --user-config=user-config.jam variant=release threading=multi link=static install
-  popd
-
-  export GZIP="-9n"
-  find prefix | sort | tar --no-recursion -czf osx-depends-${REVISION}.tar.gz -T -
-
-  mv osx-depends-${REVISION}.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-native.yml b/contrib/gitian-descriptors/gitian-osx-native.yml
deleted file mode 100644
index a753ad704ffe..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-native.yml
+++ /dev/null
@@ -1,178 +0,0 @@
----
-name: "osx-native"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "faketime"
-- "libssl-dev"
-- "libbz2-dev"
-- "libz-dev"
-- "cmake"
-- "libcap-dev"
-- "p7zip-full"
-- "uuid-dev"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "10cc648683617cca8bcbeae507888099b41b530c.tar.gz"
-- "cctools-809.tar.gz"
-- "dyld-195.5.tar.gz"
-- "ld64-127.2.tar.gz"
-- "protobuf-2.5.0.tar.bz2"
-- "MacOSX10.7.sdk.tar.gz"
-- "cdrkit-1.1.11.tar.gz"
-- "libdmg-hfsplus-v0.1.tar.gz"
-- "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz"
-- "cdrkit-deterministic.patch"
-
-
-script: |
-
-  echo "18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca  10cc648683617cca8bcbeae507888099b41b530c.tar.gz" | sha256sum -c
-  echo "03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad  cctools-809.tar.gz" | sha256sum -c
-  echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c  dyld-195.5.tar.gz" | sha256sum -c
-  echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142  ld64-127.2.tar.gz" | sha256sum -c
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da  cdrkit-1.1.11.tar.gz" | sha256sum -c
-  echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3  libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c
-  echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff  clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c
-  echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f  cdrkit-deterministic.patch" | sha256sum -c
-
-
-  REVISION=r3
-  export REFERENCE_DATETIME
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-
-  REAL_AR=`which ar`
-  REAL_RANLIB=`which ranlib`
-  REAL_DATE=`which date`
-
-  echo '#!/bin/bash' > $HOME/ar
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
-  echo "$REAL_AR \"\$@\"" >> $HOME/ar
-
-  echo '#!/bin/bash' > $HOME/ranlib
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ranlib
-  echo "$REAL_RANLIB \"\$@\"" >> $HOME/ranlib
-
-  echo '#!/bin/bash' > $HOME/date
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/date
-  echo "$REAL_DATE \"\$@\"" >> $HOME/date
-
-  chmod +x $HOME/ar $HOME/ranlib $HOME/date
-
-
-  export PATH=$HOME:$PATH
-  export SOURCES_PATH=`pwd`
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  CFLAGS=""
-  CXXFLAGS="${CFLAGS}"
-  LDFLAGS="-L${NATIVEPREFIX}/lib"
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  #  Clang
-  SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-  BUILD_DIR=${BUILD_BASE}/clang+llvm-3.2-x86-linux-ubuntu-12.04
-
-  mkdir -p ${NATIVEPREFIX}/lib/clang/3.2/include
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  cp ${BUILD_DIR}/bin/clang ${NATIVEPREFIX}/bin/
-  cp ${BUILD_DIR}/bin/clang++ ${NATIVEPREFIX}/bin/
-  cp ${BUILD_DIR}/lib/libLTO.so ${NATIVEPREFIX}/lib/
-  cp ${BUILD_DIR}/lib/clang/3.2/include/* ${NATIVEPREFIX}/lib/clang/3.2/include
-
-  # cctools
-  SOURCE_FILE=${SOURCES_PATH}/10cc648683617cca8bcbeae507888099b41b530c.tar.gz
-  BUILD_DIR=${BUILD_BASE}/toolchain4-10cc648683617cca8bcbeae507888099b41b530c
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  mkdir -p ${BUILD_DIR}/sdks
-  pushd ${BUILD_DIR}/sdks;
-  ln -sf ${SDK} MacOSX10.7.sdk
-  ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz
-  ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz
-  ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz
-
-  tar -C ${BUILD_DIR} -xf ${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-  #   Hack in the use of our llvm headers rather than grabbing the old llvm-gcc.
-  sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
-  sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
-  sed -i "s|\${LLVM_CLANG_DIR}/llvmCore/include/llvm-c|\${LLVM_CLANG_DIR}/include/llvm-c \${LLVM_CLANG_DIR}/include/llvm |" ${BUILD_DIR}/cctools2odcctools/extract.sh
-
-  sed -i "s|fAC_INIT|AC_INIT|" ${BUILD_DIR}/cctools2odcctools/files/configure.ac
-  sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac
-
-  cd ${BUILD_DIR}/cctools2odcctools
-  ./extract.sh --osxver 10.7
-  cd odcctools-809
-  ./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK}
-
-  #   The 'PC' define in sparc/reg.h conflicts but doesn't get used anyway. Just rename it.
-  sed -i "s|define\tPC|define\tPC_|"  ${BUILD_DIR}/cctools2odcctools/odcctools-809/include/architecture/sparc/reg.h
-  make $MAKEOPTS
-  make install
-  popd
-
-  # protoc
-  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
-
-  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
-  pushd ${BUILD_DIR};
-  ./configure --enable-shared=no --disable-dependency-tracking --prefix=${NATIVEPREFIX}
-  make $MAKEOPTS
-  cp ${BUILD_DIR}/src/protoc ${NATIVEPREFIX}/bin/
-  popd
-
-  # cdrkit
-  SOURCE_FILE=${SOURCES_PATH}/cdrkit-1.1.11.tar.gz
-  BUILD_DIR=${BUILD_BASE}/cdrkit-1.1.11
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  patch -p1 < ${SOURCES_PATH}/cdrkit-deterministic.patch
-  cmake -DCMAKE_INSTALL_PREFIX=${NATIVEPREFIX}
-  make $MAKEOPTS genisoimage
-  make -C genisoimage install
-  popd
-
-  # libdmg-hfsplus
-  SOURCE_FILE=${SOURCES_PATH}/libdmg-hfsplus-v0.1.tar.gz
-  BUILD_DIR=${BUILD_BASE}/libdmg-hfsplus-libdmg-hfsplus-v0.1
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  mkdir -p ${BUILD_DIR}/build
-  pushd ${BUILD_DIR}/build
-  cmake -DCMAKE_INSTALL_PREFIX:PATH=${NATIVEPREFIX}/bin ..
-  make $MAKEOPTS
-  make install
-  popd
-
-  rm -rf native-prefix/docs
-
-  export GZIP="-9n"
-  find native-prefix | sort | tar --no-recursion -czf osx-native-depends-$REVISION.tar.gz -T -
-  mv osx-native-depends-$REVISION.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml
deleted file mode 100644
index 5e0ad9222a85..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-qt.yml
+++ /dev/null
@@ -1,186 +0,0 @@
----
-name: "osx-qt"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "p7zip-full"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "qt-everywhere-opensource-src-5.2.1.tar.gz"
-- "osx-native-depends-r3.tar.gz"
-- "osx-depends-r4.tar.gz"
-- "MacOSX10.7.sdk.tar.gz"
-
-script: |
-
-  echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1  qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
-
-  REVISION=r4
-  export SOURCES_PATH=`pwd`
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export ZERO_AR_DATE=1
-
-  export TZ=UTC
-
-  REAL_DATE=`which date`
-  echo '#!/bin/bash' > $HOME/date
-  echo "$REAL_DATE -d \"${REFERENCE_DATETIME}\" \"\$@\"" >> $HOME/date
-
-  chmod +x $HOME/date
-  export PATH=$HOME:$PATH
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  PREFIX=`pwd`/prefix
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
-  INT_CXXFLAGS="${INT_CFLAGS}"
-  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
-  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
-  INT_CPPFLAGS="-I${PREFIX}/include"
-  INT_CC=clang
-  INT_CXX=clang++
-  INT_OBJC=clang
-  INT_OBJCXX=clang++
-  INT_AR=${HOST}-ar
-  INT_RANLIB=${HOST}-ranlib
-  INT_LIBTOOL=${HOST}-libtool
-  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-  mkdir -p ${PREFIX}/bin
-  mkdir -p ${PREFIX}/lib
-  mkdir -p ${BUILD_BASE}
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
-
-  export PATH=`pwd`/native-prefix/bin:$PATH
-  tar xf /home/ubuntu/build/osx-depends-r4.tar.gz
-
-  SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
-  BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
-
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-
-  # Install our mkspec. All files are pulled from the macx-clang spec, except for
-  # our custom qmake.conf
-  SPECFILE=${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/qmake.conf
-
-  mkdir -p ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.lib ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.app ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/qplatformdefs.h ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-
-  cat > ${SPECFILE} <<ENDCONF
- 
-  MAKEFILE_GENERATOR      = UNIX
-  CONFIG                 += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
-  QMAKE_INCREMENTAL_STYLE = sublib
-
-  include(../common/macx.conf)
-  include(../common/gcc-base-mac.conf)
-  include(../common/clang.conf)
-  include(../common/clang-mac.conf)
-
-  QMAKE_XCODE_VERSION=4.3
-  QMAKE_XCODE_DEVELOPER_PATH=/Developer
-
-  QMAKE_MACOSX_DEPLOYMENT_TARGET = ${MIN_VERSION}
-
-  QMAKE_MAC_SDK=macosx
-  QMAKE_MAC_SDK.macosx.path = ${SDK}
-  QMAKE_MAC_SDK.macosx.platform_name = macosx
-  QMAKE_MAC_SDK_PATH=${SDK}
-
-  QMAKE_CFLAGS += -target ${HOST}
-  QMAKE_OBJECTIVE_CFLAGS += -target ${HOST}
-  QMAKE_CXXFLAGS += -target ${HOST}
-
-  QMAKE_LFLAGS += -target ${HOST}
-  QMAKE_AR = ${HOST}-ar cq
-  QMAKE_RANLIB=${HOST}-ranlib
-  QMAKE_LIBTOOL=${HOST}-libtool
-  QMAKE_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  load(qt_config)
- 
-  ENDCONF
-
-  pushd ${BUILD_DIR}
-  ./configure -release -opensource -openssl-linked \
-  -no-audio-backend  -no-javascript-jit -no-sql-sqlite -no-sql-tds \
-  -no-cups -no-iconv -no-dbus -no-gif -no-audio-backend -no-freetype \
-  -no-javascript-jit -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch \
-  -no-dbus -no-gif -no-sm -nomake examples -no-feature-style-plastique \
-  -no-xcb -no-qml-debug -no-pch -no-nis \
-  -no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif \
-  -no-feature-style-windowsmobile -no-feature-style-windowsce \
-  -no-feature-style-cleanlooks \
-  -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql \
-  -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
-  -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport \
-  -skip qtdeclarative -skip qtmultimedia -skip qtimageformats \
-  -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns \
-  -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity \
-  -skip qtwinextras -skip qtscript \
-  -prefix ${PREFIX} -bindir ${NATIVEPREFIX}/bin \
-  -confirm-license -xplatform macx-clang-linux -v ${INT_LDFLAGS}
-
-  # RCC's output is sorted using each file entry's hash as the key. Unfortunately,
-  # the hash function uses a random seed for each run so the results aren't
-  # deterministic. This leads to static resources being defined in a random order,
-  # which in-turn means that object files are not predictable.
-  # Fortunately, this upsets Qt's unit tests as well, so they've added the
-  # QT_RCC_TEST environment variable to set a pre-defined seed. Here, do the same
-  # thing for the same reason.
-  QT_RCC_TEST=1 make $MAKEOPTS module-qtbase-make_first
-
-
-  make $MAKEOPTS module-qttranslations-make_first
-  make $MAKEOPTS module-qttools-make_first
-  make $MAKEOPTS -C qtbase
-  make -C qtbase install
-  make -C qttranslations install
-  make -C qttools/src/linguist install
-  popd
-
-  # This file should not be installed to the destination. It's native and
-  # non-deterministic. Remove it.
-  # See: https://bugreports.qt-project.org/browse/QTBUG-31393
-  rm -f ${PREFIX}/lib/libQt5Bootstrap.a
-
-  rm -f ${PREFIX}/lib/Qt*.framework/Qt*.prl
-  pushd ${PREFIX}/include
-  ln -sf ../lib/QtNetwork.framework/Headers/ QtNetwork
-  ln -sf ../lib/QtWidgets.framework/Headers/ QtWidgets
-  ln -sf ../lib/QtGui.framework/Headers/ QtGui
-  ln -sf ../lib/QtCore.framework/Headers/ QtCore
-  ln -sf ../lib/QtTest.framework/Headers/ QtTest
-  popd
-
-  rm -f ${PREFIX}/lib/*.la
-  find ${PREFIX}/lib -name "*.prl" -delete
-
-  export GZIP="-9n"
-  find native-prefix prefix | sort | tar --no-recursion -czf osx-depends-qt-5.2.1-${REVISION}.tar.gz -T -
-
-  mv osx-depends-qt-5.2.1-${REVISION}.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
new file mode 100644
index 000000000000..5c230e80b16e
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -0,0 +1,104 @@
+---
+name: "bitcoin-osx-0.10"
+enable_cache: true
+suites:
+- "precise"
+architectures:
+- "amd64"
+packages: 
+- "g++-multilib"
+- "git-core"
+- "pkg-config"
+- "autoconf2.13"
+- "libtool"
+- "automake"
+- "faketime"
+- "bsdmainutils"
+- "cmake"
+- "libcap-dev"
+- "libz-dev"
+- "libbz2-dev"
+reference_datetime: "2013-06-01 00:00:00"
+remotes:
+- "url": "https://github.com/bitcoin/bitcoin.git"
+  "dir": "bitcoin"
+files:
+- "MacOSX10.7.sdk.tar.gz"
+script: |
+  WRAP_DIR=$HOME/wrapped
+  HOSTS="x86_64-apple-darwin11"
+  CONFIGFLAGS="--enable-upnp-default GENISOIMAGE=$WRAP_DIR/genisoimage"
+  FAKETIME_HOST_PROGS=""
+  FAKETIME_PROGS="ar ranlib date dmg genisoimage"
+
+  export QT_RCC_TEST=1
+  export GZIP="-9n"
+  export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export TZ="UTC"
+  export BUILD_DIR=`pwd`
+  mkdir -p ${WRAP_DIR}
+  if test -n "$GBUILD_CACHE_ENABLED"; then
+    export SOURCES_PATH=${GBUILD_COMMON_CACHE}
+    export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
+    mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
+  fi
+
+  export ZERO_AR_DATE=1
+
+  # Create global faketime wrappers
+  for prog in ${FAKETIME_PROGS}; do
+    echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+    echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+    echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+    echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+    echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+    chmod +x ${WRAP_DIR}/${prog}
+  done
+
+  # Create per-host faketime wrappers
+  for i in $HOSTS; do
+    for prog in ${FAKETIME_HOST_PROGS}; do
+        echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+        echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+        echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+        echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+        echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+        chmod +x ${WRAP_DIR}/${i}-${prog}
+    done
+  done
+  export PATH=${WRAP_DIR}:${PATH}
+
+  cd bitcoin
+  BASEPREFIX=`pwd`/depends
+
+  mkdir -p ${BASEPREFIX}/SDKs
+  tar -C ${BASEPREFIX}/SDKs -xf ${BUILD_DIR}/MacOSX10.7.sdk.tar.gz
+
+  # Build dependencies for each host
+  for i in $HOSTS; do
+    make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
+  done
+
+  # Create the release tarball using (arbitrarily) the first host
+  ./autogen.sh
+  ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+  make dist
+  DISTNAME=`echo bitcoin-*.tar.gz`
+
+  ORIGPATH="$PATH"
+  # Extract the release tarball into a dir for each host and build
+  for i in ${HOSTS}; do
+    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
+    mkdir -p distsrc-${i}
+    cd distsrc-${i}
+    tar --strip-components=1 -xf ../$DISTNAME
+
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    make ${MAKEOPTS}
+    make install-strip
+    make deploy
+    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/Bitcoin-Qt.dmg
+    cd ..
+  done
+  mkdir -p $OUTDIR/src
+  mv $DISTNAME $OUTDIR/src
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index b2795c537694..cf5436352bc2 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,97 +1,98 @@
 ---
-name: "bitcoin"
+name: "bitcoin-win-0.10"
+enable_cache: true
 suites:
 - "precise"
 architectures:
 - "amd64"
-packages:
-- "mingw-w64"
-- "g++-mingw-w64"
+packages: 
+- "g++"
 - "git-core"
-- "unzip"
-- "nsis"
-- "faketime"
+- "pkg-config"
 - "autoconf2.13"
 - "libtool"
 - "automake"
-- "pkg-config"
+- "faketime"
 - "bsdmainutils"
-
+- "mingw-w64"
+- "g++-mingw-w64"
+- "nsis"
 reference_datetime: "2013-06-01 00:00:00"
 remotes:
 - "url": "https://github.com/bitcoin/bitcoin.git"
   "dir": "bitcoin"
-files:
-- "qt-win32-5.2.0-gitian-r3.zip"
-- "qt-win64-5.2.0-gitian-r3.zip"
-- "boost-win32-1.55.0-gitian-r6.zip"
-- "boost-win64-1.55.0-gitian-r6.zip"
-- "bitcoin-deps-win32-gitian-r13.zip"
-- "bitcoin-deps-win64-gitian-r13.zip"
-- "protobuf-win32-2.5.0-gitian-r4.zip"
-- "protobuf-win64-2.5.0-gitian-r4.zip"
+files: []
 script: |
-  # Defines
-  export TZ=UTC
-  INDIR=$HOME/build
-  OPTFLAGS='-O2'
-  TEMPDIR="$HOME/tempdir"
-  NEEDDIST=1
-  # Qt: workaround for determinism in resource ordering
-  #  Qt5's rcc uses a QHash to store the files for the resource.
-  #  A security fix in QHash makes the ordering of keys to be different on every run
-  #  (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
-  #  This is good in general but qrc shouldn't be doing a traversal over a randomized container.
-  #  The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
-  #  For now luckily there is a test mode that forces a fixed seed.
+  WRAP_DIR=$HOME/wrapped
+  HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
+  CONFIGFLAGS="--enable-upnp-default"
+  FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
+  FAKETIME_PROGS="date makensis"
+
   export QT_RCC_TEST=1
-  for BITS in 32 64; do # for architectures
-    #
-    STAGING=$HOME/staging${BITS}
-    BUILDDIR=$HOME/build${BITS}
-    BINDIR=$OUTDIR/$BITS
-    if [ "x$BITS" = "x32" ]; then
-      HOST=i686-w64-mingw32
-    else
-      HOST=x86_64-w64-mingw32
-    fi
-    export PATH=$STAGING/host/bin:$PATH
-    mkdir -p $STAGING $BUILDDIR $BINDIR
-    #
-    cd $STAGING
-    unzip $INDIR/qt-win${BITS}-5.2.0-gitian-r3.zip
-    unzip $INDIR/boost-win${BITS}-1.55.0-gitian-r6.zip
-    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
-    unzip $INDIR/protobuf-win${BITS}-2.5.0-gitian-r4.zip
-    if [ "x$NEEDDIST" = "x1" ]; then
-      # Make source code archive which is architecture independent so it only needs to be done once
-      cd $HOME/build/bitcoin
-      ./autogen.sh
-      ./configure --bindir=$OUTDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins  --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
-      make dist
-      DISTNAME=`echo bitcoin-*.tar.gz`
-      NEEDDIST=0
-    fi
-    # Build platform-dependent executables from source archive
-    cd $BUILDDIR
-    mkdir -p distsrc
-    cd distsrc
-    tar --strip-components=1 -xf $HOME/build/bitcoin/$DISTNAME
-    ./configure --enable-upnp-default --bindir=$BINDIR --prefix=$STAGING --host=$HOST --with-qt-plugindir=$STAGING/plugins  --with-qt-incdir=$STAGING/include --with-qt-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --with-protoc-bindir=$STAGING/host/bin --disable-dependency-tracking CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}"
-    export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-    export FAKETIME=$REFERENCE_DATETIME
-    make $MAKEOPTS
+  export GZIP="-9n"
+  export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export TZ="UTC"
+  export BUILD_DIR=`pwd`
+  mkdir -p ${WRAP_DIR}
+  if test -n "$GBUILD_CACHE_ENABLED"; then
+    export SOURCES_PATH=${GBUILD_COMMON_CACHE}
+    export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
+    mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
+  fi
+
+  # Create global faketime wrappers
+  for prog in ${FAKETIME_PROGS}; do
+    echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+    echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+    echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+    echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+    echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+    chmod +x ${WRAP_DIR}/${prog}
+  done
+
+  # Create per-host faketime wrappers
+  for i in $HOSTS; do
+    for prog in ${FAKETIME_HOST_PROGS}; do
+        echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+        echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+        echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+        echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+        echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+        chmod +x ${WRAP_DIR}/${i}-${prog}
+    done
+  done
+  export PATH=${WRAP_DIR}:${PATH}
+
+  cd bitcoin
+  BASEPREFIX=`pwd`/depends
+  # Build dependencies for each host
+  for i in $HOSTS; do
+    make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
+  done
+
+  # Create the release tarball using (arbitrarily) the first host
+  ./autogen.sh
+  ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+  make dist
+  DISTNAME=`echo bitcoin-*.tar.gz`
+
+  ORIGPATH="$PATH"
+  # Extract the release tarball into a dir for each host and build
+  for i in ${HOSTS}; do
+    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
+    mkdir -p distsrc-${i}
+    cd distsrc-${i}
+    tar --strip-components=1 -xf ../$DISTNAME
+
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    make ${MAKEOPTS}
     make deploy
     make install-strip
-    cp -f bitcoin-*setup*.exe $BINDIR/
-    unset LD_PRELOAD
-    unset FAKETIME
-  done # for BITS in
-
-  # sort distribution tar file and normalize user/group/mtime information for deterministic output
+    cp -f bitcoin-*setup*.exe $OUTDIR/
+    cd ..
+  done
   mkdir -p $OUTDIR/src
-  rm -rf $TEMPDIR
-  mkdir -p $TEMPDIR
-  cd $TEMPDIR
-  tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
-
+  mv $DISTNAME $OUTDIR/src
+  mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
+  mv ${OUTDIR}/i686-* ${OUTDIR}/32
diff --git a/contrib/gitian-descriptors/protobuf-win.yml b/contrib/gitian-descriptors/protobuf-win.yml
deleted file mode 100644
index 1b7af08843df..000000000000
--- a/contrib/gitian-descriptors/protobuf-win.yml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-name: "protobuf-win32"
-suites:
-- "precise"
-architectures:
-- "amd64"
-packages:
-- "mingw-w64"
-- "g++-mingw-w64"
-- "zip"
-- "faketime"
-reference_datetime: "2013-04-15 00:00:00"
-remotes: []
-files:
-- "protobuf-2.5.0.tar.bz2"
-script: |
-  #
-  export TZ=UTC
-  INDIR=$HOME/build
-  TEMPDIR=$HOME/tmp
-  OPTFLAGS="-O2"
-  # Integrity Check
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-
-  for BITS in 32 64; do # for architectures
-    #
-    INSTALLPREFIX=$HOME/staging${BITS}
-    BUILDDIR=$HOME/build${BITS}
-    if [ "x$BITS" = "x32" ]; then
-      HOST=i686-w64-mingw32
-    else
-      HOST=x86_64-w64-mingw32
-    fi
-    #
-    mkdir -p $INSTALLPREFIX $BUILDDIR
-    cd $BUILDDIR
-    #
-    tar xjf $INDIR/protobuf-2.5.0.tar.bz2
-    cd protobuf-2.5.0
-    # First: build a native (linux) protoc
-    ./configure --enable-shared=no --disable-dependency-tracking --without-zlib CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
-    make
-    mkdir -p $INSTALLPREFIX/host/bin
-    cp src/protoc $INSTALLPREFIX/host/bin
-    # Now recompile with the mingw cross-compiler:
-    make distclean
-    ./configure --prefix=$INSTALLPREFIX --enable-shared=no --disable-dependency-tracking --without-zlib --with-protoc=$INSTALLPREFIX/host/bin/protoc --host=$HOST CXXFLAGS="-frandom-seed=11 ${OPTFLAGS}"
-    export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-    export FAKETIME=$REFERENCE_DATETIME
-    make
-    make install
-    # post-process all generated libraries to be deterministic
-    # extract them to a temporary directory then re-build them deterministically
-    for LIB in $(find $INSTALLPREFIX -name \*.a); do
-        rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-        $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
-        rm $LIB
-        $HOST-ar crsD $LIB $(cat /tmp/list.txt)
-    done
-    #
-    cd $INSTALLPREFIX
-    find include lib host | sort | zip -X@ $OUTDIR/protobuf-win$BITS-2.5.0-gitian-r4.zip
-    unset LD_PRELOAD
-    unset FAKETIME
-  done # for BITS in
diff --git a/contrib/gitian-descriptors/qt-linux.yml b/contrib/gitian-descriptors/qt-linux.yml
deleted file mode 100644
index fd86b4df1dce..000000000000
--- a/contrib/gitian-descriptors/qt-linux.yml
+++ /dev/null
@@ -1,264 +0,0 @@
----
-name: "qt-linux"
-suites:
-- "precise"
-architectures:
-- "i386"
-- "amd64"
-packages:
-- "zip"
-- "unzip"
-- "faketime"
-- "unzip"
-- "libxext-dev"
-reference_datetime: "2011-01-30 00:00:00"
-remotes: []
-files:
-- "qt-everywhere-opensource-src-4.6.4.tar.gz"
-script: |
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  if [ "x$GBUILD_BITS" = "x32" ]; then
-    ARCH='i386-linux-gnu'
-  else
-    ARCH='x86_64-linux-gnu'
-  fi
-  # The purpose of this gitian build is not to actually build Qt, but to export
-  # the headers as well as pkgconfig files in a useable format so that we can
-  # pretend to link against an older version. The goal is to link to the
-  # system version of Qt 4.
-  # Also build development tools.
-  INSTALLPREFIX="$HOME/install"
-  # Integrity Check
-  echo "9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250  qt-everywhere-opensource-src-4.6.4.tar.gz" | sha256sum -c
-  # Make install directories
-  mkdir -p $INSTALLPREFIX
-  mkdir -p $INSTALLPREFIX/include
-  PKGCONFIGDIR=$INSTALLPREFIX/lib/pkgconfig
-  mkdir -p $PKGCONFIGDIR
-  #
-  tar xzf qt-everywhere-opensource-src-4.6.4.tar.gz
-  cd qt-everywhere-opensource-src-4.6.4
-  QTBUILDDIR=$(pwd)
-  sed 's/TODAY=`date +%Y-%m-%d`/TODAY=2011-01-30/' -i configure
-
-  # Need to build 4.6-versioned host utilities as well (lrelease/qrc/lupdate/...)
-  ./configure -prefix $INSTALLPREFIX -confirm-license -release -opensource -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -no-declarative -no-script -no-scripttools -no-javascript-jit -no-webkit -no-svg -no-xmlpatterns -no-sql-sqlite -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-libtiff -no-opengl -nomake examples -nomake demos -nomake docs
-  #
-  make $MAKEOPTS -C src/tools install  # (rcc, uic, moc)
-  make $MAKEOPTS -C tools/linguist/lrelease install  # (lrelease)
-  # install includes and pkgconfig files
-  for DIR in src/corelib src/gui src/testlib src/dbus src/network; do
-    (
-    cd $DIR
-    # extract module (QtCore/QtNetwork/...) from Makefile
-    MODULE=$(grep "QMAKE_TARGET *=" Makefile | cut -d = -f 2 | xargs)
-    # patch makefile so that not everything is build first
-    sed -i 's/first: all/first:/g' Makefile
-    make install_flat_headers install_class_headers install_targ_headers
-    # create and install pkgconfig descriptor
-    make ../../lib/pkgconfig/$MODULE.pc
-    sed -e "s,$QTBUILDDIR,$INSTALLPREFIX,g" ../../lib/pkgconfig/$MODULE.pc > $PKGCONFIGDIR/$MODULE.pc
-    # create links to existing Qt libraries
-    ln -sf /usr/lib/${ARCH}/lib${MODULE}.so.4 ${INSTALLPREFIX}/lib/lib${MODULE}.so
-    )
-  done
-
-  # Write our own configuration header, same as Ubuntu
-  # When we don't do this, the configuration will be without STL support (the QString from/to stdString methods)
-  QCONFIG=$INSTALLPREFIX/include/Qt/qconfig.h
-  echo '
-  /* Qt Edition */
-  #ifndef QT_EDITION
-  #  define QT_EDITION QT_EDITION_OPENSOURCE
-  #endif
-  ' > $QCONFIG
-
-  if [ "x$GBUILD_BITS" = "x32" ]; then
-    echo '
-  /* Machine byte-order */
-  #define Q_BIG_ENDIAN 4321
-  #define Q_LITTLE_ENDIAN 1234
-  #define QT_BUILD_KEY "i386 linux g++-4 full-config"
-  #define QT_BUILD_KEY_COMPAT "i686 Linux g++-4 full-config"
-
-  #ifdef QT_BOOTSTRAPPED
-  #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-  #else
-  #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-  #endif
-  /* Machine Architecture */
-  #ifndef QT_BOOTSTRAPPED
-  # define QT_ARCH_I386
-  #else
-  # define QT_ARCH_I386
-  #endif
-  /* Compile time features */
-  #define QT_LARGEFILE_SUPPORT 64
-  #define QT_POINTER_SIZE 4
-  ' >> $QCONFIG
-  else
-    echo '
-  /* Machine byte-order */
-  #define Q_BIG_ENDIAN 4321
-  #define Q_LITTLE_ENDIAN 1234
-  #define QT_BUILD_KEY "x86_64 linux g++-4 full-config"
-  #define QT_BUILD_KEY_COMPAT "x86_64 Linux g++-4 full-config"
-
-  #ifdef QT_BOOTSTRAPPED
-  #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-  #else
-  #define Q_BYTE_ORDER Q_LITTLE_ENDIAN
-  #endif
-  /* Machine Architecture */
-  #ifndef QT_BOOTSTRAPPED
-  # define QT_ARCH_X86_64
-  #else
-  # define QT_ARCH_X86_64
-  #endif
-  /* Compile time features */
-  #define QT_LARGEFILE_SUPPORT 64
-  #define QT_POINTER_SIZE 8
-  ' >> $QCONFIG
-  fi
-
-  echo '
-  #ifndef QT_BOOTSTRAPPED
-
-  #if defined(QT_NO_EGL) && defined(QT_EGL)
-  # undef QT_NO_EGL
-  #elif !defined(QT_NO_EGL) && !defined(QT_EGL)
-  # define QT_NO_EGL
-  #endif
-
-  #if defined(QT_NO_GSTREAMER) && defined(QT_GSTREAMER)
-  # undef QT_NO_GSTREAMER
-  #elif !defined(QT_NO_GSTREAMER) && !defined(QT_GSTREAMER)
-  # define QT_NO_GSTREAMER
-  #endif
-
-  #if defined(QT_NO_ICD) && defined(QT_ICD)
-  # undef QT_NO_ICD
-  #elif !defined(QT_NO_ICD) && !defined(QT_ICD)
-  # define QT_NO_ICD
-  #endif
-
-  #if defined(QT_NO_IMAGEFORMAT_JPEG) && defined(QT_IMAGEFORMAT_JPEG)
-  # undef QT_NO_IMAGEFORMAT_JPEG
-  #elif !defined(QT_NO_IMAGEFORMAT_JPEG) && !defined(QT_IMAGEFORMAT_JPEG)
-  # define QT_NO_IMAGEFORMAT_JPEG
-  #endif
-
-  #if defined(QT_NO_IMAGEFORMAT_MNG) && defined(QT_IMAGEFORMAT_MNG)
-  # undef QT_NO_IMAGEFORMAT_MNG
-  #elif !defined(QT_NO_IMAGEFORMAT_MNG) && !defined(QT_IMAGEFORMAT_MNG)
-  # define QT_NO_IMAGEFORMAT_MNG
-  #endif
-
-  #if defined(QT_NO_IMAGEFORMAT_TIFF) && defined(QT_IMAGEFORMAT_TIFF)
-  # undef QT_NO_IMAGEFORMAT_TIFF
-  #elif !defined(QT_NO_IMAGEFORMAT_TIFF) && !defined(QT_IMAGEFORMAT_TIFF)
-  # define QT_NO_IMAGEFORMAT_TIFF
-  #endif
-
-  #if defined(QT_NO_MULTIMEDIA) && defined(QT_MULTIMEDIA)
-  # undef QT_NO_MULTIMEDIA
-  #elif !defined(QT_NO_MULTIMEDIA) && !defined(QT_MULTIMEDIA)
-  # define QT_NO_MULTIMEDIA
-  #endif
-
-  #if defined(QT_NO_OPENVG) && defined(QT_OPENVG)
-  # undef QT_NO_OPENVG
-  #elif !defined(QT_NO_OPENVG) && !defined(QT_OPENVG)
-  # define QT_NO_OPENVG
-  #endif
-
-  #if defined(QT_NO_PHONON) && defined(QT_PHONON)
-  # undef QT_NO_PHONON
-  #elif !defined(QT_NO_PHONON) && !defined(QT_PHONON)
-  # define QT_NO_PHONON
-  #endif
-
-  #if defined(QT_NO_PULSEAUDIO) && defined(QT_PULSEAUDIO)
-  # undef QT_NO_PULSEAUDIO
-  #elif !defined(QT_NO_PULSEAUDIO) && !defined(QT_PULSEAUDIO)
-  # define QT_NO_PULSEAUDIO
-  #endif
-
-  #if defined(QT_NO_S60) && defined(QT_S60)
-  # undef QT_NO_S60
-  #elif !defined(QT_NO_S60) && !defined(QT_S60)
-  # define QT_NO_S60
-  #endif
-
-  #if defined(QT_NO_STYLE_S60) && defined(QT_STYLE_S60)
-  # undef QT_NO_STYLE_S60
-  #elif !defined(QT_NO_STYLE_S60) && !defined(QT_STYLE_S60)
-  # define QT_NO_STYLE_S60
-  #endif
-
-  #if defined(QT_NO_SXE) && defined(QT_SXE)
-  # undef QT_NO_SXE
-  #elif !defined(QT_NO_SXE) && !defined(QT_SXE)
-  # define QT_NO_SXE
-  #endif
-
-  #if defined(QT_NO_WEBKIT) && defined(QT_WEBKIT)
-  # undef QT_NO_WEBKIT
-  #elif !defined(QT_NO_WEBKIT) && !defined(QT_WEBKIT)
-  # define QT_NO_WEBKIT
-  #endif
-
-  #if defined(QT_NO_ZLIB) && defined(QT_ZLIB)
-  # undef QT_NO_ZLIB
-  #elif !defined(QT_NO_ZLIB) && !defined(QT_ZLIB)
-  # define QT_NO_ZLIB
-  #endif
-
-  #if defined(QT_RUNTIME_XCURSOR) && defined(QT_NO_RUNTIME_XCURSOR)
-  # undef QT_RUNTIME_XCURSOR
-  #elif !defined(QT_RUNTIME_XCURSOR) && !defined(QT_NO_RUNTIME_XCURSOR)
-  # define QT_RUNTIME_XCURSOR
-  #endif
-
-  #if defined(QT_RUNTIME_XFIXES) && defined(QT_NO_RUNTIME_XFIXES)
-  # undef QT_RUNTIME_XFIXES
-  #elif !defined(QT_RUNTIME_XFIXES) && !defined(QT_NO_RUNTIME_XFIXES)
-  # define QT_RUNTIME_XFIXES
-  #endif
-
-  #if defined(QT_RUNTIME_XINERAMA) && defined(QT_NO_RUNTIME_XINERAMA)
-  # undef QT_RUNTIME_XINERAMA
-  #elif !defined(QT_RUNTIME_XINERAMA) && !defined(QT_NO_RUNTIME_XINERAMA)
-  # define QT_RUNTIME_XINERAMA
-  #endif
-
-  #if defined(QT_RUNTIME_XINPUT) && defined(QT_NO_RUNTIME_XINPUT)
-  # undef QT_RUNTIME_XINPUT
-  #elif !defined(QT_RUNTIME_XINPUT) && !defined(QT_NO_RUNTIME_XINPUT)
-  # define QT_RUNTIME_XINPUT
-  #endif
-
-  #if defined(QT_RUNTIME_XRANDR) && defined(QT_NO_RUNTIME_XRANDR)
-  # undef QT_RUNTIME_XRANDR
-  #elif !defined(QT_RUNTIME_XRANDR) && !defined(QT_NO_RUNTIME_XRANDR)
-  # define QT_RUNTIME_XRANDR
-  #endif
-
-  #if defined(QT_USE_MATH_H_FLOATS) && defined(QT_NO_USE_MATH_H_FLOATS)
-  # undef QT_USE_MATH_H_FLOATS
-  #elif !defined(QT_USE_MATH_H_FLOATS) && !defined(QT_NO_USE_MATH_H_FLOATS)
-  # define QT_USE_MATH_H_FLOATS
-  #endif
-
-  #endif // QT_BOOTSTRAPPED
-
-  #define QT_VISIBILITY_AVAILABLE
-  ' >> $QCONFIG
-  cp $QCONFIG $INSTALLPREFIX/include/QtCore/qconfig.h
-
-  cd $INSTALLPREFIX
-  # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  # Create a .tar.gz because .zip has problems with symbolic links
-  find | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/qt-linux${GBUILD_BITS}-4.6.4-gitian-r1.tar.gz
diff --git a/contrib/gitian-descriptors/qt-win.yml b/contrib/gitian-descriptors/qt-win.yml
deleted file mode 100644
index 57bc4c318049..000000000000
--- a/contrib/gitian-descriptors/qt-win.yml
+++ /dev/null
@@ -1,92 +0,0 @@
----
-name: "qt"
-suites:
-- "precise"
-architectures:
-- "amd64"
-packages: 
-- "mingw-w64"
-- "g++-mingw-w64"
-- "zip"
-- "unzip"
-- "faketime"
-- "libz-dev"
-reference_datetime: "2011-01-30 00:00:00"
-remotes: []
-files:
-- "qt-everywhere-opensource-src-5.2.0.tar.gz"
-- "bitcoin-deps-win32-gitian-r13.zip"
-- "bitcoin-deps-win64-gitian-r13.zip"
-script: |
-  # Defines
-  export TZ=UTC
-  INDIR=$HOME/build
-  TEMPDIR=$HOME/tmp
-  # Qt: workaround for determinism in resource ordering
-  #  Qt5's rcc uses a QHash to store the files for the resource.
-  #  A security fix in QHash makes the ordering of keys to be different on every run
-  #  (https://qt.gitorious.org/qt/qtbase/commit/c01eaa438200edc9a3bbcd8ae1e8ded058bea268).
-  #  This is good in general but qrc shouldn't be doing a traversal over a randomized container.
-  #  The thorough solution would be to use QMap instead of QHash, but this requires patching Qt.
-  #  For now luckily there is a test mode that forces a fixed seed.
-  export QT_RCC_TEST=1
-  # Integrity Check
-  echo "395ec72277c5786c65b8163ef5817fd03d0a1f524a6d47f53624baf8056f1081  qt-everywhere-opensource-src-5.2.0.tar.gz" | sha256sum -c
-
-  for BITS in 32 64; do # for architectures
-    #
-    INSTALLPREFIX=$HOME/staging${BITS}
-    BUILDDIR=$HOME/build${BITS}
-    DEPSDIR=$HOME/deps${BITS}
-    if [ "x$BITS" = "x32" ]; then
-      HOST=i686-w64-mingw32
-    else
-      HOST=x86_64-w64-mingw32
-    fi
-    #
-    mkdir -p $INSTALLPREFIX $INSTALLPREFIX/host/bin $DEPSDIR $BUILDDIR
-    #
-    # Need mingw-compiled openssl from bitcoin-deps:
-    cd $DEPSDIR
-    unzip $INDIR/bitcoin-deps-win${BITS}-gitian-r13.zip
-    #
-    cd $BUILDDIR
-    #
-    tar xzf $INDIR/qt-everywhere-opensource-src-5.2.0.tar.gz
-    cd qt-everywhere-opensource-src-5.2.0
-    SPECNAME="win32-g++"
-    SPECFILE="qtbase/mkspecs/${SPECNAME}/qmake.conf"
-    sed 's/qt_instdate=`date +%Y-%m-%d`/qt_instdate=2011-01-30/' -i qtbase/configure
-    sed --posix "s|QMAKE_CFLAGS            = -pipe -fno-keep-inline-dllexport|QMAKE_CFLAGS\t\t= -pipe -fno-keep-inline-dllexport -isystem /usr/$HOST/include/ -frandom-seed=qtbuild -I$DEPSDIR/include|" -i ${SPECFILE}
-    sed --posix "s|QMAKE_LFLAGS            =|QMAKE_LFLAGS\t\t= -L$DEPSDIR/lib|" -i ${SPECFILE}
-    # Before we tried to pass arguments to ar (static linking) in using QMAKE_LIB, however
-    #  qt removes the arguments for ar and provides a script which makes it impossible to pass the determinism flag -
-    #  so rather than try to replace ar, post-process all libraries and plugins at the end.
-    #
-    # Don't load faketime while compiling Qt, qmake will get stuck in nearly infinite loops
-    #export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-    #export FAKETIME=$REFERENCE_DATETIME
-    #
-    # Compile static libraries, and use statically linked openssl (-openssl-linked):
-    OPENSSL_LIBS="-L$DEPSDIR/lib -lssl -lcrypto -lgdi32" ./configure -prefix $INSTALLPREFIX -bindir $INSTALLPREFIX/host/bin -confirm-license -release -opensource -static -xplatform $SPECNAME -device-option CROSS_COMPILE="$HOST-" -no-audio-backend -no-javascript-jit -no-sql-sqlite -no-sql-odbc -no-nis -no-cups -no-iconv -no-dbus -no-gif -no-opengl -no-compile-examples -no-feature-style-windowsce -no-feature-style-windowsmobile -no-qml-debug -openssl-linked -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport -skip qtdeclarative -skip qtmultimedia -skip qtimageformats -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity -skip qtwinextras -skip qtxmlpatterns -skip qtscript -skip qtdoc -system-libpng -system-zlib
-    make $MAKEOPTS install
-    # post-process all generated libraries and plugins to be deterministic
-    # extract them to a temporary directory then re-build them deterministically
-    for LIB in $(find $INSTALLPREFIX -name *.a); do
-        rm -rf $TEMPDIR && mkdir $TEMPDIR && cd $TEMPDIR
-        $HOST-ar xv $LIB | cut -b5- > /tmp/list.txt
-        rm $LIB
-        $HOST-ar crsD $LIB $(cat /tmp/list.txt)
-    done
-    #
-    cd $INSTALLPREFIX
-    # Remove unused non-deterministic stuff
-    rm host/bin/qtpaths.exe lib/libQt5Bootstrap.a lib/libQt5Bootstrap.la
-    # as zip stores file timestamps, use faketime to intercept stat calls to set dates for all files to reference date
-    export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-    export FAKETIME=$REFERENCE_DATETIME
-    find -print0 | xargs -r0 touch # fix up timestamps before packaging
-    find | sort | zip -X@ $OUTDIR/qt-win${BITS}-5.2.0-gitian-r3.zip
-    unset LD_PRELOAD
-    unset FAKETIME
-  done # for BITS in
diff --git a/depends/packages/qt46.mk b/depends/packages/qt46.mk
index 6af805293198..8fb30a5c4471 100644
--- a/depends/packages/qt46.mk
+++ b/depends/packages/qt46.mk
@@ -1,10 +1,9 @@
 PACKAGE=qt46
-$(package)_version=4.6.2
+$(package)_version=4.6.4
 $(package)_download_path=http://download.qt-project.org/archive/qt/4.6/
 $(package)_file_name=qt-everywhere-opensource-src-$($(package)_version).tar.gz
-$(package)_sha256_hash=176f51ddb06dce67ab4b2efc6b327dc21ed8f764c5d97acc15ff1f907c2affae
-$(package)_dependencies=openssl
-$(package)_linux_dependencies=freetype dbus libX11 xproto libXext libICE libSM
+$(package)_sha256_hash=9ad4d46c721b53a429ed5a2eecfd3c239a9ab566562f183f99d3125f1a234250
+$(package)_dependencies=openssl freetype dbus libX11 xproto libXext libICE libSM
 $(package)_patches=stlfix.patch 
 
 define $(package)_set_vars
@@ -35,7 +34,7 @@ define $(package)_preprocess_cmds
    sed -i.old "s|/usr/X11R6/lib64|$(host_prefix)/lib|" mkspecs/*/*.conf && \
    sed -i.old "s|/usr/X11R6/lib|$(host_prefix)/lib|" mkspecs/*/*.conf && \
    sed -i.old "s|/usr/X11R6/include|$(host_prefix)/include|" mkspecs/*/*.conf && \
-   sed -i.old "s|QMAKE_LFLAGS_SHLIB  += -shared|QMAKE_LFLAGS_SHLIB  += -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
+   sed -i.old "s|QMAKE_LFLAGS_SHLIB\t+= -shared|QMAKE_LFLAGS_SHLIB\t+= -shared -Wl,--exclude-libs,ALL|" mkspecs/common/g++.conf && \
    sed -i.old "/SSLv2_client_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
    sed -i.old "/SSLv2_server_method/d" src/network/ssl/qsslsocket_openssl.cpp src/network/ssl/qsslsocket_openssl_symbols.cpp && \
    patch -p1 < $($(package)_patch_dir)/stlfix.patch 
@@ -62,6 +61,6 @@ define $(package)_stage_cmds
 endef
 
 define $(package)_postprocess_cmds
-  rm -rf mkspecs/ lib/cmake/ && \
+  rm -rf mkspecs/ lib/cmake/ lib/*.prl lib/*.la && \
   find native/bin -type f -exec mv {} {}-qt4 \;
 endef

From 4bbbdf3244e9a71e48a615a36e34de6dc0f85030 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 12 Aug 2014 19:24:05 -0400
Subject: [PATCH 1074/1819] gitian: quick docs update

---
 contrib/gitian-descriptors/README.md |  1 -
 doc/release-process.md               | 73 +++-------------------------
 2 files changed, 6 insertions(+), 68 deletions(-)

diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md
index 7a67263ee44c..061b897d2a2c 100644
--- a/contrib/gitian-descriptors/README.md
+++ b/contrib/gitian-descriptors/README.md
@@ -27,7 +27,6 @@ Once you've got the right hardware and software:
 
     # Create base images
     cd gitian-builder
-    bin/make-base-vm --suite precise --arch i386
     bin/make-base-vm --suite precise --arch amd64
     cd ..
 
diff --git a/doc/release-process.md b/doc/release-process.md
index 7699af90bdd8..c6a7266ef1f9 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -23,6 +23,10 @@ Release Process
 
 * * *
 
+###update gitian
+
+ In order to take advantage of the new caching features in gitian, be sure to update to a recent version (e9741525c or higher is recommended)
+
 ###perform gitian builds
 
  From a directory containing the bitcoin source, gitian-builder and gitian.sigs
@@ -46,71 +50,6 @@ Release Process
  
 	tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
 
- Download remaining inputs, and build everything:
- 
-	wget 'http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.9.tar.gz' -O miniupnpc-1.9.tar.gz
-	wget 'https://www.openssl.org/source/openssl-1.0.1h.tar.gz'
-	wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
-	wget 'http://zlib.net/zlib-1.2.8.tar.gz'
-	wget 'ftp://ftp.simplesystems.org/pub/png/src/history/libpng16/libpng-1.6.8.tar.gz'
-	wget 'https://fukuchi.org/works/qrencode/qrencode-3.4.3.tar.bz2'
-	wget 'https://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2'
-	wget 'https://svn.boost.org/trac/boost/raw-attachment/ticket/7262/boost-mingw.patch' -O boost-mingw-gas-cross-compile-2013-03-03.patch
-	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.0/single/qt-everywhere-opensource-src-5.2.0.tar.gz'
-	wget 'https://download.qt-project.org/official_releases/qt/5.2/5.2.1/single/qt-everywhere-opensource-src-5.2.1.tar.gz'
-	wget 'https://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz'
-	wget 'https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2'
-	wget 'https://github.com/mingwandroid/toolchain4/archive/10cc648683617cca8bcbeae507888099b41b530c.tar.gz'
-	wget 'http://www.opensource.apple.com/tarballs/cctools/cctools-809.tar.gz'
-	wget 'http://www.opensource.apple.com/tarballs/dyld/dyld-195.5.tar.gz'
-	wget 'http://www.opensource.apple.com/tarballs/ld64/ld64-127.2.tar.gz'
-	wget 'http://pkgs.fedoraproject.org/repo/pkgs/cdrkit/cdrkit-1.1.11.tar.gz/efe08e2f3ca478486037b053acd512e9/cdrkit-1.1.11.tar.gz'
-	wget 'https://github.com/theuni/libdmg-hfsplus/archive/libdmg-hfsplus-v0.1.tar.gz'
-	wget 'http://llvm.org/releases/3.2/clang+llvm-3.2-x86-linux-ubuntu-12.04.tar.gz' -O clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-	wget 'https://raw.githubusercontent.com/theuni/osx-cross-depends/master/patches/cdrtools/genisoimage.diff' -O cdrkit-deterministic.patch
-	cd ..
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-linux.yml
-	mv build/out/boost-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-linux.yml
-	mv build/out/bitcoin-deps-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-linux.yml
-	mv build/out/qt-*.tar.gz inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/boost-win.yml
-	mv build/out/boost-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/deps-win.yml
-	mv build/out/bitcoin-deps-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/qt-win.yml
-	mv build/out/qt-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/protobuf-win.yml
-	mv build/out/protobuf-*.zip inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-native.yml
-	mv build/out/osx-*.tar.gz inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-depends.yml
-	mv build/out/osx-*.tar.gz inputs/
-	./bin/gbuild ../bitcoin/contrib/gitian-descriptors/gitian-osx-qt.yml
-	mv build/out/osx-*.tar.gz inputs/
-
- The expected SHA256 hashes of the intermediate inputs are:
-
-    f29b7d9577417333fb56e023c2977f5726a7c297f320b175a4108cf7cd4c2d29  boost-linux32-1.55.0-gitian-r1.zip
-    88232451c4104f7eb16e469ac6474fd1231bd485687253f7b2bdf46c0781d535  boost-linux64-1.55.0-gitian-r1.zip
-    46710f673467e367738d8806e45b4cb5931aaeea61f4b6b55a68eea56d5006c5  bitcoin-deps-linux32-gitian-r6.zip
-    f03be39fb26670243d3a659e64d18e19d03dec5c11e9912011107768390b5268  bitcoin-deps-linux64-gitian-r6.zip
-    57e57dbdadc818cd270e7e00500a5e1085b3bcbdef69a885f0fb7573a8d987e1  qt-linux32-4.6.4-gitian-r1.tar.gz
-    60eb4b9c5779580b7d66529efa5b2836ba1a70edde2a0f3f696d647906a826be  qt-linux64-4.6.4-gitian-r1.tar.gz
-    60dc2d3b61e9c7d5dbe2f90d5955772ad748a47918ff2d8b74e8db9b1b91c909  boost-win32-1.55.0-gitian-r6.zip
-    f65fcaf346bc7b73bc8db3a8614f4f6bee2f61fcbe495e9881133a7c2612a167  boost-win64-1.55.0-gitian-r6.zip
-    70de248cd0dd7e7476194129e818402e974ca9c5751cbf591644dc9f332d3b59  bitcoin-deps-win32-gitian-r13.zip
-    9eace4c76f639f4f3580a478eee4f50246e1bbb5ccdcf37a158261a5a3fa3e65  bitcoin-deps-win64-gitian-r13.zip
-    963e3e5e85879010a91143c90a711a5d1d5aba992e38672cdf7b54e42c56b2f1  qt-win32-5.2.0-gitian-r3.zip
-    751c579830d173ef3e6f194e83d18b92ebef6df03289db13ab77a52b6bc86ef0  qt-win64-5.2.0-gitian-r3.zip
-    e2e403e1a08869c7eed4d4293bce13d51ec6a63592918b90ae215a0eceb44cb4  protobuf-win32-2.5.0-gitian-r4.zip
-    a0999037e8b0ef9ade13efd88fee261ba401f5ca910068b7e0cd3262ba667db0  protobuf-win64-2.5.0-gitian-r4.zip
-    512bc0622c883e2e0f4cbc3fedfd8c2402d06c004ce6fb32303cc2a6f405b6df  osx-native-depends-r3.tar.gz
-    927e4b222be6d590b4bc2fc185872a5d0ca5c322adb983764d3ed84be6bdbc81  osx-depends-r4.tar.gz
-    ec95abef1df2b096a970359787c01d8c45e2a4475b7ae34e12c022634fbdba8a  osx-depends-qt-5.2.1-r4.tar.gz
-
-
  Build Bitcoin Core for Linux, Windows, and OS X:
   
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
@@ -125,8 +64,8 @@ Release Process
 	zip -r bitcoin-${VERSION}-win-gitian.zip *
 	mv bitcoin-${VERSION}-win-gitian.zip ../../../
 	popd
-        ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
-        ./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-bitcoin.yml
+        ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+        ./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
 	pushd build/out
 	mv Bitcoin-Qt.dmg ../../../
 	popd

From c54d647a92c72e44daf886a334250ad1125818e9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 1 Sep 2014 16:12:16 -0400
Subject: [PATCH 1075/1819] travis: let travis use shared libs for tests

---
 .travis.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.travis.yml b/.travis.yml
index 567428daf9b0..1630c1d02a4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -59,6 +59,7 @@ script:
     - cd bitcoin-$HOST
     - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
+    - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
     - if [ "$RUN_TESTS" = "true" ]; then make check; fi
     - if [ "$RUN_TESTS" = "true" ]; then qa/pull-tester/rpc-tests.sh; fi
 after_script:

From 246659aff15885e2289ac774debcef932a25f063 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Wed, 19 Nov 2014 21:46:40 -0500
Subject: [PATCH 1076/1819] gitian: make tarballs deterministic and nuke .la
 files from build output

---
 contrib/gitian-descriptors/gitian-linux.yml | 10 ++++++++++
 contrib/gitian-descriptors/gitian-osx.yml   | 10 ++++++++++
 contrib/gitian-descriptors/gitian-win.yml   | 10 ++++++++++
 3 files changed, 30 insertions(+)

diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 69de6bf62391..b57a04469c62 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -75,6 +75,13 @@ script: |
   make dist
   DISTNAME=`echo bitcoin-*.tar.gz`
 
+  # Correct tar file order
+  mkdir -p temp
+  pushd temp
+  tar xf ../$DISTNAME
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  popd
+
   ORIGPATH="$PATH"
   # Extract the release tarball into a dir for each host and build
   for i in ${HOSTS}; do
@@ -92,3 +99,6 @@ script: |
   mv $DISTNAME $OUTDIR/src
   mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
   mv ${OUTDIR}/i686-* ${OUTDIR}/32
+
+  # Delete unwanted stuff
+  find ${OUTDIR} -name "lib*.la" -delete
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 5c230e80b16e..7ec0700ed3b4 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -85,6 +85,13 @@ script: |
   make dist
   DISTNAME=`echo bitcoin-*.tar.gz`
 
+  # Correct tar file order
+  mkdir -p temp
+  pushd temp
+  tar xf ../$DISTNAME
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  popd
+
   ORIGPATH="$PATH"
   # Extract the release tarball into a dir for each host and build
   for i in ${HOSTS}; do
@@ -102,3 +109,6 @@ script: |
   done
   mkdir -p $OUTDIR/src
   mv $DISTNAME $OUTDIR/src
+
+  # Delete unwanted stuff
+  find ${OUTDIR} -name "lib*.la" -delete
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index cf5436352bc2..172807467a69 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -77,6 +77,13 @@ script: |
   make dist
   DISTNAME=`echo bitcoin-*.tar.gz`
 
+  # Correct tar file order
+  mkdir -p temp
+  pushd temp
+  tar xf ../$DISTNAME
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  popd
+
   ORIGPATH="$PATH"
   # Extract the release tarball into a dir for each host and build
   for i in ${HOSTS}; do
@@ -96,3 +103,6 @@ script: |
   mv $DISTNAME $OUTDIR/src
   mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
   mv ${OUTDIR}/i686-* ${OUTDIR}/32
+
+  # Delete unwanted stuff
+  find ${OUTDIR} -name "lib*.la" -delete

From 57425a24255c5af439241d59ad5a878b7a3771a7 Mon Sep 17 00:00:00 2001
From: Daniel Kraft <d@domob.eu>
Date: Thu, 20 Nov 2014 08:28:19 +0100
Subject: [PATCH 1077/1819] Check block header before accepting it.

Previously, AcceptBlockHeader did not check the header (in particular
PoW).  This made the client accept invalid-PoW-headers from peers in
headers-first sync.
---
 src/main.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 2bff781bfa17..ac5d42d5fcc2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2280,6 +2280,8 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
 {
     // These are checks that are independent of context.
 
+    // Check that the header is valid (particularly PoW).  This is mostly
+    // redundant with the call in AcceptBlockHeader.
     if (!CheckBlockHeader(block, state, fCheckPOW))
         return false;
 
@@ -2351,6 +2353,9 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
         return true;
     }
 
+    if (!CheckBlockHeader(block, state))
+        return false;
+
     // Get prev block index
     CBlockIndex* pindexPrev = NULL;
     int nHeight = 0;

From e0a25c54ebecf09771d017ccb29c6777192de876 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 20 Nov 2014 12:28:34 +0100
Subject: [PATCH 1078/1819] qt: Make askpassphrase dialog behave more sanely

Set minimum sizes appropriately, and make sure that they
are enforced. Replaces #5226.
---
 src/qt/askpassphrasedialog.cpp      |  7 +++++--
 src/qt/forms/askpassphrasedialog.ui | 11 ++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index a448d5a9a051..fa9ac6b135cb 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -23,6 +23,10 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
 {
     ui->setupUi(this);
 
+    ui->passEdit1->setMinimumSize(ui->passEdit1->sizeHint());
+    ui->passEdit2->setMinimumSize(ui->passEdit2->sizeHint());
+    ui->passEdit3->setMinimumSize(ui->passEdit3->sizeHint());
+
     ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE);
     ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE);
     ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE);
@@ -35,9 +39,9 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
     switch(mode)
     {
         case Encrypt: // Ask passphrase x2
+            ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
             ui->passLabel1->hide();
             ui->passEdit1->hide();
-            ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>."));
             setWindowTitle(tr("Encrypt wallet"));
             break;
         case Unlock: // Ask passphrase
@@ -61,7 +65,6 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
             ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet."));
             break;
     }
-
     textChanged();
     connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
     connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged()));
diff --git a/src/qt/forms/askpassphrasedialog.ui b/src/qt/forms/askpassphrasedialog.ui
index bc4921455f40..a2105ecd0ae1 100644
--- a/src/qt/forms/askpassphrasedialog.ui
+++ b/src/qt/forms/askpassphrasedialog.ui
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>598</width>
-    <height>198</height>
+    <height>222</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -26,8 +26,14 @@
    <string>Passphrase Dialog</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="sizeConstraint">
+    <enum>QLayout::SetMinimumSize</enum>
+   </property>
    <item>
     <widget class="QLabel" name="warningLabel">
+     <property name="text">
+      <string notr="true">Placeholder text</string>
+     </property>
      <property name="textFormat">
       <enum>Qt::RichText</enum>
      </property>
@@ -38,6 +44,9 @@
    </item>
    <item>
     <layout class="QFormLayout" name="formLayout">
+     <property name="sizeConstraint">
+      <enum>QLayout::SetMinimumSize</enum>
+     </property>
      <property name="fieldGrowthPolicy">
       <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
      </property>

From a01fa3035f161be4327b664a1eebe29a2a7d244d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 19 Nov 2014 10:53:46 +0100
Subject: [PATCH 1079/1819] minor style cleanup after HTTP rest interface merge

- no code changes
---
 src/key.h    |  3 ++-
 src/rest.cpp | 18 +++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/key.h b/src/key.h
index 0bb05482c9ce..a58cab45ecbd 100644
--- a/src/key.h
+++ b/src/key.h
@@ -13,9 +13,10 @@
 #include <stdexcept>
 #include <vector>
 
-struct CExtPubKey;
 class CPubKey;
 
+struct CExtPubKey;
+
 /** 
  * secp256k1:
  * const unsigned int PRIVATE_KEY_SIZE = 279;
diff --git a/src/rest.cpp b/src/rest.cpp
index 9a8793a5173a..122b361719fb 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -1,17 +1,18 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include <boost/algorithm/string.hpp>
-#include "rpcserver.h"
-#include "streams.h"
-#include "utilstrencodings.h"
 #include "core/block.h"
 #include "core/transaction.h"
-#include "version.h"
 #include "main.h"
+#include "rpcserver.h"
+#include "streams.h"
 #include "sync.h"
+#include "utilstrencodings.h"
+#include "version.h"
+
+#include <boost/algorithm/string.hpp>
 
 using namespace std;
 using namespace json_spirit;
@@ -163,7 +164,7 @@ static bool rest_tx(AcceptedConnection *conn,
         string strJSON = write_string(Value(objTx), false) + "\n";
         conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
         return true;
-     }
+    }
     }
 
     // not reached
@@ -203,4 +204,3 @@ bool HTTPReq_REST(AcceptedConnection *conn,
     conn->stream() << HTTPError(HTTP_NOT_FOUND, false) << std::flush;
     return false;
 }
-

From 4574248f9f86ac39329768b93186b59c009eb72a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 20 Nov 2014 12:29:52 +0100
Subject: [PATCH 1080/1819] [Qt] minor ordering cleanup after new fee selection

---
 src/qt/sendcoinsdialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index ff39829b95d8..813f29f53a80 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -12,12 +12,12 @@
 #include "guiutil.h"
 #include "optionsmodel.h"
 #include "sendcoinsentry.h"
-#include "wallet.h"
 #include "walletmodel.h"
 
 #include "base58.h"
 #include "coincontrol.h"
 #include "ui_interface.h"
+#include "wallet.h"
 
 #include <QMessageBox>
 #include <QScrollBar>

From 34559c7c73e3ce67baea0d88ba74b0988b55142d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 20 Nov 2014 12:43:50 +0100
Subject: [PATCH 1081/1819] Make PruneBlockIndexCandidates safer

---
 src/main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 1ba17614df19..ac65a4ac2f13 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1954,9 +1954,11 @@ static void PruneBlockIndexCandidates() {
     // Note that we can't delete the current block itself, as we may need to return to it later in case a
     // reorganization to a better block fails.
     std::set<CBlockIndex*, CBlockIndexWorkComparator>::iterator it = setBlockIndexCandidates.begin();
-    while (setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) {
+    while (it != setBlockIndexCandidates.end() && setBlockIndexCandidates.value_comp()(*it, chainActive.Tip())) {
         setBlockIndexCandidates.erase(it++);
     }
+    // Either the current tip or a successor of it we're working towards is left in setBlockIndexCandidates.
+    assert(!setBlockIndexCandidates.empty());
 }
 
 // Try to make some progress towards making pindexMostWork the active block.
@@ -2007,8 +2009,6 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
             }
         } else {
             PruneBlockIndexCandidates();
-            // Either the current tip or a successor of it we're working towards is left in setBlockIndexCandidates.
-            assert(!setBlockIndexCandidates.empty());
             if (!pindexOldTip || chainActive.Tip()->nChainWork > pindexOldTip->nChainWork) {
                 // We're in a better position than we were. Return temporarily to release the lock.
                 fContinue = false;

From aabe61cb37373913c9df4c86a7eed4e5b0bbf7a1 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 20 Nov 2014 12:45:38 +0100
Subject: [PATCH 1082/1819] [Qt] explicitly call proxy in GUI settings SOCKS5
 proxy

- to ensure a consistent wording between core and GUI
---
 src/qt/forms/optionsdialog.ui | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 3446cf5c3313..51156ade4ff1 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -209,10 +209,10 @@
        <item>
         <widget class="QCheckBox" name="connectSocks">
          <property name="toolTip">
-          <string>Connect to the Bitcoin network through a SOCKS proxy.</string>
+          <string>Connect to the Bitcoin network through a SOCKS5 proxy.</string>
          </property>
          <property name="text">
-          <string>&amp;Connect through SOCKS proxy (default proxy):</string>
+          <string>&amp;Connect through SOCKS5 proxy (default proxy):</string>
          </property>
         </widget>
        </item>

From 98b135f97f16005687f420136114f80555bc8688 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 8 Nov 2014 09:32:29 -0800
Subject: [PATCH 1083/1819] Make STRICTENC invalid pubkeys fail the script
 rather than the opcode.

This turns STRICTENC turn into a softforking-safe change (even though it
is not intended as a consensus rule), and as a result guarantee that using
it for mempool validation only results in consensus-valid transactions in
the mempool.
---
 src/script/interpreter.cpp        | 12 ++++++------
 src/script/interpreter.h          |  4 ++--
 src/script/script_error.cpp       |  2 ++
 src/script/script_error.h         |  1 +
 src/test/data/script_invalid.json | 18 ++++++++++++++++++
 src/test/data/script_valid.json   | 18 +++++++++---------
 src/test/script_tests.cpp         | 21 +++++++++++++++------
 7 files changed, 53 insertions(+), 23 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 760086eaba31..a2a2edce6d5e 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -207,9 +207,9 @@ bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags, Sc
     return true;
 }
 
-bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags) {
+bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags, ScriptError* serror) {
     if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchSig)) {
-        return false;
+        return set_error(serror, SCRIPT_ERR_PUBKEYTYPE);
     }
     return true;
 }
@@ -792,11 +792,11 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                     // Drop the signature, since there's no way for a signature to sign itself
                     scriptCode.FindAndDelete(CScript(vchSig));
 
-                    if (!CheckSignatureEncoding(vchSig, flags, serror)) {
+                    if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) {
                         //serror is set
                         return false;
                     }
-                    bool fSuccess = CheckPubKeyEncoding(vchPubKey, flags) && checker.CheckSig(vchSig, vchPubKey, scriptCode);
+                    bool fSuccess = checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                     popstack(stack);
                     popstack(stack);
@@ -855,13 +855,13 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         valtype& vchSig    = stacktop(-isig);
                         valtype& vchPubKey = stacktop(-ikey);
 
-                        if (!CheckSignatureEncoding(vchSig, flags, serror)) {
+                        if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) {
                             // serror is set
                             return false;
                         }
 
                         // Check signature
-                        bool fOk = CheckPubKeyEncoding(vchPubKey, flags) && checker.CheckSig(vchSig, vchPubKey, scriptCode);
+                        bool fOk = checker.CheckSig(vchSig, vchPubKey, scriptCode);
 
                         if (fOk) {
                             isig++;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 12b271941420..35b2f6c65a1c 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -35,8 +35,8 @@ enum
     SCRIPT_VERIFY_P2SH      = (1U << 0),
 
     // Passing a non-strict-DER signature or one with undefined hashtype to a checksig operation causes script failure.
-    // Passing a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) to checksig causes that pubkey to be
-    // skipped (not softfork safe: this flag can widen the validity of OP_CHECKSIG OP_NOT).
+    // Evaluating a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) by checksig causes script failure.
+    // (softfork safe, but not used or intended as a consensus rule).
     SCRIPT_VERIFY_STRICTENC = (1U << 1),
 
     // Passing a non-strict-DER signature to a checksig operation causes script failure (softfork safe, BIP62 rule 1)
diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp
index 793fc0da417b..5d24ed98ba82 100644
--- a/src/script/script_error.cpp
+++ b/src/script/script_error.cpp
@@ -61,6 +61,8 @@ const char* ScriptErrorString(const ScriptError serror)
             return "Dummy CHECKMULTISIG argument must be zero";
         case SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS:
             return "NOPx reserved for soft-fork upgrades";
+        case SCRIPT_ERR_PUBKEYTYPE:
+            return "Public key is neither compressed or uncompressed";
         case SCRIPT_ERR_UNKNOWN_ERROR:
         case SCRIPT_ERR_ERROR_COUNT:
         default: break;
diff --git a/src/script/script_error.h b/src/script/script_error.h
index 21153f1bd1ce..ac1f2deae5a9 100644
--- a/src/script/script_error.h
+++ b/src/script/script_error.h
@@ -42,6 +42,7 @@ typedef enum ScriptError_t
     SCRIPT_ERR_SIG_PUSHONLY,
     SCRIPT_ERR_SIG_HIGH_S,
     SCRIPT_ERR_SIG_NULLDUMMY,
+    SCRIPT_ERR_PUBKEYTYPE,
 
     /* softfork safeness */
     SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS,
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 0356d0be1c7f..96ff0a291152 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -592,6 +592,24 @@ nSequences are max.
     "",
     "P2PK NOT with hybrid pubkey but no STRICTENC"
 ],
+[
+    "0x47 0x3044022078033e4227aa05ded69d8da579966578e230d8a7fb44d5f1a0620c3853c24f78022006a2e3f4d872ac8dfdc529110aa37301d65a76255a4b6cce2992adacd4d2c4e201",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "STRICTENC",
+    "P2PK NOT with hybrid pubkey"
+],
+[
+    "0x47 0x304402207592427de20e315d644839754f2a5cca5b978b983a15e6da82109ede01722baa022032ceaf78590faa3f7743821e1b47b897ed1a57f6ee1c8a7519d23774d8de3c4401",
+    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "STRICTENC",
+    "P2PK NOT with invalid hybrid pubkey"
+],
+[
+    "0 0x47 0x304402206797289d3dc81692edae58430276d04641ea5d86967be557163f8494da32fd78022006fc6ab77aaed4ac11ea69cd878ab26e3e24290f47a43e9adf34075d52b7142c01",
+    "1 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 2 CHECKMULTISIG",
+    "STRICTENC",
+    "1-of-2 with the first 1 hybrid pubkey"
+],
 [
     "0x47 0x304402201f82b99a813c9c48c8dee8d2c43b8f637b72353fe9bdcc084537bc17e2ab770402200c43b96a5f7e115f0114eabda32e068145965cb6c7b5ef64833bb4fcf9fc1b3b05",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 0cf15631630f..94e1abfaae43 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -743,12 +743,6 @@ nSequences are max.
     "",
     "P2PK with hybrid pubkey but no STRICTENC"
 ],
-[
-    "0x47 0x3044022078033e4227aa05ded69d8da579966578e230d8a7fb44d5f1a0620c3853c24f78022006a2e3f4d872ac8dfdc529110aa37301d65a76255a4b6cce2992adacd4d2c4e201",
-    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
-    "STRICTENC",
-    "P2PK NOT with hybrid pubkey"
-],
 [
     "0x47 0x3044022078d6c447887e88dcbe1bc5b613645280df6f4e5935648bc226e9d91da71b3216022047d6b7ef0949b228fc1b359afb8d50500268711354298217b983c26970790c7601",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
@@ -756,10 +750,16 @@ nSequences are max.
     "P2PK NOT with invalid hybrid pubkey but no STRICTENC"
 ],
 [
-    "0x47 0x304402207592427de20e315d644839754f2a5cca5b978b983a15e6da82109ede01722baa022032ceaf78590faa3f7743821e1b47b897ed1a57f6ee1c8a7519d23774d8de3c4401",
-    "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
+    "0 0x47 0x304402203b269b9fbc0936877bf855b5fb41757218d9548b246370d991442a5f5bd1c3440220235268a4eaa8c67e543c6e37da81dd36d3b1be2de6b4fef04113389ca6ddc04501",
+    "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
+    "",
+    "1-of-2 with the second 1 hybrid pubkey and no STRICTENC"
+],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "STRICTENC",
-    "P2PK NOT with invalid hybrid pubkey"
+    "1-of-2 with the second 1 hybrid pubkey"
 ],
 [
     "0x47 0x304402204649e9517ef0377a8f8270bd423053fd98ddff62d74ea553e9579558abbb75e4022044a2b2344469c12e35ed898987711272b634733dd0f5e051288eceb04bd4669e05",
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 36aaa6903f4d..6952f4c5844b 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -428,15 +428,24 @@ BOOST_AUTO_TEST_CASE(script_build)
     bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                               "P2PK NOT with hybrid pubkey but no STRICTENC", 0
                              ).PushSig(keys.key0, SIGHASH_ALL));
-    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
-                               "P2PK NOT with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
-                              ).PushSig(keys.key0, SIGHASH_ALL));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key0, SIGHASH_ALL));
     good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
                                "P2PK NOT with invalid hybrid pubkey but no STRICTENC", 0
                               ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
-    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
-                               "P2PK NOT with invalid hybrid pubkey", SCRIPT_VERIFY_STRICTENC
-                              ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey0H) << OP_CHECKSIG << OP_NOT,
+                              "P2PK NOT with invalid hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                             ).PushSig(keys.key0, SIGHASH_ALL).DamagePush(10));
+    good.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey0H) << ToByteVector(keys.pubkey1C) << OP_2 << OP_CHECKMULTISIG,
+                               "1-of-2 with the second 1 hybrid pubkey and no STRICTENC", 0
+                              ).Num(0).PushSig(keys.key1, SIGHASH_ALL));
+    good.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey0H) << ToByteVector(keys.pubkey1C) << OP_2 << OP_CHECKMULTISIG,
+                               "1-of-2 with the second 1 hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                              ).Num(0).PushSig(keys.key1, SIGHASH_ALL));
+    bad.push_back(TestBuilder(CScript() << OP_1 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey0H) << OP_2 << OP_CHECKMULTISIG,
+                              "1-of-2 with the first 1 hybrid pubkey", SCRIPT_VERIFY_STRICTENC
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL));
 
     good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1) << OP_CHECKSIG,
                                "P2PK with undefined hashtype but no STRICTENC", 0

From ca8158719b17ebdcf1de1e26079b6b896122d0e5 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Nov 2014 02:33:19 -0500
Subject: [PATCH 1084/1819] Test the exact order of CHECKMULTISIG sig/pubkey
 evaluation

Possible with STRICTENC
---
 src/script/interpreter.cpp        |  6 +++++-
 src/test/data/script_invalid.json | 19 +++++++++++++++++++
 src/test/data/script_valid.json   | 25 +++++++++++++++++++++++++
 3 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index a2a2edce6d5e..5eda23731d7e 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -855,6 +855,9 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         valtype& vchSig    = stacktop(-isig);
                         valtype& vchPubKey = stacktop(-ikey);
 
+                        // Note how this makes the exact order of pubkey/signature evaluation
+                        // distinguishable by CHECKMULTISIG NOT if the STRICTENC flag is set.
+                        // See the script_(in)valid tests for details.
                         if (!CheckSignatureEncoding(vchSig, flags, serror) || !CheckPubKeyEncoding(vchPubKey, flags, serror)) {
                             // serror is set
                             return false;
@@ -871,7 +874,8 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
                         nKeysCount--;
 
                         // If there are more signatures left than keys left,
-                        // then too many signatures have failed
+                        // then too many signatures have failed. Exit early,
+                        // without checking any further signatures.
                         if (nSigsCount > nKeysCount)
                             fSuccess = false;
                     }
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 96ff0a291152..71e757714cb8 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -616,6 +616,25 @@ nSequences are max.
     "STRICTENC",
     "P2PK with undefined hashtype"
 ],
+
+["
+Order of CHECKMULTISIG evaluation tests, inverted by swapping the order of
+pubkeys/signatures so they fail due to the STRICTENC rules on validly encoded
+signatures and pubkeys.
+"],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with the first pubkey invalid, and both signatures validly encoded."
+],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
+],
+
 [
     "0x47 0x30440220166848cd5b82a32b5944d90de3c35249354b43773c2ece1844ee8d1103e2f6c602203b6b046da4243c77adef80ada9201b27bbfdf7f9d5428f40434b060432afd62005",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 94e1abfaae43..ada45a64ed1c 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -761,6 +761,31 @@ nSequences are max.
     "STRICTENC",
     "1-of-2 with the second 1 hybrid pubkey"
 ],
+
+["
+CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and
+pubkeys in a specific order, and will exit early if the number of signatures
+left to check is greater than the number of keys left. As STRICTENC fails the
+script when it reaches an invalidly encoded signature or pubkey, we can use it
+to test the exact order in which signatures and pubkeys are evaluated by
+distinguishing CHECKMULTISIG returning false on the stack and the script as a
+whole failing.
+
+See also the corresponding inverted versions of these tests in script_invalid.json
+"],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with the second pubkey invalid, and both signatures validly encoded. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid pubkey."
+],
+[
+    "0 0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but second signature invalid. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid signature."
+],
+
 [
     "0x47 0x304402204649e9517ef0377a8f8270bd423053fd98ddff62d74ea553e9579558abbb75e4022044a2b2344469c12e35ed898987711272b634733dd0f5e051288eceb04bd4669e05",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",

From b867e409e5dd34b84eb9d6d0d8f257dbb19b986d Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Thu, 20 Nov 2014 02:23:20 +0000
Subject: [PATCH 1085/1819] CreateNewBlock: Stick height in coinbase so we pass
 template sanity check

---
 src/miner.cpp | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 200498d109aa..5ac4b05af850 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -124,6 +124,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     {
         LOCK2(cs_main, mempool.cs);
         CBlockIndex* pindexPrev = chainActive.Tip();
+        const int nHeight = pindexPrev->nHeight + 1;
         CCoinsViewCache view(pcoinsTip);
 
         // Priority order to process transactions
@@ -138,7 +139,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
              mi != mempool.mapTx.end(); ++mi)
         {
             const CTransaction& tx = mi->second.GetTx();
-            if (tx.IsCoinBase() || !IsFinalTx(tx, pindexPrev->nHeight + 1))
+            if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight))
                 continue;
 
             COrphan* porphan = NULL;
@@ -181,7 +182,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 CAmount nValueIn = coins->vout[txin.prevout.n].nValue;
                 nTotalIn += nValueIn;
 
-                int nConf = pindexPrev->nHeight - coins->nHeight + 1;
+                int nConf = nHeight - coins->nHeight;
 
                 dPriority += (double)nValueIn * nConf;
             }
@@ -269,7 +270,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
                 continue;
 
             CTxUndo txundo;
-            UpdateCoins(tx, state, view, txundo, pindexPrev->nHeight+1);
+            UpdateCoins(tx, state, view, txundo, nHeight);
 
             // Added
             pblock->vtx.push_back(tx);
@@ -309,8 +310,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
 
         // Compute final coinbase transaction.
-        txNew.vout[0].nValue = GetBlockValue(pindexPrev->nHeight+1, nFees);
-        txNew.vin[0].scriptSig = CScript() << OP_0 << OP_0;
+        txNew.vout[0].nValue = GetBlockValue(nHeight, nFees);
+        txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
         pblock->vtx[0] = txNew;
         pblocktemplate->vTxFees[0] = -nFees;
 

From 36fa4a78acac0ae6bb0e95c6ef78630120a28bdd Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 26 Oct 2014 01:23:23 -0700
Subject: [PATCH 1086/1819] Split up crypto/sha2

---
 src/Makefile.am                     |  12 +-
 src/crypto/hmac_sha512.cpp          |  34 +++++
 src/crypto/hmac_sha512.h            |  32 +++++
 src/crypto/sha2.h                   |  64 ---------
 src/crypto/sha256.cpp               | 189 +++++++++++++++++++++++++
 src/crypto/sha256.h                 |  28 ++++
 src/crypto/{sha2.cpp => sha512.cpp} | 210 +---------------------------
 src/crypto/sha512.h                 |  28 ++++
 src/hash.cpp                        |   1 +
 src/hash.h                          |   2 +-
 src/key.cpp                         |   2 +-
 src/pubkey.cpp                      |   1 -
 src/script/interpreter.cpp          |   2 +-
 src/test/crypto_tests.cpp           |   4 +-
 14 files changed, 330 insertions(+), 279 deletions(-)
 create mode 100644 src/crypto/hmac_sha512.cpp
 create mode 100644 src/crypto/hmac_sha512.h
 delete mode 100644 src/crypto/sha2.h
 create mode 100644 src/crypto/sha256.cpp
 create mode 100644 src/crypto/sha256.h
 rename src/crypto/{sha2.cpp => sha512.cpp} (53%)
 create mode 100644 src/crypto/sha512.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 0d45203c9005..e1e691518528 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -203,10 +203,14 @@ libbitcoin_wallet_a_SOURCES = \
 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
 crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha1.cpp \
-  crypto/sha2.cpp \
+  crypto/sha256.cpp \
+  crypto/sha512.cpp \
+  crypto/hmac_sha512.cpp \
   crypto/ripemd160.cpp \
   crypto/common.h \
-  crypto/sha2.h \
+  crypto/sha256.h \
+  crypto/sha512.h \
+  crypto/hmac_sha512.h \
   crypto/sha1.h \
   crypto/ripemd160.h
 
@@ -342,8 +346,10 @@ if BUILD_BITCOIN_LIBS
 include_HEADERS = script/bitcoinconsensus.h
 libbitcoinconsensus_la_SOURCES = \
   core/transaction.cpp \
+  crypto/hmac_sha512.cpp \
   crypto/sha1.cpp \
-  crypto/sha2.cpp \
+  crypto/sha256.cpp \
+  crypto/sha512.cpp \
   crypto/ripemd160.cpp \
   eccryptoverify.cpp \
   ecwrapper.cpp \
diff --git a/src/crypto/hmac_sha512.cpp b/src/crypto/hmac_sha512.cpp
new file mode 100644
index 000000000000..940a93277c03
--- /dev/null
+++ b/src/crypto/hmac_sha512.cpp
@@ -0,0 +1,34 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/hmac_sha512.h"
+
+#include <string.h>
+
+CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen)
+{
+    unsigned char rkey[128];
+    if (keylen <= 128) {
+        memcpy(rkey, key, keylen);
+        memset(rkey + keylen, 0, 128 - keylen);
+    } else {
+        CSHA512().Write(key, keylen).Finalize(rkey);
+        memset(rkey + 64, 0, 64);
+    }
+
+    for (int n = 0; n < 128; n++)
+        rkey[n] ^= 0x5c;
+    outer.Write(rkey, 128);
+
+    for (int n = 0; n < 128; n++)
+        rkey[n] ^= 0x5c ^ 0x36;
+    inner.Write(rkey, 128);
+}
+
+void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
+    unsigned char temp[64];
+    inner.Finalize(temp);
+    outer.Write(temp, 64).Finalize(hash);
+}
diff --git a/src/crypto/hmac_sha512.h b/src/crypto/hmac_sha512.h
new file mode 100644
index 000000000000..8c65785104a1
--- /dev/null
+++ b/src/crypto/hmac_sha512.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_HMAC_SHA512_H
+#define BITCOIN_HMAC_SHA512_H
+
+#include "crypto/sha512.h"
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for HMAC-SHA-512. */
+class CHMAC_SHA512
+{
+private:
+    CSHA512 outer;
+    CSHA512 inner;
+
+public:
+    static const size_t OUTPUT_SIZE = 64;
+
+    CHMAC_SHA512(const unsigned char* key, size_t keylen);
+    CHMAC_SHA512& Write(const unsigned char* data, size_t len)
+    {
+        inner.Write(data, len);
+        return *this;
+    }
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
+};
+
+#endif // BITCOIN_HMAC_SHA512_H
diff --git a/src/crypto/sha2.h b/src/crypto/sha2.h
deleted file mode 100644
index 329c6675ab06..000000000000
--- a/src/crypto/sha2.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#ifndef BITCOIN_CRYPTO_SHA2_H
-#define BITCOIN_CRYPTO_SHA2_H
-
-#include <stdint.h>
-#include <stdlib.h>
-
-/** A hasher class for SHA-256. */
-class CSHA256
-{
-private:
-    uint32_t s[8];
-    unsigned char buf[64];
-    size_t bytes;
-
-public:
-    static const size_t OUTPUT_SIZE = 32;
-
-    CSHA256();
-    CSHA256& Write(const unsigned char* data, size_t len);
-    void Finalize(unsigned char hash[OUTPUT_SIZE]);
-    CSHA256& Reset();
-};
-
-/** A hasher class for SHA-512. */
-class CSHA512
-{
-private:
-    uint64_t s[8];
-    unsigned char buf[128];
-    size_t bytes;
-
-public:
-    static const size_t OUTPUT_SIZE = 64;
-
-    CSHA512();
-    CSHA512& Write(const unsigned char* data, size_t len);
-    void Finalize(unsigned char hash[OUTPUT_SIZE]);
-    CSHA512& Reset();
-};
-
-/** A hasher class for HMAC-SHA-512. */
-class CHMAC_SHA512
-{
-private:
-    CSHA512 outer;
-    CSHA512 inner;
-
-public:
-    static const size_t OUTPUT_SIZE = 64;
-
-    CHMAC_SHA512(const unsigned char* key, size_t keylen);
-    CHMAC_SHA512& Write(const unsigned char* data, size_t len)
-    {
-        inner.Write(data, len);
-        return *this;
-    }
-    void Finalize(unsigned char hash[OUTPUT_SIZE]);
-};
-
-#endif // BITCOIN_CRYPTO_SHA2_H
diff --git a/src/crypto/sha256.cpp b/src/crypto/sha256.cpp
new file mode 100644
index 000000000000..8410e5930543
--- /dev/null
+++ b/src/crypto/sha256.cpp
@@ -0,0 +1,189 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/sha256.h"
+
+#include "crypto/common.h"
+
+#include <string.h>
+
+// Internal implementation code.
+namespace
+{
+/// Internal SHA-256 implementation.
+namespace sha256
+{
+uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
+uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
+uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
+uint32_t inline Sigma1(uint32_t x) { return (x >> 6 | x << 26) ^ (x >> 11 | x << 21) ^ (x >> 25 | x << 7); }
+uint32_t inline sigma0(uint32_t x) { return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3); }
+uint32_t inline sigma1(uint32_t x) { return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); }
+
+/** One round of SHA-256. */
+void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t& d, uint32_t e, uint32_t f, uint32_t g, uint32_t& h, uint32_t k, uint32_t w)
+{
+    uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
+    uint32_t t2 = Sigma0(a) + Maj(a, b, c);
+    d += t1;
+    h = t1 + t2;
+}
+
+/** Initialize SHA-256 state. */
+void inline Initialize(uint32_t* s)
+{
+    s[0] = 0x6a09e667ul;
+    s[1] = 0xbb67ae85ul;
+    s[2] = 0x3c6ef372ul;
+    s[3] = 0xa54ff53aul;
+    s[4] = 0x510e527ful;
+    s[5] = 0x9b05688cul;
+    s[6] = 0x1f83d9abul;
+    s[7] = 0x5be0cd19ul;
+}
+
+/** Perform one SHA-256 transformation, processing a 64-byte chunk. */
+void Transform(uint32_t* s, const unsigned char* chunk)
+{
+    uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
+    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
+
+    Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = ReadBE32(chunk + 0));
+    Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = ReadBE32(chunk + 4));
+    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = ReadBE32(chunk + 8));
+    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = ReadBE32(chunk + 12));
+    Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = ReadBE32(chunk + 16));
+    Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = ReadBE32(chunk + 20));
+    Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = ReadBE32(chunk + 24));
+    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = ReadBE32(chunk + 28));
+    Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = ReadBE32(chunk + 32));
+    Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = ReadBE32(chunk + 36));
+    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = ReadBE32(chunk + 40));
+    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = ReadBE32(chunk + 44));
+    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = ReadBE32(chunk + 48));
+    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = ReadBE32(chunk + 52));
+    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = ReadBE32(chunk + 56));
+    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = ReadBE32(chunk + 60));
+
+    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
+
+    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
+    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
+    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
+    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
+    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
+    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
+    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
+    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
+    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
+    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
+    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
+    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
+    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
+    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
+    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
+
+    s[0] += a;
+    s[1] += b;
+    s[2] += c;
+    s[3] += d;
+    s[4] += e;
+    s[5] += f;
+    s[6] += g;
+    s[7] += h;
+}
+
+} // namespace sha256
+} // namespace
+
+
+////// SHA-256
+
+CSHA256::CSHA256() : bytes(0)
+{
+    sha256::Initialize(s);
+}
+
+CSHA256& CSHA256::Write(const unsigned char* data, size_t len)
+{
+    const unsigned char* end = data + len;
+    size_t bufsize = bytes % 64;
+    if (bufsize && bufsize + len >= 64) {
+        // Fill the buffer, and process it.
+        memcpy(buf + bufsize, data, 64 - bufsize);
+        bytes += 64 - bufsize;
+        data += 64 - bufsize;
+        sha256::Transform(s, buf);
+        bufsize = 0;
+    }
+    while (end >= data + 64) {
+        // Process full chunks directly from the source.
+        sha256::Transform(s, data);
+        bytes += 64;
+        data += 64;
+    }
+    if (end > data) {
+        // Fill the buffer with what remains.
+        memcpy(buf + bufsize, data, end - data);
+        bytes += end - data;
+    }
+    return *this;
+}
+
+void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
+    static const unsigned char pad[64] = {0x80};
+    unsigned char sizedesc[8];
+    WriteBE64(sizedesc, bytes << 3);
+    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
+    Write(sizedesc, 8);
+    WriteBE32(hash, s[0]);
+    WriteBE32(hash + 4, s[1]);
+    WriteBE32(hash + 8, s[2]);
+    WriteBE32(hash + 12, s[3]);
+    WriteBE32(hash + 16, s[4]);
+    WriteBE32(hash + 20, s[5]);
+    WriteBE32(hash + 24, s[6]);
+    WriteBE32(hash + 28, s[7]);
+}
+
+CSHA256& CSHA256::Reset()
+{
+    bytes = 0;
+    sha256::Initialize(s);
+    return *this;
+}
diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h
new file mode 100644
index 000000000000..a57dce02273c
--- /dev/null
+++ b/src/crypto/sha256.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SHA256_H
+#define BITCOIN_SHA256_H
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for SHA-256. */
+class CSHA256
+{
+private:
+    uint32_t s[8];
+    unsigned char buf[64];
+    size_t bytes;
+
+public:
+    static const size_t OUTPUT_SIZE = 32;
+
+    CSHA256();
+    CSHA256& Write(const unsigned char* data, size_t len);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
+    CSHA256& Reset();
+};
+
+#endif // BITCOIN_SHA256_H
diff --git a/src/crypto/sha2.cpp b/src/crypto/sha512.cpp
similarity index 53%
rename from src/crypto/sha2.cpp
rename to src/crypto/sha512.cpp
index 613aac2d710c..22c3103bed10 100644
--- a/src/crypto/sha2.cpp
+++ b/src/crypto/sha512.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "crypto/sha2.h"
+#include "crypto/sha512.h"
 
 #include "crypto/common.h"
 
@@ -11,124 +11,6 @@
 // Internal implementation code.
 namespace
 {
-/// Internal SHA-256 implementation.
-namespace sha256
-{
-uint32_t inline Ch(uint32_t x, uint32_t y, uint32_t z) { return z ^ (x & (y ^ z)); }
-uint32_t inline Maj(uint32_t x, uint32_t y, uint32_t z) { return (x & y) | (z & (x | y)); }
-uint32_t inline Sigma0(uint32_t x) { return (x >> 2 | x << 30) ^ (x >> 13 | x << 19) ^ (x >> 22 | x << 10); }
-uint32_t inline Sigma1(uint32_t x) { return (x >> 6 | x << 26) ^ (x >> 11 | x << 21) ^ (x >> 25 | x << 7); }
-uint32_t inline sigma0(uint32_t x) { return (x >> 7 | x << 25) ^ (x >> 18 | x << 14) ^ (x >> 3); }
-uint32_t inline sigma1(uint32_t x) { return (x >> 17 | x << 15) ^ (x >> 19 | x << 13) ^ (x >> 10); }
-
-/** One round of SHA-256. */
-void inline Round(uint32_t a, uint32_t b, uint32_t c, uint32_t& d, uint32_t e, uint32_t f, uint32_t g, uint32_t& h, uint32_t k, uint32_t w)
-{
-    uint32_t t1 = h + Sigma1(e) + Ch(e, f, g) + k + w;
-    uint32_t t2 = Sigma0(a) + Maj(a, b, c);
-    d += t1;
-    h = t1 + t2;
-}
-
-/** Initialize SHA-256 state. */
-void inline Initialize(uint32_t* s)
-{
-    s[0] = 0x6a09e667ul;
-    s[1] = 0xbb67ae85ul;
-    s[2] = 0x3c6ef372ul;
-    s[3] = 0xa54ff53aul;
-    s[4] = 0x510e527ful;
-    s[5] = 0x9b05688cul;
-    s[6] = 0x1f83d9abul;
-    s[7] = 0x5be0cd19ul;
-}
-
-/** Perform one SHA-256 transformation, processing a 64-byte chunk. */
-void Transform(uint32_t* s, const unsigned char* chunk)
-{
-    uint32_t a = s[0], b = s[1], c = s[2], d = s[3], e = s[4], f = s[5], g = s[6], h = s[7];
-    uint32_t w0, w1, w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15;
-
-    Round(a, b, c, d, e, f, g, h, 0x428a2f98, w0 = ReadBE32(chunk + 0));
-    Round(h, a, b, c, d, e, f, g, 0x71374491, w1 = ReadBE32(chunk + 4));
-    Round(g, h, a, b, c, d, e, f, 0xb5c0fbcf, w2 = ReadBE32(chunk + 8));
-    Round(f, g, h, a, b, c, d, e, 0xe9b5dba5, w3 = ReadBE32(chunk + 12));
-    Round(e, f, g, h, a, b, c, d, 0x3956c25b, w4 = ReadBE32(chunk + 16));
-    Round(d, e, f, g, h, a, b, c, 0x59f111f1, w5 = ReadBE32(chunk + 20));
-    Round(c, d, e, f, g, h, a, b, 0x923f82a4, w6 = ReadBE32(chunk + 24));
-    Round(b, c, d, e, f, g, h, a, 0xab1c5ed5, w7 = ReadBE32(chunk + 28));
-    Round(a, b, c, d, e, f, g, h, 0xd807aa98, w8 = ReadBE32(chunk + 32));
-    Round(h, a, b, c, d, e, f, g, 0x12835b01, w9 = ReadBE32(chunk + 36));
-    Round(g, h, a, b, c, d, e, f, 0x243185be, w10 = ReadBE32(chunk + 40));
-    Round(f, g, h, a, b, c, d, e, 0x550c7dc3, w11 = ReadBE32(chunk + 44));
-    Round(e, f, g, h, a, b, c, d, 0x72be5d74, w12 = ReadBE32(chunk + 48));
-    Round(d, e, f, g, h, a, b, c, 0x80deb1fe, w13 = ReadBE32(chunk + 52));
-    Round(c, d, e, f, g, h, a, b, 0x9bdc06a7, w14 = ReadBE32(chunk + 56));
-    Round(b, c, d, e, f, g, h, a, 0xc19bf174, w15 = ReadBE32(chunk + 60));
-
-    Round(a, b, c, d, e, f, g, h, 0xe49b69c1, w0 += sigma1(w14) + w9 + sigma0(w1));
-    Round(h, a, b, c, d, e, f, g, 0xefbe4786, w1 += sigma1(w15) + w10 + sigma0(w2));
-    Round(g, h, a, b, c, d, e, f, 0x0fc19dc6, w2 += sigma1(w0) + w11 + sigma0(w3));
-    Round(f, g, h, a, b, c, d, e, 0x240ca1cc, w3 += sigma1(w1) + w12 + sigma0(w4));
-    Round(e, f, g, h, a, b, c, d, 0x2de92c6f, w4 += sigma1(w2) + w13 + sigma0(w5));
-    Round(d, e, f, g, h, a, b, c, 0x4a7484aa, w5 += sigma1(w3) + w14 + sigma0(w6));
-    Round(c, d, e, f, g, h, a, b, 0x5cb0a9dc, w6 += sigma1(w4) + w15 + sigma0(w7));
-    Round(b, c, d, e, f, g, h, a, 0x76f988da, w7 += sigma1(w5) + w0 + sigma0(w8));
-    Round(a, b, c, d, e, f, g, h, 0x983e5152, w8 += sigma1(w6) + w1 + sigma0(w9));
-    Round(h, a, b, c, d, e, f, g, 0xa831c66d, w9 += sigma1(w7) + w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xb00327c8, w10 += sigma1(w8) + w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xbf597fc7, w11 += sigma1(w9) + w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xc6e00bf3, w12 += sigma1(w10) + w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd5a79147, w13 += sigma1(w11) + w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0x06ca6351, w14 += sigma1(w12) + w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x14292967, w15 += sigma1(w13) + w8 + sigma0(w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x27b70a85, w0 += sigma1(w14) + w9 + sigma0(w1));
-    Round(h, a, b, c, d, e, f, g, 0x2e1b2138, w1 += sigma1(w15) + w10 + sigma0(w2));
-    Round(g, h, a, b, c, d, e, f, 0x4d2c6dfc, w2 += sigma1(w0) + w11 + sigma0(w3));
-    Round(f, g, h, a, b, c, d, e, 0x53380d13, w3 += sigma1(w1) + w12 + sigma0(w4));
-    Round(e, f, g, h, a, b, c, d, 0x650a7354, w4 += sigma1(w2) + w13 + sigma0(w5));
-    Round(d, e, f, g, h, a, b, c, 0x766a0abb, w5 += sigma1(w3) + w14 + sigma0(w6));
-    Round(c, d, e, f, g, h, a, b, 0x81c2c92e, w6 += sigma1(w4) + w15 + sigma0(w7));
-    Round(b, c, d, e, f, g, h, a, 0x92722c85, w7 += sigma1(w5) + w0 + sigma0(w8));
-    Round(a, b, c, d, e, f, g, h, 0xa2bfe8a1, w8 += sigma1(w6) + w1 + sigma0(w9));
-    Round(h, a, b, c, d, e, f, g, 0xa81a664b, w9 += sigma1(w7) + w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0xc24b8b70, w10 += sigma1(w8) + w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0xc76c51a3, w11 += sigma1(w9) + w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0xd192e819, w12 += sigma1(w10) + w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xd6990624, w13 += sigma1(w11) + w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xf40e3585, w14 += sigma1(w12) + w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x106aa070, w15 += sigma1(w13) + w8 + sigma0(w0));
-
-    Round(a, b, c, d, e, f, g, h, 0x19a4c116, w0 += sigma1(w14) + w9 + sigma0(w1));
-    Round(h, a, b, c, d, e, f, g, 0x1e376c08, w1 += sigma1(w15) + w10 + sigma0(w2));
-    Round(g, h, a, b, c, d, e, f, 0x2748774c, w2 += sigma1(w0) + w11 + sigma0(w3));
-    Round(f, g, h, a, b, c, d, e, 0x34b0bcb5, w3 += sigma1(w1) + w12 + sigma0(w4));
-    Round(e, f, g, h, a, b, c, d, 0x391c0cb3, w4 += sigma1(w2) + w13 + sigma0(w5));
-    Round(d, e, f, g, h, a, b, c, 0x4ed8aa4a, w5 += sigma1(w3) + w14 + sigma0(w6));
-    Round(c, d, e, f, g, h, a, b, 0x5b9cca4f, w6 += sigma1(w4) + w15 + sigma0(w7));
-    Round(b, c, d, e, f, g, h, a, 0x682e6ff3, w7 += sigma1(w5) + w0 + sigma0(w8));
-    Round(a, b, c, d, e, f, g, h, 0x748f82ee, w8 += sigma1(w6) + w1 + sigma0(w9));
-    Round(h, a, b, c, d, e, f, g, 0x78a5636f, w9 += sigma1(w7) + w2 + sigma0(w10));
-    Round(g, h, a, b, c, d, e, f, 0x84c87814, w10 += sigma1(w8) + w3 + sigma0(w11));
-    Round(f, g, h, a, b, c, d, e, 0x8cc70208, w11 += sigma1(w9) + w4 + sigma0(w12));
-    Round(e, f, g, h, a, b, c, d, 0x90befffa, w12 += sigma1(w10) + w5 + sigma0(w13));
-    Round(d, e, f, g, h, a, b, c, 0xa4506ceb, w13 += sigma1(w11) + w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0xbef9a3f7, w14 + sigma1(w12) + w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0xc67178f2, w15 + sigma1(w13) + w8 + sigma0(w0));
-
-    s[0] += a;
-    s[1] += b;
-    s[2] += c;
-    s[3] += d;
-    s[4] += e;
-    s[5] += f;
-    s[6] += g;
-    s[7] += h;
-}
-
-} // namespace sha256
-
 /// Internal SHA-512 implementation.
 namespace sha512
 {
@@ -249,8 +131,8 @@ void Transform(uint64_t* s, const unsigned char* chunk)
     Round(f, g, h, a, b, c, d, e, 0x431d67c49c100d4cull, w11 += sigma1(w9) + w4 + sigma0(w12));
     Round(e, f, g, h, a, b, c, d, 0x4cc5d4becb3e42b6ull, w12 += sigma1(w10) + w5 + sigma0(w13));
     Round(d, e, f, g, h, a, b, c, 0x597f299cfc657e2aull, w13 += sigma1(w11) + w6 + sigma0(w14));
-    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 += sigma1(w12) + w7 + sigma0(w15));
-    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 += sigma1(w13) + w8 + sigma0(w0));
+    Round(c, d, e, f, g, h, a, b, 0x5fcb6fab3ad6faecull, w14 + sigma1(w12) + w7 + sigma0(w15));
+    Round(b, c, d, e, f, g, h, a, 0x6c44198c4a475817ull, w15 + sigma1(w13) + w8 + sigma0(w0));
 
     s[0] += a;
     s[1] += b;
@@ -267,63 +149,6 @@ void Transform(uint64_t* s, const unsigned char* chunk)
 } // namespace
 
 
-////// SHA-256
-
-CSHA256::CSHA256() : bytes(0)
-{
-    sha256::Initialize(s);
-}
-
-CSHA256& CSHA256::Write(const unsigned char* data, size_t len)
-{
-    const unsigned char* end = data + len;
-    size_t bufsize = bytes % 64;
-    if (bufsize && bufsize + len >= 64) {
-        // Fill the buffer, and process it.
-        memcpy(buf + bufsize, data, 64 - bufsize);
-        bytes += 64 - bufsize;
-        data += 64 - bufsize;
-        sha256::Transform(s, buf);
-        bufsize = 0;
-    }
-    while (end >= data + 64) {
-        // Process full chunks directly from the source.
-        sha256::Transform(s, data);
-        bytes += 64;
-        data += 64;
-    }
-    if (end > data) {
-        // Fill the buffer with what remains.
-        memcpy(buf + bufsize, data, end - data);
-        bytes += end - data;
-    }
-    return *this;
-}
-
-void CSHA256::Finalize(unsigned char hash[OUTPUT_SIZE])
-{
-    static const unsigned char pad[64] = {0x80};
-    unsigned char sizedesc[8];
-    WriteBE64(sizedesc, bytes << 3);
-    Write(pad, 1 + ((119 - (bytes % 64)) % 64));
-    Write(sizedesc, 8);
-    WriteBE32(hash, s[0]);
-    WriteBE32(hash + 4, s[1]);
-    WriteBE32(hash + 8, s[2]);
-    WriteBE32(hash + 12, s[3]);
-    WriteBE32(hash + 16, s[4]);
-    WriteBE32(hash + 20, s[5]);
-    WriteBE32(hash + 24, s[6]);
-    WriteBE32(hash + 28, s[7]);
-}
-
-CSHA256& CSHA256::Reset()
-{
-    bytes = 0;
-    sha256::Initialize(s);
-    return *this;
-}
-
 ////// SHA-512
 
 CSHA512::CSHA512() : bytes(0)
@@ -380,32 +205,3 @@ CSHA512& CSHA512::Reset()
     sha512::Initialize(s);
     return *this;
 }
-
-////// HMAC-SHA-512
-
-CHMAC_SHA512::CHMAC_SHA512(const unsigned char* key, size_t keylen)
-{
-    unsigned char rkey[128];
-    if (keylen <= 128) {
-        memcpy(rkey, key, keylen);
-        memset(rkey + keylen, 0, 128 - keylen);
-    } else {
-        CSHA512().Write(key, keylen).Finalize(rkey);
-        memset(rkey + 64, 0, 64);
-    }
-
-    for (int n = 0; n < 128; n++)
-        rkey[n] ^= 0x5c;
-    outer.Write(rkey, 128);
-
-    for (int n = 0; n < 128; n++)
-        rkey[n] ^= 0x5c ^ 0x36;
-    inner.Write(rkey, 128);
-}
-
-void CHMAC_SHA512::Finalize(unsigned char hash[OUTPUT_SIZE])
-{
-    unsigned char temp[64];
-    inner.Finalize(temp);
-    outer.Write(temp, 64).Finalize(hash);
-}
diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h
new file mode 100644
index 000000000000..4d1345e50bbf
--- /dev/null
+++ b/src/crypto/sha512.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SHA512_H
+#define BITCOIN_SHA512_H
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for SHA-512. */
+class CSHA512
+{
+private:
+    uint64_t s[8];
+    unsigned char buf[128];
+    size_t bytes;
+
+public:
+    static const size_t OUTPUT_SIZE = 64;
+
+    CSHA512();
+    CSHA512& Write(const unsigned char* data, size_t len);
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
+    CSHA512& Reset();
+};
+
+#endif // BITCOIN_SHA512_H
diff --git a/src/hash.cpp b/src/hash.cpp
index 2cca06ae239d..aaca00ea2d38 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -3,6 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "hash.h"
+#include "crypto/hmac_sha512.h"
 
 inline uint32_t ROTL32(uint32_t x, int8_t r)
 {
diff --git a/src/hash.h b/src/hash.h
index 75695160e6e4..5a34cdc5c3c8 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -7,7 +7,7 @@
 #define BITCOIN_HASH_H
 
 #include "crypto/ripemd160.h"
-#include "crypto/sha2.h"
+#include "crypto/sha256.h"
 #include "serialize.h"
 #include "uint256.h"
 #include "version.h"
diff --git a/src/key.cpp b/src/key.cpp
index 76256b864ce9..9b3cf8f01911 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -4,7 +4,7 @@
 
 #include "key.h"
 
-#include "crypto/sha2.h"
+#include "crypto/hmac_sha512.h"
 #include "eccryptoverify.h"
 #include "pubkey.h"
 #include "random.h"
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 9c6f536f21ff..91979ff4dc87 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -4,7 +4,6 @@
 
 #include "pubkey.h"
 
-#include "crypto/sha2.h"
 #include "eccryptoverify.h"
 
 #ifdef USE_SECP256K1
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 760086eaba31..6038adda94f5 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -8,7 +8,7 @@
 #include "core/transaction.h"
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
-#include "crypto/sha2.h"
+#include "crypto/sha256.h"
 #include "eccryptoverify.h"
 #include "pubkey.h"
 #include "script/script.h"
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index 68232a2ff110..b3783133d56a 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -4,7 +4,9 @@
 
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
-#include "crypto/sha2.h"
+#include "crypto/sha256.h"
+#include "crypto/sha512.h"
+#include "crypto/hmac_sha512.h"
 #include "random.h"
 #include "utilstrencodings.h"
 

From a8f5087e5318211b58b0c87ebd4e036e6c6721e5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 26 Oct 2014 01:38:13 -0700
Subject: [PATCH 1087/1819] Add HMAC-SHA256

---
 src/Makefile.am            |  2 ++
 src/crypto/hmac_sha256.cpp | 34 ++++++++++++++++++++++++++++++
 src/crypto/hmac_sha256.h   | 32 ++++++++++++++++++++++++++++
 src/test/crypto_tests.cpp  | 43 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 111 insertions(+)
 create mode 100644 src/crypto/hmac_sha256.cpp
 create mode 100644 src/crypto/hmac_sha256.h

diff --git a/src/Makefile.am b/src/Makefile.am
index e1e691518528..1a5c57a3fa99 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -205,11 +205,13 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha1.cpp \
   crypto/sha256.cpp \
   crypto/sha512.cpp \
+  crypto/hmac_sha256.cpp \
   crypto/hmac_sha512.cpp \
   crypto/ripemd160.cpp \
   crypto/common.h \
   crypto/sha256.h \
   crypto/sha512.h \
+  crypto/hmac_sha256.h \
   crypto/hmac_sha512.h \
   crypto/sha1.h \
   crypto/ripemd160.h
diff --git a/src/crypto/hmac_sha256.cpp b/src/crypto/hmac_sha256.cpp
new file mode 100644
index 000000000000..435896538bf7
--- /dev/null
+++ b/src/crypto/hmac_sha256.cpp
@@ -0,0 +1,34 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/hmac_sha256.h"
+
+#include <string.h>
+
+CHMAC_SHA256::CHMAC_SHA256(const unsigned char* key, size_t keylen)
+{
+    unsigned char rkey[64];
+    if (keylen <= 64) {
+        memcpy(rkey, key, keylen);
+        memset(rkey + keylen, 0, 64 - keylen);
+    } else {
+        CSHA256().Write(key, keylen).Finalize(rkey);
+        memset(rkey + 32, 0, 32);
+    }
+
+    for (int n = 0; n < 64; n++)
+        rkey[n] ^= 0x5c;
+    outer.Write(rkey, 64);
+
+    for (int n = 0; n < 64; n++)
+        rkey[n] ^= 0x5c ^ 0x36;
+    inner.Write(rkey, 64);
+}
+
+void CHMAC_SHA256::Finalize(unsigned char hash[OUTPUT_SIZE])
+{
+    unsigned char temp[32];
+    inner.Finalize(temp);
+    outer.Write(temp, 32).Finalize(hash);
+}
diff --git a/src/crypto/hmac_sha256.h b/src/crypto/hmac_sha256.h
new file mode 100644
index 000000000000..4ceac709444a
--- /dev/null
+++ b/src/crypto/hmac_sha256.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_HMAC_SHA256_H
+#define BITCOIN_HMAC_SHA256_H
+
+#include "crypto/sha256.h"
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** A hasher class for HMAC-SHA-512. */
+class CHMAC_SHA256
+{
+private:
+    CSHA256 outer;
+    CSHA256 inner;
+
+public:
+    static const size_t OUTPUT_SIZE = 32;
+
+    CHMAC_SHA256(const unsigned char* key, size_t keylen);
+    CHMAC_SHA256& Write(const unsigned char* data, size_t len)
+    {
+        inner.Write(data, len);
+        return *this;
+    }
+    void Finalize(unsigned char hash[OUTPUT_SIZE]);
+};
+
+#endif // BITCOIN_SHA256_H
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index b3783133d56a..466b38fca96e 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -6,6 +6,7 @@
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
 #include "crypto/sha512.h"
+#include "crypto/hmac_sha256.h"
 #include "crypto/hmac_sha512.h"
 #include "random.h"
 #include "utilstrencodings.h"
@@ -50,6 +51,11 @@ void TestSHA256(const std::string &in, const std::string &hexout) { TestVector(C
 void TestSHA512(const std::string &in, const std::string &hexout) { TestVector(CSHA512(), in, ParseHex(hexout));}
 void TestRIPEMD160(const std::string &in, const std::string &hexout) { TestVector(CRIPEMD160(), in, ParseHex(hexout));}
 
+void TestHMACSHA256(const std::string &hexkey, const std::string &hexin, const std::string &hexout) {
+    std::vector<unsigned char> key = ParseHex(hexkey);
+    TestVector(CHMAC_SHA256(&key[0], key.size()), ParseHex(hexin), ParseHex(hexout));
+}
+
 void TestHMACSHA512(const std::string &hexkey, const std::string &hexin, const std::string &hexout) {
     std::vector<unsigned char> key = ParseHex(hexkey);
     TestVector(CHMAC_SHA512(&key[0], key.size()), ParseHex(hexin), ParseHex(hexout));
@@ -160,6 +166,43 @@ BOOST_AUTO_TEST_CASE(sha512_testvectors) {
                "37de8c3ef5459d76a52cedc02dc499a3c9ed9dedbfb3281afd9653b8a112fafc");
 }
 
+BOOST_AUTO_TEST_CASE(hmac_sha256_testvectors) {
+    // test cases 1, 2, 3, 4, 6 and 7 of RFC 4231
+    TestHMACSHA256("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
+                   "4869205468657265",
+                   "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7");
+    TestHMACSHA256("4a656665",
+                   "7768617420646f2079612077616e7420666f72206e6f7468696e673f",
+                   "5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843");
+    TestHMACSHA256("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+                   "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
+                   "dddddddddddddddddddddddddddddddddddd",
+                   "773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe");
+    TestHMACSHA256("0102030405060708090a0b0c0d0e0f10111213141516171819",
+                   "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd"
+                   "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
+                   "82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b");
+    TestHMACSHA256("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaa",
+                   "54657374205573696e67204c6172676572205468616e20426c6f636b2d53697a"
+                   "65204b6579202d2048617368204b6579204669727374",
+                   "60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54");
+    TestHMACSHA256("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+                   "aaaaaa",
+                   "5468697320697320612074657374207573696e672061206c6172676572207468"
+                   "616e20626c6f636b2d73697a65206b657920616e642061206c61726765722074"
+                   "68616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565"
+                   "647320746f20626520686173686564206265666f7265206265696e6720757365"
+                   "642062792074686520484d414320616c676f726974686d2e",
+                   "9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2");
+}
+
 BOOST_AUTO_TEST_CASE(hmac_sha512_testvectors) {
     // test cases 1, 2, 3, 4, 6 and 7 of RFC 4231
     TestHMACSHA512("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",

From 3060e360980f3e80db1d903085d759338ab27f4a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 26 Oct 2014 02:28:22 -0700
Subject: [PATCH 1088/1819] Add the RFC6979 PRNG

---
 src/Makefile.am                    |  2 ++
 src/crypto/rfc6979_hmac_sha256.cpp | 47 ++++++++++++++++++++++++++++++
 src/crypto/rfc6979_hmac_sha256.h   | 36 +++++++++++++++++++++++
 src/test/crypto_tests.cpp          | 36 +++++++++++++++++++++++
 4 files changed, 121 insertions(+)
 create mode 100644 src/crypto/rfc6979_hmac_sha256.cpp
 create mode 100644 src/crypto/rfc6979_hmac_sha256.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 1a5c57a3fa99..2863a7961e24 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -206,12 +206,14 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/sha256.cpp \
   crypto/sha512.cpp \
   crypto/hmac_sha256.cpp \
+  crypto/rfc6979_hmac_sha256.cpp \
   crypto/hmac_sha512.cpp \
   crypto/ripemd160.cpp \
   crypto/common.h \
   crypto/sha256.h \
   crypto/sha512.h \
   crypto/hmac_sha256.h \
+  crypto/rfc6979_hmac_sha256.h \
   crypto/hmac_sha512.h \
   crypto/sha1.h \
   crypto/ripemd160.h
diff --git a/src/crypto/rfc6979_hmac_sha256.cpp b/src/crypto/rfc6979_hmac_sha256.cpp
new file mode 100644
index 000000000000..3f935abfea3f
--- /dev/null
+++ b/src/crypto/rfc6979_hmac_sha256.cpp
@@ -0,0 +1,47 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "crypto/rfc6979_hmac_sha256.h"
+
+#include <string.h>
+
+#include <algorithm>
+
+static const unsigned char zero[1] = {0x00};
+static const unsigned char one[1] = {0x01};
+
+RFC6979_HMAC_SHA256::RFC6979_HMAC_SHA256(const unsigned char* key, size_t keylen, const unsigned char* msg, size_t msglen) : retry(false)
+{
+    memset(V, 0x01, sizeof(V));
+    memset(K, 0x00, sizeof(K));
+
+    CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Write(zero, sizeof(zero)).Write(key, keylen).Write(msg, msglen).Finalize(K);
+    CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Finalize(V);
+    CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Write(one, sizeof(one)).Write(key, keylen).Write(msg, msglen).Finalize(K);
+    CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Finalize(V);
+}
+
+RFC6979_HMAC_SHA256::~RFC6979_HMAC_SHA256()
+{
+    memset(V, 0x01, sizeof(V));
+    memset(K, 0x00, sizeof(K));
+}
+
+void RFC6979_HMAC_SHA256::Generate(unsigned char* output, size_t outputlen)
+{
+    if (retry) {
+        CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Write(zero, sizeof(zero)).Finalize(K);
+        CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Finalize(V);
+    }
+
+    while (outputlen > 0) {
+        CHMAC_SHA256(K, sizeof(K)).Write(V, sizeof(V)).Finalize(V);
+        size_t len = std::min(outputlen, sizeof(V));
+        memcpy(output, V, len);
+        output += len;
+        outputlen -= len;
+    }
+
+    retry = true;
+}
diff --git a/src/crypto/rfc6979_hmac_sha256.h b/src/crypto/rfc6979_hmac_sha256.h
new file mode 100644
index 000000000000..e67ddcf8fe57
--- /dev/null
+++ b/src/crypto/rfc6979_hmac_sha256.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_RFC6979_HMAC_SHA256_H
+#define BITCOIN_RFC6979_HMAC_SHA256_H
+
+#include "crypto/hmac_sha256.h"
+
+#include <stdint.h>
+#include <stdlib.h>
+
+/** The RFC 6979 PRNG using HMAC-SHA256. */
+class RFC6979_HMAC_SHA256
+{
+private:
+    unsigned char V[CHMAC_SHA256::OUTPUT_SIZE];
+    unsigned char K[CHMAC_SHA256::OUTPUT_SIZE];
+    bool retry;
+
+public:
+    /**
+     * Construct a new RFC6979 PRNG, using the given key and message.
+     * The message is assumed to be already hashed.
+     */
+    RFC6979_HMAC_SHA256(const unsigned char* key, size_t keylen, const unsigned char* msg, size_t msglen);
+
+    /**
+     * Generate a byte array.
+     */
+    void Generate(unsigned char* output, size_t outputlen);
+
+    ~RFC6979_HMAC_SHA256();
+};
+
+#endif // BITCOIN_RFC6979_HMAC_SHA256_H
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index 466b38fca96e..26708f5071a3 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -2,6 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "crypto/rfc6979_hmac_sha256.h"
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
@@ -13,6 +14,7 @@
 
 #include <vector>
 
+#include <boost/assign/list_of.hpp>
 #include <boost/test/unit_test.hpp>
 
 BOOST_AUTO_TEST_SUITE(crypto_tests)
@@ -246,4 +248,38 @@ BOOST_AUTO_TEST_CASE(hmac_sha512_testvectors) {
                    "b6022cac3c4982b10d5eeb55c3e4de15134676fb6de0446065c97440fa8c6a58");
 }
 
+void TestRFC6979(const std::string& hexkey, const std::string& hexmsg, const std::vector<std::string>& hexout)
+{
+    std::vector<unsigned char> key = ParseHex(hexkey);
+    std::vector<unsigned char> msg = ParseHex(hexmsg);
+    RFC6979_HMAC_SHA256 rng(&key[0], key.size(), &msg[0], msg.size());
+
+    for (unsigned int i = 0; i < hexout.size(); i++) {
+        std::vector<unsigned char> out = ParseHex(hexout[i]);
+        std::vector<unsigned char> gen;
+        gen.resize(out.size());
+        rng.Generate(&gen[0], gen.size());
+        BOOST_CHECK(out == gen);
+    }
+}
+
+BOOST_AUTO_TEST_CASE(rfc6979_hmac_sha256)
+{
+    TestRFC6979(
+        "0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f00",
+        "4bf5122f344554c53bde2ebb8cd2b7e3d1600ad631c385a5d7cce23c7785459a",
+        boost::assign::list_of
+            ("4fe29525b2086809159acdf0506efb86b0ec932c7ba44256ab321e421e67e9fb")
+            ("2bf0fff1d3c378a22dc5de1d856522325c65b504491a0cbd01cb8f3aa67ffd4a")
+            ("f528b410cb541f77000d7afb6c5b53c5c471eab43e466d9ac5190c39c82fd82e"));
+
+    TestRFC6979(
+        "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
+        "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
+        boost::assign::list_of
+            ("9c236c165b82ae0cd590659e100b6bab3036e7ba8b06749baf6981e16f1a2b95")
+            ("df471061625bc0ea14b682feee2c9c02f235da04204c1d62a1536c6e17aed7a9")
+            ("7597887cbd76321f32e30440679a22cf7f8d9d2eac390e581fea091ce202ba94"));
+}
+
 BOOST_AUTO_TEST_SUITE_END()

From a53fd4148596f5814409e15647714bdd2a71468b Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 6 Nov 2014 06:54:50 -0800
Subject: [PATCH 1089/1819] Deterministic signing

---
 src/key.cpp               | 29 ++++++++++++++++++-----------
 src/key.h                 |  8 ++++++--
 src/test/key_tests.cpp    | 23 +++++++++++++++++++++++
 src/test/script_tests.cpp |  3 ++-
 4 files changed, 49 insertions(+), 14 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 9b3cf8f01911..0fb7a5c7c5d2 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -5,6 +5,7 @@
 #include "key.h"
 
 #include "crypto/hmac_sha512.h"
+#include "crypto/rfc6979_hmac_sha256.h"
 #include "eccryptoverify.h"
 #include "pubkey.h"
 #include "random.h"
@@ -71,19 +72,22 @@ CPubKey CKey::GetPubKey() const {
     return result;
 }
 
-bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
+bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, uint32_t test_case) const {
     if (!fValid)
         return false;
     vchSig.resize(72);
-    int nSigLen = 72;
-    CKey nonce;
+    RFC6979_HMAC_SHA256 prng(begin(), 32, (unsigned char*)&hash, 32);
     do {
-        nonce.MakeNewKey(true);
-        if (secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), nonce.begin()))
-            break;
+        uint256 nonce;
+        prng.Generate((unsigned char*)&nonce, 32);
+        nonce += test_case;
+        int nSigLen = 72;
+        int ret = secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), (unsigned char*)&nonce);
+        vchSig.resize(nSigLen);
+        nonce = 0;
+        if (ret)
+            return true;
     } while(true);
-    vchSig.resize(nSigLen);
-    return true;
 }
 
 bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
@@ -91,10 +95,13 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig)
         return false;
     vchSig.resize(65);
     int rec = -1;
-    CKey nonce;
+    RFC6979_HMAC_SHA256 prng(begin(), 32, (unsigned char*)&hash, 32);
     do {
-        nonce.MakeNewKey(true);
-        if (secp256k1_ecdsa_sign_compact((const unsigned char*)&hash, 32, &vchSig[1], begin(), nonce.begin(), &rec))
+        uint256 nonce;
+        prng.Generate((unsigned char*)&nonce, 32);
+        int ret = secp256k1_ecdsa_sign_compact((const unsigned char*)&hash, 32, &vchSig[1], begin(), (unsigned char*)&nonce, &rec);
+        nonce = 0;
+        if (ret)
             break;
     } while(true);
     assert(rec != -1);
diff --git a/src/key.h b/src/key.h
index 0bb05482c9ce..463b373153e9 100644
--- a/src/key.h
+++ b/src/key.h
@@ -121,8 +121,12 @@ class CKey
      */
     CPubKey GetPubKey() const;
 
-    //! Create a DER-serialized signature.
-    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig) const;
+    /**
+     * Create a DER-serialized signature.
+     * The test_case parameter tweaks the deterministic nonce, and is only for
+     * testing. It should be zero for normal use.
+     */
+    bool Sign(const uint256& hash, std::vector<unsigned char>& vchSig, uint32_t test_case = 0) const;
 
     /**
      * Create a compact signature (65 bytes), which allows reconstructing the used public key.
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index b32f3774fe3e..47089368379d 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -8,6 +8,7 @@
 #include "script/script.h"
 #include "uint256.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <string>
 #include <vector>
@@ -142,6 +143,28 @@ BOOST_AUTO_TEST_CASE(key_test1)
         BOOST_CHECK(rkey1C == pubkey1C);
         BOOST_CHECK(rkey2C == pubkey2C);
     }
+
+    // test deterministic signing
+
+    std::vector<unsigned char> detsig, detsigc;
+    string strMsg = "Very deterministic message";
+    uint256 hashMsg = Hash(strMsg.begin(), strMsg.end());
+    BOOST_CHECK(key1.Sign(hashMsg, detsig));
+    BOOST_CHECK(key1C.Sign(hashMsg, detsigc));
+    BOOST_CHECK(detsig == detsigc);
+    BOOST_CHECK(detsig == ParseHex("304402205dbbddda71772d95ce91cd2d14b592cfbc1dd0aabd6a394b6c2d377bbe59d31d022014ddda21494a4e221f0824f0b8b924c43fa43c0ad57dccdaa11f81a6bd4582f6"));
+    BOOST_CHECK(key2.Sign(hashMsg, detsig));
+    BOOST_CHECK(key2C.Sign(hashMsg, detsigc));
+    BOOST_CHECK(detsig == detsigc);
+    BOOST_CHECK(detsig == ParseHex("3044022052d8a32079c11e79db95af63bb9600c5b04f21a9ca33dc129c2bfa8ac9dc1cd5022061d8ae5e0f6c1a16bde3719c64c2fd70e404b6428ab9a69566962e8771b5944d"));
+    BOOST_CHECK(key1.SignCompact(hashMsg, detsig));
+    BOOST_CHECK(key1C.SignCompact(hashMsg, detsigc));
+    BOOST_CHECK(detsig == ParseHex("1c5dbbddda71772d95ce91cd2d14b592cfbc1dd0aabd6a394b6c2d377bbe59d31d14ddda21494a4e221f0824f0b8b924c43fa43c0ad57dccdaa11f81a6bd4582f6"));
+    BOOST_CHECK(detsigc == ParseHex("205dbbddda71772d95ce91cd2d14b592cfbc1dd0aabd6a394b6c2d377bbe59d31d14ddda21494a4e221f0824f0b8b924c43fa43c0ad57dccdaa11f81a6bd4582f6"));
+    BOOST_CHECK(key2.SignCompact(hashMsg, detsig));
+    BOOST_CHECK(key2C.SignCompact(hashMsg, detsigc));
+    BOOST_CHECK(detsig == ParseHex("1c52d8a32079c11e79db95af63bb9600c5b04f21a9ca33dc129c2bfa8ac9dc1cd561d8ae5e0f6c1a16bde3719c64c2fd70e404b6428ab9a69566962e8771b5944d"));
+    BOOST_CHECK(detsigc == ParseHex("2052d8a32079c11e79db95af63bb9600c5b04f21a9ca33dc129c2bfa8ac9dc1cd561d8ae5e0f6c1a16bde3719c64c2fd70e404b6428ab9a69566962e8771b5944d"));
 }
 
 BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 36aaa6903f4d..d3a48234c656 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -248,8 +248,9 @@ class TestBuilder
     {
         uint256 hash = SignatureHash(scriptPubKey, spendTx, 0, nHashType);
         std::vector<unsigned char> vchSig, r, s;
+        uint32_t iter = 0;
         do {
-            key.Sign(hash, vchSig);
+            key.Sign(hash, vchSig, iter++);
             if ((lenS == 33) != (vchSig[5 + vchSig[3]] == 33)) {
                 NegateSignatureS(vchSig);
             }

From 9d8604f36a6f94b3c065a8143952cadd7d97aef5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 19 Nov 2014 22:17:58 +0100
Subject: [PATCH 1090/1819] Header define style cleanups

---
 src/crypto/hmac_sha256.h | 6 +++---
 src/crypto/hmac_sha512.h | 6 +++---
 src/crypto/sha256.h      | 6 +++---
 src/crypto/sha512.h      | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/crypto/hmac_sha256.h b/src/crypto/hmac_sha256.h
index 4ceac709444a..1fdee5a7cddf 100644
--- a/src/crypto/hmac_sha256.h
+++ b/src/crypto/hmac_sha256.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_HMAC_SHA256_H
-#define BITCOIN_HMAC_SHA256_H
+#ifndef BITCOIN_CRYPTO_HMAC_SHA256_H
+#define BITCOIN_CRYPTO_HMAC_SHA256_H
 
 #include "crypto/sha256.h"
 
@@ -29,4 +29,4 @@ class CHMAC_SHA256
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
 };
 
-#endif // BITCOIN_SHA256_H
+#endif // BITCOIN_CRYPTO_HMAC_SHA256_H
diff --git a/src/crypto/hmac_sha512.h b/src/crypto/hmac_sha512.h
index 8c65785104a1..17d75021aa2c 100644
--- a/src/crypto/hmac_sha512.h
+++ b/src/crypto/hmac_sha512.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_HMAC_SHA512_H
-#define BITCOIN_HMAC_SHA512_H
+#ifndef BITCOIN_CRYPTO_HMAC_SHA512_H
+#define BITCOIN_CRYPTO_HMAC_SHA512_H
 
 #include "crypto/sha512.h"
 
@@ -29,4 +29,4 @@ class CHMAC_SHA512
     void Finalize(unsigned char hash[OUTPUT_SIZE]);
 };
 
-#endif // BITCOIN_HMAC_SHA512_H
+#endif // BITCOIN_CRYPTO_HMAC_SHA512_H
diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h
index a57dce02273c..bde1a59bedb2 100644
--- a/src/crypto/sha256.h
+++ b/src/crypto/sha256.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_SHA256_H
-#define BITCOIN_SHA256_H
+#ifndef BITCOIN_CRYPTO_SHA256_H
+#define BITCOIN_CRYPTO_SHA256_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -25,4 +25,4 @@ class CSHA256
     CSHA256& Reset();
 };
 
-#endif // BITCOIN_SHA256_H
+#endif // BITCOIN_CRYPTO_SHA256_H
diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h
index 4d1345e50bbf..5566d5db3ef0 100644
--- a/src/crypto/sha512.h
+++ b/src/crypto/sha512.h
@@ -2,8 +2,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_SHA512_H
-#define BITCOIN_SHA512_H
+#ifndef BITCOIN_CRYPTO_SHA512_H
+#define BITCOIN_CRYPTO_SHA512_H
 
 #include <stdint.h>
 #include <stdlib.h>
@@ -25,4 +25,4 @@ class CSHA512
     CSHA512& Reset();
 };
 
-#endif // BITCOIN_SHA512_H
+#endif // BITCOIN_CRYPTO_SHA512_H

From f618577029b0c575aeb88d60372f6bb5af4406e2 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 20 Nov 2014 13:40:01 -0500
Subject: [PATCH 1091/1819] build: fix link error on some platforms. Fixes
 #5235

Some users may have libtool libs (.la) installed in their linker search paths.
In this case, using -static-libtool-libs would try to link in .a's instead of
shared libs. That would be harmless unless the .a was built in a way that
would break linking, like non-fpic.

What we really want is "-static" here. Despite its name, it's actually less
aggressive than -static-libtool-libs. It causes only internal libs to be linked
statically (libbitcoinconsensus is the one were'a after).
---
 src/Makefile.test.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 5fd2afe50d4a..9e9f478d8fe1 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -86,7 +86,7 @@ test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
 endif
 
 test_test_bitcoin_LDADD += $(LIBBITCOIN_CONSENSUS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static-libtool-libs
+test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -static
 
 nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
 

From 189fb526f188e90eed24840b826b6c6b97f3e479 Mon Sep 17 00:00:00 2001
From: mrbandrews <bandrewsny@gmail.com>
Date: Wed, 19 Nov 2014 15:55:40 -0500
Subject: [PATCH 1092/1819] Port of wallet.sh to python (wallet.py).

Also included are minor edits to util.py to create a clean blockchain and add a parameter to gather_inputs to specify number of confirmations.
---
 qa/rpc-tests/util.py   |  16 ++++--
 qa/rpc-tests/wallet.py | 100 ++++++++++++++++++++++++++++++++++
 qa/rpc-tests/wallet.sh | 118 -----------------------------------------
 3 files changed, 113 insertions(+), 121 deletions(-)
 create mode 100755 qa/rpc-tests/wallet.py
 delete mode 100755 qa/rpc-tests/wallet.sh

diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index c6d918a81cb0..bed7fed8ca5c 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -57,7 +57,6 @@ def sync_mempools(rpc_connections):
         if num_match == len(rpc_connections):
             break
         time.sleep(1)
-        
 
 bitcoind_processes = {}
 
@@ -130,6 +129,15 @@ def initialize_chain(test_dir):
         shutil.copytree(from_dir, to_dir)
         initialize_datadir(test_dir, i) # Overwrite port/rpcport in bitcoin.conf
 
+def initialize_chain_clean(test_dir, num_nodes):
+    """
+    Create an empty blockchain and num_nodes wallets.
+    Useful if a test case wants complete control over initialization.
+    """
+    for i in range(num_nodes):
+        datadir=initialize_datadir(test_dir, i)
+
+
 def _rpchost_to_args(rpchost):
     '''Convert optional IP:port spec to rpcconnect/rpcport args'''
     if rpchost is None:
@@ -221,11 +229,13 @@ def find_output(node, txid, amount):
             return i
     raise RuntimeError("find_output txid %s : %s not found"%(txid,str(amount)))
 
-def gather_inputs(from_node, amount_needed):
+
+def gather_inputs(from_node, amount_needed, confirmations_required=1):
     """
     Return a random set of unspent txouts that are enough to pay amount_needed
     """
-    utxo = from_node.listunspent(1)
+    assert(confirmations_required >=0)
+    utxo = from_node.listunspent(confirmations_required)
     random.shuffle(utxo)
     inputs = []
     total_in = Decimal("0.00000000")
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
new file mode 100755
index 000000000000..4271d96be7b7
--- /dev/null
+++ b/qa/rpc-tests/wallet.py
@@ -0,0 +1,100 @@
+#!/usr/bin/env python
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#
+# Exercise the wallet.  Ported from wallet.sh.  
+# Does the following:
+#   a) creates 3 nodes, with an empty chain (no blocks).
+#   b) node0 mines a block
+#   c) node1 mines 101 blocks, so now nodes 0 and 1 have 50btc, node2 has none. 
+#   d) node0 sends 21 btc to node2, in two transactions (11 btc, then 10 btc).
+#   e) node0 mines a block, collects the fee on the second transaction
+#   f) node1 mines 100 blocks, to mature node0's just-mined block
+#   g) check that node0 has 100-21, node2 has 21
+#   h) node0 should now have 2 unspent outputs;  send these to node2 via raw tx broadcast by node1
+#   i) have node1 mine a block
+#   j) check balances - node0 should have 0, node2 should have 100
+#
+
+from test_framework import BitcoinTestFramework
+from util import *
+
+
+class WalletTest (BitcoinTestFramework):
+
+    def setup_chain(self):
+        print("Initializing test directory "+self.options.tmpdir)
+        initialize_chain_clean(self.options.tmpdir, 3)
+
+    def setup_network(self, split=False):
+        self.nodes = start_nodes(3, self.options.tmpdir)
+        connect_nodes_bi(self.nodes,0,1)
+        connect_nodes_bi(self.nodes,1,2)
+        connect_nodes_bi(self.nodes,0,2)
+        self.is_network_split=False
+        self.sync_all()
+
+    def run_test (self):
+        print "Mining blocks..."
+
+        self.nodes[0].setgenerate(True, 1)
+
+        self.sync_all()
+        self.nodes[1].setgenerate(True, 101)
+        self.sync_all()
+
+        assert_equal(self.nodes[0].getbalance(), 50)
+        assert_equal(self.nodes[1].getbalance(), 50)
+        assert_equal(self.nodes[2].getbalance(), 0)
+
+        # Send 21 BTC from 0 to 2 using sendtoaddress call.
+        # Second transaction will be child of first, and will require a fee
+        self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11)
+        self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10)
+
+        # Have node0 mine a block, thus he will collect his own fee. 
+        self.nodes[0].setgenerate(True, 1)
+        self.sync_all()
+
+        # Have node1 generate 100 blocks (so node0 can recover the fee)
+        self.nodes[1].setgenerate(True, 100)
+        self.sync_all()
+
+        # node0 should end up with 100 btc in block rewards plus fees, but
+        # minus the 21 plus fees sent to node2
+        assert_equal(self.nodes[0].getbalance(), 100-21)
+        assert_equal(self.nodes[2].getbalance(), 21)
+
+        # Node0 should have two unspent outputs.
+        # Create a couple of transactions to send them to node2, submit them through 
+        # node1, and make sure both node0 and node2 pick them up properly: 
+        node0utxos = self.nodes[0].listunspent(1)
+        assert_equal(len(node0utxos), 2)
+
+        # create both transactions
+        txns_to_send = []
+        for utxo in node0utxos: 
+            inputs = []
+            outputs = {}
+            inputs.append({ "txid" : utxo["txid"], "vout" : utxo["vout"]})
+            outputs[self.nodes[2].getnewaddress("from1")] = utxo["amount"]
+            raw_tx = self.nodes[0].createrawtransaction(inputs, outputs)
+            txns_to_send.append(self.nodes[0].signrawtransaction(raw_tx))
+
+        # Have node 1 (miner) send the transactions
+        self.nodes[1].sendrawtransaction(txns_to_send[0]["hex"], True)
+        self.nodes[1].sendrawtransaction(txns_to_send[1]["hex"], True)
+
+        # Have node1 mine a block to confirm transactions:
+        self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
+
+        assert_equal(self.nodes[0].getbalance(), 0)
+        assert_equal(self.nodes[2].getbalance(), 100)
+        assert_equal(self.nodes[2].getbalance("from1"), 100-21)
+
+
+if __name__ == '__main__':
+    WalletTest ().main ()
diff --git a/qa/rpc-tests/wallet.sh b/qa/rpc-tests/wallet.sh
deleted file mode 100755
index c9ad0f2a7872..000000000000
--- a/qa/rpc-tests/wallet.sh
+++ /dev/null
@@ -1,118 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 2013-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.
-
-# Test block generation and basic wallet sending
-
-if [ $# -lt 1 ]; then
-        echo "Usage: $0 path_to_binaries"
-        echo "e.g. $0 ../../src"
-        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
-        exit 1
-fi
-
-set -f
-
-BITCOIND=${BITCOIND:-${1}/bitcoind}
-CLI=${BITCOINCLI:-${1}/bitcoin-cli}
-
-DIR="${BASH_SOURCE%/*}"
-SENDANDWAIT="${DIR}/send.sh"
-if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
-. "$DIR/util.sh"
-
-D=$(mktemp -d test.XXXXX)
-
-D1=${D}/node1
-CreateDataDir "$D1" port=11000 rpcport=11001
-B1ARGS="-datadir=$D1"
-$BITCOIND $B1ARGS &
-B1PID=$!
-
-D2=${D}/node2
-CreateDataDir "$D2" port=11010 rpcport=11011 connect=127.0.0.1:11000
-B2ARGS="-datadir=$D2"
-$BITCOIND $B2ARGS &
-B2PID=$!
-
-D3=${D}/node3
-CreateDataDir "$D3" port=11020 rpcport=11021 connect=127.0.0.1:11000
-B3ARGS="-datadir=$D3"
-$BITCOIND $BITCOINDARGS $B3ARGS &
-B3PID=$!
-
-# Wait until all three nodes are at the same block number
-function WaitBlocks {
-    while :
-    do
-        sleep 1
-        declare -i BLOCKS1=$( GetBlocks $B1ARGS )
-        declare -i BLOCKS2=$( GetBlocks $B2ARGS )
-        declare -i BLOCKS3=$( GetBlocks $B3ARGS )
-        if (( BLOCKS1 == BLOCKS2 && BLOCKS2 == BLOCKS3 ))
-        then
-            break
-        fi
-    done
-}
-
-echo "Generating test blockchain..."
-
-# 1 block, 50 XBT each == 50 XBT
-$CLI $B1ARGS setgenerate true 1
-WaitBlocks
-# 101 blocks, 1 mature == 50 XBT
-$CLI $B2ARGS setgenerate true 101
-WaitBlocks
-
-CheckBalance "$B1ARGS" 50
-CheckBalance "$B2ARGS" 50
-
-# Send 21 XBT from 1 to 3. Second
-# transaction will be child of first, and
-# will require a fee
-Send $B1ARGS $B3ARGS 11
-Send $B1ARGS $B3ARGS 10
-
-# Have B1 mine a new block, and mature it
-# to recover transaction fees
-$CLI $B1ARGS setgenerate true 1
-WaitBlocks
-
-# Have B2 mine 100 blocks so B1's block is mature:
-$CLI $B2ARGS setgenerate true 100
-WaitBlocks
-
-# B1 should end up with 100 XBT in block rewards plus fees,
-# minus the 21 XBT sent to B3:
-CheckBalance "$B1ARGS" "100-21"
-CheckBalance "$B3ARGS" "21"
-
-# B1 should have two unspent outputs; create a couple
-# of raw transactions to send them to B3, submit them through
-# B2, and make sure both B1 and B3 pick them up properly:
-RAW1=$(CreateTxn1 $B1ARGS 1 $(Address $B3ARGS "from1" ) )
-RAW2=$(CreateTxn1 $B1ARGS 2 $(Address $B3ARGS "from1" ) )
-RAWTXID1=$(SendRawTxn "$B2ARGS" $RAW1)
-RAWTXID2=$(SendRawTxn "$B2ARGS" $RAW2)
-
-# Have B2 mine a block to confirm transactions:
-$CLI $B2ARGS setgenerate true 1
-WaitBlocks
-
-# Check balances after confirmation
-CheckBalance "$B1ARGS" 0
-CheckBalance "$B3ARGS" 100
-CheckBalance "$B3ARGS" "100-21" "from1"
-
-$CLI $B3ARGS stop > /dev/null 2>&1
-wait $B3PID
-$CLI $B2ARGS stop > /dev/null 2>&1
-wait $B2PID
-$CLI $B1ARGS stop > /dev/null 2>&1
-wait $B1PID
-
-echo "Tests successful, cleaning up"
-rm -rf $D
-exit 0

From e4ef72449349a011110b23e5e26ce2c083801fb0 Mon Sep 17 00:00:00 2001
From: mrbandrews <bandrewsny@gmail.com>
Date: Thu, 20 Nov 2014 14:27:18 -0500
Subject: [PATCH 1093/1819] Edited rpc-tests to run python script not shell
 script.

---
 qa/pull-tester/rpc-tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index 0b5ad2064261..7da7404ad929 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -16,7 +16,7 @@ fi
 #Run the tests
 
 if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
-  ${BUILDDIR}/qa/rpc-tests/wallet.sh "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/wallet.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else

From 7e615f522845fbdd970421bfd8cdd5377b20e45f Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Thu, 20 Nov 2014 15:49:07 -0500
Subject: [PATCH 1094/1819] Fixed mempool sync after sending a transaction

---
 qa/rpc-tests/receivedby.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 9fc661fe80d1..e3f86d38dc7a 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -124,6 +124,7 @@ def run_test(self):
         balance_by_account = rec_by_accountArr = self.nodes[1].getreceivedbyaccount(account)
 
         txid = self.nodes[0].sendtoaddress(addr, 0.1)
+        self.sync_all()
 
         # listreceivedbyaccount should return received_by_account_json because of 0 confirmations
         check_array_result(self.nodes[1].listreceivedbyaccount(),

From 4a106eeb33832c822c59aa365b718fd358c99643 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 21 Nov 2014 10:24:30 +0100
Subject: [PATCH 1095/1819] qt: English translation update

---
 src/qt/bitcoinstrings.cpp   |   8 +-
 src/qt/locale/bitcoin_en.ts | 342 ++++++++++++++++++++++++------------
 2 files changed, 232 insertions(+), 118 deletions(-)

diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 1073b6a47261..af85df2020ae 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -103,6 +103,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Maintain a full transaction index, used by the getrawtransaction rpc call "
 "(default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Maximum size of data in data carrier transactions we relay and mine "
+"(default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Output debugging information (default: %u, supplying <category> is optional)"),
@@ -115,8 +118,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
 "leave that many cores free, default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Set the processor limit for when generation is on (-1 = unlimited, default: "
-"%d)"),
+"Set the number of threads for coin generation if enabled (-1 = all cores, "
+"default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
@@ -250,6 +253,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Rescanning..."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run a thread to flush wallet periodically (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Send transactions as zero-fee transactions if possible (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server certificate file (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Server private key (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index df285441e19e..ad63c5c08694 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.1" language="en">
+<TS version="2.0" language="en">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -150,7 +150,7 @@
         <translation>Passphrase Dialog</translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Enter passphrase</translation>
     </message>
@@ -165,7 +165,7 @@
         <translation>Repeat new passphrase</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="+41"/>
+        <location filename="../askpassphrasedialog.cpp" line="+45"/>
         <source>Encrypt wallet</source>
         <translation>Encrypt wallet</translation>
     </message>
@@ -200,7 +200,7 @@
         <translation>Enter the old and new passphrase to the wallet.</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="+45"/>
         <source>Confirm wallet encryption</source>
         <translation>Confirm wallet encryption</translation>
     </message>
@@ -232,12 +232,12 @@
         <translation>Wallet encrypted</translation>
     </message>
     <message>
-        <location line="-135"/>
+        <location line="-136"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+79"/>
+        <location line="+80"/>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin 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.</translation>
     </message>
@@ -286,7 +286,7 @@
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="+309"/>
+        <location filename="../bitcoingui.cpp" line="+311"/>
         <source>Sign &amp;message...</source>
         <translation>Sign &amp;message...</translation>
     </message>
@@ -296,7 +296,7 @@
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-407"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
@@ -321,7 +321,7 @@
         <translation>Browse transaction history</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+19"/>
         <source>E&amp;xit</source>
         <translation>E&amp;xit</translation>
     </message>
@@ -392,12 +392,12 @@
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location line="-403"/>
+        <location line="-405"/>
         <source>Send coins to a Bitcoin address</source>
         <translation>Send coins to a Bitcoin address</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="+48"/>
         <source>Modify configuration options for Bitcoin</source>
         <translation>Modify configuration options for Bitcoin</translation>
     </message>
@@ -432,7 +432,7 @@
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <location line="-636"/>
+        <location line="-638"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
@@ -447,7 +447,7 @@
         <translation>&amp;Receive</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+32"/>
         <source>Show information about Bitcoin Core</source>
         <translation type="unfinished"></translation>
     </message>
@@ -497,7 +497,7 @@
         <translation>Tabs toolbar</translation>
     </message>
     <message>
-        <location line="-295"/>
+        <location line="-297"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -507,7 +507,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+28"/>
+        <location line="+30"/>
         <source>&amp;About Bitcoin Core</source>
         <translation type="unfinished"></translation>
     </message>
@@ -672,7 +672,7 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+139"/>
+        <location filename="../clientmodel.cpp" line="+140"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -681,7 +681,7 @@ Address: %4
     <name>CoinControlDialog</name>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="+14"/>
-        <source>Coin Control Address Selection</source>
+        <source>Coin Selection</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -735,19 +735,24 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+16"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+53"/>
+        <location line="+56"/>
         <source>Amount</source>
         <translation type="unfinished">Amount</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Address</source>
-        <translation type="unfinished">Address</translation>
+        <location line="+5"/>
+        <source>Received with label</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Received with address</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+5"/>
@@ -770,7 +775,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="+43"/>
+        <location filename="../coincontroldialog.cpp" line="+44"/>
         <source>Copy address</source>
         <translation type="unfinished">Copy address</translation>
     </message>
@@ -836,17 +841,17 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+333"/>
+        <location line="+347"/>
         <source>highest</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="+1"/>
         <source>high</source>
         <translation type="unfinished"></translation>
     </message>
@@ -856,18 +861,17 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+0"/>
-        <location line="+12"/>
+        <location line="+1"/>
         <source>medium</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-11"/>
+        <location line="+1"/>
         <source>low-medium</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+0"/>
+        <location line="+1"/>
         <source>low</source>
         <translation type="unfinished"></translation>
     </message>
@@ -877,7 +881,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation type="unfinished"></translation>
     </message>
@@ -892,12 +896,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+162"/>
+        <location line="+165"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-28"/>
+        <location line="-32"/>
         <source>yes</source>
         <translation type="unfinished"></translation>
     </message>
@@ -938,7 +942,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+50"/>
+        <location line="+55"/>
         <location line="+61"/>
         <source>(no label)</source>
         <translation type="unfinished">(no label)</translation>
@@ -1224,17 +1228,7 @@ Address: %4
         <translation>&amp;Main</translation>
     </message>
     <message>
-        <location line="+116"/>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</translation>
-    </message>
-    <message>
-        <location line="+15"/>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Pay transaction &amp;fee</translation>
-    </message>
-    <message>
-        <location line="-125"/>
+        <location line="+6"/>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automatically start Bitcoin after logging in to the system.</translation>
     </message>
@@ -1259,7 +1253,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+160"/>
+        <location line="+114"/>
         <source>Accept connections from outside</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1269,17 +1263,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+3"/>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+34"/>
+        <location line="+44"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1315,7 +1299,7 @@ Address: %4
         <translation>&amp;Network</translation>
     </message>
     <message>
-        <location line="-131"/>
+        <location line="-85"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1325,7 +1309,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+6"/>
         <source>Expert</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1345,7 +1329,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+30"/>
         <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</translation>
     </message>
@@ -1355,7 +1339,17 @@ Address: %4
         <translation>Map port using &amp;UPnP</translation>
     </message>
     <message>
-        <location line="+29"/>
+        <location line="+17"/>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+9"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
     </message>
@@ -1420,12 +1414,12 @@ Address: %4
         <translation>Choose the default subdivision unit to show in the interface and when sending coins.</translation>
     </message>
     <message>
-        <location line="-240"/>
+        <location line="-253"/>
         <source>Whether to show coin control features or not.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+402"/>
+        <location line="+415"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
@@ -1435,17 +1429,17 @@ Address: %4
         <translation>&amp;Cancel</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+71"/>
+        <location filename="../optionsdialog.cpp" line="+76"/>
         <source>default</source>
         <translation>default</translation>
     </message>
     <message>
-        <location line="+63"/>
+        <location line="+60"/>
         <source>none</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+82"/>
+        <location line="+76"/>
         <source>Confirm options reset</source>
         <translation>Confirm options reset</translation>
     </message>
@@ -1466,7 +1460,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+34"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>The supplied proxy address is invalid.</translation>
     </message>
@@ -2268,7 +2262,7 @@ Address: %4
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="+26"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation type="unfinished">Date</translation>
     </message>
@@ -2307,7 +2301,7 @@ Address: %4
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+447"/>
+        <location filename="../sendcoinsdialog.cpp" line="+529"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
@@ -2377,7 +2371,98 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+164"/>
+        <location line="+206"/>
+        <source>Transaction Fee:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Choose...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>collapse fee-settings</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Minimize</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+78"/>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>per kilobyte</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 satoshis in fee, while &quot;total at least&quot; pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>total at least</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>(read the tooltip)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>Recommended:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+30"/>
+        <source>Custom:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+52"/>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+29"/>
+        <source>Confirmation time:</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+60"/>
+        <source>normal</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+20"/>
+        <source>fast</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>(confirmation may take longer)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+110"/>
         <source>Send to multiple recipients at once</source>
         <translation>Send to multiple recipients at once</translation>
     </message>
@@ -2392,12 +2477,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-274"/>
+        <location line="-858"/>
         <source>Dust:</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+277"/>
+        <location line="+861"/>
         <source>Clear &amp;All</source>
         <translation>Clear &amp;All</translation>
     </message>
@@ -2417,12 +2502,12 @@ Address: %4
         <translation>S&amp;end</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-215"/>
+        <location filename="../sendcoinsdialog.cpp" line="-221"/>
         <source>Confirm send coins</source>
         <translation>Confirm send coins</translation>
     </message>
     <message>
-        <location line="-74"/>
+        <location line="-77"/>
         <location line="+5"/>
         <location line="+5"/>
         <location line="+4"/>
@@ -2430,7 +2515,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-192"/>
         <source>Copy quantity</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2465,7 +2550,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+171"/>
+        <location line="+244"/>
         <source>Total Amount %1 (= %2)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2475,7 +2560,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+189"/>
+        <location line="+192"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>The recipient address is not valid, please recheck.</translation>
     </message>
@@ -2510,7 +2595,22 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+113"/>
+        <location line="+4"/>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+87"/>
+        <source>Pay only the minimum fee of %1</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+107"/>
         <source>Warning: Invalid Bitcoin address</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2525,12 +2625,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-504"/>
+        <location line="-687"/>
         <source>Copy dust</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+151"/>
+        <location line="+221"/>
         <source>Are you sure you want to send?</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3087,7 +3187,7 @@ Address: %4
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="+235"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
@@ -3102,7 +3202,7 @@ Address: %4
         <translation>Address</translation>
     </message>
     <message>
-        <location line="+76"/>
+        <location line="+79"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3418,7 +3518,7 @@ Address: %4
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="+280"/>
+        <location filename="../walletmodel.cpp" line="+276"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
@@ -3436,7 +3536,7 @@ Address: %4
         <translation>Export the data in the current tab to a file</translation>
     </message>
     <message>
-        <location line="+184"/>
+        <location line="+187"/>
         <source>Backup Wallet</source>
         <translation>Backup Wallet</translation>
     </message>
@@ -3469,27 +3569,27 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+236"/>
+        <location filename="../bitcoinstrings.cpp" line="+239"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location line="+30"/>
+        <location line="+31"/>
         <source>Specify data directory</source>
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location line="-90"/>
+        <location line="-91"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+93"/>
+        <location line="+94"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="-108"/>
+        <location line="-109"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
@@ -3499,17 +3599,17 @@ Address: %4
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
     <message>
-        <location line="+35"/>
+        <location line="+36"/>
         <source>Use the test network</source>
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location line="-124"/>
+        <location line="-125"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location line="-150"/>
+        <location line="-153"/>
         <source>%s, you must set a rpcpassword in the configuration file:
 %s
 It is recommended you use the following random password:
@@ -3569,7 +3669,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+20"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3744,7 +3844,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3794,12 +3894,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
     <message>
-        <location line="-91"/>
+        <location line="-92"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-179"/>
+        <location line="-182"/>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3864,7 +3964,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="+19"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3874,7 +3979,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+5"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4003,6 +4113,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Send trace/debug info to console instead of debug.log file</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
@@ -4094,27 +4209,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>
     <message>
-        <location line="-63"/>
+        <location line="-64"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-157"/>
+        <location line="-160"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+202"/>
+        <location line="+206"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
     <message>
-        <location line="-34"/>
+        <location line="-35"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescan the block chain for missing wallet transactions</translation>
     </message>
     <message>
-        <location line="+35"/>
+        <location line="+36"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Use OpenSSL (https) for JSON-RPC connections</translation>
     </message>
@@ -4124,7 +4239,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="-107"/>
+        <location line="-108"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
@@ -4139,7 +4254,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location line="-167"/>
+        <location line="-170"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4169,7 +4284,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+6"/>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4179,12 +4294,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+13"/>
+        <location line="+23"/>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4299,7 +4409,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+4"/>
         <source>Server certificate file (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4364,7 +4474,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-111"/>
+        <location line="-112"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4424,12 +4534,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+90"/>
+        <location line="+91"/>
         <source>To use the %s option</source>
         <translation>To use the %s option</translation>
     </message>
     <message>
-        <location line="-82"/>
+        <location line="-83"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>

From fa94b9d5623cfd16aa594c28432f25a17b0efb0e Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Fri, 31 Oct 2014 08:43:19 +0800
Subject: [PATCH 1096/1819] Convert remaining comments in /src to doxygen
 format

- Update comments in checkpoints to be doxygen compatible
- Update comments in checkqueue to be doxygen compatible
- Update coins to be doxygen compatible
- Fix comment typo in crypter.h
- Update licenses/copyright dates

Closes #5325 #5184 #5183 #5182
---
 src/base58.cpp       |   4 +-
 src/base58.h         |  24 ++++-----
 src/bloom.cpp        |  20 +++++---
 src/bloom.h          |  36 ++++++++------
 src/checkpoints.cpp  |  16 +++---
 src/checkpoints.h    |  13 ++---
 src/checkqueue.h     |  50 ++++++++++---------
 src/coins.cpp        |  14 +++---
 src/coins.h          | 115 ++++++++++++++++++++++++-------------------
 src/compressor.h     |  22 +++++----
 src/crypter.h        |  49 +++++++++---------
 src/db.h             |   8 +--
 src/ecwrapper.cpp    |   8 +--
 src/ecwrapper.h      |  12 +++--
 src/leveldbwrapper.h |  20 ++++----
 src/timedata.cpp     |  17 +++----
 src/timedata.h       |   7 +--
 src/txdb.h           |  10 ++--
 src/uint256.h        |  49 +++++++++---------
 19 files changed, 269 insertions(+), 225 deletions(-)

diff --git a/src/base58.cpp b/src/base58.cpp
index d94db2c51b12..c594993ea095 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
@@ -15,7 +15,7 @@
 #include <boost/variant/apply_visitor.hpp>
 #include <boost/variant/static_visitor.hpp>
 
-/* All alphanumeric characters except for "0", "I", "O", and "l" */
+/** All alphanumeric characters except for "0", "I", "O", and "l" */
 static const char* pszBase58 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
 
 bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
diff --git a/src/base58.h b/src/base58.h
index 7cd2d651a18a..c4cb96814cc4 100644
--- a/src/base58.h
+++ b/src/base58.h
@@ -1,16 +1,16 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-//
-// Why base-58 instead of standard base-64 encoding?
-// - Don't want 0OIl characters that look the same in some fonts and
-//      could be used to create visually identical looking account numbers.
-// - A string with non-alphanumeric characters is not as easily accepted as an account number.
-// - E-mail usually won't line-break if there's no punctuation to break at.
-// - Double-clicking selects the whole number as one word if it's all alphanumeric.
-//
+/**
+ * Why base-58 instead of standard base-64 encoding?
+ * - Don't want 0OIl characters that look the same in some fonts and
+ *      could be used to create visually identical looking account numbers.
+ * - A string with non-alphanumeric characters is not as easily accepted as an account number.
+ * - E-mail usually won't line-break if there's no punctuation to break at.
+ * - Double-clicking selects the whole number as one word if it's all alphanumeric.
+ */
 #ifndef BITCOIN_BASE58_H
 #define BITCOIN_BASE58_H
 
@@ -70,10 +70,10 @@ inline bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>
 class CBase58Data
 {
 protected:
-    // the version byte(s)
+    //! the version byte(s)
     std::vector<unsigned char> vchVersion;
 
-    // the actually encoded data
+    //! the actually encoded data
     typedef std::vector<unsigned char, zero_after_free_allocator<unsigned char> > vector_uchar;
     vector_uchar vchData;
 
diff --git a/src/bloom.cpp b/src/bloom.cpp
index df8cedaf6afe..07b8f2c0ae08 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "bloom.h"
@@ -21,13 +21,17 @@
 using namespace std;
 
 CBloomFilter::CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweakIn, unsigned char nFlagsIn) :
-// The ideal size for a bloom filter with a given number of elements and false positive rate is:
-// - nElements * log(fp rate) / ln(2)^2
-// We ignore filter parameters which will create a bloom filter larger than the protocol limits
+/**
+ * The ideal size for a bloom filter with a given number of elements and false positive rate is:
+ * - nElements * log(fp rate) / ln(2)^2
+ * We ignore filter parameters which will create a bloom filter larger than the protocol limits
+ */
 vData(min((unsigned int)(-1  / LN2SQUARED * nElements * log(nFPRate)), MAX_BLOOM_FILTER_SIZE * 8) / 8),
-// The ideal number of hash functions is filter size * ln(2) / number of elements
-// Again, we ignore filter parameters which will create a bloom filter with more hash functions than the protocol limits
-// See http://en.wikipedia.org/wiki/Bloom_filter for an explanation of these formulas
+/**
+ * The ideal number of hash functions is filter size * ln(2) / number of elements
+ * Again, we ignore filter parameters which will create a bloom filter with more hash functions than the protocol limits
+ * See https://en.wikipedia.org/wiki/Bloom_filter for an explanation of these formulas
+ */
 isFull(false),
 isEmpty(false),
 nHashFuncs(min((unsigned int)(vData.size() * 8 / nElements * LN2), MAX_HASH_FUNCS)),
diff --git a/src/bloom.h b/src/bloom.h
index 143e3b4c79f8..f54922edb984 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_BLOOM_H
@@ -13,12 +13,14 @@ class COutPoint;
 class CTransaction;
 class uint256;
 
-// 20,000 items with fp rate < 0.1% or 10,000 items and <0.0001%
+//! 20,000 items with fp rate < 0.1% or 10,000 items and <0.0001%
 static const unsigned int MAX_BLOOM_FILTER_SIZE = 36000; // bytes
 static const unsigned int MAX_HASH_FUNCS = 50;
 
-// First two bits of nFlags control how much IsRelevantAndUpdate actually updates
-// The remaining bits are reserved
+/**
+ * First two bits of nFlags control how much IsRelevantAndUpdate actually updates
+ * The remaining bits are reserved
+ */
 enum bloomflags
 {
     BLOOM_UPDATE_NONE = 0,
@@ -52,13 +54,15 @@ class CBloomFilter
     unsigned int Hash(unsigned int nHashNum, const std::vector<unsigned char>& vDataToHash) const;
 
 public:
-    // Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements
-    // Note that if the given parameters will result in a filter outside the bounds of the protocol limits,
-    // the filter created will be as close to the given parameters as possible within the protocol limits.
-    // This will apply if nFPRate is very low or nElements is unreasonably high.
-    // nTweak is a constant which is added to the seed value passed to the hash function
-    // It should generally always be a random value (and is largely only exposed for unit testing)
-    // nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)
+    /**
+     * Creates a new bloom filter which will provide the given fp rate when filled with the given number of elements
+     * Note that if the given parameters will result in a filter outside the bounds of the protocol limits,
+     * the filter created will be as close to the given parameters as possible within the protocol limits.
+     * This will apply if nFPRate is very low or nElements is unreasonably high.
+     * nTweak is a constant which is added to the seed value passed to the hash function
+     * It should generally always be a random value (and is largely only exposed for unit testing)
+     * nFlags should be one of the BLOOM_UPDATE_* enums (not _MASK)
+     */
     CBloomFilter(unsigned int nElements, double nFPRate, unsigned int nTweak, unsigned char nFlagsIn);
     CBloomFilter() : isFull(true), isEmpty(false), nHashFuncs(0), nTweak(0), nFlags(0) {}
 
@@ -82,14 +86,14 @@ class CBloomFilter
 
     void clear();
 
-    // True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
-    // (catch a filter which was just deserialized which was too big)
+    //! True if the size is <= MAX_BLOOM_FILTER_SIZE and the number of hash functions is <= MAX_HASH_FUNCS
+    //! (catch a filter which was just deserialized which was too big)
     bool IsWithinSizeConstraints() const;
 
-    // Also adds any outputs which match the filter to the filter (to match their spending txes)
+    //! Also adds any outputs which match the filter to the filter (to match their spending txes)
     bool IsRelevantAndUpdate(const CTransaction& tx);
 
-    // Checks for empty and full filters to avoid wasting cpu
+    //! Checks for empty and full filters to avoid wasting cpu
     void UpdateEmptyFull();
 };
 
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index fbde47339d9c..0fb4411e6334 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "checkpoints.h"
@@ -14,11 +14,13 @@
 
 namespace Checkpoints {
 
-    // How many times we expect transactions after the last checkpoint to
-    // be slower. This number is a compromise, as it can't be accurate for
-    // every system. When reindexing from a fast disk with a slow CPU, it
-    // can be up to 20, while when downloading from a slow network with a
-    // fast multicore CPU, it won't be much higher than 1.
+    /**
+     * How many times we expect transactions after the last checkpoint to
+     * be slower. This number is a compromise, as it can't be accurate for
+     * every system. When reindexing from a fast disk with a slow CPU, it
+     * can be up to 20, while when downloading from a slow network with a
+     * fast multicore CPU, it won't be much higher than 1.
+     */
     static const double SIGCHECK_VERIFICATION_FACTOR = 5.0;
 
     bool fEnabled = true;
@@ -35,7 +37,7 @@ namespace Checkpoints {
         return hash == i->second;
     }
 
-    // Guess how far we are in the verification process at the given block index
+    //! Guess how far we are in the verification process at the given block index
     double GuessVerificationProgress(CBlockIndex *pindex, bool fSigchecks) {
         if (pindex==NULL)
             return 0.0;
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 847524a9f2fe..65c5165f0f0e 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CHECKPOINTS_H
@@ -11,7 +11,8 @@
 
 class CBlockIndex;
 
-/** Block-chain checkpoints are compiled-in sanity checks.
+/** 
+ * Block-chain checkpoints are compiled-in sanity checks.
  * They are updated every release or three.
  */
 namespace Checkpoints
@@ -25,13 +26,13 @@ struct CCheckpointData {
     double fTransactionsPerDay;
 };
 
-// Returns true if block passes checkpoint checks
+//! Returns true if block passes checkpoint checks
 bool CheckBlock(int nHeight, const uint256& hash);
 
-// Return conservative estimate of total number of blocks, 0 if unknown
+//! Return conservative estimate of total number of blocks, 0 if unknown
 int GetTotalBlocksEstimate();
 
-// Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
+//! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
 CBlockIndex* GetLastCheckpoint();
 
 double GuessVerificationProgress(CBlockIndex* pindex, bool fSigchecks = true);
diff --git a/src/checkqueue.h b/src/checkqueue.h
index afecfeede51b..2ee46a1210ac 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2012 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_CHECKQUEUE_H
@@ -16,7 +16,8 @@
 template <typename T>
 class CCheckQueueControl;
 
-/** Queue for verifications that have to be performed.
+/** 
+ * Queue for verifications that have to be performed.
   * The verifications are represented by a type T, which must provide an
   * operator(), returning a bool.
   *
@@ -29,40 +30,42 @@ template <typename T>
 class CCheckQueue
 {
 private:
-    // Mutex to protect the inner state
+    //! Mutex to protect the inner state
     boost::mutex mutex;
 
-    // Worker threads block on this when out of work
+    //! Worker threads block on this when out of work
     boost::condition_variable condWorker;
 
-    // Master thread blocks on this when out of work
+    //! Master thread blocks on this when out of work
     boost::condition_variable condMaster;
 
-    // The queue of elements to be processed.
-    // As the order of booleans doesn't matter, it is used as a LIFO (stack)
+    //! The queue of elements to be processed.
+    //! As the order of booleans doesn't matter, it is used as a LIFO (stack)
     std::vector<T> queue;
 
-    // The number of workers (including the master) that are idle.
+    //! The number of workers (including the master) that are idle.
     int nIdle;
 
-    // The total number of workers (including the master).
+    //! The total number of workers (including the master).
     int nTotal;
 
-    // The temporary evaluation result.
+    //! The temporary evaluation result.
     bool fAllOk;
 
-    // Number of verifications that haven't completed yet.
-    // This includes elements that are not anymore in queue, but still in
-    // worker's own batches.
+    /**
+     * Number of verifications that haven't completed yet.
+     * This includes elements that are not anymore in queue, but still in
+     * worker's own batches.
+     */
     unsigned int nTodo;
 
-    // Whether we're shutting down.
+    //! Whether we're shutting down.
     bool fQuit;
 
-    // The maximum number of elements to be processed in one batch
+    //! The maximum number of elements to be processed in one batch
     unsigned int nBatchSize;
 
-    // Internal function that does bulk of the verification work.
+    /** Internal function that does bulk of the verification work. */
     bool Loop(bool fMaster = false)
     {
         boost::condition_variable& cond = fMaster ? condMaster : condWorker;
@@ -124,22 +127,22 @@ class CCheckQueue
     }
 
 public:
-    // Create a new check queue
+    //! Create a new check queue
     CCheckQueue(unsigned int nBatchSizeIn) : nIdle(0), nTotal(0), fAllOk(true), nTodo(0), fQuit(false), nBatchSize(nBatchSizeIn) {}
 
-    // Worker thread
+    //! Worker thread
     void Thread()
     {
         Loop();
     }
 
-    // Wait until execution finishes, and return whether all evaluations where succesful.
+    //! Wait until execution finishes, and return whether all evaluations where successful.
     bool Wait()
     {
         return Loop(true);
     }
 
-    // Add a batch of checks to the queue
+    //! Add a batch of checks to the queue
     void Add(std::vector<T>& vChecks)
     {
         boost::unique_lock<boost::mutex> lock(mutex);
@@ -161,8 +164,9 @@ class CCheckQueue
     friend class CCheckQueueControl<T>;
 };
 
-/** RAII-style controller object for a CCheckQueue that guarantees the passed
- *  queue is finished before continuing.
+/** 
+ * RAII-style controller object for a CCheckQueue that guarantees the passed
+ * queue is finished before continuing.
  */
 template <typename T>
 class CCheckQueueControl
diff --git a/src/coins.cpp b/src/coins.cpp
index e4f3e67aeb67..c2e802c95364 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2012-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "coins.h"
@@ -8,9 +8,11 @@
 
 #include <assert.h>
 
-// calculate number of bytes for the bitmask, and its number of non-zero bytes
-// each bit in the bitmask represents the availability of one output, but the
-// availabilities of the first two outputs are encoded separately
+/**
+ * calculate number of bytes for the bitmask, and its number of non-zero bytes
+ * each bit in the bitmask represents the availability of one output, but the
+ * availabilities of the first two outputs are encoded separately
+ */
 void CCoins::CalcMaskSize(unsigned int &nBytes, unsigned int &nNonzeroBytes) const {
     unsigned int nLastUsedByte = 0;
     for (unsigned int b = 0; 2+b*8 < vout.size(); b++) {
@@ -133,7 +135,7 @@ const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
 bool CCoinsViewCache::HaveCoins(const uint256 &txid) const {
     CCoinsMap::const_iterator it = FetchCoins(txid);
     // We're using vtx.empty() instead of IsPruned here for performance reasons,
-    // as we only care about the case where an transaction was replaced entirely
+    // as we only care about the case where a transaction was replaced entirely
     // in a reorganization (which wipes vout entirely, as opposed to spending
     // which just cleans individual outputs).
     return (it != cacheCoins.end() && !it->second.coins.vout.empty());
diff --git a/src/coins.h b/src/coins.h
index ee9051562bf4..dbe3f8bd3168 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_COINS_H
@@ -17,7 +17,8 @@
 #include <boost/foreach.hpp>
 #include <boost/unordered_map.hpp>
 
-/** pruned version of CTransaction: only retains metadata and unspent transaction outputs
+/** 
+ * Pruned version of CTransaction: only retains metadata and unspent transaction outputs
  *
  * Serialized format:
  * - VARINT(nVersion)
@@ -71,17 +72,17 @@
 class CCoins
 {
 public:
-    // whether transaction is a coinbase
+    //! whether transaction is a coinbase
     bool fCoinBase;
 
-    // unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are dropped
+    //! unspent transaction outputs; spent outputs are .IsNull(); spent outputs at the end of the array are dropped
     std::vector<CTxOut> vout;
 
-    // at which height this transaction was included in the active block chain
+    //! at which height this transaction was included in the active block chain
     int nHeight;
 
-    // version of the CTransaction; accesses to this value should probably check for nHeight as well,
-    // as new tx version will probably only be introduced at certain heights
+    //! version of the CTransaction; accesses to this value should probably check for nHeight as well,
+    //! as new tx version will probably only be introduced at certain heights
     int nVersion;
 
     void FromTx(const CTransaction &tx, int nHeightIn) {
@@ -92,7 +93,7 @@ class CCoins
         ClearUnspendable();
     }
 
-    // construct a CCoins from a CTransaction, at a given height
+    //! construct a CCoins from a CTransaction, at a given height
     CCoins(const CTransaction &tx, int nHeightIn) {
         FromTx(tx, nHeightIn);
     }
@@ -104,10 +105,10 @@ class CCoins
         nVersion = 0;
     }
 
-    // empty constructor
+    //! empty constructor
     CCoins() : fCoinBase(false), vout(0), nHeight(0), nVersion(0) { }
 
-    // remove spent outputs at the end of vout
+    //!remove spent outputs at the end of vout
     void Cleanup() {
         while (vout.size() > 0 && vout.back().IsNull())
             vout.pop_back();
@@ -130,7 +131,7 @@ class CCoins
         std::swap(to.nVersion, nVersion);
     }
 
-    // equality test
+    //! equality test
     friend bool operator==(const CCoins &a, const CCoins &b) {
          // Empty CCoins objects are always equal.
          if (a.IsPruned() && b.IsPruned())
@@ -236,19 +237,19 @@ class CCoins
         Cleanup();
     }
 
-    // mark an outpoint spent, and construct undo information
+    //! mark an outpoint spent, and construct undo information
     bool Spend(const COutPoint &out, CTxInUndo &undo);
 
-    // mark a vout spent
+    //! mark a vout spent
     bool Spend(int nPos);
 
-    // check whether a particular output is still available
+    //! check whether a particular output is still available
     bool IsAvailable(unsigned int nPos) const {
         return (nPos < vout.size() && !vout[nPos].IsNull());
     }
 
-    // check whether the entire CCoins is spent
-    // note that only !IsPruned() CCoins can be serialized
+    //! check whether the entire CCoins is spent
+    //! note that only !IsPruned() CCoins can be serialized
     bool IsPruned() const {
         BOOST_FOREACH(const CTxOut &out, vout)
             if (!out.IsNull())
@@ -264,9 +265,12 @@ class CCoinsKeyHasher
 
 public:
     CCoinsKeyHasher();
-    // This *must* return size_t. With Boost 1.46 on 32-bit systems the
-    // unordered_map will behave unpredictably if the custom hasher returns a
-    // uint64_t, resulting in failures when syncing the chain (#4634).
+
+    /**
+     * This *must* return size_t. With Boost 1.46 on 32-bit systems the
+     * unordered_map will behave unpredictably if the custom hasher returns a
+     * uint64_t, resulting in failures when syncing the chain (#4634).
+     */
     size_t operator()(const uint256& key) const {
         return key.GetHash(salt);
     }
@@ -305,24 +309,24 @@ struct CCoinsStats
 class CCoinsView
 {
 public:
-    // Retrieve the CCoins (unspent transaction outputs) for a given txid
+    //! Retrieve the CCoins (unspent transaction outputs) for a given txid
     virtual bool GetCoins(const uint256 &txid, CCoins &coins) const;
 
-    // Just check whether we have data for a given txid.
-    // This may (but cannot always) return true for fully spent transactions
+    //! Just check whether we have data for a given txid.
+    //! This may (but cannot always) return true for fully spent transactions
     virtual bool HaveCoins(const uint256 &txid) const;
 
-    // Retrieve the block hash whose state this CCoinsView currently represents
+    //! Retrieve the block hash whose state this CCoinsView currently represents
     virtual uint256 GetBestBlock() const;
 
-    // Do a bulk modification (multiple CCoins changes + BestBlock change).
-    // The passed mapCoins can be modified.
+    //! Do a bulk modification (multiple CCoins changes + BestBlock change).
+    //! The passed mapCoins can be modified.
     virtual bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
-    // Calculate statistics about the unspent transaction output set
+    //! Calculate statistics about the unspent transaction output set
     virtual bool GetStats(CCoinsStats &stats) const;
 
-    // As we use CCoinsViews polymorphically, have a virtual destructor
+    //! As we use CCoinsViews polymorphically, have a virtual destructor
     virtual ~CCoinsView() {}
 };
 
@@ -346,9 +350,11 @@ class CCoinsViewBacked : public CCoinsView
 
 class CCoinsViewCache;
 
-/** A reference to a mutable cache entry. Encapsulating it allows us to run
+/** 
+ * A reference to a mutable cache entry. Encapsulating it allows us to run
  *  cleanup code after the modification is finished, and keeping track of
- *  concurrent modifications. */
+ *  concurrent modifications. 
+ */
 class CCoinsModifier
 {
 private:
@@ -370,8 +376,10 @@ class CCoinsViewCache : public CCoinsViewBacked
     /* Whether this cache has an active modifier. */
     bool hasModifier;
 
-    /* Make mutable so that we can "fill the cache" even from Get-methods
-       declared as "const".  */
+    /**
+     * Make mutable so that we can "fill the cache" even from Get-methods
+     * declared as "const".  
+     */
     mutable uint256 hashBlock;
     mutable CCoinsMap cacheCoins;
 
@@ -386,37 +394,44 @@ class CCoinsViewCache : public CCoinsViewBacked
     void SetBestBlock(const uint256 &hashBlock);
     bool BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlock);
 
-    // Return a pointer to CCoins in the cache, or NULL if not found. This is
-    // more efficient than GetCoins. Modifications to other cache entries are
-    // allowed while accessing the returned pointer.
+    /**
+     * Return a pointer to CCoins in the cache, or NULL if not found. This is
+     * more efficient than GetCoins. Modifications to other cache entries are
+     * allowed while accessing the returned pointer.
+     */
     const CCoins* AccessCoins(const uint256 &txid) const;
 
-    // Return a modifiable reference to a CCoins. If no entry with the given
-    // txid exists, a new one is created. Simultaneous modifications are not
-    // allowed.
+    /**
+     * Return a modifiable reference to a CCoins. If no entry with the given
+     * txid exists, a new one is created. Simultaneous modifications are not
+     * allowed.
+     */
     CCoinsModifier ModifyCoins(const uint256 &txid);
 
-    // Push the modifications applied to this cache to its base.
-    // Failure to call this method before destruction will cause the changes to be forgotten.
-    // If false is returned, the state of this cache (and its backing view) will be undefined.
+    /**
+     * Push the modifications applied to this cache to its base.
+     * Failure to call this method before destruction will cause the changes to be forgotten.
+     * If false is returned, the state of this cache (and its backing view) will be undefined.
+     */
     bool Flush();
 
-    // Calculate the size of the cache (in number of transactions)
+    //! Calculate the size of the cache (in number of transactions)
     unsigned int GetCacheSize() const;
 
-    /** Amount of bitcoins coming in to a transaction
-        Note that lightweight clients may not know anything besides the hash of previous transactions,
-        so may not be able to calculate this.
-
-        @param[in] tx	transaction for which we are checking input total
-        @return	Sum of value of all inputs (scriptSigs)
+    /** 
+     * Amount of bitcoins coming in to a transaction
+     * Note that lightweight clients may not know anything besides the hash of previous transactions,
+     * so may not be able to calculate this.
+     *
+     * @param[in] tx	transaction for which we are checking input total
+     * @return	Sum of value of all inputs (scriptSigs)
      */
     CAmount GetValueIn(const CTransaction& tx) const;
 
-    // Check whether all prevouts of the transaction are present in the UTXO set represented by this view
+    //! Check whether all prevouts of the transaction are present in the UTXO set represented by this view
     bool HaveInputs(const CTransaction& tx) const;
 
-    // Return priority of tx at height nHeight
+    //! Return priority of tx at height nHeight
     double GetPriority(const CTransaction &tx, int nHeight) const;
 
     const CTxOut &GetOutputFor(const CTxIn& input) const;
diff --git a/src/compressor.h b/src/compressor.h
index 226be620e83f..d9cde5de7afa 100644
--- a/src/compressor.h
+++ b/src/compressor.h
@@ -28,19 +28,23 @@ class CScriptID;
 class CScriptCompressor
 {
 private:
-    // make this static for now (there are only 6 special scripts defined)
-    // this can potentially be extended together with a new nVersion for
-    // transactions, in which case this value becomes dependent on nVersion
-    // and nHeight of the enclosing transaction.
+    /**
+     * make this static for now (there are only 6 special scripts defined)
+     * this can potentially be extended together with a new nVersion for
+     * transactions, in which case this value becomes dependent on nVersion
+     * and nHeight of the enclosing transaction.
+     */
     static const unsigned int nSpecialScripts = 6;
 
     CScript &script;
 protected:
-    // These check for scripts for which a special case with a shorter encoding is defined.
-    // They are implemented separately from the CScript test, as these test for exact byte
-    // sequence correspondences, and are more strict. For example, IsToPubKey also verifies
-    // whether the public key is valid (as invalid ones cannot be represented in compressed
-    // form).
+    /**
+     * These check for scripts for which a special case with a shorter encoding is defined.
+     * They are implemented separately from the CScript test, as these test for exact byte
+     * sequence correspondences, and are more strict. For example, IsToPubKey also verifies
+     * whether the public key is valid (as invalid ones cannot be represented in compressed
+     * form).
+     */
     bool IsToKeyID(CKeyID &hash) const;
     bool IsToScriptID(CScriptID &hash) const;
     bool IsToPubKey(CPubKey &pubkey) const;
diff --git a/src/crypter.h b/src/crypter.h
index b589987c4f4f..f7018cfdbea8 100644
--- a/src/crypter.h
+++ b/src/crypter.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2013 The Bitcoin developers
+// Copyright (c) 2009-2014 The Bitcoin developers
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
@@ -14,20 +14,20 @@ class uint256;
 const unsigned int WALLET_CRYPTO_KEY_SIZE = 32;
 const unsigned int WALLET_CRYPTO_SALT_SIZE = 8;
 
-/*
-Private key encryption is done based on a CMasterKey,
-which holds a salt and random encryption key.
-
-CMasterKeys are encrypted using AES-256-CBC using a key
-derived using derivation method nDerivationMethod
-(0 == EVP_sha512()) and derivation iterations nDeriveIterations.
-vchOtherDerivationParameters is provided for alternative algorithms
-which may require more parameters (such as scrypt).
-
-Wallet Private Keys are then encrypted using AES-256-CBC
-with the double-sha256 of the public key as the IV, and the
-master key's key as the encryption key (see keystore.[ch]).
-*/
+/**
+ * Private key encryption is done based on a CMasterKey,
+ * which holds a salt and random encryption key.
+ * 
+ * CMasterKeys are encrypted using AES-256-CBC using a key
+ * derived using derivation method nDerivationMethod
+ * (0 == EVP_sha512()) and derivation iterations nDeriveIterations.
+ * vchOtherDerivationParameters is provided for alternative algorithms
+ * which may require more parameters (such as scrypt).
+ * 
+ * Wallet Private Keys are then encrypted using AES-256-CBC
+ * with the double-sha256 of the public key as the IV, and the
+ * master key's key as the encryption key (see keystore.[ch]).
+ */
 
 /** Master key for wallet encryption */
 class CMasterKey
@@ -35,12 +35,12 @@ class CMasterKey
 public:
     std::vector<unsigned char> vchCryptedKey;
     std::vector<unsigned char> vchSalt;
-    // 0 = EVP_sha512()
-    // 1 = scrypt()
+    //! 0 = EVP_sha512()
+    //! 1 = scrypt()
     unsigned int nDerivationMethod;
     unsigned int nDeriveIterations;
-    // Use this for more parameters to key derivation,
-    // such as the various parameters to scrypt
+    //! Use this for more parameters to key derivation,
+    //! such as the various parameters to scrypt
     std::vector<unsigned char> vchOtherDerivationParameters;
 
     ADD_SERIALIZE_METHODS;
@@ -120,17 +120,17 @@ class CCryptoKeyStore : public CBasicKeyStore
 
     CKeyingMaterial vMasterKey;
 
-    // if fUseCrypto is true, mapKeys must be empty
-    // if fUseCrypto is false, vMasterKey must be empty
+    //! if fUseCrypto is true, mapKeys must be empty
+    //! if fUseCrypto is false, vMasterKey must be empty
     bool fUseCrypto;
 
-    // keeps track of whether Unlock has run a thourough check before
+    //! keeps track of whether Unlock has run a thorough check before
     bool fDecryptionThoroughlyChecked;
 
 protected:
     bool SetCrypted();
 
-    // will encrypt previously unencrypted keys
+    //! will encrypt previously unencrypted keys
     bool EncryptKeys(CKeyingMaterial& vMasterKeyIn);
 
     bool Unlock(const CKeyingMaterial& vMasterKeyIn);
@@ -189,7 +189,8 @@ class CCryptoKeyStore : public CBasicKeyStore
         }
     }
 
-    /* Wallet status (encrypted, locked) changed.
+    /**
+     * Wallet status (encrypted, locked) changed.
      * Note: Called without locks held.
      */
     boost::signals2::signal<void (CCryptoKeyStore* wallet)> NotifyStatusChanged;
diff --git a/src/db.h b/src/db.h
index 85ffbae1cb43..1c572d8970d7 100644
--- a/src/db.h
+++ b/src/db.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_DB_H
@@ -50,7 +50,7 @@ class CDBEnv
     void MakeMock();
     bool IsMock() { return fMockDb; }
 
-    /*
+    /**
      * Verify that database file strFile is OK. If it is not,
      * call the callback to try to recover.
      * This must be called BEFORE strFile is opened.
@@ -60,7 +60,7 @@ class CDBEnv
                         RECOVER_OK,
                         RECOVER_FAIL };
     VerifyResult Verify(std::string strFile, bool (*recoverFunc)(CDBEnv& dbenv, std::string strFile));
-    /*
+    /**
      * Salvage data from a file that Verify says is bad.
      * fAggressive sets the DB_AGGRESSIVE flag (see berkeley DB->verify() method documentation).
      * Appends binary key/value pairs to vResult, returns true if successful.
diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index 68cdbf2eda86..5ce7e6129469 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -13,9 +13,11 @@
 
 namespace {
 
-// Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
-// recid selects which key is recovered
-// if check is non-zero, additional checks are performed
+/**
+ * Perform ECDSA key recovery (see SEC1 4.1.6) for curves over (mod p)-fields
+ * recid selects which key is recovered
+ * if check is non-zero, additional checks are performed
+ */
 int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check)
 {
     if (!eckey) return 0;
diff --git a/src/ecwrapper.h b/src/ecwrapper.h
index 30c3db79317f..4efde516507b 100644
--- a/src/ecwrapper.h
+++ b/src/ecwrapper.h
@@ -12,7 +12,7 @@
 
 class uint256;
 
-// RAII Wrapper around OpenSSL's EC_KEY
+/** RAII Wrapper around OpenSSL's EC_KEY */
 class CECKey {
 private:
     EC_KEY *pkey;
@@ -25,10 +25,12 @@ class CECKey {
     bool SetPubKey(const unsigned char* pubkey, size_t size);
     bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig);
 
-    // reconstruct public key from a compact signature
-    // This is only slightly more CPU intensive than just verifying it.
-    // If this function succeeds, the recovered public key is guaranteed to be valid
-    // (the signature is a valid signature of the given data for that key)
+    /**
+     * reconstruct public key from a compact signature
+     * This is only slightly more CPU intensive than just verifying it.
+     * If this function succeeds, the recovered public key is guaranteed to be valid
+     * (the signature is a valid signature of the given data for that key)
+     */
     bool Recover(const uint256 &hash, const unsigned char *p64, int rec);
 
     bool TweakPublic(const unsigned char vchTweak[32]);
diff --git a/src/leveldbwrapper.h b/src/leveldbwrapper.h
index 10b7a2427c81..42479206c89a 100644
--- a/src/leveldbwrapper.h
+++ b/src/leveldbwrapper.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2012-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2012-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_LEVELDBWRAPPER_H
@@ -24,7 +24,7 @@ class leveldb_error : public std::runtime_error
 
 void HandleError(const leveldb::Status& status) throw(leveldb_error);
 
-// Batch of changes queued to be written to a CLevelDBWrapper
+/** Batch of changes queued to be written to a CLevelDBWrapper */
 class CLevelDBBatch
 {
     friend class CLevelDBWrapper;
@@ -64,25 +64,25 @@ class CLevelDBBatch
 class CLevelDBWrapper
 {
 private:
-    // custom environment this database is using (may be NULL in case of default environment)
+    //! custom environment this database is using (may be NULL in case of default environment)
     leveldb::Env* penv;
 
-    // database options used
+    //! database options used
     leveldb::Options options;
 
-    // options used when reading from the database
+    //! options used when reading from the database
     leveldb::ReadOptions readoptions;
 
-    // options used when iterating over values of the database
+    //! options used when iterating over values of the database
     leveldb::ReadOptions iteroptions;
 
-    // options used when writing to the database
+    //! options used when writing to the database
     leveldb::WriteOptions writeoptions;
 
-    // options used when sync writing to the database
+    //! options used when sync writing to the database
     leveldb::WriteOptions syncoptions;
 
-    // the database itself
+    //! the database itself
     leveldb::DB* pdb;
 
 public:
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 40cdb33f7a8f..59f7778db172 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "timedata.h"
@@ -17,14 +17,13 @@ using namespace std;
 static CCriticalSection cs_nTimeOffset;
 static int64_t nTimeOffset = 0;
 
-//
-// "Never go to sea with two chronometers; take one or three."
-// Our three time sources are:
-//  - System clock
-//  - Median of other nodes clocks
-//  - The user (asking the user to fix the system clock if the first two disagree)
-//
-//
+/**
+ * "Never go to sea with two chronometers; take one or three."
+ * Our three time sources are:
+ *  - System clock
+ *  - Median of other nodes clocks
+ *  - The user (asking the user to fix the system clock if the first two disagree)
+ */
 int64_t GetTimeOffset()
 {
     LOCK(cs_nTimeOffset);
diff --git a/src/timedata.h b/src/timedata.h
index 2c20f4efd5e4..64595ffc37aa 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_TIMEDATA_H
@@ -12,7 +12,8 @@
 
 class CNetAddr;
 
-/** Median filter over a stream of values.
+/** 
+ * Median filter over a stream of values.
  * Returns the median of the last N numbers
  */
 template <typename T>
@@ -67,7 +68,7 @@ class CMedianFilter
     }
 };
 
-/* Functions to keep track of adjusted P2P time */
+/** Functions to keep track of adjusted P2P time */
 int64_t GetTimeOffset();
 int64_t GetAdjustedTime();
 void AddTimeData(const CNetAddr& ip, int64_t nTime);
diff --git a/src/txdb.h b/src/txdb.h
index 147c186990d3..9a98fcc41b7a 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_TXDB_H
@@ -17,11 +17,11 @@
 class CCoins;
 class uint256;
 
-// -dbcache default (MiB)
+//! -dbcache default (MiB)
 static const int64_t nDefaultDbCache = 100;
-// max. -dbcache in (MiB)
+//! max. -dbcache in (MiB)
 static const int64_t nMaxDbCache = sizeof(void*) > 4 ? 4096 : 1024;
-// min. -dbcache in (MiB)
+//! min. -dbcache in (MiB)
 static const int64_t nMinDbCache = 4;
 
 /** CCoinsView backed by the LevelDB coin database (chainstate/) */
diff --git a/src/uint256.h b/src/uint256.h
index 28de54022665..56f7f44a1622 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_UINT256_H
@@ -255,8 +255,10 @@ class base_uint
         return sizeof(pn);
     }
 
-    // Returns the position of the highest bit set plus one, or zero if the
-    // value is zero.
+    /**
+     * Returns the position of the highest bit set plus one, or zero if the
+     * value is zero.
+     */
     unsigned int bits() const;
 
     uint64_t GetLow64() const
@@ -301,26 +303,27 @@ class uint256 : public base_uint<256> {
     uint256(uint64_t b) : base_uint<256>(b) {}
     explicit uint256(const std::string& str) : base_uint<256>(str) {}
     explicit uint256(const std::vector<unsigned char>& vch) : base_uint<256>(vch) {}
-
-    // The "compact" format is a representation of a whole
-    // number N using an unsigned 32bit number similar to a
-    // floating point format.
-    // The most significant 8 bits are the unsigned exponent of base 256.
-    // This exponent can be thought of as "number of bytes of N".
-    // The lower 23 bits are the mantissa.
-    // Bit number 24 (0x800000) represents the sign of N.
-    // N = (-1^sign) * mantissa * 256^(exponent-3)
-    //
-    // Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().
-    // MPI uses the most significant bit of the first byte as sign.
-    // Thus 0x1234560000 is compact (0x05123456)
-    // and  0xc0de000000 is compact (0x0600c0de)
-    // (0x05c0de00) would be -0x40de000000
-    //
-    // Bitcoin only uses this "compact" format for encoding difficulty
-    // targets, which are unsigned 256bit quantities.  Thus, all the
-    // complexities of the sign bit and using base 256 are probably an
-    // implementation accident.
+    
+    /**
+     * The "compact" format is a representation of a whole
+     * number N using an unsigned 32bit number similar to a
+     * floating point format.
+     * The most significant 8 bits are the unsigned exponent of base 256.
+     * This exponent can be thought of as "number of bytes of N".
+     * The lower 23 bits are the mantissa.
+     * Bit number 24 (0x800000) represents the sign of N.
+     * N = (-1^sign) * mantissa * 256^(exponent-3)
+     * 
+     * Satoshi's original implementation used BN_bn2mpi() and BN_mpi2bn().
+     * MPI uses the most significant bit of the first byte as sign.
+     * Thus 0x1234560000 is compact (0x05123456)
+     * and  0xc0de000000 is compact (0x0600c0de)
+     * 
+     * Bitcoin only uses this "compact" format for encoding difficulty
+     * targets, which are unsigned 256bit quantities.  Thus, all the
+     * complexities of the sign bit and using base 256 are probably an
+     * implementation accident.
+     */
     uint256& SetCompact(uint32_t nCompact, bool *pfNegative = NULL, bool *pfOverflow = NULL);
     uint32_t GetCompact(bool fNegative = false) const;
 

From 1b2600a13ac5c57f6567ff3909cec4e22acd25bf Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 21 Nov 2014 16:47:11 +0100
Subject: [PATCH 1097/1819] Change MIT/X11 to MIT in license displayed in the
 program

---
 src/init.cpp                |  2 +-
 src/qt/bitcoinstrings.cpp   |  2 +-
 src/qt/locale/bitcoin_en.ts | 14 +++++++-------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 4a9982a1cdef..2d2a05a936b7 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -379,7 +379,7 @@ std::string LicenseInfo()
            "\n" +
            FormatParagraph(_("This is experimental software.")) + "\n" +
            "\n" +
-           FormatParagraph(_("Distributed under the MIT/X11 software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
+           FormatParagraph(_("Distributed under the MIT software license, see the accompanying file COPYING or <http://www.opensource.org/licenses/mit-license.php>.")) + "\n" +
            "\n" +
            FormatParagraph(_("This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.")) +
            "\n";
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index af85df2020ae..548529865a16 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -54,7 +54,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Delete all wallet transactions and only recover those parts of the "
 "blockchain through -rescan on startup"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Distributed under the MIT/X11 software license, see the accompanying file "
+"Distributed under the MIT software license, see the accompanying file "
 "COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Enter regression test mode, which uses a special chain in which blocks can "
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index ad63c5c08694..71c626be4b0d 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -3644,7 +3644,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3934,12 +3939,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+12"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation type="unfinished"></translation>
     </message>

From 730b1ed1a0d2b2b0f278ee808e7e266a50fac94b Mon Sep 17 00:00:00 2001
From: 21E14 <21xe14@gmail.com>
Date: Mon, 27 Oct 2014 23:00:55 -0400
Subject: [PATCH 1098/1819] Check pindexBestForkBase for null

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0cfe90beda1d..cd4bfbfb9245 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1211,13 +1211,13 @@ void CheckForkWarningConditions()
 
     if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (chainActive.Tip()->GetBlockWork() * 6)))
     {
-        if (!fLargeWorkForkFound)
+        if (!fLargeWorkForkFound && pindexBestForkBase)
         {
             std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
                 pindexBestForkBase->phashBlock->ToString() + std::string("'");
             CAlert::Notify(warning, true);
         }
-        if (pindexBestForkTip)
+        if (pindexBestForkTip && pindexBestForkBase)
         {
             LogPrintf("CheckForkWarningConditions: Warning: Large valid fork found\n  forking the chain at height %d (%s)\n  lasting to height %d (%s).\nChain state database corruption likely.\n",
                    pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),

From be4ac91aef4392879542d2b7740e536dde5f1d41 Mon Sep 17 00:00:00 2001
From: Pavel Vasin <pavel@vasin.nl>
Date: Sat, 22 Nov 2014 15:39:57 +0300
Subject: [PATCH 1099/1819] docs: ThreadGetMyExternalIP has been removed

It was removed in https://github.com/bitcoin/bitcoin/pull/5161
---
 doc/coding.md | 2 --
 1 file changed, 2 deletions(-)

diff --git a/doc/coding.md b/doc/coding.md
index b9d2006e3c17..43294dbe4c11 100644
--- a/doc/coding.md
+++ b/doc/coding.md
@@ -115,8 +115,6 @@ Threads
 
 - StartNode : Starts other threads.
 
-- ThreadGetMyExternalIP : Determines outside-the-firewall IP address, sends addr message to connected peers when it determines it.
-
 - ThreadDNSAddressSeed : Loads addresses of peers from the DNS.
 
 - ThreadMapPort : Universal plug-and-play startup/shutdown

From 3d0a1ce193a7f94862027de6df24cad7ce659256 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Sat, 22 Nov 2014 19:56:25 +0100
Subject: [PATCH 1100/1819] Process help and version arguments before datadir.

---
 src/bitcoin-cli.cpp | 28 ++++++++++++------------
 src/bitcoind.cpp    | 53 ++++++++++++++++++++++++---------------------
 2 files changed, 42 insertions(+), 39 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index a2b95d5086e4..1b638e99e9ec 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -66,6 +66,20 @@ static bool AppInitRPC(int argc, char* argv[])
     // Parameters
     //
     ParseParameters(argc, argv);
+    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
+        std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
+        if (!mapArgs.count("-version")) {
+            strUsage += "\n" + _("Usage:") + "\n" +
+                  "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
+                  "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
+                  "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
+
+            strUsage += "\n" + HelpMessageCli();
+        }
+
+        fprintf(stdout, "%s", strUsage.c_str());
+        return false;
+    }
     if (!boost::filesystem::is_directory(GetDataDir(false))) {
         fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
         return false;
@@ -81,20 +95,6 @@ static bool AppInitRPC(int argc, char* argv[])
         fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
         return false;
     }
-    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
-        std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
-        if (!mapArgs.count("-version")) {
-            strUsage += "\n" + _("Usage:") + "\n" +
-                  "  bitcoin-cli [options] <command> [params]  " + _("Send command to Bitcoin Core") + "\n" +
-                  "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
-                  "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
-
-            strUsage += "\n" + HelpMessageCli();
-        }
-
-        fprintf(stdout, "%s", strUsage.c_str());
-        return false;
-    }
     return true;
 }
 
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index a79e581a8034..be7757b0b6ce 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -59,13 +59,36 @@ bool AppInit(int argc, char* argv[])
     boost::thread* detectShutdownThread = NULL;
 
     bool fRet = false;
+
+    //
+    // Parameters
+    //
+    // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
+    ParseParameters(argc, argv);
+
+    // Process help and version before taking care about datadir
+    if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
+    {
+        std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
+
+        if (mapArgs.count("-version"))
+        {
+            strUsage += LicenseInfo();
+        }
+        else
+        {
+            strUsage += "\n" + _("Usage:") + "\n" +
+                  "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n";
+
+            strUsage += "\n" + HelpMessage(HMM_BITCOIND);
+        }
+
+        fprintf(stdout, "%s", strUsage.c_str());
+        return false;
+    }
+
     try
     {
-        //
-        // Parameters
-        //
-        // If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
-        ParseParameters(argc, argv);
         if (!boost::filesystem::is_directory(GetDataDir(false)))
         {
             fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
@@ -84,26 +107,6 @@ bool AppInit(int argc, char* argv[])
             return false;
         }
 
-        if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
-        {
-            std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
-
-            if (mapArgs.count("-version"))
-            {
-                strUsage += LicenseInfo();
-            }
-            else
-            {
-                strUsage += "\n" + _("Usage:") + "\n" +
-                      "  bitcoind [options]                     " + _("Start Bitcoin Core Daemon") + "\n";
-
-                strUsage += "\n" + HelpMessage(HMM_BITCOIND);
-            }
-
-            fprintf(stdout, "%s", strUsage.c_str());
-            return false;
-        }
-
         // Command-line RPC
         bool fCommandLine = false;
         for (int i = 1; i < argc; i++)

From e0535e15ab085e0b989e412ef88a629c028d96d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Sat, 22 Nov 2014 18:41:44 +0100
Subject: [PATCH 1101/1819] Remove misleading comment about testnet's message
 string.

---
 src/chainparams.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index e539eb7bd704..8a6a061ea1e2 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -192,11 +192,6 @@ class CTestNetParams : public CMainParams {
     CTestNetParams() {
         networkID = CBaseChainParams::TESTNET;
         strNetworkID = "test";
-        /** 
-         * The message start string is designed to be unlikely to occur in normal data.
-         * The characters are rarely used upper ASCII, not valid as UTF-8, and produce
-         * a large 4-byte int at any alignment.
-         */
         pchMessageStart[0] = 0x0b;
         pchMessageStart[1] = 0x11;
         pchMessageStart[2] = 0x09;

From d0c41a73501a0bf94fca91be5fb38ab039490843 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 6 Nov 2014 01:17:48 -0800
Subject: [PATCH 1102/1819] Add sanity check after key generation

Add a sanity check to prevent cosmic rays from flipping a bit in the
generated public key, or bugs in the elliptic curve code. This is
simply done by signing a (randomized) message, and verifying the
result.
---
 src/key.cpp            | 19 +++++++++++++++----
 src/key.h              |  6 ++++++
 src/rpcdump.cpp        |  2 ++
 src/test/key_tests.cpp | 20 ++++++++++++++++++++
 src/wallet.cpp         |  1 +
 5 files changed, 44 insertions(+), 4 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 76256b864ce9..826af7f44aaa 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -86,6 +86,20 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     return true;
 }
 
+bool CKey::VerifyPubKey(const CPubKey& pubkey) const {
+    if (pubkey.IsCompressed() != fCompressed) {
+        return false;
+    }
+    unsigned char rnd[8];
+    std::string str = "Bitcoin key verification\n";
+    GetRandBytes(rnd, sizeof(rnd));
+    uint256 hash;
+    CHash256().Write((unsigned char*)str.data(), str.size()).Write(rnd, sizeof(rnd)).Finalize((unsigned char*)&hash);
+    std::vector<unsigned char> vchSig;
+    Sign(hash, vchSig);
+    return pubkey.Verify(hash, vchSig);
+}
+
 bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig) const {
     if (!fValid)
         return false;
@@ -111,10 +125,7 @@ bool CKey::Load(CPrivKey &privkey, CPubKey &vchPubKey, bool fSkipCheck=false) {
     if (fSkipCheck)
         return true;
 
-    if (GetPubKey() != vchPubKey)
-        return false;
-
-    return true;
+    return VerifyPubKey(vchPubKey);
 }
 
 bool CKey::Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const {
diff --git a/src/key.h b/src/key.h
index 0bb05482c9ce..d8c82b6f09d5 100644
--- a/src/key.h
+++ b/src/key.h
@@ -136,6 +136,12 @@ class CKey
     //! Derive BIP32 child key.
     bool Derive(CKey& keyChild, unsigned char ccChild[32], unsigned int nChild, const unsigned char cc[32]) const;
 
+    /**
+     * Verify thoroughly whether a private key and a public key match.
+     * This is done using a different mechanism than just regenerating it.
+     */
+    bool VerifyPubKey(const CPubKey& vchPubKey) const;
+
     //! Load private key and check that public key matches.
     bool Load(CPrivKey& privkey, CPubKey& vchPubKey, bool fSkipCheck);
 
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index c3ffe38cc3ea..8b95373cffe8 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -112,6 +112,7 @@ Value importprivkey(const Array& params, bool fHelp)
     if (!key.IsValid()) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
 
     CPubKey pubkey = key.GetPubKey();
+    assert(key.VerifyPubKey(pubkey));
     CKeyID vchAddress = pubkey.GetID();
     {
         pwalletMain->MarkDirty();
@@ -253,6 +254,7 @@ Value importwallet(const Array& params, bool fHelp)
             continue;
         CKey key = vchSecret.GetKey();
         CPubKey pubkey = key.GetPubKey();
+        assert(key.VerifyPubKey(pubkey));
         CKeyID keyid = pubkey.GetID();
         if (pwalletMain->HaveKey(keyid)) {
             LogPrintf("Skipping import of %s (key already present)\n", CBitcoinAddress(keyid).ToString());
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index b32f3774fe3e..f9e35e0166ba 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -82,6 +82,26 @@ BOOST_AUTO_TEST_CASE(key_test1)
     CPubKey pubkey1C = key1C.GetPubKey();
     CPubKey pubkey2C = key2C.GetPubKey();
 
+    BOOST_CHECK(key1.VerifyPubKey(pubkey1));
+    BOOST_CHECK(!key1.VerifyPubKey(pubkey1C));
+    BOOST_CHECK(!key1.VerifyPubKey(pubkey2));
+    BOOST_CHECK(!key1.VerifyPubKey(pubkey2C));
+
+    BOOST_CHECK(!key1C.VerifyPubKey(pubkey1));
+    BOOST_CHECK(key1C.VerifyPubKey(pubkey1C));
+    BOOST_CHECK(!key1C.VerifyPubKey(pubkey2));
+    BOOST_CHECK(!key1C.VerifyPubKey(pubkey2C));
+
+    BOOST_CHECK(!key2.VerifyPubKey(pubkey1));
+    BOOST_CHECK(!key2.VerifyPubKey(pubkey1C));
+    BOOST_CHECK(key2.VerifyPubKey(pubkey2));
+    BOOST_CHECK(!key2.VerifyPubKey(pubkey2C));
+
+    BOOST_CHECK(!key2C.VerifyPubKey(pubkey1));
+    BOOST_CHECK(!key2C.VerifyPubKey(pubkey1C));
+    BOOST_CHECK(!key2C.VerifyPubKey(pubkey2));
+    BOOST_CHECK(key2C.VerifyPubKey(pubkey2C));
+
     BOOST_CHECK(addr1.Get()  == CTxDestination(pubkey1.GetID()));
     BOOST_CHECK(addr2.Get()  == CTxDestination(pubkey2.GetID()));
     BOOST_CHECK(addr1C.Get() == CTxDestination(pubkey1C.GetID()));
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 5aea9881cd59..353010ae072c 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -79,6 +79,7 @@ CPubKey CWallet::GenerateNewKey()
         SetMinVersion(FEATURE_COMPRPUBKEY);
 
     CPubKey pubkey = secret.GetPubKey();
+    assert(secret.VerifyPubKey(pubkey));
 
     // Create new metadata
     int64_t nCreationTime = GetTime();

From f321d6bfff4dbbb4c52d0f175a27d54b287e81ff Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 8 Nov 2014 14:29:45 -0800
Subject: [PATCH 1103/1819] Add key generation/verification to ECC sanity check

---
 src/key.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/key.cpp b/src/key.cpp
index 826af7f44aaa..a91ed1cc1db9 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -201,5 +201,13 @@ void CExtKey::Decode(const unsigned char code[74]) {
 }
 
 bool ECC_InitSanityCheck() {
-    return CECKey::SanityCheck();
+#if !defined(USE_SECP256K1)
+    if (!CECKey::SanityCheck()) {
+        return false;
+    }
+#endif
+    CKey key;
+    key.MakeNewKey(true);
+    CPubKey pubkey = key.GetPubKey();
+    return key.VerifyPubKey(pubkey);
 }

From 7357893396eb9ec6aafbce52bede0b7b31a97ddc Mon Sep 17 00:00:00 2001
From: dexX7 <ugithub@bitwatch.co>
Date: Sun, 23 Nov 2014 13:10:31 +0100
Subject: [PATCH 1104/1819] Prioritize and display -testsafemode status in UI

Like in a real world situation, a safe mode test should also be visible in the
UI. A test of safe mode is furthermore mostly relevant for developers, so it
should not be overwritten by a warning about a pre-release test build.
---
 src/main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 17fa765e8f81..a3fe53b0e43e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3221,12 +3221,12 @@ string GetWarnings(string strFor)
     string strStatusBar;
     string strRPC;
 
-    if (GetBoolArg("-testsafemode", false))
-        strRPC = "test";
-
     if (!CLIENT_VERSION_IS_RELEASE)
         strStatusBar = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
 
+    if (GetBoolArg("-testsafemode", false))
+        strStatusBar = strRPC = "testsafemode enabled";
+
     // Misc warnings like out of disk space and clock is wrong
     if (strMiscWarning != "")
     {

From 3c777141349ad82d679a278df0619968af53c23f Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 23 Nov 2014 15:12:50 -0800
Subject: [PATCH 1105/1819] Make -proxy set all network types, avoiding a
 connect leak.

Previously -proxy was not setting the proxy for IsLimited networks, so
 if you set your configuration to be onlynet=tor you wouldn't get an
 IPv4 proxy set.

The payment protocol gets its proxy configuration from the IPv4 proxy,
 and so it would experience a connection leak.

This addresses issue #5355 and also clears up a cosmetic bug where
 getinfo proxy output shows nothing when onlynet=tor is set.
---
 src/init.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 2d2a05a936b7..d2d6858618f1 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -854,10 +854,8 @@ bool AppInit2(boost::thread_group& threadGroup)
         if (!addrProxy.IsValid())
             return InitError(strprintf(_("Invalid -proxy address: '%s'"), mapArgs["-proxy"]));
 
-        if (!IsLimited(NET_IPV4))
-            SetProxy(NET_IPV4, addrProxy);
-        if (!IsLimited(NET_IPV6))
-            SetProxy(NET_IPV6, addrProxy);
+        SetProxy(NET_IPV4, addrProxy);
+        SetProxy(NET_IPV6, addrProxy);
         SetNameProxy(addrProxy);
         fProxy = true;
     }

From 494f6e7d353c63a85a2c6d4c6b2eb8e643934d60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Fri, 21 Nov 2014 10:38:27 +0100
Subject: [PATCH 1106/1819] Check for strnlen and provide it if it is not
 found.

---
 configure.ac           |  2 ++
 src/Makefile.am        |  1 +
 src/compat.h           |  4 ++++
 src/compat/strnlen.cpp | 18 ++++++++++++++++++
 4 files changed, 25 insertions(+)
 create mode 100644 src/compat/strnlen.cpp

diff --git a/configure.ac b/configure.ac
index 6784521d818a..1814180864ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -421,6 +421,8 @@ AC_CHECK_HEADERS([endian.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/s
 AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
 AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
 
+AC_CHECK_DECLS([strnlen])
+
 AC_CHECK_DECLS([le32toh, le64toh, htole32, htole64, be32toh, be64toh, htobe32, htobe64],,,
 		[#if HAVE_ENDIAN_H
                  #include <endian.h>
diff --git a/src/Makefile.am b/src/Makefile.am
index 0d45203c9005..3ec9e2f85d84 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -251,6 +251,7 @@ libbitcoin_common_a_SOURCES = \
 # backward-compatibility objects and their sanity checks are linked.
 libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_util_a_SOURCES = \
+  compat/strnlen.cpp \
   compat/glibc_sanity.cpp \
   compat/glibcxx_sanity.cpp \
   chainparamsbase.cpp \
diff --git a/src/compat.h b/src/compat.h
index dade79aae0fd..80e53fe55e89 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -84,4 +84,8 @@ typedef u_int SOCKET;
 #define THREAD_PRIORITY_ABOVE_NORMAL    (-2)
 #endif
 
+#if HAVE_DECL_STRNLEN == 0
+size_t strnlen( const char *start, size_t max_len);
+#endif // HAVE_DECL_STRNLEN
+
 #endif // BITCOIN_COMPAT_H
diff --git a/src/compat/strnlen.cpp b/src/compat/strnlen.cpp
new file mode 100644
index 000000000000..7f3e1598875f
--- /dev/null
+++ b/src/compat/strnlen.cpp
@@ -0,0 +1,18 @@
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+#endif
+
+#include <cstring>
+
+#if HAVE_DECL_STRNLEN == 0
+size_t strnlen( const char *start, size_t max_len)
+{
+    const char *end = (const char *)memchr(start, '\0', max_len);
+
+    return end ? (size_t)(end - start) : max_len;
+}
+#endif // HAVE_DECL_STRNLEN

From 51ce901aa3ca8326bc3fa96e6cc95453c695d4d6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 7 Nov 2014 02:38:35 -0800
Subject: [PATCH 1107/1819] Improve chainstate/blockindex disk writing policy

There are 3 pieces of data that are maintained on disk. The actual block
and undo data, the block index (which can refer to positions on disk),
and the chainstate (which refers to the best block hash).

Earlier, there was no guarantee that blocks were written to disk before
block index entries referring to them were written. This commit introduces
dirty flags for block index data, and delays writing entries until the actual
block data is flushed.

With this stricter ordering in writes, it is now safe to not always flush
after every block, so there is no need for the IsInitialBlockDownload()
check there - instead we just write whenever enough time has passed or
the cache size grows too large. Also updating the wallet's best known block
is delayed until this is done, otherwise the wallet may end up referring to an
unknown block.

In addition, only do a write inside the block processing loop if necessary
(because of cache size exceeded). Otherwise, move the writing to a point
after processing is done, after relaying.
---
 src/init.cpp          |  11 ++---
 src/main.cpp          | 106 ++++++++++++++++++++++++------------------
 src/main.h            |   4 ++
 src/rpcblockchain.cpp |   2 +-
 4 files changed, 68 insertions(+), 55 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 2d2a05a936b7..6d5ac5ab4776 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -150,14 +150,9 @@ void Shutdown()
 
     {
         LOCK(cs_main);
-#ifdef ENABLE_WALLET
-        if (pwalletMain)
-            pwalletMain->SetBestChain(chainActive.GetLocator());
-#endif
-        if (pblocktree)
-            pblocktree->Flush();
-        if (pcoinsTip)
-            pcoinsTip->Flush();
+        if (pcoinsTip != NULL) {
+            FlushStateToDisk();
+        }
         delete pcoinsTip;
         pcoinsTip = NULL;
         delete pcoinsdbview;
diff --git a/src/main.cpp b/src/main.cpp
index 02062c3935f9..5dd27c7aa899 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -130,6 +130,12 @@ namespace {
 
     // Number of preferrable block download peers.
     int nPreferredDownload = 0;
+
+    // Dirty block index entries.
+    set<CBlockIndex*> setDirtyBlockIndex;
+
+    // Dirty block file entries.
+    set<int> setDirtyFileInfo;
 } // anon namespace
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1137,11 +1143,6 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
     pos.nPos = (unsigned int)fileOutPos;
     fileout << block;
 
-    // Flush stdio buffers and commit to disk before returning
-    fflush(fileout.Get());
-    if (!IsInitialBlockDownload())
-        FileCommit(fileout.Get());
-
     return true;
 }
 
@@ -1335,7 +1336,7 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
     }
     if (!state.CorruptionPossible()) {
         pindex->nStatus |= BLOCK_FAILED_VALID;
-        pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex));
+        setDirtyBlockIndex.insert(pindex);
         setBlockIndexCandidates.erase(pindex);
         InvalidChainFound(pindex);
     }
@@ -1732,10 +1733,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
         }
 
         pindex->RaiseValidity(BLOCK_VALID_SCRIPTS);
-
-        CDiskBlockIndex blockindex(pindex);
-        if (!pblocktree->WriteBlockIndex(blockindex))
-            return state.Abort("Failed to write block index");
+        setDirtyBlockIndex.insert(pindex);
     }
 
     if (fTxIndex)
@@ -1759,10 +1757,16 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
     return true;
 }
 
-// Update the on-disk chain state.
-bool static WriteChainState(CValidationState &state, bool forceWrite=false) {
+/**
+ * Update the on-disk chain state.
+ * The caches and indexes are flushed if either they're too large, forceWrite is set, or
+ * fast is not set and it's been a while since the last write.
+ */
+bool static FlushStateToDisk(CValidationState &state, bool fast = false, bool forceWrite = false) {
+    LOCK(cs_main);
     static int64_t nLastWrite = 0;
-    if (forceWrite || pcoinsTip->GetCacheSize() > nCoinCacheSize || (!IsInitialBlockDownload() && GetTimeMicros() > nLastWrite + 600*1000000)) {
+    if (forceWrite || pcoinsTip->GetCacheSize() > nCoinCacheSize ||
+        (!fast && GetTimeMicros() > nLastWrite + DATABASE_WRITE_INTERVAL * 1000000)) {
         // Typical CCoins structures on disk are around 100 bytes in size.
         // Pushing a new one to the database can cause it to be written
         // twice (once in the log, and once in the tables). This is already
@@ -1770,15 +1774,44 @@ bool static WriteChainState(CValidationState &state, bool forceWrite=false) {
         // overwrite one. Still, use a conservative safety factor of 2.
         if (!CheckDiskSpace(100 * 2 * 2 * pcoinsTip->GetCacheSize()))
             return state.Error("out of disk space");
+        // First make sure all block and undo data is flushed to disk.
         FlushBlockFile();
+        // Then update all block file information (which may refer to block and undo files).
+        bool fileschanged = false;
+        for (set<int>::iterator it = setDirtyFileInfo.begin(); it != setDirtyFileInfo.end(); ) {
+            if (!pblocktree->WriteBlockFileInfo(*it, vinfoBlockFile[*it])) {
+                return state.Abort("Failed to write to block index");
+            }
+            fileschanged = true;
+            setDirtyFileInfo.erase(it++);
+        }
+        if (fileschanged && !pblocktree->WriteLastBlockFile(nLastBlockFile)) {
+            return state.Abort("Failed to write to block index");
+        }
+        for (set<CBlockIndex*>::iterator it = setDirtyBlockIndex.begin(); it != setDirtyBlockIndex.end(); ) {
+             if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(*it))) {
+                 return state.Abort("Failed to write to block index");
+             }
+             setDirtyBlockIndex.erase(it++);
+        }
         pblocktree->Sync();
+        // Finally flush the chainstate (which may refer to block index entries).
         if (!pcoinsTip->Flush())
             return state.Abort("Failed to write to coin database");
+        // Update best block in wallet (so we can detect restored wallets).
+        if (forceWrite || !fast) {
+            g_signals.SetBestChain(chainActive.GetLocator());
+        }
         nLastWrite = GetTimeMicros();
     }
     return true;
 }
 
+void FlushStateToDisk() {
+    CValidationState state;
+    FlushStateToDisk(state, false, true);
+}
+
 // Update chainActive and related internal data structures.
 void static UpdateTip(CBlockIndex *pindexNew) {
     chainActive.SetTip(pindexNew);
@@ -1837,7 +1870,7 @@ bool static DisconnectTip(CValidationState &state) {
     }
     LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
     // Write the chain state to disk, if necessary.
-    if (!WriteChainState(state))
+    if (!FlushStateToDisk(state, true))
         return false;
     // Resurrect mempool transactions from the disconnected block.
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
@@ -1900,7 +1933,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
     LogPrint("bench", "  - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
     // Write the chain state to disk, if necessary.
-    if (!WriteChainState(state))
+    if (!FlushStateToDisk(state, true))
         return false;
     int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
     LogPrint("bench", "  - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
@@ -1919,10 +1952,6 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     BOOST_FOREACH(const CTransaction &tx, pblock->vtx) {
         SyncWithWallets(tx, pblock);
     }
-    // Update best block in wallet (so we can detect restored wallets)
-    // Emit this signal after the SyncWithWallets signals as the wallet relies on that everything up to this point has been synced
-    if ((chainActive.Height() % 20160) == 0 || ((chainActive.Height() % 144) == 0 && !IsInitialBlockDownload()))
-        g_signals.SetBestChain(chainActive.GetLocator());
 
     int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
     LogPrint("bench", "  - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
@@ -2043,9 +2072,6 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
     else
         CheckForkWarningConditions();
 
-    if (!pblocktree->Flush())
-        return state.Abort("Failed to sync block index");
-
     return true;
 }
 
@@ -2086,11 +2112,16 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
                     if (chainActive.Height() > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate))
                         pnode->PushInventory(CInv(MSG_BLOCK, hashNewTip));
             }
-
+            // Notify external listeners about the new tip.
             uiInterface.NotifyBlockTip(hashNewTip);
         }
     } while(pindexMostWork != chainActive.Tip());
 
+    // Write changes periodically to disk, after relay.
+    if (!FlushStateToDisk(state)) {
+        return false;
+    }
+
     return true;
 }
 
@@ -2123,8 +2154,7 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
     if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork)
         pindexBestHeader = pindexNew;
 
-    // Ok if it fails, we'll download the header again next time.
-    pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew));
+    setDirtyBlockIndex.insert(pindexNew);
 
     return pindexNew;
 }
@@ -2143,6 +2173,7 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
          LOCK(cs_nBlockSequenceId);
          pindexNew->nSequenceId = nBlockSequenceId++;
     }
+    setDirtyBlockIndex.insert(pindexNew);
 
     if (pindexNew->pprev == NULL || pindexNew->pprev->nChainTx) {
         // If pindexNew is the genesis block or all parents are BLOCK_VALID_TRANSACTIONS.
@@ -2162,15 +2193,11 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
                 range.first++;
                 mapBlocksUnlinked.erase(it);
             }
-            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex)))
-                return state.Abort("Failed to write block index");
         }
     } else {
         if (pindexNew->pprev && pindexNew->pprev->IsValid(BLOCK_VALID_TREE)) {
             mapBlocksUnlinked.insert(std::make_pair(pindexNew->pprev, pindexNew));
         }
-        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexNew)))
-            return state.Abort("Failed to write block index");
     }
 
     return true;
@@ -2178,8 +2205,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
 
 bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAddSize, unsigned int nHeight, uint64_t nTime, bool fKnown = false)
 {
-    bool fUpdatedLast = false;
-
     LOCK(cs_LastBlockFile);
 
     unsigned int nFile = fKnown ? pos.nFile : nLastBlockFile;
@@ -2195,7 +2220,6 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
             if (vinfoBlockFile.size() <= nFile) {
                 vinfoBlockFile.resize(nFile + 1);
             }
-            fUpdatedLast = true;
         }
         pos.nFile = nFile;
         pos.nPos = vinfoBlockFile[nFile].nSize;
@@ -2222,11 +2246,7 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
         }
     }
 
-    if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, vinfoBlockFile[nFile]))
-        return state.Abort("Failed to write file info");
-    if (fUpdatedLast)
-        pblocktree->WriteLastBlockFile(nLastBlockFile);
-
+    setDirtyFileInfo.insert(nFile);
     return true;
 }
 
@@ -2239,9 +2259,7 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
     unsigned int nNewSize;
     pos.nPos = vinfoBlockFile[nFile].nUndoSize;
     nNewSize = vinfoBlockFile[nFile].nUndoSize += nAddSize;
-    if (!pblocktree->WriteBlockFileInfo(nLastBlockFile, vinfoBlockFile[nLastBlockFile])) {
-        return state.Abort("Failed to write block info");
-    }
+    setDirtyFileInfo.insert(nFile);
 
     unsigned int nOldChunks = (pos.nPos + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
     unsigned int nNewChunks = (nNewSize + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
@@ -2462,6 +2480,7 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
     if ((!CheckBlock(block, state)) || !ContextualCheckBlock(block, state, pindex->pprev)) {
         if (state.IsInvalid() && !state.CorruptionPossible()) {
             pindex->nStatus |= BLOCK_FAILED_VALID;
+            setDirtyBlockIndex.insert(pindex);
         }
         return false;
     }
@@ -3070,7 +3089,7 @@ bool InitBlockIndex() {
             if (!ActivateBestChain(state, &block))
                 return error("LoadBlockIndex() : genesis block cannot be activated");
             // Force a chainstate write so that when we VerifyDB in a moment, it doesnt check stale data
-            return WriteChainState(state, true);
+            return FlushStateToDisk(state, false, true);
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
         }
@@ -4641,11 +4660,6 @@ bool CBlockUndo::WriteToDisk(CDiskBlockPos &pos, const uint256 &hashBlock)
     hasher << *this;
     fileout << hasher.GetHash();
 
-    // Flush stdio buffers and commit to disk before returning
-    fflush(fileout.Get());
-    if (!IsInitialBlockDownload())
-        FileCommit(fileout.Get());
-
     return true;
 }
 
diff --git a/src/main.h b/src/main.h
index b49f0a06ebba..c0d64125281f 100644
--- a/src/main.h
+++ b/src/main.h
@@ -94,6 +94,8 @@ static const unsigned int MAX_HEADERS_RESULTS = 2000;
  *  degree of disordering of blocks on disk (which make reindexing and in the future perhaps pruning
  *  harder). We'll probably want to make this a per-peer adaptive value at some point. */
 static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;
+/** Time to wait (in seconds) between writing blockchain state to disk. */
+static const unsigned int DATABASE_WRITE_INTERVAL = 3600;
 
 /** "reject" message codes **/
 static const unsigned char REJECT_MALFORMED = 0x01;
@@ -201,6 +203,8 @@ bool AbortNode(const std::string &msg, const std::string &userMessage="");
 bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
 /** Increase a node's misbehavior score. */
 void Misbehaving(NodeId nodeid, int howmuch);
+/** Flush all state, indexes and buffers to disk. */
+void FlushStateToDisk();
 
 
 /** (try to) add transaction to memory pool **/
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 7919fb1a0cb4..e8b0f62a830f 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -319,7 +319,7 @@ Value gettxoutsetinfo(const Array& params, bool fHelp)
     Object ret;
 
     CCoinsStats stats;
-    pcoinsTip->Flush();
+    FlushStateToDisk();
     if (pcoinsTip->GetStats(stats)) {
         ret.push_back(Pair("height", (int64_t)stats.nHeight));
         ret.push_back(Pair("bestblock", stats.hashBlock.GetHex()));

From a20695001604a8aa9b7baaf52db8642b0b82b0d9 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 14 Nov 2014 18:19:26 +0100
Subject: [PATCH 1108/1819] Introduce separate flushing modes

---
 src/main.cpp | 25 ++++++++++++++++---------
 1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5dd27c7aa899..13c568e5e338 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1757,16 +1757,23 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
     return true;
 }
 
+enum FlushStateMode {
+    FLUSH_STATE_IF_NEEDED,
+    FLUSH_STATE_PERIODIC,
+    FLUSH_STATE_ALWAYS
+};
+
 /**
  * Update the on-disk chain state.
  * The caches and indexes are flushed if either they're too large, forceWrite is set, or
  * fast is not set and it's been a while since the last write.
  */
-bool static FlushStateToDisk(CValidationState &state, bool fast = false, bool forceWrite = false) {
+bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
     LOCK(cs_main);
     static int64_t nLastWrite = 0;
-    if (forceWrite || pcoinsTip->GetCacheSize() > nCoinCacheSize ||
-        (!fast && GetTimeMicros() > nLastWrite + DATABASE_WRITE_INTERVAL * 1000000)) {
+    if ((mode == FLUSH_STATE_ALWAYS) ||
+        ((mode == FLUSH_STATE_PERIODIC || mode == FLUSH_STATE_IF_NEEDED) && pcoinsTip->GetCacheSize() > nCoinCacheSize) ||
+        (mode == FLUSH_STATE_PERIODIC && GetTimeMicros() > nLastWrite + DATABASE_WRITE_INTERVAL * 1000000)) {
         // Typical CCoins structures on disk are around 100 bytes in size.
         // Pushing a new one to the database can cause it to be written
         // twice (once in the log, and once in the tables). This is already
@@ -1799,7 +1806,7 @@ bool static FlushStateToDisk(CValidationState &state, bool fast = false, bool fo
         if (!pcoinsTip->Flush())
             return state.Abort("Failed to write to coin database");
         // Update best block in wallet (so we can detect restored wallets).
-        if (forceWrite || !fast) {
+        if (mode != FLUSH_STATE_IF_NEEDED) {
             g_signals.SetBestChain(chainActive.GetLocator());
         }
         nLastWrite = GetTimeMicros();
@@ -1809,7 +1816,7 @@ bool static FlushStateToDisk(CValidationState &state, bool fast = false, bool fo
 
 void FlushStateToDisk() {
     CValidationState state;
-    FlushStateToDisk(state, false, true);
+    FlushStateToDisk(state, FLUSH_STATE_ALWAYS);
 }
 
 // Update chainActive and related internal data structures.
@@ -1870,7 +1877,7 @@ bool static DisconnectTip(CValidationState &state) {
     }
     LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
     // Write the chain state to disk, if necessary.
-    if (!FlushStateToDisk(state, true))
+    if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED))
         return false;
     // Resurrect mempool transactions from the disconnected block.
     BOOST_FOREACH(const CTransaction &tx, block.vtx) {
@@ -1933,7 +1940,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
     LogPrint("bench", "  - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
     // Write the chain state to disk, if necessary.
-    if (!FlushStateToDisk(state, true))
+    if (!FlushStateToDisk(state, FLUSH_STATE_IF_NEEDED))
         return false;
     int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
     LogPrint("bench", "  - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
@@ -2118,7 +2125,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     } while(pindexMostWork != chainActive.Tip());
 
     // Write changes periodically to disk, after relay.
-    if (!FlushStateToDisk(state)) {
+    if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) {
         return false;
     }
 
@@ -3089,7 +3096,7 @@ bool InitBlockIndex() {
             if (!ActivateBestChain(state, &block))
                 return error("LoadBlockIndex() : genesis block cannot be activated");
             // Force a chainstate write so that when we VerifyDB in a moment, it doesnt check stale data
-            return FlushStateToDisk(state, false, true);
+            return FlushStateToDisk(state, FLUSH_STATE_ALWAYS);
         } catch(std::runtime_error &e) {
             return error("LoadBlockIndex() : failed to initialize block database: %s", e.what());
         }

From c5a22828559bdac8fd347e30a3027dbaf54934ae Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 21 Nov 2014 20:07:00 +0100
Subject: [PATCH 1109/1819] [Qt, OSX] fix Qt4.8 compatibility with QProgressBar
 issue

Rebased-From: 7f33d2cebfde99ded12c711ef6bd77c91725cfb8
Github-Issue: #5344
---
 src/qt/guiutil.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index a6ecfbcc8230..09c79db2d912 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -189,7 +189,7 @@ namespace GUIUtil
     /* Format a CNodeCombinedStats.dPingTime into a user-readable string or display N/A, if 0*/
     QString formatPingTime(double dPingTime);
     
-#ifdef Q_OS_MAC
+#if defined(Q_OS_MAC) && QT_VERSION >= 0x050000
     // workaround for Qt OSX Bug:
     // https://bugreports.qt-project.org/browse/QTBUG-15631
     // QProgressBar uses around 10% CPU even when app is in background

From 322317951f2764d3cb55eea7d34f950b9c54e01a Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 24 Nov 2014 14:49:43 -0500
Subject: [PATCH 1110/1819] libbitcoinconsensus: don't require any global
 constructors

These static objects are only used in once place, so declare them there instead.
---
 src/script/interpreter.cpp | 15 ++++++++-------
 src/utilstrencodings.cpp   | 10 +++++-----
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 5eda23731d7e..a10cefcc0b07 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -17,13 +17,6 @@
 using namespace std;
 
 typedef vector<unsigned char> valtype;
-static const valtype vchFalse(0);
-static const valtype vchZero(0);
-static const valtype vchTrue(1, 1);
-static const CScriptNum bnZero(0);
-static const CScriptNum bnOne(1);
-static const CScriptNum bnFalse(0);
-static const CScriptNum bnTrue(1);
 
 namespace {
 
@@ -239,6 +232,14 @@ bool static CheckMinimalPush(const valtype& data, opcodetype opcode) {
 
 bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* serror)
 {
+    static const CScriptNum bnZero(0);
+    static const CScriptNum bnOne(1);
+    static const CScriptNum bnFalse(0);
+    static const CScriptNum bnTrue(1);
+    static const valtype vchFalse(0);
+    static const valtype vchZero(0);
+    static const valtype vchTrue(1, 1);
+
     CScript::const_iterator pc = script.begin();
     CScript::const_iterator pend = script.end();
     CScript::const_iterator pbegincodehash = script.begin();
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index a961b3c5cdc5..d0062d4544e7 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -14,13 +14,13 @@
 
 using namespace std;
 
-/**
- * safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
- * even possibly remotely dangerous like & or >
- */
-static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
 string SanitizeString(const string& str)
 {
+    /**
+     * safeChars chosen to allow simple messages/URLs/email addresses, but avoid anything
+     * even possibly remotely dangerous like & or >
+     */
+    static string safeChars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 .,;_/:?@()");
     string strResult;
     for (std::string::size_type i = 0; i < str.size(); i++)
     {

From d61dc25c71c960fb623696c4aea8e57f32a4ba2f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 24 Nov 2014 21:45:42 -0500
Subject: [PATCH 1111/1819] qt: osx: fix hidden symbol visibility

Fixes default hidden symbol visibility for our linux->osx cross build. Without
this change, the check for working -fvisibility=hidden fails, and all symbols
are visible by default.

Ugly as this is, it's just a simple find/replace to fix a bug in Qt's configure.
They assume in an "XPLATFORM_MAC" block that the builder is capable of running
osx programs. This should be "BUILD_ON_MAC" instead.
---
 depends/packages/qt.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 51f2ea663ba9..6a8e714a489d 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -48,6 +48,7 @@ define $(package)_preprocess_cmds
   sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
   sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
   sed -i.old "/XIproto.h/d" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
+  sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \
   mkdir -p qtbase/mkspecs/macx-clang-linux &&\
   cp -f qtbase/mkspecs/macx-clang/Info.plist.lib qtbase/mkspecs/macx-clang-linux/ &&\
   cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\

From 3a05ba1bfcba72bb91643510d96bd2f49a8420bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Tue, 25 Nov 2014 08:18:33 +0100
Subject: [PATCH 1112/1819] Fix typo in doxygen comment.

---
 src/random.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/random.h b/src/random.h
index ec73d910c48d..aa55ca2b6f31 100644
--- a/src/random.h
+++ b/src/random.h
@@ -26,7 +26,7 @@ uint256 GetRandHash();
 
 /**
  * Seed insecure_rand using the random pool.
- * @param Deterministic Use a determinstic seed
+ * @param Deterministic Use a deterministic seed
  */
 void seed_insecure_rand(bool fDeterministic = false);
 

From 798faec3ea208166a5a4e0676b9b565ce9e59c1e Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 19 Nov 2014 09:39:42 +0100
Subject: [PATCH 1113/1819] Add 'invalidateblock' and 'reconsiderblock' RPC
 commands.

These can be used for testing reorganizations or for manual intervention in case of
chain forks.
---
 src/main.cpp          | 73 +++++++++++++++++++++++++++++++++++++++++
 src/main.h            |  6 ++++
 src/rpcblockchain.cpp | 76 +++++++++++++++++++++++++++++++++++++++++++
 src/rpcserver.cpp     |  2 ++
 src/rpcserver.h       |  2 ++
 5 files changed, 159 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 88fb31980fbf..025577a94038 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2132,6 +2132,79 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     return true;
 }
 
+bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
+    AssertLockHeld(cs_main);
+
+    // Mark the block itself as invalid.
+    pindex->nStatus |= BLOCK_FAILED_VALID;
+    if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+        return state.Abort("Failed to update block index");
+    }
+    setBlockIndexCandidates.erase(pindex);
+
+    while (chainActive.Contains(pindex)) {
+        CBlockIndex *pindexWalk = chainActive.Tip();
+        pindexWalk->nStatus |= BLOCK_FAILED_CHILD;
+        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexWalk))) {
+            return state.Abort("Failed to update block index");
+        }
+        setBlockIndexCandidates.erase(pindexWalk);
+        // ActivateBestChain considers blocks already in chainActive
+        // unconditionally valid already, so force disconnect away from it.
+        if (!DisconnectTip(state)) {
+            return false;
+        }
+    }
+
+    // The resulting new best tip may not be in setBlockIndexCandidates anymore, so
+    // add them again.
+    BlockMap::iterator it = mapBlockIndex.begin();
+    while (it != mapBlockIndex.end()) {
+        if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
+            setBlockIndexCandidates.insert(pindex);
+        }
+        it++;
+    }
+
+    InvalidChainFound(pindex);
+    return true;
+}
+
+bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
+    AssertLockHeld(cs_main);
+
+    int nHeight = pindex->nHeight;
+
+    // Remove the invalidity flag from this block and all its descendants.
+    BlockMap::iterator it = mapBlockIndex.begin();
+    while (it != mapBlockIndex.end()) {
+        if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) {
+            it->second->nStatus &= ~BLOCK_FAILED_MASK;
+            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+                return state.Abort("Failed to update block index");
+            }
+            if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
+                setBlockIndexCandidates.insert(it->second);
+            }
+            if (it->second == pindexBestInvalid) {
+                // Reset invalid block marker if it was pointing to one of those.
+                pindexBestInvalid = NULL;
+            }
+        }
+        it++;
+    }
+
+    // Remove the invalidity flag from all ancestors too.
+    while (pindex != NULL) {
+        pindex->nStatus &= ~BLOCK_FAILED_MASK;
+        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+            return state.Abort("Failed to update block index");
+        }
+        pindex = pindex->pprev;
+    }
+    return true;
+}
+
 CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
 {
     // Check for duplicate
diff --git a/src/main.h b/src/main.h
index c0d64125281f..aee8d9234a9b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -609,6 +609,12 @@ class CVerifyDB {
 /** Find the last common block between the parameter chain and a locator. */
 CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator);
 
+/** Mark a block as invalid. */
+bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex);
+
+/** Remove invalidity status from a block and its descendants. */
+bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex);
+
 /** The currently-connected chain of blocks. */
 extern CChain chainActive;
 
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index e8b0f62a830f..0ce18e4147fd 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -561,3 +561,79 @@ Value getmempoolinfo(const Array& params, bool fHelp)
     return ret;
 }
 
+Value invalidateblock(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "invalidateblock \"hash\"\n"
+            "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n"
+            "\nArguments:\n"
+            "1. hash   (string, required) the hash of the block to mark as invalid\n"
+            "\nResult:\n"
+            "\nExamples:\n"
+            + HelpExampleCli("invalidateblock", "\"blockhash\"")
+            + HelpExampleRpc("invalidateblock", "\"blockhash\"")
+        );
+
+    std::string strHash = params[0].get_str();
+    uint256 hash(strHash);
+    CValidationState state;
+
+    {
+        LOCK(cs_main);
+        if (mapBlockIndex.count(hash) == 0)
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
+
+        CBlockIndex* pblockindex = mapBlockIndex[hash];
+        InvalidateBlock(state, pblockindex);
+    }
+
+    if (state.IsValid()) {
+        ActivateBestChain(state);
+    }
+
+    if (!state.IsValid()) {
+        throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());
+    }
+
+    return Value::null;
+}
+
+Value reconsiderblock(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "reconsiderblock \"hash\"\n"
+            "\nRemoves invalidity status of a block and its descendants, reconsider them for activation.\n"
+            "This can be used to undo the effects of invalidateblock.\n"
+            "\nArguments:\n"
+            "1. hash   (string, required) the hash of the block to reconsider\n"
+            "\nResult:\n"
+            "\nExamples:\n"
+            + HelpExampleCli("reconsiderblock", "\"blockhash\"")
+            + HelpExampleRpc("reconsiderblock", "\"blockhash\"")
+        );
+
+    std::string strHash = params[0].get_str();
+    uint256 hash(strHash);
+    CValidationState state;
+
+    {
+        LOCK(cs_main);
+        if (mapBlockIndex.count(hash) == 0)
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
+
+        CBlockIndex* pblockindex = mapBlockIndex[hash];
+        ReconsiderBlock(state, pblockindex);
+    }
+
+    if (state.IsValid()) {
+        ActivateBestChain(state);
+    }
+
+    if (!state.IsValid()) {
+        throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());
+    }
+
+    return Value::null;
+}
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 7022c5037580..6cc96b4da3ba 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -270,6 +270,8 @@ static const CRPCCommand vRPCCommands[] =
     { "blockchain",         "gettxout",               &gettxout,               true,      false,      false },
     { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
     { "blockchain",         "verifychain",            &verifychain,            true,      false,      false },
+    { "blockchain",         "invalidateblock",        &invalidateblock,        true,      true,       false },
+    { "blockchain",         "reconsiderblock",        &reconsiderblock,        true,      true,       false },
 
     /* Mining */
     { "mining",             "getblocktemplate",       &getblocktemplate,       true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 7395fc23c6cc..6969db0287b6 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -219,6 +219,8 @@ extern json_spirit::Value gettxoutsetinfo(const json_spirit::Array& params, bool
 extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value invalidateblock(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value reconsiderblock(const json_spirit::Array& params, bool fHelp);
 
 // in rest.cpp
 extern bool HTTPReq_REST(AcceptedConnection *conn,

From 3dd8ed72e570e9289635cfb5c3c12c807c3e8c27 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 25 Nov 2014 12:33:43 +0100
Subject: [PATCH 1114/1819] Delay writing block indexes in
 invalidate/reconsider

---
 src/main.cpp | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 025577a94038..621f2133389b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2137,17 +2137,13 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
 
     // Mark the block itself as invalid.
     pindex->nStatus |= BLOCK_FAILED_VALID;
-    if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-        return state.Abort("Failed to update block index");
-    }
+    setDirtyBlockIndex.insert(pindex);
     setBlockIndexCandidates.erase(pindex);
 
     while (chainActive.Contains(pindex)) {
         CBlockIndex *pindexWalk = chainActive.Tip();
         pindexWalk->nStatus |= BLOCK_FAILED_CHILD;
-        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexWalk))) {
-            return state.Abort("Failed to update block index");
-        }
+        setDirtyBlockIndex.insert(pindexWalk);
         setBlockIndexCandidates.erase(pindexWalk);
         // ActivateBestChain considers blocks already in chainActive
         // unconditionally valid already, so force disconnect away from it.
@@ -2180,9 +2176,7 @@ bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
     while (it != mapBlockIndex.end()) {
         if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) {
             it->second->nStatus &= ~BLOCK_FAILED_MASK;
-            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-                return state.Abort("Failed to update block index");
-            }
+            setDirtyBlockIndex.insert(it->second);
             if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
                 setBlockIndexCandidates.insert(it->second);
             }
@@ -2196,9 +2190,9 @@ bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
 
     // Remove the invalidity flag from all ancestors too.
     while (pindex != NULL) {
-        pindex->nStatus &= ~BLOCK_FAILED_MASK;
-        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-            return state.Abort("Failed to update block index");
+        if (pindex->nStatus & BLOCK_FAILED_MASK) {
+            pindex->nStatus &= ~BLOCK_FAILED_MASK;
+            setDirtyBlockIndex.insert(pindex);
         }
         pindex = pindex->pprev;
     }

From a328dd60a7affeb0444f7bd836d70d80b35d9c2a Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Thu, 20 Nov 2014 13:06:10 +0100
Subject: [PATCH 1115/1819] [Qt] small changes to sendcoinsdialog

- add newly added variables to the constructor init
- move an already existing bool also to constructor init
- move a connect call to setClientModel and add a NULL pointer check
---
 src/qt/sendcoinsdialog.cpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index ff39829b95d8..46eb58ca4394 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -12,12 +12,12 @@
 #include "guiutil.h"
 #include "optionsmodel.h"
 #include "sendcoinsentry.h"
-#include "wallet.h"
 #include "walletmodel.h"
 
 #include "base58.h"
 #include "coincontrol.h"
 #include "ui_interface.h"
+#include "wallet.h"
 
 #include <QMessageBox>
 #include <QScrollBar>
@@ -27,7 +27,10 @@
 SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     QDialog(parent),
     ui(new Ui::SendCoinsDialog),
-    model(0)
+    clientModel(0),
+    model(0),
+    fNewRecipientAllowed(true),
+    fFeeMinimized(true)
 {
     ui->setupUi(this);
 
@@ -106,13 +109,15 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
     ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
     minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
-
-    fNewRecipientAllowed = true;
 }
 
 void SendCoinsDialog::setClientModel(ClientModel *clientModel)
 {
     this->clientModel = clientModel;
+
+    if (clientModel) {
+        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
+    }
 }
 
 void SendCoinsDialog::setModel(WalletModel *model)
@@ -143,7 +148,6 @@ void SendCoinsDialog::setModel(WalletModel *model)
         coinControlUpdateLabels();
 
         // fee section
-        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(updateSmartFeeLabel()));
         connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateSmartFeeLabel()));
         connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(updateGlobalFeeVariables()));
         connect(ui->sliderSmartFee, SIGNAL(valueChanged(int)), this, SLOT(coinControlUpdateLabels()));
@@ -460,7 +464,7 @@ bool SendCoinsDialog::handlePaymentRequest(const SendCoinsRecipient &rv)
     return true;
 }
 
-void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, 
+void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
                                  const CAmount& watchBalance, const CAmount& watchUnconfirmedBalance, const CAmount& watchImmatureBalance)
 {
     Q_UNUSED(unconfirmedBalance);

From b7f2cdc8a97ba1a2155c0614895701de0f327154 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 21 Nov 2014 21:21:54 -0500
Subject: [PATCH 1116/1819] build: disable static lib stripping during osx make
 install-strip

---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index 6784521d818a..a9dec322727e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -281,6 +281,12 @@ case $host in
            AC_PATH_TOOL([INSTALLNAMETOOL], [install_name_tool], install_name_tool)
            AC_PATH_TOOL([OTOOL], [otool], otool)
            AC_PATH_PROGS([GENISOIMAGE], [genisoimage mkisofs],genisoimage)
+
+           dnl libtool will try to strip the static lib, which is a problem for
+           dnl cross-builds because strip attempts to call a hard-coded ld,
+           dnl which may not exist in the path. Stripping the .a is not
+           dnl necessary, so just disable it.
+           old_striplib=
            ;;
        esac
      fi

From 52bb7a7e1b69e7cc863621fb04958e0a39066138 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 25 Nov 2014 18:36:55 -0500
Subject: [PATCH 1117/1819] gitian: update descriptors to use a sane uniform
 output

---
 contrib/gitian-descriptors/gitian-linux.yml | 29 ++++++++++--------
 contrib/gitian-descriptors/gitian-osx.yml   | 29 +++++++++++-------
 contrib/gitian-descriptors/gitian-win.yml   | 33 +++++++++++++--------
 3 files changed, 55 insertions(+), 36 deletions(-)

diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index b57a04469c62..bba2104edb7a 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -73,13 +73,13 @@ script: |
   ./autogen.sh
   ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
   make dist
-  DISTNAME=`echo bitcoin-*.tar.gz`
-
+  SOURCEDIST=`echo bitcoin-*.tar.gz`
+  DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
   # Correct tar file order
   mkdir -p temp
   pushd temp
-  tar xf ../$DISTNAME
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  tar xf ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -88,17 +88,22 @@ script: |
     export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
     mkdir -p distsrc-${i}
     cd distsrc-${i}
-    tar --strip-components=1 -xf ../$DISTNAME
+    INSTALLPATH=`pwd`/installed/${DISTNAME}
+    mkdir -p ${INSTALLPATH}
+    tar --strip-components=1 -xf ../$SOURCEDIST
 
-    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
     make ${MAKEOPTS}
     make install-strip
-    cd ..
+    cd installed
+    find . -name "lib*.la" -delete
+    find . -name "lib*.a" -delete
+    rm -rf ${DISTNAME}/lib/pkgconfig
+    find . | sort | tar --no-recursion -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    cd ../../
   done
   mkdir -p $OUTDIR/src
-  mv $DISTNAME $OUTDIR/src
-  mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
-  mv ${OUTDIR}/i686-* ${OUTDIR}/32
+  mv $SOURCEDIST $OUTDIR/src
+  mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-linux64.tar.gz
+  mv ${OUTDIR}/${DISTNAME}-i686-*.tar.gz ${OUTDIR}/${DISTNAME}-linux32.tar.gz
 
-  # Delete unwanted stuff
-  find ${OUTDIR} -name "lib*.la" -delete
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 7ec0700ed3b4..cbe28e4f3422 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -83,13 +83,14 @@ script: |
   ./autogen.sh
   ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
   make dist
-  DISTNAME=`echo bitcoin-*.tar.gz`
+  SOURCEDIST=`echo bitcoin-*.tar.gz`
+  DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
 
   # Correct tar file order
   mkdir -p temp
   pushd temp
-  tar xf ../$DISTNAME
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  tar xf ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -98,17 +99,23 @@ script: |
     export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
     mkdir -p distsrc-${i}
     cd distsrc-${i}
-    tar --strip-components=1 -xf ../$DISTNAME
+    INSTALLPATH=`pwd`/installed/${DISTNAME}
+    mkdir -p ${INSTALLPATH}
+    tar --strip-components=1 -xf ../$SOURCEDIST
 
-    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
     make ${MAKEOPTS}
     make install-strip
     make deploy
-    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/Bitcoin-Qt.dmg
-    cd ..
+    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx.dmg
+
+    cd installed
+    find . -name "lib*.la" -delete
+    find . -name "lib*.a" -delete
+    rm -rf ${DISTNAME}/lib/pkgconfig
+    find . | sort | tar --no-recursion -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    cd ../../
   done
   mkdir -p $OUTDIR/src
-  mv $DISTNAME $OUTDIR/src
-
-  # Delete unwanted stuff
-  find ${OUTDIR} -name "lib*.la" -delete
+  mv $SOURCEDIST $OUTDIR/src
+  mv ${OUTDIR}/${DISTNAME}-x86_64-*.tar.gz ${OUTDIR}/${DISTNAME}-osx64.tar.gz
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 172807467a69..97c823cde694 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -17,6 +17,7 @@ packages:
 - "mingw-w64"
 - "g++-mingw-w64"
 - "nsis"
+- "zip"
 reference_datetime: "2013-06-01 00:00:00"
 remotes:
 - "url": "https://github.com/bitcoin/bitcoin.git"
@@ -27,7 +28,7 @@ script: |
   HOSTS="x86_64-w64-mingw32 i686-w64-mingw32"
   CONFIGFLAGS="--enable-upnp-default"
   FAKETIME_HOST_PROGS="g++ ar ranlib nm windres strip"
-  FAKETIME_PROGS="date makensis"
+  FAKETIME_PROGS="date makensis zip"
 
   export QT_RCC_TEST=1
   export GZIP="-9n"
@@ -75,13 +76,14 @@ script: |
   ./autogen.sh
   ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
   make dist
-  DISTNAME=`echo bitcoin-*.tar.gz`
+  SOURCEDIST=`echo bitcoin-*.tar.gz`
+  DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
 
   # Correct tar file order
   mkdir -p temp
   pushd temp
-  tar xf ../$DISTNAME
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
+  tar xf ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -90,19 +92,24 @@ script: |
     export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
     mkdir -p distsrc-${i}
     cd distsrc-${i}
-    tar --strip-components=1 -xf ../$DISTNAME
+    INSTALLPATH=`pwd`/installed/${DISTNAME}
+    mkdir -p ${INSTALLPATH}
+    tar --strip-components=1 -xf ../$SOURCEDIST
 
-    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${OUTDIR}/${i}/bin --includedir=${OUTDIR}/${i}/include --libdir=${OUTDIR}/${i}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
     make ${MAKEOPTS}
     make deploy
     make install-strip
     cp -f bitcoin-*setup*.exe $OUTDIR/
-    cd ..
+    cd installed
+    mv ${DISTNAME}/bin/*.dll ${DISTNAME}/lib/
+    find . -name "lib*.la" -delete
+    find . -name "lib*.a" -delete
+    rm -rf ${DISTNAME}/lib/pkgconfig
+    find . -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
+    cd ../..
   done
   mkdir -p $OUTDIR/src
-  mv $DISTNAME $OUTDIR/src
-  mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
-  mv ${OUTDIR}/i686-* ${OUTDIR}/32
-
-  # Delete unwanted stuff
-  find ${OUTDIR} -name "lib*.la" -delete
+  mv $SOURCEDIST $OUTDIR/src
+  mv ${OUTDIR}/${DISTNAME}-x86_64-*.zip ${OUTDIR}/${DISTNAME}-win64.zip
+  mv ${OUTDIR}/${DISTNAME}-i686-*.zip ${OUTDIR}/${DISTNAME}-win32.zip

From 2f327a3c870fd9657bfa45d2c7a74250498ee737 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 30 May 2014 19:17:55 -0400
Subject: [PATCH 1118/1819] build: add the deploydir target for gitian

This is a helper target that stops just before the creation of the dmg.
---
 Makefile.am | 30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6bc004431346..e144fb11e1eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -85,14 +85,30 @@ if BUILD_DARWIN
 $(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
 	$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
 
+deploydir: $(OSX_DMG)
 else
-$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
-	INSTALLNAMETOOL=$(INSTALLNAMETOOL)  OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -verbose 2
-	$(MKDIR_P) dist/.background
-	$(INSTALL) contrib/macdeploy/background.png dist/.background
-	$(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store
-	cd dist; $(LN_S) /Applications Applications
-	$(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
+APP_DIST_DIR=$(top_builddir)/dist
+APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/background.png $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
+
+$(APP_DIST_DIR)/Applications:
+	@rm -f $@
+	@cd $(@D); $(LN_S) /Applications $(@F)
+
+$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
+
+$(OSX_DMG): $(APP_DIST_EXTRAS)
+	$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
+
+$(APP_DIST_DIR)/.background/background.png:
+	$(MKDIR_P) $(@D)
+	$(INSTALL) $(top_srcdir)/contrib/macdeploy/background.png $@
+$(APP_DIST_DIR)/.DS_Store:
+	$(INSTALL) $(top_srcdir)/contrib/macdeploy/DS_Store $@
+
+$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
+	INSTALLNAMETOOL=$(INSTALLNAMETOOL)  OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
+
+deploydir: $(APP_DIST_EXTRAS)
 endif
 
 if TARGET_DARWIN

From d69ed2b2916754bdec7e47864f0ea1407c9eabb9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 30 May 2014 19:22:16 -0400
Subject: [PATCH 1119/1819] build: Clean up the dmg layout

---
 contrib/macdeploy/DS_Store | Bin 15364 -> 15364 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/contrib/macdeploy/DS_Store b/contrib/macdeploy/DS_Store
index b9a1e1486405136607eedf433af8d469ef7059b8..7527dc671fbe8730abc2497c2717778a19a024c6 100644
GIT binary patch

From dfef929bf7770176908164baf79a30285ad3ed74 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 25 Nov 2014 18:37:34 -0500
Subject: [PATCH 1120/1819] release: update docs to reflect new layout

- Split linux32/linux64 releases
- Split win32/win64 zips
- Post-processing should no longer be required. The deterministic outputs are
  ready for consumption.
---
 doc/release-process.md | 46 +++++++++---------------------------------
 1 file changed, 10 insertions(+), 36 deletions(-)

diff --git a/doc/release-process.md b/doc/release-process.md
index c6a7266ef1f9..df27c5829c12 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -54,48 +54,22 @@ Release Process
   
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
 	./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
-	pushd build/out
-	zip -r bitcoin-${VERSION}-linux-gitian.zip *
-	mv bitcoin-${VERSION}-linux-gitian.zip ../../../
-	popd
+	mv build/out/bitcoin-*.tar.gz build/out/src/bitcoin-*.tar.gz ../
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
 	./bin/gsign --signer $SIGNER --release ${VERSION}-win --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
-	pushd build/out
-	zip -r bitcoin-${VERSION}-win-gitian.zip *
-	mv bitcoin-${VERSION}-win-gitian.zip ../../../
-	popd
-        ./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
-        ./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
-	pushd build/out
-	mv Bitcoin-Qt.dmg ../../../
-	popd
+	mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
+	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+	./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+	mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
 	popd
 
   Build output expected:
 
-  1. linux 32-bit and 64-bit binaries + source (bitcoin-${VERSION}-linux-gitian.zip)
-  2. windows 32-bit and 64-bit binaries + installer + source (bitcoin-${VERSION}-win-gitian.zip)
-  3. OSX installer (Bitcoin-Qt.dmg)
-  4. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx>/(your gitian key)/
-
-repackage gitian builds for release as stand-alone zip/tar/installer exe
-
-**Linux .tar.gz:**
-
-	unzip bitcoin-${VERSION}-linux-gitian.zip -d bitcoin-${VERSION}-linux
-	tar czvf bitcoin-${VERSION}-linux.tar.gz bitcoin-${VERSION}-linux
-	rm -rf bitcoin-${VERSION}-linux
-
-**Windows .zip and setup.exe:**
-
-	unzip bitcoin-${VERSION}-win-gitian.zip -d bitcoin-${VERSION}-win
-	mv bitcoin-${VERSION}-win/bitcoin-*-setup.exe .
-	zip -r bitcoin-${VERSION}-win.zip bitcoin-${VERSION}-win
-	rm -rf bitcoin-${VERSION}-win
-
-**Mac OS X .dmg:**
-
-	mv Bitcoin-Qt.dmg bitcoin-${VERSION}-osx.dmg
+  1. source tarball (bitcoin-${VERSION}.tar.gz)
+  2. linux 32-bit and 64-bit binaries dist tarballs (bitcoin-${VERSION}-linux[32|64].tar.gz)
+  3. windows 32-bit and 64-bit installers and dist zips (bitcoin-${VERSION}-win[32|64]-setup.exe, bitcoin-${VERSION}-win[32|64].zip)
+  4. OSX installer (bitcoin-${VERSION}-osx.dmg)
+  5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx>/(your gitian key)/
 
 ###Next steps:
 

From 914868a05dfcae0f766283e0065aa36762cc5abe Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 21 Nov 2014 19:26:45 -0500
Subject: [PATCH 1121/1819] build: add a deterministic dmg signer

---
 Makefile.am                                   |  4 +-
 .../gitian-descriptors/gitian-osx-signer.yml  | 37 +++++++++++++
 contrib/gitian-descriptors/gitian-osx.yml     | 15 +++++-
 contrib/macdeploy/detached-sig-apply.sh       | 53 +++++++++++++++++++
 contrib/macdeploy/detached-sig-create.sh      | 46 ++++++++++++++++
 5 files changed, 153 insertions(+), 2 deletions(-)
 create mode 100644 contrib/gitian-descriptors/gitian-osx-signer.yml
 create mode 100755 contrib/macdeploy/detached-sig-apply.sh
 create mode 100755 contrib/macdeploy/detached-sig-create.sh

diff --git a/Makefile.am b/Makefile.am
index e144fb11e1eb..b51f477b7856 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,7 +26,9 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
 
 OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
   $(top_srcdir)/contrib/macdeploy/background.png \
-  $(top_srcdir)/contrib/macdeploy/DS_Store
+  $(top_srcdir)/contrib/macdeploy/DS_Store \
+  $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
+  $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
 
 COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
   leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
new file mode 100644
index 000000000000..db9b4af93d0e
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -0,0 +1,37 @@
+---
+name: "bitcoin-dmg-signer"
+suites:
+- "precise"
+architectures:
+- "amd64"
+packages:
+- "libc6:i386"
+- "faketime"
+reference_datetime: "2013-06-01 00:00:00"
+remotes: []
+files:
+- "bitcoin-0.9.99-osx-unsigned.tar.gz"
+- "signature.tar.gz"
+script: |
+  WRAP_DIR=$HOME/wrapped
+  mkdir -p ${WRAP_DIR}
+  export PATH=`pwd`:$PATH
+  FAKETIME_PROGS="dmg genisoimage"
+
+  # Create global faketime wrappers
+  for prog in ${FAKETIME_PROGS}; do
+    echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+    echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+    echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+    echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+    echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+    chmod +x ${WRAP_DIR}/${prog}
+  done
+
+  UNSIGNED=`echo bitcoin-*.tar.gz`
+  SIGNED=`echo ${UNSIGNED} | sed 's/.tar.*//' | sed 's/-unsigned//'`.dmg
+
+  tar -xf ${UNSIGNED}
+  ./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz
+  ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app
+  ${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index cbe28e4f3422..eb6df2096eb1 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -106,8 +106,21 @@ script: |
     ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
     make ${MAKEOPTS}
     make install-strip
+
+    make deploydir
+    mkdir -p unsigned-app-${i}
+    cp contrib/macdeploy/detached-sig-apply.sh unsigned-app-${i}
+    cp contrib/macdeploy/detached-sig-create.sh unsigned-app-${i}
+    cp ${BASEPREFIX}/${i}/native/bin/dmg ${BASEPREFIX}/${i}/native/bin/genisoimage unsigned-app-${i}
+    cp ${BASEPREFIX}/${i}/native/bin/${i}-codesign_allocate unsigned-app-${i}/codesign_allocate
+    cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
+    mv dist unsigned-app-${i}
+    pushd unsigned-app-${i}
+    find . | sort | tar --no-recursion -czf ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz -T -
+    popd
+
     make deploy
-    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx.dmg
+    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
 
     cd installed
     find . -name "lib*.la" -delete
diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh
new file mode 100755
index 000000000000..7b3eb1b19741
--- /dev/null
+++ b/contrib/macdeploy/detached-sig-apply.sh
@@ -0,0 +1,53 @@
+#!/bin/sh
+set -e
+
+UNSIGNED=$1
+SIGNATURE=$2
+ARCH=x86_64
+ROOTDIR=dist
+BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
+TEMPDIR=signed.temp
+OUTDIR=signed-app
+
+if [ -z "$UNSIGNED" ]; then
+  echo "usage: $0 <unsigned app> <signature>"
+  exit 1
+fi
+
+if [ -z "$SIGNATURE" ]; then
+  echo "usage: $0 <unsigned app> <signature>"
+  exit 1
+fi
+
+rm -rf ${TEMPDIR} && mkdir -p ${TEMPDIR}
+tar -C ${TEMPDIR} -xf ${UNSIGNED}
+tar -C ${TEMPDIR} -xf ${SIGNATURE}
+
+if [ -z "${PAGESTUFF}" ]; then
+  PAGESTUFF=${TEMPDIR}/pagestuff
+fi
+
+if [ -z "${CODESIGN_ALLOCATE}" ]; then
+  CODESIGN_ALLOCATE=${TEMPDIR}/codesign_allocate
+fi
+
+for i in `find ${TEMPDIR} -name "*.sign"`; do
+  SIZE=`stat -c %s ${i}`
+  TARGET_FILE=`echo ${i} | sed 's/\.sign$//'`
+
+  echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
+  ${CODESIGN_ALLOCATE} -i ${TARGET_FILE} -a ${ARCH} ${SIZE} -o ${i}.tmp
+
+  OFFSET=`${PAGESTUFF} ${i}.tmp -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
+  if [ -z ${QUIET} ]; then
+    echo "Attaching signature at offset ${OFFSET}"
+  fi
+
+  dd if=$i of=${i}.tmp bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
+  mv ${i}.tmp ${TARGET_FILE}
+  rm ${i}
+  echo "Success."
+done
+mv ${TEMPDIR}/${ROOTDIR} ${OUTDIR}
+rm -rf ${TEMPDIR}
+echo "Signed: ${OUTDIR}"
diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh
new file mode 100755
index 000000000000..aff4f08da8be
--- /dev/null
+++ b/contrib/macdeploy/detached-sig-create.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+set -e
+
+ROOTDIR=dist
+BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
+CODESIGN=codesign
+TEMPDIR=sign.temp
+TEMPLIST=${TEMPDIR}/signatures.txt
+OUT=signature.tar.gz
+
+if [ ! -n "$1" ]; then
+  echo "usage: $0 <codesign args>"
+  echo "example: $0 -s MyIdentity"
+  exit 1
+fi
+
+rm -rf ${TEMPDIR} ${TEMPLIST}
+mkdir -p ${TEMPDIR}
+
+${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}"
+
+for i in `grep -v CodeResources ${TEMPLIST}`; do
+  TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
+  SIZE=`pagestuff $i -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
+  OFFSET=`pagestuff $i -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
+  SIGNFILE="${TEMPDIR}/${TARGETFILE}.sign"
+  DIRNAME="`dirname ${SIGNFILE}`"
+  mkdir -p "${DIRNAME}"
+  echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
+  dd if=$i of=${SIGNFILE} bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
+done
+
+for i in `grep CodeResources ${TEMPLIST}`; do
+  TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
+  RESOURCE="${TEMPDIR}/${TARGETFILE}"
+  DIRNAME="`dirname "${RESOURCE}"`"
+  mkdir -p "${DIRNAME}"
+  echo "Adding resource for: "${TARGETFILE}""
+  cp "${i}" "${RESOURCE}"
+done
+
+rm ${TEMPLIST}
+
+tar -C ${TEMPDIR} -czf ${OUT} .
+rm -rf ${TEMPDIR}
+echo "Created ${OUT}"

From 7a9cf80b19f3facabe53bf5a60fd813d7d63a6ff Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 25 Nov 2014 19:23:18 -0500
Subject: [PATCH 1122/1819] docs: add/update docs for osx dmg signing

---
 doc/README_osx.txt     | 15 +++++++++++++++
 doc/release-process.md | 34 +++++++++++++++++++++++++++-------
 2 files changed, 42 insertions(+), 7 deletions(-)

diff --git a/doc/README_osx.txt b/doc/README_osx.txt
index 8831649bd8cd..d56234f7d940 100644
--- a/doc/README_osx.txt
+++ b/doc/README_osx.txt
@@ -65,3 +65,18 @@ Background images and other features can be added to DMG files by inserting a
 .DS_Store before creation. The easiest way to create this file is to build a
 DMG without one, move it to a device running OSX, customize the layout, then
 grab the .DS_Store file for later use. That is the approach taken here.
+
+As of OSX Mavericks (10.9), using an Apple-blessed key to sign binaries is a
+requirement in order to satisfy the new Gatekeeper requirements. Because this
+private key cannot be shared, we'll have to be a bit creative in order for the
+build process to remain somewhat deterministic. Here's how it works:
+
+- Builders use gitian to create an unsigned release. This outputs an unsigned
+  dmg which users may choose to bless and run. It also outputs an unsigned app
+  structure in the form of a tarball, which also contains all of the tools
+  that have been previously (deterministically) built in order to create a
+  final dmg.
+- The Apple keyholder uses this unsigned app to create a detached signature,
+  using the script that is also included there.
+- Builders feed the unsigned app + detached signature back into gitian. It
+  uses the pre-built tools to recombine the pieces into a deterministic dmg.
diff --git a/doc/release-process.md b/doc/release-process.md
index df27c5829c12..a16d4ace4a61 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -59,17 +59,18 @@ Release Process
 	./bin/gsign --signer $SIGNER --release ${VERSION}-win --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
 	mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
-	./bin/gsign --signer $SIGNER --release ${VERSION}-osx --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+	./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+	mv build/out/bitcoin-*-unsigned.tar.gz inputs
 	mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
 	popd
-
+bitcoin-0.9.99-osx-unsigned.tar.gz
   Build output expected:
 
   1. source tarball (bitcoin-${VERSION}.tar.gz)
   2. linux 32-bit and 64-bit binaries dist tarballs (bitcoin-${VERSION}-linux[32|64].tar.gz)
   3. windows 32-bit and 64-bit installers and dist zips (bitcoin-${VERSION}-win[32|64]-setup.exe, bitcoin-${VERSION}-win[32|64].zip)
-  4. OSX installer (bitcoin-${VERSION}-osx.dmg)
-  5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx>/(your gitian key)/
+  4. OSX unsigned installer (bitcoin-${VERSION}-osx-unsigned.dmg)
+  5. Gitian signatures (in gitian.sigs/${VERSION}-<linux|win|osx-unsigned>/(your gitian key)/
 
 ###Next steps:
 
@@ -78,7 +79,28 @@ Commit your signature to gitian.sigs:
 	pushd gitian.sigs
 	git add ${VERSION}-linux/${SIGNER}
 	git add ${VERSION}-win/${SIGNER}
-	git add ${VERSION}-osx/${SIGNER}
+	git add ${VERSION}-osx-unsigned/${SIGNER}
+	git commit -a
+	git push  # Assuming you can push to the gitian.sigs tree
+	popd
+
+Wait for OSX detached signature:
+	Once the OSX build has 3 matching signatures, Gavin will sign it with the apple App-Store key.
+	He will then upload a detached signature to be combined with the unsigned app to create a signed binary.
+
+Create the signed OSX binary:
+	pushd ./gitian-builder
+	# Fetch the signature as instructed by Gavin
+	cp signature.tar.gz inputs/
+	./bin/gbuild -i ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+	./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
+	mv build/out/bitcoin-${VERSION}-osx.dmg ../
+	popd
+
+Commit your signature for the signed OSX binary:
+
+	pushd gitian.sigs
+	git add ${VERSION}-osx-signed/${SIGNER}
 	git commit -a
 	git push  # Assuming you can push to the gitian.sigs tree
 	popd
@@ -91,8 +113,6 @@ Commit your signature to gitian.sigs:
 
     - Code-sign Windows -setup.exe (in a Windows virtual machine using signtool)
 
-    - Code-sign MacOSX .dmg
-
   Note: only Gavin has the code-signing keys currently.
 
 - Create `SHA256SUMS.asc` for the builds, and GPG-sign it:

From c8ed6130a4f7cfae897220ec093b440d21727cde Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Wed, 26 Nov 2014 08:19:07 +0100
Subject: [PATCH 1123/1819] Include missing config/bitcoin-config.h.

---
 src/compat.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compat.h b/src/compat.h
index 80e53fe55e89..dffd4ecf52fa 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -6,6 +6,10 @@
 #ifndef BITCOIN_COMPAT_H
 #define BITCOIN_COMPAT_H
 
+#if defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+#endif
+
 #ifdef WIN32
 #ifdef _WIN32_WINNT
 #undef _WIN32_WINNT

From a53d16ac0c0f16b377cd02aaa84f1b9b59822ee6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Wed, 26 Nov 2014 10:37:49 +0100
Subject: [PATCH 1124/1819] Use complete path to include bitcoin-config.h.

---
 src/netbase.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index ea05b8766f5a..aca5a107fe02 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifdef HAVE_CONFIG_H
-#include "bitcoin-config.h"
+#include "config/bitcoin-config.h"
 #endif
 
 #include "netbase.h"

From 210eba9fdb9b4ed28ab0b9dcdbcaf45209a143b4 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Thu, 20 Nov 2014 14:04:16 +0100
Subject: [PATCH 1125/1819] [REST] fix headersonly flag for BINARY responses

---
 src/rest.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rest.cpp b/src/rest.cpp
index 122b361719fb..1aa864a306ad 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -100,7 +100,7 @@ static bool rest_block(AcceptedConnection *conn,
     switch (rf) {
     case RF_BINARY: {
         string binaryBlock = ssBlock.str();
-        conn->stream() << HTTPReply(HTTP_OK, binaryBlock, fRun, true, "application/octet-stream") << binaryBlock << std::flush;
+        conn->stream() << HTTPReplyHeader(HTTP_OK, fRun, binaryBlock.size(), "application/octet-stream") << binaryBlock << std::flush;
         return true;
     }
 
@@ -148,7 +148,7 @@ static bool rest_tx(AcceptedConnection *conn,
     switch (rf) {
     case RF_BINARY: {
         string binaryTx = ssTx.str();
-        conn->stream() << HTTPReply(HTTP_OK, binaryTx, fRun, true, "application/octet-stream") << binaryTx << std::flush;
+        conn->stream() << HTTPReplyHeader(HTTP_OK, fRun, binaryTx.size(), "application/octet-stream") << binaryTx << std::flush;
         return true;
     }
 

From 8ba38aba42c3b65f1ad61699197566d99d2b761a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 26 Nov 2014 13:47:22 +0100
Subject: [PATCH 1126/1819] qt: Update translations from transifex

---
 src/qt/locale/bitcoin_ach.ts         |   2 +-
 src/qt/locale/bitcoin_af_ZA.ts       |   6 +-
 src/qt/locale/bitcoin_ar.ts          |  14 +-
 src/qt/locale/bitcoin_be_BY.ts       |   6 +-
 src/qt/locale/bitcoin_bg.ts          |  10 +-
 src/qt/locale/bitcoin_bs.ts          |   2 +-
 src/qt/locale/bitcoin_ca.ts          |  30 +--
 src/qt/locale/bitcoin_ca@valencia.ts |  30 +--
 src/qt/locale/bitcoin_ca_ES.ts       |  30 +--
 src/qt/locale/bitcoin_cmn.ts         |   2 +-
 src/qt/locale/bitcoin_cs.ts          |  30 +--
 src/qt/locale/bitcoin_cy.ts          |   6 +-
 src/qt/locale/bitcoin_da.ts          | 146 ++++++++---
 src/qt/locale/bitcoin_de.ts          | 152 ++++++++---
 src/qt/locale/bitcoin_el_GR.ts       |  14 +-
 src/qt/locale/bitcoin_eo.ts          |  14 +-
 src/qt/locale/bitcoin_es.ts          |  96 ++++---
 src/qt/locale/bitcoin_es_CL.ts       |  10 +-
 src/qt/locale/bitcoin_es_DO.ts       |  22 +-
 src/qt/locale/bitcoin_es_MX.ts       |   6 +-
 src/qt/locale/bitcoin_es_UY.ts       |   6 +-
 src/qt/locale/bitcoin_et.ts          |  10 +-
 src/qt/locale/bitcoin_eu_ES.ts       |   6 +-
 src/qt/locale/bitcoin_fa.ts          |  14 +-
 src/qt/locale/bitcoin_fa_IR.ts       |   6 +-
 src/qt/locale/bitcoin_fi.ts          |  26 +-
 src/qt/locale/bitcoin_fr.ts          | 330 +++++++++++++++++++++---
 src/qt/locale/bitcoin_fr_CA.ts       |   6 +-
 src/qt/locale/bitcoin_gl.ts          |  14 +-
 src/qt/locale/bitcoin_gu_IN.ts       |   2 +-
 src/qt/locale/bitcoin_he.ts          |  26 +-
 src/qt/locale/bitcoin_hi_IN.ts       |   6 +-
 src/qt/locale/bitcoin_hr.ts          |  10 +-
 src/qt/locale/bitcoin_hu.ts          |  22 +-
 src/qt/locale/bitcoin_id_ID.ts       |  26 +-
 src/qt/locale/bitcoin_it.ts          |  44 ++--
 src/qt/locale/bitcoin_ja.ts          |  14 +-
 src/qt/locale/bitcoin_ka.ts          |  26 +-
 src/qt/locale/bitcoin_kk_KZ.ts       |   6 +-
 src/qt/locale/bitcoin_ko_KR.ts       |  34 +--
 src/qt/locale/bitcoin_ky.ts          |   6 +-
 src/qt/locale/bitcoin_la.ts          |  14 +-
 src/qt/locale/bitcoin_lt.ts          |  10 +-
 src/qt/locale/bitcoin_lv_LV.ts       |  32 +--
 src/qt/locale/bitcoin_mn.ts          |  10 +-
 src/qt/locale/bitcoin_ms_MY.ts       |   6 +-
 src/qt/locale/bitcoin_nb.ts          | 146 ++++++++---
 src/qt/locale/bitcoin_nl.ts          |  34 +--
 src/qt/locale/bitcoin_pam.ts         |  10 +-
 src/qt/locale/bitcoin_pl.ts          |  18 +-
 src/qt/locale/bitcoin_pt_BR.ts       |  44 ++--
 src/qt/locale/bitcoin_pt_PT.ts       |  26 +-
 src/qt/locale/bitcoin_ro_RO.ts       |  22 +-
 src/qt/locale/bitcoin_ru.ts          | 278 +++++++++++++++++++--
 src/qt/locale/bitcoin_sah.ts         |   2 +-
 src/qt/locale/bitcoin_sk.ts          |  46 ++--
 src/qt/locale/bitcoin_sl_SI.ts       |  22 +-
 src/qt/locale/bitcoin_sq.ts          |   6 +-
 src/qt/locale/bitcoin_sr.ts          |   6 +-
 src/qt/locale/bitcoin_sv.ts          | 360 +++++++++++++++++++++++++--
 src/qt/locale/bitcoin_th_TH.ts       |   6 +-
 src/qt/locale/bitcoin_tr.ts          | 146 ++++++++---
 src/qt/locale/bitcoin_uk.ts          |  50 +---
 src/qt/locale/bitcoin_ur_PK.ts       |   6 +-
 src/qt/locale/bitcoin_uz@Cyrl.ts     |  26 +-
 src/qt/locale/bitcoin_vi.ts          |   6 +-
 src/qt/locale/bitcoin_vi_VN.ts       |   2 +-
 src/qt/locale/bitcoin_zh_CN.ts       |  26 +-
 src/qt/locale/bitcoin_zh_HK.ts       |   2 +-
 src/qt/locale/bitcoin_zh_TW.ts       |  42 +---
 70 files changed, 1586 insertions(+), 1086 deletions(-)

diff --git a/src/qt/locale/bitcoin_ach.ts b/src/qt/locale/bitcoin_ach.ts
index 835ddb8eaa75..ddb9fb85ced6 100644
--- a/src/qt/locale/bitcoin_ach.ts
+++ b/src/qt/locale/bitcoin_ach.ts
@@ -1,4 +1,4 @@
-<TS language="ach" version="2.1">
+<TS language="ach" version="2.0">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index 851c261d0be3..c369c3c68ff9 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1,4 +1,4 @@
-<TS language="af_ZA" version="2.1">
+<TS language="af_ZA" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -200,10 +200,6 @@
         <source>Amount</source>
         <translation>Bedrag</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index f05270a9fa46..101f51f8dcbf 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -1,4 +1,4 @@
-<TS language="ar" version="2.1">
+<TS language="ar" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -456,10 +456,6 @@
         <source>Amount</source>
         <translation>المبلغ</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>عنوان</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>التاريخ</translation>
@@ -524,6 +520,10 @@
         <source>high</source>
         <translation>عالي</translation>
     </message>
+    <message>
+        <source>medium-high</source>
+        <translation>متوسط-مرتفع</translation>
+    </message>
     <message>
         <source>low</source>
         <translation>منخفض</translation>
@@ -682,10 +682,6 @@
         <source>&amp;Main</source>
         <translation>&amp;الرئيسي</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>ادفع &amp;رسوم المعاملة</translation>
-    </message>
     <message>
         <source>MB</source>
         <translation>م ب</translation>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index f4b82ce2cc81..e63628396c88 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,4 +1,4 @@
-<TS language="be_BY" version="2.1">
+<TS language="be_BY" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -352,10 +352,6 @@ Address: %4
         <source>Amount</source>
         <translation>Колькасць</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрас</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index a1f3dd092a25..3095aa117286 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1,4 +1,4 @@
-<TS language="bg" version="2.1">
+<TS language="bg" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -364,10 +364,6 @@
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
@@ -510,10 +506,6 @@
         <source>&amp;Main</source>
         <translation>&amp;Основни</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>&amp;Такса за изходяща трансакция</translation>
-    </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Пускане на Биткоин при вход в системата</translation>
diff --git a/src/qt/locale/bitcoin_bs.ts b/src/qt/locale/bitcoin_bs.ts
index fc5e6d270e76..86526022fe2e 100644
--- a/src/qt/locale/bitcoin_bs.ts
+++ b/src/qt/locale/bitcoin_bs.ts
@@ -1,4 +1,4 @@
-<TS language="bs" version="2.1">
+<TS language="bs" version="2.0">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 1e19a3ff18b1..8f06ac3aa707 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1,4 +1,4 @@
-<TS language="ca" version="2.1">
+<TS language="ca" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -516,10 +516,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selecció de l'adreça de control de monedes</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantitat:</translation>
@@ -568,10 +564,6 @@ Address: %4
         <source>Amount</source>
         <translation>Quantitat</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adreça</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -938,14 +930,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Paga &amp;comissió de transacció</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
@@ -974,14 +958,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Permet connexions entrants</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adreça IP del proxy (p. ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -2929,10 +2905,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 9d49da2dbddc..d3bf33ebfbeb 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1,4 +1,4 @@
-<TS language="ca@valencia" version="2.1">
+<TS language="ca@valencia" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -496,10 +496,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selecció de l'adreça de control de monedes</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantitat:</translation>
@@ -548,10 +544,6 @@ Address: %4
         <source>Amount</source>
         <translation>Quantitat</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adreça</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -918,14 +910,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Paga &amp;comissió de transacció</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
@@ -954,14 +938,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Permet connexions entrants</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adreça IP del proxy (p. ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -2893,10 +2869,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 5fa69e798d3a..60c6fa30f4cf 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1,4 +1,4 @@
-<TS language="ca_ES" version="2.1">
+<TS language="ca_ES" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -516,10 +516,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selecció de l'adreça de control de monedes</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantitat:</translation>
@@ -568,10 +564,6 @@ Address: %4
         <source>Amount</source>
         <translation>Quantitat</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adreça</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -938,14 +930,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Comissió opcional de transacció per kB que ajuda a assegurar que les transaccions es processen ràpidament. La majoria de transaccions són d'1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Paga &amp;comissió de transacció</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Inicia automàticament el Bitcoin després de l'inici de sessió del sistema.</translation>
@@ -974,14 +958,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Permet connexions entrants</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Connecta a través d'un proxy SOCKS (proxy per defecte):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adreça IP del proxy (p. ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -2929,10 +2905,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuït sota la llicència de programari MIT/X11. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: ha fallat escoltar les connexions entrants (l'escoltament ha retornat l'error %s)</translation>
diff --git a/src/qt/locale/bitcoin_cmn.ts b/src/qt/locale/bitcoin_cmn.ts
index 3286f126982b..09ff0acf026e 100644
--- a/src/qt/locale/bitcoin_cmn.ts
+++ b/src/qt/locale/bitcoin_cmn.ts
@@ -1,4 +1,4 @@
-<TS language="cmn" version="2.1">
+<TS language="cmn" version="2.0">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index 44fda5afed44..bc2a2ef7b5d0 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1,4 +1,4 @@
-<TS language="cs" version="2.1">
+<TS language="cs" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -504,10 +504,6 @@ Adresa: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Volba adres v rámci ruční správy mincí</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Počet:</translation>
@@ -556,10 +552,6 @@ Adresa: %4
         <source>Amount</source>
         <translation>Částka</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -926,14 +918,6 @@ Adresa: %4
         <source>&amp;Main</source>
         <translation>&amp;Hlavní</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Dobrovolný transakční poplatek za každý započatý kB dopomáhá k rychlému zpracování tvých transakcí. Většina transakcí má do 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Platit &amp;transakční poplatek</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automaticky spustí Bitcoin po přihlášení do systému.</translation>
@@ -962,14 +946,6 @@ Adresa: %4
         <source>Allow incoming connections</source>
         <translation>Přijímat příchozí spojení</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Připojí se do Bitcoinové sítě přes SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Připojit přes SOCKS proxy (výchozí proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP adresa proxy (např. IPv4: 127.0.0.1/IPv6: ::1)</translation>
@@ -2918,10 +2894,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Vytvářet nové soubory s výchozími systémovými právy namísto umask 077 (uplatní se, pouze pokud je vypnutá funkce peněženky)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Šířen pod licencí MIT/X11, viz přiložený soubor COPYING nebo &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Chyba: Nelze naslouchat příchozí spojení (listen vrátil chybu %s)</translation>
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index cf82f2be27d5..c68fc274f320 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -1,4 +1,4 @@
-<TS language="cy" version="2.1">
+<TS language="cy" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -196,10 +196,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Cyfeiriad</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dyddiad</translation>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 05ee62e020fc..f73359109849 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1,4 +1,4 @@
-<TS language="da" version="2.1">
+<TS language="da" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -525,8 +525,8 @@ Adresse: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Adressevalg for coin-styring</translation>
+        <source>Coin Selection</source>
+        <translation>Coin-styring</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -577,8 +577,12 @@ Adresse: %4
         <translation>Beløb</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adresse</translation>
+        <source>Received with label</source>
+        <translation>Modtaget med mærke</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Modtaget med adresse</translation>
     </message>
     <message>
         <source>Date</source>
@@ -950,14 +954,6 @@ Adresse: %4
         <source>&amp;Main</source>
         <translation>&amp;Generelt</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Valgfrit transaktionsgebyr pr. kB, der hjælper dine transaktioner med at blive behandlet hurtigt. De fleste transaktioner er på 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Betal transaktions&amp;gebyr</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Start Bitcoin automatisk, når der logges ind på systemet.</translation>
@@ -986,14 +982,6 @@ Adresse: %4
         <source>Allow incoming connections</source>
         <translation>Tillad indkommende forbindelser</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Forbind til Bitcoin-netværket gennem en SOCKS-proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Forbind gennem SOCKS-proxy (standard-proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-adresse for proxyen (fx IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1054,6 +1042,14 @@ Adresse: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Konfigurér port vha. &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Forbind til Bitcoin-netværket gennem en SOCKS5-proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Forbind gennem SOCKS5-proxy (standard-proxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy-&amp;IP:</translation>
@@ -1844,6 +1840,78 @@ Adresse: %4
         <source>Custom change address</source>
         <translation>Tilpasset byttepengeadresse</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transaktionsgebyr:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Vælg …</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>sammenfold gebyropsætning</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimér</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Hvis det brugertilpassede gebyr er sat til 1000 satoshis, og transaktionen kun fylder 250 byte, betaler "pr. kilobyte" kun 250 satoshis i gebyr, mens "mindst" betaler 1000 satoshis. For transaktioner større end en kilobyte betaler begge pr. kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>pr. kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Hvis det brugertilpassede gebyr er sat til 1000 satoshis, og transaktionen kun fylder 250 byte, betaler "pr. kilobyte" kun 250 satoshis i gebyr, mens "total mindst" betaler 1000 satoshis. For transaktioner større end en kilobyte betaler begge pr. kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total mindst</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Det er helt fint kun at betale det minimale gebyr, så længe den totale transaktionsvolumen er mindre end den plads, der er tilgængelig i blokkene. Men vær opmærksom på, at dette kan ende ud i transaktioner, der aldrig bliver bekræftet, når der bliver større forespørgsel efter bitcoin-transaktioner, end hvad netværket kan bearbejde.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(læs værktøjstippet)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Anbefalet:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Brugertilpasset:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Smart-gebyr er ikke initialiseret endnu. Dette tager typisk nogle få blokke …)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Bekræftelsestid:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>hurtig</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Send som nul-gebyr-transaktion hvis muligt</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(bekræftelse kan tage længere)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Send til flere modtagere på en gang</translation>
@@ -1948,6 +2016,18 @@ Adresse: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transaktionen blev afvist! Dette kan ske, hvis nogle af dine bitcoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine bitcoins er blevet brugt i kopien, men ikke er markeret som brugt her.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Et gebyr højere end %1 anses som et vanvittigt højt gebyr.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Betal kun det minimale gebyr på %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Bekræftelse vurderes at begynde inden for %1 blok(ke).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Advarsel: Ugyldig Bitcoin-adresse</translation>
@@ -2754,6 +2834,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Slet alle transaktioner i tegnebogen og genskab kun disse dele af blokkæden gennem -rescan under opstart</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribueret under MIT-softwarelicensen; se den vedlagte fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme.</translation>
@@ -2986,10 +3070,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Opret nye filer med systemstandard for rettigheder i stedet for umask 077 (kun virksomt med tegnebogsfunktionalitet slået fra)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribueret under MIT/X11-softwarelicensen. Se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Fejl: Lytning efter indkommende forbindelser mislykkedes (lytning resultarede i fejl %s)</translation>
@@ -3010,6 +3090,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre end dette opfattes som nulgebyr for oprettelse af transaktion (standard: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maksimal størrelse på data i transaktioner til dataoverførsel, som vi videresender og miner (standard: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Forespørgsel</translation>
@@ -3018,6 +3102,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sæt maksimumstørrelse for højprioritet/lavgebyr-transaktioner i byte (standard: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Sæt antaller af tråde for coin-generering, hvis aktiveret (-1 = alle kerner, standard: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dette produkt indeholder software, der er udviklet af OpenSSL-projektet for brug i OpenSSL-værktøjskassen &lt;https://www.openssl.org/&gt;, samt kryptografisk software, der er skrevet af Eric Young, samt UPnP-software, der er skrevet af Thomas Bernard.</translation>
@@ -3122,6 +3210,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Send transaktioner som nul-gebyr-transaktioner hvis muligt (standard: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle tilvalg for fejlsøgning (brug: --help -help-debug)</translation>
@@ -3262,10 +3354,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
         <translation>Udskriv fejlsøgningsinformation (standard: %u, angivelse af &lt;kategori&gt; er valgfri)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation>Sæt processorbegrænsning for når generering er slået til (-1 = ubegrænset, standard: %d)</translation>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Brug separat SOCS5-proxy for at nå andre knuder via Tor skjulte tjenester (standard: %s)</translation>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 8bc1c046a1f3..9462f668d3df 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1,4 +1,4 @@
-<TS language="de" version="2.1">
+<TS language="de" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -520,8 +520,8 @@ Adresse: %4</translation>
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>"Coin Control"-Adressauswahl</translation>
+        <source>Coin Selection</source>
+        <translation>Münzauswahl ("Coin Control")</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -572,8 +572,12 @@ Adresse: %4</translation>
         <translation>Betrag</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adresse</translation>
+        <source>Received with label</source>
+        <translation>Empfangen über Bezeichnung</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Empfangen über Adresse</translation>
     </message>
     <message>
         <source>Date</source>
@@ -949,14 +953,6 @@ Adresse: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Allgemein</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Optionale Transaktionsgebühr pro kB, die sicherstellt, dass Ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Transaktions&amp;gebühr bezahlen</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Bitcoin nach der Anmeldung am System automatisch ausführen.</translation>
@@ -985,14 +981,6 @@ Adresse: %4</translation>
         <source>Allow incoming connections</source>
         <translation>Erlaubt eingehende Verbindungen</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Über einen SOCKS-Proxy mit dem Bitcoin-Netzwerk verbinden.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>Über einen SOCKS-Proxy &amp;verbinden (Standardproxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-Adresse des Proxies (z.B. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1053,6 +1041,14 @@ Adresse: %4</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Portweiterleitung via &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Über einen SOCKS5-Proxy mit dem Bitcoin-Netzwerk verbinden.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>Über einen SOCKS5-Proxy &amp;verbinden (Standardproxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy-&amp;IP:</translation>
@@ -1843,6 +1839,66 @@ Adresse: %4</translation>
         <source>Custom change address</source>
         <translation>Benutzerdefinierte Wechselgeld-Adresse</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transaktionsgebühr:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Auswählen...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Transaktionsgebühreneinstellungen ausblenden</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimieren</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>pro Kilobyte</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>Mindestbetrag</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(den Hinweistext lesen)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Empfehlungen:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Benutzerdefiniert:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Intelligente Gebührenlogik ist noch nicht verfügbar. Normalerweise dauert dies einige Blöcke lang...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Bestätigungszeit:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>schnell</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Wenn möglich als gebührenfreie Transaktion senden</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(Bestätigung kann länger dauern)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>An mehrere Empfänger auf einmal überweisen</translation>
@@ -1947,6 +2003,18 @@ Adresse: %4</translation>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Eine höhere Gebühr als %1 wird als unsinnig hohe Gebühr angesehen.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Nur die minimale Gebühr in Höhe von %1 zahlen</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Voraussichtlicher Beginn der Bestätigung innerhalb von %1 Blöcken.</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Warnung: Ungültige Bitcoin-Adresse</translation>
@@ -2805,6 +2873,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Warnung: wallet.dat beschädigt, Datenrettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls Ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie von einer Datensicherung wiederherstellen.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Gegenstellen die sich von der angegebenen Netzmaske oder IP-Adresse aus verbinden immer zulassen. Kann mehrmals angegeben werden.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(Standard: 1)</translation>
@@ -2981,10 +3053,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Neue Dateien mit Standard-Systemrechten erzeugen, anstatt mit umask 077 (nur mit deaktivierter Walletfunktion nutzbar)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Veröffentlicht unter der MIT/X11-Softwarelizenz, siehe beiligende Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Fehler: Abhören nach eingehenden Verbindungen fehlgeschlagen (listen meldete Fehler %s)</translation>
@@ -3005,13 +3073,21 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</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>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation>Maximale Größe in Byte von Transaktionen hoher Priorität/mit niedrigen Gebühren festlegen (Standard: %d)</translation>
+        <translation>Maximale Größe in Byte von "high-priority/low-fee"-Transaktionen festlegen (Standard: %d)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Maximale Anzahl an Threads zur Bitcoinerzeugung, wenn aktiviert, festlegen (-1 = alle Kerne, Standard: %d)</translation>
     </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
@@ -3117,6 +3193,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Transaktionen, wenn möglich, als gebührenfreie Transaktion senden (Standard: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zeige alle Debuggingoptionen (Benutzung: --help -help-debug)</translation>
@@ -3225,6 +3305,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fehler beim Laden von wallet.dat: Wallet beschädigt</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = TX-Metadaten wie z.B. Accountbesitzer und Zahlungsanforderungsinformationen behalten, 2 = TX-Metadaten verwerfen)</translation>
+    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
         <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: %u)</translation>
@@ -3233,6 +3317,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Wenn keine Transaktionsgebühr festgelegt wurde eine Gebühr einbeziehen, sodass Transaktionen im Schnitt innerhalb von &lt;n&gt; Blöcken bestätigt werden (Standard: %u)</translation>
+    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: %u)</translation>
@@ -3249,10 +3337,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
         <translation>Debugginginformationen ausgeben (Standard: %u, &lt;category&gt; anzugeben ist optional)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation>Legt ein Prozessor-/CPU-Kernlimit fest, wenn CPU-Mining aktiviert ist (-1 = unbegrenzt, Standard: %d)</translation>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: %s)</translation>
@@ -3265,6 +3349,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Acceptable ciphers (default: %s)</source>
         <translation>Zulässige Chiffren (Standard: %s)</translation>
     </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Adressen von Gegenstellen immer über DNS-Namensauflösung abfragen (Standard: %u)</translation>
+    </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: %u)</source>
         <translation>Sicherheitsmodus deaktivieren, übergeht ein echtes Sicherheitsmodusereignis (Standard: %u)</translation>
@@ -3377,6 +3465,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
         <translation>Unbestätigtes Wechselgeld darf beim Senden von Transaktionen ausgegeben werden (Standard: %u)</translation>
     </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Beenden, nachdem Blöcke vom Datenträger importiert wurden (Standard: %u)</translation>
+    </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
         <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: %u)</translation>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index b4e15ae2dfba..1a1c918c5bc9 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1,4 +1,4 @@
-<TS language="el_GR" version="2.1">
+<TS language="el_GR" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -497,10 +497,6 @@ Address: %4
         <source>Amount</source>
         <translation>Ποσό</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Διεύθυνση</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Ημερομηνία</translation>
@@ -776,14 +772,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Κύριο</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Η προαιρετική αμοιβή για κάθε kB επισπεύδει την επεξεργασία των συναλλαγών σας. Οι περισσότερες συναλλαγές είναι 1 kB. </translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Αμοιβή &amp;συναλλαγής</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Αυτόματη εκκίνηση του Bitcoin μετά την εισαγωγή στο σύστημα</translation>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 4496dcc3d98c..5189310e649a 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1,4 +1,4 @@
-<TS language="eo" version="2.1">
+<TS language="eo" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -536,10 +536,6 @@ Adreso: %4
         <source>Amount</source>
         <translation>Sumo</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adreso</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dato</translation>
@@ -882,14 +878,6 @@ Adreso: %4
         <source>&amp;Main</source>
         <translation>Ĉ&amp;efa</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Nedeviga krompago por ĉiu kB, kiu helpas plirapidigi la traktadon de via transakcio. Plej multaj transakcioj grandas je 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Krompago</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Aŭtomate lanĉi Bitmonon post ensaluto al la sistemo.</translation>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 0cb8991e11db..71f7e9f4c9cb 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1,4 +1,4 @@
-<TS language="es" version="2.1">
+<TS language="es" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -524,10 +524,6 @@ Dirección: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selección de direcciones bajo Coin Control</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantidad:</translation>
@@ -576,10 +572,6 @@ Dirección: %4
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
@@ -954,14 +946,6 @@ Dirección: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Comisión de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Pagar comisión de &amp;transacción</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Iniciar Bitcoin automáticamente al encender el sistema.</translation>
@@ -990,14 +974,6 @@ Dirección: %4
         <source>Allow incoming connections</source>
         <translation>Aceptar conexiones entrantes</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Conectarse a la red Bitcoin a través de un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Conectarse a través de proxy SOCKS (proxy predeterminado):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (p. ej. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -2480,6 +2456,10 @@ Dirección: %4
         <source>Type of transaction.</source>
         <translation>Tipo de transacción.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Sea o no una dirección sólo está involucrada en esta transacción.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Dirección de destino de la transacción.</translation>
@@ -2962,6 +2942,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permitir conexiones JSON-RPC de origen especificado. Válido para son una sola IP (por ejemplo 1.2.3.4), una red/máscara de red (por ejemplo 1.2.3.4/255.255.255.0) o una red/CIDR (e.g. 1.2.3.4/24). Esta opción se puede especificar varias veces</translation>
+    </message>
     <message>
         <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
         <translation>Ocurrió un error al configurar la dirección de RPC %s puerto %u para escuchar en: %s</translation>
@@ -2986,18 +2970,30 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crear nuevos archivos con permisos por defecto del sistema, en lugar de umask 077 (sólo efectivo con la funcionalidad de monedero desactivada)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuido bajo la licencia de software MIT/X11, vea la copia del archivo adjunto o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: la escucha para conexiones entrantes falló (la escucha regresó el error %s)</translation>
     </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: Unsupported argumento -socks encontrados. SOCKS versión ajuste ya no es posible, sólo SOCKS5 proxies son compatibles.</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Tarifas (en BTC/Kb) más pequeños que esto se consideran cero cuota de reinstalación (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Tarifas (en BTC/Kb) más pequeños que esto se consideran cero cuota para la creación de la transacción (por defecto: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Consulta de direcciones pares mediante búsqueda de DNS, si bajo en direcciones (por defecto: 1 a menos que - conectar)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
@@ -3010,6 +3006,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>Aviso: ¡Comprueba la fecha y hora de tu ordenador y verifica si es correcta! Si no es correcta Bitcoin Core no funcionará adecuadamente.</translation>
     </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>A los equipos en lista blanca no se les pueden prohibir los ataques DoS y sus transacciones siempre son retransmitidas, incluso si ya están en el mempool, es útil por ejemplo para un gateway.</translation>
+    </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
         <translation>Conectar usando SOCKS5 proxy</translation>
@@ -3022,10 +3022,18 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Cuota (in BTC/kB) para añadir a las transacciones que envíes (por defecto: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Información</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>La inicialización de la verificación de validez falló. Se está apagando Bitcoin Core.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -3034,6 +3042,26 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s' (debe ser por lo menos %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Máscara de red inválida especificada en -whitelist: '%s'</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Mantener como máximo &lt;n&gt; bloques no conectables en memoria (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Mantener como máximo &lt;n&gt; transacciones no conectables en memoria (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Necesita especificar un puerto con -whitebind: '%s'</translation>
+    </message>
     <message>
         <source>Node relay options:</source>
         <translation>Opciones de nodos de retransmisión:</translation>
@@ -3182,6 +3210,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Registrar prioridad de las transacciones y cuota por kB cuando se minen bloques (por defecto: %u)</translation>
     </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Mantener el índice completo de transacciones, usado por la llamada rpc de getrawtransaction  (por defecto: %u)</translation>
+    </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
         <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: %u)</translation>
@@ -3270,6 +3302,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Print block tree on startup (default: %u)</source>
         <translation>Imprimir árbol de bloques al iniciar (predeterminado: %u)</translation>
     </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Retransmitir y minar transacciones de transporte de datos (por defecto: %u)</translation>
+    </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Ejecutar un hilo para limpiar de la memoria el monedero periódicamente (predeterminado:  %u)</translation>
@@ -3372,7 +3408,7 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
     </message>
     <message>
         <source>Done loading</source>
-        <translation>Generado pero no aceptado</translation>
+        <translation>Se terminó de cargar</translation>
     </message>
     <message>
         <source>To use the %s option</source>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index 930aac844910..e6f81e650f0c 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -1,4 +1,4 @@
-<TS language="es_CL" version="2.1">
+<TS language="es_CL" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -355,10 +355,6 @@ Dirección: %4</translation>
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
@@ -478,10 +474,6 @@ Dirección: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Comisión de &amp;transacciónes</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Inicia Bitcoin automáticamente despues de encender el computador</translation>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 8099b182aed5..2e5daf4cdb4e 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -1,4 +1,4 @@
-<TS language="es_DO" version="2.1">
+<TS language="es_DO" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -476,10 +476,6 @@ Dirección: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selección de la dirección de control de la moneda</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantidad:</translation>
@@ -524,10 +520,6 @@ Dirección: %4
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
@@ -874,14 +866,6 @@ Dirección: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Tarifa de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Comisión de &amp;transacciones</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Iniciar Bitcoin automáticamente al encender el sistema.</translation>
@@ -894,10 +878,6 @@ Dirección: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Conéctese a la red Bitcoin través de un proxy SOCKS.</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (ej. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index 93d9f6473d1f..bedc5d243e09 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -1,4 +1,4 @@
-<TS language="es_MX" version="2.1">
+<TS language="es_MX" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -396,10 +396,6 @@
         <source>Amount</source>
         <translation>Monto</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Domicilio</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index 8bca84c21935..a5a1583b19c9 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -1,4 +1,4 @@
-<TS language="es_UY" version="2.1">
+<TS language="es_UY" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -196,10 +196,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Direccion </translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 82ed0337abe1..801fcf6258e0 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1,4 +1,4 @@
-<TS language="et" version="2.1">
+<TS language="et" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -407,10 +407,6 @@ Aadress: %4⏎</translation>
         <source>Amount</source>
         <translation>Kogus</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Aadress</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Kuupäev</translation>
@@ -549,10 +545,6 @@ Aadress: %4⏎</translation>
         <source>Options</source>
         <translation>Valikud</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Tasu tehingu &amp;fee</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Käivita Bitcoin süsteemi logimisel.</translation>
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index 9a570890a198..ea0ce1a67d3e 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -1,4 +1,4 @@
-<TS language="eu_ES" version="2.1">
+<TS language="eu_ES" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -212,10 +212,6 @@
         <source>Amount</source>
         <translation>Kopurua</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Helbidea</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index c33bbdf6b4bf..475515f4b72d 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1,4 +1,4 @@
-<TS language="fa" version="2.1">
+<TS language="fa" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -436,10 +436,6 @@ Address: %4
         <source>Amount</source>
         <translation>مبلغ</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>نشانی</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>تاریخ</translation>
@@ -626,14 +622,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;عمومی</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>کارمزد اختیاریِ هر کیلوبایت برای انتقال سریع‌تر تراکنش. اکثر تراکنش‌ها ۱ کیلوبایتی هستند.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>پرداخت &amp;کارمزد تراکنش</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>اجرای خودکار بیت‌کوین در زمان ورود به سیستم.</translation>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 5ff33fee1a79..1a639a859200 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1,4 +1,4 @@
-<TS language="fa_IR" version="2.1">
+<TS language="fa_IR" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -289,10 +289,6 @@ Address: %4
         <source>Amount</source>
         <translation>میزان</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>حساب</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>تاریخ</translation>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 76ec6d4bf5d0..9a2eadd6ea28 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1,4 +1,4 @@
-<TS language="fi" version="2.1">
+<TS language="fi" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -519,10 +519,6 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Kolikkokontrollin osoitteen valinta</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Määrä:</translation>
@@ -571,10 +567,6 @@ Osoite: %4</translation>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Osoite</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Aika</translation>
@@ -941,14 +933,6 @@ Osoite: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Yleiset</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Valinnainen rahansiirtopalkkio per kB auttaa varmistamaan että rahansiirtosi prosessoidaan nopeasti. Useimmat rahansiirrot ovat alle 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Maksa rahansiirtopalkkio</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Käynnistä Bitcoin kirjautumisen yhteydessä.</translation>
@@ -977,14 +961,6 @@ Osoite: %4</translation>
         <source>Allow incoming connections</source>
         <translation>Hyväksy sisääntulevia yhteyksiä</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Yhdistä Bitcoin-verkkoon SOCKS proxyn kautta.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Yhdistä SOCKS proxyn kautta (oletus proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP osoite proxille (esim. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index 86c23b6c3e79..71a151941119 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1,4 +1,4 @@
-<TS language="fr" version="2.1">
+<TS language="fr" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>À jour</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>%n bloc de l'historique transactionnel a été traité</numerusform><numerusform>%n blocs de l'historique transactionnel ont été traités</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Rattrapage en cours…</translation>
@@ -521,8 +525,8 @@ Adresse : %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Sélection de l'adresse de contrôle des pièces</translation>
+        <source>Coin Selection</source>
+        <translation>Sélection des pièces</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -573,8 +577,12 @@ Adresse : %4
         <translation>Montant</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adresse</translation>
+        <source>Received with label</source>
+        <translation>Reçu avec une étiquette</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Reçu avec une adresse</translation>
     </message>
     <message>
         <source>Date</source>
@@ -904,6 +912,10 @@ Adresse : %4
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n Go d'espace libre disponible</numerusform><numerusform>%n Go d'espace libre disponibles</numerusform></translation>
+    </message>
     </context>
 <context>
     <name>OpenURIDialog</name>
@@ -938,14 +950,6 @@ Adresse : %4
         <source>&amp;Main</source>
         <translation>Réglages &amp;principaux</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Frais de transaction optionnel par ko qui aident à garantir un traitement rapide des transactions. La plupart des transactions utilisent 1 ko.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Payer des &amp;frais de transaction</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Démarrer Bitcoin automatiquement après avoir ouvert une session sur l'ordinateur.</translation>
@@ -974,14 +978,6 @@ Adresse : %4
         <source>Allow incoming connections</source>
         <translation>Permettre les transactions entrantes</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Se connecter au réseau Bitcoin par un mandataire SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>Se &amp;connecter par un mandataire SOCKS (mandataire par défaut) :</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adresse IP du mandataire (par ex. IPv4 : 127.0.0.1 / IPv6 : ::1)</translation>
@@ -1042,6 +1038,14 @@ Adresse : %4
         <source>Map port using &amp;UPnP</source>
         <translation>Mapper le port avec l'&amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Se connecter au réseau Bitcoin par un mandataire SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>Se &amp;connecter par un mandataire SOCKS5 (mandataire par défaut) :</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP du serveur mandataire :</translation>
@@ -1191,7 +1195,7 @@ Adresse : %4
     </message>
     <message>
         <source>Spendable:</source>
-        <translation>Disponible:</translation>
+        <translation>Disponible :</translation>
     </message>
     <message>
         <source>Recent transactions</source>
@@ -1832,6 +1836,78 @@ Adresse : %4
         <source>Custom change address</source>
         <translation>Adresse personnalisée de monnaie rendue</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Frais de transaction :</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Choisir...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>réduire les paramètres des frais</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimiser</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si les frais personnalisés sont définis à 1 000 satoshis et que la transaction est seulement de 250 octets, donc le « par kilo-octet » ne paiera que 250 satoshis de frais, alors que le « au moins » paiera 1 000 satoshis. Pour des transactions supérieures à un kilo-octet, les deux paieront par kilo-octets.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>par kilo-octet</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si les frais personnalisés sont définis à 1 000 satoshis et que la transaction est seulement de 250 octets, donc le « par kilo-octet » ne paiera que 250 satoshis de frais, alors que le « total au moins » paiera 1 000 satoshis. Pour des transactions supérieures à un kilo-octet, les deux paieront par kilo-octets.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total au moins</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Il est correct de payer les frais minimum tant que le volume transactionnel est inférieur à l'espace dans les blocs. Mais soyez conscient que ceci pourrait résulter en une transaction n'étant jamais confirmée une fois qu'il y aura plus de transactions que le réseau ne pourra en traiter.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(lire l'infobulle)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recommandés :</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personnalisés : </translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Les frais intelligents ne sont pas encore initialisés. Ceci prend habituellement quelques blocs...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Temps de confirmation :</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rapide</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Envoyer si possible une transaction sans frais</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(la confirmation pourrait prendre plus longtemps)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Envoyer à plusieurs destinataires à la fois</translation>
@@ -1936,6 +2012,18 @@ Adresse : %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>La transaction a été rejetée ! Ceci peut arriver si certaines pièces de votre portefeuille étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et que des pièces ont été dépensées dans la copie sans être marquées comme telles ici.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Des frais supérieurs à %1 sont considérés comme follement élevés.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Payer seulement les frais minimum de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Début de confirmation estimé à %1 bloc(s).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Avertissement : adresse Bitcoin invalide</translation>
@@ -2466,7 +2554,7 @@ Adresse : %4
     </message>
     <message>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation>Détermine si une adresse de type watch-only est impliquée dans cette transaction.</translation>
+        <translation>Une adresse juste-regarder est-elle impliquée dans cette transaction.</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
@@ -2563,6 +2651,10 @@ Adresse : %4
         <source>Export Transaction History</source>
         <translation>Exporter l'historique des transactions</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Juste-regarder :</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>L'exportation a échoué</translation>
@@ -2738,6 +2830,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Supprimer toutes les transactions du portefeuille et ne récupérer que ces parties de la chaîne de bloc avec -rescan au démarrage</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribué sous la licence MIT d'utilisation d'un logiciel. Consultez le fichier joint COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Passer en mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs sont résolus instantanément.</translation>
@@ -2790,6 +2886,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Avertissement : wallet.dat corrompu, données récupérées ! Le fichier wallet.dat original a été enregistré en tant que wallet.{timestamp}.bak dans %s ; si votre solde ou transactions sont incorrects vous devriez effectuer une restauration depuis une sauvegarde.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Pairs de la liste blanche se connectant à partir du masque réseau ou de l'IP donné. Peut être spécifié plusieurs fois.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(par défaut : 1)</translation>
@@ -2852,7 +2952,7 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Error: A fatal internal error occured, see debug.log for details</source>
-        <translation>Erreur: Une erreur fatale s'est produite, voir debug.log pour plus de détails</translation>
+        <translation>Erreur : une erreur interne fatale s'est produite. Voir debug.log pour des détails</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
@@ -2888,7 +2988,7 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
-        <translation>Se connecter uniquement aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
+        <translation>Seulement se connecter aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou oignon)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
@@ -2910,6 +3010,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Ceci est à l'intention des outils de test de régression et du développement applicatif.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Vérification des blocs en cours...</translation>
@@ -2955,12 +3059,12 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <translation>Impossible d’obtenir un verrou sur le répertoire de données %s. Bitcoin Core fonctionne probablement déjà.</translation>
     </message>
     <message>
-        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
-        <translation>Créer de nouveaux fichiers avec les permissions système par défaut, au lieu de umask 077 (effectif seulement avec la fonction du portefeuille désactivée)</translation>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limiter continuellement les transactions gratuites à &lt;n&gt;*1000 octets par minute (par défaut : %u)</translation>
     </message>
     <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribué sous la licence logiciel MIT/X11, consultez le fichier joint COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Créer de nouveaux fichiers avec les permissions système par défaut, au lieu de umask 077 (effectif seulement avec la fonction du portefeuille désactivée)</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
@@ -2982,6 +3086,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Les frais (en BTC/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour la création de transactions (par défaut : %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Quantité maximale de données dans les transactions du porteur de données que nous relayons et minons (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Demander les adresses des pairs par recherche DNS si l'on manque d'adresses (par défaut : 1 sauf si -connect)</translation>
@@ -2990,6 +3098,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Définir le nombre de fils de génération de pièces, si elle est activée (-1 = tous les cœurs, par défaut : %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL &lt;https://www.openssl.org/&gt; et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</translation>
@@ -3060,7 +3172,7 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
-        <translation>Garder au plus &lt;n&gt; blocs non connectables en mémoire (par défaut : %u)</translation>
+        <translation>Garder au plus &lt;n&gt; transactions non connectables en mémoire (par défaut : %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -3094,6 +3206,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Envoyer si possible les transactions comme étant sans frais (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Montrer toutes les options de débogage (utilisation : --help --help-debug)</translation>
@@ -3128,7 +3244,7 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Utiliser l'UPnP pour rediriger le port d'écoute (par défaut : 1 lors de l'écoute)</translation>
+        <translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 lors de l'écoute)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
@@ -3202,14 +3318,166 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erreur lors du chargement de wallet.dat : portefeuille corrompu</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = conserver les métadonnées de transmission, par ex. les informations du propriétaire du compte et de la demande de paiement, 2 = abandonner les métadonnées de transmission)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Purger l’activité de la base de données de la zone de mémoire vers le journal sur disque tous les &lt;n&gt; mégaoctets (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Degré de profondeur de la vérification des blocs -checkblocks (0-4, par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Si paytxfee n'est pas défini, inclure des frais suffisants afin que les transactions soient confirmées en moyenne en n blocs (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Lors du minage, journaliser la priorité des transactions et les frais par ko (par défaut : %u) </translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Maintenir un index complet des transactions, utilisé par l'appel RPC getrawtransaction (obtenir la transaction brute) (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Délai en secondes de refus de reconnexion pour les pairs présentant un mauvais comportement (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Extraire les informations de débogage (par défaut : %u, fournir &lt;category&gt; est optionnel)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Utiliser un serveur mandataire SOCKS5 séparé pour atteindre les pairs par les services cachés de Tor (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Chiffrements acceptables (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Toujours demander les adresses des pairs par recherche DNS (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Désactiver le mode sans échec, passer outre un événement sans échec réel (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erreur lors du chargement de wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forcer le mode sans échec (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Générer des pièces (défaut : %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Nombre de blocs à vérifier au démarrage (par défaut : %u, 0 = tous)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inclure les adresses IP à la sortie de débogage (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Adresse -proxy invalide : « %s »</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limiter la taille du cache des signatures à &lt;n&gt; entrées (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Écouter les connexions JSON-RPC sur &lt;port&gt; (par défaut : %u ou tesnet : %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Écouter les connexions sur &lt;port&gt; (par défaut : %u ou tesnet : %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Garder au plus &lt;n&gt; connexions avec les pairs (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Tampon maximal de réception par connexion, &lt;n&gt;*1000 octets (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Tampon maximal d'envoi par connexion », &lt;n&gt;*1000 octets (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>N'accepter qu'une chaîne de blocs correspondant aux points de vérification intégrés (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Ajouter l'horodatage au début de la sortie de débogage (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Imprimer l'arborescence des blocs au démarrage (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Relayer et miner les transactions du porteur de données (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Relayer les multisignatures non-P2SH (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Exécuter une tâche pour purger le portefeuille périodiquement (par défaut : %u) </translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Définir la taille de la réserve de clefs à &lt;n&gt; (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Définir la taille de bloc minimale en octets (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Définit le drapeau DB_PRIVATE dans l'environnement de la BD du portefeuille (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Spécifier le fichier de configuration (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Spécifier le délai d'expiration de la connexion en millisecondes (minimum : 1, par défaut : %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Spécifier le fichier pid (par défaut : %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Dépenser la monnaie non confirmée lors de l'envoi de transactions (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Cesser l'exécution après l'importation des blocs du disque (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Seuil de déconnexion des pairs présentant un mauvais comportement (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Réseau inconnu spécifié sur -onlynet : « %s »</translation>
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index 56be717a8d14..eae0b00b76c0 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -1,4 +1,4 @@
-<TS language="fr_CA" version="2.1">
+<TS language="fr_CA" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -76,10 +76,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Addresse</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(pas de record)</translation>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 8d9295e5c92a..2252baec732b 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1,4 +1,4 @@
-<TS language="gl" version="2.1">
+<TS language="gl" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -512,10 +512,6 @@ Dirección: %4
         <source>Amount</source>
         <translation>Cantidade</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Dirección</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -818,14 +814,6 @@ Dirección: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Tarifa por kB de transacción opcional que axuda a asegurar que as túas transaccións son procesadas rapidamente. A maioría das transaccións son 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Pagar &amp;tarifa da transacción</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Comezar Bitcoin automáticamente despois de loguearse no sistema.</translation>
diff --git a/src/qt/locale/bitcoin_gu_IN.ts b/src/qt/locale/bitcoin_gu_IN.ts
index b7b091aa39c0..ef99b0dd3943 100644
--- a/src/qt/locale/bitcoin_gu_IN.ts
+++ b/src/qt/locale/bitcoin_gu_IN.ts
@@ -1,4 +1,4 @@
-<TS language="gu_IN" version="2.1">
+<TS language="gu_IN" version="2.0">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 8c05228dbfab..b5470589860d 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1,4 +1,4 @@
-<TS language="he" version="2.1">
+<TS language="he" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -507,10 +507,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>בחירת כתובת שליטה במטבעות</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>כמות:</translation>
@@ -559,10 +555,6 @@ Address: %4
         <source>Amount</source>
         <translation>כמות</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>כתובת</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>תאריך</translation>
@@ -921,14 +913,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;ראשי</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>עמלת העברה כרשות לכל ק״ב תבטיח שההעברה שלך תעובד בזריזות. רוב ההעברות הן בנפח של ק״ב אחד.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>תשלום &amp;עמלת העברה</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>הפעלת ביטקוין אוטומטית לאחר כניסה למערכת.</translation>
@@ -957,14 +941,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>לאפשר חיבורים נכנסים</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>התחברות לרשת ביטקוין דרך מתווך SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>הת&amp;חברות באמצעות מתווך SOCKS (מתווך בררת מחדל):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>כתובת ה־IP של המתווך (לדוגמה IPv4: 127.0.0.1‏ / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index fcb094703f8a..09a8392c27ab 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -1,4 +1,4 @@
-<TS language="hi_IN" version="2.1">
+<TS language="hi_IN" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -268,10 +268,6 @@ Address: %4
         <source>Amount</source>
         <translation>राशि</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>पता</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>taareek</translation>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index 794a7167e378..22831a0fd5aa 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1,4 +1,4 @@
-<TS language="hr" version="2.1">
+<TS language="hr" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -476,10 +476,6 @@ Adresa:%4
         <source>Amount</source>
         <translation>Iznos</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -614,10 +610,6 @@ Adresa:%4
         <source>&amp;Main</source>
         <translation>&amp;Glavno</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Plati &amp;naknadu za transakciju</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automatski pokreni Bitcoin kad se uključi računalo</translation>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 1edd2511eb0b..810954240593 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1,4 +1,4 @@
-<TS language="hu" version="2.1">
+<TS language="hu" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -520,10 +520,6 @@ Cím: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Ellenőrző cím kiválasztása</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Mennyiség:</translation>
@@ -572,10 +568,6 @@ Cím: %4
         <source>Amount</source>
         <translation>Összeg</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Cím</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dátum</translation>
@@ -915,14 +907,6 @@ Cím: %4
         <source>&amp;Main</source>
         <translation>&amp;Fő</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Opcionális, kB-onkénti tranzakciós díj a tranzakcióid minél gyorsabb feldolgozásának elősegítésére.  A legtöbb tranzakció 1 kB-os.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Tranzakciós &amp;díj fizetése</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Induljon el a Bitcoin a számítógép bekapcsolásakor</translation>
@@ -935,10 +919,6 @@ Cím: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>SOCKS proxyn keresztüli csatlakozás a Bitcoin hálózatához.</translation>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Minden kliensbeállítás alapértelmezettre állítása.</translation>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 6056c3a736fc..ea2750ed0839 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1,4 +1,4 @@
-<TS language="id_ID" version="2.1">
+<TS language="id_ID" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -504,10 +504,6 @@ Alamat: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Pilihan alamat pengaturan koin</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Kuantitas:</translation>
@@ -552,10 +548,6 @@ Alamat: %4
         <source>Amount</source>
         <translation>Nilai</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Tanggal</translation>
@@ -890,14 +882,6 @@ Alamat: %4
         <source>&amp;Main</source>
         <translation>&amp;Utama</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Biaya transaksi untuk setiap kB yang membantu transaksi Andi diproses cepat (biayanya opsional). Ukuran transaksi biasanya 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Bayar &amp;biaya transaksi</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Menyalakan Bitcoin secara otomatis setelah masuk ke dalam sistem.</translation>
@@ -910,14 +894,6 @@ Alamat: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Menghubungkan jaringan Bitcoin lewat proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Hubungkan melalui proxy SOCKS (proxy biasa):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Alamat IP proxy (cth. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index ddc7e44c472b..5dbe98b0f8f3 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1,4 +1,4 @@
-<TS language="it" version="2.1">
+<TS language="it" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -521,10 +521,6 @@ Indirizzo: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selezione Indirizzo Coin Control</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantità:</translation>
@@ -573,10 +569,6 @@ Indirizzo: %4
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Indirizzo</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -943,14 +935,6 @@ Indirizzo: %4
         <source>&amp;Main</source>
         <translation>&amp;Principale</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Commissione di transazione per kB: è opzionale e contribuisce ad assicurare che le transazioni siano elaborate velocemente. La maggior parte della transazioni ha dimensioni pari a 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Paga la &amp;commissione</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Avvia automaticamente Bitcoin una volta effettuato l'accesso al sistema.</translation>
@@ -979,14 +963,6 @@ Indirizzo: %4
         <source>Allow incoming connections</source>
         <translation>Permetti connessioni in entrata</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Connessione alla rete Bitcoin attraverso un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Connessione attraverso proxy SOCKS (proxy predefinito):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Indirizzo IP del proxy (es: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1207,6 +1183,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Transazioni non confermate su indirizzi di sola lettura</translation>
     </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>l'equilibrio estratto solo nello sguardo degli indirizzi non è ancora maturo </translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>non sincronizzato</translation>
@@ -1470,6 +1450,14 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Starting Height</source>
         <translation>Blocco di partenza</translation>
     </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>valore di sincronizzazione</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>divieto di segnalazione </translation>
+    </message>
     <message>
         <source>Connection Time</source>
         <translation>Tempo di connessione</translation>
@@ -1590,7 +1578,11 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Unknown</source>
         <translation>Sconosciuto</translation>
     </message>
-    </context>
+    <message>
+        <source>Fetching...</source>
+        <translation>attraente</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index c6ba60ec481f..dd2d8c8c72d5 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1,4 +1,4 @@
-<TS language="ja" version="2.1">
+<TS language="ja" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -523,10 +523,6 @@ Address: %4
         <source>Amount</source>
         <translation>総額</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>アドレス</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>日付</translation>
@@ -773,14 +769,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>メイン (&amp;M)</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>あたなの取引が早く処理されるように任意で kB 毎の取引手数料を設定します。ほとんどの取引は 1 kB です。</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>支払う取引手数料 (&amp;f)</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>システムにログインした時に自動的に Bitcoin を起動します。</translation>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 5a566d4445ba..3faad159adcc 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -1,4 +1,4 @@
-<TS language="ka" version="2.1">
+<TS language="ka" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -484,10 +484,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>მონეტების კონტროლის მისამართის არჩევა</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>რაოდენობა:</translation>
@@ -532,10 +528,6 @@ Address: %4
         <source>Amount</source>
         <translation>თანხა</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>მისამართი</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>თარიღი</translation>
@@ -878,14 +870,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;მთავარი</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>დამატებითი საკომისიო თითო კილობაიტზე; აჩქარებს ტრანსაქციის შესრულებას. ტრანსაქციების უმეტესობა არის 1 კბ.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>ტრანსაქციის სა&amp;ფასურის გადახდა</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>სისტემაში შესვლის შემდეგ Bitcoin-ის ავტომატური გაშვება.</translation>
@@ -906,14 +890,6 @@ Address: %4
         <source>Number of script &amp;verification threads</source>
         <translation>სკრიპტის &amp;ვერიფიცირების ნაკადების რაოდენობა</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Bitcoin-ქსელზე მიერთება SOCKS-პროქსით.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>SO&amp;CKS (ნაგულისხმევი) პროქსი მიერთებისათვის:</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>პროქსის IP-მისამართი (მაგ.: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index e9eddd503c0c..3d38b0021791 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -1,4 +1,4 @@
-<TS language="kk_KZ" version="2.1">
+<TS language="kk_KZ" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -84,10 +84,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(таңбасыз)</translation>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index a8a2fbd16a9e..efc41ec6b708 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1,4 +1,4 @@
-<TS language="ko_KR" version="2.1">
+<TS language="ko_KR" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -504,10 +504,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>코인 컨트롤 주소 선택</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>수량:</translation>
@@ -556,10 +552,6 @@ Address: %4
         <source>Amount</source>
         <translation>거래량</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>주소</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>날짜</translation>
@@ -894,14 +886,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>메인(&amp;M)</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>당신의 거래가 더욱 빠르게 처리될 수 있도록 선택적으로 kBd당 거래 수수료를 지정합니다. 참고로 대부분의 거래들은 1kB입니다.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>송금 수수료(&amp;F)</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>시스템 로그인후에 비트코인을 자동으로 시작합니다.</translation>
@@ -930,14 +914,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>연결 요청을 허용합니다.</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>SOCKS 프록시를 통해 비트코인 네트워크 연결</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>SOCKS 프록시를 거쳐 연결합니다 (기본값 프록시):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>프록시 아이피 주소(예. IPv4:127.0.0.1 / IPv6: ::1)</translation>
@@ -1727,6 +1703,10 @@ Address: %4
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>사용된 주소 목록에 새 주소를 추가하기 위해 제목을 입력합니다. </translation>
     </message>
+    <message>
+        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation>비트코인에 첨부된 메시지: 참고용으로 거래와 함께 저장될 URI. 메모: 이 메시지는 비트코인 네트워크로 전송되지 않습니다.</translation>
+    </message>
     <message>
         <source>This is an unverified payment request.</source>
         <translation>지급요청 미확인입니다</translation>
@@ -2468,6 +2448,10 @@ Address: %4
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>어떤 포트도 반응하지 않습니다. 사용자 반응=0 만약 원한다면</translation>
     </message>
+    <message>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>&lt;카테고리&gt;가 제공되지 않을 경우, 모든 디버깅 정보를 출력</translation>
+    </message>
     <message>
         <source>Importing...</source>
         <translation>들여오기 중...</translation>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index 91b3ccaf10fb..ed7542261cb2 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -1,4 +1,4 @@
-<TS language="ky" version="2.1">
+<TS language="ky" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -72,10 +72,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Дарек</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index cc43762310d8..c399f3615935 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1,4 +1,4 @@
-<TS language="la" version="2.1">
+<TS language="la" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -416,10 +416,6 @@ Inscriptio: %4
         <source>Amount</source>
         <translation>Quantitas</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Inscriptio</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dies</translation>
@@ -562,14 +558,6 @@ Inscriptio: %4
         <source>&amp;Main</source>
         <translation>&amp;Princeps</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Optionalis merces transactionum singulis kB quae adiuvat curare tuas transactiones processas esse celeriter.  Plurimi transactiones 1kB sunt.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Solve &amp;mercedem transactionis</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Pelle Bitcoin per se postquam in systema inire.</translation>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index b195a75d0fdc..1f70400df61a 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1,4 +1,4 @@
-<TS language="lt" version="2.1">
+<TS language="lt" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -475,10 +475,6 @@ Adresas: %4</translation>
         <source>Amount</source>
         <translation>Suma</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresas</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -705,10 +701,6 @@ Adresas: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Pagrindinės</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>&amp;Mokėti sandorio mokestį</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automatiškai paleisti Bitkoin programą įjungus sistemą.</translation>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index f901b14d3680..ac5a1a1396cd 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -1,4 +1,4 @@
-<TS language="lv_LV" version="2.1">
+<TS language="lv_LV" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -274,6 +274,10 @@
         <source>Open &amp;URI...</source>
         <translation>Atvērt &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core klients</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importē blokus no diska...</translation>
@@ -324,7 +328,11 @@
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>Saņe&amp;mt</translation>
+        <translation>&amp;Saņemt</translation>
+    </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Parādīt informāciju par Bitcoin Core</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
@@ -476,10 +484,6 @@ Adrese: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Bitcoin Kontroles Adrešu Atlase</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Daudzums:</translation>
@@ -524,10 +528,6 @@ Adrese: %4
         <source>Amount</source>
         <translation>Daudzums</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adrese</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datums</translation>
@@ -826,10 +826,6 @@ Adrese: %4
         <source>&amp;Main</source>
         <translation>&amp;Galvenais</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>&amp;Maksāt par transakciju</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automātiski sākt Bitcoin pēc pieteikšanās sistēmā.</translation>
@@ -850,14 +846,6 @@ Adrese: %4
         <source>Number of script &amp;verification threads</source>
         <translation>Skriptu &amp;pārbaudes pavedienu skaits</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Savienoties ar Bitcoin tīklu caur SOCKS starpniekserveri.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Savienoties caur SOCKS starpniekserveri (noklusējuma starpniekserveris)</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Starpniekservera IP adrese (piem. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index 515d1b90df69..f1b0174111d7 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -1,4 +1,4 @@
-<TS language="mn" version="2.1">
+<TS language="mn" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -287,10 +287,6 @@ Address: %4
         <source>Amount</source>
         <translation>Хэмжээ</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Хаяг</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Огноо</translation>
@@ -401,10 +397,6 @@ Address: %4
         <source>MB</source>
         <translation>МБ</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Биткойны сүлжээрүү SOCKS проксигоор холбогдох.</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>проксигийн IP хаяг (жишээ нь: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index 47e74111c2da..d2e8efbb4993 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -1,4 +1,4 @@
-<TS language="ms_MY" version="2.1">
+<TS language="ms_MY" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -72,10 +72,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>Alamat</translation>
-    </message>
     </context>
 <context>
     <name>EditAddressDialog</name>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 435a412d09be..bdde3da53476 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1,4 +1,4 @@
-<TS language="nb" version="2.1">
+<TS language="nb" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -525,8 +525,8 @@ Adresse: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Myntkontroll Adresse Valg</translation>
+        <source>Coin Selection</source>
+        <translation>Mynt Valg</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -577,8 +577,12 @@ Adresse: %4
         <translation>Beløp</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adresse</translation>
+        <source>Received with label</source>
+        <translation>Mottatt med merkelapp</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Mottatt med adresse</translation>
     </message>
     <message>
         <source>Date</source>
@@ -954,14 +958,6 @@ Adresse: %4
         <source>&amp;Main</source>
         <translation>&amp;Hoved</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Valgfritt transaksjonsgebyr per kB som sikrer at dine transaksjoner blir raskt prosessert. De fleste transaksjoner er 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Betal &amp;transaksjonsgebyr</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Start Bitcoin automatisk etter innlogging.</translation>
@@ -990,14 +986,6 @@ Adresse: %4
         <source>Allow incoming connections</source>
         <translation>Tillatt innkommende tilkoblinger</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Koble til Bitcoin-nettverket gjennom en SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Koble til gjennom SOCKS proxy (standardvalg proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-adressen til proxyen (f.eks. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1058,6 +1046,14 @@ Adresse: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Sett opp port ved hjelp av &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Koble til Bitcoin-nettverket gjennom en SOCKS5 proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Koble til gjennom SOCKS5 proxy (standardvalg proxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
@@ -1848,6 +1844,78 @@ Adresse: %4
         <source>Custom change address</source>
         <translation>Egendefinert adresse for veksel</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transaksjonsgebyr:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Velg...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Legg ned gebyrinnstillinger</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimer</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Hvis den egendefinerte avgiften er satt til 1000 satoshis og transaksjonen bare er 250 bytes, da vil "per kilobyte" bare betale 250 satoshis i gebyr, mens "minst" betaler 1000 satoshis. For transaksjoner større enn en kilobyte vil begge betale for antall kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Hvis den egendefinerte avgiften er satt til 1000 satoshis og transaksjonen bare er 250 bytes, da vil "per kilobyte" bare betale 250 satoshis i gebyr, mens "minstebeløp" betaler 1000 satoshis. For transaksjoner større enn en kilobyte vil begge betale for antall kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>minstebeløp</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Betaling av bare minimumsavgiften går helt fint så lenge det er mindre transaksjonsvolum enn plass i blokkene. Men vær klar over at dette kan ende opp i en transaksjon som aldri blir bekreftet når det er mer etterspørsel etter Bitcoin-transaksjoner enn nettverket kan behandle.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(les verktøytipset)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Anbefalt:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Egendefinert:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Smartgebyr ikke innført ennå. Dette tar vanligvis noen blokker...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Bekreftelsestid:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rask</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Send uten transaksjonsgebyr hvis mulig</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(bekreftelse kan ta lengre tid)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Send til flere enn en mottaker</translation>
@@ -1952,6 +2020,18 @@ Adresse: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transaksjonen ble avvist!  Dette kan skje hvis noen av myntene i lommeboken allerede er brukt, som hvis du kopierte wallet.dat og mynter ble brukt i kopien uten å bli markert som brukt her.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Et gebyr høyere enn %1 er ansett som et sinnsykt høyt gebyr.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Betal kun minimumsgebyret på %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Beregner å begynne bekreftelse innen %1 blokk(er).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Advarsel: Ugyldig Bitcoin-adresse</translation>
@@ -2757,6 +2837,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Slett alle transaksjoner i lommeboken og gjenopprett kun de delene av blokkjeden gjennom -rescan ved oppstart</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuert under MIT programvarelisensen, se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Gå til modus for regresjonstesting, som bruker en spesiell blokkjede der blokker kan bli løst momentant.</translation>
@@ -2989,10 +3073,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Opprett nye filer med standardtillatelser i systemet, i stedet for umask 077 (kun virksom med lommebokfunksjonalitet slått av)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuert under MIT/X11 programvarelisensen, se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Feil: Lytting etter innkommende tilkoblinger feilet (lytting returnerte feil %s)</translation>
@@ -3013,6 +3093,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre enn dette anses som null gebyr for laging av transaksjoner (standardverdi: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maksimal størrelse på data i databærende transaksjoner vi videresender og ufører graving på (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
@@ -3021,6 +3105,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sett maksimum størrelse for transaksjoner med høy prioritet / lavt gebyr, i bytes (standardverdi: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Angi antall tråder for mynt generering hvis aktivert (-1 = alle kjerner, standardverdi: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; og kryptografisk programvare skrevet av Eric Young og UPnP-programvare skrevet av Thomas Bernard.</translation>
@@ -3125,6 +3213,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Send transaksjoner uten transaksjonsgebyr hvis mulig (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Vis alle feilsøkingsvalg (bruk: --help -help-debug)</translation>
@@ -3265,10 +3357,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
         <translation>Ta ut feilsøkingsinformasjon (standardverdi: %u, bruk av &lt;category&gt; er valgfritt)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation>Sett prosessorgrensen for når blokkutvinning er på (-1 = ubegrenset, standardverdi: %d)</translation>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Bruk separate SOCKS5 proxyer for å nå noder via Tor skjulte tjenester (standardverdi: %s)</translation>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index fb81042d8e6d..e57362d7fd14 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1,4 +1,4 @@
-<TS language="nl" version="2.1">
+<TS language="nl" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -183,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Portemonnee versleuteld</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Vul een nieuw </translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin zal nu afsluiten om het versleutelingsproces te voltooien. Onthoud dat het versleutelen van uw portemonnee u niet volledig kan beschermen: Malware kan uw computer infecteren en uw bitcoins stelen.</translation>
@@ -516,10 +520,6 @@ Adres: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Coin controle adres selectie</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Kwantiteit</translation>
@@ -568,10 +568,6 @@ Adres: %4
         <source>Amount</source>
         <translation>Bedrag</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -942,14 +938,6 @@ Adres: %4
         <source>&amp;Main</source>
         <translation>&amp;Algemeen</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Optionele transactiekosten per kB. Transactiekosten helpen ervoor te zorgen dat uw transacties snel verwerkt worden. De meeste transacties zijn 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Betaal &amp;transactiekosten</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Start Bitcoin automatisch na inloggen in het systeem</translation>
@@ -978,14 +966,6 @@ Adres: %4
         <source>Allow incoming connections</source>
         <translation>Sta inkomende verbindingen toe</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Verbind met het Bitcoin-netwerk via een SOCKS-proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Verbind via een SOCKS-proxy (standaardproxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-adres van de proxy (bijv. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1149,6 +1129,10 @@ Adres: %4
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
         <translation>De weergegeven informatie kan verouderd zijn. Uw portemonnee synchroniseert automaticsh met het Bitcoinnetwerk nadat een verbinding is gelegd, maar dit proces is nog niet voltooid.</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Alleen-bekijkbaar:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Beschikbaar:</translation>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index c42cc73484ec..b0a92a1578f0 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1,4 +1,4 @@
-<TS language="pam" version="2.1">
+<TS language="pam" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -388,10 +388,6 @@ Address: %4
         <source>Amount</source>
         <translation>Alaga</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Address</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Kaaldauan</translation>
@@ -534,10 +530,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Pun</translation>
     </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Mamayad &amp;bayad para king transaksion </translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Umpisan yang antimu ing Bitcoin kaibat mekapag-log in king sistema.</translation>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index 25d04a0d497f..c53a9970efee 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1,4 +1,4 @@
-<TS language="pl" version="2.1">
+<TS language="pl" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -556,10 +556,6 @@ Adres: %4
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adres</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -914,14 +910,6 @@ Adres: %4
         <source>&amp;Main</source>
         <translation>Główne</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Opcjonalna prowizja za transakcje za kB, wspomaga ona szybkość przebiegu transakcji. Większość transakcji jest 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Płać prowizję za transakcje</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automatycznie uruchamia Bitcoin po zalogowaniu do systemu.</translation>
@@ -946,10 +934,6 @@ Adres: %4
         <source>Allow incoming connections</source>
         <translation>Zezwól na połączenia przychodzące</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Połącz się z siecią Bitcoin poprzez SOCKS proxy.</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adres IP serwera proxy (np. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index cbd730bde4b3..65f07ca59c6f 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -1,4 +1,4 @@
-<TS language="pt_BR" version="2.1">
+<TS language="pt_BR" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -519,10 +519,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Coin Control Address Selection</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
@@ -571,10 +567,6 @@ Endereço: %4</translation>
         <source>Amount</source>
         <translation>Quantidade</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Endereço</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -907,7 +899,15 @@ Endereço: %4</translation>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB de espaço livre disponível</numerusform><numerusform>%n GB de espaço livre disponível</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(de %n GB necessário)</numerusform><numerusform>(de %n GB necessário)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -941,14 +941,6 @@ Endereço: %4</translation>
         <source>&amp;Main</source>
         <translation>Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Taxa de transação opcional por kB que ajuda a garantir que suas transações sejam processadas rapidamente. A maioria das transações são de 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Pagar taxa de &amp;transação</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Iniciar Bitcoin automaticamente após se logar no sistema.</translation>
@@ -977,14 +969,6 @@ Endereço: %4</translation>
         <source>Allow incoming connections</source>
         <translation>Permitir conexões de entrada</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Conectado na rede do Bitcoin através de proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Conectado via proxy SOCKS (padrão proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço de IP do proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1176,6 +1160,10 @@ Endereço: %4</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Saldo minerado que ainda não maturou</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldos</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1188,6 +1176,10 @@ Endereço: %4</translation>
         <source>Your current balance in watch-only addresses</source>
         <translation>Sua balança atual em endereços apenas visualizados</translation>
     </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transações recentes</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index edb1e87b6fce..dc016623e4f9 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1,4 +1,4 @@
-<TS language="pt_PT" version="2.1">
+<TS language="pt_PT" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -507,10 +507,6 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Seleção de Endereço Coin Control</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
@@ -555,10 +551,6 @@ Endereço: %4</translation>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Endereço</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -905,14 +897,6 @@ Endereço: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Taxa de transação opcional por KB que ajuda a assegurar que as suas transações serão processadas rapidamente. A maioria das transações tem 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Pagar &amp;taxa de transação</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Começar o Bitcoin automaticamente ao iniciar sessão no sistema.</translation>
@@ -933,14 +917,6 @@ Endereço: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Número de processos de &amp;verificação de scripts</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Ligar à rede Bitcoin através de um proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>Ligar através de um proxy SO&amp;CKS (proxy por defeito):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço IP do proxy (p.ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index a20bc677a043..ccae9482da20 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -1,4 +1,4 @@
-<TS language="ro_RO" version="2.1">
+<TS language="ro_RO" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -500,10 +500,6 @@ Adresa: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Selectare Adresă de Comandă Monedă</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantitate:</translation>
@@ -548,10 +544,6 @@ Adresa: %4
         <source>Amount</source>
         <translation>Sumă</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresă</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -882,14 +874,6 @@ Adresa: %4
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Taxa optionala de tranzactie per kB care ajuta ca tranzactiile dumneavoastra sa fie procesate rapid. Majoritatea tranzactiilor sunt 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Plăteşte comision pentru tranzacţie &amp;f</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Porneşte automat programul Bitcoin la pornirea computerului.</translation>
@@ -902,10 +886,6 @@ Adresa: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Conecteaza-te la reteaua Bitcoin printr-un proxy SOCKS</translation>
-    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Resetează toate setările clientului la valorile implicite.</translation>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 93c116d0a2aa..fa6629777905 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1,4 +1,4 @@
-<TS language="ru" version="2.1">
+<TS language="ru" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -520,10 +520,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Выбор адреса контроля монет</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Количество:</translation>
@@ -573,8 +569,12 @@ Address: %4
         <translation>Сумма</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Адрес</translation>
+        <source>Received with label</source>
+        <translation>Получено с пометкой</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Получено с адреса</translation>
     </message>
     <message>
         <source>Date</source>
@@ -950,14 +950,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Главная</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Необязательная комиссия за каждый КБ транзакции, которая ускоряет обработку Ваших транзакций.  Большинство транзакций занимают 1КБ.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Заплатить ко&amp;миссию</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Автоматически запускать Bitcoin после входа в систему</translation>
@@ -986,14 +978,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Разрешить входящие подключения</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Подключаться к сети Bitcoin через прокси SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Подключаться через SOCKS прокси (прокси по умолчанию):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-адрес прокси (например IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1054,6 +1038,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Пробросить порт через &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Подключаться к сети Bitcoin через прокси SOCKS5</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Подключаться к сети Bitcoin через прокси SOCKS5 (прокси по умолчанию):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP Прокси: </translation>
@@ -1844,6 +1836,54 @@ Address: %4
         <source>Custom change address</source>
         <translation>Свой адрес для сдачи</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Комиссия</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Выберите...</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Сворачивать</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>за килобайт</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>Итого</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>Send as zero-fee transaction if possible</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>
@@ -1948,6 +1988,14 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Транзакция была отклонена! Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию бумажника (wallet.dat), а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Комиссия больше, чем %1, считается невероятно большой.</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Ожидается начать подтверждение через %1 блок(ов).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Внимание: неверный адрес Bitcoin</translation>
@@ -2802,6 +2850,10 @@ rpcpassword=%s
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Внимание: wallet.dat повреждён, данные спасены! Оригинальный wallet.dat сохранён как wallet.{timestamp}.bak в %s; если ваш баланс или транзакции некорректны, вы должны восстановить файл из резервной копии.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Вносить в белый список участников, подключающихся с указанной маски сети или IP. Можно использовать многократно.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(по умолчанию: 1)</translation>
@@ -2922,6 +2974,10 @@ rpcpassword=%s
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Использовать UPnP для проброса порта (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Проверка блоков...</translation>
@@ -2967,12 +3023,12 @@ rpcpassword=%s
         <translation>Не удалось установить блокировку на каталог данных %s. Возможно, Bitcoin Core уже запущен.</translation>
     </message>
     <message>
-        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
-        <translation>Создавать новые файлы с системными правами по умолчанию вместо umask 077 (эффективно только при отключенном бумажнике)</translation>
+        <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>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Распространяется под лицензией MIT/X11, см. приложенный файл COPYING или &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Создавать новые файлы с системными правами по умолчанию вместо umask 077 (эффективно только при отключенном бумажнике)</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
@@ -2994,6 +3050,10 @@ rpcpassword=%s
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Комиссии (в BTC/Кб) меньшие этого значения считаются нулевыми для создания транзакции (по умолчанию: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Наибольший размер данных в носителе данных транзакций, которые мы передаем и генерируем (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
@@ -3002,6 +3062,10 @@ rpcpassword=%s
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Задать максимальный размер высокоприоритетных/низкокомиссионных транзакций в байтах (по умолчанию: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Задать число потоков генерации монет, если включена (-1 = число ядер процессора, по умолчанию: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit &lt;https://www.openssl.org/&gt; и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
@@ -3106,6 +3170,10 @@ rpcpassword=%s
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Осуществить транзакцию бесплатно, если возможно (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Показать все отладочные параметры (использование: --help -help-debug)</translation>
@@ -3214,18 +3282,174 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Ошибка загрузки wallet.dat: Бумажник поврежден</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = сохранять метаданные транзакции: например, владельца аккаунта и информацию запроса платежа; 2 = отбросить метаданные)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Сбрасывать активность базы данных из памяти на диск каждые &lt;n&gt; мегабайт (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Записывать в лог приоритет транзакции и комиссию на килобайт во время добычи блоков (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Держать полный индекс транзакций, используемый RPC-запросом getrawtransaction (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Число секунд блокирования неправильно ведущих себя узлов (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Выводить отладочную информацию (по умолчанию: %u, указание &lt;category&gt; необязательно)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Использовать отдельный прокси SOCKS5 для соединения с участниками через скрытые сервисы Tor (по умолчанию: %s)</translation>
+    </message>
     <message>
         <source>(default: %s)</source>
         <translation>(по умолчанию: %s)</translation>
     </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Допустимые шифры (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Всегда запрашивать адреса участников с помощью DNS (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Отключить безопасный режим, отклонить реальное событие безопасного режима (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Ошибка при загрузке wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Принудительный безопасный режим (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Включить добычу монет (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Сколько блоков проверять при запуске (по умолчанию: %u, 0 = все)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Включить IP-адреса в отладочный вывод (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Неверный адрес -proxy: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Ограничить размер кэша подписей &lt;n&gt; записями (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Прослушивать подключения JSON-RPC на &lt;порту&gt; (по умолчанию: %u или %u в тестовой сети)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Принимать входящие подключения на &lt;port&gt; (по умолчанию: %u или %u в тестовой сети)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Поддерживать не более &lt;n&gt; подключений к узлам (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальный размер буфера приёма на соединение, &lt;n&gt;*1000 байт (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальный размер буфера отправки на соединение, &lt;n&gt;*1000 байт (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Принимать цепь блоков, лишь если она соответствует встроенным контрольным точкам (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Дописывать отметки времени к отладочному выводу (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Печатать дерево блоков при запуске (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Транслировать и генерировать транзакции носителей данных (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Транслировать не-P2SH мультиподпись (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Запустить поток для периодического сохранения бумажника (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Файл сертификата сервера (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Закрытый ключ сервера (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Установить размер пула ключей в &lt;n&gt; (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Задать число потоков выполнения запросов RPC (по умолчанию: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Установить флаг DB_PRIVATE в окружении базы данных бумажника (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Указать конфигурационный файл (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Указать тайм-аут соединения в миллисекундах (минимум: 1, по умолчанию: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Указать pid-файл (по умолчанию: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Остановиться после импорта блоков с диска (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Порог для отключения неправильно ведущих себя узлов (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>В параметре -onlynet указана неизвестная сеть: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts
index a951e10ab9fd..84b973bf924d 100644
--- a/src/qt/locale/bitcoin_sah.ts
+++ b/src/qt/locale/bitcoin_sah.ts
@@ -1,4 +1,4 @@
-<TS language="sah" version="2.1">
+<TS language="sah" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index 7768288294a9..fe7c62cd6043 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1,4 +1,4 @@
-<TS language="sk" version="2.1">
+<TS language="sk" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -422,14 +422,34 @@
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation>Zobraziť pomocnú správu od Bitcoin Jadra pre získanie zoznamu dostupných možností príkazového riadku</translation>
     </message>
+    <message numerus="yes">
+        <source>%n active connection(s) to Bitcoin network</source>
+        <translation><numerusform>%n aktívne pripojenie do siete Bitcoin</numerusform><numerusform>%n aktívne pripojenia do siete Bitcoin</numerusform><numerusform>%n aktívnych pripojení do siete Bitcoin</numerusform></translation>
+    </message>
     <message>
         <source>No block source available...</source>
         <translation>Nedostupný zdroj blokov...</translation>
     </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n hodina</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodín</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n deň</numerusform><numerusform>%n dni</numerusform><numerusform>%n dní</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><numerusform>%n týždeň</numerusform><numerusform>%n týždne</numerusform><numerusform>%n týždňov</numerusform></translation>
+    </message>
     <message>
         <source>%1 and %2</source>
         <translation> %1 a  %2</translation>
     </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n rokov</numerusform></translation>
+    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 pozadu</translation>
@@ -499,10 +519,6 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Coin Control výber adresy</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Množstvo:</translation>
@@ -547,10 +563,6 @@ Adresa: %4</translation>
         <source>Amount</source>
         <translation>Suma</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresa</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Dátum</translation>
@@ -905,14 +917,6 @@ Adresa: %4</translation>
         <source>&amp;Main</source>
         <translation>&amp;Hlavné</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Voliteľný transakčný poplatok za kB ktorý pomôže rýchlemu spracovaniu transakcie. Väčšina transakcií má 1 kB. Poplatok 0.01 je odporúčaný.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Zaplatiť transakčné &amp;poplatky</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Automaticky spustiť Bitcoin po zapnutí počítača</translation>
@@ -933,14 +937,6 @@ Adresa: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Počet skript overujucich vlákien</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Pripojiť k Bitcoin sieti cez SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>Pripojiť sa cez SOCKS proxy (predvolené proxy)</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP adresy proxy (napr. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index ed6f813e7da9..60fc4a93e5c2 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1,4 +1,4 @@
-<TS language="sl_SI" version="2.1">
+<TS language="sl_SI" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -520,10 +520,6 @@ Naslov: %4
         <source>Amount</source>
         <translation>Količina</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Naslov</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -874,14 +870,6 @@ Naslov: %4
         <source>&amp;Main</source>
         <translation>&amp;Glavno</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Neobvezna pristojbina k transakciji poskrbi, da je transackcija hitro opravljena. Velikost povprečne transakcije je 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Nakazilo plačila &amp; provizija</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Po prijavi v sistem samodejno zaženite Bitcoin.</translation>
@@ -906,14 +894,6 @@ Naslov: %4
         <source>Allow incoming connections</source>
         <translation>Dovoli prihajajoče povezave</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>V Bitcoin omrežje se poveži skozu SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Poveži se skozi SOCKS proxy (privzet proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP naslov proxy strežnika (npr. IPv4: 127.0.0.1 ali IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 0c60e482fe63..7e63f239cafd 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -1,4 +1,4 @@
-<TS language="sq" version="2.1">
+<TS language="sq" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -196,10 +196,6 @@
         <source>Amount</source>
         <translation>Sasia</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Adresë</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index c3dc42e2f31b..64c68a2226a5 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -1,4 +1,4 @@
-<TS language="sr" version="2.1">
+<TS language="sr" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -264,10 +264,6 @@ Address: %4
         <source>Amount</source>
         <translation>iznos</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Адреса</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>datum</translation>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 39cca4b27876..551f6976cf43 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1,4 +1,4 @@
-<TS language="sv" version="2.1">
+<TS language="sv" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -479,6 +479,10 @@ Var vänlig och försök igen.</translation>
         <source>Up to date</source>
         <translation>Uppdaterad</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Bearbetat %n block av transaktionshistoriken.</numerusform><numerusform>Bearbetat %n block av transaktionshistoriken.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Hämtar senaste...</translation>
@@ -522,8 +526,8 @@ Adress: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Adressval för myntkontroll</translation>
+        <source>Coin Selection</source>
+        <translation>Myntval</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -574,8 +578,12 @@ Adress: %4
         <translation>Mängd</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adress</translation>
+        <source>Received with label</source>
+        <translation>Mottagen med etikett</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Mottagen med adress</translation>
     </message>
     <message>
         <source>Date</source>
@@ -905,7 +913,15 @@ Adress: %4
         <source>Error</source>
         <translation>Fel</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB fritt utrymme kvar</numerusform><numerusform>%n GB fritt utrymme kvar</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(av %n GB behövs)</numerusform><numerusform>(av %n GB behövs)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -939,14 +955,6 @@ Adress: %4
         <source>&amp;Main</source>
         <translation>&amp;Allmänt</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Valfri transaktionsavgift per kB som ser till att dina transaktioner behandlas snabbt. De flesta transaktioner är 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Betala överförings&amp;avgift</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Starta Bitcoin automatiskt efter inloggning.</translation>
@@ -975,14 +983,6 @@ Adress: %4
         <source>Allow incoming connections</source>
         <translation>Acceptera inkommande anslutningar</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Anslut till Bitcoin-nätverket genom en SOCKS-proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Anslut genom SOCKS-proxy (förvald proxy):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Proxyns IP-adress (t.ex.  IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1043,6 +1043,14 @@ Adress: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Tilldela port med hjälp av &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Anslut till Bitcoin-nätverket genom en SOCKS5-proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Anslut genom SOCKS5-proxy (förvald proxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy-&amp;IP: </translation>
@@ -1174,6 +1182,10 @@ Adress: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Den genererade balansen som ännu inte har mognat</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Balanser</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Totalt:</translation>
@@ -1186,6 +1198,14 @@ Adress: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Ditt nuvarande saldo i granska-bara adresser</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Spenderbar:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Nyligen genomförda transaktioner</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Okonfirmerade transaktioner till granska-bara adresser</translation>
@@ -1817,6 +1837,78 @@ Adress: %4
         <source>Custom change address</source>
         <translation>Specialväxeladress</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transaktionsavgift:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Välj...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Fäll ihop avgiftsinställningarna</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimera</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Om den anpassad avgiften är satt till 1000 satoshi och transaktionen bara är 250 byte, betalar "per kilobyte" bara 250 satoshi i avgift, medans "minst" betalar 1000 satoshi. För transaktioner större än en kilobyte betalar både per kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Om den anpassad avgiften är satt till 1000 satoshi och transaktionen bara är 250 byte, betalar "per kilobyte" bara 250 satoshi i avgift, medans "totalt minst" betalar 1000 satoshi. För transaktioner större än en kilobyte betalar både per kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>totalt minst</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Att betala endast den minsta avgiften är bara bra så länge det är mindre transaktionsvolym än utrymme i blocken. Men tänk på att det kan hamna i en aldrig bekräftar transaktion när det finns mer efterfrågan på bitcoin transaktioner än nätverket kan bearbeta.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(läs verktygstips)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Rekommenderad:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Anpassad:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Smartavgiften är inte initierad än. Detta tar vanligen några block...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Bekräftelsetid:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>snabb</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Sänd som nollavgiftstransaktion om möjligt</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(bekräftelse kan ta längre tid)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Skicka till flera mottagare samtidigt</translation>
@@ -1921,6 +2013,18 @@ Adress: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transaktionen avslogs! Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderade här.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>En avgift högre än %1 anses som en onormalt hög avgift.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Betala endast den minimala avgiften på %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Bekräftelsen beräknas börja inom %1 block.</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Varning: Felaktig Bitcoinadress</translation>
@@ -2449,6 +2553,10 @@ Adress: %4
         <source>Type of transaction.</source>
         <translation>Transaktionstyp.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Anger om granska-bara--adresser är involverade i denna transaktion.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Transaktionens destinationsadress.</translation>
@@ -2544,6 +2652,10 @@ Adress: %4
         <source>Export Transaction History</source>
         <translation>Exportera Transaktionshistoriken</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Granska-bara</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Exporteringen misslyckades</translation>
@@ -2719,6 +2831,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Ta bort alla plånbokstransaktioner och återskapa bara dom som är en del av blockkedjan genom att ange -rescan vid uppstart</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuerad under MIT mjukvarulicens, se den bifogade filen COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ange regressiontestläge, som använder en speciell kedja i vilka block kan lösas omedelbart.</translation>
@@ -2771,6 +2887,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Varning: wallet.dat korrupt, datan har räddats! Den ursprungliga wallet.dat har sparas som wallet.{timestamp}.bak i %s; om ditt saldo eller transaktioner är felaktiga ska du återställa från en säkerhetskopia.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Vitlista klienter som ansluter från angivna nätmasker eller IP-adresser. Kan specificeras flera gånger.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(förvalt: 1)</translation>
@@ -2831,6 +2951,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Fel vid öppning av blockdatabasen</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Fel: Ett fatalt internt fel inträffade. Se debug.log för detaljer</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Fel: Hårddiskutrymme är lågt!</translation>
@@ -2863,6 +2987,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>Inte tillräckligt med filbeskrivningar tillgängliga.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Anslut enbart till noder i nätverket &lt;net&gt; (IPv4, IPv6 eller onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer</translation>
@@ -2883,6 +3011,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Detta är avsett för regressionstestningsverktyg och applikationsutveckling.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Använd UPnP för att mappa den lyssnande porten (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verifierar block...</translation>
@@ -2928,12 +3060,12 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Kan inte låsa data-mappen %s. Bitcoin Core körs förmodligen redan.</translation>
     </message>
     <message>
-        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
-        <translation>Skapa nya filer med systemets förvalda rättigheter, istället för umask 077 (bara effektivt med avaktiverad plånboks funktionalitet)</translation>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Antalsbegränsa kontinuerligt fria transaktioner till &lt;n&gt;*1000 bytes per minut (förvalt:%u)</translation>
     </message>
     <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuerad under MIT/X11 mjukvarulicens, se den bifogade filen COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Skapa nya filer med systemets förvalda rättigheter, istället för umask 077 (bara effektivt med avaktiverad plånboks funktionalitet)</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
@@ -2955,6 +3087,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Avgifter (i BTC/Kb) mindre än detta betraktas som nollavgift för transaktionsskapande (förvalt: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximal storlek på data i databärartransaktioner som vi reläar och bryter (förvalt: %u) </translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
@@ -3031,6 +3167,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Håll som mest &lt;n&gt; oanslutningsbara block i minnet (förvalt: %u)</translation>
     </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Håll som mest &lt;n&gt; oanslutningsbara transaktioner i minnet (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Port måste anges med -whitelist: '%s'</translation>
@@ -3063,6 +3203,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Sänd transaktioner som nollavgiftstransaktioner om möjligt (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Visa alla avlusningsoptioner (använd: --help -help-debug)</translation>
@@ -3171,14 +3315,178 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fel vid inläsningen av wallet.dat: Plånboken är skadad</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = spara tx metadata t.ex. kontoägare och betalningsbegäransinformation, 2 = släng tx metadata)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Töm databasens minnespool till disk varje &lt;n&gt; megabytes (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Hur grundlig blockverifikationen vid -checkblocks är (0-4, förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Om paytxfee inte är satt, inkludera tillräcklig avgift så att transaktionen konfirmeras inom n blocks (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Logga transaktionsprioritet och avgift per kB vid blockbrytning (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Upprätthåll ett fullständigt transaktionsindex, som används av getrawtransaction rpc-anrop (förval: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Skriv ut avlusningsinformation (förvalt: %u, att ange &lt;category&gt; är frivilligt)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Använd separat SOCKS5 proxy för att nå kollegor via dolda tjänster i Tor (förvalt: -%s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Accepterbara chiffer (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Sök alltid efter klientadresser med DNS sökningen (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Avaktivera säkert läge. Åsidosätt en riktigt säkert läge händelse (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fel vid inläsning av plånboksfilen wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Tvångskör i säkert läge (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generera mynt (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Hur många block att kontrollera vid uppstart (förvalt: %u, 0 = alla)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inkludera IP-adresser i debugutskrift (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ogiltig -proxy adress: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Begränsa signaturcachestorleken till &lt;n&gt; poster (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lyssna på JSON-RPC-anslutningar på &lt;port&gt; (förval: %u eller testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lyssna efter anslutningar på &lt;port&gt; (förvalt: %u eller testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Ha som mest &lt;n&gt; anslutningar till andra klienter (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximal mottagningsbuffert per anslutning, &lt;n&gt;*1000 byte (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximal sändningsbuffert per anslutning, &lt;n&gt;*1000 byte (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Acceptera bara blockkedjans matchande inbyggda kontrollpunkter (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Skriv ut tidsstämpel i avlusningsinformationen (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Skriv ut blockträdet vid uppstart (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Reläa och bearbeta databärartransaktioner (förvalt: %u) </translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Reläa icke P2SH multisig (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Kör en tråd för att tömma plånboken periodiskt (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Serverns certifikatfil (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Serverns privata nyckel (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Sätt storleken på nyckelpoolen till &lt;n&gt; (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Sätt minsta blockstorlek i byte (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Ange antalet trådar för att hantera RPC anrop (förvalt: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Sätt DB_PRIVATE flaggan i plånbokens databasmiljö (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Ange konfigurationsfil (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Ange timeout för uppkoppling i millisekunder (minimum:1, förvalt: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Ange pid-fil (förvalt: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Spendera okonfirmerad växel när transaktioner sänds (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Sluta köra efter importen av block från disk är klar (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Tröskelvärde för att koppla ifrån klienter som missköter sig (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Okänt nätverk som anges i -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index e4b1e069cd10..174816aaef00 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -1,4 +1,4 @@
-<TS language="th_TH" version="2.1">
+<TS language="th_TH" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -196,10 +196,6 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Address</source>
-        <translation>ที่อยู่</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(ไม่มีชื่อ)</translation>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index b5d00bc24ed7..ab02cc92a60f 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1,4 +1,4 @@
-<TS language="tr" version="2.1">
+<TS language="tr" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -525,8 +525,8 @@ Adres: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Para kontrolü adres seçimi</translation>
+        <source>Coin Selection</source>
+        <translation>Bitcoin Seçimi</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -577,8 +577,12 @@ Adres: %4
         <translation>Meblağ</translation>
     </message>
     <message>
-        <source>Address</source>
-        <translation>Adres</translation>
+        <source>Received with label</source>
+        <translation>Şu etiketle alındı</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Şu adresle alındı</translation>
     </message>
     <message>
         <source>Date</source>
@@ -954,14 +958,6 @@ Adres: %4
         <source>&amp;Main</source>
         <translation>&amp;Esas ayarlar</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Muamelelerin hızlı işlenmesini garantilemeye yardım eden, seçime dayalı kB başı muamele ücreti. Muamelelerin çoğunluğunun boyutu 1 kB'dir.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Muamele ücreti &amp;öde</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Sistemde oturum açıldığında Bitcoin'i otomatik olarak başlat.</translation>
@@ -990,14 +986,6 @@ Adres: %4
         <source>Allow incoming connections</source>
         <translation>Gelen bağlantılara izin ver</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Bitcoin şebekesine bir SOCKS vekil sunucusu vasıtasıyla bağlan.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>SOCKS vekil sunucusuyla &amp;bağlan (varsayılan vekil):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Vekil sunucusunun IP adresi (mesela IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1058,6 +1046,14 @@ Adres: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Portları &amp;UPnP kullanarak haritala</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Bitcoin şebekesine SOCKS5 vekil sunucusu vasıtasıyla bağlan.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>SOCKS5 vekil sunucusu vasıtasıyla &amp;bağlan (varsayılan vekil sunucusu):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Vekil &amp;İP:</translation>
@@ -1848,6 +1844,78 @@ Adres: %4
         <source>Custom change address</source>
         <translation>Özel para üstü adresi</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Muamele ücreti:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Seç...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>ücret-ayarlarını-küçült</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Küçült</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Eğer özel ücret 1000 satoşi olarak ayarlandıysa ve muamele sadece 250 baytsa, "kilobayt başı" ücret olarak sadece 250 satoşi öder ve "asgari" 1000 satoşi öder. Bir kilobayttan yüksek muameleler için ikisi de kilobayt başı ödeme yapar.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>kilobayt başı</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Eğer özel ücret 1000 satoşi olarak ayarlandıysa ve muamele sadece 250 baytsa, "kilobayt başı" ücret olarak sadece 250 satoşi öder ve "toplam asgari" 1000 satoşi öder. Bir kilobayttan yüksek muameleler için ikisi de kilobayt başı ödeme yapar.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>toplam asgari</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Asgari ücreti ödemek, bloklarda boşluktan daha az muamele hacmi olduğu sürece bir sorun çıkarmaz. Fakat şebekenin işleyecebileceğinden daha çok bitcoin muameleleri talebi olduğunda bunun asla teyit edilmeyen bir muamele olabileceğinin farkında olmalısınız.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(bilgi balonunu oku)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Tavsiye edilen:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Özel:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Zeki ücret henüz başlatılmadı. Bu genelde birkaç blok alır...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Teyit süresi:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>çabuk</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Mümkünse ücretsiz muamele olarak gönder</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(teyit daha uzun süre alabilir)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Birçok alıcıya aynı anda gönder</translation>
@@ -1952,6 +2020,18 @@ Adres: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Muamele reddedildi! Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>%1 tutarından yüksek ücret delicesine aşırı yüksek bir ücret olarak kabul edilir.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Sadece asgari ücret olan %1 tutarını öde</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Tahmini olarak %1 blok içinde teyide başlanacaktır.</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Uyarı: geçersiz Bitcoin adresi</translation>
@@ -2758,6 +2838,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Tüm cüzdan muamelelerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>MIT yazılım lisansı kapsamında yayınlanmıştır, ekteki COPYING dosyasına ya da &lt;http://www.opensource.org/licenses/mit-license.php&gt; adresine bakınız.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Blokların anında çözülebileceği özel bir zincir kullanan regresyon deneme kipine gir.</translation>
@@ -2990,10 +3074,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Yeni dosyaları umask 077 yerine varsayılan izinlerle oluştur (sadece devre dışı cüzdan işlevselliği ile etkilidir)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>MIT/X11 yazılım lisansı kapsamında yayınlanmıştır, ekteki COPYING dosyasına ya da &lt;http://www.opensource.org/licenses/mit-license.php&gt; adresine bakınız.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Hata: İçeri gelen bağlantıların dinlenmesi başarısız oldu (dinleme %s hatasını verdi)</translation>
@@ -3014,6 +3094,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Kb başına BTC olarak bundan düşük ücretler muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Aktardığımız ve oluşturduğumuz veri taşıyıcı muamelelerindeki azami veri boyutu (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
@@ -3022,6 +3106,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Yüksek öncelikli/düşük ücretli muamelelerin azami boyutunu bayt olarak ayarla (varsayılan: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Etkinse bitcoin oluşuturulmasına atanan iş parçacığı sayısını ayarla (-1 = tüm çekirdekler, varsayılan: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young (eay@cryptsoft.com) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir.</translation>
@@ -3126,6 +3214,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <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>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Muameleleri mümkünse ücretsiz olarak gönder (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Tüm hata ayıklama seçeneklerini göster (kullanımı: --help -help-debug)</translation>
@@ -3266,10 +3358,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
         <translation>Hata ayıklama bilgisi dök (varsayılan: %u, &lt;kategori&gt; sağlanması seçime dayalıdır)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation>Oluşturma etkinken işlemci sınırını belirle (-1 = sınırsız, varsayılan: %d)</translation>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Eşlere gizli Tor servisleri ile ulaşmak için ayrı SOCKS5 vekil sunucusu kullan (varsayılan: %s)</translation>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index c8fe1df9bf66..b6ba507e9bab 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1,4 +1,4 @@
-<TS language="uk" version="2.1">
+<TS language="uk" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -87,7 +87,7 @@
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Файли, розділені комою (*.csv)</translation>
+        <translation>Значення, розділені комою (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
@@ -524,10 +524,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Вибір адрес для керування монетами</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Кількість:</translation>
@@ -576,10 +572,6 @@ Address: %4
         <source>Amount</source>
         <translation>Кількість</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Адреса</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
@@ -954,14 +946,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Головні</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Необов'язкова комісия за Кб допомагає переконатися, що ваші транзакції обробляються швидше. Більшість транзакцій є 1 Кб.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Заплатити комісі&amp;ю</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Автоматично запускати гаманець при вході до системи.</translation>
@@ -990,14 +974,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Дозволити вхідні з’єднання</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Підключатись до мережі Bitcoin через SOCKS-проксі.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>&amp;Підключатись через SOCKS-проксі (типовий проксі):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-адреса проксі-сервера (наприклад IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1274,7 +1250,7 @@ Address: %4
     </message>
     <message>
         <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Неможливо обробити URI! Це може бути викликано неправильною Bitcoin-адресою, чи невірними параметрами URI.</translation>
+        <translation>Неможливо обробити URI! Причиною цього може бути некоректна Bitcoin-адреса або неправильні параметри URI.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
@@ -2601,7 +2577,7 @@ Address: %4
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Файли, розділені комою (*.csv)</translation>
+        <translation>Значення, розділені комою (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2747,7 +2723,7 @@ rpcpassword=%s
 Ім’я користувача та пароль ПОВИННІ бути різними.
 Якщо файлу не існує, створіть його, обмеживши доступ правом читання для власника.
 Також рекомендується використовувати alertnotify для того, щоб отримувати сповіщення про проблеми;
-наприклад: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+наприклад: alertnotify=echo %%s | mail -s "Сповіщення Bitcoin" admin@foo.com
 </translation>
     </message>
     <message>
@@ -2990,10 +2966,6 @@ rpcpassword=%s
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Створювати нові файли з типовими для системи атрибутами доступу замість маски 077 (діє тільки при вимкненому гаманці)</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Поширюється за ліцензією MIT/X11, додаткова інформація міститься у файлі COPYING, а також за адресою &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Помилка: Не вдалося налаштувати прослуховування вхідних підключень (listen повернув помилку: %s)</translation>
@@ -3004,7 +2976,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Виконати команду при надходженні важливого попереджувального повідомлення або при спостереженні тривалого розгалуження ланцюжка (замість %s буде підставлено повідомлення)</translation>
+        <translation>Виконати команду при надходженні важливого сповіщення або при спостереженні тривалого розгалуження ланцюжка (замість %s буде підставлено повідомлення)</translation>
     </message>
     <message>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
@@ -3072,15 +3044,15 @@ rpcpassword=%s
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Вказано некоректну суму для параметру -minrelaytxfee: '%s'</translation>
+        <translation>Вказано некоректну суму для параметру -minrelaytxfee: «%s»</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Вказано некоректну суму для параметру -mintxfee: '%s'</translation>
+        <translation>Вказано некоректну суму для параметру -mintxfee: «%s»</translation>
     </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
-        <translation>Вказано некоректну суму для параметру -paytxfee: '%s' (повинно бути щонайменше %s)</translation>
+        <translation>Вказано некоректну суму для параметру -paytxfee: «%s» (повинно бути щонайменше %s)</translation>
     </message>
     <message>
         <source>Invalid netmask specified in -whitelist: '%s'</source>
@@ -3266,10 +3238,6 @@ rpcpassword=%s
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
         <translation>Виводити налагоджувальну інформацію (типово: %u, вказання &lt;category&gt; необов'язкове)</translation>
     </message>
-    <message>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: %d)</source>
-        <translation>Встановити максимальну кількість процесорів, що будуть використовуватися при ввімкненій генерації (-1 = необмежено, типово: %d)</translation>
-    </message>
     <message>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Використовувати окремий SOCKS5-проксі для з'єднання з учасниками через приховані сервіси Tor (типово: %s)</translation>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index 5bf7ce434430..86f3226269a3 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -1,4 +1,4 @@
-<TS language="ur_PK" version="2.1">
+<TS language="ur_PK" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -100,10 +100,6 @@
         <source>Amount</source>
         <translation>رقم</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation> پتہ</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>تاریخ</translation>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index ab4439b419ce..54e649aedef0 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1,4 +1,4 @@
-<TS language="uz@Cyrl" version="2.1">
+<TS language="uz@Cyrl" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -520,10 +520,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>Танга бошқарув манзилини танлаш</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>Сони:</translation>
@@ -572,10 +568,6 @@ Address: %4
         <source>Amount</source>
         <translation>Миқдори</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Манзил</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>Сана</translation>
@@ -930,14 +922,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Асосий</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>Ҳар бир кб учун ўтказма солиғи ўтказмаларингизни тезроқ ўтишига ишонишингизга ёрдам беради. Кўпгина ўтказмалар 1 кб.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>Ўтказма &amp;солиғини тўлаш</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>Тизимга киргандан сўнг Bitcoin дастури автоматик ишга туширилсин.</translation>
@@ -966,14 +950,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>Кирувчи уланишларга рухсат бериш</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>Bitcoin тармоққа SOCKS прокси орқали уланинг.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>SOCKS прокси орқали &amp;уланинг (стандарт прокси):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Прокси IP манзили (масалан: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index e03349b38353..3ca560588305 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -1,4 +1,4 @@
-<TS language="vi" version="2.1">
+<TS language="vi" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -52,10 +52,6 @@
         <source>Amount</source>
         <translation>Số lượng</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>Địa chỉ</translation>
-    </message>
     <message>
         <source>(no label)</source>
         <translation>(chưa có nhãn)</translation>
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index 20ebd7b59452..bf76c8638aa0 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -1,4 +1,4 @@
-<TS language="vi_VN" version="2.1">
+<TS language="vi_VN" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 75867460ab8c..94d0675bfdac 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1,4 +1,4 @@
-<TS language="zh_CN" version="2.1">
+<TS language="zh_CN" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -516,10 +516,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>选择交易源地址</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>总量：</translation>
@@ -568,10 +564,6 @@ Address: %4
         <source>Amount</source>
         <translation>金额</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>地址</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>日期</translation>
@@ -931,14 +923,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>主要(&amp;M)</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>可选的每 kB 交易费，这有助于您的交易被更快的处理。大多数交易都是 1 kB。</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>支付交易费用(&amp;F)</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>登录系统后自动开启比特币客户端</translation>
@@ -967,14 +951,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>允许流入连接</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>通过 SOCKS 代理连接到比特币网络。</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>通过 SO&amp;CKS 代理连接 (默认代理):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>代理的 IP 地址 (例如 IPv4: 127.0.0.1 / IPv6: ::1)</translation>
diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts
index dfdbb7d1da05..7062377f45e0 100644
--- a/src/qt/locale/bitcoin_zh_HK.ts
+++ b/src/qt/locale/bitcoin_zh_HK.ts
@@ -1,4 +1,4 @@
-<TS language="zh_HK" version="2.1">
+<TS language="zh_HK" version="2.0">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 6301bd45871d..b70596d83ae5 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1,4 +1,4 @@
-<TS language="zh_TW" version="2.1">
+<TS language="zh_TW" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -7,7 +7,7 @@
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>製造新的位址</translation>
+        <translation>新增新的位址</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -520,10 +520,6 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
-    <message>
-        <source>Coin Control Address Selection</source>
-        <translation>錢幣控制的位址選擇</translation>
-    </message>
     <message>
         <source>Quantity:</source>
         <translation>數目:</translation>
@@ -572,10 +568,6 @@ Address: %4
         <source>Amount</source>
         <translation>金額</translation>
     </message>
-    <message>
-        <source>Address</source>
-        <translation>位址</translation>
-    </message>
     <message>
         <source>Date</source>
         <translation>日期</translation>
@@ -908,7 +900,15 @@ Address: %4
         <source>Error</source>
         <translation>錯誤</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>可用空間尚存 %n GB</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(需要 %n GB)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -942,14 +942,6 @@ Address: %4
         <source>&amp;Main</source>
         <translation>主要</translation>
     </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation>每一千位元組(kB)要付的交易手續費，如果有付可以加速網路處理你的交易。大部份交易資料的大小是 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation>付交易手續費</translation>
-    </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
         <translation>在登入系統後自動啓動位元幣軟體。</translation>
@@ -978,14 +970,6 @@ Address: %4
         <source>Allow incoming connections</source>
         <translation>接受外來連線</translation>
     </message>
-    <message>
-        <source>Connect to the Bitcoin network through a SOCKS proxy.</source>
-        <translation>透過 SOCKS 代理伺服器來連線到位元幣網路。</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation>透過 SOCKS 代理伺服器連線(預設代理伺服器):</translation>
-    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>代理伺服器的網際網路位址(像是 IPv4 的 127.0.0.1 或 IPv6 的 ::1)</translation>
@@ -2967,10 +2951,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>用系統預設權限來造出新的檔案，而不是用使用者權限罩遮(umask)值 077 (只有在關掉錢包功能時才有作用)。</translation>
     </message>
-    <message>
-        <source>Distributed under the MIT/X11 software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>這套軟體是依據 MIT/X11 軟體授權條款散布，詳情請見附帶的 COPYING 檔案，或是以下網站:  &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
-    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>錯誤: 聽候外來連線失敗(回傳錯誤 %s)</translation>

From 78bdc8103ff4c1b2f1f636f9c5564285028f3e19 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 26 Nov 2014 13:51:02 +0100
Subject: [PATCH 1127/1819] [REST] give an appropriate response in warmup phase

---
 src/rest.cpp      | 4 ++++
 src/rpcprotocol.h | 1 +
 src/rpcserver.cpp | 8 ++++++++
 src/rpcserver.h   | 3 +++
 4 files changed, 16 insertions(+)

diff --git a/src/rest.cpp b/src/rest.cpp
index 1aa864a306ad..4953d7e717da 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -188,6 +188,10 @@ bool HTTPReq_REST(AcceptedConnection *conn,
                   bool fRun)
 {
     try {
+        std::string statusmessage;
+        if(RPCIsInWarmup(&statusmessage))
+            throw RESTERR(HTTP_SERVICE_UNAVAILABLE, "Service temporarily unavailable: "+statusmessage);
+        
         for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++) {
             unsigned int plen = strlen(uri_prefixes[i].prefix);
             if (strURI.substr(0, plen) == uri_prefixes[i].prefix) {
diff --git a/src/rpcprotocol.h b/src/rpcprotocol.h
index a32133817657..f7cd50f9f606 100644
--- a/src/rpcprotocol.h
+++ b/src/rpcprotocol.h
@@ -28,6 +28,7 @@ enum HTTPStatusCode
     HTTP_FORBIDDEN             = 403,
     HTTP_NOT_FOUND             = 404,
     HTTP_INTERNAL_SERVER_ERROR = 500,
+    HTTP_SERVICE_UNAVAILABLE   = 503,
 };
 
 //! Bitcoin RPC error codes
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 7022c5037580..c10b05cb0434 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -756,6 +756,14 @@ void SetRPCWarmupFinished()
     fRPCInWarmup = false;
 }
 
+bool RPCIsInWarmup(std::string *outStatus)
+{
+    LOCK(cs_rpcWarmup);
+    if (outStatus)
+        *outStatus = rpcWarmupStatus;
+    return fRPCInWarmup;
+}
+
 void RPCRunHandler(const boost::system::error_code& err, boost::function<void(void)> func)
 {
     if (!err)
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 7395fc23c6cc..b0e437057bff 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -53,6 +53,9 @@ void SetRPCWarmupStatus(const std::string& newStatus);
 /* Mark warmup as done.  RPC calls will be processed from now on.  */
 void SetRPCWarmupFinished();
 
+/* returns the current warmup state.  */
+bool RPCIsInWarmup(std::string *statusOut);
+
 /**
  * Type-check arguments; throws JSONRPCError if wrong type given. Does not check that
  * the right number of arguments are passed, just that any passed are the correct type.

From 5dc713bfc7bf98c8e1d80fec9c5f5e0417a2bdcd Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 26 Nov 2014 13:53:27 +0100
Subject: [PATCH 1128/1819] [REST] set REST API behind "-rest" option

---
 src/init.cpp      | 1 +
 src/rpcserver.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index b73c6e8722c8..63e72c66d2d8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -352,6 +352,7 @@ std::string HelpMessage(HelpMessageMode mode)
 
     strUsage += "\n" + _("RPC server options:") + "\n";
     strUsage += "  -server                " + _("Accept command line and JSON-RPC commands") + "\n";
+    strUsage += "  -rest                  " + strprintf(_("Accept public REST requests (default: %u)"), 0) + "\n";
     strUsage += "  -rpcbind=<addr>        " + _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)") + "\n";
     strUsage += "  -rpcuser=<user>        " + _("Username for JSON-RPC connections") + "\n";
     strUsage += "  -rpcpassword=<pw>      " + _("Password for JSON-RPC connections") + "\n";
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c10b05cb0434..b03016a50853 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -955,7 +955,7 @@ void ServiceConnection(AcceptedConnection *conn)
                 break;
 
         // Process via HTTP REST API
-        } else if (strURI.substr(0, 6) == "/rest/") {
+        } else if (strURI.substr(0, 6) == "/rest/" && GetBoolArg("-rest", false)) {
             if (!HTTPReq_REST(conn, strURI, mapHeaders, fRun))
                 break;
 

From 199627c94c2a9f4feaecfda0fe4d8350cf654525 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Thu, 20 Nov 2014 16:39:09 +0100
Subject: [PATCH 1129/1819] [REST] adding basic documentation

---
 doc/REST-interface.md | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 doc/REST-interface.md

diff --git a/doc/REST-interface.md b/doc/REST-interface.md
new file mode 100644
index 000000000000..05c532be5433
--- /dev/null
+++ b/doc/REST-interface.md
@@ -0,0 +1,24 @@
+Unauthenticated REST Interface
+==============================
+
+The REST API can be enabled with the `-rest` option.
+
+Supported API
+-------------
+`GET /rest/tx/TX-HASH.{bin|hex|json}`
+
+Given a transaction hash,
+Returns a transaction, in binary, hex-encoded binary or JSON formats.
+
+`GET /rest/block/BLOCK-HASH.{bin|hex|json}`
+
+Given a block hash,
+Returns a block, in binary, hex-encoded binary or JSON formats.
+
+The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request.
+
+For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.
+
+Risks
+-------------
+Running a webbrowser on the same node with a REST enabled bitcoind can be a risk. Accessing prepared XSS websites could read out tx/block data of your node by placing links like `<script src="http://127.0.0.1:1234/tx/json/1234567890">` which might break the nodes privacy.
\ No newline at end of file

From 9b0a8d3152b43b63c99878d0223a1681993ad608 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 19 Nov 2014 09:39:42 +0100
Subject: [PATCH 1130/1819] Add 'invalidateblock' and 'reconsiderblock' RPC
 commands.

These can be used for testing reorganizations or for manual intervention in case of
chain forks.
---
 src/main.cpp          | 73 +++++++++++++++++++++++++++++++++++++++++
 src/main.h            |  6 ++++
 src/rpcblockchain.cpp | 76 +++++++++++++++++++++++++++++++++++++++++++
 src/rpcserver.cpp     |  2 ++
 src/rpcserver.h       |  2 ++
 5 files changed, 159 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 0a81d0d7b496..eeef513528b1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2135,6 +2135,79 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     return true;
 }
 
+bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
+    AssertLockHeld(cs_main);
+
+    // Mark the block itself as invalid.
+    pindex->nStatus |= BLOCK_FAILED_VALID;
+    if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+        return state.Abort("Failed to update block index");
+    }
+    setBlockIndexCandidates.erase(pindex);
+
+    while (chainActive.Contains(pindex)) {
+        CBlockIndex *pindexWalk = chainActive.Tip();
+        pindexWalk->nStatus |= BLOCK_FAILED_CHILD;
+        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexWalk))) {
+            return state.Abort("Failed to update block index");
+        }
+        setBlockIndexCandidates.erase(pindexWalk);
+        // ActivateBestChain considers blocks already in chainActive
+        // unconditionally valid already, so force disconnect away from it.
+        if (!DisconnectTip(state)) {
+            return false;
+        }
+    }
+
+    // The resulting new best tip may not be in setBlockIndexCandidates anymore, so
+    // add them again.
+    BlockMap::iterator it = mapBlockIndex.begin();
+    while (it != mapBlockIndex.end()) {
+        if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
+            setBlockIndexCandidates.insert(pindex);
+        }
+        it++;
+    }
+
+    InvalidChainFound(pindex);
+    return true;
+}
+
+bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
+    AssertLockHeld(cs_main);
+
+    int nHeight = pindex->nHeight;
+
+    // Remove the invalidity flag from this block and all its descendants.
+    BlockMap::iterator it = mapBlockIndex.begin();
+    while (it != mapBlockIndex.end()) {
+        if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) {
+            it->second->nStatus &= ~BLOCK_FAILED_MASK;
+            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+                return state.Abort("Failed to update block index");
+            }
+            if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
+                setBlockIndexCandidates.insert(it->second);
+            }
+            if (it->second == pindexBestInvalid) {
+                // Reset invalid block marker if it was pointing to one of those.
+                pindexBestInvalid = NULL;
+            }
+        }
+        it++;
+    }
+
+    // Remove the invalidity flag from all ancestors too.
+    while (pindex != NULL) {
+        pindex->nStatus &= ~BLOCK_FAILED_MASK;
+        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
+            return state.Abort("Failed to update block index");
+        }
+        pindex = pindex->pprev;
+    }
+    return true;
+}
+
 CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
 {
     // Check for duplicate
diff --git a/src/main.h b/src/main.h
index c0d64125281f..aee8d9234a9b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -609,6 +609,12 @@ class CVerifyDB {
 /** Find the last common block between the parameter chain and a locator. */
 CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator);
 
+/** Mark a block as invalid. */
+bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex);
+
+/** Remove invalidity status from a block and its descendants. */
+bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex);
+
 /** The currently-connected chain of blocks. */
 extern CChain chainActive;
 
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index e8b0f62a830f..0ce18e4147fd 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -561,3 +561,79 @@ Value getmempoolinfo(const Array& params, bool fHelp)
     return ret;
 }
 
+Value invalidateblock(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "invalidateblock \"hash\"\n"
+            "\nPermanently marks a block as invalid, as if it violated a consensus rule.\n"
+            "\nArguments:\n"
+            "1. hash   (string, required) the hash of the block to mark as invalid\n"
+            "\nResult:\n"
+            "\nExamples:\n"
+            + HelpExampleCli("invalidateblock", "\"blockhash\"")
+            + HelpExampleRpc("invalidateblock", "\"blockhash\"")
+        );
+
+    std::string strHash = params[0].get_str();
+    uint256 hash(strHash);
+    CValidationState state;
+
+    {
+        LOCK(cs_main);
+        if (mapBlockIndex.count(hash) == 0)
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
+
+        CBlockIndex* pblockindex = mapBlockIndex[hash];
+        InvalidateBlock(state, pblockindex);
+    }
+
+    if (state.IsValid()) {
+        ActivateBestChain(state);
+    }
+
+    if (!state.IsValid()) {
+        throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());
+    }
+
+    return Value::null;
+}
+
+Value reconsiderblock(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "reconsiderblock \"hash\"\n"
+            "\nRemoves invalidity status of a block and its descendants, reconsider them for activation.\n"
+            "This can be used to undo the effects of invalidateblock.\n"
+            "\nArguments:\n"
+            "1. hash   (string, required) the hash of the block to reconsider\n"
+            "\nResult:\n"
+            "\nExamples:\n"
+            + HelpExampleCli("reconsiderblock", "\"blockhash\"")
+            + HelpExampleRpc("reconsiderblock", "\"blockhash\"")
+        );
+
+    std::string strHash = params[0].get_str();
+    uint256 hash(strHash);
+    CValidationState state;
+
+    {
+        LOCK(cs_main);
+        if (mapBlockIndex.count(hash) == 0)
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Block not found");
+
+        CBlockIndex* pblockindex = mapBlockIndex[hash];
+        ReconsiderBlock(state, pblockindex);
+    }
+
+    if (state.IsValid()) {
+        ActivateBestChain(state);
+    }
+
+    if (!state.IsValid()) {
+        throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());
+    }
+
+    return Value::null;
+}
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index b03016a50853..c53dbe22ddb1 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -270,6 +270,8 @@ static const CRPCCommand vRPCCommands[] =
     { "blockchain",         "gettxout",               &gettxout,               true,      false,      false },
     { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
     { "blockchain",         "verifychain",            &verifychain,            true,      false,      false },
+    { "blockchain",         "invalidateblock",        &invalidateblock,        true,      true,       false },
+    { "blockchain",         "reconsiderblock",        &reconsiderblock,        true,      true,       false },
 
     /* Mining */
     { "mining",             "getblocktemplate",       &getblocktemplate,       true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index b0e437057bff..2b2428445d7c 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -222,6 +222,8 @@ extern json_spirit::Value gettxoutsetinfo(const json_spirit::Array& params, bool
 extern json_spirit::Value gettxout(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value verifychain(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getchaintips(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value invalidateblock(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value reconsiderblock(const json_spirit::Array& params, bool fHelp);
 
 // in rest.cpp
 extern bool HTTPReq_REST(AcceptedConnection *conn,

From 0dd06b2515cd4d1f0be4dcf9060e34f3b9abde76 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 25 Nov 2014 12:33:43 +0100
Subject: [PATCH 1131/1819] Delay writing block indexes in
 invalidate/reconsider

---
 src/main.cpp | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index eeef513528b1..5695c8ba51ea 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2140,17 +2140,13 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
 
     // Mark the block itself as invalid.
     pindex->nStatus |= BLOCK_FAILED_VALID;
-    if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-        return state.Abort("Failed to update block index");
-    }
+    setDirtyBlockIndex.insert(pindex);
     setBlockIndexCandidates.erase(pindex);
 
     while (chainActive.Contains(pindex)) {
         CBlockIndex *pindexWalk = chainActive.Tip();
         pindexWalk->nStatus |= BLOCK_FAILED_CHILD;
-        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindexWalk))) {
-            return state.Abort("Failed to update block index");
-        }
+        setDirtyBlockIndex.insert(pindexWalk);
         setBlockIndexCandidates.erase(pindexWalk);
         // ActivateBestChain considers blocks already in chainActive
         // unconditionally valid already, so force disconnect away from it.
@@ -2183,9 +2179,7 @@ bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
     while (it != mapBlockIndex.end()) {
         if (!it->second->IsValid() && it->second->GetAncestor(nHeight) == pindex) {
             it->second->nStatus &= ~BLOCK_FAILED_MASK;
-            if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-                return state.Abort("Failed to update block index");
-            }
+            setDirtyBlockIndex.insert(it->second);
             if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
                 setBlockIndexCandidates.insert(it->second);
             }
@@ -2199,9 +2193,9 @@ bool ReconsiderBlock(CValidationState& state, CBlockIndex *pindex) {
 
     // Remove the invalidity flag from all ancestors too.
     while (pindex != NULL) {
-        pindex->nStatus &= ~BLOCK_FAILED_MASK;
-        if (!pblocktree->WriteBlockIndex(CDiskBlockIndex(pindex))) {
-            return state.Abort("Failed to update block index");
+        if (pindex->nStatus & BLOCK_FAILED_MASK) {
+            pindex->nStatus &= ~BLOCK_FAILED_MASK;
+            setDirtyBlockIndex.insert(pindex);
         }
         pindex = pindex->pprev;
     }

From bd9aebf19d6714552fe9f23bce97159d90d63e5b Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 26 Nov 2014 16:33:18 +0100
Subject: [PATCH 1132/1819] Introduce a hidden category

---
 src/rpcserver.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c53dbe22ddb1..ac0df5fa3bfe 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -160,7 +160,7 @@ string CRPCTable::help(string strCommand) const
         // We already filter duplicates, but these deprecated screw up the sort order
         if (strMethod.find("label") != string::npos)
             continue;
-        if (strCommand != "" && strMethod != strCommand)
+        if ((strCommand != "" || pcmd->category == "hidden") && strMethod != strCommand)
             continue;
 #ifdef ENABLE_WALLET
         if (pcmd->reqWallet && !pwalletMain)
@@ -270,8 +270,6 @@ static const CRPCCommand vRPCCommands[] =
     { "blockchain",         "gettxout",               &gettxout,               true,      false,      false },
     { "blockchain",         "gettxoutsetinfo",        &gettxoutsetinfo,        true,      false,      false },
     { "blockchain",         "verifychain",            &verifychain,            true,      false,      false },
-    { "blockchain",         "invalidateblock",        &invalidateblock,        true,      true,       false },
-    { "blockchain",         "reconsiderblock",        &reconsiderblock,        true,      true,       false },
 
     /* Mining */
     { "mining",             "getblocktemplate",       &getblocktemplate,       true,      false,      false },
@@ -302,6 +300,10 @@ static const CRPCCommand vRPCCommands[] =
     { "util",               "estimatefee",            &estimatefee,            true,      true,       false },
     { "util",               "estimatepriority",       &estimatepriority,       true,      true,       false },
 
+    /* Not shown in help */
+    { "hidden",             "invalidateblock",        &invalidateblock,        true,      true,       false },
+    { "hidden",             "reconsiderblock",        &reconsiderblock,        true,      true,       false },
+
 #ifdef ENABLE_WALLET
     /* Wallet */
     { "wallet",             "addmultisigaddress",     &addmultisigaddress,     true,      false,      true },

From e3f315a0a5386667d38744b13dbb64d495d42376 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Thu, 27 Nov 2014 00:01:25 -0500
Subject: [PATCH 1133/1819] Fix python usage for arch's broken maintainers

---
 qa/rpc-tests/forknotify.py                 | 2 +-
 qa/rpc-tests/getblocktemplate_longpoll.py  | 2 +-
 qa/rpc-tests/getblocktemplate_proposals.py | 2 +-
 qa/rpc-tests/getchaintips.py               | 2 +-
 qa/rpc-tests/keypool.py                    | 2 +-
 qa/rpc-tests/listtransactions.py           | 2 +-
 qa/rpc-tests/netutil.py                    | 2 +-
 qa/rpc-tests/python-bitcoinrpc/setup.py    | 2 +-
 qa/rpc-tests/receivedby.py                 | 2 +-
 qa/rpc-tests/rpcbind_test.py               | 2 +-
 qa/rpc-tests/smartfees.py                  | 2 +-
 qa/rpc-tests/test_framework.py             | 2 +-
 qa/rpc-tests/txn_doublespend.py            | 2 +-
 qa/rpc-tests/wallet.py                     | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index 1d2c4a996635..ad2a748ca112 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/getblocktemplate_longpoll.py b/qa/rpc-tests/getblocktemplate_longpoll.py
index 263a5f6d59c6..b749b260b76e 100755
--- a/qa/rpc-tests/getblocktemplate_longpoll.py
+++ b/qa/rpc-tests/getblocktemplate_longpoll.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py
index 0f7859584a42..22fe2ce044ef 100755
--- a/qa/rpc-tests/getblocktemplate_proposals.py
+++ b/qa/rpc-tests/getblocktemplate_proposals.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
index dda3450eb64c..0c31e8bab0c2 100755
--- a/qa/rpc-tests/getchaintips.py
+++ b/qa/rpc-tests/getchaintips.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py
index 354ee0822ca5..3840ea39d365 100755
--- a/qa/rpc-tests/keypool.py
+++ b/qa/rpc-tests/keypool.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index 530b00db8fe6..8ee9d66a29eb 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/netutil.py b/qa/rpc-tests/netutil.py
index b740ee0f9842..b30a88a4f783 100644
--- a/qa/rpc-tests/netutil.py
+++ b/qa/rpc-tests/netutil.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/python-bitcoinrpc/setup.py b/qa/rpc-tests/python-bitcoinrpc/setup.py
index b5a217bf93e4..43cdb1c03844 100644
--- a/qa/rpc-tests/python-bitcoinrpc/setup.py
+++ b/qa/rpc-tests/python-bitcoinrpc/setup.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 from distutils.core import setup
 
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index e3f86d38dc7a..d3504e0920e6 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py
index 5e476e2505bb..655e00b6e7b4 100755
--- a/qa/rpc-tests/rpcbind_test.py
+++ b/qa/rpc-tests/rpcbind_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index 57a72dd96b4d..924d16010255 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index 9591c024fb34..6c4ec073c288 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/txn_doublespend.py b/qa/rpc-tests/txn_doublespend.py
index 6125147ebcc1..942d9fc66c14 100755
--- a/qa/rpc-tests/txn_doublespend.py
+++ b/qa/rpc-tests/txn_doublespend.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
index 4271d96be7b7..bf71d5ebc517 100755
--- a/qa/rpc-tests/wallet.py
+++ b/qa/rpc-tests/wallet.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 2014 The Bitcoin Core developers
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.

From 57be955ba070c8e41c8bd8b41be1ad912a588c52 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 27 Nov 2014 09:50:20 +0100
Subject: [PATCH 1134/1819] Remove -printblock, -printblocktree, and
 -printblockindex

---
 src/init.cpp | 30 -----------------------
 src/main.cpp | 69 ----------------------------------------------------
 src/main.h   |  2 --
 3 files changed, 101 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 63e72c66d2d8..7b6ebb1b309b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -330,8 +330,6 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
-        strUsage += "  -printblock=<hash>     " + _("Print block on startup, if found in block index") + "\n";
-        strUsage += "  -printblocktree        " + strprintf(_("Print block tree on startup (default: %u)"), 0) + "\n";
         strUsage += "  -printpriority         " + strprintf(_("Log transaction priority and fee per kB when mining blocks (default: %u)"), 0) + "\n";
         strUsage += "  -privdb                " + strprintf(_("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"), 1) + "\n";
         strUsage += "  -regtest               " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
@@ -1048,34 +1046,6 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
     LogPrintf(" block index %15dms\n", GetTimeMillis() - nStart);
 
-    if (GetBoolArg("-printblockindex", false) || GetBoolArg("-printblocktree", false))
-    {
-        PrintBlockTree();
-        return false;
-    }
-
-    if (mapArgs.count("-printblock"))
-    {
-        string strMatch = mapArgs["-printblock"];
-        int nFound = 0;
-        for (BlockMap::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
-        {
-            uint256 hash = (*mi).first;
-            if (boost::algorithm::starts_with(hash.ToString(), strMatch))
-            {
-                CBlockIndex* pindex = (*mi).second;
-                CBlock block;
-                ReadBlockFromDisk(block, pindex);
-                block.BuildMerkleTree();
-                LogPrintf("%s\n", block.ToString());
-                nFound++;
-            }
-        }
-        if (nFound == 0)
-            LogPrintf("No blocks matching %s were found\n", strMatch);
-        return false;
-    }
-
     boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
     CAutoFile est_filein(fopen(est_path.string().c_str(), "rb"), SER_DISK, CLIENT_VERSION);
     // Allowed to fail as this file IS missing on first startup.
diff --git a/src/main.cpp b/src/main.cpp
index 0a81d0d7b496..7b821975a75d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3113,75 +3113,6 @@ bool InitBlockIndex() {
 
 
 
-void PrintBlockTree()
-{
-    AssertLockHeld(cs_main);
-    // pre-compute tree structure
-    map<CBlockIndex*, vector<CBlockIndex*> > mapNext;
-    for (BlockMap::iterator mi = mapBlockIndex.begin(); mi != mapBlockIndex.end(); ++mi)
-    {
-        CBlockIndex* pindex = (*mi).second;
-        mapNext[pindex->pprev].push_back(pindex);
-        // test
-        //while (rand() % 3 == 0)
-        //    mapNext[pindex->pprev].push_back(pindex);
-    }
-
-    vector<pair<int, CBlockIndex*> > vStack;
-    vStack.push_back(make_pair(0, chainActive.Genesis()));
-
-    int nPrevCol = 0;
-    while (!vStack.empty())
-    {
-        int nCol = vStack.back().first;
-        CBlockIndex* pindex = vStack.back().second;
-        vStack.pop_back();
-
-        // print split or gap
-        if (nCol > nPrevCol)
-        {
-            for (int i = 0; i < nCol-1; i++)
-                LogPrintf("| ");
-            LogPrintf("|\\\n");
-        }
-        else if (nCol < nPrevCol)
-        {
-            for (int i = 0; i < nCol; i++)
-                LogPrintf("| ");
-            LogPrintf("|\n");
-       }
-        nPrevCol = nCol;
-
-        // print columns
-        for (int i = 0; i < nCol; i++)
-            LogPrintf("| ");
-
-        // print item
-        CBlock block;
-        ReadBlockFromDisk(block, pindex);
-        LogPrintf("%d (blk%05u.dat:0x%x)  %s  tx %u\n",
-            pindex->nHeight,
-            pindex->GetBlockPos().nFile, pindex->GetBlockPos().nPos,
-            DateTimeStrFormat("%Y-%m-%d %H:%M:%S", block.GetBlockTime()),
-            block.vtx.size());
-
-        // put the main time-chain first
-        vector<CBlockIndex*>& vNext = mapNext[pindex];
-        for (unsigned int i = 0; i < vNext.size(); i++)
-        {
-            if (chainActive.Next(vNext[i]))
-            {
-                swap(vNext[0], vNext[i]);
-                break;
-            }
-        }
-
-        // iterate children
-        for (unsigned int i = 0; i < vNext.size(); i++)
-            vStack.push_back(make_pair(nCol+i, vNext[i]));
-    }
-}
-
 bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
 {
     // Map of disk positions for blocks with unknown parent (only used for reindex)
diff --git a/src/main.h b/src/main.h
index c0d64125281f..7a15c2608c57 100644
--- a/src/main.h
+++ b/src/main.h
@@ -177,8 +177,6 @@ bool InitBlockIndex();
 bool LoadBlockIndex();
 /** Unload database information */
 void UnloadBlockIndex();
-/** Print the loaded block tree */
-void PrintBlockTree();
 /** Process protocol messages received from a given node */
 bool ProcessMessages(CNode* pfrom);
 /** Send queued protocol messages to be sent to a give node */

From 1b91be49f53936429d16fb841433139a66af6262 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 27 Nov 2014 10:46:55 +0100
Subject: [PATCH 1135/1819] Report status of chain tips

---
 qa/pull-tester/rpc-tests.sh  |  1 +
 qa/rpc-tests/getchaintips.py |  7 ++++++-
 src/rpcblockchain.cpp        | 27 +++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index e01e870390af..2f1e24b78df4 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -20,6 +20,7 @@ if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --mineblock --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/getchaintips.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
index dda3450eb64c..1e84b40e4346 100755
--- a/qa/rpc-tests/getchaintips.py
+++ b/qa/rpc-tests/getchaintips.py
@@ -19,6 +19,7 @@ def run_test (self):
         assert_equal (len (tips), 1)
         assert_equal (tips[0]['branchlen'], 0)
         assert_equal (tips[0]['height'], 200)
+        assert_equal (tips[0]['status'], 'active')
 
         # Split the network and build two chains of different lengths.
         self.split_network ()
@@ -31,12 +32,14 @@ def run_test (self):
         shortTip = tips[0]
         assert_equal (shortTip['branchlen'], 0)
         assert_equal (shortTip['height'], 210)
+        assert_equal (tips[0]['status'], 'active')
 
         tips = self.nodes[3].getchaintips ()
         assert_equal (len (tips), 1)
         longTip = tips[0]
         assert_equal (longTip['branchlen'], 0)
         assert_equal (longTip['height'], 220)
+        assert_equal (tips[0]['status'], 'active')
 
         # Join the network halves and check that we now have two tips
         # (at least at the nodes that previously had the short chain).
@@ -47,7 +50,9 @@ def run_test (self):
         assert_equal (tips[0], longTip)
 
         assert_equal (tips[1]['branchlen'], 10)
-        tips[1]['branchlen'] = 0;
+        assert_equal (tips[1]['status'], 'valid-fork')
+        tips[1]['branchlen'] = 0
+        tips[1]['status'] = 'active'
         assert_equal (tips[1], shortTip)
 
 if __name__ == '__main__':
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index e8b0f62a830f..5c4ee691dd55 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -496,11 +496,13 @@ Value getchaintips(const Array& params, bool fHelp)
             "    \"height\": xxxx,         (numeric) height of the chain tip\n"
             "    \"hash\": \"xxxx\",         (string) block hash of the tip\n"
             "    \"branchlen\": 0          (numeric) zero for main chain\n"
+            "    \"status\": \"active\"      (string) \"active\" for the main chain\n"
             "  },\n"
             "  {\n"
             "    \"height\": xxxx,\n"
             "    \"hash\": \"xxxx\",\n"
             "    \"branchlen\": 1          (numeric) length of branch connecting the tip to the main chain\n"
+            "    \"status\": \"xxxx\"        (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)\n"
             "  }\n"
             "]\n"
             "\nExamples:\n"
@@ -521,6 +523,9 @@ Value getchaintips(const Array& params, bool fHelp)
             setTips.erase(pprev);
     }
 
+    // Always report the currently active tip.
+    setTips.insert(chainActive.Tip());
+
     /* Construct the output array.  */
     Array res;
     BOOST_FOREACH(const CBlockIndex* block, setTips)
@@ -532,6 +537,28 @@ Value getchaintips(const Array& params, bool fHelp)
         const int branchLen = block->nHeight - chainActive.FindFork(block)->nHeight;
         obj.push_back(Pair("branchlen", branchLen));
 
+        string status;
+        if (chainActive.Contains(block)) {
+            // This block is part of the currently active chain.
+            status = "active";
+        } else if (block->nStatus & BLOCK_FAILED_MASK) {
+            // This block or one of its ancestors is invalid.
+            status = "invalid";
+        } else if (block->nChainTx == 0) {
+            // This block cannot be connected because full block data for it or one of its parents is missing.
+            status = "headers-only";
+        } else if (block->IsValid(BLOCK_VALID_SCRIPTS)) {
+            // This block is fully validated, but no longer part of the active chain. It was probably the active block once, but was reorganized.
+            status = "valid-fork";
+        } else if (block->IsValid(BLOCK_VALID_TREE)) {
+            // The headers for this block are valid, but it has not been validated. It was probably never part of the most-work chain.
+            status = "valid-headers";
+        } else {
+            // No clue.
+            status = "unknown";
+        }
+        obj.push_back(Pair("status", status));
+
         res.push_back(obj);
     }
 

From 8a5c9513ba24c2cb0e0889474e32f108a29d087b Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 26 Nov 2014 14:17:33 +0100
Subject: [PATCH 1136/1819] [REST] make selection of output-format mandatory,
 support dot url syntax

1. Remove the default format (binary) because `rest/block/<hash>/Hex` would end up delivering binary data.
2. List available formats when chosen format was not found (reduces need for documentation)
3. Change url syntax to dot extension like format chosing (like `rest/tx/<hash>.json`
---
 src/rest.cpp | 89 +++++++++++++++++++++++++++++++++-------------------
 1 file changed, 57 insertions(+), 32 deletions(-)

diff --git a/src/rest.cpp b/src/rest.cpp
index 4953d7e717da..27551c929552 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -18,6 +18,7 @@ using namespace std;
 using namespace json_spirit;
 
 enum RetFormat {
+    RF_UNDEF,
     RF_BINARY,
     RF_HEX,
     RF_JSON,
@@ -25,14 +26,16 @@ enum RetFormat {
 
 static const struct {
     enum RetFormat rf;
-    const char *name;
+    const char* name;
 } rf_names[] = {
-    { RF_BINARY, "binary" },            // default, if match not found
-    { RF_HEX, "hex" },
-    { RF_JSON, "json" },
+      {RF_UNDEF, ""},
+      {RF_BINARY, "bin"},
+      {RF_HEX, "hex"},
+      {RF_JSON, "json"},
 };
 
-class RestErr {
+class RestErr
+{
 public:
     enum HTTPStatusCode status;
     string message;
@@ -49,15 +52,34 @@ static RestErr RESTERR(enum HTTPStatusCode status, string message)
     return re;
 }
 
-static enum RetFormat ParseDataFormat(const string& format)
+static enum RetFormat ParseDataFormat(vector<string>& params, const string strReq)
 {
-    for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
-        if (format == rf_names[i].name)
-            return rf_names[i].rf;
+    boost::split(params, strReq, boost::is_any_of("."));
+    if (params.size() > 1) {
+        for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
+            if (params[1] == rf_names[i].name)
+                return rf_names[i].rf;
+    }
 
     return rf_names[0].rf;
 }
 
+static string AvailableDataFormatsString()
+{
+    string formats = "";
+    for (unsigned int i = 0; i < ARRAYLEN(rf_names); i++)
+        if (strlen(rf_names[i].name) > 0) {
+            formats.append(".");
+            formats.append(rf_names[i].name);
+            formats.append(", ");
+        }
+
+    if (formats.length() > 0)
+        return formats.substr(0, formats.length() - 2);
+
+    return formats;
+}
+
 static bool ParseHashStr(const string& strReq, uint256& v)
 {
     if (!IsHex(strReq) || (strReq.size() != 64))
@@ -67,15 +89,13 @@ static bool ParseHashStr(const string& strReq, uint256& v)
     return true;
 }
 
-static bool rest_block(AcceptedConnection *conn,
+static bool rest_block(AcceptedConnection* conn,
                        string& strReq,
                        map<string, string>& mapHeaders,
                        bool fRun)
 {
     vector<string> params;
-    boost::split(params, strReq, boost::is_any_of("/"));
-
-    enum RetFormat rf = ParseDataFormat(params.size() > 1 ? params[1] : string(""));
+    enum RetFormat rf = ParseDataFormat(params, strReq);
 
     string hashStr = params[0];
     uint256 hash;
@@ -105,7 +125,7 @@ static bool rest_block(AcceptedConnection *conn,
     }
 
     case RF_HEX: {
-        string strHex = HexStr(ssBlock.begin(), ssBlock.end()) + "\n";;
+        string strHex = HexStr(ssBlock.begin(), ssBlock.end()) + "\n";
         conn->stream() << HTTPReply(HTTP_OK, strHex, fRun, false, "text/plain") << std::flush;
         return true;
     }
@@ -115,22 +135,24 @@ static bool rest_block(AcceptedConnection *conn,
         string strJSON = write_string(Value(objBlock), false) + "\n";
         conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
         return true;
-     }
+    }
+
+    default: {
+        throw RESTERR(HTTP_NOT_FOUND, "output format not found (available: " + AvailableDataFormatsString() + ")");
+    }
     }
 
     // not reached
-    return true;     // continue to process further HTTP reqs on this cxn
+    return true; // continue to process further HTTP reqs on this cxn
 }
 
-static bool rest_tx(AcceptedConnection *conn,
+static bool rest_tx(AcceptedConnection* conn,
                     string& strReq,
                     map<string, string>& mapHeaders,
                     bool fRun)
 {
     vector<string> params;
-    boost::split(params, strReq, boost::is_any_of("/"));
-
-    enum RetFormat rf = ParseDataFormat(params.size() > 1 ? params[1] : string(""));
+    enum RetFormat rf = ParseDataFormat(params, strReq);
 
     string hashStr = params[0];
     uint256 hash;
@@ -153,7 +175,7 @@ static bool rest_tx(AcceptedConnection *conn,
     }
 
     case RF_HEX: {
-        string strHex = HexStr(ssTx.begin(), ssTx.end()) + "\n";;
+        string strHex = HexStr(ssTx.begin(), ssTx.end()) + "\n";
         conn->stream() << HTTPReply(HTTP_OK, strHex, fRun, false, "text/plain") << std::flush;
         return true;
     }
@@ -165,33 +187,37 @@ static bool rest_tx(AcceptedConnection *conn,
         conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
         return true;
     }
+
+    default: {
+        throw RESTERR(HTTP_NOT_FOUND, "output format not found (available: " + AvailableDataFormatsString() + ")");
+    }
     }
 
     // not reached
-    return true;     // continue to process further HTTP reqs on this cxn
+    return true; // continue to process further HTTP reqs on this cxn
 }
 
 static const struct {
-    const char *prefix;
-    bool (*handler)(AcceptedConnection *conn,
+    const char* prefix;
+    bool (*handler)(AcceptedConnection* conn,
                     string& strURI,
                     map<string, string>& mapHeaders,
                     bool fRun);
 } uri_prefixes[] = {
-    { "/rest/tx/", rest_tx },
-    { "/rest/block/", rest_block },
+      {"/rest/tx/", rest_tx},
+      {"/rest/block/", rest_block},
 };
 
-bool HTTPReq_REST(AcceptedConnection *conn,
+bool HTTPReq_REST(AcceptedConnection* conn,
                   string& strURI,
                   map<string, string>& mapHeaders,
                   bool fRun)
 {
     try {
         std::string statusmessage;
-        if(RPCIsInWarmup(&statusmessage))
-            throw RESTERR(HTTP_SERVICE_UNAVAILABLE, "Service temporarily unavailable: "+statusmessage);
-        
+        if (RPCIsInWarmup(&statusmessage))
+            throw RESTERR(HTTP_SERVICE_UNAVAILABLE, "Service temporarily unavailable: " + statusmessage);
+
         for (unsigned int i = 0; i < ARRAYLEN(uri_prefixes); i++) {
             unsigned int plen = strlen(uri_prefixes[i].prefix);
             if (strURI.substr(0, plen) == uri_prefixes[i].prefix) {
@@ -199,8 +225,7 @@ bool HTTPReq_REST(AcceptedConnection *conn,
                 return uri_prefixes[i].handler(conn, strReq, mapHeaders, fRun);
             }
         }
-    }
-    catch (RestErr& re) {
+    } catch (RestErr& re) {
         conn->stream() << HTTPReply(re.status, re.message + "\r\n", false, false, "text/plain") << std::flush;
         return false;
     }

From f86a24b368cf4e133add769966c7652ec3b63a75 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 28 Nov 2014 10:56:11 +0100
Subject: [PATCH 1137/1819] Move `setmocktime` to hidden category

Another testing-only potential footgun command.
---
 src/rpcserver.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index ac0df5fa3bfe..851221218558 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -246,7 +246,6 @@ static const CRPCCommand vRPCCommands[] =
     { "control",            "getinfo",                &getinfo,                true,      false,      false }, /* uses wallet if enabled */
     { "control",            "help",                   &help,                   true,      true,       false },
     { "control",            "stop",                   &stop,                   true,      true,       false },
-    { "control",            "setmocktime",            &setmocktime,            true,      false,      false },
 
     /* P2P networking */
     { "network",            "getnetworkinfo",         &getnetworkinfo,         true,      false,      false },
@@ -303,6 +302,7 @@ static const CRPCCommand vRPCCommands[] =
     /* Not shown in help */
     { "hidden",             "invalidateblock",        &invalidateblock,        true,      true,       false },
     { "hidden",             "reconsiderblock",        &reconsiderblock,        true,      true,       false },
+    { "hidden",             "setmocktime",            &setmocktime,            true,      false,      false },
 
 #ifdef ENABLE_WALLET
     /* Wallet */

From 1cf23f6c504788525bf2b18b8fc6bebf7cdd7b24 Mon Sep 17 00:00:00 2001
From: 21E14 <21xe14@gmail.com>
Date: Fri, 28 Nov 2014 00:13:44 -0500
Subject: [PATCH 1138/1819] Update the intent on SI-style separators.

---
 src/qt/bitcoinunits.cpp | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index c85f569fd33c..75e1f9ae788d 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -106,10 +106,8 @@ QString BitcoinUnits::format(int unit, const CAmount& nIn, bool fPlus, Separator
     QString quotient_str = QString::number(quotient);
     QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0');
 
-    // Use SI-stule separators as these are locale indendent and can't be
-    // confused with the decimal marker.  Rule is to use a thin space every
-    // three digits on *both* sides of the decimal point - but only if there
-    // are five or more digits
+    // Use SI-style thin space separators as these are locale independent and can't be
+    // confused with the decimal marker.
     QChar thin_sp(THIN_SP_CP);
     int q_size = quotient_str.size();
     if (separators == separatorAlways || (separators == separatorStandard && q_size > 4))

From 4cdaa95a209808276992dc1eb0ed0773f7927073 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 28 Nov 2014 21:16:51 +0100
Subject: [PATCH 1139/1819] Resize after succesful result

---
 src/key.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/key.cpp b/src/key.cpp
index 0fb7a5c7c5d2..07fffcb0e014 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -83,10 +83,11 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, uint32_
         nonce += test_case;
         int nSigLen = 72;
         int ret = secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), (unsigned char*)&nonce);
-        vchSig.resize(nSigLen);
         nonce = 0;
-        if (ret)
+        if (ret) {
+            vchSig.resize(nSigLen);
             return true;
+        }
     } while(true);
 }
 

From 43422a0121b4d34fac268eacd7fbd9ead8e73efd Mon Sep 17 00:00:00 2001
From: Cozz Lovan <cozzlovan@yahoo.com>
Date: Fri, 28 Nov 2014 19:11:49 +0100
Subject: [PATCH 1140/1819] [Qt] Fix wallet-lock in
 CWallet::GetAccountAddresses(..)

---
 src/wallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 000a088b9714..27dbf61c2ba5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2030,7 +2030,7 @@ set< set<CTxDestination> > CWallet::GetAddressGroupings()
 
 set<CTxDestination> CWallet::GetAccountAddresses(string strAccount) const
 {
-    AssertLockHeld(cs_wallet); // mapWallet
+    LOCK(cs_wallet);
     set<CTxDestination> result;
     BOOST_FOREACH(const PAIRTYPE(CTxDestination, CAddressBookData)& item, mapAddressBook)
     {

From 4c69ebed44789be056a7b713bed43e5d3b3a5542 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Sun, 30 Nov 2014 09:56:20 +0100
Subject: [PATCH 1141/1819] Add /opt/local/include/db48 only if it exists.

---
 configure.ac | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9814197af365..c4c21eaf4f69 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,8 +244,12 @@ case $host in
        AC_CHECK_PROG([PORT],port, port)
        if test x$PORT = xport; then
          dnl add default macports paths
-         CPPFLAGS="$CPPFLAGS -isystem /opt/local/include -I/opt/local/include/db48"
-         LIBS="$LIBS -L/opt/local/lib -L/opt/local/lib/db48"
+         CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
+         LIBS="$LIBS -L/opt/local/lib"
+         if test -d /opt/local/include/db48; then
+           CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48"
+           LIBS="$LIBS -L/opt/local/lib/db48"
+         fi
        fi
 
        AC_CHECK_PROG([BREW],brew, brew)

From 01dc2d83f80d8890ccb197110bbeb328ab68c285 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Wed, 26 Nov 2014 16:26:02 +0100
Subject: [PATCH 1142/1819] [REST] add REST interface tests in rpc-test section

---
 qa/pull-tester/rpc-tests.sh |  1 +
 qa/rpc-tests/rest.py        | 62 +++++++++++++++++++++++++++++++++++++
 qa/rpc-tests/util.py        |  6 +++-
 3 files changed, 68 insertions(+), 1 deletion(-)
 create mode 100755 qa/rpc-tests/rest.py

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index 2f1e24b78df4..a064fb81e911 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -21,6 +21,7 @@ if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --mineblock --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/getchaintips.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/rest.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
new file mode 100755
index 000000000000..ca09a5c6d8ae
--- /dev/null
+++ b/qa/rpc-tests/rest.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
+#
+# Test REST interface
+#
+
+from test_framework import BitcoinTestFramework
+from util import *
+import json
+
+try:
+    import http.client as httplib
+except ImportError:
+    import httplib
+try:
+    import urllib.parse as urlparse
+except ImportError:
+    import urlparse
+
+def http_get_call(host, port, path, response_object = 0):
+    conn = httplib.HTTPConnection(host, port)
+    conn.request('GET', path)
+    
+    if response_object:
+        return conn.getresponse()
+        
+    return conn.getresponse().read()
+
+
+class RESTTest (BitcoinTestFramework):
+    FORMAT_SEPARATOR = "/"
+    
+    def run_test(self):
+        url = urlparse.urlparse(self.nodes[0].url)
+        bb_hash = self.nodes[0].getbestblockhash()
+        
+        # check binary format
+        response = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"bin", True)
+        assert_equal(response.status, 200)
+        assert_greater_than(int(response.getheader('content-length')), 10)
+        
+        # check json format
+        json_string = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+'json')
+        json_obj = json.loads(json_string)
+        assert_equal(json_obj['hash'], bb_hash)
+        
+        # do tx test
+        tx_hash = json_obj['tx'][0];
+        json_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"json")
+        json_obj = json.loads(json_string)
+        assert_equal(json_obj['txid'], tx_hash)
+        
+        # check hex format response
+        hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", True)
+        assert_equal(response.status, 200)
+        assert_greater_than(int(response.getheader('content-length')), 10)
+
+if __name__ == '__main__':
+    RESTTest ().main ()
\ No newline at end of file
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index bed7fed8ca5c..6b66bfd8f60c 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -163,7 +163,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None):
     Start a bitcoind and return RPC connection to it
     """
     datadir = os.path.join(dirname, "node"+str(i))
-    args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0" ]
+    args = [ os.getenv("BITCOIND", "bitcoind"), "-datadir="+datadir, "-keypool=1", "-discover=0", "-rest" ]
     if extra_args is not None: args.extend(extra_args)
     bitcoind_processes[i] = subprocess.Popen(args)
     devnull = open("/dev/null", "w+")
@@ -327,3 +327,7 @@ def random_transaction(nodes, amount, min_fee, fee_increment, fee_variants):
 def assert_equal(thing1, thing2):
     if thing1 != thing2:
         raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
+
+def assert_greater_than(thing1, thing2):
+    if thing1 <= thing2:
+        raise AssertionError("%s <= %s"%(str(thing1),str(thing2)))
\ No newline at end of file

From 8a20cd3c516c1134905d943861d506213e33e90e Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 1 Dec 2014 12:51:45 +0000
Subject: [PATCH 1143/1819] prioritisetransaction RPC: Restore compatibility
 with existing implementations by using satoshis for fee offset rather than
 BTC

---
 src/rpcmining.cpp | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 837a7593b6ef..45899d3db533 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -266,6 +266,7 @@ Value getmininginfo(const Array& params, bool fHelp)
 }
 
 
+// NOTE: Unlike wallet RPC (which use BTC values), mining RPCs follow GBT (BIP 22) in using satoshi amounts
 Value prioritisetransaction(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() != 3)
@@ -277,22 +278,20 @@ Value prioritisetransaction(const Array& params, bool fHelp)
             "2. priority delta (numeric, required) The priority to add or subtract.\n"
             "                  The transaction selection algorithm considers the tx as it would have a higher priority.\n"
             "                  (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n"
-            "3. fee delta      (numeric, required) The absolute fee value to add or subtract in bitcoin.\n"
+            "3. fee delta      (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n"
             "                  The fee is not actually paid, only the algorithm for selecting transactions into a block\n"
             "                  considers the transaction as it would have paid a higher (or lower) fee.\n"
             "\nResult\n"
             "true              (boolean) Returns true\n"
             "\nExamples:\n"
-            + HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 0.00010000")
-            + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 0.00010000")
+            + HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 10000")
+            + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000")
         );
 
     uint256 hash;
     hash.SetHex(params[0].get_str());
 
-    CAmount nAmount = 0;
-    if (params[2].get_real() != 0.0)
-        nAmount = AmountFromValue(params[2]);
+    CAmount nAmount = params[2].get_int64();
 
     mempool.PrioritiseTransaction(hash, params[0].get_str(), params[1].get_real(), nAmount);
     return true;

From 32b93a1bc2795ed2bc3a8d3d911d54f023d1ad54 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 1 Dec 2014 20:48:50 +0100
Subject: [PATCH 1144/1819] Extra explanation for getchaintips

---
 src/rpcblockchain.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 045cd90ef6a4..924f416904d1 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -505,6 +505,12 @@ Value getchaintips(const Array& params, bool fHelp)
             "    \"status\": \"xxxx\"        (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid)\n"
             "  }\n"
             "]\n"
+            "Possible values for status:\n"
+            "1.  \"invalid\"               This branch contains at least one invalid block\n"
+            "2.  \"headers-only\"          Not all blocks for this branch are available, but the headers are valid\n"
+            "3.  \"valid-headers\"         All blocks are available for this branch, but they were never fully validated\n"
+            "4.  \"valid-fork\"            This branch is not part of the active chain, but is fully validated\n"
+            "5.  \"active\"                This is the tip of the active main chain, which is certainly valid\n"
             "\nExamples:\n"
             + HelpExampleCli("getchaintips", "")
             + HelpExampleRpc("getchaintips", "")

From f67a9ce0dce1fbc5b4f542c425baf33a989ab965 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 1 Dec 2014 21:26:51 +0100
Subject: [PATCH 1145/1819] Use deterministically generated script tests

Now that signing is deterministic, we can require exact correspondence between the
automatically generated tests and the ones read from JSON. Do this, and update
the tests to those deterministic versions. Note that some flag changes weren't
correctly applied before.
---
 src/test/data/script_invalid.json | 60 +++++++++++++++----------------
 src/test/data/script_valid.json   | 47 ++++++++++++------------
 src/test/script_tests.cpp         | 34 +++++++-----------
 3 files changed, 65 insertions(+), 76 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 71e757714cb8..035d36b96521 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -497,121 +497,121 @@ nSequences are max.
 
 
 [
-    "0x47 0x30440220304eff7556bba9560df47873275e64db45f3cd735998ce3f00d2e57b1bb5f31302205c0c9d14b8b80d43e2ac9b87532f1af6d8a3271262bc694ec4e14068392bb0a001",
+    "0x47 0x3044022053205076a7bb12d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
     "",
     "P2PK, bad sig"
 ],
 [
-    "0x47 0x3044022037fcdb8e08f41e27588de8bc036d2c4b16eb3d09c1ba53b8f47a0a9c27722a39022058664b7a53b507e71dfafb77193e3786c3f0c119d78ce9104480ee7ece04f09301 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
+    "0x47 0x30440220151ea78fa148b59f399b23731b634645ebc142f299ee9838d46fb78cf7e0bc0102200d62327dcd54ac6bcfb1516b035b1bf8eaea438c52c62d3450d1f3a8f030e0de01 0x21 0x03363d90d446b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
     "DUP HASH160 0x14 0xc0834c0c158f53be706d234c38fd52de7eece656 EQUALVERIFY CHECKSIG",
     "",
     "P2PKH, bad pubkey"
 ],
 [
-    "0x47 0x3044022035e5b6742d299861c84cebaf2ea64145ee427a95facab39e2594d6deebb0c1d602200acb16778faa2e467a59006f342f2535b1418d55ba63a8605b387b7f9ac86d9a01",
+    "0x47 0x304402204710a85181663b32d25c70ec2bbd14adff5ddfff6cb50d09e155ef5f541fc86c0220056b0cc949be9386ecc5f6c2ac0493269031dbb185781db90171b54ac127790201",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
     "",
     "P2PK anyonecanpay marked with normal hashtype"
 ],
 [
-    "0x47 0x3044022029b2b8765ca950cf75a69e80b73b7ddfcaa8b27080c2db4c23b36aae60688e790220598ff368e17872ee065aa54d7d3a590682ca5204325b23b31d7da3c4a21ae67901 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
+    "0x47 0x304402202166fcd5e607de452d3c6f15e059505cf21654346592f9650ba906b9e8be88fa022005d976d28eb8de477102feba28807b3ad361e7fa24796d259c9d61452f7c318c01 0x23 0x210279be667ef9dcbbac54a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
     "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
     "P2SH",
     "P2SH(P2PK), bad redeemscript"
 ],
 [
-    "0x47 0x30440220647f906e63890df5ef1d3fed47ba892b31976c634281079e2bd38504fb54a1fb022021e8811f38fbe90efb6b74cb78da01d9badbac3bafdf70a861d7538a220d0b2601 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
+    "0x47 0x3044022064cc90ca89ad721384b231653b945579359a24b928ef8539b331172628c9cc6102203e238869ab5dac3fc293db53c12e7dd3079e86cfde9024b689efc7227e4d671001 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
     "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
     "P2SH",
     "P2SH(P2PKH), bad sig"
 ],
 [
-    "0 0x47 0x304402203ef170402f8887f2ac183f31b1f503b0bc60bfc968dd469b097ea6124aefac5002200612febadc4e4cacc086982cb85830a17af3680c1b6a3cf77c1708af7621cf1301 0 0x47 0x304402207821838251a24a2234844f68e7169e6d11945cdf052ea12bd3e4e37457aceb4402200b6b46c81361e314c740ae5133c072af5fa5c209d65d2db1679e1716f19a538101",
+    "0 0x47 0x3044022051254b9fb476a52d85530792b578f86fea70ec1ffb4393e661bcccb23d8d63d3022076505f94a403c86097841944e044c70c2045ce90e36de51f7e9d3828db98a07501 0x47 0x304402206d32e6d6b131ef2fe77b6a9b90b120d74e3e238e79dcffb10523a6ec94f93d65022067ae8772632ddf4c389258c6b70ed0ff94f20ee8f60207aa192a52a2469cddd901 0",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "",
     "3-of-3, 2 sigs"
 ],
 [
-    "0 0 0x47 0x304402204661f7795e8db7be3132e8974e9a76d1d24b31f23df94c6fbcea07d1c205789102203f5e45a1c0b085279b58d11b36d5fea5449c3cf16f844ad10124e9b65e8777d201 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
+    "0 0x47 0x304402205b7d2c2f177ae76cfbbf14d589c113b0b35db753d305d5562dd0b61cbf366cfb02202e56f93c4f08a27f986cd424ffc48a462c3202c4902104d4d0ff98ed28f4bf8001 0 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
     "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
     "P2SH",
     "P2SH(2-of-3), 1 sig"
 ],
 [
-    "0x47 0x304402200052bc1600ca45c71f3538720fe62a5e8548dffd137af04467598c98466e9c0a0220789318ddbc9991ee477974089220a2feb6a6298a7c93d5ff6c25a92a2f4b48d501",
+    "0x47 0x30440220001d6702bfa4f49c3a2542af9b1c2844a2eaac55f86f310f42d26a5dd17d6a8002202cdadbe608c00b50dd951c6ba0877d5b07a970f3e265c18697bc413a0a86f69901",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
-    "STRICTENC",
+    "DERSIG",
     "P2PK with too much R padding"
 ],
 [
-    "0x48 0x304502206eb7b92628bfb3c4d2a04b65b986987bcbb1af4fceedb144d5a0437b7ee410590221005f57a52df4aa26366742eed0db182fce51fbcd7159011b0644a7c05943eb228901",
+    "0x48 0x304502207d2b258e959605e2ea50b46fea1325b7391ffb0c14a5b58ef8ad3851da3644380221007e75136df5f2e38216c4338b31c97e8307102edb97d611e06914e1f8fba68ead01",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
-    "STRICTENC",
+    "DERSIG",
     "P2PK with too much S padding"
 ],
 [
-    "0x47 0x30440220d8ad1efd55a3d2b8896495c38aba72056e1b3ca4a6ca15760e843eb1a9b9907602203eb0e8f3d6bec998262dfd03eaeb0f31c4e5105965436dec77550724b3771f3201",
+    "0x47 0x30440220d7a0417c3f6d1a15094d1cf2a3378ca0503eb8a57630953a9e2987e21ddd0a6502207a6266d686c99090920249991d3d42065b6d43eb70187b219c0db82e4f94d1a201",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
-    "STRICTENC",
+    "DERSIG",
     "P2PK with too little R padding"
 ],
 [
-    "0x47 0x30440220001d0f82c127470cb38316c96b1719b33382353687a1146a776dee8259606905022062cd1fc8eacef819d68f0f41cc9ae9fdc2e29b70c3c7ad2c6c18f39b4e35c42701",
+    "0x47 0x30440220003040725f724b0e2142fc44ac71f6e13161f6410aeb6dee477952ede3b6a6ca022041ff4940ee3d88116ad281d7cc556e1f2c9427d82290bd7974a25addbcd5bede01",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
     "DERSIG",
     "P2PK NOT with bad sig with too much R padding"
 ],
 [
-    "0x47 0x30440220005d727e2a82d6e8a98a6da6fbc281325644d1a40455e386fdb17883a8e6bc4d02202d15cca42ce136047a980d288e60c679d7e84cce18c3ceffb6bc81b9e9ba517801",
+    "0x47 0x30440220003040725f724a0e2142fc44ac71f6e13161f6410aeb6dee477952ede3b6a6ca022041ff4940ee3d88116ad281d7cc556e1f2c9427d82290bd7974a25addbcd5bede01",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
     "",
     "P2PK NOT with too much R padding but no DERSIG"
 ],
 [
-    "0x47 0x30440220006e8bc4f82032b12bd594847c16d8b2986de734aa3b0528bd89d664d41e6d1c02200cfd582694891bcfa2e630e899bda257486eba00a007222fae71144dba07dc2901",
+    "0x47 0x30440220003040725f724a0e2142fc44ac71f6e13161f6410aeb6dee477952ede3b6a6ca022041ff4940ee3d88116ad281d7cc556e1f2c9427d82290bd7974a25addbcd5bede01",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
     "DERSIG",
     "P2PK NOT with too much R padding"
 ],
 [
-    "0x48 0x304502206c43e065c8a8db3bbe69015afb86a51fb2fc8870defd41d436da2a197d9d6c12022100fcec35816ee2d84ec271ad159fcabf5dd712157051169e48ac328a7818cdb51e01",
+    "0x49 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef05101",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
-    "LOW_S,STRICTENC",
+    "LOW_S",
     "P2PK with high S"
 ],
 [
-    "0x47 0x304402203aab50cd7c30cc1e1475dee615b295bcee6ccf8aa8a7f6cda6b696c70d79cbb40220558e43fe7596c31146e2d077698d5a9c38351d8ba567549a2ae43ca97231c39501",
+    "0x47 0x30440220745d63eb70d45652128b450aa5ca7d9b513439963f261cb1c40a60f0785e7ee402204877785b38945ca9dbec78e1c1d4dd12148cc25c868bd27480023b49ae0f310501",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
     "STRICTENC",
     "P2PK with hybrid pubkey"
 ],
 [
-    "0x47 0x304402205745e8f846110c185ee1185c01843a108588b81463d2c34d4a3f2445529f12fe02206ee6a2657bbc4e2bb74bfc44c3a5c4f410ed6356ca68982465de6ca807c807c201",
+    "0x47 0x30440220606f6f9f6cebc94ebfb6a4bff0b682bd99f05511295545ce9b275e98be3c946102206871d6a76f4e1b43d9763cfc5647844e4811682b1cab0325f060f44ddf44002201",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
     "",
     "P2PK NOT with hybrid pubkey but no STRICTENC"
 ],
 [
-    "0x47 0x3044022078033e4227aa05ded69d8da579966578e230d8a7fb44d5f1a0620c3853c24f78022006a2e3f4d872ac8dfdc529110aa37301d65a76255a4b6cce2992adacd4d2c4e201",
+    "0x47 0x30440220606f6f9f6cebc94ebfb6a4bff0b682bd99f05511295545ce9b275e98be3c946102206871d6a76f4e1b43d9763cfc5647844e4811682b1cab0325f060f44ddf44002201",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
     "STRICTENC",
     "P2PK NOT with hybrid pubkey"
 ],
 [
-    "0x47 0x304402207592427de20e315d644839754f2a5cca5b978b983a15e6da82109ede01722baa022032ceaf78590faa3f7743821e1b47b897ed1a57f6ee1c8a7519d23774d8de3c4401",
+    "0x47 0x30440220606f6f9f6cebc84ebfb6a4bff0b682bd99f05511295545ce9b275e98be3c946102206871d6a76f4e1b43d9763cfc5647844e4811682b1cab0325f060f44ddf44002201",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
     "STRICTENC",
     "P2PK NOT with invalid hybrid pubkey"
 ],
 [
-    "0 0x47 0x304402206797289d3dc81692edae58430276d04641ea5d86967be557163f8494da32fd78022006fc6ab77aaed4ac11ea69cd878ab26e3e24290f47a43e9adf34075d52b7142c01",
+    "0 0x47 0x304402203cdcf66792fe97e3955655ede5dad004950e58b369831ffa7743132c507b272c022031fbcfb4a72b3e00217abf2f5557585f1f9891f12827d2f0a2ae2978e7f9f11001",
     "1 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 2 CHECKMULTISIG",
     "STRICTENC",
     "1-of-2 with the first 1 hybrid pubkey"
 ],
 [
-    "0x47 0x304402201f82b99a813c9c48c8dee8d2c43b8f637b72353fe9bdcc084537bc17e2ab770402200c43b96a5f7e115f0114eabda32e068145965cb6c7b5ef64833bb4fcf9fc1b3b05",
+    "0x47 0x304402201c215cb13e4954e60ce4f6de74941904c771f998de7b1d9627e82a1949fde517022031c2197455f3dbecbb78321201308d7b039424e38d480772d7cd4eb465a083f405",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
     "STRICTENC",
     "P2PK with undefined hashtype"
@@ -636,37 +636,37 @@ signatures and pubkeys.
 ],
 
 [
-    "0x47 0x30440220166848cd5b82a32b5944d90de3c35249354b43773c2ece1844ee8d1103e2f6c602203b6b046da4243c77adef80ada9201b27bbfdf7f9d5428f40434b060432afd62005",
+    "0x47 0x304402207409b5b320296e5e2136a7b281a7f803028ca4ca44e2b83eebd46932677725de02202d4eea1c8d3c98e6f42614f54764e6e5e6542e213eb4d079737e9a8b6e9812ec05",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
     "STRICTENC",
     "P2PK NOT with invalid sig and undefined hashtype"
 ],
 [
-    "0x01 0x01 0x47 0x304402200e48ba1cf4d7182db94ffb57bd72ea31b5545dc0d1c512e665779b4fb2badc52022054b8388dfc074c708a75b62359b7be46402751ee40c0a111aef38a837b6ed09801 0x47 0x304402201c9820f59c49107bb30e6175cfc9ec95f897b03beb628b4bc854d2b80392aa0602200235d986ae418bcd111b8814f4c26a0ab5f475fb542a44884fc14912a97a252301 0x47 0x304402204cd7894c6f10a871f5b0c1f9c13228f8cdd4050248f0d0f498ee86be69ee3080022051bd2932c7d585eb600c7194235c74da820935f0d67972fd9545673aa1fd023301",
+    "1 0x47 0x3044022051254b9fb476a52d85530792b578f86fea70ec1ffb4393e661bcccb23d8d63d3022076505f94a403c86097841944e044c70c2045ce90e36de51f7e9d3828db98a07501 0x47 0x304402206d32e6d6b131ef2fe77b6a9b90b120d74e3e238e79dcffb10523a6ec94f93d65022067ae8772632ddf4c389258c6b70ed0ff94f20ee8f60207aa192a52a2469cddd901 0x47 0x304402200955d031fff71d8653221e85e36c3c85533d2312fc3045314b19650b7ae2f81002202a6bb8505e36201909d0921f01abff390ae6b7ff97bbf959f98aedeb0a56730901",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "NULLDUMMY",
     "3-of-3 with nonzero dummy"
 ],
 [
-    "0x01 0x01 0x47 0x304402201847fc3b8f7597768e7f543c58da1fca6e8e35eb28979431e6b637572ce6eaa4022048dd58608e040841d0bf52a70cfb70e1a9c8d2826fad068f4e9d2bf5c87766a501 0x47 0x30440220711311a72516affed73363763983d05c3d6a06a2eadf5d76b90b4354162ba94302204841a69e5955a7dc8e4ab3105fd0c86040c1dac6016297a51ddbf5079c28756801 0x47 0x30440220267e331a378191e7282fd10d61c97bf74bc97c233c5833d677936424ac08dee502201eee83d88b91988e1c4d9b979df2404aa190e0987a8ca09c4e5cd61da1d48ecc01",
+    "1 0x47 0x304402201bb2edab700a5d020236df174fefed78087697143731f659bea59642c759c16d022061f42cdbae5bcd3e8790f20bf76687443436e94a634321c16a72aa54cbc7c2ea01 0x47 0x304402204bb4a64f2a6e5c7fb2f07fef85ee56fde5e6da234c6a984262307a20e99842d702206f8303aaba5e625d223897e2ffd3f88ef1bcffef55f38dc3768e5f2e94c923f901 0x47 0x3044022040c2809b71fffb155ec8b82fe7a27f666bd97f941207be4e14ade85a1249dd4d02204d56c85ec525dd18e29a0533d5ddf61b6b1bb32980c2f63edf951aebf7a27bfe01",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
     "NULLDUMMY",
     "3-of-3 NOT with invalid sig with nonzero dummy"
 ],
 [
-    "0 0x47 0x3044022035341cc377b19138f944f90c45772cb06338c6d56a4c0c31a65bf1a8a105fadc022046dd232850b6bacb25879c9da82a7a628982aa19d055f1753468f68047662e0301 DUP",
+    "0 0x47 0x304402206cb053202e1501e6faa24e6e309bf46a2f9255aa9484ff4a26efb7434f78a58a0220132b10419c3b99601f154bf86cf12259aacd8c6f363a73dacb1d0b941680bb4c01 DUP",
     "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "SIGPUSHONLY",
     "2-of-2 with two identical keys and sigs pushed using OP_DUP"
 ],
 [
-    "0x47 0x304402204d8b99eea2f53382fd67e0dbc8ed0596bd614aa0dad6bc6843c7860c79b901c3022062f022a71993013e3d9b22302a8e4b40109d7bb057aeb250b9aab2197b3e96b801 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
+    "0x47 0x304402203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022054e1c258c2981cdfba5df1f46661fb6541c44f77ca0092f3600331abfffb125101 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
     "",
     "P2SH(P2PK) with non-push scriptSig but no SIGPUSHONLY"
 ],
 [
-    "0x47 0x30440220078c887c33abc67fbbd827ceb3f661c1c459e78218161b652f23e3ca76cfabbd022047df245eacb8a88d8c5ca7b5228e3b4d070c102d2f542433362d3f443cd24eda01 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
+    "0x47 0x304402203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022054e1c258c2981cdfba5df1f46661fb6541c44f77ca0092f3600331abfffb125101 0x23 0x2103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640ac",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
     "SIGPUSHONLY",
     "P2SH(P2PK) with non-push scriptSig"
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index ada45a64ed1c..633bfd063d35 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -666,97 +666,97 @@ nSequences are max.
 
 
 [
-    "0x47 0x3044022007415aa37ce7eaa6146001ac8bdefca0ddcba0e37c5dc08c4ac99392124ebac802207d382307fd53f65778b07b9c63b6e196edeadf0be719130c5db21ff1e700d67501",
+    "0x47 0x3044022053205076a7bb13d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
     "",
     "P2PK"
 ],
 [
-    "0x47 0x3044022069d40999786aeb2fd874f9eb2636461a062dc963471627ed8390a3a5f9556f640220350132a52415ce622f2aadd07f791c591500917ec1f8c5edbc5381ef7942534d01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
+    "0x47 0x304402206e05a6fe23c59196ffe176c9ddc31e73a9885638f9d1328d47c0c703863b8876022076feb53811aa5b04e0e79f938eb19906cc5e67548bc555a8e8b8b0fc603d840c01 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
     "DUP HASH160 0x14 0x1018853670f9f3b0582c5b9ee8ce93764ac32b93 EQUALVERIFY CHECKSIG",
     "",
     "P2PKH"
 ],
 [
-    "0x47 0x30440220519f2a6632ffa134c7811ea2819e9dcc951f0c7baf461f2dffdd09133f3b080a02203ec6bab5eb6619ed7f41b8701d7c6d70cfc83bb26c5c97f54b2ca6e304fc2bb581",
+    "0x47 0x304402204710a85181663b32d25c70ec2bbd14adff5ddfff6cb50d09e155ef5f541fc86c0220056b0cc949be9386ecc5f6c2ac0493269031dbb185781db90171b54ac127790281",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
     "",
     "P2PK anyonecanpay"
 ],
 [
-    "0x47 0x30440220279dad2170ffb5639f0a1ea71fc462ee37d75d420d86f84c978bac523c09b7f20220683b2789f5c5528a9e0a0d78f6e40db3f616cf1adb5a5fdef117d5974795cfe201 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
+    "0x47 0x304402202166fcd5e607de452d3c6f15e059505cf21654346592f9650ba906b9e8be88fa022005d976d28eb8de477102feba28807b3ad361e7fa24796d259c9d61452f7c318c01 0x23 0x210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac",
     "HASH160 0x14 0x23b0ad3477f2178bc0b3eed26e4e6316f4e83aa1 EQUAL",
     "P2SH",
     "P2SH(P2PK)"
 ],
 [
-    "0x47 0x3044022066acbfb5ac96b7cbf3f05a2aaf358c32438c45d1d7359dee9fc1ee636940735f02205606a03fd8cbf6a6fcbcba60c8abb1e385c0b5753cb57a97538159106fd3684e01 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
+    "0x47 0x3044022064cc90ca89ad721384b231653b945579359a24b928ef8539b331172628c9cc6102203e238869ab5dac3fc293db53c12e7dd3079e86cfde9024b689efc7227e4d671001 0x19 0x76a9147cf9c846cd4882efec4bf07e44ebdad495c94f4b88ac",
     "HASH160 0x14 0x2df519943d5acc0ef5222091f9dfe3543f489a82 EQUAL",
     "",
     "P2SH(P2PKH), bad sig but no VERIFY_P2SH"
 ],
 [
-    "0 0x47 0x3044022004e791dd30a64c70e55e84e150c002af9feb3ce0ab1f20e86c53d1209003927502205a60453987fcd72aebaaacebc8ce4b15449cdd79e54cc82cefb83e69dbcfeabf01 0x47 0x304402201d021808ce93dd8574cc4f99ae4f11b44305528b0aecbd9f156f08315173643802200944a0ea5c884bd86180aef76d8b1e444860776b251e47d2d6c651a1c6f9930801 0x47 0x30440220446336d7b7de05ebb5683b82b05248ec7d78e88ae8d6125985f5776c887a4cf90220674ab2b2c2f954ba1cf35457d273c90d0c0c1c224d0ae128628740e81129486801",
+    "0 0x47 0x3044022051254b9fb476a52d85530792b578f86fea70ec1ffb4393e661bcccb23d8d63d3022076505f94a403c86097841944e044c70c2045ce90e36de51f7e9d3828db98a07501 0x47 0x304402206d32e6d6b131ef2fe77b6a9b90b120d74e3e238e79dcffb10523a6ec94f93d65022067ae8772632ddf4c389258c6b70ed0ff94f20ee8f60207aa192a52a2469cddd901 0x47 0x304402200955d031fff71d8653221e85e36c3c85533d2312fc3045314b19650b7ae2f81002202a6bb8505e36201909d0921f01abff390ae6b7ff97bbf959f98aedeb0a56730901",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "",
     "3-of-3"
 ],
 [
-    "0 0x47 0x30440220288b06d057cf0eac434ed0c3be9257cc0ca144dd99c11cc8f1a49467a37d8e8002203c496c72253c528e6bc81c42e683aba974d46041a96ef7b00915c863eb2a702901 0x47 0x304402207ffb4da33f40cac839a43000a187bd76a1ee5bf95e46dc1534b38bb7bd0321db022038c078f29d1831f8eb68ffdc2634c654fb01c3467b6457b98ad220653bb2478501 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
+    "0 0x47 0x304402205b7d2c2f177ae76cfbbf14d589c113b0b35db753d305d5562dd0b61cbf366cfb02202e56f93c4f08a27f986cd424ffc48a462c3202c4902104d4d0ff98ed28f4bf8001 0x47 0x304402204511cf05e85c2be07c6c176c5338a08ed3cb34212667f39613340881169986c002207cc48b27aa3691a20706a5773ec9923cadd20fedffd00c24457d85f83f0b51fe01 0x4c69 0x52210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f8179821038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f515082103363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff464053ae",
     "HASH160 0x14 0xc9e4a896d149702d0d1695434feddd52e24ad78d EQUAL",
     "P2SH",
     "P2SH(2-of-3)"
 ],
 [
-    "0x47 0x30440220001fff8863c84c0efc8eea5bffb7f388313f966f23a00ad3c0acc30ff5339684022016e6d78f51a3a1c362745931ca40b24f71cba2903dbfe5a6d392a9189127d83701",
+    "0x47 0x30440220001d6702bfa4f49c3a2542af9b1c2844a2eaac55f86f310f42d26a5dd17d6a8002202cdadbe608c00b50dd951c6ba0877d5b07a970f3e265c18697bc413a0a86f69901",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
     "P2PK with too much R padding but no DERSIG"
 ],
 [
-    "0x48 0x304502202323d56f293842b544cacedd06baafb999196dfa1c2975314848c158ac606655022100514bd98186b8a3a1cc87f4aff76aed797781389f13f50d87bf95b2df6e488fcc01",
+    "0x48 0x304502207d2b258e959605e2ea50b46fea1325b7391ffb0c14a5b58ef8ad3851da3644380221007e75136df5f2e38216c4338b31c97e8307102edb97d611e06914e1f8fba68ead01",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
     "P2PK with too much S padding but no DERSIG"
 ],
 [
-    "0x47 0x30440220d31c24bb6c08a496e7698a08fd41975115d7b55bfaa31cb2d573e09481e59a6702206a691239996434076b78a4e1cf46fc8e993b468a9c77fb1832186aa8040a61a201",
+    "0x47 0x30440220d7a0417c3f6d1a15094d1cf2a3378ca0503eb8a57630953a9e2987e21ddd0a6502207a6266d686c99090920249991d3d42065b6d43eb70187b219c0db82e4f94d1a201",
     "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
     "",
     "P2PK with too little R padding but no DERSIG"
 ],
 [
-    "0x47 0x30440220007c2cc7aef1801c2937447703c87ef2a3744209ad98da2abadd4ba8bb2e3ea00220503a275582c9f9e9ff30260c81b7f64b8b696f22105605cc8241fb76a797316201",
+    "0x47 0x30440220003040725f724b0e2142fc44ac71f6e13161f6410aeb6dee477952ede3b6a6ca022041ff4940ee3d88116ad281d7cc556e1f2c9427d82290bd7974a25addbcd5bede01",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG NOT",
     "",
     "P2PK NOT with bad sig with too much R padding but no DERSIG"
 ],
 [
-    "0x48 0x3045022021bf9184d94f208ac9f4757ebca9b1cbebf008cfc244fe5be1360b1b9aba0e92022100e55074f72f3a1bfddf2ea4ea7ba984f78822e136fe04c8f9c1363238e0233bd801",
+    "0x49 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef05101",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
-    "STRICTENC",
+    "",
     "P2PK with high S but no LOW_S"
 ],
 [
-    "0x47 0x304402202163bc732c21b7de0251297d3c6c2ece182782e85fc5e19d6036f1130a79051e022033827811634924ebba68767537d78dd7bd9109ae2a89a60587927abdc25eb06401",
+    "0x47 0x30440220745d63eb70d45652128b450aa5ca7d9b513439963f261cb1c40a60f0785e7ee402204877785b38945ca9dbec78e1c1d4dd12148cc25c868bd27480023b49ae0f310501",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
     "",
     "P2PK with hybrid pubkey but no STRICTENC"
 ],
 [
-    "0x47 0x3044022078d6c447887e88dcbe1bc5b613645280df6f4e5935648bc226e9d91da71b3216022047d6b7ef0949b228fc1b359afb8d50500268711354298217b983c26970790c7601",
+    "0x47 0x30440220606f6f9f6cebc84ebfb6a4bff0b682bd99f05511295545ce9b275e98be3c946102206871d6a76f4e1b43d9763cfc5647844e4811682b1cab0325f060f44ddf44002201",
     "0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG NOT",
     "",
     "P2PK NOT with invalid hybrid pubkey but no STRICTENC"
 ],
 [
-    "0 0x47 0x304402203b269b9fbc0936877bf855b5fb41757218d9548b246370d991442a5f5bd1c3440220235268a4eaa8c67e543c6e37da81dd36d3b1be2de6b4fef04113389ca6ddc04501",
+    "0 0x47 0x304402203a5ee39032637c431af0a3ac42e32e0627390bd44f6f98c9c04e6d714635ad0202207b42fcd889c3ae8a1b515608f38535f1f9be815176ee8d1b65a27c767cf37aed01",
     "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "",
     "1-of-2 with the second 1 hybrid pubkey and no STRICTENC"
 ],
 [
-    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "0 0x47 0x304402203a5ee39032637c431af0a3ac42e32e0627390bd44f6f98c9c04e6d714635ad0202207b42fcd889c3ae8a1b515608f38535f1f9be815176ee8d1b65a27c767cf37aed01",
     "1 0x41 0x0679be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "STRICTENC",
     "1-of-2 with the second 1 hybrid pubkey"
@@ -770,7 +770,6 @@ script when it reaches an invalidly encoded signature or pubkey, we can use it
 to test the exact order in which signatures and pubkeys are evaluated by
 distinguishing CHECKMULTISIG returning false on the stack and the script as a
 whole failing.
-
 See also the corresponding inverted versions of these tests in script_invalid.json
 "],
 [
@@ -787,37 +786,37 @@ See also the corresponding inverted versions of these tests in script_invalid.js
 ],
 
 [
-    "0x47 0x304402204649e9517ef0377a8f8270bd423053fd98ddff62d74ea553e9579558abbb75e4022044a2b2344469c12e35ed898987711272b634733dd0f5e051288eceb04bd4669e05",
+    "0x47 0x304402201c215cb13e4954e60ce4f6de74941904c771f998de7b1d9627e82a1949fde517022031c2197455f3dbecbb78321201308d7b039424e38d480772d7cd4eb465a083f405",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",
     "",
     "P2PK with undefined hashtype but no STRICTENC"
 ],
 [
-    "0x47 0x304402207f1cf1866a2df0bb4b8d84d0ade72aa3abb6aaab0639d608b23d9e10ead0c48202203caa97f22c3439443eea4b89f7f6729854df0f567a8184d6ecc6e8b6c68c3e9d05",
+    "0x47 0x304402207409b5b320296e5e2136a7b281a7f803028ca4ca44e2b83eebd46932677725de02202d4eea1c8d3c98e6f42614f54764e6e5e6542e213eb4d079737e9a8b6e9812ec05",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
     "",
     "P2PK NOT with invalid sig and undefined hashtype but no STRICTENC"
 ],
 [
-    "1 0x47 0x3044022046ce33d1771b0127dd4c4cef8fdc3218ebdfa60e3793ed700292d8ebd93fb1f402201029d47a414db83e96e31443c2d8b552f971469c4800f5eff7df2f0648521aed01 0x47 0x304402205c53911ad55b054920043962bbda98cf6e57e2db1cd5611138251490baabaa8702201dc80dfceae6007e7772dc13ff6e7ca66a983cb017fe5d46d30118462d83bcf801 0x47 0x304402201937e44a4ec12364f9d32f9d25e7ecbc68aee9ef90069af80efef4c05f6ace9602206c515101c00c75710b32ff7ff8dbaf7c9a0be6e86ed14a0755b47626604f31fd01",
+    "1 0x47 0x3044022051254b9fb476a52d85530792b578f86fea70ec1ffb4393e661bcccb23d8d63d3022076505f94a403c86097841944e044c70c2045ce90e36de51f7e9d3828db98a07501 0x47 0x304402206d32e6d6b131ef2fe77b6a9b90b120d74e3e238e79dcffb10523a6ec94f93d65022067ae8772632ddf4c389258c6b70ed0ff94f20ee8f60207aa192a52a2469cddd901 0x47 0x304402200955d031fff71d8653221e85e36c3c85533d2312fc3045314b19650b7ae2f81002202a6bb8505e36201909d0921f01abff390ae6b7ff97bbf959f98aedeb0a56730901",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG",
     "",
     "3-of-3 with nonzero dummy but no NULLDUMMY"
 ],
 [
-    "1 0x47 0x30440220195038dbc6b2ae1199f86a6777824f7c5149789d85f655a3534a4422b8fba38c02204df9db87d2eb9fe06edc66870d9ac4c9ce673459f9d43cee0347ce4ffb02ee5a01 0x47 0x3044022010a45f30c6fa97a186eba9e6b595ab87d3dfcbf05dcaf1f1b8e3e7bf39515bb802203474e78d3d372e5f5c0f8c257ce8300c4bb8f37c51d4a894e11a91b5817da6ed01 0x47 0x30440220039cffd8e39850f95112662b1220b14b3c0d3d8a2772e13c947bfbf96345a64e02204154bfa77e2c0134d5434353bed82141e5da1cc479954aa288d5f0671480a04b01",
+    "1 0x47 0x304402201bb2edab700a5d020236df174fefed78087697143731f659bea59642c759c16d022061f42cdbae5bcd3e8790f20bf76687443436e94a634321c16a72aa54cbc7c2ea01 0x47 0x304402204bb4a64f2a6e5c7fb2f07fef85ee56fde5e6da234c6a984262307a20e99842d702206f8303aaba5e625d223897e2ffd3f88ef1bcffef55f38dc3768e5f2e94c923f901 0x47 0x3044022040c2809b71fffb155ec8b82fe7a27f666bd97f941207be4e14ade85a1249dd4d02204d56c85ec525dd18e29a0533d5ddf61b6b1bb32980c2f63edf951aebf7a27bfe01",
     "3 0x21 0x0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 3 CHECKMULTISIG NOT",
     "",
     "3-of-3 NOT with invalid sig and nonzero dummy but no NULLDUMMY"
 ],
 [
-    "0 0x47 0x3044022002a27769ee33db258bdf7a3792e7da4143ec4001b551f73e6a190b8d1bde449d02206742c56ccd94a7a2e16ca52fc1ae4a0aa122b0014a867a80de104f9cb18e472c01 DUP",
+    "0 0x47 0x304402206cb053202e1501e6faa24e6e309bf46a2f9255aa9484ff4a26efb7434f78a58a0220132b10419c3b99601f154bf86cf12259aacd8c6f363a73dacb1d0b941680bb4c01 DUP",
     "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "",
     "2-of-2 with two identical keys and sigs pushed using OP_DUP but no SIGPUSHONLY"
 ],
 [
-    "0 0x47 0x304402203acf75dd59bbef171aeeedae4f1020b824195820db82575c2b323b8899f95de9022067df297d3a5fad049ba0bb81255d0e495643cbcf9abae9e396988618bc0c6dfe01 0x47 0x304402205f8b859230c1cab7d4e8de38ff244d2ebe046b64e8d3f4219b01e483c203490a022071bdc488e31b557f7d9e5c8a8bec90dc92289ca70fa317685f4f140e38b30c4601",
+    "0 0x47 0x304402206cb053202e1501e6faa24e6e309bf46a2f9255aa9484ff4a26efb7434f78a58a0220132b10419c3b99601f154bf86cf12259aacd8c6f363a73dacb1d0b941680bb4c01 0x47 0x304402206cb053202e1501e6faa24e6e309bf46a2f9255aa9484ff4a26efb7434f78a58a0220132b10419c3b99601f154bf86cf12259aacd8c6f363a73dacb1d0b941680bb4c01",
     "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 2 CHECKMULTISIG",
     "SIGPUSHONLY",
     "2-of-2 with two identical keys and sigs pushed"
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 53411190eba7..4d2a9aff45c0 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -491,24 +491,18 @@ BOOST_AUTO_TEST_CASE(script_build)
                               ).Num(0).PushSig(keys.key1).PushSig(keys.key1));
 
 
-    std::map<std::string, Array> tests_good;
-    std::map<std::string, Array> tests_bad;
+    std::set<std::string> tests_good;
+    std::set<std::string> tests_bad;
 
     {
         Array json_good = read_json(std::string(json_tests::script_valid, json_tests::script_valid + sizeof(json_tests::script_valid)));
         Array json_bad = read_json(std::string(json_tests::script_invalid, json_tests::script_invalid + sizeof(json_tests::script_invalid)));
 
         BOOST_FOREACH(Value& tv, json_good) {
-            Array test = tv.get_array();
-            if (test.size() >= 4) {
-                tests_good[test[3].get_str()] = test;
-            }
+            tests_good.insert(write_string(Value(tv.get_array()), true));
         }
         BOOST_FOREACH(Value& tv, json_bad) {
-            Array test = tv.get_array();
-            if (test.size() >= 4) {
-                tests_bad[test[3].get_str()] = test;
-            }
+            tests_bad.insert(write_string(Value(tv.get_array()), true));
         }
     }
 
@@ -517,27 +511,23 @@ BOOST_AUTO_TEST_CASE(script_build)
 
     BOOST_FOREACH(TestBuilder& test, good) {
         test.Test(true);
-        if (tests_good.count(test.GetComment()) == 0) {
+        std::string str = write_string(Value(test.GetJSON()), true);
 #ifndef UPDATE_JSON_TESTS
+        if (tests_good.count(str) == 0) {
             BOOST_CHECK_MESSAGE(false, "Missing auto script_valid test: " + test.GetComment());
-#endif
-            strGood += write_string(Value(test.GetJSON()), true) + ",\n";
-        } else {
-            BOOST_CHECK_MESSAGE(ParseScript(tests_good[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_valid test: " + test.GetComment());
-            strGood += write_string(Value(tests_good[test.GetComment()]), true) + ",\n";
         }
+#endif
+        strGood += str + ",\n";
     }
     BOOST_FOREACH(TestBuilder& test, bad) {
         test.Test(false);
-        if (tests_bad.count(test.GetComment()) == 0) {
+        std::string str = write_string(Value(test.GetJSON()), true);
 #ifndef UPDATE_JSON_TESTS
+        if (tests_bad.count(str) == 0) {
             BOOST_CHECK_MESSAGE(false, "Missing auto script_invalid test: " + test.GetComment());
-#endif
-            strBad += write_string(Value(test.GetJSON()), true) + ",\n";
-        } else {
-            BOOST_CHECK_MESSAGE(ParseScript(tests_bad[test.GetComment()][1].get_str()) == test.GetScriptPubKey(), "ScriptPubKey mismatch in auto script_invalid test: " + test.GetComment());
-            strBad += write_string(Value(tests_bad[test.GetComment()]), true) + ",\n";
         }
+#endif
+        strBad += str + ",\n";
     }
 
 #ifdef UPDATE_JSON_TESTS

From 362001c19ff4a6155cde647c471d0fc1e006c15d Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 1 Dec 2014 21:28:36 +0100
Subject: [PATCH 1146/1819] Move CHECKMULTISIG order tests out of automatically
 generated block

---
 src/test/data/script_invalid.json | 38 ++++++++++++-------------
 src/test/data/script_valid.json   | 47 +++++++++++++++----------------
 2 files changed, 42 insertions(+), 43 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 035d36b96521..c454b5297698 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -496,6 +496,25 @@ nSequences are max.
 ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "MINIMALDATA"],
 
 
+["
+Order of CHECKMULTISIG evaluation tests, inverted by swapping the order of
+pubkeys/signatures so they fail due to the STRICTENC rules on validly encoded
+signatures and pubkeys.
+"],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with the first pubkey invalid, and both signatures validly encoded."
+],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
+],
+
+["Automatically generated test cases"],
 [
     "0x47 0x3044022053205076a7bb12d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
@@ -616,25 +635,6 @@ nSequences are max.
     "STRICTENC",
     "P2PK with undefined hashtype"
 ],
-
-["
-Order of CHECKMULTISIG evaluation tests, inverted by swapping the order of
-pubkeys/signatures so they fail due to the STRICTENC rules on validly encoded
-signatures and pubkeys.
-"],
-[
-    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
-    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0 2 CHECKMULTISIG NOT",
-    "STRICTENC",
-    "2-of-2 CHECKMULTISIG NOT with the first pubkey invalid, and both signatures validly encoded."
-],
-[
-    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0",
-    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
-    "STRICTENC",
-    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
-],
-
 [
     "0x47 0x304402207409b5b320296e5e2136a7b281a7f803028ca4ca44e2b83eebd46932677725de02202d4eea1c8d3c98e6f42614f54764e6e5e6542e213eb4d079737e9a8b6e9812ec05",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG NOT",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 633bfd063d35..af0f6939c651 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -664,7 +664,30 @@ nSequences are max.
 ["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
 ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
 
+["
+CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and
+pubkeys in a specific order, and will exit early if the number of signatures
+left to check is greater than the number of keys left. As STRICTENC fails the
+script when it reaches an invalidly encoded signature or pubkey, we can use it
+to test the exact order in which signatures and pubkeys are evaluated by
+distinguishing CHECKMULTISIG returning false on the stack and the script as a
+whole failing.
+See also the corresponding inverted versions of these tests in script_invalid.json
+"],
+[
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with the second pubkey invalid, and both signatures validly encoded. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid pubkey."
+],
+[
+    "0 0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
+    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
+    "STRICTENC",
+    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but second signature invalid. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid signature."
+],
 
+["Automatically generated test cases"],
 [
     "0x47 0x3044022053205076a7bb13d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",
     "0x41 0x0479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8 CHECKSIG",
@@ -761,30 +784,6 @@ nSequences are max.
     "STRICTENC",
     "1-of-2 with the second 1 hybrid pubkey"
 ],
-
-["
-CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and
-pubkeys in a specific order, and will exit early if the number of signatures
-left to check is greater than the number of keys left. As STRICTENC fails the
-script when it reaches an invalidly encoded signature or pubkey, we can use it
-to test the exact order in which signatures and pubkeys are evaluated by
-distinguishing CHECKMULTISIG returning false on the stack and the script as a
-whole failing.
-See also the corresponding inverted versions of these tests in script_invalid.json
-"],
-[
-    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
-    "2 0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
-    "STRICTENC",
-    "2-of-2 CHECKMULTISIG NOT with the second pubkey invalid, and both signatures validly encoded. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid pubkey."
-],
-[
-    "0 0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
-    "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
-    "STRICTENC",
-    "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but second signature invalid. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid signature."
-],
-
 [
     "0x47 0x304402201c215cb13e4954e60ce4f6de74941904c771f998de7b1d9627e82a1949fde517022031c2197455f3dbecbb78321201308d7b039424e38d480772d7cd4eb465a083f405",
     "0x41 0x048282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f5150811f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf CHECKSIG",

From b93173dee9b233409daca201dd7ed0c19576e895 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Mon, 1 Dec 2014 20:06:45 +0100
Subject: [PATCH 1147/1819] Move SendMoney() to rpcwallet.cpp.

---
 src/rpcwallet.cpp | 46 +++++++++++++++++++++++++++++++++++++++-------
 src/wallet.cpp    | 40 ----------------------------------------
 src/wallet.h      |  1 -
 3 files changed, 39 insertions(+), 48 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index d2d14ad9f402..a03ec7cee145 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -12,6 +12,7 @@
 #include "netbase.h"
 #include "timedata.h"
 #include "util.h"
+#include "utilmoneystr.h"
 #include "wallet.h"
 #include "walletdb.h"
 
@@ -309,6 +310,42 @@ Value getaddressesbyaccount(const Array& params, bool fHelp)
     return ret;
 }
 
+void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
+{
+    // Check amount
+    if (nValue <= 0)
+        throw JSONRPCError(RPC_WALLET_ERROR, "Invalid amount");
+
+    if (nValue > pwalletMain->GetBalance())
+        throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
+
+    string strError;
+    if (pwalletMain->IsLocked())
+    {
+        strError = "Error: Wallet locked, unable to create transaction!";
+        LogPrintf("SendMoney() : %s", strError);
+        throw JSONRPCError(RPC_WALLET_ERROR, strError);
+    }
+
+    // Parse Bitcoin address
+    CScript scriptPubKey = GetScriptForDestination(address);
+
+    // Create and send the transaction
+    CReserveKey reservekey(pwalletMain);
+    CAmount nFeeRequired;
+    if (!pwalletMain->CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
+    {
+        if (nValue + nFeeRequired > pwalletMain->GetBalance())
+            strError = strprintf("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!", FormatMoney(nFeeRequired));
+        LogPrintf("SendMoney() : %s\n", strError);
+        throw JSONRPCError(RPC_WALLET_ERROR, strError);
+    }
+    if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
+        throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
+
+    return;
+}
+
 Value sendtoaddress(const Array& params, bool fHelp)
 {
     if (fHelp || params.size() < 2 || params.size() > 4)
@@ -348,9 +385,7 @@ Value sendtoaddress(const Array& params, bool fHelp)
 
     EnsureWalletIsUnlocked();
 
-    string strError = pwalletMain->SendMoney(address.Get(), nAmount, wtx);
-    if (strError != "")
-        throw JSONRPCError(RPC_WALLET_ERROR, strError);
+    SendMoney(address.Get(), nAmount, wtx);
 
     return wtx.GetHash().GetHex();
 }
@@ -791,10 +826,7 @@ Value sendfrom(const Array& params, bool fHelp)
     if (nAmount > nBalance)
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
 
-    // Send
-    string strError = pwalletMain->SendMoney(address.Get(), nAmount, wtx);
-    if (strError != "")
-        throw JSONRPCError(RPC_WALLET_ERROR, strError);
+    SendMoney(address.Get(), nAmount, wtx);
 
     return wtx.GetHash().GetHex();
 }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 27dbf61c2ba5..32a64daac0c9 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1587,46 +1587,6 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
     return true;
 }
 
-
-
-
-string CWallet::SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
-{
-    // Check amount
-    if (nValue <= 0)
-        return _("Invalid amount");
-    if (nValue > GetBalance())
-        return _("Insufficient funds");
-
-    string strError;
-    if (IsLocked())
-    {
-        strError = _("Error: Wallet locked, unable to create transaction!");
-        LogPrintf("SendMoney() : %s", strError);
-        return strError;
-    }
-
-    // Parse Bitcoin address
-    CScript scriptPubKey = GetScriptForDestination(address);
-
-    // Create and send the transaction
-    CReserveKey reservekey(this);
-    CAmount nFeeRequired;
-    if (!CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
-    {
-        if (nValue + nFeeRequired > GetBalance())
-            strError = strprintf(_("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!"), FormatMoney(nFeeRequired));
-        LogPrintf("SendMoney() : %s\n", strError);
-        return strError;
-    }
-    if (!CommitTransaction(wtxNew, reservekey))
-        return _("Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
-
-    return "";
-}
-
-
-
 CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool)
 {
     // payTxFee is user-set "I want to pay this much"
diff --git a/src/wallet.h b/src/wallet.h
index 0244ce236802..7bbb6419c8e2 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -288,7 +288,6 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
                            CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
-    std::string SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew);
 
     static CFeeRate minTxFee;
     static CAmount GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarget, const CTxMemPool& pool);

From c5b390b6b91aacd7ea862df11d1b69e542dc9de0 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Mon, 1 Dec 2014 09:39:44 +0800
Subject: [PATCH 1148/1819] Make comments in main an init doxygen compatible

Fix typos where appropriate
Update license/copyright
---
 src/init.cpp |  10 +--
 src/init.h   |   6 +-
 src/main.cpp | 149 ++++++++++++++++++++++-------------------
 src/main.h   | 184 +++++++++++++++++++++++++++------------------------
 4 files changed, 189 insertions(+), 160 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 7b6ebb1b309b..11329c16aa41 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #if defined(HAVE_CONFIG_H)
@@ -60,7 +60,7 @@ bool fFeeEstimatesInitialized = false;
 #define MIN_CORE_FILEDESCRIPTORS 150
 #endif
 
-// Used to pass flags to the Bind() function
+/** Used to pass flags to the Bind() function */
 enum BindFlags {
     BF_NONE         = 0,
     BF_EXPLICIT     = (1U << 0),
@@ -175,9 +175,9 @@ void Shutdown()
     LogPrintf("%s: done\n", __func__);
 }
 
-//
-// Signal handlers are very limited in what they are allowed to do, so:
-//
+/**
+ * Signal handlers are very limited in what they are allowed to do, so:
+ */
 void HandleSIGTERM(int)
 {
     fRequestShutdown = true;
diff --git a/src/init.h b/src/init.h
index aaf8c07e6e86..f2f7ac6747ab 100644
--- a/src/init.h
+++ b/src/init.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_INIT_H
@@ -22,7 +22,7 @@ bool ShutdownRequested();
 void Shutdown();
 bool AppInit2(boost::thread_group& threadGroup);
 
-/* The help message mode determines what help message to show */
+/** The help message mode determines what help message to show */
 enum HelpMessageMode {
     HMM_BITCOIND,
     HMM_BITCOIN_QT
diff --git a/src/main.cpp b/src/main.cpp
index 0515eeb1563b..451d6c8cd963 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "main.h"
@@ -33,9 +33,9 @@ using namespace std;
 # error "Bitcoin cannot be compiled without assertions."
 #endif
 
-//
-// Global state
-//
+/**
+ * Global state
+ */
 
 CCriticalSection cs_main;
 
@@ -66,7 +66,7 @@ map<uint256, COrphanTx> mapOrphanTransactions;
 map<uint256, set<uint256> > mapOrphanTransactionsByPrev;
 void EraseOrphansFor(NodeId peer);
 
-// Constant stuff for coinbase transactions we create:
+/** Constant stuff for coinbase transactions we create: */
 CScript COINBASE_FLAGS;
 
 const string strMessageMagic = "Bitcoin Signed Message:\n";
@@ -97,44 +97,49 @@ namespace {
 
     CBlockIndex *pindexBestInvalid;
 
-    // The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
-    // as good as our current tip. Entries may be failed, though.
+    /**
+     * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
+     * as good as our current tip. Entries may be failed, though.
+     */
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexCandidates;
-    // Number of nodes with fSyncStarted.
+    /** Number of nodes with fSyncStarted. */
     int nSyncStarted = 0;
-    // All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions.
+    /** All pairs A->B, where A (or one if its ancestors) misses transactions, but B has transactions. */
     multimap<CBlockIndex*, CBlockIndex*> mapBlocksUnlinked;
 
     CCriticalSection cs_LastBlockFile;
     std::vector<CBlockFileInfo> vinfoBlockFile;
     int nLastBlockFile = 0;
 
-    // Every received block is assigned a unique and increasing identifier, so we
-    // know which one to give priority in case of a fork.
+    /**
+     * Every received block is assigned a unique and increasing identifier, so we
+     * know which one to give priority in case of a fork.
+     */
     CCriticalSection cs_nBlockSequenceId;
-    // Blocks loaded from disk are assigned id 0, so start the counter at 1.
+    /** Blocks loaded from disk are assigned id 0, so start the counter at 1. */
     uint32_t nBlockSequenceId = 1;
 
-    // Sources of received blocks, to be able to send them reject messages or ban
-    // them, if processing happens afterwards. Protected by cs_main.
+    /**
+     * Sources of received blocks, to be able to send them reject messages or ban
+     * them, if processing happens afterwards. Protected by cs_main.
+     */
     map<uint256, NodeId> mapBlockSource;
 
-    // Blocks that are in flight, and that are in the queue to be downloaded.
-    // Protected by cs_main.
+    /** Blocks that are in flight, and that are in the queue to be downloaded. Protected by cs_main. */
     struct QueuedBlock {
         uint256 hash;
-        CBlockIndex *pindex;  // Optional.
-        int64_t nTime;  // Time of "getdata" request in microseconds.
+        CBlockIndex *pindex;  //! Optional.
+        int64_t nTime;  //! Time of "getdata" request in microseconds.
     };
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
 
-    // Number of preferrable block download peers.
+    /** Number of preferable block download peers. */
     int nPreferredDownload = 0;
 
-    // Dirty block index entries.
+    /** Dirty block index entries. */
     set<CBlockIndex*> setDirtyBlockIndex;
 
-    // Dirty block file entries.
+    /** Dirty block file entries. */
     set<int> setDirtyFileInfo;
 } // anon namespace
 
@@ -148,19 +153,19 @@ namespace {
 namespace {
 
 struct CMainSignals {
-    // Notifies listeners of updated transaction data (transaction, and optionally the block it is found in.
+    /** Notifies listeners of updated transaction data (transaction, and optionally the block it is found in. */
     boost::signals2::signal<void (const CTransaction &, const CBlock *)> SyncTransaction;
-    // Notifies listeners of an erased transaction (currently disabled, requires transaction replacement).
+    /** Notifies listeners of an erased transaction (currently disabled, requires transaction replacement). */
     boost::signals2::signal<void (const uint256 &)> EraseTransaction;
-    // Notifies listeners of an updated transaction without new data (for now: a coinbase potentially becoming visible).
+    /** Notifies listeners of an updated transaction without new data (for now: a coinbase potentially becoming visible). */
     boost::signals2::signal<void (const uint256 &)> UpdatedTransaction;
-    // Notifies listeners of a new active block chain.
+    /** Notifies listeners of a new active block chain. */
     boost::signals2::signal<void (const CBlockLocator &)> SetBestChain;
-    // Notifies listeners about an inventory item being seen on the network.
+    /** Notifies listeners about an inventory item being seen on the network. */
     boost::signals2::signal<void (const uint256 &)> Inventory;
-    // Tells listeners to broadcast their data.
+    /** Tells listeners to broadcast their data. */
     boost::signals2::signal<void ()> Broadcast;
-    // Notifies listeners of a block validation result
+    /** Notifies listeners of a block validation result */
     boost::signals2::signal<void (const CBlock&, const CValidationState&)> BlockChecked;
 } g_signals;
 
@@ -213,32 +218,34 @@ struct CBlockReject {
     uint256 hashBlock;
 };
 
-// Maintain validation-specific state about nodes, protected by cs_main, instead
-// by CNode's own locks. This simplifies asynchronous operation, where
-// processing of incoming data is done after the ProcessMessage call returns,
-// and we're no longer holding the node's locks.
+/**
+ * Maintain validation-specific state about nodes, protected by cs_main, instead
+ * by CNode's own locks. This simplifies asynchronous operation, where
+ * processing of incoming data is done after the ProcessMessage call returns,
+ * and we're no longer holding the node's locks.
+ */
 struct CNodeState {
-    // Accumulated misbehaviour score for this peer.
+    //! Accumulated misbehaviour score for this peer.
     int nMisbehavior;
-    // Whether this peer should be disconnected and banned (unless whitelisted).
+    //! Whether this peer should be disconnected and banned (unless whitelisted).
     bool fShouldBan;
-    // String name of this peer (debugging/logging purposes).
+    //! String name of this peer (debugging/logging purposes).
     std::string name;
-    // List of asynchronously-determined block rejections to notify this peer about.
+    //! List of asynchronously-determined block rejections to notify this peer about.
     std::vector<CBlockReject> rejects;
-    // The best known block we know this peer has announced.
+    //! The best known block we know this peer has announced.
     CBlockIndex *pindexBestKnownBlock;
-    // The hash of the last unknown block this peer has announced.
+    //! The hash of the last unknown block this peer has announced.
     uint256 hashLastUnknownBlock;
-    // The last full block we both have.
+    //! The last full block we both have.
     CBlockIndex *pindexLastCommonBlock;
-    // Whether we've started headers synchronization with this peer.
+    //! Whether we've started headers synchronization with this peer.
     bool fSyncStarted;
-    // Since when we're stalling block download progress (in microseconds), or 0.
+    //! Since when we're stalling block download progress (in microseconds), or 0.
     int64_t nStallingSince;
     list<QueuedBlock> vBlocksInFlight;
     int nBlocksInFlight;
-    // Whether we consider this a preferred download peer.
+    //! Whether we consider this a preferred download peer.
     bool fPreferredDownload;
 
     CNodeState() {
@@ -254,7 +261,7 @@ struct CNodeState {
     }
 };
 
-// Map maintaining per-node state. Requires cs_main.
+/** Map maintaining per-node state. Requires cs_main. */
 map<NodeId, CNodeState> mapNodeState;
 
 // Requires cs_main.
@@ -708,15 +715,15 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
     return true;
 }
 
-//
-// Check transaction inputs to mitigate two
-// potential denial-of-service attacks:
-//
-// 1. scriptSigs with extra data stuffed into them,
-//    not consumed by scriptPubKey (or P2SH script)
-// 2. P2SH scripts with a crazy number of expensive
-//    CHECKSIG/CHECKMULTISIG operations
-//
+/**
+ * Check transaction inputs to mitigate two
+ * potential denial-of-service attacks:
+ * 
+ * 1. scriptSigs with extra data stuffed into them,
+ *    not consumed by scriptPubKey (or P2SH script)
+ * 2. P2SH scripts with a crazy number of expensive
+ *    CHECKSIG/CHECKMULTISIG operations
+ */
 bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
 {
     if (tx.IsCoinBase())
@@ -1054,7 +1061,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
     return true;
 }
 
-// Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock
+/** Return transaction in tx, and if it was found inside a block, its hash is placed in hashBlock */
 bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock, bool fAllowSlow)
 {
     CBlockIndex *pindexSlow = NULL;
@@ -1818,7 +1825,7 @@ void FlushStateToDisk() {
     FlushStateToDisk(state, FLUSH_STATE_ALWAYS);
 }
 
-// Update chainActive and related internal data structures.
+/** Update chainActive and related internal data structures. */
 void static UpdateTip(CBlockIndex *pindexNew) {
     chainActive.SetTip(pindexNew);
 
@@ -1857,7 +1864,7 @@ void static UpdateTip(CBlockIndex *pindexNew) {
     }
 }
 
-// Disconnect chainActive's tip.
+/** Disconnect chainActive's tip. */
 bool static DisconnectTip(CValidationState &state) {
     CBlockIndex *pindexDelete = chainActive.Tip();
     assert(pindexDelete);
@@ -1904,8 +1911,10 @@ static int64_t nTimeFlush = 0;
 static int64_t nTimeChainState = 0;
 static int64_t nTimePostConnect = 0;
 
-// Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock
-// corresponding to pindexNew, to bypass loading it again from disk.
+/** 
+ * Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock
+ * corresponding to pindexNew, to bypass loading it again from disk.
+ */
 bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *pblock) {
     assert(pindexNew->pprev == chainActive.Tip());
     mempool.check(pcoinsTip);
@@ -1965,8 +1974,10 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
     return true;
 }
 
-// Return the tip of the chain with the most work in it, that isn't
-// known to be invalid (it's however far from certain to be valid).
+/**
+ * Return the tip of the chain with the most work in it, that isn't
+ * known to be invalid (it's however far from certain to be valid).
+ */
 static CBlockIndex* FindMostWorkChain() {
     do {
         CBlockIndex *pindexNew = NULL;
@@ -2007,7 +2018,7 @@ static CBlockIndex* FindMostWorkChain() {
     } while(true);
 }
 
-// Delete all entries in setBlockIndexCandidates that are worse than the current tip.
+/** Delete all entries in setBlockIndexCandidates that are worse than the current tip. */
 static void PruneBlockIndexCandidates() {
     // Note that we can't delete the current block itself, as we may need to return to it later in case a
     // reorganization to a better block fails.
@@ -2019,8 +2030,10 @@ static void PruneBlockIndexCandidates() {
     assert(!setBlockIndexCandidates.empty());
 }
 
-// Try to make some progress towards making pindexMostWork the active block.
-// pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
+/**
+ * Try to make some progress towards making pindexMostWork the active block.
+ * pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
+ */
 static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMostWork, CBlock *pblock) {
     AssertLockHeld(cs_main);
     bool fInvalidFound = false;
@@ -2085,9 +2098,11 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
     return true;
 }
 
-// Make the best chain active, in multiple steps. The result is either failure
-// or an activated best chain. pblock is either NULL or a pointer to a block
-// that is already loaded (to avoid loading it again from disk).
+/**
+ * Make the best chain active, in multiple steps. The result is either failure
+ * or an activated best chain. pblock is either NULL or a pointer to a block
+ * that is already loaded (to avoid loading it again from disk).
+ */
 bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
     CBlockIndex *pindexNewTip = NULL;
     CBlockIndex *pindexMostWork = NULL;
@@ -2236,7 +2251,7 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
     return pindexNew;
 }
 
-// Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS).
+/** Mark a block as having its data received and checked (up to BLOCK_VALID_TRANSACTIONS). */
 bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBlockIndex *pindexNew, const CDiskBlockPos& pos)
 {
     pindexNew->nTx = block.vtx.size();
@@ -2745,7 +2760,7 @@ uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::ve
     } else {
         // calculate left hash
         uint256 left = CalcHash(height-1, pos*2, vTxid), right;
-        // calculate right hash if not beyong the end of the array - copy left hash otherwise1
+        // calculate right hash if not beyond the end of the array - copy left hash otherwise1
         if (pos*2+1 < CalcTreeWidth(height-1))
             right = CalcHash(height-1, pos*2+1, vTxid);
         else
diff --git a/src/main.h b/src/main.h
index caf8331ee1c9..ecf54897185e 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,6 +1,6 @@
 // Copyright (c) 2009-2010 Satoshi Nakamoto
 // Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_MAIN_H
@@ -60,7 +60,7 @@ static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000;
 static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 /** The maximum allowed number of signature check operations in a block (network rule) */
 static const unsigned int MAX_BLOCK_SIGOPS = MAX_BLOCK_SIZE/50;
-/** Maxiumum number of signature check operations in an IsStandard() P2SH script */
+/** Maximum number of signature check operations in an IsStandard() P2SH script */
 static const unsigned int MAX_P2SH_SIGOPS = 15;
 /** The maximum number of sigops we're willing to relay/mine in a single tx */
 static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
@@ -97,7 +97,7 @@ static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;
 /** Time to wait (in seconds) between writing blockchain state to disk. */
 static const unsigned int DATABASE_WRITE_INTERVAL = 3600;
 
-/** "reject" message codes **/
+/** "reject" message codes */
 static const unsigned char REJECT_MALFORMED = 0x01;
 static const unsigned char REJECT_INVALID = 0x10;
 static const unsigned char REJECT_OBSOLETE = 0x11;
@@ -131,10 +131,10 @@ extern bool fIsBareMultisigStd;
 extern unsigned int nCoinCacheSize;
 extern CFeeRate minRelayTxFee;
 
-// Best header we've seen so far (used for getheaders queries' starting points).
+/** Best header we've seen so far (used for getheaders queries' starting points). */
 extern CBlockIndex *pindexBestHeader;
 
-// Minimum disk space required - used in CheckDiskSpace()
+/** Minimum disk space required - used in CheckDiskSpace() */
 static const uint64_t nMinDiskSpace = 52428800;
 
 /** Register a wallet to receive updates from core */
@@ -151,15 +151,17 @@ void RegisterNodeSignals(CNodeSignals& nodeSignals);
 /** Unregister a network node */
 void UnregisterNodeSignals(CNodeSignals& nodeSignals);
 
-/** Process an incoming block. This only returns after the best known valid
-    block is made active. Note that it does not, however, guarantee that the
-    specific block passed to it has been checked for validity!
-    @param[out]  state   This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state iff pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface - this will have its BlockChecked method called whenever *any* block completes validation.
-    @param[in]   pfrom   The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
-    @param[in]   pblock  The block we want to process.
-    @param[out]  dbp     If pblock is stored to disk (or already there), this will be set to its location.
-    @return True if state.IsValid()
-*/
+/** 
+ * Process an incoming block. This only returns after the best known valid
+ * block is made active. Note that it does not, however, guarantee that the
+ * specific block passed to it has been checked for validity!
+ * 
+ * @param[out]  state   This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface - this will have its BlockChecked method called whenever *any* block completes validation.
+ * @param[in]   pfrom   The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
+ * @param[in]   pblock  The block we want to process.
+ * @param[out]  dbp     If pblock is stored to disk (or already there), this will be set to its location.
+ * @return True if state.IsValid()
+ */
 bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDiskBlockPos *dbp = NULL);
 /** Check whether enough disk space is available for an incoming block */
 bool CheckDiskSpace(uint64_t nAdditionalBytes = 0);
@@ -245,54 +247,59 @@ struct CDiskTxPos : public CDiskBlockPos
 
 CAmount GetMinRelayFee(const CTransaction& tx, unsigned int nBytes, bool fAllowFree);
 
-//
-// Check transaction inputs, and make sure any
-// pay-to-script-hash transactions are evaluating IsStandard scripts
-//
-// Why bother? To avoid denial-of-service attacks; an attacker
-// can submit a standard HASH... OP_EQUAL transaction,
-// which will get accepted into blocks. The redemption
-// script can be anything; an attacker could use a very
-// expensive-to-check-upon-redemption script like:
-//   DUP CHECKSIG DROP ... repeated 100 times... OP_1
-//
+/**
+ * Check transaction inputs, and make sure any
+ * pay-to-script-hash transactions are evaluating IsStandard scripts
+ * 
+ * Why bother? To avoid denial-of-service attacks; an attacker
+ * can submit a standard HASH... OP_EQUAL transaction,
+ * which will get accepted into blocks. The redemption
+ * script can be anything; an attacker could use a very
+ * expensive-to-check-upon-redemption script like:
+ *   DUP CHECKSIG DROP ... repeated 100 times... OP_1
+ */
 
-/** Check for standard transaction types
-    @param[in] mapInputs    Map of previous transactions that have outputs we're spending
-    @return True if all inputs (scriptSigs) use only standard transaction forms
-*/
+/** 
+ * Check for standard transaction types
+ * @param[in] mapInputs    Map of previous transactions that have outputs we're spending
+ * @return True if all inputs (scriptSigs) use only standard transaction forms
+ */
 bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
 
-/** Count ECDSA signature operations the old-fashioned (pre-0.6) way
-    @return number of sigops this transaction's outputs will produce when spent
-    @see CTransaction::FetchInputs
-*/
+/** 
+ * Count ECDSA signature operations the old-fashioned (pre-0.6) way
+ * @return number of sigops this transaction's outputs will produce when spent
+ * @see CTransaction::FetchInputs
+ */
 unsigned int GetLegacySigOpCount(const CTransaction& tx);
 
-/** Count ECDSA signature operations in pay-to-script-hash inputs.
-
-    @param[in] mapInputs	Map of previous transactions that have outputs we're spending
-    @return maximum number of sigops required to validate this transaction's inputs
-    @see CTransaction::FetchInputs
+/**
+ * Count ECDSA signature operations in pay-to-script-hash inputs.
+ * 
+ * @param[in] mapInputs Map of previous transactions that have outputs we're spending
+ * @return maximum number of sigops required to validate this transaction's inputs
+ * @see CTransaction::FetchInputs
  */
 unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& mapInputs);
 
 
-// Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
-// This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
-// instead of being performed inline.
+/**
+ * Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)
+ * This does not modify the UTXO set. If pvChecks is not NULL, script checks are pushed onto it
+ * instead of being performed inline.
+ */
 bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, bool fScriptChecks,
                  unsigned int flags, bool cacheStore, std::vector<CScriptCheck> *pvChecks = NULL);
 
-// Apply the effects of this transaction on the UTXO set represented by view
+/** Apply the effects of this transaction on the UTXO set represented by view */
 void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, CTxUndo &txundo, int nHeight);
 
-// Context-independent validity checks
+/** Context-independent validity checks */
 bool CheckTransaction(const CTransaction& tx, CValidationState& state);
 
 /** Check for standard transaction types
-    @return True if all outputs (scriptPubKeys) use only standard transaction forms
-*/
+ * @return True if all outputs (scriptPubKeys) use only standard transaction forms
+ */
 bool IsStandardTx(const CTransaction& tx, std::string& reason);
 
 bool IsFinalTx(const CTransaction &tx, int nBlockHeight = 0, int64_t nBlockTime = 0);
@@ -315,8 +322,10 @@ class CBlockUndo
 };
 
 
-/** Closure representing one script verification
- *  Note that this stores references to the spending transaction */
+/** 
+ * Closure representing one script verification
+ * Note that this stores references to the spending transaction 
+ */
 class CScriptCheck
 {
 private:
@@ -345,7 +354,7 @@ class CScriptCheck
 
 /** Data structure that represents a partial merkle tree.
  *
- * It respresents a subset of the txid's of a known block, in a way that
+ * It represents a subset of the txid's of a known block, in a way that
  * allows recovery of the list of txid's and the merkle root, in an
  * authenticated way.
  *
@@ -380,36 +389,38 @@ class CScriptCheck
 class CPartialMerkleTree
 {
 protected:
-    // the total number of transactions in the block
+    /** the total number of transactions in the block */
     unsigned int nTransactions;
 
-    // node-is-parent-of-matched-txid bits
+    /** node-is-parent-of-matched-txid bits */
     std::vector<bool> vBits;
 
-    // txids and internal hashes
+    /** txids and internal hashes */
     std::vector<uint256> vHash;
 
-    // flag set when encountering invalid data
+    /** flag set when encountering invalid data */
     bool fBad;
 
-    // helper function to efficiently calculate the number of nodes at given height in the merkle tree
+    /** helper function to efficiently calculate the number of nodes at given height in the merkle tree */
     unsigned int CalcTreeWidth(int height) {
         return (nTransactions+(1 << height)-1) >> height;
     }
 
-    // calculate the hash of a node in the merkle tree (at leaf level: the txid's themself)
+    /** calculate the hash of a node in the merkle tree (at leaf level: the txid's themselves) */
     uint256 CalcHash(int height, unsigned int pos, const std::vector<uint256> &vTxid);
 
-    // recursive function that traverses tree nodes, storing the data as bits and hashes
+    /** recursive function that traverses tree nodes, storing the data as bits and hashes */
     void TraverseAndBuild(int height, unsigned int pos, const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
 
-    // recursive function that traverses tree nodes, consuming the bits and hashes produced by TraverseAndBuild.
-    // it returns the hash of the respective node.
+    /**
+     * recursive function that traverses tree nodes, consuming the bits and hashes produced by TraverseAndBuild.
+     * it returns the hash of the respective node.
+     */
     uint256 TraverseAndExtract(int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector<uint256> &vMatch);
 
 public:
 
-    // serialization implementation
+    /** serialization implementation */
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
@@ -432,13 +443,15 @@ class CPartialMerkleTree
         }
     }
 
-    // Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them
+    /** Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them */
     CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
 
     CPartialMerkleTree();
 
-    // extract the matching txid's represented by this partial merkle tree.
-    // returns the merkle root, or 0 in case of failure
+    /**
+     * extract the matching txid's represented by this partial merkle tree.
+     * returns the merkle root, or 0 in case of failure
+     */
     uint256 ExtractMatches(std::vector<uint256> &vMatch);
 };
 
@@ -458,22 +471,21 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
  *  of problems. Note that in any case, coins may be modified. */
 bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);
 
-// Apply the effects of this block (with given index) on the UTXO set represented by coins
+/** Apply the effects of this block (with given index) on the UTXO set represented by coins */
 bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool fJustCheck = false);
 
-// Context-independent validity checks
+/** Context-independent validity checks */
 bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, bool fCheckPOW = true);
 bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
 
-// Context-dependent validity checks
+/** Context-dependent validity checks */
 bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex *pindexPrev);
 bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIndex *pindexPrev);
 
-// Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held)
+/** Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held) */
 bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex *pindexPrev, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
 
-// Store block on disk
-// if dbp is provided, the file is known to already reside on disk
+/** Store block on disk. If dbp is provided, the file is known to already reside on disk */
 bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex **pindex, CDiskBlockPos* dbp = NULL);
 bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBlockIndex **ppindex= NULL);
 
@@ -482,13 +494,13 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
 class CBlockFileInfo
 {
 public:
-    unsigned int nBlocks;      // number of blocks stored in file
-    unsigned int nSize;        // number of used bytes of block file
-    unsigned int nUndoSize;    // number of used bytes in the undo file
-    unsigned int nHeightFirst; // lowest height of block in file
-    unsigned int nHeightLast;  // highest height of block in file
-    uint64_t nTimeFirst;         // earliest time of block in file
-    uint64_t nTimeLast;          // latest time of block in file
+    unsigned int nBlocks;      //! number of blocks stored in file
+    unsigned int nSize;        //! number of used bytes of block file
+    unsigned int nUndoSize;    //! number of used bytes in the undo file
+    unsigned int nHeightFirst; //! lowest height of block in file
+    unsigned int nHeightLast;  //! highest height of block in file
+    uint64_t nTimeFirst;         //! earliest time of block in file
+    uint64_t nTimeLast;          //! latest time of block in file
 
     ADD_SERIALIZE_METHODS;
 
@@ -519,7 +531,7 @@ class CBlockFileInfo
 
      std::string ToString() const;
 
-     // update statistics (does not update nSize)
+     /** update statistics (does not update nSize) */
      void AddBlock(unsigned int nHeightIn, uint64_t nTimeIn) {
          if (nBlocks==0 || nHeightFirst > nHeightIn)
              nHeightFirst = nHeightIn;
@@ -537,9 +549,9 @@ class CBlockFileInfo
 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_VALID,   //! everything ok
+        MODE_INVALID, //! network rule violation (DoS value may be set)
+        MODE_ERROR,   //! run-time error
     } mode;
     int nDoS;
     std::string strRejectReason;
@@ -634,24 +646,26 @@ struct CBlockTemplate
 
 
 
-/** Used to relay blocks as header + vector<merkle branch>
+/** 
+ * Used to relay blocks as header + vector<merkle branch>
  * to filtered nodes.
  */
 class CMerkleBlock
 {
 public:
-    // Public only for unit testing
+    /** Public only for unit testing */
     CBlockHeader header;
     CPartialMerkleTree txn;
 
 public:
-    // Public only for unit testing and relay testing
-    // (not relayed)
+    /** Public only for unit testing and relay testing (not relayed) */
     std::vector<std::pair<unsigned int, uint256> > vMatchedTxn;
 
-    // Create from a CBlock, filtering transactions according to filter
-    // Note that this will call IsRelevantAndUpdate on the filter for each transaction,
-    // thus the filter will likely be modified.
+    /**
+     * Create from a CBlock, filtering transactions according to filter
+     * Note that this will call IsRelevantAndUpdate on the filter for each transaction,
+     * thus the filter will likely be modified.
+     */
     CMerkleBlock(const CBlock& block, CBloomFilter& filter);
 
     ADD_SERIALIZE_METHODS;

From 90f7aa777865864d5cf7d1f12af8ef37d851faab Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 2 Dec 2014 15:57:20 +0100
Subject: [PATCH 1149/1819] Fix rest.py test after #5376

---
 qa/rpc-tests/rest.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
index ca09a5c6d8ae..2d301bf4f86e 100755
--- a/qa/rpc-tests/rest.py
+++ b/qa/rpc-tests/rest.py
@@ -31,7 +31,7 @@ def http_get_call(host, port, path, response_object = 0):
 
 
 class RESTTest (BitcoinTestFramework):
-    FORMAT_SEPARATOR = "/"
+    FORMAT_SEPARATOR = "."
     
     def run_test(self):
         url = urlparse.urlparse(self.nodes[0].url)
@@ -59,4 +59,4 @@ def run_test(self):
         assert_greater_than(int(response.getheader('content-length')), 10)
 
 if __name__ == '__main__':
-    RESTTest ().main ()
\ No newline at end of file
+    RESTTest ().main ()

From b2d0162ba48557c585822cabda41fe238420fabe Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 25 Nov 2014 15:21:39 -0500
Subject: [PATCH 1150/1819] Test resurrecting memory pool transactions during
 chain re-org

Builds on #5316.
---
 qa/pull-tester/rpc-tests.sh            |  1 +
 qa/rpc-tests/mempool_resurrect_test.py | 88 ++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)
 create mode 100755 qa/rpc-tests/mempool_resurrect_test.py

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index e01e870390af..5b52c4b751bc 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -18,6 +18,7 @@ fi
 if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/wallet.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/listtransactions.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/mempool_resurrect_test.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --mineblock --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
diff --git a/qa/rpc-tests/mempool_resurrect_test.py b/qa/rpc-tests/mempool_resurrect_test.py
new file mode 100755
index 000000000000..907cbf98f962
--- /dev/null
+++ b/qa/rpc-tests/mempool_resurrect_test.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
+#
+# Test resurrection of mined transactions when
+# the blockchain is re-organized.
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os
+import shutil
+
+# Create one-input, one-output, no-fee transaction:
+class MempoolCoinbaseTest(BitcoinTestFramework):
+
+    def setup_network(self):
+        # Just need one node for this test
+        args = ["-checkmempool", "-debug=mempool"]
+        self.nodes = []
+        self.nodes.append(start_node(0, self.options.tmpdir, args))
+        self.is_network_split = False
+
+    def create_tx(self, from_txid, to_address, amount):
+        inputs = [{ "txid" : from_txid, "vout" : 0}]
+        outputs = { to_address : amount }
+        rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
+        signresult = self.nodes[0].signrawtransaction(rawtx)
+        assert_equal(signresult["complete"], True)
+        return signresult["hex"]
+
+    def run_test(self):
+        node0_address = self.nodes[0].getnewaddress()
+
+        # Spend block 1/2/3's coinbase transactions
+        # Mine a block.
+        # Create three more transactions, spending the spends
+        # Mine another block.
+        # ... make sure all the transactions are confirmed
+        # Invalidate both blocks
+        # ... make sure all the transactions are put back in the mempool
+        # Mine a new block
+        # ... make sure all the transactions are confirmed again.
+
+        b = [ self.nodes[0].getblockhash(n) for n in range(1, 4) ]
+        coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ]
+        spends1_raw = [ self.create_tx(txid, node0_address, 50) for txid in coinbase_txids ]
+        spends1_id = [ self.nodes[0].sendrawtransaction(tx) for tx in spends1_raw ]
+
+        blocks = []
+        blocks.extend(self.nodes[0].setgenerate(True, 1))
+
+        spends2_raw = [ self.create_tx(txid, node0_address, 49.99) for txid in spends1_id ]
+        spends2_id = [ self.nodes[0].sendrawtransaction(tx) for tx in spends2_raw ]
+
+        blocks.extend(self.nodes[0].setgenerate(True, 1))
+
+        # mempool should be empty, all txns confirmed
+        assert_equal(set(self.nodes[0].getrawmempool()), set())
+        for txid in spends1_id+spends2_id:
+            tx = self.nodes[0].gettransaction(txid)
+            assert(tx["confirmations"] > 0)
+
+        # Use invalidateblock to re-org back; all transactions should
+        # end up unconfirmed and back in the mempool
+        for node in self.nodes:
+            node.invalidateblock(blocks[0])
+
+        # mempool should be empty, all txns confirmed
+        assert_equal(set(self.nodes[0].getrawmempool()), set(spends1_id+spends2_id))
+        for txid in spends1_id+spends2_id:
+            tx = self.nodes[0].gettransaction(txid)
+            assert(tx["confirmations"] == 0)
+
+        # Generate another block, they should all get mined
+        self.nodes[0].setgenerate(True, 1)
+        # mempool should be empty, all txns confirmed
+        assert_equal(set(self.nodes[0].getrawmempool()), set())
+        for txid in spends1_id+spends2_id:
+            tx = self.nodes[0].gettransaction(txid)
+            assert(tx["confirmations"] > 0)
+
+
+if __name__ == '__main__':
+    MempoolCoinbaseTest().main()

From 35e408f8a48a5406cec214c1d660e6f6a2d026f3 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 2 Dec 2014 17:43:42 +0100
Subject: [PATCH 1151/1819] Regard connection failures as attempt for addrman

This avoids connecting to them again too soon in ThreadOpenConnections.

Make an exception for connection failures to the proxy as these
shouldn't affect the status of specific nodes.
---
 src/net.cpp     |  8 +++++++-
 src/netbase.cpp | 20 ++++++++++++++++----
 src/netbase.h   |  4 ++--
 3 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/src/net.cpp b/src/net.cpp
index 6bf72d22c593..f1c49d0382a0 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -399,7 +399,9 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
 
     // Connect
     SOCKET hSocket;
-    if (pszDest ? ConnectSocketByName(addrConnect, hSocket, pszDest, Params().GetDefaultPort()) : ConnectSocket(addrConnect, hSocket))
+    bool proxyConnectionFailed = false;
+    if (pszDest ? ConnectSocketByName(addrConnect, hSocket, pszDest, Params().GetDefaultPort(), nConnectTimeout, &proxyConnectionFailed) :
+                  ConnectSocket(addrConnect, hSocket, nConnectTimeout, &proxyConnectionFailed))
     {
         addrman.Attempt(addrConnect);
 
@@ -415,6 +417,10 @@ CNode* ConnectNode(CAddress addrConnect, const char *pszDest)
         pnode->nTimeConnected = GetTime();
 
         return pnode;
+    } else if (!proxyConnectionFailed) {
+        // If connecting to the node failed, and failure is not caused by a problem connecting to
+        // the proxy, mark this as an attempt.
+        addrman.Attempt(addrConnect);
     }
 
     return NULL;
diff --git a/src/netbase.cpp b/src/netbase.cpp
index aca5a107fe02..053c645a1be1 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -519,9 +519,11 @@ bool IsProxy(const CNetAddr &addr) {
     return false;
 }
 
-bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout)
+bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
 {
     proxyType proxy;
+    if (outProxyConnectionFailed)
+        *outProxyConnectionFailed = false;
     // no proxy needed (none set for target network)
     if (!GetProxy(addrDest.GetNetwork(), proxy))
         return ConnectSocketDirectly(addrDest, hSocketRet, nTimeout);
@@ -529,8 +531,11 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout)
     SOCKET hSocket = INVALID_SOCKET;
 
     // first connect to proxy server
-    if (!ConnectSocketDirectly(proxy, hSocket, nTimeout))
+    if (!ConnectSocketDirectly(proxy, hSocket, nTimeout)) {
+        if (outProxyConnectionFailed)
+            *outProxyConnectionFailed = true;
         return false;
+    }
     // do socks negotiation
     if (!Socks5(addrDest.ToStringIP(), addrDest.GetPort(), hSocket))
         return false;
@@ -539,10 +544,14 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout)
     return true;
 }
 
-bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout)
+bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
 {
     string strDest;
     int port = portDefault;
+
+    if (outProxyConnectionFailed)
+        *outProxyConnectionFailed = false;
+
     SplitHostPort(string(pszDest), port, strDest);
 
     SOCKET hSocket = INVALID_SOCKET;
@@ -561,8 +570,11 @@ bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest
     if (!HaveNameProxy())
         return false;
     // first connect to name proxy server
-    if (!ConnectSocketDirectly(nameProxy, hSocket, nTimeout))
+    if (!ConnectSocketDirectly(nameProxy, hSocket, nTimeout)) {
+        if (outProxyConnectionFailed)
+            *outProxyConnectionFailed = true;
         return false;
+    }
     // do socks negotiation
     if (!Socks5(strDest, (unsigned short)port, hSocket))
         return false;
diff --git a/src/netbase.h b/src/netbase.h
index 9d8697dcc63a..09fe094946e6 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -182,8 +182,8 @@ bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nM
 bool Lookup(const char *pszName, CService& addr, int portDefault = 0, bool fAllowLookup = true);
 bool Lookup(const char *pszName, std::vector<CService>& vAddr, int portDefault = 0, bool fAllowLookup = true, unsigned int nMaxSolutions = 0);
 bool LookupNumeric(const char *pszName, CService& addr, int portDefault = 0);
-bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout = nConnectTimeout);
-bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault = 0, int nTimeout = nConnectTimeout);
+bool ConnectSocket(const CService &addr, SOCKET& hSocketRet, int nTimeout, bool *outProxyConnectionFailed = 0);
+bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed = 0);
 /** Return readable error string for a network error code */
 std::string NetworkErrorString(int err);
 /** Close socket and set hSocket to INVALID_SOCKET */

From 5fdbe67ad92c0d7f6ffdf08d2ee25232e669cba0 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Tue, 2 Dec 2014 08:24:26 -0800
Subject: [PATCH 1152/1819] Add 0.10 release notes on improvement to signing
 security.

I dropped mention of libgmp that I had in my first draft because
it looks like we'll be able to get that out prior to release.
---
 doc/release-notes.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 6aaea677901a..f804e8c11b29 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -95,3 +95,32 @@ are done, it always returns an immediate error with code -28 to all calls.
 This new behaviour can be useful for clients to know that a server is already
 started and will be available soon (for instance, so that they do not
 have to start it themselves).
+
+Improved signing security
+=========================
+
+For 0.10 the security of signing against unusual attacks has been
+improved by making the signatures constant time and deterministic.
+
+This change is a result of switching signing to use libsecp256k1
+instead of OpenSSL. Libsecp256k1 is a cryptographic library
+optimized for the curve Bitcoin uses which was created by Bitcoin
+Core developer Pieter Wuille.
+
+There exist attacks[1] against most ECC implementations where an
+attacker on shared virtual machine hardware could extract a private
+key if they could cause a target to sign using the same key hundreds
+of times. While using shared hosts and reusing keys are inadvisable
+for other reasons, it's a better practice to avoid the exposure.
+
+OpenSSL has code in their source repository for derandomization
+and reduction in timing leaks, and we've  eagerly wanted to use
+it for a long time but this functionality has still not made its
+way into a released version of OpenSSL. Libsecp256k1 achieves
+significantly stronger protection: As far as we're aware this is
+the only deployed implementation of constant time signing for
+the curve Bitcoin uses and we have reason to believe that
+libsecp256k1 is better tested and more thoroughly reviewed
+than the implementation in OpenSSL.
+
+[1] https://eprint.iacr.org/2014/161.pdf

From 65b03282c9cb42fa5de9f2dd70477e44e1e9d37d Mon Sep 17 00:00:00 2001
From: "Ryan X. Charles" <ryanxcharles@gmail.com>
Date: Tue, 2 Dec 2014 10:02:44 -0800
Subject: [PATCH 1153/1819] newlines in strings are invalid JSON

Although script_valid.json and script_invalid.json are loaded correctly by the
JSON interpreter used by bitcoin core, these same files are often used by other
libraries and do not necessarily load correctly due to the fact that newlines
contained inside strings are not valid and must instead use the escape
character \n. The files tx_valid.json and tx_invalid.json handle this
correctly, so I've changed the formatting in script_valid.json and
script_invalid.json to mirror those files.
---
 src/test/data/script_invalid.json | 22 +++++++++------------
 src/test/data/script_valid.json   | 32 ++++++++++++++-----------------
 2 files changed, 23 insertions(+), 31 deletions(-)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index c454b5297698..86d39b5c2086 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -1,12 +1,10 @@
 [
-["
-Format is: [scriptPubKey, scriptSig, flags, ... comments]
-It is evaluated as if there was a crediting coinbase transaction with two 0
-pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,
-followed by a spending transaction which spends this output as only input (and
-correct prevout hash), using the given scriptSig. All nLockTimes are 0, all
-nSequences are max.
-"],
+["Format is: [scriptPubKey, scriptSig, flags, ... comments]"],
+["It is evaluated as if there was a crediting coinbase transaction with two 0"],
+["pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,"],
+["followed by a spending transaction which spends this output as only input (and"],
+["correct prevout hash), using the given scriptSig. All nLockTimes are 0, all"],
+["nSequences are max."],
 
 ["", "DEPTH", "P2SH,STRICTENC",   "Test the test: we should have an empty stack after scriptSig evaluation"],
 ["  ", "DEPTH", "P2SH,STRICTENC", "and multiple spaces should not change that."],
@@ -496,11 +494,9 @@ nSequences are max.
 ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", "MINIMALDATA"],
 
 
-["
-Order of CHECKMULTISIG evaluation tests, inverted by swapping the order of
-pubkeys/signatures so they fail due to the STRICTENC rules on validly encoded
-signatures and pubkeys.
-"],
+["Order of CHECKMULTISIG evaluation tests, inverted by swapping the order of"],
+["pubkeys/signatures so they fail due to the STRICTENC rules on validly encoded"],
+["signatures and pubkeys."],
 [
     "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
     "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0 2 CHECKMULTISIG NOT",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index af0f6939c651..d3075de646aa 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -1,12 +1,10 @@
 [
-["
-Format is: [scriptPubKey, scriptSig, flags, ... comments]
-It is evaluated as if there was a crediting coinbase transaction with two 0
-pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,
-followed by a spending transaction which spends this output as only input (and
-correct prevout hash), using the given scriptSig. All nLockTimes are 0, all
-nSequences are max.
-"],
+["Format is: [scriptPubKey, scriptSig, flags, ... comments]"],
+["It is evaluated as if there was a crediting coinbase transaction with two 0"],
+["pushes as scriptSig, and one output of 0 satoshi and given scriptPubKey,"],
+["followed by a spending transaction which spends this output as only input (and"],
+["correct prevout hash), using the given scriptSig. All nLockTimes are 0, all"],
+["nSequences are max."],
 
 ["", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "Test the test: we should have an empty stack after scriptSig evaluation"],
 ["  ", "DEPTH 0 EQUAL", "P2SH,STRICTENC", "and multiple spaces should not change that."],
@@ -664,16 +662,14 @@ nSequences are max.
 ["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
 ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
 
-["
-CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and
-pubkeys in a specific order, and will exit early if the number of signatures
-left to check is greater than the number of keys left. As STRICTENC fails the
-script when it reaches an invalidly encoded signature or pubkey, we can use it
-to test the exact order in which signatures and pubkeys are evaluated by
-distinguishing CHECKMULTISIG returning false on the stack and the script as a
-whole failing.
-See also the corresponding inverted versions of these tests in script_invalid.json
-"],
+["CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and"],
+["pubkeys in a specific order, and will exit early if the number of signatures"],
+["left to check is greater than the number of keys left. As STRICTENC fails the"],
+["script when it reaches an invalidly encoded signature or pubkey, we can use it"],
+["to test the exact order in which signatures and pubkeys are evaluated by"],
+["distinguishing CHECKMULTISIG returning false on the stack and the script as a"],
+["whole failing."],
+["See also the corresponding inverted versions of these tests in script_invalid.json"],
 [
     "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501",
     "2 0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",

From 307f7d48d4733da016bf73676f6ebff9144365c1 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sat, 29 Nov 2014 16:01:37 +0100
Subject: [PATCH 1154/1819] Report script evaluation failures in log and reject
 messages

---
 src/main.cpp | 19 ++++++++++---------
 src/main.h   | 12 +++++++++---
 2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 0515eeb1563b..d0a4db62bcee 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1327,7 +1327,7 @@ void static InvalidBlockFound(CBlockIndex *pindex, const CValidationState &state
     if (state.IsInvalid(nDoS)) {
         std::map<uint256, NodeId>::iterator it = mapBlockSource.find(pindex->GetBlockHash());
         if (it != mapBlockSource.end() && State(it->second)) {
-            CBlockReject reject = {state.GetRejectCode(), state.GetRejectReason(), pindex->GetBlockHash()};
+            CBlockReject reject = {state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), pindex->GetBlockHash()};
             State(it->second)->rejects.push_back(reject);
             if (nDoS > 0)
                 Misbehaving(it->second, nDoS);
@@ -1357,10 +1357,11 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
     inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight);
 }
 
-bool CScriptCheck::operator()() const {
+bool CScriptCheck::operator()() {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingSignatureChecker(*ptxTo, nIn, cacheStore)))
-        return error("CScriptCheck() : %s:%d VerifySignature failed", ptxTo->GetHash().ToString(), nIn);
+    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingSignatureChecker(*ptxTo, nIn, cacheStore), &error)) {
+        return ::error("CScriptCheck() : %s:%d VerifySignature failed: %s", ptxTo->GetHash().ToString(), nIn, ScriptErrorString(error));
+    }
     return true;
 }
 
@@ -1448,7 +1449,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                         CScriptCheck check(*coins, tx, i,
                                 flags & ~STANDARD_NOT_MANDATORY_VERIFY_FLAGS, cacheStore);
                         if (check())
-                            return state.Invalid(false, REJECT_NONSTANDARD, "non-mandatory-script-verify-flag");
+                            return state.Invalid(false, REJECT_NONSTANDARD, strprintf("non-mandatory-script-verify-flag (%s)", ScriptErrorString(check.GetScriptError())));
                     }
                     // Failures of other flags indicate a transaction that is
                     // invalid in new blocks, e.g. a invalid P2SH. We DoS ban
@@ -1457,7 +1458,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
                     // as to the correct behavior - we may want to continue
                     // peering with non-upgraded nodes even after a soft-fork
                     // super-majority vote has passed.
-                    return state.DoS(100,false, REJECT_INVALID, "mandatory-script-verify-flag-failed");
+                    return state.DoS(100,false, REJECT_INVALID, strprintf("mandatory-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError())));
                 }
             }
         }
@@ -3975,7 +3976,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                 pfrom->id, pfrom->cleanSubVer,
                 state.GetRejectReason());
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
-                               state.GetRejectReason(), inv.hash);
+                               state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash);
             if (nDoS > 0)
                 Misbehaving(pfrom->GetId(), nDoS);
         }
@@ -4049,7 +4050,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         int nDoS;
         if (state.IsInvalid(nDoS)) {
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
-                               state.GetRejectReason(), inv.hash);
+                               state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash);
             if (nDoS > 0) {
                 LOCK(cs_main);
                 Misbehaving(pfrom->GetId(), nDoS);
@@ -4256,7 +4257,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         if (fDebug) {
             try {
                 string strMsg; unsigned char ccode; string strReason;
-                vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, 111);
+                vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH);
 
                 ostringstream ss;
                 ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
diff --git a/src/main.h b/src/main.h
index caf8331ee1c9..b04692bb5471 100644
--- a/src/main.h
+++ b/src/main.h
@@ -96,6 +96,8 @@ static const unsigned int MAX_HEADERS_RESULTS = 2000;
 static const unsigned int BLOCK_DOWNLOAD_WINDOW = 1024;
 /** Time to wait (in seconds) between writing blockchain state to disk. */
 static const unsigned int DATABASE_WRITE_INTERVAL = 3600;
+/** Maximum length of reject messages. */
+static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
 
 /** "reject" message codes **/
 static const unsigned char REJECT_MALFORMED = 0x01;
@@ -325,14 +327,15 @@ class CScriptCheck
     unsigned int nIn;
     unsigned int nFlags;
     bool cacheStore;
+    ScriptError error;
 
 public:
-    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), cacheStore(false) {}
+    CScriptCheck(): ptxTo(0), nIn(0), nFlags(0), cacheStore(false), error(SCRIPT_ERR_UNKNOWN_ERROR) {}
     CScriptCheck(const CCoins& txFromIn, const CTransaction& txToIn, unsigned int nInIn, unsigned int nFlagsIn, bool cacheIn) :
         scriptPubKey(txFromIn.vout[txToIn.vin[nInIn].prevout.n].scriptPubKey),
-        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn) { }
+        ptxTo(&txToIn), nIn(nInIn), nFlags(nFlagsIn), cacheStore(cacheIn), error(SCRIPT_ERR_UNKNOWN_ERROR) { }
 
-    bool operator()() const;
+    bool operator()();
 
     void swap(CScriptCheck &check) {
         scriptPubKey.swap(check.scriptPubKey);
@@ -340,7 +343,10 @@ class CScriptCheck
         std::swap(nIn, check.nIn);
         std::swap(nFlags, check.nFlags);
         std::swap(cacheStore, check.cacheStore);
+        std::swap(error, check.error);
     }
+
+    ScriptError GetScriptError() const { return error; }
 };
 
 /** Data structure that represents a partial merkle tree.

From 9e56532959939f417d7603aa2a4a2c1687508897 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Tue, 2 Dec 2014 11:44:50 -0500
Subject: [PATCH 1155/1819] Coinbases-in-mempool regression test

Immature coinbase spends are allowed in the memory pool if they can be mined in the next block.
They are not allowed in the memory pool if they cannot be mined in the next block.

This regression test tests those edge cases.
---
 qa/pull-tester/rpc-tests.sh           |  1 +
 qa/rpc-tests/mempool_spendcoinbase.py | 69 +++++++++++++++++++++++++++
 qa/rpc-tests/util.py                  | 12 ++++-
 3 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100755 qa/rpc-tests/mempool_spendcoinbase.py

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index a064fb81e911..9587d90dfe7e 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -22,6 +22,7 @@ if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/txn_doublespend.py --mineblock --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/getchaintips.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/rest.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/mempool_spendcoinbase.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/mempool_spendcoinbase.py b/qa/rpc-tests/mempool_spendcoinbase.py
new file mode 100755
index 000000000000..0fc7c8577eab
--- /dev/null
+++ b/qa/rpc-tests/mempool_spendcoinbase.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# Copyright (c) 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.
+
+#
+# Test spending coinbase transactions.
+# The coinbase transaction in block N can appear in block
+# N+100... so is valid in the mempool when the best block
+# height is N+99.
+# This test makes sure coinbase spends that will be mature
+# in the next block are accepted into the memory pool,
+# but less mature coinbase spends are NOT.
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os
+import shutil
+
+# Create one-input, one-output, no-fee transaction:
+class MempoolSpendCoinbaseTest(BitcoinTestFramework):
+
+    def setup_network(self):
+        # Just need one node for this test
+        args = ["-checkmempool", "-debug=mempool"]
+        self.nodes = []
+        self.nodes.append(start_node(0, self.options.tmpdir, args))
+        self.is_network_split = False
+
+    def create_tx(self, from_txid, to_address, amount):
+        inputs = [{ "txid" : from_txid, "vout" : 0}]
+        outputs = { to_address : amount }
+        rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
+        signresult = self.nodes[0].signrawtransaction(rawtx)
+        assert_equal(signresult["complete"], True)
+        return signresult["hex"]
+
+    def run_test(self):
+        chain_height = self.nodes[0].getblockcount()
+        assert_equal(chain_height, 200)
+        node0_address = self.nodes[0].getnewaddress()
+
+        # Coinbase at height chain_height-100+1 ok in mempool, should
+        # get mined. Coinbase at height chain_height-100+2 is
+        # is too immature to spend.
+        b = [ self.nodes[0].getblockhash(n) for n in range(101, 103) ]
+        coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ]
+        spends_raw = [ self.create_tx(txid, node0_address, 50) for txid in coinbase_txids ]
+
+        spend_101_id = self.nodes[0].sendrawtransaction(spends_raw[0])
+
+        # coinbase at height 102 should be too immature to spend
+        assert_raises(JSONRPCException, self.nodes[0].sendrawtransaction, spends_raw[1])
+
+        # mempool should have just spend_101:
+        assert_equal(self.nodes[0].getrawmempool(), [ spend_101_id ])
+
+        # mine a block, spend_101 should get confirmed
+        self.nodes[0].setgenerate(True, 1)
+        assert_equal(set(self.nodes[0].getrawmempool()), set())
+
+        # ... and now height 102 can be spent:
+        spend_102_id = self.nodes[0].sendrawtransaction(spends_raw[1])
+        assert_equal(self.nodes[0].getrawmempool(), [ spend_102_id ])
+
+if __name__ == '__main__':
+    MempoolSpendCoinbaseTest().main()
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/util.py
index 6b66bfd8f60c..ec65f783e8f1 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/util.py
@@ -330,4 +330,14 @@ def assert_equal(thing1, thing2):
 
 def assert_greater_than(thing1, thing2):
     if thing1 <= thing2:
-        raise AssertionError("%s <= %s"%(str(thing1),str(thing2)))
\ No newline at end of file
+        raise AssertionError("%s <= %s"%(str(thing1),str(thing2)))
+
+def assert_raises(exc, fun, *args, **kwds):
+    try:
+        fun(*args, **kwds)
+    except exc:
+        pass
+    except Exception as e:
+        raise AssertionError("Unexpected exception raised: "+type(e).__name__)
+    else:
+        raise AssertionError("No exception raised")

From d22701118413b876579c020ea90ecf7a0d5671cb Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 18 Nov 2014 21:03:02 +0000
Subject: [PATCH 1156/1819] MOVEONLY: core/ -> primitives/

---
 src/Makefile.am                          | 10 +++++-----
 src/bitcoin-tx.cpp                       |  2 +-
 src/bloom.cpp                            |  2 +-
 src/chain.h                              |  2 +-
 src/chainparams.h                        |  2 +-
 src/coincontrol.h                        |  2 +-
 src/compressor.h                         |  2 +-
 src/core_read.cpp                        |  4 ++--
 src/core_write.cpp                       |  2 +-
 src/main.h                               |  4 ++--
 src/miner.cpp                            |  4 ++--
 src/net.cpp                              |  2 +-
 src/pow.cpp                              |  2 +-
 src/{core => primitives}/block.cpp       |  2 +-
 src/{core => primitives}/block.h         |  8 ++++----
 src/{core => primitives}/transaction.cpp |  2 +-
 src/{core => primitives}/transaction.h   |  6 +++---
 src/qt/bitcoinunits.cpp                  |  2 +-
 src/qt/guiutil.cpp                       |  2 +-
 src/rest.cpp                             |  4 ++--
 src/rpcrawtransaction.cpp                |  2 +-
 src/script/bitcoinconsensus.cpp          |  2 +-
 src/script/interpreter.cpp               |  2 +-
 src/script/sign.cpp                      |  2 +-
 src/test/main_tests.cpp                  |  2 +-
 src/test/util_tests.cpp                  |  2 +-
 src/txmempool.h                          |  2 +-
 src/undo.h                               |  2 +-
 src/utilmoneystr.cpp                     |  2 +-
 src/wallet.h                             |  4 ++--
 30 files changed, 44 insertions(+), 44 deletions(-)
 rename src/{core => primitives}/block.cpp (99%)
 rename src/{core => primitives}/block.h (96%)
 rename src/{core => primitives}/transaction.cpp (99%)
 rename src/{core => primitives}/transaction.h (98%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 4c4f9f69379e..69b3a6d4f114 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -87,8 +87,8 @@ BITCOIN_CORE_H = \
   coins.h \
   compat.h \
   compressor.h \
-  core/block.h \
-  core/transaction.h \
+  primitives/block.h \
+  primitives/transaction.h \
   core_io.h \
   crypter.h \
   db.h \
@@ -235,8 +235,8 @@ libbitcoin_common_a_SOURCES = \
   chainparams.cpp \
   coins.cpp \
   compressor.cpp \
-  core/block.cpp \
-  core/transaction.cpp \
+  primitives/block.cpp \
+  primitives/transaction.cpp \
   core_read.cpp \
   core_write.cpp \
   eccryptoverify.cpp \
@@ -350,7 +350,7 @@ bitcoin_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 if BUILD_BITCOIN_LIBS
 include_HEADERS = script/bitcoinconsensus.h
 libbitcoinconsensus_la_SOURCES = \
-  core/transaction.cpp \
+  primitives/transaction.cpp \
   crypto/hmac_sha512.cpp \
   crypto/sha1.cpp \
   crypto/sha256.cpp \
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index c0d21ed36f90..1cceab318818 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -4,7 +4,7 @@
 
 #include "base58.h"
 #include "clientversion.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "core_io.h"
 #include "keystore.h"
 #include "main.h" // for MAX_BLOCK_SIZE
diff --git a/src/bloom.cpp b/src/bloom.cpp
index 07b8f2c0ae08..da30e6f355fe 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -4,7 +4,7 @@
 
 #include "bloom.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "hash.h"
 #include "script/script.h"
 #include "script/standard.h"
diff --git a/src/chain.h b/src/chain.h
index c01240665d71..d834790f06a5 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -6,7 +6,7 @@
 #ifndef BITCOIN_CHAIN_H
 #define BITCOIN_CHAIN_H
 
-#include "core/block.h"
+#include "primitives/block.h"
 #include "pow.h"
 #include "tinyformat.h"
 #include "uint256.h"
diff --git a/src/chainparams.h b/src/chainparams.h
index 9f24b70a2618..5d1ee1d3c6bd 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -8,7 +8,7 @@
 
 #include "chainparamsbase.h"
 #include "checkpoints.h"
-#include "core/block.h"
+#include "primitives/block.h"
 #include "protocol.h"
 #include "uint256.h"
 
diff --git a/src/coincontrol.h b/src/coincontrol.h
index c8bdd3b39d5b..cf619987237a 100644
--- a/src/coincontrol.h
+++ b/src/coincontrol.h
@@ -5,7 +5,7 @@
 #ifndef BITCOIN_COINCONTROL_H
 #define BITCOIN_COINCONTROL_H
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 
 /** Coin Control Features. */
 class CCoinControl
diff --git a/src/compressor.h b/src/compressor.h
index d9cde5de7afa..efb8119d0184 100644
--- a/src/compressor.h
+++ b/src/compressor.h
@@ -6,7 +6,7 @@
 #ifndef BITCOIN_COMPRESSOR_H
 #define BITCOIN_COMPRESSOR_H
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "script/script.h"
 #include "serialize.h"
 
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 42e2f8d2003a..65c3a08c551e 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -4,8 +4,8 @@
 
 #include "core_io.h"
 
-#include "core/block.h"
-#include "core/transaction.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
 #include "script/script.h"
 #include "serialize.h"
 #include "streams.h"
diff --git a/src/core_write.cpp b/src/core_write.cpp
index a3ae8eec07be..b4e82b986ee8 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -5,7 +5,7 @@
 #include "core_io.h"
 
 #include "base58.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "script/script.h"
 #include "script/standard.h"
 #include "serialize.h"
diff --git a/src/main.h b/src/main.h
index caf8331ee1c9..861a140efd45 100644
--- a/src/main.h
+++ b/src/main.h
@@ -14,8 +14,8 @@
 #include "chain.h"
 #include "chainparams.h"
 #include "coins.h"
-#include "core/block.h"
-#include "core/transaction.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
 #include "net.h"
 #include "pow.h"
 #include "script/script.h"
diff --git a/src/miner.cpp b/src/miner.cpp
index 660173f35b57..ad2943142124 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -6,8 +6,8 @@
 #include "miner.h"
 
 #include "amount.h"
-#include "core/block.h"
-#include "core/transaction.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
 #include "hash.h"
 #include "main.h"
 #include "net.h"
diff --git a/src/net.cpp b/src/net.cpp
index 6bf72d22c593..8668d5017d30 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -12,7 +12,7 @@
 #include "addrman.h"
 #include "chainparams.h"
 #include "clientversion.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "ui_interface.h"
 
 #ifdef WIN32
diff --git a/src/pow.cpp b/src/pow.cpp
index e07e7ff7702d..bdcfa852f40d 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -7,7 +7,7 @@
 
 #include "chain.h"
 #include "chainparams.h"
-#include "core/block.h"
+#include "primitives/block.h"
 #include "uint256.h"
 #include "util.h"
 
diff --git a/src/core/block.cpp b/src/primitives/block.cpp
similarity index 99%
rename from src/core/block.cpp
rename to src/primitives/block.cpp
index 2010d44dac4b..225bb80be810 100644
--- a/src/core/block.cpp
+++ b/src/primitives/block.cpp
@@ -3,7 +3,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core/block.h"
+#include "primitives/block.h"
 
 #include "hash.h"
 #include "tinyformat.h"
diff --git a/src/core/block.h b/src/primitives/block.h
similarity index 96%
rename from src/core/block.h
rename to src/primitives/block.h
index 6e119c369953..e663c91e848b 100644
--- a/src/core/block.h
+++ b/src/primitives/block.h
@@ -3,10 +3,10 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CORE_BLOCK_H
-#define BITCOIN_CORE_BLOCK_H
+#ifndef BITCOIN_PRIMITIVES_BLOCK_H
+#define BITCOIN_PRIMITIVES_BLOCK_H
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "serialize.h"
 #include "uint256.h"
 
@@ -165,4 +165,4 @@ struct CBlockLocator
     }
 };
 
-#endif // BITCOIN_CORE_BLOCK_H
+#endif // BITCOIN_PRIMITIVES_BLOCK_H
diff --git a/src/core/transaction.cpp b/src/primitives/transaction.cpp
similarity index 99%
rename from src/core/transaction.cpp
rename to src/primitives/transaction.cpp
index f835bafb9f7e..336151905cec 100644
--- a/src/core/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -3,7 +3,7 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 
 #include "hash.h"
 #include "tinyformat.h"
diff --git a/src/core/transaction.h b/src/primitives/transaction.h
similarity index 98%
rename from src/core/transaction.h
rename to src/primitives/transaction.h
index 724348020aee..a7a1e013ede3 100644
--- a/src/core/transaction.h
+++ b/src/primitives/transaction.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_CORE_TRANSACTION_H
-#define BITCOIN_CORE_TRANSACTION_H
+#ifndef BITCOIN_PRIMITIVES_TRANSACTION_H
+#define BITCOIN_PRIMITIVES_TRANSACTION_H
 
 #include "amount.h"
 #include "script/script.h"
@@ -273,4 +273,4 @@ struct CMutableTransaction
     uint256 GetHash() const;
 };
 
-#endif // BITCOIN_CORE_TRANSACTION_H
+#endif // BITCOIN_PRIMITIVES_TRANSACTION_H
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 75e1f9ae788d..5c542b59ae47 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -4,7 +4,7 @@
 
 #include "bitcoinunits.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 
 #include <QStringList>
 
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 22a1f019e995..a1ae756c43e6 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -9,7 +9,7 @@
 #include "qvalidatedlineedit.h"
 #include "walletmodel.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "init.h"
 #include "main.h"
 #include "protocol.h"
diff --git a/src/rest.cpp b/src/rest.cpp
index 27551c929552..6285784af595 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core/block.h"
-#include "core/transaction.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
 #include "main.h"
 #include "rpcserver.h"
 #include "streams.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 25734f49305d..8de15ff9e2f7 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -4,7 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "base58.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "core_io.h"
 #include "init.h"
 #include "keystore.h"
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 4faa760ad714..d4fd2ad7d9b1 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -5,7 +5,7 @@
 
 #include "bitcoinconsensus.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "script/interpreter.h"
 #include "version.h"
 
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 237c712870b8..3231f2e74e53 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -5,7 +5,7 @@
 
 #include "interpreter.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "crypto/ripemd160.h"
 #include "crypto/sha1.h"
 #include "crypto/sha256.h"
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 7dfed751b6bf..03c33ad9b526 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -5,7 +5,7 @@
 
 #include "script/sign.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "key.h"
 #include "keystore.h"
 #include "script/standard.h"
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index 78c41814093e..bf57dd81d9fa 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "main.h"
 
 #include <boost/test/unit_test.hpp>
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 67d50fccf4f7..10f77e3a5b0b 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -5,7 +5,7 @@
 #include "util.h"
 
 #include "clientversion.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "random.h"
 #include "sync.h"
 #include "utilstrencodings.h"
diff --git a/src/txmempool.h b/src/txmempool.h
index e68b2181542f..d00bdd0616c3 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -10,7 +10,7 @@
 
 #include "amount.h"
 #include "coins.h"
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "sync.h"
 
 class CAutoFile;
diff --git a/src/undo.h b/src/undo.h
index 4f5f4047dd42..2301bd8b431b 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -7,7 +7,7 @@
 #define BITCOIN_UNDO_H
 
 #include "compressor.h" 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "serialize.h"
 
 /** Undo information for a CTxIn
diff --git a/src/utilmoneystr.cpp b/src/utilmoneystr.cpp
index 085adae85e90..3e076a02661c 100644
--- a/src/utilmoneystr.cpp
+++ b/src/utilmoneystr.cpp
@@ -5,7 +5,7 @@
 
 #include "utilmoneystr.h"
 
-#include "core/transaction.h"
+#include "primitives/transaction.h"
 #include "tinyformat.h"
 #include "utilstrencodings.h"
 
diff --git a/src/wallet.h b/src/wallet.h
index 0244ce236802..70d274c2d5a7 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -7,8 +7,8 @@
 #define BITCOIN_WALLET_H
 
 #include "amount.h"
-#include "core/block.h"
-#include "core/transaction.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
 #include "crypter.h"
 #include "key.h"
 #include "keystore.h"

From be7b0bff5a04d055bfad38ff49e0dbdabc29b5db Mon Sep 17 00:00:00 2001
From: LongShao007 <007longshao@gmail.com>
Date: Wed, 3 Dec 2014 19:48:17 +0800
Subject: [PATCH 1157/1819] Package libqt5core5 replaced with libqt5core5a

libqt5core5 installs failed.
Package libqt5core5 has replaced with libqt5core5a in ubuntu and debian.
The website is:
http://packages.ubuntu.com/trusty/libqt5core5a
https://packages.debian.org/sid/libqt5core5a
---
 doc/build-unix.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/build-unix.md b/doc/build-unix.md
index e03dc8181a2b..9bb1a53aba4d 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -106,7 +106,7 @@ To build with Qt 4 you need the following:
 
 For Qt 5 you need the following:
 
-    sudo apt-get install libqt5gui5 libqt5core5 libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
+    sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler
 
 libqrencode (optional) can be installed with:
 

From 12a49cac0a561ada277e93549cae26a3123a6023 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 21 Nov 2014 12:22:11 +0100
Subject: [PATCH 1158/1819] Limit the number of new addressses to accumulate

---
 src/net.h | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/net.h b/src/net.h
index e48acf564463..a475be0b334d 100644
--- a/src/net.h
+++ b/src/net.h
@@ -44,6 +44,8 @@ static const int PING_INTERVAL = 2 * 60;
 static const int TIMEOUT_INTERVAL = 20 * 60;
 /** The maximum number of entries in an 'inv' protocol message */
 static const unsigned int MAX_INV_SZ = 50000;
+/** The maximum number of new addresses to accumulate before announcing. */
+static const unsigned int MAX_ADDR_TO_SEND = 1000;
 /** -listen default */
 static const bool DEFAULT_LISTEN = true;
 /** -upnp default */
@@ -368,8 +370,13 @@ class CNode
         // Known checking here is only to save space from duplicates.
         // SendMessages will filter it again for knowns that were added
         // after addresses were pushed.
-        if (addr.IsValid() && !setAddrKnown.count(addr))
-            vAddrToSend.push_back(addr);
+        if (addr.IsValid() && !setAddrKnown.count(addr)) {
+            if (vAddrToSend.size() >= MAX_ADDR_TO_SEND) {
+                vAddrToSend[insecure_rand() % vAddrToSend.size()] = addr;
+            } else {
+                vAddrToSend.push_back(addr);
+            }
+        }
     }
 
 

From ffe3291466b5760e4179d604c54093717b127cc5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Dec 2014 14:23:24 +0100
Subject: [PATCH 1159/1819] Remove gmp dependency and doc mentions

---
 depends/packages/gmp.mk                       | 30 -------------------
 depends/packages/packages.mk                  |  2 +-
 depends/patches/gmp/arm_gmp_build_fix.patch   | 21 -------------
 .../patches/gmp/darwin_gmp_build_fix.patch    | 29 ------------------
 doc/build-osx.md                              |  2 +-
 doc/build-unix.md                             |  3 +-
 6 files changed, 3 insertions(+), 84 deletions(-)
 delete mode 100644 depends/packages/gmp.mk
 delete mode 100644 depends/patches/gmp/arm_gmp_build_fix.patch
 delete mode 100644 depends/patches/gmp/darwin_gmp_build_fix.patch

diff --git a/depends/packages/gmp.mk b/depends/packages/gmp.mk
deleted file mode 100644
index bcbf50ceaede..000000000000
--- a/depends/packages/gmp.mk
+++ /dev/null
@@ -1,30 +0,0 @@
-package=gmp
-$(package)_version=6.0.0a
-$(package)_download_path=https://gmplib.org/download/gmp
-$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf
-$(package)_patches=arm_gmp_build_fix.patch darwin_gmp_build_fix.patch
-
-define $(package)_preprocess_cmds
-  patch -p1 < $($(package)_patch_dir)/arm_gmp_build_fix.patch && \
-  patch -p1 < $($(package)_patch_dir)/darwin_gmp_build_fix.patch
-endef
-
-define $(package)_set_vars
-  $(package)_config_opts=--disable-shared CC_FOR_BUILD=$(build_CC)
-  $(package)_config_opts_x86_64_darwin=--with-pic
-  $(package)_config_opts_x86_64_linux=--with-pic
-  $(package)_config_opts_arm_linux=--with-pic
-endef
-
-define $(package)_config_cmds
-  $($(package)_autoconf)
-endef
-
-define $(package)_build_cmds
-  $(MAKE)
-endef
-
-define $(package)_stage_cmds
-  $(MAKE) DESTDIR=$($(package)_staging_dir) install
-endef
diff --git a/depends/packages/packages.mk b/depends/packages/packages.mk
index 305d21cb2daf..bbf53cc2dce7 100644
--- a/depends/packages/packages.mk
+++ b/depends/packages/packages.mk
@@ -1,4 +1,4 @@
-packages:=boost openssl gmp
+packages:=boost openssl
 native_packages := native_ccache native_comparisontool
 
 qt_native_packages = native_protobuf
diff --git a/depends/patches/gmp/arm_gmp_build_fix.patch b/depends/patches/gmp/arm_gmp_build_fix.patch
deleted file mode 100644
index 666cf58cf69c..000000000000
--- a/depends/patches/gmp/arm_gmp_build_fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1396602422 -7200
-# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40
-# Parent  0194a75b56b21a9196626430af86c5bd9110c42d
-Conditionalise ARM asm on !__thumb__.
-
-diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c
---- a/mpn/generic/div_qr_1n_pi1.c	Thu Apr 03 23:58:51 2014 +0200
-+++ b/mpn/generic/div_qr_1n_pi1.c	Fri Apr 04 11:07:02 2014 +0200
-@@ -130,7 +130,7 @@
- 	     "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC)
- #endif
- 
--#if defined (__arm__) && W_TYPE_SIZE == 32
-+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32
- #define add_mssaaaa(m, sh, sl, ah, al, bh, bl)				\
-   __asm__ (  "adds	%2, %5, %6\n\t"					\
- 	     "adcs	%1, %3, %4\n\t"					\
-
diff --git a/depends/patches/gmp/darwin_gmp_build_fix.patch b/depends/patches/gmp/darwin_gmp_build_fix.patch
deleted file mode 100644
index b9cfd80e778a..000000000000
--- a/depends/patches/gmp/darwin_gmp_build_fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1396470504 -7200
-# Node ID 1fab0adc5ff7d9ecddcbda96f407da58347bb49c
-# Parent  db645603dcdb41afcf78b19b551ecd5a01c3841c
-Workaround for Darwin assembler quirk.
-
-diff -r db645603dcdb -r 1fab0adc5ff7 mpn/x86_64/k8/redc_1.asm
---- a/mpn/x86_64/k8/redc_1.asm	Mon Mar 31 23:04:32 2014 +0200
-+++ b/mpn/x86_64/k8/redc_1.asm	Wed Apr 02 22:28:24 2014 +0200
-@@ -114,7 +114,7 @@
- 
- 	JUMPTABSECT
- 	ALIGN(8)
--L(tab):	JMPENT(	L(0m4), L(tab))
-+L(tab):	JMPENT(	L(0), L(tab))
- 	JMPENT(	L(1), L(tab))
- 	JMPENT(	L(2), L(tab))
- 	JMPENT(	L(3), L(tab))
-@@ -397,6 +397,7 @@
- 
- 
- 	ALIGN(16)
-+L(0):
- L(0m4):
- L(lo0):	mov	(mp,nneg,8), %rax
- 	mov	nneg, i
-
diff --git a/doc/build-osx.md b/doc/build-osx.md
index 491c5c4683af..c41820f2b1be 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -38,7 +38,7 @@ Instructions: Homebrew
 
 #### Install dependencies using Homebrew
 
-        brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt gmp
+        brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
 
 #### Installing berkeley-db4 using Homebrew
 
diff --git a/doc/build-unix.md b/doc/build-unix.md
index 9bb1a53aba4d..8ddee3b75715 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -33,7 +33,6 @@ These dependencies are required:
  ------------|------------------|----------------------
  libssl      | SSL Support      | Secure communications
  libboost    | Boost            | C++ Library
- libgmp      | secp256k1        | Arbitrary-precision arithmetic (version >= 3.1)
 
 Optional dependencies:
 
@@ -58,7 +57,7 @@ Dependency Build Instructions: Ubuntu & Debian
 ----------------------------------------------
 Build requirements:
 
-	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libgmp-dev
+	sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
 	
 for Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:
 

From 87bddb7a3a83aaad96b5b54b4bac34d8a71b3810 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 4 Dec 2014 19:17:07 +0100
Subject: [PATCH 1160/1819] Squashed 'src/secp256k1/' changes from
 ad2028f..b0210a9

b0210a9 Merge pull request #135
ee3eb4b Fix a memory leak and add a number of small tests.
4d879a3 Merge pull request #134
d5e8362 Merge pull request #127
7b92cf6 Merge pull request #132
0bf70a5 Merge pull request #133
29ae131 Make scalar_add_bit test's overflow detection exact
9048def Avoid undefined shift behaviour
efb7d4b Use constant-time conditional moves instead of byte slicing
d220062 Merge pull request #131
82f9254 Fix typo
601ca04 Merge pull request #129
35399e0 Bugfix: b is restricted, not r
c35ff1e Convert lambda splitter to pure scalar code.
cc604e9 Avoid division when decomposing scalars
ff8746d Add secp256k1_scalar_mul_shift_var
bd313f7 Merge pull request #119
276f987 Merge pull request #124
25d125e Merge pull request #126
24b3c65 Add a test case for ECDSA recomputing infinity
32600e5 Add a test for r >= order signature handling
4d4eeea Make secp256k1_fe_mul_inner use the r != property
be82e92 Require that r and b are different for field multiplication.
597128d Make num optional
659b554 Make constant initializers independent from num
0af5b47 Merge pull request #120
e2e8a36 Merge pull request #117
c76be9e Remove unused num functions
4285a98 Move lambda-splitting code to scalar.
f24041d Switch all EC/ECDSA logic from num to scalar
6794be6 Add scalar splitting functions
d1502eb Add secp256k1_scalar_inverse_var which delegates to GMP
b5c9ee7 Make test_point_times_order test meaningful again
0b73059 Switch wnaf splitting from num-based to scalar-based
1e6c77c Generalize secp256k1_scalar_get_bits
5213207 Add secp256k1_scalar_add_bit
3c0ae43 Merge pull request #122
6e05287 Do signature recovery/verification with 4 possible recid case
e3d692f Explain why no y=0 check is necessary for doubling
f7dc1c6 Optimize doubling: secp256k1 has no y=0 point
666d3b5 Merge pull request #121
2a54f9b Correct typo in comment
9d64145 Merge pull request #114
99f0728 Fix secp256k1_num_set_bin handling of 0
d907ebc Add bounds checking to field element setters
bb2cd94 Merge pull request #116
665775b Don't split the g factor when not using endomorphism
9431d6b Merge pull request #115
e2274c5 build: osx: attempt to work with homebrew keg-only packages

git-subtree-dir: src/secp256k1
git-subtree-split: b0210a95da433e048a11d298efbcc14eb423c95f
---
 .travis.yml                  |   2 +
 Makefile.am                  |   3 +-
 build-aux/m4/bitcoin_secp.m4 |   8 +-
 configure.ac                 |  61 +++-
 include/secp256k1.h          |  12 -
 src/ecdsa.h                  |  14 +-
 src/ecdsa_impl.h             | 180 +++++++-----
 src/eckey.h                  |   5 +-
 src/eckey_impl.h             |  33 +--
 src/ecmult.h                 |   2 +-
 src/ecmult_gen_impl.h        |  19 +-
 src/ecmult_impl.h            |  99 ++++---
 src/field.h                  |  18 +-
 src/field_10x26_impl.h       |  45 ++-
 src/field_5x52_impl.h        |  38 ++-
 src/field_5x52_int128_impl.h |  84 +++---
 src/field_gmp_impl.h         |  21 +-
 src/field_impl.h             |  12 +-
 src/group.h                  |   8 -
 src/group_impl.h             |  86 +-----
 src/num.h                    |  42 +--
 src/num_gmp_impl.h           | 184 ++----------
 src/num_impl.h               |   2 +
 src/scalar.h                 |  41 ++-
 src/scalar_4x64_impl.h       | 102 ++++++-
 src/scalar_8x32_impl.h       | 126 +++++++-
 src/scalar_impl.h            | 152 ++++++++++
 src/secp256k1.c              |  47 ++-
 src/tests.c                  | 551 ++++++++++++++++++++++-------------
 src/util.h                   |  17 ++
 30 files changed, 1241 insertions(+), 773 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 24a86b561b36..3a85e8cba0db 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,8 @@ env:
     - FIELD=64bit     ENDOMORPHISM=yes
     - FIELD=32bit
     - FIELD=32bit     ENDOMORPHISM=yes
+    - BIGNUM=none
+    - BIGNUM=none     ENDOMORPHISM=yes
     - BUILD=distcheck
     - EXTRAFLAGS=CFLAGS=-DDETERMINISTIC
 before_script: ./autogen.sh
diff --git a/Makefile.am b/Makefile.am
index d527da6b77f7..dbf1790f3419 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -68,12 +68,13 @@ bench_sign_LDFLAGS = -static
 bench_inv_SOURCES = src/bench_inv.c
 bench_inv_LDADD = $(COMMON_LIB) $(SECP_LIBS)
 bench_inv_LDFLAGS = -static
+bench_inv_CPPFLAGS = $(SECP_INCLUDES)
 endif
 
 if USE_TESTS
 noinst_PROGRAMS += tests
 tests_SOURCES = src/tests.c
-tests_CPPFLAGS = -DVERIFY $(SECP_TEST_INCLUDES)
+tests_CPPFLAGS = -DVERIFY $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
 tests_LDADD = $(COMMON_LIB) $(SECP_LIBS) $(SECP_TEST_LIBS)
 tests_LDFLAGS = -static
 TESTS = tests
diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4
index e6f3470ed72a..4ca28f99cfac 100644
--- a/build-aux/m4/bitcoin_secp.m4
+++ b/build-aux/m4/bitcoin_secp.m4
@@ -78,7 +78,13 @@ fi
 dnl
 AC_DEFUN([SECP_GMP_CHECK],[
 if test x"$has_gmp" != x"yes"; then
-  AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS=-lgmp; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])])
+  CPPFLAGS_TEMP="$CPPFLAGS"
+  CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
+  LIBS_TEMP="$LIBS"
+  LIBS="$GMP_LIBS $LIBS"
+  AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS="$GMP_LIBS -lgmp"; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])])
+  CPPFLAGS="$CPPFLAGS_TEMP"
+  LIBS="$LIBS_TEMP"
 fi
 if test x"$set_field" = x"gmp" && test x"$has_gmp" != x"yes"; then
     AC_MSG_ERROR([$set_field field support explicitly requested but libgmp was not found])
diff --git a/configure.ac b/configure.ac
index 2da5709834af..6e6fccd7fddc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,10 +33,35 @@ case $host in
 esac
 
 case $host_os in
-  darwin*)
-     CPPFLAGS="$CPPFLAGS -I/opt/local/include"
-     LDFLAGS="$LDFLAGS -L/opt/local/lib"
-     ;;
+  *darwin*)
+     if  test x$cross_compiling != xyes; then
+       AC_PATH_PROG([BREW],brew,)
+       if test x$BREW != x; then
+         dnl These Homebrew packages may be keg-only, meaning that they won't be found
+         dnl in expected paths because they may conflict with system files. Ask
+         dnl Homebrew where each one is located, then adjust paths accordingly.
+
+         openssl_prefix=`$BREW --prefix openssl 2>/dev/null`
+         gmp_prefix=`$BREW --prefix gmp 2>/dev/null`
+         if test x$openssl_prefix != x; then
+           PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
+           export PKG_CONFIG_PATH
+         fi
+         if test x$gmp_prefix != x; then
+           GMP_CPPFLAGS="-I$gmp_prefix/include"
+           GMP_LIBS="-L$gmp_prefix/lib"
+         fi
+       else
+         AC_PATH_PROG([PORT],port,)
+         dnl if homebrew isn't installed and macports is, add the macports default paths
+         dnl as a last resort.
+         if test x$PORT != x; then
+           CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
+           LDFLAGS="$LDFLAGS -L/opt/local/lib"
+         fi
+       fi
+     fi
+   ;;
 esac
 
 CFLAGS="$CFLAGS -W"
@@ -70,7 +95,7 @@ AC_ARG_ENABLE(endomorphism,
 AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|64bit_asm|32bit|auto],
 [Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto])
 
-AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|auto],
+AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|none|auto],
 [Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto])
 
 AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto],
@@ -154,7 +179,7 @@ if test x"$req_bignum" = x"auto"; then
   fi
 
   if test x"$set_bignum" = x; then
-    AC_MSG_ERROR([no working bignum implementation found])
+    set_bignum=none
   fi
 else
   set_bignum=$req_bignum
@@ -162,8 +187,7 @@ else
   gmp)
     SECP_GMP_CHECK
     ;;
-  openssl)
-    SECP_OPENSSL_CHECK
+  none)
     ;;
   *)
     AC_MSG_ERROR([invalid bignum implementation selection])
@@ -196,9 +220,15 @@ esac
 # select bignum implementation
 case $set_bignum in
 gmp)
-  AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])
-  AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation])
-  AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the USE_FIELD_INV_NUM implementation])
+  AC_DEFINE(HAVE_LIBGMP, 1, [Define this symbol if libgmp is installed])
+  AC_DEFINE(USE_NUM_GMP, 1, [Define this symbol to use the gmp implementation for num])
+  AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation])
+  AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation])
+  ;;
+none)
+  AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation])
+  AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation])
+  AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation])
   ;;
 *)
   AC_MSG_ERROR([invalid bignum implementation])
@@ -236,10 +266,11 @@ fi
 
 if test x"$set_field" = x"gmp" || test x"$set_bignum" = x"gmp"; then
   SECP_LIBS="$SECP_LIBS $GMP_LIBS"
+  SECP_INCLUDES="$SECP_INCLUDES $GMP_CPPFLAGS"
 fi
 
 if test x"$use_endomorphism" = x"yes"; then
-  AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism])
+  AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization])
 fi
 
 AC_MSG_NOTICE([Using field implementation: $set_field])
@@ -256,4 +287,10 @@ AC_SUBST(YASM_BINFMT)
 AM_CONDITIONAL([USE_ASM], [test x"$set_field" == x"64bit_asm"])
 AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
 AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" != x"no"])
+
+dnl make sure nothing new is exported so that we don't break the cache
+PKGCONFIG_PATH_TEMP="$PKG_CONFIG_PATH"
+unset PKG_CONFIG_PATH
+PKG_CONFIG_PATH="$PKGCONFIG_PATH_TEMP"
+
 AC_OUTPUT
diff --git a/include/secp256k1.h b/include/secp256k1.h
index 932bf0279fc7..94a6ef483f32 100644
--- a/include/secp256k1.h
+++ b/include/secp256k1.h
@@ -14,18 +14,6 @@ extern "C" {
 #  endif
 # endif
 
-# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
-#  if SECP256K1_GNUC_PREREQ(3,0)
-#   define SECP256K1_RESTRICT __restrict__
-#  elif (defined(_MSC_VER) && _MSC_VER >= 1400)
-#   define SECP256K1_RESTRICT __restrict
-#  else
-#   define SECP256K1_RESTRICT
-#  endif
-# else
-#  define SECP256K1_RESTRICT restrict
-# endif
-
 # if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
 #  if SECP256K1_GNUC_PREREQ(2,7)
 #   define SECP256K1_INLINE __inline__
diff --git a/src/ecdsa.h b/src/ecdsa.h
index 3b1e0484eac6..5fc5230c36c0 100644
--- a/src/ecdsa.h
+++ b/src/ecdsa.h
@@ -7,17 +7,21 @@
 #ifndef _SECP256K1_ECDSA_
 #define _SECP256K1_ECDSA_
 
-#include "num.h"
+#include "scalar.h"
+#include "group.h"
+
+static void secp256k1_ecsda_start(void);
+static void secp256k1_ecdsa_stop(void);
 
 typedef struct {
-    secp256k1_num_t r, s;
+    secp256k1_scalar_t r, s;
 } secp256k1_ecdsa_sig_t;
 
 static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size);
 static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a);
-static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message);
+static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message);
 static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *seckey, const secp256k1_scalar_t *message, const secp256k1_scalar_t *nonce, int *recid);
-static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_num_t *message, int recid);
-static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_num_t *r, const secp256k1_num_t *s);
+static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message, int recid);
+static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *r, const secp256k1_scalar_t *s);
 
 #endif
diff --git a/src/ecdsa_impl.h b/src/ecdsa_impl.h
index 4c05ec39f8e4..a951d0b4adf0 100644
--- a/src/ecdsa_impl.h
+++ b/src/ecdsa_impl.h
@@ -8,13 +8,51 @@
 #ifndef _SECP256K1_ECDSA_IMPL_H_
 #define _SECP256K1_ECDSA_IMPL_H_
 
-#include "num.h"
+#include "scalar.h"
 #include "field.h"
 #include "group.h"
 #include "ecmult.h"
 #include "ecmult_gen.h"
 #include "ecdsa.h"
 
+typedef struct {
+    secp256k1_fe_t order_as_fe;
+    secp256k1_fe_t p_minus_order;
+} secp256k1_ecdsa_consts_t;
+
+static const secp256k1_ecdsa_consts_t *secp256k1_ecdsa_consts = NULL;
+
+static void secp256k1_ecdsa_start(void) {
+    if (secp256k1_ecdsa_consts != NULL)
+        return;
+
+    /* Allocate. */
+    secp256k1_ecdsa_consts_t *ret = (secp256k1_ecdsa_consts_t*)malloc(sizeof(secp256k1_ecdsa_consts_t));
+
+    static const unsigned char order[] = {
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+        0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
+        0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
+    };
+
+    secp256k1_fe_set_b32(&ret->order_as_fe, order);
+    secp256k1_fe_negate(&ret->p_minus_order, &ret->order_as_fe, 1);
+    secp256k1_fe_normalize(&ret->p_minus_order);
+
+    /* Set the global pointer. */
+    secp256k1_ecdsa_consts = ret;
+}
+
+static void secp256k1_ecdsa_stop(void) {
+    if (secp256k1_ecdsa_consts == NULL)
+        return;
+
+    secp256k1_ecdsa_consts_t *c = (secp256k1_ecdsa_consts_t*)secp256k1_ecdsa_consts;
+    secp256k1_ecdsa_consts = NULL;
+    free(c);
+}
+
 static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned char *sig, int size) {
     if (sig[0] != 0x30) return 0;
     int lenr = sig[3];
@@ -26,18 +64,37 @@ static int secp256k1_ecdsa_sig_parse(secp256k1_ecdsa_sig_t *r, const unsigned ch
     if (lenr == 0) return 0;
     if (sig[lenr+4] != 0x02) return 0;
     if (lens == 0) return 0;
-    secp256k1_num_set_bin(&r->r, sig+4, lenr);
-    secp256k1_num_set_bin(&r->s, sig+6+lenr, lens);
+    const unsigned char *sp = sig + 6 + lenr;
+    while (lens > 0 && sp[0] == 0) {
+        lens--;
+        sp++;
+    }
+    if (lens > 32) return 0;
+    const unsigned char *rp = sig + 4;
+    while (lenr > 0 && rp[0] == 0) {
+        lenr--;
+        rp++;
+    }
+    if (lenr > 32) return 0;
+    unsigned char ra[32] = {0}, sa[32] = {0};
+    memcpy(ra + 32 - lenr, rp, lenr);
+    memcpy(sa + 32 - lens, sp, lens);
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&r->r, ra, &overflow);
+    if (overflow) return 0;
+    secp256k1_scalar_set_b32(&r->s, sa, &overflow);
+    if (overflow) return 0;
     return 1;
 }
 
 static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const secp256k1_ecdsa_sig_t *a) {
-    int lenR = (secp256k1_num_bits(&a->r) + 7)/8;
-    if (lenR == 0 || secp256k1_num_get_bit(&a->r, lenR*8-1))
-        lenR++;
-    int lenS = (secp256k1_num_bits(&a->s) + 7)/8;
-    if (lenS == 0 || secp256k1_num_get_bit(&a->s, lenS*8-1))
-        lenS++;
+    unsigned char r[33] = {0}, s[33] = {0};
+    secp256k1_scalar_get_b32(&r[1], &a->r);
+    secp256k1_scalar_get_b32(&s[1], &a->s);
+    unsigned char *rp = r, *sp = s;
+    int lenR = 33, lenS = 33;
+    while (lenR > 1 && rp[0] == 0 && rp[1] < 0x80) { lenR--; rp++; }
+    while (lenS > 1 && sp[0] == 0 && sp[1] < 0x80) { lenS--; sp++; }
     if (*size < 6+lenS+lenR)
         return 0;
     *size = 6 + lenS + lenR;
@@ -45,98 +102,67 @@ static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, int *size, const se
     sig[1] = 4 + lenS + lenR;
     sig[2] = 0x02;
     sig[3] = lenR;
-    secp256k1_num_get_bin(sig+4, lenR, &a->r);
+    memcpy(sig+4, rp, lenR);
     sig[4+lenR] = 0x02;
     sig[5+lenR] = lenS;
-    secp256k1_num_get_bin(sig+lenR+6, lenS, &a->s);
+    memcpy(sig+lenR+6, sp, lenS);
     return 1;
 }
 
-static int secp256k1_ecdsa_sig_recompute(secp256k1_num_t *r2, const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message) {
-    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
-
-    if (secp256k1_num_is_neg(&sig->r) || secp256k1_num_is_neg(&sig->s))
-        return 0;
-    if (secp256k1_num_is_zero(&sig->r) || secp256k1_num_is_zero(&sig->s))
-        return 0;
-    if (secp256k1_num_cmp(&sig->r, &c->order) >= 0 || secp256k1_num_cmp(&sig->s, &c->order) >= 0)
+static int secp256k1_ecdsa_sig_recompute(secp256k1_scalar_t *r2, const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message) {
+    if (secp256k1_scalar_is_zero(&sig->r) || secp256k1_scalar_is_zero(&sig->s))
         return 0;
 
     int ret = 0;
-    secp256k1_num_t sn, u1, u2;
-    secp256k1_num_init(&sn);
-    secp256k1_num_init(&u1);
-    secp256k1_num_init(&u2);
-    secp256k1_num_mod_inverse(&sn, &sig->s, &c->order);
-    secp256k1_num_mod_mul(&u1, &sn, message, &c->order);
-    secp256k1_num_mod_mul(&u2, &sn, &sig->r, &c->order);
+    secp256k1_scalar_t sn, u1, u2;
+    secp256k1_scalar_inverse_var(&sn, &sig->s);
+    secp256k1_scalar_mul(&u1, &sn, message);
+    secp256k1_scalar_mul(&u2, &sn, &sig->r);
     secp256k1_gej_t pubkeyj; secp256k1_gej_set_ge(&pubkeyj, pubkey);
     secp256k1_gej_t pr; secp256k1_ecmult(&pr, &pubkeyj, &u2, &u1);
     if (!secp256k1_gej_is_infinity(&pr)) {
         secp256k1_fe_t xr; secp256k1_gej_get_x_var(&xr, &pr);
         secp256k1_fe_normalize(&xr);
         unsigned char xrb[32]; secp256k1_fe_get_b32(xrb, &xr);
-        secp256k1_num_set_bin(r2, xrb, 32);
-        secp256k1_num_mod(r2, &c->order);
+        secp256k1_scalar_set_b32(r2, xrb, NULL);
         ret = 1;
     }
-    secp256k1_num_free(&sn);
-    secp256k1_num_free(&u1);
-    secp256k1_num_free(&u2);
     return ret;
 }
 
-static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_num_t *message, int recid) {
-    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
-
-    if (secp256k1_num_is_neg(&sig->r) || secp256k1_num_is_neg(&sig->s))
-        return 0;
-    if (secp256k1_num_is_zero(&sig->r) || secp256k1_num_is_zero(&sig->s))
-        return 0;
-    if (secp256k1_num_cmp(&sig->r, &c->order) >= 0 || secp256k1_num_cmp(&sig->s, &c->order) >= 0)
+static int secp256k1_ecdsa_sig_recover(const secp256k1_ecdsa_sig_t *sig, secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message, int recid) {
+    if (secp256k1_scalar_is_zero(&sig->r) || secp256k1_scalar_is_zero(&sig->s))
         return 0;
 
-    secp256k1_num_t rx;
-    secp256k1_num_init(&rx);
-    secp256k1_num_copy(&rx, &sig->r);
+    unsigned char brx[32];
+    secp256k1_scalar_get_b32(brx, &sig->r);
+    secp256k1_fe_t fx;
+    VERIFY_CHECK(secp256k1_fe_set_b32(&fx, brx)); /* brx comes from a scalar, so is less than the order; certainly less than p */
     if (recid & 2) {
-        secp256k1_num_add(&rx, &rx, &c->order);
-        if (secp256k1_num_cmp(&rx, &secp256k1_fe_consts->p) >= 0)
+        if (secp256k1_fe_cmp_var(&fx, &secp256k1_ecdsa_consts->p_minus_order) >= 0)
             return 0;
+        secp256k1_fe_add(&fx, &secp256k1_ecdsa_consts->order_as_fe);
     }
-    unsigned char brx[32];
-    secp256k1_num_get_bin(brx, 32, &rx);
-    secp256k1_num_free(&rx);
-    secp256k1_fe_t fx;
-    secp256k1_fe_set_b32(&fx, brx);
     secp256k1_ge_t x;
     if (!secp256k1_ge_set_xo(&x, &fx, recid & 1))
         return 0;
     secp256k1_gej_t xj;
     secp256k1_gej_set_ge(&xj, &x);
-    secp256k1_num_t rn, u1, u2;
-    secp256k1_num_init(&rn);
-    secp256k1_num_init(&u1);
-    secp256k1_num_init(&u2);
-    secp256k1_num_mod_inverse(&rn, &sig->r, &c->order);
-    secp256k1_num_mod_mul(&u1, &rn, message, &c->order);
-    secp256k1_num_sub(&u1, &c->order, &u1);
-    secp256k1_num_mod_mul(&u2, &rn, &sig->s, &c->order);
+    secp256k1_scalar_t rn, u1, u2;
+    secp256k1_scalar_inverse_var(&rn, &sig->r);
+    secp256k1_scalar_mul(&u1, &rn, message);
+    secp256k1_scalar_negate(&u1, &u1);
+    secp256k1_scalar_mul(&u2, &rn, &sig->s);
     secp256k1_gej_t qj;
     secp256k1_ecmult(&qj, &xj, &u2, &u1);
     secp256k1_ge_set_gej_var(pubkey, &qj);
-    secp256k1_num_free(&rn);
-    secp256k1_num_free(&u1);
-    secp256k1_num_free(&u2);
     return !secp256k1_gej_is_infinity(&qj);
 }
 
-static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_num_t *message) {
-    secp256k1_num_t r2;
-    secp256k1_num_init(&r2);
+static int secp256k1_ecdsa_sig_verify(const secp256k1_ecdsa_sig_t *sig, const secp256k1_ge_t *pubkey, const secp256k1_scalar_t *message) {
+    secp256k1_scalar_t r2;
     int ret = 0;
-    ret = secp256k1_ecdsa_sig_recompute(&r2, sig, pubkey, message) && secp256k1_num_cmp(&sig->r, &r2) == 0;
-    secp256k1_num_free(&r2);
+    ret = secp256k1_ecdsa_sig_recompute(&r2, sig, pubkey, message) && secp256k1_scalar_eq(&sig->r, &r2);
     return ret;
 }
 
@@ -150,34 +176,30 @@ static int secp256k1_ecdsa_sig_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_
     secp256k1_fe_normalize(&r.y);
     secp256k1_fe_get_b32(b, &r.x);
     int overflow = 0;
-    secp256k1_scalar_t sigr;
-    secp256k1_scalar_set_b32(&sigr, b, &overflow);
+    secp256k1_scalar_set_b32(&sig->r, b, &overflow);
     if (recid)
         *recid = (overflow ? 2 : 0) | (secp256k1_fe_is_odd(&r.y) ? 1 : 0);
     secp256k1_scalar_t n;
-    secp256k1_scalar_mul(&n, &sigr, seckey);
+    secp256k1_scalar_mul(&n, &sig->r, seckey);
     secp256k1_scalar_add(&n, &n, message);
-    secp256k1_scalar_t sigs;
-    secp256k1_scalar_inverse(&sigs, nonce);
-    secp256k1_scalar_mul(&sigs, &sigs, &n);
+    secp256k1_scalar_inverse(&sig->s, nonce);
+    secp256k1_scalar_mul(&sig->s, &sig->s, &n);
     secp256k1_scalar_clear(&n);
     secp256k1_gej_clear(&rp);
     secp256k1_ge_clear(&r);
-    if (secp256k1_scalar_is_zero(&sigs))
+    if (secp256k1_scalar_is_zero(&sig->s))
         return 0;
-    if (secp256k1_scalar_is_high(&sigs)) {
-        secp256k1_scalar_negate(&sigs, &sigs);
+    if (secp256k1_scalar_is_high(&sig->s)) {
+        secp256k1_scalar_negate(&sig->s, &sig->s);
         if (recid)
             *recid ^= 1;
     }
-    secp256k1_scalar_get_num(&sig->s, &sigs);
-    secp256k1_scalar_get_num(&sig->r, &sigr);
     return 1;
 }
 
-static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_num_t *r, const secp256k1_num_t *s) {
-    secp256k1_num_copy(&sig->r, r);
-    secp256k1_num_copy(&sig->s, s);
+static void secp256k1_ecdsa_sig_set_rs(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *r, const secp256k1_scalar_t *s) {
+    sig->r = *r;
+    sig->s = *s;
 }
 
 #endif
diff --git a/src/eckey.h b/src/eckey.h
index 024c8b821bc5..6de5dc0a590f 100644
--- a/src/eckey.h
+++ b/src/eckey.h
@@ -9,7 +9,6 @@
 
 #include "group.h"
 #include "scalar.h"
-#include "num.h"
 
 static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size);
 static int secp256k1_eckey_pubkey_serialize(secp256k1_ge_t *elem, unsigned char *pub, int *size, int compressed);
@@ -18,8 +17,8 @@ static int secp256k1_eckey_privkey_parse(secp256k1_scalar_t *key, const unsigned
 static int secp256k1_eckey_privkey_serialize(unsigned char *privkey, int *privkeylen, const secp256k1_scalar_t *key, int compressed);
 
 static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak);
-static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_num_t *tweak);
+static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak);
 static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp256k1_scalar_t *tweak);
-static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_num_t *tweak);
+static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak);
 
 #endif
diff --git a/src/eckey_impl.h b/src/eckey_impl.h
index 290b1f0900e7..0f218ced9e81 100644
--- a/src/eckey_impl.h
+++ b/src/eckey_impl.h
@@ -9,7 +9,7 @@
 
 #include "eckey.h"
 
-#include "num.h"
+#include "scalar.h"
 #include "field.h"
 #include "group.h"
 #include "ecmult_gen.h"
@@ -17,12 +17,12 @@
 static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size) {
     if (size == 33 && (pub[0] == 0x02 || pub[0] == 0x03)) {
         secp256k1_fe_t x;
-        secp256k1_fe_set_b32(&x, pub+1);
-        return secp256k1_ge_set_xo(elem, &x, pub[0] == 0x03);
+        return secp256k1_fe_set_b32(&x, pub+1) && secp256k1_ge_set_xo(elem, &x, pub[0] == 0x03);
     } else if (size == 65 && (pub[0] == 0x04 || pub[0] == 0x06 || pub[0] == 0x07)) {
         secp256k1_fe_t x, y;
-        secp256k1_fe_set_b32(&x, pub+1);
-        secp256k1_fe_set_b32(&y, pub+33);
+        if (!secp256k1_fe_set_b32(&x, pub+1) || !secp256k1_fe_set_b32(&y, pub+33)) {
+            return 0;
+        }
         secp256k1_ge_set_xy(elem, &x, &y);
         if ((pub[0] == 0x06 || pub[0] == 0x07) && secp256k1_fe_is_odd(&y) != (pub[0] == 0x07))
             return 0;
@@ -154,17 +154,12 @@ static int secp256k1_eckey_privkey_tweak_add(secp256k1_scalar_t *key, const secp
     return 1;
 }
 
-static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_num_t *tweak) {
-    if (secp256k1_num_cmp(tweak, &secp256k1_ge_consts->order) >= 0)
-        return 0;
-
+static int secp256k1_eckey_pubkey_tweak_add(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak) {
     secp256k1_gej_t pt;
     secp256k1_gej_set_ge(&pt, key);
-    secp256k1_num_t one;
-    secp256k1_num_init(&one);
-    secp256k1_num_set_int(&one, 1);
+    secp256k1_scalar_t one;
+    secp256k1_scalar_set_int(&one, 1);
     secp256k1_ecmult(&pt, &pt, &one, tweak);
-    secp256k1_num_free(&one);
 
     if (secp256k1_gej_is_infinity(&pt))
         return 0;
@@ -180,19 +175,15 @@ static int secp256k1_eckey_privkey_tweak_mul(secp256k1_scalar_t *key, const secp
     return 1;
 }
 
-static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_num_t *tweak) {
-    if (secp256k1_num_is_zero(tweak))
-        return 0;
-    if (secp256k1_num_cmp(tweak, &secp256k1_ge_consts->order) >= 0)
+static int secp256k1_eckey_pubkey_tweak_mul(secp256k1_ge_t *key, const secp256k1_scalar_t *tweak) {
+    if (secp256k1_scalar_is_zero(tweak))
         return 0;
 
-    secp256k1_num_t zero;
-    secp256k1_num_init(&zero);
-    secp256k1_num_set_int(&zero, 0);
+    secp256k1_scalar_t zero;
+    secp256k1_scalar_set_int(&zero, 0);
     secp256k1_gej_t pt;
     secp256k1_gej_set_ge(&pt, key);
     secp256k1_ecmult(&pt, &pt, tweak, &zero);
-    secp256k1_num_free(&zero);
     secp256k1_ge_set_gej(key, &pt);
     return 1;
 }
diff --git a/src/ecmult.h b/src/ecmult.h
index e3cf18b6807a..15a7100a4a1f 100644
--- a/src/ecmult.h
+++ b/src/ecmult.h
@@ -14,6 +14,6 @@ static void secp256k1_ecmult_start(void);
 static void secp256k1_ecmult_stop(void);
 
 /** Double multiply: R = na*A + ng*G */
-static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_num_t *na, const secp256k1_num_t *ng);
+static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng);
 
 #endif
diff --git a/src/ecmult_gen_impl.h b/src/ecmult_gen_impl.h
index 07859ab04bd3..af0ead522d4a 100644
--- a/src/ecmult_gen_impl.h
+++ b/src/ecmult_gen_impl.h
@@ -23,8 +23,8 @@ typedef struct {
      * precomputed (call it prec(i, n_i)). The formula now becomes sum(prec(i, n_i), i=0..63).
      * None of the resulting prec group elements have a known scalar, and neither do any of
      * the intermediate sums while computing a*G.
-     * To make memory access uniform, the bytes of prec(i, n_i) are sliced per value of n_i. */
-    unsigned char prec[64][sizeof(secp256k1_ge_t)][16]; /* prec[j][k][i] = k'th byte of (16^j * i * G + U_i) */
+     */
+    secp256k1_fe_t prec[64][16][2]; /* prec[j][i] = (16^j * i * G + U_i).{x,y} */
 } secp256k1_ecmult_gen_consts_t;
 
 static const secp256k1_ecmult_gen_consts_t *secp256k1_ecmult_gen_consts = NULL;
@@ -45,7 +45,7 @@ static void secp256k1_ecmult_gen_start(void) {
     {
         static const unsigned char nums_b32[32] = "The scalar for this x is unknown";
         secp256k1_fe_t nums_x;
-        secp256k1_fe_set_b32(&nums_x, nums_b32);
+        VERIFY_CHECK(secp256k1_fe_set_b32(&nums_x, nums_b32));
         secp256k1_ge_t nums_ge;
         VERIFY_CHECK(secp256k1_ge_set_xo(&nums_ge, &nums_x, 0));
         secp256k1_gej_set_ge(&nums_gej, &nums_ge);
@@ -81,9 +81,9 @@ static void secp256k1_ecmult_gen_start(void) {
     }
     for (int j=0; j<64; j++) {
         for (int i=0; i<16; i++) {
-            const unsigned char* raw = (const unsigned char*)(&prec[j*16 + i]);
-            for (size_t k=0; k<sizeof(secp256k1_ge_t); k++)
-                ret->prec[j][k][i] = raw[k];
+            VERIFY_CHECK(!secp256k1_ge_is_infinity(&prec[j*16 + i]));
+            ret->prec[j][i][0] = prec[j*16 + i].x;
+            ret->prec[j][i][1] = prec[j*16 + i].y;
         }
     }
 
@@ -104,11 +104,14 @@ static void secp256k1_ecmult_gen(secp256k1_gej_t *r, const secp256k1_scalar_t *g
     const secp256k1_ecmult_gen_consts_t *c = secp256k1_ecmult_gen_consts;
     secp256k1_gej_set_infinity(r);
     secp256k1_ge_t add;
+    add.infinity = 0;
     int bits;
     for (int j=0; j<64; j++) {
         bits = secp256k1_scalar_get_bits(gn, j * 4, 4);
-        for (size_t k=0; k<sizeof(secp256k1_ge_t); k++)
-            ((unsigned char*)(&add))[k] = c->prec[j][k][bits];
+        for (int i=0; i<16; i++) {
+            secp256k1_fe_cmov(&add.x, &c->prec[j][i][0], i == bits);
+            secp256k1_fe_cmov(&add.y, &c->prec[j][i][1], i == bits);
+        }
         secp256k1_gej_add_ge(r, r, &add);
     }
     bits = 0;
diff --git a/src/ecmult_impl.h b/src/ecmult_impl.h
index 508902564e98..445b81593f89 100644
--- a/src/ecmult_impl.h
+++ b/src/ecmult_impl.h
@@ -7,8 +7,8 @@
 #ifndef _SECP256K1_ECMULT_IMPL_H_
 #define _SECP256K1_ECMULT_IMPL_H_
 
-#include "num.h"
 #include "group.h"
+#include "scalar.h"
 #include "ecmult.h"
 
 /* optimal for 128-bit and 256-bit exponents. */
@@ -16,7 +16,11 @@
 
 /** larger numbers may result in slightly better performance, at the cost of
     exponentially larger precomputed tables. WINDOW_G == 14 results in 640 KiB. */
+#ifdef USE_ENDOMORPHISM
 #define WINDOW_G 14
+#else
+#define WINDOW_G 15
+#endif
 
 /** Fill a table 'pre' with precomputed odd multiples of a. W determines the size of the table.
  *  pre will contains the values [1*a,3*a,5*a,...,(2^(w-1)-1)*a], so it needs place for
@@ -69,7 +73,9 @@ static void secp256k1_ecmult_table_precomp_ge_var(secp256k1_ge_t *pre, const sec
 typedef struct {
     /* For accelerating the computation of a*P + b*G: */
     secp256k1_ge_t pre_g[ECMULT_TABLE_SIZE(WINDOW_G)];    /* odd multiples of the generator */
+#ifdef USE_ENDOMORPHISM
     secp256k1_ge_t pre_g_128[ECMULT_TABLE_SIZE(WINDOW_G)]; /* odd multiples of 2^128*generator */
+#endif
 } secp256k1_ecmult_consts_t;
 
 static const secp256k1_ecmult_consts_t *secp256k1_ecmult_consts = NULL;
@@ -85,14 +91,18 @@ static void secp256k1_ecmult_start(void) {
     const secp256k1_ge_t *g = &secp256k1_ge_consts->g;
     secp256k1_gej_t gj; secp256k1_gej_set_ge(&gj, g);
 
+#ifdef USE_ENDOMORPHISM
     /* calculate 2^128*generator */
     secp256k1_gej_t g_128j = gj;
     for (int i=0; i<128; i++)
         secp256k1_gej_double_var(&g_128j, &g_128j);
+#endif
 
     /* precompute the tables with odd multiples */
     secp256k1_ecmult_table_precomp_ge_var(ret->pre_g, &gj, WINDOW_G);
+#ifdef USE_ENDOMORPHISM
     secp256k1_ecmult_table_precomp_ge_var(ret->pre_g_128, &g_128j, WINDOW_G);
+#endif
 
     /* Set the global pointer to the precomputation table. */
     secp256k1_ecmult_consts = ret;
@@ -111,56 +121,62 @@ static void secp256k1_ecmult_stop(void) {
  *  with the following guarantees:
  *  - each wnaf[i] is either 0, or an odd integer between -(1<<(w-1) - 1) and (1<<(w-1) - 1)
  *  - two non-zero entries in wnaf are separated by at least w-1 zeroes.
- *  - the index of the highest non-zero entry in wnaf (=return value-1) is at most bits, where
- *    bits is the number of bits necessary to represent the absolute value of the input.
+ *  - the number of set values in wnaf is returned. This number is at most 256, and at most one more
+ *  - than the number of bits in the (absolute value) of the input.
  */
-static int secp256k1_ecmult_wnaf(int *wnaf, const secp256k1_num_t *a, int w) {
-    int ret = 0;
-    int zeroes = 0;
-    secp256k1_num_t x;
-    secp256k1_num_copy(&x, a);
+static int secp256k1_ecmult_wnaf(int *wnaf, const secp256k1_scalar_t *a, int w) {
+    secp256k1_scalar_t s = *a;
+
     int sign = 1;
-    if (secp256k1_num_is_neg(&x)) {
+    if (secp256k1_scalar_get_bits(&s, 255, 1)) {
+        secp256k1_scalar_negate(&s, &s);
         sign = -1;
-        secp256k1_num_negate(&x);
     }
-    while (!secp256k1_num_is_zero(&x)) {
-        while (!secp256k1_num_is_odd(&x)) {
-            zeroes++;
-            secp256k1_num_shift(&x, 1);
+
+    int set_bits = 0;
+    int bit = 0;
+    while (bit < 256) {
+        if (secp256k1_scalar_get_bits(&s, bit, 1) == 0) {
+            bit++;
+            continue;
+        }
+        while (set_bits < bit) {
+            wnaf[set_bits++] = 0;
         }
-        int word = secp256k1_num_shift(&x, w);
-        while (zeroes) {
-            wnaf[ret++] = 0;
-            zeroes--;
+        int now = w;
+        if (bit + now > 256) {
+            now = 256 - bit;
         }
+        int word = secp256k1_scalar_get_bits_var(&s, bit, now);
         if (word & (1 << (w-1))) {
-            secp256k1_num_inc(&x);
-            wnaf[ret++] = sign * (word - (1 << w));
+            secp256k1_scalar_add_bit(&s, bit + w);
+            wnaf[set_bits++] = sign * (word - (1 << w));
         } else {
-            wnaf[ret++] = sign * word;
+            wnaf[set_bits++] = sign * word;
         }
-        zeroes = w-1;
+        bit += now;
     }
-    return ret;
+    return set_bits;
 }
 
-static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_num_t *na, const secp256k1_num_t *ng) {
+static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng) {
     const secp256k1_ecmult_consts_t *c = secp256k1_ecmult_consts;
 
 #ifdef USE_ENDOMORPHISM
-    secp256k1_num_t na_1, na_lam;
+    secp256k1_scalar_t na_1, na_lam;
     /* split na into na_1 and na_lam (where na = na_1 + na_lam*lambda, and na_1 and na_lam are ~128 bit) */
-    secp256k1_gej_split_exp_var(&na_1, &na_lam, na);
+    secp256k1_scalar_split_lambda_var(&na_1, &na_lam, na);
 
     /* build wnaf representation for na_1 and na_lam. */
-    int wnaf_na_1[129];   int bits_na_1   = secp256k1_ecmult_wnaf(wnaf_na_1,   &na_1,   WINDOW_A);
-    int wnaf_na_lam[129]; int bits_na_lam = secp256k1_ecmult_wnaf(wnaf_na_lam, &na_lam, WINDOW_A);
+    int wnaf_na_1[130];   int bits_na_1   = secp256k1_ecmult_wnaf(wnaf_na_1,   &na_1,   WINDOW_A);
+    int wnaf_na_lam[130]; int bits_na_lam = secp256k1_ecmult_wnaf(wnaf_na_lam, &na_lam, WINDOW_A);
+    VERIFY_CHECK(bits_na_1 <= 130);
+    VERIFY_CHECK(bits_na_lam <= 130);
     int bits = bits_na_1;
     if (bits_na_lam > bits) bits = bits_na_lam;
 #else
     /* build wnaf representation for na. */
-    int wnaf_na[257];     int bits_na     = secp256k1_ecmult_wnaf(wnaf_na,     na,      WINDOW_A);
+    int wnaf_na[256];     int bits_na     = secp256k1_ecmult_wnaf(wnaf_na,     na,      WINDOW_A);
     int bits = bits_na;
 #endif
 
@@ -172,19 +188,22 @@ static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const
     secp256k1_gej_t pre_a_lam[ECMULT_TABLE_SIZE(WINDOW_A)];
     for (int i=0; i<ECMULT_TABLE_SIZE(WINDOW_A); i++)
         secp256k1_gej_mul_lambda(&pre_a_lam[i], &pre_a[i]);
-#endif
 
     /* Splitted G factors. */
-    secp256k1_num_t ng_1, ng_128;
+    secp256k1_scalar_t ng_1, ng_128;
 
     /* split ng into ng_1 and ng_128 (where gn = gn_1 + gn_128*2^128, and gn_1 and gn_128 are ~128 bit) */
-    secp256k1_num_split(&ng_1, &ng_128, ng, 128);
+    secp256k1_scalar_split_128(&ng_1, &ng_128, ng);
 
     /* Build wnaf representation for ng_1 and ng_128 */
     int wnaf_ng_1[129];   int bits_ng_1   = secp256k1_ecmult_wnaf(wnaf_ng_1,   &ng_1,   WINDOW_G);
     int wnaf_ng_128[129]; int bits_ng_128 = secp256k1_ecmult_wnaf(wnaf_ng_128, &ng_128, WINDOW_G);
     if (bits_ng_1 > bits) bits = bits_ng_1;
     if (bits_ng_128 > bits) bits = bits_ng_128;
+#else
+    int wnaf_ng[257];     int bits_ng     = secp256k1_ecmult_wnaf(wnaf_ng,     ng,      WINDOW_G);
+    if (bits_ng > bits) bits = bits_ng;
+#endif
 
     secp256k1_gej_set_infinity(r);
     secp256k1_gej_t tmpj;
@@ -202,12 +221,6 @@ static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const
             ECMULT_TABLE_GET_GEJ(&tmpj, pre_a_lam, n, WINDOW_A);
             secp256k1_gej_add_var(r, r, &tmpj);
         }
-#else
-        if (i < bits_na && (n = wnaf_na[i])) {
-            ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A);
-            secp256k1_gej_add_var(r, r, &tmpj);
-        }
-#endif
         if (i < bits_ng_1 && (n = wnaf_ng_1[i])) {
             ECMULT_TABLE_GET_GE(&tmpa, c->pre_g, n, WINDOW_G);
             secp256k1_gej_add_ge_var(r, r, &tmpa);
@@ -216,6 +229,16 @@ static void secp256k1_ecmult(secp256k1_gej_t *r, const secp256k1_gej_t *a, const
             ECMULT_TABLE_GET_GE(&tmpa, c->pre_g_128, n, WINDOW_G);
             secp256k1_gej_add_ge_var(r, r, &tmpa);
         }
+#else
+        if (i < bits_na && (n = wnaf_na[i])) {
+            ECMULT_TABLE_GET_GEJ(&tmpj, pre_a, n, WINDOW_A);
+            secp256k1_gej_add_var(r, r, &tmpj);
+        }
+        if (i < bits_ng && (n = wnaf_ng[i])) {
+            ECMULT_TABLE_GET_GE(&tmpa, c->pre_g, n, WINDOW_G);
+            secp256k1_gej_add_ge_var(r, r, &tmpa);
+        }
+#endif
     }
 }
 
diff --git a/src/field.h b/src/field.h
index c7feead900ec..0cdf0fb47924 100644
--- a/src/field.h
+++ b/src/field.h
@@ -33,7 +33,10 @@
 #endif
 
 typedef struct {
+#ifndef USE_NUM_NONE
     secp256k1_num_t p;
+#endif
+    secp256k1_fe_t order;
 } secp256k1_fe_consts_t;
 
 static const secp256k1_fe_consts_t *secp256k1_fe_consts = NULL;
@@ -59,8 +62,11 @@ static int secp256k1_fe_is_odd(const secp256k1_fe_t *a);
 /** Compare two field elements. Requires both inputs to be normalized */
 static int secp256k1_fe_equal(const secp256k1_fe_t *a, const secp256k1_fe_t *b);
 
-/** Set a field element equal to 32-byte big endian value. Resulting field element is normalized. */
-static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a);
+/** Compare two field elements. Requires both inputs to be normalized */
+static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b);
+
+/** Set a field element equal to 32-byte big endian value. If succesful, the resulting field element is normalized. */
+static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a);
 
 /** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
 static void secp256k1_fe_get_b32(unsigned char *r, const secp256k1_fe_t *a);
@@ -78,7 +84,7 @@ static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1_fe_t *a);
 
 /** Sets a field element to be the product of two others. Requires the inputs' magnitudes to be at most 8.
  *  The output magnitude is 1 (but not guaranteed to be normalized). */
-static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b);
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b);
 
 /** Sets a field element to be the square of another. Requires the input's magnitude to be at most 8.
  *  The output magnitude is 1 (but not guaranteed to be normalized). */
@@ -104,11 +110,13 @@ static void secp256k1_fe_inv_all(size_t len, secp256k1_fe_t r[len], const secp25
 /** Potentially faster version of secp256k1_fe_inv_all, without constant-time guarantee. */
 static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t r[len], const secp256k1_fe_t a[len]);
 
-
 /** Convert a field element to a hexadecimal string. */
 static void secp256k1_fe_get_hex(char *r, int *rlen, const secp256k1_fe_t *a);
 
 /** Convert a hexadecimal string to a field element. */
-static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen);
+static int secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen);
+
+/** If flag is true, set *r equal to *a; otherwise leave it. Constant-time. */
+static void secp256k1_fe_cmov(secp256k1_fe_t *r, const secp256k1_fe_t *a, int flag);
 
 #endif
diff --git a/src/field_10x26_impl.h b/src/field_10x26_impl.h
index c0f1be0b2d80..c4403fba22de 100644
--- a/src/field_10x26_impl.h
+++ b/src/field_10x26_impl.h
@@ -152,7 +152,21 @@ SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const se
           | (t[5]^u[5]) | (t[6]^u[6]) | (t[7]^u[7]) | (t[8]^u[8]) | (t[9]^u[9])) == 0;
 }
 
-static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    VERIFY_CHECK(b->normalized);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    for (int i = 9; i >= 0; i--) {
+        if (a->n[i] > b->n[i]) return 1;
+        if (a->n[i] < b->n[i]) return -1;
+    }
+    return 0;
+}
+
+static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
     r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
     r->n[5] = r->n[6] = r->n[7] = r->n[8] = r->n[9] = 0;
     for (int i=0; i<32; i++) {
@@ -162,11 +176,15 @@ static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
             r->n[limb] |= (uint32_t)((a[31-i] >> (2*j)) & 0x3) << shift;
         }
     }
+    if (r->n[9] == 0x3FFFFFUL && (r->n[8] & r->n[7] & r->n[6] & r->n[5] & r->n[4] & r->n[3] & r->n[2]) == 0x3FFFFFFUL && (r->n[1] + 0x40UL + ((r->n[0] + 0x3D1UL) >> 26)) > 0x3FFFFFFUL) {
+        return 0;
+    }
 #ifdef VERIFY
     r->magnitude = 1;
     r->normalized = 1;
     secp256k1_fe_verify(r);
 #endif
+    return 1;
 }
 
 /** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
@@ -253,7 +271,7 @@ SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1
 #define VERIFY_BITS(x, n) do { } while(0)
 #endif
 
-SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint32_t *a, const uint32_t *b, uint32_t *r) {
+SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint32_t *a, const uint32_t * SECP256K1_RESTRICT b, uint32_t *r) {
     VERIFY_BITS(a[0], 30);
     VERIFY_BITS(a[1], 30);
     VERIFY_BITS(a[2], 30);
@@ -853,12 +871,13 @@ SECP256K1_INLINE static void secp256k1_fe_sqr_inner(const uint32_t *a, uint32_t
 }
 
 
-static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b) {
 #ifdef VERIFY
     VERIFY_CHECK(a->magnitude <= 8);
     VERIFY_CHECK(b->magnitude <= 8);
     secp256k1_fe_verify(a);
     secp256k1_fe_verify(b);
+    VERIFY_CHECK(r != b);
 #endif
     secp256k1_fe_mul_inner(a->n, b->n, r->n);
 #ifdef VERIFY
@@ -881,4 +900,24 @@ static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
 #endif
 }
 
+static void secp256k1_fe_cmov(secp256k1_fe_t *r, const secp256k1_fe_t *a, int flag) {
+    uint32_t mask0 = flag + ~((uint32_t)0), mask1 = ~mask0;
+    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
+    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
+    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
+    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
+    r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1);
+    r->n[5] = (r->n[5] & mask0) | (a->n[5] & mask1);
+    r->n[6] = (r->n[6] & mask0) | (a->n[6] & mask1);
+    r->n[7] = (r->n[7] & mask0) | (a->n[7] & mask1);
+    r->n[8] = (r->n[8] & mask0) | (a->n[8] & mask1);
+    r->n[9] = (r->n[9] & mask0) | (a->n[9] & mask1);
+#ifdef VERIFY
+    if (flag) {
+        r->magnitude = a->magnitude;
+        r->normalized = a->normalized;
+    }
+#endif
+}
+
 #endif
diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h
index d1b06d05a480..75b210eaf688 100644
--- a/src/field_5x52_impl.h
+++ b/src/field_5x52_impl.h
@@ -150,7 +150,21 @@ SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const se
     return ((t[0]^u[0]) | (t[1]^u[1]) | (t[2]^u[2]) | (t[3]^u[3]) | (t[4]^u[4])) == 0;
 }
 
-static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+#ifdef VERIFY
+    VERIFY_CHECK(a->normalized);
+    VERIFY_CHECK(b->normalized);
+    secp256k1_fe_verify(a);
+    secp256k1_fe_verify(b);
+#endif
+    for (int i = 4; i >= 0; i--) {
+        if (a->n[i] > b->n[i]) return 1;
+        if (a->n[i] < b->n[i]) return -1;
+    }
+    return 0;
+}
+
+static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
     r->n[0] = r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
     for (int i=0; i<32; i++) {
         for (int j=0; j<2; j++) {
@@ -159,11 +173,15 @@ static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
             r->n[limb] |= (uint64_t)((a[31-i] >> (4*j)) & 0xF) << shift;
         }
     }
+    if (r->n[4] == 0x0FFFFFFFFFFFFULL && (r->n[3] & r->n[2] & r->n[1]) == 0xFFFFFFFFFFFFFULL && r->n[0] >= 0xFFFFEFFFFFC2FULL) {
+        return 0;
+    }
 #ifdef VERIFY
     r->magnitude = 1;
     r->normalized = 1;
     secp256k1_fe_verify(r);
 #endif
+    return 1;
 }
 
 /** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
@@ -229,12 +247,13 @@ SECP256K1_INLINE static void secp256k1_fe_add(secp256k1_fe_t *r, const secp256k1
 #endif
 }
 
-static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b) {
 #ifdef VERIFY
     VERIFY_CHECK(a->magnitude <= 8);
     VERIFY_CHECK(b->magnitude <= 8);
     secp256k1_fe_verify(a);
     secp256k1_fe_verify(b);
+    VERIFY_CHECK(r != b);
 #endif
     secp256k1_fe_mul_inner(a->n, b->n, r->n);
 #ifdef VERIFY
@@ -257,4 +276,19 @@ static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
 #endif
 }
 
+static void secp256k1_fe_cmov(secp256k1_fe_t *r, const secp256k1_fe_t *a, int flag) {
+    uint64_t mask0 = flag + ~((uint64_t)0), mask1 = ~mask0;
+    r->n[0] = (r->n[0] & mask0) | (a->n[0] & mask1);
+    r->n[1] = (r->n[1] & mask0) | (a->n[1] & mask1);
+    r->n[2] = (r->n[2] & mask0) | (a->n[2] & mask1);
+    r->n[3] = (r->n[3] & mask0) | (a->n[3] & mask1);
+    r->n[4] = (r->n[4] & mask0) | (a->n[4] & mask1);
+#ifdef VERIFY
+    if (flag) {
+        r->magnitude = a->magnitude;
+        r->normalized = a->normalized;
+    }
+#endif
+}
+
 #endif
diff --git a/src/field_5x52_int128_impl.h b/src/field_5x52_int128_impl.h
index c47642867247..e552fb4319ef 100644
--- a/src/field_5x52_int128_impl.h
+++ b/src/field_5x52_int128_impl.h
@@ -15,7 +15,7 @@
 #define VERIFY_BITS(x, n) do { } while(0)
 #endif
 
-SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uint64_t *b, uint64_t *r) {
+SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uint64_t * SECP256K1_RESTRICT b, uint64_t *r) {
     VERIFY_BITS(a[0], 56);
     VERIFY_BITS(a[1], 56);
     VERIFY_BITS(a[2], 56);
@@ -26,6 +26,7 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uin
     VERIFY_BITS(b[2], 56);
     VERIFY_BITS(b[3], 56);
     VERIFY_BITS(b[4], 52);
+    VERIFY_CHECK(r != b);
 
     const uint64_t M = 0xFFFFFFFFFFFFFULL, R = 0x1000003D10ULL;
     /*  [... a b c] is a shorthand for ... + a<<104 + b<<52 + c<<0 mod n.
@@ -33,15 +34,17 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uin
      *  Note that [x 0 0 0 0 0] = [x*R].
      */
 
+    uint64_t a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4];
+
     __int128 c, d;
 
-    d  = (__int128)a[0] * b[3]
-       + (__int128)a[1] * b[2]
-       + (__int128)a[2] * b[1]
-       + (__int128)a[3] * b[0];
+    d  = (__int128)a0 * b[3]
+       + (__int128)a1 * b[2]
+       + (__int128)a2 * b[1]
+       + (__int128)a3 * b[0];
     VERIFY_BITS(d, 114);
     /* [d 0 0 0] = [p3 0 0 0] */
-    c  = (__int128)a[4] * b[4];
+    c  = (__int128)a4 * b[4];
     VERIFY_BITS(c, 112);
     /* [c 0 0 0 0 d 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
     d += (c & M) * R; c >>= 52;
@@ -53,11 +56,11 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uin
     VERIFY_BITS(d, 63);
     /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 0 p3 0 0 0] */
 
-    d += (__int128)a[0] * b[4]
-       + (__int128)a[1] * b[3]
-       + (__int128)a[2] * b[2]
-       + (__int128)a[3] * b[1]
-       + (__int128)a[4] * b[0];
+    d += (__int128)a0 * b[4]
+       + (__int128)a1 * b[3]
+       + (__int128)a2 * b[2]
+       + (__int128)a3 * b[1]
+       + (__int128)a4 * b[0];
     VERIFY_BITS(d, 115);
     /* [c 0 0 0 0 d t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
     d += c * R;
@@ -72,13 +75,13 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uin
     VERIFY_BITS(t4, 48);
     /* [d t4+(tx<<48) t3 0 0 0] = [p8 0 0 0 p4 p3 0 0 0] */
 
-    c  = (__int128)a[0] * b[0];
+    c  = (__int128)a0 * b[0];
     VERIFY_BITS(c, 112);
     /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 0 p4 p3 0 0 p0] */
-    d += (__int128)a[1] * b[4]
-       + (__int128)a[2] * b[3]
-       + (__int128)a[3] * b[2]
-       + (__int128)a[4] * b[1];
+    d += (__int128)a1 * b[4]
+       + (__int128)a2 * b[3]
+       + (__int128)a3 * b[2]
+       + (__int128)a4 * b[1];
     VERIFY_BITS(d, 115);
     /* [d t4+(tx<<48) t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
     uint64_t u0 = d & M; d >>= 52;
@@ -92,48 +95,43 @@ SECP256K1_INLINE static void secp256k1_fe_mul_inner(const uint64_t *a, const uin
     c += (__int128)u0 * (R >> 4);
     VERIFY_BITS(c, 115);
     /* [d 0 t4 t3 0 0 c] = [p8 0 0 p5 p4 p3 0 0 p0] */
-    uint64_t t0 = c & M; c >>= 52;
-    VERIFY_BITS(t0, 52);
+    r[0] = c & M; c >>= 52;
+    VERIFY_BITS(r[0], 52);
     VERIFY_BITS(c, 61);
-    /* [d 0 t4 t3 0 c t0] = [p8 0 0 p5 p4 p3 0 0 p0] */
+    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 0 p0] */
 
-    c += (__int128)a[0] * b[1]
-       + (__int128)a[1] * b[0];
+    c += (__int128)a0 * b[1]
+       + (__int128)a1 * b[0];
     VERIFY_BITS(c, 114);
-    /* [d 0 t4 t3 0 c t0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
-    d += (__int128)a[2] * b[4]
-       + (__int128)a[3] * b[3]
-       + (__int128)a[4] * b[2];
+    /* [d 0 t4 t3 0 c r0] = [p8 0 0 p5 p4 p3 0 p1 p0] */
+    d += (__int128)a2 * b[4]
+       + (__int128)a3 * b[3]
+       + (__int128)a4 * b[2];
     VERIFY_BITS(d, 114);
-    /* [d 0 t4 t3 0 c t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    /* [d 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
     c += (d & M) * R; d >>= 52;
     VERIFY_BITS(c, 115);
     VERIFY_BITS(d, 62);
-    /* [d 0 0 t4 t3 0 c t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
-    uint64_t t1 = c & M; c >>= 52;
-    VERIFY_BITS(t1, 52);
+    /* [d 0 0 t4 t3 0 c r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    r[1] = c & M; c >>= 52;
+    VERIFY_BITS(r[1], 52);
     VERIFY_BITS(c, 63);
-    /* [d 0 0 t4 t3 c t1 t0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
+    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 0 p1 p0] */
 
-    c += (__int128)a[0] * b[2]
-       + (__int128)a[1] * b[1]
-       + (__int128)a[2] * b[0];
+    c += (__int128)a0 * b[2]
+       + (__int128)a1 * b[1]
+       + (__int128)a2 * b[0];
     VERIFY_BITS(c, 114);
-    /* [d 0 0 t4 t3 c t1 t0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
-    d += (__int128)a[3] * b[4]
-       + (__int128)a[4] * b[3];
+    /* [d 0 0 t4 t3 c r1 r0] = [p8 0 p6 p5 p4 p3 p2 p1 p0] */
+    d += (__int128)a3 * b[4]
+       + (__int128)a4 * b[3];
     VERIFY_BITS(d, 114);
-    /* [d 0 0 t4 t3 c t1 t0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
     c += (d & M) * R; d >>= 52;
     VERIFY_BITS(c, 115);
     VERIFY_BITS(d, 62);
-    /* [d 0 0 0 t4 t3 c t1 t0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
+    /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
 
-    r[0] = t0;
-    VERIFY_BITS(r[0], 52);
-    /* [d 0 0 0 t4 t3 c t1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
-    r[1] = t1;
-    VERIFY_BITS(r[1], 52);
     /* [d 0 0 0 t4 t3 c r1 r0] = [p8 p7 p6 p5 p4 p3 p2 p1 p0] */
     r[2] = c & M; c >>= 52;
     VERIFY_BITS(r[2], 52);
diff --git a/src/field_gmp_impl.h b/src/field_gmp_impl.h
index af4728e5b4d1..8af7dd68f8e8 100644
--- a/src/field_gmp_impl.h
+++ b/src/field_gmp_impl.h
@@ -75,7 +75,15 @@ SECP256K1_INLINE static int secp256k1_fe_equal(const secp256k1_fe_t *a, const se
     return ret;
 }
 
-static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
+SECP256K1_INLINE static int secp256k1_fe_cmp_var(const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+    for (int i=FIELD_LIMBS; i>=0; i--) {
+        if (a->n[i] > b->n[i]) return 1;
+        if (a->n[i] < b->n[i]) return -1;
+    }
+    return 0;
+}
+
+static int secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
     for (int i=0; i<FIELD_LIMBS+1; i++)
         r->n[i] = 0;
     for (int i=0; i<256; i++) {
@@ -83,6 +91,7 @@ static void secp256k1_fe_set_b32(secp256k1_fe_t *r, const unsigned char *a) {
         int shift = i%GMP_NUMB_BITS;
         r->n[limb] |= (mp_limb_t)((a[31-i/8] >> (i%8)) & 0x1) << shift;
     }
+    return (mpn_cmp(r->n, secp256k1_field_p, FIELD_LIMBS) < 0);
 }
 
 /** Convert a field element to a 32-byte big endian value. Requires the input to be normalized */
@@ -142,7 +151,8 @@ static void secp256k1_fe_reduce(secp256k1_fe_t *r, mp_limb_t *tmp) {
     r->n[FIELD_LIMBS] = mpn_add(r->n, tmp, FIELD_LIMBS, q, 1+(33+GMP_NUMB_BITS-1)/GMP_NUMB_BITS);
 }
 
-static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t *b) {
+static void secp256k1_fe_mul(secp256k1_fe_t *r, const secp256k1_fe_t *a, const secp256k1_fe_t * SECP256K1_RESTRICT b) {
+    VERIFY_CHECK(r != b);
     secp256k1_fe_t ac = *a;
     secp256k1_fe_t bc = *b;
     secp256k1_fe_normalize(&ac);
@@ -160,4 +170,11 @@ static void secp256k1_fe_sqr(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
     secp256k1_fe_reduce(r, tmp);
 }
 
+static void secp256k1_fe_cmov(secp256k1_fe_t *r, const secp256k1_fe_t *a, int flag) {
+    mp_limb_t mask0 = flag + ~((mp_limb_t)0), mask1 = ~mask0;
+    for (int i = 0; i <= FIELD_LIMBS; i++) {
+        r->n[i] = (r->n[i] & mask0) | (a->n[i] & mask1);
+    }
+}
+
 #endif
diff --git a/src/field_impl.h b/src/field_impl.h
index 3a31e1844e85..4d25e5371526 100644
--- a/src/field_impl.h
+++ b/src/field_impl.h
@@ -41,7 +41,7 @@ static void secp256k1_fe_get_hex(char *r, int *rlen, const secp256k1_fe_t *a) {
     r[64] = 0x00;
 }
 
-static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
+static int secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
     unsigned char tmp[32] = {};
     static const int cvt[256] = {0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
                                  0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
@@ -63,7 +63,7 @@ static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
         if (alen > i*2)
             tmp[32 - alen/2 + i] = (cvt[(unsigned char)a[2*i]] << 4) + cvt[(unsigned char)a[2*i+1]];
     }
-    secp256k1_fe_set_b32(r, tmp);
+    return secp256k1_fe_set_b32(r, tmp);
 }
 
 static int secp256k1_fe_sqrt(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
@@ -197,7 +197,7 @@ static void secp256k1_fe_inv(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
     for (int j=0; j<3; j++) secp256k1_fe_sqr(&t1, &t1);
     secp256k1_fe_mul(&t1, &t1, &x2);
     for (int j=0; j<2; j++) secp256k1_fe_sqr(&t1, &t1);
-    secp256k1_fe_mul(r, &t1, a);
+    secp256k1_fe_mul(r, a, &t1);
 }
 
 static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
@@ -212,7 +212,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
     secp256k1_num_set_bin(&n, b, 32);
     secp256k1_num_mod_inverse(&n, &n, &secp256k1_fe_consts->p);
     secp256k1_num_get_bin(b, 32, &n);
-    secp256k1_fe_set_b32(r, b);
+    VERIFY_CHECK(secp256k1_fe_set_b32(r, b));
 #else
 #error "Please select field inverse implementation"
 #endif
@@ -267,16 +267,20 @@ static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe_t r[len], const se
 }
 
 static void secp256k1_fe_start(void) {
+#ifndef USE_NUM_NONE
     static const unsigned char secp256k1_fe_consts_p[] = {
         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
         0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
         0xFF,0xFF,0xFF,0xFE,0xFF,0xFF,0xFC,0x2F
     };
+#endif
     if (secp256k1_fe_consts == NULL) {
         secp256k1_fe_inner_start();
         secp256k1_fe_consts_t *ret = (secp256k1_fe_consts_t*)malloc(sizeof(secp256k1_fe_consts_t));
+#ifndef USE_NUM_NONE
         secp256k1_num_set_bin(&ret->p, secp256k1_fe_consts_p, sizeof(secp256k1_fe_consts_p));
+#endif
         secp256k1_fe_consts = ret;
     }
 }
diff --git a/src/group.h b/src/group.h
index ba0254982113..0f14bd25f309 100644
--- a/src/group.h
+++ b/src/group.h
@@ -27,14 +27,11 @@ typedef struct {
 
 /** Global constants related to the group */
 typedef struct {
-    secp256k1_num_t order; /* the order of the curve (= order of its generator) */
-    secp256k1_num_t half_order; /* half the order of the curve (= order of its generator) */
     secp256k1_ge_t g; /* the generator point */
 
 #ifdef USE_ENDOMORPHISM
     /* constants related to secp256k1's efficiently computable endomorphism */
     secp256k1_fe_t beta;
-    secp256k1_num_t lambda, a1b2, b1, a2;
 #endif
 } secp256k1_ge_consts_t;
 
@@ -112,10 +109,6 @@ static void secp256k1_gej_get_hex(char *r, int *rlen, const secp256k1_gej_t *a);
 #ifdef USE_ENDOMORPHISM
 /** Set r to be equal to lambda times a, where lambda is chosen in a way such that this is very fast. */
 static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *a);
-
-/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (given that a is
-    not more than 256 bits). */
-static void secp256k1_gej_split_exp_var(secp256k1_num_t *r1, secp256k1_num_t *r2, const secp256k1_num_t *a);
 #endif
 
 /** Clear a secp256k1_gej_t to prevent leaking sensitive information. */
@@ -124,5 +117,4 @@ static void secp256k1_gej_clear(secp256k1_gej_t *r);
 /** Clear a secp256k1_ge_t to prevent leaking sensitive information. */
 static void secp256k1_ge_clear(secp256k1_ge_t *r);
 
-
 #endif
diff --git a/src/group_impl.h b/src/group_impl.h
index 1edbc6e09940..cbd0d8c4fc61 100644
--- a/src/group_impl.h
+++ b/src/group_impl.h
@@ -208,29 +208,25 @@ static int secp256k1_ge_is_valid(const secp256k1_ge_t *a) {
 }
 
 static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *a) {
-    if (a->infinity) {
-        r->infinity = 1;
-        return;
-    }
-
-    secp256k1_fe_t t5 = a->y;
-    secp256k1_fe_normalize(&t5);
-    if (secp256k1_fe_is_zero(&t5)) {
-        r->infinity = 1;
+    // For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity,
+    // Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have
+    // y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p.
+    r->infinity = a->infinity;
+    if (r->infinity) {
         return;
     }
 
     secp256k1_fe_t t1,t2,t3,t4;
-    secp256k1_fe_mul(&r->z, &t5, &a->z);
+    secp256k1_fe_mul(&r->z, &a->z, &a->y);
     secp256k1_fe_mul_int(&r->z, 2);       /* Z' = 2*Y*Z (2) */
     secp256k1_fe_sqr(&t1, &a->x);
     secp256k1_fe_mul_int(&t1, 3);         /* T1 = 3*X^2 (3) */
     secp256k1_fe_sqr(&t2, &t1);           /* T2 = 9*X^4 (1) */
-    secp256k1_fe_sqr(&t3, &t5);
+    secp256k1_fe_sqr(&t3, &a->y);
     secp256k1_fe_mul_int(&t3, 2);         /* T3 = 2*Y^2 (2) */
     secp256k1_fe_sqr(&t4, &t3);
     secp256k1_fe_mul_int(&t4, 2);         /* T4 = 8*Y^4 (2) */
-    secp256k1_fe_mul(&t3, &a->x, &t3);    /* T3 = 2*X*Y^2 (1) */
+    secp256k1_fe_mul(&t3, &t3, &a->x);    /* T3 = 2*X*Y^2 (1) */
     r->x = t3;
     secp256k1_fe_mul_int(&r->x, 4);       /* X' = 8*X*Y^2 (4) */
     secp256k1_fe_negate(&r->x, &r->x, 4); /* X' = -8*X*Y^2 (5) */
@@ -241,7 +237,6 @@ static void secp256k1_gej_double_var(secp256k1_gej_t *r, const secp256k1_gej_t *
     secp256k1_fe_mul(&r->y, &t1, &t3);    /* Y' = 36*X^3*Y^2 - 27*X^6 (1) */
     secp256k1_fe_negate(&t2, &t4, 2);     /* T2 = -8*Y^4 (3) */
     secp256k1_fe_add(&r->y, &t2);         /* Y' = 36*X^3*Y^2 - 27*X^6 - 8*Y^4 (4) */
-    r->infinity = 0;
 }
 
 static void secp256k1_gej_add_var(secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_gej_t *b) {
@@ -342,7 +337,7 @@ static void secp256k1_gej_add_ge(secp256k1_gej_t *r, const secp256k1_gej_t *a, c
      *
      *  Substituting x_i = Xi / Zi^2 and yi = Yi / Zi^3, for i=1,2,3, gives:
      *    U1 = X1*Z2^2, U2 = X2*Z1^2
-     *    S1 = X1*Z2^3, S2 = X2*Z2^3
+     *    S1 = Y1*Z2^3, S2 = Y2*Z1^3
      *    Z = Z1*Z2
      *    T = U1+U2
      *    M = S1+S2
@@ -414,40 +409,9 @@ static void secp256k1_gej_mul_lambda(secp256k1_gej_t *r, const secp256k1_gej_t *
     *r = *a;
     secp256k1_fe_mul(&r->x, &r->x, beta);
 }
-
-static void secp256k1_gej_split_exp_var(secp256k1_num_t *r1, secp256k1_num_t *r2, const secp256k1_num_t *a) {
-    const secp256k1_ge_consts_t *c = secp256k1_ge_consts;
-    secp256k1_num_t bnc1, bnc2, bnt1, bnt2, bnn2;
-
-    secp256k1_num_copy(&bnn2, &c->order);
-    secp256k1_num_shift(&bnn2, 1);
-
-    secp256k1_num_mul(&bnc1, a, &c->a1b2);
-    secp256k1_num_add(&bnc1, &bnc1, &bnn2);
-    secp256k1_num_div(&bnc1, &bnc1, &c->order);
-
-    secp256k1_num_mul(&bnc2, a, &c->b1);
-    secp256k1_num_add(&bnc2, &bnc2, &bnn2);
-    secp256k1_num_div(&bnc2, &bnc2, &c->order);
-
-    secp256k1_num_mul(&bnt1, &bnc1, &c->a1b2);
-    secp256k1_num_mul(&bnt2, &bnc2, &c->a2);
-    secp256k1_num_add(&bnt1, &bnt1, &bnt2);
-    secp256k1_num_sub(r1, a, &bnt1);
-    secp256k1_num_mul(&bnt1, &bnc1, &c->b1);
-    secp256k1_num_mul(&bnt2, &bnc2, &c->a1b2);
-    secp256k1_num_sub(r2, &bnt1, &bnt2);
-}
 #endif
 
-
 static void secp256k1_ge_start(void) {
-    static const unsigned char secp256k1_ge_consts_order[] = {
-        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
-        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
-        0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
-        0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
-    };
     static const unsigned char secp256k1_ge_consts_g_x[] = {
         0x79,0xBE,0x66,0x7E,0xF9,0xDC,0xBB,0xAC,
         0x55,0xA0,0x62,0x95,0xCE,0x87,0x0B,0x07,
@@ -462,47 +426,21 @@ static void secp256k1_ge_start(void) {
     };
 #ifdef USE_ENDOMORPHISM
     /* properties of secp256k1's efficiently computable endomorphism */
-    static const unsigned char secp256k1_ge_consts_lambda[] = {
-        0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,
-        0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a,
-        0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,
-        0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72
-    };
     static const unsigned char secp256k1_ge_consts_beta[] = {
         0x7a,0xe9,0x6a,0x2b,0x65,0x7c,0x07,0x10,
         0x6e,0x64,0x47,0x9e,0xac,0x34,0x34,0xe9,
         0x9c,0xf0,0x49,0x75,0x12,0xf5,0x89,0x95,
         0xc1,0x39,0x6c,0x28,0x71,0x95,0x01,0xee
     };
-    static const unsigned char secp256k1_ge_consts_a1b2[] = {
-        0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,
-        0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15
-    };
-    static const unsigned char secp256k1_ge_consts_b1[] = {
-        0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,
-        0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3
-    };
-    static const unsigned char secp256k1_ge_consts_a2[] = {
-        0x01,
-        0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,
-        0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8
-    };
 #endif
     if (secp256k1_ge_consts == NULL) {
         secp256k1_ge_consts_t *ret = (secp256k1_ge_consts_t*)malloc(sizeof(secp256k1_ge_consts_t));
-        secp256k1_num_set_bin(&ret->order,  secp256k1_ge_consts_order,  sizeof(secp256k1_ge_consts_order));
-        secp256k1_num_copy(&ret->half_order, &ret->order);
-        secp256k1_num_shift(&ret->half_order, 1);
 #ifdef USE_ENDOMORPHISM
-        secp256k1_num_set_bin(&ret->lambda, secp256k1_ge_consts_lambda, sizeof(secp256k1_ge_consts_lambda));
-        secp256k1_num_set_bin(&ret->a1b2,   secp256k1_ge_consts_a1b2,   sizeof(secp256k1_ge_consts_a1b2));
-        secp256k1_num_set_bin(&ret->a2,     secp256k1_ge_consts_a2,     sizeof(secp256k1_ge_consts_a2));
-        secp256k1_num_set_bin(&ret->b1,     secp256k1_ge_consts_b1,     sizeof(secp256k1_ge_consts_b1));
-        secp256k1_fe_set_b32(&ret->beta, secp256k1_ge_consts_beta);
+        VERIFY_CHECK(secp256k1_fe_set_b32(&ret->beta, secp256k1_ge_consts_beta));
 #endif
         secp256k1_fe_t g_x, g_y;
-        secp256k1_fe_set_b32(&g_x, secp256k1_ge_consts_g_x);
-        secp256k1_fe_set_b32(&g_y, secp256k1_ge_consts_g_y);
+        VERIFY_CHECK(secp256k1_fe_set_b32(&g_x, secp256k1_ge_consts_g_x));
+        VERIFY_CHECK(secp256k1_fe_set_b32(&g_y, secp256k1_ge_consts_g_y));
         secp256k1_ge_set_xy(&ret->g, &g_x, &g_y);
         secp256k1_ge_consts = ret;
     }
diff --git a/src/num.h b/src/num.h
index c86f847858fe..339b6bb6ec2c 100644
--- a/src/num.h
+++ b/src/num.h
@@ -7,6 +7,8 @@
 #ifndef _SECP256K1_NUM_
 #define _SECP256K1_NUM_
 
+#ifndef USE_NUM_NONE
+
 #if defined HAVE_CONFIG_H
 #include "libsecp256k1-config.h"
 #endif
@@ -17,9 +19,6 @@
 #error "Please select num implementation"
 #endif
 
-/** Clear a number to prevent the leak of sensitive data. */
-static void secp256k1_num_clear(secp256k1_num_t *r);
-
 /** Copy a number. */
 static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a);
 
@@ -30,15 +29,9 @@ static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const sec
 /** Set a number to the value of a binary big-endian string. */
 static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, unsigned int alen);
 
-/** Set a number equal to a (signed) integer. */
-static void secp256k1_num_set_int(secp256k1_num_t *r, int a);
-
 /** Compute a modular inverse. The input must be less than the modulus. */
 static void secp256k1_num_mod_inverse(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *m);
 
-/** Multiply two numbers modulo another. */
-static void secp256k1_num_mod_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, const secp256k1_num_t *m);
-
 /** Compare the absolute value of two numbers. */
 static int secp256k1_num_cmp(const secp256k1_num_t *a, const secp256k1_num_t *b);
 
@@ -54,47 +47,22 @@ static void secp256k1_num_sub(secp256k1_num_t *r, const secp256k1_num_t *a, cons
 /** Multiply two (signed) numbers. */
 static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
 
-/** Divide two (signed) numbers. */
-static void secp256k1_num_div(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b);
-
 /** Replace a number by its remainder modulo m. M's sign is ignored. The result is a number between 0 and m-1,
     even if r was negative. */
 static void secp256k1_num_mod(secp256k1_num_t *r, const secp256k1_num_t *m);
 
-/** Calculate the number of bits in (the absolute value of) a number. */
-static int secp256k1_num_bits(const secp256k1_num_t *a);
-
-/** Right-shift the passed number by bits bits, and return those bits. */
-static int secp256k1_num_shift(secp256k1_num_t *r, int bits);
+/** Right-shift the passed number by bits bits. */
+static void secp256k1_num_shift(secp256k1_num_t *r, int bits);
 
 /** Check whether a number is zero. */
 static int secp256k1_num_is_zero(const secp256k1_num_t *a);
 
-/** Check whether a number is odd. */
-static int secp256k1_num_is_odd(const secp256k1_num_t *a);
-
 /** Check whether a number is strictly negative. */
 static int secp256k1_num_is_neg(const secp256k1_num_t *a);
 
-/** Check whether a particular bit is set in a number. */
-static int secp256k1_num_get_bit(const secp256k1_num_t *a, int pos);
-
-/** Increase a number by 1. */
-static void secp256k1_num_inc(secp256k1_num_t *r);
-
-/** Set a number equal to the value of a hex string (unsigned). */
-static void secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen);
-
-/** Convert (the absolute value of) a number to a hexadecimal string. */
-static void secp256k1_num_get_hex(char *r, int rlen, const secp256k1_num_t *a);
-
-/** Split a number into a low and high part. */
-static void secp256k1_num_split(secp256k1_num_t *rl, secp256k1_num_t *rh, const secp256k1_num_t *a, int bits);
-
 /** Change a number's sign. */
 static void secp256k1_num_negate(secp256k1_num_t *r);
 
-/** Get a bunch of bits from a number. */
-static int secp256k1_num_get_bits(const secp256k1_num_t *a, int offset, int count);
+#endif
 
 #endif
diff --git a/src/num_gmp_impl.h b/src/num_gmp_impl.h
index e45a59e0cdc4..19d474e59fff 100644
--- a/src/num_gmp_impl.h
+++ b/src/num_gmp_impl.h
@@ -22,35 +22,10 @@ static void secp256k1_num_sanity(const secp256k1_num_t *a) {
 #define secp256k1_num_sanity(a) do { } while(0)
 #endif
 
-static void secp256k1_num_init(secp256k1_num_t *r) {
-    r->neg = 0;
-    r->limbs = 1;
-    r->data[0] = 0;
-}
-
-static void secp256k1_num_clear(secp256k1_num_t *r) {
-    memset(r, 0, sizeof(*r));
-}
-
-static void secp256k1_num_free(secp256k1_num_t *r) {
-    (void)r;
-}
-
 static void secp256k1_num_copy(secp256k1_num_t *r, const secp256k1_num_t *a) {
     *r = *a;
 }
 
-static int secp256k1_num_bits(const secp256k1_num_t *a) {
-    int ret=(a->limbs-1)*GMP_NUMB_BITS;
-    mp_limb_t x=a->data[a->limbs-1];
-    while (x) {
-        x >>= 1;
-        ret++;
-    }
-    return ret;
-}
-
-
 static void secp256k1_num_get_bin(unsigned char *r, unsigned int rlen, const secp256k1_num_t *a) {
     unsigned char tmp[65];
     int len = 0;
@@ -71,18 +46,16 @@ static void secp256k1_num_set_bin(secp256k1_num_t *r, const unsigned char *a, un
     VERIFY_CHECK(alen > 0);
     VERIFY_CHECK(alen <= 64);
     int len = mpn_set_str(r->data, a, alen, 256);
+    if (len == 0) {
+        r->data[0] = 0;
+        len = 1;
+    }
     VERIFY_CHECK(len <= NUM_LIMBS*2);
     r->limbs = len;
     r->neg = 0;
     while (r->limbs > 1 && r->data[r->limbs-1]==0) r->limbs--;
 }
 
-static void secp256k1_num_set_int(secp256k1_num_t *r, int a) {
-    r->limbs = 1;
-    r->neg = (a < 0);
-    r->data[0] = (a < 0) ? -a : a;
-}
-
 static void secp256k1_num_add_abs(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
     mp_limb_t c = mpn_add(r->data, a->data, a->limbs, b->data, b->limbs);
     r->limbs = a->limbs;
@@ -161,10 +134,6 @@ static int secp256k1_num_is_zero(const secp256k1_num_t *a) {
     return (a->limbs == 1 && a->data[0] == 0);
 }
 
-static int secp256k1_num_is_odd(const secp256k1_num_t *a) {
-    return a->data[0] & 1;
-}
-
 static int secp256k1_num_is_neg(const secp256k1_num_t *a) {
     return (a->limbs > 1 || a->data[0] != 0) && a->neg;
 }
@@ -237,140 +206,27 @@ static void secp256k1_num_mul(secp256k1_num_t *r, const secp256k1_num_t *a, cons
     memset(tmp, 0, sizeof(tmp));
 }
 
-static void secp256k1_num_div(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b) {
-    secp256k1_num_sanity(a);
-    secp256k1_num_sanity(b);
-    if (b->limbs > a->limbs) {
-        r->limbs = 1;
-        r->data[0] = 0;
-        r->neg = 0;
-        return;
-    }
-
-    mp_limb_t quo[2*NUM_LIMBS+1];
-    mp_limb_t rem[2*NUM_LIMBS+1];
-    mpn_tdiv_qr(quo, rem, 0, a->data, a->limbs, b->data, b->limbs);
-    mpn_copyi(r->data, quo, a->limbs - b->limbs + 1);
-    r->limbs = a->limbs - b->limbs + 1;
-    while (r->limbs > 1 && r->data[r->limbs - 1]==0) r->limbs--;
-    r->neg = a->neg ^ b->neg;
-}
-
-static void secp256k1_num_mod_mul(secp256k1_num_t *r, const secp256k1_num_t *a, const secp256k1_num_t *b, const secp256k1_num_t *m) {
-    secp256k1_num_mul(r, a, b);
-    secp256k1_num_mod(r, m);
-}
-
-
-static int secp256k1_num_shift(secp256k1_num_t *r, int bits) {
-    VERIFY_CHECK(bits <= GMP_NUMB_BITS);
-    mp_limb_t ret = mpn_rshift(r->data, r->data, r->limbs, bits);
-    if (r->limbs>1 && r->data[r->limbs-1]==0) r->limbs--;
-    ret >>= (GMP_NUMB_BITS - bits);
-    return ret;
-}
-
-static int secp256k1_num_get_bit(const secp256k1_num_t *a, int pos) {
-    return (a->limbs*GMP_NUMB_BITS > pos) && ((a->data[pos/GMP_NUMB_BITS] >> (pos % GMP_NUMB_BITS)) & 1);
-}
-
-static void secp256k1_num_inc(secp256k1_num_t *r) {
-    mp_limb_t ret = mpn_add_1(r->data, r->data, r->limbs, (mp_limb_t)1);
-    if (ret) {
-        VERIFY_CHECK(r->limbs < 2*NUM_LIMBS);
-        r->data[r->limbs++] = ret;
-    }
-}
-
-static void secp256k1_num_set_hex(secp256k1_num_t *r, const char *a, int alen) {
-    static const unsigned char cvt[256] = {
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 1, 2, 3, 4, 5, 6,7,8,9,0,0,0,0,0,0,
-        0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0,10,11,12,13,14,15,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0,
-        0, 0, 0, 0, 0, 0, 0,0,0,0,0,0,0,0,0,0
-    };
-    unsigned char num[257] = {};
-    for (int i=0; i<alen; i++) {
-        num[i] = cvt[(unsigned char)a[i]];
-    }
-    r->limbs = mpn_set_str(r->data, num, alen, 16);
-    r->neg = 0;
-    while (r->limbs > 1 && r->data[r->limbs-1] == 0) r->limbs--;
-}
-
-static void secp256k1_num_get_hex(char *r, int rlen, const secp256k1_num_t *a) {
-    static const unsigned char cvt[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-    unsigned char *tmp = malloc(257);
-    mp_size_t len = mpn_get_str(tmp, 16, (mp_limb_t*)a->data, a->limbs);
-    VERIFY_CHECK(len <= rlen);
-    for (int i=0; i<len; i++) {
-        VERIFY_CHECK(rlen-len+i >= 0);
-        VERIFY_CHECK(rlen-len+i < rlen);
-        VERIFY_CHECK(tmp[i] < 16);
-        r[rlen-len+i] = cvt[tmp[i]];
-    }
-    for (int i=0; i<rlen-len; i++) {
-        VERIFY_CHECK(i >= 0);
-        VERIFY_CHECK(i < rlen);
-        r[i] = cvt[0];
-    }
-    free(tmp);
-}
-
-static void secp256k1_num_split(secp256k1_num_t *rl, secp256k1_num_t *rh, const secp256k1_num_t *a, int bits) {
-    VERIFY_CHECK(bits > 0);
-    rh->neg = a->neg;
-    if (bits >= a->limbs * GMP_NUMB_BITS) {
-        *rl = *a;
-        rh->limbs = 1;
-        rh->data[0] = 0;
-        return;
-    }
-    rl->limbs = 0;
-    rl->neg = a->neg;
-    int left = bits;
-    while (left >= GMP_NUMB_BITS) {
-        rl->data[rl->limbs] = a->data[rl->limbs];
-        rl->limbs++;
-        left -= GMP_NUMB_BITS;
-    }
-    if (left == 0) {
-        mpn_copyi(rh->data, a->data + rl->limbs, a->limbs - rl->limbs);
-        rh->limbs = a->limbs - rl->limbs;
-    } else {
-        mpn_rshift(rh->data, a->data + rl->limbs, a->limbs - rl->limbs, left);
-        rh->limbs = a->limbs - rl->limbs;
-        while (rh->limbs>1 && rh->data[rh->limbs-1]==0) rh->limbs--;
-    }
-    if (left > 0) {
-        rl->data[rl->limbs] = a->data[rl->limbs] & ((((mp_limb_t)1) << left) - 1);
-        rl->limbs++;
+static void secp256k1_num_shift(secp256k1_num_t *r, int bits) {
+    if (bits % GMP_NUMB_BITS) {
+        // Shift within limbs.
+        mpn_rshift(r->data, r->data, r->limbs, bits % GMP_NUMB_BITS);
+    }
+    if (bits >= GMP_NUMB_BITS) {
+        // Shift full limbs.
+        for (int i = 0; i < r->limbs; i++) {
+            int index = i + (bits / GMP_NUMB_BITS);
+            if (index < r->limbs && index < 2*NUM_LIMBS) {
+                r->data[i] = r->data[index];
+            } else {
+                r->data[i] = 0;
+            }
+        }
     }
-    while (rl->limbs>1 && rl->data[rl->limbs-1]==0) rl->limbs--;
+    while (r->limbs>1 && r->data[r->limbs-1]==0) r->limbs--;
 }
 
 static void secp256k1_num_negate(secp256k1_num_t *r) {
     r->neg ^= 1;
 }
 
-static int secp256k1_num_get_bits(const secp256k1_num_t *a, int offset, int count) {
-    int ret = 0;
-    for (int i = 0; i < count; i++) {
-        ret |= ((a->data[(offset + i) / GMP_NUMB_BITS] >> ((offset + i) % GMP_NUMB_BITS)) & 1) << i;
-    }
-    return ret;
-}
-
 #endif
diff --git a/src/num_impl.h b/src/num_impl.h
index f73d3ceea865..0b0e3a072a15 100644
--- a/src/num_impl.h
+++ b/src/num_impl.h
@@ -15,6 +15,8 @@
 
 #if defined(USE_NUM_GMP)
 #include "num_gmp_impl.h"
+#elif defined(USE_NUM_NONE)
+/* Nothing. */
 #else
 #error "Please select num implementation"
 #endif
diff --git a/src/scalar.h b/src/scalar.h
index 3baacb37215a..2f5ba0d447ad 100644
--- a/src/scalar.h
+++ b/src/scalar.h
@@ -21,20 +21,32 @@
 #error "Please select scalar implementation"
 #endif
 
+static void secp256k1_scalar_start(void);
+static void secp256k1_scalar_stop(void);
+
 /** Clear a scalar to prevent the leak of sensitive data. */
 static void secp256k1_scalar_clear(secp256k1_scalar_t *r);
 
-/** Access bits from a scalar. */
-static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count);
+/** Access bits from a scalar. All requested bits must belong to the same 32-bit limb. */
+static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count);
+
+/** Access bits from a scalar. Not constant time. */
+static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count);
 
 /** Set a scalar from a big endian byte array. */
 static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *bin, int *overflow);
 
+/** Set a scalar to an unsigned integer. */
+static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v);
+
 /** Convert a scalar to a byte array. */
 static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar_t* a);
 
-/** Add two scalars together (modulo the group order). */
-static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
+/** Add two scalars together (modulo the group order). Returns whether it overflowed. */
+static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
+
+/** Add a power of two to a scalar. The result is not allowed to overflow. */
+static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit);
 
 /** Multiply two scalars (modulo the group order). */
 static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
@@ -45,6 +57,9 @@ static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t
 /** Compute the inverse of a scalar (modulo the group order). */
 static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
 
+/** Compute the inverse of a scalar (modulo the group order), without constant-time guarantee. */
+static void secp256k1_scalar_inverse_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
+
 /** Compute the complement of a scalar (modulo the group order). */
 static void secp256k1_scalar_negate(secp256k1_scalar_t *r, const secp256k1_scalar_t *a);
 
@@ -57,7 +72,25 @@ static int secp256k1_scalar_is_one(const secp256k1_scalar_t *a);
 /** Check whether a scalar is higher than the group order divided by 2. */
 static int secp256k1_scalar_is_high(const secp256k1_scalar_t *a);
 
+#ifndef USE_NUM_NONE
 /** Convert a scalar to a number. */
 static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a);
 
+/** Get the order of the group as a number. */
+static void secp256k1_scalar_order_get_num(secp256k1_num_t *r);
+#endif
+
+/** Compare two scalars. */
+static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b);
+
+static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a);
+
+#ifdef USE_ENDOMORPHISM
+/** Find r1 and r2 such that r1+r2*lambda = a, and r1 and r2 are maximum 128 bits long (see secp256k1_gej_mul_lambda). */
+static void secp256k1_scalar_split_lambda_var(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a);
+#endif
+
+/** Multiply a and b (without taking the modulus!), divide by 2**shift, and round to the nearest integer. Shift must be at least 256. */
+static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift);
+
 #endif
diff --git a/src/scalar_4x64_impl.h b/src/scalar_4x64_impl.h
index f78718234fe1..d14477522029 100644
--- a/src/scalar_4x64_impl.h
+++ b/src/scalar_4x64_impl.h
@@ -33,9 +33,27 @@ SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) {
     r->d[3] = 0;
 }
 
-SECP256K1_INLINE static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count) {
-    VERIFY_CHECK((offset + count - 1) / 64 == offset / 64);
-    return (a->d[offset / 64] >> (offset % 64)) & ((((uint64_t)1) << count) - 1);
+SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v) {
+    r->d[0] = v;
+    r->d[1] = 0;
+    r->d[2] = 0;
+    r->d[3] = 0;
+}
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) {
+    VERIFY_CHECK((offset + count - 1) >> 6 == offset >> 6);
+    return (a->d[offset >> 6] >> (offset & 0x3F)) & ((((uint64_t)1) << count) - 1);
+}
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) {
+    VERIFY_CHECK(count < 32);
+    VERIFY_CHECK(offset + count <= 256);
+    if ((offset + count - 1) >> 6 == offset >> 6) {
+        return secp256k1_scalar_get_bits(a, offset, count);
+    } else {
+        VERIFY_CHECK((offset >> 6) + 1 < 4);
+        return ((a->d[offset >> 6] >> (offset & 0x3F)) | (a->d[(offset >> 6) + 1] << (64 - (offset & 0x3F)))) & ((((uint64_t)1) << count) - 1);
+    }
 }
 
 SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) {
@@ -63,7 +81,7 @@ SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, unsig
     return overflow;
 }
 
-static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
     uint128_t t = (uint128_t)a->d[0] + b->d[0];
     r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
     t += (uint128_t)a->d[1] + b->d[1];
@@ -72,7 +90,26 @@ static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t
     r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
     t += (uint128_t)a->d[3] + b->d[3];
     r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
-    secp256k1_scalar_reduce(r, t + secp256k1_scalar_check_overflow(r));
+    int overflow = t + secp256k1_scalar_check_overflow(r);
+    VERIFY_CHECK(overflow == 0 || overflow == 1);
+    secp256k1_scalar_reduce(r, overflow);
+    return overflow;
+}
+
+static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit) {
+    VERIFY_CHECK(bit < 256);
+    uint128_t t = (uint128_t)r->d[0] + (((uint64_t)((bit >> 6) == 0)) << (bit & 0x3F));
+    r->d[0] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)r->d[1] + (((uint64_t)((bit >> 6) == 1)) << (bit & 0x3F));
+    r->d[1] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)r->d[2] + (((uint64_t)((bit >> 6) == 2)) << (bit & 0x3F));
+    r->d[2] = t & 0xFFFFFFFFFFFFFFFFULL; t >>= 64;
+    t += (uint128_t)r->d[3] + (((uint64_t)((bit >> 6) == 3)) << (bit & 0x3F));
+    r->d[3] = t & 0xFFFFFFFFFFFFFFFFULL;
+#ifdef VERIFY
+    VERIFY_CHECK((t >> 64) == 0);
+    VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0);
+#endif
 }
 
 static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) {
@@ -280,13 +317,11 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint64_t *l
     secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
 }
 
-static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+static void secp256k1_scalar_mul_512(uint64_t l[8], const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
     /* 160 bit accumulator. */
     uint64_t c0 = 0, c1 = 0;
     uint32_t c2 = 0;
 
-    uint64_t l[8];
-
     /* l[0..7] = a[0..3] * b[0..3]. */
     muladd_fast(a->d[0], b->d[0]);
     extract_fast(l[0]);
@@ -313,17 +348,13 @@ static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t
     extract_fast(l[6]);
     VERIFY_CHECK(c1 <= 0);
     l[7] = c0;
-
-    secp256k1_scalar_reduce_512(r, l);
 }
 
-static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+static void secp256k1_scalar_sqr_512(uint64_t l[8], const secp256k1_scalar_t *a) {
     /* 160 bit accumulator. */
     uint64_t c0 = 0, c1 = 0;
     uint32_t c2 = 0;
 
-    uint64_t l[8];
-
     /* l[0..7] = a[0..3] * b[0..3]. */
     muladd_fast(a->d[0], a->d[0]);
     extract_fast(l[0]);
@@ -344,8 +375,6 @@ static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t
     extract_fast(l[6]);
     VERIFY_CHECK(c1 == 0);
     l[7] = c0;
-
-    secp256k1_scalar_reduce_512(r, l);
 }
 
 #undef sumadd
@@ -356,4 +385,47 @@ static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t
 #undef extract
 #undef extract_fast
 
+static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    uint64_t l[8];
+    secp256k1_scalar_mul_512(l, a, b);
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    uint64_t l[8];
+    secp256k1_scalar_sqr_512(l, a);
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) {
+    r1->d[0] = a->d[0];
+    r1->d[1] = a->d[1];
+    r1->d[2] = 0;
+    r1->d[3] = 0;
+    r2->d[0] = a->d[2];
+    r2->d[1] = a->d[3];
+    r2->d[2] = 0;
+    r2->d[3] = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3])) == 0;
+}
+
+SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift) {
+    VERIFY_CHECK(shift >= 256);
+    uint64_t l[8];
+    secp256k1_scalar_mul_512(l, a, b);
+    unsigned int shiftlimbs = shift >> 6;
+    unsigned int shiftlow = shift & 0x3F;
+    unsigned int shifthigh = 64 - shiftlow;
+    r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[1] = shift < 448 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[2] = shift < 384 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[3] = shift < 320 ? (l[3 + shiftlimbs] >> shiftlow) : 0;
+    if ((l[(shift - 1) >> 6] >> ((shift - 1) & 0x3f)) & 1) {
+        secp256k1_scalar_add_bit(r, 0);
+    }
+}
+
 #endif
diff --git a/src/scalar_8x32_impl.h b/src/scalar_8x32_impl.h
index e58be1365f95..915cbcddbe80 100644
--- a/src/scalar_8x32_impl.h
+++ b/src/scalar_8x32_impl.h
@@ -45,9 +45,31 @@ SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar_t *r) {
     r->d[7] = 0;
 }
 
-SECP256K1_INLINE static int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, int offset, int count) {
-    VERIFY_CHECK((offset + count - 1) / 32 == offset / 32);
-    return (a->d[offset / 32] >> (offset % 32)) & ((1 << count) - 1);
+SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar_t *r, unsigned int v) {
+    r->d[0] = v;
+    r->d[1] = 0;
+    r->d[2] = 0;
+    r->d[3] = 0;
+    r->d[4] = 0;
+    r->d[5] = 0;
+    r->d[6] = 0;
+    r->d[7] = 0;
+}
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) {
+    VERIFY_CHECK((offset + count - 1) >> 5 == offset >> 5);
+    return (a->d[offset >> 5] >> (offset & 0x1F)) & ((1 << count) - 1);
+}
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar_t *a, unsigned int offset, unsigned int count) {
+    VERIFY_CHECK(count < 32);
+    VERIFY_CHECK(offset + count <= 256);
+    if ((offset + count - 1) >> 5 == offset >> 5) {
+        return secp256k1_scalar_get_bits(a, offset, count);
+    } else {
+        VERIFY_CHECK((offset >> 5) + 1 < 8);
+        return ((a->d[offset >> 5] >> (offset & 0x1F)) | (a->d[(offset >> 5) + 1] << (32 - (offset & 0x1F)))) & ((((uint32_t)1) << count) - 1);
+    }
 }
 
 SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar_t *a) {
@@ -89,7 +111,7 @@ SECP256K1_INLINE static int secp256k1_scalar_reduce(secp256k1_scalar_t *r, uint3
     return overflow;
 }
 
-static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+static int secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
     uint64_t t = (uint64_t)a->d[0] + b->d[0];
     r->d[0] = t & 0xFFFFFFFFULL; t >>= 32;
     t += (uint64_t)a->d[1] + b->d[1];
@@ -106,7 +128,34 @@ static void secp256k1_scalar_add(secp256k1_scalar_t *r, const secp256k1_scalar_t
     r->d[6] = t & 0xFFFFFFFFULL; t >>= 32;
     t += (uint64_t)a->d[7] + b->d[7];
     r->d[7] = t & 0xFFFFFFFFULL; t >>= 32;
-    secp256k1_scalar_reduce(r, t + secp256k1_scalar_check_overflow(r));
+    int overflow = t + secp256k1_scalar_check_overflow(r);
+    VERIFY_CHECK(overflow == 0 || overflow == 1);
+    secp256k1_scalar_reduce(r, overflow);
+    return overflow;
+}
+
+static void secp256k1_scalar_add_bit(secp256k1_scalar_t *r, unsigned int bit) {
+    VERIFY_CHECK(bit < 256);
+    uint64_t t = (uint64_t)r->d[0] + (((uint32_t)((bit >> 5) == 0)) << (bit & 0x1F));
+    r->d[0] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[1] + (((uint32_t)((bit >> 5) == 1)) << (bit & 0x1F));
+    r->d[1] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[2] + (((uint32_t)((bit >> 5) == 2)) << (bit & 0x1F));
+    r->d[2] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[3] + (((uint32_t)((bit >> 5) == 3)) << (bit & 0x1F));
+    r->d[3] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[4] + (((uint32_t)((bit >> 5) == 4)) << (bit & 0x1F));
+    r->d[4] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[5] + (((uint32_t)((bit >> 5) == 5)) << (bit & 0x1F));
+    r->d[5] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[6] + (((uint32_t)((bit >> 5) == 6)) << (bit & 0x1F));
+    r->d[6] = t & 0xFFFFFFFFULL; t >>= 32;
+    t += (uint64_t)r->d[7] + (((uint32_t)((bit >> 5) == 7)) << (bit & 0x1F));
+    r->d[7] = t & 0xFFFFFFFFULL;
+#ifdef VERIFY
+    VERIFY_CHECK((t >> 32) == 0);
+    VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0);
+#endif
 }
 
 static void secp256k1_scalar_set_b32(secp256k1_scalar_t *r, const unsigned char *b32, int *overflow) {
@@ -405,12 +454,10 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar_t *r, const uint32_t *l
     secp256k1_scalar_reduce(r, c + secp256k1_scalar_check_overflow(r));
 }
 
-static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+static void secp256k1_scalar_mul_512(uint32_t l[16], const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
     /* 96 bit accumulator. */
     uint32_t c0 = 0, c1 = 0, c2 = 0;
 
-    uint32_t l[16];
-
     /* l[0..15] = a[0..7] * b[0..7]. */
     muladd_fast(a->d[0], b->d[0]);
     extract_fast(l[0]);
@@ -493,16 +540,12 @@ static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t
     extract_fast(l[14]);
     VERIFY_CHECK(c1 == 0);
     l[15] = c0;
-
-    secp256k1_scalar_reduce_512(r, l);
 }
 
-static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+static void secp256k1_scalar_sqr_512(uint32_t l[16], const secp256k1_scalar_t *a) {
     /* 96 bit accumulator. */
     uint32_t c0 = 0, c1 = 0, c2 = 0;
 
-    uint32_t l[16];
-
     /* l[0..15] = a[0..7]^2. */
     muladd_fast(a->d[0], a->d[0]);
     extract_fast(l[0]);
@@ -557,8 +600,6 @@ static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t
     extract_fast(l[14]);
     VERIFY_CHECK(c1 == 0);
     l[15] = c0;
-
-    secp256k1_scalar_reduce_512(r, l);
 }
 
 #undef sumadd
@@ -569,4 +610,59 @@ static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t
 #undef extract
 #undef extract_fast
 
+static void secp256k1_scalar_mul(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    uint32_t l[16];
+    secp256k1_scalar_mul_512(l, a, b);
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_sqr(secp256k1_scalar_t *r, const secp256k1_scalar_t *a) {
+    uint32_t l[16];
+    secp256k1_scalar_sqr_512(l, a);
+    secp256k1_scalar_reduce_512(r, l);
+}
+
+static void secp256k1_scalar_split_128(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) {
+    r1->d[0] = a->d[0];
+    r1->d[1] = a->d[1];
+    r1->d[2] = a->d[2];
+    r1->d[3] = a->d[3];
+    r1->d[4] = 0;
+    r1->d[5] = 0;
+    r1->d[6] = 0;
+    r1->d[7] = 0;
+    r2->d[0] = a->d[4];
+    r2->d[1] = a->d[5];
+    r2->d[2] = a->d[6];
+    r2->d[3] = a->d[7];
+    r2->d[4] = 0;
+    r2->d[5] = 0;
+    r2->d[6] = 0;
+    r2->d[7] = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar_t *a, const secp256k1_scalar_t *b) {
+    return ((a->d[0] ^ b->d[0]) | (a->d[1] ^ b->d[1]) | (a->d[2] ^ b->d[2]) | (a->d[3] ^ b->d[3]) | (a->d[4] ^ b->d[4]) | (a->d[5] ^ b->d[5]) | (a->d[6] ^ b->d[6]) | (a->d[7] ^ b->d[7])) == 0;
+}
+
+SECP256K1_INLINE static void secp256k1_scalar_mul_shift_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *a, const secp256k1_scalar_t *b, unsigned int shift) {
+    VERIFY_CHECK(shift >= 256);
+    uint32_t l[16];
+    secp256k1_scalar_mul_512(l, a, b);
+    unsigned int shiftlimbs = shift >> 5;
+    unsigned int shiftlow = shift & 0x1F;
+    unsigned int shifthigh = 32 - shiftlow;
+    r->d[0] = shift < 512 ? (l[0 + shiftlimbs] >> shiftlow | (shift < 480 && shiftlow ? (l[1 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[1] = shift < 480 ? (l[1 + shiftlimbs] >> shiftlow | (shift < 448 && shiftlow ? (l[2 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[2] = shift < 448 ? (l[2 + shiftlimbs] >> shiftlow | (shift < 416 && shiftlow ? (l[3 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[3] = shift < 416 ? (l[3 + shiftlimbs] >> shiftlow | (shift < 384 && shiftlow ? (l[4 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[4] = shift < 384 ? (l[4 + shiftlimbs] >> shiftlow | (shift < 352 && shiftlow ? (l[5 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[5] = shift < 352 ? (l[5 + shiftlimbs] >> shiftlow | (shift < 320 && shiftlow ? (l[6 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[6] = shift < 320 ? (l[6 + shiftlimbs] >> shiftlow | (shift < 288 && shiftlow ? (l[7 + shiftlimbs] << shifthigh) : 0)) : 0;
+    r->d[7] = shift < 288 ? (l[7 + shiftlimbs] >> shiftlow)  : 0;
+    if ((l[(shift - 1) >> 5] >> ((shift - 1) & 0x1f)) & 1) {
+        secp256k1_scalar_add_bit(r, 0);
+    }
+}
+
 #endif
diff --git a/src/scalar_impl.h b/src/scalar_impl.h
index ddc5061c7699..7fc159df7727 100644
--- a/src/scalar_impl.h
+++ b/src/scalar_impl.h
@@ -9,6 +9,7 @@
 
 #include <string.h>
 
+#include "group.h"
 #include "scalar.h"
 
 #if defined HAVE_CONFIG_H
@@ -23,12 +24,132 @@
 #error "Please select scalar implementation"
 #endif
 
+typedef struct {
+#ifndef USE_NUM_NONE
+    secp256k1_num_t order;
+#endif
+#ifdef USE_ENDOMORPHISM
+    secp256k1_scalar_t minus_lambda, minus_b1, minus_b2, g1, g2;
+#endif
+} secp256k1_scalar_consts_t;
+
+static const secp256k1_scalar_consts_t *secp256k1_scalar_consts = NULL;
+
+static void secp256k1_scalar_start(void) {
+    if (secp256k1_scalar_consts != NULL)
+        return;
+
+    /* Allocate. */
+    secp256k1_scalar_consts_t *ret = (secp256k1_scalar_consts_t*)malloc(sizeof(secp256k1_scalar_consts_t));
+
+#ifndef USE_NUM_NONE
+    static const unsigned char secp256k1_scalar_consts_order[] = {
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
+        0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
+        0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
+        0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
+    };
+    secp256k1_num_set_bin(&ret->order, secp256k1_scalar_consts_order, sizeof(secp256k1_scalar_consts_order));
+#endif
+#ifdef USE_ENDOMORPHISM
+    /**
+     * Lambda is a scalar which has the property for secp256k1 that point multiplication by
+     * it is efficiently computable (see secp256k1_gej_mul_lambda). */
+    static const unsigned char secp256k1_scalar_consts_lambda[32] = {
+         0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,
+         0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a,
+         0x12,0x2e,0x22,0xea,0x20,0x81,0x66,0x78,
+         0xdf,0x02,0x96,0x7c,0x1b,0x23,0xbd,0x72
+    };
+    /**
+     * "Guide to Elliptic Curve Cryptography" (Hankerson, Menezes, Vanstone) gives an algorithm
+     * (algorithm 3.74) to find k1 and k2 given k, such that k1 + k2 * lambda == k mod n, and k1
+     * and k2 have a small size.
+     * It relies on constants a1, b1, a2, b2. These constants for the value of lambda above are:
+     *
+     * - a1 =      {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15}
+     * - b1 =     -{0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3}
+     * - a2 = {0x01,0x14,0xca,0x50,0xf7,0xa8,0xe2,0xf3,0xf6,0x57,0xc1,0x10,0x8d,0x9d,0x44,0xcf,0xd8}
+     * - b2 =      {0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15}
+     *
+     * The algorithm then computes c1 = round(b1 * k / n) and c2 = round(b2 * k / n), and gives
+     * k1 = k - (c1*a1 + c2*a2) and k2 = -(c1*b1 + c2*b2). Instead, we use modular arithmetic, and
+     * compute k1 as k - k2 * lambda, avoiding the need for constants a1 and a2.
+     *
+     * g1, g2 are precomputed constants used to replace division with a rounded multiplication
+     * when decomposing the scalar for an endomorphism-based point multiplication.
+     *
+     * The possibility of using precomputed estimates is mentioned in "Guide to Elliptic Curve
+     * Cryptography" (Hankerson, Menezes, Vanstone) in section 3.5.
+     *
+     * The derivation is described in the paper "Efficient Software Implementation of Public-Key
+     * Cryptography on Sensor Networks Using the MSP430X Microcontroller" (Gouvea, Oliveira, Lopez),
+     * Section 4.3 (here we use a somewhat higher-precision estimate):
+     * d = a1*b2 - b1*a2
+     * g1 = round((2^272)*b2/d)
+     * g2 = round((2^272)*b1/d)
+     *
+     * (Note that 'd' is also equal to the curve order here because [a1,b1] and [a2,b2] are found
+     * as outputs of the Extended Euclidean Algorithm on inputs 'order' and 'lambda').
+     */
+    static const unsigned char secp256k1_scalar_consts_minus_b1[32] = {
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0xe4,0x43,0x7e,0xd6,0x01,0x0e,0x88,0x28,
+        0x6f,0x54,0x7f,0xa9,0x0a,0xbf,0xe4,0xc3
+    };
+    static const unsigned char secp256k1_scalar_consts_b2[32] = {
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0x30,0x86,0xd2,0x21,0xa7,0xd4,0x6b,0xcd,
+        0xe8,0x6c,0x90,0xe4,0x92,0x84,0xeb,0x15
+    };
+    static const unsigned char secp256k1_scalar_consts_g1[32] = {
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x86,
+        0xd2,0x21,0xa7,0xd4,0x6b,0xcd,0xe8,0x6c,
+        0x90,0xe4,0x92,0x84,0xeb,0x15,0x3d,0xab
+    };
+    static const unsigned char secp256k1_scalar_consts_g2[32] = {
+        0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+        0x00,0x00,0x00,0x00,0x00,0x00,0xe4,0x43,
+        0x7e,0xd6,0x01,0x0e,0x88,0x28,0x6f,0x54,
+        0x7f,0xa9,0x0a,0xbf,0xe4,0xc4,0x22,0x12
+    };
+
+    secp256k1_scalar_set_b32(&ret->minus_lambda, secp256k1_scalar_consts_lambda, NULL);
+    secp256k1_scalar_negate(&ret->minus_lambda, &ret->minus_lambda);
+    secp256k1_scalar_set_b32(&ret->minus_b1, secp256k1_scalar_consts_minus_b1, NULL);
+    secp256k1_scalar_set_b32(&ret->minus_b2, secp256k1_scalar_consts_b2, NULL);
+    secp256k1_scalar_negate(&ret->minus_b2, &ret->minus_b2);
+    secp256k1_scalar_set_b32(&ret->g1, secp256k1_scalar_consts_g1, NULL);
+    secp256k1_scalar_set_b32(&ret->g2, secp256k1_scalar_consts_g2, NULL);
+#endif
+
+    /* Set the global pointer. */
+    secp256k1_scalar_consts = ret;
+}
+
+static void secp256k1_scalar_stop(void) {
+    if (secp256k1_scalar_consts == NULL)
+        return;
+
+    secp256k1_scalar_consts_t *c = (secp256k1_scalar_consts_t*)secp256k1_scalar_consts;
+    secp256k1_scalar_consts = NULL;
+    free(c);
+}
+
+#ifndef USE_NUM_NONE
 static void secp256k1_scalar_get_num(secp256k1_num_t *r, const secp256k1_scalar_t *a) {
     unsigned char c[32];
     secp256k1_scalar_get_b32(c, a);
     secp256k1_num_set_bin(r, c, 32);
 }
 
+static void secp256k1_scalar_order_get_num(secp256k1_num_t *r) {
+    *r = secp256k1_scalar_consts->order;
+}
+#endif
 
 static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scalar_t *x) {
     /* First compute x ^ (2^N - 1) for some values of N. */
@@ -181,4 +302,35 @@ static void secp256k1_scalar_inverse(secp256k1_scalar_t *r, const secp256k1_scal
     secp256k1_scalar_mul(r, t, &x6); /* 111111 */
 }
 
+static void secp256k1_scalar_inverse_var(secp256k1_scalar_t *r, const secp256k1_scalar_t *x) {
+#if defined(USE_SCALAR_INV_BUILTIN)
+    secp256k1_scalar_inverse(r, x);
+#elif defined(USE_SCALAR_INV_NUM)
+    unsigned char b[32];
+    secp256k1_scalar_get_b32(b, x);
+    secp256k1_num_t n;
+    secp256k1_num_set_bin(&n, b, 32);
+    secp256k1_num_mod_inverse(&n, &n, &secp256k1_scalar_consts->order);
+    secp256k1_num_get_bin(b, 32, &n);
+    secp256k1_scalar_set_b32(r, b, NULL);
+#else
+#error "Please select scalar inverse implementation"
+#endif
+}
+
+#ifdef USE_ENDOMORPHISM
+static void secp256k1_scalar_split_lambda_var(secp256k1_scalar_t *r1, secp256k1_scalar_t *r2, const secp256k1_scalar_t *a) {
+    VERIFY_CHECK(r1 != a);
+    VERIFY_CHECK(r2 != a);
+    secp256k1_scalar_t c1, c2;
+    secp256k1_scalar_mul_shift_var(&c1, a, &secp256k1_scalar_consts->g1, 272);
+    secp256k1_scalar_mul_shift_var(&c2, a, &secp256k1_scalar_consts->g2, 272);
+    secp256k1_scalar_mul(&c1, &c1, &secp256k1_scalar_consts->minus_b1);
+    secp256k1_scalar_mul(&c2, &c2, &secp256k1_scalar_consts->minus_b2);
+    secp256k1_scalar_add(r2, &c1, &c2);
+    secp256k1_scalar_mul(r1, r2, &secp256k1_scalar_consts->minus_lambda);
+    secp256k1_scalar_add(r1, r1, a);
+}
+#endif
+
 #endif
diff --git a/src/secp256k1.c b/src/secp256k1.c
index 1ab5b3722ce7..20fc27df74aa 100644
--- a/src/secp256k1.c
+++ b/src/secp256k1.c
@@ -21,6 +21,8 @@
 void secp256k1_start(unsigned int flags) {
     secp256k1_fe_start();
     secp256k1_ge_start();
+    secp256k1_scalar_start();
+    secp256k1_ecdsa_start();
     if (flags & SECP256K1_START_SIGN) {
         secp256k1_ecmult_gen_start();
     }
@@ -32,6 +34,8 @@ void secp256k1_start(unsigned int flags) {
 void secp256k1_stop(void) {
     secp256k1_ecmult_stop();
     secp256k1_ecmult_gen_stop();
+    secp256k1_ecdsa_stop();
+    secp256k1_scalar_stop();
     secp256k1_ge_stop();
     secp256k1_fe_stop();
 }
@@ -43,11 +47,13 @@ int secp256k1_ecdsa_verify(const unsigned char *msg, int msglen, const unsigned
     DEBUG_CHECK(sig != NULL);
     DEBUG_CHECK(pubkey != NULL);
 
+    unsigned char msg32[32] = {0};
+    memcpy(msg32 + 32 - msglen, msg, msglen);
     int ret = -3;
-    secp256k1_num_t m;
+    secp256k1_scalar_t m;
     secp256k1_ecdsa_sig_t s;
     secp256k1_ge_t q;
-    secp256k1_num_set_bin(&m, msg, msglen);
+    secp256k1_scalar_set_b32(&m, msg32, NULL);
 
     if (!secp256k1_eckey_pubkey_parse(&q, pubkey, pubkeylen)) {
         ret = -1;
@@ -123,8 +129,8 @@ int secp256k1_ecdsa_sign_compact(const unsigned char *message, int messagelen, u
         ret = secp256k1_ecdsa_sig_sign(&sig, &sec, &msg, &non, recid);
     }
     if (ret) {
-        secp256k1_num_get_bin(sig64, 32, &sig.r);
-        secp256k1_num_get_bin(sig64 + 32, 32, &sig.s);
+        secp256k1_scalar_get_b32(sig64, &sig.r);
+        secp256k1_scalar_get_b32(sig64 + 32, &sig.s);
     }
     secp256k1_scalar_clear(&msg);
     secp256k1_scalar_clear(&non);
@@ -142,11 +148,20 @@ int secp256k1_ecdsa_recover_compact(const unsigned char *msg, int msglen, const
     DEBUG_CHECK(recid >= 0 && recid <= 3);
 
     int ret = 0;
-    secp256k1_num_t m;
+    unsigned char msg32[32] = {0};
+    memcpy(msg32 + 32 - msglen, msg, msglen);
+    secp256k1_scalar_t m;
     secp256k1_ecdsa_sig_t sig;
-    secp256k1_num_set_bin(&sig.r, sig64, 32);
-    secp256k1_num_set_bin(&sig.s, sig64 + 32, 32);
-    secp256k1_num_set_bin(&m, msg, msglen);
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&sig.r, sig64, &overflow);
+    if (overflow) {
+        return 0;
+    }
+    secp256k1_scalar_set_b32(&sig.s, sig64 + 32, &overflow);
+    if (overflow) {
+        return 0;
+    }
+    secp256k1_scalar_set_b32(&m, msg32, NULL);
 
     secp256k1_ge_t q;
     if (secp256k1_ecdsa_sig_recover(&sig, &q, &m, recid)) {
@@ -224,8 +239,12 @@ int secp256k1_ec_pubkey_tweak_add(unsigned char *pubkey, int pubkeylen, const un
     DEBUG_CHECK(pubkey != NULL);
     DEBUG_CHECK(tweak != NULL);
 
-    secp256k1_num_t term;
-    secp256k1_num_set_bin(&term, tweak, 32);
+    secp256k1_scalar_t term;
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&term, tweak, &overflow);
+    if (overflow) {
+        return 0;
+    }
     secp256k1_ge_t p;
     int ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen);
     if (ret) {
@@ -264,8 +283,12 @@ int secp256k1_ec_pubkey_tweak_mul(unsigned char *pubkey, int pubkeylen, const un
     DEBUG_CHECK(pubkey != NULL);
     DEBUG_CHECK(tweak != NULL);
 
-    secp256k1_num_t factor;
-    secp256k1_num_set_bin(&factor, tweak, 32);
+    secp256k1_scalar_t factor;
+    int overflow = 0;
+    secp256k1_scalar_set_b32(&factor, tweak, &overflow);
+    if (overflow) {
+        return 0;
+    }
     secp256k1_ge_t p;
     int ret = secp256k1_eckey_pubkey_parse(&p, pubkey, pubkeylen);
     if (ret) {
diff --git a/src/tests.c b/src/tests.c
index 5d9b8344d901..78cdd67f279e 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -23,23 +23,13 @@
 
 static int count = 64;
 
-/***** NUM TESTS *****/
-
-void random_num_negate(secp256k1_num_t *num) {
-    if (secp256k1_rand32() & 1)
-        secp256k1_num_negate(num);
-}
-
 void random_field_element_test(secp256k1_fe_t *fe) {
     do {
         unsigned char b32[32];
         secp256k1_rand256_test(b32);
-        secp256k1_num_t num;
-        secp256k1_num_set_bin(&num, b32, 32);
-        if (secp256k1_num_cmp(&num, &secp256k1_fe_consts->p) >= 0)
-            continue;
-        secp256k1_fe_set_b32(fe, b32);
-        break;
+        if (secp256k1_fe_set_b32(fe, b32)) {
+            break;
+        }
     } while(1);
 }
 
@@ -75,19 +65,6 @@ void random_group_element_jacobian_test(secp256k1_gej_t *gej, const secp256k1_ge
     gej->infinity = ge->infinity;
 }
 
-void random_num_order_test(secp256k1_num_t *num) {
-    do {
-        unsigned char b32[32];
-        secp256k1_rand256_test(b32);
-        secp256k1_num_set_bin(num, b32, 32);
-        if (secp256k1_num_is_zero(num))
-            continue;
-        if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
-            continue;
-        break;
-    } while(1);
-}
-
 void random_scalar_order_test(secp256k1_scalar_t *num) {
     do {
         unsigned char b32[32];
@@ -100,82 +77,36 @@ void random_scalar_order_test(secp256k1_scalar_t *num) {
     } while(1);
 }
 
-void random_num_order(secp256k1_num_t *num) {
+void random_scalar_order(secp256k1_scalar_t *num) {
     do {
         unsigned char b32[32];
         secp256k1_rand256(b32);
-        secp256k1_num_set_bin(num, b32, 32);
-        if (secp256k1_num_is_zero(num))
-            continue;
-        if (secp256k1_num_cmp(num, &secp256k1_ge_consts->order) >= 0)
+        int overflow = 0;
+        secp256k1_scalar_set_b32(num, b32, &overflow);
+        if (overflow || secp256k1_scalar_is_zero(num))
             continue;
         break;
     } while(1);
 }
 
-void test_num_copy_inc_cmp(void) {
-    secp256k1_num_t n1,n2;
-    random_num_order(&n1);
-    secp256k1_num_copy(&n2, &n1);
-    CHECK(secp256k1_num_eq(&n1, &n2));
-    CHECK(secp256k1_num_eq(&n2, &n1));
-    secp256k1_num_inc(&n2);
-    CHECK(!secp256k1_num_eq(&n1, &n2));
-    CHECK(!secp256k1_num_eq(&n2, &n1));
-}
-
+/***** NUM TESTS *****/
 
-void test_num_get_set_hex(void) {
-    secp256k1_num_t n1,n2;
-    random_num_order_test(&n1);
-    char c[64];
-    secp256k1_num_get_hex(c, 64, &n1);
-    secp256k1_num_set_hex(&n2, c, 64);
-    CHECK(secp256k1_num_eq(&n1, &n2));
-    for (int i=0; i<64; i++) {
-        /* check whether the lower 4 bits correspond to the last hex character */
-        int low1 = secp256k1_num_shift(&n1, 4);
-        int lowh = c[63];
-        int low2 = ((lowh>>6)*9+(lowh-'0'))&15;
-        CHECK(low1 == low2);
-        /* shift bits off the hex representation, and compare */
-        memmove(c+1, c, 63);
-        c[0] = '0';
-        secp256k1_num_set_hex(&n2, c, 64);
-        CHECK(secp256k1_num_eq(&n1, &n2));
-    }
+#ifndef USE_NUM_NONE
+void random_num_negate(secp256k1_num_t *num) {
+    if (secp256k1_rand32() & 1)
+        secp256k1_num_negate(num);
 }
 
-void test_num_get_set_bin(void) {
-    secp256k1_num_t n1,n2;
-    random_num_order_test(&n1);
-    unsigned char c[32];
-    secp256k1_num_get_bin(c, 32, &n1);
-    secp256k1_num_set_bin(&n2, c, 32);
-    CHECK(secp256k1_num_eq(&n1, &n2));
-    for (int i=0; i<32; i++) {
-        /* check whether the lower 8 bits correspond to the last byte */
-        int low1 = secp256k1_num_shift(&n1, 8);
-        int low2 = c[31];
-        CHECK(low1 == low2);
-        /* shift bits off the byte representation, and compare */
-        memmove(c+1, c, 31);
-        c[0] = 0;
-        secp256k1_num_set_bin(&n2, c, 32);
-        CHECK(secp256k1_num_eq(&n1, &n2));
-    }
+void random_num_order_test(secp256k1_num_t *num) {
+    secp256k1_scalar_t sc;
+    random_scalar_order_test(&sc);
+    secp256k1_scalar_get_num(num, &sc);
 }
 
-void run_num_int(void) {
-    secp256k1_num_t n1;
-    for (int i=-255; i<256; i++) {
-        unsigned char c1[3] = {};
-        c1[2] = abs(i);
-        unsigned char c2[3] = {0x11,0x22,0x33};
-        secp256k1_num_set_int(&n1, i);
-        secp256k1_num_get_bin(c2, 3, &n1);
-        CHECK(memcmp(c1, c2, 3) == 0);
-    }
+void random_num_order(secp256k1_num_t *num) {
+    secp256k1_scalar_t sc;
+    random_scalar_order(&sc);
+    secp256k1_scalar_get_num(num, &sc);
 }
 
 void test_num_negate(void) {
@@ -229,82 +160,84 @@ void test_num_add_sub(void) {
 
 void run_num_smalltests(void) {
     for (int i=0; i<100*count; i++) {
-        test_num_copy_inc_cmp();
-        test_num_get_set_hex();
-        test_num_get_set_bin();
         test_num_negate();
         test_num_add_sub();
     }
-    run_num_int();
 }
+#endif
 
 /***** SCALAR TESTS *****/
 
-int secp256k1_scalar_eq(const secp256k1_scalar_t *s1, const secp256k1_scalar_t *s2) {
-    secp256k1_scalar_t t;
-    secp256k1_scalar_negate(&t, s2);
-    secp256k1_scalar_add(&t, &t, s1);
-    int ret = secp256k1_scalar_is_zero(&t);
-    return ret;
-}
-
 void scalar_test(void) {
     unsigned char c[32];
 
     /* Set 's' to a random scalar, with value 'snum'. */
-    secp256k1_rand256_test(c);
     secp256k1_scalar_t s;
-    secp256k1_scalar_set_b32(&s, c, NULL);
-    secp256k1_num_t snum;
-    secp256k1_num_set_bin(&snum, c, 32);
-    secp256k1_num_mod(&snum, &secp256k1_ge_consts->order);
+    random_scalar_order_test(&s);
 
     /* Set 's1' to a random scalar, with value 's1num'. */
-    secp256k1_rand256_test(c);
     secp256k1_scalar_t s1;
-    secp256k1_scalar_set_b32(&s1, c, NULL);
-    secp256k1_num_t s1num;
-    secp256k1_num_set_bin(&s1num, c, 32);
-    secp256k1_num_mod(&s1num, &secp256k1_ge_consts->order);
+    random_scalar_order_test(&s1);
 
     /* Set 's2' to a random scalar, with value 'snum2', and byte array representation 'c'. */
-    secp256k1_rand256_test(c);
     secp256k1_scalar_t s2;
-    int overflow = 0;
-    secp256k1_scalar_set_b32(&s2, c, &overflow);
-    secp256k1_num_t s2num;
-    secp256k1_num_set_bin(&s2num, c, 32);
-    secp256k1_num_mod(&s2num, &secp256k1_ge_consts->order);
+    random_scalar_order_test(&s2);
+    secp256k1_scalar_get_b32(c, &s2);
+
+#ifndef USE_NUM_NONE
+    secp256k1_num_t snum, s1num, s2num;
+    secp256k1_scalar_get_num(&snum, &s);
+    secp256k1_scalar_get_num(&s1num, &s1);
+    secp256k1_scalar_get_num(&s2num, &s2);
+
+    secp256k1_num_t order;
+    secp256k1_scalar_order_get_num(&order);
+    secp256k1_num_t half_order = order;
+    secp256k1_num_shift(&half_order, 1);
+#endif
 
     {
         /* Test that fetching groups of 4 bits from a scalar and recursing n(i)=16*n(i-1)+p(i) reconstructs it. */
-        secp256k1_num_t n, t, m;
-        secp256k1_num_set_int(&n, 0);
-        secp256k1_num_set_int(&m, 16);
+        secp256k1_scalar_t n;
+        secp256k1_scalar_set_int(&n, 0);
         for (int i = 0; i < 256; i += 4) {
-            secp256k1_num_set_int(&t, secp256k1_scalar_get_bits(&s, 256 - 4 - i, 4));
-            secp256k1_num_mul(&n, &n, &m);
-            secp256k1_num_add(&n, &n, &t);
+            secp256k1_scalar_t t;
+            secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits(&s, 256 - 4 - i, 4));
+            for (int j = 0; j < 4; j++) {
+                secp256k1_scalar_add(&n, &n, &n);
+            }
+            secp256k1_scalar_add(&n, &n, &t);
         }
-        CHECK(secp256k1_num_eq(&n, &snum));
+        CHECK(secp256k1_scalar_eq(&n, &s));
     }
 
     {
-        /* Test that get_b32 returns the same as get_bin on the number. */
-        unsigned char r1[32];
-        secp256k1_scalar_get_b32(r1, &s2);
-        unsigned char r2[32];
-        secp256k1_num_get_bin(r2, 32, &s2num);
-        CHECK(memcmp(r1, r2, 32) == 0);
-        /* If no overflow occurred when assigning, it should also be equal to the original byte array. */
-        CHECK((memcmp(r1, c, 32) == 0) == (overflow == 0));
+        /* Test that fetching groups of randomly-sized bits from a scalar and recursing n(i)=b*n(i-1)+p(i) reconstructs it. */
+        secp256k1_scalar_t n;
+        secp256k1_scalar_set_int(&n, 0);
+        int i = 0;
+        while (i < 256) {
+            int now = (secp256k1_rand32() % 15) + 1;
+            if (now + i > 256) {
+                now = 256 - i;
+            }
+            secp256k1_scalar_t t;
+            secp256k1_scalar_set_int(&t, secp256k1_scalar_get_bits_var(&s, 256 - now - i, now));
+            for (int j = 0; j < now; j++) {
+                secp256k1_scalar_add(&n, &n, &n);
+            }
+            secp256k1_scalar_add(&n, &n, &t);
+            i += now;
+        }
+        CHECK(secp256k1_scalar_eq(&n, &s));
     }
 
+#ifndef USE_NUM_NONE
     {
         /* Test that adding the scalars together is equal to adding their numbers together modulo the order. */
         secp256k1_num_t rnum;
         secp256k1_num_add(&rnum, &snum, &s2num);
-        secp256k1_num_mod(&rnum, &secp256k1_ge_consts->order);
+        secp256k1_num_mod(&rnum, &order);
         secp256k1_scalar_t r;
         secp256k1_scalar_add(&r, &s, &s2);
         secp256k1_num_t r2num;
@@ -316,7 +249,7 @@ void scalar_test(void) {
         /* Test that multipying the scalars is equal to multiplying their numbers modulo the order. */
         secp256k1_num_t rnum;
         secp256k1_num_mul(&rnum, &snum, &s2num);
-        secp256k1_num_mod(&rnum, &secp256k1_ge_consts->order);
+        secp256k1_num_mod(&rnum, &order);
         secp256k1_scalar_t r;
         secp256k1_scalar_mul(&r, &s, &s2);
         secp256k1_num_t r2num;
@@ -333,14 +266,14 @@ void scalar_test(void) {
         /* Check that comparison with zero matches comparison with zero on the number. */
         CHECK(secp256k1_num_is_zero(&snum) == secp256k1_scalar_is_zero(&s));
         /* Check that comparison with the half order is equal to testing for high scalar. */
-        CHECK(secp256k1_scalar_is_high(&s) == (secp256k1_num_cmp(&snum, &secp256k1_ge_consts->half_order) > 0));
+        CHECK(secp256k1_scalar_is_high(&s) == (secp256k1_num_cmp(&snum, &half_order) > 0));
         secp256k1_scalar_t neg;
         secp256k1_scalar_negate(&neg, &s);
         secp256k1_num_t negnum;
-        secp256k1_num_sub(&negnum, &secp256k1_ge_consts->order, &snum);
-        secp256k1_num_mod(&negnum, &secp256k1_ge_consts->order);
+        secp256k1_num_sub(&negnum, &order, &snum);
+        secp256k1_num_mod(&negnum, &order);
         /* Check that comparison with the half order is equal to testing for high scalar after negation. */
-        CHECK(secp256k1_scalar_is_high(&neg) == (secp256k1_num_cmp(&negnum, &secp256k1_ge_consts->half_order) > 0));
+        CHECK(secp256k1_scalar_is_high(&neg) == (secp256k1_num_cmp(&negnum, &half_order) > 0));
         /* Negating should change the high property, unless the value was already zero. */
         CHECK((secp256k1_scalar_is_high(&s) == secp256k1_scalar_is_high(&neg)) == secp256k1_scalar_is_zero(&s));
         secp256k1_num_t negnum2;
@@ -355,16 +288,37 @@ void scalar_test(void) {
         CHECK(secp256k1_scalar_is_zero(&neg));
     }
 
+    {
+        /* Test secp256k1_scalar_mul_shift_var. */
+        secp256k1_scalar_t r;
+        unsigned int shift = 256 + (secp256k1_rand32() % 257);
+        secp256k1_scalar_mul_shift_var(&r, &s1, &s2, shift);
+        secp256k1_num_t rnum;
+        secp256k1_num_mul(&rnum, &s1num, &s2num);
+        secp256k1_num_shift(&rnum, shift - 1);
+        secp256k1_num_t one;
+        unsigned char cone[1] = {0x01};
+        secp256k1_num_set_bin(&one, cone, 1);
+        secp256k1_num_add(&rnum, &rnum, &one);
+        secp256k1_num_shift(&rnum, 1);
+        secp256k1_num_t rnum2;
+        secp256k1_scalar_get_num(&rnum2, &r);
+        CHECK(secp256k1_num_eq(&rnum, &rnum2));
+    }
+#endif
+
     {
         /* Test that scalar inverses are equal to the inverse of their number modulo the order. */
         if (!secp256k1_scalar_is_zero(&s)) {
             secp256k1_scalar_t inv;
             secp256k1_scalar_inverse(&inv, &s);
+#ifndef USE_NUM_NONE
             secp256k1_num_t invnum;
-            secp256k1_num_mod_inverse(&invnum, &snum, &secp256k1_ge_consts->order);
+            secp256k1_num_mod_inverse(&invnum, &snum, &order);
             secp256k1_num_t invnum2;
             secp256k1_scalar_get_num(&invnum2, &inv);
             CHECK(secp256k1_num_eq(&invnum, &invnum2));
+#endif
             secp256k1_scalar_mul(&inv, &inv, &s);
             /* Multiplying a scalar with its inverse must result in one. */
             CHECK(secp256k1_scalar_is_one(&inv));
@@ -382,6 +336,23 @@ void scalar_test(void) {
         CHECK(secp256k1_scalar_eq(&r1, &r2));
     }
 
+    {
+        /* Test add_bit. */
+        int bit = secp256k1_rand32() % 256;
+        secp256k1_scalar_t b;
+        secp256k1_scalar_set_int(&b, 1);
+        CHECK(secp256k1_scalar_is_one(&b));
+        for (int i = 0; i < bit; i++) {
+            secp256k1_scalar_add(&b, &b, &b);
+        }
+        secp256k1_scalar_t r1 = s1, r2 = s1;
+        if (!secp256k1_scalar_add(&r1, &r1, &b)) {
+            /* No overflow happened. */
+            secp256k1_scalar_add_bit(&r2, bit);
+            CHECK(secp256k1_scalar_eq(&r1, &r2));
+        }
+    }
+
     {
         /* Test commutativity of mul. */
         secp256k1_scalar_t r1, r2;
@@ -428,20 +399,49 @@ void scalar_test(void) {
         secp256k1_scalar_mul(&r2, &s1, &s1);
         CHECK(secp256k1_scalar_eq(&r1, &r2));
     }
+
 }
 
 void run_scalar_tests(void) {
     for (int i = 0; i < 128 * count; i++) {
         scalar_test();
     }
+
+    {
+        /* (-1)+1 should be zero. */
+        secp256k1_scalar_t s, o;
+        secp256k1_scalar_set_int(&s, 1);
+        secp256k1_scalar_negate(&o, &s);
+        secp256k1_scalar_add(&o, &o, &s);
+        CHECK(secp256k1_scalar_is_zero(&o));
+    }
+
+#ifndef USE_NUM_NONE
+    {
+        /* A scalar with value of the curve order should be 0. */
+        secp256k1_num_t order;
+        secp256k1_scalar_order_get_num(&order);
+        unsigned char bin[32];
+        secp256k1_num_get_bin(bin, 32, &order);
+        secp256k1_scalar_t zero;
+        int overflow = 0;
+        secp256k1_scalar_set_b32(&zero, bin, &overflow);
+        CHECK(overflow == 1);
+        CHECK(secp256k1_scalar_is_zero(&zero));
+    }
+#endif
 }
 
 /***** FIELD TESTS *****/
 
 void random_fe(secp256k1_fe_t *x) {
     unsigned char bin[32];
-    secp256k1_rand256(bin);
-    secp256k1_fe_set_b32(x, bin);
+    do {
+        secp256k1_rand256(bin);
+        if (secp256k1_fe_set_b32(x, bin)) {
+            return;
+        }
+    } while(1);
 }
 
 void random_fe_non_zero(secp256k1_fe_t *nz) {
@@ -617,9 +617,17 @@ void gej_equals_gej(const secp256k1_gej_t *a, const secp256k1_gej_t *b) {
 }
 
 void test_ge(void) {
+    char ca[135];
+    char cb[68];
+    int rlen;
     secp256k1_ge_t a, b, i, n;
     random_group_element_test(&a);
     random_group_element_test(&b);
+    rlen = sizeof(ca);
+    secp256k1_ge_get_hex(ca,&rlen,&a);
+    CHECK(rlen > 4 && rlen <= (int)sizeof(ca));
+    rlen = sizeof(cb);
+    secp256k1_ge_get_hex(cb,&rlen,&b); /* Intentionally undersized buffer. */
     n = a;
     secp256k1_fe_normalize(&a.y);
     secp256k1_fe_negate(&n.y, &a.y, 1);
@@ -697,39 +705,51 @@ void run_ge(void) {
 
 void run_ecmult_chain(void) {
     /* random starting point A (on the curve) */
-    secp256k1_fe_t ax; secp256k1_fe_set_hex(&ax, "8b30bbe9ae2a990696b22f670709dff3727fd8bc04d3362c6c7bf458e2846004", 64);
-    secp256k1_fe_t ay; secp256k1_fe_set_hex(&ay, "a357ae915c4a65281309edf20504740f0eb3343990216b4f81063cb65f2f7e0f", 64);
+    secp256k1_fe_t ax; VERIFY_CHECK(secp256k1_fe_set_hex(&ax, "8b30bbe9ae2a990696b22f670709dff3727fd8bc04d3362c6c7bf458e2846004", 64));
+    secp256k1_fe_t ay; VERIFY_CHECK(secp256k1_fe_set_hex(&ay, "a357ae915c4a65281309edf20504740f0eb3343990216b4f81063cb65f2f7e0f", 64));
     secp256k1_gej_t a; secp256k1_gej_set_xy(&a, &ax, &ay);
     /* two random initial factors xn and gn */
-    secp256k1_num_t xn;
-    secp256k1_num_set_hex(&xn, "84cc5452f7fde1edb4d38a8ce9b1b84ccef31f146e569be9705d357a42985407", 64);
-    secp256k1_num_t gn;
-    secp256k1_num_set_hex(&gn, "a1e58d22553dcd42b23980625d4c57a96e9323d42b3152e5ca2c3990edc7c9de", 64);
+    static const unsigned char xni[32] = {
+        0x84, 0xcc, 0x54, 0x52, 0xf7, 0xfd, 0xe1, 0xed,
+        0xb4, 0xd3, 0x8a, 0x8c, 0xe9, 0xb1, 0xb8, 0x4c,
+        0xce, 0xf3, 0x1f, 0x14, 0x6e, 0x56, 0x9b, 0xe9,
+        0x70, 0x5d, 0x35, 0x7a, 0x42, 0x98, 0x54, 0x07
+    };
+    secp256k1_scalar_t xn;
+    secp256k1_scalar_set_b32(&xn, xni, NULL);
+    static const unsigned char gni[32] = {
+        0xa1, 0xe5, 0x8d, 0x22, 0x55, 0x3d, 0xcd, 0x42,
+        0xb2, 0x39, 0x80, 0x62, 0x5d, 0x4c, 0x57, 0xa9,
+        0x6e, 0x93, 0x23, 0xd4, 0x2b, 0x31, 0x52, 0xe5,
+        0xca, 0x2c, 0x39, 0x90, 0xed, 0xc7, 0xc9, 0xde
+    };
+    secp256k1_scalar_t gn;
+    secp256k1_scalar_set_b32(&gn, gni, NULL);
     /* two small multipliers to be applied to xn and gn in every iteration: */
-    secp256k1_num_t xf;
-    secp256k1_num_set_hex(&xf, "1337", 4);
-    secp256k1_num_t gf;
-    secp256k1_num_set_hex(&gf, "7113", 4);
+    static const unsigned char xfi[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x13,0x37};
+    secp256k1_scalar_t xf;
+    secp256k1_scalar_set_b32(&xf, xfi, NULL);
+    static const unsigned char gfi[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x71,0x13};
+    secp256k1_scalar_t gf;
+    secp256k1_scalar_set_b32(&gf, gfi, NULL);
     /* accumulators with the resulting coefficients to A and G */
-    secp256k1_num_t ae;
-    secp256k1_num_set_int(&ae, 1);
-    secp256k1_num_t ge;
-    secp256k1_num_set_int(&ge, 0);
+    secp256k1_scalar_t ae;
+    secp256k1_scalar_set_int(&ae, 1);
+    secp256k1_scalar_t ge;
+    secp256k1_scalar_set_int(&ge, 0);
     /* the point being computed */
     secp256k1_gej_t x = a;
-    const secp256k1_num_t *order = &secp256k1_ge_consts->order;
     for (int i=0; i<200*count; i++) {
         /* in each iteration, compute X = xn*X + gn*G; */
         secp256k1_ecmult(&x, &x, &xn, &gn);
         /* also compute ae and ge: the actual accumulated factors for A and G */
         /* if X was (ae*A+ge*G), xn*X + gn*G results in (xn*ae*A + (xn*ge+gn)*G) */
-        secp256k1_num_mod_mul(&ae, &ae, &xn, order);
-        secp256k1_num_mod_mul(&ge, &ge, &xn, order);
-        secp256k1_num_add(&ge, &ge, &gn);
-        secp256k1_num_mod(&ge, order);
+        secp256k1_scalar_mul(&ae, &ae, &xn);
+        secp256k1_scalar_mul(&ge, &ge, &xn);
+        secp256k1_scalar_add(&ge, &ge, &gn);
         /* modify xn and gn */
-        secp256k1_num_mod_mul(&xn, &xn, &xf, order);
-        secp256k1_num_mod_mul(&gn, &gn, &gf, order);
+        secp256k1_scalar_mul(&xn, &xn, &xf);
+        secp256k1_scalar_mul(&gn, &gn, &gf);
 
         /* verify */
         if (i == 19999) {
@@ -749,17 +769,25 @@ void run_ecmult_chain(void) {
 }
 
 void test_point_times_order(const secp256k1_gej_t *point) {
-    /* multiplying a point by the order results in O */
-    const secp256k1_num_t *order = &secp256k1_ge_consts->order;
-    secp256k1_num_t zero;
-    secp256k1_num_set_int(&zero, 0);
-    secp256k1_gej_t res;
-    secp256k1_ecmult(&res, point, order, order); /* calc res = order * point + order * G; */
-    CHECK(secp256k1_gej_is_infinity(&res));
+    /* X * (point + G) + (order-X) * (pointer + G) = 0 */
+    secp256k1_scalar_t x;
+    random_scalar_order_test(&x);
+    secp256k1_scalar_t nx;
+    secp256k1_scalar_negate(&nx, &x);
+    secp256k1_gej_t res1, res2;
+    secp256k1_ecmult(&res1, point, &x, &x); /* calc res1 = x * point + x * G; */
+    secp256k1_ecmult(&res2, point, &nx, &nx); /* calc res2 = (order - x) * point + (order - x) * G; */
+    secp256k1_gej_add_var(&res1, &res1, &res2);
+    CHECK(secp256k1_gej_is_infinity(&res1));
+    CHECK(secp256k1_gej_is_valid(&res1) == 0);
+    secp256k1_ge_t res3;
+    secp256k1_ge_set_gej(&res3, &res1);
+    CHECK(secp256k1_ge_is_infinity(&res3));
+    CHECK(secp256k1_ge_is_valid(&res3) == 0);
 }
 
 void run_point_times_order(void) {
-    secp256k1_fe_t x; secp256k1_fe_set_hex(&x, "02", 2);
+    secp256k1_fe_t x; VERIFY_CHECK(secp256k1_fe_set_hex(&x, "02", 2));
     for (int i=0; i<500; i++) {
         secp256k1_ge_t p;
         if (secp256k1_ge_set_xo(&p, &x, 1)) {
@@ -776,15 +804,16 @@ void run_point_times_order(void) {
     CHECK(strcmp(c, "7603CB59B0EF6C63FE6084792A0C378CDB3233A80F8A9A09A877DEAD31B38C45") == 0);
 }
 
-void test_wnaf(const secp256k1_num_t *number, int w) {
-    secp256k1_num_t x, two, t;
-    secp256k1_num_set_int(&x, 0);
-    secp256k1_num_set_int(&two, 2);
-    int wnaf[257];
+void test_wnaf(const secp256k1_scalar_t *number, int w) {
+    secp256k1_scalar_t x, two, t;
+    secp256k1_scalar_set_int(&x, 0);
+    secp256k1_scalar_set_int(&two, 2);
+    int wnaf[256];
     int bits = secp256k1_ecmult_wnaf(wnaf, number, w);
+    CHECK(bits <= 256);
     int zeroes = -1;
     for (int i=bits-1; i>=0; i--) {
-        secp256k1_num_mul(&x, &x, &two);
+        secp256k1_scalar_mul(&x, &x, &two);
         int v = wnaf[i];
         if (v) {
             CHECK(zeroes == -1 || zeroes >= w-1); /* check that distance between non-zero elements is at least w-1 */
@@ -796,18 +825,23 @@ void test_wnaf(const secp256k1_num_t *number, int w) {
             CHECK(zeroes != -1); /* check that no unnecessary zero padding exists */
             zeroes++;
         }
-        secp256k1_num_set_int(&t, v);
-        secp256k1_num_add(&x, &x, &t);
+        if (v >= 0) {
+            secp256k1_scalar_set_int(&t, v);
+        } else {
+            secp256k1_scalar_set_int(&t, -v);
+            secp256k1_scalar_negate(&t, &t);
+        }
+        secp256k1_scalar_add(&x, &x, &t);
     }
-    CHECK(secp256k1_num_eq(&x, number)); /* check that wnaf represents number */
+    CHECK(secp256k1_scalar_eq(&x, number)); /* check that wnaf represents number */
 }
 
 void run_wnaf(void) {
-    secp256k1_num_t n;
+    secp256k1_scalar_t n;
     for (int i=0; i<count; i++) {
-        random_num_order(&n);
+        random_scalar_order(&n);
         if (i % 1)
-            secp256k1_num_negate(&n);
+            secp256k1_scalar_negate(&n, &n);
         test_wnaf(&n, 4+(i%10));
     }
 }
@@ -820,18 +854,22 @@ void random_sign(secp256k1_ecdsa_sig_t *sig, const secp256k1_scalar_t *key, cons
 }
 
 void test_ecdsa_sign_verify(void) {
+    int recid;
+    int getrec;
     secp256k1_scalar_t msg, key;
     random_scalar_order_test(&msg);
     random_scalar_order_test(&key);
     secp256k1_gej_t pubj; secp256k1_ecmult_gen(&pubj, &key);
     secp256k1_ge_t pub; secp256k1_ge_set_gej(&pub, &pubj);
     secp256k1_ecdsa_sig_t sig;
-    random_sign(&sig, &key, &msg, NULL);
-    secp256k1_num_t msg_num;
-    secp256k1_scalar_get_num(&msg_num, &msg);
-    CHECK(secp256k1_ecdsa_sig_verify(&sig, &pub, &msg_num));
-    secp256k1_num_inc(&msg_num);
-    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &pub, &msg_num));
+    getrec = secp256k1_rand32()&1;
+    random_sign(&sig, &key, &msg, getrec?&recid:NULL);
+    if (getrec) CHECK(recid >= 0 && recid < 4);
+    CHECK(secp256k1_ecdsa_sig_verify(&sig, &pub, &msg));
+    secp256k1_scalar_t one;
+    secp256k1_scalar_set_int(&one, 1);
+    secp256k1_scalar_add(&msg, &msg, &one);
+    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &pub, &msg));
 }
 
 void run_ecdsa_sign_verify(void) {
@@ -846,11 +884,11 @@ void test_ecdsa_end_to_end(void) {
 
     /* Generate a random key and message. */
     {
-        secp256k1_num_t msg, key;
-        random_num_order_test(&msg);
-        random_num_order_test(&key);
-        secp256k1_num_get_bin(privkey, 32, &key);
-        secp256k1_num_get_bin(message, 32, &msg);
+        secp256k1_scalar_t msg, key;
+        random_scalar_order_test(&msg);
+        random_scalar_order_test(&key);
+        secp256k1_scalar_get_b32(privkey, &key);
+        secp256k1_scalar_get_b32(message, &msg);
     }
 
     /* Construct and verify corresponding public key. */
@@ -935,7 +973,8 @@ void run_ecdsa_end_to_end(void) {
     }
 }
 
-void test_ecdsa_infinity(void) {
+/* Tests several edge cases. */
+void test_ecdsa_edge_cases(void) {
     const unsigned char msg32[32] = {
         'T', 'h', 'i', 's', ' ', 'i', 's', ' ',
         'a', ' ', 'v', 'e', 'r', 'y', ' ', 's',
@@ -943,8 +982,8 @@ void test_ecdsa_infinity(void) {
         's', 's', 'a', 'g', 'e', '.', '.', '.'
     };
     const unsigned char sig64[64] = {
-        // Generated by signing the above message with nonce 'This is the nonce we will use...'
-        // and secret key 0 (which is not valid), resulting in recid 0.
+        /* Generated by signing the above message with nonce 'This is the nonce we will use...'
+         * and secret key 0 (which is not valid), resulting in recid 0. */
         0x67, 0xCB, 0x28, 0x5F, 0x9C, 0xD1, 0x94, 0xE8,
         0x40, 0xD6, 0x29, 0x39, 0x7A, 0xF5, 0x56, 0x96,
         0x62, 0xFD, 0xE4, 0x46, 0x49, 0x99, 0x59, 0x63,
@@ -960,10 +999,93 @@ void test_ecdsa_infinity(void) {
     CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 1));
     CHECK(!secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 2));
     CHECK(!secp256k1_ecdsa_recover_compact(msg32, 32, sig64, pubkey, &pubkeylen, 0, 3));
+
+    /* signature (r,s) = (4,4), which can be recovered with all 4 recids. */
+    const unsigned char sigb64[64] = {
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
+    };
+    unsigned char pubkeyb[33];
+    int pubkeyblen = 33;
+    for (int recid = 0; recid < 4; recid++) {
+        /* (4,4) encoded in DER. */
+        unsigned char sigbder[8] = {0x30, 0x06, 0x02, 0x01, 0x04, 0x02, 0x01, 0x04};
+        /* (order + r,4) encoded in DER. */
+        unsigned char sigbderlong[40] = {
+            0x30, 0x26, 0x02, 0x21, 0x00, 0xFF, 0xFF, 0xFF,
+            0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+            0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xBA, 0xAE, 0xDC,
+            0xE6, 0xAF, 0x48, 0xA0, 0x3B, 0xBF, 0xD2, 0x5E,
+            0x8C, 0xD0, 0x36, 0x41, 0x45, 0x02, 0x01, 0x04
+        };
+        CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sigb64, pubkeyb, &pubkeyblen, 1, recid));
+        CHECK(secp256k1_ecdsa_verify(msg32, 32, sigbder, sizeof(sigbder), pubkeyb, pubkeyblen) == 1);
+        for (int recid2 = 0; recid2 < 4; recid2++) {
+            unsigned char pubkey2b[33];
+            int pubkey2blen = 33;
+            CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sigb64, pubkey2b, &pubkey2blen, 1, recid2));
+            /* Verifying with (order + r,4) should always fail. */
+            CHECK(secp256k1_ecdsa_verify(msg32, 32, sigbderlong, sizeof(sigbderlong), pubkey2b, pubkey2blen) != 1);
+        }
+        /* Damage signature. */
+        sigbder[7]++;
+        CHECK(secp256k1_ecdsa_verify(msg32, 32, sigbder, sizeof(sigbder), pubkeyb, pubkeyblen) == 0);
+    }
+
+    /* Test the case where ECDSA recomputes a point that is infinity. */
+    {
+        secp256k1_ecdsa_sig_t sig;
+        secp256k1_scalar_set_int(&sig.s, 1);
+        secp256k1_scalar_negate(&sig.s, &sig.s);
+        secp256k1_scalar_inverse(&sig.s, &sig.s);
+        secp256k1_scalar_set_int(&sig.r, 1);
+        secp256k1_gej_t keyj;
+        secp256k1_ecmult_gen(&keyj, &sig.r);
+        secp256k1_ge_t key;
+        secp256k1_ge_set_gej(&key, &keyj);
+        secp256k1_scalar_t msg = sig.s;
+        CHECK(secp256k1_ecdsa_sig_verify(&sig, &key, &msg) == 0);
+    }
+
+    /* Test r/s equal to zero */
+    {
+        /* (1,1) encoded in DER. */
+        unsigned char sigcder[8] = {0x30, 0x06, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01};
+        unsigned char sigc64[64] = {
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+        };
+        unsigned char pubkeyc[65];
+        int pubkeyclen = 65;
+        CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sigc64, pubkeyc, &pubkeyclen, 0, 0) == 1);
+        CHECK(secp256k1_ecdsa_verify(msg32, 32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 1);
+        sigcder[4] = 0;
+        sigc64[31] = 0;
+        CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sigc64, pubkeyb, &pubkeyblen, 1, 0) == 0);
+        CHECK(secp256k1_ecdsa_verify(msg32, 32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 0);
+        sigcder[4] = 1;
+        sigcder[7] = 0;
+        sigc64[31] = 1;
+        sigc64[63] = 0;
+        CHECK(secp256k1_ecdsa_recover_compact(msg32, 32, sigc64, pubkeyb, &pubkeyblen, 1, 0) == 0);
+        CHECK(secp256k1_ecdsa_verify(msg32, 32, sigcder, sizeof(sigcder), pubkeyc, pubkeyclen) == 0);
+    }
 }
 
-void run_ecdsa_infinity(void) {
-    test_ecdsa_infinity();
+void run_ecdsa_edge_cases(void) {
+    test_ecdsa_edge_cases();
 }
 
 #ifdef ENABLE_OPENSSL_TESTS
@@ -996,11 +1118,12 @@ void test_ecdsa_openssl(void) {
     CHECK(ECDSA_sign(0, message, sizeof(message), signature, &sigsize, ec_key));
     secp256k1_ecdsa_sig_t sig;
     CHECK(secp256k1_ecdsa_sig_parse(&sig, signature, sigsize));
-    secp256k1_num_t msg_num;
-    secp256k1_scalar_get_num(&msg_num, &msg);
-    CHECK(secp256k1_ecdsa_sig_verify(&sig, &q, &msg_num));
-    secp256k1_num_inc(&sig.r);
-    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &q, &msg_num));
+    CHECK(secp256k1_ecdsa_sig_verify(&sig, &q, &msg));
+    secp256k1_scalar_t one;
+    secp256k1_scalar_set_int(&one, 1);
+    secp256k1_scalar_t msg2;
+    secp256k1_scalar_add(&msg2, &msg, &one);
+    CHECK(!secp256k1_ecdsa_sig_verify(&sig, &q, &msg2));
 
     random_sign(&sig, &key, &msg, NULL);
     int secp_sigsize = 80;
@@ -1042,8 +1165,19 @@ int main(int argc, char **argv) {
     /* initialize */
     secp256k1_start(SECP256K1_START_SIGN | SECP256K1_START_VERIFY);
 
+    /* initializing a second time shouldn't cause any harm or memory leaks. */
+    secp256k1_start(SECP256K1_START_SIGN | SECP256K1_START_VERIFY);
+
+    /* Likewise, re-running the internal init functions should be harmless. */
+    secp256k1_fe_start();
+    secp256k1_ge_start();
+    secp256k1_scalar_start();
+    secp256k1_ecdsa_start();
+
+#ifndef USE_NUM_NONE
     /* num tests */
     run_num_smalltests();
+#endif
 
     /* scalar tests */
     run_scalar_tests();
@@ -1067,7 +1201,7 @@ int main(int argc, char **argv) {
     /* ecdsa tests */
     run_ecdsa_sign_verify();
     run_ecdsa_end_to_end();
-    run_ecdsa_infinity();
+    run_ecdsa_edge_cases();
 #ifdef ENABLE_OPENSSL_TESTS
     run_ecdsa_openssl();
 #endif
@@ -1076,5 +1210,14 @@ int main(int argc, char **argv) {
 
     /* shutdown */
     secp256k1_stop();
+
+    /* shutting down twice shouldn't cause any double frees. */
+    secp256k1_stop();
+
+    /* Same for the internal shutdown functions. */
+    secp256k1_fe_stop();
+    secp256k1_ge_stop();
+    secp256k1_scalar_stop();
+    secp256k1_ecdsa_stop();
     return 0;
 }
diff --git a/src/util.h b/src/util.h
index 96b47057c02c..08b23a9d38c2 100644
--- a/src/util.h
+++ b/src/util.h
@@ -61,4 +61,21 @@
 #define VERIFY_CHECK(cond) do { (void)(cond); } while(0)
 #endif
 
+/* Macro for restrict, when available and not in a VERIFY build. */
+#if defined(SECP256K1_BUILD) && defined(VERIFY)
+# define SECP256K1_RESTRICT
+#else
+# if (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) )
+#  if SECP256K1_GNUC_PREREQ(3,0)
+#   define SECP256K1_RESTRICT __restrict__
+#  elif (defined(_MSC_VER) && _MSC_VER >= 1400)
+#   define SECP256K1_RESTRICT __restrict
+#  else
+#   define SECP256K1_RESTRICT
+#  endif
+# else
+#  define SECP256K1_RESTRICT restrict
+# endif
+#endif
+
 #endif

From afd4b94b6dabab29dee5a12966ce217700381682 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Thu, 30 Oct 2014 15:50:15 -0700
Subject: [PATCH 1161/1819] Move CMerkleBlock and CPartialMerkleTree to their
 own file

---
 src/Makefile.am          |   2 +
 src/bitcoin-tx.cpp       |   4 +-
 src/main.cpp             | 154 +--------------------------------------
 src/main.h               | 138 -----------------------------------
 src/merkleblock.cpp      | 152 ++++++++++++++++++++++++++++++++++++++
 src/merkleblock.h        | 151 ++++++++++++++++++++++++++++++++++++++
 src/primitives/block.h   |   3 +
 src/test/bloom_tests.cpp |   4 +-
 src/test/pmt_tests.cpp   |   4 +-
 9 files changed, 318 insertions(+), 294 deletions(-)
 create mode 100644 src/merkleblock.cpp
 create mode 100644 src/merkleblock.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 69b3a6d4f114..d6ac6e127762 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,6 +101,7 @@ BITCOIN_CORE_H = \
   leveldbwrapper.h \
   limitedmap.h \
   main.h \
+  merkleblock.h \
   miner.h \
   mruset.h \
   netbase.h \
@@ -168,6 +169,7 @@ libbitcoin_server_a_SOURCES = \
   init.cpp \
   leveldbwrapper.cpp \
   main.cpp \
+  merkleblock.cpp \
   miner.cpp \
   net.cpp \
   noui.cpp \
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 1cceab318818..ce66dfbe965c 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -4,15 +4,17 @@
 
 #include "base58.h"
 #include "clientversion.h"
+#include "primitives/block.h" // for MAX_BLOCK_SIZE
 #include "primitives/transaction.h"
 #include "core_io.h"
+#include "coins.h"
 #include "keystore.h"
-#include "main.h" // for MAX_BLOCK_SIZE
 #include "script/script.h"
 #include "script/sign.h"
 #include "ui_interface.h" // for _(...)
 #include "univalue/univalue.h"
 #include "util.h"
+#include "utilstrencodings.h"
 #include "utilmoneystr.h"
 
 #include <stdio.h>
diff --git a/src/main.cpp b/src/main.cpp
index 451d6c8cd963..cea2925fe237 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,6 +11,7 @@
 #include "checkpoints.h"
 #include "checkqueue.h"
 #include "init.h"
+#include "merkleblock.h"
 #include "net.h"
 #include "pow.h"
 #include "txdb.h"
@@ -2720,159 +2721,6 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
 
 
 
-CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
-{
-    header = block.GetBlockHeader();
-
-    vector<bool> vMatch;
-    vector<uint256> vHashes;
-
-    vMatch.reserve(block.vtx.size());
-    vHashes.reserve(block.vtx.size());
-
-    for (unsigned int i = 0; i < block.vtx.size(); i++)
-    {
-        const uint256& hash = block.vtx[i].GetHash();
-        if (filter.IsRelevantAndUpdate(block.vtx[i]))
-        {
-            vMatch.push_back(true);
-            vMatchedTxn.push_back(make_pair(i, hash));
-        }
-        else
-            vMatch.push_back(false);
-        vHashes.push_back(hash);
-    }
-
-    txn = CPartialMerkleTree(vHashes, vMatch);
-}
-
-
-
-
-
-
-
-
-uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::vector<uint256> &vTxid) {
-    if (height == 0) {
-        // hash at height 0 is the txids themself
-        return vTxid[pos];
-    } else {
-        // calculate left hash
-        uint256 left = CalcHash(height-1, pos*2, vTxid), right;
-        // calculate right hash if not beyond the end of the array - copy left hash otherwise1
-        if (pos*2+1 < CalcTreeWidth(height-1))
-            right = CalcHash(height-1, pos*2+1, vTxid);
-        else
-            right = left;
-        // combine subhashes
-        return Hash(BEGIN(left), END(left), BEGIN(right), END(right));
-    }
-}
-
-void CPartialMerkleTree::TraverseAndBuild(int height, unsigned int pos, const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch) {
-    // determine whether this node is the parent of at least one matched txid
-    bool fParentOfMatch = false;
-    for (unsigned int p = pos << height; p < (pos+1) << height && p < nTransactions; p++)
-        fParentOfMatch |= vMatch[p];
-    // store as flag bit
-    vBits.push_back(fParentOfMatch);
-    if (height==0 || !fParentOfMatch) {
-        // if at height 0, or nothing interesting below, store hash and stop
-        vHash.push_back(CalcHash(height, pos, vTxid));
-    } else {
-        // otherwise, don't store any hash, but descend into the subtrees
-        TraverseAndBuild(height-1, pos*2, vTxid, vMatch);
-        if (pos*2+1 < CalcTreeWidth(height-1))
-            TraverseAndBuild(height-1, pos*2+1, vTxid, vMatch);
-    }
-}
-
-uint256 CPartialMerkleTree::TraverseAndExtract(int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector<uint256> &vMatch) {
-    if (nBitsUsed >= vBits.size()) {
-        // overflowed the bits array - failure
-        fBad = true;
-        return 0;
-    }
-    bool fParentOfMatch = vBits[nBitsUsed++];
-    if (height==0 || !fParentOfMatch) {
-        // if at height 0, or nothing interesting below, use stored hash and do not descend
-        if (nHashUsed >= vHash.size()) {
-            // overflowed the hash array - failure
-            fBad = true;
-            return 0;
-        }
-        const uint256 &hash = vHash[nHashUsed++];
-        if (height==0 && fParentOfMatch) // in case of height 0, we have a matched txid
-            vMatch.push_back(hash);
-        return hash;
-    } else {
-        // otherwise, descend into the subtrees to extract matched txids and hashes
-        uint256 left = TraverseAndExtract(height-1, pos*2, nBitsUsed, nHashUsed, vMatch), right;
-        if (pos*2+1 < CalcTreeWidth(height-1))
-            right = TraverseAndExtract(height-1, pos*2+1, nBitsUsed, nHashUsed, vMatch);
-        else
-            right = left;
-        // and combine them before returning
-        return Hash(BEGIN(left), END(left), BEGIN(right), END(right));
-    }
-}
-
-CPartialMerkleTree::CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch) : nTransactions(vTxid.size()), fBad(false) {
-    // reset state
-    vBits.clear();
-    vHash.clear();
-
-    // calculate height of tree
-    int nHeight = 0;
-    while (CalcTreeWidth(nHeight) > 1)
-        nHeight++;
-
-    // traverse the partial tree
-    TraverseAndBuild(nHeight, 0, vTxid, vMatch);
-}
-
-CPartialMerkleTree::CPartialMerkleTree() : nTransactions(0), fBad(true) {}
-
-uint256 CPartialMerkleTree::ExtractMatches(std::vector<uint256> &vMatch) {
-    vMatch.clear();
-    // An empty set will not work
-    if (nTransactions == 0)
-        return 0;
-    // check for excessively high numbers of transactions
-    if (nTransactions > MAX_BLOCK_SIZE / 60) // 60 is the lower bound for the size of a serialized CTransaction
-        return 0;
-    // there can never be more hashes provided than one for every txid
-    if (vHash.size() > nTransactions)
-        return 0;
-    // there must be at least one bit per node in the partial tree, and at least one node per hash
-    if (vBits.size() < vHash.size())
-        return 0;
-    // calculate height of tree
-    int nHeight = 0;
-    while (CalcTreeWidth(nHeight) > 1)
-        nHeight++;
-    // traverse the partial tree
-    unsigned int nBitsUsed = 0, nHashUsed = 0;
-    uint256 hashMerkleRoot = TraverseAndExtract(nHeight, 0, nBitsUsed, nHashUsed, vMatch);
-    // verify that no problems occured during the tree traversal
-    if (fBad)
-        return 0;
-    // verify that all bits were consumed (except for the padding caused by serializing it as a byte sequence)
-    if ((nBitsUsed+7)/8 != (vBits.size()+7)/8)
-        return 0;
-    // verify that all hashes were consumed
-    if (nHashUsed != vHash.size())
-        return 0;
-    return hashMerkleRoot;
-}
-
-
-
-
-
-
-
 bool AbortNode(const std::string &strMessage, const std::string &userMessage) {
     strMiscWarning = strMessage;
     LogPrintf("*** %s\n", strMessage);
diff --git a/src/main.h b/src/main.h
index fc9913b7c6df..dc833673aec2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -49,8 +49,6 @@ class CValidationState;
 struct CBlockTemplate;
 struct CNodeStateStats;
 
-/** The maximum allowed size for a serialized block, in bytes (network rule) */
-static const unsigned int MAX_BLOCK_SIZE = 1000000;
 /** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/
 static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000;
 static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0;
@@ -352,110 +350,6 @@ class CScriptCheck
     }
 };
 
-/** Data structure that represents a partial merkle tree.
- *
- * It represents a subset of the txid's of a known block, in a way that
- * allows recovery of the list of txid's and the merkle root, in an
- * authenticated way.
- *
- * The encoding works as follows: we traverse the tree in depth-first order,
- * storing a bit for each traversed node, signifying whether the node is the
- * parent of at least one matched leaf txid (or a matched txid itself). In
- * case we are at the leaf level, or this bit is 0, its merkle node hash is
- * stored, and its children are not explorer further. Otherwise, no hash is
- * stored, but we recurse into both (or the only) child branch. During
- * decoding, the same depth-first traversal is performed, consuming bits and
- * hashes as they written during encoding.
- *
- * The serialization is fixed and provides a hard guarantee about the
- * encoded size:
- *
- *   SIZE <= 10 + ceil(32.25*N)
- *
- * Where N represents the number of leaf nodes of the partial tree. N itself
- * is bounded by:
- *
- *   N <= total_transactions
- *   N <= 1 + matched_transactions*tree_height
- *
- * The serialization format:
- *  - uint32     total_transactions (4 bytes)
- *  - varint     number of hashes   (1-3 bytes)
- *  - uint256[]  hashes in depth-first order (<= 32*N bytes)
- *  - varint     number of bytes of flag bits (1-3 bytes)
- *  - byte[]     flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits)
- * The size constraints follow from this.
- */
-class CPartialMerkleTree
-{
-protected:
-    /** the total number of transactions in the block */
-    unsigned int nTransactions;
-
-    /** node-is-parent-of-matched-txid bits */
-    std::vector<bool> vBits;
-
-    /** txids and internal hashes */
-    std::vector<uint256> vHash;
-
-    /** flag set when encountering invalid data */
-    bool fBad;
-
-    /** helper function to efficiently calculate the number of nodes at given height in the merkle tree */
-    unsigned int CalcTreeWidth(int height) {
-        return (nTransactions+(1 << height)-1) >> height;
-    }
-
-    /** calculate the hash of a node in the merkle tree (at leaf level: the txid's themselves) */
-    uint256 CalcHash(int height, unsigned int pos, const std::vector<uint256> &vTxid);
-
-    /** recursive function that traverses tree nodes, storing the data as bits and hashes */
-    void TraverseAndBuild(int height, unsigned int pos, const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
-
-    /**
-     * recursive function that traverses tree nodes, consuming the bits and hashes produced by TraverseAndBuild.
-     * it returns the hash of the respective node.
-     */
-    uint256 TraverseAndExtract(int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector<uint256> &vMatch);
-
-public:
-
-    /** serialization implementation */
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(nTransactions);
-        READWRITE(vHash);
-        std::vector<unsigned char> vBytes;
-        if (ser_action.ForRead()) {
-            READWRITE(vBytes);
-            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(this));
-            us.vBits.resize(vBytes.size() * 8);
-            for (unsigned int p = 0; p < us.vBits.size(); p++)
-                us.vBits[p] = (vBytes[p / 8] & (1 << (p % 8))) != 0;
-            us.fBad = false;
-        } else {
-            vBytes.resize((vBits.size()+7)/8);
-            for (unsigned int p = 0; p < vBits.size(); p++)
-                vBytes[p / 8] |= vBits[p] << (p % 8);
-            READWRITE(vBytes);
-        }
-    }
-
-    /** Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them */
-    CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
-
-    CPartialMerkleTree();
-
-    /**
-     * extract the matching txid's represented by this partial merkle tree.
-     * returns the merkle root, or 0 in case of failure
-     */
-    uint256 ExtractMatches(std::vector<uint256> &vMatch);
-};
-
-
 
 /** Functions for disk access for blocks */
 bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos);
@@ -646,38 +540,6 @@ struct CBlockTemplate
 
 
 
-/** 
- * Used to relay blocks as header + vector<merkle branch>
- * to filtered nodes.
- */
-class CMerkleBlock
-{
-public:
-    /** Public only for unit testing */
-    CBlockHeader header;
-    CPartialMerkleTree txn;
-
-public:
-    /** Public only for unit testing and relay testing (not relayed) */
-    std::vector<std::pair<unsigned int, uint256> > vMatchedTxn;
-
-    /**
-     * Create from a CBlock, filtering transactions according to filter
-     * Note that this will call IsRelevantAndUpdate on the filter for each transaction,
-     * thus the filter will likely be modified.
-     */
-    CMerkleBlock(const CBlock& block, CBloomFilter& filter);
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(header);
-        READWRITE(txn);
-    }
-};
-
-
 class CValidationInterface {
 protected:
     virtual void SyncTransaction(const CTransaction &tx, const CBlock *pblock) {};
diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp
new file mode 100644
index 000000000000..8618e355d741
--- /dev/null
+++ b/src/merkleblock.cpp
@@ -0,0 +1,152 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "merkleblock.h"
+
+#include "hash.h"
+#include "primitives/block.h" // for MAX_BLOCK_SIZE
+#include "utilstrencodings.h"
+
+using namespace std;
+
+CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
+{
+    header = block.GetBlockHeader();
+
+    vector<bool> vMatch;
+    vector<uint256> vHashes;
+
+    vMatch.reserve(block.vtx.size());
+    vHashes.reserve(block.vtx.size());
+
+    for (unsigned int i = 0; i < block.vtx.size(); i++)
+    {
+        const uint256& hash = block.vtx[i].GetHash();
+        if (filter.IsRelevantAndUpdate(block.vtx[i]))
+        {
+            vMatch.push_back(true);
+            vMatchedTxn.push_back(make_pair(i, hash));
+        }
+        else
+            vMatch.push_back(false);
+        vHashes.push_back(hash);
+    }
+
+    txn = CPartialMerkleTree(vHashes, vMatch);
+}
+
+uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::vector<uint256> &vTxid) {
+    if (height == 0) {
+        // hash at height 0 is the txids themself
+        return vTxid[pos];
+    } else {
+        // calculate left hash
+        uint256 left = CalcHash(height-1, pos*2, vTxid), right;
+        // calculate right hash if not beyond the end of the array - copy left hash otherwise1
+        if (pos*2+1 < CalcTreeWidth(height-1))
+            right = CalcHash(height-1, pos*2+1, vTxid);
+        else
+            right = left;
+        // combine subhashes
+        return Hash(BEGIN(left), END(left), BEGIN(right), END(right));
+    }
+}
+
+void CPartialMerkleTree::TraverseAndBuild(int height, unsigned int pos, const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch) {
+    // determine whether this node is the parent of at least one matched txid
+    bool fParentOfMatch = false;
+    for (unsigned int p = pos << height; p < (pos+1) << height && p < nTransactions; p++)
+        fParentOfMatch |= vMatch[p];
+    // store as flag bit
+    vBits.push_back(fParentOfMatch);
+    if (height==0 || !fParentOfMatch) {
+        // if at height 0, or nothing interesting below, store hash and stop
+        vHash.push_back(CalcHash(height, pos, vTxid));
+    } else {
+        // otherwise, don't store any hash, but descend into the subtrees
+        TraverseAndBuild(height-1, pos*2, vTxid, vMatch);
+        if (pos*2+1 < CalcTreeWidth(height-1))
+            TraverseAndBuild(height-1, pos*2+1, vTxid, vMatch);
+    }
+}
+
+uint256 CPartialMerkleTree::TraverseAndExtract(int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector<uint256> &vMatch) {
+    if (nBitsUsed >= vBits.size()) {
+        // overflowed the bits array - failure
+        fBad = true;
+        return 0;
+    }
+    bool fParentOfMatch = vBits[nBitsUsed++];
+    if (height==0 || !fParentOfMatch) {
+        // if at height 0, or nothing interesting below, use stored hash and do not descend
+        if (nHashUsed >= vHash.size()) {
+            // overflowed the hash array - failure
+            fBad = true;
+            return 0;
+        }
+        const uint256 &hash = vHash[nHashUsed++];
+        if (height==0 && fParentOfMatch) // in case of height 0, we have a matched txid
+            vMatch.push_back(hash);
+        return hash;
+    } else {
+        // otherwise, descend into the subtrees to extract matched txids and hashes
+        uint256 left = TraverseAndExtract(height-1, pos*2, nBitsUsed, nHashUsed, vMatch), right;
+        if (pos*2+1 < CalcTreeWidth(height-1))
+            right = TraverseAndExtract(height-1, pos*2+1, nBitsUsed, nHashUsed, vMatch);
+        else
+            right = left;
+        // and combine them before returning
+        return Hash(BEGIN(left), END(left), BEGIN(right), END(right));
+    }
+}
+
+CPartialMerkleTree::CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch) : nTransactions(vTxid.size()), fBad(false) {
+    // reset state
+    vBits.clear();
+    vHash.clear();
+
+    // calculate height of tree
+    int nHeight = 0;
+    while (CalcTreeWidth(nHeight) > 1)
+        nHeight++;
+
+    // traverse the partial tree
+    TraverseAndBuild(nHeight, 0, vTxid, vMatch);
+}
+
+CPartialMerkleTree::CPartialMerkleTree() : nTransactions(0), fBad(true) {}
+
+uint256 CPartialMerkleTree::ExtractMatches(std::vector<uint256> &vMatch) {
+    vMatch.clear();
+    // An empty set will not work
+    if (nTransactions == 0)
+        return 0;
+    // check for excessively high numbers of transactions
+    if (nTransactions > MAX_BLOCK_SIZE / 60) // 60 is the lower bound for the size of a serialized CTransaction
+        return 0;
+    // there can never be more hashes provided than one for every txid
+    if (vHash.size() > nTransactions)
+        return 0;
+    // there must be at least one bit per node in the partial tree, and at least one node per hash
+    if (vBits.size() < vHash.size())
+        return 0;
+    // calculate height of tree
+    int nHeight = 0;
+    while (CalcTreeWidth(nHeight) > 1)
+        nHeight++;
+    // traverse the partial tree
+    unsigned int nBitsUsed = 0, nHashUsed = 0;
+    uint256 hashMerkleRoot = TraverseAndExtract(nHeight, 0, nBitsUsed, nHashUsed, vMatch);
+    // verify that no problems occured during the tree traversal
+    if (fBad)
+        return 0;
+    // verify that all bits were consumed (except for the padding caused by serializing it as a byte sequence)
+    if ((nBitsUsed+7)/8 != (vBits.size()+7)/8)
+        return 0;
+    // verify that all hashes were consumed
+    if (nHashUsed != vHash.size())
+        return 0;
+    return hashMerkleRoot;
+}
diff --git a/src/merkleblock.h b/src/merkleblock.h
new file mode 100644
index 000000000000..c549e3cdbab2
--- /dev/null
+++ b/src/merkleblock.h
@@ -0,0 +1,151 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_MERKLEBLOCK_H
+#define BITCOIN_MERKLEBLOCK_H
+
+#include "serialize.h"
+#include "uint256.h"
+#include "primitives/block.h"
+#include "bloom.h"
+
+#include <vector>
+
+/** Data structure that represents a partial merkle tree.
+ *
+ * It represents a subset of the txid's of a known block, in a way that
+ * allows recovery of the list of txid's and the merkle root, in an
+ * authenticated way.
+ *
+ * The encoding works as follows: we traverse the tree in depth-first order,
+ * storing a bit for each traversed node, signifying whether the node is the
+ * parent of at least one matched leaf txid (or a matched txid itself). In
+ * case we are at the leaf level, or this bit is 0, its merkle node hash is
+ * stored, and its children are not explorer further. Otherwise, no hash is
+ * stored, but we recurse into both (or the only) child branch. During
+ * decoding, the same depth-first traversal is performed, consuming bits and
+ * hashes as they written during encoding.
+ *
+ * The serialization is fixed and provides a hard guarantee about the
+ * encoded size:
+ *
+ *   SIZE <= 10 + ceil(32.25*N)
+ *
+ * Where N represents the number of leaf nodes of the partial tree. N itself
+ * is bounded by:
+ *
+ *   N <= total_transactions
+ *   N <= 1 + matched_transactions*tree_height
+ *
+ * The serialization format:
+ *  - uint32     total_transactions (4 bytes)
+ *  - varint     number of hashes   (1-3 bytes)
+ *  - uint256[]  hashes in depth-first order (<= 32*N bytes)
+ *  - varint     number of bytes of flag bits (1-3 bytes)
+ *  - byte[]     flag bits, packed per 8 in a byte, least significant bit first (<= 2*N-1 bits)
+ * The size constraints follow from this.
+ */
+class CPartialMerkleTree
+{
+protected:
+    /** the total number of transactions in the block */
+    unsigned int nTransactions;
+
+    /** node-is-parent-of-matched-txid bits */
+    std::vector<bool> vBits;
+
+    /** txids and internal hashes */
+    std::vector<uint256> vHash;
+
+    /** flag set when encountering invalid data */
+    bool fBad;
+
+    /** helper function to efficiently calculate the number of nodes at given height in the merkle tree */
+    unsigned int CalcTreeWidth(int height) {
+        return (nTransactions+(1 << height)-1) >> height;
+    }
+
+    /** calculate the hash of a node in the merkle tree (at leaf level: the txid's themselves) */
+    uint256 CalcHash(int height, unsigned int pos, const std::vector<uint256> &vTxid);
+
+    /** recursive function that traverses tree nodes, storing the data as bits and hashes */
+    void TraverseAndBuild(int height, unsigned int pos, const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
+
+    /**
+     * recursive function that traverses tree nodes, consuming the bits and hashes produced by TraverseAndBuild.
+     * it returns the hash of the respective node.
+     */
+    uint256 TraverseAndExtract(int height, unsigned int pos, unsigned int &nBitsUsed, unsigned int &nHashUsed, std::vector<uint256> &vMatch);
+
+public:
+
+    /** serialization implementation */
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(nTransactions);
+        READWRITE(vHash);
+        std::vector<unsigned char> vBytes;
+        if (ser_action.ForRead()) {
+            READWRITE(vBytes);
+            CPartialMerkleTree &us = *(const_cast<CPartialMerkleTree*>(this));
+            us.vBits.resize(vBytes.size() * 8);
+            for (unsigned int p = 0; p < us.vBits.size(); p++)
+                us.vBits[p] = (vBytes[p / 8] & (1 << (p % 8))) != 0;
+            us.fBad = false;
+        } else {
+            vBytes.resize((vBits.size()+7)/8);
+            for (unsigned int p = 0; p < vBits.size(); p++)
+                vBytes[p / 8] |= vBits[p] << (p % 8);
+            READWRITE(vBytes);
+        }
+    }
+
+    /** Construct a partial merkle tree from a list of transaction id's, and a mask that selects a subset of them */
+    CPartialMerkleTree(const std::vector<uint256> &vTxid, const std::vector<bool> &vMatch);
+
+    CPartialMerkleTree();
+
+    /**
+     * extract the matching txid's represented by this partial merkle tree.
+     * returns the merkle root, or 0 in case of failure
+     */
+    uint256 ExtractMatches(std::vector<uint256> &vMatch);
+};
+
+
+/**
+ * Used to relay blocks as header + vector<merkle branch>
+ * to filtered nodes.
+ */
+class CMerkleBlock
+{
+public:
+    /** Public only for unit testing */
+    CBlockHeader header;
+    CPartialMerkleTree txn;
+
+public:
+    /** Public only for unit testing and relay testing (not relayed) */
+    std::vector<std::pair<unsigned int, uint256> > vMatchedTxn;
+
+    /**
+     * Create from a CBlock, filtering transactions according to filter
+     * Note that this will call IsRelevantAndUpdate on the filter for each transaction,
+     * thus the filter will likely be modified.
+     */
+    CMerkleBlock(const CBlock& block, CBloomFilter& filter);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(header);
+        READWRITE(txn);
+    }
+};
+
+#endif // BITCOIN_MERKLEBLOCK_H
diff --git a/src/primitives/block.h b/src/primitives/block.h
index e663c91e848b..a1895925395f 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -10,6 +10,9 @@
 #include "serialize.h"
 #include "uint256.h"
 
+/** The maximum allowed size for a serialized block, in bytes (network rule) */
+static const unsigned int MAX_BLOCK_SIZE = 1000000;
+
 /** Nodes collect new transactions into a block, hash them into a hash tree,
  * and scan through nonce values to make the block's hash satisfy proof-of-work
  * requirements.  When they solve the proof-of-work, they broadcast the block
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 783e284af579..2de226fdd653 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -7,10 +7,12 @@
 #include "base58.h"
 #include "clientversion.h"
 #include "key.h"
-#include "main.h"
+#include "merkleblock.h"
 #include "serialize.h"
+#include "streams.h"
 #include "uint256.h"
 #include "util.h"
+#include "utilstrencodings.h"
 
 #include <vector>
 
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index 9dce4daac6c9..3b535a84fd80 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -2,9 +2,11 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#include "main.h"
+#include "merkleblock.h"
 #include "serialize.h"
+#include "streams.h"
 #include "uint256.h"
+#include "version.h"
 
 #include <vector>
 

From 4c83c0e7c8c9ecbcf69c882e2d68a306b726e67b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Thu, 20 Nov 2014 20:06:08 +0100
Subject: [PATCH 1162/1819] Normalize header guard of script_error.h

---
 src/script/script_error.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/script/script_error.h b/src/script/script_error.h
index ac1f2deae5a9..091524f35cb3 100644
--- a/src/script/script_error.h
+++ b/src/script/script_error.h
@@ -3,8 +3,8 @@
 // Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#ifndef BITCOIN_SCRIPT_ERROR_H
-#define BITCOIN_SCRIPT_ERROR_H
+#ifndef BITCOIN_SCRIPT_SCRIPT_ERROR_H
+#define BITCOIN_SCRIPT_SCRIPT_ERROR_H
 
 typedef enum ScriptError_t
 {
@@ -54,4 +54,4 @@ typedef enum ScriptError_t
 
 const char* ScriptErrorString(const ScriptError error);
 
-#endif // BITCOIN_SCRIPT_ERROR_H
+#endif // BITCOIN_SCRIPT_SCRIPT_ERROR_H

From 4be639eaec05ed1170b8cf0ed77b2a6e9bad732c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Fri, 5 Dec 2014 17:22:06 +0100
Subject: [PATCH 1163/1819] Use RPC_INVALID_PARAMETER instead of
 RPC_WALLET_ERROR for invalid amount. No return at the end of void function.

---
 src/rpcwallet.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index a03ec7cee145..e43eee1551a0 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -314,7 +314,7 @@ void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
 {
     // Check amount
     if (nValue <= 0)
-        throw JSONRPCError(RPC_WALLET_ERROR, "Invalid amount");
+        throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid amount");
 
     if (nValue > pwalletMain->GetBalance())
         throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Insufficient funds");
@@ -342,8 +342,6 @@ void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
     }
     if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
         throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
-
-    return;
 }
 
 Value sendtoaddress(const Array& params, bool fHelp)

From db0916bd13d7a7f932fecd1b41c3cc1c8c61264a Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Fri, 5 Dec 2014 16:02:27 -0800
Subject: [PATCH 1164/1819] Fix missing python2 in rpc-tests

---
 qa/rpc-tests/mempool_resurrect_test.py | 2 +-
 qa/rpc-tests/mempool_spendcoinbase.py  | 2 +-
 qa/rpc-tests/rest.py                   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/qa/rpc-tests/mempool_resurrect_test.py b/qa/rpc-tests/mempool_resurrect_test.py
index 907cbf98f962..81db812bfc38 100755
--- a/qa/rpc-tests/mempool_resurrect_test.py
+++ b/qa/rpc-tests/mempool_resurrect_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/mempool_spendcoinbase.py b/qa/rpc-tests/mempool_spendcoinbase.py
index 0fc7c8577eab..f0b34f2904f6 100755
--- a/qa/rpc-tests/mempool_spendcoinbase.py
+++ b/qa/rpc-tests/mempool_spendcoinbase.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.
diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
index 2d301bf4f86e..c62a96fbb858 100755
--- a/qa/rpc-tests/rest.py
+++ b/qa/rpc-tests/rest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 # Copyright (c) 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.

From 683dc4009b2b01699e672f8150c28e2ebe0aae19 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sat, 6 Dec 2014 07:08:02 -0800
Subject: [PATCH 1165/1819] Disable SSLv3 (in favor of TLS) for the RPC client
 and server.

TLS is subject to downgrade attacks when SSLv3 is available, and
 SSLv3 has vulnerabilities.

The popular solution is to disable SSLv3. On the web this breaks
 some tiny number of very old clients. While Bitcoin RPC shouldn't
 be exposed to the open Internet, it also shouldn't be exposed to
 really old SSL implementations, so it shouldn't be a major issue
 for us to disable SSLv3.

There is more information on the downgrade attacks and disabling
 SSLv3 at https://disablessl3.com/ .
---
 src/bitcoin-cli.cpp | 2 +-
 src/rpcserver.cpp   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 1b638e99e9ec..ea349b197e5e 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -110,7 +110,7 @@ Object CallRPC(const string& strMethod, const Array& params)
     bool fUseSSL = GetBoolArg("-rpcssl", false);
     asio::io_service io_service;
     ssl::context context(io_service, ssl::context::sslv23);
-    context.set_options(ssl::context::no_sslv2);
+    context.set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
     asio::ssl::stream<asio::ip::tcp::socket> sslStream(io_service, context);
     SSLIOStreamDevice<asio::ip::tcp> d(sslStream, fUseSSL);
     iostreams::stream< SSLIOStreamDevice<asio::ip::tcp> > stream(d);
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 90695611f29c..252b0866a2f4 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -597,7 +597,7 @@ void StartRPCThreads()
 
     if (fUseSSL)
     {
-        rpc_ssl_context->set_options(ssl::context::no_sslv2);
+        rpc_ssl_context->set_options(ssl::context::no_sslv2 | ssl::context::no_sslv3);
 
         filesystem::path pathCertFile(GetArg("-rpcsslcertificatechainfile", "server.cert"));
         if (!pathCertFile.is_complete()) pathCertFile = filesystem::path(GetDataDir()) / pathCertFile;

From 83b81f6c8a88874d1e732525f43407f0576574c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Sat, 6 Dec 2014 21:26:52 +0100
Subject: [PATCH 1166/1819] Format paragraphs properly - count the space
 between words.

---
 src/utilstrencodings.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index d0062d4544e7..419a63c43177 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -459,7 +459,7 @@ std::string FormatParagraph(const std::string in, size_t width, size_t indent)
         }
         // Append word
         out << in.substr(ptr, endword - ptr);
-        col += endword - ptr;
+        col += endword - ptr + 1;
         ptr = endword;
     }
     return out.str();

From a26bf478ea54d28ceccdb7ad91c6d8d92f5680be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Sat, 6 Dec 2014 22:49:07 +0100
Subject: [PATCH 1167/1819] Add a new test for FormatParagraph (string longer
 than the default width).

---
 src/test/util_tests.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 10f77e3a5b0b..feea1403511b 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -340,6 +340,7 @@ BOOST_AUTO_TEST_CASE(test_FormatParagraph)
     BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 0), "test\ntest");
     BOOST_CHECK_EQUAL(FormatParagraph("testerde test ", 4, 0), "testerde\ntest");
     BOOST_CHECK_EQUAL(FormatParagraph("test test", 4, 4), "test\n    test");
+    BOOST_CHECK_EQUAL(FormatParagraph("This is a very long test string. This is a second sentence in the very long test string."), "This is a very long test string. This is a second sentence in the very long\ntest string.");
 }
 
 BOOST_AUTO_TEST_CASE(test_FormatSubVersion)

From 11d7a7d505717b2574e43f157c10a681f3f8c134 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Sat, 6 Dec 2014 23:14:25 +0100
Subject: [PATCH 1168/1819] [RPC] add rpc-test for http keep-alive (persistent
 connections)

---
 qa/pull-tester/rpc-tests.sh |  1 +
 qa/rpc-tests/httpbasics.py  | 76 +++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)
 create mode 100755 qa/rpc-tests/httpbasics.py

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index a93b80686bd8..071935759b29 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -24,6 +24,7 @@ if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/getchaintips.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/rest.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/mempool_spendcoinbase.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/httpbasics.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py
new file mode 100755
index 000000000000..a94edaffa53d
--- /dev/null
+++ b/qa/rpc-tests/httpbasics.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python2
+# Copyright (c) 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.
+
+#
+# Test REST interface
+#
+
+from test_framework import BitcoinTestFramework
+from util import *
+import base64
+
+try:
+    import http.client as httplib
+except ImportError:
+    import httplib
+try:
+    import urllib.parse as urlparse
+except ImportError:
+    import urlparse
+
+class RESTTest (BitcoinTestFramework):        
+    def run_test(self):        
+        
+        #################################################
+        # lowlevel check for http persistent connection #
+        #################################################
+        url = urlparse.urlparse(self.nodes[0].url)
+        authpair = url.username + ':' + url.password
+        headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
+        
+        conn = httplib.HTTPConnection(url.hostname, url.port)
+        conn.connect()
+        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        out1 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True)
+        assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
+        
+        #send 2nd request without closing connection
+        conn.request('GET', '/', '{"method": "getchaintips"}', headers)
+        out2 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
+        assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
+        conn.close()
+        
+        #same should be if we add keep-alive because this should be the std. behaviour
+        headers = {"Authorization": "Basic " + base64.b64encode(authpair), "Connection": "keep-alive"}
+        
+        conn = httplib.HTTPConnection(url.hostname, url.port)
+        conn.connect()
+        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        out1 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True)
+        assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
+        
+        #send 2nd request without closing connection
+        conn.request('GET', '/', '{"method": "getchaintips"}', headers)
+        out2 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
+        assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
+        conn.close()
+        
+        #now do the same with "Connection: close"
+        headers = {"Authorization": "Basic " + base64.b64encode(authpair), "Connection":"close"}
+        
+        conn = httplib.HTTPConnection(url.hostname, url.port)
+        conn.connect()
+        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        out1 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True)
+        assert_equal(conn.sock!=None, False) #now the connection must be closed after the response        
+        
+        
+if __name__ == '__main__':
+    RESTTest ().main ()

From b82695b89ff59ed053f7133ef9c192ffae66ab84 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 5 Nov 2014 11:42:51 +0100
Subject: [PATCH 1169/1819] [Qt] make PaymentServer::ipcParseCommandLine void

- the function only returned true, so make it void
- add a comment about payment request network detection
---
 src/qt/bitcoin.cpp       | 4 ++--
 src/qt/paymentserver.cpp | 7 +++++--
 src/qt/paymentserver.h   | 2 +-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9872ebc1f640..123777a71bcd 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -570,9 +570,9 @@ int main(int argc, char *argv[])
     }
 #ifdef ENABLE_WALLET
     // Parse URIs on command line -- this can affect Params()
-    if (!PaymentServer::ipcParseCommandLine(argc, argv))
-        exit(0);
+    PaymentServer::ipcParseCommandLine(argc, argv);
 #endif
+
     QScopedPointer<const NetworkStyle> networkStyle(NetworkStyle::instantiate(QString::fromStdString(Params().NetworkIDString())));
     assert(!networkStyle.isNull());
     // Allow for separate UI settings for testnets
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 707de55290ac..fbf5877f2aff 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -184,7 +184,7 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
 // Warning: ipcSendCommandLine() is called early in init,
 // so don't use "emit message()", but "QMessageBox::"!
 //
-bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
+void PaymentServer::ipcParseCommandLine(int argc, char* argv[])
 {
     for (int i = 1; i < argc; i++)
     {
@@ -192,6 +192,10 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
         if (arg.startsWith("-"))
             continue;
 
+        // If the bitcoin: URI contains a payment request, we are not able to detect the
+        // network as that would require fetching and parsing the payment request.
+        // That means clicking such an URI which contains a testnet payment request
+        // will start a mainnet instance and throw a "wrong network" error.
         if (arg.startsWith(BITCOIN_IPC_PREFIX, Qt::CaseInsensitive)) // bitcoin: URI
         {
             savedPaymentRequests.append(arg);
@@ -235,7 +239,6 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             qWarning() << "PaymentServer::ipcSendCommandLine : Payment request file does not exist: " << arg;
         }
     }
-    return true;
 }
 
 //
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 25b08cde49bb..0103cbdd0d5e 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -59,7 +59,7 @@ class PaymentServer : public QObject
 public:
     // Parse URIs on command line
     // Returns false on error
-    static bool ipcParseCommandLine(int argc, char *argv[]);
+    static void ipcParseCommandLine(int argc, char *argv[]);
 
     // Returns true if there were URIs on the command line
     // which were successfully sent to an already-running

From 814429dc722837dbe57965c6a37f4ea57206d270 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 5 Nov 2014 11:47:57 +0100
Subject: [PATCH 1170/1819] [Qt] add BIP70/BIP71 constants for all messages and
 mime types

- also rename current ones to match the new ones
- remove constant from guiconstant.h and add it to paymentserver.cpp
---
 src/qt/guiconstants.h    |  3 ---
 src/qt/paymentserver.cpp | 30 ++++++++++++++++++------------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index f23175049a48..8f3e476fd9ae 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -38,9 +38,6 @@ static const int TOOLTIP_WRAP_THRESHOLD = 80;
 /* Maximum allowed URI length */
 static const int MAX_URI_LENGTH = 255;
 
-/* Maximum somewhat-sane size of a payment request file */
-static const int MAX_PAYMENT_REQUEST_SIZE = 50000; // bytes
-
 /* QRCodeDialog -- size of exported QR Code image */
 #define EXPORT_IMAGE_SIZE 256
 
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index fbf5877f2aff..417945bbf88f 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -5,7 +5,6 @@
 #include "paymentserver.h"
 
 #include "bitcoinunits.h"
-#include "guiconstants.h"
 #include "guiutil.h"
 #include "optionsmodel.h"
 
@@ -19,6 +18,7 @@
 
 #include <openssl/x509.h>
 #include <openssl/x509_vfy.h>
+
 #include <QApplication>
 #include <QByteArray>
 #include <QDataStream>
@@ -51,9 +51,15 @@ using namespace boost;
 
 const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
 const QString BITCOIN_IPC_PREFIX("bitcoin:");
-const char* BITCOIN_REQUEST_MIMETYPE = "application/bitcoin-paymentrequest";
-const char* BITCOIN_PAYMENTACK_MIMETYPE = "application/bitcoin-paymentack";
-const char* BITCOIN_PAYMENTACK_CONTENTTYPE = "application/bitcoin-payment";
+// BIP70 payment protocol messages
+const char* BIP70_MESSAGE_PAYMENTACK = "PaymentACK";
+const char* BIP70_MESSAGE_PAYMENTREQUEST = "PaymentRequest";
+// BIP71 payment protocol media types
+const char* BIP71_MIMETYPE_PAYMENT = "application/bitcoin-payment";
+const char* BIP71_MIMETYPE_PAYMENTACK = "application/bitcoin-paymentack";
+const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest";
+// BIP70 max payment request size in bytes (DoS protection)
+const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
 
 X509_STORE* PaymentServer::certStore = NULL;
 void PaymentServer::freeCertStore()
@@ -486,7 +492,7 @@ bool PaymentServer::readPaymentRequest(const QString& filename, PaymentRequestPl
         return false;
     }
 
-    if (f.size() > MAX_PAYMENT_REQUEST_SIZE)
+    if (f.size() > BIP70_MAX_PAYMENTREQUEST_SIZE)
     {
         qWarning() << "PaymentServer::readPaymentRequest : " << filename << " too large";
         return false;
@@ -583,10 +589,10 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, SendCoins
 void PaymentServer::fetchRequest(const QUrl& url)
 {
     QNetworkRequest netRequest;
-    netRequest.setAttribute(QNetworkRequest::User, "PaymentRequest");
+    netRequest.setAttribute(QNetworkRequest::User, BIP70_MESSAGE_PAYMENTREQUEST);
     netRequest.setUrl(url);
     netRequest.setRawHeader("User-Agent", CLIENT_NAME.c_str());
-    netRequest.setRawHeader("Accept", BITCOIN_REQUEST_MIMETYPE);
+    netRequest.setRawHeader("Accept", BIP71_MIMETYPE_PAYMENTREQUEST);
     netManager->get(netRequest);
 }
 
@@ -597,11 +603,11 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
         return;
 
     QNetworkRequest netRequest;
-    netRequest.setAttribute(QNetworkRequest::User, "PaymentACK");
+    netRequest.setAttribute(QNetworkRequest::User, BIP70_MESSAGE_PAYMENTACK);
     netRequest.setUrl(QString::fromStdString(details.payment_url()));
-    netRequest.setHeader(QNetworkRequest::ContentTypeHeader, BITCOIN_PAYMENTACK_CONTENTTYPE);
+    netRequest.setHeader(QNetworkRequest::ContentTypeHeader, BIP71_MIMETYPE_PAYMENT);
     netRequest.setRawHeader("User-Agent", CLIENT_NAME.c_str());
-    netRequest.setRawHeader("Accept", BITCOIN_PAYMENTACK_MIMETYPE);
+    netRequest.setRawHeader("Accept", BIP71_MIMETYPE_PAYMENTACK);
 
     payments::Payment payment;
     payment.set_merchant_data(details.merchant_data());
@@ -663,7 +669,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
     QByteArray data = reply->readAll();
 
     QString requestType = reply->request().attribute(QNetworkRequest::User).toString();
-    if (requestType == "PaymentRequest")
+    if (requestType == BIP70_MESSAGE_PAYMENTREQUEST)
     {
         PaymentRequestPlus request;
         SendCoinsRecipient recipient;
@@ -679,7 +685,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
 
         return;
     }
-    else if (requestType == "PaymentACK")
+    else if (requestType == BIP70_MESSAGE_PAYMENTACK)
     {
         payments::PaymentACK paymentACK;
         if (!paymentACK.ParseFromArray(data.data(), data.size()))

From 1ec753f7340677ac4fbef53fbdc73feff344719d Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 5 Nov 2014 12:05:29 +0100
Subject: [PATCH 1171/1819] [Qt] ensure socket is set to NULL in
 PaymentServer::ipcSendCommandLine

---
 src/qt/paymentserver.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 417945bbf88f..c65c98070527 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -263,6 +263,7 @@ bool PaymentServer::ipcSendCommandLine()
         if (!socket->waitForConnected(BITCOIN_IPC_CONNECT_TIMEOUT))
         {
             delete socket;
+            socket = NULL;
             return false;
         }
 
@@ -271,12 +272,14 @@ bool PaymentServer::ipcSendCommandLine()
         out.setVersion(QDataStream::Qt_4_0);
         out << r;
         out.device()->seek(0);
+
         socket->write(block);
         socket->flush();
-
         socket->waitForBytesWritten(BITCOIN_IPC_CONNECT_TIMEOUT);
         socket->disconnectFromServer();
+
         delete socket;
+        socket = NULL;
         fResult = true;
     }
 

From 2284ccbd13f145e913e2a77ba5ddd04d995bce14 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Tue, 18 Nov 2014 08:46:03 +0100
Subject: [PATCH 1172/1819] [Qt] remove dup lock that is done in
 SetAddressBook()

---
 src/qt/paymentserver.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index c65c98070527..95f79375523d 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -628,7 +628,6 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
     else {
         CPubKey newKey;
         if (wallet->GetKeyFromPool(newKey)) {
-            LOCK(wallet->cs_wallet); // SetAddressBook
             CKeyID keyID = newKey.GetID();
             wallet->SetAddressBook(keyID, strAccount, "refund");
 

From 31f84944a5f6f1aa07e36e7700e9ab16be88aa42 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 19 Nov 2014 12:53:57 +0100
Subject: [PATCH 1173/1819] [Qt] add BIP70 payment request size DoS protection
 for URIs

- current code only does this for payment request files, which are
  used on Mac
- also rename readPaymentRequest to readPaymentRequestFromFile, so it's
  obvious that function only handles payment request files and not URIs
- small logging changes in readPaymentRequestFromFile
---
 src/qt/paymentserver.cpp | 44 +++++++++++++++++++++++++++++-----------
 src/qt/paymentserver.h   |  2 +-
 2 files changed, 33 insertions(+), 13 deletions(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 95f79375523d..d6e396b2111a 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -226,7 +226,7 @@ void PaymentServer::ipcParseCommandLine(int argc, char* argv[])
             savedPaymentRequests.append(arg);
 
             PaymentRequestPlus request;
-            if (readPaymentRequest(arg, request))
+            if (readPaymentRequestFromFile(arg, request))
             {
                 if (request.getDetails().network() == "main")
                 {
@@ -452,7 +452,7 @@ void PaymentServer::handleURIOrFile(const QString& s)
     {
         PaymentRequestPlus request;
         SendCoinsRecipient recipient;
-        if (!readPaymentRequest(s, request))
+        if (!readPaymentRequestFromFile(s, request))
         {
             emit message(tr("Payment request file handling"),
                 tr("Payment request file cannot be read! This can be caused by an invalid payment request file."),
@@ -486,18 +486,25 @@ void PaymentServer::handleURIConnection()
     handleURIOrFile(msg);
 }
 
-bool PaymentServer::readPaymentRequest(const QString& filename, PaymentRequestPlus& request)
+//
+// Warning: readPaymentRequestFromFile() is used in ipcSendCommandLine()
+// so don't use "emit message()", but "QMessageBox::"!
+//
+bool PaymentServer::readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request)
 {
     QFile f(filename);
-    if (!f.open(QIODevice::ReadOnly))
-    {
-        qWarning() << "PaymentServer::readPaymentRequest : Failed to open " << filename;
+    if (!f.open(QIODevice::ReadOnly)) {
+        qWarning() << QString("PaymentServer::%1: Failed to open %2").arg(__func__).arg(filename);
         return false;
     }
 
-    if (f.size() > BIP70_MAX_PAYMENTREQUEST_SIZE)
-    {
-        qWarning() << "PaymentServer::readPaymentRequest : " << filename << " too large";
+    // BIP70 DoS protection
+    if (f.size() > BIP70_MAX_PAYMENTREQUEST_SIZE) {
+        qWarning() << QString("PaymentServer::%1: Payment request %2 is too large (%3 bytes, allowed %4 bytes).")
+            .arg(__func__)
+            .arg(filename)
+            .arg(f.size())
+            .arg(BIP70_MAX_PAYMENTREQUEST_SIZE);
         return false;
     }
 
@@ -657,13 +664,26 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, SendCoinsRecipient recipien
 void PaymentServer::netRequestFinished(QNetworkReply* reply)
 {
     reply->deleteLater();
-    if (reply->error() != QNetworkReply::NoError)
-    {
+
+    // BIP70 DoS protection
+    if (reply->size() > BIP70_MAX_PAYMENTREQUEST_SIZE) {
+        QString msg = tr("Payment request %2 is too large (%3 bytes, allowed %4 bytes).")
+            .arg(__func__)
+            .arg(reply->request().url().toString())
+            .arg(reply->size())
+            .arg(BIP70_MAX_PAYMENTREQUEST_SIZE);
+
+        qWarning() << QString("PaymentServer::%1:").arg(__func__) << msg;
+        emit message(tr("Payment request DoS protection"), msg, CClientUIInterface::MSG_ERROR);
+        return;
+    }
+
+    if (reply->error() != QNetworkReply::NoError) {
         QString msg = tr("Error communicating with %1: %2")
             .arg(reply->request().url().toString())
             .arg(reply->errorString());
 
-        qWarning() << "PaymentServer::netRequestFinished : " << msg;
+        qWarning() << "PaymentServer::netRequestFinished: " << msg;
         emit message(tr("Payment request error"), msg, CClientUIInterface::MSG_ERROR);
         return;
     }
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 0103cbdd0d5e..9acd99723cbc 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -118,7 +118,7 @@ private slots:
     bool eventFilter(QObject *object, QEvent *event);
 
 private:
-    static bool readPaymentRequest(const QString& filename, PaymentRequestPlus& request);
+    static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
     bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);
     void fetchRequest(const QUrl& url);
 

From 4333e26c8e89e3d02cfb4d3464108b1a15175e2b Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Dec 2014 09:39:23 +0100
Subject: [PATCH 1174/1819] [Qt] add BIP70 DoS protection test

- this test required to make readPaymentRequestFromFile() public in order
  to be able to is it in paymentservertests.cpp
---
 src/qt/paymentserver.h             |  7 ++++++-
 src/qt/test/paymentservertests.cpp | 12 ++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 9acd99723cbc..42940664ec5e 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -52,6 +52,9 @@ QT_END_NAMESPACE
 
 class CWallet;
 
+// BIP70 max payment request size in bytes (DoS protection)
+extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE;
+
 class PaymentServer : public QObject
 {
     Q_OBJECT
@@ -85,6 +88,9 @@ class PaymentServer : public QObject
     // OptionsModel is used for getting proxy settings and display unit
     void setOptionsModel(OptionsModel *optionsModel);
 
+    // This is now public, because we use it in paymentservertests.cpp
+    static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
+
 signals:
     // Fired when a valid payment request is received
     void receivedPaymentRequest(SendCoinsRecipient);
@@ -118,7 +124,6 @@ private slots:
     bool eventFilter(QObject *object, QEvent *event);
 
 private:
-    static bool readPaymentRequestFromFile(const QString& filename, PaymentRequestPlus& request);
     bool processPaymentRequest(PaymentRequestPlus& request, SendCoinsRecipient& recipient);
     void fetchRequest(const QUrl& url);
 
diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp
index 84cab01c5053..8f49cb94642d 100644
--- a/src/qt/test/paymentservertests.cpp
+++ b/src/qt/test/paymentservertests.cpp
@@ -7,6 +7,7 @@
 #include "optionsmodel.h"
 #include "paymentrequestdata.h"
 
+#include "random.h"
 #include "util.h"
 #include "utilstrencodings.h"
 
@@ -108,6 +109,17 @@ void PaymentServerTests::paymentServerTests()
     r.paymentRequest.getMerchant(caStore, merchant);
     QCOMPARE(merchant, QString(""));
 
+    // Just get some random data big enough to trigger BIP70 DoS protection
+    unsigned char randData[BIP70_MAX_PAYMENTREQUEST_SIZE + 1];
+    GetRandBytes(randData, sizeof(randData));
+    // Write data to a temp file:
+    QTemporaryFile tempFile;
+    tempFile.open();
+    tempFile.write((const char*)randData, sizeof(randData));
+    tempFile.close();
+    // Trigger BIP70 DoS protection
+    QCOMPARE(PaymentServer::readPaymentRequestFromFile(tempFile.fileName(), r.paymentRequest), false);
+
     delete server;
 }
 

From 5ec654b8ceb4c5f9aafda2b62a0aa6639d738654 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Fri, 5 Dec 2014 09:40:58 +0100
Subject: [PATCH 1175/1819] [Qt] update paymentserver license and cleanup
 ordering

---
 src/qt/paymentrequestplus.cpp | 4 ++--
 src/qt/paymentrequestplus.h   | 4 ++--
 src/qt/paymentserver.cpp      | 6 +++---
 src/qt/paymentserver.h        | 6 +++---
 4 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index 7aefffe24afb..a40b5bbcd840 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2011-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 //
diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h
index 91c704c520f4..fbc3a09265d8 100644
--- a/src/qt/paymentrequestplus.h
+++ b/src/qt/paymentrequestplus.h
@@ -1,5 +1,5 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2011-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_QT_PAYMENTREQUESTPLUS_H
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index d6e396b2111a..bd3dab41a8f2 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -1,5 +1,5 @@
-// Copyright (c) 2011-2013 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Copyright (c) 2011-2014 The Bitcoin developers
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "paymentserver.h"
@@ -46,8 +46,8 @@
 #include <QUrlQuery>
 #endif
 
-using namespace std;
 using namespace boost;
+using namespace std;
 
 const int BITCOIN_IPC_CONNECT_TIMEOUT = 1000; // milliseconds
 const QString BITCOIN_IPC_PREFIX("bitcoin:");
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 42940664ec5e..e1305b943764 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -1,5 +1,5 @@
 // Copyright (c) 2011-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
+// Distributed under the MIT software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #ifndef BITCOIN_QT_PAYMENTSERVER_H
@@ -40,6 +40,8 @@
 
 class OptionsModel;
 
+class CWallet;
+
 QT_BEGIN_NAMESPACE
 class QApplication;
 class QByteArray;
@@ -50,8 +52,6 @@ class QSslError;
 class QUrl;
 QT_END_NAMESPACE
 
-class CWallet;
-
 // BIP70 max payment request size in bytes (DoS protection)
 extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE;
 

From 868d041622e2f589ab4535c30ce683534b6d4f71 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Tue, 11 Nov 2014 16:41:44 -0800
Subject: [PATCH 1176/1819] Remove coinbase-dependant transactions during
 reorg.

This still leaves transactions in mempool that are potentially
invalid if the maturity period has been reorged out of, but at
least they're not missing inputs entirely.
---
 src/main.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 70e3973e6c7f..3a2c167e805e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1892,9 +1892,8 @@ bool static DisconnectTip(CValidationState &state) {
         // ignore validation errors in resurrected transactions
         list<CTransaction> removed;
         CValidationState stateDummy;
-        if (!tx.IsCoinBase())
-            if (!AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
-                mempool.remove(tx, removed, true);
+        if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
+            mempool.remove(tx, removed, true);
     }
     mempool.check(pcoinsTip);
     // Update chainActive and related variables.

From 723d12c098456e7682e641076e76468a9fb0cec0 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Tue, 11 Nov 2014 20:57:54 -0800
Subject: [PATCH 1177/1819] Remove txn which are invalidated by coinbase
 maturity during reorg

---
 src/main.cpp      |  1 +
 src/txmempool.cpp | 26 ++++++++++++++++++++++++++
 src/txmempool.h   |  1 +
 3 files changed, 28 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 3a2c167e805e..9e1c41ada7c9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1895,6 +1895,7 @@ bool static DisconnectTip(CValidationState &state) {
         if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL))
             mempool.remove(tx, removed, true);
     }
+    mempool.removeCoinbaseSpends(pcoinsTip, pindexDelete->nHeight);
     mempool.check(pcoinsTip);
     // Update chainActive and related variables.
     UpdateTip(pindexDelete->pprev);
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index e13f1cc350f5..ff04a8ad9ae9 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -6,6 +6,7 @@
 #include "txmempool.h"
 
 #include "clientversion.h"
+#include "main.h" // for COINBASE_MATURITY
 #include "streams.h"
 #include "util.h"
 #include "utilmoneystr.h"
@@ -453,6 +454,31 @@ void CTxMemPool::remove(const CTransaction &tx, std::list<CTransaction>& removed
     }
 }
 
+void CTxMemPool::removeCoinbaseSpends(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight)
+{
+    // Remove transactions spending a coinbase which are now immature
+    LOCK(cs);
+    list<CTransaction> transactionsToRemove;
+    for (std::map<uint256, CTxMemPoolEntry>::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
+        const CTransaction& tx = it->second.GetTx();
+        BOOST_FOREACH(const CTxIn& txin, tx.vin) {
+            std::map<uint256, CTxMemPoolEntry>::const_iterator it2 = mapTx.find(txin.prevout.hash);
+            if (it2 != mapTx.end())
+                continue;
+            const CCoins *coins = pcoins->AccessCoins(txin.prevout.hash);
+            if (fSanityCheck) assert(coins);
+            if (!coins || (coins->IsCoinBase() && nMemPoolHeight - coins->nHeight < COINBASE_MATURITY)) {
+                transactionsToRemove.push_back(tx);
+                break;
+            }
+        }
+    }
+    BOOST_FOREACH(const CTransaction& tx, transactionsToRemove) {
+        list<CTransaction> removed;
+        remove(tx, removed, true);
+    }
+}
+
 void CTxMemPool::removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed)
 {
     // Remove transactions which depend on inputs of tx, recursively
diff --git a/src/txmempool.h b/src/txmempool.h
index d00bdd0616c3..f671352b5855 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -113,6 +113,7 @@ class CTxMemPool
 
     bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry);
     void remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive = false);
+    void removeCoinbaseSpends(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight);
     void removeConflicts(const CTransaction &tx, std::list<CTransaction>& removed);
     void removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
                         std::list<CTransaction>& conflicts);

From b7b4318f3a65d6e55d44bff5da1091ec0b3a26d2 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Tue, 11 Nov 2014 21:06:15 -0800
Subject: [PATCH 1178/1819] Make CTxMemPool::check more thourough by using
 CheckInputs

---
 src/txmempool.cpp | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index ff04a8ad9ae9..6ecd64636b49 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -6,7 +6,7 @@
 #include "txmempool.h"
 
 #include "clientversion.h"
-#include "main.h" // for COINBASE_MATURITY
+#include "main.h"
 #include "streams.h"
 #include "util.h"
 #include "utilmoneystr.h"
@@ -539,17 +539,22 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
 
     uint64_t checkTotal = 0;
 
+    CCoinsViewCache mempoolDuplicate(const_cast<CCoinsViewCache*>(pcoins));
+
     LOCK(cs);
+    list<const CTxMemPoolEntry*> waitingOnDependants;
     for (std::map<uint256, CTxMemPoolEntry>::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) {
         unsigned int i = 0;
         checkTotal += it->second.GetTxSize();
         const CTransaction& tx = it->second.GetTx();
+        bool fDependsWait = false;
         BOOST_FOREACH(const CTxIn &txin, tx.vin) {
             // Check that every mempool transaction's inputs refer to available coins, or other mempool tx's.
             std::map<uint256, CTxMemPoolEntry>::const_iterator it2 = mapTx.find(txin.prevout.hash);
             if (it2 != mapTx.end()) {
                 const CTransaction& tx2 = it2->second.GetTx();
                 assert(tx2.vout.size() > txin.prevout.n && !tx2.vout[txin.prevout.n].IsNull());
+                fDependsWait = true;
             } else {
                 const CCoins* coins = pcoins->AccessCoins(txin.prevout.hash);
                 assert(coins && coins->IsAvailable(txin.prevout.n));
@@ -561,6 +566,29 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
             assert(it3->second.n == i);
             i++;
         }
+        if (fDependsWait)
+            waitingOnDependants.push_back(&it->second);
+        else {
+            CValidationState state; CTxUndo undo;
+            assert(CheckInputs(tx, state, mempoolDuplicate, false, 0, false, NULL));
+            UpdateCoins(tx, state, mempoolDuplicate, undo, 1000000);
+        }
+    }
+    unsigned int stepsSinceLastRemove = 0;
+    while (!waitingOnDependants.empty()) {
+        const CTxMemPoolEntry* entry = waitingOnDependants.front();
+        waitingOnDependants.pop_front();
+        CValidationState state;
+        if (!mempoolDuplicate.HaveInputs(entry->GetTx())) {
+            waitingOnDependants.push_back(entry);
+            stepsSinceLastRemove++;
+            assert(stepsSinceLastRemove < waitingOnDependants.size());
+        } else {
+            assert(CheckInputs(entry->GetTx(), state, mempoolDuplicate, false, 0, false, NULL));
+            CTxUndo undo;
+            UpdateCoins(entry->GetTx(), state, mempoolDuplicate, undo, 1000000);
+            stepsSinceLastRemove = 0;
+        }
     }
     for (std::map<COutPoint, CInPoint>::const_iterator it = mapNextTx.begin(); it != mapNextTx.end(); it++) {
         uint256 hash = it->second.ptx->GetHash();

From 7fd6219af7006fddc4b675236bcd43dd7a9eb553 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Tue, 18 Nov 2014 14:57:20 -0800
Subject: [PATCH 1179/1819] Make CTxMemPool::remove more effecient by avoiding
 recursion

---
 src/txmempool.cpp | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 6ecd64636b49..840eb536baa0 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -427,26 +427,32 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry)
 }
 
 
-void CTxMemPool::remove(const CTransaction &tx, std::list<CTransaction>& removed, bool fRecursive)
+void CTxMemPool::remove(const CTransaction &origTx, std::list<CTransaction>& removed, bool fRecursive)
 {
     // Remove transaction from memory pool
     {
         LOCK(cs);
-        uint256 hash = tx.GetHash();
-        if (fRecursive) {
-            for (unsigned int i = 0; i < tx.vout.size(); i++) {
-                std::map<COutPoint, CInPoint>::iterator it = mapNextTx.find(COutPoint(hash, i));
-                if (it == mapNextTx.end())
-                    continue;
-                remove(*it->second.ptx, removed, true);
-            }
-        }
-        if (mapTx.count(hash))
+        std::deque<uint256> txToRemove;
+        txToRemove.push_back(origTx.GetHash());
+        while (!txToRemove.empty())
         {
-            removed.push_front(tx);
+            uint256 hash = txToRemove.front();
+            txToRemove.pop_front();
+            if (!mapTx.count(hash))
+                continue;
+            const CTransaction& tx = mapTx[hash].GetTx();
+            if (fRecursive) {
+                for (unsigned int i = 0; i < tx.vout.size(); i++) {
+                    std::map<COutPoint, CInPoint>::iterator it = mapNextTx.find(COutPoint(hash, i));
+                    if (it == mapNextTx.end())
+                        continue;
+                    txToRemove.push_back(it->second.ptx->GetHash());
+                }
+            }
             BOOST_FOREACH(const CTxIn& txin, tx.vin)
                 mapNextTx.erase(txin.prevout);
 
+            removed.push_back(tx);
             totalTxSize -= mapTx[hash].GetTxSize();
             mapTx.erase(hash);
             nTransactionsUpdated++;

From 34318d7fad7922ce56ff47908ff70e2c8a42ee56 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Mon, 24 Nov 2014 15:18:05 -0500
Subject: [PATCH 1180/1819] RPC-test based on invalidateblock for mempool
 coinbase spends

---
 qa/pull-tester/rpc-tests.sh             |  1 +
 qa/rpc-tests/mempool_coinbase_spends.py | 94 +++++++++++++++++++++++++
 2 files changed, 95 insertions(+)
 create mode 100755 qa/rpc-tests/mempool_coinbase_spends.py

diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index 071935759b29..d6ee00bb7df0 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -25,6 +25,7 @@ if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
   ${BUILDDIR}/qa/rpc-tests/rest.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/mempool_spendcoinbase.py --srcdir "${BUILDDIR}/src"
   ${BUILDDIR}/qa/rpc-tests/httpbasics.py --srcdir "${BUILDDIR}/src"
+  ${BUILDDIR}/qa/rpc-tests/mempool_coinbase_spends.py --srcdir "${BUILDDIR}/src"
   #${BUILDDIR}/qa/rpc-tests/forknotify.py --srcdir "${BUILDDIR}/src"
 else
   echo "No rpc tests to run. Wallet, utils, and bitcoind must all be enabled"
diff --git a/qa/rpc-tests/mempool_coinbase_spends.py b/qa/rpc-tests/mempool_coinbase_spends.py
new file mode 100755
index 000000000000..7b43712768bf
--- /dev/null
+++ b/qa/rpc-tests/mempool_coinbase_spends.py
@@ -0,0 +1,94 @@
+#!/usr/bin/env python2
+# Copyright (c) 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.
+
+#
+# Test re-org scenarios with a mempool that contains transactions
+# that spend (directly or indirectly) coinbase transactions.
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os
+import shutil
+
+# Create one-input, one-output, no-fee transaction:
+class MempoolCoinbaseTest(BitcoinTestFramework):
+
+    alert_filename = None  # Set by setup_network
+
+    def setup_network(self):
+        args = ["-checkmempool", "-debug=mempool"]
+        self.nodes = []
+        self.nodes.append(start_node(0, self.options.tmpdir, args))
+        self.nodes.append(start_node(1, self.options.tmpdir, args))
+        connect_nodes(self.nodes[1], 0)
+        self.is_network_split = False
+        self.sync_all
+
+    def create_tx(self, from_txid, to_address, amount):
+        inputs = [{ "txid" : from_txid, "vout" : 0}]
+        outputs = { to_address : amount }
+        rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
+        signresult = self.nodes[0].signrawtransaction(rawtx)
+        assert_equal(signresult["complete"], True)
+        return signresult["hex"]
+
+    def run_test(self):
+        start_count = self.nodes[0].getblockcount()
+
+        # Mine three blocks. After this, nodes[0] blocks
+        # 101, 102, and 103 are spend-able.
+        new_blocks = self.nodes[1].setgenerate(True, 4)
+        self.sync_all()
+
+        node0_address = self.nodes[0].getnewaddress()
+        node1_address = self.nodes[1].getnewaddress()
+
+        # Three scenarios for re-orging coinbase spends in the memory pool:
+        # 1. Direct coinbase spend  :  spend_101
+        # 2. Indirect (coinbase spend in chain, child in mempool) : spend_102 and spend_102_1
+        # 3. Indirect (coinbase and child both in chain) : spend_103 and spend_103_1
+        # Use invalidatblock to make all of the above coinbase spends invalid (immature coinbase),
+        # and make sure the mempool code behaves correctly.
+        b = [ self.nodes[0].getblockhash(n) for n in range(102, 105) ]
+        coinbase_txids = [ self.nodes[0].getblock(h)['tx'][0] for h in b ]
+        spend_101_raw = self.create_tx(coinbase_txids[0], node1_address, 50)
+        spend_102_raw = self.create_tx(coinbase_txids[1], node0_address, 50)
+        spend_103_raw = self.create_tx(coinbase_txids[2], node0_address, 50)
+
+        # Broadcast and mine spend_102 and 103:
+        spend_102_id = self.nodes[0].sendrawtransaction(spend_102_raw)
+        spend_103_id = self.nodes[0].sendrawtransaction(spend_103_raw)
+        self.nodes[0].setgenerate(True, 1)
+
+        # Create 102_1 and 103_1:
+        spend_102_1_raw = self.create_tx(spend_102_id, node1_address, 50)
+        spend_103_1_raw = self.create_tx(spend_103_id, node1_address, 50)
+
+        # Broadcast and mine 103_1:
+        spend_103_1_id = self.nodes[0].sendrawtransaction(spend_103_1_raw)
+        self.nodes[0].setgenerate(True, 1)
+
+        # ... now put spend_101 and spend_102_1 in memory pools:
+        spend_101_id = self.nodes[0].sendrawtransaction(spend_101_raw)
+        spend_102_1_id = self.nodes[0].sendrawtransaction(spend_102_1_raw)
+
+        self.sync_all()
+
+        assert_equal(set(self.nodes[0].getrawmempool()), set([ spend_101_id, spend_102_1_id ]))
+
+        # Use invalidateblock to re-org back and make all those coinbase spends
+        # immature/invalid:
+        for node in self.nodes:
+            node.invalidateblock(new_blocks[0])
+
+        self.sync_all()
+
+        # mempool should be empty.
+        assert_equal(set(self.nodes[0].getrawmempool()), set())
+
+if __name__ == '__main__':
+    MempoolCoinbaseTest().main()

From 6e6a36ce308ae81529027b6e18f7ba1aeabe8dd7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 9 Dec 2014 10:16:58 +0100
Subject: [PATCH 1181/1819] contrib: show pull # in prompt for github-merge
 script

---
 contrib/devtools/github-merge.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/devtools/github-merge.sh b/contrib/devtools/github-merge.sh
index 3217a0619502..6f68496ed86b 100755
--- a/contrib/devtools/github-merge.sh
+++ b/contrib/devtools/github-merge.sh
@@ -136,6 +136,9 @@ else
   echo "Dropping you on a shell so you can try building/testing the merged source." >&2
   echo "Run 'git diff HEAD~' to show the changes being merged." >&2
   echo "Type 'exit' when done." >&2
+  if [[ -f /etc/debian_version ]]; then # Show pull number in prompt on Debian default prompt
+      export debian_chroot="$PULL"
+  fi
   bash -i
   read -p "Press 'm' to accept the merge. " -n 1 -r >&2
   echo

From 1577df986e8f35d4c2bff27873187a9079ee3226 Mon Sep 17 00:00:00 2001
From: mrbandrews <bandrewsny@gmail.com>
Date: Thu, 4 Dec 2014 16:09:58 -0500
Subject: [PATCH 1182/1819] Port of walletbackup.sh to Python.

---
 qa/rpc-tests/walletbackup.py | 200 +++++++++++++++++++++++
 qa/rpc-tests/walletbackup.sh | 297 -----------------------------------
 2 files changed, 200 insertions(+), 297 deletions(-)
 create mode 100755 qa/rpc-tests/walletbackup.py
 delete mode 100755 qa/rpc-tests/walletbackup.sh

diff --git a/qa/rpc-tests/walletbackup.py b/qa/rpc-tests/walletbackup.py
new file mode 100755
index 000000000000..6a42d9dfa4e9
--- /dev/null
+++ b/qa/rpc-tests/walletbackup.py
@@ -0,0 +1,200 @@
+#!/usr/bin/env python2
+# Copyright (c) 2014 The Bitcoin Core developers
+# Distributed under the MIT/X11 software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+"""
+Exercise the wallet backup code.  Ported from walletbackup.sh.
+
+Test case is:
+4 nodes. 1 2 and 3 send transactions between each other,
+fourth node is a miner.
+1 2 3 each mine a block to start, then
+Miner creates 100 blocks so 1 2 3 each have 50 mature
+coins to spend.
+Then 5 iterations of 1/2/3 sending coins amongst
+themselves to get transactions in the wallets,
+and the miner mining one block.
+
+Wallets are backed up using dumpwallet/backupwallet.
+Then 5 more iterations of transactions and mining a block.
+
+Miner then generates 101 more blocks, so any
+transaction fees paid mature.
+
+Sanity check:
+  Sum(1,2,3,4 balances) == 114*50
+
+1/2/3 are shutdown, and their wallets erased.
+Then restore using wallet.dat backup. And
+confirm 1/2/3/4 balances are same as before.
+
+Shutdown again, restore using importwallet,
+and confirm again balances are correct.
+"""
+
+from test_framework import BitcoinTestFramework
+from util import *
+from random import randint
+import logging
+logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
+
+class WalletBackupTest(BitcoinTestFramework):
+
+    def setup_chain(self):
+        logging.info("Initializing test directory "+self.options.tmpdir)
+        initialize_chain_clean(self.options.tmpdir, 4)
+
+    # This mirrors how the network was setup in the bash test
+    def setup_network(self, split=False):
+        # nodes 1, 2,3 are spenders, let's give them a keypool=100
+        extra_args = [["-keypool=100"], ["-keypool=100"], ["-keypool=100"], []]
+        self.nodes = start_nodes(4, self.options.tmpdir, extra_args)
+        connect_nodes(self.nodes[0], 3)
+        connect_nodes(self.nodes[1], 3)
+        connect_nodes(self.nodes[2], 3)
+        connect_nodes(self.nodes[2], 0)
+        self.is_network_split=False
+        self.sync_all()
+
+    def one_send(self, from_node, to_address):
+        if (randint(1,2) == 1):
+            amount = Decimal(randint(1,10)) / Decimal(10)
+            self.nodes[from_node].sendtoaddress(to_address, amount)
+
+    def do_one_round(self):
+        a0 = self.nodes[0].getnewaddress()
+        a1 = self.nodes[1].getnewaddress()
+        a2 = self.nodes[2].getnewaddress()
+
+        self.one_send(0, a1)
+        self.one_send(0, a2)
+        self.one_send(1, a0)
+        self.one_send(1, a2)
+        self.one_send(2, a0)
+        self.one_send(2, a1)
+
+        # Have the miner (node3) mine a block.
+        # Must sync mempools before mining.
+        sync_mempools(self.nodes)
+        self.nodes[3].setgenerate(True, 1)
+
+    # As above, this mirrors the original bash test.
+    def start_three(self):
+        self.nodes[0] = start_node(0, self.options.tmpdir)
+        self.nodes[1] = start_node(1, self.options.tmpdir)
+        self.nodes[2] = start_node(2, self.options.tmpdir)
+        connect_nodes(self.nodes[0], 3)
+        connect_nodes(self.nodes[1], 3)
+        connect_nodes(self.nodes[2], 3)
+        connect_nodes(self.nodes[2], 0)
+
+    def stop_three(self):
+        stop_node(self.nodes[0], 0)
+        stop_node(self.nodes[1], 1)
+        stop_node(self.nodes[2], 2)
+
+    def erase_three(self):
+        os.remove(self.options.tmpdir + "/node0/regtest/wallet.dat")
+        os.remove(self.options.tmpdir + "/node1/regtest/wallet.dat")
+        os.remove(self.options.tmpdir + "/node2/regtest/wallet.dat")
+
+    def run_test(self):
+        logging.info("Generating initial blockchain")
+        self.nodes[0].setgenerate(True, 1)
+        sync_blocks(self.nodes)
+        self.nodes[1].setgenerate(True, 1)
+        sync_blocks(self.nodes)
+        self.nodes[2].setgenerate(True, 1)
+        sync_blocks(self.nodes)
+        self.nodes[3].setgenerate(True, 100)
+        sync_blocks(self.nodes)
+
+        assert_equal(self.nodes[0].getbalance(), 50)
+        assert_equal(self.nodes[1].getbalance(), 50)
+        assert_equal(self.nodes[2].getbalance(), 50)
+        assert_equal(self.nodes[3].getbalance(), 0)
+
+        logging.info("Creating transactions")
+        # Five rounds of sending each other transactions.
+        for i in range(5):
+            self.do_one_round()
+
+        logging.info("Backing up")
+        tmpdir = self.options.tmpdir
+        self.nodes[0].backupwallet(tmpdir + "/node0/wallet.bak")
+        self.nodes[0].dumpwallet(tmpdir + "/node0/wallet.dump")
+        self.nodes[1].backupwallet(tmpdir + "/node1/wallet.bak")
+        self.nodes[1].dumpwallet(tmpdir + "/node1/wallet.dump")
+        self.nodes[2].backupwallet(tmpdir + "/node2/wallet.bak")
+        self.nodes[2].dumpwallet(tmpdir + "/node2/wallet.dump")
+
+        logging.info("More transactions")
+        for i in range(5):
+            self.do_one_round()
+
+        # Generate 101 more blocks, so any fees paid mature
+        self.nodes[3].setgenerate(True, 101)
+        self.sync_all()
+
+        balance0 = self.nodes[0].getbalance()
+        balance1 = self.nodes[1].getbalance()
+        balance2 = self.nodes[2].getbalance()
+        balance3 = self.nodes[3].getbalance()
+        total = balance0 + balance1 + balance2 + balance3
+
+        # At this point, there are 214 blocks (103 for setup, then 10 rounds, then 101.)
+        # 114 are mature, so the sum of all wallets should be 114 * 50 = 5700.
+        assert_equal(total, 5700)
+
+        ##
+        # Test restoring spender wallets from backups
+        ##
+        logging.info("Restoring using wallet.dat")
+        self.stop_three()
+        self.erase_three()
+
+        # Start node2 with no chain
+        shutil.rmtree(self.options.tmpdir + "/node2/regtest/blocks")
+        shutil.rmtree(self.options.tmpdir + "/node2/regtest/chainstate")
+
+        # Restore wallets from backup
+        shutil.copyfile(tmpdir + "/node0/wallet.bak", tmpdir + "/node0/regtest/wallet.dat")
+        shutil.copyfile(tmpdir + "/node1/wallet.bak", tmpdir + "/node1/regtest/wallet.dat")
+        shutil.copyfile(tmpdir + "/node2/wallet.bak", tmpdir + "/node2/regtest/wallet.dat")
+
+        logging.info("Re-starting nodes")
+        self.start_three()
+        sync_blocks(self.nodes)
+
+        assert_equal(self.nodes[0].getbalance(), balance0)
+        assert_equal(self.nodes[1].getbalance(), balance1)
+        assert_equal(self.nodes[2].getbalance(), balance2)
+
+        logging.info("Restoring using dumped wallet")
+        self.stop_three()
+        self.erase_three()
+
+        #start node2 with no chain
+        shutil.rmtree(self.options.tmpdir + "/node2/regtest/blocks")
+        shutil.rmtree(self.options.tmpdir + "/node2/regtest/chainstate")
+
+        self.start_three()
+
+        assert_equal(self.nodes[0].getbalance(), 0)
+        assert_equal(self.nodes[1].getbalance(), 0)
+        assert_equal(self.nodes[2].getbalance(), 0)
+
+        self.nodes[0].importwallet(tmpdir + "/node0/wallet.dump")
+        self.nodes[1].importwallet(tmpdir + "/node1/wallet.dump")
+        self.nodes[2].importwallet(tmpdir + "/node2/wallet.dump")
+
+        sync_blocks(self.nodes)
+
+        assert_equal(self.nodes[0].getbalance(), balance0)
+        assert_equal(self.nodes[1].getbalance(), balance1)
+        assert_equal(self.nodes[2].getbalance(), balance2)
+
+
+if __name__ == '__main__':
+    WalletBackupTest().main()
diff --git a/qa/rpc-tests/walletbackup.sh b/qa/rpc-tests/walletbackup.sh
deleted file mode 100755
index 4af3d97f351d..000000000000
--- a/qa/rpc-tests/walletbackup.sh
+++ /dev/null
@@ -1,297 +0,0 @@
-#!/usr/bin/env bash
-# Copyright (c) 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.
-
-# Test wallet backup / dump / restore functionality
-
-# Test case is:
-# 4 nodes. 1 2 3 and send transactions between each other,
-# fourth node is a miner.
-# 1 2 3 and each mine a block to start, then
-# miner creates 100 blocks so 1 2 3 each have 50 mature
-# coins to spend.
-# Then 5 iterations of 1/2/3 sending coins amongst
-# themselves to get transactions in the wallets,
-# and the miner mining one block.
-#
-# Wallets are backed up using dumpwallet/backupwallet.
-# Then 5 more iterations of transactions, then block.
-#
-# Miner then generates 101 more blocks, so any
-# transaction fees paid mature.
-#
-# Sanity checks done:
-#   Miner balance >= 150*50
-#   Sum(1,2,3,4 balances) == 153*150
-#
-# 1/2/3 are shutdown, and their wallets erased.
-# Then restore using wallet.dat backup. And
-# confirm 1/2/3/4 balances are same as before.
-#
-# Shutdown again, restore using importwallet,
-# and confirm again balances are correct.
-#
-
-if [ $# -lt 1 ]; then
-        echo "Usage: $0 path_to_binaries"
-        echo "e.g. $0 ../../src"
-        echo "Env vars BITCOIND and BITCOINCLI may be used to specify the exact binaries used"
-        exit 1
-fi
-
-BITCOIND=${BITCOIND:-${1}/bitcoind}
-CLI=${BITCOINCLI:-${1}/bitcoin-cli}
-
-DIR="${BASH_SOURCE%/*}"
-SENDANDWAIT="${DIR}/send.sh"
-if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
-. "$DIR/util.sh"
-
-D=$(mktemp -d test.XXXXX)
-
-echo "Starting nodes..."
-
-# "Miner":
-D4=${D}/node4
-CreateDataDir $D4 port=11030 rpcport=11031
-B4ARGS="-datadir=$D4"
-$BITCOIND $BITCOINDARGS $B4ARGS &
-B4PID=$!
-
-# Want default keypool for 1/2/3, and
-# don't need send-and-wait functionality,
-# so don't use CreateDataDir:
-function CreateConfDir {
-  DIR=$1
-  mkdir -p $DIR
-  CONF=$DIR/bitcoin.conf
-  echo "regtest=1" >> $CONF
-  echo "rpcuser=rt" >> $CONF
-  echo "rpcpassword=rt" >> $CONF
-  echo "rpcwait=1" >> $CONF
-  shift
-  while (( "$#" )); do
-      echo $1 >> $CONF
-      shift
-  done
-}
-
-# "Spenders" 1/2/3
-D1=${D}/node1
-CreateConfDir $D1 port=11000 rpcport=11001 addnode=127.0.0.1:11030
-B1ARGS="-datadir=$D1"
-$BITCOIND $B1ARGS &
-B1PID=$!
-D2=${D}/node2
-CreateConfDir $D2 port=11010 rpcport=11011 addnode=127.0.0.1:11030
-B2ARGS="-datadir=$D2"
-$BITCOIND $B2ARGS &
-B2PID=$!
-D3=${D}/node3
-CreateConfDir $D3 port=11020 rpcport=11021 addnode=127.0.0.1:11030 addnode=127.0.0.1:11000
-B3ARGS="-datadir=$D3"
-$BITCOIND $BITCOINDARGS $B3ARGS &
-B3PID=$!
-
-# Wait until all nodes are at the same block number
-function WaitBlocks {
-    while :
-    do
-        sleep 1
-        BLOCKS1=$( GetBlocks "$B1ARGS" )
-        BLOCKS2=$( GetBlocks "$B2ARGS" )
-        BLOCKS3=$( GetBlocks "$B3ARGS" )
-        BLOCKS4=$( GetBlocks "$B4ARGS" )
-        if (( BLOCKS1 == BLOCKS4 && BLOCKS2 == BLOCKS4 && BLOCKS3 == BLOCKS4 ))
-        then
-            break
-        fi
-    done
-}
-
-# Wait until all nodes have the same txns in
-# their memory pools
-function WaitMemPools {
-    while :
-    do
-        sleep 1
-        MEMPOOL1=$( $CLI "$B1ARGS" getrawmempool | sort | shasum )
-        MEMPOOL2=$( $CLI "$B2ARGS" getrawmempool | sort | shasum )
-        MEMPOOL3=$( $CLI "$B3ARGS" getrawmempool | sort | shasum )
-        MEMPOOL4=$( $CLI "$B4ARGS" getrawmempool | sort | shasum )
-        if [[ $MEMPOOL1 = $MEMPOOL4 && $MEMPOOL2 = $MEMPOOL4 && $MEMPOOL3 = $MEMPOOL4 ]]
-        then
-            break
-        fi
-    done
-}
-
-echo "Generating initial blockchain..."
-
-# 1 block, 50 XBT each == 50 BTC
-$CLI $B1ARGS setgenerate true 1
-WaitBlocks
-$CLI $B2ARGS setgenerate true 1
-WaitBlocks
-$CLI $B3ARGS setgenerate true 1
-WaitBlocks
-
-# 100 blocks, 0 mature
-$CLI $B4ARGS setgenerate true 100
-WaitBlocks
-
-CheckBalance "$B1ARGS" 50
-CheckBalance "$B2ARGS" 50
-CheckBalance "$B3ARGS" 50
-CheckBalance "$B4ARGS" 0
-
-echo "Creating transactions..."
-
-function S {
-  TXID=$( $CLI -datadir=${D}/node${1} sendtoaddress ${2} "${3}" 0 )
-  if [ x$TXID = x ] ; then
-      echoerr "node${1}: error sending ${3} btc"
-      echo -n "node${1} balance: "
-      $CLI -datadir=${D}/node${1} getbalance "*" 0
-      exit 1
-  fi
-}
-
-function OneRound {
-  A1=$( $CLI $B1ARGS getnewaddress )
-  A2=$( $CLI $B2ARGS getnewaddress )
-  A3=$( $CLI $B3ARGS getnewaddress )
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 1 $A2 "0.$N"
-  fi
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 1 $A3 "0.0$N"
-  fi
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 2 $A1 "0.$N"
-  fi
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 2 $A3 "0.$N"
-  fi
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 3 $A1 "0.$N"
-  fi
-  if [[ $(( $RANDOM%2 )) < 1 ]] ; then
-      N=$(( $RANDOM % 9 + 1 ))
-      S 3 $A2 "0.0$N"
-  fi
-  $CLI "$B4ARGS" setgenerate true 1
-}
-
-for i in {1..5}; do OneRound ; done
-
-echo "Backing up..."
-
-$CLI "$B1ARGS" backupwallet "$D1/wallet.bak"
-$CLI "$B1ARGS" dumpwallet "$D1/wallet.dump"
-$CLI "$B2ARGS" backupwallet "$D2/wallet.bak"
-$CLI "$B2ARGS" dumpwallet "$D2/wallet.dump"
-$CLI "$B3ARGS" backupwallet "$D3/wallet.bak"
-$CLI "$B3ARGS" dumpwallet "$D3/wallet.dump"
-
-echo "More transactions..."
-for i in {1..5}; do OneRound ; done
-
-WaitMemPools
-
-# Generate 101 more blocks, so any fees paid
-# mature
-$CLI "$B4ARGS" setgenerate true 101
-
-BALANCE1=$( $CLI "$B1ARGS" getbalance )
-BALANCE2=$( $CLI "$B2ARGS" getbalance )
-BALANCE3=$( $CLI "$B3ARGS" getbalance )
-BALANCE4=$( $CLI "$B4ARGS" getbalance )
-
-TOTAL=$( dc -e "$BALANCE1 $BALANCE2 $BALANCE3 $BALANCE4 + + + p" )
-
-AssertEqual $TOTAL 5700.00000000
-
-function StopThree {
-  $CLI $B1ARGS stop > /dev/null 2>&1
-  $CLI $B2ARGS stop > /dev/null 2>&1
-  $CLI $B3ARGS stop > /dev/null 2>&1
-  wait $B1PID
-  wait $B2PID
-  wait $B3PID
-}
-function EraseThree {
-  rm $D1/regtest/wallet.dat
-  rm $D2/regtest/wallet.dat
-  rm $D3/regtest/wallet.dat
-}
-function StartThree {
-  $BITCOIND $BITCOINDARGS $B1ARGS &
-  B1PID=$!
-  $BITCOIND $BITCOINDARGS $B2ARGS &
-  B2PID=$!
-  $BITCOIND $BITCOINDARGS $B3ARGS &
-  B3PID=$!
-}
-
-echo "Restoring using wallet.dat"
-
-StopThree
-EraseThree
-
-# Start node3 with no chain
-rm -rf $D3/regtest/blocks
-rm -rf $D3/regtest/chainstate
-rm -rf $D3/regtest/database
-
-cp $D1/wallet.bak $D1/regtest/wallet.dat
-cp $D2/wallet.bak $D2/regtest/wallet.dat
-cp $D3/wallet.bak $D3/regtest/wallet.dat
-
-StartThree
-WaitBlocks
-
-AssertEqual $BALANCE1 $( $CLI "$B1ARGS" getbalance )
-AssertEqual $BALANCE2 $( $CLI "$B2ARGS" getbalance )
-AssertEqual $BALANCE3 $( $CLI "$B3ARGS" getbalance )
-
-echo "Restoring using dumped wallet"
-
-StopThree
-EraseThree
-
-# Start node3 with no chain
-rm -rf $D3/regtest/blocks
-rm -rf $D3/regtest/chainstate
-rm -rf $D3/regtest/database
-
-StartThree
-
-AssertEqual 0 $( $CLI "$B1ARGS" getbalance )
-AssertEqual 0 $( $CLI "$B2ARGS" getbalance )
-AssertEqual 0 $( $CLI "$B3ARGS" getbalance )
-
-$CLI "$B1ARGS" importwallet $D1/wallet.dump
-$CLI "$B2ARGS" importwallet $D2/wallet.dump
-$CLI "$B3ARGS" importwallet $D3/wallet.dump
-
-WaitBlocks
-
-AssertEqual $BALANCE1 $( $CLI "$B1ARGS" getbalance )
-AssertEqual $BALANCE2 $( $CLI "$B2ARGS" getbalance )
-AssertEqual $BALANCE3 $( $CLI "$B3ARGS" getbalance )
-
-StopThree
-$CLI $B4ARGS stop > /dev/null 2>&1
-wait $B4PID
-
-echo "Tests successful, cleaning up"
-trap "" EXIT
-rm -rf $D
-exit 0

From 73351c3686094158c3a61f1f11126569c5c3ed3f Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 28 Nov 2014 20:32:52 +0100
Subject: [PATCH 1183/1819] [REST] /rest/block response with full tx details

- rest block request returns full unfolded tx details
- /rest/block/notxdetails/<HASH> returns block where transactions are only represented by its hash
---
 qa/rpc-tests/rest.py  | 29 ++++++++++++++++++++++++++++-
 src/rest.cpp          | 26 ++++++++++++++++++++++----
 src/rpcblockchain.cpp | 14 ++++++++++++--
 3 files changed, 62 insertions(+), 7 deletions(-)

diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
index c62a96fbb858..cb1868de3627 100755
--- a/qa/rpc-tests/rest.py
+++ b/qa/rpc-tests/rest.py
@@ -48,7 +48,7 @@ def run_test(self):
         assert_equal(json_obj['hash'], bb_hash)
         
         # do tx test
-        tx_hash = json_obj['tx'][0];
+        tx_hash = json_obj['tx'][0]['txid'];
         json_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"json")
         json_obj = json.loads(json_string)
         assert_equal(json_obj['txid'], tx_hash)
@@ -57,6 +57,33 @@ def run_test(self):
         hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", True)
         assert_equal(response.status, 200)
         assert_greater_than(int(response.getheader('content-length')), 10)
+        
+        # check block tx details
+        # let's make 3 tx and mine them on node 1
+        txs = []
+        txs.append(self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11))
+        txs.append(self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11))
+        txs.append(self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11))
+        self.sync_all()
+        
+        # now mine the transactions
+        newblockhash = self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
+        
+        #check if the 3 tx show up in the new block
+        json_string = http_get_call(url.hostname, url.port, '/rest/block/'+newblockhash[0]+self.FORMAT_SEPARATOR+'json')
+        json_obj = json.loads(json_string)
+        for tx in json_obj['tx']:
+            if not 'coinbase' in tx['vin'][0]: #exclude coinbase
+                assert_equal(tx['txid'] in txs, True)
+        
+        #check the same but without tx details
+        json_string = http_get_call(url.hostname, url.port, '/rest/block/notxdetails/'+newblockhash[0]+self.FORMAT_SEPARATOR+'json')
+        json_obj = json.loads(json_string)
+        for tx in txs:
+            assert_equal(tx in json_obj['tx'], True)
+                
+        
 
 if __name__ == '__main__':
     RESTTest ().main ()
diff --git a/src/rest.cpp b/src/rest.cpp
index 6285784af595..6329b44c5355 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -42,7 +42,7 @@ class RestErr
 };
 
 extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry);
-extern Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex);
+extern Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false);
 
 static RestErr RESTERR(enum HTTPStatusCode status, string message)
 {
@@ -92,7 +92,8 @@ static bool ParseHashStr(const string& strReq, uint256& v)
 static bool rest_block(AcceptedConnection* conn,
                        string& strReq,
                        map<string, string>& mapHeaders,
-                       bool fRun)
+                       bool fRun,
+                       bool showTxDetails)
 {
     vector<string> params;
     enum RetFormat rf = ParseDataFormat(params, strReq);
@@ -131,7 +132,7 @@ static bool rest_block(AcceptedConnection* conn,
     }
 
     case RF_JSON: {
-        Object objBlock = blockToJSON(block, pblockindex);
+        Object objBlock = blockToJSON(block, pblockindex, showTxDetails);
         string strJSON = write_string(Value(objBlock), false) + "\n";
         conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
         return true;
@@ -146,6 +147,22 @@ static bool rest_block(AcceptedConnection* conn,
     return true; // continue to process further HTTP reqs on this cxn
 }
 
+static bool rest_block_extended(AcceptedConnection* conn,
+                       string& strReq,
+                       map<string, string>& mapHeaders,
+                       bool fRun)
+{
+    return rest_block(conn, strReq, mapHeaders, fRun, true);
+}
+
+static bool rest_block_notxdetails(AcceptedConnection* conn,
+                       string& strReq,
+                       map<string, string>& mapHeaders,
+                       bool fRun)
+{
+    return rest_block(conn, strReq, mapHeaders, fRun, false);
+}
+
 static bool rest_tx(AcceptedConnection* conn,
                     string& strReq,
                     map<string, string>& mapHeaders,
@@ -205,7 +222,8 @@ static const struct {
                     bool fRun);
 } uri_prefixes[] = {
       {"/rest/tx/", rest_tx},
-      {"/rest/block/", rest_block},
+      {"/rest/block/notxdetails/", rest_block_notxdetails},
+      {"/rest/block/", rest_block_extended},
 };
 
 bool HTTPReq_REST(AcceptedConnection* conn,
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 924f416904d1..77843877568b 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -16,6 +16,7 @@
 using namespace json_spirit;
 using namespace std;
 
+extern void TxToJSON(const CTransaction& tx, const uint256 hashBlock, Object& entry);
 void ScriptPubKeyToJSON(const CScript& scriptPubKey, Object& out, bool fIncludeHex);
 
 double GetDifficulty(const CBlockIndex* blockindex)
@@ -50,7 +51,7 @@ double GetDifficulty(const CBlockIndex* blockindex)
 }
 
 
-Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
+Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false)
 {
     Object result;
     result.push_back(Pair("hash", block.GetHash().GetHex()));
@@ -65,7 +66,16 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex)
     result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
     Array txs;
     BOOST_FOREACH(const CTransaction&tx, block.vtx)
-        txs.push_back(tx.GetHash().GetHex());
+    {
+        if(txDetails)
+        {
+            Object objTx;
+            TxToJSON(tx, block.GetHash(), objTx);
+            txs.push_back(objTx);
+        }
+        else
+            txs.push_back(tx.GetHash().GetHex());
+    }
     result.push_back(Pair("tx", txs));
     result.push_back(Pair("time", block.GetBlockTime()));
     result.push_back(Pair("nonce", (uint64_t)block.nNonce));

From cae548685dc26c3be823f132ab88947175d19af6 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Sat, 6 Dec 2014 10:54:09 +0100
Subject: [PATCH 1184/1819] [REST] added /rest/block/notxdetails/<hash> into
 REST-interface.md documentation

---
 doc/REST-interface.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index 05c532be5433..0af650b4e8eb 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -11,12 +11,15 @@ Given a transaction hash,
 Returns a transaction, in binary, hex-encoded binary or JSON formats.
 
 `GET /rest/block/BLOCK-HASH.{bin|hex|json}`
+`GET /rest/block/notxdetails/BLOCK-HASH.{bin|hex|json}`
 
 Given a block hash,
 Returns a block, in binary, hex-encoded binary or JSON formats.
 
 The HTTP request and response are both handled entirely in-memory, thus making maximum memory usage at least 2.66MB (1 MB max block, plus hex encoding) per request.
 
+With the /notxdetails/ option JSON response will only contain the transaction hash instead of the complete transaction details. The option only affects the JSON response.
+
 For full TX query capability, one must enable the transaction index via "txindex=1" command line / configuration option.
 
 Risks

From 932ef50f775b5f514941e6ee9dc91d0dcf89321f Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Sat, 6 Dec 2014 19:09:03 +0100
Subject: [PATCH 1185/1819] [REST] JSON output: remove block infos from tx
 details if it is nested in block

---
 src/rpcblockchain.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 77843877568b..66e86ebace40 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -70,7 +70,7 @@ Object blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDe
         if(txDetails)
         {
             Object objTx;
-            TxToJSON(tx, block.GetHash(), objTx);
+            TxToJSON(tx, uint256(0), objTx);
             txs.push_back(objTx);
         }
         else

From 7c001bb49c084a01a09827bf26447a418ecaeb9a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 11 Dec 2014 11:07:37 +0100
Subject: [PATCH 1186/1819] qt: translations pull from transifex

---
 src/qt/locale/bitcoin_de.ts    |  16 +
 src/qt/locale/bitcoin_el_GR.ts | 536 ++++++++++++++++++++++++++++++++-
 src/qt/locale/bitcoin_es.ts    |  76 +++++
 src/qt/locale/bitcoin_it.ts    | 145 +++++++++
 src/qt/locale/bitcoin_ja.ts    | 116 ++++++-
 src/qt/locale/bitcoin_kk_KZ.ts | 222 +++++++++++++-
 src/qt/locale/bitcoin_nl.ts    | 362 +++++++++++++++++++++-
 src/qt/locale/bitcoin_ro_RO.ts |   4 +
 src/qt/locale/bitcoin_ru.ts    |  40 ++-
 src/qt/locale/bitcoin_sr.ts    |  22 +-
 src/qt/locale/bitcoin_uk.ts    | 120 ++++++++
 src/qt/locale/bitcoin_zh_TW.ts | 238 ++++++++++++++-
 12 files changed, 1871 insertions(+), 26 deletions(-)

diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 9462f668d3df..2804d2d6654a 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1855,14 +1855,26 @@ Adresse: %4</translation>
         <source>Minimize</source>
         <translation>Minimieren</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Wenn die benutzerdefinierte Gebühr 1000 Satoshis beträgt und die Transaktion nur 250 Byte groß ist, wird bei Auswahl von "pro Kilobyte" eine Gebühr in Höhe von 250 Satoshis, bei Auswahl von "Mindestbetrag" eine Gebühr in Höhe von 1000 Satoshis bezahlt. Bei Transaktionen die Größer als ein Kilobyte sind, werden bei beiden Optionen die Gebühren pro Kilobyte bezahlt.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>pro Kilobyte</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Wenn die benutzerdefinierte Gebühr 1000 Satoshis beträgt und die Transaktion nur 250 Byte groß ist, wird bei Auswahl von "pro Kilobyte" eine Gebühr in Höhe von 250 Satoshis, bei Auswahl von "Mindestbetrag" eine Gebühr in Höhe von 1000 Satoshis bezahlt. Bei Transaktionen die Größer als ein Kilobyte sind, werden bei beiden Optionen die Gebühren pro Kilobyte bezahlt.</translation>
+    </message>
     <message>
         <source>total at least</source>
         <translation>Mindestbetrag</translation>
     </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Nur die minimale Gebühr zu bezahlen ist so lange in Ordnung, wie weniger Transaktionsvolumen als Platz in den Blöcken vorhanden ist. Aber Vorsicht, diese Option kann dazu führen, dass Transaktionen nicht bestätigt werden, wenn mehr Bedarf an Bitcoin-Transaktionen besteht als das Netzwerk verarbeiten kann.</translation>
+    </message>
     <message>
         <source>(read the tooltip)</source>
         <translation>(den Hinweistext lesen)</translation>
@@ -2821,6 +2833,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Alle Wallet-Transaktionen löschen und nur diese Teilbereiche der Blockkette durch -rescan beim Starten wiederherstellen</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Veröffentlicht unter der MIT-Softwarelizenz, siehe beiligende Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können.</translation>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 1a1c918c5bc9..cf29c222ed5b 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -7,7 +7,7 @@
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Δημιούργησε νέα διεύθυνση</translation>
+        <translation>Δημιουργία νέας διεύθυνσης</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -53,6 +53,10 @@
         <source>Choose the address to receive coins with</source>
         <translation>Επιλογή διεύθυνσης απ' όπου θα ληφθούν νομίσματα</translation>
     </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>Ε&amp;πιλογή</translation>
+    </message>
     <message>
         <source>Sending addresses</source>
         <translation>Διευθύνσεις αποστολής</translation>
@@ -65,6 +69,10 @@
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Αυτές είναι οι Bitcoin διευθύνσεις σας για να λαμβάνετε πληρωμές. Δίνοντας μία ξεχωριστή διεύθυνση σε κάθε αποστολέα, θα μπορείτε να ελέγχετε ποιος σας πληρώνει.</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>Αυτές είναι οι Bitcoin διευθύνσεις σας για να λαμβάνετε πληρωμές. Δίνοντας μία ξεχωριστή διεύθυνση σε κάθε αποστολέα, θα μπορείτε να ελέγχετε ποιος σας πληρώνει.</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Αντιγραφή &amp;επιγραφής</translation>
@@ -85,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Η εξαγωγή απέτυχε</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Παρουσιάστηκε σφάλμα κατά την αποθήκευση της λίστας πορτοφολιών στο %1. Παρακαλώ δοκιμάστε ξανά</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -113,7 +125,7 @@
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>Νέος κωδικός πρόσβασης</translation>
+        <translation>&amp;Αλλαγή κωδικού</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
@@ -121,7 +133,7 @@
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Κρυπτογράφησε το πορτοφόλι</translation>
+        <translation>&amp;Κρυπτογράφηση πορτοφολιού</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
@@ -172,6 +184,10 @@
         <source>Wallet encrypted</source>
         <translation>Κρυπτογραφημενο πορτοφολι</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Εισάγετε τον νέο κωδικό πρόσβασης στον πορτοφόλι &lt;br/&gt; Παρακαλώ χρησιμοποιείστε ένα κωδικό με &lt;b&gt; 10 ή περισσότερους τυχαίους χαρακτήρες&lt;/b&gt; ή &lt;b&gt; οχτώ ή παραπάνω λέξεις&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Το Bitcoin θα κλεισει τώρα για να τελειώσει την διαδικασία κρυπτογραφησης. Θυμησου ότι κρυπτογραφώντας το πορτοφολι σου δεν μπορείς να προστατέψεις πλήρως τα bitcoins σου από κλοπή στην περίπτωση όπου μολυνθεί ο υπολογιστής σου με κακόβουλο λογισμικό.</translation>
@@ -219,6 +235,10 @@
         <source>&amp;Overview</source>
         <translation>&amp;Επισκόπηση</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Κόμβος</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Εμφάνισε τη γενική εικόνα του πορτοφολιού</translation>
@@ -263,6 +283,22 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Άλλαξε κωδικο πρόσβασης</translation>
     </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>Διευθύνσεις αποστολής</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>Διευθύνσεις λήψης</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>'Ανοιγμα &amp;URI</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Εφαρμογή Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Εισαγωγή μπλοκ από τον σκληρο δίσκο ... </translation>
@@ -315,6 +351,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Παραλαβή </translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Σχετικά με το Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Εμφάνισε/Κρύψε</translation>
@@ -371,6 +411,18 @@
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Προβολή της λίστας των χρησιμοποιημένων διευθύνσεων και ετικετών λήψεως</translation>
     </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation>Άνοιγμα bitcoin: URI αίτησης πληρωμής</translation>
+    </message>
+    <message>
+        <source>&amp;Command-line options</source>
+        <translation>&amp;Επιλογές γραμμής εντολών</translation>
+    </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>Εμφανιση του Bitcoin-Qt μήνυματος βοήθειας για να πάρετε μια λίστα με τις πιθανές επιλογές Bitcoin γραμμής εντολών.</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n ενεργή σύνδεση στο δίκτυο Bitcoin</numerusform><numerusform>%n ενεργές συνδέσεις στο δίκτυο Βitcoin</numerusform></translation>
@@ -469,6 +521,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Επιλογή κερμάτων</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Ποσότητα:</translation>
@@ -485,6 +541,18 @@ Address: %4
         <source>Priority:</source>
         <translation>Προτεραιότητα:</translation>
     </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Ταρίφα</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Σκόνη</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Ταρίφα αλλαγής</translation>
+    </message>
     <message>
         <source>Change:</source>
         <translation>Ρέστα:</translation>
@@ -493,10 +561,26 @@ Address: %4
         <source>(un)select all</source>
         <translation>(από)επιλογή όλων</translation>
     </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Εμφάνιση τύπου δέντρο</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Λίστα εντολών</translation>
+    </message>
     <message>
         <source>Amount</source>
         <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>
@@ -529,10 +613,26 @@ Address: %4
         <source>Copy transaction ID</source>
         <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>Αντιγραφή των byte</translation>
@@ -541,6 +641,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>Αντιγραφή προτεραιότητας</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Αντιγραφή 'σκόνης'</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Αντιγραφή των ρέστων</translation>
@@ -601,6 +705,22 @@ Address: %4
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Η ετικετα γινετε κοκκινη , αν το μεγεθος της συναλαγης ειναι μεγαλητερο απο 1000 bytes.</translation>
     </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation>Ελάχιστο χρεώσιμο ποσό τουλάχιστο %1 ανα kB</translation>
+    </message>
+    <message>
+        <source>Transactions with higher priority are more likely to get included into a block.</source>
+        <translation>Συναλλαγές με υψηλότερη προτεραιότητα είναι πιο πιθανό να περιλαμβάνονται σε ένα μπλοκ.</translation>
+    </message>
+    <message>
+        <source>This label turns red, if the priority is smaller than "medium".</source>
+        <translation>Η ετικέτα γίνεται κόκκινη , αν το μέγεθος της συναλαγής είναι μεγαλύτερο απο το ",μεσαίο",</translation>
+    </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation>Η ετικέτα γίνεται κόκκινη , αν ο παραλήπτης παραλάβει ένα ποσό μικρότερο απο %1.</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(χωρίς ετικέτα)</translation>
@@ -629,6 +749,10 @@ Address: %4
         <source>The label associated with this address list entry</source>
         <translation>Η ετικέτα που συνδέεται με αυτήν την καταχώρηση στο βιβλίο διευθύνσεων</translation>
     </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation>Η διεύθυνση σχετίζεται με αυτή την καταχώρηση του βιβλίου διευθύνσεων. Μπορεί να τροποποιηθεί μόνο για τις διευθύνσεις αποστολής.</translation>
+    </message>
     <message>
         <source>&amp;Address</source>
         <translation>&amp;Διεύθυνση</translation>
@@ -676,6 +800,14 @@ Address: %4
         <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>
+    <message>
+        <source>Path already exists, and is not a directory.</source>
+        <translation>Η διαδρομή υπάρχει ήδη αλλά δεν είναι φάκελος</translation>
+    </message>
     <message>
         <source>Cannot create data directory here.</source>
         <translation>Δεν μπορεί να δημιουργηθεί φάκελος δεδομένων εδώ.</translation>
@@ -723,11 +855,19 @@ Address: %4
         <source>Start minimized</source>
         <translation>Έναρξη ελαχιστοποιημένο</translation>
     </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Ορίστε SSL root certificates για αίτηση πληρωμής (default: -system-)</translation>
+    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Εμφάνισε την οθόνη εκκίνησης κατά την εκκίνηση(προεπιλογή:1)</translation>
     </message>
-    </context>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation>Επιλογή καταλόγου</translation>
+    </message>
+</context>
 <context>
     <name>Intro</name>
     <message>
@@ -742,6 +882,10 @@ Address: %4
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
         <translation>Καθώς αυτή είναι η πρώτη φορά που εκκινείται το πρόγραμμα, μπορείτε να διαλέξετε πού θα αποθηκεύει το Bitcoin Core τα δεδομένα του.</translation>
     </message>
+    <message>
+        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+        <translation>O πυρήνας Bitcoin θα κατεβάσει και να αποθηκεύσει ένα αντίγραφο της αλυσίδας μπλοκ Bitcoin. Τουλάχιστον %1GB δεδομένων θα αποθηκευτούν σε αυτόν τον κατάλογο, και θα αυξηθεί με την πάροδο του χρόνου. Το πορτοφόλι θα αποθηκευτεί σε αυτόν τον κατάλογο.</translation>
+    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>Χρήση του προεπιλεγμένου φακέλου δεδομένων</translation>
@@ -754,6 +898,10 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Σφάλμα: Ο καθορισμένος φάκελος δεδομένων "%1" δεν μπορεί να δημιουργηθεί.</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Σφάλμα</translation>
@@ -761,7 +909,27 @@ Address: %4
     </context>
 <context>
     <name>OpenURIDialog</name>
-    </context>
+    <message>
+        <source>Open URI</source>
+        <translation>'Ανοιγμα &amp;URI</translation>
+    </message>
+    <message>
+        <source>Open payment request from URI or file</source>
+        <translation>Ανοιχτό αίτημα πληρωμής από URI ή απο αρχείο</translation>
+    </message>
+    <message>
+        <source>URI:</source>
+        <translation>URI:</translation>
+    </message>
+    <message>
+        <source>Select payment request file</source>
+        <translation>Επιλέξτε πληρωμή αρχείου αίτησης</translation>
+    </message>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation>Επιλέξτε αρχείο πληρωμής για άνοιγμα.</translation>
+    </message>
+</context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -780,10 +948,34 @@ Address: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Έναρξη του Βιtcoin κατά την εκκίνηση του συστήματος</translation>
     </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Μέγεθος κρυφής μνήμης βάσης δεδομένων.</translation>
+    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>Αριθμός script και γραμμές επαλήθευσης </translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Αποδοχή συνδέσεων απο έξω</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Αποδοχή εισερχόμενων συναλλαγών</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>Διεύθυνση IP του διαμεσολαβητή (π.χ. 127.0.0.1  / IPv6: ::1)</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>Διευθύνσεις τρίτων συναλλαγών.</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Επαναφορα όλων των επιλογων του πελάτη σε default.</translation>
@@ -796,10 +988,18 @@ Address: %4
         <source>&amp;Network</source>
         <translation>&amp;Δίκτυο</translation>
     </message>
+    <message>
+        <source>W&amp;allet</source>
+        <translation>Π&amp;ορτοφόλι</translation>
+    </message>
     <message>
         <source>Expert</source>
         <translation>Έμπειρος</translation>
     </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>Επιλογή κατα πόσο να αναδείχνονται οι δυνατότητες ελέγχου κερμάτων.</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>
@@ -808,6 +1008,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Απόδοση θυρών με χρήστη &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Σύνδεση στο Bitcoin δίκτυο μέσω διαμεσολαβητή SOCKS5 (π.χ. για σύνδεση μέσω Tor)</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Σύνδεση μέσω διαμεσολαβητή SOCKS5 (προεπιλεγμένος)</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP διαμεσολαβητή:</translation>
@@ -860,6 +1068,10 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Διαλέξτε την προεπιλεγμένη υποδιαίρεση που θα εμφανίζεται όταν στέλνετε νομίσματα.</translation>
     </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation>Επιλογή κατα πόσο να αναδείχνονται οι δυνατότητες ελέγχου κερμάτων.</translation>
+    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;ΟΚ</translation>
@@ -884,6 +1096,14 @@ Address: %4
         <source>Client restart required to activate changes.</source>
         <translation>Χρειάζεται επανεκκίνηση του προγράμματος για να ενεργοποιηθούν οι αλλαγές.</translation>
     </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>Η εφαρμογή θα τερματιστεί. Θέλετε να προχωρήσετε;</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>Η αλλαγή αυτή θα χρειαστεί επανεκκίνηση του προγράμματος</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή</translation>
@@ -899,6 +1119,10 @@ Address: %4
         <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>Οι πληροφορίες που εμφανίζονται μπορεί να είναι ξεπερασμένες. Το πορτοφόλι σας συγχρονίζεται αυτόματα με το δίκτυο Bitcoin μετά από μια σύνδεση, αλλά αυτή η διαδικασία δεν έχει ακόμη ολοκληρωθεί. </translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Επίβλεψη μόνο:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Διαθέσιμο:</translation>
@@ -907,6 +1131,10 @@ Address: %4
         <source>Your current spendable balance</source>
         <translation>Το τρέχον διαθέσιμο υπόλοιπο</translation>
     </message>
+    <message>
+        <source>Pending:</source>
+        <translation>Εκκρεμούν:</translation>
+    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Το άθροισμα των συναλλαγών που δεν έχουν ακόμα επιβεβαιωθεί και δεν προσμετρώνται στο τρέχον διαθέσιμο υπόλοιπό σας</translation>
@@ -919,6 +1147,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Εξορυγμενο υπόλοιπο που δεν έχει ακόμα ωριμάσει </translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Υπόλοιπο:</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Σύνολο:</translation>
@@ -927,6 +1159,14 @@ Address: %4
         <source>Your current total balance</source>
         <translation>Το τρέχον συνολικό υπόλοιπο</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Ξοδεμένα:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Πρόσφατες συναλλαγές</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>εκτός συγχρονισμού</translation>
@@ -942,6 +1182,18 @@ Address: %4
         <source>Invalid payment address %1</source>
         <translation>Μη έγκυρη διεύθυνση πληρωμής %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Η αίτηση πληρωμής έχει αρνηθεί.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Η αίτηση πληρωμής έχει λήξει.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Η αίτηση πληρωμής δεν έχει αρχίζει ακόμα.</translation>
+    </message>
     <message>
         <source>Payment request error</source>
         <translation>Σφάλμα αιτήματος πληρωμής</translation>
@@ -950,6 +1202,18 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Δεν είναι δυνατή η εκκίνηση του Bitcoin: click-to-pay handler</translation>
     </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>Η διεύθυνση πληρωμής (URL) δεν είναι έγκυρη: %1</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>Επιλέξτε αρχείο πληρωμής για άνοιγμα.</translation>
+    </message>
+    <message>
+        <source>Refund from %1</source>
+        <translation>Επιστροφή ποσού από %1</translation>
+    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Πληρωμή αναγνωρίστηκε</translation>
@@ -961,13 +1225,29 @@ Address: %4
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Διεύθυθνση/Όνομα υπολογιστή</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Χρόνος καθυστέρησης</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Ποσό</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Εισάγετε μια διεύθυνση Bitcoin (π.χ. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 ώ</translation>
@@ -976,11 +1256,31 @@ Address: %4
         <source>%1 m</source>
         <translation>%1 λ</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>Δίκτυο</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>Άγνωστο(α)</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Κανένα</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>Μη διαθέσιμο</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1054,6 +1354,22 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>Τρέχον αριθμός μπλοκ</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Παραλήφθησαν</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Έκδοση</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Υπηρεσίες</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Χρόνος καθυστέρησης</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Χρόνος τελευταίου μπλοκ</translation>
@@ -1130,6 +1446,26 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
+    <message>
+        <source>via %1</source>
+        <translation>μέσω %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>ποτέ</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Εισερχόμενα</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Εξερχόμενα</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Άγνωστο(α)</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -1184,6 +1520,10 @@ Address: %4
         <source>QR Code</source>
         <translation>Κώδικας QR</translation>
     </message>
+    <message>
+        <source>Copy &amp;URI</source>
+        <translation>Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος</translation>
+    </message>
     <message>
         <source>&amp;Save Image...</source>
         <translation>&amp;Αποθήκευση εικόνας...</translation>
@@ -1192,6 +1532,10 @@ Address: %4
         <source>Payment information</source>
         <translation>Πληροφορίες πληρωμής</translation>
     </message>
+    <message>
+        <source>URI</source>
+        <translation>URI:</translation>
+    </message>
     <message>
         <source>Address</source>
         <translation>Διεύθυνση</translation>
@@ -1254,6 +1598,10 @@ Address: %4
         <source>Send Coins</source>
         <translation>Αποστολή νομισμάτων</translation>
     </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation>Χαρακτηρηστικά επιλογής κερμάτων</translation>
+    </message>
     <message>
         <source>automatically selected</source>
         <translation>επιλεγμένο αυτόματα</translation>
@@ -1278,10 +1626,34 @@ Address: %4
         <source>Priority:</source>
         <translation>Προτεραιότητα:</translation>
     </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Ταρίφα</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Ταρίφα αλλαγής</translation>
+    </message>
     <message>
         <source>Change:</source>
         <translation>Ρέστα:</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Τέλος συναλλαγής:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Επιλογή...</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Ελαχιστοποίηση</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>Γρήγορο</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Αποστολή σε πολλούς αποδέκτες ταυτόχρονα</translation>
@@ -1294,6 +1666,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>Καθαρισμός όλων των πεδίων της φόρμας.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Σκόνη</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Καθαρισμός &amp;Όλων</translation>
@@ -1326,6 +1702,14 @@ Address: %4
         <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>Αντιγραφή των byte</translation>
@@ -1378,6 +1762,10 @@ Address: %4
         <source>(no label)</source>
         <translation>(χωρίς ετικέτα)</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Αντιγραφή 'σκόνης'</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Είστε βέβαιοι για την αποστολή;</translation>
@@ -1463,6 +1851,10 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Μπορείτε να υπογράφετε μηνύματα με τις διευθύνσεις σας, ώστε ν' αποδεικνύετε πως αυτές σας ανήκουν. Αποφεύγετε να υπογράφετε κάτι αόριστο καθώς ενδέχεται να εξαπατηθείτε. Υπογράφετε μόνο πλήρης δηλώσεις με τις οποίες συμφωνείτε.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Διεύθυνση Bitcoin που θα σταλεί το μήνυμα</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Επιλογή διεύθυνσης που έχει ήδη χρησιμοποιηθεί</translation>
@@ -1515,6 +1907,10 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>Πληκτρολογήστε την υπογραφή διεύθυνσης, μήνυμα (βεβαιωθείτε ότι έχετε αντιγράψει τις αλλαγές γραμμής, κενά, tabs, κ.λπ. ακριβώς) και την υπογραφή παρακάτω, για να ελέγξει το μήνυμα. Να είστε προσεκτικοί για να μην διαβάσετε περισσότερα στην υπογραφή ό, τι είναι στην υπογραφή ίδιο το μήνυμα , για να μην εξαπατηθούν από έναν άνθρωπο -in - the-middle επίθεση.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Διεύθυνση Bitcoin η οποία το μήνυμα έχει υπογραφεί</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Υπογράψτε ένα μήνυμα για ν' αποδείξετε πως υπογραφθηκε απο μια συγκεκριμένη διεύθυνση Bitcoin</translation>
@@ -1608,6 +2004,10 @@ Address: %4
         <source>Open until %1</source>
         <translation>Ανοιχτό μέχρι %1</translation>
     </message>
+    <message>
+        <source>conflicted</source>
+        <translation>σύγκρουση</translation>
+    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/χωρίς σύνδεση;</translation>
@@ -1652,6 +2052,10 @@ Address: %4
         <source>own address</source>
         <translation> δική σας διεύθυνση </translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Επίβλεψη μόνο:</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>eπιγραφή</translation>
@@ -1672,6 +2076,14 @@ Address: %4
         <source>Debit</source>
         <translation>Debit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Σύνολο χρέωσης</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Συνολική πίστωση</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Τέλος συναλλαγής </translation>
@@ -1696,6 +2108,10 @@ Address: %4
         <source>Merchant</source>
         <translation>Έμπορος</translation>
     </message>
+    <message>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>Πρέπει να περιμένετε %1 μπλοκ πριν μπορέσετε να χρησιμοποιήσετε τα νομίσματα που έχετε δημιουργήσει. Το μπλοκ που δημιουργήσατε μεταδόθηκε στο δίκτυο για να συμπεριληφθεί στην αλυσίδα των μπλοκ. Αν δεν μπει σε αυτή θα μετατραπεί σε "μη αποδεκτό" και δε θα μπορεί να καταναλωθεί. Αυτό συμβαίνει σπάνια όταν κάποιος άλλος κόμβος δημιουργήσει ένα μπλοκ λίγα δευτερόλεπτα πριν από εσάς.</translation>
+    </message>
     <message>
         <source>Debug information</source>
         <translation>Πληροφορίες αποσφαλμάτωσης</translation>
@@ -1786,6 +2202,10 @@ Address: %4
         <source>Unconfirmed</source>
         <translation>Ανεπιβεβαίωτες</translation>
     </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>Σύγκρουση</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>Παραλαβή με</translation>
@@ -1806,6 +2226,10 @@ Address: %4
         <source>Mined</source>
         <translation>Εξόρυξη</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>Επίβλεψη μόνο:</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(δ/α)</translation>
@@ -1917,6 +2341,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>Εξαγωγή Ιστορικού Συναλλαγών</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Επίβλεψη μόνο:</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Η Εξαγωγή Απέτυχε</translation>
@@ -2153,6 +2581,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Σφάλμα φορτωσης της βασης δεδομενων των μπλοκ</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Σφάλμα: Παρουσιάστηκε ανεπανόρθωτο εσωτερικό σφάλμα, δείτε debug.log για λεπτομέρειες</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Προειδοποίηση: Χαμηλός χώρος στο δίσκο  </translation>
@@ -2165,6 +2597,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ταλαιπωρηθειτε για να ακούσετε σε οποιαδήποτε θύρα. Χρήση - ακούστε = 0 , αν θέλετε αυτό.</translation>
     </message>
+    <message>
+        <source>Importing...</source>
+        <translation>ΕΙσαγωγή...</translation>
+    </message>
     <message>
         <source>Invalid -onion address: '%s'</source>
         <translation>Άκυρη διεύθυνση -onion : '%s'</translation>
@@ -2177,6 +2613,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
     </message>
+    <message>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>Επιλέξτε αρχείο πορτοφολιού (μέσα απο κατάλογο δεδομένων)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Επαλήθευση των μπλοκ... </translation>
@@ -2193,6 +2633,26 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
     </message>
+    <message>
+        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
+        <translation>Αδυναμία κλειδώματος του φακέλου δεδομένων %s. Πιθανώς το Bitcoin να είναι ήδη ενεργό.</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Σύνδεση μέσω διαμεσολαβητή SOCKS5</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Δεν μπόρεσε να αναλυθεί η παράμετρος -rpcbind value %s ως διεύθυνση δικτύου</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Σφάλμα φόρτωσης wallet.dat: Το Πορτοφόλι απαιτεί μια νεότερη έκδοση του Bitcoin</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Σφάλμα: Μη συμβατή παράμετρος -tor. Χρησιμοποιήσε την παράμετρο -onion</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Πληροφορία</translation>
@@ -2205,6 +2665,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</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>Send trace/debug info to console instead of debug.log file</source>
         <translation>Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log</translation>
@@ -2217,6 +2681,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Η υπογραφή συναλλαγής απέτυχε </translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Η εφαρμογή είναι σε πειραματικό στάδιο.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Το ποσό της συναλλαγής είναι πολύ μικρο </translation>
@@ -2245,6 +2713,10 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Προειδοποίηση: Αυτή η έκδοση είναι ξεπερασμένη, απαιτείται αναβάθμιση </translation>
     </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>Μεταφορά όλων των συναλλαγών απο το πορτοφόλι</translation>
+    </message>
     <message>
         <source>on startup</source>
         <translation>κατά την εκκίνηση</translation>
@@ -2289,14 +2761,62 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Σφάλμα φόρτωσης wallet.dat: Κατεστραμμένο Πορτοφόλι</translation>
     </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Πόσο εξονυχιστική να είναι η επιβεβαίωση του μπλοκ (0-4, προεπιλογή: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Διατηρήση ένος πλήρες ευρετήριου συναλλαγών (προεπιλογή: %u) </translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Δευτερόλεπτα πριν επιτραπεί ξανά η σύνδεση των προβληματικών peers (προεπιλογή: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Σφάλμα φόρτωσης αρχείου wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Επιβολή ασφαλής λειτουργίας (προεπιλογή: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Δημιουργία νομισμάτων (προκαθορισμος: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Πόσα μπλοκ να ελέγχθουν κατά την εκκίνηση (προεπιλογή: %u, 0 = όλα)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Να συμπεριληφθεί η διεύθυνση IP στην αναφορά? (προεπιλογή: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s'</translation>
     </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Εκτύπωση μπλοκ δέντρου κατά την εκκίνηση (προεπιλογή: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Αρχείο πιστοποιητικού του διακομιστή  (προεπιλογή: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Ορισμός λήξης χρονικού ορίου σε χιλιοστά του δευτερολέπτου(προεπιλογή: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Ορίστε αρχείο pid (προεπιλογή: %s)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Όριο αποσύνδεσης προβληματικών peers (προεπιλογή: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Άγνωστo δίκτυο ορίζεται σε onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 71f7e9f4c9cb..b701366706f6 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -524,6 +524,10 @@ Dirección: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Selección de la moneda</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantidad:</translation>
@@ -572,6 +576,14 @@ Dirección: %4
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Recibido con etiqueta</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Recibido con dirección</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Fecha</translation>
@@ -1034,6 +1046,14 @@ Dirección: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Mapear el puerto mediante &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Conectarse a la red Bitcoin a través de un proxy SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Conectarse a través de proxy SOCKS5 (proxy predeterminado):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Dirección &amp;IP del proxy:</translation>
@@ -1824,6 +1844,50 @@ Dirección: %4
         <source>Custom change address</source>
         <translation>Dirección propia</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Comisión de Transacción:</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimizar</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>por kilobyte</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total por lo menos</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomendado:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalizado:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Tarifa inteligente no inicializado aún. Esto generalmente lleva a pocos bloques...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Tiempo de confirmación:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rápido</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(confirmación puede tardar más tiempo)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar a múltiples destinatarios de una vez</translation>
@@ -1928,6 +1992,14 @@ Dirección: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>¡La transacción fue rechazada! Esto puede haber ocurrido si alguno de los bitcoins de su monedero ya estaba gastado o si ha usado una copia de wallet.dat y los bitcoins estaban gastados en la copia pero no se habían marcado como gastados aqui.</translation>
     </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Paga sólo la cuota mínima de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Estimado para comenzar confirmación dentro de %1 bloque(s)</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Alerta: Dirección de Bitcoin inválida</translation>
@@ -2738,6 +2810,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Borrar todas las transacciones del monedero y sólo recuperar aquellas partes de la cadena de bloques por medio de -rescan on startup.</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuido bajo la licencia de software MIT, vea la copia del archivo adjunto o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ingresar en el modo de prueba de regresión, que utiliza una cadena especial en la que los bloques se pueden resolver instantáneamente.</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 5dbe98b0f8f3..06cf0e0162aa 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Aggiornato</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Processati %n blocchi dello storico transazioni.</numerusform><numerusform>Processati %n blocchi dello storico delle transazioni.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>In aggiornamento...</translation>
@@ -521,6 +525,11 @@ Indirizzo: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Seleziona Moneta
+</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantità:</translation>
@@ -569,6 +578,14 @@ Indirizzo: %4
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Ricevuto con etichetta</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Ricevuto con l'indirizzo</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -1024,6 +1041,14 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Mappa le porte tramite &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Connessione alla rete Bitcoin attraverso un proxy SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Connessione attraverso proxy SOCKS5 (proxy predefinito):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP del proxy:</translation>
@@ -1187,6 +1212,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
         <translation>l'equilibrio estratto solo nello sguardo degli indirizzi non è ancora maturo </translation>
     </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>Saldo corrente totale negli indirizzi watch-only</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>non sincronizzato</translation>
@@ -1810,6 +1839,50 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Custom change address</source>
         <translation>Personalizza indirizzo di resto</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Tasse di Transazione</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Scegli...</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimizza</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Pagando solo la tariffa minima è bene finché c'è meno volume di transazioni di spazio nei blocchi. Ma essere consapevoli che questo può finire in una transazione non confermando ancora una volta non vi è più richiesta per le transazioni Bitcoin di rete in grado di elaborare.</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Raccomandati:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalizza:</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Tempo di conferma:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normale</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>veloce</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Invia una transazione a zero commissioni se possibile</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Invia a diversi beneficiari in una volta sola</translation>
@@ -2940,6 +3013,22 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Imposta la dimensione massima in byte delle transazioni ad alta-priorità/basse-commissioni (predefinita: %d)</translation>
     </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Impossibile risolvere -whitebind address: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connetti attraverso SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Errore caricamento wallet.dat: il wallet richiede una versione nuova di Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Commissione (in BTC/kB) da aggiungere alla transazione che invii (default: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informazioni</translation>
@@ -2980,6 +3069,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Invia le informazioni di trace/debug alla console invece che al file debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Invia transazioni a zero commissioni se possibile (default: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra tutte le opzioni di debug (utilizzo: --help -help-debug)</translation>
@@ -3085,10 +3178,62 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error loading wallet.dat</source>
         <translation>Errore caricamento wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forza modalità provvisoria (dafault: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Genera coins (default: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Quanti blocchi da controllare all'avvio (dafault: %u, 0 = tutti)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Indirizzo -proxy non valido: '%s'</translation>
     </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Mantieni al massimo &lt;n&gt; connessioni ai peers (default: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Pretendi output di debug con timestamp (default: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Stampa l'albero dei blocchi all'avvio (default: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>File certificato del server (default: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Chiave privata del server (default: %s)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Specifica il file di configurazione (default: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Specifica il timeout di connessione in millisecondi (minimo:1, default: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Specifica il file pid (default: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Spendi il resto non confermato quando si inviano transazioni (default: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Interrompi dopo aver importato i blocchi dal disco (default: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Rete sconosciuta specificata in -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index dd2d8c8c72d5..0c9805de8f90 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -69,6 +69,10 @@
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>これらは支払いを送信するためのあなたの Bitcoin アドレスです。コインを送信する前に、常に額と受信アドレスを確認してください。</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>これらは支払いを受け取るためのビットコインアドレスです。トランザクションごとに新しい受け取り用アドレスを作成することが推奨されます。</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>ラベルをコピー (&amp;L)</translation>
@@ -89,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>エクスポート失敗</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>トランザクション履歴を %1 へ保存する際にエラーが発生しました。再試行してください。</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -175,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>ウォレットは暗号化されました</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>ウォレットの新しいパスフレーズを入力してください。&lt;br/&gt;&lt;b&gt;10文字以上のランダムな文字&lt;/b&gt;で構成されたものか、&lt;b&gt;8単語以上の単語&lt;/b&gt;で構成されたパスフレーズを使用してください。</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin は暗号化プロセスを終了するために今すぐ終了します。あなたのコンピュータがマルウェアに感染してコインを盗まれることもあるので、暗号化してもあなたのウォレットを完全に保護できないことを覚えていてください。</translation>
@@ -282,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>URI を開く (&amp;U)...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoinコア クライアント</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>ディスクからブロックをインポートしています...</translation>
@@ -334,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>受信 (&amp;R)</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Bitcoinコアに関する情報を表示</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>見る/隠す (&amp;S)</translation>
@@ -374,10 +394,18 @@
         <source>Bitcoin Core</source>
         <translation>Bitcoin のコア</translation>
     </message>
+    <message>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation>支払いを要求する (QRコードとbitcoin:ではじまるURIを生成する)</translation>
+    </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
         <translation>ビットコインコアについて (&amp;A)</translation>
     </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>使用済みの送金用アドレスとラベルの一覧を表示する</translation>
+    </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>支払いを受け取るアドレスとラベルのリストを表示する</translation>
@@ -483,6 +511,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>コイン選択</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>数量:</translation>
@@ -555,6 +587,14 @@ Address: %4
         <source>Copy transaction ID</source>
         <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>
@@ -676,6 +716,10 @@ Address: %4
         <source>version</source>
         <translation>バージョン</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Bitcoinコアについて</translation>
+    </message>
     <message>
         <source>Command-line options</source>
         <translation>コマンドライン オプション</translation>
@@ -735,7 +779,15 @@ Address: %4
         <source>Error</source>
         <translation>エラー</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GBの空き容量が利用可能</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(%n GB必要)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -785,6 +837,14 @@ Address: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>スクリプト検証用スレッド数 (&amp;V)</translation>
+    </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>外部からの接続を許可する</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>プロキシのIPアドレス (例えば IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -932,6 +992,14 @@ Address: %4
         <source>Your current total balance</source>
         <translation>あなたの現在の残高</translation>
     </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>最近のトランザクション</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>ウォッチオンリーアドレスの採掘された残高のうち、成熟していないもの</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>同期していない</translation>
@@ -947,6 +1015,14 @@ Address: %4
         <source>Invalid payment address %1</source>
         <translation>支払いのアドレス「%1」は無効です</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>支払い要求は拒否されました</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>支払いのリクエストは期限切れです</translation>
+    </message>
     <message>
         <source>Payment request error</source>
         <translation>支払いのリクエストのエラーです</translation>
@@ -974,6 +1050,10 @@ Address: %4
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>ユーザエージェント</translation>
+    </message>
     </context>
 <context>
     <name>QObject</name>
@@ -1063,6 +1143,10 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>現在のブロック数</translation>
     </message>
+    <message>
+        <source>User Agent</source>
+        <translation>ユーザエージェント</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>最終ブロックの日時</translation>
@@ -1154,6 +1238,10 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>メッセージ (&amp;M):</translation>
     </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>全ての入力項目をクリア</translation>
+    </message>
     <message>
         <source>Clear</source>
         <translation>クリア</translation>
@@ -1162,6 +1250,10 @@ Address: %4
         <source>Show</source>
         <translation>表示</translation>
     </message>
+    <message>
+        <source>Remove the selected entries from the list</source>
+        <translation>リストから選択項目を削除</translation>
+    </message>
     <message>
         <source>Copy label</source>
         <translation>ラベルをコピーする</translation>
@@ -1307,6 +1399,10 @@ Address: %4
         <source>Add &amp;Recipient</source>
         <translation>受取人を追加 (&amp;R)</translation>
     </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>全ての入力項目をクリア</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>すべてクリア (&amp;A)</translation>
@@ -1433,7 +1529,15 @@ Address: %4
 </context>
 <context>
     <name>ShutdownWindow</name>
-    </context>
+    <message>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Bitcoin Coreをシャットダウンしています。</translation>
+    </message>
+    <message>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>このウィンドウが消えるまでコンピュータをシャットダウンしないで下さい。</translation>
+    </message>
+</context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1956,7 +2060,11 @@ Address: %4
     </context>
 <context>
     <name>WalletFrame</name>
-    </context>
+    <message>
+        <source>No wallet has been loaded.</source>
+        <translation>ウォレットがロードされていません</translation>
+    </message>
+</context>
 <context>
     <name>WalletModel</name>
     <message>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index 3d38b0021791..5a39417a7ae6 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -9,10 +9,22 @@
         <source>Create a new address</source>
         <translation>Жаңа адрес енгізу</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>Жаңа</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Таңдаған адресті тізімнен жою</translation>
     </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>Жабу</translation>
+    </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>Экспорт</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>Жою</translation>
@@ -78,12 +90,140 @@
     </context>
 <context>
     <name>BitcoinGUI</name>
+    <message>
+        <source>&amp;Transactions</source>
+        <translation>&amp;Транзакциялар</translation>
+    </message>
+    <message>
+        <source>E&amp;xit</source>
+        <translation>Шығу</translation>
+    </message>
+    <message>
+        <source>&amp;Options...</source>
+        <translation>Параметрлері</translation>
+    </message>
+    <message>
+        <source>&amp;Backup Wallet...</source>
+        <translation>Әмиянды жасыру</translation>
+    </message>
+    <message>
+        <source>&amp;Change Passphrase...</source>
+        <translation>Құпия сөзді өзгерту</translation>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Биткоин</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Әмиян</translation>
+    </message>
+    <message>
+        <source>&amp;Send</source>
+        <translation>Жіберу</translation>
+    </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>Алу</translation>
+    </message>
+    <message>
+        <source>&amp;File</source>
+        <translation>Файл</translation>
+    </message>
+    <message>
+        <source>&amp;Help</source>
+        <translation>Көмек</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n сағат</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n күн</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><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></translation>
+    </message>
+    <message>
+        <source>%1 behind</source>
+        <translation>%1 қалмады</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>қате</translation>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation>Ескерту</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Информация</translation>
+    </message>
+    <message>
+        <source>Up to date</source>
+        <translation>Жаңартылған</translation>
+    </message>
     </context>
 <context>
     <name>ClientModel</name>
     </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Amount:</source>
+        <translation>Саны</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Басымдық</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Комиссия</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Шаң</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Комиссия алу кейін</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Саны</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Күні</translation>
+    </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Растау саны</translation>
+    </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Растық</translation>
+    </message>
+    <message>
+        <source>Priority</source>
+        <translation>Басымдық</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>жоқ</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(таңбасыз)</translation>
@@ -91,6 +231,10 @@
     </context>
 <context>
     <name>EditAddressDialog</name>
+    <message>
+        <source>&amp;Address</source>
+        <translation>Адрес</translation>
+    </message>
     </context>
 <context>
     <name>FreespaceChecker</name>
@@ -100,6 +244,10 @@
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Error</source>
+        <translation>қате</translation>
+    </message>
     </context>
 <context>
     <name>OpenURIDialog</name>
@@ -118,6 +266,10 @@
     </context>
 <context>
     <name>QObject</name>
+    <message>
+        <source>Amount</source>
+        <translation>Саны</translation>
+    </message>
     </context>
 <context>
     <name>QRImageWidget</name>
@@ -134,6 +286,10 @@
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
+    <message>
+        <source>Amount</source>
+        <translation>Саны</translation>
+    </message>
     <message>
         <source>Label</source>
         <translation>таңба</translation>
@@ -141,10 +297,18 @@
     </context>
 <context>
     <name>RecentRequestsTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Күні</translation>
+    </message>
     <message>
         <source>Label</source>
         <translation>таңба</translation>
     </message>
+    <message>
+        <source>Amount</source>
+        <translation>Саны</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(таңбасыз)</translation>
@@ -152,6 +316,26 @@
     </context>
 <context>
     <name>SendCoinsDialog</name>
+    <message>
+        <source>Amount:</source>
+        <translation>Саны</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Басымдық</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Комиссия:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Комиссия алу кейін:</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Шаң</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(таңбасыз)</translation>
@@ -174,12 +358,24 @@
     </context>
 <context>
     <name>TransactionDesc</name>
+    <message>
+        <source>Date</source>
+        <translation>Күні</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Саны</translation>
+    </message>
     </context>
 <context>
     <name>TransactionDescDialog</name>
     </context>
 <context>
     <name>TransactionTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Күні</translation>
+    </message>
     <message>
         <source>Address</source>
         <translation>Адрес</translation>
@@ -191,6 +387,14 @@
         <source>Comma separated file (*.csv)</source>
         <translation>Үтірмен бөлінген файл (*.csv)</translation>
     </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Растық</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Күні</translation>
+    </message>
     <message>
         <source>Label</source>
         <translation>таңба</translation>
@@ -211,9 +415,17 @@
     </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>Экспорт</translation>
+    </message>
     </context>
 <context>
     <name>bitcoin-core</name>
+    <message>
+        <source>Information</source>
+        <translation>Информация</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Транзакция өте кішкентай</translation>
@@ -222,5 +434,13 @@
         <source>Transaction too large</source>
         <translation>Транзакция өте үлкен</translation>
     </message>
-    </context>
+    <message>
+        <source>Warning</source>
+        <translation>Ескерту</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>қате</translation>
+    </message>
+</context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index e57362d7fd14..258c7f109fd9 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -67,7 +67,7 @@
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Check altijd het bedrag en het ontvangende adres voordat u uw bitcoins verzendt.</translation>
+        <translation>Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Controleer altijd het bedrag en het ontvangende adres voordat u uw bitcoins verzendt.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Bijgewerkt</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>%n Blok verwerkt van transactie geschiedenis.</numerusform><numerusform>%n Blokken verwerkt van transactie geschiedenis.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Aan het bijwerken...</translation>
@@ -520,6 +524,10 @@ Adres: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Munt Selectie</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Kwantiteit</translation>
@@ -568,6 +576,14 @@ Adres: %4
         <source>Amount</source>
         <translation>Bedrag</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Ontvangen met label</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Ontvangen met adres</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -904,7 +920,11 @@ Adres: %4
         <source>%n GB of free space available</source>
         <translation><numerusform>%n GB aan vrije oplsagruimte beschikbaar</numerusform><numerusform>%n GB aan vrije oplsagruimte beschikbaar</numerusform></translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(van %n GB nodig)</numerusform><numerusform>(van %n GB nodig)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1026,6 +1046,14 @@ Adres: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Portmapping via &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Verbind met het Bitcoin netwerk via een SOCKS5 proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Verbind via een SOCKS5-proxy (standaardproxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
@@ -1157,6 +1185,10 @@ Adres: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Gedolven saldo dat nog niet tot wasdom is gekomen</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldi</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Totaal:</translation>
@@ -1165,10 +1197,30 @@ Adres: %4
         <source>Your current total balance</source>
         <translation>Uw totale saldo</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Uw huidige balans in alleen-bekijkbare adressen</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Besteedbaar:</translation>
+    </message>
     <message>
         <source>Recent transactions</source>
         <translation>Recente transacties</translation>
     </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Onbevestigde transacties naar alleen-bekijkbare adressen</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Ontgonnen saldo dat nog niet tot wasdom is gekomen</translation>
+    </message>
+    <message>
+        <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>
@@ -1188,10 +1240,18 @@ Adres: %4
         <source>Payment request rejected</source>
         <translation>Betalingsverzoek geweigerd</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Betalingsaanvraagnetwerk komt niet overeen met klantennetwerk.</translation>
+    </message>
     <message>
         <source>Payment request has expired.</source>
         <translation>Betalingsverzoek is verlopen.</translation>
     </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Betalingsaanvraag is niet geïnitialiseerd.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Het gevraagde betalingsbedrag van %1 is te weinig (beschouwd als stof).</translation>
@@ -1208,10 +1268,18 @@ Adres: %4
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL om betalingsverzoek te verkrijgen is ongeldig: %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 kan niet verwerkt worden! Dit kan het gevolg zijn van een ongeldig Bitcoin adres of misvormde URI parameters.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Betalingsverzoek bestandsafhandeling</translation>
     </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Betalingsverzoek-bestand kan niet gelezen of verwerkt worden! Dit kan veroorzaakt worden door een ongeldig betalingsverzoek-bestand.</translation>
+    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Niet-geverifieerde betalingsverzoeken naar aangepaste betaling scripts worden niet ondersteund.</translation>
@@ -1224,6 +1292,10 @@ Adres: %4
         <source>Error communicating with %1: %2</source>
         <translation>Fout bij communiceren met %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Betalingsverzoek kan niet juist worden ontleed of verwerkt!</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Ongeldige respons van server %1</translation>
@@ -1243,7 +1315,15 @@ Adres: %4
         <source>User Agent</source>
         <translation>User Agent</translation>
     </message>
-    </context>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adres/Hostnaam</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping tijd</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
@@ -1340,6 +1420,10 @@ Adres: %4
         <source>Using OpenSSL version</source>
         <translation>Gebruikt OpenSSL versie</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Gebruikt BerkeleyDB versie</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Opstarttijd</translation>
@@ -1372,6 +1456,14 @@ Adres: %4
         <source>Sent</source>
         <translation>Verstuurd</translation>
     </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Peers</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Selecteer een peer om gedetailleerde informatie te bekijken.</translation>
+    </message>
     <message>
         <source>Direction</source>
         <translation>Directie</translation>
@@ -1388,6 +1480,18 @@ Adres: %4
         <source>Services</source>
         <translation>Services</translation>
     </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Aanvangshoogte</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Synchronisatiehoogte</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Ban score</translation>
+    </message>
     <message>
         <source>Connection Time</source>
         <translation>Connectie tijd</translation>
@@ -1408,6 +1512,10 @@ Adres: %4
         <source>Bytes Received</source>
         <translation>Bytes Ontvangen</translation>
     </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping Tijd</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Tijd laatste blok</translation>
@@ -1492,11 +1600,23 @@ Adres: %4
         <source>never</source>
         <translation>nooit</translation>
     </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Inkomend</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Uitgaand</translation>
+    </message>
     <message>
         <source>Unknown</source>
         <translation>Onbekend</translation>
     </message>
-    </context>
+    <message>
+        <source>Fetching...</source>
+        <translation>Ophalen...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1724,6 +1844,50 @@ Adres: %4
         <source>Custom change address</source>
         <translation>Aangepast wisselgeldadres</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transactiekosten:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Kies...</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimaliseer</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>totaal ten minste</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Aanbevolen:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Handmatig:</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Bevestigings tijd:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normaal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>snel</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(bevestiging kan langer duren)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Verstuur aan verschillende ontvangers ineens</translation>
@@ -1828,6 +1992,18 @@ Adres: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>De transactie was afgewezen. Dit kan gebeuren als u eerder uitgegeven munten opnieuw wilt versturen, zoals wanneer u een kopie van uw wallet.dat heeft gebruikt en in de kopie deze munten zijn gemarkeerd als uitgegeven, maar in de huidige nog niet.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Transactiekosten hoger dan %1 worden gezien als waanzinnig hoog.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Betaal alleen de minimale transactiekosten van %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Beginnen van bevesting geschat binnen %1 blok(ken).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Waarschuwing: Ongeldig Bitcoin adres</translation>
@@ -1879,6 +2055,10 @@ Adres: %4
         <source>This is a normal payment.</source>
         <translation>Dit is een normale betaling.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Het Bitcoin adres om betaling aan te voldoen</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1949,6 +2129,10 @@ Adres: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>U kunt berichten ondertekenen met een van uw adressen om te bewijzen dat u dit adres bezit. Pas op dat u geen onduidelijke dingen ondertekent, want phishingaanvallen zouden u kunnen misleiden om zo uw identiteit te stelen. Onderteken alleen berichten waarmee u het volledig eens bent.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Het Bitcoin adres om bericht mee te ondertekenen</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Kies een eerder gebruikt adres</translation>
@@ -2001,6 +2185,10 @@ Adres: %4
         <source>Enter the signing 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.</source>
         <translation>Voer het ondertekenende adres, bericht en handtekening hieronder in (let erop dat u nieuwe regels, spaties en tabs juist overneemt) om de handtekening te verifiëren. Let erop dat u niet meer uit het bericht interpreteert dan er daadwerkelijk staat,  om te voorkomen dat u wordt misleid in een man-in-the-middle-aanval.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Het Bitcoin adres waarmee het bericht ondertekend is</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Controleer een bericht om te verifiëren dat het gespecificeerde Bitcoinadres het bericht heeft ondertekend.</translation>
@@ -2142,6 +2330,10 @@ Adres: %4
         <source>own address</source>
         <translation>eigen adres</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>alleen-bekijkbaar</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>label</translation>
@@ -2162,6 +2354,14 @@ Adres: %4
         <source>Debit</source>
         <translation>Debet</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Totaal debit</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Totaal credit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Transactiekosten</translation>
@@ -2312,6 +2512,10 @@ Adres: %4
         <source>Mined</source>
         <translation>Gedolven</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>alleen-bekijkbaar</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(nvt)</translation>
@@ -2423,6 +2627,10 @@ Adres: %4
         <source>Export Transaction History</source>
         <translation>Exporteer Transactieverleden</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Alleen-bekijkbaar</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Export Mislukt</translation>
@@ -2478,7 +2686,11 @@ Adres: %4
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Eenheid om bedragen uit te drukken. Klik om een andere eenheid te selecteren.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2752,6 +2964,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Dit is bedoeld voor regressie test toepassingen en applicatie onwikkeling.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Gebruik UPnP om de luisterende poort te mappen (standaard: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Blokken aan het controleren...</translation>
@@ -2788,6 +3004,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Stel maximumgrootte in bytes in voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: %d)</translation>
     </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Fout bij laden wallet.dat: Portemonnee vereist een nieuwere versie van Bitcoin Core</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informatie</translation>
@@ -2800,6 +3020,18 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ongeldig bedrag voor -mintxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Ongeldig bedrag voor -paytxfee=&lt;bedrag&gt;: '%s' (Minimum %s)</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
+        <translation>Houd maximaal &lt;n&gt; onverbonden blokken in geheugen (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Houd maximaal &lt;n&gt; onverbonden transacties in geheugen (standaard: %u)</translation>
+    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Toon block bij opstarten, wanneer gevonden in block index</translation>
@@ -2916,14 +3148,134 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fout bij laden wallet.dat: Portemonnee corrupt</translation>
     </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Onderhoud een volledige transactieindex, gebruikt door de getrawtransaction rpc call (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Aantal seconden dat zich misdragende peers niet opnieuw kunnen verbinden (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Output extra debugginginformatie (standaard: %u, het leveren van &lt;category&gt; is optioneel)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Gebruik een aparte SOCKS5 proxy om 'Tor hidden services' te bereiken (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Vind anderen door middel van een DNS-naslag (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Veilige modus uitschakelen, hef een echte veilige modus gebeurtenis uit (default: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Fout bij laden wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forceer veilige modus (default: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Genereer munten (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Aantal te checken blokken bij het opstarten (standaard: %u, 0 = allemaal)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ongeldig -proxy adres: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limiteer grootte van de handtekening cache tot &lt;n&gt; entries (default: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Luister naar JSON-RPC-verbindingen op poort &lt;port&gt; (standaard: %u of testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Luister naar verbindingen op &lt;poort&gt; (standaard: %u of testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Onderhoud maximaal &lt;n&gt; verbindingen naar peers (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximum per-connectie ontvangstbuffer, &lt;n&gt;*1000 bytes (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximum per-connectie zendbuffer, &lt;n&gt;*1000 bytes (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Accepteer alleen blokkenketen die overeenkomt met de ingebouwde checkpoints (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Prepend debug output met tijdstempel (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Toon block structuur bij opstarten (default: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Draai een proces om de wallet periodiek te flushen (default: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Certificaat-bestand voor server (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Geheime sleutel voor server (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Stel sleutelpoelgrootte in op &lt;&amp;&gt; (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Stel minimum blokgrootte in in bytes (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Stel het aantal threads in om RPC-aanvragen mee te bedienen (standaard: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Plaatst de DB_PRIVATE vlag in de wallet db omgeving (default: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Specificeer configuratie bestand (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Specificeer de time-out tijd in milliseconden (minimum: 1, standaard: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Specificeer pid-bestand (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Besteed onbevestigd wisselgeld bij het versturen van transacties (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Drempel om verbinding te verbreken naar zich misdragende peers (standaard: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Onbekend netwerk gespecificeerd in -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index ccae9482da20..81342c5dbc78 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -773,6 +773,10 @@ Adresa: %4
         <source>version</source>
         <translation>versiunea</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
     <message>
         <source>About Bitcoin Core</source>
         <translation>Despre Nucleul Bitcoin</translation>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index fa6629777905..55986d409244 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -520,6 +520,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Выбор монет</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Количество:</translation>
@@ -1844,17 +1848,37 @@ Address: %4
         <source>Choose...</source>
         <translation>Выберите...</translation>
     </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Свернуть настройки комиссии</translation>
+    </message>
     <message>
         <source>Minimize</source>
         <translation>Сворачивать</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Если комиссия установлена в 1000 сатоши, а транзакция составляет лишь 250 байт, тогда комиссия "на килобайт" составит 250 сатоши, а "как минимум" — 1000 сатоши. Для транзакций крупнее килобайта в обоих случаях будет использоваться платёж "на килобайт".</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>за килобайт</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Если комиссия установлена в 1000 сатоши, а транзакция составляет лишь 250 байт, тогда комиссия "на килобайт" составит 250 сатоши, а "всего как минимум" — 1000 сатоши. Для транзакций крупнее килобайта в обоих случаях будет использоваться платёж "на килобайт".</translation>
+    </message>
     <message>
         <source>total at least</source>
-        <translation>Итого</translation>
+        <translation>Итого как минимум</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Уплата минимальной комиссии — не проблема, пока объём транзакций меньше, чем свободное место в блоках. Учтите, однако, что такая транзакция может никогда не подтвердиться, если спрос на транзакции превышает возможности сети по их обработке.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(прочтите подсказку)</translation>
     </message>
     <message>
         <source>Recommended:</source>
@@ -1864,6 +1888,10 @@ Address: %4
         <source>Custom:</source>
         <translation>Выборочно:</translation>
     </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Умная комиссия пока не инициализирована. Обычно для этого требуется несколько блоков...)</translation>
+    </message>
     <message>
         <source>Confirmation time:</source>
         <translation>Время подтверждения:</translation>
@@ -1994,7 +2022,7 @@ Address: %4
     </message>
     <message>
         <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation>Ожидается начать подтверждение через %1 блок(ов).</translation>
+        <translation>Начало подтверждения ожидается через %1 блок(ов).</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
@@ -2798,6 +2826,10 @@ rpcpassword=%s
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Удалить все транзакции бумажника с возможностью восстановить эти части цепи блоков с помощью -rescan при запуске</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Распространяется под лицензией MIT, см. приложенный файл COPYING или &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Войти в режим тестирования на регрессии, в котором используется специальная цепь, где блоки находятся мгновенно.</translation>
@@ -3064,7 +3096,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
-        <translation>Задать число потоков генерации монет, если включена (-1 = число ядер процессора, по умолчанию: %d)</translation>
+        <translation>Задать число потоков генерации монет, если она включена (-1 = все ядра процессора, по умолчанию: %d)</translation>
     </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
@@ -3332,7 +3364,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Disable safemode, override a real safe mode event (default: %u)</source>
-        <translation>Отключить безопасный режим, отклонить реальное событие безопасного режима (по умолчанию: %u)</translation>
+        <translation>Отключить безопасный режим, перекрыть реальное событие безопасного режима (по умолчанию: %u)</translation>
     </message>
     <message>
         <source>Error loading wallet.dat</source>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index 64c68a2226a5..b005ce23ad0a 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -3,15 +3,31 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Кликните два пута да промените адресу и/или етикету</translation>
+        <translation>Kliknite dva puta da izmenite adresu ili etiketu</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Прави нову адресу</translation>
+        <translation>Napravite novu adresu</translation>
+    </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>Novo</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Копира изабрану адресу на системски клипборд</translation>
+        <translation>Kopirajte trenutno izabranu adresu</translation>
+    </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>Kopirajte</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>Kopirajte adresu</translation>
+    </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Izbrisite trenutno izabranu adresu sa liste</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index b6ba507e9bab..9b5f4c9f4e78 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -524,6 +524,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Вибір Монет</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Кількість:</translation>
@@ -572,6 +576,14 @@ Address: %4
         <source>Amount</source>
         <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>
@@ -1034,6 +1046,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Відображення порту через &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Підключення до мережі Bitcoin через SOCKS5 проксі.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Підключення через SOCKS5 проксі (проксі за замовчуванням):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP проксі:</translation>
@@ -1824,6 +1844,78 @@ Address: %4
         <source>Custom change address</source>
         <translation>Вказати адресу для решти</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Комісія за передачу:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Виберіть...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>згорнути налаштування оплат</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Мінімізувати</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Якщо оплата користувача встановлюється в 1000 Satoshi і розмір передачі всього 250 байт, то "за кілобайт" платить тільки 250 Satoshi, в той час як "щонайменше" платить 1000 satoshis. Для передач більших, ніж кілобайт обоє платять за кілобайт.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>за кілобайт</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Якщо оплата користувача встановлюється в 1000 Satoshi і розмір передачі всього 250 байт, то "за кілобайт" платить тільки 250 Satoshi, в той час як "всього щонайменше" платить 1000 satoshis. Для передач більших, ніж кілобайт обоє платять за кілобайт.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>всього щонайменше</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Оплата тільки мінімальних зборів є прийнятною до тих пір, як обсяг транзакцій там є меншим аніж простору в блоках. Але майте на увазі, що це може анулювати транзакцію, якщо попит на Bitcoin транзакції стане значно більшим, ніж мережа зможе обробити.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(читати підказки)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Рекомендовано:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Змінено:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</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>Send as zero-fee transaction if possible</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>
@@ -1928,6 +2020,18 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Транзакцію відхилено! Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Плата вища, ніж %1 вважається шалено високою.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Платити тільки мінімальний збір у розмірі %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Розрахунковий початок підтвердження протягом %1 блоку(ів).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Увага: Неправильна Bitcoin-адреса</translation>
@@ -2734,6 +2838,10 @@ rpcpassword=%s
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Видалити всі транзакції гаманця та відновити ті, що будуть знайдені під час запуску за допомогою -rescan</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Поширюється за ліцензією MIT, додаткова інформація міститься у файлі COPYING та за адресою &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ввійти в режим регресивного тестування, що використовує спеціальний ланцюг з миттєвим знаходженням блоків.</translation>
@@ -2986,6 +3094,10 @@ rpcpassword=%s
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Комісії (в BTC/КБ), що менші за вказану, вважатимуться нульовими (для створення транзакції) (типово: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Максимальний розмір даних в транзакціях носіїв даних, що ми передаємо і добуваємо (за замовчуванням: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Дізнаватися адреси учасників через DNS при замалій кількості відомих адрес (типово: 1 за відсутності -connect)</translation>
@@ -2994,6 +3106,10 @@ rpcpassword=%s
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Встановити максимальний розмір транзакцій з високим пріоритетом та низькою комісією (в байтах) (типово: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Встановити кількість потоків для генерації монет (-1 = кількості ядер, типово: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL &lt;https://www.openssl.org/&gt;, криптографічне програмне забезпечення, написане Еріком Янгом, та функції для роботи з UPnP, написані Томасом Бернардом.</translation>
@@ -3098,6 +3214,10 @@ rpcpassword=%s
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Відсилати налагоджувальну інформацію на консоль, а не у файл debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Встановити операцію надсилання, як неоплатну операцію, якщо це можливо (за замовчуванням: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Показати всі налагоджувальні параметри (використання: --help -help-debug)</translation>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index b70596d83ae5..56d598fc6496 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>最新狀態</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>已經處理了 %n 個區塊的交易紀錄。</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>正在趕進度...</translation>
@@ -520,6 +524,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>選擇錢幣</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>數目:</translation>
@@ -1030,6 +1038,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>用 &amp;UPnP 設定通訊埠對應</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>透過 SOCKS5 代理伺服器來連線到位元幣網路。</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>透過 SOCKS5 代理伺服器連線(預設代理伺服器):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>代理位址:</translation>
@@ -1820,6 +1836,38 @@ Address: %4
         <source>Custom change address</source>
         <translation>自定找零位址</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>交易手續費:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>選擇...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>展開手續費設定</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>最小化</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>每千位元組</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(請看提示)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>確認時間:</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>盡可能送不用付手續費的交易</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>一次付給多個收款人</translation>
@@ -2731,6 +2779,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>清掉錢包裡的所有交易，並且在下次啟動時，使用 -rescan 來從區塊鏈中復原回來。</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>這套軟體是依據 MIT 軟體授權條款散布，詳情請見附帶的 COPYING 檔案，或是以下網站:  &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>進入回歸測試模式，使用可以立即解出區塊的特殊區塊鏈。</translation>
@@ -2783,6 +2835,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>警告: 錢包檔 wallet.dat 壞掉，但資料被拯救回來了！原來的 wallet.dat 會改儲存在 %s, 檔名是 wallet.{timestamp}.bak. 如果餘額或交易資料有誤，你應該要用備份資料復原回來。</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>把來自指定網域或位址的節點放進白名單。這個選項可以設定多次。</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(預設值: 1)</translation>
@@ -2821,7 +2877,7 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation>不要載入錢包，並且拿掉錢包相關的 RPC 功能呼叫。</translation>
+        <translation>不要載入錢包，並且拿掉錢包相關的 RPC 功能請求。</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2947,6 +3003,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>沒辦法鎖定資料目錄 %s。位元幣核心可能已經在執行了。</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>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>用系統預設權限來造出新的檔案，而不是用使用者權限罩遮(umask)值 077 (只有在關掉錢包功能時才有作用)。</translation>
@@ -2971,6 +3031,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>當製造交易時，如果每千位元組(Kb)的手續費比這個值低，就視為沒付手續費 (預設值: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>轉發和開採時，對只帶資料的交易的大小上限(預設值: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>是否允許在節點位址數目不足時，使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
@@ -2979,6 +3043,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>設定高優先度或低手續費的交易資料大小上限成多少位元組(預設值: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>設定產生錢幣的執行緒數目(-1 表示處理器核心數，預設值: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit 軟體 &lt;https://www.openssl.org/&gt;, 和由 Eric Young 撰寫的加解密軟體，以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</translation>
@@ -3083,6 +3151,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>在終端機顯示追蹤或除錯資訊，而不是寫到檔案 debug.log 中</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>盡可能送出不用付手續費的交易(預設值: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>顯示所有的除錯選項 (用法: --help --help-debug)</translation>
@@ -3191,14 +3263,178 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>載入檔案 wallet.dat 時發生錯誤: 錢包損毀了</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 表示保留交易描述資料，像是帳戶使用者和付款請求資訊；2 表示丟掉交易描述資料)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>每當累積到 &lt;n&gt; 百萬位元組(MB)時，才將資料庫的變動從記憶體暫存池中寫進磁碟紀錄檔(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>使用 -checkblocks 檢查區塊的仔細程度(0 到 4，預設值: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>當沒有設定 paytxfee 時，自動包含可以讓交易能在平均 n 個區塊內確認的手續費(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>開採區塊的時候，紀錄交易的優先度以及每千位元組(kB)的手續費(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>維護全部交易的索引，用在 getrawtransaction 這個 RPC 請求(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>避免與亂搞的節點連線的秒數(預設: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>輸出除錯資訊(預設值: %u, 不一定要指定 &lt;category&gt;)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>使用另外的 SOCK5 代理伺服器，來透過 Tor 隱藏服務跟節點聯繫(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>可以接受的加密演算法(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>是否一定要用域名查詢來搜尋節點(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>不進入安全模式，用在真的發生需要進入安全模式的事件時，強制不進入(預設值: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>載入錢包檔 wallet.dat 時發生錯誤</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>強制進入安全模式(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>生產位元幣(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>啓動時檢查的區塊數(預設值: %u, 指定 0 表示全部)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>在除錯輸出內容中包含網際網路位址(預設值: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>無效的 -proxy 位址: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>限制簽章快取大小為 &lt;n&gt; 筆(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>在通訊埠 &lt;port&gt; 聽候 JSON-RPC 連線(預設值: %u, 或若為測試網路: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>在通訊埠 &lt;port&gt; 聽候連線(預設值: %u, 或若為測試網路: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>維持與節點連線數的上限為 &lt;n&gt; 個(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>每個連線的接收緩衝區大小上限為 &lt;n&gt;*1000 個位元組(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>每個連線的傳送緩衝區大小上限為 &lt;n&gt;*1000 個位元組(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>只接受與內建的檢查段點吻合的區塊鎖鏈(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>在除錯輸出內容前附加時間(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>啟動時輸出區塊樹(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>允許轉發和開採只帶資料的交易(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>允許轉發非 P2SH 的多簽章交易(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>啟用定期將變動寫入錢包檔的執行緒(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>伺服器憑證檔(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>伺服器密鑰檔(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>設定密鑰池大小為 &lt;n&gt; (預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>設定區塊大小下限為多少位元組(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>設定處理 RPC 服務請求的執行緒數目(預設值: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>在錢包資料庫環境變數設定 DB_PRIVATE 旗標(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>指定設定檔(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>指定連線在幾毫秒後逾時 (最少值: 1, 預設值: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>指定行程識別碼檔案(預設值: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>傳送交易時可以花還沒確認的零錢(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>從磁碟匯入區塊資料後停止執行(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>與亂搞的節點斷線的臨界值 (預設: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>在 -onlynet 指定了不明的網路別: '%s'</translation>

From 0133e4fb48dc0a954232ba6290df7003e659a94a Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 11 Dec 2014 15:38:29 -0500
Subject: [PATCH 1187/1819] depends: Gitian 0.10 fixes

Github-Pull: #5465
Rebased-From: 422f873ef3d62f7dff9c00dc0f221912ce28f130 d546191dc28fac0e365c8f2aba47ac69a8920d6c d7db4b6317fd9c79bd6fd7c7455d7186b306411f e27d7cb24835c6ce16c12eb758c2d75806103c4a
---
 depends/Makefile                          | 12 ++++++++++--
 depends/README.usage                      |  5 ++++-
 depends/funcs.mk                          | 24 ++++++++++++-----------
 depends/packages/native_cctools.mk        |  8 ++++----
 depends/packages/native_comparisontool.mk |  2 +-
 doc/release-process.md                    | 18 ++++++++++++-----
 6 files changed, 45 insertions(+), 24 deletions(-)

diff --git a/depends/Makefile b/depends/Makefile
index 5de015971429..e2ef7ee49bd6 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -31,6 +31,7 @@ endif
 
 base_build_dir=$(BASEDIR)/work/build
 base_staging_dir=$(BASEDIR)/work/staging
+base_download_dir=$(BASEDIR)/work/download
 canonical_host:=$(shell ./config.sub $(HOST))
 build:=$(shell ./config.sub $(BUILD))
 
@@ -122,5 +123,12 @@ $(host_prefix)/share/config.site : config.site.in $(host_prefix)/.stamp_$(final_
 	$(AT)touch $@
 
 install: $(host_prefix)/share/config.site
-download: $(all_sources)
-.PHONY: install cached
+download-one: $(all_sources)
+download-osx:
+	@$(MAKE) -s HOST=x86_64-apple-darwin11 download-one
+download-linux:
+	@$(MAKE) -s HOST=x86_64-unknown-linux-gnu download-one
+download-win:
+	@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
+download: download-osx download-linux download-win
+.PHONY: install cached download-one download-osx download-linux download-win download
diff --git a/depends/README.usage b/depends/README.usage
index e768feecf76a..f5aa5314a1f3 100644
--- a/depends/README.usage
+++ b/depends/README.usage
@@ -29,4 +29,7 @@ If some packages are not built, for example 'make NO_WALLET=1', the appropriate
 options will be passed to bitcoin's configure. In this case, --disable-wallet.
 
 Additional targets:
-download: run 'make download' to fetch sources without building them
+download: run 'make download' to fetch all sources without building them
+download-osx: run 'make download-osx' to fetch all sources needed for osx builds
+download-win: run 'make download-win' to fetch all sources needed for win builds
+download-linux: run 'make download-linux' to fetch all sources needed for linux builds
diff --git a/depends/funcs.mk b/depends/funcs.mk
index c1fc0a0e3316..79015c047ca0 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -20,18 +20,19 @@ $(sort $(foreach dep,$(2),$(2) $(call int_get_all_dependencies,$(1),$($(dep)_dep
 endef
 
 define fetch_file
-(test -f $(SOURCES_PATH)/$(4) || \
-  ( mkdir -p $$($(1)_extract_dir) && \
-  ( $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(4).temp" "$(2)/$(3)" || \
-    $(build_DOWNLOAD) "$$($(1)_extract_dir)/$(4).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(3)" ) && \
-    echo "$(5)  $$($(1)_extract_dir)/$(4).temp" > $$($(1)_extract_dir)/.$(4).hash && \
-    $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$(4).hash && \
-    mv $$($(1)_extract_dir)/$(4).temp $(SOURCES_PATH)/$(4) ))
+(test -f $$($(1)_source_dir)/$(4) || \
+  ( mkdir -p $$($(1)_download_dir) && echo Fetching $(1)... && \
+  ( $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(2)/$(3)" || \
+    $(build_DOWNLOAD) "$$($(1)_download_dir)/$(4).temp" "$(FALLBACK_DOWNLOAD_PATH)/$(3)" ) && \
+    echo "$(5)  $$($(1)_download_dir)/$(4).temp" > $$($(1)_download_dir)/.$(4).hash && \
+    $(build_SHA256SUM) -c $$($(1)_download_dir)/.$(4).hash && \
+    mv $$($(1)_download_dir)/$(4).temp $$($(1)_source_dir)/$(4) && \
+    rm -rf $$($(1)_download_dir) ))
 endef
 
 define int_get_build_recipe_hash
 $(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches))))
-$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM)))
+$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | cut -d" " -f1 | $(build_SHA256SUM)))
 endef
 
 define int_get_build_id
@@ -45,17 +46,19 @@ final_build_id_long+=$($(package)_build_id_long)
 #compute package-specific paths
 $(1)_build_subdir?=.
 $(1)_download_file?=$($(1)_file_name)
-$(1)_source:=$(SOURCES_PATH)/$($(1)_file_name)
+$(1)_source_dir:=$(SOURCES_PATH)
+$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
 $(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
 $(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
 $(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
+$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
 $(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
 $(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
 $(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
 $(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
 
 #stamps
-$(1)_fetched=$$($(1)_extract_dir)/.stamp_fetched
+$(1)_fetched=$$($(1)_source_dir)/download-stamps/.stamp_fetched-$(1)-$($(1)_file_name)
 $(1)_extracted=$$($(1)_extract_dir)/.stamp_extracted
 $(1)_preprocessed=$$($(1)_extract_dir)/.stamp_preprocessed
 $(1)_cleaned=$$($(1)_extract_dir)/.stamp_cleaned
@@ -150,7 +153,6 @@ endef
 
 define int_add_cmds
 $($(1)_fetched):
-	$(AT)echo Fetching $(1)...
 	$(AT)mkdir -p $$(@D) $(SOURCES_PATH)
 	$(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1))
 	$(AT)touch $$@
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk
index ad989cb544be..1675afe78131 100644
--- a/depends/packages/native_cctools.mk
+++ b/depends/packages/native_cctools.mk
@@ -39,11 +39,11 @@ $(package)_ldflags+=-m32 -Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
 $(package)_ldflags+=-L$$(native_cctools_extract_dir)/clang+llvm-3.2-x86-linux-ubuntu-12.04/lib
 endef
 define $(package)_extract_cmds
-  tar --strip-components=1 -xf $(SOURCES_PATH)/$($(package)_toolchain4_file_name) && \
+  tar --strip-components=1 -xf $($(package)_source_dir)/$($(package)_toolchain4_file_name) && \
   ln -sf $($(package)_source) cctools2odcctools/$($(package)_file_name) && \
-  ln -sf $(SOURCES_PATH)/$($(package)_ld64_file_name) cctools2odcctools/$($(package)_ld64_file_name) && \
-  ln -sf $(SOURCES_PATH)/$($(package)_dyld_file_name) cctools2odcctools/$($(package)_dyld_file_name) && \
-  tar xf $(SOURCES_PATH)/$($(package)_clang_file_name) && \
+  ln -sf $($(package)_source_dir)/$($(package)_ld64_file_name) cctools2odcctools/$($(package)_ld64_file_name) && \
+  ln -sf $($(package)_source_dir)/$($(package)_dyld_file_name) cctools2odcctools/$($(package)_dyld_file_name) && \
+  tar xf $($(package)_source_dir)/$($(package)_clang_file_name) && \
   mkdir -p $(SDK_PATH) sdks &&\
   cd sdks; ln -sf $(OSX_SDK) MacOSX$(OSX_SDK_VERSION).sdk
 endef
diff --git a/depends/packages/native_comparisontool.mk b/depends/packages/native_comparisontool.mk
index 3d430d4306a5..d1b86dc2de59 100644
--- a/depends/packages/native_comparisontool.mk
+++ b/depends/packages/native_comparisontool.mk
@@ -17,5 +17,5 @@ endef
 
 define $(package)_stage_cmds
   mkdir -p $($(package)_staging_prefix_dir)/share/$($(package)_install_dirname) && \
-  mv $(SOURCES_PATH)/$($(package)_file_name) $($(package)_staging_prefix_dir)/share/$($(package)_install_dirname)/$($(package)_install_filename)
+  cp $($(package)_source) $($(package)_staging_prefix_dir)/share/$($(package)_install_dirname)/$($(package)_install_filename)
 endef
diff --git a/doc/release-process.md b/doc/release-process.md
index a16d4ace4a61..30f9797752d7 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -40,7 +40,7 @@ Release Process
 
 ###fetch and build inputs: (first time, or when dependency versions change)
  
-	mkdir -p inputs; cd inputs/
+	mkdir -p inputs
 
  Register and download the Apple SDK: (see OSX Readme for details)
  
@@ -50,7 +50,15 @@ Release Process
  
 	tar -C /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.7.sdk.tar.gz MacOSX10.7.sdk
 
- Build Bitcoin Core for Linux, Windows, and OS X:
+###Optional: Seed the Gitian sources cache
+
+  By default, gitian will fetch source files as needed. For offline builds, they can be fetched ahead of time:
+
+	make -C ../bitcoin/depends download SOURCES_PATH=`pwd`/cache/common
+
+  Only missing files will be fetched, so this is safe to re-run for each build.
+
+###Build Bitcoin Core for Linux, Windows, and OS X:
   
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
 	./bin/gsign --signer $SIGNER --release ${VERSION}-linux --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
@@ -63,7 +71,6 @@ Release Process
 	mv build/out/bitcoin-*-unsigned.tar.gz inputs
 	mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
 	popd
-bitcoin-0.9.99-osx-unsigned.tar.gz
   Build output expected:
 
   1. source tarball (bitcoin-${VERSION}.tar.gz)
@@ -84,11 +91,12 @@ Commit your signature to gitian.sigs:
 	git push  # Assuming you can push to the gitian.sigs tree
 	popd
 
-Wait for OSX detached signature:
+  Wait for OSX detached signature:
 	Once the OSX build has 3 matching signatures, Gavin will sign it with the apple App-Store key.
 	He will then upload a detached signature to be combined with the unsigned app to create a signed binary.
 
-Create the signed OSX binary:
+  Create the signed OSX binary:
+
 	pushd ./gitian-builder
 	# Fetch the signature as instructed by Gavin
 	cp signature.tar.gz inputs/

From 44b4c0d8a9ba215cc47c8f2d99ffa92f3ccf536f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20Jan=C3=ADk?= <Pavel@Janik.cz>
Date: Thu, 11 Dec 2014 16:06:23 +0100
Subject: [PATCH 1188/1819] signrawtransaction: validate private key.

Github-Pull: #5461
Rebased-From: aa768f1848b00e0fd615016598d3fb1f1da240ed
---
 src/rpcrawtransaction.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 8de15ff9e2f7..4a1af2207a29 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp)
             if (!fGood)
                 throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
             CKey key = vchSecret.GetKey();
+            if (!key.IsValid())
+                throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
             tempKeystore.AddKey(key);
         }
     }

From a572ff7139854127542a76eaa346c0755ecf77a0 Mon Sep 17 00:00:00 2001
From: BtcDrak <btcdrak@gmail.com>
Date: Sat, 13 Dec 2014 09:03:33 +0000
Subject: [PATCH 1189/1819] Fix download link for gitian builds

Rebased-From: 164a45f57a8a7367e67a5e65b9e938844730cd87
Github-Pull: #5471
---
 depends/packages/native_cdrkit.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/native_cdrkit.mk b/depends/packages/native_cdrkit.mk
index 2cc388b4b30c..cf694edb30e9 100644
--- a/depends/packages/native_cdrkit.mk
+++ b/depends/packages/native_cdrkit.mk
@@ -1,6 +1,6 @@
 package=native_cdrkit
 $(package)_version=1.1.11
-$(package)_download_path=http://distro.ibiblio.org/fatdog/source/c
+$(package)_download_path=http://distro.ibiblio.org/fatdog/source/600/c
 $(package)_file_name=cdrkit-$($(package)_version).tar.bz2
 $(package)_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
 $(package)_patches=cdrkit-deterministic.patch

From c3c635b3167bac056030e3c8cbeb1343a4d244f5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 16 Dec 2014 18:50:53 +0100
Subject: [PATCH 1190/1819] version 0.9.99 -> 0.10.0

Bump version but keep CLIENT_VERSION_IS_RELEASE at false as this is not
a release yet.
---
 configure.ac           | 4 ++--
 doc/Doxyfile           | 2 +-
 doc/README.md          | 2 +-
 doc/README_windows.txt | 2 +-
 src/clientversion.h    | 4 ++--
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index c4c21eaf4f69..25c81ccfb442 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,8 @@
 dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
 AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
-define(_CLIENT_VERSION_MINOR, 9)
-define(_CLIENT_VERSION_REVISION, 99)
+define(_CLIENT_VERSION_MINOR, 10)
+define(_CLIENT_VERSION_REVISION, 0)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, false)
 define(_COPYRIGHT_YEAR, 2014)
diff --git a/doc/Doxyfile b/doc/Doxyfile
index e0339e652eb0..09a925f938fb 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -34,7 +34,7 @@ PROJECT_NAME           = Bitcoin
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.9.99
+PROJECT_NUMBER         = 0.10.0
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
diff --git a/doc/README.md b/doc/README.md
index d5d61738e87c..4f8f8ac717b7 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-Bitcoin 0.9.99 BETA
+Bitcoin 0.10.0 BETA
 =====================
 
 Copyright (c) 2009-2014 Bitcoin Developers
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index 368f2b45e1fb..2c8f635a528e 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,4 +1,4 @@
-Bitcoin 0.9.99 BETA
+Bitcoin 0.10.0 BETA
 
 Copyright (c) 2009-2014 Bitcoin Core Developers
 
diff --git a/src/clientversion.h b/src/clientversion.h
index 0a36eb80123a..ff979c6cb465 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -15,8 +15,8 @@
 
 //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
-#define CLIENT_VERSION_MINOR 9
-#define CLIENT_VERSION_REVISION 99
+#define CLIENT_VERSION_MINOR 10
+#define CLIENT_VERSION_REVISION 0
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build

From b03632a6710e9bb1f7d73e0ccd39860c591d84e9 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sun, 7 Dec 2014 12:57:11 +0100
Subject: [PATCH 1191/1819] add missing CAutoFile::IsNull() check in main

Rebased-From: 84857e87e42e412336ea60d0f8544c1679bab827
Github-Pull: #5437
---
 src/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 9e1c41ada7c9..6c39e10570f2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1079,6 +1079,8 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
             CDiskTxPos postx;
             if (pblocktree->ReadTxIndex(hash, postx)) {
                 CAutoFile file(OpenBlockFile(postx, true), SER_DISK, CLIENT_VERSION);
+                if (file.IsNull())
+                    return error("%s: OpenBlockFile failed", __func__);
                 CBlockHeader header;
                 try {
                     file >> header;

From 0cb8763cbbece4b25ea9e9bd756bfefd52ce23d8 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Mon, 10 Nov 2014 02:52:28 -0500
Subject: [PATCH 1192/1819] Check against MANDATORY flags prior to accepting to
 mempool

Previously transactions were only tested again the
STANDARD_SCRIPT_VERIFY_FLAGS prior to mempool acceptance, so any bugs in
those flags that allowed actually-invalid transactions to pass would
result in allowing invalid transactions into the mempool. Fortunately
there is a second check in CreateNewBlock() that would prevent those
transactions from being mined, resulting in an invalid block, however
this could still be exploited as a DoS attack.

Rebased-From: 7c041b3b91aa08a8f5863382b865a5174281ad03
---
 src/main.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 6c39e10570f2..a3c65dbb933e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1053,6 +1053,21 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
         {
             return error("AcceptToMemoryPool: : ConnectInputs failed %s", hash.ToString());
         }
+
+        // Check again against just the consensus-critical mandatory script
+        // verification flags, in case of bugs in the standard flags that cause
+        // transactions to pass as valid when they're actually invalid. For
+        // instance the STRICTENC flag was incorrectly allowing certain
+        // CHECKSIG NOT scripts to pass, even though they were invalid.
+        //
+        // There is a similar check in CreateNewBlock() to prevent creating
+        // invalid blocks, however allowing such transactions into the mempool
+        // can be exploited as a DoS attack.
+        if (!CheckInputs(tx, state, view, true, MANDATORY_SCRIPT_VERIFY_FLAGS, true))
+        {
+            return error("AcceptToMemoryPool: : BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s", hash.ToString());
+        }
+
         // Store transaction in memory
         pool.addUnchecked(hash, entry);
     }

From ad3d208fb9eebb06e497e4ec104aeb03dab77acc Mon Sep 17 00:00:00 2001
From: Jameson Lopp <jameson.lopp@gmail.com>
Date: Sun, 21 Dec 2014 09:10:43 -0500
Subject: [PATCH 1193/1819] remove max orphan blocks config parameter since it
 is no longer functional

Rebased-From: 4bc95c43871645c1d69a0d719c13b38151a3a13f
---
 src/init.cpp | 1 -
 src/main.h   | 2 --
 2 files changed, 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 11329c16aa41..5d42786038c8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -231,7 +231,6 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -datadir=<dir>         " + _("Specify data directory") + "\n";
     strUsage += "  -dbcache=<n>           " + strprintf(_("Set database cache size in megabytes (%d to %d, default: %d)"), nMinDbCache, nMaxDbCache, nDefaultDbCache) + "\n";
     strUsage += "  -loadblock=<file>      " + _("Imports blocks from external blk000??.dat file") + " " + _("on startup") + "\n";
-    strUsage += "  -maxorphanblocks=<n>   " + strprintf(_("Keep at most <n> unconnectable blocks in memory (default: %u)"), DEFAULT_MAX_ORPHAN_BLOCKS) + "\n";
     strUsage += "  -maxorphantx=<n>       " + strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS) + "\n";
     strUsage += "  -par=<n>               " + strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"), -(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS) + "\n";
 #ifndef WIN32
diff --git a/src/main.h b/src/main.h
index 8f0378647d16..a62bebc49d3d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -64,8 +64,6 @@ static const unsigned int MAX_P2SH_SIGOPS = 15;
 static const unsigned int MAX_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
 /** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
 static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
-/** Default for -maxorphanblocks, maximum number of orphan blocks kept in memory */
-static const unsigned int DEFAULT_MAX_ORPHAN_BLOCKS = 750;
 /** The maximum size of a blk?????.dat file (since 0.8) */
 static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
 /** The pre-allocation chunk size for blk?????.dat files (since 0.8) */

From 84462625975bd1a34dadc47c062a9999c6000203 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 11 Dec 2014 13:35:14 +0100
Subject: [PATCH 1194/1819] Reject headers that build on an invalid parent

Rebased-From: 34970223472c9e83689a1c710eebc7c16f152b02
Github-Pull: #5459
---
 src/main.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index a3c65dbb933e..4a0008726e42 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -442,6 +442,10 @@ void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBl
         // are not yet downloaded and not in flight to vBlocks. In the mean time, update
         // pindexLastCommonBlock as long as all ancestors are already downloaded.
         BOOST_FOREACH(CBlockIndex* pindex, vToFetch) {
+            if (!pindex->IsValid(BLOCK_VALID_TREE)) {
+                // We consider the chain that this peer is on invalid.
+                return;
+            }
             if (pindex->nStatus & BLOCK_HAVE_DATA) {
                 if (pindex->nChainTx)
                     state->pindexLastCommonBlock = pindex;
@@ -2559,6 +2563,8 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
         if (mi == mapBlockIndex.end())
             return state.DoS(10, error("%s : prev block not found", __func__), 0, "bad-prevblk");
         pindexPrev = (*mi).second;
+        if (pindexPrev->nStatus & BLOCK_FAILED_MASK)
+            return state.DoS(100, error("%s : prev block invalid", __func__), REJECT_INVALID, "bad-prevblk");
     }
 
     if (!ContextualCheckBlockHeader(block, state, pindexPrev))

From 11855c1f990a4a66f55de60a30a8898ccbf766ec Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Tue, 16 Dec 2014 01:43:40 -0800
Subject: [PATCH 1195/1819] Enforce minRelayTxFee on wallet created tx and add
 a maxtxfee option.

Previously the minRelayTxFee was only enforced on user specified values.

It was possible for smartfee to produce a fee below minRelayTxFee which
 would just result in the transaction getting stuck because it can't be
 relayed.

This also introduces a maxtxfee option which sets an absolute maximum
 for any fee created by the wallet, with an intention of increasing
 user confidence that the automatic fees won't burn them. This was
 frequently a concern even before smartfees.

If the configured fee policy won't even allow the wallet to meet the relay
 fee the transaction creation may be aborted.

Rebased-From: aa279d613152e87ea25edfdf76c86779c0632f18
Github-Pull: #5485
---
 src/init.cpp   | 15 +++++++++++++++
 src/wallet.cpp | 47 ++++++++++++++++++++++++++++-------------------
 src/wallet.h   |  5 +++++
 3 files changed, 48 insertions(+), 19 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 5d42786038c8..3cdd42e2be33 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -287,6 +287,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -sendfreetransactions  " + strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0) + "\n";
     strUsage += "  -spendzeroconfchange   " + strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1) + "\n";
     strUsage += "  -txconfirmtarget=<n>   " + strprintf(_("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)"), 1) + "\n";
+    strUsage += "  -maxtxfee=<amt>        " + strprintf(_("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)"), FormatMoney(maxTxFee)) + "\n";
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
     strUsage += "  -walletnotify=<cmd>    " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
@@ -696,6 +697,20 @@ bool AppInit2(boost::thread_group& threadGroup)
                                        mapArgs["-paytxfee"], ::minRelayTxFee.ToString()));
         }
     }
+    if (mapArgs.count("-maxtxfee"))
+    {
+        CAmount nMaxFee = 0;
+        if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
+            return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s'"), mapArgs["-maptxfee"]));
+        if (nMaxFee > nHighTransactionMaxFeeWarning)
+            InitWarning(_("Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction."));
+        maxTxFee = nMaxFee;
+        if (CFeeRate(maxTxFee, 1000) < ::minRelayTxFee)
+        {
+            return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)"),
+                                       mapArgs["-maxtxfee"], ::minRelayTxFee.ToString()));
+        }
+    }
     nTxConfirmTarget = GetArg("-txconfirmtarget", 1);
     bSpendZeroConfChange = GetArg("-spendzeroconfchange", true);
     fSendFreeTransactions = GetArg("-sendfreetransactions", false);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 32a64daac0c9..dd87fab44b18 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -26,6 +26,7 @@ using namespace std;
  * Settings
  */
 CFeeRate payTxFee(DEFAULT_TRANSACTION_FEE);
+CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
 unsigned int nTxConfirmTarget = 1;
 bool bSpendZeroConfChange = true;
 bool fSendFreeTransactions = false;
@@ -1499,27 +1500,32 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                 }
                 dPriority = wtxNew.ComputePriority(dPriority, nBytes);
 
-                CAmount nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+                // Can we complete this as a free transaction?
+                if (fSendFreeTransactions && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE)
+                {
+                    // Not enough fee: enough priority?
+                    double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
+                    // Not enough mempool history to estimate: use hard-coded AllowFree.
+                    if (dPriorityNeeded <= 0 && AllowFree(dPriority))
+                        break;
+
+                    // Small enough, and priority high enough, to send for free
+                    if (dPriorityNeeded > 0 && dPriority >= dPriorityNeeded)
+                        break;
+                }
 
-                if (nFeeRet >= nFeeNeeded)
-                    break; // Done, enough fee included.
+                CAmount nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
 
-                // Too big to send for free? Include more fee and try again:
-                if (!fSendFreeTransactions || nBytes > MAX_FREE_TRANSACTION_CREATE_SIZE)
+                // If we made it here and we aren't even able to meet the relay fee on the next pass, give up
+                // because we must be at the maximum allowed fee.
+                if (nFeeNeeded < ::minRelayTxFee.GetFee(nBytes))
                 {
-                    nFeeRet = nFeeNeeded;
-                    continue;
+                    strFailReason = _("Transaction too large for fee policy");
+                    return false;
                 }
 
-                // Not enough fee: enough priority?
-                double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
-                // Not enough mempool history to estimate: use hard-coded AllowFree.
-                if (dPriorityNeeded <= 0 && AllowFree(dPriority))
-                    break;
-
-                // Small enough, and priority high enough, to send for free
-                if (dPriorityNeeded > 0 && dPriority >= dPriorityNeeded)
-                    break;
+                if (nFeeRet >= nFeeNeeded)
+                    break; // Done, enough fee included.
 
                 // Include more fee and try again.
                 nFeeRet = nFeeNeeded;
@@ -1591,9 +1597,6 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
 {
     // payTxFee is user-set "I want to pay this much"
     CAmount nFeeNeeded = payTxFee.GetFee(nTxBytes);
-    // prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
-    if (nFeeNeeded > 0 && nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
-        nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
     // user selected total at least (default=true)
     if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK())
         nFeeNeeded = payTxFee.GetFeePerK();
@@ -1604,6 +1607,12 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
     // back to a hard-coded fee
     if (nFeeNeeded == 0)
         nFeeNeeded = minTxFee.GetFee(nTxBytes);
+    // prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
+    if (nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
+        nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
+    // But always obey the maximum
+    if (nFeeNeeded > maxTxFee)
+        nFeeNeeded = maxTxFee;
     return nFeeNeeded;
 }
 
diff --git a/src/wallet.h b/src/wallet.h
index 2dd2146e8cf2..058107edf170 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -30,6 +30,7 @@
  * Settings
  */
 extern CFeeRate payTxFee;
+extern CAmount maxTxFee;
 extern unsigned int nTxConfirmTarget;
 extern bool bSpendZeroConfChange;
 extern bool fSendFreeTransactions;
@@ -39,6 +40,10 @@ extern bool fPayAtLeastCustomFee;
 static const CAmount DEFAULT_TRANSACTION_FEE = 0;
 //! -paytxfee will warn if called with a higher fee than this amount (in satoshis) per KB
 static const CAmount nHighTransactionFeeWarning = 0.01 * COIN;
+//! -maxtxfee default
+static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
+//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis)
+static const CAmount nHighTransactionMaxFeeWarning = 100 * nHighTransactionFeeWarning;
 //! Largest (in bytes) free transaction we're willing to create
 static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000;
 

From 15ad0b54fab09d31ab7171b83ef58fa4c5f4aea9 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Mon, 15 Dec 2014 14:38:25 -0800
Subject: [PATCH 1196/1819] Apply AreSane() checks to the fees from the
 network.

'Sane' was already defined by this code as:
 fee.GetFeePerK() > minRelayFee.GetFeePerK() * 10000
 But sanity was only enforced for data loaded from disk.

Note that this is a pretty expansive definition of 'sane': A 10 BTC
 fee is still passes the test if its on a 100kb transaction.

This prevents a single insane fee on the network from making us reject
 our stored fee data at start.  We still may reject valid saved fee
 state if minRelayFee is changed between executions.

This also reduces the risk and limits the damage from a cascading
 failure where one party pays a bunch of insane fees which cases
 others to pay insane fees.

Rebased-From: 64849306905e625fd44d297e8d58c3e1dd98cb90
Github-Pull: #5481
---
 src/txmempool.cpp | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 840eb536baa0..dcdf5653fe8c 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -91,22 +91,32 @@ class CBlockAverage
      * Used as belt-and-suspenders check when reading to detect
      * file corruption
      */
-    bool AreSane(const std::vector<CFeeRate>& vecFee, const CFeeRate& minRelayFee)
+    static bool AreSane(const CFeeRate fee, const CFeeRate& minRelayFee)
+    {
+        if (fee < CFeeRate(0))
+            return false;
+        if (fee.GetFeePerK() > minRelayFee.GetFeePerK() * 10000)
+            return false;
+        return true;
+    }
+    static bool AreSane(const std::vector<CFeeRate>& vecFee, const CFeeRate& minRelayFee)
     {
         BOOST_FOREACH(CFeeRate fee, vecFee)
         {
-            if (fee < CFeeRate(0))
-                return false;
-            if (fee.GetFeePerK() > minRelayFee.GetFeePerK() * 10000)
+            if (!AreSane(fee, minRelayFee))
                 return false;
         }
         return true;
     }
-    bool AreSane(const std::vector<double> vecPriority)
+    static bool AreSane(const double priority)
+    {
+        return priority >= 0;
+    }
+    static bool AreSane(const std::vector<double> vecPriority)
     {
         BOOST_FOREACH(double priority, vecPriority)
         {
-            if (priority < 0)
+            if (!AreSane(priority))
                 return false;
         }
         return true;
@@ -167,12 +177,12 @@ class CMinerPolicyEstimator
         bool sufficientFee = (feeRate > minRelayFee);
         bool sufficientPriority = AllowFree(dPriority);
         const char* assignedTo = "unassigned";
-        if (sufficientFee && !sufficientPriority)
+        if (sufficientFee && !sufficientPriority && CBlockAverage::AreSane(feeRate, minRelayFee))
         {
             history[nBlocksTruncated].RecordFee(feeRate);
             assignedTo = "fee";
         }
-        else if (sufficientPriority && !sufficientFee)
+        else if (sufficientPriority && !sufficientFee && CBlockAverage::AreSane(dPriority))
         {
             history[nBlocksTruncated].RecordPriority(dPriority);
             assignedTo = "priority";

From d10a9015ad324d03664ccbccfd23953733c6dc59 Mon Sep 17 00:00:00 2001
From: Adam Weiss <adam@signal11.com>
Date: Thu, 18 Dec 2014 18:28:29 -0500
Subject: [PATCH 1197/1819] DOS: Respect max per-peer blocks in flight limit

Don't allow immediate inv driven block downloads if
a peer already has MAX_BLOCKS_IN_TRANSIT_PER_PEER
active downloads.  Prevents bogus inv spam from
blowing up block transfer tracking data structures.

Rebased-From: c90770430d7c1eb7ece2d4ddb987b0f2210fd86f
Github-Pull: #5507
---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4a0008726e42..69fb5e258844 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3641,7 +3641,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                     // doing this will result in the received block being rejected as an orphan in case it is
                     // not a direct successor.
                     pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexBestHeader), inv.hash);
-                    if (chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - Params().TargetSpacing() * 20) {
+                    CNodeState *nodestate = State(pfrom->GetId());
+                    if (chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - Params().TargetSpacing() * 20 &&
+                        nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
                         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).

From 3a88ba07944f25349701f13371ca6e5f188a8fa4 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 23 Dec 2014 12:58:24 +0100
Subject: [PATCH 1198/1819] qt: periodic language update

---
 src/qt/locale/bitcoin_ca.ts    | 358 ++++++++++++++++++++++++++++++++-
 src/qt/locale/bitcoin_ca_ES.ts | 358 ++++++++++++++++++++++++++++++++-
 src/qt/locale/bitcoin_es.ts    |   8 +
 src/qt/locale/bitcoin_it.ts    |  20 ++
 src/qt/locale/bitcoin_pt_BR.ts |   8 +
 src/qt/locale/bitcoin_pt_PT.ts |  44 +++-
 src/qt/locale/bitcoin_zh_TW.ts |  64 +++++-
 7 files changed, 838 insertions(+), 22 deletions(-)

diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 8f06ac3aa707..3e87383c503c 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Al dia</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>S'ha processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>S'està posant al dia ...</translation>
@@ -516,6 +520,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Selecció de moneda</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantitat:</translation>
@@ -534,7 +542,7 @@ Address: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Quota:</translation>
+        <translation>Comissió</translation>
     </message>
     <message>
         <source>Dust:</source>
@@ -542,7 +550,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Quota posterior:</translation>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -564,6 +572,14 @@ Address: %4
         <source>Amount</source>
         <translation>Quantitat</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Rebut amb l'etiqueta</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Rebut amb l'adreça</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -694,7 +710,7 @@ Address: %4
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Això comporta una comissi d'almenys %1 per kB.</translation>
+        <translation>Això comporta una comissió d'almenys %1 per kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
@@ -729,7 +745,7 @@ Address: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Editar Adreça</translation>
+        <translation>Edita l'adreça</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -839,7 +855,7 @@ Address: %4
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
-        <translation>Defineix un idioma, per exemple "de_DE" (per defecte: preferències locals de sistema)</translation>
+        <translation>Defineix un idioma, per exemple «de_DE» (per defecte: preferències locals de sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -896,7 +912,15 @@ Address: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB d'espai lliure disponible</numerusform><numerusform>%n GB d'espai lliure disponible</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(de %n GB necessari)</numerusform><numerusform>(de %n GB necessaris)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1018,6 +1042,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Port obert amb &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Connecta a través d'un proxy SOCKS5 (proxy per defecte):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP del proxy:</translation>
@@ -1149,6 +1181,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Balanç minat que encara no ha madurat</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Balances</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1161,6 +1197,14 @@ Address: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>El vostre balanç actual en adreces de només lectura</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Que es pot gastar:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transaccions recents</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Transaccions sense confirmar a adreces de només lectura</translation>
@@ -1782,7 +1826,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Quota posterior:</translation>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1796,6 +1840,78 @@ Address: %4
         <source>Custom change address</source>
         <translation>Personalitza l'adreça de canvi</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Comissió de transacció</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Tria...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>redueix els paràmetres de comissió</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimitza</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comissió personalitzada es defineix a 1000 satoshis i la transacció és de només 250 bytes, llavors «per kilobyte» només es paguen 250 satoshis en una comissió, mentre que amb la de «com a mínim» es pagarien 1000 satoshis. Per a transaccions superiors al kilobyte, en tots dos casos es paga per kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comissió personalitzada es defineix a 1000 satoshis i la transacció és de només 250 bytes, llavors «per kilobyte» només es paguen 250 satoshis en una comissió, mentre que amb la de «total com a mínim» es pagarien 1000 satoshis. Per a transaccions superiors al kilobyte, en tots dos casos es paga per kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total com a mínim</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>No hi ha cap problema en pagar només la comissió mínima sempre que hi hagi menys volum de transacció que espai en els blocs. Però tingueu present que això pot acabar en una transacció que mai es confirmi una vegada hi hagi més demanda de transaccions de bitcoins que la xarxa pugui processar.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(llegiu l'indicador de funció)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomanada:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalitzada:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(No s'ha inicialitzat encara la comissió intel·ligent. Normalment pren uns pocs blocs...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Temps de confirmació:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>ràpid</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Envia com a transacció de comissió zero si és possible</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(la confirmació pot trigar més temps)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Envia a múltiples destinataris al mateix temps</translation>
@@ -1846,7 +1962,7 @@ Address: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copia la comissi</translation>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
@@ -1886,7 +2002,7 @@ Address: %4
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>El total excedeix el teu balanç quan s'afegeix la comisió a la transacció %1.</translation>
+        <translation>El total excedeix el teu balanç quan s'afegeix la comissió a la transacció %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -1900,6 +2016,18 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>S'ha rebutjat la transacció! Això pot passar si alguna de les monedes del vostre moneder ja s'han gastat; per exemple, si heu fet servir una còpia de seguretat del fitxer wallet.dat i s'haguessin gastat monedes de la còpia però sense marcar-les-hi com a gastades.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Una comissió superior a %1 es considera una comissió excessiva.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Paga només la comissió mínima de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Estimat per a començar la confirmació en %1 bloc(s).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Avís: adreça Bitcoin no vàlida</translation>
@@ -2428,6 +2556,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>Tipus de transacció.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Si està implicada o no una adreça només de lectura en la transacció.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Adreça del destinatari de la transacció.</translation>
@@ -2523,6 +2655,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>Exporta l'historial de transacció</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Només de lectura</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>L'exportació ha fallat</translation>
@@ -2697,6 +2833,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuït sota llicència de programari MIT. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
@@ -2749,6 +2889,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Avís: el fitxer wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Afegeix a la llista blanca els iguals que es connecten de la màscara de xarxa o adreça IP donada. Es pot especificar moltes vegades.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(per defecte: 1)</translation>
@@ -2809,6 +2953,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Error en obrir la base de dades de blocs</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Error: s'ha produït un error intern fatal. Consulteu debug.log per a més detalls</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Error: Espai al disc baix!</translation>
@@ -2841,6 +2989,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (ipv4, ipv6 o onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
@@ -2861,6 +3013,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Utilitza UPnP per a mapejar el port d'escolta (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>S'estan verificant els blocs...</translation>
@@ -2901,6 +3057,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>No es pot obtenir un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estigui executant.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limita contínuament la freqüència de les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
@@ -2925,6 +3085,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
@@ -2933,6 +3097,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Defineix el nombre de fils per a la generació de moneda si està habilitat (-1 = tots els nuclis, per defecte: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
@@ -3001,6 +3169,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
     </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; transaccions no connectables en memòria (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Cal especificar un port amb -whitebind: «%s»</translation>
@@ -3033,6 +3205,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Envia les transaccions com a transaccions de comissió zero sempre que sigui possible (per defecte: %u) </translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
@@ -3141,14 +3317,178 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error en carregar wallet.dat: Moneder corrupte</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = manté les metadades de les tx, p. ex., propietari del compte i informació de sol·licitud del pagament, 2 = prescindeix de les metadades de les tx)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Com d'exhaustiva és la verificació de blocs del -checkblocks (0-4, per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Si no es defineix una comissió de pagament de transacció (paytxfee), inclogueu suficient comissió per tal que les transaccions puguin confirmar-se cada n blocs com a mitja (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Enregistreu la prioritat de la transacció i la comissió per kB en minar blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Manté un índex complet de transaccions, utilitzat per la crida rpc getrawtransaction (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Nombre de segons necessaris perquè els iguals de comportament qüestionable puguin tornar a connectar-se (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Informació de sortida de la depuració (per defecte: %u, proporcionar &lt;category&gt; és opcional)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Utilitza un proxy SOCKS4 apart per a arribar als iguals a través de serveis ocults de Tor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Xifrats acceptables (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Demana sempre les adreces dels iguals a través de consultes DNS (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Inhabilita el mode segur, sobreescriu un esdeveniment de mode segur real (per defecte: %u) </translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error en carregar wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Força el mode segur (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Genera monedes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Quants blocs per comprovar a l'inici (per defecte: %u, 0 = tots)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inclou l'adreça IP a la sortida de depuració (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Adreça -proxy invalida: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limita la mida de la cau de signatura a &lt;n&gt; entrades (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escolta les connexions JSON-RPC en &lt;port&gt; (per defecte: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escolta les connexions en &lt;port&gt; (per defecte: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; connexions a iguals (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Memòria intermèdia màxima de recepció per connexió, &lt;n&gt;*1000 bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Memòria intermèdia màxima d'enviament per connexió, &lt;n&gt;*1000 bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Només accepta els punts de control integrats que coincideixen amb la cadena de blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Retransmet i mina les transaccions de l'operador (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Retransmet multisig no P2SH (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Fitxer de certificat del servidor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Clau privada del servidor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Defineix la mida clau disponible a &lt;n&gt; (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Defineix la mida de bloc mínima en bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Defineix el nombre de fils a crides de servei RPC (per defecte: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Defineix el senyalador DB_PRIVATE en l'entorn db del moneder (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Especifica el fitxer de configuració (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Especifica el temps d'espera de la connexió en milisegons (mínim: 1, per defecte: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Especifica el fitxer pid (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Gasta el canvi no confirmat en enviar les transaccions (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Atura l'execució després d'importar blocs del disc (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Llindar per a desconnectar els iguals de comportament qüestionable (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 60c6fa30f4cf..0004d6da6f59 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Al dia</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>S'ha processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>S'està posant al dia ...</translation>
@@ -516,6 +520,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Selecció de moneda</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantitat:</translation>
@@ -534,7 +542,7 @@ Address: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Quota:</translation>
+        <translation>Comissió</translation>
     </message>
     <message>
         <source>Dust:</source>
@@ -542,7 +550,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Quota posterior:</translation>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -564,6 +572,14 @@ Address: %4
         <source>Amount</source>
         <translation>Quantitat</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Rebut amb l'etiqueta</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Rebut amb l'adreça</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -694,7 +710,7 @@ Address: %4
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Això comporta una comissi d'almenys %1 per kB.</translation>
+        <translation>Això comporta una comissió d'almenys %1 per kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
@@ -729,7 +745,7 @@ Address: %4
     <name>EditAddressDialog</name>
     <message>
         <source>Edit Address</source>
-        <translation>Editar Adreça</translation>
+        <translation>Edita l'adreça</translation>
     </message>
     <message>
         <source>&amp;Label</source>
@@ -839,7 +855,7 @@ Address: %4
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
-        <translation>Defineix un idioma, per exemple "de_DE" (per defecte: preferències locals de sistema)</translation>
+        <translation>Defineix un idioma, per exemple «de_DE» (per defecte: preferències locals de sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -896,7 +912,15 @@ Address: %4
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB d'espai lliure disponible</numerusform><numerusform>%n GB d'espai lliure disponible</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(de %n GB necessari)</numerusform><numerusform>(de %n GB necessaris)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1018,6 +1042,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Port obert amb &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Connecta a la xarxa Bitcoin a través d'un proxy SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Connecta a través d'un proxy SOCKS5 (proxy per defecte):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP del proxy:</translation>
@@ -1149,6 +1181,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Balanç minat que encara no ha madurat</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Balances</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1161,6 +1197,14 @@ Address: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>El vostre balanç actual en adreces de només lectura</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Que es pot gastar:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Transaccions recents</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Transaccions sense confirmar a adreces de només lectura</translation>
@@ -1782,7 +1826,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Quota posterior:</translation>
+        <translation>Comissió posterior:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1796,6 +1840,78 @@ Address: %4
         <source>Custom change address</source>
         <translation>Personalitza l'adreça de canvi</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Comissió de transacció</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Tria...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>redueix els paràmetres de comissió</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimitza</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comissió personalitzada es defineix a 1000 satoshis i la transacció és de només 250 bytes, llavors «per kilobyte» només es paguen 250 satoshis en una comissió, mentre que amb la de «com a mínim» es pagarien 1000 satoshis. Per a transaccions superiors al kilobyte, en tots dos casos es paga per kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comissió personalitzada es defineix a 1000 satoshis i la transacció és de només 250 bytes, llavors «per kilobyte» només es paguen 250 satoshis en una comissió, mentre que amb la de «total com a mínim» es pagarien 1000 satoshis. Per a transaccions superiors al kilobyte, en tots dos casos es paga per kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total com a mínim</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>No hi ha cap problema en pagar només la comissió mínima sempre que hi hagi menys volum de transacció que espai en els blocs. Però tingueu present que això pot acabar en una transacció que mai es confirmi una vegada hi hagi més demanda de transaccions de bitcoins que la xarxa pugui processar.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(llegiu l'indicador de funció)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomanada:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalitzada:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(No s'ha inicialitzat encara la comissió intel·ligent. Normalment pren uns pocs blocs...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Temps de confirmació:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>ràpid</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Envia com a transacció de comissió zero si és possible</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(la confirmació pot trigar més temps)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Envia a múltiples destinataris al mateix temps</translation>
@@ -1846,7 +1962,7 @@ Address: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copia la comissi</translation>
+        <translation>Copia la comissió</translation>
     </message>
     <message>
         <source>Copy after fee</source>
@@ -1886,7 +2002,7 @@ Address: %4
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>El total excedeix el teu balanç quan s'afegeix la comisió a la transacció %1.</translation>
+        <translation>El total excedeix el teu balanç quan s'afegeix la comissió a la transacció %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
@@ -1900,6 +2016,18 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>S'ha rebutjat la transacció! Això pot passar si alguna de les monedes del vostre moneder ja s'han gastat; per exemple, si heu fet servir una còpia de seguretat del fitxer wallet.dat i s'haguessin gastat monedes de la còpia però sense marcar-les-hi com a gastades.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Una comissió superior a %1 es considera una comissió excessiva.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Paga només la comissió mínima de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Estimat per a començar la confirmació en %1 bloc(s).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Avís: adreça Bitcoin no vàlida</translation>
@@ -2428,6 +2556,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>Tipus de transacció.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Si està implicada o no una adreça només de lectura en la transacció.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Adreça del destinatari de la transacció.</translation>
@@ -2523,6 +2655,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>Exporta l'historial de transacció</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Només de lectura</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>L'exportació ha fallat</translation>
@@ -2697,6 +2833,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuït sota llicència de programari MIT. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
@@ -2749,6 +2889,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Avís: el fitxer wallet.dat és corrupte, dades rescatades! L'arxiu wallet.dat original ha estat desat com wallet.{estampa_temporal}.bak al directori %s; si el teu balanç o transaccions son incorrectes hauries de restaurar-lo de un backup.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Afegeix a la llista blanca els iguals que es connecten de la màscara de xarxa o adreça IP donada. Es pot especificar moltes vegades.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(per defecte: 1)</translation>
@@ -2809,6 +2953,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error opening block database</source>
         <translation>Error en obrir la base de dades de blocs</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Error: s'ha produït un error intern fatal. Consulteu debug.log per a més detalls</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Error: Espai al disc baix!</translation>
@@ -2841,6 +2989,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>No hi ha suficient descriptors de fitxers disponibles.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Només connecta als nodes de la xarxa &lt;net&gt; (ipv4, ipv6 o onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstrueix l'índex de la cadena de blocs dels fitxers actuals blk000??.dat</translation>
@@ -2861,6 +3013,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Això es així per a eines de proves de regressió per al desenvolupament d'aplicacions.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Utilitza UPnP per a mapejar el port d'escolta (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>S'estan verificant els blocs...</translation>
@@ -2901,6 +3057,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>No es pot obtenir un bloqueig del directori de dades %s. El Bitcoin Core probablement ja s'estigui executant.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limita contínuament la freqüència de les transaccions gratuïtes a &lt;n&gt;*1000 bytes per minut (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Crea fitxers nous amb els permisos per defecte del sistema, en comptes de l'umask 077 (només efectiu amb la funcionalitat de moneder inhabilitada)</translation>
@@ -2925,6 +3085,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
@@ -2933,6 +3097,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Defineix el nombre de fils per a la generació de moneda si està habilitat (-1 = tots els nuclis, per defecte: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
@@ -3001,6 +3169,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
     </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; transaccions no connectables en memòria (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Cal especificar un port amb -whitebind: «%s»</translation>
@@ -3033,6 +3205,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Envia informació de traça/depuració a la consola en comptes del fitxer debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Envia les transaccions com a transaccions de comissió zero sempre que sigui possible (per defecte: %u) </translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra totes les opcions de depuració (ús: --help  --help-debug)</translation>
@@ -3141,14 +3317,178 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error en carregar wallet.dat: Moneder corrupte</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = manté les metadades de les tx, p. ex., propietari del compte i informació de sol·licitud del pagament, 2 = prescindeix de les metadades de les tx)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Buida l'activitat de la base de dades de la memòria disponible al registre del disc cada &lt;n&gt; megabytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Com d'exhaustiva és la verificació de blocs del -checkblocks (0-4, per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
+        <translation>Si no es defineix una comissió de pagament de transacció (paytxfee), inclogueu suficient comissió per tal que les transaccions puguin confirmar-se cada n blocs com a mitja (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Enregistreu la prioritat de la transacció i la comissió per kB en minar blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Manté un índex complet de transaccions, utilitzat per la crida rpc getrawtransaction (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Nombre de segons necessaris perquè els iguals de comportament qüestionable puguin tornar a connectar-se (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Informació de sortida de la depuració (per defecte: %u, proporcionar &lt;category&gt; és opcional)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Utilitza un proxy SOCKS4 apart per a arribar als iguals a través de serveis ocults de Tor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Xifrats acceptables (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Demana sempre les adreces dels iguals a través de consultes DNS (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Inhabilita el mode segur, sobreescriu un esdeveniment de mode segur real (per defecte: %u) </translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Error en carregar wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Força el mode segur (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Genera monedes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Quants blocs per comprovar a l'inici (per defecte: %u, 0 = tots)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inclou l'adreça IP a la sortida de depuració (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Adreça -proxy invalida: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limita la mida de la cau de signatura a &lt;n&gt; entrades (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escolta les connexions JSON-RPC en &lt;port&gt; (per defecte: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escolta les connexions en &lt;port&gt; (per defecte: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Manté com a màxim &lt;n&gt; connexions a iguals (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Memòria intermèdia màxima de recepció per connexió, &lt;n&gt;*1000 bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Memòria intermèdia màxima d'enviament per connexió, &lt;n&gt;*1000 bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Només accepta els punts de control integrats que coincideixen amb la cadena de blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Posa davant de la sortida de depuració una marca horària (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Print block tree on startup (default: %u)</source>
+        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Retransmet i mina les transaccions de l'operador (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Retransmet multisig no P2SH (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Executa un fil per buidar el moneder periòdicament (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Fitxer de certificat del servidor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Clau privada del servidor (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Defineix la mida clau disponible a &lt;n&gt; (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Defineix la mida de bloc mínima en bytes (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Defineix el nombre de fils a crides de servei RPC (per defecte: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Defineix el senyalador DB_PRIVATE en l'entorn db del moneder (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Especifica el fitxer de configuració (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Especifica el temps d'espera de la connexió en milisegons (mínim: 1, per defecte: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Especifica el fitxer pid (per defecte: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Gasta el canvi no confirmat en enviar les transaccions (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Atura l'execució després d'importar blocs del disc (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Llindar per a desconnectar els iguals de comportament qüestionable (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index b701366706f6..a2bd4e8e89cd 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1848,6 +1848,14 @@ Dirección: %4
         <source>Transaction Fee:</source>
         <translation>Comisión de Transacción:</translation>
     </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Elija...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Colapsar ajustes de cuota</translation>
+    </message>
     <message>
         <source>Minimize</source>
         <translation>Minimizar</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 06cf0e0162aa..cc85dfe22711 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -2961,6 +2961,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Questo è previsto per l'uso con test di regressione e per lo sviluppo di applicazioni.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Usa UPnP per mappare la porta di ascolto (default: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verifica blocchi...</translation>
@@ -3021,6 +3025,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Connect through SOCKS5 proxy</source>
         <translation>Connetti attraverso SOCKS5 proxy</translation>
     </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Errore caricamento wallet.dat: il wallet richiede una versione nuova di Bitcoin Core</translation>
@@ -3174,6 +3182,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Errore caricamento wallet.dat: Portamonete corrotto</translation>
     </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(default: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Errore caricamento wallet.dat</translation>
@@ -3194,6 +3206,14 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Invalid -proxy address: '%s'</source>
         <translation>Indirizzo -proxy non valido: '%s'</translation>
     </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Ascolto di connessioni JSON-RPC su &lt;port&gt; (default: %u o testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Ascolto di connessioni su &lt;port&gt; (default: %u o testnet: %u)</translation>
+    </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
         <translation>Mantieni al massimo &lt;n&gt; connessioni ai peers (default: %u)</translation>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 65f07ca59c6f..b5b8e3e5d3e4 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -519,6 +519,10 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Selecionar Moeda</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
@@ -1203,6 +1207,10 @@ Endereço: %4</translation>
         <source>Payment request has expired.</source>
         <translation>Solicitação de pagamento expirou.</translation>
     </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Pedido de pagamento não é inicializado.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Valor do pagamento solicitado de %1 é muito pequeno (Considerado poeira).</translation>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index dc016623e4f9..dd0d8823f6fc 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>A Exportação Falhou</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Houve um erro ao tentar a guardar a lista de endereços em %1. Por favor tente novamente.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -290,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Abrir &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Cliente Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>A importar blocos do disco...</translation>
@@ -342,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Receber</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Mostrar informação sobre Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>Mo&amp;strar / Ocultar</translation>
@@ -792,6 +804,10 @@ Endereço: %4</translation>
         <source>version</source>
         <translation>versão</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-bit)</translation>
+    </message>
     <message>
         <source>About Bitcoin Core</source>
         <translation>Sobre o Bitcoin Core</translation>
@@ -863,7 +879,15 @@ Endereço: %4</translation>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB de espaço livre disponível </numerusform><numerusform>%n GB de espaço livre disponível </numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(de %n GB necessários)</numerusform><numerusform>(de %n GB necessário)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1100,6 +1124,10 @@ Endereço: %4</translation>
         <source>Your current total balance</source>
         <translation>O seu saldo total actual</translation>
     </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>transações recentes</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
@@ -1173,6 +1201,10 @@ Endereço: %4</translation>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1181,6 +1213,14 @@ Endereço: %4</translation>
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Nenhum</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/D</translation>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 56d598fc6496..72f3ac847d7d 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -576,6 +576,14 @@ Address: %4
         <source>Amount</source>
         <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>
@@ -1842,7 +1850,7 @@ Address: %4
     </message>
     <message>
         <source>Choose...</source>
-        <translation>選擇...</translation>
+        <translation>選項...</translation>
     </message>
     <message>
         <source>collapse fee-settings</source>
@@ -1850,24 +1858,64 @@ Address: %4
     </message>
     <message>
         <source>Minimize</source>
-        <translation>最小化</translation>
+        <translation>縮小</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>如果自訂手續費設定為 1000 satoshi, 而交易資料大小只有 250 個位元組的話，那麽選擇「每千位元組」就只會付 250 satoshi 的手續費，換做選「總共至少」就會付 1000 satoshi. 但是如果交易資料大小超過一千個位元組，那麽兩者都是每千位元組的費用。</translation>
     </message>
     <message>
         <source>per kilobyte</source>
         <translation>每千位元組</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>如果自訂手續費設定為 1000 satoshi, 而交易資料大小只有 250 個位元組的話，那麽選擇「每千位元組」就只會付 250 satoshi 的手續費，換做選「總共至少」就會付 1000 satoshi. 但是如果交易資料大小超過一千個位元組，那麽兩者都是每千位元組的費用。</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>總共最少</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>當交易量少於區塊可容納的空間時，只付最低手續費不會有什麽問題。但是當交易量的需求成長到超過整體網路可以處理的量時，可能會造成一筆一直不會被確認的交易。</translation>
+    </message>
     <message>
         <source>(read the tooltip)</source>
         <translation>(請看提示)</translation>
     </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>建議值:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>自訂:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</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>Send as zero-fee transaction if possible</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>
@@ -1972,6 +2020,18 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>交易被拒絕了！有時候會發生這種錯誤，是因為你錢包中的一些錢已經被花掉了。比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢，你現在所用的原來的錢包中，卻沒有那筆錢已經花掉的紀錄。</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>高於 %1 的手續費會被認為是不正常。</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>只付最低手續費 %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>預計可在 %1 個區塊內開始確認。</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>警告: 位元幣位址無效</translation>

From c888111a3f70ce6ce6c25b9bd2fb6d2a5bff67b7 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 19 Dec 2014 14:39:10 -0500
Subject: [PATCH 1199/1819] docs: update gitian building docs

Github-Pull: #5512
Rebased-From: dd14a0e799b6552ae85aaab2b0b48f788c578aea
---
 doc/gitian-building.md | 36 ++++++++++++------------------------
 1 file changed, 12 insertions(+), 24 deletions(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index b356a5d88d8d..defddedc6e21 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -291,7 +291,7 @@ Setting up gitian images
 -------------------------
 
 Gitian needs virtual images of the operating system to build in.
-Currently this is Ubuntu Precise for both x86 architectures.
+Currently this is Ubuntu Precise for x86_64.
 These images will be copied and used every time that a build is started to
 make sure that the build is deterministic.
 Creating the images will take a while, but only has to be done once.
@@ -300,7 +300,6 @@ Execute the following as user `debian`:
 
 ```bash
 cd gitian-builder
-bin/make-base-vm --lxc --arch i386 --suite precise
 bin/make-base-vm --lxc --arch amd64 --suite precise
 ```
 
@@ -311,33 +310,25 @@ There will be a lot of warnings printed during build of the images. These can be
 Getting and building the inputs
 --------------------------------
 
-In [doc/release-process.md](release-process.md) in the bitcoin repository under 'Fetch and build inputs'.
-you will find a list of `wget` commands that can be executed to get the dependencies.
+Follow the instructions in [doc/release-process.md](release-process.md) in the bitcoin repository
+under 'Fetch and build inputs' to install sources which require manual intervention. Also follow
+the next step: 'Seed the Gitian sources cache', which will fetch all necessary source files allowing
+for gitian to work offline.
 
-I needed to add `--no-check-certificate` to the OpenSSL wget line to make it work.
-Likely this is because the ca-certificates in Debian 7.4 is fairly old. This does not create a 
-security issue as the gitian descriptors check the integrity of the input archives and refuse to work
-if any one is corrupted.
+Building Bitcoin
+----------------
 
-After downloading the archives, execute the `gbuild` commands to build the dependencies.
-This can take a long time, but only has to be done when the dependencies change, for example
-to upgrade the used version.
+To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform
+gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
 
-**Note**: Do not forget to copy the result from `build/out` to `inputs` after every gbuild command! This will save
-you a lot of time.
+This may take a long time as it also builds the dependencies needed for each descriptor.
+These dependencies will be cached after a successful build to avoid rebuilding them when possible.
 
 At any time you can check the package installation and build progress with
 
 ```bash
 tail -f var/install.log
 tail -f var/build.log
-```
-
-Building Bitcoin
-----------------
-
-To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform
-gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
 
 Output from `gbuild` will look something like
 
@@ -348,7 +339,7 @@ Output from `gbuild` will look something like
     Resolving deltas: 100% (25724/25724), done.
     From https://github.com/bitcoin/bitcoin
     ... (new tags, new branch etc)
-    --- Building for precise i386 ---
+    --- Building for precise x86_64 ---
     Stopping target if it is up
     Making a new image copy
     stdin: is not a tty
@@ -363,9 +354,6 @@ Output from `gbuild` will look something like
     lxc-start: Connection refused - inotify event with no name (mask 32768)
     Running build script (log in var/build.log)
 
-As when building the dependencies, the progress of package installation and building
-can be inspected in `var/install.log` and `var/build.log`.
-
 Building an alternative repository
 -----------------------------------
 

From 63b5a1dc80ab978160b7ee036d5e55973e995fd5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 23 Dec 2014 14:20:28 +0100
Subject: [PATCH 1200/1819] Do not use libgmp automatically in libsecp256k1

---
 src/secp256k1/configure.ac | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/src/secp256k1/configure.ac b/src/secp256k1/configure.ac
index 6e6fccd7fddc..017fd4e1d471 100644
--- a/src/secp256k1/configure.ac
+++ b/src/secp256k1/configure.ac
@@ -118,13 +118,6 @@ if test x"$req_field" = x"auto"; then
     fi
   fi
 
-  if test x"$set_field" = x; then
-    SECP_GMP_CHECK
-    if test x"$has_gmp" = x"yes"; then
-      set_field=gmp
-    fi
-  fi
-
   if test x"$set_field" = x; then
     set_field=32bit
   fi
@@ -173,11 +166,6 @@ else
 fi
 
 if test x"$req_bignum" = x"auto"; then
-  SECP_GMP_CHECK
-  if test x"$has_gmp" = x"yes"; then
-    set_bignum=gmp
-  fi
-
   if test x"$set_bignum" = x; then
     set_bignum=none
   fi

From 3aa3c710ac36abe43bea2a05a2fd334419494c51 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 23 Dec 2014 18:10:18 +0100
Subject: [PATCH 1201/1819] Preliminary release notes for 0.10

---
 doc/release-notes.md | 443 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 439 insertions(+), 4 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index f804e8c11b29..91c69b29a298 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,8 +1,31 @@
-(note: this is a temporary file, to be added-to by anybody, and moved to
-release-notes at release time)
+Bitcoin Core version 0.10.0 is now available from:
 
-Block file backwards-compatibility warning
-===========================================
+  https://bitcoin.org/bin/0.10.0/
+
+This is a new major version release, bringing both new features and
+bug fixes.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+Upgrading and downgrading
+==========================
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+If you are upgrading from version 0.7.2 or earlier, the first time you run
+0.10.0 your blockchain files will be re-indexed, which will take anywhere from 
+30 minutes to several hours, depending on the speed of your machine.
+
+Downgrading warning
+---------------------
 
 Because release 0.10.0 makes use of headers-first synchronization and parallel
 block download, the block files and databases are not backwards-compatible
@@ -124,3 +147,415 @@ libsecp256k1 is better tested and more thoroughly reviewed
 than the implementation in OpenSSL.
 
 [1] https://eprint.iacr.org/2014/161.pdf
+
+0.10.0 Release notes
+=======================
+
+Detailed release notes follow. This overview includes changes that affect external
+behavior, not code moves, refactors or string updates.
+
+RPC:
+- `f923c07` Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
+- `b641c9c` Fix addnode "onetry": Connect with OpenNetworkConnection
+- `171ca77` estimatefee / estimatepriority RPC methods
+- `b750cf1` Remove cli functionality from bitcoind
+- `f6984e8` Add "chain" to getmininginfo, improve help in getblockchaininfo
+- `99ddc6c` Add nLocalServices info to RPC getinfo
+- `cf0c47b` Remove getwork() RPC call
+- `2a72d45` prioritisetransaction <txid> <priority delta> <priority tx fee>
+- `e44fea5` Add an option `-datacarrier` to allow users to disable relaying/mining data carrier transactions
+- `2ec5a3d` Prevent easy RPC memory exhaustion attack
+- `d4640d7` Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation
+- `83f3543` Added argument to listaccounts to include watchonly addresses
+- `952877e` Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address
+- `d7d5d23` Added argument to listtransactions and listsinceblock to include watchonly addresses
+- `f87ba3d` added includeWatchonly argument to 'gettransaction' because it affects balance calculation
+- `0fa2f88` added includedWatchonly argument to listreceivedbyaddress/...account
+- `6c37f7f` `getrawchangeaddress`: fail when keypool exhausted and wallet locked
+- `ff6a7af` getblocktemplate: longpolling support
+- `c4a321f` Add peerid to getpeerinfo to allow correlation with the logs
+- `1b4568c` Add vout to ListTransactions output
+- `b33bd7a` Implement "getchaintips" RPC command to monitor blockchain forks
+- `733177e` Remove size limit in RPC client, keep it in server
+- `6b5b7cb` Categorize rpc help overview
+- `6f2c26a` Closely track mempool byte total. Add "getmempoolinfo" RPC
+- `aa82795` Add detailed network info to getnetworkinfo RPC
+- `01094bd` Don't reveal whether password is <20 or >20 characters in RPC
+- `57153d4` rpc: Compute number of confirmations of a block from block height
+- `ff36cbe` getnetworkinfo: export local node's client sub-version string
+- `d14d7de` SanitizeString: allow '(' and ')'
+- `31d6390` Fixed setaccount accepting foreign address
+- `b5ec5fe` update getnetworkinfo help with subversion
+- `ad6e601` RPC additions after headers-first
+- `33dfbf5` rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`
+- `2aa6329` Enable customising node policy for datacarrier data size with a -datacarriersize option
+- `f877aaa` submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock
+- `e69a587` submitblock: Support for returning specific rejection reasons
+- `af82884` Add "warmup mode" for RPC server
+- `e2655e0` Add unauthenticated HTTP REST interface to public blockchain data
+- `683dc40` Disable SSLv3 (in favor of TLS) for the RPC client and server
+- `44b4c0d` signrawtransaction: validate private key
+- `9765a50` Implement BIP 23 Block Proposal
+- `f9de17e` Add warning comment to getinfo
+
+Command-line options:
+- `ee21912` Use netmasks instead of wildcards for IP address matching
+- `deb3572` Add `-rpcbind` option to allow binding RPC port on a specific interface
+- `96b733e` Add `-version` option to get just the version
+- `1569353` Add `-stopafterblockimport` option
+- `77cbd46` Let -zapwallettxes recover transaction meta data
+- `1c750db` remove -tor compatibility code (only allow -onion)
+- `4aaa017` rework help messages for fee-related options
+- `4278b1d` Clarify error message when invalid -rpcallowip
+- `6b407e4` -datadir is now allowed in config files
+- `bdd5b58` Add option `-sysperms` to disable 077 umask (create new files with system default umask)
+- `cbe39a3` Add "bitcoin-tx" command line utility and supporting modules
+- `dbca89b` Trigger -alertnotify if network is upgrading without you
+- `ad96e7c` Make -reindex cope with out-of-order blocks
+- `16d5194` Skip reindexed blocks individually
+- `ec01243` --tracerpc option for regression tests
+- `f654f00` Change -genproclimit default to 1
+- `3c77714` Make -proxy set all network types, avoiding a connect leak
+- `57be955` Remove -printblock, -printblocktree, and -printblockindex
+- `ad3d208` remove -maxorphanblocks config parameter since it is no longer functional
+
+Block and transaction handling:
+- `7a0e84d` ProcessGetData(): abort if a block file is missing from disk
+- `8c93bf4` LoadBlockIndexDB(): Require block db reindex if any `blk*.dat` files are missing
+- `77339e5` Get rid of the static chainMostWork (optimization)
+- `4e0eed8` Allow ActivateBestChain to release its lock on cs_main
+- `18e7216` Push cs_mains down in ProcessBlock
+- `fa126ef` Avoid undefined behavior using CFlatData in CScript serialization
+- `7f3b4e9` Relax IsStandard rules for pay-to-script-hash transactions
+- `c9a0918` Add a skiplist to the CBlockIndex structure
+- `bc42503` Use unordered_map for CCoinsViewCache with salted hash (optimization)
+- `d4d3fbd` Do not flush the cache after every block outside of IBD (optimization)
+- `ad08d0b` Bugfix: make CCoinsViewMemPool support pruned entries in underlying cache
+- `5734d4d` Only remove actualy failed blocks from setBlockIndexValid
+- `d70bc52` Rework block processing benchmark code
+- `714a3e6` Only keep setBlockIndexValid entries that are possible improvements
+- `ea100c7` Reduce maximum coinscache size during verification (reduce memory usage)
+- `4fad8e6` Reject transactions with excessive numbers of sigops
+- `b0875eb` Allow BatchWrite to destroy its input, reducing copying (optimization)
+- `92bb6f2` Bypass reloading blocks from disk (optimization)
+- `2e28031` Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (reduce memory usage)
+- `ab15b2e` Avoid copying undo data (optimization)
+- `341735e` Headers-first synchronization
+- `afc32c5` Fix rebuild-chainstate feature and improve its performance
+- `e11b2ce` Fix large reorgs
+- `ed6d1a2` Keep information about all block files in memory
+- `a48f2d6` Abstract context-dependent block checking from acceptance
+- `7e615f5` Fixed mempool sync after sending a transaction
+- `51ce901` Improve chainstate/blockindex disk writing policy
+- `a206950` Introduce separate flushing modes
+- `9ec75c5` Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true
+- `868d041` Remove coinbase-dependant transactions during reorg
+- `723d12c` Remove txn which are invalidated by coinbase maturity during reorg
+- `0cb8763` Check against MANDATORY flags prior to accepting to mempool
+- `8446262` Reject headers that build on an invalid parent
+
+P2P protocol and network code:
+- `f80cffa` Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails
+- `c30329a` Add testnet DNS seed of Alex Kotenko
+- `45a4baf` Add testnet DNS seed of Andreas Schildbach
+- `f1920e8` Ping automatically every 2 minutes (unconditionally)
+- `806fd19` Allocate receive buffers in on the fly
+- `6ecf3ed` Display unknown commands received
+- `aa81564` Track peers' available blocks
+- `caf6150` Use async name resolving to improve net thread responsiveness
+- `9f4da19` Use pong receive time rather than processing time
+- `0127a9b` remove SOCKS4 support from core and GUI, use SOCKS5
+- `40f5cb8` Send rejects and apply DoS scoring for errors in direct block validation
+- `dc942e6` Introduce whitelisted peers
+- `c994d2e` prevent SOCKET leak in BindListenPort()
+- `a60120e` Add built-in seeds for .onion
+- `60dc8e4` Allow -onlynet=onion to be used
+- `3a56de7` addrman: Do not propagate obviously poor addresses onto the network
+- `6050ab6` netbase: Make SOCKS5 negotiation interruptible
+- `604ee2a` Remove tx from AlreadyAskedFor list once we receive it, not when we process it
+- `efad808` Avoid reject message feedback loops
+- `71697f9` Separate protocol versioning from clientversion
+- `20a5f61` Don't relay alerts to peers before version negotiation
+- `b4ee0bd` Introduce preferred download peers
+- `845c86d` Do not use third party services for IP detection
+- `12a49ca` Limit the number of new addressses to accumulate
+- `35e408f` Regard connection failures as attempt for addrman
+
+Validation:
+- `6fd7ef2` Also switch the (unused) verification code to low-s instead of even-s
+- `584a358` Do merkle root and txid duplicates check simultaneously
+- `217a5c9` When transaction outputs exceed inputs, show the offending amounts so as to aid debugging
+- `f74fc9b` Print input index when signature validation fails, to aid debugging
+- `6fd59ee` script.h: set_vch() should shift a >32 bit value
+- `d752ba8` Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) (test only)
+- `698c6ab` Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4) (test only)
+- `ab9edbd` script: create sane error return codes for script validation and remove logging
+- `219a147` script: check ScriptError values in script tests
+- `0391423` Discourage NOPs reserved for soft-fork upgrades
+- `98b135f` Make STRICTENC invalid pubkeys fail the script rather than the opcode
+- `307f7d4` Report script evaluation failures in log and reject messages
+
+Build system:
+- `f25e3ad` Fix build in OS X 10.9
+- `65e8ba4` build: Switch to non-recursive make
+- `460b32d` build: fix broken boost chrono check on some platforms
+- `9ce0774` build: Fix windows configure when using --with-qt-libdir
+- `ea96475` build: Add mention of --disable-wallet to bdb48 error messages
+- `1dec09b` depends: add shared dependency builder
+- `c101c76` build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes). Help string consistency tweaks. Target sanity check fix
+- `e432a5f` build: add option for reducing exports (v2)
+- `6134b43` Fixing condition 'sabotaging' MSVC build
+- `af0bd5e` osx: fix signing to make Gatekeeper happy (again)
+- `a7d1f03` build: fix dynamic boost check when --with-boost= is used
+- `d5fd094` build: fix qt test build when libprotobuf is in a non-standard path
+- `2cf5f16` Add libbitcoinconsensus library
+- `914868a` build: add a deterministic dmg signer 
+
+Wallet:
+- `b33d1f5` Use fee/priority estimates in wallet CreateTransaction
+- `4b7b1bb` Sanity checks for estimates
+- `c898846` Add support for watch-only addresses
+- `d5087d1` Use script matching rather than destination matching for watch-only
+- `d88af56` Fee fixes
+- `a35b55b` Dont run full check every time we decrypt wallet
+- `3a7c348` Fix make_change to not create half-satoshis
+- `f606bb9` fix a possible memory leak in CWalletDB::Recover
+- `870da77` fix possible memory leaks in CWallet::EncryptWallet
+- `ccca27a` Watch-only fixes
+- `9b1627d` [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis
+- `a53fd41` Deterministic signing
+- `15ad0b5` Apply AreSane() checks to the fees from the network
+- `11855c1` Enforce minRelayTxFee on wallet created tx and add a maxtxfee option
+
+GUI:
+- `c21c74b` osx: Fix missing dock menu with qt5
+- `b90711c` Fix Transaction details shows wrong To:
+- `516053c` Make links in 'About Bitcoin Core' clickable
+- `bdc83e8` Ensure payment request network matches client network
+- `65f78a1` Add GUI view of peer information
+- `06a91d9` VerifyDB progress reporting
+- `fe6bff2` Add BerkeleyDB version info to RPCConsole
+- `b917555` PeerTableModel: Fix potential deadlock. #4296
+- `dff0e3b` Improve rpc console history behavior
+- `95a9383` Remove CENT-fee-rule from coin control completely
+- `56b07d2` Allow setting listen via GUI
+- `d95ba75` Log messages with type>QtDebugMsg as non-debug
+- `8969828` New status bar Unit Display Control and related changes
+- `674c070` seed OpenSSL PNRG with Windows event data
+- `509f926` Payment request parsing on startup now only changes network if a valid network name is specified
+- `acd432b` Prevent balloon-spam after rescan
+- `7007402` Implement SI-style (thin space) thoudands separator
+- `91cce17` Use fixed-point arithmetic in amount spinbox
+- `bdba2dd` Remove an obscure option no-one cares about
+- `bd0aa10` Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution
+- `94e1b9e` Re-work overviewpage UI
+- `8bfdc9a` Better looking trayicon
+- `b197bf3` disable tray interactions when client model set to 0
+- `1c5f0af` Add column Watch-only to transactions list
+- `21f139b` Fix tablet crash. closes #4854
+- `e84843c` Broken addresses on command line no longer trigger testnet
+- `a49f11d` Change splash screen to normal window
+- `1f9be98` Disable App Nap on OSX 10.9+
+- `27c3e91` Add proxy to options overridden if necessary
+- `4bd1185` Allow "emergency" shutdown during startup
+- `d52f072` Don't show wallet options in the preferences menu when running with -disablewallet
+- `6093aa1` Qt: QProgressBar CPU-Issue workaround
+- `0ed9675` [Wallet] Add global boolean whether to send free transactions (default=true)
+- `ed3e5e4` [Wallet] Add global boolean whether to pay at least the custom fee (default=true)
+- `e7876b2` [Wallet] Prevent user from paying a non-sense fee
+- `c1c9d5b` Add Smartfee to GUI
+- `e0a25c5` Make askpassphrase dialog behave more sanely
+
+Tests:
+- `b41e594` Fix script test handling of empty scripts
+- `d3a33fc` Test CHECKMULTISIG with m == 0 and n == 0
+- `29c1749` Let tx (in)valid tests use any SCRIPT_VERIFY flag
+- `6380180` Add rejection of non-null CHECKMULTISIG dummy values
+- `21bf3d2` Add tests for BoostAsioToCNetAddr
+- `b5ad5e7` Add Python test for -rpcbind and -rpcallowip
+- `9ec0306` Add CODESEPARATOR/FindAndDelete() tests
+- `75ebced` Added many rpc wallet tests
+- `0193fb8` Allow multiple regression tests to run at once
+- `92a6220` Hook up sanity checks
+- `3820e01` Extend and move all crypto tests to crypto_tests.cpp
+- `3f9a019` added list/get received by address/ account tests
+- `a90689f` Remove timing-based signature cache unit test
+- `236982c` Add skiplist unit tests
+- `f4b00be` Add CChain::GetLocator() unit test
+- `b45a6e8` Add test for getblocktemplate longpolling
+- `cdf305e` Set -discover=0 in regtest framework
+- `ed02282` additional test for OP_SIZE in script_valid.json
+- `0072d98` script tests: BOOLAND, BOOLOR decode to integer
+- `833ff16` script tests: values that overflow to 0 are true
+- `4cac5db` script tests: value with trailing 0x00 is true
+- `89101c6` script test: test case for 5-byte bools
+- `d2d9dc0` script tests: add tests for CHECKMULTISIG limits
+- `d789386` Add "it works" test for bitcoin-tx
+- `df4d61e` Add bitcoin-tx tests
+- `aa41ac2` Test IsPushOnly() with invalid push
+- `6022b5d` Make `script_{valid,invalid}.json` validation flags configurable
+- `8138cbe` Add automatic script test generation, and actual checksig tests
+- `ed27e53` Add coins_tests with a large randomized CCoinViewCache test
+- `9df9cf5` Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
+- `dcb9846` Extend getchaintips RPC test
+- `554147a` Ensure MINIMALDATA invalid tests can only fail one way
+- `dfeec18` Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule
+- `2b62e17` Clearly separate PUSHDATA and numeric argument MINIMALDATA tests
+- `16d78bd` Add valid invert of invalid every numeric opcode tests
+- `f635269` tests: enable alertnotify test for Windows
+- `7a41614` tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment
+- `5122ea7` tests: fix forknotify.py on windows
+- `fa7f8cd` tests: remove old pull-tester scripts
+- `7667850` tests: replace the old (unused since Travis) tests with new rpc test scripts
+- `f4e0aef` Do signature-s negation inside the tests
+- `1837987` Optimize -regtest setgenerate block generation
+- `2db4c8a` Fix node ranges in the test framework
+- `a8b2ce5` regression test only setmocktime RPC call
+- `daf03e7` RPC tests: create initial chain with specific timestamps
+- `8656dbb` Port/fix txnmall.sh regression test
+- `ca81587` Test the exact order of CHECKMULTISIG sig/pubkey evaluation
+- `7357893` Prioritize and display -testsafemode status in UI
+- `f321d6b` Add key generation/verification to ECC sanity check
+- `132ea9b` miner_tests: Disable checkpoints so they don't fail the subsidy-change test
+- `bc6cb41` QA RPC tests: Add tests block block proposals
+- `f67a9ce` Use deterministically generated script tests
+- `11d7a7d` [RPC] add rpc-test for http keep-alive (persistent connections)
+- `34318d7` RPC-test based on invalidateblock for mempool coinbase spends
+- `76ec867` Use actually valid transactions for script tests
+- `c8589bf` Add actual signature tests
+
+Miscellaneous:
+- `122549f` Fix incorrect checkpoint data for testnet3
+- `5bd02cf` Log used config file to debug.log on startup
+- `68ba85f` Updated Debian example bitcoin.conf with config from wiki + removed some cruft and updated comments
+- `e5ee8f0` Remove -beta suffix
+- `38405ac` Add comment regarding experimental-use service bits
+- `be873f6` Issue warning if collecting RandSeed data failed
+- `8ae973c` Allocate more space if necessary in RandSeedAddPerfMon
+- `675bcd5` Correct comment for 15-of-15 p2sh script size
+- `fda3fed` libsecp256k1 integration
+- `2e36866` Show nodeid instead of addresses in log (for anonymity) unless otherwise requested
+- `cd01a5e` Enable paranoid corruption checks in LevelDB >= 1.16
+- `9365937` Add comment about never updating nTimeOffset past 199 samples
+- `403c1bf` contrib: remove getwork-based pyminer (as getwork API call has been removed)
+- `0c3e101` contrib: Added systemd .service file in order to help distributions integrate bitcoind
+- `0a0878d` doc: Add new DNSseed policy
+- `2887bff` Update coding style and add .clang-format
+- `5cbda4f` Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope
+- `b4a72a7` contrib/linearize: split output files based on new-timestamp-year or max-file-size
+- `e982b57` Use explicit fflush() instead of setvbuf()
+- `234bfbf` contrib: Add init scripts and docs for Upstart and OpenRC
+- `01c2807` Add warning about the merkle-tree algorithm duplicate txid flaw
+- `d6712db` Also create pid file in non-daemon mode
+- `772ab0e` contrib: use batched JSON-RPC in linarize-hashes (optimization)
+- `7ab4358` Update bash-completion for v0.10
+- `6e6a36c` contrib: show pull # in prompt for github-merge script
+
+Credits
+--------
+
+Thanks to everyone who contributed to this release:
+
+- 21E14
+- Adam Weiss
+- Aitor Pazos
+- Alexander Jeng
+- Alex Morcos
+- Alon Muroch
+- Andreas Schildbach
+- Andrew Poelstra
+- Andy Alness
+- Ashley Holman
+- Benedict Chan
+- Ben Holden-Crowther
+- Bryan Bishop
+- BtcDrak
+- Christian von Roques
+- Clinton Christian
+- Cory Fields
+- Cozz Lovan
+- daniel
+- Daniel Kraft
+- David Hill
+- Derek701
+- dexX7
+- dllud
+- Dominyk Tiller
+- Doug
+- elichai
+- elkingtowa
+- ENikS
+- Eric Shaw
+- Federico Bond
+- Francis GASCHET
+- Gavin Andresen
+- Giuseppe Mazzotta
+- Glenn Willen
+- Gregory Maxwell
+- gubatron
+- HarryWu
+- himynameismartin
+- Huang Le
+- Ian Carroll
+- imharrywu
+- Jameson Lopp
+- Janusz Lenar
+- JaSK
+- Jeff Garzik
+- JL2035
+- Johnathan Corgan
+- Jonas Schnelli
+- jtimon
+- Julian Haight
+- Kamil Domanski
+- kazcw
+- kevin
+- kiwigb
+- Kosta Zertsekel
+- LongShao007
+- Luke Dashjr
+- Mark Friedenbach
+- Mathy Vanvoorden
+- Matt Corallo
+- Matthew Bogosian
+- Micha
+- Michael Ford
+- Mike Hearn
+- mrbandrews
+- mruddy
+- ntrgn
+- Otto Allmendinger
+- paveljanik
+- Pavel Vasin
+- Peter Todd
+- phantomcircuit
+- Philip Kaufmann
+- Pieter Wuille
+- pryds
+- randy-waterhouse
+- R E Broadley
+- Rose Toomey
+- Ross Nicoll
+- Roy Badami
+- Ruben Dario Ponticelli
+- Rune K. Svendsen
+- Ryan X. Charles
+- Saivann
+- sandakersmann
+- SergioDemianLerner
+- shshshsh
+- sinetek
+- Stuart Cardall
+- Suhas Daftuar
+- Tawanda Kembo
+- Teran McKinney
+- tm314159
+- Tom Harding
+- Trevin Hofmann
+- Whit J
+- Wladimir J. van der Laan
+- Yoichi Hirai
+- Zak Wilcox
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
+

From 13e129ed9ab3596bd46f8506af3277cc22aa0bec Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 23 Dec 2014 18:11:45 +0100
Subject: [PATCH 1202/1819] =?UTF-8?q?CLIENT=5FVERSION=5FIS=5FRELEASE=20?=
 =?UTF-8?q?=E2=86=92=20true?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 25c81ccfb442..c8149570b82c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 10)
 define(_CLIENT_VERSION_REVISION, 0)
 define(_CLIENT_VERSION_BUILD, 0)
-define(_CLIENT_VERSION_IS_RELEASE, false)
+define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2014)
 AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
 AC_CONFIG_SRCDIR([src/main.cpp])
diff --git a/src/clientversion.h b/src/clientversion.h
index ff979c6cb465..ba3035aed475 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -20,7 +20,7 @@
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build
-#define CLIENT_VERSION_IS_RELEASE false
+#define CLIENT_VERSION_IS_RELEASE true
 
 /**
  * Copyright year (2009-this)

From 343492795af9b59cc03650bd8d45bb813f6b96ec Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 23 Dec 2014 18:19:54 +0100
Subject: [PATCH 1203/1819] doc: add section about watch-only addresses to
 release notes

---
 doc/release-notes.md | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 91c69b29a298..0a59d27a6943 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -148,6 +148,31 @@ than the implementation in OpenSSL.
 
 [1] https://eprint.iacr.org/2014/161.pdf
 
+Watch-only addresses in the wallet
+==================================
+
+The wallet can now track transactions to addresses (or scripts) for which you
+do not have the private keys.
+
+This can be used to track payments without needing the private keys online on a
+possibly vulnerable system. In addition, it can help for (manual) construction
+of multisig transactions where you are only one of the signers.
+
+One new RPC, `importaddress`, is added which functions similarly to
+`importprivkey`, but instead takes an address or script (in hexadecimal) as
+argument.  After using it, outputs credited to this address or script are
+considered to be yours.
+
+The following RPCs have optional support for watch-only addresses:
+`getbalance`, `listreceivedbyaddress`, `listreceivedbyaccount`,
+`listtransactions`, `listaccounts`, `listsinceblock`, `gettransaction`. See the
+RPC documentation for those methods for more information.
+
+Compared to using `getrawtransaction`, this mechanism does not require
+`-txindex`, scales better, integrates better with the wallet, and is compatible
+with future block chain pruning functionality. It does mean the address needs
+to added to the wallet before the payment, though.
+
 0.10.0 Release notes
 =======================
 

From a2300499b76e1a3654241f871ab53d5f6b95308e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 23 Dec 2014 19:08:06 +0100
Subject: [PATCH 1204/1819] doc: mention consensus library in release notes

---
 doc/release-notes.md | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 0a59d27a6943..803bb33e6bfb 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -173,6 +173,28 @@ Compared to using `getrawtransaction`, this mechanism does not require
 with future block chain pruning functionality. It does mean the address needs
 to added to the wallet before the payment, though.
 
+Consensus library
+=================
+
+Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library.
+
+The purpose of this library is to make the verification functionality that is
+critical to Bitcoin's consensus available to other applications, e.g. to language
+bindings such as [python_bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or
+alternative node implementations.
+
+This library is called `libbitcoinconsensus.so` (or, `.dll` for Windows).
+Its interface is defined in the C header [bitcoinconsensus.h](https://github.com/bitcoin/bitcoin/blob/0.10/src/script/bitcoinconsensus.h).
+
+In its initial version the API includes two functions:
+
+- `bitcoinconsensus_verify_script` verifies a script. It returns whether the indicated input of the provided serialized transaction 
+correctly spends the passed scriptPubKey under additional constraints indicated by flags
+- `bitcoinconsensus_version` returns the API version, currently at an experimental `0`
+
+The functionality is planned to be extended to e.g. UTXO management in upcoming releases, but the interface
+for existing methods should remain stable.
+
 0.10.0 Release notes
 =======================
 

From 2bb0ca9b5549e6612a71e9a046b3a973bc346195 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Tue, 23 Dec 2014 19:31:02 +0100
Subject: [PATCH 1205/1819] doc: mention P2SH IsStandard relaxation in release
 notes

---
 doc/release-notes.md | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 803bb33e6bfb..e1998c6bdfad 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -195,6 +195,17 @@ correctly spends the passed scriptPubKey under additional constraints indicated
 The functionality is planned to be extended to e.g. UTXO management in upcoming releases, but the interface
 for existing methods should remain stable.
 
+Standard script rules relaxed for P2SH addresses
+================================================
+
+The IsStandard() rules have been almost completely removed for P2SH
+redemption scripts, allowing applications to make use of any valid
+script type, such as "n-of-m OR y", hash-locked oracle addresses, etc.
+While the Bitcoin protocol has always supported these types of script,
+actually using them on mainnet has been previously inconvenient as
+standard Bitcoin Core nodes wouldn't relay them to miners, nor would
+most miners include them in blocks they mined.
+
 0.10.0 Release notes
 =======================
 

From 4e0bfa581438a662147fe4459522b308406d7f57 Mon Sep 17 00:00:00 2001
From: Jeff Garzik <jgarzik@bitpay.com>
Date: Tue, 23 Dec 2014 20:14:37 +0100
Subject: [PATCH 1206/1819] doc: add bitcoin-tx section to release notes

---
 doc/release-notes.md | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index e1998c6bdfad..da7724347212 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -206,6 +206,30 @@ actually using them on mainnet has been previously inconvenient as
 standard Bitcoin Core nodes wouldn't relay them to miners, nor would
 most miners include them in blocks they mined.
 
+bitcoin-tx
+=============
+
+It has been observed that many of the RPC functions offered by bitcoind are
+"pure functions", and operate independently of the bitcoind wallet. This
+included many of the RPC "raw transaction" API functions, such as
+createrawtransaction.
+
+bitcoin-tx is a newly introduced command line utility designed to enable easy
+manipulation of bitcoin transactions. A summary of its operation may be
+obtained via "bitcoin-tx --help" Transactions may be created or signed in a
+manner similar to the RPC raw tx API. Transactions may be updated, deleting
+inputs or outputs, or appending new inputs and outputs. Custom scripts may be
+easily composed using a simple text notation, borrowed from the bitcoin test
+suite.
+
+This tool may be used for experimenting with new transaction types, signing
+multi-party transactions, and many other uses. Long term, the goal is to
+deprecate and remove "pure function" RPC API calls, as those do not require a
+server round-trip to execute.
+
+Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
+key and script operations easily accessible via command line.
+
 0.10.0 Release notes
 =======================
 

From 06ca0651b626eb6e500835e7d3cab9b3e43f3e38 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Thu, 25 Dec 2014 03:12:17 -0500
Subject: [PATCH 1207/1819] Fix CScriptID(const CScript& in) in empty script
 case

Previously an empty script wouldn't be hashed, and CScriptID would be
assigned the incorrect value of 0 instead. This bug can be seen in the
RPC decodescript command:

    $ btc decodescript ""
    {
        "asm" : "",
        "type" : "nonstandard",
        "p2sh" : "31h1vYVSYuKP6AhS86fbRdMw9XHieotbST"
    }

Correct output:

    $ btc decodescript ""
    {
        "asm" : "",
        "type" : "nonstandard",
        "p2sh" : "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
    }

Rebased-From: d78f0dafd520f481f909cca7e361a4e482cbea72
Github-Pull: #5541
---
 src/script/standard.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index ab6e6cde0deb..6e2c465c865e 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -18,7 +18,7 @@ typedef vector<unsigned char> valtype;
 
 unsigned nMaxDatacarrierBytes = MAX_OP_RETURN_RELAY;
 
-CScriptID::CScriptID(const CScript& in) : uint160(in.size() ? Hash160(in.begin(), in.end()) : 0) {}
+CScriptID::CScriptID(const CScript& in) : uint160(Hash160(in.begin(), in.end())) {}
 
 const char* GetTxnOutputType(txnouttype t)
 {

From b3d67e1c34aa65a6d4587e3aa1b533b333efaeb4 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 23 Dec 2014 19:42:40 -0500
Subject: [PATCH 1208/1819] gitian: attempt to fix tarball determinisim

Rebased-From: 566c6cb8a2a277d9c5e4897ad02c5bb15786523c
Github-Pull: #5536
---
 contrib/gitian-descriptors/gitian-linux.yml | 4 ++--
 contrib/gitian-descriptors/gitian-osx.yml   | 6 +++---
 contrib/gitian-descriptors/gitian-win.yml   | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index bba2104edb7a..28bd9211acd6 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -79,7 +79,7 @@ script: |
   mkdir -p temp
   pushd temp
   tar xf ../$SOURCEDIST
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -99,7 +99,7 @@ script: |
     find . -name "lib*.la" -delete
     find . -name "lib*.a" -delete
     rm -rf ${DISTNAME}/lib/pkgconfig
-    find . | sort | tar --no-recursion -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
     cd ../../
   done
   mkdir -p $OUTDIR/src
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index eb6df2096eb1..4f05aad23354 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -90,7 +90,7 @@ script: |
   mkdir -p temp
   pushd temp
   tar xf ../$SOURCEDIST
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -116,7 +116,7 @@ script: |
     cp ${BASEPREFIX}/${i}/native/bin/${i}-pagestuff unsigned-app-${i}/pagestuff
     mv dist unsigned-app-${i}
     pushd unsigned-app-${i}
-    find . | sort | tar --no-recursion -czf ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz -T -
+    find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz
     popd
 
     make deploy
@@ -126,7 +126,7 @@ script: |
     find . -name "lib*.la" -delete
     find . -name "lib*.a" -delete
     rm -rf ${DISTNAME}/lib/pkgconfig
-    find . | sort | tar --no-recursion -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
     cd ../../
   done
   mkdir -p $OUTDIR/src
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 97c823cde694..4baa08c88da5 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -83,7 +83,7 @@ script: |
   mkdir -p temp
   pushd temp
   tar xf ../$SOURCEDIST
-  find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$SOURCEDIST
+  find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"

From 52e57055cce3adedd72ad2dc9446c7c2858c3b72 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 23 Dec 2014 22:02:16 +0000
Subject: [PATCH 1209/1819] en: Avoid ambiguous language regarding when
 transactions confirm

Rebased-From: a15dba5dff1229b67ff44bf16ff14063e885f376
Github-Pull: #5533
---
 src/init.cpp      | 2 +-
 src/rpcmining.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 3cdd42e2be33..4374d60fe5fa 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -286,7 +286,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -salvagewallet         " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -sendfreetransactions  " + strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0) + "\n";
     strUsage += "  -spendzeroconfchange   " + strprintf(_("Spend unconfirmed change when sending transactions (default: %u)"), 1) + "\n";
-    strUsage += "  -txconfirmtarget=<n>   " + strprintf(_("If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)"), 1) + "\n";
+    strUsage += "  -txconfirmtarget=<n>   " + strprintf(_("If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)"), 1) + "\n";
     strUsage += "  -maxtxfee=<amt>        " + strprintf(_("Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)"), FormatMoney(maxTxFee)) + "\n";
     strUsage += "  -upgradewallet         " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>         " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 45899d3db533..b406106ff281 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -674,7 +674,7 @@ Value estimatefee(const Array& params, bool fHelp)
         throw runtime_error(
             "estimatefee nblocks\n"
             "\nEstimates the approximate fee per kilobyte\n"
-            "needed for a transaction to get confirmed\n"
+            "needed for a transaction to begin confirmation\n"
             "within nblocks blocks.\n"
             "\nArguments:\n"
             "1. nblocks     (numeric)\n"
@@ -706,7 +706,7 @@ Value estimatepriority(const Array& params, bool fHelp)
         throw runtime_error(
             "estimatepriority nblocks\n"
             "\nEstimates the approximate priority\n"
-            "a zero-fee transaction needs to get confirmed\n"
+            "a zero-fee transaction needs to begin confirmation\n"
             "within nblocks blocks.\n"
             "\nArguments:\n"
             "1. nblocks     (numeric)\n"

From 591c5692f8dd166daf2f1e4f659c6a1cf1db8813 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 24 Dec 2014 17:39:53 +0100
Subject: [PATCH 1210/1819] Release notes: formatting, headers-first, rest

---
 doc/release-notes.md | 85 +++++++++++++++++++++++++++++++++-----------
 1 file changed, 64 insertions(+), 21 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index da7724347212..3df7b3a8e069 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -10,7 +10,7 @@ Please report bugs using the issue tracker at github:
   https://github.com/bitcoin/bitcoin/issues
 
 Upgrading and downgrading
-==========================
+=========================
 
 How to Upgrade
 --------------
@@ -28,8 +28,8 @@ Downgrading warning
 ---------------------
 
 Because release 0.10.0 makes use of headers-first synchronization and parallel
-block download, the block files and databases are not backwards-compatible
-with older versions of Bitcoin Core:
+block download (see further), the block files and databases are not
+backwards-compatible with older versions of Bitcoin Core:
 
 * Blocks will be stored on disk out of order (in the order they are
 received, really), which makes it incompatible with some tools or
@@ -45,8 +45,37 @@ bootstrap.dat) anew afterwards.
 
 This does not affect wallet forward or backward compatibility.
 
+
+Notable changes
+===============
+
+Faster synchronization
+----------------------
+
+Bitcoin Core now uses 'headers-first synchronization'. This means that we first
+ask peers for block headers (a total of 27 megabytes, as of December 2014) and
+validate those. In a second stage, when the headers have been discovered, we
+download the blocks. However, as we already know about the whole chain in
+advance, the blocks can be downloaded in parallel from all available peers.
+
+In practice, this means a much faster and more robust synchronization. On
+recent hardware with a decent network link, it can be as little as 3 hours
+for an initial full synchronization. You may notice a slower progress in the
+very first few minutes, when headers are still being fetched and verified, but
+it should gain speed afterwards.
+
+A few RPCs were added/updated as a result of this:
+- `getblockchaininfo` now returns the number of validated headers in addition to
+the number of validated blocks.
+- `getpeerinfo` lists both the number of blocks and headers we know we have in
+common with each peer. While synchronizing, the heights of the blocks that we
+have requested from peers (but haven't received yet) are also listed as
+'inflight'.
+- A new RPC `getchaintips` lists all known branches of the block chain,
+including those we only have headers for.
+
 Transaction fee changes
-=======================
+-----------------------
 
 This release automatically estimates how high a transaction fee (or how
 high a priority) transactions require to be confirmed quickly. The default
@@ -61,27 +90,22 @@ Statistics used to estimate fees and priorities are saved in the
 data directory in the `fee_estimates.dat` file just before
 program shutdown, and are read in at startup.
 
-New Command Line Options
----------------------------
-
+New command line options for fee estimation:
 - `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
 so they are likely to confirm within n blocks (default: 1). This setting
 is over-ridden by the -paytxfee option.
 
-New RPC methods
-----------------
-
+New RPC commands for fee estimation:
 - `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
 a transaction to be confirmed within nblocks. Returns -1 if not enough
 transactions have been observed to compute a good estimate.
-
 - `estimatepriority nblocks` : Returns approximate priority needed for
 a zero-fee transaction to confirm within nblocks. Returns -1 if not
 enough free transactions have been observed to compute a good
 estimate.
 
 RPC access control changes
-==========================================
+--------------------------
 
 Subnet matching for the purpose of access control is now done
 by matching the binary network address, instead of with string wildcard matching.
@@ -107,8 +131,27 @@ Using wildcards will result in the rule being rejected with the following error
 
     Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).
 
+
+REST interface
+--------------
+
+A new HTTP API is exposed when running with the `-rest` flag, which allows
+unauthenticated access to public node data.
+
+It is served on the same port as RPC, but does not need a password, and uses
+plain HTTP instead of JSON-RPC.
+
+Assuming a local RPC server running on port 8332, it is possible to request:
+- Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
+- Blocks without transactions: http://localhost:8332/block/notxdetails/*HASH*.*EXT*
+- Transactions (requires `-txindex`): http://localhost:8332/tx/*HASH*.*EXT*
+
+In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded binary) or `json`.
+
+For more details, see the `doc/REST-interface.md` document in the repository.
+
 RPC Server "Warm-Up" Mode
-=========================
+-------------------------
 
 The RPC server is started earlier now, before most of the expensive
 intialisations like loading the block index.  It is available now almost
@@ -120,7 +163,7 @@ started and will be available soon (for instance, so that they do not
 have to start it themselves).
 
 Improved signing security
-=========================
+-------------------------
 
 For 0.10 the security of signing against unusual attacks has been
 improved by making the signatures constant time and deterministic.
@@ -149,7 +192,7 @@ than the implementation in OpenSSL.
 [1] https://eprint.iacr.org/2014/161.pdf
 
 Watch-only addresses in the wallet
-==================================
+----------------------------------
 
 The wallet can now track transactions to addresses (or scripts) for which you
 do not have the private keys.
@@ -174,7 +217,7 @@ with future block chain pruning functionality. It does mean the address needs
 to added to the wallet before the payment, though.
 
 Consensus library
-=================
+-----------------
 
 Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library.
 
@@ -196,7 +239,7 @@ The functionality is planned to be extended to e.g. UTXO management in upcoming
 for existing methods should remain stable.
 
 Standard script rules relaxed for P2SH addresses
-================================================
+------------------------------------------------
 
 The IsStandard() rules have been almost completely removed for P2SH
 redemption scripts, allowing applications to make use of any valid
@@ -207,7 +250,7 @@ standard Bitcoin Core nodes wouldn't relay them to miners, nor would
 most miners include them in blocks they mined.
 
 bitcoin-tx
-=============
+----------
 
 It has been observed that many of the RPC functions offered by bitcoind are
 "pure functions", and operate independently of the bitcoind wallet. This
@@ -230,8 +273,8 @@ server round-trip to execute.
 Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
 key and script operations easily accessible via command line.
 
-0.10.0 Release notes
-=======================
+0.10.0 Change log
+=================
 
 Detailed release notes follow. This overview includes changes that affect external
 behavior, not code moves, refactors or string updates.
@@ -534,7 +577,7 @@ Miscellaneous:
 - `6e6a36c` contrib: show pull # in prompt for github-merge script
 
 Credits
---------
+=======
 
 Thanks to everyone who contributed to this release:
 

From ed934bdb4dab0b765ce5d16cb5182ecee5fade0b Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sun, 28 Dec 2014 12:21:17 +0100
Subject: [PATCH 1211/1819] pull new translations from transifex

---
 src/qt/locale/bitcoin_es.ts |  10 +-
 src/qt/locale/bitcoin_it.ts |  58 ++++++++++-
 src/qt/locale/bitcoin_nl.ts | 190 +++++++++++++++++++++++++++++++++---
 src/qt/locale/bitcoin_uk.ts |   6 +-
 4 files changed, 244 insertions(+), 20 deletions(-)

diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index a2bd4e8e89cd..aa008ad18c4c 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -3,7 +3,7 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Haga doble clic para editar la etiqueta o dirección </translation>
+        <translation>Haga doble clic para editar la dirección o etiqueta </translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -3106,6 +3106,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: Argumento encontrado -tor no soportado, utilice -onion</translation>
+    </message>
     <message>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Cuota (in BTC/kB) para añadir a las transacciones que envíes (por defecto: %s)</translation>
@@ -3174,6 +3178,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Mandar transacciones como comisión-cero si es posible (por defecto: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Muestra todas las opciones de depuración (uso: --help -help-debug)</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index cc85dfe22711..60ffe6df155c 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -3,7 +3,7 @@
     <name>AddressBookPage</name>
     <message>
         <source>Double-click to edit address or label</source>
-        <translation>Doppio click per modificare l'indirizzo o l'etichetta</translation>
+        <translation>Fai doppio click per modificare o cancellare l'etichetta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1859,6 +1859,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
         <translation>Pagando solo la tariffa minima è bene finché c'è meno volume di transazioni di spazio nei blocchi. Ma essere consapevoli che questo può finire in una transazione non confermando ancora una volta non vi è più richiesta per le transazioni Bitcoin di rete in grado di elaborare.</translation>
     </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(leggi il suggerimento)</translation>
+    </message>
     <message>
         <source>Recommended:</source>
         <translation>Raccomandati:</translation>
@@ -1883,6 +1887,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Send as zero-fee transaction if possible</source>
         <translation>Invia una transazione a zero commissioni se possibile</translation>
     </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(la conferma potrebbe richiedere più tempo)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Invia a diversi beneficiari in una volta sola</translation>
@@ -2789,6 +2797,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
         <translation>Elimina tutte le transazioni dal wallet e recupera solo le parti della blockchain con il comando -rescan all'avvio.</translation>
     </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuito secondo la licenza software MIT, vedi il file incluso COPYNG oppure &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi possono essere risolti istantaneamente.</translation>
@@ -2841,6 +2853,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Attenzione: wallet.dat corrotto, dati recuperati! Il wallet.dat originale è stato salvato come wallet.{timestamp}.bak in %s; se il tuo saldo o le transazioni non sono corrette dovresti ripristinare da un backup.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Peer in whitelist connessi dalla data netmask oppure dall'indirizzo IP. Può essere specificato più volte.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(predefinito: 1)</translation>
@@ -2989,14 +3005,30 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocchi da un file blk000??.dat esterno</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permetti connessioni JSON-RPC da una origine specifica. I valori validi per &lt;ip&gt; sono un singolo IP (ex: 1.2.3.4), un network/netmask (ex: 1.2.3.4/255.255.255.0) oppure un network/CIDR (ex: 1.2.3.4/24). Questa opzione può essere specificata più volte.</translation>
+    </message>
     <message>
         <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
         <translation>Si è verificato un errore durante l'impostazione della %s porta %u RPC per l'ascolto su: %s</translation>
     </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Collega all'indirizzo indicato e resta permetti l'ascolto su questo. Usa la notazione [host]:porta per l'IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Associa un indirizzo per l'ascolto di connessioni JSON-RPC. Usa l'annotazione [host]:porta per IPv6. Questa opzione può essere specificata più volte (default: associa a tutte le interfacce) </translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Non è possibile ottenere un lock sulla cartella %s. Probabilmente Bitcoin Core è già in esecuzione.</translation>
     </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crea nuovi file con i permessi di default del sistema invece dell'umask 077 (effettiva solo con la funzionalità del wallet disabilitata)</translation>
+    </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Errore: l'ascolto per per connessioni in arrivo fallito (errore riportato %s)</translation>
@@ -3049,6 +3081,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Importo non valido per -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Netmask non valida specificata in -whitelist: '%s'</translation>
+    </message>
     <message>
         <source>Node relay options:</source>
         <translation>Opzioni  relay nodo:</translation>
@@ -3182,6 +3218,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Errore caricamento wallet.dat: Portamonete corrotto</translation>
     </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Numero di secondi di sospensione per i peer di cattiva qualità prima di riconnettersi (default: %u)</translation>
+    </message>
     <message>
         <source>(default: %s)</source>
         <translation>(default: %s)</translation>
@@ -3202,6 +3242,10 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>How many blocks to check at startup (default: %u, 0 = all)</source>
         <translation>Quanti blocchi da controllare all'avvio (dafault: %u, 0 = tutti)</translation>
     </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Includi gli indirizzi IP nell'output del debug (default: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Indirizzo -proxy non valido: '%s'</translation>
@@ -3218,6 +3262,18 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
         <translation>Mantieni al massimo &lt;n&gt; connessioni ai peers (default: %u)</translation>
     </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Buffer di ricezione massimo per connessione, &lt;n&gt;*1000 byte (default: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Buffer di invio massimo per connessione, &lt;n&gt;*1000 byte (default: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Accetta solo una catena di blocchi che corrisponde ai checkpoint predefiniti (default: %u)</translation>
+    </message>
     <message>
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Pretendi output di debug con timestamp (default: %u)</translation>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 258c7f109fd9..f5f708fac935 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -51,7 +51,7 @@
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Kies het adres om munten voor te ontvangen</translation>
+        <translation>Kies het adres om munten op te ontvangen</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -59,15 +59,15 @@
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Bezig met het versturen van de adressen</translation>
+        <translation>Verstuur adressen</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation>Adressen ontvangen</translation>
+        <translation>Ontvang adressen</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Controleer altijd het bedrag en het ontvangende adres voordat u uw bitcoins verzendt.</translation>
+        <translation>Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Controleer altijd het bedrag en het ontvang adres voordat u uw bitcoins verzendt.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
@@ -117,7 +117,7 @@
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Wachtwoorddialoogscherm</translation>
+        <translation>Wachtwoorddialoog</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
@@ -185,11 +185,11 @@
     </message>
     <message>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Vul een nieuw </translation>
+        <translation>Voer een nieuw wachtwoord in voor uw portomonee.&lt;br/&gt;Gebruik een wachtwoord van &lt;b&gt;tien of meer willekeurige karakters&lt;/b&gt;, of &lt;b&gt;acht of meer woorden&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin zal nu afsluiten om het versleutelingsproces te voltooien. Onthoud dat het versleutelen van uw portemonnee u niet volledig kan beschermen: Malware kan uw computer infecteren en uw bitcoins stelen.</translation>
+        <translation>Bitcoin zal nu afsluiten om het versleutelingsproces te voltooien. Onthoudt dat het versleutelen van uw portemonnee u niet volledig kan beschermen: Malware kan uw computer infecteren en uw bitcoins stelen.</translation>
     </message>
     <message>
         <source>Wallet encryption failed</source>
@@ -240,7 +240,7 @@
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>Toon algemeen overzicht van de portemonnee</translation>
+        <translation>Toon algemeen overzicht van uw portemonnee</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -284,11 +284,11 @@
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;Adressen aan het versturen.</translation>
+        <translation>V&amp;erstuur adressen...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>&amp;Adressen aan het ontvangen...</translation>
+        <translation>O&amp;ntvang adressen...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -296,7 +296,7 @@
     </message>
     <message>
         <source>Bitcoin Core client</source>
-        <translation>Bitcoin kern applicatie</translation>
+        <translation>Bitcoin Kern applicatie</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -424,11 +424,11 @@
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n actieve connectie naar Bitcoinnetwerk</numerusform><numerusform>%n actieve connecties naar Bitcoinnetwerk</numerusform></translation>
+        <translation><numerusform>%n actieve connectie naar Bitcoin netwerk</numerusform><numerusform>%n actieve connecties naar Bitcoin netwerk</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>Geen bron van blokken beschikbaar...</translation>
+        <translation>Geen bron voor blokken beschikbaar...</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -480,7 +480,7 @@
     </message>
     <message numerus="yes">
         <source>Processed %n blocks of transaction history.</source>
-        <translation><numerusform>%n Blok verwerkt van transactie geschiedenis.</numerusform><numerusform>%n Blokken verwerkt van transactie geschiedenis.</numerusform></translation>
+        <translation><numerusform>%n Blok transactie geschiedenis verwerkt.</numerusform><numerusform>%n Blokken transactie geschiedenis verwerkt.</numerusform></translation>
     </message>
     <message>
         <source>Catching up...</source>
@@ -618,7 +618,7 @@ Adres: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation>Blokeer niet gebruikte</translation>
+        <translation>Blokeer ongebruikte</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
@@ -1864,6 +1864,10 @@ Adres: %4
         <source>total at least</source>
         <translation>totaal ten minste</translation>
     </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(lees de tooltip)</translation>
+    </message>
     <message>
         <source>Recommended:</source>
         <translation>Aanbevolen:</translation>
@@ -1872,6 +1876,10 @@ Adres: %4
         <source>Custom:</source>
         <translation>Handmatig:</translation>
     </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Slimme vergoeding is nog niet geïnitialiseerd. Dit duurt meestal een paar blokken...)</translation>
+    </message>
     <message>
         <source>Confirmation time:</source>
         <translation>Bevestigings tijd:</translation>
@@ -1884,6 +1892,10 @@ Adres: %4
         <source>fast</source>
         <translation>snel</translation>
     </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Verstuur als transactie zonder verzendkosten indien mogelijk</translation>
+    </message>
     <message>
         <source>(confirmation may take longer)</source>
         <translation>(bevestiging kan langer duren)</translation>
@@ -2532,6 +2544,10 @@ Adres: %4
         <source>Type of transaction.</source>
         <translation>Type transactie.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Of er een alleen-bekijken adres is betrokken bij deze transactie.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Ontvangend adres van transactie.</translation>
@@ -2800,6 +2816,14 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind aan opgegeven adres en luister er altijd op. Gebruik [host]:port notatie voor IPv6</translation>
     </message>
+    <message>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Verwijder alle transacties van de portemonnee en herstel alleen de delen van de blockchain door -rescan tijdens het opstarten</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Uitgegeven onder de MIT software licentie, zie het bijgevoegde bestand COPYING of &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Schakel regressietest-modus in, die een speciale blokketen gebruikt waarin blokken onmiddellijk opgelost kunnen worden.</translation>
@@ -2852,6 +2876,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Waarschuwing: wallet.dat is corrupt, data is veiliggesteld! Originele wallet.dat is opgeslagen als wallet.{tijdstip}.bak in %s; als uw balans of transacties incorrect zijn dient u een backup terug te zetten.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Goedgekeurde peers die verbinden van het ingegeven netmask of IP adres. Kan meerdere keren gespecificeerd worden.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(standaard: 1)</translation>
@@ -2912,6 +2940,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error opening block database</source>
         <translation>Fout bij openen blokkendatabase</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Fout: Een fatale interne fout is opgetreden, zie debug.log voor details</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Fout: Weinig vrije diskruimte!</translation>
@@ -2944,6 +2976,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Not enough file descriptors available.</source>
         <translation>Niet genoeg file descriptors beschikbaar.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Verbind alleen met nodes in netwerk &lt;net&gt; (ipv4, ipv6 of onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blokketen opnieuw opbouwen met behulp van huidige blk000??.dat-bestanden</translation>
@@ -2992,10 +3028,38 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importeert blokken van extern blk000??.dat bestand</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Sta JSON-RPC verbindingen toe vanuit een gespecificeerde bron. Geldig voor &lt;ip&gt; zijn een enkel IP (bijv. 1.2.3.4), een netwerk/netmask (bijv. 1.2.3.4/255.255.255.0) of een netwerk/CIDR (bijv. 1.2.3.4/24). Deze optie kan meerdere keren gespecificeerd worden.</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Er is een fout opgetreden tijdens het opzetten van het RPC adres %s poort %u voor luisteren: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Bind aan opgegeven adres en keur peers die ermee verbinden goed. Gebruik [host]:poort notatie voor IPv6</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Bind aan gegeven adres om te luisteren voor JSON-RPC verbindingen. Gebruik [host]:poort notatie voor IPv6. Deze optie kan meerdere keren gespecificeerd worden (standaard: bind aan alle interfaces.</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Kan geen lock verkrijgen op gegevensmap %s. Bitcoin Core draait waarschijnlijk al.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Doorlopend tarief-limiet op gratis transacties toepassen tot &lt;n&gt;*1000 bytes per minuut (standaard: %u)</translation>
+    </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Creër nieuwe bestanden met standaard systeem bestandsrechten in plaats van umask 077 (alleen effectief met uitgeschakelde portemonnee functionaliteit)</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Fout: luisteren naar binnenkomende verbindingen mislukt (luisteren gaf foutmelding %s)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Voer commando uit zodra een waarschuwing is ontvangen of wanneer we een erg lange fork detecteren (%s in commando wordt vervangen door bericht)</translation>
@@ -3004,14 +3068,58 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Stel maximumgrootte in bytes in voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Stel het aantal threads in voor het genereren van coins indien ingesteld (-1 = alle kernen, standaard: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Dit product bevat software dat ontwikkeld is door het OpenSSL Project voor gebruik in de OpenSSL Toolkit &lt;https://www.openssl.org/&gt; en cryptografische software geschreven door Eric Young en UPnP software geschreven door Thomas Bernard.</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>Waarschuwing: Controleer dat de datum en tijd van uw computer correct zijn ingesteld! Bij een onjuist ingestelde klok zal Bitcoin Core niet goed werken.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Goedgekeurde peers kunnen niet ge-DoS-banned worden en hun transacties worden altijd doorgestuurd, zelfs als ze reeds in de mempool aanwezig zijn, nuttig voor bijv. een gateway</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>Kan -whitebind adres niet herleiden: '%s'</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Verbind door SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Auteursrecht (C) 2009-%i De Bitcoin Core Ontwikkelaars</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Niet mogelijk om -rpcbind waarde %s te verwerken als netwerk adres</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Fout bij laden wallet.dat: Portemonnee vereist een nieuwere versie van Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Fout: Niet ondersteund argument -tor gevonden, gebruik -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Transactiekosten (in BTC/kB) om toe te voegen aan transacties die u verstuurd (standaard: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informatie</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Initialisatie sanity check mislukt. Bitcoin Core is aan het afsluiten.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ongeldig bedrag voor -minrelaytxfee=&lt;bedrag&gt;: '%s'</translation>
@@ -3024,6 +3132,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
         <translation>Ongeldig bedrag voor -paytxfee=&lt;bedrag&gt;: '%s' (Minimum %s)</translation>
     </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Ongeldig netmask gespecificeerd in -whitelist: '%s'</translation>
+    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
         <translation>Houd maximaal &lt;n&gt; onverbonden blokken in geheugen (standaard: %u)</translation>
@@ -3032,6 +3144,14 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Houd maximaal &lt;n&gt; onverbonden transacties in geheugen (standaard: %u)</translation>
     </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Verplicht een poort met -whitebind op te geven: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Node relay opties:</translation>
+    </message>
     <message>
         <source>Print block on startup, if found in block index</source>
         <translation>Toon block bij opstarten, wanneer gevonden in block index</translation>
@@ -3056,6 +3176,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Stuur trace/debug-info naar de console in plaats van het debug.log bestand</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Verstuur transacties zonder verzendkosten indien mogelijk (standaard: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Toon alle foutopsporingsopties (gebruik: --help -help-debug)</translation>
@@ -3084,6 +3208,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Transaction too large</source>
         <translation>Transactie te groot</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Niet in staat om aan %s te binden op deze computer (bind gaf error %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Gebruik UPnP om de luisterende poort te mappen (standaard: 1 als er wordt geluisterd)</translation>
@@ -3092,6 +3220,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Username for JSON-RPC connections</source>
         <translation>Gebruikersnaam voor JSON-RPC-verbindingen</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Portemonnee moest herschreven worden: Herstart Bitcoin Core om te voltooien</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>Waarschuwing</translation>
@@ -3100,6 +3232,14 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Waarschuwing: Deze versie is verouderd, een upgrade is vereist!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Waarschuwing: Niet ondersteund argument -benchmark genegeerd, gebruik -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Waarschuwing: Niet ondersteund argument -debugnet genegeerd, gebruik -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
         <translation>Bezig met het zappen van alle transacties van de portemonnee...</translation>
@@ -3148,6 +3288,18 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fout bij laden wallet.dat: Portemonnee corrupt</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = behoudt tx meta data bijv. account eigenaar en betalingsverzoek informatie, 2. sla tx meta data niet op)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Leeg database-activiteit uit de geheugen pool naar schijf log elke &lt;n&gt; megabytes (standaard: %u) </translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Hoe grondig de blokverificatie van -checkblocks is (0-4, standaard: %u)</translation>
+    </message>
     <message>
         <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
         <translation>Onderhoud een volledige transactieindex, gebruikt door de getrawtransaction rpc call (standaard: %u)</translation>
@@ -3164,6 +3316,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation>Gebruik een aparte SOCKS5 proxy om 'Tor hidden services' te bereiken (standaard: %s)</translation>
     </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Geaccepteerde versleutelingen (standaard: %s)</translation>
+    </message>
     <message>
         <source>Always query for peer addresses via DNS lookup (default: %u)</source>
         <translation>Vind anderen door middel van een DNS-naslag (standaard: %u)</translation>
@@ -3272,6 +3428,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
         <translation>Besteed onbevestigd wisselgeld bij het versturen van transacties (standaard: %u)</translation>
     </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Stop uitvoeren na het importeren van blokken van de schijf (standaard: %u)</translation>
+    </message>
     <message>
         <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
         <translation>Drempel om verbinding te verbreken naar zich misdragende peers (standaard: %u)</translation>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index 9b5f4c9f4e78..fe39c8e2cf94 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1830,7 +1830,7 @@ Address: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Після комісії</translation>
+        <translation>Після комісії:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -1910,7 +1910,7 @@ Address: %4
     </message>
     <message>
         <source>Send as zero-fee transaction if possible</source>
-        <translation>Надіслати як нульовий плата за передачу, якщо це можливо</translation>
+        <translation>Надіслати транзакцію без сплати комісії, якщо це можливо</translation>
     </message>
     <message>
         <source>(confirmation may take longer)</source>
@@ -3216,7 +3216,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
-        <translation>Встановити операцію надсилання, як неоплатну операцію, якщо це можливо (за замовчуванням: %u)</translation>
+        <translation>Не сплачувати комісію за надсилання транзакцій, якщо це можливо (типово: %u)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>

From 87d43a3c8e8679cc4a88e4a29545e190c099d973 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 29 Dec 2014 15:19:19 -0500
Subject: [PATCH 1212/1819] rpcserver: attempt to fix uncaught exception.

Rebased-From: f9c571aad8261eb9a5cab9dce5b490bd253c5fe1
Github-Pull: #5565
---
 src/rpcserver.cpp | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 252b0866a2f4..4b8264658583 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -650,14 +650,16 @@ void StartRPCThreads()
 
     bool fListening = false;
     std::string strerr;
+    std::string straddress;
     BOOST_FOREACH(const ip::tcp::endpoint &endpoint, vEndpoints)
     {
-        asio::ip::address bindAddress = endpoint.address();
-        LogPrintf("Binding RPC on address %s port %i (IPv4+IPv6 bind any: %i)\n", bindAddress.to_string(), endpoint.port(), bBindAny);
-        boost::system::error_code v6_only_error;
-        boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
-
         try {
+            asio::ip::address bindAddress = endpoint.address();
+            straddress = bindAddress.to_string();
+            LogPrintf("Binding RPC on address %s port %i (IPv4+IPv6 bind any: %i)\n", straddress, endpoint.port(), bBindAny);
+            boost::system::error_code v6_only_error;
+            boost::shared_ptr<ip::tcp::acceptor> acceptor(new ip::tcp::acceptor(*rpc_io_service));
+
             acceptor->open(endpoint.protocol());
             acceptor->set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
 
@@ -678,8 +680,8 @@ void StartRPCThreads()
         }
         catch(boost::system::system_error &e)
         {
-            LogPrintf("ERROR: Binding RPC on address %s port %i failed: %s\n", bindAddress.to_string(), endpoint.port(), e.what());
-            strerr = strprintf(_("An error occurred while setting up the RPC address %s port %u for listening: %s"), bindAddress.to_string(), endpoint.port(), e.what());
+            LogPrintf("ERROR: Binding RPC on address %s port %i failed: %s\n", straddress, endpoint.port(), e.what());
+            strerr = strprintf(_("An error occurred while setting up the RPC address %s port %u for listening: %s"), straddress, endpoint.port(), e.what());
         }
     }
 

From 968f13cae38c56efb65be712e48da7b89e8fd269 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 31 Dec 2014 09:29:12 +0100
Subject: [PATCH 1213/1819] mention leveldb 1.18 ARM/x86 db interop

---
 doc/release-notes.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 3df7b3a8e069..1cb6b4dbfa1c 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -575,6 +575,7 @@ Miscellaneous:
 - `772ab0e` contrib: use batched JSON-RPC in linarize-hashes (optimization)
 - `7ab4358` Update bash-completion for v0.10
 - `6e6a36c` contrib: show pull # in prompt for github-merge script
+- `5b9f842` Upgrade leveldb to 1.18, make chainstate databases compatible between ARM and x86 (issue #2293)
 
 Credits
 =======

From 8543b0dfd9b8c0fd808d35a4bae128be34f3ab77 Mon Sep 17 00:00:00 2001
From: Michael Ford <fanquake@gmail.com>
Date: Tue, 30 Dec 2014 17:46:57 +0800
Subject: [PATCH 1214/1819] Correct tooltip on address book page

Rebased-From: 06206bb3b78067f1f433dde8062c8ab01aaf43eb
Github-Pull: 5571
---
 src/qt/forms/addressbookpage.ui | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/forms/addressbookpage.ui b/src/qt/forms/addressbookpage.ui
index 52fdc6ef06b5..264edeb7200c 100644
--- a/src/qt/forms/addressbookpage.ui
+++ b/src/qt/forms/addressbookpage.ui
@@ -27,7 +27,7 @@
       <enum>Qt::CustomContextMenu</enum>
      </property>
      <property name="toolTip">
-      <string>Double-click to edit address or label</string>
+      <string>Right-click to edit address or label</string>
      </property>
      <property name="tabKeyNavigation">
       <bool>false</bool>

From b790d139c96284e362f7a8a2d28ea0e61c1fab96 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 31 Dec 2014 10:39:08 +0100
Subject: [PATCH 1215/1819] English translation update

---
 src/qt/bitcoinstrings.cpp   |  54 ++++----
 src/qt/locale/bitcoin_en.ts | 254 +++++++++++++++++-------------------
 2 files changed, 149 insertions(+), 159 deletions(-)

diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 548529865a16..a19dab4577f7 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -10,18 +10,6 @@
 #endif
 static const char UNUSED *bitcoin_strings[] = {
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"%s, you must set a rpcpassword in the configuration file:\n"
-"%s\n"
-"It is recommended you use the following random password:\n"
-"rpcuser=bitcoinrpc\n"
-"rpcpassword=%s\n"
-"(you do not need to remember this password)\n"
-"The username and password MUST NOT be the same.\n"
-"If the file does not exist, create it with owner-readable-only file "
-"permissions.\n"
-"It is also recommended to set alertnotify so you are notified of problems;\n"
-"for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
 "(1 = keep tx meta data e.g. account owner and payment request information, 2 "
 "= drop tx meta data)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -62,13 +50,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: Listening for incoming connections failed (listen returned error %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Error: The transaction was rejected! This might happen if some of the coins "
-"in your wallet were already spent, such as if you used a copy of wallet.dat "
-"and coins were spent in the copy but not marked as spent here."),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Error: This transaction requires a transaction fee of at least %s because of "
-"its amount, complexity, or use of recently received funds!"),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Error: Unsupported argument -socks found. Setting SOCKS version isn't "
 "possible anymore, only SOCKS5 proxies are supported."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -92,12 +73,15 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "How thorough the block verification of -checkblocks is (0-4, default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
-"If paytxfee is not set, include enough fee so transactions are confirmed on "
-"average within n blocks (default: %u)"),
+"If paytxfee is not set, include enough fee so transactions begin "
+"confirmation on average within n blocks (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "In this mode -genproclimit controls how many blocks are generated "
 "immediately."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay "
+"fee of %s to prevent stuck transactions)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Log transaction priority and fee per kB when mining blocks (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Maintain a full transaction index, used by the getrawtransaction rpc call "
@@ -106,6 +90,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Maximum size of data in data carrier transactions we relay and mine "
 "(default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Maximum total fees to use in a single wallet transaction, setting too low "
+"may abort large transactions (default: %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Output debugging information (default: %u, supplying <category> is optional)"),
@@ -128,12 +115,28 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
 "written by Eric Young and UPnP software written by Thomas Bernard."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"To use bitcoind, or the -server option to bitcoin-qt, you must set an "
+"rpcpassword in the configuration file:\n"
+"%s\n"
+"It is recommended you use the following random password:\n"
+"rpcuser=bitcoinrpc\n"
+"rpcpassword=%s\n"
+"(you do not need to remember this password)\n"
+"The username and password MUST NOT be the same.\n"
+"If the file does not exist, create it with owner-readable-only file "
+"permissions.\n"
+"It is also recommended to set alertnotify so you are notified of problems;\n"
+"for example: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com\n"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Unable to bind to %s on this computer. Bitcoin Core is probably already "
 "running."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: "
 "%s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Warning: -maxtxfee is set very high! Fees this large could be paid on a "
+"single transaction."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Warning: -paytxfee is set very high! This is the transaction fee you will "
 "pay if you send a transaction."),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -163,6 +166,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "(default: 1)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Accept public REST requests (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Acceptable ciphers (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
@@ -198,7 +202,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: A fatal internal error occured, see debug.log for details"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unsupported argument -tor found, use -onion."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Error: Wallet locked, unable to create transaction!"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Fee (in BTC/kB) to add to transactions you send (default: %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Force safe mode (default: %u)"),
@@ -214,13 +217,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. Bitcoin C
 QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address: '%s'"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -maxtxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Limit size of signature cache to <n> entries (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
@@ -239,8 +241,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Only connect to nodes in network <net> (ipv4,
 QT_TRANSLATE_NOOP("bitcoin-core", "Options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: %u)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Print block on startup, if found in block index"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Print block tree on startup (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages"),
@@ -277,9 +277,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
 QT_TRANSLATE_NOOP("bitcoin-core", "This is intended for regression testing tools and app development."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "To use the %s option"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large for fee policy"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Unknown network specified in -onlynet: '%s'"),
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 71c626be4b0d..5291bfcc1b14 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -5,8 +5,8 @@
     <name>AddressBookPage</name>
     <message>
         <location filename="../forms/addressbookpage.ui" line="+30"/>
-        <source>Double-click to edit address or label</source>
-        <translation>Double-click to edit address or label</translation>
+        <source>Right-click to edit address or label</source>
+        <translation type="unfinished"></translation>
     </message>
     <message>
         <location line="+27"/>
@@ -1568,7 +1568,7 @@ Address: %4
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="+410"/>
+        <location filename="../paymentserver.cpp" line="+422"/>
         <location line="+14"/>
         <location line="+7"/>
         <source>URI handling</source>
@@ -1580,7 +1580,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+91"/>
         <location line="+9"/>
         <location line="+32"/>
         <source>Payment request rejected</source>
@@ -1607,17 +1607,17 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-253"/>
-        <location line="+219"/>
+        <location line="-260"/>
+        <location line="+226"/>
         <location line="+34"/>
-        <location line="+98"/>
+        <location line="+110"/>
         <location line="+14"/>
         <location line="+18"/>
         <source>Payment request error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-382"/>
+        <location line="-401"/>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1642,7 +1642,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+104"/>
+        <location line="+111"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1653,6 +1653,16 @@ Address: %4
     </message>
     <message>
         <location line="+43"/>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Payment request DoS protection</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1698,7 +1708,7 @@ Address: %4
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+196"/>
+        <location filename="../bitcoinunits.cpp" line="+194"/>
         <source>Amount</source>
         <translation type="unfinished">Amount</translation>
     </message>
@@ -2301,7 +2311,7 @@ Address: %4
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+529"/>
+        <location filename="../sendcoinsdialog.cpp" line="+533"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
@@ -2515,7 +2525,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-192"/>
+        <location line="-193"/>
         <source>Copy quantity</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2550,7 +2560,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+244"/>
+        <location line="+245"/>
         <source>Total Amount %1 (= %2)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2625,12 +2635,12 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-687"/>
+        <location line="-688"/>
         <source>Copy dust</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+221"/>
+        <location line="+222"/>
         <source>Are you sure you want to send?</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3569,32 +3579,32 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+239"/>
+        <location filename="../bitcoinstrings.cpp" line="+241"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location line="+31"/>
+        <location line="+29"/>
         <source>Specify data directory</source>
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location line="-91"/>
+        <location line="-87"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+94"/>
+        <location line="+90"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="-109"/>
+        <location line="-106"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
     <message>
-        <location line="+90"/>
+        <location line="+87"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
@@ -3604,37 +3614,12 @@ Address: %4
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location line="-125"/>
+        <location line="-122"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location line="-153"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</source>
-        <translation>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location line="+22"/>
+        <location line="-146"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation>
     </message>
@@ -3654,17 +3639,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation>
-    </message>
-    <message>
-        <location line="+4"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</translation>
-    </message>
-    <message>
-        <location line="+9"/>
+        <location line="+11"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
     </message>
@@ -3674,7 +3649,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+20"/>
+        <location line="+26"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3684,12 +3659,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+9"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation>
     </message>
@@ -3729,7 +3704,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Attempt to recover private keys from a corrupt wallet.dat</translation>
     </message>
@@ -3805,11 +3780,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <location line="+2"/>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: Wallet locked, unable to create transaction!</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Failed to listen on any port. Use -listen=0 if you want this.</translation>
     </message>
@@ -3834,7 +3804,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+21"/>
+        <location line="+20"/>
         <source>Not enough file descriptors available.</source>
         <translation>Not enough file descriptors available.</translation>
     </message>
@@ -3844,7 +3814,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+8"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
@@ -3899,12 +3869,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
     <message>
-        <location line="-92"/>
+        <location line="-89"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-182"/>
+        <location line="-197"/>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3944,7 +3914,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+2"/>
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3964,10 +3934,25 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+19"/>
+        <location line="+8"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+8"/>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+7"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
@@ -3989,7 +3974,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+4"/>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+6"/>
         <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Bitcoin Core will not work properly.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3999,7 +4004,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+8"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4029,7 +4039,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4045,6 +4055,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <location line="+4"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
@@ -4059,15 +4074,10 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
@@ -4085,11 +4095,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
     </message>
     <message>
         <location line="+7"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4139,7 +4144,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Transaction amount too small</translation>
     </message>
@@ -4148,6 +4153,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Transaction amounts must be positive</source>
         <translation>Transaction amounts must be positive</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Transaction too large</source>
@@ -4209,17 +4219,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>
     <message>
-        <location line="-64"/>
+        <location line="-62"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-160"/>
+        <location line="-181"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+206"/>
+        <location line="+225"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
@@ -4239,27 +4249,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="-108"/>
+        <location line="-104"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location line="+60"/>
+        <location line="+58"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location line="-34"/>
+        <location line="-32"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location line="-170"/>
+        <location line="-186"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+58"/>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4269,12 +4279,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location line="+6"/>
+        <location line="+11"/>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4284,7 +4289,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+9"/>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4294,17 +4299,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+23"/>
+        <location line="+36"/>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+28"/>
+        <location line="+31"/>
         <source>(default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+6"/>
         <source>Acceptable ciphers (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4324,7 +4329,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+10"/>
         <source>Force safe mode (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4349,7 +4354,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Invalid -proxy address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+8"/>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4388,11 +4393,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location line="+2"/>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location line="+6"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -4474,7 +4474,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-112"/>
+        <location line="-108"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4488,33 +4488,28 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Invalid amount</source>
-        <translation>Invalid amount</translation>
-    </message>
     <message>
         <location line="-7"/>
         <source>Insufficient funds</source>
         <translation>Insufficient funds</translation>
     </message>
     <message>
-        <location line="+15"/>
+        <location line="+14"/>
         <source>Loading block index...</source>
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location line="-62"/>
+        <location line="-60"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location line="+63"/>
+        <location line="+61"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="-58"/>
+        <location line="-56"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
@@ -4524,22 +4519,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location line="+76"/>
+        <location line="+72"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location line="-63"/>
+        <location line="-59"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+91"/>
-        <source>To use the %s option</source>
-        <translation>To use the %s option</translation>
-    </message>
-    <message>
-        <location line="-83"/>
+        <location line="+8"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>

From 18021d08f76f966ca178a502c6223fab8e8cd960 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sat, 27 Dec 2014 01:38:47 -0800
Subject: [PATCH 1216/1819] Remove bitnodes.io from dnsseeds.

I'm not comfortable with retaining this entry.

Rebased-From: a094b3d9732aaca362e883655319852e4ce9a174
Github-Pull: #5545
---
 src/chainparams.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 8a6a061ea1e2..0291fd986404 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -156,7 +156,6 @@ class CMainParams : public CChainParams {
         vSeeds.push_back(CDNSSeedData("bluematt.me", "dnsseed.bluematt.me"));
         vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org"));
         vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com"));
-        vSeeds.push_back(CDNSSeedData("bitnodes.io", "seed.bitnodes.io"));
         vSeeds.push_back(CDNSSeedData("xf2.org", "bitseed.xf2.org"));
 
         base58Prefixes[PUBKEY_ADDRESS] = list_of(0);

From 1eadfd97538830a323c9ee40c18c6f8fb1e5ec36 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Wed, 17 Dec 2014 09:34:09 +0000
Subject: [PATCH 1217/1819] Bugfix: prioritisetransaction: Do some basic sanity
 checking on txid

Besides giving a nicer error, this also prevents logging arbitrary data (which could have been used to exploit log readers) into debug.log

Rebased-From: 7f718139191d67da29c5d856d29e035bbc51e659
Github-Pull: #5499
---
 src/core_io.h     | 1 +
 src/core_read.cpp | 5 +++++
 src/rpcmining.cpp | 3 +--
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/core_io.h b/src/core_io.h
index aba1928a3664..bc2eb1edd099 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -19,6 +19,7 @@ extern CScript ParseScript(std::string s);
 extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx);
 extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
 extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
+extern uint256 ParseHashStr(const std::string&, const std::string& strName);
 extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
 
 // core_write.cpp
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 65c3a08c551e..beb746ce9702 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -131,6 +131,11 @@ uint256 ParseHashUV(const UniValue& v, const string& strName)
     string strHex;
     if (v.isStr())
         strHex = v.getValStr();
+    return ParseHashStr(strHex, strName);  // Note: ParseHashStr("") throws a runtime_error
+}
+
+uint256 ParseHashStr(const std::string& strHex, const std::string& strName)
+{
     if (!IsHex(strHex)) // Note: IsHex("") is false
         throw runtime_error(strName+" must be hexadecimal string (not '"+strHex+"')");
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index b406106ff281..86230521ce88 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -288,8 +288,7 @@ Value prioritisetransaction(const Array& params, bool fHelp)
             + HelpExampleRpc("prioritisetransaction", "\"txid\", 0.0, 10000")
         );
 
-    uint256 hash;
-    hash.SetHex(params[0].get_str());
+    uint256 hash = ParseHashStr(params[0].get_str(), "txid");
 
     CAmount nAmount = params[2].get_int64();
 

From d1bcef43910391da707ef9385c328977462c86e9 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 23 Dec 2014 22:02:16 +0000
Subject: [PATCH 1218/1819] release-notes: updates

- Avoid ambiguous language regarding when transactions confirm
- Elaborate on downgrading warning
- Other minor language improvements
- Clarify watch-only behaviour

Github-Pull: #5534
---
 doc/release-notes.md | 35 +++++++++++++++++++----------------
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 1cb6b4dbfa1c..f8fc3f0bc1c6 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -29,7 +29,7 @@ Downgrading warning
 
 Because release 0.10.0 makes use of headers-first synchronization and parallel
 block download (see further), the block files and databases are not
-backwards-compatible with older versions of Bitcoin Core:
+backwards-compatible with older versions of Bitcoin Core or other software:
 
 * Blocks will be stored on disk out of order (in the order they are
 received, really), which makes it incompatible with some tools or
@@ -41,7 +41,9 @@ stored on disk, which earlier versions won't support.
 
 If you want to be able to downgrade smoothly, make a backup of your entire data
 directory. Without this your node will need start syncing (or importing from
-bootstrap.dat) anew afterwards.
+bootstrap.dat) anew afterwards. It is possible that the data from a completely
+synchronised 0.10 node may be usable in older versions as-is, but this is not
+supported and may break as soon as the older version attempts to reindex.
 
 This does not affect wallet forward or backward compatibility.
 
@@ -92,15 +94,15 @@ program shutdown, and are read in at startup.
 
 New command line options for fee estimation:
 - `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
-so they are likely to confirm within n blocks (default: 1). This setting
+so they are likely to begin confirmation within n blocks (default: 1). This setting
 is over-ridden by the -paytxfee option.
 
 New RPC commands for fee estimation:
 - `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
-a transaction to be confirmed within nblocks. Returns -1 if not enough
+a transaction to begin confirmation within nblocks. Returns -1 if not enough
 transactions have been observed to compute a good estimate.
 - `estimatepriority nblocks` : Returns approximate priority needed for
-a zero-fee transaction to confirm within nblocks. Returns -1 if not
+a zero-fee transaction to begin confirmation within nblocks. Returns -1 if not
 enough free transactions have been observed to compute a good
 estimate.
 
@@ -125,7 +127,7 @@ For example:
 | `-rpcallowip=192.168.1.1`                  | `-rpcallowip=192.168.1.1` (unchanged) |
 | `-rpcallowip=192.168.1.*`                  | `-rpcallowip=192.168.1.0/24`          |
 | `-rpcallowip=192.168.*`                    | `-rpcallowip=192.168.0.0/16`          |
-| `-rpcallowip=*` (dangerous!)               | `-rpcallowip=::/0`                    |
+| `-rpcallowip=*` (dangerous!)               | `-rpcallowip=::/0` (still dangerous!) |
 
 Using wildcards will result in the rule being rejected with the following error in debug.log:
 
@@ -180,8 +182,8 @@ of times. While using shared hosts and reusing keys are inadvisable
 for other reasons, it's a better practice to avoid the exposure.
 
 OpenSSL has code in their source repository for derandomization
-and reduction in timing leaks, and we've  eagerly wanted to use
-it for a long time but this functionality has still not made its
+and reduction in timing leaks that we've eagerly wanted to use for a
+long time, but this functionality has still not made its
 way into a released version of OpenSSL. Libsecp256k1 achieves
 significantly stronger protection: As far as we're aware this is
 the only deployed implementation of constant time signing for
@@ -191,11 +193,11 @@ than the implementation in OpenSSL.
 
 [1] https://eprint.iacr.org/2014/161.pdf
 
-Watch-only addresses in the wallet
-----------------------------------
+Watch-only wallet support
+-------------------------
 
-The wallet can now track transactions to addresses (or scripts) for which you
-do not have the private keys.
+The wallet can now track transactions to and from wallets for which you know
+all addresses (or scripts), even without the private keys.
 
 This can be used to track payments without needing the private keys online on a
 possibly vulnerable system. In addition, it can help for (manual) construction
@@ -204,17 +206,18 @@ of multisig transactions where you are only one of the signers.
 One new RPC, `importaddress`, is added which functions similarly to
 `importprivkey`, but instead takes an address or script (in hexadecimal) as
 argument.  After using it, outputs credited to this address or script are
-considered to be yours.
+considered to be received, and transactions consuming these outputs will be
+considered to be sent.
 
-The following RPCs have optional support for watch-only addresses:
+The following RPCs have optional support for watch-only:
 `getbalance`, `listreceivedbyaddress`, `listreceivedbyaccount`,
 `listtransactions`, `listaccounts`, `listsinceblock`, `gettransaction`. See the
 RPC documentation for those methods for more information.
 
 Compared to using `getrawtransaction`, this mechanism does not require
 `-txindex`, scales better, integrates better with the wallet, and is compatible
-with future block chain pruning functionality. It does mean the address needs
-to added to the wallet before the payment, though.
+with future block chain pruning functionality. It does mean that all relevant
+addresses need to added to the wallet before the payment, though.
 
 Consensus library
 -----------------

From 8061d67aebd4bc1c2f23b896dd2c40bec04e313c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 2 Jan 2015 10:42:33 +0100
Subject: [PATCH 1219/1819] Remove redundant copyright notices from README
 files

The normative place for these for the entire project is COPYING,
and the main README already has a MIT license section.

Rebased-From: e6df2bb48f4bff7a2dec4aa226102b0cf2cd828b
---
 README.md               |  2 --
 doc/README.md           |  5 +----
 doc/README_windows.txt  | 12 ++----------
 src/test/data/README.md |  8 +++-----
 4 files changed, 6 insertions(+), 21 deletions(-)

diff --git a/README.md b/README.md
index cf650fe54333..fb9c0b6d77c2 100644
--- a/README.md
+++ b/README.md
@@ -5,8 +5,6 @@ Bitcoin Core integration/staging tree
 
 https://www.bitcoin.org
 
-Copyright (c) 2009-2014 Bitcoin Core Developers
-
 What is Bitcoin?
 ----------------
 
diff --git a/doc/README.md b/doc/README.md
index 4f8f8ac717b7..ac22812da342 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,9 +1,6 @@
-Bitcoin 0.10.0 BETA
+Bitcoin Core 0.10.0
 =====================
 
-Copyright (c) 2009-2014 Bitcoin Developers
-
-
 Setup
 ---------------------
 [Bitcoin Core](http://bitcoin.org/en/download) is the original Bitcoin client and it builds the backbone of the network. However, it downloads and stores the entire history of Bitcoin transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. Thankfully you only have to do this once. If you would like the process to go faster you can [download the blockchain directly](bootstrap.md).
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index 2c8f635a528e..472494172adb 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,13 +1,5 @@
-Bitcoin 0.10.0 BETA
-
-Copyright (c) 2009-2014 Bitcoin Core Developers
-
-Distributed under the MIT/X11 software license, see the accompanying
-file COPYING or http://www.opensource.org/licenses/mit-license.php.
-This product includes software developed by the OpenSSL Project for use in
-the OpenSSL Toolkit (https://www.openssl.org/).  This product includes
-cryptographic software written by Eric Young (eay@cryptsoft.com).
-
+Bitcoin Core 0.10.0
+=====================
 
 Intro
 -----
diff --git a/src/test/data/README.md b/src/test/data/README.md
index f69a021ca0a6..2463daa42a53 100644
--- a/src/test/data/README.md
+++ b/src/test/data/README.md
@@ -6,9 +6,7 @@ This directory contains data-driven tests for various aspects of Bitcoin.
 License
 --------
 
-The data files in this directory are
-
-    Copyright (c) 2012-2014 The Bitcoin Core developers
-    Distributed under the MIT/X11 software license, see the accompanying
-    file COPYING or http://www.opensource.org/licenses/mit-license.php.
+The data files in this directory are distributed under the MIT software
+license, see the accompanying file COPYING or
+http://www.opensource.org/licenses/mit-license.php.
 

From 4f57a3b20c693f75be6fe7872192f3f2ef223d41 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 2 Jan 2015 10:49:20 +0100
Subject: [PATCH 1220/1819] Bump project-wide COPYRIGHT_YEAR to 2015

There is still a redundancy here between configure.ac and
clientversion.h.

Rebased-From: edbc9045cb21020d0cc19d226f55ee169e2ffb92
---
 COPYING             | 2 +-
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/COPYING b/COPYING
index 6219bd75a649..9fd32666224e 100644
--- a/COPYING
+++ b/COPYING
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2014 Bitcoin Developers
+Copyright (c) 2009-2015 Bitcoin Developers
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
diff --git a/configure.ac b/configure.ac
index c8149570b82c..3b912fb164c7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ define(_CLIENT_VERSION_MINOR, 10)
 define(_CLIENT_VERSION_REVISION, 0)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, true)
-define(_COPYRIGHT_YEAR, 2014)
+define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@bitcoin.org],[bitcoin])
 AC_CONFIG_SRCDIR([src/main.cpp])
 AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
diff --git a/src/clientversion.h b/src/clientversion.h
index ba3035aed475..314ff7f9d743 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -26,7 +26,7 @@
  * Copyright year (2009-this)
  * Todo: update this when changing our copyright comments in the source
  */
-#define COPYRIGHT_YEAR 2014
+#define COPYRIGHT_YEAR 2015
 
 #endif //HAVE_CONFIG_H
 

From 9241f7a7c1259379c667a8fbd22fd0d929b335b1 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Dec 2014 18:45:29 -0500
Subject: [PATCH 1221/1819] depends: fix major regression after d546191dc.

Broken hash logic caused all depends on some platforms (osx at least) to end up
with the same build-id. Without this fix, nothing will be rebuilt when recipes
or dependencies change.

Rebased-From: d57b303e1e5b3fc31da0769b14b01fdcc19b1f7a
Github-Pull: #5586
---
 depends/funcs.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/depends/funcs.mk b/depends/funcs.mk
index 79015c047ca0..337634253f5b 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -31,8 +31,8 @@ define fetch_file
 endef
 
 define int_get_build_recipe_hash
-$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches))))
-$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | cut -d" " -f1 | $(build_SHA256SUM)))
+$(eval $(1)_all_file_checksums:=$(shell $(build_SHA256SUM) $(meta_depends) packages/$(1).mk $(addprefix $(PATCHES_PATH)/$(1)/,$($(1)_patches)) | cut -d" " -f1))
+$(eval $(1)_recipe_hash:=$(shell echo -n "$($(1)_all_file_checksums)" | $(build_SHA256SUM) | cut -d" " -f1))
 endef
 
 define int_get_build_id

From 50891ad080f34e3c3b053c2440332e1a1fd35082 Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Wed, 31 Dec 2014 12:03:00 +0100
Subject: [PATCH 1222/1819] [Qt] update a translation string and argument
 counts

Rebased-From: 643415aade0dae528098df2d822288ba0c5f6ce2
Github-Pull: #5583
---
 src/qt/paymentserver.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index bd3dab41a8f2..0f8f6f0ce81e 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -667,8 +667,7 @@ void PaymentServer::netRequestFinished(QNetworkReply* reply)
 
     // BIP70 DoS protection
     if (reply->size() > BIP70_MAX_PAYMENTREQUEST_SIZE) {
-        QString msg = tr("Payment request %2 is too large (%3 bytes, allowed %4 bytes).")
-            .arg(__func__)
+        QString msg = tr("Payment request %1 is too large (%2 bytes, allowed %3 bytes).")
             .arg(reply->request().url().toString())
             .arg(reply->size())
             .arg(BIP70_MAX_PAYMENTREQUEST_SIZE);

From c2029018cc55c784c4f03c9af4a68015cb7230d2 Mon Sep 17 00:00:00 2001
From: Jacob Welsh <jacob@welshcomputing.com>
Date: Tue, 30 Dec 2014 22:49:42 -0500
Subject: [PATCH 1223/1819] Release notes: fix REST URIs and wrap line

Rebased-From: e64e084e95ca85b038c7f65ad0824d14d03bc044
Github-Pull: #5581
---
 doc/release-notes.md | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index f8fc3f0bc1c6..590a61d0f19c 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -145,10 +145,11 @@ plain HTTP instead of JSON-RPC.
 
 Assuming a local RPC server running on port 8332, it is possible to request:
 - Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
-- Blocks without transactions: http://localhost:8332/block/notxdetails/*HASH*.*EXT*
-- Transactions (requires `-txindex`): http://localhost:8332/tx/*HASH*.*EXT*
+- Blocks without transactions: http://localhost:8332/rest/block/notxdetails/*HASH*.*EXT*
+- Transactions (requires `-txindex`): http://localhost:8332/rest/tx/*HASH*.*EXT*
 
-In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded binary) or `json`.
+In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded
+binary) or `json`.
 
 For more details, see the `doc/REST-interface.md` document in the repository.
 

From 221a38024aa095afe089e6adfbbe65a12654d520 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 30 Dec 2014 02:36:58 -0500
Subject: [PATCH 1224/1819] dmg: fix deterministic dmg creation and docs

Rebased-From: 0d50c2fd81ee7239570954e6eacb3dbbfe3bb5fe
Github-Pull: #5569
---
 contrib/gitian-descriptors/gitian-osx-signer.yml | 6 +++---
 doc/release-process.md                           | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index db9b4af93d0e..1792f9de3f57 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -10,7 +10,7 @@ packages:
 reference_datetime: "2013-06-01 00:00:00"
 remotes: []
 files:
-- "bitcoin-0.9.99-osx-unsigned.tar.gz"
+- "bitcoin-osx-unsigned.tar.gz"
 - "signature.tar.gz"
 script: |
   WRAP_DIR=$HOME/wrapped
@@ -28,8 +28,8 @@ script: |
     chmod +x ${WRAP_DIR}/${prog}
   done
 
-  UNSIGNED=`echo bitcoin-*.tar.gz`
-  SIGNED=`echo ${UNSIGNED} | sed 's/.tar.*//' | sed 's/-unsigned//'`.dmg
+  UNSIGNED=bitcoin-osx-unsigned.tar.gz
+  SIGNED=bitcoin-osx-signed.dmg
 
   tar -xf ${UNSIGNED}
   ./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz
diff --git a/doc/release-process.md b/doc/release-process.md
index 30f9797752d7..eb2eb619bd75 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -68,7 +68,7 @@ Release Process
 	mv build/out/bitcoin-*.zip build/out/bitcoin-*.exe ../
 	./bin/gbuild --commit bitcoin=v${VERSION} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
 	./bin/gsign --signer $SIGNER --release ${VERSION}-osx-unsigned --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
-	mv build/out/bitcoin-*-unsigned.tar.gz inputs
+	mv build/out/bitcoin-*-unsigned.tar.gz inputs/bitcoin-osx-unsigned.tar.gz
 	mv build/out/bitcoin-*.tar.gz build/out/bitcoin-*.dmg ../
 	popd
   Build output expected:
@@ -102,7 +102,7 @@ Commit your signature to gitian.sigs:
 	cp signature.tar.gz inputs/
 	./bin/gbuild -i ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
 	./bin/gsign --signer $SIGNER --release ${VERSION}-osx-signed --destination ../gitian.sigs/ ../bitcoin/contrib/gitian-descriptors/gitian-osx-signer.yml
-	mv build/out/bitcoin-${VERSION}-osx.dmg ../
+	mv build/out/bitcoin-osx-signed.dmg ../bitcoin-${VERSION}-osx.dmg
 	popd
 
 Commit your signature for the signed OSX binary:

From 94b362dbd64ca39c642400cbae45743ef597a9b7 Mon Sep 17 00:00:00 2001
From: Thomas Zander <thomas@thomaszander.se>
Date: Sun, 28 Dec 2014 22:39:53 +0100
Subject: [PATCH 1225/1819] On close of splashscreen interrupt verifyDB

With the splashscreen being able to be closed it is possible to
shutdown during the lengthy verifyDB method. (Takes about a minute
on my machine). This change allows us to shutdown much sooner.

Github-Pull: #5557
Rebased-From: 70477a0bdf6eb6d123ce256f064bbd3bc356c82a
---
 src/main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index 69fb5e258844..c40a5e1672e0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2986,6 +2986,8 @@ bool CVerifyDB::VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth
             } else
                 nGoodTransactions += block.vtx.size();
         }
+        if (ShutdownRequested())
+            return true;
     }
     if (pindexFailure)
         return error("VerifyDB() : *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainActive.Height() - pindexFailure->nHeight + 1, nGoodTransactions);

From 4a3d3e20c0bc35e6a7263c2c621c21d70d3e660e Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Sun, 4 Jan 2015 19:45:51 -0500
Subject: [PATCH 1226/1819] Fix typo in release notes

---
 doc/release-notes.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index da7724347212..757b1a4432d9 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -180,7 +180,7 @@ Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library
 
 The purpose of this library is to make the verification functionality that is
 critical to Bitcoin's consensus available to other applications, e.g. to language
-bindings such as [python_bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or
+bindings such as [python-bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or
 alternative node implementations.
 
 This library is called `libbitcoinconsensus.so` (or, `.dll` for Windows).

From 58fda4d6895aa1aba1d7a31500c0f823e736c3fa Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 23 Dec 2014 17:43:32 +0100
Subject: [PATCH 1227/1819] Update seed IPs, based on bitcoin.sipa.be crawler
 data

Rebased-From: be22b3da1df15757ef15e4c4963507bcdff6a872
Github-Pull: #5532
---
 contrib/seeds/README.md    |   11 +-
 contrib/seeds/makeseeds.py |  122 +++-
 share/seeds/nodes_main.txt | 1115 +++++++++++++++++-------------------
 src/chainparamsseeds.h     | 1092 ++++++++++++++++-------------------
 4 files changed, 1123 insertions(+), 1217 deletions(-)

diff --git a/contrib/seeds/README.md b/contrib/seeds/README.md
index f9a0c277e2e7..bc88201f0fae 100644
--- a/contrib/seeds/README.md
+++ b/contrib/seeds/README.md
@@ -1,11 +1,8 @@
 ### Seeds ###
 
-Utility to generate the pnSeed[] array that is compiled into the client
-(see [src/net.cpp](/src/net.cpp)).
+Utility to generate the seeds.txt list that is compiled into the client
+(see [src/chainparamsseeds.h](/src/chainparamsseeds.h) and [share/seeds](/share/seeds)).
 
-The 600 seeds compiled into the 0.8 release were created from sipa's DNS seed data, like this:
+The 512 seeds compiled into the 0.10 release were created from sipa's DNS seed data, like this:
 
-	curl -s http://bitcoin.sipa.be/seeds.txt | head -1000 | makeseeds.py
-
-The input to makeseeds.py is assumed to be approximately sorted from most-reliable to least-reliable,
-with IP:port first on each line (lines that don't match IPv4:port are ignored).
+	curl -s http://bitcoin.sipa.be/seeds.txt | makeseeds.py
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
index 1d01fd7d209f..b831395f2c71 100755
--- a/contrib/seeds/makeseeds.py
+++ b/contrib/seeds/makeseeds.py
@@ -1,32 +1,118 @@
 #!/usr/bin/env python
 #
-# Generate pnSeed[] from Pieter's DNS seeder
+# Generate seeds.txt from Pieter's DNS seeder
 #
 
-NSEEDS=600
+NSEEDS=512
+
+MAX_SEEDS_PER_ASN=2
+
+MIN_BLOCKS = 337600
+
+# These are hosts that have been observed to be behaving strangely (e.g.
+# aggressively connecting to every node).
+SUSPICIOUS_HOSTS = set([
+    "130.211.129.106", "178.63.107.226",
+    "83.81.130.26", "88.198.17.7", "148.251.238.178", "176.9.46.6",
+    "54.173.72.127", "54.174.10.182", "54.183.64.54", "54.194.231.211",
+    "54.66.214.167", "54.66.220.137", "54.67.33.14", "54.77.251.214",
+    "54.94.195.96", "54.94.200.247"
+])
 
 import re
 import sys
-from subprocess import check_output
+import dns.resolver
+
+PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})):8333$")
+PATTERN_AGENT = re.compile(r"^(\/Satoshi:0.8.6\/|\/Satoshi:0.9.(2|3)\/|\/Satoshi:0.10.\d{1,2}\/)$")
+
+def parseline(line):
+    sline = line.split()
+    if len(sline) < 11:
+       return None
+    # Match only IPv4
+    m = PATTERN_IPV4.match(sline[0])
+    if m is None:
+        return None
+    # Do IPv4 sanity check
+    ip = 0
+    for i in range(0,4):
+        if int(m.group(i+2)) < 0 or int(m.group(i+2)) > 255:
+            return None
+        ip = ip + (int(m.group(i+2)) << (8*(3-i)))
+    if ip == 0:
+        return None
+    # Skip bad results.
+    if sline[1] == 0:
+        return None
+    # Extract uptime %.
+    uptime30 = float(sline[7][:-1])
+    # Extract Unix timestamp of last success.
+    lastsuccess = int(sline[2])
+    # Extract protocol version.
+    version = int(sline[10])
+    # Extract user agent.
+    agent = sline[11][1:-1]
+    # Extract service flags.
+    service = int(sline[9], 16)
+    # Extract blocks.
+    blocks = int(sline[8])
+    # Construct result.
+    return {
+        'ip': m.group(1),
+        'ipnum': ip,
+        'uptime': uptime30,
+        'lastsuccess': lastsuccess,
+        'version': version,
+        'agent': agent,
+        'service': service,
+        'blocks': blocks,
+    }
+
+# Based on Greg Maxwell's seed_filter.py
+def filterbyasn(ips, max_per_asn, max_total):
+    result = []
+    asn_count = {}
+    for ip in ips:
+        if len(result) == max_total:
+            break
+        try:
+            asn = int([x.to_text() for x in dns.resolver.query('.'.join(reversed(ip['ip'].split('.'))) + '.origin.asn.cymru.com', 'TXT').response.answer][0].split('\"')[1].split(' ')[0])
+            if asn not in asn_count:
+                asn_count[asn] = 0
+            if asn_count[asn] == max_per_asn:
+                continue
+            asn_count[asn] += 1
+            result.append(ip)
+        except:
+            sys.stderr.write('ERR: Could not resolve ASN for "' + ip['ip'] + '"\n')
+    return result
 
 def main():
     lines = sys.stdin.readlines()
+    ips = [parseline(line) for line in lines]
+
+    # Skip entries with valid IPv4 address.
+    ips = [ip for ip in ips if ip is not None]
+    # Skip entries from suspicious hosts.
+    ips = [ip for ip in ips if ip['ip'] not in SUSPICIOUS_HOSTS]
+    # Enforce minimal number of blocks.
+    ips = [ip for ip in ips if ip['blocks'] >= MIN_BLOCKS]
+    # Require service bit 1.
+    ips = [ip for ip in ips if (ip['service'] & 1) == 1]
+    # Require at least 50% 30-day uptime.
+    ips = [ip for ip in ips if ip['uptime'] > 50]
+    # Require a known and recent user agent.
+    ips = [ip for ip in ips if PATTERN_AGENT.match(ip['agent'])]
+    # Sort by availability (and use last success as tie breaker)
+    ips.sort(key=lambda x: (x['uptime'], x['lastsuccess'], x['ip']), reverse=True)
+    # Look up ASNs and limit results, both per ASN and globally.
+    ips = filterbyasn(ips, MAX_SEEDS_PER_ASN, NSEEDS)
+    # Sort the results by IP address (for deterministic output).
+    ips.sort(key=lambda x: (x['ipnum']))
 
-    ips = []
-    pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):8333")
-    for line in lines:
-        m = pattern.match(line)
-        if m is None:
-            continue
-        ip = 0
-        for i in range(0,4):
-            ip = ip + (int(m.group(i+1)) << (8*(i)))
-        if ip == 0:
-            continue
-        ips.append(ip)
-
-    for row in range(0, min(NSEEDS,len(ips)), 8):
-        print "    " + ", ".join([ "0x%08x"%i for i in ips[row:row+8] ]) + ","
+    for ip in ips:
+        print ip['ip']
 
 if __name__ == '__main__':
     main()
diff --git a/share/seeds/nodes_main.txt b/share/seeds/nodes_main.txt
index f2558cf3c4f2..3dba6d8a6482 100644
--- a/share/seeds/nodes_main.txt
+++ b/share/seeds/nodes_main.txt
@@ -1,607 +1,518 @@
 # List of fixed seed nodes for main network
 
-# IPv4 nodes (in old chainparams.cpp 0xDDCCBBAA format)
-#  n.b. when importing a new list, there is no need to use this format, just use IPv4 dotted addresses directly
-0x7e6a692e # 46.105.106.126
-0x7d04d1a2 # 162.209.4.125
-0x6c0c17d9 # 217.23.12.108
-0xdb330ab9 # 185.10.51.219
-0xc649c7c6 # 198.199.73.198
-0x7895484d # 77.72.149.120
-0x047109b0 # 176.9.113.4
-0xb90ca5bc # 188.165.12.185
-0xd130805f # 95.128.48.209
-0xbd074ea6 # 166.78.7.189
-0x578ff1c0 # 192.241.143.87
-0x286e09b0 # 176.9.110.40
-0xd4dcaf42 # 66.175.220.212
-0x529b6bb8 # 184.107.155.82
-0x635cc6c0 # 192.198.92.99
-0xedde892e # 46.137.222.237
-0xa976d9c7 # 199.217.118.169
-0xea91a4b8 # 184.164.145.234
-0x03fa4eb2 # 178.78.250.3
-0x6ca9008d # 141.0.169.108
-0xaf62c825 # 37.200.98.175
-0x93f3ba51 # 81.186.243.147
-0xc2c9efd5 # 213.239.201.194
-0x0ed5175e # 94.23.213.14
-0x487028bc # 188.40.112.72
-0x7297c225 # 37.194.151.114
-0x8af0c658 # 88.198.240.138
-0x2e57ba1f # 31.186.87.46
-0xd0098abc # 188.138.9.208
-0x46a8853e # 62.133.168.70
-0xcc92dc3e # 62.220.146.204
-0xeb6f1955 # 85.25.111.235
-0x8cce175e # 94.23.206.140
-0x237281ae # 174.129.114.35
-0x9d42795b # 91.121.66.157
-0x4f4f0905 # 5.9.79.79
-0xc50151d0 # 208.81.1.197
-0xb1ba90c6 # 198.144.186.177
-0xaed7175e # 94.23.215.174
-0x204de55b # 91.229.77.32
-0x4bb03245 # 69.50.176.75
-0x932b28bc # 188.40.43.147
-0x2dcce65b # 91.230.204.45
-0xe2708abc # 188.138.112.226
-0x1b08b8d5 # 213.184.8.27
-0x12a3dc5b # 91.220.163.18
-0x8a884c90 # 144.76.136.138
-0xa386a8b8 # 184.168.134.163
-0x18e417c6 # 198.23.228.24
-0x2e709ac3 # 195.154.112.46
-0xeb62e925 # 37.233.98.235
-0x6f6503ae # 174.3.101.111
-0x05d0814e # 78.129.208.5
-0x8a9ac545 # 69.197.154.138
-0x946fd65e # 94.214.111.148
-0x3f57495d # 93.73.87.63
-0x4a29c658 # 88.198.41.74
-0xad454c90 # 144.76.69.173
-0x15340905 # 5.9.52.21
-0x4c3f3b25 # 37.59.63.76
-0x01fe19b9 # 185.25.254.1
-0x5620595b # 91.89.32.86
-0x443c795b # 91.121.60.68
-0x44f24ac8 # 200.74.242.68
-0x0442464e # 78.70.66.4
-0xc8665882 # 130.88.102.200
-0xed3f3ec3 # 195.62.63.237
-0xf585bf5d # 93.191.133.245
-0x5dd141da # 218.65.209.93
-0xf93a084e # 78.8.58.249
-0x1264dd52 # 82.221.100.18
-0x0711c658 # 88.198.17.7
-0xf12e7bbe # 190.123.46.241
-0x5b02b740 # 64.183.2.91
-0x7d526dd5 # 213.109.82.125
-0x0cb04c90 # 144.76.176.12
-0x2abe1132 # 50.17.190.42
-0x61a39f58 # 88.159.163.97
-0x044a0618 # 24.6.74.4
-0xf3af7dce # 206.125.175.243
-0xb994c96d # 109.201.148.185
-0x361c5058 # 88.80.28.54
-0xca735d53 # 83.93.115.202
-0xeca743b0 # 176.67.167.236
-0xec790905 # 5.9.121.236
-0xc4d37845 # 69.120.211.196
-0xa1c4a2b2 # 178.162.196.161
-0x726fd453 # 83.212.111.114
-0x625cc6c0 # 192.198.92.98
-0x6c20132e # 46.19.32.108
-0xb7aa0c79 # 121.12.170.183
-0xc6ed983d # 61.152.237.198
-0x47e4cbc0 # 192.203.228.71
-0xa4ac75d4 # 212.117.172.164
-0xe2e59345 # 69.147.229.226
-0x4d784ad0 # 208.74.120.77
-0x18a5ec5e # 94.236.165.24
-0x481cc85b # 91.200.28.72
-0x7c6c2fd5 # 213.47.108.124
-0x5e4d6018 # 24.96.77.94
-0x5b4b6c18 # 24.108.75.91
-0xd99b4c90 # 144.76.155.217
-0xe63987dc # 220.135.57.230
-0xb817bb25 # 37.187.23.184
-0x141cfeb2 # 178.254.28.20
-0x5f005058 # 88.80.0.95
-0x0d987f47 # 71.127.152.13
-0x242a496d # 109.73.42.36
-0x3e519bc0 # 192.155.81.62
-0x02b2454b # 75.69.178.2
-0xdfaf3dc6 # 198.61.175.223
-0x888128bc # 188.40.129.136
-0x1165bb25 # 37.187.101.17
-0xabfeca5b # 91.202.254.171
-0x2ef63540 # 64.53.246.46
-0x5773c7c6 # 198.199.115.87
-0x1280dd52 # 82.221.128.18
-0x8ebcacd9 # 217.172.188.142
-0x81c439c6 # 198.57.196.129
-0x39fcfa45 # 69.250.252.57
-0x62177d41 # 65.125.23.98
-0xc975ed62 # 98.237.117.201
-0x05cff476 # 118.244.207.5
-0xdabda743 # 67.167.189.218
-0xaa1ac24e # 78.194.26.170
-0xe255a22e # 46.162.85.226
-0x88aac705 # 5.199.170.136
-0xe707c658 # 88.198.7.231
-0xa9e94b5e # 94.75.233.169
-0x2893484b # 75.72.147.40
-0x99512705 # 5.39.81.153
-0xd63970ca # 202.112.57.214
-0x45994f32 # 50.79.153.69
-0xe519a8ad # 173.168.25.229
-0x92e25f5d # 93.95.226.146
-0x8b84a9c1 # 193.169.132.139
-0x5eaa0a05 # 5.10.170.94
-0xa74de55b # 91.229.77.167
-0xb090ff62 # 98.255.144.176
-0x5eee326c # 108.50.238.94
-0xc331a679 # 121.166.49.195
-0xc1d9b72e # 46.183.217.193
-0x0c6ab982 # 130.185.106.12
-0x7362bb25 # 37.187.98.115
-0x4cfedd42 # 66.221.254.76
-0x1e09a032 # 50.160.9.30
-0xa4c34c5e # 94.76.195.164
-0x3777d9c7 # 199.217.119.55
-0x5edcf260 # 96.242.220.94
-0x3ce2b548 # 72.181.226.60
-0xd2ac0360 # 96.3.172.210
-0x2f80b992 # 146.185.128.47
-0x3e4cbb25 # 37.187.76.62
-0x3995e236 # 54.226.149.57
-0xd03977ae # 174.119.57.208
-0x953cf054 # 84.240.60.149
-0x3c654ed0 # 208.78.101.60
-0x74024c90 # 144.76.2.116
-0xa14f1155 # 85.17.79.161
-0x14ce0125 # 37.1.206.20
-0xc15ebb6a # 106.187.94.193
-0x2c08c452 # 82.196.8.44
-0xc7fd0652 # 82.6.253.199
-0x7604f8ce # 206.248.4.118
-0xffb38332 # 50.131.179.255
-0xa4c2efd5 # 213.239.194.164
-0xe9614018 # 24.64.97.233
-0xab49e557 # 87.229.73.171
-0x1648c052 # 82.192.72.22
-0x36024047 # 71.64.2.54
-0x0e8cffad # 173.255.140.14
-0x21918953 # 83.137.145.33
-0xb61f50ad # 173.80.31.182
-0x9b406b59 # 89.107.64.155
-0xaf282218 # 24.34.40.175
-0x7f1d164e # 78.22.29.127
-0x1f560da2 # 162.13.86.31
-0xe237be58 # 88.190.55.226
-0xbdeb1955 # 85.25.235.189
-0x6c0717d9 # 217.23.7.108
-0xdaf8ce62 # 98.206.248.218
-0x0f74246c # 108.36.116.15
-0xdee95243 # 67.82.233.222
-0xf23f1a56 # 86.26.63.242
-0x61bdf867 # 103.248.189.97
-0xd254c854 # 84.200.84.210
-0xc4422e4e # 78.46.66.196
-0xae0563c0 # 192.99.5.174
-0xbdb9a95f # 95.169.185.189
-0xa9eb32c6 # 198.50.235.169
-0xd9943950 # 80.57.148.217
-0x116add52 # 82.221.106.17
-0x73a54c90 # 144.76.165.115
-0xb36b525e # 94.82.107.179
-0xd734175e # 94.23.52.215
-0x333d7f76 # 118.127.61.51
-0x51431bc6 # 198.27.67.81
-0x084ae5cf # 207.229.74.8
-0xa60a236c # 108.35.10.166
-0x5c67692e # 46.105.103.92
-0x0177cf45 # 69.207.119.1
-0xa6683ac6 # 198.58.104.166
-0x7ff4ea47 # 71.234.244.127
-0x2192fab2 # 178.250.146.33
-0xa03a0f46 # 70.15.58.160
-0xfe3e39ae # 174.57.62.254
-0x2cce5fc1 # 193.95.206.44
-0xc8a6c148 # 72.193.166.200
-0x96fb7e4c # 76.126.251.150
-0x0a66c752 # 82.199.102.10
-0x6b4d2705 # 5.39.77.107
-0xeba0c118 # 24.193.160.235
-0x3ba0795b # 91.121.160.59
-0x1dccd23e # 62.210.204.29
-0x6912f3a2 # 162.243.18.105
-0x22f23c41 # 65.60.242.34
-0x65646b4a # 74.107.100.101
-0x8b9f8705 # 5.135.159.139
-0xeb9b9a95 # 149.154.155.235
-0x79fe6b4e # 78.107.254.121
-0x0536f447 # 71.244.54.5
-0x23224d61 # 97.77.34.35
-0x5d952ec6 # 198.46.149.93
-0x0cb4f736 # 54.247.180.12
-0xdc14be6d # 109.190.20.220
-0xb24609b0 # 176.9.70.178
-0xd3f79b62 # 98.155.247.211
-0x6518c836 # 54.200.24.101
-0x83a3cf42 # 66.207.163.131
-0x9b641fb0 # 176.31.100.155
-0x17fef1c0 # 192.241.254.23
-0xd508cc82 # 130.204.8.213
-0x91a4369b # 155.54.164.145
-0x39cb4a4c # 76.74.203.57
-0xbbc9536c # 108.83.201.187
-0xaf64c44a # 74.196.100.175
-0x605eca50 # 80.202.94.96
-0x0c6a6805 # 5.104.106.12
-0xd07e9d4e # 78.157.126.208
-0x78e6d3a2 # 162.211.230.120
-0x1b31eb6d # 109.235.49.27
-0xaa01feb2 # 178.254.1.170
-0x4603c236 # 54.194.3.70
-0x1ecba3b6 # 182.163.203.30
-0x0effe336 # 54.227.255.14
-0xc3fdcb36 # 54.203.253.195
-0xc290036f # 111.3.144.194
-0x4464692e # 46.105.100.68
-0x1aca7589 # 137.117.202.26
-0x59a9e52e # 46.229.169.89
-0x19aa7489 # 137.116.170.25
-0x2622c85e # 94.200.34.38
-0xa598d318 # 24.211.152.165
-0x438ec345 # 69.195.142.67
-0xc79619b9 # 185.25.150.199
-0xaf570360 # 96.3.87.175
-0x5098e289 # 137.226.152.80
-0x36add862 # 98.216.173.54
-0x83c1a2b2 # 178.162.193.131
-0x969d0905 # 5.9.157.150
-0xcf3d156c # 108.21.61.207
-0x49c1a445 # 69.164.193.73
-0xbd0b7562 # 98.117.11.189
-0x8fff1955 # 85.25.255.143
-0x1e51fe53 # 83.254.81.30
-0x28d6efd5 # 213.239.214.40
-0x2837cc62 # 98.204.55.40
-0x02f42d42 # 66.45.244.2
-0x070e3fb2 # 178.63.14.7
-0xbcb18705 # 5.135.177.188
-0x14a4e15b # 91.225.164.20
-0x82096844 # 68.104.9.130
-0xcfcb1c2e # 46.28.203.207
-0x37e27fc7 # 199.127.226.55
-0x07923748 # 72.55.146.7
-0x0c14bc2e # 46.188.20.12
-0x26100905 # 5.9.16.38
-0xcb7cd93e # 62.217.124.203
-0x3bc0d2c0 # 192.210.192.59
-0x97131b4c # 76.27.19.151
-0x6f1e5c17 # 23.92.30.111
-0xa7939f43 # 67.159.147.167
-0xb7a0bf58 # 88.191.160.183
-0xafa83a47 # 71.58.168.175
-0xcbb83f32 # 50.63.184.203
-0x5f321cb0 # 176.28.50.95
-0x52d6c3c7 # 199.195.214.82
-0xdeac5bc7 # 199.91.172.222
-0x2cf310cc # 204.16.243.44
-0x108a2bc3 # 195.43.138.16
-0x726fa14f # 79.161.111.114
-0x85bad2cc # 204.210.186.133
-0x459e4c90 # 144.76.158.69
-0x1a08b8d8 # 216.184.8.26
-0xcd7048c6 # 198.72.112.205
-0x6d5b4c90 # 144.76.91.109
-0xa66cfe7b # 123.254.108.166
-0xad730905 # 5.9.115.173
-0xdaac5bc7 # 199.91.172.218
-0x8417fd9f # 159.253.23.132
-0x41377432 # 50.116.55.65
-0x1f138632 # 50.134.19.31
-0x295a12b2 # 178.18.90.41
-0x7ac031b2 # 178.49.192.122
-0x3a87d295 # 149.210.135.58
-0xe219bc2e # 46.188.25.226
-0xf485d295 # 149.210.133.244
-0x137b6405 # 5.100.123.19
-0xcfffd9ad # 173.217.255.207
-0xafe20844 # 68.8.226.175
-0x32679a5f # 95.154.103.50
-0xa431c644 # 68.198.49.164
-0x0e5fce8c # 140.206.95.14
-0x305ef853 # 83.248.94.48
-0xad26ca32 # 50.202.38.173
-0xd9d21a54 # 84.26.210.217
-0xddd0d736 # 54.215.208.221
-0xc24ec0c7 # 199.192.78.194
-0x4aadcd5b # 91.205.173.74
-0x49109852 # 82.152.16.73
-0x9d6b3ac6 # 198.58.107.157
-0xf0aa1e8b # 139.30.170.240
-0xf1bfa343 # 67.163.191.241
-0x8a30c0ad # 173.192.48.138
-0x260f93d4 # 212.147.15.38
-0x2339e760 # 96.231.57.35
-0x8869959f # 159.149.105.136
-0xc207216c # 108.33.7.194
-0x29453448 # 72.52.69.41
-0xb651ec36 # 54.236.81.182
-0x45496259 # 89.98.73.69
-0xa23d1bcc # 204.27.61.162
-0xb39bcf43 # 67.207.155.179
-0xa1d29432 # 50.148.210.161
-0x3507c658 # 88.198.7.53
-0x4a88dd62 # 98.221.136.74
-0x27aff363 # 99.243.175.39
-0x7498ea6d # 109.234.152.116
-0x4a6785d5 # 213.133.103.74
-0x5e6d47c2 # 194.71.109.94
-0x3baba542 # 66.165.171.59
-0x045a37ae # 174.55.90.4
-0xa24dc0c7 # 199.192.77.162
-0xe981ea4d # 77.234.129.233
-0xed6ce217 # 23.226.108.237
-0x857214c6 # 198.20.114.133
-0x6b6c0464 # 100.4.108.107
-0x5a4945b8 # 184.69.73.90
-0x12f24742 # 66.71.242.18
-0xf35f42ad # 173.66.95.243
-0xfd0f5a4e # 78.90.15.253
-0xfb081556 # 86.21.8.251
-0xb24b5861 # 97.88.75.178
-0x2e114146 # 70.65.17.46
-0xb7780905 # 5.9.120.183
-0x33bb0e48 # 72.14.187.51
-0x39e26556 # 86.101.226.57
-0xa794484d # 77.72.148.167
-0x4225424d # 77.66.37.66
-0x3003795b # 91.121.3.48
-0x31c8cf44 # 68.207.200.49
-0xd65bad59 # 89.173.91.214
-0x127bc648 # 72.198.123.18
-0xf2bc4d4c # 76.77.188.242
-0x0273dc50 # 80.220.115.2
-0x4572d736 # 54.215.114.69
-0x064bf653 # 83.246.75.6
-0xcdcd126c # 108.18.205.205
-0x608281ae # 174.129.130.96
-0x4d130087 # 135.0.19.77
-0x1016f725 # 37.247.22.16
-0xba185fc0 # 192.95.24.186
-0x16c1a84f # 79.168.193.22
-0xfb697252 # 82.114.105.251
-0xa2942360 # 96.35.148.162
-0x53083b6c # 108.59.8.83
-0x0583f1c0 # 192.241.131.5
-0x2d5a2441 # 65.36.90.45
-0xc172aa43 # 67.170.114.193
-0xcd11cf36 # 54.207.17.205
-0x7b14ed62 # 98.237.20.123
-0x5c94f1c0 # 192.241.148.92
-0x7c23132e # 46.19.35.124
-0x39965a6f # 111.90.150.57
-0x7890e24e # 78.226.144.120
-0xa38ec447 # 71.196.142.163
-0xc187f1c0 # 192.241.135.193
-0xef80b647 # 71.182.128.239
-0xf20a7432 # 50.116.10.242
-0x7ad1d8d2 # 210.216.209.122
-0x869e2ec6 # 198.46.158.134
-0xccdb5c5d # 93.92.219.204
-0x9d11f636 # 54.246.17.157
-0x2161bb25 # 37.187.97.33
-0x7599f889 # 137.248.153.117
-0x2265ecad # 173.236.101.34
-0x0f4f0e55 # 85.14.79.15
-0x7d25854a # 74.133.37.125
-0xf857e360 # 96.227.87.248
-0xf83f3d6c # 108.61.63.248
-0x9cc93bb8 # 184.59.201.156
-0x02716857 # 87.104.113.2
-0x5dd8a177 # 119.161.216.93
-0x8adc6cd4 # 212.108.220.138
-0xe5613d46 # 70.61.97.229
-0x6a734f50 # 80.79.115.106
-0x2a5c3bae # 174.59.92.42
-0x4a04c3d1 # 209.195.4.74
-0xe4613d46 # 70.61.97.228
-0x8426f4bc # 188.244.38.132
-0x3e1b5fc0 # 192.95.27.62
-0x0d5a3c18 # 24.60.90.13
-0xd0f6d154 # 84.209.246.208
-0x21c7ff5e # 94.255.199.33
-0xeb3f3d6c # 108.61.63.235
-0x9da5edc0 # 192.237.165.157
-0x5d753b81 # 129.59.117.93
-0x0d8d53d4 # 212.83.141.13
-0x2613f018 # 24.240.19.38
-0x4443698d # 141.105.67.68
-0x8ca1edcd # 205.237.161.140
-0x10ed3f4e # 78.63.237.16
-0x789b403a # 58.64.155.120
-0x7b984a4b # 75.74.152.123
-0x964ebc25 # 37.188.78.150
-0x7520ee60 # 96.238.32.117
-0x4f4828bc # 188.40.72.79
-0x115c407d # 125.64.92.17
-0x32dd0667 # 103.6.221.50
-0xa741715e # 94.113.65.167
-0x1d3f3532 # 50.53.63.29
-0x817d1f56 # 86.31.125.129
-0x2f99a552 # 82.165.153.47
-0x6b2a5956 # 86.89.42.107
-0x8d4f4f05 # 5.79.79.141
-0xd23c1e17 # 23.30.60.210
-0x98993748 # 72.55.153.152
-0x2c92e536 # 54.229.146.44
-0x237ebdc3 # 195.189.126.35
-0xa762fb43 # 67.251.98.167
-0x32016b71 # 113.107.1.50
-0xd0e7cf79 # 121.207.231.208
-0x7d35bdd5 # 213.189.53.125
-0x53dac3d2 # 210.195.218.83
-0x31016b71 # 113.107.1.49
-0x7fb8f8ce # 206.248.184.127
-0x9a38c232 # 50.194.56.154
-0xefaa42ad # 173.66.170.239
-0x876b823d # 61.130.107.135
-0x18175347 # 71.83.23.24
-0xdb46597d # 125.89.70.219
-0xd2c168da # 218.104.193.210
-0xcd6fe9dc # 220.233.111.205
-0x45272e4e # 78.46.39.69
-0x8d4bca5b # 91.202.75.141
-0xa4043d47 # 71.61.4.164
-0xaab7aa47 # 71.170.183.170
-0x202881ae # 174.129.40.32
-0xa4aef160 # 96.241.174.164
-0xecd7e6bc # 188.230.215.236
-0x391359ad # 173.89.19.57
-0xd8cc9318 # 24.147.204.216
-0xbbeee52e # 46.229.238.187
-0x077067b0 # 176.103.112.7
-0xebd39d62 # 98.157.211.235
-0x0cedc547 # 71.197.237.12
-0x23d3e15e # 94.225.211.35
-0xa5a81318 # 24.19.168.165
-0x179a32c6 # 198.50.154.23
-0xe4d3483d # 61.72.211.228
-0x03680905 # 5.9.104.3
-0xe8018abc # 188.138.1.232
-0xdde9ef5b # 91.239.233.221
-0x438b8705 # 5.135.139.67
-0xb48224a0 # 160.36.130.180
-0xcbd69218 # 24.146.214.203
-0x9075795b # 91.121.117.144
-0xc6411c3e # 62.28.65.198
-0x03833f5c # 92.63.131.3
-0xf33f8b5e # 94.139.63.243
-0x495e464b # 75.70.94.73
-0x83c8e65b # 91.230.200.131
-0xac09cd25 # 37.205.9.172
-0xdaabc547 # 71.197.171.218
-0x7665a553 # 83.165.101.118
-0xc5263718 # 24.55.38.197
-0x2fd0c5cd # 205.197.208.47
-0x22224d61 # 97.77.34.34
-0x3e954048 # 72.64.149.62
-0xfaa37557 # 87.117.163.250
-0x36dbc658 # 88.198.219.54
-0xa81453d0 # 208.83.20.168
-0x5a941f5d # 93.31.148.90
-0xa598ea60 # 96.234.152.165
-0x65384ac6 # 198.74.56.101
-0x10aaa545 # 69.165.170.16
-0xaaab795b # 91.121.171.170
-0xdda7024c # 76.2.167.221
-0x0966f4c6 # 198.244.102.9
-0x68571c08 # 8.28.87.104
-0x8b40ee59 # 89.238.64.139
-0x33ac096c # 108.9.172.51
-0x844b4c4b # 75.76.75.132
-0xd392254d # 77.37.146.211
-0xba4d5a46 # 70.90.77.186
-0x63029653 # 83.150.2.99
-0xf655f636 # 54.246.85.246
-0xbe4c4bb1 # 177.75.76.190
-0x45dad036 # 54.208.218.69
-0x204bc052 # 82.192.75.32
-0x06c3a2b2 # 178.162.195.6
-0xf31fba6a # 106.186.31.243
-0xb21f09b0 # 176.9.31.178
-0x540d0751 # 81.7.13.84
-0xc7b46a57 # 87.106.180.199
-0x6a11795b # 91.121.17.106
-0x3d514045 # 69.64.81.61
-0x0318aa6d # 109.170.24.3
-0x30306ec3 # 195.110.48.48
-0x5c077432 # 50.116.7.92
-0x259ae46d # 109.228.154.37
-0x82bbd35f # 95.211.187.130
-0xae4222c0 # 192.34.66.174
-0x254415d4 # 212.21.68.37
-0xbd5f574b # 75.87.95.189
-0xd8fd175e # 94.23.253.216
-0x0a3f38c3 # 195.56.63.10
-0x2dce6bb8 # 184.107.206.45
-0xc201d058 # 88.208.1.194
-0x17fca5bc # 188.165.252.23
-0xe8453cca # 202.60.69.232
-0xd361f636 # 54.246.97.211
-0xa0d9edc0 # 192.237.217.160
-0x2f232e4e # 78.46.35.47
-0x134e116c # 108.17.78.19
-0x61ddc058 # 88.192.221.97
-0x05ba7283 # 131.114.186.5
-0xe1f7ed5b # 91.237.247.225
-0x040ec452 # 82.196.14.4
-0x4b672e4e # 78.46.103.75
-0xe4efa36d # 109.163.239.228
-0x47dca52e # 46.165.220.71
-0xe9332e4e # 78.46.51.233
-0xa3acb992 # 146.185.172.163
-0x24714c90 # 144.76.113.36
-0xa8cc8632 # 50.134.204.168
-0x26b1ce6d # 109.206.177.38
-0x264e53d4 # 212.83.78.38
-0xd3d2718c # 140.113.210.211
-0x225534ad # 173.52.85.34
-0xe289f3a2 # 162.243.137.226
-0x87341717 # 23.23.52.135
-0x9255ad4f # 79.173.85.146
-0x184bbb25 # 37.187.75.24
-0x885c7abc # 188.122.92.136
-0x3a6e9ac6 # 198.154.110.58
-0x1924185e # 94.24.36.25
-0xb73d4c90 # 144.76.61.183
-0x946d807a # 122.128.109.148
-0xa0d78e3f # 63.142.215.160
-0x5a16bb25 # 37.187.22.90
-0xcb09795b # 91.121.9.203
-0x8d0de657 # 87.230.13.141
-0x630b8b25 # 37.139.11.99
-0xe572c6cf # 207.198.114.229
-0x2b3f1118 # 24.17.63.43
-0x4242a91f # 31.169.66.66
-0x32990905 # 5.9.153.50
-0x058b0905 # 5.9.139.5
-0xe266fc60 # 96.252.102.226
-0xbe66c5b0 # 176.197.102.190
-0xcc98e46d # 109.228.152.204
-0x698c943e # 62.148.140.105
-0x44bd0cc3 # 195.12.189.68
-0x865c7abc # 188.122.92.134
-0x771764d3 # 211.100.23.119
-0x4675d655 # 85.214.117.70
-0x354e4826 # 38.72.78.53
-0xb67ac152 # 82.193.122.182
-0xaeccf285 # 133.242.204.174
-0xea625b4e # 78.91.98.234
-0xbcd6031f # 31.3.214.188
-0x5e81eb18 # 24.235.129.94
-0x74b347ce # 206.71.179.116
-0x3ca56ac1 # 193.106.165.60
-0x54ee4546 # 70.69.238.84
-0x38a8175e # 94.23.168.56
-0xa3c21155 # 85.17.194.163
-0x2f01576d # 109.87.1.47
-0x5d7ade50 # 80.222.122.93
-0xa003ae48 # 72.174.3.160
-0x2bc1d31f # 31.211.193.43
-0x13f5094c # 76.9.245.19
-0x7ab32648 # 72.38.179.122
-0x542e9fd5 # 213.159.46.84
-0x53136bc1 # 193.107.19.83
-0x7fdf51c0 # 192.81.223.127
-0x802197b2 # 178.151.33.128
-0xa2d2cc5b # 91.204.210.162
-0x6b5f4bc0 # 192.75.95.107
+# IPv4 nodes (generated using contrib/seeds/makeseeds.py)
+1.33.197.110
+1.34.180.245
+1.202.128.218
+2.35.195.25
+5.100.123.19
+5.175.145.169
+5.199.133.193
+5.199.151.10
+5.228.1.230
+14.200.200.145
+18.228.0.188
+18.228.0.200
+23.30.243.153
+23.88.232.49
+23.99.105.9
+23.226.137.208
+23.227.177.161
+23.227.191.50
+23.229.45.32
+23.236.144.69
+23.253.148.113
+23.253.241.22
+23.255.227.231
+24.20.205.222
+24.23.120.252
+24.94.98.96
+24.98.95.201
+24.111.90.55
+24.119.119.105
+24.138.25.149
+31.3.214.45
+31.186.87.46
+31.186.101.98
+31.186.250.186
+31.204.153.107
+37.44.16.231
+37.44.44.11
+37.120.168.204
+37.143.86.26
+37.187.75.24
+37.188.68.169
+37.192.95.150
+37.201.246.116
+37.205.10.140
+46.10.210.17
+46.19.138.154
+46.28.204.123
+46.28.205.67
+46.38.235.229
+46.163.76.230
+46.166.162.91
+46.173.190.50
+46.227.66.132
+46.229.238.187
+46.236.116.209
+47.55.14.65
+50.7.252.229
+50.46.159.91
+50.78.49.181
+50.78.231.57
+50.79.153.65
+50.116.34.44
+50.126.86.253
+50.142.41.23
+50.199.113.193
+50.200.78.107
+50.206.138.177
+50.252.52.49
+54.165.25.75
+54.169.107.40
+54.179.190.56
+54.187.82.121
+54.246.85.246
+58.74.7.205
+58.96.183.121
+61.62.58.38
+61.63.91.72
+61.63.91.112
+61.72.211.228
+62.43.40.154
+62.43.130.178
+62.80.185.213
+62.109.49.26
+62.173.139.58
+62.181.238.186
+62.210.114.127
+63.141.228.138
+63.153.213.78
+63.223.84.145
+63.251.88.112
+64.31.110.50
+64.34.121.45
+64.114.6.42
+64.140.125.98
+64.156.193.100
+65.30.47.116
+65.35.132.177
+65.96.193.165
+65.111.189.26
+66.68.10.30
+66.114.33.250
+66.130.46.63
+66.175.215.135
+66.190.253.165
+66.194.38.254
+66.244.98.111
+67.162.238.30
+67.169.255.17
+67.183.173.25
+67.219.233.140
+67.227.240.115
+67.247.222.71
+68.43.114.66
+68.52.33.36
+68.198.245.241
+69.12.226.165
+69.13.198.188
+69.15.179.62
+69.39.239.47
+69.47.45.87
+69.62.217.206
+69.64.42.31
+69.64.81.61
+69.67.219.200
+69.90.132.157
+69.94.30.177
+69.136.175.241
+70.61.97.228
+70.123.118.132
+71.59.152.182
+71.198.248.151
+71.200.242.89
+71.225.179.157
+72.14.187.51
+72.38.34.180
+72.52.72.187
+72.91.144.182
+72.167.49.217
+72.201.243.55
+72.223.60.249
+72.228.153.102
+73.26.101.228
+73.50.158.200
+73.181.204.170
+74.57.199.180
+74.63.222.226
+74.81.231.21
+74.193.126.82
+74.207.235.164
+75.83.197.114
+75.144.114.9
+76.112.5.247
+76.174.20.247
+77.37.240.142
+77.57.202.107
+77.172.123.53
+77.221.91.253
+77.235.48.48
+77.245.78.2
+78.8.58.249
+78.27.191.182
+78.129.236.141
+78.131.88.47
+78.157.205.6
+79.132.230.144
+79.143.188.155
+79.160.221.140
+79.161.111.114
+80.100.189.3
+80.147.140.121
+80.203.75.133
+80.220.99.227
+80.222.20.169
+80.241.1.7
+81.23.191.243
+81.38.11.202
+81.80.9.71
+81.110.213.165
+81.133.155.237
+81.171.34.37
+81.181.155.180
+82.39.156.137
+82.73.161.95
+82.130.45.40
+82.165.153.47
+82.168.128.133
+82.179.225.118
+82.194.245.158
+82.199.102.10
+82.211.30.243
+82.217.133.145
+82.221.128.35
+82.221.131.177
+82.233.225.205
+83.0.249.146
+83.89.31.249
+83.128.29.231
+83.128.253.142
+83.143.130.56
+83.150.2.99
+83.150.9.196
+83.161.64.45
+83.212.103.212
+83.212.111.114
+83.246.75.8
+83.254.81.31
+83.254.150.54
+84.2.34.104
+84.15.61.60
+84.17.25.135
+84.42.144.19
+84.212.210.135
+84.215.165.231
+84.238.140.176
+84.240.31.184
+85.25.214.137
+85.139.163.132
+85.199.4.228
+85.214.61.209
+85.214.108.77
+86.123.16.17
+87.48.42.199
+87.104.168.104
+87.229.73.171
+87.236.196.77
+88.97.56.98
+88.134.178.89
+88.150.233.19
+88.168.133.3
+88.208.18.246
+88.208.33.202
+89.18.28.21
+89.85.220.84
+89.163.227.28
+89.184.83.60
+89.231.96.83
+89.236.49.117
+91.90.66.209
+91.106.194.97
+91.134.75.115
+91.152.193.36
+91.152.219.35
+91.197.10.234
+91.209.77.101
+91.210.106.147
+91.214.200.205
+91.223.115.38
+91.234.48.232
+91.250.86.18
+92.27.7.209
+92.255.207.73
+93.74.163.234
+93.84.114.106
+93.152.166.29
+93.171.216.221
+93.185.177.71
+94.19.12.244
+94.42.115.50
+94.79.177.206
+94.136.147.119
+94.143.245.5
+94.188.50.39
+94.190.227.112
+94.198.135.29
+94.226.107.86
+94.242.219.90
+94.242.229.168
+94.244.160.84
+95.31.10.209
+95.85.25.41
+95.105.161.136
+95.154.165.45
+95.154.200.216
+95.167.109.125
+95.211.125.231
+95.211.216.235
+96.33.25.17
+96.43.130.178
+97.118.8.236
+98.102.6.125
+98.202.20.45
+98.217.125.225
+98.234.210.111
+98.237.20.123
+98.255.144.176
+99.113.64.43
+99.229.22.8
+103.1.212.19
+103.30.42.189
+103.224.165.48
+103.243.94.140
+104.131.107.107
+104.131.116.184
+104.143.0.156
+104.219.184.9
+106.185.38.174
+107.6.4.145
+107.150.8.27
+107.150.33.20
+107.170.228.129
+107.170.240.173
+108.51.20.86
+108.61.149.222
+108.61.151.172
+108.161.129.247
+108.170.140.21
+109.60.211.216
+109.73.42.36
+109.73.172.138
+109.163.235.239
+109.190.196.220
+109.201.135.216
+109.228.152.2
+109.228.154.81
+109.230.220.125
+109.234.156.218
+109.235.49.27
+109.235.69.84
+112.124.71.0
+113.146.68.251
+115.29.17.82
+115.70.176.17
+117.41.162.184
+118.27.8.170
+119.230.7.211
+119.246.71.52
+121.172.8.100
+122.128.109.148
+123.231.224.63
+128.175.195.31
+128.199.164.96
+128.199.254.244
+129.97.69.76
+129.123.7.7
+129.123.7.39
+129.186.17.17
+131.247.169.190
+133.242.209.63
+134.102.94.38
+134.119.17.145
+137.116.160.176
+137.226.34.42
+138.210.217.170
+141.255.166.194
+143.215.129.126
+144.76.244.19
+146.148.52.162
+146.148.80.57
+146.185.19.30
+146.185.142.86
+146.185.253.51
+148.251.6.214
+149.154.155.235
+149.210.133.244
+151.224.248.252
+153.121.75.229
+153.127.251.67
+154.20.2.139
+157.13.61.5
+158.58.173.48
+159.253.23.132
+162.209.110.218
+162.213.254.205
+162.239.254.100
+162.242.150.39
+162.243.81.138
+162.243.235.56
+162.244.79.16
+162.245.217.119
+162.248.102.117
+162.251.108.53
+162.254.149.139
+162.255.116.78
+166.70.94.106
+167.88.45.124
+167.88.120.210
+173.26.49.43
+173.30.14.6
+173.80.114.197
+173.167.214.243
+173.208.219.108
+173.220.67.156
+173.236.101.34
+173.246.107.34
+173.255.237.241
+174.2.213.209
+174.51.23.224
+174.51.123.159
+174.57.212.121
+174.109.33.28
+175.126.124.91
+175.126.124.92
+176.10.116.242
+176.36.35.126
+176.36.99.222
+176.124.110.47
+176.194.33.44
+176.223.201.198
+178.62.26.83
+178.62.36.48
+178.62.212.141
+178.62.254.59
+178.78.250.3
+178.155.86.226
+178.175.134.35
+178.248.111.4
+178.254.1.170
+178.254.34.161
+179.43.114.14
+182.213.208.28
+184.68.2.46
+184.72.238.42
+184.94.226.34
+184.94.227.58
+184.107.139.58
+184.107.206.45
+185.10.48.117
+185.21.216.156
+185.38.47.224
+185.45.192.129
+185.53.129.230
+185.53.131.114
+185.55.53.61
+185.55.53.63
+185.61.119.2
+185.61.148.203
+186.2.167.23
+188.92.75.178
+188.122.92.134
+188.138.9.208
+188.165.209.148
+188.226.206.239
+190.10.8.124
+190.10.10.147
+192.0.130.142
+192.3.89.159
+192.73.234.138
+192.75.95.107
+192.95.100.102
+192.155.84.181
+192.169.233.206
+192.198.93.86
+192.227.135.216
+193.0.109.3
+193.77.50.208
+193.109.68.62
+193.150.121.37
+193.224.69.98
+194.79.8.37
+194.141.86.10
+195.12.180.94
+195.56.63.10
+195.116.93.93
+195.154.174.226
+195.159.111.98
+195.169.138.2
+195.189.126.35
+195.197.175.190
+197.242.93.82
+198.11.214.147
+198.49.41.21
+199.33.124.186
+199.204.186.146
+199.233.238.115
+199.241.189.66
+202.60.68.242
+202.60.69.232
+203.183.151.39
+203.219.14.204
+204.44.123.109
+204.44.123.162
+204.45.120.178
+206.190.134.44
+206.248.184.127
+207.244.73.8
+208.66.30.27
+209.81.9.223
+209.105.243.229
+209.126.70.159
+209.140.30.169
+209.165.128.235
+209.190.2.242
+210.66.254.236
+210.73.27.33
+211.72.66.229
+212.25.37.124
+212.71.235.114
+212.71.252.109
+212.114.48.31
+212.174.151.118
+213.66.205.194
+213.129.248.139
+213.136.87.34
+213.165.82.133
+213.167.17.6
+213.179.158.253
+213.189.53.125
+213.222.208.93
+216.49.158.161
+216.55.143.154
+216.131.91.100
+216.245.206.181
+216.250.138.230
+217.11.225.189
+217.23.6.133
+217.75.88.178
+217.172.143.140
+217.195.169.209
+217.196.248.106
+219.138.161.162
+222.167.248.90
+223.18.254.55
 
 # Onion nodes
 bitcoinostk4e4re.onion:8333
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
index 575e12933428..6b6e5103f5fd 100644
--- a/src/chainparamsseeds.h
+++ b/src/chainparamsseeds.h
@@ -8,606 +8,518 @@
  * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
  */
 static SeedSpec6 pnSeed6_main[] = {
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x6a,0x7e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd1,0x04,0x7d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x0c,0x6c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x0a,0x33,0xdb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xc7,0x49,0xc6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x48,0x95,0x78}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x71,0x04}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0x0c,0xb9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x80,0x30,0xd1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa6,0x4e,0x07,0xbd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x8f,0x57}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x6e,0x28}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xaf,0xdc,0xd4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0x9b,0x52}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5c,0x63}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x89,0xde,0xed}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xd9,0x76,0xa9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0xa4,0x91,0xea}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x4e,0xfa,0x03}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0x00,0xa9,0x6c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc8,0x62,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xba,0xf3,0x93}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xc9,0xc2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xd5,0x0e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x70,0x48}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc2,0x97,0x72}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0xf0,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x21,0xc5,0x6e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x22,0xb4,0xf5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0xca,0x80,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x02,0x23,0xc3,0x19}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x64,0x7b,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xaf,0x91,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0x85,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0x97,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xe4,0x01,0xe6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x0e,0xc8,0xc8,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xe4,0x00,0xbc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x12,0xe4,0x00,0xc8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x1e,0xf3,0x99}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x58,0xe8,0x31}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x63,0x69,0x09}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe2,0x89,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xb1,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe3,0xbf,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe5,0x2d,0x20}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xec,0x90,0x45}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xfd,0x94,0x71}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xfd,0xf1,0x16}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xff,0xe3,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x14,0xcd,0xde}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x17,0x78,0xfc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x5e,0x62,0x60}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x62,0x5f,0xc9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x6f,0x5a,0x37}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x77,0x77,0x69}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x8a,0x19,0x95}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x03,0xd6,0x2d}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0x57,0x2e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x09,0xd0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x85,0xa8,0x46}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xdc,0x92,0xcc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0x6f,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xce,0x8c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x72,0x23}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x42,0x9d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x4f,0x4f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x51,0x01,0xc5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x90,0xba,0xb1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xd7,0xae}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe5,0x4d,0x20}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x32,0xb0,0x4b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x2b,0x93}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe6,0xcc,0x2d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x70,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xb8,0x08,0x1b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdc,0xa3,0x12}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x88,0x8a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0xa8,0x86,0xa3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x17,0xe4,0x18}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0x70,0x2e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xe9,0x62,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x03,0x65,0x6f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x81,0xd0,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xc5,0x9a,0x8a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xd6,0x6f,0x94}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x49,0x57,0x3f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x29,0x4a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x45,0xad}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x34,0x15}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x3b,0x3f,0x4c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0xfe,0x01}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x59,0x20,0x56}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x3c,0x44}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc8,0x4a,0xf2,0x44}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x46,0x42,0x04}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0x58,0x66,0xc8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x3e,0x3f,0xed}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xbf,0x85,0xf5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xda,0x41,0xd1,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0x65,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xba,0xfa,0xba}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xcc,0x99,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x2c,0x10,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x2c,0x2c,0x0b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x78,0xa8,0xcc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x8f,0x56,0x1a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4b,0x18}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbc,0x44,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc0,0x5f,0x96}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xc9,0xf6,0x74}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xcd,0x0a,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x0a,0xd2,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x8a,0x9a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcc,0x7b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcd,0x43}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x26,0xeb,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa3,0x4c,0xe6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa6,0xa2,0x5b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xad,0xbe,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe3,0x42,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xee,0xbb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xec,0x74,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2f,0x37,0x0e,0x41}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x07,0xfc,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x2e,0x9f,0x5b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4e,0x31,0xb5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4e,0xe7,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4f,0x99,0x41}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x22,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x7e,0x56,0xfd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x8e,0x29,0x17}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc7,0x71,0xc1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc8,0x4e,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xce,0x8a,0xb1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xfc,0x34,0x31}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xa5,0x19,0x4b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xa9,0x6b,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xb3,0xbe,0x38}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xbb,0x52,0x79}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x55,0xf6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x4a,0x07,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x60,0xb7,0x79}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3e,0x3a,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3f,0x5b,0x48}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x3f,0x5b,0x70}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x48,0xd3,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x2b,0x28,0x9a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x2b,0x82,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x50,0xb9,0xd5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x6d,0x31,0x1a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xad,0x8b,0x3a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xb5,0xee,0xba}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd2,0x72,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x8d,0xe4,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x99,0xd5,0x4e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0xdf,0x54,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0xfb,0x58,0x70}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x1f,0x6e,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x22,0x79,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x72,0x06,0x2a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x8c,0x7d,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x9c,0xc1,0x64}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x1e,0x2f,0x74}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x23,0x84,0xb1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x60,0xc1,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x6f,0xbd,0x1a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x44,0x0a,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x72,0x21,0xfa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x82,0x2e,0x3f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xaf,0xd7,0x87}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xbe,0xfd,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xc2,0x26,0xfe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xf4,0x62,0x6f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa2,0xee,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa9,0xff,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xb7,0xad,0x19}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xdb,0xe9,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xe3,0xf0,0x73}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xf7,0xde,0x47}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x2b,0x72,0x42}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x34,0x21,0x24}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xc6,0xf5,0xf1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0c,0xe2,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0d,0xc6,0xbc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x0f,0xb3,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x27,0xef,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x2f,0x2d,0x57}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x3e,0xd9,0xce}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x2a,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x51,0x3d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x43,0xdb,0xc8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x5a,0x84,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x5e,0x1e,0xb1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x88,0xaf,0xf1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x7b,0x76,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3b,0x98,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc6,0xf8,0x97}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc8,0xf2,0x59}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xe1,0xb3,0x9d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x0e,0xbb,0x33}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x26,0x22,0xb4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x34,0x48,0xbb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x5b,0x90,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xa7,0x31,0xd9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc9,0xf3,0x37}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xdf,0x3c,0xf9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xe4,0x99,0x66}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0x1a,0x65,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0x32,0x9e,0xc8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x49,0xb5,0xcc,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x39,0xc7,0xb4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x3f,0xde,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x51,0xe7,0x15}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xc1,0x7e,0x52}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xcf,0xeb,0xa4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x53,0xc5,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x90,0x72,0x09}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x70,0x05,0xf7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0xae,0x14,0xf7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x25,0xf0,0x8e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x39,0xca,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xac,0x7b,0x35}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xdd,0x5b,0xfd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xeb,0x30,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xf5,0x4e,0x02}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x08,0x3a,0xf9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x64,0x12}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x11,0x07}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x7b,0x2e,0xf1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0xb7,0x02,0x5b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x6d,0x52,0x7d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xb0,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x11,0xbe,0x2a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x9f,0xa3,0x61}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x06,0x4a,0x04}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0x7d,0xaf,0xf3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xc9,0x94,0xb9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x50,0x1c,0x36}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x5d,0x73,0xca}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x43,0xa7,0xec}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x79,0xec}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x78,0xd3,0xc4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc4,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x1b,0xbf,0xb6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x81,0xec,0x8d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x83,0x58,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x9d,0xcd,0x06}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0x84,0xe6,0x90}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0x8f,0xbc,0x9b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa0,0xdd,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa1,0x6f,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x64,0xbd,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x93,0x8c,0x79}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xcb,0x4b,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xdc,0x63,0xe3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xde,0x14,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xf1,0x01,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x17,0xbf,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x26,0x0b,0xca}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x50,0x09,0x47}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x6e,0xd5,0xa5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x85,0x9b,0xed}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xab,0x22,0x25}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0xb5,0x9b,0xb4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x27,0x9c,0x89}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x49,0xa1,0x5f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x82,0x2d,0x28}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa5,0x99,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa8,0x80,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xb3,0xe1,0x76}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc2,0xf5,0x9e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc7,0x66,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd3,0x1e,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xd9,0x85,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x80,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x83,0xb1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xe9,0xe1,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x00,0xf9,0x92}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x59,0x1f,0xf9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x80,0x1d,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x80,0xfd,0x8e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x8f,0x82,0x38}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x02,0x63}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x09,0xc4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xa1,0x40,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xd4,0x67,0xd4}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xd4,0x6f,0x72}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5c,0x62}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x20,0x6c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0x0c,0xaa,0xb7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x98,0xed,0xc6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xcb,0xe4,0x47}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x75,0xac,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x93,0xe5,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x4a,0x78,0x4d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xec,0xa5,0x18}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc8,0x1c,0x48}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x2f,0x6c,0x7c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x60,0x4d,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x6c,0x4b,0x5b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x9b,0xd9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdc,0x87,0x39,0xe6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x17,0xb8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x1c,0x14}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x50,0x00,0x5f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x7f,0x98,0x0d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0x2a,0x24}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x9b,0x51,0x3e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x45,0xb2,0x02}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3d,0xaf,0xdf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x81,0x88}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x65,0x11}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xca,0xfe,0xab}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x40,0x35,0xf6,0x2e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xc7,0x73,0x57}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x80,0x12}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xac,0xbc,0x8e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x39,0xc4,0x81}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xfa,0xfc,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x7d,0x17,0x62}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x75,0xc9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0xf4,0xcf,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa7,0xbd,0xda}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0xc2,0x1a,0xaa}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa2,0x55,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0xc7,0xaa,0x88}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x07,0xe7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4b,0xe9,0xa9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x48,0x93,0x28}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0x51,0x99}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x70,0x39,0xd6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x4f,0x99,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xa8,0x19,0xe5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x5f,0xe2,0x92}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xa9,0x84,0x8b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x0a,0xaa,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe5,0x4d,0xa7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xff,0x90,0xb0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x32,0xee,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xa6,0x31,0xc3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xb7,0xd9,0xc1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xb9,0x6a,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x62,0x73}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xdd,0xfe,0x4c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xa0,0x09,0x1e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4c,0xc3,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xd9,0x77,0x37}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xf2,0xdc,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xb5,0xe2,0x3c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x03,0xac,0xd2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x80,0x2f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4c,0x3e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe2,0x95,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x77,0x39,0xd0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xf0,0x3c,0x95}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x4e,0x65,0x3c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x02,0x74}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x11,0x4f,0xa1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x01,0xce,0x14}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xbb,0x5e,0xc1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc4,0x08,0x2c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x06,0xfd,0xc7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0x04,0x76}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x83,0xb3,0xff}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xc2,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x40,0x61,0xe9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf6,0x4b,0x08}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x51,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x96,0x36}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x02,0x22,0x68}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x0f,0x3d,0x3c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x11,0x19,0x87}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x2a,0x90,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd4,0xd2,0x87}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd7,0xa5,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xee,0x8c,0xb0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xf0,0x1f,0xb8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xd6,0x89}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x8b,0xa3,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xc7,0x04,0xe4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x3d,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x6c,0x4d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x7b,0x10,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x30,0x2a,0xc7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x68,0xa8,0x68}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe5,0x49,0xab}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc0,0x48,0x16}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x40,0x02,0x36}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0x8c,0x0e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x89,0x91,0x21}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x50,0x1f,0xb6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x6b,0x40,0x9b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x22,0x28,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x16,0x1d,0x7f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0x0d,0x56,0x1f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xbe,0x37,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xeb,0xbd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x07,0x6c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xce,0xf8,0xda}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x24,0x74,0x0f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0x52,0xe9,0xde}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x1a,0x3f,0xf2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xf8,0xbd,0x61}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xc8,0x54,0xd2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x42,0xc4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x63,0x05,0xae}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xa9,0xb9,0xbd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x32,0xeb,0xa9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x39,0x94,0xd9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xdd,0x6a,0x11}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xa5,0x73}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x52,0x6b,0xb3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0x34,0xd7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0x7f,0x3d,0x33}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x1b,0x43,0x51}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xe5,0x4a,0x08}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x23,0x0a,0xa6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x67,0x5c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xcf,0x77,0x01}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3a,0x68,0xa6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xea,0xf4,0x7f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfa,0x92,0x21}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x0f,0x3a,0xa0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x39,0x3e,0xfe}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x5f,0xce,0x2c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc1,0xa6,0xc8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x7e,0xfb,0x96}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc7,0x66,0x0a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x27,0x4d,0x6b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xc1,0xa0,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0xa0,0x3b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd2,0xcc,0x1d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x12,0x69}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x3c,0xf2,0x22}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x6b,0x64,0x65}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0x9f,0x8b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x9a,0x9b,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x6b,0xfe,0x79}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xf4,0x36,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x4d,0x22,0x23}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x2e,0x95,0x5d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf7,0xb4,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xbe,0x14,0xdc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x46,0xb2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x9b,0xf7,0xd3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xc8,0x18,0x65}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xcf,0xa3,0x83}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x1f,0x64,0x9b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0xfe,0x17}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x82,0xcc,0x08,0xd5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9b,0x36,0xa4,0x91}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x4a,0xcb,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x53,0xc9,0xbb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0xc4,0x64,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xca,0x5e,0x60}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x68,0x6a,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x9d,0x7e,0xd0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd3,0xe6,0x78}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xec,0xc4,0x4d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x61,0x38,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x86,0xb2,0x59}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0x96,0xe9,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xa8,0x85,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x12,0xf6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x21,0xca}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x12,0x1c,0x15}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x55,0xdc,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xa3,0xe3,0x1c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xb8,0x53,0x3c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xe7,0x60,0x53}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xec,0x31,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x5a,0x42,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x6a,0xc2,0x61}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x86,0x4b,0x73}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x98,0xc1,0x24}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x98,0xdb,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xc5,0x0a,0xea}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd1,0x4d,0x65}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd2,0x6a,0x93}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xd6,0xc8,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xdf,0x73,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xea,0x30,0xe8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xfa,0x56,0x12}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x1b,0x07,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0xff,0xcf,0x49}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x4a,0xa3,0xea}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x54,0x72,0x6a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x98,0xa6,0x1d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xab,0xd8,0xdd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0xb9,0xb1,0x47}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x13,0x0c,0xf4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x2a,0x73,0x32}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x4f,0xb1,0xce}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x88,0x93,0x77}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x8f,0xf5,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xbc,0x32,0x27}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xbe,0xe3,0x70}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xc6,0x87,0x1d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe2,0x6b,0x56}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf2,0xdb,0x5a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf2,0xe5,0xa8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xf4,0xa0,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x1f,0x0a,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x55,0x19,0x29}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x69,0xa1,0x88}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0xa5,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0xc8,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xa7,0x6d,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0x7d,0xe7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0xd8,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x21,0x19,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x2b,0x82,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x76,0x08,0xec}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x66,0x06,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xca,0x14,0x2d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xd9,0x7d,0xe1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xea,0xd2,0x6f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x14,0x7b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xff,0x90,0xb0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0x71,0x40,0x2b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0xe5,0x16,0x08}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x01,0xd4,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x1e,0x2a,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xe0,0xa5,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0xf3,0x5e,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x83,0x6b,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x83,0x74,0xb8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0x8f,0x00,0x9c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x68,0xdb,0xb8,0x09}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xb9,0x26,0xae}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x06,0x04,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x96,0x08,0x1b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0x96,0x21,0x14}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xaa,0xe4,0x81}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6b,0xaa,0xf0,0xad}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x33,0x14,0x56}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x95,0xde}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x97,0xac}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xa1,0x81,0xf7}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0xaa,0x8c,0x15}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x3c,0xd3,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0x2a,0x24}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x49,0xac,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xa3,0xeb,0xef}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xbe,0xc4,0xdc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xc9,0x87,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x98,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x9a,0x51}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe6,0xdc,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xea,0x9c,0xda}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xeb,0x31,0x1b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x01,0xaa}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xc2,0x03,0x46}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb6,0xa3,0xcb,0x1e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe3,0xff,0x0e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xcb,0xfd,0xc3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6f,0x03,0x90,0xc2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x69,0x64,0x44}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x75,0xca,0x1a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xa9,0x59}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x74,0xaa,0x19}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xc8,0x22,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xd3,0x98,0xa5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xc3,0x8e,0x43}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x19,0x96,0xc7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x03,0x57,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xe2,0x98,0x50}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xd8,0xad,0x36}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc1,0x83}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x9d,0x96}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x15,0x3d,0xcf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xa4,0xc1,0x49}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x75,0x0b,0xbd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x19,0xff,0x8f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xfe,0x51,0x1e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xef,0xd6,0x28}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xcc,0x37,0x28}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x2d,0xf4,0x02}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3f,0x0e,0x07}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0xb1,0xbc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe1,0xa4,0x14}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x68,0x09,0x82}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x1c,0xcb,0xcf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x7f,0xe2,0x37}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x37,0x92,0x07}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xbc,0x14,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x10,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0xd9,0x7c,0xcb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xd2,0xc0,0x3b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x1b,0x13,0x97}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x5c,0x1e,0x6f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0x9f,0x93,0xa7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xbf,0xa0,0xb7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3a,0xa8,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x3f,0xb8,0xcb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x1c,0x32,0x5f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc3,0xd6,0x52}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x5b,0xac,0xde}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x10,0xf3,0x2c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x2b,0x8a,0x10}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa1,0x6f,0x72}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0xd2,0xba,0x85}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x9e,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xb8,0x08,0x1a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x48,0x70,0xcd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x5b,0x6d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7b,0xfe,0x6c,0xa6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x73,0xad}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x5b,0xac,0xda}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xfd,0x17,0x84}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x37,0x41}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x86,0x13,0x1f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x12,0x5a,0x29}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x31,0xc0,0x7a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0xd2,0x87,0x3a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xbc,0x19,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xeb,0x45,0x54}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x70,0x7c,0x47,0x00}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x92,0x44,0xfb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x1d,0x11,0x52}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x73,0x46,0xb0,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x75,0x29,0xa2,0xb8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x76,0x1b,0x08,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xe6,0x07,0xd3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xf6,0x47,0x34}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xac,0x08,0x64}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x80,0x6d,0x94}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7b,0xe7,0xe0,0x3f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xaf,0xc3,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xc7,0xa4,0x60}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x80,0xc7,0xfe,0xf4}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x61,0x45,0x4c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x7b,0x07,0x07}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x7b,0x07,0x27}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0xba,0x11,0x11}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x83,0xf7,0xa9,0xbe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x85,0xf2,0xd1,0x3f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0x66,0x5e,0x26}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x86,0x77,0x11,0x91}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0x74,0xa0,0xb0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xe2,0x22,0x2a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8a,0xd2,0xd9,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0xff,0xa6,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8f,0xd7,0x81,0x7e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0xf4,0x13}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0x94,0x34,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0x94,0x50,0x39}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x13,0x1e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0x8e,0x56}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0xfd,0x33}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x94,0xfb,0x06,0xd6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0x9a,0x9b,0xeb}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x95,0xd2,0x85,0xf4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x64,0x7b,0x13}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd9,0xff,0xcf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0x08,0xe2,0xaf}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0x9a,0x67,0x32}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xc6,0x31,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8c,0xce,0x5f,0x0e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf8,0x5e,0x30}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xca,0x26,0xad}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0x1a,0xd2,0xd9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd7,0xd0,0xdd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc0,0x4e,0xc2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xcd,0xad,0x4a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x98,0x10,0x49}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x3a,0x6b,0x9d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8b,0x1e,0xaa,0xf0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xa3,0xbf,0xf1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xc0,0x30,0x8a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x93,0x0f,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xe7,0x39,0x23}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0x95,0x69,0x88}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x21,0x07,0xc2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x34,0x45,0x29}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xec,0x51,0xb6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0x62,0x49,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x1b,0x3d,0xa2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xcf,0x9b,0xb3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x94,0xd2,0xa1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0x07,0x35}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xdd,0x88,0x4a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x63,0xf3,0xaf,0x27}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xea,0x98,0x74}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x85,0x67,0x4a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x47,0x6d,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0xa5,0xab,0x3b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x37,0x5a,0x04}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xc0,0x4d,0xa2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0xea,0x81,0xe9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0xe2,0x6c,0xed}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x14,0x72,0x85}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x64,0x04,0x6c,0x6b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x45,0x49,0x5a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x42,0x47,0xf2,0x12}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x42,0x5f,0xf3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x5a,0x0f,0xfd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x15,0x08,0xfb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x58,0x4b,0xb2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x41,0x11,0x2e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x78,0xb7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x0e,0xbb,0x33}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x65,0xe2,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x48,0x94,0xa7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x42,0x25,0x42}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x03,0x30}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x44,0xcf,0xc8,0x31}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xad,0x5b,0xd6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xc6,0x7b,0x12}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x4d,0xbc,0xf2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xdc,0x73,0x02}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd7,0x72,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xf6,0x4b,0x06}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x12,0xcd,0xcd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x82,0x60}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x87,0x00,0x13,0x4d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xf7,0x16,0x10}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x18,0xba}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xa8,0xc1,0x16}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0x72,0x69,0xfb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0x23,0x94,0xa2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3b,0x08,0x53}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x83,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x41,0x24,0x5a,0x2d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xaa,0x72,0xc1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xcf,0x11,0xcd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0xed,0x14,0x7b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x94,0x5c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0x13,0x23,0x7c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6f,0x5a,0x96,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0xe2,0x90,0x78}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc4,0x8e,0xa3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xf1,0x87,0xc1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xb6,0x80,0xef}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x0a,0xf2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0xd8,0xd1,0x7a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x2e,0x9e,0x86}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x5c,0xdb,0xcc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x11,0x9d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x61,0x21}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x89,0xf8,0x99,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x97,0xe0,0xf8,0xfc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x99,0x79,0x4b,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x99,0x7f,0xfb,0x43}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9a,0x14,0x02,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9d,0x0d,0x3d,0x05}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9e,0x3a,0xad,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x9f,0xfd,0x17,0x84}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd1,0x6e,0xda}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xd5,0xfe,0xcd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xef,0xfe,0x64}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf2,0x96,0x27}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x51,0x8a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0xeb,0x38}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf4,0x4f,0x10}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf5,0xd9,0x77}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf8,0x66,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xfb,0x6c,0x35}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xfe,0x95,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xff,0x74,0x4e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa6,0x46,0x5e,0x6a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x58,0x2d,0x7c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa7,0x58,0x78,0xd2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x1a,0x31,0x2b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x1e,0x0e,0x06}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x50,0x72,0xc5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xa7,0xd6,0xf3}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xd0,0xdb,0x6c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xdc,0x43,0x9c}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xec,0x65,0x22}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x0e,0x4f,0x0f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4a,0x85,0x25,0x7d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xe3,0x57,0xf8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x3f,0xf8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x3b,0xc9,0x9c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x68,0x71,0x02}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x77,0xa1,0xd8,0x5d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x6c,0xdc,0x8a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0x4f,0x73,0x6a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x3b,0x5c,0x2a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xc3,0x04,0x4a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x3d,0x61,0xe4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xf4,0x26,0x84}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x1b,0x3e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x3c,0x5a,0x0d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x54,0xd1,0xf6,0xd0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xff,0xc7,0x21}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x3d,0x3f,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xed,0xa5,0x9d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x81,0x3b,0x75,0x5d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x53,0x8d,0x0d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xf0,0x13,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8d,0x69,0x43,0x44}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcd,0xed,0xa1,0x8c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x3f,0xed,0x10}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3a,0x40,0x9b,0x78}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x4a,0x98,0x7b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbc,0x4e,0x96}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xee,0x20,0x75}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x28,0x48,0x4f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7d,0x40,0x5c,0x11}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x67,0x06,0xdd,0x32}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x71,0x41,0xa7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x35,0x3f,0x1d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x1f,0x7d,0x81}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xa5,0x99,0x2f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x56,0x59,0x2a,0x6b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x4f,0x4f,0x8d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x1e,0x3c,0xd2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x37,0x99,0x98}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xe5,0x92,0x2c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xbd,0x7e,0x23}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x43,0xfb,0x62,0xa7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x6b,0x01,0x32}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x79,0xcf,0xe7,0xd0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xbd,0x35,0x7d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0xc3,0xda,0x53}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x71,0x6b,0x01,0x31}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0xb8,0x7f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0xc2,0x38,0x9a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x42,0xaa,0xef}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x82,0x6b,0x87}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x53,0x17,0x18}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7d,0x59,0x46,0xdb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xda,0x68,0xc1,0xd2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdc,0xe9,0x6f,0xcd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x27,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xca,0x4b,0x8d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0x3d,0x04,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xaa,0xb7,0xaa}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x81,0x28,0x20}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xf1,0xae,0xa4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe6,0xd7,0xec}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x59,0x13,0x39}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x93,0xcc,0xd8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xe5,0xee,0xbb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x67,0x70,0x07}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x62,0x9d,0xd3,0xeb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc5,0xed,0x0c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0xe1,0xd3,0x23}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x13,0xa8,0xa5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x32,0x9a,0x17}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3d,0x48,0xd3,0xe4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x68,0x03}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x01,0xe8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xef,0xe9,0xdd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x87,0x8b,0x43}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa0,0x24,0x82,0xb4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x92,0xd6,0xcb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x75,0x90}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x1c,0x41,0xc6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5c,0x3f,0x83,0x03}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x8b,0x3f,0xf3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x46,0x5e,0x49}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xe6,0xc8,0x83}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xcd,0x09,0xac}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x47,0xc5,0xab,0xda}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0xa5,0x65,0x76}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x37,0x26,0xc5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcd,0xc5,0xd0,0x2f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x61,0x4d,0x22,0x22}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x40,0x95,0x3e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x75,0xa3,0xfa}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc6,0xdb,0x36}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x53,0x14,0xa8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5d,0x1f,0x94,0x5a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xea,0x98,0xa5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x4a,0x38,0x65}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0xa5,0xaa,0x10}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0xab,0xaa}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x02,0xa7,0xdd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0xf4,0x66,0x09}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x08,0x1c,0x57,0x68}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x59,0xee,0x40,0x8b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x09,0xac,0x33}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x4c,0x4b,0x84}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4d,0x25,0x92,0xd3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x5a,0x4d,0xba}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x53,0x96,0x02,0x63}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x55,0xf6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb1,0x4b,0x4c,0xbe}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xd0,0xda,0x45}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc0,0x4b,0x20}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xa2,0xc3,0x06}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6a,0xba,0x1f,0xf3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x09,0x1f,0xb2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x51,0x07,0x0d,0x54}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0x6a,0xb4,0xc7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x11,0x6a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x45,0x40,0x51,0x3d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xaa,0x18,0x03}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x6e,0x30,0x30}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x74,0x07,0x5c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x9a,0x25}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5f,0xd3,0xbb,0x82}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x22,0x42,0xae}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x15,0x44,0x25}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4b,0x57,0x5f,0xbd}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xfd,0xd8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x38,0x3f,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xf6,0x6b,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0xff,0xed,0xf1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x02,0xd5,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x33,0x17,0xe0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x33,0x7b,0x9f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x39,0xd4,0x79}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xae,0x6d,0x21,0x1c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaf,0x7e,0x7c,0x5b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xaf,0x7e,0x7c,0x5c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x0a,0x74,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x24,0x23,0x7e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x24,0x63,0xde}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0x7c,0x6e,0x2f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xc2,0x21,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xdf,0xc9,0xc6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0x1a,0x53}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0x24,0x30}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xd4,0x8d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x3e,0xfe,0x3b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x4e,0xfa,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x9b,0x56,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xaf,0x86,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xf8,0x6f,0x04}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x01,0xaa}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0xfe,0x22,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb3,0x2b,0x72,0x0e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb6,0xd5,0xd0,0x1c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x44,0x02,0x2e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x48,0xee,0x2a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x5e,0xe2,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x5e,0xe3,0x3a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0x8b,0x3a}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb8,0x6b,0xce,0x2d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xd0,0x01,0xc2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0xfc,0x17}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x45,0xe8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x36,0xf6,0x61,0xd3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xed,0xd9,0xa0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x23,0x2f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6c,0x11,0x4e,0x13}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x58,0xc0,0xdd,0x61}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x83,0x72,0xba,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xed,0xf7,0xe1}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc4,0x0e,0x04}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x67,0x4b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xa3,0xef,0xe4}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x2e,0xa5,0xdc,0x47}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x2e,0x33,0xe9}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x92,0xb9,0xac,0xa3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x71,0x24}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x32,0x86,0xcc,0xa8}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xce,0xb1,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x53,0x4e,0x26}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x8c,0x71,0xd2,0xd3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xad,0x34,0x55,0x22}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xa2,0xf3,0x89,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x17,0x17,0x34,0x87}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4f,0xad,0x55,0x92}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x4b,0x18}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x88}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x9a,0x6e,0x3a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x18,0x24,0x19}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x90,0x4c,0x3d,0xb7}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x7a,0x80,0x6d,0x94}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3f,0x8e,0xd7,0xa0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0xbb,0x16,0x5a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0x79,0x09,0xcb}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x57,0xe6,0x0d,0x8d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x25,0x8b,0x0b,0x63}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xc6,0x72,0xe5}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0x11,0x3f,0x2b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xa9,0x42,0x42}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x99,0x32}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x05,0x09,0x8b,0x05}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x60,0xfc,0x66,0xe2}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb0,0xc5,0x66,0xbe}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0xe4,0x98,0xcc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x3e,0x94,0x8c,0x69}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x0c,0xbd,0x44}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x0a,0x30,0x75}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x15,0xd8,0x9c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x26,0x2f,0xe0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x2d,0xc0,0x81}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x35,0x81,0xe6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x35,0x83,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x37,0x35,0x3d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x37,0x35,0x3f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3d,0x77,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb9,0x3d,0x94,0xcb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xba,0x02,0xa7,0x17}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x5c,0x4b,0xb2}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x7a,0x5c,0x86}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd3,0x64,0x17,0x77}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0xd6,0x75,0x46}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x26,0x48,0x4e,0x35}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x52,0xc1,0x7a,0xb6}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x85,0xf2,0xcc,0xae}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4e,0x5b,0x62,0xea}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0x03,0xd6,0xbc}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x18,0xeb,0x81,0x5e}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0x47,0xb3,0x74}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6a,0xa5,0x3c}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x46,0x45,0xee,0x54}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5e,0x17,0xa8,0x38}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x55,0x11,0xc2,0xa3}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x6d,0x57,0x01,0x2f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x50,0xde,0x7a,0x5d}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0xae,0x03,0xa0}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x1f,0xd3,0xc1,0x2b}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x4c,0x09,0xf5,0x13}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x48,0x26,0xb3,0x7a}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x9f,0x2e,0x54}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6b,0x13,0x53}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x51,0xdf,0x7f}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xb2,0x97,0x21,0x80}, 8333},
-    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x5b,0xcc,0xd2,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0x8a,0x09,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xa5,0xd1,0x94}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbc,0xe2,0xce,0xef}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x0a,0x08,0x7c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xbe,0x0a,0x0a,0x93}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x00,0x82,0x8e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x03,0x59,0x9f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x49,0xea,0x8a}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x4b,0x5f,0x6b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x5f,0x64,0x66}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0x9b,0x54,0xb5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xa9,0xe9,0xce}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xc6,0x5d,0x56}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc0,0xe3,0x87,0xd8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x00,0x6d,0x03}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x4d,0x32,0xd0}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x6d,0x44,0x3e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0x96,0x79,0x25}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc1,0xe0,0x45,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x4f,0x08,0x25}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc2,0x8d,0x56,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x0c,0xb4,0x5e}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x38,0x3f,0x0a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x74,0x5d,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9a,0xae,0xe2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0x9f,0x6f,0x62}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xa9,0x8a,0x02}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xbd,0x7e,0x23}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc3,0xc5,0xaf,0xbe}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc5,0xf2,0x5d,0x52}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x0b,0xd6,0x93}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc6,0x31,0x29,0x15}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0x21,0x7c,0xba}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xcc,0xba,0x92}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xe9,0xee,0x73}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xc7,0xf1,0xbd,0x42}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x44,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xca,0x3c,0x45,0xe8}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcb,0xb7,0x97,0x27}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcb,0xdb,0x0e,0xcc}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2c,0x7b,0x6d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2c,0x7b,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcc,0x2d,0x78,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xbe,0x86,0x2c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xce,0xf8,0xb8,0x7f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xcf,0xf4,0x49,0x08}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd0,0x42,0x1e,0x1b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x51,0x09,0xdf}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x69,0xf3,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x7e,0x46,0x9f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0x8c,0x1e,0xa9}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xa5,0x80,0xeb}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd1,0xbe,0x02,0xf2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0x42,0xfe,0xec}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd2,0x49,0x1b,0x21}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd3,0x48,0x42,0xe5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x19,0x25,0x7c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x47,0xeb,0x72}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x47,0xfc,0x6d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0x72,0x30,0x1f}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd4,0xae,0x97,0x76}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x42,0xcd,0xc2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x81,0xf8,0x8b}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0x88,0x57,0x22}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xa5,0x52,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xa7,0x11,0x06}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xb3,0x9e,0xfd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xbd,0x35,0x7d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd5,0xde,0xd0,0x5d}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x31,0x9e,0xa1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x37,0x8f,0x9a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0x83,0x5b,0x64}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xf5,0xce,0xb5}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd8,0xfa,0x8a,0xe6}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x0b,0xe1,0xbd}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x17,0x06,0x85}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0x4b,0x58,0xb2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xac,0x8f,0x8c}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xc3,0xa9,0xd1}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xd9,0xc4,0xf8,0x6a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdb,0x8a,0xa1,0xa2}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xde,0xa7,0xf8,0x5a}, 8333},
+    {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xdf,0x12,0xfe,0x37}, 8333},
     {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0x0a,0x26,0x27,0x21,0xae,0x94,0xd5,0xc2,0x72,0x24}, 8333},
     {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xea,0xb9,0x5b,0x63,0x1d,0x94,0xe2,0xed,0xec,0xa1}, 8333},
     {{0xfd,0x87,0xd8,0x7e,0xeb,0x43,0xce,0x36,0xa1,0xc1,0xd6,0x64,0x43,0xfb,0xb3,0xe7}, 8333},

From 06fdf326d38b02efba0ebafa4be59b4ac062c092 Mon Sep 17 00:00:00 2001
From: "Eric R. Schulz" <ersmail@gmail.com>
Date: Mon, 22 Dec 2014 21:04:53 -0500
Subject: [PATCH 1228/1819] bitcoin-tx: Fix JSON validation of prevtxs

Github-Pull: #5528
Rebased-From: 2a3d988b802dcea4453241e37168d8511078940a a089c50981e822014ffc18e8a37b3518feb52206 2c14d1532fe66a243cdbfb7de48b298213305765
---
 src/Makefile.test.include            |  3 ++-
 src/bitcoin-tx.cpp                   |  6 +++---
 src/test/data/bitcoin-util-test.json | 10 ++++++++++
 src/test/data/txcreatesign.hex       |  1 +
 4 files changed, 16 insertions(+), 4 deletions(-)
 create mode 100644 src/test/data/txcreatesign.hex

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 9e9f478d8fe1..b9d15f4df392 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -14,7 +14,8 @@ EXTRA_DIST += \
 	test/data/tt-locktime317000-out.hex \
 	test/data/tx394b54bb.hex \
 	test/data/txcreate1.hex \
-	test/data/txcreate2.hex
+	test/data/txcreate2.hex \
+	test/data/txcreatesign.hex
 
 JSON_TEST_FILES = \
   test/data/script_valid.json \
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 7308d9366173..0f16b36f14b0 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -368,7 +368,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
     // Add previous txouts given in the RPC call:
     if (!registers.count("prevtxs"))
         throw runtime_error("prevtxs register variable must be set.");
-    UniValue prevtxsObj = registers["privatekeys"];
+    UniValue prevtxsObj = registers["prevtxs"];
     {
         for (unsigned int previdx = 0; previdx < prevtxsObj.count(); previdx++) {
             UniValue prevOut = prevtxsObj[previdx];
@@ -379,13 +379,13 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
             if (!prevOut.checkObject(types))
                 throw runtime_error("prevtxs internal object typecheck fail");
 
-            uint256 txid = ParseHashUV(prevOut, "txid");
+            uint256 txid = ParseHashUV(prevOut["txid"], "txid");
 
             int nOut = atoi(prevOut["vout"].getValStr());
             if (nOut < 0)
                 throw runtime_error("vout must be positive");
 
-            vector<unsigned char> pkData(ParseHexUV(prevOut, "scriptPubKey"));
+            vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
             CScript scriptPubKey(pkData.begin(), pkData.end());
 
             {
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index f8424b72a34c..6090421cb66f 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -46,5 +46,15 @@
   { "exec": "./bitcoin-tx",
     "args": ["-create", "outscript=0:"],
     "output_cmp": "txcreate2.hex"
+  },
+  { "exec": "./bitcoin-tx",
+    "args":
+    ["-create",
+     "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
+     "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
+     "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\"}]",
+     "sign=ALL",
+     "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
+    "output_cmp": "txcreatesign.hex"
   }
 ]
diff --git a/src/test/data/txcreatesign.hex b/src/test/data/txcreatesign.hex
new file mode 100644
index 000000000000..56ce28a8655b
--- /dev/null
+++ b/src/test/data/txcreatesign.hex
@@ -0,0 +1 @@
+01000000018594c5bdcaec8f06b78b596f31cd292a294fd031e24eec716f43dac91ea7494d0000000000ffffffff01a0860100000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000

From fe925e221ffcde1c810830a8985fa984254ca328 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 5 Jan 2015 20:34:00 +0000
Subject: [PATCH 1229/1819] Use EXTRA_LIBRARIES instead of noinst_LIBRARIES so
 we can avoid building unused code

---
 src/Makefile.am         | 4 ++--
 src/Makefile.qt.include | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index d6ac6e127762..81b16d1ea9a1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,7 +37,7 @@ $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
 
 # Make is not made aware of per-object dependencies to avoid limiting building parallelization
 # But to build the less dependent modules first, we manually select their order here:
-noinst_LIBRARIES = \
+EXTRA_LIBRARIES = \
   crypto/libbitcoin_crypto.a \
   libbitcoin_util.a \
   libbitcoin_common.a \
@@ -46,7 +46,7 @@ noinst_LIBRARIES = \
   libbitcoin_cli.a
 if ENABLE_WALLET
 BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
-noinst_LIBRARIES += libbitcoin_wallet.a
+EXTRA_LIBRARIES += libbitcoin_wallet.a
 endif
 
 if BUILD_BITCOIN_LIBS
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 898337ad6fe3..5812f9aff0b8 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -1,5 +1,5 @@
 bin_PROGRAMS += qt/bitcoin-qt
-noinst_LIBRARIES += qt/libbitcoinqt.a
+EXTRA_LIBRARIES += qt/libbitcoinqt.a
 
 # bitcoin qt core #
 QT_TS = \

From 3022e7df2a3f2c6e9869877c189c7e7cea7d7b54 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 23 Dec 2014 23:50:21 +0100
Subject: [PATCH 1230/1819] Require sufficent priority for relay of free
 transactions

Rebased-From: 1c52aad540ec1370db60fd68fc3485413e3cb8e1
Github-Pull: #5535
---
 qa/pull-tester/run-bitcoind-for-test.sh.in | 2 +-
 src/init.cpp                               | 1 +
 src/main.cpp                               | 9 +++++++--
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
index 42d8ad52e886..14ae08e4e58f 100755
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ b/qa/pull-tester/run-bitcoind-for-test.sh.in
@@ -10,7 +10,7 @@ touch "$DATADIR/regtest/debug.log"
 tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
 WAITER=$!
 PORT=`expr 10000 + $$ % 55536`
-"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
+"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -relaypriority=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
 BITCOIND=$!
 
 #Install a watchdog.
diff --git a/src/init.cpp b/src/init.cpp
index 4374d60fe5fa..c5430c1f2514 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -324,6 +324,7 @@ std::string HelpMessage(HelpMessageMode mode)
     if (GetBoolArg("-help-debug", false))
     {
         strUsage += "  -limitfreerelay=<n>    " + strprintf(_("Continuously rate-limit free transactions to <n>*1000 bytes per minute (default:%u)"), 15) + "\n";
+        strUsage += "  -relaypriority         " + strprintf(_("Require high priority for relaying free or low-fee transactions (default:%u)"), 1) + "\n";
         strUsage += "  -maxsigcachesize=<n>   " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n";
     }
     strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
diff --git a/src/main.cpp b/src/main.cpp
index c40a5e1672e0..cf2d07604fa9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1022,7 +1022,12 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
                                       hash.ToString(), nFees, txMinFee),
                              REJECT_INSUFFICIENTFEE, "insufficient fee");
 
-        // Continuously rate-limit free (really, very-low-fee)transactions
+        // Require that free transactions have sufficient priority to be mined in the next block.
+        if (GetBoolArg("-relaypriority", true) && nFees < ::minRelayTxFee.GetFee(nSize) && !AllowFree(view.GetPriority(tx, chainActive.Height() + 1))) {
+            return state.DoS(0, false, REJECT_INSUFFICIENTFEE, "insufficient priority");
+        }
+
+        // Continuously rate-limit free (really, very-low-fee) transactions
         // This mitigates 'penny-flooding' -- sending thousands of free transactions just to
         // be annoying or make others' transactions take longer to confirm.
         if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize))
@@ -1041,7 +1046,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
             // At default rate it would take over a month to fill 1GB
             if (dFreeCount >= GetArg("-limitfreerelay", 15)*10*1000)
                 return state.DoS(0, error("AcceptToMemoryPool : free transaction rejected by rate limiter"),
-                                 REJECT_INSUFFICIENTFEE, "insufficient priority");
+                                 REJECT_INSUFFICIENTFEE, "rate limited free transaction");
             LogPrint("mempool", "Rate limit dFreeCount: %g => %g\n", dFreeCount, dFreeCount+nSize);
             dFreeCount += nSize;
         }

From 008138c04a3242b72dc5128ac3585b50ac44e84e Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 4 Jan 2015 17:15:02 +0100
Subject: [PATCH 1231/1819] Bugfix: only track UTXO modification after lookup

Otherwise, if CCoinsViewCache::ModifyCoins throws an exception in between
setting hasModifier and constructing the CCoinsModifier, the cache ends up
in an inconsistent state, resulting in an assert failure in the next
modification.

Bug discovered by Wladimir J. van der Laan.

Rebased-From: 1c52aad540ec1370db60fd68fc3485413e3cb8e1
Github-Pull: #5597
---
 src/coins.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/coins.cpp b/src/coins.cpp
index c2e802c95364..66919da11e8d 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -106,7 +106,6 @@ bool CCoinsViewCache::GetCoins(const uint256 &txid, CCoins &coins) const {
 
 CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256 &txid) {
     assert(!hasModifier);
-    hasModifier = true;
     std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoinsCacheEntry()));
     if (ret.second) {
         if (!base->GetCoins(txid, ret.first->second.coins)) {
@@ -247,7 +246,10 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
     return tx.ComputePriority(dResult);
 }
 
-CCoinsModifier::CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_) : cache(cache_), it(it_) {}
+CCoinsModifier::CCoinsModifier(CCoinsViewCache& cache_, CCoinsMap::iterator it_) : cache(cache_), it(it_) {
+    assert(!cache.hasModifier);
+    cache.hasModifier = true;
+}
 
 CCoinsModifier::~CCoinsModifier()
 {

From 867c600c292cf2a1c0f6f60742d8e23fb01179f6 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 4 Jan 2015 19:11:44 +0100
Subject: [PATCH 1232/1819] Catch LevelDB errors during flush

Rebased-From: e41345790f1041f5c5e5605d73a0af174769aa55
Github-Pull: #5597
---
 src/main.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index cf2d07604fa9..5e1be0d25cc5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1805,6 +1805,7 @@ enum FlushStateMode {
 bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
     LOCK(cs_main);
     static int64_t nLastWrite = 0;
+    try {
     if ((mode == FLUSH_STATE_ALWAYS) ||
         ((mode == FLUSH_STATE_PERIODIC || mode == FLUSH_STATE_IF_NEEDED) && pcoinsTip->GetCacheSize() > nCoinCacheSize) ||
         (mode == FLUSH_STATE_PERIODIC && GetTimeMicros() > nLastWrite + DATABASE_WRITE_INTERVAL * 1000000)) {
@@ -1845,6 +1846,9 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
         }
         nLastWrite = GetTimeMicros();
     }
+    } catch (const std::runtime_error& e) {
+        return state.Abort(std::string("System error while flushing: ") + e.what());
+    }
     return true;
 }
 

From a19eeaced85cfff3faab19f532b1a0d97b637705 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 6 Jan 2015 13:24:13 +0000
Subject: [PATCH 1233/1819] Bugfix: configure: Check for openssl/ec.h

---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index c4c21eaf4f69..2abfd0d419fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,6 +678,14 @@ else
   fi
 fi
 
+CFLAGS_TEMP="$CFLAGS"
+LIBS_TEMP="$LIBS"
+CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"
+LIBS="$LIBS $SSL_LIBS $CRYPTO_LIBS"
+AC_CHECK_HEADER([openssl/ec.h],, AC_MSG_ERROR(OpenSSL ec header missing),)
+CFLAGS="$CFLAGS_TEMP"
+LIBS="$LIBS_TEMP"
+
 BITCOIN_QT_PATH_PROGS([PROTOC], [protoc],$protoc_bin_path)
 
 AC_MSG_CHECKING([whether to build bitcoind])

From b7a4ecc1535e4e154b2ca5da16afecc096e152e8 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Tue, 6 Jan 2015 13:12:39 +0000
Subject: [PATCH 1234/1819] Bugfix: Only check for boost when building code
 that requires it

---
 configure.ac | 64 ++++++++++++++++++++++++++++++++++------------------
 1 file changed, 42 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2abfd0d419fd..740f7e8e0d67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -171,6 +171,24 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
 fi
 CPPFLAGS="$CPPFLAGS -DBOOST_SPIRIT_THREADSAFE -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
 
+AC_ARG_WITH([utils],
+  [AS_HELP_STRING([--with-utils],
+  [build bitcoin-cli bitcoin-tx (default=yes)])],
+  [build_bitcoin_utils=$withval],
+  [build_bitcoin_utils=yes])
+
+AC_ARG_WITH([libs],
+  [AS_HELP_STRING([--with-libs],
+  [build libraries (default=yes)])],
+  [build_bitcoin_libs=$withval],
+  [build_bitcoin_libs=yes])
+
+AC_ARG_WITH([daemon],
+  [AS_HELP_STRING([--with-daemon],
+  [build bitcoind daemon (default=yes)])],
+  [build_bitcoind=$withval],
+  [build_bitcoind=yes])
+
 AC_LANG_PUSH([C++])
 
 use_pkgconfig=yes
@@ -500,6 +518,19 @@ if test x$use_upnp != xno; then
   )
 fi
 
+BITCOIN_QT_INIT
+
+dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
+BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
+
+if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
+    use_boost=no
+else
+    use_boost=yes
+fi
+
+if test x$use_boost = xyes; then
+
 dnl Check for boost libs
 AX_BOOST_BASE
 AX_BOOST_SYSTEM
@@ -537,6 +568,10 @@ if test x$use_reduce_exports != xno; then
   CPPFLAGS="$TEMP_CPPFLAGS"
 fi
 
+elif test x$use_reduce_exports = xauto; then
+    use_reduce_exports=yes
+fi
+
 if test x$use_reduce_exports != xno; then
     CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
     AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"])
@@ -549,6 +584,8 @@ if test x$use_tests = xyes; then
   fi
 
 
+  if test x$use_boost = xyes; then
+
   AX_BOOST_UNIT_TEST_FRAMEWORK
 
   dnl Determine if -DBOOST_TEST_DYN_LINK is needed
@@ -568,8 +605,12 @@ if test x$use_tests = xyes; then
     [AC_MSG_RESULT(no)])
   LIBS="$TEMP_LIBS"
   CPPFLAGS="$TEMP_CPPFLAGS"
+
+  fi
 fi
 
+if test x$use_boost = xyes; then
+
 BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_PROGRAM_OPTIONS_LIB $BOOST_THREAD_LIB"
 
 dnl Boost >= 1.50 uses sleep_for rather than the now-deprecated sleep, however
@@ -626,25 +667,7 @@ if test x$boost_sleep != xyes; then
   AC_MSG_ERROR(No working boost sleep implementation found.)
 fi
 
-AC_ARG_WITH([utils],
-  [AS_HELP_STRING([--with-utils],
-  [build bitcoin-cli bitcoin-tx (default=yes)])],
-  [build_bitcoin_utils=$withval],
-  [build_bitcoin_utils=yes])
-
-AC_ARG_WITH([libs],
-  [AS_HELP_STRING([--with-libs],
-  [build libraries (default=yes)])],
-  [build_bitcoin_libs=$withval],
-  [build_bitcoin_libs=yes])
-
-AC_ARG_WITH([daemon],
-  [AS_HELP_STRING([--with-daemon],
-  [build bitcoind daemon (default=yes)])],
-  [build_bitcoind=$withval],
-  [build_bitcoind=yes])
-
-BITCOIN_QT_INIT
+fi
 
 if test x$use_pkgconfig = xyes; then
 
@@ -703,9 +726,6 @@ if test x$build_bitcoin_libs = xyes; then
 fi
 AC_MSG_RESULT($build_bitcoin_libs)
 
-dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
-BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
-
 AC_LANG_POP
 
 if test "x$use_ccache" != "xno"; then

From 2ecd2941edc8d07090b6b4aeaae7bc4c9c333066 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Wed, 7 Jan 2015 20:19:56 +0000
Subject: [PATCH 1235/1819] Bugfix: configure: Correctly detect "nothing to
 build" condition

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 740f7e8e0d67..173c93c538e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -839,7 +839,7 @@ else
   AC_MSG_RESULT([no])
 fi
 
-if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
+if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
   AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
 fi
 

From e2677d7ae8e6601a31c13aadf150cb48c29d7d1f Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Wed, 7 Jan 2015 10:11:23 -0500
Subject: [PATCH 1236/1819] Fix smartfees test for change to relay policy

Github-Pull: #5575
Rebased-From: 1eb1e65f092dc2b6e1067d2018440fbbd997fa5c
---
 qa/rpc-tests/smartfees.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index 924d16010255..0c07ef8a53d8 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -16,20 +16,20 @@ class EstimateFeeTest(BitcoinTestFramework):
     def setup_network(self):
         self.nodes = []
         self.nodes.append(start_node(0, self.options.tmpdir,
-                            ["-debug=mempool", "-debug=estimatefee"]))
+                            ["-debug=mempool", "-debug=estimatefee", "-relaypriority=0"]))
         # Node1 mines small-but-not-tiny blocks, and allows free transactions.
         # NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
         # so blockmaxsize of 2,000 is really just 1,000 bytes (room enough for
         # 6 or 7 transactions)
         self.nodes.append(start_node(1, self.options.tmpdir,
                                 ["-blockprioritysize=1500", "-blockmaxsize=2000",
-                                 "-debug=mempool", "-debug=estimatefee"]))
+                                 "-debug=mempool", "-debug=estimatefee", "-relaypriority=0"]))
         connect_nodes(self.nodes[1], 0)
 
         # Node2 is a stingy miner, that
         # produces very small blocks (room for only 3 or so transactions)
         node2args = [ "-blockprioritysize=0", "-blockmaxsize=1500",
-                      "-debug=mempool", "-debug=estimatefee"]
+                      "-debug=mempool", "-debug=estimatefee", "-relaypriority=0"]
         self.nodes.append(start_node(2, self.options.tmpdir, node2args))
         connect_nodes(self.nodes[2], 0)
 

From 263b65ebf0ce0beae5622a533234c8f897aec4e1 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Mon, 5 Jan 2015 21:39:40 -0500
Subject: [PATCH 1237/1819] tests: run sanity checks in tests too

If these are going to fail in bitcoind, they should fail in the tests as well.

Github-Pull: #5604
Rebased-From: d58c5d6f21fd2421bc8cbb224849e8c38b617775
---
 src/Makefile.test.include |  1 +
 src/test/sanity_tests.cpp | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 src/test/sanity_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b9d15f4df392..0a9a335e7a35 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -57,6 +57,7 @@ BITCOIN_TESTS =\
   test/netbase_tests.cpp \
   test/pmt_tests.cpp \
   test/rpc_tests.cpp \
+  test/sanity_tests.cpp \
   test/script_P2SH_tests.cpp \
   test/script_tests.cpp \
   test/scriptnum_tests.cpp \
diff --git a/src/test/sanity_tests.cpp b/src/test/sanity_tests.cpp
new file mode 100644
index 000000000000..464a8fbb8cfb
--- /dev/null
+++ b/src/test/sanity_tests.cpp
@@ -0,0 +1,18 @@
+// Copyright (c) 2012-2013 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "compat/sanity.h"
+#include "key.h"
+
+#include <boost/test/unit_test.hpp>
+BOOST_AUTO_TEST_SUITE(sanity_tests)
+
+BOOST_AUTO_TEST_CASE(basic_sanity)
+{
+  BOOST_CHECK_MESSAGE(glibc_sanity_test() == true, "libc sanity test");
+  BOOST_CHECK_MESSAGE(glibcxx_sanity_test() == true, "stdlib sanity test");
+  BOOST_CHECK_MESSAGE(ECC_InitSanityCheck() == true, "openssl ECC test");
+}
+
+BOOST_AUTO_TEST_SUITE_END()

From ace39db7644d5cb6bb8f99a465c5635b090e9ca5 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 9 Jan 2015 16:39:12 -0500
Subject: [PATCH 1238/1819] consensus: guard against openssl's new strict DER
 checks

New versions of OpenSSL will reject non-canonical DER signatures. However,
it'll happily decode them. Decode then re-encode before verification in order
to ensure that it is properly consumed.

Github-Pull: #5634
Rebased-From: 488ed32f2ada1d1dd108fc245d025c4d5f252783
---
 src/ecwrapper.cpp | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index 5ce7e6129469..be33913d0d96 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -117,10 +117,20 @@ bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
 }
 
 bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
-    // -1 = error, 0 = bad sig, 1 = good
-    if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
+    // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
+    unsigned char *norm_der = NULL;
+    ECDSA_SIG *norm_sig = ECDSA_SIG_new();
+    const unsigned char* sigptr = &vchSig[0];
+    d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
+    int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
+    ECDSA_SIG_free(norm_sig);
+    if (derlen <= 0)
         return false;
-    return true;
+
+    // -1 = error, 0 = bad sig, 1 = good
+    bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
+    OPENSSL_free(norm_der);
+    return ret;
 }
 
 bool CECKey::Recover(const uint256 &hash, const unsigned char *p64, int rec)

From 2d375fe97b34b16c11868dca8c5dde5667026914 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 9 Jan 2015 20:52:55 -0500
Subject: [PATCH 1239/1819] depends: bump openssl to 1.0.1k

Github-Pull: #5634
Rebased-From: dad7764a9dedb1143b6ea8bfd37f71f7ff72f518
---
 depends/packages/openssl.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 6d7a556c1100..1ffcb56cb193 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -1,8 +1,8 @@
 package=openssl
-$(package)_version=1.0.1j
+$(package)_version=1.0.1k
 $(package)_download_path=https://www.openssl.org/source
 $(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=1b60ca8789ba6f03e8ef20da2293b8dc131c39d83814e775069f02d26354edf3
+$(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c
 
 define $(package)_set_vars
 $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"

From 76ce5c8de3b97c9843e23c9b30f1049045c4b293 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 9 Jan 2015 22:06:08 -0500
Subject: [PATCH 1240/1819] fail immediately on an empty signature

Github-Pull: #5634
Rebased-From: 8dccba6a45db0466370726ed462b9da2eae43bce
---
 src/ecwrapper.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index be33913d0d96..79f70d1f47b1 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -117,6 +117,9 @@ bool CECKey::SetPubKey(const unsigned char* pubkey, size_t size) {
 }
 
 bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+    if (vchSig.empty())
+        return false;
+
     // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
     unsigned char *norm_der = NULL;
     ECDSA_SIG *norm_sig = ECDSA_SIG_new();

From 12b7c444f0b0bee42e97b62b0b40f11c8d1debe7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Sun, 11 Jan 2015 11:08:53 +0100
Subject: [PATCH 1241/1819] Improve robustness of DER recoding code

Add some defensive programming on top of #5634.

This copies the respective OpenSSL code in ECDSA_verify in
OpenSSL pre-1.0.1k (e.g. https://github.com/openssl/openssl/blob/OpenSSL_1_0_1j/crypto/ecdsa/ecs_vrf.c#L89)
more closely.

As reported by @sergiodemianlerner.

Github-Pull: #5640
Rebased-From: c6b7b29f232c651f898eeffb93f36c8f537c56d2
---
 src/ecwrapper.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/ecwrapper.cpp b/src/ecwrapper.cpp
index 79f70d1f47b1..5bfa740cc6cd 100644
--- a/src/ecwrapper.cpp
+++ b/src/ecwrapper.cpp
@@ -124,7 +124,18 @@ bool CECKey::Verify(const uint256 &hash, const std::vector<unsigned char>& vchSi
     unsigned char *norm_der = NULL;
     ECDSA_SIG *norm_sig = ECDSA_SIG_new();
     const unsigned char* sigptr = &vchSig[0];
-    d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
+    assert(norm_sig);
+    if (d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size()) == NULL)
+    {
+        /* As of OpenSSL 1.0.0p d2i_ECDSA_SIG frees and nulls the pointer on
+         * error. But OpenSSL's own use of this function redundantly frees the
+         * result. As ECDSA_SIG_free(NULL) is a no-op, and in the absence of a
+         * clear contract for the function behaving the same way is more
+         * conservative.
+         */
+        ECDSA_SIG_free(norm_sig);
+        return false;
+    }
     int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
     ECDSA_SIG_free(norm_sig);
     if (derlen <= 0)

From a3a73170a96cdf4999b963a43852a555c458a6a5 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 6 Jan 2015 17:05:46 +0100
Subject: [PATCH 1242/1819] Introduce 10 minute block download timeout

This will disconnect peers that do not transfer a block in 10 minutes, plus
5 minutes for every previously queued block with validated headers
(accomodating downstream bandwidth down to a few kilobytes per second - below
that the node would have trouble staying synchronized anyway).

Github-Pull: #5608
Rebased-From: 916130348ca803d762db912307b247f60f9aacd6
---
 src/main.cpp | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5e1be0d25cc5..8f58547fe5aa 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -131,9 +131,14 @@ 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.
     };
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
 
+    /** Number of blocks in flight with validated headers. */
+    int nQueuedValidatedHeaders = 0;
+
     /** Number of preferable block download peers. */
     int nPreferredDownload = 0;
 
@@ -315,6 +320,7 @@ void MarkBlockAsReceived(const uint256& hash) {
     map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
     if (itInFlight != mapBlocksInFlight.end()) {
         CNodeState *state = State(itInFlight->second.first);
+        nQueuedValidatedHeaders -= itInFlight->second.second->fValidatedHeaders;
         state->vBlocksInFlight.erase(itInFlight->second.second);
         state->nBlocksInFlight--;
         state->nStallingSince = 0;
@@ -330,7 +336,8 @@ void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, CBlockIndex *pindex
     // Make sure it's not listed somewhere already.
     MarkBlockAsReceived(hash);
 
-    QueuedBlock newentry = {hash, pindex, GetTimeMicros()};
+    QueuedBlock newentry = {hash, pindex, GetTimeMicros(), nQueuedValidatedHeaders, pindex != NULL};
+    nQueuedValidatedHeaders += newentry.fValidatedHeaders;
     list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry);
     state->nBlocksInFlight++;
     mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
@@ -4497,6 +4504,15 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id);
             pto->fDisconnect = true;
         }
+        // In case there is a block that has been in flight from this peer for (1 + 0.5 * N) times the block interval
+        // (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to
+        // 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 advertize nonexisting block hashes
+        // to unreasonably increase our timeout.
+        if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * Params().TargetSpacing() * (2 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
+            LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id);
+            pto->fDisconnect = true;
+        }
 
         //
         // Message: getdata (blocks)

From 4e7c219122eccc6eca66d4cf95c697bea1480aab Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 8 Jan 2015 14:38:06 +0100
Subject: [PATCH 1243/1819] Catch UTXO set read errors and shutdown

Github-Pull: #5619
Rebased-From: 13cdce4336818d0f6cefe6b3e61c45762d97d7c6
---
 src/init.cpp | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index c5430c1f2514..49f80b8b0b79 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -112,7 +112,28 @@ bool ShutdownRequested()
     return fRequestShutdown;
 }
 
+class CCoinsViewErrorCatcher : public CCoinsViewBacked
+{
+public:
+    CCoinsViewErrorCatcher(CCoinsView* view) : CCoinsViewBacked(view) {}
+    bool GetCoins(const uint256 &txid, CCoins &coins) const {
+        try {
+            return CCoinsViewBacked::GetCoins(txid, coins);
+        } catch(const std::runtime_error& e) {
+            uiInterface.ThreadSafeMessageBox(_("Error reading from database, shutting down."), "", CClientUIInterface::MSG_ERROR);
+            LogPrintf("Error reading from database: %s\n", e.what());
+            // Starting the shutdown sequence and returning false to the caller would be
+            // interpreted as 'entry not found' (as opposed to unable to read data), and
+            // could lead to invalid interpration. Just exit immediately, as we can't
+            // continue anyway, and all writes should be atomic.
+            abort();
+        }
+    }
+    // Writes do not need similar protection, as failure to write is handled by the caller.
+};
+
 static CCoinsViewDB *pcoinsdbview = NULL;
+static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 
 void Shutdown()
 {
@@ -155,6 +176,8 @@ void Shutdown()
         }
         delete pcoinsTip;
         pcoinsTip = NULL;
+        delete pcoinscatcher;
+        pcoinscatcher = NULL;
         delete pcoinsdbview;
         pcoinsdbview = NULL;
         delete pblocktree;
@@ -986,11 +1009,13 @@ bool AppInit2(boost::thread_group& threadGroup)
                 UnloadBlockIndex();
                 delete pcoinsTip;
                 delete pcoinsdbview;
+                delete pcoinscatcher;
                 delete pblocktree;
 
                 pblocktree = new CBlockTreeDB(nBlockTreeDBCache, false, fReindex);
                 pcoinsdbview = new CCoinsViewDB(nCoinDBCache, false, fReindex);
-                pcoinsTip = new CCoinsViewCache(pcoinsdbview);
+                pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
+                pcoinsTip = new CCoinsViewCache(pcoinscatcher);
 
                 if (fReindex)
                     pblocktree->WriteReindexing(true);

From af35bdc6b0d628d36bfb486602c8843ed7d2754a Mon Sep 17 00:00:00 2001
From: Micha <michagogo@server.fake>
Date: Mon, 12 Jan 2015 15:18:53 +0200
Subject: [PATCH 1244/1819] Update 0.10 release notes as of 0.10.0rc2

Also add 0.9.4's release notes to the archive.
Added commits based on
http://sourceforge.net/p/bitcoin/mailman/message/33225960/
[skip ci]
---
 doc/release-notes.md                     | 22 +++++-
 doc/release-notes/release-notes-0.9.4.md | 95 ++++++++++++++++++++++++
 2 files changed, 113 insertions(+), 4 deletions(-)
 create mode 100644 doc/release-notes/release-notes-0.9.4.md

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 6cd5b0583f3a..bd1ad8faed94 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -20,10 +20,6 @@ shut down (which might take a few minutes for older versions), then run the
 installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
 bitcoind/bitcoin-qt (on Linux).
 
-If you are upgrading from version 0.7.2 or earlier, the first time you run
-0.10.0 your blockchain files will be re-indexed, which will take anywhere from 
-30 minutes to several hours, depending on the speed of your machine.
-
 Downgrading warning
 ---------------------
 
@@ -382,6 +378,7 @@ Block and transaction handling:
 - `723d12c` Remove txn which are invalidated by coinbase maturity during reorg
 - `0cb8763` Check against MANDATORY flags prior to accepting to mempool
 - `8446262` Reject headers that build on an invalid parent
+- `008138c` Bugfix: only track UTXO modification after lookup
 
 P2P protocol and network code:
 - `f80cffa` Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails
@@ -409,6 +406,10 @@ P2P protocol and network code:
 - `845c86d` Do not use third party services for IP detection
 - `12a49ca` Limit the number of new addressses to accumulate
 - `35e408f` Regard connection failures as attempt for addrman
+- `a3a7317` Introduce 10 minute block download timeout
+- `3022e7d` Require sufficent priority for relay of free transactions
+- `58fda4d` Update seed IPs, based on bitcoin.sipa.be crawler data
+- `18021d0` Remove bitnodes.io from dnsseeds.
 
 Validation:
 - `6fd7ef2` Also switch the (unused) verification code to low-s instead of even-s
@@ -423,6 +424,9 @@ Validation:
 - `0391423` Discourage NOPs reserved for soft-fork upgrades
 - `98b135f` Make STRICTENC invalid pubkeys fail the script rather than the opcode
 - `307f7d4` Report script evaluation failures in log and reject messages
+- `ace39db` consensus: guard against openssl's new strict DER checks
+- `12b7c44` Improve robustness of DER recoding code
+- `76ce5c8` fail immediately on an empty signature
 
 Build system:
 - `f25e3ad` Fix build in OS X 10.9
@@ -439,6 +443,8 @@ Build system:
 - `d5fd094` build: fix qt test build when libprotobuf is in a non-standard path
 - `2cf5f16` Add libbitcoinconsensus library
 - `914868a` build: add a deterministic dmg signer 
+- `2d375fe` depends: bump openssl to 1.0.1k
+- `b7a4ecc` Build: Only check for boost when building code that requires it
 
 Wallet:
 - `b33d1f5` Use fee/priority estimates in wallet CreateTransaction
@@ -494,6 +500,9 @@ GUI:
 - `e7876b2` [Wallet] Prevent user from paying a non-sense fee
 - `c1c9d5b` Add Smartfee to GUI
 - `e0a25c5` Make askpassphrase dialog behave more sanely
+- `94b362d` On close of splashscreen interrupt verifyDB
+- `b790d13` English translation update
+- `8543b0d` Correct tooltip on address book page
 
 Tests:
 - `b41e594` Fix script test handling of empty scripts
@@ -552,6 +561,8 @@ Tests:
 - `34318d7` RPC-test based on invalidateblock for mempool coinbase spends
 - `76ec867` Use actually valid transactions for script tests
 - `c8589bf` Add actual signature tests
+- `e2677d7` Fix smartfees test for change to relay policy
+- `263b65e` tests: run sanity checks in tests too
 
 Miscellaneous:
 - `122549f` Fix incorrect checkpoint data for testnet3
@@ -580,6 +591,9 @@ Miscellaneous:
 - `7ab4358` Update bash-completion for v0.10
 - `6e6a36c` contrib: show pull # in prompt for github-merge script
 - `5b9f842` Upgrade leveldb to 1.18, make chainstate databases compatible between ARM and x86 (issue #2293)
+- `4e7c219` Catch UTXO set read errors and shutdown
+- `867c600` Catch LevelDB errors during flush
+- `06ca065` Fix CScriptID(const CScript& in) in empty script case
 
 Credits
 =======
diff --git a/doc/release-notes/release-notes-0.9.4.md b/doc/release-notes/release-notes-0.9.4.md
new file mode 100644
index 000000000000..7ee73246a9b0
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.4.md
@@ -0,0 +1,95 @@
+Bitcoin Core version 0.9.4 is now available from:
+
+  https://bitcoin.org/bin/0.9.4/
+
+This is a new minor version release, bringing only bug fixes and updated
+translations. Upgrading to this release is recommended.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+How to Upgrade
+===============
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+OpenSSL Warning
+================
+
+OpenSSL 1.0.0p / 1.0.1k was recently released and is being pushed out by
+various operating system maintainers. Review by Gregory Maxwell determined that
+this update is incompatible with the Bitcoin system and could lead to consensus
+forks.
+
+Bitcoin Core released binaries from https://bitcoin.org are unaffected,
+as are any built with the gitian deterministic build system.
+
+However, if you are running either
+
+- The Ubuntu PPA from https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin
+- A third-party or self-compiled Bitcoin Core
+
+upgrade to Bitcoin Core 0.9.4, which includes a workaround, **before** updating
+OpenSSL.
+
+The incompatibility is due to the OpenSSL update changing the
+behavior of ECDSA validation to reject any signature which is
+not encoded in a very rigid manner. This was a result of
+OpenSSL's change for CVE-2014-8275 "Certificate fingerprints
+can be modified".
+
+We are specifically aware of potential hard-forks due to signature
+encoding handling and had been hoping to close them via BIP62 in 0.10.
+BIP62's purpose is to improve transaction malleability handling and
+as a side effect rigidly defines the encoding for signatures, but the
+overall scope of BIP62 has made it take longer than we'd like to
+deploy.
+
+0.9.4 changelog
+================
+
+Validation:
+- `b8e81b7` consensus: guard against openssl's new strict DER checks
+- `60c51f1` fail immediately on an empty signature
+- `037bfef` Improve robustness of DER recoding code
+
+Command-line options:
+- `cd5164a` Make -proxy set all network types, avoiding a connect leak.
+
+P2P:
+- `bb424e4` Limit the number of new addressses to accumulate
+
+RPC:
+- `0a94661` Disable SSLv3 (in favor of TLS) for the RPC client and server.
+
+Build system:
+- `f047dfa` gitian: openssl-1.0.1i.tar.gz -> openssl-1.0.1k.tar.gz
+- `5b9f78d` build: Fix OSX build when using Homebrew and qt5
+- `ffab1dd` Keep symlinks when copying into .app bundle
+- `613247f` osx: fix signing to make Gatekeeper happy (again)
+
+Miscellaneous:
+- `25b49b5` Refactor -alertnotify code
+- `2743529` doc: Add instructions for consistent Mac OS X build names
+
+Credits
+--------
+
+Thanks to who contributed to this release, at least:
+
+- Cory Fields
+- Gavin Andresen
+- Gregory Maxwell
+- Jeff Garzik
+- Luke Dashjr
+- Matt Corallo
+- Pieter Wuille
+- Saivann
+- Sergio Demian Lerner
+- Wladimir J. van der Laan
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

From c3200bcd1e7116e079aebabed3a01dc5385bfc9e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 12 Jan 2015 15:29:51 +0100
Subject: [PATCH 1245/1819] depends: remove embedded OpenSSL timestamp for
 determinism

---
 depends/packages/openssl.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 1ffcb56cb193..eb4779410bf2 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -20,7 +20,7 @@ $(package)_config_opts_i686_mingw32=mingw
 endef
 
 define $(package)_preprocess_cmds
-  sed -i.old "/define DATE/d" crypto/Makefile && \
+  sed -i.old "/define DATE/d" util/mkbuildinf.pl && \
   sed -i.old "s|engines apps test|engines|" Makefile.org
 endef
 

From aaf55d25c6191c0effd5fa5dd5d2d0f17e715854 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Tue, 13 Jan 2015 17:43:39 -0800
Subject: [PATCH 1246/1819] Add a -rpckeepalive and disable RPC use of HTTP
 persistent connections.

It turns out that some miners have been staying with old versions of
 Bitcoin Core because their software  behaves poorly with persistent
 connections and the Bitcoin Core thread and connection limits.

What happens is that underlying  HTTP libraries leave connections open
 invisibly to their users and then the user runs into the default four
 thread limit.  This looks like Bitcoin Core is unresponsive to RPC.

There are many things that should be improved in Bitcoin Core's behavior
 here, e.g. supporting more concurrent connections, not tying up threads
 for idle connections, disconnecting kept-alive  connections when limits
 are reached, etc. All are fairly big, risky changes.

Disabling keep-alive is a simple workaround. It's often not easy to turn
 off the keep-alive support in the client where it may be buried in some
 platform library.

If you are one of the few who really needs persistent connections you
 probably know that you want them and can find a switch; while if you
 don't and the misbehavior is hitting you it is hard to discover the
 source of your problems is keepalive related.  Given that it is best
 to default to off until they're handled better.

Github-Merge: #5655
Rebased-From: 16a5c18cea7330bd68dc9d2f768eb518af88795b 56c1093dae0c523f9f643f00c67414691272a983 1dd8ee72afc26191da51d8d3a5590eab7c9368f6
---
 qa/rpc-tests/httpbasics.py     | 30 ++++++++++++++++++++++++++++--
 qa/rpc-tests/test_framework.py |  5 ++++-
 src/init.cpp                   |  1 +
 src/rpcserver.cpp              |  2 +-
 4 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py
index a94edaffa53d..8cbf1d7f4c45 100755
--- a/qa/rpc-tests/httpbasics.py
+++ b/qa/rpc-tests/httpbasics.py
@@ -20,7 +20,10 @@
 except ImportError:
     import urlparse
 
-class RESTTest (BitcoinTestFramework):        
+class HTTPBasicsTest (BitcoinTestFramework):        
+    def setup_nodes(self):
+        return start_nodes(4, self.options.tmpdir, extra_args=[['-rpckeepalive=1'], ['-rpckeepalive=0'], [], []])
+
     def run_test(self):        
         
         #################################################
@@ -71,6 +74,29 @@ def run_test(self):
         assert_equal('"error":null' in out1, True)
         assert_equal(conn.sock!=None, False) #now the connection must be closed after the response        
         
+        #node1 (2nd node) is running with disabled keep-alive option
+        urlNode1 = urlparse.urlparse(self.nodes[1].url)
+        authpair = urlNode1.username + ':' + urlNode1.password
+        headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
+                
+        conn = httplib.HTTPConnection(urlNode1.hostname, urlNode1.port)
+        conn.connect()
+        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        out1 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True)
+        assert_equal(conn.sock!=None, False) #connection must be closed because keep-alive was set to false
+        
+        #node2 (third node) is running with standard keep-alive parameters which means keep-alive is off
+        urlNode2 = urlparse.urlparse(self.nodes[2].url)
+        authpair = urlNode2.username + ':' + urlNode2.password
+        headers = {"Authorization": "Basic " + base64.b64encode(authpair)}
+                
+        conn = httplib.HTTPConnection(urlNode2.hostname, urlNode2.port)
+        conn.connect()
+        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        out1 = conn.getresponse().read();
+        assert_equal('"error":null' in out1, True)
+        assert_equal(conn.sock!=None, False) #connection must be closed because bitcoind should use keep-alive by default
         
 if __name__ == '__main__':
-    RESTTest ().main ()
+    HTTPBasicsTest ().main ()
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework.py
index 6c4ec073c288..4c8a11b821d4 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework.py
@@ -33,8 +33,11 @@ def setup_chain(self):
         print("Initializing test directory "+self.options.tmpdir)
         initialize_chain(self.options.tmpdir)
 
+    def setup_nodes(self):
+        return start_nodes(4, self.options.tmpdir)
+
     def setup_network(self, split = False):
-        self.nodes = start_nodes(4, self.options.tmpdir)
+        self.nodes = self.setup_nodes()
 
         # Connect the nodes as a "chain".  This allows us
         # to split the network between nodes 1 and 2 to get
diff --git a/src/init.cpp b/src/init.cpp
index 49f80b8b0b79..436139ea2c4f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -381,6 +381,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -rpcport=<port>        " + strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 8332, 18332) + "\n";
     strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times") + "\n";
     strUsage += "  -rpcthreads=<n>        " + strprintf(_("Set the number of threads to service RPC calls (default: %d)"), 4) + "\n";
+    strUsage += "  -rpckeepalive          " + strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 0) + "\n";
 
     strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
     strUsage += "  -rpcssl                                  " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 4b8264658583..aa0ed8ba960c 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -954,7 +954,7 @@ void ServiceConnection(AcceptedConnection *conn)
         ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto, MAX_SIZE);
 
         // HTTP Keep-Alive is false; close connection immediately
-        if (mapHeaders["connection"] == "close")
+        if ((mapHeaders["connection"] == "close") || (!GetBoolArg("-rpckeepalive", false)))
             fRun = false;
 
         // Process via JSON-RPC API

From 186a517692a659cd549e8e8e2161d7a99a188b9e Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Fri, 16 Jan 2015 05:59:36 -0800
Subject: [PATCH 1247/1819] Restore RPC HTTP keepalives to default.

This avoids a regression for issues like #334 where high speed
 repeated connections eventually run the HTTP client out of
 sockets because all of theirs end up in time_wait.

Maybe the trade-off here is suboptimal, but if both choices will
 fail then we prefer fewer changes until the root cause is solved.

Rebased-From: 1a25a7edf82706c3152e2d978d320ec465a34de1 7d2cb485116636595250fce4ea4eab16a877479b
Github-Pull: #5674
---
 qa/rpc-tests/httpbasics.py | 16 ++++++++--------
 src/init.cpp               |  2 +-
 src/rpcserver.cpp          |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py
index 8cbf1d7f4c45..24533741e553 100755
--- a/qa/rpc-tests/httpbasics.py
+++ b/qa/rpc-tests/httpbasics.py
@@ -35,13 +35,13 @@ def run_test(self):
         
         conn = httplib.HTTPConnection(url.hostname, url.port)
         conn.connect()
-        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
         out1 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True)
         assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
         
         #send 2nd request without closing connection
-        conn.request('GET', '/', '{"method": "getchaintips"}', headers)
+        conn.request('POST', '/', '{"method": "getchaintips"}', headers)
         out2 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
         assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
@@ -52,13 +52,13 @@ def run_test(self):
         
         conn = httplib.HTTPConnection(url.hostname, url.port)
         conn.connect()
-        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
         out1 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True)
         assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
         
         #send 2nd request without closing connection
-        conn.request('GET', '/', '{"method": "getchaintips"}', headers)
+        conn.request('POST', '/', '{"method": "getchaintips"}', headers)
         out2 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True) #must also response with a correct json-rpc message
         assert_equal(conn.sock!=None, True) #according to http/1.1 connection must still be open!
@@ -69,7 +69,7 @@ def run_test(self):
         
         conn = httplib.HTTPConnection(url.hostname, url.port)
         conn.connect()
-        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
         out1 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True)
         assert_equal(conn.sock!=None, False) #now the connection must be closed after the response        
@@ -81,7 +81,7 @@ def run_test(self):
                 
         conn = httplib.HTTPConnection(urlNode1.hostname, urlNode1.port)
         conn.connect()
-        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
         out1 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True)
         assert_equal(conn.sock!=None, False) #connection must be closed because keep-alive was set to false
@@ -93,10 +93,10 @@ def run_test(self):
                 
         conn = httplib.HTTPConnection(urlNode2.hostname, urlNode2.port)
         conn.connect()
-        conn.request('GET', '/', '{"method": "getbestblockhash"}', headers)
+        conn.request('POST', '/', '{"method": "getbestblockhash"}', headers)
         out1 = conn.getresponse().read();
         assert_equal('"error":null' in out1, True)
-        assert_equal(conn.sock!=None, False) #connection must be closed because bitcoind should use keep-alive by default
+        assert_equal(conn.sock!=None, True) #connection must be closed because bitcoind should use keep-alive by default
         
 if __name__ == '__main__':
     HTTPBasicsTest ().main ()
diff --git a/src/init.cpp b/src/init.cpp
index 436139ea2c4f..a91418cd5a6c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -381,7 +381,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -rpcport=<port>        " + strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 8332, 18332) + "\n";
     strUsage += "  -rpcallowip=<ip>       " + _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times") + "\n";
     strUsage += "  -rpcthreads=<n>        " + strprintf(_("Set the number of threads to service RPC calls (default: %d)"), 4) + "\n";
-    strUsage += "  -rpckeepalive          " + strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 0) + "\n";
+    strUsage += "  -rpckeepalive          " + strprintf(_("RPC support for HTTP persistent connections (default: %d)"), 1) + "\n";
 
     strUsage += "\n" + _("RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)") + "\n";
     strUsage += "  -rpcssl                                  " + _("Use OpenSSL (https) for JSON-RPC connections") + "\n";
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index aa0ed8ba960c..6db2b0421fb7 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -954,7 +954,7 @@ void ServiceConnection(AcceptedConnection *conn)
         ReadHTTPMessage(conn->stream(), mapHeaders, strRequest, nProto, MAX_SIZE);
 
         // HTTP Keep-Alive is false; close connection immediately
-        if ((mapHeaders["connection"] == "close") || (!GetBoolArg("-rpckeepalive", false)))
+        if ((mapHeaders["connection"] == "close") || (!GetBoolArg("-rpckeepalive", true)))
             fRun = false;
 
         // Process via JSON-RPC API

From 58259ad1edf14a4f514fe5f837ac7d1d99b58422 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 16 Jan 2015 16:27:12 -0500
Subject: [PATCH 1248/1819] qt: fix broken unicode chars on osx 10.10

- qt: avoid hard-coding font names

They may not contain all necessary characters for a language

- qt: fix broken unicode chars on osx 10.10

The default font changed again.

The real fix is to compile qt against a >= 10.8 sdk, but this is simple enough
to backport to 0.10 to avoid having to do that there.

Note: NSAppKitVersionNumber is a double and there's no official value for
NSAppKitVersionNumber10_10. Since == isn't reliable for doubles, use Apple's
guidelines for testing versions here:
https://developer.apple.com/library/mac/releasenotes/AppKit/RN-AppKit/

Chinese and Japanese fonts have been hard-coded as well, otherwise they fail to
show up at all.

- qt: fonts: allow SubstituteFonts to filter based on user's language

SubstituteFonts() has been moved to after app identification so that QSettings
are accessible.

Github-Pull: #5671
Rebased-From: 73cd4edb4f1ff98c20549a609e96fa40834f5e73 52954e6efd373c14736237c4c79769bf00f5dfb8 f5ad78b34af8f50e12fab63b331768b96ec2c779
---
 src/qt/bitcoin.cpp      | 27 +++++++++++++++++----------
 src/qt/guiutil.cpp      | 25 ++++++++++++++++++++++---
 src/qt/guiutil.h        |  2 +-
 src/qt/splashscreen.cpp |  2 +-
 4 files changed, 41 insertions(+), 15 deletions(-)

diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 123777a71bcd..f30df348c5ff 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -89,10 +89,24 @@ static std::string Translate(const char* psz)
     return QCoreApplication::translate("bitcoin-core", psz).toStdString();
 }
 
+static QString GetLangTerritory()
+{
+    QSettings settings;
+    // Get desired locale (e.g. "de_DE")
+    // 1) System default language
+    QString lang_territory = QLocale::system().name();
+    // 2) Language from QSettings
+    QString lang_territory_qsettings = settings.value("language", "").toString();
+    if(!lang_territory_qsettings.isEmpty())
+        lang_territory = lang_territory_qsettings;
+    // 3) -lang command line argument
+    lang_territory = QString::fromStdString(GetArg("-lang", lang_territory.toStdString()));
+    return lang_territory;
+}
+
 /** Set up translations */
 static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTranslator, QTranslator &translatorBase, QTranslator &translator)
 {
-    QSettings settings;
 
     // Remove old translators
     QApplication::removeTranslator(&qtTranslatorBase);
@@ -102,13 +116,7 @@ static void initTranslations(QTranslator &qtTranslatorBase, QTranslator &qtTrans
 
     // Get desired locale (e.g. "de_DE")
     // 1) System default language
-    QString lang_territory = QLocale::system().name();
-    // 2) Language from QSettings
-    QString lang_territory_qsettings = settings.value("language", "").toString();
-    if(!lang_territory_qsettings.isEmpty())
-        lang_territory = lang_territory_qsettings;
-    // 3) -lang command line argument
-    lang_territory = QString::fromStdString(GetArg("-lang", lang_territory.toStdString()));
+    QString lang_territory = GetLangTerritory();
 
     // Convert to "de" only by truncating "_DE"
     QString lang = lang_territory;
@@ -498,8 +506,6 @@ int main(int argc, char *argv[])
     Q_INIT_RESOURCE(bitcoin);
     Q_INIT_RESOURCE(bitcoin_locale);
 
-    GUIUtil::SubstituteFonts();
-
     BitcoinApplication app(argc, argv);
 #if QT_VERSION > 0x050100
     // Generate high-dpi pixmaps
@@ -521,6 +527,7 @@ int main(int argc, char *argv[])
     QApplication::setOrganizationName(QAPP_ORG_NAME);
     QApplication::setOrganizationDomain(QAPP_ORG_DOMAIN);
     QApplication::setApplicationName(QAPP_APP_NAME_DEFAULT);
+    GUIUtil::SubstituteFonts(GetLangTerritory());
 
     /// 4. Initialization of translations, so that intro dialog is in user's language
     // Now that QSettings are accessible, initialize translations
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index a1ae756c43e6..de8edef79277 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -67,6 +67,9 @@ static boost::filesystem::detail::utf8_codecvt_facet utf8;
 
 #if defined(Q_OS_MAC)
 extern double NSAppKitVersionNumber;
+#if !defined(NSAppKitVersionNumber10_8)
+#define NSAppKitVersionNumber10_8 1187
+#endif
 #if !defined(NSAppKitVersionNumber10_9)
 #define NSAppKitVersionNumber10_9 1265
 #endif
@@ -383,7 +386,7 @@ void openDebugLogfile()
         QDesktopServices::openUrl(QUrl::fromLocalFile(boostPathToQString(pathDebug)));
 }
 
-void SubstituteFonts()
+void SubstituteFonts(const QString& language)
 {
 #if defined(Q_OS_MAC)
 // Background:
@@ -393,12 +396,28 @@ void SubstituteFonts()
 // If this fallback is not properly loaded, some characters may fail to
 // render correctly.
 //
+// The same thing happened with 10.10. .Helvetica Neue DeskInterface is now default.
+//
 // Solution: If building with the 10.7 SDK or lower and the user's platform
 // is 10.9 or higher at runtime, substitute the correct font. This needs to
 // happen before the QApplication is created.
 #if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8
-    if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_9)
-        QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
+    if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_8)
+    {
+        if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_9)
+            /* On a 10.9 - 10.9.x system */
+            QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
+        else
+        {
+            /* 10.10 or later system */
+            if (language == "zh_CN" || language == "zh_TW" || language == "zh_HK") // traditional or simplified Chinese
+              QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Heiti SC");
+            else if (language == "ja") // Japanesee
+              QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Songti SC");
+            else
+              QFont::insertSubstitution(".Helvetica Neue DeskInterface", "Lucida Grande");
+        }
+    }
 #endif
 #endif
 }
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 09c79db2d912..41ff60871535 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -107,7 +107,7 @@ namespace GUIUtil
     void openDebugLogfile();
 
     // Replace invalid default fonts with known good ones
-    void SubstituteFonts();
+    void SubstituteFonts(const QString& language);
 
     /** Qt event filter that intercepts ToolTipChange events, and replaces the tooltip with a rich text
       representation if needed. This assures that Qt can word-wrap long tooltip messages.
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index b4b81440ca81..fed8e15fb52b 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -37,7 +37,7 @@ SplashScreen::SplashScreen(Qt::WindowFlags f, const NetworkStyle *networkStyle)
     QString copyrightText   = QChar(0xA9)+QString(" 2009-%1 ").arg(COPYRIGHT_YEAR) + QString(tr("The Bitcoin Core developers"));
     QString titleAddText    = networkStyle->getTitleAddText();
 
-    QString font            = "Arial";
+    QString font            = QApplication::font().toString();
 
     // load the bitmap for writing some text over it
     pixmap     = networkStyle->getSplashImage();

From ed4206acb1bdc9d23abe30fefd13f9d49a1979b3 Mon Sep 17 00:00:00 2001
From: fsb4000 <fsb4000@yandex.ru>
Date: Fri, 23 Jan 2015 20:01:07 +0600
Subject: [PATCH 1249/1819] fix crash: CoinControl "space" bug

Just like https://github.com/novacoin-project/novacoin/commit/baf80c26a2e7f1ba6061d63d174eff0a09111e6f

Github-Pull: #5700
Rebased-From: 944c256741b260bd8b758be4a0543af1cb080943
---
 src/qt/coincontroltreewidget.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/qt/coincontroltreewidget.cpp b/src/qt/coincontroltreewidget.cpp
index 907b5caa0567..0082c9bfd0af 100644
--- a/src/qt/coincontroltreewidget.cpp
+++ b/src/qt/coincontroltreewidget.cpp
@@ -17,7 +17,8 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
     {
         event->ignore();
         int COLUMN_CHECKBOX = 0;
-        this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
+        if(this->currentItem())
+            this->currentItem()->setCheckState(COLUMN_CHECKBOX, ((this->currentItem()->checkState(COLUMN_CHECKBOX) == Qt::Checked) ? Qt::Unchecked : Qt::Checked));
     }
     else if (event->key() == Qt::Key_Escape) // press esc -> close dialog
     {
@@ -29,4 +30,4 @@ void CoinControlTreeWidget::keyPressEvent(QKeyEvent *event)
     {
         this->QTreeWidget::keyPressEvent(event);
     }
-}
\ No newline at end of file
+}

From b24ff47c6487d6cb81c9691c4e68c33f367fce74 Mon Sep 17 00:00:00 2001
From: Peter Todd <pete@petertodd.org>
Date: Fri, 9 Jan 2015 05:52:57 -0500
Subject: [PATCH 1250/1819] Make empty byte arrays pass
 CheckSignatureEncoding()

Makes it possible to compactly provide a delibrately invalid signature
for use with CHECK(MULTI)SIG. For instance with BIP19 if m != n invalid
signatures need to be provided in the scriptSig; prior to this change
those invalid signatures would need to be large DER-encoded signatures.

Note that we may want to further expand on this change in the future by
saying that only OP_0 is a "valid" invalid signature; BIP19 even with
this change is inherently malleable as the invalid signatures can be any
validly encoded DER signature.

Rebased-From: 2fa9a8ec86033b809a1c48f0396c3482c0d5d33c
Github-Pull: #5627
---
 src/script/interpreter.cpp        | 5 +++++
 src/test/data/script_invalid.json | 2 +-
 src/test/data/script_valid.json   | 5 +++++
 src/test/multisig_tests.cpp       | 4 ----
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 3231f2e74e53..3128bae35f88 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -189,6 +189,11 @@ bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
 }
 
 bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags, ScriptError* serror) {
+    // Empty signature. Not strictly DER encoded, but allowed to provide a
+    // compact way to provide an invalid signature for use with CHECK(MULTI)SIG
+    if (vchSig.size() == 0) {
+        return true;
+    }
     if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsDERSignature(vchSig)) {
         return set_error(serror, SCRIPT_ERR_SIG_DER);
     } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig, serror)) {
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 86d39b5c2086..09120e88385d 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -504,7 +504,7 @@
     "2-of-2 CHECKMULTISIG NOT with the first pubkey invalid, and both signatures validly encoded."
 ],
 [
-    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 0",
+    "0 0x47 0x3044022044dc17b0887c161bb67ba9635bf758735bdde503e4b0a0987f587f14a4e1143d022009a215772d49a85dae40d8ca03955af26ad3978a0ff965faa12915e9586249a501 1",
     "2 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 2 CHECKMULTISIG NOT",
     "STRICTENC",
     "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index d3075de646aa..17398ca1bd74 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -662,6 +662,11 @@
 ["0 0 0x02 0x0000", "CHECKMULTISIGVERIFY 1", ""],
 ["0 0x02 0x0000 0", "CHECKMULTISIGVERIFY 1", ""],
 
+["While not really correctly DER encoded, the empty signature is allowed by"],
+["STRICTENC to provide a compact way to provide a delibrately invalid signature."],
+["0", "0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 CHECKSIG NOT", "STRICTENC"],
+["0 0", "1 0x21 0x02865c40293a680cb9c020e7b1e106d8c1916d3cef99aa431a56d253e69256dac0 1 CHECKMULTISIG NOT", "STRICTENC"],
+
 ["CHECKMULTISIG evaluation order tests. CHECKMULTISIG evaluates signatures and"],
 ["pubkeys in a specific order, and will exit early if the number of signatures"],
 ["left to check is greater than the number of keys left. As STRICTENC fails the"],
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 8d06caa147c3..6c800efde2aa 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -120,10 +120,6 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         }
     }
     s.clear();
-    s << OP_0 << OP_0;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err));
-    BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));
-    s.clear();
     s << OP_0 << OP_1;
     BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));

From c5044bc1693ced50ed070a27e7d2f3174202ace5 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Fri, 7 Nov 2014 23:18:21 -0800
Subject: [PATCH 1251/1819] sleep-wait on genesis block during init with
 -reindex

Rebased-From: ff09e31a51dcee404c9c037c7c5f50c522e67ea8
Github-Pull: #5243
---
 src/init.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index a91418cd5a6c..df199ae487a4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1248,6 +1248,11 @@ bool AppInit2(boost::thread_group& threadGroup)
             vImportFiles.push_back(strFile);
     }
     threadGroup.create_thread(boost::bind(&ThreadImport, vImportFiles));
+    if (chainActive.Tip() == NULL) {
+        LogPrintf("Waiting for genesis block to be imported...\n");
+        while (!fRequestShutdown && chainActive.Tip() == NULL)
+            MilliSleep(10);
+    }
 
     // ********************************************************* Step 10: start node
 

From b61940b3a15a9776878b0affdd04e72d6b6dcc55 Mon Sep 17 00:00:00 2001
From: fsb4000 <fsb4000@yandex.ru>
Date: Thu, 29 Jan 2015 01:25:11 +0600
Subject: [PATCH 1252/1819] Change Coin Control first column label

Github-Pull: #5720
Rebased-From: 55eade9d46ebfa4b32b79893595d91d529fa30bb
---
 src/qt/coincontroldialog.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 85b43b7b1f58..19c5776b9210 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -116,6 +116,10 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
     // (un)select all
     connect(ui->pushButtonSelectAll, SIGNAL(clicked()), this, SLOT(buttonSelectAllClicked()));
 
+    // change coin control first column label due Qt4 bug. 
+    // see https://github.com/bitcoin/bitcoin/issues/5716
+    ui->treeWidget->headerItem()->setText(COLUMN_CHECKBOX, QString());
+
     ui->treeWidget->setColumnWidth(COLUMN_CHECKBOX, 84);
     ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
     ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);

From 6a02ef8bdb07ef42bdac0511b7f897d49f69f7eb Mon Sep 17 00:00:00 2001
From: Philip Kaufmann <phil.kaufmann@t-online.de>
Date: Sat, 10 Jan 2015 15:02:12 +0100
Subject: [PATCH 1253/1819] [Qt] don't allow amount changes when AmountSpinBox
 is read-only

- before it was possible to use the steps to change e.g. amouns of
  authenticated or unauthenticated payment requests (AmountSpinBox is
  already set to read-only here) - this is now fixed
- also move the reimplemented stepEnabled() function to the
  protected section of our class, where it belongs (see Qt doc)

Github-Pull: #5637
Rebased-From: 0fd9e2bf43d217d9a76003476661c8ab53606548
---
 src/qt/bitcoinamountfield.cpp | 38 +++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index 5b8ab23b26a7..4373357e444e 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -20,6 +20,7 @@
 class AmountSpinBox: public QAbstractSpinBox
 {
     Q_OBJECT
+
 public:
     explicit AmountSpinBox(QWidget *parent):
         QAbstractSpinBox(parent),
@@ -72,23 +73,6 @@ class AmountSpinBox: public QAbstractSpinBox
         setValue(val);
     }
 
-    StepEnabled stepEnabled() const
-    {
-        StepEnabled rv = 0;
-        if(text().isEmpty()) // Allow step-up with empty field
-            return StepUpEnabled;
-        bool valid = false;
-        CAmount val = value(&valid);
-        if(valid)
-        {
-            if(val > 0)
-                rv |= StepDownEnabled;
-            if(val < BitcoinUnits::maxMoney())
-                rv |= StepUpEnabled;
-        }
-        return rv;
-    }
-
     void setDisplayUnit(int unit)
     {
         bool valid = false;
@@ -139,6 +123,7 @@ class AmountSpinBox: public QAbstractSpinBox
         }
         return cachedMinimumSizeHint;
     }
+
 private:
     int currentUnit;
     CAmount singleStep;
@@ -179,6 +164,25 @@ class AmountSpinBox: public QAbstractSpinBox
         return QAbstractSpinBox::event(event);
     }
 
+    StepEnabled stepEnabled() const
+    {
+        StepEnabled rv = 0;
+        if (isReadOnly()) // Disable steps when AmountSpinBox is read-only
+            return StepNone;
+        if(text().isEmpty()) // Allow step-up with empty field
+            return StepUpEnabled;
+        bool valid = false;
+        CAmount val = value(&valid);
+        if(valid)
+        {
+            if(val > 0)
+                rv |= StepDownEnabled;
+            if(val < BitcoinUnits::maxMoney())
+                rv |= StepUpEnabled;
+        }
+        return rv;
+    }
+
 signals:
     void valueChanged();
 };

From abfbeafe8461131cc7e123b9da69e951f81fd7a3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 13 Jan 2015 03:15:39 +0100
Subject: [PATCH 1254/1819] Change IsDERSignature to BIP66 implementation

---
 src/script/interpreter.cpp | 126 ++++++++++++++++++-------------------
 1 file changed, 63 insertions(+), 63 deletions(-)

diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 3128bae35f88..e049fed2e569 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -93,76 +93,76 @@ bool static IsCompressedOrUncompressedPubKey(const valtype &vchPubKey) {
  * in which case a single 0 byte is necessary and even required).
  * 
  * See https://bitcointalk.org/index.php?topic=8392.msg127623#msg127623
+ *
+ * This function is consensus-critical since BIP66.
  */
-bool static IsDERSignature(const valtype &vchSig) {
+bool static IsValidSignatureEncoding(const std::vector<unsigned char> &sig) {
+    // Format: 0x30 [total-length] 0x02 [R-length] [R] 0x02 [S-length] [S] [sighash]
+    // * total-length: 1-byte length descriptor of everything that follows,
+    //   excluding the sighash byte.
+    // * R-length: 1-byte length descriptor of the R value that follows.
+    // * R: arbitrary-length big-endian encoded R value. It must use the shortest
+    //   possible encoding for a positive integers (which means no null bytes at
+    //   the start, except a single one when the next byte has its highest bit set).
+    // * S-length: 1-byte length descriptor of the S value that follows.
+    // * S: arbitrary-length big-endian encoded S value. The same rules apply.
+    // * sighash: 1-byte value indicating what data is hashed (not part of the DER
+    //   signature)
 
-    if (vchSig.size() < 9) {
-        //  Non-canonical signature: too short
-        return false;
-    }
-    if (vchSig.size() > 73) {
-        // Non-canonical signature: too long
-        return false;
-    }
-    if (vchSig[0] != 0x30) {
-        //  Non-canonical signature: wrong type
-        return false;
-    }
-    if (vchSig[1] != vchSig.size()-3) {
-        //  Non-canonical signature: wrong length marker
-        return false;
-    }
-    unsigned int nLenR = vchSig[3];
-    if (5 + nLenR >= vchSig.size()) {
-        //  Non-canonical signature: S length misplaced
-        return false;
-    }
-    unsigned int nLenS = vchSig[5+nLenR];
-    if ((unsigned long)(nLenR+nLenS+7) != vchSig.size()) {
-        //  Non-canonical signature: R+S length mismatch
-        return false;
-    }
+    // Minimum and maximum size constraints.
+    if (sig.size() < 9) return false;
+    if (sig.size() > 73) return false;
 
-    const unsigned char *R = &vchSig[4];
-    if (R[-2] != 0x02) {
-        //  Non-canonical signature: R value type mismatch
-        return false;
-    }
-    if (nLenR == 0) {
-        //  Non-canonical signature: R length is zero
-        return false;
-    }
-    if (R[0] & 0x80) {
-        //  Non-canonical signature: R value negative
-        return false;
-    }
-    if (nLenR > 1 && (R[0] == 0x00) && !(R[1] & 0x80)) {
-        //  Non-canonical signature: R value excessively padded
-        return false;
-    }
+    // A signature is of type 0x30 (compound).
+    if (sig[0] != 0x30) return false;
+
+    // Make sure the length covers the entire signature.
+    if (sig[1] != sig.size() - 3) return false;
+
+    // Extract the length of the R element.
+    unsigned int lenR = sig[3];
+
+    // Make sure the length of the S element is still inside the signature.
+    if (5 + lenR >= sig.size()) return false;
+
+    // Extract the length of the S element.
+    unsigned int lenS = sig[5 + lenR];
+
+    // Verify that the length of the signature matches the sum of the length
+    // of the elements.
+    if ((size_t)(lenR + lenS + 7) != sig.size()) return false;
+ 
+    // Check whether the R element is an integer.
+    if (sig[2] != 0x02) return false;
+
+    // Zero-length integers are not allowed for R.
+    if (lenR == 0) return false;
+
+    // Negative numbers are not allowed for R.
+    if (sig[4] & 0x80) return false;
+
+    // Null bytes at the start of R are not allowed, unless R would
+    // otherwise be interpreted as a negative number.
+    if (lenR > 1 && (sig[4] == 0x00) && !(sig[5] & 0x80)) return false;
+
+    // Check whether the S element is an integer.
+    if (sig[lenR + 4] != 0x02) return false;
+
+    // Zero-length integers are not allowed for S.
+    if (lenS == 0) return false;
+
+    // Negative numbers are not allowed for S.
+    if (sig[lenR + 6] & 0x80) return false;
+
+    // Null bytes at the start of S are not allowed, unless S would otherwise be
+    // interpreted as a negative number.
+    if (lenS > 1 && (sig[lenR + 6] == 0x00) && !(sig[lenR + 7] & 0x80)) return false;
 
-    const unsigned char *S = &vchSig[6+nLenR];
-    if (S[-2] != 0x02) {
-        //  Non-canonical signature: S value type mismatch
-        return false;
-    }
-    if (nLenS == 0) {
-        //  Non-canonical signature: S length is zero
-        return false;
-    }
-    if (S[0] & 0x80) {
-        //  Non-canonical signature: S value negative
-        return false;
-    }
-    if (nLenS > 1 && (S[0] == 0x00) && !(S[1] & 0x80)) {
-        //  Non-canonical signature: S value excessively padded
-        return false;
-    }
     return true;
 }
 
 bool static IsLowDERSignature(const valtype &vchSig, ScriptError* serror) {
-    if (!IsDERSignature(vchSig)) {
+    if (!IsValidSignatureEncoding(vchSig)) {
         return set_error(serror, SCRIPT_ERR_SIG_DER);
     }
     unsigned int nLenR = vchSig[3];
@@ -194,7 +194,7 @@ bool static CheckSignatureEncoding(const valtype &vchSig, unsigned int flags, Sc
     if (vchSig.size() == 0) {
         return true;
     }
-    if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsDERSignature(vchSig)) {
+    if ((flags & (SCRIPT_VERIFY_DERSIG | SCRIPT_VERIFY_LOW_S | SCRIPT_VERIFY_STRICTENC)) != 0 && !IsValidSignatureEncoding(vchSig)) {
         return set_error(serror, SCRIPT_ERR_SIG_DER);
     } else if ((flags & SCRIPT_VERIFY_LOW_S) != 0 && !IsLowDERSignature(vchSig, serror)) {
         // serror is set

From 18695f08ef1150851b3ff86cdf7bd5870f65e1dd Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 19 Jan 2015 18:19:37 -0500
Subject: [PATCH 1255/1819] Example unit tests from BIP66

---
 src/test/data/script_invalid.json | 96 +++++++++++++++++++++++++++++++
 src/test/data/script_valid.json   | 48 ++++++++++++++++
 src/test/script_tests.cpp         | 73 +++++++++++++++++++++++
 3 files changed, 217 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 09120e88385d..0477493e5967 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -589,6 +589,102 @@
     "DERSIG",
     "P2PK NOT with too much R padding"
 ],
+[
+    "0x47 0x30440220d7a0417c3f6d1a15094d1cf2a3378ca0503eb8a57630953a9e2987e21ddd0a6502207a6266d686c99090920249991d3d42065b6d43eb70187b219c0db82e4f94d1a201",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "DERSIG",
+    "BIP66 example 1, with DERSIG"
+],
+[
+    "0x47 0x304402208e43c0b91f7c1e5bc58e41c8185f8a6086e111b0090187968a86f2822462d3c902200a58f4076b1133b18ff1dc83ee51676e44c60cc608d9534e0df5ace0424fc0be01",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "",
+    "BIP66 example 2, without DERSIG"
+],
+[
+    "0x47 0x304402208e43c0b91f7c1e5bc58e41c8185f8a6086e111b0090187968a86f2822462d3c902200a58f4076b1133b18ff1dc83ee51676e44c60cc608d9534e0df5ace0424fc0be01",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "DERSIG",
+    "BIP66 example 2, with DERSIG"
+],
+[
+    "0",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "BIP66 example 3, without DERSIG"
+],
+[
+    "0",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "DERSIG",
+    "BIP66 example 3, with DERSIG"
+],
+[
+    "1",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "BIP66 example 5, without DERSIG"
+],
+[
+    "1",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "DERSIG",
+    "BIP66 example 5, with DERSIG"
+],
+[
+    "1",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "DERSIG",
+    "BIP66 example 6, with DERSIG"
+],
+[
+    "0 0x47 0x30440220cae00b1444babfbf6071b0ba8707f6bd373da3df494d6e74119b0430c5db810502205d5231b8c5939c8ff0c82242656d6e06edb073d42af336c99fe8837c36ea39d501 0x47 0x304402200b3d0b0375bb15c14620afa4aa10ae90a0d6a046ce217bc20fe0bc1ced68c1b802204b550acab90ae6d3478057c9ad24f9df743815b799b6449dd7e7f6d3bc6e274c01",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "DERSIG",
+    "BIP66 example 7, with DERSIG"
+],
+[
+    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0x47 0x3044022079ea80afd538d9ada421b5101febeb6bc874e01dde5bca108c1d0479aec339a4022004576db8f66130d1df686ccf00935703689d69cf539438da1edab208b0d63c4801",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "",
+    "BIP66 example 8, without DERSIG"
+],
+[
+    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0x47 0x3044022079ea80afd538d9ada421b5101febeb6bc874e01dde5bca108c1d0479aec339a4022004576db8f66130d1df686ccf00935703689d69cf539438da1edab208b0d63c4801",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "DERSIG",
+    "BIP66 example 8, with DERSIG"
+],
+[
+    "0 0 0x47 0x3044022081aa9d436f2154e8b6d600516db03d78de71df685b585a9807ead4210bd883490220534bb6bdf318a419ac0749660b60e78d17d515558ef369bf872eff405b676b2e01",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "",
+    "BIP66 example 9, without DERSIG"
+],
+[
+    "0 0 0x47 0x3044022081aa9d436f2154e8b6d600516db03d78de71df685b585a9807ead4210bd883490220534bb6bdf318a419ac0749660b60e78d17d515558ef369bf872eff405b676b2e01",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "DERSIG",
+    "BIP66 example 9, with DERSIG"
+],
+[
+    "0 0 0x47 0x30440220afa76a8f60622f813b05711f051c6c3407e32d1b1b70b0576c1f01b54e4c05c702200d58e9df044fd1845cabfbeef6e624ba0401daf7d7e084736f9ff601c3783bf501",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "DERSIG",
+    "BIP66 example 10, with DERSIG"
+],
+[
+    "0 0x47 0x30440220cae00b1444babfbf6071b0ba8707f6bd373da3df494d6e74119b0430c5db810502205d5231b8c5939c8ff0c82242656d6e06edb073d42af336c99fe8837c36ea39d501 0",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "",
+    "BIP66 example 11, without DERSIG"
+],
+[
+    "0 0x47 0x30440220cae00b1444babfbf6071b0ba8707f6bd373da3df494d6e74119b0430c5db810502205d5231b8c5939c8ff0c82242656d6e06edb073d42af336c99fe8837c36ea39d501 0",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "DERSIG",
+    "BIP66 example 11, with DERSIG"
+],
 [
     "0x49 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef05101",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 17398ca1bd74..3dde7ee0006d 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -755,6 +755,54 @@
     "",
     "P2PK NOT with bad sig with too much R padding but no DERSIG"
 ],
+[
+    "0x47 0x30440220d7a0417c3f6d1a15094d1cf2a3378ca0503eb8a57630953a9e2987e21ddd0a6502207a6266d686c99090920249991d3d42065b6d43eb70187b219c0db82e4f94d1a201",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG",
+    "",
+    "BIP66 example 1, without DERSIG"
+],
+[
+    "0",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "",
+    "BIP66 example 4, without DERSIG"
+],
+[
+    "0",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "DERSIG",
+    "BIP66 example 4, with DERSIG"
+],
+[
+    "1",
+    "0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 CHECKSIG NOT",
+    "",
+    "BIP66 example 6, without DERSIG"
+],
+[
+    "0 0x47 0x30440220cae00b1444babfbf6071b0ba8707f6bd373da3df494d6e74119b0430c5db810502205d5231b8c5939c8ff0c82242656d6e06edb073d42af336c99fe8837c36ea39d501 0x47 0x304402200b3d0b0375bb15c14620afa4aa10ae90a0d6a046ce217bc20fe0bc1ced68c1b802204b550acab90ae6d3478057c9ad24f9df743815b799b6449dd7e7f6d3bc6e274c01",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG",
+    "",
+    "BIP66 example 7, without DERSIG"
+],
+[
+    "0 0 0x47 0x30440220afa76a8f60622f813b05711f051c6c3407e32d1b1b70b0576c1f01b54e4c05c702200d58e9df044fd1845cabfbeef6e624ba0401daf7d7e084736f9ff601c3783bf501",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "",
+    "BIP66 example 10, without DERSIG"
+],
+[
+    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "",
+    "BIP66 example 12, without DERSIG"
+],
+[
+    "0 0x47 0x30440220f00a77260d34ec2f0c59621dc710f58169d0ca06df1a88cd4b1f1b97bd46991b02201ee220c7e04f26aed03f94aa97fb09ca5627163bf4ba07e6979972ec737db22601 0",
+    "2 0x21 0x038282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508 0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 2 CHECKMULTISIG NOT",
+    "DERSIG",
+    "BIP66 example 12, with DERSIG"
+],
 [
     "0x49 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef05101",
     "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 4d2a9aff45c0..c70158f0e959 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -413,6 +413,79 @@ BOOST_AUTO_TEST_CASE(script_build)
                               "P2PK NOT with too much R padding", SCRIPT_VERIFY_DERSIG
                              ).PushSig(keys.key2, SIGHASH_ALL, 31, 32).EditPush(1, "43021F", "44022000"));
 
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                               "BIP66 example 1, without DERSIG", 0
+                              ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                              "BIP66 example 1, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                              "BIP66 example 2, without DERSIG", 0
+                             ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                              "BIP66 example 2, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                              "BIP66 example 3, without DERSIG", 0
+                             ).Num(0));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                              "BIP66 example 3, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0));
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                               "BIP66 example 4, without DERSIG", 0
+                              ).Num(0));
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                               "BIP66 example 4, with DERSIG", SCRIPT_VERIFY_DERSIG
+                              ).Num(0));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                              "BIP66 example 5, without DERSIG", 0
+                             ).Num(1));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG,
+                              "BIP66 example 5, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(1));
+    good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                               "BIP66 example 6, without DERSIG", 0
+                              ).Num(1));
+    bad.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey1C) << OP_CHECKSIG << OP_NOT,
+                              "BIP66 example 6, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(1));
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                               "BIP66 example 7, without DERSIG", 0
+                              ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                              "BIP66 example 7, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                              "BIP66 example 8, without DERSIG", 0
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                              "BIP66 example 8, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").PushSig(keys.key2));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                              "BIP66 example 9, without DERSIG", 0
+                             ).Num(0).Num(0).PushSig(keys.key2, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                              "BIP66 example 9, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0).Num(0).PushSig(keys.key2, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                               "BIP66 example 10, without DERSIG", 0
+                              ).Num(0).Num(0).PushSig(keys.key2, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                              "BIP66 example 10, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0).Num(0).PushSig(keys.key2, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220"));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                              "BIP66 example 11, without DERSIG", 0
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").Num(0));
+    bad.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG,
+                              "BIP66 example 11, with DERSIG", SCRIPT_VERIFY_DERSIG
+                             ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").Num(0));
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                               "BIP66 example 12, without DERSIG", 0
+                              ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").Num(0));
+    good.push_back(TestBuilder(CScript() << OP_2 << ToByteVector(keys.pubkey1C) << ToByteVector(keys.pubkey2C) << OP_2 << OP_CHECKMULTISIG << OP_NOT,
+                               "BIP66 example 12, with DERSIG", SCRIPT_VERIFY_DERSIG
+                              ).Num(0).PushSig(keys.key1, SIGHASH_ALL, 33, 32).EditPush(1, "45022100", "440220").Num(0));
+
     good.push_back(TestBuilder(CScript() << ToByteVector(keys.pubkey2C) << OP_CHECKSIG,
                                "P2PK with high S but no LOW_S", 0
                               ).PushSig(keys.key2, SIGHASH_ALL, 32, 33));

From 773c30d7564882d347ec80c77992a61935f6675a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Mon, 19 Jan 2015 18:37:21 -0500
Subject: [PATCH 1256/1819] BIP66 changeover logic

---
 src/main.cpp                  | 12 ++++++++++++
 src/primitives/block.h        |  2 +-
 src/script/bitcoinconsensus.h |  1 +
 src/script/standard.h         |  1 +
 4 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 8f58547fe5aa..47138aefe53a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1685,6 +1685,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
 
     unsigned int flags = fStrictPayToScriptHash ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE;
 
+    // Start enforcing the DERSIG (BIP66) rules, for block.nVersion=3 blocks, when 75% of the network has upgraded:
+    if (block.nVersion >= 3 && CBlockIndex::IsSuperMajority(3, pindex->pprev, Params().EnforceBlockUpgradeMajority())) {
+        flags |= SCRIPT_VERIFY_DERSIG;
+    }
+
     CBlockUndo blockundo;
 
     CCheckQueueControl<CScriptCheck> control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL);
@@ -2524,6 +2529,13 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
                              REJECT_OBSOLETE, "bad-version");
     }
 
+    // Reject block.nVersion=2 blocks when 95% (75% on testnet) of the network has upgraded:
+    if (block.nVersion < 3 && CBlockIndex::IsSuperMajority(3, pindexPrev, Params().RejectBlockOutdatedMajority()))
+    {
+        return state.Invalid(error("%s : rejected nVersion=2 block", __func__),
+                             REJECT_OBSOLETE, "bad-version");
+    }
+
     return true;
 }
 
diff --git a/src/primitives/block.h b/src/primitives/block.h
index a1895925395f..9c17902e15ed 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -24,7 +24,7 @@ class CBlockHeader
 {
 public:
     // header
-    static const int32_t CURRENT_VERSION=2;
+    static const int32_t CURRENT_VERSION=3;
     int32_t nVersion;
     uint256 hashPrevBlock;
     uint256 hashMerkleRoot;
diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h
index 15e3337a8ded..c57d8b3cc597 100644
--- a/src/script/bitcoinconsensus.h
+++ b/src/script/bitcoinconsensus.h
@@ -46,6 +46,7 @@ enum
 {
     bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NONE      = 0,
     bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH      = (1U << 0), // evaluate P2SH (BIP16) subscripts
+    bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG    = (1U << 2), // enforce strict DER (BIP66) compliance
 };
 
 /// Returns 1 if the input nIn of the serialized transaction pointed to by
diff --git a/src/script/standard.h b/src/script/standard.h
index c4b82b4c45ae..3fea6b9ab9db 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -45,6 +45,7 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH;
  * blocks and we must accept those blocks.
  */
 static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS |
+                                                         SCRIPT_VERIFY_DERSIG |
                                                          SCRIPT_VERIFY_STRICTENC |
                                                          SCRIPT_VERIFY_MINIMALDATA |
                                                          SCRIPT_VERIFY_NULLDUMMY |

From 6da2028b55f3ab71c9b21ec37a11f89bd3749667 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 20 Jan 2015 16:39:19 -0500
Subject: [PATCH 1257/1819] Add RPC test for DERSIG BIP switchover logic

---
 qa/rpc-tests/bipdersig.py | 90 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100755 qa/rpc-tests/bipdersig.py

diff --git a/qa/rpc-tests/bipdersig.py b/qa/rpc-tests/bipdersig.py
new file mode 100755
index 000000000000..9f2cc8460154
--- /dev/null
+++ b/qa/rpc-tests/bipdersig.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python2
+# Copyright (c) 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.
+
+#
+# Test the BIP66 changeover logic
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os
+import shutil
+
+class BIP66Test(BitcoinTestFramework):
+
+    def setup_network(self):
+        self.nodes = []
+        self.nodes.append(start_node(0, self.options.tmpdir, []))
+        self.nodes.append(start_node(1, self.options.tmpdir, ["-blockversion=2"]))
+        self.nodes.append(start_node(2, self.options.tmpdir, ["-blockversion=3"]))
+        connect_nodes(self.nodes[1], 0)
+        connect_nodes(self.nodes[2], 0)
+        self.is_network_split = False
+        self.sync_all()
+
+    def run_test(self):
+        cnt = self.nodes[0].getblockcount()
+
+        # Mine some old-version blocks
+        self.nodes[1].setgenerate(True, 100)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 100):
+            raise AssertionError("Failed to mine 100 version=2 blocks")
+
+        # Mine 750 new-version blocks
+        for i in xrange(15):
+            self.nodes[2].setgenerate(True, 50)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 850):
+            raise AssertionError("Failed to mine 750 version=3 blocks")
+
+        # TODO: check that new DERSIG rules are not enforced
+
+        # Mine 1 new-version block
+        self.nodes[2].setgenerate(True, 1)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 851):
+            raise AssertionFailure("Failed to mine a version=3 blocks")
+
+        # TODO: check that new DERSIG rules are enforced
+
+        # Mine 198 new-version blocks
+        for i in xrange(2):
+            self.nodes[2].setgenerate(True, 99)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 1049):
+            raise AssertionError("Failed to mine 198 version=3 blocks")
+
+        # Mine 1 old-version block
+        self.nodes[1].setgenerate(True, 1)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 1050):
+            raise AssertionError("Failed to mine a version=2 block after 949 version=3 blocks")
+
+        # Mine 1 new-version blocks
+        self.nodes[2].setgenerate(True, 1)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 1051):
+            raise AssertionError("Failed to mine a version=3 block")
+
+        # Mine 1 old-version blocks
+        try:
+            self.nodes[1].setgenerate(True, 1)
+            raise AssertionError("Succeeded to mine a version=2 block after 950 version=3 blocks")
+        except JSONRPCException:
+            pass
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 1051):
+            raise AssertionError("Accepted a version=2 block after 950 version=3 blocks")
+
+        # Mine 1 new-version blocks
+        self.nodes[2].setgenerate(True, 1)
+        self.sync_all()
+        if (self.nodes[0].getblockcount() != cnt + 1052):
+            raise AssertionError("Failed to mine a version=3 block")
+
+if __name__ == '__main__':
+    BIP66Test().main()

From 3916a81a27b4be880361269d634dffbbbcad00a3 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 25 Jan 2015 12:46:31 -0400
Subject: [PATCH 1258/1819] Increase coverage of DERSIG edge cases

---
 src/test/data/script_invalid.json | 10 ++++++++++
 src/test/data/script_valid.json   | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 0477493e5967..e63018051dd2 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -510,6 +510,16 @@
     "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but first signature invalid."
 ],
 
+["Increase DERSIG test coverage"],
+["0x4a 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "DERSIG", "Overly long signature is incorrectly encoded for DERSIG"],
+["0x25 0x30220220000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "DERSIG", "Missing S is incorrectly encoded for DERSIG"],
+["0x27 0x3024021077777777777777777777777777777777020a7777777777777777777777777777777701", "0 CHECKSIG NOT", "DERSIG", "S with invalid S length is incorrectly encoded for DERSIG"],
+["0x27 0x302403107777777777777777777777777777777702107777777777777777777777777777777701", "0 CHECKSIG NOT", "DERSIG", "Non-integer R is incorrectly encoded for DERSIG"],
+["0x27 0x302402107777777777777777777777777777777703107777777777777777777777777777777701", "0 CHECKSIG NOT", "DERSIG", "Non-integer S is incorrectly encoded for DERSIG"],
+["0x17 0x3014020002107777777777777777777777777777777701", "0 CHECKSIG NOT", "DERSIG", "Zero-length R is incorrectly encoded for DERSIG"],
+["0x17 0x3014021077777777777777777777777777777777020001", "0 CHECKSIG NOT", "DERSIG", "Zero-length S is incorrectly encoded for DERSIG"],
+["0x27 0x302402107777777777777777777777777777777702108777777777777777777777777777777701", "0 CHECKSIG NOT", "DERSIG", "Negative S is incorrectly encoded for DERSIG"],
+
 ["Automatically generated test cases"],
 [
     "0x47 0x3044022053205076a7bb12d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 3dde7ee0006d..42e9edbd3730 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -688,6 +688,16 @@
     "2-of-2 CHECKMULTISIG NOT with both pubkeys valid, but second signature invalid. Valid pubkey fails, and CHECKMULTISIG exits early, prior to evaluation of second invalid signature."
 ],
 
+["Increase test coverage for DERSIG"],
+["0x4a 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "", "Overly long signature is correctly encoded"],
+["0x25 0x30220220000000000000000000000000000000000000000000000000000000000000000000", "0 CHECKSIG NOT", "", "Missing S is correctly encoded"],
+["0x27 0x3024021077777777777777777777777777777777020a7777777777777777777777777777777701", "0 CHECKSIG NOT", "", "S with invalid S length is correctly encoded"],
+["0x27 0x302403107777777777777777777777777777777702107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Non-integer R is correctly encoded"],
+["0x27 0x302402107777777777777777777777777777777703107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Non-integer S is correctly encoded"],
+["0x17 0x3014020002107777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Zero-length R is correctly encoded"],
+["0x17 0x3014021077777777777777777777777777777777020001", "0 CHECKSIG NOT", "", "Zero-length S is correctly encoded for DERSIG"],
+["0x27 0x302402107777777777777777777777777777777702108777777777777777777777777777777701", "0 CHECKSIG NOT", "", "Negative S is correctly encoded"],
+
 ["Automatically generated test cases"],
 [
     "0x47 0x3044022053205076a7bb13d2db3162a2d97d8197631f829b065948b7019b15482af819a902204328dcc02c994ca086b1226d0d5f1674d23cfae0d846143df812b81cab3391e801",

From fd7350d22e7874b81e785c7f4221a69e08ff75af Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Mon, 2 Feb 2015 23:51:07 +0000
Subject: [PATCH 1259/1819] doc/release-notes.md: Add summary of mining
 enhancements

---
 doc/release-notes.md | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index bd1ad8faed94..fba67fa1cf84 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -273,6 +273,26 @@ server round-trip to execute.
 Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
 key and script operations easily accessible via command line.
 
+Mining enhancements
+-------------------
+
+The `prioritisetransaction` RPC method has been added to enable miners to
+manipulate the priority of transactions on an individual basis.
+
+Bitcoin Core now supports BIP 22 long polling, so mining software can be
+notified immediately of new templates rather than having to poll periodically.
+
+Support for BIP 23 block proposals is now available in Bitcoin Core's
+`getblocktemplate` method. This enables miners to check the basic validity of
+their next block before expending work on it, reducing risks of accidental
+hardforks or mining invalid blocks.
+
+Two new options to control mining policy:
+- `-datacarrier=0/1` : Relay and mine "data carrier" (OP_RETURN) transactions
+if this is 1.
+- `-datacarriersize=n` : Maximum size, in bytes, we consider acceptable for
+"data carrier" outputs.
+
 0.10.0 Change log
 =================
 

From 1bbad80bf4a939bcacd419f19e46a12a5baa6174 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 27 Jan 2015 09:28:45 -0400
Subject: [PATCH 1260/1819] Use separate SignatureChecker for
 CMutableTransaction

Conflicts:
	src/main.cpp
	src/script/bitcoinconsensus.cpp

Rebased-From: 858809a33e4f690c4ad213f44a6c4465fc2ef025
Github-Pull: #5719
---
 src/bitcoin-tx.cpp              |  2 +-
 src/main.cpp                    |  4 ++--
 src/rpcrawtransaction.cpp       |  2 +-
 src/script/bitcoinconsensus.cpp |  4 ++--
 src/script/interpreter.cpp      |  4 ++--
 src/script/interpreter.h        | 14 ++++++++++++--
 src/script/sigcache.cpp         |  4 ++--
 src/script/sigcache.h           |  4 ++--
 src/script/sign.cpp             |  4 ++--
 src/test/multisig_tests.cpp     | 16 ++++++++--------
 src/test/script_P2SH_tests.cpp  |  2 +-
 src/test/script_tests.cpp       | 28 ++++++++++++++--------------
 src/test/transaction_tests.cpp  |  4 ++--
 13 files changed, 51 insertions(+), 41 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 0f16b36f14b0..94fd0fe60a32 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -437,7 +437,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
         BOOST_FOREACH(const CTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(mergedTx, i)))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index 8f58547fe5aa..d5cef779d823 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1400,8 +1400,8 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 
 bool CScriptCheck::operator()() {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingSignatureChecker(*ptxTo, nIn, cacheStore), &error)) {
-        return ::error("CScriptCheck() : %s:%d VerifySignature failed: %s", ptxTo->GetHash().ToString(), nIn, ScriptErrorString(error));
+    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(*ptxTo, nIn, cacheStore), &error)) {
+        return ::error("CScriptCheck(): %s:%d VerifySignature failed: %s", ptxTo->GetHash().ToString(), nIn, ScriptErrorString(error));
     }
     return true;
 }
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 4a1af2207a29..25bc5e8f90d4 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -690,7 +690,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         BOOST_FOREACH(const CMutableTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(mergedTx, i)))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index d4fd2ad7d9b1..6e3b0d7e9d48 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -78,8 +78,8 @@ int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned i
          // Regardless of the verification result, the tx did not error.
          set_error(err, bitcoinconsensus_ERR_OK);
 
-        return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, SignatureChecker(tx, nIn), NULL);
-    } catch (std::exception &e) {
+        return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(tx, nIn), NULL);
+    } catch (const std::exception&) {
         return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
     }
 }
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 3128bae35f88..58604de88c08 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1057,12 +1057,12 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig
     return ss.GetHash();
 }
 
-bool SignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
+bool TransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
 {
     return pubkey.Verify(sighash, vchSig);
 }
 
-bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode) const
+bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode) const
 {
     CPubKey pubkey(vchPubKey);
     if (!pubkey.IsValid())
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 35b2f6c65a1c..7bc919e9fd9f 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -7,6 +7,7 @@
 #define BITCOIN_SCRIPT_INTERPRETER_H
 
 #include "script_error.h"
+#include "primitives/transaction.h"
 
 #include <vector>
 #include <stdint.h>
@@ -84,7 +85,7 @@ class BaseSignatureChecker
     virtual ~BaseSignatureChecker() {}
 };
 
-class SignatureChecker : public BaseSignatureChecker
+class TransactionSignatureChecker : public BaseSignatureChecker
 {
 private:
     const CTransaction& txTo;
@@ -94,10 +95,19 @@ class SignatureChecker : public BaseSignatureChecker
     virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 
 public:
-    SignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
+    TransactionSignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
     bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
 };
 
+class MutableTransactionSignatureChecker : public TransactionSignatureChecker
+{
+private:
+    const CTransaction txTo;
+
+public:
+    MutableTransactionSignatureChecker(const CMutableTransaction& txToIn, unsigned int nInIn) : TransactionSignatureChecker(txTo, nInIn), txTo(txToIn) {}
+};
+
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
 bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
 
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index 5580a5933e6d..2c4c14ac26ed 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -74,14 +74,14 @@ class CSignatureCache
 
 }
 
-bool CachingSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
+bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
 {
     static CSignatureCache signatureCache;
 
     if (signatureCache.Get(sighash, vchSig, pubkey))
         return true;
 
-    if (!SignatureChecker::VerifySignature(vchSig, pubkey, sighash))
+    if (!TransactionSignatureChecker::VerifySignature(vchSig, pubkey, sighash))
         return false;
 
     if (store)
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index df2a2ea13c8c..88880476bf69 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -12,13 +12,13 @@
 
 class CPubKey;
 
-class CachingSignatureChecker : public SignatureChecker
+class CachingTransactionSignatureChecker : public TransactionSignatureChecker
 {
 private:
     bool store;
 
 public:
-    CachingSignatureChecker(const CTransaction& txToIn, unsigned int nInIn, bool storeIn=true) : SignatureChecker(txToIn, nInIn), store(storeIn) {}
+    CachingTransactionSignatureChecker(const CTransaction& txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), store(storeIn) {}
 
     bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 };
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 03c33ad9b526..377a2af16c1e 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
     }
 
     // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, SignatureChecker(txTo, nIn));
+    return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(txTo, nIn));
 }
 
 bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
@@ -174,7 +174,7 @@ static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction&
             if (sigs.count(pubkey))
                 continue; // Already got a sig for this pubkey
 
-            if (SignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
+            if (TransactionSignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
             {
                 sigs[pubkey] = sig;
                 break;
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 6c800efde2aa..ff4b523f4e26 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     keys.clear();
     keys += key[0],key[1]; // magic operator+= from boost.assign
     s = sign_multisig(a_and_b, keys, txTo[0], 0);
-    BOOST_CHECK(VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err));
+    BOOST_CHECK(VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     for (int i = 0; i < 4; i++)
@@ -92,13 +92,13 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         keys.clear();
         keys += key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err), strprintf("a&b 1: %d", i));
         BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 
         keys.clear();
         keys += key[1],key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, SignatureChecker(txTo[0], 0), &err), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err), strprintf("a&b 2: %d", i));
         BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
     }
 
@@ -110,18 +110,18 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         s = sign_multisig(a_or_b, keys, txTo[1], 0);
         if (i == 0 || i == 1)
         {
-            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
             BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
         }
         else
         {
-            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
             BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
         }
     }
     s.clear();
     s << OP_0 << OP_1;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, SignatureChecker(txTo[1], 0), &err));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));
 
 
@@ -133,12 +133,12 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
             s = sign_multisig(escrow, keys, txTo[2], 0);
             if (i < j && i < 3 && j < 3)
             {
-                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0), &err), strprintf("escrow 1: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(txTo[2], 0), &err), strprintf("escrow 1: %d %d", i, j));
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
             }
             else
             {
-                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, SignatureChecker(txTo[2], 0), &err), strprintf("escrow 2: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(txTo[2], 0), &err), strprintf("escrow 2: %d %d", i, j));
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
             }
         }
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index a969eefa0537..0cd4165c0636 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -43,7 +43,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict, Scri
     txTo.vin[0].scriptSig = scriptSig;
     txTo.vout[0].nValue = 1;
 
-    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, SignatureChecker(txTo, 0), &err);
+    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, MutableTransactionSignatureChecker(txTo, 0), &err);
 }
 
 
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 4d2a9aff45c0..315f9170cf84 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -100,7 +100,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bo
     ScriptError err;
     CMutableTransaction tx = BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey));
     CMutableTransaction tx2 = tx;
-    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, SignatureChecker(tx, 0), &err) == expect, message);
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, MutableTransactionSignatureChecker(tx, 0), &err) == expect, message);
     BOOST_CHECK_MESSAGE(expect == (err == SCRIPT_ERR_OK), std::string(ScriptErrorString(err)) + ": " + message);
 #if defined(HAVE_CONSENSUS_LIB)
     CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
@@ -673,18 +673,18 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     CMutableTransaction txTo12 = BuildSpendingTransaction(CScript(), txFrom12);
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     txTo12.vout[0].nValue = 2;
-    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, SignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 }
 
@@ -706,54 +706,54 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
     CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key3);
     CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key3);
     CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
     CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
     CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
     CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
     CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
     CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear(); // Must have signatures
     CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, SignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 }    
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index e939e8997259..6dfb12e61e0e 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                                 verify_flags, SignatureChecker(tx, i), &err),
+                                                 verify_flags, TransactionSignatureChecker(tx, i), &err),
                                     strTest);
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
             }
@@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                      verify_flags, SignatureChecker(tx, i), &err);
+                                      verify_flags, TransactionSignatureChecker(tx, i), &err);
             }
             BOOST_CHECK_MESSAGE(!fValid, strTest);
             BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err));

From 2448d34298c12a8ef6e21788db5e70ffb554d8b2 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 27 Jan 2015 10:01:31 -0400
Subject: [PATCH 1261/1819] Avoid storing a reference passed to
 SignatureChecker constructors

Rebased-From: 9fddceda44fb5592be179d783f0e5ac616c51c0d
Github-Pull: #5719
---
 src/bitcoin-tx.cpp              |  2 +-
 src/main.cpp                    |  2 +-
 src/rpcrawtransaction.cpp       |  2 +-
 src/script/bitcoinconsensus.cpp |  2 +-
 src/script/interpreter.cpp      |  2 +-
 src/script/interpreter.h        |  6 +++---
 src/script/sigcache.h           |  2 +-
 src/script/sign.cpp             |  4 ++--
 src/test/multisig_tests.cpp     | 16 ++++++++--------
 src/test/script_P2SH_tests.cpp  |  2 +-
 src/test/script_tests.cpp       | 28 ++++++++++++++--------------
 src/test/transaction_tests.cpp  |  4 ++--
 12 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 94fd0fe60a32..c1be1229d3b4 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -437,7 +437,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
         BOOST_FOREACH(const CTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(mergedTx, i)))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index d5cef779d823..09b0ac7af981 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1400,7 +1400,7 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
 
 bool CScriptCheck::operator()() {
     const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
-    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(*ptxTo, nIn, cacheStore), &error)) {
+    if (!VerifyScript(scriptSig, scriptPubKey, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, cacheStore), &error)) {
         return ::error("CScriptCheck(): %s:%d VerifySignature failed: %s", ptxTo->GetHash().ToString(), nIn, ScriptErrorString(error));
     }
     return true;
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 25bc5e8f90d4..1b9b1a0e1f35 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -690,7 +690,7 @@ Value signrawtransaction(const Array& params, bool fHelp)
         BOOST_FOREACH(const CMutableTransaction& txv, txVariants) {
             txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
         }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(mergedTx, i)))
+        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i)))
             fComplete = false;
     }
 
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index 6e3b0d7e9d48..f0d7e54e77fe 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -78,7 +78,7 @@ int bitcoinconsensus_verify_script(const unsigned char *scriptPubKey, unsigned i
          // Regardless of the verification result, the tx did not error.
          set_error(err, bitcoinconsensus_ERR_OK);
 
-        return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(tx, nIn), NULL);
+        return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), flags, TransactionSignatureChecker(&tx, nIn), NULL);
     } catch (const std::exception&) {
         return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
     }
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 58604de88c08..41a0e1c4907c 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1075,7 +1075,7 @@ bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn
     int nHashType = vchSig.back();
     vchSig.pop_back();
 
-    uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType);
+    uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType);
 
     if (!VerifySignature(vchSig, pubkey, sighash))
         return false;
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 7bc919e9fd9f..83d44a958959 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -88,14 +88,14 @@ class BaseSignatureChecker
 class TransactionSignatureChecker : public BaseSignatureChecker
 {
 private:
-    const CTransaction& txTo;
+    const CTransaction* txTo;
     unsigned int nIn;
 
 protected:
     virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 
 public:
-    TransactionSignatureChecker(const CTransaction& txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
+    TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
     bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
 };
 
@@ -105,7 +105,7 @@ class MutableTransactionSignatureChecker : public TransactionSignatureChecker
     const CTransaction txTo;
 
 public:
-    MutableTransactionSignatureChecker(const CMutableTransaction& txToIn, unsigned int nInIn) : TransactionSignatureChecker(txTo, nInIn), txTo(txToIn) {}
+    MutableTransactionSignatureChecker(const CMutableTransaction* txToIn, unsigned int nInIn) : TransactionSignatureChecker(&txTo, nInIn), txTo(*txToIn) {}
 };
 
 bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 88880476bf69..38b032b67b57 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -18,7 +18,7 @@ class CachingTransactionSignatureChecker : public TransactionSignatureChecker
     bool store;
 
 public:
-    CachingTransactionSignatureChecker(const CTransaction& txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), store(storeIn) {}
+    CachingTransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, bool storeIn=true) : TransactionSignatureChecker(txToIn, nInIn), store(storeIn) {}
 
     bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
 };
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index 377a2af16c1e..b6a441a798d9 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
     }
 
     // Test solution
-    return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(txTo, nIn));
+    return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&txTo, nIn));
 }
 
 bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
@@ -174,7 +174,7 @@ static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction&
             if (sigs.count(pubkey))
                 continue; // Already got a sig for this pubkey
 
-            if (TransactionSignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
+            if (TransactionSignatureChecker(&txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
             {
                 sigs[pubkey] = sig;
                 break;
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index ff4b523f4e26..0b5402f2fd27 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
     keys.clear();
     keys += key[0],key[1]; // magic operator+= from boost.assign
     s = sign_multisig(a_and_b, keys, txTo[0], 0);
-    BOOST_CHECK(VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err));
+    BOOST_CHECK(VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(&txTo[0], 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     for (int i = 0; i < 4; i++)
@@ -92,13 +92,13 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         keys.clear();
         keys += key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err), strprintf("a&b 1: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(&txTo[0], 0), &err), strprintf("a&b 1: %d", i));
         BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 
         keys.clear();
         keys += key[1],key[i];
         s = sign_multisig(a_and_b, keys, txTo[0], 0);
-        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(txTo[0], 0), &err), strprintf("a&b 2: %d", i));
+        BOOST_CHECK_MESSAGE(!VerifyScript(s, a_and_b, flags, MutableTransactionSignatureChecker(&txTo[0], 0), &err), strprintf("a&b 2: %d", i));
         BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
     }
 
@@ -110,18 +110,18 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
         s = sign_multisig(a_or_b, keys, txTo[1], 0);
         if (i == 0 || i == 1)
         {
-            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(&txTo[1], 0), &err), strprintf("a|b: %d", i));
             BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
         }
         else
         {
-            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err), strprintf("a|b: %d", i));
+            BOOST_CHECK_MESSAGE(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(&txTo[1], 0), &err), strprintf("a|b: %d", i));
             BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
         }
     }
     s.clear();
     s << OP_0 << OP_1;
-    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(txTo[1], 0), &err));
+    BOOST_CHECK(!VerifyScript(s, a_or_b, flags, MutableTransactionSignatureChecker(&txTo[1], 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_SIG_DER, ScriptErrorString(err));
 
 
@@ -133,12 +133,12 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
             s = sign_multisig(escrow, keys, txTo[2], 0);
             if (i < j && i < 3 && j < 3)
             {
-                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(txTo[2], 0), &err), strprintf("escrow 1: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(&txTo[2], 0), &err), strprintf("escrow 1: %d %d", i, j));
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
             }
             else
             {
-                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(txTo[2], 0), &err), strprintf("escrow 2: %d %d", i, j));
+                BOOST_CHECK_MESSAGE(!VerifyScript(s, escrow, flags, MutableTransactionSignatureChecker(&txTo[2], 0), &err), strprintf("escrow 2: %d %d", i, j));
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
             }
         }
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 0cd4165c0636..bc40fd1b9718 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -43,7 +43,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict, Scri
     txTo.vin[0].scriptSig = scriptSig;
     txTo.vout[0].nValue = 1;
 
-    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, MutableTransactionSignatureChecker(txTo, 0), &err);
+    return VerifyScript(scriptSig, scriptPubKey, fStrict ? SCRIPT_VERIFY_P2SH : SCRIPT_VERIFY_NONE, MutableTransactionSignatureChecker(&txTo, 0), &err);
 }
 
 
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 315f9170cf84..1772a703225c 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -100,7 +100,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, int flags, bo
     ScriptError err;
     CMutableTransaction tx = BuildSpendingTransaction(scriptSig, BuildCreditingTransaction(scriptPubKey));
     CMutableTransaction tx2 = tx;
-    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, MutableTransactionSignatureChecker(tx, 0), &err) == expect, message);
+    BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, flags, MutableTransactionSignatureChecker(&tx, 0), &err) == expect, message);
     BOOST_CHECK_MESSAGE(expect == (err == SCRIPT_ERR_OK), std::string(ScriptErrorString(err)) + ": " + message);
 #if defined(HAVE_CONSENSUS_LIB)
     CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
@@ -673,18 +673,18 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG12)
     CMutableTransaction txTo12 = BuildSpendingTransaction(CScript(), txFrom12);
 
     CScript goodsig1 = sign_multisig(scriptPubKey12, key1, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(&txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
     txTo12.vout[0].nValue = 2;
-    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(!VerifyScript(goodsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(&txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     CScript goodsig2 = sign_multisig(scriptPubKey12, key2, txTo12);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey12, flags, MutableTransactionSignatureChecker(&txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     CScript badsig1 = sign_multisig(scriptPubKey12, key3, txTo12);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(txTo12, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey12, flags, MutableTransactionSignatureChecker(&txTo12, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 }
 
@@ -706,54 +706,54 @@ BOOST_AUTO_TEST_CASE(script_CHECKMULTISIG23)
     std::vector<CKey> keys;
     keys.push_back(key1); keys.push_back(key2);
     CScript goodsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key3);
     CScript goodsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key3);
     CScript goodsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(VerifyScript(goodsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key2); // Can't re-use sig
     CScript badsig1 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig1, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key2); keys.push_back(key1); // sigs must be in correct order
     CScript badsig2 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig2, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key3); keys.push_back(key2); // sigs must be in correct order
     CScript badsig3 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig3, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key4); keys.push_back(key2); // sigs must match pubkeys
     CScript badsig4 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig4, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear();
     keys.push_back(key1); keys.push_back(key4); // sigs must match pubkeys
     CScript badsig5 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig5, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_EVAL_FALSE, ScriptErrorString(err));
 
     keys.clear(); // Must have signatures
     CScript badsig6 = sign_multisig(scriptPubKey23, keys, txTo23);
-    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, MutableTransactionSignatureChecker(txTo23, 0), &err));
+    BOOST_CHECK(!VerifyScript(badsig6, scriptPubKey23, flags, MutableTransactionSignatureChecker(&txTo23, 0), &err));
     BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_INVALID_STACK_OPERATION, ScriptErrorString(err));
 }    
 
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 6dfb12e61e0e..519ce6c31940 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -145,7 +145,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                                 verify_flags, TransactionSignatureChecker(tx, i), &err),
+                                                 verify_flags, TransactionSignatureChecker(&tx, i), &err),
                                     strTest);
                 BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
             }
@@ -220,7 +220,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
 
                 unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
                 fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
-                                      verify_flags, TransactionSignatureChecker(tx, i), &err);
+                                      verify_flags, TransactionSignatureChecker(&tx, i), &err);
             }
             BOOST_CHECK_MESSAGE(!fValid, strTest);
             BOOST_CHECK_MESSAGE(err != SCRIPT_ERR_OK, ScriptErrorString(err));

From b6347bf8138395117fa6d3a753c8aa266b05ada0 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Fri, 16 Jan 2015 12:17:57 -0500
Subject: [PATCH 1262/1819] Fix priority calculation in CreateTransaction

Make this projection of priority in 1 block match the calculation in the low priority reject code.

Rebased-From: 2d9b0b7f03a268e557c6dce1dfa29401b5c9178b
Github-Pull: #5675
---
 src/wallet.cpp | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index dd87fab44b18..abdeed8f5766 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1418,10 +1418,14 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                 BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
                 {
                     CAmount nCredit = pcoin.first->vout[pcoin.second].nValue;
-                    //The priority after the next block (depth+1) is used instead of the current,
+                    //The coin age after the next block (depth+1) is used instead of the current,
                     //reflecting an assumption the user would accept a bit more delay for
                     //a chance at a free transaction.
-                    dPriority += (double)nCredit * (pcoin.first->GetDepthInMainChain()+1);
+                    //But mempool inputs might still be in the mempool, so their age stays 0
+                    int age = pcoin.first->GetDepthInMainChain();
+                    if (age != 0)
+                        age += 1;
+                    dPriority += (double)nCredit * age;
                 }
 
                 CAmount nChange = nValueIn - nValue - nFeeRet;

From 1eb14af28f6fb24f5fd22a233d4f5d62b97b6be9 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Mon, 12 Jan 2015 09:53:10 -0800
Subject: [PATCH 1263/1819] Increase block download timeout base from 10 to 20
 minutes.

This harmonizes the block fetch timeout with the existing ping timeout
 and eliminates a guaranteed eventual failure from congestion collapse
 for a network operating right at its limit.

It's unlikely that we wouldn't suffer other failures if we were really
 anywhere near the network's limit, and a complete avoidance of congestion
 collapse risk requires (I think) an exponential back-off. So this isn't
 a major concern, but I think it's also useful for reducing the complexity
 of understanding out timeouts.

Github-Pull: #5647
Rebased-From: 3ff735c99ae75c21397079f49859b81e89a2f5f8
---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index a7d9391cd9fb..4a95bb11565a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4516,12 +4516,12 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
             LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id);
             pto->fDisconnect = true;
         }
-        // In case there is a block that has been in flight from this peer for (1 + 0.5 * N) times the block interval
+        // In case there is a block that has been in flight from this peer for (2 + 0.5 * N) times the block interval
         // (with N the number of validated blocks that were in flight at the time it was requested), disconnect due to
         // 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 advertize nonexisting block hashes
         // to unreasonably increase our timeout.
-        if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * Params().TargetSpacing() * (2 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
+        if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * Params().TargetSpacing() * (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;
         }

From 63efb366727eb8890ccdd42d5b8f61b673ad8f56 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Wed, 4 Feb 2015 11:03:32 -0500
Subject: [PATCH 1264/1819] Modify release-notes for changes related to free
 tranactions

Add comment about free transactions no longer being the default
Inform about the relay policy change
---
 doc/release-notes.md | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index fba67fa1cf84..53a022840c67 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -79,7 +79,8 @@ This release automatically estimates how high a transaction fee (or how
 high a priority) transactions require to be confirmed quickly. The default
 settings will create transactions that confirm quickly; see the new
 'txconfirmtarget' setting to control the tradeoff between fees and
-confirmation times.
+confirmation times. Fees are added by default unless the 'sendfreetransactions' 
+setting is enabled.
 
 Prior releases used hard-coded fees (and priorities), and would
 sometimes create transactions that took a very long time to confirm.
@@ -88,10 +89,12 @@ Statistics used to estimate fees and priorities are saved in the
 data directory in the `fee_estimates.dat` file just before
 program shutdown, and are read in at startup.
 
-New command line options for fee estimation:
+New command line options for transaction fee changes:
 - `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
 so they are likely to begin confirmation within n blocks (default: 1). This setting
 is over-ridden by the -paytxfee option.
+- `-sendfreetransactions` : Send transactions as zero-fee transactions if possible 
+(default: 0)
 
 New RPC commands for fee estimation:
 - `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
@@ -273,7 +276,7 @@ server round-trip to execute.
 Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
 key and script operations easily accessible via command line.
 
-Mining enhancements
+Mining and relay policy enhancements
 -------------------
 
 The `prioritisetransaction` RPC method has been added to enable miners to
@@ -293,6 +296,11 @@ if this is 1.
 - `-datacarriersize=n` : Maximum size, in bytes, we consider acceptable for
 "data carrier" outputs.
 
+The relay policy has changed to more properly implement the desired behavior of not 
+relaying free (or very low fee) transactions unless they have a priority above the 
+AllowFreeThreshold(), in which case they are relayed subject to the rate limiter.
+
+
 0.10.0 Change log
 =================
 

From e43f25c5b1c7b38d28cd0fba09098a9d56d9ac6b Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 4 Feb 2015 10:27:48 -0800
Subject: [PATCH 1265/1819] Add BIP 66 notice to the 0.10 release notes.

Conflicts:
	doc/release-notes.md

Rebased-From: 04ca082dd9c1d4221af65d945a66b87e66058f92
Github-Pull: #5757
---
 doc/release-notes.md | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 53a022840c67..b70d7eb96de7 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -300,6 +300,22 @@ The relay policy has changed to more properly implement the desired behavior of
 relaying free (or very low fee) transactions unless they have a priority above the 
 AllowFreeThreshold(), in which case they are relayed subject to the rate limiter.
 
+BIP 66: strict DER encoding for signatures
+------------------------------------------
+
+Bitcoin Core 0.10 implements BIP 66, which introduces block version 3, and a new
+consensus rule, which prohibits non-DER signatures. Such transactions have been
+non-standard since Bitcoin v0.8.0 (released in February 2013), but were
+technically still permitted inside blocks.
+
+This change breaks the dependency on OpenSSL's signature parsing, and is
+required if implementations would want to remove all of OpenSSL from the
+consensus code.
+
+The same miner-voting mechanism as in BIP 34 is used: when 751 out of a
+sequence of 1001 blocks have version number 3 or higher, the new consensus
+rule becomes active for those blocks. When 951 out of a sequence of 1001
+blocks have version number 3 or higher, it becomes mandatory for all blocks.
 
 0.10.0 Change log
 =================

From 7b6c847f67e96bfc672e48a49ce7bc0510439492 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 8 Feb 2015 09:24:35 +0000
Subject: [PATCH 1266/1819] doc/release-notes.md: Explain affect of BIP66 on
 miners

---
 doc/release-notes.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index b70d7eb96de7..986b8832ec18 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -277,7 +277,17 @@ Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
 key and script operations easily accessible via command line.
 
 Mining and relay policy enhancements
--------------------
+------------------------------------
+
+Bitcoin Core's block templates are now for version 3 blocks only, and any mining
+software relying on its `getblocktemplate` must be updated in parallel to use
+libblkmaker either version 0.4.2 or any version from 0.5.1 onward.
+If you are solo mining, this will affect you the moment you upgrade Bitcoin
+Core, which must be done prior to BIP66 achieving its 951/1001 status.
+If you are mining with the stratum mining protocol: this does not affect you.
+If you are mining with the getblocktemplate protocol to a pool: this will affect
+you at the pool operator's discretion, which must be no later than BIP66
+achieving its 951/1001 status.
 
 The `prioritisetransaction` RPC method has been added to enable miners to
 manipulate the priority of transactions on an individual basis.
@@ -317,6 +327,9 @@ sequence of 1001 blocks have version number 3 or higher, the new consensus
 rule becomes active for those blocks. When 951 out of a sequence of 1001
 blocks have version number 3 or higher, it becomes mandatory for all blocks.
 
+Backward compatibility with current mining software is NOT provided, thus miners
+should read the first paragraph of "Mining and relay policy enhancements" above.
+
 0.10.0 Change log
 =================
 

From 047a89831760ff124740fe9f58411d57ee087078 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Thu, 12 Feb 2015 17:07:13 -0500
Subject: [PATCH 1267/1819] gitian: don't add . to tar list

Since permissions and timestamps are changed for the sake of determinism,
. must not be added to the archive. Otherwise, tar may try to modify pwd when
extracting.

Rebased-From: 0c6ab676ee7d2071d48775d81116c86dacc6abf6
Github-Pull: #5790
---
 contrib/gitian-descriptors/gitian-linux.yml | 2 +-
 contrib/gitian-descriptors/gitian-osx.yml   | 2 +-
 contrib/gitian-descriptors/gitian-win.yml   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 28bd9211acd6..80de6770c5f7 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -99,7 +99,7 @@ script: |
     find . -name "lib*.la" -delete
     find . -name "lib*.a" -delete
     rm -rf ${DISTNAME}/lib/pkgconfig
-    find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
     cd ../../
   done
   mkdir -p $OUTDIR/src
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 4f05aad23354..c09786a56ce6 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -126,7 +126,7 @@ script: |
     find . -name "lib*.la" -delete
     find . -name "lib*.a" -delete
     rm -rf ${DISTNAME}/lib/pkgconfig
-    find . | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
     cd ../../
   done
   mkdir -p $OUTDIR/src
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 4baa08c88da5..f0459ee9461d 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -106,7 +106,7 @@ script: |
     find . -name "lib*.la" -delete
     find . -name "lib*.a" -delete
     rm -rf ${DISTNAME}/lib/pkgconfig
-    find . -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
+    find ${DISTNAME} -type f | sort | zip -X@ ${OUTDIR}/${DISTNAME}-${i}.zip
     cd ../..
   done
   mkdir -p $OUTDIR/src

From 7f502be2598af1cbe5b04776985e0da9bcaebe21 Mon Sep 17 00:00:00 2001
From: fsb4000 <fsb4000@yandex.ru>
Date: Sun, 25 Jan 2015 18:11:57 +0600
Subject: [PATCH 1268/1819] fix crash: createmultisig and addmultisigaddress

Rebased-From: e5d9d77df2de715d24638e3bab78750b7ad3e1fd
Github-Pull: #5706
---
 src/rpcmisc.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 90b9c99caa0b..5842f6a2dab7 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -213,6 +213,8 @@ CScript _createmultisig_redeemScript(const Array& params)
         throw runtime_error(
             strprintf("not enough keys supplied "
                       "(got %u keys, but need at least %d to redeem)", keys.size(), nRequired));
+    if (keys.size() > 16)
+        throw runtime_error("Number of addresses involved in the multisignature address creation > 16\nReduce the number");
     std::vector<CPubKey> pubkeys;
     pubkeys.resize(keys.size());
     for (unsigned int i = 0; i < keys.size(); i++)

From d148f62e00612fdd9aa44aa1d891b03e131918c8 Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Wed, 28 Jan 2015 13:48:36 -0500
Subject: [PATCH 1269/1819] Acquire CCheckQueue's lock to avoid race condition

This fixes a potential race condition in the CCheckQueueControl constructor,
which was looking directly at data in CCheckQueue without acquiring its lock.

Remove the now-unnecessary friendship for CCheckQueueControl

Rebased-From: cf008ac8c3c5d582562d88ad89020daef3e64dcb
Github-Pull: #5721
---
 src/checkqueue.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/checkqueue.h b/src/checkqueue.h
index 2ee46a1210ac..b27f9e3d1714 100644
--- a/src/checkqueue.h
+++ b/src/checkqueue.h
@@ -161,7 +161,12 @@ class CCheckQueue
     {
     }
 
-    friend class CCheckQueueControl<T>;
+    bool IsIdle()
+    {
+        boost::unique_lock<boost::mutex> lock(mutex);
+        return (nTotal == nIdle && nTodo == 0 && fAllOk == true);
+    }
+
 };
 
 /** 
@@ -180,9 +185,8 @@ class CCheckQueueControl
     {
         // passed queue is supposed to be unused, or NULL
         if (pqueue != NULL) {
-            assert(pqueue->nTotal == pqueue->nIdle);
-            assert(pqueue->nTodo == 0);
-            assert(pqueue->fAllOk == true);
+            bool isIdle = pqueue->IsIdle();
+            assert(isIdle);
         }
     }
 

From 23126a0a09c26486937c18f75f7701b416ee20af Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 8 Feb 2015 00:59:58 +0000
Subject: [PATCH 1270/1819] Sanitize command strings before logging them.

Normally bitcoin core does not display any network originated strings without
 sanitizing or hex encoding.  This wasn't done for strcommand in many places.

This could be used to play havoc with a terminal displaying the logs,
 especially with printtoconsole in use.

Thanks to Evil-Knievel for reporting this issue.

Conflicts:
	src/main.cpp
---
 src/main.cpp      | 16 ++++++++--------
 src/net.cpp       |  2 +-
 src/rpcserver.cpp |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4a95bb11565a..ce7c1277adf5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3422,7 +3422,7 @@ void static ProcessGetData(CNode* pfrom)
 bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived)
 {
     RandAddSeedPerfmon();
-    LogPrint("net", "received: %s (%u bytes) peer=%d\n", strCommand, vRecv.size(), pfrom->id);
+    LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id);
     if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
     {
         LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n");
@@ -4255,7 +4255,7 @@ bool ProcessMessages(CNode* pfrom)
 
         // Scan for message start
         if (memcmp(msg.hdr.pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) {
-            LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", msg.hdr.GetCommand(), pfrom->id);
+            LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id);
             fOk = false;
             break;
         }
@@ -4264,7 +4264,7 @@ bool ProcessMessages(CNode* pfrom)
         CMessageHeader& hdr = msg.hdr;
         if (!hdr.IsValid())
         {
-            LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", hdr.GetCommand(), pfrom->id);
+            LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->id);
             continue;
         }
         string strCommand = hdr.GetCommand();
@@ -4279,8 +4279,8 @@ bool ProcessMessages(CNode* pfrom)
         memcpy(&nChecksum, &hash, sizeof(nChecksum));
         if (nChecksum != hdr.nChecksum)
         {
-            LogPrintf("ProcessMessages(%s, %u bytes) : CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
-               strCommand, nMessageSize, nChecksum, hdr.nChecksum);
+            LogPrintf("ProcessMessages(%s, %u bytes): CHECKSUM ERROR nChecksum=%08x hdr.nChecksum=%08x\n",
+               SanitizeString(strCommand), nMessageSize, nChecksum, hdr.nChecksum);
             continue;
         }
 
@@ -4297,12 +4297,12 @@ bool ProcessMessages(CNode* pfrom)
             if (strstr(e.what(), "end of data"))
             {
                 // Allow exceptions from under-length message on vRecv
-                LogPrintf("ProcessMessages(%s, %u bytes) : Exception '%s' caught, normally caused by a message being shorter than its stated length\n", strCommand, nMessageSize, e.what());
+                LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", SanitizeString(strCommand), nMessageSize, e.what());
             }
             else if (strstr(e.what(), "size too large"))
             {
                 // Allow exceptions from over-long size
-                LogPrintf("ProcessMessages(%s, %u bytes) : Exception '%s' caught\n", strCommand, nMessageSize, e.what());
+                LogPrintf("ProcessMessages(%s, %u bytes): Exception '%s' caught\n", SanitizeString(strCommand), nMessageSize, e.what());
             }
             else
             {
@@ -4319,7 +4319,7 @@ bool ProcessMessages(CNode* pfrom)
         }
 
         if (!fRet)
-            LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", strCommand, nMessageSize, pfrom->id);
+            LogPrintf("ProcessMessage(%s, %u bytes) FAILED peer=%d\n", SanitizeString(strCommand), nMessageSize, pfrom->id);
 
         break;
     }
diff --git a/src/net.cpp b/src/net.cpp
index 42b3c30fb771..5c8ff79702ae 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -2021,7 +2021,7 @@ void CNode::BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSen
     ENTER_CRITICAL_SECTION(cs_vSend);
     assert(ssSend.size() == 0);
     ssSend << CMessageHeader(pszCommand, 0);
-    LogPrint("net", "sending: %s ", pszCommand);
+    LogPrint("net", "sending: %s ", SanitizeString(pszCommand));
 }
 
 void CNode::AbortMessage() UNLOCK_FUNCTION(cs_vSend)
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 6db2b0421fb7..37e4f48a3daf 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -820,7 +820,7 @@ void JSONRequest::parse(const Value& valRequest)
         throw JSONRPCError(RPC_INVALID_REQUEST, "Method must be a string");
     strMethod = valMethod.get_str();
     if (strMethod != "getblocktemplate")
-        LogPrint("rpc", "ThreadRPCServer method=%s\n", strMethod);
+        LogPrint("rpc", "ThreadRPCServer method=%s\n", SanitizeString(strMethod));
 
     // Parse params
     Value valParams = find_value(request, "params");

From aeb92792281b4cb9958f3defc9e36f63e65b778a Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Tue, 24 Feb 2015 04:27:25 -0800
Subject: [PATCH 1271/1819] Better fingerprinting protection for non-main-chain
 getdatas.

With headers-first we can compare against the best header timestamp, rather
than using checkpoints which require code updates to maintain.

Rebased-From: 85da07a5a001a563488382435202b74a3e3e964a
Github-Pull: #5820
---
 src/main.cpp | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ce7c1277adf5..d77eb2877e1e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3312,19 +3312,17 @@ void static ProcessGetData(CNode* pfrom)
                 BlockMap::iterator mi = mapBlockIndex.find(inv.hash);
                 if (mi != mapBlockIndex.end())
                 {
-                    // If the requested block is at a height below our last
-                    // checkpoint, only serve it if it's in the checkpointed chain
-                    int nHeight = mi->second->nHeight;
-                    CBlockIndex* pcheckpoint = Checkpoints::GetLastCheckpoint();
-                    if (pcheckpoint && nHeight < pcheckpoint->nHeight) {
-                        if (!chainActive.Contains(mi->second))
-                        {
-                            LogPrintf("ProcessGetData(): ignoring request for old block that isn't in the main chain\n");
-                        } else {
-                            send = true;
-                        }
-                    } else {
+                    if (chainActive.Contains(mi->second)) {
                         send = true;
+                    } else {
+                        // To prevent fingerprinting attacks, only send blocks outside of the active
+                        // chain if they are valid, and no more than a month older than the best header
+                        // chain we know about.
+                        send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) &&
+                            (mi->second->GetBlockTime() > pindexBestHeader->GetBlockTime() - 30 * 24 * 60 * 60);
+                        if (!send) {
+                            LogPrintf("ProcessGetData(): ignoring request from peer=%i for old block that isn't in the main chain\n", pfrom->GetId());
+                        }
                     }
                 }
                 if (send)

From 786cf72c7ff5d4042e7a7d010e96e53b0a597371 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 6 Mar 2015 09:33:23 +0100
Subject: [PATCH 1272/1819] [Qt] fix a issue where "command line
 options"-action overwrite "Preference"-action (on OSX)

- fixes #5800

Conflicts:
	src/qt/bitcoingui.cpp

Rebased-From: 9bbb880be44dbc378bdd3210eed42eaa77efb774
Github-Pull: #5858
---
 src/qt/bitcoingui.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 6a457d361fe5..1314e0b1c977 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -325,6 +325,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     openAction->setStatusTip(tr("Open a bitcoin: URI or payment request"));
 
     showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
+    showHelpMessageAction->setMenuRole(QAction::NoRole);
     showHelpMessageAction->setStatusTip(tr("Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options"));
 
     connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));

From d5d89980284179436a5f3009a5346581fdaa9a01 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 5 Mar 2015 04:01:22 -0800
Subject: [PATCH 1273/1819] Limit message sizes before transfer

This introduces a fixed limit for the size of p2p messages, and enforces it
before download.

Rebased-From: ba04c4a7801e7d68a5e84035b919e5c3626eb7a7
Github-Pull: #5843
---
 src/net.cpp | 5 +++++
 src/net.h   | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/src/net.cpp b/src/net.cpp
index 5c8ff79702ae..7ed9d65fb2dd 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -574,6 +574,11 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes)
         if (handled < 0)
                 return false;
 
+        if (msg.in_data && msg.hdr.nMessageSize > MAX_PROTOCOL_MESSAGE_LENGTH) {
+            LogPrint("net", "Oversized message from peer=%i, disconnecting", GetId());
+            return false;
+        }
+
         pch += handled;
         nBytes -= handled;
 
diff --git a/src/net.h b/src/net.h
index a475be0b334d..79d8baeb6d7a 100644
--- a/src/net.h
+++ b/src/net.h
@@ -46,6 +46,8 @@ static const int TIMEOUT_INTERVAL = 20 * 60;
 static const unsigned int MAX_INV_SZ = 50000;
 /** The maximum number of new addresses to accumulate before announcing. */
 static const unsigned int MAX_ADDR_TO_SEND = 1000;
+/** Maximum length of incoming protocol messages (no message over 2 MiB is currently acceptable). */
+static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024;
 /** -listen default */
 static const bool DEFAULT_LISTEN = true;
 /** -upnp default */

From 200f29363b06cbe8e35dfc5e1b818a0dd96c8474 Mon Sep 17 00:00:00 2001
From: Ivan Pustogarov <ivanpustogarov@users.noreply.github.com>
Date: Sun, 7 Dec 2014 17:30:57 +0100
Subject: [PATCH 1274/1819] Ignore getaddr messages on Outbound connections.

The only time when a client sends a "getaddr" message is when he
esatblishes an Outbound connection (see ProcessMessage() in
src/main.cpp).  Another bitcoin client is expected to receive a
"getaddr" message only on Inbound connection. Ignoring "gettaddr"
requests on Outbound connections can resolve potential privacy issues
(and as was said such request normally do not happen anyway).

Rebased-From: dca799e1db6e319fdd47e0bfdb038eab0efabb85
Github-Pull: #5442
---
 src/main.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index d77eb2877e1e..9295c81ce894 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3976,7 +3976,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
-    else if (strCommand == "getaddr")
+    // This asymmetric behavior for inbound and outbound connections was introduced
+    // to prevent a fingerprinting attack: an attacker can send specific fake addresses
+    // to users' AddrMan and later request them by sending getaddr messages. 
+    // Making users (which are behind NAT and can only make outgoing connections) ignore 
+    // getaddr message mitigates the attack.
+    else if ((strCommand == "getaddr") && (pfrom->fInbound))
     {
         pfrom->vAddrToSend.clear();
         vector<CAddress> vAddr = addrman.GetAddr();

From 002c8a24119d205b09ee10484097a4b18f4a17a9 Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Fri, 6 Mar 2015 20:26:09 -0500
Subject: [PATCH 1275/1819] fix possible block db breakage during re-index

When re-indexing, there are a few cases where garbage data may be skipped in
the block files. In these cases, the indices are correctly written to the index
db, however the pointer to the next position for writing in the current block
file is calculated by adding the sizes of the valid blocks found.

As a result, when the re-index is finished, the index db is correct for all
existing blocks, but the next block will be written to an incorrect offset,
likely overwriting existing blocks.

Rather than using the sum of all valid blocks to determine the next write
position, use the end of the last block written to the file. Don't assume that
the current block is the last one in the file, since they may be read
out-of-order.

Rebased-From: bb6acff07982dda68b5c2ac81c99dbd7255bb9cc
Github-Pull: #5864
---
 src/main.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 9295c81ce894..172d43c65823 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2362,8 +2362,11 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
     }
 
     nLastBlockFile = nFile;
-    vinfoBlockFile[nFile].nSize += nAddSize;
     vinfoBlockFile[nFile].AddBlock(nHeight, nTime);
+    if (fKnown)
+        vinfoBlockFile[nFile].nSize = std::max(pos.nPos + nAddSize, vinfoBlockFile[nFile].nSize);
+    else
+        vinfoBlockFile[nFile].nSize += nAddSize;
 
     if (!fKnown) {
         unsigned int nOldChunks = (pos.nPos + BLOCKFILE_CHUNK_SIZE - 1) / BLOCKFILE_CHUNK_SIZE;

From c91c660e499ff8f92130a349226fb3200823a82d Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Wed, 11 Mar 2015 11:56:44 -0400
Subject: [PATCH 1276/1819] fix InvalidateBlock to repopulate
 setBlockIndexCandidates

Rebased-From: a9af415887f03cb2565895bc55be72748549e527
Github-Pull: #5879
---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 172d43c65823..ebc9418891d7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2219,7 +2219,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
     BlockMap::iterator it = mapBlockIndex.begin();
     while (it != mapBlockIndex.end()) {
         if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
-            setBlockIndexCandidates.insert(pindex);
+            setBlockIndexCandidates.insert(it->second);
         }
         it++;
     }

From 11173786ce0a8e170b6a96317b6bc82785ed5d1b Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Wed, 11 Mar 2015 11:58:40 -0400
Subject: [PATCH 1277/1819] add RPC test for InvalidateBlock

Rebased-From: 88f6c8c3657cba81c65da34a7161c860c8a23c5f
Github-Pull: #5879
---
 qa/rpc-tests/invalidateblock.py | 51 +++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100755 qa/rpc-tests/invalidateblock.py

diff --git a/qa/rpc-tests/invalidateblock.py b/qa/rpc-tests/invalidateblock.py
new file mode 100755
index 000000000000..a8bfbe6e6c7f
--- /dev/null
+++ b/qa/rpc-tests/invalidateblock.py
@@ -0,0 +1,51 @@
+#!/usr/bin/env python2
+# Copyright (c) 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.
+
+#
+# Test InvalidateBlock code
+#
+
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+
+class InvalidateTest(BitcoinTestFramework):
+    
+        
+    def setup_chain(self):
+        print("Initializing test directory "+self.options.tmpdir)
+        initialize_chain_clean(self.options.tmpdir, 2)
+                 
+    def setup_network(self):
+        self.nodes = []
+        self.is_network_split = False 
+        self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"]))
+        self.nodes.append(start_node(1, self.options.tmpdir, ["-debug"]))
+        
+    def run_test(self):
+        print "Mine 4 blocks on Node 0"
+        self.nodes[0].setgenerate(True, 4)
+        assert(self.nodes[0].getblockcount() == 4)
+        besthash = self.nodes[0].getbestblockhash()
+
+        print "Mine competing 6 blocks on Node 1"
+        self.nodes[1].setgenerate(True, 6)
+        assert(self.nodes[1].getblockcount() == 6)
+
+        print "Connect nodes to force a reorg"
+        connect_nodes_bi(self.nodes,0,1)
+        sync_blocks(self.nodes)
+        assert(self.nodes[0].getblockcount() == 6)
+        badhash = self.nodes[1].getblockhash(2)
+
+        print "Invalidate block 2 on node 0 and verify we reorg to node 0's original chain"
+        self.nodes[0].invalidateblock(badhash)
+        newheight = self.nodes[0].getblockcount()
+        newhash = self.nodes[0].getbestblockhash()
+        if (newheight != 4 or newhash != besthash):
+            raise AssertionError("Wrong tip for node0, hash %s, height %d"%(newhash,newheight))
+
+if __name__ == '__main__':
+    InvalidateTest().main()

From 81145a6ccd1060ce4b53c98b819a12bd0a99854f Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Thu, 12 Mar 2015 00:08:22 +0100
Subject: [PATCH 1278/1819] [QT] fix OSX dock icon window reopening

fixes #5878

Rebased-From: 89e70e931d3d320d2dae4c296601aab113b2e508
Github-Pull: #5880
---
 src/qt/macdockiconhandler.mm | 55 ++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 31 deletions(-)

diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index a2ff148d9dad..5834a8dfca4a 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -11,52 +11,46 @@
 
 #undef slots
 #include <Cocoa/Cocoa.h>
+#include <objc/objc.h>
+#include <objc/message.h>
 
 #if QT_VERSION < 0x050000
 extern void qt_mac_set_dock_menu(QMenu *);
 #endif
 
-@interface DockIconClickEventHandler : NSObject
-{
-    MacDockIconHandler* dockIconHandler;
-}
-
-@end
-
-@implementation DockIconClickEventHandler
+static MacDockIconHandler *s_instance = NULL;
 
-- (id)initWithDockIconHandler:(MacDockIconHandler *)aDockIconHandler
-{
-    self = [super init];
-    if (self) {
-        dockIconHandler = aDockIconHandler;
-
-        [[NSAppleEventManager sharedAppleEventManager]
-            setEventHandler:self
-                andSelector:@selector(handleDockClickEvent:withReplyEvent:)
-              forEventClass:kCoreEventClass
-                 andEventID:kAEReopenApplication];
-    }
-    return self;
+bool dockClickHandler(id self,SEL _cmd,...) {
+    Q_UNUSED(self)
+    Q_UNUSED(_cmd)
+    
+    s_instance->handleDockIconClickEvent();
+    
+    // Return NO (false) to suppress the default OS X actions
+    return false;
 }
 
-- (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAppleEventDescriptor*)replyEvent
-{
-    Q_UNUSED(event)
-    Q_UNUSED(replyEvent)
-
-    if (dockIconHandler) {
-        dockIconHandler->handleDockIconClickEvent();
+void setupDockClickHandler() {
+    Class cls = objc_getClass("NSApplication");
+    id appInst = objc_msgSend((id)cls, sel_registerName("sharedApplication"));
+    
+    if (appInst != NULL) {
+        id delegate = objc_msgSend(appInst, sel_registerName("delegate"));
+        Class delClass = (Class)objc_msgSend(delegate,  sel_registerName("class"));
+        SEL shouldHandle = sel_registerName("applicationShouldHandleReopen:hasVisibleWindows:");
+        if (class_getInstanceMethod(delClass, shouldHandle))
+            class_replaceMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:");
+        else
+            class_addMethod(delClass, shouldHandle, (IMP)dockClickHandler,"B@:");
     }
 }
 
-@end
 
 MacDockIconHandler::MacDockIconHandler() : QObject()
 {
     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 
-    this->m_dockIconClickEventHandler = [[DockIconClickEventHandler alloc] initWithDockIconHandler:this];
+    setupDockClickHandler();
     this->m_dummyWidget = new QWidget();
     this->m_dockMenu = new QMenu(this->m_dummyWidget);
     this->setMainWindow(NULL);
@@ -119,7 +113,6 @@ - (void)handleDockClickEvent:(NSAppleEventDescriptor*)event withReplyEvent:(NSAp
 
 MacDockIconHandler *MacDockIconHandler::instance()
 {
-    static MacDockIconHandler *s_instance = NULL;
     if (!s_instance)
         s_instance = new MacDockIconHandler();
     return s_instance;

From 2c0840631d560c5621063d163728932212e8db60 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 13 Mar 2015 15:40:53 +0100
Subject: [PATCH 1279/1819] [QT] some mac specifiy cleanup (memory handling,
 unnecessary code)

Rebased-From: 8b60808c1eaddb402a699ba53d865932e08109ec
Github-Pull: #5880
---
 src/qt/bitcoingui.cpp        | 2 +-
 src/qt/macdockiconhandler.h  | 9 +--------
 src/qt/macdockiconhandler.mm | 6 +++++-
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 1314e0b1c977..30b7b54de790 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -232,7 +232,7 @@ BitcoinGUI::~BitcoinGUI()
         trayIcon->hide();
 #ifdef Q_OS_MAC
     delete appMenuBar;
-    MacDockIconHandler::instance()->setMainWindow(NULL);
+    MacDockIconHandler::cleanup();
 #endif
 }
 
diff --git a/src/qt/macdockiconhandler.h b/src/qt/macdockiconhandler.h
index 1ffab75c9a11..7c60908876e7 100644
--- a/src/qt/macdockiconhandler.h
+++ b/src/qt/macdockiconhandler.h
@@ -14,12 +14,6 @@ class QMenu;
 class QWidget;
 QT_END_NAMESPACE
 
-#ifdef __OBJC__
-@class DockIconClickEventHandler;
-#else
-class DockIconClickEventHandler;
-#endif
-
 /** Macintosh-specific dock icon handler.
  */
 class MacDockIconHandler : public QObject
@@ -33,7 +27,7 @@ class MacDockIconHandler : public QObject
     void setIcon(const QIcon &icon);
     void setMainWindow(QMainWindow *window);
     static MacDockIconHandler *instance();
-
+    static void cleanup();
     void handleDockIconClickEvent();
 
 signals:
@@ -42,7 +36,6 @@ class MacDockIconHandler : public QObject
 private:
     MacDockIconHandler();
 
-    DockIconClickEventHandler *m_dockIconClickEventHandler;
     QWidget *m_dummyWidget;
     QMenu *m_dockMenu;
     QMainWindow *mainWindow;
diff --git a/src/qt/macdockiconhandler.mm b/src/qt/macdockiconhandler.mm
index 5834a8dfca4a..e66154f144f8 100644
--- a/src/qt/macdockiconhandler.mm
+++ b/src/qt/macdockiconhandler.mm
@@ -68,7 +68,6 @@ void setupDockClickHandler() {
 
 MacDockIconHandler::~MacDockIconHandler()
 {
-    [this->m_dockIconClickEventHandler release];
     delete this->m_dummyWidget;
     this->setMainWindow(NULL);
 }
@@ -118,6 +117,11 @@ void setupDockClickHandler() {
     return s_instance;
 }
 
+void MacDockIconHandler::cleanup()
+{
+    delete s_instance;
+}
+
 void MacDockIconHandler::handleDockIconClickEvent()
 {
     if (this->mainWindow)

From ca301bf98c5929e19abf63773b29b7a53a327e41 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 5 Mar 2015 04:01:22 -0800
Subject: [PATCH 1280/1819] Reduce fingerprinting through timestamps in 'addr'
 messages.

Suggested by Jonas Nick.

Rebased-From: 9c2737901b5203f267d21d728019d64b46f1d9f3
Github-Pull: #5860
---
 src/addrman.cpp |  3 ++-
 src/main.cpp    | 21 ++++++++++++++++-----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 1982db52ae33..e4e001348ee3 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -272,8 +272,9 @@ void CAddrMan::Good_(const CService& addr, int64_t nTime)
     // update info
     info.nLastSuccess = nTime;
     info.nLastTry = nTime;
-    info.nTime = nTime;
     info.nAttempts = 0;
+    // nTime is not updated here, to avoid leaking information about
+    // currently-connected peers.
 
     // if it is already in the tried set, don't do anything else
     if (info.fInTried)
diff --git a/src/main.cpp b/src/main.cpp
index ebc9418891d7..8bedae6dd8c0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -231,6 +231,10 @@ struct CBlockReject {
  * and we're no longer holding the node's locks.
  */
 struct CNodeState {
+    //! The peer's address
+    CService address;
+    //! Whether we have a fully established connection.
+    bool fCurrentlyConnected;
     //! Accumulated misbehaviour score for this peer.
     int nMisbehavior;
     //! Whether this peer should be disconnected and banned (unless whitelisted).
@@ -255,6 +259,7 @@ struct CNodeState {
     bool fPreferredDownload;
 
     CNodeState() {
+        fCurrentlyConnected = false;
         nMisbehavior = 0;
         fShouldBan = false;
         pindexBestKnownBlock = NULL;
@@ -298,6 +303,7 @@ void InitializeNode(NodeId nodeid, const CNode *pnode) {
     LOCK(cs_main);
     CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second;
     state.name = pnode->addrName;
+    state.address = pnode->addr;
 }
 
 void FinalizeNode(NodeId nodeid) {
@@ -307,6 +313,10 @@ void FinalizeNode(NodeId nodeid) {
     if (state->fSyncStarted)
         nSyncStarted--;
 
+    if (state->nMisbehavior == 0 && state->fCurrentlyConnected) {
+        AddressCurrentlyConnected(state->address);
+    }
+
     BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight)
         mapBlocksInFlight.erase(entry.hash);
     EraseOrphansFor(nodeid);
@@ -3563,6 +3573,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     else if (strCommand == "verack")
     {
         pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION));
+
+        // Mark this node as currently connected, so we update its timestamp later.
+        if (pfrom->fNetworkNode) {
+            LOCK(cs_main);
+            State(pfrom->GetId())->fCurrentlyConnected = true;
+        }
     }
 
 
@@ -4207,11 +4223,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
-    // Update the last seen time for this node's address
-    if (pfrom->fNetworkNode)
-        if (strCommand == "version" || strCommand == "addr" || strCommand == "inv" || strCommand == "getdata" || strCommand == "ping")
-            AddressCurrentlyConnected(pfrom->addr);
-
 
     return true;
 }

From 601327be8ca971895bef8f3e5cdde86ca220e8d6 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 18 Mar 2015 13:00:45 +0100
Subject: [PATCH 1281/1819] bump version to 0.10.1 in preparation of RC1

---
 configure.ac           | 2 +-
 doc/Doxyfile           | 2 +-
 doc/README.md          | 2 +-
 doc/README_windows.txt | 2 +-
 src/clientversion.h    | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2859753a31ba..695e4665f51c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
 AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 10)
-define(_CLIENT_VERSION_REVISION, 0)
+define(_CLIENT_VERSION_REVISION, 1)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 09a925f938fb..aee5dbe079a4 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -34,7 +34,7 @@ PROJECT_NAME           = Bitcoin
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.10.0
+PROJECT_NUMBER         = 0.10.1
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
diff --git a/doc/README.md b/doc/README.md
index ac22812da342..78a59af5b98f 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.0
+Bitcoin Core 0.10.1
 =====================
 
 Setup
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index 472494172adb..b854505e9016 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.0
+Bitcoin Core 0.10.1
 =====================
 
 Intro
diff --git a/src/clientversion.h b/src/clientversion.h
index 314ff7f9d743..a6b5a14faf0f 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -16,7 +16,7 @@
 //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 10
-#define CLIENT_VERSION_REVISION 0
+#define CLIENT_VERSION_REVISION 1
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build

From 8752b5c882fb94f223b117153bdac024f1dfb25f Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 17 Feb 2015 16:15:01 -0500
Subject: [PATCH 1282/1819] 0.10 fix for crashes on OSX 10.6

strnlen is available at build-time but not at runtime, causing a crash.

0.11 drops support for 10.6, so this is not needed in master.
---
 src/compat.h           | 4 +---
 src/compat/strnlen.cpp | 7 +++----
 src/protocol.cpp       | 2 +-
 3 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index dffd4ecf52fa..477dd2bfebd7 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -88,8 +88,6 @@ typedef u_int SOCKET;
 #define THREAD_PRIORITY_ABOVE_NORMAL    (-2)
 #endif
 
-#if HAVE_DECL_STRNLEN == 0
-size_t strnlen( const char *start, size_t max_len);
-#endif // HAVE_DECL_STRNLEN
+size_t strnlen_int( const char *start, size_t max_len);
 
 #endif // BITCOIN_COMPAT_H
diff --git a/src/compat/strnlen.cpp b/src/compat/strnlen.cpp
index 7f3e1598875f..7dafd98c0b56 100644
--- a/src/compat/strnlen.cpp
+++ b/src/compat/strnlen.cpp
@@ -7,12 +7,11 @@
 #endif
 
 #include <cstring>
-
-#if HAVE_DECL_STRNLEN == 0
-size_t strnlen( const char *start, size_t max_len)
+// OSX 10.6 is missing strnlen at runtime, but builds targetting it will still
+// succeed. Define our own version here to avoid a crash.
+size_t strnlen_int( const char *start, size_t max_len)
 {
     const char *end = (const char *)memchr(start, '\0', max_len);
 
     return end ? (size_t)(end - start) : max_len;
 }
-#endif // HAVE_DECL_STRNLEN
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 72fdd753a81b..f03d6e75897c 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -40,7 +40,7 @@ CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSize
 
 std::string CMessageHeader::GetCommand() const
 {
-    return std::string(pchCommand, pchCommand + strnlen(pchCommand, COMMAND_SIZE));
+    return std::string(pchCommand, pchCommand + strnlen_int(pchCommand, COMMAND_SIZE));
 }
 
 bool CMessageHeader::IsValid() const

From c9e022b7eee9f77cd33b333d6ff52f711d3bc989 Mon Sep 17 00:00:00 2001
From: dexX7 <dexx@bitwatch.co>
Date: Wed, 11 Mar 2015 13:34:20 +0100
Subject: [PATCH 1283/1819] Initialization: set Boost path locale in main
 thread

The path locale is lazy initialized and to avoid deinitialization errors
in multithreading environments, it is set explicitly by the main thread.

Conflicts:
	src/util.cpp
Rebased-From: 317e66c741aef0fd272e50aa2e82ff192ca5f7e5
Github-Pull: #5877
---
 src/util.cpp | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 0cdf4e614d8d..a03f55c910cc 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -713,19 +713,18 @@ void RenameThread(const char* name)
 
 void SetupEnvironment()
 {
-#ifndef WIN32
-    try
-    {
-#if BOOST_FILESYSTEM_VERSION == 3
-            boost::filesystem::path::codecvt(); // Raises runtime error if current locale is invalid
-#else // boost filesystem v2
-            std::locale();                      // Raises runtime error if current locale is invalid
-#endif
-    } catch(std::runtime_error &e)
-    {
-        setenv("LC_ALL", "C", 1); // Force C locale
+    // On most POSIX systems (e.g. Linux, but not BSD) the environment's locale
+    // may be invalid, in which case the "C" locale is used as fallback.
+#if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+    try {
+        std::locale(""); // Raises a runtime error if current locale is invalid
+    } catch (const std::runtime_error&) {
+        std::locale::global(std::locale("C"));
     }
 #endif
+    // The path locale is lazy initialized and to avoid deinitialization errors 
+    // in multithreading environments, it is set explicitly by the main thread.
+    boost::filesystem::path::imbue(std::locale());    
 }
 
 void SetThreadPriority(int nPriority)

From 1d2cdd2ef9091508c42619c94d4a7106b1471a14 Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Thu, 12 Mar 2015 16:03:23 -0400
Subject: [PATCH 1284/1819] Fix InvalidateBlock to add chainActive.Tip to
 setBlockIndexCandidates

Rebased-From: cd3d67cf3b0d573d2c387c2ec35e8b52129863d9
Github-Pull: #5890
---
 qa/rpc-tests/invalidateblock.py | 29 +++++++++++++++++++++++++++--
 src/main.cpp                    |  2 +-
 2 files changed, 28 insertions(+), 3 deletions(-)

diff --git a/qa/rpc-tests/invalidateblock.py b/qa/rpc-tests/invalidateblock.py
index a8bfbe6e6c7f..ccfcf00e30e2 100755
--- a/qa/rpc-tests/invalidateblock.py
+++ b/qa/rpc-tests/invalidateblock.py
@@ -16,15 +16,17 @@ class InvalidateTest(BitcoinTestFramework):
         
     def setup_chain(self):
         print("Initializing test directory "+self.options.tmpdir)
-        initialize_chain_clean(self.options.tmpdir, 2)
+        initialize_chain_clean(self.options.tmpdir, 3)
                  
     def setup_network(self):
         self.nodes = []
         self.is_network_split = False 
         self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"]))
         self.nodes.append(start_node(1, self.options.tmpdir, ["-debug"]))
+        self.nodes.append(start_node(2, self.options.tmpdir, ["-debug"]))
         
     def run_test(self):
+        print "Make sure we repopulate setBlockIndexCandidates after InvalidateBlock:"
         print "Mine 4 blocks on Node 0"
         self.nodes[0].setgenerate(True, 4)
         assert(self.nodes[0].getblockcount() == 4)
@@ -36,7 +38,7 @@ def run_test(self):
 
         print "Connect nodes to force a reorg"
         connect_nodes_bi(self.nodes,0,1)
-        sync_blocks(self.nodes)
+        sync_blocks(self.nodes[0:2])
         assert(self.nodes[0].getblockcount() == 6)
         badhash = self.nodes[1].getblockhash(2)
 
@@ -47,5 +49,28 @@ def run_test(self):
         if (newheight != 4 or newhash != besthash):
             raise AssertionError("Wrong tip for node0, hash %s, height %d"%(newhash,newheight))
 
+        print "\nMake sure we won't reorg to a lower work chain:"
+        connect_nodes_bi(self.nodes,1,2)
+        print "Sync node 2 to node 1 so both have 6 blocks"
+        sync_blocks(self.nodes[1:3])
+        assert(self.nodes[2].getblockcount() == 6)
+        print "Invalidate block 5 on node 1 so its tip is now at 4"
+        self.nodes[1].invalidateblock(self.nodes[1].getblockhash(5))
+        assert(self.nodes[1].getblockcount() == 4)
+        print "Invalidate block 3 on node 2, so its tip is now 2"
+        self.nodes[2].invalidateblock(self.nodes[2].getblockhash(3))
+        assert(self.nodes[2].getblockcount() == 2)
+        print "..and then mine a block"
+        self.nodes[2].setgenerate(True, 1)
+        print "Verify all nodes are at the right height"
+        time.sleep(5)
+        for i in xrange(3):
+            print i,self.nodes[i].getblockcount()
+        assert(self.nodes[2].getblockcount() == 3)
+        assert(self.nodes[0].getblockcount() == 4)
+        node1height = self.nodes[1].getblockcount()
+        if node1height < 4:
+            raise AssertionError("Node 1 reorged to a lower height: %d"%node1height)
+
 if __name__ == '__main__':
     InvalidateTest().main()
diff --git a/src/main.cpp b/src/main.cpp
index 8bedae6dd8c0..641859046243 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2228,7 +2228,7 @@ bool InvalidateBlock(CValidationState& state, CBlockIndex *pindex) {
     // add them again.
     BlockMap::iterator it = mapBlockIndex.begin();
     while (it != mapBlockIndex.end()) {
-        if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && setBlockIndexCandidates.value_comp()(chainActive.Tip(), it->second)) {
+        if (it->second->IsValid(BLOCK_VALID_TRANSACTIONS) && it->second->nChainTx && !setBlockIndexCandidates.value_comp()(it->second, chainActive.Tip())) {
             setBlockIndexCandidates.insert(it->second);
         }
         it++;

From a316622fd012d36aa5885ecd938da671ae802ea2 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 25 Mar 2015 16:54:14 +0100
Subject: [PATCH 1285/1819] Clean out release notes for 0.10.1

---
 doc/release-notes.md | 703 +------------------------------------------
 1 file changed, 11 insertions(+), 692 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 986b8832ec18..53ea3aed4e51 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,9 +1,10 @@
-Bitcoin Core version 0.10.0 is now available from:
+Bitcoin Core version 0.10.1 is now available from:
 
-  https://bitcoin.org/bin/0.10.0/
+  https://bitcoin.org/bin/0.10.1/
 
-This is a new major version release, bringing both new features and
-bug fixes.
+This is a new minor version release, bringing bug fixes and robustness
+improvements. If you are using 0.10.0, it is recommended to upgrade to this
+version.
 
 Please report bugs using the issue tracker at github:
 
@@ -20,12 +21,12 @@ shut down (which might take a few minutes for older versions), then run the
 installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
 bitcoind/bitcoin-qt (on Linux).
 
-Downgrading warning
----------------------
+Downgrade warning
+------------------
 
-Because release 0.10.0 makes use of headers-first synchronization and parallel
-block download (see further), the block files and databases are not
-backwards-compatible with older versions of Bitcoin Core or other software:
+Because release 0.10.0 and later makes use of headers-first synchronization and
+parallel block download (see further), the block files and databases are not
+backwards-compatible with pre-0.10 versions of Bitcoin Core or other software:
 
 * Blocks will be stored on disk out of order (in the order they are
 received, really), which makes it incompatible with some tools or
@@ -43,720 +44,38 @@ supported and may break as soon as the older version attempts to reindex.
 
 This does not affect wallet forward or backward compatibility.
 
-
 Notable changes
 ===============
 
-Faster synchronization
-----------------------
-
-Bitcoin Core now uses 'headers-first synchronization'. This means that we first
-ask peers for block headers (a total of 27 megabytes, as of December 2014) and
-validate those. In a second stage, when the headers have been discovered, we
-download the blocks. However, as we already know about the whole chain in
-advance, the blocks can be downloaded in parallel from all available peers.
-
-In practice, this means a much faster and more robust synchronization. On
-recent hardware with a decent network link, it can be as little as 3 hours
-for an initial full synchronization. You may notice a slower progress in the
-very first few minutes, when headers are still being fetched and verified, but
-it should gain speed afterwards.
-
-A few RPCs were added/updated as a result of this:
-- `getblockchaininfo` now returns the number of validated headers in addition to
-the number of validated blocks.
-- `getpeerinfo` lists both the number of blocks and headers we know we have in
-common with each peer. While synchronizing, the heights of the blocks that we
-have requested from peers (but haven't received yet) are also listed as
-'inflight'.
-- A new RPC `getchaintips` lists all known branches of the block chain,
-including those we only have headers for.
-
-Transaction fee changes
------------------------
-
-This release automatically estimates how high a transaction fee (or how
-high a priority) transactions require to be confirmed quickly. The default
-settings will create transactions that confirm quickly; see the new
-'txconfirmtarget' setting to control the tradeoff between fees and
-confirmation times. Fees are added by default unless the 'sendfreetransactions' 
-setting is enabled.
-
-Prior releases used hard-coded fees (and priorities), and would
-sometimes create transactions that took a very long time to confirm.
-
-Statistics used to estimate fees and priorities are saved in the
-data directory in the `fee_estimates.dat` file just before
-program shutdown, and are read in at startup.
-
-New command line options for transaction fee changes:
-- `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
-so they are likely to begin confirmation within n blocks (default: 1). This setting
-is over-ridden by the -paytxfee option.
-- `-sendfreetransactions` : Send transactions as zero-fee transactions if possible 
-(default: 0)
-
-New RPC commands for fee estimation:
-- `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
-a transaction to begin confirmation within nblocks. Returns -1 if not enough
-transactions have been observed to compute a good estimate.
-- `estimatepriority nblocks` : Returns approximate priority needed for
-a zero-fee transaction to begin confirmation within nblocks. Returns -1 if not
-enough free transactions have been observed to compute a good
-estimate.
-
-RPC access control changes
---------------------------
-
-Subnet matching for the purpose of access control is now done
-by matching the binary network address, instead of with string wildcard matching.
-For the user this means that `-rpcallowip` takes a subnet specification, which can be
-
-- a single IP address (e.g. `1.2.3.4` or `fe80::0012:3456:789a:bcde`)
-- a network/CIDR (e.g. `1.2.3.0/24` or `fe80::0000/64`)
-- a network/netmask (e.g. `1.2.3.4/255.255.255.0` or `fe80::0012:3456:789a:bcde/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff`)
-
-An arbitrary number of `-rpcallow` arguments can be given. An incoming connection will be accepted if its origin address
-matches one of them.
-
-For example:
-
-| 0.9.x and before                           | 0.10.x                                |
-|--------------------------------------------|---------------------------------------|
-| `-rpcallowip=192.168.1.1`                  | `-rpcallowip=192.168.1.1` (unchanged) |
-| `-rpcallowip=192.168.1.*`                  | `-rpcallowip=192.168.1.0/24`          |
-| `-rpcallowip=192.168.*`                    | `-rpcallowip=192.168.0.0/16`          |
-| `-rpcallowip=*` (dangerous!)               | `-rpcallowip=::/0` (still dangerous!) |
-
-Using wildcards will result in the rule being rejected with the following error in debug.log:
-
-    Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).
-
-
-REST interface
---------------
-
-A new HTTP API is exposed when running with the `-rest` flag, which allows
-unauthenticated access to public node data.
-
-It is served on the same port as RPC, but does not need a password, and uses
-plain HTTP instead of JSON-RPC.
-
-Assuming a local RPC server running on port 8332, it is possible to request:
-- Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
-- Blocks without transactions: http://localhost:8332/rest/block/notxdetails/*HASH*.*EXT*
-- Transactions (requires `-txindex`): http://localhost:8332/rest/tx/*HASH*.*EXT*
-
-In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded
-binary) or `json`.
-
-For more details, see the `doc/REST-interface.md` document in the repository.
-
-RPC Server "Warm-Up" Mode
--------------------------
-
-The RPC server is started earlier now, before most of the expensive
-intialisations like loading the block index.  It is available now almost
-immediately after starting the process.  However, until all initialisations
-are done, it always returns an immediate error with code -28 to all calls.
-
-This new behaviour can be useful for clients to know that a server is already
-started and will be available soon (for instance, so that they do not
-have to start it themselves).
-
-Improved signing security
--------------------------
-
-For 0.10 the security of signing against unusual attacks has been
-improved by making the signatures constant time and deterministic.
-
-This change is a result of switching signing to use libsecp256k1
-instead of OpenSSL. Libsecp256k1 is a cryptographic library
-optimized for the curve Bitcoin uses which was created by Bitcoin
-Core developer Pieter Wuille.
-
-There exist attacks[1] against most ECC implementations where an
-attacker on shared virtual machine hardware could extract a private
-key if they could cause a target to sign using the same key hundreds
-of times. While using shared hosts and reusing keys are inadvisable
-for other reasons, it's a better practice to avoid the exposure.
-
-OpenSSL has code in their source repository for derandomization
-and reduction in timing leaks that we've eagerly wanted to use for a
-long time, but this functionality has still not made its
-way into a released version of OpenSSL. Libsecp256k1 achieves
-significantly stronger protection: As far as we're aware this is
-the only deployed implementation of constant time signing for
-the curve Bitcoin uses and we have reason to believe that
-libsecp256k1 is better tested and more thoroughly reviewed
-than the implementation in OpenSSL.
-
-[1] https://eprint.iacr.org/2014/161.pdf
 
-Watch-only wallet support
--------------------------
-
-The wallet can now track transactions to and from wallets for which you know
-all addresses (or scripts), even without the private keys.
-
-This can be used to track payments without needing the private keys online on a
-possibly vulnerable system. In addition, it can help for (manual) construction
-of multisig transactions where you are only one of the signers.
-
-One new RPC, `importaddress`, is added which functions similarly to
-`importprivkey`, but instead takes an address or script (in hexadecimal) as
-argument.  After using it, outputs credited to this address or script are
-considered to be received, and transactions consuming these outputs will be
-considered to be sent.
-
-The following RPCs have optional support for watch-only:
-`getbalance`, `listreceivedbyaddress`, `listreceivedbyaccount`,
-`listtransactions`, `listaccounts`, `listsinceblock`, `gettransaction`. See the
-RPC documentation for those methods for more information.
-
-Compared to using `getrawtransaction`, this mechanism does not require
-`-txindex`, scales better, integrates better with the wallet, and is compatible
-with future block chain pruning functionality. It does mean that all relevant
-addresses need to added to the wallet before the payment, though.
-
-Consensus library
------------------
-
-Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library.
-
-The purpose of this library is to make the verification functionality that is
-critical to Bitcoin's consensus available to other applications, e.g. to language
-bindings such as [python-bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or
-alternative node implementations.
-
-This library is called `libbitcoinconsensus.so` (or, `.dll` for Windows).
-Its interface is defined in the C header [bitcoinconsensus.h](https://github.com/bitcoin/bitcoin/blob/0.10/src/script/bitcoinconsensus.h).
-
-In its initial version the API includes two functions:
-
-- `bitcoinconsensus_verify_script` verifies a script. It returns whether the indicated input of the provided serialized transaction 
-correctly spends the passed scriptPubKey under additional constraints indicated by flags
-- `bitcoinconsensus_version` returns the API version, currently at an experimental `0`
-
-The functionality is planned to be extended to e.g. UTXO management in upcoming releases, but the interface
-for existing methods should remain stable.
-
-Standard script rules relaxed for P2SH addresses
-------------------------------------------------
-
-The IsStandard() rules have been almost completely removed for P2SH
-redemption scripts, allowing applications to make use of any valid
-script type, such as "n-of-m OR y", hash-locked oracle addresses, etc.
-While the Bitcoin protocol has always supported these types of script,
-actually using them on mainnet has been previously inconvenient as
-standard Bitcoin Core nodes wouldn't relay them to miners, nor would
-most miners include them in blocks they mined.
-
-bitcoin-tx
-----------
-
-It has been observed that many of the RPC functions offered by bitcoind are
-"pure functions", and operate independently of the bitcoind wallet. This
-included many of the RPC "raw transaction" API functions, such as
-createrawtransaction.
-
-bitcoin-tx is a newly introduced command line utility designed to enable easy
-manipulation of bitcoin transactions. A summary of its operation may be
-obtained via "bitcoin-tx --help" Transactions may be created or signed in a
-manner similar to the RPC raw tx API. Transactions may be updated, deleting
-inputs or outputs, or appending new inputs and outputs. Custom scripts may be
-easily composed using a simple text notation, borrowed from the bitcoin test
-suite.
-
-This tool may be used for experimenting with new transaction types, signing
-multi-party transactions, and many other uses. Long term, the goal is to
-deprecate and remove "pure function" RPC API calls, as those do not require a
-server round-trip to execute.
-
-Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
-key and script operations easily accessible via command line.
-
-Mining and relay policy enhancements
-------------------------------------
-
-Bitcoin Core's block templates are now for version 3 blocks only, and any mining
-software relying on its `getblocktemplate` must be updated in parallel to use
-libblkmaker either version 0.4.2 or any version from 0.5.1 onward.
-If you are solo mining, this will affect you the moment you upgrade Bitcoin
-Core, which must be done prior to BIP66 achieving its 951/1001 status.
-If you are mining with the stratum mining protocol: this does not affect you.
-If you are mining with the getblocktemplate protocol to a pool: this will affect
-you at the pool operator's discretion, which must be no later than BIP66
-achieving its 951/1001 status.
-
-The `prioritisetransaction` RPC method has been added to enable miners to
-manipulate the priority of transactions on an individual basis.
-
-Bitcoin Core now supports BIP 22 long polling, so mining software can be
-notified immediately of new templates rather than having to poll periodically.
-
-Support for BIP 23 block proposals is now available in Bitcoin Core's
-`getblocktemplate` method. This enables miners to check the basic validity of
-their next block before expending work on it, reducing risks of accidental
-hardforks or mining invalid blocks.
-
-Two new options to control mining policy:
-- `-datacarrier=0/1` : Relay and mine "data carrier" (OP_RETURN) transactions
-if this is 1.
-- `-datacarriersize=n` : Maximum size, in bytes, we consider acceptable for
-"data carrier" outputs.
-
-The relay policy has changed to more properly implement the desired behavior of not 
-relaying free (or very low fee) transactions unless they have a priority above the 
-AllowFreeThreshold(), in which case they are relayed subject to the rate limiter.
-
-BIP 66: strict DER encoding for signatures
-------------------------------------------
-
-Bitcoin Core 0.10 implements BIP 66, which introduces block version 3, and a new
-consensus rule, which prohibits non-DER signatures. Such transactions have been
-non-standard since Bitcoin v0.8.0 (released in February 2013), but were
-technically still permitted inside blocks.
-
-This change breaks the dependency on OpenSSL's signature parsing, and is
-required if implementations would want to remove all of OpenSSL from the
-consensus code.
-
-The same miner-voting mechanism as in BIP 34 is used: when 751 out of a
-sequence of 1001 blocks have version number 3 or higher, the new consensus
-rule becomes active for those blocks. When 951 out of a sequence of 1001
-blocks have version number 3 or higher, it becomes mandatory for all blocks.
-
-Backward compatibility with current mining software is NOT provided, thus miners
-should read the first paragraph of "Mining and relay policy enhancements" above.
-
-0.10.0 Change log
+0.10.1 Change log
 =================
 
 Detailed release notes follow. This overview includes changes that affect external
 behavior, not code moves, refactors or string updates.
 
 RPC:
-- `f923c07` Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
-- `b641c9c` Fix addnode "onetry": Connect with OpenNetworkConnection
-- `171ca77` estimatefee / estimatepriority RPC methods
-- `b750cf1` Remove cli functionality from bitcoind
-- `f6984e8` Add "chain" to getmininginfo, improve help in getblockchaininfo
-- `99ddc6c` Add nLocalServices info to RPC getinfo
-- `cf0c47b` Remove getwork() RPC call
-- `2a72d45` prioritisetransaction <txid> <priority delta> <priority tx fee>
-- `e44fea5` Add an option `-datacarrier` to allow users to disable relaying/mining data carrier transactions
-- `2ec5a3d` Prevent easy RPC memory exhaustion attack
-- `d4640d7` Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation
-- `83f3543` Added argument to listaccounts to include watchonly addresses
-- `952877e` Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address
-- `d7d5d23` Added argument to listtransactions and listsinceblock to include watchonly addresses
-- `f87ba3d` added includeWatchonly argument to 'gettransaction' because it affects balance calculation
-- `0fa2f88` added includedWatchonly argument to listreceivedbyaddress/...account
-- `6c37f7f` `getrawchangeaddress`: fail when keypool exhausted and wallet locked
-- `ff6a7af` getblocktemplate: longpolling support
-- `c4a321f` Add peerid to getpeerinfo to allow correlation with the logs
-- `1b4568c` Add vout to ListTransactions output
-- `b33bd7a` Implement "getchaintips" RPC command to monitor blockchain forks
-- `733177e` Remove size limit in RPC client, keep it in server
-- `6b5b7cb` Categorize rpc help overview
-- `6f2c26a` Closely track mempool byte total. Add "getmempoolinfo" RPC
-- `aa82795` Add detailed network info to getnetworkinfo RPC
-- `01094bd` Don't reveal whether password is <20 or >20 characters in RPC
-- `57153d4` rpc: Compute number of confirmations of a block from block height
-- `ff36cbe` getnetworkinfo: export local node's client sub-version string
-- `d14d7de` SanitizeString: allow '(' and ')'
-- `31d6390` Fixed setaccount accepting foreign address
-- `b5ec5fe` update getnetworkinfo help with subversion
-- `ad6e601` RPC additions after headers-first
-- `33dfbf5` rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`
-- `2aa6329` Enable customising node policy for datacarrier data size with a -datacarriersize option
-- `f877aaa` submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock
-- `e69a587` submitblock: Support for returning specific rejection reasons
-- `af82884` Add "warmup mode" for RPC server
-- `e2655e0` Add unauthenticated HTTP REST interface to public blockchain data
-- `683dc40` Disable SSLv3 (in favor of TLS) for the RPC client and server
-- `44b4c0d` signrawtransaction: validate private key
-- `9765a50` Implement BIP 23 Block Proposal
-- `f9de17e` Add warning comment to getinfo
-
-Command-line options:
-- `ee21912` Use netmasks instead of wildcards for IP address matching
-- `deb3572` Add `-rpcbind` option to allow binding RPC port on a specific interface
-- `96b733e` Add `-version` option to get just the version
-- `1569353` Add `-stopafterblockimport` option
-- `77cbd46` Let -zapwallettxes recover transaction meta data
-- `1c750db` remove -tor compatibility code (only allow -onion)
-- `4aaa017` rework help messages for fee-related options
-- `4278b1d` Clarify error message when invalid -rpcallowip
-- `6b407e4` -datadir is now allowed in config files
-- `bdd5b58` Add option `-sysperms` to disable 077 umask (create new files with system default umask)
-- `cbe39a3` Add "bitcoin-tx" command line utility and supporting modules
-- `dbca89b` Trigger -alertnotify if network is upgrading without you
-- `ad96e7c` Make -reindex cope with out-of-order blocks
-- `16d5194` Skip reindexed blocks individually
-- `ec01243` --tracerpc option for regression tests
-- `f654f00` Change -genproclimit default to 1
-- `3c77714` Make -proxy set all network types, avoiding a connect leak
-- `57be955` Remove -printblock, -printblocktree, and -printblockindex
-- `ad3d208` remove -maxorphanblocks config parameter since it is no longer functional
 
 Block and transaction handling:
-- `7a0e84d` ProcessGetData(): abort if a block file is missing from disk
-- `8c93bf4` LoadBlockIndexDB(): Require block db reindex if any `blk*.dat` files are missing
-- `77339e5` Get rid of the static chainMostWork (optimization)
-- `4e0eed8` Allow ActivateBestChain to release its lock on cs_main
-- `18e7216` Push cs_mains down in ProcessBlock
-- `fa126ef` Avoid undefined behavior using CFlatData in CScript serialization
-- `7f3b4e9` Relax IsStandard rules for pay-to-script-hash transactions
-- `c9a0918` Add a skiplist to the CBlockIndex structure
-- `bc42503` Use unordered_map for CCoinsViewCache with salted hash (optimization)
-- `d4d3fbd` Do not flush the cache after every block outside of IBD (optimization)
-- `ad08d0b` Bugfix: make CCoinsViewMemPool support pruned entries in underlying cache
-- `5734d4d` Only remove actualy failed blocks from setBlockIndexValid
-- `d70bc52` Rework block processing benchmark code
-- `714a3e6` Only keep setBlockIndexValid entries that are possible improvements
-- `ea100c7` Reduce maximum coinscache size during verification (reduce memory usage)
-- `4fad8e6` Reject transactions with excessive numbers of sigops
-- `b0875eb` Allow BatchWrite to destroy its input, reducing copying (optimization)
-- `92bb6f2` Bypass reloading blocks from disk (optimization)
-- `2e28031` Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (reduce memory usage)
-- `ab15b2e` Avoid copying undo data (optimization)
-- `341735e` Headers-first synchronization
-- `afc32c5` Fix rebuild-chainstate feature and improve its performance
-- `e11b2ce` Fix large reorgs
-- `ed6d1a2` Keep information about all block files in memory
-- `a48f2d6` Abstract context-dependent block checking from acceptance
-- `7e615f5` Fixed mempool sync after sending a transaction
-- `51ce901` Improve chainstate/blockindex disk writing policy
-- `a206950` Introduce separate flushing modes
-- `9ec75c5` Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true
-- `868d041` Remove coinbase-dependant transactions during reorg
-- `723d12c` Remove txn which are invalidated by coinbase maturity during reorg
-- `0cb8763` Check against MANDATORY flags prior to accepting to mempool
-- `8446262` Reject headers that build on an invalid parent
-- `008138c` Bugfix: only track UTXO modification after lookup
 
 P2P protocol and network code:
-- `f80cffa` Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails
-- `c30329a` Add testnet DNS seed of Alex Kotenko
-- `45a4baf` Add testnet DNS seed of Andreas Schildbach
-- `f1920e8` Ping automatically every 2 minutes (unconditionally)
-- `806fd19` Allocate receive buffers in on the fly
-- `6ecf3ed` Display unknown commands received
-- `aa81564` Track peers' available blocks
-- `caf6150` Use async name resolving to improve net thread responsiveness
-- `9f4da19` Use pong receive time rather than processing time
-- `0127a9b` remove SOCKS4 support from core and GUI, use SOCKS5
-- `40f5cb8` Send rejects and apply DoS scoring for errors in direct block validation
-- `dc942e6` Introduce whitelisted peers
-- `c994d2e` prevent SOCKET leak in BindListenPort()
-- `a60120e` Add built-in seeds for .onion
-- `60dc8e4` Allow -onlynet=onion to be used
-- `3a56de7` addrman: Do not propagate obviously poor addresses onto the network
-- `6050ab6` netbase: Make SOCKS5 negotiation interruptible
-- `604ee2a` Remove tx from AlreadyAskedFor list once we receive it, not when we process it
-- `efad808` Avoid reject message feedback loops
-- `71697f9` Separate protocol versioning from clientversion
-- `20a5f61` Don't relay alerts to peers before version negotiation
-- `b4ee0bd` Introduce preferred download peers
-- `845c86d` Do not use third party services for IP detection
-- `12a49ca` Limit the number of new addressses to accumulate
-- `35e408f` Regard connection failures as attempt for addrman
-- `a3a7317` Introduce 10 minute block download timeout
-- `3022e7d` Require sufficent priority for relay of free transactions
-- `58fda4d` Update seed IPs, based on bitcoin.sipa.be crawler data
-- `18021d0` Remove bitnodes.io from dnsseeds.
 
 Validation:
-- `6fd7ef2` Also switch the (unused) verification code to low-s instead of even-s
-- `584a358` Do merkle root and txid duplicates check simultaneously
-- `217a5c9` When transaction outputs exceed inputs, show the offending amounts so as to aid debugging
-- `f74fc9b` Print input index when signature validation fails, to aid debugging
-- `6fd59ee` script.h: set_vch() should shift a >32 bit value
-- `d752ba8` Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) (test only)
-- `698c6ab` Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4) (test only)
-- `ab9edbd` script: create sane error return codes for script validation and remove logging
-- `219a147` script: check ScriptError values in script tests
-- `0391423` Discourage NOPs reserved for soft-fork upgrades
-- `98b135f` Make STRICTENC invalid pubkeys fail the script rather than the opcode
-- `307f7d4` Report script evaluation failures in log and reject messages
-- `ace39db` consensus: guard against openssl's new strict DER checks
-- `12b7c44` Improve robustness of DER recoding code
-- `76ce5c8` fail immediately on an empty signature
 
 Build system:
-- `f25e3ad` Fix build in OS X 10.9
-- `65e8ba4` build: Switch to non-recursive make
-- `460b32d` build: fix broken boost chrono check on some platforms
-- `9ce0774` build: Fix windows configure when using --with-qt-libdir
-- `ea96475` build: Add mention of --disable-wallet to bdb48 error messages
-- `1dec09b` depends: add shared dependency builder
-- `c101c76` build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes). Help string consistency tweaks. Target sanity check fix
-- `e432a5f` build: add option for reducing exports (v2)
-- `6134b43` Fixing condition 'sabotaging' MSVC build
-- `af0bd5e` osx: fix signing to make Gatekeeper happy (again)
-- `a7d1f03` build: fix dynamic boost check when --with-boost= is used
-- `d5fd094` build: fix qt test build when libprotobuf is in a non-standard path
-- `2cf5f16` Add libbitcoinconsensus library
-- `914868a` build: add a deterministic dmg signer 
-- `2d375fe` depends: bump openssl to 1.0.1k
-- `b7a4ecc` Build: Only check for boost when building code that requires it
 
 Wallet:
-- `b33d1f5` Use fee/priority estimates in wallet CreateTransaction
-- `4b7b1bb` Sanity checks for estimates
-- `c898846` Add support for watch-only addresses
-- `d5087d1` Use script matching rather than destination matching for watch-only
-- `d88af56` Fee fixes
-- `a35b55b` Dont run full check every time we decrypt wallet
-- `3a7c348` Fix make_change to not create half-satoshis
-- `f606bb9` fix a possible memory leak in CWalletDB::Recover
-- `870da77` fix possible memory leaks in CWallet::EncryptWallet
-- `ccca27a` Watch-only fixes
-- `9b1627d` [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis
-- `a53fd41` Deterministic signing
-- `15ad0b5` Apply AreSane() checks to the fees from the network
-- `11855c1` Enforce minRelayTxFee on wallet created tx and add a maxtxfee option
 
 GUI:
-- `c21c74b` osx: Fix missing dock menu with qt5
-- `b90711c` Fix Transaction details shows wrong To:
-- `516053c` Make links in 'About Bitcoin Core' clickable
-- `bdc83e8` Ensure payment request network matches client network
-- `65f78a1` Add GUI view of peer information
-- `06a91d9` VerifyDB progress reporting
-- `fe6bff2` Add BerkeleyDB version info to RPCConsole
-- `b917555` PeerTableModel: Fix potential deadlock. #4296
-- `dff0e3b` Improve rpc console history behavior
-- `95a9383` Remove CENT-fee-rule from coin control completely
-- `56b07d2` Allow setting listen via GUI
-- `d95ba75` Log messages with type>QtDebugMsg as non-debug
-- `8969828` New status bar Unit Display Control and related changes
-- `674c070` seed OpenSSL PNRG with Windows event data
-- `509f926` Payment request parsing on startup now only changes network if a valid network name is specified
-- `acd432b` Prevent balloon-spam after rescan
-- `7007402` Implement SI-style (thin space) thoudands separator
-- `91cce17` Use fixed-point arithmetic in amount spinbox
-- `bdba2dd` Remove an obscure option no-one cares about
-- `bd0aa10` Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution
-- `94e1b9e` Re-work overviewpage UI
-- `8bfdc9a` Better looking trayicon
-- `b197bf3` disable tray interactions when client model set to 0
-- `1c5f0af` Add column Watch-only to transactions list
-- `21f139b` Fix tablet crash. closes #4854
-- `e84843c` Broken addresses on command line no longer trigger testnet
-- `a49f11d` Change splash screen to normal window
-- `1f9be98` Disable App Nap on OSX 10.9+
-- `27c3e91` Add proxy to options overridden if necessary
-- `4bd1185` Allow "emergency" shutdown during startup
-- `d52f072` Don't show wallet options in the preferences menu when running with -disablewallet
-- `6093aa1` Qt: QProgressBar CPU-Issue workaround
-- `0ed9675` [Wallet] Add global boolean whether to send free transactions (default=true)
-- `ed3e5e4` [Wallet] Add global boolean whether to pay at least the custom fee (default=true)
-- `e7876b2` [Wallet] Prevent user from paying a non-sense fee
-- `c1c9d5b` Add Smartfee to GUI
-- `e0a25c5` Make askpassphrase dialog behave more sanely
-- `94b362d` On close of splashscreen interrupt verifyDB
-- `b790d13` English translation update
-- `8543b0d` Correct tooltip on address book page
 
 Tests:
-- `b41e594` Fix script test handling of empty scripts
-- `d3a33fc` Test CHECKMULTISIG with m == 0 and n == 0
-- `29c1749` Let tx (in)valid tests use any SCRIPT_VERIFY flag
-- `6380180` Add rejection of non-null CHECKMULTISIG dummy values
-- `21bf3d2` Add tests for BoostAsioToCNetAddr
-- `b5ad5e7` Add Python test for -rpcbind and -rpcallowip
-- `9ec0306` Add CODESEPARATOR/FindAndDelete() tests
-- `75ebced` Added many rpc wallet tests
-- `0193fb8` Allow multiple regression tests to run at once
-- `92a6220` Hook up sanity checks
-- `3820e01` Extend and move all crypto tests to crypto_tests.cpp
-- `3f9a019` added list/get received by address/ account tests
-- `a90689f` Remove timing-based signature cache unit test
-- `236982c` Add skiplist unit tests
-- `f4b00be` Add CChain::GetLocator() unit test
-- `b45a6e8` Add test for getblocktemplate longpolling
-- `cdf305e` Set -discover=0 in regtest framework
-- `ed02282` additional test for OP_SIZE in script_valid.json
-- `0072d98` script tests: BOOLAND, BOOLOR decode to integer
-- `833ff16` script tests: values that overflow to 0 are true
-- `4cac5db` script tests: value with trailing 0x00 is true
-- `89101c6` script test: test case for 5-byte bools
-- `d2d9dc0` script tests: add tests for CHECKMULTISIG limits
-- `d789386` Add "it works" test for bitcoin-tx
-- `df4d61e` Add bitcoin-tx tests
-- `aa41ac2` Test IsPushOnly() with invalid push
-- `6022b5d` Make `script_{valid,invalid}.json` validation flags configurable
-- `8138cbe` Add automatic script test generation, and actual checksig tests
-- `ed27e53` Add coins_tests with a large randomized CCoinViewCache test
-- `9df9cf5` Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
-- `dcb9846` Extend getchaintips RPC test
-- `554147a` Ensure MINIMALDATA invalid tests can only fail one way
-- `dfeec18` Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule
-- `2b62e17` Clearly separate PUSHDATA and numeric argument MINIMALDATA tests
-- `16d78bd` Add valid invert of invalid every numeric opcode tests
-- `f635269` tests: enable alertnotify test for Windows
-- `7a41614` tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment
-- `5122ea7` tests: fix forknotify.py on windows
-- `fa7f8cd` tests: remove old pull-tester scripts
-- `7667850` tests: replace the old (unused since Travis) tests with new rpc test scripts
-- `f4e0aef` Do signature-s negation inside the tests
-- `1837987` Optimize -regtest setgenerate block generation
-- `2db4c8a` Fix node ranges in the test framework
-- `a8b2ce5` regression test only setmocktime RPC call
-- `daf03e7` RPC tests: create initial chain with specific timestamps
-- `8656dbb` Port/fix txnmall.sh regression test
-- `ca81587` Test the exact order of CHECKMULTISIG sig/pubkey evaluation
-- `7357893` Prioritize and display -testsafemode status in UI
-- `f321d6b` Add key generation/verification to ECC sanity check
-- `132ea9b` miner_tests: Disable checkpoints so they don't fail the subsidy-change test
-- `bc6cb41` QA RPC tests: Add tests block block proposals
-- `f67a9ce` Use deterministically generated script tests
-- `11d7a7d` [RPC] add rpc-test for http keep-alive (persistent connections)
-- `34318d7` RPC-test based on invalidateblock for mempool coinbase spends
-- `76ec867` Use actually valid transactions for script tests
-- `c8589bf` Add actual signature tests
-- `e2677d7` Fix smartfees test for change to relay policy
-- `263b65e` tests: run sanity checks in tests too
 
 Miscellaneous:
-- `122549f` Fix incorrect checkpoint data for testnet3
-- `5bd02cf` Log used config file to debug.log on startup
-- `68ba85f` Updated Debian example bitcoin.conf with config from wiki + removed some cruft and updated comments
-- `e5ee8f0` Remove -beta suffix
-- `38405ac` Add comment regarding experimental-use service bits
-- `be873f6` Issue warning if collecting RandSeed data failed
-- `8ae973c` Allocate more space if necessary in RandSeedAddPerfMon
-- `675bcd5` Correct comment for 15-of-15 p2sh script size
-- `fda3fed` libsecp256k1 integration
-- `2e36866` Show nodeid instead of addresses in log (for anonymity) unless otherwise requested
-- `cd01a5e` Enable paranoid corruption checks in LevelDB >= 1.16
-- `9365937` Add comment about never updating nTimeOffset past 199 samples
-- `403c1bf` contrib: remove getwork-based pyminer (as getwork API call has been removed)
-- `0c3e101` contrib: Added systemd .service file in order to help distributions integrate bitcoind
-- `0a0878d` doc: Add new DNSseed policy
-- `2887bff` Update coding style and add .clang-format
-- `5cbda4f` Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope
-- `b4a72a7` contrib/linearize: split output files based on new-timestamp-year or max-file-size
-- `e982b57` Use explicit fflush() instead of setvbuf()
-- `234bfbf` contrib: Add init scripts and docs for Upstart and OpenRC
-- `01c2807` Add warning about the merkle-tree algorithm duplicate txid flaw
-- `d6712db` Also create pid file in non-daemon mode
-- `772ab0e` contrib: use batched JSON-RPC in linarize-hashes (optimization)
-- `7ab4358` Update bash-completion for v0.10
-- `6e6a36c` contrib: show pull # in prompt for github-merge script
-- `5b9f842` Upgrade leveldb to 1.18, make chainstate databases compatible between ARM and x86 (issue #2293)
-- `4e7c219` Catch UTXO set read errors and shutdown
-- `867c600` Catch LevelDB errors during flush
-- `06ca065` Fix CScriptID(const CScript& in) in empty script case
 
 Credits
 =======
 
 Thanks to everyone who contributed to this release:
 
-- 21E14
-- Adam Weiss
-- Aitor Pazos
-- Alexander Jeng
-- Alex Morcos
-- Alon Muroch
-- Andreas Schildbach
-- Andrew Poelstra
-- Andy Alness
-- Ashley Holman
-- Benedict Chan
-- Ben Holden-Crowther
-- Bryan Bishop
-- BtcDrak
-- Christian von Roques
-- Clinton Christian
-- Cory Fields
-- Cozz Lovan
-- daniel
-- Daniel Kraft
-- David Hill
-- Derek701
-- dexX7
-- dllud
-- Dominyk Tiller
-- Doug
-- elichai
-- elkingtowa
-- ENikS
-- Eric Shaw
-- Federico Bond
-- Francis GASCHET
-- Gavin Andresen
-- Giuseppe Mazzotta
-- Glenn Willen
-- Gregory Maxwell
-- gubatron
-- HarryWu
-- himynameismartin
-- Huang Le
-- Ian Carroll
-- imharrywu
-- Jameson Lopp
-- Janusz Lenar
-- JaSK
-- Jeff Garzik
-- JL2035
-- Johnathan Corgan
-- Jonas Schnelli
-- jtimon
-- Julian Haight
-- Kamil Domanski
-- kazcw
-- kevin
-- kiwigb
-- Kosta Zertsekel
-- LongShao007
-- Luke Dashjr
-- Mark Friedenbach
-- Mathy Vanvoorden
-- Matt Corallo
-- Matthew Bogosian
-- Micha
-- Michael Ford
-- Mike Hearn
-- mrbandrews
-- mruddy
-- ntrgn
-- Otto Allmendinger
-- paveljanik
-- Pavel Vasin
-- Peter Todd
-- phantomcircuit
-- Philip Kaufmann
-- Pieter Wuille
-- pryds
-- randy-waterhouse
-- R E Broadley
-- Rose Toomey
-- Ross Nicoll
-- Roy Badami
-- Ruben Dario Ponticelli
-- Rune K. Svendsen
-- Ryan X. Charles
-- Saivann
-- sandakersmann
-- SergioDemianLerner
-- shshshsh
-- sinetek
-- Stuart Cardall
-- Suhas Daftuar
-- Tawanda Kembo
-- Teran McKinney
-- tm314159
-- Tom Harding
-- Trevin Hofmann
-- Whit J
-- Wladimir J. van der Laan
-- Yoichi Hirai
-- Zak Wilcox
-
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
 

From 78f64ef0b2c949496242bd97f403e3717b5f2fad Mon Sep 17 00:00:00 2001
From: Ruben de Vries <ruben@rubensayshi.com>
Date: Tue, 24 Mar 2015 14:29:13 +0100
Subject: [PATCH 1286/1819] don't trickle for whitelisted nodes

Rebased-From: fc720207e0e513e531b1f266b966a2ffa57b936a
Github-Pull: #5942
---
 src/main.h  | 7 ++++++-
 src/net.cpp | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main.h b/src/main.h
index a62bebc49d3d..e4096e9612b5 100644
--- a/src/main.h
+++ b/src/main.h
@@ -179,7 +179,12 @@ bool LoadBlockIndex();
 void UnloadBlockIndex();
 /** Process protocol messages received from a given node */
 bool ProcessMessages(CNode* pfrom);
-/** Send queued protocol messages to be sent to a give node */
+/**
+ * Send queued protocol messages to be sent to a give node.
+ *
+ * @param[in]   pto             The node which we are sending messages to.
+ * @param[in]   fSendTrickle    When true send the trickled data, otherwise trickle the data until true.
+ */
 bool SendMessages(CNode* pto, bool fSendTrickle);
 /** Run an instance of the script checking thread */
 void ThreadScriptCheck();
diff --git a/src/net.cpp b/src/net.cpp
index 7ed9d65fb2dd..1d95932ca6a6 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1456,7 +1456,7 @@ void ThreadMessageHandler()
             {
                 TRY_LOCK(pnode->cs_vSend, lockSend);
                 if (lockSend)
-                    g_signals.SendMessages(pnode, pnode == pnodeTrickle);
+                    g_signals.SendMessages(pnode, pnode == pnodeTrickle || pnode->fWhitelisted);
             }
             boost::this_thread::interruption_point();
         }

From 0eccf0ae30d0214701f4eae1d6542283f19109f7 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 26 Mar 2015 08:48:32 +0100
Subject: [PATCH 1287/1819] Add commits (up to now) to release notes

---
 doc/release-notes.md | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 53ea3aed4e51..74b387d38c38 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -55,27 +55,56 @@ Detailed release notes follow. This overview includes changes that affect extern
 behavior, not code moves, refactors or string updates.
 
 RPC:
+- `7f502be` fix crash: createmultisig and addmultisigaddress
 
-Block and transaction handling:
+Block (database) and transaction handling:
+- `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
+- `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates
+- `002c8a2` fix possible block db breakage during re-index
 
 P2P protocol and network code:
+- `78f64ef` don't trickle for whitelisted nodes
+- `ca301bf` Reduce fingerprinting through timestamps in 'addr' messages.
+- `200f293` Ignore getaddr messages on Outbound connections.
+- `d5d8998` Limit message sizes before transfer
+- `aeb9279` Better fingerprinting protection for non-main-chain getdatas.
 
 Validation:
+- `d148f62` Acquire CCheckQueue's lock to avoid race condition
 
 Build system:
+- `8752b5c` 0.10 fix for crashes on OSX 10.6
 
 Wallet:
+- N/A
 
 GUI:
+- `2c08406` some mac specifiy cleanup (memory handling, unnecessary code)
+- `81145a6` fix OSX dock icon window reopening
+- `786cf72` fix a issue where "command line options"-action overwrite "Preference"-action (on OSX)
 
 Tests:
+- `1117378` add RPC test for InvalidateBlock
 
 Miscellaneous:
+- `c9e022b` Initialization: set Boost path locale in main thread
+- `23126a0` Sanitize command strings before logging them.
 
 Credits
 =======
 
 Thanks to everyone who contributed to this release:
 
-As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
+- Alex Morcos
+- Cory Fields
+- dexX7
+- fsb4000
+- Gregory Maxwell
+- Ivan Pustogarov
+- Jonas Schnelli
+- Pieter Wuille
+- Ruben de Vries
+- Suhas Daftuar
+- Wladimir J. van der Laan
 
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

From 4635a4c4e7b706f4fab35a06cf2782d55a11b1b8 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 26 Mar 2015 08:59:06 +0100
Subject: [PATCH 1288/1819] Translations update from transifex

---
 doc/release-notes.md                 |    4 +-
 src/qt/bitcoinstrings.cpp            |    4 +
 src/qt/locale/bitcoin_af_ZA.ts       |    8 -
 src/qt/locale/bitcoin_ar.ts          |   24 +-
 src/qt/locale/bitcoin_be_BY.ts       |    8 -
 src/qt/locale/bitcoin_bg.ts          |  272 +++++-
 src/qt/locale/bitcoin_ca.ts          |  124 ++-
 src/qt/locale/bitcoin_ca@valencia.ts |   55 --
 src/qt/locale/bitcoin_ca_ES.ts       |  124 ++-
 src/qt/locale/bitcoin_cs.ts          |  372 ++++++--
 src/qt/locale/bitcoin_cy.ts          |    4 -
 src/qt/locale/bitcoin_da.ts          |  124 +--
 src/qt/locale/bitcoin_de.ts          |  130 +--
 src/qt/locale/bitcoin_el_GR.ts       |   53 --
 src/qt/locale/bitcoin_en.ts          |  113 ++-
 src/qt/locale/bitcoin_eo.ts          |   68 +-
 src/qt/locale/bitcoin_es.ts          |  186 ++--
 src/qt/locale/bitcoin_es_CL.ts       |  112 ++-
 src/qt/locale/bitcoin_es_DO.ts       |   68 +-
 src/qt/locale/bitcoin_es_MX.ts       |    4 -
 src/qt/locale/bitcoin_es_UY.ts       |    4 -
 src/qt/locale/bitcoin_et.ts          |   60 +-
 src/qt/locale/bitcoin_eu_ES.ts       |    4 -
 src/qt/locale/bitcoin_fa.ts          |   20 -
 src/qt/locale/bitcoin_fa_IR.ts       |   16 +-
 src/qt/locale/bitcoin_fi.ts          |  406 +++++++--
 src/qt/locale/bitcoin_fr.ts          |  132 +--
 src/qt/locale/bitcoin_fr_CA.ts       |    4 -
 src/qt/locale/bitcoin_gl.ts          |   48 -
 src/qt/locale/bitcoin_he.ts          |   52 --
 src/qt/locale/bitcoin_hi_IN.ts       |    8 -
 src/qt/locale/bitcoin_hr.ts          |    8 -
 src/qt/locale/bitcoin_hu.ts          |   96 +-
 src/qt/locale/bitcoin_id_ID.ts       |   20 -
 src/qt/locale/bitcoin_it.ts          |  757 ++++++++++------
 src/qt/locale/bitcoin_ja.ts          | 1229 ++++++++++++++++++++++++--
 src/qt/locale/bitcoin_ka.ts          |   48 -
 src/qt/locale/bitcoin_kk_KZ.ts       |    4 -
 src/qt/locale/bitcoin_ko_KR.ts       |   30 -
 src/qt/locale/bitcoin_la.ts          |   48 -
 src/qt/locale/bitcoin_lt.ts          |    8 -
 src/qt/locale/bitcoin_lv_LV.ts       |   16 -
 src/qt/locale/bitcoin_mn.ts          |   12 -
 src/qt/locale/bitcoin_ms_MY.ts       |    4 -
 src/qt/locale/bitcoin_nb.ts          |  143 +--
 src/qt/locale/bitcoin_nl.ts          |  122 +--
 src/qt/locale/bitcoin_pam.ts         |   12 -
 src/qt/locale/bitcoin_pl.ts          |  665 +++++++++++---
 src/qt/locale/bitcoin_pt_BR.ts       |  326 +++++--
 src/qt/locale/bitcoin_pt_PT.ts       |  134 ++-
 src/qt/locale/bitcoin_ro_RO.ts       |  221 +++--
 src/qt/locale/bitcoin_ru.ts          |  128 +--
 src/qt/locale/bitcoin_sah.ts         |    4 -
 src/qt/locale/bitcoin_sk.ts          |  132 +--
 src/qt/locale/bitcoin_sl_SI.ts       |   24 -
 src/qt/locale/bitcoin_sq.ts          |  200 ++++-
 src/qt/locale/bitcoin_sr.ts          |    4 -
 src/qt/locale/bitcoin_sv.ts          |  124 +--
 src/qt/locale/bitcoin_th_TH.ts       |    4 -
 src/qt/locale/bitcoin_tr.ts          |  128 +--
 src/qt/locale/bitcoin_uk.ts          |  120 ++-
 src/qt/locale/bitcoin_ur_PK.ts       |    8 -
 src/qt/locale/bitcoin_uz@Cyrl.ts     |    4 -
 src/qt/locale/bitcoin_vi.ts          |    4 -
 src/qt/locale/bitcoin_vi_VN.ts       |  644 +++++++++++++-
 src/qt/locale/bitcoin_zh_CN.ts       |  604 +++++++++++--
 src/qt/locale/bitcoin_zh_TW.ts       |  124 +--
 67 files changed, 6254 insertions(+), 2516 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 74b387d38c38..5083e6ccd6ad 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -2,8 +2,8 @@ Bitcoin Core version 0.10.1 is now available from:
 
   https://bitcoin.org/bin/0.10.1/
 
-This is a new minor version release, bringing bug fixes and robustness
-improvements. If you are using 0.10.0, it is recommended to upgrade to this
+This is a new minor version release, bringing bug fixes and translation 
+updates. If you are using 0.10.0, it is recommended to upgrade to this
 version.
 
 Please report bugs using the issue tracker at github:
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index a19dab4577f7..cd3a92ba314e 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -100,6 +100,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
 "unless -connect)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Require high priority for relaying free or low-fee transactions (default:%u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", ""
 "Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
@@ -198,6 +200,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet corrupted"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error loading wallet.dat: Wallet requires newer version of Bitcoin Core"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error reading from database, shutting down."),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: A fatal internal error occured, see debug.log for details"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low!"),
@@ -243,6 +246,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Password for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Prepend debug output with timestamp (default: %u)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "RPC server options:"),
+QT_TRANSLATE_NOOP("bitcoin-core", "RPC support for HTTP persistent connections (default: %d)"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly drop 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("bitcoin-core", "Rebuild block chain index from current blk000??.dat files"),
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index c369c3c68ff9..3ca7164e68de 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1,10 +1,6 @@
 <TS language="af_ZA" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dubbel-klik om die adres of etiket te wysig</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Skep 'n nuwe adres</translation>
@@ -658,10 +654,6 @@
         <source>Loading addresses...</source>
         <translation>Laai adresse...</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ongeldige bedrag</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Onvoldoende fondse</translation>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index 101f51f8dcbf..5662054279df 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>أنقر بالماوس مرتين لتعديل العنوان او الوصف</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>انقر بالزر الايمن لتعديل العنوان</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -294,6 +294,14 @@
         <source>Bitcoin Core client</source>
         <translation>عميل bitcion core</translation>
     </message>
+    <message>
+        <source>Importing blocks from disk...</source>
+        <translation>استيراد كتل من القرص ...</translation>
+    </message>
+    <message>
+        <source>Reindexing blocks on disk...</source>
+        <translation>إعادة فهرسة الكتل على القرص</translation>
+    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>ارسل عملات الى عنوان بيتكوين</translation>
@@ -1674,10 +1682,6 @@
         <source>Error: Disk space is low!</source>
         <translation>تحذير: مساحة القرص منخفضة</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>تحذير: المحفظة مغلقة , لا تستطيع تنفيذ المعاملة</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>فشل في الاستماع على أي منفذ. استخدام الاستماع = 0 إذا كنت تريد هذا.</translation>
@@ -1746,10 +1750,6 @@
         <source>Invalid -proxy address: '%s'</source>
         <translation>عنوان البروكسي غير صحيح : '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>قيمة غير صحيحة</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>اموال غير كافية</translation>
@@ -1770,10 +1770,6 @@
         <source>Done loading</source>
         <translation>انتهاء التحميل</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>لاستخدام %s الخيار</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطأ</translation>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index e63628396c88..ad0f8cf923ae 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,10 +1,6 @@
 <TS language="be_BY" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Двайны клік для рэдагавання адрасу ці пазнакі</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Стварыць новы адрас</translation>
@@ -954,10 +950,6 @@ Address: %4
         <source>Error loading wallet.dat</source>
         <translation>Памылка загрузкі wallet.dat</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Памылковая колькасць</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Недастаткова сродкаў</translation>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 3095aa117286..e810dfad0453 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1,18 +1,26 @@
 <TS language="bg" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Двоен клик за редакция на адрес или име</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Създаване на нов адрес</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>Нов</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копиране на избрания адрес</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>Копирай</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>Затвори</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Копирай</translation>
@@ -25,10 +33,26 @@
         <source>Export the data in the current tab to a file</source>
         <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>Изнеси</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Изтриване</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Изберете адрес, на който да се изпращат монети</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Изберете адрес за получаване на монети</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>Избери</translation>
+    </message>
     <message>
         <source>Sending addresses</source>
         <translation>Адреси за изпращане</translation>
@@ -37,6 +61,10 @@
         <source>Receiving addresses</source>
         <translation>Адреси за получаване</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+        <translation>Това са адресите на получателите на плащания. Винаги проверявайте размера на сумата и адреса на получателя, преди да изпратите монети.</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Копирай &amp;име</translation>
@@ -230,10 +258,22 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Смяна на паролата...</translation>
     </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Отвори &amp;URI...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core клиент</translation>
+    </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
         <translation>Изпращане към Биткоин адрес</translation>
     </message>
+    <message>
+        <source>Backup wallet to another location</source>
+        <translation>Запазване на портфейла на друго място</translation>
+    </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Променя паролата за портфейла</translation>
@@ -254,6 +294,10 @@
         <source>&amp;Send</source>
         <translation>&amp;Изпращане</translation>
     </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>&amp;Получаване</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Покажи / Скрий</translation>
@@ -278,6 +322,10 @@
         <source>Tabs toolbar</source>
         <translation>Раздели</translation>
     </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>&amp;Относно Bitcoin Core</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n връзка към Биткоин мрежата</numerusform><numerusform>%n връзки към Биткоин мрежата</numerusform></translation>
@@ -330,6 +378,18 @@
         <source>Incoming transaction</source>
         <translation>Входяща трансакция</translation>
     </message>
+    <message>
+        <source>Date: %1
+Amount: %2
+Type: %3
+Address: %4
+</source>
+        <translation>Дата: %1
+Сума: %2
+Вид: %3
+Адрес: %4
+</translation>
+    </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;отключен&lt;/b&gt;</translation>
@@ -392,6 +452,14 @@
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation>Копирай транзакция с ID</translation>
+    </message>
+    <message>
+        <source>none</source>
+        <translation>нищо</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>да</translation>
@@ -400,11 +468,19 @@
         <source>no</source>
         <translation>не</translation>
     </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation>Това наименование се оцветява в червено, ако произволен получател получи сума по-малка от %1.</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
-    </context>
+    <message>
+        <source>(change)</source>
+        <translation>(промени)</translation>
+    </message>
+</context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -473,6 +549,14 @@
         <source>version</source>
         <translation>версия</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1-битов)</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>За Bitcoin Core</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Използване:</translation>
@@ -510,10 +594,26 @@
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Пускане на Биткоин при вход в системата</translation>
     </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>IP адрес на прокси (напр. за IPv4: 127.0.0.1 / за IPv6: ::1)</translation>
+    </message>
+    <message>
+        <source>&amp;Reset Options</source>
+        <translation>&amp;Нулирай настройките</translation>
+    </message>
     <message>
         <source>&amp;Network</source>
         <translation>&amp;Мрежа</translation>
     </message>
+    <message>
+        <source>W&amp;allet</source>
+        <translation>По&amp;ртфейл</translation>
+    </message>
+    <message>
+        <source>Expert</source>
+        <translation>Експерт</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>
@@ -586,6 +686,10 @@
         <source>default</source>
         <translation>подразбиране</translation>
     </message>
+    <message>
+        <source>none</source>
+        <translation>нищо</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Прокси адресът е невалиден.</translation>
@@ -597,6 +701,10 @@
         <source>Form</source>
         <translation>Форма</translation>
     </message>
+    <message>
+        <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
+        <translation>Текущата информация на екрана може да не е актуална. Вашият портфейл ще се синхронизира автоматично с мрежата на Биткоин, щом поне една връзката с нея се установи; този процес все още не е приключил.</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Налично:</translation>
@@ -605,6 +713,10 @@
         <source>Pending:</source>
         <translation>Изчакващо:</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Баланс</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Общо:</translation>
@@ -620,6 +732,10 @@
 </context>
 <context>
     <name>PaymentServer</name>
+    <message>
+        <source>Requested payment amount of %1 is too small (considered dust).</source>
+        <translation>Заявената сума за плащане: %1 е твърде малка (счита се за отпадък)</translation>
+    </message>
     <message>
         <source>Payment acknowledged</source>
         <translation>Плащането е приета</translation>
@@ -641,7 +757,23 @@
     </context>
 <context>
     <name>QRImageWidget</name>
-    </context>
+    <message>
+        <source>&amp;Save Image...</source>
+        <translation>&amp;Запиши изображение...</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Image</source>
+        <translation>&amp;Копирай изображение</translation>
+    </message>
+    <message>
+        <source>Save QR Code</source>
+        <translation>Запази QR Код</translation>
+    </message>
+    <message>
+        <source>PNG Image (*.png)</source>
+        <translation>PNG Изображение (*.png)</translation>
+    </message>
+</context>
 <context>
     <name>RPCConsole</name>
     <message>
@@ -660,6 +792,10 @@
         <source>&amp;Information</source>
         <translation>Данни</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>Основни</translation>
+    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Използване на OpenSSL версия</translation>
@@ -680,10 +816,46 @@
         <source>Current number of blocks</source>
         <translation>Текущ брой блокове</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <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>
     <message>
         <source>Last block time</source>
         <translation>Време на последния блок</translation>
     </message>
+    <message>
+        <source>&amp;Open</source>
+        <translation>&amp;Отвори</translation>
+    </message>
+    <message>
+        <source>&amp;Console</source>
+        <translation>&amp;Конзола</translation>
+    </message>
+    <message>
+        <source>&amp;Network Traffic</source>
+        <translation>&amp;Мрежов Трафик</translation>
+    </message>
+    <message>
+        <source>&amp;Clear</source>
+        <translation>&amp;Изчисти</translation>
+    </message>
     <message>
         <source>Totals</source>
         <translation>Общо:</translation>
@@ -703,10 +875,26 @@
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
+    <message>
+        <source>&amp;Amount:</source>
+        <translation>&amp;Сума</translation>
+    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Име:</translation>
     </message>
+    <message>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>Използвате този формуляр за заявяване на плащания. Всички полета са &lt;b&gt;незадължителни&lt;/b&gt;.</translation>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>Незадължително заявяване на сума. Оставете полето празно или нулево, за да не заявите конкретна сума.</translation>
+    </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>Изчисти всички полета от формуляра.</translation>
+    </message>
     <message>
         <source>Clear</source>
         <translation>Изчистване</translation>
@@ -734,6 +922,14 @@
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
+    <message>
+        <source>Copy &amp;Address</source>
+        <translation>&amp;Копирай адрес</translation>
+    </message>
+    <message>
+        <source>&amp;Save Image...</source>
+        <translation>&amp;Запиши изображение...</translation>
+    </message>
     <message>
         <source>Payment information</source>
         <translation>Данни за плащането</translation>
@@ -781,7 +977,11 @@
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
-    </context>
+    <message>
+        <source>(no amount)</source>
+        <translation>(липсва сума)</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -812,6 +1012,10 @@
         <source>Add &amp;Recipient</source>
         <translation>Добави &amp;получател</translation>
     </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>Изчисти всички полета от формуляра.</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Изчисти</translation>
@@ -836,6 +1040,10 @@
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
+    <message>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>Пълна сума %1 (= %2)</translation>
+    </message>
     <message>
         <source>or</source>
         <translation>или</translation>
@@ -887,6 +1095,10 @@
         <source>&amp;Label:</source>
         <translation>&amp;Име:</translation>
     </message>
+    <message>
+        <source>Choose previously used address</source>
+        <translation>Изберете използван преди адрес</translation>
+    </message>
     <message>
         <source>This is a normal payment.</source>
         <translation>Това е нормално плащане.</translation>
@@ -933,6 +1145,10 @@
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Можете да подпишете съобщение като доказателство, че притежавате определен адрес. Бъдете внимателни и не подписвайте съобщения, които биха разкрили лична информация без вашето съгласие.</translation>
     </message>
+    <message>
+        <source>Choose previously used address</source>
+        <translation>Изберете използван преди адрес</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -989,6 +1205,10 @@
         <source>Please check the address and try again.</source>
         <translation>Моля проверете адреса и опитайте отново.</translation>
     </message>
+    <message>
+        <source>The entered address does not refer to a key.</source>
+        <translation>Въведеният адрес не може да се съпостави с валиден ключ.</translation>
+    </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
         <translation>Отключването на портфейла беше отменено.</translation>
@@ -1028,6 +1248,10 @@
 </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation>Разработчици на Bitcoin Core</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -1315,6 +1539,10 @@
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
+    <message>
+        <source>Copy transaction ID</source>
+        <translation>Копирай транзакция с ID</translation>
+    </message>
     <message>
         <source>Edit label</source>
         <translation>Редактирай име</translation>
@@ -1391,6 +1619,10 @@
 </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>Изнеси</translation>
+    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Запишете данните от текущия раздел във файл</translation>
@@ -1399,7 +1631,15 @@
         <source>Backup Wallet</source>
         <translation>Запазване на портфейла</translation>
     </message>
-    </context>
+    <message>
+        <source>Backup Failed</source>
+        <translation>Неуспешно запазване на портфейла</translation>
+    </message>
+    <message>
+        <source>Backup Successful</source>
+        <translation>Успешно запазване на портфейла</translation>
+    </message>
+</context>
 <context>
     <name>bitcoin-core</name>
     <message>
@@ -1410,6 +1650,10 @@
         <source>Specify data directory</source>
         <translation>Определете директория за данните</translation>
     </message>
+    <message>
+        <source>Specify your own public address</source>
+        <translation>Въведете Ваш публичен адрес</translation>
+    </message>
     <message>
         <source>Use the test network</source>
         <translation>Използвайте тестовата мрежа</translation>
@@ -1454,6 +1698,14 @@
         <source>Information</source>
         <translation>Данни</translation>
     </message>
+    <message>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Невалидна сума за -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Невалидна сума за -mintxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Изпрати локализиращата или дебъг информацията към конзолата, вместо файлът debug.log</translation>
@@ -1518,6 +1770,10 @@
         <source>Invalid -proxy address: '%s'</source>
         <translation>Невалиден -proxy address: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Недостатъчно средства</translation>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 3e87383c503c..9d934cd602dd 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Feu clic dret per a editar l'adreça o l'etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -570,7 +570,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Received with label</source>
@@ -1284,6 +1284,10 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Reemborsament de %1</translation>
     </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Protecció de DoS per a la sol·licitud de pagament</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Error en comunicar amb %1: %2</translation>
@@ -1324,7 +1328,7 @@ Address: %4
     <name>QObject</name>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. %1)</source>
@@ -2428,7 +2432,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>true</source>
@@ -2802,29 +2806,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, heu de establir una contrasenya RPC al fitxer de configuració: %s
-Es recomana que useu la següent contrasenya aleatòria:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(no necesiteu recordar aquesta contrasenya)
-El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
-Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
-També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
-per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
@@ -2841,14 +2822,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: Aquesta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
@@ -2961,10 +2934,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Error: Espai al disc baix!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
@@ -3085,10 +3054,22 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si no s'especifica una paytxfee (comissió de transacció de pagament), inclogueu suficient comissió per tal que les transaccions comencin a confirmar-se en una mitja de n blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Import no vàlid per a -maxtxfee=&lt;amount&gt;: '%s' (cal que sigui com a mínim la comissió de minrelay de %s per evitar que les comissions s'encallin)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Comissions totals màximes que s'utilitzaran en una transacció d'un únic moneder. Si es defineix un valor massa baix les transaccions més grans poden interrompre's (per defecte: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
@@ -3105,6 +3086,33 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Per utilitzar bitcoind, o l'opció de serviddor de bitcoin-qt, heu de definir una rpcpassword en el fitxer de configuració:
+%s
+Es recomana que utilitzeu la contrasenya aleatòria següent:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no cal que recordeu la contrasenya)
+El nom d'usuari i la contrasenya NO han de ser els mateixos.
+Si el fitxer no existeix, creeu-ne un amb permisos de lectura només per al seu propietari.
+Es recomana definir alertnotify per tal de ser notificat de qualsevol problema;
+per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Avís: s'ha especificat un -maxtxfee molt alt! Comissions tan grans podrien pagar-se en una única transacció.</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>Avís: comproveu que la data i hora del vostre ordinador siguin correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
@@ -3113,6 +3121,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accepta sol·licituds REST públiques (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
@@ -3149,6 +3161,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Ha fallat la inicialització de la comprovació de validesa. El Bitcoin Core s'està aturant.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
@@ -3165,10 +3181,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Manté com a màxim &lt;n&gt; transaccions no connectables en memòria (per defecte: %u)</translation>
@@ -3181,10 +3193,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Opcions de transmissió del node:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -3233,6 +3241,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Els imports de les transaccions han de ser positius</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transacció massa gran per a la política de comissions</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>La transacció és massa gran</translation>
@@ -3329,10 +3341,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Com d'exhaustiva és la verificació de blocs del -checkblocks (0-4, per defecte: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Si no es defineix una comissió de pagament de transacció (paytxfee), inclogueu suficient comissió per tal que les transaccions puguin confirmar-se cada n blocs com a mitja (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Enregistreu la prioritat de la transacció i la comissió per kB en minar blocs (per defecte: %u)</translation>
@@ -3425,10 +3433,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Posa davant de la sortida de depuració una marca horària (per defecte: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Retransmet i mina les transaccions de l'operador (per defecte: %u)</translation>
@@ -3505,10 +3509,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Import no vàlid</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Balanç insuficient</translation>
@@ -3541,10 +3541,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Ha acabat la càrrega</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Utilitza l'opció %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index d3bf33ebfbeb..12f18f66ac19 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1,10 +1,6 @@
 <TS language="ca@valencia" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crea una nova adreça</translation>
@@ -2630,29 +2626,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, heu d'establir una contrasenya RPC al fitxer de configuració: %s
-Es recomana que useu la següent contrasenya aleatòria:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(no necesiteu recordar esta contrasenya)
-El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
-Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
-També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
-per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
@@ -2665,14 +2638,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'hagueren gastat monedes de la copia però sense marcar com gastades en este.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: Esta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una orde quan una transacció del moneder canvie (%s en cmd es canvia per TxID)</translation>
@@ -2777,10 +2742,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Error: Espai al disc baix!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
@@ -2961,10 +2922,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Cal especificar un port amb -whitebind: «%s»</translation>
@@ -2973,10 +2930,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Opcions de transmissió del node:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -3129,10 +3082,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Import no vàlid</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Balanç insuficient</translation>
@@ -3165,10 +3114,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Ha acabat la càrrega</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Utilitza l'opció %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 0004d6da6f59..073c910a1cee 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Feu doble clic per editar l'adreça o l'etiqueta</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Feu clic dret per a editar l'adreça o l'etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -570,7 +570,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Received with label</source>
@@ -1284,6 +1284,10 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Reemborsament de %1</translation>
     </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Protecció de DoS per a la sol·licitud de pagament</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Error en comunicar amb %1: %2</translation>
@@ -1324,7 +1328,7 @@ Address: %4
     <name>QObject</name>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. %1)</source>
@@ -2428,7 +2432,7 @@ Address: %4
     </message>
     <message>
         <source>Amount</source>
-        <translation>Quantitat</translation>
+        <translation>Import</translation>
     </message>
     <message>
         <source>true</source>
@@ -2802,29 +2806,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, heu de establir una contrasenya RPC al fitxer de configuració: %s
-Es recomana que useu la següent contrasenya aleatòria:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(no necesiteu recordar aquesta contrasenya)
-El nom d'usuari i la contrasenya NO HAN de ser els mateixos.
-Si el fitxer no existeix, crea'l amb els permisos de fitxer de només lectura per al propietari.
-També es recomana establir la notificació d'alertes i així sereu notificat de les incidències;
-per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
@@ -2841,14 +2822,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra en el mode de proves de regressió, que utilitza una cadena especial en què els blocs poden resoldre's al moment.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: La transacció ha estat rebutjada. Això pot passar si alguna de les monedes del teu moneder ja s'han gastat, com si haguesis usat una copia de l'arxiu wallet.dat i s'haguessin gastat monedes de la copia però sense marcar com gastades en aquest.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: Aquesta transacció requereix una comissió d'almenys %s degut al seu import, complexitat o per l'ús de fons recentment rebuts!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
@@ -2961,10 +2934,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Error: Espai al disc baix!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: El moneder està bloquejat, no és possible crear la transacció!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallat escoltar a qualsevol port. Feu servir -listen=0 si voleu fer això.</translation>
@@ -3085,10 +3054,22 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Comissions (en BTC/Kb) inferiors a això es consideren de comissió zero per a la creació de la transacció (per defecte: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si no s'especifica una paytxfee (comissió de transacció de pagament), inclogueu suficient comissió per tal que les transaccions comencin a confirmar-se en una mitja de n blocs (per defecte: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Import no vàlid per a -maxtxfee=&lt;amount&gt;: '%s' (cal que sigui com a mínim la comissió de minrelay de %s per evitar que les comissions s'encallin)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Comissions totals màximes que s'utilitzaran en una transacció d'un únic moneder. Si es defineix un valor massa baix les transaccions més grans poden interrompre's (per defecte: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
@@ -3105,6 +3086,33 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Per utilitzar bitcoind, o l'opció de serviddor de bitcoin-qt, heu de definir una rpcpassword en el fitxer de configuració:
+%s
+Es recomana que utilitzeu la contrasenya aleatòria següent:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no cal que recordeu la contrasenya)
+El nom d'usuari i la contrasenya NO han de ser els mateixos.
+Si el fitxer no existeix, creeu-ne un amb permisos de lectura només per al seu propietari.
+Es recomana definir alertnotify per tal de ser notificat de qualsevol problema;
+per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Avís: s'ha especificat un -maxtxfee molt alt! Comissions tan grans podrien pagar-se en una única transacció.</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>Avís: comproveu que la data i hora del vostre ordinador siguin correctes! Si el vostre rellotge no és correcte, el Bitcoin Core no funcionarà correctament.</translation>
@@ -3113,6 +3121,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accepta sol·licituds REST públiques (per defecte: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>No es pot resoldre l'adreça -whitebind: «%s»</translation>
@@ -3149,6 +3161,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Ha fallat la inicialització de la comprovació de validesa. El Bitcoin Core s'està aturant.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Import no vàlid per a -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -minrelaytxfee=&lt;amount&gt;: «%s»</translation>
@@ -3165,10 +3181,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>S'ha especificat una màscara de xarxa no vàlida a -whitelist: «%s»</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Manté com a màxim &lt;n&gt; blocs no connectables en memòria (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Manté com a màxim &lt;n&gt; transaccions no connectables en memòria (per defecte: %u)</translation>
@@ -3181,10 +3193,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Opcions de transmissió del node:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimeix el block a l'inici, si es troba l'índex de blocs</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcions RPC SSL: (veieu el wiki del Bitcoin per a instruccions de configuració de l'SSL)</translation>
@@ -3233,6 +3241,10 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Els imports de les transaccions han de ser positius</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transacció massa gran per a la política de comissions</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>La transacció és massa gran</translation>
@@ -3329,10 +3341,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Com d'exhaustiva és la verificació de blocs del -checkblocks (0-4, per defecte: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Si no es defineix una comissió de pagament de transacció (paytxfee), inclogueu suficient comissió per tal que les transaccions puguin confirmar-se cada n blocs com a mitja (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Enregistreu la prioritat de la transacció i la comissió per kB en minar blocs (per defecte: %u)</translation>
@@ -3425,10 +3433,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Posa davant de la sortida de depuració una marca horària (per defecte: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Imprimeix l'arbre de blocs a l'inici (per defecte: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Retransmet i mina les transaccions de l'operador (per defecte: %u)</translation>
@@ -3505,10 +3509,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Import no vàlid per a -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Import no vàlid</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Balanç insuficient</translation>
@@ -3541,10 +3541,6 @@ per exemple: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Ha acabat la càrrega</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Utilitza l'opció %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index bc2a2ef7b5d0..966303c33a7a 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dvojklikem myši začneš upravovat označení adresy</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Pravým tlačítkem myši začneš upravovat označení adresy</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -430,10 +430,26 @@
         <source>No block source available...</source>
         <translation>Není dostupný žádný zdroj bloků...</translation>
     </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n hodinu</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodin</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n den</numerusform><numerusform>%n dny</numerusform><numerusform>%n dnů</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><numerusform>%n týden</numerusform><numerusform>%n týdny</numerusform><numerusform>%n týdnů</numerusform></translation>
+    </message>
     <message>
         <source>%1 and %2</source>
         <translation>%1 a %2</translation>
     </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n roků</numerusform></translation>
+    </message>
     <message>
         <source>%1 behind</source>
         <translation>Stahuji ještě bloky transakcí za poslední %1</translation>
@@ -462,6 +478,10 @@
         <source>Up to date</source>
         <translation>Aktuální</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Zpracován %n blok transakční historie.</numerusform><numerusform>Zpracovány %n bloky transakční historie.</numerusform><numerusform>Zpracováno %n bloků transakční historie.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Stahuji...</translation>
@@ -504,6 +524,10 @@ Adresa: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Výběr mincí</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Počet:</translation>
@@ -552,6 +576,14 @@ Adresa: %4
         <source>Amount</source>
         <translation>Částka</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Příjem na označení</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Příjem na adrese</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Datum</translation>
@@ -884,7 +916,15 @@ Adresa: %4
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB volného místa</numerusform><numerusform>%n GB volného místa</numerusform><numerusform>%n GB volného místa</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(z potřebného %n GB)</numerusform><numerusform>(z potřebných %n GB)</numerusform><numerusform>(z potřebných %n GB)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1006,6 +1046,14 @@ Adresa: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Namapovat port přes &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Připojí se do Bitcoinové sítě přes SOCKS5 proxy.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Připojit přes SOCKS5 proxy (výchozí proxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP adresa proxy:</translation>
@@ -1137,6 +1185,10 @@ Adresa: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Vytěžené mince, které ještě nejsou zralé</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Stavy účtů</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Celkem:</translation>
@@ -1149,6 +1201,14 @@ Adresa: %4
         <source>Your current balance in watch-only addresses</source>
         <translation>Aktuální stav účtu sledovaných adres</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Běžné:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Poslední transakce</translation>
+    </message>
     <message>
         <source>Unconfirmed transactions to watch-only addresses</source>
         <translation>Nepotvrzené transakce sledovaných adres</translation>
@@ -1228,6 +1288,10 @@ Adresa: %4
         <source>Refund from %1</source>
         <translation>Vrácení peněz od %1</translation>
     </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>DoS ochrana platebního požadavku</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Chyba při komunikaci s %1: %2</translation>
@@ -1784,6 +1848,54 @@ Adresa: %4
         <source>Custom change address</source>
         <translation>Vlastní adresa pro drobné</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Transakční poplatek:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Zvol...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>sbal nastavení poplatků</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Skryj</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>za kilobajt</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Pokud je vlastní poplatek nastavený na 1000 satoshi a transakce má pouze 250 bajtů, tak „za kilobajt“ zaplatí poplatek jen 250 satoshi, zatímco „přinejmenším“ zaplatí 1000 satoshi. Pro transakce větší než kilobajt obě možnosti platí za kilobajt.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>přinejmenším</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(viz bublina)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Doporučený:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Vlastní:</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Pošli transakci pokud možno bez poplatku</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(potvrzení může trvat déle)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Pošli více příjemcům naráz</translation>
@@ -2216,7 +2328,7 @@ Adresa: %4
     </message>
     <message>
         <source>watch-only</source>
-        <translation>sledovací</translation>
+        <translation>sledovaná</translation>
     </message>
     <message>
         <source>label</source>
@@ -2226,6 +2338,10 @@ Adresa: %4
         <source>Credit</source>
         <translation>Příjem</translation>
     </message>
+    <message numerus="yes">
+        <source>matures in %n more block(s)</source>
+        <translation><numerusform>dozraje po %n bloku</numerusform><numerusform>dozraje po %n blocích</numerusform><numerusform>dozraje po %n blocích</numerusform></translation>
+    </message>
     <message>
         <source>not accepted</source>
         <translation>neakceptováno</translation>
@@ -2412,6 +2528,10 @@ Adresa: %4
         <source>Type of transaction.</source>
         <translation>Druh transakce.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Zda tato transakce zahrnuje i některou sledovanou adresu.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Cílová adresa transakce.</translation>
@@ -2507,6 +2627,10 @@ Adresa: %4
         <source>Export Transaction History</source>
         <translation>Exportuj transakční historii</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Sledovaná</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Exportování selhalo</translation>
@@ -2650,30 +2774,6 @@ Adresa: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Přijímat spojení zvenčí (výchozí: 1, pokud není zadáno -proxy nebo -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, musíš nastavit rpcpassword v konfiguračním souboru:
-%s
-Je vhodné použít následující náhodné heslo:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(není potřeba si ho pamatovat)
-rpcuser a rpcpassword NESMÍ být stejné.
-Pokud konfigurační soubor ještě neexistuje, vytvoř ho tak, aby ho mohl číst pouze vlastník.
-Je také doporučeno si nastavit alertnotify, abys byl upozorněn na případné problémy;
-například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port</translation>
@@ -2683,16 +2783,12 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Smazat všechny transakce peněženky a při startu obnovit pouze relevantní části řetězce bloků pomocí -rescan</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation>Přepnout do módu testování regresí, který používá speciální řetězec, ve kterém mohou být bloky okamžitě vyřešeny.</translation>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Chyba: Transakce byla odmítnuta! Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této.</translation>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Šířen pod softwarovou licencí MIT, viz přiložený soubor COPYING nebo &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Chyba: Tahle transakce vyžaduje transakční poplatek nejméně %s kvůli velikosti zasílané částky, komplexnosti nebo použití nedávno přijatých mincí!</translation>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation>Přepnout do módu testování regresí, který používá speciální řetězec, ve kterém mohou být bloky okamžitě vyřešeny.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2734,6 +2830,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Upozornění: soubor wallet.dat je poškozený, data jsou však zachráněna! Původní soubor wallet.dat je uložený jako wallet.{timestamp}.bak v %s. Pokud je stav tvého účtu nebo transakce nesprávné, zřejmě bys měl obnovit zálohu.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Umístit na bílou listinu protějšky připojující se z dané podsítě či IP adresy. Lze zadat i vícekrát.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(výchozí: 1)</translation>
@@ -2795,12 +2895,12 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Chyba při otevírání databáze bloků</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Problém: Na disku je málo místa!</translation>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Chyba: Stala se fatální vnitřní chyba. detaily viz v debug.log</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Chyba: Peněženka je zamčená, nemohu vytvořit transakci!</translation>
+        <source>Error: Disk space is low!</source>
+        <translation>Problém: Na disku je málo místa!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
@@ -2826,6 +2926,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Not enough file descriptors available.</source>
         <translation>Je nedostatek deskriptorů souborů.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Připojovat se pouze k uzlům v &lt;net&gt; síti (ipv4, ipv6 nebo onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Znovu vytvořit index řetězce bloků z aktuálních blk000??.dat souborů</translation>
@@ -2846,6 +2950,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Tohle je určeno pro nástroje na regresní testování a vyvíjení aplikací.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Použít UPnP k namapování naslouchacího portu (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Ověřuji bloky... </translation>
@@ -2890,6 +2998,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Nedaří se mi získat zámek na datový adresář %s. Bitcoin Core pravděpodobně už jednou běží.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Kontinuálně omezovat bezpoplatkové transakce na &lt;n&gt;*1000 bajtů za minutu (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
         <translation>Vytvářet nové soubory s výchozími systémovými právy namísto umask 077 (uplatní se, pouze pokud je vypnutá funkce peněženky)</translation>
@@ -2914,6 +3026,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Poplatky (v BTC/Kb) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximální velikost dat v transakcích nesoucích data, se kterou jsme ochotni je ještě přeposílat a těžit (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Při nedostatku adres získat další protějšky z DNS (výchozí: 1, pokud není použito -connect)</translation>
@@ -2922,6 +3038,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Nastavit maximální velikost prioritních/nízkopoplatkových transakcí v bajtech (výchozí: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Nastavení počtu vláken pro těžení, je-li zapnuté (-1 = všechna jádra, výchozí: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu &lt;https://www.openssl.org/&gt; a kryptografický program od Erika Younga a program UPnP od Thomase Bernarda.</translation>
@@ -2987,8 +3107,8 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Ve -whitelist byla zadána neplatná podsíť: '%s'</translation>
     </message>
     <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Držet v paměti nejvýše &lt;n&gt; nespojitelných bloků (výchozí: %u)</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Držet v paměti nejvýše &lt;n&gt; nespojitelných transakcí (výchozí: %u)</translation>
     </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
@@ -2998,10 +3118,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Možnosti přeposílání:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Vypsat při startu blok,pokud se nachází v indexu bloků</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Možnosti SSL pro RPC: (viz instrukce nastavení SSL na Bitcoin Wiki)</translation>
@@ -3022,6 +3138,10 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Posílat stopovací/ladicí informace do konzole místo do souboru debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Posílat transakce pokud možno bez poplatků (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zobrazit všechny možnosti ladění (užití: --help -help-debug)</translation>
@@ -3130,14 +3250,166 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Chyba při načítání wallet.dat: peněženka je poškozená</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = ukládat transakční metadata, např. majitele účtu a informace o platebním požadavku, 2 = mazat transakční metadata)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Promítnout databázovou aktivitu z paměťového prostoru do záznamu na disku každých &lt;n&gt; megabajtů (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Jak moc důkladná má být verifikace bloků -checkblocks (0-4, výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Zaznamenávat během těžení bloků prioritu transakce a poplatek za kB (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Spravovat úplný index transakcí, který je využíván rpc voláním getrawtransaction (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Doba ve vteřinách, po kterou se nebudou moci zlobivé protějšky znovu připojit (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Tisknout ladicí informace (výchozí: %u, zadání &lt;category&gt; je volitelné)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Akceptovatelné šifry (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Vždy získávat adresy dalších protějšků přes DNS (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Vypnout bezpečný režim (safemode), překrýt skutečnou událost bezpečného režimu (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Chyba při načítání wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Vynutit bezpečný mód (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Těžit (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Kolik bloků při startu zkontrolovat (výchozí: %u, 0 = všechny)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Zaznamenávat do ladicích výstupů i IP adresy (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Neplatná -proxy adresa: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Omezit velikost vyrovnávací paměti pro podpisy na &lt;n&gt; položek (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Čekat na JSON-RPC spojení na &lt;portu&gt; (výchozí: %u nebo testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Čekat na spojení na &lt;portu&gt; (výchozí: %u nebo testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Povolit nejvýše &lt;n&gt; protějšků (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximální velikost přijímacího bufferu pro každé spojení, &lt;n&gt;*1000 bajtů (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximální velikost odesílacího bufferu pro každé spojení, &lt;n&gt;*1000 bajtů (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Uznávat pouze řetězec bloků, který odpovídá vnitřním kontrolním bodům (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Připojit před ladicí výstup časové razítko (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Přeposílat a těžit transakce nesoucí data (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Přeposílat ne-P2SH multisig (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Spustit vlákno pročišťující periodicky peněženku (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Soubor se serverovým certifikátem (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Soubor se serverovým soukromým klíčem (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Nastavit zásobník klíčů na velikost &lt;n&gt; (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Nastavit minimální velikost bloku v bajtech (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Nastavení počtu vláken pro servisní RPC volání (výchozí: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Nastavit příznak DB_PRIVATE v databázovém prostředí peněženky (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Konfigurační soubor (výchozí: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Zadej časový limit spojení v milivteřinách (minimum: 1, výchozí: %d)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Utrácet i ještě nepotvrzené drobné při posílání transakcí (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Ukončit se po importu bloků z disku (výchozí: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Práh pro odpojování zlobivých protějšků (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>V -onlynet byla uvedena neznámá síť: '%s'</translation>
@@ -3154,10 +3426,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neplatná částka pro -paytxfee=&lt;částka&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Neplatná částka</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nedostatek prostředků</translation>
@@ -3190,10 +3458,6 @@ například: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Načítání dokončeno</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>K použití volby %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Chyba</translation>
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index c68fc274f320..89b0cbe919e8 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -1,10 +1,6 @@
 <TS language="cy" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Clicio dwywaith i olygu cyfeiriad neu label</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Creu cyfeiriad newydd</translation>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index f73359109849..a1d507b5996b 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dobbeltklik for at redigere adresse eller mærkat</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Højreklik for at redigere adresse eller mærke</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1284,6 +1284,14 @@ Adresse: %4
         <source>Refund from %1</source>
         <translation>Tilbagebetaling fra %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Betalingsanmodning %2 er for stor (%3 byte, %4 byte tilladt).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Beskyttelse mod DoS-angreb via betalingsanmodninger</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Fejl under kommunikation med %1: %2</translation>
@@ -2802,30 +2810,6 @@ Adresse: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Acceptér forbindelser udefra (standard: 1 hvis hverken -proxy eller -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, du skal angive en RPC-adgangskode i konfigurationsfilen:
-%s
-Det anbefales, at du bruger nedenstående, tilfældige adgangskode:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(du behøver ikke huske denne adgangskode)
-Brugernavnet og adgangskode MÅ IKKE være det samme.
-Hvis filen ikke eksisterer, opret den og giv ingen andre end ejeren læserettighed.
-Det anbefales også at angive alertnotify, så du påmindes om problemer;
-fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Tildel til den givne adresse og lyt altid på den. Brug [vært]:port-notation for IPv6</translation>
@@ -2842,14 +2826,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Start regressionstesttilstand, som bruger en speciel kæde, hvor blokke kan løses med det samme.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fejl: Transaktionen blev afvist. Dette kan ske, hvis nogle af dine bitcoins i din tegnebog allerede er brugt, som hvis du brugte en kopi af wallet.dat og dine bitcoins er blevet brugt i kopien, men ikke er markeret som brugt her.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fejl: Denne transaktion kræver et transaktionsgebyr på minimum %s pga. dens beløb, kompleksitet eller anvendelse af nyligt modtagne bitcoins!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID)</translation>
@@ -2962,10 +2938,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Fejl: Mangel på ledig diskplads!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Fejl: Tegnebog låst, kan ikke oprette transaktion!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Lytning på enhver port mislykkedes. Brug -listen=0, hvis du ønsker dette.</translation>
@@ -3090,10 +3062,22 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre end dette opfattes som nulgebyr for oprettelse af transaktion (standard: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Hvis paytxfee ikke er sat, inkluderes nok gebyr til at transaktioner begynder at blive bekræftet ingen for gennemsnitligt n blokke (standard: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Ugyldigt beløb for -maxtxfee=&lt;beløb&gt;: "%s" (skal være på mindst minrelay-gebyret på %s for at undgå hængende transaktioner)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Maksimal størrelse på data i transaktioner til dataoverførsel, som vi videresender og miner (standard: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maksimalt totalgebyr der bruges på en enkelt tegnebogstransaktion. Sættes det for lavt kan store transaktioner afbrydes (standard: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Forespørgsel</translation>
@@ -3110,6 +3094,34 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dette produkt indeholder software, der er udviklet af OpenSSL-projektet for brug i OpenSSL-værktøjskassen &lt;https://www.openssl.org/&gt;, samt kryptografisk software, der er skrevet af Eric Young, samt UPnP-software, der er skrevet af Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>For at bruge bitcoind eller valgmuligheden -server i bitcoin-qt skal du oprette et rpcpassword i konfigurationsfilen:
+%s
+Det anbefales, at du bruger følgende tilfældige adgangskode:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(du behøver ikke at huske adgangskoden)
+Brugernavnet og adgangskoden MÅ IKKE være det samme.
+Hvis filen ikke eksisterer, opret den da så kun ejeren har læserettigheder.
+Det anbefales også at sætte alertnotify, så du får besked omkring problemer;
+for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Advarsel: -maxtxfee er sat meget højt! Så store gebyrer kan betales på en enkelt transaktion.</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>Advarsel: Undersøg venligst at din computers dato og klokkeslet er korrekt indstillet! Hvis der er fejl i disse vil Bitcoin Core ikke fungere korrekt.</translation>
@@ -3118,6 +3130,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Andre knuder på hvidliste kan ikke DoS-bandlyses, og deres transaktioner videresendes altid, selv hvis de allerede er i mempool'en. Brugbart til fx et adgangspunkt</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Acceptér offentlige REST-anmodninger (standard: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan ikke løse -whitebind adresse: "%s"</translation>
@@ -3154,6 +3170,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Sundhedstjek under klargøring mislykkedes. Bitcoin Core lukker ned.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldigt beløb for -maxtxfee=&lt;beløb&gt;: "%s"</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ugyldigt beløb til -minrelaytxfee=&lt;beløb&gt;: "%s"</translation>
@@ -3170,10 +3190,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Ugyldig netmaske angivet i -whitelist: "%s"</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Behold højest &lt;n&gt; uforbindelige blokke i hukommelsen (standard: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Behold højest &lt;n&gt; uforbindelige transaktioner i hukommelsen (standard: %u)</translation>
@@ -3186,10 +3202,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Videresendelsesvalgmuligheder for knude:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Udskriv blok under opstart, hvis den findes i blokindeks</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Tilvalg for RPC SSL: (se Bitcoin Wiki for instruktioner i SSL-opstart)</translation>
@@ -3238,6 +3250,10 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Transaktionsbeløb skal være positive</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaktion for stor til gebyrretningslinjer</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transaktionen er for stor</translation>
@@ -3334,10 +3350,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Hvor gennemarbejdet blokverificeringen for -checkblocks er (0-4; standard: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Hvis paytxfee ikke er angivet, inkludér da nok gebyr til at transaktioner gennemsnitligt bekræftes inden for n blokke (standard: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Prioritet for transaktionslog og gebyr pr. kB under udvinding af blokke (standard: %u)</translation>
@@ -3430,10 +3442,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Føj tidsstempel foran fejlsøgningsoutput (standard: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Udskriv bloktræ under opstart (standard: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Videresend og udvind databærer-transaktioner (standard: %u)</translation>
@@ -3512,10 +3520,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: "%s"</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ugyldigt beløb</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Manglende dækning</translation>
@@ -3548,10 +3552,6 @@ fx: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Indlæsning gennemført</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>For at bruge %s mulighed</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Fejl</translation>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 2804d2d6654a..3d61eb4d3e4a 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Doppelklick zum Bearbeiten der Adresse oder der Bezeichnung</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Rechtsklick zum Bearbeiten der Adresse oder der Bezeichnung</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Auf aktuellem Stand</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>%n Block des Transaktionsverlaufs verarbeitet.</numerusform><numerusform>%n Blöcke des Transaktionsverlaufs verarbeitet.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Hole auf...</translation>
@@ -862,7 +866,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
-        <translation>SSL-Wurzelzertifikate für Zahlungsanforderungen festlegen (Standard: Systemstandard)</translation>
+        <translation>SSL-Wurzelzertifikate für Zahlungsanforderungen festlegen (Standard: -system-)</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
@@ -1283,6 +1287,14 @@ Adresse: %4</translation>
         <source>Refund from %1</source>
         <translation>Rücküberweisung von %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Zahlungsanforderung %2 ist zu groß (%3 Byte, erlaubt sind %4 Byte).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Zahlungsanforderungs-DoS-Schutz</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Kommunikationsfehler mit %1: %2</translation>
@@ -2801,30 +2813,6 @@ Adresse: %4</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, Sie müssen den Wert rpcpasswort in dieser Konfigurationsdatei angeben:
-%s
-Es wird empfohlen das folgende Zufallspasswort zu verwenden:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(Sie müssen sich dieses Passwort nicht merken!)
-Der Benutzername und das Passwort dürfen NICHT identisch sein.
-Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
-Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtig zu werden;
-zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Notation verwenden</translation>
@@ -2841,14 +2829,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Bitcoins aus Ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie Ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fehler: Diese Transaktion benötigt aufgrund Ihres Betrags, Ihrer Komplexität oder der Nutzung erst kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die Transaktions-ID ersetzt)</translation>
@@ -2961,10 +2941,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Fehler: Zu wenig freier Speicherplatz auf dem Datenträger!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Fehler: Wallet gesperrt, Transaktion kann nicht erstellt werden!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation>
@@ -3089,10 +3065,22 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Niedrigere Gebühren (in BTC/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Wenn -paytxfee nicht festgelegt wurde Gebühren einschließen, so dass mit der Bestätigung von Transaktionen im Schnitt innerhalb von n Blöcken begonnen wird (Standard: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Ungültiger Betrag für -maxtxfee=&lt;amount&gt;: '%s' (muss mindestens die minimale Weiterleitungsgebühr in Höhe von %s sein, um zu verhindern dass Transaktionen nicht bearbeitet werden)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximale Gesamtgebühren je Wallet-Transaktion, ein zu niedriger Wert kann große Transaktionen abbrechen (Standard: %s)</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>
@@ -3109,6 +3097,34 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit &lt;https://www.openssl.org/&gt; entwickelt wird, sowie von Eric Young geschriebene kryptographische Software und von Thomas Bernard geschriebene UPnP-Software.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Um bitcoind oder die Option -server mit bitcoin-qt verwenden zu können, müssen Sie rpcpassword in der Konfigurationsdatei angeben:
+%s
+Es wird empfohlen das folgende Zufallspasswort zu verwenden.
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(Sie müssen sich dieses Passwort nicht merken!)
+Der Benutzername und das Passwort dürfen NICHT identisch sein.
+Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
+Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtigt zu werden.
+Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Warnung: -maxtxfee ist auf einen sehr hohen Wert festgelegt! Gebühren dieser Höhe könnten für eine einzelne Transaktion bezahlt werden.</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>Warnung: Bitte korrigieren Sie die Datums- und Uhrzeiteinstellungen Ihres Computers, da Bitcoin Core ansonsten nicht ordnungsgemäß funktionieren wird.</translation>
@@ -3117,6 +3133,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>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>Accept public REST requests (default: %u)</source>
+        <translation>Öffentliche REST-Anfragen annehmen (Standard: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kann Adresse in -whitebind nicht auflösen: '%s'</translation>
@@ -3153,6 +3173,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Initialisierungsplausibilitätsprüfung fehlgeschlagen. Bitcoin Core wird beendet.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ungültiger Betrag für -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -3169,10 +3193,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Ungültige Netzmaske angegeben in -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Maximal &lt;n&gt; nicht-verbindbare Blöcke im Speicher halten (Standard: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Maximal &lt;n&gt; nicht-verbindbare Transaktionen im Speicher halten (Standard: %u)</translation>
@@ -3185,10 +3205,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Node relay options:</source>
         <translation>Knoten-Weiterleitungsoptionen:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Block beim Starten ausgeben, wenn dieser im Blockindex gefunden wurde.</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC-SSL-Optionen (siehe Bitcoin-Wiki für SSL-Einrichtung):</translation>
@@ -3237,6 +3253,10 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Transaktionsbeträge müssen positiv sein</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaktion ist für die Gebührenrichtlinie zu groß</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transaktion zu groß</translation>
@@ -3333,10 +3353,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Wenn keine Transaktionsgebühr festgelegt wurde eine Gebühr einbeziehen, sodass Transaktionen im Schnitt innerhalb von &lt;n&gt; Blöcken bestätigt werden (Standard: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: %u)</translation>
@@ -3425,10 +3441,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Blockbaum beim Starten ausgeben (Standard: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>"Data Carrier"-Transaktionen weiterleiten und erarbeiten (Standard: %u)</translation>
@@ -3505,10 +3517,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ungültiger Betrag</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Unzureichender Kontostand</translation>
@@ -3541,10 +3549,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \"Bitcoin Alert\" admin@foo.com
         <source>Done loading</source>
         <translation>Laden abgeschlossen</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Zur Nutzung der %s-Option</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Fehler</translation>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index cf29c222ed5b..5f2b9d072514 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1,10 +1,6 @@
 <TS language="el_GR" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Διπλό-κλικ για επεξεργασία της διεύθυνσης ή της ετικέτας</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Δημιουργία νέας διεύθυνσης</translation>
@@ -2476,43 +2472,10 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Να δέχεσαι συνδέσεις από έξω(προεπιλογή:1)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Αποθηκευση σε συγκεκριμένη διεύθυνση. Χρησιμοποιήστε τα πλήκτρα [Host] : συμβολισμός θύρα για IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Σφάλμα: Η συναλλαγή απορρίφθηκε.
-Αυτό ίσως οφείλεται στο ότι τα νομίσματά σας έχουν ήδη ξοδευτεί, π.χ. με την αντιγραφή του wallet.dat σε άλλο σύστημα και την χρήση τους εκεί, χωρίς η συναλλαγή να έχει καταγραφεί στο παρόν σύστημα.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Σφάλμα: Αυτή η συναλλαγή απαιτεί αμοιβή συναλλαγής τουλάχιστον %s λόγω του μεγέθους, πολυπλοκότητας ή της χρήσης πρόσφατης παραλαβής κεφαλαίου</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
@@ -2589,10 +2552,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Προειδοποίηση: Χαμηλός χώρος στο δίσκο  </translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Σφάλμα: το πορτοφόλι είναι κλειδωμένο, δεν μπορεί να δημιουργηθεί συναλλαγή</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ταλαιπωρηθειτε για να ακούσετε σε οποιαδήποτε θύρα. Χρήση - ακούστε = 0 , αν θέλετε αυτό.</translation>
@@ -2797,10 +2756,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid -proxy address: '%s'</source>
         <translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s'</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Εκτύπωση μπλοκ δέντρου κατά την εκκίνηση (προεπιλογή: %u)</translation>
-    </message>
     <message>
         <source>Server certificate file (default: %s)</source>
         <translation>Αρχείο πιστοποιητικού του διακομιστή  (προεπιλογή: %s)</translation>
@@ -2833,10 +2788,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Λάθος ποσότητα</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Ανεπαρκές κεφάλαιο</translation>
@@ -2869,10 +2820,6 @@ for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Η φόρτωση ολοκληρώθηκε</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Χρήση της %s επιλογής</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Σφάλμα</translation>
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 5291bfcc1b14..0f13916c1c8c 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.0" language="en">
+<TS version="2.1" language="en">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -291,12 +291,12 @@
         <translation>Sign &amp;message...</translation>
     </message>
     <message>
-        <location line="+339"/>
+        <location line="+340"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location line="-407"/>
+        <location line="-408"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
@@ -377,7 +377,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+172"/>
+        <location line="+173"/>
         <source>Bitcoin Core client</source>
         <translation type="unfinished"></translation>
     </message>
@@ -392,7 +392,7 @@
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location line="-405"/>
+        <location line="-406"/>
         <source>Send coins to a Bitcoin address</source>
         <translation>Send coins to a Bitcoin address</translation>
     </message>
@@ -427,12 +427,12 @@
         <translation>&amp;Verify message...</translation>
     </message>
     <message>
-        <location line="+437"/>
+        <location line="+438"/>
         <source>Bitcoin</source>
         <translation>Bitcoin</translation>
     </message>
     <message>
-        <location line="-638"/>
+        <location line="-639"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
@@ -477,7 +477,7 @@
         <translation>Verify messages to ensure they were signed with specified Bitcoin addresses</translation>
     </message>
     <message>
-        <location line="+48"/>
+        <location line="+49"/>
         <source>&amp;File</source>
         <translation>&amp;File</translation>
     </message>
@@ -497,7 +497,7 @@
         <translation>Tabs toolbar</translation>
     </message>
     <message>
-        <location line="-297"/>
+        <location line="-298"/>
         <source>Bitcoin Core</source>
         <translation type="unfinished">Bitcoin Core</translation>
     </message>
@@ -532,7 +532,7 @@
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
         <translation type="unfinished"></translation>
     </message>
@@ -841,7 +841,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+347"/>
+        <location line="+351"/>
         <source>highest</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1610,14 +1610,14 @@ Address: %4
         <location line="-260"/>
         <location line="+226"/>
         <location line="+34"/>
-        <location line="+110"/>
+        <location line="+109"/>
         <location line="+14"/>
         <location line="+18"/>
         <source>Payment request error</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="-401"/>
+        <location line="-400"/>
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1653,11 +1653,11 @@ Address: %4
     </message>
     <message>
         <location line="+43"/>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
         <translation type="unfinished"></translation>
     </message>
@@ -1713,12 +1713,12 @@ Address: %4
         <translation type="unfinished">Amount</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="+106"/>
+        <location filename="../guiutil.cpp" line="+109"/>
         <source>Enter a Bitcoin address (e.g. %1)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+698"/>
+        <location line="+714"/>
         <source>%1 d</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3579,32 +3579,32 @@ Address: %4
 <context>
     <name>bitcoin-core</name>
     <message>
-        <location filename="../bitcoinstrings.cpp" line="+241"/>
+        <location filename="../bitcoinstrings.cpp" line="+244"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location line="+29"/>
+        <location line="+30"/>
         <source>Specify data directory</source>
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location line="-87"/>
+        <location line="-89"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location line="+90"/>
+        <location line="+92"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location line="-106"/>
+        <location line="-108"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
     <message>
-        <location line="+87"/>
+        <location line="+89"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
@@ -3614,12 +3614,12 @@ Address: %4
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-124"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location line="-146"/>
+        <location line="-148"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation>
     </message>
@@ -3649,7 +3649,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+26"/>
+        <location line="+28"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3769,7 +3769,7 @@ Address: %4
         <translation>Error opening block database</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3814,7 +3814,7 @@ Address: %4
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
@@ -3869,12 +3869,12 @@ Address: %4
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
     <message>
-        <location line="-89"/>
+        <location line="-90"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location line="-197"/>
+        <location line="-200"/>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation type="unfinished"></translation>
     </message>
@@ -3960,6 +3960,11 @@ Address: %4
     </message>
     <message>
         <location line="+3"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4034,7 +4039,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+2"/>
+        <source>Error reading from database, shutting down.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4103,6 +4113,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <source>RPC server options:</source>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"></translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
@@ -4219,17 +4234,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>
     <message>
-        <location line="-62"/>
+        <location line="-63"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location line="-181"/>
+        <location line="-184"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+225"/>
+        <location line="+229"/>
         <source>Upgrade wallet to latest format</source>
         <translation>Upgrade wallet to latest format</translation>
     </message>
@@ -4249,22 +4264,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>This help message</translation>
     </message>
     <message>
-        <location line="-104"/>
+        <location line="-106"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location line="+58"/>
+        <location line="+59"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location line="-32"/>
+        <location line="-33"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location line="-186"/>
+        <location line="-188"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4299,7 +4314,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+36"/>
+        <location line="+38"/>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4329,7 +4344,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Error loading wallet.dat</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Force safe mode (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4394,7 +4409,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation type="unfinished"></translation>
     </message>
@@ -4474,7 +4489,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="-108"/>
+        <location line="-110"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
@@ -4484,7 +4499,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot resolve -externalip address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+46"/>
+        <location line="+47"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
@@ -4499,17 +4514,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location line="-60"/>
+        <location line="-61"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location line="+61"/>
+        <location line="+62"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="-56"/>
+        <location line="-57"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
@@ -4519,17 +4534,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Bitcoin Alert&quot; admin@foo.
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location line="+72"/>
+        <location line="+74"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location line="-59"/>
+        <location line="-61"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location line="+8"/>
+        <location line="+9"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 5189310e649a..e89eea4bf4e4 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1,10 +1,6 @@
 <TS language="eo" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Duoble-klaku por redakti adreson aŭ etikedon</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Krei novan adreson</translation>
@@ -89,6 +85,10 @@
         <source>Comma separated file (*.csv)</source>
         <translation>Perkome disigita dosiero (*.csv)</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>ekspotado malsukcesinta</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
@@ -282,6 +282,10 @@
         <source>Open &amp;URI...</source>
         <translation>Malfermi &amp;URI-on...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>kliento de bitmon-kerno</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importado de blokoj el disko...</translation>
@@ -422,6 +426,10 @@
         <source>%1 and %2</source>
         <translation>%1 kaj %2</translation>
     </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n jaro</numerusform><numerusform>%n jaroj</numerusform></translation>
+    </message>
     <message>
         <source>%1 behind</source>
         <translation>mankas %1</translation>
@@ -2079,6 +2087,10 @@ Adreso: %4
         <source>Show transaction details</source>
         <translation>Montri detalojn de transakcio</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>ekspotado malsukcesinta</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Perkome disigita dosiero (*.csv)</translation>
@@ -2190,42 +2202,10 @@ Adreso: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Akcepti konektojn el ekstere (defaŭlte: 1 se ne estas -proxy nek -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, vi devas specifi rpcpassword en la konfigura dosiero:
-%s
-Estas konsilinde uzi tiun ĉi aleatore kreitan pasvorton:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(ne utilas al vi memorigi tiun ĉi pasvorton)
-La salutnomo kaj la pasvorto estu nepre MALSAMAJ.
-Se la dosiero ne ekzistas, kreu ĝin kun permeso "nur posedanto rajtas legi".
-Estas konsilinde ankaŭ agordi alertnotify por ke vi ricevu avertojn pri eventualaj problemoj;
-ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bindi al donita adreso kaj ĉiam aŭskulti per ĝi. Uzu la formaton [gastigo]:pordo por IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Eraro: la transakcio estas rifuzita. Tio povas okazi se iom da Bitmono en via monujo jam elspeziĝis (ekz. se vi uzis kopion de wallet.dat kies Bitmono jam elspeziĝis, sed ne estis markita kiel elspezita ĉi tie).</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Eraro: tiu ĉi transakcio bezonas krompagon de almenaŭ %s pro la sumo, la komplekseco, aŭ la uzo de ĵus ricevita mono!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Plenumi komandon kiam monuja transakcio ŝanĝiĝas (%s en cmd anstataŭiĝas per TxID)</translation>
@@ -2302,10 +2282,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Eraro: restas malmulte da diskospaco!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Eraro: monujo ŝlosita, ne eblas krei transakcion!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ne sukcesis aŭskulti ajnan pordon. Uzu -listen=0 se tion vi volas.</translation>
@@ -2382,6 +2358,10 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Subskriba transakcio fiaskis</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>ĝi estas eksperimenta programo</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Transakcia sumo tro malgranda</translation>
@@ -2474,10 +2454,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nevalida sumo por -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Nevalida sumo</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nesufiĉa mono</translation>
@@ -2510,10 +2486,6 @@ ekzemple: alertnotify=echo %%s | mail -s "Averto de Bitmono" admin@foo.com
         <source>Done loading</source>
         <translation>Ŝargado finiĝis</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Por uzi la agordon %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Eraro</translation>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index aa008ad18c4c..ed1d08d35c94 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Haga doble clic para editar la dirección o etiqueta </translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Haz-clic para editar la dirección o etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -35,7 +35,7 @@
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exportar a un archivo los datos de esta pestaña</translation>
+        <translation>Exportar los datos en la ficha actual a un archivo</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -47,11 +47,11 @@
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Escoja la dirección a la que enviar bitcoins</translation>
+        <translation>Elije la dirección para enviar monedas a</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Escoja la dirección de la que recibir bitcoins</translation>
+        <translation>Elije la dirección para recibir monedas con</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -67,11 +67,11 @@
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Estas son sus direcciones Bitcoin para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de enviar bitcoins.</translation>
+        <translation>Estas son tus direcciones Bitcoin para enviar los pagos. Comprueba siempre la cantidad y la dirección receptora antes de enviar las monedas.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Estas son sus direcciones de Bitcoin para recibir pagos. Se recomienda utilizar una nueva dirección de recepción para cada transacción.</translation>
+        <translation>Estas son tus direcciones de Bitcoin para recibir los pagos. Se recomienda utilizar una nueva dirección de recepción para cada transacción.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -87,17 +87,13 @@
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Archivos de columnas separadas por coma (*.csv)</translation>
+        <translation>Archivos separados por coma (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>Error exportando</translation>
+        <translation>Fallo al exportar</translation>
     </message>
-    <message>
-        <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation>Se ha producido un error al intentar guardar la lista de direcciones en %1. Por favor vuelva a intentarlo.</translation>
-    </message>
-</context>
+    </context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -157,7 +153,7 @@
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Introduzca la contraseña anterior del monedero y la nueva. </translation>
+        <translation>Introduce la antigua y la nueva contraseña a el monedero.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
@@ -169,7 +165,7 @@
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>¿Seguro que desea cifrar su monedero?</translation>
+        <translation>¿Estás seguro que deseas cifrar tu monedero ?</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>
@@ -177,7 +173,7 @@
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>Aviso: ¡La tecla de bloqueo de mayúsculas está activada!</translation>
+        <translation>Aviso: ¡La tecla de Mayúsculas está activada!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
@@ -1288,6 +1284,14 @@ Dirección: %4
         <source>Refund from %1</source>
         <translation>Devolución desde %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation> Petición pago %2 es demasiado grande ( %3 bytes , permitió %4 bytes ) .</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation> Solicitud pago de protección DoS</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Error en la comunicación con %1: %2</translation>
@@ -1860,14 +1864,30 @@ Dirección: %4
         <source>Minimize</source>
         <translation>Minimizar</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la tarifa de aduana se establece en 1000 satoshis y la transacción está a disponible a solo  250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "por lo menos" paga 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>por kilobyte</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la tarifa de aduana se establece en 1000 satoshis y la transacción está a sólo 250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "el mínimo total" pagaría 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte</translation>
+    </message>
     <message>
         <source>total at least</source>
         <translation>total por lo menos</translation>
     </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Pagando solamente la cuota mínima es correcto, siempre y cuando haya menos volumen de transacciones que el espacio en los bloques. Pero tenga en cuenta que esto puede terminar en una transacción nunca confirmada, una vez que haya más demanda para transacciones Bitcoin que la red pueda procesar.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(leer la sugerencia)</translation>
+    </message>
     <message>
         <source>Recommended:</source>
         <translation>Recomendado:</translation>
@@ -1892,6 +1912,10 @@ Dirección: %4
         <source>fast</source>
         <translation>rápido</translation>
     </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Enviar transacción, si es posible, sin comisión</translation>
+    </message>
     <message>
         <source>(confirmation may take longer)</source>
         <translation>(confirmación puede tardar más tiempo)</translation>
@@ -2786,30 +2810,6 @@ Dirección: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
-%s
-Se recomienda utilizar la siguiente contraseña aleatoria:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(no es necesario recordar esta contraseña)
-El nombre de usuario y la contraseña DEBEN NO ser iguales.
-Si el archivo no existe, créelo con permisos de archivo de solo lectura.
-Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
-Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
@@ -2826,14 +2826,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ingresar en el modo de prueba de regresión, que utiliza una cadena especial en la que los bloques se pueden resolver instantáneamente.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunos de los bitcoins del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado bitcoins a partir de la copia, con lo que no se habrían marcado aquí como gastados.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>¡Error: Esta transacción requiere una comisión de al menos %s debido a su cantidad, complejidad, o al uso de fondos recién recibidos!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
@@ -2946,10 +2938,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Error: ¡Espacio en disco bajo!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
@@ -3074,6 +3062,14 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Tarifas (en BTC/Kb) más pequeños que esto se consideran cero cuota para la creación de la transacción (por defecto: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si el pago de comisión no está establecido, incluir la cuota suficiente para que las transacciones comiencen la confirmación en una media de n bloques ( por defecto :%u)</translation>
+    </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>El tamaño máximo de los datos en las operaciones de transporte de datos que transmitimos y el mio (default: %u)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta de direcciones pares mediante búsqueda de DNS, si bajo en direcciones (por defecto: 1 a menos que - conectar)</translation>
@@ -3082,10 +3078,42 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Ajuste el número de hilos para la generación de moneda si está habilitado  (-1 = all cores, default: %d)</translation>
+    </message>
     <message>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Este producto incluye software desarrollado por el OpenSSL Project para su uso en OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, software de cifrado escrito por Eric Young y software UPnP escrito por Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Para utilizar bitcoind, o la -opción servidor a bitcoin-qt, debes establecer una rpcpassword en el fichero de configuración:
+%s
+Se recomienda utilizar la siguiente contraseña aleatoria:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(no es necesario que recuerdes esta contraseña)
+El nombre de usuario y contraseña NO DEBEN ser la misma.
+Si no existe el archivo, crearlo con los permisos de archivos de propietarios de -sólo lectura-.
+También se recomienda establecer una notificación de alerta para ser notificado de problemas;
+por ejemplo: alertnotify=echo %% s | correo -s "Alerta Bitcoin" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Advertencia: ¡-maxtxfee se establece muy alta! Esta gran tarifa podría ser pagada en una sola transacción .</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>Aviso: ¡Comprueba la fecha y hora de tu ordenador y verifica si es correcta! Si no es correcta Bitcoin Core no funcionará adecuadamente.</translation>
@@ -3094,6 +3122,14 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>A los equipos en lista blanca no se les pueden prohibir los ataques DoS y sus transacciones siempre son retransmitidas, incluso si ya están en el mempool, es útil por ejemplo para un gateway.</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Aceptar solicitudes públicas en FERIADOS (por defecto: %u)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>No se puede resolver -whitebind address: '%s'</translation>
+    </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
         <translation>Conectar usando SOCKS5 proxy</translation>
@@ -3102,6 +3138,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
         <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
     </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>No se pudo analizar -rpcbind valor%s como dirección de red</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin Core</translation>
@@ -3122,6 +3162,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>La inicialización de la verificación de validez falló. Se está apagando Bitcoin Core.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Monto inválido para -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -3138,10 +3182,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Máscara de red inválida especificada en -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Mantener como máximo &lt;n&gt; bloques no conectables en memoria (por defecto: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Mantener como máximo &lt;n&gt; transacciones no conectables en memoria (por defecto: %u)</translation>
@@ -3154,10 +3194,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Opciones de nodos de retransmisión:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimir bloque al iniciar, si se encuentra en el índice de bloques</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opciones SSL de RPC: (véase la wiki de Bitcoin para las instrucciones de instalación de SSL)</translation>
@@ -3206,6 +3242,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Las cantidades en las transacciones deben ser positivas</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Operación demasiado grande para la política de tasas</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transacción demasiado grande</translation>
@@ -3235,6 +3275,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Advertencia: Argumento no soportado -benchmark ignored, use -debug=bench.</translation>
+    </message>
     <message>
         <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
         <translation>Aviso: Argumento no sportado -debugnet anticuado, utilice -debug=net.</translation>
@@ -3290,6 +3334,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error al cargar wallet.dat: el monedero está dañado</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</translation>
+    </message>
     <message>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
         <translation>Volcar la actividad de la base de datos de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: %u)</translation>
@@ -3390,14 +3438,14 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Anteponer marca temporal a la información de depuración (por defecto: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Imprimir árbol de bloques al iniciar (predeterminado: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Retransmitir y minar transacciones de transporte de datos (por defecto: %u)</translation>
     </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Relay non-P2SH multisig (default: %u)</translation>
+    </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Ejecutar un hilo para limpiar de la memoria el monedero periódicamente (predeterminado:  %u)</translation>
@@ -3466,10 +3514,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Cuantía no válida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fondos insuficientes</translation>
@@ -3502,10 +3546,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Se terminó de cargar</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para utilizar la opción %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index e6f81e650f0c..d6451185a42b 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -2,25 +2,45 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Haz doble clic para editar una dirección o etiqueta</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Haga clic para editar la dirección o etiqueta</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Crea una nueva dirección</translation>
+        <translation>Crea una nueva direCrea una nueva direccióncción</translation>
+    </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>y nueva</translation>
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copia la dirección seleccionada al portapapeles</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>y copiar</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>C y perder</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copia dirección</translation>
     </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Eliminar la dirección seleccionada de la lista</translation>
+    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar los datos de la pestaña actual a un archivo</translation>
     </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>y exportar</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Borrar</translation>
@@ -210,6 +230,14 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Cambiar la contraseña...</translation>
     </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Abrir y url...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>cliente bitcoin core</translation>
+    </message>
     <message>
         <source>Reindexing blocks on disk...</source>
         <translation>Cargando el index de bloques...</translation>
@@ -250,6 +278,10 @@
         <source>&amp;Send</source>
         <translation>&amp;Envía</translation>
     </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>y recibir</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostrar/Ocultar</translation>
@@ -274,6 +306,10 @@
         <source>Tabs toolbar</source>
         <translation>Barra de pestañas</translation>
     </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>bitcoin core</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n conexión activa hacia la red Bitcoin</numerusform><numerusform>%n conexiones activas hacia la red Bitcoin</numerusform></translation>
@@ -363,6 +399,10 @@ Dirección: %4</translation>
         <source>Confirmed</source>
         <translation>Confirmado</translation>
     </message>
+    <message>
+        <source>Priority</source>
+        <translation>prioridad</translation>
+    </message>
     <message>
         <source>Copy address</source>
         <translation>Copia dirección</translation>
@@ -375,6 +415,18 @@ Dirección: %4</translation>
         <source>Copy amount</source>
         <translation>Copiar Cantidad</translation>
     </message>
+    <message>
+        <source>medium</source>
+        <translation>medio</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>si</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>no</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
@@ -436,6 +488,10 @@ Dirección: %4</translation>
     </context>
 <context>
     <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>bitcoin core</translation>
+    </message>
     <message>
         <source>version</source>
         <translation>versión</translation>
@@ -456,6 +512,14 @@ Dirección: %4</translation>
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>bienvenido</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>bitcoin core</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
@@ -463,6 +527,10 @@ Dirección: %4</translation>
     </context>
 <context>
     <name>OpenURIDialog</name>
+    <message>
+        <source>URI:</source>
+        <translation>url:</translation>
+    </message>
     </context>
 <context>
     <name>OptionsDialog</name>
@@ -490,6 +558,10 @@ Dirección: %4</translation>
         <source>&amp;Network</source>
         <translation>&amp;Red</translation>
     </message>
+    <message>
+        <source>Expert</source>
+        <translation>experto</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>Abre automáticamente el puerto del cliente Bitcoin en el router. Esto funciona solo cuando tu router es compatible con UPnP y está habilitado.</translation>
@@ -510,6 +582,11 @@ Dirección: %4</translation>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Puerto del servidor proxy (ej. 9050)</translation>
     </message>
+    <message>
+        <source>&amp;Window</source>
+        <translation>y windows
+</translation>
+    </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Muestra solo un ícono en la bandeja después de minimizar la ventana</translation>
@@ -586,6 +663,10 @@ Dirección: %4</translation>
         <source>Amount</source>
         <translation>Cantidad</translation>
     </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>DESCONOCIDO</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/A</translation>
@@ -620,6 +701,10 @@ Dirección: %4</translation>
         <source>&amp;Information</source>
         <translation>&amp;Información</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>General</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Tiempo de inicio</translation>
@@ -640,6 +725,11 @@ Dirección: %4</translation>
         <source>Block chain</source>
         <translation>Bloquea cadena</translation>
     </message>
+    <message>
+        <source>Version</source>
+        <translation>version
+</translation>
+    </message>
     <message>
         <source>&amp;Open</source>
         <translation>&amp;Abrir</translation>
@@ -908,6 +998,10 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>bitcoin core</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[red-de-pruebas]</translation>
@@ -1235,6 +1329,10 @@ Dirección: %4</translation>
 </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>y exportar</translation>
+    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar los datos de la pestaña actual a un archivo</translation>
@@ -1378,10 +1476,6 @@ Dirección: %4</translation>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Cantidad inválida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fondos insuficientes</translation>
@@ -1406,10 +1500,6 @@ Dirección: %4</translation>
         <source>Done loading</source>
         <translation>Carga completa</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para utilizar la opción %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 2e5daf4cdb4e..9a8e3d593807 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -1,10 +1,6 @@
 <TS language="es_DO" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Haga doble clic para editar una dirección o etiqueta</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crear una nueva dirección</translation>
@@ -2230,42 +2226,10 @@ Dirección: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
-%s
-Se recomienda utilizar la siguiente contraseña aleatoria:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(no es necesario recordar esta contraseña)
-El nombre de usuario y la contraseña DEBEN NO ser iguales.
-Si el archivo no existe, créelo con permisos de archivo de solo lectura.
-Se recomienda también establecer alertnotify para recibir notificaciones de problemas.
-Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunas de las monedas del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado monedas a partir de la copia, con lo que no se habrían marcado aquí como gastadas.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>¡Error: Esta transacción requiere una comisión de al menos %s debido a su monto, complejidad, o al uso de fondos recién recibidos!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
@@ -2342,10 +2306,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Error: ¡Espacio en disco bajo!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
@@ -2418,10 +2378,26 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Inválido por el monto -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>Opciones RPC SSL: (Vea la Wiki de Bitcoin para las instrucciones de la configuración de SSL)</translation>
+    </message>
+    <message>
+        <source>RPC server options:</source>
+        <translation>Opciones del sservidor RPC:</translation>
+    </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Descartar aleatoriamente 1 de cada &lt;n&gt; mensajes de red</translation>
+    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
     </message>
+    <message>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Mostrar todas las opciones de depuración (uso: --help -help-debug)</translation>
+    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
@@ -2459,6 +2435,10 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versión es obsoleta, actualización necesaria!</translation>
     </message>
+    <message>
+        <source>on startup</source>
+        <translation>al iniciar</translation>
+    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
@@ -2526,10 +2506,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Cuantía no válida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fondos insuficientes</translation>
@@ -2562,10 +2538,6 @@ Por ejemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Generado pero no aceptado</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para utilizar la opción %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index bedc5d243e09..1f1d712da49f 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -1,10 +1,6 @@
 <TS language="es_MX" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Haga doble clic para editar el domicilio o la etiqueta</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crear una dirección nueva</translation>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index a5a1583b19c9..31107444f472 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -1,10 +1,6 @@
 <TS language="es_UY" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Doble clic para editar etiqueta o dirección </translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crear una nueva dirección </translation>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 801fcf6258e0..ee50226abb0c 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1,10 +1,6 @@
 <TS language="et" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Topeltklõps aadressi või märgise muutmiseks</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Loo uus aadress</translation>
@@ -13,6 +9,10 @@
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopeeri märgistatud aadress vahemällu</translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Kopeeri</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Aadressi kopeerimine</translation>
@@ -496,6 +496,10 @@ Aadress: %4⏎</translation>
         <source>version</source>
         <translation>versioon</translation>
     </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Kirjeldus Bitcoini Tuumast</translation>
+    </message>
     <message>
         <source>Command-line options</source>
         <translation>Käsurea valikud</translation>
@@ -1087,6 +1091,10 @@ Aadress: %4⏎</translation>
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
     </message>
+    <message>
+        <source>The Bitcoin Core developers</source>
+        <translation>Bitcoini Tuuma arendajad</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
@@ -1497,42 +1505,10 @@ Aadress: %4⏎</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Luba välisühendusi (vaikeväärtus: 1 kui puudub -proxy või -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, sul tuleb rpcpassword määrata seadete failis:
-%s
-Soovitatav on kasutada järgmist juhuslikku parooli:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(seda parooli ei pea meeles pidama)
-Kasutajanimi ning parool EI TOHI kattuda.
-Kui faili ei leita, loo see ainult-omaniku-loetavas failiõigustes .
-Soovitatav on seadistada tõrgete puhul teavitus;
-nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Määratud aadressiga sidumine ning sellelt kuulamine. IPv6 jaoks kasuta vormingut [host]:port</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Tõrge: Tehingust keelduti! Põhjuseks võib olla juba kulutatud mündid, nt kui wallet.dat fail koopias kulutatid mündid, kuid ei märgitud neid siin vastavalt.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Tõrge: Selle tehingu jaoks on nõutav lisatasu vähemalt %s. Põhjuseks võib olla summa suurus, keerukus või hiljuti saadud summade kasutamine!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Käivita käsklus, kui rahakoti tehing muutub (%s cmd's muudetakse TxID'ks)</translation>
@@ -1597,10 +1573,6 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Tõrge: liiga vähe kettaruumi!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Tõrge: Rahakott on lukus, tehingu loomine ei ole võimalik!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Pordi kuulamine nurjus. Soovikorral kasuta -listen=0.</translation>
@@ -1713,10 +1685,6 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-paytxfee=&lt;amount&gt; jaoks vigane kogus: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Kehtetu summa</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Liiga suur summa</translation>
@@ -1749,10 +1717,6 @@ nt: alertnotify=echo %%s | email -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Laetud</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s valiku kasutamine</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Tõrge</translation>
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index ea0ce1a67d3e..72118102daa7 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -1,10 +1,6 @@
 <TS language="eu_ES" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Klik bikoitza helbidea edo etiketa editatzeko</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Sortu helbide berria</translation>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 475515f4b72d..3fbf558770b2 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1,10 +1,6 @@
 <TS language="fa" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>برای ویرایش نشانی یا برچسب دوبار کلیک کنید</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>ایجاد نشانی جدید</translation>
@@ -1638,14 +1634,6 @@ Address: %4
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>مقید به نشانی داده شده باشید و همیشه از آن پیروی کنید. از نشانه گذاری استاندار IPv6 به صورت Host]:Port] استفاده کنید.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>تراکنش پذیرفته نیست! این خطا ممکن است در حالتی رخ داده باشد که مقداری از سکه های شما در کیف پولتان از جایی دیگر، همانند یک کپی از کیف پول اصلی اتان، خرج شده باشد اما در کیف پول اصلی اتان به عنوان مبلغ خرج شده، نشانه گذاری نشده باشد.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>خطا: این تراکنش به علت میزان وجه، دشواری، و یا استفاده از وجوه دریافتی اخیر نیازمند کارمزد به مبلغ حداقل %s است.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>هنگامی که یک تراکنش در کیف پولی رخ می دهد، دستور را اجرا کن(%s در دستورات بوسیله ی TxID جایگزین می شود)</translation>
@@ -1790,10 +1778,6 @@ Address: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>میزان وجه اشتباه برای paytxfee=&lt;میزان وجه&gt;: %s</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>میزان وجه اشتباه</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>بود جه نا کافی </translation>
@@ -1826,10 +1810,6 @@ Address: %4
         <source>Done loading</source>
         <translation>بار گیری انجام شده است</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>برای استفاده از %s از انتخابات</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطا</translation>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 1a639a859200..f0e6770edc76 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1,14 +1,14 @@
 <TS language="fa_IR" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>برای ویرایش حساب و یا برچسب دوبار کلیک نمایید</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>گشایش حسابی جدید</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>جدید</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>کپی کردن حساب انتخاب شده به حافظه سیستم - کلیپ بورد</translation>
@@ -985,10 +985,6 @@ Address: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>میزان اشتباه است for -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>میزان اشتباه است</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>وجوه ناکافی</translation>
@@ -1021,10 +1017,6 @@ Address: %4
         <source>Done loading</source>
         <translation>اتمام لود شدن</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>برای استفاده از %s  از اختیارات</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>خطا</translation>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 9a2eadd6ea28..f7e6a8ccf72d 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Kaksoisnapauta muokataksesi osoitetta tai nimeä</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Klikkaa hiiren oikealla painikkeella muokataksesi osoitetta tai nimikettä</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -23,7 +23,7 @@
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation>&amp;Sulje</translation>
+        <translation>S&amp;ulje</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -39,7 +39,7 @@
     </message>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Vie...</translation>
+        <translation>&amp;Vie</translation>
     </message>
     <message>
         <source>&amp;Delete</source>
@@ -47,15 +47,15 @@
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Valitse osoite johon lähetetään kolikoita</translation>
+        <translation>Valitse osoite johon kolikot lähetetään</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Valitse osoite jolla vastaanotetaan kolikoita</translation>
+        <translation>Valitse osoite johon vastaanotetaan kolikoita</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation>&amp;Valitse</translation>
+        <translation>V&amp;alitse</translation>
     </message>
     <message>
         <source>Sending addresses</source>
@@ -75,7 +75,7 @@
     </message>
     <message>
         <source>Copy &amp;Label</source>
-        <translation>Kopioi &amp;Nimi</translation>
+        <translation>Kopioi &amp;nimike</translation>
     </message>
     <message>
         <source>&amp;Edit</source>
@@ -110,14 +110,14 @@
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(ei nimeä)</translation>
+        <translation>(ei nimikettä)</translation>
     </message>
 </context>
 <context>
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Tunnuslauseen Dialogi</translation>
+        <translation>Tunnuslauseen tekstinsyöttökenttä</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
@@ -129,7 +129,7 @@
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Kirjoita uusi tunnuslause uudelleen</translation>
+        <translation>Toista uusi tunnuslause</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Rahansiirtohistoria on ajan tasalla</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Käsitelty %n lohko rahansiirtohistoriasta.</numerusform><numerusform>Käsitelty %n lohkoa rahansiirtohistoriasta.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Saavutetaan verkkoa...</translation>
@@ -519,6 +523,10 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Kolikoiden valinta</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Määrä:</translation>
@@ -567,6 +575,14 @@ Osoite: %4</translation>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Vastaanotettu nimikkeellä</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Vastaanotettu osoitteella</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Aika</translation>
@@ -899,7 +915,15 @@ Osoite: %4</translation>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n Gt vapaata tilaa käytettävissä</numerusform><numerusform>%n Gt vapaata tilaa käytettävissä</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(%n Gt tarvittavasta tilasta)</numerusform><numerusform>(%n Gt tarvittavasta tilasta)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -1021,6 +1045,14 @@ Osoite: %4</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Portin uudelleenohjaus &amp;UPnP:llä</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Yhdistä Bitcoin-verkkoon SOCKS5-välityspalvelimen kautta.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Yhdistä SOCKS5-välityspalvelimen kautta (oletus välityspalvelin):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxyn &amp;IP:</translation>
@@ -1152,6 +1184,10 @@ Osoite: %4</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Louhittu saldo, joka ei ole vielä kypsynyt</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Saldot</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Yhteensä:</translation>
@@ -1164,6 +1200,22 @@ Osoite: %4</translation>
         <source>Your current balance in watch-only addresses</source>
         <translation>Nykyinen tase seurantaosoitetteissa</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Käytettävissä:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Viimeisimmät rahansiirrot</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Vahvistamattomat rahansiirrot vain katseltaviin osoitteisiin</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Louhittu, ei vielä kypsynyt saldo vain katseltavissa osoitteissa</translation>
+    </message>
     <message>
         <source>Current total balance in watch-only addresses</source>
         <translation>Nykyinen tase seurantaosoitetteissa</translation>
@@ -1187,10 +1239,18 @@ Osoite: %4</translation>
         <source>Payment request rejected</source>
         <translation>Maksupyyntö hylätty</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Maksypyyntö verkossa ei täsmää asiakasohjelman verkkoon.</translation>
+    </message>
     <message>
         <source>Payment request has expired.</source>
         <translation>Maksupyyntö on vanhentunut.</translation>
     </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Maksupyyntöä ei ole alustettu.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Maksupyyntö %1 on liian pieni (huomioidaan tomuna).</translation>
@@ -1223,6 +1283,10 @@ Osoite: %4</translation>
         <source>Refund from %1</source>
         <translation>Maksupalautus %1:sta</translation>
     </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Maksupyynnön DoS-suojaus</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Virhe kommunikoidessa %1n kanssa: %2</translation>
@@ -1246,13 +1310,25 @@ Osoite: %4</translation>
         <source>User Agent</source>
         <translation>Käyttöliittymä</translation>
     </message>
-    </context>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Osoite/Isäntänimi</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Vasteaika</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Syötä Bitcoin-osoite (esim. %1)</translation>
+    </message>
     <message>
         <source>%1 d</source>
         <translation>%1 d</translation>
@@ -1269,6 +1345,18 @@ Osoite: %4</translation>
         <source>%1 s</source>
         <translation>%1 s</translation>
     </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>VERKKO</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>TUNNISTAMATON</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Ei yhtään</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>Ei saatavilla</translation>
@@ -1327,6 +1415,10 @@ Osoite: %4</translation>
         <source>Using OpenSSL version</source>
         <translation>Käytössä oleva OpenSSL-versio</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Käyttää BerkeleyDB-versiota</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Käynnistysaika</translation>
@@ -1359,6 +1451,18 @@ Osoite: %4</translation>
         <source>Sent</source>
         <translation>Lähetetyt</translation>
     </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Vertaiset</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Valitse vertainen eriteltyjä tietoja varten.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Suunta</translation>
+    </message>
     <message>
         <source>Version</source>
         <translation>Versio</translation>
@@ -1367,6 +1471,46 @@ Osoite: %4</translation>
         <source>User Agent</source>
         <translation>Käyttöliittymä</translation>
     </message>
+    <message>
+        <source>Services</source>
+        <translation>Palvelut</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Aloituskorkeus</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Synkronointikorkeus</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Panna-pisteytys</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Yhteysaika</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Viimeisin lähetetty</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Viimeisin vastaanotettu</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Tavua lähetetty</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Tavua vastaanotettu</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Vasteaika</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Viimeisimmän lohkon aika</translation>
@@ -1443,11 +1587,31 @@ Osoite: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
+    <message>
+        <source>via %1</source>
+        <translation>%1 kautta</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>ei koskaan</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Sisääntuleva</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Ulosmenevä</translation>
+    </message>
     <message>
         <source>Unknown</source>
         <translation>Tuntematon</translation>
     </message>
-    </context>
+    <message>
+        <source>Fetching...</source>
+        <translation>Hankitaan...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1675,6 +1839,62 @@ Osoite: %4</translation>
         <source>Custom change address</source>
         <translation>Kustomoitu vaihtorahan osoite</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Rahansiirtokulu:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Valitse...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>pudota kulujen asetukset</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Pienennä</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilotavu</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>yhteensä ainakin</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(lue työkaluvinkki)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Suositeltu:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Muokattu:</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Vahvistusaika:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normaali</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>nopea</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Lähetä siirtokuluttomana jos mahdollista</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(vahvistaminen voi viedä kauemmin)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Lähetä usealla vastaanottajalle samanaikaisesti</translation>
@@ -1779,6 +1999,10 @@ Osoite: %4</translation>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Rahansiirto hylättiin! Tämä saattaa tapahtua jos lompakossa olevat kolikot on jo kulutettu, kuten jos käytät kopioita wallet.dat tiedostosta ja kolikot oli jos käytetty mutta ei merkattu täällä.</translation>
     </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Maksa vain vähimmäiskulu %1</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Varoitus: Virheellinen Bitcoin osoite</translation>
@@ -1830,6 +2054,10 @@ Osoite: %4</translation>
         <source>This is a normal payment.</source>
         <translation>Tämä on normaali maksu.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Bitcoin-osoite johon maksu lähetetään</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1900,6 +2128,10 @@ Osoite: %4</translation>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Voit allekirjoittaa viestit omalla osoitteellasi todistaaksesi että omistat ne. Ole huolellinen, että et allekirjoita mitään epämääräistä, phishing-hyökkääjät voivat huijata sinua allekirjoittamaan luovuttamalla henkilöllisyytesi. Allekirjoita selvitys täysin yksityiskohtaisesti mihin olet sitoutunut.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Bitcoin-osoite jolla viesti allekirjoitetaan</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Valitse aikaisemmin käytetty osoite</translation>
@@ -1952,6 +2184,10 @@ Osoite: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Syötä allekirjoittava osoite, viesti ja allekirjoitus alla oleviin kenttiin varmistaaksesi allekirjoituksen aitouden. Varmista että kopioit kaikki kentät täsmälleen oikein, myös rivinvaihdot, välilyönnit, tabulaattorit, jne.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Bitcoin-osoite jolla viesti on allekirjoitettu</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Tarkista viestin allekirjoitus varmistaaksesi, että se allekirjoitettiin tietyllä Bitcoin-osoitteella</translation>
@@ -2093,6 +2329,10 @@ Osoite: %4</translation>
         <source>own address</source>
         <translation>oma osoite</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>vain katseltava</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>nimi</translation>
@@ -2113,6 +2353,14 @@ Osoite: %4</translation>
         <source>Debit</source>
         <translation>Debit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Yhteensä debit</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Yhteensä credit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Maksukulu</translation>
@@ -2263,6 +2511,10 @@ Osoite: %4</translation>
         <source>Mined</source>
         <translation>Louhittu</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>vain katseltava</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(ei saatavilla)</translation>
@@ -2374,6 +2626,10 @@ Osoite: %4</translation>
         <source>Export Transaction History</source>
         <translation>Vie rahansiirtohistoria</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Vain katseltava</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>Vienti epäonnistui</translation>
@@ -2429,7 +2685,11 @@ Osoite: %4</translation>
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Yksikkö jossa määrät näytetään. Klikkaa valitaksesi toisen yksikön.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2513,30 +2773,6 @@ Osoite: %4</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Hyväksy yhteyksiä ulkopuolelta (vakioasetus: 1 jos -proxy tai -connect ei määritelty)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, sinun tulee asettaa rpcpassword asetustietostossa:
-%s
-Suositellaan että käytät allaolevaa satunnaista salasanaa:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(sinun ei tarvitse muistaa tätä salasanaa)
-Tämän tunnuksen ja salasanan TULEE OLLA sama.
-Jos tiedostoa ei ole, luo se vain omistajan-luku-oikeudella.
-Suositellaan asettaa alertnotify jotta saat tietoa ongelmista;
-esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle.</translation>
@@ -2545,14 +2781,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Aloita regression testimoodi joka käyttää erikoisketjua jossa lohkoja voidaan ratkaista välittömästi.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Virhe: Rahansiirto hylättiin! Tämä saattaa tapahtua jos jotkut kolikot lompakossa on jo käytetty. Esimerkiksi jos kopioit wallet.dat tiedoston ja kolikot on käytetty mutta ei merkattu täällä.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Virhe: Tämä rahansiirto vaatii rahansiirtopalkkion vähintään %s johtuen sen määrästä, monimutkaisuudesta tai hiljattain vastaanotettujen summien käytöstä</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa)</translation>
@@ -2657,10 +2885,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Varoitus: Levytila on vähissä!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Virhe: Lompakko on lukittu, rahansiirtoa ei voida luoda</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ei onnistuttu kuuntelemaan missään portissa. Käytä -listen=0 jos haluat tätä.</translation>
@@ -2705,6 +2929,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Tämä on tarkoitettu regression testityökaluille ja ohjelman kehittämiseen.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Käytä UPnP:ta kuuntelevan portin kartoittamiseen (oletus: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Varmistetaan lohkoja...</translation>
@@ -2741,6 +2969,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Aseta maksimikoko korkea prioriteetti/pieni palkkio rahansiirtoihin tavuissa (oletus: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Aseta kolikoiden luomiseen tarkoitettujen säikeiden lukumäärä (-1 = kaikki ytimet, oletus: %d)</translation>
+    </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
         <translation>Yhdistä SOCKS5 proxin kautta</translation>
@@ -2766,8 +2998,8 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Tulosta lohko käynnistyksessä jos löydetään lohkoindeksistä</translation>
+        <source>Node relay options:</source>
+        <translation>Välityssolmukohdan asetukset:</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -2801,6 +3033,10 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Signing transaction failed</source>
         <translation>Siirron vahvistus epäonnistui</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Tämä on ohjelmistoa kokeelliseen käyttöön.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Siirtosumma liian pieni</translation>
@@ -2881,14 +3117,70 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Virhe ladattaessa wallet.dat-tiedostoa: Lompakko vioittunut</translation>
     </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(oletus: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Hyväksyttävät salaukset (oletus: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Virhe ladattaessa wallet.dat-tiedostoa</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Pakota yhteensopivuustila (oletus: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Luo kolikoita (oletus: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Kuinka monta lohkoa tarkistetaan käynnistyksessä (oletus: %u, 0 = kaikki)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Sisällytä IP-osoitteet virheenkorjauslokissa (oletus: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Virheellinen proxy-osoite '%s'</translation>
     </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Välitä ei-P2SH-multisig (oletus: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Palvelimen sertifikaattitiedosto (oletus: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Palvelimen private key (oletus: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Aseta avainaltaan kooksi &lt;n&gt; (oletus: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Aseta pienin mahdollinen lohkokoko tavuina (oletus: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Aseta RPC-kutsujen palvelemiseen tarkoitettujen säikeiden lukumäärä (oletus: %d)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Määritä asetustiedosto (oletus: %s)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Määritä pid-tiedosto (oletus: %s)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Tuntematon verkko -onlynet parametrina: '%s'</translation>
@@ -2905,10 +3197,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-paytxfee=&lt;amount&gt;: '%s' on virheellinen</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Virheellinen määrä</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Lompakon saldo ei riitä</translation>
@@ -2941,10 +3229,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Lataus on valmis</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Käytä %s optiota</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Virhe</translation>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index 71a151941119..612e7481289b 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Double cliquer afin de modifier l'adresse ou l'étiquette</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Cliquer à droite pour modifier l'adresse ou l'étiquette</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -300,7 +300,7 @@
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation>Importation des blocs depuis le disque...</translation>
+        <translation>Importation des blocs à partir du disque...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
@@ -1280,6 +1280,14 @@ Adresse : %4
         <source>Refund from %1</source>
         <translation>Remboursement de %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>La demande de paiement %2 est trop grande (%3 octets, %4 octets permis).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Protection DdS des demandes de paiement</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Erreur de communication avec %1 : %2</translation>
@@ -1566,7 +1574,7 @@ Adresse : %4
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Taper &lt;b&gt;help&lt;/b&gt; pour afficher une vue générale des commandes disponibles.</translation>
+        <translation>Taper &lt;b&gt;help&lt;/b&gt; pour afficher une vue générale des commandes proposées.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -2243,7 +2251,7 @@ Adresse : %4
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation>La clef privée pour l'adresse indiquée n'est pas disponible.</translation>
+        <translation>La clef privée n'est pas disponible pour l'adresse indiquée.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
@@ -2798,30 +2806,6 @@ Adresse : %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepter les connexions entrantes (par défaut : 1 si aucun -proxy ou -connect )</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, vous devez définir un mot de passe rpc dans le fichier de configuration : 
-%s
-Il vous est conseillé d'utiliser le mot de passe aléatoire suivant :
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(vous n'avez pas besoin de retenir ce mot de passe)
-Le nom d'utilisateur et le mot de passe NE DOIVENT PAS être identiques.
-Si le fichier n'existe pas, créez-le avec les droits de lecture accordés au propriétaire.
-Il est aussi conseillé de régler alertnotify pour être prévenu des problèmes ;
-par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6</translation>
@@ -2838,14 +2822,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Passer en mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs sont résolus instantanément.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erreur : La transaction a été rejetée ! Ceci peut arriver si certaines pièces de votre portefeuille étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et les pièces ont été dépensées avec cette copie sans être marquées comme tel ici.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erreur : cette transaction exige des frais de transaction d'au moins %s en raison de son montant, de sa complexité ou de l'utilisation de fonds reçus récemment !</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exécuter la commande lorsqu'une transaction de portefeuille change (%s dans la commande est remplacée par TxID)</translation>
@@ -2958,10 +2934,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Erreur : l'espace disque est faible !</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Erreur : Portefeuille verrouillé, impossible de créer la transaction !</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
@@ -2984,7 +2956,7 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation>Pas assez de descripteurs de fichiers de disponibles.</translation>
+        <translation>Pas assez de descripteurs de fichiers proposés.</translation>
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
@@ -3086,10 +3058,22 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Les frais (en BTC/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour la création de transactions (par défaut : %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si paytxfee n'est pas défini, inclure suffisamment de frais afin que les transactions commencent la confirmation en moyenne avant n blocs (par défaut : %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Montant invalide pour -maxtxfee=&lt;amount&gt; : « %s » (doit être au moins les frais minrelay de %s pour prévenir le blocage des transactions)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Quantité maximale de données dans les transactions du porteur de données que nous relayons et minons (par défaut : %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Total maximal des frais à utiliser en une seule transaction de portefeuille. Le définir trop bas pourrait empêcher les grosses transactions (par défaut : %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Demander les adresses des pairs par recherche DNS si l'on manque d'adresses (par défaut : 1 sauf si -connect)</translation>
@@ -3106,6 +3090,34 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL &lt;https://www.openssl.org/&gt; et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Pour utiliser bitcoind, ou l'option -server de bitcoin-qt, vous devez définir un mot de passe rpc dans le fichier de configuration :
+%s
+Il est recommandé d'utiliser le mot de passe aléatoire suivant :
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(vous n'avez pas à mémoriser ce mot de passe)
+Le nom d'utilisateur et le mot de passe NE DOIVENT PAS être identiques.
+Si le fichier n'existe pas, créez-le avec la permission lecture-seule-par-le-propriétaire.
+Il est aussi recommandé de définir alertnotify afin que les problèmes vous soient signalés ;
+par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Avertissement :-maxtxfee est défini très haut ! Des frais aussi élevés pourraient être payés sur une seule transaction.</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>Avertissement : veuillez vérifier que l'heure et la date de votre ordinateur sont correctes ! Si votre horloge n'est pas à l'heure, Bitcoin Core ne fonctionnera pas correctement.</translation>
@@ -3114,6 +3126,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Les pairs de la liste blanche ne peuvent pas être bannis DoS et leurs transactions sont toujours relayées, même si elles sont déjà dans le mempool, utile p. ex. pour une passerelle</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accepter les demandes REST publiques (par défaut : %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Impossible de résoudre l'adresse -whitebind : « %s »</translation>
@@ -3150,6 +3166,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>L'initialisation du test de cohérence a échoué. Bitcoin est en cours de fermeture. </translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Montant invalide pour -maxtxfee=&lt;amount&gt; : « %s »</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Montant invalide pour -minrelayfee=&lt;montant&gt; : « %s »</translation>
@@ -3166,10 +3186,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Masque réseau invalide spécifié dans -whitelist : « %s »</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Garder au plus &lt;n&gt; blocs non connectables en mémoire (par défaut : %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Garder au plus &lt;n&gt; transactions non connectables en mémoire (par défaut : %u)</translation>
@@ -3182,10 +3198,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Node relay options:</source>
         <translation>Options de relais du nœud :</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimer le bloc au démarrage s'il est trouvé dans l'index des blocs</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Options RPC SSL : (voir le wiki Bitcoin pour les instructions de configuration de SSL)</translation>
@@ -3234,6 +3246,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Les montants de transaction doivent être positifs</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>La transaction est trop grosse pour la politique de frais</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transaction trop volumineuse</translation>
@@ -3330,10 +3346,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Degré de profondeur de la vérification des blocs -checkblocks (0-4, par défaut : %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Si paytxfee n'est pas défini, inclure des frais suffisants afin que les transactions soient confirmées en moyenne en n blocs (par défaut : %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Lors du minage, journaliser la priorité des transactions et les frais par ko (par défaut : %u) </translation>
@@ -3426,10 +3438,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Ajouter l'horodatage au début de la sortie de débogage (par défaut : %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Imprimer l'arborescence des blocs au démarrage (par défaut : %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Relayer et miner les transactions du porteur de données (par défaut : %u)</translation>
@@ -3494,10 +3502,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s »</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Montant invalide</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fonds insuffisants</translation>
@@ -3530,10 +3534,6 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Done loading</source>
         <translation>Chargement terminé</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Pour utiliser l'option %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Erreur</translation>
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index eae0b00b76c0..c6b7dd7ffa8f 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -1,10 +1,6 @@
 <TS language="fr_CA" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Double-cliquez afin de modifier l'adress ou l'étiquette</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Créer une nouvelle adresse</translation>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 2252baec732b..cf16a129cafc 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1,10 +1,6 @@
 <TS language="gl" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Doble click para editar a dirección ou a etiqueta</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crear unha nova dirección</translation>
@@ -2062,42 +2058,10 @@ Dirección: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceptar conexións de fóra (por defecto: 1 se non -proxy ou -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, debes fixar unha rpcpassword no arquivo de configuración:
-%s
-Reoméndase usar o seguinte contrasinal aleatorio:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(non precisas lembrar este contrasinal)
-O nome do usuario e o contrasinal DEBEN NON ser o mesmo.
-Se o arquivo non existe, debes crealo con permisos de so lectura para o propietario.
-Tamén é recomendable fixar alertnotify de modo que recibas notificación dos problemas;
-por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Enlazar a unha dirección dada e escoitar sempre nela. Emprega a notación [host]:post para IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erro: A transacción foi rexeitada! Esto podería suceder se unha das moedas do teu moedeiro xa foi gastada, como se usas unha copia de wallet.dat e hai moedas que se gastaron na copia pero non foron marcadas como gastadas aquí.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erro: Esta transacción require unha tarifa de transacción de alomenos %s debido á súa cantidade, complexidade ou emprego de fondos recentemente recibidos!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando cando unha transacción do moedeiro cambia (%s no comando é substituído por TxID)</translation>
@@ -2174,10 +2138,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Erro: Espacio en disco escaso!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Erro: Moedeiro bloqueado, imposible crear transacción!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Fallou escoitar en calquera porto. Emprega -listen=0 se queres esto.</translation>
@@ -2342,10 +2302,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Cantidade inválida para -paytxfee=&lt;cantidade&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Cantidade inválida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fondos insuficientes</translation>
@@ -2378,10 +2334,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Carga completa</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Empregar a opción %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Erro</translation>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index b5470589860d..2aff8300fd6e 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1,10 +1,6 @@
 <TS language="he" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>לחיצה כפולה לעריכת כתובת או תווית</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>יצירת כתובת חדשה</translation>
@@ -2657,30 +2653,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>קבלת חיבורים מבחוץ (בררת מחדל: 1 ללא ‎-proxy או ‎-connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, עליך להגדיר את ססמת ה־RPC בקובץ התצורה:
- %s
-מומלץ להשתמש בססמה האקראית הבאה:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(אין צורך לזכור את הססמה)
-אסור ששם המשתמש והססמה יהיו זהים.
-אם הקובץ אינו קיים, יש ליצור אותו עם הרשאות קריאה לבעלים בלבד.
-כמו כן, מומלץ להגדיר את alertnotify כדי לקבל דיווח על תקלות;
-למשל: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com 
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>להתאגד לכתובת נתונה להאזין לה תמיד. יש להשתמש בצורה ‎[host]:port עבור IPv6.</translation>
@@ -2693,14 +2665,6 @@ rpcpassword=%s
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>כניסה למצב בדיקת נסיגה, שמשתמש בשרשרת מיוחדת בה ניתן לפתור את המקטעים במהירות.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>שגיאה: ההעברה נדחתה! מצב כזה עלול לקרות אם כמה מהמטבעות בארנק שלך כבר נוצלו, למשל אם השתמשת בעותק של wallet.dat ומטבעות נשלחו בעותק אך לא סומנו כמושקעות כאן.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>שגיאה: ההעברה הזאת דורשת עמלת פעולה של לפחות %s עקב הכמות, המורכבות או השימוש בכספים שהתקבלו לאחרונה!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>ביצוע פקודה כאשר העברה בארנק משתנה (%s ב־cmd יוחלף ב־TxID)</translation>
@@ -2797,10 +2761,6 @@ rpcpassword=%s
         <source>Error: Disk space is low!</source>
         <translation>שגיאה: מעט מקום פנוי בכונן!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>שגיאה: הארנק נעול, אין אפשרות ליצור העברה!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>האזנה נכשלה בכל פורט. השתמש ב- -listen=0 אם ברצונך בכך.</translation>
@@ -2945,10 +2905,6 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>אפשרויות ממסר מפרק:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>הצגת מקטע בהפעלה, אם נמצא במפתח המקטעים</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>אפשרויות RPC SSL: (נא לעיין בוויקי של ביטקוין לקבלת הנחיות על הגדרת SSL)</translation>
@@ -3093,10 +3049,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>כמות לא תקינה עבור ‎-paytxfee=&lt;amount&gt;‎:‏ '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>כמות לא תקינה</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>אין מספיק כספים</translation>
@@ -3129,10 +3081,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>טעינה הושלמה</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>שימוש באפשרות %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>שגיאה</translation>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index 09a8392c27ab..a0f52609a37a 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -1,10 +1,6 @@
 <TS language="hi_IN" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>दो बार क्लिक करे पता या लेबल संपादन करने के लिए !</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>नया पता लिखिए !</translation>
@@ -876,10 +872,6 @@ Address: %4
         <source>Loading addresses...</source>
         <translation>पता पुस्तक आ रही है...</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>राशि ग़लत है</translation>
-    </message>
     <message>
         <source>Loading block index...</source>
         <translation>ब्लॉक इंडेक्स आ रहा है...</translation>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index 22831a0fd5aa..d751c763de3a 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1,10 +1,6 @@
 <TS language="hr" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dvostruki klik za uređivanje adrese ili oznake</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Dodajte novu adresu</translation>
@@ -1502,10 +1498,6 @@ Adresa:%4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nevaljali iznos za opciju -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Nevaljali iznos za opciju</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nedovoljna sredstva</translation>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 810954240593..1f9f252106c8 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dupla-kattintás a cím vagy címke szerkesztéséhez</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>A cím vagy címke szerkeszteséhez kattintson a jobb gombbal</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -869,10 +869,22 @@ Cím: %4
         <source>Welcome to Bitcoin Core.</source>
         <translation>Üdvözlünk a Bitcoin Core-ban.</translation>
     </message>
+    <message>
+        <source>Use the default data directory</source>
+        <translation>Az alapértelmezett adat könyvtár használata</translation>
+    </message>
+    <message>
+        <source>Use a custom data directory:</source>
+        <translation>Saját adatkönyvtár használata:</translation>
+    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Hiba: A megadott "%1" adatkönyvtár nem hozható létre. </translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Hiba</translation>
@@ -896,7 +908,11 @@ Cím: %4
         <source>Select payment request file</source>
         <translation>Fizetési kérelmi fájl kiválasztása</translation>
     </message>
-    </context>
+    <message>
+        <source>Select payment request file to open</source>
+        <translation>Fizetés kérelmi fájl kiválasztása</translation>
+    </message>
+</context>
 <context>
     <name>OptionsDialog</name>
     <message>
@@ -919,6 +935,18 @@ Cím: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Külső kapcsolatok elfogadása</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Bejövő kapcsolatok engedélyezése</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>A proxy IP címe (pl.: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Minden kliensbeállítás alapértelmezettre állítása.</translation>
@@ -1011,6 +1039,10 @@ Cím: %4
         <source>Confirm options reset</source>
         <translation>Beállítások törlésének jóváhagyása.</translation>
     </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>A változtatások aktiválásahoz újra kell indítani a klienst.</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>A megadott proxy cím nem érvényes.</translation>
@@ -1058,6 +1090,14 @@ Cím: %4
         <source>Your current total balance</source>
         <translation>Aktuális egyenleged</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Elkölthető:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>A legutóbbi tranzakciók</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>Nincs szinkronban.</translation>
@@ -1076,13 +1116,33 @@ Cím: %4
     </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping idő</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Összeg</translation>
     </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 n</translation>
+    </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 ó</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 p</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 mp</translation>
+    </message>
     <message>
         <source>NETWORK</source>
         <translation>HÁLÓZAT</translation>
@@ -1133,6 +1193,10 @@ Cím: %4
         <source>Debug window</source>
         <translation>Debug ablak</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>Általános</translation>
+    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Használt OpenSSL verzió</translation>
@@ -1173,6 +1237,18 @@ Cím: %4
         <source>&amp;Peers</source>
         <translation>&amp;Peerek</translation>
     </message>
+    <message>
+        <source>Version</source>
+        <translation>Verzió</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Szolgáltatások</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping idő</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Utolsó blokk ideje</translation>
@@ -2057,10 +2133,6 @@ Cím: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Kívülről érkező kapcsolatok elfogadása (alapértelmezett: 1, ha nem használt a -proxy vagy a -connect)</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Hiba: a tranzakciót elutasították. Ezt az okozhatja, ha már elköltöttél valamennyi érmét a tárcádból például ha a wallet.dat-od egy másolatát használtad, és így az elköltés csak abban lett jelölve, de itt nem.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Parancs, amit akkor hajt végre, amikor egy tárca-tranzakció megváltozik  (%s a parancsban lecserélődik a blokk TxID-re)</translation>
@@ -2250,10 +2322,6 @@ Cím: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Étvénytelen -paytxfee=&lt;összeg&gt; összeg: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Étvénytelen összeg</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nincs elég bitcoinod.</translation>
@@ -2286,10 +2354,6 @@ Cím: %4
         <source>Done loading</source>
         <translation>Betöltés befejezve.</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Használd a %s opciót</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Hiba</translation>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index ea2750ed0839..012db4f4a228 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1,10 +1,6 @@
 <TS language="id_ID" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Klik-ganda untuk mengubah alamat atau label</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Buat alamat baru</translation>
@@ -2306,10 +2302,6 @@ Alamat: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Terima hubungan dari luar (standar: 1 kalau -proxy atau -connect tidak dipilih)</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Gagal: Transaksi ditolak. Ini mungkin terjadi jika beberapa dari koin dalam dompet Anda telah digunakan, seperti ketika Anda menggunakan salinan wallet.dat dan beberapa koin telah dibelanjakan dalam salinan tersebut tetapi disini tidak tertandai sebagai terpakai.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Jalankan perintah ketika perubahan transaksi dompet (%s di cmd digantikan oleh TxID)</translation>
@@ -2390,10 +2382,6 @@ Alamat: %4
         <source>Error: Disk space is low!</source>
         <translation>Gagal: Hard disk hampir terisi!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Gagal: Dompet terkunci, transaksi tidak bisa dibuat!</translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>mengimpor...</translation>
@@ -2566,10 +2554,6 @@ Alamat: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nilai salah untuk -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Nilai salah</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Saldo tidak mencukupi</translation>
@@ -2602,10 +2586,6 @@ Alamat: %4
         <source>Done loading</source>
         <translation>Memuat selesai</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Gunakan pilihan %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Gagal</translation>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 60ffe6df155c..43fbf9aba938 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Fai doppio click per modificare o cancellare l'etichetta</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Fare clic con il tasto destro del mouse per modificare l'indirizzo o l'etichetta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -15,7 +15,7 @@
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Copia l'indirizzo attualmente selezionato negli appunti</translation>
+        <translation>Copia negli appunti l'indirizzo attualmente selezionato</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -31,11 +31,11 @@
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>Cancella l'indirizzo attualmente selezionato dalla lista</translation>
+        <translation>Rimuove dalla lista l'indirizzo attualmente selezionato</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Esporta i dati  nella tabella corrente  in un file</translation>
+        <translation>Esporta su file i dati contenuti nella tabella corrente</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -43,7 +43,7 @@
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>&amp;Cancella</translation>
+        <translation>&amp;Elimina</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -67,11 +67,11 @@
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Questo è un elenco di indirizzi bitcoin a cui puoi inviare pagamenti. Controlla sempre l'importo e l'indirizzo del beneficiario prima di inviare bitcoin.</translation>
+        <translation>Questo è un elenco di indirizzi Bitcoin a cui puoi inviare pagamenti. Controlla sempre l'importo e l'indirizzo del beneficiario prima di inviare bitcoin.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Questi sono i tuoi indirizzi bitcoin che puoi usare per ricevere pagamenti. Si raccomanda di generare un nuovo indirizzo per ogni transazione.</translation>
+        <translation>Questi sono i tuoi indirizzi Bitcoin che puoi usare per ricevere pagamenti. Si raccomanda di generare un nuovo indirizzo per ogni transazione.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -95,7 +95,7 @@
     </message>
     <message>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation>Si è verificato un errore tentando di salvare la lista degli indirizzi. %1. Riprova</translation>
+        <translation>Si è verificato un errore tentando di salvare la lista degli indirizzi su %1. Si prega di riprovare.</translation>
     </message>
 </context>
 <context>
@@ -117,19 +117,19 @@
     <name>AskPassphraseDialog</name>
     <message>
         <source>Passphrase Dialog</source>
-        <translation>Finestra parola d'ordine</translation>
+        <translation>Finestra passphrase</translation>
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>Inserisci la parola d'ordine</translation>
+        <translation>Inserisci la passphrase</translation>
     </message>
     <message>
         <source>New passphrase</source>
-        <translation>Nuova parola d'ordine</translation>
+        <translation>Nuova passphrase</translation>
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Ripeti la nuova parola d'ordine</translation>
+        <translation>Ripeti la nuova passphrase</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
@@ -137,7 +137,7 @@
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Quest'operazione necessita della passphrase per sbloccare il portamonete.</translation>
+        <translation>Questa operazione necessita della passphrase per sbloccare il portamonete.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
@@ -165,7 +165,7 @@
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Attenzione: se si cifra il portamonete e si perde la passphrase &lt;b&gt;TUTTI I PROPRI BITCOIN ANDRANNO PERSI&lt;/b&gt;!</translation>
+        <translation>Attenzione: perdendo la passphrase di un portamonete cifrato &lt;b&gt;TUTTI I PROPRI BITCOIN ANDRANNO PERSI&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
@@ -185,7 +185,7 @@
     </message>
     <message>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation>Inserisci una nuona password per il postafoglio.&lt;br/&gt;Perfavore usa una password di&lt;b&gt;dieci o più caratteri&lt;/b&gt;, o &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
+        <translation>Inserisci la nuova passphrase per il portamonete.&lt;br/&gt;Si consiglia di utilizzare &lt;b&gt;almeno dieci caratteri casuali&lt;/b&gt; oppure &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
@@ -224,7 +224,7 @@
     <name>BitcoinGUI</name>
     <message>
         <source>Sign &amp;message...</source>
-        <translation>Firma il &amp;messaggio...</translation>
+        <translation>Firma &amp;messaggio...</translation>
     </message>
     <message>
         <source>Synchronizing with network...</source>
@@ -264,7 +264,7 @@
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation>Mostra informazioni su Qt</translation>
+        <translation>Mostra le informazioni su Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
@@ -276,11 +276,11 @@
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Backup Portamonete...</translation>
+        <translation>&amp;Backup portamonete...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
-        <translation>&amp;Cambia la passphrase...</translation>
+        <translation>&amp;Cambia passphrase...</translation>
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
@@ -308,11 +308,11 @@
     </message>
     <message>
         <source>Send coins to a Bitcoin address</source>
-        <translation>Invia monete ad un indirizzo bitcoin</translation>
+        <translation>Invia fondi ad un indirizzo Bitcoin</translation>
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation>Modifica opzioni di configurazione per bitcoin</translation>
+        <translation>Modifica opzioni di configurazione per Bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
@@ -324,7 +324,7 @@
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>Finestra &amp;Debug</translation>
+        <translation>Finestra di &amp;debug</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
@@ -352,7 +352,7 @@
     </message>
     <message>
         <source>Show information about Bitcoin Core</source>
-        <translation>Mostra le informazioni riguardo a Bitcoin core</translation>
+        <translation>Mostra le informazioni su Bitcoin Core</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
@@ -368,11 +368,11 @@
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Firma i messaggi con il tuo indirizzo bitcoin per dimostrarne il possesso</translation>
+        <translation>Firma messaggi con i tuoi indirizzi Bitcoin per dimostrarne il possesso</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Verifica i messaggi per accertare che siano stati firmati con gli indirizzi bitcoin specificati</translation>
+        <translation>Verifica che i messaggi siano stati firmati con gli indirizzi Bitcoin specificati</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -388,7 +388,7 @@
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Barra degli strumenti "Tabs"</translation>
+        <translation>Barra degli strumenti</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
@@ -400,7 +400,7 @@
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation>Info su Bitcoin Core</translation>
+        <translation>&amp;Informazioni su Bitcoin Core</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -412,23 +412,23 @@
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>Apri un URI o una richiesta di pagamento</translation>
+        <translation>Apri un bitcoin: URI o una richiesta di pagamento</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>Opzioni riga di &amp;comando</translation>
+        <translation>Opzioni della riga di &amp;comando</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Mostra il messaggio di aiuto di Bitcoin Core per avere la lista di tutte le opzioni della riga di comando di Bitcoin.</translation>
+        <translation>Mostra il messaggio di aiuto di Bitcoin Core per ottenere la lista delle opzioni della riga di comando valide.</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n connessione attiva alla rete Bitcoin</numerusform><numerusform>%n connessioni attive alla rete Bitcoin</numerusform></translation>
+        <translation><numerusform>%n connessione attiva alla rete Bitcoin</numerusform><numerusform>%n connessioni alla rete Bitcoin attive</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>Nessuna fonte di blocchi disponibile</translation>
+        <translation>Nessuna fonte di blocchi disponibile...</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -460,7 +460,7 @@
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>Transazioni successive a questa non saranno ancora visibili.</translation>
+        <translation>Le transazioni effettuate successivamente non sono ancora visibili.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -527,8 +527,7 @@ Indirizzo: %4
     <name>CoinControlDialog</name>
     <message>
         <source>Coin Selection</source>
-        <translation>Seleziona Moneta
-</translation>
+        <translation>Selezione Input</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -552,7 +551,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Dust:</source>
-        <translation>Importo</translation>
+        <translation>Trascurabile:</translation>
     </message>
     <message>
         <source>After Fee:</source>
@@ -580,7 +579,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Received with label</source>
-        <translation>Ricevuto con etichetta</translation>
+        <translation>Ricevuto con l'etichetta</translation>
     </message>
     <message>
         <source>Received with address</source>
@@ -592,7 +591,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Confirmations</source>
-        <translation>Conferme:</translation>
+        <translation>Conferme</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -612,7 +611,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l'importo</translation>
+        <translation>Copia importo</translation>
     </message>
     <message>
         <source>Copy transaction ID</source>
@@ -648,7 +647,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Copy dust</source>
-        <translation>Copia l'importo</translation>
+        <translation>Copia trascurabile</translation>
     </message>
     <message>
         <source>Copy change</source>
@@ -660,7 +659,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>higher</source>
-        <translation>superiore</translation>
+        <translation>molto alta</translation>
     </message>
     <message>
         <source>high</source>
@@ -684,7 +683,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>lower</source>
-        <translation>minore</translation>
+        <translation>molto bassa</translation>
     </message>
     <message>
         <source>lowest</source>
@@ -700,7 +699,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Può variare +/- %1 satoshi(s) per input.</translation>
+        <translation>Può variare di +/- %1 satoshi per input.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -712,11 +711,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation>Questa etichetta diventa rossa se la dimensione della transazione supera i 1000 bytes</translation>
+        <translation>Questa etichetta diventerà rossa se la dimensione della transazione supererà i 1000 byte.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Questo significa che è richiesta una commissione di almeno %1 per ogni kB.</translation>
+        <translation>In tal caso sarà necessaria una commissione di almeno %1 per ogni kB.</translation>
     </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
@@ -728,11 +727,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than "medium".</source>
-        <translation>Questa etichetta diventa rossa se la priorità è inferiore a "media".</translation>
+        <translation>Questa etichetta diventerà rossa se la priorità sarà inferiore a "media".</translation>
     </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
-        <translation>Questa etichetta diventa rossa se uno qualsiasi dei destinatari riceve un ammontare inferiore di %1.</translation>
+        <translation>Questa etichetta diventerà rossa se uno qualsiasi dei destinatari riceverà un ammontare inferiore a %1.</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -763,7 +762,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation>L'indirizzo associato a questa voce della rubrica. Può essere modificato solo per gli indirizzi d'invio.</translation>
+        <translation>L'indirizzo associato con questa voce della lista degli indirizzi. Può essere modificato solo per gli indirizzi d'invio.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -787,11 +786,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>The entered address "%1" is already in the address book.</source>
-        <translation>L'indirizzo inserito "%1" è già in rubrica.</translation>
+        <translation>L'indirizzo "%1" è già presente in rubrica.</translation>
     </message>
     <message>
         <source>The entered address "%1" is not a valid Bitcoin address.</source>
-        <translation>L'indirizzo inserito "%1" non è un indirizzo bitcoin valido.</translation>
+        <translation>L'indirizzo "%1" non è un indirizzo bitcoin valido.</translation>
     </message>
     <message>
         <source>Could not unlock wallet.</source>
@@ -810,11 +809,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>name</source>
-        <translation>Nome</translation>
+        <translation>nome</translation>
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation>La cartella esiste già. Aggiungi %1 se intendi creare qui una nuova cartella.</translation>
+        <translation>Cartella già esistente. Aggiungi %1 se intendi creare qui una nuova cartella.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
@@ -822,7 +821,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Cannot create data directory here.</source>
-        <translation>Qui non è possibile creare una cartella dati.</translation>
+        <translation>Impossibile creare una cartella dati qui.</translation>
     </message>
 </context>
 <context>
@@ -841,11 +840,11 @@ Indirizzo: %4
     </message>
     <message>
         <source>About Bitcoin Core</source>
-        <translation>Info su Bitcoin Core</translation>
+        <translation>Informazioni su Bitcoin Core</translation>
     </message>
     <message>
         <source>Command-line options</source>
-        <translation>opzioni riga di comando</translation>
+        <translation>Opzioni della riga di comando</translation>
     </message>
     <message>
         <source>Usage:</source>
@@ -853,15 +852,15 @@ Indirizzo: %4
     </message>
     <message>
         <source>command-line options</source>
-        <translation>opzioni riga di comando</translation>
+        <translation>opzioni della riga di comando</translation>
     </message>
     <message>
         <source>UI options</source>
-        <translation>UI opzioni</translation>
+        <translation>Opzioni UI</translation>
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
-        <translation>Imposta lingua, ad esempio "it_IT" (predefinita: lingua di sistema)</translation>
+        <translation>Imposta lingua, ad esempio "it_IT" (predefinito: lingua di sistema)</translation>
     </message>
     <message>
         <source>Start minimized</source>
@@ -877,7 +876,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation>Scegli una cartella dati all'avvio (predefinito: 0)</translation>
+        <translation>Seleziona la cartella dati all'avvio (predefinito: 0)</translation>
     </message>
 </context>
 <context>
@@ -896,7 +895,7 @@ Indirizzo: %4
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Bitcoin Core scaricherà e salverà una copia del block chain di Bitcoin. Almeno %1GB di dati che andranno ad aumentare col tempo saranno salvati in questa cartella. Anche il portamonete sarà salvato in questa cartella.</translation>
+        <translation>Bitcoin Core scaricherà e salverà una copia della block chain di Bitcoin. Il portamonete ed almeno %1GB di dati saranno salvati in questa cartella. Si ricorda che lo spazio occupato andrà ad aumentare nel tempo.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -974,20 +973,20 @@ Indirizzo: %4
     </message>
     <message>
         <source>Accept connections from outside</source>
-        <translation>Accetta connessioni da fuori</translation>
+        <translation>Accetta connessioni provenienti dall'esterno</translation>
     </message>
     <message>
         <source>Allow incoming connections</source>
-        <translation>Permetti connessioni in entrata</translation>
+        <translation>Permetti connessioni in ingresso</translation>
     </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
-        <translation>Indirizzo IP del proxy (es: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+        <translation>Indirizzo IP del proxy (ad es. IPv4: 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>URL di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell'URL è sostituito dall'hash della transazione.
-Più URL vengono separati da una barra verticale |.</translation>
+        <translation>URL di terze parti (ad es. un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. "%s" nell'URL è sostituito dall'hash della transazione.
+Per specificare più URL separarli con una barra verticale "|".</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
@@ -995,7 +994,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
-        <translation>Opzioni command-line attive che sostituiscono i settaggi sopra elencati:</translation>
+        <translation>Opzioni della riga di comando attive che sostituiscono i settaggi sopra elencati:</translation>
     </message>
     <message>
         <source>Reset all client options to default.</source>
@@ -1027,11 +1026,11 @@ Più URL vengono separati da una barra verticale |.</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>Disabilitando l'uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando la transazione non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo saldo.</translation>
+        <translation>Disabilitando l'uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo del saldo.</translation>
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation>&amp;Spendere resti non confermati</translation>
+        <translation>&amp;Spendi resti non confermati</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>
@@ -1059,7 +1058,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Porta del proxy (es. 9050)</translation>
+        <translation>Porta del proxy (ad es. 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
@@ -1099,7 +1098,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Scegli l'unità di suddivisione predefinita da utilizzare per l'interfaccia e per l'invio di monete.</translation>
+        <translation>Scegli l'unità di suddivisione predefinita da utilizzare per l'interfaccia e per l'invio di bitcoin.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
@@ -1127,7 +1126,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation>È necessario un riavvio del client per rendere attivi i cambiamenti.</translation>
+        <translation>È necessario un riavvio del client per applicare le modifiche.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
@@ -1135,11 +1134,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation>Questo cambiamento richiede un riavvio del client.</translation>
+        <translation>Questa modifica richiede un riavvio del client.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>L'indirizzo proxy che hai fornito è invalido.</translation>
+        <translation>L'indirizzo proxy che hai fornito non è valido.</translation>
     </message>
 </context>
 <context>
@@ -1154,7 +1153,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Watch-only:</source>
-        <translation>Guarda solo</translation>
+        <translation>Sola lettura:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1162,7 +1161,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation>Saldo spendibile attuale</translation>
+        <translation>Il tuo saldo spendibile attuale</translation>
     </message>
     <message>
         <source>Pending:</source>
@@ -1190,15 +1189,15 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation>Saldo totale attuale</translation>
+        <translation>Il tuo saldo totale attuale</translation>
     </message>
     <message>
         <source>Your current balance in watch-only addresses</source>
-        <translation>Il tuo saldo attuale negli indirizzi watch-only</translation>
+        <translation>Il tuo saldo attuale negli indirizzi di sola lettura</translation>
     </message>
     <message>
         <source>Spendable:</source>
-        <translation>Saldo Spendibile:</translation>
+        <translation>Spendibile:</translation>
     </message>
     <message>
         <source>Recent transactions</source>
@@ -1210,11 +1209,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation>l'equilibrio estratto solo nello sguardo degli indirizzi non è ancora maturo </translation>
+        <translation>Importo generato dal mining su indirizzi di sola lettura e non ancora maturato</translation>
     </message>
     <message>
         <source>Current total balance in watch-only addresses</source>
-        <translation>Saldo corrente totale negli indirizzi watch-only</translation>
+        <translation>Saldo corrente totale negli indirizzi di sola lettura</translation>
     </message>
     <message>
         <source>out of sync</source>
@@ -1233,15 +1232,15 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Payment request rejected</source>
-        <translation>Richiesta di pagamento rifiutata</translation>
+        <translation>Richiesta di pagamento respinta</translation>
     </message>
     <message>
         <source>Payment request network doesn't match client network.</source>
-        <translation>Il network della richiesta di pagamento non corrisponde al network del client.</translation>
+        <translation>La rete della richiesta di pagamento non corrisponde alla rete del client.</translation>
     </message>
     <message>
         <source>Payment request has expired.</source>
-        <translation>Richieda di pagamento scaduta</translation>
+        <translation>Richiesta di pagamento scaduta.</translation>
     </message>
     <message>
         <source>Payment request is not initialized.</source>
@@ -1249,7 +1248,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>L'importo di pagamento richiesto di %1 è troppo basso (considerato come trascurabile).</translation>
+        <translation>L'importo di pagamento di %1 richiesto è troppo basso (considerato come trascurabile).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1265,7 +1264,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
-        <translation>Impossibile interpretare l'URI! Ciò può essere causato da un indirizzo Bitcoin invalido o da parametri URI non corretti.</translation>
+        <translation>Impossibile interpretare l'URI! I parametri URI o l'indirizzo Bitcoin potrebbero non essere corretti.</translation>
     </message>
     <message>
         <source>Payment request file handling</source>
@@ -1273,7 +1272,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation>Il file di richiesta del pagamento non può essere letto o elaborato! Questo può essere causato da una richiesta di pagamento non valida.</translation>
+        <translation>Impossibile leggere il file della richiesta di pagamento! Il file della richiesta di pagamento potrebbe non essere valido.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
@@ -1283,13 +1282,21 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Refund from %1</source>
         <translation>Rimborso da %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>La richiesta di pagamento %2 (%3 byte) supera la dimensione massima di %4 byte.</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Protezione DoS per la richiesta di pagamento</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Errore di comunicazione con %1: %2</translation>
     </message>
     <message>
         <source>Payment request cannot be parsed!</source>
-        <translation>La richiesta di pagamento non può essere analizzata.</translation>
+        <translation>La richiesta di pagamento non può essere analizzata!</translation>
     </message>
     <message>
         <source>Bad response from server %1</source>
@@ -1312,7 +1319,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Address/Hostname</source>
-        <translation>Indirizzo/Hostname</translation>
+        <translation>Indirizzo/Nome host</translation>
     </message>
     <message>
         <source>Ping Time</source>
@@ -1327,7 +1334,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter a Bitcoin address (e.g. %1)</source>
-        <translation>Inserisci un indirizzo Bitcoin (e.g. %1)</translation>
+        <translation>Inserisci un indirizzo Bitcoin (ad es. %1)</translation>
     </message>
     <message>
         <source>%1 d</source>
@@ -1370,7 +1377,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Salva Immagine</translation>
+        <translation>&amp;Salva Immagine...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
@@ -1421,7 +1428,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Startup time</source>
-        <translation>Tempo di avvio</translation>
+        <translation>Ora di avvio</translation>
     </message>
     <message>
         <source>Network</source>
@@ -1453,7 +1460,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>&amp;Peers</source>
-        <translation>&amp;Peers</translation>
+        <translation>&amp;Peer</translation>
     </message>
     <message>
         <source>Select a peer to view detailed information.</source>
@@ -1477,35 +1484,35 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Starting Height</source>
-        <translation>Blocco di partenza</translation>
+        <translation>Nr. Blocco Iniziale</translation>
     </message>
     <message>
         <source>Sync Height</source>
-        <translation>valore di sincronizzazione</translation>
+        <translation>Nr. Blocco Sincronizzato</translation>
     </message>
     <message>
         <source>Ban Score</source>
-        <translation>divieto di segnalazione </translation>
+        <translation>Punteggio di Ban</translation>
     </message>
     <message>
         <source>Connection Time</source>
-        <translation>Tempo di connessione</translation>
+        <translation>Tempo di Connessione</translation>
     </message>
     <message>
         <source>Last Send</source>
-        <translation>Ultimo invio</translation>
+        <translation>Ultimo Invio</translation>
     </message>
     <message>
         <source>Last Receive</source>
-        <translation>Ultima ricevuta</translation>
+        <translation>Ultima Ricezione</translation>
     </message>
     <message>
         <source>Bytes Sent</source>
-        <translation>Bytes Inviati</translation>
+        <translation>Byte Inviati</translation>
     </message>
     <message>
         <source>Bytes Received</source>
-        <translation>Bytes Ricevuti</translation>
+        <translation>Byte Ricevuti</translation>
     </message>
     <message>
         <source>Ping Time</source>
@@ -1553,7 +1560,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Apri il file di log del debug di Bitcoin dalla cartella attuale. Può richiedere alcuni secondi per file di log grandi.</translation>
+        <translation>Apri il file log del debug di Bitcoin dalla cartella dati attuale. Può richiedere alcuni secondi per file di log di grandi dimensioni.</translation>
     </message>
     <message>
         <source>Clear console</source>
@@ -1561,15 +1568,15 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Benvenuto nella console RPC di Bitcoin</translation>
+        <translation>Benvenuto nella console RPC di Bitcoin.</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>Usa le frecce direzionali per navigare la cronologia, e &lt;b&gt;Ctrl-L&lt;/b&gt; per cancellarla.</translation>
+        <translation>Usa le frecce direzionali per scorrere la cronologia, e &lt;b&gt;Ctrl-L&lt;/b&gt; per cancellarla.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Scrivi &lt;b&gt;help&lt;/b&gt; per un riassunto dei comandi disponibili</translation>
+        <translation>Scrivi &lt;b&gt;help&lt;/b&gt; per un riassunto dei comandi disponibili.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -1609,7 +1616,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Fetching...</source>
-        <translation>attraente</translation>
+        <translation>Recuperando...</translation>
     </message>
 </context>
 <context>
@@ -1620,7 +1627,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>&amp;Etichetta</translation>
+        <translation>&amp;Etichetta:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
@@ -1628,7 +1635,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Riutilizza uno degli indirizzi di ricezione generati in precedenza. Riutilizzare un indirizzo comporta problemi di sicurezza e privacy. Non utilizzare a meno che non si stia rigenerando una richiesta di pagamento creata in precedenza.</translation>
+        <translation>Riutilizza uno degli indirizzi di ricezione generati in precedenza. Riutilizzare un indirizzo comporta problemi di sicurezza e privacy. Non selezionare questa opzione a meno che non si stia rigenerando una richiesta di pagamento creata in precedenza.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
@@ -1636,11 +1643,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation>Un messaggio opzionale da allegare alla richiesta di pagamento, il quale sarà mostrato all'apertura della richiesta. Nota: Il messaggio non sarà inviato con il pagamento sulla rete Bitcoin.</translation>
+        <translation>Un messaggio opzionale da allegare e mostrare all'apertura della richiesta di pagamento. Nota: Il messaggio non sarà inviato con il pagamento sulla rete Bitcoin.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation>Un'etichetta facoltativa da associare al nuovo indirizzo di ricezione</translation>
+        <translation>Un'etichetta opzionale da associare al nuovo indirizzo di ricezione.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
@@ -1688,7 +1695,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy message</source>
-        <translation>Copia messaggio</translation>
+        <translation>Copia il messaggio</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1711,7 +1718,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>&amp;Salva Immagine</translation>
+        <translation>&amp;Salva Immagine...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
@@ -1747,7 +1754,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
-        <translation>Errore nella codifica dell'URI nel codice QR</translation>
+        <translation>Errore nella codifica dell'URI nel codice QR.</translation>
     </message>
 </context>
 <context>
@@ -1833,7 +1840,7 @@ Più URL vengono separati da una barra verticale |.</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>Se questo è abilitato e l'indirizzo per il resto è vuoto o invalido, il resto sarà inviato ad un nuovo indirizzo bitcoin generato appositamente.</translation>
+        <translation>In caso di abilitazione con indirizzo vuoto o non valido, il resto sarà inviato ad un nuovo indirizzo generato appositamente.</translation>
     </message>
     <message>
         <source>Custom change address</source>
@@ -1841,23 +1848,39 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Transaction Fee:</source>
-        <translation>Tasse di Transazione</translation>
+        <translation>Commissione di Transazione:</translation>
     </message>
     <message>
         <source>Choose...</source>
         <translation>Scegli...</translation>
     </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>minimizza le impostazioni di commissione</translation>
+    </message>
     <message>
         <source>Minimize</source>
         <translation>Minimizza</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se la commissione personalizzata è impostata su 1000 satoshi e la transazione è di soli 250 byte, allora "per kilobyte" paga solo 250 satoshi di commissione, mentre "somma almeno" paga 1000 satoshi. Per transazioni più grandi di un kilobyte, entrambe le opzioni pagano al kilobyte.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>per kilobyte</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se la commissione personalizzata è impostata su 1000 satoshi e la transazione è di soli 250 byte, allora "per kilobyte" paga solo 250 satoshi di commissione, mentre "somma almeno" paga 1000 satoshi. Per transazioni più grandi di un kilobyte, entrambe le opzioni pagano al kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>somma almeno</translation>
+    </message>
     <message>
         <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation>Pagando solo la tariffa minima è bene finché c'è meno volume di transazioni di spazio nei blocchi. Ma essere consapevoli che questo può finire in una transazione non confermando ancora una volta non vi è più richiesta per le transazioni Bitcoin di rete in grado di elaborare.</translation>
+        <translation>Non vi è alcuna controindicazione a pagare la commissione minima, a patto che il volume delle transazioni sia inferiore allo spazio disponibile nei blocchi. Occorre comunque essere consapevoli che ciò potrebbe impedire la conferma delle transazioni nel caso in cui la rete risultasse satura.</translation>
     </message>
     <message>
         <source>(read the tooltip)</source>
@@ -1865,11 +1888,15 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Recommended:</source>
-        <translation>Raccomandati:</translation>
+        <translation>Raccomandata:</translation>
     </message>
     <message>
         <source>Custom:</source>
-        <translation>Personalizza:</translation>
+        <translation>Personalizzata:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Commissione intelligente non ancora inizializzata. Normalmente richiede un'attesa di alcuni blocchi...)</translation>
     </message>
     <message>
         <source>Confirmation time:</source>
@@ -1885,7 +1912,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Send as zero-fee transaction if possible</source>
-        <translation>Invia una transazione a zero commissioni se possibile</translation>
+        <translation>Invia come transazione a zero commissioni se possibile</translation>
     </message>
     <message>
         <source>(confirmation may take longer)</source>
@@ -1893,7 +1920,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation>Invia a diversi beneficiari in una volta sola</translation>
+        <translation>Invia simultaneamente a più beneficiari</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
@@ -1905,7 +1932,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Dust:</source>
-        <translation>Trascurabile</translation>
+        <translation>Trascurabile:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1937,7 +1964,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy amount</source>
-        <translation>Copia l'importo</translation>
+        <translation>Copia importo</translation>
     </message>
     <message>
         <source>Copy fee</source>
@@ -1973,11 +2000,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>L'importo da pagare dev'essere maggiore di 0.</translation>
+        <translation>L'importo da pagare deve essere maggiore di 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation>L'importo è superiore al tuo saldo attuale</translation>
+        <translation>L'importo è superiore al tuo saldo attuale.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
@@ -1985,7 +2012,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Rilevato un indirizzo duplicato, è possibile inviare bitcoin una sola volta agli indirizzi durante un'operazione di invio.</translation>
+        <translation>Rilevato un indirizzo duplicato. È possibile inviare bitcoin una sola volta a ciascun indirizzo durante un'operazione di invio.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -1993,7 +2020,19 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>La transazione è stata rifiutata! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere bitcoin e questi non sono stati considerati spesi dal portamonete corrente.</translation>
+        <translation>La transazione è stata respinta! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, come nel caso in cui tu avessi utilizzato una copia del file wallet.dat per spendere bitcoin e questi non fossero stati considerati come spesi dal portamonete corrente.</translation>
+    </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Una commissione maggiore di %1 è considerata irragionevolmente elevata.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Paga solamente la commissione minima di %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Inizio delle conferme stimato entro %1 blocchi.</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
@@ -2009,7 +2048,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Copy dust</source>
-        <translation>Copia l'importo</translation>
+        <translation>Copia trascurabile</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -2032,11 +2071,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation>Inserisci un'etichetta per questo indirizzo, per aggiungerlo nella rubrica</translation>
+        <translation>Inserisci un'etichetta per questo indirizzo, per aggiungerlo alla rubrica</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>&amp;Etichetta</translation>
+        <translation>&amp;Etichetta:</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2114,7 +2153,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>&amp;Firma il messaggio</translation>
+        <translation>&amp;Firma Messaggio</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
@@ -2122,7 +2161,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The Bitcoin address to sign the message with</source>
-        <translation>L'indirizzo Bitcoin con cui vuoi contrassegnare il messaggio</translation>
+        <translation>L'indirizzo Bitcoin da utilizzare per firmare il messaggio</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
@@ -2154,7 +2193,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>Firma un messaggio per dimostrare di possedere questo indirizzo</translation>
+        <translation>Firma un messaggio per dimostrare di possedere questo indirizzo Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
@@ -2166,7 +2205,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Cancella &amp;tutto</translation>
+        <translation>Cancella &amp;Tutto</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
@@ -2174,7 +2213,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Inserisci l'indirizzo del firmatario, il messaggio (assicurati di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella firma più di quanto non sia riportato nel messaggio stesso, per evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
+        <translation>Inserisci l'indirizzo del firmatario, il messaggio (assicurandoti di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella sola firma più di quanto non sia riportato nel messaggio stesso, in modo da evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
     </message>
     <message>
         <source>The Bitcoin address the message was signed with</source>
@@ -2202,7 +2241,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Per favore controlla l'indirizzo e prova ancora</translation>
+        <translation>Per favore controlla l'indirizzo e prova di nuovo.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
@@ -2230,7 +2269,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation>Per favore controlla la firma e prova ancora.</translation>
+        <translation>Per favore controlla la firma e prova di nuovo.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
@@ -2253,7 +2292,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation>Gli sviluppatori del Bitcoin Core</translation>
+        <translation>Gli sviluppatori di Bitcoin Core</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2283,7 +2322,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>%1/unconfirmed</source>
-        <translation>%1/non confermato</translation>
+        <translation>%1/non confermata</translation>
     </message>
     <message>
         <source>%1 confirmations</source>
@@ -2295,7 +2334,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, trasmesso attraverso %n nodo</numerusform><numerusform>, trasmesso attraverso %n nodi</numerusform></translation>
+        <translation><numerusform>, trasmesso attraverso %n nodo</numerusform><numerusform>, trasmessa attraverso %n nodi</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2323,7 +2362,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>watch-only</source>
-        <translation>Guarda solo</translation>
+        <translation>sola lettura</translation>
     </message>
     <message>
         <source>label</source>
@@ -2347,7 +2386,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Total debit</source>
-        <translation>Credito Totale</translation>
+        <translation>Debito totale</translation>
     </message>
     <message>
         <source>Total credit</source>
@@ -2375,11 +2414,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Merchant</source>
-        <translation>Mercante</translation>
+        <translation>Commerciante</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>È necessario attendere %1 blocchi prima che i bitcoin generati possano essere spesi. Quando è stato generato questo blocco, è stato trasmesso alla rete in modo da poter essere aggiunto alla block chain. Se l'inserimento avrà esito negativo il suo stato sarà modificato in "non accettato" e risulterà non spendibile. Questo può occasionalmente accadere se un altro nodo genera un blocco entro pochi secondi dal tuo.</translation>
+        <translation>È necessario attendere %1 blocchi prima che i bitcoin generati possano essere spesi. Al momento della generazione questo blocco è stato trasmesso alla rete in modo da poter essere aggiunto alla block chain. Se l'inserimento avrà esito negativo lo stato del blocco sarà modificato in "non accettato" ed esso risulterà non spendibile. Ciò può verificarsi occasionalmente nel caso in cui un altro blocco sia stato generato entro pochi secondi dal tuo.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2407,7 +2446,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation>, non è stato ancora trasmesso con successo</translation>
+        <translation>, non è ancora stata trasmessa con successo</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2457,11 +2496,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Confirmed (%1 confirmations)</source>
-        <translation>Confermato (%1 conferme)</translation>
+        <translation>Confermata (%1 conferme)</translation>
     </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Questo blocco non è stato ricevuto dagli altri nodi e probabilmente non sarà accettato!</translation>
+        <translation>Questo blocco non è stato ricevuto da alcun altro nodo e probabilmente non sarà accettato!</translation>
     </message>
     <message>
         <source>Generated but not accepted</source>
@@ -2473,7 +2512,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Unconfirmed</source>
-        <translation>Non confermato:</translation>
+        <translation>Non confermata</translation>
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
@@ -2505,11 +2544,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>watch-only</source>
-        <translation>Guarda solo</translation>
+        <translation>sola lettura</translation>
     </message>
     <message>
         <source>(n/a)</source>
-        <translation>(N / a)</translation>
+        <translation>(n/d)</translation>
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
@@ -2523,6 +2562,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Type of transaction.</source>
         <translation>Tipo di transazione.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Indica se un indirizzo di sola lettura sia o meno coinvolto in questa transazione.</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Indirizzo di destinazione della transazione.</translation>
@@ -2679,7 +2722,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     <name>UnitDisplayStatusBarControl</name>
     <message>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation>Tipo di unità visualizzata. Clicca per selezionare un altra unità</translation>
+        <translation>Unità con cui visualizzare gli importi. Clicca per selezionare un altra unità.</translation>
     </message>
 </context>
 <context>
@@ -2704,7 +2747,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Esporta su file i dati della tabella corrente</translation>
+        <translation>Esporta su file i dati contenuti nella tabella corrente</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
@@ -2743,7 +2786,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Connettiti ad un nodo per recuperare gli indirizzi dei peer e scollegati</translation>
+        <translation>Connessione ad un nodo e successiva disconnessione per recuperare gli indirizzi dei peer</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2763,59 +2806,27 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Accetta connessioni dall'esterno (predefinito: 1 se no -proxy o -connect)</translation>
-    </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, devi impostare una rpcpassword nel file di configurazione:
-%s
-Si raccomanda l'uso della seguente password generata casualmente:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(non serve ricordare questa password)
-Il nome utente e la password NON DEVONO essere uguali.
-Se il file non esiste, crealo concedendo permessi di lettura al solo proprietario del file.
-Si raccomanda anche di impostare alertnotify così sarai avvisato di eventuali problemi;
-ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
-</translation>
+        <translation>Accetta connessioni dall'esterno (predefinito: 1 se -proxy o -connect non sono utilizzati)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Associa all'indirizzo indicato e resta permanentemente in ascolto su questo. Usa la notazione [host]:porta per l'IPv6</translation>
+        <translation>Associa all'indirizzo indicato e resta permanentemente in ascolto su di esso. Usa la notazione [host]:porta per l'IPv6</translation>
     </message>
     <message>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
-        <translation>Elimina tutte le transazioni dal wallet e recupera solo le parti della blockchain con il comando -rescan all'avvio.</translation>
+        <translation>Elimina tutte le transazioni dal portamonete e recupera solo quelle che fanno parte della blockchain attraverso il comando -rescan all'avvio.</translation>
     </message>
     <message>
         <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation>Distribuito secondo la licenza software MIT, vedi il file incluso COPYNG oppure &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+        <translation>Distribuito secondo la licenza software MIT, vedi il file COPYING incluso oppure &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi possono essere risolti istantaneamente.</translation>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Errore: la transazione è stata rifiutata! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere bitcoin e questi non sono stati considerati spesi dal portamonete corrente.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Errore: questa transazione necessita di una commissione di almeno %s a causa del suo ammontare, della sua complessità, o dell'uso di fondi recentemente ricevuti!</translation>
+        <translation>Entra in modalità test di regressione. Questa utilizza una speciale catena in cui i blocchi possono essere risolti istantaneamente.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Esegui comando quando una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
+        <translation>Esegue un comando quando lo stato di una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
     </message>
     <message>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
@@ -2835,27 +2846,27 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione.</translation>
+        <translation>Attenzione: -paytxfee è impostato su un valore molto elevato. Questa è la commissione che si paga quando si invia una transazione.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation>Attenzione: La rete non sembra essere d'accordo pienamente! Alcuni minatori sembrano riscontrare problemi.</translation>
+        <translation>Attenzione: La rete non sembra trovarsi in pieno consenso! Alcuni minatori sembrano riscontrare problemi.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Attenzione: Sembra che non ci sia completo accordo con i nostri peer! Un aggiornamento da parte tua o degli altri nodi potrebbe essere necessario.</translation>
+        <translation>Attenzione: Sembra che non vi sia pieno consenso con i nostri peer! Un aggiornamento da parte tua o degli altri nodi potrebbe essere necessario.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Attenzione: errore di lettura di wallet.dat! Tutte le chiavi sono state lette correttamente, ma i dati delle transazioni o le voci in rubrica potrebbero mancare o non essere corretti.</translation>
+        <translation>Attenzione: errore di lettura di wallet.dat! Tutte le chiavi sono state lette correttamente, ma i dati delle transazioni o della rubrica potrebbero essere mancanti o non corretti.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Attenzione: wallet.dat corrotto, dati recuperati! Il wallet.dat originale è stato salvato come wallet.{timestamp}.bak in %s; se il tuo saldo o le transazioni non sono corrette dovresti ripristinare da un backup.</translation>
+        <translation>Attenzione: wallet.dat corrotto, dati recuperati! Il wallet.dat originale è stato salvato come wallet.{timestamp}.bak in %s. Se i dati relativi a saldo o transazioni non dovessero risultare corretti si consiglia di procedere al ripristino da un backup.</translation>
     </message>
     <message>
         <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
-        <translation>Peer in whitelist connessi dalla data netmask oppure dall'indirizzo IP. Può essere specificato più volte.</translation>
+        <translation>Inserisce in whitelist i peer che si connettono da un dato indirizzo IP o netmask. Può essere specificato più volte.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2863,7 +2874,7 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; può essere:</translation>
+        <translation>Valori possibili per &lt;category&gt;:</translation>
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
@@ -2875,7 +2886,7 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Connetti solo al nodo specificato</translation>
+        <translation>Connessione ai soli nodi specificati</translation>
     </message>
     <message>
         <source>Connection options:</source>
@@ -2891,11 +2902,11 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Scopre il proprio indirizzo IP (predefinito: 1 se in ascolto e no -externalip)</translation>
+        <translation>Scopre il proprio indirizzo IP (predefinito: 1 se in ascolto ed -externalip non è specificato)</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation>Non caricare il portamonete e disabilita le chiamate RPC al portamonete</translation>
+        <translation>Disabilita il portamonete e le relative chiamate RPC</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2907,28 +2918,24 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Errore durante l'inizializzazione dell'ambiente %s del database del portamonete!</translation>
+        <translation>Errore durante l'inizializzazione dell'ambiente del database del portamonete %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
-        <translation>Errore caricamento database blocchi</translation>
+        <translation>Errore durante il caricamento del database blocchi</translation>
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation>Errore caricamento database blocchi</translation>
+        <translation>Errore durante l'apertura del database blocchi</translation>
     </message>
     <message>
         <source>Error: A fatal internal error occured, see debug.log for details</source>
-        <translation>Errore: si è verificato un errore fatale, consulta il file debug.log for maggiori dettagli.</translation>
+        <translation>Errore: si è verificato un errore interno fatale. Consulta il file debug.log for maggiori dettagli.</translation>
     </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Errore: la spazio libero sul disco è insufficiente!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Errore: portamonete bloccato, impossibile creare la transazione!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Nessuna porta disponibile per l'ascolto. Usa -listen=0 se vuoi procedere comunque.</translation>
@@ -2943,7 +2950,7 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation>Blocco genesis non corretto o non trovato. Cartella dati errata?</translation>
+        <translation>Blocco genesi non corretto o non trovato. È possibile che la cartella dati appartenga ad un'altra rete.</translation>
     </message>
     <message>
         <source>Invalid -onion address: '%s'</source>
@@ -2955,31 +2962,31 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
-        <translation>Connetti solo ai nodi nella rete &lt;net&gt; (ipv4, ipv6 o Tor)</translation>
+        <translation>Connessione ai soli nodi appartenenti alla rete &lt;net&gt; (ipv4, ipv6 o Tor)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Ricreare l'indice della catena di blocchi dai file blk000??.dat correnti</translation>
+        <translation>Ricostruzione dell'indice della block chain dai file blk000??.dat correnti</translation>
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Imposta la dimensione cache del database in megabyte (%d a %d, predefinito: %d)</translation>
+        <translation>Imposta la dimensione della cache del database in megabyte (%d a %d, predefinito: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation>Imposta la dimensione massima del blocco in byte (predefinita: %d)</translation>
+        <translation>Imposta la dimensione massima del blocco in byte (predefinito: %d)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Specifica il file portamonete (all'interno della cartella dati)</translation>
+        <translation>Specifica il file del portamonete (all'interno della cartella dati)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation>Questo è previsto per l'uso con test di regressione e per lo sviluppo di applicazioni.</translation>
+        <translation>Questa impostazione è destinata all'uso con i test di regressione e per lo sviluppo di applicazioni.</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: %u)</source>
-        <translation>Usa UPnP per mappare la porta di ascolto (default: %u)</translation>
+        <translation>Usa UPnP per mappare la porta di ascolto (predefinito: %u)</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -3007,72 +3014,159 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
-        <translation>Permetti connessioni JSON-RPC da una origine specifica. I valori validi per &lt;ip&gt; sono un singolo IP (ex: 1.2.3.4), un network/netmask (ex: 1.2.3.4/255.255.255.0) oppure un network/CIDR (ex: 1.2.3.4/24). Questa opzione può essere specificata più volte.</translation>
-    </message>
-    <message>
-        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
-        <translation>Si è verificato un errore durante l'impostazione della %s porta %u RPC per l'ascolto su: %s</translation>
+        <translation>Permette connessioni JSON-RPC dall'origine specificata. I valori validi per &lt;ip&gt; sono un singolo IP (ad es. 1.2.3.4), una network/netmask (ad es. 1.2.3.4/255.255.255.0) oppure una network/CIDR (ad es. 1.2.3.4/24). Questa opzione può essere specificata più volte.</translation>
     </message>
     <message>
         <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
-        <translation>Collega all'indirizzo indicato e resta permetti l'ascolto su questo. Usa la notazione [host]:porta per l'IPv6</translation>
+        <translation>Resta in ascolto sull'indirizzo indicato ed inserisce in whitelist i peer che vi si collegano. Usa la notazione [host]:porta per l'IPv6</translation>
     </message>
     <message>
         <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
-        <translation>Associa un indirizzo per l'ascolto di connessioni JSON-RPC. Usa l'annotazione [host]:porta per IPv6. Questa opzione può essere specificata più volte (default: associa a tutte le interfacce) </translation>
+        <translation>Resta in attesa di connessioni JSON-RPC sull'indirizzo indicato. Usa la notazione [host]:porta per IPv6. Questa opzione può essere specificata più volte (predefinito: associa a tutte le interfacce) </translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Non è possibile ottenere un lock sulla cartella %s. Probabilmente Bitcoin Core è già in esecuzione.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limita la quantità di transazioni gratuite ad &lt;n&gt;*1000 byte al minuto (predefinito: %u)</translation>
+    </message>
     <message>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
-        <translation>Crea nuovi file con i permessi di default del sistema invece dell'umask 077 (effettiva solo con la funzionalità del wallet disabilitata)</translation>
+        <translation>Crea nuovi file con i permessi di default del sistema, invece che con umask 077 (ha effetto solo con funzionalità di portamonete disabilitate)</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
-        <translation>Errore: l'ascolto per per connessioni in arrivo fallito (errore riportato %s)</translation>
+        <translation>Errore: attesa per connessioni in arrivo fallita (errore riportato %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Errore: individuato argomento -socks non supportato. Non è più possibile impostare la versione SOCKS, solamente i proxy SOCKS5 sono supportati.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Esegue un comando quando viene ricevuto un allarme rilevante o quando vediamo un fork veramente lungo (%s in cmd è sostituito dal messaggio)</translation>
+        <translation>Esegue un comando in caso di ricezione di un allarme pertinente o se si rileva un fork molto lungo (%s in cmd è sostituito dal messaggio)</translation>
     </message>
     <message>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
-        <translation>Le commissioni (in BTC/kb) minori di questa saranno considerate nulle per la trasmissione (predefinito: %s)</translation>
+        <translation>Le commissioni (in BTC/kB) inferiori a questo valore sono considerate pari a zero relativamente alla trasmissione (predefinito: %s)</translation>
     </message>
     <message>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
-        <translation>Le commissioni inferiori a questo valore saranno considerate nulle per la creazione della transazione (predefinito: %s)</translation>
+        <translation>Le commissioni (in BTC/kB) inferiori a questo valore sono considerate pari a zero relativamente alla creazione della transazione (predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Nel caso in cui paytxfee non sia impostato, include una commissione tale da ottenere un avvio delle conferme entro una media di n blocchi (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Importo non valido per -maxtxfee=&lt;amount&gt;: '%s' (deve essere almeno pari alla commissione 'minrelay fee' di %s per prevenire transazioni bloccate)</translation>
+    </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Dimensione massima dei dati in transazioni di trasporto dati che saranno trasmesse ed incluse nei blocchi (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Commissioni massime totali da includere in una singola transazione dal portamonete. Un'impostazione troppo bassa potrebbe provocare il fallimento di transazioni di grosse dimensioni (predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Ottiene gli indirizzi dei peer attraverso interrogazioni DNS, in caso di scarsa disponibilità (predefinito: 1 a meno che -connect non sia specificato)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation>Imposta la dimensione massima in byte delle transazioni ad alta-priorità/basse-commissioni (predefinita: %d)</translation>
+        <translation>Imposta la dimensione massima in byte delle transazioni ad alta-priorità/basse-commissioni (predefinito: %d)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Specifica il numero di thread per la generazione di bitcoin, se abilitata (-1 = tutti i core, predefinito: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso del Toolkit OpenSSL &lt;https://www.openssl.org/&gt;, software crittografico scritto da Eric Young e software UPnP scritto da Thomas Bernard.</translation>
+    </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Per utilizzare bitcoind o l'opzione -server in Bitcoin Core è necessario specificare una rpcpassword nel file di configurazione:
+%s
+Si raccomanda di utilizzare la seguente password casuale:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(non è necessario ricordare questa password)
+Il nome utente e la password NON DEVONO corrispondere.
+Se il file non esiste si raccomanda di crearlo con permessi di lettura per il solo proprietario.
+Si raccomanda inoltre di configurare alertnotify in modo da ricevere notifiche di eventuali problemi, ad es. alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Attenzione: -maxtxfee è impostato su un valore molto elevato. Tali commissioni potrebbero essere pagate anche in una singola transazione.</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>Attenzione: Si prega di verificare che data ed ora del computer siano corrette! Una configurazione errata dell'orologio di sistema potrebbe impedire a Bitcoin Core di funzionare regolarmente.</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>I peer inclusi in whitelist non possono subire ban per DoS e le loro transazioni saranno sempre trasmesse, anche nel caso in cui si trovino già nel mempool. Ciò è utile ad es. per i gateway</translation>
+    </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accetta richieste REST pubbliche (predefinito: %u)</translation>
     </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
-        <translation>Impossibile risolvere -whitebind address: '%s'</translation>
+        <translation>Impossibile risolvere indirizzo -whitebind: '%s'</translation>
     </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
-        <translation>Connetti attraverso SOCKS5 proxy</translation>
+        <translation>Connessione attraverso un proxy SOCKS5</translation>
     </message>
     <message>
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
-        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
+        <translation>Copyright (C) 2009-%i Gli sviluppatori di Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Non è stato possibile riconoscere il valore %s di -rpcbind come indirizzo di rete</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
-        <translation>Errore caricamento wallet.dat: il wallet richiede una versione nuova di Bitcoin Core</translation>
+        <translation>Errore durante il caricamento del file wallet.dat: il portamonete richiede una versione di Bitcoin Core più recente</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Errore: Rilevato argomento -tor non supportato, utilizzare -onion.</translation>
     </message>
     <message>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
-        <translation>Commissione (in BTC/kB) da aggiungere alla transazione che invii (default: %s)</translation>
+        <translation>Commissione (in BTC/kB) da aggiungere alle transazioni che invii (predefinito: %s)</translation>
     </message>
     <message>
         <source>Information</source>
         <translation>Informazioni</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Test di integrità iniziale fallito. Bitcoin Core si arresterà.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Importo non valido per -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Importo non valido per -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -3081,17 +3175,25 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Importo non valido per -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Importo non valido per -paytxfee=&lt;amount&gt;: '%s' (deve essere almeno %s)</translation>
+    </message>
     <message>
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Netmask non valida specificata in -whitelist: '%s'</translation>
     </message>
     <message>
-        <source>Node relay options:</source>
-        <translation>Opzioni  relay nodo:</translation>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Mantiene in memoria al massimo &lt;n&gt; transazioni non collegabili (predefinito: %u)</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Stampa il blocco all'avvio, se presente nell'indice dei blocchi</translation>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>È necessario specificare una porta con -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>Node relay options:</source>
+        <translation>Opzioni trasmissione nodo:</translation>
     </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
@@ -3115,7 +3217,7 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
-        <translation>Invia transazioni a zero commissioni se possibile (default: %u)</translation>
+        <translation>Invia transazioni a zero commissioni se possibile (predefinito: %u)</translation>
     </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
@@ -3123,11 +3225,11 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Riduci il file debug.log all'avvio del client (predefinito: 1 se non impostato -debug)</translation>
+        <translation>Riduce il file debug.log all'avvio del client (predefinito: 1 se -debug non è impostato)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation>Transazione di firma fallita</translation>
+        <translation>Firma transazione fallita</translation>
     </message>
     <message>
         <source>This is experimental software.</source>
@@ -3139,24 +3241,31 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation>L'importo della transazione deve essere positivo</translation>
+        <translation>Gli importi della transazione devono essere positivi</translation>
+    </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transazione troppo grande in base alla policy sulle commissioni</translation>
     </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transazione troppo grande</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Impossibile associarsi a %s su questo computer (l'associazione ha restituito l'errore %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 1 when listening)</translation>
+        <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 1 quando in ascolto)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
-        <translation>Nome utente per connessioni JSON-RPC
-</translation>
+        <translation>Nome utente per connessioni JSON-RPC</translation>
     </message>
     <message>
         <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
-        <translation>Il wallet ha bisogno di essere reiscritto : riavvia Bitcoin Core per completare l'operazione</translation>
+        <translation>Il portamonete necessitava di essere riscritto: riavviare Bitcoin Core per completare l'operazione</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -3166,9 +3275,17 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Attenzione: questa versione è obsoleta, aggiornamento necessario!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Attenzione: Argomento -benchmark ignorato in quanto non supportato, usare -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Attenzione: Argomento -debugnet ignorato in quanto non supportato, usare -debug=net.</translation>
+    </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
-        <translation>Cancella e ricompila tutte le transazioni dal wallet...</translation>
+        <translation>Eliminazione dal portamonete di tutte le transazioni...</translation>
     </message>
     <message>
         <source>on startup</source>
@@ -3180,12 +3297,11 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
-        <translation>Password per connessioni JSON-RPC
-</translation>
+        <translation>Password per connessioni JSON-RPC</translation>
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Esegui il comando quando il migliore blocco cambia(%s nel cmd è sostituito dall'hash del blocco)</translation>
+        <translation>Esegue un comando quando il miglior blocco cambia (%s nel cmd è sostituito dall'hash del blocco)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
@@ -3193,22 +3309,19 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Ripeti analisi della catena dei blocchi per cercare le transazioni mancanti dal portamonete
-</translation>
+        <translation>Ripete la scansione della block chain per individuare le transazioni che mancano dal portamonete</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>Utilizzare OpenSSL (https) per le connessioni JSON-RPC
-</translation>
+        <translation>Utilizza OpenSSL (https) per le connessioni JSON-RPC</translation>
     </message>
     <message>
         <source>This help message</source>
-        <translation>Questo messaggio di aiuto
-</translation>
+        <translation>Questo messaggio di aiuto</translation>
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation>Consenti ricerche DNS per -addnode, -seednode e -connect</translation>
+        <translation>Consente interrogazioni DNS per -addnode, -seednode e -connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
@@ -3218,13 +3331,53 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Errore caricamento wallet.dat: Portamonete corrotto</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = mantiene metadati tx, ad es. proprietario account ed informazioni di richiesta di pagamento, 2 = scarta metadati tx)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Scarica l'attività del database dal pool in memoria al log su disco ogni &lt;n&gt; megabyte (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Determina quanto sarà approfondita la verifica da parte di -checkblocks (0-4, predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Abilita il log della priorità di transazione e della commissione per kB quando si generano blocchi (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Mantiene l'indice completo delle transazioni usato dalla chiamata rpc getrawtransaction (predefinito: %u)</translation>
+    </message>
     <message>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
-        <translation>Numero di secondi di sospensione per i peer di cattiva qualità prima di riconnettersi (default: %u)</translation>
+        <translation>Numero di secondi di sospensione prima della riconnessione per i peer che mostrano un comportamento anomalo (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Emette informazioni di debug (predefinito: %u, fornire &lt;category&gt; è opzionale)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Usa un proxy SOCKS5 a parte per raggiungere i peer attraverso gli hidden services di Tor (predefinito: %s)</translation>
     </message>
     <message>
         <source>(default: %s)</source>
-        <translation>(default: %s)</translation>
+        <translation>(predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Cifrari accettabili (predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Interroga sempre i DNS per ottenere gli indirizzi dei peer (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Disabilita la modalità sicura ignorando gli eventi che porterebbero alla sua attivazione (predefinito: %u)</translation>
     </message>
     <message>
         <source>Error loading wallet.dat</source>
@@ -3232,83 +3385,115 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Force safe mode (default: %u)</source>
-        <translation>Forza modalità provvisoria (dafault: %u)</translation>
+        <translation>Forza modalità sicura (predefinito: %u)</translation>
     </message>
     <message>
         <source>Generate coins (default: %u)</source>
-        <translation>Genera coins (default: %u)</translation>
+        <translation>Genera bitcoin (predefinito: %u)</translation>
     </message>
     <message>
         <source>How many blocks to check at startup (default: %u, 0 = all)</source>
-        <translation>Quanti blocchi da controllare all'avvio (dafault: %u, 0 = tutti)</translation>
+        <translation>Numero di blocchi da controllare all'avvio (predefinito: %u, 0 = tutti)</translation>
     </message>
     <message>
         <source>Include IP addresses in debug output (default: %u)</source>
-        <translation>Includi gli indirizzi IP nell'output del debug (default: %u)</translation>
+        <translation>Include gli indirizzi IP nell'output del debug (predefinito: %u)</translation>
     </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Indirizzo -proxy non valido: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limita la dimensione della cache delle firme a &lt;n&gt; voci (predefinito: %u)</translation>
+    </message>
     <message>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
-        <translation>Ascolto di connessioni JSON-RPC su &lt;port&gt; (default: %u o testnet: %u)</translation>
+        <translation>Resta in attesa di connessioni JSON-RPC su &lt;port&gt; (predefinito: %u o testnet: %u)</translation>
     </message>
     <message>
         <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
-        <translation>Ascolto di connessioni su &lt;port&gt; (default: %u o testnet: %u)</translation>
+        <translation>Resta in attesa di connessioni su &lt;port&gt; (predefinito: %u o testnet: %u)</translation>
     </message>
     <message>
         <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
-        <translation>Mantieni al massimo &lt;n&gt; connessioni ai peers (default: %u)</translation>
+        <translation>Mantiene al massimo &lt;n&gt; connessioni verso i peer (predefinito: %u)</translation>
     </message>
     <message>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
-        <translation>Buffer di ricezione massimo per connessione, &lt;n&gt;*1000 byte (default: %u)</translation>
+        <translation>Buffer di ricezione massimo per connessione, &lt;n&gt;*1000 byte (predefinito: %u)</translation>
     </message>
     <message>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
-        <translation>Buffer di invio massimo per connessione, &lt;n&gt;*1000 byte (default: %u)</translation>
+        <translation>Buffer di invio massimo per connessione, &lt;n&gt;*1000 byte (predefinito: %u)</translation>
     </message>
     <message>
         <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
-        <translation>Accetta solo una catena di blocchi che corrisponde ai checkpoint predefiniti (default: %u)</translation>
+        <translation>Accetta solo block chain corrispondenti ai checkpoint integrati nel codice (predefinito: %u)</translation>
     </message>
     <message>
         <source>Prepend debug output with timestamp (default: %u)</source>
-        <translation>Pretendi output di debug con timestamp (default: %u)</translation>
+        <translation>Antepone un timestamp all'output del debug (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Trasmette ed include nei blocchi transazioni di trasporto dati (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Trasmette transazioni non-P2SH multisig (predefinito: %u)</translation>
     </message>
     <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Stampa l'albero dei blocchi all'avvio (default: %u)</translation>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Mantieni in esecuzione un thread per scaricare periodicamente il portamonete (predefinito: %u)</translation>
     </message>
     <message>
         <source>Server certificate file (default: %s)</source>
-        <translation>File certificato del server (default: %s)</translation>
+        <translation>File del certificato del server (predefinito: %s)</translation>
     </message>
     <message>
         <source>Server private key (default: %s)</source>
-        <translation>Chiave privata del server (default: %s)</translation>
+        <translation>Chiave privata del server (predefinito: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Imposta la dimensione del pool di chiavi a &lt;n&gt; (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Imposta la dimensione minima del blocco in byte (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Imposta il numero di thread destinati a rispondere alle chiamate RPC (predefinito %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Imposta il flag DB_PRIVATE nell'ambiente di database del portamonete (predefinito: %u)</translation>
     </message>
     <message>
         <source>Specify configuration file (default: %s)</source>
-        <translation>Specifica il file di configurazione (default: %s)</translation>
+        <translation>Specifica il file di configurazione (predefinito: %s)</translation>
     </message>
     <message>
         <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
-        <translation>Specifica il timeout di connessione in millisecondi (minimo:1, default: %d)</translation>
+        <translation>Specifica il timeout di connessione in millisecondi (minimo:1, predefinito: %d)</translation>
     </message>
     <message>
         <source>Specify pid file (default: %s)</source>
-        <translation>Specifica il file pid (default: %s)</translation>
+        <translation>Specifica il file pid (predefinito: %s)</translation>
     </message>
     <message>
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
-        <translation>Spendi il resto non confermato quando si inviano transazioni (default: %u)</translation>
+        <translation>Abilita la spesa di resto non confermato quando si inviano transazioni (predefinito: %u)</translation>
     </message>
     <message>
         <source>Stop running after importing blocks from disk (default: %u)</source>
-        <translation>Interrompi dopo aver importato i blocchi dal disco (default: %u)</translation>
+        <translation>Interrompi l'esecuzione dopo aver importato i blocchi dal disco (predefinito: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Soglia di disconnessione per i peer che si comportano in maniera anomala (predefinito: %u)</translation>
     </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
@@ -3316,7 +3501,7 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
     </message>
     <message>
         <source>Cannot resolve -bind address: '%s'</source>
-        <translation>Impossibile risolvere -bind address: '%s'</translation>
+        <translation>Impossibile risolvere indirizzo -bind: '%s'</translation>
     </message>
     <message>
         <source>Cannot resolve -externalip address: '%s'</source>
@@ -3326,21 +3511,17 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Importo non valido per -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Importo non valido</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fondi insufficienti</translation>
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>Caricamento dell'indice del blocco...</translation>
+        <translation>Caricamento dell'indice dei blocchi...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation>Aggiunge un nodo a cui connettersi e tenta di tenere aperta la connessione</translation>
+        <translation>Aggiunge un nodo a cui connettersi e tenta di mantenere aperta la connessione</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
@@ -3362,10 +3543,6 @@ ad esempio: alertnotify=echo %%s | mail -s "Allarme Bitcoin" admin@foo.com
         <source>Done loading</source>
         <translation>Caricamento completato</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Per usare l'opzione %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Errore</translation>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index 0c9805de8f90..fe8cb41b01da 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>アドレスまたはラベルを編集するにはダブルクリック</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>右クリックでアドレスまたはラベルを編集します</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -410,10 +410,18 @@
         <source>Show the list of used receiving addresses and labels</source>
         <translation>支払いを受け取るアドレスとラベルのリストを表示する</translation>
     </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation>bitcoin: URIまたは支払いリクエストを開く</translation>
+    </message>
     <message>
         <source>&amp;Command-line options</source>
         <translation>コマンドラインオプション (&amp;C)</translation>
     </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>有効な Bitcoin のコマンドライン オプションを見るために Bitcoin Core のヘルプメッセージを表示します。</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n の Bitcoin ネットワークへのアクティブな接続</numerusform></translation>
@@ -470,6 +478,10 @@
         <source>Up to date</source>
         <translation>バージョンは最新です</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>トランザクション履歴の %n ブロックを処理しました。</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>追跡中...</translation>
@@ -535,10 +547,18 @@ Address: %4
         <source>Fee:</source>
         <translation>手数料:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>ダスト：</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>手数料差引後:</translation>
     </message>
+    <message>
+        <source>Change:</source>
+        <translation>釣り銭:</translation>
+    </message>
     <message>
         <source>(un)select all</source>
         <translation>すべて選択/選択解除</translation>
@@ -555,6 +575,14 @@ Address: %4
         <source>Amount</source>
         <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>
@@ -615,10 +643,62 @@ Address: %4
         <source>Copy priority</source>
         <translation>優先度をコピーする</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>ダストをコピーする</translation>
+    </message>
+    <message>
+        <source>Copy change</source>
+        <translation>釣り銭をコピー</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation>最高</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>非常に高</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>高</translation>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation>中〜高</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>中</translation>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation>低〜中</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>低</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>非常に低</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>最低</translation>
+    </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation>(%1 がロック済み)</translation>
+    </message>
     <message>
         <source>none</source>
         <translation>なし</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>ひとつの入力につき %1 satoshi 前後ずれることがあります。</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>はい</translation>
@@ -627,15 +707,43 @@ Address: %4
         <source>no</source>
         <translation>いいえ</translation>
     </message>
+    <message>
+        <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
+        <translation>トランザクションサイズが1000バイトを超える場合にはこのラベルは赤くなります。</translation>
+    </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation>これは少なくとも1kBあたり %1 の手数料が必要であることを意味します。</translation>
+    </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</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>This label turns red, if the priority is smaller than "medium".</source>
         <translation>優先度が「中」未満の場合には、このラベルは赤くなります。</translation>
     </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation>少なくともひとつの受取額が %1 を下回る場合にはこのラベルは赤くなります。</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
-    </context>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation>%1 (%2) からのおつり</translation>
+    </message>
+    <message>
+        <source>(change)</source>
+        <translation>(おつり)</translation>
+    </message>
+</context>
 <context>
     <name>EditAddressDialog</name>
     <message>
@@ -646,6 +754,14 @@ Address: %4
         <source>&amp;Label</source>
         <translation>ラベル(&amp;L)</translation>
     </message>
+    <message>
+        <source>The label associated with this address list entry</source>
+        <translation>このアドレス帳項目に結びつけられているラベル</translation>
+    </message>
+    <message>
+        <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+        <translation>このアドレス帳項目に結びつけられているアドレス。この項目は送金用アドレスの場合のみ編集することができます。</translation>
+    </message>
     <message>
         <source>&amp;Address</source>
         <translation>アドレス帳 (&amp;A)</translation>
@@ -716,6 +832,10 @@ Address: %4
         <source>version</source>
         <translation>バージョン</translation>
     </message>
+    <message>
+        <source>(%1-bit)</source>
+        <translation>(%1ビット)</translation>
+    </message>
     <message>
         <source>About Bitcoin Core</source>
         <translation>Bitcoinコアについて</translation>
@@ -744,6 +864,10 @@ Address: %4
         <source>Start minimized</source>
         <translation>最小化された状態で起動する</translation>
     </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>支払いリクエスト用にSSLルート証明書を設定する（デフォルト：-system-）</translation>
+    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>起動時にスプラッシュ画面を表示する (初期値: 1)</translation>
@@ -763,6 +887,14 @@ Address: %4
         <source>Welcome to Bitcoin Core.</source>
         <translation>ようこそ！</translation>
     </message>
+    <message>
+        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
+        <translation>これはプログラム最初の起動です。Bitcoin Coreがデータを保存する場所を選択して下さい。</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+        <translation>Bitcoin Coreは、ビットコインのブロックチェーンのコピーを、ダウンロードして保存します。少なくとも%1ギガバイトのデータが、このディレクトリに保存されます。そしてそれは時間と共に増加します。またウォレットもこのディレクトリに保存されます。</translation>
+    </message>
     <message>
         <source>Use the default data directory</source>
         <translation>初期値のデータ ディレクトリを使用</translation>
@@ -775,6 +907,10 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>Bitcoin のコア</translation>
     </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>エラー: 指定のデータディレクトリ "%1" を作成できません。</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>エラー</translation>
@@ -845,10 +981,26 @@ Address: %4
         <source>Accept connections from outside</source>
         <translation>外部からの接続を許可する</translation>
     </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>外部からの接続を許可する</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>プロキシのIPアドレス (例えば IPv4: 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>トランザクションタブのコンテキストメニュー項目に表示する、サードパーティURL (例えばブロックエクスプローラ)。URL中の%sはトランザクションのハッシュ値に置き換えられます。垂直バー | で区切ることで、複数のURLを指定できます。</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>サードパーティのトランザクションURL</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>すべてのオプションを初期値に戻します。</translation>
@@ -861,6 +1013,10 @@ Address: %4
         <source>&amp;Network</source>
         <translation>ネットワーク (&amp;N)</translation>
     </message>
+    <message>
+        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+        <translation>(0 = 自動、0以上 = 指定した数のコアをフリーにする)</translation>
+    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>ウォレット (&amp;A)</translation>
@@ -873,6 +1029,14 @@ Address: %4
         <source>Enable coin &amp;control features</source>
         <translation>コインコントロール機能を有効化する (&amp;C)</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>未検証のおつりの使用を無効化すると、トランザクションが少なくとも1検証を獲得するまではそのトランザクションのおつりは利用できなくなります。これは残高の計算方法にも影響します。</translation>
+    </message>
+    <message>
+        <source>&amp;Spend unconfirmed change</source>
+        <translation>未検証のおつりを使用する (&amp;S)</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>
@@ -881,6 +1045,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>UPnP を使ってポートを割り当てる (&amp;U)</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>SOCKS5 プロキシ経由でBitcoinネットワークに接続する</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>SOCKS5 プロキシ経由で接続する (デフォルトプロキシ): (&amp;C)</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>プロキシの IP (&amp;I) :</translation>
@@ -933,6 +1105,10 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>インターフェース上の表示とコインの送信で使用する単位を選択します。</translation>
     </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation>コインコントロール機能を表示するかどうか。</translation>
+    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -953,6 +1129,18 @@ Address: %4
         <source>Confirm options reset</source>
         <translation>オプションのリセットの確認</translation>
     </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>変更を有効化するにはクライアントを再起動する必要があります。</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>クライアントは停止されます。続行しますか？</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>この変更はクライアントの再起動が必要です。</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>プロキシアドレスが無効です。</translation>
@@ -968,10 +1156,22 @@ Address: %4
         <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>表示された情報は古いかもしれません。接続が確立されると、あなたのウォレットは Bitcoin ネットワークと自動的に同期しますが、このプロセスはまだ完了していません。</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>監視限定:</translation>
+    </message>
+    <message>
+        <source>Available:</source>
+        <translation>利用可能:</translation>
+    </message>
     <message>
         <source>Your current spendable balance</source>
         <translation>あなたの利用可能残高</translation>
     </message>
+    <message>
+        <source>Pending:</source>
+        <translation>検証待ち:</translation>
+    </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>未検証の取引で利用可能残高に反映されていない数</translation>
@@ -984,6 +1184,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>完成していない採掘された残高</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>残高</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>合計:</translation>
@@ -992,14 +1196,30 @@ Address: %4
         <source>Your current total balance</source>
         <translation>あなたの現在の残高</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>監視限定アドレス内の現在の残高</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>使用可能:</translation>
+    </message>
     <message>
         <source>Recent transactions</source>
         <translation>最近のトランザクション</translation>
     </message>
+    <message>
+        <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>
     <message>
         <source>out of sync</source>
         <translation>同期していない</translation>
@@ -1019,10 +1239,22 @@ Address: %4
         <source>Payment request rejected</source>
         <translation>支払い要求は拒否されました</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>支払いリクエストのネットワークは現在のクライアントのネットワークに一致しません。</translation>
+    </message>
     <message>
         <source>Payment request has expired.</source>
         <translation>支払いのリクエストは期限切れです</translation>
     </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <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>
@@ -1031,10 +1263,46 @@ Address: %4
         <source>Cannot start bitcoin: click-to-pay handler</source>
         <translation>Bitcoin を起動できません: click-to-pay handler</translation>
     </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>支払い要求の取得先URLが無効です: %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 を解析できません! これは無効な Bitcoin アドレスあるいや不正な形式の URI パラメーターによって引き起こされる場合があります。</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>支払いリクエストファイルを処理しています</translation>
+    </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>支払いリクエストファイルを読み込めませんでした！無効な支払いリクエストファイルにより引き起こされた可能性があります。</translation>
+    </message>
+    <message>
+        <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+        <translation>カスタム支払いスクリプトに対する、検証されていない支払いリクエストはサポートされていません。</translation>
+    </message>
+    <message>
+        <source>Refund from %1</source>
+        <translation>%1 からの返金</translation>
+    </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>支払リクエスト %2 は大きすぎます（%3バイトですが、%4バイトまでが許されています）。</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>支払リクエストDoS保護</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>
@@ -1054,13 +1322,29 @@ Address: %4
         <source>User Agent</source>
         <translation>ユーザエージェント</translation>
     </message>
-    </context>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>アドレス／ホスト名</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping時間</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>総額</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Bitcoinアドレスを入力してください (例 %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1日</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1069,11 +1353,31 @@ Address: %4
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1秒</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>ネットワーク</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>未知</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>なし</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1ミリ秒</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1115,10 +1419,18 @@ Address: %4
         <source>Debug window</source>
         <translation>デバッグ ウインドウ</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>一般</translation>
+    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>使用中の OpenSSL のバージョン</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>使用中のBerkleyDBバージョン</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>起動した日時</translation>
@@ -1143,10 +1455,74 @@ Address: %4
         <source>Current number of blocks</source>
         <translation>現在のブロック数</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>受取</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>送金</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>ピア (&amp;P)</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>詳しい情報を見たいピアを選択してください。</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>方向</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>バージョン</translation>
+    </message>
     <message>
         <source>User Agent</source>
         <translation>ユーザエージェント</translation>
     </message>
+    <message>
+        <source>Services</source>
+        <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>Banスコア</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>送信済バイト数</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>受信済バイト数</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Ping時間</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>最終ブロックの日時</translation>
@@ -1223,7 +1599,31 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>%1経由</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>一度もなし</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>内向き</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>外向き</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>未知</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>取得中……</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1238,6 +1638,30 @@ Address: %4
         <source>&amp;Message:</source>
         <translation>メッセージ (&amp;M):</translation>
     </message>
+    <message>
+        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
+        <translation>以前利用した受取用アドレスのどれかを再利用します。アドレスの再利用はセキュリティおよびプライバシーにおいて問題があります。以前作成した支払リクエストを再生成するとき以外は利用しないでください。</translation>
+    </message>
+    <message>
+        <source>R&amp;euse an existing receiving address (not recommended)</source>
+        <translation>既存の受取用アドレスを再利用する (非推奨) (&amp;E)</translation>
+    </message>
+    <message>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation>支払リクエストが開始された時に表示される、支払リクエストに添える任意のメッセージです。注意：メッセージはBitcoinネットワークを通じて、支払と共に送られるわけではありません。</translation>
+    </message>
+    <message>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation>受取用アドレスに紐づく任意のラベル。</translation>
+    </message>
+    <message>
+        <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+        <translation>このフォームを使用して支払のリクエストを行いましょう。すべての項目は&lt;b&gt;任意入力&lt;/b&gt;です。</translation>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>リクエストする任意の金額。特定の金額をリクエストするのでない場合には、この欄は空白のままかゼロにしてください。</translation>
+    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>全ての入力項目をクリア</translation>
@@ -1246,6 +1670,18 @@ Address: %4
         <source>Clear</source>
         <translation>クリア</translation>
     </message>
+    <message>
+        <source>Requested payments history</source>
+        <translation>支払リクエスト履歴</translation>
+    </message>
+    <message>
+        <source>&amp;Request payment</source>
+        <translation>支払をリクエストする (&amp;R)</translation>
+    </message>
+    <message>
+        <source>Show the selected request (does the same as double clicking an entry)</source>
+        <translation>選択されたリクエストを表示する（項目をダブルクリックすることでも表示できます）</translation>
+    </message>
     <message>
         <source>Show</source>
         <translation>表示</translation>
@@ -1254,6 +1690,10 @@ Address: %4
         <source>Remove the selected entries from the list</source>
         <translation>リストから選択項目を削除</translation>
     </message>
+    <message>
+        <source>Remove</source>
+        <translation>削除</translation>
+    </message>
     <message>
         <source>Copy label</source>
         <translation>ラベルをコピーする</translation>
@@ -1344,7 +1784,15 @@ Address: %4
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
-    </context>
+    <message>
+        <source>(no message)</source>
+        <translation>（メッセージなし）</translation>
+    </message>
+    <message>
+        <source>(no amount)</source>
+        <translation>（金額なし）</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
@@ -1392,51 +1840,143 @@ Address: %4
         <translation>手数料差引後:</translation>
     </message>
     <message>
-        <source>Send to multiple recipients at once</source>
-        <translation>一度に複数の人に送る</translation>
+        <source>Change:</source>
+        <translation>釣り銭:</translation>
     </message>
     <message>
-        <source>Add &amp;Recipient</source>
-        <translation>受取人を追加 (&amp;R)</translation>
+        <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>Clear all fields of the form.</source>
-        <translation>全ての入力項目をクリア</translation>
+        <source>Custom change address</source>
+        <translation>カスタムおつりアドレス</translation>
     </message>
     <message>
-        <source>Clear &amp;All</source>
-        <translation>すべてクリア (&amp;A)</translation>
+        <source>Transaction Fee:</source>
+        <translation>トランザクション手数料：</translation>
     </message>
     <message>
-        <source>Balance:</source>
-        <translation>残高:</translation>
+        <source>Choose...</source>
+        <translation>選択……</translation>
     </message>
     <message>
-        <source>Confirm the send action</source>
-        <translation>送る操作を確認する</translation>
+        <source>collapse fee-settings</source>
+        <translation>手数料設定を折りたたむ</translation>
     </message>
     <message>
-        <source>S&amp;end</source>
-        <translation>送る (&amp;e)</translation>
+        <source>Minimize</source>
+        <translation>最小化</translation>
     </message>
     <message>
-        <source>Confirm send coins</source>
-        <translation>コインを送る確認</translation>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>カスタム手数料が1000satoshiに設定されている場合、トランザクションサイズが250バイトとすると、「1キロバイトあたり手数料」では250satoshiの手数料のみを支払いますが、「最小手数料」では1000satoshiを支払います。1キロバイトを超えるトランザクションの場合には、どちらの方法を選択したとしても1キロバイトあたりで支払われます。</translation>
     </message>
     <message>
-        <source>Copy quantity</source>
-        <translation>数量をコピーする</translation>
+        <source>per kilobyte</source>
+        <translation>1キロバイトあたり手数料</translation>
     </message>
     <message>
-        <source>Copy amount</source>
-        <translation>総額のコピー</translation>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>カスタム手数料が1000satoshiに設定されている場合、トランザクションサイズが250バイトとすると、「1キロバイトあたり手数料」では250satoshiの手数料のみを支払いますが、「最小手数料」では1000satoshiを支払います。1キロバイトを超えるトランザクションの場合には、どちらの方法を選択したとしても1キロバイトあたりで支払われます。</translation>
     </message>
     <message>
-        <source>Copy fee</source>
-        <translation>手数料をコピーする</translation>
+        <source>total at least</source>
+        <translation>最小手数料</translation>
     </message>
     <message>
-        <source>Copy after fee</source>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>ブロックの容量に比べてトランザクション流量が少ないうちは最小手数料のみの支払で十分です。しかしながらネットワークが処理しきれないほどbitcoinトランザクションの需要がひとたび生まれてしまった場合には、永遠に検証がされないトランザクションになってしまう可能性があることに注意してください。</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>（ツールチップをお読みください）</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>推奨：</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>カスタム：</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</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>Send as zero-fee transaction if possible</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>
+    <message>
+        <source>Add &amp;Recipient</source>
+        <translation>受取人を追加 (&amp;R)</translation>
+    </message>
+    <message>
+        <source>Clear all fields of the form.</source>
+        <translation>全ての入力項目をクリア</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>ダスト：</translation>
+    </message>
+    <message>
+        <source>Clear &amp;All</source>
+        <translation>すべてクリア (&amp;A)</translation>
+    </message>
+    <message>
+        <source>Balance:</source>
+        <translation>残高:</translation>
+    </message>
+    <message>
+        <source>Confirm the send action</source>
+        <translation>送る操作を確認する</translation>
+    </message>
+    <message>
+        <source>S&amp;end</source>
+        <translation>送る (&amp;e)</translation>
+    </message>
+    <message>
+        <source>Confirm send coins</source>
+        <translation>コインを送る確認</translation>
+    </message>
+    <message>
+        <source>%1 to %2</source>
+        <translation>%1 から %2</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>
@@ -1447,6 +1987,18 @@ Address: %4
         <source>Copy priority</source>
         <translation>優先度をコピーする</translation>
     </message>
+    <message>
+        <source>Copy change</source>
+        <translation>釣り銭をコピー</translation>
+    </message>
+    <message>
+        <source>Total Amount %1 (= %2)</source>
+        <translation>総送金額 %1 (= %2)</translation>
+    </message>
+    <message>
+        <source>or</source>
+        <translation>または</translation>
+    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>受取人のアドレスが不正です。再確認してください。</translation>
@@ -1467,10 +2019,42 @@ Address: %4
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>重複しているアドレスが見つかりました。1回の送信で同じアドレスに送ることは出来ません。</translation>
     </message>
+    <message>
+        <source>Transaction creation failed!</source>
+        <translation>トラザクションの作成に失敗しました!</translation>
+    </message>
+    <message>
+        <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
+        <translation>トランザクションは拒否されました。wallet.dat のコピーを使い、そしてコピーしたウォレットからコインを使用したことがマークされなかったときなど、ウォレットのいくつかのコインがすでに使用されている場合に、このエラーは起こるかもしれません。</translation>
+    </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>%1 よりも高い手数料は、異常に高い手数料だと考えられます。</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>最小手数料 %1 のみを支払う</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>%1 ブロック以内に検証が終わると予想されます。</translation>
+    </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>警告：無効なBitcoinアドレスです</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>（ラベル無し）</translation>
     </message>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation>警告：未知のおつりアドレスです</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>ダストをコピーする</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>送ってよろしいですか？</translation>
@@ -1502,6 +2086,14 @@ Address: %4
         <source>Choose previously used address</source>
         <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>
@@ -1514,10 +2106,30 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
+    <message>
+        <source>Remove this entry</source>
+        <translation>この項目を削除する</translation>
+    </message>
     <message>
         <source>Message:</source>
         <translation>メッセージ:</translation>
     </message>
+    <message>
+        <source>This is a verified payment request.</source>
+        <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>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation>bitcoin: URIに添付されていたメッセージです。これは参照用としてトランザクションとともに保存されます。注意：このメッセージはBitcoinネットワークを通して送信されるわけではありません。</translation>
+    </message>
+    <message>
+        <source>This is an unverified payment request.</source>
+        <translation>これは未検証の支払リクエストです。</translation>
+    </message>
     <message>
         <source>Pay To:</source>
         <translation>支払先:</translation>
@@ -1552,6 +2164,10 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>あなた自身を立証するためにあなたのアドレスでメッセージに署名することができます。フィッシング攻撃によってあなたを騙して署名を譲渡させようとするかもしれないので、不明確なものは絶対に署名しないように注意してください。あなたが同意する完全に詳細な声明にだけ署名してください。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>メッセージを署名するBitcoinアドレス</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>前に使用したアドレスを選ぶ</translation>
@@ -1604,6 +2220,10 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>メッセージを検証するために、署名するアドレスとメッセージ(改行、スペース、タブなどを正確にコピーしてください)、そして署名を入力します。中間者攻撃によってだまされることを避けるために、署名されたメッセージそのものよりも、署名を読み取られないように注意してください。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>メッセージの署名に使われたBitcoinアドレス</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>指定された Bitcoin アドレスで署名されたことを保証するメッセージを検証</translation>
@@ -1697,6 +2317,10 @@ Address: %4
         <source>Open until %1</source>
         <translation>ユニット %1 を開く</translation>
     </message>
+    <message>
+        <source>conflicted</source>
+        <translation>衝突</translation>
+    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/オフライン</translation>
@@ -1741,6 +2365,10 @@ Address: %4
         <source>own address</source>
         <translation>自分のアドレス</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>監視限定</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>ラベル</translation>
@@ -1761,6 +2389,14 @@ Address: %4
         <source>Debit</source>
         <translation>引き落とし額</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>総出金額</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>総入金額</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>取引手数料</translation>
@@ -1785,6 +2421,10 @@ Address: %4
         <source>Merchant</source>
         <translation>商人</translation>
     </message>
+    <message>
+        <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+        <translation>生成されたコインは使う前に%1のブロックを完成させる必要があります。あなたが生成した時、このブロックはブロック チェーンに追加されるネットワークにブロードキャストされました。チェーンに追加されるのが失敗した場合、状態が"不承認"に変更されて使えなくなるでしょう。これは、別のノードがあなたの数秒前にブロックを生成する場合に時々起こるかもしれません。</translation>
+    </message>
     <message>
         <source>Debug information</source>
         <translation>デバッグ情報</translation>
@@ -1847,6 +2487,10 @@ Address: %4
         <source>Address</source>
         <translation>Helbidea</translation>
     </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation>未成熟（%1検証。%2検証完了後に使用可能となります）</translation>
+    </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
         <translation><numerusform>%n 以上のブロックを開く</numerusform></translation>
@@ -1875,6 +2519,14 @@ Address: %4
         <source>Unconfirmed</source>
         <translation>未検証</translation>
     </message>
+    <message>
+        <source>Confirming (%1 of %2 recommended confirmations)</source>
+        <translation>検証中（%2の推奨検証数のうち、%1検証が完了）</translation>
+    </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>衝突</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>受信元</translation>
@@ -1895,6 +2547,10 @@ Address: %4
         <source>Mined</source>
         <translation>発掘した</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>監視限定</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
@@ -1911,6 +2567,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>取引の種類。</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>監視限定アドレスがこのトランザクションに含まれているかどうか</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>取引の宛先アドレス。</translation>
@@ -2006,6 +2666,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>トランザクション履歴をエクスポートする</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>監視限定</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>エクスポートに失敗しました</translation>
@@ -2018,6 +2682,10 @@ Address: %4
         <source>Exporting Successful</source>
         <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 (*.csv)</translation>
@@ -2057,7 +2725,11 @@ Address: %4
 </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>
@@ -2094,6 +2766,14 @@ Address: %4
         <source>Backup Failed</source>
         <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>
     <message>
         <source>Backup Successful</source>
         <translation>バックアップ成功</translation>
@@ -2133,49 +2813,42 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>外部からの接続を許可 (初期値:  -proxy または -connect を使用していない場合は1)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, rpcpassword を設定ファイルで設定してください:
-%s
-下記のランダムなパスワードの使用を推奨します:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(このパスワードを覚える必要はありません)
-ユーザー名とパスワードが同じであってはいけません。
-もしもファイルが存在しないなら、所有者だけが読み取れる権限で作成してください。
-また、問題が通知されるように alertnotify を設定することをお勧めします;
-例えば: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>指定のアドレスへバインドし、その上で常にリスンします。IPv6 は [ホスト名]:ポート番号 と表記します</translation>
     </message>
     <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>エラー: 取引は拒否されました。wallet.dat のコピーを使い、そしてコピーしたウォレットからコインを使用したことがマークされなかったときなど、ウォレットのいくつかのコインがすでに使用されている場合に、このエラーは起こるかもしれません。</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>ウォレットの全トランザクションを削除し、これらを-rescanオプションを用いることで起動時にブロックチェインのデータのみからリカバリします。</translation>
     </message>
     <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>エラー: この取引は、額、複雑さ、あるいは最近受け取った資金の使用のために、少なくとも %s の手数料が必要です!</translation>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>MITソフトウェアライセンスのもとで配布されています。付属のCOPYINGファイルまたは&lt;http://www.opensource.org/licenses/mit-license.php&gt;を参照してください。</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>ウォレットの取引を変更する際にコマンドを実行 (cmd の %s は TxID に置換される)</translation>
     </message>
+    <message>
+        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
+        <translation>このモードでは -genproclimit は何個のブロックをただちに生成するのか制御します。</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>スクリプト検証スレッドを設定 (%uから%dの間, 0 = 自動, &lt;0 = たくさんのコアを自由にしておく, 初期値: %d)</translation>
+    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>これはリリース前のテストビルドです - 各自の責任で利用すること - 採掘や商取引に使用しないでください</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation>このコンピュータの %s にバインドすることができません。おそらく Bitcoin Core は既に実行されています。</translation>
+    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>警告: -paytxfee が非常に高く設定されています! これは取引を送信する場合に支払う取引手数料です。</translation>
@@ -2196,10 +2869,18 @@ rpcpassword=%s
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>警告: wallet.dat が壊れたのでデータを復旧しました! オリジナルの wallet.dat は wallet.{timestamp}.bak として %s に保存されました; もしもあなたの残高や取引が正しくないならバックアップから復元してください。</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>与えられたネットマスクやIPアドレスから接続を行う、ホワイトリストのピア。複数回指定できます。</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(デフォルト: 1)</translation>
     </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;category&gt;は以下の値を指定できます：</translation>
+    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>壊れた wallet.dat から秘密鍵を復旧することを試す</translation>
@@ -2212,6 +2893,10 @@ rpcpassword=%s
         <source>Connect only to the specified node(s)</source>
         <translation>指定したノードだけに接続</translation>
     </message>
+    <message>
+        <source>Connection options:</source>
+        <translation>接続オプション：</translation>
+    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>破損したブロック データベースが見つかりました
@@ -2225,6 +2910,10 @@ rpcpassword=%s
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>自分の IP アドレスを発見 (初期値:  リスン中と -externalip を使用していない場合は1)</translation>
     </message>
+    <message>
+        <source>Do not load the wallet and disable wallet RPC calls</source>
+        <translation>ウォレットは読み込まず、ウォレットRPCコールを無効化する</translation>
+    </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
         <translation>ブロック データベースを今すぐ再構築しますか?</translation>
@@ -2246,12 +2935,12 @@ rpcpassword=%s
         <translation>ブロック データベースの開始エラー</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>エラー: ディスク容量不足!</translation>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>エラー：致命的な内部エラーが発生しました。詳細はdebug.logを参照してください</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>エラー: ウォレットはロックされ、取引を作成できません!</translation>
+        <source>Error: Disk space is low!</source>
+        <translation>エラー: ディスク容量不足!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
@@ -2261,22 +2950,50 @@ rpcpassword=%s
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>&lt;category&gt; が与えられなかった場合には、すべてのデバッグ情報が出力されます。</translation>
     </message>
+    <message>
+        <source>Importing...</source>
+        <translation>インポートしています……</translation>
+    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>不正なブロックあるいは、生成されていないブロックが見つかりました。ネットワークの datadir が間違っていませんか?</translation>
     </message>
+    <message>
+        <source>Invalid -onion address: '%s'</source>
+        <translation>無効な -onion アドレス：'%s'</translation>
+    </message>
     <message>
         <source>Not enough file descriptors available.</source>
         <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>Rebuild block chain index from current blk000??.dat files</source>
         <translation>現在の blk000??.dat ファイルからブロック チェーンのインデックスを再構築</translation>
     </message>
+    <message>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>データベースのキャッシュサイズをメガバイトで設定 (%dから%d。初期値: %d)</translation>
+    </message>
+    <message>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>最大ブロックサイズをバイトで設定 (初期値: %d)</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>Use UPnP to map the listening port (default: %u)</source>
+        <translation>リッスンポートの割当に UPnP を使用 (初期値: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>ブロックの検証中...</translation>
@@ -2289,6 +3006,10 @@ rpcpassword=%s
         <source>Wallet %s resides outside data directory %s</source>
         <translation>財布 %s はデータ・ディレクトリ%sの外にあります</translation>
     </message>
+    <message>
+        <source>Wallet options:</source>
+        <translation>ウォレットオプション：</translation>
+    </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>-txindex を変更するには -reindex を使用してデータベースを再構築する必要があります</translation>
@@ -2297,14 +3018,166 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>外部の blk000??.dat ファイルからブロックをインポート</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>指定したアクセス元からのJSON-RPC接続を許可する。有効な&lt;ip&gt;は、単一のIP (例 1.2.3.4)、ネットワーク/ネットマスク (1.2.3.4/255.255.255.0)、またはネットワーク/CIDR (1.2.3.4/24)です。このオプションは複数回指定できます。</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>リッスンする RPC アドレス %s、ポート %u の設定中にエラーが発生しました: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>指定されたアドレスおよび、そこに接続を行ってきたホワイトリストのピアに対してバインドを行います。IPv6の場合には [host]:port 表記を使用してください</translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>指定されたアドレスに対して JSON-RPC 接続をリッスンしするようバインドします。IPv6の場合には [host]:port 表記を使用してください。このオプションは複数回指定することが可能です (初期値: すべてのインターフェースに対してバインドする)</translation>
+    </message>
+    <message>
+        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
+        <translation>データ ディレクトリ %s のロックを取得することができません。おそらく Bitcoin Core は実行中です。</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>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>umask 077 ではなく、システムのデフォルトパーミッションで新規ファイルを作成する (ウォレット機能が無効化されていた場合にのみ有効)</translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>エラー: 内向きの接続をリッスンするのに失敗しました (エラー %s が返却されました)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>エラー: サポートされていない引数 -socks が見つかりました。SOCKSバージョンの設定はできないようになりました。SOCKS5プロキシのみがサポートされています。</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>関連のアラートをもらってもすごく長いのフォークを見てもコマンドを実行 (コマンドの中にあるの%sはメッセージから置き換えさせる)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>中継の際、この値未満の手数料 (BTC/Kb単位) はゼロであるとみなす (デフォルト: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>トランザクション作成の際、この値未満の手数料 (BTC/Kb単位) はゼロであるとみなす (デフォルト: %s)</translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>paytxfee が設定されていなかった場合、平均して n ブロック以内にトランザクションが検証され始めるのに十分な手数料を含める (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>-maxtxfee=&lt;amount&gt; の数量の指定が不正です: '%s' (トランザクションが詰まってしまうのを防ぐため、少なくとも %s の最小中継手数料を指定しなければいけません)</translation>
+    </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>中継および採掘を行う際の、データ運送トランザクションの中のデータの最大サイズ (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>ひとつのウォレットトランザクションで使用する合計手数料の最大値。低く設定し過ぎると大きなトランザクションの生成に失敗することがあります (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>保有するピアアドレスが少ない場合、DNS ルックアップによりピアアドレスを問い合わせる (-connect を使っていない場合の初期値: 1)</translation>
+    </message>
+    <message>
+        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+        <translation>最優先/最低手数料の最大サイズをバイトで指定 (初期値: %d)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>コイン生成が有効になっていた場合の利用スレッド数を設定する (-1 = すべてのコア, 初期値: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>この製品はOpenSSLプロジェクトにより開発されたソフトウェアをOpenSSLツールキットとして利用しています &lt;https://www.openssl.org/&gt;。また、Eric Young氏により開発された暗号ソフトウェア、Thomas Bernard氏により書かれたUPnPソフトウェアを用いています。</translation>
+    </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>bitcoindを用いる場合や、-server オプションをbitcoin-qtに指定する場合には、設定ファイルにrpcpasswordを設定しなければなりません:
+%s
+以下のランダムなパスワードを用いることが推奨されます:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(このパスワードを暗記する必要はありません)
+ユーザ名とパスワードは一致してはいけません。
+ファイルが存在しない場合には、所有者のみ読み込み可能なファイルパーミッションでファイルを作成してください。
+またalertnotifyを設定し、問題発生時に通知が行くようにすることをおすすめします;
+例: alertnotify=echo %%s | mail -s "Bitcoinアラート" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>警告: -maxtxfee が非常に高く設定されています！ひとつのトランザクションでこの量の手数料が支払われてしまうことがあります。</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>警告： あなたのPCの日付と時刻が正しいことを確認して下さい！ もしあなたの時計が正しくなければBitcoin Coreが正確に動作しません。</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>ホワイトリストのピアはDoSによるアクセス禁止処理が無効化され、トランザクションは例えmempool内に既に存在していたとしても常にリレーされます。これは例えばゲートウェイに対して有用です</translation>
+    </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>公開 REST リクエストを許可する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Cannot resolve -whitebind address: '%s'</source>
+        <translation>-whitebind アドレス '%s' を解決できません</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>SOCKS5 プロキシ経由で接続する</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Bitcoin Core 開発者</translation>
+    </message>
+    <message>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>-rpcbind の値 %s をネットワークアドレスとして解釈できませんでした</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>wallet.dat の読み込みに失敗しました: ウォレットの読み込みにはより新しいバージョンの Bitcoin Core が必要です</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>エラー: サポートされていない引数 -tor が見つかりました。-onion を使用してください。</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>送信するトランザクションに付加する手数料 (BTC/kB単位) (初期値: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <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 -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-maxtxfee=&lt;amount&gt; に対する無効な数量です: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -2313,6 +3186,26 @@ rpcpassword=%s
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>不正な額 -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>-paytxfee=&lt;amount&gt; に対する無効な数量です: '%s' (少なくとも %s でなければいけません)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>-whitelist に対する無効なネットマスクです: '%s'</translation>
+    </message>
+    <message>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>最大で &lt;n&gt; 個の孤立したトランザクションをメモリの中に保持する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>-whitebind を用いてポートを指定する必要があります: '%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>RPC SSL オプション: (SSLのセットアップ手順はビットコインWikiを参照してください)</translation>
@@ -2321,10 +3214,26 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>RPCサーバのオプション:</translation>
     </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>&lt;n&gt; 個のネットワークメッセージごとにひとつをランダムに捨てる</translation>
+    </message>
+    <message>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>&lt;n&gt;個のネットワークメッセージごとにひとつをランダムに改変する</translation>
+    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>可能な場合には手数料ゼロのトランザクションとしてトランザクションを送信する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>すべてのデバッグオプションを表示する (使い方: --help -help-debug)</translation>
+    </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>クライアント起動時に debug.log ファイルを縮小 (初期値: -debug オプションを指定しない場合は1)</translation>
@@ -2333,6 +3242,10 @@ rpcpassword=%s
         <source>Signing transaction failed</source>
         <translation>取引の署名に失敗しました</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>これは実験的なソフトウェアです。</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>取引の額が小さ過ぎます</translation>
@@ -2341,10 +3254,18 @@ rpcpassword=%s
         <source>Transaction amounts must be positive</source>
         <translation>取引の額は0より大きくしてください</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>手数料ポリシーに対してトランザクションが大きすぎます</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>取引が大き過ぎます</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>このコンピュータの %s にバインドすることができません (バインドが返したエラーは %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>リスン ポートの割当に UPnP を使用 (初期値: リスン中は1)</translation>
@@ -2353,6 +3274,10 @@ rpcpassword=%s
         <source>Username for JSON-RPC connections</source>
         <translation>JSON-RPC 接続のユーザー名</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>ウォレットが書き直される必要がありました: 完了するために Bitcoin Core を再起動します</translation>
+    </message>
     <message>
         <source>Warning</source>
         <translation>警告</translation>
@@ -2361,6 +3286,22 @@ rpcpassword=%s
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>警告: このバージョンは古いのでアップグレードが必要です!</translation>
     </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>警告: サポートされていない引数 -benchmark は無視されました。-debug=bench を使用してください。</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>警告: サポートされていない引数 -debugnet は無視されました。-debug=net を使用してください。</translation>
+    </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>ウォレットからすべてのトランザクションを消去しています...</translation>
+    </message>
+    <message>
+        <source>on startup</source>
+        <translation>起動時</translation>
+    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat が壊れ、復旧に失敗しました</translation>
@@ -2401,14 +3342,170 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat 読み込みエラー: ウォレットが壊れました</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = トランザクションのメタデータ、例えばアカウントの所有者や支払リクエストの内容を保持する, 2 = トランザクションのメタデータを破棄する)</translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>&lt;n&gt; メガバイトごとにメモリプールからデータベースのアクティビティをディスクログに書き出す (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>-checkblocks のブロックの検証レベル (0-4, 初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>ブロックの採掘時にトランザクションの優先度と1kBあたりの手数料をログに残す (デフォルト: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>getrawtransaction rpc 呼び出し時に用いる、完全なトランザクションインデックスを保持する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>不正なピアを再接続するまでの秒数 (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>デバッグ情報を出力する (初期値: %u, &lt;category&gt; の指定は任意です)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Tor 秘匿サービスを通し、別々の SOCKS5 プロキシを用いることでピアに到達する (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(デフォルト: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>受付可能な暗号化方式 (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>DNS ルックアップを通してピアアドレスを常に問い合わせる (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>セーフモードを無効化し、実際のセーフモードイベントも無効化する (初期値: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat 読み込みエラー</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>セーフモードを強制する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>コインを生成 (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>起動時に点検するブロック数 (初期値: %u, 0=すべて)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>デバッグ出力にIPアドレスを含める (初期値: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>無効な -proxy アドレス: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>署名キャッシュのサイズを &lt;n&gt; エントリーに制限する (デフォルト: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>&lt;port&gt; で JSON-RPC 接続をリスン (初期値: %u、testnet は %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>接続のリッスンを &lt;port&gt; で行う (初期値: %u、testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>ピアの接続数を最大でも &lt;n&gt; 個に維持する (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>接続毎の最大受信バッファ &lt;n&gt;*1000 バイト (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>接続毎の最大送信バッファ &lt;n&gt;*1000 バイト (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>内蔵のチェックポイントと一致するブロック チェーンのみを許可 (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>デバッグ出力にタイムスタンプを付ける (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>データ運送トランザクションのリレーおよび採掘を行う (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>P2SHでないマルチシグトランザクションをリレーする (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>ウォレットを定期的に書き出すためのスレッドを走らせる (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>サーバ証明書ファイル (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>サーバの秘密鍵 (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>key pool のサイズを &lt;n&gt; (初期値: %u) にセット</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>最小ブロックサイズをバイトで設定 (初期値: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>RPC サービスのスレッド数を設定 (初期値: %d)</translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>ウォレットDB環境内にDB_PRIVATEフラグを設定する (デフォルト: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>設定ファイルの指定 (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>接続のタイムアウトをミリセコンドで指定 (最小値: 1, 初期値: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>pid ファイルの指定 (初期値: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>トランザクション送信時に未検証のおつりを使用する (デフォルト: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>ディスクからブロックを読み込んだ後に終了する (デフォルト: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>不正なピアを切断するためのしきい値 (初期値: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>-onlynet で指定された '%s' は未知のネットワークです</translation>
@@ -2425,10 +3522,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-paytxfee=&lt;amount&gt; の額 '%s' が無効です</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>無効な総額</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>残高不足</translation>
@@ -2461,10 +3554,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>読み込み完了</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s オプションを使うには</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>エラー</translation>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 3faad159adcc..b2831b79e781 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -1,10 +1,6 @@
 <TS language="ka" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>დააკლიკეთ ორჯერ მისამართის ან ნიშნულის შესაცვლელად</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>ახალი მისამართის შექმნა</translation>
@@ -2330,30 +2326,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>გარედან შეერთებების დაშვება (ნაგულისხმევი: 1 თუ არ გამოიყენება -proxy ან -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, მიუთითეთ rpcpassword საკონფიგურაციო ფაილში:
-%s
-რეკომენდებულია შემდეგი შემთხვევითი პაროლი:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(ამის დამახსოვრება არ გჭირდებათ)
-სახელი და პაროლი ერთმანეთს არ უნდა ემთხვეოდეს.
-თუ ფაილი არ არსებობს, შექმენით იგი უფლებებით owner-readable-only.
-ასევე რეკომენდებულია დააყენოთ alertnotify რათა მიიღოთ შეტყობინებები პრობლემების შესახებ;
-მაგალითად: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>მოცემულ მისამართზე მიჯაჭვა მუდმივად მასზე მიყურადებით. გამოიყენეთ [host]:port ფორმა IPv6-სათვის</translation>
@@ -2362,14 +2334,6 @@ rpcpassword=%s
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>გადასვლა რეგრესული ტესტირების რეჟიმში, რომელიც იყენებს სპეციალურ ჯაჭვს ბლოკების დაუყოვნებლივი პოვნის შესაძლებლობით.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>შეცდომა: ტრანსაქცია უარყოფილია! შესაძლოა მონეტების ნაწილი თქვენი საფულიდან უკვე გამოყენებულია, რაც შეიძლება მოხდეს wallet.dat-ის ასლის გამოყენებისას, როცა მონეტები გაიგზავნა სხვა ასლიდან, აქ კი არ არის გაგზავნილად მონიშნული.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>შეცდომა: ტრანსაქცია მოითხოვს საკომისიოს მინიმუმ %s რაოდენობის, სირთულის ან ბოლოს მიღებული თანხების შესაბამისად!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>კომანდის შესრულება საფულის ტრანსაქციის ცვლილებისას (%s კომანდაში ჩანაცვლდება TxID-ით)</translation>
@@ -2450,10 +2414,6 @@ rpcpassword=%s
         <source>Error: Disk space is low!</source>
         <translation>შეცდომა: დისზე არ არის ადგილი!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>შეცდომა: საფულე დაბლოკილია, ტრანსაქცია ვერ შეიქმნება!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>ვერ ხერხდება პორტების მიყურადება. თუ გსურთ, გამოიყენეთ -listen=0.</translation>
@@ -2642,10 +2602,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>დაუშვებელი მნიშვნელობა -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>დაუშვებელი თანხა</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>არ არის საკმარისი თანხა</translation>
@@ -2678,10 +2634,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>ჩატვირთვა დასრულებულია</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s ოპციის გამოსაყენებლად</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>შეცდომა</translation>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index 5a39417a7ae6..1623c25f42c8 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -1,10 +1,6 @@
 <TS language="kk_KZ" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Адресті немесе белгіні өзгерту үшін екі рет шертіңіз</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Жаңа адрес енгізу</translation>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index efc41ec6b708..d0119a21b007 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1,10 +1,6 @@
 <TS language="ko_KR" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>지갑 주소나 이름을 수정하려면 더블클릭하세요.</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>새 주소 만들기</translation>
@@ -2346,16 +2342,6 @@ Address: %4
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>선택된 주소로 고정하며 항상 리슨(Listen)합니다. IPv6 프로토콜인 경우  [host]:port 방식의 명령어 표기법을 사용합니다.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>에러: 거래가 거부되었습니다! 이런 일이 생길 수 있습니다 만약 몇개의 코인들을 지갑에서 이미 사용했다면요, 예를 들어 만약 당신이 wallet.dat를 복사해서 사용했거나 코인들을 사용 후에 복사했다면 여기선 표시가 안되서 사용할 수 없습니다
-
--번역은 했으나 약간 이상한점이 있어서 수정해야함-</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>오류 : 해당 거래는 송금액, 다중 거래, 최근 수령한 금액의 사용 등의 이유로 최소 %s 이상의 송금 수수료가 필요합니다.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다)</translation>
@@ -2440,10 +2426,6 @@ Address: %4
         <source>Error: Disk space is low!</source>
         <translation>오류: 디스크 공간이 부족합니다!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>오류: 지갑이 잠금상태여서 거래를 생성할 수 없습니다!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>어떤 포트도 반응하지 않습니다. 사용자 반응=0 만약 원한다면</translation>
@@ -2532,10 +2514,6 @@ Address: %4
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>최저 거래 수수료가 부족합니다. -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>블럭 색인을 발견하면 구동 시 블럭을 출력합니다.</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL 옵션: (비트코인 위키의 SSL 설정 설명서 참고)</translation>
@@ -2664,10 +2642,6 @@ Address: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-paytxfee=&lt;amount&gt;에 대한 양이 잘못되었습니다: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>효력없는 금액</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>자금 부족</translation>
@@ -2700,10 +2674,6 @@ Address: %4
         <source>Done loading</source>
         <translation>로딩 완료</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s 옵션을 사용하려면</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>오류</translation>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index c399f3615935..7539327cda2a 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1,10 +1,6 @@
 <TS language="la" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dupliciter-clicca ut inscriptionem vel titulum mutes</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Crea novam inscriptionem</translation>
@@ -1514,42 +1510,10 @@ Inscriptio: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accipe conexiones externas (praedefinitum: 1 nisi -proxy neque -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, necesse est te rpcpassword constituere in plica configurationis:
-%s
-Hortatur te hanc fortuitam tesseram uti:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(non est necesse te hanc tesseram meminisse)
-Nomen usoris et tessera eadem esse NON POSSUNT.
-Si plica non existit, eam crea cum permissionibus ut eius dominus tantum sinitur id legere.
-Quoque hortatur alertnotify constituere ut tu notificetur de problematibus;
-exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Conglutina ad inscriptionem datam et semper in eam ausculta.  Utere [moderatrum]:porta notationem pro IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: Transactio eiecta est! Hoc possit accidere si alii nummorum in cassidili tuo iam soluti sint, ut si usus es exemplar de wallet.dat et nummi soluti sunt in exemplari sed non hic notati ut soluti.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: Huic transactioni necesse est merces saltem %s propter eius magnitudinem, complexitatem, vel usum recentum acceptorum nummorum!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Facere mandatum quotiescumque cassidilis transactio mutet (%s in mandato sbstituitur ab TxID)</translation>
@@ -1614,10 +1578,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Error: Disk space is low!</source>
         <translation>Error: Inopia spatii disci!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Error: Cassidile seratum, non posse transactionem creare!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Non potuisse auscultare in ulla porta.  Utere -listen=0 si hoc vis.</translation>
@@ -1758,10 +1718,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantitas non valida pro -paytxfee=&lt;quantitas&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Quantitas non valida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Inopia nummorum</translation>
@@ -1794,10 +1750,6 @@ exempli gratia: alertnotify=echo %%s | mail -s "Bitcoin Notificatio" admin@foo.c
         <source>Done loading</source>
         <translation>Completo lengendi</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Ut utaris optione %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Error</translation>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index 1f70400df61a..e18e7237567a 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1,10 +1,6 @@
 <TS language="lt" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Spragtelėkite, kad pakeistumėte adresą arba žymę</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Sukurti naują adresą</translation>
@@ -1733,10 +1729,6 @@ Adresas: %4</translation>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neteisinga suma -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Neteisinga suma</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nepakanka lėšų</translation>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index ac5a1a1396cd..66669a63bd3c 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -1,10 +1,6 @@
 <TS language="lv_LV" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Adresi vai nosaukumu rediģē ar dubultklikšķi</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Izveidot jaunu adresi</translation>
@@ -2234,10 +2230,6 @@ Adrese: %4
         <source>Error: Disk space is low!</source>
         <translation>Kļūda: Zema diska vieta!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Kļūda: Maciņš ir aizslēgts, nevar izveidot transakciju!</translation>
-    </message>
     <message>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Ja &lt;category&gt; nav norādīta, izvadīt visu atkļūdošanas informāciju.</translation>
@@ -2370,10 +2362,6 @@ Adrese: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nederīgs daudzums priekš -paytxfree=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Nederīgs daudzums</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nepietiek bitkoinu</translation>
@@ -2406,10 +2394,6 @@ Adrese: %4
         <source>Done loading</source>
         <translation>Ielāde pabeigta</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Izmantot opciju %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Kļūda</translation>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index f1b0174111d7..5f016fd80d7f 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -1,10 +1,6 @@
 <TS language="mn" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Хаяг эсвэл шошгыг ѳѳрчлѳхийн тулд хоёр удаа дар</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Шинэ хаяг нээх</translation>
@@ -1037,10 +1033,6 @@ Address: %4
         <source>Invalid -proxy address: '%s'</source>
         <translation>Эдгээр прокси хаягнууд буруу байна: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Буруу хэмжээ</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Таны дансны үлдэгдэл хүрэлцэхгүй байна</translation>
@@ -1065,10 +1057,6 @@ Address: %4
         <source>Done loading</source>
         <translation>Ачааллаж дууслаа</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s сонголтыг ашиглахын тулд</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Алдаа</translation>
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index d2e8efbb4993..7ab50d66149a 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -1,10 +1,6 @@
 <TS language="ms_MY" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Klik dua kali untuk mengubah alamat atau label</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Cipta alamat baru</translation>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index bdde3da53476..f54fd8059b03 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -2,12 +2,12 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dobbelklikk for å redigere adresse eller merkelapp</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Høyreklikk for å redigere adressen eller merkelappen</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Lag en ny adresse</translation>
+        <translation>Opprett en ny addresse</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -91,7 +91,7 @@
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>Ekport Feilet</translation>
+        <translation>Eksportering feilet</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
@@ -476,7 +476,7 @@
     </message>
     <message>
         <source>Up to date</source>
-        <translation>Ajour</translation>
+        <translation>Oppdatert</translation>
     </message>
     <message numerus="yes">
         <source>Processed %n blocks of transaction history.</source>
@@ -484,7 +484,7 @@
     </message>
     <message>
         <source>Catching up...</source>
-        <translation>Kommer ajour...</translation>
+        <translation>Laster ned...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -508,7 +508,7 @@ Adresse: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Lommeboken er &lt;b&gt;kryptert&lt;/b&gt; og for tiden &lt;b&gt;ulåst&lt;/b&gt;</translation>
+        <translation>Lommeboken er &lt;b&gt;kryptert&lt;/b&gt; og for tiden &lt;b&gt;låst opp&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
@@ -554,7 +554,7 @@ Adresse: %4
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>Etter Gebyr:</translation>
+        <translation>Totalt:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -562,15 +562,15 @@ Adresse: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation>velg (fjern) alt</translation>
+        <translation>velg (fjern) alle</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation>Tremodus</translation>
+        <translation>Trevisning</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation>Listemodus</translation>
+        <translation>Listevisning</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -634,7 +634,7 @@ Adresse: %4
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>Kopier fra gebyr</translation>
+        <translation>Kopier totalt</translation>
     </message>
     <message>
         <source>Copy bytes</source>
@@ -1288,6 +1288,14 @@ Adresse: %4
         <source>Refund from %1</source>
         <translation>Refundering fra %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Betalingsforespørsel %2 er for stor (%3 bytes, tillatt %4 bytes).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Betalingsforespørsel DoS-beskyttelse</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Feil i kommunikasjonen med %1: %2</translation>
@@ -2806,29 +2814,6 @@ Adresse: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Ta imot tilkoblinger fra utsiden (standardverdi: 1 hvis uten -proxy eller -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, du må angi rpcpassord i konfigurasjonsfilen.
-%s
-Det anbefales at du bruker det følgende tilfeldige passordet:
-rpcbruker=bitcoinrpc
-rpcpassord=%s
-(du behøver ikke å huske passordet)
-Brukernavnet og passordet MÅ IKKE være like.
-Om filen ikke eksisterer, opprett den nå med eier-kun-les filrettigheter.
-Det er også anbefalt at å sette varselsmelding slik du får melding om problemer.
-For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind til angitt adresse. Bruk [vertsmaskin]:port notasjon for IPv6</translation>
@@ -2845,14 +2830,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Gå til modus for regresjonstesting, som bruker en spesiell blokkjede der blokker kan bli løst momentant.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Feil: Transaksjonen ble avvist! Dette kan skje hvis noen av myntene i lommeboken allerede er blitt brukt, som om du brukte en kopi av wallet.dat og myntene ble brukt i kopien, men ikke markert som brukt her.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Feil: Denne transaksjonen trenger et gebyr på minst %s på grunn av beløpet, kompleksiteten eller bruk av allerede mottatte penger!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Kjør kommando når en lommeboktransaksjon endres (%s i kommando er erstattet med TxID)</translation>
@@ -2965,10 +2942,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Error: Disk space is low!</source>
         <translation>Feil: Lite ledig lagringsplass!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Feil: Lommebok låst, kan ikke opprette transaksjon!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Kunne ikke lytte på noen port. Bruk -listen=0 hvis det er dette du vil.</translation>
@@ -3093,10 +3066,22 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Gebyrer (i BTC/Kb) mindre enn dette anses som null gebyr for laging av transaksjoner (standardverdi: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Hvis paytxfee ikke er angitt, inkluderer da nok i gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Ugyldig beløp for -maxtxfee=&lt;amount&gt;: '%s' (må være minst minimum relé gebyr på %s for å hindre fastlåste transaksjoner)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Maksimal størrelse på data i databærende transaksjoner vi videresender og ufører graving på (standardverdi: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maksimal sum av gebyrer som kan brukes i en enkelt lommebokstransaksjon, settes den for lavt kan store transaksjoner bli avbrutt (standardverdi: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
@@ -3113,6 +3098,34 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; og kryptografisk programvare skrevet av Eric Young og UPnP-programvare skrevet av Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>For å bruke bitcoind, eller -server valget til bitcoin-qt, må du angi et rpcpassord i konfigurasjonsfilen:
+%s
+Det anbefales at du bruker det følgende tilfeldige passordet:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(du behøver ikke å huske passordet)
+Brukernavnet og passordet MÅ IKKE være like.
+Om filen ikke eksisterer, opprett den med eier-kun-les filrettigheter.
+Det er også anbefalt at å sette varselsmelding slik du får melding om problemer;
+for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Advarsel: -paytxfee er satt veldig høyt! Så stort gebyr kan bli betalt ved en enkelt transaksjon.</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>Advarsel: Vennligst undersøk at din datamaskin har riktig dato og klokkeslett! Hvis klokken er stilt feil vil ikke Bitcoin Core fungere riktig.</translation>
@@ -3121,6 +3134,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Hvitlistede noder kan ikke DoS-blokkeres, og deres transaksjoner videresendes alltid, selv om de allerede er i minnelageret. Nyttig f.eks. for en gateway.</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Godta offentlige REST forespørsler (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan ikke løse -whitebind-adresse: '%s'</translation>
@@ -3157,6 +3174,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Sunnhetssjekk ved oppstart feilet. Bitcoin Core stenges ned.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ugyldig beløp for -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ugyldig mengde for -minrelaytxfee=&lt;beløp&gt;: '%s'</translation>
@@ -3173,10 +3194,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Ugyldig nettmaske spesifisert i -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Behold på det meste &lt;n&gt; blokker i minnet som ikke er mulig å koble (standardverdi: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Hold på det meste &lt;n&gt; transaksjoner som ikke kobles i minnet (standardverdi: %u)</translation>
@@ -3189,10 +3206,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Node relay options:</source>
         <translation>Node alternativer for videresending:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Skriv ut blokken ved oppstart, hvis funnet i blokkindeksen</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL-valg: (se Bitcoin Wiki for oppsettsinstruksjoner for SSL)</translation>
@@ -3241,6 +3254,10 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Transaction amounts must be positive</source>
         <translation>Transaksjonsbeløpet må være positivt</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaksjon for stor for gebyrpolitikken</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transaksjonen er for stor</translation>
@@ -3337,10 +3354,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Hvor grundig blokkverifiseringen til -checkblocks er (0-4, standardverdi: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Hvis paytxfee ikke er angitt, inkluderer da nok gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Logg transaksjonsprioritet og gebyr per kB under blokkutvinning (standardverdi: %u)</translation>
@@ -3433,10 +3446,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Sett inn tidsstempel i front av feilsøkingsdata (standardverdi: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Skriv ut blokktreet ved oppstart (standardverdi: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Videresend og ufør graving av databærende transaksjoner (standardverdi: %u)</translation>
@@ -3513,10 +3522,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ugyldig beløp for -paytxfee=&lt;beløp&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ugyldig beløp</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Utilstrekkelige midler</translation>
@@ -3549,10 +3554,6 @@ For eksempel: varselmelding=echo %%s | mail -s "Bitcoin Varsel" admin@foo.com</t
         <source>Done loading</source>
         <translation>Ferdig med lasting</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>For å bruke %s opsjonen</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Feil</translation>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index f5f708fac935..71389b634678 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -2,12 +2,12 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dubbelklik om het adres of label te wijzigen</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Klik met de rechtermuisknop om het adres of label te wijzigen</translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Maak een nieuw adres aan</translation>
+        <translation>Maak een nieuw adres</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -15,7 +15,7 @@
     </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
-        <translation>Kopieer het huidig geselecteerde adres naar het klembord</translation>
+        <translation>Kopieer het geselecteerde adres naar het klembord</translation>
     </message>
     <message>
         <source>&amp;Copy</source>
@@ -1288,6 +1288,14 @@ Adres: %4
         <source>Refund from %1</source>
         <translation>Restitutie van %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Betalingsaanvraag %2 is te groot (%3 bytes, %4 bytes toegestaan).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Betalingsaanvraag DoS bescherming</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Fout bij communiceren met %1: %2</translation>
@@ -1852,18 +1860,34 @@ Adres: %4
         <source>Choose...</source>
         <translation>Kies...</translation>
     </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>Transactiekosteninstellingen verbergen</translation>
+    </message>
     <message>
         <source>Minimize</source>
         <translation>Minimaliseer</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Als de aangepaste toeslag is ingesteld op 1000 satoshis en de transactie is maar 250 bytes, dan wordt bij "per kilobyte" 250 satoshis aan toeslag berekend, terwijl er bij "tenminste" 1000 satoshis worden berekend. Voor transacties die groter zijn dan een kilobyte, wordt in beide gevallen per kilobyte de toeslag berekend.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>per kilobyte</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Als de aangepaste toeslag is ingesteld op 1000 satoshis en de transactie is maar 250 bytes, dan wordt bij "per kilobyte" 250 satoshis aan toeslag berekend, terwijl er bij "totaal tenminste" 1000 satoshis worden berekend. Voor transacties die groter zijn dan een kilobyte, wordt in beide gevallen per kilobyte de toeslag berekend.</translation>
+    </message>
     <message>
         <source>total at least</source>
         <translation>totaal ten minste</translation>
     </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>De minimale toeslag betalen is prima mits het transactievolume kleiner is dan de ruimte in de blokken. Let wel op dat dit tot gevolg kan hebben dat een transactie nooit wordt bevestigd als er meer vraag is naar bitcointransacties dan het netwerk kan verwerken.</translation>
+    </message>
     <message>
         <source>(read the tooltip)</source>
         <translation>(lees de tooltip)</translation>
@@ -2790,28 +2814,6 @@ Adres: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepteer verbindingen van buitenaf (standaard: 1 als geen -proxy of -connect is opgegeven)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, u moet een RPC-wachtwoord instellen in het configuratiebestand: %s
-U wordt aangeraden het volgende willekeurige wachtwoord te gebruiken:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(u hoeft dit wachtwoord niet te onthouden)
-De gebruikersnaam en wachtwoord mogen niet hetzelfde zijn.
-Als het bestand niet bestaat, make hem dan aan met leesrechten voor enkel de eigenaar.
-Het is ook aan te bevelen "alertnotify" in te stellen zodat u op de hoogte gesteld wordt van problemen;
-bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind aan opgegeven adres en luister er altijd op. Gebruik [host]:port notatie voor IPv6</translation>
@@ -2828,14 +2830,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Schakel regressietest-modus in, die een speciale blokketen gebruikt waarin blokken onmiddellijk opgelost kunnen worden.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fout: De transactie was afgewezen! Dit kan gebeuren als sommige munten in uw portemonnee al eerder uitgegeven zijn, zoals wanneer u een kopie van uw wallet.dat heeft gebruikt en in de kopie deze munten zijn uitgegeven, maar in deze portemonnee die munten nog niet als zodanig zijn gemarkeerd.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fout: Deze transactie vereist transactiekosten van tenminste %s, vanwege zijn grootte, complexiteit, of het gebruik van onlangs ontvangen munten!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID)</translation>
@@ -2948,10 +2942,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error: Disk space is low!</source>
         <translation>Fout: Weinig vrije diskruimte!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Fout: Portemonnee vergrendeld, aanmaak transactie niet mogelijk!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Mislukt om op welke poort dan ook te luisteren. Gebruik -listen=0 as u dit wilt.</translation>
@@ -3060,10 +3050,22 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Fout: luisteren naar binnenkomende verbindingen mislukt (luisteren gaf foutmelding %s)</translation>
     </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Fout: er is een niet-ondersteund argument -socks aangetroffen. Het instellen van de SOCKS-versie is niet langer mogelijk. Alleen SOCKS5-proxy's worden ondersteund.</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Voer commando uit zodra een waarschuwing is ontvangen of wanneer we een erg lange fork detecteren (%s in commando wordt vervangen door bericht)</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Toeslagen (in BTC/Kb) kleiner dan dit worden beschouwd als geen vergoeding (voor doorgeven) (standaard: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Toeslagen (in BTC/Kb) kleiner dan dit worden beschouwd als geen vergoeding transactieaanmaak (standaard: %s)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Stel maximumgrootte in bytes in voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: %d)</translation>
@@ -3076,6 +3078,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Dit product bevat software dat ontwikkeld is door het OpenSSL Project voor gebruik in de OpenSSL Toolkit &lt;https://www.openssl.org/&gt; en cryptografische software geschreven door Eric Young en UPnP software geschreven door Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Let op: -maxtxfee is erg hoog ingesteld! Transactiekosten van dergelijke groottes kunnen in een enkele transactie worden betaald.</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>Waarschuwing: Controleer dat de datum en tijd van uw computer correct zijn ingesteld! Bij een onjuist ingestelde klok zal Bitcoin Core niet goed werken.</translation>
@@ -3084,6 +3090,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Goedgekeurde peers kunnen niet ge-DoS-banned worden en hun transacties worden altijd doorgestuurd, zelfs als ze reeds in de mempool aanwezig zijn, nuttig voor bijv. een gateway</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accepteer publieke REST-requests (standaard: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan -whitebind adres niet herleiden: '%s'</translation>
@@ -3120,6 +3130,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Initialisatie sanity check mislukt. Bitcoin Core is aan het afsluiten.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Ongeldig bedrag voor -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ongeldig bedrag voor -minrelaytxfee=&lt;bedrag&gt;: '%s'</translation>
@@ -3136,10 +3150,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Ongeldig netmask gespecificeerd in -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Houd maximaal &lt;n&gt; onverbonden blokken in geheugen (standaard: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Houd maximaal &lt;n&gt; onverbonden transacties in geheugen (standaard: %u)</translation>
@@ -3152,10 +3162,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Node relay options:</source>
         <translation>Node relay opties:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Toon block bij opstarten, wanneer gevonden in block index</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL opties: (zie de Bitcoin Wiki voor SSL installatie-instructies)</translation>
@@ -3204,6 +3210,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Transaction amounts must be positive</source>
         <translation>Transactiebedragen moeten positief zijn</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>De transactie is te groot voor het toeslagenbeleid</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transactie te groot</translation>
@@ -3300,6 +3310,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Hoe grondig de blokverificatie van -checkblocks is (0-4, standaard: %u)</translation>
     </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Log transactieprioriteit en -kosten per kB bij het mijnen van blokken (standaard: %u)</translation>
+    </message>
     <message>
         <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
         <translation>Onderhoud een volledige transactieindex, gebruikt door de getrawtransaction rpc call (standaard: %u)</translation>
@@ -3344,6 +3358,10 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>How many blocks to check at startup (default: %u, 0 = all)</source>
         <translation>Aantal te checken blokken bij het opstarten (standaard: %u, 0 = allemaal)</translation>
     </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>IP-adressen toevoegen in de debuguitvoer (standaard: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Ongeldig -proxy adres: '%s'</translation>
@@ -3380,10 +3398,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Prepend debug output met tijdstempel (standaard: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Toon block structuur bij opstarten (default: %u)</translation>
-    </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Draai een proces om de wallet periodiek te flushen (default: %u)</translation>
@@ -3452,10 +3466,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ongeldig bedrag voor -paytxfee=&lt;bedrag&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ongeldig bedrag</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Ontoereikend saldo</translation>
@@ -3488,10 +3498,6 @@ bijvoorbeeld: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</tran
         <source>Done loading</source>
         <translation>Klaar met laden</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Om de %s optie te gebruiken</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Fout</translation>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index b0a92a1578f0..1aafea3936ca 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1,10 +1,6 @@
 <TS language="pam" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Pindutan meng makatidduang besis ban ayalilan me ing address o label</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Maglalang kang bayung address</translation>
@@ -1542,10 +1538,6 @@ Address: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Eya maliari ing alaga keng -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ing alaga e ya katanggap-tanggap</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Kulang a pondo</translation>
@@ -1578,10 +1570,6 @@ Address: %4
         <source>Done loading</source>
         <translation>Yari ne ing pamag-load</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para agamit ing %s a pimamilian</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Mali</translation>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index c53a9970efee..ea6cedf15411 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Kliknij dwukrotnie, aby edytować adres lub etykietę</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Prawy klik żeby edytować adres lub etykietę</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -47,11 +47,11 @@
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Wybierz adres żeby wysłać bitcoins</translation>
+        <translation>Wybierz adres, na który chcesz wysłać monety</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Wybierz adres do otrzymania monet.</translation>
+        <translation>Wybierz adres, na który chcesz otrzymać monety</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
@@ -67,11 +67,11 @@
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Tutaj znajdują się Twoje adresy Bitcoin do wysyłania płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet.</translation>
+        <translation>Tutaj znajdują się adresy Bitcoin na które wysyłasz płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>To twoje adresy bitcoin do odbierania płatności. Zaleca się używanie nowych adresów odbiorczych dla każdej tranzakcji.</translation>
+        <translation>To twoje adresy Bitcoin, na które otrzymujesz płatności. Zaleca się używanie nowych adresów odbiorczych dla każdej transakcji.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -95,7 +95,7 @@
     </message>
     <message>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation>Wystąpił błąd podczas próby zapisu listy adresów %1. Proszę spróbować ponownie</translation>
+        <translation>Wystąpił błąd podczas próby zapisu listy adresów %1. Proszę spróbować ponownie.</translation>
     </message>
 </context>
 <context>
@@ -110,7 +110,7 @@
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(bez etykiety)</translation>
+        <translation>(brak etykiety)</translation>
     </message>
 </context>
 <context>
@@ -177,12 +177,16 @@
     </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>Uwaga: Klawisz Caps Lock jest włączony</translation>
+        <translation>Uwaga: Klawisz Caps Lock jest włączony!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Portfel zaszyfrowany</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Wprowadź nowe hasło do portfela.&lt;br/&gt;Proszę używać hasła złożonego z &lt;b&gt;10 lub więcej losowych znaków&lt;/b&gt; lub &lt;b&gt;ośmiu lub więcej słów.&lt;/b&gt;</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Program Bitcoin zamknie się aby dokończyć proces szyfrowania. Pamiętaj, że szyfrowanie portfela nie zabezpiecza w pełni Twoich bitcoinów przed kradzieżą przez wirusy lub trojany mogące zainfekować Twój komputer.</translation>
@@ -236,7 +240,7 @@
     </message>
     <message>
         <source>Show general overview of wallet</source>
-        <translation>Pokazuje ogólny zarys portfela</translation>
+        <translation>Pokazuje ogólny widok portfela</translation>
     </message>
     <message>
         <source>&amp;Transactions</source>
@@ -280,11 +284,11 @@
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>Adres wysyłania</translation>
+        <translation>Adresy wysyłania...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>Adres odbiorczy</translation>
+        <translation>Adresy odbioru...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -360,7 +364,7 @@
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Szyfruj klucze prywatne, które są powiązane z twoim portfelem</translation>
+        <translation>Szyfruj klucze prywatne, które są w Twoim portfelu</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
@@ -368,7 +372,7 @@
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Zweryfikuj wiadomość,  aby upewnić się, że została podpisana odpowiednim adresem Bitcoin.</translation>
+        <translation>Zweryfikuj wiadomość,  aby upewnić się, że została podpisana podanym adresem Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;File</source>
@@ -388,7 +392,7 @@
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Rdzeń BitCoin</translation>
+        <translation>Rdzeń Bitcoin</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
@@ -400,15 +404,19 @@
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation>Pokaż listę użytych adresów wysyłających i etykiety</translation>
+        <translation>Pokaż listę adresów i etykiet użytych do wysyłania</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation>Pokaż listę użytych adresów odbiorczych i etykiety</translation>
+        <translation>Pokaż listę adresów i etykiet użytych do odbierania</translation>
+    </message>
+    <message>
+        <source>Open a bitcoin: URI or payment request</source>
+        <translation>Otwórz URI bitcoin: lub żądanie zapłaty</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>&amp;Opcje konsoli</translation>
+        <translation>&amp;Opcje linii komend</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -470,9 +478,13 @@
         <source>Up to date</source>
         <translation>Aktualny</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Przetworzono %n blok historii transakcji.</numerusform><numerusform>Przetworzono %n bloki historii transakcji.</numerusform><numerusform>Przetworzono %n bloków historii transakcji.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
-        <translation>Łapanie bloków...</translation>
+        <translation>Synchronizuję się...</translation>
     </message>
     <message>
         <source>Sent transaction</source>
@@ -496,7 +508,7 @@ Adres: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;niezablokowany&lt;/b&gt;</translation>
+        <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;odblokowany&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
@@ -507,11 +519,15 @@ Adres: %4
     <name>ClientModel</name>
     <message>
         <source>Network Alert</source>
-        <translation>Sieć Alert</translation>
+        <translation>Komunikat Sieci</translation>
     </message>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Wybór monet</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Ilość:</translation>
@@ -532,6 +548,10 @@ Adres: %4
         <source>Fee:</source>
         <translation>Opłata:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Pył:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po opłacie:</translation>
@@ -556,6 +576,14 @@ Adres: %4
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Otrzymano z opisem</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Otrzymano z adresem</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -590,11 +618,11 @@ Adres: %4
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation>Zablokuj</translation>
+        <translation>Zablokuj niewydane</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation>Odblokuj</translation>
+        <translation>Odblokuj niewydane</translation>
     </message>
     <message>
         <source>Copy quantity</source>
@@ -616,6 +644,10 @@ Adres: %4
         <source>Copy priority</source>
         <translation>Skopiuj priorytet</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiuj pył</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Skopiuj resztę</translation>
@@ -664,6 +696,10 @@ Adres: %4
         <source>none</source>
         <translation>żaden</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Waha się +/- %1 satoshi na wejście.</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>tak</translation>
@@ -674,7 +710,7 @@ Adres: %4
     </message>
     <message>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation>Etykieta staje się czerwona kiedy transakcja jest większa niż 1000 bajtów.</translation>
+        <translation>Ta etykieta staje się czerwona, kiedy transakcja jest większa niż 1000 bajtów.</translation>
     </message>
     <message>
         <source>This means a fee of at least %1 per kB is required.</source>
@@ -686,7 +722,7 @@ Adres: %4
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation>Transakcje o wyższym priorytecie zostają szybciej dołączone do bloku.</translation>
+        <translation>Transakcje o wyższym priorytecie zwykle szybciej zostają dołączone do bloku.</translation>
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than "medium".</source>
@@ -698,7 +734,7 @@ Adres: %4
     </message>
     <message>
         <source>(no label)</source>
-        <translation>(bez etykiety)</translation>
+        <translation>(brak etykiety)</translation>
     </message>
     <message>
         <source>change from %1 (%2)</source>
@@ -733,7 +769,7 @@ Adres: %4
     </message>
     <message>
         <source>New receiving address</source>
-        <translation>Nowy adres odbiorczy</translation>
+        <translation>Nowy adres otrzymywania</translation>
     </message>
     <message>
         <source>New sending address</source>
@@ -768,7 +804,7 @@ Adres: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation>Utworzono nowy folder danych.</translation>
+        <translation>Będzie utworzony nowy folder danych.</translation>
     </message>
     <message>
         <source>name</source>
@@ -780,7 +816,7 @@ Adres: %4
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation>Ścieżka już istnieje i nie wskazuje na folder.</translation>
+        <translation>Ścieżka już istnieje i nie jest katalogiem.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
@@ -791,7 +827,7 @@ Adres: %4
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Rdzeń BitCoin</translation>
+        <translation>Rdzeń Bitcoin</translation>
     </message>
     <message>
         <source>version</source>
@@ -819,7 +855,7 @@ Adres: %4
     </message>
     <message>
         <source>UI options</source>
-        <translation>UI opcje</translation>
+        <translation>Opcje UI</translation>
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
@@ -829,6 +865,10 @@ Adres: %4
         <source>Start minimized</source>
         <translation>Uruchom zminimalizowany</translation>
     </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Ustaw certyfikaty główne SSL dla żądań płatności (domyślnie: -system-)</translation>
+    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Pokazuj okno powitalne przy starcie (domyślnie: 1)</translation>
@@ -850,11 +890,11 @@ Adres: %4
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation>Ponieważ jest to pierwsze uruchomienie programu, możesz wybrać gdzie będą przechowywane informacje.</translation>
+        <translation>Ponieważ jest to pierwsze uruchomienie programu, możesz wybrać gdzie Bitcoin Core będzie przechowywał swoje dane.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Program pobierze i będzie przechowywał kopię łańcucha bloków Bitcoin. W wybranym katalogu musi być przynajmniej %1GB miejsca, a z czasem wielkość danych będzie rosła. Portfel będzie przechowywany w tym samym katalogu.</translation>
+        <translation>Program pobierze i będzie przechowywał kopię łańcucha bloków Bitcoin. W wybranym katalogu musi być przynajmniej %1GB miejsca, a z czasem ilość danych będzie rosła. Portfel będzie przechowywany w tym samym katalogu.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -866,7 +906,7 @@ Adres: %4
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Rdzeń BitCoin</translation>
+        <translation>Rdzeń Bitcoin</translation>
     </message>
     <message>
         <source>Error: Specified data directory "%1" cannot be created.</source>
@@ -876,12 +916,20 @@ Adres: %4
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB dostępnego wolnego miejsca</numerusform><numerusform>%n GB dostępnego wolnego miejsca</numerusform><numerusform>%n GB dostępnego wolnego miejsca</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(z %n GB potrzebnego)</numerusform><numerusform>(z %n GB potrzebnych)</numerusform><numerusform>(z %n GB potrzebnych)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation>Otwórz URI:</translation>
+        <translation>Otwórz URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
@@ -918,6 +966,10 @@ Adres: %4
         <source>&amp;Start Bitcoin on system login</source>
         <translation>Uruchamiaj Bitcoin wraz z zalogowaniem do &amp;systemu</translation>
     </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Wielkość bufora bazy &amp;danych</translation>
+    </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
@@ -944,7 +996,7 @@ Adres: %4
     </message>
     <message>
         <source>Reset all client options to default.</source>
-        <translation>Przywróć domyślne wszystkie ustawienia klienta.</translation>
+        <translation>Przywróć wszystkie domyślne ustawienia klienta.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
@@ -954,6 +1006,10 @@ Adres: %4
         <source>&amp;Network</source>
         <translation>&amp;Sieć</translation>
     </message>
+    <message>
+        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+        <translation>(0 = automatycznie, &lt;0 = zostaw tyle wolnych rdzeni)</translation>
+    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>Portfel</translation>
@@ -962,6 +1018,14 @@ Adres: %4
         <source>Expert</source>
         <translation>Ekspert</translation>
     </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>Włącz funk&amp;cje kontoli monet</translation>
+    </message>
+    <message>
+        <source>&amp;Spend unconfirmed change</source>
+        <translation>Wydaj niepotwierdzoną re&amp;sztę</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>Automatycznie otwiera port klienta Bitcoin na routerze. Ta opcja dzieła tylko jeśli twój router wspiera UPnP i jest ono włączone.</translation>
@@ -970,6 +1034,10 @@ Adres: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Mapuj port używając &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Połącz się z siecią Bitcoin poprzez proxy SOCKS5.</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP: </translation>
@@ -1022,6 +1090,10 @@ Adres: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Wybierz podział jednostki pokazywany w interfejsie  oraz podczas wysyłania monet</translation>
     </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation>Wybierz pokazywanie lub nie funkcji kontroli monet.</translation>
+    </message>
     <message>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
@@ -1069,6 +1141,10 @@ Adres: %4
         <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>Wyświetlana informacja może być nieaktualna. Twój portfel synchronizuje się automatycznie z siecią bitcoin, zaraz po tym jak uzyskano połączenie, ale proces ten nie został jeszcze ukończony.</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Tylko podglądaj:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Dostępne:</translation>
@@ -1091,7 +1167,11 @@ Adres: %4
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Balans wydobycia, który jeszcze nie dojrzał</translation>
+        <translation>Balans wydobytych monet, które jeszcze nie dojrzały</translation>
+    </message>
+    <message>
+        <source>Balances</source>
+        <translation>Salda</translation>
     </message>
     <message>
         <source>Total:</source>
@@ -1101,9 +1181,33 @@ Adres: %4
         <source>Your current total balance</source>
         <translation>Twoje obecne saldo</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Twoje obecne saldo na podglądanym adresie </translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Możliwe do wydania:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Ostatnie transakcje</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Niepotwierdzone transakcje na podglądanych adresach</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Wykopane monety na podglądanych adresach które jeszcze nie dojrzały</translation>
+    </message>
+    <message>
+        <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>desynchronizacja</translation>
+        <translation>nie zsynchronizowany</translation>
     </message>
 </context>
 <context>
@@ -1116,6 +1220,18 @@ Adres: %4
         <source>Invalid payment address %1</source>
         <translation>błędny adres płatności %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Żądanie płatności odrzucone</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Zażądanie płatności się przedawniło.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Żądanie płatności nie jest zainicjowane.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Żądana kwota %1 jest za niska (uznano za kurz).</translation>
@@ -1126,7 +1242,11 @@ Adres: %4
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>Nie można rozpocząć bitcoin: kliknij-by-zapłacić opiekunowi</translation>
+        <translation>Nie można uruchomić protokołu bitcoin: kliknij-by-zapłacić</translation>
+    </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>URL pobrania żądania zapłaty jest nieprawidłowe: %1</translation>
     </message>
     <message>
         <source>Refund from %1</source>
@@ -1151,13 +1271,25 @@ Adres: %4
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>Ping Time</source>
+        <translation>Czas odpowiedzi</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Wprowadź adres Bitcoin (np. %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1166,11 +1298,31 @@ Adres: %4
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>SIEĆ</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>NIEZNANY</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Żaden</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>NIEDOSTĘPNE</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1220,6 +1372,10 @@ Adres: %4
         <source>Using OpenSSL version</source>
         <translation>Używana wersja OpenSSL</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Używana wersja BerkeleyDB </translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Czas uruchomienia</translation>
@@ -1238,12 +1394,52 @@ Adres: %4
     </message>
     <message>
         <source>Block chain</source>
-        <translation>Ciąg bloków</translation>
+        <translation>Łańcuch bloków</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
         <translation>Aktualna liczba bloków</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Otrzymane</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Wysłane</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Wybierz węzeł żeby zobaczyć szczegóły.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Kierunek</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Wersja</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Początkowa wysokość</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Czas połączenia</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bajtów wysłano</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bajtów pobrano</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Czas odpowiedzi</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Czas ostatniego bloku</translation>
@@ -1294,7 +1490,7 @@ Adres: %4
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Witam w konsoli Bitcoin RPC</translation>
+        <translation>Witam w konsoli 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>
@@ -1320,7 +1516,31 @@ Adres: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>przez %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>nigdy</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Wejściowy</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Wyjściowy</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Nieznany</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Pobieram...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1337,7 +1557,7 @@ Adres: %4
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Użyj jeden z poprzednio użytych adresów odbiorczych. Podczas ponownego używania adresów występują problemy z bezpieczeństwem i prywatnością. Nie korzystaj z tej opcji, chyba że odtwarzasz żądanie płatności wykonane już wcześniej.</translation>
+        <translation>Użyj jednego z poprzednio użytych adresów odbiorczych. Podczas ponownego używania adresów występują problemy z bezpieczeństwem i prywatnością. Nie korzystaj z tej opcji, chyba że odtwarzasz żądanie płatności wykonane już wcześniej.</translation>
     </message>
     <message>
         <source>An optional label to associate with the new receiving address.</source>
@@ -1349,7 +1569,7 @@ Adres: %4
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Wyczyść pola formularza</translation>
+        <translation>Wyczyść pola formularza.</translation>
     </message>
     <message>
         <source>Clear</source>
@@ -1408,7 +1628,7 @@ Adres: %4
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation>Żądaj płatności do %1</translation>
+        <translation>Zażądaj płatności do %1</translation>
     </message>
     <message>
         <source>Payment information</source>
@@ -1480,6 +1700,10 @@ Adres: %4
         <source>Send Coins</source>
         <translation>Wyślij Monety</translation>
     </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation>Funkcje kontroli monet</translation>
+    </message>
     <message>
         <source>Inputs...</source>
         <translation>Wejścia...</translation>
@@ -1490,7 +1714,7 @@ Adres: %4
     </message>
     <message>
         <source>Insufficient funds!</source>
-        <translation>Niewystarczające środki</translation>
+        <translation>Niewystarczające środki!</translation>
     </message>
     <message>
         <source>Quantity:</source>
@@ -1522,7 +1746,63 @@ Adres: %4
     </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>Kiedy ta opcja jest wybrana, ale adres reszty jest pusty lub nieprawidłowy to reszta będzie wysyłana na adres nowo-wygenerowany.</translation>
+        <translation>Kiedy ta opcja jest wybrana, to jeżeli adres reszty jest pusty lub nieprawidłowy, to reszta będzie wysyłana na nowo wygenerowany adres, </translation>
+    </message>
+    <message>
+        <source>Custom change address</source>
+        <translation>Niestandardowe zmiany adresu</translation>
+    </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Opłata transakcyjna:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Wybierz...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>zwiń opcje opłaty</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimalizuj</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>za kilobajt</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(przeczytaj podpowiedź)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Zalecane:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Sprytne opłaty nie są jeszcze zainicjowane. Trwa to zwykle kilka bloków...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Czas potwierdzenia:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normalnie</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>szybko</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Wyślij bez opłaty jeżeli to możliwe</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(potwierdzenie może potrwać dłużej)</translation>
     </message>
     <message>
         <source>Send to multiple recipients at once</source>
@@ -1530,11 +1810,15 @@ Adres: %4
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation>Dodaj Odbio&amp;rce</translation>
+        <translation>Dodaj Odbio&amp;rcę</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Wyczyść wszystkie pola formularza</translation>
+        <translation>Wyczyść wszystkie pola formularza.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Pył:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
@@ -1598,7 +1882,7 @@ Adres: %4
     </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
-        <translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation>
+        <translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić.</translation>
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
@@ -1614,7 +1898,7 @@ Adres: %4
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania.</translation>
+        <translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas jednej operacji wysyłania.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -1624,6 +1908,14 @@ Adres: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transakcja została odrzucona! Może się to zdarzyć jeśli część monet z portfela została już wydana używając kopii pliku wallet.dat i nie zostało to tutaj uwzględnione.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Opłata wyższa niż %1 jest uważana za szalenie wysoką.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Płac tylko minimalna opłatę %1</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Ostrzeżenie: nieprawidłowy adres Bitcoin</translation>
@@ -1634,7 +1926,11 @@ Adres: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation>Ostrzeżenie: Nieznany adres</translation>
+        <translation>Ostrzeżenie: Nieznany adres reszty</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopiuj kurz</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
@@ -1693,7 +1989,7 @@ Adres: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation>Zweryfikowano żądanie zapłaty.</translation>
+        <translation>To żądanie zapłaty jest zweryfikowane.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
@@ -1755,7 +2051,7 @@ Adres: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation>Wprowadź wiadomość, którą chcesz podpisać, tutaj</translation>
+        <translation>Tutaj wprowadź wiadomość, którą chcesz podpisać</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -1823,11 +2119,11 @@ Adres: %4
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation>Klucz prywatny dla podanego adresu nie jest dostępny</translation>
+        <translation>Klucz prywatny dla podanego adresu nie jest dostępny.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation>Podpisanie wiadomości nie powiodło się</translation>
+        <translation>Podpisanie wiadomości nie powiodło się.</translation>
     </message>
     <message>
         <source>Message signed.</source>
@@ -1843,7 +2139,7 @@ Adres: %4
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>Podpis nie odpowiadał streszczeniu wiadomości</translation>
+        <translation>Podpis nie odpowiada skrótowi wiadomości.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
@@ -1858,7 +2154,7 @@ Adres: %4
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Rdzeń BitCoin</translation>
+        <translation>Rdzeń Bitcoin</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
@@ -1882,6 +2178,10 @@ Adres: %4
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
     </message>
+    <message>
+        <source>conflicted</source>
+        <translation>konflikt</translation>
+    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
@@ -1900,7 +2200,7 @@ Adres: %4
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, emitowany przez %n węzeł</numerusform><numerusform>, emitowany przez %n węzły</numerusform><numerusform>, emitowany przez %n węzłów</numerusform></translation>
+        <translation><numerusform>, przekazywany przez %n węzeł</numerusform><numerusform>, przekazywany przez %n węzły</numerusform><numerusform>, przekazywany przez %n węzłów</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -1948,7 +2248,7 @@ Adres: %4
     </message>
     <message>
         <source>Transaction fee</source>
-        <translation>Prowizja transakcji</translation>
+        <translation>Opłata transakcyjna</translation>
     </message>
     <message>
         <source>Net amount</source>
@@ -1972,7 +2272,7 @@ Adres: %4
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Wygenerowane monety muszą dojrzeć przez %1 bloków zanim będzie można je wysłać. Gdy wygenerowałeś ten blok został on ogłoszony w sieci i dodany do łańcucha bloków. Jeżeli nie uda mu się wejść do łańcucha jego status zostanie zmieniony na "nie zaakceptowano" i nie będzie można go wydać. To czasem zdarza się gdy inny węzeł wygeneruje blok w kilka sekund od twojego.</translation>
+        <translation>Wygenerowane monety muszą dojrzeć przez %1 bloków zanim będzie można je wydać. Gdy wygenerowałeś ten blok został on ogłoszony w sieci i dodany do łańcucha bloków. Jeżeli nie uda mu się wejść do łańcucha jego status zostanie zmieniony na "nie zaakceptowano" i nie będzie można go wydać. To czasem zdarza się gdy inny węzeł wygeneruje blok w kilka sekund od twojego.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2000,7 +2300,7 @@ Adres: %4
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
-        <translation>, nie został jeszcze pomyślnie wyemitowany</translation>
+        <translation>, nie został jeszcze pomyślnie rozesłany</translation>
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
@@ -2064,6 +2364,10 @@ Adres: %4
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Potwierdzanie (%1 z %2 rekomendowanych potwierdzeń)</translation>
     </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>Konflikt</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>Otrzymane przez</translation>
@@ -2262,7 +2566,7 @@ Adres: %4
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation>Wyślij płatność</translation>
+        <translation>Wyślij monety</translation>
     </message>
 </context>
 <context>
@@ -2334,40 +2638,9 @@ Adres: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, musisz ustawić rpcpassword w pliku konfiguracyjnym:⏎
-%s⏎
-Zalecane jest użycie losowego hasła:⏎
-rpcuser=bitcoinrpc⏎
-rpcpassword=%s⏎
-(nie musisz pamiętać tego hasła)⏎
-Użytkownik i hasło nie mogą być takie same.⏎
-Jeśli plik nie istnieje, utwórz go z uprawnieniami tylko-do-odczytu dla właściciela.⏎
-Zalecane jest ustawienie alertnotify aby poinformować o problemach:⏎
-na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Skojarz z podanym adresem. Użyj formatu [host]:port dla IPv6 </translation>
-    </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Błąd: transakcja została odrzucona. Może się to zdarzyć, gdy monety z Twojego portfela zostały już wydane, na przykład gdy używałeś kopii wallet.dat i bitcoiny które tam wydałeś nie zostały jeszcze odjęte z portfela z którego teraz korzystasz.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Transakcja przekracza limit. Możesz wysłać ją płacąc prowizję %s, która zostaje przekazana do węzłów, które ją prześlą i pomoże wspierać sieć Bitcoin. Czy chcesz zapłacić prowizję?</translation>
+        <translation>Skojarz z podanym adresem i nasłuchuj na nim. Użyj formatu [host]:port dla IPv6</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2377,9 +2650,13 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>To jest testowa wersja - używaj na własne ryzyko - nie używaj do wykopywania oraz przy aplikacjach kupieckich</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation>Nie można przywiązać z portem %s na tym komputerze. Bitcoin Core prawdopodobnie już działa.</translation>
+    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Ostrzeżenie: -paytxfee jest bardzo duży. To jest prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
+        <translation>Ostrzeżenie: -paytxfee jest bardzo duże! Jest to prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
@@ -2401,6 +2678,10 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>(default: 1)</source>
         <translation>(domyślnie: 1)</translation>
     </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;category&gt; mogą być:</translation>
+    </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
@@ -2411,7 +2692,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Łącz tylko do wskazanego węzła</translation>
+        <translation>Łącz się tylko do wskazanego węzła/węzłów</translation>
     </message>
     <message>
         <source>Connection options:</source>
@@ -2427,11 +2708,11 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Odkryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation>
+        <translation>Wykryj własny adres IP (domyślnie: 1 kiedy w trybie nasłuchu i brak -externalip )</translation>
     </message>
     <message>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation>Nie ładuj portfela i wyłącz odwołania RPC</translation>
+        <translation>Nie ładuj portfela i wyłącz wywołania RPC portfela</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
@@ -2439,7 +2720,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation>Błąd inicjowania bloku bazy danych</translation>
+        <translation>Błąd inicjowania bazy danych bloków</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
@@ -2451,19 +2732,19 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Error opening block database</source>
-        <translation>Błąd ładowania bazy bloków</translation>
+        <translation>Błąd otwierania bazy bloków</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>Błąd: Mało miejsca na dysku!</translation>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Błąd: Wystąpił krytyczny błąd wewnętrzny, sprawdź w debug.log</translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Błąd: Zablokowany portfel, nie można utworzyć transakcji!</translation>
+        <source>Error: Disk space is low!</source>
+        <translation>Błąd: Mało miejsca na dysku!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Próba otwarcia jakiegokolwiek portu nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation>
+        <translation>Próba nasłuchiwania na jakimkolwiek porcie nie powiodła się. Użyj -listen=0 jeśli tego chcesz.</translation>
     </message>
     <message>
         <source>Importing...</source>
@@ -2497,6 +2778,14 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Specify wallet file (within data directory)</source>
         <translation>Określ plik portfela (w obrębie folderu danych)</translation>
     </message>
+    <message>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Jest to przeznaczone dla narzędzi testowania regresji i rozwoju aplikacji.</translation>
+    </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Użyj UPnP do przekazania portu nasłuchu (domyślnie : %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Weryfikacja bloków...</translation>
@@ -2521,6 +2810,10 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importuj bloki z zewnętrznego pliku blk000??.dat</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Pozwól na połączenia JSON-RPC z podanego źródła. Jako &lt;ip&gt; prawidłowe jest pojedyncze IP (np. 1.2.3.4), podsieć/maska (np. 1.2.3.4/255.255.255.0) lub sieć/CIDR (np. 1.2.3.4/24). Opcja ta może być użyta wiele razy.</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Nie można uzyskać blokady na katalogu z danymi %s. Rdzeń Bitcoin najprawdopodobniej jest już uruchomiony.</translation>
@@ -2529,10 +2822,18 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Uruchom polecenie przy otrzymaniu odpowiedniego powiadomienia lub gdy zobaczymy naprawdę długie rozgałęzienie (%s w poleceniu jest podstawiane za komunikat)</translation>
     </message>
+    <message>
+        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+        <translation>Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: %d)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informacja</translation>
     </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Wstępna kontrola poprawności nie powiodła się. Bitcoin Core wyłącza się.</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nieprawidłowa kwota dla -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -2545,10 +2846,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Node relay options:</source>
         <translation>Opcje przekaźnikowe węzła:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Wyświetlaj blok podczas uruchamiania, jeżeli znaleziono indeks bloków</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcje RPC SSL: (odwiedź Bitcoin Wiki w celu uzyskania instrukcji)</translation>
@@ -2563,7 +2860,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation>Losowo ignoruje 1 z wszystkich &lt;n&gt; wiadomości sieciowych.</translation>
+        <translation>Losowo miesza 1 z wszystkich &lt;n&gt; wiadomości sieciowych.</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -2607,7 +2904,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
-        <translation>Portfel wymaga przepisania: zresetuj Bitcoina aby ukończyć</translation>
+        <translation>Portfel wymaga przepisania: zrestartuj Bitcoina aby ukończyć</translation>
     </message>
     <message>
         <source>Warning</source>
@@ -2615,7 +2912,19 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation>Uwaga: Ta wersja jest przestarzała, aktualizacja wymagana!</translation>
+        <translation>Uwaga: Ta wersja jest przestarzała, wymagana jest aktualizacja!</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Uwaga: Zignorowano nieprawidłowy argument -benchmark, użyj -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Uwaga: Zignorowano nieprawidłowy argument -debugnet , użyj -debug=net.</translation>
+    </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>Usuwam wszystkie transakcje z portfela...</translation>
     </message>
     <message>
         <source>on startup</source>
@@ -2639,7 +2948,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Przeskanuj blok łańcuchów żeby znaleźć zaginione transakcje portfela</translation>
+        <translation>Przeskanuj łańcuch bloków w poszukiwaniu zaginionych transakcji portfela</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
@@ -2661,14 +2970,126 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Błąd ładowania wallet.dat: Uszkodzony portfel</translation>
     </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Utrzymuj pełny indeks transakcji, używany przy wywołaniu RPC getrawtransaction (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(domyślnie: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Błąd ładowania wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Wymuś tryb bezpieczny (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generuj monety (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Ile bloków sprawdzić przy starcie (domyślnie: %u, 0 = wszystkie)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Dołącz adresy IP do logowania (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Nieprawidłowy adres -proxy: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Ogranicz rozmiar pamięci podręcznej sygnatur do &lt;n&gt; wpisów (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Nasłuchuj połączeń JSON-RPC na &lt;port&gt; (domyślnie: %u lub testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Nasłuchuj połączeń na &lt;port&gt; (domyślnie: %u lub testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Utrzymuj maksymalnie &lt;n&gt; połączeń z węzłami (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksymalny bufor odbioru na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksymalny bufor wysyłania na połączenie, &lt;n&gt;*1000 bajtów (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Akceptuj tylko łańcuch bloków zgodny z wbudowanymi punktami kontrolnymi (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Dołączaj znacznik czasu do logowania (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Przekazuj i wydobywaj transakcje zawierające dane (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Przekazuj transakcje multisig inne niż P2SH (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Uruchom wątek do okresowego zapisywania portfela (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Plik certyfikatu serwera (domyślnie: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Klucz prywatny serwera (domyślnie: %s)</translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Ustaw rozmiar puli kluczy na &lt;n&gt; (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Ustaw liczbę wątków do obsługi RPC (domyślnie: %d)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Wskaż plik konfiguracyjny (domyślnie: %s)</translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Wskaż czas oczekiwania na połączenie w milisekundach (minimum: 1, domyślnie: %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Wskaż plik pid (domyślnie: %s)</translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Wydawaj niepotwierdzoną resztę podczas wysyłania transakcji (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Zatrzymaj po zaimportowaniu bloków z dysku (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Próg, po którym nastąpi rozłączenie węzłów nietrzymających się zasad (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Nieznana sieć w -onlynet: '%s'</translation>
@@ -2685,10 +3106,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Nieprawidłowa kwota</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Niewystarczające środki</translation>
@@ -2699,7 +3116,7 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation>Dodaj węzeł do łączenia się and attempt to keep the connection open</translation>
+        <translation>Dodaj węzeł do podłączenia się i próbuj utrzymać to połączenie</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
@@ -2721,10 +3138,6 @@ na przykład: alertnotify=echo %%s | mail -s "Alarm Bitcoin" admin@foo.com⏎</t
         <source>Done loading</source>
         <translation>Wczytywanie zakończone</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Aby użyć opcji %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Błąd</translation>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index b5b8e3e5d3e4..1639bc1c3b55 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -2,12 +2,12 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Duplo-clique para editar o endereço ou o rótulo</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Clique com o botão direito para editar o endereço ou rótulo </translation>
     </message>
     <message>
         <source>Create a new address</source>
-        <translation>Criar um novo endereço</translation>
+        <translation>Criar novo endereço</translation>
     </message>
     <message>
         <source>&amp;New</source>
@@ -571,6 +571,14 @@ Endereço: %4</translation>
         <source>Amount</source>
         <translation>Quantidade</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Recebido com rótulo</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Recebido com endereço </translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -1033,6 +1041,14 @@ Endereço: %4</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapear porta usando &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Conectar na rede Bitcoin através de um proxy SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Conectar usando proxy SOCKS5 (proxy pradrão):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP do proxy:</translation>
@@ -1180,10 +1196,26 @@ Endereço: %4</translation>
         <source>Your current balance in watch-only addresses</source>
         <translation>Sua balança atual em endereços apenas visualizados</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Disponível: </translation>
+    </message>
     <message>
         <source>Recent transactions</source>
         <translation>Transações recentes</translation>
     </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transações não confirmadas de um endereço monitorado</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Saldo minerado de endereço monitorado ainda não foi implementado</translation>
+    </message>
+    <message>
+        <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>
@@ -1239,10 +1271,22 @@ Endereço: %4</translation>
         <source>Refund from %1</source>
         <translation>Reembolso de %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Solicitação de pagamento %2 muito grande (%3 bytes, %4 bytes permitido).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Pagamento requer proteção DoS</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Erro na comunicação com %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Requisição de pagamento não pode ser analisado!</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Resposta incorreta do servidor %1</translation>
@@ -1258,9 +1302,17 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Endereço/Hostname</translation>
+    </message>
     <message>
         <source>Ping Time</source>
-        <translation>Tempo de Ping</translation>
+        <translation>Ping</translation>
     </message>
 </context>
 <context>
@@ -1357,7 +1409,11 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation>Usando OpenSSL versão</translation>
+        <translation>Versão do OpenSSL</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Versão do BerkeleyDB</translation>
     </message>
     <message>
         <source>Startup time</source>
@@ -1395,6 +1451,10 @@ Endereço: %4</translation>
         <source>&amp;Peers</source>
         <translation>&amp;Pares</translation>
     </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Selecione um cliente para ver informações detalhadas.</translation>
+    </message>
     <message>
         <source>Direction</source>
         <translation>Direção</translation>
@@ -1403,14 +1463,30 @@ Endereço: %4</translation>
         <source>Version</source>
         <translation>Versão</translation>
     </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
     <message>
         <source>Services</source>
         <translation>Serviços</translation>
     </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Altura inicial</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Altura sincronizada</translation>
+    </message>
     <message>
         <source>Ban Score</source>
         <translation>Banir pontuação</translation>
     </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Tempo de conexão </translation>
+    </message>
     <message>
         <source>Last Send</source>
         <translation>Ultimo Envio</translation>
@@ -1425,11 +1501,11 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Bytes Received</source>
-        <translation>bytes Recebidos</translation>
+        <translation>Bytes recebidos</translation>
     </message>
     <message>
         <source>Ping Time</source>
-        <translation>Tempo de Ping</translation>
+        <translation>Ping</translation>
     </message>
     <message>
         <source>Last block time</source>
@@ -1527,7 +1603,11 @@ Endereço: %4</translation>
         <source>Unknown</source>
         <translation>Desconhecido</translation>
     </message>
-    </context>
+    <message>
+        <source>Fetching...</source>
+        <translation>Buscando...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1701,11 +1781,11 @@ Endereço: %4</translation>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
-        <translation>Enviar dinheiro</translation>
+        <translation>Enviar moedas</translation>
     </message>
     <message>
         <source>Coin Control Features</source>
-        <translation>Opções de Controle da Moeda</translation>
+        <translation>Opções de controle de moeda</translation>
     </message>
     <message>
         <source>Inputs...</source>
@@ -1745,7 +1825,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation>trocar</translation>
+        <translation>troco</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>
@@ -1755,6 +1835,54 @@ Endereço: %4</translation>
         <source>Custom change address</source>
         <translation>Endereço específico de troco</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Taxa de transação: </translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Escolha:</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimizar</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>por kilobyte</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomendado:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalizado:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Smart fee não iniciado. Isso requer alguns blocos...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Tempo de confirmação:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rápido </translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Enviar sem taxa de transação se possível </translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(confirmação pode demorar)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar para vários destinatários de uma só vez</translation>
@@ -1789,7 +1917,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
-        <translation>Confirmar envio de dinheiro</translation>
+        <translation>Confirmar envio de moedas</translation>
     </message>
     <message>
         <source>%1 to %2</source>
@@ -1859,6 +1987,18 @@ Endereço: %4</translation>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>A transação foi rejeitada! Isso pode acontecer se alguns bitcoins na sua carteira já foram gastos em outro local, por exemplo se você tiver uma cópia do wallet.dat e os bitcoins tiverem sido gastos na cópia mas não marcados como gastos aqui ainda.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Uma taxa acima de %1 é considerada uma taxa insanamente alta.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Pagar somente a taxa mínima de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Confirmação estimada em %1 bloco(s)</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Atenção: endereço de Bitcoin inválido</translation>
@@ -1912,7 +2052,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>The Bitcoin address to send the payment to</source>
-        <translation>O enderesso Bitcoin que enviarár o pagamento</translation>
+        <translation>Endereço que enviará o pagamento</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1967,7 +2107,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation>Não desligue o computador até esta janela desaparece.</translation>
+        <translation>Não desligue o computador até esta janela desapareça.</translation>
     </message>
 </context>
 <context>
@@ -2243,7 +2383,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Bitcoins recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à cadeia de blocos: blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para "não aceito" e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente.</translation>
+        <translation>Bitcoins recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para "não aceito" e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente.</translation>
     </message>
     <message>
         <source>Debug information</source>
@@ -2349,11 +2489,11 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation>Recebido por</translation>
+        <translation>Recebido</translation>
     </message>
     <message>
         <source>Received from</source>
-        <translation>Recebido de</translation>
+        <translation>Recebido</translation>
     </message>
     <message>
         <source>Sent to</source>
@@ -2428,7 +2568,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation>Recebido por</translation>
+        <translation>Recebido</translation>
     </message>
     <message>
         <source>Sent to</source>
@@ -2541,7 +2681,11 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unidade para mostrar. Clique para selecionar outra unidade.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2625,45 +2769,21 @@ Endereço: %4</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceitar conexões externas (padrão: 1 se opções -proxy ou -connect não estiverem presentes)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, você deve especificar uma senha rpcpassword no arquivo de configuração:⏎
-%s⏎
-É recomendado que você use a seguinte senha aleatória:⏎
-rpcuser=bitcoinrpc⏎
-rpcpassword=%s⏎
-(você não precisa lembrar esta senha)⏎
-O nome de usuário e a senha NÃO PODEM ser os mesmos.⏎
-Se o arquivo não existir, crie um com permissão de leitura apenas para o dono.⏎
-É recomendado também definir um alertnotify para que você seja notificado de problemas;⏎
-por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular ao endereço fornecido e sempre escutar nele. Use a notação [host]:port para IPv6</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation>Entra no modo de teste de regressão, que usa uma cadeia especial onde os blocos podem ser resolvidos instantaneamente.</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Apaga todas as transações da carteira e somente recupera essas partes da blockchain usando o comando -rescan na inicialização</translation>
     </message>
     <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erro: A transação foi rejeitada. Isso pode acontecer se alguns dos bitcoins de sua carteira já haviam sido gastos, por exemplo se você usou uma cópia do arquivo wallet.dat e alguns bitcoins foram gastos na cópia mas não foram marcados como gastos aqui.</translation>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuido sob a licença MIT software license. Veja os termos em &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erro: Esta transação requer uma taxa de transação de pelo menos %s, por causa sua quantidade, complexidade ou uso de dinheiro recebido recentemente.</translation>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation>Entra no modo de teste de regressão, que usa uma cadeia especial onde os blocos podem ser resolvidos instantaneamente.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
@@ -2773,10 +2893,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Error: Disk space is low!</source>
         <translation>Erro: Espaço em disco insuficiente!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Erro: Carteira bloqueada, impossível criar transação!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Falha ao escutar em qualquer porta. Use -listen=0 se você quiser isso.</translation>
@@ -2801,6 +2917,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Not enough file descriptors available.</source>
         <translation>Decriptadores de arquivos disponíveis insuficientes.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Somente conectar a clientes na rede &lt;net&gt; (ipv4, ipv6 ou onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir índice de blockchain a partir dos arquivos atuais blk000??.dat</translation>
@@ -2821,6 +2941,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Isso é usado para testes de regressão e ferramentas de desenvolvimento.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Use UPnP para mapear a porta de entrada (padrão: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>Verificando blocos...</translation>
@@ -2835,27 +2959,31 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation>Opções da Carteira:</translation>
+        <translation>Opções da carteira:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation>Você precisa reconstruir o banco de dados utilizando-reindexar a mudar-txindex</translation>
+        <translation>Você precisa reconstruir o banco de dados utilizando -reindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importar blocos de um arquivo externo blk000??.dat</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permitir conexões JSON-RPC de uma fonte específica. Válido para um único ip (ex. 1.2.3.4), até uma rede/máscara (ex. 1.2.3.4/255.255.255.0) ou uma rede/CIDR (ex. 1.2.3.4/24). Esta opção pode ser usada múltiplas vezes</translation>
+    </message>
     <message>
         <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
         <translation>Um erro ocorreu enquanto configurando o endereço RPC %s porta %u para escuta: %s</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation>Não foi possível obter proteção exclusiva ao diretório de dados %s. Bitcoin Core já está sendo executado provavelmente.</translation>
+        <translation>Não foi possível obter acesso exclusivo ao diretório de dados %s. Bitcoin Core já está sendo executado provavelmente.</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
-        <translation>Erro: Escutar por conexões de entrada falhou (escutar retornou erro %s)</translation>
+        <translation>Erro: Aceitar conexões de entrada falhou (retornou erro %s)</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
@@ -2873,6 +3001,30 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Define o tamanho máximo de alta-prioridade por taxa baixa nas transações em bytes (padrão: %d)</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Para usar o bitcoind, ou a opção -server do bitcoin-qt, você deve definir rpcpassword no arquivo de configuração:
+%s
+É recomendado que use a seguinte senha randômica:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(você não precisa lembrar esta senha)
+O usuário e senha NÃO DEVEM ser os mesmos.
+Se o arquivo não existir, crie com permissão de proprietário criador somente.
+É também recomendado definir a opção alertnotify se deseja ser notificado de problemas;
+por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
+</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Impossível resolver endereço -whitebind: '%s'</translation>
@@ -2889,6 +3041,14 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Could not parse -rpcbind value %s as network address</source>
         <translation>Impossível interpretar o valor -rpcbind %s como um endereço da rede</translation>
     </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Erro carregando wallet.dat: A carteira requer a nova versão do Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Erro: Argumento não suportado -tor, use -onion.</translation>
+    </message>
     <message>
         <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
         <translation>Taxa (em BTC/kB) a adicionar nas transações que você envia (padrão: %s)</translation>
@@ -2897,6 +3057,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Information</source>
         <translation>Informação</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Quantidade inválida para -maxtxfee=&lt;quantidade&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantidade inválida para -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -2913,18 +3077,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Máscara de rede especificada em -whitelist: '%s' é inválida</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Manter no máximo &lt;n&gt; blocos pendentes em memória (padrão: %u)</translation>
-    </message>
     <message>
         <source>Need to specify a port with -whitebind: '%s'</source>
         <translation>Necessário informar uma porta com -whitebind: '%s'</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprime bloco ao iniciar, se encontrado no índice de blocos</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opções RPC SSL: (veja o Bitcoin Wiki para instruções de configuração SSL)</translation>
@@ -2969,6 +3125,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Transaction amounts must be positive</source>
         <translation>As quantidades das transações devem ser positivas.</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transação muito grande para enviar sem taxa</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transação muito larga</translation>
@@ -3045,14 +3205,42 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erro ao carregar wallet.dat: Carteira corrompida</translation>
     </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(padrão: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Erro ao carregar wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forçar modo seguro (default: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Gerar moedas (padrão: %u)</translation>
+    </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>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Endereço -proxy inválido: '%s'</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Tamanho limite do cache de assinaturas de &lt;n&gt; entradas (padrão: %u)</translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Aguardar por conexões na porta &lt;port&gt; (padrão: %u ou testnet: %u)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Chave privada do servidor (padrão: %s)</translation>
+    </message>
     <message>
         <source>Specify pid file (default: %s)</source>
         <translation>Especificar aqrquivo pid (default: %s)</translation>
@@ -3073,10 +3261,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantidade inválida para -paytxfee=&lt;quantidade&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Quantidade inválida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Saldo insuficiente</translation>
@@ -3109,10 +3293,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com⏎
         <source>Done loading</source>
         <translation>Carregamento terminado</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para usar a opção %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Erro</translation>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index dd0d8823f6fc..757002bf4439 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Clique duas vezes para editar o endereço ou o rótulo</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Clique direito para editar endereço ou rótulo</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -43,7 +43,7 @@
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>E&amp;liminar\</translation>
+        <translation>&amp;Eliminar\</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -519,6 +519,10 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Seleção de moeda</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
@@ -539,6 +543,10 @@ Endereço: %4</translation>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Lixo:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>Depois da Taxa:</translation>
@@ -563,6 +571,14 @@ Endereço: %4</translation>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Recebido com rótulo</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Recebido com endereço</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -623,6 +639,10 @@ Endereço: %4</translation>
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiar lixo</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Copiar alteração</translation>
@@ -671,6 +691,10 @@ Endereço: %4</translation>
         <source>none</source>
         <translation>nenhum</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Pode variar +/- %1 satoshi(s) por entrada</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>sim</translation>
@@ -836,6 +860,10 @@ Endereço: %4</translation>
         <source>Start minimized</source>
         <translation>Iniciar minimizado</translation>
     </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Configurar certificados SSL root para pedido de pagamento (default: -system-)</translation>
+    </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar imagem ao iniciar (por defeito: 1)</translation>
@@ -875,6 +903,10 @@ Endereço: %4</translation>
         <source>Bitcoin Core</source>
         <translation>Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Erro: Pasta de dados especificada como "%1, não pode ser criada.</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Erro</translation>
@@ -941,10 +973,27 @@ Endereço: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Número de processos de &amp;verificação de scripts</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Aceitar conceções externas</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permitir conexão</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço IP do proxy (p.ex. IPv4: 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 de outrem (ex. um explorador de blocos) que aparece no separador de transações como itens do menu de contexto.
+%s do URL é substituído por hash de transação. Vários URLs são separados por barra vertical |.</translation>
+    </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URLs de transação de outrem</translation>
+    </message>
     <message>
         <source>Active command-line options that override above options:</source>
         <translation>Opções de linha de comandos ativas que se sobrepõem ás opções anteriores:</translation>
@@ -961,6 +1010,10 @@ Endereço: %4</translation>
         <source>&amp;Network</source>
         <translation>&amp;Rede</translation>
     </message>
+    <message>
+        <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+        <translation>(0 = auto, &lt;0 = Deixar essa quantidade de núcleos livre)</translation>
+    </message>
     <message>
         <source>W&amp;allet</source>
         <translation>C&amp;arteira</translation>
@@ -989,6 +1042,14 @@ Endereço: %4</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapear porta usando &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Conectar à rede da Bitcoin através dum proxy SOCLS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Ligar através dum proxy SOCKS5 (proxy por defeito):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP do proxy:</translation>
@@ -1092,6 +1153,10 @@ Endereço: %4</translation>
         <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>A informação mostrada poderá estar desatualizada. A sua carteira sincroniza automaticamente com a rede Bitcoin depois de estabelecer ligação, mas este processo ainda não está completo.</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Apenas observar:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Disponível:</translation>
@@ -1116,6 +1181,10 @@ Endereço: %4</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>O saldo minado ainda não amadureceu</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Balanços</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1124,6 +1193,14 @@ Endereço: %4</translation>
         <source>Your current total balance</source>
         <translation>O seu saldo total actual</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>O seu balanço atual em endereços de apenas observação</translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Dispensável:</translation>
+    </message>
     <message>
         <source>Recent transactions</source>
         <translation>transações recentes</translation>
@@ -1615,6 +1692,10 @@ Endereço: %4</translation>
         <source>Clear all fields of the form.</source>
         <translation>Limpar todos os campos do formulário.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Lixo:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Limpar Tudo</translation>
@@ -1715,6 +1796,10 @@ Endereço: %4</translation>
         <source>Warning: Unknown change address</source>
         <translation>Aviso: Endereço de troco desconhecido</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiar lixo</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Tem a certeza que deseja enviar?</translation>
@@ -2433,29 +2518,6 @@ Endereço: %4</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceitar ligações externas (padrão: 1 sem -proxy ou -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, deverá definir uma rpcpassword no ficheiro de configuração:
-%s
-É recomendado que use a seguinte palavra-passe aleatória:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(não é necessário lembrar esta palavra-passe)
-O nome de utilizador e palavra-passe NÃO PODEM ser iguais.
-Se o ficheiro não existir, crie-o com permissões de leitura apenas para o dono.
-Também é recomendado definir um alertnotify para que seja alertado sobre problemas;
-por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associar a endereço específico e escutar sempre nele. Use a notação [anfitrião]:porta para IPv6</translation>
@@ -2464,14 +2526,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entre no modo de teste de regressão, que usa uma cadeia especial cujos blocos podem ser resolvidos instantaneamente.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erro: A transação foi rejeitada! Isso poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas tiverem sido gastas na cópia mas não tiverem sido marcadas como gastas aqui.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erro: Esta transação requer uma taxa de transação mínima de %s devido á sua quantia, complexidade, ou uso de fundos recebidos recentemente!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação)</translation>
@@ -2556,10 +2610,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Error: Disk space is low!</source>
         <translation>Erro: Pouco espaço em disco!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Erro: Carteira bloqueada, incapaz de criar transação!  </translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Falhou a escutar em qualquer porta. Use -listen=0 se quiser isto.</translation>
@@ -2756,10 +2806,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Quantia inválida</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fundos insuficientes</translation>
@@ -2792,10 +2838,6 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com</tran
         <source>Done loading</source>
         <translation>Carregamento completo</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Para usar a opção %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Erro</translation>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 81342c5dbc78..abeaf82e83a0 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dublu-click pentru a edita adresa sau eticheta</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Click-dreapta pentru a edita adresa sau eticheta</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -43,7 +43,7 @@
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>Ște&amp;rge</translation>
+        <translation>&amp;Șterge</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
@@ -93,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Exportare esuata</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>A apărut o eroare încercând să se salveze lista de adrese la %1. Vă rugăm să încercați din nou.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -179,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Portofel criptat</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <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>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin se va închide acum pentru a termina procesul de criptare. Ține minte că criptarea portofelului nu te poate proteja în totalitate de furtul monedelor de către programe dăunătoare care îți infectează calculatorul.</translation>
@@ -286,6 +294,10 @@
         <source>Open &amp;URI...</source>
         <translation>Vizitaţi &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Clientul Bitcoin Core</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Importare blocks de pe disk...</translation>
@@ -338,6 +350,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Primește</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Arată informații despre Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>Arata/Ascunde</translation>
@@ -430,6 +446,10 @@
         <source>%1 and %2</source>
         <translation>%1 si %2</translation>
     </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n an</numerusform><numerusform>%n ani</numerusform><numerusform>%n ani</numerusform></translation>
+    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 în urmă</translation>
@@ -458,6 +478,10 @@
         <source>Up to date</source>
         <translation>Actualizat</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks 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 blocuri din istoricul tranzacțiilor.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Se actualizează...</translation>
@@ -500,6 +524,10 @@ Adresa: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Selectarea monezii</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Cantitate:</translation>
@@ -544,6 +572,14 @@ Adresa: %4
         <source>Amount</source>
         <translation>Sumă</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Primite cu eticheta</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Primite cu adresa</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Data</translation>
@@ -648,6 +684,10 @@ Adresa: %4
         <source>none</source>
         <translation>nimic</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Poate varia +/- %1 satoshi pentru fiecare intrare. </translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>da</translation>
@@ -844,7 +884,15 @@ Adresa: %4
         <source>Error</source>
         <translation>Eroare</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(din %n GB necesar)</numerusform><numerusform>(din %n GB necesari)</numerusform><numerusform>(din %n GB necesari)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -890,6 +938,10 @@ Adresa: %4
         <source>MB</source>
         <translation>MB</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Acceptă conexiuni din exterior</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Resetează toate setările clientului la valorile implicite.</translation>
@@ -902,10 +954,18 @@ Adresa: %4
         <source>&amp;Network</source>
         <translation>&amp;Retea</translation>
     </message>
+    <message>
+        <source>W&amp;allet</source>
+        <translation>Portofel</translation>
+    </message>
     <message>
         <source>Expert</source>
         <translation>expert</translation>
     </message>
+    <message>
+        <source>Enable coin &amp;control features</source>
+        <translation>Activare caracteristici de control ale monedei</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>Deschide automat în router portul aferent clientului Bitcoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată.</translation>
@@ -1041,6 +1101,10 @@ Adresa: %4
         <source>Mined balance that has not yet matured</source>
         <translation>Balanta minata care nu s-a maturizat inca</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Balanţă</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Total:</translation>
@@ -1049,6 +1113,14 @@ Adresa: %4
         <source>Your current total balance</source>
         <translation>Balanța totală curentă</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>Cheltuibil:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Tranzacţii recente</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>Nu este sincronizat</translation>
@@ -1110,6 +1182,10 @@ Adresa: %4
         <source>Amount</source>
         <translation>Sumă</translation>
     </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 d</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1118,11 +1194,19 @@ Adresa: %4
         <source>%1 m</source>
         <translation>%1 m</translation>
     </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 s</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1196,6 +1280,26 @@ Adresa: %4
         <source>Current number of blocks</source>
         <translation>Numărul curent de blocuri</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Primit</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Trimis</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direcţie</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versiunea</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Servicii</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Data ultimului bloc</translation>
@@ -1272,6 +1376,14 @@ Adresa: %4
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
+    <message>
+        <source>via %1</source>
+        <translation>via %1</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Necunoscut</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -1432,6 +1544,10 @@ Adresa: %4
         <source>Send Coins</source>
         <translation>Trimite monede</translation>
     </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation>Caracteristici de control ale monedei</translation>
+    </message>
     <message>
         <source>Inputs...</source>
         <translation>Intrări</translation>
@@ -1472,6 +1588,22 @@ Adresa: %4
         <source>Change:</source>
         <translation>Schimbaţi:</translation>
     </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimizare</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Personalizat:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rapid</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Trimite simultan către mai mulți destinatari</translation>
@@ -1830,6 +1962,10 @@ Adresa: %4
         <source>Open until %1</source>
         <translation>Deschis până la %1</translation>
     </message>
+    <message>
+        <source>conflicted</source>
+        <translation>în conflict</translation>
+    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/deconectat</translation>
@@ -1894,6 +2030,14 @@ Adresa: %4
         <source>Debit</source>
         <translation>Debit</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Total debit</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Total credit</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Comisionul tranzacţiei</translation>
@@ -2008,6 +2152,10 @@ Adresa: %4
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Confirmare (%1 dintre %2 confirmări recomandate)</translation>
     </message>
+    <message>
+        <source>Conflicted</source>
+        <translation>În conflict</translation>
+    </message>
     <message>
         <source>Received with</source>
         <translation>Recepționat cu</translation>
@@ -2278,43 +2426,10 @@ Adresa: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Acceptă conexiuni din afară (implicit: 1  dacă nu se folosește -proxy sau -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s trebuie sa setezi o parola rpc in fisierul de configurare
-%s
-Este recomandat sa folosesti aceasta parola aleatorie:
-rpcuser=bitcoinrpc
-parola rpc=%s
-(nu este necesar ca sa iti amintesti aceasta parola)
-Numele de utilizator si parola NU trebuie sa fie la fel.
-Daca fisierul nu exista, creaza-l cu fisier de citit permis doar proprietarului.
-Este de asemenea recomandat sa setezi alerta de notificare ca sa primesti notificari ale problemelor;
-spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
-
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Atasati adresei date si ascultati totdeauna pe ea. Folositi [host]:port notatia pentru IPv6</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Eroare: Tranzactia a fost respinsa! Acest lucru se poate intampla daca anumite monezi din portofelul dumneavoastra au fost deja cheltuite, deasemenea daca ati folosit o copie a fisierului wallet.dat si monezile au fost folosite in acea copie dar nu au fost marcate ca fiind folosite acolo.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Eroare: Aceasta tranzactie necesita o taxa de cel putin %s din cauza sumei, complexitatii sau folosirii fondurilor recent primite!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executati comanda cand o tranzactie a portofelului se schimba (%s in cmd este inlocuit de TxID)</translation>
@@ -2343,6 +2458,10 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Atentie: fisierul wallet.dat este corupt, date salvate! Fisierul original wallet.dat a fost salvat ca wallet.{timestamp}.bak in %s; daca balansul sau tranzactiile sunt incorecte ar trebui sa restaurati dintr-o copie de siguranta. </translation>
     </message>
+    <message>
+        <source>(default: 1)</source>
+        <translation>(iniţial: 1)</translation>
+    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;category&gt; poate fi:</translation>
@@ -2359,6 +2478,10 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Connect only to the specified node(s)</source>
         <translation>Conecteaza-te doar la nod(urile) specifice</translation>
     </message>
+    <message>
+        <source>Connection options:</source>
+        <translation>Opţiuni conexiune:</translation>
+    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Baza de date 'bloc' defectată a fost detectată</translation>
@@ -2391,14 +2514,14 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Eroare: Spațiu pe disc redus!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Eroare: Portofel blocat, nu se poate crea o tranzacție!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Am esuat ascultarea pe orice port. Folositi -listen=0 daca vreti asta.</translation>
     </message>
+    <message>
+        <source>Importing...</source>
+        <translation>Importare...</translation>
+    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorect sau nici un bloc de Geneza găsite. Directorul de retea greşit?</translation>
@@ -2468,8 +2591,8 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <translation>Suma invalida pentru -mintxfee=&lt;suma&gt;: '%s'</translation>
     </message>
     <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Publica bloc la pornire daca exista in index-ul de blocuri. </translation>
+        <source>RPC server options:</source>
+        <translation>Opțiuni server RPC:</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
@@ -2579,10 +2702,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Suma nevalidă pentru -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Sumă nevalidă</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Fonduri insuficiente</translation>
@@ -2615,10 +2734,6 @@ spre exemplu: alertnotify=echo %%s | mail -s "Alerta Bitcoin" admin@foo.com
         <source>Done loading</source>
         <translation>Încărcare terminată</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Pentru a folosi opțiunea %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Eroare</translation>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 55986d409244..ec533b233c43 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Для того, чтобы изменить адрес или метку, дважды кликните по изменяемому объекту</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Клик правой кнопкой для редактирования адреса или метки</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -412,7 +412,7 @@
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>&amp;Пармаетры командной строки</translation>
+        <translation>&amp;Параметры командной строки</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -1284,6 +1284,14 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Возврат от %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Запрос платежа %2 слишком большой (%3 байтов, разрешено %4 байтов).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>DoS-защита запроса платежа</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Ошибка связи с %1: %2</translation>
@@ -1450,7 +1458,7 @@ Address: %4
     </message>
     <message>
         <source>Sent</source>
-        <translation>посланный</translation>
+        <translation>Отправлено</translation>
     </message>
     <message>
         <source>&amp;Peers</source>
@@ -2794,30 +2802,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Принимать подключения извне (по умолчанию: 1, если не используется -proxy или -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, вы должны установить опцию rpcpassword в конфигурационном файле:
- %s
-Рекомендуется использовать следующий случайный пароль:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(вам не нужно запоминать этот пароль)
-Имя и пароль ДОЛЖНЫ различаться.
-Если файл не существует, создайте его и установите права доступа только для владельца, только для чтения.
-Также рекомендуется включить alertnotify для оповещения о проблемах;
-Например: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Привязаться к указанному адресу и всегда прослушивать только его. Используйте [хост]:порт для IPv6</translation>
@@ -2834,14 +2818,6 @@ rpcpassword=%s
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Войти в режим тестирования на регрессии, в котором используется специальная цепь, где блоки находятся мгновенно.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Ошибка: транзакция была отклонена! Это могло произойти в случае, если некоторые монеты в вашем бумажнике уже были потрачены, например, если вы используете копию wallet.dat, и монеты были использованы в копии, но не отмечены как потраченные здесь.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Ошибка: эта транзакция требует комиссию как минимум %s из-за суммы, сложности или использования недавно полученных средств!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID)</translation>
@@ -2954,10 +2930,6 @@ rpcpassword=%s
         <source>Error: Disk space is low!</source>
         <translation>Ошибка: мало места на диске!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Ошибка: бумажник заблокирован, невозможно создать транзакцию!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Не удалось начать прослушивание на порту. Используйте -listen=0 если вас это устраивает.</translation>
@@ -3082,10 +3054,22 @@ rpcpassword=%s
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Комиссии (в BTC/Кб) меньшие этого значения считаются нулевыми для создания транзакции (по умолчанию: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Неверное значение для -maxtxfee=&lt;amount&gt;: '%s' (минимальная комиссия трансляции %s для предотвращения зависания транзакций)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Наибольший размер данных в носителе данных транзакций, которые мы передаем и генерируем (по умолчанию: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Максимальная сумма комиссий для одной транзакции в бумажнике, слишком низкое значение может вызвать прерывание больших транзакций (по умолчанию: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
@@ -3102,6 +3086,34 @@ rpcpassword=%s
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit &lt;https://www.openssl.org/&gt; и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Для использования bitcoind или опции bitcoin-qt -server, вы должны установить опцию rpcpassword в конфигурационном файле:
+ %s
+Рекомендуется использовать следующий случайный пароль:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(вам не нужно запоминать этот пароль)
+Имя и пароль ДОЛЖНЫ различаться.
+Если файл не существует, создайте его и установите право доступа только для чтения только для владельца.
+Также рекомендуется включить alertnotify для оповещения о проблемах;
+Например: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Внимание: установлено очень большое значение -paytxfee. Такие большие комиссии могут быть уплачены в отдельной транзакции.</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>
@@ -3110,6 +3122,10 @@ rpcpassword=%s
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Участники из белого списка не могуть быть забанены за DoS, и их транзакции всегда транслируются, даже если они уже содержатся в памяти. Полезно, например, для шлюза.</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Принимать публичные REST-запросы (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Не удаётся разрешить адрес в параметре -whitebind: '%s'</translation>
@@ -3146,6 +3162,10 @@ rpcpassword=%s
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Не удалось проверить чистоту. Bitcoin Core выключается.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Неверное значение -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Неверная сумма в параметре -minrelaytxfee=&lt;кол-во&gt;: '%s'</translation>
@@ -3162,10 +3182,6 @@ rpcpassword=%s
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Указана неверная сетевая маска в -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Хранить максимум &lt;n&gt; несоединённых блоков в памяти (по умолчанию: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Держать в памяти до &lt;n&gt; несвязных транзакций (по умолчанию: %u)</translation>
@@ -3178,10 +3194,6 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>Параметры трансляции узла:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Печатать блок при запуске, если он найден в индексе блоков</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Параметры RPC SSL: (см. Bitcoin вики для инструкций по настройке SSL)</translation>
@@ -3230,6 +3242,10 @@ rpcpassword=%s
         <source>Transaction amounts must be positive</source>
         <translation>Сумма транзакции должна быть положительна</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Транзакция слишком большая для правил комиссии.</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Транзакция слишком большая</translation>
@@ -3326,10 +3342,6 @@ rpcpassword=%s
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Если paytxfee не задан, включить достаточную комиссию для подтверждения транзакции в среднем за n блоков (по умолчанию: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Записывать в лог приоритет транзакции и комиссию на килобайт во время добычи блоков (по умолчанию: %u)</translation>
@@ -3422,10 +3434,6 @@ rpcpassword=%s
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Дописывать отметки времени к отладочному выводу (по умолчанию: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Печатать дерево блоков при запуске (по умолчанию: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Транслировать и генерировать транзакции носителей данных (по умолчанию: %u)</translation>
@@ -3498,10 +3506,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Неверная сумма в параметре -paytxfee=&lt;кол-во&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Неверная сумма</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Недостаточно монет</translation>
@@ -3534,10 +3538,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>Загрузка завершена</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Чтобы использовать опцию %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Ошибка</translation>
diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts
index 84b973bf924d..9ca08ee7da7b 100644
--- a/src/qt/locale/bitcoin_sah.ts
+++ b/src/qt/locale/bitcoin_sah.ts
@@ -1,10 +1,6 @@
 <TS language="sah" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Аадырыскын уларытаргар иккитэ баттаа</translation>
-    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index fe7c62cd6043..c390d24b4c96 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dvojklikom editovať adresu alebo popis</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Kliknutím pravým tlačidlom upravte adresu alebo popis</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -478,6 +478,10 @@
         <source>Up to date</source>
         <translation>Aktualizovaný</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Spracovaný %n blok tranzakčnej histórie</numerusform><numerusform>Spracované %n bloky tranzakčnej histórie</numerusform><numerusform>Spracovaných %n blokov tranzakčnej histórie</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Sťahujem...</translation>
@@ -519,6 +523,10 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Výber mince</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>Množstvo:</translation>
@@ -539,6 +547,10 @@ Adresa: %4</translation>
         <source>Fee:</source>
         <translation>Poplatok:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Prach:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>Po poplatku:</translation>
@@ -563,6 +575,14 @@ Adresa: %4</translation>
         <source>Amount</source>
         <translation>Suma</translation>
     </message>
+    <message>
+        <source>Received with label</source>
+        <translation>Prijaté s označením</translation>
+    </message>
+    <message>
+        <source>Received with address</source>
+        <translation>Prijaté s adresou</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Dátum</translation>
@@ -623,6 +643,10 @@ Adresa: %4</translation>
         <source>Copy priority</source>
         <translation>Kopírovať prioritu</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopírovať prach</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Kopírovať zmenu</translation>
@@ -671,6 +695,10 @@ Adresa: %4</translation>
         <source>none</source>
         <translation>žiadne</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>Môže sa líšiť o +/- %1 satoshi pre každý vstup</translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>áno</translation>
@@ -883,7 +911,15 @@ Adresa: %4</translation>
         <source>Error</source>
         <translation>Chyba</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>%n GB voľného miesta</numerusform><numerusform>%n GB voľného miesta</numerusform><numerusform>%n GB voľného miesta</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(z %n GB potrebného)</numerusform><numerusform>(z %n GB potrebných)</numerusform><numerusform>(z %n GB potrebných)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -937,6 +973,14 @@ Adresa: %4</translation>
         <source>Number of script &amp;verification threads</source>
         <translation>Počet skript overujucich vlákien</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Prijať spojenia zvonku</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Povoliť prichádzajúce spojenia</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP adresy proxy (napr. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
@@ -1194,6 +1238,10 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresa/Názov počítača</translation>
+    </message>
     </context>
 <context>
     <name>QObject</name>
@@ -1201,6 +1249,10 @@ Adresa: %4</translation>
         <source>Amount</source>
         <translation>Suma</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Zadajte bitcoin adresu (napr. %1)</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 h</translation>
@@ -1213,7 +1265,11 @@ Adresa: %4</translation>
         <source>N/A</source>
         <translation>nie je k dispozícii</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1287,6 +1343,18 @@ Adresa: %4</translation>
         <source>Current number of blocks</source>
         <translation>Aktuálny počet blokov</translation>
     </message>
+    <message>
+        <source>Version</source>
+        <translation>Verzia</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Odoslaných bajtov</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Prijatých bajtov</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Čas posledného bloku</translation>
@@ -1603,6 +1671,10 @@ Adresa: %4</translation>
         <source>Clear all fields of the form.</source>
         <translation>Vyčistiť všetky polia formulára.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Prach:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>Zmazať &amp;všetko</translation>
@@ -1703,6 +1775,10 @@ Adresa: %4</translation>
         <source>Warning: Unknown change address</source>
         <translation>Varovanie: Neznáma adresa pre výdavok</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Kopírovať prach</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Určite to chcete odoslať?</translation>
@@ -2405,30 +2481,6 @@ Adresa: %4</translation>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Prijať spojenia zvonku (predvolené: 1 ak žiadne -proxy alebo -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, musíte nastaviť rpcpassword heslo v súbore nastavení:
-%s
-Odporúča sa používať nasledujúce náhodné heslo:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(nemusíte si pamätať toto heslo)
-Užívateľské meno a heslo NESMÚ byť rovnaké.
-Ak súbor neexistuje, vytvorte ho s prístupovým právom owner-readable-only čitateľné len pre majiteľa.
-Tiež sa odporúča nastaviť alertnotify aby ste boli upozorňovaní na problémy;
-napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6</translation>
@@ -2437,14 +2489,6 @@ napríklad: alertnotify=echo %%s | mail -s "Bitcoin Výstraha" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Vojsť do režimu regresného testovania, ktorý používa špeciálnu reťaz v ktorej môžu byť bloky v okamihu vyriešené.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Transakcia bola zamietnutá! Toto sa môže stať ak niektoré coins vo vašej peňaženke už boli minuté, ako keď použijete kópiu wallet.dat a coins boli minuté z kópie ale neoznačené ako minuté tu.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Chyba: Táto transakcia vyžaduje transakčný poplatok aspoň %s kvôli svojej sume, komplexite alebo použitiu nedávno prijatých prostriedkov.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID)</translation>
@@ -2551,10 +2595,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Error: Disk space is low!</source>
         <translation>Chyba: Málo miesta na disku!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Chyba: Peňaženka je zamknutá, nemôžem vytvoriť transakciu!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Chyba počúvania na ktoromkoľvek porte. Použi -listen=0 ak toto chcete.</translation>
@@ -2647,10 +2687,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neplatná suma pre -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Vytlač blok pri spustení, ak nájdený v zozname blokov</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Možnosti RPC SSL: (Pozri v Bitcoin Wiki pokyny pre SSL nastavenie)</translation>
@@ -2783,10 +2819,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neplatná suma pre -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Neplatná suma</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Nedostatok prostriedkov</translation>
@@ -2819,10 +2851,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Done loading</source>
         <translation>Dokončené načítavanie</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Použiť %s možnosť.</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Chyba</translation>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 60fc4a93e5c2..e0945cde06e2 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1,10 +1,6 @@
 <TS language="sl_SI" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dvakrat klikni za urejanje naslovov ali oznak</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Ustvari nov naslov</translation>
@@ -2082,14 +2078,6 @@ Naslov: %4
         <source>Use the test network</source>
         <translation>Uporabi testno omrežje</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Napaka: Transakcija ni bila sprejeta! To se je morebiti zgodilo, ker so nekateri kovanci v vaši denarnici bili že porabljeni, na primer če ste uporabili kopijo wallet.dat in so tako kovanci bili porabljeni v kopiji, ostali pa označeni kot neporabljeni.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Napaka: Ta transakcija potrebuje povizijo, ki je najmanj %s zaradi svoje količine, kompliciranosti, ali zaradi uporabe prejetih sredstev.</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Izvedi ukaz, ko bo transakcija denarnice se spremenila (V cmd je bil TxID zamenjan za %s)</translation>
@@ -2118,10 +2106,6 @@ Naslov: %4
         <source>Error: Disk space is low!</source>
         <translation>Opozorilo: Premalo prostora na disku!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Opozorilo: Denarnica je zaklenjena, ni mogoče opraviti transkacijo! </translation>
-    </message>
     <message>
         <source>Importing...</source>
         <translation>Uvažam...</translation>
@@ -2226,10 +2210,6 @@ Naslov: %4
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Neveljavna količina za -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Neveljavna količina</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Premalo sredstev</translation>
@@ -2262,10 +2242,6 @@ Naslov: %4
         <source>Done loading</source>
         <translation>Nalaganje končano</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Za uporabo %s opcije</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Napaka</translation>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 7e63f239cafd..2249d52136b8 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -2,21 +2,53 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Klikoni 2 herë për të ndryshuar adressën ose etiketën</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Kliko me të djathtën për të ndryshuar adresën ose etiketen.</translation>
     </message>
     <message>
         <source>Create a new address</source>
         <translation>Krijo një adresë të re</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;E re</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopjo adresën e zgjedhur në memorjen e sistemit </translation>
     </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Kopjo</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>&amp;Kopjo adresen</translation>
+    </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Fshi adresen e selektuar nga lista</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Fshi</translation>
     </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Zgjidh adresen ku do te dergoni monedhat</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Duke derguar adresen</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Duke marr adresen</translation>
+    </message>
+    <message>
+        <source>&amp;Edit</source>
+        <translation>&amp;Ndrysho</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
@@ -53,7 +85,7 @@
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Enkripto portofolin</translation>
+        <translation>Kripto portofolin</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
@@ -83,6 +115,10 @@
         <source>Confirm wallet encryption</source>
         <translation>Konfirmoni enkriptimin e portofolit</translation>
     </message>
+    <message>
+        <source>Are you sure you wish to encrypt your wallet?</source>
+        <translation>Jeni te sigurt te enkriptoni portofolin tuaj?</translation>
+    </message>
     <message>
         <source>Wallet encrypted</source>
         <translation>Portofoli u enkriptua</translation>
@@ -146,6 +182,26 @@
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Ndrysho frazkalimin e përdorur per enkriptimin e portofolit</translation>
     </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Bitcoin</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Portofol</translation>
+    </message>
+    <message>
+        <source>&amp;Send</source>
+        <translation>&amp;Dergo</translation>
+    </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>&amp;Merr</translation>
+    </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>&amp;Shfaq / Fsheh</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Skedar</translation>
@@ -162,6 +218,46 @@
         <source>Tabs toolbar</source>
         <translation>Shiriti i mjeteve</translation>
     </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Berthama Bitcoin</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>Rreth Berthames Bitkoin</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n ore</numerusform><numerusform>%n ore</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n dite</numerusform><numerusform>%n dite</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><numerusform>%n jave</numerusform><numerusform>%n jave</numerusform></translation>
+    </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation>%1 dhe %2</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n vit</numerusform><numerusform>%n vite</numerusform></translation>
+    </message>
+    <message>
+        <source>%1 behind</source>
+        <translation>%1 Pas</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Problem</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Informacion</translation>
+    </message>
     <message>
         <source>Up to date</source>
         <translation>I azhornuar</translation>
@@ -192,6 +288,14 @@
     </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Zgjedhja e monedhes</translation>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Shuma:</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Sasia</translation>
@@ -200,6 +304,18 @@
         <source>Date</source>
         <translation>Data</translation>
     </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Kopjo adresën</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>po</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>jo</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(pa etiketë)</translation>
@@ -250,12 +366,44 @@
 </context>
 <context>
     <name>FreespaceChecker</name>
+    <message>
+        <source>name</source>
+        <translation>emri</translation>
+    </message>
     </context>
 <context>
     <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Berthama Bitcoin</translation>
+    </message>
+    <message>
+        <source>version</source>
+        <translation>versioni</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Rreth Berthames Bitkoin</translation>
+    </message>
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>Miresevini</translation>
+    </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>Miresevini ne Berthamen Bitcoin</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Berthama Bitcoin</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Problem</translation>
+    </message>
     </context>
 <context>
     <name>OpenURIDialog</name>
@@ -292,6 +440,22 @@
     </context>
 <context>
     <name>RPCConsole</name>
+    <message>
+        <source>&amp;Open</source>
+        <translation>&amp;Hap</translation>
+    </message>
+    <message>
+        <source>&amp;Clear</source>
+        <translation>&amp;Pastro</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>asnjehere</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>i/e panjohur</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -340,6 +504,10 @@
         <source>Send Coins</source>
         <translation>Dërgo Monedha</translation>
     </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Shuma:</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Dërgo marrësve të ndryshëm njëkohësisht</translation>
@@ -416,6 +584,10 @@
     </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Berthama Bitcoin</translation>
+    </message>
     <message>
         <source>[testnet]</source>
         <translation>[testo rrjetin]</translation>
@@ -531,6 +703,10 @@
         <source>Mined</source>
         <translation>Minuar</translation>
     </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Kopjo adresën</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
@@ -570,5 +746,21 @@
     </context>
 <context>
     <name>bitcoin-core</name>
-    </context>
+    <message>
+        <source>Information</source>
+        <translation>Informacion</translation>
+    </message>
+    <message>
+        <source>Insufficient funds</source>
+        <translation>Fonde te pamjaftueshme</translation>
+    </message>
+    <message>
+        <source>Rescanning...</source>
+        <translation>Rikerkim</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Problem</translation>
+    </message>
+</context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index b005ce23ad0a..9f72c66d7ff2 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -1,10 +1,6 @@
 <TS language="sr" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Kliknite dva puta da izmenite adresu ili etiketu</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Napravite novu adresu</translation>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 551f6976cf43..7d87ff89c5f4 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Dubbelklicka för att ändra adressen eller etiketten</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Höger-klicka för att ändra adressen eller etiketten.</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1285,6 +1285,14 @@ Adress: %4
         <source>Refund from %1</source>
         <translation>Återbetalning från %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Betalningsbegäran %2 är för stor (%3 bytes, tillåten %4 bytes)</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Betalningsbegäran begär DoS-skydd</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Kommunikationsfel med %1: %2</translation>
@@ -2799,30 +2807,6 @@ Adress: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Acceptera anslutningar utifrån (förvalt: 1 om ingen -proxy eller -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, du behöver sätta ett rpclösensord i konfigurationsfilen:
-%s
-Det är rekommenderat att använda följande slumpade lösenord:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(du behöver inte komma ihåg lösenordet)
-Användarnamnet och lösenordet FÅR INTE bara detsamma.
-Om filen inte existerar, skapa den med enbart ägarläsbara filrättigheter.
-Det är också rekommenderat att sätta alertnotify så du meddelas om problem;
-till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind till given adress och lyssna alltid på den. Använd [värd]:port notation för IPv6</translation>
@@ -2839,14 +2823,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ange regressiontestläge, som använder en speciell kedja i vilka block kan lösas omedelbart.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fel: Transaktionen avslogs! Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fel: Denna transaktion kräver en transaktionsavgift på minst %s på grund av dess storlek, komplexitet, eller användning av senast mottagna bitcoins!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation>
@@ -2959,10 +2935,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Fel: Hårddiskutrymme är lågt!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Fel: Plånboken är låst, det går ej att skapa en transaktion!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Misslyckades att lyssna på någon port. Använd -listen=0 om du vill detta.</translation>
@@ -3087,10 +3059,22 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Avgifter (i BTC/Kb) mindre än detta betraktas som nollavgift för transaktionsskapande (förvalt: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Om paytxfee inte är satt, inkludera tillräcklig avgift så att transaktionen börjar att konfirmeras inom n blocks (förvalt: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Otillåtet belopp för -maxtxfee=&lt;belopp&gt;: '%s' (måste åtminstånde vara minrelay avgift %s för att förhindra stoppade transkationer)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Maximal storlek på data i databärartransaktioner som vi reläar och bryter (förvalt: %u) </translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximum total avgift att använda i en plånbok transaktion, sätts den för lågt kan stora transaktioner avbrytas (förvalt: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
@@ -3103,6 +3087,34 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; och kryptografisk mjukvara utvecklad av Eric Young samt UPnP-mjukvara skriven av Thomas Bernard.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>För att använda bitconid,eller -server optionen till bitcoin-qt så mäste du sätta ett rpclösensord i konfigurationsfilen:
+%s
+Det är rekommenderat att använda följande slumpade lösenord:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(du behöver inte komma ihåg lösenordet)
+Användarnamnet och lösenordet FÅR INTE vara detsamma.
+Om filen inte existerar, skapa den med enbart ägarläsbara filrättigheter.
+Det är också rekommenderat att sätta alertnotify så du meddelas om problem;
+till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Varning: -maxtxfee är satt väldigt hög! Så höga avgifter kan betalas för en enstaka transaktion.</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>Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer Bitcoin Core inte att fungera korrekt.</translation>
@@ -3111,6 +3123,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Vitlistade klienter kan inte bli DoS bannade och deras transaktioner reläas alltid, även om dom redan är i mempoolen, användbart för t.ex en gateway  </translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Acceptera publika REST förfrågningar (förvalt: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Kan inte matcha -whitebind adress: '%s'</translation>
@@ -3147,6 +3163,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Initieringschecken fallerade. Bitcoin Core stängs av...</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Otillåtet belopp för -maxtxfee=&lt;belopp&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ogiltigt belopp för -minrelaytxfee=&lt;belopp&gt;: '%s'</translation>
@@ -3163,10 +3183,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Ogiltig nätmask angiven i -whitelist: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Håll som mest &lt;n&gt; oanslutningsbara block i minnet (förvalt: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Håll som mest &lt;n&gt; oanslutningsbara transaktioner i minnet (förvalt: %u)</translation>
@@ -3179,10 +3195,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Nodreläoptioner:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Skriv ut block vid uppstart, om det hittas i blockindexet</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL optioner: (se Bitcoin Wiki för SSL inställningsinstruktioner)</translation>
@@ -3231,6 +3243,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Transaktionens belopp måste vara positiva</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaktionen är för stor för avgiftspolicyn</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transaktionen är för stor</translation>
@@ -3327,10 +3343,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Hur grundlig blockverifikationen vid -checkblocks är (0-4, förvalt: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Om paytxfee inte är satt, inkludera tillräcklig avgift så att transaktionen konfirmeras inom n blocks (förvalt: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Logga transaktionsprioritet och avgift per kB vid blockbrytning (förvalt: %u)</translation>
@@ -3423,10 +3435,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Skriv ut tidsstämpel i avlusningsinformationen (förvalt: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Skriv ut blockträdet vid uppstart (förvalt: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Reläa och bearbeta databärartransaktioner (förvalt: %u) </translation>
@@ -3503,10 +3511,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Ogiltigt belopp för -paytxfee=&lt;belopp&gt;:'%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Ogiltig mängd</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Otillräckligt med bitcoins</translation>
@@ -3539,10 +3543,6 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Klar med laddning</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Att använda %s alternativet</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Fel</translation>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index 174816aaef00..1acf784af7ff 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -1,10 +1,6 @@
 <TS language="th_TH" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>ดับเบิ้ลคลิก เพื่อแก้ไขที่อยู่ หรือชื่อ</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>สร้างที่อยู่ใหม่</translation>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index ab02cc92a60f..c562d027c145 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Adresi ya da etiketi düzenlemek için çift tıklayınız</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Adresi ya da etiketi düzenlemek için sağ düğme ile tıklayınız.</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -27,7 +27,7 @@
     </message>
     <message>
         <source>&amp;Copy Address</source>
-        <translation>Adresi &amp;kopyala</translation>
+        <translation>&amp;Adresi Kopyala</translation>
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
@@ -59,7 +59,7 @@
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Yollama adresleri</translation>
+        <translation>&amp;Gönderme adresleri...</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
@@ -1288,6 +1288,14 @@ Adres: %4
         <source>Refund from %1</source>
         <translation>%1 öğesinden iade</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>%2 ödeme talebi çok büyüktür (%3 bayt, müsaade edilen %4 bayt).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Ödeme talebi DoS koruması</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>%1 ile iletişimde hata: %2</translation>
@@ -2806,30 +2814,6 @@ Adres: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Dışarıdan gelen bağlantıları kabul et (varsayılan: -proxy veya -connect yoksa 1)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, şu yapılandırma dosyasında rpc parolası belirtmeniz gerekir:
-%s
-Aşağıdaki rastgele oluşturulan parolayı kullanmanız tavsiye edilir:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(bu parolayı hatırlamanız gerekli değildir)
-Kullanıcı ismi ile parolanın FARKLI olmaları gerekir.
-Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.
-Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye edilir;
-mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Belirtilen adrese bağlan ve daima ondan dinle. IPv6 için [makine]:port yazımını kullanınız</translation>
@@ -2846,14 +2830,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Blokların anında çözülebileceği özel bir zincir kullanan regresyon deneme kipine gir.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Hata: Muamele reddedildi! Cüzdanınızdaki madenî paraların bazıları zaten harcanmış olduğunda bu meydana gelebilir. Örneğin wallet.dat dosyasının bir kopyasını kullandıysanız ve kopyada para harcandığında ancak burada harcandığı işaretlenmediğinde.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Hata: Muamelenin meblağı, karmaşıklığı ya da yakın geçmişte alınan fonların kullanılması nedeniyle bu muamele en az %s tutarında ücret gerektirmektedir!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir)</translation>
@@ -2966,10 +2942,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error: Disk space is low!</source>
         <translation>Hata: Disk alanı düşük!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Hata: Cüzdan kilitli, muamele oluşturulamadı!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Herhangi bir portun dinlenmesi başarısız oldu. Bunu istiyorsanız -listen=0 seçeneğini kullanınız.</translation>
@@ -3094,10 +3066,22 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Kb başına BTC olarak bundan düşük ücretler muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Eğer paytxfee ayarlanmadıysa kafi derecede ücret ekleyin ki muameleler teyite vasati n blok içinde başlasın (varsayılan: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>-maxtxfee=&lt;tutar&gt; için geçersiz tutar: '%s' (Sıkışmış muameleleri önlemek için en az %s değerinde asgari aktarım ücretine eşit olmalıdır)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Aktardığımız ve oluşturduğumuz veri taşıyıcı muamelelerindeki azami veri boyutu (varsayılan: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Tek cüzdan muamelesinde kullanılacak azami toplam ücret, çok düşük ayarlamak büyük muameleleri iptal edebilir (varsayılan: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
@@ -3114,6 +3098,34 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Bu ürün OpenSSL projesi tarafından OpenSSL araç takımı (http://www.openssl.org/) için geliştirilen yazılımlar, Eric Young (eay@cryptsoft.com) tarafından hazırlanmış şifreleme yazılımları ve Thomas Bernard tarafından programlanmış UPnP yazılımı içerir.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>bitcoind ya da bitcoin-qt ile -server seçeneğini kullanmak için yapılandırma dosyasında bir rpc parolası belirtmeniz gerekir:
+%s
+Aşağıdaki rastgele oluşturulan parolayı kullanmanız tavsiye edilir:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(bu parolayı hatırlamanız gerekli değildir)
+Kullanıcı ismi ile parolanın FARKLI olmaları gerekir.
+Dosya mevcut değilse, sadece sahibi için okumayla sınırlı izin ile oluşturunuz.
+Sorunlar hakkında bildiri almak için alertnotify unsurunu ayarlamanız tavsiye edilir;
+mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>İkaz: -maxtxfee çok yüksek bir değere ayarlanmış! Bu denli yüksek ücretler tek bir muamelede ödenebilir.</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>Uyarı: Lütfen bilgisayarınızın saat ve tarihinin doğru olduğunu kontol ediniz! Saatinizde gecikme varsa Bitcoin Çekirdeği doğru şekilde çalışamaz.</translation>
@@ -3122,6 +3134,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Beyaz listeye alınan eşler DoS yasaklamasına uğramazlar ve muameleleri zaten mempool'da olsalar da daima aktarılır, bu mesela bir geçit için kullanışlıdır</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Herkese açık REST taleplerini kabul et (varsayılan: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>-whitebind adresi çözümlenemedi: '%s'</translation>
@@ -3158,6 +3174,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Başlatma sınaması başarısız oldu. Bitcoin Çekirdeği kapatılıyor.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-maxtxfee=&lt;tutar&gt; için geçersiz tutar: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-minrelaytxfee=&lt;amount&gt; için geçersiz meblağ: '%s'</translation>
@@ -3174,10 +3194,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>-whitelist: '%s' unsurunda geçersiz bir ağ maskesi belirtildi</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Hafızada en çok &lt;n&gt; bağlanılamaz blok tut (varsaylan: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Hafızada en çok &lt;n&gt; bağlanılamaz muamele tut (varsayılan: %u)</translation>
@@ -3190,10 +3206,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Node relay options:</source>
         <translation>Düğüm röle seçenekleri:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Başlangıçta bloğu göster, blok indeksinde bulunduysa</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL seçenekleri: (SSL kurulumu yönergeleri için Bitcoin vikisine bakınız)</translation>
@@ -3242,6 +3254,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Transaction amounts must be positive</source>
         <translation>Muamele tutarının pozitif olması lazımdır</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Ücret politikası için çok büyük muamele</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Muamele çok büyük</translation>
@@ -3338,10 +3354,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>-checkblocks'un blok kontrolünün ne kadar kapsamlı olacağı (0 ilâ 4, varsayılan: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Eğer paytxfee ayarlanmadıysa, kafi derecede ücret ekleyin ki muameleler vasati n blok içinde teyit edilsin (varsayılan: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Blok oluşturulduğunda muamele önceliğini ve kB başı ücreti kütüğe al (varsayılan: %u)</translation>
@@ -3434,10 +3446,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Hata ayıklama verilerinin önüne zaman damgası ekle (varsayılan: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Başlangıçta blok ağacını göster (varsayılan: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Veri taşıyıcı muameleleri oluştur ve aktar (varsayılan: %u)</translation>
@@ -3514,10 +3522,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-paytxfee=&lt;meblağ&gt; için geçersiz meblağ: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Geçersiz meblağ</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Yetersiz bakiye</translation>
@@ -3550,10 +3554,6 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Done loading</source>
         <translation>Yükleme tamamlandı</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>%s seçeneğini kullanmak için</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Hata</translation>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index fe39c8e2cf94..fc0db5b49acc 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Двічі клікніть на адресу чи назву для їх зміни</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>Клік правою кнопкою для редагування адреси або мітки</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1288,6 +1288,14 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Відшкодування з %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>Запит до оплати %2 занадто великий (%3 байт, дозволено %4 байт)</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Оплата потребує захисту DoS</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Помилка зв'язку з %1: %2</translation>
@@ -2806,30 +2814,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Приймати підключення ззовні (типово: 1 за відсутності -proxy чи -connect)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, ви повинні встановити rpcpassword в файлі конфігурації:
-%s
-Рекомендується використати такий випадковий пароль:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(ви не повинні пам'ятати цей пароль)
-Ім’я користувача та пароль ПОВИННІ бути різними.
-Якщо файлу не існує, створіть його, обмеживши доступ правом читання для власника.
-Також рекомендується використовувати alertnotify для того, щоб отримувати сповіщення про проблеми;
-наприклад: alertnotify=echo %%s | mail -s "Сповіщення Bitcoin" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Прив'язатися до даної адреси та прослуховувати її. Використовуйте запис виду [хост]:порт для IPv6</translation>
@@ -2846,14 +2830,6 @@ rpcpassword=%s
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ввійти в режим регресивного тестування, що використовує спеціальний ланцюг з миттєвим знаходженням блоків.</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Помилка: транзакцію було відхилено. Це може статись, якщо декілька монет з вашого гаманця вже використані, наприклад, якщо ви використовуєте одну копію гаманця (wallet.dat), а монети були використані з іншої копії, але не позначені як використані в цій.</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Помилка: Ця транзакція потребує додавання комісії щонайменше в %s через її розмір, складність, або внаслідок використання недавно отриманих коштів!</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Виконати команду, коли транзакція гаманця зміниться (замість %s в команді буде підставлено ідентифікатор транзакції)</translation>
@@ -2966,10 +2942,6 @@ rpcpassword=%s
         <source>Error: Disk space is low!</source>
         <translation>Помилка: Мало вільного місця на диску!</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Помилка: Гаманець заблокований, неможливо створити транзакцію!</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Не вдалося слухати на жодному порту. Використовуйте -listen=0, якщо ви хочете цього.</translation>
@@ -3094,10 +3066,18 @@ rpcpassword=%s
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Комісії (в BTC/КБ), що менші за вказану, вважатимуться нульовими (для створення транзакції) (типово: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Якщо параметр paytxfee не встановлено, включити комісію для отримання перших підтверджень транзакцій протягом n блоків (типово: %u)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Максимальний розмір даних в транзакціях носіїв даних, що ми передаємо і добуваємо (за замовчуванням: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Максимальна загальна плата для використання в одній транзакції, установка занадто низької може перервати великі транзакції(стандартно: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Дізнаватися адреси учасників через DNS при замалій кількості відомих адрес (типово: 1 за відсутності -connect)</translation>
@@ -3114,6 +3094,34 @@ rpcpassword=%s
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL &lt;https://www.openssl.org/&gt;, криптографічне програмне забезпечення, написане Еріком Янгом, та функції для роботи з UPnP, написані Томасом Бернардом.</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>Для використання bitcoind, або bitcoin-qt з параметром -server, ви повинні встановити rpcpassword в файлі конфігурації:
+%s
+Рекомендується використати такий випадковий пароль:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(вам не треба запам'ятовувати цей пароль)
+Ім'я користувача та пароль ПОВИННІ бути різними.
+Якщо файлу не існує, створіть його, обмеживши доступ правом читання для власника.
+Також рекомендується використовувати alertnotify для того, щоб отримувати сповіщення про проблеми;
+наприклад: alertnotify=echo %%s | mail -s "Сповіщення Bitcoin" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Увага: установлено дуже велике значення -maxtxfee! Такі великі комісії можуть бути сплачені в окремій транзакції.</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>
@@ -3122,6 +3130,10 @@ rpcpassword=%s
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>Учасники, що знаходяться в білому списку, не можуть бути заблоковані за DoS та їхні транзакції завжди ретранслюватимуться (навіть якщо вони є в пам'яті), що може бути корисним, наприклад, для шлюзу</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Приймати публічні REST-запити (типово: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>Не вдалося розпізнати адресу для -whitebind: «%s»</translation>
@@ -3158,6 +3170,10 @@ rpcpassword=%s
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Не вдалося пройти базові перевірки під час ініціалізації. Bitcoin Core буде вимкнено.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Неприпустима сума для -maxtxfee = &lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Вказано некоректну суму для параметру -minrelaytxfee: «%s»</translation>
@@ -3174,10 +3190,6 @@ rpcpassword=%s
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>Вказано неправильну маску підмережі для -whitelist: «%s»</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Утримувати в пам'яті щонайбільше &lt;n&gt; блоків, не під'єднаних до основного ланцюжка (типово: %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Утримувати в пам'яті щонайбільше &lt;n&gt; транзакцій, що споживають невідомі входи (типово: %u)</translation>
@@ -3190,10 +3202,6 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>Параметри вузла ретрансляції:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Роздрукувати блок під час запуску (якщо він буде знайдений в індексі)</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Параметри RPC SSL: (див. Bitcoin Wiki для налаштування SSL)</translation>
@@ -3242,6 +3250,10 @@ rpcpassword=%s
         <source>Transaction amounts must be positive</source>
         <translation>Суми монет у транзакції мають бути позитивними</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Транзакція занадто велика для правил комісії</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Транзакція занадто велика</translation>
@@ -3338,10 +3350,6 @@ rpcpassword=%s
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Рівень ретельності перевірки блоків (0-4, типово: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>Якщо параметр paytxfee не встановлено, включити комісію, достатню для підтвердження транзакцій протягом n блоків (типово: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>Записувати в лог-файл пріоритет транзакції та комісію за кБ під час добування блоків (типово: %u)</translation>
@@ -3434,10 +3442,6 @@ rpcpassword=%s
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Доповнювати налагоджувальний вивід відміткою часу (типово: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>Роздрукувати дерево блоків під час запуску (типово: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>Ретранслювати та створювати транзакції носіїв даних (типово: %u)</translation>
@@ -3514,10 +3518,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Помилка у величині комісії -paytxfee=&lt;amount&gt;: «%s»</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>Некоректна кількість</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>Недостатньо коштів</translation>
@@ -3550,10 +3550,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>Завантаження завершене</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>Щоб використати опцію %s</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>Помилка</translation>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index 86f3226269a3..414ff8354fd8 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -1,10 +1,6 @@
 <TS language="ur_PK" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>ایڈریس یا لیبل میں ترمیم کرنے پر ڈبل کلک کریں</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>نیا ایڈریس بنائیں</translation>
@@ -326,10 +322,6 @@
         <source>This help message</source>
         <translation>یہ مدد کا پیغام</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>غلط رقم</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>ناکافی فنڈز</translation>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 54e649aedef0..62d4c1322f77 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1,10 +1,6 @@
 <TS language="uz@Cyrl" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Манзил ёки ёрлиқни таҳрирлаш учун икки марта босинг</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Янги манзил яратинг</translation>
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index 3ca560588305..7b362491c2bd 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -1,10 +1,6 @@
 <TS language="vi" version="2.0">
 <context>
     <name>AddressBookPage</name>
-    <message>
-        <source>Double-click to edit address or label</source>
-        <translation>Click đúp chuột để chỉnh sửa địa chỉ hoặc nhãn dữ liệu</translation>
-    </message>
     <message>
         <source>Create a new address</source>
         <translation>Tạo một địa chỉ mới</translation>
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index bf76c8638aa0..c1c51dd35f5f 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -1,73 +1,585 @@
 <TS language="vi_VN" version="2.0">
 <context>
     <name>AddressBookPage</name>
+    <message>
+        <source>Right-click to edit address or label</source>
+        <translation>Nhấn chuột phải để sửa địa chỉ hoặc nhãn</translation>
+    </message>
     <message>
         <source>Create a new address</source>
         <translation>Tạo một địa chỉ mới</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Mới</translation>
+    </message>
+    <message>
+        <source>Copy the currently selected address to the system clipboard</source>
+        <translation>Copy địa chỉ được chọn vào clipboard</translation>
+    </message>
+    <message>
+        <source>&amp;Copy</source>
+        <translation>&amp;Copy</translation>
+    </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>Đó&amp;ng</translation>
+    </message>
+    <message>
+        <source>&amp;Copy Address</source>
+        <translation>&amp;Copy Địa Chỉ</translation>
+    </message>
+    <message>
+        <source>Delete the currently selected address from the list</source>
+        <translation>Xóa địa chỉ hiện tại từ danh sách</translation>
+    </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Xuất dữ liệu trong mục hiện tại ra file</translation>
+    </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>X&amp;uất</translation>
+    </message>
+    <message>
+        <source>&amp;Delete</source>
+        <translation>&amp;Xó&amp;a</translation>
+    </message>
+    <message>
+        <source>Choose the address to send coins to</source>
+        <translation>Chọn địa chỉ để gửi coin tới</translation>
+    </message>
+    <message>
+        <source>Choose the address to receive coins with</source>
+        <translation>Chọn địa chỉ để nhận coin</translation>
+    </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>C&amp;họn</translation>
+    </message>
+    <message>
+        <source>Sending addresses</source>
+        <translation>Địa chỉ gửi</translation>
+    </message>
+    <message>
+        <source>Receiving addresses</source>
+        <translation>Địa chỉ nhận</translation>
+    </message>
+    <message>
+        <source>Copy &amp;Label</source>
+        <translation>Copy &amp;Nhãn</translation>
+    </message>
+    <message>
+        <source>&amp;Edit</source>
+        <translation>&amp;Sửa</translation>
+    </message>
+    <message>
+        <source>Export Address List</source>
+        <translation>Xuất Danh Sách Địa Chỉ</translation>
+    </message>
+    <message>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Comma separated file (*.csv)</translation>
+    </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Xuất Đã Thất Bại</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
-    </context>
+    <message>
+        <source>Label</source>
+        <translation>Nhãn</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(không nhãn)</translation>
+    </message>
+</context>
 <context>
     <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation>Hội thoại Passphrase</translation>
+    </message>
+    <message>
+        <source>Enter passphrase</source>
+        <translation>Điền passphrase</translation>
+    </message>
+    <message>
+        <source>New passphrase</source>
+        <translation>Passphrase mới</translation>
+    </message>
+    <message>
+        <source>Repeat new passphrase</source>
+        <translation>Điền lại passphrase</translation>
+    </message>
+    <message>
+        <source>Encrypt wallet</source>
+        <translation>Mã hóa ví</translation>
+    </message>
+    <message>
+        <source>Unlock wallet</source>
+        <translation>Mở khóa ví</translation>
+    </message>
+    <message>
+        <source>Decrypt wallet</source>
+        <translation>Giải mã ví</translation>
+    </message>
+    <message>
+        <source>Wallet encrypted</source>
+        <translation>Ví đã được mã hóa</translation>
+    </message>
     </context>
 <context>
     <name>BitcoinGUI</name>
+    <message>
+        <source>&amp;Overview</source>
+        <translation>&amp;Tổng quan</translation>
+    </message>
+    <message>
+        <source>Node</source>
+        <translation>Node</translation>
+    </message>
+    <message>
+        <source>E&amp;xit</source>
+        <translation>T&amp;hoát</translation>
+    </message>
+    <message>
+        <source>Quit application</source>
+        <translation>Thoát chương trình</translation>
+    </message>
+    <message>
+        <source>About &amp;Qt</source>
+        <translation>Về &amp;Qt</translation>
+    </message>
+    <message>
+        <source>Show information about Qt</source>
+        <translation>Xem thông tin về Qt</translation>
+    </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Mở &amp;URI...</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core client</translation>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Bitcoin</translation>
+    </message>
+    <message>
+        <source>Wallet</source>
+        <translation>Ví</translation>
+    </message>
+    <message>
+        <source>&amp;Send</source>
+        <translation>&amp;Gửi</translation>
+    </message>
+    <message>
+        <source>&amp;Receive</source>
+        <translation>&amp;Nhận</translation>
+    </message>
+    <message>
+        <source>&amp;Show / Hide</source>
+        <translation>Ẩn / H&amp;iện</translation>
+    </message>
+    <message>
+        <source>Show or hide the main Window</source>
+        <translation>Hiện hoặc ẩn cửa sổ chính</translation>
+    </message>
+    <message>
+        <source>&amp;File</source>
+        <translation>&amp;File</translation>
+    </message>
+    <message>
+        <source>&amp;Settings</source>
+        <translation>&amp;Thiết lập</translation>
+    </message>
+    <message>
+        <source>&amp;Help</source>
+        <translation>Trợ &amp;giúp</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>&amp;Về Bitcoin Core</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n hour(s)</source>
+        <translation><numerusform>%n giờ</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n day(s)</source>
+        <translation><numerusform>%n ngày</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>%n week(s)</source>
+        <translation><numerusform>%n tuần</numerusform></translation>
+    </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation>%1 và %2</translation>
+    </message>
+    <message numerus="yes">
+        <source>%n year(s)</source>
+        <translation><numerusform>%n năm</numerusform></translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Lỗi</translation>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation>Chú ý</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Thông tin</translation>
+    </message>
+    <message>
+        <source>Up to date</source>
+        <translation>Đã cập nhật</translation>
+    </message>
+    <message>
+        <source>Sent transaction</source>
+        <translation>Giao dịch đã gửi</translation>
+    </message>
+    <message>
+        <source>Incoming transaction</source>
+        <translation>Giao dịch đang tới</translation>
+    </message>
+    <message>
+        <source>Date: %1
+Amount: %2
+Type: %3
+Address: %4
+</source>
+        <translation>Ngày: %1
+Lượng: %2
+Loại: %3
+Địa chỉ: %4
+</translation>
+    </message>
     </context>
 <context>
     <name>ClientModel</name>
-    </context>
+    <message>
+        <source>Network Alert</source>
+        <translation>Network Alert</translation>
+    </message>
+</context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Quantity:</source>
+        <translation>Lượng:</translation>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Bytes:</translation>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Lượng:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Tầm quan trọng:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Phí:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Thay đổi:</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Lượng</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Ngày tháng</translation>
+    </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Lần xác nhận</translation>
+    </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Đã xác nhận</translation>
+    </message>
+    <message>
+        <source>Priority</source>
+        <translation>Tầm quan trọng</translation>
+    </message>
+    <message>
+        <source>Copy address</source>
+        <translation>Copy địa chỉ</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Copy nhãn</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Lượng copy</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>thấp</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>thấp hơn</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>thấp nhất</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>có</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>không</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(không nhãn)</translation>
+    </message>
     </context>
 <context>
     <name>EditAddressDialog</name>
     </context>
 <context>
     <name>FreespaceChecker</name>
+    <message>
+        <source>name</source>
+        <translation>tên</translation>
+    </message>
     </context>
 <context>
     <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>version</source>
+        <translation>version</translation>
+    </message>
+    <message>
+        <source>About Bitcoin Core</source>
+        <translation>Về Bitcoin Core</translation>
+    </message>
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>Chào mừng</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Lỗi</translation>
+    </message>
     </context>
 <context>
     <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation>Mở URI</translation>
+    </message>
+    <message>
+        <source>URI:</source>
+        <translation>URI:</translation>
+    </message>
     </context>
 <context>
     <name>OptionsDialog</name>
+    <message>
+        <source>Options</source>
+        <translation>Lựa chọn</translation>
+    </message>
+    <message>
+        <source>&amp;Main</source>
+        <translation>&amp;Chính</translation>
+    </message>
+    <message>
+        <source>MB</source>
+        <translation>MB</translation>
+    </message>
+    <message>
+        <source>&amp;Display</source>
+        <translation>&amp;Hiển thị</translation>
+    </message>
+    <message>
+        <source>&amp;OK</source>
+        <translation>&amp;OK</translation>
+    </message>
+    <message>
+        <source>&amp;Cancel</source>
+        <translation>&amp;Từ chối</translation>
+    </message>
+    <message>
+        <source>default</source>
+        <translation>mặc định</translation>
+    </message>
     </context>
 <context>
     <name>OverviewPage</name>
+    <message>
+        <source>Form</source>
+        <translation>Form</translation>
+    </message>
+    <message>
+        <source>Total:</source>
+        <translation>Tổng:</translation>
+    </message>
     </context>
 <context>
     <name>PaymentServer</name>
     </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
     </context>
 <context>
     <name>QObject</name>
+    <message>
+        <source>Amount</source>
+        <translation>Lượng</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>NETWORK</translation>
+    </message>
     </context>
 <context>
     <name>QRImageWidget</name>
     </context>
 <context>
     <name>RPCConsole</name>
+    <message>
+        <source>General</source>
+        <translation>Nhìn Chung</translation>
+    </message>
+    <message>
+        <source>Name</source>
+        <translation>Tên</translation>
+    </message>
+    <message>
+        <source>Block chain</source>
+        <translation>Block chain</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Đã gửi</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>User Agent</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
-    </context>
+    <message>
+        <source>Copy label</source>
+        <translation>Copy nhãn</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Lượng copy</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveRequestDialog</name>
+    <message>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Lượng</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Nhãn</translation>
+    </message>
     </context>
 <context>
     <name>RecentRequestsTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Ngày tháng</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Nhãn</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Lượng</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(không nhãn)</translation>
+    </message>
     </context>
 <context>
     <name>SendCoinsDialog</name>
+    <message>
+        <source>Quantity:</source>
+        <translation>Lượng:</translation>
+    </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Bytes:</translation>
+    </message>
+    <message>
+        <source>Amount:</source>
+        <translation>Lượng:</translation>
+    </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Tầm quan trọng:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Phí:</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Thay đổi:</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Lượng copy</translation>
+    </message>
+    <message>
+        <source>(no label)</source>
+        <translation>(không nhãn)</translation>
+    </message>
     </context>
 <context>
     <name>SendCoinsEntry</name>
@@ -80,21 +592,77 @@
     </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Bitcoin Core</translation>
+    </message>
     </context>
 <context>
     <name>TrafficGraphWidget</name>
     </context>
 <context>
     <name>TransactionDesc</name>
+    <message>
+        <source>Date</source>
+        <translation>Ngày tháng</translation>
+    </message>
+    <message>
+        <source>Amount</source>
+        <translation>Lượng</translation>
+    </message>
     </context>
 <context>
     <name>TransactionDescDialog</name>
     </context>
 <context>
     <name>TransactionTableModel</name>
+    <message>
+        <source>Date</source>
+        <translation>Ngày tháng</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
+    </message>
     </context>
 <context>
     <name>TransactionView</name>
+    <message>
+        <source>Copy address</source>
+        <translation>Copy địa chỉ</translation>
+    </message>
+    <message>
+        <source>Copy label</source>
+        <translation>Copy nhãn</translation>
+    </message>
+    <message>
+        <source>Copy amount</source>
+        <translation>Lượng copy</translation>
+    </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Xuất Đã Thất Bại</translation>
+    </message>
+    <message>
+        <source>Comma separated file (*.csv)</source>
+        <translation>Comma separated file (*.csv)</translation>
+    </message>
+    <message>
+        <source>Confirmed</source>
+        <translation>Đã xác nhận</translation>
+    </message>
+    <message>
+        <source>Date</source>
+        <translation>Ngày tháng</translation>
+    </message>
+    <message>
+        <source>Label</source>
+        <translation>Nhãn</translation>
+    </message>
+    <message>
+        <source>Address</source>
+        <translation>Địa chỉ</translation>
+    </message>
     </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
@@ -107,8 +675,76 @@
     </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>X&amp;uất</translation>
+    </message>
+    <message>
+        <source>Export the data in the current tab to a file</source>
+        <translation>Xuất dữ liệu trong mục hiện tại ra file</translation>
+    </message>
     </context>
 <context>
     <name>bitcoin-core</name>
-    </context>
+    <message>
+        <source>Information</source>
+        <translation>Thông tin</translation>
+    </message>
+    <message>
+        <source>Transaction too large</source>
+        <translation>Giao dịch quá lớn</translation>
+    </message>
+    <message>
+        <source>Warning</source>
+        <translation>Chú ý</translation>
+    </message>
+    <message>
+        <source>on startup</source>
+        <translation>khi khởi động</translation>
+    </message>
+    <message>
+        <source>This help message</source>
+        <translation>Thông điệp trợ giúp này</translation>
+    </message>
+    <message>
+        <source>Loading addresses...</source>
+        <translation>Đang đọc các địa chỉ...</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(mặc định: %s)</translation>
+    </message>
+    <message>
+        <source>Insufficient funds</source>
+        <translation>Không đủ tiền</translation>
+    </message>
+    <message>
+        <source>Loading block index...</source>
+        <translation>Đang đọc block index...</translation>
+    </message>
+    <message>
+        <source>Loading wallet...</source>
+        <translation>Đang đọc ví...</translation>
+    </message>
+    <message>
+        <source>Cannot downgrade wallet</source>
+        <translation>Không downgrade được ví</translation>
+    </message>
+    <message>
+        <source>Cannot write default address</source>
+        <translation>Không ghi được địa chỉ mặc định</translation>
+    </message>
+    <message>
+        <source>Rescanning...</source>
+        <translation>Đang quét lại...</translation>
+    </message>
+    <message>
+        <source>Done loading</source>
+        <translation>Đã nạp xong</translation>
+    </message>
+    <message>
+        <source>Error</source>
+        <translation>Lỗi</translation>
+    </message>
+</context>
 </TS>
\ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 94d0675bfdac..5f5a32e65962 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>双击编辑地址或标签</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>鼠标右击编辑地址或标签</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -183,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>钱包已加密</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>请输入新的钱包密码. &lt;br/&gt;密码须包含&lt;b&gt;10个以上字符&lt;/b&gt;,或&lt;b&gt;8个以上单词&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>比特币客户端将关闭软件以完成加密过程。请您谨记：钱包加密并不是万能的，电脑中毒等原因仍可能导致您的比特币意外丢失。</translation>
@@ -280,11 +284,11 @@
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;付款地址 </translation>
+        <translation>正在发送地址(&amp;S)...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>&amp;收款地址</translation>
+        <translation>正在接收地址(&amp;R)...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -412,7 +416,7 @@
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>&amp;命令行 选项</translation>
+        <translation>命令行选项(&amp;C)</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -474,6 +478,10 @@
         <source>Up to date</source>
         <translation>已是最新</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>已处理 %n 个交易历史数据块。</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>更新中...</translation>
@@ -516,6 +524,10 @@ Address: %4
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>币源选择(Coin Selection)</translation>
+    </message>
     <message>
         <source>Quantity:</source>
         <translation>总量：</translation>
@@ -564,6 +576,14 @@ Address: %4
         <source>Amount</source>
         <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>
@@ -676,6 +696,10 @@ Address: %4
         <source>none</source>
         <translation>无</translation>
     </message>
+    <message>
+        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <translation>可能会有 正负 %1 聪(satoshi)的偏差 </translation>
+    </message>
     <message>
         <source>yes</source>
         <translation>是</translation>
@@ -885,11 +909,23 @@ Address: %4
         <source>Bitcoin Core</source>
         <translation>比特币核心</translation>
     </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>错误：无法创建 指定的数据目录 "%1" </translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>错误</translation>
     </message>
-    </context>
+    <message numerus="yes">
+        <source>%n GB of free space available</source>
+        <translation><numerusform>有 %n GB 空闲空间</numerusform></translation>
+    </message>
+    <message numerus="yes">
+        <source>(of %n GB needed)</source>
+        <translation><numerusform>(需要%n GB空间)</numerusform></translation>
+    </message>
+</context>
 <context>
     <name>OpenURIDialog</name>
     <message>
@@ -941,7 +977,7 @@ Address: %4
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation>脚本&amp;验证 进程数 </translation>
+        <translation>脚本验证线程数(&amp;V)</translation>
     </message>
     <message>
         <source>Accept connections from outside</source>
@@ -985,7 +1021,7 @@ Address: %4
     </message>
     <message>
         <source>W&amp;allet</source>
-        <translation>&amp;钱包</translation>
+        <translation>钱包(&amp;A)</translation>
     </message>
     <message>
         <source>Expert</source>
@@ -993,7 +1029,7 @@ Address: %4
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation>启动货币 &amp;控制功能</translation>
+        <translation>启动货币控制功能(&amp;C)</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>
@@ -1001,7 +1037,7 @@ Address: %4
     </message>
     <message>
         <source>&amp;Spend unconfirmed change</source>
-        <translation>&amp;选择未经确认的花费</translation>
+        <translation>使用未经确认的零钱(&amp;S)</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>
@@ -1011,6 +1047,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>使用 &amp;UPnP 映射端口</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>通过 SOCKS5 代理连接比特币网络。</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>通过 SO&amp;CKS5 代理连接(默认代理)：</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>代理服务器 &amp;IP：</translation>
@@ -1142,6 +1186,10 @@ Address: %4
         <source>Mined balance that has not yet matured</source>
         <translation>尚未成熟的挖矿收入余额</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>余额</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>总额：</translation>
@@ -1150,6 +1198,30 @@ Address: %4
         <source>Your current total balance</source>
         <translation>您当前的总余额</translation>
     </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>您当前 观察地址(watch-only address)的余额 </translation>
+    </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>可使用：</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>最近交易记录</translation>
+    </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>观察地址(watch-only address)的未确认交易记录 </translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>观察地址(watch-only address)中尚未成熟(matured)的挖矿收入余额：</translation>
+    </message>
+    <message>
+        <source>Current total balance in watch-only addresses</source>
+        <translation>观察地址(watch-only address)中的当前总余额 </translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>数据同步中</translation>
@@ -1169,6 +1241,10 @@ Address: %4
         <source>Payment request rejected</source>
         <translation>支付请求被拒绝</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>付款请求所在的网络与当前客户端所在的网络不匹配。</translation>
+    </message>
     <message>
         <source>Payment request has expired.</source>
         <translation>支付请求已超时</translation>
@@ -1193,10 +1269,18 @@ Address: %4
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>付款请求URI链接非法: %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无法解析！原因可能是比特币地址不正确，或者URI参数错误。</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>付款请求文件处理 </translation>
     </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>付款请求文件无法读取！可能是付款请求文件不合格。</translation>
+    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>不支持到自定义付款脚本的未验证付款请求。</translation>
@@ -1205,10 +1289,22 @@ Address: %4
         <source>Refund from %1</source>
         <translation>退款来自 %1</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>支付请求 %2 太大 (%3 字节。只允许 %4 字节)。</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>支付请求防滥用保护</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>
@@ -1371,7 +1467,11 @@ Address: %4
     </message>
     <message>
         <source>&amp;Peers</source>
-        <translation>&amp;同类</translation>
+        <translation>同伴(&amp;P)</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>选择节点查看详细信息。</translation>
     </message>
     <message>
         <source>Direction</source>
@@ -1753,6 +1853,78 @@ Address: %4
         <source>Custom change address</source>
         <translation>自定义零钱地址</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>交易费用:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>选择... </translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>收起  费用设置 </translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>最小化</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>如果自定义交易费设置为 1000聪而交易大小只有250字节，则“每千字节" 模式只支付250聪交易费， 而"最少"模式则支付1000聪。 大于1000字节的交易按每千字节付费。</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>每kb</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>如果自定义交易费设置为 1000聪而交易大小只有250字节，则“每千字节" 模式只支付250聪交易费， 而"最少"模式则支付1000聪。 大于1000字节的交易按每千字节付费。</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>最小额 </translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>交易量小时只支付最小交易费是可以的。但是请注意，当交易量大时您的交易可能永远无法确认。</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(请注意提示信息)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>推荐：</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>自定义：</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</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>Send as zero-fee transaction if possible</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>
@@ -1857,6 +2029,18 @@ Address: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>错误：该交易被拒绝！发生这种错误的原因可能是：钱包中的比特币已经被用掉，有可能您复制了wallet.dat钱包文件，然后用复制的钱包文件支付了比特币，但是这个钱包文件中没有记录。</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>高于 %1的交易费 将视为 过高的交易费。</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>只支付最小费用 %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>预计%1 个数据块后确认。</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>警告：无效的比特币地址</translation>
@@ -1908,6 +2092,10 @@ Address: %4
         <source>This is a normal payment.</source>
         <translation>这是笔正常的支付。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>付款目的地址</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1978,6 +2166,10 @@ Address: %4
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>您可以用你的地址对消息进行签名，以证明您是该地址的所有人。注意不要对模棱两可的消息签名，以免遭受钓鱼式攻击。请确保消息内容准确的表达了您的真实意愿。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>用来对消息签名的地址 </translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>选择以前用过的地址</translation>
@@ -2030,6 +2222,10 @@ Address: %4
         <source>Enter the signing 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.</source>
         <translation>在下面输入签名地址，消息（请确保换行符、空格符、制表符等等一个不漏）和签名以验证消息。请确保签名信息准确，提防中间人攻击。</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>消息使用的签名地址</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>验证消息，确保消息是由指定的比特币地址签名过的。</translation>
@@ -2143,6 +2339,10 @@ Address: %4
         <source>Status</source>
         <translation>状态</translation>
     </message>
+    <message numerus="yes">
+        <source>, broadcast through %n node(s)</source>
+        <translation><numerusform>, 通过 %n 个节点广播 </numerusform></translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>日期</translation>
@@ -2167,6 +2367,10 @@ Address: %4
         <source>own address</source>
         <translation>自己的地址</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>观察地址(watch-only) </translation>
+    </message>
     <message>
         <source>label</source>
         <translation>标签</translation>
@@ -2175,6 +2379,10 @@ Address: %4
         <source>Credit</source>
         <translation>收入</translation>
     </message>
+    <message numerus="yes">
+        <source>matures in %n more block(s)</source>
+        <translation><numerusform>%n 个数据块后成熟(mature) </numerusform></translation>
+    </message>
     <message>
         <source>not accepted</source>
         <translation>未被接受</translation>
@@ -2183,6 +2391,14 @@ Address: %4
         <source>Debit</source>
         <translation>支出</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>总收入</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>总支出</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>交易费</translation>
@@ -2239,6 +2455,10 @@ Address: %4
         <source>, has not been successfully broadcast yet</source>
         <translation>，未被成功广播</translation>
     </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation><numerusform>再打开 %n 个数据块</numerusform></translation>
+    </message>
     <message>
         <source>unknown</source>
         <translation>未知</translation>
@@ -2273,6 +2493,10 @@ Address: %4
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>未成熟 (%1 个确认，将在 %2 个后可用)</translation>
     </message>
+    <message numerus="yes">
+        <source>Open for %n more block(s)</source>
+        <translation><numerusform>再打开 %n 个数据块</numerusform></translation>
+    </message>
     <message>
         <source>Open until %1</source>
         <translation>至 %1 个数据块时开启</translation>
@@ -2325,6 +2549,10 @@ Address: %4
         <source>Mined</source>
         <translation>挖矿所得</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>观察地址(watch-only) </translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>（不可用）</translation>
@@ -2341,6 +2569,10 @@ Address: %4
         <source>Type of transaction.</source>
         <translation>交易类别。</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>该交易中是否涉及  观察地址(watch-only address)。</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>交易目的地址。</translation>
@@ -2436,6 +2668,10 @@ Address: %4
         <source>Export Transaction History</source>
         <translation>导出交易历史</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>观察地址(Watch-only) </translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>导出失败</translation>
@@ -2491,7 +2727,11 @@ Address: %4
 </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>
@@ -2581,45 +2821,21 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>接受来自外部的连接 (缺省: 如果不带 -proxy or -connect 参数设置为1)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, 您必须在配置文件设置rpcpassword:
- %s
-建议您使用下面的随机密码:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(您无需记住此密码)
-用户名和密码 必! 须! 不一样。
-如果配置文件不存在，请自行建立一个只有所有者拥有只读权限的文件。
-推荐您开启提示通知以便收到错误通知，
-像这样: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>绑定指定的IP地址开始监听。IPv6地址请使用[host]:port 格式</translation>
     </message>
     <message>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
-        <translation>进入回归测试模式，它采用一种特殊的可立即解决的区块链模拟情况。</translation>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>删除钱包的所有交易记录，且只有用 -rescan参数启动客户端才能重新取回交易记录 </translation>
     </message>
     <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>错误：该交易被拒绝！发生这种错误的原因可能是：钱包中的比特币已经被用掉，有可能您复制了wallet.dat钱包文件，然后用复制的钱包文件支付了比特币，但是这个钱包文件中没有记录。</translation>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>错误：因为该交易的数量、复杂度或者动用了刚收到不久的资金，您需要支付不少于%s的交易费用。</translation>
+        <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>
@@ -2661,6 +2877,10 @@ rpcpassword=%s
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>警告：钱包文件wallet.dat损坏! 原始的钱包文件已经备份到%s目录下并重命名为{timestamp}.bak 。如果您的账户余额或者交易记录不正确，请使用您的钱包备份文件恢复。</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>节点白名单,网络掩码或IP址。可多次指定。</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(默认值: 1)</translation>
@@ -2722,12 +2942,12 @@ rpcpassword=%s
         <translation>导入数据块数据库出错</translation>
     </message>
     <message>
-        <source>Error: Disk space is low!</source>
-        <translation>错误：磁盘剩余空间低!</translation>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>错误：发生了致命的内部错误，请打开debug.log查看详细信息 </translation>
     </message>
     <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>错误：钱包被锁定，无法创建交易！</translation>
+        <source>Error: Disk space is low!</source>
+        <translation>错误：磁盘剩余空间低!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
@@ -2753,6 +2973,10 @@ rpcpassword=%s
         <source>Not enough file descriptors available.</source>
         <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>Rebuild block chain index from current blk000??.dat files</source>
         <translation>重新为当前的blk000??.dat文件建立索引</translation>
@@ -2773,6 +2997,10 @@ rpcpassword=%s
         <source>This is intended for regression testing tools and app development.</source>
         <translation>这是用于回归测试和应用开发目的。</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>使用UPnp映射监听端口 (默认: %u) </translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>正在验证数据库的完整性...</translation>
@@ -2797,14 +3025,70 @@ rpcpassword=%s
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>从blk000??.dat文件导入数据块</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>允许来自指定地址的 JSON-RPC 连接。 &lt;ip&gt;为单一IP (如: 1.2.3.4), 网络/掩码 (如: 1.2.3.4/255.255.255.0), 网络/CIDR (如:  1.2.3.4/24)。该选项可多次指定。</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>设置RPC监听端口 %s:%u 时发生错误: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>绑定到指定地址和连接的白名单节点。 IPv6使用  [主机]:端口 格式 </translation>
+    </message>
+    <message>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>绑定到指定地址监听 JSON-RPC连接。 IPv6使用[主机]:端口 格式。该选项可多次指定 (默认: 绑定到所有接口) </translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>无法获取数据目录的 %s. 比特币核心钱包可能已经在运行.</translation>
     </message>
+    <message>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</translation>
+    </message>
+    <message>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>创建系统默认权限的文件，而不是 umask 077 (只在关闭钱包功能时有效) </translation>
+    </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>错误：监听外部连接失败 (监听返回错误 %s) </translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>错误：不支持的 -socks 参数。不再支持设置SOCKS版本，现在只支持 SOCKS5代理。</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>当收到相关提醒或者我们看到一个长分叉时执行命令（%s 将替换为消息）</translation>
     </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>交易费(BTC/kb)比这更小的交易在转发时将被视为零费交易 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>交易费(BTC/kb)比这更小的交易在生成交易时将被视为零费交易 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>如果未设置交易费用，自动添加足够的交易费以确保交易在平均n个数据块内被确认 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>-maxtxfee=&lt;amount&gt;: '%s' 的金额无效（交易费至少为 %s，以免交易滞留过久）</translation>
+    </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximum size of data in data carrier transactions we relay and mine (default: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>单笔钱包交易中最多使用的交易费，设置过低可能中止大笔交易 (默认: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>通过DNS查询每个地址，如果短地址 (默认值: 1 除非 -连接)</translation>
@@ -2813,6 +3097,54 @@ rpcpassword=%s
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>设置 高优先级/低交易费 交易的最大字节  (缺省: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>设置比特币生成线程数 ( -1=所有核, 默认: %d) </translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</translation>
+    </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>要使用 bitcoind 或者 bitcoin-qt 中的 -server 选项，您必须在配置文件中设置一个密码：
+%s
+建议您使用下列随机密码：
+rpcuser=bitcoinrpc
+rpcpassword=%s
+（您不需要记住这个密码）
+用户名和密码不能相同。
+如果该文件不存在，创建一个文件并设置权限为仅创建者可读。
+此外，还建议您设置 alertnotify 以便您能注意到问题：
+例如 alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>警告：-maxtxfee 设置的太高了！每进行一笔交易时您都要花费这么多费用。</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>警告：请检查电脑的日期时间设置是否正确！时间错误可能会导致比特币客户端运行异常。</translation>
+    </message>
+    <message>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>白名单节点不能被DoS banned ，且转发所有来自他们的交易(即便这些交易已经存在于mempool中)，常用于网关 </translation>
+    </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>接受公共 REST 请求 (默认: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>无法解析 -whitebind 地址: '%s'</translation>
@@ -2837,6 +3169,10 @@ rpcpassword=%s
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>错误：发现了不支持的参数 -tor，请使用 -onion。</translation>
     </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>为付款交易添加交易费 (BTC/kb) (默认: %s) </translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>信息</translation>
@@ -2845,6 +3181,10 @@ rpcpassword=%s
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>初始化完整性检查失败。Bitcoin Core 即将关闭。</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-maxtxfee=&lt;amount&gt;: '%s' 的金额无效</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>-minrelaytxfee=&lt;amount&gt;: '%s' 无效的金额</translation>
@@ -2869,10 +3209,6 @@ rpcpassword=%s
         <source>Node relay options:</source>
         <translation>节点中继选项:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>如果在搜索区块中找到，请启动打印区块</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL选项：(见有关比特币设置用于SSL说明的维基百科)</translation>
@@ -2893,6 +3229,10 @@ rpcpassword=%s
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>跟踪/调试信息输出到控制台，不输出到 debug.log 文件</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>发送时尽可能 不支付交易费用 (默认: %u) </translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>显示所有调试选项 (用法: --帮助 -帮助调试)</translation>
@@ -2917,6 +3257,10 @@ rpcpassword=%s
         <source>Transaction amounts must be positive</source>
         <translation>交易金额必须是积极的</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>费用策略的交易太大</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>交易太大</translation>
@@ -3003,14 +3347,166 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>wallet.dat 钱包文件加载出错：钱包损坏</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = 保留 tx meta data , 如 account owner 和 payment request information, 2 = 不保留 tx meta data) </translation>
+    </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>数据块验证 严密级别  -checkblocks (0-4, 默认: %u) </translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>挖矿时，记录交易优先级 和 每kb交易费 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>维护一份完整的交易索引, 用于 getrawtransaction RPC调用 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>限制 非礼节点 若干秒内不能连接 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>输出调试信息 (默认: %u, 提供 &lt;category&gt; 是可选项)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>通过Tor隐藏服务连接节点时 使用不同的SOCKS5代理 (默认: %s)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(默认: %s) </translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>可接受的密码算法 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>禁止使用安全模式，重新写入一个真正的安全模式日志(默认: %u)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>wallet.dat 钱包文件加载出错</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>强制安全模式 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>生成比特币 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>启动时检测多少个数据块(默认: %u, 0=所有)</translation>
+    </message>
+    <message>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>在调试输出中包含IP地址 (默认: %u)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>无效的代理地址：%s</translation>
     </message>
+    <message>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>签名缓冲区大小限制最多 &lt;n&gt; 条 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>使用 &lt;port&gt;端口监听 JSON-RPC 连接 (默认: %u ; testnet: %u) </translation>
+    </message>
+    <message>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>使用端口 &lt;port&gt; 监听连接 (默认: %u ; testnet: %u) </translation>
+    </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>保留最多 &lt;n&gt; 条节点连接 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>每个连接的最大接收缓存，&lt;n&gt;*1000 字节 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>每个连接的最大发送缓存，&lt;n&gt;*1000 字节 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>仅接受符合客户端检查点设置 的数据块链 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>输出调试信息时，前面加上时间戳 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Relay and mine data carrier transactions (default: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>是否转发 非P2SH格式的多签名交易 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>运行一个线程，定时清理钱包 (默认: %u)</translation>
+    </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>服务器证书文件 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>服务器私钥 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>设置私钥池大小为 &lt;n&gt; (默认：%u) </translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>设置数据块 最小字节数 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>设置RPC服务线程数 (默认: %d) </translation>
+    </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>指定配置文件 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>指定连接超时毫秒数 (最小: 1, 默认: %d) </translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>指定 pid 文件 (默认: %s) </translation>
+    </message>
+    <message>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>付款时允许使用未确认的零钱 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>从磁盘导入数据块后退出 (默认: %u) </translation>
+    </message>
+    <message>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>断开 非礼节点的阀值 (默认: %u) </translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>-onlynet 指定的是未知网络：%s</translation>
@@ -3027,10 +3523,6 @@ rpcpassword=%s
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>非法金额 -paytxfee=&lt;amount&gt;: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>无效金额</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>金额不足</translation>
@@ -3063,10 +3555,6 @@ rpcpassword=%s
         <source>Done loading</source>
         <translation>加载完成</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>使用 %s 选项</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>错误</translation>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 72f3ac847d7d..db39b3fc6b99 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -2,8 +2,8 @@
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation>按兩下來編輯位址或標記</translation>
+        <source>Right-click to edit address or label</source>
+        <translation>右鍵點一下來修改位址或標記</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1288,6 +1288,14 @@ Address: %4
         <source>Refund from %1</source>
         <translation>來自 %1 的退款</translation>
     </message>
+    <message>
+        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
+        <translation>付款要求 %2 過大 (%3 位元組, 上限 %4 位元組).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>支付請求的分佈式阻斷服務攻擊DoS保護</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>跟 %1 通訊時發生錯誤: %2</translation>
@@ -2807,30 +2815,6 @@ Address: %4
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>是否接受外來連線(預設值: 當沒有 -proxy 或 -connect 時為 1)</translation>
     </message>
-    <message>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
-</source>
-        <translation>%s, 你必須要在以下設定檔中設定 RPC 密碼(rpcpassword):
-%s
-建議你使用以下隨機產生的密碼:
-rpcuser=bitcoinrpc
-rpcpassword=%s
-(你不用記住這個密碼)
-使用者名稱(rpcuser)和密碼(rpcpassword)不可以相同！
-如果還沒有這個設定檔，請在造出來的時候，設定檔案權限成「只有主人才能讀取」。
-也建議你設定警示通知，發生問題時你才會被通知到；
-比如說設定成:
-alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
-    </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>和指定的位址繫結，並且一直在指定位址聽候連線。IPv6 請用 [主機]:通訊埠 這種格式</translation>
@@ -2847,14 +2831,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>進入回歸測試模式，使用可以立即解出區塊的特殊區塊鏈。</translation>
     </message>
-    <message>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>錯誤: 交易被拒絕了！有時候會發生這種錯誤，是因為你錢包中的一些錢已經被花掉了。比如說你複製了錢包檔 wallet.dat, 然後用複製的錢包花掉了錢，你現在所用的原來的錢包中，卻沒有那筆錢已經花掉的紀錄。</translation>
-    </message>
-    <message>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>錯誤: 這筆交易需要至少 %s 的手續費！因為它的金額太大，或複雜度太高，或是使用了最近才剛收到的款項。</translation>
-    </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>當錢包有交易改變時要執行的指令(指令中的 %s 會被取代成交易識別碼)</translation>
@@ -2967,10 +2943,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Error: Disk space is low!</source>
         <translation>錯誤: 磁碟空間很少！</translation>
     </message>
-    <message>
-        <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>錯誤: 錢包被上鎖了，沒辦法製造新的交易！</translation>
-    </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>在任意的通訊埠聽候失敗。如果你希望這樣的話，可以設定 -listen=0.</translation>
@@ -3091,10 +3063,22 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>當製造交易時，如果每千位元組(Kb)的手續費比這個值低，就視為沒付手續費 (預設值: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>當沒有設定 paytxfee 時，自動包含可以讓交易能在平均 n 個區塊內開始確認的手續費(預設值: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>-maxtxfee=&lt;amount&gt;: '%s' 的金額無效 (必須大於最低轉發手續費 %s 以避免交易無法確認)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>轉發和開採時，對只帶資料的交易的大小上限(預設值: %u)</translation>
     </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>一次錢包交易允許付出最高的總手續費，設定太低的話，可能會無法進行資料量大的交易(預設值: %s)</translation>
+    </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>是否允許在節點位址數目不足時，使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
@@ -3111,6 +3095,34 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit 軟體 &lt;https://www.openssl.org/&gt;, 和由 Eric Young 撰寫的加解密軟體，以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</translation>
     </message>
+    <message>
+        <source>To use bitcoind, or the -server option to bitcoin-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</source>
+        <translation>要使用 bitcoind, 或是對 bitcoin-qt 指定 -server 選項，你必須要在以下設定檔中設定 RPC 密碼(選項: rpcpassword):
+%s
+建議你使用以下隨機產生的密碼:
+rpcuser=bitcoinrpc
+rpcpassword=%s
+(你不用記住這個密碼)
+注意使用者名稱(rpcuser)和密碼(rpcpassword)不可以相同！
+如果設定檔還不存在，請在新增時，設定檔案權限為"只有主人才能讀取"。
+也建議你設定警示通知，這樣發生問題時你才會被通知到；
+比如說設定: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
+</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>警告: -maxtxfee 設定了很高的金額！這可是一次交易就有可能付出的最高手續費。</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>警告: 請檢查電腦日期和時間是否正確！位元幣核心沒辦法在時鐘不準的情況下正常運作。</translation>
@@ -3119,6 +3131,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
         <translation>在白名單中的節點不會因為偵測到阻斷服務攻擊而被停用。來自這些節點的交易也一定會被轉發，即使說交易本來就在記憶池裡了也一樣。適用於像是閘道伺服器。</translation>
     </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>接受公開的REST請求 (預設值: %u)</translation>
+    </message>
     <message>
         <source>Cannot resolve -whitebind address: '%s'</source>
         <translation>沒辦法解析 -whitebind 指定的位址: '%s'</translation>
@@ -3155,6 +3171,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>初始化時的基本檢查失敗了。位元幣核心將會關閉。</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>-maxtxfee=&lt;amount&gt;: '%s' 的金額無效</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>設定最低轉發手續費 -minrelaytxfee=&lt;金額&gt; 的金額無效: '%s'</translation>
@@ -3171,10 +3191,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Invalid netmask specified in -whitelist: '%s'</source>
         <translation>指定在 -whitelist 的網段無效: '%s'</translation>
     </message>
-    <message>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>在記憶體中保存最多 &lt;n&gt; 個不和其他區塊相連結的區塊(預設值 : %u)</translation>
-    </message>
     <message>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>保持最多 &lt;n&gt; 無法連結的交易在記憶體 (預設: %u)</translation>
@@ -3187,10 +3203,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Node relay options:</source>
         <translation>節點轉發選項:</translation>
     </message>
-    <message>
-        <source>Print block on startup, if found in block index</source>
-        <translation>啟動時輸出指定的區塊內容，如果有在區塊索引中找到的話</translation>
-    </message>
     <message>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL 選項: (SSL 設定程序請見 Bitcoin Wiki)</translation>
@@ -3239,6 +3251,10 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Transaction amounts must be positive</source>
         <translation>交易金額必須是正的</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>根據交易手續費準則，本交易的位元量過大</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>交易位元量太大</translation>
@@ -3335,10 +3351,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>使用 -checkblocks 檢查區塊的仔細程度(0 到 4，預設值: %u)</translation>
     </message>
-    <message>
-        <source>If paytxfee is not set, include enough fee so transactions are confirmed on average within n blocks (default: %u)</source>
-        <translation>當沒有設定 paytxfee 時，自動包含可以讓交易能在平均 n 個區塊內確認的手續費(預設值: %u)</translation>
-    </message>
     <message>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
         <translation>開採區塊的時候，紀錄交易的優先度以及每千位元組(kB)的手續費(預設值: %u)</translation>
@@ -3431,10 +3443,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>在除錯輸出內容前附加時間(預設值: %u)</translation>
     </message>
-    <message>
-        <source>Print block tree on startup (default: %u)</source>
-        <translation>啟動時輸出區塊樹(預設值: %u)</translation>
-    </message>
     <message>
         <source>Relay and mine data carrier transactions (default: %u)</source>
         <translation>允許轉發和開採只帶資料的交易(預設值: %u)</translation>
@@ -3511,10 +3519,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>設定 -paytxfee=&lt;金額&gt; 的金額無效: '%s'</translation>
     </message>
-    <message>
-        <source>Invalid amount</source>
-        <translation>無效的金額</translation>
-    </message>
     <message>
         <source>Insufficient funds</source>
         <translation>累積金額不足</translation>
@@ -3547,10 +3551,6 @@ alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com</translation>
         <source>Done loading</source>
         <translation>載入完成</translation>
     </message>
-    <message>
-        <source>To use the %s option</source>
-        <translation>為了要使用 %s 選項</translation>
-    </message>
     <message>
         <source>Error</source>
         <translation>錯誤</translation>

From a1f425b48bb3c2c2e8b3ee00c1020bc18dc70a26 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri, 13 Mar 2015 09:25:34 -0700
Subject: [PATCH 1289/1819] Add a consistency check for the block chain data
 structures

This adds a -checkblockindex (defaulting to true for regtest), which occasionally
does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and
mapBlocksUnlinked.
---
 src/chainparams.cpp       |  10 +--
 src/chainparams.h         |   8 +--
 src/init.cpp              |   5 +-
 src/main.cpp              | 147 ++++++++++++++++++++++++++++++++++++--
 src/main.h                |   1 +
 src/test/test_bitcoin.cpp |   1 +
 6 files changed, 157 insertions(+), 15 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 0291fd986404..ffcbaceb0a27 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -168,8 +168,8 @@ class CMainParams : public CChainParams {
 
         fRequireRPCPassword = true;
         fMiningRequiresPeers = true;
-        fDefaultCheckMemPool = false;
         fAllowMinDifficultyBlocks = false;
+        fDefaultConsistencyChecks = false;
         fRequireStandard = true;
         fMineBlocksOnDemand = false;
         fSkipProofOfWorkCheck = false;
@@ -227,8 +227,8 @@ class CTestNetParams : public CMainParams {
 
         fRequireRPCPassword = true;
         fMiningRequiresPeers = true;
-        fDefaultCheckMemPool = false;
         fAllowMinDifficultyBlocks = true;
+        fDefaultConsistencyChecks = false;
         fRequireStandard = false;
         fMineBlocksOnDemand = false;
         fTestnetToBeDeprecatedFieldRPC = true;
@@ -272,8 +272,8 @@ class CRegTestParams : public CTestNetParams {
 
         fRequireRPCPassword = false;
         fMiningRequiresPeers = false;
-        fDefaultCheckMemPool = true;
         fAllowMinDifficultyBlocks = true;
+        fDefaultConsistencyChecks = true;
         fRequireStandard = false;
         fMineBlocksOnDemand = true;
         fTestnetToBeDeprecatedFieldRPC = false;
@@ -299,7 +299,7 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
 
         fRequireRPCPassword = false;
         fMiningRequiresPeers = false;
-        fDefaultCheckMemPool = true;
+        fDefaultConsistencyChecks = true;
         fAllowMinDifficultyBlocks = false;
         fMineBlocksOnDemand = true;
     }
@@ -315,7 +315,7 @@ class CUnitTestParams : public CMainParams, public CModifiableParams {
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)  { nEnforceBlockUpgradeMajority=anEnforceBlockUpgradeMajority; }
     virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)  { nRejectBlockOutdatedMajority=anRejectBlockOutdatedMajority; }
     virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)  { nToCheckBlockUpgradeMajority=anToCheckBlockUpgradeMajority; }
-    virtual void setDefaultCheckMemPool(bool afDefaultCheckMemPool)  { fDefaultCheckMemPool=afDefaultCheckMemPool; }
+    virtual void setDefaultConsistencyChecks(bool afDefaultConsistencyChecks)  { fDefaultConsistencyChecks=afDefaultConsistencyChecks; }
     virtual void setAllowMinDifficultyBlocks(bool afAllowMinDifficultyBlocks) {  fAllowMinDifficultyBlocks=afAllowMinDifficultyBlocks; }
     virtual void setSkipProofOfWorkCheck(bool afSkipProofOfWorkCheck) { fSkipProofOfWorkCheck = afSkipProofOfWorkCheck; }
 };
diff --git a/src/chainparams.h b/src/chainparams.h
index 5d1ee1d3c6bd..ef20a8855853 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -58,8 +58,8 @@ class CChainParams
     bool RequireRPCPassword() const { return fRequireRPCPassword; }
     /** Make miner wait to have peers to avoid wasting work */
     bool MiningRequiresPeers() const { return fMiningRequiresPeers; }
-    /** Default value for -checkmempool argument */
-    bool DefaultCheckMemPool() const { return fDefaultCheckMemPool; }
+    /** Default value for -checkmempool and -checkblockindex argument */
+    bool DefaultConsistencyChecks() const { return fDefaultConsistencyChecks; }
     /** Allow mining of a min-difficulty block */
     bool AllowMinDifficultyBlocks() const { return fAllowMinDifficultyBlocks; }
     /** Skip proof-of-work check: allow mining of any difficulty block */
@@ -103,8 +103,8 @@ class CChainParams
     std::vector<CAddress> vFixedSeeds;
     bool fRequireRPCPassword;
     bool fMiningRequiresPeers;
-    bool fDefaultCheckMemPool;
     bool fAllowMinDifficultyBlocks;
+    bool fDefaultConsistencyChecks;
     bool fRequireStandard;
     bool fMineBlocksOnDemand;
     bool fSkipProofOfWorkCheck;
@@ -124,7 +124,7 @@ class CModifiableParams {
     virtual void setEnforceBlockUpgradeMajority(int anEnforceBlockUpgradeMajority)=0;
     virtual void setRejectBlockOutdatedMajority(int anRejectBlockOutdatedMajority)=0;
     virtual void setToCheckBlockUpgradeMajority(int anToCheckBlockUpgradeMajority)=0;
-    virtual void setDefaultCheckMemPool(bool aDefaultCheckMemPool)=0;
+    virtual void setDefaultConsistencyChecks(bool aDefaultConsistencyChecks)=0;
     virtual void setAllowMinDifficultyBlocks(bool aAllowMinDifficultyBlocks)=0;
     virtual void setSkipProofOfWorkCheck(bool aSkipProofOfWorkCheck)=0;
 };
diff --git a/src/init.cpp b/src/init.cpp
index df199ae487a4..9ff87ad1e6ae 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -656,8 +656,9 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (GetBoolArg("-benchmark", false))
         InitWarning(_("Warning: Unsupported argument -benchmark ignored, use -debug=bench."));
 
-    // Checkmempool defaults to true in regtest mode
-    mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultCheckMemPool()));
+    // Checkmempool and checkblockindex default to true in regtest mode
+    mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultConsistencyChecks()));
+    fCheckBlockIndex = GetBoolArg("-checkblockindex", Params().DefaultConsistencyChecks());
     Checkpoints::fEnabled = GetBoolArg("-checkpoints", true);
 
     // -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
diff --git a/src/main.cpp b/src/main.cpp
index 641859046243..dc6f37c2200b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -51,6 +51,7 @@ bool fImporting = false;
 bool fReindex = false;
 bool fTxIndex = false;
 bool fIsBareMultisigStd = true;
+bool fCheckBlockIndex = false;
 unsigned int nCoinCacheSize = 5000;
 
 
@@ -67,6 +68,8 @@ map<uint256, COrphanTx> mapOrphanTransactions;
 map<uint256, set<uint256> > mapOrphanTransactionsByPrev;
 void EraseOrphansFor(NodeId peer);
 
+static void CheckBlockIndex();
+
 /** Constant stuff for coinbase transactions we create: */
 CScript COINBASE_FLAGS;
 
@@ -77,7 +80,7 @@ namespace {
 
     struct CBlockIndexWorkComparator
     {
-        bool operator()(CBlockIndex *pa, CBlockIndex *pb) {
+        bool operator()(CBlockIndex *pa, CBlockIndex *pb) const {
             // First sort by most total work, ...
             if (pa->nChainWork > pb->nChainWork) return false;
             if (pa->nChainWork < pb->nChainWork) return true;
@@ -99,8 +102,8 @@ namespace {
     CBlockIndex *pindexBestInvalid;
 
     /**
-     * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS or better that are at least
-     * as good as our current tip. Entries may be failed, though.
+     * The set of all CBlockIndex entries with BLOCK_VALID_TRANSACTIONS (for itself and all ancestors) and
+     * as good as our current tip or better. Entries may be failed, though.
      */
     set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexCandidates;
     /** Number of nodes with fSyncStarted. */
@@ -2195,6 +2198,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
             uiInterface.NotifyBlockTip(hashNewTip);
         }
     } while(pindexMostWork != chainActive.Tip());
+    CheckBlockIndex();
 
     // Write changes periodically to disk, after relay.
     if (!FlushStateToDisk(state, FLUSH_STATE_PERIODIC)) {
@@ -2331,7 +2335,9 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
             CBlockIndex *pindex = queue.front();
             queue.pop_front();
             pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
-            setBlockIndexCandidates.insert(pindex);
+            if (chainActive.Tip() == NULL || !setBlockIndexCandidates.value_comp()(pindex, chainActive.Tip())) {
+                setBlockIndexCandidates.insert(pindex);
+            }
             std::pair<std::multimap<CBlockIndex*, CBlockIndex*>::iterator, std::multimap<CBlockIndex*, CBlockIndex*>::iterator> range = mapBlocksUnlinked.equal_range(pindex);
             while (range.first != range.second) {
                 std::multimap<CBlockIndex*, CBlockIndex*>::iterator it = range.first;
@@ -2745,6 +2751,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         if (pindex && pfrom) {
             mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
         }
+        CheckBlockIndex();
         if (!ret)
             return error("%s : AcceptBlock FAILED", __func__);
     }
@@ -3212,6 +3219,136 @@ bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp)
     return nLoaded > 0;
 }
 
+void static CheckBlockIndex()
+{
+    if (!fCheckBlockIndex) {
+        return;
+    }
+
+    LOCK(cs_main);
+
+    // Build forward-pointing map of the entire block tree.
+    std::multimap<CBlockIndex*,CBlockIndex*> forward;
+    for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) {
+        forward.insert(std::make_pair(it->second->pprev, it->second));
+    }
+
+    assert(forward.size() == mapBlockIndex.size());
+
+    std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangeGenesis = forward.equal_range(NULL);
+    CBlockIndex *pindex = rangeGenesis.first->second;
+    rangeGenesis.first++;
+    assert(rangeGenesis.first == rangeGenesis.second); // There is only one index entry with parent NULL.
+
+    // Iterate over the entire block tree, using depth-first search.
+    // Along the way, remember whether there are blocks on the path from genesis
+    // block being explored which are the first to have certain properties.
+    size_t nNodes = 0;
+    int nHeight = 0;
+    CBlockIndex* pindexFirstInvalid = NULL; // Oldest ancestor of pindex which is invalid.
+    CBlockIndex* pindexFirstMissing = NULL; // Oldest ancestor of pindex which does not have BLOCK_HAVE_DATA.
+    CBlockIndex* pindexFirstNotTreeValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_TREE (regardless of being valid or not).
+    CBlockIndex* pindexFirstNotChainValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_CHAIN (regardless of being valid or not).
+    CBlockIndex* pindexFirstNotScriptsValid = NULL; // Oldest ancestor of pindex which does not have BLOCK_VALID_SCRIPTS (regardless of being valid or not).
+    while (pindex != NULL) {
+        nNodes++;
+        if (pindexFirstInvalid == NULL && pindex->nStatus & BLOCK_FAILED_VALID) pindexFirstInvalid = pindex;
+        if (pindexFirstMissing == NULL && !(pindex->nStatus & BLOCK_HAVE_DATA)) pindexFirstMissing = pindex;
+        if (pindex->pprev != NULL && pindexFirstNotTreeValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_TREE) pindexFirstNotTreeValid = pindex;
+        if (pindex->pprev != NULL && pindexFirstNotChainValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_CHAIN) pindexFirstNotChainValid = pindex;
+        if (pindex->pprev != NULL && pindexFirstNotScriptsValid == NULL && (pindex->nStatus & BLOCK_VALID_MASK) < BLOCK_VALID_SCRIPTS) pindexFirstNotScriptsValid = pindex;
+
+        // Begin: actual consistency checks.
+        if (pindex->pprev == NULL) {
+            // Genesis block checks.
+            assert(pindex->GetBlockHash() == Params().HashGenesisBlock()); // Genesis block's hash must match.
+            assert(pindex == chainActive.Genesis()); // The current active chain's genesis block must be this block.
+        }
+        assert((pindexFirstMissing != NULL) == (pindex->nChainTx == 0)); // nChainTx == 0 is used to signal that all parent block's transaction data is available.
+        assert(pindex->nHeight == nHeight); // nHeight must be consistent.
+        assert(pindex->pprev == NULL || pindex->nChainWork >= pindex->pprev->nChainWork); // For every block except the genesis block, the chainwork must be larger than the parent's.
+        assert(nHeight < 2 || (pindex->pskip && (pindex->pskip->nHeight < nHeight))); // The pskip pointer must point back for all but the first 2 blocks.
+        assert(pindexFirstNotTreeValid == NULL); // All mapBlockIndex entries must at least be TREE valid
+        if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TREE) assert(pindexFirstNotTreeValid == NULL); // TREE valid implies all parents are TREE valid
+        if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_CHAIN) assert(pindexFirstNotChainValid == NULL); // CHAIN valid implies all parents are CHAIN valid
+        if ((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_SCRIPTS) assert(pindexFirstNotScriptsValid == NULL); // SCRIPTS valid implies all parents are SCRIPTS valid
+        if (pindexFirstInvalid == NULL) {
+            // Checks for not-invalid blocks.
+            assert((pindex->nStatus & BLOCK_FAILED_MASK) == 0); // The failed mask cannot be set for blocks without invalid parents.
+        }
+        if (!CBlockIndexWorkComparator()(pindex, chainActive.Tip()) && pindexFirstMissing == NULL) {
+            if (pindexFirstInvalid == NULL) { // If this block sorts at least as good as the current tip and is valid, it must be in setBlockIndexCandidates.
+                 assert(setBlockIndexCandidates.count(pindex));
+            }
+        } else { // If this block sorts worse than the current tip, it cannot be in setBlockIndexCandidates.
+            assert(setBlockIndexCandidates.count(pindex) == 0);
+        }
+        // Check whether this block is in mapBlocksUnlinked.
+        std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangeUnlinked = mapBlocksUnlinked.equal_range(pindex->pprev);
+        bool foundInUnlinked = false;
+        while (rangeUnlinked.first != rangeUnlinked.second) {
+            assert(rangeUnlinked.first->first == pindex->pprev);
+            if (rangeUnlinked.first->second == pindex) {
+                foundInUnlinked = true;
+                break;
+            }
+            rangeUnlinked.first++;
+        }
+        if (pindex->pprev && pindex->nStatus & BLOCK_HAVE_DATA && pindexFirstMissing != NULL) {
+            if (pindexFirstInvalid == NULL) { // If this block has block data available, some parent doesn't, and has no invalid parents, it must be in mapBlocksUnlinked.
+                assert(foundInUnlinked);
+            }
+        } else { // If this block does not have block data available, or all parents do, it cannot be in mapBlocksUnlinked.
+            assert(!foundInUnlinked);
+        }
+        // assert(pindex->GetBlockHash() == pindex->GetBlockHeader().GetHash()); // Perhaps too slow
+        // End: actual consistency checks.
+
+        // Try descending into the first subnode.
+        std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> range = forward.equal_range(pindex);
+        if (range.first != range.second) {
+            // A subnode was found.
+            pindex = range.first->second;
+            nHeight++;
+            continue;
+        }
+        // This is a leaf node.
+        // Move upwards until we reach a node of which we have not yet visited the last child.
+        while (pindex) {
+            // We are going to either move to a parent or a sibling of pindex.
+            // If pindex was the first with a certain property, unset the corresponding variable.
+            if (pindex == pindexFirstInvalid) pindexFirstInvalid = NULL;
+            if (pindex == pindexFirstMissing) pindexFirstMissing = NULL;
+            if (pindex == pindexFirstNotTreeValid) pindexFirstNotTreeValid = NULL;
+            if (pindex == pindexFirstNotChainValid) pindexFirstNotChainValid = NULL;
+            if (pindex == pindexFirstNotScriptsValid) pindexFirstNotScriptsValid = NULL;
+            // Find our parent.
+            CBlockIndex* pindexPar = pindex->pprev;
+            // Find which child we just visited.
+            std::pair<std::multimap<CBlockIndex*,CBlockIndex*>::iterator,std::multimap<CBlockIndex*,CBlockIndex*>::iterator> rangePar = forward.equal_range(pindexPar);
+            while (rangePar.first->second != pindex) {
+                assert(rangePar.first != rangePar.second); // Our parent must have at least the node we're coming from as child.
+                rangePar.first++;
+            }
+            // Proceed to the next one.
+            rangePar.first++;
+            if (rangePar.first != rangePar.second) {
+                // Move to the sibling.
+                pindex = rangePar.first->second;
+                break;
+            } else {
+                // Move up further.
+                pindex = pindexPar;
+                nHeight--;
+                continue;
+            }
+        }
+    }
+
+    // Check that we actually traversed the entire map.
+    assert(nNodes == forward.size());
+}
+
 //////////////////////////////////////////////////////////////////////////////
 //
 // CAlert
@@ -3968,6 +4105,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             LogPrint("net", "more getheaders (%d) to end to peer=%d (startheight:%d)\n", pindexLast->nHeight, pfrom->id, pfrom->nStartingHeight);
             pfrom->PushMessage("getheaders", chainActive.GetLocator(pindexLast), uint256(0));
         }
+
+        CheckBlockIndex();
     }
 
     else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
diff --git a/src/main.h b/src/main.h
index e4096e9612b5..71f21716d01c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -126,6 +126,7 @@ extern bool fReindex;
 extern int nScriptCheckThreads;
 extern bool fTxIndex;
 extern bool fIsBareMultisigStd;
+extern bool fCheckBlockIndex;
 extern unsigned int nCoinCacheSize;
 extern CFeeRate minRelayTxFee;
 
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index e50218d8efb5..5269e3bda7e8 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -31,6 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
+        fCheckBlockIndex = true;
         SelectParams(CBaseChainParams::UNITTEST);
         noui_connect();
 #ifdef ENABLE_WALLET

From 90bef6638fc689c13924fc17d115d5866b425e6c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 30 Mar 2015 11:26:20 +0200
Subject: [PATCH 1290/1819] No notable changes for minor release

---
 doc/release-notes.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 5083e6ccd6ad..1e9e0581aa94 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -47,6 +47,9 @@ This does not affect wallet forward or backward compatibility.
 Notable changes
 ===============
 
+This is a minor release and hence there are no notable changes.
+For the notable changes in 0.10, refer to the release notes for the
+0.10.0 release at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md
 
 0.10.1 Change log
 =================

From b78899425602085c759f7c889a6ddbb8ea5f6d38 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Sun, 8 Mar 2015 06:30:05 -0700
Subject: [PATCH 1291/1819] Switch addrman key from vector to uint256

Conflicts:
	src/addrman.cpp

Rebased-From: b23add5521e4207085d41a0266617e94435fc22e
Github-Pull: #5941
---
 src/addrman.cpp | 14 ++++++++------
 src/addrman.h   | 21 +++++++++++++++------
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index e4e001348ee3..c53d40f72199 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -10,30 +10,30 @@
 
 using namespace std;
 
-int CAddrInfo::GetTriedBucket(const std::vector<unsigned char>& nKey) const
+int CAddrInfo::GetTriedBucket(const uint256& nKey) const
 {
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchKey = GetKey();
-    ss1 << nKey << vchKey;
+    ss1 << ((unsigned char)32) << nKey << vchKey;
     uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
 
     CDataStream ss2(SER_GETHASH, 0);
     std::vector<unsigned char> vchGroupKey = GetGroup();
-    ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
+    ss2 << ((unsigned char)32) << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
     uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
     return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
 }
 
-int CAddrInfo::GetNewBucket(const std::vector<unsigned char>& nKey, const CNetAddr& src) const
+int CAddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src) const
 {
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchGroupKey = GetGroup();
     std::vector<unsigned char> vchSourceGroupKey = src.GetGroup();
-    ss1 << nKey << vchGroupKey << vchSourceGroupKey;
+    ss1 << ((unsigned char)32) << nKey << vchGroupKey << vchSourceGroupKey;
     uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
 
     CDataStream ss2(SER_GETHASH, 0);
-    ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
+    ss2 << ((unsigned char)32) << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
     uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
     return hash2 % ADDRMAN_NEW_BUCKET_COUNT;
 }
@@ -483,6 +483,8 @@ int CAddrMan::Check_()
         return -13;
     if (mapNew.size())
         return -15;
+    if (nKey.IsNull())
+        return -16;
 
     return 0;
 }
diff --git a/src/addrman.h b/src/addrman.h
index d47217683c73..b73266f843a4 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -10,6 +10,7 @@
 #include "random.h"
 #include "sync.h"
 #include "timedata.h"
+#include "uint256.h"
 #include "util.h"
 
 #include <map>
@@ -79,13 +80,13 @@ class CAddrInfo : public CAddress
     }
 
     //! Calculate in which "tried" bucket this entry belongs
-    int GetTriedBucket(const std::vector<unsigned char> &nKey) const;
+    int GetTriedBucket(const uint256 &nKey) const;
 
     //! Calculate in which "new" bucket this entry belongs, given a certain source
-    int GetNewBucket(const std::vector<unsigned char> &nKey, const CNetAddr& src) const;
+    int GetNewBucket(const uint256 &nKey, const CNetAddr& src) const;
 
     //! Calculate in which "new" bucket this entry belongs, using its default source
-    int GetNewBucket(const std::vector<unsigned char> &nKey) const
+    int GetNewBucket(const uint256 &nKey) const
     {
         return GetNewBucket(nKey, source);
     }
@@ -176,7 +177,7 @@ class CAddrMan
     mutable CCriticalSection cs;
 
     //! secret key to randomize bucket select with
-    std::vector<unsigned char> nKey;
+    uint256 nKey;
 
     //! last used nId
     int nIdCount;
@@ -284,6 +285,7 @@ class CAddrMan
 
         unsigned char nVersion = 0;
         s << nVersion;
+        s << ((unsigned char)32);
         s << nKey;
         s << nNew;
         s << nTried;
@@ -328,6 +330,9 @@ class CAddrMan
 
         unsigned char nVersion;
         s >> nVersion;
+        unsigned char nKeySize;
+        s >> nKeySize;
+        if (nKeySize != 32) throw std::ios_base::failure("Incorrect keysize in addrman");
         s >> nKey;
         s >> nNew;
         s >> nTried;
@@ -393,14 +398,18 @@ class CAddrMan
 
     CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>())
     {
-         nKey.resize(32);
-         GetRandBytes(&nKey[0], 32);
+         nKey = GetRandHash();
 
          nIdCount = 0;
          nTried = 0;
          nNew = 0;
     }
 
+    ~CAddrMan()
+    {
+        nKey = uint256(0);
+    }
+
     //! Return the number of (unique) addresses in all tables.
     int size()
     {

From cf0218f8b2bf394614d984e5ded6e83afd7e65db Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Wed, 18 Mar 2015 09:31:49 -0700
Subject: [PATCH 1292/1819] Make addrman's bucket placement deterministic.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Give each address a single fixed location in the new and tried tables,
which become simple fixed-size arrays instead of sets and vectors.

This prevents attackers from having an advantages by inserting an
address multiple times.

This change was suggested as Countermeasure 1 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.

It is also more efficient.

Conflicts:
	src/addrman.cpp
	src/addrman.h

Rebased-From: e6b343d880f50d52390c5af8623afa15fcbc65a2
Github-Pull: #5941
---
 src/addrman.cpp | 270 ++++++++++++++++++++++--------------------------
 src/addrman.h   | 165 ++++++++++++++++++-----------
 2 files changed, 230 insertions(+), 205 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index c53d40f72199..62a9f39cc19a 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -14,12 +14,12 @@ int CAddrInfo::GetTriedBucket(const uint256& nKey) const
 {
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchKey = GetKey();
-    ss1 << ((unsigned char)32) << nKey << vchKey;
+    ss1 << nKey << vchKey;
     uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
 
     CDataStream ss2(SER_GETHASH, 0);
     std::vector<unsigned char> vchGroupKey = GetGroup();
-    ss2 << ((unsigned char)32) << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
+    ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
     uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
     return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
 }
@@ -29,15 +29,24 @@ int CAddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src) const
     CDataStream ss1(SER_GETHASH, 0);
     std::vector<unsigned char> vchGroupKey = GetGroup();
     std::vector<unsigned char> vchSourceGroupKey = src.GetGroup();
-    ss1 << ((unsigned char)32) << nKey << vchGroupKey << vchSourceGroupKey;
+    ss1 << nKey << vchGroupKey << vchSourceGroupKey;
     uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
 
     CDataStream ss2(SER_GETHASH, 0);
-    ss2 << ((unsigned char)32) << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
+    ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
     uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
     return hash2 % ADDRMAN_NEW_BUCKET_COUNT;
 }
 
+int CAddrInfo::GetBucketPosition(const uint256 &nKey, bool fNew, int nBucket) const
+{
+    CDataStream ss1(SER_GETHASH, 0);
+    std::vector<unsigned char> vchKey = GetKey();
+    ss1 << nKey << (fNew ? 'N' : 'K') << nBucket << vchKey;
+    uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
+    return hash1 % ADDRMAN_BUCKET_SIZE;
+}
+
 bool CAddrInfo::IsTerrible(int64_t nNow) const
 {
     if (nLastTry && nLastTry >= nNow - 60) // never remove things tried in the last minute
@@ -128,85 +137,44 @@ void CAddrMan::SwapRandom(unsigned int nRndPos1, unsigned int nRndPos2)
     vRandom[nRndPos2] = nId1;
 }
 
-int CAddrMan::SelectTried(int nKBucket)
+void CAddrMan::Delete(int nId)
 {
-    std::vector<int>& vTried = vvTried[nKBucket];
-
-    // randomly shuffle the first few elements (using the entire list)
-    // find the least recently tried among them
-    int64_t nOldest = -1;
-    int nOldestPos = -1;
-    for (unsigned int i = 0; i < ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT && i < vTried.size(); i++) {
-        int nPos = GetRandInt(vTried.size() - i) + i;
-        int nTemp = vTried[nPos];
-        vTried[nPos] = vTried[i];
-        vTried[i] = nTemp;
-        assert(nOldest == -1 || mapInfo.count(nTemp) == 1);
-        if (nOldest == -1 || mapInfo[nTemp].nLastSuccess < mapInfo[nOldest].nLastSuccess) {
-            nOldest = nTemp;
-            nOldestPos = nPos;
-        }
-    }
+    assert(mapInfo.count(nId) != 0);
+    CAddrInfo& info = mapInfo[nId];
+    assert(!info.fInTried);
+    assert(info.nRefCount == 0);
 
-    return nOldestPos;
+    SwapRandom(info.nRandomPos, vRandom.size() - 1);
+    vRandom.pop_back();
+    mapAddr.erase(info);
+    mapInfo.erase(nId);
+    nNew--;
 }
 
-int CAddrMan::ShrinkNew(int nUBucket)
+void CAddrMan::ClearNew(int nUBucket, int nUBucketPos)
 {
-    assert(nUBucket >= 0 && (unsigned int)nUBucket < vvNew.size());
-    std::set<int>& vNew = vvNew[nUBucket];
-
-    // first look for deletable items
-    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
-        assert(mapInfo.count(*it));
-        CAddrInfo& info = mapInfo[*it];
-        if (info.IsTerrible()) {
-            if (--info.nRefCount == 0) {
-                SwapRandom(info.nRandomPos, vRandom.size() - 1);
-                vRandom.pop_back();
-                mapAddr.erase(info);
-                mapInfo.erase(*it);
-                nNew--;
-            }
-            vNew.erase(it);
-            return 0;
-        }
-    }
-
-    // otherwise, select four randomly, and pick the oldest of those to replace
-    int n[4] = {GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size()), GetRandInt(vNew.size())};
-    int nI = 0;
-    int nOldest = -1;
-    for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
-        if (nI == n[0] || nI == n[1] || nI == n[2] || nI == n[3]) {
-            assert(nOldest == -1 || mapInfo.count(*it) == 1);
-            if (nOldest == -1 || mapInfo[*it].nTime < mapInfo[nOldest].nTime)
-                nOldest = *it;
+    // if there is an entry in the specified bucket, delete it.
+    if (vvNew[nUBucket][nUBucketPos] != -1) {
+        int nIdDelete = vvNew[nUBucket][nUBucketPos];
+        CAddrInfo& infoDelete = mapInfo[nIdDelete];
+        assert(infoDelete.nRefCount > 0);
+        infoDelete.nRefCount--;
+        vvNew[nUBucket][nUBucketPos] = -1;
+        if (infoDelete.nRefCount == 0) {
+            Delete(nIdDelete);
         }
-        nI++;
-    }
-    assert(mapInfo.count(nOldest) == 1);
-    CAddrInfo& info = mapInfo[nOldest];
-    if (--info.nRefCount == 0) {
-        SwapRandom(info.nRandomPos, vRandom.size() - 1);
-        vRandom.pop_back();
-        mapAddr.erase(info);
-        mapInfo.erase(nOldest);
-        nNew--;
     }
-    vNew.erase(nOldest);
-
-    return 1;
 }
 
-void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
+void CAddrMan::MakeTried(CAddrInfo& info, int nId)
 {
-    assert(vvNew[nOrigin].count(nId) == 1);
-
     // remove the entry from all new buckets
-    for (std::vector<std::set<int> >::iterator it = vvNew.begin(); it != vvNew.end(); it++) {
-        if ((*it).erase(nId))
+    for (int bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {
+        int pos = info.GetBucketPosition(nKey, true, bucket);
+        if (vvNew[bucket][pos] == nId) {
+            vvNew[bucket][pos] = -1;
             info.nRefCount--;
+        }
     }
     nNew--;
 
@@ -214,44 +182,36 @@ void CAddrMan::MakeTried(CAddrInfo& info, int nId, int nOrigin)
 
     // which tried bucket to move the entry to
     int nKBucket = info.GetTriedBucket(nKey);
-    std::vector<int>& vTried = vvTried[nKBucket];
-
-    // first check whether there is place to just add it
-    if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) {
-        vTried.push_back(nId);
-        nTried++;
-        info.fInTried = true;
-        return;
-    }
-
-    // otherwise, find an item to evict
-    int nPos = SelectTried(nKBucket);
-
-    // find which new bucket it belongs to
-    assert(mapInfo.count(vTried[nPos]) == 1);
-    int nUBucket = mapInfo[vTried[nPos]].GetNewBucket(nKey);
-    std::set<int>& vNew = vvNew[nUBucket];
-
-    // remove the to-be-replaced tried entry from the tried set
-    CAddrInfo& infoOld = mapInfo[vTried[nPos]];
-    infoOld.fInTried = false;
-    infoOld.nRefCount = 1;
-    // do not update nTried, as we are going to move something else there immediately
-
-    // check whether there is place in that one,
-    if (vNew.size() < ADDRMAN_NEW_BUCKET_SIZE) {
-        // if so, move it back there
-        vNew.insert(vTried[nPos]);
-    } else {
-        // otherwise, move it to the new bucket nId came from (there is certainly place there)
-        vvNew[nOrigin].insert(vTried[nPos]);
+    int nKBucketPos = info.GetBucketPosition(nKey, false, nKBucket);
+
+    // first make space to add it (the existing tried entry there is moved to new, deleting whatever is there).
+    if (vvTried[nKBucket][nKBucketPos] != -1) {
+        // find an item to evict
+        int nIdEvict = vvTried[nKBucket][nKBucketPos];
+        assert(mapInfo.count(nIdEvict) == 1);
+        CAddrInfo& infoOld = mapInfo[nIdEvict];
+
+        // Remove the to-be-evicted item from the tried set.
+        infoOld.fInTried = false;
+        vvTried[nKBucket][nKBucketPos] = -1;
+        nTried--;
+
+        // find which new bucket it belongs to
+        int nUBucket = infoOld.GetNewBucket(nKey);
+        int nUBucketPos = infoOld.GetBucketPosition(nKey, true, nUBucket);
+        ClearNew(nUBucket, nUBucketPos);
+        assert(vvNew[nUBucket][nUBucketPos] == -1);
+
+        // Enter it into the new set again.
+        infoOld.nRefCount = 1;
+        vvNew[nUBucket][nUBucketPos] = nIdEvict;
+        nNew++;
     }
-    nNew++;
+    assert(vvTried[nKBucket][nKBucketPos] == -1);
 
-    vTried[nPos] = nId;
-    // we just overwrote an entry in vTried; no need to update nTried
+    vvTried[nKBucket][nKBucketPos] = nId;
+    nTried++;
     info.fInTried = true;
-    return;
 }
 
 void CAddrMan::Good_(const CService& addr, int64_t nTime)
@@ -281,12 +241,12 @@ void CAddrMan::Good_(const CService& addr, int64_t nTime)
         return;
 
     // find a bucket it is in now
-    int nRnd = GetRandInt(vvNew.size());
+    int nRnd = GetRandInt(ADDRMAN_NEW_BUCKET_COUNT);
     int nUBucket = -1;
-    for (unsigned int n = 0; n < vvNew.size(); n++) {
-        int nB = (n + nRnd) % vvNew.size();
-        std::set<int>& vNew = vvNew[nB];
-        if (vNew.count(nId)) {
+    for (unsigned int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; n++) {
+        int nB = (n + nRnd) % ADDRMAN_NEW_BUCKET_COUNT;
+        int nBpos = info.GetBucketPosition(nKey, true, nB);
+        if (vvNew[nB][nBpos] == nId) {
             nUBucket = nB;
             break;
         }
@@ -300,7 +260,7 @@ void CAddrMan::Good_(const CService& addr, int64_t nTime)
     LogPrint("addrman", "Moving %s to tried\n", addr.ToString());
 
     // move nId to the tried tables
-    MakeTried(info, nId, nUBucket);
+    MakeTried(info, nId);
 }
 
 bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimePenalty)
@@ -348,12 +308,25 @@ bool CAddrMan::Add_(const CAddress& addr, const CNetAddr& source, int64_t nTimeP
     }
 
     int nUBucket = pinfo->GetNewBucket(nKey, source);
-    std::set<int>& vNew = vvNew[nUBucket];
-    if (!vNew.count(nId)) {
-        pinfo->nRefCount++;
-        if (vNew.size() == ADDRMAN_NEW_BUCKET_SIZE)
-            ShrinkNew(nUBucket);
-        vvNew[nUBucket].insert(nId);
+    int nUBucketPos = pinfo->GetBucketPosition(nKey, true, nUBucket);
+    if (vvNew[nUBucket][nUBucketPos] != nId) {
+        bool fInsert = vvNew[nUBucket][nUBucketPos] == -1;
+        if (!fInsert) {
+            CAddrInfo& infoExisting = mapInfo[vvNew[nUBucket][nUBucketPos]];
+            if (infoExisting.IsTerrible() || (infoExisting.nRefCount > 1 && pinfo->nRefCount == 0)) {
+                // Overwrite the existing new table entry.
+                fInsert = true;
+            }
+        }
+        if (fInsert) {
+            ClearNew(nUBucket, nUBucketPos);
+            pinfo->nRefCount++;
+            vvNew[nUBucket][nUBucketPos] = nId;
+        } else {
+            if (pinfo->nRefCount == 0) {
+                Delete(nId);
+            }
+        }
     }
     return fNew;
 }
@@ -388,13 +361,13 @@ CAddress CAddrMan::Select_(int nUnkBias)
         // use a tried node
         double fChanceFactor = 1.0;
         while (1) {
-            int nKBucket = GetRandInt(vvTried.size());
-            std::vector<int>& vTried = vvTried[nKBucket];
-            if (vTried.size() == 0)
+            int nKBucket = GetRandInt(ADDRMAN_TRIED_BUCKET_COUNT);
+            int nKBucketPos = GetRandInt(ADDRMAN_BUCKET_SIZE);
+            if (vvTried[nKBucket][nKBucketPos] == -1)
                 continue;
-            int nPos = GetRandInt(vTried.size());
-            assert(mapInfo.count(vTried[nPos]) == 1);
-            CAddrInfo& info = mapInfo[vTried[nPos]];
+            int nId = vvTried[nKBucket][nKBucketPos];
+            assert(mapInfo.count(nId) == 1);
+            CAddrInfo& info = mapInfo[nId];
             if (GetRandInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30))
                 return info;
             fChanceFactor *= 1.2;
@@ -403,16 +376,13 @@ CAddress CAddrMan::Select_(int nUnkBias)
         // use a new node
         double fChanceFactor = 1.0;
         while (1) {
-            int nUBucket = GetRandInt(vvNew.size());
-            std::set<int>& vNew = vvNew[nUBucket];
-            if (vNew.size() == 0)
+            int nUBucket = GetRandInt(ADDRMAN_NEW_BUCKET_COUNT);
+            int nUBucketPos = GetRandInt(ADDRMAN_BUCKET_SIZE);
+            if (vvNew[nUBucket][nUBucketPos] == -1)
                 continue;
-            int nPos = GetRandInt(vNew.size());
-            std::set<int>::iterator it = vNew.begin();
-            while (nPos--)
-                it++;
-            assert(mapInfo.count(*it) == 1);
-            CAddrInfo& info = mapInfo[*it];
+            int nId = vvNew[nUBucket][nUBucketPos];
+            assert(mapInfo.count(nId) == 1);
+            CAddrInfo& info = mapInfo[nId];
             if (GetRandInt(1 << 30) < fChanceFactor * info.GetChance() * (1 << 30))
                 return info;
             fChanceFactor *= 1.2;
@@ -460,22 +430,30 @@ int CAddrMan::Check_()
     if (mapNew.size() != nNew)
         return -10;
 
-    for (int n = 0; n < vvTried.size(); n++) {
-        std::vector<int>& vTried = vvTried[n];
-        for (std::vector<int>::iterator it = vTried.begin(); it != vTried.end(); it++) {
-            if (!setTried.count(*it))
-                return -11;
-            setTried.erase(*it);
+    for (int n = 0; n < ADDRMAN_TRIED_BUCKET_COUNT; n++) {
+        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
+             if (vvTried[n][i] != -1) {
+                 if (!setTried.count(vvTried[n][i]))
+                     return -11;
+                 if (mapInfo[vvTried[n][i]].GetTriedBucket(nKey) != n)
+                     return -17;
+                 if (mapInfo[vvTried[n][i]].GetBucketPosition(nKey, false, n) != i)
+                     return -18;
+                 setTried.erase(vvTried[n][i]);
+             }
         }
     }
 
-    for (int n = 0; n < vvNew.size(); n++) {
-        std::set<int>& vNew = vvNew[n];
-        for (std::set<int>::iterator it = vNew.begin(); it != vNew.end(); it++) {
-            if (!mapNew.count(*it))
-                return -12;
-            if (--mapNew[*it] == 0)
-                mapNew.erase(*it);
+    for (int n = 0; n < ADDRMAN_NEW_BUCKET_COUNT; n++) {
+        for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
+            if (vvNew[n][i] != -1) {
+                if (!mapNew.count(vvNew[n][i]))
+                    return -12;
+                if (mapInfo[vvNew[n][i]].GetBucketPosition(nKey, true, n) != i)
+                    return -19;
+                if (--mapNew[vvNew[n][i]] == 0)
+                    mapNew.erase(vvNew[n][i]);
+            }
         }
     }
 
diff --git a/src/addrman.h b/src/addrman.h
index b73266f843a4..3966bf5b73a1 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -10,7 +10,6 @@
 #include "random.h"
 #include "sync.h"
 #include "timedata.h"
-#include "uint256.h"
 #include "util.h"
 
 #include <map>
@@ -91,6 +90,9 @@ class CAddrInfo : public CAddress
         return GetNewBucket(nKey, source);
     }
 
+    //! Calculate in which position of a bucket to store this entry.
+    int GetBucketPosition(const uint256 &nKey, bool fNew, int nBucket) const;
+
     //! Determine whether the statistics about this entry are bad enough so that it can just be deleted
     bool IsTerrible(int64_t nNow = GetAdjustedTime()) const;
 
@@ -128,14 +130,11 @@ class CAddrInfo : public CAddress
 //! total number of buckets for tried addresses
 #define ADDRMAN_TRIED_BUCKET_COUNT 64
 
-//! maximum allowed number of entries in buckets for tried addresses
-#define ADDRMAN_TRIED_BUCKET_SIZE 64
-
 //! total number of buckets for new addresses
 #define ADDRMAN_NEW_BUCKET_COUNT 256
 
-//! maximum allowed number of entries in buckets for new addresses
-#define ADDRMAN_NEW_BUCKET_SIZE 64
+//! maximum allowed number of entries in buckets for new and tried addresses
+#define ADDRMAN_BUCKET_SIZE 64
 
 //! over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread
 #define ADDRMAN_TRIED_BUCKETS_PER_GROUP 4
@@ -146,9 +145,6 @@ class CAddrInfo : public CAddress
 //! in how many buckets for entries with new addresses a single address may occur
 #define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 4
 
-//! how many entries in a bucket with tried addresses are inspected, when selecting one to replace
-#define ADDRMAN_TRIED_ENTRIES_INSPECT_ON_EVICT 4
-
 //! how old addresses can maximally be
 #define ADDRMAN_HORIZON_DAYS 30
 
@@ -195,13 +191,13 @@ class CAddrMan
     int nTried;
 
     //! list of "tried" buckets
-    std::vector<std::vector<int> > vvTried;
+    int vvTried[ADDRMAN_TRIED_BUCKET_COUNT][ADDRMAN_BUCKET_SIZE];
 
     //! number of (unique) "new" entries
     int nNew;
 
     //! list of "new" buckets
-    std::vector<std::set<int> > vvNew;
+    int vvNew[ADDRMAN_NEW_BUCKET_COUNT][ADDRMAN_BUCKET_SIZE];
 
 protected:
 
@@ -215,17 +211,14 @@ class CAddrMan
     //! Swap two elements in vRandom.
     void SwapRandom(unsigned int nRandomPos1, unsigned int nRandomPos2);
 
-    //! Return position in given bucket to replace.
-    int SelectTried(int nKBucket);
+    //! Move an entry from the "new" table(s) to the "tried" table
+    void MakeTried(CAddrInfo& info, int nId);
 
-    //! Remove an element from a "new" bucket.
-    //! This is the only place where actual deletions occur.
-    //! Elements are never deleted while in the "tried" table, only possibly evicted back to the "new" table.
-    int ShrinkNew(int nUBucket);
+    //! Delete an entry. It must not be in tried, and have refcount 0.
+    void Delete(int nId);
 
-    //! Move an entry from the "new" table(s) to the "tried" table
-    //! @pre vvUnkown[nOrigin].count(nId) != 0
-    void MakeTried(CAddrInfo& info, int nId, int nOrigin);
+    //! Clear a position in a "new" table. This is the only place where entries are actually deleted.
+    void ClearNew(int nUBucket, int nUBucketPos);
 
     //! Mark an entry "good", possibly moving it from "new" to "tried".
     void Good_(const CService &addr, int64_t nTime);
@@ -254,17 +247,21 @@ class CAddrMan
 public:
     /**
      * serialized format:
-     * * version byte (currently 0)
-     * * nKey
+     * * version byte (currently 1)
+     * * 0x20 + nKey (serialized as if it were a vector, for backward compatibility)
      * * nNew
      * * nTried
-     * * number of "new" buckets
+     * * number of "new" buckets XOR 2**30
      * * all nNew addrinfos in vvNew
      * * all nTried addrinfos in vvTried
      * * for each bucket:
      *   * number of elements
      *   * for each element: index
      *
+     * 2**30 is xorred with the number of buckets to make addrman deserializer v0 detect it
+     * as incompatible. This is necessary because it did not check the version number on
+     * deserialization.
+     *
      * Notice that vvTried, mapAddr and vVector are never encoded explicitly;
      * they are instead reconstructed from the other information.
      *
@@ -276,49 +273,53 @@ class CAddrMan
      *
      * We don't use ADD_SERIALIZE_METHODS since the serialization and deserialization code has
      * very little in common.
-     *
      */
     template<typename Stream>
     void Serialize(Stream &s, int nType, int nVersionDummy) const
     {
         LOCK(cs);
 
-        unsigned char nVersion = 0;
+        unsigned char nVersion = 1;
         s << nVersion;
         s << ((unsigned char)32);
         s << nKey;
         s << nNew;
         s << nTried;
 
-        int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT;
+        int nUBuckets = ADDRMAN_NEW_BUCKET_COUNT ^ (1 << 30);
         s << nUBuckets;
         std::map<int, int> mapUnkIds;
         int nIds = 0;
         for (std::map<int, CAddrInfo>::const_iterator it = mapInfo.begin(); it != mapInfo.end(); it++) {
-            if (nIds == nNew) break; // this means nNew was wrong, oh ow
             mapUnkIds[(*it).first] = nIds;
             const CAddrInfo &info = (*it).second;
             if (info.nRefCount) {
+                assert(nIds != nNew); // this means nNew was wrong, oh ow
                 s << info;
                 nIds++;
             }
         }
         nIds = 0;
         for (std::map<int, CAddrInfo>::const_iterator it = mapInfo.begin(); it != mapInfo.end(); it++) {
-            if (nIds == nTried) break; // this means nTried was wrong, oh ow
             const CAddrInfo &info = (*it).second;
             if (info.fInTried) {
+                assert(nIds != nTried); // this means nTried was wrong, oh ow
                 s << info;
                 nIds++;
             }
         }
-        for (std::vector<std::set<int> >::const_iterator it = vvNew.begin(); it != vvNew.end(); it++) {
-            const std::set<int> &vNew = (*it);
-            int nSize = vNew.size();
+        for (int bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {
+            int nSize = 0;
+            for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
+                if (vvNew[bucket][i] != -1)
+                    nSize++;
+            }
             s << nSize;
-            for (std::set<int>::const_iterator it2 = vNew.begin(); it2 != vNew.end(); it2++) {
-                int nIndex = mapUnkIds[*it2];
-                s << nIndex;
+            for (int i = 0; i < ADDRMAN_BUCKET_SIZE; i++) {
+                if (vvNew[bucket][i] != -1) {
+                    int nIndex = mapUnkIds[vvNew[bucket][i]];
+                    s << nIndex;
+                }
             }
         }
     }
@@ -328,67 +329,97 @@ class CAddrMan
     {
         LOCK(cs);
 
+        Clear();
+
         unsigned char nVersion;
         s >> nVersion;
         unsigned char nKeySize;
         s >> nKeySize;
-        if (nKeySize != 32) throw std::ios_base::failure("Incorrect keysize in addrman");
+        if (nKeySize != 32) throw std::ios_base::failure("Incorrect keysize in addrman deserialization");
         s >> nKey;
         s >> nNew;
         s >> nTried;
-
         int nUBuckets = 0;
         s >> nUBuckets;
-        nIdCount = 0;
-        mapInfo.clear();
-        mapAddr.clear();
-        vRandom.clear();
-        vvTried = std::vector<std::vector<int> >(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0));
-        vvNew = std::vector<std::set<int> >(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>());
+        if (nVersion != 0) {
+            nUBuckets ^= (1 << 30);
+        }
+
+        // Deserialize entries from the new table.
         for (int n = 0; n < nNew; n++) {
             CAddrInfo &info = mapInfo[n];
             s >> info;
             mapAddr[info] = n;
             info.nRandomPos = vRandom.size();
             vRandom.push_back(n);
-            if (nUBuckets != ADDRMAN_NEW_BUCKET_COUNT) {
-                vvNew[info.GetNewBucket(nKey)].insert(n);
-                info.nRefCount++;
+            if (nVersion != 1 || nUBuckets != ADDRMAN_NEW_BUCKET_COUNT) {
+                // In case the new table data cannot be used (nVersion unknown, or bucket count wrong),
+                // immediately try to give them a reference based on their primary source address.
+                int nUBucket = info.GetNewBucket(nKey);
+                int nUBucketPos = info.GetBucketPosition(nKey, true, nUBucket);
+                if (vvNew[nUBucket][nUBucketPos] == -1) {
+                    vvNew[nUBucket][nUBucketPos] = n;
+                    info.nRefCount++;
+                }
             }
         }
         nIdCount = nNew;
+
+        // Deserialize entries from the tried table.
         int nLost = 0;
         for (int n = 0; n < nTried; n++) {
             CAddrInfo info;
             s >> info;
-            std::vector<int> &vTried = vvTried[info.GetTriedBucket(nKey)];
-            if (vTried.size() < ADDRMAN_TRIED_BUCKET_SIZE) {
+            int nKBucket = info.GetTriedBucket(nKey);
+            int nKBucketPos = info.GetBucketPosition(nKey, false, nKBucket);
+            if (vvTried[nKBucket][nKBucketPos] == -1) {
                 info.nRandomPos = vRandom.size();
                 info.fInTried = true;
                 vRandom.push_back(nIdCount);
                 mapInfo[nIdCount] = info;
                 mapAddr[info] = nIdCount;
-                vTried.push_back(nIdCount);
+                vvTried[nKBucket][nKBucketPos] = nIdCount;
                 nIdCount++;
             } else {
                 nLost++;
             }
         }
         nTried -= nLost;
-        for (int b = 0; b < nUBuckets; b++) {
-            std::set<int> &vNew = vvNew[b];
+
+        // Deserialize positions in the new table (if possible).
+        for (int bucket = 0; bucket < nUBuckets; bucket++) {
             int nSize = 0;
             s >> nSize;
             for (int n = 0; n < nSize; n++) {
                 int nIndex = 0;
                 s >> nIndex;
-                CAddrInfo &info = mapInfo[nIndex];
-                if (nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS) {
-                    info.nRefCount++;
-                    vNew.insert(nIndex);
+                if (nIndex >= 0 && nIndex < nNew) {
+                    CAddrInfo &info = mapInfo[nIndex];
+                    int nUBucketPos = info.GetBucketPosition(nKey, true, bucket);
+                    if (nVersion == 1 && nUBuckets == ADDRMAN_NEW_BUCKET_COUNT && vvNew[bucket][nUBucketPos] == -1 && info.nRefCount < ADDRMAN_NEW_BUCKETS_PER_ADDRESS) {
+                        info.nRefCount++;
+                        vvNew[bucket][nUBucketPos] = nIndex;
+                    }
                 }
             }
         }
+
+        // Prune new entries with refcount 0 (as a result of collisions).
+        int nLostUnk = 0;
+        for (std::map<int, CAddrInfo>::const_iterator it = mapInfo.begin(); it != mapInfo.end(); ) {
+            if (it->second.fInTried == false && it->second.nRefCount == 0) {
+                std::map<int, CAddrInfo>::const_iterator itCopy = it++;
+                Delete(itCopy->first);
+                nLostUnk++;
+            } else {
+                it++;
+            }
+        }
+        if (nLost + nLostUnk > 0) {
+            LogPrint("addrman", "addrman lost %i new and %i tried addresses due to collisions\n", nLostUnk, nLost);
+        }
+
+        Check();
     }
 
     unsigned int GetSerializeSize(int nType, int nVersion) const
@@ -396,13 +427,29 @@ class CAddrMan
         return (CSizeComputer(nType, nVersion) << *this).size();
     }
 
-    CAddrMan() : vRandom(0), vvTried(ADDRMAN_TRIED_BUCKET_COUNT, std::vector<int>(0)), vvNew(ADDRMAN_NEW_BUCKET_COUNT, std::set<int>())
+    void Clear()
     {
-         nKey = GetRandHash();
+        std::vector<int>().swap(vRandom);
+        nKey = GetRandHash();
+        for (size_t bucket = 0; bucket < ADDRMAN_NEW_BUCKET_COUNT; bucket++) {
+            for (size_t entry = 0; entry < ADDRMAN_BUCKET_SIZE; entry++) {
+                vvNew[bucket][entry] = -1;
+            }
+        }
+        for (size_t bucket = 0; bucket < ADDRMAN_TRIED_BUCKET_COUNT; bucket++) {
+            for (size_t entry = 0; entry < ADDRMAN_BUCKET_SIZE; entry++) {
+                vvTried[bucket][entry] = -1;
+            }
+        }
 
-         nIdCount = 0;
-         nTried = 0;
-         nNew = 0;
+        nIdCount = 0;
+        nTried = 0;
+        nNew = 0;
+    }
+
+    CAddrMan()
+    {
+        Clear();
     }
 
     ~CAddrMan()

From 2218d4bbe0a3ee38f5c8f8bba40ed326c1a6b5dd Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 19 Mar 2015 08:50:04 -0700
Subject: [PATCH 1293/1819] Simplify hashing code

Conflicts:
	src/addrman.cpp

Rebased-From: a8ff7c62edc63c7c94bc91c30b80995539ed7477
Github-Pull: #5941
---
 src/addrman.cpp | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 62a9f39cc19a..dfce09834cba 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -12,38 +12,22 @@ using namespace std;
 
 int CAddrInfo::GetTriedBucket(const uint256& nKey) const
 {
-    CDataStream ss1(SER_GETHASH, 0);
-    std::vector<unsigned char> vchKey = GetKey();
-    ss1 << nKey << vchKey;
-    uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
-
-    CDataStream ss2(SER_GETHASH, 0);
-    std::vector<unsigned char> vchGroupKey = GetGroup();
-    ss2 << nKey << vchGroupKey << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP);
-    uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
+    uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetKey()).GetHash().GetLow64();
+    uint64_t hash2 = (CHashWriter(SER_GETHASH, 0) << nKey << GetGroup() << (hash1 % ADDRMAN_TRIED_BUCKETS_PER_GROUP)).GetHash().GetLow64();
     return hash2 % ADDRMAN_TRIED_BUCKET_COUNT;
 }
 
 int CAddrInfo::GetNewBucket(const uint256& nKey, const CNetAddr& src) const
 {
-    CDataStream ss1(SER_GETHASH, 0);
-    std::vector<unsigned char> vchGroupKey = GetGroup();
     std::vector<unsigned char> vchSourceGroupKey = src.GetGroup();
-    ss1 << nKey << vchGroupKey << vchSourceGroupKey;
-    uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
-
-    CDataStream ss2(SER_GETHASH, 0);
-    ss2 << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP);
-    uint64_t hash2 = Hash(ss2.begin(), ss2.end()).GetLow64();
+    uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << GetGroup() << vchSourceGroupKey).GetHash().GetLow64();
+    uint64_t hash2 = (CHashWriter(SER_GETHASH, 0) << nKey << vchSourceGroupKey << (hash1 % ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP)).GetHash().GetLow64();
     return hash2 % ADDRMAN_NEW_BUCKET_COUNT;
 }
 
 int CAddrInfo::GetBucketPosition(const uint256 &nKey, bool fNew, int nBucket) const
 {
-    CDataStream ss1(SER_GETHASH, 0);
-    std::vector<unsigned char> vchKey = GetKey();
-    ss1 << nKey << (fNew ? 'N' : 'K') << nBucket << vchKey;
-    uint64_t hash1 = Hash(ss1.begin(), ss1.end()).GetLow64();
+    uint64_t hash1 = (CHashWriter(SER_GETHASH, 0) << nKey << (fNew ? 'N' : 'K') << nBucket << GetKey()).GetHash().GetLow64();
     return hash1 % ADDRMAN_BUCKET_SIZE;
 }
 

From 214154e6fc65bdc06fbfe1bc04b9b57347fdb3f7 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 19 Mar 2015 09:44:26 -0700
Subject: [PATCH 1294/1819] Do not bias outgoing connections towards fresh
 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This change was suggested as Countermeasure 2 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.

Rebased-From: 68ba3f67bd500a64fb8932c6b41924ddc31d76f
Github-Pull: #5941
---
 src/addrman.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index dfce09834cba..df32da7257e4 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -63,8 +63,6 @@ double CAddrInfo::GetChance(int64_t nNow) const
     if (nSinceLastTry < 0)
         nSinceLastTry = 0;
 
-    fChance *= 600.0 / (600.0 + nSinceLastSeen);
-
     // deprioritize very recent attempts away
     if (nSinceLastTry < 60 * 10)
         fChance *= 0.01;

From 0c6f334c32f2ef5b7224ec7f5ac694153a7f4241 Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 19 Mar 2015 09:51:59 -0700
Subject: [PATCH 1295/1819] Always use a 50% chance to choose between tried and
 new entries
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This change was suggested as Countermeasure 2 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.

Rebased-From: c6a63ceeb4956933588995bcf01dc3095aaeb1fc
Github-Pull: #5941
---
 src/addrman.cpp | 7 +++----
 src/addrman.h   | 6 +++---
 src/net.cpp     | 3 +--
 3 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index df32da7257e4..015589343d73 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -332,14 +332,13 @@ void CAddrMan::Attempt_(const CService& addr, int64_t nTime)
     info.nAttempts++;
 }
 
-CAddress CAddrMan::Select_(int nUnkBias)
+CAddress CAddrMan::Select_()
 {
     if (size() == 0)
         return CAddress();
 
-    double nCorTried = sqrt(nTried) * (100.0 - nUnkBias);
-    double nCorNew = sqrt(nNew) * nUnkBias;
-    if ((nCorTried + nCorNew) * GetRandInt(1 << 30) / (1 << 30) < nCorTried) {
+    // Use a 50% chance for choosing between tried and new table entries.
+    if (nTried > 0 && (nNew == 0 || GetRandInt(2) == 0)) {
         // use a tried node
         double fChanceFactor = 1.0;
         while (1) {
diff --git a/src/addrman.h b/src/addrman.h
index 3966bf5b73a1..5eb19758d5f7 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -231,7 +231,7 @@ class CAddrMan
 
     //! Select an address to connect to.
     //! nUnkBias determines how much to favor new addresses over tried ones (min=0, max=100)
-    CAddress Select_(int nUnkBias);
+    CAddress Select_();
 
 #ifdef DEBUG_ADDRMAN
     //! Perform consistency check. Returns an error code or zero.
@@ -533,13 +533,13 @@ class CAddrMan
      * Choose an address to connect to.
      * nUnkBias determines how much "new" entries are favored over "tried" ones (0-100).
      */
-    CAddress Select(int nUnkBias = 50)
+    CAddress Select()
     {
         CAddress addrRet;
         {
             LOCK(cs);
             Check();
-            addrRet = Select_(nUnkBias);
+            addrRet = Select_();
             Check();
         }
         return addrRet;
diff --git a/src/net.cpp b/src/net.cpp
index 1d95932ca6a6..47221edef6ee 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1271,8 +1271,7 @@ void ThreadOpenConnections()
         int nTries = 0;
         while (true)
         {
-            // use an nUnkBias between 10 (no outgoing connections) and 90 (8 outgoing connections)
-            CAddress addr = addrman.Select(10 + min(nOutbound,8)*10);
+            CAddress addr = addrman.Select();
 
             // if we selected an invalid address, restart
             if (!addr.IsValid() || setConnected.count(addr.GetGroup()) || IsLocal(addr))

From aa587d4cae0b82d59677b7fe8aab1b09cc7c04be Mon Sep 17 00:00:00 2001
From: Pieter Wuille <pieter.wuille@gmail.com>
Date: Thu, 19 Mar 2015 10:01:57 -0700
Subject: [PATCH 1296/1819] Scale up addrman
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This change was suggested as Countermeasure 6 in
Eclipse Attacks on Bitcoin’s Peer-to-Peer Network, Ethan Heilman,
Alison Kendler, Aviv Zohar, Sharon Goldberg. ePrint Archive Report
2015/263. March 2015.

Rebased-From: 1d21ba2f5ecbf03086d0b65c4c4c80a39a94c2ee
Github-Pull: #5941
---
 src/addrman.h | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/addrman.h b/src/addrman.h
index 5eb19758d5f7..fdc4d02c38fa 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -109,15 +109,15 @@ class CAddrInfo : public CAddress
  *
  * To that end:
  *  * Addresses are organized into buckets.
- *    * Address that have not yet been tried go into 256 "new" buckets.
- *      * Based on the address range (/16 for IPv4) of source of the information, 32 buckets are selected at random
+ *    * Address that have not yet been tried go into 1024 "new" buckets.
+ *      * Based on the address range (/16 for IPv4) of source of the information, 64 buckets are selected at random
  *      * The actual bucket is chosen from one of these, based on the range the address itself is located.
- *      * One single address can occur in up to 4 different buckets, to increase selection chances for addresses that
+ *      * One single address can occur in up to 8 different buckets, to increase selection chances for addresses that
  *        are seen frequently. The chance for increasing this multiplicity decreases exponentially.
  *      * When adding a new address to a full bucket, a randomly chosen entry (with a bias favoring less recently seen
  *        ones) is removed from it first.
- *    * Addresses of nodes that are known to be accessible go into 64 "tried" buckets.
- *      * Each address range selects at random 4 of these buckets.
+ *    * Addresses of nodes that are known to be accessible go into 256 "tried" buckets.
+ *      * Each address range selects at random 8 of these buckets.
  *      * The actual bucket is chosen from one of these, based on the full address.
  *      * When adding a new good address to a full bucket, a randomly chosen entry (with a bias favoring less recently
  *        tried ones) is evicted from it, back to the "new" buckets.
@@ -128,22 +128,22 @@ class CAddrInfo : public CAddress
  */
 
 //! total number of buckets for tried addresses
-#define ADDRMAN_TRIED_BUCKET_COUNT 64
+#define ADDRMAN_TRIED_BUCKET_COUNT 256
 
 //! total number of buckets for new addresses
-#define ADDRMAN_NEW_BUCKET_COUNT 256
+#define ADDRMAN_NEW_BUCKET_COUNT 1024
 
 //! maximum allowed number of entries in buckets for new and tried addresses
 #define ADDRMAN_BUCKET_SIZE 64
 
 //! over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread
-#define ADDRMAN_TRIED_BUCKETS_PER_GROUP 4
+#define ADDRMAN_TRIED_BUCKETS_PER_GROUP 8
 
 //! over how many buckets entries with new addresses originating from a single group are spread
-#define ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP 32
+#define ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP 64
 
 //! in how many buckets for entries with new addresses a single address may occur
-#define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 4
+#define ADDRMAN_NEW_BUCKETS_PER_ADDRESS 8
 
 //! how old addresses can maximally be
 #define ADDRMAN_HORIZON_DAYS 30

From ae1479a114c71c140ef6c00a4452d2b5f300cb7a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 1 Apr 2015 16:48:23 +0200
Subject: [PATCH 1297/1819] update release notes after #5941

---
 doc/release-notes.md | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 1e9e0581aa94..08d7beec0d6a 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -71,6 +71,10 @@ P2P protocol and network code:
 - `200f293` Ignore getaddr messages on Outbound connections.
 - `d5d8998` Limit message sizes before transfer
 - `aeb9279` Better fingerprinting protection for non-main-chain getdatas.
+- `cf0218f` Make addrman's bucket placement deterministic (countermeasure 1 against eclipse attacks, see http://cs-people.bu.edu/heilman/eclipse/)
+- `0c6f334` Always use a 50% chance to choose between tried and new entries (countermeasure 2 against eclipse attacks)
+- `214154e` Do not bias outgoing connections towards fresh addresses (countermeasure 2 against eclipse attacks)
+- `aa587d4` Scale up addrman (countermeasure 6 against eclipse attacks)
 
 Validation:
 - `d148f62` Acquire CCheckQueue's lock to avoid race condition

From fe3122580e9bc6e1b7d6c11fb6b2175e7a06f528 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 1 Apr 2015 17:27:54 +0200
Subject: [PATCH 1298/1819] update release notes for #5953/#5900

---
 doc/release-notes.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 08d7beec0d6a..f30436fd8d8a 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -64,6 +64,7 @@ Block (database) and transaction handling:
 - `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
 - `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates
 - `002c8a2` fix possible block db breakage during re-index
+- `a1f425b` Add (optional) consistency check for the block chain data structures
 
 P2P protocol and network code:
 - `78f64ef` don't trickle for whitelisted nodes

From 9e1cc16296578a7b6f27b4a1c48e38cc031060b0 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 1 Apr 2015 18:43:49 +0200
Subject: [PATCH 1299/1819] doc: add historical release notes for 0.10.0

Rebased-From: 15facb4aca75122b6ae0dcc6f6e112127e6a0e59
---
 doc/release-notes/release-notes-0.10.0.md | 762 ++++++++++++++++++++++
 1 file changed, 762 insertions(+)
 create mode 100644 doc/release-notes/release-notes-0.10.0.md

diff --git a/doc/release-notes/release-notes-0.10.0.md b/doc/release-notes/release-notes-0.10.0.md
new file mode 100644
index 000000000000..986b8832ec18
--- /dev/null
+++ b/doc/release-notes/release-notes-0.10.0.md
@@ -0,0 +1,762 @@
+Bitcoin Core version 0.10.0 is now available from:
+
+  https://bitcoin.org/bin/0.10.0/
+
+This is a new major version release, bringing both new features and
+bug fixes.
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/bitcoin/bitcoin/issues
+
+Upgrading and downgrading
+=========================
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+Downgrading warning
+---------------------
+
+Because release 0.10.0 makes use of headers-first synchronization and parallel
+block download (see further), the block files and databases are not
+backwards-compatible with older versions of Bitcoin Core or other software:
+
+* Blocks will be stored on disk out of order (in the order they are
+received, really), which makes it incompatible with some tools or
+other programs. Reindexing using earlier versions will also not work
+anymore as a result of this.
+
+* The block index database will now hold headers for which no block is
+stored on disk, which earlier versions won't support.
+
+If you want to be able to downgrade smoothly, make a backup of your entire data
+directory. Without this your node will need start syncing (or importing from
+bootstrap.dat) anew afterwards. It is possible that the data from a completely
+synchronised 0.10 node may be usable in older versions as-is, but this is not
+supported and may break as soon as the older version attempts to reindex.
+
+This does not affect wallet forward or backward compatibility.
+
+
+Notable changes
+===============
+
+Faster synchronization
+----------------------
+
+Bitcoin Core now uses 'headers-first synchronization'. This means that we first
+ask peers for block headers (a total of 27 megabytes, as of December 2014) and
+validate those. In a second stage, when the headers have been discovered, we
+download the blocks. However, as we already know about the whole chain in
+advance, the blocks can be downloaded in parallel from all available peers.
+
+In practice, this means a much faster and more robust synchronization. On
+recent hardware with a decent network link, it can be as little as 3 hours
+for an initial full synchronization. You may notice a slower progress in the
+very first few minutes, when headers are still being fetched and verified, but
+it should gain speed afterwards.
+
+A few RPCs were added/updated as a result of this:
+- `getblockchaininfo` now returns the number of validated headers in addition to
+the number of validated blocks.
+- `getpeerinfo` lists both the number of blocks and headers we know we have in
+common with each peer. While synchronizing, the heights of the blocks that we
+have requested from peers (but haven't received yet) are also listed as
+'inflight'.
+- A new RPC `getchaintips` lists all known branches of the block chain,
+including those we only have headers for.
+
+Transaction fee changes
+-----------------------
+
+This release automatically estimates how high a transaction fee (or how
+high a priority) transactions require to be confirmed quickly. The default
+settings will create transactions that confirm quickly; see the new
+'txconfirmtarget' setting to control the tradeoff between fees and
+confirmation times. Fees are added by default unless the 'sendfreetransactions' 
+setting is enabled.
+
+Prior releases used hard-coded fees (and priorities), and would
+sometimes create transactions that took a very long time to confirm.
+
+Statistics used to estimate fees and priorities are saved in the
+data directory in the `fee_estimates.dat` file just before
+program shutdown, and are read in at startup.
+
+New command line options for transaction fee changes:
+- `-txconfirmtarget=n` : create transactions that have enough fees (or priority)
+so they are likely to begin confirmation within n blocks (default: 1). This setting
+is over-ridden by the -paytxfee option.
+- `-sendfreetransactions` : Send transactions as zero-fee transactions if possible 
+(default: 0)
+
+New RPC commands for fee estimation:
+- `estimatefee nblocks` : Returns approximate fee-per-1,000-bytes needed for
+a transaction to begin confirmation within nblocks. Returns -1 if not enough
+transactions have been observed to compute a good estimate.
+- `estimatepriority nblocks` : Returns approximate priority needed for
+a zero-fee transaction to begin confirmation within nblocks. Returns -1 if not
+enough free transactions have been observed to compute a good
+estimate.
+
+RPC access control changes
+--------------------------
+
+Subnet matching for the purpose of access control is now done
+by matching the binary network address, instead of with string wildcard matching.
+For the user this means that `-rpcallowip` takes a subnet specification, which can be
+
+- a single IP address (e.g. `1.2.3.4` or `fe80::0012:3456:789a:bcde`)
+- a network/CIDR (e.g. `1.2.3.0/24` or `fe80::0000/64`)
+- a network/netmask (e.g. `1.2.3.4/255.255.255.0` or `fe80::0012:3456:789a:bcde/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff`)
+
+An arbitrary number of `-rpcallow` arguments can be given. An incoming connection will be accepted if its origin address
+matches one of them.
+
+For example:
+
+| 0.9.x and before                           | 0.10.x                                |
+|--------------------------------------------|---------------------------------------|
+| `-rpcallowip=192.168.1.1`                  | `-rpcallowip=192.168.1.1` (unchanged) |
+| `-rpcallowip=192.168.1.*`                  | `-rpcallowip=192.168.1.0/24`          |
+| `-rpcallowip=192.168.*`                    | `-rpcallowip=192.168.0.0/16`          |
+| `-rpcallowip=*` (dangerous!)               | `-rpcallowip=::/0` (still dangerous!) |
+
+Using wildcards will result in the rule being rejected with the following error in debug.log:
+
+    Error: Invalid -rpcallowip subnet specification: *. Valid are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24).
+
+
+REST interface
+--------------
+
+A new HTTP API is exposed when running with the `-rest` flag, which allows
+unauthenticated access to public node data.
+
+It is served on the same port as RPC, but does not need a password, and uses
+plain HTTP instead of JSON-RPC.
+
+Assuming a local RPC server running on port 8332, it is possible to request:
+- Blocks: http://localhost:8332/rest/block/*HASH*.*EXT*
+- Blocks without transactions: http://localhost:8332/rest/block/notxdetails/*HASH*.*EXT*
+- Transactions (requires `-txindex`): http://localhost:8332/rest/tx/*HASH*.*EXT*
+
+In every case, *EXT* can be `bin` (for raw binary data), `hex` (for hex-encoded
+binary) or `json`.
+
+For more details, see the `doc/REST-interface.md` document in the repository.
+
+RPC Server "Warm-Up" Mode
+-------------------------
+
+The RPC server is started earlier now, before most of the expensive
+intialisations like loading the block index.  It is available now almost
+immediately after starting the process.  However, until all initialisations
+are done, it always returns an immediate error with code -28 to all calls.
+
+This new behaviour can be useful for clients to know that a server is already
+started and will be available soon (for instance, so that they do not
+have to start it themselves).
+
+Improved signing security
+-------------------------
+
+For 0.10 the security of signing against unusual attacks has been
+improved by making the signatures constant time and deterministic.
+
+This change is a result of switching signing to use libsecp256k1
+instead of OpenSSL. Libsecp256k1 is a cryptographic library
+optimized for the curve Bitcoin uses which was created by Bitcoin
+Core developer Pieter Wuille.
+
+There exist attacks[1] against most ECC implementations where an
+attacker on shared virtual machine hardware could extract a private
+key if they could cause a target to sign using the same key hundreds
+of times. While using shared hosts and reusing keys are inadvisable
+for other reasons, it's a better practice to avoid the exposure.
+
+OpenSSL has code in their source repository for derandomization
+and reduction in timing leaks that we've eagerly wanted to use for a
+long time, but this functionality has still not made its
+way into a released version of OpenSSL. Libsecp256k1 achieves
+significantly stronger protection: As far as we're aware this is
+the only deployed implementation of constant time signing for
+the curve Bitcoin uses and we have reason to believe that
+libsecp256k1 is better tested and more thoroughly reviewed
+than the implementation in OpenSSL.
+
+[1] https://eprint.iacr.org/2014/161.pdf
+
+Watch-only wallet support
+-------------------------
+
+The wallet can now track transactions to and from wallets for which you know
+all addresses (or scripts), even without the private keys.
+
+This can be used to track payments without needing the private keys online on a
+possibly vulnerable system. In addition, it can help for (manual) construction
+of multisig transactions where you are only one of the signers.
+
+One new RPC, `importaddress`, is added which functions similarly to
+`importprivkey`, but instead takes an address or script (in hexadecimal) as
+argument.  After using it, outputs credited to this address or script are
+considered to be received, and transactions consuming these outputs will be
+considered to be sent.
+
+The following RPCs have optional support for watch-only:
+`getbalance`, `listreceivedbyaddress`, `listreceivedbyaccount`,
+`listtransactions`, `listaccounts`, `listsinceblock`, `gettransaction`. See the
+RPC documentation for those methods for more information.
+
+Compared to using `getrawtransaction`, this mechanism does not require
+`-txindex`, scales better, integrates better with the wallet, and is compatible
+with future block chain pruning functionality. It does mean that all relevant
+addresses need to added to the wallet before the payment, though.
+
+Consensus library
+-----------------
+
+Starting from 0.10.0, the Bitcoin Core distribution includes a consensus library.
+
+The purpose of this library is to make the verification functionality that is
+critical to Bitcoin's consensus available to other applications, e.g. to language
+bindings such as [python-bitcoinlib](https://pypi.python.org/pypi/python-bitcoinlib) or
+alternative node implementations.
+
+This library is called `libbitcoinconsensus.so` (or, `.dll` for Windows).
+Its interface is defined in the C header [bitcoinconsensus.h](https://github.com/bitcoin/bitcoin/blob/0.10/src/script/bitcoinconsensus.h).
+
+In its initial version the API includes two functions:
+
+- `bitcoinconsensus_verify_script` verifies a script. It returns whether the indicated input of the provided serialized transaction 
+correctly spends the passed scriptPubKey under additional constraints indicated by flags
+- `bitcoinconsensus_version` returns the API version, currently at an experimental `0`
+
+The functionality is planned to be extended to e.g. UTXO management in upcoming releases, but the interface
+for existing methods should remain stable.
+
+Standard script rules relaxed for P2SH addresses
+------------------------------------------------
+
+The IsStandard() rules have been almost completely removed for P2SH
+redemption scripts, allowing applications to make use of any valid
+script type, such as "n-of-m OR y", hash-locked oracle addresses, etc.
+While the Bitcoin protocol has always supported these types of script,
+actually using them on mainnet has been previously inconvenient as
+standard Bitcoin Core nodes wouldn't relay them to miners, nor would
+most miners include them in blocks they mined.
+
+bitcoin-tx
+----------
+
+It has been observed that many of the RPC functions offered by bitcoind are
+"pure functions", and operate independently of the bitcoind wallet. This
+included many of the RPC "raw transaction" API functions, such as
+createrawtransaction.
+
+bitcoin-tx is a newly introduced command line utility designed to enable easy
+manipulation of bitcoin transactions. A summary of its operation may be
+obtained via "bitcoin-tx --help" Transactions may be created or signed in a
+manner similar to the RPC raw tx API. Transactions may be updated, deleting
+inputs or outputs, or appending new inputs and outputs. Custom scripts may be
+easily composed using a simple text notation, borrowed from the bitcoin test
+suite.
+
+This tool may be used for experimenting with new transaction types, signing
+multi-party transactions, and many other uses. Long term, the goal is to
+deprecate and remove "pure function" RPC API calls, as those do not require a
+server round-trip to execute.
+
+Other utilities "bitcoin-key" and "bitcoin-script" have been proposed, making
+key and script operations easily accessible via command line.
+
+Mining and relay policy enhancements
+------------------------------------
+
+Bitcoin Core's block templates are now for version 3 blocks only, and any mining
+software relying on its `getblocktemplate` must be updated in parallel to use
+libblkmaker either version 0.4.2 or any version from 0.5.1 onward.
+If you are solo mining, this will affect you the moment you upgrade Bitcoin
+Core, which must be done prior to BIP66 achieving its 951/1001 status.
+If you are mining with the stratum mining protocol: this does not affect you.
+If you are mining with the getblocktemplate protocol to a pool: this will affect
+you at the pool operator's discretion, which must be no later than BIP66
+achieving its 951/1001 status.
+
+The `prioritisetransaction` RPC method has been added to enable miners to
+manipulate the priority of transactions on an individual basis.
+
+Bitcoin Core now supports BIP 22 long polling, so mining software can be
+notified immediately of new templates rather than having to poll periodically.
+
+Support for BIP 23 block proposals is now available in Bitcoin Core's
+`getblocktemplate` method. This enables miners to check the basic validity of
+their next block before expending work on it, reducing risks of accidental
+hardforks or mining invalid blocks.
+
+Two new options to control mining policy:
+- `-datacarrier=0/1` : Relay and mine "data carrier" (OP_RETURN) transactions
+if this is 1.
+- `-datacarriersize=n` : Maximum size, in bytes, we consider acceptable for
+"data carrier" outputs.
+
+The relay policy has changed to more properly implement the desired behavior of not 
+relaying free (or very low fee) transactions unless they have a priority above the 
+AllowFreeThreshold(), in which case they are relayed subject to the rate limiter.
+
+BIP 66: strict DER encoding for signatures
+------------------------------------------
+
+Bitcoin Core 0.10 implements BIP 66, which introduces block version 3, and a new
+consensus rule, which prohibits non-DER signatures. Such transactions have been
+non-standard since Bitcoin v0.8.0 (released in February 2013), but were
+technically still permitted inside blocks.
+
+This change breaks the dependency on OpenSSL's signature parsing, and is
+required if implementations would want to remove all of OpenSSL from the
+consensus code.
+
+The same miner-voting mechanism as in BIP 34 is used: when 751 out of a
+sequence of 1001 blocks have version number 3 or higher, the new consensus
+rule becomes active for those blocks. When 951 out of a sequence of 1001
+blocks have version number 3 or higher, it becomes mandatory for all blocks.
+
+Backward compatibility with current mining software is NOT provided, thus miners
+should read the first paragraph of "Mining and relay policy enhancements" above.
+
+0.10.0 Change log
+=================
+
+Detailed release notes follow. This overview includes changes that affect external
+behavior, not code moves, refactors or string updates.
+
+RPC:
+- `f923c07` Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
+- `b641c9c` Fix addnode "onetry": Connect with OpenNetworkConnection
+- `171ca77` estimatefee / estimatepriority RPC methods
+- `b750cf1` Remove cli functionality from bitcoind
+- `f6984e8` Add "chain" to getmininginfo, improve help in getblockchaininfo
+- `99ddc6c` Add nLocalServices info to RPC getinfo
+- `cf0c47b` Remove getwork() RPC call
+- `2a72d45` prioritisetransaction <txid> <priority delta> <priority tx fee>
+- `e44fea5` Add an option `-datacarrier` to allow users to disable relaying/mining data carrier transactions
+- `2ec5a3d` Prevent easy RPC memory exhaustion attack
+- `d4640d7` Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation
+- `83f3543` Added argument to listaccounts to include watchonly addresses
+- `952877e` Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address
+- `d7d5d23` Added argument to listtransactions and listsinceblock to include watchonly addresses
+- `f87ba3d` added includeWatchonly argument to 'gettransaction' because it affects balance calculation
+- `0fa2f88` added includedWatchonly argument to listreceivedbyaddress/...account
+- `6c37f7f` `getrawchangeaddress`: fail when keypool exhausted and wallet locked
+- `ff6a7af` getblocktemplate: longpolling support
+- `c4a321f` Add peerid to getpeerinfo to allow correlation with the logs
+- `1b4568c` Add vout to ListTransactions output
+- `b33bd7a` Implement "getchaintips" RPC command to monitor blockchain forks
+- `733177e` Remove size limit in RPC client, keep it in server
+- `6b5b7cb` Categorize rpc help overview
+- `6f2c26a` Closely track mempool byte total. Add "getmempoolinfo" RPC
+- `aa82795` Add detailed network info to getnetworkinfo RPC
+- `01094bd` Don't reveal whether password is <20 or >20 characters in RPC
+- `57153d4` rpc: Compute number of confirmations of a block from block height
+- `ff36cbe` getnetworkinfo: export local node's client sub-version string
+- `d14d7de` SanitizeString: allow '(' and ')'
+- `31d6390` Fixed setaccount accepting foreign address
+- `b5ec5fe` update getnetworkinfo help with subversion
+- `ad6e601` RPC additions after headers-first
+- `33dfbf5` rpc: Fix leveldb iterator leak, and flush before `gettxoutsetinfo`
+- `2aa6329` Enable customising node policy for datacarrier data size with a -datacarriersize option
+- `f877aaa` submitblock: Use a temporary CValidationState to determine accurately the outcome of ProcessBlock
+- `e69a587` submitblock: Support for returning specific rejection reasons
+- `af82884` Add "warmup mode" for RPC server
+- `e2655e0` Add unauthenticated HTTP REST interface to public blockchain data
+- `683dc40` Disable SSLv3 (in favor of TLS) for the RPC client and server
+- `44b4c0d` signrawtransaction: validate private key
+- `9765a50` Implement BIP 23 Block Proposal
+- `f9de17e` Add warning comment to getinfo
+
+Command-line options:
+- `ee21912` Use netmasks instead of wildcards for IP address matching
+- `deb3572` Add `-rpcbind` option to allow binding RPC port on a specific interface
+- `96b733e` Add `-version` option to get just the version
+- `1569353` Add `-stopafterblockimport` option
+- `77cbd46` Let -zapwallettxes recover transaction meta data
+- `1c750db` remove -tor compatibility code (only allow -onion)
+- `4aaa017` rework help messages for fee-related options
+- `4278b1d` Clarify error message when invalid -rpcallowip
+- `6b407e4` -datadir is now allowed in config files
+- `bdd5b58` Add option `-sysperms` to disable 077 umask (create new files with system default umask)
+- `cbe39a3` Add "bitcoin-tx" command line utility and supporting modules
+- `dbca89b` Trigger -alertnotify if network is upgrading without you
+- `ad96e7c` Make -reindex cope with out-of-order blocks
+- `16d5194` Skip reindexed blocks individually
+- `ec01243` --tracerpc option for regression tests
+- `f654f00` Change -genproclimit default to 1
+- `3c77714` Make -proxy set all network types, avoiding a connect leak
+- `57be955` Remove -printblock, -printblocktree, and -printblockindex
+- `ad3d208` remove -maxorphanblocks config parameter since it is no longer functional
+
+Block and transaction handling:
+- `7a0e84d` ProcessGetData(): abort if a block file is missing from disk
+- `8c93bf4` LoadBlockIndexDB(): Require block db reindex if any `blk*.dat` files are missing
+- `77339e5` Get rid of the static chainMostWork (optimization)
+- `4e0eed8` Allow ActivateBestChain to release its lock on cs_main
+- `18e7216` Push cs_mains down in ProcessBlock
+- `fa126ef` Avoid undefined behavior using CFlatData in CScript serialization
+- `7f3b4e9` Relax IsStandard rules for pay-to-script-hash transactions
+- `c9a0918` Add a skiplist to the CBlockIndex structure
+- `bc42503` Use unordered_map for CCoinsViewCache with salted hash (optimization)
+- `d4d3fbd` Do not flush the cache after every block outside of IBD (optimization)
+- `ad08d0b` Bugfix: make CCoinsViewMemPool support pruned entries in underlying cache
+- `5734d4d` Only remove actualy failed blocks from setBlockIndexValid
+- `d70bc52` Rework block processing benchmark code
+- `714a3e6` Only keep setBlockIndexValid entries that are possible improvements
+- `ea100c7` Reduce maximum coinscache size during verification (reduce memory usage)
+- `4fad8e6` Reject transactions with excessive numbers of sigops
+- `b0875eb` Allow BatchWrite to destroy its input, reducing copying (optimization)
+- `92bb6f2` Bypass reloading blocks from disk (optimization)
+- `2e28031` Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (reduce memory usage)
+- `ab15b2e` Avoid copying undo data (optimization)
+- `341735e` Headers-first synchronization
+- `afc32c5` Fix rebuild-chainstate feature and improve its performance
+- `e11b2ce` Fix large reorgs
+- `ed6d1a2` Keep information about all block files in memory
+- `a48f2d6` Abstract context-dependent block checking from acceptance
+- `7e615f5` Fixed mempool sync after sending a transaction
+- `51ce901` Improve chainstate/blockindex disk writing policy
+- `a206950` Introduce separate flushing modes
+- `9ec75c5` Add a locking mechanism to IsInitialBlockDownload to ensure it never goes from false to true
+- `868d041` Remove coinbase-dependant transactions during reorg
+- `723d12c` Remove txn which are invalidated by coinbase maturity during reorg
+- `0cb8763` Check against MANDATORY flags prior to accepting to mempool
+- `8446262` Reject headers that build on an invalid parent
+- `008138c` Bugfix: only track UTXO modification after lookup
+
+P2P protocol and network code:
+- `f80cffa` Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails
+- `c30329a` Add testnet DNS seed of Alex Kotenko
+- `45a4baf` Add testnet DNS seed of Andreas Schildbach
+- `f1920e8` Ping automatically every 2 minutes (unconditionally)
+- `806fd19` Allocate receive buffers in on the fly
+- `6ecf3ed` Display unknown commands received
+- `aa81564` Track peers' available blocks
+- `caf6150` Use async name resolving to improve net thread responsiveness
+- `9f4da19` Use pong receive time rather than processing time
+- `0127a9b` remove SOCKS4 support from core and GUI, use SOCKS5
+- `40f5cb8` Send rejects and apply DoS scoring for errors in direct block validation
+- `dc942e6` Introduce whitelisted peers
+- `c994d2e` prevent SOCKET leak in BindListenPort()
+- `a60120e` Add built-in seeds for .onion
+- `60dc8e4` Allow -onlynet=onion to be used
+- `3a56de7` addrman: Do not propagate obviously poor addresses onto the network
+- `6050ab6` netbase: Make SOCKS5 negotiation interruptible
+- `604ee2a` Remove tx from AlreadyAskedFor list once we receive it, not when we process it
+- `efad808` Avoid reject message feedback loops
+- `71697f9` Separate protocol versioning from clientversion
+- `20a5f61` Don't relay alerts to peers before version negotiation
+- `b4ee0bd` Introduce preferred download peers
+- `845c86d` Do not use third party services for IP detection
+- `12a49ca` Limit the number of new addressses to accumulate
+- `35e408f` Regard connection failures as attempt for addrman
+- `a3a7317` Introduce 10 minute block download timeout
+- `3022e7d` Require sufficent priority for relay of free transactions
+- `58fda4d` Update seed IPs, based on bitcoin.sipa.be crawler data
+- `18021d0` Remove bitnodes.io from dnsseeds.
+
+Validation:
+- `6fd7ef2` Also switch the (unused) verification code to low-s instead of even-s
+- `584a358` Do merkle root and txid duplicates check simultaneously
+- `217a5c9` When transaction outputs exceed inputs, show the offending amounts so as to aid debugging
+- `f74fc9b` Print input index when signature validation fails, to aid debugging
+- `6fd59ee` script.h: set_vch() should shift a >32 bit value
+- `d752ba8` Add SCRIPT_VERIFY_SIGPUSHONLY (BIP62 rule 2) (test only)
+- `698c6ab` Add SCRIPT_VERIFY_MINIMALDATA (BIP62 rules 3 and 4) (test only)
+- `ab9edbd` script: create sane error return codes for script validation and remove logging
+- `219a147` script: check ScriptError values in script tests
+- `0391423` Discourage NOPs reserved for soft-fork upgrades
+- `98b135f` Make STRICTENC invalid pubkeys fail the script rather than the opcode
+- `307f7d4` Report script evaluation failures in log and reject messages
+- `ace39db` consensus: guard against openssl's new strict DER checks
+- `12b7c44` Improve robustness of DER recoding code
+- `76ce5c8` fail immediately on an empty signature
+
+Build system:
+- `f25e3ad` Fix build in OS X 10.9
+- `65e8ba4` build: Switch to non-recursive make
+- `460b32d` build: fix broken boost chrono check on some platforms
+- `9ce0774` build: Fix windows configure when using --with-qt-libdir
+- `ea96475` build: Add mention of --disable-wallet to bdb48 error messages
+- `1dec09b` depends: add shared dependency builder
+- `c101c76` build: Add --with-utils (bitcoin-cli and bitcoin-tx, default=yes). Help string consistency tweaks. Target sanity check fix
+- `e432a5f` build: add option for reducing exports (v2)
+- `6134b43` Fixing condition 'sabotaging' MSVC build
+- `af0bd5e` osx: fix signing to make Gatekeeper happy (again)
+- `a7d1f03` build: fix dynamic boost check when --with-boost= is used
+- `d5fd094` build: fix qt test build when libprotobuf is in a non-standard path
+- `2cf5f16` Add libbitcoinconsensus library
+- `914868a` build: add a deterministic dmg signer 
+- `2d375fe` depends: bump openssl to 1.0.1k
+- `b7a4ecc` Build: Only check for boost when building code that requires it
+
+Wallet:
+- `b33d1f5` Use fee/priority estimates in wallet CreateTransaction
+- `4b7b1bb` Sanity checks for estimates
+- `c898846` Add support for watch-only addresses
+- `d5087d1` Use script matching rather than destination matching for watch-only
+- `d88af56` Fee fixes
+- `a35b55b` Dont run full check every time we decrypt wallet
+- `3a7c348` Fix make_change to not create half-satoshis
+- `f606bb9` fix a possible memory leak in CWalletDB::Recover
+- `870da77` fix possible memory leaks in CWallet::EncryptWallet
+- `ccca27a` Watch-only fixes
+- `9b1627d` [Wallet] Reduce minTxFee for transaction creation to 1000 satoshis
+- `a53fd41` Deterministic signing
+- `15ad0b5` Apply AreSane() checks to the fees from the network
+- `11855c1` Enforce minRelayTxFee on wallet created tx and add a maxtxfee option
+
+GUI:
+- `c21c74b` osx: Fix missing dock menu with qt5
+- `b90711c` Fix Transaction details shows wrong To:
+- `516053c` Make links in 'About Bitcoin Core' clickable
+- `bdc83e8` Ensure payment request network matches client network
+- `65f78a1` Add GUI view of peer information
+- `06a91d9` VerifyDB progress reporting
+- `fe6bff2` Add BerkeleyDB version info to RPCConsole
+- `b917555` PeerTableModel: Fix potential deadlock. #4296
+- `dff0e3b` Improve rpc console history behavior
+- `95a9383` Remove CENT-fee-rule from coin control completely
+- `56b07d2` Allow setting listen via GUI
+- `d95ba75` Log messages with type>QtDebugMsg as non-debug
+- `8969828` New status bar Unit Display Control and related changes
+- `674c070` seed OpenSSL PNRG with Windows event data
+- `509f926` Payment request parsing on startup now only changes network if a valid network name is specified
+- `acd432b` Prevent balloon-spam after rescan
+- `7007402` Implement SI-style (thin space) thoudands separator
+- `91cce17` Use fixed-point arithmetic in amount spinbox
+- `bdba2dd` Remove an obscure option no-one cares about
+- `bd0aa10` Replace the temporary file hack currently used to change Bitcoin-Qt's dock icon (OS X) with a buffer-based solution
+- `94e1b9e` Re-work overviewpage UI
+- `8bfdc9a` Better looking trayicon
+- `b197bf3` disable tray interactions when client model set to 0
+- `1c5f0af` Add column Watch-only to transactions list
+- `21f139b` Fix tablet crash. closes #4854
+- `e84843c` Broken addresses on command line no longer trigger testnet
+- `a49f11d` Change splash screen to normal window
+- `1f9be98` Disable App Nap on OSX 10.9+
+- `27c3e91` Add proxy to options overridden if necessary
+- `4bd1185` Allow "emergency" shutdown during startup
+- `d52f072` Don't show wallet options in the preferences menu when running with -disablewallet
+- `6093aa1` Qt: QProgressBar CPU-Issue workaround
+- `0ed9675` [Wallet] Add global boolean whether to send free transactions (default=true)
+- `ed3e5e4` [Wallet] Add global boolean whether to pay at least the custom fee (default=true)
+- `e7876b2` [Wallet] Prevent user from paying a non-sense fee
+- `c1c9d5b` Add Smartfee to GUI
+- `e0a25c5` Make askpassphrase dialog behave more sanely
+- `94b362d` On close of splashscreen interrupt verifyDB
+- `b790d13` English translation update
+- `8543b0d` Correct tooltip on address book page
+
+Tests:
+- `b41e594` Fix script test handling of empty scripts
+- `d3a33fc` Test CHECKMULTISIG with m == 0 and n == 0
+- `29c1749` Let tx (in)valid tests use any SCRIPT_VERIFY flag
+- `6380180` Add rejection of non-null CHECKMULTISIG dummy values
+- `21bf3d2` Add tests for BoostAsioToCNetAddr
+- `b5ad5e7` Add Python test for -rpcbind and -rpcallowip
+- `9ec0306` Add CODESEPARATOR/FindAndDelete() tests
+- `75ebced` Added many rpc wallet tests
+- `0193fb8` Allow multiple regression tests to run at once
+- `92a6220` Hook up sanity checks
+- `3820e01` Extend and move all crypto tests to crypto_tests.cpp
+- `3f9a019` added list/get received by address/ account tests
+- `a90689f` Remove timing-based signature cache unit test
+- `236982c` Add skiplist unit tests
+- `f4b00be` Add CChain::GetLocator() unit test
+- `b45a6e8` Add test for getblocktemplate longpolling
+- `cdf305e` Set -discover=0 in regtest framework
+- `ed02282` additional test for OP_SIZE in script_valid.json
+- `0072d98` script tests: BOOLAND, BOOLOR decode to integer
+- `833ff16` script tests: values that overflow to 0 are true
+- `4cac5db` script tests: value with trailing 0x00 is true
+- `89101c6` script test: test case for 5-byte bools
+- `d2d9dc0` script tests: add tests for CHECKMULTISIG limits
+- `d789386` Add "it works" test for bitcoin-tx
+- `df4d61e` Add bitcoin-tx tests
+- `aa41ac2` Test IsPushOnly() with invalid push
+- `6022b5d` Make `script_{valid,invalid}.json` validation flags configurable
+- `8138cbe` Add automatic script test generation, and actual checksig tests
+- `ed27e53` Add coins_tests with a large randomized CCoinViewCache test
+- `9df9cf5` Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
+- `dcb9846` Extend getchaintips RPC test
+- `554147a` Ensure MINIMALDATA invalid tests can only fail one way
+- `dfeec18` Test every numeric-accepting opcode for correct handling of the numeric minimal encoding rule
+- `2b62e17` Clearly separate PUSHDATA and numeric argument MINIMALDATA tests
+- `16d78bd` Add valid invert of invalid every numeric opcode tests
+- `f635269` tests: enable alertnotify test for Windows
+- `7a41614` tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment
+- `5122ea7` tests: fix forknotify.py on windows
+- `fa7f8cd` tests: remove old pull-tester scripts
+- `7667850` tests: replace the old (unused since Travis) tests with new rpc test scripts
+- `f4e0aef` Do signature-s negation inside the tests
+- `1837987` Optimize -regtest setgenerate block generation
+- `2db4c8a` Fix node ranges in the test framework
+- `a8b2ce5` regression test only setmocktime RPC call
+- `daf03e7` RPC tests: create initial chain with specific timestamps
+- `8656dbb` Port/fix txnmall.sh regression test
+- `ca81587` Test the exact order of CHECKMULTISIG sig/pubkey evaluation
+- `7357893` Prioritize and display -testsafemode status in UI
+- `f321d6b` Add key generation/verification to ECC sanity check
+- `132ea9b` miner_tests: Disable checkpoints so they don't fail the subsidy-change test
+- `bc6cb41` QA RPC tests: Add tests block block proposals
+- `f67a9ce` Use deterministically generated script tests
+- `11d7a7d` [RPC] add rpc-test for http keep-alive (persistent connections)
+- `34318d7` RPC-test based on invalidateblock for mempool coinbase spends
+- `76ec867` Use actually valid transactions for script tests
+- `c8589bf` Add actual signature tests
+- `e2677d7` Fix smartfees test for change to relay policy
+- `263b65e` tests: run sanity checks in tests too
+
+Miscellaneous:
+- `122549f` Fix incorrect checkpoint data for testnet3
+- `5bd02cf` Log used config file to debug.log on startup
+- `68ba85f` Updated Debian example bitcoin.conf with config from wiki + removed some cruft and updated comments
+- `e5ee8f0` Remove -beta suffix
+- `38405ac` Add comment regarding experimental-use service bits
+- `be873f6` Issue warning if collecting RandSeed data failed
+- `8ae973c` Allocate more space if necessary in RandSeedAddPerfMon
+- `675bcd5` Correct comment for 15-of-15 p2sh script size
+- `fda3fed` libsecp256k1 integration
+- `2e36866` Show nodeid instead of addresses in log (for anonymity) unless otherwise requested
+- `cd01a5e` Enable paranoid corruption checks in LevelDB >= 1.16
+- `9365937` Add comment about never updating nTimeOffset past 199 samples
+- `403c1bf` contrib: remove getwork-based pyminer (as getwork API call has been removed)
+- `0c3e101` contrib: Added systemd .service file in order to help distributions integrate bitcoind
+- `0a0878d` doc: Add new DNSseed policy
+- `2887bff` Update coding style and add .clang-format
+- `5cbda4f` Changed LevelDB cursors to use scoped pointers to ensure destruction when going out of scope
+- `b4a72a7` contrib/linearize: split output files based on new-timestamp-year or max-file-size
+- `e982b57` Use explicit fflush() instead of setvbuf()
+- `234bfbf` contrib: Add init scripts and docs for Upstart and OpenRC
+- `01c2807` Add warning about the merkle-tree algorithm duplicate txid flaw
+- `d6712db` Also create pid file in non-daemon mode
+- `772ab0e` contrib: use batched JSON-RPC in linarize-hashes (optimization)
+- `7ab4358` Update bash-completion for v0.10
+- `6e6a36c` contrib: show pull # in prompt for github-merge script
+- `5b9f842` Upgrade leveldb to 1.18, make chainstate databases compatible between ARM and x86 (issue #2293)
+- `4e7c219` Catch UTXO set read errors and shutdown
+- `867c600` Catch LevelDB errors during flush
+- `06ca065` Fix CScriptID(const CScript& in) in empty script case
+
+Credits
+=======
+
+Thanks to everyone who contributed to this release:
+
+- 21E14
+- Adam Weiss
+- Aitor Pazos
+- Alexander Jeng
+- Alex Morcos
+- Alon Muroch
+- Andreas Schildbach
+- Andrew Poelstra
+- Andy Alness
+- Ashley Holman
+- Benedict Chan
+- Ben Holden-Crowther
+- Bryan Bishop
+- BtcDrak
+- Christian von Roques
+- Clinton Christian
+- Cory Fields
+- Cozz Lovan
+- daniel
+- Daniel Kraft
+- David Hill
+- Derek701
+- dexX7
+- dllud
+- Dominyk Tiller
+- Doug
+- elichai
+- elkingtowa
+- ENikS
+- Eric Shaw
+- Federico Bond
+- Francis GASCHET
+- Gavin Andresen
+- Giuseppe Mazzotta
+- Glenn Willen
+- Gregory Maxwell
+- gubatron
+- HarryWu
+- himynameismartin
+- Huang Le
+- Ian Carroll
+- imharrywu
+- Jameson Lopp
+- Janusz Lenar
+- JaSK
+- Jeff Garzik
+- JL2035
+- Johnathan Corgan
+- Jonas Schnelli
+- jtimon
+- Julian Haight
+- Kamil Domanski
+- kazcw
+- kevin
+- kiwigb
+- Kosta Zertsekel
+- LongShao007
+- Luke Dashjr
+- Mark Friedenbach
+- Mathy Vanvoorden
+- Matt Corallo
+- Matthew Bogosian
+- Micha
+- Michael Ford
+- Mike Hearn
+- mrbandrews
+- mruddy
+- ntrgn
+- Otto Allmendinger
+- paveljanik
+- Pavel Vasin
+- Peter Todd
+- phantomcircuit
+- Philip Kaufmann
+- Pieter Wuille
+- pryds
+- randy-waterhouse
+- R E Broadley
+- Rose Toomey
+- Ross Nicoll
+- Roy Badami
+- Ruben Dario Ponticelli
+- Rune K. Svendsen
+- Ryan X. Charles
+- Saivann
+- sandakersmann
+- SergioDemianLerner
+- shshshsh
+- sinetek
+- Stuart Cardall
+- Suhas Daftuar
+- Tawanda Kembo
+- Teran McKinney
+- tm314159
+- Tom Harding
+- Trevin Hofmann
+- Whit J
+- Wladimir J. van der Laan
+- Yoichi Hirai
+- Zak Wilcox
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
+

From bf1cc803729cf63c74467b6ec8dd236274be70bb Mon Sep 17 00:00:00 2001
From: "David A. Harding" <dave@dtrt.org>
Date: Thu, 2 Apr 2015 10:34:26 -0400
Subject: [PATCH 1300/1819] Docs: Use new Bitcoin.org download URLs

To give the torrents (which use web seeds) better names, we updated the
URL scheme on bitcoin.org/bin. This updates the release notes and
release doc accordingly, plus updates some other details based on recent
changes to the site.

[skip ci]
---
 doc/release-notes.md   |  4 ++--
 doc/release-process.md | 17 ++++++++++++-----
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index f30436fd8d8a..3f1c9669c3ba 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,6 +1,6 @@
 Bitcoin Core version 0.10.1 is now available from:
 
-  https://bitcoin.org/bin/0.10.1/
+  <https://bitcoin.org/bin/bitcoin-core-0.10.1/>
 
 This is a new minor version release, bringing bug fixes and translation 
 updates. If you are using 0.10.0, it is recommended to upgrade to this
@@ -8,7 +8,7 @@ version.
 
 Please report bugs using the issue tracker at github:
 
-  https://github.com/bitcoin/bitcoin/issues
+  <https://github.com/bitcoin/bitcoin/issues>
 
 Upgrading and downgrading
 =========================
diff --git a/doc/release-process.md b/doc/release-process.md
index eb2eb619bd75..8c90243d77ed 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -132,15 +132,22 @@ rm SHA256SUMS
 (the digest algorithm is forced to sha256 to avoid confusion of the `Hash:` header that GPG adds with the SHA256 used for the files)
 
 - Upload zips and installers, as well as `SHA256SUMS.asc` from last step, to the bitcoin.org server
+  into `/var/www/bin/bitcoin-core-${VERSION}`
 
 - Update bitcoin.org version
 
-  - Make a pull request to add a file named `YYYY-MM-DD-vX.Y.Z.md` with the release notes
-  to https://github.com/bitcoin/bitcoin.org/tree/master/_releases
-   ([Example for 0.9.2.1](https://raw.githubusercontent.com/bitcoin/bitcoin.org/master/_releases/2014-06-19-v0.9.2.1.md)).
+  - First, check to see if the Bitcoin.org maintainers have prepared a
+    release: https://github.com/bitcoin/bitcoin.org/labels/Releases
 
-  - After the pull request is merged, the website will automatically show the newest version, as well
-    as update the OS download links. Ping Saivann in case anything goes wrong
+      - If they have, it will have previously failed their Travis CI
+        checks because the final release files weren't uploaded.
+        Trigger a Travis CI rebuild---if it passes, merge.
+
+  - If they have not prepared a release, follow the Bitcoin.org release
+    instructions: https://github.com/bitcoin/bitcoin.org#release-notes
+
+  - After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
+    as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
 
 - Announce the release:
 

From df12ef860109115d6eba83f57df3cb41f911f7a7 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 4 Apr 2015 23:00:03 +0300
Subject: [PATCH 1301/1819] move x11 algos to crypto/

---
 src/Makefile.am                 | 53 ++++++++++++++++-----------------
 src/{ => crypto}/aes_helper.c   |  0
 src/{ => crypto}/blake.c        |  0
 src/{ => crypto}/bmw.c          |  0
 src/{ => crypto}/cubehash.c     |  0
 src/{ => crypto}/echo.c         |  0
 src/{ => crypto}/groestl.c      |  0
 src/{ => crypto}/jh.c           |  0
 src/{ => crypto}/keccak.c       |  0
 src/{ => crypto}/luffa.c        |  0
 src/{ => crypto}/shavite.c      |  0
 src/{ => crypto}/simd.c         |  0
 src/{ => crypto}/skein.c        |  0
 src/{ => crypto}/sph_blake.h    |  0
 src/{ => crypto}/sph_bmw.h      |  0
 src/{ => crypto}/sph_cubehash.h |  0
 src/{ => crypto}/sph_echo.h     |  0
 src/{ => crypto}/sph_groestl.h  |  0
 src/{ => crypto}/sph_jh.h       |  0
 src/{ => crypto}/sph_keccak.h   |  0
 src/{ => crypto}/sph_luffa.h    |  0
 src/{ => crypto}/sph_shavite.h  |  0
 src/{ => crypto}/sph_simd.h     |  0
 src/{ => crypto}/sph_skein.h    |  0
 src/{ => crypto}/sph_types.h    |  0
 src/hash.h                      | 24 +++++++--------
 26 files changed, 38 insertions(+), 39 deletions(-)
 rename src/{ => crypto}/aes_helper.c (100%)
 rename src/{ => crypto}/blake.c (100%)
 rename src/{ => crypto}/bmw.c (100%)
 rename src/{ => crypto}/cubehash.c (100%)
 rename src/{ => crypto}/echo.c (100%)
 rename src/{ => crypto}/groestl.c (100%)
 rename src/{ => crypto}/jh.c (100%)
 rename src/{ => crypto}/keccak.c (100%)
 rename src/{ => crypto}/luffa.c (100%)
 rename src/{ => crypto}/shavite.c (100%)
 rename src/{ => crypto}/simd.c (100%)
 rename src/{ => crypto}/skein.c (100%)
 rename src/{ => crypto}/sph_blake.h (100%)
 rename src/{ => crypto}/sph_bmw.h (100%)
 rename src/{ => crypto}/sph_cubehash.h (100%)
 rename src/{ => crypto}/sph_echo.h (100%)
 rename src/{ => crypto}/sph_groestl.h (100%)
 rename src/{ => crypto}/sph_jh.h (100%)
 rename src/{ => crypto}/sph_keccak.h (100%)
 rename src/{ => crypto}/sph_luffa.h (100%)
 rename src/{ => crypto}/sph_shavite.h (100%)
 rename src/{ => crypto}/sph_simd.h (100%)
 rename src/{ => crypto}/sph_skein.h (100%)
 rename src/{ => crypto}/sph_types.h (100%)

diff --git a/src/Makefile.am b/src/Makefile.am
index 8eaf95f019e7..12471a9a11db 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -130,18 +130,6 @@ BITCOIN_CORE_H = \
   script/standard.h \
   script/script_error.h \
   serialize.h \
-  sph_blake.h \
-  sph_bmw.h \
-  sph_cubehash.h \
-  sph_echo.h \
-  sph_groestl.h \
-  sph_jh.h \
-  sph_keccak.h \
-  sph_luffa.h \
-  sph_shavite.h \
-  sph_simd.h \
-  sph_skein.h \
-  sph_types.h \
   spork.h \
   streams.h \
   sync.h \
@@ -228,22 +216,20 @@ libbitcoin_wallet_a_SOURCES = \
   $(BITCOIN_CORE_H)
 
 # crypto primitives library
-# ***TODO*** move X11 to crypto/
 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
 crypto_libbitcoin_crypto_a_SOURCES = \
-  aes_helper.c \
-  luffa.c \
-  groestl.c \
-  jh.c \
-  echo.c \
-  shavite.c \
-  keccak.c \
-  skein.c \
-  spork.cpp \
-  bmw.c \
-  simd.c \
-  cubehash.c \
-  blake.c \
+  crypto/aes_helper.c \
+  crypto/luffa.c \
+  crypto/groestl.c \
+  crypto/jh.c \
+  crypto/echo.c \
+  crypto/shavite.c \
+  crypto/keccak.c \
+  crypto/skein.c \
+  crypto/bmw.c \
+  crypto/simd.c \
+  crypto/cubehash.c \
+  crypto/blake.c \
   crypto/sha1.cpp \
   crypto/sha256.cpp \
   crypto/sha512.cpp \
@@ -258,7 +244,19 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/rfc6979_hmac_sha256.h \
   crypto/hmac_sha512.h \
   crypto/sha1.h \
-  crypto/ripemd160.h
+  crypto/ripemd160.h \
+  crypto/sph_blake.h \
+  crypto/sph_bmw.h \
+  crypto/sph_cubehash.h \
+  crypto/sph_echo.h \
+  crypto/sph_groestl.h \
+  crypto/sph_jh.h \
+  crypto/sph_keccak.h \
+  crypto/sph_luffa.h \
+  crypto/sph_shavite.h \
+  crypto/sph_simd.h \
+  crypto/sph_skein.h \
+  crypto/sph_types.h
 
 # univalue JSON library
 univalue_libbitcoin_univalue_a_SOURCES = \
@@ -302,6 +300,7 @@ libbitcoin_common_a_SOURCES = \
   script/sign.cpp \
   script/standard.cpp \
   script/script_error.cpp \
+  spork.cpp \
   $(BITCOIN_CORE_H)
 
 # util: shared between all executables.
diff --git a/src/aes_helper.c b/src/crypto/aes_helper.c
similarity index 100%
rename from src/aes_helper.c
rename to src/crypto/aes_helper.c
diff --git a/src/blake.c b/src/crypto/blake.c
similarity index 100%
rename from src/blake.c
rename to src/crypto/blake.c
diff --git a/src/bmw.c b/src/crypto/bmw.c
similarity index 100%
rename from src/bmw.c
rename to src/crypto/bmw.c
diff --git a/src/cubehash.c b/src/crypto/cubehash.c
similarity index 100%
rename from src/cubehash.c
rename to src/crypto/cubehash.c
diff --git a/src/echo.c b/src/crypto/echo.c
similarity index 100%
rename from src/echo.c
rename to src/crypto/echo.c
diff --git a/src/groestl.c b/src/crypto/groestl.c
similarity index 100%
rename from src/groestl.c
rename to src/crypto/groestl.c
diff --git a/src/jh.c b/src/crypto/jh.c
similarity index 100%
rename from src/jh.c
rename to src/crypto/jh.c
diff --git a/src/keccak.c b/src/crypto/keccak.c
similarity index 100%
rename from src/keccak.c
rename to src/crypto/keccak.c
diff --git a/src/luffa.c b/src/crypto/luffa.c
similarity index 100%
rename from src/luffa.c
rename to src/crypto/luffa.c
diff --git a/src/shavite.c b/src/crypto/shavite.c
similarity index 100%
rename from src/shavite.c
rename to src/crypto/shavite.c
diff --git a/src/simd.c b/src/crypto/simd.c
similarity index 100%
rename from src/simd.c
rename to src/crypto/simd.c
diff --git a/src/skein.c b/src/crypto/skein.c
similarity index 100%
rename from src/skein.c
rename to src/crypto/skein.c
diff --git a/src/sph_blake.h b/src/crypto/sph_blake.h
similarity index 100%
rename from src/sph_blake.h
rename to src/crypto/sph_blake.h
diff --git a/src/sph_bmw.h b/src/crypto/sph_bmw.h
similarity index 100%
rename from src/sph_bmw.h
rename to src/crypto/sph_bmw.h
diff --git a/src/sph_cubehash.h b/src/crypto/sph_cubehash.h
similarity index 100%
rename from src/sph_cubehash.h
rename to src/crypto/sph_cubehash.h
diff --git a/src/sph_echo.h b/src/crypto/sph_echo.h
similarity index 100%
rename from src/sph_echo.h
rename to src/crypto/sph_echo.h
diff --git a/src/sph_groestl.h b/src/crypto/sph_groestl.h
similarity index 100%
rename from src/sph_groestl.h
rename to src/crypto/sph_groestl.h
diff --git a/src/sph_jh.h b/src/crypto/sph_jh.h
similarity index 100%
rename from src/sph_jh.h
rename to src/crypto/sph_jh.h
diff --git a/src/sph_keccak.h b/src/crypto/sph_keccak.h
similarity index 100%
rename from src/sph_keccak.h
rename to src/crypto/sph_keccak.h
diff --git a/src/sph_luffa.h b/src/crypto/sph_luffa.h
similarity index 100%
rename from src/sph_luffa.h
rename to src/crypto/sph_luffa.h
diff --git a/src/sph_shavite.h b/src/crypto/sph_shavite.h
similarity index 100%
rename from src/sph_shavite.h
rename to src/crypto/sph_shavite.h
diff --git a/src/sph_simd.h b/src/crypto/sph_simd.h
similarity index 100%
rename from src/sph_simd.h
rename to src/crypto/sph_simd.h
diff --git a/src/sph_skein.h b/src/crypto/sph_skein.h
similarity index 100%
rename from src/sph_skein.h
rename to src/crypto/sph_skein.h
diff --git a/src/sph_types.h b/src/crypto/sph_types.h
similarity index 100%
rename from src/sph_types.h
rename to src/crypto/sph_types.h
diff --git a/src/hash.h b/src/hash.h
index b59ac3ebf767..b65c61fdf7bc 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -13,17 +13,17 @@
 #include "uint256.h"
 #include "version.h"
 
-#include "sph_blake.h"
-#include "sph_bmw.h"
-#include "sph_groestl.h"
-#include "sph_jh.h"
-#include "sph_keccak.h"
-#include "sph_skein.h"
-#include "sph_luffa.h"
-#include "sph_cubehash.h"
-#include "sph_shavite.h"
-#include "sph_simd.h"
-#include "sph_echo.h"
+#include "crypto/sph_blake.h"
+#include "crypto/sph_bmw.h"
+#include "crypto/sph_groestl.h"
+#include "crypto/sph_jh.h"
+#include "crypto/sph_keccak.h"
+#include "crypto/sph_skein.h"
+#include "crypto/sph_luffa.h"
+#include "crypto/sph_cubehash.h"
+#include "crypto/sph_shavite.h"
+#include "crypto/sph_simd.h"
+#include "crypto/sph_echo.h"
 
 #include <vector>
 
@@ -236,7 +236,7 @@ inline uint256 HashX11(const T1 pbegin, const T1 pend)
     sph_echo512_context      ctx_echo;
     static unsigned char pblank[1];
 
-    uint512 hash[17]; /* @TODO uint512 not declared */
+    uint512 hash[11];
 
     sph_blake512_init(&ctx_blake);
     sph_blake512 (&ctx_blake, (pbegin == pend ? pblank : static_cast<const void*>(&pbegin[0])), (pend - pbegin) * sizeof(pbegin[0]));

From 4a325e7ebe559fcfe11d471d3d21c9bbb934d543 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 01:56:29 +0300
Subject: [PATCH 1302/1819] fix CreateNewBlock

---
 src/miner.cpp              |  5 ---
 src/test/test_darkcoin.cpp | 92 --------------------------------------
 2 files changed, 97 deletions(-)
 delete mode 100644 src/test/test_darkcoin.cpp

diff --git a/src/miner.cpp b/src/miner.cpp
index 08ca882f95cb..407c48a1f06d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -111,11 +111,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     txNew.vout.resize(1);
     txNew.vout[0].scriptPubKey = scriptPubKeyIn;
 
-    // Add dummy coinbase tx as first transaction
-    pblock->vtx.push_back(CTransaction());
-    pblocktemplate->vTxFees.push_back(-1); // updated at end
-    pblocktemplate->vTxSigOps.push_back(-1); // updated at end
-
     // Largest block you're willing to create:
     unsigned int nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
     // Limit to betweeen 1K and MAX_BLOCK_SIZE-1K for sanity:
diff --git a/src/test/test_darkcoin.cpp b/src/test/test_darkcoin.cpp
deleted file mode 100644
index 883c1a316132..000000000000
--- a/src/test/test_darkcoin.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2011-2013 The Bitcoin Core developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#define BOOST_TEST_MODULE Bitcoin Test Suite
-
-#include "main.h"
-#include "random.h"
-#include "txdb.h"
-#include "ui_interface.h"
-#include "util.h"
-#include "activemasternode.h"
-#ifdef ENABLE_WALLET
-#include "db.h"
-#include "wallet.h"
-#endif
-
-#include <boost/filesystem.hpp>
-#include <boost/test/unit_test.hpp>
-#include <boost/thread.hpp>
-
-CClientUIInterface uiInterface;
-CWallet* pwalletMain;
-
-extern bool fPrintToConsole;
-extern void noui_connect();
-
-struct TestingSetup {
-    CCoinsViewDB *pcoinsdbview;
-    boost::filesystem::path pathTemp;
-    boost::thread_group threadGroup;
-
-    TestingSetup() {
-        fPrintToDebugLog = false; // don't want to write to debug.log file
-        SelectParams(CBaseChainParams::UNITTEST);
-        noui_connect();
-#ifdef ENABLE_WALLET
-        bitdb.MakeMock();
-#endif
-        pathTemp = GetTempPath() / strprintf("test_dash_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
-        boost::filesystem::create_directories(pathTemp);
-        mapArgs["-datadir"] = pathTemp.string();
-        pblocktree = new CBlockTreeDB(1 << 20, true);
-        pcoinsdbview = new CCoinsViewDB(1 << 23, true);
-        pcoinsTip = new CCoinsViewCache(pcoinsdbview);
-        InitBlockIndex();
-#ifdef ENABLE_WALLET
-        bool fFirstRun;
-        pwalletMain = new CWallet("wallet.dat");
-        pwalletMain->LoadWallet(fFirstRun);
-        RegisterValidationInterface(pwalletMain);
-#endif
-        nScriptCheckThreads = 3;
-        for (int i=0; i < nScriptCheckThreads-1; i++)
-            threadGroup.create_thread(&ThreadScriptCheck);
-        RegisterNodeSignals(GetNodeSignals());
-    }
-    ~TestingSetup()
-    {
-        threadGroup.interrupt_all();
-        threadGroup.join_all();
-        UnregisterNodeSignals(GetNodeSignals());
-#ifdef ENABLE_WALLET
-        delete pwalletMain;
-        pwalletMain = NULL;
-#endif
-        delete pcoinsTip;
-        delete pcoinsdbview;
-        delete pblocktree;
-#ifdef ENABLE_WALLET
-        bitdb.Flush(true);
-#endif
-        boost::filesystem::remove_all(pathTemp);
-    }
-};
-
-BOOST_GLOBAL_FIXTURE(TestingSetup);
-
-void Shutdown(void* parg)
-{
-  exit(0);
-}
-
-void StartShutdown()
-{
-  exit(0);
-}
-
-bool ShutdownRequested()
-{
-  return false;
-}

From 3f3b6bb3cb70515b24d62ae3909d0ea7f23723b1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 01:57:25 +0300
Subject: [PATCH 1303/1819] rpc fixes

---
 src/rpcclient.cpp | 3 +++
 src/rpcmining.cpp | 3 +--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 5c91131d2af4..692f6b49830d 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -55,6 +55,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listaccounts", 0 },
     { "listaccounts", 1 },
     { "walletpassphrase", 1 },
+    { "walletpassphrase", 2 },
     { "getblocktemplate", 0 },
     { "listsinceblock", 1 },
     { "listsinceblock", 2 },
@@ -68,6 +69,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "listunspent", 1 },
     { "listunspent", 2 },
     { "getblock", 1 },
+    { "getblockheader", 1 },
     { "gettransaction", 1 },
     { "getrawtransaction", 1 },
     { "createrawtransaction", 0 },
@@ -89,6 +91,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "estimatepriority", 0 },
     { "prioritisetransaction", 1 },
     { "prioritisetransaction", 2 },
+    { "spork", 1 },
 };
 
 class CRPCConvertTable
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index ab17c5d5e33f..3ac8be720d32 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -591,8 +591,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
     result.push_back(Pair("previousblockhash", pblock->hashPrevBlock.GetHex()));
     result.push_back(Pair("transactions", transactions));
     result.push_back(Pair("coinbaseaux", aux));
-    result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].GetValueOut())); // ***TODO***
-    result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].vout[0].nValue));
+    result.push_back(Pair("coinbasevalue", (int64_t)pblock->vtx[0].GetValueOut()));
     result.push_back(Pair("longpollid", chainActive.Tip()->GetBlockHash().GetHex() + i64tostr(nTransactionsUpdatedLast)));
     result.push_back(Pair("target", hashTarget.GetHex()));
     result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1));

From e54c11aabb043ea65dba3ab5af6ef191e4b6d827 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 01:58:10 +0300
Subject: [PATCH 1304/1819] tests should compile now

---
 src/test/test_dash.cpp | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/test/test_dash.cpp b/src/test/test_dash.cpp
index 706d6d811d21..c5972c1e42bc 100644
--- a/src/test/test_dash.cpp
+++ b/src/test/test_dash.cpp
@@ -4,13 +4,11 @@
 
 #define BOOST_TEST_MODULE Bitcoin Test Suite
 
-
-
 #include "main.h"
+#include "random.h"
 #include "txdb.h"
 #include "ui_interface.h"
 #include "util.h"
-#include "activemasternode.h"
 #ifdef ENABLE_WALLET
 #include "db.h"
 #include "wallet.h"
@@ -18,8 +16,9 @@
 
 #include <boost/filesystem.hpp>
 #include <boost/test/unit_test.hpp>
+#include <boost/thread.hpp>
 
-
+CClientUIInterface uiInterface;
 CWallet* pwalletMain;
 
 extern bool fPrintToConsole;
@@ -32,6 +31,7 @@ struct TestingSetup {
 
     TestingSetup() {
         fPrintToDebugLog = false; // don't want to write to debug.log file
+        SelectParams(CBaseChainParams::UNITTEST);
         noui_connect();
 #ifdef ENABLE_WALLET
         bitdb.MakeMock();
@@ -41,13 +41,13 @@ struct TestingSetup {
         mapArgs["-datadir"] = pathTemp.string();
         pblocktree = new CBlockTreeDB(1 << 20, true);
         pcoinsdbview = new CCoinsViewDB(1 << 23, true);
-        pcoinsTip = new CCoinsViewCache(*pcoinsdbview);
+        pcoinsTip = new CCoinsViewCache(pcoinsdbview);
         InitBlockIndex();
 #ifdef ENABLE_WALLET
         bool fFirstRun;
         pwalletMain = new CWallet("wallet.dat");
         pwalletMain->LoadWallet(fFirstRun);
-        RegisterWallet(pwalletMain);
+        RegisterValidationInterface(pwalletMain);
 #endif
         nScriptCheckThreads = 3;
         for (int i=0; i < nScriptCheckThreads-1; i++)
@@ -89,4 +89,3 @@ bool ShutdownRequested()
 {
   return false;
 }
-

From b9d826a21375dd1bdaab353560a8e2267a746860 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 01:58:51 +0300
Subject: [PATCH 1305/1819] cleanup

---
 src/util.h     | 54 --------------------------------------------------
 src/wallet.cpp | 17 ----------------
 src/wallet.h   |  2 --
 3 files changed, 73 deletions(-)

diff --git a/src/util.h b/src/util.h
index cc58818f75c7..1a5adaecafdc 100644
--- a/src/util.h
+++ b/src/util.h
@@ -28,60 +28,6 @@
 #include <boost/filesystem/path.hpp>
 #include <boost/thread/exceptions.hpp>
 
-// ***TODO*** clean this
-//#define BEGIN(a)            ((char*)&(a))
-//#define END(a)              ((char*)&((&(a))[1]))
-//#define UBEGIN(a)           ((unsigned char*)&(a))
-//#define UEND(a)             ((unsigned char*)&((&(a))[1]))
-//#define ARRAYLEN(array)     (sizeof(array)/sizeof((array)[0]))
-
-//// This is needed because the foreach macro can't get over the comma in pair<t1, t2>
-//#define PAIRTYPE(t1, t2)    std::pair<t1, t2>
-
-//// Align by increasing pointer, must have extra space at end of buffer
-//template <size_t nBytes, typename T>
-//T* alignup(T* p)
-//{
-//    union
-//    {
-//        T* ptr;
-//        size_t n;
-//    } u;
-//    u.ptr = p;
-//    u.n = (u.n + (nBytes-1)) & ~(nBytes-1);
-//    return u.ptr;
-//}
-
-//#ifdef WIN32
-//#define MSG_DONTWAIT        0
-
-//#ifndef S_IRUSR
-//#define S_IRUSR             0400
-//#define S_IWUSR             0200
-//#endif
-//#else
-//#define MAX_PATH            1024
-//#endif
-//// As Solaris does not have the MSG_NOSIGNAL flag for send(2) syscall, it is defined as 0
-//#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
-//#define MSG_NOSIGNAL 0
-//#endif
-
-//inline void MilliSleep(int64_t n)
-//{
-//// Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
-//// until fixed in 1.52. Use the deprecated sleep method for the broken case.
-//// See: https://svn.boost.org/trac/boost/ticket/7238
-//#if defined(HAVE_WORKING_BOOST_SLEEP_FOR)
-//    boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
-//#elif defined(HAVE_WORKING_BOOST_SLEEP)
-//    boost::this_thread::sleep(boost::posix_time::milliseconds(n));
-//#else
-////should never get here
-//#error missing boost sleep implementation
-//#endif
-//}
-
 //Dash only features
 
 extern bool fMasterNode;
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 73397f591cc4..dd9c96f6870e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2237,23 +2237,6 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
     return nFeeNeeded;
 }
 
-
-//  ***TODO*** this was removed
-//string CWallet::SendMoneyToDestination(const CTxDestination& address, int64_t nValue, CWalletTx& wtxNew, AvailableCoinsType coin_type)
-//{
-//    // Check amount
-//    if (nValue <= 0)
-//        return _("Invalid amount");
-//    if (nValue + nTransactionFee > GetBalance())
-//        return _("Insufficient funds");
-
-//    // Parse Dash address
-//    CScript scriptPubKey;
-//    scriptPubKey = GetScriptForDestination(address);
-
-//    return SendMoney(scriptPubKey, nValue, wtxNew, coin_type);
-//}
-
 int64_t CWallet::GetTotalValue(std::vector<CTxIn> vCoins) {
     int64_t nTotalValue = 0;
     CWalletTx wtx;
diff --git a/src/wallet.h b/src/wallet.h
index 7ddb350fe75a..e12a81dc329b 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -322,8 +322,6 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
                            CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand="tx");
-//    std::string SendMoney(CScript scriptPubKey, int64_t nValue, CWalletTx& wtxNew, AvailableCoinsType coin_type=ALL_COINS); // ***TODO*** was removed
-//    std::string SendMoneyToDestination(const CTxDestination &address, int64_t nValue, CWalletTx& wtxNew, AvailableCoinsType coin_type=ALL_COINS); // ***TODO*** was removed
     std::string PrepareDarksendDenominate(int minRounds, int maxRounds);
     int GenerateDarksendOutputs(int nTotalValue, std::vector<CTxOut>& vout);
     bool CreateCollateralTransaction(CMutableTransaction &txCollateral, std::string strReason);

From 4c129040feba0634c9eba5689dc133ad6078da92 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 02:25:08 +0300
Subject: [PATCH 1306/1819] fix unit icons (ugly but works, need to repaint
 however)

---
 src/Makefile.qt.include         |   7 ++++---
 src/qt/bitcoinunits.cpp         |  34 ++++++--------------------------
 src/qt/dash.qrc                 |   7 ++++---
 src/qt/res/icons/dash.icns      | Bin 182906 -> 0 bytes
 src/qt/res/icons/unit_btc.png   | Bin 2107 -> 0 bytes
 src/qt/res/icons/unit_dash.png  | Bin 0 -> 442 bytes
 src/qt/res/icons/unit_duffs.png | Bin 0 -> 369 bytes
 src/qt/res/icons/unit_mbtc.png  | Bin 2107 -> 0 bytes
 src/qt/res/icons/unit_mdash.png | Bin 0 -> 429 bytes
 src/qt/res/icons/unit_ubtc.png  | Bin 2107 -> 0 bytes
 src/qt/res/icons/unit_udash.png | Bin 0 -> 417 bytes
 11 files changed, 14 insertions(+), 34 deletions(-)
 delete mode 100755 src/qt/res/icons/dash.icns
 delete mode 100644 src/qt/res/icons/unit_btc.png
 create mode 100644 src/qt/res/icons/unit_dash.png
 create mode 100644 src/qt/res/icons/unit_duffs.png
 delete mode 100644 src/qt/res/icons/unit_mbtc.png
 create mode 100644 src/qt/res/icons/unit_mdash.png
 delete mode 100644 src/qt/res/icons/unit_ubtc.png
 create mode 100644 src/qt/res/icons/unit_udash.png

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 826ff1c79b4f..52619bfe713b 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -213,9 +213,10 @@ RES_ICONS = \
   qt/res/icons/tx_input.png \
   qt/res/icons/tx_output.png \
   qt/res/icons/tx_mined.png \
-  qt/res/icons/unit_btc.png \
-  qt/res/icons/unit_mbtc.png \
-  qt/res/icons/unit_ubtc.png
+  qt/res/icons/unit_dash.png \
+  qt/res/icons/unit_mdash.png \
+  qt/res/icons/unit_udash.png \
+  qt/res/icons/unit_duffs.png
 
 BITCOIN_QT_CPP = \
   qt/bitcoinaddressvalidator.cpp \
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 689603ba8a7e..88744756a65a 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -41,35 +41,13 @@ bool BitcoinUnits::valid(int unit)
 
 QString BitcoinUnits::id(int unit)
 {
-//    switch(unit)
-//    {
-//    case BTC: return QString("btc");
-//    case mBTC: return QString("mbtc");
-//    case uBTC: return QString("ubtc");
-//    default: return QString("???");
-//    }
-    // ***TODO*** create icons unit_<unit>.png
-    if(Params().NetworkID() == CBaseChainParams::MAIN)
-    {
-        switch(unit)
-        {
-            case DASH: return QString("dash");
-            case mDASH: return QString("mdash");
-            case uDASH: return QString::fromUtf8("udash");
-            case duffs: return QString("duffs");
-            default: return QString("???");
-        }
-    }
-    else
+    switch(unit)
     {
-        switch(unit)
-        {
-            case DASH: return QString("tdash");
-            case mDASH: return QString("mtdash");
-            case uDASH: return QString::fromUtf8("utdash");
-            case duffs: return QString("tduffs");
-            default: return QString("???");
-        }
+        case DASH: return QString("dash");
+        case mDASH: return QString("mdash");
+        case uDASH: return QString::fromUtf8("udash");
+        case duffs: return QString("duffs");
+        default: return QString("???");
     }
 }
 
diff --git a/src/qt/dash.qrc b/src/qt/dash.qrc
index bbb9c5ab5958..f7eb04952d4f 100755
--- a/src/qt/dash.qrc
+++ b/src/qt/dash.qrc
@@ -36,9 +36,10 @@
         <file alias="tx_input">res/icons/tx_input.png</file>
         <file alias="tx_output">res/icons/tx_output.png</file>
         <file alias="tx_inout">res/icons/tx_inout.png</file>
-        <file alias="unit_btc">res/icons/unit_btc.png</file>
-        <file alias="unit_mbtc">res/icons/unit_mbtc.png</file>
-        <file alias="unit_ubtc">res/icons/unit_ubtc.png</file>
+        <file alias="unit_dash">res/icons/unit_dash.png</file>
+        <file alias="unit_mdash">res/icons/unit_mdash.png</file>
+        <file alias="unit_udash">res/icons/unit_udash.png</file>
+        <file alias="unit_duffs">res/icons/unit_duffs.png</file>
         <file alias="lock_closed">res/icons/lock_closed.png</file>
         <file alias="lock_open">res/icons/lock_open.png</file>
         <file alias="key">res/icons/key.png</file>
diff --git a/src/qt/res/icons/dash.icns b/src/qt/res/icons/dash.icns
deleted file mode 100755
index 46540f7d501b922ddf0174b7e9b9999c2bc385af..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/src/qt/res/icons/unit_btc.png b/src/qt/res/icons/unit_btc.png
deleted file mode 100644
index ec3497435c9bd96caa594d5fa007a80efda05a04..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/src/qt/res/icons/unit_dash.png b/src/qt/res/icons/unit_dash.png
new file mode 100644
index 0000000000000000000000000000000000000000..8160c8245f86362e5823c00c80f362f4543ba5cd
GIT binary patch
diff --git a/src/qt/res/icons/unit_duffs.png b/src/qt/res/icons/unit_duffs.png
new file mode 100644
index 0000000000000000000000000000000000000000..5d16827d06e05fdbba500dc2cbc422eeb86ce52f
GIT binary patch
diff --git a/src/qt/res/icons/unit_mbtc.png b/src/qt/res/icons/unit_mbtc.png
deleted file mode 100644
index 32bf2f2ca05a4768fc8e280a1e4620e3daf42538..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/src/qt/res/icons/unit_mdash.png b/src/qt/res/icons/unit_mdash.png
new file mode 100644
index 0000000000000000000000000000000000000000..a89b33981bd71d08a4bbd96abf7359af23c3440c
GIT binary patch
diff --git a/src/qt/res/icons/unit_ubtc.png b/src/qt/res/icons/unit_ubtc.png
deleted file mode 100644
index d5a154882b66ec85df4e7fa6a05d5e074bbdb4ff..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/src/qt/res/icons/unit_udash.png b/src/qt/res/icons/unit_udash.png
new file mode 100644
index 0000000000000000000000000000000000000000..c6168459350f0869a1fe29c9ca60087dce0493ee
GIT binary patch

From f08ddc5eea778da5ace856b8aad7f89d4ff181fa Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 02:45:17 +0300
Subject: [PATCH 1307/1819] fix DSdenom/watchonly

---
 src/qt/transactionrecord.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index a382abd55ac2..968391a73635 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -109,9 +109,8 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
         }
 
         if(fAllFromMeDenom && fAllToMeDenom && nFromMe * nToMe) {
-            TransactionRecord sub(hash, nTime);
-            sub.type = TransactionRecord::DarksendDenominate;
-            parts.append(TransactionRecord(hash, nTime, sub.type, "", -nDebit, nCredit));
+            parts.append(TransactionRecord(hash, nTime, TransactionRecord::DarksendDenominate, "", -nDebit, nCredit));
+            parts.last().involvesWatchAddress = false;   // maybe pass to TransactionRecord as constructor argument
         }
         else if (fAllFromMe && fAllToMe)
         {

From d5f7a89097a2cf1402eba3f0c9017f92d1673111 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 03:14:25 +0300
Subject: [PATCH 1308/1819] update .pro

---
 contrib/dash-qt.pro | 1000 ++++++++++++++++++++++++++++---------------
 1 file changed, 662 insertions(+), 338 deletions(-)

diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro
index dbcef9c200b8..c82e274cb98d 100644
--- a/contrib/dash-qt.pro
+++ b/contrib/dash-qt.pro
@@ -1,340 +1,664 @@
-# lupdate-qt4 ./dash-qt.pro -ts ../src/qt/locale/dash_en.ts
+######################################################################
+# Automatically generated by qmake (2.01a) ?? ??? 5 03:11:45 2015
+######################################################################
 
-HEADERS += \
-    ../src/activemasternode.h \
-    ../src/addrman.h \
-    ../src/alert.h \
-    ../src/allocators.h \
-    ../src/base58.h \
-    ../src/bignum.h \
-    ../src/dash-config.h \
-    ../src/bloom.h \
-    ../src/chainparams.h \
-    ../src/checkpoints.h \
-    ../src/checkqueue.h \
-    ../src/clientversion.h \
-    ../src/coincontrol.h \
-    ../src/coins.h \
-    ../src/compat.h \
-    ../src/core.h \
-    ../src/crypter.h \
-    ../src/darksend.h \
-    ../src/db.h \
-    ../src/hash.h \
-    ../src/init.h \
-    ../src/instantx.h \
-    ../src/keepass.h \
-    ../src/key.h \
-    ../src/keystore.h \
-    ../src/leveldbwrapper.h \
-    ../src/limitedmap.h \
-    ../src/main.h \
-    ../src/masternode.h \
-    ../src/masternodeconfig.h \
-    ../src/miner.h \
-    ../src/mruset.h \
-    ../src/net.h \
-    ../src/netbase.h \
-    ../src/noui.h \
-    ../src/protocol.h \
-    ../src/rpcclient.h \
-    ../src/rpcprotocol.h \
-    ../src/rpcserver.h \
-    ../src/script.h \
-    ../src/serialize.h \
-    ../src/sph_blake.h \
-    ../src/sph_bmw.h \
-    ../src/sph_cubehash.h \
-    ../src/sph_echo.h \
-    ../src/sph_groestl.h \
-    ../src/sph_jh.h \
-    ../src/sph_keccak.h \
-    ../src/sph_luffa.h \
-    ../src/sph_shavite.h \
-    ../src/sph_simd.h \
-    ../src/sph_skein.h \
-    ../src/sph_types.h \
-    ../src/sync.h \
-    ../src/threadsafety.h \
-    ../src/tinyformat.h \
-    ../src/txdb.h \
-    ../src/txmempool.h \
-    ../src/ui_interface.h \
-    ../src/uint256.h \
-    ../src/util.h \
-    ../src/version.h \
-    ../src/wallet.h \
-    ../src/walletdb.h \
-    ../src/qt/addressbookpage.h \
-    ../src/qt/addresstablemodel.h \
-    ../src/qt/askpassphrasedialog.h \
-    ../src/qt/bitcoinaddressvalidator.h \
-    ../src/qt/bitcoinamountfield.h \
-    ../src/qt/bitcoingui.h \
-    ../src/qt/bitcoinunits.h \
-    ../src/qt/clientmodel.h \
-    ../src/qt/coincontroldialog.h \
-    ../src/qt/coincontroltreewidget.h \
-    ../src/qt/csvmodelwriter.h \
-    ../src/qt/darksendconfig.h \
-    ../src/qt/editaddressdialog.h \
-    ../src/qt/guiconstants.h \
-    ../src/qt/guiutil.h \
-    ../src/qt/intro.h \
-    ../src/qt/macdockiconhandler.h \
-    ../src/qt/macnotificationhandler.h \
-    ../src/qt/monitoreddatamapper.h \
-    ../src/qt/notificator.h \
-    ../src/qt/openuridialog.h \
-    ../src/qt/optionsdialog.h \
-    ../src/qt/optionsmodel.h \
-    ../src/qt/overviewpage.h \
-    ../src/qt/paymentrequest.pb.h \
-    ../src/qt/paymentrequestplus.h \
-    ../src/qt/paymentserver.h \
-    ../src/qt/qvalidatedlineedit.h \
-    ../src/qt/qvaluecombobox.h \
-    ../src/qt/receivecoinsdialog.h \
-    ../src/qt/receiverequestdialog.h \
-    ../src/qt/recentrequeststablemodel.h \
-    ../src/qt/rpcconsole.h \
-    ../src/qt/sendcoinsdialog.h \
-    ../src/qt/sendcoinsentry.h \
-    ../src/qt/signverifymessagedialog.h \
-    ../src/qt/splashscreen.h \
-    ../src/qt/trafficgraphwidget.h \
-    ../src/qt/transactiondesc.h \
-    ../src/qt/transactiondescdialog.h \
-    ../src/qt/transactionfilterproxy.h \
-    ../src/qt/transactionrecord.h \
-    ../src/qt/transactiontablemodel.h \
-    ../src/qt/transactionview.h \
-    ../src/qt/utilitydialog.h \
-    ../src/qt/walletframe.h \
-    ../src/qt/walletmodel.h \
-    ../src/qt/walletmodeltransaction.h \
-    ../src/qt/walletview.h \
-    ../src/qt/winshutdownmonitor.h \
-    ../src/qt/test/paymentrequestdata.h \
-    ../src/qt/test/paymentservertests.h \
-    ../src/qt/test/uritests.h
+TEMPLATE = app
+TARGET = 
+DEPENDPATH += . \
+              src \
+              src/compat \
+              src/config \
+              src/crypto \
+              src/json \
+              src/obj \
+              src/primitives \
+              src/qt \
+              src/script \
+              src/test \
+              src/univalue \
+              src/leveldb/db \
+              src/leveldb/issues \
+              src/leveldb/port \
+              src/leveldb/table \
+              src/leveldb/util \
+              src/qt/forms \
+              src/qt/locale \
+              src/qt/test \
+              src/secp256k1/include \
+              src/secp256k1/src \
+              src/test/data \
+              src/leveldb/doc/bench \
+              src/leveldb/helpers/memenv \
+              src/leveldb/include/leveldb \
+              src/leveldb/port/win \
+              src/secp256k1/src/java
+INCLUDEPATH += . \
+               src \
+               src/config \
+               src/leveldb/port/win \
+               src/crypto \
+               src/primitives \
+               src/script \
+               src/univalue \
+               src/obj \
+               src/json \
+               src/compat \
+               src/secp256k1/include \
+               src/leveldb/helpers/memenv \
+               src/qt \
+               src/qt/forms \
+               src/test/data \
+               src/test \
+               src/qt/test \
+               src/secp256k1/src \
+               src/secp256k1/src/java
 
-SOURCES += \
-    ../src/activemasternode.cpp \
-    ../src/addrman.cpp \
-    ../src/aes_helper.c \
-    ../src/alert.cpp \
-    ../src/allocators.cpp \
-    ../src/base58.cpp \
-    ../src/blake.c \
-    ../src/bloom.cpp \
-    ../src/bmw.c \
-    ../src/chainparams.cpp \
-    ../src/checkpoints.cpp \
-    ../src/coins.cpp \
-    ../src/crypter.cpp \
-    ../src/cubehash.c \
-    ../src/dash-cli.cpp \
-    ../src/dashd.cpp \
-    ../src/darksend.cpp \
-    ../src/db.cpp \
-    ../src/echo.c \
-    ../src/groestl.c \
-    ../src/hash.cpp \
-    ../src/init.cpp \
-    ../src/instantx.cpp \
-    ../src/jh.c \
-    ../src/keccak.c \
-    ../src/keepass.cpp \
-    ../src/key.cpp \
-    ../src/keystore.cpp \
-    ../src/leveldbwrapper.cpp \
-    ../src/luffa.c \
-    ../src/main.cpp \
-    ../src/masternode.cpp \
-    ../src/masternodeconfig.cpp \
-    ../src/miner.cpp \
-    ../src/net.cpp \
-    ../src/netbase.cpp \
-    ../src/noui.cpp \
-    ../src/protocol.cpp \
-    ../src/rpcblockchain.cpp \
-    ../src/rpcclient.cpp \
-    ../src/rpcdarksend.cpp \
-    ../src/rpcdump.cpp \
-    ../src/rpcmining.cpp \
-    ../src/rpcmisc.cpp \
-    ../src/rpcnet.cpp \
-    ../src/rpcprotocol.cpp \
-    ../src/rpcrawtransaction.cpp \
-    ../src/rpcserver.cpp \
-    ../src/rpcwallet.cpp \
-    ../src/script.cpp \
-    ../src/shavite.c \
-    ../src/simd.c \
-    ../src/skein.c \
-    ../src/sync.cpp \
-    ../src/txdb.cpp \
-    ../src/txmempool.cpp \
-    ../src/util.cpp \
-    ../src/wallet.cpp \
-    ../src/walletdb.cpp \
-    ../src/test/Checkpoints_tests.cpp \
-    ../src/test/DoS_tests.cpp \
-    ../src/test/accounting_tests.cpp \
-    ../src/test/alert_tests.cpp \
-    ../src/test/allocator_tests.cpp \
-    ../src/test/base32_tests.cpp \
-    ../src/test/base58_tests.cpp \
-    ../src/test/base64_tests.cpp \
-    ../src/test/bignum_tests.cpp \
-    ../src/test/bip32_tests.cpp \
-    ../src/test/bloom_tests.cpp \
-    ../src/test/canonical_tests.cpp \
-    ../src/test/checkblock_tests.cpp \
-    ../src/test/compress_tests.cpp \
-    ../src/test/getarg_tests.cpp \
-    ../src/test/hash_tests.cpp \
-    ../src/test/hmac_tests.cpp \
-    ../src/test/key_tests.cpp \
-    ../src/test/main_tests.cpp \
-    ../src/test/miner_tests.cpp \
-    ../src/test/mruset_tests.cpp \
-    ../src/test/multisig_tests.cpp \
-    ../src/test/netbase_tests.cpp \
-    ../src/test/pmt_tests.cpp \
-    ../src/test/rpc_tests.cpp \
-    ../src/test/rpc_wallet_tests.cpp \
-    ../src/test/script_P2SH_tests.cpp \
-    ../src/test/script_tests.cpp \
-    ../src/test/scriptnum_tests.cpp \
-    ../src/test/serialize_tests.cpp \
-    ../src/test/sighash_tests.cpp \
-    ../src/test/sigopcount_tests.cpp \
-    ../src/test/test_dash.cpp \
-    ../src/test/transaction_tests.cpp \
-    ../src/test/uint256_tests.cpp \
-    ../src/test/util_tests.cpp \
-    ../src/test/wallet_tests.cpp \
-    ../src/qt/addressbookpage.cpp \
-    ../src/qt/addresstablemodel.cpp \
-    ../src/qt/askpassphrasedialog.cpp \
-    ../src/qt/bitcoinaddressvalidator.cpp \
-    ../src/qt/bitcoinamountfield.cpp \
-    ../src/qt/bitcoingui.cpp \
-    ../src/qt/dashstrings.cpp \
-    ../src/qt/bitcoinunits.cpp \
-    ../src/qt/clientmodel.cpp \
-    ../src/qt/coincontroldialog.cpp \
-    ../src/qt/coincontroltreewidget.cpp \
-    ../src/qt/csvmodelwriter.cpp \
-    ../src/qt/dash.cpp \
-    ../src/qt/darksendconfig.cpp \
-    ../src/qt/editaddressdialog.cpp \
-    ../src/qt/guiutil.cpp \
-    ../src/qt/intro.cpp \
-    ../src/qt/moc_addressbookpage.cpp \
-    ../src/qt/moc_addresstablemodel.cpp \
-    ../src/qt/moc_askpassphrasedialog.cpp \
-    ../src/qt/moc_bitcoinaddressvalidator.cpp \
-    ../src/qt/moc_bitcoinamountfield.cpp \
-    ../src/qt/moc_bitcoingui.cpp \
-    ../src/qt/moc_bitcoinunits.cpp \
-    ../src/qt/moc_clientmodel.cpp \
-    ../src/qt/moc_coincontroldialog.cpp \
-    ../src/qt/moc_coincontroltreewidget.cpp \
-    ../src/qt/moc_csvmodelwriter.cpp \
-    ../src/qt/moc_darksendconfig.cpp \
-    ../src/qt/moc_editaddressdialog.cpp \
-    ../src/qt/moc_guiutil.cpp \
-    ../src/qt/moc_intro.cpp \
-    ../src/qt/moc_macdockiconhandler.cpp \
-    ../src/qt/moc_macnotificationhandler.cpp \
-    ../src/qt/moc_monitoreddatamapper.cpp \
-    ../src/qt/moc_notificator.cpp \
-    ../src/qt/moc_openuridialog.cpp \
-    ../src/qt/moc_optionsdialog.cpp \
-    ../src/qt/moc_optionsmodel.cpp \
-    ../src/qt/moc_overviewpage.cpp \
-    ../src/qt/moc_paymentserver.cpp \
-    ../src/qt/moc_qvalidatedlineedit.cpp \
-    ../src/qt/moc_qvaluecombobox.cpp \
-    ../src/qt/moc_receivecoinsdialog.cpp \
-    ../src/qt/moc_receiverequestdialog.cpp \
-    ../src/qt/moc_recentrequeststablemodel.cpp \
-    ../src/qt/moc_rpcconsole.cpp \
-    ../src/qt/moc_sendcoinsdialog.cpp \
-    ../src/qt/moc_sendcoinsentry.cpp \
-    ../src/qt/moc_signverifymessagedialog.cpp \
-    ../src/qt/moc_splashscreen.cpp \
-    ../src/qt/moc_trafficgraphwidget.cpp \
-    ../src/qt/moc_transactiondesc.cpp \
-    ../src/qt/moc_transactiondescdialog.cpp \
-    ../src/qt/moc_transactionfilterproxy.cpp \
-    ../src/qt/moc_transactiontablemodel.cpp \
-    ../src/qt/moc_transactionview.cpp \
-    ../src/qt/moc_utilitydialog.cpp \
-    ../src/qt/moc_walletframe.cpp \
-    ../src/qt/moc_walletmodel.cpp \
-    ../src/qt/moc_walletview.cpp \
-    ../src/qt/monitoreddatamapper.cpp \
-    ../src/qt/notificator.cpp \
-    ../src/qt/openuridialog.cpp \
-    ../src/qt/optionsdialog.cpp \
-    ../src/qt/optionsmodel.cpp \
-    ../src/qt/overviewpage.cpp \
-    ../src/qt/paymentrequest.pb.cc \
-    ../src/qt/paymentrequestplus.cpp \
-    ../src/qt/paymentserver.cpp \
-    ../src/qt/qrc_dash.cpp \
-    ../src/qt/qvalidatedlineedit.cpp \
-    ../src/qt/qvaluecombobox.cpp \
-    ../src/qt/receivecoinsdialog.cpp \
-    ../src/qt/receiverequestdialog.cpp \
-    ../src/qt/recentrequeststablemodel.cpp \
-    ../src/qt/rpcconsole.cpp \
-    ../src/qt/sendcoinsdialog.cpp \
-    ../src/qt/sendcoinsentry.cpp \
-    ../src/qt/signverifymessagedialog.cpp \
-    ../src/qt/splashscreen.cpp \
-    ../src/qt/trafficgraphwidget.cpp \
-    ../src/qt/transactiondesc.cpp \
-    ../src/qt/transactiondescdialog.cpp \
-    ../src/qt/transactionfilterproxy.cpp \
-    ../src/qt/transactionrecord.cpp \
-    ../src/qt/transactiontablemodel.cpp \
-    ../src/qt/transactionview.cpp \
-    ../src/qt/utilitydialog.cpp \
-    ../src/qt/walletframe.cpp \
-    ../src/qt/walletmodel.cpp \
-    ../src/qt/walletmodeltransaction.cpp \
-    ../src/qt/walletview.cpp \
-    ../src/qt/winshutdownmonitor.cpp \
-    ../src/qt/test/moc_paymentservertests.cpp \
-    ../src/qt/test/moc_uritests.cpp \
-    ../src/qt/test/paymentservertests.cpp \
-    ../src/qt/test/test_main.cpp \
-    ../src/qt/test/uritests.cpp
-
-FORMS += \
-    ../src/qt/forms/aboutdialog.ui \
-    ../src/qt/forms/addressbookpage.ui \
-    ../src/qt/forms/askpassphrasedialog.ui \
-    ../src/qt/forms/coincontroldialog.ui \
-    ../src/qt/forms/darksendconfig.ui \
-    ../src/qt/forms/editaddressdialog.ui \
-    ../src/qt/forms/helpmessagedialog.ui \
-    ../src/qt/forms/intro.ui \
-    ../src/qt/forms/openuridialog.ui \
-    ../src/qt/forms/optionsdialog.ui \
-    ../src/qt/forms/overviewpage.ui \
-    ../src/qt/forms/receivecoinsdialog.ui \
-    ../src/qt/forms/receiverequestdialog.ui \
-    ../src/qt/forms/rpcconsole.ui \
-    ../src/qt/forms/sendcoinsdialog.ui \
-    ../src/qt/forms/sendcoinsentry.ui \
-    ../src/qt/forms/signverifymessagedialog.ui \
-    ../src/qt/forms/transactiondescdialog.ui
-
-RESOURCES += \
-    ../src/qt/dash.qrc
+# Input
+HEADERS += src/activemasternode.h \
+           src/addrman.h \
+           src/alert.h \
+           src/allocators.h \
+           src/amount.h \
+           src/base58.h \
+           src/bloom.h \
+           src/chain.h \
+           src/chainparams.h \
+           src/chainparamsbase.h \
+           src/chainparamsseeds.h \
+           src/checkpoints.h \
+           src/checkqueue.h \
+           src/clientversion.h \
+           src/coincontrol.h \
+           src/coins.h \
+           src/compat.h \
+           src/compressor.h \
+           src/core_io.h \
+           src/crypter.h \
+           src/darksend-relay.h \
+           src/darksend.h \
+           src/db.h \
+           src/eccryptoverify.h \
+           src/ecwrapper.h \
+           src/hash.h \
+           src/init.h \
+           src/instantx.h \
+           src/keepass.h \
+           src/key.h \
+           src/keystore.h \
+           src/leveldbwrapper.h \
+           src/limitedmap.h \
+           src/main.h \
+           src/masternode-pos.h \
+           src/masternode.h \
+           src/masternodeconfig.h \
+           src/masternodeman.h \
+           src/merkleblock.h \
+           src/miner.h \
+           src/mruset.h \
+           src/net.h \
+           src/netbase.h \
+           src/noui.h \
+           src/pow.h \
+           src/protocol.h \
+           src/pubkey.h \
+           src/random.h \
+           src/rpcclient.h \
+           src/rpcprotocol.h \
+           src/rpcserver.h \
+           src/serialize.h \
+           src/spork.h \
+           src/streams.h \
+           src/sync.h \
+           src/threadsafety.h \
+           src/timedata.h \
+           src/tinyformat.h \
+           src/txdb.h \
+           src/txmempool.h \
+           src/ui_interface.h \
+           src/uint256.h \
+           src/undo.h \
+           src/util.h \
+           src/utilmoneystr.h \
+           src/utilstrencodings.h \
+           src/utiltime.h \
+           src/version.h \
+           src/wallet.h \
+           src/wallet_ismine.h \
+           src/walletdb.h \
+           src/compat/sanity.h \
+           src/config/dash-config.h \
+           src/crypto/common.h \
+           src/crypto/hmac_sha256.h \
+           src/crypto/hmac_sha512.h \
+           src/crypto/rfc6979_hmac_sha256.h \
+           src/crypto/ripemd160.h \
+           src/crypto/sha1.h \
+           src/crypto/sha256.h \
+           src/crypto/sha512.h \
+           src/crypto/sph_blake.h \
+           src/crypto/sph_bmw.h \
+           src/crypto/sph_cubehash.h \
+           src/crypto/sph_echo.h \
+           src/crypto/sph_groestl.h \
+           src/crypto/sph_jh.h \
+           src/crypto/sph_keccak.h \
+           src/crypto/sph_luffa.h \
+           src/crypto/sph_shavite.h \
+           src/crypto/sph_simd.h \
+           src/crypto/sph_skein.h \
+           src/crypto/sph_types.h \
+           src/json/json_spirit.h \
+           src/json/json_spirit_error_position.h \
+           src/json/json_spirit_reader.h \
+           src/json/json_spirit_reader_template.h \
+           src/json/json_spirit_stream_reader.h \
+           src/json/json_spirit_utils.h \
+           src/json/json_spirit_value.h \
+           src/json/json_spirit_writer.h \
+           src/json/json_spirit_writer_template.h \
+           src/obj/build.h \
+           src/primitives/block.h \
+           src/primitives/transaction.h \
+           src/qt/addressbookpage.h \
+           src/qt/addresstablemodel.h \
+           src/qt/askpassphrasedialog.h \
+           src/qt/bitcoinaddressvalidator.h \
+           src/qt/bitcoinamountfield.h \
+           src/qt/bitcoingui.h \
+           src/qt/bitcoinunits.h \
+           src/qt/clientmodel.h \
+           src/qt/coincontroldialog.h \
+           src/qt/coincontroltreewidget.h \
+           src/qt/csvmodelwriter.h \
+           src/qt/darksendconfig.h \
+           src/qt/editaddressdialog.h \
+           src/qt/guiconstants.h \
+           src/qt/guiutil.h \
+           src/qt/intro.h \
+           src/qt/macdockiconhandler.h \
+           src/qt/macnotificationhandler.h \
+           src/qt/networkstyle.h \
+           src/qt/notificator.h \
+           src/qt/openuridialog.h \
+           src/qt/optionsdialog.h \
+           src/qt/optionsmodel.h \
+           src/qt/overviewpage.h \
+           src/qt/paymentrequest.pb.h \
+           src/qt/paymentrequestplus.h \
+           src/qt/paymentserver.h \
+           src/qt/peertablemodel.h \
+           src/qt/qvalidatedlineedit.h \
+           src/qt/qvaluecombobox.h \
+           src/qt/receivecoinsdialog.h \
+           src/qt/receiverequestdialog.h \
+           src/qt/recentrequeststablemodel.h \
+           src/qt/rpcconsole.h \
+           src/qt/sendcoinsdialog.h \
+           src/qt/sendcoinsentry.h \
+           src/qt/signverifymessagedialog.h \
+           src/qt/splashscreen.h \
+           src/qt/trafficgraphwidget.h \
+           src/qt/transactiondesc.h \
+           src/qt/transactiondescdialog.h \
+           src/qt/transactionfilterproxy.h \
+           src/qt/transactionrecord.h \
+           src/qt/transactiontablemodel.h \
+           src/qt/transactionview.h \
+           src/qt/utilitydialog.h \
+           src/qt/walletframe.h \
+           src/qt/walletmodel.h \
+           src/qt/walletmodeltransaction.h \
+           src/qt/walletview.h \
+           src/qt/winshutdownmonitor.h \
+           src/script/bitcoinconsensus.h \
+           src/script/interpreter.h \
+           src/script/script.h \
+           src/script/script_error.h \
+           src/script/sigcache.h \
+           src/script/sign.h \
+           src/script/standard.h \
+           src/test/bignum.h \
+           src/univalue/univalue.h \
+           src/univalue/univalue_escapes.h \
+           src/leveldb/db/builder.h \
+           src/leveldb/db/db_impl.h \
+           src/leveldb/db/db_iter.h \
+           src/leveldb/db/dbformat.h \
+           src/leveldb/db/filename.h \
+           src/leveldb/db/log_format.h \
+           src/leveldb/db/log_reader.h \
+           src/leveldb/db/log_writer.h \
+           src/leveldb/db/memtable.h \
+           src/leveldb/db/skiplist.h \
+           src/leveldb/db/snapshot.h \
+           src/leveldb/db/table_cache.h \
+           src/leveldb/db/version_edit.h \
+           src/leveldb/db/version_set.h \
+           src/leveldb/db/write_batch_internal.h \
+           src/leveldb/port/atomic_pointer.h \
+           src/leveldb/port/port.h \
+           src/leveldb/port/port_example.h \
+           src/leveldb/port/port_posix.h \
+           src/leveldb/port/port_win.h \
+           src/leveldb/port/thread_annotations.h \
+           src/leveldb/table/block.h \
+           src/leveldb/table/block_builder.h \
+           src/leveldb/table/filter_block.h \
+           src/leveldb/table/format.h \
+           src/leveldb/table/iterator_wrapper.h \
+           src/leveldb/table/merger.h \
+           src/leveldb/table/two_level_iterator.h \
+           src/leveldb/util/arena.h \
+           src/leveldb/util/coding.h \
+           src/leveldb/util/crc32c.h \
+           src/leveldb/util/hash.h \
+           src/leveldb/util/histogram.h \
+           src/leveldb/util/logging.h \
+           src/leveldb/util/mutexlock.h \
+           src/leveldb/util/posix_logger.h \
+           src/leveldb/util/random.h \
+           src/leveldb/util/testharness.h \
+           src/leveldb/util/testutil.h \
+           src/qt/forms/ui_aboutdialog.h \
+           src/qt/test/paymentrequestdata.h \
+           src/qt/test/paymentservertests.h \
+           src/qt/test/uritests.h \
+           src/secp256k1/include/secp256k1.h \
+           src/secp256k1/src/ecdsa.h \
+           src/secp256k1/src/ecdsa_impl.h \
+           src/secp256k1/src/eckey.h \
+           src/secp256k1/src/eckey_impl.h \
+           src/secp256k1/src/ecmult.h \
+           src/secp256k1/src/ecmult_gen.h \
+           src/secp256k1/src/ecmult_gen_impl.h \
+           src/secp256k1/src/ecmult_impl.h \
+           src/secp256k1/src/field.h \
+           src/secp256k1/src/field_10x26.h \
+           src/secp256k1/src/field_10x26_impl.h \
+           src/secp256k1/src/field_5x52.h \
+           src/secp256k1/src/field_5x52_asm_impl.h \
+           src/secp256k1/src/field_5x52_impl.h \
+           src/secp256k1/src/field_5x52_int128_impl.h \
+           src/secp256k1/src/field_gmp.h \
+           src/secp256k1/src/field_gmp_impl.h \
+           src/secp256k1/src/field_impl.h \
+           src/secp256k1/src/group.h \
+           src/secp256k1/src/group_impl.h \
+           src/secp256k1/src/libsecp256k1-config.h \
+           src/secp256k1/src/num.h \
+           src/secp256k1/src/num_gmp.h \
+           src/secp256k1/src/num_gmp_impl.h \
+           src/secp256k1/src/num_impl.h \
+           src/secp256k1/src/scalar.h \
+           src/secp256k1/src/scalar_4x64.h \
+           src/secp256k1/src/scalar_4x64_impl.h \
+           src/secp256k1/src/scalar_8x32.h \
+           src/secp256k1/src/scalar_8x32_impl.h \
+           src/secp256k1/src/scalar_impl.h \
+           src/secp256k1/src/testrand.h \
+           src/secp256k1/src/testrand_impl.h \
+           src/secp256k1/src/util.h \
+           src/test/data/alertTests.raw.h \
+           src/test/data/base58_encode_decode.json.h \
+           src/test/data/base58_keys_invalid.json.h \
+           src/test/data/base58_keys_valid.json.h \
+           src/test/data/script_invalid.json.h \
+           src/test/data/script_valid.json.h \
+           src/test/data/sig_canonical.json.h \
+           src/test/data/sig_noncanonical.json.h \
+           src/test/data/sighash.json.h \
+           src/test/data/tx_invalid.json.h \
+           src/test/data/tx_valid.json.h \
+           src/leveldb/helpers/memenv/memenv.h \
+           src/leveldb/include/leveldb/c.h \
+           src/leveldb/include/leveldb/cache.h \
+           src/leveldb/include/leveldb/comparator.h \
+           src/leveldb/include/leveldb/db.h \
+           src/leveldb/include/leveldb/dumpfile.h \
+           src/leveldb/include/leveldb/env.h \
+           src/leveldb/include/leveldb/filter_policy.h \
+           src/leveldb/include/leveldb/iterator.h \
+           src/leveldb/include/leveldb/options.h \
+           src/leveldb/include/leveldb/slice.h \
+           src/leveldb/include/leveldb/status.h \
+           src/leveldb/include/leveldb/table.h \
+           src/leveldb/include/leveldb/table_builder.h \
+           src/leveldb/include/leveldb/write_batch.h \
+           src/leveldb/port/win/stdint.h \
+           src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h \
+           src/crypto/aes_helper.c \
+           src/qt/bitcoinamountfield.moc \
+           src/qt/dash.moc \
+           src/qt/intro.moc \
+           src/qt/overviewpage.moc \
+           src/qt/rpcconsole.moc \
+           src/secp256k1/src/secp256k1.c
+FORMS += src/qt/forms/addressbookpage.ui \
+         src/qt/forms/askpassphrasedialog.ui \
+         src/qt/forms/coincontroldialog.ui \
+         src/qt/forms/darksendconfig.ui \
+         src/qt/forms/editaddressdialog.ui \
+         src/qt/forms/helpmessagedialog.ui \
+         src/qt/forms/intro.ui \
+         src/qt/forms/openuridialog.ui \
+         src/qt/forms/optionsdialog.ui \
+         src/qt/forms/overviewpage.ui \
+         src/qt/forms/receivecoinsdialog.ui \
+         src/qt/forms/receiverequestdialog.ui \
+         src/qt/forms/rpcconsole.ui \
+         src/qt/forms/sendcoinsdialog.ui \
+         src/qt/forms/sendcoinsentry.ui \
+         src/qt/forms/signverifymessagedialog.ui \
+         src/qt/forms/transactiondescdialog.ui
+SOURCES += src/activemasternode.cpp \
+           src/addrman.cpp \
+           src/alert.cpp \
+           src/allocators.cpp \
+           src/amount.cpp \
+           src/base58.cpp \
+           src/bitcoin-tx.cpp \
+           src/bloom.cpp \
+           src/chain.cpp \
+           src/chainparams.cpp \
+           src/chainparamsbase.cpp \
+           src/checkpoints.cpp \
+           src/clientversion.cpp \
+           src/coins.cpp \
+           src/compressor.cpp \
+           src/core_read.cpp \
+           src/core_write.cpp \
+           src/crypter.cpp \
+           src/darksend-relay.cpp \
+           src/darksend.cpp \
+           src/dash-cli.cpp \
+           src/dash-tx.cpp \
+           src/dashd.cpp \
+           src/db.cpp \
+           src/eccryptoverify.cpp \
+           src/ecwrapper.cpp \
+           src/hash.cpp \
+           src/init.cpp \
+           src/instantx.cpp \
+           src/keepass.cpp \
+           src/key.cpp \
+           src/keystore.cpp \
+           src/leveldbwrapper.cpp \
+           src/main.cpp \
+           src/masternode-pos.cpp \
+           src/masternode.cpp \
+           src/masternodeconfig.cpp \
+           src/masternodeman.cpp \
+           src/merkleblock.cpp \
+           src/miner.cpp \
+           src/net.cpp \
+           src/netbase.cpp \
+           src/noui.cpp \
+           src/pow.cpp \
+           src/protocol.cpp \
+           src/pubkey.cpp \
+           src/random.cpp \
+           src/rest.cpp \
+           src/rpcblockchain.cpp \
+           src/rpcclient.cpp \
+           src/rpcdarksend.cpp \
+           src/rpcdump.cpp \
+           src/rpcmining.cpp \
+           src/rpcmisc.cpp \
+           src/rpcnet.cpp \
+           src/rpcprotocol.cpp \
+           src/rpcrawtransaction.cpp \
+           src/rpcserver.cpp \
+           src/rpcwallet.cpp \
+           src/spork.cpp \
+           src/sync.cpp \
+           src/timedata.cpp \
+           src/txdb.cpp \
+           src/txmempool.cpp \
+           src/uint256.cpp \
+           src/util.cpp \
+           src/utilmoneystr.cpp \
+           src/utilstrencodings.cpp \
+           src/utiltime.cpp \
+           src/wallet.cpp \
+           src/wallet_ismine.cpp \
+           src/walletdb.cpp \
+           src/compat/glibc_compat.cpp \
+           src/compat/glibc_sanity.cpp \
+           src/compat/glibcxx_compat.cpp \
+           src/compat/glibcxx_sanity.cpp \
+           src/compat/strnlen.cpp \
+           src/crypto/aes_helper.c \
+           src/crypto/blake.c \
+           src/crypto/bmw.c \
+           src/crypto/cubehash.c \
+           src/crypto/echo.c \
+           src/crypto/groestl.c \
+           src/crypto/hmac_sha256.cpp \
+           src/crypto/hmac_sha512.cpp \
+           src/crypto/jh.c \
+           src/crypto/keccak.c \
+           src/crypto/luffa.c \
+           src/crypto/rfc6979_hmac_sha256.cpp \
+           src/crypto/ripemd160.cpp \
+           src/crypto/sha1.cpp \
+           src/crypto/sha256.cpp \
+           src/crypto/sha512.cpp \
+           src/crypto/shavite.c \
+           src/crypto/simd.c \
+           src/crypto/skein.c \
+           src/json/json_spirit_reader.cpp \
+           src/json/json_spirit_value.cpp \
+           src/json/json_spirit_writer.cpp \
+           src/primitives/block.cpp \
+           src/primitives/transaction.cpp \
+           src/qt/addressbookpage.cpp \
+           src/qt/addresstablemodel.cpp \
+           src/qt/askpassphrasedialog.cpp \
+           src/qt/bitcoinaddressvalidator.cpp \
+           src/qt/bitcoinamountfield.cpp \
+           src/qt/bitcoingui.cpp \
+           src/qt/bitcoinunits.cpp \
+           src/qt/clientmodel.cpp \
+           src/qt/coincontroldialog.cpp \
+           src/qt/coincontroltreewidget.cpp \
+           src/qt/csvmodelwriter.cpp \
+           src/qt/darksendconfig.cpp \
+           src/qt/dash.cpp \
+           src/qt/dashstrings.cpp \
+           src/qt/editaddressdialog.cpp \
+           src/qt/guiutil.cpp \
+           src/qt/intro.cpp \
+           src/qt/networkstyle.cpp \
+           src/qt/notificator.cpp \
+           src/qt/openuridialog.cpp \
+           src/qt/optionsdialog.cpp \
+           src/qt/optionsmodel.cpp \
+           src/qt/overviewpage.cpp \
+           src/qt/paymentrequest.pb.cc \
+           src/qt/paymentrequestplus.cpp \
+           src/qt/paymentserver.cpp \
+           src/qt/peertablemodel.cpp \
+           src/qt/qrc_darkcoin.cpp \
+           src/qt/qvalidatedlineedit.cpp \
+           src/qt/qvaluecombobox.cpp \
+           src/qt/receivecoinsdialog.cpp \
+           src/qt/receiverequestdialog.cpp \
+           src/qt/recentrequeststablemodel.cpp \
+           src/qt/rpcconsole.cpp \
+           src/qt/sendcoinsdialog.cpp \
+           src/qt/sendcoinsentry.cpp \
+           src/qt/signverifymessagedialog.cpp \
+           src/qt/splashscreen.cpp \
+           src/qt/trafficgraphwidget.cpp \
+           src/qt/transactiondesc.cpp \
+           src/qt/transactiondescdialog.cpp \
+           src/qt/transactionfilterproxy.cpp \
+           src/qt/transactionrecord.cpp \
+           src/qt/transactiontablemodel.cpp \
+           src/qt/transactionview.cpp \
+           src/qt/utilitydialog.cpp \
+           src/qt/walletframe.cpp \
+           src/qt/walletmodel.cpp \
+           src/qt/walletmodeltransaction.cpp \
+           src/qt/walletview.cpp \
+           src/qt/winshutdownmonitor.cpp \
+           src/script/bitcoinconsensus.cpp \
+           src/script/interpreter.cpp \
+           src/script/script.cpp \
+           src/script/script_error.cpp \
+           src/script/sigcache.cpp \
+           src/script/sign.cpp \
+           src/script/standard.cpp \
+           src/test/accounting_tests.cpp \
+           src/test/alert_tests.cpp \
+           src/test/allocator_tests.cpp \
+           src/test/base32_tests.cpp \
+           src/test/base58_tests.cpp \
+           src/test/base64_tests.cpp \
+           src/test/bip32_tests.cpp \
+           src/test/bloom_tests.cpp \
+           src/test/checkblock_tests.cpp \
+           src/test/Checkpoints_tests.cpp \
+           src/test/coins_tests.cpp \
+           src/test/compress_tests.cpp \
+           src/test/crypto_tests.cpp \
+           src/test/DoS_tests.cpp \
+           src/test/getarg_tests.cpp \
+           src/test/hash_tests.cpp \
+           src/test/key_tests.cpp \
+           src/test/main_tests.cpp \
+           src/test/miner_tests.cpp \
+           src/test/mruset_tests.cpp \
+           src/test/multisig_tests.cpp \
+           src/test/netbase_tests.cpp \
+           src/test/pmt_tests.cpp \
+           src/test/rpc_tests.cpp \
+           src/test/rpc_wallet_tests.cpp \
+           src/test/sanity_tests.cpp \
+           src/test/script_P2SH_tests.cpp \
+           src/test/script_tests.cpp \
+           src/test/scriptnum_tests.cpp \
+           src/test/serialize_tests.cpp \
+           src/test/sighash_tests.cpp \
+           src/test/sigopcount_tests.cpp \
+           src/test/skiplist_tests.cpp \
+           src/test/test_dash.cpp \
+           src/test/timedata_tests.cpp \
+           src/test/transaction_tests.cpp \
+           src/test/uint256_tests.cpp \
+           src/test/univalue_tests.cpp \
+           src/test/util_tests.cpp \
+           src/test/wallet_tests.cpp \
+           src/univalue/gen.cpp \
+           src/univalue/univalue.cpp \
+           src/univalue/univalue_read.cpp \
+           src/univalue/univalue_write.cpp \
+           src/leveldb/db/autocompact_test.cc \
+           src/leveldb/db/builder.cc \
+           src/leveldb/db/c.cc \
+           src/leveldb/db/c_test.c \
+           src/leveldb/db/corruption_test.cc \
+           src/leveldb/db/db_bench.cc \
+           src/leveldb/db/db_impl.cc \
+           src/leveldb/db/db_iter.cc \
+           src/leveldb/db/db_test.cc \
+           src/leveldb/db/dbformat.cc \
+           src/leveldb/db/dbformat_test.cc \
+           src/leveldb/db/dumpfile.cc \
+           src/leveldb/db/filename.cc \
+           src/leveldb/db/filename_test.cc \
+           src/leveldb/db/leveldb_main.cc \
+           src/leveldb/db/log_reader.cc \
+           src/leveldb/db/log_test.cc \
+           src/leveldb/db/log_writer.cc \
+           src/leveldb/db/memtable.cc \
+           src/leveldb/db/repair.cc \
+           src/leveldb/db/skiplist_test.cc \
+           src/leveldb/db/table_cache.cc \
+           src/leveldb/db/version_edit.cc \
+           src/leveldb/db/version_edit_test.cc \
+           src/leveldb/db/version_set.cc \
+           src/leveldb/db/version_set_test.cc \
+           src/leveldb/db/write_batch.cc \
+           src/leveldb/db/write_batch_test.cc \
+           src/leveldb/issues/issue178_test.cc \
+           src/leveldb/issues/issue200_test.cc \
+           src/leveldb/port/port_posix.cc \
+           src/leveldb/port/port_win.cc \
+           src/leveldb/table/block.cc \
+           src/leveldb/table/block_builder.cc \
+           src/leveldb/table/filter_block.cc \
+           src/leveldb/table/filter_block_test.cc \
+           src/leveldb/table/format.cc \
+           src/leveldb/table/iterator.cc \
+           src/leveldb/table/merger.cc \
+           src/leveldb/table/table.cc \
+           src/leveldb/table/table_builder.cc \
+           src/leveldb/table/table_test.cc \
+           src/leveldb/table/two_level_iterator.cc \
+           src/leveldb/util/arena.cc \
+           src/leveldb/util/arena_test.cc \
+           src/leveldb/util/bloom.cc \
+           src/leveldb/util/bloom_test.cc \
+           src/leveldb/util/cache.cc \
+           src/leveldb/util/cache_test.cc \
+           src/leveldb/util/coding.cc \
+           src/leveldb/util/coding_test.cc \
+           src/leveldb/util/comparator.cc \
+           src/leveldb/util/crc32c.cc \
+           src/leveldb/util/crc32c_test.cc \
+           src/leveldb/util/env.cc \
+           src/leveldb/util/env_posix.cc \
+           src/leveldb/util/env_test.cc \
+           src/leveldb/util/env_win.cc \
+           src/leveldb/util/filter_policy.cc \
+           src/leveldb/util/hash.cc \
+           src/leveldb/util/hash_test.cc \
+           src/leveldb/util/histogram.cc \
+           src/leveldb/util/logging.cc \
+           src/leveldb/util/options.cc \
+           src/leveldb/util/status.cc \
+           src/leveldb/util/testharness.cc \
+           src/leveldb/util/testutil.cc \
+           src/qt/test/paymentservertests.cpp \
+           src/qt/test/test_main.cpp \
+           src/qt/test/uritests.cpp \
+           src/secp256k1/src/bench_inv.c \
+           src/secp256k1/src/bench_sign.c \
+           src/secp256k1/src/bench_verify.c \
+           src/secp256k1/src/secp256k1.c \
+           src/secp256k1/src/tests.c \
+           src/leveldb/doc/bench/db_bench_sqlite3.cc \
+           src/leveldb/doc/bench/db_bench_tree_db.cc \
+           src/leveldb/helpers/memenv/memenv.cc \
+           src/leveldb/helpers/memenv/memenv_test.cc \
+           src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c
+RESOURCES += src/qt/dash.qrc src/qt/dash_locale.qrc
+TRANSLATIONS += src/qt/locale/dash_bar.ts \
+                src/qt/locale/dash_bg.ts \
+                src/qt/locale/dash_ca.ts \
+                src/qt/locale/dash_cmn.ts \
+                src/qt/locale/dash_cs.ts \
+                src/qt/locale/dash_da.ts \
+                src/qt/locale/dash_de.ts \
+                src/qt/locale/dash_el.ts \
+                src/qt/locale/dash_en.ts \
+                src/qt/locale/dash_eo.ts \
+                src/qt/locale/dash_es.ts \
+                src/qt/locale/dash_fi.ts \
+                src/qt/locale/dash_fr.ts \
+                src/qt/locale/dash_hu_HU.ts \
+                src/qt/locale/dash_it.ts \
+                src/qt/locale/dash_lv_LV.ts \
+                src/qt/locale/dash_nb.ts \
+                src/qt/locale/dash_nl.ts \
+                src/qt/locale/dash_pl.ts \
+                src/qt/locale/dash_pt.ts \
+                src/qt/locale/dash_pt_BR.ts \
+                src/qt/locale/dash_ru.ts \
+                src/qt/locale/dash_sk.ts \
+                src/qt/locale/dash_sv.ts \
+                src/qt/locale/dash_tr.ts \
+                src/qt/locale/dash_vi.ts \
+                src/qt/locale/dash_zh_CN.ts \
+                src/qt/locale/dash_zh_HK.ts

From 8bd7e1d181b8ffdc00a5b6931ebb91892274f588 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Apr 2015 22:37:15 +0300
Subject: [PATCH 1309/1819] relax restrictions on AcceptableInputs

---
 src/main.cpp | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 7a5188b60c65..72f159e4261a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1176,10 +1176,11 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
 
     // Rather not work on nonstandard transactions (unless -testnet/-regtest)
     string reason;
-    if (Params().RequireStandard() && !IsStandardTx(tx, reason))
-        return state.DoS(0,
-                         error("AcceptableInputs : nonstandard transaction: %s", reason),
-                         REJECT_NONSTANDARD, reason);
+// for any real tx this will be checked on AcceptToMemoryPool anyway
+//    if (Params().RequireStandard() && !IsStandardTx(tx, reason))
+//        return state.DoS(0,
+//                         error("AcceptableInputs : nonstandard transaction: %s", reason),
+//                         REJECT_NONSTANDARD, reason);
 
     // is it already in the memory pool?
     uint256 hash = tx.GetHash();
@@ -1253,8 +1254,9 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
         }
 
         // Check for non-standard pay-to-script-hash in inputs
-        if (Params().RequireStandard() && !AreInputsStandard(tx, view))
-            return error("AcceptableInputs: : nonstandard transaction input");
+// for any real tx this will be checked on AcceptToMemoryPool anyway
+//        if (Params().RequireStandard() && !AreInputsStandard(tx, view))
+//            return error("AcceptableInputs: : nonstandard transaction input");
 
         // Check that the transaction doesn't have an excessive number of
         // sigops, making it impossible to mine. Since the coinbase transaction
@@ -1335,6 +1337,7 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
         // There is a similar check in CreateNewBlock() to prevent creating
         // invalid blocks, however allowing such transactions into the mempool
         // can be exploited as a DoS attack.
+// for any real tx this will be checked on AcceptToMemoryPool anyway
 //        if (!CheckInputs(tx, state, view, false, MANDATORY_SCRIPT_VERIFY_FLAGS, true))
 //        {
 //            return error("AcceptableInputs: : BUG! PLEASE REPORT THIS! ConnectInputs failed against MANDATORY but not STANDARD flags %s", hash.ToString());

From fabca0a428306917787db5bfa05318675bf59367 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 6 Apr 2015 00:56:58 +0300
Subject: [PATCH 1310/1819] more bitcoin->dash fixes

---
 .travis.yml                                   |   6 +-
 contrib/dash-qt.pro                           |   1 -
 ....bash-completion => dashd.bash-completion} |  38 +-
 contrib/debian/manpages/dash-qt.1             |   8 +-
 contrib/debian/manpages/dashd.1               |  46 +-
 .../gitian-descriptors/gitian-osx-signer.yml  |  10 +-
 contrib/gitian-descriptors/gitian-osx.yml     |  14 +-
 contrib/gitian-descriptors/gitian-win.yml     |   4 +-
 contrib/init/README.md                        |   8 +-
 contrib/init/bitcoind.openrcconf              |  27 -
 contrib/init/bitcoind.service                 |  22 -
 contrib/init/{bitcoind.conf => dashd.conf}    |  22 +-
 .../init/{bitcoind.openrc => dashd.openrc}    |  28 +-
 contrib/init/dashd.openrcconf                 |  27 +
 contrib/init/dashd.service                    |  22 +
 contrib/macdeploy/detached-sig-apply.sh       |   2 +-
 contrib/macdeploy/detached-sig-create.sh      |   2 +-
 doc/release-notes.md                          | 116 +---
 doc/release-notes/release-notes-0.12.0.md     |  60 ++
 doc/unit-tests.md                             |   8 +-
 share/qt/Info.plist.in                        |   4 +-
 share/seeds/generate-seeds.py                 |   6 +-
 src/bitcoin-tx.cpp                            | 633 ------------------
 src/chainparamsbase.h                         |   4 +-
 src/chainparamsseeds.h                        |   1 +
 src/clientversion.cpp                         |   4 +-
 src/dash-cli.cpp                              |   6 +-
 src/dash-tx.cpp                               |   8 +-
 src/qt/bitcoingui.cpp                         |   4 +-
 src/qt/dash.cpp                               |   2 +-
 src/qt/forms/receivecoinsdialog.ui            |   4 +-
 src/qt/forms/sendcoinsdialog.ui               |   4 +-
 src/qt/guiutil.h                              |   6 +-
 src/qt/macnotificationhandler.mm              |   2 +-
 src/qt/paymentserver.h                        |   2 +-
 src/qt/recentrequeststablemodel.h             |   2 +-
 src/qt/utilitydialog.cpp                      |   2 +-
 src/qt/walletmodel.cpp                        |   2 +-
 src/rpcdump.cpp                               |   2 +-
 src/test/test_dash.cpp                        |   2 +-
 src/timedata.cpp                              |   2 +-
 41 files changed, 244 insertions(+), 929 deletions(-)
 rename contrib/{bitcoind.bash-completion => dashd.bash-completion} (81%)
 delete mode 100644 contrib/init/bitcoind.openrcconf
 delete mode 100644 contrib/init/bitcoind.service
 rename contrib/init/{bitcoind.conf => dashd.conf} (75%)
 rename contrib/init/{bitcoind.openrc => dashd.openrc} (70%)
 create mode 100644 contrib/init/dashd.openrcconf
 create mode 100644 contrib/init/dashd.service
 create mode 100644 doc/release-notes/release-notes-0.12.0.md
 delete mode 100644 src/bitcoin-tx.cpp

diff --git a/.travis.yml b/.travis.yml
index 1630c1d02a4d..6cc24facfd14 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,7 +26,7 @@ matrix:
   include:
     - compiler: ": ARM"
       env: HOST=arm-linux-gnueabihf PACKAGES="g++-arm-linux-gnueabihf" DEP_OPTS="NO_QT=1" GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
-    - compiler: ": bitcoind"
+    - compiler: ": dashd"
       env: HOST=x86_64-unknown-linux-gnu PACKAGES="bc" DEP_OPTS="NO_QT=1 NO_UPNP=1 DEBUG=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat CPPFLAGS=-DDEBUG_LOCKORDER"
     - compiler: ": No wallet"
       env: HOST=x86_64-unknown-linux-gnu DEP_OPTS="NO_WALLET=1" RUN_TESTS=true GOAL="install" BITCOIN_CONFIG="--enable-glibc-back-compat"
@@ -55,8 +55,8 @@ script:
     - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then export CCACHE_READONLY=1; fi
     - test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
     - ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
-    - make distdir PACKAGE=bitcoin VERSION=$HOST
-    - cd bitcoin-$HOST
+    - make distdir PACKAGE=dash VERSION=$HOST
+    - cd dash-$HOST
     - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
     - make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
     - export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro
index c82e274cb98d..2cbd48208a94 100644
--- a/contrib/dash-qt.pro
+++ b/contrib/dash-qt.pro
@@ -356,7 +356,6 @@ SOURCES += src/activemasternode.cpp \
            src/allocators.cpp \
            src/amount.cpp \
            src/base58.cpp \
-           src/bitcoin-tx.cpp \
            src/bloom.cpp \
            src/chain.cpp \
            src/chainparams.cpp \
diff --git a/contrib/bitcoind.bash-completion b/contrib/dashd.bash-completion
similarity index 81%
rename from contrib/bitcoind.bash-completion
rename to contrib/dashd.bash-completion
index 37ece258996a..11a4dc9e7c3b 100644
--- a/contrib/bitcoind.bash-completion
+++ b/contrib/dashd.bash-completion
@@ -1,12 +1,12 @@
-# bash programmable completion for bitcoind(1) and bitcoin-cli(1)
+# bash programmable completion for dashd(1) and dash-cli(1)
 # Copyright (c) 2012,2014 Christian von Roques <roques@mti.ag>
 # Distributed under the MIT/X11 software license, see the accompanying
 # file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-have bitcoind && {
+have dashd && {
 
-# call $bitcoind for RPC
-_bitcoin_rpc() {
+# call $dashd for RPC
+_dash_rpc() {
     # determine already specified args necessary for RPC
     local rpcargs=()
     for i in ${COMP_LINE}; do
@@ -16,23 +16,23 @@ _bitcoin_rpc() {
                 ;;
         esac
     done
-    $bitcoind "${rpcargs[@]}" "$@"
+    $dashd "${rpcargs[@]}" "$@"
 }
 
-# Add bitcoin accounts to COMPREPLY
-_bitcoin_accounts() {
+# Add dash accounts to COMPREPLY
+_dash_accounts() {
     local accounts
-    accounts=$(_bitcoin_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
+    accounts=$(_dash_rpc listaccounts | awk '/".*"/ { a=$1; gsub(/"/, "", a); print a}')
     COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
 }
 
-_bitcoind() {
+_dashd() {
     local cur prev words=() cword
-    local bitcoind
+    local dashd
 
-    # save and use original argument to invoke bitcoind
-    # bitcoind might not be in $PATH
-    bitcoind="$1"
+    # save and use original argument to invoke dashd
+    # dashd might not be in $PATH
+    dashd="$1"
 
     COMPREPLY=()
     _get_comp_words_by_ref -n = cur prev words cword
@@ -53,7 +53,7 @@ _bitcoind() {
     if ((cword > 3)); then
         case ${words[cword-3]} in
             addmultisigaddress)
-                _bitcoin_accounts
+                _dash_accounts
                 return 0
                 ;;
             getbalance|gettxout|importaddress|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
@@ -74,7 +74,7 @@ _bitcoind() {
                 return 0
                 ;;
             move|setaccount)
-                _bitcoin_accounts
+                _dash_accounts
                 return 0
                 ;;
         esac
@@ -90,7 +90,7 @@ _bitcoind() {
             return 0
             ;;
         getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
-            _bitcoin_accounts
+            _dash_accounts
             return 0
             ;;
     esac
@@ -114,12 +114,12 @@ _bitcoind() {
 
             # only parse --help if senseful
             if [[ -z "$cur" || "$cur" =~ ^- ]]; then
-                helpopts=$($bitcoind --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
+                helpopts=$($dashd --help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
             fi
 
             # only parse help if senseful
             if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
-                commands=$(_bitcoin_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
+                commands=$(_dash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
             fi
 
             COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
@@ -133,7 +133,7 @@ _bitcoind() {
     esac
 }
 
-complete -F _bitcoind bitcoind bitcoin-cli
+complete -F _dashd dashd dash-cli
 }
 
 # Local variables:
diff --git a/contrib/debian/manpages/dash-qt.1 b/contrib/debian/manpages/dash-qt.1
index 18f38c95b403..dc9381f8ad89 100644
--- a/contrib/debian/manpages/dash-qt.1
+++ b/contrib/debian/manpages/dash-qt.1
@@ -1,10 +1,10 @@
-.TH BITCOIN-QT "1" "April 2013" "bitcoin-qt 1"
+.TH DASH-QT "1" "March 2015" "dash-qt 1"
 .SH NAME
-bitcoin-qt \- peer-to-peer network based digital currency
+dash-qt \- peer-to-peer network based digital currency
 .SH DESCRIPTION
 .SS "Usage:"
 .IP
-bitcoin\-qt [command\-line options]
+dash\-qt [command\-line options]
 .SH OPTIONS
 .TP
 \-?
@@ -14,7 +14,7 @@ This help message
 Specify configuration file (default: dash.conf)
 .TP
 \fB\-pid=\fR<file>
-Specify pid file (default: bitcoind.pid)
+Specify pid file (default: dashd.pid)
 .TP
 \fB\-gen\fR
 Generate coins
diff --git a/contrib/debian/manpages/dashd.1 b/contrib/debian/manpages/dashd.1
index 781c18818103..b31f828737c4 100644
--- a/contrib/debian/manpages/dashd.1
+++ b/contrib/debian/manpages/dashd.1
@@ -1,14 +1,14 @@
-.TH BITCOIND "1" "January 2011" "bitcoind 3.19"
+.TH DASHD "1" "January 2011" "dashd 3.19"
 .SH NAME
-bitcoind \- peer-to-peer network based digital currency
+Dash \- peer-to-peer network based digital currency
 .SH SYNOPSIS
-bitcoin [options] <command> [params]
+dashd [options] <command> [params]
 .TP
-bitcoin [options] help <command> \- Get help for a command
+dashd [options] help <command> \- Get help for a command
 .SH DESCRIPTION
-This  manual page documents the bitcoind program. Bitcoin is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
+This  manual page documents the dashd program. Dash is a peer-to-peer digital currency. Peer-to-peer (P2P) means that there is no central authority to issue new money or keep track of transactions. Instead, these tasks are managed collectively by the nodes of the network. Advantages:
 
-Bitcoins can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Bitcoin system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
+Dash can be sent easily through the Internet, without having to trust middlemen. Transactions are designed to be irreversible. Be safe from instability caused by fractional reserve banking and central banks. The limited inflation of the Dash system’s money supply is distributed evenly (by CPU power) throughout the network, not monopolized by banks.
 
 .SH OPTIONS
 .TP
@@ -84,14 +84,14 @@ This help message
 \fBbackupwallet 'destination'\fR
 Safely copies *wallet.dat* to 'destination', which can be a directory or a path with filename.
 .TP
-\fBgetaccount 'bitcoinaddress'\fR
+\fBgetaccount 'dashaddress'\fR
 Returns the account associated with the given address.
 .TP
-\fBsetaccount 'bitcoinaddress' ['account']\fR
+\fBsetaccount 'dashaddress' ['account']\fR
 Sets the ['account'] associated with the given address. ['account'] may be omitted to remove an address from ['account'].
 .TP
 \fBgetaccountaddress 'account'\fR
-Returns a new bitcoin address for 'account'.
+Returns a new dash address for 'account'.
 .TP
 \fBgetaddressesbyaccount 'account'\fR
 Returns the list of addresses associated with the given 'account'.
@@ -112,7 +112,7 @@ Returns the number of connections to other nodes.
 Returns the proof-of-work difficulty as a multiple of the minimum difficulty.
 .TP
 \fBgetgenerate\fR
-Returns boolean true if server is trying to generate bitcoins, false otherwise.
+Returns boolean true if server is trying to generate DASH, false otherwise.
 .TP
 \fBsetgenerate 'generate' ['genproclimit']\fR
 Generation is limited to ['genproclimit'] processors, \-1 is unlimited.
@@ -124,13 +124,13 @@ Returns a recent hashes per second performance measurement while generating.
 Returns an object containing server information.
 .TP
 \fBgetnewaddress 'account'\fR
-Returns a new bitcoin address for receiving payments. If 'account' is specified (recommended), it is added to the address book so payments received with the address will be credited to 'account'.
+Returns a new dash address for receiving payments. If 'account' is specified (recommended), it is added to the address book so payments received with the address will be credited to 'account'.
 .TP
 \fBgetreceivedbyaccount 'account' ['minconf=1']\fR
 Returns the total amount received by addresses associated with 'account' in transactions with at least ['minconf'] confirmations.
 .TP
-\fBgetreceivedbyaddress 'bitcoinaddress' ['minconf=1']\fR
-Returns the total amount received by 'bitcoinaddress' in transactions with at least ['minconf'] confirmations.
+\fBgetreceivedbyaddress 'dashaddress' ['minconf=1']\fR
+Returns the total amount received by 'dashaddress' in transactions with at least ['minconf'] confirmations.
 .TP
 \fBgettransaction 'txid'\fR
 Returns information about a specific transaction, given hexadecimal transaction ID.
@@ -148,7 +148,7 @@ List commands, or get help for a command.
 .TP
 \fBlistaccounts ['minconf=1']\fR
 List accounts and their current balances.
-     *note: requires bitcoin 0.3.20 or later.
+     *note: requires dash 0.3.20 or later.
 .TP
 \fBlistreceivedbyaccount ['minconf=1'] ['includeempty=false']\fR
 ['minconf'] is the minimum number of confirmations before payments are included. ['includeempty'] whether to include addresses that haven't received any payments. Returns an array of objects containing:
@@ -177,26 +177,26 @@ Returns a list of the last ['count'] transactions for 'account' \- for all accou
     "message"       : message associated with transaction (only for send).
     "to"            : message-to associated with transaction (only for send).
 
-    *note: requires bitcoin 0.3.20 or later.
+    *note: requires dash 0.3.20 or later.
 .TP
 \fBmove <'fromaccount'> <'toaccount'> <'amount'> ['minconf=1'] ['comment']\fR
 Moves funds between accounts.
 .TP
-\fBsendfrom* <'account'> <'bitcoinaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
-Sends amount from account's balance to 'bitcoinaddress'. This method will fail if there is less than amount bitcoins with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
+\fBsendfrom* <'account'> <'dashaddress'> <'amount'> ['minconf=1'] ['comment'] ['comment-to']\fR
+Sends amount from account's balance to 'dashaddress'. This method will fail if there is less than amount DASH with ['minconf'] confirmations in the account's balance (unless account is the empty-string-named default account; it behaves like the *sendtoaddress* method). Returns transaction ID on success.
 .TP
-\fBsendtoaddress 'bitcoinaddress' 'amount' ['comment'] ['comment-to']\fR
-Sends amount from the server's available balance to 'bitcoinaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
+\fBsendtoaddress 'dashaddress' 'amount' ['comment'] ['comment-to']\fR
+Sends amount from the server's available balance to 'dashaddress'. amount is a real and is rounded to the nearest 0.01. Returns transaction id on success.
 .TP
 \fBstop\fR
-Stops the bitcoin server.
+Stops the dash server.
 .TP
-\fBvalidateaddress 'bitcoinaddress'\fR
-Checks that 'bitcoinaddress' looks like a proper bitcoin address. Returns an object containing:
+\fBvalidateaddress 'dashaddress'\fR
+Checks that 'dashaddress' looks like a proper Dash address. Returns an object containing:
 
     "isvalid" : true or false.
     "ismine"  : true if the address is in the server's wallet.
-    "address" : bitcoinaddress.
+    "address" : dashaddress.
 
     *note: ismine and address are only returned if the address is valid.
 
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index 1792f9de3f57..f3c78be5e8b6 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,5 +1,5 @@
 ---
-name: "bitcoin-dmg-signer"
+name: "dash-dmg-signer"
 suites:
 - "precise"
 architectures:
@@ -10,7 +10,7 @@ packages:
 reference_datetime: "2013-06-01 00:00:00"
 remotes: []
 files:
-- "bitcoin-osx-unsigned.tar.gz"
+- "dash-osx-unsigned.tar.gz"
 - "signature.tar.gz"
 script: |
   WRAP_DIR=$HOME/wrapped
@@ -28,10 +28,10 @@ script: |
     chmod +x ${WRAP_DIR}/${prog}
   done
 
-  UNSIGNED=bitcoin-osx-unsigned.tar.gz
-  SIGNED=bitcoin-osx-signed.dmg
+  UNSIGNED=dash-osx-unsigned.tar.gz
+  SIGNED=dash-osx-signed.dmg
 
   tar -xf ${UNSIGNED}
   ./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz
-  ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app
+  ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Dash-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app
   ${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index c09786a56ce6..f8cb34deef22 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -1,5 +1,5 @@
 ---
-name: "bitcoin-osx-0.10"
+name: "dash-osx-0.12"
 enable_cache: true
 suites:
 - "precise"
@@ -20,8 +20,8 @@ packages:
 - "libbz2-dev"
 reference_datetime: "2013-06-01 00:00:00"
 remotes:
-- "url": "https://github.com/bitcoin/bitcoin.git"
-  "dir": "bitcoin"
+- "url": "https://github.com/dashpay/dash.git"
+  "dir": "dash"
 files:
 - "MacOSX10.7.sdk.tar.gz"
 script: |
@@ -68,7 +68,7 @@ script: |
   done
   export PATH=${WRAP_DIR}:${PATH}
 
-  cd bitcoin
+  cd dash
   BASEPREFIX=`pwd`/depends
 
   mkdir -p ${BASEPREFIX}/SDKs
@@ -83,14 +83,14 @@ script: |
   ./autogen.sh
   ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
   make dist
-  SOURCEDIST=`echo bitcoin-*.tar.gz`
+  SOURCEDIST=`echo dash-*.tar.gz`
   DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
 
   # Correct tar file order
   mkdir -p temp
   pushd temp
   tar xf ../$SOURCEDIST
-  find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
+  find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
@@ -120,7 +120,7 @@ script: |
     popd
 
     make deploy
-    ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
+    ${WRAP_DIR}/dmg dmg Dash-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
 
     cd installed
     find . -name "lib*.la" -delete
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index f1050ce96154..fcd43b44910a 100755
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -65,7 +65,7 @@ script: |
   done
   export PATH=${WRAP_DIR}:${PATH}
 
-  cd bitcoin
+  cd dash
   BASEPREFIX=`pwd`/depends
   # Build dependencies for each host
   for i in $HOSTS; do
@@ -83,7 +83,7 @@ script: |
   mkdir -p temp
   pushd temp
   tar xf ../$SOURCEDIST
-  find bitcoin-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
+  find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
   popd
 
   ORIGPATH="$PATH"
diff --git a/contrib/init/README.md b/contrib/init/README.md
index d3fa9665839a..6b8e244a7faa 100644
--- a/contrib/init/README.md
+++ b/contrib/init/README.md
@@ -1,9 +1,9 @@
 Sample configuration files for:
 
-SystemD: bitcoind.service
-Upstart: bitcoind.conf
-OpenRC:  bitcoind.openrc
-         bitcoind.openrcconf
+SystemD: dashd.service
+Upstart: dashd.conf
+OpenRC:  dashd.openrc
+         dashd.openrcconf
 
 have been made available to assist packagers in creating node packages here.
 
diff --git a/contrib/init/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf
deleted file mode 100644
index d8d7f5833746..000000000000
--- a/contrib/init/bitcoind.openrcconf
+++ /dev/null
@@ -1,27 +0,0 @@
-# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind
-
-# Config file location
-#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
-
-# What directory to write pidfile to?  (created and owned by $BITCOIND_USER)
-#BITCOIND_PIDDIR="/var/run/bitcoind"
-
-# What filename to give the pidfile
-#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid"
-
-# Where to write bitcoind data (be mindful that the blockchain is large)
-#BITCOIND_DATADIR="/var/lib/bitcoind"
-
-# User and group to own bitcoind process
-#BITCOIND_USER="bitcoin"
-#BITCOIND_GROUP="bitcoin"
-
-# Path to bitcoind executable
-#BITCOIND_BIN="/usr/bin/bitcoind"
-
-# Nice value to run bitcoind under
-#BITCOIND_NICE=0
-
-# Additional options (avoid -conf and -datadir, use flags above)
-BITCOIND_OPTS="-disablewallet"
-
diff --git a/contrib/init/bitcoind.service b/contrib/init/bitcoind.service
deleted file mode 100644
index 9132957c38b8..000000000000
--- a/contrib/init/bitcoind.service
+++ /dev/null
@@ -1,22 +0,0 @@
-[Unit]
-Description=Bitcoin's distributed currency daemon
-After=network.target
-
-[Service]
-User=bitcoin
-Group=bitcoin
-
-Type=forking
-PIDFile=/var/lib/bitcoind/bitcoind.pid
-ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \
--conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet
-
-Restart=always
-PrivateTmp=true
-TimeoutStopSec=60s
-TimeoutStartSec=2s
-StartLimitInterval=120s
-StartLimitBurst=5
-
-[Install]
-WantedBy=multi-user.target
diff --git a/contrib/init/bitcoind.conf b/contrib/init/dashd.conf
similarity index 75%
rename from contrib/init/bitcoind.conf
rename to contrib/init/dashd.conf
index f9554eecde7f..40b9b9a4f986 100644
--- a/contrib/init/bitcoind.conf
+++ b/contrib/init/dashd.conf
@@ -1,16 +1,16 @@
-description "Bitcoin Core Daemon"
+description "Dash Core Daemon"
 
 start on runlevel [2345]
 stop on starting rc RUNLEVEL=[016]
 
-env BITCOIND_BIN="/usr/bin/bitcoind"
-env BITCOIND_USER="bitcoin"
-env BITCOIND_GROUP="bitcoin"
-env BITCOIND_PIDDIR="/var/run/bitcoind"
+env BITCOIND_BIN="/usr/bin/dashd"
+env BITCOIND_USER="dash"
+env BITCOIND_GROUP="dash"
+env BITCOIND_PIDDIR="/var/run/dashd"
 # upstart can't handle variables constructed with other variables
-env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid"
-env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
-env BITCOIND_DATADIR="/var/lib/bitcoind"
+env BITCOIND_PIDFILE="/var/run/dashd/dashd.pid"
+env BITCOIND_CONFIGFILE="/etc/dash/dash.conf"
+env BITCOIND_DATADIR="/var/lib/dashd"
 
 expect fork
 
@@ -20,12 +20,12 @@ kill timeout 60
 
 pre-start script
     # this will catch non-existent config files
-    # bitcoind will check and exit with this very warning, but it can do so
+    # dashd will check and exit with this very warning, but it can do so
     # long after forking, leaving upstart to think everything started fine.
     # since this is a commonly encountered case on install, just check and
     # warn here.
     if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then
-        echo "ERROR: You must set a secure rpcpassword to run bitcoind."
+        echo "ERROR: You must set a secure rpcpassword to run dashd."
         echo "The setting must appear in $BITCOIND_CONFIGFILE"
         echo
         echo "This password is security critical to securing wallets "
@@ -38,7 +38,7 @@ pre-start script
         echo "It is also recommended that you also set alertnotify so you are "
         echo "notified of problems:"
         echo
-        echo "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
+        echo "ie: alertnotify=echo %%s | mail -s \"Dash Alert\"" \
             "admin@foo.com"
         echo
         exit 1
diff --git a/contrib/init/bitcoind.openrc b/contrib/init/dashd.openrc
similarity index 70%
rename from contrib/init/bitcoind.openrc
rename to contrib/init/dashd.openrc
index 1f7758c9202a..b1b7144d8770 100644
--- a/contrib/init/bitcoind.openrc
+++ b/contrib/init/dashd.openrc
@@ -2,24 +2,24 @@
 
 # backward compatibility for existing gentoo layout 
 #
-if [ -d "/var/lib/bitcoin/.bitcoin" ]; then
-	BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin"
+if [ -d "/var/lib/dash/.dash" ]; then
+	BITCOIND_DEFAULT_DATADIR="/var/lib/dash/.dash"
 else
-	BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind"
+	BITCOIND_DEFAULT_DATADIR="/var/lib/dashd"
 fi
 
-BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf}
-BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
-BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
+BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/dash/dash.conf}
+BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/dashd}
+BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/dashd.pid}
 BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
-BITCOIND_USER=${BITCOIND_USER:-bitcoin}
-BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
-BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
+BITCOIND_USER=${BITCOIND_USER:-dash}
+BITCOIND_GROUP=${BITCOIND_GROUP:-dash}
+BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/dashd}
 
-name="Bitcoin Core Daemon"
-description="Bitcoin crypto-currency p2p network daemon"
+name="Dash Core Daemon"
+description="Dash crypto-currency p2p network daemon"
 
-command="/usr/bin/bitcoind"
+command="/usr/bin/dashd"
 command_args="-pid=\"${BITCOIND_PIDFILE}\" \
 		-conf=\"${BITCOIND_CONFIGFILE}\" \
 		-datadir=\"${BITCOIND_DATADIR}\" \
@@ -65,7 +65,7 @@ checkconfig()
 {
 	if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
 		eerror ""
-		eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
+		eerror "ERROR: You must set a secure rpcpassword to run dashd."
 		eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
 		eerror ""
 		eerror "This password is security critical to securing wallets "
@@ -78,7 +78,7 @@ checkconfig()
 		eerror "It is also recommended that you also set alertnotify so you are "
 		eerror "notified of problems:"
 		eerror ""
-		eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
+		eerror "ie: alertnotify=echo %%s | mail -s \"Dash Alert\"" \
 			"admin@foo.com"
 		eerror ""
 		return 1
diff --git a/contrib/init/dashd.openrcconf b/contrib/init/dashd.openrcconf
new file mode 100644
index 000000000000..05f033ae8ec0
--- /dev/null
+++ b/contrib/init/dashd.openrcconf
@@ -0,0 +1,27 @@
+# /etc/conf.d/dashd: config file for /etc/init.d/dashd
+
+# Config file location
+#BITCOIND_CONFIGFILE="/etc/dash/dash.conf"
+
+# What directory to write pidfile to?  (created and owned by $BITCOIND_USER)
+#BITCOIND_PIDDIR="/var/run/dashd"
+
+# What filename to give the pidfile
+#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/dashd.pid"
+
+# Where to write dashd data (be mindful that the blockchain is large)
+#BITCOIND_DATADIR="/var/lib/dashd"
+
+# User and group to own dashd process
+#BITCOIND_USER="dash"
+#BITCOIND_GROUP="dash"
+
+# Path to dashd executable
+#BITCOIND_BIN="/usr/bin/dashd"
+
+# Nice value to run dashd under
+#BITCOIND_NICE=0
+
+# Additional options (avoid -conf and -datadir, use flags above)
+BITCOIND_OPTS="-disablewallet"
+
diff --git a/contrib/init/dashd.service b/contrib/init/dashd.service
new file mode 100644
index 000000000000..732ac647d38a
--- /dev/null
+++ b/contrib/init/dashd.service
@@ -0,0 +1,22 @@
+[Unit]
+Description=Dash's distributed currency daemon
+After=network.target
+
+[Service]
+User=dash
+Group=dash
+
+Type=forking
+PIDFile=/var/lib/dashd/dashd.pid
+ExecStart=/usr/bin/dashd -daemon -pid=/var/lib/dashd/dashd.pid \
+-conf=/etc/dash/dash.conf -datadir=/var/lib/dashd -disablewallet
+
+Restart=always
+PrivateTmp=true
+TimeoutStopSec=60s
+TimeoutStartSec=2s
+StartLimitInterval=120s
+StartLimitBurst=5
+
+[Install]
+WantedBy=multi-user.target
diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh
index 7b3eb1b19741..b9c64ef94078 100755
--- a/contrib/macdeploy/detached-sig-apply.sh
+++ b/contrib/macdeploy/detached-sig-apply.sh
@@ -5,7 +5,7 @@ UNSIGNED=$1
 SIGNATURE=$2
 ARCH=x86_64
 ROOTDIR=dist
-BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
+BUNDLE=${ROOTDIR}/Dash-Qt.app
 TEMPDIR=signed.temp
 OUTDIR=signed-app
 
diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh
index aff4f08da8be..200b71ce44e8 100755
--- a/contrib/macdeploy/detached-sig-create.sh
+++ b/contrib/macdeploy/detached-sig-create.sh
@@ -2,7 +2,7 @@
 set -e
 
 ROOTDIR=dist
-BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
+BUNDLE=${ROOTDIR}/Dash-Qt.app
 CODESIGN=codesign
 TEMPDIR=sign.temp
 TEMPLIST=${TEMPDIR}/signatures.txt
diff --git a/doc/release-notes.md b/doc/release-notes.md
index e64e78ae1f65..96b0fbe0475e 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,117 +1,5 @@
 Dash Core tree 0.11.x release notes can be found here:
 - [v0.11.0](release-notes/release-notes-0.11.0.md) released Jan/15/2015
 - [v0.11.1](release-notes/release-notes-0.11.1.md) released Feb/10/2015.
-- [v0.11.2](release-notes/release-notes-0.11.2.md) not released yet.
-
-***TODO***
-
-Bitcoin Core version 0.10.1 is now available from:
-
-  https://bitcoin.org/bin/0.10.1/
-
-This is a new minor version release, bringing bug fixes and translation 
-updates. If you are using 0.10.0, it is recommended to upgrade to this
-version.
-
-Please report bugs using the issue tracker at github:
-
-  https://github.com/bitcoin/bitcoin/issues
-
-Upgrading and downgrading
-=========================
-
-How to Upgrade
---------------
-
-If you are running an older version, shut it down. Wait until it has completely
-shut down (which might take a few minutes for older versions), then run the
-installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
-bitcoind/bitcoin-qt (on Linux).
-
-Downgrade warning
-------------------
-
-Because release 0.10.0 and later makes use of headers-first synchronization and
-parallel block download (see further), the block files and databases are not
-backwards-compatible with pre-0.10 versions of Bitcoin Core or other software:
-
-* Blocks will be stored on disk out of order (in the order they are
-received, really), which makes it incompatible with some tools or
-other programs. Reindexing using earlier versions will also not work
-anymore as a result of this.
-
-* The block index database will now hold headers for which no block is
-stored on disk, which earlier versions won't support.
-
-If you want to be able to downgrade smoothly, make a backup of your entire data
-directory. Without this your node will need start syncing (or importing from
-bootstrap.dat) anew afterwards. It is possible that the data from a completely
-synchronised 0.10 node may be usable in older versions as-is, but this is not
-supported and may break as soon as the older version attempts to reindex.
-
-This does not affect wallet forward or backward compatibility.
-
-Notable changes
-===============
-
-
-0.10.1 Change log
-=================
-
-Detailed release notes follow. This overview includes changes that affect external
-behavior, not code moves, refactors or string updates.
-
-RPC:
-- `7f502be` fix crash: createmultisig and addmultisigaddress
-
-Block (database) and transaction handling:
-- `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
-- `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates
-- `002c8a2` fix possible block db breakage during re-index
-
-P2P protocol and network code:
-- `78f64ef` don't trickle for whitelisted nodes
-- `ca301bf` Reduce fingerprinting through timestamps in 'addr' messages.
-- `200f293` Ignore getaddr messages on Outbound connections.
-- `d5d8998` Limit message sizes before transfer
-- `aeb9279` Better fingerprinting protection for non-main-chain getdatas.
-
-Validation:
-- `d148f62` Acquire CCheckQueue's lock to avoid race condition
-
-Build system:
-- `8752b5c` 0.10 fix for crashes on OSX 10.6
-
-Wallet:
-- N/A
-
-GUI:
-- `2c08406` some mac specifiy cleanup (memory handling, unnecessary code)
-- `81145a6` fix OSX dock icon window reopening
-- `786cf72` fix a issue where "command line options"-action overwrite "Preference"-action (on OSX)
-
-Tests:
-- `1117378` add RPC test for InvalidateBlock
-
-Miscellaneous:
-- `c9e022b` Initialization: set Boost path locale in main thread
-- `23126a0` Sanitize command strings before logging them.
-
-Credits
-=======
-
-Thanks to everyone who contributed to this release:
-
-- Alex Morcos
-- Cory Fields
-- dexX7
-- fsb4000
-- Gregory Maxwell
-- Ivan Pustogarov
-- Jonas Schnelli
-- Pieter Wuille
-- Ruben de Vries
-- Suhas Daftuar
-- Wladimir J. van der Laan
-
-As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
+- [v0.11.2](release-notes/release-notes-0.11.2.md) released Mar/25/2015.
+- [v0.12.0](release-notes/release-notes-0.12.0.md) not released yet.
diff --git a/doc/release-notes/release-notes-0.12.0.md b/doc/release-notes/release-notes-0.12.0.md
new file mode 100644
index 000000000000..c8332b2e1792
--- /dev/null
+++ b/doc/release-notes/release-notes-0.12.0.md
@@ -0,0 +1,60 @@
+*This is a draft!*
+
+0.12.0 Release notes
+====================
+
+
+Dash Core version 0.11.2 is now available from:
+
+  https://dashpay.io/downloads
+
+Please report bugs using the issue tracker at github:
+
+  https://github.com/dashpay/dash/issues
+
+
+How to Upgrade
+--------------
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or
+dashd/dash-qt (on Linux).
+
+Downgrade warning
+------------------
+
+Because release 0.12.0 and later makes use of headers-first synchronization and
+parallel block download (see further), the block files and databases are not
+backwards-compatible with pre-0.12 versions of Dash Core or other software:
+
+* Blocks will be stored on disk out of order (in the order they are
+received, really), which makes it incompatible with some tools or
+other programs. Reindexing using earlier versions will also not work
+anymore as a result of this.
+
+* The block index database will now hold headers for which no block is
+stored on disk, which earlier versions won't support.
+
+If you want to be able to downgrade smoothly, make a backup of your entire data
+directory. Without this your node will need start syncing (or importing from
+bootstrap.dat) anew afterwards. It is possible that the data from a completely
+synchronised 0.10 node may be usable in older versions as-is, but this is not
+supported and may break as soon as the older version attempts to reindex.
+
+This does not affect wallet forward or backward compatibility.
+
+
+0.12.0 changelog
+----------------
+
+Bitcoin Core version 0.10.1
+
+Credits
+--------
+
+Thanks to who contributed to this release, at least:
+
+- *to do ..*
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/dash/).
diff --git a/doc/unit-tests.md b/doc/unit-tests.md
index 409c2317735c..1cc34a8af334 100644
--- a/doc/unit-tests.md
+++ b/doc/unit-tests.md
@@ -6,13 +6,13 @@ and tests weren't explicitly disabled.
 
 After configuring, they can be run with 'make check'.
 
-To run the bitcoind tests manually, launch src/test/test_dash .
+To run the dashd tests manually, launch src/test/test_dash .
 
-To add more bitcoind tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
+To add more dashd tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
 .cpp files in the test/ directory or add new .cpp files that
 implement new BOOST_AUTO_TEST_SUITE sections.
 
-To run the bitcoin-qt tests manually, launch src/qt/test/bitcoin-qt_test
+To run the dash-qt tests manually, launch src/qt/test/dash-qt_test
 
-To add more bitcoin-qt tests, add them to the `src/qt/test/` directory and
+To add more dash-qt tests, add them to the `src/qt/test/` directory and
 the `src/qt/test/test_main.cpp` file.
diff --git a/share/qt/Info.plist.in b/share/qt/Info.plist.in
index d7e7ca4a160f..1a9c34038fcb 100644
--- a/share/qt/Info.plist.in
+++ b/share/qt/Info.plist.in
@@ -32,7 +32,7 @@
   <string>Dash-Qt</string>
 
   <key>CFBundleIdentifier</key>
-  <string>org.dashfoundation.Dash-Qt</string>
+  <string>io.dashpay.Dash-Qt</string>
 
   <key>CFBundleURLTypes</key>
   <array>
@@ -40,7 +40,7 @@
       <key>CFBundleTypeRole</key>
       <string>Editor</string>
       <key>CFBundleURLName</key>
-      <string>io.dash.DarkcoinPayment</string>
+      <string>io.dash.DashPayment</string>
       <key>CFBundleURLSchemes</key>
       <array>
         <string>dash</string>
diff --git a/share/seeds/generate-seeds.py b/share/seeds/generate-seeds.py
index cdd683121856..2431ded86edb 100755
--- a/share/seeds/generate-seeds.py
+++ b/share/seeds/generate-seeds.py
@@ -117,17 +117,17 @@ def main():
     g.write('#ifndef BITCOIN_CHAINPARAMSSEEDS_H\n')
     g.write('#define BITCOIN_CHAINPARAMSSEEDS_H\n')
     g.write('/**\n')
-    g.write(' * List of fixed seed nodes for the bitcoin network\n')
+    g.write(' * List of fixed seed nodes for the dash network\n')
     g.write(' * AUTOGENERATED by share/seeds/generate-seeds.py\n')
     g.write(' *\n')
     g.write(' * Each line contains a 16-byte IPv6 address and a port.\n')
     g.write(' * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.\n')
     g.write(' */\n')
     with open(os.path.join(indir,'nodes_main.txt'),'r') as f:
-        process_nodes(g, f, 'pnSeed6_main', 8333)
+        process_nodes(g, f, 'pnSeed6_main', 9999)
     g.write('\n')
     with open(os.path.join(indir,'nodes_test.txt'),'r') as f:
-        process_nodes(g, f, 'pnSeed6_test', 18333)
+        process_nodes(g, f, 'pnSeed6_test', 19999)
     g.write('#endif // BITCOIN_CHAINPARAMSSEEDS_H\n')
             
 if __name__ == '__main__':
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
deleted file mode 100644
index c1be1229d3b4..000000000000
--- a/src/bitcoin-tx.cpp
+++ /dev/null
@@ -1,633 +0,0 @@
-// Copyright (c) 2009-2014 The Bitcoin developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "base58.h"
-#include "clientversion.h"
-#include "primitives/block.h" // for MAX_BLOCK_SIZE
-#include "primitives/transaction.h"
-#include "core_io.h"
-#include "coins.h"
-#include "keystore.h"
-#include "script/script.h"
-#include "script/sign.h"
-#include "ui_interface.h" // for _(...)
-#include "univalue/univalue.h"
-#include "util.h"
-#include "utilstrencodings.h"
-#include "utilmoneystr.h"
-
-#include <stdio.h>
-
-#include <boost/algorithm/string.hpp>
-#include <boost/assign/list_of.hpp>
-
-using namespace boost::assign;
-using namespace std;
-
-static bool fCreateBlank;
-static map<string,UniValue> registers;
-CClientUIInterface uiInterface;
-
-static bool AppInitRawTx(int argc, char* argv[])
-{
-    //
-    // Parameters
-    //
-    ParseParameters(argc, argv);
-
-    // Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
-    if (!SelectParamsFromCommandLine()) {
-        fprintf(stderr, "Error: Invalid combination of -regtest and -testnet.\n");
-        return false;
-    }
-
-    fCreateBlank = GetBoolArg("-create", false);
-
-    if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
-    {
-        // First part of help message is specific to this utility
-        std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
-            _("Usage:") + "\n" +
-              "  bitcoin-tx [options] <hex-tx> [commands]  " + _("Update hex-encoded bitcoin transaction") + "\n" +
-              "  bitcoin-tx [options] -create [commands]   " + _("Create hex-encoded bitcoin transaction") + "\n" +
-              "\n";
-
-        fprintf(stdout, "%s", strUsage.c_str());
-
-        strUsage = _("Options:") + "\n";
-        strUsage += "  -?                      " + _("This help message") + "\n";
-        strUsage += "  -create                 " + _("Create new, empty TX.") + "\n";
-        strUsage += "  -json                   " + _("Select JSON output") + "\n";
-        strUsage += "  -txid                   " + _("Output only the hex-encoded transaction id of the resultant transaction.") + "\n";
-        strUsage += "  -regtest                " + _("Enter regression test mode, which uses a special chain in which blocks can be solved instantly.") + "\n";
-        strUsage += "  -testnet                " + _("Use the test network") + "\n";
-        strUsage += "\n";
-
-        fprintf(stdout, "%s", strUsage.c_str());
-
-
-        strUsage = _("Commands:") + "\n";
-        strUsage += "  delin=N                " + _("Delete input N from TX") + "\n";
-        strUsage += "  delout=N               " + _("Delete output N from TX") + "\n";
-        strUsage += "  in=TXID:VOUT           " + _("Add input to TX") + "\n";
-        strUsage += "  locktime=N             " + _("Set TX lock time to N") + "\n";
-        strUsage += "  nversion=N             " + _("Set TX version to N") + "\n";
-        strUsage += "  outaddr=VALUE:ADDRESS  " + _("Add address-based output to TX") + "\n";
-        strUsage += "  outscript=VALUE:SCRIPT " + _("Add raw script output to TX") + "\n";
-        strUsage += "  sign=SIGHASH-FLAGS     " + _("Add zero or more signatures to transaction") + "\n";
-        strUsage += "      This command requires JSON registers:\n";
-        strUsage += "      prevtxs=JSON object\n";
-        strUsage += "      privatekeys=JSON object\n";
-        strUsage += "      See signrawtransaction docs for format of sighash flags, JSON objects.\n";
-        strUsage += "\n";
-        fprintf(stdout, "%s", strUsage.c_str());
-
-        strUsage = _("Register Commands:") + "\n";
-        strUsage += "  load=NAME:FILENAME     " + _("Load JSON file FILENAME into register NAME") + "\n";
-        strUsage += "  set=NAME:JSON-STRING   " + _("Set register NAME to given JSON-STRING") + "\n";
-        strUsage += "\n";
-        fprintf(stdout, "%s", strUsage.c_str());
-
-        return false;
-    }
-    return true;
-}
-
-static void RegisterSetJson(const string& key, const string& rawJson)
-{
-    UniValue val;
-    if (!val.read(rawJson)) {
-        string strErr = "Cannot parse JSON for key " + key;
-        throw runtime_error(strErr);
-    }
-
-    registers[key] = val;
-}
-
-static void RegisterSet(const string& strInput)
-{
-    // separate NAME:VALUE in string
-    size_t pos = strInput.find(':');
-    if ((pos == string::npos) ||
-        (pos == 0) ||
-        (pos == (strInput.size() - 1)))
-        throw runtime_error("Register input requires NAME:VALUE");
-
-    string key = strInput.substr(0, pos);
-    string valStr = strInput.substr(pos + 1, string::npos);
-
-    RegisterSetJson(key, valStr);
-}
-
-static void RegisterLoad(const string& strInput)
-{
-    // separate NAME:FILENAME in string
-    size_t pos = strInput.find(':');
-    if ((pos == string::npos) ||
-        (pos == 0) ||
-        (pos == (strInput.size() - 1)))
-        throw runtime_error("Register load requires NAME:FILENAME");
-
-    string key = strInput.substr(0, pos);
-    string filename = strInput.substr(pos + 1, string::npos);
-
-    FILE *f = fopen(filename.c_str(), "r");
-    if (!f) {
-        string strErr = "Cannot open file " + filename;
-        throw runtime_error(strErr);
-    }
-
-    // load file chunks into one big buffer
-    string valStr;
-    while ((!feof(f)) && (!ferror(f))) {
-        char buf[4096];
-        int bread = fread(buf, 1, sizeof(buf), f);
-        if (bread <= 0)
-            break;
-
-        valStr.insert(valStr.size(), buf, bread);
-    }
-
-    if (ferror(f)) {
-        string strErr = "Error reading file " + filename;
-        throw runtime_error(strErr);
-    }
-
-    fclose(f);
-
-    // evaluate as JSON buffer register
-    RegisterSetJson(key, valStr);
-}
-
-static void MutateTxVersion(CMutableTransaction& tx, const string& cmdVal)
-{
-    int64_t newVersion = atoi64(cmdVal);
-    if (newVersion < 1 || newVersion > CTransaction::CURRENT_VERSION)
-        throw runtime_error("Invalid TX version requested");
-
-    tx.nVersion = (int) newVersion;
-}
-
-static void MutateTxLocktime(CMutableTransaction& tx, const string& cmdVal)
-{
-    int64_t newLocktime = atoi64(cmdVal);
-    if (newLocktime < 0LL || newLocktime > 0xffffffffLL)
-        throw runtime_error("Invalid TX locktime requested");
-
-    tx.nLockTime = (unsigned int) newLocktime;
-}
-
-static void MutateTxAddInput(CMutableTransaction& tx, const string& strInput)
-{
-    // separate TXID:VOUT in string
-    size_t pos = strInput.find(':');
-    if ((pos == string::npos) ||
-        (pos == 0) ||
-        (pos == (strInput.size() - 1)))
-        throw runtime_error("TX input missing separator");
-
-    // extract and validate TXID
-    string strTxid = strInput.substr(0, pos);
-    if ((strTxid.size() != 64) || !IsHex(strTxid))
-        throw runtime_error("invalid TX input txid");
-    uint256 txid(strTxid);
-
-    static const unsigned int minTxOutSz = 9;
-    static const unsigned int maxVout = MAX_BLOCK_SIZE / minTxOutSz;
-
-    // extract and validate vout
-    string strVout = strInput.substr(pos + 1, string::npos);
-    int vout = atoi(strVout);
-    if ((vout < 0) || (vout > (int)maxVout))
-        throw runtime_error("invalid TX input vout");
-
-    // append to transaction input list
-    CTxIn txin(txid, vout);
-    tx.vin.push_back(txin);
-}
-
-static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
-{
-    // separate VALUE:ADDRESS in string
-    size_t pos = strInput.find(':');
-    if ((pos == string::npos) ||
-        (pos == 0) ||
-        (pos == (strInput.size() - 1)))
-        throw runtime_error("TX output missing separator");
-
-    // extract and validate VALUE
-    string strValue = strInput.substr(0, pos);
-    CAmount value;
-    if (!ParseMoney(strValue, value))
-        throw runtime_error("invalid TX output value");
-
-    // extract and validate ADDRESS
-    string strAddr = strInput.substr(pos + 1, string::npos);
-    CBitcoinAddress addr(strAddr);
-    if (!addr.IsValid())
-        throw runtime_error("invalid TX output address");
-
-    // build standard output script via GetScriptForDestination()
-    CScript scriptPubKey = GetScriptForDestination(addr.Get());
-
-    // construct TxOut, append to transaction output list
-    CTxOut txout(value, scriptPubKey);
-    tx.vout.push_back(txout);
-}
-
-static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput)
-{
-    // separate VALUE:SCRIPT in string
-    size_t pos = strInput.find(':');
-    if ((pos == string::npos) ||
-        (pos == 0))
-        throw runtime_error("TX output missing separator");
-
-    // extract and validate VALUE
-    string strValue = strInput.substr(0, pos);
-    CAmount value;
-    if (!ParseMoney(strValue, value))
-        throw runtime_error("invalid TX output value");
-
-    // extract and validate script
-    string strScript = strInput.substr(pos + 1, string::npos);
-    CScript scriptPubKey = ParseScript(strScript); // throws on err
-
-    // construct TxOut, append to transaction output list
-    CTxOut txout(value, scriptPubKey);
-    tx.vout.push_back(txout);
-}
-
-static void MutateTxDelInput(CMutableTransaction& tx, const string& strInIdx)
-{
-    // parse requested deletion index
-    int inIdx = atoi(strInIdx);
-    if (inIdx < 0 || inIdx >= (int)tx.vin.size()) {
-        string strErr = "Invalid TX input index '" + strInIdx + "'";
-        throw runtime_error(strErr.c_str());
-    }
-
-    // delete input from transaction
-    tx.vin.erase(tx.vin.begin() + inIdx);
-}
-
-static void MutateTxDelOutput(CMutableTransaction& tx, const string& strOutIdx)
-{
-    // parse requested deletion index
-    int outIdx = atoi(strOutIdx);
-    if (outIdx < 0 || outIdx >= (int)tx.vout.size()) {
-        string strErr = "Invalid TX output index '" + strOutIdx + "'";
-        throw runtime_error(strErr.c_str());
-    }
-
-    // delete output from transaction
-    tx.vout.erase(tx.vout.begin() + outIdx);
-}
-
-static const unsigned int N_SIGHASH_OPTS = 6;
-static const struct {
-    const char *flagStr;
-    int flags;
-} sighashOptions[N_SIGHASH_OPTS] = {
-    {"ALL", SIGHASH_ALL},
-    {"NONE", SIGHASH_NONE},
-    {"SINGLE", SIGHASH_SINGLE},
-    {"ALL|ANYONECANPAY", SIGHASH_ALL|SIGHASH_ANYONECANPAY},
-    {"NONE|ANYONECANPAY", SIGHASH_NONE|SIGHASH_ANYONECANPAY},
-    {"SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY},
-};
-
-static bool findSighashFlags(int& flags, const string& flagStr)
-{
-    flags = 0;
-
-    for (unsigned int i = 0; i < N_SIGHASH_OPTS; i++) {
-        if (flagStr == sighashOptions[i].flagStr) {
-            flags = sighashOptions[i].flags;
-            return true;
-        }
-    }
-
-    return false;
-}
-
-uint256 ParseHashUO(map<string,UniValue>& o, string strKey)
-{
-    if (!o.count(strKey))
-        return 0;
-    return ParseHashUV(o[strKey], strKey);
-}
-
-vector<unsigned char> ParseHexUO(map<string,UniValue>& o, string strKey)
-{
-    if (!o.count(strKey)) {
-        vector<unsigned char> emptyVec;
-        return emptyVec;
-    }
-    return ParseHexUV(o[strKey], strKey);
-}
-
-static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
-{
-    int nHashType = SIGHASH_ALL;
-
-    if (flagStr.size() > 0)
-        if (!findSighashFlags(nHashType, flagStr))
-            throw runtime_error("unknown sighash flag/sign option");
-
-    vector<CTransaction> txVariants;
-    txVariants.push_back(tx);
-
-    // mergedTx will end up with all the signatures; it
-    // starts as a clone of the raw tx:
-    CMutableTransaction mergedTx(txVariants[0]);
-    bool fComplete = true;
-    CCoinsView viewDummy;
-    CCoinsViewCache view(&viewDummy);
-
-    if (!registers.count("privatekeys"))
-        throw runtime_error("privatekeys register variable must be set.");
-    bool fGivenKeys = false;
-    CBasicKeyStore tempKeystore;
-    UniValue keysObj = registers["privatekeys"];
-    fGivenKeys = true;
-
-    for (unsigned int kidx = 0; kidx < keysObj.count(); kidx++) {
-        if (!keysObj[kidx].isStr())
-            throw runtime_error("privatekey not a string");
-        CBitcoinSecret vchSecret;
-        bool fGood = vchSecret.SetString(keysObj[kidx].getValStr());
-        if (!fGood)
-            throw runtime_error("privatekey not valid");
-
-        CKey key = vchSecret.GetKey();
-        tempKeystore.AddKey(key);
-    }
-
-    // Add previous txouts given in the RPC call:
-    if (!registers.count("prevtxs"))
-        throw runtime_error("prevtxs register variable must be set.");
-    UniValue prevtxsObj = registers["prevtxs"];
-    {
-        for (unsigned int previdx = 0; previdx < prevtxsObj.count(); previdx++) {
-            UniValue prevOut = prevtxsObj[previdx];
-            if (!prevOut.isObject())
-                throw runtime_error("expected prevtxs internal object");
-
-            map<string,UniValue::VType> types = map_list_of("txid", UniValue::VSTR)("vout",UniValue::VNUM)("scriptPubKey",UniValue::VSTR);
-            if (!prevOut.checkObject(types))
-                throw runtime_error("prevtxs internal object typecheck fail");
-
-            uint256 txid = ParseHashUV(prevOut["txid"], "txid");
-
-            int nOut = atoi(prevOut["vout"].getValStr());
-            if (nOut < 0)
-                throw runtime_error("vout must be positive");
-
-            vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
-            CScript scriptPubKey(pkData.begin(), pkData.end());
-
-            {
-                CCoinsModifier coins = view.ModifyCoins(txid);
-                if (coins->IsAvailable(nOut) && coins->vout[nOut].scriptPubKey != scriptPubKey) {
-                    string err("Previous output scriptPubKey mismatch:\n");
-                    err = err + coins->vout[nOut].scriptPubKey.ToString() + "\nvs:\n"+
-                        scriptPubKey.ToString();
-                    throw runtime_error(err);
-                }
-                if ((unsigned int)nOut >= coins->vout.size())
-                    coins->vout.resize(nOut+1);
-                coins->vout[nOut].scriptPubKey = scriptPubKey;
-                coins->vout[nOut].nValue = 0; // we don't know the actual output value
-            }
-
-            // if redeemScript given and private keys given,
-            // add redeemScript to the tempKeystore so it can be signed:
-            if (fGivenKeys && scriptPubKey.IsPayToScriptHash() &&
-                prevOut.exists("redeemScript")) {
-                UniValue v = prevOut["redeemScript"];
-                vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
-                CScript redeemScript(rsData.begin(), rsData.end());
-                tempKeystore.AddCScript(redeemScript);
-            }
-        }
-    }
-
-    const CKeyStore& keystore = tempKeystore;
-
-    bool fHashSingle = ((nHashType & ~SIGHASH_ANYONECANPAY) == SIGHASH_SINGLE);
-
-    // Sign what we can:
-    for (unsigned int i = 0; i < mergedTx.vin.size(); i++) {
-        CTxIn& txin = mergedTx.vin[i];
-        const CCoins* coins = view.AccessCoins(txin.prevout.hash);
-        if (!coins || !coins->IsAvailable(txin.prevout.n)) {
-            fComplete = false;
-            continue;
-        }
-        const CScript& prevPubKey = coins->vout[txin.prevout.n].scriptPubKey;
-
-        txin.scriptSig.clear();
-        // Only sign SIGHASH_SINGLE if there's a corresponding output:
-        if (!fHashSingle || (i < mergedTx.vout.size()))
-            SignSignature(keystore, prevPubKey, mergedTx, i, nHashType);
-
-        // ... and merge in other signatures:
-        BOOST_FOREACH(const CTransaction& txv, txVariants) {
-            txin.scriptSig = CombineSignatures(prevPubKey, mergedTx, i, txin.scriptSig, txv.vin[i].scriptSig);
-        }
-        if (!VerifyScript(txin.scriptSig, prevPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i)))
-            fComplete = false;
-    }
-
-    if (fComplete) {
-        // do nothing... for now
-        // perhaps store this for later optional JSON output
-    }
-
-    tx = mergedTx;
-}
-
-static void MutateTx(CMutableTransaction& tx, const string& command,
-                     const string& commandVal)
-{
-    if (command == "nversion")
-        MutateTxVersion(tx, commandVal);
-    else if (command == "locktime")
-        MutateTxLocktime(tx, commandVal);
-
-    else if (command == "delin")
-        MutateTxDelInput(tx, commandVal);
-    else if (command == "in")
-        MutateTxAddInput(tx, commandVal);
-
-    else if (command == "delout")
-        MutateTxDelOutput(tx, commandVal);
-    else if (command == "outaddr")
-        MutateTxAddOutAddr(tx, commandVal);
-    else if (command == "outscript")
-        MutateTxAddOutScript(tx, commandVal);
-
-    else if (command == "sign")
-        MutateTxSign(tx, commandVal);
-
-    else if (command == "load")
-        RegisterLoad(commandVal);
-
-    else if (command == "set")
-        RegisterSet(commandVal);
-
-    else
-        throw runtime_error("unknown command");
-}
-
-static void OutputTxJSON(const CTransaction& tx)
-{
-    UniValue entry(UniValue::VOBJ);
-    TxToUniv(tx, 0, entry);
-
-    string jsonOutput = entry.write(4);
-    fprintf(stdout, "%s\n", jsonOutput.c_str());
-}
-
-static void OutputTxHash(const CTransaction& tx)
-{
-    string strHexHash = tx.GetHash().GetHex(); // the hex-encoded transaction hash (aka the transaction id)
-
-    fprintf(stdout, "%s\n", strHexHash.c_str());
-}
-
-static void OutputTxHex(const CTransaction& tx)
-{
-    string strHex = EncodeHexTx(tx);
-
-    fprintf(stdout, "%s\n", strHex.c_str());
-}
-
-static void OutputTx(const CTransaction& tx)
-{
-    if (GetBoolArg("-json", false))
-        OutputTxJSON(tx);
-    else if (GetBoolArg("-txid", false))
-        OutputTxHash(tx);
-    else
-        OutputTxHex(tx);
-}
-
-static string readStdin()
-{
-    char buf[4096];
-    string ret;
-
-    while (!feof(stdin)) {
-        size_t bread = fread(buf, 1, sizeof(buf), stdin);
-        ret.append(buf, bread);
-        if (bread < sizeof(buf))
-            break;
-    }
-
-    if (ferror(stdin))
-        throw runtime_error("error reading stdin");
-
-    boost::algorithm::trim_right(ret);
-
-    return ret;
-}
-
-static int CommandLineRawTx(int argc, char* argv[])
-{
-    string strPrint;
-    int nRet = 0;
-    try {
-        // Skip switches; Permit common stdin convention "-"
-        while (argc > 1 && IsSwitchChar(argv[1][0]) &&
-               (argv[1][1] != 0)) {
-            argc--;
-            argv++;
-        }
-
-        CTransaction txDecodeTmp;
-        int startArg;
-
-        if (!fCreateBlank) {
-            // require at least one param
-            if (argc < 2)
-                throw runtime_error("too few parameters");
-
-            // param: hex-encoded bitcoin transaction
-            string strHexTx(argv[1]);
-            if (strHexTx == "-")                 // "-" implies standard input
-                strHexTx = readStdin();
-
-            if (!DecodeHexTx(txDecodeTmp, strHexTx))
-                throw runtime_error("invalid transaction encoding");
-
-            startArg = 2;
-        } else
-            startArg = 1;
-
-        CMutableTransaction tx(txDecodeTmp);
-
-        for (int i = startArg; i < argc; i++) {
-            string arg = argv[i];
-            string key, value;
-            size_t eqpos = arg.find('=');
-            if (eqpos == string::npos)
-                key = arg;
-            else {
-                key = arg.substr(0, eqpos);
-                value = arg.substr(eqpos + 1);
-            }
-
-            MutateTx(tx, key, value);
-        }
-
-        OutputTx(tx);
-    }
-
-    catch (boost::thread_interrupted) {
-        throw;
-    }
-    catch (std::exception& e) {
-        strPrint = string("error: ") + e.what();
-        nRet = EXIT_FAILURE;
-    }
-    catch (...) {
-        PrintExceptionContinue(NULL, "CommandLineRawTx()");
-        throw;
-    }
-
-    if (strPrint != "") {
-        fprintf((nRet == 0 ? stdout : stderr), "%s\n", strPrint.c_str());
-    }
-    return nRet;
-}
-
-int main(int argc, char* argv[])
-{
-    SetupEnvironment();
-
-    try {
-        if(!AppInitRawTx(argc, argv))
-            return EXIT_FAILURE;
-    }
-    catch (std::exception& e) {
-        PrintExceptionContinue(&e, "AppInitRawTx()");
-        return EXIT_FAILURE;
-    } catch (...) {
-        PrintExceptionContinue(NULL, "AppInitRawTx()");
-        return EXIT_FAILURE;
-    }
-
-    int ret = EXIT_FAILURE;
-    try {
-        ret = CommandLineRawTx(argc, argv);
-    }
-    catch (std::exception& e) {
-        PrintExceptionContinue(&e, "CommandLineRawTx()");
-    } catch (...) {
-        PrintExceptionContinue(NULL, "CommandLineRawTx()");
-    }
-    return ret;
-}
diff --git a/src/chainparamsbase.h b/src/chainparamsbase.h
index eaf3fea1b6f8..71a7176d8c23 100644
--- a/src/chainparamsbase.h
+++ b/src/chainparamsbase.h
@@ -9,8 +9,8 @@
 #include <vector>
 
 /**
- * CBaseChainParams defines the base parameters (shared between bitcoin-cli and bitcoind)
- * of a given instance of the Bitcoin system.
+ * CBaseChainParams defines the base parameters (shared between dash-cli and dashd)
+ * of a given instance of the Dash system.
  */
 class CBaseChainParams
 {
diff --git a/src/chainparamsseeds.h b/src/chainparamsseeds.h
index 6b6e5103f5fd..eb100e194350 100644
--- a/src/chainparamsseeds.h
+++ b/src/chainparamsseeds.h
@@ -7,6 +7,7 @@
  * Each line contains a 16-byte IPv6 address and a port.
  * IPv4 as well as onion addresses are wrapped inside a IPv6 address accordingly.
  */
+ // ***TODO*** REGENERATE
 static SeedSpec6 pnSeed6_main[] = {
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x21,0xc5,0x6e}, 8333},
     {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x01,0x22,0xb4,0xf5}, 8333},
diff --git a/src/clientversion.cpp b/src/clientversion.cpp
index 731bdc7a73cb..c51c261dd18b 100644
--- a/src/clientversion.cpp
+++ b/src/clientversion.cpp
@@ -10,10 +10,10 @@
 
 /**
  * Name of client reported in the 'version' message. Report the same name
- * for both bitcoind and bitcoin-core, to make it harder for attackers to
+ * for both dashd and dash-qt, to make it harder for attackers to
  * target servers or GUI users specifically.
  */
-const std::string CLIENT_NAME("Dash");
+const std::string CLIENT_NAME("Dash Core");
 
 /**
  * Client version number
diff --git a/src/dash-cli.cpp b/src/dash-cli.cpp
index 45bf84f5a069..798741ddac5d 100644
--- a/src/dash-cli.cpp
+++ b/src/dash-cli.cpp
@@ -71,9 +71,9 @@ static bool AppInitRPC(int argc, char* argv[])
         std::string strUsage = _("Dash Core RPC client version") + " " + FormatFullVersion() + "\n";
         if (!mapArgs.count("-version")) {
             strUsage += "\n" + _("Usage:") + "\n" +
-                  "  bitcoin-cli [options] <command> [params]  " + _("Send command to Dash Core") + "\n" +
-                  "  bitcoin-cli [options] help                " + _("List commands") + "\n" +
-                  "  bitcoin-cli [options] help <command>      " + _("Get help for a command") + "\n";
+                  "  dash-cli [options] <command> [params]  " + _("Send command to Dash Core") + "\n" +
+                  "  dash-cli [options] help                " + _("List commands") + "\n" +
+                  "  dash-cli [options] help <command>      " + _("Get help for a command") + "\n";
 
             strUsage += "\n" + HelpMessageCli();
         }
diff --git a/src/dash-tx.cpp b/src/dash-tx.cpp
index c1be1229d3b4..8e190604877b 100644
--- a/src/dash-tx.cpp
+++ b/src/dash-tx.cpp
@@ -47,10 +47,10 @@ static bool AppInitRawTx(int argc, char* argv[])
     if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
     {
         // First part of help message is specific to this utility
-        std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
+        std::string strUsage = _("Dash Core dash-tx utility version") + " " + FormatFullVersion() + "\n\n" +
             _("Usage:") + "\n" +
-              "  bitcoin-tx [options] <hex-tx> [commands]  " + _("Update hex-encoded bitcoin transaction") + "\n" +
-              "  bitcoin-tx [options] -create [commands]   " + _("Create hex-encoded bitcoin transaction") + "\n" +
+              "  dash-tx [options] <hex-tx> [commands]  " + _("Update hex-encoded dash transaction") + "\n" +
+              "  dash-tx [options] -create [commands]   " + _("Create hex-encoded dash transaction") + "\n" +
               "\n";
 
         fprintf(stdout, "%s", strUsage.c_str());
@@ -555,7 +555,7 @@ static int CommandLineRawTx(int argc, char* argv[])
             if (argc < 2)
                 throw runtime_error("too few parameters");
 
-            // param: hex-encoded bitcoin transaction
+            // param: hex-encoded dash transaction
             string strHexTx(argv[1]);
             if (strHexTx == "-")                 // "-" implies standard input
                 strHexTx = readStdin();
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 89cbeb62ed10..b2f400582178 100755
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -357,7 +357,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
 
     showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
     showHelpMessageAction->setMenuRole(QAction::NoRole);
-    showHelpMessageAction->setStatusTip(tr("Show the Bitcoin Core help message to get a list with possible Dash command-line options"));
+    showHelpMessageAction->setStatusTip(tr("Show the Dash Core help message to get a list with possible Dash command-line options"));
 
     connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
     connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
@@ -804,7 +804,7 @@ void BitcoinGUI::setNumBlocks(int count)
 
 void BitcoinGUI::message(const QString &title, const QString &message, unsigned int style, bool *ret)
 {
-    QString strTitle = tr("Dash"); // default title
+    QString strTitle = tr("Dash Core"); // default title
     // Default to information icon
     int nMBoxIcon = QMessageBox::Information;
     int nNotifyIcon = Notificator::Information;
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 21cb308e9f8d..1df30d261634 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -593,7 +593,7 @@ int main(int argc, char *argv[])
     /// 7a. parse masternode.conf
     string strErr;
     if(!masternodeConfig.read(strErr)) {
-        QMessageBox::critical(0, QObject::tr("Dash"),
+        QMessageBox::critical(0, QObject::tr("Dash Core"),
                               QObject::tr("Error reading masternode configuration file: %1").arg(strErr.c_str()));
         return false;
     }
diff --git a/src/qt/forms/receivecoinsdialog.ui b/src/qt/forms/receivecoinsdialog.ui
index 6e22d37c34c6..2b0f90a91019 100644
--- a/src/qt/forms/receivecoinsdialog.ui
+++ b/src/qt/forms/receivecoinsdialog.ui
@@ -48,7 +48,7 @@
         <item row="6" column="0">
          <widget class="QLabel" name="label_3">
           <property name="toolTip">
-           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
+           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</string>
           </property>
           <property name="text">
            <string>&amp;Message:</string>
@@ -71,7 +71,7 @@
         <item row="6" column="2">
          <widget class="QLineEdit" name="reqMessage">
           <property name="toolTip">
-           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</string>
+           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</string>
           </property>
          </widget>
         </item>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index acb106c3f858..84d4e4a8d6c5 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -904,7 +904,7 @@
                  <item>
                   <widget class="QCheckBox" name="checkBoxMinimumFee">
                    <property name="toolTip">
-                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</string>
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
                    </property>
                    <property name="text">
                     <string/>
@@ -917,7 +917,7 @@
                     <bool>true</bool>
                    </property>
                    <property name="toolTip">
-                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</string>
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
                    </property>
                    <property name="text">
                     <string>(read the tooltip)</string>
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index 260a46a7db72..205193ebffc3 100755
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -29,7 +29,7 @@ class QUrl;
 class QWidget;
 QT_END_NAMESPACE
 
-/** Utility functions used by the Bitcoin Qt UI.
+/** Utility functions used by the Dash Qt UI.
  */
 namespace GUIUtil
 {
@@ -37,14 +37,14 @@ namespace GUIUtil
     QString dateTimeStr(const QDateTime &datetime);
     QString dateTimeStr(qint64 nTime);
 
-    // Render Bitcoin addresses in monospace font
+    // Render Dash addresses in monospace font
     QFont bitcoinAddressFont();
 
     // Set up widgets for address and amounts
     void setupAddressWidget(QValidatedLineEdit *widget, QWidget *parent);
     void setupAmountWidget(QLineEdit *widget, QWidget *parent);
 
-    // Parse "bitcoin:" URI into recipient object, return true on successful parsing
+    // Parse "dash:" URI into recipient object, return true on successful parsing
     bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out);
     bool parseBitcoinURI(QString uri, SendCoinsRecipient *out);
     QString formatBitcoinURI(const SendCoinsRecipient &info);
diff --git a/src/qt/macnotificationhandler.mm b/src/qt/macnotificationhandler.mm
index aa50a0d9fbb0..0a342d98a609 100644
--- a/src/qt/macnotificationhandler.mm
+++ b/src/qt/macnotificationhandler.mm
@@ -13,7 +13,7 @@ @implementation NSBundle(returnCorrectIdentifier)
 - (NSString *)__bundleIdentifier
 {
     if (self == [NSBundle mainBundle]) {
-        return @"org.bitcoinfoundation.Bitcoin-Qt";
+        return @"io.dashpay.Dash-Qt";
     } else {
         return [self __bundleIdentifier];
     }
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index e1305b943764..f17491db309c 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -6,7 +6,7 @@
 #define BITCOIN_QT_PAYMENTSERVER_H
 
 // This class handles payment requests from clicking on
-// bitcoin: URIs
+// dash: URIs
 //
 // This is somewhat tricky, because we have to deal with
 // the situation where the user clicks on a link during
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index ec6a49070daa..c678a2de88d6 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -53,7 +53,7 @@ class RecentRequestEntryLessThan
     Qt::SortOrder order;
 };
 
-/** Model for list of recently generated payment requests / bitcoin: URIs.
+/** Model for list of recently generated payment requests / dash: URIs.
  * Part of wallet model.
  */
 class RecentRequestsTableModel: public QAbstractTableModel
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 90c0819eb852..ab932efbb9a9 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -65,7 +65,7 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
     } else {
         setWindowTitle(tr("Command-line options"));
         QString header = tr("Usage:") + "\n" +
-            "  bitcoin-qt [" + tr("command-line options") + "]                     " + "\n";
+            "  dash-qt [" + tr("command-line options") + "]                     " + "\n";
 
         QString coreOptions = QString::fromStdString(HelpMessage(HMM_BITCOIN_QT));
 
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 92f09f86b55e..2bbb74a0b8ec 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -305,7 +305,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
             return TransactionCreationFailed;
         }
 
-        // reject insane fee > 0.1 bitcoin
+        // reject insane fee > 0.1 DASH
         if (nFeeRequired > 10000000)
             return InsaneFee;
     }
diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp
index 869ac3bc4c48..1171965f1bc8 100644
--- a/src/rpcdump.cpp
+++ b/src/rpcdump.cpp
@@ -168,7 +168,7 @@ Value importaddress(const Array& params, bool fHelp)
         std::vector<unsigned char> data(ParseHex(params[0].get_str()));
         script = CScript(data.begin(), data.end());
     } else {
-        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Bitcoin address or script");
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address or script");
     }
 
     string strLabel = "";
diff --git a/src/test/test_dash.cpp b/src/test/test_dash.cpp
index c5972c1e42bc..521131d5d90d 100644
--- a/src/test/test_dash.cpp
+++ b/src/test/test_dash.cpp
@@ -2,7 +2,7 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
-#define BOOST_TEST_MODULE Bitcoin Test Suite
+#define BOOST_TEST_MODULE Dash Test Suite
 
 #include "main.h"
 #include "random.h"
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 59f7778db172..fe638c52e742 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -97,7 +97,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nTime)
                 if (!fMatch)
                 {
                     fDone = true;
-                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.");
+                    string strMessage = _("Warning: Please check that your computer's date and time are correct! If your clock is wrong Dash Core will not work properly.");
                     strMiscWarning = strMessage;
                     LogPrintf("*** %s\n", strMessage);
                     uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);

From f26aff36cd03cb73bc80a548a9ba499b551d8b6a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 6 Apr 2015 00:58:13 +0300
Subject: [PATCH 1311/1819] unify copyright

---
 src/clientversion.h | 2 +-
 src/init.cpp        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/clientversion.h b/src/clientversion.h
index a406c9218966..20651a6004fd 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -38,7 +38,7 @@
 #define DO_STRINGIZE(X) #X
 
 //! Copyright string used in Windows .rc files
-#define COPYRIGHT_STR "2009-2015 The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers"
+#define COPYRIGHT_STR "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin Core Developers, 2014-" STRINGIZE(COPYRIGHT_YEAR) " The Dash Core Developers"
 
 /**
  * dashd-res.rc includes this file, but it cannot cope with real c++ code.
diff --git a/src/init.cpp b/src/init.cpp
index aa2ffb3cad5c..42acac089d81 100755
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -423,7 +423,7 @@ std::string HelpMessage(HelpMessageMode mode)
 
 std::string LicenseInfo()
 {
-    return FormatParagraph(_("Copyright (C) 2009-2015 The Bitcoin Core Developers")) + "\n" +
+    return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
            "\n" +
            FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Dash Core Developers"), COPYRIGHT_YEAR)) + "\n" +
            "\n" +

From cddd69444f5016e5551393f922f4a0ef69873718 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 6 Apr 2015 00:59:25 +0300
Subject: [PATCH 1312/1819] small rpc description fixes

---
 src/rpcdarksend.cpp | 15 ++++++++++-----
 src/rpcmining.cpp   |  2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp
index 9327b0dd0724..c72f68ceac9b 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcdarksend.cpp
@@ -711,19 +711,24 @@ Value masternodelist(const Array& params, bool fHelp)
                 "Get a list of masternodes in different modes\n"
                 "\nArguments:\n"
                 "1. \"mode\"      (string, optional/required to use filter, defaults = status) The mode to run list in\n"
-                "2. \"filter\"    (string, optional) Filter results. Partial match by IP by default in all modes, additional matches in some modes\n"
+                "2. \"filter\"    (string, optional) Filter results. Partial match by IP by default in all modes,\n"
+                "                                    additional matches in some modes are also available\n"
                 "\nAvailable modes:\n"
                 "  activeseconds  - Print number of seconds masternode recognized by the network as enabled\n"
                 "  donation       - Show donation settings\n"
-                "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds' (can be additionally filtered, partial match)\n"
+                "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds'\n"
+                "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
                 "  pose           - Print Proof-of-Service score\n"
                 "  protocol       - Print protocol of a masternode (can be additionally filtered, exact match))\n"
-                "  pubkey         - Print public key associated with a masternode (can be additionally filtered, partial match)\n"
+                "  pubkey         - Print public key associated with a masternode (can be additionally filtered,\n"
+                "                   partial match)\n"
                 "  rank           - Print rank of a masternode based on current block\n"
-                "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR (can be additionally filtered, partial match)\n"
+                "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR\n"
+                "                   (can be additionally filtered, partial match)\n"
                 "  vin            - Print vin associated with a masternode (can be additionally filtered, partial match)\n"
-                "  votes          - Print all masternode votes for a Dash initiative (can be additionally filtered, partial match)\n"
+                "  votes          - Print all masternode votes for a Dash initiative (can be additionally filtered,\n"
+                "                   partial match)\n"
                 );
     }
 
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 3ac8be720d32..110db85c4e1f 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -123,7 +123,7 @@ Value setgenerate(const Array& params, bool fHelp)
             "Generation is limited to 'genproclimit' processors, -1 is unlimited.\n"
             "See the getgenerate call for the current setting.\n"
             "\nArguments:\n"
-            "1. generate         (boolean, required) Set to true to turn on generation, off to turn off.\n"
+            "1. generate         (boolean, required) Set to true to turn on generation, false to turn off.\n"
             "2. genproclimit     (numeric, optional) Set the processor limit for when generation is on. Can be -1 for unlimited.\n"
             "                    Note: in -regtest mode, genproclimit controls how many blocks are generated immediately.\n"
             "\nResult\n"

From bdee4cd3c5030fd2824bc7a43281c984f287ef28 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 6 Apr 2015 06:46:44 +0300
Subject: [PATCH 1313/1819] fix cmd help for -masternodeminprotocol

---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 42acac089d81..a09e8654aaae 100755
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -380,7 +380,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -mnconf=<file>             " + strprintf(_("Specify masternode configuration file (default: %s)"), "masternode.conf") + "\n";
     strUsage += "  -masternodeprivkey=<n>     " + _("Set the masternode private key") + "\n";
     strUsage += "  -masternodeaddr=<n>        " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
-    strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default : %u)"), 0) + "\n";
+    strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default: %u)"), MIN_PEER_PROTO_VERSION) + "\n";
 
     strUsage += "\n" + _("Darksend options:") + "\n";
     strUsage += "  -enabledarksend=<n>          " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), 0) + "\n";

From 149c1d890ddc6dd0f108436704ac88bbed9ab12c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 6 Apr 2015 09:27:41 +0200
Subject: [PATCH 1314/1819] doc: Credit Jonas Nick in release notes

For discovering the vulnerability and discussing the fix that led to PR #5860.
---
 doc/release-notes.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 3f1c9669c3ba..c4e46c542cca 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -109,6 +109,7 @@ Thanks to everyone who contributed to this release:
 - fsb4000
 - Gregory Maxwell
 - Ivan Pustogarov
+- Jonas Nick
 - Jonas Schnelli
 - Pieter Wuille
 - Ruben de Vries

From 1c62e8409998f0358f2fca522678704824e332c1 Mon Sep 17 00:00:00 2001
From: Gavin Andresen <gavinandresen@gmail.com>
Date: Wed, 25 Mar 2015 13:13:09 -0400
Subject: [PATCH 1315/1819] Keep mempool consistent during block-reorgs

This fixes a subtle bug involving block re-orgs and non-standard transactions.

Start with a block containing a non-standard transaction, and
one or more transactions spending it in the memory pool.

Then re-org away from that block to another chain that does
not contain the non-standard transaction.

Result before this fix: the dependent transactions get stuck
in the mempool without their parent, putting the mempool
in an inconsistent state.

Tested with a new unit test (adapted for 0.10).

Rebased-From: ad9e86dca11dce023d827d342e966f3806c39d27
Github-Pull: #5945
---
 src/Makefile.test.include  |   1 +
 src/test/mempool_tests.cpp | 102 +++++++++++++++++++++++++++++++++++++
 src/txmempool.cpp          |  12 +++++
 3 files changed, 115 insertions(+)
 create mode 100644 src/test/mempool_tests.cpp

diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 0a9a335e7a35..9cc479c3056f 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -51,6 +51,7 @@ BITCOIN_TESTS =\
   test/hash_tests.cpp \
   test/key_tests.cpp \
   test/main_tests.cpp \
+  test/mempool_tests.cpp \
   test/miner_tests.cpp \
   test/mruset_tests.cpp \
   test/multisig_tests.cpp \
diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp
new file mode 100644
index 000000000000..b85f768ed553
--- /dev/null
+++ b/src/test/mempool_tests.cpp
@@ -0,0 +1,102 @@
+// Copyright (c) 2011-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.
+
+#include "main.h"
+#include "txmempool.h"
+#include "util.h"
+
+#include <boost/test/unit_test.hpp>
+#include <list>
+
+BOOST_AUTO_TEST_SUITE(mempool_tests)
+
+BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
+{
+    // Test CTxMemPool::remove functionality
+
+    // Parent transaction with three children,
+    // and three grand-children:
+    CMutableTransaction txParent;
+    txParent.vin.resize(1);
+    txParent.vin[0].scriptSig = CScript() << OP_11;
+    txParent.vout.resize(3);
+    for (int i = 0; i < 3; i++)
+    {
+        txParent.vout[i].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
+        txParent.vout[i].nValue = 33000LL;
+    }
+    CMutableTransaction txChild[3];
+    for (int i = 0; i < 3; i++)
+    {
+        txChild[i].vin.resize(1);
+        txChild[i].vin[0].scriptSig = CScript() << OP_11;
+        txChild[i].vin[0].prevout.hash = txParent.GetHash();
+        txChild[i].vin[0].prevout.n = i;
+        txChild[i].vout.resize(1);
+        txChild[i].vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
+        txChild[i].vout[0].nValue = 11000LL;
+    }
+    CMutableTransaction txGrandChild[3];
+    for (int i = 0; i < 3; i++)
+    {
+        txGrandChild[i].vin.resize(1);
+        txGrandChild[i].vin[0].scriptSig = CScript() << OP_11;
+        txGrandChild[i].vin[0].prevout.hash = txChild[i].GetHash();
+        txGrandChild[i].vin[0].prevout.n = 0;
+        txGrandChild[i].vout.resize(1);
+        txGrandChild[i].vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
+        txGrandChild[i].vout[0].nValue = 11000LL;
+    }
+
+
+    CTxMemPool testPool(CFeeRate(0));
+    std::list<CTransaction> removed;
+
+    // Nothing in pool, remove should do nothing:
+    testPool.remove(txParent, removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 0);
+
+    // Just the parent:
+    testPool.addUnchecked(txParent.GetHash(), CTxMemPoolEntry(txParent, 0, 0, 0.0, 1));
+    testPool.remove(txParent, removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 1);
+    removed.clear();
+    
+    // Parent, children, grandchildren:
+    testPool.addUnchecked(txParent.GetHash(), CTxMemPoolEntry(txParent, 0, 0, 0.0, 1));
+    for (int i = 0; i < 3; i++)
+    {
+        testPool.addUnchecked(txChild[i].GetHash(), CTxMemPoolEntry(txChild[i], 0, 0, 0.0, 1));
+        testPool.addUnchecked(txGrandChild[i].GetHash(), CTxMemPoolEntry(txGrandChild[i], 0, 0, 0.0, 1));
+    }
+    // Remove Child[0], GrandChild[0] should be removed:
+    testPool.remove(txChild[0], removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 2);
+    removed.clear();
+    // ... make sure grandchild and child are gone:
+    testPool.remove(txGrandChild[0], removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 0);
+    testPool.remove(txChild[0], removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 0);
+    // Remove parent, all children/grandchildren should go:
+    testPool.remove(txParent, removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 5);
+    BOOST_CHECK_EQUAL(testPool.size(), 0);
+    removed.clear();
+
+    // Add children and grandchildren, but NOT the parent (simulate the parent being in a block)
+    for (int i = 0; i < 3; i++)
+    {
+        testPool.addUnchecked(txChild[i].GetHash(), CTxMemPoolEntry(txChild[i], 0, 0, 0.0, 1));
+        testPool.addUnchecked(txGrandChild[i].GetHash(), CTxMemPoolEntry(txGrandChild[i], 0, 0, 0.0, 1));
+    }
+    // Now remove the parent, as might happen if a block-re-org occurs but the parent cannot be
+    // put into the mempool (maybe because it is non-standard):
+    testPool.remove(txParent, removed, true);
+    BOOST_CHECK_EQUAL(removed.size(), 6);
+    BOOST_CHECK_EQUAL(testPool.size(), 0);
+    removed.clear();
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index dcdf5653fe8c..db598a1dfa50 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -444,6 +444,18 @@ void CTxMemPool::remove(const CTransaction &origTx, std::list<CTransaction>& rem
         LOCK(cs);
         std::deque<uint256> txToRemove;
         txToRemove.push_back(origTx.GetHash());
+        if (fRecursive && !mapTx.count(origTx.GetHash())) {
+            // If recursively removing but origTx isn't in the mempool
+            // be sure to remove any children that are in the pool. This can
+            // happen during chain re-orgs if origTx isn't re-accepted into
+            // the mempool for any reason.
+            for (unsigned int i = 0; i < origTx.vout.size(); i++) {
+                std::map<COutPoint, CInPoint>::iterator it = mapNextTx.find(COutPoint(origTx.GetHash(), i));
+                if (it == mapNextTx.end())
+                    continue;
+                txToRemove.push_back(it->second.ptx->GetHash());
+            }
+        }
         while (!txToRemove.empty())
         {
             uint256 hash = txToRemove.front();

From 955865481e14c86cd30b392517246877502ff71d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Apr 2015 04:50:32 +0300
Subject: [PATCH 1316/1819] link to btc 0.10 in release notes

---
 doc/release-notes/release-notes-0.12.0.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/release-notes/release-notes-0.12.0.md b/doc/release-notes/release-notes-0.12.0.md
index c8332b2e1792..f6c050f73e0e 100644
--- a/doc/release-notes/release-notes-0.12.0.md
+++ b/doc/release-notes/release-notes-0.12.0.md
@@ -48,7 +48,8 @@ This does not affect wallet forward or backward compatibility.
 0.12.0 changelog
 ----------------
 
-Bitcoin Core version 0.10.1
+Switched to Bitcoin Core version 0.10
+https://bitcoin.org/en/release/v0.10.0
 
 Credits
 --------

From 41f592aec73903659ae2f377d454c2a65554c6da Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Apr 2015 05:56:10 +0300
Subject: [PATCH 1317/1819] Explicitly convert mutable txes to immutable before
 calling AcceptableInputs

---
 src/darksend.cpp      | 4 ++--
 src/masternode.cpp    | 2 +-
 src/masternodeman.cpp | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index b4a8b3d72f90..ca58b04196a0 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -396,7 +396,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
                 return;
             }
 
-            if(!AcceptableInputs(mempool, state, tx, false, NULL)) {
+            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) {
                 LogPrintf("dsi -- transaction not valid! \n");
                 error = _("Transaction not valid.");
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
@@ -1377,7 +1377,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
 
-        if(!AcceptableInputs(mempool, state, tx, false, NULL)){
+        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
             LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
             return;
         }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 39520105d89b..73d3b03289e0 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -265,7 +265,7 @@ void CMasternode::Check()
         tx.vin.push_back(vin);
         tx.vout.push_back(vout);
 
-        if(!AcceptableInputs(mempool, state, tx, false, NULL)){
+        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
             activeState = MASTERNODE_VIN_SPENT;
             return;
         }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 978617a50210..88af509e5316 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -668,7 +668,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
         tx.vin.push_back(vin);
         tx.vout.push_back(vout);
-        if(AcceptableInputs(mempool, state, tx, false, NULL)){
+        if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
             if(fDebug) LogPrintf("dsee - Accepted Masternode entry %i %i\n", count, current);
 
             if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){

From 58e418e1e181c8fc126d71a9e17dacfbfe868bac Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 8 Apr 2015 07:26:15 +0300
Subject: [PATCH 1318/1819] add Peers menu item

---
 src/qt/bitcoingui.cpp | 9 ++++++++-
 src/qt/bitcoingui.h   | 1 +
 src/qt/rpcconsole.cpp | 6 ++++++
 src/qt/rpcconsole.h   | 2 ++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index b2f400582178..54bede88b683 100755
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -213,6 +213,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
     connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
     connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
+    connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
     connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
 
     // prevents an open debug window from becoming stuck/unusable on client shutdown
@@ -344,7 +345,9 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
     openNetworkAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
     openNetworkAction->setStatusTip(tr("Show network monitor"));
-	openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
+    openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
+    openPeersAction->setStatusTip(tr("Show peers info"));
+    openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
     openConfEditorAction->setStatusTip(tr("Open configuration file"));
 
     usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
@@ -424,6 +427,8 @@ void BitcoinGUI::createMenuBar()
         tools->addAction(openInfoAction);
         tools->addAction(openRPCConsoleAction);
         tools->addAction(openNetworkAction);
+        tools->addAction(openPeersAction);
+        tools->addSeparator();
         tools->addAction(openConfEditorAction);
     }
 
@@ -588,6 +593,8 @@ void BitcoinGUI::createTrayIconMenu()
     trayIconMenu->addAction(openInfoAction);
     trayIconMenu->addAction(openRPCConsoleAction);
     trayIconMenu->addAction(openNetworkAction);
+    trayIconMenu->addAction(openPeersAction);
+    trayIconMenu->addSeparator();
     trayIconMenu->addAction(openConfEditorAction);
 #ifndef Q_OS_MAC // This is built-in on Mac
     trayIconMenu->addSeparator();
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index fcae7c262110..5203c0be707b 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -107,6 +107,7 @@ class BitcoinGUI : public QMainWindow
     QAction *openInfoAction;
     QAction *openRPCConsoleAction;
     QAction *openNetworkAction;
+    QAction *openPeersAction;
     QAction *openConfEditorAction;
     QAction *openAction;
     QAction *showHelpMessageAction;
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 11226e84ed80..ab74624f3dfd 100755
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -545,6 +545,12 @@ void RPCConsole::showNetwork()
     show();
 }
 
+void RPCConsole::showPeers()
+{
+    ui->tabWidget->setCurrentIndex(3);
+    show();
+}
+
 void RPCConsole::showConfEditor()
 {
     GUIUtil::openConfigfile();
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 6bb2aea2f245..e9a92edf826b 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -77,6 +77,8 @@ public slots:
     void showConsole();
     /** Switch to network tab and show */
     void showNetwork();
+    /** Switch to peers tab and show */
+    void showPeers();
     /** Open external (default) editor with dash.conf */
     void showConfEditor();	
     /** Handle selection of peer in peers list */

From 34127c77cbdc0c177945ccfbc4e4eb9c8e8a2c9c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Thu, 9 Apr 2015 10:19:52 +0200
Subject: [PATCH 1319/1819] doc: update release notes pre rc2

---
 doc/release-notes.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index c4e46c542cca..981e6244116d 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -65,6 +65,7 @@ Block (database) and transaction handling:
 - `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates
 - `002c8a2` fix possible block db breakage during re-index
 - `a1f425b` Add (optional) consistency check for the block chain data structures
+- `1c62e84` Keep mempool consistent during block-reorgs
 
 P2P protocol and network code:
 - `78f64ef` don't trickle for whitelisted nodes
@@ -107,6 +108,7 @@ Thanks to everyone who contributed to this release:
 - Cory Fields
 - dexX7
 - fsb4000
+- Gavin Andresen
 - Gregory Maxwell
 - Ivan Pustogarov
 - Jonas Nick

From 63ae382c7247379a904c998a92539b489741a113 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 10 Apr 2015 19:34:43 +0300
Subject: [PATCH 1320/1819] ru

---
 src/qt/locale/dash_ru.ts | 525 ++++++++++++++++++++-------------------
 1 file changed, 267 insertions(+), 258 deletions(-)

diff --git a/src/qt/locale/dash_ru.ts b/src/qt/locale/dash_ru.ts
index 502ede60584c..d3a100a29a03 100644
--- a/src/qt/locale/dash_ru.ts
+++ b/src/qt/locale/dash_ru.ts
@@ -15,9 +15,14 @@
     </message>
     <message>
         <location filename="../forms/ui_aboutdialog.h" line="131"/>
+        <source>Copyright &amp;copy; 2009-YYYY The Bitcoin Core developers.
+Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
         <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
 Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Copyright &amp;copy; 2009-2014 Разработчики Bitcoin Core.
+        <translation type="vanished">Copyright &amp;copy; 2009-2014 Разработчики Bitcoin Core.
 Copyright &amp;copy; 2014-YYYY Разработчики Dash Core.</translation>
     </message>
     <message>
@@ -360,6 +365,7 @@ This product includes software developed by the OpenSSL Project for use in the O
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="814"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
@@ -378,57 +384,57 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="vanished">[тестовая сеть]</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location filename="../bitcoingui.cpp" line="250"/>
         <source>&amp;Overview</source>
         <translation>&amp;Обзор</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location filename="../bitcoingui.cpp" line="251"/>
         <source>Show general overview of wallet</source>
         <translation>Показать общий обзор действий с бумажником</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location filename="../bitcoingui.cpp" line="261"/>
         <source>&amp;Send</source>
         <translation>&amp;Отправить</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location filename="../bitcoingui.cpp" line="262"/>
         <source>Send coins to a Dash address</source>
         <translation>Отправить монеты на указанный адрес Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location filename="../bitcoingui.cpp" line="272"/>
         <source>&amp;Receive</source>
         <translation>&amp;Получить</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location filename="../bitcoingui.cpp" line="273"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Запросить платежи (создать QR-коды и dash: URI)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location filename="../bitcoingui.cpp" line="283"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Транзакции</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location filename="../bitcoingui.cpp" line="284"/>
         <source>Browse transaction history</source>
         <translation>Показать историю транзакций</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location filename="../bitcoingui.cpp" line="307"/>
         <source>E&amp;xit</source>
         <translation>В&amp;ыход</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location filename="../bitcoingui.cpp" line="308"/>
         <source>Quit application</source>
         <translation>Закрыть приложение</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location filename="../bitcoingui.cpp" line="311"/>
         <source>&amp;About Dash Core</source>
         <translation>О &amp;Dash Core</translation>
     </message>
@@ -437,193 +443,198 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="vanished">Показать информацию о Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location filename="../bitcoingui.cpp" line="312"/>
         <source>Show information about Dash Core</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location filename="../bitcoingui.cpp" line="315"/>
+        <location filename="../bitcoingui.cpp" line="317"/>
         <source>About &amp;Qt</source>
         <translation>О &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location filename="../bitcoingui.cpp" line="319"/>
         <source>Show information about Qt</source>
         <translation>Показать информацию о Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location filename="../bitcoingui.cpp" line="321"/>
         <source>&amp;Options...</source>
         <translation>&amp;Настройки...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location filename="../bitcoingui.cpp" line="322"/>
         <source>Modify configuration options for Dash</source>
         <translation>Изменить параметры конфигурации Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location filename="../bitcoingui.cpp" line="324"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Показать / Скрыть</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location filename="../bitcoingui.cpp" line="325"/>
         <source>Show or hide the main Window</source>
         <translation>Показать или скрыть главное окно</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location filename="../bitcoingui.cpp" line="327"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>За&amp;шифровать бумажник...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location filename="../bitcoingui.cpp" line="328"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Зашифровать закрытые ключи, содержащиеся в вашем бумажнике</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location filename="../bitcoingui.cpp" line="330"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Сделать резервную копию бумажника...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location filename="../bitcoingui.cpp" line="331"/>
         <source>Backup wallet to another location</source>
         <translation>Сделать резервную копию бумажника в другом месте</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location filename="../bitcoingui.cpp" line="332"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Изменить пароль...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location filename="../bitcoingui.cpp" line="333"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Изменить пароль шифрования бумажника</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location filename="../bitcoingui.cpp" line="334"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Разблокировать бумажник...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location filename="../bitcoingui.cpp" line="335"/>
         <source>Unlock wallet</source>
         <translation>Разблокировать бумажник</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location filename="../bitcoingui.cpp" line="336"/>
         <source>&amp;Lock Wallet</source>
         <translation>За&amp;блокировать бумажник</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location filename="../bitcoingui.cpp" line="337"/>
         <source>Sign &amp;message...</source>
         <translation>П&amp;одписать сообщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location filename="../bitcoingui.cpp" line="338"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Подписать сообщения вашими адресами Dash, чтобы доказать, что вы ими владеете</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location filename="../bitcoingui.cpp" line="339"/>
         <source>&amp;Verify message...</source>
         <translation>П&amp;роверить сообщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location filename="../bitcoingui.cpp" line="340"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Проверить сообщения, чтобы удостовериться, что они были подписаны определёнными адресами Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location filename="../bitcoingui.cpp" line="342"/>
         <source>&amp;Information</source>
         <translation>&amp;Информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location filename="../bitcoingui.cpp" line="343"/>
         <source>Show diagnostic information</source>
         <translation>Показать диагностическую информацию</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location filename="../bitcoingui.cpp" line="344"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Консоль отладки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location filename="../bitcoingui.cpp" line="345"/>
         <source>Open debugging console</source>
         <translation>Открыть консоль отладки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location filename="../bitcoingui.cpp" line="346"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Монитор сети</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location filename="../bitcoingui.cpp" line="347"/>
         <source>Show network monitor</source>
         <translation>Показать монитор сети</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location filename="../bitcoingui.cpp" line="348"/>
+        <source>&amp;Peers list</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../bitcoingui.cpp" line="349"/>
+        <source>Show peers info</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="../bitcoingui.cpp" line="350"/>
         <source>Open &amp;Configuration File</source>
         <translation>Открыть файл &amp;настроек</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location filename="../bitcoingui.cpp" line="351"/>
         <source>Open configuration file</source>
         <translation>Открыть файл настроек</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location filename="../bitcoingui.cpp" line="353"/>
         <source>&amp;Sending addresses...</source>
         <translation>Адреса &amp;отправки...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location filename="../bitcoingui.cpp" line="354"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Показать список использованных адресов отправки и их меток</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location filename="../bitcoingui.cpp" line="355"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Адреса &amp;получения...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location filename="../bitcoingui.cpp" line="356"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Показать список использованных адресов получения и их меток</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location filename="../bitcoingui.cpp" line="358"/>
         <source>Open &amp;URI...</source>
         <translation>Открыть &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location filename="../bitcoingui.cpp" line="359"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Открыть dash: URI или запрос платежа</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location filename="../bitcoingui.cpp" line="361"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Параметры командной строки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location filename="../bitcoingui.cpp" line="555"/>
         <source>Dash Core client</source>
         <translation type="unfinished"></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location filename="../bitcoingui.cpp" line="734"/>
         <source>Processed %n blocks of transaction history.</source>
         <translation type="unfinished">
             <numerusform></numerusform>
@@ -632,31 +643,32 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message>
+        <location filename="../bitcoingui.cpp" line="363"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Показать помощь о Dash Core со списком возможных параметров командной строки</translation>
+        <translation>Показать помощь о Dash Core со списком возможных параметров командной строки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location filename="../bitcoingui.cpp" line="399"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location filename="../bitcoingui.cpp" line="413"/>
         <source>&amp;Settings</source>
         <translation>&amp;Настройки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location filename="../bitcoingui.cpp" line="426"/>
         <source>&amp;Tools</source>
         <translation>&amp;Инструменты</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location filename="../bitcoingui.cpp" line="435"/>
         <source>&amp;Help</source>
         <translation>&amp;Помощь</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location filename="../bitcoingui.cpp" line="446"/>
         <source>Tabs toolbar</source>
         <translation>Панель вкладок</translation>
     </message>
@@ -665,7 +677,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="vanished">Клиент Dash</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location filename="../bitcoingui.cpp" line="699"/>
         <source>%n active connection(s) to Dash network</source>
         <translation>
             <numerusform>%n активное соединение с сетью Dash</numerusform>
@@ -674,22 +686,22 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location filename="../bitcoingui.cpp" line="714"/>
         <source>Synchronizing with network...</source>
         <translation>Синхронизация с сетью...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location filename="../bitcoingui.cpp" line="717"/>
         <source>Importing blocks from disk...</source>
         <translation>Выполняется импорт блоков с диска...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location filename="../bitcoingui.cpp" line="720"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Идёт переиндексация блоков на диске...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location filename="../bitcoingui.cpp" line="724"/>
         <source>No block source available...</source>
         <translation>Источник блоков недоступен...</translation>
     </message>
@@ -698,12 +710,12 @@ This product includes software developed by the OpenSSL Project for use in the O
         <translation type="vanished">Обработано %1 блоков из истории транзакций.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location filename="../bitcoingui.cpp" line="739"/>
         <source>Up to date</source>
         <translation>Синхронизировано</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location filename="../bitcoingui.cpp" line="760"/>
         <source>%n hour(s)</source>
         <translation>
             <numerusform>%n час</numerusform>
@@ -712,7 +724,7 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location filename="../bitcoingui.cpp" line="764"/>
         <source>%n day(s)</source>
         <translation>
             <numerusform>%n день</numerusform>
@@ -721,8 +733,8 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location filename="../bitcoingui.cpp" line="768"/>
+        <location filename="../bitcoingui.cpp" line="774"/>
         <source>%n week(s)</source>
         <translation>
             <numerusform>%n неделя</numerusform>
@@ -731,12 +743,12 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location filename="../bitcoingui.cpp" line="774"/>
         <source>%1 and %2</source>
         <translation>%1 и %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location filename="../bitcoingui.cpp" line="774"/>
         <source>%n year(s)</source>
         <translation>
             <numerusform>%n год</numerusform>
@@ -745,57 +757,56 @@ This product includes software developed by the OpenSSL Project for use in the O
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location filename="../bitcoingui.cpp" line="778"/>
         <source>%1 behind</source>
         <translation>%1 позади</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location filename="../bitcoingui.cpp" line="783"/>
         <source>Catching up...</source>
         <translation>Синхронизируется...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location filename="../bitcoingui.cpp" line="799"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Последний полученный блок был сгенерирован %1 назад.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location filename="../bitcoingui.cpp" line="801"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Транзакции после этого времени пока видны не будут.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
         <source>Dash</source>
-        <translation>Dash</translation>
+        <translation type="vanished">Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location filename="../bitcoingui.cpp" line="828"/>
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location filename="../bitcoingui.cpp" line="831"/>
         <source>Warning</source>
         <translation>Внимание</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location filename="../bitcoingui.cpp" line="834"/>
         <source>Information</source>
         <translation>Информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location filename="../bitcoingui.cpp" line="908"/>
         <source>Sent transaction</source>
         <translation>Исходящая транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location filename="../bitcoingui.cpp" line="908"/>
         <source>Incoming transaction</source>
         <translation>Входящая транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location filename="../bitcoingui.cpp" line="909"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -808,17 +819,17 @@ Address: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location filename="../bitcoingui.cpp" line="979"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;разблокирован&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location filename="../bitcoingui.cpp" line="989"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в данный момент &lt;b&gt;разблокирован&lt;/b&gt; только для целей анонимизации</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location filename="../bitcoingui.cpp" line="999"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;заблокирован&lt;/b&gt;</translation>
     </message>
@@ -1379,47 +1390,47 @@ Address: %4
         <translation type="unfinished">О Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location filename="../utilitydialog.cpp" line="66"/>
         <source>Command-line options</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location filename="../utilitydialog.cpp" line="67"/>
         <source>Usage:</source>
         <translation>Использование:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location filename="../utilitydialog.cpp" line="68"/>
         <source>command-line options</source>
         <translation>параметры командной строки</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location filename="../utilitydialog.cpp" line="72"/>
         <source>UI options</source>
         <translation>Настройки интерфейса</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location filename="../utilitydialog.cpp" line="73"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Выбрать каталог данных при запуске (по умолчанию: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location filename="../utilitydialog.cpp" line="74"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Выберите язык, например &quot;de_DE&quot; (по умолчанию: как в системе)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location filename="../utilitydialog.cpp" line="75"/>
         <source>Start minimized</source>
         <translation>Запускать свёрнутым</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location filename="../utilitydialog.cpp" line="76"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Указать корневые SSL-сертификаты для запроса платежа (по умолчанию: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location filename="../utilitydialog.cpp" line="77"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Показывать заставку при запуске (по умолчанию: 1)</translation>
     </message>
@@ -1993,9 +2004,9 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location filename="../overviewpage.cpp" line="497"/>
+        <location filename="../overviewpage.cpp" line="511"/>
+        <location filename="../overviewpage.cpp" line="525"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
@@ -2047,89 +2058,91 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location filename="../overviewpage.cpp" line="157"/>
+        <location filename="../overviewpage.cpp" line="158"/>
+        <location filename="../overviewpage.cpp" line="394"/>
         <source>Disabled</source>
         <translation>Выключен</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location filename="../overviewpage.cpp" line="161"/>
+        <location filename="../overviewpage.cpp" line="396"/>
+        <location filename="../overviewpage.cpp" line="539"/>
         <source>Start Darksend Mixing</source>
         <translation>Начать автоперемешивание</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location filename="../overviewpage.cpp" line="163"/>
+        <location filename="../overviewpage.cpp" line="541"/>
         <source>Stop Darksend Mixing</source>
         <translation>Остановить перемешивание</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location filename="../overviewpage.cpp" line="314"/>
         <source>No inputs detected</source>
         <translation>Монеты не найдены</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location filename="../overviewpage.cpp" line="322"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Найдены неподтвержденные номиналы, пересчет будет выполнен после их подтверждения.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="377"/>
+        <location filename="../overviewpage.cpp" line="379"/>
         <source>Rounds</source>
         <translation>Раундов</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="408"/>
+        <location filename="../overviewpage.cpp" line="410"/>
         <source>Enabled</source>
         <translation>Включен</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
         <location filename="../overviewpage.cpp" line="438"/>
+        <location filename="../overviewpage.cpp" line="439"/>
+        <location filename="../overviewpage.cpp" line="440"/>
         <source>Submitted to masternode, waiting for more entries</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
         <location filename="../overviewpage.cpp" line="444"/>
+        <location filename="../overviewpage.cpp" line="445"/>
+        <location filename="../overviewpage.cpp" line="446"/>
         <source>Found enough users, signing ( waiting</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
         <location filename="../overviewpage.cpp" line="458"/>
+        <location filename="../overviewpage.cpp" line="459"/>
+        <location filename="../overviewpage.cpp" line="460"/>
         <source>Submitted to masternode, waiting in queue</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location filename="../overviewpage.cpp" line="468"/>
         <source>Last Darksend message:
 </source>
         <translation>Последнее сообщение Darksend:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
+        <location filename="../overviewpage.cpp" line="421"/>
+        <location filename="../overviewpage.cpp" line="450"/>
         <source>Darksend is idle.</source>
         <translation>Darksend в режиме ожидания.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="423"/>
+        <location filename="../overviewpage.cpp" line="425"/>
         <source>Mixing in progress...</source>
         <translation>Выполняется перемешивание...</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="429"/>
+        <location filename="../overviewpage.cpp" line="431"/>
         <source>Darksend request complete: Your transaction was accepted into the pool!</source>
         <translation>Запрос Darksend завершен: Ваша транзакция принята в пул!</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="435"/>
+        <location filename="../overviewpage.cpp" line="437"/>
         <source>Submitted following entries to masternode:</source>
         <translation>Мастерноде отправлены следующие записи:</translation>
     </message>
@@ -2138,7 +2151,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Отправлено мастерноде, ожидаем больше записей</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="441"/>
+        <location filename="../overviewpage.cpp" line="443"/>
         <source>Found enough users, signing ...</source>
         <translation>Найдено достаточное количество участников, подписываем ...</translation>
     </message>
@@ -2155,27 +2168,27 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Найдено достаточное количество участников, подписываем ( ожидание.. )</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="446"/>
+        <location filename="../overviewpage.cpp" line="448"/>
         <source>Transmitting final transaction.</source>
         <translation>Передаем итоговую транзакцию.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="450"/>
+        <location filename="../overviewpage.cpp" line="452"/>
         <source>Finalizing transaction.</source>
         <translation>Завершаем транзакцию.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="452"/>
+        <location filename="../overviewpage.cpp" line="454"/>
         <source>Darksend request incomplete:</source>
         <translation>Запрос Darksend не завершен:</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="452"/>
+        <location filename="../overviewpage.cpp" line="454"/>
         <source>Will retry...</source>
         <translation>Попробуем еще раз...</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="454"/>
+        <location filename="../overviewpage.cpp" line="456"/>
         <source>Darksend request complete:</source>
         <translation>Запрос Darksend завершен:</translation>
     </message>
@@ -2192,27 +2205,27 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Отправлено на мастерноду, ожидаем в очереди ...</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="460"/>
+        <location filename="../overviewpage.cpp" line="462"/>
         <source>Unknown state:</source>
         <translation>Неизвестное состояние:</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location filename="../overviewpage.cpp" line="476"/>
         <source>N/A</source>
         <translation>Н/Д</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location filename="../overviewpage.cpp" line="498"/>
         <source>Darksend was successfully reset.</source>
         <translation>Статус Darksend был успешно сброшен.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location filename="../overviewpage.cpp" line="512"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Для работы Darksend требуется минимум %1.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location filename="../overviewpage.cpp" line="526"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Бумажник заблокирован и пользователь отказался его разблокировать. Darksend будет выключен.</translation>
     </message>
@@ -2380,9 +2393,8 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
         <source>Dash</source>
-        <translation>Dash</translation>
+        <translation type="vanished">Dash</translation>
     </message>
     <message>
         <location filename="../dash.cpp" line="558"/>
@@ -2393,6 +2405,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location filename="../dash.cpp" line="557"/>
         <location filename="../dash.cpp" line="564"/>
         <location filename="../dash.cpp" line="577"/>
+        <location filename="../dash.cpp" line="596"/>
         <source>Dash Core</source>
         <translation type="unfinished">Dash Core</translation>
     </message>
@@ -2421,7 +2434,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Введите адрес Dash (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
     </message>
     <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="234"/>
         <source>Amount</source>
         <translation type="unfinished">Сумма</translation>
     </message>
@@ -2512,227 +2525,227 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Информация</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location filename="../forms/rpcconsole.ui" line="328"/>
         <source>Masternode Count</source>
         <translation>Количество мастернод</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location filename="../forms/rpcconsole.ui" line="75"/>
         <source>General</source>
         <translation>Общие</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location filename="../forms/rpcconsole.ui" line="279"/>
         <source>Name</source>
         <translation>Имя</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location filename="../forms/rpcconsole.ui" line="82"/>
         <source>Client name</source>
         <translation>Имя клиента</translation>
     </message>
     <message>
+        <location filename="../forms/rpcconsole.ui" line="46"/>
         <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location filename="../forms/rpcconsole.ui" line="122"/>
+        <location filename="../forms/rpcconsole.ui" line="145"/>
+        <location filename="../forms/rpcconsole.ui" line="168"/>
+        <location filename="../forms/rpcconsole.ui" line="230"/>
+        <location filename="../forms/rpcconsole.ui" line="253"/>
+        <location filename="../forms/rpcconsole.ui" line="289"/>
+        <location filename="../forms/rpcconsole.ui" line="315"/>
+        <location filename="../forms/rpcconsole.ui" line="338"/>
+        <location filename="../forms/rpcconsole.ui" line="761"/>
+        <location filename="../forms/rpcconsole.ui" line="784"/>
+        <location filename="../forms/rpcconsole.ui" line="807"/>
+        <location filename="../forms/rpcconsole.ui" line="830"/>
+        <location filename="../forms/rpcconsole.ui" line="853"/>
+        <location filename="../forms/rpcconsole.ui" line="876"/>
+        <location filename="../forms/rpcconsole.ui" line="899"/>
+        <location filename="../forms/rpcconsole.ui" line="922"/>
+        <location filename="../forms/rpcconsole.ui" line="945"/>
+        <location filename="../forms/rpcconsole.ui" line="968"/>
+        <location filename="../forms/rpcconsole.ui" line="991"/>
+        <location filename="../forms/rpcconsole.ui" line="1014"/>
+        <location filename="../forms/rpcconsole.ui" line="1037"/>
         <source>N/A</source>
         <translation>Н/Д</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location filename="../forms/rpcconsole.ui" line="112"/>
         <source>Number of connections</source>
         <translation>Число подключений</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location filename="../forms/rpcconsole.ui" line="188"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Открыть отладочный лог-файл Dash из текущего каталога данных. Для больших лог-файлов эта операция может занять несколько секунд.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location filename="../forms/rpcconsole.ui" line="191"/>
         <source>&amp;Open</source>
         <translation>&amp;Открыть</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location filename="../forms/rpcconsole.ui" line="135"/>
         <source>Startup time</source>
         <translation>Время запуска</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location filename="../forms/rpcconsole.ui" line="272"/>
         <source>Network</source>
         <translation>Сеть</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location filename="../forms/rpcconsole.ui" line="181"/>
         <source>Last block time</source>
         <translation>Время последнего блока</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location filename="../forms/rpcconsole.ui" line="207"/>
         <source>Debug log file</source>
         <translation>Отладочный лог-файл</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location filename="../forms/rpcconsole.ui" line="302"/>
         <source>Using OpenSSL version</source>
         <translation>Используется версия OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location filename="../forms/rpcconsole.ui" line="105"/>
         <source>Build date</source>
         <translation>Дата сборки</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location filename="../forms/rpcconsole.ui" line="158"/>
         <source>Current number of blocks</source>
         <translation>Текущее количество блоков</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location filename="../forms/rpcconsole.ui" line="243"/>
         <source>Client version</source>
         <translation>Версия клиента</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location filename="../forms/rpcconsole.ui" line="351"/>
         <source>Using BerkeleyDB version</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location filename="../forms/rpcconsole.ui" line="39"/>
         <source>Block chain</source>
         <translation>Цепочка блоков</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location filename="../forms/rpcconsole.ui" line="362"/>
         <source>&amp;Console</source>
         <translation>&amp;Консоль</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location filename="../forms/rpcconsole.ui" line="411"/>
         <source>Clear console</source>
         <translation>Очистить консоль</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location filename="../forms/rpcconsole.ui" line="434"/>
         <source>&amp;Network Traffic</source>
         <translation>Сетевой &amp;трафик</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location filename="../forms/rpcconsole.ui" line="486"/>
         <source>&amp;Clear</source>
         <translation>&amp;Очистить</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location filename="../forms/rpcconsole.ui" line="502"/>
         <source>Totals</source>
         <translation>Всего</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location filename="../forms/rpcconsole.ui" line="566"/>
         <source>Received</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location filename="../forms/rpcconsole.ui" line="646"/>
         <source>Sent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location filename="../forms/rpcconsole.ui" line="687"/>
         <source>&amp;Peers</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
+        <location filename="../forms/rpcconsole.ui" line="726"/>
         <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location filename="../rpcconsole.cpp" line="600"/>
         <source>Select a peer to view detailed information.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location filename="../forms/rpcconsole.ui" line="751"/>
         <source>Direction</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location filename="../forms/rpcconsole.ui" line="774"/>
         <source>Version</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location filename="../forms/rpcconsole.ui" line="797"/>
         <source>User Agent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location filename="../forms/rpcconsole.ui" line="820"/>
         <source>Services</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location filename="../forms/rpcconsole.ui" line="843"/>
         <source>Starting Height</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location filename="../forms/rpcconsole.ui" line="866"/>
         <source>Sync Height</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location filename="../forms/rpcconsole.ui" line="889"/>
         <source>Ban Score</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location filename="../forms/rpcconsole.ui" line="912"/>
         <source>Connection Time</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location filename="../forms/rpcconsole.ui" line="935"/>
         <source>Last Send</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location filename="../forms/rpcconsole.ui" line="958"/>
         <source>Last Receive</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location filename="../forms/rpcconsole.ui" line="981"/>
         <source>Bytes Sent</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location filename="../forms/rpcconsole.ui" line="1004"/>
         <source>Bytes Received</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location filename="../forms/rpcconsole.ui" line="1027"/>
         <source>Ping Time</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2782,34 +2795,34 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>%1 ГБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location filename="../rpcconsole.cpp" line="638"/>
         <source>via %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location filename="../rpcconsole.cpp" line="641"/>
+        <location filename="../rpcconsole.cpp" line="642"/>
         <source>never</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location filename="../rpcconsole.cpp" line="649"/>
         <source>Inbound</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location filename="../rpcconsole.cpp" line="649"/>
         <source>Outbound</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location filename="../rpcconsole.cpp" line="662"/>
         <source>Unknown</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location filename="../rpcconsole.cpp" line="664"/>
+        <location filename="../rpcconsole.cpp" line="665"/>
         <source>Fetching...</source>
         <translation type="unfinished"></translation>
     </message>
@@ -2838,15 +2851,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Повторно использовать существующий адрес получения (не рекомендуется)</translation>
     </message>
-    <message>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Необязательное сообщение для запроса платежа, которое будет показано при открытии запроса. Обратите внимание: сообщение не будет отправлено вместе с платежом через сеть Dash.</translation>
-    </message>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="51"/>
         <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Необязательное сообщение для запроса платежа, которое будет показано при открытии запроса. Обратите внимание: сообщение не будет отправлено вместе с платежом через сеть Dash.</translation>
     </message>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="54"/>
@@ -3046,8 +3055,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../sendcoinsdialog.cpp" line="597"/>
+        <location filename="../sendcoinsdialog.cpp" line="609"/>
         <source>Send Coins</source>
         <translation>Отправка</translation>
     </message>
@@ -3178,7 +3187,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="907"/>
         <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -3272,32 +3281,32 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Баланс:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="66"/>
         <source>Copy quantity</source>
         <translation>Копировать количество</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location filename="../sendcoinsdialog.cpp" line="67"/>
         <source>Copy amount</source>
         <translation>Скопировать сумму</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location filename="../sendcoinsdialog.cpp" line="68"/>
         <source>Copy fee</source>
         <translation>Копировать комиссию</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location filename="../sendcoinsdialog.cpp" line="69"/>
         <source>Copy after fee</source>
         <translation>Копировать после комиссии</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location filename="../sendcoinsdialog.cpp" line="70"/>
         <source>Copy bytes</source>
         <translation>Копировать байты</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location filename="../sendcoinsdialog.cpp" line="71"/>
         <source>Copy priority</source>
         <translation>Копировать приоритет</translation>
     </message>
@@ -3306,73 +3315,73 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Скопировать малый выход</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location filename="../sendcoinsdialog.cpp" line="72"/>
         <source>Copy dust</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location filename="../sendcoinsdialog.cpp" line="73"/>
         <source>Copy change</source>
         <translation>Копировать сдачу</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location filename="../sendcoinsdialog.cpp" line="228"/>
+        <location filename="../sendcoinsdialog.cpp" line="234"/>
+        <location filename="../sendcoinsdialog.cpp" line="243"/>
         <source>using</source>
         <translation>, используя</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location filename="../sendcoinsdialog.cpp" line="228"/>
+        <location filename="../sendcoinsdialog.cpp" line="234"/>
         <source>anonymous funds</source>
         <translation>анонимные средства</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location filename="../sendcoinsdialog.cpp" line="238"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(для работы darksend требуется принудительно округлить до ближайшего %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location filename="../sendcoinsdialog.cpp" line="243"/>
         <source>any available funds (not recommended)</source>
         <translation>любые доступные средства (не рекомендуется)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location filename="../sendcoinsdialog.cpp" line="249"/>
         <source>and InstantX</source>
         <translation>и InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location filename="../sendcoinsdialog.cpp" line="273"/>
+        <location filename="../sendcoinsdialog.cpp" line="278"/>
+        <location filename="../sendcoinsdialog.cpp" line="283"/>
+        <location filename="../sendcoinsdialog.cpp" line="287"/>
         <source>%1 to %2</source>
         <translation>С %1 на %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location filename="../sendcoinsdialog.cpp" line="336"/>
         <source>Are you sure you want to send?</source>
         <translation>Вы уверены, что хотите отправить?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location filename="../sendcoinsdialog.cpp" line="345"/>
         <source>are added as transaction fee</source>
         <translation>добавлено в качестве комиссии</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location filename="../sendcoinsdialog.cpp" line="362"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Общая сумма %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location filename="../sendcoinsdialog.cpp" line="364"/>
         <source>or</source>
         <translation>или</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location filename="../sendcoinsdialog.cpp" line="366"/>
         <source>Confirm send coins</source>
         <translation>Подтвердите отправку монет</translation>
     </message>
@@ -3385,72 +3394,72 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="vanished">Неверный адрес платежа %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location filename="../sendcoinsdialog.cpp" line="574"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Адрес получателя неверный, пожалуйста, перепроверьте.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location filename="../sendcoinsdialog.cpp" line="577"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Сумма для отправки должна быть больше 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location filename="../sendcoinsdialog.cpp" line="580"/>
         <source>The amount exceeds your balance.</source>
         <translation>Сумма превышает Ваш баланс.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location filename="../sendcoinsdialog.cpp" line="583"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Сумма превысит Ваш баланс, если комиссия в размере %1 будет добавлена к транзакции.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location filename="../sendcoinsdialog.cpp" line="586"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Обнаружен дублирующийся адрес. Отправка на один и тот же адрес возможна только один раз за одну операцию отправки.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location filename="../sendcoinsdialog.cpp" line="589"/>
         <source>Transaction creation failed!</source>
         <translation>Не удалось создать транзакцию!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location filename="../sendcoinsdialog.cpp" line="593"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Транзакция была отклонена! Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию бумажника (wallet.dat), а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location filename="../sendcoinsdialog.cpp" line="598"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Ошибка: этот бумажник был разблокирован только для анонимизации монет.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
+        <location filename="../sendcoinsdialog.cpp" line="601"/>
         <source>A fee higher than %1 is considered an insanely high fee.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location filename="../sendcoinsdialog.cpp" line="688"/>
         <source>Pay only the minimum fee of %1</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
+        <location filename="../sendcoinsdialog.cpp" line="710"/>
         <source>Estimated to begin confirmation within %1 block(s).</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location filename="../sendcoinsdialog.cpp" line="817"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Внимание: неверный адрес Dash</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location filename="../sendcoinsdialog.cpp" line="826"/>
         <source>Warning: Unknown change address</source>
         <translation>Внимание: неизвестный адрес для сдачи</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location filename="../sendcoinsdialog.cpp" line="837"/>
         <source>(no label)</source>
         <translation>(нет метки)</translation>
     </message>
@@ -3561,12 +3570,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="120"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core выключается...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location filename="../utilitydialog.cpp" line="121"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Не выключайте компьютер, пока это окно не исчезнет.</translation>
     </message>
@@ -4454,7 +4463,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="1107"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
         <translation type="unfinished"></translation>
     </message>

From 8051f73446697eae3cde40a689ca8392a61dd635 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 10 Apr 2015 19:39:12 +0300
Subject: [PATCH 1321/1819] bump MIN_POOL_PEER_PROTO_VERSION manually

---
 src/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/version.h b/src/version.h
index fdd6ae5b1479..7a46b6718b69 100644
--- a/src/version.h
+++ b/src/version.h
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70076;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70075;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70076;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 62bbc1176ed0160885239246dae6877bad02afbb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 10 Apr 2015 20:08:01 +0300
Subject: [PATCH 1322/1819] fix merge

---
 src/darksend.cpp   | 4 ++--
 src/darksend.h     | 2 +-
 src/masternode.cpp | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 946a49442f4d..e72ce1479695 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1494,9 +1494,9 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         }
 
         //check our collateral
-        if(txCollateral != CTransaction()){
+        if(txCollateral != CMutableTransaction()){
             if(!IsCollateralValid(txCollateral)) {
-                txCollateral = CTransaction();
+                txCollateral = CMutableTransaction();
                 LogPrintf("DoAutomaticDenominating -- Invalid collateral, resetting.\n");
             }
         }
diff --git a/src/darksend.h b/src/darksend.h
index 7f94d2609cc5..927a5bb99866 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -264,7 +264,7 @@ class CDarksendPool
 
     std::vector<CDarkSendEntry> myEntries; // clients entries
     std::vector<CDarkSendEntry> entries; // Masternode entries
-    CTransaction finalTransaction; // the finalized transaction ready for signing
+    CMutableTransaction finalTransaction; // the finalized transaction ready for signing
 
     int64_t lastTimeChanged; // last time the 'state' changed, in UTC milliseconds
     int64_t lastAutoDenomination; // TODO; not used - Delete?
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 1bfb55cd76dd..308bbd8d31d1 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -449,7 +449,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
         }
 
-        payeeSource.SetDestination(pmn->pubkey.GetID());
+        payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
     }
 
     //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
@@ -475,7 +475,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
                     newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
                 }
 
-                payeeSource.SetDestination(pmn->pubkey.GetID());
+                payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
 
                 break; // we found active MN
             }

From c9df7ce9dedb5d89c374580804ba5ef5e696b1fb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Apr 2015 02:01:10 +0300
Subject: [PATCH 1323/1819] fix makefile

---
 src/Makefile.qt.include | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 52619bfe713b..ca63fd87391f 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -36,6 +36,7 @@ QT_FORMS_UI = \
   qt/forms/addressbookpage.ui \
   qt/forms/askpassphrasedialog.ui \
   qt/forms/coincontroldialog.ui \
+  qt/forms/darksendconfig.ui \
   qt/forms/editaddressdialog.ui \
   qt/forms/helpmessagedialog.ui \
   qt/forms/intro.ui \

From eae305f4c4a42e82e932403b5b6544dd85880ec1 Mon Sep 17 00:00:00 2001
From: Matt Corallo <git@bluematt.me>
Date: Mon, 13 Apr 2015 17:55:41 +0100
Subject: [PATCH 1324/1819] Fix missing lock in submitblock

Rebased-From: eb63bf86cf6dc99f150574463df6ffb013a34493
Github-Pull: #6007
---
 src/rpcmining.cpp | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 86230521ce88..37465eedd027 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -637,14 +637,19 @@ Value submitblock(const Array& params, bool fHelp)
         throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
 
     uint256 hash = block.GetHash();
-    BlockMap::iterator mi = mapBlockIndex.find(hash);
-    if (mi != mapBlockIndex.end()) {
-        CBlockIndex *pindex = mi->second;
-        if (pindex->IsValid(BLOCK_VALID_SCRIPTS))
-            return "duplicate";
-        if (pindex->nStatus & BLOCK_FAILED_MASK)
-            return "duplicate-invalid";
-        // Otherwise, we might only have the header - process the block before returning
+    bool fBlockPresent = false;
+    {
+        LOCK(cs_main);
+        BlockMap::iterator mi = mapBlockIndex.find(hash);
+        if (mi != mapBlockIndex.end()) {
+            CBlockIndex *pindex = mi->second;
+            if (pindex->IsValid(BLOCK_VALID_SCRIPTS))
+                return "duplicate";
+            if (pindex->nStatus & BLOCK_FAILED_MASK)
+                return "duplicate-invalid";
+            // Otherwise, we might only have the header - process the block before returning
+            fBlockPresent = true;
+        }
     }
 
     CValidationState state;
@@ -652,7 +657,7 @@ Value submitblock(const Array& params, bool fHelp)
     RegisterValidationInterface(&sc);
     bool fAccepted = ProcessNewBlock(state, NULL, &block);
     UnregisterValidationInterface(&sc);
-    if (mi != mapBlockIndex.end())
+    if (fBlockPresent)
     {
         if (fAccepted && !sc.found)
             return "duplicate-inconclusive";

From 930ac5187608126f731ba7b68cceee69461d6637 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Apr 2015 11:51:14 +0300
Subject: [PATCH 1325/1819] Fix compiling errors on Linux. Should be ok now.

---
 src/Makefile.am        | 32 +++++++++++++++++---------------
 src/qt/walletmodel.cpp |  2 +-
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 12471a9a11db..64a8c7687d14 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -216,20 +216,9 @@ libbitcoin_wallet_a_SOURCES = \
   $(BITCOIN_CORE_H)
 
 # crypto primitives library
+crypto_libbitcoin_crypto_a_CFLAGS = -fPIC
 crypto_libbitcoin_crypto_a_CPPFLAGS = $(BITCOIN_CONFIG_INCLUDES)
 crypto_libbitcoin_crypto_a_SOURCES = \
-  crypto/aes_helper.c \
-  crypto/luffa.c \
-  crypto/groestl.c \
-  crypto/jh.c \
-  crypto/echo.c \
-  crypto/shavite.c \
-  crypto/keccak.c \
-  crypto/skein.c \
-  crypto/bmw.c \
-  crypto/simd.c \
-  crypto/cubehash.c \
-  crypto/blake.c \
   crypto/sha1.cpp \
   crypto/sha256.cpp \
   crypto/sha512.cpp \
@@ -237,6 +226,18 @@ crypto_libbitcoin_crypto_a_SOURCES = \
   crypto/rfc6979_hmac_sha256.cpp \
   crypto/hmac_sha512.cpp \
   crypto/ripemd160.cpp \
+  crypto/aes_helper.c \
+  crypto/blake.c \
+  crypto/bmw.c \
+  crypto/cubehash.c \
+  crypto/echo.c \
+  crypto/groestl.c \
+  crypto/jh.c \
+  crypto/keccak.c \
+  crypto/luffa.c \
+  crypto/shavite.c \
+  crypto/simd.c \
+  crypto/skein.c \
   crypto/common.h \
   crypto/sha256.h \
   crypto/sha512.h \
@@ -308,6 +309,7 @@ libbitcoin_common_a_SOURCES = \
 # backward-compatibility objects and their sanity checks are linked.
 libbitcoin_util_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_util_a_SOURCES = \
+  allocators.cpp \
   compat/strnlen.cpp \
   compat/glibc_sanity.cpp \
   compat/glibcxx_sanity.cpp \
@@ -359,7 +361,7 @@ dashd_SOURCES += dash-res.rc
 endif
 
 dashd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
-bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
+dashd_CPPFLAGS = $(BITCOIN_INCLUDES)
 dashd_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
 # dash-cli binary #
@@ -373,7 +375,7 @@ dash_cli_LDADD = \
 dash_cli_SOURCES = \
   dash-cli.cpp
 
-bitcoin_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
+dash_cli_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 
 # dash-tx binary #
@@ -387,7 +389,7 @@ dash_tx_LDADD = \
   $(CRYPTO_LIBS)
 
 dash_tx_SOURCES = dash-tx.cpp
-bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
+dash_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
 #
 dash_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 2bbb74a0b8ec..c80eb8769448 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -74,7 +74,7 @@ CAmount WalletModel::getBalance(const CCoinControl *coinControl) const
 }
 
 
-qint64 WalletModel::getAnonymizedBalance() const
+CAmount WalletModel::getAnonymizedBalance() const
 {
     return wallet->GetAnonymizedBalance();
 }

From ab4336c5e93a9c9f2b1943b93fafb2269a045dd9 Mon Sep 17 00:00:00 2001
From: thelazier <thelazier@gmail.com>
Date: Wed, 15 Apr 2015 01:27:45 +0700
Subject: [PATCH 1326/1819] Fixed Default RPC Ports

---
 src/chainparamsbase.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/chainparamsbase.cpp b/src/chainparamsbase.cpp
index 8646a31603c0..372c25ec03fe 100644
--- a/src/chainparamsbase.cpp
+++ b/src/chainparamsbase.cpp
@@ -22,7 +22,7 @@ class CBaseMainParams : public CBaseChainParams
     CBaseMainParams()
     {
         networkID = CBaseChainParams::MAIN;
-        nRPCPort = 8332;
+        nRPCPort = 9998;
     }
 };
 static CBaseMainParams mainParams;
@@ -36,7 +36,7 @@ class CBaseTestNetParams : public CBaseMainParams
     CBaseTestNetParams()
     {
         networkID = CBaseChainParams::TESTNET;
-        nRPCPort = 18332;
+        nRPCPort = 19998;
         strDataDir = "testnet3";
     }
 };

From f35b4d80bbc739bdbcf6ca43b49987f1c953397c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 15 Apr 2015 02:14:56 +0300
Subject: [PATCH 1327/1819] fix translation processs

---
 doc/translation_process.md     | 8 ++++----
 share/qt/extract_strings_qt.py | 2 +-
 src/Makefile.qt.include        | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/doc/translation_process.md b/doc/translation_process.md
index fb9bd73aa0c8..055bff70502d 100644
--- a/doc/translation_process.md
+++ b/doc/translation_process.md
@@ -37,10 +37,10 @@ source for all other translations. Whenever a string in the code is changed
 this file must be updated to reflect those changes. A custom script is used
 to extract strings from the non-Qt parts. This script makes use of `gettext`,
 so make sure that utility is installed (ie, `apt-get install gettext` on
-Ubuntu/Debian). Once this has been updated, lupdate-qt4 (included in the Qt SDK)
-is used to update dash_en.ts. Simply run:
-
-    lupdate-qt4 ./contrib/dash-qt.pro -ts ./src/qt/locale/dash_en.ts
+Ubuntu/Debian). Once this has been updated, lupdate (included in the Qt SDK)
+is used to update dash_en.ts. This process has been automated, from src/,
+simply run:
+    make translate
 
 ##### Handling of plurals in the source file
 
diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py
index d79a112014dd..8508a4ae5ca1 100755
--- a/share/qt/extract_strings_qt.py
+++ b/share/qt/extract_strings_qt.py
@@ -9,7 +9,7 @@
 import os
 import sys
 
-OUT_CPP="qt/bitcoinstrings.cpp"
+OUT_CPP="qt/dashstrings.cpp"
 EMPTY=['""']
 
 def parse_po(text):
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index ca63fd87391f..9f907775a1ee 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -331,11 +331,11 @@ QT_QM=$(QT_TS:.ts=.qm)
 
 .SECONDARY: $(QT_QM)
 
-qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
+qt/dashstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES)
 	@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
 	$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) ../share/qt/extract_strings_qt.py $^
 
-translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
+translate: qt/dashstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
 	@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
 	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/dash_en.ts
 

From 8e05e9eb100ed92b06284852fe1703c8ce08ef42 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 15 Apr 2015 01:40:28 +0300
Subject: [PATCH 1328/1819] Fix translations: - mn replies   - MN should use
 codes for replies, translations are done on client side (client protocol /
 min pool peer protocol bump)   - use QString for translation instead of
 ostream, construct better human readable strings for translators - progress  
 - use QString here too

---
 src/darksend.cpp        | 152 +++++++++++++++++++++++-----------------
 src/darksend.h          |  34 +++++++--
 src/qt/dashstrings.cpp  |  28 ++++----
 src/qt/overviewpage.cpp |  69 +++++++++---------
 src/version.h           |   4 +-
 5 files changed, 165 insertions(+), 122 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index e72ce1479695..6fc81056f8ff 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -53,18 +53,20 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
     if (strCommand == "dsa") { //Darksend Accept Into Pool
 
+        int errorID;
+
         if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
-            std::string strError = _("Incompatible version.");
+            errorID = ERR_VERSION;
             LogPrintf("dsa -- incompatible version! \n");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, strError);
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
 
             return;
         }
 
         if(!fMasterNode){
-            std::string strError = _("This is not a Masternode.");
+            errorID = ERR_NOT_A_MN;
             LogPrintf("dsa -- not a Masternode! \n");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, strError);
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
 
             return;
         }
@@ -73,12 +75,11 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         CTransaction txCollateral;
         vRecv >> nDenom >> txCollateral;
 
-        std::string error = "";
         CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
         if(pmn == NULL)
         {
-            std::string strError = _("Not in the Masternode list.");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, strError);
+            errorID = ERR_MN_LIST;
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
             return;
         }
 
@@ -86,20 +87,20 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             if(pmn->nLastDsq != 0 &&
                 pmn->nLastDsq + mnodeman.CountMasternodesAboveProtocol(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
                 LogPrintf("dsa -- last dsq too recent, must wait. %s \n", pfrom->addr.ToString().c_str());
-                std::string strError = _("Last Darksend was too recent.");
-                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, strError);
+                errorID = ERR_RECENT;
+                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
             }
         }
 
-        if(!IsCompatibleWithSession(nDenom, txCollateral, error))
+        if(!IsCompatibleWithSession(nDenom, txCollateral, errorID))
         {
             LogPrintf("dsa -- not compatible with existing transactions! \n");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
             return;
         } else {
             LogPrintf("dsa -- is compatible, please submit! \n");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_ACCEPTED, error);
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_ACCEPTED, errorID);
             return;
         }
 
@@ -158,19 +159,19 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         }
 
     } else if (strCommand == "dsi") { //DarkSend vIn
-        std::string error = "";
+        int errorID = MSG_NOERR;
         if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
             LogPrintf("dsi -- incompatible version! \n");
-            error = _("Incompatible version.");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            errorID = ERR_VERSION;
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
 
             return;
         }
 
         if(!fMasterNode){
             LogPrintf("dsi -- not a Masternode! \n");
-            error = _("This is not a Masternode.");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            errorID = ERR_NOT_A_MN;
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
 
             return;
         }
@@ -184,8 +185,8 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         //do we have enough users in the current session?
         if(!IsSessionReady()){
             LogPrintf("dsi -- session not complete! \n");
-            error = _("Session not complete!");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            errorID = ERR_SESSION;
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
             return;
         }
 
@@ -193,8 +194,8 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         if(!IsCompatibleWithEntries(out))
         {
             LogPrintf("dsi -- not compatible with existing transactions! \n");
-            error = _("Not compatible with existing transactions.");
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            errorID = ERR_EXISTING_TX;
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
             return;
         }
 
@@ -213,14 +214,14 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
                 if(o.scriptPubKey.size() != 25){
                     LogPrintf("dsi - non-standard pubkey detected! %s\n", o.scriptPubKey.ToString().c_str());
-                    error = _("Non-standard public key detected.");
-                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                    errorID = ERR_NON_STANDARD_PUBKEY;
+                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
                 }
                 if(!o.scriptPubKey.IsNormalPaymentScript()){
                     LogPrintf("dsi - invalid script! %s\n", o.scriptPubKey.ToString().c_str());
-                    error = _("Invalid script detected.");
-                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                    errorID = ERR_INVALID_SCRIPT;
+                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
                 }
             }
@@ -243,40 +244,40 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
             if (nValueIn > DARKSEND_POOL_MAX) {
                 LogPrintf("dsi -- more than Darksend pool max! %s\n", tx.ToString().c_str());
-                error = _("Value more than Darksend pool maximum allows.");
-                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                errorID = ERR_MAXIMUM;
+                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
             }
 
             if(!missingTx){
                 if (nValueIn-nValueOut > nValueIn*.01) {
                     LogPrintf("dsi -- fees are too high! %s\n", tx.ToString().c_str());
-                    error = _("Transaction fees are too high.");
-                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                    errorID = ERR_FEES;
+                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
                 }
             } else {
                 LogPrintf("dsi -- missing input tx! %s\n", tx.ToString().c_str());
-                error = _("Missing input transaction information.");
-                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                errorID = ERR_MISSING_TX;
+                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
             }
 
             if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) {
                 LogPrintf("dsi -- transaction not valid! \n");
-                error = _("Transaction not valid.");
-                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+                errorID = ERR_INVALID_TX;
+                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
             }
         }
 
-        if(AddEntry(in, nAmount, txCollateral, out, error)){
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_ACCEPTED, error);
+        if(AddEntry(in, nAmount, txCollateral, out, errorID)){
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_ACCEPTED, errorID);
             Check();
 
             RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
         } else {
-            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, error);
+            pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
         }
 
     } else if (strCommand == "dssu") { //Darksend status update
@@ -294,17 +295,17 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         int state;
         int entriesCount;
         int accepted;
-        std::string error;
-        vRecv >> sessionIDMessage >> state >> entriesCount >> accepted >> error;
+        int errorID;
+        vRecv >> sessionIDMessage >> state >> entriesCount >> accepted >> errorID;
 
-        if(fDebug) LogPrintf("dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, error.c_str());
+        if(fDebug) LogPrintf("dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, GetMessageByID(errorID).c_str());
 
         if((accepted != 1 && accepted != 0) && sessionID != sessionIDMessage){
             LogPrintf("dssu - message doesn't match current Darksend session %d %d\n", sessionID, sessionIDMessage);
             return;
         }
 
-        StatusUpdate(state, entriesCount, accepted, error, sessionIDMessage);
+        StatusUpdate(state, entriesCount, accepted, errorID, sessionIDMessage);
 
     } else if (strCommand == "dss") { //Darksend Sign Final Tx
 
@@ -611,7 +612,7 @@ void CDarksendPool::CheckFinalTransaction()
 
                 // not much we can do in this case
                 UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
-                RelayCompletedTransaction(sessionID, true, "Transaction not valid, please try again");
+                RelayCompletedTransaction(sessionID, true, ERR_INVALID_TX);
                 return;
             }
 
@@ -657,7 +658,7 @@ void CDarksendPool::CheckFinalTransaction()
             txNew.RelayWalletTransaction();
 
             // Tell the clients it was successful
-            RelayCompletedTransaction(sessionID, false, _("Transaction created successfully."));
+            RelayCompletedTransaction(sessionID, false, MSG_SUCCESS);
 
             // Randomly charge clients
             ChargeRandomFees();
@@ -1021,13 +1022,13 @@ bool CDarksendPool::IsCollateralValid(const CTransaction& txCollateral){
 //
 // Add a clients transaction to the pool
 //
-bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxOut>& newOutput, std::string& error){
+bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxOut>& newOutput, int& errorID){
     if (!fMasterNode) return false;
 
     BOOST_FOREACH(CTxIn in, newInput) {
         if (in.prevout.IsNull() || nAmount < 0) {
             if(fDebug) LogPrintf ("CDarksendPool::AddEntry - input not valid!\n");
-            error = _("Input is not valid.");
+            errorID = ERR_INVALID_INPUT;
             sessionUsers--;
             return false;
         }
@@ -1035,14 +1036,14 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
 
     if (!IsCollateralValid(txCollateral)){
         if(fDebug) LogPrintf ("CDarksendPool::AddEntry - collateral not valid!\n");
-        error = _("Collateral is not valid.");
+        errorID = ERR_INVALID_COLLATERAL;
         sessionUsers--;
         return false;
     }
 
     if((int)entries.size() >= GetMaxPoolTransactions()){
         if(fDebug) LogPrintf ("CDarksendPool::AddEntry - entries is full!\n");
-        error = _("Entries are full.");
+        errorID = ERR_ENTRIES_FULL;
         sessionUsers--;
         return false;
     }
@@ -1053,7 +1054,7 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
             BOOST_FOREACH(const CTxDSIn& s, v.sev){
                 if((CTxIn)s == in) {
                     if(fDebug) LogPrintf ("CDarksendPool::AddEntry - found in vin\n");
-                    error = _("Already have that input.");
+                    errorID = ERR_ALREADY_HAVE;
                     sessionUsers--;
                     return false;
                 }
@@ -1066,7 +1067,7 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     entries.push_back(v);
 
     if(fDebug) LogPrintf("CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString().c_str());
-    error = "";
+    errorID = MSG_NOERR;
 
     return true;
 }
@@ -1202,21 +1203,21 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 //                  0 means transaction was not accepted
 //                  1 means transaction was accepted
 
-bool CDarksendPool::StatusUpdate(int newState, int newEntriesCount, int newAccepted, std::string& error, int newSessionID){
+bool CDarksendPool::StatusUpdate(int newState, int newEntriesCount, int newAccepted, int& errorID, int newSessionID){
     if(fMasterNode) return false;
     if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) return false;
 
     UpdateState(newState);
     entriesCount = newEntriesCount;
 
-    if(error.size() > 0) strAutoDenomResult = _("Masternode:") + " " + error;
+    if(errorID != MSG_NOERR) strAutoDenomResult = _("Masternode:") + " " + GetMessageByID(errorID);
 
     if(newAccepted != -1) {
         lastEntryAccepted = newAccepted;
         countEntriesAccepted += newAccepted;
         if(newAccepted == 0){
             UpdateState(POOL_STATUS_ERROR);
-            lastMessage = error;
+            lastMessage = GetMessageByID(errorID);
         }
 
         if(newAccepted == 1 && newSessionID != 0) {
@@ -1827,7 +1828,7 @@ bool CDarksendPool::IsCompatibleWithEntries(std::vector<CTxOut>& vout)
     return true;
 }
 
-bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txCollateral, std::string& strReason)
+bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txCollateral, int& errorID)
 {
     if(nDenom == 0) return false;
 
@@ -1835,7 +1836,7 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
 
     if (!unitTest && !IsCollateralValid(txCollateral)){
         if(fDebug) LogPrintf ("CDarksendPool::IsCompatibleWithSession - collateral not valid!\n");
-        strReason = _("Collateral not valid.");
+        errorID = ERR_INVALID_COLLATERAL;
         return false;
     }
 
@@ -1864,14 +1865,14 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
     }
 
     if((state != POOL_STATUS_ACCEPTING_ENTRIES && state != POOL_STATUS_QUEUE) || sessionUsers >= GetMaxPoolTransactions()){
-        if((state != POOL_STATUS_ACCEPTING_ENTRIES && state != POOL_STATUS_QUEUE)) strReason = _("Incompatible mode.");
-        if(sessionUsers >= GetMaxPoolTransactions()) strReason = _("Masternode queue is full.");
+        if((state != POOL_STATUS_ACCEPTING_ENTRIES && state != POOL_STATUS_QUEUE)) errorID = ERR_MODE;
+        if(sessionUsers >= GetMaxPoolTransactions()) errorID = ERR_QUEUE_FULL;
         LogPrintf("CDarksendPool::IsCompatibleWithSession - incompatible mode, return false %d %d\n", state != POOL_STATUS_ACCEPTING_ENTRIES, sessionUsers >= GetMaxPoolTransactions());
         return false;
     }
 
     if(nDenom != sessionDenom) {
-        strReason = _("No matching denominations found for mixing.");
+        errorID = ERR_DENOM;
         return false;
     }
 
@@ -2019,6 +2020,34 @@ int CDarksendPool::GetDenominationsByAmount(int64_t nAmount, int nDenomTarget){
     return GetDenominations(vout1);
 }
 
+std::string CDarksendPool::GetMessageByID(int messageID) {
+    switch (messageID) {
+    case ERR_ALREADY_HAVE: return _("Already have that input.");
+    case ERR_DENOM: return _("No matching denominations found for mixing.");
+    case ERR_ENTRIES_FULL: return _("Entries are full.");
+    case ERR_EXISTING_TX: return _("Not compatible with existing transactions.");
+    case ERR_FEES: return _("Transaction fees are too high.");
+    case ERR_INVALID_COLLATERAL: return _("Collateral not valid.");
+    case ERR_INVALID_INPUT: return _("Input is not valid.");
+    case ERR_INVALID_SCRIPT: return _("Invalid script detected.");
+    case ERR_INVALID_TX: return _("Transaction not valid.");
+    case ERR_MAXIMUM: return _("Value more than Darksend pool maximum allows.");
+    case ERR_MN_LIST: return _("Not in the Masternode list.");
+    case ERR_MODE: return _("Incompatible mode.");
+    case ERR_NON_STANDARD_PUBKEY: return _("Non-standard public key detected.");
+    case ERR_NOT_A_MN: return _("This is not a Masternode.");
+    case ERR_QUEUE_FULL: return _("Masternode queue is full.");
+    case ERR_RECENT: return _("Last Darksend was too recent.");
+    case ERR_SESSION: return _("Session not complete!");
+    case ERR_MISSING_TX: return _("Missing input transaction information.");
+    case ERR_VERSION: return _("Incompatible version.");
+    case MSG_SUCCESS: return _("Transaction created successfully.");
+    case MSG_NOERR:
+    default:
+        return "";
+    }
+}
+
 bool CDarkSendSigner::IsVinAssociatedWithPubkey(CTxIn& vin, CPubKey& pubkey){
     CScript payee2;
     payee2 = GetScriptForDestination(pubkey.GetID());
@@ -2175,18 +2204,18 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
     }
 }
 
-void CDarksendPool::RelayStatus(const int sessionID, const int newState, const int newEntriesCount, const int newAccepted, const std::string error)
+void CDarksendPool::RelayStatus(const int sessionID, const int newState, const int newEntriesCount, const int newAccepted, const int errorID)
 {
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("dssu", sessionID, newState, newEntriesCount, newAccepted, error);
+        pnode->PushMessage("dssu", sessionID, newState, newEntriesCount, newAccepted, errorID);
 }
 
-void CDarksendPool::RelayCompletedTransaction(const int sessionID, const bool error, const std::string errorMessage)
+void CDarksendPool::RelayCompletedTransaction(const int sessionID, const bool error, const int errorID)
 {
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("dsc", sessionID, error, errorMessage);
+        pnode->PushMessage("dsc", sessionID, error, errorID);
 }
 
 //TODO: Rename/move to core
@@ -2265,6 +2294,3 @@ void ThreadCheckDarkSendPool()
         }
     }
 }
-
-
-
diff --git a/src/darksend.h b/src/darksend.h
index 927a5bb99866..50547af39f35 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -261,6 +261,29 @@ class CDarkSendSigner
 class CDarksendPool
 {
 public:
+    enum messages {
+        ERR_ALREADY_HAVE,
+        ERR_DENOM,
+        ERR_ENTRIES_FULL,
+        ERR_EXISTING_TX,
+        ERR_FEES,
+        ERR_INVALID_COLLATERAL,
+        ERR_INVALID_INPUT,
+        ERR_INVALID_SCRIPT,
+        ERR_INVALID_TX,
+        ERR_MAXIMUM,
+        ERR_MN_LIST,
+        ERR_MODE,
+        ERR_NON_STANDARD_PUBKEY,
+        ERR_NOT_A_MN,
+        ERR_QUEUE_FULL,
+        ERR_RECENT,
+        ERR_SESSION,
+        ERR_MISSING_TX,
+        ERR_VERSION,
+        MSG_NOERR,
+        MSG_SUCCESS
+    };
 
     std::vector<CDarkSendEntry> myEntries; // clients entries
     std::vector<CDarkSendEntry> entries; // Masternode entries
@@ -419,7 +442,7 @@ class CDarksendPool
     bool IsCompatibleWithEntries(std::vector<CTxOut>& vout);
 
     /// Is this amount compatible with other client in the pool?
-    bool IsCompatibleWithSession(int64_t nAmount, CTransaction txCollateral, std::string& strReason);
+    bool IsCompatibleWithSession(int64_t nAmount, CTransaction txCollateral, int &errorID);
 
     /// Passively run Darksend in the background according to the configuration in settings (only for QT)
     bool DoAutomaticDenominating(bool fDryRun=false, bool ready=false);
@@ -439,7 +462,7 @@ class CDarksendPool
     /// If the collateral is valid given by a client
     bool IsCollateralValid(const CTransaction& txCollateral);
     /// Add a clients entry to the pool
-    bool AddEntry(const std::vector<CTxIn>& newInput, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxOut>& newOutput, std::string& error);
+    bool AddEntry(const std::vector<CTxIn>& newInput, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxOut>& newOutput, int& errorID);
     /// Add signature to a vin
     bool AddScriptSig(const CTxIn& newVin);
     /// Check that all inputs are signed. (Are all inputs signed?)
@@ -447,7 +470,7 @@ class CDarksendPool
     /// As a client, send a transaction to a Masternode to start the denomination process
     void SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64_t amount);
     /// Get Masternode updates about the progress of Darksend
-    bool StatusUpdate(int newState, int newEntriesCount, int newAccepted, std::string& error, int newSessionID=0);
+    bool StatusUpdate(int newState, int newEntriesCount, int newAccepted, int &errorID, int newSessionID=0);
 
     /// As a client, check and sign the final transaction
     bool SignFinalTransaction(CTransaction& finalTransactionNew, CNode* node);
@@ -475,6 +498,7 @@ class CDarksendPool
     int GetDenominationsByAmount(int64_t nAmount, int nDenomTarget=0);
     int GetDenominationsByAmounts(std::vector<int64_t>& vecAmount);
 
+    std::string GetMessageByID(int messageID);
 
     //
     // Relay Darksend Messages
@@ -484,8 +508,8 @@ class CDarksendPool
     void RelaySignaturesAnon(std::vector<CTxIn>& vin);
     void RelayInAnon(std::vector<CTxIn>& vin, std::vector<CTxOut>& vout);
     void RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxDSOut>& vout);
-    void RelayStatus(const int sessionID, const int newState, const int newEntriesCount, const int newAccepted, const std::string error="");
-    void RelayCompletedTransaction(const int sessionID, const bool error, const std::string errorMessage);
+    void RelayStatus(const int sessionID, const int newState, const int newEntriesCount, const int newAccepted, const int errorID=MSG_NOERR);
+    void RelayCompletedTransaction(const int sessionID, const bool error, const int errorID);
 };
 
 void ThreadCheckDarkSendPool();
diff --git a/src/qt/dashstrings.cpp b/src/qt/dashstrings.cpp
index 2d2df2d9b93b..ae7640881f08 100644
--- a/src/qt/dashstrings.cpp
+++ b/src/qt/dashstrings.cpp
@@ -24,8 +24,7 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "If the file does not exist, create it with owner-readable-only file "
 "permissions.\n"
 "It is also recommended to set alertnotify so you are notified of problems;\n"
-"for example: alertnotify=echo %%s | mail -s \"Dash Alert\" admin@foo."
-"com\n"),
+"for example: alertnotify=echo %%s | mail -s \"Dash Alert\" admin@foo.com\n"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
 "3DES:@STRENGTH)"),
@@ -131,8 +130,7 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Unable to bind to %s on this computer. Dash Core is probably already "
-"running."),
+"Unable to bind to %s on this computer. Dash Core is probably already running."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Unable to locate enough Darksend denominated funds for this transaction."),
 QT_TRANSLATE_NOOP("dash-core", ""
@@ -188,7 +186,6 @@ QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -bind address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -externalip address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot write default address"),
 QT_TRANSLATE_NOOP("dash-core", "Clear list of wallet transactions (diagnostic tool; implies -rescan)"),
-QT_TRANSLATE_NOOP("dash-core", "Collateral is not valid."),
 QT_TRANSLATE_NOOP("dash-core", "Collateral not valid."),
 QT_TRANSLATE_NOOP("dash-core", "Connect only to the specified node(s)"),
 QT_TRANSLATE_NOOP("dash-core", "Connect through SOCKS proxy"),
@@ -197,20 +194,19 @@ QT_TRANSLATE_NOOP("dash-core", "Connect to KeePassHttp on port <port> (default:
 QT_TRANSLATE_NOOP("dash-core", "Connect to a node to retrieve peer addresses, and disconnect"),
 QT_TRANSLATE_NOOP("dash-core", "Connection options:"),
 QT_TRANSLATE_NOOP("dash-core", "Corrupted block database detected"),
-QT_TRANSLATE_NOOP("dash-core", "Dash Core Daemon"),
-QT_TRANSLATE_NOOP("dash-core", "Dash Core RPC client version"),
 QT_TRANSLATE_NOOP("dash-core", "Darksend is disabled."),
 QT_TRANSLATE_NOOP("dash-core", "Darksend options:"),
+QT_TRANSLATE_NOOP("dash-core", "Dash Core Daemon"),
+QT_TRANSLATE_NOOP("dash-core", "Dash Core RPC client version"),
 QT_TRANSLATE_NOOP("dash-core", "Debugging/Testing options:"),
 QT_TRANSLATE_NOOP("dash-core", "Disable safemode, override a real safe mode event (default: 0)"),
 QT_TRANSLATE_NOOP("dash-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
 QT_TRANSLATE_NOOP("dash-core", "Do not load the wallet and disable wallet RPC calls"),
 QT_TRANSLATE_NOOP("dash-core", "Do you want to rebuild the block database now?"),
 QT_TRANSLATE_NOOP("dash-core", "Done loading"),
-QT_TRANSLATE_NOOP("dash-core", "Downgrading and trying again."),
 QT_TRANSLATE_NOOP("dash-core", "Enable the client to act as a masternode (0-1, default: 0)"),
 QT_TRANSLATE_NOOP("dash-core", "Entries are full."),
-QT_TRANSLATE_NOOP("dash-core", "Error connecting to masternode."),
+QT_TRANSLATE_NOOP("dash-core", "Error connecting to Masternode."),
 QT_TRANSLATE_NOOP("dash-core", "Error initializing block database"),
 QT_TRANSLATE_NOOP("dash-core", "Error initializing wallet database environment %s!"),
 QT_TRANSLATE_NOOP("dash-core", "Error loading block database"),
@@ -270,7 +266,7 @@ QT_TRANSLATE_NOOP("dash-core", "Keep N dash anonymized (default: 0)"),
 QT_TRANSLATE_NOOP("dash-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Last Darksend was too recent."),
-QT_TRANSLATE_NOOP("dash-core", "Last successful darksend action was too recent."),
+QT_TRANSLATE_NOOP("dash-core", "Last successful Darksend action was too recent."),
 QT_TRANSLATE_NOOP("dash-core", "Limit size of signature cache to <n> entries (default: 50000)"),
 QT_TRANSLATE_NOOP("dash-core", "List commands"),
 QT_TRANSLATE_NOOP("dash-core", "Listen for connections on <port> (default: 9999 or testnet: 19999)"),
@@ -288,14 +284,14 @@ QT_TRANSLATE_NOOP("dash-core", "Masternode:"),
 QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
 QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
 QT_TRANSLATE_NOOP("dash-core", "Missing input transaction information."),
-QT_TRANSLATE_NOOP("dash-core", "No compatible masternode found."),
+QT_TRANSLATE_NOOP("dash-core", "No Masternodes detected."),
+QT_TRANSLATE_NOOP("dash-core", "No compatible Masternode found."),
 QT_TRANSLATE_NOOP("dash-core", "No funds detected in need of denominating."),
-QT_TRANSLATE_NOOP("dash-core", "No masternodes detected."),
 QT_TRANSLATE_NOOP("dash-core", "No matching denominations found for mixing."),
 QT_TRANSLATE_NOOP("dash-core", "Non-standard public key detected."),
 QT_TRANSLATE_NOOP("dash-core", "Not compatible with existing transactions."),
 QT_TRANSLATE_NOOP("dash-core", "Not enough file descriptors available."),
-QT_TRANSLATE_NOOP("dash-core", "Not in the masternode list."),
+QT_TRANSLATE_NOOP("dash-core", "Not in the Masternode list."),
 QT_TRANSLATE_NOOP("dash-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
 QT_TRANSLATE_NOOP("dash-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
 QT_TRANSLATE_NOOP("dash-core", "Options:"),
@@ -321,9 +317,9 @@ QT_TRANSLATE_NOOP("dash-core", "Send trace/debug info to console instead of debu
 QT_TRANSLATE_NOOP("dash-core", "Server certificate file (default: server.cert)"),
 QT_TRANSLATE_NOOP("dash-core", "Server private key (default: server.pem)"),
 QT_TRANSLATE_NOOP("dash-core", "Session not complete!"),
-QT_TRANSLATE_NOOP("dash-core", "Session timed out (30 seconds), please resubmit."),
+QT_TRANSLATE_NOOP("dash-core", "Session timed out, please resubmit."),
 QT_TRANSLATE_NOOP("dash-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
-QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: 100)"),
+QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: 1000)"),
 QT_TRANSLATE_NOOP("dash-core", "Set maximum block size in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", "Set minimum block size in bytes (default: 0)"),
 QT_TRANSLATE_NOOP("dash-core", "Set the masternode private key"),
@@ -347,7 +343,7 @@ QT_TRANSLATE_NOOP("dash-core", "Start Dash Core Daemon"),
 QT_TRANSLATE_NOOP("dash-core", "System error: "),
 QT_TRANSLATE_NOOP("dash-core", "This help message"),
 QT_TRANSLATE_NOOP("dash-core", "This is intended for regression testing tools and app development."),
-QT_TRANSLATE_NOOP("dash-core", "This is not a masternode."),
+QT_TRANSLATE_NOOP("dash-core", "This is not a Masternode."),
 QT_TRANSLATE_NOOP("dash-core", "Threshold for disconnecting misbehaving peers (default: 100)"),
 QT_TRANSLATE_NOOP("dash-core", "To use the %s option"),
 QT_TRANSLATE_NOOP("dash-core", "Transaction amount too small"),
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 905db810cbc0..c15d8b142dc9 100755
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -358,10 +358,8 @@ void OverviewPage::updateDarksendProgress()
 
     ui->darksendProgress->setValue(progress);
 
-    std::ostringstream convert;
-    convert << "Progress: " << progress << "%, inputs have an average of " << pwalletMain->GetAverageAnonymizedRounds() << " of " << nDarksendRounds << " rounds";
-    QString s(convert.str().c_str());
-    ui->darksendProgress->setToolTip(s);
+    QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
+    ui->darksendProgress->setToolTip(strToolPip);
 }
 
 
@@ -377,12 +375,10 @@ void OverviewPage::darkSendStatus()
 
         updateDarksendProgress();
 
-        QString strSettings(" " + tr("Rounds"));
-        strSettings.prepend(QString::number(nDarksendRounds)).prepend(" / ");
-        strSettings.prepend(BitcoinUnits::formatWithUnit(
-            walletModel->getOptionsModel()->getDisplayUnit(),
-            nAnonymizeDarkcoinAmount * COIN)
-        );
+        QString strSettings = BitcoinUnits::formatWithUnit(
+                    walletModel->getOptionsModel()->getDisplayUnit(),
+                    nAnonymizeDarkcoinAmount * COIN
+                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
 
         ui->labelAmountRounds->setText(strSettings);
     }
@@ -416,60 +412,61 @@ void OverviewPage::darkSendStatus()
     int accepted = darkSendPool.GetLastEntryAccepted();
 
     /* ** @TODO this string creation really needs some clean ups ---vertoe ** */
-    std::ostringstream convert;
+    QString strStatus;
 
-    if(state == POOL_STATUS_IDLE) {
-        convert << tr("Darksend is idle.").toStdString();
+    if(chainActive.Tip()->nHeight - darkSendPool.cachedLastSuccess < darkSendPool.minBlockSpacing) {
+        strStatus = QString(darkSendPool.strAutoDenomResult.c_str());
+    } else if(state == POOL_STATUS_IDLE) {
+        strStatus = tr("Darksend is idle.");
     } else if(state == POOL_STATUS_ACCEPTING_ENTRIES) {
         if(entries == 0) {
             if(darkSendPool.strAutoDenomResult.size() == 0){
-                convert << tr("Mixing in progress...").toStdString();
+                strStatus = tr("Mixing in progress...");
             } else {
-                convert << darkSendPool.strAutoDenomResult;
+                strStatus = QString(darkSendPool.strAutoDenomResult.c_str());
             }
             showingDarkSendMessage = 0;
         } else if (accepted == 1) {
-            convert << tr("Darksend request complete: Your transaction was accepted into the pool!").toStdString();
+            strStatus = tr("Darksend request complete:") + " " + tr("Your transaction was accepted into the pool!");
             if(showingDarkSendMessage % 10 > 8) {
                 darkSendPool.lastEntryAccepted = 0;
                 showingDarkSendMessage = 0;
             }
         } else {
-            if(showingDarkSendMessage % 70 <= 40) convert << tr("Submitted following entries to masternode:").toStdString() << " " << entries << "/" << darkSendPool.GetMaxPoolTransactions();
-            else if(showingDarkSendMessage % 70 <= 50) convert << tr("Submitted to masternode, waiting for more entries").toStdString() << " (" << entries << "/" << darkSendPool.GetMaxPoolTransactions() << " ) .";
-            else if(showingDarkSendMessage % 70 <= 60) convert << tr("Submitted to masternode, waiting for more entries").toStdString() << " (" << entries << "/" << darkSendPool.GetMaxPoolTransactions() << " ) ..";
-            else if(showingDarkSendMessage % 70 <= 70) convert << tr("Submitted to masternode, waiting for more entries").toStdString() << " (" << entries << "/" << darkSendPool.GetMaxPoolTransactions() << " ) ...";
+            if(showingDarkSendMessage % 70 <= 40) strStatus = tr("Submitted following entries to masternode: %1 / %2").arg(entries).arg(darkSendPool.GetMaxPoolTransactions());
+            else if(showingDarkSendMessage % 70 <= 50) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" .");
+            else if(showingDarkSendMessage % 70 <= 60) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" ..");
+            else if(showingDarkSendMessage % 70 <= 70) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" ...");
         }
     } else if(state == POOL_STATUS_SIGNING) {
-        if(showingDarkSendMessage % 70 <= 10) convert << tr("Found enough users, signing ...").toStdString();
-        else if(showingDarkSendMessage % 70 <= 20) convert << tr("Found enough users, signing ( waiting").toStdString() << ". )";
-        else if(showingDarkSendMessage % 70 <= 30) convert << tr("Found enough users, signing ( waiting").toStdString() << ".. )";
-        else if(showingDarkSendMessage % 70 <= 40) convert << tr("Found enough users, signing ( waiting").toStdString() << "... )";
+        if(showingDarkSendMessage % 70 <= 10) strStatus = tr("Found enough users, signing ...");
+        else if(showingDarkSendMessage % 70 <= 20) strStatus = tr("Found enough users, signing ( waiting %1 )").arg(".");
+        else if(showingDarkSendMessage % 70 <= 30) strStatus = tr("Found enough users, signing ( waiting %1 )").arg("..");
+        else if(showingDarkSendMessage % 70 <= 40) strStatus = tr("Found enough users, signing ( waiting %1 )").arg("...");
     } else if(state == POOL_STATUS_TRANSMISSION) {
-        convert << tr("Transmitting final transaction.").toStdString();
+        strStatus = tr("Transmitting final transaction.");
     } else if (state == POOL_STATUS_IDLE) {
-        convert << tr("Darksend is idle.").toStdString();
+        strStatus = tr("Darksend is idle.");
     } else if (state == POOL_STATUS_FINALIZE_TRANSACTION) {
-        convert << tr("Finalizing transaction.").toStdString();
+        strStatus = tr("Finalizing transaction.");
     } else if(state == POOL_STATUS_ERROR) {
-        convert << tr("Darksend request incomplete:").toStdString() << " " << darkSendPool.lastMessage << ". " << tr("Will retry...").toStdString();
+        strStatus = tr("Darksend request incomplete:") + " " + tr(darkSendPool.lastMessage.c_str()) + " " + tr("Will retry...");
     } else if(state == POOL_STATUS_SUCCESS) {
-        convert << tr("Darksend request complete:").toStdString() << " " << darkSendPool.lastMessage;
+        strStatus = tr("Darksend request complete:") + " " + tr(darkSendPool.lastMessage.c_str());
     } else if(state == POOL_STATUS_QUEUE) {
-        if(showingDarkSendMessage % 70 <= 50) convert << tr("Submitted to masternode, waiting in queue").toStdString() << " .";
-        else if(showingDarkSendMessage % 70 <= 60) convert << tr("Submitted to masternode, waiting in queue").toStdString() << " ..";
-        else if(showingDarkSendMessage % 70 <= 70) convert << tr("Submitted to masternode, waiting in queue").toStdString() << " ...";
+        if(showingDarkSendMessage % 70 <= 50) strStatus = tr("Submitted to masternode, waiting in queue %1").arg(".");
+        else if(showingDarkSendMessage % 70 <= 60) strStatus = tr("Submitted to masternode, waiting in queue %1").arg("..");
+        else if(showingDarkSendMessage % 70 <= 70) strStatus = tr("Submitted to masternode, waiting in queue %1").arg("...");
     } else {
-        convert << tr("Unknown state:").toStdString() << " id = " << state;
+        strStatus = tr("Unknown state: id = %1").arg(state);
     }
 
     if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) darkSendPool.Check();
 
-    QString s(convert.str().c_str());
-    s = tr("Last Darksend message:\n") + s;
+    QString s = tr("Last Darksend message:\n") + strStatus;
 
     if(s != ui->darksendStatus->text())
-        LogPrintf("Last Darksend message: %s\n", convert.str().c_str());
+        LogPrintf("Last Darksend message: %s\n", strStatus.toStdString());
 
     ui->darksendStatus->setText(s);
 
diff --git a/src/version.h b/src/version.h
index 7a46b6718b69..bcd518b9446b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70076;
+static const int PROTOCOL_VERSION = 70077;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70076;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70076;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70077;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 57d1f46952bb6ee5c7b1200f29e8854d3191923a Mon Sep 17 00:00:00 2001
From: mrbandrews <bandrewsny@gmail.com>
Date: Thu, 9 Apr 2015 11:08:39 -0400
Subject: [PATCH 1329/1819] Fix CheckBlockIndex for reindex.

Some tests in CheckBlockIndex require chainActive.Tip(), but when reindexing, chainActive has not been set on the first call to CheckBlockIndex.

reindex.py starts a node, mines 3 blocks, stops, and reindexes with CheckBlockIndex enabled.

Rebased-From: 0421c18f3a261f04e83a03f59884e5798af74fd9
Github-Pull: #6012
---
 qa/rpc-tests/reindex.py | 34 ++++++++++++++++++++++++++++++++++
 src/main.cpp            |  8 ++++++++
 2 files changed, 42 insertions(+)
 create mode 100755 qa/rpc-tests/reindex.py

diff --git a/qa/rpc-tests/reindex.py b/qa/rpc-tests/reindex.py
new file mode 100755
index 000000000000..fe767586bb75
--- /dev/null
+++ b/qa/rpc-tests/reindex.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python2
+# Copyright (c) 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.
+
+#
+# Test -reindex with CheckBlockIndex
+#
+from test_framework import BitcoinTestFramework
+from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from util import *
+import os.path
+
+class ReindexTest(BitcoinTestFramework):
+
+    def setup_chain(self):
+        print("Initializing test directory "+self.options.tmpdir)
+        initialize_chain_clean(self.options.tmpdir, 1)
+
+    def setup_network(self):
+        self.nodes = []
+        self.is_network_split = False
+        self.nodes.append(start_node(0, self.options.tmpdir))
+
+    def run_test(self):
+        self.nodes[0].generate(3)
+        stop_node(self.nodes[0], 0)
+        wait_bitcoinds()
+        self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug", "-reindex", "-checkblockindex=1"])
+        assert_equal(self.nodes[0].getblockcount(), 3)
+        print "Success"
+
+if __name__ == '__main__':
+    ReindexTest().main()
diff --git a/src/main.cpp b/src/main.cpp
index dc6f37c2200b..4685c779a475 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3227,6 +3227,14 @@ void static CheckBlockIndex()
 
     LOCK(cs_main);
 
+    // During a reindex, we read the genesis block and call CheckBlockIndex before ActivateBestChain,
+    // so we have the genesis block in mapBlockIndex but no active chain.  (A few of the tests when
+    // iterating the block tree require that chainActive has been initialized.)
+    if (chainActive.Height() < 0) {
+        assert(mapBlockIndex.size() <= 1);
+        return;
+    }
+
     // Build forward-pointing map of the entire block tree.
     std::multimap<CBlockIndex*,CBlockIndex*> forward;
     for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) {

From 88f6a598b9b63840359030b6392e90e552de9d3f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 16 Apr 2015 07:08:06 -0700
Subject: [PATCH 1330/1819] Updated Reference-Node Implementation

- Added nLastPaid to masternode information for persistant storage of the masternode payment cycle
- Masternodes get flagged as just paid when they enter the masternode list and must wait a full cycle to be paid again
- Masternode RPC commands now show short vin string instead of ip address
---
 src/masternode.cpp             |  9 ++++-
 src/masternode.h               |  8 ++++
 src/masternodeman.cpp          |  9 ++---
 src/masternodeman.h            |  2 +-
 src/primitives/transaction.cpp |  5 +++
 src/primitives/transaction.h   |  4 +-
 src/rpcdarksend.cpp            | 68 ++++++++++++++++++----------------
 7 files changed, 65 insertions(+), 40 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 308bbd8d31d1..ef083d9624b5 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -156,6 +156,9 @@ CMasternode::CMasternode()
     lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
+
+    //mark last paid as current for new entries
+    nLastPaid = GetAdjustedTime();
 }
 
 CMasternode::CMasternode(const CMasternode& other)
@@ -182,6 +185,7 @@ CMasternode::CMasternode(const CMasternode& other)
     lastVote = other.lastVote;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
+    nLastPaid = other.nLastPaid;
 }
 
 CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
@@ -208,6 +212,7 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
+    nLastPaid = GetAdjustedTime();
 }
 
 //
@@ -434,7 +439,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     }
 
     // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-    CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge, 0);
+    CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
     if(pmn != NULL)
     {
         LogPrintf(" Found by FindOldestNotInVec \n");
@@ -442,6 +447,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         newWinner.score = 0;
         newWinner.nBlockHeight = nBlockHeight;
         newWinner.vin = pmn->vin;
+        pmn->nLastPaid = GetAdjustedTime();
 
         if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
             newWinner.payee = pmn->donationAddress;
@@ -468,6 +474,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
                 newWinner.score = 0;
                 newWinner.nBlockHeight = nBlockHeight;
                 newWinner.vin = pmn->vin;
+                pmn->nLastPaid = GetAdjustedTime();
 
                 if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
                     newWinner.payee = pmn->donationAddress;
diff --git a/src/masternode.h b/src/masternode.h
index 3c83ac3586f9..83a27e8e1ad8 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -84,6 +84,7 @@ class CMasternode
     int64_t lastVote;
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
+    int64_t nLastPaid;
 
     CMasternode();
     CMasternode(const CMasternode& other);
@@ -117,6 +118,7 @@ class CMasternode
         swap(first.lastVote, second.lastVote);
         swap(first.nScanningErrorCount, second.nScanningErrorCount);
         swap(first.nLastScanningErrorBlockHeight, second.nLastScanningErrorBlockHeight);
+        swap(first.nLastPaid, second.nLastPaid);
     }
 
     CMasternode& operator=(CMasternode from)
@@ -161,6 +163,12 @@ class CMasternode
             READWRITE(lastVote);
             READWRITE(nScanningErrorCount);
             READWRITE(nLastScanningErrorBlockHeight);
+            READWRITE(nLastPaid);
+    }
+
+    int64_t SecondsSincePayment()
+    {
+        return (GetAdjustedTime() - nLastPaid);
     }
 
     void UpdateLastSeen(int64_t override=0)
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 7e9272f16284..50621a31b91e 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -345,8 +345,7 @@ CMasternode *CMasternodeMan::Find(const CPubKey &pubKeyMasternode)
     return NULL;
 }
 
-
-CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge, int nMinimumActiveSeconds)
+CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge)
 {
     LOCK(cs);
 
@@ -357,9 +356,7 @@ CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins,
         mn.Check();
         if(!mn.IsEnabled()) continue;
 
-        if(Params().NetworkID() != CBaseChainParams::REGTEST){
-            if(mn.GetMasternodeInputAge() < nMinimumAge || mn.lastTimeSeen - mn.sigTime < nMinimumActiveSeconds) continue;
-        }
+        if(Params().NetworkID() != CBaseChainParams::REGTEST && mn.GetMasternodeInputAge() < nMinimumAge) continue;
 
         bool found = false;
         BOOST_FOREACH(const CTxIn& vin, vVins)
@@ -371,7 +368,7 @@ CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins,
 
         if(found) continue;
 
-        if(pOldestMasternode == NULL || pOldestMasternode->GetMasternodeInputAge() < mn.GetMasternodeInputAge()){
+        if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
         }
     }
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 67e88d2c3c1a..a1f8cc8ab306 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -103,7 +103,7 @@ class CMasternodeMan
     CMasternode* Find(const CPubKey& pubKeyMasternode);
 
     /// Find an entry thta do not match every entry provided vector
-    CMasternode* FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge, int nMinimumActiveSeconds);
+    CMasternode* FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge);
 
     /// Find a random entry
     CMasternode* FindRandom();
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
index c16ac629f645..b51a30ed9907 100644
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -14,6 +14,11 @@ std::string COutPoint::ToString() const
     return strprintf("COutPoint(%s, %u)", hash.ToString()/*.substr(0,10)*/, n);
 }
 
+std::string COutPoint::ToStringShort() const
+{
+    return strprintf("%s-%u", hash.ToString().substr(0,64), n);
+}
+
 CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, uint32_t nSequenceIn)
 {
     prevout = prevoutIn;
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 3c7450379ba7..a9dc8defa35d 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -47,6 +47,8 @@ class COutPoint
     }
 
     std::string ToString() const;
+    std::string ToStringShort() const;
+
 };
 
 /** An input of a transaction.  It contains the location of the previous
@@ -145,7 +147,7 @@ class CTxOut
         // to spend something, then we consider it dust.
         // A typical txout is 34 bytes big, and will
         // need a CTxIn of at least 148 bytes to spend:
-        // so dust is a txout less than 546 satoshis 
+        // so dust is a txout less than 546 satoshis
         // with default minRelayTxFee.
         size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
         return (nValue < 3*minRelayTxFee.GetFee(nSize));
diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp
index 4de853991336..6632a1bfcb6d 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcdarksend.cpp
@@ -641,7 +641,7 @@ Value masternode(const Array& params, bool fHelp)
                 failed++;
                 continue;
             }
-            
+
             CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
             if(pmn == NULL)
             {
@@ -728,7 +728,7 @@ Value masternodelist(const Array& params, bool fHelp)
 
     if (fHelp ||
             (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank"
-                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose"))
+                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose" && strMode != "lastpaid"))
     {
         throw runtime_error(
                 "masternodelist ( \"mode\" \"filter\" )\n"
@@ -750,9 +750,10 @@ Value masternodelist(const Array& params, bool fHelp)
                 "  rank           - Print rank of a masternode based on current block\n"
                 "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR\n"
                 "                   (can be additionally filtered, partial match)\n"
-                "  vin            - Print vin associated with a masternode (can be additionally filtered, partial match)\n"
+                "  addr           - Print ip address associated with a masternode (can be additionally filtered, partial match)\n"
                 "  votes          - Print all masternode votes for a Dash initiative (can be additionally filtered,\n"
                 "                   partial match)\n"
+                "  lastpaid       - The last time a node was paid on the network\n"
                 );
     }
 
@@ -760,24 +761,24 @@ Value masternodelist(const Array& params, bool fHelp)
     if (strMode == "rank") {
         std::vector<pair<int, CMasternode> > vMasternodeRanks = mnodeman.GetMasternodeRanks(chainActive.Tip()->nHeight);
         BOOST_FOREACH(PAIRTYPE(int, CMasternode)& s, vMasternodeRanks) {
-            std::string strAddr = s.second.addr.ToString();
-            if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
-            obj.push_back(Pair(strAddr,       s.first));
+            std::string strVin = s.second.vin.prevout.ToStringShort();
+            if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
+            obj.push_back(Pair(strVin,       s.first));
         }
     } else {
         std::vector<CMasternode> vMasternodes = mnodeman.GetFullMasternodeVector();
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
-            std::string strAddr = mn.addr.ToString();
+            std::string strVin = mn.vin.prevout.ToStringShort();
             if (strMode == "activeseconds") {
-                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       (int64_t)(mn.lastTimeSeen - mn.sigTime)));
+                if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       (int64_t)(mn.lastTimeSeen - mn.sigTime)));
             } else if (strMode == "donation") {
                 CTxDestination address1;
                 ExtractDestination(mn.donationAddress, address1);
                 CBitcoinAddress address2(address1);
 
                 if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
-                    strAddr.find(strFilter) == string::npos) continue;
+                    strVin.find(strFilter) == string::npos) continue;
 
                 std::string strOut = "";
 
@@ -786,7 +787,7 @@ Value masternodelist(const Array& params, bool fHelp)
                     strOut += ":";
                     strOut += boost::lexical_cast<std::string>(mn.donationPercentage);
                 }
-                obj.push_back(Pair(strAddr,       strOut.c_str()));
+                obj.push_back(Pair(strVin,       strOut.c_str()));
             } else if (strMode == "full") {
                 CScript pubkey;
                 pubkey = GetScriptForDestination(mn.pubkey.GetID());
@@ -795,28 +796,29 @@ Value masternodelist(const Array& params, bool fHelp)
                 CBitcoinAddress address2(address1);
 
                 std::ostringstream addrStream;
-                addrStream << setw(21) << strAddr;
+                addrStream << setw(21) << strVin;
 
                 std::ostringstream stringStream;
                 stringStream << setw(10) <<
                                mn.Status() << " " <<
                                mn.protocolVersion << " " <<
                                address2.ToString() << " " <<
-                               mn.vin.prevout.hash.ToString() << " " <<
+                               mn.addr.ToString() << " " <<
                                mn.lastTimeSeen << " " << setw(8) <<
-                               (mn.lastTimeSeen - mn.sigTime);
+                               (mn.lastTimeSeen - mn.sigTime) << " " <<
+                               mn.nLastPaid;
                 std::string output = stringStream.str();
-                stringStream << " " << strAddr;
+                stringStream << " " << strVin;
                 if(strFilter !="" && stringStream.str().find(strFilter) == string::npos &&
-                        strAddr.find(strFilter) == string::npos) continue;
+                        strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(addrStream.str(), output));
             } else if (strMode == "lastseen") {
-                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       (int64_t)mn.lastTimeSeen));
+                if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       (int64_t)mn.lastTimeSeen));
             } else if (strMode == "protocol") {
                 if(strFilter !="" && strFilter != boost::lexical_cast<std::string>(mn.protocolVersion) &&
-                    strAddr.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       (int64_t)mn.protocolVersion));
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       (int64_t)mn.protocolVersion));
             } else if (strMode == "pubkey") {
                 CScript pubkey;
                 pubkey = GetScriptForDestination(mn.pubkey.GetID());
@@ -825,20 +827,20 @@ Value masternodelist(const Array& params, bool fHelp)
                 CBitcoinAddress address2(address1);
 
                 if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
-                    strAddr.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       address2.ToString().c_str()));
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       address2.ToString().c_str()));
             } else if (strMode == "pose") {
-                if(strFilter !="" && strAddr.find(strFilter) == string::npos) continue;
+                if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
                 std::string strOut = boost::lexical_cast<std::string>(mn.nScanningErrorCount);
-                obj.push_back(Pair(strAddr,       strOut.c_str()));
+                obj.push_back(Pair(strVin,       strOut.c_str()));
             } else if(strMode == "status") {
                 std::string strStatus = mn.Status();
-                if(strFilter !="" && strAddr.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       strStatus.c_str()));
-            } else if (strMode == "vin") {
+                if(strFilter !="" && strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       strStatus.c_str()));
+            } else if (strMode == "addr") {
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
-                    strAddr.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strAddr,       mn.vin.prevout.hash.ToString().c_str()));
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       mn.addr.ToString().c_str()));
             } else if(strMode == "votes"){
                 std::string strStatus = "ABSTAIN";
 
@@ -849,8 +851,12 @@ Value masternodelist(const Array& params, bool fHelp)
                     if(mn.nVote == 1) strStatus = "YEA";
                 }
 
-                if(strFilter !="" && (strAddr.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos)) continue;
-                obj.push_back(Pair(strAddr,       strStatus.c_str()));
+                if(strFilter !="" && (strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos)) continue;
+                obj.push_back(Pair(strVin,       strStatus.c_str()));
+            } else if(strMode == "lastpaid"){
+                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,      (int64_t)mn.nLastPaid));
             }
         }
     }

From d25cf1af22056984e4b3295ae089424304e9cc42 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 16 Apr 2015 12:58:09 -0700
Subject: [PATCH 1331/1819] Split masternode and payments code

---
 src/Makefile.am             |   2 +
 src/darksend.h              |   1 +
 src/init.cpp                |   1 +
 src/main.cpp                |   1 +
 src/masternode-payments.cpp | 359 ++++++++++++++++++++++++++++++++++++
 src/masternode-payments.h   | 109 +++++++++++
 src/masternode.cpp          | 347 +---------------------------------
 src/masternode.h            |  86 +--------
 src/miner.cpp               |   1 +
 src/rpcdarksend.cpp         |   1 +
 10 files changed, 477 insertions(+), 431 deletions(-)
 create mode 100644 src/masternode-payments.cpp
 create mode 100644 src/masternode-payments.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 64a8c7687d14..3f0be328eb4a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -107,6 +107,7 @@ BITCOIN_CORE_H = \
   limitedmap.h \
   main.h \
   masternode.h \
+  masternode-payments.h \
   masternode-pos.h \
   masternodeman.h \
   masternodeconfig.h \
@@ -278,6 +279,7 @@ libbitcoin_common_a_SOURCES = \
   darksend.cpp \
   darksend-relay.cpp \
   masternode.cpp \
+  masternode-payments.cpp \
   masternode-pos.cpp \
   masternodeman.cpp \
   masternodeconfig.cpp \
diff --git a/src/darksend.h b/src/darksend.h
index 927a5bb99866..59797766a654 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -9,6 +9,7 @@
 #include "sync.h"
 #include "activemasternode.h"
 #include "masternodeman.h"
+#include "masternode-payments.h"
 #include "darksend-relay.h"
 
 class CTxIn;
diff --git a/src/init.cpp b/src/init.cpp
index a82d07909ecf..f2d115862c34 100755
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -24,6 +24,7 @@
 #include "ui_interface.h"
 #include "util.h"
 #include "activemasternode.h"
+#include "masternode-payments.h"
 #include "masternodeman.h"
 #include "spork.h"
 #include "utilmoneystr.h"
diff --git a/src/main.cpp b/src/main.cpp
index a1a0b5bb477d..5a34f068dc4b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -15,6 +15,7 @@
 #include "instantx.h"
 #include "darksend.h"
 #include "masternodeman.h"
+#include "masternode-payments.h"
 #include "merkleblock.h"
 #include "net.h"
 #include "pow.h"
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
new file mode 100644
index 000000000000..0a0170c7ee85
--- /dev/null
+++ b/src/masternode-payments.cpp
@@ -0,0 +1,359 @@
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "masternode-payments.h"
+#include "masternodeman.h"
+#include "darksend.h"
+#include "util.h"
+#include "sync.h"
+#include "addrman.h"
+#include <boost/lexical_cast.hpp>
+
+CCriticalSection cs_masternodepayments;
+
+/** Object for who's going to get paid on which blocks */
+CMasternodePayments masternodePayments;
+// keep track of Masternode votes I've seen
+map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
+
+void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+{
+    if(IsInitialBlockDownload()) return;
+
+    if (strCommand == "mnget") { //Masternode Payments Request Sync
+        if(fLiteMode) return; //disable all Darksend/Masternode related functionality
+
+        if(pfrom->HasFulfilledRequest("mnget")) {
+            LogPrintf("mnget - peer already asked me for the list\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
+        }
+
+        pfrom->FulfilledRequest("mnget");
+        masternodePayments.Sync(pfrom);
+        LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
+    }
+    else if (strCommand == "mnw") { //Masternode Payments Declare Winner
+
+        LOCK(cs_masternodepayments);
+
+        //this is required in litemode
+        CMasternodePaymentWinner winner;
+        vRecv >> winner;
+
+        if(chainActive.Tip() == NULL) return;
+
+        CTxDestination address1;
+        ExtractDestination(winner.payee, address1);
+        CBitcoinAddress address2(address1);
+
+        uint256 hash = winner.GetHash();
+        if(mapSeenMasternodeVotes.count(hash)) {
+            if(fDebug) LogPrintf("mnw - seen vote %s Addr %s Height %d bestHeight %d\n", hash.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
+            return;
+        }
+
+        if(winner.nBlockHeight < chainActive.Tip()->nHeight - 10 || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
+            LogPrintf("mnw - winner out of range %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
+            return;
+        }
+
+        if(winner.vin.nSequence != std::numeric_limits<unsigned int>::max()){
+            LogPrintf("mnw - invalid nSequence\n");
+            Misbehaving(pfrom->GetId(), 100);
+            return;
+        }
+
+        LogPrintf("mnw - winning vote - Vin %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
+
+        if(!masternodePayments.CheckSignature(winner)){
+            LogPrintf("mnw - invalid signature\n");
+            Misbehaving(pfrom->GetId(), 100);
+            return;
+        }
+
+        mapSeenMasternodeVotes.insert(make_pair(hash, winner));
+
+        if(masternodePayments.AddWinningMasternode(winner)){
+            masternodePayments.Relay(winner);
+        }
+    }
+}
+
+
+bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner)
+{
+    //note: need to investigate why this is failing
+    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
+    CPubKey pubkey(ParseHex(Params().MasternodePaymentPubKey()));
+
+    std::string errorMessage = "";
+    if(!darkSendSigner.VerifyMessage(pubkey, winner.vchSig, strMessage, errorMessage)){
+        return false;
+    }
+
+    return true;
+}
+
+bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner)
+{
+    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
+
+    CKey key2;
+    CPubKey pubkey2;
+    std::string errorMessage = "";
+
+    if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
+    {
+        LogPrintf("CMasternodePayments::Sign - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage.c_str());
+        return false;
+    }
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, winner.vchSig, key2)) {
+        LogPrintf("CMasternodePayments::Sign - Sign message failed");
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pubkey2, winner.vchSig, strMessage, errorMessage)) {
+        LogPrintf("CMasternodePayments::Sign - Verify message failed");
+        return false;
+    }
+
+    return true;
+}
+
+uint64_t CMasternodePayments::CalculateScore(uint256 blockHash, CTxIn& vin)
+{
+    uint256 n1 = blockHash;
+    uint256 n2 = HashX11(BEGIN(n1), END(n1));
+    uint256 n3 = HashX11(BEGIN(vin.prevout.hash), END(vin.prevout.hash));
+    uint256 n4 = n3 > n2 ? (n3 - n2) : (n2 - n3);
+
+    //printf(" -- CMasternodePayments CalculateScore() n2 = %d \n", n2.Get64());
+    //printf(" -- CMasternodePayments CalculateScore() n3 = %d \n", n3.Get64());
+    //printf(" -- CMasternodePayments CalculateScore() n4 = %d \n", n4.Get64());
+
+    return n4.Get64();
+}
+
+bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
+{
+    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
+        if(winner.nBlockHeight == nBlockHeight) {
+            payee = winner.payee;
+            return true;
+        }
+    }
+
+    return false;
+}
+
+bool CMasternodePayments::GetWinningMasternode(int nBlockHeight, CTxIn& vinOut)
+{
+    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
+        if(winner.nBlockHeight == nBlockHeight) {
+            vinOut = winner.vin;
+            return true;
+        }
+    }
+
+    return false;
+}
+
+bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
+{
+    uint256 blockHash = 0;
+    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-576)) {
+        return false;
+    }
+
+    winnerIn.score = CalculateScore(blockHash, winnerIn.vin);
+
+    bool foundBlock = false;
+    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
+        if(winner.nBlockHeight == winnerIn.nBlockHeight) {
+            foundBlock = true;
+            if(winner.score < winnerIn.score){
+                winner.score = winnerIn.score;
+                winner.vin = winnerIn.vin;
+                winner.payee = winnerIn.payee;
+                winner.vchSig = winnerIn.vchSig;
+
+                mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
+
+                return true;
+            }
+        }
+    }
+
+    // if it's not in the vector
+    if(!foundBlock){
+        vWinning.push_back(winnerIn);
+        mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
+
+        return true;
+    }
+
+    return false;
+}
+
+void CMasternodePayments::CleanPaymentList()
+{
+    LOCK(cs_masternodepayments);
+
+    if(chainActive.Tip() == NULL) return;
+
+    int nLimit = std::max(((int)mnodeman.size())*2, 1000);
+
+    vector<CMasternodePaymentWinner>::iterator it;
+    for(it=vWinning.begin();it<vWinning.end();it++){
+        if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
+            if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", (*it).nBlockHeight);
+            vWinning.erase(it);
+            break;
+        }
+    }
+}
+
+bool CMasternodePayments::ProcessBlock(int nBlockHeight)
+{
+    LOCK(cs_masternodepayments);
+
+    if(nBlockHeight <= nLastBlockHeight) return false;
+    if(!enabled) return false;
+    CMasternodePaymentWinner newWinner;
+    int nMinimumAge = mnodeman.CountEnabled();
+    CScript payeeSource;
+
+    uint256 hash;
+    if(!GetBlockHash(hash, nBlockHeight-10)) return false;
+    unsigned int nHash;
+    memcpy(&nHash, &hash, 2);
+
+    LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
+
+    std::vector<CTxIn> vecLastPayments;
+    BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
+    {
+        //if we already have the same vin - we have one full payment cycle, break
+        if(vecLastPayments.size() > nMinimumAge) break;
+        vecLastPayments.push_back(winner.vin);
+    }
+
+    // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
+    CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
+    if(pmn != NULL)
+    {
+        LogPrintf(" Found by FindOldestNotInVec \n");
+
+        newWinner.score = 0;
+        newWinner.nBlockHeight = nBlockHeight;
+        newWinner.vin = pmn->vin;
+        pmn->nLastPaid = GetAdjustedTime();
+
+        if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
+            newWinner.payee = pmn->donationAddress;
+        } else {
+            newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
+        }
+
+        payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+    }
+
+    //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
+    if(newWinner.nBlockHeight == 0 && nMinimumAge > 0)
+    {
+        LogPrintf(" Find by reverse \n");
+
+        BOOST_REVERSE_FOREACH(CTxIn& vinLP, vecLastPayments)
+        {
+            CMasternode* pmn = mnodeman.Find(vinLP);
+            if(pmn != NULL)
+            {
+                pmn->Check();
+                if(!pmn->IsEnabled()) continue;
+
+                newWinner.score = 0;
+                newWinner.nBlockHeight = nBlockHeight;
+                newWinner.vin = pmn->vin;
+                pmn->nLastPaid = GetAdjustedTime();
+
+                if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
+                    newWinner.payee = pmn->donationAddress;
+                } else {
+                    newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
+                }
+
+                payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+
+                break; // we found active MN
+            }
+        }
+    }
+
+    if(newWinner.nBlockHeight == 0) return false;
+
+    CTxDestination address1;
+    ExtractDestination(newWinner.payee, address1);
+    CBitcoinAddress address2(address1);
+
+    CTxDestination address3;
+    ExtractDestination(payeeSource, address3);
+    CBitcoinAddress address4(address3);
+
+    LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+
+    if(Sign(newWinner))
+    {
+        if(AddWinningMasternode(newWinner))
+        {
+            Relay(newWinner);
+            nLastBlockHeight = nBlockHeight;
+            return true;
+        }
+    }
+
+    return false;
+}
+
+
+void CMasternodePayments::Relay(CMasternodePaymentWinner& winner)
+{
+    CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
+
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
+}
+
+void CMasternodePayments::Sync(CNode* node)
+{
+    LOCK(cs_masternodepayments);
+
+    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning)
+        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
+            node->PushMessage("mnw", winner);
+}
+
+
+bool CMasternodePayments::SetPrivKey(std::string strPrivKey)
+{
+    CMasternodePaymentWinner winner;
+
+    // Test signing successful, proceed
+    strMasterPrivKey = strPrivKey;
+
+    Sign(winner);
+
+    if(CheckSignature(winner)){
+        LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as Masternode payments master\n");
+        enabled = true;
+        return true;
+    } else {
+        return false;
+    }
+}
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
new file mode 100644
index 000000000000..ff1ce6149ecc
--- /dev/null
+++ b/src/masternode-payments.h
@@ -0,0 +1,109 @@
+
+
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#ifndef MASTERNODE_PAYMENTS_H
+#define MASTERNODE_PAYMENTS_H
+
+#include "sync.h"
+#include "net.h"
+#include "key.h"
+#include "util.h"
+#include "base58.h"
+#include "main.h"
+#include "masternode.h"
+#include "masternode-pos.h"
+#include "timedata.h"
+
+using namespace std;
+
+class CMasternodePayments;
+class CMasternodePaymentWinner;
+
+extern CMasternodePayments masternodePayments;
+extern map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
+
+void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
+
+
+// for storing the winning payments
+class CMasternodePaymentWinner
+{
+public:
+    int nBlockHeight;
+    CTxIn vin;
+    CScript payee;
+    std::vector<unsigned char> vchSig;
+    uint64_t score;
+
+    CMasternodePaymentWinner() {
+        nBlockHeight = 0;
+        score = 0;
+        vin = CTxIn();
+        payee = CScript();
+    }
+
+    uint256 GetHash(){
+        uint256 n2 = HashX11(BEGIN(nBlockHeight), END(nBlockHeight));
+        uint256 n3 = vin.prevout.hash > n2 ? (vin.prevout.hash - n2) : (n2 - vin.prevout.hash);
+
+        return n3;
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(nBlockHeight);
+        READWRITE(payee);
+        READWRITE(vin);
+        READWRITE(score);
+        READWRITE(vchSig);
+     }
+};
+
+//
+// Masternode Payments Class
+// Keeps track of who should get paid for which blocks
+//
+
+class CMasternodePayments
+{
+private:
+    std::vector<CMasternodePaymentWinner> vWinning;
+    int nSyncedFromPeer;
+    std::string strMasterPrivKey;
+    bool enabled;
+    int nLastBlockHeight;
+
+public:
+
+    CMasternodePayments() {
+        enabled = false;
+    }
+
+    bool SetPrivKey(std::string strPrivKey);
+    bool CheckSignature(CMasternodePaymentWinner& winner);
+    bool Sign(CMasternodePaymentWinner& winner);
+
+    // Deterministically calculate a given "score" for a masternode depending on how close it's hash is
+    // to the blockHeight. The further away they are the better, the furthest will win the election
+    // and get paid this block
+    //
+
+    uint64_t CalculateScore(uint256 blockHash, CTxIn& vin);
+    bool GetWinningMasternode(int nBlockHeight, CTxIn& vinOut);
+    bool AddWinningMasternode(CMasternodePaymentWinner& winner);
+    bool ProcessBlock(int nBlockHeight);
+    void Relay(CMasternodePaymentWinner& winner);
+    void Sync(CNode* node);
+    void CleanPaymentList();
+    int LastPayment(CMasternode& mn);
+
+    //slow
+    bool GetBlockPayee(int nBlockHeight, CScript& payee);
+};
+
+
+#endif
\ No newline at end of file
diff --git a/src/masternode.cpp b/src/masternode.cpp
index ef083d9624b5..029ed4d25025 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -10,80 +10,11 @@
 #include "addrman.h"
 #include <boost/lexical_cast.hpp>
 
-CCriticalSection cs_masternodepayments;
-
-/** Object for who's going to get paid on which blocks */
-CMasternodePayments masternodePayments;
-// keep track of Masternode votes I've seen
-map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
 // keep track of the scanning errors I've seen
 map<uint256, int> mapSeenMasternodeScanningErrors;
 // cache block hashes as we calculate them
 std::map<int64_t, uint256> mapCacheBlockHashes;
 
-void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
-{
-    if(IsInitialBlockDownload()) return;
-
-    if (strCommand == "mnget") { //Masternode Payments Request Sync
-        if(fLiteMode) return; //disable all Darksend/Masternode related functionality
-
-        if(pfrom->HasFulfilledRequest("mnget")) {
-            LogPrintf("mnget - peer already asked me for the list\n");
-            Misbehaving(pfrom->GetId(), 20);
-            return;
-        }
-
-        pfrom->FulfilledRequest("mnget");
-        masternodePayments.Sync(pfrom);
-        LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
-    }
-    else if (strCommand == "mnw") { //Masternode Payments Declare Winner
-
-        LOCK(cs_masternodepayments);
-
-        //this is required in litemode
-        CMasternodePaymentWinner winner;
-        vRecv >> winner;
-
-        if(chainActive.Tip() == NULL) return;
-
-        CTxDestination address1;
-        ExtractDestination(winner.payee, address1);
-        CBitcoinAddress address2(address1);
-
-        uint256 hash = winner.GetHash();
-        if(mapSeenMasternodeVotes.count(hash)) {
-            if(fDebug) LogPrintf("mnw - seen vote %s Addr %s Height %d bestHeight %d\n", hash.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
-            return;
-        }
-
-        if(winner.nBlockHeight < chainActive.Tip()->nHeight - 10 || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
-            LogPrintf("mnw - winner out of range %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
-            return;
-        }
-
-        if(winner.vin.nSequence != std::numeric_limits<unsigned int>::max()){
-            LogPrintf("mnw - invalid nSequence\n");
-            Misbehaving(pfrom->GetId(), 100);
-            return;
-        }
-
-        LogPrintf("mnw - winning vote - Vin %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
-
-        if(!masternodePayments.CheckSignature(winner)){
-            LogPrintf("mnw - invalid signature\n");
-            Misbehaving(pfrom->GetId(), 100);
-            return;
-        }
-
-        mapSeenMasternodeVotes.insert(make_pair(hash, winner));
-
-        if(masternodePayments.AddWinningMasternode(winner)){
-            masternodePayments.Relay(winner);
-        }
-    }
-}
 
 struct CompareValueOnly
 {
@@ -277,280 +208,4 @@ void CMasternode::Check()
     }
 
     activeState = MASTERNODE_ENABLED; // OK
-}
-
-bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner)
-{
-    //note: need to investigate why this is failing
-    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
-    CPubKey pubkey(ParseHex(Params().MasternodePaymentPubKey()));
-
-    std::string errorMessage = "";
-    if(!darkSendSigner.VerifyMessage(pubkey, winner.vchSig, strMessage, errorMessage)){
-        return false;
-    }
-
-    return true;
-}
-
-bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner)
-{
-    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
-
-    CKey key2;
-    CPubKey pubkey2;
-    std::string errorMessage = "";
-
-    if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
-    {
-        LogPrintf("CMasternodePayments::Sign - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage.c_str());
-        return false;
-    }
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, winner.vchSig, key2)) {
-        LogPrintf("CMasternodePayments::Sign - Sign message failed");
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pubkey2, winner.vchSig, strMessage, errorMessage)) {
-        LogPrintf("CMasternodePayments::Sign - Verify message failed");
-        return false;
-    }
-
-    return true;
-}
-
-uint64_t CMasternodePayments::CalculateScore(uint256 blockHash, CTxIn& vin)
-{
-    uint256 n1 = blockHash;
-    uint256 n2 = HashX11(BEGIN(n1), END(n1));
-    uint256 n3 = HashX11(BEGIN(vin.prevout.hash), END(vin.prevout.hash));
-    uint256 n4 = n3 > n2 ? (n3 - n2) : (n2 - n3);
-
-    //printf(" -- CMasternodePayments CalculateScore() n2 = %d \n", n2.Get64());
-    //printf(" -- CMasternodePayments CalculateScore() n3 = %d \n", n3.Get64());
-    //printf(" -- CMasternodePayments CalculateScore() n4 = %d \n", n4.Get64());
-
-    return n4.Get64();
-}
-
-bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
-{
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == nBlockHeight) {
-            payee = winner.payee;
-            return true;
-        }
-    }
-
-    return false;
-}
-
-bool CMasternodePayments::GetWinningMasternode(int nBlockHeight, CTxIn& vinOut)
-{
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == nBlockHeight) {
-            vinOut = winner.vin;
-            return true;
-        }
-    }
-
-    return false;
-}
-
-bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
-{
-    uint256 blockHash = 0;
-    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-576)) {
-        return false;
-    }
-
-    winnerIn.score = CalculateScore(blockHash, winnerIn.vin);
-
-    bool foundBlock = false;
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == winnerIn.nBlockHeight) {
-            foundBlock = true;
-            if(winner.score < winnerIn.score){
-                winner.score = winnerIn.score;
-                winner.vin = winnerIn.vin;
-                winner.payee = winnerIn.payee;
-                winner.vchSig = winnerIn.vchSig;
-
-                mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
-
-                return true;
-            }
-        }
-    }
-
-    // if it's not in the vector
-    if(!foundBlock){
-        vWinning.push_back(winnerIn);
-        mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
-
-        return true;
-    }
-
-    return false;
-}
-
-void CMasternodePayments::CleanPaymentList()
-{
-    LOCK(cs_masternodepayments);
-
-    if(chainActive.Tip() == NULL) return;
-
-    int nLimit = std::max(((int)mnodeman.size())*2, 1000);
-
-    vector<CMasternodePaymentWinner>::iterator it;
-    for(it=vWinning.begin();it<vWinning.end();it++){
-        if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
-            if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", (*it).nBlockHeight);
-            vWinning.erase(it);
-            break;
-        }
-    }
-}
-
-bool CMasternodePayments::ProcessBlock(int nBlockHeight)
-{
-    LOCK(cs_masternodepayments);
-
-    if(nBlockHeight <= nLastBlockHeight) return false;
-    if(!enabled) return false;
-    CMasternodePaymentWinner newWinner;
-    int nMinimumAge = mnodeman.CountEnabled();
-    CScript payeeSource;
-
-    uint256 hash;
-    if(!GetBlockHash(hash, nBlockHeight-10)) return false;
-    unsigned int nHash;
-    memcpy(&nHash, &hash, 2);
-
-    LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
-
-    std::vector<CTxIn> vecLastPayments;
-    BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
-    {
-        //if we already have the same vin - we have one full payment cycle, break
-        if(vecLastPayments.size() > nMinimumAge) break;
-        vecLastPayments.push_back(winner.vin);
-    }
-
-    // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-    CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
-    if(pmn != NULL)
-    {
-        LogPrintf(" Found by FindOldestNotInVec \n");
-
-        newWinner.score = 0;
-        newWinner.nBlockHeight = nBlockHeight;
-        newWinner.vin = pmn->vin;
-        pmn->nLastPaid = GetAdjustedTime();
-
-        if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-            newWinner.payee = pmn->donationAddress;
-        } else {
-            newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
-        }
-
-        payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
-    }
-
-    //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
-    if(newWinner.nBlockHeight == 0 && nMinimumAge > 0)
-    {
-        LogPrintf(" Find by reverse \n");
-
-        BOOST_REVERSE_FOREACH(CTxIn& vinLP, vecLastPayments)
-        {
-            CMasternode* pmn = mnodeman.Find(vinLP);
-            if(pmn != NULL)
-            {
-                pmn->Check();
-                if(!pmn->IsEnabled()) continue;
-
-                newWinner.score = 0;
-                newWinner.nBlockHeight = nBlockHeight;
-                newWinner.vin = pmn->vin;
-                pmn->nLastPaid = GetAdjustedTime();
-
-                if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-                    newWinner.payee = pmn->donationAddress;
-                } else {
-                    newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
-                }
-
-                payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
-
-                break; // we found active MN
-            }
-        }
-    }
-
-    if(newWinner.nBlockHeight == 0) return false;
-
-    CTxDestination address1;
-    ExtractDestination(newWinner.payee, address1);
-    CBitcoinAddress address2(address1);
-
-    CTxDestination address3;
-    ExtractDestination(payeeSource, address3);
-    CBitcoinAddress address4(address3);
-
-    LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
-
-    if(Sign(newWinner))
-    {
-        if(AddWinningMasternode(newWinner))
-        {
-            Relay(newWinner);
-            nLastBlockHeight = nBlockHeight;
-            return true;
-        }
-    }
-
-    return false;
-}
-
-
-void CMasternodePayments::Relay(CMasternodePaymentWinner& winner)
-{
-    CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
-}
-
-void CMasternodePayments::Sync(CNode* node)
-{
-    LOCK(cs_masternodepayments);
-
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning)
-        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
-            node->PushMessage("mnw", winner);
-}
-
-
-bool CMasternodePayments::SetPrivKey(std::string strPrivKey)
-{
-    CMasternodePaymentWinner winner;
-
-    // Test signing successful, proceed
-    strMasterPrivKey = strPrivKey;
-
-    Sign(winner);
-
-    if(CheckSignature(winner)){
-        LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as Masternode payments master\n");
-        enabled = true;
-        return true;
-    } else {
-        return false;
-    }
-}
+}
\ No newline at end of file
diff --git a/src/masternode.h b/src/masternode.h
index 83a27e8e1ad8..933f5cdddf62 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -11,6 +11,7 @@
 #include "util.h"
 #include "base58.h"
 #include "main.h"
+#include "masternode.h"
 #include "masternode-pos.h"
 #include "timedata.h"
 
@@ -34,14 +35,8 @@
 using namespace std;
 
 class CMasternode;
-class CMasternodePayments;
-class CMasternodePaymentWinner;
-
-extern CMasternodePayments masternodePayments;
-extern map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
 extern map<int64_t, uint256> mapCacheBlockHashes;
 
-void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 bool GetBlockHash(uint256& hash, int nBlockHeight);
 
 //
@@ -248,83 +243,4 @@ class CMasternode
 
 };
 
-// for storing the winning payments
-class CMasternodePaymentWinner
-{
-public:
-    int nBlockHeight;
-    CTxIn vin;
-    CScript payee;
-    std::vector<unsigned char> vchSig;
-    uint64_t score;
-
-    CMasternodePaymentWinner() {
-        nBlockHeight = 0;
-        score = 0;
-        vin = CTxIn();
-        payee = CScript();
-    }
-
-    uint256 GetHash(){
-        uint256 n2 = HashX11(BEGIN(nBlockHeight), END(nBlockHeight));
-        uint256 n3 = vin.prevout.hash > n2 ? (vin.prevout.hash - n2) : (n2 - vin.prevout.hash);
-
-        return n3;
-    }
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(nBlockHeight);
-        READWRITE(payee);
-        READWRITE(vin);
-        READWRITE(score);
-        READWRITE(vchSig);
-     }
-};
-
-//
-// Masternode Payments Class
-// Keeps track of who should get paid for which blocks
-//
-
-class CMasternodePayments
-{
-private:
-    std::vector<CMasternodePaymentWinner> vWinning;
-    int nSyncedFromPeer;
-    std::string strMasterPrivKey;
-    bool enabled;
-    int nLastBlockHeight;
-
-public:
-
-    CMasternodePayments() {
-        enabled = false;
-    }
-
-    bool SetPrivKey(std::string strPrivKey);
-    bool CheckSignature(CMasternodePaymentWinner& winner);
-    bool Sign(CMasternodePaymentWinner& winner);
-
-    // Deterministically calculate a given "score" for a masternode depending on how close it's hash is
-    // to the blockHeight. The further away they are the better, the furthest will win the election
-    // and get paid this block
-    //
-
-    uint64_t CalculateScore(uint256 blockHash, CTxIn& vin);
-    bool GetWinningMasternode(int nBlockHeight, CTxIn& vinOut);
-    bool AddWinningMasternode(CMasternodePaymentWinner& winner);
-    bool ProcessBlock(int nBlockHeight);
-    void Relay(CMasternodePaymentWinner& winner);
-    void Sync(CNode* node);
-    void CleanPaymentList();
-    int LastPayment(CMasternode& mn);
-
-    //slow
-    bool GetBlockPayee(int nBlockHeight, CScript& payee);
-};
-
-
 #endif
diff --git a/src/miner.cpp b/src/miner.cpp
index 407c48a1f06d..46f416f45e6d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -20,6 +20,7 @@
 #include "wallet.h"
 #endif
 #include "masternodeman.h"
+#include "masternode-payments.h"
 
 #include <boost/thread.hpp>
 #include <boost/tuple/tuple.hpp>
diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp
index 6632a1bfcb6d..d06c9f435f22 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcdarksend.cpp
@@ -8,6 +8,7 @@
 #include "init.h"
 #include "activemasternode.h"
 #include "masternodeman.h"
+#include "masternode-payments.h"
 #include "masternodeconfig.h"
 #include "rpcserver.h"
 #include "utilmoneystr.h"

From 7d33b6d8b32682a940fa658889dc745b7c3791b4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 16 Apr 2015 13:59:10 -0700
Subject: [PATCH 1332/1819] Masternode Last Paid Times

-Update nLastPaid when blocks come in
---
 src/main.cpp                | 15 ++++++++++++++-
 src/masternode-payments.cpp |  5 ++---
 src/masternode-payments.h   |  3 +--
 src/miner.cpp               |  3 ++-
 src/rpcdarksend.cpp         | 14 ++++++++++++--
 5 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5a34f068dc4b..2c3d860e9374 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2953,7 +2953,8 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                     bool foundPaymentAndPayee = false;
 
                     CScript payee;
-                    if(!masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight+1, payee) || payee == CScript()){
+                    CTxIn vin;
+                    if(!masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight+1, payee, vin) || payee == CScript()){
                         foundPayee = true; //doesn't require a specific payee
                         foundPaymentAmount = true;
                         foundPaymentAndPayee = true;
@@ -3284,6 +3285,18 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     if(!fLiteMode){
         if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
+
+            CScript payee;
+            CTxIn vin;
+            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight, payee, vin)){
+                //UPDATE MASTERNODE LAST PAID TIME
+                CMasternode* pmn = mnodeman.Find(vin);
+                if(pmn != NULL) pmn->nLastPaid = GetAdjustedTime(); 
+
+                LogPrintf("ProcessBlock() : Update Masternode Last Paid Time - %d\n", chainActive.Tip()->nHeight);
+            }
+
+
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             mnscan.DoMasternodePOSChecks();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 0a0170c7ee85..d827bd113c74 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -137,11 +137,12 @@ uint64_t CMasternodePayments::CalculateScore(uint256 blockHash, CTxIn& vin)
     return n4.Get64();
 }
 
-bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
+bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee, CTxIn& vin)
 {
     BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
         if(winner.nBlockHeight == nBlockHeight) {
             payee = winner.payee;
+            vin = winner.vin;
             return true;
         }
     }
@@ -250,7 +251,6 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         newWinner.score = 0;
         newWinner.nBlockHeight = nBlockHeight;
         newWinner.vin = pmn->vin;
-        pmn->nLastPaid = GetAdjustedTime();
 
         if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
             newWinner.payee = pmn->donationAddress;
@@ -277,7 +277,6 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
                 newWinner.score = 0;
                 newWinner.nBlockHeight = nBlockHeight;
                 newWinner.vin = pmn->vin;
-                pmn->nLastPaid = GetAdjustedTime();
 
                 if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
                     newWinner.payee = pmn->donationAddress;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index ff1ce6149ecc..cd61e46f9ef3 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -101,8 +101,7 @@ class CMasternodePayments
     void CleanPaymentList();
     int LastPayment(CMasternode& mn);
 
-    //slow
-    bool GetBlockPayee(int nBlockHeight, CScript& payee);
+    bool GetBlockPayee(int nBlockHeight, CScript& payee, CTxIn& vin);
 };
 
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 46f416f45e6d..8111e8e05f87 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -141,8 +141,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
         if(bMasterNodePayment) {
             bool hasPayment = true;
+            CTxIn vin;
             //spork
-            if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, pblock->payee)){
+            if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, pblock->payee, vin)){
                 //no masternode detected
                 CMasternode* winningNode = mnodeman.GetCurrentMasterNode(1);
                 if(winningNode){
diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp
index d06c9f435f22..182f68c14417 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcdarksend.cpp
@@ -531,15 +531,25 @@ Value masternode(const Array& params, bool fHelp)
     if (strCommand == "winners")
     {
         Object obj;
+        std::string strMode = "addr";
+    
+        if (params.size() >= 1) strMode = params[0].get_str();
 
         for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
         {
             CScript payee;
-            if(masternodePayments.GetBlockPayee(nHeight, payee)){
+            CTxIn vin;
+            if(masternodePayments.GetBlockPayee(nHeight, payee, vin)){
                 CTxDestination address1;
                 ExtractDestination(payee, address1);
                 CBitcoinAddress address2(address1);
-                obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       address2.ToString().c_str()));
+
+                if(strMode == "addr")
+                    obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       address2.ToString().c_str()));
+
+                if(strMode == "vin")
+                    obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       vin.ToString().c_str()));
+
             } else {
                 obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       ""));
             }

From 1e69e57662c6ed41d4890bd7afce906ade925a1f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Fri, 17 Apr 2015 08:10:38 -0700
Subject: [PATCH 1333/1819] Masternode Overhaul

- Added new CMasterBroadcast/CmasternodePing objects, with all of the code required to check each new message. SHould be much easier to tell what's going on now.
---
 src/activemasternode.cpp    | 132 +++---------
 src/activemasternode.h      |  11 +-
 src/masternode-payments.cpp |   2 +-
 src/masternode-pos.h        |   2 +-
 src/masternode.cpp          | 396 +++++++++++++++++++++++++++++++++++-
 src/masternode.h            |  98 ++++++++-
 src/masternodeman.cpp       | 277 ++++---------------------
 src/masternodeman.h         |   7 -
 src/rpcdarksend.cpp         | 144 -------------
 src/test/bloom_tests.cpp    |   4 +-
 src/version.h               |   6 +-
 11 files changed, 557 insertions(+), 522 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 54955e542304..26e3f993c1ec 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -2,6 +2,7 @@
 #include "protocol.h"
 #include "activemasternode.h"
 #include "masternodeman.h"
+#include "masternode.h"
 #include <boost/lexical_cast.hpp>
 
 //
@@ -120,89 +121,37 @@ void CActiveMasternode::ManageStatus()
     }
 
     //send to all peers
-    if(!Dseep(errorMessage)) {
+    if(!Mnping(errorMessage)) {
         LogPrintf("CActiveMasternode::ManageStatus() - Error on Ping: %s\n", errorMessage.c_str());
     }
 }
 
-// Send stop dseep to network for remote Masternode
-bool CActiveMasternode::StopMasterNode(std::string strService, std::string strKeyMasternode, std::string& errorMessage) {
-    CTxIn vin;
-    CKey keyMasternode;
-    CPubKey pubKeyMasternode;
-
-    if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode)) {
-        LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str());
-        return false;
-    }
-
-    return StopMasterNode(vin, CService(strService), keyMasternode, pubKeyMasternode, errorMessage);
-}
-
-// Send stop dseep to network for main Masternode
-bool CActiveMasternode::StopMasterNode(std::string& errorMessage) {
+bool CActiveMasternode::Mnping(std::string& errorMessage) {
     if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) {
         errorMessage = "Masternode is not in a running status";
-        LogPrintf("CActiveMasternode::StopMasterNode() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CActiveMasternode::Mnping() - Error: %s\n", errorMessage.c_str());
         return false;
     }
 
-    status = MASTERNODE_STOPPED;
-
     CPubKey pubKeyMasternode;
     CKey keyMasternode;
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
     {
-        LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str());
+        LogPrintf("CActiveMasternode::Mnping() - Error upon calling SetKey: %s\n", errorMessage.c_str());
         return false;
     }
 
-    return StopMasterNode(vin, service, keyMasternode, pubKeyMasternode, errorMessage);
+    return Mnping(vin, service, keyMasternode, pubKeyMasternode, errorMessage);
 }
 
-// Send stop dseep to network for any Masternode
-bool CActiveMasternode::StopMasterNode(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string& errorMessage) {
-    pwalletMain->UnlockCoin(vin.prevout);
-    return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, true);
-}
-
-bool CActiveMasternode::Dseep(std::string& errorMessage) {
-    if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) {
-        errorMessage = "Masternode is not in a running status";
-        LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", errorMessage.c_str());
-        return false;
-    }
-
-    CPubKey pubKeyMasternode;
-    CKey keyMasternode;
-
-    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+bool CActiveMasternode::Mnping(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage) {
+    //send to all peers
+    LogPrintf("CActiveMasternode::Mnping() - RelayMasternodeEntryPing vin = %s\n", vin.ToString().c_str());
+    
+    CMasternodePing mnp(vin);
+    if(!mnp.Sign(keyMasternode, pubKeyMasternode))
     {
-        LogPrintf("CActiveMasternode::Dseep() - Error upon calling SetKey: %s\n", errorMessage.c_str());
-        return false;
-    }
-
-    return Dseep(vin, service, keyMasternode, pubKeyMasternode, errorMessage, false);
-}
-
-bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage, bool stop) {
-    std::string errorMessage;
-    std::vector<unsigned char> vchMasterNodeSignature;
-    std::string strMasterNodeSignMessage;
-    int64_t masterNodeSignatureTime = GetAdjustedTime();
-
-    std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(stop);
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyMasternode)) {
-        retErrorMessage = "sign message failed: " + errorMessage;
-        LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, errorMessage)) {
-        retErrorMessage = "Verify message failed: " + errorMessage;
-        LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
         return false;
     }
 
@@ -210,24 +159,19 @@ bool CActiveMasternode::Dseep(CTxIn vin, CService service, CKey keyMasternode, C
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn != NULL)
     {
-        if(stop)
-            mnodeman.Remove(pmn->vin);
-        else
-            pmn->UpdateLastSeen();
+        pmn->UpdateLastSeen();
     }
     else
     {
         // Seems like we are trying to send a ping while the Masternode is not registered in the network
         retErrorMessage = "Darksend Masternode List doesn't include our Masternode, shutting down Masternode pinging service! " + vin.ToString();
-        LogPrintf("CActiveMasternode::Dseep() - Error: %s\n", retErrorMessage.c_str());
+        LogPrintf("CActiveMasternode::Mnping() - Error: %s\n", retErrorMessage.c_str());
         status = MASTERNODE_NOT_CAPABLE;
         notCapableReason = retErrorMessage;
         return false;
     }
 
-    //send to all peers
-    LogPrintf("CActiveMasternode::Dseep() - RelayMasternodeEntryPing vin = %s\n", vin.ToString().c_str());
-    mnodeman.RelayMasternodeEntryPing(vin, vchMasterNodeSignature, masterNodeSignatureTime, stop);
+    mnp.Relay();
 
     return true;
 }
@@ -281,40 +225,30 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
 }
 
 bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage) {
-    std::string errorMessage;
-    std::vector<unsigned char> vchMasterNodeSignature;
-    std::string strMasterNodeSignMessage;
-    int64_t masterNodeSignatureTime = GetAdjustedTime();
-
-    std::string vchPubKey(pubKeyCollateralAddress.begin(), pubKeyCollateralAddress.end());
-    std::string vchPubKey2(pubKeyMasternode.begin(), pubKeyMasternode.end());
-
-    std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(PROTOCOL_VERSION) + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyCollateralAddress)) {
-        retErrorMessage = "sign message failed: " + errorMessage;
-        LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str());
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pubKeyCollateralAddress, vchMasterNodeSignature, strMessage, errorMessage)) {
-        retErrorMessage = "Verify message failed: " + errorMessage;
-        LogPrintf("CActiveMasternode::Register() - Error: %s\n", retErrorMessage.c_str());
-        return false;
-    }
 
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
     {
         LogPrintf("CActiveMasternode::Register() - Adding to Masternode list service: %s - vin: %s\n", service.ToString().c_str(), vin.ToString().c_str());
-        CMasternode mn(service, vin, pubKeyCollateralAddress, vchMasterNodeSignature, masterNodeSignatureTime, pubKeyMasternode, PROTOCOL_VERSION, donationAddress, donationPercentage);
-        mn.UpdateLastSeen(masterNodeSignatureTime);
+        CMasternodeBroadcast mnb(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION, donationAddress, donationPercentage);
+        if(!mnb.Sign(keyCollateralAddress)){
+            //send to all peers
+            LogPrintf("CActiveMasternode::Register() -  Failed to sign %s\n", vin.ToString().c_str());
+            return false;
+        }
+        
+        CMasternode mn(mnb);
         mnodeman.Add(mn);
     }
-
-    //send to all peers
-    LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString().c_str());
-    mnodeman.RelayMasternodeEntry(vin, service, vchMasterNodeSignature, masterNodeSignatureTime, pubKeyCollateralAddress, pubKeyMasternode, -1, -1, masterNodeSignatureTime, PROTOCOL_VERSION, donationAddress, donationPercentage);
+    
+    if(pmn == NULL) pmn = mnodeman.Find(vin);
+    if(pmn != NULL)
+    {
+        CMasternodeBroadcast mnb(*pmn);
+        //send to all peers
+        LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString().c_str());
+        mnb.Relay(false);
+    }
 
     return true;
 }
@@ -416,7 +350,7 @@ bool CActiveMasternode::EnableHotColdMasterNode(CTxIn& newVin, CService& newServ
 
     status = MASTERNODE_REMOTELY_ENABLED;
 
-    //The values below are needed for signing dseep messages going forward
+    //The values below are needed for signing mnping messages going forward
     this->vin = newVin;
     this->service = newService;
 
diff --git a/src/activemasternode.h b/src/activemasternode.h
index 600b0c6a5484..cde66e767118 100644
--- a/src/activemasternode.h
+++ b/src/activemasternode.h
@@ -37,16 +37,9 @@ class CActiveMasternode
     void ManageStatus(); 
 
     /// Ping for main Masternode
-    bool Dseep(std::string& errorMessage); 
+    bool Mnping(std::string& errorMessage); 
     /// Ping for any Masternode
-    bool Dseep(CTxIn vin, CService service, CKey key, CPubKey pubKey, std::string &retErrorMessage, bool stop); 
-
-    /// Stop main Masternode
-    bool StopMasterNode(std::string& errorMessage); 
-    /// Stop remote Masternode
-    bool StopMasterNode(std::string strService, std::string strKeyMasternode, std::string& errorMessage); 
-    /// Stop any Masternode
-    bool StopMasterNode(CTxIn vin, CService service, CKey key, CPubKey pubKey, std::string& errorMessage); 
+    bool Mnping(CTxIn vin, CService service, CKey key, CPubKey pubKey, std::string &retErrorMessage); 
 
     /// Register remote Masternode
     bool Register(std::string strService, std::string strKey, std::string txHash, std::string strOutputIndex, std::string strDonationAddress, std::string strDonationPercentage, std::string& errorMessage); 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index d827bd113c74..7c63ea5ebb3d 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -238,7 +238,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
     {
         //if we already have the same vin - we have one full payment cycle, break
-        if(vecLastPayments.size() > nMinimumAge) break;
+        if(vecLastPayments.size() > (unsigned int)nMinimumAge) break;
         vecLastPayments.push_back(winner.vin);
     }
 
diff --git a/src/masternode-pos.h b/src/masternode-pos.h
index 3acab2a2ae51..7b420c8c3cc7 100644
--- a/src/masternode-pos.h
+++ b/src/masternode-pos.h
@@ -22,7 +22,7 @@ class CMasternodeScanningError;
 extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
 extern CMasternodeScanning mnscan;
 
-static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70076;
+static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70077;
 
 /*
 	1% of the network is scanned every 2.5 minutes, making a full
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 029ed4d25025..f5729467d8bf 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -73,7 +73,7 @@ CMasternode::CMasternode()
     sig = std::vector<unsigned char>();
     activeState = MASTERNODE_ENABLED;
     sigTime = GetAdjustedTime();
-    lastDseep = 0;
+    lastMnping = 0;
     lastTimeSeen = 0;
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
@@ -102,7 +102,7 @@ CMasternode::CMasternode(const CMasternode& other)
     sig = other.sig;
     activeState = other.activeState;
     sigTime = other.sigTime;
-    lastDseep = other.lastDseep;
+    lastMnping = other.lastMnping;
     lastTimeSeen = other.lastTimeSeen;
     cacheInputAge = other.cacheInputAge;
     cacheInputAgeBlock = other.cacheInputAgeBlock;
@@ -129,7 +129,7 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     sig = newSig;
     activeState = MASTERNODE_ENABLED;
     sigTime = newSigTime;
-    lastDseep = 0;
+    lastMnping = 0;
     lastTimeSeen = 0;
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
@@ -143,7 +143,49 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = GetAdjustedTime();
+    nLastPaid = GetAdjustedTime();    
+}
+
+CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
+{
+    LOCK(cs);
+    vin = mnb.vin;
+    addr = mnb.addr;
+    pubkey = mnb.pubkey;
+    pubkey2 = mnb.pubkey2;
+    sig = mnb.sig;
+    activeState = MASTERNODE_ENABLED;
+    sigTime = mnb.sigTime;
+    lastMnping = 0;
+    lastTimeSeen = 0;
+    cacheInputAge = 0;
+    cacheInputAgeBlock = 0;
+    unitTest = false;
+    allowFreeTx = true;
+    protocolVersion = mnb.protocolVersion;
+    nLastDsq = 0;
+    donationAddress = mnb.donationAddress;
+    donationPercentage = mnb.donationPercentage;
+    nVote = 0;
+    lastVote = 0;
+    nScanningErrorCount = 0;
+    nLastScanningErrorBlockHeight = 0;
+    nLastPaid = mnb.nLastPaid;
+}
+
+//
+// When a new masternode broadcast is sent, update our information
+//
+void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
+{
+    pubkey2 = mnb.pubkey2;
+    sigTime = mnb.sigTime;
+    sig = mnb.sig;
+    protocolVersion = mnb.protocolVersion;
+    addr = mnb.addr;
+    donationAddress = mnb.donationAddress;
+    donationPercentage = mnb.donationPercentage;
+    nLastPaid = mnb.nLastPaid;
 }
 
 //
@@ -208,4 +250,350 @@ void CMasternode::Check()
     }
 
     activeState = MASTERNODE_ENABLED; // OK
+}
+
+
+CMasternodeBroadcast::CMasternodeBroadcast()
+{
+    vin = CTxIn();
+    addr = CService();
+    pubkey = CPubKey();
+    pubkey2 = CPubKey();
+    sig = std::vector<unsigned char>();
+    activeState = MASTERNODE_ENABLED;
+    sigTime = GetAdjustedTime();
+    lastMnping = 0;
+    lastTimeSeen = 0;
+    cacheInputAge = 0;
+    cacheInputAgeBlock = 0;
+    unitTest = false;
+    allowFreeTx = true;
+    protocolVersion = MIN_PEER_PROTO_VERSION;
+    nLastDsq = 0;
+    donationAddress = CScript();
+    donationPercentage = 0;
+    nVote = 0;
+    lastVote = 0;
+    nScanningErrorCount = 0;
+    nLastScanningErrorBlockHeight = 0;
+
+    //mark last paid as current for new entries
+    nLastPaid = GetAdjustedTime();
+}
+
+CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
+{
+    vin = newVin;
+    addr = newAddr;
+    pubkey = newPubkey;
+    pubkey2 = newPubkey2;
+    sig = std::vector<unsigned char>();
+    activeState = MASTERNODE_ENABLED;
+    sigTime = GetAdjustedTime();
+    lastMnping = 0;
+    lastTimeSeen = 0;
+    cacheInputAge = 0;
+    cacheInputAgeBlock = 0;
+    unitTest = false;
+    allowFreeTx = true;
+    protocolVersion = protocolVersionIn;
+    nLastDsq = 0;
+    donationAddress = newDonationAddress;
+    donationPercentage = newDonationPercentage;
+    nVote = 0;
+    lastVote = 0;
+    nScanningErrorCount = 0;
+    nLastScanningErrorBlockHeight = 0;
+    nLastPaid = GetAdjustedTime();  
+}
+
+CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
+{
+    vin = other.vin;
+    addr = other.addr;
+    pubkey = other.pubkey;
+    pubkey2 = other.pubkey2;
+    sig = other.sig;
+    activeState = other.activeState;
+    sigTime = other.sigTime;
+    lastMnping = other.lastMnping;
+    lastTimeSeen = other.lastTimeSeen;
+    cacheInputAge = other.cacheInputAge;
+    cacheInputAgeBlock = other.cacheInputAgeBlock;
+    unitTest = other.unitTest;
+    allowFreeTx = other.allowFreeTx;
+    protocolVersion = other.protocolVersion;
+    nLastDsq = other.nLastDsq;
+    donationAddress = other.donationAddress;
+    donationPercentage = other.donationPercentage;
+    nVote = other.nVote;
+    lastVote = other.lastVote;
+    nScanningErrorCount = other.nScanningErrorCount;
+    nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
+    nLastPaid = other.nLastPaid;
+}
+
+bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
+{
+    // make sure signature isn't in the future (past is OK)
+    if (sigTime > GetAdjustedTime() + 60 * 60) {
+        LogPrintf("dsee - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        return false;
+    }
+
+    std::string vchPubKey(pubkey.begin(), pubkey.end());
+    std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
+    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion)  + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
+
+    if(donationPercentage < 0 || donationPercentage > 100){
+        LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
+        return false;
+    }
+
+    if(protocolVersion < nMasternodeMinProtocol) {
+        LogPrintf("dsee - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
+        return false;
+    }
+
+    CScript pubkeyScript;
+    pubkeyScript = GetScriptForDestination(pubkey.GetID());
+
+    if(pubkeyScript.size() != 25) {
+        LogPrintf("dsee - pubkey the wrong size\n");
+        nDos = 100;
+        return false;
+    }
+
+    CScript pubkeyScript2;
+    pubkeyScript2 = GetScriptForDestination(pubkey2.GetID());
+
+    if(pubkeyScript2.size() != 25) {
+        LogPrintf("dsee - pubkey2 the wrong size\n");
+        nDos = 100;
+        return false;
+    }
+
+    if(!vin.scriptSig.empty()) {
+        LogPrintf("dsee - Ignore Not Empty ScriptSig %s\n",vin.ToString().c_str());
+        return false;
+    }
+
+    std::string errorMessage = "";
+    if(!darkSendSigner.VerifyMessage(pubkey, sig, strMessage, errorMessage)){
+        LogPrintf("dsee - Got bad Masternode address signature\n");
+        nDos = 100;
+        return false;
+    }
+
+    if(Params().NetworkID() == CBaseChainParams::MAIN) {
+        if(addr.GetPort() != 9999) return false;
+    } else if(addr.GetPort() == 9999) return false;
+
+    //search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
+    CMasternode* pmn = mnodeman.Find(vin);
+    // if we are masternode but with undefined vin and this dsee is ours (matches our Masternode privkey) then just skip this part
+    if(pmn != NULL && !(fMasterNode && activeMasternode.vin == CTxIn() && pubkey2 == activeMasternode.pubKeyMasternode))
+    {
+        // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
+        //   after that they just need to match
+        if(!fRequested && pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_DSEE_SECONDS)){
+            pmn->UpdateLastSeen();
+
+            if(pmn->sigTime < sigTime){ //take the newest entry
+                LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
+                
+                pmn->UpdateFromNewBroadcast((*this));
+                
+                pmn->Check();
+                if(pmn->IsEnabled()) {
+                    Relay(fRequested);
+                }
+            }
+        }
+        return false;
+    }
+
+    return true;
+}
+
+bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
+{
+    CValidationState state;
+    CMutableTransaction tx = CMutableTransaction();
+    CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
+    tx.vin.push_back(vin);
+    tx.vout.push_back(vout);
+    if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
+        if(fDebug) LogPrintf("dsee - Accepted Masternode entry\n");
+
+        if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
+            LogPrintf("dsee - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
+            return false;
+        }
+
+        // verify that sig time is legit in past
+        // should be at least not earlier than block when 1000 DASH tx got MASTERNODE_MIN_CONFIRMATIONS
+        uint256 hashBlock = 0;
+        CTransaction tx2;
+        GetTransaction(vin.prevout.hash, tx2, hashBlock, true);
+        BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
+        if (mi != mapBlockIndex.end() && (*mi).second)
+        {
+            CBlockIndex* pMNIndex = (*mi).second; // block for 1000 DASH tx -> 1 confirmation
+            CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
+            if(pConfIndex->GetBlockTime() > sigTime)
+            {
+                LogPrintf("dsee - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
+                          sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
+                return false;
+            }
+        }
+
+        //doesn't support multisig addresses
+        if(donationAddress.IsPayToScriptHash()){
+            donationAddress = CScript();
+            donationPercentage = 0;
+        }
+
+        // add our Masternode
+        CMasternode mn((*this));
+        mn.UpdateLastSeen(lastTimeSeen);
+        mnodeman.Add(mn);
+
+        // if it matches our Masternode privkey, then we've been remotely activated
+        if(pubkey2 == activeMasternode.pubKeyMasternode && protocolVersion == PROTOCOL_VERSION){
+            activeMasternode.EnableHotColdMasterNode(vin, addr);
+        }
+
+        bool isLocal = addr.IsRFC1918() || addr.IsLocal();
+        if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
+
+        if(!fRequested && !isLocal) Relay(fRequested);
+
+        return true;
+    } else {
+        //set nDos
+        state.IsInvalid(nDoS);
+    }
+
+    return false;
+}
+
+void CMasternodeBroadcast::Relay(bool fRequested)
+{
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+        pnode->PushMessage("mnb", (*this), fRequested);
+}
+
+bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
+{   
+    std::string errorMessage;
+
+    std::string vchPubKey(pubkey.begin(), pubkey.end());
+    std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
+
+    sigTime = GetAdjustedTime();
+
+    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion) + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, sig, keyCollateralAddress)) {
+        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pubkey, sig, strMessage, errorMessage)) {
+        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    return true;
+}
+
+CMasternodePing::CMasternodePing()
+{
+    vin = CTxIn();
+}
+
+CMasternodePing::CMasternodePing(CTxIn& newVin)
+{
+    vin = newVin;
+}
+
+
+bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+{
+    std::string errorMessage;
+    std::string strMasterNodeSignMessage;
+
+    sigTime = GetAdjustedTime();
+    std::string strMessage =  boost::lexical_cast<std::string>(sigTime);
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    return true;
+}
+
+bool CMasternodePing::CheckAndUpdate(int& nDos)
+{
+    if (sigTime > GetAdjustedTime() + 60 * 60) {
+        LogPrintf("mnping - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        return false;
+    }
+
+    if (sigTime <= GetAdjustedTime() - 60 * 60) {
+        LogPrintf("mnping - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
+        return false;
+    }
+
+    // see if we have this Masternode
+    CMasternode* pmn = mnodeman.Find(vin);
+    if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol)
+    {
+        // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
+        // take this only if it's newer
+        if(pmn->lastMnping < sigTime)
+        {
+            std::string strMessage = boost::lexical_cast<std::string>(sigTime);
+
+            std::string errorMessage = "";
+            if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
+            {
+                LogPrintf("mnping - Got bad Masternode address signature %s \n", vin.ToString().c_str());
+                nDos = 33;
+                return false;
+            }
+
+            pmn->lastMnping = sigTime;
+
+            if(!pmn->UpdatedWithin(MASTERNODE_MIN_MNP_SECONDS))
+            {
+                pmn->UpdateLastSeen();
+                pmn->Check();
+                if(!pmn->IsEnabled()) return false;
+                
+                Relay();
+                return true;
+            }
+        }
+    }
+
+    return false;
+}
+
+void CMasternodePing::Relay()
+{
+    //const CTxIn vin, const std::vector<unsigned char> vchSig, const int64_t nNow, const bool stop
+
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+        pnode->PushMessage("mnp", (*this));
 }
\ No newline at end of file
diff --git a/src/masternode.h b/src/masternode.h
index 933f5cdddf62..52b343d6fce2 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -26,7 +26,7 @@
 #define MASTERNODE_REMOTELY_ENABLED            9
 
 #define MASTERNODE_MIN_CONFIRMATIONS           15
-#define MASTERNODE_MIN_DSEEP_SECONDS           (30*60)
+#define MASTERNODE_MIN_MNP_SECONDS             (30*60)
 #define MASTERNODE_MIN_DSEE_SECONDS            (5*60)
 #define MASTERNODE_PING_SECONDS                (1*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
@@ -35,6 +35,8 @@
 using namespace std;
 
 class CMasternode;
+class CMasternodeBroadcast;
+class CMasternodePing;
 extern map<int64_t, uint256> mapCacheBlockHashes;
 
 bool GetBlockHash(uint256& hash, int nBlockHeight);
@@ -65,7 +67,7 @@ class CMasternode
     std::vector<unsigned char> sig;
     int activeState;
     int64_t sigTime; //dsee message times
-    int64_t lastDseep;
+    int64_t lastMnping;
     int64_t lastTimeSeen;
     int cacheInputAge;
     int cacheInputAgeBlock;
@@ -83,7 +85,9 @@ class CMasternode
 
     CMasternode();
     CMasternode(const CMasternode& other);
-    CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript donationAddress, int donationPercentage);
+    CMasternode(const CMasternodeBroadcast& other);
+    CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage);
+
 
     void swap(CMasternode& first, CMasternode& second) // nothrow
     {
@@ -99,7 +103,7 @@ class CMasternode
         swap(first.sig, second.sig);
         swap(first.activeState, second.activeState);
         swap(first.sigTime, second.sigTime);
-        swap(first.lastDseep, second.lastDseep);
+        swap(first.lastMnping, second.lastMnping);
         swap(first.lastTimeSeen, second.lastTimeSeen);
         swap(first.cacheInputAge, second.cacheInputAge);
         swap(first.cacheInputAgeBlock, second.cacheInputAgeBlock);
@@ -137,35 +141,39 @@ class CMasternode
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
             LOCK(cs);
+
             READWRITE(vin);
             READWRITE(addr);
             READWRITE(pubkey);
             READWRITE(pubkey2);
             READWRITE(sig);
-            READWRITE(activeState);
             READWRITE(sigTime);
-            READWRITE(lastDseep);
             READWRITE(lastTimeSeen);
+            READWRITE(protocolVersion);
+            READWRITE(donationAddress);
+            READWRITE(donationPercentage);
+            READWRITE(nLastPaid);
+            READWRITE(activeState);
+            READWRITE(lastMnping);
             READWRITE(cacheInputAge);
             READWRITE(cacheInputAgeBlock);
             READWRITE(unitTest);
             READWRITE(allowFreeTx);
-            READWRITE(protocolVersion);
             READWRITE(nLastDsq);
-            READWRITE(donationAddress);
-            READWRITE(donationPercentage);
             READWRITE(nVote);
             READWRITE(lastVote);
             READWRITE(nScanningErrorCount);
             READWRITE(nLastScanningErrorBlockHeight);
-            READWRITE(nLastPaid);
     }
 
     int64_t SecondsSincePayment()
     {
         return (GetAdjustedTime() - nLastPaid);
+
     }
 
+    void UpdateFromNewBroadcast(CMasternodeBroadcast& mnb);
+
     void UpdateLastSeen(int64_t override=0)
     {
         if(override == 0){
@@ -243,4 +251,72 @@ class CMasternode
 
 };
 
-#endif
+
+//
+// The Masternode Broadcast Class : Contains a different serialize method for sending masternodes through the network
+//
+
+class CMasternodeBroadcast : public CMasternode
+{
+public:
+    CMasternodeBroadcast();
+    CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage);
+    CMasternodeBroadcast(const CMasternode& other);
+
+    bool CheckAndUpdate(int& nDoS, bool fRequested);
+    bool CheckInputsAndAdd(int& nDos, bool fRequested);
+    bool Sign(CKey& keyCollateralAddress);
+    void Relay(bool fRequested);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vin);
+        READWRITE(addr);
+        READWRITE(pubkey);
+        READWRITE(pubkey2);
+        READWRITE(sig);
+        READWRITE(sigTime);
+        READWRITE(lastTimeSeen);
+        READWRITE(protocolVersion);
+        READWRITE(donationAddress);
+        READWRITE(donationPercentage);
+        READWRITE(nLastPaid);
+    }
+    
+
+};
+
+
+//
+// The Masternode Ping Class : Contains a different serialize method for sending pings from masternodes throughout the network
+//
+
+class CMasternodePing
+{
+public:
+
+    CTxIn vin;
+    std::vector<unsigned char> vchSig;
+    int64_t sigTime; //dsee message times
+    //removed stop
+
+    CMasternodePing();
+    CMasternodePing(CTxIn& newVin);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vin);
+        READWRITE(sigTime);
+        READWRITE(vchSig);
+    }
+
+    bool CheckAndUpdate(int& nDos);
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    void Relay();
+
+};
+#endif
\ No newline at end of file
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 50621a31b91e..7f3c173b7569 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -545,265 +545,77 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
     LOCK(cs_process_message);
 
-    if (strCommand == "dsee") { //DarkSend Election Entry
+    if (strCommand == "mnb") { //Masternode Broadcast
+        CMasternodeBroadcast mnb;
+        bool fRequested; //specifically requested?
+        vRecv >> mnb >> fRequested;
 
-        CTxIn vin;
-        CService addr;
-        CPubKey pubkey;
-        CPubKey pubkey2;
-        vector<unsigned char> vchSig;
-        int64_t sigTime;
-        int count;
-        int current;
-        int64_t lastUpdated;
-        int protocolVersion;
-        CScript donationAddress;
-        int donationPercentage;
-        std::string strMessage;
-
-        // 70047 and greater
-        vRecv >> vin >> addr >> vchSig >> sigTime >> pubkey >> pubkey2 >> count >> current >> lastUpdated >> protocolVersion >> donationAddress >> donationPercentage;
-
-        // make sure signature isn't in the future (past is OK)
-        if (sigTime > GetAdjustedTime() + 60 * 60) {
-            LogPrintf("dsee - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
-            return;
-        }
-
-        bool isLocal = addr.IsRFC1918() || addr.IsLocal();
-        if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
-
-        std::string vchPubKey(pubkey.begin(), pubkey.end());
-        std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
-
-        strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion)  + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
-
-        if(donationPercentage < 0 || donationPercentage > 100){
-            LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
-            return;
-        }
-
-        if(protocolVersion < nMasternodeMinProtocol) {
-            LogPrintf("dsee - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
-            return;
-        }
-
-        CScript pubkeyScript;
-        pubkeyScript = GetScriptForDestination(pubkey.GetID());
-
-        if(pubkeyScript.size() != 25) {
-            LogPrintf("dsee - pubkey the wrong size\n");
-            Misbehaving(pfrom->GetId(), 100);
-            return;
-        }
-
-        CScript pubkeyScript2;
-        pubkeyScript2 = GetScriptForDestination(pubkey2.GetID());
-
-        if(pubkeyScript2.size() != 25) {
-            LogPrintf("dsee - pubkey2 the wrong size\n");
-            Misbehaving(pfrom->GetId(), 100);
-            return;
-        }
+        int nDoS = 0;
+        if(!mnb.CheckAndUpdate(nDoS, fRequested)){
 
-        if(!vin.scriptSig.empty()) {
-            LogPrintf("dsee - Ignore Not Empty ScriptSig %s\n",vin.ToString().c_str());
-            return;
-        }
-
-        std::string errorMessage = "";
-        if(!darkSendSigner.VerifyMessage(pubkey, vchSig, strMessage, errorMessage)){
-            LogPrintf("dsee - Got bad Masternode address signature\n");
-            Misbehaving(pfrom->GetId(), 100);
-            return;
-        }
-
-        if(Params().NetworkID() == CBaseChainParams::MAIN) {
-            if(addr.GetPort() != 9999) return;
-        } else if(addr.GetPort() == 9999) return;
-
-        //search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
-        CMasternode* pmn = this->Find(vin);
-        // if we are masternode but with undefined vin and this dsee is ours (matches our Masternode privkey) then just skip this part
-        if(pmn != NULL && !(fMasterNode && activeMasternode.vin == CTxIn() && pubkey2 == activeMasternode.pubKeyMasternode))
-        {
-            // count == -1 when it's a new entry
-            //   e.g. We don't want the entry relayed/time updated when we're syncing the list
-            // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
-            //   after that they just need to match
-            if(count == -1 && pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_DSEE_SECONDS)){
-                pmn->UpdateLastSeen();
-
-                if(pmn->sigTime < sigTime){ //take the newest entry
-                    LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
-                    pmn->pubkey2 = pubkey2;
-                    pmn->sigTime = sigTime;
-                    pmn->sig = vchSig;
-                    pmn->protocolVersion = protocolVersion;
-                    pmn->addr = addr;
-                    pmn->donationAddress = donationAddress;
-                    pmn->donationPercentage = donationPercentage;
-                    pmn->Check();
-                    if(pmn->IsEnabled())
-                        mnodeman.RelayMasternodeEntry(vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion, donationAddress, donationPercentage);
-                }
-            }
+            if(nDoS > 0)
+                Misbehaving(pfrom->GetId(), nDoS);
 
+            //failed
             return;
         }
 
         // make sure the vout that was signed is related to the transaction that spawned the Masternode
         //  - this is expensive, so it's only done once per Masternode
-        if(!darkSendSigner.IsVinAssociatedWithPubkey(vin, pubkey)) {
+        if(!darkSendSigner.IsVinAssociatedWithPubkey(mnb.vin, mnb.pubkey)) {
             LogPrintf("dsee - Got mismatched pubkey and vin\n");
-            Misbehaving(pfrom->GetId(), 100);
+            Misbehaving(pfrom->GetId(), 33);
             return;
         }
 
-        if(fDebug) LogPrintf("dsee - Got NEW Masternode entry %s\n", addr.ToString().c_str());
+        if(fDebug) LogPrintf("dsee - Got NEW Masternode entry %s\n", mnb.addr.ToString().c_str());
 
         // make sure it's still unspent
         //  - this is checked later by .check() in many places and by ThreadCheckDarkSendPool()
 
-        CValidationState state;
-        CMutableTransaction tx = CMutableTransaction();
-        CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
-        tx.vin.push_back(vin);
-        tx.vout.push_back(vout);
-        if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
-            if(fDebug) LogPrintf("dsee - Accepted Masternode entry %i %i\n", count, current);
-
-            if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
-                LogPrintf("dsee - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
-                Misbehaving(pfrom->GetId(), 20);
-                return;
-            }
-
-            // verify that sig time is legit in past
-            // should be at least not earlier than block when 1000 DASH tx got MASTERNODE_MIN_CONFIRMATIONS
-            uint256 hashBlock = 0;
-            CTransaction tx2;
-            GetTransaction(vin.prevout.hash, tx2, hashBlock, true);
-            BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
-            if (mi != mapBlockIndex.end() && (*mi).second)
-            {
-                CBlockIndex* pMNIndex = (*mi).second; // block for 1000 DASH tx -> 1 confirmation
-                CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
-                if(pConfIndex->GetBlockTime() > sigTime)
-                {
-                    LogPrintf("dsee - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
-                              sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
-                    return;
-                }
-            }
-
+        if(mnb.CheckInputsAndAdd(nDoS, fRequested)) {
 
             // use this as a peer
-            addrman.Add(CAddress(addr), pfrom->addr, 2*60*60);
-
-            //doesn't support multisig addresses
-            if(donationAddress.IsPayToScriptHash()){
-                donationAddress = CScript();
-                donationPercentage = 0;
-            }
-
-            // add our Masternode
-            CMasternode mn(addr, vin, pubkey, vchSig, sigTime, pubkey2, protocolVersion, donationAddress, donationPercentage);
-            mn.UpdateLastSeen(lastUpdated);
-            this->Add(mn);
-
-            // if it matches our Masternode privkey, then we've been remotely activated
-            if(pubkey2 == activeMasternode.pubKeyMasternode && protocolVersion == PROTOCOL_VERSION){
-                activeMasternode.EnableHotColdMasterNode(vin, addr);
-            }
-
-            if(count == -1 && !isLocal)
-                mnodeman.RelayMasternodeEntry(vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion, donationAddress, donationPercentage);
-
+            addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
         } else {
-            LogPrintf("dsee - Rejected Masternode entry %s\n", addr.ToString().c_str());
+            LogPrintf("dsee - Rejected Masternode entry %s\n", mnb.addr.ToString().c_str());
 
-            int nDoS = 0;
-            if (state.IsInvalid(nDoS))
-            {
-                LogPrintf("dsee - %s from %s %s was not accepted into the memory pool\n", tx.GetHash().ToString().c_str(),
-                    pfrom->addr.ToString().c_str(), pfrom->cleanSubVer.c_str());
-                if (nDoS > 0)
-                    Misbehaving(pfrom->GetId(), nDoS);
-            }
+            if (nDoS > 0)
+                Misbehaving(pfrom->GetId(), nDoS);
         }
     }
 
-    else if (strCommand == "dseep") { //DarkSend Election Entry Ping
+    else if (strCommand == "mnp") { //Masternode Ping
+        CMasternodePing mnp;
+        vRecv >> mnp;
 
-        CTxIn vin;
-        vector<unsigned char> vchSig;
-        int64_t sigTime;
-        bool stop;
-        vRecv >> vin >> vchSig >> sigTime >> stop;
+        if(fDebug) LogPrintf("mnping - Received: vin: %s sigTime: %lld\n", mnp.vin.ToString().c_str(), mnp.sigTime);
 
-        //LogPrintf("dseep - Received: vin: %s sigTime: %lld stop: %s\n", vin.ToString().c_str(), sigTime, stop ? "true" : "false");
-
-        if (sigTime > GetAdjustedTime() + 60 * 60) {
-            LogPrintf("dseep - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
-            return;
-        }
-
-        if (sigTime <= GetAdjustedTime() - 60 * 60) {
-            LogPrintf("dseep - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
-            return;
-        }
-
-        // see if we have this Masternode
-        CMasternode* pmn = this->Find(vin);
-        if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol)
+        int nDoS = 0;
+        if(!mnp.CheckAndUpdate(nDoS))
         {
-            // LogPrintf("dseep - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
-            // take this only if it's newer
-            if(pmn->lastDseep < sigTime)
-            {
-                std::string strMessage = pmn->addr.ToString() + boost::lexical_cast<std::string>(sigTime) + boost::lexical_cast<std::string>(stop);
-
-                std::string errorMessage = "";
-                if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
-                {
-                    LogPrintf("dseep - Got bad Masternode address signature %s \n", vin.ToString().c_str());
-                    //Misbehaving(pfrom->GetId(), 100);
-                    return;
-                }
-
-                pmn->lastDseep = sigTime;
+            if(nDoS > 0)
+                Misbehaving(pfrom->GetId(), nDoS);
 
-                if(!pmn->UpdatedWithin(MASTERNODE_MIN_DSEEP_SECONDS))
-                {
-                    if(stop) pmn->Disable();
-                    else
-                    {
-                        pmn->UpdateLastSeen();
-                        pmn->Check();
-                        if(!pmn->IsEnabled()) return;
-                    }
-                    mnodeman.RelayMasternodeEntryPing(vin, vchSig, sigTime, stop);
-                }
-            }
+            //successful, we're done
             return;
         }
 
-        if(fDebug) LogPrintf("dseep - Couldn't find Masternode entry %s\n", vin.ToString().c_str());
+        if(fDebug) LogPrintf("mnping - Couldn't find Masternode entry %s\n", mnp.vin.ToString().c_str());
 
-        std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(vin.prevout);
+        std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);
         if (i != mWeAskedForMasternodeListEntry.end())
         {
             int64_t t = (*i).second;
             if (GetTime() < t) return; // we've asked recently
         }
 
-        // ask for the dsee info once from the node that sent dseep
+        // ask for the dsee info once from the node that sent mnping
 
-        LogPrintf("dseep - Asking source node for missing entry %s\n", vin.ToString().c_str());
-        pfrom->PushMessage("dseg", vin);
-        int64_t askAgain = GetTime() + MASTERNODE_MIN_DSEEP_SECONDS;
-        mWeAskedForMasternodeListEntry[vin.prevout] = askAgain;
+        LogPrintf("mnping - Asking source node for missing entry %s\n", mnp.vin.ToString().c_str());
+        pfrom->PushMessage("dseg", mnp.vin);
+        int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
+        mWeAskedForMasternodeListEntry[mnp.vin.prevout] = askAgain;
 
     } else if (strCommand == "mvote") { //Masternode Vote
 
@@ -861,24 +673,21 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             }
         } //else, asking for a specific node which is ok
 
-        int count = this->size();
         int i = 0;
-
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
-
             if(mn.addr.IsRFC1918()) continue; //local network
 
             if(mn.IsEnabled()) {
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
                 if(vin == CTxIn()){
-                    pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion, mn.donationAddress, mn.donationPercentage);
+                    CMasternodeBroadcast(mn).Relay(true);
                 } else if (vin == mn.vin) {
-                    pfrom->PushMessage("dsee", mn.vin, mn.addr, mn.sig, mn.sigTime, mn.pubkey, mn.pubkey2, count, i, mn.lastTimeSeen, mn.protocolVersion, mn.donationAddress, mn.donationPercentage);
+                    CMasternodeBroadcast(mn).Relay(true);
                     LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
                     return;
                 }
-                i++;
             }
+            i++;
         }
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString().c_str());
@@ -886,20 +695,6 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
 }
 
-void CMasternodeMan::RelayMasternodeEntry(const CTxIn vin, const CService addr, const std::vector<unsigned char> vchSig, const int64_t nNow, const CPubKey pubkey, const CPubKey pubkey2, const int count, const int current, const int64_t lastUpdated, const int protocolVersion, CScript donationAddress, int donationPercentage)
-{
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("dsee", vin, addr, vchSig, nNow, pubkey, pubkey2, count, current, lastUpdated, protocolVersion, donationAddress, donationPercentage);
-}
-
-void CMasternodeMan::RelayMasternodeEntryPing(const CTxIn vin, const std::vector<unsigned char> vchSig, const int64_t nNow, const bool stop)
-{
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("dseep", vin, vchSig, nNow, stop);
-}
-
 void CMasternodeMan::Remove(CTxIn vin)
 {
     LOCK(cs);
diff --git a/src/masternodeman.h b/src/masternodeman.h
index a1f8cc8ab306..2414ca3454f4 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -126,13 +126,6 @@ class CMasternodeMan
 
     std::string ToString() const;
 
-    //
-    // Relay Masternode Messages
-    //
-
-    void RelayMasternodeEntry(const CTxIn vin, const CService addr, const std::vector<unsigned char> vchSig, const int64_t nNow, const CPubKey pubkey, const CPubKey pubkey2, const int count, const int current, const int64_t lastUpdated, const int protocolVersion, CScript donationAddress, int donationPercentage);
-    void RelayMasternodeEntryPing(const CTxIn vin, const std::vector<unsigned char> vchSig, const int64_t nNow, const bool stop);
-
     void Remove(CTxIn vin);
 
 };
diff --git a/src/rpcdarksend.cpp b/src/rpcdarksend.cpp
index 182f68c14417..33b6bf16e6cf 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcdarksend.cpp
@@ -144,9 +144,6 @@ Value masternode(const Array& params, bool fHelp)
                 "  start        - Start masternode configured in dash.conf\n"
                 "  start-alias  - Start single masternode by assigned alias configured in masternode.conf\n"
                 "  start-many   - Start all masternodes configured in masternode.conf\n"
-                "  stop         - Stop masternode configured in dash.conf\n"
-                "  stop-alias   - Stop single masternode by assigned alias configured in masternode.conf\n"
-                "  stop-many    - Stop all masternodes configured in masternode.conf\n"
                 "  list         - Print list of all known masternodes (see masternodelist for more info)\n"
                 "  list-conf    - Print masternode.conf in JSON format\n"
                 "  winners      - Print list of masternode winners\n"
@@ -154,147 +151,6 @@ Value masternode(const Array& params, bool fHelp)
                 "  vote         - Vote on a Dash initiative\n"
                 );
 
-
-    if (strCommand == "stop")
-    {
-        if(!fMasterNode) return "you must set masternode=1 in the configuration";
-
-        if(pwalletMain->IsLocked()) {
-            SecureString strWalletPass;
-            strWalletPass.reserve(100);
-
-            if (params.size() == 2){
-                strWalletPass = params[1].get_str().c_str();
-            } else {
-                throw runtime_error(
-                    "Your wallet is locked, passphrase is required\n");
-            }
-
-            if(!pwalletMain->Unlock(strWalletPass)){
-                return "incorrect passphrase";
-            }
-        }
-
-        std::string errorMessage;
-        if(!activeMasternode.StopMasterNode(errorMessage)) {
-        	return "stop failed: " + errorMessage;
-        }
-        pwalletMain->Lock();
-
-        if(activeMasternode.status == MASTERNODE_STOPPED) return "successfully stopped masternode";
-        if(activeMasternode.status == MASTERNODE_NOT_CAPABLE) return "not capable masternode";
-
-        return "unknown";
-    }
-
-    if (strCommand == "stop-alias")
-    {
-	    if (params.size() < 2){
-			throw runtime_error(
-			"command needs at least 2 parameters\n");
-	    }
-
-	    std::string alias = params[1].get_str().c_str();
-
-    	if(pwalletMain->IsLocked()) {
-    		SecureString strWalletPass;
-    	    strWalletPass.reserve(100);
-
-			if (params.size() == 3){
-				strWalletPass = params[2].get_str().c_str();
-			} else {
-				throw runtime_error(
-				"Your wallet is locked, passphrase is required\n");
-			}
-
-			if(!pwalletMain->Unlock(strWalletPass)){
-				return "incorrect passphrase";
-			}
-        }
-
-    	bool found = false;
-
-		Object statusObj;
-		statusObj.push_back(Pair("alias", alias));
-
-    	BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-    		if(mne.getAlias() == alias) {
-    			found = true;
-    			std::string errorMessage;
-    			bool result = activeMasternode.StopMasterNode(mne.getIp(), mne.getPrivKey(), errorMessage);
-
-				statusObj.push_back(Pair("result", result ? "successful" : "failed"));
-    			if(!result) {
-   					statusObj.push_back(Pair("errorMessage", errorMessage));
-   				}
-    			break;
-    		}
-    	}
-
-    	if(!found) {
-    		statusObj.push_back(Pair("result", "failed"));
-    		statusObj.push_back(Pair("errorMessage", "could not find alias in config. Verify with list-conf."));
-    	}
-
-    	pwalletMain->Lock();
-    	return statusObj;
-    }
-
-    if (strCommand == "stop-many")
-    {
-    	if(pwalletMain->IsLocked()) {
-			SecureString strWalletPass;
-			strWalletPass.reserve(100);
-
-			if (params.size() == 2){
-				strWalletPass = params[1].get_str().c_str();
-			} else {
-				throw runtime_error(
-				"Your wallet is locked, passphrase is required\n");
-			}
-
-			if(!pwalletMain->Unlock(strWalletPass)){
-				return "incorrect passphrase";
-			}
-		}
-
-		int total = 0;
-		int successful = 0;
-		int fail = 0;
-
-
-		Object resultsObj;
-
-		BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-			total++;
-
-			std::string errorMessage;
-			bool result = activeMasternode.StopMasterNode(mne.getIp(), mne.getPrivKey(), errorMessage);
-
-			Object statusObj;
-			statusObj.push_back(Pair("alias", mne.getAlias()));
-			statusObj.push_back(Pair("result", result ? "successful" : "failed"));
-
-			if(result) {
-				successful++;
-			} else {
-				fail++;
-				statusObj.push_back(Pair("errorMessage", errorMessage));
-			}
-
-			resultsObj.push_back(Pair("status", statusObj));
-		}
-		pwalletMain->Lock();
-
-		Object returnObj;
-		returnObj.push_back(Pair("overall", "Successfully stopped " + boost::lexical_cast<std::string>(successful) + " masternodes, failed to stop " +
-				boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
-		returnObj.push_back(Pair("detail", resultsObj));
-
-		return returnObj;
-
-    }
-
     if (strCommand == "list")
     {
         Array newParams(params.size() - 1);
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 2de226fdd653..5c15cc9c6980 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -271,7 +271,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_2)
     BOOST_CHECK(merkleBlock.vMatchedTxn[2].second == uint256("0x6b0f8a73a56c04b519f1883e8aafda643ba61a30bd1439969df21bea5f4e27e2"));
     BOOST_CHECK(merkleBlock.vMatchedTxn[2].first == 2);
 
-    BOOST_CHECK(merkleBlock.vMatchedTxn[3].second == uint256("0x3c1d7e82342158e4109df2e0b6348b6e84e403d8b4046d7007663ace63cddb23"));
+    BOOST_CHECK(merkleBlock.vMatchedTxn[3].second == uint256("0x3c1d7e82342158e4109df2e0b6348b6e84e403d8b4046d7007763ace63cddb23"));
     BOOST_CHECK(merkleBlock.vMatchedTxn[3].first == 3);
 
     BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched) == block.hashMerkleRoot);
@@ -322,7 +322,7 @@ BOOST_AUTO_TEST_CASE(merkle_block_2_with_update_none)
     BOOST_CHECK(merkleBlock.vMatchedTxn[1].second == uint256("0x28204cad1d7fc1d199e8ef4fa22f182de6258a3eaafe1bbe56ebdcacd3069a5f"));
     BOOST_CHECK(merkleBlock.vMatchedTxn[1].first == 1);
 
-    BOOST_CHECK(merkleBlock.vMatchedTxn[2].second == uint256("0x3c1d7e82342158e4109df2e0b6348b6e84e403d8b4046d7007663ace63cddb23"));
+    BOOST_CHECK(merkleBlock.vMatchedTxn[2].second == uint256("0x3c1d7e82342158e4109df2e0b6348b6e84e403d8b4046d7007763ace63cddb23"));
     BOOST_CHECK(merkleBlock.vMatchedTxn[2].first == 3);
 
     BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched) == block.hashMerkleRoot);
diff --git a/src/version.h b/src/version.h
index 7a46b6718b69..df0272787e56 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,19 +10,19 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70076;
+static const int PROTOCOL_VERSION = 70077;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
 
 //! In this version, 'getheaders' was introduced.
-static const int GETHEADERS_VERSION = 70076;
+static const int GETHEADERS_VERSION = 70077;
 
 //! disconnect from peers older than this proto version
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70076;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70077;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From df45564cf0ad3b591d4eb8cc2354093bcb7df14c Mon Sep 17 00:00:00 2001
From: dexX7 <dexx@bitwatch.co>
Date: Fri, 27 Mar 2015 01:07:49 +0100
Subject: [PATCH 1334/1819] Initialization: set fallback locale as environment
 variable

The scope of `std::locale::global` appears to be smaller than `setenv("LC_ALL", ...)` and insufficient to fix messed up locale settings for the whole application.
---
 src/util.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index a03f55c910cc..4fea18b30686 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -713,18 +713,19 @@ void RenameThread(const char* name)
 
 void SetupEnvironment()
 {
+    std::locale loc("C");
     // On most POSIX systems (e.g. Linux, but not BSD) the environment's locale
     // may be invalid, in which case the "C" locale is used as fallback.
 #if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
     try {
-        std::locale(""); // Raises a runtime error if current locale is invalid
+        loc = std::locale(""); // Raises a runtime error if current locale is invalid
     } catch (const std::runtime_error&) {
-        std::locale::global(std::locale("C"));
+        setenv("LC_ALL", "C", 1);
     }
 #endif
     // The path locale is lazy initialized and to avoid deinitialization errors 
     // in multithreading environments, it is set explicitly by the main thread.
-    boost::filesystem::path::imbue(std::locale());    
+    boost::filesystem::path::imbue(loc);
 }
 
 void SetThreadPriority(int nPriority)

From 7494e0915b1b6ab0d68b77a2f9140e365e41cef8 Mon Sep 17 00:00:00 2001
From: dexX7 <dexx@bitwatch.co>
Date: Wed, 25 Mar 2015 12:09:17 +0100
Subject: [PATCH 1335/1819] Initialization: setup environment before starting
 tests

The environment is prepared by the main thread to guard against invalid locale settings and to prevent deinitialization issues of Boost path, which can result in app crashes.
---
 src/test/test_bitcoin.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 5269e3bda7e8..30626267ffac 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -30,6 +30,7 @@ struct TestingSetup {
     boost::thread_group threadGroup;
 
     TestingSetup() {
+        SetupEnvironment();
         fPrintToDebugLog = false; // don't want to write to debug.log file
         fCheckBlockIndex = true;
         SelectParams(CBaseChainParams::UNITTEST);

From 323de27f4b6a9673902cb414c3b0e3879b1366e7 Mon Sep 17 00:00:00 2001
From: dexX7 <dexx@bitwatch.co>
Date: Fri, 27 Mar 2015 01:33:34 +0100
Subject: [PATCH 1336/1819] Initialization: setup environment before starting
 QT tests

The environment is prepared by the main thread to guard against invalid locale settings.
---
 src/qt/test/test_main.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index f2161c2f7931..7d7282db1718 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -6,6 +6,7 @@
 #include "config/bitcoin-config.h"
 #endif
 
+#include "util.h"
 #include "uritests.h"
 
 #ifdef ENABLE_WALLET
@@ -27,6 +28,7 @@ Q_IMPORT_PLUGIN(qkrcodecs)
 // This is all you need to run all the tests
 int main(int argc, char *argv[])
 {
+    SetupEnvironment();
     bool fInvalid = false;
 
     // Don't remove this, it's needed to access

From 5873a5e5a3453ba4ebff9a2e47df716fbdbd70e5 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 19 Apr 2015 16:01:45 +0200
Subject: [PATCH 1337/1819] Included new "Peers list" tab into CSS theme

---
 src/qt/forms/rpcconsole.ui | 6 ++++--
 src/qt/res/css/drkblue.css | 4 ++++
 src/qt/rpcconsole.cpp      | 2 --
 src/qt/rpcconsole.h        | 4 ++--
 4 files changed, 10 insertions(+), 6 deletions(-)
 mode change 100644 => 100755 src/qt/forms/rpcconsole.ui

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
old mode 100644
new mode 100755
index 46c9b3dc6e96..9be3caea97fa
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>740</width>
+    <width>769</width>
     <height>485</height>
    </rect>
   </property>
@@ -717,6 +717,8 @@
          <property name="font">
           <font>
            <pointsize>10</pointsize>
+           <weight>75</weight>
+           <bold>true</bold>
           </font>
          </property>
          <property name="cursor">
@@ -726,7 +728,7 @@
           <string>Select a peer to view detailed information.</string>
          </property>
          <property name="alignment">
-          <set>Qt::AlignHCenter|Qt::AlignTop</set>
+          <set>Qt::AlignCenter</set>
          </property>
          <property name="wordWrap">
           <bool>true</bool>
diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index ce52e73afebb..f6e843e96335 100755
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -651,6 +651,10 @@ min-height:25px;
 min-width:180px;
 }
 
+QDialog#RPCConsole QWidget#tab_peers  QLabel#peerHeading { /* Peers Info Header */
+color:#3398CC;
+}
+
 QDialog#RPCConsole QPushButton#openDebugLogfileButton {
 max-width:60px;
 }
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index ffda9401438b..b6a21a632fa3 100755
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -233,7 +233,6 @@ RPCConsole::RPCConsole(QWidget *parent) :
     startExecutor();
     setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
 
-    ui->detailWidget->hide();
     ui->peerHeading->setText(tr("Select a peer to view detailed information."));
 
     clear();
@@ -596,7 +595,6 @@ void RPCConsole::peerLayoutChanged()
         // detail node dissapeared from table (node disconnected)
         fUnselect = true;
         cachedNodeid = -1;
-        ui->detailWidget->hide();
         ui->peerHeading->setText(tr("Select a peer to view detailed information."));
     }
     else
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 374c69645884..e20d8fec9f4d 100755
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -102,8 +102,8 @@ public slots:
 
     enum ColumnWidths
     {
-        ADDRESS_COLUMN_WIDTH = 200,
-        SUBVERSION_COLUMN_WIDTH = 100,
+        ADDRESS_COLUMN_WIDTH = 170,
+        SUBVERSION_COLUMN_WIDTH = 140,
         PING_COLUMN_WIDTH = 80
     };
 

From bac6fca3c91ba4c0e3c64d65c5c359b50036a2b6 Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Mon, 13 Apr 2015 12:26:28 -0400
Subject: [PATCH 1338/1819] Set nSequenceId when a block is fully linked

Also adds a test to CheckBlockIndex

Conflicts:
	src/main.cpp

Rebased-From: c1ecee8f723c2635fbd51100fa09acdb0cbec8a0
Github-Pull: #6010
---
 src/main.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4685c779a475..c37e1092ebf9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2319,10 +2319,6 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
     pindexNew->nUndoPos = 0;
     pindexNew->nStatus |= BLOCK_HAVE_DATA;
     pindexNew->RaiseValidity(BLOCK_VALID_TRANSACTIONS);
-    {
-         LOCK(cs_nBlockSequenceId);
-         pindexNew->nSequenceId = nBlockSequenceId++;
-    }
     setDirtyBlockIndex.insert(pindexNew);
 
     if (pindexNew->pprev == NULL || pindexNew->pprev->nChainTx) {
@@ -2335,6 +2331,10 @@ bool ReceivedBlockTransactions(const CBlock &block, CValidationState& state, CBl
             CBlockIndex *pindex = queue.front();
             queue.pop_front();
             pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
+            {
+                LOCK(cs_nBlockSequenceId);
+                pindex->nSequenceId = nBlockSequenceId++;
+            }
             if (chainActive.Tip() == NULL || !setBlockIndexCandidates.value_comp()(pindex, chainActive.Tip())) {
                 setBlockIndexCandidates.insert(pindex);
             }
@@ -3272,6 +3272,11 @@ void static CheckBlockIndex()
             assert(pindex->GetBlockHash() == Params().HashGenesisBlock()); // Genesis block's hash must match.
             assert(pindex == chainActive.Genesis()); // The current active chain's genesis block must be this block.
         }
+        // HAVE_DATA is equivalent to VALID_TRANSACTIONS and equivalent to nTx > 0 (we stored the number of transactions in the block)
+        assert(!(pindex->nStatus & BLOCK_HAVE_DATA) == (pindex->nTx == 0));
+        assert(((pindex->nStatus & BLOCK_VALID_MASK) >= BLOCK_VALID_TRANSACTIONS) == (pindex->nTx > 0));
+        if (pindex->nChainTx == 0) assert(pindex->nSequenceId == 0);  // nSequenceId can't be set for blocks that aren't linked
+        // All parents having data is equivalent to all parents being VALID_TRANSACTIONS, which is equivalent to nChainTx being set.
         assert((pindexFirstMissing != NULL) == (pindex->nChainTx == 0)); // nChainTx == 0 is used to signal that all parent block's transaction data is available.
         assert(pindex->nHeight == nHeight); // nHeight must be consistent.
         assert(pindex->pprev == NULL || pindex->nChainWork >= pindex->pprev->nChainWork); // For every block except the genesis block, the chainwork must be larger than the parent's.

From 139cd8177be4895f8b4c2befee35030bdf961326 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sun, 19 Apr 2015 11:47:56 -0700
Subject: [PATCH 1339/1819] Cap nAttempts penalty at 8 and switch to pow
 instead of a division loop.

On hosts that had spent some time with a failed internet connection their
 nAttempts penalty was going through the roof (e.g. thousands for all peers)
 and as a result the connect search was pegging the CPU and failing to get
 more than a 4 connections after days of running (because it was taking so
 long per try).

Rebased-From: a784f90c9892f06b9fea4e7579f5eca3585482c3
Github-Pull: #6029
---
 src/addrman.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/addrman.cpp b/src/addrman.cpp
index 015589343d73..ad7fa9bd51fe 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -67,9 +67,8 @@ double CAddrInfo::GetChance(int64_t nNow) const
     if (nSinceLastTry < 60 * 10)
         fChance *= 0.01;
 
-    // deprioritize 50% after each failed attempt
-    for (int n = 0; n < nAttempts; n++)
-        fChance /= 1.5;
+    // deprioritize 66% after each failed attempt, but at most 1/28th to avoid the search taking forever or overly penalizing outages.
+    fChance *= pow(0.66, min(nAttempts, 8));
 
     return fChance;
 }

From bf8ad0dc6b9c195cba7f432f7556e4ba78aa664a Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 20 Apr 2015 14:04:32 +0200
Subject: [PATCH 1340/1819] update release notes for 0.10.1rc3

---
 doc/release-notes.md | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 981e6244116d..cdb2369bbfab 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -59,6 +59,7 @@ behavior, not code moves, refactors or string updates.
 
 RPC:
 - `7f502be` fix crash: createmultisig and addmultisigaddress
+- `eae305f` Fix missing lock in submitblock
 
 Block (database) and transaction handling:
 - `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
@@ -66,6 +67,8 @@ Block (database) and transaction handling:
 - `002c8a2` fix possible block db breakage during re-index
 - `a1f425b` Add (optional) consistency check for the block chain data structures
 - `1c62e84` Keep mempool consistent during block-reorgs
+- `57d1f46` Fix CheckBlockIndex for reindex
+- `bac6fca` Set nSequenceId when a block is fully linked
 
 P2P protocol and network code:
 - `78f64ef` don't trickle for whitelisted nodes
@@ -77,6 +80,7 @@ P2P protocol and network code:
 - `0c6f334` Always use a 50% chance to choose between tried and new entries (countermeasure 2 against eclipse attacks)
 - `214154e` Do not bias outgoing connections towards fresh addresses (countermeasure 2 against eclipse attacks)
 - `aa587d4` Scale up addrman (countermeasure 6 against eclipse attacks)
+- `139cd81` Cap nAttempts penalty at 8 and switch to pow instead of a division loop
 
 Validation:
 - `d148f62` Acquire CCheckQueue's lock to avoid race condition
@@ -98,6 +102,9 @@ Tests:
 Miscellaneous:
 - `c9e022b` Initialization: set Boost path locale in main thread
 - `23126a0` Sanitize command strings before logging them.
+- `323de27` Initialization: setup environment before starting QT tests
+- `7494e09` Initialization: setup environment before starting tests
+- `df45564` Initialization: set fallback locale as environment variable
 
 Credits
 =======
@@ -113,6 +120,8 @@ Thanks to everyone who contributed to this release:
 - Ivan Pustogarov
 - Jonas Nick
 - Jonas Schnelli
+- Matt Corallo
+- mrbandrews
 - Pieter Wuille
 - Ruben de Vries
 - Suhas Daftuar

From d8ac90184254fea3a7f4991fd0529dfbd750aea0 Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Sat, 25 Apr 2015 10:04:50 +0200
Subject: [PATCH 1341/1819] doc: improve credits in release notes

---
 doc/release-notes.md | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index cdb2369bbfab..5e939600a06d 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -3,8 +3,7 @@ Bitcoin Core version 0.10.1 is now available from:
   <https://bitcoin.org/bin/bitcoin-core-0.10.1/>
 
 This is a new minor version release, bringing bug fixes and translation 
-updates. If you are using 0.10.0, it is recommended to upgrade to this
-version.
+updates. It is recommended to upgrade to this version.
 
 Please report bugs using the issue tracker at github:
 
@@ -109,7 +108,7 @@ Miscellaneous:
 Credits
 =======
 
-Thanks to everyone who contributed to this release:
+Thanks to everyone who directly contributed to this release:
 
 - Alex Morcos
 - Cory Fields
@@ -118,7 +117,6 @@ Thanks to everyone who contributed to this release:
 - Gavin Andresen
 - Gregory Maxwell
 - Ivan Pustogarov
-- Jonas Nick
 - Jonas Schnelli
 - Matt Corallo
 - mrbandrews
@@ -127,4 +125,19 @@ Thanks to everyone who contributed to this release:
 - Suhas Daftuar
 - Wladimir J. van der Laan
 
+And all those who contributed additional code review and/or security research:
+- 21E14
+- Alison Kendler
+- Aviv Zohar
+- Ethan Heilman
+- Evil-Knievel
+- fanquake
+- Jeff Garzik
+- Jonas Nick
+- Luke Dashjr
+- Patrick Strateman
+- Philip Kaufmann
+- Sergio Demian Lerner
+- Sharon Goldberg
+
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

From 24309f78cea8ba433afd6a7286eefe2cb239e77f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 29 Apr 2015 20:49:14 +0300
Subject: [PATCH 1342/1819] various (gitian) build fixes

---
 Makefile.am                                   |   2 +-
 contrib/dash-qt.pro                           |   8 +-
 contrib/gitian-descriptors/README.md          |   4 +-
 contrib/gitian-descriptors/gitian-linux.yml   |   2 +-
 .../gitian-descriptors/gitian-osx-dash.yml    |  60 ------
 .../gitian-descriptors/gitian-osx-depends.yml | 159 ---------------
 .../gitian-descriptors/gitian-osx-native.yml  | 178 -----------------
 contrib/gitian-descriptors/gitian-osx-qt.yml  | 186 ------------------
 contrib/gitian-descriptors/gitian-win.yml     |   2 +-
 doc/release-process.md                        |   1 -
 qa/pull-tester/tests-config.sh.in             |   4 +-
 src/Makefile.am                               |   3 +-
 src/Makefile.qt.include                       |   9 +-
 src/compat/glibcxx_compat.cpp                 |   2 -
 src/keepass.cpp                               |   4 +-
 src/qt/res/darkcoin-qt-res.rc                 |  39 ----
 src/test/Makefile                             |   6 +-
 17 files changed, 26 insertions(+), 643 deletions(-)
 delete mode 100755 contrib/gitian-descriptors/gitian-osx-dash.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-depends.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-native.yml
 delete mode 100644 contrib/gitian-descriptors/gitian-osx-qt.yml
 delete mode 100644 src/qt/res/darkcoin-qt-res.rc

diff --git a/Makefile.am b/Makefile.am
index f72960d093df..e5de3ac81938 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,7 +190,7 @@ check-local:
 	@qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
 endif
 
-EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-dash-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
+EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
 
 CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
 
diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro
index 2cbd48208a94..1f85e34052fe 100644
--- a/contrib/dash-qt.pro
+++ b/contrib/dash-qt.pro
@@ -1,5 +1,5 @@
 ######################################################################
-# Automatically generated by qmake (2.01a) ?? ??? 5 03:11:45 2015
+# Automatically generated by qmake (2.01a) ?? ??? 17 02:23:35 2015
 ######################################################################
 
 TEMPLATE = app
@@ -39,8 +39,8 @@ INCLUDEPATH += . \
                src/crypto \
                src/primitives \
                src/script \
-               src/univalue \
                src/obj \
+               src/univalue \
                src/json \
                src/compat \
                src/secp256k1/include \
@@ -88,6 +88,7 @@ HEADERS += src/activemasternode.h \
            src/leveldbwrapper.h \
            src/limitedmap.h \
            src/main.h \
+           src/masternode-payments.h \
            src/masternode-pos.h \
            src/masternode.h \
            src/masternodeconfig.h \
@@ -383,6 +384,7 @@ SOURCES += src/activemasternode.cpp \
            src/keystore.cpp \
            src/leveldbwrapper.cpp \
            src/main.cpp \
+           src/masternode-payments.cpp \
            src/masternode-pos.cpp \
            src/masternode.cpp \
            src/masternodeconfig.cpp \
@@ -477,7 +479,6 @@ SOURCES += src/activemasternode.cpp \
            src/qt/paymentrequestplus.cpp \
            src/qt/paymentserver.cpp \
            src/qt/peertablemodel.cpp \
-           src/qt/qrc_darkcoin.cpp \
            src/qt/qvalidatedlineedit.cpp \
            src/qt/qvaluecombobox.cpp \
            src/qt/receivecoinsdialog.cpp \
@@ -526,6 +527,7 @@ SOURCES += src/activemasternode.cpp \
            src/test/hash_tests.cpp \
            src/test/key_tests.cpp \
            src/test/main_tests.cpp \
+           src/test/mempool_tests.cpp \
            src/test/miner_tests.cpp \
            src/test/mruset_tests.cpp \
            src/test/multisig_tests.cpp \
diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md
index 161852b41528..faa1c4b194ee 100644
--- a/contrib/gitian-descriptors/README.md
+++ b/contrib/gitian-descriptors/README.md
@@ -20,7 +20,7 @@ Sanity checks:
 
 Once you've got the right hardware and software:
 
-    git clone git://github.com/darkcoin/darkcoin.git
+    git clone git://github.com/dashpay/dash.git
     git clone git://github.com/devrandom/gitian-builder.git
     mkdir gitian-builder/inputs
     cd gitian-builder/inputs
@@ -62,5 +62,5 @@ Here's a description of Gavin's setup on OSX 10.6:
 5. Still inside Ubuntu, tell gitian-builder to use LXC, then follow the "Once you've got the right hardware and software" instructions above:
 
 	export USE_LXC=1
-	git clone git://github.com/darkcoin/darkcoin.git
+	git clone git://github.com/dashpay/dash.git
 	... etc
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index d53b5404bff9..0ea147532849 100755
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,5 +1,5 @@
 ---
-name: "dash-linux-0.10"
+name: "dash-linux-0.12"
 enable_cache: true
 suites:
 - "precise"
diff --git a/contrib/gitian-descriptors/gitian-osx-dash.yml b/contrib/gitian-descriptors/gitian-osx-dash.yml
deleted file mode 100755
index 6228b6a8d668..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-dash.yml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-name: "dash"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "faketime"
-- "bsdmainutils"
-- "pkg-config"
-- "p7zip-full"
-
-reference_datetime: "2014-01-10 00:00:00"
-remotes:
-- "url": "https://github.com/darkcoin/darkcoin.git"
-  "dir": "dash"
-files:
-- "osx-native-depends-r3.tar.gz"
-- "osx-depends-r7.tar.gz"
-- "osx-depends-qt-5.2.1-r6.tar.gz"
-- "MacOSX10.7.sdk.tar.gz"
-
-script: |
-
-  HOST=x86_64-apple-darwin11
-  PREFIX=`pwd`/osx-cross-depends/prefix
-  SDK=`pwd`/osx-cross-depends/SDKs/MacOSX10.7.sdk
-  NATIVEPREFIX=`pwd`/osx-cross-depends/native-prefix
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-
-  export SOURCES_PATH=`pwd`
-
-  mkdir -p osx-cross-depends/SDKs
-
-  tar -C osx-cross-depends/SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar -C osx-cross-depends -xf osx-native-depends-r3.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-r7.tar.gz
-  tar -C osx-cross-depends -xf osx-depends-qt-5.2.1-r6.tar.gz
-  export PATH=`pwd`/osx-cross-depends/native-prefix/bin:$PATH
-
-  cd dash
-
-  export ZERO_AR_DATE=1
-  export QT_RCC_TEST=1
-  ./autogen.sh
-  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig" --disable-dependency-tracking --disable-maintainer-mode
-  make dist
-  mkdir -p distsrc
-  cd distsrc
-  tar --strip-components=1 -xf ../dash-*.tar*
-  ./configure --host=${HOST} --with-boost=${PREFIX} CC=clang CXX=clang++ OBJC=clang OBJCXX=clang++ CFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" CXXFLAGS="-target ${HOST} -mmacosx-version-min=10.6 --sysroot ${SDK} -msse2 -Qunused-arguments" LDFLAGS="-B${NATIVEPREFIX}/bin -L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1" CPPFLAGS="-I${NATIVEPREFIX}/lib/clang/3.2/include -I${PREFIX}/include" SSL_LIBS="-lz -lssl -lcrypto" --disable-tests -with-gui=qt5 PKG_CONFIG_LIBDIR="${PREFIX}/lib/pkgconfig"  --disable-dependency-tracking --disable-maintainer-mode
-  make $MAKEOPTS
-  export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-  make deploy
-  dmg dmg Dash-Qt.dmg $OUTDIR/Dash-Qt.dmg
diff --git a/contrib/gitian-descriptors/gitian-osx-depends.yml b/contrib/gitian-descriptors/gitian-osx-depends.yml
deleted file mode 100644
index 83abc08f0d4a..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-depends.yml
+++ /dev/null
@@ -1,159 +0,0 @@
----
-name: "osx-depends"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "p7zip-full"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "boost_1_55_0.tar.bz2"
-- "db-4.8.30.NC.tar.gz"
-- "miniupnpc-1.9.20140701.tar.gz"
-- "openssl-1.0.1k.tar.gz"
-- "protobuf-2.5.0.tar.bz2"
-- "qrencode-3.4.3.tar.bz2"
-- "MacOSX10.7.sdk.tar.gz"
-- "osx-native-depends-r3.tar.gz"
-
-script: |
-
-  echo "fff00023dd79486d444c8e29922f4072e1d451fc5a4d2b6075852ead7f2b7b52  boost_1_55_0.tar.bz2" | sha256sum -c
-  echo "12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef  db-4.8.30.NC.tar.gz" | sha256sum -c
-  echo "26f3985bad7768b8483b793448ae49414cdc4451d0ec83e7c1944367e15f9f07  miniupnpc-1.9.20140701.tar.gz"   | sha256sum -c
-  echo "8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c  openssl-1.0.1k.tar.gz" | sha256sum -c
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "dfd71487513c871bad485806bfd1fdb304dedc84d2b01a8fb8e0940b50597a98  qrencode-3.4.3.tar.bz2" | sha256sum -c
-
-  REVISION=r7
-  export SOURCES_PATH=`pwd`
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export PATH=$HOME:$PATH
-  export SOURCES_PATH=`pwd`
-  export ZERO_AR_DATE=1
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  PREFIX=`pwd`/prefix
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
-  INT_CXXFLAGS="${INT_CFLAGS}"
-  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
-  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
-  INT_CPPFLAGS="-I${PREFIX}/include"
-  INT_CC=clang
-  INT_CXX=clang++
-  INT_OBJC=clang
-  INT_OBJCXX=clang++
-  INT_AR=${HOST}-ar
-  INT_RANLIB=${HOST}-ranlib
-  INT_LIBTOOL=${HOST}-libtool
-  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-  mkdir -p ${PREFIX}/bin
-  mkdir -p ${PREFIX}/lib
-  mkdir -p ${BUILD_BASE}
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
-
-  # bdb
-  SOURCE_FILE=${SOURCES_PATH}/db-4.8.30.NC.tar.gz
-  BUILD_DIR=${BUILD_BASE}/db-4.8.30.NC
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  sed -i 's/__atomic_compare_exchange/__atomic_compare_exchange_db/g' ${BUILD_DIR}/dbinc/atomic.h
-  pushd ${BUILD_DIR}
-  cd build_unix;
-  ../dist/configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}"
-  make $MAKEOPTS libdb.a libdb_cxx.a
-  make  install_lib install_include
-  popd
-
-  # openssl
-  SOURCE_FILE=${SOURCES_PATH}/openssl-1.0.1k.tar.gz
-  BUILD_DIR=${BUILD_BASE}/openssl-1.0.1k
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  sed -ie "s|cc:|${INT_CC}:|" ${BUILD_DIR}/Configure
-  sed -ie "s|\(-arch [_a-zA-Z0-9]*\)|\1 --sysroot ${SDK}  -target ${HOST} -msse2|" ${BUILD_DIR}/Configure
-  AR="${INT_AR}" RANLIB="${INT_RANLIB}" ./Configure --prefix=${PREFIX} --openssldir=${PREFIX}/etc/openssl zlib shared no-krb5 darwin64-x86_64-cc ${INT_LDFLAGS} ${INT_CLANG_LDFLAGS} ${INT_CPPFLAGS}
-  sed -i "s|engines apps test|engines|" ${BUILD_DIR}/Makefile
-  sed -i "/define DATE/d" ${BUILD_DIR}/crypto/Makefile
-  make -j1 build_libs libcrypto.pc libssl.pc openssl.pc
-  make -j1 install_sw
-  popd
-
-  #libminiupnpc
-  SOURCE_FILE=${SOURCES_PATH}/miniupnpc-1.9.20140701.tar.gz
-  BUILD_DIR=${BUILD_BASE}/miniupnpc-1.9.20140701
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  CFLAGS="${INT_CFLAGS} ${INT_CPPFLAGS}" make $MAKEOPTS OS=Darwin CC="${INT_CC}" AR="${INT_AR}" libminiupnpc.a
-  install -d ${PREFIX}/include/miniupnpc
-  install *.h ${PREFIX}/include/miniupnpc
-  install libminiupnpc.a  ${PREFIX}/lib
-  popd
-
-  # qrencode
-  SOURCE_FILE=${SOURCES_PATH}/qrencode-3.4.3.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/qrencode-3.4.3
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-
-  # m4 folder is not included in the stable release, which can confuse aclocal
-  # if its timestamp ends up being earlier than configure.ac when extracted
-  touch aclocal.m4
-  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --disable-shared -without-tools --disable-sdltest --disable-dependency-tracking
-  make $MAKEOPTS
-  make install
-  popd
-
-  # libprotobuf
-  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
-
-  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  ./configure --host=${HOST} --prefix="${PREFIX}" --disable-shared --enable-cxx CC="${INT_CC}" CXX="${INT_CXX}" AR="${INT_AR}" RANLIB="${INT_RANLIB}" OBJC="${INT_OBJC}" OBJCXX="${INT_OBJCXX}" CFLAGS="${INT_CFLAGS}" CXXFLAGS="${INT_CXXFLAGS}" LDFLAGS="${INT_CLANG_LDFLAGS} ${INT_LDFLAGS}" CPPFLAGS="${INT_CPPFLAGS}" --enable-shared=no --disable-dependency-tracking --with-protoc=${NATIVEPREFIX}/bin/protoc
-  cd src
-  make $MAKEOPTS libprotobuf.la
-  make install-libLTLIBRARIES install-nobase_includeHEADERS
-  cd ..
-  make install-pkgconfigDATA
-  popd
-
-  # boost
-  SOURCE_FILE=${SOURCES_PATH}/boost_1_55_0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/boost_1_55_0
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  ./bootstrap.sh --with-libraries=chrono,filesystem,program_options,system,thread,test
-  echo "using darwin : : ${INT_CXX} : <cxxflags>\"${INT_CFLAGS} ${INT_CPPFLAGS}\" <linkflags>\"${INT_LDFLAGS} ${INT_CLANG_LDFLAGS}\" <archiver>\"${INT_LIBTOOL}\" <striper>\"${INT_STRIP}\" : ;" > "user-config.jam"
-  ./b2 -d2 --layout=tagged --build-type=complete --prefix="${PREFIX}" --toolset=darwin-4.2.1 --user-config=user-config.jam variant=release threading=multi link=static install
-  popd
-
-  export GZIP="-9n"
-  find prefix | sort | tar --no-recursion -czf osx-depends-${REVISION}.tar.gz -T -
-
-  mv osx-depends-${REVISION}.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-native.yml b/contrib/gitian-descriptors/gitian-osx-native.yml
deleted file mode 100644
index a753ad704ffe..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-native.yml
+++ /dev/null
@@ -1,178 +0,0 @@
----
-name: "osx-native"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "faketime"
-- "libssl-dev"
-- "libbz2-dev"
-- "libz-dev"
-- "cmake"
-- "libcap-dev"
-- "p7zip-full"
-- "uuid-dev"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "10cc648683617cca8bcbeae507888099b41b530c.tar.gz"
-- "cctools-809.tar.gz"
-- "dyld-195.5.tar.gz"
-- "ld64-127.2.tar.gz"
-- "protobuf-2.5.0.tar.bz2"
-- "MacOSX10.7.sdk.tar.gz"
-- "cdrkit-1.1.11.tar.gz"
-- "libdmg-hfsplus-v0.1.tar.gz"
-- "clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz"
-- "cdrkit-deterministic.patch"
-
-
-script: |
-
-  echo "18406961fd4a1ec5c7ea35c91d6a80a2f8bb797a2bd243a610bd75e13eff9aca  10cc648683617cca8bcbeae507888099b41b530c.tar.gz" | sha256sum -c
-  echo "03ba62749b843b131c7304a044a98c6ffacd65b1399b921d69add0375f79d8ad  cctools-809.tar.gz" | sha256sum -c
-  echo "2cf0484c87cf79b606b351a7055a247dae84093ae92c747a74e0cde2c8c8f83c  dyld-195.5.tar.gz" | sha256sum -c
-  echo "97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142  ld64-127.2.tar.gz" | sha256sum -c
-  echo "13bfc5ae543cf3aa180ac2485c0bc89495e3ae711fc6fab4f8ffe90dfb4bb677  protobuf-2.5.0.tar.bz2" | sha256sum -c
-  echo "d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da  cdrkit-1.1.11.tar.gz" | sha256sum -c
-  echo "6569a02eb31c2827080d7d59001869ea14484c281efab0ae7f2b86af5c3120b3  libdmg-hfsplus-v0.1.tar.gz" | sha256sum -c
-  echo "b9d57a88f9514fa1f327a1a703756d0c1c960f4c58494a5bd80313245d13ffff  clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz" | sha256sum -c
-  echo "cc12bdbd7a09f71cb2a6a3e6ec3e0abe885ca7111c2b47857f5095e5980caf4f  cdrkit-deterministic.patch" | sha256sum -c
-
-
-  REVISION=r3
-  export REFERENCE_DATETIME
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export FAKETIME=$REFERENCE_DATETIME
-  export TZ=UTC
-
-  REAL_AR=`which ar`
-  REAL_RANLIB=`which ranlib`
-  REAL_DATE=`which date`
-
-  echo '#!/bin/bash' > $HOME/ar
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ar
-  echo "$REAL_AR \"\$@\"" >> $HOME/ar
-
-  echo '#!/bin/bash' > $HOME/ranlib
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/ranlib
-  echo "$REAL_RANLIB \"\$@\"" >> $HOME/ranlib
-
-  echo '#!/bin/bash' > $HOME/date
-  echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> $HOME/date
-  echo "$REAL_DATE \"\$@\"" >> $HOME/date
-
-  chmod +x $HOME/ar $HOME/ranlib $HOME/date
-
-
-  export PATH=$HOME:$PATH
-  export SOURCES_PATH=`pwd`
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  CFLAGS=""
-  CXXFLAGS="${CFLAGS}"
-  LDFLAGS="-L${NATIVEPREFIX}/lib"
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  #  Clang
-  SOURCE_FILE=${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-  BUILD_DIR=${BUILD_BASE}/clang+llvm-3.2-x86-linux-ubuntu-12.04
-
-  mkdir -p ${NATIVEPREFIX}/lib/clang/3.2/include
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  cp ${BUILD_DIR}/bin/clang ${NATIVEPREFIX}/bin/
-  cp ${BUILD_DIR}/bin/clang++ ${NATIVEPREFIX}/bin/
-  cp ${BUILD_DIR}/lib/libLTO.so ${NATIVEPREFIX}/lib/
-  cp ${BUILD_DIR}/lib/clang/3.2/include/* ${NATIVEPREFIX}/lib/clang/3.2/include
-
-  # cctools
-  SOURCE_FILE=${SOURCES_PATH}/10cc648683617cca8bcbeae507888099b41b530c.tar.gz
-  BUILD_DIR=${BUILD_BASE}/toolchain4-10cc648683617cca8bcbeae507888099b41b530c
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  mkdir -p ${BUILD_DIR}/sdks
-  pushd ${BUILD_DIR}/sdks;
-  ln -sf ${SDK} MacOSX10.7.sdk
-  ln -sf ${SOURCES_PATH}/cctools-809.tar.gz ${BUILD_DIR}/cctools2odcctools/cctools-809.tar.gz
-  ln -sf ${SOURCES_PATH}/ld64-127.2.tar.gz ${BUILD_DIR}/cctools2odcctools/ld64-127.2.tar.gz
-  ln -sf ${SOURCES_PATH}/dyld-195.5.tar.gz ${BUILD_DIR}/cctools2odcctools/dyld-195.5.tar.gz
-
-  tar -C ${BUILD_DIR} -xf ${SOURCES_PATH}/clang-llvm-3.2-x86-linux-ubuntu-12.04.tar.gz
-  #   Hack in the use of our llvm headers rather than grabbing the old llvm-gcc.
-  sed -i "s|GCC_DIR|LLVM_CLANG_DIR|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
-  sed -i "s|llvmgcc42-2336.1|clang+llvm-3.2-x86-linux-ubuntu-12.04|g" ${BUILD_DIR}/cctools2odcctools/extract.sh
-  sed -i "s|\${LLVM_CLANG_DIR}/llvmCore/include/llvm-c|\${LLVM_CLANG_DIR}/include/llvm-c \${LLVM_CLANG_DIR}/include/llvm |" ${BUILD_DIR}/cctools2odcctools/extract.sh
-
-  sed -i "s|fAC_INIT|AC_INIT|" ${BUILD_DIR}/cctools2odcctools/files/configure.ac
-  sed -i 's/\# Dynamically linked LTO/\t ;\&\n\t linux*)\n# Dynamically linked LTO/' ${BUILD_DIR}/cctools2odcctools/files/configure.ac
-
-  cd ${BUILD_DIR}/cctools2odcctools
-  ./extract.sh --osxver 10.7
-  cd odcctools-809
-  ./configure --prefix=${NATIVEPREFIX} --target=${HOST} CFLAGS="${CFLAGS} -I${NATIVEPREFIX}/include -D__DARWIN_UNIX03 -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS" LDFLAGS="${LDFLAGS} -Wl,-rpath=\\\$\$ORIGIN/../lib" --with-sysroot=${SDK}
-
-  #   The 'PC' define in sparc/reg.h conflicts but doesn't get used anyway. Just rename it.
-  sed -i "s|define\tPC|define\tPC_|"  ${BUILD_DIR}/cctools2odcctools/odcctools-809/include/architecture/sparc/reg.h
-  make $MAKEOPTS
-  make install
-  popd
-
-  # protoc
-  SOURCE_FILE=${SOURCES_PATH}/protobuf-2.5.0.tar.bz2
-  BUILD_DIR=${BUILD_BASE}/protobuf-2.5.0
-
-  tar -C ${BUILD_BASE} -xjf ${SOURCE_FILE}
-  pushd ${BUILD_DIR};
-  ./configure --enable-shared=no --disable-dependency-tracking --prefix=${NATIVEPREFIX}
-  make $MAKEOPTS
-  cp ${BUILD_DIR}/src/protoc ${NATIVEPREFIX}/bin/
-  popd
-
-  # cdrkit
-  SOURCE_FILE=${SOURCES_PATH}/cdrkit-1.1.11.tar.gz
-  BUILD_DIR=${BUILD_BASE}/cdrkit-1.1.11
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  pushd ${BUILD_DIR}
-  patch -p1 < ${SOURCES_PATH}/cdrkit-deterministic.patch
-  cmake -DCMAKE_INSTALL_PREFIX=${NATIVEPREFIX}
-  make $MAKEOPTS genisoimage
-  make -C genisoimage install
-  popd
-
-  # libdmg-hfsplus
-  SOURCE_FILE=${SOURCES_PATH}/libdmg-hfsplus-v0.1.tar.gz
-  BUILD_DIR=${BUILD_BASE}/libdmg-hfsplus-libdmg-hfsplus-v0.1
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-  mkdir -p ${BUILD_DIR}/build
-  pushd ${BUILD_DIR}/build
-  cmake -DCMAKE_INSTALL_PREFIX:PATH=${NATIVEPREFIX}/bin ..
-  make $MAKEOPTS
-  make install
-  popd
-
-  rm -rf native-prefix/docs
-
-  export GZIP="-9n"
-  find native-prefix | sort | tar --no-recursion -czf osx-native-depends-$REVISION.tar.gz -T -
-  mv osx-native-depends-$REVISION.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-osx-qt.yml b/contrib/gitian-descriptors/gitian-osx-qt.yml
deleted file mode 100644
index 8f63e1b091ec..000000000000
--- a/contrib/gitian-descriptors/gitian-osx-qt.yml
+++ /dev/null
@@ -1,186 +0,0 @@
----
-name: "osx-qt"
-suites:
-- "precise"
-architectures:
-- "i386"
-packages:
-- "git-core"
-- "automake"
-- "p7zip-full"
-
-reference_datetime: "2013-06-01 00:00:00"
-remotes: []
-files:
-- "qt-everywhere-opensource-src-5.2.1.tar.gz"
-- "osx-native-depends-r3.tar.gz"
-- "osx-depends-r7.tar.gz"
-- "MacOSX10.7.sdk.tar.gz"
-
-script: |
-
-  echo "84e924181d4ad6db00239d87250cc89868484a14841f77fb85ab1f1dbdcd7da1  qt-everywhere-opensource-src-5.2.1.tar.gz" | sha256sum -c
-
-  REVISION=r6
-  export SOURCES_PATH=`pwd`
-  export TAR_OPTIONS="-m --mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
-  export ZERO_AR_DATE=1
-
-  export TZ=UTC
-
-  REAL_DATE=`which date`
-  echo '#!/bin/bash' > $HOME/date
-  echo "$REAL_DATE -d \"${REFERENCE_DATETIME}\" \"\$@\"" >> $HOME/date
-
-  chmod +x $HOME/date
-  export PATH=$HOME:$PATH
-
-  mkdir -p osx-cross-depends/build
-  cd osx-cross-depends
-
-  PREFIX=`pwd`/prefix
-  NATIVEPREFIX=`pwd`/native-prefix
-  BUILD_BASE=`pwd`/build
-  SDK=`pwd`/SDKs/MacOSX10.7.sdk
-  HOST=x86_64-apple-darwin11
-  MIN_VERSION=10.6
-
-  INT_CFLAGS="-target ${HOST} -mmacosx-version-min=${MIN_VERSION} --sysroot ${SDK} -msse2 -Qunused-arguments"
-  INT_CXXFLAGS="${INT_CFLAGS}"
-  INT_LDFLAGS="-L${PREFIX}/lib -L${SDK}/usr/lib/i686-apple-darwin10/4.2.1"
-  INT_LDFLAGS_CLANG="-B${NATIVEPREFIX}/bin"
-  INT_CPPFLAGS="-I${PREFIX}/include"
-  INT_CC=clang
-  INT_CXX=clang++
-  INT_OBJC=clang
-  INT_OBJCXX=clang++
-  INT_AR=${HOST}-ar
-  INT_RANLIB=${HOST}-ranlib
-  INT_LIBTOOL=${HOST}-libtool
-  INT_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  export PATH=${NATIVEPREFIX}/bin:${PATH}
-
-  mkdir -p ${NATIVEPREFIX}/bin
-  mkdir -p ${NATIVEPREFIX}/lib
-  mkdir -p ${PREFIX}/bin
-  mkdir -p ${PREFIX}/lib
-  mkdir -p ${BUILD_BASE}
-
-  mkdir -p SDKs
-  tar -C SDKs -xf ${SOURCES_PATH}/MacOSX10.7.sdk.tar.gz
-
-  tar xf /home/ubuntu/build/osx-native-depends-r3.tar.gz
-
-  export PATH=`pwd`/native-prefix/bin:$PATH
-  tar xf /home/ubuntu/build/osx-depends-r7.tar.gz
-
-  SOURCE_FILE=${SOURCES_PATH}/qt-everywhere-opensource-src-5.2.1.tar.gz
-  BUILD_DIR=${BUILD_BASE}/qt-everywhere-opensource-src-5.2.1
-
-
-  tar -C ${BUILD_BASE} -xf ${SOURCE_FILE}
-
-  # Install our mkspec. All files are pulled from the macx-clang spec, except for
-  # our custom qmake.conf
-  SPECFILE=${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/qmake.conf
-
-  mkdir -p ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.lib ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/Info.plist.app ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-  cp -f ${BUILD_DIR}/qtbase/mkspecs/macx-clang/qplatformdefs.h ${BUILD_DIR}/qtbase/mkspecs/macx-clang-linux/
-
-  cat > ${SPECFILE} <<ENDCONF
-
-  MAKEFILE_GENERATOR      = UNIX
-  CONFIG                 += app_bundle incremental global_init_link_order lib_version_first plugin_no_soname absolute_library_soname
-  QMAKE_INCREMENTAL_STYLE = sublib
-
-  include(../common/macx.conf)
-  include(../common/gcc-base-mac.conf)
-  include(../common/clang.conf)
-  include(../common/clang-mac.conf)
-
-  QMAKE_XCODE_VERSION=4.3
-  QMAKE_XCODE_DEVELOPER_PATH=/Developer
-
-  QMAKE_MACOSX_DEPLOYMENT_TARGET = ${MIN_VERSION}
-
-  QMAKE_MAC_SDK=macosx
-  QMAKE_MAC_SDK.macosx.path = ${SDK}
-  QMAKE_MAC_SDK.macosx.platform_name = macosx
-  QMAKE_MAC_SDK_PATH=${SDK}
-
-  QMAKE_CFLAGS += -target ${HOST}
-  QMAKE_OBJECTIVE_CFLAGS += -target ${HOST}
-  QMAKE_CXXFLAGS += -target ${HOST}
-
-  QMAKE_LFLAGS += -target ${HOST}
-  QMAKE_AR = ${HOST}-ar cq
-  QMAKE_RANLIB=${HOST}-ranlib
-  QMAKE_LIBTOOL=${HOST}-libtool
-  QMAKE_INSTALL_NAME_TOOL=${HOST}-install_name_tool
-
-  load(qt_config)
-
-  ENDCONF
-
-  pushd ${BUILD_DIR}
-  ./configure -release -opensource -openssl-linked \
-  -no-audio-backend  -no-javascript-jit -no-sql-sqlite -no-sql-tds \
-  -no-cups -no-iconv -no-dbus -no-gif -no-audio-backend -no-freetype \
-  -no-javascript-jit -no-sql-sqlite -no-nis -no-cups -no-iconv -no-pch \
-  -no-dbus -no-gif -no-sm -nomake examples -no-feature-style-plastique \
-  -no-xcb -no-qml-debug -no-pch -no-nis \
-  -no-feature-style-cde -no-feature-style-s60 -no-feature-style-motif \
-  -no-feature-style-windowsmobile -no-feature-style-windowsce \
-  -no-feature-style-cleanlooks \
-  -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-tds -no-sql-mysql \
-  -no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
-  -skip qtsvg -skip qtwebkit -skip qtwebkit-examples -skip qtserialport \
-  -skip qtdeclarative -skip qtmultimedia -skip qtimageformats \
-  -skip qtlocation -skip qtsensors -skip qtquick1 -skip qtxmlpatterns \
-  -skip qtquickcontrols -skip qtactiveqt -skip qtconnectivity \
-  -skip qtwinextras -skip qtscript \
-  -prefix ${PREFIX} -bindir ${NATIVEPREFIX}/bin \
-  -confirm-license -xplatform macx-clang-linux -v ${INT_LDFLAGS}
-
-  # RCC's output is sorted using each file entry's hash as the key. Unfortunately,
-  # the hash function uses a random seed for each run so the results aren't
-  # deterministic. This leads to static resources being defined in a random order,
-  # which in-turn means that object files are not predictable.
-  # Fortunately, this upsets Qt's unit tests as well, so they've added the
-  # QT_RCC_TEST environment variable to set a pre-defined seed. Here, do the same
-  # thing for the same reason.
-  QT_RCC_TEST=1 make $MAKEOPTS module-qtbase-make_first
-
-
-  make $MAKEOPTS module-qttranslations-make_first
-  make $MAKEOPTS module-qttools-make_first
-  make $MAKEOPTS -C qtbase
-  make -C qtbase install
-  make -C qttranslations install
-  make -C qttools/src/linguist install
-  popd
-
-  # This file should not be installed to the destination. It's native and
-  # non-deterministic. Remove it.
-  # See: https://bugreports.qt-project.org/browse/QTBUG-31393
-  rm -f ${PREFIX}/lib/libQt5Bootstrap.a
-
-  rm -f ${PREFIX}/lib/Qt*.framework/Qt*.prl
-  pushd ${PREFIX}/include
-  ln -sf ../lib/QtNetwork.framework/Headers/ QtNetwork
-  ln -sf ../lib/QtWidgets.framework/Headers/ QtWidgets
-  ln -sf ../lib/QtGui.framework/Headers/ QtGui
-  ln -sf ../lib/QtCore.framework/Headers/ QtCore
-  ln -sf ../lib/QtTest.framework/Headers/ QtTest
-  popd
-
-  rm -f ${PREFIX}/lib/*.la
-  find ${PREFIX}/lib -name "*.prl" -delete
-
-  export GZIP="-9n"
-  find native-prefix prefix | sort | tar --no-recursion -czf osx-depends-qt-5.2.1-${REVISION}.tar.gz -T -
-
-  mv osx-depends-qt-5.2.1-${REVISION}.tar.gz $OUTDIR
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index fcd43b44910a..9ca5ab6e496d 100755
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,5 +1,5 @@
 ---
-name: "dash-win-0.10"
+name: "dash-win-0.12"
 enable_cache: true
 suites:
 - "precise"
diff --git a/doc/release-process.md b/doc/release-process.md
index cbe885027a4d..250eb63b80c9 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -37,7 +37,6 @@ Release Process
 	git checkout v${VERSION}
 	popd
 	pushd ./gitian-builder
-        mkdir -p inputs; cd inputs/
 
 ###fetch and build inputs: (first time, or when dependency versions change)
  
diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in
index 10f4d33e47cf..e64e80a14be7 100755
--- a/qa/pull-tester/tests-config.sh.in
+++ b/qa/pull-tester/tests-config.sh.in
@@ -11,6 +11,6 @@ EXEEXT="@EXEEXT@"
 @BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
 @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
 
-REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
-REAL_BITCOINCLI="$BUILDDIR/src/bitcoin-cli${EXEEXT}"
+REAL_BITCOIND="$BUILDDIR/src/dashd${EXEEXT}"
+REAL_BITCOINCLI="$BUILDDIR/src/dash-cli${EXEEXT}"
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f0be328eb4a..f0e61505d3e4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -359,7 +359,7 @@ dashd_SOURCES = dashd.cpp
 #
 
 if TARGET_WINDOWS
-dashd_SOURCES += dash-res.rc
+dashd_SOURCES += dashd-res.rc
 endif
 
 dashd_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
@@ -403,6 +403,7 @@ dash_cli_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
 if BUILD_BITCOIN_LIBS
 include_HEADERS = script/bitcoinconsensus.h
 libbitcoinconsensus_la_SOURCES = \
+  allocators.cpp \
   primitives/transaction.cpp \
   crypto/hmac_sha512.cpp \
   crypto/sha1.cpp \
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 921ec43707f5..d3b8412f0fd2 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -176,6 +176,7 @@ RES_ICONS = \
   qt/res/icons/bitcoin.png \
   qt/res/icons/bitcoin_testnet.ico \
   qt/res/icons/bitcoin_testnet.png \
+  qt/res/icons/browse.png \
   qt/res/icons/clock1.png \
   qt/res/icons/clock2.png \
   qt/res/icons/clock3.png \
@@ -188,6 +189,10 @@ RES_ICONS = \
   qt/res/icons/connect3_16.png \
   qt/res/icons/connect4_16.png \
   qt/res/icons/debugwindow.png \
+  qt/res/icons/drkblue_editpaste.png \
+  qt/res/icons/drkblue_address-book.png \
+  qt/res/icons/drkblue_editcopy.png \
+  qt/res/icons/drkblue_remove.png \
   qt/res/icons/edit.png \
   qt/res/icons/editcopy.png \
   qt/res/icons/editpaste.png \
@@ -300,7 +305,7 @@ qt_libbitcoinqt_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(BITCOIN_QT_INCLUDES) \
   $(QT_INCLUDES) $(QT_DBUS_INCLUDES) $(PROTOBUF_CFLAGS) $(QR_CFLAGS)
 
 qt_libbitcoinqt_a_SOURCES = $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(QT_FORMS_UI) \
-  $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES)
+  $(QT_QRC) $(QT_QRC_LOCALE) $(QT_TS) $(PROTOBUF_PROTO) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES)
 
 nodist_qt_libbitcoinqt_a_SOURCES = $(QT_MOC_CPP) $(QT_MOC) $(PROTOBUF_CC) \
   $(PROTOBUF_H) $(QT_QRC_CPP) $(QT_QRC_LOCALE_CPP)
@@ -357,7 +362,7 @@ $(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
 	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name dash_locale $(@D)/$(<F) | \
 	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
 
-$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
+$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_CSS) $(RES_MOVIES) $(PROTOBUF_H)
 	@test -f $(RCC)
 	$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name dash $< | \
 	  $(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
diff --git a/src/compat/glibcxx_compat.cpp b/src/compat/glibcxx_compat.cpp
index 08f0cfa991f2..e0b4ac51f59a 100644
--- a/src/compat/glibcxx_compat.cpp
+++ b/src/compat/glibcxx_compat.cpp
@@ -65,8 +65,6 @@ out_of_range::~out_of_range() _GLIBCXX_USE_NOEXCEPT {}
 
 length_error::~length_error() _GLIBCXX_USE_NOEXCEPT {}
 
-length_error::~length_error() _GLIBCXX_USE_NOEXCEPT { }
-
 // Used with permission.
 // See: https://github.com/madlib/madlib/commit/c3db418c0d34d6813608f2137fef1012ce03043d
 
diff --git a/src/keepass.cpp b/src/keepass.cpp
index a22bdad607d9..a6e50e397496 100644
--- a/src/keepass.cpp
+++ b/src/keepass.cpp
@@ -5,10 +5,10 @@
 #include "keepass.h"
 
 #include <exception>
-#include <openssl/rand.h>
+// #include <openssl/rand.h>
 #include <boost/lexical_cast.hpp>
 #include <boost/foreach.hpp>
-//#include <boost/asio.hpp>
+// #include <boost/asio.hpp>
 
 #include "json/json_spirit_writer_template.h"
 #include "json/json_spirit_reader_template.h"
diff --git a/src/qt/res/darkcoin-qt-res.rc b/src/qt/res/darkcoin-qt-res.rc
deleted file mode 100644
index e8329f756c90..000000000000
--- a/src/qt/res/darkcoin-qt-res.rc
+++ /dev/null
@@ -1,39 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "icons/bitcoin.ico"
-IDI_ICON2 ICON DISCARDABLE "icons/bitcoin_testnet.ico"
-
-#include <windows.h>             // needed for VERSIONINFO
-#include "../../clientversion.h" // holds the needed client version information
-
-#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
-#define COPYRIGHT_STR          "2009-" STRINGIZE(COPYRIGHT_YEAR) " The Bitcoin and Dash developers"
-
-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",        "Dash"
-            VALUE "FileDescription",    "Dash Core (OSS GUI client for Dash)"
-            VALUE "FileVersion",        VER_FILEVERSION_STR
-            VALUE "InternalName",       "dash-qt"
-            VALUE "LegalCopyright",     COPYRIGHT_STR
-            VALUE "LegalTrademarks1",   "Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
-            VALUE "OriginalFilename",   "dash-qt.exe"
-            VALUE "ProductName",        "Dash Core"
-            VALUE "ProductVersion",     VER_PRODUCTVERSION_STR
-        END
-    END
-
-    BLOCK "VarFileInfo"
-    BEGIN
-        VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
-    END
-END
diff --git a/src/test/Makefile b/src/test/Makefile
index 87bf73fec98d..a8fb61559b13 100644
--- a/src/test/Makefile
+++ b/src/test/Makefile
@@ -1,6 +1,6 @@
 all:
-	$(MAKE) -C .. bitcoin_test
+	$(MAKE) -C .. dash_test
 clean:
-	$(MAKE) -C .. bitcoin_test_clean
+	$(MAKE) -C .. dash_test_clean
 check:
-	$(MAKE) -C .. bitcoin_test_check
+	$(MAKE) -C .. dash_test_check

From 969826c249195c731e0ab46ad2d8375fe6f78ed7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Wed, 22 Apr 2015 07:33:44 -0700
Subject: [PATCH 1343/1819] Reference Node / Stubbed Out Budget System

- Removed of reference node and replaced with decentralized quorums that pick the masternodes who get paid each block.
- Made a budgeting system, where masternodes can vote on individual budgets and the data is stored perminently on each clients computer
---
 contrib/dash-qt.pro                        |   3 +-
 src/Makefile.am                            |   5 +-
 src/darksend.cpp                           |   1 +
 src/init.cpp                               |   8 +-
 src/main.cpp                               | 111 ++--
 src/masternode-budget.cpp                  | 597 +++++++++++++++++++++
 src/masternode-budget.h                    | 212 ++++++++
 src/masternode-payments.cpp                | 437 ++++++++-------
 src/masternode-payments.h                  | 150 ++++--
 src/masternode.cpp                         |  37 +-
 src/masternode.h                           |  21 +-
 src/masternodeman.cpp                      |  52 +-
 src/masternodeman.h                        |   9 +
 src/miner.cpp                              |   3 +-
 src/primitives/block.h                     |   1 +
 src/protocol.cpp                           |   5 +
 src/protocol.h                             |   6 +-
 src/rpcmasternode-budget.cpp               | 237 ++++++++
 src/{rpcdarksend.cpp => rpcmasternode.cpp} | 157 +-----
 src/rpcserver.cpp                          |   1 +
 src/rpcserver.h                            |   1 +
 21 files changed, 1550 insertions(+), 504 deletions(-)
 create mode 100644 src/masternode-budget.cpp
 create mode 100644 src/masternode-budget.h
 create mode 100644 src/rpcmasternode-budget.cpp
 rename src/{rpcdarksend.cpp => rpcmasternode.cpp} (79%)

diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro
index 2cbd48208a94..5ab774f98ecf 100644
--- a/contrib/dash-qt.pro
+++ b/contrib/dash-qt.pro
@@ -399,7 +399,8 @@ SOURCES += src/activemasternode.cpp \
            src/rest.cpp \
            src/rpcblockchain.cpp \
            src/rpcclient.cpp \
-           src/rpcdarksend.cpp \
+           src/rpcmasternode.cpp \
+           src/rpcmasternode-budget.cpp \
            src/rpcdump.cpp \
            src/rpcmining.cpp \
            src/rpcmisc.cpp \
diff --git a/src/Makefile.am b/src/Makefile.am
index 3f0be328eb4a..6a4d8f42081e 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -109,6 +109,7 @@ BITCOIN_CORE_H = \
   masternode.h \
   masternode-payments.h \
   masternode-pos.h \
+  masternode-budget.h \
   masternodeman.h \
   masternodeconfig.h \
   merkleblock.h \
@@ -188,7 +189,8 @@ libbitcoin_server_a_SOURCES = \
   pow.cpp \
   rest.cpp \
   rpcblockchain.cpp \
-  rpcdarksend.cpp \
+  rpcmasternode.cpp \
+  rpcmasternode-budget.cpp \
   rpcmining.cpp \
   rpcmisc.cpp \
   rpcnet.cpp \
@@ -279,6 +281,7 @@ libbitcoin_common_a_SOURCES = \
   darksend.cpp \
   darksend-relay.cpp \
   masternode.cpp \
+  masternode-budget.cpp \
   masternode-payments.cpp \
   masternode-pos.cpp \
   masternodeman.cpp \
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6fc81056f8ff..7017bb8891b8 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2276,6 +2276,7 @@ void ThreadCheckDarkSendPool()
                         mnodeman.DsegUpdate(pnode);
 
                         pnode->PushMessage("mnget"); //sync payees
+                        pnode->PushMessage("mnvs"); //sync masternode votes
                         pnode->PushMessage("getsporks"); //get current network sporks
                         RequestedMasterNodeList++;
                     }
diff --git a/src/init.cpp b/src/init.cpp
index 327e69bf908a..7897b00768e4 100755
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -24,6 +24,7 @@
 #include "ui_interface.h"
 #include "util.h"
 #include "activemasternode.h"
+#include "masternode-budget.h"
 #include "masternode-payments.h"
 #include "masternodeman.h"
 #include "spork.h"
@@ -164,6 +165,7 @@ void Shutdown()
 #endif
     StopNode();
     DumpMasternodes();
+    DumpBudgets();
     UnregisterNodeSignals(GetNodeSignals());
 
     if (fFeeEstimatesInitialized)
@@ -826,11 +828,9 @@ bool AppInit2(boost::thread_group& threadGroup)
             threadGroup.create_thread(&ThreadScriptCheck);
     }
 
-    if (mapArgs.count("-masternodepaymentskey")) // masternode payments priv key
+    if (mapArgs.count("-sporkkey")) // spork priv key
     {
-        if (!masternodePayments.SetPrivKey(GetArg("-masternodepaymentskey", "")))
-            return InitError(_("Unable to sign masternode payment winner, wrong key?"));
-        if (!sporkManager.SetPrivKey(GetArg("-masternodepaymentskey", "")))
+        if (!sporkManager.SetPrivKey(GetArg("-sporkkey", "")))
             return InitError(_("Unable to sign spork message, wrong key?"));
     }
 
diff --git a/src/main.cpp b/src/main.cpp
index 2c3d860e9374..68cc2e8c5d00 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -16,6 +16,7 @@
 #include "darksend.h"
 #include "masternodeman.h"
 #include "masternode-payments.h"
+#include "masternode-budget.h"
 #include "merkleblock.h"
 #include "net.h"
 #include "pow.h"
@@ -1567,10 +1568,6 @@ int64_t GetMasternodePayment(int nHeight, int64_t blockValue)
     if(nHeight > 158000+((576*30)* 6)) ret += blockValue / 40; // 261680 - 45.0% - 2015-05-01
     if(nHeight > 158000+((576*30)* 7)) ret += blockValue / 40; // 278960 - 47.5% - 2015-06-01
     if(nHeight > 158000+((576*30)* 9)) ret += blockValue / 40; // 313520 - 50.0% - 2015-08-03
-    if(nHeight > 158000+((576*30)*11)) ret += blockValue / 40; // 348080 - 52.5% - 2015-10-05
-    if(nHeight > 158000+((576*30)*13)) ret += blockValue / 40; // 382640 - 55.0% - 2015-12-07
-    if(nHeight > 158000+((576*30)*15)) ret += blockValue / 40; // 417200 - 57.5% - 2016-02-08
-    if(nHeight > 158000+((576*30)*17)) ret += blockValue / 40; // 451760 - 60.0% - 2016-04-11
 
     return ret;
 }
@@ -2928,72 +2925,17 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
 
     // ----------- masternode payments -----------
 
-    bool MasternodePayments = block.nTime > Params().StartMasternodePayments();
-
-    if(!IsSporkActive(SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT)){
-        MasternodePayments = false;
-        if(fDebug) LogPrintf("CheckBlock() : Masternode payment enforcement is off\n");
-    }
-
-    if(MasternodePayments)
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev != NULL) 
     {
-        LOCK2(cs_main, mempool.cs);
-
-        CBlockIndex *pindex = chainActive.Tip();
-        if(pindex != NULL){
-            if(pindex->GetBlockHash() == block.hashPrevBlock){
-                int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut());
-                bool fIsInitialDownload = IsInitialBlockDownload();
-
-                // If we don't already have its previous block, skip masternode payment step
-                if (!fIsInitialDownload && pindex != NULL)
-                {
-                    bool foundPaymentAmount = false;
-                    bool foundPayee = false;
-                    bool foundPaymentAndPayee = false;
-
-                    CScript payee;
-                    CTxIn vin;
-                    if(!masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight+1, payee, vin) || payee == CScript()){
-                        foundPayee = true; //doesn't require a specific payee
-                        foundPaymentAmount = true;
-                        foundPaymentAndPayee = true;
-                        LogPrintf("CheckBlock() : Using non-specific masternode payments %d\n", chainActive.Tip()->nHeight+1);
-                    }
-
-                    for (unsigned int i = 0; i < block.vtx[0].vout.size(); i++) {
-                        if(block.vtx[0].vout[i].nValue == masternodePaymentAmount )
-                            foundPaymentAmount = true;
-                        if(block.vtx[0].vout[i].scriptPubKey == payee )
-                            foundPayee = true;
-                        if(block.vtx[0].vout[i].nValue == masternodePaymentAmount && block.vtx[0].vout[i].scriptPubKey == payee)
-                            foundPaymentAndPayee = true;
-                    }
-
-
-                    CTxDestination address1;
-                    ExtractDestination(payee, address1);
-                    CBitcoinAddress address2(address1);
-
-                    if(!foundPaymentAndPayee) {
-                        LogPrintf("CheckBlock() : Couldn't find masternode payment(%d|%d) or payee(%d|%s) nHeight %d. \n", foundPaymentAmount, masternodePaymentAmount, foundPayee, address2.ToString().c_str(), chainActive.Tip()->nHeight+1);
-                        if(Params().NetworkID() != CBaseChainParams::REGTEST) return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
-                    } else {
-                        LogPrintf("CheckBlock() : Found payment(%d|%d) or payee(%d|%s) nHeight %d. \n", foundPaymentAmount, masternodePaymentAmount, foundPayee, address2.ToString().c_str(), chainActive.Tip()->nHeight+1);
-                    }
-                } else {
-                    LogPrintf("CheckBlock() : Is initial download, skipping masternode payment check %d\n", chainActive.Tip()->nHeight+1);
-                }
-            } else {
-                LogPrintf("CheckBlock() : Skipping masternode payment check - nHeight %d Hash %s\n", chainActive.Tip()->nHeight+1, block.GetHash().ToString().c_str());
-            }
-        } else {
-            LogPrintf("CheckBlock() : pindex is null, skipping masternode payment check\n");
+        if(masternodePayments.IsTransactionValid(block.vtx[0], pindexPrev->nHeight+1))
+        {
+            if(Params().NetworkID() != CBaseChainParams::REGTEST) 
+                return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
         }
-    } else {
-        LogPrintf("CheckBlock() : skipping masternode payment checks\n");
     }
 
+    // -------------------------------------------
 
     // Check transactions
     BOOST_FOREACH(const CTransaction& tx, block.vtx)
@@ -3288,7 +3230,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
             CScript payee;
             CTxIn vin;
-            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight, payee, vin)){
+            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight, payee)){
                 //UPDATE MASTERNODE LAST PAID TIME
                 CMasternode* pmn = mnodeman.Find(vin);
                 if(pmn != NULL) pmn->nLastPaid = GetAdjustedTime(); 
@@ -3300,6 +3242,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             mnscan.DoMasternodePOSChecks();
+            //budget.NewBlock();
         }
     }
 
@@ -3985,9 +3928,13 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_SPORK:
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
-        return mapSeenMasternodeVotes.count(inv.hash);
+        return true; // mapMasternodePayeeVotes.count(inv.hash);
     case MSG_MASTERNODE_SCANNING_ERROR:
         return mapMasternodeScanningErrors.count(inv.hash);
+    case MSG_MASTERNODE_ANNOUNCE:
+        return mapSeenMasternodeBroadcast.count(inv.hash);
+    case MSG_MASTERNODE_PING:
+        return mapSeenMasternodePing.count(inv.hash);
     }
     // Don't know what it is, just say we already got one
     return true;
@@ -4139,10 +4086,10 @@ void static ProcessGetData(CNode* pfrom)
                     }
                 }
                 if (!pushed && inv.type == MSG_MASTERNODE_WINNER) {
-                    if(mapSeenMasternodeVotes.count(inv.hash)){
+                    if(mapMasternodePayeeVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenMasternodeVotes[inv.hash];
+                        ss << mapMasternodePayeeVotes[inv.hash];
                         pfrom->PushMessage("mnw", ss);
                         pushed = true;
                     }
@@ -4157,6 +4104,26 @@ void static ProcessGetData(CNode* pfrom)
                     }
                 }
 
+                if (!pushed && inv.type == MSG_MASTERNODE_ANNOUNCE) {
+                    if(mapSeenMasternodeBroadcast.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapSeenMasternodeBroadcast[inv.hash];
+                        pfrom->PushMessage("mnb", ss);
+                        pushed = true;
+                    }
+                }
+
+                if (!pushed && inv.type == MSG_MASTERNODE_PING) {
+                    if(mapSeenMasternodePing.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapSeenMasternodePing[inv.hash];
+                        pfrom->PushMessage("mnp", ss);
+                        pushed = true;
+                    }
+                }
+
                 if (!pushed) {
                     vNotFound.push_back(inv);
                 }
@@ -5022,7 +4989,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         //probably one the extensions
         darkSendPool.ProcessMessageDarksend(pfrom, strCommand, vRecv);
         mnodeman.ProcessMessage(pfrom, strCommand, vRecv);
-        ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
+        budget.ProcessMessage(pfrom, strCommand, vRecv);
+        //TODO
+        //ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
         ProcessMessageInstantX(pfrom, strCommand, vRecv);
         ProcessSpork(pfrom, strCommand, vRecv);
         ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
new file mode 100644
index 000000000000..5ebf71552252
--- /dev/null
+++ b/src/masternode-budget.cpp
@@ -0,0 +1,597 @@
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "masternode-budget.h"
+#include "masternode.h"
+#include "darksend.h"
+#include "masternodeman.h"
+#include "util.h"
+#include "addrman.h"
+#include <boost/filesystem.hpp>
+#include <boost/lexical_cast.hpp>
+
+CBudgetManager budget;
+CCriticalSection cs_budget;
+
+//
+// CBudgetDB
+//
+
+CBudgetDB::CBudgetDB()
+{
+    pathDB = GetDataDir() / "budget.dat";
+    strMagicMessage = "MasternodeBudget";
+}
+
+bool CBudgetDB::Write(const CBudgetManager& budgetToSave)
+{
+    int64_t nStart = GetTimeMillis();
+
+    // serialize, checksum data up to that point, then append checksum
+    CDataStream ssBudget(SER_DISK, CLIENT_VERSION);
+    ssBudget << strMagicMessage; // masternode cache file specific magic message
+    ssBudget << FLATDATA(Params().MessageStart()); // network specific magic number
+    ssBudget << budgetToSave;
+    uint256 hash = Hash(ssBudget.begin(), ssBudget.end());
+    ssBudget << hash;
+
+    // open output file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "wb");
+    CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
+    if (fileout.IsNull())
+        return error("%s : Failed to open file %s", __func__, pathDB.string());
+
+    // Write and commit header, data
+    try {
+        fileout << ssBudget;
+    }
+    catch (std::exception &e) {
+        return error("%s : Serialize or I/O error - %s", __func__, e.what());
+    }
+//    FileCommit(fileout);
+    fileout.fclose();
+
+    LogPrintf("Written info to mncache.dat  %dms\n", GetTimeMillis() - nStart);
+    //LogPrintf("  %s\n", budgetToSave.ToString().c_str());
+
+    return true;
+}
+
+CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
+{
+    int64_t nStart = GetTimeMillis();
+    // open input file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "rb");
+    CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
+    if (filein.IsNull())
+    {
+        error("%s : Failed to open file %s", __func__, pathDB.string());
+        return FileError;
+    }
+
+    // use file size to size memory buffer
+    int fileSize = boost::filesystem::file_size(pathDB);
+    int dataSize = fileSize - sizeof(uint256);
+    // Don't try to resize to a negative number if file is small
+    if (dataSize < 0)
+        dataSize = 0;
+    vector<unsigned char> vchData;
+    vchData.resize(dataSize);
+    uint256 hashIn;
+
+    // read data and checksum from file
+    try {
+        filein.read((char *)&vchData[0], dataSize);
+        filein >> hashIn;
+    }
+    catch (std::exception &e) {
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return HashReadError;
+    }
+    filein.fclose();
+
+    CDataStream ssBudget(vchData, SER_DISK, CLIENT_VERSION);
+
+    // verify stored checksum matches input data
+    uint256 hashTmp = Hash(ssBudget.begin(), ssBudget.end());
+    if (hashIn != hashTmp)
+    {
+        error("%s : Checksum mismatch, data corrupted", __func__);
+        return IncorrectHash;
+    }
+
+   
+    unsigned char pchMsgTmp[4];
+    std::string strMagicMessageTmp;
+    try {
+        // de-serialize file header (masternode cache file specific magic message) and ..
+        ssBudget >> strMagicMessageTmp;
+
+        // ... verify the message matches predefined one
+        if (strMagicMessage != strMagicMessageTmp)
+        {
+            error("%s : Invalid masternode cache magic message", __func__);
+            return IncorrectMagicMessage;
+        }
+
+
+        // de-serialize file header (network specific magic number) and ..
+        ssBudget >> FLATDATA(pchMsgTmp);
+
+        // ... verify the network matches ours
+        if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
+        {
+            error("%s : Invalid network magic number", __func__);
+            return IncorrectMagicNumber;
+        }
+
+        // de-serialize data into CBudgetManager object
+        ssBudget >> budgetToLoad;
+    }
+    catch (std::exception &e) {
+        budgetToLoad.Clear();
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return IncorrectFormat;
+    }
+
+
+    budgetToLoad.CheckAndRemove(); // clean out expired
+    LogPrintf("Loaded info from mncache.dat  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("  %s\n", budgetToLoad.ToString());
+
+    return Ok;
+}
+
+void DumpBudgets()
+{
+    int64_t nStart = GetTimeMillis();
+
+    CBudgetDB mndb;
+    CBudgetManager tempbudget;
+
+    LogPrintf("Verifying mncache.dat format...\n");
+    CBudgetDB::ReadResult readResult = mndb.Read(tempbudget);
+    // there was an error and it was not an error on file openning => do not proceed
+    if (readResult == CBudgetDB::FileError)
+        LogPrintf("Missing masternode cache file - mncache.dat, will try to recreate\n");
+    else if (readResult != CBudgetDB::Ok)
+    {
+        LogPrintf("Error reading mncache.dat: ");
+        if(readResult == CBudgetDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+        {
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+            return;
+        }
+    }
+    LogPrintf("Writting info to mncache.dat...\n");
+    mndb.Write(budget);
+
+    LogPrintf("Masternode dump finished  %dms\n", GetTimeMillis() - nStart);
+}
+
+
+
+CBudgetVote::CBudgetVote()
+{
+    vin = CTxIn();
+    nVote = VOTE_ABSTAIN;
+    strProposalName = "unknown";
+    nBlockStart = 0;
+    nBlockEnd = 0;
+    nAmount = 0;
+    nTime = 0;
+}
+
+CBudgetVote::CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, int nVoteIn)
+{
+	vin = vinIn;
+	strProposalName = strProposalNameIn;
+	nBlockStart = nBlockStartIn;
+	nBlockEnd = nBlockEndIn;
+	address = addressIn;
+	nAmount = nAmountIn;
+	nVote = nVoteIn;
+	nTime = GetAdjustedTime();
+}
+
+bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+{
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
+
+    std::string errorMessage;
+    std::string strMessage = vin.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
+
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
+
+    return true;
+}
+
+void CBudgetVote::Relay()
+{
+    CInv inv(MSG_MASTERNODE_VOTE, GetHash());
+
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
+}
+
+uint256 GetBudgetProposalHash(std::string strProposalName)
+{
+	return Hash(strProposalName.begin(), strProposalName.end());
+}
+
+
+void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+{
+	// lite mode is not supported
+    if(IsInitialBlockDownload()) return;
+
+    LOCK(cs_budget);
+
+    if (strCommand == "mnvs") { //Masternode vote sync
+        if(pfrom->HasFulfilledRequest("mnvs")) {
+            LogPrintf("mnvs - peer already asked me for the list\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
+        }
+
+        pfrom->FulfilledRequest("mnvs");
+        budget.Sync(pfrom);
+        LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString().c_str());
+    }
+
+    if (strCommand == "mvote") { //Masternode Vote
+        CBudgetVote vote;
+        vRecv >> vote;
+        if(!vote.SignatureValid()){
+        	LogPrintf("mvote - signature invalid\n");
+        	Misbehaving(pfrom->GetId(), 20);
+        	return;
+        }
+
+        CMasternode* pmn = mnodeman.Find(vote.vin);
+        if(pmn == NULL) {
+        	LogPrintf("mvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        	return;        	
+        }
+
+        if(pmn->nVotedTimes < 100){
+        	budget.AddOrUpdateProposal(vote);
+        	vote.Relay();
+        	pmn->nVotedTimes++;
+        } else {
+        	LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+        	return;
+        }
+    }
+
+}
+
+bool CBudgetVote::SignatureValid()
+{
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
+
+    CMasternode* pmn = mnodeman.Find(vin);
+
+    if(pmn == NULL)
+    {
+        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode\n");
+        return false;
+    }
+
+    CScript pubkey;
+    pubkey = GetScriptForDestination(pmn->pubkey2.GetID());
+    CTxDestination address1;
+    ExtractDestination(pubkey, address1);
+    CBitcoinAddress address2(address1);
+
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CBudgetVote::SignatureValid() - Verify message failed\n");
+        return false;
+    }
+
+    return true;
+}
+
+void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
+{
+   // LOCK(cs);
+
+   //  uint256 hash = GetBudgetProposalHash(vote.strProposalName);
+
+   //  if(!mapProposals.count(hash)){
+   //  	CBudgetProposal prop(vote.strProposalName);
+   //  	mapProposals.insert(make_pair(hash, prop));
+   //  	return;
+   //  }
+
+  	// mapProposals[hash].AddOrUpdateVote(vote);
+}
+
+void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
+{
+    // LOCK(cs);
+
+    // uint256 hash = vote.vin.prevout.GetHash();
+
+    // if(!mapProposals.count(hash)){
+    //     mapProposals.insert(make_pair(hash, vote));
+    //     return;
+    // }
+
+    // vote[hash] = vote;    
+}
+
+inline void CBudgetManager::NewBlock()
+{
+	//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
+	if(chainActive.Height() % 6 != 0) return;
+
+	mnodeman.DecrementVotedTimes();
+}
+
+CBudgetProposal *CBudgetManager::Find(const std::string &strProposalName)
+{
+    // uint256 hash = GetBudgetProposalHash(vote.strProposalName);
+
+    // if(mapProposals.count(hash)){
+    // 	return &mapProposals[hash];
+    // }
+
+    return NULL;
+}
+
+CBudgetProposal::CBudgetProposal()
+{
+    strProposalName = "";
+}
+
+CBudgetProposal::CBudgetProposal(std::string strProposalNameIn)
+{
+	strProposalName = strProposalNameIn;
+}
+
+std::string CBudgetProposal::GetName()
+{
+	return strProposalName;
+}
+
+int CBudgetProposal::GetBlockStart()
+{
+	/*std::map<int, int> mapList;
+
+    map<uint256, CBudgetVote>::iterator it;
+    for(it=mapVotes.begin();it<mapVotes.end();it++){
+        if ((*it)->second.mapVotes.nVote != VOTE_YEA) continue;
+
+        if(mapList.count((*it).nBlockStart)){
+        	mapList[(*it).nBlockStart]++;
+        } else {
+        	mapList[(*it)].insert(make_pair<(*it).nBlockStart, 1>);
+        }
+    }*/
+
+	//sort(mapList.begin(), mapList.end());
+	// return myMap.begin()->second;
+    return 0;
+}
+
+int CBudgetProposal::GetBlockEnd()
+{
+	std::map<int, int> mapList;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++){
+    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+
+    //     if(mapList.count((*it).nBlockEnd)){
+    //     	mapList[(*it).nBlockEnd]++;
+    //     } else {
+    //     	mapList[(*it).nBlockEnd] = 1;
+    //     }
+    // }
+
+	// sort(mapList.begin(), mapList.end());
+	// return myMap.begin()->first;
+    return 0;
+}
+
+int64_t CBudgetProposal::GetAmount()
+{
+	std::map<int64_t, int> mapList;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++){
+    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+
+    //     if(mapList.count((*it).nAmount)){
+    //     	mapList[(*it).nAmount]++;
+    //     } else {
+    //     	mapList[(*it).nAmount] = 1;
+    //     }
+    // }
+
+	// sort(mapList.begin(), mapList.end());
+	// return myMap.begin()->first;
+    return 0;
+}
+
+std::string CBudgetProposal::GetPaymentAddress()
+{
+	std::map<std::string, int> mapList;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=prop->mapVotes.begin();it<prop->mapVotes.end();it++){
+    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+
+    //     CTxDestination address1;
+    //     ExtractDestination((*it)->second.payee, address1);
+    //     CBitcoinAddress address2(address1);
+
+    //     if(mapList.count(address2){
+    //     	mapList[address2]++;
+    //     } else {
+    //     	mapList[address2] = 1;
+    //     }
+    // }
+
+	// sort(mapList.begin(), mapList.end());
+	// return myMap.begin()->first;
+    return 0;
+}
+
+double CBudgetProposal::GetRatio()
+{
+	int yeas = 0;
+	int nays = 0;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++){
+    //     if ((*it)->second.prop->mapVotes.nVote != VOTE_YEA) yeas++;
+    //     if ((*it)->second.nVote != VOTE_NAY) nays++;
+    // }
+
+    return ((double)yeas / (double)yeas+nays);
+}
+
+int CBudgetProposal::GetYeas()
+{
+	int ret = 0;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++)
+    //     if ((*it)->second.mapVotes.nVote != VOTE_YEA) ret++;
+
+    return ret;
+}
+
+int CBudgetProposal::GetNays()
+{
+	int ret = 0;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++)
+    //     if ((*it)->second.nVote != VOTE_NAY) ret++;
+
+    return ret;
+}
+
+int CBudgetProposal::GetAbstains()
+{
+	int ret = 0;
+
+    // map<uint256, CBudgetVote>::iterator it;
+    // for(it=mapVotes.begin();it<mapVotes.end();it++)
+    //     if ((*it)->second.mapVotes.nVote != VOTE_ABSTAIN) ret++;
+
+    return ret;
+}
+
+bool CBudgetManager::IsBudgetPaymentBlock(int nHeight)
+{
+    if(nHeight > 158000+((576*30)*15)) return (nHeight % 7) == 0  ; // 417200 - 57.5% - 2016-02-08 -- 12.5% of blocks
+    if(nHeight > 158000+((576*30)*13)) return (nHeight % 10) == 0 ; // 382640 - 55.0% - 2015-12-07  -- 10.0% of blocks
+    if(nHeight > 158000+((576*30)*11)) return (nHeight % 13) == 0 ; // 348080 - 52.5% - 2015-10-05 -- 7.5 of blocks
+    if(nHeight > 158000+((576*30)* 9)) return (nHeight % 20) == 0 ; // 313520 - 50.0% - 2015-08-03 -- 5.0% of blocks
+    if(nHeight > 158000+((576*30)* 7)) return (nHeight % 40) == 0 ; // 278960 - 47.5% - 2015-06-01 -- 2.5% of blocks
+
+    return false;
+}
+
+void CBudgetManager::FillBlockTx(CMutableTransaction& txNew, int& payments)
+{
+/*	std::vector<CBudgetProposal*> budget = GetBudget();
+
+    LogPrintf("Masternode Budget payment to");
+
+	BOOST_FOREACH(CBudgetProposal* prop, budget){
+		payments++;
+	    txNew.vout.resize(payments);
+
+	    txNew.vout[payments-1].scriptPubKey = prop.GetPayee();
+	    txNew.vout[payments-1].nValue = prop.GetAmount();
+
+        CTxDestination address1;
+        ExtractDestination(pblock->payee, address1);
+        CBitcoinAddress address2(address1);
+
+        LogPrintf(" (%s|%d)", address2.ToString().c_str(), prop.GetAmount());
+	}
+	LogPrintf("\n");*/
+}
+
+int64_t CBudgetManager::GetTotalBudget()
+{
+	if(chainActive.Tip() == NULL) return 0;
+
+	const CBlockIndex* pindex = chainActive.Tip();
+	return (GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, 0)/100)*15;
+}
+
+std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
+{
+/*	std::map<uint256, int> mapList;
+
+    map<uint256, CBudgetProposal>::iterator it;
+    for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
+    	uint256 hash = GetBudgetProposalHash((*it)->second.strProposalName);
+        if(!mapList.count(hash)){
+        	mapList[hash] = (*it)->second.GetYeas();
+        }
+    }
+
+    //sort by yeas
+	sort(mapList.begin(), mapList.end());*/
+
+	std::vector<CBudgetProposal*> ret;
+
+/*	int64_t nBudgetAllocated = 0;
+	int64_t nTotalBudget = GetTotalBudget();
+
+    map<uint256, CBudgetProposal>::iterator it;
+    for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
+    	if(nTotalBudget == nBudgetAllocated){
+    		(*it).SetAllotted(0);
+    	} else if((*it).GetAmount() + nBudgetAllocated <= nTotalBudget()) {
+    		(*it).SetAllotted((*it).GetAmount());
+    		nBudgetAllocated += (*it).GetAmount();
+    	} else {
+    		//couldn't pay for the entire budget, so it'll be partially paid.
+    		(*it).SetAllotted(nTotalBudget - nBudgetAllocated);
+    		nBudgetAllocated = nTotalBudget;
+    	}
+
+    	ret.insert(make_pair((*it).strProposalName, &(*it)))
+    }*/
+	return ret;
+}
+
+
+void CBudgetManager::Sync(CNode* node)
+{
+    // map<uint256, CBudgetProposal>::iterator it;
+    // for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
+    // 	(*it)->second.Sync(node);
+    // }
+}
+
+void CBudgetProposal::Sync(CNode* node)
+{
+  //   map<uint256, CBudgetVote>::iterator it;
+  //   for(it=mapVotes.begin();it<mapVotes.end();it++){
+		// node->PushMessage("mvote", mapVotes[(*it)->first]);    
+  //   }
+}
\ No newline at end of file
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
new file mode 100644
index 000000000000..df3ab581dd2e
--- /dev/null
+++ b/src/masternode-budget.h
@@ -0,0 +1,212 @@
+
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#ifndef MASTERNODE_BUDGET_H
+#define MASTERNODE_BUDGET_H
+
+#include "main.h"
+#include "sync.h"
+#include "net.h"
+#include "key.h"
+#include "util.h"
+#include "base58.h"
+#include "masternode.h"
+#include "masternode-pos.h"
+//#include "timedata.h"
+
+using namespace std;
+
+class CBudgetManager;
+class CBudgetProposal;
+class CBudgetVote;
+
+#define VOTE_ABSTAIN  0
+#define VOTE_YES      1
+#define VOTE_NO       2
+
+extern CBudgetManager budget;
+
+void DumpBudgets();
+
+
+/** Save Budget Manager (budget.dat)
+ */
+class CBudgetDB
+{
+private:
+    boost::filesystem::path pathDB;
+    std::string strMagicMessage;
+public:
+    enum ReadResult {
+        Ok,
+        FileError,
+        HashReadError,
+        IncorrectHash,
+        IncorrectMagicMessage,
+        IncorrectMagicNumber,
+        IncorrectFormat
+    };
+
+    CBudgetDB();
+    bool Write(const CBudgetManager &budgetToSave);
+    ReadResult Read(CBudgetManager& budgetToLoad);
+};
+
+
+//
+// Budget Manager : Contains all proposals for the budget
+//
+class CBudgetManager
+{
+private:
+    // critical section to protect the inner data structures
+    mutable CCriticalSection cs;
+
+public:
+    // keep track of the scanning errors I've seen
+    map<uint256, CBudgetProposal> mapProposals;
+    
+    CBudgetManager() {
+        mapProposals.clear();
+    }
+
+    void Sync(CNode* node);
+
+    void Calculate();
+    void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
+    CBudgetProposal *Find(const std::string &strProposalName);
+    inline void NewBlock();
+    std::pair<std::string, std::string> GetVotes(std::string strProposalName);
+    uint256 GetBudgetProposalHash(std::string strProposalName);
+    void CleanUp();
+
+    int64_t GetTotalBudget();
+    std::vector<CBudgetProposal*> GetBudget();
+    bool IsBudgetPaymentBlock(int nHeight);
+    void FillBlockTx(CMutableTransaction& txNew, int& payments);
+    void AddOrUpdateProposal(CBudgetVote& vote);
+
+    void Clear(){
+        printf("Not implemented\n");
+    }
+    void CheckAndRemove(){
+        printf("Not implemented\n");
+        //replace cleanup
+    }
+    std::string ToString() {return "not implemented";}
+
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(mapProposals);
+    }
+};
+
+
+//
+// Budget Proposal : Contains the masternode votes for each budget
+//
+
+class CBudgetProposal
+{
+private:
+    // critical section to protect the inner data structures
+    //mutable CCriticalSection cs;
+    int64_t nAlloted;
+
+public:
+    std::string strProposalName;
+
+    map<uint256, CBudgetVote> mapVotes;
+    //cache object
+
+    CBudgetProposal();  
+    CBudgetProposal(std::string strProposalNameIn);
+
+    void Sync(CNode* node);
+
+    void Calculate();
+    void AddOrUpdateVote(CBudgetVote& vote);
+    bool HasMinimumRequiredSupport();
+    std::pair<std::string, std::string> GetVotes();
+
+    std::string GetName();
+    int GetBlockStart();
+    int GetBlockEnd();
+    std::string GetPaymentAddress();
+    double GetRatio();
+    int GetYeas();
+    int GetNays();
+    int GetAbstains();
+    int64_t GetAmount();
+
+    void SetAlloted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
+    int64_t GetAlloted() {return nAlloted;}
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(mapVotes);
+    }
+};
+
+
+//
+// CBudgetVote - Allow a masternode node to vote and broadcast throughout the network
+//
+
+class CBudgetVote
+{
+public:
+    std::string strProposalName;
+    CTxIn vin;
+    int nBlockStart;
+    int nBlockEnd;
+    int64_t nAmount;
+    int nVote;
+    int64_t nTime;
+    CScript address;
+    std::vector<unsigned char> vchSig;
+
+    CBudgetVote();
+    CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, int nVoteIn);
+
+    bool Sign(CKey& keyCollateralAddress, CPubKey& pubKeyMasternode);
+    bool SignatureValid();
+    void Relay();
+
+    std::string GetVoteString() {
+        std::string ret = "ABSTAIN";
+        if(nVote == VOTE_YES) ret = "YES";
+        if(nVote == VOTE_NO) ret = "NO";
+        return ret;
+    }
+
+    uint256 GetHash(){
+        return Hash(BEGIN(vin), END(vin), BEGIN(nVote), END(nVote), BEGIN(nTime), END(nTime));
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(LIMITED_STRING(strProposalName, 20));
+        READWRITE(vin);
+        READWRITE(nBlockStart);
+        READWRITE(nBlockEnd);
+        READWRITE(nAmount);
+        READWRITE(nVote);
+        READWRITE(nTime);
+        READWRITE(address);
+        READWRITE(vchSig);
+    }
+
+    
+
+};
+
+#endif
\ No newline at end of file
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 7c63ea5ebb3d..def26c0b4f07 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -14,10 +14,10 @@ CCriticalSection cs_masternodepayments;
 
 /** Object for who's going to get paid on which blocks */
 CMasternodePayments masternodePayments;
-// keep track of Masternode votes I've seen
-map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
+map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
+map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
-void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(IsInitialBlockDownload()) return;
 
@@ -44,159 +44,158 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
 
         if(chainActive.Tip() == NULL) return;
 
-        CTxDestination address1;
-        ExtractDestination(winner.payee, address1);
-        CBitcoinAddress address2(address1);
-
-        uint256 hash = winner.GetHash();
-        if(mapSeenMasternodeVotes.count(hash)) {
-            if(fDebug) LogPrintf("mnw - seen vote %s Addr %s Height %d bestHeight %d\n", hash.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
-            return;
+        if(mapMasternodePayeeVotes.count(winner.GetHash())){
+           if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
+           return; 
         }
 
         if(winner.nBlockHeight < chainActive.Tip()->nHeight - 10 || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
-            LogPrintf("mnw - winner out of range %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
+            LogPrintf("mnw - winner out of range - Height %d bestHeight %d\n", winner.nBlockHeight, chainActive.Tip()->nHeight);
             return;
         }
 
-        if(winner.vin.nSequence != std::numeric_limits<unsigned int>::max()){
-            LogPrintf("mnw - invalid nSequence\n");
-            Misbehaving(pfrom->GetId(), 100);
+        if(!winner.IsValid()){
+            LogPrintf("mnw - invalid message\n");
             return;
         }
 
-        LogPrintf("mnw - winning vote - Vin %s Addr %s Height %d bestHeight %d\n", winner.vin.ToString().c_str(), address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
-
-        if(!masternodePayments.CheckSignature(winner)){
+        if(!winner.SignatureValid()){
             LogPrintf("mnw - invalid signature\n");
             Misbehaving(pfrom->GetId(), 100);
             return;
         }
 
-        mapSeenMasternodeVotes.insert(make_pair(hash, winner));
+        CTxDestination address1;
+        ExtractDestination(winner.payee.scriptPubKey, address1);
+        CBitcoinAddress address2(address1);
+
+        if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
 
         if(masternodePayments.AddWinningMasternode(winner)){
-            masternodePayments.Relay(winner);
+            winner.Relay();
         }
     }
 }
 
-
-bool CMasternodePayments::CheckSignature(CMasternodePaymentWinner& winner)
+bool CMasternodePaymentWinner::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
-    //note: need to investigate why this is failing
-    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
-    CPubKey pubkey(ParseHex(Params().MasternodePaymentPubKey()));
+    std::string errorMessage;
+    std::string strMasterNodeSignMessage;
+
+    std::string strMessage =  vinMasternode.prevout.ToStringShort() +
+                boost::lexical_cast<std::string>(nBlockHeight) + 
+                payee.ToString();
+                
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
 
-    std::string errorMessage = "";
-    if(!darkSendSigner.VerifyMessage(pubkey, winner.vchSig, strMessage, errorMessage)){
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
         return false;
     }
 
     return true;
 }
 
-bool CMasternodePayments::Sign(CMasternodePaymentWinner& winner)
+bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 {
-    std::string strMessage = winner.vin.ToString().c_str() + boost::lexical_cast<std::string>(winner.nBlockHeight) + winner.payee.ToString();
+    if(!mapMasternodeBlocks.count(nBlockHeight)){
+        return mapMasternodeBlocks[nBlockHeight].GetPayee(payee);
+    }
 
-    CKey key2;
-    CPubKey pubkey2;
-    std::string errorMessage = "";
+    return false;
+}
 
-    if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
-    {
-        LogPrintf("CMasternodePayments::Sign - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage.c_str());
+bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
+{
+    uint256 blockHash = 0;
+    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-576)) {
         return false;
     }
 
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, winner.vchSig, key2)) {
-        LogPrintf("CMasternodePayments::Sign - Sign message failed");
-        return false;
+    if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
+       return false; 
     }
 
-    if(!darkSendSigner.VerifyMessage(pubkey2, winner.vchSig, strMessage, errorMessage)) {
-        LogPrintf("CMasternodePayments::Sign - Verify message failed");
-        return false;
+    mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
+
+    if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
+       CMasternodeBlockPayees blockPayees;
+       mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
     }
 
+    int n = 1;
+    if(IsReferenceNode(winnerIn.vinMasternode)) n = 100;
+    mapMasternodeBlocks[winnerIn.nBlockHeight].AddPayee(winnerIn.payee.scriptPubKey, winnerIn.payee.nValue, n);
+
     return true;
 }
 
-uint64_t CMasternodePayments::CalculateScore(uint256 blockHash, CTxIn& vin)
+bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 {
-    uint256 n1 = blockHash;
-    uint256 n2 = HashX11(BEGIN(n1), END(n1));
-    uint256 n3 = HashX11(BEGIN(vin.prevout.hash), END(vin.prevout.hash));
-    uint256 n4 = n3 > n2 ? (n3 - n2) : (n2 - n3);
+  /*  BOOST_FOREACH(CMasternodePayee& payee, vecPayees)
+    {
+        bool found = false;
+        BOOST_FOREACH(CTxOut& out, txNew.vout)
+        {
+            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
+                found = true;
+        }
 
-    //printf(" -- CMasternodePayments CalculateScore() n2 = %d \n", n2.Get64());
-    //printf(" -- CMasternodePayments CalculateScore() n3 = %d \n", n3.Get64());
-    //printf(" -- CMasternodePayments CalculateScore() n4 = %d \n", n4.Get64());
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
 
-    return n4.Get64();
-}
+            CTxDestination address1;
+            ExtractDestination(payee.scriptPubKey, address1);
+            CBitcoinAddress address2(address1);
 
-bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee, CTxIn& vin)
-{
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == nBlockHeight) {
-            payee = winner.payee;
-            vin = winner.vin;
-            return true;
+            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str, payee.nValue);
+            return false;
         }
     }
-
-    return false;
+*/
+    return true;
 }
 
-bool CMasternodePayments::GetWinningMasternode(int nBlockHeight, CTxIn& vinOut)
+std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 {
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == nBlockHeight) {
-            vinOut = winner.vin;
-            return true;
+    std::string ret = "Unknown";
+
+/*    BOOST_FOREACH(CMasternodePayee& payee, vecPayees)
+    {
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){
+            CTxDestination address1;
+            ExtractDestination(payee.scriptPubKey, address1);
+            CBitcoinAddress address2(address1);
+
+            if(ret != "Unknown"){
+                ret += sprintf(", %s:%d", address2.ToString(), payee.nValue);
+            } else {
+                ret = sprintf("%s:%d", address2.ToString(), payee.nValue);
+            }
         }
     }
-
-    return false;
+*/
+    return ret;
 }
 
-bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
+std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 {
-    uint256 blockHash = 0;
-    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-576)) {
-        return false;
-    }
-
-    winnerIn.score = CalculateScore(blockHash, winnerIn.vin);
-
-    bool foundBlock = false;
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning){
-        if(winner.nBlockHeight == winnerIn.nBlockHeight) {
-            foundBlock = true;
-            if(winner.score < winnerIn.score){
-                winner.score = winnerIn.score;
-                winner.vin = winnerIn.vin;
-                winner.payee = winnerIn.payee;
-                winner.vchSig = winnerIn.vchSig;
-
-                mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
-
-                return true;
-            }
-        }
+    if(mapMasternodeBlocks.count(nBlockHeight)){
+        return mapMasternodeBlocks[nBlockHeight].GetRequiredPaymentsString();
     }
 
-    // if it's not in the vector
-    if(!foundBlock){
-        vWinning.push_back(winnerIn);
-        mapSeenMasternodeVotes.insert(make_pair(winnerIn.GetHash(), winnerIn));
+    return "Unknown";
+}
 
-        return true;
+bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+{
+    if(mapMasternodeBlocks.count(nBlockHeight)){
+        return mapMasternodeBlocks[nBlockHeight].IsTransactionValid(txNew);
     }
 
-    return false;
+    return true;
 }
 
 void CMasternodePayments::CleanPaymentList()
@@ -207,119 +206,193 @@ void CMasternodePayments::CleanPaymentList()
 
     int nLimit = std::max(((int)mnodeman.size())*2, 1000);
 
-    vector<CMasternodePaymentWinner>::iterator it;
+   /* vector<CMasternodePaymentWinner>::iterator it;
     for(it=vWinning.begin();it<vWinning.end();it++){
         if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
             if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", (*it).nBlockHeight);
             vWinning.erase(it);
             break;
         }
-    }
+    }*/
 }
 
-bool CMasternodePayments::ProcessBlock(int nBlockHeight)
+bool IsReferenceNode(CTxIn& vin)
 {
-    LOCK(cs_masternodepayments);
+    //reference node - hybrid mode
+    if(vin.prevout.ToStringShort() == "099c01bea63abd1692f60806bb646fa1d288e2d049281225f17e499024084e28-0") return true; // mainnet
+    if(vin.prevout.ToStringShort() == "testnet-0") return true; // testnet
+    if(vin.prevout.ToStringShort() == "regtest-0") return true; // regtest
 
-    if(nBlockHeight <= nLastBlockHeight) return false;
-    if(!enabled) return false;
-    CMasternodePaymentWinner newWinner;
-    int nMinimumAge = mnodeman.CountEnabled();
-    CScript payeeSource;
+    return false;
+}
 
-    uint256 hash;
-    if(!GetBlockHash(hash, nBlockHeight-10)) return false;
-    unsigned int nHash;
-    memcpy(&nHash, &hash, 2);
+bool CMasternodePaymentWinner::IsValid()
+{
+    if(IsReferenceNode(vinMasternode)) return true;
 
-    LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight, MIN_MNPAYMENTS_PROTO_VERSION);
 
-    std::vector<CTxIn> vecLastPayments;
-    BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
+    if(n == -1)
     {
-        //if we already have the same vin - we have one full payment cycle, break
-        if(vecLastPayments.size() > (unsigned int)nMinimumAge) break;
-        vecLastPayments.push_back(winner.vin);
+        if(fDebug) LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode\n");
+        return false;
     }
 
-    // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-    CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
-    if(pmn != NULL)
+    if(n > MNPAYMENTS_SIGNATURES_TOTAL)
     {
-        LogPrintf(" Found by FindOldestNotInVec \n");
+        if(fDebug) LogPrintf("CMasternodePaymentWinner::IsValid - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
+        return false;
+    }
+
+    return true;
+}
+
+bool CMasternodePayments::ProcessBlock(int nBlockHeight)
+{
+    LOCK(cs_masternodepayments);
 
-        newWinner.score = 0;
-        newWinner.nBlockHeight = nBlockHeight;
-        newWinner.vin = pmn->vin;
 
-        if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-            newWinner.payee = pmn->donationAddress;
-        } else {
-            newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
+    if(!fMasterNode) return false;
+
+    //reference node - hybrid mode
+
+    if(!IsReferenceNode(activeMasternode.vin)){
+        int n = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight, MIN_MNPAYMENTS_PROTO_VERSION);
+
+        if(n == -1)
+        {
+            if(fDebug) LogPrintf("CMasternodePayments::ProcessBlock - Unknown Masternode\n");
+            return false;
         }
 
-        payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+        if(n > MNPAYMENTS_SIGNATURES_TOTAL)
+        {
+            if(fDebug) LogPrintf("CMasternodePayments::ProcessBlock - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
+            return false;
+        }
     }
 
-    //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
-    if(newWinner.nBlockHeight == 0 && nMinimumAge > 0)
-    {
-        LogPrintf(" Find by reverse \n");
+    if(nBlockHeight <= nLastBlockHeight) return false;
+    
+  /*  if(budget.IsBudgetPaymentBlock(nBlockHeight)){
+        //is budget payment block
+        std::vector<CBudgetProposal*> budget = budget.GetBudget();
+        BOOST_FOREACH(CBudgetProposal* prop, budget){
+            if(prop.GetAllocated() > 0){
+                newWinner.AddPayee(prop.GetPayee(), prop.GetAllocated());
+            }
+        }
+    } else {
+
+        CMasternodePaymentWinner newWinner(activeMasternode.vin);
+        int nMinimumAge = mnodeman.CountEnabled();
+        CScript payeeSource;
 
-        BOOST_REVERSE_FOREACH(CTxIn& vinLP, vecLastPayments)
+        CBlockIndex* pindexPrev = chainActive.Tip();
+        if(pindexPrev == NULL) return false;
+        CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, 0);
+        CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
+
+        uint256 hash;
+        if(!GetBlockHash(hash, nBlockHeight-10)) return false;
+        unsigned int nHash;
+        memcpy(&nHash, &hash, 2);
+
+        LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
+
+        std::vector<CTxIn> vecLastPayments;
+        BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
         {
-            CMasternode* pmn = mnodeman.Find(vinLP);
-            if(pmn != NULL)
-            {
-                pmn->Check();
-                if(!pmn->IsEnabled()) continue;
+            //if we already have the same vin - we have one full payment cycle, break
+            if(vecLastPayments.size() > (unsigned int)nMinimumAge) break;
+            vecLastPayments.push_back(winner.vin);
+        }
+
+        // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
+        CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
+        if(pmn != NULL)
+        {
+            LogPrintf(" Found by FindOldestNotInVec \n");
 
-                newWinner.score = 0;
-                newWinner.nBlockHeight = nBlockHeight;
-                newWinner.vin = pmn->vin;
+            newWinner.nBlockHeight = nBlockHeight;
 
-                if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-                    newWinner.payee = pmn->donationAddress;
-                } else {
-                    newWinner.payee = GetScriptForDestination(pmn->pubkey.GetID());
-                }
+            CScript payee;
+            if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
+                payee = pmn->donationAddress;
+            } else {
+                payee = GetScriptForDestination(pmn->pubkey.GetID());
+            }
+            newWinner.AddPayee(payee, masternodePayment);
+        }
 
-                payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+        //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
+        if(newWinner.nBlockHeight == 0 && nMinimumAge > 0)
+        {
+            LogPrintf(" Find by reverse \n");
 
-                break; // we found active MN
+            BOOST_REVERSE_FOREACH(CTxIn& vinLP, vecLastPayments)
+            {
+                CMasternode* pmn = mnodeman.Find(vinLP);
+                if(pmn != NULL)
+                {
+                    pmn->Check();
+                    if(!pmn->IsEnabled()) continue; 
+                    if(pmn->SecondsSincePayment() < 60*60*24) continue;
+
+                    newWinner.nBlockHeight = nBlockHeight;
+
+                    CScript payee;
+                    if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
+                        payee = pmn->donationAddress;
+                    } else {
+                        payee = GetScriptForDestination(pmn->pubkey.GetID());
+                    }
+                    newWinner.AddPayee(payee, masternodePayment);
+
+                    break; // we found active MN
+                }
             }
         }
-    }
 
-    if(newWinner.nBlockHeight == 0) return false;
+        if(newWinner.nBlockHeight == 0) return false;
+
+        CTxDestination address1;
+        ExtractDestination(newWinner.payee, address1);
+        CBitcoinAddress address2(address1);
+
+        CTxDestination address3;
+        ExtractDestination(payeeSource, address3);
+        CBitcoinAddress address4(address3);
 
-    CTxDestination address1;
-    ExtractDestination(newWinner.payee, address1);
-    CBitcoinAddress address2(address1);
+        LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+    }
 
-    CTxDestination address3;
-    ExtractDestination(payeeSource, address3);
-    CBitcoinAddress address4(address3);
+    std::string errorMessage;
+    CPubKey pubKeyMasternode;
+    CKey keyMasternode;
 
-    LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+    {
+        LogPrintf("CMasternodePayments::ProcessBlock() - Error upon calling SetKey: %s\n", errorMessage.c_str());
+        return false;
+    }
 
-    if(Sign(newWinner))
+    if(Sign(keyMasternode, pubKeyMasternode))
     {
         if(AddWinningMasternode(newWinner))
         {
-            Relay(newWinner);
+            newWinner.Relay();
             nLastBlockHeight = nBlockHeight;
             return true;
         }
     }
-
+*/
     return false;
 }
 
-
-void CMasternodePayments::Relay(CMasternodePaymentWinner& winner)
+void CMasternodePaymentWinner::Relay()
 {
-    CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
+    CInv inv(MSG_MASTERNODE_WINNER, GetHash());
 
     vector<CInv> vInv;
     vInv.push_back(inv);
@@ -329,30 +402,34 @@ void CMasternodePayments::Relay(CMasternodePaymentWinner& winner)
     }
 }
 
-void CMasternodePayments::Sync(CNode* node)
+bool CMasternodePaymentWinner::SignatureValid()
 {
-    LOCK(cs_masternodepayments);
-
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning)
-        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
-            node->PushMessage("mnw", winner);
-}
 
+    CMasternode* pmn = mnodeman.Find(vinMasternode);
 
-bool CMasternodePayments::SetPrivKey(std::string strPrivKey)
-{
-    CMasternodePaymentWinner winner;
+    if(pmn != NULL)
+    {
+        std::string strMessage =  vinMasternode.prevout.ToStringShort() +
+                    boost::lexical_cast<std::string>(nBlockHeight) + 
+                    payee.ToString();
 
-    // Test signing successful, proceed
-    strMasterPrivKey = strPrivKey;
 
-    Sign(winner);
+        std::string errorMessage = "";
+        if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)){
+            return error("CMasternodePaymentWinner::SignatureValid() - Got bad Masternode address signature %s \n", vinMasternode.ToString().c_str());
+        }
 
-    if(CheckSignature(winner)){
-        LogPrintf("CMasternodePayments::SetPrivKey - Successfully initialized as Masternode payments master\n");
-        enabled = true;
         return true;
-    } else {
-        return false;
     }
+
+    return false;
 }
+
+void CMasternodePayments::Sync(CNode* node)
+{
+    LOCK(cs_masternodepayments);
+/*
+    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning)
+        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
+            node->PushMessage("mnw", winner);*/
+}
\ No newline at end of file
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index cd61e46f9ef3..93b24d1f13b5 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -6,59 +6,147 @@
 #ifndef MASTERNODE_PAYMENTS_H
 #define MASTERNODE_PAYMENTS_H
 
-#include "sync.h"
-#include "net.h"
+//#include "sync.h"
+//#include "net.h"
 #include "key.h"
-#include "util.h"
-#include "base58.h"
+//#include "util.h"
+//#include "base58.h"
 #include "main.h"
 #include "masternode.h"
-#include "masternode-pos.h"
-#include "timedata.h"
+//#include "masternode-pos.h"
+//#include "timedata.h"
 
 using namespace std;
 
 class CMasternodePayments;
 class CMasternodePaymentWinner;
+class CMasternodeBlockPayees;
 
 extern CMasternodePayments masternodePayments;
-extern map<uint256, CMasternodePaymentWinner> mapSeenMasternodeVotes;
+extern std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
+extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
+
+static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
+#define MNPAYMENTS_SIGNATURES_REQUIRED           11
+#define MNPAYMENTS_SIGNATURES_TOTAL              20
 
 void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
+bool IsReferenceNode(CTxIn& vin);
+
+class CMasternodePayee : public CTxOut
+{
+public:
+    int nVotes;
+
+    CMasternodePayee() {
+        scriptPubKey = CScript();
+        nValue = 0;
+        nVotes = 0;
+    }
+
+    CMasternodePayee(CAmount nValue, CScript payee) {
+        scriptPubKey = payee;
+        nValue = nValue;
+        nVotes = 0;
+    }
+};
+
+// Keep track of votes for payees from masternodes
+class CMasternodeBlockPayees
+{
+public:
+    int nBlockHeight;
+    std::vector<CMasternodePayee> vecPayments;
+
+    CMasternodeBlockPayees(){
+        nBlockHeight = 0;
+        vecPayments.clear();
+    }
+    CMasternodeBlockPayees(int nBlockHeightIn) {
+        nBlockHeight = nBlockHeightIn;
+        vecPayments.clear();
+    }
+
+    void AddPayee(CScript payeeIn, int64_t nAmount, int nIncrement){
+        BOOST_FOREACH(CMasternodePayee& payee, vecPayments){
+            if(payee.scriptPubKey == payeeIn && payee.nValue == nAmount) {
+                payee.nVotes += nIncrement;
+                return;
+            }
+        }
+
+        CMasternodePayee c((CAmount)nAmount, payeeIn);
+        vecPayments.push_back(c);
+    }
 
+    bool GetPayee(CScript& payee)
+    {
+        int nVotes = -1;
+        BOOST_FOREACH(CMasternodePayee& p, vecPayments){
+            if(p.nVotes > nVotes){
+                payee = p.scriptPubKey; 
+                nVotes = p.nVotes;
+            }
+        }        
+
+        return nVotes > -1;
+    }
+
+    bool IsTransactionValid(const CTransaction& txNew);
+    std::string GetRequiredPaymentsString();
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(nBlockHeight);
+        READWRITE(vecPayments);
+     }
+};
 
 // for storing the winning payments
 class CMasternodePaymentWinner
 {
 public:
+    CTxIn vinMasternode;
+
     int nBlockHeight;
-    CTxIn vin;
-    CScript payee;
+    CTxOut payee;
     std::vector<unsigned char> vchSig;
-    uint64_t score;
 
     CMasternodePaymentWinner() {
         nBlockHeight = 0;
-        score = 0;
-        vin = CTxIn();
-        payee = CScript();
+        vinMasternode = CTxIn();
+        payee = CTxOut();
+    }
+
+    CMasternodePaymentWinner(CTxIn vinIn) {
+        nBlockHeight = 0;
+        vinMasternode = vinIn;
+        payee = CTxOut();
     }
 
     uint256 GetHash(){
-        uint256 n2 = HashX11(BEGIN(nBlockHeight), END(nBlockHeight));
-        uint256 n3 = vin.prevout.hash > n2 ? (vin.prevout.hash - n2) : (n2 - vin.prevout.hash);
+        return Hash(BEGIN(payee), END(payee));
+    }
 
-        return n3;
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    bool IsValid();
+    bool SignatureValid();
+    void Relay();
+
+    void AddPayee(CScript payeeIn, int64_t nAmount){
+        payee.scriptPubKey = payeeIn;
+        payee.nValue = nAmount;
     }
 
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vinMasternode);
         READWRITE(nBlockHeight);
         READWRITE(payee);
-        READWRITE(vin);
-        READWRITE(score);
         READWRITE(vchSig);
      }
 };
@@ -71,37 +159,29 @@ class CMasternodePaymentWinner
 class CMasternodePayments
 {
 private:
-    std::vector<CMasternodePaymentWinner> vWinning;
     int nSyncedFromPeer;
-    std::string strMasterPrivKey;
-    bool enabled;
     int nLastBlockHeight;
 
 public:
 
     CMasternodePayments() {
-        enabled = false;
+        nSyncedFromPeer = 0;
+        nLastBlockHeight = 0;
     }
 
-    bool SetPrivKey(std::string strPrivKey);
-    bool CheckSignature(CMasternodePaymentWinner& winner);
-    bool Sign(CMasternodePaymentWinner& winner);
-
-    // Deterministically calculate a given "score" for a masternode depending on how close it's hash is
-    // to the blockHeight. The further away they are the better, the furthest will win the election
-    // and get paid this block
-    //
-
-    uint64_t CalculateScore(uint256 blockHash, CTxIn& vin);
-    bool GetWinningMasternode(int nBlockHeight, CTxIn& vinOut);
     bool AddWinningMasternode(CMasternodePaymentWinner& winner);
     bool ProcessBlock(int nBlockHeight);
-    void Relay(CMasternodePaymentWinner& winner);
+    
     void Sync(CNode* node);
     void CleanPaymentList();
     int LastPayment(CMasternode& mn);
 
-    bool GetBlockPayee(int nBlockHeight, CScript& payee, CTxIn& vin);
+    bool GetBlockPayee(int nBlockHeight, CScript& payee);
+    bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
+
+    void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
+    std::string GetRequiredPaymentsString(int nBlockHeight);
+
 };
 
 
diff --git a/src/masternode.cpp b/src/masternode.cpp
index f5729467d8bf..90a9c6bb5419 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -15,7 +15,6 @@ map<uint256, int> mapSeenMasternodeScanningErrors;
 // cache block hashes as we calculate them
 std::map<int64_t, uint256> mapCacheBlockHashes;
 
-
 struct CompareValueOnly
 {
     bool operator()(const pair<int64_t, CTxIn>& t1,
@@ -83,10 +82,9 @@ CMasternode::CMasternode()
     nLastDsq = 0;
     donationAddress = CScript();
     donationPercentage = 0;
-    nVote = 0;
-    lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
+    nVotedTimes = 0;
 
     //mark last paid as current for new entries
     nLastPaid = GetAdjustedTime();
@@ -112,11 +110,10 @@ CMasternode::CMasternode(const CMasternode& other)
     nLastDsq = other.nLastDsq;
     donationAddress = other.donationAddress;
     donationPercentage = other.donationPercentage;
-    nVote = other.nVote;
-    lastVote = other.lastVote;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
     nLastPaid = other.nLastPaid;
+    nVotedTimes = other.nVotedTimes;
 }
 
 CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
@@ -139,11 +136,10 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     nLastDsq = 0;
     donationAddress = newDonationAddress;
     donationPercentage = newDonationPercentage;
-    nVote = 0;
-    lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
     nLastPaid = GetAdjustedTime();    
+    nVotedTimes = 0;
 }
 
 CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
@@ -166,11 +162,10 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     nLastDsq = 0;
     donationAddress = mnb.donationAddress;
     donationPercentage = mnb.donationPercentage;
-    nVote = 0;
-    lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
     nLastPaid = mnb.nLastPaid;
+    nVotedTimes = 0;
 }
 
 //
@@ -272,8 +267,6 @@ CMasternodeBroadcast::CMasternodeBroadcast()
     nLastDsq = 0;
     donationAddress = CScript();
     donationPercentage = 0;
-    nVote = 0;
-    lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
 
@@ -300,8 +293,6 @@ CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubK
     nLastDsq = 0;
     donationAddress = newDonationAddress;
     donationPercentage = newDonationPercentage;
-    nVote = 0;
-    lastVote = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
     nLastPaid = GetAdjustedTime();  
@@ -326,8 +317,6 @@ CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
     nLastDsq = other.nLastDsq;
     donationAddress = other.donationAddress;
     donationPercentage = other.donationPercentage;
-    nVote = other.nVote;
-    lastVote = other.lastVote;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
     nLastPaid = other.nLastPaid;
@@ -481,9 +470,14 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
 
 void CMasternodeBroadcast::Relay(bool fRequested)
 {
+    CInv inv(MSG_MASTERNODE_ANNOUNCE, GetHash());
+
+    vector<CInv> vInv;
+    vInv.push_back(inv);
     LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("mnb", (*this), fRequested);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
 }
 
 bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
@@ -591,9 +585,12 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
 
 void CMasternodePing::Relay()
 {
-    //const CTxIn vin, const std::vector<unsigned char> vchSig, const int64_t nNow, const bool stop
+    CInv inv(MSG_MASTERNODE_PING, GetHash());
 
+    vector<CInv> vInv;
+    vInv.push_back(inv);
     LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
-        pnode->PushMessage("mnp", (*this));
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
 }
\ No newline at end of file
diff --git a/src/masternode.h b/src/masternode.h
index 52b343d6fce2..c37c32aca085 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -77,11 +77,10 @@ class CMasternode
     int64_t nLastDsq; //the dsq count from the last dsq broadcast of this node
     CScript donationAddress;
     int donationPercentage;
-    int nVote;
-    int64_t lastVote;
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
     int64_t nLastPaid;
+    int nVotedTimes;
 
     CMasternode();
     CMasternode(const CMasternode& other);
@@ -113,11 +112,10 @@ class CMasternode
         swap(first.nLastDsq, second.nLastDsq);
         swap(first.donationAddress, second.donationAddress);
         swap(first.donationPercentage, second.donationPercentage);
-        swap(first.nVote, second.nVote);
-        swap(first.lastVote, second.lastVote);
         swap(first.nScanningErrorCount, second.nScanningErrorCount);
         swap(first.nLastScanningErrorBlockHeight, second.nLastScanningErrorBlockHeight);
         swap(first.nLastPaid, second.nLastPaid);
+        swap(first.nVotedTimes, second.nVotedTimes);
     }
 
     CMasternode& operator=(CMasternode from)
@@ -160,10 +158,9 @@ class CMasternode
             READWRITE(unitTest);
             READWRITE(allowFreeTx);
             READWRITE(nLastDsq);
-            READWRITE(nVote);
-            READWRITE(lastVote);
             READWRITE(nScanningErrorCount);
             READWRITE(nLastScanningErrorBlockHeight);
+            READWRITE(nVotedTimes);
     }
 
     int64_t SecondsSincePayment()
@@ -282,9 +279,14 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(protocolVersion);
         READWRITE(donationAddress);
         READWRITE(donationPercentage);
-        READWRITE(nLastPaid);
     }
     
+    uint256 GetHash(){
+         return Hash(
+            BEGIN(sigTime), END(sigTime), 
+            BEGIN(pubkey), END(pubkey)
+        );
+    }
 
 };
 
@@ -316,7 +318,10 @@ class CMasternodePing
 
     bool CheckAndUpdate(int& nDos);
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    void Relay();
+    void Relay();    
 
+    uint256 GetHash(){
+         return Hash(BEGIN(vin), END(vin), BEGIN(sigTime), END(sigTime));
+    }
 };
 #endif
\ No newline at end of file
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 7f3c173b7569..b4eda2fc544e 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -16,6 +16,12 @@ CCriticalSection cs_process_message;
 /** Masternode manager */
 CMasternodeMan mnodeman;
 
+// Keep track of all broadcasts I've seen
+map<uint256, CMasternodeBroadcast> mapSeenMasternodeBroadcast;
+
+// Keep track of all pings I've seen
+map<uint256, CMasternodePing> mapSeenMasternodePing;
+
 struct CompareValueOnly
 {
     bool operator()(const pair<int64_t, CTxIn>& t1,
@@ -385,6 +391,12 @@ CMasternode *CMasternodeMan::FindRandom()
     return &vMasternodes[GetRandInt(vMasternodes.size())];
 }
 
+void CMasternodeMan::DecrementVotedTimes()
+{
+    BOOST_FOREACH(CMasternode& mn, vMasternodes)
+        if(--mn.nVotedTimes < 0) mn.nVotedTimes = 0; 
+}
+
 CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight, int minProtocol)
 {
     unsigned int score = 0;
@@ -550,6 +562,9 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         bool fRequested; //specifically requested?
         vRecv >> mnb >> fRequested;
 
+        if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) return; //seen
+        mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+
         int nDoS = 0;
         if(!mnb.CheckAndUpdate(nDoS, fRequested)){
 
@@ -589,7 +604,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternodePing mnp;
         vRecv >> mnp;
 
-        if(fDebug) LogPrintf("mnping - Received: vin: %s sigTime: %lld\n", mnp.vin.ToString().c_str(), mnp.sigTime);
+        if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
+        mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
         int nDoS = 0;
         if(!mnp.CheckAndUpdate(nDoS))
@@ -617,40 +633,6 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
         mWeAskedForMasternodeListEntry[mnp.vin.prevout] = askAgain;
 
-    } else if (strCommand == "mvote") { //Masternode Vote
-
-        CTxIn vin;
-        vector<unsigned char> vchSig;
-        int nVote;
-        vRecv >> vin >> vchSig >> nVote;
-
-        // see if we have this Masternode
-        CMasternode* pmn = this->Find(vin);
-        if(pmn != NULL)
-        {
-            if((GetAdjustedTime() - pmn->lastVote) > (60*60))
-            {
-                std::string strMessage = vin.ToString() + boost::lexical_cast<std::string>(nVote);
-
-                std::string errorMessage = "";
-                if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
-                {
-                    LogPrintf("mvote - Got bad Masternode address signature %s \n", vin.ToString().c_str());
-                    return;
-                }
-
-                pmn->nVote = nVote;
-                pmn->lastVote = GetAdjustedTime();
-
-                //send to all peers
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes)
-                    pnode->PushMessage("mvote", vin, vchSig, nVote);
-            }
-
-            return;
-        }
-
     } else if (strCommand == "dseg") { //Get Masternode list or specific entry
 
         CTxIn vin;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 2414ca3454f4..14fcd575fe6f 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -20,6 +20,12 @@ using namespace std;
 
 class CMasternodeMan;
 
+// Keep track of all broadcasts I've seen
+extern map<uint256, CMasternodeBroadcast> mapSeenMasternodeBroadcast;
+
+// Keep track of all pings I've seen
+extern map<uint256, CMasternodePing> mapSeenMasternodePing;
+
 extern CMasternodeMan mnodeman;
 void DumpMasternodes();
 
@@ -108,6 +114,9 @@ class CMasternodeMan
     /// Find a random entry
     CMasternode* FindRandom();
 
+    /// Decrement all masternode nVotedTimes, called 1/6 blocks (allowing for 100 votes each day)
+    void DecrementVotedTimes();
+
     /// Get the current winner for this block
     CMasternode* GetCurrentMasterNode(int mod=1, int64_t nBlockHeight=0, int minProtocol=0);
 
diff --git a/src/miner.cpp b/src/miner.cpp
index 8111e8e05f87..46f416f45e6d 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -141,9 +141,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
 
         if(bMasterNodePayment) {
             bool hasPayment = true;
-            CTxIn vin;
             //spork
-            if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, pblock->payee, vin)){
+            if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, pblock->payee)){
                 //no masternode detected
                 CMasternode* winningNode = mnodeman.GetCurrentMasterNode(1);
                 if(winningNode){
diff --git a/src/primitives/block.h b/src/primitives/block.h
index c166a3e8f211..4b935f007387 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -108,6 +108,7 @@ class CBlock : public CBlockHeader
         CBlockHeader::SetNull();
         vtx.clear();
         vMerkleTree.clear();
+        payee = CScript();
     }
 
     CBlockHeader GetBlockHeader() const
diff --git a/src/protocol.cpp b/src/protocol.cpp
index a51384a4ed8c..8ed77d66aad0 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -23,6 +23,11 @@ static const char* ppszTypeName[] =
     "tx lock vote",
     "spork",
     "masternode winner",
+    "masternode scan",
+    "masternode vote",
+    "masternode quorum",
+    "masternode announce",
+    "masternode ping",
     "unknown",
     "unknown",
     "unknown",
diff --git a/src/protocol.h b/src/protocol.h
index e76abbbef2e0..6af9f6f03bce 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -151,7 +151,11 @@ enum {
     MSG_TXLOCK_VOTE,
     MSG_SPORK,
     MSG_MASTERNODE_WINNER,
-    MSG_MASTERNODE_SCANNING_ERROR
+    MSG_MASTERNODE_SCANNING_ERROR,
+    MSG_MASTERNODE_VOTE,
+    MSG_MASTERNODE_QUORUM,
+    MSG_MASTERNODE_ANNOUNCE,
+    MSG_MASTERNODE_PING
 };
 
 #endif // BITCOIN_PROTOCOL_H
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
new file mode 100644
index 000000000000..a810f08e8589
--- /dev/null
+++ b/src/rpcmasternode-budget.cpp
@@ -0,0 +1,237 @@
+// Copyright (c) 2010 Satoshi Nakamoto
+// Copyright (c) 2009-2012 The Bitcoin developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "main.h"
+#include "db.h"
+#include "init.h"
+#include "activemasternode.h"
+#include "masternodeman.h"
+#include "masternode-payments.h"
+#include "masternode-budget.h"
+#include "masternodeconfig.h"
+#include "rpcserver.h"
+#include "utilmoneystr.h"
+
+#include <boost/lexical_cast.hpp>
+#include <fstream>
+using namespace json_spirit;
+using namespace std;
+
+Value mnbudget(const Array& params, bool fHelp)
+{
+    string strCommand;
+    if (params.size() >= 1)
+        strCommand = params[0].get_str();
+
+    if (fHelp  ||
+        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo"))
+        throw runtime_error(
+                "mnbudget \"command\"... ( \"passphrase\" )\n"
+                "Vote or show current budgets\n"
+                "\nAvailable commands:\n"
+                "  vote-many    - Vote on a Dash initiative\n"
+                "  vote         - Vote on a Dash initiative\n"
+                "  getvotes     - Show current masternode budgets\n"
+                "  getinfo      - Show current masternode budgets\n"
+                );
+
+    if(strCommand == "vote-many")
+    {
+/*        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 5)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME BLOCKSTART BLOCKEND XADDRESS AMOUNT YEA|NAY'");
+
+        std::string strProposalName = params[1].get_str();
+        if(strProposalName.size() > 20)
+            return "Invalid proposal name, limit of 20 characters.";
+
+        int nBlockStart = params[2].get_int();
+        int nBlockEnd   = params[3].get_int();
+        CBitcoinAddress address(params[4].get_str());
+        if (!address.IsValid())
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
+
+        CAmount nAmount = AmountFromValue(params[5]);
+        std::string strVote = params[6].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
+
+        int success = 0;
+        int failed = 0;
+
+        Object resultObj;
+
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            std::string errorMessage;
+            std::vector<unsigned char> vchMasterNodeSignature;
+            std::string strMasterNodeSignMessage;
+
+            CPubKey pubKeyCollateralAddress;
+            CKey keyCollateralAddress;
+            CPubKey pubKeyMasternode;
+            CKey keyMasternode;
+
+            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
+                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }
+
+            CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
+            if(pmn == NULL)
+            {
+                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }    
+
+            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+                return(" Error upon calling SetKey");
+
+            CBudgetVote vote(pmn->vin, strProposalName, nBlockStart, nBlockEnd, address, nAmount, nVote);
+            if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+                return "Failure to sign.";
+            }
+
+            success++;
+            vote.Relay();
+        }
+
+        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");*/
+    }
+
+    if(strCommand == "vote")
+    {
+       /* std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 5)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME BLOCKSTART BLOCKEND XADDRESS AMOUNT YEA|NAY'");
+
+        std::string strProposalName = params[1].get_str();
+
+        if(strProposalName.size() > 20)
+            return "Invalid proposal name, limit of 20 characters.";
+
+        int nBlockStart = params[2].get_int();
+        int nBlockEnd   = params[3].get_int();
+        CBitcoinAddress address(params[4].get_str());
+        if (!address.IsValid())
+            throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
+
+        CAmount nAmount = AmountFromValue(params[5]);
+        std::string strVote = params[6].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
+
+        CPubKey pubKeyMasternode;
+        CKey keyMasternode;
+        std::string errorMessage;
+
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+            return(" Error upon calling SetKey");
+
+        CBudgetVote vote(activeMasternode.vin, strProposalName, nBlockStart, nBlockEnd, address, nAmount, nVote);
+        if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+            return "Failure to sign.";
+        }
+
+        vote.Relay();*/
+
+    }
+
+    if(strCommand == "show")
+    {
+        std::string strProposalName = params[1].get_str();
+
+        CBudgetProposal* prop = budget.Find(strProposalName);
+
+        if(prop == NULL) return "Unknown proposal name";
+
+        Object resultObj;
+        int64_t nTotalAlloted = 0;
+
+        std::vector<CBudgetProposal*> winningProps = budget.GetBudget();
+        BOOST_FOREACH(CBudgetProposal* prop, winningProps)
+        {
+            nTotalAlloted += prop->GetAlloted();
+
+            Object bObj;
+            bObj.push_back(Pair("Name",  prop->GetName().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
+            bObj.push_back(Pair("PaymentAddress",  prop->GetPaymentAddress()));
+            bObj.push_back(Pair("Ratio",  prop->GetRatio()));
+            bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
+            bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
+            bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
+            bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAlloted()));
+            bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAlloted));
+            resultObj.push_back(Pair("masternode", bObj));
+        }
+
+        return resultObj;
+    }
+
+    if(strCommand == "getinfo")
+    {
+        if (params.size() != 2)
+            throw runtime_error("Correct usage of getinfo is 'mnbudget getinfo profilename'");
+
+        std::string strProposalName = params[1].get_str();
+
+        CBudgetProposal* prop = budget.Find(strProposalName);
+
+        if(prop == NULL) return "Unknown proposal name";
+
+        Object obj;
+        obj.push_back(Pair("Name",  prop->GetName().c_str()));
+        obj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
+        obj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
+        obj.push_back(Pair("PaymentAddress",  prop->GetPaymentAddress()));
+        obj.push_back(Pair("Ratio",  prop->GetRatio()));
+        obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
+        obj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
+        obj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
+        obj.push_back(Pair("Alloted",  (int64_t)prop->GetAlloted()));
+
+        return obj;
+    }
+
+    if(strCommand == "getvotes")
+    {
+        
+        if (params.size() != 2)
+            throw runtime_error("Correct usage of getvotes is 'mnbudget getinfo profilename'");
+
+        std::string strProposalName = params[1].get_str();
+
+        CBudgetProposal* prop = budget.Find(strProposalName);
+
+        if(prop == NULL) return "Unknown proposal name";
+
+        Object obj;
+   
+        int c = 0;
+
+  /*      map<uint256, CBudgetVote>::iterator it = prop->mapVotes.begin();
+        for(it != prop->mapVotes.end()){
+            obj.push_back(Pair((*it).second.nProposalName.c_str(),  (*it).second.GetVoteString().c_str()));
+        }*/
+
+        return obj;
+    }
+
+    return Value::null;
+}
+
diff --git a/src/rpcdarksend.cpp b/src/rpcmasternode.cpp
similarity index 79%
rename from src/rpcdarksend.cpp
rename to src/rpcmasternode.cpp
index 33b6bf16e6cf..330e43eab5cd 100644
--- a/src/rpcdarksend.cpp
+++ b/src/rpcmasternode.cpp
@@ -9,6 +9,7 @@
 #include "activemasternode.h"
 #include "masternodeman.h"
 #include "masternode-payments.h"
+#include "masternode-budget.h"
 #include "masternodeconfig.h"
 #include "rpcserver.h"
 #include "utilmoneystr.h"
@@ -126,8 +127,10 @@ Value masternode(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" && strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce"
-            && strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && strCommand != "outputs" && strCommand != "vote-many" && strCommand != "vote"))
+        (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" &&
+         strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce" &&
+        strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && 
+        strCommand != "outputs"))
         throw runtime_error(
                 "masternode \"command\"... ( \"passphrase\" )\n"
                 "Set of commands to execute masternode related actions\n"
@@ -147,8 +150,6 @@ Value masternode(const Array& params, bool fHelp)
                 "  list         - Print list of all known masternodes (see masternodelist for more info)\n"
                 "  list-conf    - Print masternode.conf in JSON format\n"
                 "  winners      - Print list of masternode winners\n"
-                "  vote-many    - Vote on a Dash initiative\n"
-                "  vote         - Vote on a Dash initiative\n"
                 );
 
     if (strCommand == "list")
@@ -158,6 +159,11 @@ Value masternode(const Array& params, bool fHelp)
         return masternodelist(newParams, fHelp);
     }
 
+    if (strCommand == "budget")
+    {
+        return "Show budgets";
+    }
+
     if (strCommand == "count")
     {
         if (params.size() > 2){
@@ -387,28 +393,10 @@ Value masternode(const Array& params, bool fHelp)
     if (strCommand == "winners")
     {
         Object obj;
-        std::string strMode = "addr";
-    
-        if (params.size() >= 1) strMode = params[0].get_str();
 
         for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
         {
-            CScript payee;
-            CTxIn vin;
-            if(masternodePayments.GetBlockPayee(nHeight, payee, vin)){
-                CTxDestination address1;
-                ExtractDestination(payee, address1);
-                CBitcoinAddress address2(address1);
-
-                if(strMode == "addr")
-                    obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       address2.ToString().c_str()));
-
-                if(strMode == "vin")
-                    obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       vin.ToString().c_str()));
-
-            } else {
-                obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       ""));
-            }
+            obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       masternodePayments.GetRequiredPaymentsString(nHeight).c_str()));
         }
 
         return obj;
@@ -473,115 +461,6 @@ Value masternode(const Array& params, bool fHelp)
 
     }
 
-    if(strCommand == "vote-many")
-    {
-        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
-        mnEntries = masternodeConfig.getEntries();
-
-        if (params.size() != 2)
-            throw runtime_error("You can only vote 'yea' or 'nay'");
-
-        std::string vote = params[1].get_str().c_str();
-        if(vote != "yea" && vote != "nay") return "You can only vote 'yea' or 'nay'";
-        int nVote = 0;
-        if(vote == "yea") nVote = 1;
-        if(vote == "nay") nVote = -1;
-
-
-        int success = 0;
-        int failed = 0;
-
-        Object resultObj;
-
-        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-            std::string errorMessage;
-            std::vector<unsigned char> vchMasterNodeSignature;
-            std::string strMasterNodeSignMessage;
-
-            CPubKey pubKeyCollateralAddress;
-            CKey keyCollateralAddress;
-            CPubKey pubKeyMasternode;
-            CKey keyMasternode;
-
-            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
-                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
-
-            CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
-            if(pmn == NULL)
-            {
-                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
-
-            std::string strMessage = pmn->vin.ToString() + boost::lexical_cast<std::string>(nVote);
-
-            if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyMasternode)){
-                printf(" Error upon calling SignMessage for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
-
-            if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, errorMessage)){
-                printf(" Error upon calling VerifyMessage for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
-
-            success++;
-
-            //send to all peers
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-                pnode->PushMessage("mvote", pmn->vin, vchMasterNodeSignature, nVote);
-        }
-
-        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
-    }
-
-    if(strCommand == "vote")
-    {
-        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
-        mnEntries = masternodeConfig.getEntries();
-
-        if (params.size() != 2)
-            throw runtime_error("You can only vote 'yea' or 'nay'");
-
-        std::string vote = params[1].get_str().c_str();
-        if(vote != "yea" && vote != "nay") return "You can only vote 'yea' or 'nay'";
-        int nVote = 0;
-        if(vote == "yea") nVote = 1;
-        if(vote == "nay") nVote = -1;
-
-        // Choose coins to use
-        CPubKey pubKeyCollateralAddress;
-        CKey keyCollateralAddress;
-        CPubKey pubKeyMasternode;
-        CKey keyMasternode;
-
-        std::string errorMessage;
-        std::vector<unsigned char> vchMasterNodeSignature;
-        std::string strMessage = activeMasternode.vin.ToString() + boost::lexical_cast<std::string>(nVote);
-
-        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
-
-        if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, keyMasternode))
-            return(" Error upon calling SignMessage");
-
-        if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, errorMessage))
-            return(" Error upon calling VerifyMessage");
-
-        //send to all peers
-        LOCK(cs_vNodes);
-        BOOST_FOREACH(CNode* pnode, vNodes)
-            pnode->PushMessage("mvote", activeMasternode.vin, vchMasterNodeSignature, nVote);
-
-    }
-
     return Value::null;
 }
 
@@ -618,8 +497,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  addr           - Print ip address associated with a masternode (can be additionally filtered, partial match)\n"
-                "  votes          - Print all masternode votes for a Dash initiative (can be additionally filtered,\n"
-                "                   partial match)\n"
                 "  lastpaid       - The last time a node was paid on the network\n"
                 );
     }
@@ -708,18 +585,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       mn.addr.ToString().c_str()));
-            } else if(strMode == "votes"){
-                std::string strStatus = "ABSTAIN";
-
-                //voting lasts 7 days, ignore the last vote if it was older than that
-                if((GetAdjustedTime() - mn.lastVote) < (60*60*8))
-                {
-                    if(mn.nVote == -1) strStatus = "NAY";
-                    if(mn.nVote == 1) strStatus = "YEA";
-                }
-
-                if(strFilter !="" && (strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos)) continue;
-                obj.push_back(Pair(strVin,       strStatus.c_str()));
             } else if(strMode == "lastpaid"){
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index eae37079696e..c54eab560c0e 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -311,6 +311,7 @@ static const CRPCCommand vRPCCommands[] =
     /* Dash features */
     { "dash",               "spork",                  &spork,                  true,      false,      false },
     { "dash",               "masternode",             &masternode,             true,      false,      true  },
+    { "dash",               "mnbudget",               &mnbudget,               true,      false,      false },
     { "dash",               "masternodelist",         &masternodelist,         true,      false,      false },
 #ifdef ENABLE_WALLET
     { "dash",               "darksend",               &darksend,               false,     false,      true  },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 396730128c68..72f1fc2bbc74 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -230,6 +230,7 @@ extern json_spirit::Value darksend(const json_spirit::Array& params, bool fHelp)
 extern json_spirit::Value spork(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value masternode(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value masternodelist(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value mnbudget(const json_spirit::Array& params, bool fHelp);
 
 // in rest.cpp
 extern bool HTTPReq_REST(AcceptedConnection *conn,

From b02d5260fdc03d560ed9ab3162150bc0b0ae8fe7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 30 Apr 2015 10:11:34 -0700
Subject: [PATCH 1344/1819] fixed most of the budget functions

---
 src/masternode-budget.cpp      | 238 ++++++++++++++++-----------------
 src/masternode-budget.h        |  10 +-
 src/primitives/transaction.cpp |   5 +
 src/primitives/transaction.h   |   2 +
 src/rpcmasternode-budget.cpp   |  12 +-
 5 files changed, 137 insertions(+), 130 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 5ebf71552252..e84fd1b5e534 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -308,31 +308,31 @@ bool CBudgetVote::SignatureValid()
 
 void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
 {
-   // LOCK(cs);
+    LOCK(cs);
 
-   //  uint256 hash = GetBudgetProposalHash(vote.strProposalName);
+    uint256 hash = GetBudgetProposalHash(vote.strProposalName);
 
-   //  if(!mapProposals.count(hash)){
-   //  	CBudgetProposal prop(vote.strProposalName);
-   //  	mapProposals.insert(make_pair(hash, prop));
-   //  	return;
-   //  }
+    if(!mapProposals.count(hash)){
+    	CBudgetProposal prop(vote.strProposalName);
+    	//mapProposals.insert(make_pair(hash, prop));
+    	return;
+    }
 
-  	// mapProposals[hash].AddOrUpdateVote(vote);
+  	mapProposals[hash].AddOrUpdateVote(vote);
 }
 
 void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
 {
-    // LOCK(cs);
+    LOCK(cs);
 
-    // uint256 hash = vote.vin.prevout.GetHash();
+    uint256 hash = vote.vin.prevout.GetHash();
 
-    // if(!mapProposals.count(hash)){
-    //     mapProposals.insert(make_pair(hash, vote));
-    //     return;
-    // }
+    if(!mapVotes.count(hash)){
+        mapVotes.insert(make_pair(hash, vote));
+        return;
+    }
 
-    // vote[hash] = vote;    
+    mapVotes[hash] = vote;    
 }
 
 inline void CBudgetManager::NewBlock()
@@ -345,11 +345,11 @@ inline void CBudgetManager::NewBlock()
 
 CBudgetProposal *CBudgetManager::Find(const std::string &strProposalName)
 {
-    // uint256 hash = GetBudgetProposalHash(vote.strProposalName);
+    uint256 hash = GetBudgetProposalHash(strProposalName);
 
-    // if(mapProposals.count(hash)){
-    // 	return &mapProposals[hash];
-    // }
+    if(mapProposals.count(hash)){
+    	return &mapProposals[hash];
+    }
 
     return NULL;
 }
@@ -359,6 +359,11 @@ CBudgetProposal::CBudgetProposal()
     strProposalName = "";
 }
 
+CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
+{
+    strProposalName = other.strProposalName;
+}
+
 CBudgetProposal::CBudgetProposal(std::string strProposalNameIn)
 {
 	strProposalName = strProposalNameIn;
@@ -371,38 +376,43 @@ std::string CBudgetProposal::GetName()
 
 int CBudgetProposal::GetBlockStart()
 {
-	/*std::map<int, int> mapList;
+	std::map<int, int> mapList;
+
+
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
-    map<uint256, CBudgetVote>::iterator it;
-    for(it=mapVotes.begin();it<mapVotes.end();it++){
-        if ((*it)->second.mapVotes.nVote != VOTE_YEA) continue;
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote != VOTE_YES) continue;
 
-        if(mapList.count((*it).nBlockStart)){
-        	mapList[(*it).nBlockStart]++;
+        if(mapList.count((*it).second.nBlockStart)){
+        	mapList[(*it).second.nBlockStart]++;
         } else {
-        	mapList[(*it)].insert(make_pair<(*it).nBlockStart, 1>);
+            mapList[(*it).second.nBlockStart] = 1;
         }
-    }*/
+    }
+
 
 	//sort(mapList.begin(), mapList.end());
-	// return myMap.begin()->second;
+	//return myMap.begin()->second;
+
     return 0;
 }
 
 int CBudgetProposal::GetBlockEnd()
 {
 	std::map<int, int> mapList;
+    
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++){
-    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote != VOTE_YES) continue;
 
-    //     if(mapList.count((*it).nBlockEnd)){
-    //     	mapList[(*it).nBlockEnd]++;
-    //     } else {
-    //     	mapList[(*it).nBlockEnd] = 1;
-    //     }
-    // }
+        if(mapList.count((*it).second.nBlockEnd)){
+            mapList[(*it).second.nBlockEnd]++;
+        } else {
+            mapList[(*it).second.nBlockEnd] = 1;
+        }
+    }
 
 	// sort(mapList.begin(), mapList.end());
 	// return myMap.begin()->first;
@@ -413,44 +423,47 @@ int64_t CBudgetProposal::GetAmount()
 {
 	std::map<int64_t, int> mapList;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++){
-    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
-    //     if(mapList.count((*it).nAmount)){
-    //     	mapList[(*it).nAmount]++;
-    //     } else {
-    //     	mapList[(*it).nAmount] = 1;
-    //     }
-    // }
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote != VOTE_YES) continue;
+
+        if(mapList.count((*it).second.nAmount)){
+            mapList[(*it).second.nAmount]++;
+        } else {
+            mapList[(*it).second.nAmount] = 1;
+        }
+    }
 
 	// sort(mapList.begin(), mapList.end());
 	// return myMap.begin()->first;
     return 0;
 }
 
-std::string CBudgetProposal::GetPaymentAddress()
+CScript CBudgetProposal::GetPayee()
 {
-	std::map<std::string, int> mapList;
+	std::map<CScript, int> mapList;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=prop->mapVotes.begin();it<prop->mapVotes.end();it++){
-    //     if ((*it)->second.nVote != VOTE_YEA) continue;
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
-    //     CTxDestination address1;
-    //     ExtractDestination((*it)->second.payee, address1);
-    //     CBitcoinAddress address2(address1);
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote != VOTE_YES) continue;
 
-    //     if(mapList.count(address2){
-    //     	mapList[address2]++;
-    //     } else {
-    //     	mapList[address2] = 1;
-    //     }
-    // }
+        CTxDestination address1;
+        ExtractDestination((*it).second.address, address1);
+        CBitcoinAddress address2(address1);
 
+        if(mapList.count((*it).second.address)){
+            mapList[(*it).second.address]++;
+        } else {
+            mapList[(*it).second.address] = 1;
+        }
+
+    }
+    
 	// sort(mapList.begin(), mapList.end());
 	// return myMap.begin()->first;
-    return 0;
+    return CScript();
 }
 
 double CBudgetProposal::GetRatio()
@@ -458,11 +471,12 @@ double CBudgetProposal::GetRatio()
 	int yeas = 0;
 	int nays = 0;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++){
-    //     if ((*it)->second.prop->mapVotes.nVote != VOTE_YEA) yeas++;
-    //     if ((*it)->second.nVote != VOTE_NAY) nays++;
-    // }
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote == VOTE_YES) yeas++;
+        if ((*it).second.nVote == VOTE_NO) nays++;
+    }
 
     return ((double)yeas / (double)yeas+nays);
 }
@@ -471,9 +485,9 @@ int CBudgetProposal::GetYeas()
 {
 	int ret = 0;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++)
-    //     if ((*it)->second.mapVotes.nVote != VOTE_YEA) ret++;
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    while(it != mapVotes.end())
+        if ((*it).second.nVote == VOTE_YES) ret++;
 
     return ret;
 }
@@ -482,9 +496,9 @@ int CBudgetProposal::GetNays()
 {
 	int ret = 0;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++)
-    //     if ((*it)->second.nVote != VOTE_NAY) ret++;
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    while(it != mapVotes.end())
+        if ((*it).second.nVote == VOTE_NO) ret++;
 
     return ret;
 }
@@ -493,9 +507,9 @@ int CBudgetProposal::GetAbstains()
 {
 	int ret = 0;
 
-    // map<uint256, CBudgetVote>::iterator it;
-    // for(it=mapVotes.begin();it<mapVotes.end();it++)
-    //     if ((*it)->second.mapVotes.nVote != VOTE_ABSTAIN) ret++;
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    while(it != mapVotes.end())
+        if ((*it).second.nVote == VOTE_ABSTAIN) ret++;
 
     return ret;
 }
@@ -511,28 +525,6 @@ bool CBudgetManager::IsBudgetPaymentBlock(int nHeight)
     return false;
 }
 
-void CBudgetManager::FillBlockTx(CMutableTransaction& txNew, int& payments)
-{
-/*	std::vector<CBudgetProposal*> budget = GetBudget();
-
-    LogPrintf("Masternode Budget payment to");
-
-	BOOST_FOREACH(CBudgetProposal* prop, budget){
-		payments++;
-	    txNew.vout.resize(payments);
-
-	    txNew.vout[payments-1].scriptPubKey = prop.GetPayee();
-	    txNew.vout[payments-1].nValue = prop.GetAmount();
-
-        CTxDestination address1;
-        ExtractDestination(pblock->payee, address1);
-        CBitcoinAddress address2(address1);
-
-        LogPrintf(" (%s|%d)", address2.ToString().c_str(), prop.GetAmount());
-	}
-	LogPrintf("\n");*/
-}
-
 int64_t CBudgetManager::GetTotalBudget()
 {
 	if(chainActive.Tip() == NULL) return 0;
@@ -541,40 +533,41 @@ int64_t CBudgetManager::GetTotalBudget()
 	return (GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, 0)/100)*15;
 }
 
+//Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
-/*	std::map<uint256, int> mapList;
+	std::map<uint256, int> mapList;
 
-    map<uint256, CBudgetProposal>::iterator it;
-    for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
-    	uint256 hash = GetBudgetProposalHash((*it)->second.strProposalName);
-        if(!mapList.count(hash)){
-        	mapList[hash] = (*it)->second.GetYeas();
-        }
+/*    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end())
+    	uint256 hash = GetBudgetProposalHash((*it).second.strProposalName);
+        mapList[hash] = (*it).second.GetYeas();
     }
 
     //sort by yeas
-	sort(mapList.begin(), mapList.end());*/
+	sort(mapList.begin(), mapList.end());
 
+    */
 	std::vector<CBudgetProposal*> ret;
-
-/*	int64_t nBudgetAllocated = 0;
+    /*
+	int64_t nBudgetAllocated = 0;
 	int64_t nTotalBudget = GetTotalBudget();
 
-    map<uint256, CBudgetProposal>::iterator it;
-    for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end())
+    {
     	if(nTotalBudget == nBudgetAllocated){
-    		(*it).SetAllotted(0);
-    	} else if((*it).GetAmount() + nBudgetAllocated <= nTotalBudget()) {
-    		(*it).SetAllotted((*it).GetAmount());
-    		nBudgetAllocated += (*it).GetAmount();
+    		(*it).second.SetAllotted(0);
+    	} else if((*it).second.GetAmount() + nBudgetAllocated <= nTotalBudget()) {
+    		(*it).second..SetAllotted((*it).GetAmount());
+    		nBudgetAllocated += (*it).second.GetAmount();
     	} else {
     		//couldn't pay for the entire budget, so it'll be partially paid.
-    		(*it).SetAllotted(nTotalBudget - nBudgetAllocated);
+    		(*it).second.SetAllotted(nTotalBudget - nBudgetAllocated);
     		nBudgetAllocated = nTotalBudget;
     	}
 
-    	ret.insert(make_pair((*it).strProposalName, &(*it)))
+    	ret.insert(make_pair((*it).second.strProposalName, &(*it)))
     }*/
 	return ret;
 }
@@ -582,16 +575,15 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 
 void CBudgetManager::Sync(CNode* node)
 {
-    // map<uint256, CBudgetProposal>::iterator it;
-    // for(it=prop->mapProposals.begin();it<prop->mapProposals.end();it++){
-    // 	(*it)->second.Sync(node);
-    // }
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end())
+     	(*it).second.Sync(node);
+
 }
 
 void CBudgetProposal::Sync(CNode* node)
 {
-  //   map<uint256, CBudgetVote>::iterator it;
-  //   for(it=mapVotes.begin();it<mapVotes.end();it++){
-		// node->PushMessage("mvote", mapVotes[(*it)->first]);    
-  //   }
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    while(it != mapVotes.end())
+        node->PushMessage("mvote", (*it).second);    
 }
\ No newline at end of file
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index df3ab581dd2e..f5f5b8bdc0e6 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -28,7 +28,7 @@ class CBudgetVote;
 extern CBudgetManager budget;
 
 void DumpBudgets();
-
+uint256 GetBudgetProposalHash(std::string strProposalName);
 
 /** Save Budget Manager (budget.dat)
  */
@@ -78,13 +78,12 @@ class CBudgetManager
     CBudgetProposal *Find(const std::string &strProposalName);
     inline void NewBlock();
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
-    uint256 GetBudgetProposalHash(std::string strProposalName);
+    
     void CleanUp();
 
     int64_t GetTotalBudget();
     std::vector<CBudgetProposal*> GetBudget();
     bool IsBudgetPaymentBlock(int nHeight);
-    void FillBlockTx(CMutableTransaction& txNew, int& payments);
     void AddOrUpdateProposal(CBudgetVote& vote);
 
     void Clear(){
@@ -114,7 +113,7 @@ class CBudgetProposal
 {
 private:
     // critical section to protect the inner data structures
-    //mutable CCriticalSection cs;
+    mutable CCriticalSection cs;
     int64_t nAlloted;
 
 public:
@@ -124,6 +123,7 @@ class CBudgetProposal
     //cache object
 
     CBudgetProposal();  
+    CBudgetProposal(const CBudgetProposal& other);
     CBudgetProposal(std::string strProposalNameIn);
 
     void Sync(CNode* node);
@@ -136,7 +136,7 @@ class CBudgetProposal
     std::string GetName();
     int GetBlockStart();
     int GetBlockEnd();
-    std::string GetPaymentAddress();
+    CScript GetPayee();
     double GetRatio();
     int GetYeas();
     int GetNays();
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
index b51a30ed9907..27c79cad06b4 100644
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -19,6 +19,11 @@ std::string COutPoint::ToStringShort() const
     return strprintf("%s-%u", hash.ToString().substr(0,64), n);
 }
 
+uint256 COutPoint::GetHash()
+{
+    return Hash(BEGIN(hash), END(hash), BEGIN(n), END(n));
+}
+
 CTxIn::CTxIn(COutPoint prevoutIn, CScript scriptSigIn, uint32_t nSequenceIn)
 {
     prevout = prevoutIn;
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index a9dc8defa35d..851bf7db84e7 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -49,6 +49,8 @@ class COutPoint
     std::string ToString() const;
     std::string ToStringShort() const;
 
+    uint256 GetHash();
+
 };
 
 /** An input of a transaction.  It contains the location of the previous
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index a810f08e8589..e141f2120b1b 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -166,11 +166,15 @@ Value mnbudget(const Array& params, bool fHelp)
         {
             nTotalAlloted += prop->GetAlloted();
 
+            CTxDestination address1;
+            ExtractDestination(prop->GetPayee(), address1);
+            CBitcoinAddress address2(address1);
+
             Object bObj;
             bObj.push_back(Pair("Name",  prop->GetName().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("PaymentAddress",  prop->GetPaymentAddress()));
+            bObj.push_back(Pair("PaymentAddress",  address2.ToString().c_str()));
             bObj.push_back(Pair("Ratio",  prop->GetRatio()));
             bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
@@ -194,11 +198,15 @@ Value mnbudget(const Array& params, bool fHelp)
 
         if(prop == NULL) return "Unknown proposal name";
 
+        CTxDestination address1;
+        ExtractDestination(prop->GetPayee(), address1);
+        CBitcoinAddress address2(address1);
+
         Object obj;
         obj.push_back(Pair("Name",  prop->GetName().c_str()));
         obj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
         obj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-        obj.push_back(Pair("PaymentAddress",  prop->GetPaymentAddress()));
+        obj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
         obj.push_back(Pair("Ratio",  prop->GetRatio()));
         obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
         obj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));

From 40adfbf2c9620c35d25c08734e73b0bf90622cb0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 30 Apr 2015 12:54:34 -0700
Subject: [PATCH 1345/1819] fixed

---
 src/masternode-budget.cpp    | 84 +++++++++++++++++++-----------------
 src/masternode-budget.h      |  4 +-
 src/rpcmasternode-budget.cpp | 18 ++++----
 3 files changed, 56 insertions(+), 50 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index e84fd1b5e534..88a34f1cf6c6 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -375,10 +375,9 @@ std::string CBudgetProposal::GetName()
 }
 
 int CBudgetProposal::GetBlockStart()
-{
+{   
 	std::map<int, int> mapList;
 
-
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
@@ -391,11 +390,10 @@ int CBudgetProposal::GetBlockStart()
         }
     }
 
-
-	//sort(mapList.begin(), mapList.end());
-	//return myMap.begin()->second;
-
-    return 0;
+    //sort the map and grab the highest count item
+    std::vector<std::pair<int,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
+	return vecList.begin()->second;
 }
 
 int CBudgetProposal::GetBlockEnd()
@@ -414,9 +412,10 @@ int CBudgetProposal::GetBlockEnd()
         }
     }
 
-	// sort(mapList.begin(), mapList.end());
-	// return myMap.begin()->first;
-    return 0;
+    //sort the map and grab the highest count item
+    std::vector<std::pair<int,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
+    return vecList.begin()->second;
 }
 
 int64_t CBudgetProposal::GetAmount()
@@ -435,9 +434,10 @@ int64_t CBudgetProposal::GetAmount()
         }
     }
 
-	// sort(mapList.begin(), mapList.end());
-	// return myMap.begin()->first;
-    return 0;
+    //sort the map and grab the highest count item
+    std::vector<std::pair<int64_t,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
+    return vecList.begin()->second;
 }
 
 CScript CBudgetProposal::GetPayee()
@@ -461,9 +461,10 @@ CScript CBudgetProposal::GetPayee()
 
     }
     
-	// sort(mapList.begin(), mapList.end());
-	// return myMap.begin()->first;
-    return CScript();
+    //sort the map and grab the highest count item
+    std::vector<std::pair<CScript,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
+    return vecList.begin()->second;
 }
 
 double CBudgetProposal::GetRatio()
@@ -536,39 +537,44 @@ int64_t CBudgetManager::GetTotalBudget()
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
+    // ------- Sort budgets by Yes Count
+
 	std::map<uint256, int> mapList;
 
-/*    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end())
-    	uint256 hash = GetBudgetProposalHash((*it).second.strProposalName);
-        mapList[hash] = (*it).second.GetYeas();
-    }
+        mapList[GetBudgetProposalHash((*it).second.strProposalName)] = (*it).second.GetYeas();
 
-    //sort by yeas
-	sort(mapList.begin(), mapList.end());
+    //sort the map and grab the highest count item
+    std::vector<std::pair<uint256,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
 
-    */
+    // ------- Grab The Budgets In Order
+    
 	std::vector<CBudgetProposal*> ret;
-    /*
+    
 	int64_t nBudgetAllocated = 0;
 	int64_t nTotalBudget = GetTotalBudget();
 
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end())
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end())
     {
-    	if(nTotalBudget == nBudgetAllocated){
-    		(*it).second.SetAllotted(0);
-    	} else if((*it).second.GetAmount() + nBudgetAllocated <= nTotalBudget()) {
-    		(*it).second..SetAllotted((*it).GetAmount());
-    		nBudgetAllocated += (*it).second.GetAmount();
-    	} else {
-    		//couldn't pay for the entire budget, so it'll be partially paid.
-    		(*it).second.SetAllotted(nTotalBudget - nBudgetAllocated);
-    		nBudgetAllocated = nTotalBudget;
-    	}
-
-    	ret.insert(make_pair((*it).second.strProposalName, &(*it)))
-    }*/
+        CBudgetProposal prop = (*it2).second;
+
+        if(nTotalBudget == nBudgetAllocated){
+            prop.SetAllotted(0);
+        } else if(prop.GetAmount() + nBudgetAllocated <= nTotalBudget) {
+            prop.SetAllotted(prop.GetAmount());
+            nBudgetAllocated += prop.GetAmount();
+        } else {
+            //couldn't pay for the entire budget, so it'll be partially paid.
+            prop.SetAllotted(nTotalBudget - nBudgetAllocated);
+            nBudgetAllocated = nTotalBudget;
+        }
+
+    	ret.push_back(&prop);
+    }
+
 	return ret;
 }
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index f5f5b8bdc0e6..09fee9c390a7 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -143,8 +143,8 @@ class CBudgetProposal
     int GetAbstains();
     int64_t GetAmount();
 
-    void SetAlloted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
-    int64_t GetAlloted() {return nAlloted;}
+    void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
+    int64_t GetAllotted() {return nAlloted;}
 
     ADD_SERIALIZE_METHODS;
 
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index e141f2120b1b..03679342b23d 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -159,12 +159,12 @@ Value mnbudget(const Array& params, bool fHelp)
         if(prop == NULL) return "Unknown proposal name";
 
         Object resultObj;
-        int64_t nTotalAlloted = 0;
+        int64_t nTotalAllotted = 0;
 
         std::vector<CBudgetProposal*> winningProps = budget.GetBudget();
         BOOST_FOREACH(CBudgetProposal* prop, winningProps)
         {
-            nTotalAlloted += prop->GetAlloted();
+            nTotalAllotted += prop->GetAllotted();
 
             CTxDestination address1;
             ExtractDestination(prop->GetPayee(), address1);
@@ -179,8 +179,8 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
-            bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAlloted()));
-            bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAlloted));
+            bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
+            bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAllotted));
             resultObj.push_back(Pair("masternode", bObj));
         }
 
@@ -211,7 +211,7 @@ Value mnbudget(const Array& params, bool fHelp)
         obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
         obj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
         obj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
-        obj.push_back(Pair("Alloted",  (int64_t)prop->GetAlloted()));
+        obj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
 
         return obj;
     }
@@ -232,10 +232,10 @@ Value mnbudget(const Array& params, bool fHelp)
    
         int c = 0;
 
-  /*      map<uint256, CBudgetVote>::iterator it = prop->mapVotes.begin();
-        for(it != prop->mapVotes.end()){
-            obj.push_back(Pair((*it).second.nProposalName.c_str(),  (*it).second.GetVoteString().c_str()));
-        }*/
+        std::map<uint256, CBudgetVote>::iterator it = prop->mapVotes.begin();
+        while(it != prop->mapVotes.end())
+            obj.push_back(Pair((*it).second.strProposalName.c_str(),  (*it).second.GetVoteString().c_str()));
+        
 
         return obj;
     }

From efca207c134516c5ddf7ce7b681ed983909a826f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 1 May 2015 20:17:14 +0300
Subject: [PATCH 1346/1819] Fix KGW (handle negative uint256 properly)

---
 src/main.cpp | 53 ++++++++++++++++----------------
 src/pow.cpp  | 87 ++++++++++++++++++++++++++++------------------------
 2 files changed, 73 insertions(+), 67 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2c3d860e9374..4aa7bdebf5ea 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3023,10 +3023,30 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
     int nHeight = pindexPrev->nHeight+1;
 
     // Check proof of work
-    if ((!Params().SkipProofOfWorkCheck()) &&
-       (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
-        return state.DoS(100, error("%s : incorrect proof of work", __func__),
-                         REJECT_INVALID, "bad-diffbits");
+//    if ((!Params().SkipProofOfWorkCheck()) &&
+//       (block.nBits != GetNextWorkRequired(pindexPrev, &block)))
+//        return state.DoS(100, error("%s : incorrect proof of work", __func__),
+//                         REJECT_INVALID, "bad-diffbits");
+    if(Params().NetworkID() == CBaseChainParams::TESTNET) {
+        if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
+            return state.DoS(100, error("%s : incorrect proof of work at %d", __func__, nHeight),
+                             REJECT_INVALID, "bad-diffbits");
+    } else {
+        // Check proof of work (Here for the architecture issues with DGW v1 and v2)
+        if(nHeight <= 68589){
+            unsigned int nBitsNext = GetNextWorkRequired(pindexPrev, &block);
+            double n1 = ConvertBitsToDouble(block.nBits);
+            double n2 = ConvertBitsToDouble(nBitsNext);
+
+            if (abs(n1-n2) > n1*0.5)
+                return state.DoS(100, error("%s : incorrect proof of work (DGW pre-fork) - %f %f %f at %d", __func__, abs(n1-n2), n1, n2, nHeight),
+                                REJECT_INVALID, "bad-diffbits");
+        } else {
+            if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
+                return state.DoS(100, error("%s : incorrect proof of work at %d", __func__, nHeight),
+                                REJECT_INVALID, "bad-diffbits");
+        }
+    }
 
     // Check timestamp against prev
     if (block.GetBlockTime() <= pindexPrev->GetMedianTimePast())
@@ -3126,27 +3146,6 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
     if (ppindex)
         *ppindex = pindex;
 
-    // ***TODO*** probably not the right place
-    if(Params().NetworkID() == CBaseChainParams::TESTNET) {
-        if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
-            return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
-                             REJECT_INVALID, "bad-diffbits");
-    } else {
-        // Check proof of work (Here for the architecture issues with DGW v1 and v2)
-        if(pindexPrev->nHeight+1 <= 68589){
-            unsigned int nBitsNext = GetNextWorkRequired(pindexPrev, &block);
-            double n1 = ConvertBitsToDouble(block.nBits);
-            double n2 = ConvertBitsToDouble(nBitsNext);
-            if (abs(n1-n2) > n1*0.5)
-                return state.DoS(100, error("AcceptBlock() : incorrect proof of work (DGW pre-fork) - %f", abs(n1-n2)),
-                                REJECT_INVALID, "bad-diffbits");
-        } else {
-            if (block.nBits != GetNextWorkRequired(pindexPrev, &block))
-                return state.DoS(100, error("AcceptBlock() : incorrect proof of work"),
-                                REJECT_INVALID, "bad-diffbits");
-        }
-    }
-
     return true;
 }
 
@@ -3293,7 +3292,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
                 CMasternode* pmn = mnodeman.Find(vin);
                 if(pmn != NULL) pmn->nLastPaid = GetAdjustedTime(); 
 
-                LogPrintf("ProcessBlock() : Update Masternode Last Paid Time - %d\n", chainActive.Tip()->nHeight);
+                LogPrintf("%s : Update Masternode Last Paid Time - %d\n", __func__, chainActive.Tip()->nHeight);
             }
 
 
@@ -3303,7 +3302,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         }
     }
 
-    LogPrintf("ProcessBlock: ACCEPTED\n");
+    LogPrintf("%s : ACCEPTED\n", __func__);
     return true;
 }
 
diff --git a/src/pow.cpp b/src/pow.cpp
index 83ff19a39770..ade2ec915c8d 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -13,7 +13,7 @@
 
 #include <math.h>
 
-unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast, const CBlockHeader *pblock, uint64_t PastBlocksMin, uint64_t PastBlocksMax) {
+unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast) {
     const CBlockIndex *BlockLastSolved = pindexLast;
     const CBlockIndex *BlockReading = pindexLast;
     uint64_t PastBlocksMass = 0;
@@ -26,39 +26,51 @@ unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast, const CBloc
     double EventHorizonDeviationFast;
     double EventHorizonDeviationSlow;
 
-    if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || (uint64_t)BlockLastSolved->nHeight < PastBlocksMin) { return Params().ProofOfWorkLimit().GetCompact(); }
-
-        for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
-                if (PastBlocksMax > 0 && i > PastBlocksMax) { break; }
-                PastBlocksMass++;
-
-                if (i == 1) { PastDifficultyAverage.SetCompact(BlockReading->nBits); }
-                else { PastDifficultyAverage = ((uint256().SetCompact(BlockReading->nBits) - PastDifficultyAveragePrev) / i) + PastDifficultyAveragePrev; }
-                PastDifficultyAveragePrev = PastDifficultyAverage;
+    uint64_t pastSecondsMin = Params().TargetTimespan() * 0.025;
+    uint64_t pastSecondsMax = Params().TargetTimespan() * 7;
+    uint64_t PastBlocksMin = pastSecondsMin / Params().TargetSpacing();
+    uint64_t PastBlocksMax = pastSecondsMax / Params().TargetSpacing();
 
-                PastRateActualSeconds = BlockLastSolved->GetBlockTime() - BlockReading->GetBlockTime();
-                PastRateTargetSeconds = Params().TargetSpacing() * PastBlocksMass;
-                PastRateAdjustmentRatio = double(1);
-                if (PastRateActualSeconds < 0) { PastRateActualSeconds = 0; }
-                if (PastRateActualSeconds != 0 && PastRateTargetSeconds != 0) {
-                PastRateAdjustmentRatio = double(PastRateTargetSeconds) / double(PastRateActualSeconds);
-                }
-                EventHorizonDeviation = 1 + (0.7084 * pow((double(PastBlocksMass)/double(28.2)), -1.228));
-                EventHorizonDeviationFast = EventHorizonDeviation;
-                EventHorizonDeviationSlow = 1 / EventHorizonDeviation;
+    if (BlockLastSolved == NULL || BlockLastSolved->nHeight == 0 || (uint64_t)BlockLastSolved->nHeight < PastBlocksMin) { return Params().ProofOfWorkLimit().GetCompact(); }
 
-                if (PastBlocksMass >= PastBlocksMin) {
-                        if ((PastRateAdjustmentRatio <= EventHorizonDeviationSlow) || (PastRateAdjustmentRatio >= EventHorizonDeviationFast)) { assert(BlockReading); break; }
-                }
-                if (BlockReading->pprev == NULL) { assert(BlockReading); break; }
-                BlockReading = BlockReading->pprev;
+    for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
+        if (PastBlocksMax > 0 && i > PastBlocksMax) { break; }
+        PastBlocksMass++;
+
+        PastDifficultyAverage.SetCompact(BlockReading->nBits);
+        if (i > 1) {
+            // handle negative uint256
+            if(PastDifficultyAverage >= PastDifficultyAveragePrev)
+                PastDifficultyAverage = ((PastDifficultyAverage - PastDifficultyAveragePrev) / i) + PastDifficultyAveragePrev;
+            else
+                PastDifficultyAverage = PastDifficultyAveragePrev - ((PastDifficultyAveragePrev - PastDifficultyAverage) / i);
         }
+        PastDifficultyAveragePrev = PastDifficultyAverage;
 
-        uint256 bnNew(PastDifficultyAverage);
+        PastRateActualSeconds = BlockLastSolved->GetBlockTime() - BlockReading->GetBlockTime();
+        PastRateTargetSeconds = Params().TargetSpacing() * PastBlocksMass;
+        PastRateAdjustmentRatio = double(1);
+        if (PastRateActualSeconds < 0) { PastRateActualSeconds = 0; }
         if (PastRateActualSeconds != 0 && PastRateTargetSeconds != 0) {
-                bnNew *= PastRateActualSeconds;
-                bnNew /= PastRateTargetSeconds;
+            PastRateAdjustmentRatio = double(PastRateTargetSeconds) / double(PastRateActualSeconds);
         }
+        EventHorizonDeviation = 1 + (0.7084 * pow((double(PastBlocksMass)/double(28.2)), -1.228));
+        EventHorizonDeviationFast = EventHorizonDeviation;
+        EventHorizonDeviationSlow = 1 / EventHorizonDeviation;
+
+        if (PastBlocksMass >= PastBlocksMin) {
+                if ((PastRateAdjustmentRatio <= EventHorizonDeviationSlow) || (PastRateAdjustmentRatio >= EventHorizonDeviationFast))
+                { assert(BlockReading); break; }
+        }
+        if (BlockReading->pprev == NULL) { assert(BlockReading); break; }
+        BlockReading = BlockReading->pprev;
+    }
+
+    uint256 bnNew(PastDifficultyAverage);
+    if (PastRateActualSeconds != 0 && PastRateTargetSeconds != 0) {
+        bnNew *= PastRateActualSeconds;
+        bnNew /= PastRateTargetSeconds;
+    }
 
     if (bnNew > Params().ProofOfWorkLimit()) {
         bnNew = Params().ProofOfWorkLimit();
@@ -67,7 +79,7 @@ unsigned int static KimotoGravityWell(const CBlockIndex* pindexLast, const CBloc
     return bnNew.GetCompact();
 }
 
-unsigned int static DarkGravityWave(const CBlockIndex* pindexLast, const CBlockHeader *pblock) {
+unsigned int static DarkGravityWave(const CBlockIndex* pindexLast) {
     /* current difficulty formula, dash - DarkGravity v3, written by Evan Duffield - evan@dashpay.io */
     const CBlockIndex *BlockLastSolved = pindexLast;
     const CBlockIndex *BlockReading = pindexLast;
@@ -151,7 +163,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
             if (Params().AllowMinDifficultyBlocks())
             {
                 // Special difficulty rule for testnet:
-                // If the new block's timestamp is more than 2* 10 minutes
+                // If the new block's timestamp is more than 2* 2.5 minutes
                 // then allow mining of a min-difficulty block.
                 if (pblock->GetBlockTime() > pindexLast->GetBlockTime() + Params().TargetSpacing()*2)
                     return nProofOfWorkLimit;
@@ -167,7 +179,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
             return pindexLast->nBits;
         }
 
-        // Go back by what we want to be 14 days worth of blocks
+        // Go back by what we want to be 1 day worth of blocks
         const CBlockIndex* pindexFirst = pindexLast;
         for (int i = 0; pindexFirst && i < Params().Interval()-1; i++)
             pindexFirst = pindexFirst->pprev;
@@ -193,7 +205,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
             bnNew = Params().ProofOfWorkLimit();
 
         /// debug print
-        LogPrintf("GetNextWorkRequired RETARGET\n");
+        LogPrintf("GetNextWorkRequired RETARGET at %d\n", pindexLast->nHeight + 1);
         LogPrintf("Params().TargetTimespan() = %d    nActualTimespan = %d\n", Params().TargetTimespan(), nActualTimespan);
         LogPrintf("Before: %08x  %s\n", pindexLast->nBits, bnOld.ToString());
         LogPrintf("After:  %08x  %s\n", bnNew.GetCompact(), bnNew.ToString());
@@ -205,21 +217,16 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
     // Retarget using Kimoto Gravity Wave
     else if (retarget == DIFF_KGW)
     {
-        uint64_t pastSecondsMin = Params().TargetTimespan() * 0.025;
-        uint64_t pastSecondsMax = Params().TargetTimespan() * 7;
-        uint64_t pastBlocksMin = pastSecondsMin / Params().TargetSpacing();
-        uint64_t pastBlocksMax = pastSecondsMax / Params().TargetSpacing();
-
-        return KimotoGravityWell(pindexLast, pblock, pastBlocksMin, pastBlocksMax);
+        return KimotoGravityWell(pindexLast);
     }
 
     // Retarget using Dark Gravity Wave 3
     else if (retarget == DIFF_DGW)
     {
-        return DarkGravityWave(pindexLast, pblock);
+        return DarkGravityWave(pindexLast);
     }
 
-    return DarkGravityWave(pindexLast, pblock);
+    return DarkGravityWave(pindexLast);
 }
 
 bool CheckProofOfWork(uint256 hash, unsigned int nBits)

From 6e229e16ff0ddac5c98c49a6e772d572239d3d2c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 30 Apr 2015 01:06:24 +0300
Subject: [PATCH 1347/1819] DS fixes:  - detect denominated but not yet
 anonymized balance properly or both (GetAnonymizableBalance)  - fix progress
 calculation by using GetAnonymizableBalance  - do not count MN-like inputs as
 anonymizable  - denominate faster: if there is enough new inputs after DS
 started (their sum is greater then "already denominated but not yet
 anonymized balance")  - allow small amounts to be used in CreateDenominated
 (modified SelectCoinsDark) but only if they are larger then 1 CENT  - do not
 use collateral inputs in CreateDenominated (modified SelectCoinsDark)  -
 convert some int64_t -> CAmount for money related variables/params

---
 src/darksend.cpp        | 30 ++++++++++++++++-------
 src/qt/overviewpage.cpp | 53 +++++++++++++++++++++++++++++++----------
 src/wallet.cpp          | 48 +++++++++++++++++++++++++++++++++----
 src/wallet.h            |  3 ++-
 4 files changed, 109 insertions(+), 25 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6fc81056f8ff..6359c1117af4 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1418,25 +1418,28 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
     // ** find the coins we'll use
     std::vector<CTxIn> vCoins;
-    int64_t nValueMin = CENT;
-    int64_t nValueIn = 0;
+    CAmount nValueMin = CENT;
+    CAmount nValueIn = 0;
+
+    CAmount nOnlyDenominatedBalance;
+    CAmount nBalanceNeedsDenominated;
 
     // should not be less than fees in DARKSEND_COLLATERAL + few (lets say 5) smallest denoms
-    int64_t nLowestDenom = DARKSEND_COLLATERAL + darkSendDenominations[darkSendDenominations.size() - 1]*5;
+    CAmount nLowestDenom = DARKSEND_COLLATERAL + darkSendDenominations[darkSendDenominations.size() - 1]*5;
 
     // if there are no DS collateral inputs yet
     if(!pwalletMain->HasCollateralInputs())
         // should have some additional amount for them
         nLowestDenom += DARKSEND_COLLATERAL*4;
 
-    int64_t nBalanceNeedsAnonymized = nAnonymizeDarkcoinAmount*COIN - pwalletMain->GetAnonymizedBalance();
+    CAmount nBalanceNeedsAnonymized = nAnonymizeDarkcoinAmount*COIN - pwalletMain->GetAnonymizedBalance();
 
     // if balanceNeedsAnonymized is more than pool max, take the pool max
     if(nBalanceNeedsAnonymized > DARKSEND_POOL_MAX) nBalanceNeedsAnonymized = DARKSEND_POOL_MAX;
 
     // if balanceNeedsAnonymized is more than non-anonymized, take non-anonymized
-    int64_t nBalanceNotYetAnonymized = pwalletMain->GetBalance() - pwalletMain->GetAnonymizedBalance();
-    if(nBalanceNeedsAnonymized > nBalanceNotYetAnonymized) nBalanceNeedsAnonymized = nBalanceNotYetAnonymized;
+    CAmount nAnonymizableBalance = pwalletMain->GetAnonymizableBalance();
+    if(nBalanceNeedsAnonymized > nAnonymizableBalance) nBalanceNeedsAnonymized = nAnonymizableBalance;
 
     if(nBalanceNeedsAnonymized < nLowestDenom)
     {
@@ -1455,7 +1458,13 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
         if (pwalletMain->SelectCoinsDark(nValueMin, 9999999*COIN, vCoins, nValueIn, -2, 0))
         {
-            if(!fDryRun) return CreateDenominated(nBalanceNeedsAnonymized);
+            nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true, false, false);
+            nBalanceNeedsDenominated = nBalanceNeedsAnonymized - nOnlyDenominatedBalance;
+
+            if(nBalanceNeedsDenominated > nValueIn) nBalanceNeedsDenominated = nValueIn;
+
+            if(!fDryRun) return CreateDenominated(nBalanceNeedsDenominated);
+
             return true;
         } else {
             LogPrintf("DoAutomaticDenominating : Can't denominate - no compatible inputs left\n");
@@ -1465,6 +1474,11 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
     }
 
+    nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true, false, false);
+    nBalanceNeedsDenominated = nBalanceNeedsAnonymized - nOnlyDenominatedBalance;
+
+    if(!fDryRun && nBalanceNeedsDenominated > nOnlyDenominatedBalance) return CreateDenominated(nBalanceNeedsDenominated);
+
     //check to see if we have the collateral sized inputs, it requires these
     if(!pwalletMain->HasCollateralInputs()){
         if(!fDryRun) MakeCollateralAmounts();
@@ -1622,7 +1636,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                     pSubmittedToMasternode = pmn;
                     vecMasternodesUsed.push_back(pmn->vin);
 
-                    std::vector<int64_t> vecAmounts;
+                    std::vector<CAmount> vecAmounts;
                     pwalletMain->ConvertList(vCoins, vecAmounts);
                     sessionDenom = GetDenominationsByAmounts(vecAmounts);
 
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index c15d8b142dc9..7b0af8c7c167 100755
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -313,6 +313,14 @@ void OverviewPage::updateDarksendProgress()
         ui->darksendProgress->setValue(0);
         QString s(tr("No inputs detected"));
         ui->darksendProgress->setToolTip(s);
+
+        // when balance is zero just show info from settings
+        QString strSettings = BitcoinUnits::formatWithUnit(
+                    walletModel->getOptionsModel()->getDisplayUnit(),
+                    nAnonymizeDarkcoinAmount * COIN
+                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
+
+        ui->labelAmountRounds->setText(strSettings);
         return;
     }
 
@@ -324,11 +332,10 @@ void OverviewPage::updateDarksendProgress()
         return;
     }
 
-    //Get the anon threshold
-    int64_t nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
+    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance(true);
 
-    // If it's more than the wallet amount, limit to that.
-    if(nMaxToAnonymize > nBalance) nMaxToAnonymize = nBalance;
+    // If it's more than the anon threshold, limit to that.
+    if(nMaxToAnonymize > nAnonymizeDarkcoinAmount*COIN) nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
 
     if(nMaxToAnonymize == 0) return;
 
@@ -340,7 +347,6 @@ void OverviewPage::updateDarksendProgress()
     {
         denomPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / denominatedBalance;
         denomPart = denomPart > 1 ? 1 : denomPart;
-        if(denomPart == 1 && nMaxToAnonymize > denominatedBalance) nMaxToAnonymize = denominatedBalance;
     }
 
     // % of fully anonymized balance
@@ -360,6 +366,36 @@ void OverviewPage::updateDarksendProgress()
 
     QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
+
+    QString strSettings;
+    if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
+        ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
+                                          .arg(BitcoinUnits::formatWithUnit(
+                                                   walletModel->getOptionsModel()->getDisplayUnit(),
+                                                   nAnonymizeDarkcoinAmount * COIN
+                                               )));
+        strSettings = BitcoinUnits::formatWithUnit(
+                    walletModel->getOptionsModel()->getDisplayUnit(),
+                    nAnonymizeDarkcoinAmount * COIN
+                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
+    } else {
+        ui->labelAmountRounds->setToolTip(tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br/>"
+                                             "will anonymize <span style='color:red;'>%2</span> instead")
+                                          .arg(BitcoinUnits::formatWithUnit(
+                                                   walletModel->getOptionsModel()->getDisplayUnit(),
+                                                   nAnonymizeDarkcoinAmount * COIN
+                                               ))
+                                          .arg(BitcoinUnits::formatWithUnit(
+                                                   walletModel->getOptionsModel()->getDisplayUnit(),
+                                                   nMaxToAnonymize
+                                               )));
+        strSettings = "<span style='color:red;'>" + BitcoinUnits::formatWithUnit(
+                    walletModel->getOptionsModel()->getDisplayUnit(),
+                    nMaxToAnonymize
+                ) + " / " + tr("%n Rounds", "", nDarksendRounds) + "</span>";
+    }
+
+    ui->labelAmountRounds->setText(strSettings);
 }
 
 
@@ -374,13 +410,6 @@ void OverviewPage::darkSendStatus()
         lastNewBlock = GetTime();
 
         updateDarksendProgress();
-
-        QString strSettings = BitcoinUnits::formatWithUnit(
-                    walletModel->getOptionsModel()->getDisplayUnit(),
-                    nAnonymizeDarkcoinAmount * COIN
-                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
-
-        ui->labelAmountRounds->setText(strSettings);
     }
 
     if(!fEnableDarksend) {
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 64df34eef545..d0bcc99ec2a1 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1172,6 +1172,40 @@ CAmount CWallet::GetBalance() const
     return nTotal;
 }
 
+CAmount CWallet::GetAnonymizableBalance(bool includeAlreadyAnonymized) const
+{
+    if(fLiteMode) return 0;
+
+    CAmount nTotal = 0;
+    {
+        LOCK2(cs_main, cs_wallet);
+        for (map<uint256, CWalletTx>::const_iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
+        {
+            const CWalletTx* pcoin = &(*it).second;
+
+            if (pcoin->IsTrusted())
+            {
+                uint256 hash = (*it).first;
+                for (unsigned int i = 0; i < pcoin->vout.size(); i++)
+                {
+                    CTxIn vin = CTxIn(hash, i);
+
+                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i])) continue;
+                    if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) continue; // do not count immature
+                    if(pcoin->vout[i].nValue == 1000*COIN) continue; // do not count MN-like outputs
+
+                    int rounds = GetInputDarksendRounds(vin);
+                    if(rounds >=-2 && (rounds < nDarksendRounds || (includeAlreadyAnonymized && rounds >= nDarksendRounds))) {
+                        nTotal += pcoin->vout[i].nValue;
+                    }
+                }
+            }
+        }
+    }
+
+    return nTotal;
+}
+
 CAmount CWallet::GetAnonymizedBalance() const
 {
     if(fLiteMode) return 0;
@@ -1268,7 +1302,7 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const
     return nTotal;
 }
 
-CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed) const
+CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed, bool includeAlreadyAnonymized) const
 {
     CAmount nTotal = 0;
     {
@@ -1292,6 +1326,10 @@ CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed) con
                 if(!IsMine(pcoin->vout[i])) continue;
                 if(onlyDenom != IsDenominatedAmount(pcoin->vout[i].nValue)) continue;
 
+                CTxIn vin = CTxIn(hash, i);
+                int rounds = GetInputDarksendRounds(vin);
+                if(!includeAlreadyAnonymized && rounds >= nDarksendRounds) continue;
+
                 nTotal += pcoin->vout[i].nValue;
             }
         }
@@ -1749,7 +1787,7 @@ bool CWallet::SelectCoinsByDenominations(int nDenom, int64_t nValueMin, int64_t
     return (nValueRet >= nValueMin && fFound100 && fFound10 && fFound1 && fFoundDot1);
 }
 
-bool CWallet::SelectCoinsDark(int64_t nValueMin, int64_t nValueMax, std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax) const
+bool CWallet::SelectCoinsDark(CAmount nValueMin, CAmount nValueMax, std::vector<CTxIn>& setCoinsRet, CAmount& nValueRet, int nDarksendRoundsMin, int nDarksendRoundsMax) const
 {
     CCoinControl *coinControl=NULL;
 
@@ -1766,8 +1804,10 @@ bool CWallet::SelectCoinsDark(int64_t nValueMin, int64_t nValueMax, std::vector<
 
     BOOST_FOREACH(const COutput& out, vCoins)
     {
-        //there's no reason to allow inputs less than 1 COIN into DS (other than denominations smaller than that amount)
-        if(out.tx->vout[out.i].nValue < 1*COIN && !IsDenominatedAmount(out.tx->vout[out.i].nValue)) continue;
+        //do not allow inputs less than 1 CENT
+        if(out.tx->vout[out.i].nValue < CENT) continue;
+        //do not allow collaterals to be selected
+        if(IsCollateralAmount(out.tx->vout[out.i].nValue)) continue;
         if(fMasterNode && out.tx->vout[out.i].nValue == 1000*COIN) continue; //masternode input
 
         if(nValueRet + out.tx->vout[out.i].nValue <= nValueMax){
diff --git a/src/wallet.h b/src/wallet.h
index 944421b70273..8694d4c0a033 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -310,10 +310,11 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     CAmount GetBalance() const;
     CAmount GetUnconfirmedBalance() const;
     CAmount GetImmatureBalance() const;
+    CAmount GetAnonymizableBalance(bool includeAlreadyAnonymized=false) const;
     CAmount GetAnonymizedBalance() const;
     double GetAverageAnonymizedRounds() const;
     CAmount GetNormalizedAnonymizedBalance() const;
-    CAmount GetDenominatedBalance(bool onlyDenom=true, bool onlyUnconfirmed=false) const;
+    CAmount GetDenominatedBalance(bool onlyDenom=true, bool onlyUnconfirmed=false, bool includeAlreadyAnonymized = true) const;
     CAmount GetWatchOnlyBalance() const;
     CAmount GetUnconfirmedWatchOnlyBalance() const;
     CAmount GetImmatureWatchOnlyBalance() const;

From 905b28f813056f1775a005d4400bc0cc50b69bdb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 2 May 2015 19:55:31 +0300
Subject: [PATCH 1348/1819] Do not calculate MN payments during initial
 download

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2c3d860e9374..c07bd1df43de 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2942,12 +2942,12 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         CBlockIndex *pindex = chainActive.Tip();
         if(pindex != NULL){
             if(pindex->GetBlockHash() == block.hashPrevBlock){
-                int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut());
                 bool fIsInitialDownload = IsInitialBlockDownload();
 
                 // If we don't already have its previous block, skip masternode payment step
-                if (!fIsInitialDownload && pindex != NULL)
+                if (!fIsInitialDownload)
                 {
+                    int64_t masternodePaymentAmount = GetMasternodePayment(pindex->nHeight+1, block.vtx[0].GetValueOut());
                     bool foundPaymentAmount = false;
                     bool foundPayee = false;
                     bool foundPaymentAndPayee = false;

From acec2b399f698fba30afd874ce20781a24947734 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 3 May 2015 15:29:35 +0200
Subject: [PATCH 1349/1819] Resync with upstream

---
 src/qt/transactionfilterproxy.cpp | 4 ----
 1 file changed, 4 deletions(-)
 mode change 100644 => 100755 src/qt/transactionfilterproxy.cpp

diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
old mode 100644
new mode 100755
index a0b5b15501de..2a0f621d1e3a
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -21,12 +21,8 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
     dateFrom(MIN_DATE),
     dateTo(MAX_DATE),
     addrPrefix(),
-<<<<<<< HEAD
-    typeFilter(COMMON_TYPES),
-=======
     typeFilter(ALL_TYPES),
     watchOnlyFilter(WatchOnlyFilter_All),
->>>>>>> upstream/v0.12.0.x
     minAmount(0),
     limitRows(-1),
     showInactive(true)

From f38b8e95727a2d3efccdf0c9239ae98489901b65 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 4 May 2015 02:31:31 -0700
Subject: [PATCH 1350/1819] draft

---
 src/masternode-budget.cpp    | 27 ++++++++++++++++++++++++
 src/masternode-budget.h      |  4 ++++
 src/rpcmasternode-budget.cpp | 40 ++++++++++++++++++++----------------
 3 files changed, 53 insertions(+), 18 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 88a34f1cf6c6..164c6d885d12 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -197,6 +197,33 @@ CBudgetVote::CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockS
 	nTime = GetAdjustedTime();
 }
 
+
+CBudgetVote::CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nVoteIn)
+{
+    vin = vinIn;
+    strProposalName = strProposalNameIn;
+
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev != NULL) 
+    {
+        //calculate beginning of payment cycle
+        nBlockStart = (pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS));
+        //calculate the end of the cycle for this vote
+        nBlockEnd = nBlockStart + (PAYMENT_CYCLE_BLOCKS*nPaymentCount);
+        // These numbers don't require being all the same across the network due to the way 
+        // they are sampled from the votes. 
+    } else {
+        nBlockStart = 0;
+        nBlockEnd = 0;
+    }
+
+    address = addressIn;
+    nAmount = nAmountIn;
+    nVote = nVoteIn;
+    nTime = GetAdjustedTime();
+}
+
+
 bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
     // Choose coins to use
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 09fee9c390a7..5a64cee5b7e4 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -25,6 +25,9 @@ class CBudgetVote;
 #define VOTE_YES      1
 #define VOTE_NO       2
 
+//Amount of blocks in a months period of time (using 2.6 minutes per)
+#define PAYMENT_CYCLE_BLOCKS 16615
+
 extern CBudgetManager budget;
 
 void DumpBudgets();
@@ -174,6 +177,7 @@ class CBudgetVote
 
     CBudgetVote();
     CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, int nVoteIn);
+    CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nVoteIn);
 
     bool Sign(CKey& keyCollateralAddress, CPubKey& pubKeyMasternode);
     bool SignatureValid();
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 03679342b23d..b1217b770890 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -39,24 +39,26 @@ Value mnbudget(const Array& params, bool fHelp)
 
     if(strCommand == "vote-many")
     {
-/*        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 5)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME BLOCKSTART BLOCKEND XADDRESS AMOUNT YEA|NAY'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME PAYMENT_COUNT DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
             return "Invalid proposal name, limit of 20 characters.";
 
-        int nBlockStart = params[2].get_int();
-        int nBlockEnd   = params[3].get_int();
-        CBitcoinAddress address(params[4].get_str());
+        int nPaymentCount = params[2].get_int();
+        CBitcoinAddress address(params[3].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
 
-        CAmount nAmount = AmountFromValue(params[5]);
-        std::string strVote = params[6].get_str().c_str();
+        // Parse Dash address
+        CScript scriptPubKey = GetScriptForDestination(address.Get());
+
+        CAmount nAmount = AmountFromValue(params[4]);
+        std::string strVote = params[5].get_str().c_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -95,7 +97,7 @@ Value mnbudget(const Array& params, bool fHelp)
             if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
                 return(" Error upon calling SetKey");
 
-            CBudgetVote vote(pmn->vin, strProposalName, nBlockStart, nBlockEnd, address, nAmount, nVote);
+            CBudgetVote vote(pmn->vin, strProposalName, nPaymentCount, scriptPubKey, nAmount, nVote);
             if(!vote.Sign(keyMasternode, pubKeyMasternode)){
                 return "Failure to sign.";
             }
@@ -104,30 +106,32 @@ Value mnbudget(const Array& params, bool fHelp)
             vote.Relay();
         }
 
-        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");*/
+        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
     }
 
     if(strCommand == "vote")
     {
-       /* std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 5)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME BLOCKSTART BLOCKEND XADDRESS AMOUNT YEA|NAY'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME PAYMENT_COUNT DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
 
         if(strProposalName.size() > 20)
             return "Invalid proposal name, limit of 20 characters.";
 
-        int nBlockStart = params[2].get_int();
-        int nBlockEnd   = params[3].get_int();
-        CBitcoinAddress address(params[4].get_str());
+        int nPaymentCount = params[2].get_int();
+        CBitcoinAddress address(params[3].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
 
-        CAmount nAmount = AmountFromValue(params[5]);
-        std::string strVote = params[6].get_str().c_str();
+        // Parse Dash address
+        CScript scriptPubKey = GetScriptForDestination(address.Get());
+
+        CAmount nAmount = AmountFromValue(params[4]);
+        std::string strVote = params[5].get_str().c_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -141,12 +145,12 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
-        CBudgetVote vote(activeMasternode.vin, strProposalName, nBlockStart, nBlockEnd, address, nAmount, nVote);
+        CBudgetVote vote(activeMasternode.vin, strProposalName, nPaymentCount, scriptPubKey, nAmount, nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
 
-        vote.Relay();*/
+        vote.Relay();
 
     }
 

From c6233880c34f7d1c91d2bb3eaaa6b062c33fd8eb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 4 May 2015 03:05:08 -0700
Subject: [PATCH 1351/1819] draft

---
 src/main.cpp              |  5 ++---
 src/masternode-budget.cpp | 10 ++--------
 src/masternode-budget.h   |  2 +-
 src/masternode-payments.h |  6 ------
 4 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index dedd447bf5a4..c8fef03bf2a8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3242,7 +3242,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             mnscan.DoMasternodePOSChecks();
-            //budget.NewBlock();
+            budget.NewBlock();
         }
     }
 
@@ -4990,8 +4990,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         darkSendPool.ProcessMessageDarksend(pfrom, strCommand, vRecv);
         mnodeman.ProcessMessage(pfrom, strCommand, vRecv);
         budget.ProcessMessage(pfrom, strCommand, vRecv);
-        //TODO
-        //ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
+        masternodePayments.ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
         ProcessMessageInstantX(pfrom, strCommand, vRecv);
         ProcessSpork(pfrom, strCommand, vRecv);
         ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 164c6d885d12..ac62152c87be 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -341,7 +341,7 @@ void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
 
     if(!mapProposals.count(hash)){
     	CBudgetProposal prop(vote.strProposalName);
-    	//mapProposals.insert(make_pair(hash, prop));
+    	mapProposals.insert(make_pair(hash, prop));
     	return;
     }
 
@@ -353,16 +353,10 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
-
-    if(!mapVotes.count(hash)){
-        mapVotes.insert(make_pair(hash, vote));
-        return;
-    }
-
     mapVotes[hash] = vote;    
 }
 
-inline void CBudgetManager::NewBlock()
+void CBudgetManager::NewBlock()
 {
 	//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
 	if(chainActive.Height() % 6 != 0) return;
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 5a64cee5b7e4..28ea70391d12 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -79,7 +79,7 @@ class CBudgetManager
     void Calculate();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     CBudgetProposal *Find(const std::string &strProposalName);
-    inline void NewBlock();
+    void NewBlock();
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
     
     void CleanUp();
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 93b24d1f13b5..43fe01cafb7f 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -6,15 +6,9 @@
 #ifndef MASTERNODE_PAYMENTS_H
 #define MASTERNODE_PAYMENTS_H
 
-//#include "sync.h"
-//#include "net.h"
 #include "key.h"
-//#include "util.h"
-//#include "base58.h"
 #include "main.h"
 #include "masternode.h"
-//#include "masternode-pos.h"
-//#include "timedata.h"
 
 using namespace std;
 

From ebc0e41ede2f63c95cf022ad60cf8eda260dbad5 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 4 May 2015 13:12:30 +0200
Subject: [PATCH 1352/1819] qt: translation update for next 0.10 point release

---
 src/qt/locale/bitcoin_ach.ts         |    2 +-
 src/qt/locale/bitcoin_af_ZA.ts       |    2 +-
 src/qt/locale/bitcoin_ar.ts          |    2 +-
 src/qt/locale/bitcoin_be_BY.ts       |    4 +-
 src/qt/locale/bitcoin_bg.ts          |  674 ++++++++++++-
 src/qt/locale/bitcoin_bs.ts          |    2 +-
 src/qt/locale/bitcoin_ca.ts          |   18 +-
 src/qt/locale/bitcoin_ca@valencia.ts |    2 +-
 src/qt/locale/bitcoin_ca_ES.ts       |   18 +-
 src/qt/locale/bitcoin_cmn.ts         |    2 +-
 src/qt/locale/bitcoin_cs.ts          |   56 +-
 src/qt/locale/bitcoin_cy.ts          |    2 +-
 src/qt/locale/bitcoin_da.ts          |   18 +-
 src/qt/locale/bitcoin_de.ts          |   18 +-
 src/qt/locale/bitcoin_el_GR.ts       |    2 +-
 src/qt/locale/bitcoin_eo.ts          |    2 +-
 src/qt/locale/bitcoin_es.ts          |   18 +-
 src/qt/locale/bitcoin_es_CL.ts       |    2 +-
 src/qt/locale/bitcoin_es_DO.ts       |    2 +-
 src/qt/locale/bitcoin_es_MX.ts       |    2 +-
 src/qt/locale/bitcoin_es_UY.ts       |    2 +-
 src/qt/locale/bitcoin_et.ts          |    2 +-
 src/qt/locale/bitcoin_eu_ES.ts       |    2 +-
 src/qt/locale/bitcoin_fa.ts          |    2 +-
 src/qt/locale/bitcoin_fa_IR.ts       |    2 +-
 src/qt/locale/bitcoin_fi.ts          |    6 +-
 src/qt/locale/bitcoin_fr.ts          |   14 +-
 src/qt/locale/bitcoin_fr_CA.ts       |    2 +-
 src/qt/locale/bitcoin_gl.ts          |    2 +-
 src/qt/locale/bitcoin_gu_IN.ts       |    2 +-
 src/qt/locale/bitcoin_he.ts          |    2 +-
 src/qt/locale/bitcoin_hi_IN.ts       |    2 +-
 src/qt/locale/bitcoin_hr.ts          |    2 +-
 src/qt/locale/bitcoin_hu.ts          |    2 +-
 src/qt/locale/bitcoin_id_ID.ts       |    2 +-
 src/qt/locale/bitcoin_it.ts          |   18 +-
 src/qt/locale/bitcoin_ja.ts          |   18 +-
 src/qt/locale/bitcoin_ka.ts          |    2 +-
 src/qt/locale/bitcoin_kk_KZ.ts       |    2 +-
 src/qt/locale/bitcoin_ko_KR.ts       |    2 +-
 src/qt/locale/bitcoin_ky.ts          |    2 +-
 src/qt/locale/bitcoin_la.ts          |    2 +-
 src/qt/locale/bitcoin_lt.ts          |    2 +-
 src/qt/locale/bitcoin_lv_LV.ts       |    2 +-
 src/qt/locale/bitcoin_mn.ts          |    2 +-
 src/qt/locale/bitcoin_ms_MY.ts       |    2 +-
 src/qt/locale/bitcoin_nb.ts          |   18 +-
 src/qt/locale/bitcoin_nl.ts          |   47 +-
 src/qt/locale/bitcoin_pam.ts         |    2 +-
 src/qt/locale/bitcoin_pl.ts          |  144 ++-
 src/qt/locale/bitcoin_pt_BR.ts       |   94 +-
 src/qt/locale/bitcoin_pt_PT.ts       |  388 +++++++-
 src/qt/locale/bitcoin_ro_RO.ts       | 1324 ++++++++++++++++++--------
 src/qt/locale/bitcoin_ru.ts          |   42 +-
 src/qt/locale/bitcoin_sah.ts         |    2 +-
 src/qt/locale/bitcoin_sk.ts          |  248 ++++-
 src/qt/locale/bitcoin_sl_SI.ts       |    2 +-
 src/qt/locale/bitcoin_sq.ts          |    2 +-
 src/qt/locale/bitcoin_sr.ts          |    2 +-
 src/qt/locale/bitcoin_sv.ts          |   21 +-
 src/qt/locale/bitcoin_th_TH.ts       |    2 +-
 src/qt/locale/bitcoin_tr.ts          |    6 +-
 src/qt/locale/bitcoin_uk.ts          |    6 +-
 src/qt/locale/bitcoin_ur_PK.ts       |    2 +-
 src/qt/locale/bitcoin_uz@Cyrl.ts     |   22 +-
 src/qt/locale/bitcoin_vi.ts          |    2 +-
 src/qt/locale/bitcoin_vi_VN.ts       |    2 +-
 src/qt/locale/bitcoin_zh_CN.ts       |   18 +-
 src/qt/locale/bitcoin_zh_HK.ts       |    2 +-
 src/qt/locale/bitcoin_zh_TW.ts       |   26 +-
 70 files changed, 2769 insertions(+), 603 deletions(-)

diff --git a/src/qt/locale/bitcoin_ach.ts b/src/qt/locale/bitcoin_ach.ts
index ddb9fb85ced6..835ddb8eaa75 100644
--- a/src/qt/locale/bitcoin_ach.ts
+++ b/src/qt/locale/bitcoin_ach.ts
@@ -1,4 +1,4 @@
-<TS language="ach" version="2.0">
+<TS language="ach" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index 3ca7164e68de..e22591e8c512 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -1,4 +1,4 @@
-<TS language="af_ZA" version="2.0">
+<TS language="af_ZA" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index 5662054279df..116a1eea760e 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -1,4 +1,4 @@
-<TS language="ar" version="2.0">
+<TS language="ar" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index ad0f8cf923ae..41c200dc0ce6 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,4 +1,4 @@
-<TS language="be_BY" version="2.0">
+<TS language="be_BY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -292,7 +292,7 @@
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n актыўнае злучэнне з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform></translation>
+        <translation><numerusform>%n актыўнае злучэнне з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform><numerusform>%n актыўных злучэнняў з Bitcoin-сецівам</numerusform></translation>
     </message>
     <message>
         <source>Error</source>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index e810dfad0453..89200ff213fc 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1,6 +1,10 @@
-<TS language="bg" version="2.0">
+<TS language="bg" version="2.1">
 <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>
@@ -65,6 +69,10 @@
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Това са адресите на получателите на плащания. Винаги проверявайте размера на сумата и адреса на получателя, преди да изпратите монети.</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>Това са Вашите Биткойн адреси,благодарение на които ще получавате плащания.Препоръчително е да използвате нови адреси за получаване за всяка транзакция.</translation>
+    </message>
     <message>
         <source>Copy &amp;Label</source>
         <translation>Копирай &amp;име</translation>
@@ -85,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Грешка при изнасянето</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Възникна грешка при опита за запазване на списъка с адреси в %1.Моля опитайте отново.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -103,6 +115,10 @@
 </context>
 <context>
     <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation>Диалог за паролите</translation>
+    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Въведи парола</translation>
@@ -214,6 +230,10 @@
         <source>&amp;Overview</source>
         <translation>&amp;Баланс</translation>
     </message>
+    <message>
+        <source>Node</source>
+        <translation>Сървър</translation>
+    </message>
     <message>
         <source>Show general overview of wallet</source>
         <translation>Обобщена информация за портфейла</translation>
@@ -258,6 +278,14 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Смяна на паролата...</translation>
     </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>&amp;Изпращане на адресите...</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>&amp;Получаване на адресите...</translation>
+    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>Отвори &amp;URI...</translation>
@@ -270,6 +298,10 @@
         <source>Send coins to a Bitcoin address</source>
         <translation>Изпращане към Биткоин адрес</translation>
     </message>
+    <message>
+        <source>Modify configuration options for Bitcoin</source>
+        <translation>Променете настройките на Биткойн</translation>
+    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>Запазване на портфейла на друго място</translation>
@@ -278,6 +310,14 @@
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Променя паролата за портфейла</translation>
     </message>
+    <message>
+        <source>&amp;Debug window</source>
+        <translation>&amp;Прозорец за отстраняване на грешки</translation>
+    </message>
+    <message>
+        <source>Open debugging and diagnostic console</source>
+        <translation>Отворете конзолата за диагностика и отстраняване на грешки</translation>
+    </message>
     <message>
         <source>&amp;Verify message...</source>
         <translation>&amp;Проверка на съобщение...</translation>
@@ -298,6 +338,10 @@
         <source>&amp;Receive</source>
         <translation>&amp;Получаване</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Покажете информация за Биткойн ядрото</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Покажи / Скрий</translation>
@@ -306,6 +350,18 @@
         <source>Show or hide the main Window</source>
         <translation>Показване и скриване на основния прозорец</translation>
     </message>
+    <message>
+        <source>Encrypt the private keys that belong to your wallet</source>
+        <translation>Шифроване на личните ключове,които принадлежат на портфейла Ви.</translation>
+    </message>
+    <message>
+        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+        <translation>Пишете съобщения със своя Биткойн адрес за да докажете,че е ваш.</translation>
+    </message>
+    <message>
+        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+        <translation>Потвърждаване на съобщения  за да се знае,че са написани с дадените Биткойн адреси.</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
@@ -322,14 +378,42 @@
         <source>Tabs toolbar</source>
         <translation>Раздели</translation>
     </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Биткойн ядро</translation>
+    </message>
+    <message>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation>Изискване на плащания(генерира QR кодове и биткойн: URIs)</translation>
+    </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
         <translation>&amp;Относно Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>Показване на списъка с използвани адреси и имена</translation>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation>Покажи списък с използваните адреси и имена.</translation>
+    </message>
+    <message>
+        <source>&amp;Command-line options</source>
+        <translation>&amp;Налични команди</translation>
+    </message>
+    <message>
+        <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+        <translation>Покажи помощните съобщения на Биткойн за да видиш наличните и валидни команди</translation>
+    </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
         <translation><numerusform>%n връзка към Биткоин мрежата</numerusform><numerusform>%n връзки към Биткоин мрежата</numerusform></translation>
     </message>
+    <message>
+        <source>No block source available...</source>
+        <translation>Липсва източник на блоковете...</translation>
+    </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
         <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform></translation>
@@ -350,6 +434,14 @@
         <source>%n year(s)</source>
         <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform></translation>
     </message>
+    <message>
+        <source>%1 behind</source>
+        <translation>%1 зад</translation>
+    </message>
+    <message>
+        <source>Transactions after this will not yet be visible.</source>
+        <translation>Транзакции след това няма все още да бъдат видими.</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Грешка</translation>
@@ -401,9 +493,21 @@ Address: %4
 </context>
 <context>
     <name>ClientModel</name>
-    </context>
+    <message>
+        <source>Network Alert</source>
+        <translation>Мрежови проблем</translation>
+    </message>
+</context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Coin Selection</source>
+        <translation>Избор на монета</translation>
+    </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Количество:</translation>
+    </message>
     <message>
         <source>Bytes:</source>
         <translation>Байтове:</translation>
@@ -420,10 +524,38 @@ Address: %4
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>След прилагане на ДДС</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <translation>Ресто</translation>
+    </message>
+    <message>
+        <source>(un)select all</source>
+        <translation>(Пре)махни всички</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Дървовиден режим</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Списъчен режим</translation>
+    </message>
     <message>
         <source>Amount</source>
         <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>
@@ -456,6 +588,78 @@ Address: %4
         <source>Copy transaction ID</source>
         <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 change</source>
+        <translation>Копирай рестото</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation>Най-висок</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>По-висок</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>Висок</translation>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation>Средно-висок</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>Среден</translation>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation>Ниско-среден</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>Нисък</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>По-нисък</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>Най-нисък</translation>
+    </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation>(%1 заключен)</translation>
+    </message>
     <message>
         <source>none</source>
         <translation>нищо</translation>
@@ -468,6 +672,10 @@ Address: %4
         <source>no</source>
         <translation>не</translation>
     </message>
+    <message>
+        <source>Can vary +/- 1 byte per input.</source>
+        <translation>Може да варира с +-1 байт</translation>
+    </message>
     <message>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Това наименование се оцветява в червено, ако произволен получател получи сума по-малка от %1.</translation>
@@ -476,6 +684,10 @@ Address: %4
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
+    <message>
+        <source>change from %1 (%2)</source>
+        <translation>ресто от %1 (%2)</translation>
+    </message>
     <message>
         <source>(change)</source>
         <translation>(промени)</translation>
@@ -538,13 +750,25 @@ Address: %4
         <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>
     <message>
         <source>Path already exists, and is not a directory.</source>
         <translation>Пътят вече съществува и не е папка.</translation>
     </message>
-    </context>
+    <message>
+        <source>Cannot create data directory here.</source>
+        <translation>Не може да се създаде директория тук.</translation>
+    </message>
+</context>
 <context>
     <name>HelpMessageDialog</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Биткойн ядро</translation>
+    </message>
     <message>
         <source>version</source>
         <translation>версия</translation>
@@ -557,21 +781,61 @@ Address: %4
         <source>About Bitcoin Core</source>
         <translation>За Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Списък с команди</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Използване:</translation>
     </message>
+    <message>
+        <source>command-line options</source>
+        <translation>Списък с налични команди</translation>
+    </message>
     <message>
         <source>UI options</source>
         <translation>UI Опции</translation>
     </message>
-    </context>
+    <message>
+        <source>Set language, for example "de_DE" (default: system locale)</source>
+        <translation>Задаване на език,например "de_DE" (по подразбиране: system locale)</translation>
+    </message>
+    <message>
+        <source>Start minimized</source>
+        <translation>Стартирай минимизирано</translation>
+    </message>
+    <message>
+        <source>Choose data directory on startup (default: 0)</source>
+        <translation>Изберете директория при стартиране на програмата.( настройка по подразбиране:0)</translation>
+    </message>
+</context>
 <context>
     <name>Intro</name>
     <message>
         <source>Welcome</source>
         <translation>Добре дошли</translation>
     </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>Добре дошли в Биткойн ядрото.</translation>
+    </message>
+    <message>
+        <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
+        <translation>Тъй като това е първото стартиране на програмата можете да изберете къде Биткон ядрото да запази данните си.</translation>
+    </message>
+    <message>
+        <source>Use the default data directory</source>
+        <translation>Използване на директория по подразбиране</translation>
+    </message>
+    <message>
+        <source>Use a custom data directory:</source>
+        <translation>Използване на директория ръчно</translation>
+    </message>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Биткойн ядро</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Грешка</translation>
@@ -579,6 +843,10 @@ Address: %4
     </context>
 <context>
     <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation>Отваряне на URI</translation>
+    </message>
     </context>
 <context>
     <name>OptionsDialog</name>
@@ -590,14 +858,30 @@ Address: %4
         <source>&amp;Main</source>
         <translation>&amp;Основни</translation>
     </message>
+    <message>
+        <source>Automatically start Bitcoin after logging in to the system.</source>
+        <translation>Автоматично включване на Биткойн след влизане в системата.</translation>
+    </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Пускане на Биткоин при вход в системата</translation>
     </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Размер на кеша в &amp;базата данни</translation>
+    </message>
+    <message>
+        <source>MB</source>
+        <translation>Мегабайта</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP адрес на прокси (напр. за IPv4: 127.0.0.1 / за IPv6: ::1)</translation>
     </message>
+    <message>
+        <source>Reset all client options to default.</source>
+        <translation>Възстановете всички настройки по подразбиране.</translation>
+    </message>
     <message>
         <source>&amp;Reset Options</source>
         <translation>&amp;Нулирай настройките</translation>
@@ -614,6 +898,10 @@ Address: %4
         <source>Expert</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>
@@ -622,6 +910,14 @@ Address: %4
         <source>Map port using &amp;UPnP</source>
         <translation>Отваряне на входящия порт чрез &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Свързване с Биткойн мрежата чрез SOCKS5  прокси.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Свързване чрез SOCKS5  прокси (прокси по подразбиране):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Прокси &amp; АйПи:</translation>
@@ -690,6 +986,22 @@ Address: %4
         <source>none</source>
         <translation>нищо</translation>
     </message>
+    <message>
+        <source>Confirm options reset</source>
+        <translation>Потвърдете отмяната на настройките.</translation>
+    </message>
+    <message>
+        <source>Client restart required to activate changes.</source>
+        <translation>Изисква се рестартиране на клиента за активиране на извършените промени.</translation>
+    </message>
+    <message>
+        <source>Client will be shutdown, do you want to proceed?</source>
+        <translation>Клиентът ще бъде изключен,искате ли да продължите?</translation>
+    </message>
+    <message>
+        <source>This change would require a client restart.</source>
+        <translation>Тази промяна изисква рестартиране на клиента Ви.</translation>
+    </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
         <translation>Прокси адресът е невалиден.</translation>
@@ -709,10 +1021,18 @@ Address: %4
         <source>Available:</source>
         <translation>Налично:</translation>
     </message>
+    <message>
+        <source>Your current spendable balance</source>
+        <translation>Вашата текуща сметка за изразходване</translation>
+    </message>
     <message>
         <source>Pending:</source>
         <translation>Изчакващо:</translation>
     </message>
+    <message>
+        <source>Immature:</source>
+        <translation>Неразвит:</translation>
+    </message>
     <message>
         <source>Balances</source>
         <translation>Баланс</translation>
@@ -725,6 +1045,14 @@ Address: %4
         <source>Your current total balance</source>
         <translation>Текущият ви общ баланс</translation>
     </message>
+    <message>
+        <source>Spendable:</source>
+        <translation>За харчене:</translation>
+    </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Скорошни транзакции</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>несинхронизиран</translation>
@@ -736,25 +1064,81 @@ Address: %4
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Заявената сума за плащане: %1 е твърде малка (счита се за отпадък)</translation>
     </message>
+    <message>
+        <source>Refund from %1</source>
+        <translation>Възстановяване на сума от %1</translation>
+    </message>
+    <message>
+        <source>Error communicating with %1: %2</source>
+        <translation>Грешка при комуникацията с %1: %2</translation>
+    </message>
+    <message>
+        <source>Bad response from server %1</source>
+        <translation>Възникна проблем при свързването със сървър %1</translation>
+    </message>
     <message>
         <source>Payment acknowledged</source>
-        <translation>Плащането е приета</translation>
+        <translation>Плащането е прието</translation>
     </message>
-    </context>
+    <message>
+        <source>Network request error</source>
+        <translation>Грешка в мрежата по време на заявката</translation>
+    </message>
+</context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>Клиент на потребителя</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Адрес в интернет</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Време за отговор</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
+    <message>
+        <source>%1 h</source>
+        <translation>%1 час</translation>
+    </message>
+    <message>
+        <source>%1 m</source>
+        <translation>%1 минута</translation>
+    </message>
+    <message>
+        <source>%1 s</source>
+        <translation>%1 секунда</translation>
+    </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>Мрежа</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>Неизвестен</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Неналичен</translation>
+    </message>
     <message>
         <source>N/A</source>
-        <translation>N/A</translation>
+        <translation>Несъществуващ</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 милисекунда</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -792,6 +1176,10 @@ Address: %4
         <source>&amp;Information</source>
         <translation>Данни</translation>
     </message>
+    <message>
+        <source>Debug window</source>
+        <translation>Прозорец с грешки</translation>
+    </message>
     <message>
         <source>General</source>
         <translation>Основни</translation>
@@ -800,6 +1188,14 @@ Address: %4
         <source>Using OpenSSL version</source>
         <translation>Използване на OpenSSL версия</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Използване на база данни BerkeleyDB </translation>
+    </message>
+    <message>
+        <source>Startup time</source>
+        <translation>Време за стартиране</translation>
+    </message>
     <message>
         <source>Network</source>
         <translation>Мрежа</translation>
@@ -832,10 +1228,26 @@ Address: %4
         <source>Select a peer to view detailed information.</source>
         <translation>Избери пиър за детайлна информация.</translation>
     </message>
+    <message>
+        <source>Direction</source>
+        <translation>Посока</translation>
+    </message>
     <message>
         <source>Version</source>
         <translation>Версия</translation>
     </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Клиент на потребителя</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Услуги</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Време за отговор</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Време на последния блок</translation>
@@ -860,6 +1272,22 @@ Address: %4
         <source>Totals</source>
         <translation>Общо:</translation>
     </message>
+    <message>
+        <source>In:</source>
+        <translation>Входящи:</translation>
+    </message>
+    <message>
+        <source>Out:</source>
+        <translation>Изходящи</translation>
+    </message>
+    <message>
+        <source>Build date</source>
+        <translation>Дата на създаване</translation>
+    </message>
+    <message>
+        <source>Debug log file</source>
+        <translation>Лог файл,съдържащ грешките</translation>
+    </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Отворете Биткой дебъг лог файла от настоящата Data папка. Може да отнеме няколко секунди при по - големи лог файлове.</translation>
@@ -868,10 +1296,34 @@ Address: %4
         <source>Clear console</source>
         <translation>Изчисти конзолата</translation>
     </message>
+    <message>
+        <source>Welcome to the Bitcoin RPC console.</source>
+        <translation>Добре дошли в Биткойн 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>Използвайте стрелки надолу и нагореза разглеждане на историятаот команди и &lt;b&gt;Ctrl-L&lt;/b&gt; за изчистване на конзолата.</translation>
     </message>
+    <message>
+        <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+        <translation>Въведeте &lt;/b&gt;помощ&lt;/b&gt; за да видите наличните команди.</translation>
+    </message>
+    <message>
+        <source>%1 B</source>
+        <translation>%1 Байт</translation>
+    </message>
+    <message>
+        <source>%1 KB</source>
+        <translation>%1 Килобайт</translation>
+    </message>
+    <message>
+        <source>%1 MB</source>
+        <translation>%1 Мегабайт</translation>
+    </message>
+    <message>
+        <source>%1 GB</source>
+        <translation>%1 Гигабайт</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
@@ -883,6 +1335,10 @@ Address: %4
         <source>&amp;Label:</source>
         <translation>&amp;Име:</translation>
     </message>
+    <message>
+        <source>&amp;Message:</source>
+        <translation>&amp;Съобщение:</translation>
+    </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Използвате този формуляр за заявяване на плащания. Всички полета са &lt;b&gt;незадължителни&lt;/b&gt;.</translation>
@@ -899,6 +1355,14 @@ Address: %4
         <source>Clear</source>
         <translation>Изчистване</translation>
     </message>
+    <message>
+        <source>Requested payments history</source>
+        <translation>Изискана история на плащанията</translation>
+    </message>
+    <message>
+        <source>&amp;Request payment</source>
+        <translation>&amp;Изискване на плащане</translation>
+    </message>
     <message>
         <source>Show</source>
         <translation>Показване</translation>
@@ -922,6 +1386,14 @@ Address: %4
 </context>
 <context>
     <name>ReceiveRequestDialog</name>
+    <message>
+        <source>QR Code</source>
+        <translation>QR код</translation>
+    </message>
+    <message>
+        <source>Copy &amp;URI</source>
+        <translation>Копиране на &amp;URI</translation>
+    </message>
     <message>
         <source>Copy &amp;Address</source>
         <translation>&amp;Копирай адрес</translation>
@@ -930,6 +1402,10 @@ Address: %4
         <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>
@@ -977,6 +1453,10 @@ Address: %4
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
+    <message>
+        <source>(no message)</source>
+        <translation>(без съобщение)</translation>
+    </message>
     <message>
         <source>(no amount)</source>
         <translation>(липсва сума)</translation>
@@ -988,6 +1468,22 @@ Address: %4
         <source>Send Coins</source>
         <translation>Изпращане</translation>
     </message>
+    <message>
+        <source>Coin Control Features</source>
+        <translation>Настройки за контрол на монетите</translation>
+    </message>
+    <message>
+        <source>automatically selected</source>
+        <translation>астоматично избран</translation>
+    </message>
+    <message>
+        <source>Insufficient funds!</source>
+        <translation>Нямате достатъчно налични пари!</translation>
+    </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Количество:</translation>
+    </message>
     <message>
         <source>Bytes:</source>
         <translation>Байтове:</translation>
@@ -1004,6 +1500,34 @@ Address: %4
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>След прилагане на ДДС</translation>
+    </message>
+    <message>
+        <source>Change:</source>
+        <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>per kilobyte</source>
+        <translation>за килобайт</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>Крайна сума поне</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Препоръчителна:</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Време за потвърждение:</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Изпращане към повече от един получател</translation>
@@ -1036,10 +1560,34 @@ Address: %4
         <source>Confirm send coins</source>
         <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>Copy change</source>
+        <translation>Копирай рестото</translation>
+    </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
         <translation>Пълна сума %1 (= %2)</translation>
@@ -1060,14 +1608,34 @@ Address: %4
         <source>The amount exceeds your balance.</source>
         <translation>Сумата надвишава текущия баланс</translation>
     </message>
+    <message>
+        <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+        <translation>Сумата при добавяне на данък добавена стойност по %1 транзакцията надвишава сумата по вашата сметка.</translation>
+    </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation>Грешка при създаването на трансакция!</translation>
+        <translation>Грешка при създаването на транзакция!</translation>
+    </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Такса по-висока от %1 се смята за извънредно висока.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Платете минималната такса от %1</translation>
+    </message>
+    <message>
+        <source>Warning: Invalid Bitcoin address</source>
+        <translation>Внимание: Невалиден Биткойн адрес</translation>
     </message>
     <message>
         <source>(no label)</source>
         <translation>(без име)</translation>
     </message>
+    <message>
+        <source>Warning: Unknown change address</source>
+        <translation>Внимание:Неизвестен адрес за промяна</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Наистина ли искате да изпратите?</translation>
@@ -1123,6 +1691,10 @@ Address: %4
         <source>Message:</source>
         <translation>Съобщение:</translation>
     </message>
+    <message>
+        <source>This is a verified payment request.</source>
+        <translation>Това е потвърдена транзакция.</translation>
+    </message>
     <message>
         <source>Pay To:</source>
         <translation>Плащане на:</translation>
@@ -1130,7 +1702,15 @@ Address: %4
     </context>
 <context>
     <name>ShutdownWindow</name>
-    </context>
+    <message>
+        <source>Bitcoin Core is shutting down...</source>
+        <translation>Биткойн ядрото се изключва...</translation>
+    </message>
+    <message>
+        <source>Do not shut down the computer until this window disappears.</source>
+        <translation>Не изключвайте компютъра докато този прозорец не изчезне.</translation>
+    </message>
+</context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
@@ -1193,6 +1773,10 @@ Address: %4
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Проверете съобщение, за да сте сигурни че е подписано с определен Биткоин адрес</translation>
     </message>
+    <message>
+        <source>Verify &amp;Message</source>
+        <translation>Потвърди &amp;съобщението</translation>
+    </message>
     <message>
         <source>Click "Sign Message" to generate signature</source>
         <translation>Натиснете "Подписване на съобщение" за да създадете подпис</translation>
@@ -1248,6 +1832,10 @@ Address: %4
 </context>
 <context>
     <name>SplashScreen</name>
+    <message>
+        <source>Bitcoin Core</source>
+        <translation>Биткойн ядро</translation>
+    </message>
     <message>
         <source>The Bitcoin Core developers</source>
         <translation>Разработчици на Bitcoin Core</translation>
@@ -1259,13 +1847,21 @@ Address: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    </context>
+    <message>
+        <source>KB/s</source>
+        <translation>Килобайта в секунда</translation>
+    </message>
+</context>
 <context>
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
         <translation>Подлежи на промяна до %1</translation>
     </message>
+    <message>
+        <source>conflicted</source>
+        <translation>припокриващ се</translation>
+    </message>
     <message>
         <source>%1/offline</source>
         <translation>%1/офлайн</translation>
@@ -1346,6 +1942,10 @@ Address: %4
         <source>Merchant</source>
         <translation>Търговец</translation>
     </message>
+    <message>
+        <source>Debug information</source>
+        <translation>Информация за грешките</translation>
+    </message>
     <message>
         <source>Transaction</source>
         <translation>Трансакция</translation>
@@ -1412,6 +2012,10 @@ Address: %4
         <source>Generated but not accepted</source>
         <translation>Генерирана, но отхвърлена от мрежата</translation>
     </message>
+    <message>
+        <source>Offline</source>
+        <translation>Извън линия</translation>
+    </message>
     <message>
         <source>Unconfirmed</source>
         <translation>Непотвърдено</translation>
@@ -1563,6 +2167,10 @@ Address: %4
         <source>Exporting Successful</source>
         <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 файл (*.csv)</translation>
@@ -1631,10 +2239,22 @@ Address: %4
         <source>Backup Wallet</source>
         <translation>Запазване на портфейла</translation>
     </message>
+    <message>
+        <source>Wallet Data (*.dat)</source>
+        <translation>Информация за портфейла (*.dat)</translation>
+    </message>
     <message>
         <source>Backup Failed</source>
         <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>
     <message>
         <source>Backup Successful</source>
         <translation>Успешно запазване на портфейла</translation>
@@ -1650,6 +2270,10 @@ Address: %4
         <source>Specify data directory</source>
         <translation>Определете директория за данните</translation>
     </message>
+    <message>
+        <source>Connect to a node to retrieve peer addresses, and disconnect</source>
+        <translation>Свържете се към сървър за да можете да извлечете адресите на пиърите след което се разкачете.</translation>
+    </message>
     <message>
         <source>Specify your own public address</source>
         <translation>Въведете Ваш публичен адрес</translation>
@@ -1658,6 +2282,10 @@ Address: %4
         <source>Use the test network</source>
         <translation>Използвайте тестовата мрежа</translation>
     </message>
+    <message>
+        <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
+        <translation>Приемайте връзки отвън.(по подразбиране:1 в противен случай -proxy или -connect)</translation>
+    </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: -paytxfee има голяма стойност! Това е таксата за транзакциите, която ще платите ако направите транзакция.</translation>
@@ -1694,6 +2322,14 @@ Address: %4
         <source>Wallet options:</source>
         <translation>Настройки на портфейла:</translation>
     </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Свързване чрез SOCKS5  прокси</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Всички права запазени (C) 2009-%i Доставчиците на Биткойн</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Данни</translation>
@@ -1710,6 +2346,10 @@ Address: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Изпрати локализиращата или дебъг информацията към конзолата, вместо файлът debug.log</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Това е експериментален софтуер.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Сумата на трансакцията е твърде малка</translation>
@@ -1734,6 +2374,10 @@ Address: %4
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Внимание: Използвате остаряла версия, необходимо е обновление!</translation>
     </message>
+    <message>
+        <source>on startup</source>
+        <translation>по време на стартирането</translation>
+    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Парола за  JSON-RPC връзките</translation>
@@ -1770,6 +2414,10 @@ Address: %4
         <source>Invalid -proxy address: '%s'</source>
         <translation>Невалиден -proxy address: '%s'</translation>
     </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Назовете конфигурационен файл(по подразбиране %s)</translation>
+    </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_bs.ts b/src/qt/locale/bitcoin_bs.ts
index 86526022fe2e..fc5e6d270e76 100644
--- a/src/qt/locale/bitcoin_bs.ts
+++ b/src/qt/locale/bitcoin_bs.ts
@@ -1,4 +1,4 @@
-<TS language="bs" version="2.0">
+<TS language="bs" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 9d934cd602dd..fb8e93ea9f1a 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1,4 +1,4 @@
-<TS language="ca" version="2.0">
+<TS language="ca" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1284,6 +1284,10 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Reemborsament de %1</translation>
     </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>La sol·licitud de pagament %1 és massa gran (%2 bytes, permès %3 bytes).</translation>
+    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Protecció de DoS per a la sol·licitud de pagament</translation>
@@ -3074,6 +3078,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Es requereix una prioritat alta per retransmetre transaccions gratuïtes o de baixa comissió (per defecte:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
@@ -3145,6 +3153,10 @@ per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</tr
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error en carregar wallet.dat: el moneder requereix una versió més nova del Bitcoin core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Error en llegir la base de dades, tancant.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Error: s'ha trobat un argument -tor no acceptat. Feu servir -onion.</translation>
@@ -3201,6 +3213,10 @@ per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</tr
         <source>RPC server options:</source>
         <translation>Opcions del servidor RPC:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Suport RPC per a connexions HTTP persistents (per defecte: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Descarta a l'atzar 1 de cada &lt;n&gt; missatges de la xarxa</translation>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 12f18f66ac19..349fc6b42efc 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1,4 +1,4 @@
-<TS language="ca@valencia" version="2.0">
+<TS language="ca@valencia" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 073c910a1cee..52d93d59f553 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1,4 +1,4 @@
-<TS language="ca_ES" version="2.0">
+<TS language="ca_ES" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1284,6 +1284,10 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Reemborsament de %1</translation>
     </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>La sol·licitud de pagament %1 és massa gran (%2 bytes, permès %3 bytes).</translation>
+    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Protecció de DoS per a la sol·licitud de pagament</translation>
@@ -3074,6 +3078,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Es requereix una prioritat alta per retransmetre transaccions gratuïtes o de baixa comissió (per defecte:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Defineix la mida màxima de transaccions d'alta prioritat / baixa comissió en bytes (per defecte: %d)</translation>
@@ -3145,6 +3153,10 @@ per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</tr
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error en carregar wallet.dat: el moneder requereix una versió més nova del Bitcoin core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Error en llegir la base de dades, tancant.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Error: s'ha trobat un argument -tor no acceptat. Feu servir -onion.</translation>
@@ -3201,6 +3213,10 @@ per exemple: alertnotify=echo %%s | mail -s "Avís de Bitcoin" admin@foo.com</tr
         <source>RPC server options:</source>
         <translation>Opcions del servidor RPC:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Suport RPC per a connexions HTTP persistents (per defecte: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Descarta a l'atzar 1 de cada &lt;n&gt; missatges de la xarxa</translation>
diff --git a/src/qt/locale/bitcoin_cmn.ts b/src/qt/locale/bitcoin_cmn.ts
index 09ff0acf026e..3286f126982b 100644
--- a/src/qt/locale/bitcoin_cmn.ts
+++ b/src/qt/locale/bitcoin_cmn.ts
@@ -1,4 +1,4 @@
-<TS language="cmn" version="2.0">
+<TS language="cmn" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index 966303c33a7a..04cd96f42595 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1,4 +1,4 @@
-<TS language="cs" version="2.0">
+<TS language="cs" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1288,6 +1288,10 @@ Adresa: %4
         <source>Refund from %1</source>
         <translation>Vrácení peněz od %1</translation>
     </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Platební požadavek %1 je moc velký (%2 bajtů, povoleno %3 bajtů).</translation>
+    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>DoS ochrana platebního požadavku</translation>
@@ -1864,6 +1868,10 @@ Adresa: %4
         <source>Minimize</source>
         <translation>Skryj</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Pokud je vlastní poplatek nastavený na 1000 satoshi a transakce má pouze 250 bajtů, tak „za kilobajt“ zaplatí poplatek jen 250 satoshi, zatímco „přinejmenším“ zaplatí 1000 satoshi. Pro transakce větší než kilobajt obě možnosti platí za kilobajt.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>za kilobajt</translation>
@@ -1876,6 +1884,10 @@ Adresa: %4
         <source>total at least</source>
         <translation>přinejmenším</translation>
     </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Platit jen minimální poplatek je v pořádku, pokud je zrovna méně transakcí než místa v blocích. Ale počítej s tím, že to také může skončit transakcí, která nikdy nebude potvrzena, pokud je větší poptávka po bitcoinových transakcích, než síť zvládne zpracovat.</translation>
+    </message>
     <message>
         <source>(read the tooltip)</source>
         <translation>(viz bublina)</translation>
@@ -1888,6 +1900,22 @@ Adresa: %4
         <source>Custom:</source>
         <translation>Vlastní:</translation>
     </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Inteligentní poplatek ještě není inicializovaný. Obvykle mu to tak pár bloků trvá...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Rychlost potvrzení:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normální</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rychlá</translation>
+    </message>
     <message>
         <source>Send as zero-fee transaction if possible</source>
         <translation>Pošli transakci pokud možno bez poplatku</translation>
@@ -2000,6 +2028,18 @@ Adresa: %4
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transakce byla odmítnuta! Tohle může nastat, pokud nějaké mince z tvé peněženky už jednou byly utraceny, například pokud používáš kopii souboru wallet.dat a mince byly utraceny v druhé kopii, ale nebyly označeny jako utracené v této.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Poplatek vyšší než %1 je považován za absurdně vysoký.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Zaplatit pouze minimální poplatek %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Potvrzování by podle odhadu mělo začít během %1 bloků.</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Upozornění: Neplatná Bitcoinová adresa</translation>
@@ -3026,6 +3066,10 @@ Adresa: %4
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Poplatky (v BTC/Kb) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Pokud paytxfee není nastaveno, platit dostatečný poplatek na to, aby byly transakce potvrzeny v průměru během n bloků (výchozí: %u)</translation>
+    </message>
     <message>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
         <translation>Maximální velikost dat v transakcích nesoucích data, se kterou jsme ochotni je ještě přeposílat a těžit (výchozí: %u)</translation>
@@ -3074,6 +3118,10 @@ Adresa: %4
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Chyba při načítání wallet.dat: peněženka vyžaduje novější verzi Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Chyba při čtení z databáze, ukončuji se.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Chyba: Argument -tor již není podporovaný, použij -onion.</translation>
@@ -3166,9 +3214,13 @@ Adresa: %4
         <source>Transaction amounts must be positive</source>
         <translation>Částky v transakci musí být kladné</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transakce je na poplatkovou politiku příliš velká</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
-        <translation>Transace je příliš velká</translation>
+        <translation>Transakce je příliš velká</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer (bind returned error %s)</source>
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index 89b0cbe919e8..c9c437924847 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -1,4 +1,4 @@
-<TS language="cy" version="2.0">
+<TS language="cy" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index a1d507b5996b..a5113d4a5527 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1,4 +1,4 @@
-<TS language="da" version="2.0">
+<TS language="da" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1285,8 +1285,8 @@ Adresse: %4
         <translation>Tilbagebetaling fra %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Betalingsanmodning %2 er for stor (%3 byte, %4 byte tilladt).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Betalingsanmodning %1 er for stor (%2 byte, %3 byte tilladt).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3082,6 +3082,10 @@ Adresse: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Forespørgsel</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Kræv høj prioritet for at videresende transaktioner med intet eller lavt gebyr (standard: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sæt maksimumstørrelse for højprioritet/lavgebyr-transaktioner i byte (standard: %d)</translation>
@@ -3154,6 +3158,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Fejl ved indlæsning af wallet.dat: Tegnebog kræver en nyere version af Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Fejl under læsning fra database; lukker ned.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Fejl: Ikke understøttet argument -tor fundet, brug -onion.</translation>
@@ -3210,6 +3218,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>RPC server options:</source>
         <translation>Tilvalg for RPC-server:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC-understøttelse for HTTP-persistente forbindelser (standard: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Drop tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 3d61eb4d3e4a..fc18a235eb58 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1,4 +1,4 @@
-<TS language="de" version="2.0">
+<TS language="de" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1288,8 +1288,8 @@ Adresse: %4</translation>
         <translation>Rücküberweisung von %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Zahlungsanforderung %2 ist zu groß (%3 Byte, erlaubt sind %4 Byte).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Zahlungsanforderung %1 ist zu groß (%2 Byte, erlaubt sind %3 Byte).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3085,6 +3085,10 @@ Adresse: %4</translation>
         <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>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Zum Weiterleiten von freien Transaktionen oder Transaktionen mit niedrigen Gebühren eine hohe Priorität voraussetzen (Standard: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Maximale Größe in Byte von "high-priority/low-fee"-Transaktionen festlegen (Standard: %d)</translation>
@@ -3157,6 +3161,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Fehler beim Laden von wallet.dat: Wallet benötigt neuere Version von Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Fehler beim lesen der Datenbank, Ausführung wird beendet.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Fehler: Nicht unterstütztes Argument -tor gefunden, bitte -onion verwenden.</translation>
@@ -3213,6 +3221,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>RPC server options:</source>
         <translation>RPC-Serveroptionen:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Unterstützung für persistente HTTP-Verbindungen bei RPC (Standard: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwerfen</translation>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 5f2b9d072514..084c9fa753a4 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1,4 +1,4 @@
-<TS language="el_GR" version="2.0">
+<TS language="el_GR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index e89eea4bf4e4..e84dac6b1e50 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1,4 +1,4 @@
-<TS language="eo" version="2.0">
+<TS language="eo" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index ed1d08d35c94..e52bf88a8734 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1,4 +1,4 @@
-<TS language="es" version="2.0">
+<TS language="es" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1285,8 +1285,8 @@ Dirección: %4
         <translation>Devolución desde %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation> Petición pago %2 es demasiado grande ( %3 bytes , permitió %4 bytes ) .</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>La petición de pago %1 es demasiado grande (%2 bytes, permitidos %3 bytes).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3074,6 +3074,10 @@ Dirección: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Consulta de direcciones pares mediante búsqueda de DNS, si bajo en direcciones (por defecto: 1 a menos que - conectar)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Se requiere alta prioridad para retransmitir transacciones gratis o de baja comisión (por defecto:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
@@ -3146,6 +3150,10 @@ por ejemplo: alertnotify=echo %% s | correo -s "Alerta Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Error al leer la base de datos, cerrando.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Error: Argumento encontrado -tor no soportado, utilice -onion</translation>
@@ -3202,6 +3210,10 @@ por ejemplo: alertnotify=echo %% s | correo -s "Alerta Bitcoin" admin@foo.com
         <source>RPC server options:</source>
         <translation>Opciones de servidor RPC:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Soporte RPC para conexiones HTTP persistentes (por defecto: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Ignorar 1 de cada &lt;n&gt; mensajes de red al azar</translation>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index d6451185a42b..4495d9bd50e6 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -1,4 +1,4 @@
-<TS language="es_CL" version="2.0">
+<TS language="es_CL" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 9a8e3d593807..1c881fcf64d1 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -1,4 +1,4 @@
-<TS language="es_DO" version="2.0">
+<TS language="es_DO" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index 1f1d712da49f..4341bc821f09 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -1,4 +1,4 @@
-<TS language="es_MX" version="2.0">
+<TS language="es_MX" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index 31107444f472..13f33220a7b9 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -1,4 +1,4 @@
-<TS language="es_UY" version="2.0">
+<TS language="es_UY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index ee50226abb0c..f1e5c2715c85 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1,4 +1,4 @@
-<TS language="et" version="2.0">
+<TS language="et" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index 72118102daa7..34c34c44313c 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -1,4 +1,4 @@
-<TS language="eu_ES" version="2.0">
+<TS language="eu_ES" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 3fbf558770b2..2f9a1c734517 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1,4 +1,4 @@
-<TS language="fa" version="2.0">
+<TS language="fa" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index f0e6770edc76..0a3071a6c7d4 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1,4 +1,4 @@
-<TS language="fa_IR" version="2.0">
+<TS language="fa_IR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index f7e6a8ccf72d..c16e0e177684 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1,4 +1,4 @@
-<TS language="fi" version="2.0">
+<TS language="fi" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -67,11 +67,11 @@
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Nämä ovat sinun Bitcoin osoitteita maksujen lähetykseen. Tarkista aina rahan määrä ja vastaanottajan osoite ennenkuin lähetät kolikkoja.</translation>
+        <translation>Nämä ovat sinun Bitcoin osoitteita maksujen lähetykseen. Tarkista aina summa ja vastaanottajan osoite ennenkuin lähetät kolikkoja.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Nämä ovat sinun Bitcoin-osoitteesi suoritusten vastaanottamiseen. Suositellaan että annat uuden osoitteen kullekin rahansiirrolle</translation>
+        <translation>Nämä ovat sinun Bitcoin-osoitteesi suoritusten vastaanottamiseen. Suositellaan että annat uuden osoitteen kullekin transaktiolle.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index 612e7481289b..df0c507a44e8 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1,4 +1,4 @@
-<TS language="fr" version="2.0">
+<TS language="fr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1281,8 +1281,8 @@ Adresse : %4
         <translation>Remboursement de %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>La demande de paiement %2 est trop grande (%3 octets, %4 octets permis).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>La demande de paiement %1 est trop grande (%2 octets, %3 octets permis).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3150,6 +3150,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Erreur lors du chargement de wallet.dat : le portefeuille exige une version plus récente de Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Erreur de lecture de la base de données, fermeture en cours.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Erreur : argument non pris en charge -tor trouvé, utiliser -onion.</translation>
@@ -3206,6 +3210,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
         <source>RPC server options:</source>
         <translation>Options du serveur RPC :</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Prise en charge de RPC pour les connexions persistantes HTTP (par défaut : %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Abandonner aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index c6b7dd7ffa8f..f314f3d1c151 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -1,4 +1,4 @@
-<TS language="fr_CA" version="2.0">
+<TS language="fr_CA" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index cf16a129cafc..ac2d7087a41c 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1,4 +1,4 @@
-<TS language="gl" version="2.0">
+<TS language="gl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_gu_IN.ts b/src/qt/locale/bitcoin_gu_IN.ts
index ef99b0dd3943..b7b091aa39c0 100644
--- a/src/qt/locale/bitcoin_gu_IN.ts
+++ b/src/qt/locale/bitcoin_gu_IN.ts
@@ -1,4 +1,4 @@
-<TS language="gu_IN" version="2.0">
+<TS language="gu_IN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 2aff8300fd6e..45a664d6e038 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1,4 +1,4 @@
-<TS language="he" version="2.0">
+<TS language="he" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index a0f52609a37a..208d1e03699b 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -1,4 +1,4 @@
-<TS language="hi_IN" version="2.0">
+<TS language="hi_IN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index d751c763de3a..c4dc0ded97c9 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1,4 +1,4 @@
-<TS language="hr" version="2.0">
+<TS language="hr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 1f9f252106c8..a95f9412c365 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1,4 +1,4 @@
-<TS language="hu" version="2.0">
+<TS language="hu" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 012db4f4a228..bdc67a55d106 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1,4 +1,4 @@
-<TS language="id_ID" version="2.0">
+<TS language="id_ID" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 43fbf9aba938..23eec1bf3e82 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1,4 +1,4 @@
-<TS language="it" version="2.0">
+<TS language="it" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1283,8 +1283,8 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
         <translation>Rimborso da %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>La richiesta di pagamento %2 (%3 byte) supera la dimensione massima di %4 byte.</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>La richiesta di pagamento %1 (%2 byte) supera la dimensione massima di %3 byte.</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3076,6 +3076,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Ottiene gli indirizzi dei peer attraverso interrogazioni DNS, in caso di scarsa disponibilità (predefinito: 1 a meno che -connect non sia specificato)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Richiedi alta priorità per la trasmissione di transazioni a zero o basse commissioni (predefinito:%u )</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Imposta la dimensione massima in byte delle transazioni ad alta-priorità/basse-commissioni (predefinito: %d)</translation>
@@ -3147,6 +3151,10 @@ Si raccomanda inoltre di configurare alertnotify in modo da ricevere notifiche d
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Errore durante il caricamento del file wallet.dat: il portamonete richiede una versione di Bitcoin Core più recente</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Errore durante lalettura del database. Arresto in corso.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Errore: Rilevato argomento -tor non supportato, utilizzare -onion.</translation>
@@ -3203,6 +3211,10 @@ Si raccomanda inoltre di configurare alertnotify in modo da ricevere notifiche d
         <source>RPC server options:</source>
         <translation>Opzioni server RPC:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Supporto RPC per le connessioni HTTP persistenti (predefinito: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Scarta casualmente 1 ogni &lt;n&gt; messaggi di rete</translation>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index fe8cb41b01da..99164abab47a 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1,4 +1,4 @@
-<TS language="ja" version="2.0">
+<TS language="ja" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1288,8 +1288,8 @@ Address: %4
         <translation>%1 からの返金</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>支払リクエスト %2 は大きすぎます（%3バイトですが、%4バイトまでが許されています）。</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>支払リクエスト %1 は大きすぎます（%2バイトですが、%3バイトまでが許されています）。</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3086,6 +3086,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>保有するピアアドレスが少ない場合、DNS ルックアップによりピアアドレスを問い合わせる (-connect を使っていない場合の初期値: 1)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>手数料なし、または低手数料のトランザクションのリレー時に高い優先度を要求する (初期値: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>最優先/最低手数料の最大サイズをバイトで指定 (初期値: %d)</translation>
@@ -3158,6 +3162,10 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>wallet.dat の読み込みに失敗しました: ウォレットの読み込みにはより新しいバージョンの Bitcoin Core が必要です</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>
@@ -3214,6 +3222,10 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>RPCサーバのオプション:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPCにおけるHTTPの持続的接続のサポート (初期値: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>&lt;n&gt; 個のネットワークメッセージごとにひとつをランダムに捨てる</translation>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index b2831b79e781..732081efda7e 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -1,4 +1,4 @@
-<TS language="ka" version="2.0">
+<TS language="ka" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index 1623c25f42c8..5e827caa4461 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -1,4 +1,4 @@
-<TS language="kk_KZ" version="2.0">
+<TS language="kk_KZ" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index d0119a21b007..211f850c1871 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1,4 +1,4 @@
-<TS language="ko_KR" version="2.0">
+<TS language="ko_KR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index ed7542261cb2..58ef2e89e235 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -1,4 +1,4 @@
-<TS language="ky" version="2.0">
+<TS language="ky" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 7539327cda2a..b0011f87afcf 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1,4 +1,4 @@
-<TS language="la" version="2.0">
+<TS language="la" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index e18e7237567a..a77ee9b52994 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -1,4 +1,4 @@
-<TS language="lt" version="2.0">
+<TS language="lt" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index 66669a63bd3c..bd25749ad97b 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -1,4 +1,4 @@
-<TS language="lv_LV" version="2.0">
+<TS language="lv_LV" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index 5f016fd80d7f..26dbc741cc6a 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -1,4 +1,4 @@
-<TS language="mn" version="2.0">
+<TS language="mn" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index 7ab50d66149a..e7a5a64f4630 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -1,4 +1,4 @@
-<TS language="ms_MY" version="2.0">
+<TS language="ms_MY" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index f54fd8059b03..eaaf8d7805bd 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1,4 +1,4 @@
-<TS language="nb" version="2.0">
+<TS language="nb" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1289,8 +1289,8 @@ Adresse: %4
         <translation>Refundering fra %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Betalingsforespørsel %2 er for stor (%3 bytes, tillatt %4 bytes).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Betalingsforespørsel %1 er for stor (%2 bytes, tillatt %3 bytes).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3086,6 +3086,10 @@ Adresse: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Krev høy prioritet for å videreformidle transaksjoner som er gratis eller har lavt gebyr (standardverdi: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sett maksimum størrelse for transaksjoner med høy prioritet / lavt gebyr, i bytes (standardverdi: %d)</translation>
@@ -3158,6 +3162,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Feil ved lasting av wallet.dat: Lommeboken krever en nyere versjon av Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Feil ved lesing fra database, stenger ned.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Feil: Argumentet -tor er ikke støttet, bruk -onion.</translation>
@@ -3214,6 +3222,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>RPC server options:</source>
         <translation>Innstillinger for RPC-server:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC-støtte for persistente HTTP-forbindelser (standardverdi: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Slumpvis dropp 1 av hver &lt;n&gt; nettverksmeldinger</translation>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 71389b634678..998f8f359022 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1,4 +1,4 @@
-<TS language="nl" version="2.0">
+<TS language="nl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1289,8 +1289,8 @@ Adres: %4
         <translation>Restitutie van %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Betalingsaanvraag %2 is te groot (%3 bytes, %4 bytes toegestaan).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Betalingsverzoek %1 is te groot (%2 bytes, toegestaan ​​%3 bytes).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3066,6 +3066,31 @@ Adres: %4
         <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
         <translation>Toeslagen (in BTC/Kb) kleiner dan dit worden beschouwd als geen vergoeding transactieaanmaak (standaard: %s)</translation>
     </message>
+    <message>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Als paytxfee niet is ingesteld, het pakket voldoende vergoeding zodat transacties beginnen bevestiging gemiddeld binnen in blokken (default: %u)</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>ongeldig bedrag voor -maxtxfee=&lt;amount&gt;: '%s' (moet ten minste de minrelay vergoeding van %s het voorkomen geplakt transacties voorkomen)</translation>
+    </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximale grootte va  n de gegevens in gegevensdrager transacties we relais en de mijnen
+(default: %u)</translation>
+    </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximale totale kosten om te gebruiken in een enkele portemonnee transactie , vaststellen van een te laag kan grote transacties af te breken (default: %s)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Query voor peer- adressen via DNS- lookup , als laag op adressen  (default: 1 unless -connect)</translation>
+    </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Vereisen een hoge prioriteit voor het doorgeven van gratis of tegen lage vergoeding transacties  (default:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Stel maximumgrootte in bytes in voor hoge-prioriteits-/lage-transactiekosten-transacties (standaard: %d)</translation>
@@ -3114,6 +3139,10 @@ Adres: %4
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Fout bij laden wallet.dat: Portemonnee vereist een nieuwere versie van Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Fout bij het lezen van de database, afsluiten. </translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Fout: Niet ondersteund argument -tor gevonden, gebruik -onion.</translation>
@@ -3170,6 +3199,10 @@ Adres: %4
         <source>RPC server options:</source>
         <translation>RPC server opties:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC ondersteuning voor HTTP persisten verbindingen (default: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Laat willekeurig 1 elke &lt;n&gt; netwerkberichten vallen</translation>
@@ -3398,6 +3431,14 @@ Adres: %4
         <source>Prepend debug output with timestamp (default: %u)</source>
         <translation>Prepend debug output met tijdstempel (standaard: %u)</translation>
     </message>
+    <message>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Gegevensdrager transacties relay en de mijnen (default: %u)</translation>
+    </message>
+    <message>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Relay non-P2SH multisig (default: %u)</translation>
+    </message>
     <message>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Draai een proces om de wallet periodiek te flushen (default: %u)</translation>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 1aafea3936ca..355d167271f5 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1,4 +1,4 @@
-<TS language="pam" version="2.0">
+<TS language="pam" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index ea6cedf15411..d139f9560e0d 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1,4 +1,4 @@
-<TS language="pl" version="2.0">
+<TS language="pl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1038,6 +1038,10 @@ Adres: %4
         <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
         <translation>Połącz się z siecią Bitcoin poprzez proxy SOCKS5.</translation>
     </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>Połącz przez proxy SO&amp;CKS5 (domyślne proxy):</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP: </translation>
@@ -1224,6 +1228,10 @@ Adres: %4
         <source>Payment request rejected</source>
         <translation>Żądanie płatności odrzucone</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Sieć żądania płatności nie odpowiada sieci klienta.</translation>
+    </message>
     <message>
         <source>Payment request has expired.</source>
         <translation>Zażądanie płatności się przedawniło.</translation>
@@ -1271,6 +1279,10 @@ Adres: %4
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adres/Nazwa hosta</translation>
+    </message>
     <message>
         <source>Ping Time</source>
         <translation>Czas odpowiedzi</translation>
@@ -1420,6 +1432,10 @@ Adres: %4
         <source>Version</source>
         <translation>Wersja</translation>
     </message>
+    <message>
+        <source>Services</source>
+        <translation>Usługi</translation>
+    </message>
     <message>
         <source>Starting Height</source>
         <translation>Początkowa wysokość</translation>
@@ -1567,6 +1583,10 @@ Adres: %4
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Użyj tego formularza do zażądania płatności. Wszystkie pola są &lt;b&gt;opcjonalne&lt;/b&gt;.</translation>
     </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>Opcjonalna kwota by zażądać. Zostaw puste lub zero by nie zażądać konkretnej kwoty.</translation>
+    </message>
     <message>
         <source>Clear all fields of the form.</source>
         <translation>Wyczyść pola formularza.</translation>
@@ -1583,6 +1603,10 @@ Adres: %4
         <source>&amp;Request payment</source>
         <translation>&amp;Żądaj płatności</translation>
     </message>
+    <message>
+        <source>Show the selected request (does the same as double clicking an entry)</source>
+        <translation>Pokaż wybrane żądanie (robi to samo co dwukrotne kliknięcie pozycji)</translation>
+    </message>
     <message>
         <source>Show</source>
         <translation>Pokaż</translation>
@@ -2336,6 +2360,10 @@ Adres: %4
         <source>Address</source>
         <translation>Adres</translation>
     </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation>Niedojrzała (%1 potwierdzeń, będzie dostępna po %2)</translation>
+    </message>
     <message>
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
@@ -2554,7 +2582,11 @@ Adres: %4
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Jednostka w jakiej pokazywane są kwoty. Kliknij aby wybrać inną.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2646,6 +2678,10 @@ Adres: %4
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</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>Ustaw liczbę wątków skryptu weryfikacyjnego (%u do %d, 0 = auto, &lt;0 = zostaw tyle rdzeni wolnych, domyślnie: %d)</translation>
+    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>To jest testowa wersja - używaj na własne ryzyko - nie używaj do wykopywania oraz przy aplikacjach kupieckich</translation>
@@ -2762,6 +2798,10 @@ Adres: %4
         <source>Not enough file descriptors available.</source>
         <translation>Brak wystarczającej liczby deskryptorów plików. </translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Łącz z węzłami tylko w sieci &lt;net&gt; (ipv4, piv6 lub onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Odbuduj indeks łańcucha bloków z obecnych plików blk000??.dat</translation>
@@ -2814,18 +2854,78 @@ Adres: %4
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
         <translation>Pozwól na połączenia JSON-RPC z podanego źródła. Jako &lt;ip&gt; prawidłowe jest pojedyncze IP (np. 1.2.3.4), podsieć/maska (np. 1.2.3.4/255.255.255.0) lub sieć/CIDR (np. 1.2.3.4/24). Opcja ta może być użyta wiele razy.</translation>
     </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Napotkano błąd podczas ustawiania adres RPC %s port %u dla nasłuchiwania: %s</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Nie można uzyskać blokady na katalogu z danymi %s. Rdzeń Bitcoin najprawdopodobniej jest już uruchomiony.</translation>
     </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Błąd: Nasłuchiwanie połączeń przychodzących nie powiodło się (nasłuch zwrócił błąd %s)</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Błąd: Znaleziono niewspierany argument -socks . Ustawienie wersji SOCKS nie jest już możliwe, tylko serwery proxy SOCKS5 są wspierane.</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Uruchom polecenie przy otrzymaniu odpowiedniego powiadomienia lub gdy zobaczymy naprawdę długie rozgałęzienie (%s w poleceniu jest podstawiane za komunikat)</translation>
     </message>
+    <message>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maksymalny rozmiar danych w transakcji przekazującej dane które przekazujemy i wydobywamy (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
+        <translation>Wyszukaj adresy węzłów wykorzystując zapytanie DNS, jeżeli masz mało adresów (domyślnie: 1 jeśli nie użyto -connect)</translation>
+    </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Wymagaj wysokiego priorytetu dla przekazywania transakcji darmowych lub o niskiej opłacie (domyślnie:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: %d)</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Ustaw liczbę wątków dla generowania monet (-1 = wszystkie rdzenie, domyślnie: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Program ten zawiera oprogramowanie stworzone przez OpenSSL Project do użycia w OpensSSL Toolkit &lt;https://www.openssl.org/&gt;, oprogramowanie kryptograficzne napisane przez Eric Young oraz oprogramowanie UPnP napisane przez Thomas Bernard.</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Ostrzeżenie: -matxfee jest ustawione bardzo wysokie! Tak wysokie opłaty mogą być zapłacone w jednej transakcji.</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Połącz przez SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Błąd ładowania wallet.dat: Portfel wymaga nowszej wersji Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Błąd odczytu z bazy danych, wyłączam się.</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Błąd: Znaleziono nieprawidłowy argument -tor, użyj -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Prowizja (w BTC za kB) dodawana do wysyłanej transakcji (domyślnie: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informacja</translation>
@@ -2834,6 +2934,10 @@ Adres: %4
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
         <translation>Wstępna kontrola poprawności nie powiodła się. Bitcoin Core wyłącza się.</translation>
     </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Nieprawidłowa kwota dla -maxtxfee=&lt;amount&gt;: '%s'</translation>
+    </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nieprawidłowa kwota dla -minrelaytxfee=&lt;amount&gt;: '%s'</translation>
@@ -2842,6 +2946,10 @@ Adres: %4
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
         <translation>Nieprawidłowa kwota dla -mintxfee=&lt;amount&gt;: '%s'</translation>
     </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: '%s' (musi być co najmniej %s)</translation>
+    </message>
     <message>
         <source>Node relay options:</source>
         <translation>Opcje przekaźnikowe węzła:</translation>
@@ -2866,6 +2974,10 @@ Adres: %4
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Wyślij informację/raport do konsoli zamiast do pliku debug.log.</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Wyślij bez opłaty jeżeli to możliwe (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Pokaż wszystkie opcje odpluskwiania (użycie: --help -help-debug)</translation>
@@ -2890,10 +3002,18 @@ Adres: %4
         <source>Transaction amounts must be positive</source>
         <translation>Kwota transakcji musi być dodatnia</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transakcja jest zbyt duża dla tej opłaty</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transakcja zbyt duża</translation>
     </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Nie można przywiązać do %s na tym komputerze (bind zwrócił błąd %s)</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Używaj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje)</translation>
@@ -2970,10 +3090,26 @@ Adres: %4
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Błąd ładowania wallet.dat: Uszkodzony portfel</translation>
     </message>
+    <message>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = zachowaj wysłane metadane np. właściciel konta i informacje o żądaniach płatności, 2 = porzuć wysłane metadane)</translation>
+    </message>
+    <message>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Jak dokładna jest weryfikacja bloków przy -checkblocks (0-4, domyślnie: %u)</translation>
+    </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Loguj priorytety transakcji i opłaty na kB podczas kopania bloków (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
         <translation>Utrzymuj pełny indeks transakcji, używany przy wywołaniu RPC getrawtransaction (domyślnie: %u)</translation>
     </message>
+    <message>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Czas w sekundach, przez jaki nietrzymające się zasad węzły nie będą mogły ponownie się podłączyć (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>(default: %s)</source>
         <translation>(domyślnie: %s)</translation>
@@ -3066,6 +3202,10 @@ Adres: %4
         <source>Set the number of threads to service RPC calls (default: %d)</source>
         <translation>Ustaw liczbę wątków do obsługi RPC (domyślnie: %d)</translation>
     </message>
+    <message>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Ustaw flagę DB_PRIVATE w środowisku wallet db (domyślnie: %u)</translation>
+    </message>
     <message>
         <source>Specify configuration file (default: %s)</source>
         <translation>Wskaż plik konfiguracyjny (domyślnie: %s)</translation>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 1639bc1c3b55..bc85f1f31609 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -1,4 +1,4 @@
-<TS language="pt_BR" version="2.0">
+<TS language="pt_BR" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -296,7 +296,7 @@
     </message>
     <message>
         <source>Bitcoin Core client</source>
-        <translation>Cliente Bitcoin Core</translation>
+        <translation>Cliente Bitcoin</translation>
     </message>
     <message>
         <source>Importing blocks from disk...</source>
@@ -352,7 +352,7 @@
     </message>
     <message>
         <source>Show information about Bitcoin Core</source>
-        <translation>Mostrar informações sobre Bitcoin Core</translation>
+        <translation>Mostrar informações sobre Bitcoin</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
@@ -368,7 +368,7 @@
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Assine mensagems com seus endereços Bitcoin para provar que você é dono deles</translation>
+        <translation>Assine mensagens com seus endereços Bitcoin para provar que você é dono delas</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
@@ -392,7 +392,7 @@
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Núcleo Bitcoin</translation>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
@@ -400,7 +400,7 @@
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
-        <translation>&amp;A respeito do Bitcoin Core</translation>
+        <translation>&amp;Sobre Bitcoin</translation>
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
@@ -420,7 +420,7 @@
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Mostra a mensagem de ajuda do Bitcoin Core para pegar a lista com os comandos possíveis</translation>
+        <translation>Mostra a mensagem de ajuda do Bitcoin para pegar a lista com os comandos possíveis</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
@@ -822,7 +822,7 @@ Endereço: %4</translation>
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Núcleo Bitcoin</translation>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>version</source>
@@ -834,7 +834,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>About Bitcoin Core</source>
-        <translation>Sobre o Bitcoin Core</translation>
+        <translation>Sobre o Bitcoin</translation>
     </message>
     <message>
         <source>Command-line options</source>
@@ -881,15 +881,15 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation>Bem vindo ao Bitcoin Core.</translation>
+        <translation>Bem vindo ao Bitcoin.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation>A primeira vez que o programa é aberto você pode escolher onde o Bitcoin Core vai guardar os dados.</translation>
+        <translation>A primeira vez que o programa é aberto você pode escolher onde o Bitcoin vai guardar os dados.</translation>
     </message>
     <message>
         <source>Bitcoin Core will download and store a copy of the Bitcoin block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Bitcoin Core vai fazer download e guardar uma cópia da longa e única cadeia de blocos do Bitcoin: Blockchain. Pelo menos %1 GB de dados serão armazenados nesse diretório e isso aumentará ao longo do tempo. Sua carteira também será armazenada nesse diretório.</translation>
+        <translation>O Bitcoin vai fazer download e salvar uma cópia da cadeia de blocos do Bitcoin: Blockchain. Pelo menos %1 GB de dados serão armazenados nesse diretório e isso aumentará ao longo do tempo. Sua carteira também será armazenada nesse diretório.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
@@ -901,7 +901,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Núcleo Bitcoin</translation>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>Error: Specified data directory "%1" cannot be created.</source>
@@ -991,7 +991,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Third party transaction URLs</source>
-        <translation>URLs da transação de terceiros</translation>
+        <translation>URLs de transação de terceiros:</translation>
     </message>
     <message>
         <source>Active command-line options that override above options:</source>
@@ -1087,7 +1087,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>&amp;Língua da interface com usuário:</translation>
+        <translation>&amp;Linguagem da interface:</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
@@ -1154,7 +1154,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Watch-only:</source>
-        <translation>Apenas visualizar:</translation>
+        <translation>Monitorados:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1271,10 +1271,6 @@ Endereço: %4</translation>
         <source>Refund from %1</source>
         <translation>Reembolso de %1</translation>
     </message>
-    <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Solicitação de pagamento %2 muito grande (%3 bytes, %4 bytes permitido).</translation>
-    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Pagamento requer proteção DoS</translation>
@@ -1847,10 +1843,30 @@ Endereço: %4</translation>
         <source>Minimize</source>
         <translation>Minimizar</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se a taxa personalizada for definida em 1000 satoshis e a transação tiver somente 250 bytes, então "por kilobyte" somente paga 250 satoshis de taxa, enquanto "pelo menos" paga 1000 satoshis. Se a transação for maior que 1 kilobyte, ambos pagam por kilobyte.</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>por kilobyte</translation>
     </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se a taxa personalizada for definida em 1000 satoshis e a transação tiver somente 250 bytes, então "por kilobyte" somente paga 250 satoshis de taxa, enquanto "pelo menos" paga 1000 satoshis. Se a transação for maior que 1 kilobyte, ambos pagam por kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>pelo menos</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Pagando apenas a taxa mínima é bom, desde que haja pouco volume de transações. Mas esteja ciente de que isso pode acabar em uma transação nunca confirmanda uma vez que há mais demanda por transações do que a rede pode processar.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(Leia o popup)</translation>
+    </message>
     <message>
         <source>Recommended:</source>
         <translation>Recomendado:</translation>
@@ -2103,7 +2119,7 @@ Endereço: %4</translation>
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation>Bitcoin Core está desligando...</translation>
+        <translation>Bitcoin está desligando...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
@@ -2122,7 +2138,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Você pode assinar mensagens com seus endereços para provar que você é o dono deles. Seja cuidadoso para não assinar algo vago, pois ataques de pishing podem tentar te enganar para dar sua assinatura de identidade para eles. Apenas assine afirmações completamente detalhadas com as quais você concorda.</translation>
+        <translation>Você pode assinar mensagens com seus endereços para provar que você é o dono delas. Seja cuidadoso para não assinar algo vago, pois ataques de phishing podem tentar te enganar para dar sua assinatura de identidade para eles. Apenas assine afirmações completamente detalhadas com as quais você concorda.</translation>
     </message>
     <message>
         <source>The Bitcoin address to sign the message with</source>
@@ -2253,11 +2269,11 @@ Endereço: %4</translation>
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Núcleo Bitcoin</translation>
+        <translation>Bitcoin</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation>Programadores do Bitcoin Core</translation>
+        <translation>Programadores do Bitcoin</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -2327,7 +2343,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>watch-only</source>
-        <translation>Vizualização apenas</translation>
+        <translation>monitorado</translation>
     </message>
     <message>
         <source>label</source>
@@ -2497,7 +2513,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation>Enviado para</translation>
+        <translation>Enviado</translation>
     </message>
     <message>
         <source>Payment to yourself</source>
@@ -2509,7 +2525,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>watch-only</source>
-        <translation>Vizualização apenas</translation>
+        <translation>monitorado</translation>
     </message>
     <message>
         <source>(n/a)</source>
@@ -2572,7 +2588,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Sent to</source>
-        <translation>Enviado para</translation>
+        <translation>Enviado</translation>
     </message>
     <message>
         <source>To yourself</source>
@@ -2624,7 +2640,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Watch-only</source>
-        <translation>Vizualização apenas</translation>
+        <translation>Monitorado</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
@@ -2803,7 +2819,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
-        <translation>Impossível ouvir em %s neste computador. Bitcoin Core já está sendo executado provavelmente.</translation>
+        <translation>Impossível ouvir em %s neste computador. Provavelmente o Bitcoin já está sendo executado.</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
@@ -2979,7 +2995,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
-        <translation>Não foi possível obter acesso exclusivo ao diretório de dados %s. Bitcoin Core já está sendo executado provavelmente.</translation>
+        <translation>Não foi possível obter acesso exclusivo ao diretório de dados %s. Provavelmente Bitcoin já está sendo executado.</translation>
     </message>
     <message>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
@@ -3043,7 +3059,11 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
-        <translation>Erro carregando wallet.dat: A carteira requer a nova versão do Bitcoin Core</translation>
+        <translation>Erro ao carregar wallet.dat: A carteira requer a nova versão do Bitcoin</translation>
+    </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Erro ao ler o banco de dados. Finalizando.</translation>
     </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -3101,6 +3121,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Mandar informação de trace/debug para o console em vez de para o arquivo debug.log</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Enviar transação sem taxa, se possível (padrão: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Exibir todas opções de debug (uso: --help -help-debug)</translation>
@@ -3155,7 +3179,7 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation>Atenção: Esta versão está obsoleta, atualização exigida!</translation>
+        <translation>Atenção: Esta versão está obsoleta, atualização necessária!</translation>
     </message>
     <message>
         <source>Zapping all transactions from wallet...</source>
@@ -3237,6 +3261,10 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
         <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Aguardar por conexões na porta &lt;port&gt; (padrão: %u ou testnet: %u)</translation>
     </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Arquivo de certificado do servidor (padrão: %s)</translation>
+    </message>
     <message>
         <source>Server private key (default: %s)</source>
         <translation>Chave privada do servidor (padrão: %s)</translation>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 757002bf4439..1c1f62df44d3 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1,9 +1,9 @@
-<TS language="pt_PT" version="2.0">
+<TS language="pt_PT" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Right-click to edit address or label</source>
-        <translation>Clique direito para editar endereço ou rótulo</translation>
+        <translation>Clique á direita para editar endereço ou rótulo</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -380,11 +380,11 @@
     </message>
     <message>
         <source>&amp;Settings</source>
-        <translation>Con&amp;figurações</translation>
+        <translation>&amp;Configurações</translation>
     </message>
     <message>
         <source>&amp;Help</source>
-        <translation>A&amp;juda</translation>
+        <translation>&amp;Ajuda</translation>
     </message>
     <message>
         <source>Tabs toolbar</source>
@@ -416,7 +416,7 @@
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>Opções da linha de &amp;comandos</translation>
+        <translation>&amp;Opções da linha de &amp;comandos</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
@@ -1056,11 +1056,11 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>&amp;Port:</source>
-        <translation>&amp;Porta:</translation>
+        <translation>&amp;Porto:</translation>
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Porta do proxy (p.ex. 9050)</translation>
+        <translation>Porto do proxy (p.ex. 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
@@ -1084,7 +1084,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>&amp;Display</source>
-        <translation>Vis&amp;ualização</translation>
+        <translation>&amp;Visualização</translation>
     </message>
     <message>
         <source>User Interface &amp;language:</source>
@@ -1155,7 +1155,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Watch-only:</source>
-        <translation>Apenas observar:</translation>
+        <translation>Modo-verificação:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1205,6 +1205,18 @@ Endereço: %4</translation>
         <source>Recent transactions</source>
         <translation>transações recentes</translation>
     </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Transações não confirmadas para endereços modo-verificação</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Saldo minado ainda não disponivél de endereços modo-verificação</translation>
+    </message>
+    <message>
+        <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>
@@ -1224,6 +1236,18 @@ Endereço: %4</translation>
         <source>Payment request rejected</source>
         <translation>Pedido de pagamento rejeitado</translation>
     </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Rede de requisição de pagamento não corresponde com a rede do cliente.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Pedido de pagamento expirado.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Requisição de pagamento não iniciou.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Quantia solicitada para pagamento de %1 é muito pequena (considerada "pó").</translation>
@@ -1240,10 +1264,18 @@ Endereço: %4</translation>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>O URL de pedido de pagamento é inválido: %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 não foi lido correctamente! Isto pode ser causado por um endereço Bitcoin inválido ou por parâmetros URI malformados.</translation>
+    </message>
     <message>
         <source>Payment request file handling</source>
         <translation>Controlo de pedidos de pagamento.</translation>
     </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>O ficheiro de pedido de pagamento não pôde ser lido! Isto pode ter sido causado por um ficheiro de pedido de pagamento inválido.</translation>
+    </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Pedidos de pagamento não-verificados para scripts de pagamento personalizados não são suportados.</translation>
@@ -1252,10 +1284,22 @@ Endereço: %4</translation>
         <source>Refund from %1</source>
         <translation>Reembolsar de %1</translation>
     </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Pedido de pagamento %1 excede o tamanho (%2 bytes, permitido %3 bytes).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Pedido de pagamento proteção DdS</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Erro ao comunicar com %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>O pedido de pagamento não pode ser lido ou processado!</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
         <translation>Má resposta do servidor %1</translation>
@@ -1271,13 +1315,29 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>Agente Usuário</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Endereço/Nome da Rede</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo de Latência</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Entre um endereço Bitcoin (ex. %1)</translation>
+    </message>
     <message>
         <source>%1 d</source>
         <translation>%1 d</translation>
@@ -1294,6 +1354,14 @@ Endereço: %4</translation>
         <source>%1 s</source>
         <translation>%1 s</translation>
     </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>REDE</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>DESCONHECIDO</translation>
+    </message>
     <message>
         <source>None</source>
         <translation>Nenhum</translation>
@@ -1302,7 +1370,11 @@ Endereço: %4</translation>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
-    </context>
+    <message>
+        <source>%1 ms</source>
+        <translation>%1 ms</translation>
+    </message>
+</context>
 <context>
     <name>QRImageWidget</name>
     <message>
@@ -1352,6 +1424,10 @@ Endereço: %4</translation>
         <source>Using OpenSSL version</source>
         <translation>Usando versão OpenSSL</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Versão BerkeleyDB em uso</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Hora de inicialização</translation>
@@ -1376,6 +1452,74 @@ Endereço: %4</translation>
         <source>Current number of blocks</source>
         <translation>Número actual de blocos</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Recebido</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Enviado</translation>
+    </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Conexção</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Selecione uma conexação para ver informação em detalhe.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Direcção</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versão</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agente Usuário</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Serviços</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Iniciando Altura</translation>
+    </message>
+    <message>
+        <source>Sync Height</source>
+        <translation>Sincronização da Altura</translation>
+    </message>
+    <message>
+        <source>Ban Score</source>
+        <translation>Resultado da Suspensão</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Tempo de Conexção</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Ultimo Envio</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Ultimo Recebimento</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Bytes Enviados</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Bytes Recebidos</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Tempo de Latência</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Data do último bloco</translation>
@@ -1452,7 +1596,31 @@ Endereço: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>via %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>nunca</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Entrada</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Saída</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Desconhecido</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Em busca...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1461,7 +1629,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
-        <translation>Rótu&amp;lo:</translation>
+        <translation>&amp;Rótulo:</translation>
     </message>
     <message>
         <source>&amp;Message:</source>
@@ -1680,6 +1848,78 @@ Endereço: %4</translation>
         <source>Custom change address</source>
         <translation>Endereço de troco personalizado</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Custo da Transação:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Escolha...</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>fechar definições-de custos</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimizar</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se a taxa fixa for 1000 satoshis e a transação for somente 250 bytes, pagará somente 250 satoshis "por kilobyte" em custos se trasacionar "pelo menos" 1000 satoshis. Transações superiores a um kilobyte são cobradas por kilobyte.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>por kilobyte</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Se a taxa fixa for 1000 satoshis e a transação for somente 250 bytes, pagará somente 250 satoshis "por kilobyte" em custos se trasacionar "pelo menos" 1000 satoshis. Transações superiores a um kilobyte são cobradas por kilobyte.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total minimo</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Pode pagar somente a taxa minima desde que haja um volume de transações inferior ao espaço nos blocos. No entanto tenha em atenção que esta opção poderá acabar em uma transação nunca confirmada assim que os pedidos de transações excedam a capacidade de processamento da rede.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(leia a dica)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomendado:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Uso:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Taxa inteligente ainda não foi acionada. Normalmente demora alguns blocos...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Tempo de confirmação:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normal</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rapido</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Enviar como uma transação a custo zero se possivél</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(confirmação poderá demorar mais)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar para múltiplos destinatários de uma vez</translation>
@@ -1698,7 +1938,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>&amp;Limpar Tudo</translation>
+        <translation>Limpar &amp;Tudo</translation>
     </message>
     <message>
         <source>Balance:</source>
@@ -1710,7 +1950,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation>&amp;Enviar</translation>
+        <translation>E&amp;nviar</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
@@ -1784,6 +2024,18 @@ Endereço: %4</translation>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>A transação foi rejeitada! Isto poderá acontecer se algumas das moedas na sua carteira já tiverem sido gastas, se por exemplo tiver usado uma cópia do ficheiro wallet.dat e as moedas tiverem sido gastas na cópia mas não tiverem sido marcadas como gastas aqui.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Uma taxa superior a %1 é considerada muito alta.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Pagar somente a taxa minima de %1</translation>
+    </message>
+    <message>
+        <source>Estimated to begin confirmation within %1 block(s).</source>
+        <translation>Confirmação deverá começar dentro de %1 bloco(s).</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Aviso: Endereço Bitcoin inválido</translation>
@@ -1835,6 +2087,10 @@ Endereço: %4</translation>
         <source>This is a normal payment.</source>
         <translation>Este é um pagamento normal.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>O endereço Bitcoin para enviar o pagamento</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
@@ -1873,7 +2129,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Pay To:</source>
-        <translation>Pagar A:</translation>
+        <translation>Pagar a:</translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -1899,12 +2155,16 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>A&amp;ssinar Mensagem</translation>
+        <translation>&amp;Assinar Mensagem</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção ao assinar mensagens ambíguas, pois ataques de phishing podem tentar enganá-lo de modo a assinar a sua identidade para os atacantes. Apenas assine declarações detalhadas com as quais concorde.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>O endereço Bitcoin para designar a mensagem</translation>
+    </message>
     <message>
         <source>Choose previously used address</source>
         <translation>Escolher endereço usado previamente</translation>
@@ -1957,6 +2217,10 @@ Endereço: %4</translation>
         <source>Enter the signing 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.</source>
         <translation>Introduza o endereço de assinatura, mensagem (assegure-se que copia quebras de linha, espaços, tabulações, etc. exactamente) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>O endereço Bitcoin com que a mensagem foi designada</translation>
+    </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
         <translation>Verifique a mensagem para assegurar que foi assinada com o endereço Bitcoin especificado</translation>
@@ -2098,6 +2362,10 @@ Endereço: %4</translation>
         <source>own address</source>
         <translation>endereço próprio</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>modo-verificação</translation>
+    </message>
     <message>
         <source>label</source>
         <translation>rótulo</translation>
@@ -2118,6 +2386,14 @@ Endereço: %4</translation>
         <source>Debit</source>
         <translation>Débito</translation>
     </message>
+    <message>
+        <source>Total debit</source>
+        <translation>Total a debitar</translation>
+    </message>
+    <message>
+        <source>Total credit</source>
+        <translation>Total a creditar</translation>
+    </message>
     <message>
         <source>Transaction fee</source>
         <translation>Taxa de transação</translation>
@@ -2268,6 +2544,10 @@ Endereço: %4</translation>
         <source>Mined</source>
         <translation>Minadas</translation>
     </message>
+    <message>
+        <source>watch-only</source>
+        <translation>modo-verificação</translation>
+    </message>
     <message>
         <source>(n/a)</source>
         <translation>(n/d)</translation>
@@ -2284,6 +2564,10 @@ Endereço: %4</translation>
         <source>Type of transaction.</source>
         <translation>Tipo de transação.</translation>
     </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Desde que um endereço de modo-verificação faça parte ou não desta transação</translation>
+    </message>
     <message>
         <source>Destination address of transaction.</source>
         <translation>Endereço de destino da transação.</translation>
@@ -2379,6 +2663,10 @@ Endereço: %4</translation>
         <source>Export Transaction History</source>
         <translation>Exportar Histórico de Transacções</translation>
     </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Modo-verificação</translation>
+    </message>
     <message>
         <source>Exporting Failed</source>
         <translation>A Exportação Falhou</translation>
@@ -2434,7 +2722,11 @@ Endereço: %4</translation>
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unidade de valores recebidos. Clique para selecionar outra unidade.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
@@ -2522,6 +2814,14 @@ Endereço: %4</translation>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associar a endereço específico e escutar sempre nele. Use a notação [anfitrião]:porta para IPv6</translation>
     </message>
+    <message>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Apague todas as transações da carteira e somente restore aquelas que façam parte do blockchain através de re-scan ao reiniciar o programa</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuido através da licença de software MIT, verifique o ficheiro anexado COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
     <message>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entre no modo de teste de regressão, que usa uma cadeia especial cujos blocos podem ser resolvidos instantaneamente.</translation>
@@ -2530,6 +2830,14 @@ Endereço: %4</translation>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação)</translation>
     </message>
+    <message>
+        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
+        <translation>O modo -genproclimit controla quantos blocos são generados imediatamente.</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>Defina o número de processos de verificação (%u até %d, 0 = automático, &lt;0 = ldisponibiliza esse número de núcleos livres, por defeito: %d)</translation>
+    </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta é uma versão de testes pré-lançamento - use à sua responsabilidade - não usar para minar ou aplicações comerciais</translation>
@@ -2558,6 +2866,14 @@ Endereço: %4</translation>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Atenção: wallet.dat corrompido, dados recuperados! wallet.dat original salvo como wallet.{timestamp}.bak em %s; se o seu saldo ou transações estiverem incorrectos deverá recuperar uma cópia de segurança.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Ligações na lista branca conectam desde a seguinte netmask ou endereço IP. Posse ser especificado varias vezes.</translation>
+    </message>
+    <message>
+        <source>(default: 1)</source>
+        <translation>(padrão: 1)</translation>
+    </message>
     <message>
         <source>&lt;category&gt; can be:</source>
         <translation>&lt;categoria&gt; pode ser:</translation>
@@ -2574,10 +2890,18 @@ Endereço: %4</translation>
         <source>Connect only to the specified node(s)</source>
         <translation>Apenas ligar ao(s) nó(s) especificado(s)</translation>
     </message>
+    <message>
+        <source>Connection options:</source>
+        <translation>Opcões de conexção:</translation>
+    </message>
     <message>
         <source>Corrupted block database detected</source>
         <translation>Cadeia de blocos corrompida detectada</translation>
     </message>
+    <message>
+        <source>Debugging/Testing options:</source>
+        <translation>Depuração/Opções teste:</translation>
+    </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobrir endereço IP próprio (padrão: 1 ao escutar sem -externalip)</translation>
@@ -2606,6 +2930,10 @@ Endereço: %4</translation>
         <source>Error opening block database</source>
         <translation>Erro ao abrir a base de dados de blocos</translation>
     </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Erro: Um erro fatal interno ocorreu, verificar debug.log para mais informação</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Erro: Pouco espaço em disco!</translation>
@@ -2618,6 +2946,10 @@ Endereço: %4</translation>
         <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
         <translation>Se uma &lt;categoria&gt; não é fornecida, imprimir toda a informação de depuração.</translation>
     </message>
+    <message>
+        <source>Importing...</source>
+        <translation>A importar...</translation>
+    </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloco génese incorreto ou nenhum bloco génese encontrado. Pasta de dados errada para a rede?</translation>
@@ -2630,6 +2962,10 @@ Endereço: %4</translation>
         <source>Not enough file descriptors available.</source>
         <translation>Os descritores de ficheiros disponíveis são insuficientes.</translation>
     </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Somente conectar aos nodes na rede &lt;net&gt; (ipv4, ipv6 ou onion)</translation>
+    </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir a cadeia de blocos a partir dos ficheiros blk000??.dat atuais</translation>
@@ -2650,6 +2986,10 @@ Endereço: %4</translation>
         <source>This is intended for regression testing tools and app development.</source>
         <translation>Isto têm como fim a realização de testes de regressão para pools e desenvolvimento de aplicações.</translation>
     </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Use UPnP para mapear a porto de escuta (default: %u)</translation>
+    </message>
     <message>
         <source>Verifying blocks...</source>
         <translation>A verificar blocos...</translation>
@@ -2674,6 +3014,18 @@ Endereço: %4</translation>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importar blocos de um ficheiro blk000??.dat externo</translation>
     </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permitir conexções JSON-RPC de fontes especificas. Valido para &lt;ip&gt; um unico IP (ex. 1.2.3.4), uma rede/netmask (ex. 1.2.3.4/255.255.255.0) ou uma rede/CIDR (ex. 1.2.3.4/24). Esta opção pode ser especificada varias vezes</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Um erro ocorreu durante a definição do endereço RPC %s porto %u para escutar: %s</translation>
+    </message>
+    <message>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Vincualar o endereço dado e listar as ligações conectadas ao mesmo na lista branca. Use a notação [anfitrião]:porta para IPv6</translation>
+    </message>
     <message>
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Impossível trancar a pasta de dados %s. Provavelmente o Bitcoin Core já está a ser executado.</translation>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index abeaf82e83a0..ab36ff5321bc 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -1,4 +1,4 @@
-<TS language="ro_RO" version="2.0">
+<TS language="ro_RO" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -19,11 +19,11 @@
     </message>
     <message>
         <source>&amp;Copy</source>
-        <translation>&amp;Copiere</translation>
+        <translation>&amp;Copiază</translation>
     </message>
     <message>
         <source>C&amp;lose</source>
-        <translation>&amp;Inchidere</translation>
+        <translation>Închide</translation>
     </message>
     <message>
         <source>&amp;Copy Address</source>
@@ -31,11 +31,11 @@
     </message>
     <message>
         <source>Delete the currently selected address from the list</source>
-        <translation>Sterge adresele curent selectate din lista</translation>
+        <translation>Şterge adresele curent selectate din listă</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exporta datele din tab-ul curent într-un fișier</translation>
+        <translation>Exportă datele din tab-ul curent într-un fişier</translation>
     </message>
     <message>
         <source>&amp;Export</source>
@@ -43,35 +43,35 @@
     </message>
     <message>
         <source>&amp;Delete</source>
-        <translation>&amp;Șterge</translation>
+        <translation>Şterge</translation>
     </message>
     <message>
         <source>Choose the address to send coins to</source>
-        <translation>Alegeti adresa unde vreti sa trimiteti monezile</translation>
+        <translation>Alegeţi adresa unde vreţi să trimiteţi monezile</translation>
     </message>
     <message>
         <source>Choose the address to receive coins with</source>
-        <translation>Alegeti adresa unde vreti sa primiti monezile</translation>
+        <translation>Alegeţi adresa unde vreţi să primiţi monezile</translation>
     </message>
     <message>
         <source>C&amp;hoose</source>
-        <translation>&amp;Alege</translation>
+        <translation>&amp;Alegeţi</translation>
     </message>
     <message>
         <source>Sending addresses</source>
-        <translation>Adresa Destinatarului</translation>
+        <translation>Adresa destinatarului</translation>
     </message>
     <message>
         <source>Receiving addresses</source>
-        <translation>Adresa pe care primiti</translation>
+        <translation>Adresa de primire</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Acestea sunt adresele dumneavoastra Bitcoin care pot fi folosite la trimiterea platilor. Verificati totdeauna cantitatea si adresa de primire inainte de a trimite monezi.</translation>
+        <translation>Acestea sînt adresele dumneavoastră Bitcoin pentru efectuarea plăţilor. Verificaţi întotdeauna cantitatea şi adresa de primire înainte de a trimite monezi.</translation>
     </message>
     <message>
         <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Acestea sunt adresele dumneavoastra Bitcoin folosite pentru a primi plati. Este recomandat sa folositi cate o adresa noua de primire pentru fiecare tranzactie in parte.</translation>
+        <translation>Acestea sînt adresele dumneavoastră Bitcoin folosite pentru a primi plati. Este recomandat să folosiţi o adresă nouă de primire pentru fiecare tranzacţie în parte.</translation>
     </message>
     <message>
         <source>Copy &amp;Label</source>
@@ -79,23 +79,23 @@
     </message>
     <message>
         <source>&amp;Edit</source>
-        <translation>&amp;Editează</translation>
+        <translation>&amp;Editare</translation>
     </message>
     <message>
         <source>Export Address List</source>
-        <translation>Exportati Agenda</translation>
+        <translation>Exportă listă de adrese</translation>
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Valori separate prin virgulă (*.csv)</translation>
+        <translation>Fişier text cu valori separate prin virgulă (*.csv)</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>Exportare esuata</translation>
+        <translation>Export nereuşit</translation>
     </message>
     <message>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation>A apărut o eroare încercând să se salveze lista de adrese la %1. Vă rugăm să încercați din nou.</translation>
+        <translation>A apărut o eroare la salvarea listei de adrese la %1. Vă rugăm să încercaţi din nou.</translation>
     </message>
 </context>
 <context>
@@ -121,7 +121,7 @@
     </message>
     <message>
         <source>Enter passphrase</source>
-        <translation>Introdu fraza de acces</translation>
+        <translation>Introduceţi fraza de acces</translation>
     </message>
     <message>
         <source>New passphrase</source>
@@ -129,55 +129,55 @@
     </message>
     <message>
         <source>Repeat new passphrase</source>
-        <translation>Repetă noua frază de acces</translation>
+        <translation>Repetaţi noua frază de acces</translation>
     </message>
     <message>
         <source>Encrypt wallet</source>
-        <translation>Criptează portofelul</translation>
+        <translation>Criptare portofel</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Această acțiune necesită fraza ta de acces pentru deblocarea portofelului.</translation>
+        <translation>Această acţiune necesită fraza dvs. de acces pentru deblocarea portofelului.</translation>
     </message>
     <message>
         <source>Unlock wallet</source>
-        <translation>Deblochează portofelul</translation>
+        <translation>Deblocare portofel</translation>
     </message>
     <message>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Această acțiune necesită fraza ta de acces pentru decriptarea portofelului.</translation>
+        <translation>Această acţiune necesită fraza dvs. de acces pentru decriptarea portofelului.</translation>
     </message>
     <message>
         <source>Decrypt wallet</source>
-        <translation>Decriptează portofelul.</translation>
+        <translation>Decriptare portofel</translation>
     </message>
     <message>
         <source>Change passphrase</source>
-        <translation>Schimbă fraza de acces</translation>
+        <translation>Schimbare frază de acces</translation>
     </message>
     <message>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Introdu vechea și noua parolă pentru portofel.</translation>
+        <translation>Introduceţi vechea şi noua parolă pentru portofel.</translation>
     </message>
     <message>
         <source>Confirm wallet encryption</source>
-        <translation>Confirmă criptarea portofelului</translation>
+        <translation>Confirmaţi criptarea portofelului</translation>
     </message>
     <message>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
-        <translation>Atenție: Dacă pierdeţi parola portofelului electronic dupa criptare, &lt;b&gt;VEŢI PIERDE ÎNTREAGA SUMĂ DE BITCOIN ACUMULATĂ&lt;/b&gt;!</translation>
+        <translation>Atenţie: Dacă pierdeţi parola portofelului electronic după criptare, &lt;b&gt;VEŢI PIERDE ÎNTREAGA SUMĂ DE BITCOIN ACUMULATĂ&lt;/b&gt;!</translation>
     </message>
     <message>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>Sunteţi sigur că doriţi să criptaţi portofelul electronic?</translation>
+        <translation>Sigur doriţi să criptaţi portofelul dvs.?</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 siguranta facuta in prealabil portofelului dumneavoastra ar trebui inlocuita cu cea generata cel mai recent fisier criptat al portofelului. Pentru siguranta, copiile de siguranta vechi ale portofelului ne-criptat vor deveni inutile de indata ce veti incepe folosirea noului fisier criptat al portofelului.</translation>
+        <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>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
-        <translation>Atentie! Caps Lock este pornit</translation>
+        <translation>Atenţie! Caps Lock este pornit!</translation>
     </message>
     <message>
         <source>Wallet encrypted</source>
@@ -189,15 +189,15 @@
     </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
-        <translation>Bitcoin se va închide acum pentru a termina procesul de criptare. Ține minte că criptarea portofelului nu te poate proteja în totalitate de furtul monedelor de către programe dăunătoare care îți infectează calculatorul.</translation>
+        <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>Wallet encryption failed</source>
-        <translation>Criptarea portofelului a eșuat</translation>
+        <translation>Criptarea portofelului nu a reuşit</translation>
     </message>
     <message>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>Criptarea portofelului a eșuat din cauza unei erori interne. Portofelul tău nu a fost criptat.</translation>
+        <translation>Criptarea portofelului nu a reuşit din cauza unei erori interne. Portofelul dvs. nu a fost criptat.</translation>
     </message>
     <message>
         <source>The supplied passphrases do not match.</source>
@@ -205,7 +205,7 @@
     </message>
     <message>
         <source>Wallet unlock failed</source>
-        <translation>Deblocarea portofelului a eșuat</translation>
+        <translation>Deblocarea portofelului nu a reuşit</translation>
     </message>
     <message>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
@@ -213,7 +213,7 @@
     </message>
     <message>
         <source>Wallet decryption failed</source>
-        <translation>Decriptarea portofelului a eșuat</translation>
+        <translation>Decriptarea portofelului nu a reuşit</translation>
     </message>
     <message>
         <source>Wallet passphrase was successfully changed.</source>
@@ -228,7 +228,7 @@
     </message>
     <message>
         <source>Synchronizing with network...</source>
-        <translation>Se sincronizează cu rețeaua...</translation>
+        <translation>Se sincronizează cu reţeaua...</translation>
     </message>
     <message>
         <source>&amp;Overview</source>
@@ -244,19 +244,19 @@
     </message>
     <message>
         <source>&amp;Transactions</source>
-        <translation>&amp;Tranzacții</translation>
+        <translation>&amp;Tranzacţii</translation>
     </message>
     <message>
         <source>Browse transaction history</source>
-        <translation>Răsfoiește istoricul tranzacțiilor</translation>
+        <translation>Răsfoire istoric tranzacţii</translation>
     </message>
     <message>
         <source>E&amp;xit</source>
-        <translation>&amp;Ieșire</translation>
+        <translation>Ieşire</translation>
     </message>
     <message>
         <source>Quit application</source>
-        <translation>Închide aplicația</translation>
+        <translation>Închide aplicaţia</translation>
     </message>
     <message>
         <source>About &amp;Qt</source>
@@ -264,19 +264,19 @@
     </message>
     <message>
         <source>Show information about Qt</source>
-        <translation>Arată informații despre Qt</translation>
+        <translation>Arată informaţii despre Qt</translation>
     </message>
     <message>
         <source>&amp;Options...</source>
-        <translation>&amp;Setări...</translation>
+        <translation>&amp;Opţiuni...</translation>
     </message>
     <message>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>Criptează portofelul electronic...</translation>
+        <translation>Cript&amp;ează portofelul...</translation>
     </message>
     <message>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Fă o copie de siguranță a  portofelului...</translation>
+        <translation>Face o copie de siguranţă a portofelului...</translation>
     </message>
     <message>
         <source>&amp;Change Passphrase...</source>
@@ -284,15 +284,15 @@
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>&amp;Trimitere adrese...</translation>
+        <translation>Adrese de trimitere...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>&amp;Primire adrese...</translation>
+        <translation>Adrese de p&amp;rimire...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
-        <translation>Vizitaţi &amp;URI...</translation>
+        <translation>Deschide &amp;URI...</translation>
     </message>
     <message>
         <source>Bitcoin Core client</source>
@@ -300,7 +300,7 @@
     </message>
     <message>
         <source>Importing blocks from disk...</source>
-        <translation>Importare blocks de pe disk...</translation>
+        <translation>Import blocuri de pe disk...</translation>
     </message>
     <message>
         <source>Reindexing blocks on disk...</source>
@@ -312,11 +312,11 @@
     </message>
     <message>
         <source>Modify configuration options for Bitcoin</source>
-        <translation>Modifică opțiunile de configurare pentru Bitcoin</translation>
+        <translation>Modifică opţiunile de configurare pentru Bitcoin</translation>
     </message>
     <message>
         <source>Backup wallet to another location</source>
-        <translation>Creează o copie de rezervă a portofelului într-o locație diferită</translation>
+        <translation>Creează o copie de rezervă a portofelului într-o locaţie diferită</translation>
     </message>
     <message>
         <source>Change the passphrase used for wallet encryption</source>
@@ -324,15 +324,15 @@
     </message>
     <message>
         <source>&amp;Debug window</source>
-        <translation>Fereastră &amp;debug</translation>
+        <translation>Fereastra de &amp;depanare</translation>
     </message>
     <message>
         <source>Open debugging and diagnostic console</source>
-        <translation>Deschide consola de debug și diagnosticare</translation>
+        <translation>Deschide consola de depanare şi diagnosticare</translation>
     </message>
     <message>
         <source>&amp;Verify message...</source>
-        <translation>&amp;Verifică mesajul...</translation>
+        <translation>&amp;Verifică mesaj...</translation>
     </message>
     <message>
         <source>Bitcoin</source>
@@ -340,23 +340,23 @@
     </message>
     <message>
         <source>Wallet</source>
-        <translation>Portofelul</translation>
+        <translation>Portofel</translation>
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation>&amp;Trimite</translation>
+        <translation>Trimite</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>&amp;Primește</translation>
+        <translation>P&amp;rimeşte</translation>
     </message>
     <message>
         <source>Show information about Bitcoin Core</source>
-        <translation>Arată informații despre Bitcoin Core</translation>
+        <translation>Arată informaţii despre Bitcoin Core</translation>
     </message>
     <message>
         <source>&amp;Show / Hide</source>
-        <translation>Arata/Ascunde</translation>
+        <translation>Arată/Ascunde</translation>
     </message>
     <message>
         <source>Show or hide the main Window</source>
@@ -364,19 +364,19 @@
     </message>
     <message>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Criptează cheile private ale portofelului tău</translation>
+        <translation>Criptează cheile private ale portofelului dvs.</translation>
     </message>
     <message>
         <source>Sign messages with your Bitcoin addresses to prove you own them</source>
-        <translation>Semnează mesaje cu adresa ta Bitcoin pentru a dovedi că îți aparțin</translation>
+        <translation>Semnaţi mesaje cu adresa dvs. Bitcoin pentru a dovedi că vă aparţin</translation>
     </message>
     <message>
         <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
-        <translation>Verifică mesaje pentru a te asigura că au fost semnate cu adresa Bitcoin specificată</translation>
+        <translation>Verificaţi mesaje pentru a vă asigura că au fost semnate cu adresa Bitcoin specificată</translation>
     </message>
     <message>
         <source>&amp;File</source>
-        <translation>&amp;Fișier</translation>
+        <translation>&amp;Fişier</translation>
     </message>
     <message>
         <source>&amp;Settings</source>
@@ -388,15 +388,15 @@
     </message>
     <message>
         <source>Tabs toolbar</source>
-        <translation>Bara de file</translation>
+        <translation>Bara de unelte</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucleul Bitcoin</translation>
     </message>
     <message>
         <source>Request payments (generates QR codes and bitcoin: URIs)</source>
-        <translation>Cereti plati (genereaza coduri QR si bitcoin-uri: URls)</translation>
+        <translation>Cereţi plăţi (generează coduri QR şi bitcoin-uri: URls)</translation>
     </message>
     <message>
         <source>&amp;About Bitcoin Core</source>
@@ -404,31 +404,31 @@
     </message>
     <message>
         <source>Show the list of used sending addresses and labels</source>
-        <translation>Aratati lista de adrese trimise si etichete folosite.</translation>
+        <translation>Arată lista de adrese trimise şi etichetele folosite.</translation>
     </message>
     <message>
         <source>Show the list of used receiving addresses and labels</source>
-        <translation>Aratati lista de adrese pentru primire si etichete </translation>
+        <translation>Arată lista de adrese pentru primire şi etichetele</translation>
     </message>
     <message>
         <source>Open a bitcoin: URI or payment request</source>
-        <translation>Deschideti un bitcoin: o adresa URI sau o cerere de plata</translation>
+        <translation>Deschidere bitcoin: o adresa URI sau o cerere de plată</translation>
     </message>
     <message>
         <source>&amp;Command-line options</source>
-        <translation>Command-line setări</translation>
+        <translation>Opţiuni linie de &amp;comandă</translation>
     </message>
     <message>
         <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
-        <translation>Arată mesajul de ajutor Bitcoin Core pentru a obține o listă cu opțiunile posibile de linii de comandă Bitcoin</translation>
+        <translation>Arată mesajul de ajutor Bitcoin Core pentru a obţine o listă cu opţiunile posibile de linii de comandă Bitcoin</translation>
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n conexiune activă către rețeaua Bitcoin</numerusform><numerusform>%n conexiuni active către rețeaua Bitcoin</numerusform><numerusform>%n de conexiuni active către rețeaua Bitcoin</numerusform></translation>
+        <translation><numerusform>%n conexiune activă către reţeaua Bitcoin</numerusform><numerusform>%n conexiuni active către reţeaua Bitcoin</numerusform><numerusform>%n de conexiuni active către reţeaua Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
-        <translation>Nici o sursă de bloc disponibil ...</translation>
+        <translation>Nici o sursă de bloc disponibilă...</translation>
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
@@ -436,7 +436,7 @@
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation><numerusform>%n zi</numerusform><numerusform>%n zile</numerusform><numerusform>%n zile</numerusform></translation>
+        <translation><numerusform>%n zi</numerusform><numerusform>%n zile</numerusform><numerusform>%n de zile</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
@@ -444,11 +444,11 @@
     </message>
     <message>
         <source>%1 and %2</source>
-        <translation>%1 si %2</translation>
+        <translation>%1 şi %2</translation>
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation><numerusform>%n an</numerusform><numerusform>%n ani</numerusform><numerusform>%n ani</numerusform></translation>
+        <translation><numerusform>%n an</numerusform><numerusform>%n ani</numerusform><numerusform>%n de ani</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -456,11 +456,11 @@
     </message>
     <message>
         <source>Last received block was generated %1 ago.</source>
-        <translation>Ultimul bloc recepționat a fost generat acum %1.</translation>
+        <translation>Ultimul bloc recepţionat a fost generat acum %1.</translation>
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>Tranzacții după aceasta nu va fi încă disponibile.</translation>
+        <translation>Tranzacţiile după aceasta nu vor fi vizibile încă.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -468,11 +468,11 @@
     </message>
     <message>
         <source>Warning</source>
-        <translation>Avertizare</translation>
+        <translation>Avertisment</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation>Informație</translation>
+        <translation>Informaţie</translation>
     </message>
     <message>
         <source>Up to date</source>
@@ -480,7 +480,7 @@
     </message>
     <message numerus="yes">
         <source>Processed %n blocks 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 blocuri din istoricul tranzacțiilor.</numerusform></translation>
+        <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>
         <source>Catching up...</source>
@@ -488,11 +488,11 @@
     </message>
     <message>
         <source>Sent transaction</source>
-        <translation>Tranzacție expediată</translation>
+        <translation>Tranzacţie expediată</translation>
     </message>
     <message>
         <source>Incoming transaction</source>
-        <translation>Tranzacție recepționată</translation>
+        <translation>Tranzacţie recepţionată</translation>
     </message>
     <message>
         <source>Date: %1
@@ -508,18 +508,18 @@ Adresa: %4
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de față este &lt;b&gt;deblocat&lt;/b&gt;</translation>
+        <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de faţă este &lt;b&gt;deblocat&lt;/b&gt;</translation>
     </message>
     <message>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de față este &lt;b&gt;blocat&lt;/b&gt;</translation>
+        <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de faţă este &lt;b&gt;blocat&lt;/b&gt;</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
         <source>Network Alert</source>
-        <translation>Alertă rețea</translation>
+        <translation>Alertă reţea</translation>
     </message>
 </context>
 <context>
@@ -546,11 +546,15 @@ Adresa: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Taxa:</translation>
+        <translation>Taxă:</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Praf:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>După taxe:</translation>
+        <translation>După taxă:</translation>
     </message>
     <message>
         <source>Change:</source>
@@ -558,15 +562,15 @@ Adresa: %4
     </message>
     <message>
         <source>(un)select all</source>
-        <translation>(de)selectaţi tot</translation>
+        <translation>(de)selectare tot</translation>
     </message>
     <message>
         <source>Tree mode</source>
-        <translation>Modul arborescent</translation>
+        <translation>Mod arbore</translation>
     </message>
     <message>
         <source>List mode</source>
-        <translation>Modul lista</translation>
+        <translation>Mod listă</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -610,43 +614,47 @@ Adresa: %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copiază ID tranzacție</translation>
+        <translation>Copiază ID tranzacţie</translation>
     </message>
     <message>
         <source>Lock unspent</source>
-        <translation>Blocaţi necheltuite</translation>
+        <translation>Blocare necheltuiţi</translation>
     </message>
     <message>
         <source>Unlock unspent</source>
-        <translation>Deblocaţi necheltuite</translation>
+        <translation>Deblocare necheltuiţi</translation>
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation>Copiaţi quantitea</translation>
+        <translation>Copiază cantitea</translation>
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copiaţi taxele</translation>
+        <translation>Copiază taxa</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>Copiaţi după taxe</translation>
+        <translation>Copiază după taxă</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation>Copiaţi octeţi</translation>
+        <translation>Copiază octeţi</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation>Copiaţi prioritatea</translation>
+        <translation>Copiază prioritatea</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiază praf</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation>Copiaţi schimb</translation>
+        <translation>Copiază rest</translation>
     </message>
     <message>
         <source>highest</source>
-        <translation>cel mai mare</translation>
+        <translation>cea mai mare</translation>
     </message>
     <message>
         <source>higher</source>
@@ -658,27 +666,27 @@ Adresa: %4
     </message>
     <message>
         <source>medium-high</source>
-        <translation>marime medie</translation>
+        <translation>medie-mare</translation>
     </message>
     <message>
         <source>medium</source>
-        <translation>mediu</translation>
+        <translation>medie</translation>
     </message>
     <message>
         <source>low-medium</source>
-        <translation>mediu-scazut</translation>
+        <translation>medie-scăzută</translation>
     </message>
     <message>
         <source>low</source>
-        <translation>scazut</translation>
+        <translation>scazută</translation>
     </message>
     <message>
         <source>lower</source>
-        <translation>mai scazut</translation>
+        <translation>mai scăzută</translation>
     </message>
     <message>
         <source>lowest</source>
-        <translation>cel mai scazut</translation>
+        <translation>cea mai scăzută</translation>
     </message>
     <message>
         <source>none</source>
@@ -686,7 +694,7 @@ Adresa: %4
     </message>
     <message>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Poate varia +/- %1 satoshi pentru fiecare intrare. </translation>
+        <translation>Poate varia +/- %1 satoshi pentru fiecare intrare.</translation>
     </message>
     <message>
         <source>yes</source>
@@ -698,19 +706,19 @@ Adresa: %4
     </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>
+        <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>Can vary +/- 1 byte per input.</source>
-        <translation>Poate varia +/- 1 octet pentru fiecare intrare. </translation>
+        <translation>Poate varia +/- 1 octet pentru fiecare intrare.</translation>
     </message>
     <message>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
-        <translation>Tranzacţiile cu prioritate mai mare sunt mai susceptibile de fi incluse într-un bloc. </translation>
+        <translation>Tranzacţiile cu prioritate mai mare sînt mai susceptibile de fi incluse într-un bloc.</translation>
     </message>
     <message>
         <source>This label turns red, if the priority is smaller than "medium".</source>
-        <translation>Aceasta eticheta se face rosie daca prioritatea e mai mica decat media</translation>
+        <translation>Această etichetă devine roşie dacă prioritatea e mai mică decît "medie".</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -722,7 +730,7 @@ Adresa: %4
     </message>
     <message>
         <source>(change)</source>
-        <translation>(schimb)</translation>
+        <translation>(rest)</translation>
     </message>
 </context>
 <context>
@@ -737,11 +745,11 @@ Adresa: %4
     </message>
     <message>
         <source>The label associated with this address list entry</source>
-        <translation>Etichetele asociate cu aceasta intrare din lista.</translation>
+        <translation>Eticheta asociată cu această intrare din listă.</translation>
     </message>
     <message>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
-        <translation>Adresa asociata cu aceasta adresa din lista. Aceasta poate fi modificata doar pentru Destinatari.</translation>
+        <translation>Adresa asociată cu această adresă din listă. Aceasta poate fi modificată doar pentru adresele de trimitere.</translation>
     </message>
     <message>
         <source>&amp;Address</source>
@@ -777,7 +785,7 @@ Adresa: %4
     </message>
     <message>
         <source>New key generation failed.</source>
-        <translation>Generarea noii chei a eșuat.</translation>
+        <translation>Generarea noii chei nu a reuşit.</translation>
     </message>
 </context>
 <context>
@@ -792,11 +800,11 @@ Adresa: %4
     </message>
     <message>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
-        <translation>Dosarul deja există. Adaugă %1 dacă intenționezi să creezi un nou dosar aici.</translation>
+        <translation>Dosarul deja există. Adaugă %1 dacă intenţionaţi să creaţi un nou dosar aici.</translation>
     </message>
     <message>
         <source>Path already exists, and is not a directory.</source>
-        <translation>Calea deja există și nu este un dosar.</translation>
+        <translation>Calea deja există şi nu este un dosar.</translation>
     </message>
     <message>
         <source>Cannot create data directory here.</source>
@@ -807,7 +815,7 @@ Adresa: %4
     <name>HelpMessageDialog</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucleul Bitcoin</translation>
     </message>
     <message>
         <source>version</source>
@@ -823,7 +831,7 @@ Adresa: %4
     </message>
     <message>
         <source>Command-line options</source>
-        <translation>Command-line setări</translation>
+        <translation>Opţiuni linie de comandă</translation>
     </message>
     <message>
         <source>Usage:</source>
@@ -831,23 +839,27 @@ Adresa: %4
     </message>
     <message>
         <source>command-line options</source>
-        <translation>command-line setări</translation>
+        <translation>Opţiuni linie de comandă</translation>
     </message>
     <message>
         <source>UI options</source>
-        <translation>UI setări</translation>
+        <translation>Opţiuni UI</translation>
     </message>
     <message>
         <source>Set language, for example "de_DE" (default: system locale)</source>
-        <translation>Seteaza limba, de exemplu: "de_DE" (initialt: system locale)</translation>
+        <translation>Setează limba, de exemplu: "de_DE" (implicit: sistem local)</translation>
     </message>
     <message>
         <source>Start minimized</source>
-        <translation>Incepe miniaturizare</translation>
+        <translation>Începe minimizat</translation>
+    </message>
+    <message>
+        <source>Set SSL root certificates for payment request (default: -system-)</source>
+        <translation>Setare rădăcină certificat SSL pentru cerere de plată (implicit: -sistem- )</translation>
     </message>
     <message>
         <source>Show splash screen on startup (default: 1)</source>
-        <translation>Afișează pe ecran splash la pornire (implicit: 1)</translation>
+        <translation>Afişează pe ecran splash la pornire (implicit: 1)</translation>
     </message>
     <message>
         <source>Choose data directory on startup (default: 0)</source>
@@ -862,23 +874,27 @@ Adresa: %4
     </message>
     <message>
         <source>Welcome to Bitcoin Core.</source>
-        <translation>Bine Aţi Venit la Nucleul Bitcoin.</translation>
+        <translation>Bine aţi venit la Nucleul Bitcoin.</translation>
     </message>
     <message>
         <source>As this is the first time the program is launched, you can choose where Bitcoin Core will store its data.</source>
-        <translation>Dacă aceasta este prima dată când programul este lansat, puteţi alege unde Nucleul Bitcoin va stoca datele. </translation>
+        <translation>Dacă aceasta este prima dată cînd programul este lansat, puteţi alege unde Nucleul Bitcoin va stoca datele.</translation>
     </message>
     <message>
         <source>Use the default data directory</source>
-        <translation>Folosește dosarul de date implicit</translation>
+        <translation>Foloseşte dosarul de date implicit</translation>
     </message>
     <message>
         <source>Use a custom data directory:</source>
-        <translation>Folosește un dosar de date personalizat:</translation>
+        <translation>Foloseşte un dosar de date personalizat:</translation>
     </message>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucleul Bitcoin</translation>
+    </message>
+    <message>
+        <source>Error: Specified data directory "%1" cannot be created.</source>
+        <translation>Eroare: Directorul datelor specificate "%1" nu poate fi creat.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -886,7 +902,7 @@ Adresa: %4
     </message>
     <message numerus="yes">
         <source>%n GB of free space available</source>
-        <translation><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform></translation>
+        <translation><numerusform>%n GB de spaţiu liber disponibil</numerusform><numerusform>%n GB de spaţiu liber disponibil</numerusform><numerusform>%n GB de spaţiu liber disponibil</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>(of %n GB needed)</source>
@@ -897,7 +913,7 @@ Adresa: %4
     <name>OpenURIDialog</name>
     <message>
         <source>Open URI</source>
-        <translation>Deschideti adresa URI</translation>
+        <translation>Deschide URI</translation>
     </message>
     <message>
         <source>Open payment request from URI or file</source>
@@ -905,54 +921,86 @@ Adresa: %4
     </message>
     <message>
         <source>URI:</source>
-        <translation>adresa URI:</translation>
+        <translation>URI:</translation>
     </message>
     <message>
         <source>Select payment request file</source>
-        <translation>Selectaţi fişierul de cerere de plată</translation>
+        <translation>Selectaţi fişierul cerere de plată</translation>
     </message>
     <message>
         <source>Select payment request file to open</source>
-        <translation>Selectaţi fişierul de cerere de plată de deschis</translation>
+        <translation>Selectaţi fişierul cerere de plată pentru deschidere</translation>
     </message>
 </context>
 <context>
     <name>OptionsDialog</name>
     <message>
         <source>Options</source>
-        <translation>Setări</translation>
+        <translation>Opţiuni</translation>
     </message>
     <message>
         <source>&amp;Main</source>
-        <translation>&amp;Principal</translation>
+        <translation>Principal</translation>
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Porneşte automat programul Bitcoin la pornirea computerului.</translation>
+        <translation>Porneşte automat Bitcoin după pornirea calculatorului.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
-        <translation>&amp;S Porneşte Bitcoin la pornirea sistemului</translation>
+        <translation>Porneşte Bitcoin la pornirea sistemului</translation>
+    </message>
+    <message>
+        <source>Size of &amp;database cache</source>
+        <translation>Mărimea bazei de &amp;date cache</translation>
     </message>
     <message>
         <source>MB</source>
         <translation>MB</translation>
     </message>
+    <message>
+        <source>Number of script &amp;verification threads</source>
+        <translation>Numărul de thread-uri de &amp;verificare</translation>
+    </message>
     <message>
         <source>Accept connections from outside</source>
         <translation>Acceptă conexiuni din exterior</translation>
     </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Permite conexiuni de intrare</translation>
+    </message>
+    <message>
+        <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+        <translation>Adresa IP a serverului proxy (de exemplu: IPv4: 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>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>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URL-uri tranzacţii terţe părţi</translation>
+    </message>
+    <message>
+        <source>Active command-line options that override above options:</source>
+        <translation>Opţiuni linie de comandă active care oprimă opţiunile de mai sus:</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Resetează toate setările clientului la valorile implicite.</translation>
     </message>
     <message>
         <source>&amp;Reset Options</source>
-        <translation>&amp;Resetează opțiunile</translation>
+        <translation>&amp;Resetează opţiunile</translation>
     </message>
     <message>
         <source>&amp;Network</source>
-        <translation>&amp;Retea</translation>
+        <translation>Reţea</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>
     <message>
         <source>W&amp;allet</source>
@@ -960,19 +1008,35 @@ Adresa: %4
     </message>
     <message>
         <source>Expert</source>
-        <translation>expert</translation>
+        <translation>Expert</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
         <translation>Activare caracteristici de control ale monedei</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>Dacă dezactivaţi cheltuirea restului neconfirmat, restul dintr-o tranzacţie nu poate fi folosit pînă cînd tranzacţia are cel puţin o confirmare. Aceasta afectează de asemenea calcularea soldului.</translation>
+    </message>
+    <message>
+        <source>&amp;Spend unconfirmed change</source>
+        <translation>Cheltuire rest neconfirmat</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>Deschide automat în router portul aferent clientului Bitcoin. Funcţionează doar în cazul în care routerul e compatibil UPnP şi opţiunea e activată.</translation>
+        <translation>Deschide automat în router portul aferent clientului Bitcoin. Funcţionează doar dacă routerul duportă UPnP şi e activat.</translation>
     </message>
     <message>
         <source>Map port using &amp;UPnP</source>
-        <translation>Mapeaza portul folosind &amp;UPnP</translation>
+        <translation>Mapare port folosind &amp;UPnP</translation>
+    </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Conectare la reţeaua Bitcoin printr-un proxy SOCKS.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Conectare printr-un proxy SOCKS (implicit proxy):</translation>
     </message>
     <message>
         <source>Proxy &amp;IP:</source>
@@ -984,27 +1048,27 @@ Adresa: %4
     </message>
     <message>
         <source>Port of the proxy (e.g. 9050)</source>
-        <translation>Portul pe care se concetează proxy serverul (de exemplu: 9050)</translation>
+        <translation>Portul proxy (de exemplu: 9050)</translation>
     </message>
     <message>
         <source>&amp;Window</source>
-        <translation>&amp;Fereastra</translation>
+        <translation>&amp;Fereastră</translation>
     </message>
     <message>
         <source>Show only a tray icon after minimizing the window.</source>
-        <translation>Afişează doar un icon in tray la ascunderea ferestrei</translation>
+        <translation>Arată doar un icon în tray la ascunderea ferestrei</translation>
     </message>
     <message>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
-        <translation>&amp;M Ascunde în tray în loc de taskbar</translation>
+        <translation>&amp;Minimizare în tray în loc de taskbar</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 Quit in the menu.</source>
-        <translation>Ascunde 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 Quit din menu.</translation>
+        <translation>Ascunde 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>M&amp;inimize on close</source>
-        <translation>&amp;i Ascunde fereastra în locul închiderii programului</translation>
+        <translation>M&amp;inimizare fereastră în locul închiderii programului</translation>
     </message>
     <message>
         <source>&amp;Display</source>
@@ -1012,11 +1076,11 @@ Adresa: %4
     </message>
     <message>
         <source>User Interface &amp;language:</source>
-        <translation>Interfata &amp; limba userului</translation>
+        <translation>&amp;Limbă interfaţă utilizator</translation>
     </message>
     <message>
         <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin.</source>
-        <translation>Limba interfeței utilizatorului poate fi setat aici. Această setare va avea efect după repornirea Bitcoin.</translation>
+        <translation>Limba interfeţei utilizatorului poate fi setată aici. Această setare va avea efect după repornirea Bitcoin.</translation>
     </message>
     <message>
         <source>&amp;Unit to show amounts in:</source>
@@ -1024,23 +1088,23 @@ Adresa: %4
     </message>
     <message>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
-        <translation>Alege subdiviziunea folosită la afişarea interfeţei şi la trimiterea de bitcoin.</translation>
+        <translation>Alegeţi subdiviziunea folosită la afişarea interfeţei şi la trimiterea de bitcoin.</translation>
     </message>
     <message>
         <source>Whether to show coin control features or not.</source>
-        <translation>Dacă să se afişeze controlul caracteristicilor monedei sau nu.</translation>
+        <translation>Arată controlul caracteristicilor monedei sau nu.</translation>
     </message>
     <message>
         <source>&amp;OK</source>
-        <translation>&amp; OK</translation>
+        <translation>&amp;OK</translation>
     </message>
     <message>
         <source>&amp;Cancel</source>
-        <translation>&amp; Renunta</translation>
+        <translation>Renunţă</translation>
     </message>
     <message>
         <source>default</source>
-        <translation>Initial</translation>
+        <translation>iniţial</translation>
     </message>
     <message>
         <source>none</source>
@@ -1048,11 +1112,11 @@ Adresa: %4
     </message>
     <message>
         <source>Confirm options reset</source>
-        <translation>Confirmă resetarea opțiunilor</translation>
+        <translation>Confirmă resetarea opţiunilor</translation>
     </message>
     <message>
         <source>Client restart required to activate changes.</source>
-        <translation>Este necesar un restart al clientului pentru a activa schimbările.</translation>
+        <translation>Este necesară repornirea clientului pentru a activa schimbările.</translation>
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
@@ -1060,11 +1124,11 @@ Adresa: %4
     </message>
     <message>
         <source>This change would require a client restart.</source>
-        <translation>Această schimbare va necesita un restart al clientului.</translation>
+        <translation>Această schimbare necesită o repornire a clientului.</translation>
     </message>
     <message>
         <source>The supplied proxy address is invalid.</source>
-        <translation>Adresa bitcoin pe care a-ti specificat-o este invalida</translation>
+        <translation>Adresa bitcoin pe care aţi specificat-o nu este validă.</translation>
     </message>
 </context>
 <context>
@@ -1075,7 +1139,11 @@ Adresa: %4
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>Informațiile afișate pot neactualizate. Portofelul tău se sincronizează automat cu rețeaua Bitcoin după ce o conexiune este stabilită, dar acest proces nu a fost finalizat încă.</translation>
+        <translation>Informaţiile afişate pot fi neactualizate. Portofelul dvs. se sincronizează automat cu reţeaua Bitcoin după ce o conexiune este stabilită, dar acest proces nu a fost finalizat încă.</translation>
+    </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>Doar-supraveghere:</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1083,7 +1151,7 @@ Adresa: %4
     </message>
     <message>
         <source>Your current spendable balance</source>
-        <translation>Balanța ta curentă de cheltuieli</translation>
+        <translation>Balanţa dvs. curentă de cheltuieli</translation>
     </message>
     <message>
         <source>Pending:</source>
@@ -1091,7 +1159,7 @@ Adresa: %4
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Totalul tranzacțiilor care nu sunt confirmate încă și care nu sunt încă adunate la balanța de cheltuieli</translation>
+        <translation>Totalul tranzacţiilor care nu sunt confirmate încă şi care nu sunt încă adunate la balanţa de cheltuieli</translation>
     </message>
     <message>
         <source>Immature:</source>
@@ -1099,7 +1167,7 @@ Adresa: %4
     </message>
     <message>
         <source>Mined balance that has not yet matured</source>
-        <translation>Balanta minata care nu s-a maturizat inca</translation>
+        <translation>Balanţa minertită care nu s-a maturizat încă</translation>
     </message>
     <message>
         <source>Balances</source>
@@ -1111,7 +1179,11 @@ Adresa: %4
     </message>
     <message>
         <source>Your current total balance</source>
-        <translation>Balanța totală curentă</translation>
+        <translation>Balanţa totală curentă</translation>
+    </message>
+    <message>
+        <source>Your current balance in watch-only addresses</source>
+        <translation>Soldul dvs. curent în adresele doar-supraveghere</translation>
     </message>
     <message>
         <source>Spendable:</source>
@@ -1121,9 +1193,21 @@ Adresa: %4
         <source>Recent transactions</source>
         <translation>Tranzacţii recente</translation>
     </message>
+    <message>
+        <source>Unconfirmed transactions to watch-only addresses</source>
+        <translation>Tranzacţii neconfirmate la adresele doar-supraveghere</translation>
+    </message>
+    <message>
+        <source>Mined balance in watch-only addresses that has not yet matured</source>
+        <translation>Balanţă minată în adresele doar-supraveghere care nu s-a maturizat încă</translation>
+    </message>
+    <message>
+        <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>Nu este sincronizat</translation>
+        <translation>nesincronizat</translation>
     </message>
 </context>
 <context>
@@ -1136,9 +1220,25 @@ Adresa: %4
         <source>Invalid payment address %1</source>
         <translation>Adresă pentru plată nevalidă %1</translation>
     </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Cerere de plată refuzată</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Cererea de plată din reţea nu se potriveşte cu clientul din reţea</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <translation>Cererea de plată a expirat.</translation>
+    </message>
+    <message>
+        <source>Payment request is not initialized.</source>
+        <translation>Cererea de plată nu este iniţializată.</translation>
+    </message>
     <message>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
-        <translation>Cereti plata cu suma de %1 este prea mica (considerata praf)</translation>
+        <translation>Suma cerută de plată de %1 este prea mică (considerată praf).</translation>
     </message>
     <message>
         <source>Payment request error</source>
@@ -1146,23 +1246,47 @@ Adresa: %4
     </message>
     <message>
         <source>Cannot start bitcoin: click-to-pay handler</source>
-        <translation>Nu poate porni bitcoin: regula clic-pentru-plata</translation>
+        <translation>Nu poate porni bitcoin: manipulator clic-pentru-plată</translation>
+    </message>
+    <message>
+        <source>Payment request fetch URL is invalid: %1</source>
+        <translation>URL-ul cererii de plată preluat nu este valid: %1</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>Manipulare fişier cerere de plată</translation>
+    </message>
+    <message>
+        <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+        <translation>Fişierul cerere de plată nu poate fi citit! Cauza poate fi un fişier cerere de plată nevalid.</translation>
     </message>
     <message>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
-        <translation>Cereri de plată neverificate prin script-uri personalizate de plată nu sunt suportate.</translation>
+        <translation>Cererile de plată neverificate prin script-uri personalizate de plată nu sînt suportate.</translation>
     </message>
     <message>
         <source>Refund from %1</source>
-        <translation>rambursare de la %1</translation>
+        <translation>Rambursare de la %1</translation>
+    </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Cererea de plată %1 este prea mare (%2 octeţi, permis %3 octeţi).</translation>
+    </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Protecţie DoS cerere de plată</translation>
     </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Eroare la comunicarea cu %1: %2</translation>
     </message>
+    <message>
+        <source>Payment request cannot be parsed!</source>
+        <translation>Cererea de plată nu poate fi analizată!</translation>
+    </message>
     <message>
         <source>Bad response from server %1</source>
-        <translation>Răspuns greșit de la server %1</translation>
+        <translation>Răspuns greşit de la server %1</translation>
     </message>
     <message>
         <source>Payment acknowledged</source>
@@ -1170,21 +1294,37 @@ Adresa: %4
     </message>
     <message>
         <source>Network request error</source>
-        <translation>Eroare în cererea de rețea</translation>
+        <translation>Eroare în cererea de reţea</translation>
     </message>
 </context>
 <context>
     <name>PeerTableModel</name>
-    </context>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent utilizator</translation>
+    </message>
+    <message>
+        <source>Address/Hostname</source>
+        <translation>Adresă/Nume gazdă</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Timp ping</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
         <source>Amount</source>
-        <translation>Sumă</translation>
+        <translation>Cantitate</translation>
+    </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Introduceţi o adresă Bitcoin (de exemplu %1)</translation>
     </message>
     <message>
         <source>%1 d</source>
-        <translation>%1 d</translation>
+        <translation>%1 z</translation>
     </message>
     <message>
         <source>%1 h</source>
@@ -1198,6 +1338,18 @@ Adresa: %4
         <source>%1 s</source>
         <translation>%1 s</translation>
     </message>
+    <message>
+        <source>NETWORK</source>
+        <translation>REŢEA</translation>
+    </message>
+    <message>
+        <source>UNKNOWN</source>
+        <translation>NECUNOSCUT</translation>
+    </message>
+    <message>
+        <source>None</source>
+        <translation>Niciuna</translation>
+    </message>
     <message>
         <source>N/A</source>
         <translation>N/A</translation>
@@ -1211,11 +1363,11 @@ Adresa: %4
     <name>QRImageWidget</name>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>Salvarea imaginii ...</translation>
+        <translation>&amp;Salvează imagine...</translation>
     </message>
     <message>
         <source>&amp;Copy Image</source>
-        <translation>Copierea imaginii</translation>
+        <translation>&amp;Copiază imaginea</translation>
     </message>
     <message>
         <source>Save QR Code</source>
@@ -1234,7 +1386,7 @@ Adresa: %4
     </message>
     <message>
         <source>N/A</source>
-        <translation>N/A</translation>
+        <translation>indisponibil</translation>
     </message>
     <message>
         <source>Client version</source>
@@ -1242,7 +1394,7 @@ Adresa: %4
     </message>
     <message>
         <source>&amp;Information</source>
-        <translation>&amp;Informație</translation>
+        <translation>&amp;Informaţii</translation>
     </message>
     <message>
         <source>Debug window</source>
@@ -1254,7 +1406,11 @@ Adresa: %4
     </message>
     <message>
         <source>Using OpenSSL version</source>
-        <translation>Foloseste versiunea OpenSSL</translation>
+        <translation>Foloseşte OpenSSL versiunea</translation>
+    </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Foloseşte BerkeleyDB versiunea</translation>
     </message>
     <message>
         <source>Startup time</source>
@@ -1262,11 +1418,11 @@ Adresa: %4
     </message>
     <message>
         <source>Network</source>
-        <translation>Rețea</translation>
+        <translation>Reţea</translation>
     </message>
     <message>
         <source>Name</source>
-        <translation>Numele</translation>
+        <translation>Nume</translation>
     </message>
     <message>
         <source>Number of connections</source>
@@ -1274,7 +1430,7 @@ Adresa: %4
     </message>
     <message>
         <source>Block chain</source>
-        <translation>Lanț de blocuri</translation>
+        <translation>Lanţ de blocuri</translation>
     </message>
     <message>
         <source>Current number of blocks</source>
@@ -1282,24 +1438,60 @@ Adresa: %4
     </message>
     <message>
         <source>Received</source>
-        <translation>Primit</translation>
+        <translation>Recepţionat</translation>
     </message>
     <message>
         <source>Sent</source>
         <translation>Trimis</translation>
     </message>
+    <message>
+        <source>&amp;Peers</source>
+        <translation>&amp;Parteneri</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Selectaţi un partener pentru a vedea informaţiile detaliate.</translation>
+    </message>
     <message>
         <source>Direction</source>
         <translation>Direcţie</translation>
     </message>
     <message>
         <source>Version</source>
-        <translation>Versiunea</translation>
+        <translation>Versiune</translation>
+    </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Agent utilizator</translation>
     </message>
     <message>
         <source>Services</source>
         <translation>Servicii</translation>
     </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Timp conexiune</translation>
+    </message>
+    <message>
+        <source>Last Send</source>
+        <translation>Ultima trimitere</translation>
+    </message>
+    <message>
+        <source>Last Receive</source>
+        <translation>Ultima primire</translation>
+    </message>
+    <message>
+        <source>Bytes Sent</source>
+        <translation>Octeţi trimişi</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Octeţi primiţi</translation>
+    </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Timp ping</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Data ultimului bloc</translation>
@@ -1314,11 +1506,11 @@ Adresa: %4
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation>Traficul in rețea</translation>
+        <translation>Trafic reţea</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
-        <translation>&amp;Ştergeţi</translation>
+        <translation>&amp;Curăţă</translation>
     </message>
     <message>
         <source>Totals</source>
@@ -1326,11 +1518,11 @@ Adresa: %4
     </message>
     <message>
         <source>In:</source>
-        <translation>în:</translation>
+        <translation>Intrare:</translation>
     </message>
     <message>
         <source>Out:</source>
-        <translation>Ieșire.</translation>
+        <translation>Ieşire:</translation>
     </message>
     <message>
         <source>Build date</source>
@@ -1338,27 +1530,27 @@ Adresa: %4
     </message>
     <message>
         <source>Debug log file</source>
-        <translation>Loguri debug</translation>
+        <translation>Fişier jurnal depanare</translation>
     </message>
     <message>
         <source>Open the Bitcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Deschide logurile debug din directorul curent. Aceasta poate dura cateva secunde pentru fisierele mai mari</translation>
+        <translation>Deschide fişierul jurnal depanare din directorul curent. Aceasta poate dura cîteva secunde pentru fişierele mai mari.</translation>
     </message>
     <message>
         <source>Clear console</source>
-        <translation>Curăță consola</translation>
+        <translation>Curăţă consola</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Bun venit la consola bitcoin RPC</translation>
+        <translation>Bun venit la consola 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>Foloseste sagetile sus si jos pentru a naviga in istoric si &lt;b&gt;Ctrl-L&lt;/b&gt; pentru a curata.</translation>
+        <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>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
-        <translation>Scrie &lt;b&gt;help&lt;/b&gt; pentru a vedea comenzile disponibile</translation>
+        <translation>Scrieţi &lt;b&gt;help&lt;/b&gt; pentru a vedea comenzile disponibile.</translation>
     </message>
     <message>
         <source>%1 B</source>
@@ -1380,16 +1572,32 @@ Adresa: %4
         <source>via %1</source>
         <translation>via %1</translation>
     </message>
+    <message>
+        <source>never</source>
+        <translation>niciodată</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Intrare</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Ieşire</translation>
+    </message>
     <message>
         <source>Unknown</source>
         <translation>Necunoscut</translation>
     </message>
-    </context>
+    <message>
+        <source>Fetching...</source>
+        <translation>Preluare...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <source>&amp;Amount:</source>
-        <translation>&amp; suma:</translation>
+        <translation>Sum&amp;a:</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1397,47 +1605,63 @@ Adresa: %4
     </message>
     <message>
         <source>&amp;Message:</source>
-        <translation>&amp; mesaj:</translation>
+        <translation>&amp;Mesaj:</translation>
     </message>
     <message>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Refolositi una din adresele de primire folosite in prealabil. Refolosirea adreselor poate crea probleme de securitate si confidentialitate. Nu folositi aceasta optiune decat daca o cerere de regenerare a platii a fost facuta in prealabil.</translation>
+        <translation>Refoloseşte una din adresele de primire folosite anterior. Refolosirea adreselor poate crea probleme de securitate şi confidenţialitate. Nu folosiţi această opţiune decît dacă o cerere de regenerare a plăţii a fost făcută anterior.</translation>
     </message>
     <message>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation>&amp;Refolosirea unei adrese de primire (nu este recomandat)</translation>
+        <translation>R&amp;efoloseşte o adresă de primire (nu este recomandat)</translation>
+    </message>
+    <message>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+        <translation>Un mesaj opţional de ataşat la cererea de plată, care va fi afişat cînd cererea este deschisă. Notă: Acest mesaj nu va fi trimis cu plata către reţeaua Bitcoin.</translation>
+    </message>
+    <message>
+        <source>An optional label to associate with the new receiving address.</source>
+        <translation>O etichetă opţională de asociat cu adresa de primire.</translation>
     </message>
     <message>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
-        <translation>Folosește acest formular pentru a solicita plăți. Toate câmpurile sunt &lt;b&gt;opționale&lt;/b&gt;.</translation>
+        <translation>Foloseşte acest formular pentru a solicita plăţi. Toate cîmpurile sînt &lt;b&gt;opţionale&lt;/b&gt;.</translation>
+    </message>
+    <message>
+        <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+        <translation>O sumă opţională de cerut. Lăsaţi gol sau zero pentru a nu cere o sumă anume.</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Stergeti toate campurile formularului</translation>
+        <translation>Curăţă toate cîmpurile formularului.</translation>
     </message>
     <message>
         <source>Clear</source>
-        <translation>Stergeti</translation>
+        <translation>Curăţă</translation>
     </message>
     <message>
         <source>Requested payments history</source>
-        <translation>Istoricul platilor a fost cerut</translation>
+        <translation>Istoricul plăţilor cerute</translation>
     </message>
     <message>
         <source>&amp;Request payment</source>
-        <translation>&amp;Cereti plata</translation>
+        <translation>&amp;Cerere plată</translation>
     </message>
     <message>
         <source>Show the selected request (does the same as double clicking an entry)</source>
-        <translation>Arata cererea selectata (acelas lucru ca si dublu-click pe o inregistrare)</translation>
+        <translation>Arată cererea selectată (acelaşi lucru ca şi dublu-clic pe o înregistrare)</translation>
     </message>
     <message>
         <source>Show</source>
         <translation>Arată</translation>
     </message>
+    <message>
+        <source>Remove the selected entries from the list</source>
+        <translation>Înlătură intrările selectate din listă</translation>
+    </message>
     <message>
         <source>Remove</source>
-        <translation>Elimină</translation>
+        <translation>Înlătură</translation>
     </message>
     <message>
         <source>Copy label</source>
@@ -1445,7 +1669,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy message</source>
-        <translation>Copiaţi mesajul</translation>
+        <translation>Copiază mesajul</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1460,27 +1684,27 @@ Adresa: %4
     </message>
     <message>
         <source>Copy &amp;URI</source>
-        <translation>Copiati &amp;URl</translation>
+        <translation>Copiază &amp;URl</translation>
     </message>
     <message>
         <source>Copy &amp;Address</source>
-        <translation>Copiati &amp;Adresa</translation>
+        <translation>Copiază &amp;adresa</translation>
     </message>
     <message>
         <source>&amp;Save Image...</source>
-        <translation>Salvarea imaginii ...</translation>
+        <translation>&amp;Salvează imaginea...</translation>
     </message>
     <message>
         <source>Request payment to %1</source>
-        <translation>Cereti plata pentru %1</translation>
+        <translation>Cere plata pentru %1</translation>
     </message>
     <message>
         <source>Payment information</source>
-        <translation>Informatiile platii</translation>
+        <translation>Informaţiile plăţii</translation>
     </message>
     <message>
         <source>URI</source>
-        <translation>Identificator uniform de resurse</translation>
+        <translation>URI</translation>
     </message>
     <message>
         <source>Address</source>
@@ -1500,7 +1724,7 @@ Adresa: %4
     </message>
     <message>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>URI rezultat este prea lung, încearcă să reduci textul pentru etichetă / mesaj.</translation>
+        <translation>URI rezultat este prea lung, încearcaţi să reduceţi textul pentru etichetă / mesaj.</translation>
     </message>
     <message>
         <source>Error encoding URI into QR Code.</source>
@@ -1535,7 +1759,7 @@ Adresa: %4
     </message>
     <message>
         <source>(no amount)</source>
-        <translation>(suma nulă)</translation>
+        <translation>(sumă nulă)</translation>
     </message>
 </context>
 <context>
@@ -1550,11 +1774,11 @@ Adresa: %4
     </message>
     <message>
         <source>Inputs...</source>
-        <translation>Intrări</translation>
+        <translation>Intrări...</translation>
     </message>
     <message>
         <source>automatically selected</source>
-        <translation>Selectie automatică</translation>
+        <translation>selecţie automată</translation>
     </message>
     <message>
         <source>Insufficient funds!</source>
@@ -1578,24 +1802,56 @@ Adresa: %4
     </message>
     <message>
         <source>Fee:</source>
-        <translation>Taxa:</translation>
+        <translation>Taxă:</translation>
     </message>
     <message>
         <source>After Fee:</source>
-        <translation>După taxe:</translation>
+        <translation>După taxă:</translation>
     </message>
     <message>
         <source>Change:</source>
-        <translation>Schimbaţi:</translation>
+        <translation>Rest:</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>Dacă este activat, dar adresa de rest este goală sau nevalidă, restul va fi trimis la o adresă nou generată.</translation>
+    </message>
+    <message>
+        <source>Custom change address</source>
+        <translation>Adresă personalizată de rest</translation>
+    </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Taxă tranzacţie:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Alegeţi...</translation>
     </message>
     <message>
         <source>Minimize</source>
         <translation>Minimizare</translation>
     </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>per kilooctet</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>total cel puţin</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Recomandat:</translation>
+    </message>
     <message>
         <source>Custom:</source>
         <translation>Personalizat:</translation>
     </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Timp confirmare:</translation>
+    </message>
     <message>
         <source>normal</source>
         <translation>normal</translation>
@@ -1604,33 +1860,45 @@ Adresa: %4
         <source>fast</source>
         <translation>rapid</translation>
     </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Trimite ca taxă zero dacă este posibil</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(confirmarea poate dura mai mult)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
-        <translation>Trimite simultan către mai mulți destinatari</translation>
+        <translation>Trimite simultan către mai mulţi destinatari</translation>
     </message>
     <message>
         <source>Add &amp;Recipient</source>
-        <translation>&amp;Adaugă destinatar</translation>
+        <translation>Adaugă destinata&amp;r</translation>
     </message>
     <message>
         <source>Clear all fields of the form.</source>
-        <translation>Stergeti toate campurile formularului</translation>
+        <translation>Şterge toate cîmpurile formularului.</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Praf:</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Șterge &amp;tot</translation>
+        <translation>Curăţă to&amp;ate</translation>
     </message>
     <message>
         <source>Balance:</source>
-        <translation>Balanță:</translation>
+        <translation>Balanţă:</translation>
     </message>
     <message>
         <source>Confirm the send action</source>
-        <translation>Confirmă operațiunea de trimitere</translation>
+        <translation>Confirmă operaţiunea de trimitere</translation>
     </message>
     <message>
         <source>S&amp;end</source>
-        <translation>&amp;S Trimite</translation>
+        <translation>Trimit&amp;e</translation>
     </message>
     <message>
         <source>Confirm send coins</source>
@@ -1642,7 +1910,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy quantity</source>
-        <translation>Copiaţi quantitea</translation>
+        <translation>Copiază cantitea</translation>
     </message>
     <message>
         <source>Copy amount</source>
@@ -1650,23 +1918,23 @@ Adresa: %4
     </message>
     <message>
         <source>Copy fee</source>
-        <translation>Copiaţi taxele</translation>
+        <translation>Copiază taxa</translation>
     </message>
     <message>
         <source>Copy after fee</source>
-        <translation>Copiaţi după taxe</translation>
+        <translation>Copiază după taxă</translation>
     </message>
     <message>
         <source>Copy bytes</source>
-        <translation>Copiaţi octeţi</translation>
+        <translation>Copiază octeţi</translation>
     </message>
     <message>
         <source>Copy priority</source>
-        <translation>Copiaţi prioritatea</translation>
+        <translation>Copiază prioritatea</translation>
     </message>
     <message>
         <source>Copy change</source>
-        <translation>Copiaţi schimb</translation>
+        <translation>Copiază rest</translation>
     </message>
     <message>
         <source>Total Amount %1 (= %2)</source>
@@ -1682,31 +1950,35 @@ Adresa: %4
     </message>
     <message>
         <source>The amount to pay must be larger than 0.</source>
-        <translation>Suma de plată trebuie să fie mai mare decât 0.</translation>
+        <translation>Suma de plată trebuie să fie mai mare decît 0.</translation>
     </message>
     <message>
         <source>The amount exceeds your balance.</source>
-        <translation>Suma depășește soldul contului.</translation>
+        <translation>Suma depăşeşte soldul contului.</translation>
     </message>
     <message>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
-        <translation>Totalul depășește soldul contului dacă se include și plata comisionului de %1.</translation>
+        <translation>Totalul depăşeşte soldul contului dacă se include şi plata taxei de %1.</translation>
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>S-a descoperit o adresă care figurează de două ori. Expedierea se poate realiza către fiecare adresă doar o singură dată pe operațiune.</translation>
+        <translation>S-a descoperit o adresă duplicat.Se poate trimite către fiecare adresă doar o singură dată per operaţiune.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
-        <translation>Creare de tranzactie nereusita!</translation>
+        <translation>Creare tranzacţie nereuşită!</translation>
     </message>
     <message>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Tranzactia a fost respinsa! Acest lucru se poate intampla daca o parte din monedele tale din portofel au fost deja cheltuite, la fel ca si cum ai fi folosit o copie a wallet.dat si monedele au fost cheltuite in copie, dar nu au fost marcate si si cheltuite si aici.</translation>
+        <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>Pay only the minimum fee of %1</source>
+        <translation>Plăteşte doar taxa minimă de %1</translation>
     </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
-        <translation>Atentie: Adresa Bitcoin invalida!</translation>
+        <translation>Atenţie: Adresa bitcoin nevalidă!</translation>
     </message>
     <message>
         <source>(no label)</source>
@@ -1714,15 +1986,19 @@ Adresa: %4
     </message>
     <message>
         <source>Warning: Unknown change address</source>
-        <translation>Atentie: Schimbare de adresa necunoscuta</translation>
+        <translation>Atenţie: Adresă de rest necunoscută</translation>
+    </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Copiază praf</translation>
     </message>
     <message>
         <source>Are you sure you want to send?</source>
-        <translation>Ești sigur că vrei să trimiți?</translation>
+        <translation>Sigur doriţi să trimiteţi?</translation>
     </message>
     <message>
         <source>added as transaction fee</source>
-        <translation>adăugat ca taxă de tranzacție</translation>
+        <translation>adăugat ca taxă de tranzacţie</translation>
     </message>
 </context>
 <context>
@@ -1733,11 +2009,11 @@ Adresa: %4
     </message>
     <message>
         <source>Pay &amp;To:</source>
-        <translation>Plătește că&amp;tre:</translation>
+        <translation>Plăteşte că&amp;tre:</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to your address book</source>
-        <translation>Introdu o etichetă pentru această adresă pentru a fi adăugată în lista ta de adrese</translation>
+        <translation>Introduceţi o etichetă pentru această adresă pentru a fi adăugată în lista dvs. de adrese</translation>
     </message>
     <message>
         <source>&amp;Label:</source>
@@ -1745,19 +2021,23 @@ Adresa: %4
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>Alegeti adrese folosite in prealabil.</translation>
+        <translation>Alegeţi adrese folosite anterior</translation>
     </message>
     <message>
         <source>This is a normal payment.</source>
         <translation>Aceasta este o tranzacţie normală.</translation>
     </message>
+    <message>
+        <source>The Bitcoin address to send the payment to</source>
+        <translation>Adresa bitcoin către care se face plata</translation>
+    </message>
     <message>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Lipește adresa din clipboard</translation>
+        <translation>Lipeşte adresa din clipboard</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1765,7 +2045,7 @@ Adresa: %4
     </message>
     <message>
         <source>Remove this entry</source>
-        <translation>Scoate aceasta introducere</translation>
+        <translation>Înlătură această intrare</translation>
     </message>
     <message>
         <source>Message:</source>
@@ -1773,19 +2053,23 @@ Adresa: %4
     </message>
     <message>
         <source>This is a verified payment request.</source>
-        <translation>Aceasta este o cerere de plata verificata</translation>
+        <translation>Aceasta este o cerere de plată verificată.</translation>
     </message>
     <message>
         <source>Enter a label for this address to add it to the list of used addresses</source>
-        <translation>Introduceti eticheta pentru ca aceasta adresa sa fie introdusa in lista de adrese folosite</translation>
+        <translation>Introduceţi eticheta pentru ca această adresa să fie introdusă în lista de adrese folosite</translation>
+    </message>
+    <message>
+        <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+        <translation>un mesaj a fost ataşat la bitcoin: URI care va fi stocat cu tranzacţia pentru referinţa dvs. Notă: Acest mesaj nu va fi trimis către reţeaua bitcoin.</translation>
     </message>
     <message>
         <source>This is an unverified payment request.</source>
-        <translation>Aceasta este o cerere de plata neverificata</translation>
+        <translation>Aceasta este o cerere de plata neverificată.</translation>
     </message>
     <message>
         <source>Pay To:</source>
-        <translation>Plateste catre:</translation>
+        <translation>Plăteşte către:</translation>
     </message>
     <message>
         <source>Memo:</source>
@@ -1796,30 +2080,34 @@ Adresa: %4
     <name>ShutdownWindow</name>
     <message>
         <source>Bitcoin Core is shutting down...</source>
-        <translation>Bitcoin Core se închide...</translation>
+        <translation>Nucleul Bitcoin se închide...</translation>
     </message>
     <message>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation>Nu închide calculatorul până ce această fereastră nu dispare.</translation>
+        <translation>Nu închide calculatorul pînă ce această fereastră nu dispare.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
         <source>Signatures - Sign / Verify a Message</source>
-        <translation>Semnatura- Semneaza/verifica un mesaj</translation>
+        <translation>Semnaturi - Semnează/verifică un mesaj</translation>
     </message>
     <message>
         <source>&amp;Sign Message</source>
-        <translation>Semneaza Mesajul</translation>
+        <translation>&amp;Semnează mesaj</translation>
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Puteti semna mesaje cu adresa dumneavoastra pentru a demostra ca sunteti proprietarul lor. Aveti grija sa nu semnati nimic vag, deoarece atacurile de tip phishing va pot pacali sa le transferati identitatea. Semnati numai declaratiile detaliate cu care sunteti deacord.</translation>
+        <translation>Puteţi semna mesaje cu adresa dvs. pentru a demostra ca sînteti proprietarul lor. Aveţi grijă să nu semnaţi nimic vag, deoarece atacurile de tip phishing vă pot păcăli să le transferaţi identitatea. Semnaţi numai declaraţiile detaliate cu care sînteti de acord.</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address to sign the message with</source>
+        <translation>Adresa cu care semnaţi mesajul</translation>
     </message>
     <message>
         <source>Choose previously used address</source>
-        <translation>Alegeti adrese folosite in prealabil</translation>
+        <translation>Alegeţi adrese folosite anterior</translation>
     </message>
     <message>
         <source>Alt+A</source>
@@ -1827,7 +2115,7 @@ Adresa: %4
     </message>
     <message>
         <source>Paste address from clipboard</source>
-        <translation>Lipiţi adresa copiată in clipboard.</translation>
+        <translation>Lipeşte adresa copiată din clipboard</translation>
     </message>
     <message>
         <source>Alt+P</source>
@@ -1835,7 +2123,7 @@ Adresa: %4
     </message>
     <message>
         <source>Enter the message you want to sign here</source>
-        <translation>Introduce mesajul pe care vrei sa il semnezi, aici.</translation>
+        <translation>Introduceţi mesajul pe care vreţi să-l semnaţi, aici</translation>
     </message>
     <message>
         <source>Signature</source>
@@ -1843,106 +2131,110 @@ Adresa: %4
     </message>
     <message>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>Copiaza semnatura curenta in clipboard-ul sistemului</translation>
+        <translation>Copiază semnatura curentă în clipboard-ul sistemului</translation>
     </message>
     <message>
         <source>Sign the message to prove you own this Bitcoin address</source>
-        <translation>Semneaza mesajul pentru a dovedi ca detii acesta adresa Bitcoin</translation>
+        <translation>Semnează mesajul pentru a dovedi ca deţineţi acestă adresă Bitcoin</translation>
     </message>
     <message>
         <source>Sign &amp;Message</source>
-        <translation>Semnează &amp;Message</translation>
+        <translation>Semnează &amp;mesaj</translation>
     </message>
     <message>
         <source>Reset all sign message fields</source>
-        <translation>Reseteaza toate spatiile mesajelor semnate.</translation>
+        <translation>Resetează toate cîmpurile mesajelor semnate</translation>
     </message>
     <message>
         <source>Clear &amp;All</source>
-        <translation>Şterge &amp;tot</translation>
+        <translation>Curăţă to&amp;ate</translation>
     </message>
     <message>
         <source>&amp;Verify Message</source>
-        <translation>Verifica mesajul</translation>
+        <translation>&amp;Verifică mesaj</translation>
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Introduceti adresa de semnatura, mesajul (asigurati-va ca ati copiat spatiile, taburile etc. exact) si semnatura dedesubt pentru a verifica mesajul. Aveti grija sa nu cititi mai mult in semnatura decat mesajul in sine, pentru a evita sa fiti pacaliti de un atac de tip man-in-the-middle.</translation>
+        <translation>Introduceţi adresa de semnatură, mesajul (asiguraţi-vă că aţi copiat spaţiile, taburile etc. exact) şi semnatura dedesubt pentru a verifica mesajul. Aveţi grijă să nu citiţi mai mult în semnatură decît mesajul în sine, pentru a evita să fiţi păcăliţi de un atac de tip man-in-the-middle.</translation>
+    </message>
+    <message>
+        <source>The Bitcoin address the message was signed with</source>
+        <translation>Introduceţi o adresă Bitcoin</translation>
     </message>
     <message>
         <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
-        <translation>Verifica mesajul pentru a fi sigur ca a fost semnat cu adresa Bitcoin specifica</translation>
+        <translation>Verificaţi mesajul pentru a vă asigura că a fost semnat cu adresa Bitcoin specificată</translation>
     </message>
     <message>
         <source>Verify &amp;Message</source>
-        <translation>Verifică &amp;Message</translation>
+        <translation>Verifică &amp;mesaj</translation>
     </message>
     <message>
         <source>Reset all verify message fields</source>
-        <translation>Reseteaza toate spatiile mesajelor semnate.</translation>
+        <translation>Resetează toate cîmpurile mesajelor semnate</translation>
     </message>
     <message>
         <source>Click "Sign Message" to generate signature</source>
-        <translation>Click "Semneaza msajul" pentru a genera semnatura</translation>
+        <translation>Faceţi clic pe "Semneaza msaj" pentru a genera semnătura</translation>
     </message>
     <message>
         <source>The entered address is invalid.</source>
-        <translation>Adresa introdusa nu este valida</translation>
+        <translation>Adresa introdusă nu este validă</translation>
     </message>
     <message>
         <source>Please check the address and try again.</source>
-        <translation>Te rugam verifica adresa si introduce-o din nou</translation>
+        <translation>Vă rugăm verificaţi adresa şi încercaţi din nou.</translation>
     </message>
     <message>
         <source>The entered address does not refer to a key.</source>
-        <translation>Adresa introdusa nu se refera la o cheie.</translation>
+        <translation>Adresa introdusă nu se referă la o cheie.</translation>
     </message>
     <message>
         <source>Wallet unlock was cancelled.</source>
-        <translation>Blocarea portofelului a fost intrerupta</translation>
+        <translation>Blocarea portofelului a fost întreruptă.</translation>
     </message>
     <message>
         <source>Private key for the entered address is not available.</source>
-        <translation>Cheia privata pentru adresa introdusa nu este valida.</translation>
+        <translation>Cheia privată pentru adresa introdusă nu este validă.</translation>
     </message>
     <message>
         <source>Message signing failed.</source>
-        <translation>Semnarea mesajului a esuat</translation>
+        <translation>Semnarea mesajului nu a reuşit.</translation>
     </message>
     <message>
         <source>Message signed.</source>
-        <translation>Mesaj Semnat!</translation>
+        <translation>Mesaj semnat.</translation>
     </message>
     <message>
         <source>The signature could not be decoded.</source>
-        <translation>Aceasta semnatura nu a putut fi decodata</translation>
+        <translation>Această semnatură nu a putut fi decodată.</translation>
     </message>
     <message>
         <source>Please check the signature and try again.</source>
-        <translation>Verifica semnatura si incearca din nou</translation>
+        <translation>Vă rugăm verificaţi semnătura şi încercaţi din nou.</translation>
     </message>
     <message>
         <source>The signature did not match the message digest.</source>
-        <translation>Semnatura nu seamana!</translation>
+        <translation>Semnatura nu se potriveşte cu mesajul.</translation>
     </message>
     <message>
         <source>Message verification failed.</source>
-        <translation>Verificarea mesajului a esuat</translation>
+        <translation>Verificarea mesajului nu a reuşit.</translation>
     </message>
     <message>
         <source>Message verified.</source>
-        <translation>Mesaj verificat</translation>
+        <translation>Mesaj verificat.</translation>
     </message>
 </context>
 <context>
     <name>SplashScreen</name>
     <message>
         <source>Bitcoin Core</source>
-        <translation>Bitcoin Core</translation>
+        <translation>Nucleul Bitcoin</translation>
     </message>
     <message>
         <source>The Bitcoin Core developers</source>
-        <translation>Dezvoltatorii Bitcoin Core</translation>
+        <translation>Dezvoltatorii Nucleului Bitcoin</translation>
     </message>
     <message>
         <source>[testnet]</source>
@@ -1960,7 +2252,7 @@ Adresa: %4
     <name>TransactionDesc</name>
     <message>
         <source>Open until %1</source>
-        <translation>Deschis până la %1</translation>
+        <translation>Deschis pînă la %1</translation>
     </message>
     <message>
         <source>conflicted</source>
@@ -2008,7 +2300,11 @@ Adresa: %4
     </message>
     <message>
         <source>own address</source>
-        <translation>Adresa posedata</translation>
+        <translation>adresa proprie</translation>
+    </message>
+    <message>
+        <source>watch-only</source>
+        <translation>doar-supraveghere</translation>
     </message>
     <message>
         <source>label</source>
@@ -2024,7 +2320,7 @@ Adresa: %4
     </message>
     <message>
         <source>not accepted</source>
-        <translation>nu este acceptat</translation>
+        <translation>neacceptat</translation>
     </message>
     <message>
         <source>Debit</source>
@@ -2040,7 +2336,7 @@ Adresa: %4
     </message>
     <message>
         <source>Transaction fee</source>
-        <translation>Comisionul tranzacţiei</translation>
+        <translation>Taxă tranzacţie</translation>
     </message>
     <message>
         <source>Net amount</source>
@@ -2052,11 +2348,11 @@ Adresa: %4
     </message>
     <message>
         <source>Comment</source>
-        <translation>Comentarii</translation>
+        <translation>Comentariu</translation>
     </message>
     <message>
         <source>Transaction ID</source>
-        <translation>ID-ul tranzactiei</translation>
+        <translation>ID-ul tranzacţie</translation>
     </message>
     <message>
         <source>Merchant</source>
@@ -2064,11 +2360,11 @@ Adresa: %4
     </message>
     <message>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>Monezile generate trebuie sa creasca %1 block-uri inainte sa poata fi cheltuite. Cand ati generat acest block, a fost transmis retelei pentru a fi adaugat la lantul de block-uri. Aceasta  se poate intampla ocazional daca alt nod genereaza un block la numai cateva secunde de al tau.</translation>
+        <translation>Monezile generate trebuie să crească %1 blocuri înainte să poată fi cheltuite. Cînd aţi generat acest bloc, a fost transmis reţelei pentru a fi adaugat la lanţul de blocuri. Aceasta  se poate întîmpla ocazional dacă alt nod generează un bloc la numai cîteva secunde de al dvs.</translation>
     </message>
     <message>
         <source>Debug information</source>
-        <translation>Informatii pentru debug</translation>
+        <translation>Informaţii pentru depanare</translation>
     </message>
     <message>
         <source>Transaction</source>
@@ -2076,7 +2372,7 @@ Adresa: %4
     </message>
     <message>
         <source>Inputs</source>
-        <translation>Intrari</translation>
+        <translation>Intrări</translation>
     </message>
     <message>
         <source>Amount</source>
@@ -2084,11 +2380,11 @@ Adresa: %4
     </message>
     <message>
         <source>true</source>
-        <translation>Adevarat!</translation>
+        <translation>adevărat</translation>
     </message>
     <message>
         <source>false</source>
-        <translation>Fals!</translation>
+        <translation>fals</translation>
     </message>
     <message>
         <source>, has not been successfully broadcast yet</source>
@@ -2103,11 +2399,11 @@ Adresa: %4
     <name>TransactionDescDialog</name>
     <message>
         <source>Transaction details</source>
-        <translation>Detaliile tranzacției</translation>
+        <translation>Detaliile tranzacţiei</translation>
     </message>
     <message>
         <source>This pane shows a detailed description of the transaction</source>
-        <translation>Acest panou afișează o descriere detaliată a tranzacției</translation>
+        <translation>Acest panou arată o descriere detaliată a tranzacţiei</translation>
     </message>
 </context>
 <context>
@@ -2118,11 +2414,15 @@ Adresa: %4
     </message>
     <message>
         <source>Type</source>
-        <translation>Tipul</translation>
+        <translation>Tip</translation>
     </message>
     <message>
         <source>Address</source>
-        <translation>Adresa</translation>
+        <translation>Adresă</translation>
+    </message>
+    <message>
+        <source>Immature (%1 confirmations, will be available after %2)</source>
+        <translation>Imatur (%1 confirmări, va fi disponibil după %2)</translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -2134,7 +2434,7 @@ Adresa: %4
     </message>
     <message>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
-        <translation>Acest bloc nu a fost recepționat de niciun alt nod și probabil nu va fi acceptat!</translation>
+        <translation>Acest bloc nu a fost recepţionat de nici un alt nod şi probabil nu va fi acceptat!</translation>
     </message>
     <message>
         <source>Generated but not accepted</source>
@@ -2150,7 +2450,7 @@ Adresa: %4
     </message>
     <message>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation>Confirmare (%1 dintre %2 confirmări recomandate)</translation>
+        <translation>Confirmare (%1 din %2 confirmări recomandate)</translation>
     </message>
     <message>
         <source>Conflicted</source>
@@ -2158,7 +2458,7 @@ Adresa: %4
     </message>
     <message>
         <source>Received with</source>
-        <translation>Recepționat cu</translation>
+        <translation>Recepţionat cu</translation>
     </message>
     <message>
         <source>Received from</source>
@@ -2170,31 +2470,39 @@ Adresa: %4
     </message>
     <message>
         <source>Payment to yourself</source>
-        <translation>Plată către tine</translation>
+        <translation>Plată către dvs.</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation>Produs</translation>
+        <translation>Minerit</translation>
+    </message>
+    <message>
+        <source>watch-only</source>
+        <translation>doar-supraveghere</translation>
     </message>
     <message>
         <source>(n/a)</source>
-        <translation>(n/a)</translation>
+        <translation>indisponibil</translation>
     </message>
     <message>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
-        <translation>Starea tranzacției. Treci cu mausul peste acest câmp pentru afișarea numărului de confirmări.</translation>
+        <translation>Starea tranzacţiei. Treceţi cu mouse-ul peste acest cîmp pentru afişarea numărului de confirmări.</translation>
     </message>
     <message>
         <source>Date and time that the transaction was received.</source>
-        <translation>Data și ora la care a fost recepționată tranzacția.</translation>
+        <translation>Data şi ora la care a fost recepţionată tranzacţia.</translation>
     </message>
     <message>
         <source>Type of transaction.</source>
-        <translation>Tipul tranzacției.</translation>
+        <translation>Tipul tranzacţiei.</translation>
+    </message>
+    <message>
+        <source>Whether or not a watch-only address is involved in this transaction.</source>
+        <translation>Indiferent dacă sau nu o adresă doar-suăpraveghere este implicată în această tranzacţie.</translation>
     </message>
     <message>
         <source>Destination address of transaction.</source>
-        <translation>Adresa de destinație a tranzacției.</translation>
+        <translation>Adresa de destinaţie a tranzacţiei.</translation>
     </message>
     <message>
         <source>Amount removed from or added to balance.</source>
@@ -2213,7 +2521,7 @@ Adresa: %4
     </message>
     <message>
         <source>This week</source>
-        <translation>Săptămâna aceasta</translation>
+        <translation>Săptămîna aceasta</translation>
     </message>
     <message>
         <source>This month</source>
@@ -2229,11 +2537,11 @@ Adresa: %4
     </message>
     <message>
         <source>Range...</source>
-        <translation>Între...</translation>
+        <translation>Interval...</translation>
     </message>
     <message>
         <source>Received with</source>
-        <translation>Recepționat cu</translation>
+        <translation>Recepţionat cu</translation>
     </message>
     <message>
         <source>Sent to</source>
@@ -2241,11 +2549,11 @@ Adresa: %4
     </message>
     <message>
         <source>To yourself</source>
-        <translation>Către tine</translation>
+        <translation>Către dvs.</translation>
     </message>
     <message>
         <source>Mined</source>
-        <translation>Produs</translation>
+        <translation>Minerit</translation>
     </message>
     <message>
         <source>Other</source>
@@ -2253,11 +2561,11 @@ Adresa: %4
     </message>
     <message>
         <source>Enter address or label to search</source>
-        <translation>Introdu adresa sau eticheta pentru căutare</translation>
+        <translation>Introduceţi adresa sau eticheta pentru căutare</translation>
     </message>
     <message>
         <source>Min amount</source>
-        <translation>Cantitatea minimă</translation>
+        <translation>Suma minimă</translation>
     </message>
     <message>
         <source>Copy address</source>
@@ -2273,7 +2581,7 @@ Adresa: %4
     </message>
     <message>
         <source>Copy transaction ID</source>
-        <translation>Copiază ID tranzacție</translation>
+        <translation>Copiază ID tranzacţie</translation>
     </message>
     <message>
         <source>Edit label</source>
@@ -2281,23 +2589,27 @@ Adresa: %4
     </message>
     <message>
         <source>Show transaction details</source>
-        <translation>Arată detaliile tranzacției</translation>
+        <translation>Arată detaliile tranzacţiei</translation>
     </message>
     <message>
         <source>Export Transaction History</source>
-        <translation>Exportare Istoric Tranzacţii</translation>
+        <translation>Export istoric tranzacţii</translation>
+    </message>
+    <message>
+        <source>Watch-only</source>
+        <translation>Doar-supraveghere</translation>
     </message>
     <message>
         <source>Exporting Failed</source>
-        <translation>Exportare Eşuată</translation>
+        <translation>Export nereuşit</translation>
     </message>
     <message>
         <source>There was an error trying to save the transaction history to %1.</source>
-        <translation>S-a produs o eroare încercând să se salveze istoricul tranzacţiilor la %1.</translation>
+        <translation>S-a produs o eroare la salvarea istoricului tranzacţiilor la %1.</translation>
     </message>
     <message>
         <source>Exporting Successful</source>
-        <translation>Exportare Reuşită</translation>
+        <translation>Export reuşit</translation>
     </message>
     <message>
         <source>The transaction history was successfully saved to %1.</source>
@@ -2305,7 +2617,7 @@ Adresa: %4
     </message>
     <message>
         <source>Comma separated file (*.csv)</source>
-        <translation>Fișier text cu valori separate prin virgulă (*.csv)</translation>
+        <translation>Fişier text cu valori separate prin virgulă (*.csv)</translation>
     </message>
     <message>
         <source>Confirmed</source>
@@ -2317,7 +2629,7 @@ Adresa: %4
     </message>
     <message>
         <source>Type</source>
-        <translation>Tipul</translation>
+        <translation>Tip</translation>
     </message>
     <message>
         <source>Label</source>
@@ -2342,34 +2654,38 @@ Adresa: %4
 </context>
 <context>
     <name>UnitDisplayStatusBarControl</name>
-    </context>
+    <message>
+        <source>Unit to show amounts in. Click to select another unit.</source>
+        <translation>Unitatea în care sînt arătate sumele. Faceţi clic pentru a selecta o altă unitate.</translation>
+    </message>
+</context>
 <context>
     <name>WalletFrame</name>
     <message>
         <source>No wallet has been loaded.</source>
-        <translation>Nu a fost încărcat niciun portofel.</translation>
+        <translation>Nu a fost încărcat nici un portofel.</translation>
     </message>
 </context>
 <context>
     <name>WalletModel</name>
     <message>
         <source>Send Coins</source>
-        <translation>Trimite Bitcoin</translation>
+        <translation>Trimitere bitcoin</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
         <source>&amp;Export</source>
-        <translation>&amp;Exportă</translation>
+        <translation>&amp;Export</translation>
     </message>
     <message>
         <source>Export the data in the current tab to a file</source>
-        <translation>Exporta datele din tab-ul curent într-un fișier</translation>
+        <translation>Exportă datele din tab-ul curent într-un fişier</translation>
     </message>
     <message>
         <source>Backup Wallet</source>
-        <translation>Fă o copie de siguranță a portofelului</translation>
+        <translation>Copie de siguranţă portofel</translation>
     </message>
     <message>
         <source>Wallet Data (*.dat)</source>
@@ -2377,11 +2693,11 @@ Adresa: %4
     </message>
     <message>
         <source>Backup Failed</source>
-        <translation>Copia de rezerva a esuat</translation>
+        <translation>Copierea de siguranţă nu a reuşit</translation>
     </message>
     <message>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation>S-a produs o eroare încercând să se salveze datele portofelului la %1.</translation>
+        <translation>S-a produs o eroare la salvarea datelor portofelului la %1.</translation>
     </message>
     <message>
         <source>The wallet data was successfully saved to %1.</source>
@@ -2389,74 +2705,94 @@ Adresa: %4
     </message>
     <message>
         <source>Backup Successful</source>
-        <translation>Copia de siguranță efectuată cu succes</translation>
+        <translation>Copie de siguranţă efectuată cu succes</translation>
     </message>
 </context>
 <context>
     <name>bitcoin-core</name>
     <message>
         <source>Options:</source>
-        <translation>Setări:</translation>
+        <translation>Opţiuni:</translation>
     </message>
     <message>
         <source>Specify data directory</source>
-        <translation>Specifică dosarul de date</translation>
+        <translation>Specificaţi dosarul de date</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Conectează-te la nod pentru a obține adresele partenerilor, și apoi deconectează-te</translation>
+        <translation>Se conectează la un nod pentru a obţine adresele partenerilor, şi apoi se deconectează</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
-        <translation>Specifică adresa ta publică</translation>
+        <translation>Specificaţi adresa dvs. publică</translation>
     </message>
     <message>
         <source>Accept command line and JSON-RPC commands</source>
-        <translation>Se acceptă comenzi din linia de comandă și comenzi JSON-RPC</translation>
+        <translation>Acceptă comenzi din linia de comandă şi comenzi JSON-RPC</translation>
     </message>
     <message>
         <source>Run in the background as a daemon and accept commands</source>
-        <translation>Rulează în fundal ca un demon și acceptă comenzi</translation>
+        <translation>Rulează în fundal ca un demon şi acceptă comenzi</translation>
     </message>
     <message>
         <source>Use the test network</source>
-        <translation>Utilizează rețeaua de test</translation>
+        <translation>Utilizează reţeaua de test</translation>
     </message>
     <message>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
-        <translation>Acceptă conexiuni din afară (implicit: 1  dacă nu se folosește -proxy sau -connect)</translation>
+        <translation>Acceptă conexiuni din afară (implicit: 1 dacă nu se foloseşte -proxy sau -connect)</translation>
     </message>
     <message>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Atasati adresei date si ascultati totdeauna pe ea. Folositi [host]:port notatia pentru IPv6</translation>
+        <translation>Ataşaţi adresei date şi ascultaţi totdeauna pe ea. Folosiţi notaţia [host]:port pentru IPv6</translation>
+    </message>
+    <message>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuit sub licenţa de programe MIT/X11, vezi fişierul însoţitor COPYING sau &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+    </message>
+    <message>
+        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+        <translation>Iniţiază modul de test regresie, care foloseşte un lanţ special în care blocurile pot fi rezolvate instantaneu.</translation>
     </message>
     <message>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Executati comanda cand o tranzactie a portofelului se schimba (%s in cmd este inlocuit de TxID)</translation>
+        <translation>Execută comanda cînd o tranzacţie a portofelului se schimbă (%s în cmd este înlocuit de TxID)</translation>
+    </message>
+    <message>
+        <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
+        <translation>În acest mod -genproclimit controlează cîte blocuri sînt generate imediat.</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>Setează numărul de thread-uri de verificare a script-urilor (%u la %d, 0 = auto, &lt;0 = lasă atîtea nuclee libere, implicit: %d)</translation>
     </message>
     <message>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
-        <translation>Aceasta este o versiune de test preliminara - va asumati riscul folosind-o - nu folositi pentru minerit sau aplicatiile comerciantilor.</translation>
+        <translation>Aceasta este o versiune de test preliminară - vă asumaţi riscul folosind-o - nu folosiţi pentru minerit sau aplicaţiile comercianţilor</translation>
+    </message>
+    <message>
+        <source>Unable to bind to %s on this computer. Bitcoin Core is probably already running.</source>
+        <translation>Nu se poate lega la %s pe acest calculator. Nucleul Bitcoin probabil deja rulează.</translation>
     </message>
     <message>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Atentie: setarea -paytxfee este foarte ridicata! Aceasta este taxa tranzactiei pe care o vei plati daca trimiti o tranzactie.</translation>
+        <translation>Atenţie: setarea -paytxfee este foarte mare! Aceasta este taxa tranzacţiei pe care o veţi plăti dacă trimiteţi o tranzacţie.</translation>
     </message>
     <message>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
-        <translation>Atentie: Reteaua nu pare sa fie deacord in totalitate! Aparent niste mineri au probleme. </translation>
+        <translation>Atenţie: Reţeaua nu pare să fie de acord în totalitate! Aparent nişte mineri au probleme.</translation>
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Atentie: Aparent, nu suntem deacord cu toti membrii nostri! Va trebui sa faci un upgrade, sau alte noduri ar necesita upgrade. </translation>
+        <translation>Atenţie: Aparent, nu sîntem de acord cu toţi partenerii noştri! Va trebui să faceţi o actualizare, sau alte noduri necesită actualizare.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Atentie: eroare la citirea fisierului wallet.dat! Toate cheile sunt citite corect, dar datele tranzactiei sau anumite intrari din agenda sunt incorecte sau lipsesc.</translation>
+        <translation>Atenţie: eroare la citirea fişierului wallet.dat! Toate cheile sînt citite corect, dar datele tranzactiei sau anumite intrări din agenda sînt incorecte sau lipsesc.</translation>
     </message>
     <message>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
-        <translation>Atentie: fisierul wallet.dat este corupt, date salvate! Fisierul original wallet.dat a fost salvat ca wallet.{timestamp}.bak in %s; daca balansul sau tranzactiile sunt incorecte ar trebui sa restaurati dintr-o copie de siguranta. </translation>
+        <translation>Atenţie: fişierul wallet.dat este corupt, date salvate! Fişierul original wallet.dat a fost salvat ca wallet.{timestamp}.bak in %s; dacă balansul sau tranzactiile sînt incorecte ar trebui să restauraţi dintr-o copie de siguranţă.</translation>
     </message>
     <message>
         <source>(default: 1)</source>
@@ -2468,15 +2804,15 @@ Adresa: %4
     </message>
     <message>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
-        <translation>Încearcă recuperarea cheilor private dintr-un wallet.dat corupt</translation>
+        <translation>Încercare de recuperare a cheilor private dintr-un wallet.dat corupt</translation>
     </message>
     <message>
         <source>Block creation options:</source>
-        <translation>Optiuni creare block</translation>
+        <translation>Opţiuni creare bloc:</translation>
     </message>
     <message>
         <source>Connect only to the specified node(s)</source>
-        <translation>Conecteaza-te doar la nod(urile) specifice</translation>
+        <translation>Conectare doar la nod(urile) specificate</translation>
     </message>
     <message>
         <source>Connection options:</source>
@@ -2484,23 +2820,31 @@ Adresa: %4
     </message>
     <message>
         <source>Corrupted block database detected</source>
-        <translation>Baza de date 'bloc' defectată a fost detectată</translation>
+        <translation>Bloc defect din baza de date detectat</translation>
+    </message>
+    <message>
+        <source>Debugging/Testing options:</source>
+        <translation>Opţiuni Depanare/Test:</translation>
     </message>
     <message>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
-        <translation>Descopera propria ta adresa IP (intial: 1)</translation>
+        <translation>Descoperă propria adresă IP (inţial: 1)</translation>
+    </message>
+    <message>
+        <source>Do not load the wallet and disable wallet RPC calls</source>
+        <translation>Nu încarcă portofelul şi dezactivează solicitările portofel RPC</translation>
     </message>
     <message>
         <source>Do you want to rebuild the block database now?</source>
-        <translation>Doriți să reconstruiți baza de date 'bloc' acum?</translation>
+        <translation>Doriţi să reconstruiţi baza de date blocuri acum?</translation>
     </message>
     <message>
         <source>Error initializing block database</source>
-        <translation>Eroare la inițializarea bazei de date de blocuri</translation>
+        <translation>Eroare la iniţializarea bazei de date de blocuri</translation>
     </message>
     <message>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Eroare la initializarea mediului de baza de date a portofelului %s!</translation>
+        <translation>Eroare la iniţializarea mediului de bază de date a portofelului %s!</translation>
     </message>
     <message>
         <source>Error loading block database</source>
@@ -2512,43 +2856,59 @@ Adresa: %4
     </message>
     <message>
         <source>Error: Disk space is low!</source>
-        <translation>Eroare: Spațiu pe disc redus!</translation>
+        <translation>Eroare: Spaţiu pe disc redus!</translation>
     </message>
     <message>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
-        <translation>Am esuat ascultarea pe orice port. Folositi -listen=0 daca vreti asta.</translation>
+        <translation>Nu s-a reuşit ascultarea pe orice port. Folosiţi -listen=0 dacă vreţi asta.</translation>
+    </message>
+    <message>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Dacă &lt;category&gt; nu este furnizat, produce toate informaţiile de depanare.</translation>
     </message>
     <message>
         <source>Importing...</source>
-        <translation>Importare...</translation>
+        <translation>Import...</translation>
     </message>
     <message>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation>Incorect sau nici un bloc de Geneza găsite. Directorul de retea greşit?</translation>
+        <translation>Incorect sau nici un bloc de geneza găsit. Directorul de retea greşit?</translation>
     </message>
     <message>
         <source>Invalid -onion address: '%s'</source>
-        <translation>Adresa -onion invalidă: '%s'</translation>
+        <translation>Adresa -onion nevalidă: '%s'</translation>
     </message>
     <message>
         <source>Not enough file descriptors available.</source>
-        <translation>Nu sunt destule descriptoare disponibile.</translation>
+        <translation>Nu sînt destule descriptoare disponibile.</translation>
+    </message>
+    <message>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Se conectează doar la noduri în reţeaua &lt;net&gt; (ipv4, ipv6 sau onion)</translation>
     </message>
     <message>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Reconstruirea indexului lantului de block-uri din fisierele actuale blk000???.dat</translation>
+        <translation>Reconstruirea indexului lanţului de bloc din fişierele actuale blk000???.dat</translation>
+    </message>
+    <message>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>Setează mărimea bazei de date cache în megaocteţi (%d la %d, implicit: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
-        <translation>Setaţi dimensiunea maximă a unui block în bytes (implicit: %d)</translation>
+        <translation>Setaţi dimensiunea maximă a unui bloc în bytes (implicit: %d)</translation>
     </message>
     <message>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Specifică fișierul wallet (în dosarul de date)</translation>
+        <translation>Specifică fişierul portofel (în dosarul de date)</translation>
     </message>
     <message>
         <source>This is intended for regression testing tools and app development.</source>
-        <translation>Este folosita pentru programe de testare a regresiei in algoritmi si  dezvoltare de alte aplicatii. </translation>
+        <translation>Este folosită pentru programe de testare a regresiei în algoritmi şi dezvoltare de alte aplicaţii.</translation>
+    </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Foloseşte mapare UPnP pentru asculatere port (implicit: %u)</translation>
     </message>
     <message>
         <source>Verifying blocks...</source>
@@ -2564,83 +2924,199 @@ Adresa: %4
     </message>
     <message>
         <source>Wallet options:</source>
-        <translation>Optiuni de portofel</translation>
+        <translation>Opţiuni portofel:</translation>
     </message>
     <message>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
-        <translation>Trebuie să reconstruiești baza de date folosind -reindex pentru a schimba -txindex</translation>
+        <translation>Trebuie să reconstruiţi baza de date folosind -reindex pentru a schimba -txindex</translation>
     </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
-        <translation>Importă blocuri dintr-un fișier extern blk000??.dat</translation>
+        <translation>Importă blocuri dintr-un fişier extern blk000??.dat</translation>
+    </message>
+    <message>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permite conexiunile JSON-RPC din sursa specificată. Valid pentru &lt;ip&gt; sînt IP singulare (ex. 1.2.3.4), o reţea/mască-reţea (ex. 1.2.3.4/255.255.255.0) sau o reţea/CIDR (ex. 1.2.3.4/24). Această opţiune poate fi specificată de mai multe ori</translation>
+    </message>
+    <message>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>A apărut o eroare la setarea adresei RPC %s portul %u pentru ascultare: %s</translation>
+    </message>
+    <message>
+        <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
+        <translation>Nu se poate obţine blocarea folderului cu date %s. Nucleul Bitcoin probabil deja rulează.</translation>
     </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Executati comanda cand o alerta relevanta este primita sau vedem o bifurcatie foarte lunga (%s in cmd este inlocuti de mesaj)</translation>
+        <translation>Execută comanda cînd o alertă relevantă este primită sau vedem o bifurcaţie foarte lungă (%s în cmd este înlocuit de mesaj)</translation>
+    </message>
+    <message>
+        <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+        <translation>Setează mărimea pentru tranzacţiile prioritare/taxe mici în octeţi (implicit: %d)</translation>
+    </message>
+    <message>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Acest produs include programe dezvoltate de către Proiectul OpenSSL pentru a fi folosite în OpenSSL Toolkit &lt;https://www.openssl.org/&gt; şi programe criptografice scrise de către Eric Young şi programe UPnP scrise de către Thomas Bernard.</translation>
+    </message>
+    <message>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Acceptă cererile publice REST (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Conectare prin proxy SOCKS5</translation>
+    </message>
+    <message>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Dezvoltatorii Bitcoin</translation>
+    </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Eroare la citirea bazei de date. Oprire.</translation>
+    </message>
+    <message>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Eroare: Argument nesuportat -tor găsit, folosiţi -onion.</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Taxa (în BTC/kB) de adăugat la tranzacţiile pe care le trimiteţi(implicit: %s)</translation>
     </message>
     <message>
         <source>Information</source>
-        <translation>Informație</translation>
+        <translation>Informaţie</translation>
+    </message>
+    <message>
+        <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+        <translation>Nu s-a reuşit iniţierea verificării sănătăţii. Nucleul Bitcoin se opreşte.</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
+        <translation>Sumă nevalidă pentru -maxtxfee=&lt;suma&gt;: '%s'</translation>
     </message>
     <message>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Suma invalida pentru -minrelaytxfee=&lt;suma&gt;:'%s'</translation>
+        <translation>Sumă nevalidă pentru -minrelaytxfee=&lt;suma&gt;:'%s'</translation>
     </message>
     <message>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: '%s'</source>
-        <translation>Suma invalida pentru -mintxfee=&lt;suma&gt;: '%s'</translation>
+        <translation>Sumă nevalidă pentru -mintxfee=&lt;suma&gt;: '%s'</translation>
+    </message>
+    <message>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+        <translation>Sumă nevalidă pentru -paytxfee=&lt;suma&gt;: '%s' (trebuie să fie cel puţin %s)</translation>
+    </message>
+    <message>
+        <source>Invalid netmask specified in -whitelist: '%s'</source>
+        <translation>Mască reţea nevalidă specificată în -whitelist: '%s'</translation>
+    </message>
+    <message>
+        <source>Need to specify a port with -whitebind: '%s'</source>
+        <translation>Trebuie să specificaţi un port cu -whitebind: '%s'</translation>
+    </message>
+    <message>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>Opţiuni RPC SSL: (vedeţi Wiki Bitcoin pentru intrucţiunile de setare SSL)</translation>
     </message>
     <message>
         <source>RPC server options:</source>
-        <translation>Opțiuni server RPC:</translation>
+        <translation>Opţiuni server RPC:</translation>
+    </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC suportă pentru HTTP conexiuni persistente (implicit: %d)</translation>
+    </message>
+    <message>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Aleator sccapă 1 din fiecare &lt;n&gt; mesaje ale reţelei</translation>
+    </message>
+    <message>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>Aleator aproximează 1 din fiecare &lt;n&gt; mesaje ale reţelei</translation>
     </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Trimite informațiile trace/debug la consolă în locul fișierului debug.log</translation>
+        <translation>Trimite informaţiile trace/debug la consolă în locul fişierului debug.log</translation>
+    </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Trimitere tranzacţii ca tranzacţii taxă-zero dacă este posibil (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Arată toate opţiunile de depanare (uz: --help -help-debug)</translation>
     </message>
     <message>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Micsorati fisierul debug.log la inceperea clientului (implicit: 1 cand nu -debug)</translation>
+        <translation>Micşorează fişierul debug.log la pornirea clientului (implicit: 1 cînd nu se foloseşte -debug)</translation>
     </message>
     <message>
         <source>Signing transaction failed</source>
-        <translation>Semnarea tranzacției a eșuat</translation>
+        <translation>Nu s-a reuşit semnarea tranzacţiei</translation>
+    </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Acesta este un program experimental.</translation>
     </message>
     <message>
         <source>Transaction amount too small</source>
-        <translation>Suma tranzacționată este prea mică</translation>
+        <translation>Suma tranzacţionată este prea mică</translation>
     </message>
     <message>
         <source>Transaction amounts must be positive</source>
-        <translation>Sumele tranzacționate trebuie să fie pozitive</translation>
+        <translation>Sumele tranzacţionate trebuie să fie pozitive</translation>
+    </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Tranzacţie prea mare pentru politică gratis</translation>
     </message>
     <message>
         <source>Transaction too large</source>
-        <translation>Tranzacția este prea mare</translation>
+        <translation>Tranzacţie prea mare</translation>
+    </message>
+    <message>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Nu se poate lega la %s pe acest calculator. (Legarea a întors eroarea %s)</translation>
     </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
-        <translation>Foloseste UPnP pentru a vedea porturile (initial: 1 cand listezi)</translation>
+        <translation>Foloseşte UPnP pentru a vedea porturile (implicit: 1 cînd ascultă)</translation>
     </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Utilizator pentru conexiunile JSON-RPC</translation>
     </message>
+    <message>
+        <source>Wallet needed to be rewritten: restart Bitcoin Core to complete</source>
+        <translation>Portofelul necesită rescrierea: reporniţi Nucleul Bitcoin pentru completare</translation>
+    </message>
     <message>
         <source>Warning</source>
-        <translation>Avertizare</translation>
+        <translation>Avertisment</translation>
     </message>
     <message>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation>Atenție: această versiune este depășită, este necesară actualizarea!</translation>
+        <translation>Atenţie: această versiune este depăşită, este necesară actualizarea!</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Avertisment: Argument nesuportat -benchmark ignorat, folosiţi -debug=bench.</translation>
+    </message>
+    <message>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Avertisment: Argument nesuportat -debugnet ignorat, folosiţi -debug=net.</translation>
+    </message>
+    <message>
+        <source>Zapping all transactions from wallet...</source>
+        <translation>Şterge toate tranzacţiile din portofel...</translation>
     </message>
     <message>
         <source>on startup</source>
-        <translation>in timpul pornirii</translation>
+        <translation>la pornire</translation>
     </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
-        <translation>wallet.dat corupt, recuperare eșuată</translation>
+        <translation>wallet.dat corupt, salvare nereuşită</translation>
     </message>
     <message>
         <source>Password for JSON-RPC connections</source>
@@ -2648,7 +3124,7 @@ Adresa: %4
     </message>
     <message>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
-        <translation>Execută comanda când cel mai bun bloc se modifică (%s în cmd este înlocuit cu hash-ul blocului)</translation>
+        <translation>Execută comanda cînd cel mai bun bloc se modifică (%s în cmd este înlocuit cu hash-ul blocului)</translation>
     </message>
     <message>
         <source>Upgrade wallet to latest format</source>
@@ -2656,11 +3132,11 @@ Adresa: %4
     </message>
     <message>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Rescanează lanțul de bloc pentru tranzacțiile portofel lipsă</translation>
+        <translation>Rescanează lanţul de bloc pentru tranzacţiile portofel lipsă</translation>
     </message>
     <message>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
-        <translation>Folosește OpenSSL (https) pentru conexiunile JSON-RPC</translation>
+        <translation>Foloseşte OpenSSL (https) pentru conexiunile JSON-RPC</translation>
     </message>
     <message>
         <source>This help message</source>
@@ -2668,27 +3144,75 @@ Adresa: %4
     </message>
     <message>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
-        <translation>Permite căutări DNS pentru -addnode, -seednode și -connect</translation>
+        <translation>Permite căutări DNS pentru -addnode, -seednode şi -connect</translation>
     </message>
     <message>
         <source>Loading addresses...</source>
-        <translation>Încarc adrese...</translation>
+        <translation>Încărcare adrese...</translation>
     </message>
     <message>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Eroare la încărcarea wallet.dat: Portofel corupt</translation>
     </message>
+    <message>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Goleşte baza de date a activităţii din memoria pool în jurnal pe disc la fiecare &lt;n&gt; megaocteţi (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Produce toate informaţiile de depanare (implicit: %u &lt;category&gt; furnizată este opţională)</translation>
+    </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(implicit: %s)</translation>
+    </message>
+    <message>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Cifruri acceptabile (implicit: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Eroare la încărcarea wallet.dat</translation>
     </message>
+    <message>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forţează mod sigur (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generează monede (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Cîte blocuri verifică la pornire (implicit: %u, 0 = toate)</translation>
+    </message>
     <message>
         <source>Invalid -proxy address: '%s'</source>
         <translation>Adresa -proxy nevalidă: '%s'</translation>
     </message>
+    <message>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Fişierul certificat al serverului (implicit: %s)</translation>
+    </message>
+    <message>
+        <source>Server private key (default: %s)</source>
+        <translation>Cheia privată a serverului (implicit: %s)</translation>
+    </message>
+    <message>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Setare mărime minimă bloc în octeţi (implicit: %u)</translation>
+    </message>
+    <message>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Specificaţi fişierul configuraţie (implicit: %s)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Specifică fişierul pid (implicit: %s)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
-        <translation>Rețeaua specificată în -onlynet este necunoscută: '%s'</translation>
+        <translation>Reţeaua specificată în -onlynet este necunoscută: '%s'</translation>
     </message>
     <message>
         <source>Cannot resolve -bind address: '%s'</source>
@@ -2708,15 +3232,15 @@ Adresa: %4
     </message>
     <message>
         <source>Loading block index...</source>
-        <translation>Încarc indice bloc...</translation>
+        <translation>Încărcare index bloc...</translation>
     </message>
     <message>
         <source>Add a node to connect to and attempt to keep the connection open</source>
-        <translation>Adaugă un nod la care te poți conecta pentru a menține conexiunea deschisă</translation>
+        <translation>Adaugă un nod la care te poţi conecta pentru a menţine conexiunea deschisă</translation>
     </message>
     <message>
         <source>Loading wallet...</source>
-        <translation>Încarc portofel...</translation>
+        <translation>Încărcare portofel...</translation>
     </message>
     <message>
         <source>Cannot downgrade wallet</source>
@@ -2728,7 +3252,7 @@ Adresa: %4
     </message>
     <message>
         <source>Rescanning...</source>
-        <translation>Rescanez...</translation>
+        <translation>Rescanare...</translation>
     </message>
     <message>
         <source>Done loading</source>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index ec533b233c43..7c44317df59d 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1,4 +1,4 @@
-<TS language="ru" version="2.0">
+<TS language="ru" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -420,7 +420,7 @@
     </message>
     <message numerus="yes">
         <source>%n active connection(s) to Bitcoin network</source>
-        <translation><numerusform>%n активное соединение с сетью</numerusform><numerusform>%n активных соединений с сетью</numerusform><numerusform>%n активных соединений с сетью Bitcoin</numerusform></translation>
+        <translation><numerusform>%n активное соединение с сетью</numerusform><numerusform>%n активных соединений с сетью</numerusform><numerusform>%n активных соединений с сетью Bitcoin</numerusform><numerusform>%n активных соединений с сетью Bitcoin</numerusform></translation>
     </message>
     <message>
         <source>No block source available...</source>
@@ -428,15 +428,15 @@
     </message>
     <message numerus="yes">
         <source>%n hour(s)</source>
-        <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform></translation>
+        <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform><numerusform>%n часов</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n day(s)</source>
-        <translation><numerusform>%n день</numerusform><numerusform>%n дня</numerusform><numerusform>%n дней</numerusform></translation>
+        <translation><numerusform>%n день</numerusform><numerusform>%n дня</numerusform><numerusform>%n дней</numerusform><numerusform>%n дней</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation><numerusform>%n неделя</numerusform><numerusform>%n недели</numerusform><numerusform>%n недель</numerusform></translation>
+        <translation><numerusform>%n неделя</numerusform><numerusform>%n недели</numerusform><numerusform>%n недель</numerusform><numerusform>%n недель</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
@@ -444,7 +444,7 @@
     </message>
     <message numerus="yes">
         <source>%n year(s)</source>
-        <translation><numerusform>%n год</numerusform><numerusform>%n лет</numerusform><numerusform>%n года</numerusform></translation>
+        <translation><numerusform>%n год</numerusform><numerusform>%n лет</numerusform><numerusform>%n года</numerusform><numerusform>%n года</numerusform></translation>
     </message>
     <message>
         <source>%1 behind</source>
@@ -476,7 +476,7 @@
     </message>
     <message numerus="yes">
         <source>Processed %n blocks of transaction history.</source>
-        <translation><numerusform>Обработан %n блок истории транзакций.</numerusform><numerusform>Обработано %n блока истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform></translation>
+        <translation><numerusform>Обработан %n блок истории транзакций.</numerusform><numerusform>Обработано %n блока истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform></translation>
     </message>
     <message>
         <source>Catching up...</source>
@@ -914,11 +914,11 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>%n GB of free space available</source>
-        <translation><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform></translation>
+        <translation><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform><numerusform>%nГБ свободного места доступно</numerusform></translation>
     </message>
     <message numerus="yes">
         <source>(of %n GB needed)</source>
-        <translation><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform></translation>
+        <translation><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform><numerusform>(из необходимых %nГБ)</numerusform></translation>
     </message>
 </context>
 <context>
@@ -1285,8 +1285,8 @@ Address: %4
         <translation>Возврат от %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Запрос платежа %2 слишком большой (%3 байтов, разрешено %4 байтов).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Запрос платежа %1 слишком большой (%2 байтов, разрешено %3 байтов).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -2332,7 +2332,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>, broadcast through %n node(s)</source>
-        <translation><numerusform>, разослано через %n узел</numerusform><numerusform>, разослано через %n узла</numerusform><numerusform>, разослано через %n узлов</numerusform></translation>
+        <translation><numerusform>, разослано через %n узел</numerusform><numerusform>, разослано через %n узла</numerusform><numerusform>, разослано через %n узлов</numerusform><numerusform>, разослано через %n узлов</numerusform></translation>
     </message>
     <message>
         <source>Date</source>
@@ -2372,7 +2372,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>matures in %n more block(s)</source>
-        <translation><numerusform>будет доступно через %n блок</numerusform><numerusform>будет доступно через %n блока</numerusform><numerusform>будет доступно через %n блоков</numerusform></translation>
+        <translation><numerusform>будет доступно через %n блок</numerusform><numerusform>будет доступно через %n блока</numerusform><numerusform>будет доступно через %n блоков</numerusform><numerusform>будет доступно через %n блоков</numerusform></translation>
     </message>
     <message>
         <source>not accepted</source>
@@ -2448,7 +2448,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
+        <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
     </message>
     <message>
         <source>unknown</source>
@@ -2486,7 +2486,7 @@ Address: %4
     </message>
     <message numerus="yes">
         <source>Open for %n more block(s)</source>
-        <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
+        <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
     </message>
     <message>
         <source>Open until %1</source>
@@ -3074,6 +3074,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Требовать высокий приоритет для пересылки бесплатных или низкокомиссионных транзакций (по умолчанию: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Задать максимальный размер высокоприоритетных/низкокомиссионных транзакций в байтах (по умолчанию: %d)</translation>
@@ -3146,6 +3150,10 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Ошибка загрузки wallet.dat: бумажник требует более новую версию Bitcoin Core</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>
@@ -3202,6 +3210,10 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>Параметры сервера RPC:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Поддержка RPC постоянных HTTP подключений (по умолчанию: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Случайно отбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
diff --git a/src/qt/locale/bitcoin_sah.ts b/src/qt/locale/bitcoin_sah.ts
index 9ca08ee7da7b..6cc17f480afd 100644
--- a/src/qt/locale/bitcoin_sah.ts
+++ b/src/qt/locale/bitcoin_sah.ts
@@ -1,4 +1,4 @@
-<TS language="sah" version="2.0">
+<TS language="sah" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index c390d24b4c96..a017c489b652 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1,4 +1,4 @@
-<TS language="sk" version="2.0">
+<TS language="sk" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -284,11 +284,11 @@
     </message>
     <message>
         <source>&amp;Sending addresses...</source>
-        <translation>Posielajúca adresa ...</translation>
+        <translation>&amp;Odosielajúce adresy ...</translation>
     </message>
     <message>
         <source>&amp;Receiving addresses...</source>
-        <translation>Prijímajúca adresa...</translation>
+        <translation>&amp;Prijímajúce adresy...</translation>
     </message>
     <message>
         <source>Open &amp;URI...</source>
@@ -440,7 +440,7 @@
     </message>
     <message numerus="yes">
         <source>%n week(s)</source>
-        <translation><numerusform>%n týždeň</numerusform><numerusform>%n týždne</numerusform><numerusform>%n týždňov</numerusform></translation>
+        <translation><numerusform>%n týždňom</numerusform><numerusform>%n týždňami</numerusform><numerusform>%n týždňami</numerusform></translation>
     </message>
     <message>
         <source>%1 and %2</source>
@@ -460,7 +460,7 @@
     </message>
     <message>
         <source>Transactions after this will not yet be visible.</source>
-        <translation>Transakcie potom nebudú ešte viditeľné.</translation>
+        <translation>Transakcie po tomto čase ešte nebudú viditeľné.</translation>
     </message>
     <message>
         <source>Error</source>
@@ -480,7 +480,7 @@
     </message>
     <message numerus="yes">
         <source>Processed %n blocks of transaction history.</source>
-        <translation><numerusform>Spracovaný %n blok tranzakčnej histórie</numerusform><numerusform>Spracované %n bloky tranzakčnej histórie</numerusform><numerusform>Spracovaných %n blokov tranzakčnej histórie</numerusform></translation>
+        <translation><numerusform>Spracovaný %n blok transakčnej histórie.</numerusform><numerusform>Spracované %n bloky transakčnej histórie.</numerusform><numerusform>Spracovaných %n blokov transakčnej histórie.</numerusform></translation>
     </message>
     <message>
         <source>Catching up...</source>
@@ -963,7 +963,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Size of &amp;database cache</source>
-        <translation>Veľkosť vyrovnávacej pamäti databázy</translation>
+        <translation>Veľkosť vyrovnávacej pamäti &amp;databázy</translation>
     </message>
     <message>
         <source>MB</source>
@@ -971,7 +971,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Number of script &amp;verification threads</source>
-        <translation>Počet skript overujucich vlákien</translation>
+        <translation>Počet &amp;vlákien overujúcich skript</translation>
     </message>
     <message>
         <source>Accept connections from outside</source>
@@ -1023,7 +1023,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Enable coin &amp;control features</source>
-        <translation>Povoliť možnosti coin control</translation>
+        <translation>Povoliť možnosti "&amp;coin control"</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>
@@ -1041,6 +1041,14 @@ Adresa: %4</translation>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapovať port pomocou &amp;UPnP</translation>
     </message>
+    <message>
+        <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+        <translation>Pripojiť do siete Bitcoin cez proxy server SOCKS5.</translation>
+    </message>
+    <message>
+        <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+        <translation>&amp;Pripojiť cez proxy server SOCKS5 (predvolený proxy).</translation>
+    </message>
     <message>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
@@ -1142,7 +1150,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
-        <translation>Zobrazené informácie môžu byť neaktuápne. Vaša peňaženka sa automaticky synchronizuje so sieťou Bitcoin po nadviazaní spojenia ale tento proces ešte nieje ukončený.</translation>
+        <translation>Zobrazené informácie môžu byť neaktuálne. Vaša peňaženka sa automaticky synchronizuje so sieťou Bitcoin po nadviazaní spojenia, ale tento proces ešte nie je ukončený.</translation>
     </message>
     <message>
         <source>Available:</source>
@@ -1154,7 +1162,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Pending:</source>
-        <translation>Čakajúce potvrdenie</translation>
+        <translation>Čakajúce potvrdenie:</translation>
     </message>
     <message>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1168,6 +1176,10 @@ Adresa: %4</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Vytvorený zostatok ktorý ešte nedosiahol zrelosť</translation>
     </message>
+    <message>
+        <source>Balances</source>
+        <translation>Stav účtu</translation>
+    </message>
     <message>
         <source>Total:</source>
         <translation>Celkovo:</translation>
@@ -1176,6 +1188,10 @@ Adresa: %4</translation>
         <source>Your current total balance</source>
         <translation>Váš súčasný celkový zostatok</translation>
     </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Nedávne transakcie</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>nesynchronizované</translation>
@@ -1238,11 +1254,19 @@ Adresa: %4</translation>
 </context>
 <context>
     <name>PeerTableModel</name>
+    <message>
+        <source>User Agent</source>
+        <translation>Aplikácia</translation>
+    </message>
     <message>
         <source>Address/Hostname</source>
         <translation>Adresa/Názov počítača</translation>
     </message>
-    </context>
+    <message>
+        <source>Ping Time</source>
+        <translation>Čas odozvy</translation>
+    </message>
+</context>
 <context>
     <name>QObject</name>
     <message>
@@ -1319,6 +1343,10 @@ Adresa: %4</translation>
         <source>Using OpenSSL version</source>
         <translation>Používa OpenSSL verziu</translation>
     </message>
+    <message>
+        <source>Using BerkeleyDB version</source>
+        <translation>Používa BerkeleyDB verziu</translation>
+    </message>
     <message>
         <source>Startup time</source>
         <translation>Čas spustenia</translation>
@@ -1343,10 +1371,42 @@ Adresa: %4</translation>
         <source>Current number of blocks</source>
         <translation>Aktuálny počet blokov</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Prijaté</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Odoslané</translation>
+    </message>
+    <message>
+        <source>Select a peer to view detailed information.</source>
+        <translation>Vyberte počítač pre zobrazenie podrobností.</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Smer</translation>
+    </message>
     <message>
         <source>Version</source>
         <translation>Verzia</translation>
     </message>
+    <message>
+        <source>User Agent</source>
+        <translation>Aplikácia</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Služby</translation>
+    </message>
+    <message>
+        <source>Starting Height</source>
+        <translation>Počiatočná výška</translation>
+    </message>
+    <message>
+        <source>Connection Time</source>
+        <translation>Dĺžka spojenia</translation>
+    </message>
     <message>
         <source>Bytes Sent</source>
         <translation>Odoslaných bajtov</translation>
@@ -1355,6 +1415,10 @@ Adresa: %4</translation>
         <source>Bytes Received</source>
         <translation>Prijatých bajtov</translation>
     </message>
+    <message>
+        <source>Ping Time</source>
+        <translation>Čas odozvy</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Čas posledného bloku</translation>
@@ -1369,7 +1433,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>&amp;Network Traffic</source>
-        <translation>Sieťová prevádzka</translation>
+        <translation>&amp;Sieťová prevádzka</translation>
     </message>
     <message>
         <source>&amp;Clear</source>
@@ -1405,11 +1469,11 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Welcome to the Bitcoin RPC console.</source>
-        <translation>Vitajte v Bitcoin RPC konzole. Baník, pyčo!</translation>
+        <translation>Vitajte v Bitcoin RPC konzole.</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>Použi šipky hore a dolu pre navigáciu históriou a &lt;b&gt;Ctrl-L&lt;/b&gt; pre vyčistenie obrazovky.</translation>
+        <translation>Použi šípky hore a dolu pre navigáciu históriou a &lt;b&gt;Ctrl-L&lt;/b&gt; pre vyčistenie obrazovky.</translation>
     </message>
     <message>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
@@ -1431,7 +1495,19 @@ Adresa: %4</translation>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
-    </context>
+    <message>
+        <source>Inbound</source>
+        <translation>Prichádzajúce</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Odchádzajúce</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Získava sa...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1659,6 +1735,74 @@ Adresa: %4</translation>
         <source>Custom change address</source>
         <translation>Vlastná adresa zmeny</translation>
     </message>
+    <message>
+        <source>Transaction Fee:</source>
+        <translation>Poplatok za transakciu:</translation>
+    </message>
+    <message>
+        <source>collapse fee-settings</source>
+        <translation>zbaliť nastavenia poplatkov</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Minimalizovať</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Ak je poplatok nastavený na 1000 satoshi a transakcia je veľká len 250 bajtov, potom "za kilobajt" zaplatí poplatok 250 satoshi, ale "aspoň" zaplatí 1000 satoshi. Pre transakcie väčšie ako kilobajt platia oba spôsoby za každý kilobajt.</translation>
+    </message>
+    <message>
+        <source>per kilobyte</source>
+        <translation>za kilobajt</translation>
+    </message>
+    <message>
+        <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Ak je poplatok nastavený na 1000 satoshi a transakcia je veľká len 250 bajtov, potom "za kilobajt" zaplatí poplatok 250 satoshi, ale "spolu aspoň" zaplatí 1000 satoshi. Pre transakcie väčšie ako kilobajt platia oba spôsoby za každý kilobajt.</translation>
+    </message>
+    <message>
+        <source>total at least</source>
+        <translation>spolu aspoň</translation>
+    </message>
+    <message>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+        <translation>Zaplatenie len minimálneho poplatku je v poriadku, pokiaľ existuje menej transakcií ako miesta v blokoch. Uvedomte si však, že ak bude vyšší dopyt po transakciách ako dokáže sieť spracovať, môže byť vaša transakcia odsúvaná a nepotvrdená donekonečna.</translation>
+    </message>
+    <message>
+        <source>(read the tooltip)</source>
+        <translation>(prečítajte si nápovedu pod kurzorom)</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Odporúčaný:</translation>
+    </message>
+    <message>
+        <source>Custom:</source>
+        <translation>Vlastný:</translation>
+    </message>
+    <message>
+        <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+        <translation>(Automatický poplatok ešte nebol aktivovaný. Toto zvyčajne trvá niekoľko blokov...)</translation>
+    </message>
+    <message>
+        <source>Confirmation time:</source>
+        <translation>Čas potvrdenia:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normálne</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>rýchle</translation>
+    </message>
+    <message>
+        <source>Send as zero-fee transaction if possible</source>
+        <translation>Poslať ako transakciu bez poplatku, ak je to možné</translation>
+    </message>
+    <message>
+        <source>(confirmation may take longer)</source>
+        <translation>(potvrdenie môže trvať dlhšie)</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Poslať viacerým príjemcom naraz</translation>
@@ -1763,6 +1907,14 @@ Adresa: %4</translation>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transakcia bola zamietnutá! Toto sa môže stať ak niektoré coins vo vašej peňaženke už boli minuté, ako keď použijete kópiu wallet.dat a coins boli minuté z kópie ale neoznačené ako minuté tu.</translation>
     </message>
+    <message>
+        <source>A fee higher than %1 is considered an insanely high fee.</source>
+        <translation>Poplatok vyšší ako %1 je považovaný za šialene vysoký.</translation>
+    </message>
+    <message>
+        <source>Pay only the minimum fee of %1</source>
+        <translation>Zaplatiť minimálny poplatok %1</translation>
+    </message>
     <message>
         <source>Warning: Invalid Bitcoin address</source>
         <translation>Varovanie: Nesprávna Bitcoin adresa</translation>
@@ -2459,7 +2611,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Pripojiť sa k nóde, získať adresy ďaľších počítačov v sieti a odpojit sa.</translation>
+        <translation>Pripojiť sa k uzlu, získať adresy ďalších počítačov v sieti a odpojiť sa</translation>
     </message>
     <message>
         <source>Specify your own public address</source>
@@ -2521,7 +2673,7 @@ The network does not appear to fully agree! Some miners appear to be experiencin
     </message>
     <message>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Varovanie: Zjavne sa úplne nezhodujeme s našimi peer-mi! Možno potrebujete prejsť na novšiu verziu alebo ostatné nódy potrebujú vyššiu verziu.</translation>
+        <translation>Varovanie: Zjavne sa úplne nezhodujeme s našimi peer-mi! Možno potrebujete prejsť na novšiu verziu alebo ostatné uzly potrebujú vyššiu verziu.</translation>
     </message>
     <message>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -2625,7 +2777,7 @@ The network does not appear to fully agree! Some miners appear to be experiencin
     </message>
     <message>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d na %d, prednatavené: %d)</translation>
+        <translation>Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d do %d, prednastavené: %d)</translation>
     </message>
     <message>
         <source>Set maximum block size in bytes (default: %d)</source>
@@ -2667,14 +2819,46 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
         <translation>Neviem uzamknúť data adresár %s. Jadro Bitcoin je pravdepodobne už spustené.</translation>
     </message>
+    <message>
+        <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+        <translation>Chyba: Počúvanie prichádzajúcich spojení zlyhalo (vrátená chyba je %s)</translation>
+    </message>
     <message>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
-        <translation>Vykonať príkaz keď po prijatí patričné varovanie alebo vidíme veľmi dlhé rozdvojenie siete (%s v cmd je nahradené správou)</translation>
+        <translation>Vykonať príkaz po prijatí patričného varovania alebo uvidíme veľmi dlhé rozdvojenie siete (%s v cmd je nahradené správou)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Poplatky (v BTC/Kb) nižšie ako toľkoto sa považujú za nulové pri postupovaní transakcií (predvolené: %s)</translation>
+    </message>
+    <message>
+        <source>Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Poplatky (v BTC/Kb) nižšie ako toľkoto sa považujú za nulové pri vytváraní transakcií (predvolené: %s)</translation>
+    </message>
+    <message>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</translation>
+    </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Vyžadovať vysokú prioritu pre postúpenie transakcií s nízkymi poplatkami (predvolené:%u)</translation>
     </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Nastaviť najväčšiu veľkosť vysoká-dôležitosť/nízke-poplatky transakcií v bajtoch (prednastavené: %d)</translation>
     </message>
+    <message>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Pripojiť cez proxy server SOCKS5</translation>
+    </message>
+    <message>
+        <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
+        <translation>Chyba pri čítaní wallet.dat: Peňaženka vyžaduje vyššiu verziu Jadra Bitcoin</translation>
+    </message>
+    <message>
+        <source>Fee (in BTC/kB) to add to transactions you send (default: %s)</source>
+        <translation>Poplatok (v BTC/kB), ktorý sa pridá k transakciám, ktoré odosielate (predvolený: %s)</translation>
+    </message>
     <message>
         <source>Information</source>
         <translation>Informácia</translation>
@@ -2707,6 +2891,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu</translation>
     </message>
+    <message>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Poslať ako transakcie bez poplatku, ak je to možné (predvolené: %u)</translation>
+    </message>
     <message>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zobraziť všetky možnosti ladenia (použitie: --help --help-debug)</translation>
@@ -2719,6 +2907,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Signing transaction failed</source>
         <translation>Podpísanie správy zlyhalo</translation>
     </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Toto je experimentálny softvér.</translation>
+    </message>
     <message>
         <source>Transaction amount too small</source>
         <translation>Suma transakcie príliš malá</translation>
@@ -2727,6 +2919,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Transaction amounts must be positive</source>
         <translation>Hodnoty transakcie musia byť väčšie ako nula (pozitívne)</translation>
     </message>
+    <message>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transakcia je príliš veľká pre aktuálne podmienky poplatkov</translation>
+    </message>
     <message>
         <source>Transaction too large</source>
         <translation>Transakcia príliš veľká</translation>
@@ -2795,6 +2991,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Chyba načítania wallet.dat: Peňaženka je poškodená</translation>
     </message>
+    <message>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Zaznamenať prioritu transakcie a poplatok za kB pri ťažení blokov (predvolené: %u)</translation>
+    </message>
+    <message>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Použiť samostatný SOCKS5 proxy server na dosiahnutie počítačov cez skryté služby Tor (predvolené: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Chyba načítania wallet.dat</translation>
@@ -2803,6 +3007,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
         <source>Invalid -proxy address: '%s'</source>
         <translation>Neplatná adresa proxy: '%s'</translation>
     </message>
+    <message>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Udržiavať najviac &lt;n&gt; spojení s inými počítačmi (predvolené: %u)</translation>
+    </message>
     <message>
         <source>Unknown network specified in -onlynet: '%s'</source>
         <translation>Neznáma sieť upresnená v -onlynet: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index e0945cde06e2..3a65c1060420 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1,4 +1,4 @@
-<TS language="sl_SI" version="2.0">
+<TS language="sl_SI" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 2249d52136b8..82c0a61701c9 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -1,4 +1,4 @@
-<TS language="sq" version="2.0">
+<TS language="sq" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index 9f72c66d7ff2..842b3f90ab03 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -1,4 +1,4 @@
-<TS language="sr" version="2.0">
+<TS language="sr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 7d87ff89c5f4..0ed914fdcf90 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1,9 +1,9 @@
-<TS language="sv" version="2.0">
+<TS language="sv" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
         <source>Right-click to edit address or label</source>
-        <translation>Höger-klicka för att ändra adressen eller etiketten.</translation>
+        <translation>Högerklicka för att ändra adressen eller etiketten.</translation>
     </message>
     <message>
         <source>Create a new address</source>
@@ -1286,8 +1286,8 @@ Adress: %4
         <translation>Återbetalning från %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Betalningsbegäran %2 är för stor (%3 bytes, tillåten %4 bytes)</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Betalningsbegäran %1 är för stor (%2 bytes, tillåten %3 bytes)</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3079,6 +3079,11 @@ Adress: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Begär hög-prioritet för relätrafik eller lågavgifts transaktioner
+(förvalt: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Sätt den maximala storleken av hög-prioriterade/låg-avgifts transaktioner i byte (förvalt: %d)</translation>
@@ -3147,6 +3152,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>Fel vid inläsningen av wallet.dat: Kontofilen kräver en senare version av Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Error reading from database, shutting down.</source>
+        <translation>Fel vid läsning från databas, avslutar.</translation>
+    </message>
     <message>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
         <translation>Fel: Argumentet -tor stöds inte, använd -onion.</translation>
@@ -3203,6 +3212,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
         <source>RPC server options:</source>
         <translation>RPC serveroptioner:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC support för HTTP permanent anslutning (förvalt: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Slumpmässigt tappa 1 av varje &lt;n&gt; nåtverksmeddelande</translation>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index 1acf784af7ff..9535ac6a01ad 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -1,4 +1,4 @@
-<TS language="th_TH" version="2.0">
+<TS language="th_TH" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index c562d027c145..dc5762bc056e 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1,4 +1,4 @@
-<TS language="tr" version="2.0">
+<TS language="tr" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1288,10 +1288,6 @@ Adres: %4
         <source>Refund from %1</source>
         <translation>%1 öğesinden iade</translation>
     </message>
-    <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>%2 ödeme talebi çok büyüktür (%3 bayt, müsaade edilen %4 bayt).</translation>
-    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Ödeme talebi DoS koruması</translation>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index fc0db5b49acc..809f8e2d249b 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1,4 +1,4 @@
-<TS language="uk" version="2.0">
+<TS language="uk" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1288,10 +1288,6 @@ Address: %4
         <source>Refund from %1</source>
         <translation>Відшкодування з %1</translation>
     </message>
-    <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>Запит до оплати %2 занадто великий (%3 байт, дозволено %4 байт)</translation>
-    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Оплата потребує захисту DoS</translation>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index 414ff8354fd8..edf0190f57d9 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -1,4 +1,4 @@
-<TS language="ur_PK" version="2.0">
+<TS language="ur_PK" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 62d4c1322f77..54592fe9021d 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1,4 +1,4 @@
-<TS language="uz@Cyrl" version="2.0">
+<TS language="uz@Cyrl" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1387,6 +1387,26 @@ Address: %4
         <source>Requested payments history</source>
         <translation>Сўралган тўлов тарихи</translation>
     </message>
+    <message>
+        <source>&amp;Request payment</source>
+        <translation>Тўловни &amp;сўраш</translation>
+    </message>
+    <message>
+        <source>Show the selected request (does the same as double clicking an entry)</source>
+        <translation>Танланган сўровни кўрсатиш (икки марта босилганда ҳам бир хил амал бажарилсин)</translation>
+    </message>
+    <message>
+        <source>Show</source>
+        <translation>Кўрсатиш</translation>
+    </message>
+    <message>
+        <source>Remove the selected entries from the list</source>
+        <translation>Танланганларни рўйхатдан ўчириш</translation>
+    </message>
+    <message>
+        <source>Remove</source>
+        <translation>Ўчириш</translation>
+    </message>
     <message>
         <source>Copy label</source>
         <translation>Ёрликни нусхала</translation>
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index 7b362491c2bd..56962bc5ada6 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -1,4 +1,4 @@
-<TS language="vi" version="2.0">
+<TS language="vi" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index c1c51dd35f5f..0c4476b4fc32 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -1,4 +1,4 @@
-<TS language="vi_VN" version="2.0">
+<TS language="vi_VN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 5f5a32e65962..ddc8168ad936 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1,4 +1,4 @@
-<TS language="zh_CN" version="2.0">
+<TS language="zh_CN" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -1290,8 +1290,8 @@ Address: %4
         <translation>退款来自 %1</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>支付请求 %2 太大 (%3 字节。只允许 %4 字节)。</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>支付请求 %1 太大 (%2 字节。只允许 %3 字节)。</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3093,6 +3093,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>通过DNS查询每个地址，如果短地址 (默认值: 1 除非 -连接)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>对交易免费或低交易费请求高优先级 (默认:%u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>设置 高优先级/低交易费 交易的最大字节  (缺省: %d)</translation>
@@ -3165,6 +3169,10 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>加载wallet.dat错误：需要新版的比特币核心钱包</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>
@@ -3217,6 +3225,10 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>RPC 服务器选项：</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC 支持 HTTP 持久连接 (默认: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>随机每1个丢失测试&lt;n&gt;网络信息</translation>
diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts
index 7062377f45e0..dfdbb7d1da05 100644
--- a/src/qt/locale/bitcoin_zh_HK.ts
+++ b/src/qt/locale/bitcoin_zh_HK.ts
@@ -1,4 +1,4 @@
-<TS language="zh_HK" version="2.0">
+<TS language="zh_HK" version="2.1">
 <context>
     <name>AddressBookPage</name>
     </context>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index db39b3fc6b99..606eded663a2 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1,4 +1,4 @@
-<TS language="zh_TW" version="2.0">
+<TS language="zh_TW" version="2.1">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -344,11 +344,11 @@
     </message>
     <message>
         <source>&amp;Send</source>
-        <translation>付款</translation>
+        <translation>已傳送</translation>
     </message>
     <message>
         <source>&amp;Receive</source>
-        <translation>收款</translation>
+        <translation>已接收</translation>
     </message>
     <message>
         <source>Show information about Bitcoin Core</source>
@@ -804,7 +804,7 @@ Address: %4
     <name>FreespaceChecker</name>
     <message>
         <source>A new data directory will be created.</source>
-        <translation>就要造出新的資料目錄。</translation>
+        <translation>就要產生新的資料目錄。</translation>
     </message>
     <message>
         <source>name</source>
@@ -1289,8 +1289,8 @@ Address: %4
         <translation>來自 %1 的退款</translation>
     </message>
     <message>
-        <source>Payment request %2 is too large (%3 bytes, allowed %4 bytes).</source>
-        <translation>付款要求 %2 過大 (%3 位元組, 上限 %4 位元組).</translation>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>付款要求 %1 過大 (%2 位元組, 上限 %3 位元組).</translation>
     </message>
     <message>
         <source>Payment request DoS protection</source>
@@ -3083,6 +3083,10 @@ Address: %4
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>是否允許在節點位址數目不足時，使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
     </message>
+    <message>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>沒有手續費或手續費比較低的交易是否必須要是高優先權才會轉發(預設值: %u)</translation>
+    </message>
     <message>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>設定高優先度或低手續費的交易資料大小上限成多少位元組(預設值: %d)</translation>
@@ -3155,6 +3159,10 @@ rpcpassword=%s
         <source>Error loading wallet.dat: Wallet requires newer version of Bitcoin Core</source>
         <translation>載入 wallet.dat 檔案時發生錯誤: 這個錢包需要新版的位元幣核心</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>
@@ -3169,7 +3177,7 @@ rpcpassword=%s
     </message>
     <message>
         <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
-        <translation>初始化時的基本檢查失敗了。位元幣核心將會關閉。</translation>
+        <translation>初始化時的基本檢查失敗了。位元幣核心就要關閉了。</translation>
     </message>
     <message>
         <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s'</source>
@@ -3211,6 +3219,10 @@ rpcpassword=%s
         <source>RPC server options:</source>
         <translation>RPC 伺服器選項:</translation>
     </message>
+    <message>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC 是否支援 HTTP 持久連線(預設值: %d)</translation>
+    </message>
     <message>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>隨機丟掉 &lt;n&gt; 分之一的網路訊息</translation>

From 824c011d165cc352088f8e238f66b829b0e654ed Mon Sep 17 00:00:00 2001
From: Cory Fields <cory-nospam-@coryfields.com>
Date: Tue, 28 Apr 2015 11:38:50 -0400
Subject: [PATCH 1353/1819] wallet: fix boost::get usage with boost 1.58

Backport from master
---
 src/rpcrawtransaction.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 1b9b1a0e1f35..e243dae421e5 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -287,7 +287,7 @@ Value listunspent(const Array& params, bool fHelp)
         if (pk.IsPayToScriptHash()) {
             CTxDestination address;
             if (ExtractDestination(pk, address)) {
-                const CScriptID& hash = boost::get<const CScriptID&>(address);
+                const CScriptID& hash = boost::get<CScriptID>(address);
                 CScript redeemScript;
                 if (pwalletMain->GetCScript(hash, redeemScript))
                     entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));

From 4c6b9e8969654c5f26db5f81fd80efbaf994e168 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 8 May 2015 17:33:11 +0300
Subject: [PATCH 1354/1819] use tooltip for submited denoms

---
 src/qt/forms/overviewpage.ui | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index 214e1d3f0c1d..00c299c681ef 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -508,8 +508,8 @@
            </item>
            <item row="4" column="1">
             <widget class="QLabel" name="labelSubmittedDenom">
-             <property name="statusTip">
-              <string>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</string>
+             <property name="toolTip">
+              <string>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</string>
              </property>
              <property name="text">
               <string>n/a</string>

From 424ae6629bd0fcf615cc4e969742297990306dc6 Mon Sep 17 00:00:00 2001
From: Jonas Schnelli <jonas.schnelli@include7.ch>
Date: Fri, 1 May 2015 13:32:25 +0200
Subject: [PATCH 1355/1819] don't imbue boost::filesystem::path with locale "C"
 on windows

fixes https://github.com/bitcoin/bitcoin/issues/6078

Github-Pull: #6093
Rebased-From: b3ffcdf91608d4435acfb9b0a6266a4073ffaf7f 3da78490073b04f52f0136e17b07246cc37bedf1
---
 src/util.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/util.cpp b/src/util.cpp
index 4fea18b30686..3316c172a70a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -713,18 +713,20 @@ void RenameThread(const char* name)
 
 void SetupEnvironment()
 {
-    std::locale loc("C");
     // On most POSIX systems (e.g. Linux, but not BSD) the environment's locale
     // may be invalid, in which case the "C" locale is used as fallback.
 #if !defined(WIN32) && !defined(MAC_OSX) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
     try {
-        loc = std::locale(""); // Raises a runtime error if current locale is invalid
+        std::locale(""); // Raises a runtime error if current locale is invalid
     } catch (const std::runtime_error&) {
         setenv("LC_ALL", "C", 1);
     }
 #endif
-    // The path locale is lazy initialized and to avoid deinitialization errors 
+    // The path locale is lazy initialized and to avoid deinitialization errors
     // in multithreading environments, it is set explicitly by the main thread.
+    // A dummy locale is used to extract the internal default locale, used by
+    // boost::filesystem::path, which is then used to explicitly imbue the path.
+    std::locale loc = boost::filesystem::path::imbue(std::locale::classic());
     boost::filesystem::path::imbue(loc);
 }
 

From d7e772765801eb67934de8e60eab040cdb600b33 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 May 2015 16:23:53 +0200
Subject: [PATCH 1356/1819] Preparations for 0.10.2 release

---
 configure.ac           |  2 +-
 doc/Doxyfile           |  2 +-
 doc/README.md          |  2 +-
 doc/README_windows.txt |  2 +-
 doc/release-notes.md   | 39 ++++-----------------------------------
 src/clientversion.h    |  2 +-
 6 files changed, 9 insertions(+), 40 deletions(-)

diff --git a/configure.ac b/configure.ac
index 695e4665f51c..579035f59a1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
 AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 10)
-define(_CLIENT_VERSION_REVISION, 1)
+define(_CLIENT_VERSION_REVISION, 2)
 define(_CLIENT_VERSION_BUILD, 0)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
diff --git a/doc/Doxyfile b/doc/Doxyfile
index aee5dbe079a4..92b304a448ea 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -34,7 +34,7 @@ PROJECT_NAME           = Bitcoin
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.10.1
+PROJECT_NUMBER         = 0.10.2
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description 
 # for a project that appears at the top of each page and should give viewer 
diff --git a/doc/README.md b/doc/README.md
index 78a59af5b98f..effa0e86399d 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.1
+Bitcoin Core 0.10.2
 =====================
 
 Setup
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index b854505e9016..9065f4362192 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.1
+Bitcoin Core 0.10.2
 =====================
 
 Intro
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 5e939600a06d..55d6eb024e83 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,8 +1,8 @@
-Bitcoin Core version 0.10.1 is now available from:
+Bitcoin Core version 0.10.2 is now available from:
 
-  <https://bitcoin.org/bin/bitcoin-core-0.10.1/>
+  <https://bitcoin.org/bin/bitcoin-core-0.10.2/>
 
-This is a new minor version release, bringing bug fixes and translation 
+This is a new minor version release, bringing minor bug fixes and translation 
 updates. It is recommended to upgrade to this version.
 
 Please report bugs using the issue tracker at github:
@@ -50,60 +50,29 @@ This is a minor release and hence there are no notable changes.
 For the notable changes in 0.10, refer to the release notes for the
 0.10.0 release at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md
 
-0.10.1 Change log
+0.10.2 Change log
 =================
 
 Detailed release notes follow. This overview includes changes that affect external
 behavior, not code moves, refactors or string updates.
 
 RPC:
-- `7f502be` fix crash: createmultisig and addmultisigaddress
-- `eae305f` Fix missing lock in submitblock
 
 Block (database) and transaction handling:
-- `1d2cdd2` Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates
-- `c91c660` fix InvalidateBlock to repopulate setBlockIndexCandidates
-- `002c8a2` fix possible block db breakage during re-index
-- `a1f425b` Add (optional) consistency check for the block chain data structures
-- `1c62e84` Keep mempool consistent during block-reorgs
-- `57d1f46` Fix CheckBlockIndex for reindex
-- `bac6fca` Set nSequenceId when a block is fully linked
 
 P2P protocol and network code:
-- `78f64ef` don't trickle for whitelisted nodes
-- `ca301bf` Reduce fingerprinting through timestamps in 'addr' messages.
-- `200f293` Ignore getaddr messages on Outbound connections.
-- `d5d8998` Limit message sizes before transfer
-- `aeb9279` Better fingerprinting protection for non-main-chain getdatas.
-- `cf0218f` Make addrman's bucket placement deterministic (countermeasure 1 against eclipse attacks, see http://cs-people.bu.edu/heilman/eclipse/)
-- `0c6f334` Always use a 50% chance to choose between tried and new entries (countermeasure 2 against eclipse attacks)
-- `214154e` Do not bias outgoing connections towards fresh addresses (countermeasure 2 against eclipse attacks)
-- `aa587d4` Scale up addrman (countermeasure 6 against eclipse attacks)
-- `139cd81` Cap nAttempts penalty at 8 and switch to pow instead of a division loop
 
 Validation:
-- `d148f62` Acquire CCheckQueue's lock to avoid race condition
 
 Build system:
-- `8752b5c` 0.10 fix for crashes on OSX 10.6
 
 Wallet:
-- N/A
 
 GUI:
-- `2c08406` some mac specifiy cleanup (memory handling, unnecessary code)
-- `81145a6` fix OSX dock icon window reopening
-- `786cf72` fix a issue where "command line options"-action overwrite "Preference"-action (on OSX)
 
 Tests:
-- `1117378` add RPC test for InvalidateBlock
 
 Miscellaneous:
-- `c9e022b` Initialization: set Boost path locale in main thread
-- `23126a0` Sanitize command strings before logging them.
-- `323de27` Initialization: setup environment before starting QT tests
-- `7494e09` Initialization: setup environment before starting tests
-- `df45564` Initialization: set fallback locale as environment variable
 
 Credits
 =======
diff --git a/src/clientversion.h b/src/clientversion.h
index a6b5a14faf0f..e0bdea60e931 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -16,7 +16,7 @@
 //! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 10
-#define CLIENT_VERSION_REVISION 1
+#define CLIENT_VERSION_REVISION 2
 #define CLIENT_VERSION_BUILD 0
 
 //! Set to true for release, false for prerelease or test build

From 49e4d14f7587bca2785de0fd56c7dda2b0ffdfea Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 May 2015 16:33:04 +0200
Subject: [PATCH 1357/1819] Translations update

---
 src/qt/locale/bitcoin_be_BY.ts | 396 ++++++++++++++++++++++++++++++++-
 src/qt/locale/bitcoin_bg.ts    | 212 +++++++++++++++++-
 src/qt/locale/bitcoin_et.ts    | 260 +++++++++++++++++++++-
 src/qt/locale/bitcoin_fr.ts    |  16 +-
 src/qt/locale/bitcoin_pt_BR.ts |   6 +-
 5 files changed, 875 insertions(+), 15 deletions(-)

diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 41c200dc0ce6..0a048b580b73 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1,6 +1,10 @@
 <TS language="be_BY" version="2.1">
 <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>
@@ -61,10 +65,26 @@
         <source>Receiving addresses</source>
         <translation>адрасы Прымання</translation>
     </message>
+    <message>
+        <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+        <translation>Тут знаходзяцца Біткойн-адрасы для высылання плацяжоў. Заўсёды спраўджвайце колькасць і адрас прызначэння перад здзяйсненнем транзакцыі.</translation>
+    </message>
+    <message>
+        <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+        <translation>Тут знаходзяцца Біткойн-адрасы для прымання плацяжоў. Пажадана выкарыстоўваць новы адрас для кожнай транзакцыі.</translation>
+    </message>
+    <message>
+        <source>Copy &amp;Label</source>
+        <translation>Капіяваць Метку</translation>
+    </message>
     <message>
         <source>&amp;Edit</source>
         <translation>Рэдагаваць</translation>
     </message>
+    <message>
+        <source>Export Address List</source>
+        <translation>Экспартаваць Спіс Адрасоў</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Коскамі падзелены файл (*.csv)</translation>
@@ -73,7 +93,11 @@
         <source>Exporting Failed</source>
         <translation>Экспартаванне няўдалае</translation>
     </message>
-    </context>
+    <message>
+        <source>There was an error trying to save the address list to %1. Please try again.</source>
+        <translation>Адбылася памылка падчас спробы захаваць адрас у %1. Паспрабуйце зноў.</translation>
+    </message>
+</context>
 <context>
     <name>AddressTableModel</name>
     <message>
@@ -91,6 +115,10 @@
 </context>
 <context>
     <name>AskPassphraseDialog</name>
+    <message>
+        <source>Passphrase Dialog</source>
+        <translation>Дыялог сакрэтнай фразы</translation>
+    </message>
     <message>
         <source>Enter passphrase</source>
         <translation>Увядзіце кодавую фразу</translation>
@@ -143,6 +171,10 @@
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Ці ўпэўненыя вы, што жадаеце зашыфраваць свой гаманец?</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>ВАЖНА: Усе папярэднія копіі гаманца варта замяніць новым зашыфраваным файлам. У мэтах бяспекі папярэднія копіі незашыфраванага файла-гаманца стануць неўжывальнымі, калі вы станеце карыстацца новым зашыфраваным гаманцом.</translation>
+    </message>
     <message>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Увага: Caps Lock уключаны!</translation>
@@ -151,6 +183,10 @@
         <source>Wallet encrypted</source>
         <translation>Гаманец зашыфраваны</translation>
     </message>
+    <message>
+        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+        <translation>Увядзіце новы пароль для гаманца.&lt;br/&gt;Парольная фраза павинна складацца&lt;b&gt; не меньш чым з дзесяці сімвалаў&lt;/b&gt;, ці &lt;b&gt;больш чым з васьмі слоў&lt;/b&gt;.</translation>
+    </message>
     <message>
         <source>Bitcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
         <translation>Bitcoin зачыняецца дзеля завяршэння працэсса шыфравання. Памятайце, што шыфраванне гаманца цалкам абараняе вашыя сродкі ад скрадання шкоднымі праграмамі якія могуць пранікнуць у ваш камп'ютар.</translation>
@@ -238,10 +274,42 @@
         <source>&amp;Encrypt Wallet...</source>
         <translation>Зашыфраваць Гаманец...</translation>
     </message>
+    <message>
+        <source>&amp;Backup Wallet...</source>
+        <translation>Стварыць копію гаманца...</translation>
+    </message>
+    <message>
+        <source>&amp;Change Passphrase...</source>
+        <translation>&amp;Change Passphrase...</translation>
+    </message>
+    <message>
+        <source>&amp;Sending addresses...</source>
+        <translation>Адрасы дасылання...</translation>
+    </message>
+    <message>
+        <source>&amp;Receiving addresses...</source>
+        <translation>Адрасы прымання...</translation>
+    </message>
     <message>
         <source>Open &amp;URI...</source>
         <translation>Адчыниць &amp;URI...</translation>
     </message>
+    <message>
+        <source>Bitcoin Core client</source>
+        <translation>Bitcoin Core кліент</translation>
+    </message>
+    <message>
+        <source>Importing blocks from disk...</source>
+        <translation>Імпартуюцца блокі з дыску...</translation>
+    </message>
+    <message>
+        <source>Reindexing blocks on disk...</source>
+        <translation>Пераіндэксацыя блокаў на дыску...</translation>
+    </message>
+    <message>
+        <source>Send coins to a Bitcoin address</source>
+        <translation>Даслаць манеты на Біткойн-адрас</translation>
+    </message>
     <message>
         <source>Backup wallet to another location</source>
         <translation>Зрабіце копію гаманца ў іншае месца</translation>
@@ -254,6 +322,18 @@
         <source>&amp;Debug window</source>
         <translation>Вакно адладкі</translation>
     </message>
+    <message>
+        <source>Open debugging and diagnostic console</source>
+        <translation>Адкрыць кансоль дыягностыкі і адладкі</translation>
+    </message>
+    <message>
+        <source>&amp;Verify message...</source>
+        <translation>Праверыць паведамленне...</translation>
+    </message>
+    <message>
+        <source>Bitcoin</source>
+        <translation>Біткойн</translation>
+    </message>
     <message>
         <source>Wallet</source>
         <translation>Гаманец</translation>
@@ -266,6 +346,10 @@
         <source>&amp;Receive</source>
         <translation>Атрымаць</translation>
     </message>
+    <message>
+        <source>Show information about Bitcoin Core</source>
+        <translation>Паказаць інфармацыю аб Bitcoin Core</translation>
+    </message>
     <message>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Паказаць / Схаваць</translation>
@@ -278,6 +362,14 @@
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Зашыфраваць прыватныя ключы, якия належаць вашаму гаманцу</translation>
     </message>
+    <message>
+        <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+        <translation>Падпісаць паведамленне з дапамогай Біткойн-адраса каб даказаць, што яно належыць вам</translation>
+    </message>
+    <message>
+        <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+        <translation>Спраўдзіць паведамленне з дапамогай Біткойн-адраса каб даказаць, што яно належыць вам</translation>
+    </message>
     <message>
         <source>&amp;File</source>
         <translation>Ф&amp;айл</translation>
@@ -290,14 +382,58 @@
         <source>&amp;Help</source>
         <translation>Дапамога</translation>
     </message>
+    <message>
+        <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+        <translation>Запатрабаваць плацёж (генеруецца QR-код для біткойн URI)</translation>
+    </message>
+    <message>
+        <source>&amp;About Bitcoin Core</source>
+        <translation>Аб Bitcoin Core</translation>
+    </message>
+    <message>
+        <source>Show the list of used sending addresses and labels</source>
+        <translation>Паказаць спіс адрасоў і метак для дасылання</translation>
+    </message>
+    <message>
+        <source>Show the list of used receiving addresses and labels</source>
+        <translation>Паказаць спіс адрасоў і метак для прымання</translation>
+    </message>
+    <message>
+        <source>&amp;Command-line options</source>
+        <translation>Опцыі каманднага радка</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>
     </message>
+    <message>
+        <source>No block source available...</source>
+        <translation>Крыніца блокаў недасяжная...</translation>
+    </message>
+    <message>
+        <source>%1 behind</source>
+        <translation>%1 таму</translation>
+    </message>
+    <message>
+        <source>Last received block was generated %1 ago.</source>
+        <translation>Апошні прыняты блок генераваны %1 таму.</translation>
+    </message>
+    <message>
+        <source>Transactions after this will not yet be visible.</source>
+        <translation>Транзакцыи пасля гэтай не будуць бачныя.</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Памылка</translation>
     </message>
+    <message>
+        <source>Warning</source>
+        <translation>Увага</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Інфармацыя</translation>
+    </message>
     <message>
         <source>Up to date</source>
         <translation>Сінхранізавана</translation>
@@ -337,13 +473,45 @@ Address: %4
 </context>
 <context>
     <name>ClientModel</name>
-    </context>
+    <message>
+        <source>Network Alert</source>
+        <translation>Трывога Сеціва</translation>
+    </message>
+</context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Bytes:</source>
+        <translation>Байтаў:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Колькасць:</translation>
     </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Прыярытэт:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Камісія:</translation>
+    </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Пыл:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Пасля камісіі:</translation>
+    </message>
+    <message>
+        <source>Tree mode</source>
+        <translation>Рэжым дрэва</translation>
+    </message>
+    <message>
+        <source>List mode</source>
+        <translation>Рэжым спіса</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Колькасць</translation>
@@ -352,10 +520,18 @@ Address: %4
         <source>Date</source>
         <translation>Дата</translation>
     </message>
+    <message>
+        <source>Confirmations</source>
+        <translation>Пацверджанняў</translation>
+    </message>
     <message>
         <source>Confirmed</source>
         <translation>Пацверджана</translation>
     </message>
+    <message>
+        <source>Priority</source>
+        <translation>Прыярытэт</translation>
+    </message>
     <message>
         <source>Copy address</source>
         <translation>Капіяваць адрас</translation>
@@ -372,6 +548,50 @@ Address: %4
         <source>Copy transaction ID</source>
         <translation>Капіяваць ID транзакцыі</translation>
     </message>
+    <message>
+        <source>highest</source>
+        <translation>найвышэйшы</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>вышэйшы</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>высокі</translation>
+    </message>
+    <message>
+        <source>medium-high</source>
+        <translation>вышэй сярэдняга</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>сярэдні</translation>
+    </message>
+    <message>
+        <source>low-medium</source>
+        <translation>ніжэй сярэдняга</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>нізкі</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>ніжэйшы</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>найніжэйшы</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>так</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>не</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>непазначаны</translation>
@@ -433,13 +653,33 @@ Address: %4
         <source>About Bitcoin Core</source>
         <translation>Аб Bitcoin Core</translation>
     </message>
+    <message>
+        <source>Command-line options</source>
+        <translation>Опцыі каманднага радка</translation>
+    </message>
     <message>
         <source>Usage:</source>
         <translation>Ужыванне:</translation>
     </message>
+    <message>
+        <source>command-line options</source>
+        <translation>опцыі каманднага радка</translation>
+    </message>
+    <message>
+        <source>Start minimized</source>
+        <translation>Стартаваць ммінімізаванай</translation>
+    </message>
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>Вітаем</translation>
+    </message>
+    <message>
+        <source>Welcome to Bitcoin Core.</source>
+        <translation>Вітаем у Bitcoin Core.</translation>
+    </message>
     <message>
         <source>Error</source>
         <translation>Памылка</translation>
@@ -447,6 +687,10 @@ Address: %4
     </context>
 <context>
     <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation>Адкрыць URI</translation>
+    </message>
     </context>
 <context>
     <name>OptionsDialog</name>
@@ -454,6 +698,10 @@ Address: %4
         <source>Options</source>
         <translation>Опцыі</translation>
     </message>
+    <message>
+        <source>MB</source>
+        <translation>Мб</translation>
+    </message>
     </context>
 <context>
     <name>OverviewPage</name>
@@ -510,6 +758,10 @@ Address: %4
         <source>Label</source>
         <translation>Пазнака</translation>
     </message>
+    <message>
+        <source>Message</source>
+        <translation>Паведамленне</translation>
+    </message>
     </context>
 <context>
     <name>RecentRequestsTableModel</name>
@@ -521,6 +773,10 @@ Address: %4
         <source>Label</source>
         <translation>Пазнака</translation>
     </message>
+    <message>
+        <source>Message</source>
+        <translation>Паведамленне</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Колькасць</translation>
@@ -536,14 +792,34 @@ Address: %4
         <source>Send Coins</source>
         <translation>Даслаць Манеты</translation>
     </message>
+    <message>
+        <source>Bytes:</source>
+        <translation>Байтаў:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Колькасць:</translation>
     </message>
+    <message>
+        <source>Priority:</source>
+        <translation>Прыярытэт:</translation>
+    </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Камісія:</translation>
+    </message>
+    <message>
+        <source>After Fee:</source>
+        <translation>Пасля камісіі:</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Даслаць адразу некалькім атрымальнікам</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Пыл:</translation>
+    </message>
     <message>
         <source>Balance:</source>
         <translation>Баланс:</translation>
@@ -599,7 +875,11 @@ Address: %4
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
-    </context>
+    <message>
+        <source>Memo:</source>
+        <translation>Памятка:</translation>
+    </message>
+</context>
 <context>
     <name>ShutdownWindow</name>
     </context>
@@ -631,9 +911,17 @@ Address: %4
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    </context>
+    <message>
+        <source>KB/s</source>
+        <translation>Кб/с</translation>
+    </message>
+</context>
 <context>
     <name>TransactionDesc</name>
+    <message>
+        <source>%1/offline</source>
+        <translation>%1/offline</translation>
+    </message>
     <message>
         <source>%1/unconfirmed</source>
         <translation>%1/непацверджана</translation>
@@ -642,10 +930,22 @@ Address: %4
         <source>%1 confirmations</source>
         <translation>%1 пацверджанняў</translation>
     </message>
+    <message>
+        <source>Status</source>
+        <translation>Статус</translation>
+    </message>
     <message>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
+    <message>
+        <source>Message</source>
+        <translation>Паведамленне</translation>
+    </message>
+    <message>
+        <source>Comment</source>
+        <translation>Каментар</translation>
+    </message>
     <message>
         <source>Transaction ID</source>
         <translation>ID</translation>
@@ -910,14 +1210,98 @@ Address: %4
         <source>Use the test network</source>
         <translation>Ужываць тэставае сеціва</translation>
     </message>
+    <message>
+        <source>Do you want to rebuild the block database now?</source>
+        <translation>Ці жадаеце вы перабудаваць зараз базу звестак блокаў?</translation>
+    </message>
+    <message>
+        <source>Error initializing block database</source>
+        <translation>Памылка ініцыялізацыі базвы звестак блокаў</translation>
+    </message>
+    <message>
+        <source>Error initializing wallet database environment %s!</source>
+        <translation>Памалка ініцыялізацыі асяроддзя базы звестак гаманца %s!</translation>
+    </message>
+    <message>
+        <source>Error loading block database</source>
+        <translation>Памылка загрузкі базвы звестак блокаў</translation>
+    </message>
+    <message>
+        <source>Error opening block database</source>
+        <translation>Памылка адчынення базы звестак блокаў</translation>
+    </message>
+    <message>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Памылка: здарылася Фатальная унутраная памылка, глядзі debug.log для падрабязнасцяў</translation>
+    </message>
+    <message>
+        <source>Error: Disk space is low!</source>
+        <translation>Памылка: Замала вольнага месца на дыску!</translation>
+    </message>
+    <message>
+        <source>Importing...</source>
+        <translation>Імпартаванне...</translation>
+    </message>
+    <message>
+        <source>Not enough file descriptors available.</source>
+        <translation>Не хапае файлавых дэскрыптараў.</translation>
+    </message>
+    <message>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Use UPnP to map the listening port (default: %u)</translation>
+    </message>
+    <message>
+        <source>Verifying blocks...</source>
+        <translation>Праверка блокаў...</translation>
+    </message>
+    <message>
+        <source>Verifying wallet...</source>
+        <translation>Праверка гаманца...</translation>
+    </message>
+    <message>
+        <source>Wallet options:</source>
+        <translation>Опцыі гаманца:</translation>
+    </message>
+    <message>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>Імпартаванне блокаў з вонкавага blk000??.dat файла</translation>
+    </message>
+    <message>
+        <source>Information</source>
+        <translation>Інфармацыя</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>Слаць trace/debug звесткі ў кансоль замест файла debug.log</translation>
     </message>
+    <message>
+        <source>Signing transaction failed</source>
+        <translation>Памылка подпісу транзакцыі</translation>
+    </message>
+    <message>
+        <source>This is experimental software.</source>
+        <translation>Гэта эксперыментальная праграма.</translation>
+    </message>
+    <message>
+        <source>Transaction amount too small</source>
+        <translation>Транзакцыя занадта малая</translation>
+    </message>
+    <message>
+        <source>Transaction too large</source>
+        <translation>Транзакцыя занадта вялікая</translation>
+    </message>
     <message>
         <source>Username for JSON-RPC connections</source>
         <translation>Імя карыстальника для JSON-RPC злучэнняў</translation>
     </message>
+    <message>
+        <source>Warning</source>
+        <translation>Увага</translation>
+    </message>
     <message>
         <source>Password for JSON-RPC connections</source>
         <translation>Пароль для JSON-RPC злучэнняў</translation>
@@ -962,6 +1346,10 @@ Address: %4
         <source>Loading wallet...</source>
         <translation>Загружаем гаманец...</translation>
     </message>
+    <message>
+        <source>Cannot downgrade wallet</source>
+        <translation>Немагчыма рэгрэсаваць гаманец</translation>
+    </message>
     <message>
         <source>Rescanning...</source>
         <translation>Перасканаванне...</translation>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 89200ff213fc..5ef8bed6531e 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -398,6 +398,10 @@
         <source>Show the list of used receiving addresses and labels</source>
         <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>&amp;Налични команди</translation>
@@ -458,6 +462,10 @@
         <source>Up to date</source>
         <translation>Синхронизиран</translation>
     </message>
+    <message numerus="yes">
+        <source>Processed %n blocks of transaction history.</source>
+        <translation><numerusform>Обслужени %n блокове от историята с транзакции.</numerusform><numerusform>Обслужени %n блокове от историята с транзакции.</numerusform></translation>
+    </message>
     <message>
         <source>Catching up...</source>
         <translation>Зарежда блокове...</translation>
@@ -524,6 +532,10 @@ Address: %4
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Прах:</translation>
+    </message>
     <message>
         <source>After Fee:</source>
         <translation>След прилагане на ДДС</translation>
@@ -616,6 +628,10 @@ Address: %4
         <source>Copy priority</source>
         <translation>Копиране на приоритет</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Копирай прахта:</translation>
+    </message>
     <message>
         <source>Copy change</source>
         <translation>Копирай рестото</translation>
@@ -672,6 +688,10 @@ Address: %4
         <source>no</source>
         <translation>не</translation>
     </message>
+    <message>
+        <source>This means a fee of at least %1 per kB is required.</source>
+        <translation>Това означава че се изисква такса от поне %1 на килобайт.</translation>
+    </message>
     <message>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Може да варира с +-1 байт</translation>
@@ -874,10 +894,22 @@ Address: %4
         <source>MB</source>
         <translation>Мегабайта</translation>
     </message>
+    <message>
+        <source>Accept connections from outside</source>
+        <translation>Приемай връзки отвън</translation>
+    </message>
+    <message>
+        <source>Allow incoming connections</source>
+        <translation>Позволи входящите връзки</translation>
+    </message>
     <message>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP адрес на прокси (напр. за IPv4: 127.0.0.1 / за IPv6: ::1)</translation>
     </message>
+    <message>
+        <source>Third party transaction URLs</source>
+        <translation>URL адреси на трети страни</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Възстановете всички настройки по подразбиране.</translation>
@@ -970,6 +1002,10 @@ Address: %4
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Изберете единиците, показвани по подразбиране в интерфейса.</translation>
     </message>
+    <message>
+        <source>Whether to show coin control features or not.</source>
+        <translation>Дали да покаже възможностите за контрол на монетите или не.</translation>
+    </message>
     <message>
         <source>&amp;OK</source>
         <translation>ОК</translation>
@@ -1017,6 +1053,10 @@ Address: %4
         <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>Текущата информация на екрана може да не е актуална. Вашият портфейл ще се синхронизира автоматично с мрежата на Биткоин, щом поне една връзката с нея се установи; този процес все още не е приключил.</translation>
     </message>
+    <message>
+        <source>Watch-only:</source>
+        <translation>В наблюдателен режим:</translation>
+    </message>
     <message>
         <source>Available:</source>
         <translation>Налично:</translation>
@@ -1033,6 +1073,10 @@ Address: %4
         <source>Immature:</source>
         <translation>Неразвит:</translation>
     </message>
+    <message>
+        <source>Mined balance that has not yet matured</source>
+        <translation>Миниран баланс,който все още не се е развил</translation>
+    </message>
     <message>
         <source>Balances</source>
         <translation>Баланс</translation>
@@ -1060,14 +1104,50 @@ Address: %4
 </context>
 <context>
     <name>PaymentServer</name>
+    <message>
+        <source>URI handling</source>
+        <translation>Справяне с URI</translation>
+    </message>
+    <message>
+        <source>Invalid payment address %1</source>
+        <translation>Невалиден адрес на плащане %1</translation>
+    </message>
+    <message>
+        <source>Payment request rejected</source>
+        <translation>Заявката за плащане беше отхвърлена</translation>
+    </message>
+    <message>
+        <source>Payment request network doesn't match client network.</source>
+        <translation>Мрежата от която се извършва заявката за плащане не съвпада с мрежата на клиента.</translation>
+    </message>
+    <message>
+        <source>Payment request has expired.</source>
+        <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>
+    <message>
+        <source>Cannot start bitcoin: click-to-pay handler</source>
+        <translation>Биткойн не можe да се стартира: click-to-pay handler</translation>
+    </message>
+    <message>
+        <source>Payment request file handling</source>
+        <translation>Файл за справяне със заявки</translation>
+    </message>
     <message>
         <source>Refund from %1</source>
         <translation>Възстановяване на сума от %1</translation>
     </message>
+    <message>
+        <source>Payment request DoS protection</source>
+        <translation>Дос защита на заявката за плащане</translation>
+    </message>
     <message>
         <source>Error communicating with %1: %2</source>
         <translation>Грешка при комуникацията с %1: %2</translation>
@@ -1106,6 +1186,14 @@ Address: %4
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
+    <message>
+        <source>Enter a Bitcoin address (e.g. %1)</source>
+        <translation>Въведете Биткойн адрес (например: %1)</translation>
+    </message>
+    <message>
+        <source>%1 d</source>
+        <translation>%1 ден</translation>
+    </message>
     <message>
         <source>%1 h</source>
         <translation>%1 час</translation>
@@ -1244,6 +1332,30 @@ Address: %4
         <source>Services</source>
         <translation>Услуги</translation>
     </message>
+    <message>
+        <source>Starting Height</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>Изпратени байтове</translation>
+    </message>
+    <message>
+        <source>Bytes Received</source>
+        <translation>Получени байтове</translation>
+    </message>
     <message>
         <source>Ping Time</source>
         <translation>Време за отговор</translation>
@@ -1324,7 +1436,31 @@ Address: %4
         <source>%1 GB</source>
         <translation>%1 Гигабайт</translation>
     </message>
-    </context>
+    <message>
+        <source>via %1</source>
+        <translation>посредством %1</translation>
+    </message>
+    <message>
+        <source>never</source>
+        <translation>Никога</translation>
+    </message>
+    <message>
+        <source>Inbound</source>
+        <translation>Входящи</translation>
+    </message>
+    <message>
+        <source>Outbound</source>
+        <translation>Изходящи</translation>
+    </message>
+    <message>
+        <source>Unknown</source>
+        <translation>Неизвестен</translation>
+    </message>
+    <message>
+        <source>Fetching...</source>
+        <translation>Прихващане...</translation>
+    </message>
+</context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
@@ -1512,6 +1648,18 @@ Address: %4
         <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>Transaction Fee:</source>
+        <translation>Такса за транзакцията:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Избери...</translation>
+    </message>
+    <message>
+        <source>Minimize</source>
+        <translation>Минимизирай</translation>
+    </message>
     <message>
         <source>per kilobyte</source>
         <translation>за килобайт</translation>
@@ -1524,10 +1672,22 @@ Address: %4
         <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>Send to multiple recipients at once</source>
         <translation>Изпращане към повече от един получател</translation>
@@ -1540,6 +1700,10 @@ Address: %4
         <source>Clear all fields of the form.</source>
         <translation>Изчисти всички полета от формуляра.</translation>
     </message>
+    <message>
+        <source>Dust:</source>
+        <translation>Прах:</translation>
+    </message>
     <message>
         <source>Clear &amp;All</source>
         <translation>&amp;Изчисти</translation>
@@ -1636,6 +1800,10 @@ Address: %4
         <source>Warning: Unknown change address</source>
         <translation>Внимание:Неизвестен адрес за промяна</translation>
     </message>
+    <message>
+        <source>Copy dust</source>
+        <translation>Копирай прахта:</translation>
+    </message>
     <message>
         <source>Are you sure you want to send?</source>
         <translation>Наистина ли искате да изпратите?</translation>
@@ -1695,11 +1863,19 @@ Address: %4
         <source>This is a verified payment request.</source>
         <translation>Това е потвърдена транзакция.</translation>
     </message>
+    <message>
+        <source>This is an unverified payment request.</source>
+        <translation>Това е непотвърдена заявка за плащане.</translation>
+    </message>
     <message>
         <source>Pay To:</source>
         <translation>Плащане на:</translation>
     </message>
-    </context>
+    <message>
+        <source>Memo:</source>
+        <translation>Бележка:</translation>
+    </message>
+</context>
 <context>
     <name>ShutdownWindow</name>
     <message>
@@ -2290,14 +2466,30 @@ Address: %4
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: -paytxfee има голяма стойност! Това е таксата за транзакциите, която ще платите ако направите транзакция.</translation>
     </message>
+    <message>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Сложете в бял списък пиъри,свързващи се от дадената интернет маска или айпи адрес.Може да бъде заложено неколкократно.</translation>
+    </message>
     <message>
         <source>(default: 1)</source>
         <translation>(по подразбиране 1)</translation>
     </message>
+    <message>
+        <source>&lt;category&gt; can be:</source>
+        <translation>&lt;category&gt; може да бъде:</translation>
+    </message>
     <message>
         <source>Connection options:</source>
         <translation>Настройки на връзката:</translation>
     </message>
+    <message>
+        <source>Do you want to rebuild the block database now?</source>
+        <translation>Желаете ли да пресъздадете базата данни с блокове сега?</translation>
+    </message>
+    <message>
+        <source>Error initializing block database</source>
+        <translation>Грешка в пускането на базата данни с блокове</translation>
+    </message>
     <message>
         <source>Error: Disk space is low!</source>
         <translation>Грешка: мястото на диска е малко!</translation>
@@ -2322,6 +2514,14 @@ Address: %4
         <source>Wallet options:</source>
         <translation>Настройки на портфейла:</translation>
     </message>
+    <message>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Заложете броя на нишки за генерация на монети ако е включено(-1 = всички ядра, по подразбиране: %d)</translation>
+    </message>
+    <message>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Внимание: -maxtxfee има много висока стойност! Толкова високи такси могат да бъдат заплатени на една транзакция.</translation>
+    </message>
     <message>
         <source>Connect through SOCKS5 proxy</source>
         <translation>Свързване чрез SOCKS5  прокси</translation>
@@ -2418,6 +2618,14 @@ Address: %4
         <source>Specify configuration file (default: %s)</source>
         <translation>Назовете конфигурационен файл(по подразбиране %s)</translation>
     </message>
+    <message>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Задайте време на изключване при проблеми със свързването в милисекунди(минимум:1, по подразбиране %d)</translation>
+    </message>
+    <message>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Задайте pid  файл(по подразбиране: %s)</translation>
+    </message>
     <message>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
         <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: '%s'</translation>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index f1e5c2715c85..a5504e7f0d68 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -5,6 +5,10 @@
         <source>Create a new address</source>
         <translation>Loo uus aadress</translation>
     </message>
+    <message>
+        <source>&amp;New</source>
+        <translation>&amp;Uus</translation>
+    </message>
     <message>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopeeri märgistatud aadress vahemällu</translation>
@@ -13,6 +17,10 @@
         <source>&amp;Copy</source>
         <translation>&amp;Kopeeri</translation>
     </message>
+    <message>
+        <source>C&amp;lose</source>
+        <translation>S&amp;ulge</translation>
+    </message>
     <message>
         <source>&amp;Copy Address</source>
         <translation>&amp;Aadressi kopeerimine</translation>
@@ -25,10 +33,18 @@
         <source>Export the data in the current tab to a file</source>
         <translation>Ekspordi kuvatava vahelehe sisu faili</translation>
     </message>
+    <message>
+        <source>&amp;Export</source>
+        <translation>&amp;Ekspordi</translation>
+    </message>
     <message>
         <source>&amp;Delete</source>
         <translation>&amp;Kustuta</translation>
     </message>
+    <message>
+        <source>C&amp;hoose</source>
+        <translation>V&amp;ali</translation>
+    </message>
     <message>
         <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Need on sinu Bitcoini aadressid maksete saatmiseks. Müntide saatmisel kontrolli alati summat ning saaja aadressi.</translation>
@@ -45,6 +61,10 @@
         <source>Comma separated file (*.csv)</source>
         <translation>Komaeraldatud fail (*.csv)</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Eksportimine Ebaõnnestus</translation>
+    </message>
     </context>
 <context>
     <name>AddressTableModel</name>
@@ -222,6 +242,10 @@
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Salafraasi muutmine</translation>
     </message>
+    <message>
+        <source>Open &amp;URI...</source>
+        <translation>Ava &amp;URI...</translation>
+    </message>
     <message>
         <source>Importing blocks from disk...</source>
         <translation>Impordi blokid kettalt...</translation>
@@ -330,6 +354,10 @@
         <source>%n week(s)</source>
         <translation><numerusform>%n nädal</numerusform><numerusform>%n nädalat</numerusform></translation>
     </message>
+    <message>
+        <source>%1 and %2</source>
+        <translation>%1 ja %2</translation>
+    </message>
     <message>
         <source>%1 behind</source>
         <translation>%1 maas</translation>
@@ -399,10 +427,18 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>CoinControlDialog</name>
+    <message>
+        <source>Quantity:</source>
+        <translation>Kogus:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Summa:</translation>
     </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Tasu:</translation>
+    </message>
     <message>
         <source>Amount</source>
         <translation>Kogus</translation>
@@ -431,6 +467,50 @@ Aadress: %4⏎</translation>
         <source>Copy transaction ID</source>
         <translation>Kopeeri tehingu ID</translation>
     </message>
+    <message>
+        <source>Copy fee</source>
+        <translation>Kopeeri tasu</translation>
+    </message>
+    <message>
+        <source>highest</source>
+        <translation>kõrgeim</translation>
+    </message>
+    <message>
+        <source>higher</source>
+        <translation>kõrgem</translation>
+    </message>
+    <message>
+        <source>high</source>
+        <translation>kõrge</translation>
+    </message>
+    <message>
+        <source>medium</source>
+        <translation>keskmine</translation>
+    </message>
+    <message>
+        <source>low</source>
+        <translation>madal</translation>
+    </message>
+    <message>
+        <source>lower</source>
+        <translation>madalam</translation>
+    </message>
+    <message>
+        <source>lowest</source>
+        <translation>madalaim</translation>
+    </message>
+    <message>
+        <source>(%1 locked)</source>
+        <translation>(%1 lukustatud)</translation>
+    </message>
+    <message>
+        <source>yes</source>
+        <translation>jah</translation>
+    </message>
+    <message>
+        <source>no</source>
+        <translation>ei</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(silti pole)</translation>
@@ -485,6 +565,10 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>FreespaceChecker</name>
+    <message>
+        <source>name</source>
+        <translation>nimi</translation>
+    </message>
     </context>
 <context>
     <name>HelpMessageDialog</name>
@@ -531,6 +615,10 @@ Aadress: %4⏎</translation>
     </context>
 <context>
     <name>Intro</name>
+    <message>
+        <source>Welcome</source>
+        <translation>Teretulemast</translation>
+    </message>
     <message>
         <source>Bitcoin Core</source>
         <translation>Bitcoini tuumik</translation>
@@ -542,6 +630,14 @@ Aadress: %4⏎</translation>
     </context>
 <context>
     <name>OpenURIDialog</name>
+    <message>
+        <source>Open URI</source>
+        <translation>Ava URI</translation>
+    </message>
+    <message>
+        <source>URI:</source>
+        <translation>URI:</translation>
+    </message>
     </context>
 <context>
     <name>OptionsDialog</name>
@@ -557,6 +653,10 @@ Aadress: %4⏎</translation>
         <source>&amp;Start Bitcoin on system login</source>
         <translation>&amp;Start Bitcoin sisselogimisel</translation>
     </message>
+    <message>
+        <source>MB</source>
+        <translation>MB</translation>
+    </message>
     <message>
         <source>Reset all client options to default.</source>
         <translation>Taasta kõik klientprogrammi seadete vaikeväärtused.</translation>
@@ -569,6 +669,14 @@ Aadress: %4⏎</translation>
         <source>&amp;Network</source>
         <translation>&amp;Võrk</translation>
     </message>
+    <message>
+        <source>W&amp;allet</source>
+        <translation>R&amp;ahakott</translation>
+    </message>
+    <message>
+        <source>Expert</source>
+        <translation>Ekspert</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>Bitcoini kliendi pordi automaatne avamine ruuteris. Toimib, kui sinu ruuter aktsepteerib UPnP ühendust.</translation>
@@ -668,6 +776,10 @@ Aadress: %4⏎</translation>
         <source>Mined balance that has not yet matured</source>
         <translation>Mitte aegunud mine'itud jääk</translation>
     </message>
+    <message>
+        <source>Recent transactions</source>
+        <translation>Hiljutised tehingud</translation>
+    </message>
     <message>
         <source>out of sync</source>
         <translation>sünkimata</translation>
@@ -723,6 +835,10 @@ Aadress: %4⏎</translation>
         <source>&amp;Information</source>
         <translation>&amp;Informatsioon</translation>
     </message>
+    <message>
+        <source>General</source>
+        <translation>Üldine</translation>
+    </message>
     <message>
         <source>Using OpenSSL version</source>
         <translation>Kasutan OpenSSL versiooni</translation>
@@ -735,6 +851,10 @@ Aadress: %4⏎</translation>
         <source>Network</source>
         <translation>Võrgustik</translation>
     </message>
+    <message>
+        <source>Name</source>
+        <translation>Nimi</translation>
+    </message>
     <message>
         <source>Number of connections</source>
         <translation>Ühenduste arv</translation>
@@ -747,6 +867,26 @@ Aadress: %4⏎</translation>
         <source>Current number of blocks</source>
         <translation>Plokkide hetkearv</translation>
     </message>
+    <message>
+        <source>Received</source>
+        <translation>Vastuvõetud</translation>
+    </message>
+    <message>
+        <source>Sent</source>
+        <translation>Saadetud</translation>
+    </message>
+    <message>
+        <source>Direction</source>
+        <translation>Suund</translation>
+    </message>
+    <message>
+        <source>Version</source>
+        <translation>Versioon</translation>
+    </message>
+    <message>
+        <source>Services</source>
+        <translation>Teenused</translation>
+    </message>
     <message>
         <source>Last block time</source>
         <translation>Viimane ploki aeg</translation>
@@ -787,17 +927,53 @@ Aadress: %4⏎</translation>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Ülevaateks võimalikest käsklustest trüki &lt;b&gt;help&lt;/b&gt;.</translation>
     </message>
+    <message>
+        <source>%1 B</source>
+        <translation>%1 B</translation>
+    </message>
+    <message>
+        <source>%1 KB</source>
+        <translation>%1 B</translation>
+    </message>
+    <message>
+        <source>%1 MB</source>
+        <translation>%1 MB</translation>
+    </message>
+    <message>
+        <source>%1 GB</source>
+        <translation>%1 GB</translation>
+    </message>
     </context>
 <context>
     <name>ReceiveCoinsDialog</name>
+    <message>
+        <source>&amp;Amount:</source>
+        <translation>&amp;Summa:</translation>
+    </message>
     <message>
         <source>&amp;Label:</source>
         <translation>&amp;Märgis</translation>
     </message>
+    <message>
+        <source>&amp;Message:</source>
+        <translation>&amp;Sõnum:</translation>
+    </message>
+    <message>
+        <source>Show</source>
+        <translation>Näita</translation>
+    </message>
+    <message>
+        <source>Remove</source>
+        <translation>Eemalda</translation>
+    </message>
     <message>
         <source>Copy label</source>
         <translation>Märgise kopeerimine</translation>
     </message>
+    <message>
+        <source>Copy message</source>
+        <translation>Kopeeri sõnum</translation>
+    </message>
     <message>
         <source>Copy amount</source>
         <translation>Kopeeri summa</translation>
@@ -852,17 +1028,49 @@ Aadress: %4⏎</translation>
         <source>(no label)</source>
         <translation>(silti pole)</translation>
     </message>
-    </context>
+    <message>
+        <source>(no message)</source>
+        <translation>(sõnum puudub)</translation>
+    </message>
+    <message>
+        <source>(no amount)</source>
+        <translation>(summa puudub)</translation>
+    </message>
+</context>
 <context>
     <name>SendCoinsDialog</name>
     <message>
         <source>Send Coins</source>
         <translation>Müntide saatmine</translation>
     </message>
+    <message>
+        <source>Quantity:</source>
+        <translation>Kogus:</translation>
+    </message>
     <message>
         <source>Amount:</source>
         <translation>Summa:</translation>
     </message>
+    <message>
+        <source>Fee:</source>
+        <translation>Tasu:</translation>
+    </message>
+    <message>
+        <source>Choose...</source>
+        <translation>Vali...</translation>
+    </message>
+    <message>
+        <source>Recommended:</source>
+        <translation>Soovitatud:</translation>
+    </message>
+    <message>
+        <source>normal</source>
+        <translation>normaalne</translation>
+    </message>
+    <message>
+        <source>fast</source>
+        <translation>kiire</translation>
+    </message>
     <message>
         <source>Send to multiple recipients at once</source>
         <translation>Saatmine mitmele korraga</translation>
@@ -895,6 +1103,14 @@ Aadress: %4⏎</translation>
         <source>Copy amount</source>
         <translation>Kopeeri summa</translation>
     </message>
+    <message>
+        <source>Copy fee</source>
+        <translation>Kopeeri tasu</translation>
+    </message>
+    <message>
+        <source>or</source>
+        <translation>või</translation>
+    </message>
     <message>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Saaja aadress ei ole kehtiv, palun kontrolli.</translation>
@@ -1102,7 +1318,11 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>TrafficGraphWidget</name>
-    </context>
+    <message>
+        <source>KB/s</source>
+        <translation>KB/s</translation>
+    </message>
+</context>
 <context>
     <name>TransactionDesc</name>
     <message>
@@ -1398,6 +1618,10 @@ Aadress: %4⏎</translation>
         <source>Show transaction details</source>
         <translation>Kuva tehingu detailid</translation>
     </message>
+    <message>
+        <source>Exporting Failed</source>
+        <translation>Eksportimine Ebaõnnestus</translation>
+    </message>
     <message>
         <source>Comma separated file (*.csv)</source>
         <translation>Komaeraldatud fail (*.csv)</translation>
@@ -1450,6 +1674,10 @@ Aadress: %4⏎</translation>
 </context>
 <context>
     <name>WalletView</name>
+    <message>
+        <source>&amp;Export</source>
+        <translation>&amp;Ekspordi</translation>
+    </message>
     <message>
         <source>Export the data in the current tab to a file</source>
         <translation>Ekspordi kuvatava vahelehe sisu faili</translation>
@@ -1589,6 +1817,10 @@ Aadress: %4⏎</translation>
         <source>Verifying wallet...</source>
         <translation>Kontrollin rahakotti...</translation>
     </message>
+    <message>
+        <source>Wallet options:</source>
+        <translation>Rahakoti valikud:</translation>
+    </message>
     <message>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Impordi blokid välisest blk000??.dat failist</translation>
@@ -1597,6 +1829,10 @@ Aadress: %4⏎</translation>
         <source>Information</source>
         <translation>Informatsioon</translation>
     </message>
+    <message>
+        <source>RPC server options:</source>
+        <translation>RPC serveri valikud:</translation>
+    </message>
     <message>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Saada jälitus/debug, debug.log faili asemel, konsooli</translation>
@@ -1605,6 +1841,18 @@ Aadress: %4⏎</translation>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Kahanda programmi käivitamisel debug.log faili (vaikeväärtus: 1, kui ei ole -debug)</translation>
     </message>
+    <message>
+        <source>Signing transaction failed</source>
+        <translation>Tehingu allkirjastamine ebaõnnestus</translation>
+    </message>
+    <message>
+        <source>Transaction amount too small</source>
+        <translation>Tehingu summa liiga väikene</translation>
+    </message>
+    <message>
+        <source>Transaction too large</source>
+        <translation>Tehing liiga suur</translation>
+    </message>
     <message>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Kasuta kuulatava pordi määramiseks UPnP ühendust (vaikeväärtus: 1, kui kuulatakse)</translation>
@@ -1621,6 +1869,10 @@ Aadress: %4⏎</translation>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Hoiatus: versioon on aegunud, uuendus on nõutav!</translation>
     </message>
+    <message>
+        <source>on startup</source>
+        <translation>käivitamisel</translation>
+    </message>
     <message>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat fail on katki, päästmine ebaõnnestus</translation>
@@ -1661,6 +1913,10 @@ Aadress: %4⏎</translation>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Viga wallet.dat käivitamisel. Vigane rahakkott</translation>
     </message>
+    <message>
+        <source>(default: %s)</source>
+        <translation>(vaikimisi: %s)</translation>
+    </message>
     <message>
         <source>Error loading wallet.dat</source>
         <translation>Viga wallet.dat käivitamisel</translation>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index df0c507a44e8..e775f1ba045d 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -728,6 +728,10 @@ Adresse : %4
         <source>This label turns red, if the priority is smaller than "medium".</source>
         <translation>Cette étiquette devient rouge si la priorité est plus basse que « moyenne »</translation>
     </message>
+    <message>
+        <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
+        <translation>Cette étiquette devient rouge si un destinataire reçoit un montant inférieur à %1.</translation>
+    </message>
     <message>
         <source>(no label)</source>
         <translation>(aucune étiquette)</translation>
@@ -952,7 +956,7 @@ Adresse : %4
     </message>
     <message>
         <source>Automatically start Bitcoin after logging in to the system.</source>
-        <translation>Démarrer Bitcoin automatiquement après avoir ouvert une session sur l'ordinateur.</translation>
+        <translation>Démarrer Bitcoin automatiquement après avoir ouvert une session sur le système.</translation>
     </message>
     <message>
         <source>&amp;Start Bitcoin on system login</source>
@@ -1128,7 +1132,7 @@ Adresse : %4
     </message>
     <message>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation>Le client sera arrêté, voulez-vous continuer?</translation>
+        <translation>Le client sera arrêté, voulez-vous continuer ?</translation>
     </message>
     <message>
         <source>This change would require a client restart.</source>
@@ -2010,7 +2014,7 @@ Adresse : %4
     </message>
     <message>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Adresse indentique trouvée, il n'est possible d'envoyer qu'une fois à chaque adresse par opération d'envoi.</translation>
+        <translation>Adresse identique trouvée. Il n'est possible d'envoyer qu'une fois à chaque adresse,  par opération d'envoi.</translation>
     </message>
     <message>
         <source>Transaction creation failed!</source>
@@ -2155,7 +2159,7 @@ Adresse : %4
     </message>
     <message>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
-        <translation>Vous pouvez signer des messages avec vos adresses pour prouver que vous les détenez. Faites attention de ne pas signer de vague car des attaques d'hameçonnage peuvent essayer d'usurper votre identité par votre signature. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous serez d'accord.</translation>
+        <translation>Vous pouvez signer des messages avec vos adresses pour prouver que vous les détenez. Faites attention de ne rien signer de vague, car des attaques d'hameçonnage pourraient essayer de vous faire signer avec votre identité afin de l'usurper. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous êtes d'accord.</translation>
     </message>
     <message>
         <source>The Bitcoin address to sign the message with</source>
@@ -2211,7 +2215,7 @@ Adresse : %4
     </message>
     <message>
         <source>Enter the signing 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.</source>
-        <translation>Saisir ci-dessous l'adresse de signature, le message (assurez-vous d'avoir copié exactement les retours à la ligne, les espaces, tabulations etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé lui-même pour éviter d'être trompé par une attaque d'homme du milieu.</translation>
+        <translation>Saisir ci-dessous l'adresse de signature, le message (assurez-vous d'avoir copié exactement les retours à la ligne, les espaces, tabulations etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé même, pour éviter d'être trompé par une attaque d'homme du milieu.</translation>
     </message>
     <message>
         <source>The Bitcoin address the message was signed with</source>
@@ -3072,7 +3076,7 @@ Adresse : %4
     </message>
     <message>
         <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
-        <translation>Total maximal des frais à utiliser en une seule transaction de portefeuille. Le définir trop bas pourrait empêcher les grosses transactions (par défaut : %s)</translation>
+        <translation>Total maximal des frais à utiliser en une seule transaction de portefeuille. Le définir trop bas pourrait interrompre les grosses transactions (par défaut : %s)</translation>
     </message>
     <message>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index bc85f1f31609..6570ca3f507f 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -1271,6 +1271,10 @@ Endereço: %4</translation>
         <source>Refund from %1</source>
         <translation>Reembolso de %1</translation>
     </message>
+    <message>
+        <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+        <translation>Pedido de pagamento %1 é muito grande (%2 bytes, permitido %3 bytes).</translation>
+    </message>
     <message>
         <source>Payment request DoS protection</source>
         <translation>Pagamento requer proteção DoS</translation>
@@ -1837,7 +1841,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <source>Choose...</source>
-        <translation>Escolha:</translation>
+        <translation>Escolher</translation>
     </message>
     <message>
         <source>Minimize</source>

From da656068ec1f77591ae8ace78f283eb7cb74e46a Mon Sep 17 00:00:00 2001
From: Gregory Maxwell <greg@xiph.org>
Date: Tue, 28 Apr 2015 17:00:50 -0700
Subject: [PATCH 1358/1819] Avoid crash on start in TestBlockValidity with
 gen=1.

When the internal miner is enabled at the start of a new node, there
 is an near instant assert in TestBlockValidity because its attempting
 to mine a block before the top checkpoint.

Also avoids a data race around vNodes.

Github-Pull: #6123
Rebased-From: bba7c249296a9a2f444e1035fef8f8b593ba2aaf
---
 src/miner.cpp | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index ad2943142124..8efcdb91013f 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -456,8 +456,16 @@ void static BitcoinMiner(CWallet *pwallet)
             if (Params().MiningRequiresPeers()) {
                 // Busy-wait for the network to come online so we don't waste time mining
                 // on an obsolete chain. In regtest mode we expect to fly solo.
-                while (vNodes.empty())
+                do {
+                    bool fvNodesEmpty;
+                    {
+                        LOCK(cs_vNodes);
+                        fvNodesEmpty = vNodes.empty();
+                    }
+                    if (!fvNodesEmpty && !IsInitialBlockDownload())
+                        break;
                     MilliSleep(1000);
+                } while (true);
             }
 
             //
@@ -570,6 +578,11 @@ void static BitcoinMiner(CWallet *pwallet)
         LogPrintf("BitcoinMiner terminated\n");
         throw;
     }
+    catch (const std::runtime_error &e)
+    {
+        LogPrintf("BitcoinMiner runtime error: %s\n", e.what());
+        return;
+    }
 }
 
 void GenerateBitcoins(bool fGenerate, CWallet* pwallet, int nThreads)

From ff325032678df25920fe0345701f714ad2f21c61 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 12 May 2015 17:08:36 +0200
Subject: [PATCH 1359/1819] Release notes 0.10.2

---
 doc/release-notes.md | 54 ++++++++++++--------------------------------
 1 file changed, 14 insertions(+), 40 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 55d6eb024e83..9d6daa2feb09 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -46,9 +46,13 @@ This does not affect wallet forward or backward compatibility.
 Notable changes
 ===============
 
-This is a minor release and hence there are no notable changes.
-For the notable changes in 0.10, refer to the release notes for the
-0.10.0 release at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md
+This fixes a serious problem on Windows with usernames that have non-ASCII
+characters (https://github.com/bitcoin/bitcoin/issues/6078).
+
+For other platforms there are no notable changes.
+
+For the notable changes in 0.10, refer to the release notes
+at https://github.com/bitcoin/bitcoin/blob/v0.10.0/doc/release-notes.md
 
 0.10.2 Change log
 =================
@@ -56,57 +60,27 @@ For the notable changes in 0.10, refer to the release notes for the
 Detailed release notes follow. This overview includes changes that affect external
 behavior, not code moves, refactors or string updates.
 
-RPC:
-
-Block (database) and transaction handling:
-
-P2P protocol and network code:
-
-Validation:
-
-Build system:
-
 Wallet:
-
-GUI:
-
-Tests:
+- `824c011` fix boost::get usage with boost 1.58
 
 Miscellaneous:
+- `da65606` Avoid crash on start in TestBlockValidity with gen=1.
+- `424ae66` don't imbue boost::filesystem::path with locale "C" on windows (fixes #6078)
 
 Credits
 =======
 
 Thanks to everyone who directly contributed to this release:
 
-- Alex Morcos
 - Cory Fields
-- dexX7
-- fsb4000
-- Gavin Andresen
 - Gregory Maxwell
-- Ivan Pustogarov
 - Jonas Schnelli
-- Matt Corallo
-- mrbandrews
-- Pieter Wuille
-- Ruben de Vries
-- Suhas Daftuar
 - Wladimir J. van der Laan
 
 And all those who contributed additional code review and/or security research:
-- 21E14
-- Alison Kendler
-- Aviv Zohar
-- Ethan Heilman
-- Evil-Knievel
-- fanquake
-- Jeff Garzik
-- Jonas Nick
-- Luke Dashjr
-- Patrick Strateman
-- Philip Kaufmann
-- Sergio Demian Lerner
-- Sharon Goldberg
+
+- dexX7
+- Pieter Wuille
+- vayvanne
 
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).

From 40149c4e41114499c324abc313aea93a59bfa2f7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 4 May 2015 08:04:09 -0700
Subject: [PATCH 1360/1819] Budgeting Software / Reference Node Removal

- Added commands for using budgets "mnbudget" and "mnfinalbudget"
- Supports 100% decentralized budget control and view-only site with json meta data object
---
 src/activemasternode.cpp     |   3 +
 src/darksend.cpp             |  12 +-
 src/darksend.h               |   4 +
 src/hash.h                   |  54 ++
 src/init.cpp                 |  20 +-
 src/main.cpp                 |  69 ++-
 src/masternode-budget.cpp    | 933 +++++++++++++++++++++++++++--------
 src/masternode-budget.h      | 278 ++++++++++-
 src/masternode-payments.cpp  | 189 +++----
 src/masternode-payments.h    |   3 +-
 src/masternode.h             |   5 +-
 src/masternodeman.cpp        |  46 +-
 src/masternodeman.h          |   4 +-
 src/net.cpp                  |   7 +-
 src/protocol.cpp             |   1 +
 src/protocol.h               |   5 +-
 src/rpcclient.cpp            |   3 +
 src/rpcmasternode-budget.cpp | 319 ++++++++++--
 src/rpcmasternode.cpp        |   2 +-
 src/rpcserver.cpp            |   1 +
 src/rpcserver.h              |   1 +
 21 files changed, 1568 insertions(+), 391 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 26e3f993c1ec..95945bbeef5f 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -171,6 +171,7 @@ bool CActiveMasternode::Mnping(CTxIn vin, CService service, CKey keyMasternode,
         return false;
     }
 
+    mapSeenMasternodePing[mnp.GetHash()] = mnp;
     mnp.Relay();
 
     return true;
@@ -245,6 +246,8 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
     if(pmn != NULL)
     {
         CMasternodeBroadcast mnb(*pmn);
+
+        mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
         //send to all peers
         LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString().c_str());
         mnb.Relay(false);
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 73ced320c73d..dee544e7aebd 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -38,7 +38,10 @@ map<uint256, CDarksendBroadcastTx> mapDarksendBroadcastTxes;
 CActiveMasternode activeMasternode;
 
 // Count peers we've requested the list from
-int RequestedMasterNodeList = 0;
+int RequestedMasternodeAssets = 0;
+bool IsSyncingMasternodeAssets(){
+    return RequestedMasternodeAssets != MASTERNODE_LIST_SYNCED;
+}
 
 /* *** BEGIN DARKSEND MAGIC - DASH **********
     Copyright (c) 2014-2015, Dash Developers
@@ -2272,7 +2275,7 @@ void ThreadCheckDarkSendPool()
         if(c % MASTERNODES_DUMP_SECONDS == 0) DumpMasternodes();
 
         //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
-        if(c % 5 == 0 && RequestedMasterNodeList < 3){
+        if(c % 5 == 0 && RequestedMasternodeAssets <= 2){
             bool fIsInitialDownload = IsInitialBlockDownload();
             if(!fIsInitialDownload) {
                 LOCK(cs_vNodes);
@@ -2292,10 +2295,13 @@ void ThreadCheckDarkSendPool()
                         pnode->PushMessage("mnget"); //sync payees
                         pnode->PushMessage("mnvs"); //sync masternode votes
                         pnode->PushMessage("getsporks"); //get current network sporks
-                        RequestedMasterNodeList++;
+                        RequestedMasternodeAssets++;
+                        break;
                     }
                 }
             }
+        } else if(c % 60 == 0 && RequestedMasternodeAssets == 3){
+            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED; //done syncing
         }
 
         if(c % 60 == 0){
diff --git a/src/darksend.h b/src/darksend.h
index 5195479d0676..2bab2637968d 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -45,6 +45,8 @@ class CActiveMasternode;
 #define DARKSEND_RELAY_OUT                2
 #define DARKSEND_RELAY_SIG                3
 
+#define MASTERNODE_LIST_SYNCED            999
+
 static const int64_t DARKSEND_COLLATERAL = (0.01*COIN);
 static const int64_t DARKSEND_POOL_MAX = (999.99*COIN);
 
@@ -55,6 +57,8 @@ extern std::string strMasterNodePrivKey;
 extern map<uint256, CDarksendBroadcastTx> mapDarksendBroadcastTxes;
 extern CActiveMasternode activeMasternode;
 
+bool IsSyncingMasternodeAssets();
+
 // get the Darksend chain depth for a given input
 int GetInputDarksendRounds(CTxIn in, int rounds=0);
 
diff --git a/src/hash.h b/src/hash.h
index b65c61fdf7bc..ac01947fbc85 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -152,6 +152,60 @@ inline uint256 Hash(const T1 p1begin, const T1 p1end,
     return result;
 }
 
+/** Compute the 256-bit hash of the concatenation of three objects. */
+template<typename T1, typename T2, typename T3, typename T4>
+inline uint256 Hash(const T1 p1begin, const T1 p1end,
+                    const T2 p2begin, const T2 p2end,
+                    const T3 p3begin, const T3 p3end,
+                    const T4 p4begin, const T4 p4end) {
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
+              .Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
+              .Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
+              .Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 256-bit hash of the concatenation of three objects. */
+template<typename T1, typename T2, typename T3, typename T4, typename T5>
+inline uint256 Hash(const T1 p1begin, const T1 p1end,
+                    const T2 p2begin, const T2 p2end,
+                    const T3 p3begin, const T3 p3end,
+                    const T4 p4begin, const T4 p4end,
+                    const T5 p5begin, const T5 p5end) {
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
+              .Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
+              .Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
+              .Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0]))
+              .Write(p5begin == p5end ? pblank : (const unsigned char*)&p5begin[0], (p5end - p5begin) * sizeof(p5begin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
+/** Compute the 256-bit hash of the concatenation of three objects. */
+template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
+inline uint256 Hash(const T1 p1begin, const T1 p1end,
+                    const T2 p2begin, const T2 p2end,
+                    const T3 p3begin, const T3 p3end,
+                    const T4 p4begin, const T4 p4end,
+                    const T5 p5begin, const T5 p5end,
+                    const T6 p6begin, const T6 p6end) {
+    static const unsigned char pblank[1] = {};
+    uint256 result;
+    CHash256().Write(p1begin == p1end ? pblank : (const unsigned char*)&p1begin[0], (p1end - p1begin) * sizeof(p1begin[0]))
+              .Write(p2begin == p2end ? pblank : (const unsigned char*)&p2begin[0], (p2end - p2begin) * sizeof(p2begin[0]))
+              .Write(p3begin == p3end ? pblank : (const unsigned char*)&p3begin[0], (p3end - p3begin) * sizeof(p3begin[0]))
+              .Write(p4begin == p4end ? pblank : (const unsigned char*)&p4begin[0], (p4end - p4begin) * sizeof(p4begin[0]))
+              .Write(p5begin == p5end ? pblank : (const unsigned char*)&p5begin[0], (p5end - p5begin) * sizeof(p5begin[0]))
+              .Write(p6begin == p6end ? pblank : (const unsigned char*)&p6begin[0], (p6end - p6begin) * sizeof(p6begin[0]))
+              .Finalize((unsigned char*)&result);
+    return result;
+}
+
 /** Compute the 160-bit hash an object. */
 template<typename T1>
 inline uint160 Hash160(const T1 pbegin, const T1 pend)
diff --git a/src/init.cpp b/src/init.cpp
index 7897b00768e4..b897f99eac5d 100755
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1376,10 +1376,6 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     // ********************************************************* Step 10: setup DarkSend
 
-    //string strNode = "23.23.186.131";
-    //CAddress addr;
-    //ConnectNode(addr, strNode.c_str(), true);
-
     uiInterface.InitMessage(_("Loading masternode cache..."));
 
     CMasternodeDB mndb;
@@ -1395,6 +1391,22 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
+    uiInterface.InitMessage(_("Loading budget cache..."));
+
+    CBudgetDB budgetdb;
+    CBudgetDB::ReadResult readResult2 = budgetdb.Read(budget);
+    if (readResult2 == CBudgetDB::FileError)
+        LogPrintf("Missing budget cache - budget.dat, will try to recreate\n");
+    else if (readResult2 != CBudgetDB::Ok)
+    {
+        LogPrintf("Error reading budget.dat: ");
+        if(readResult2 == CBudgetDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+    }
+
+
     fMasterNode = GetBoolArg("-masternode", false);
     if(fMasterNode) {
         LogPrintf("IS DARKSEND MASTER NODE\n");
diff --git a/src/main.cpp b/src/main.cpp
index c8fef03bf2a8..52430e511bdf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1541,6 +1541,11 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees)
         for(int i = 210240; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
     }
 
+    if(nHeight > 158000+((576*30)* 7)) nSubsidy -= nSubsidy/40; // 278960 - 47.5% - 2015-06-01
+    if(nHeight > 158000+((576*30)* 9)) nSubsidy -= nSubsidy/40; // 313520 - 50.0% - 2015-08-03
+    if(nHeight > 158000+((576*30)*11)) nSubsidy -= nSubsidy/40; // 348080 - 52.5% - 2015-10-05
+    if(nHeight > 158000+((576*30)*13)) nSubsidy -= nSubsidy/40; // 382640 - 55.0% - 2015-12-07
+
     return nSubsidy + nFees;
 }
 
@@ -1566,8 +1571,8 @@ int64_t GetMasternodePayment(int nHeight, int64_t blockValue)
     if(nHeight > 158000+((576*30)* 4)) ret += blockValue / 40; // 227120 - 40.0% - 2015-02-27
     if(nHeight > 158000+((576*30)* 5)) ret += blockValue / 40; // 244400 - 42.5% - 2015-03-30
     if(nHeight > 158000+((576*30)* 6)) ret += blockValue / 40; // 261680 - 45.0% - 2015-05-01
-    if(nHeight > 158000+((576*30)* 7)) ret += blockValue / 40; // 278960 - 47.5% - 2015-06-01
-    if(nHeight > 158000+((576*30)* 9)) ret += blockValue / 40; // 313520 - 50.0% - 2015-08-03
+    if(nHeight > 158000+((576*30)*15)) ret += blockValue / 40; // 417200 - 47.5% - 2016-02-08
+    if(nHeight > 158000+((576*30)*17)) ret += blockValue / 40; // 451760 - 50.0% - 2016-04-11
 
     return ret;
 }
@@ -2928,7 +2933,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev != NULL) 
     {
-        if(masternodePayments.IsTransactionValid(block.vtx[0], pindexPrev->nHeight+1))
+        if(IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
         {
             if(Params().NetworkID() != CBaseChainParams::REGTEST) 
                 return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
@@ -3931,6 +3936,14 @@ bool static AlreadyHave(const CInv& inv)
         return true; // mapMasternodePayeeVotes.count(inv.hash);
     case MSG_MASTERNODE_SCANNING_ERROR:
         return mapMasternodeScanningErrors.count(inv.hash);
+    case MSG_BUDGET_VOTE:
+        return mapMasternodeBudgetVotes.count(inv.hash);
+    case MSG_BUDGET_PROPOSAL:
+        return mapMasternodeBudgetProposals.count(inv.hash);
+    case MSG_BUDGET_FINALIZED_VOTE:
+        return mapFinalizedBudgetVotes.count(inv.hash);
+    case MSG_BUDGET_FINALIZED:
+        return mapFinalizedBudgets.count(inv.hash);
     case MSG_MASTERNODE_ANNOUNCE:
         return mapSeenMasternodeBroadcast.count(inv.hash);
     case MSG_MASTERNODE_PING:
@@ -4103,12 +4116,54 @@ void static ProcessGetData(CNode* pfrom)
                         pushed = true;
                     }
                 }
+                
+                if (!pushed && inv.type == MSG_BUDGET_VOTE) {
+                    if(mapMasternodeBudgetVotes.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapMasternodeBudgetVotes[inv.hash];
+                        pfrom->PushMessage("mvote", ss);
+                        pushed = true;
+                    }
+                }
+
+                if (!pushed && inv.type == MSG_BUDGET_PROPOSAL) {
+                    if(mapMasternodeBudgetProposals.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapMasternodeBudgetProposals[inv.hash];
+                        pfrom->PushMessage("mprop", ss);
+                        pushed = true;
+                    }
+                }
+                
+                if (!pushed && inv.type == MSG_BUDGET_FINALIZED_VOTE) {
+                    if(mapFinalizedBudgetVotes.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapFinalizedBudgetVotes[inv.hash];
+                        pfrom->PushMessage("fbvote", ss);
+                        pushed = true;
+                    }
+                }
+
+                if (!pushed && inv.type == MSG_BUDGET_FINALIZED) {
+                    if(mapFinalizedBudgets.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss << mapFinalizedBudgets[inv.hash];
+                        pfrom->PushMessage("fbs", ss);
+                        pushed = true;
+                    }
+                }
 
                 if (!pushed && inv.type == MSG_MASTERNODE_ANNOUNCE) {
                     if(mapSeenMasternodeBroadcast.count(inv.hash)){
+                        bool fRequested = false; // Requested full masternode list
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
                         ss << mapSeenMasternodeBroadcast[inv.hash];
+                        ss << fRequested;
                         pfrom->PushMessage("mnb", ss);
                         pushed = true;
                     }
@@ -4116,9 +4171,11 @@ void static ProcessGetData(CNode* pfrom)
 
                 if (!pushed && inv.type == MSG_MASTERNODE_PING) {
                     if(mapSeenMasternodePing.count(inv.hash)){
+                        bool fRequested = false; // Requested full masternode list
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
                         ss << mapSeenMasternodePing[inv.hash];
+                        ss << fRequested;
                         pfrom->PushMessage("mnp", ss);
                         pushed = true;
                     }
@@ -4161,9 +4218,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         return true;
     }
 
-
-
-
     if (strCommand == "version")
     {
         // Each connection can only send one version message
@@ -4372,6 +4426,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "inv")
     {
+        printf("58\n");
+
         vector<CInv> vInv;
         vRecv >> vInv;
         if (vInv.size() > MAX_INV_SZ)
@@ -4397,6 +4453,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK)
                 pfrom->AskFor(inv);
 
+
             if (inv.type == MSG_BLOCK) {
                 UpdateBlockAvailability(pfrom->GetId(), inv.hash);
                 if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index ac62152c87be..6b9efabb60d5 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -14,6 +14,11 @@
 CBudgetManager budget;
 CCriticalSection cs_budget;
 
+std::map<uint256, CBudgetProposalBroadcast> mapMasternodeBudgetProposals;
+std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
+std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
+std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
+
 //
 // CBudgetDB
 //
@@ -52,7 +57,7 @@ bool CBudgetDB::Write(const CBudgetManager& budgetToSave)
 //    FileCommit(fileout);
     fileout.fclose();
 
-    LogPrintf("Written info to mncache.dat  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("Written info to budget.dat  %dms\n", GetTimeMillis() - nStart);
     //LogPrintf("  %s\n", budgetToSave.ToString().c_str());
 
     return true;
@@ -137,7 +142,7 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
 
 
     budgetToLoad.CheckAndRemove(); // clean out expired
-    LogPrintf("Loaded info from mncache.dat  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("Loaded info from budget.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", budgetToLoad.ToString());
 
     return Ok;
@@ -150,14 +155,14 @@ void DumpBudgets()
     CBudgetDB mndb;
     CBudgetManager tempbudget;
 
-    LogPrintf("Verifying mncache.dat format...\n");
+    LogPrintf("Verifying budget.dat format...\n");
     CBudgetDB::ReadResult readResult = mndb.Read(tempbudget);
     // there was an error and it was not an error on file openning => do not proceed
     if (readResult == CBudgetDB::FileError)
-        LogPrintf("Missing masternode cache file - mncache.dat, will try to recreate\n");
+        LogPrintf("Missing budget cache file - budget.dat, will try to recreate\n");
     else if (readResult != CBudgetDB::Ok)
     {
-        LogPrintf("Error reading mncache.dat: ");
+        LogPrintf("Error reading budget.dat: ");
         if(readResult == CBudgetDB::IncorrectFormat)
             LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
         else
@@ -166,63 +171,128 @@ void DumpBudgets()
             return;
         }
     }
-    LogPrintf("Writting info to mncache.dat...\n");
+    LogPrintf("Writting info to budget.dat...\n");
     mndb.Write(budget);
 
     LogPrintf("Masternode dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
+CBudgetProposal *CBudgetManager::Find(const std::string &strProposalName)
+{
+    //find the prop with the highest yes count
 
+    int nYesCount = -1;
+    CBudgetProposal* prop = NULL;
 
-CBudgetVote::CBudgetVote()
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end()){
+        if((*it).second.strProposalName == strProposalName && (*it).second.GetYeas() > nYesCount){
+            prop = &((*it).second);
+            nYesCount = prop->GetYeas();
+            return prop;
+        }
+        ++it;
+    }
+
+    if(nYesCount == 0) return NULL;
+
+    return prop;
+}
+
+void GetMasternodeBudgetEscrow(CScript& payee)
+{
+    std::string strAddress = "";
+
+    if(Params().NetworkID() == CBaseChainParams::MAIN) strAddress = "";
+    if(Params().NetworkID() == CBaseChainParams::TESTNET) strAddress = "";
+    if(Params().NetworkID() == CBaseChainParams::REGTEST) strAddress = "";
+
+    CBitcoinAddress address;
+    if (!address.SetString(strAddress))
+    {
+        LogPrintf("GetMasternodeBudgetEscrow - Invalid Masternode Budget Escrow Address\n");
+        return;
+    }
+    payee = GetScriptForDestination(address.Get());
+    return;
+}
+
+CBudgetProposal::CBudgetProposal()
 {
     vin = CTxIn();
-    nVote = VOTE_ABSTAIN;
     strProposalName = "unknown";
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
-    nTime = 0;
 }
 
-CBudgetVote::CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, int nVoteIn)
+CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
 {
 	vin = vinIn;
-	strProposalName = strProposalNameIn;
+    strProposalName = strProposalNameIn;
+    strURL = strURLIn;
 	nBlockStart = nBlockStartIn;
 	nBlockEnd = nBlockEndIn;
 	address = addressIn;
 	nAmount = nAmountIn;
-	nVote = nVoteIn;
-	nTime = GetAdjustedTime();
 }
 
-
-CBudgetVote::CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nVoteIn)
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn)
 {
     vin = vinIn;
     strProposalName = strProposalNameIn;
+    strURL = strURLIn;
 
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev != NULL) 
-    {
-        //calculate beginning of payment cycle
-        nBlockStart = (pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS));
-        //calculate the end of the cycle for this vote
-        nBlockEnd = nBlockStart + (PAYMENT_CYCLE_BLOCKS*nPaymentCount);
-        // These numbers don't require being all the same across the network due to the way 
-        // they are sampled from the votes. 
-    } else {
-        nBlockStart = 0;
-        nBlockEnd = 0;
-    }
+    nBlockStart = nBlockStartIn;
+
+    int nCycleStart = (nBlockStart-(nBlockStart % PAYMENT_CYCLE_BLOCKS));
+    //calculate the end of the cycle for this vote, add half a cycle (vote will be deleted after that block)
+    nBlockEnd = nCycleStart + (PAYMENT_CYCLE_BLOCKS*nPaymentCount) + PAYMENT_CYCLE_BLOCKS/2;
 
     address = addressIn;
     nAmount = nAmountIn;
+}
+
+CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
+{
+    vin = other.vin;
+    strProposalName = other.strProposalName;
+    strURL = other.strURL;
+    nBlockStart = other.nBlockStart;
+    nBlockEnd = other.nBlockEnd;
+    address = other.address;
+    nAmount = other.nAmount;
+}
+
+CBudgetVote::CBudgetVote()
+{
+    vin = CTxIn();
+    nProposalHash = 0;
+    nVote = VOTE_ABSTAIN;
+    nTime = 0;
+}
+
+CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
+{
+    vin = vinIn;
+    nProposalHash = nProposalHashIn;
     nVote = nVoteIn;
     nTime = GetAdjustedTime();
 }
 
+bool CBudgetProposal::IsValid()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+
+    if(pindexPrev->nHeight - nBlockStart < 0) return false;
+    if(pindexPrev->nHeight > nBlockEnd) return false;
+
+    if(nBlockEnd - PAYMENT_CYCLE_BLOCKS <= nBlockStart) return false;
+
+    return true;
+}
+
 
 bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
@@ -231,7 +301,7 @@ bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     CKey keyCollateralAddress;
 
     std::string errorMessage;
-    std::string strMessage = vin.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
+    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
         return(" Error upon calling SignMessage");
@@ -244,8 +314,7 @@ bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 
 void CBudgetVote::Relay()
 {
-    CInv inv(MSG_MASTERNODE_VOTE, GetHash());
-
+    CInv inv(MSG_BUDGET_VOTE, GetHash());
     vector<CInv> vInv;
     vInv.push_back(inv);
     LOCK(cs_vNodes);
@@ -254,12 +323,6 @@ void CBudgetVote::Relay()
     }
 }
 
-uint256 GetBudgetProposalHash(std::string strProposalName)
-{
-	return Hash(strProposalName.begin(), strProposalName.end());
-}
-
-
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
 	// lite mode is not supported
@@ -267,6 +330,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
     LOCK(cs_budget);
 
+    printf("%s\n", strCommand.c_str());
+
     if (strCommand == "mnvs") { //Masternode vote sync
         if(pfrom->HasFulfilledRequest("mnvs")) {
             LogPrintf("mnvs - peer already asked me for the list\n");
@@ -279,37 +344,161 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString().c_str());
     }
 
+    if (strCommand == "mprop") { //Masternode Proposal
+        CBudgetProposalBroadcast prop;
+        vRecv >> prop;
+
+        if(mapMasternodeBudgetProposals.count(prop.GetHash())){
+            return;
+        }
+
+        if(!prop.SignatureValid()){
+            LogPrintf("mprop - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
+        }
+
+        if(!prop.IsValid()) {
+            LogPrintf("mprop - invalid prop\n");
+            return;
+        }
+
+        CMasternode* pmn = mnodeman.Find(prop.vin);
+        if(pmn == NULL) {
+            LogPrintf("mprop - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+            return;         
+        }
+
+        mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+            CBudgetProposal p(prop);
+            budget.AddProposal(p);
+            prop.Relay();
+
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+        } else {
+            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            return;
+        }
+    }
+
     if (strCommand == "mvote") { //Masternode Vote
         CBudgetVote vote;
         vRecv >> vote;
+
+        if(mapMasternodeBudgetVotes.count(vote.GetHash())){
+            return;
+        }
+
         if(!vote.SignatureValid()){
-        	LogPrintf("mvote - signature invalid\n");
-        	Misbehaving(pfrom->GetId(), 20);
-        	return;
+            LogPrintf("mvote - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
         }
 
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
-        	LogPrintf("mvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-        	return;        	
+            LogPrintf("mvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+            return;         
         }
 
-        if(pmn->nVotedTimes < 100){
-        	budget.AddOrUpdateProposal(vote);
+        mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+        	budget.UpdateProposal(vote);
         	vote.Relay();
-        	pmn->nVotedTimes++;
+        	if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
         	LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
         	return;
         }
     }
 
+    if (strCommand == "fbs") { //Finalized Budget Suggestion
+        CFinalizedBudgetBroadcast prop;
+        vRecv >> prop;
+
+        printf("34\n");
+
+        if(mapFinalizedBudgets.count(prop.GetHash())){
+            return;
+        }
+
+        printf("36\n");
+
+        if(!prop.SignatureValid()){
+            LogPrintf("fbs - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
+        }
+
+        printf("37\n");
+
+        if(!prop.IsValid()) {
+            printf("fbs - invalid prop\n");
+            return;
+        }
+
+        printf("38\n");
+
+        CMasternode* pmn = mnodeman.Find(prop.vin);
+        if(pmn == NULL) {
+            LogPrintf("fbs - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+            return;         
+        }
+
+        mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+            printf("42\n");
+
+            CFinalizedBudget p(prop);
+            budget.AddFinalizedBudget(p);
+            prop.Relay();
+            
+            printf("43\n");
+
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+        } else {
+            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            return;
+        }
+    }
+
+    if (strCommand == "fbvote") { //Finalized Budget Vote
+        CFinalizedBudgetVote vote;
+        vRecv >> vote;
+
+        if(mapFinalizedBudgetVotes.count(vote.GetHash())){
+            return;
+        }
+
+        if(!vote.SignatureValid()){
+            LogPrintf("fbvote - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
+        }
+
+        CMasternode* pmn = mnodeman.Find(vote.vin);
+        if(pmn == NULL) {
+            LogPrintf("fbvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+            return;         
+        }
+
+        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+            budget.UpdateFinalizedBudget(vote);
+            vote.Relay();
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+        } else {
+            LogPrintf("fbvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            return;
+        }
+    }
 }
 
 bool CBudgetVote::SignatureValid()
 {
     std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
+    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
 
     CMasternode* pmn = mnodeman.Find(vin);
 
@@ -319,12 +508,6 @@ bool CBudgetVote::SignatureValid()
         return false;
     }
 
-    CScript pubkey;
-    pubkey = GetScriptForDestination(pmn->pubkey2.GetID());
-    CTxDestination address1;
-    ExtractDestination(pubkey, address1);
-    CBitcoinAddress address2(address1);
-
     if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
         LogPrintf("CBudgetVote::SignatureValid() - Verify message failed\n");
         return false;
@@ -333,19 +516,24 @@ bool CBudgetVote::SignatureValid()
     return true;
 }
 
-void CBudgetManager::AddOrUpdateProposal(CBudgetVote& vote)
+void CBudgetManager::AddProposal(CBudgetProposal& prop)
 {
     LOCK(cs);
+    if(mapProposals.count(prop.GetHash())) return;
 
-    uint256 hash = GetBudgetProposalHash(vote.strProposalName);
+    mapProposals.insert(make_pair(prop.GetHash(), prop));    
+}
 
-    if(!mapProposals.count(hash)){
-    	CBudgetProposal prop(vote.strProposalName);
-    	mapProposals.insert(make_pair(hash, prop));
+void CBudgetManager::UpdateProposal(CBudgetVote& vote)
+{
+    LOCK(cs);
+    if(!mapProposals.count(vote.nProposalHash)){
+        //LogPrintf("Unknown proposal %d\n", vote.nProposalHash);
+        //should prob ask for it
     	return;
     }
 
-  	mapProposals[hash].AddOrUpdateVote(vote);
+  	mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
 }
 
 void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
@@ -364,176 +552,95 @@ void CBudgetManager::NewBlock()
 	mnodeman.DecrementVotedTimes();
 }
 
-CBudgetProposal *CBudgetManager::Find(const std::string &strProposalName)
+double CBudgetProposal::GetRatio()
 {
-    uint256 hash = GetBudgetProposalHash(strProposalName);
-
-    if(mapProposals.count(hash)){
-    	return &mapProposals[hash];
-    }
+	int yeas = 0;
+	int nays = 0;
 
-    return NULL;
-}
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
-CBudgetProposal::CBudgetProposal()
-{
-    strProposalName = "";
-}
+    while(it != mapVotes.end()) {
+        if ((*it).second.nVote == VOTE_YES) yeas++;
+        if ((*it).second.nVote == VOTE_NO) nays++;
+        ++it;
+    }
 
-CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
-{
-    strProposalName = other.strProposalName;
-}
+    if(yeas+nays == 0) return 0.0f;
 
-CBudgetProposal::CBudgetProposal(std::string strProposalNameIn)
-{
-	strProposalName = strProposalNameIn;
+    return ((double)(yeas) / (double)(yeas+nays));
 }
 
-std::string CBudgetProposal::GetName()
+int CBudgetProposal::GetYeas()
 {
-	return strProposalName;
-}
-
-int CBudgetProposal::GetBlockStart()
-{   
-	std::map<int, int> mapList;
+	int ret = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-
-    while(it != mapVotes.end()) {
-        if ((*it).second.nVote != VOTE_YES) continue;
-
-        if(mapList.count((*it).second.nBlockStart)){
-        	mapList[(*it).second.nBlockStart]++;
-        } else {
-            mapList[(*it).second.nBlockStart] = 1;
-        }
+    while(it != mapVotes.end()){
+        if ((*it).second.nVote == VOTE_YES) ret++;
+        ++it;
     }
 
-    //sort the map and grab the highest count item
-    std::vector<std::pair<int,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
-	return vecList.begin()->second;
+    return ret;
 }
 
-int CBudgetProposal::GetBlockEnd()
+int CBudgetProposal::GetNays()
 {
-	std::map<int, int> mapList;
-    
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-
-    while(it != mapVotes.end()) {
-        if ((*it).second.nVote != VOTE_YES) continue;
+	int ret = 0;
 
-        if(mapList.count((*it).second.nBlockEnd)){
-            mapList[(*it).second.nBlockEnd]++;
-        } else {
-            mapList[(*it).second.nBlockEnd] = 1;
-        }
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    while(it != mapVotes.end()){
+        if ((*it).second.nVote == VOTE_NO) ret++;
+        ++it;
     }
 
-    //sort the map and grab the highest count item
-    std::vector<std::pair<int,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
-    return vecList.begin()->second;
+    return ret;
 }
 
-int64_t CBudgetProposal::GetAmount()
+int CBudgetProposal::GetAbstains()
 {
-	std::map<int64_t, int> mapList;
+	int ret = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-
-    while(it != mapVotes.end()) {
-        if ((*it).second.nVote != VOTE_YES) continue;
-
-        if(mapList.count((*it).second.nAmount)){
-            mapList[(*it).second.nAmount]++;
-        } else {
-            mapList[(*it).second.nAmount] = 1;
-        }
+    while(it != mapVotes.end()){
+        if ((*it).second.nVote == VOTE_ABSTAIN) ret++;
+        ++it;
     }
 
-    //sort the map and grab the highest count item
-    std::vector<std::pair<int64_t,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
-    return vecList.begin()->second;
+    return ret;
 }
 
-CScript CBudgetProposal::GetPayee()
+int CBudgetProposal::GetBlockStartCycle()
 {
-	std::map<CScript, int> mapList;
+    //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-
-    while(it != mapVotes.end()) {
-        if ((*it).second.nVote != VOTE_YES) continue;
-
-        CTxDestination address1;
-        ExtractDestination((*it).second.address, address1);
-        CBitcoinAddress address2(address1);
-
-        if(mapList.count((*it).second.address)){
-            mapList[(*it).second.address]++;
-        } else {
-            mapList[(*it).second.address] = 1;
-        }
-
-    }
-    
-    //sort the map and grab the highest count item
-    std::vector<std::pair<CScript,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
-    return vecList.begin()->second;
+    return (nBlockStart-(nBlockStart % PAYMENT_CYCLE_BLOCKS));
 }
 
-double CBudgetProposal::GetRatio()
+int CBudgetProposal::GetBlockCurrentCycle()
 {
-	int yeas = 0;
-	int nays = 0;
-
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return -1;
 
-    while(it != mapVotes.end()) {
-        if ((*it).second.nVote == VOTE_YES) yeas++;
-        if ((*it).second.nVote == VOTE_NO) nays++;
-    }
+    if(pindexPrev->nHeight >= GetBlockEndCycle()) return -1;
 
-    return ((double)yeas / (double)yeas+nays);
+    return (pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS));
 }
 
-int CBudgetProposal::GetYeas()
+int CBudgetProposal::GetBlockEndCycle()
 {
-	int ret = 0;
+    //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-    while(it != mapVotes.end())
-        if ((*it).second.nVote == VOTE_YES) ret++;
-
-    return ret;
+    return nBlockEnd-(PAYMENT_CYCLE_BLOCKS/2);
 }
 
-int CBudgetProposal::GetNays()
+int CBudgetProposal::GetPaymentCountTotal()
 {
-	int ret = 0;
-
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-    while(it != mapVotes.end())
-        if ((*it).second.nVote == VOTE_NO) ret++;
-
-    return ret;
+    return (GetBlockEndCycle()-GetBlockStartCycle())/PAYMENT_CYCLE_BLOCKS;
 }
 
-int CBudgetProposal::GetAbstains()
+int CBudgetProposal::GetPaymentCountLeft()
 {
-	int ret = 0;
-
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-    while(it != mapVotes.end())
-        if ((*it).second.nVote == VOTE_ABSTAIN) ret++;
-
-    return ret;
+    return (GetBlockEndCycle()-GetBlockCurrentCycle())/PAYMENT_CYCLE_BLOCKS;
 }
 
 bool CBudgetManager::IsBudgetPaymentBlock(int nHeight)
@@ -563,8 +670,10 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 	std::map<uint256, int> mapList;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end())
-        mapList[GetBudgetProposalHash((*it).second.strProposalName)] = (*it).second.GetYeas();
+    while(it != mapProposals.end()){
+        mapList.insert(make_pair((*it).second.GetHash(), (*it).second.GetYeas()));
+        ++it;
+    }
 
     //sort the map and grab the highest count item
     std::vector<std::pair<uint256,int> > vecList(mapList.begin(), mapList.end());
@@ -577,25 +686,27 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 	int64_t nBudgetAllocated = 0;
 	int64_t nTotalBudget = GetTotalBudget();
 
+
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
-        CBudgetProposal prop = (*it2).second;
+        CBudgetProposal* prop = &((*it2).second);
 
         if(nTotalBudget == nBudgetAllocated){
-            prop.SetAllotted(0);
-        } else if(prop.GetAmount() + nBudgetAllocated <= nTotalBudget) {
-            prop.SetAllotted(prop.GetAmount());
-            nBudgetAllocated += prop.GetAmount();
+            prop->SetAllotted(0);
+        } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
+            prop->SetAllotted(prop->GetAmount());
+            nBudgetAllocated += prop->GetAmount();
         } else {
             //couldn't pay for the entire budget, so it'll be partially paid.
-            prop.SetAllotted(nTotalBudget - nBudgetAllocated);
+            prop->SetAllotted(nTotalBudget - nBudgetAllocated);
             nBudgetAllocated = nTotalBudget;
         }
 
-    	ret.push_back(&prop);
+    	ret.push_back(prop);
+        it2++;
     }
-
+    
 	return ret;
 }
 
@@ -603,14 +714,442 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 void CBudgetManager::Sync(CNode* node)
 {
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end())
+    while(it != mapProposals.end()){
      	(*it).second.Sync(node);
+        ++it;
+    }
 
 }
 
 void CBudgetProposal::Sync(CNode* node)
 {
+    //send the proposal
+    node->PushMessage("mprop", (*this));
+
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-    while(it != mapVotes.end())
-        node->PushMessage("mvote", (*it).second);    
+    while(it != mapVotes.end()){
+        node->PushMessage("mvote", (*it).second);
+        ++it;
+    }
+}
+
+CBudgetProposalBroadcast::CBudgetProposalBroadcast()
+{
+    vin = CTxIn();
+    strProposalName = "unknown";
+    nBlockStart = 0;
+    nBlockEnd = 0;
+    nAmount = 0;
+}
+
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
+{
+    vin = other.vin;
+    strProposalName = other.strProposalName;
+    nBlockStart = other.nBlockStart;
+    nBlockEnd = other.nBlockEnd;
+    address = other.address;
+    nAmount = other.nAmount;
+}
+
+bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+{
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
+
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +  
+        boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
+
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
+
+    return true;
+}
+
+void CBudgetProposalBroadcast::Relay()
+{
+    CInv inv(MSG_BUDGET_PROPOSAL, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
+}
+
+bool CBudgetProposalBroadcast::SignatureValid()
+{
+    std::string errorMessage;
+
+    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +  
+        boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
+
+    CMasternode* pmn = mnodeman.Find(vin);
+
+    if(pmn == NULL)
+    {
+        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode\n");
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Verify message failed\n");
+        return false;
+    }
+
+    return true;
+}
+
+std::string CFinalizedBudget::GetProposals() {
+    std::string ret = "aeu";
+
+    BOOST_FOREACH(uint256& nHash, vecProposals){
+        CFinalizedBudget* prop = budget.Find(nHash);
+
+        std::string token = nHash.ToString();
+        if(prop) token = prop->GetName();
+
+        if(ret == "") {ret = token;}
+        else {ret = "," + token;}
+    }
+    return ret;
+}
+
+CFinalizedBudget *CBudgetManager::Find(uint256 nHash)
+{
+    if(mapFinalizedBudgets.count(nHash))
+        return &mapFinalizedBudgets[nHash];
+
+    return NULL;
+}
+
+
+bool CBudgetManager::PropExists(uint256 nHash)
+{
+    return mapProposals.count(nHash);
+}
+
+bool CBudgetManager::IsBudgetBlock(int nBlockHeight){    
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {   
+        CFinalizedBudget* prop = &((*it).second);
+        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+            return true;
+        }
+
+        it++;
+    }
+
+    return false;
+}
+
+bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+{
+    int nHighestCount = 0;
+    std::vector<CFinalizedBudget*> ret;
+
+    // ------- Grab The Highest Count
+    
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {   
+        CFinalizedBudget* prop = &((*it).second);
+        if(prop->GetVoteCount() > nHighestCount){
+            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+                nHighestCount = prop->GetVoteCount();
+            }
+        }
+
+        it++;
+    }
+
+    if(nHighestCount < mnodeman.CountEnabled()/20) return true;
+
+    // check the highest finalized budgets (+/- 10% to assist in consensus) 
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it2).second);
+
+        if(prop->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
+            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+                if(prop->IsTransactionValid(txNew, nBlockHeight)){
+                    return true;
+                }
+            }
+        }
+
+        it2++;
+    }
+
+    //we looked through all of the known budgets    
+    return false;
+}
+
+std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
+{
+    std::vector<CFinalizedBudget*> ret;
+
+    // ------- Grab The Budgets In Order
+    
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it2).second);
+
+        ret.push_back(prop);
+        it2++;
+    }
+    
+    return ret;
+}
+
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
+{
+    vin = CTxIn();
+    strBudgetName = "";
+    nBlockStart = 0;
+    vecProposals.clear();
+    mapVotes.clear();
+    vchSig.clear();
+}
+
+bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+{
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
+
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
+    BOOST_FOREACH(uint256& nHash, vecProposals) strMessage += nHash.ToString().c_str();
+    
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
+
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
+
+    return true;
+}
+
+bool CFinalizedBudgetBroadcast::SignatureValid()
+{
+    std::string errorMessage;
+
+    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
+    BOOST_FOREACH(uint256& nHash, vecProposals) strMessage += nHash.ToString().c_str();
+
+    CMasternode* pmn = mnodeman.Find(vin);
+
+    if(pmn == NULL)
+    {
+        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Unknown Masternode\n");
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Verify message failed\n");
+        return false;
+    }
+
+    return true;
+}
+
+bool CFinalizedBudget::IsValid()
+{
+    //must be the correct block for payment to happen (once a month)
+    if(nBlockStart % PAYMENT_CYCLE_BLOCKS != 0) return false;
+
+    if(GetBlockEnd() - nBlockStart > 100) return false;
+
+    //make sure all prop names exist
+    BOOST_FOREACH(uint256 nHash, vecProposals){
+        if(!budget.PropExists(nHash)) return false;
+    }
+
+    return true;
+}
+
+bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+{
+   /* BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
+    {
+        bool found = false;
+        BOOST_FOREACH(CTxOut out, txNew.vout)
+        {
+            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
+                found = true;
+        }
+
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
+
+            CTxDestination address1;
+            ExtractDestination(payee.scriptPubKey, address1);
+            CBitcoinAddress address2(address1);
+
+            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
+            return false;
+        }
+    }*/
+
+    return true;
+}
+
+bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+{
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
+
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
+
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
+
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
+
+    return true;
+}
+
+bool CFinalizedBudgetVote::SignatureValid()
+{
+    std::string errorMessage;
+
+    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
+
+    CMasternode* pmn = mnodeman.Find(vin);
+
+    if(pmn == NULL)
+    {
+        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Unknown Masternode\n");
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Verify message failed\n");
+        return false;
+    }
+
+    return true;
+}
+
+void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
+{
+    printf("! 1\n");
+
+    LOCK(cs);
+    if(mapFinalizedBudgets.count(prop.GetHash())) return;
+
+    printf("! 2\n");
+
+    mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));    
+
+    printf("! 3\n");
+}
+
+void CFinalizedBudgetBroadcast::Relay()
+{
+    CInv inv(MSG_BUDGET_FINALIZED, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
+}
+
+void CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote)
+{
+    LOCK(cs);
+
+    if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
+        //LogPrintf("Unknown proposal %d\n", vote.nBudgetHash);
+        return;
+    }
+
+    mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
+}
+
+void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
+{
+    LOCK(cs);
+
+    uint256 hash = vote.vin.prevout.GetHash();
+    mapVotes[hash] = vote;    
+}
+
+void CFinalizedBudgetVote::Relay()
+{
+    CInv inv(MSG_BUDGET_FINALIZED_VOTE, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
+    }
+}
+
+CFinalizedBudgetVote::CFinalizedBudgetVote()
+{
+    vin = CTxIn();
+    nBudgetHash = 0;
+    nTime = 0;
+    vchSig.clear();
+}
+
+CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
+{
+    vin = vinIn;
+    nBudgetHash = nBudgetHashIn;
+    nTime = GetAdjustedTime();
+    vchSig.clear();
+}
+
+CFinalizedBudget::CFinalizedBudget()
+{
+    vin = CTxIn();
+    strBudgetName = "";
+    nBlockStart = 0;
+    vecProposals.clear();
+    mapVotes.clear();
+}
+
+
+CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
+{
+    vin = other.vin;
+    strBudgetName = other.strBudgetName;
+    nBlockStart = other.nBlockStart;
+    vecProposals = other.vecProposals;
+    mapVotes = other.mapVotes;
+}
+
+
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(const CFinalizedBudget& other)
+{
+    vin = other.vin;
+    strBudgetName = other.strBudgetName;
+    nBlockStart = other.nBlockStart;
+    BOOST_FOREACH(uint256 hash, other.vecProposals) vecProposals.push_back(hash);
+    mapVotes = other.mapVotes;
+}
+
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<uint256> vecProposalsIn)
+{
+    vin = vinIn;
+    printf("%s\n", vin.ToString().c_str());
+    strBudgetName = strBudgetNameIn;
+    nBlockStart = nBlockStartIn;
+    BOOST_FOREACH(uint256 hash, vecProposalsIn) vecProposals.push_back(hash);
+    mapVotes.clear();
 }
\ No newline at end of file
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 28ea70391d12..b39077885d54 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -18,20 +18,29 @@
 using namespace std;
 
 class CBudgetManager;
+class CFinalizedBudgetBroadcast;
+class CFinalizedBudget;
+class CFinalizedBudgetVote;
 class CBudgetProposal;
+class CBudgetProposalBroadcast;
 class CBudgetVote;
 
 #define VOTE_ABSTAIN  0
 #define VOTE_YES      1
 #define VOTE_NO       2
 
+extern std::map<uint256, CBudgetProposalBroadcast> mapMasternodeBudgetProposals;
+extern std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
+extern std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
+extern std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
+
 //Amount of blocks in a months period of time (using 2.6 minutes per)
-#define PAYMENT_CYCLE_BLOCKS 16615
+#define PAYMENT_CYCLE_BLOCKS 16615 //(60*24*30)/2.6
 
 extern CBudgetManager budget;
 
 void DumpBudgets();
-uint256 GetBudgetProposalHash(std::string strProposalName);
+void GetMasternodeBudgetEscrow(CScript& payee);
 
 /** Save Budget Manager (budget.dat)
  */
@@ -69,25 +78,35 @@ class CBudgetManager
 public:
     // keep track of the scanning errors I've seen
     map<uint256, CBudgetProposal> mapProposals;
+    map<uint256, CFinalizedBudget> mapFinalizedBudgets;
     
     CBudgetManager() {
         mapProposals.clear();
+        mapFinalizedBudgets.clear();
     }
 
     void Sync(CNode* node);
 
     void Calculate();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
-    CBudgetProposal *Find(const std::string &strProposalName);
     void NewBlock();
+    CBudgetProposal *Find(const std::string &strProposalName);
+    CFinalizedBudget *Find(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
     
     void CleanUp();
 
     int64_t GetTotalBudget();
     std::vector<CBudgetProposal*> GetBudget();
+    std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nHeight);
-    void AddOrUpdateProposal(CBudgetVote& vote);
+    void AddProposal(CBudgetProposal& prop);
+    void UpdateProposal(CBudgetVote& vote);
+    void AddFinalizedBudget(CFinalizedBudget& prop);
+    void UpdateFinalizedBudget(CFinalizedBudgetVote& vote);
+    bool PropExists(uint256 nHash);
+    bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
+    bool IsBudgetBlock(int nBlockHeight);
 
     void Clear(){
         printf("Not implemented\n");
@@ -103,10 +122,150 @@ class CBudgetManager
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(mapMasternodeBudgetProposals);
+        READWRITE(mapMasternodeBudgetVotes);
+        READWRITE(mapFinalizedBudgets);
+        READWRITE(mapMasternodeBudgetVotes);
+
         READWRITE(mapProposals);
+        READWRITE(mapFinalizedBudgets);
+    }
+};
+
+//
+// Finalized Budget : Contains the suggested proposals to pay on a given block
+//
+
+class CFinalizedBudget
+{
+
+private:
+    // critical section to protect the inner data structures
+    mutable CCriticalSection cs;
+
+public:
+    CTxIn vin;
+    std::string strBudgetName;
+    int nBlockStart;
+    std::vector<uint256> vecProposals;
+    map<uint256, CFinalizedBudgetVote> mapVotes;
+
+    CFinalizedBudget();  
+    CFinalizedBudget(const CFinalizedBudget& other);
+
+    void Sync(CNode* node);
+
+    void Clean(CFinalizedBudgetVote& vote);
+    void AddOrUpdateVote(CFinalizedBudgetVote& vote);
+    double GetScore();
+    bool HasMinimumRequiredSupport();
+
+    bool IsValid();
+
+    std::string GetName() {return strBudgetName; }
+    std::string GetProposals();
+    int GetBlockStart() {return nBlockStart;}
+    int GetBlockEnd() {return nBlockStart + (int)(vecProposals.size()-1);}
+    std::string GetSubmittedBy() {return vin.prevout.ToStringShort();}
+    int GetVoteCount() {return (int)mapVotes.size();}
+    bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
+
+    uint256 GetHash(){
+        /* 
+            vin is not included on purpose
+                - Any masternode can make a proposal and the hashes should match regardless of who made it. 
+                - Someone could hyjack a new proposal by changing the vin and the signature check will fail. 
+                  However, the network will still propagate the correct version and the incorrect one will be rejected. 
+        */
+                
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << strBudgetName;
+        ss << nBlockStart;
+        ss << vecProposals;
+
+        uint256 h1 = ss.GetHash();        
+        return h1;
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    //for saving to the serialized db
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(LIMITED_STRING(strBudgetName, 20));
+        READWRITE(vin);
+        READWRITE(nBlockStart);
+        READWRITE(vecProposals);
+
+        READWRITE(mapVotes);
     }
 };
 
+// FinalizedBudget are cast then sent to peers with this object, which leaves the votes out
+class CFinalizedBudgetBroadcast : public CFinalizedBudget
+{
+private:
+    std::vector<unsigned char> vchSig;
+    
+public:
+    CFinalizedBudgetBroadcast();
+    CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
+    CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<uint256> vecProposalsIn);
+
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    bool SignatureValid();
+    void Relay();
+
+    ADD_SERIALIZE_METHODS;
+
+    //for propagating messages
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        //for syncing with other clients
+        READWRITE(LIMITED_STRING(strBudgetName, 20));
+        READWRITE(vin);
+        READWRITE(nBlockStart);
+        READWRITE(vecProposals);
+        READWRITE(vchSig);
+    }  
+};
+
+//
+// CFinalizedBudgetVote - Allow a masternode node to vote and broadcast throughout the network
+//
+
+class CFinalizedBudgetVote
+{
+public:
+    CTxIn vin;
+    uint256 nBudgetHash;
+    int64_t nTime;
+    std::vector<unsigned char> vchSig;
+
+    CFinalizedBudgetVote();
+    CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn);
+
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    bool SignatureValid();
+    void Relay();
+
+    uint256 GetHash(){
+        return Hash(BEGIN(vin), END(vin), BEGIN(nBudgetHash), END(nBudgetHash), BEGIN(nTime), END(nTime));
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vin);
+        READWRITE(nBudgetHash);
+        READWRITE(nTime);
+        READWRITE(vchSig);
+    }
+
+    
+
+};
 
 //
 // Budget Proposal : Contains the masternode votes for each budget
@@ -121,13 +280,24 @@ class CBudgetProposal
 
 public:
     std::string strProposalName;
+    
+    /* 
+        json object with name, short-description, long-description, pdf-url and any other info
+        This allows the proposal website to stay 100% decentralized
+    */
+    std::string strURL; 
+    CTxIn vin;
+    int nBlockStart;
+    int nBlockEnd;
+    int64_t nAmount;
+    CScript address;
 
     map<uint256, CBudgetVote> mapVotes;
     //cache object
 
     CBudgetProposal();  
     CBudgetProposal(const CBudgetProposal& other);
-    CBudgetProposal(std::string strProposalNameIn);
+    CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn);
 
     void Sync(CNode* node);
 
@@ -136,27 +306,96 @@ class CBudgetProposal
     bool HasMinimumRequiredSupport();
     std::pair<std::string, std::string> GetVotes();
 
-    std::string GetName();
-    int GetBlockStart();
-    int GetBlockEnd();
-    CScript GetPayee();
+    bool IsValid();
+
+    std::string GetName() {return strProposalName; }
+    std::string GetURL() {return strURL; }
+    int GetBlockStart() {return nBlockStart;}
+    int GetBlockEnd() {return nBlockEnd;}
+    CScript GetPayee() {return address;}
+    int GetPaymentCountTotal();
+    int GetPaymentCountLeft();
+    int GetBlockStartCycle();
+    int GetBlockCurrentCycle();
+    int GetBlockEndCycle();
     double GetRatio();
     int GetYeas();
     int GetNays();
     int GetAbstains();
-    int64_t GetAmount();
+    int64_t GetAmount() {return nAmount;}
 
     void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
     int64_t GetAllotted() {return nAlloted;}
 
+    uint256 GetHash(){
+        /* 
+            vin is not included on purpose
+                - Any masternode can make a proposal and the hashes should match regardless of who made it. 
+                - Someone could hyjack a new proposal by changing the vin and the signature check will fail. 
+                  However, the network will still propagate the correct version and the incorrect one will be rejected. 
+        */
+                
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << strProposalName;
+        ss << strURL;
+        ss << nBlockStart;
+        ss << nBlockEnd;
+        ss << nAmount;
+        ss << address;
+        uint256 h1 = ss.GetHash();
+        
+        return h1;
+    }
+
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        //for syncing with other clients
+        READWRITE(LIMITED_STRING(strProposalName, 20));
+        READWRITE(LIMITED_STRING(strURL, 64));
+        READWRITE(vin);
+        READWRITE(nBlockStart);
+        READWRITE(nBlockEnd);
+        READWRITE(nAmount);
+        READWRITE(address);
+
+        //for saving to the serialized db
         READWRITE(mapVotes);
     }
 };
 
+// Proposals are cast then sent to peers with this object, which leaves the votes out
+class CBudgetProposalBroadcast : public CBudgetProposal
+{
+private:
+    std::vector<unsigned char> vchSig;
+    
+public:
+    CBudgetProposalBroadcast();
+    CBudgetProposalBroadcast(const CBudgetProposal& other);
+    CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURL, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn);
+
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    bool SignatureValid();
+    void Relay();
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        //for syncing with other clients
+
+        READWRITE(LIMITED_STRING(strProposalName, 20));
+        READWRITE(LIMITED_STRING(strURL, 64));
+        READWRITE(vin);
+        READWRITE(nBlockStart);
+        READWRITE(nBlockEnd);
+        READWRITE(nAmount);
+        READWRITE(address);
+        READWRITE(vchSig);
+    }  
+};
 
 //
 // CBudgetVote - Allow a masternode node to vote and broadcast throughout the network
@@ -165,21 +404,16 @@ class CBudgetProposal
 class CBudgetVote
 {
 public:
-    std::string strProposalName;
     CTxIn vin;
-    int nBlockStart;
-    int nBlockEnd;
-    int64_t nAmount;
+    uint256 nProposalHash;
     int nVote;
     int64_t nTime;
-    CScript address;
     std::vector<unsigned char> vchSig;
 
     CBudgetVote();
-    CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, int nVoteIn);
-    CBudgetVote(CTxIn vinIn, std::string strProposalNameIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nVoteIn);
+    CBudgetVote(CTxIn vin, uint256 nProposalHash, int nVoteIn);
 
-    bool Sign(CKey& keyCollateralAddress, CPubKey& pubKeyMasternode);
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
     bool SignatureValid();
     void Relay();
 
@@ -191,21 +425,17 @@ class CBudgetVote
     }
 
     uint256 GetHash(){
-        return Hash(BEGIN(vin), END(vin), BEGIN(nVote), END(nVote), BEGIN(nTime), END(nTime));
+        return Hash(BEGIN(vin), END(vin), BEGIN(nProposalHash), END(nProposalHash), BEGIN(nVote), END(nVote), BEGIN(nTime), END(nTime));
     }
 
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(LIMITED_STRING(strProposalName, 20));
         READWRITE(vin);
-        READWRITE(nBlockStart);
-        READWRITE(nBlockEnd);
-        READWRITE(nAmount);
+        READWRITE(nProposalHash);
         READWRITE(nVote);
         READWRITE(nTime);
-        READWRITE(address);
         READWRITE(vchSig);
     }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index def26c0b4f07..a0b1a4321d66 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -3,6 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "masternode-payments.h"
+#include "masternode-budget.h"
 #include "masternodeman.h"
 #include "darksend.h"
 #include "util.h"
@@ -17,6 +18,24 @@ CMasternodePayments masternodePayments;
 map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
+bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
+{
+    //check if it's a budget block
+    if(budget.IsBudgetBlock(nBlockHeight)){
+        if(budget.IsTransactionValid(txNew, nBlockHeight)){
+            return true;
+        }
+    }
+
+    //check for masternode payee
+    if(masternodePayments.IsTransactionValid(txNew, nBlockHeight))
+    {
+        return true;
+    }
+
+    return false;
+}
+
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(IsInitialBlockDownload()) return;
@@ -135,34 +154,54 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
 
 bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 {
-  /*  BOOST_FOREACH(CMasternodePayee& payee, vecPayees)
+    int nMaxSignatures = 0;
+    std::string strPayeesPossible = "";
+
+    //require at least 6 signatures
+
+    BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
+        if(payee.nVotes >= nMaxSignatures && MNPAYMENTS_SIGNATURES_REQUIRED)
+            nMaxSignatures = payee.nVotes;
+
+    // if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
+    if(nMaxSignatures == 0) return true;
+
+    BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
     {
         bool found = false;
-        BOOST_FOREACH(CTxOut& out, txNew.vout)
-        {
+        BOOST_FOREACH(CTxOut out, txNew.vout)
             if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
                 found = true;
-        }
 
-        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
+        //if 2 contenders are within +/- 20%, take either 
+        // If nMaxSignatures == 6, the min signatures = 2
+        // If nMaxSignatures == 10, the min signatures = 6
+        // If nMaxSignatures == 15, the min signatures = 11
+        if(payee.nVotes >= nMaxSignatures-(MNPAYMENTS_SIGNATURES_TOTAL/5)){            
+            if(found) return true;
 
             CTxDestination address1;
             ExtractDestination(payee.scriptPubKey, address1);
             CBitcoinAddress address2(address1);
 
-            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str, payee.nValue);
-            return false;
+            if(strPayeesPossible == ""){
+                strPayeesPossible += address2.ToString()  + ":" + boost::lexical_cast<std::string>(payee.nValue);
+            } else {
+                strPayeesPossible += "," + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
+            }
         }
     }
-*/
-    return true;
+
+
+    LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s\n", strPayeesPossible.c_str());
+    return false;
 }
 
 std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 {
     std::string ret = "Unknown";
 
-/*    BOOST_FOREACH(CMasternodePayee& payee, vecPayees)
+    BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
     {
         if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){
             CTxDestination address1;
@@ -170,13 +209,13 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
             CBitcoinAddress address2(address1);
 
             if(ret != "Unknown"){
-                ret += sprintf(", %s:%d", address2.ToString(), payee.nValue);
+                ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
             } else {
-                ret = sprintf("%s:%d", address2.ToString(), payee.nValue);
+                ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
             }
         }
     }
-*/
+
     return ret;
 }
 
@@ -206,14 +245,17 @@ void CMasternodePayments::CleanPaymentList()
 
     int nLimit = std::max(((int)mnodeman.size())*2, 1000);
 
-   /* vector<CMasternodePaymentWinner>::iterator it;
-    for(it=vWinning.begin();it<vWinning.end();it++){
-        if(chainActive.Tip()->nHeight - (*it).nBlockHeight > nLimit){
-            if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", (*it).nBlockHeight);
-            vWinning.erase(it);
-            break;
+    std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
+    while(it != mapMasternodePayeeVotes.end()) {
+        CMasternodePaymentWinner winner = (*it).second;
+   
+        if(chainActive.Tip()->nHeight - winner.nBlockHeight > nLimit){
+            if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", winner.nBlockHeight);
+            mapMasternodePayeeVotes.erase(it++);
+        } else {
+            ++it;
         }
-    }*/
+    }
 }
 
 bool IsReferenceNode(CTxIn& vin)
@@ -274,25 +316,22 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
     if(nBlockHeight <= nLastBlockHeight) return false;
     
-  /*  if(budget.IsBudgetPaymentBlock(nBlockHeight)){
-        //is budget payment block
-        std::vector<CBudgetProposal*> budget = budget.GetBudget();
-        BOOST_FOREACH(CBudgetProposal* prop, budget){
-            if(prop.GetAllocated() > 0){
-                newWinner.AddPayee(prop.GetPayee(), prop.GetAllocated());
-            }
-        }
-    } else {
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+    CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, 0);
+    CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
 
-        CMasternodePaymentWinner newWinner(activeMasternode.vin);
-        int nMinimumAge = mnodeman.CountEnabled();
-        CScript payeeSource;
+    CMasternodePaymentWinner newWinner(activeMasternode.vin);
 
-        CBlockIndex* pindexPrev = chainActive.Tip();
-        if(pindexPrev == NULL) return false;
-        CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, 0);
-        CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
+    if(budget.IsBudgetPaymentBlock(nBlockHeight)){
+        //is budget payment block
+        CScript payee;
+        GetMasternodeBudgetEscrow(payee);
+        newWinner.AddPayee(payee, masternodePayment);
 
+    } else {
+        
+        CScript payeeSource;
         uint256 hash;
         if(!GetBlockHash(hash, nBlockHeight-10)) return false;
         unsigned int nHash;
@@ -300,16 +339,8 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
         LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
 
-        std::vector<CTxIn> vecLastPayments;
-        BOOST_REVERSE_FOREACH(CMasternodePaymentWinner& winner, vWinning)
-        {
-            //if we already have the same vin - we have one full payment cycle, break
-            if(vecLastPayments.size() > (unsigned int)nMinimumAge) break;
-            vecLastPayments.push_back(winner.vin);
-        }
-
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-        CMasternode *pmn = mnodeman.FindOldestNotInVec(vecLastPayments, nMinimumAge);
+        CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment();
         if(pmn != NULL)
         {
             LogPrintf(" Found by FindOldestNotInVec \n");
@@ -322,49 +353,23 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             } else {
                 payee = GetScriptForDestination(pmn->pubkey.GetID());
             }
-            newWinner.AddPayee(payee, masternodePayment);
-        }
 
-        //if we can't find new MN to get paid, pick first active MN counting back from the end of vecLastPayments list
-        if(newWinner.nBlockHeight == 0 && nMinimumAge > 0)
-        {
-            LogPrintf(" Find by reverse \n");
-
-            BOOST_REVERSE_FOREACH(CTxIn& vinLP, vecLastPayments)
-            {
-                CMasternode* pmn = mnodeman.Find(vinLP);
-                if(pmn != NULL)
-                {
-                    pmn->Check();
-                    if(!pmn->IsEnabled()) continue; 
-                    if(pmn->SecondsSincePayment() < 60*60*24) continue;
-
-                    newWinner.nBlockHeight = nBlockHeight;
-
-                    CScript payee;
-                    if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-                        payee = pmn->donationAddress;
-                    } else {
-                        payee = GetScriptForDestination(pmn->pubkey.GetID());
-                    }
-                    newWinner.AddPayee(payee, masternodePayment);
-
-                    break; // we found active MN
-                }
-            }
-        }
-
-        if(newWinner.nBlockHeight == 0) return false;
+            payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+            newWinner.AddPayee(payee, masternodePayment);
+            
+            CTxDestination address1;
+            ExtractDestination(payee, address1);
+            CBitcoinAddress address2(address1);
 
-        CTxDestination address1;
-        ExtractDestination(newWinner.payee, address1);
-        CBitcoinAddress address2(address1);
+            CTxDestination address3;
+            ExtractDestination(payeeSource, address3);
+            CBitcoinAddress address4(address3);
 
-        CTxDestination address3;
-        ExtractDestination(payeeSource, address3);
-        CBitcoinAddress address4(address3);
+            LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+        } else {
+            LogPrintf(" Failed to find masternode to pay\n");
+        }
 
-        LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
     }
 
     std::string errorMessage;
@@ -377,7 +382,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         return false;
     }
 
-    if(Sign(keyMasternode, pubKeyMasternode))
+    if(newWinner.Sign(keyMasternode, pubKeyMasternode))
     {
         if(AddWinningMasternode(newWinner))
         {
@@ -386,7 +391,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             return true;
         }
     }
-*/
+
     return false;
 }
 
@@ -428,8 +433,14 @@ bool CMasternodePaymentWinner::SignatureValid()
 void CMasternodePayments::Sync(CNode* node)
 {
     LOCK(cs_masternodepayments);
-/*
-    BOOST_FOREACH(CMasternodePaymentWinner& winner, vWinning)
+
+    if(chainActive.Tip() == NULL) return;
+
+    std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
+    while(it != mapMasternodePayeeVotes.end()) {
+        CMasternodePaymentWinner winner = (*it).second;
         if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
-            node->PushMessage("mnw", winner);*/
+            node->PushMessage("mnw", winner);
+        ++it;
+    }
 }
\ No newline at end of file
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 43fe01cafb7f..7e91f7598d92 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -21,11 +21,12 @@ extern std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
 static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
-#define MNPAYMENTS_SIGNATURES_REQUIRED           11
+#define MNPAYMENTS_SIGNATURES_REQUIRED           6
 #define MNPAYMENTS_SIGNATURES_TOTAL              20
 
 void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 bool IsReferenceNode(CTxIn& vin);
+bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
 
 class CMasternodePayee : public CTxOut
 {
diff --git a/src/masternode.h b/src/masternode.h
index c37c32aca085..6d493d0a6912 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -28,9 +28,9 @@
 #define MASTERNODE_MIN_CONFIRMATIONS           15
 #define MASTERNODE_MIN_MNP_SECONDS             (30*60)
 #define MASTERNODE_MIN_DSEE_SECONDS            (5*60)
-#define MASTERNODE_PING_SECONDS                (1*60)
+#define MASTERNODE_PING_SECONDS                (15*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
-#define MASTERNODE_REMOVAL_SECONDS             (70*60)
+#define MASTERNODE_REMOVAL_SECONDS             (24*60*60)
 
 using namespace std;
 
@@ -279,6 +279,7 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(protocolVersion);
         READWRITE(donationAddress);
         READWRITE(donationPercentage);
+        READWRITE(nLastPaid);
     }
     
     uint256 GetHash(){
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index b4eda2fc544e..6ec77920c59e 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -351,7 +351,7 @@ CMasternode *CMasternodeMan::Find(const CPubKey &pubKeyMasternode)
     return NULL;
 }
 
-CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge)
+CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment()
 {
     LOCK(cs);
 
@@ -362,18 +362,6 @@ CMasternode* CMasternodeMan::FindOldestNotInVec(const std::vector<CTxIn> &vVins,
         mn.Check();
         if(!mn.IsEnabled()) continue;
 
-        if(Params().NetworkID() != CBaseChainParams::REGTEST && mn.GetMasternodeInputAge() < nMinimumAge) continue;
-
-        bool found = false;
-        BOOST_FOREACH(const CTxIn& vin, vVins)
-            if(mn.vin.prevout == vin.prevout)
-            {
-                found = true;
-                break;
-            }
-
-        if(found) continue;
-
         if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
         }
@@ -578,22 +566,27 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         // make sure the vout that was signed is related to the transaction that spawned the Masternode
         //  - this is expensive, so it's only done once per Masternode
         if(!darkSendSigner.IsVinAssociatedWithPubkey(mnb.vin, mnb.pubkey)) {
-            LogPrintf("dsee - Got mismatched pubkey and vin\n");
+            LogPrintf("mnb - Got mismatched pubkey and vin\n");
             Misbehaving(pfrom->GetId(), 33);
             return;
         }
 
-        if(fDebug) LogPrintf("dsee - Got NEW Masternode entry %s\n", mnb.addr.ToString().c_str());
+        if(fDebug) LogPrintf("mnb - Got NEW Masternode entry %s\n", mnb.addr.ToString().c_str());
 
         // make sure it's still unspent
         //  - this is checked later by .check() in many places and by ThreadCheckDarkSendPool()
 
+        //if it's a broadcast or we're synced
+        if(fRequested || !IsSyncingMasternodeAssets()){
+            mnb.nLastPaid = GetAdjustedTime();
+        }
+
         if(mnb.CheckInputsAndAdd(nDoS, fRequested)) {
 
             // use this as a peer
             addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
         } else {
-            LogPrintf("dsee - Rejected Masternode entry %s\n", mnb.addr.ToString().c_str());
+            LogPrintf("mnb - Rejected Masternode entry %s\n", mnb.addr.ToString().c_str());
 
             if (nDoS > 0)
                 Misbehaving(pfrom->GetId(), nDoS);
@@ -617,7 +610,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        if(fDebug) LogPrintf("mnping - Couldn't find Masternode entry %s\n", mnp.vin.ToString().c_str());
+        if(fDebug) LogPrintf("mnp - Couldn't find Masternode entry %s\n", mnp.vin.ToString().c_str());
 
         std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);
         if (i != mWeAskedForMasternodeListEntry.end())
@@ -626,9 +619,9 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             if (GetTime() < t) return; // we've asked recently
         }
 
-        // ask for the dsee info once from the node that sent mnping
+        // ask for the dsee info once from the node that sent mnp
 
-        LogPrintf("mnping - Asking source node for missing entry %s\n", mnp.vin.ToString().c_str());
+        LogPrintf("mnp - Asking source node for missing entry %s\n", mnp.vin.ToString().c_str());
         pfrom->PushMessage("dseg", mnp.vin);
         int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
         mWeAskedForMasternodeListEntry[mnp.vin.prevout] = askAgain;
@@ -659,12 +652,22 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
             if(mn.addr.IsRFC1918()) continue; //local network
 
+            bool fRequested = true;
             if(mn.IsEnabled()) {
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
                 if(vin == CTxIn()){
-                    CMasternodeBroadcast(mn).Relay(true);
+                    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                    ss.reserve(1000);
+                    ss << CMasternodeBroadcast(mn);
+                    ss << fRequested;
+                    pfrom->PushMessage("mnb", ss);
                 } else if (vin == mn.vin) {
-                    CMasternodeBroadcast(mn).Relay(true);
+                    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                    ss.reserve(1000);
+                    ss << CMasternodeBroadcast(mn);
+                    ss << fRequested;
+                    pfrom->PushMessage("mnb", ss);
+
                     LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
                     return;
                 }
@@ -688,6 +691,7 @@ void CMasternodeMan::Remove(CTxIn vin)
             vMasternodes.erase(it);
             break;
         }
+        ++it;
     }
 }
 
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 14fcd575fe6f..dd254e79141e 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -108,8 +108,8 @@ class CMasternodeMan
     CMasternode* Find(const CTxIn& vin);
     CMasternode* Find(const CPubKey& pubKeyMasternode);
 
-    /// Find an entry thta do not match every entry provided vector
-    CMasternode* FindOldestNotInVec(const std::vector<CTxIn> &vVins, int nMinimumAge);
+    /// Find an entry in the masternode list that is next to be paid
+    CMasternode* GetNextMasternodeInQueueForPayment();
 
     /// Find a random entry
     CMasternode* FindRandom();
diff --git a/src/net.cpp b/src/net.cpp
index d36e8d1a1f55..119e235d34a2 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1474,6 +1474,7 @@ void ThreadMessageHandler()
             boost::this_thread::interruption_point();
         }
 
+
         {
             LOCK(cs_vNodes);
             BOOST_FOREACH(CNode* pnode, vNodesCopy)
@@ -1481,7 +1482,10 @@ void ThreadMessageHandler()
         }
 
         if (fSleep)
-            MilliSleep(100);
+            MilliSleep(1);
+
+        boost::this_thread::interruption_point();
+
     }
 }
 
@@ -1678,6 +1682,7 @@ void StartNode(boost::thread_group& threadGroup)
 
     // Dump network addresses
     threadGroup.create_thread(boost::bind(&LoopForever<void (*)()>, "dumpaddr", &DumpAddresses, DUMP_ADDRESSES_INTERVAL * 1000));
+
 }
 
 bool StopNode()
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 8ed77d66aad0..2703abc5219a 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -25,6 +25,7 @@ static const char* ppszTypeName[] =
     "masternode winner",
     "masternode scan",
     "masternode vote",
+    "masternode proposal",
     "masternode quorum",
     "masternode announce",
     "masternode ping",
diff --git a/src/protocol.h b/src/protocol.h
index 6af9f6f03bce..5d20cdc32072 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -152,7 +152,10 @@ enum {
     MSG_SPORK,
     MSG_MASTERNODE_WINNER,
     MSG_MASTERNODE_SCANNING_ERROR,
-    MSG_MASTERNODE_VOTE,
+    MSG_BUDGET_VOTE,
+    MSG_BUDGET_PROPOSAL,
+    MSG_BUDGET_FINALIZED,
+    MSG_BUDGET_FINALIZED_VOTE,
     MSG_MASTERNODE_QUORUM,
     MSG_MASTERNODE_ANNOUNCE,
     MSG_MASTERNODE_PING
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 692f6b49830d..fb5e83ee51b9 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -92,6 +92,9 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "prioritisetransaction", 1 },
     { "prioritisetransaction", 2 },
     { "spork", 1 },
+    { "mnbudget", 3 },
+    { "mnbudget", 4 },
+    { "mnbudget", 6 },
 };
 
 class CRPCConvertTable
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index b1217b770890..c15f56eb8105 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -26,39 +26,58 @@ Value mnbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo"))
+        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show"))
         throw runtime_error(
                 "mnbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
                 "\nAvailable commands:\n"
-                "  vote-many    - Vote on a Dash initiative\n"
-                "  vote         - Vote on a Dash initiative\n"
-                "  getvotes     - Show current masternode budgets\n"
-                "  getinfo      - Show current masternode budgets\n"
+                "  vote-many          - Vote on a Dash initiative\n"
+                "  vote-alias         - Vote on a Dash initiative\n"
+                "  vote               - Vote on a Dash initiative/budget\n"
+                "  getvotes           - Show current masternode budgets\n"
+                "  getinfo            - Show current masternode budgets\n"
+                "  show               - Show all budgets\n"
                 );
 
     if(strCommand == "vote-many")
     {
+        int nBlockMin = 0;
+        CBlockIndex* pindexPrev = chainActive.Tip();
+
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 5)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME PAYMENT_COUNT DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
+        if (params.size() != 8)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
             return "Invalid proposal name, limit of 20 characters.";
 
-        int nPaymentCount = params[2].get_int();
-        CBitcoinAddress address(params[3].get_str());
+        std::string strURL = params[2].get_str();
+        if(strURL.size() > 64)
+            return "Invalid url, limit of 64 characters.";
+
+        int nPaymentCount = params[3].get_int();
+        if(nPaymentCount < 1)
+            return "Invalid payment count, must be more than zero.";
+
+        //set block min
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - PAYMENT_CYCLE_BLOCKS*(nPaymentCount+1);
+
+        int nBlockStart = params[4].get_int();
+        if(nBlockStart < nBlockMin)
+            return "Invalid payment count, must be more than current height.";
+
+        CBitcoinAddress address(params[5].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
 
         // Parse Dash address
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
-        CAmount nAmount = AmountFromValue(params[4]);
-        std::string strVote = params[5].get_str().c_str();
+        CAmount nAmount = AmountFromValue(params[6]);
+        std::string strVote = params[7].get_str().c_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -94,16 +113,23 @@ Value mnbudget(const Array& params, bool fHelp)
                 continue;
             }    
 
-            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-                return(" Error upon calling SetKey");
+            //create the proposal incase we're the first to make it
+            CBudgetProposalBroadcast prop(pmn->vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
+            if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+                return "Failure to sign.";
+            }
+            mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+            prop.Relay();
 
-            CBudgetVote vote(pmn->vin, strProposalName, nPaymentCount, scriptPubKey, nAmount, nVote);
+            CBudgetVote vote(pmn->vin, prop.GetHash(), nVote);
             if(!vote.Sign(keyMasternode, pubKeyMasternode)){
                 return "Failure to sign.";
             }
 
-            success++;
+            mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
+
+            success++;
         }
 
         return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
@@ -111,27 +137,43 @@ Value mnbudget(const Array& params, bool fHelp)
 
     if(strCommand == "vote")
     {
+        int nBlockMin = 0;
+        CBlockIndex* pindexPrev = chainActive.Tip();
+
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 5)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME PAYMENT_COUNT DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
+        if (params.size() != 8)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
-
         if(strProposalName.size() > 20)
             return "Invalid proposal name, limit of 20 characters.";
 
-        int nPaymentCount = params[2].get_int();
-        CBitcoinAddress address(params[3].get_str());
+        std::string strURL = params[2].get_str();
+        if(strURL.size() > 64)
+            return "Invalid url, limit of 64 characters.";
+
+        int nPaymentCount = params[3].get_int();
+        if(nPaymentCount < 1)
+            return "Invalid payment count, must be more than zero.";
+
+        //set block min
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - PAYMENT_CYCLE_BLOCKS*(nPaymentCount+1);
+
+        int nBlockStart = params[4].get_int();
+        if(nBlockStart < nBlockMin)
+            return "Invalid payment count, must be more than current height.";
+
+        CBitcoinAddress address(params[5].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
 
         // Parse Dash address
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
-        CAmount nAmount = AmountFromValue(params[4]);
-        std::string strVote = params[5].get_str().c_str();
+        CAmount nAmount = AmountFromValue(params[6]);
+        std::string strVote = params[7].get_str().c_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -145,23 +187,27 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
-        CBudgetVote vote(activeMasternode.vin, strProposalName, nPaymentCount, scriptPubKey, nAmount, nVote);
+        //create the proposal incase we're the first to make it
+        CBudgetProposalBroadcast prop(activeMasternode.vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
+        if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+            return "Failure to sign.";
+        }
+
+        mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+        prop.Relay();
+
+        CBudgetVote vote(activeMasternode.vin, prop.GetHash(), nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
 
+        mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
 
     }
 
     if(strCommand == "show")
     {
-        std::string strProposalName = params[1].get_str();
-
-        CBudgetProposal* prop = budget.Find(strProposalName);
-
-        if(prop == NULL) return "Unknown proposal name";
-
         Object resultObj;
         int64_t nTotalAllotted = 0;
 
@@ -175,17 +221,20 @@ Value mnbudget(const Array& params, bool fHelp)
             CBitcoinAddress address2(address1);
 
             Object bObj;
-            bObj.push_back(Pair("Name",  prop->GetName().c_str()));
+            bObj.push_back(Pair("URL",  prop->GetURL()));
+            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("PaymentAddress",  address2.ToString().c_str()));
+            bObj.push_back(Pair("PaymentCountTotal",  (int64_t)prop->GetPaymentCountTotal()));
+            bObj.push_back(Pair("PaymentCountLeft",  (int64_t)prop->GetPaymentCountLeft()));
+            bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
             bObj.push_back(Pair("Ratio",  prop->GetRatio()));
             bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
             bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
             bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAllotted));
-            resultObj.push_back(Pair("masternode", bObj));
+            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
         }
 
         return resultObj;
@@ -208,8 +257,12 @@ Value mnbudget(const Array& params, bool fHelp)
 
         Object obj;
         obj.push_back(Pair("Name",  prop->GetName().c_str()));
+        obj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
+        obj.push_back(Pair("URL",  prop->GetURL().c_str()));
         obj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
         obj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
+        obj.push_back(Pair("PaymentCountTotal",  (int64_t)prop->GetPaymentCountTotal()));
+        obj.push_back(Pair("PaymentCountLeft",  (int64_t)prop->GetPaymentCountLeft()));
         obj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
         obj.push_back(Pair("Ratio",  prop->GetRatio()));
         obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
@@ -222,23 +275,22 @@ Value mnbudget(const Array& params, bool fHelp)
 
     if(strCommand == "getvotes")
     {
-        
         if (params.size() != 2)
             throw runtime_error("Correct usage of getvotes is 'mnbudget getinfo profilename'");
 
         std::string strProposalName = params[1].get_str();
 
+        Object obj;
+        
         CBudgetProposal* prop = budget.Find(strProposalName);
 
         if(prop == NULL) return "Unknown proposal name";
 
-        Object obj;
-   
-        int c = 0;
-
         std::map<uint256, CBudgetVote>::iterator it = prop->mapVotes.begin();
-        while(it != prop->mapVotes.end())
-            obj.push_back(Pair((*it).second.strProposalName.c_str(),  (*it).second.GetVoteString().c_str()));
+        while(it != prop->mapVotes.end()){
+            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(),  (*it).second.GetVoteString().c_str()));
+            it++;
+        }
         
 
         return obj;
@@ -247,3 +299,192 @@ Value mnbudget(const Array& params, bool fHelp)
     return Value::null;
 }
 
+Value mnfinalbudget(const Array& params, bool fHelp)
+{
+    string strCommand;
+    if (params.size() >= 1)
+        strCommand = params[0].get_str();
+
+    if (fHelp  ||
+        (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show"))
+        throw runtime_error(
+                "mnbudget \"command\"... ( \"passphrase\" )\n"
+                "Vote or show current budgets\n"
+                "\nAvailable commands:\n"
+                "  suggest     - Suggest a budget to be paid\n"
+                "  vote-many   - Vote on a finalized budget\n"
+                "  vote        - Vote on a finalized budget\n"
+                "  show        - Show existing finalized budgets\n"
+                );
+
+
+    if(strCommand == "suggest")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+        
+        CBlockIndex* pindexPrev = chainActive.Tip();
+        if(!pindexPrev)
+            return "Must be synced to suggest";
+
+        if (params.size() < 3)
+            throw runtime_error("Correct usage of vote-many is 'mnfinalbudget suggest BUDGET_NAME PROPNAME [PROP2 PROP3 PROP4]'");
+
+        std::string strBudgetName = params[1].get_str();
+        if(strBudgetName.size() > 20)
+            return "Invalid budget name, limit of 20 characters.";
+
+        int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS)+PAYMENT_CYCLE_BLOCKS;
+
+        std::vector<uint256> vecProps;
+        for(int i = 3; i < (int)params.size(); i++)
+        {
+            std::string strHash = params[1].get_str();
+            uint256 hash(strHash);
+
+            vecProps.push_back(hash);
+            printf("%s\n", hash.ToString().c_str());
+        }
+
+        CPubKey pubKeyMasternode;
+        CKey keyMasternode;
+        std::string errorMessage;
+
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+            return(" Error upon calling SetKey");
+
+        //create the proposal incase we're the first to make it
+        CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecProps);
+        if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+            return "Failure to sign.";
+        }
+
+        if(!prop.IsValid())
+            return "Invalid prop (are all the hashes correct?)";
+
+        mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+        prop.Relay();
+
+        CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
+        if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+            return "Failure to sign.";
+        }
+
+        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        vote.Relay();
+
+        return "success";
+
+    }
+
+    if(strCommand == "vote-many")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 2)
+            throw runtime_error("Correct usage of vote-many is 'mnfinalbudget vote-many BUDGET_HASH'");
+
+        std::string strHash = params[1].get_str();
+        uint256 hash(strHash);
+
+        int success = 0;
+        int failed = 0;
+
+        Object resultObj;
+
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            std::string errorMessage;
+            std::vector<unsigned char> vchMasterNodeSignature;
+            std::string strMasterNodeSignMessage;
+
+            CPubKey pubKeyCollateralAddress;
+            CKey keyCollateralAddress;
+            CPubKey pubKeyMasternode;
+            CKey keyMasternode;
+
+            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
+                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }
+
+            CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
+            if(pmn == NULL)
+            {
+                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }    
+
+
+            CFinalizedBudgetVote vote(pmn->vin, hash);
+            if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+                failed++;
+                continue;
+            }
+
+            mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            vote.Relay();
+
+            success++;
+        }
+
+        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
+    }
+
+    if(strCommand == "vote")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 2)
+            throw runtime_error("Correct usage of vote is 'mnfinalbudget vote BUDGET_HASH'");
+
+        std::string strHash = params[1].get_str();
+        uint256 hash(strHash);
+
+        CPubKey pubKeyMasternode;
+        CKey keyMasternode;
+        std::string errorMessage;
+
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+            return(" Error upon calling SetKey");
+
+        CFinalizedBudgetVote vote(activeMasternode.vin, hash);
+        if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+            return "Failure to sign.";
+        }
+
+        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        vote.Relay();
+
+        return "success";
+    }
+
+    if(strCommand == "show")
+    {
+        Object resultObj;
+
+        printf("1\n");
+        std::vector<CFinalizedBudget*> winningFbs = budget.GetFinalizedBudgets();
+        BOOST_FOREACH(CFinalizedBudget* prop, winningFbs)
+        {
+            printf("2\n");
+
+            Object bObj;
+            bObj.push_back(Pair("SubmittedBy",  prop->GetSubmittedBy().c_str()));
+            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
+            bObj.push_back(Pair("Proposals",  prop->GetProposals().c_str()));
+            bObj.push_back(Pair("VoteCount",  (int64_t)prop->GetVoteCount()));
+            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
+        }
+
+        return resultObj;
+
+    }
+
+    return Value::null;
+}
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 330e43eab5cd..d7c5efafe54e 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -473,7 +473,7 @@ Value masternodelist(const Array& params, bool fHelp)
     if (params.size() == 2) strFilter = params[1].get_str();
 
     if (fHelp ||
-            (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank"
+            (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank" && strMode != "addr"
                 && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose" && strMode != "lastpaid"))
     {
         throw runtime_error(
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index c54eab560c0e..b3b23750d762 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -312,6 +312,7 @@ static const CRPCCommand vRPCCommands[] =
     { "dash",               "spork",                  &spork,                  true,      false,      false },
     { "dash",               "masternode",             &masternode,             true,      false,      true  },
     { "dash",               "mnbudget",               &mnbudget,               true,      false,      false },
+    { "dash",               "mnfinalbudget",          &mnfinalbudget,          true,      false,      false },
     { "dash",               "masternodelist",         &masternodelist,         true,      false,      false },
 #ifdef ENABLE_WALLET
     { "dash",               "darksend",               &darksend,               false,     false,      true  },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 72f1fc2bbc74..bf37f65fa934 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -231,6 +231,7 @@ extern json_spirit::Value spork(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value masternode(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value masternodelist(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value mnbudget(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value mnfinalbudget(const json_spirit::Array& params, bool fHelp);
 
 // in rest.cpp
 extern bool HTTPReq_REST(AcceptedConnection *conn,

From 397654ef760394ec25b9f43e6eed965f819aa0c4 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 16 May 2015 05:53:53 +0300
Subject: [PATCH 1361/1819] fix masternode payments bugs

---
 src/main.cpp                | 4 ++--
 src/masternode-payments.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 52430e511bdf..bd53e12e5536 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2931,9 +2931,9 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     // ----------- masternode payments -----------
 
     CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev != NULL) 
+    if(pindexPrev != NULL)
     {
-        if(IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
+        if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
         {
             if(Params().NetworkID() != CBaseChainParams::REGTEST) 
                 return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index a0b1a4321d66..d4c044b08c6e 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -160,7 +160,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
     //require at least 6 signatures
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
-        if(payee.nVotes >= nMaxSignatures && MNPAYMENTS_SIGNATURES_REQUIRED)
+        if(payee.nVotes >= nMaxSignatures && payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED)
             nMaxSignatures = payee.nVotes;
 
     // if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
@@ -443,4 +443,4 @@ void CMasternodePayments::Sync(CNode* node)
             node->PushMessage("mnw", winner);
         ++it;
     }
-}
\ No newline at end of file
+}

From a4a72d6fa057bcadbf168a6ad49488ba72f41a45 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 16 May 2015 06:04:26 +0300
Subject: [PATCH 1362/1819] Update last checkpoint data for mainnet - should
 give more accurate verification progress

---
 src/chainparams.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 905f6c866bde..05f12e53ef1e 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -75,10 +75,10 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
         ;
 static const Checkpoints::CCheckpointData data = {
         &mapCheckpoints,
-        1403283082, // * UNIX timestamp of last checkpoint block
-        511516,     // * total number of transactions between genesis and last checkpoint
+        1423563332, // * UNIX timestamp of last checkpoint block
+        853742,     // * total number of transactions between genesis and last checkpoint
                     //   (the tx=... number in the SetBestChain debug.log lines)
-        7701        // * estimated number of transactions per day after checkpoint
+        2800        // * estimated number of transactions per day after checkpoint
     };
 
 static Checkpoints::MapCheckpoints mapCheckpointsTestnet =

From 2154f9413159eed19ac40ce7f2cb461c2f96ff0c Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 17 May 2015 20:56:00 +0200
Subject: [PATCH 1363/1819] Open peers information page when clicking on
 connections item

---
 src/qt/bitcoingui.cpp             | 9 +++++++--
 src/qt/bitcoingui.h               | 3 ++-
 src/qt/transactionfilterproxy.cpp | 4 ----
 3 files changed, 9 insertions(+), 7 deletions(-)
 mode change 100755 => 100644 src/qt/bitcoingui.cpp
 mode change 100755 => 100644 src/qt/bitcoingui.h
 mode change 100755 => 100644 src/qt/transactionfilterproxy.cpp

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
old mode 100755
new mode 100644
index 90da0354a95f..a6e502477d1e
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -175,7 +175,10 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     frameBlocksLayout->setSpacing(3);
     unitDisplayControl = new UnitDisplayStatusBarControl();
     labelEncryptionIcon = new QLabel();
-    labelConnectionsIcon = new QLabel();
+    labelConnectionsIcon = new QPushButton();
+    labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable 
+    labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
+    labelConnectionsIcon->setMaximumSize(16, 16);
     labelBlocksIcon = new QLabel();
     if(enableWallet)
     {
@@ -216,6 +219,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
     connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
     connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
+    connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
 
     // prevents an open debug window from becoming stuck/unusable on client shutdown
     connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
@@ -700,7 +704,8 @@ void BitcoinGUI::setNumConnections(int count)
     case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
     default: icon = ":/icons/connect_4"; break;
     }
-    labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+    QIcon connectionItem = QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE);
+    labelConnectionsIcon->setIcon(connectionItem);
     labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
 }
 
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
old mode 100755
new mode 100644
index 046b4b30a58f..31a98036c531
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -16,6 +16,7 @@
 #include <QMap>
 #include <QMenu>
 #include <QPoint>
+#include <QPushButton>
 #include <QSystemTrayIcon>
 
 class ClientModel;
@@ -79,7 +80,7 @@ class BitcoinGUI : public QMainWindow
 
     UnitDisplayStatusBarControl *unitDisplayControl;
     QLabel *labelEncryptionIcon;
-    QLabel *labelConnectionsIcon;
+    QPushButton *labelConnectionsIcon;
     QLabel *labelBlocksIcon;
     QLabel *progressBarLabel;
     QProgressBar *progressBar;
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
old mode 100755
new mode 100644
index 94ef80e7ae3f..420c87bc5a9f
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -21,11 +21,7 @@ TransactionFilterProxy::TransactionFilterProxy(QObject *parent) :
     dateFrom(MIN_DATE),
     dateTo(MAX_DATE),
     addrPrefix(),
-<<<<<<< HEAD
-    typeFilter(ALL_TYPES),
-=======
     typeFilter(COMMON_TYPES),
->>>>>>> upstream/v0.12.0.x
     watchOnlyFilter(WatchOnlyFilter_All),
     minAmount(0),
     limitRows(-1),

From 8f61995aadd342517be89ea060cb72367997d982 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 17 May 2015 21:20:26 +0200
Subject: [PATCH 1364/1819] Use constants instead of hard coded values

---
 bitcoingui.cpp | 1174 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 1174 insertions(+)
 create mode 100644 bitcoingui.cpp

diff --git a/bitcoingui.cpp b/bitcoingui.cpp
new file mode 100644
index 000000000000..a12d99151c72
--- /dev/null
+++ b/bitcoingui.cpp
@@ -0,0 +1,1174 @@
+// Copyright (c) 2011-2014 The Bitcoin developers
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "bitcoingui.h"
+
+#include "bitcoinunits.h"
+#include "clientmodel.h"
+#include "guiconstants.h"
+#include "guiutil.h"
+#include "networkstyle.h"
+#include "notificator.h"
+#include "openuridialog.h"
+#include "optionsdialog.h"
+#include "optionsmodel.h"
+#include "rpcconsole.h"
+#include "utilitydialog.h"
+
+#ifdef ENABLE_WALLET
+#include "walletframe.h"
+#include "walletmodel.h"
+#endif // ENABLE_WALLET
+
+#ifdef Q_OS_MAC
+#include "macdockiconhandler.h"
+#endif
+
+#include "init.h"
+#include "ui_interface.h"
+#include "util.h"
+
+#include <iostream>
+
+#include <QAction>
+#include <QApplication>
+#include <QDateTime>
+#include <QDesktopWidget>
+#include <QDragEnterEvent>
+#include <QIcon>
+#include <QListWidget>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QMimeData>
+#include <QProgressBar>
+#include <QProgressDialog>
+#include <QSettings>
+#include <QStackedWidget>
+#include <QStatusBar>
+#include <QStyle>
+#include <QTimer>
+#include <QToolBar>
+#include <QVBoxLayout>
+
+#if QT_VERSION < 0x050000
+#include <QTextDocument>
+#include <QUrl>
+#else
+#include <QUrlQuery>
+#endif
+
+const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
+
+BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
+    QMainWindow(parent),
+    clientModel(0),
+    walletFrame(0),
+    unitDisplayControl(0),
+    labelEncryptionIcon(0),
+    labelConnectionsIcon(0),
+    labelBlocksIcon(0),
+    progressBarLabel(0),
+    progressBar(0),
+    progressDialog(0),
+    appMenuBar(0),
+    overviewAction(0),
+    historyAction(0),
+    quitAction(0),
+    sendCoinsAction(0),
+    usedSendingAddressesAction(0),
+    usedReceivingAddressesAction(0),
+    signMessageAction(0),
+    verifyMessageAction(0),
+    aboutAction(0),
+    receiveCoinsAction(0),
+    optionsAction(0),
+    toggleHideAction(0),
+    encryptWalletAction(0),
+    backupWalletAction(0),
+    changePassphraseAction(0),
+    aboutQtAction(0),
+    openRPCConsoleAction(0),
+    openAction(0),
+    showHelpMessageAction(0),
+    trayIcon(0),
+    trayIconMenu(0),
+    notificator(0),
+    rpcConsole(0),
+    prevBlocks(0),
+    spinnerFrame(0)
+{
+    /* Open CSS when configured */
+    this->setStyleSheet(GUIUtil::loadStyleSheet());
+
+    GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
+
+    QString windowTitle = tr("Dash Core") + " - ";
+#ifdef ENABLE_WALLET
+    /* if compiled with wallet support, -disablewallet can still disable the wallet */
+    enableWallet = !GetBoolArg("-disablewallet", false);
+#else
+    enableWallet = false;
+#endif // ENABLE_WALLET
+    if(enableWallet)
+    {
+        windowTitle += tr("Wallet");
+    } else {
+        windowTitle += tr("Node");
+    }
+    windowTitle += " " + networkStyle->getTitleAddText();
+#ifndef Q_OS_MAC
+    QApplication::setWindowIcon(networkStyle->getAppIcon());
+    setWindowIcon(networkStyle->getAppIcon());
+#else
+    MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
+#endif
+    setWindowTitle(windowTitle);
+
+#if defined(Q_OS_MAC) && QT_VERSION < 0x050000
+    // This property is not implemented in Qt 5. Setting it has no effect.
+    // A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras.
+    setUnifiedTitleAndToolBarOnMac(true);
+#endif
+
+    rpcConsole = new RPCConsole(enableWallet ? this : 0);
+#ifdef ENABLE_WALLET
+    if(enableWallet)
+    {
+        /** Create wallet frame*/
+        walletFrame = new WalletFrame(this);
+    } else
+#endif // ENABLE_WALLET
+    {
+        /* When compiled without wallet or -disablewallet is provided,
+         * the central widget is the rpc console.
+         */
+        setCentralWidget(rpcConsole);
+    }
+
+    // Accept D&D of URIs
+    setAcceptDrops(true);
+
+    // Create actions for the toolbar, menu bar and tray/dock icon
+    // Needs walletFrame to be initialized
+    createActions(networkStyle);
+
+    // Create application menu bar
+    createMenuBar();
+
+    // Create the toolbars
+    createToolBars();
+
+    // Create system tray icon and notification
+    createTrayIcon(networkStyle);
+
+    // Create status bar
+    statusBar();
+
+    // Status bar notification icons
+    QFrame *frameBlocks = new QFrame();
+    frameBlocks->setContentsMargins(0,0,0,0);
+    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
+    frameBlocksLayout->setContentsMargins(3,0,3,0);
+    frameBlocksLayout->setSpacing(3);
+    unitDisplayControl = new UnitDisplayStatusBarControl();
+    labelEncryptionIcon = new QLabel();
+    labelConnectionsIcon = new QPushButton();
+    labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable 
+    labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
+    labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
+    labelBlocksIcon = new QLabel();
+    if(enableWallet)
+    {
+        frameBlocksLayout->addStretch();
+        frameBlocksLayout->addWidget(unitDisplayControl);
+        frameBlocksLayout->addStretch();
+        frameBlocksLayout->addWidget(labelEncryptionIcon);
+    }
+    frameBlocksLayout->addStretch();
+    frameBlocksLayout->addWidget(labelConnectionsIcon);
+    frameBlocksLayout->addStretch();
+    frameBlocksLayout->addWidget(labelBlocksIcon);
+    frameBlocksLayout->addStretch();
+
+    // Progress bar and label for blocks download
+    progressBarLabel = new QLabel();
+    progressBarLabel->setVisible(false);
+    progressBar = new GUIUtil::ProgressBar();
+    progressBar->setAlignment(Qt::AlignCenter);
+    progressBar->setVisible(false);
+
+    // Override style sheet for progress bar for styles that have a segmented progress bar,
+    // as they make the text unreadable (workaround for issue #1071)
+    // See https://qt-project.org/doc/qt-4.8/gallery.html
+    QString curStyle = QApplication::style()->metaObject()->className();
+    if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
+    {
+        progressBar->setStyleSheet("QProgressBar { background-color: #F8F8F8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #00CCFF, stop: 1 #33CCFF); border-radius: 7px; margin: 0px; }");
+    }
+
+    statusBar()->addWidget(progressBarLabel);
+    statusBar()->addWidget(progressBar);
+    statusBar()->addPermanentWidget(frameBlocks);
+
+    connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
+    connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
+    connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
+    connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
+    connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
+    connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
+    connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
+
+    // prevents an open debug window from becoming stuck/unusable on client shutdown
+    connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
+
+    // Install event filter to be able to catch status tip events (QEvent::StatusTip)
+    this->installEventFilter(this);
+
+    // Initially wallet actions should be disabled
+    setWalletActionsEnabled(false);
+
+    // Subscribe to notifications from core
+    subscribeToCoreSignals();
+}
+
+BitcoinGUI::~BitcoinGUI()
+{
+    // Unsubscribe from notifications from core
+    unsubscribeFromCoreSignals();
+
+    GUIUtil::saveWindowGeometry("nWindow", this);
+    if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
+        trayIcon->hide();
+#ifdef Q_OS_MAC
+    delete appMenuBar;
+    MacDockIconHandler::cleanup();
+#endif
+}
+
+void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
+{
+    QActionGroup *tabGroup = new QActionGroup(this);
+
+    overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
+    overviewAction->setStatusTip(tr("Show general overview of wallet"));
+    overviewAction->setToolTip(overviewAction->statusTip());
+    overviewAction->setCheckable(true);
+#ifdef Q_OS_MAC
+    overviewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1));
+#else
+    overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
+#endif
+    tabGroup->addAction(overviewAction);
+
+    sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this);
+    sendCoinsAction->setStatusTip(tr("Send coins to a Dash address"));
+    sendCoinsAction->setToolTip(sendCoinsAction->statusTip());
+    sendCoinsAction->setCheckable(true);
+#ifdef Q_OS_MAC
+    sendCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2));
+#else
+    sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
+#endif
+    tabGroup->addAction(sendCoinsAction);
+
+    receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
+    receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and dash: URIs)"));
+    receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
+    receiveCoinsAction->setCheckable(true);
+#ifdef Q_OS_MAC
+    receiveCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3));
+#else
+    receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
+#endif
+    tabGroup->addAction(receiveCoinsAction);
+
+    historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this);
+    historyAction->setStatusTip(tr("Browse transaction history"));
+    historyAction->setToolTip(historyAction->statusTip());
+    historyAction->setCheckable(true);
+#ifdef Q_OS_MAC
+    historyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_4));
+#else
+    historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
+#endif
+    tabGroup->addAction(historyAction);
+
+#ifdef ENABLE_WALLET
+    // These showNormalIfMinimized are needed because Send Coins and Receive Coins
+    // can be triggered from the tray menu, and need to show the GUI to be useful.
+    connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+    connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
+    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
+    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
+    connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
+    connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
+#endif // ENABLE_WALLET
+
+    quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
+    quitAction->setStatusTip(tr("Quit application"));
+    quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
+    quitAction->setMenuRole(QAction::QuitRole);
+    aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About Dash Core"), this);
+    aboutAction->setStatusTip(tr("Show information about Dash Core"));
+    aboutAction->setMenuRole(QAction::AboutRole);
+#if QT_VERSION < 0x050000
+    aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
+#else
+    aboutQtAction = new QAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
+#endif
+    aboutQtAction->setStatusTip(tr("Show information about Qt"));
+    aboutQtAction->setMenuRole(QAction::AboutQtRole);
+    optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
+    optionsAction->setStatusTip(tr("Modify configuration options for Dash"));
+    optionsAction->setMenuRole(QAction::PreferencesRole);
+    toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this);
+    toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
+
+    encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
+    encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
+    encryptWalletAction->setCheckable(true);
+    backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
+    backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
+    changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
+    changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
+    unlockWalletAction = new QAction(tr("&Unlock Wallet..."), this);
+    unlockWalletAction->setToolTip(tr("Unlock wallet"));
+    lockWalletAction = new QAction(tr("&Lock Wallet"), this);
+    signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
+    signMessageAction->setStatusTip(tr("Sign messages with your Dash addresses to prove you own them"));
+    verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
+    verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Dash addresses"));
+
+    openInfoAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Information"), this);
+    openInfoAction->setStatusTip(tr("Show diagnostic information"));
+    openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug console"), this);
+    openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
+    openNetworkAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
+    openNetworkAction->setStatusTip(tr("Show network monitor"));
+    openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
+    openPeersAction->setStatusTip(tr("Show peers info"));
+    openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
+    openConfEditorAction->setStatusTip(tr("Open configuration file"));
+    showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
+    showBackupsAction->setStatusTip(tr("Show automatically created wallet backups"));
+
+    usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
+    usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
+    usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
+    usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
+
+    openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this);
+    openAction->setStatusTip(tr("Open a dash: URI or payment request"));
+
+    showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
+    showHelpMessageAction->setMenuRole(QAction::NoRole);
+    showHelpMessageAction->setStatusTip(tr("Show the Dash Core help message to get a list with possible Dash command-line options"));
+
+    connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
+    connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
+    connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+    connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
+    connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
+    connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
+#ifdef ENABLE_WALLET
+    if(walletFrame)
+    {
+        connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool)));
+        connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet()));
+        connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase()));
+        connect(unlockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(unlockWallet()));
+        connect(lockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(lockWallet()));
+        connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
+        connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
+        connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses()));
+        connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
+        connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
+    }
+#endif // ENABLE_WALLET
+}
+
+void BitcoinGUI::createMenuBar()
+{
+#ifdef Q_OS_MAC
+    // Create a decoupled menu bar on Mac which stays even if the window is closed
+    appMenuBar = new QMenuBar();
+#else
+    // Get the main window's menu bar on other platforms
+    appMenuBar = menuBar();
+#endif
+
+    // Configure the menus
+    QMenu *file = appMenuBar->addMenu(tr("&File"));
+    if(walletFrame)
+    {
+        file->addAction(openAction);
+        file->addAction(backupWalletAction);
+        file->addAction(signMessageAction);
+        file->addAction(verifyMessageAction);
+        file->addSeparator();
+        file->addAction(usedSendingAddressesAction);
+        file->addAction(usedReceivingAddressesAction);
+        file->addSeparator();
+    }
+    file->addAction(quitAction);
+
+    QMenu *settings = appMenuBar->addMenu(tr("&Settings"));
+    if(walletFrame)
+    {
+        settings->addAction(encryptWalletAction);
+        settings->addAction(changePassphraseAction);
+        settings->addAction(unlockWalletAction);
+        settings->addAction(lockWalletAction);
+        settings->addSeparator();
+    }
+    settings->addAction(optionsAction);
+
+    if(walletFrame)
+    {
+        QMenu *tools = appMenuBar->addMenu(tr("&Tools"));
+        tools->addAction(openInfoAction);
+        tools->addAction(openRPCConsoleAction);
+        tools->addAction(openNetworkAction);
+        tools->addAction(openPeersAction);
+        tools->addSeparator();
+        tools->addAction(openConfEditorAction);
+        tools->addAction(showBackupsAction);
+    }
+
+    QMenu *help = appMenuBar->addMenu(tr("&Help"));
+    help->addAction(showHelpMessageAction);
+    help->addSeparator();
+    help->addAction(aboutAction);
+    help->addAction(aboutQtAction);
+}
+
+void BitcoinGUI::createToolBars()
+{
+    if(walletFrame)
+    {
+        QToolBar *toolbar = new QToolBar(tr("Tabs toolbar"));
+        toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+        toolbar->addAction(overviewAction);
+        toolbar->addAction(sendCoinsAction);
+        toolbar->addAction(receiveCoinsAction);
+        toolbar->addAction(historyAction);
+        toolbar->setMovable(false); // remove unused icon in upper left corner
+        overviewAction->setChecked(true);
+
+        /** Create additional container for toolbar and walletFrame and make it the central widget.
+            This is a workaround mostly for toolbar styling on Mac OS but should work fine for every other OSes too.
+        */
+        QVBoxLayout *layout = new QVBoxLayout;
+        layout->addWidget(toolbar);
+        layout->addWidget(walletFrame);
+        layout->setSpacing(0);
+        layout->setContentsMargins(QMargins());
+        QWidget *containerWidget = new QWidget();
+        containerWidget->setLayout(layout);
+        setCentralWidget(containerWidget);
+    }
+}
+
+void BitcoinGUI::setClientModel(ClientModel *clientModel)
+{
+    this->clientModel = clientModel;
+    if(clientModel)
+    {
+        // Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
+        // while the client has not yet fully loaded
+        createTrayIconMenu();
+
+        // Keep up to date with client
+        setNumConnections(clientModel->getNumConnections());
+        connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
+
+        setNumBlocks(clientModel->getNumBlocks());
+        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
+
+        // Receive and report messages from client model
+        connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
+
+        // Show progress dialog
+        connect(clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
+
+        rpcConsole->setClientModel(clientModel);
+#ifdef ENABLE_WALLET
+        if(walletFrame)
+        {
+            walletFrame->setClientModel(clientModel);
+        }
+#endif // ENABLE_WALLET
+        unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
+    } else {
+        // Disable possibility to show main window via action
+        toggleHideAction->setEnabled(false);
+        if(trayIconMenu)
+        {
+            // Disable context menu on tray icon
+            trayIconMenu->clear();
+        }
+    }
+}
+
+#ifdef ENABLE_WALLET
+bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
+{
+    if(!walletFrame)
+        return false;
+    setWalletActionsEnabled(true);
+    return walletFrame->addWallet(name, walletModel);
+}
+
+bool BitcoinGUI::setCurrentWallet(const QString& name)
+{
+    if(!walletFrame)
+        return false;
+    return walletFrame->setCurrentWallet(name);
+}
+
+void BitcoinGUI::removeAllWallets()
+{
+    if(!walletFrame)
+        return;
+    setWalletActionsEnabled(false);
+    walletFrame->removeAllWallets();
+}
+#endif // ENABLE_WALLET
+
+void BitcoinGUI::setWalletActionsEnabled(bool enabled)
+{
+    overviewAction->setEnabled(enabled);
+    sendCoinsAction->setEnabled(enabled);
+    receiveCoinsAction->setEnabled(enabled);
+    historyAction->setEnabled(enabled);
+    encryptWalletAction->setEnabled(enabled);
+    backupWalletAction->setEnabled(enabled);
+    changePassphraseAction->setEnabled(enabled);
+    signMessageAction->setEnabled(enabled);
+    verifyMessageAction->setEnabled(enabled);
+    usedSendingAddressesAction->setEnabled(enabled);
+    usedReceivingAddressesAction->setEnabled(enabled);
+    openAction->setEnabled(enabled);
+}
+
+void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
+{
+#ifndef Q_OS_MAC
+    trayIcon = new QSystemTrayIcon(this);
+    QString toolTip = tr("Dash Core client") + " " + networkStyle->getTitleAddText();
+    trayIcon->setToolTip(toolTip);
+    trayIcon->setIcon(networkStyle->getAppIcon());
+    trayIcon->show();
+#endif
+
+    notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
+}
+
+void BitcoinGUI::createTrayIconMenu()
+{
+#ifndef Q_OS_MAC
+    // return if trayIcon is unset (only on non-Mac OSes)
+    if (!trayIcon)
+        return;
+
+    trayIconMenu = new QMenu(this);
+    trayIcon->setContextMenu(trayIconMenu);
+
+    connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
+            this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
+#else
+    // Note: On Mac, the dock icon is used to provide the tray's functionality.
+    MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
+    dockIconHandler->setMainWindow((QMainWindow *)this);
+    trayIconMenu = dockIconHandler->dockMenu();
+#endif
+
+    // Configuration of the tray icon (or dock icon) icon menu
+    trayIconMenu->addAction(toggleHideAction);
+    trayIconMenu->addSeparator();
+    trayIconMenu->addAction(sendCoinsAction);
+    trayIconMenu->addAction(receiveCoinsAction);
+    trayIconMenu->addSeparator();
+    trayIconMenu->addAction(signMessageAction);
+    trayIconMenu->addAction(verifyMessageAction);
+    trayIconMenu->addSeparator();
+    trayIconMenu->addAction(optionsAction);
+    trayIconMenu->addAction(openInfoAction);
+    trayIconMenu->addAction(openRPCConsoleAction);
+    trayIconMenu->addAction(openNetworkAction);
+    trayIconMenu->addAction(openPeersAction);
+    trayIconMenu->addSeparator();
+    trayIconMenu->addAction(openConfEditorAction);
+    trayIconMenu->addAction(showBackupsAction);
+#ifndef Q_OS_MAC // This is built-in on Mac
+    trayIconMenu->addSeparator();
+    trayIconMenu->addAction(quitAction);
+#endif
+}
+
+#ifndef Q_OS_MAC
+void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
+{
+    if(reason == QSystemTrayIcon::Trigger)
+    {
+        // Click on system tray icon triggers show/hide of the main window
+        toggleHidden();
+    }
+}
+#endif
+
+void BitcoinGUI::optionsClicked()
+{
+    if(!clientModel || !clientModel->getOptionsModel())
+        return;
+
+    OptionsDialog dlg(this, enableWallet);
+    dlg.setModel(clientModel->getOptionsModel());
+    dlg.exec();
+}
+
+void BitcoinGUI::aboutClicked()
+{
+    if(!clientModel)
+        return;
+
+    HelpMessageDialog dlg(this, true);
+    dlg.exec();
+}
+
+void BitcoinGUI::showHelpMessageClicked()
+{
+    HelpMessageDialog *help = new HelpMessageDialog(this, false);
+    help->setAttribute(Qt::WA_DeleteOnClose);
+    help->show();
+}
+
+#ifdef ENABLE_WALLET
+void BitcoinGUI::openClicked()
+{
+    OpenURIDialog dlg(this);
+    if(dlg.exec())
+    {
+        emit receivedURI(dlg.getURI());
+    }
+}
+
+void BitcoinGUI::gotoOverviewPage()
+{
+    overviewAction->setChecked(true);
+    if (walletFrame) walletFrame->gotoOverviewPage();
+}
+
+void BitcoinGUI::gotoHistoryPage()
+{
+    historyAction->setChecked(true);
+    if (walletFrame) walletFrame->gotoHistoryPage();
+}
+
+void BitcoinGUI::gotoReceiveCoinsPage()
+{
+    receiveCoinsAction->setChecked(true);
+    if (walletFrame) walletFrame->gotoReceiveCoinsPage();
+}
+
+void BitcoinGUI::gotoSendCoinsPage(QString addr)
+{
+    sendCoinsAction->setChecked(true);
+    if (walletFrame) walletFrame->gotoSendCoinsPage(addr);
+}
+
+void BitcoinGUI::gotoSignMessageTab(QString addr)
+{
+    if (walletFrame) walletFrame->gotoSignMessageTab(addr);
+}
+
+void BitcoinGUI::gotoVerifyMessageTab(QString addr)
+{
+    if (walletFrame) walletFrame->gotoVerifyMessageTab(addr);
+}
+#endif // ENABLE_WALLET
+
+void BitcoinGUI::setNumConnections(int count)
+{
+    QString icon;
+    switch(count)
+    {
+    case 0: icon = ":/icons/connect_0"; break;
+    case 1: case 2: case 3: icon = ":/icons/connect_1"; break;
+    case 4: case 5: case 6: icon = ":/icons/connect_2"; break;
+    case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
+    default: icon = ":/icons/connect_4"; break;
+    }
+    QIcon connectionItem = QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE);
+    labelConnectionsIcon->setIcon(connectionItem);
+    labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
+}
+
+void BitcoinGUI::setNumBlocks(int count)
+{
+    if(!clientModel)
+        return;
+
+    // Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
+    statusBar()->clearMessage();
+
+    // Acquire current block source
+    enum BlockSource blockSource = clientModel->getBlockSource();
+    switch (blockSource) {
+        case BLOCK_SOURCE_NETWORK:
+            progressBarLabel->setText(tr("Synchronizing with network..."));
+            break;
+        case BLOCK_SOURCE_DISK:
+            progressBarLabel->setText(tr("Importing blocks from disk..."));
+            break;
+        case BLOCK_SOURCE_REINDEX:
+            progressBarLabel->setText(tr("Reindexing blocks on disk..."));
+            break;
+        case BLOCK_SOURCE_NONE:
+            // Case: not Importing, not Reindexing and no network connection
+            progressBarLabel->setText(tr("No block source available..."));
+            break;
+    }
+
+    QString tooltip;
+
+    QDateTime lastBlockDate = clientModel->getLastBlockDate();
+    QDateTime currentDate = QDateTime::currentDateTime();
+    int secs = lastBlockDate.secsTo(currentDate);
+
+    tooltip = tr("Processed %n blocks of transaction history.", "", count);
+
+    // Set icon state: spinning if catching up, tick otherwise
+    if(secs < 25*60) // 90*60 for bitcoin but we are 4x times faster
+    {
+        tooltip = tr("Up to date") + QString(".<br>") + tooltip;
+        labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
+
+#ifdef ENABLE_WALLET
+        if(walletFrame)
+            walletFrame->showOutOfSyncWarning(false);
+#endif // ENABLE_WALLET
+
+        progressBarLabel->setVisible(false);
+        progressBar->setVisible(false);
+    }
+    else
+    {
+        // Represent time from last generated block in human readable text
+        QString timeBehindText;
+        const int HOUR_IN_SECONDS = 60*60;
+        const int DAY_IN_SECONDS = 24*60*60;
+        const int WEEK_IN_SECONDS = 7*24*60*60;
+        const int YEAR_IN_SECONDS = 31556952; // Average length of year in Gregorian calendar
+        if(secs < 2*DAY_IN_SECONDS)
+        {
+            timeBehindText = tr("%n hour(s)","",secs/HOUR_IN_SECONDS);
+        }
+        else if(secs < 2*WEEK_IN_SECONDS)
+        {
+            timeBehindText = tr("%n day(s)","",secs/DAY_IN_SECONDS);
+        }
+        else if(secs < YEAR_IN_SECONDS)
+        {
+            timeBehindText = tr("%n week(s)","",secs/WEEK_IN_SECONDS);
+        }
+        else
+        {
+            int years = secs / YEAR_IN_SECONDS;
+            int remainder = secs % YEAR_IN_SECONDS;
+            timeBehindText = tr("%1 and %2").arg(tr("%n year(s)", "", years)).arg(tr("%n week(s)","", remainder/WEEK_IN_SECONDS));
+        }
+
+        progressBarLabel->setVisible(true);
+        progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
+        progressBar->setMaximum(1000000000);
+        progressBar->setValue(clientModel->getVerificationProgress() * 1000000000.0 + 0.5);
+        progressBar->setVisible(true);
+
+        tooltip = tr("Catching up...") + QString("<br>") + tooltip;
+        if(count != prevBlocks)
+        {
+            labelBlocksIcon->setPixmap(QIcon(QString(
+                ":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
+                .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
+            spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
+        }
+        prevBlocks = count;
+
+#ifdef ENABLE_WALLET
+        if(walletFrame)
+            walletFrame->showOutOfSyncWarning(true);
+#endif // ENABLE_WALLET
+
+        tooltip += QString("<br>");
+        tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
+        tooltip += QString("<br>");
+        tooltip += tr("Transactions after this will not yet be visible.");
+    }
+
+    // Don't word-wrap this (fixed-width) tooltip
+    tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
+
+    labelBlocksIcon->setToolTip(tooltip);
+    progressBarLabel->setToolTip(tooltip);
+    progressBar->setToolTip(tooltip);
+}
+
+void BitcoinGUI::message(const QString &title, const QString &message, unsigned int style, bool *ret)
+{
+    QString strTitle = tr("Dash Core"); // default title
+    // Default to information icon
+    int nMBoxIcon = QMessageBox::Information;
+    int nNotifyIcon = Notificator::Information;
+
+    QString msgType;
+
+    // Prefer supplied title over style based title
+    if (!title.isEmpty()) {
+        msgType = title;
+    }
+    else {
+        switch (style) {
+        case CClientUIInterface::MSG_ERROR:
+            msgType = tr("Error");
+            break;
+        case CClientUIInterface::MSG_WARNING:
+            msgType = tr("Warning");
+            break;
+        case CClientUIInterface::MSG_INFORMATION:
+            msgType = tr("Information");
+            break;
+        default:
+            break;
+        }
+    }
+    // Append title to "Dash - "
+    if (!msgType.isEmpty())
+        strTitle += " - " + msgType;
+
+    // Check for error/warning icon
+    if (style & CClientUIInterface::ICON_ERROR) {
+        nMBoxIcon = QMessageBox::Critical;
+        nNotifyIcon = Notificator::Critical;
+    }
+    else if (style & CClientUIInterface::ICON_WARNING) {
+        nMBoxIcon = QMessageBox::Warning;
+        nNotifyIcon = Notificator::Warning;
+    }
+
+    // Display message
+    if (style & CClientUIInterface::MODAL) {
+        // Check for buttons, use OK as default, if none was supplied
+        QMessageBox::StandardButton buttons;
+        if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
+            buttons = QMessageBox::Ok;
+
+        showNormalIfMinimized();
+        QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
+        int r = mBox.exec();
+        if (ret != NULL)
+            *ret = r == QMessageBox::Ok;
+    }
+    else
+        notificator->notify((Notificator::Class)nNotifyIcon, strTitle, message);
+}
+
+void BitcoinGUI::changeEvent(QEvent *e)
+{
+    QMainWindow::changeEvent(e);
+#ifndef Q_OS_MAC // Ignored on Mac
+    if(e->type() == QEvent::WindowStateChange)
+    {
+        if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray())
+        {
+            QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e);
+            if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
+            {
+                QTimer::singleShot(0, this, SLOT(hide()));
+                e->ignore();
+            }
+        }
+    }
+#endif
+}
+
+void BitcoinGUI::closeEvent(QCloseEvent *event)
+{
+#ifndef Q_OS_MAC // Ignored on Mac
+    if(clientModel && clientModel->getOptionsModel())
+    {
+        if(!clientModel->getOptionsModel()->getMinimizeOnClose())
+        {
+            QApplication::quit();
+        }
+    }
+#endif
+    QMainWindow::closeEvent(event);
+}
+
+#ifdef ENABLE_WALLET
+void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address)
+{
+    // On new transaction, make an info balloon
+    message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"),
+             tr("Date: %1\n"
+                "Amount: %2\n"
+                "Type: %3\n"
+                "Address: %4\n")
+                  .arg(date)
+                  .arg(BitcoinUnits::formatWithUnit(unit, amount, true))
+                  .arg(type)
+                  .arg(address), CClientUIInterface::MSG_INFORMATION);
+}
+#endif // ENABLE_WALLET
+
+void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
+{
+    // Accept only URIs
+    if(event->mimeData()->hasUrls())
+        event->acceptProposedAction();
+}
+
+void BitcoinGUI::dropEvent(QDropEvent *event)
+{
+    if(event->mimeData()->hasUrls())
+    {
+        foreach(const QUrl &uri, event->mimeData()->urls())
+        {
+            emit receivedURI(uri.toString());
+        }
+    }
+    event->acceptProposedAction();
+}
+
+bool BitcoinGUI::eventFilter(QObject *object, QEvent *event)
+{
+    // Catch status tip events
+    if (event->type() == QEvent::StatusTip)
+    {
+        // Prevent adding text from setStatusTip(), if we currently use the status bar for displaying other stuff
+        if (progressBarLabel->isVisible() || progressBar->isVisible())
+            return true;
+    }
+    return QMainWindow::eventFilter(object, event);
+}
+
+#ifdef ENABLE_WALLET
+bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
+{
+    // URI has to be valid
+    if (walletFrame && walletFrame->handlePaymentRequest(recipient))
+    {
+        showNormalIfMinimized();
+        gotoSendCoinsPage();
+        return true;
+    }
+    return false;
+}
+
+void BitcoinGUI::setEncryptionStatus(int status)
+{
+    switch(status)
+    {
+    case WalletModel::Unencrypted:
+        labelEncryptionIcon->hide();
+        encryptWalletAction->setChecked(false);
+        changePassphraseAction->setEnabled(false);
+        unlockWalletAction->setVisible(false);
+        lockWalletAction->setVisible(false);
+        encryptWalletAction->setEnabled(true);
+        break;
+    case WalletModel::Unlocked:
+        labelEncryptionIcon->show();
+        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
+        encryptWalletAction->setChecked(true);
+        changePassphraseAction->setEnabled(true);
+        unlockWalletAction->setVisible(false);
+        lockWalletAction->setVisible(true);
+        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
+        break;
+    case WalletModel::UnlockedForAnonymizationOnly:
+        labelEncryptionIcon->show();
+        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b> for anonimization only"));
+        encryptWalletAction->setChecked(true);
+        changePassphraseAction->setEnabled(true);
+        unlockWalletAction->setVisible(true);
+        lockWalletAction->setVisible(true);
+        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
+        break;
+    case WalletModel::Locked:
+        labelEncryptionIcon->show();
+        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
+        encryptWalletAction->setChecked(true);
+        changePassphraseAction->setEnabled(true);
+        unlockWalletAction->setVisible(true);
+        lockWalletAction->setVisible(false);
+        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
+        break;
+    }
+}
+#endif // ENABLE_WALLET
+
+void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
+{
+    if(!clientModel)
+        return;
+
+    // activateWindow() (sometimes) helps with keyboard focus on Windows
+    if (isHidden())
+    {
+        show();
+        activateWindow();
+    }
+    else if (isMinimized())
+    {
+        showNormal();
+        activateWindow();
+    }
+    else if (GUIUtil::isObscured(this))
+    {
+        raise();
+        activateWindow();
+    }
+    else if(fToggleHidden)
+        hide();
+}
+
+void BitcoinGUI::toggleHidden()
+{
+    showNormalIfMinimized(true);
+}
+
+void BitcoinGUI::detectShutdown()
+{
+    if (ShutdownRequested())
+    {
+        if(rpcConsole)
+            rpcConsole->hide();
+        qApp->quit();
+    }
+}
+
+void BitcoinGUI::showProgress(const QString &title, int nProgress)
+{
+    if (nProgress == 0)
+    {
+        progressDialog = new QProgressDialog(title, "", 0, 100);
+        progressDialog->setWindowModality(Qt::ApplicationModal);
+        progressDialog->setMinimumDuration(0);
+        progressDialog->setCancelButton(0);
+        progressDialog->setAutoClose(false);
+        progressDialog->setValue(0);
+    }
+    else if (nProgress == 100)
+    {
+        if (progressDialog)
+        {
+            progressDialog->close();
+            progressDialog->deleteLater();
+        }
+    }
+    else if (progressDialog)
+        progressDialog->setValue(nProgress);
+}
+
+static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
+{
+    bool modal = (style & CClientUIInterface::MODAL);
+    // The SECURE flag has no effect in the Qt GUI.
+    // bool secure = (style & CClientUIInterface::SECURE);
+    style &= ~CClientUIInterface::SECURE;
+    bool ret = false;
+    // In case of modal message, use blocking connection to wait for user to click a button
+    QMetaObject::invokeMethod(gui, "message",
+                               modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection,
+                               Q_ARG(QString, QString::fromStdString(caption)),
+                               Q_ARG(QString, QString::fromStdString(message)),
+                               Q_ARG(unsigned int, style),
+                               Q_ARG(bool*, &ret));
+    return ret;
+}
+
+void BitcoinGUI::subscribeToCoreSignals()
+{
+    // Connect signals to client
+    uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
+}
+
+void BitcoinGUI::unsubscribeFromCoreSignals()
+{
+    // Disconnect signals from client
+    uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
+}
+
+UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
+    optionsModel(0),
+    menu(0)
+{
+    createContextMenu();
+    setToolTip(tr("Unit to show amounts in. Click to select another unit."));
+}
+
+/** So that it responds to button clicks */
+void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
+{
+    onDisplayUnitsClicked(event->pos());
+}
+
+/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
+void UnitDisplayStatusBarControl::createContextMenu()
+{
+    menu = new QMenu();
+    foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
+    {
+        QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
+        menuAction->setData(QVariant(u));
+        menu->addAction(menuAction);
+    }
+    connect(menu,SIGNAL(triggered(QAction*)),this,SLOT(onMenuSelection(QAction*)));
+}
+
+/** Lets the control know about the Options Model (and its signals) */
+void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
+{
+    if (optionsModel)
+    {
+        this->optionsModel = optionsModel;
+
+        // be aware of a display unit change reported by the OptionsModel object.
+        connect(optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));
+
+        // initialize the display units label with the current value in the model.
+        updateDisplayUnit(optionsModel->getDisplayUnit());
+    }
+}
+
+/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
+void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
+{
+    setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(31,STATUSBAR_ICONSIZE));
+}
+
+/** Shows context menu with Display Unit options by the mouse coordinates */
+void UnitDisplayStatusBarControl::onDisplayUnitsClicked(const QPoint& point)
+{
+    QPoint globalPos = mapToGlobal(point);
+    menu->exec(globalPos);
+}
+
+/** Tells underlying optionsModel to update its current display unit. */
+void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
+{
+    if (action)
+    {
+        optionsModel->setDisplayUnit(action->data());
+    }
+}

From eea331775554a7acfc9753cc977fbafe37d4803c Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 17 May 2015 21:21:43 +0200
Subject: [PATCH 1365/1819] Use existing constant instead of hardcoded size
 value

---
 bitcoingui.cpp        | 1174 -----------------------------------------
 src/qt/bitcoingui.cpp |    2 +-
 2 files changed, 1 insertion(+), 1175 deletions(-)
 delete mode 100644 bitcoingui.cpp

diff --git a/bitcoingui.cpp b/bitcoingui.cpp
deleted file mode 100644
index a12d99151c72..000000000000
--- a/bitcoingui.cpp
+++ /dev/null
@@ -1,1174 +0,0 @@
-// Copyright (c) 2011-2014 The Bitcoin developers
-// Copyright (c) 2014-2015 The Dash developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "bitcoingui.h"
-
-#include "bitcoinunits.h"
-#include "clientmodel.h"
-#include "guiconstants.h"
-#include "guiutil.h"
-#include "networkstyle.h"
-#include "notificator.h"
-#include "openuridialog.h"
-#include "optionsdialog.h"
-#include "optionsmodel.h"
-#include "rpcconsole.h"
-#include "utilitydialog.h"
-
-#ifdef ENABLE_WALLET
-#include "walletframe.h"
-#include "walletmodel.h"
-#endif // ENABLE_WALLET
-
-#ifdef Q_OS_MAC
-#include "macdockiconhandler.h"
-#endif
-
-#include "init.h"
-#include "ui_interface.h"
-#include "util.h"
-
-#include <iostream>
-
-#include <QAction>
-#include <QApplication>
-#include <QDateTime>
-#include <QDesktopWidget>
-#include <QDragEnterEvent>
-#include <QIcon>
-#include <QListWidget>
-#include <QMenuBar>
-#include <QMessageBox>
-#include <QMimeData>
-#include <QProgressBar>
-#include <QProgressDialog>
-#include <QSettings>
-#include <QStackedWidget>
-#include <QStatusBar>
-#include <QStyle>
-#include <QTimer>
-#include <QToolBar>
-#include <QVBoxLayout>
-
-#if QT_VERSION < 0x050000
-#include <QTextDocument>
-#include <QUrl>
-#else
-#include <QUrlQuery>
-#endif
-
-const QString BitcoinGUI::DEFAULT_WALLET = "~Default";
-
-BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
-    QMainWindow(parent),
-    clientModel(0),
-    walletFrame(0),
-    unitDisplayControl(0),
-    labelEncryptionIcon(0),
-    labelConnectionsIcon(0),
-    labelBlocksIcon(0),
-    progressBarLabel(0),
-    progressBar(0),
-    progressDialog(0),
-    appMenuBar(0),
-    overviewAction(0),
-    historyAction(0),
-    quitAction(0),
-    sendCoinsAction(0),
-    usedSendingAddressesAction(0),
-    usedReceivingAddressesAction(0),
-    signMessageAction(0),
-    verifyMessageAction(0),
-    aboutAction(0),
-    receiveCoinsAction(0),
-    optionsAction(0),
-    toggleHideAction(0),
-    encryptWalletAction(0),
-    backupWalletAction(0),
-    changePassphraseAction(0),
-    aboutQtAction(0),
-    openRPCConsoleAction(0),
-    openAction(0),
-    showHelpMessageAction(0),
-    trayIcon(0),
-    trayIconMenu(0),
-    notificator(0),
-    rpcConsole(0),
-    prevBlocks(0),
-    spinnerFrame(0)
-{
-    /* Open CSS when configured */
-    this->setStyleSheet(GUIUtil::loadStyleSheet());
-
-    GUIUtil::restoreWindowGeometry("nWindow", QSize(850, 550), this);
-
-    QString windowTitle = tr("Dash Core") + " - ";
-#ifdef ENABLE_WALLET
-    /* if compiled with wallet support, -disablewallet can still disable the wallet */
-    enableWallet = !GetBoolArg("-disablewallet", false);
-#else
-    enableWallet = false;
-#endif // ENABLE_WALLET
-    if(enableWallet)
-    {
-        windowTitle += tr("Wallet");
-    } else {
-        windowTitle += tr("Node");
-    }
-    windowTitle += " " + networkStyle->getTitleAddText();
-#ifndef Q_OS_MAC
-    QApplication::setWindowIcon(networkStyle->getAppIcon());
-    setWindowIcon(networkStyle->getAppIcon());
-#else
-    MacDockIconHandler::instance()->setIcon(networkStyle->getAppIcon());
-#endif
-    setWindowTitle(windowTitle);
-
-#if defined(Q_OS_MAC) && QT_VERSION < 0x050000
-    // This property is not implemented in Qt 5. Setting it has no effect.
-    // A replacement API (QtMacUnifiedToolBar) is available in QtMacExtras.
-    setUnifiedTitleAndToolBarOnMac(true);
-#endif
-
-    rpcConsole = new RPCConsole(enableWallet ? this : 0);
-#ifdef ENABLE_WALLET
-    if(enableWallet)
-    {
-        /** Create wallet frame*/
-        walletFrame = new WalletFrame(this);
-    } else
-#endif // ENABLE_WALLET
-    {
-        /* When compiled without wallet or -disablewallet is provided,
-         * the central widget is the rpc console.
-         */
-        setCentralWidget(rpcConsole);
-    }
-
-    // Accept D&D of URIs
-    setAcceptDrops(true);
-
-    // Create actions for the toolbar, menu bar and tray/dock icon
-    // Needs walletFrame to be initialized
-    createActions(networkStyle);
-
-    // Create application menu bar
-    createMenuBar();
-
-    // Create the toolbars
-    createToolBars();
-
-    // Create system tray icon and notification
-    createTrayIcon(networkStyle);
-
-    // Create status bar
-    statusBar();
-
-    // Status bar notification icons
-    QFrame *frameBlocks = new QFrame();
-    frameBlocks->setContentsMargins(0,0,0,0);
-    frameBlocks->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
-    QHBoxLayout *frameBlocksLayout = new QHBoxLayout(frameBlocks);
-    frameBlocksLayout->setContentsMargins(3,0,3,0);
-    frameBlocksLayout->setSpacing(3);
-    unitDisplayControl = new UnitDisplayStatusBarControl();
-    labelEncryptionIcon = new QLabel();
-    labelConnectionsIcon = new QPushButton();
-    labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable 
-    labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
-    labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
-    labelBlocksIcon = new QLabel();
-    if(enableWallet)
-    {
-        frameBlocksLayout->addStretch();
-        frameBlocksLayout->addWidget(unitDisplayControl);
-        frameBlocksLayout->addStretch();
-        frameBlocksLayout->addWidget(labelEncryptionIcon);
-    }
-    frameBlocksLayout->addStretch();
-    frameBlocksLayout->addWidget(labelConnectionsIcon);
-    frameBlocksLayout->addStretch();
-    frameBlocksLayout->addWidget(labelBlocksIcon);
-    frameBlocksLayout->addStretch();
-
-    // Progress bar and label for blocks download
-    progressBarLabel = new QLabel();
-    progressBarLabel->setVisible(false);
-    progressBar = new GUIUtil::ProgressBar();
-    progressBar->setAlignment(Qt::AlignCenter);
-    progressBar->setVisible(false);
-
-    // Override style sheet for progress bar for styles that have a segmented progress bar,
-    // as they make the text unreadable (workaround for issue #1071)
-    // See https://qt-project.org/doc/qt-4.8/gallery.html
-    QString curStyle = QApplication::style()->metaObject()->className();
-    if(curStyle == "QWindowsStyle" || curStyle == "QWindowsXPStyle")
-    {
-        progressBar->setStyleSheet("QProgressBar { background-color: #F8F8F8; border: 1px solid grey; border-radius: 7px; padding: 1px; text-align: center; } QProgressBar::chunk { background: QLinearGradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #00CCFF, stop: 1 #33CCFF); border-radius: 7px; margin: 0px; }");
-    }
-
-    statusBar()->addWidget(progressBarLabel);
-    statusBar()->addWidget(progressBar);
-    statusBar()->addPermanentWidget(frameBlocks);
-
-    connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
-    connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
-    connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
-    connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
-    connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
-    connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
-    connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
-
-    // prevents an open debug window from becoming stuck/unusable on client shutdown
-    connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
-
-    // Install event filter to be able to catch status tip events (QEvent::StatusTip)
-    this->installEventFilter(this);
-
-    // Initially wallet actions should be disabled
-    setWalletActionsEnabled(false);
-
-    // Subscribe to notifications from core
-    subscribeToCoreSignals();
-}
-
-BitcoinGUI::~BitcoinGUI()
-{
-    // Unsubscribe from notifications from core
-    unsubscribeFromCoreSignals();
-
-    GUIUtil::saveWindowGeometry("nWindow", this);
-    if(trayIcon) // Hide tray icon, as deleting will let it linger until quit (on Ubuntu)
-        trayIcon->hide();
-#ifdef Q_OS_MAC
-    delete appMenuBar;
-    MacDockIconHandler::cleanup();
-#endif
-}
-
-void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
-{
-    QActionGroup *tabGroup = new QActionGroup(this);
-
-    overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this);
-    overviewAction->setStatusTip(tr("Show general overview of wallet"));
-    overviewAction->setToolTip(overviewAction->statusTip());
-    overviewAction->setCheckable(true);
-#ifdef Q_OS_MAC
-    overviewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_1));
-#else
-    overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1));
-#endif
-    tabGroup->addAction(overviewAction);
-
-    sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this);
-    sendCoinsAction->setStatusTip(tr("Send coins to a Dash address"));
-    sendCoinsAction->setToolTip(sendCoinsAction->statusTip());
-    sendCoinsAction->setCheckable(true);
-#ifdef Q_OS_MAC
-    sendCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_2));
-#else
-    sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2));
-#endif
-    tabGroup->addAction(sendCoinsAction);
-
-    receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this);
-    receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and dash: URIs)"));
-    receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip());
-    receiveCoinsAction->setCheckable(true);
-#ifdef Q_OS_MAC
-    receiveCoinsAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_3));
-#else
-    receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3));
-#endif
-    tabGroup->addAction(receiveCoinsAction);
-
-    historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this);
-    historyAction->setStatusTip(tr("Browse transaction history"));
-    historyAction->setToolTip(historyAction->statusTip());
-    historyAction->setCheckable(true);
-#ifdef Q_OS_MAC
-    historyAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_4));
-#else
-    historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4));
-#endif
-    tabGroup->addAction(historyAction);
-
-#ifdef ENABLE_WALLET
-    // These showNormalIfMinimized are needed because Send Coins and Receive Coins
-    // can be triggered from the tray menu, and need to show the GUI to be useful.
-    connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
-    connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage()));
-    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
-    connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage()));
-    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
-    connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage()));
-    connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized()));
-    connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage()));
-#endif // ENABLE_WALLET
-
-    quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this);
-    quitAction->setStatusTip(tr("Quit application"));
-    quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
-    quitAction->setMenuRole(QAction::QuitRole);
-    aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About Dash Core"), this);
-    aboutAction->setStatusTip(tr("Show information about Dash Core"));
-    aboutAction->setMenuRole(QAction::AboutRole);
-#if QT_VERSION < 0x050000
-    aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
-#else
-    aboutQtAction = new QAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this);
-#endif
-    aboutQtAction->setStatusTip(tr("Show information about Qt"));
-    aboutQtAction->setMenuRole(QAction::AboutQtRole);
-    optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this);
-    optionsAction->setStatusTip(tr("Modify configuration options for Dash"));
-    optionsAction->setMenuRole(QAction::PreferencesRole);
-    toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this);
-    toggleHideAction->setStatusTip(tr("Show or hide the main Window"));
-
-    encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this);
-    encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet"));
-    encryptWalletAction->setCheckable(true);
-    backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this);
-    backupWalletAction->setStatusTip(tr("Backup wallet to another location"));
-    changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this);
-    changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption"));
-    unlockWalletAction = new QAction(tr("&Unlock Wallet..."), this);
-    unlockWalletAction->setToolTip(tr("Unlock wallet"));
-    lockWalletAction = new QAction(tr("&Lock Wallet"), this);
-    signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this);
-    signMessageAction->setStatusTip(tr("Sign messages with your Dash addresses to prove you own them"));
-    verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this);
-    verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Dash addresses"));
-
-    openInfoAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Information"), this);
-    openInfoAction->setStatusTip(tr("Show diagnostic information"));
-    openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug console"), this);
-    openRPCConsoleAction->setStatusTip(tr("Open debugging console"));
-    openNetworkAction = new QAction(QIcon(":/icons/connect_4"), tr("&Network Monitor"), this);
-    openNetworkAction->setStatusTip(tr("Show network monitor"));
-    openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
-    openPeersAction->setStatusTip(tr("Show peers info"));
-    openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
-    openConfEditorAction->setStatusTip(tr("Open configuration file"));
-    showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
-    showBackupsAction->setStatusTip(tr("Show automatically created wallet backups"));
-
-    usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this);
-    usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels"));
-    usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this);
-    usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels"));
-
-    openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this);
-    openAction->setStatusTip(tr("Open a dash: URI or payment request"));
-
-    showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this);
-    showHelpMessageAction->setMenuRole(QAction::NoRole);
-    showHelpMessageAction->setStatusTip(tr("Show the Dash Core help message to get a list with possible Dash command-line options"));
-
-    connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
-    connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked()));
-    connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-    connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked()));
-    connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden()));
-    connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked()));
-#ifdef ENABLE_WALLET
-    if(walletFrame)
-    {
-        connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool)));
-        connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet()));
-        connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase()));
-        connect(unlockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(unlockWallet()));
-        connect(lockWalletAction, SIGNAL(triggered()), walletFrame, SLOT(lockWallet()));
-        connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab()));
-        connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab()));
-        connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses()));
-        connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses()));
-        connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked()));
-    }
-#endif // ENABLE_WALLET
-}
-
-void BitcoinGUI::createMenuBar()
-{
-#ifdef Q_OS_MAC
-    // Create a decoupled menu bar on Mac which stays even if the window is closed
-    appMenuBar = new QMenuBar();
-#else
-    // Get the main window's menu bar on other platforms
-    appMenuBar = menuBar();
-#endif
-
-    // Configure the menus
-    QMenu *file = appMenuBar->addMenu(tr("&File"));
-    if(walletFrame)
-    {
-        file->addAction(openAction);
-        file->addAction(backupWalletAction);
-        file->addAction(signMessageAction);
-        file->addAction(verifyMessageAction);
-        file->addSeparator();
-        file->addAction(usedSendingAddressesAction);
-        file->addAction(usedReceivingAddressesAction);
-        file->addSeparator();
-    }
-    file->addAction(quitAction);
-
-    QMenu *settings = appMenuBar->addMenu(tr("&Settings"));
-    if(walletFrame)
-    {
-        settings->addAction(encryptWalletAction);
-        settings->addAction(changePassphraseAction);
-        settings->addAction(unlockWalletAction);
-        settings->addAction(lockWalletAction);
-        settings->addSeparator();
-    }
-    settings->addAction(optionsAction);
-
-    if(walletFrame)
-    {
-        QMenu *tools = appMenuBar->addMenu(tr("&Tools"));
-        tools->addAction(openInfoAction);
-        tools->addAction(openRPCConsoleAction);
-        tools->addAction(openNetworkAction);
-        tools->addAction(openPeersAction);
-        tools->addSeparator();
-        tools->addAction(openConfEditorAction);
-        tools->addAction(showBackupsAction);
-    }
-
-    QMenu *help = appMenuBar->addMenu(tr("&Help"));
-    help->addAction(showHelpMessageAction);
-    help->addSeparator();
-    help->addAction(aboutAction);
-    help->addAction(aboutQtAction);
-}
-
-void BitcoinGUI::createToolBars()
-{
-    if(walletFrame)
-    {
-        QToolBar *toolbar = new QToolBar(tr("Tabs toolbar"));
-        toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
-        toolbar->addAction(overviewAction);
-        toolbar->addAction(sendCoinsAction);
-        toolbar->addAction(receiveCoinsAction);
-        toolbar->addAction(historyAction);
-        toolbar->setMovable(false); // remove unused icon in upper left corner
-        overviewAction->setChecked(true);
-
-        /** Create additional container for toolbar and walletFrame and make it the central widget.
-            This is a workaround mostly for toolbar styling on Mac OS but should work fine for every other OSes too.
-        */
-        QVBoxLayout *layout = new QVBoxLayout;
-        layout->addWidget(toolbar);
-        layout->addWidget(walletFrame);
-        layout->setSpacing(0);
-        layout->setContentsMargins(QMargins());
-        QWidget *containerWidget = new QWidget();
-        containerWidget->setLayout(layout);
-        setCentralWidget(containerWidget);
-    }
-}
-
-void BitcoinGUI::setClientModel(ClientModel *clientModel)
-{
-    this->clientModel = clientModel;
-    if(clientModel)
-    {
-        // Create system tray menu (or setup the dock menu) that late to prevent users from calling actions,
-        // while the client has not yet fully loaded
-        createTrayIconMenu();
-
-        // Keep up to date with client
-        setNumConnections(clientModel->getNumConnections());
-        connect(clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
-
-        setNumBlocks(clientModel->getNumBlocks());
-        connect(clientModel, SIGNAL(numBlocksChanged(int)), this, SLOT(setNumBlocks(int)));
-
-        // Receive and report messages from client model
-        connect(clientModel, SIGNAL(message(QString,QString,unsigned int)), this, SLOT(message(QString,QString,unsigned int)));
-
-        // Show progress dialog
-        connect(clientModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
-
-        rpcConsole->setClientModel(clientModel);
-#ifdef ENABLE_WALLET
-        if(walletFrame)
-        {
-            walletFrame->setClientModel(clientModel);
-        }
-#endif // ENABLE_WALLET
-        unitDisplayControl->setOptionsModel(clientModel->getOptionsModel());
-    } else {
-        // Disable possibility to show main window via action
-        toggleHideAction->setEnabled(false);
-        if(trayIconMenu)
-        {
-            // Disable context menu on tray icon
-            trayIconMenu->clear();
-        }
-    }
-}
-
-#ifdef ENABLE_WALLET
-bool BitcoinGUI::addWallet(const QString& name, WalletModel *walletModel)
-{
-    if(!walletFrame)
-        return false;
-    setWalletActionsEnabled(true);
-    return walletFrame->addWallet(name, walletModel);
-}
-
-bool BitcoinGUI::setCurrentWallet(const QString& name)
-{
-    if(!walletFrame)
-        return false;
-    return walletFrame->setCurrentWallet(name);
-}
-
-void BitcoinGUI::removeAllWallets()
-{
-    if(!walletFrame)
-        return;
-    setWalletActionsEnabled(false);
-    walletFrame->removeAllWallets();
-}
-#endif // ENABLE_WALLET
-
-void BitcoinGUI::setWalletActionsEnabled(bool enabled)
-{
-    overviewAction->setEnabled(enabled);
-    sendCoinsAction->setEnabled(enabled);
-    receiveCoinsAction->setEnabled(enabled);
-    historyAction->setEnabled(enabled);
-    encryptWalletAction->setEnabled(enabled);
-    backupWalletAction->setEnabled(enabled);
-    changePassphraseAction->setEnabled(enabled);
-    signMessageAction->setEnabled(enabled);
-    verifyMessageAction->setEnabled(enabled);
-    usedSendingAddressesAction->setEnabled(enabled);
-    usedReceivingAddressesAction->setEnabled(enabled);
-    openAction->setEnabled(enabled);
-}
-
-void BitcoinGUI::createTrayIcon(const NetworkStyle *networkStyle)
-{
-#ifndef Q_OS_MAC
-    trayIcon = new QSystemTrayIcon(this);
-    QString toolTip = tr("Dash Core client") + " " + networkStyle->getTitleAddText();
-    trayIcon->setToolTip(toolTip);
-    trayIcon->setIcon(networkStyle->getAppIcon());
-    trayIcon->show();
-#endif
-
-    notificator = new Notificator(QApplication::applicationName(), trayIcon, this);
-}
-
-void BitcoinGUI::createTrayIconMenu()
-{
-#ifndef Q_OS_MAC
-    // return if trayIcon is unset (only on non-Mac OSes)
-    if (!trayIcon)
-        return;
-
-    trayIconMenu = new QMenu(this);
-    trayIcon->setContextMenu(trayIconMenu);
-
-    connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
-            this, SLOT(trayIconActivated(QSystemTrayIcon::ActivationReason)));
-#else
-    // Note: On Mac, the dock icon is used to provide the tray's functionality.
-    MacDockIconHandler *dockIconHandler = MacDockIconHandler::instance();
-    dockIconHandler->setMainWindow((QMainWindow *)this);
-    trayIconMenu = dockIconHandler->dockMenu();
-#endif
-
-    // Configuration of the tray icon (or dock icon) icon menu
-    trayIconMenu->addAction(toggleHideAction);
-    trayIconMenu->addSeparator();
-    trayIconMenu->addAction(sendCoinsAction);
-    trayIconMenu->addAction(receiveCoinsAction);
-    trayIconMenu->addSeparator();
-    trayIconMenu->addAction(signMessageAction);
-    trayIconMenu->addAction(verifyMessageAction);
-    trayIconMenu->addSeparator();
-    trayIconMenu->addAction(optionsAction);
-    trayIconMenu->addAction(openInfoAction);
-    trayIconMenu->addAction(openRPCConsoleAction);
-    trayIconMenu->addAction(openNetworkAction);
-    trayIconMenu->addAction(openPeersAction);
-    trayIconMenu->addSeparator();
-    trayIconMenu->addAction(openConfEditorAction);
-    trayIconMenu->addAction(showBackupsAction);
-#ifndef Q_OS_MAC // This is built-in on Mac
-    trayIconMenu->addSeparator();
-    trayIconMenu->addAction(quitAction);
-#endif
-}
-
-#ifndef Q_OS_MAC
-void BitcoinGUI::trayIconActivated(QSystemTrayIcon::ActivationReason reason)
-{
-    if(reason == QSystemTrayIcon::Trigger)
-    {
-        // Click on system tray icon triggers show/hide of the main window
-        toggleHidden();
-    }
-}
-#endif
-
-void BitcoinGUI::optionsClicked()
-{
-    if(!clientModel || !clientModel->getOptionsModel())
-        return;
-
-    OptionsDialog dlg(this, enableWallet);
-    dlg.setModel(clientModel->getOptionsModel());
-    dlg.exec();
-}
-
-void BitcoinGUI::aboutClicked()
-{
-    if(!clientModel)
-        return;
-
-    HelpMessageDialog dlg(this, true);
-    dlg.exec();
-}
-
-void BitcoinGUI::showHelpMessageClicked()
-{
-    HelpMessageDialog *help = new HelpMessageDialog(this, false);
-    help->setAttribute(Qt::WA_DeleteOnClose);
-    help->show();
-}
-
-#ifdef ENABLE_WALLET
-void BitcoinGUI::openClicked()
-{
-    OpenURIDialog dlg(this);
-    if(dlg.exec())
-    {
-        emit receivedURI(dlg.getURI());
-    }
-}
-
-void BitcoinGUI::gotoOverviewPage()
-{
-    overviewAction->setChecked(true);
-    if (walletFrame) walletFrame->gotoOverviewPage();
-}
-
-void BitcoinGUI::gotoHistoryPage()
-{
-    historyAction->setChecked(true);
-    if (walletFrame) walletFrame->gotoHistoryPage();
-}
-
-void BitcoinGUI::gotoReceiveCoinsPage()
-{
-    receiveCoinsAction->setChecked(true);
-    if (walletFrame) walletFrame->gotoReceiveCoinsPage();
-}
-
-void BitcoinGUI::gotoSendCoinsPage(QString addr)
-{
-    sendCoinsAction->setChecked(true);
-    if (walletFrame) walletFrame->gotoSendCoinsPage(addr);
-}
-
-void BitcoinGUI::gotoSignMessageTab(QString addr)
-{
-    if (walletFrame) walletFrame->gotoSignMessageTab(addr);
-}
-
-void BitcoinGUI::gotoVerifyMessageTab(QString addr)
-{
-    if (walletFrame) walletFrame->gotoVerifyMessageTab(addr);
-}
-#endif // ENABLE_WALLET
-
-void BitcoinGUI::setNumConnections(int count)
-{
-    QString icon;
-    switch(count)
-    {
-    case 0: icon = ":/icons/connect_0"; break;
-    case 1: case 2: case 3: icon = ":/icons/connect_1"; break;
-    case 4: case 5: case 6: icon = ":/icons/connect_2"; break;
-    case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
-    default: icon = ":/icons/connect_4"; break;
-    }
-    QIcon connectionItem = QIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE);
-    labelConnectionsIcon->setIcon(connectionItem);
-    labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
-}
-
-void BitcoinGUI::setNumBlocks(int count)
-{
-    if(!clientModel)
-        return;
-
-    // Prevent orphan statusbar messages (e.g. hover Quit in main menu, wait until chain-sync starts -> garbelled text)
-    statusBar()->clearMessage();
-
-    // Acquire current block source
-    enum BlockSource blockSource = clientModel->getBlockSource();
-    switch (blockSource) {
-        case BLOCK_SOURCE_NETWORK:
-            progressBarLabel->setText(tr("Synchronizing with network..."));
-            break;
-        case BLOCK_SOURCE_DISK:
-            progressBarLabel->setText(tr("Importing blocks from disk..."));
-            break;
-        case BLOCK_SOURCE_REINDEX:
-            progressBarLabel->setText(tr("Reindexing blocks on disk..."));
-            break;
-        case BLOCK_SOURCE_NONE:
-            // Case: not Importing, not Reindexing and no network connection
-            progressBarLabel->setText(tr("No block source available..."));
-            break;
-    }
-
-    QString tooltip;
-
-    QDateTime lastBlockDate = clientModel->getLastBlockDate();
-    QDateTime currentDate = QDateTime::currentDateTime();
-    int secs = lastBlockDate.secsTo(currentDate);
-
-    tooltip = tr("Processed %n blocks of transaction history.", "", count);
-
-    // Set icon state: spinning if catching up, tick otherwise
-    if(secs < 25*60) // 90*60 for bitcoin but we are 4x times faster
-    {
-        tooltip = tr("Up to date") + QString(".<br>") + tooltip;
-        labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
-
-#ifdef ENABLE_WALLET
-        if(walletFrame)
-            walletFrame->showOutOfSyncWarning(false);
-#endif // ENABLE_WALLET
-
-        progressBarLabel->setVisible(false);
-        progressBar->setVisible(false);
-    }
-    else
-    {
-        // Represent time from last generated block in human readable text
-        QString timeBehindText;
-        const int HOUR_IN_SECONDS = 60*60;
-        const int DAY_IN_SECONDS = 24*60*60;
-        const int WEEK_IN_SECONDS = 7*24*60*60;
-        const int YEAR_IN_SECONDS = 31556952; // Average length of year in Gregorian calendar
-        if(secs < 2*DAY_IN_SECONDS)
-        {
-            timeBehindText = tr("%n hour(s)","",secs/HOUR_IN_SECONDS);
-        }
-        else if(secs < 2*WEEK_IN_SECONDS)
-        {
-            timeBehindText = tr("%n day(s)","",secs/DAY_IN_SECONDS);
-        }
-        else if(secs < YEAR_IN_SECONDS)
-        {
-            timeBehindText = tr("%n week(s)","",secs/WEEK_IN_SECONDS);
-        }
-        else
-        {
-            int years = secs / YEAR_IN_SECONDS;
-            int remainder = secs % YEAR_IN_SECONDS;
-            timeBehindText = tr("%1 and %2").arg(tr("%n year(s)", "", years)).arg(tr("%n week(s)","", remainder/WEEK_IN_SECONDS));
-        }
-
-        progressBarLabel->setVisible(true);
-        progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
-        progressBar->setMaximum(1000000000);
-        progressBar->setValue(clientModel->getVerificationProgress() * 1000000000.0 + 0.5);
-        progressBar->setVisible(true);
-
-        tooltip = tr("Catching up...") + QString("<br>") + tooltip;
-        if(count != prevBlocks)
-        {
-            labelBlocksIcon->setPixmap(QIcon(QString(
-                ":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
-                .pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
-            spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
-        }
-        prevBlocks = count;
-
-#ifdef ENABLE_WALLET
-        if(walletFrame)
-            walletFrame->showOutOfSyncWarning(true);
-#endif // ENABLE_WALLET
-
-        tooltip += QString("<br>");
-        tooltip += tr("Last received block was generated %1 ago.").arg(timeBehindText);
-        tooltip += QString("<br>");
-        tooltip += tr("Transactions after this will not yet be visible.");
-    }
-
-    // Don't word-wrap this (fixed-width) tooltip
-    tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
-
-    labelBlocksIcon->setToolTip(tooltip);
-    progressBarLabel->setToolTip(tooltip);
-    progressBar->setToolTip(tooltip);
-}
-
-void BitcoinGUI::message(const QString &title, const QString &message, unsigned int style, bool *ret)
-{
-    QString strTitle = tr("Dash Core"); // default title
-    // Default to information icon
-    int nMBoxIcon = QMessageBox::Information;
-    int nNotifyIcon = Notificator::Information;
-
-    QString msgType;
-
-    // Prefer supplied title over style based title
-    if (!title.isEmpty()) {
-        msgType = title;
-    }
-    else {
-        switch (style) {
-        case CClientUIInterface::MSG_ERROR:
-            msgType = tr("Error");
-            break;
-        case CClientUIInterface::MSG_WARNING:
-            msgType = tr("Warning");
-            break;
-        case CClientUIInterface::MSG_INFORMATION:
-            msgType = tr("Information");
-            break;
-        default:
-            break;
-        }
-    }
-    // Append title to "Dash - "
-    if (!msgType.isEmpty())
-        strTitle += " - " + msgType;
-
-    // Check for error/warning icon
-    if (style & CClientUIInterface::ICON_ERROR) {
-        nMBoxIcon = QMessageBox::Critical;
-        nNotifyIcon = Notificator::Critical;
-    }
-    else if (style & CClientUIInterface::ICON_WARNING) {
-        nMBoxIcon = QMessageBox::Warning;
-        nNotifyIcon = Notificator::Warning;
-    }
-
-    // Display message
-    if (style & CClientUIInterface::MODAL) {
-        // Check for buttons, use OK as default, if none was supplied
-        QMessageBox::StandardButton buttons;
-        if (!(buttons = (QMessageBox::StandardButton)(style & CClientUIInterface::BTN_MASK)))
-            buttons = QMessageBox::Ok;
-
-        showNormalIfMinimized();
-        QMessageBox mBox((QMessageBox::Icon)nMBoxIcon, strTitle, message, buttons, this);
-        int r = mBox.exec();
-        if (ret != NULL)
-            *ret = r == QMessageBox::Ok;
-    }
-    else
-        notificator->notify((Notificator::Class)nNotifyIcon, strTitle, message);
-}
-
-void BitcoinGUI::changeEvent(QEvent *e)
-{
-    QMainWindow::changeEvent(e);
-#ifndef Q_OS_MAC // Ignored on Mac
-    if(e->type() == QEvent::WindowStateChange)
-    {
-        if(clientModel && clientModel->getOptionsModel() && clientModel->getOptionsModel()->getMinimizeToTray())
-        {
-            QWindowStateChangeEvent *wsevt = static_cast<QWindowStateChangeEvent*>(e);
-            if(!(wsevt->oldState() & Qt::WindowMinimized) && isMinimized())
-            {
-                QTimer::singleShot(0, this, SLOT(hide()));
-                e->ignore();
-            }
-        }
-    }
-#endif
-}
-
-void BitcoinGUI::closeEvent(QCloseEvent *event)
-{
-#ifndef Q_OS_MAC // Ignored on Mac
-    if(clientModel && clientModel->getOptionsModel())
-    {
-        if(!clientModel->getOptionsModel()->getMinimizeOnClose())
-        {
-            QApplication::quit();
-        }
-    }
-#endif
-    QMainWindow::closeEvent(event);
-}
-
-#ifdef ENABLE_WALLET
-void BitcoinGUI::incomingTransaction(const QString& date, int unit, const CAmount& amount, const QString& type, const QString& address)
-{
-    // On new transaction, make an info balloon
-    message((amount)<0 ? tr("Sent transaction") : tr("Incoming transaction"),
-             tr("Date: %1\n"
-                "Amount: %2\n"
-                "Type: %3\n"
-                "Address: %4\n")
-                  .arg(date)
-                  .arg(BitcoinUnits::formatWithUnit(unit, amount, true))
-                  .arg(type)
-                  .arg(address), CClientUIInterface::MSG_INFORMATION);
-}
-#endif // ENABLE_WALLET
-
-void BitcoinGUI::dragEnterEvent(QDragEnterEvent *event)
-{
-    // Accept only URIs
-    if(event->mimeData()->hasUrls())
-        event->acceptProposedAction();
-}
-
-void BitcoinGUI::dropEvent(QDropEvent *event)
-{
-    if(event->mimeData()->hasUrls())
-    {
-        foreach(const QUrl &uri, event->mimeData()->urls())
-        {
-            emit receivedURI(uri.toString());
-        }
-    }
-    event->acceptProposedAction();
-}
-
-bool BitcoinGUI::eventFilter(QObject *object, QEvent *event)
-{
-    // Catch status tip events
-    if (event->type() == QEvent::StatusTip)
-    {
-        // Prevent adding text from setStatusTip(), if we currently use the status bar for displaying other stuff
-        if (progressBarLabel->isVisible() || progressBar->isVisible())
-            return true;
-    }
-    return QMainWindow::eventFilter(object, event);
-}
-
-#ifdef ENABLE_WALLET
-bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)
-{
-    // URI has to be valid
-    if (walletFrame && walletFrame->handlePaymentRequest(recipient))
-    {
-        showNormalIfMinimized();
-        gotoSendCoinsPage();
-        return true;
-    }
-    return false;
-}
-
-void BitcoinGUI::setEncryptionStatus(int status)
-{
-    switch(status)
-    {
-    case WalletModel::Unencrypted:
-        labelEncryptionIcon->hide();
-        encryptWalletAction->setChecked(false);
-        changePassphraseAction->setEnabled(false);
-        unlockWalletAction->setVisible(false);
-        lockWalletAction->setVisible(false);
-        encryptWalletAction->setEnabled(true);
-        break;
-    case WalletModel::Unlocked:
-        labelEncryptionIcon->show();
-        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
-        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
-        encryptWalletAction->setChecked(true);
-        changePassphraseAction->setEnabled(true);
-        unlockWalletAction->setVisible(false);
-        lockWalletAction->setVisible(true);
-        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
-        break;
-    case WalletModel::UnlockedForAnonymizationOnly:
-        labelEncryptionIcon->show();
-        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
-        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b> for anonimization only"));
-        encryptWalletAction->setChecked(true);
-        changePassphraseAction->setEnabled(true);
-        unlockWalletAction->setVisible(true);
-        lockWalletAction->setVisible(true);
-        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
-        break;
-    case WalletModel::Locked:
-        labelEncryptionIcon->show();
-        labelEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
-        labelEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
-        encryptWalletAction->setChecked(true);
-        changePassphraseAction->setEnabled(true);
-        unlockWalletAction->setVisible(true);
-        lockWalletAction->setVisible(false);
-        encryptWalletAction->setEnabled(false); // TODO: decrypt currently not supported
-        break;
-    }
-}
-#endif // ENABLE_WALLET
-
-void BitcoinGUI::showNormalIfMinimized(bool fToggleHidden)
-{
-    if(!clientModel)
-        return;
-
-    // activateWindow() (sometimes) helps with keyboard focus on Windows
-    if (isHidden())
-    {
-        show();
-        activateWindow();
-    }
-    else if (isMinimized())
-    {
-        showNormal();
-        activateWindow();
-    }
-    else if (GUIUtil::isObscured(this))
-    {
-        raise();
-        activateWindow();
-    }
-    else if(fToggleHidden)
-        hide();
-}
-
-void BitcoinGUI::toggleHidden()
-{
-    showNormalIfMinimized(true);
-}
-
-void BitcoinGUI::detectShutdown()
-{
-    if (ShutdownRequested())
-    {
-        if(rpcConsole)
-            rpcConsole->hide();
-        qApp->quit();
-    }
-}
-
-void BitcoinGUI::showProgress(const QString &title, int nProgress)
-{
-    if (nProgress == 0)
-    {
-        progressDialog = new QProgressDialog(title, "", 0, 100);
-        progressDialog->setWindowModality(Qt::ApplicationModal);
-        progressDialog->setMinimumDuration(0);
-        progressDialog->setCancelButton(0);
-        progressDialog->setAutoClose(false);
-        progressDialog->setValue(0);
-    }
-    else if (nProgress == 100)
-    {
-        if (progressDialog)
-        {
-            progressDialog->close();
-            progressDialog->deleteLater();
-        }
-    }
-    else if (progressDialog)
-        progressDialog->setValue(nProgress);
-}
-
-static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
-{
-    bool modal = (style & CClientUIInterface::MODAL);
-    // The SECURE flag has no effect in the Qt GUI.
-    // bool secure = (style & CClientUIInterface::SECURE);
-    style &= ~CClientUIInterface::SECURE;
-    bool ret = false;
-    // In case of modal message, use blocking connection to wait for user to click a button
-    QMetaObject::invokeMethod(gui, "message",
-                               modal ? GUIUtil::blockingGUIThreadConnection() : Qt::QueuedConnection,
-                               Q_ARG(QString, QString::fromStdString(caption)),
-                               Q_ARG(QString, QString::fromStdString(message)),
-                               Q_ARG(unsigned int, style),
-                               Q_ARG(bool*, &ret));
-    return ret;
-}
-
-void BitcoinGUI::subscribeToCoreSignals()
-{
-    // Connect signals to client
-    uiInterface.ThreadSafeMessageBox.connect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
-}
-
-void BitcoinGUI::unsubscribeFromCoreSignals()
-{
-    // Disconnect signals from client
-    uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
-}
-
-UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
-    optionsModel(0),
-    menu(0)
-{
-    createContextMenu();
-    setToolTip(tr("Unit to show amounts in. Click to select another unit."));
-}
-
-/** So that it responds to button clicks */
-void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
-{
-    onDisplayUnitsClicked(event->pos());
-}
-
-/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
-void UnitDisplayStatusBarControl::createContextMenu()
-{
-    menu = new QMenu();
-    foreach(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
-    {
-        QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
-        menuAction->setData(QVariant(u));
-        menu->addAction(menuAction);
-    }
-    connect(menu,SIGNAL(triggered(QAction*)),this,SLOT(onMenuSelection(QAction*)));
-}
-
-/** Lets the control know about the Options Model (and its signals) */
-void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
-{
-    if (optionsModel)
-    {
-        this->optionsModel = optionsModel;
-
-        // be aware of a display unit change reported by the OptionsModel object.
-        connect(optionsModel,SIGNAL(displayUnitChanged(int)),this,SLOT(updateDisplayUnit(int)));
-
-        // initialize the display units label with the current value in the model.
-        updateDisplayUnit(optionsModel->getDisplayUnit());
-    }
-}
-
-/** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
-void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
-{
-    setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(31,STATUSBAR_ICONSIZE));
-}
-
-/** Shows context menu with Display Unit options by the mouse coordinates */
-void UnitDisplayStatusBarControl::onDisplayUnitsClicked(const QPoint& point)
-{
-    QPoint globalPos = mapToGlobal(point);
-    menu->exec(globalPos);
-}
-
-/** Tells underlying optionsModel to update its current display unit. */
-void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
-{
-    if (action)
-    {
-        optionsModel->setDisplayUnit(action->data());
-    }
-}
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index a6e502477d1e..a12d99151c72 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -178,7 +178,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     labelConnectionsIcon = new QPushButton();
     labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable 
     labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
-    labelConnectionsIcon->setMaximumSize(16, 16);
+    labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
     labelBlocksIcon = new QLabel();
     if(enableWallet)
     {

From 34a205b9a6362b13f247f10a48e047427fd409a7 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Wed, 20 May 2015 09:05:46 +0200
Subject: [PATCH 1366/1819] Fix tooltip background for OSX

---
 src/qt/bitcoingui.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index a12d99151c72..9c17d81da5c7 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -176,8 +176,12 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     unitDisplayControl = new UnitDisplayStatusBarControl();
     labelEncryptionIcon = new QLabel();
     labelConnectionsIcon = new QPushButton();
-    labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable 
+    labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
+#ifndef Q_OS_MAC
     labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
+#else
+    labelConnectionsIcon->setStyleSheet("QPushButton { background-color: rgba(255, 255, 255, 0);} QPushButton QToolTip { background-color: black;}");
+#endif
     labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
     labelBlocksIcon = new QLabel();
     if(enableWallet)

From 472d2a21d6a6946bd7fb386c3a8b719bd9f00cf2 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 20 May 2015 23:09:31 +0300
Subject: [PATCH 1367/1819] fix tooltip background

---
 src/qt/bitcoingui.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 9c17d81da5c7..346fc51a3c0b 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -177,11 +177,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     labelEncryptionIcon = new QLabel();
     labelConnectionsIcon = new QPushButton();
     labelConnectionsIcon->setFlat(true); // Make the button look like a label, but clickable
-#ifndef Q_OS_MAC
-    labelConnectionsIcon->setStyleSheet("background-color: rgba(255, 255, 255, 0);");
-#else
-    labelConnectionsIcon->setStyleSheet("QPushButton { background-color: rgba(255, 255, 255, 0);} QPushButton QToolTip { background-color: black;}");
-#endif
+    labelConnectionsIcon->setStyleSheet(".QPushButton { background-color: rgba(255, 255, 255, 0);}");
     labelConnectionsIcon->setMaximumSize(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE);
     labelBlocksIcon = new QLabel();
     if(enableWallet)

From 8c4175b35930e4eee2055497ef5fa70538a70f25 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sat, 23 May 2015 13:28:33 +0200
Subject: [PATCH 1368/1819] Wallet Repair Buttons: initial commit

---
 src/qt/bitcoingui.cpp      |   5 +
 src/qt/bitcoingui.h        |   1 +
 src/qt/forms/rpcconsole.ui | 251 +++++++++++++++++++++++++++++++++++++
 src/qt/rpcconsole.cpp      |  69 ++++++++++
 src/qt/rpcconsole.h        |  12 ++
 5 files changed, 338 insertions(+)
 mode change 100644 => 100755 src/qt/bitcoingui.cpp
 mode change 100644 => 100755 src/qt/bitcoingui.h

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
old mode 100644
new mode 100755
index 346fc51a3c0b..52175fd770e4
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -217,6 +217,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
     connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
     connect(openPeersAction, SIGNAL(triggered()), rpcConsole, SLOT(showPeers()));
+    connect(openRepairAction, SIGNAL(triggered()), rpcConsole, SLOT(showRepair()));
     connect(openConfEditorAction, SIGNAL(triggered()), rpcConsole, SLOT(showConfEditor()));
     connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
     connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
@@ -352,6 +353,8 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     openNetworkAction->setStatusTip(tr("Show network monitor"));
     openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
     openPeersAction->setStatusTip(tr("Show peers info"));
+    openRepairAction = new QAction(QIcon(":/icons/options"), tr("&Repair Wallet"), this);
+    openRepairAction->setStatusTip(tr("Repair Wallet Options"));
     openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
     openConfEditorAction->setStatusTip(tr("Open configuration file"));
     showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
@@ -435,6 +438,7 @@ void BitcoinGUI::createMenuBar()
         tools->addAction(openRPCConsoleAction);
         tools->addAction(openNetworkAction);
         tools->addAction(openPeersAction);
+        tools->addAction(openRepairAction);
         tools->addSeparator();
         tools->addAction(openConfEditorAction);
         tools->addAction(showBackupsAction);
@@ -602,6 +606,7 @@ void BitcoinGUI::createTrayIconMenu()
     trayIconMenu->addAction(openRPCConsoleAction);
     trayIconMenu->addAction(openNetworkAction);
     trayIconMenu->addAction(openPeersAction);
+    trayIconMenu->addAction(openRepairAction);
     trayIconMenu->addSeparator();
     trayIconMenu->addAction(openConfEditorAction);
     trayIconMenu->addAction(showBackupsAction);
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
old mode 100644
new mode 100755
index 31a98036c531..3c01f55af733
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -109,6 +109,7 @@ class BitcoinGUI : public QMainWindow
     QAction *openRPCConsoleAction;
     QAction *openNetworkAction;
     QAction *openPeersAction;
+    QAction *openRepairAction;
     QAction *openConfEditorAction;
     QAction *showBackupsAction;
     QAction *openAction;
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 9be3caea97fa..49e9bca55c59 100755
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -1064,6 +1064,257 @@
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="tab_repair">
+      <attribute name="title">
+       <string>&amp;Wallet Repair</string>
+      </attribute>
+      <widget class="QPushButton" name="btn_salvagewallet">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>90</y>
+         <width>180</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>180</width>
+         <height>23</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Salvage Wallet</string>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="btn_rescan">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>140</y>
+         <width>180</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>180</width>
+         <height>23</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Rescan blockhain files</string>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="btn_zapwallettxes1">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>190</y>
+         <width>180</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>180</width>
+         <height>23</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Recover transactions 1</string>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="btn_zapwallettxes2">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>240</y>
+         <width>180</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>180</width>
+         <height>23</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Recover transactions 2</string>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="btn_upgradewallet">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>290</y>
+         <width>180</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="minimumSize">
+        <size>
+         <width>180</width>
+         <height>23</height>
+        </size>
+       </property>
+       <property name="text">
+        <string>Upgrade wallet format</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_helptext">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>30</y>
+         <width>711</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <weight>50</weight>
+         <bold>false</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_salvage">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>80</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_rescan">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>129</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-rescan: Rescan the block chain for missing wallet transactions.</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_zap1">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>179</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_zap2">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>229</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_upgrade">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>279</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself !)</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_header">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>10</y>
+         <width>711</width>
+         <height>16</height>
+        </rect>
+       </property>
+       <property name="font">
+        <font>
+         <pointsize>10</pointsize>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
+       <property name="text">
+        <string>Wallet repair options.</string>
+       </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
+      </widget>
+      <widget class="QPushButton" name="btn_reindex">
+       <property name="geometry">
+        <rect>
+         <x>10</x>
+         <y>340</y>
+         <width>181</width>
+         <height>23</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>Rebuild index</string>
+       </property>
+      </widget>
+      <widget class="QLabel" name="label_repair_reindex">
+       <property name="geometry">
+        <rect>
+         <x>210</x>
+         <y>330</y>
+         <width>511</width>
+         <height>41</height>
+        </rect>
+       </property>
+       <property name="text">
+        <string>-reindex: Rebuild block chain index from current blk000??.dat files.</string>
+       </property>
+      </widget>
+     </widget>
     </widget>
    </item>
   </layout>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index b6a21a632fa3..375bd71528d5 100755
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -220,6 +220,14 @@ RPCConsole::RPCConsole(QWidget *parent) :
 
     connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
     connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
+    
+    // Wallet Repair
+    connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(wallet_salvage()));
+    connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(wallet_rescan()));
+    connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(wallet_zaptxes1()));
+    connect(ui->btn_zapwallettxes2, SIGNAL(clicked()), this, SLOT(wallet_zaptxes2()));
+    connect(ui->btn_upgradewallet, SIGNAL(clicked()), this, SLOT(wallet_upgrade()));
+    connect(ui->btn_reindex, SIGNAL(clicked()), this, SLOT(wallet_reindex()));
 
     // set library version labels
     ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
@@ -336,6 +344,61 @@ static QString categoryClass(int category)
     }
 }
 
+void RPCConsole::wallet_salvage()
+{
+    restart(1);
+}
+
+void RPCConsole::wallet_rescan()
+{
+    restart(2);
+}
+
+void RPCConsole::wallet_zaptxes1()
+{
+    restart(3);
+}
+
+void RPCConsole::wallet_zaptxes2()
+{
+    restart(4);
+}
+
+void RPCConsole::wallet_upgrade()
+{
+    restart(5);
+}
+
+void RPCConsole::wallet_reindex()
+{
+    restart(6);
+}
+
+void RPCConsole::restart(int reason)
+{
+    switch(reason)
+    {
+        case 1: // -salvagewallet
+            printf("-salvagewallet\n");
+            break;
+        case 2: // -rescan
+            printf("-rescan\n");
+            break;
+        case 3: // -zapwallettxes=1
+            printf("-zapwallettxes=1\n");
+            break;
+        case 4: // -zapwallettxes=2
+            printf("-zapwallettxes=2\n");
+            break;
+        case 5: // -upgradewallet
+            printf("-upgradewallet\n");
+            break;
+        case 6: // -reindex
+            printf("-reindex\n");
+            break;
+    }
+}
+
 void RPCConsole::clear()
 {
     ui->messagesWidget->clear();
@@ -550,6 +613,12 @@ void RPCConsole::showPeers()
     show();
 }
 
+void RPCConsole::showRepair()
+{
+    ui->tabWidget->setCurrentIndex(4);
+    show();
+}
+
 void RPCConsole::showConfEditor()
 {
     GUIUtil::openConfigfile();
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index e20d8fec9f4d..875a8f4df6bf 100755
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -32,6 +32,7 @@ class RPCConsole: public QDialog
     ~RPCConsole();
 
     void setClientModel(ClientModel *model);
+    void restart(int reason);
 
     enum MessageClass {
         MC_ERROR,
@@ -59,6 +60,15 @@ private slots:
 
 public slots:
     void clear();
+    
+    /** Wallet repair options */
+    void wallet_salvage();
+    void wallet_rescan();
+    void wallet_zaptxes1();
+    void wallet_zaptxes2();
+    void wallet_upgrade();
+    void wallet_reindex();
+    
     void reject();
     void message(int category, const QString &message, bool html = false);
     /** Set number of connections shown in the UI */
@@ -79,6 +89,8 @@ public slots:
     void showNetwork();
     /** Switch to peers tab and show */
     void showPeers();
+    /** Switch to wallet-repair tab and show */
+    void showRepair();
     /** Open external (default) editor with dash.conf */
     void showConfEditor();	
     /** Handle selection of peer in peers list */

From 9a6fe03974fdeb6c6ae45bce2c4a0a9705faabbc Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 25 May 2015 18:29:11 +0200
Subject: [PATCH 1369/1819] Wallet Repair Buttons: initial commit (+ file
 permissions restored)

---
 src/init.cpp                     | 62 ++++++++++++++++++++++++++++++++
 src/init.h                       |  1 +
 src/qt/bitcoingui.cpp            | 13 ++++++-
 src/qt/bitcoingui.h              |  4 +++
 src/qt/coincontroldialog.cpp     |  0
 src/qt/dash.cpp                  | 31 ++++++++++++++++
 src/qt/guiutil.cpp               |  0
 src/qt/guiutil.h                 |  0
 src/qt/optionsdialog.cpp         |  0
 src/qt/optionsmodel.cpp          |  0
 src/qt/optionsmodel.h            |  0
 src/qt/overviewpage.cpp          |  0
 src/qt/rpcconsole.cpp            | 51 ++++++++++++--------------
 src/qt/rpcconsole.h              |  5 ++-
 src/qt/transactiondescdialog.cpp |  0
 src/qt/transactionview.cpp       |  0
 src/util.cpp                     |  0
 17 files changed, 136 insertions(+), 31 deletions(-)
 mode change 100755 => 100644 src/init.cpp
 mode change 100755 => 100644 src/init.h
 mode change 100755 => 100644 src/qt/bitcoingui.cpp
 mode change 100755 => 100644 src/qt/bitcoingui.h
 mode change 100755 => 100644 src/qt/coincontroldialog.cpp
 mode change 100755 => 100644 src/qt/guiutil.cpp
 mode change 100755 => 100644 src/qt/guiutil.h
 mode change 100755 => 100644 src/qt/optionsdialog.cpp
 mode change 100755 => 100644 src/qt/optionsmodel.cpp
 mode change 100755 => 100644 src/qt/optionsmodel.h
 mode change 100755 => 100644 src/qt/overviewpage.cpp
 mode change 100755 => 100644 src/qt/rpcconsole.cpp
 mode change 100755 => 100644 src/qt/rpcconsole.h
 mode change 100755 => 100644 src/qt/transactiondescdialog.cpp
 mode change 100755 => 100644 src/qt/transactionview.cpp
 mode change 100755 => 100644 src/util.cpp

diff --git a/src/init.cpp b/src/init.cpp
old mode 100755
new mode 100644
index b897f99eac5d..6a8ef4d2bbdb
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -143,6 +143,68 @@ class CCoinsViewErrorCatcher : public CCoinsViewBacked
 static CCoinsViewDB *pcoinsdbview = NULL;
 static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 
+/** Preparing steps before restarting the wallet */
+void Prepare_Restart()
+{
+    printf("Prepare_Restart called! ---------------------------\n");
+        LogPrintf("%s: In progress...\n", __func__);
+    static CCriticalSection cs_Shutdown;
+    TRY_LOCK(cs_Shutdown, lockShutdown);
+    if (!lockShutdown)
+        return;
+
+    /// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
+    /// for example if the data directory was found to be locked.
+    /// Be sure that anything that writes files or flushes caches only does this if the respective
+    /// module was initialized.
+    RenameThread("dash-shutoff");
+    mempool.AddTransactionsUpdated(1);
+    StopRPCThreads();
+#ifdef ENABLE_WALLET
+    if (pwalletMain)
+        bitdb.Flush(false);
+    GenerateBitcoins(false, NULL, 0);
+#endif
+    StopNode();
+    DumpMasternodes();
+    DumpBudgets();
+    UnregisterNodeSignals(GetNodeSignals());
+
+    if (fFeeEstimatesInitialized)
+    {
+        boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
+        CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
+        if (!est_fileout.IsNull())
+            mempool.WriteFeeEstimates(est_fileout);
+        else
+            LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
+        fFeeEstimatesInitialized = false;
+    }
+
+    {
+        LOCK(cs_main);
+        if (pcoinsTip != NULL) {
+            FlushStateToDisk();
+        }
+        delete pcoinsTip;
+        pcoinsTip = NULL;
+        delete pcoinscatcher;
+        pcoinscatcher = NULL;
+        delete pcoinsdbview;
+        pcoinsdbview = NULL;
+        delete pblocktree;
+        pblocktree = NULL;
+    }
+#ifdef ENABLE_WALLET
+    if (pwalletMain)
+        bitdb.Flush(true);
+#endif
+#ifndef WIN32
+    boost::filesystem::remove(GetPidFile());
+#endif
+    UnregisterAllValidationInterfaces();
+}
+
 void Shutdown()
 {
     LogPrintf("%s: In progress...\n", __func__);
diff --git a/src/init.h b/src/init.h
old mode 100755
new mode 100644
index f2f7ac6747ab..4078ceaf2e3a
--- a/src/init.h
+++ b/src/init.h
@@ -20,6 +20,7 @@ extern CWallet* pwalletMain;
 void StartShutdown();
 bool ShutdownRequested();
 void Shutdown();
+void Prepare_Restart();
 bool AppInit2(boost::thread_group& threadGroup);
 
 /** The help message mode determines what help message to show */
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
old mode 100755
new mode 100644
index 52175fd770e4..c1fbc22e6452
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -213,6 +213,7 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     statusBar()->addWidget(progressBar);
     statusBar()->addPermanentWidget(frameBlocks);
 
+    // Jump directly to tabs in RPC-console
     connect(openInfoAction, SIGNAL(triggered()), rpcConsole, SLOT(showInfo()));
     connect(openRPCConsoleAction, SIGNAL(triggered()), rpcConsole, SLOT(showConsole()));
     connect(openNetworkAction, SIGNAL(triggered()), rpcConsole, SLOT(showNetwork()));
@@ -222,6 +223,9 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
     connect(showBackupsAction, SIGNAL(triggered()), rpcConsole, SLOT(showBackups()));
     connect(labelConnectionsIcon, SIGNAL(clicked()), rpcConsole, SLOT(showPeers()));
 
+    // Get restart command-line parameters and handle restart
+    connect(rpcConsole, SIGNAL(handleRestart(QStringList)), this, SLOT(handleRestart(QStringList)));
+    
     // prevents an open debug window from becoming stuck/unusable on client shutdown
     connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide()));
 
@@ -1114,6 +1118,13 @@ void BitcoinGUI::unsubscribeFromCoreSignals()
     uiInterface.ThreadSafeMessageBox.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _2, _3));
 }
 
+/** Get restart command-line parameters and request restart */
+void BitcoinGUI::handleRestart(QStringList args)
+{
+    if (!ShutdownRequested())
+        emit requestedRestart(args);
+}
+
 UnitDisplayStatusBarControl::UnitDisplayStatusBarControl() :
     optionsModel(0),
     menu(0)
@@ -1176,4 +1187,4 @@ void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
     {
         optionsModel->setDisplayUnit(action->data());
     }
-}
+}
\ No newline at end of file
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
old mode 100755
new mode 100644
index 3c01f55af733..d58c87cf7763
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -146,12 +146,16 @@ class BitcoinGUI : public QMainWindow
 signals:
     /** Signal raised when a URI was entered or dragged to the GUI */
     void receivedURI(const QString &uri);
+    /** Restart handling */
+    void requestedRestart(QStringList args);
 
 public slots:
     /** Set number of connections shown in the UI */
     void setNumConnections(int count);
     /** Set number of blocks shown in the UI */
     void setNumBlocks(int count);
+    /** Get restart command-line parameters and request restart */
+    void handleRestart(QStringList args);
 
     /** Notify the user of an event from the core network or transaction handling code.
        @param[in] title     the message box / notification title
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 1df30d261634..bd385ffaad82 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -45,6 +45,7 @@
 #include <QLibraryInfo>
 #include <QLocale>
 #include <QMessageBox>
+#include <QProcess>
 #include <QSettings>
 #include <QThread>
 #include <QTimer>
@@ -173,6 +174,7 @@ class BitcoinCore: public QObject
 public slots:
     void initialize();
     void shutdown();
+    void restart(QStringList args);
 
 signals:
     void initializeResult(int retval);
@@ -224,6 +226,7 @@ public slots:
 
 signals:
     void requestedInitialize();
+    void requestedRestart(QStringList args);
     void requestedShutdown();
     void stopThread();
     void splashFinished(QWidget *window);
@@ -277,8 +280,35 @@ void BitcoinCore::initialize()
     }
 }
 
+void BitcoinCore::restart(QStringList args) // ToDo
+{
+    printf("restart in dash.cpp -------------------------------------------\n");
+    for (int i = 0; i < args.size(); ++i){
+        printf("%s\n", args.at(i).toStdString().c_str());
+    }
+
+    try
+    {
+        qDebug() << __func__ << ": Running Restart in thread";
+        threadGroup.interrupt_all();
+        threadGroup.join_all();
+        // Shutdown();
+        Prepare_Restart();
+        qDebug() << __func__ << ": Shutdown finished";
+        emit shutdownResult(1);
+        boost::this_thread::sleep( boost::posix_time::seconds(1) );
+        QProcess::startDetached(QApplication::applicationFilePath(), args);
+        QCoreApplication::quit();        
+    } catch (std::exception& e) {
+        handleRunawayException(&e);
+    } catch (...) {
+        handleRunawayException(NULL);
+    }
+}
+
 void BitcoinCore::shutdown()
 {
+    printf("shutdown in dash.cpp -------------------------------------------\n");
     try
     {
         qDebug() << __func__ << ": Running Shutdown in thread";
@@ -375,6 +405,7 @@ void BitcoinApplication::startThread()
     connect(executor, SIGNAL(runawayException(QString)), this, SLOT(handleRunawayException(QString)));
     connect(this, SIGNAL(requestedInitialize()), executor, SLOT(initialize()));
     connect(this, SIGNAL(requestedShutdown()), executor, SLOT(shutdown()));
+    connect(window, SIGNAL(requestedRestart(QStringList)), executor, SLOT(restart(QStringList)));
     /*  make sure executor object is deleted in its own thread */
     connect(this, SIGNAL(stopThread()), executor, SLOT(deleteLater()));
     connect(this, SIGNAL(stopThread()), coreThread, SLOT(quit()));
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
old mode 100755
new mode 100644
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
old mode 100755
new mode 100644
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
old mode 100755
new mode 100644
index 375bd71528d5..6ce0f162b7da
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -221,7 +221,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
     connect(ui->clearButton, SIGNAL(clicked()), this, SLOT(clear()));
     connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
     
-    // Wallet Repair
+    // Wallet Repair Buttons
     connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(wallet_salvage()));
     connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(wallet_rescan()));
     connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(wallet_zaptxes1()));
@@ -344,59 +344,52 @@ static QString categoryClass(int category)
     }
 }
 
+/** Restart wallet with "-salvagewallet" */
 void RPCConsole::wallet_salvage()
 {
-    restart(1);
+    build_parameter_list(QString("-salvagewallet"));
 }
 
+/** Restart wallet with "-rescan" */
 void RPCConsole::wallet_rescan()
 {
-    restart(2);
+    build_parameter_list(QString("-rescan"));
 }
 
+/** Restart wallet with "-zapwallettxes=1" */
 void RPCConsole::wallet_zaptxes1()
 {
-    restart(3);
+    build_parameter_list(QString("-zapwallettxes=1"));
 }
 
+/** Restart wallet with "-zapwallettxes=2" */
 void RPCConsole::wallet_zaptxes2()
 {
-    restart(4);
+    build_parameter_list(QString("-zapwallettxes=2"));
 }
 
+/** Restart wallet with "-upgradewallet" */
 void RPCConsole::wallet_upgrade()
 {
-    restart(5);
+    build_parameter_list(QString("-upgradewallet"));
 }
 
+/** Restart wallet with "-reindex" */
 void RPCConsole::wallet_reindex()
 {
-    restart(6);
+    build_parameter_list(QString("-reindex"));
 }
 
-void RPCConsole::restart(int reason)
+/** Build command-line parameter list for restart */
+void RPCConsole::build_parameter_list(QString arg)
 {
-    switch(reason)
-    {
-        case 1: // -salvagewallet
-            printf("-salvagewallet\n");
-            break;
-        case 2: // -rescan
-            printf("-rescan\n");
-            break;
-        case 3: // -zapwallettxes=1
-            printf("-zapwallettxes=1\n");
-            break;
-        case 4: // -zapwallettxes=2
-            printf("-zapwallettxes=2\n");
-            break;
-        case 5: // -upgradewallet
-            printf("-upgradewallet\n");
-            break;
-        case 6: // -reindex
-            printf("-reindex\n");
-            break;
-    }
+    // Get command-line arguments and remove the application name
+    QStringList args = QApplication::arguments();
+    args.removeFirst();
+    // Append repair parameter to command line. We don't care whether it might already be there
+    args.append(arg);
+    // Send command-line arguments to BitcoinGUI::handleRestart()
+    emit handleRestart(args);
 }
 
 void RPCConsole::clear()
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
old mode 100755
new mode 100644
index 875a8f4df6bf..fedde85aa9d7
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -32,7 +32,6 @@ class RPCConsole: public QDialog
     ~RPCConsole();
 
     void setClientModel(ClientModel *model);
-    void restart(int reason);
 
     enum MessageClass {
         MC_ERROR,
@@ -104,11 +103,15 @@ public slots:
     // For RPC command executor
     void stopExecutor();
     void cmdRequest(const QString &command);
+    /** Get restart command-line parameters and handle restart */
+    void handleRestart(QStringList args);
 
 private:
     static QString FormatBytes(quint64 bytes);
     void startExecutor();
     void setTrafficGraphRange(int mins);
+    /** Build parameter list for restart */
+    void build_parameter_list(QString arg);
     /** show detailed information on ui about selected node */
     void updateNodeDetail(const CNodeCombinedStats *stats);
 
diff --git a/src/qt/transactiondescdialog.cpp b/src/qt/transactiondescdialog.cpp
old mode 100755
new mode 100644
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
old mode 100755
new mode 100644
diff --git a/src/util.cpp b/src/util.cpp
old mode 100755
new mode 100644

From 3ab747d8ffcb4886b1d21295c8cff8d0beb18703 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 25 May 2015 22:59:38 +0200
Subject: [PATCH 1370/1819] Wallet Repair Buttons added

---
 src/init.cpp    |  3 +--
 src/net.cpp     | 12 +++++++-----
 src/net.h       |  6 +++++-
 src/qt/dash.cpp | 19 ++++++++-----------
 4 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 6a8ef4d2bbdb..5a2e55d40b5b 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -146,8 +146,7 @@ static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 /** Preparing steps before restarting the wallet */
 void Prepare_Restart()
 {
-    printf("Prepare_Restart called! ---------------------------\n");
-        LogPrintf("%s: In progress...\n", __func__);
+    LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
     TRY_LOCK(cs_Shutdown, lockShutdown);
     if (!lockShutdown)
diff --git a/src/net.cpp b/src/net.cpp
index 119e235d34a2..e42557af7f08 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1739,11 +1739,13 @@ class CNetCleanup
 }
 instance_of_cnetcleanup;
 
-
-
-
-
-
+void CExplicitNetCleanup::callCleanup()
+{
+    // Explicit call to destructor of CNetCleanup because it's not implicitly called
+    // when the wallet is restarted from within the wallet itself.
+    CNetCleanup *tmp = new CNetCleanup();
+    delete tmp; // Stroustrup's gonna kill me for that
+}
 
 void RelayTransaction(const CTransaction& tx)
 {
diff --git a/src/net.h b/src/net.h
index 44c59abfb98b..5ec47ee24e2b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -672,7 +672,11 @@ class CNode
     static uint64_t GetTotalBytesSent();
 };
 
-
+class CExplicitNetCleanup
+{
+public:
+    static void callCleanup();
+};
 
 class CTransaction;
 void RelayTransaction(const CTransaction& tx);
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index bd385ffaad82..c91eeac4447e 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -13,6 +13,7 @@
 #include "guiconstants.h"
 #include "guiutil.h"
 #include "intro.h"
+#include "net.h"
 #include "networkstyle.h"
 #include "optionsmodel.h"
 #include "splashscreen.h"
@@ -280,25 +281,22 @@ void BitcoinCore::initialize()
     }
 }
 
-void BitcoinCore::restart(QStringList args) // ToDo
-{
-    printf("restart in dash.cpp -------------------------------------------\n");
-    for (int i = 0; i < args.size(); ++i){
-        printf("%s\n", args.at(i).toStdString().c_str());
-    }
-
+void BitcoinCore::restart(QStringList args)
+{   
     try
     {
         qDebug() << __func__ << ": Running Restart in thread";
         threadGroup.interrupt_all();
         threadGroup.join_all();
-        // Shutdown();
         Prepare_Restart();
         qDebug() << __func__ << ": Shutdown finished";
         emit shutdownResult(1);
-        boost::this_thread::sleep( boost::posix_time::seconds(1) );
+        CExplicitNetCleanup::callCleanup();
+
+        boost::this_thread::sleep( boost::posix_time::seconds(1));
         QProcess::startDetached(QApplication::applicationFilePath(), args);
-        QCoreApplication::quit();        
+        qDebug() << __func__ << ": Restart initiated...";
+        QCoreApplication::quit();
     } catch (std::exception& e) {
         handleRunawayException(&e);
     } catch (...) {
@@ -308,7 +306,6 @@ void BitcoinCore::restart(QStringList args) // ToDo
 
 void BitcoinCore::shutdown()
 {
-    printf("shutdown in dash.cpp -------------------------------------------\n");
     try
     {
         qDebug() << __func__ << ": Running Shutdown in thread";

From efe377fa69cb25d84bb1852c4b44e0786ee4ea6b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 26 May 2015 07:56:51 -0700
Subject: [PATCH 1371/1819] tie budget system to masternode payment system

---
 src/main.cpp                 |  1 -
 src/masternode-budget.cpp    | 72 +++++++++++++++++++++++-------------
 src/masternode-budget.h      | 18 ++++++---
 src/masternode-payments.cpp  | 40 +++++++++++---------
 src/masternode-payments.h    |  7 ++--
 src/rpcmasternode-budget.cpp | 20 ++++++----
 src/rpcmasternode.cpp        |  2 +-
 7 files changed, 98 insertions(+), 62 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4ebfd943d1b4..5a17873abb4c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3243,7 +3243,6 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
                 LogPrintf("%s : Update Masternode Last Paid Time - %d\n", __func__, chainActive.Tip()->nHeight);
             }
 
-
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             mnscan.DoMasternodePOSChecks();
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 6b9efabb60d5..609bcebb79ec 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -19,6 +19,13 @@ std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
 std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
 std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
 
+int GetBudgetPaymentCycleBlocks(){
+    if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616; //(60*24*30)/2.6
+
+    //for testing purposes
+    return 50;
+}
+
 //
 // CBudgetDB
 //
@@ -245,9 +252,9 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strP
 
     nBlockStart = nBlockStartIn;
 
-    int nCycleStart = (nBlockStart-(nBlockStart % PAYMENT_CYCLE_BLOCKS));
+    int nCycleStart = (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
     //calculate the end of the cycle for this vote, add half a cycle (vote will be deleted after that block)
-    nBlockEnd = nCycleStart + (PAYMENT_CYCLE_BLOCKS*nPaymentCount) + PAYMENT_CYCLE_BLOCKS/2;
+    nBlockEnd = nCycleStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount) + GetBudgetPaymentCycleBlocks()/2;
 
     address = addressIn;
     nAmount = nAmountIn;
@@ -288,7 +295,7 @@ bool CBudgetProposal::IsValid()
     if(pindexPrev->nHeight - nBlockStart < 0) return false;
     if(pindexPrev->nHeight > nBlockEnd) return false;
 
-    if(nBlockEnd - PAYMENT_CYCLE_BLOCKS <= nBlockStart) return false;
+    if(nBlockEnd - GetBudgetPaymentCycleBlocks() <= nBlockStart) return false;
 
     return true;
 }
@@ -528,8 +535,7 @@ void CBudgetManager::UpdateProposal(CBudgetVote& vote)
 {
     LOCK(cs);
     if(!mapProposals.count(vote.nProposalHash)){
-        //LogPrintf("Unknown proposal %d\n", vote.nProposalHash);
-        //should prob ask for it
+        LogPrintf("ERROR : Unknown proposal %d\n", vote.nProposalHash.ToString().c_str());
     	return;
     }
 
@@ -613,7 +619,7 @@ int CBudgetProposal::GetBlockStartCycle()
 {
     //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    return (nBlockStart-(nBlockStart % PAYMENT_CYCLE_BLOCKS));
+    return (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
 }
 
 int CBudgetProposal::GetBlockCurrentCycle()
@@ -623,35 +629,24 @@ int CBudgetProposal::GetBlockCurrentCycle()
 
     if(pindexPrev->nHeight >= GetBlockEndCycle()) return -1;
 
-    return (pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS));
+    return (pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks()));
 }
 
 int CBudgetProposal::GetBlockEndCycle()
 {
     //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    return nBlockEnd-(PAYMENT_CYCLE_BLOCKS/2);
+    return nBlockEnd-(GetBudgetPaymentCycleBlocks()/2);
 }
 
 int CBudgetProposal::GetPaymentCountTotal()
 {
-    return (GetBlockEndCycle()-GetBlockStartCycle())/PAYMENT_CYCLE_BLOCKS;
+    return (GetBlockEndCycle()-GetBlockStartCycle())/GetBudgetPaymentCycleBlocks();
 }
 
 int CBudgetProposal::GetPaymentCountLeft()
 {
-    return (GetBlockEndCycle()-GetBlockCurrentCycle())/PAYMENT_CYCLE_BLOCKS;
-}
-
-bool CBudgetManager::IsBudgetPaymentBlock(int nHeight)
-{
-    if(nHeight > 158000+((576*30)*15)) return (nHeight % 7) == 0  ; // 417200 - 57.5% - 2016-02-08 -- 12.5% of blocks
-    if(nHeight > 158000+((576*30)*13)) return (nHeight % 10) == 0 ; // 382640 - 55.0% - 2015-12-07  -- 10.0% of blocks
-    if(nHeight > 158000+((576*30)*11)) return (nHeight % 13) == 0 ; // 348080 - 52.5% - 2015-10-05 -- 7.5 of blocks
-    if(nHeight > 158000+((576*30)* 9)) return (nHeight % 20) == 0 ; // 313520 - 50.0% - 2015-08-03 -- 5.0% of blocks
-    if(nHeight > 158000+((576*30)* 7)) return (nHeight % 40) == 0 ; // 278960 - 47.5% - 2015-06-01 -- 2.5% of blocks
-
-    return false;
+    return (GetBlockEndCycle()-GetBlockCurrentCycle())/GetBudgetPaymentCycleBlocks();
 }
 
 int64_t CBudgetManager::GetTotalBudget()
@@ -831,10 +826,11 @@ CFinalizedBudget *CBudgetManager::Find(uint256 nHash)
 
 bool CBudgetManager::PropExists(uint256 nHash)
 {
-    return mapProposals.count(nHash);
+    if(mapProposals.count(nHash)) return true;
+    return false;
 }
 
-bool CBudgetManager::IsBudgetBlock(int nBlockHeight){    
+bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){    
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {   
@@ -966,8 +962,7 @@ bool CFinalizedBudgetBroadcast::SignatureValid()
 bool CFinalizedBudget::IsValid()
 {
     //must be the correct block for payment to happen (once a month)
-    if(nBlockStart % PAYMENT_CYCLE_BLOCKS != 0) return false;
-
+    if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
     if(GetBlockEnd() - nBlockStart > 100) return false;
 
     //make sure all prop names exist
@@ -1073,7 +1068,8 @@ void CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote)
     LOCK(cs);
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
-        //LogPrintf("Unknown proposal %d\n", vote.nBudgetHash);
+        LogPrintf("ERROR: Unknown Finalized Proposal %s\n", vote.nBudgetHash.ToString().c_str());
+        //should ask for it
         return;
     }
 
@@ -1152,4 +1148,28 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string s
     nBlockStart = nBlockStartIn;
     BOOST_FOREACH(uint256 hash, vecProposalsIn) vecProposals.push_back(hash);
     mapVotes.clear();
+}
+
+std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
+{
+    std::string ret = "unknown-budget";
+
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {   
+        CFinalizedBudget* prop = &((*it).second);
+        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+            uint256 nPropHash = prop->GetProposalByBlock(nBlockHeight);
+            if(ret == "unknown-budget"){
+                ret = nPropHash.ToString().c_str();
+            } else {
+                ret += ",";
+                ret += nPropHash.ToString().c_str();
+            }
+        }
+
+        it++;
+    }
+
+    return ret;
 }
\ No newline at end of file
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index b39077885d54..cf03943d4042 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -34,14 +34,14 @@ extern std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
 extern std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
 extern std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
 
-//Amount of blocks in a months period of time (using 2.6 minutes per)
-#define PAYMENT_CYCLE_BLOCKS 16615 //(60*24*30)/2.6
-
 extern CBudgetManager budget;
 
 void DumpBudgets();
 void GetMasternodeBudgetEscrow(CScript& payee);
 
+//Amount of blocks in a months period of time (using 2.6 minutes per)
+int GetBudgetPaymentCycleBlocks();
+
 /** Save Budget Manager (budget.dat)
  */
 class CBudgetDB
@@ -93,20 +93,21 @@ class CBudgetManager
     CBudgetProposal *Find(const std::string &strProposalName);
     CFinalizedBudget *Find(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
+
     
     void CleanUp();
 
     int64_t GetTotalBudget();
     std::vector<CBudgetProposal*> GetBudget();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
-    bool IsBudgetPaymentBlock(int nHeight);
+    bool IsBudgetPaymentBlock(int nBlockHeight);
     void AddProposal(CBudgetProposal& prop);
     void UpdateProposal(CBudgetVote& vote);
     void AddFinalizedBudget(CFinalizedBudget& prop);
     void UpdateFinalizedBudget(CFinalizedBudgetVote& vote);
     bool PropExists(uint256 nHash);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
-    bool IsBudgetBlock(int nBlockHeight);
+    std::string GetRequiredPaymentsString(int64_t nBlockHeight);
 
     void Clear(){
         printf("Not implemented\n");
@@ -169,6 +170,13 @@ class CFinalizedBudget
     std::string GetSubmittedBy() {return vin.prevout.ToStringShort();}
     int GetVoteCount() {return (int)mapVotes.size();}
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
+    uint256 GetProposalByBlock(int64_t nBlockHeight)
+    {
+        int i = nBlockHeight - GetBlockStart();
+        if(i < 0) return 0;
+        if(i > (int)vecProposals.size()-1) return 0;
+        return vecProposals[i];
+    }
 
     uint256 GetHash(){
         /* 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index d4c044b08c6e..147fe1d20ed4 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -21,7 +21,7 @@ map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
 {
     //check if it's a budget block
-    if(budget.IsBudgetBlock(nBlockHeight)){
+    if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         if(budget.IsTransactionValid(txNew, nBlockHeight)){
             return true;
         }
@@ -36,6 +36,15 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
     return false;
 }
 
+std::string GetRequiredPaymentsString(int64_t nBlockHeight)
+{
+    if(budget.IsBudgetPaymentBlock(nBlockHeight)){
+        return budget.GetRequiredPaymentsString(nBlockHeight);
+    } else {
+        return masternodePayments.GetRequiredPaymentsString(nBlockHeight);
+    }
+}
+
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(IsInitialBlockDownload()) return;
@@ -54,7 +63,6 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
     }
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
-
         LOCK(cs_masternodepayments);
 
         //this is required in litemode
@@ -130,7 +138,7 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
 {
     uint256 blockHash = 0;
-    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-576)) {
+    if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-100)) {
         return false;
     }
 
@@ -203,16 +211,14 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
     {
-        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){
-            CTxDestination address1;
-            ExtractDestination(payee.scriptPubKey, address1);
-            CBitcoinAddress address2(address1);
+        CTxDestination address1;
+        ExtractDestination(payee.scriptPubKey, address1);
+        CBitcoinAddress address2(address1);
 
-            if(ret != "Unknown"){
-                ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
-            } else {
-                ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
-            }
+        if(ret != "Unknown"){
+            ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
+        } else {
+            ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
         }
     }
 
@@ -272,7 +278,7 @@ bool CMasternodePaymentWinner::IsValid()
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
-    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight, MIN_MNPAYMENTS_PROTO_VERSION);
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, MIN_MNPAYMENTS_PROTO_VERSION);
 
     if(n == -1)
     {
@@ -293,13 +299,12 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 {
     LOCK(cs_masternodepayments);
 
-
     if(!fMasterNode) return false;
 
     //reference node - hybrid mode
 
     if(!IsReferenceNode(activeMasternode.vin)){
-        int n = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight, MIN_MNPAYMENTS_PROTO_VERSION);
+        int n = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight-100, MIN_MNPAYMENTS_PROTO_VERSION);
 
         if(n == -1)
         {
@@ -330,10 +335,9 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         newWinner.AddPayee(payee, masternodePayment);
 
     } else {
-        
         CScript payeeSource;
         uint256 hash;
-        if(!GetBlockHash(hash, nBlockHeight-10)) return false;
+        if(!GetBlockHash(hash, nBlockHeight-100)) return false;
         unsigned int nHash;
         memcpy(&nHash, &hash, 2);
 
@@ -353,7 +357,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             } else {
                 payee = GetScriptForDestination(pmn->pubkey.GetID());
             }
-
+            
             payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
             newWinner.AddPayee(payee, masternodePayment);
             
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 7e91f7598d92..0bd19ce3a37d 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -27,6 +27,7 @@ static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
 void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 bool IsReferenceNode(CTxIn& vin);
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
+std::string GetRequiredPaymentsString(int64_t nBlockHeight);
 
 class CMasternodePayee : public CTxOut
 {
@@ -37,11 +38,11 @@ class CMasternodePayee : public CTxOut
         scriptPubKey = CScript();
         nValue = 0;
         nVotes = 0;
-    }
+    } 
 
-    CMasternodePayee(CAmount nValue, CScript payee) {
+    CMasternodePayee(CAmount nValueIn, CScript payee) {
         scriptPubKey = payee;
-        nValue = nValue;
+        nValue = nValueIn;
         nVotes = 0;
     }
 };
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index c15f56eb8105..0bac700b6bf7 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -63,7 +63,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Invalid payment count, must be more than zero.";
 
         //set block min
-        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - PAYMENT_CYCLE_BLOCKS*(nPaymentCount+1);
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
 
         int nBlockStart = params[4].get_int();
         if(nBlockStart < nBlockMin)
@@ -159,7 +159,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Invalid payment count, must be more than zero.";
 
         //set block min
-        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - PAYMENT_CYCLE_BLOCKS*(nPaymentCount+1);
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
 
         int nBlockStart = params[4].get_int();
         if(nBlockStart < nBlockMin)
@@ -195,6 +195,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
         prop.Relay();
+        budget.AddProposal(prop);
 
         CBudgetVote vote(activeMasternode.vin, prop.GetHash(), nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
@@ -203,6 +204,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
+        budget.UpdateProposal(vote);
 
     }
 
@@ -317,7 +319,6 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 "  show        - Show existing finalized budgets\n"
                 );
 
-
     if(strCommand == "suggest")
     {
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
@@ -328,22 +329,21 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return "Must be synced to suggest";
 
         if (params.size() < 3)
-            throw runtime_error("Correct usage of vote-many is 'mnfinalbudget suggest BUDGET_NAME PROPNAME [PROP2 PROP3 PROP4]'");
+            throw runtime_error("Correct usage of suggest is 'mnfinalbudget suggest BUDGET_NAME PROPNAME [PROP2 PROP3 PROP4]'");
 
         std::string strBudgetName = params[1].get_str();
         if(strBudgetName.size() > 20)
             return "Invalid budget name, limit of 20 characters.";
 
-        int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % PAYMENT_CYCLE_BLOCKS)+PAYMENT_CYCLE_BLOCKS;
+        int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
 
         std::vector<uint256> vecProps;
-        for(int i = 3; i < (int)params.size(); i++)
+        for(int i = 2; i < (int)params.size(); i++)
         {
-            std::string strHash = params[1].get_str();
+            std::string strHash = params[i].get_str();
             uint256 hash(strHash);
 
             vecProps.push_back(hash);
-            printf("%s\n", hash.ToString().c_str());
         }
 
         CPubKey pubKeyMasternode;
@@ -364,6 +364,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
         prop.Relay();
+        budget.AddFinalizedBudget(prop);
 
         CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
@@ -372,6 +373,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
+        budget.UpdateFinalizedBudget(vote);
 
         return "success";
 
@@ -426,6 +428,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
             mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
+            budget.UpdateFinalizedBudget(vote);
 
             success++;
         }
@@ -458,6 +461,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
+        budget.UpdateFinalizedBudget(vote);
 
         return "success";
     }
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index d7c5efafe54e..15e2b582249f 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -396,7 +396,7 @@ Value masternode(const Array& params, bool fHelp)
 
         for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
         {
-            obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       masternodePayments.GetRequiredPaymentsString(nHeight).c_str()));
+            obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       GetRequiredPaymentsString(nHeight).c_str()));
         }
 
         return obj;

From e68350d3729a029af3570d9ca47370ec4f74cb1f Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Tue, 26 May 2015 23:09:16 +0200
Subject: [PATCH 1372/1819] Wallet Repair Buttons (possible segfault on OSX
 fixed)

---
 src/init.cpp               | 98 ++++++++++++++++++++------------------
 src/qt/dash.cpp            |  2 -
 src/qt/forms/rpcconsole.ui |  4 +-
 3 files changed, 53 insertions(+), 51 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 5a2e55d40b5b..7aa5714aa640 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -58,6 +58,7 @@ CWallet* pwalletMain = NULL;
 int nWalletBackups = 10;
 #endif
 bool fFeeEstimatesInitialized = false;
+bool wallet_restart = false;  // true: restarted false: shutdown
 
 #ifdef WIN32
 // Win32 LevelDB doesn't use filedescriptors, and the ones used for
@@ -146,6 +147,7 @@ static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 /** Preparing steps before restarting the wallet */
 void Prepare_Restart()
 {
+    wallet_restart = true; // we're restarting the wallet, so skip shutdown later in the process
     LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
     TRY_LOCK(cs_Shutdown, lockShutdown);
@@ -206,62 +208,64 @@ void Prepare_Restart()
 
 void Shutdown()
 {
-    LogPrintf("%s: In progress...\n", __func__);
-    static CCriticalSection cs_Shutdown;
-    TRY_LOCK(cs_Shutdown, lockShutdown);
-    if (!lockShutdown)
-        return;
-
-    /// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
-    /// for example if the data directory was found to be locked.
-    /// Be sure that anything that writes files or flushes caches only does this if the respective
-    /// module was initialized.
-    RenameThread("dash-shutoff");
-    mempool.AddTransactionsUpdated(1);
-    StopRPCThreads();
+    if(!wallet_restart){ // most of shutdown is already done when we're restarting the wallet
+        LogPrintf("%s: In progress...\n", __func__);
+        static CCriticalSection cs_Shutdown;
+        TRY_LOCK(cs_Shutdown, lockShutdown);
+        if (!lockShutdown)
+            return;
+
+        /// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
+        /// for example if the data directory was found to be locked.
+        /// Be sure that anything that writes files or flushes caches only does this if the respective
+        /// module was initialized.
+        RenameThread("dash-shutoff");
+        mempool.AddTransactionsUpdated(1);
+        StopRPCThreads();
 #ifdef ENABLE_WALLET
-    if (pwalletMain)
-        bitdb.Flush(false);
-    GenerateBitcoins(false, NULL, 0);
+        if (pwalletMain)
+            bitdb.Flush(false);
+        GenerateBitcoins(false, NULL, 0);
 #endif
-    StopNode();
-    DumpMasternodes();
-    DumpBudgets();
-    UnregisterNodeSignals(GetNodeSignals());
+        StopNode();
+        DumpMasternodes();
+        DumpBudgets();
+        UnregisterNodeSignals(GetNodeSignals());
 
-    if (fFeeEstimatesInitialized)
-    {
-        boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
-        CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
-        if (!est_fileout.IsNull())
-            mempool.WriteFeeEstimates(est_fileout);
-        else
-            LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
-        fFeeEstimatesInitialized = false;
-    }
+        if (fFeeEstimatesInitialized)
+        {
+            boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
+            CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
+            if (!est_fileout.IsNull())
+                mempool.WriteFeeEstimates(est_fileout);
+            else
+                LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
+            fFeeEstimatesInitialized = false;
+        }
 
-    {
-        LOCK(cs_main);
-        if (pcoinsTip != NULL) {
-            FlushStateToDisk();
+        {
+            LOCK(cs_main);
+            if (pcoinsTip != NULL) {
+                FlushStateToDisk();
+            }
+            delete pcoinsTip;
+            pcoinsTip = NULL;
+            delete pcoinscatcher;
+            pcoinscatcher = NULL;
+            delete pcoinsdbview;
+            pcoinsdbview = NULL;
+            delete pblocktree;
+            pblocktree = NULL;
         }
-        delete pcoinsTip;
-        pcoinsTip = NULL;
-        delete pcoinscatcher;
-        pcoinscatcher = NULL;
-        delete pcoinsdbview;
-        pcoinsdbview = NULL;
-        delete pblocktree;
-        pblocktree = NULL;
-    }
 #ifdef ENABLE_WALLET
-    if (pwalletMain)
-        bitdb.Flush(true);
+        if (pwalletMain)
+            bitdb.Flush(true);
 #endif
 #ifndef WIN32
-    boost::filesystem::remove(GetPidFile());
+        boost::filesystem::remove(GetPidFile());
 #endif
-    UnregisterAllValidationInterfaces();
+        UnregisterAllValidationInterfaces();
+    } // skipped during a restart because it's already done
 #ifdef ENABLE_WALLET
     delete pwalletMain;
     pwalletMain = NULL;
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index c91eeac4447e..55cb775b9ca9 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -292,8 +292,6 @@ void BitcoinCore::restart(QStringList args)
         qDebug() << __func__ << ": Shutdown finished";
         emit shutdownResult(1);
         CExplicitNetCleanup::callCleanup();
-
-        boost::this_thread::sleep( boost::posix_time::seconds(1));
         QProcess::startDetached(QApplication::applicationFilePath(), args);
         qDebug() << __func__ << ": Restart initiated...";
         QCoreApplication::quit();
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 49e9bca55c59..06f7a8fed569 100755
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -1084,7 +1084,7 @@
         </size>
        </property>
        <property name="text">
-        <string>Salvage Wallet</string>
+        <string>Salvage wallet</string>
        </property>
       </widget>
       <widget class="QPushButton" name="btn_rescan">
@@ -1103,7 +1103,7 @@
         </size>
        </property>
        <property name="text">
-        <string>Rescan blockhain files</string>
+        <string>Rescan blockchain files</string>
        </property>
       </widget>
       <widget class="QPushButton" name="btn_zapwallettxes1">

From 41eb74dc820fedeb2dff42f981c4684565fd65f8 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@evan-macs-MacBook-Pro.local>
Date: Wed, 27 May 2015 09:28:55 -0700
Subject: [PATCH 1373/1819] Stable budget implementation

- All budgeting code seems to be rather stable now. Serialization/caching is working rather well.
- Fixed some ambiguous variable names within the budgeting system that were causing the file caching to not work all of the time
---
 src/main.cpp                 | 26 +++++++++++++-------------
 src/masternode-budget.cpp    | 24 ++++++++++++------------
 src/masternode-budget.h      | 16 ++++++++--------
 src/masternode-payments.cpp  |  1 +
 src/rpcmasternode-budget.cpp | 19 +++++++++----------
 5 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5a17873abb4c..4781ed3844f8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3945,17 +3945,17 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_SPORK:
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
-        return true; // mapMasternodePayeeVotes.count(inv.hash);
+        return mapMasternodePayeeVotes.count(inv.hash);
     case MSG_MASTERNODE_SCANNING_ERROR:
         return mapMasternodeScanningErrors.count(inv.hash);
     case MSG_BUDGET_VOTE:
-        return mapMasternodeBudgetVotes.count(inv.hash);
+        return mapSeenMasternodeBudgetVotes.count(inv.hash);
     case MSG_BUDGET_PROPOSAL:
-        return mapMasternodeBudgetProposals.count(inv.hash);
+        return mapSeenMasternodeBudgetProposals.count(inv.hash);
     case MSG_BUDGET_FINALIZED_VOTE:
-        return mapFinalizedBudgetVotes.count(inv.hash);
+        return mapSeenFinalizedBudgetVotes.count(inv.hash);
     case MSG_BUDGET_FINALIZED:
-        return mapFinalizedBudgets.count(inv.hash);
+        return mapSeenFinalizedBudgets.count(inv.hash);
     case MSG_MASTERNODE_ANNOUNCE:
         return mapSeenMasternodeBroadcast.count(inv.hash);
     case MSG_MASTERNODE_PING:
@@ -4130,40 +4130,40 @@ void static ProcessGetData(CNode* pfrom)
                 }
                 
                 if (!pushed && inv.type == MSG_BUDGET_VOTE) {
-                    if(mapMasternodeBudgetVotes.count(inv.hash)){
+                    if(mapSeenMasternodeBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapMasternodeBudgetVotes[inv.hash];
+                        ss << mapSeenMasternodeBudgetVotes[inv.hash];
                         pfrom->PushMessage("mvote", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_BUDGET_PROPOSAL) {
-                    if(mapMasternodeBudgetProposals.count(inv.hash)){
+                    if(mapSeenMasternodeBudgetProposals.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapMasternodeBudgetProposals[inv.hash];
+                        ss << mapSeenMasternodeBudgetProposals[inv.hash];
                         pfrom->PushMessage("mprop", ss);
                         pushed = true;
                     }
                 }
                 
                 if (!pushed && inv.type == MSG_BUDGET_FINALIZED_VOTE) {
-                    if(mapFinalizedBudgetVotes.count(inv.hash)){
+                    if(mapSeenFinalizedBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapFinalizedBudgetVotes[inv.hash];
+                        ss << mapSeenFinalizedBudgetVotes[inv.hash];
                         pfrom->PushMessage("fbvote", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_BUDGET_FINALIZED) {
-                    if(mapFinalizedBudgets.count(inv.hash)){
+                    if(mapSeenFinalizedBudgets.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapFinalizedBudgets[inv.hash];
+                        ss << mapSeenFinalizedBudgets[inv.hash];
                         pfrom->PushMessage("fbs", ss);
                         pushed = true;
                     }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 609bcebb79ec..1d6ee8a06dfc 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -14,10 +14,10 @@
 CBudgetManager budget;
 CCriticalSection cs_budget;
 
-std::map<uint256, CBudgetProposalBroadcast> mapMasternodeBudgetProposals;
-std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
-std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
-std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
+std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
+std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
+std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
+std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
 
 int GetBudgetPaymentCycleBlocks(){
     if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616; //(60*24*30)/2.6
@@ -355,7 +355,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CBudgetProposalBroadcast prop;
         vRecv >> prop;
 
-        if(mapMasternodeBudgetProposals.count(prop.GetHash())){
+        if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())){
             return;
         }
 
@@ -376,7 +376,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;         
         }
 
-        mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+        mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
             CBudgetProposal p(prop);
             budget.AddProposal(p);
@@ -393,7 +393,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CBudgetVote vote;
         vRecv >> vote;
 
-        if(mapMasternodeBudgetVotes.count(vote.GetHash())){
+        if(mapSeenMasternodeBudgetVotes.count(vote.GetHash())){
             return;
         }
 
@@ -409,7 +409,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;         
         }
 
-        mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
         	budget.UpdateProposal(vote);
         	vote.Relay();
@@ -426,7 +426,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         printf("34\n");
 
-        if(mapFinalizedBudgets.count(prop.GetHash())){
+        if(mapSeenFinalizedBudgets.count(prop.GetHash())){
             return;
         }
 
@@ -453,7 +453,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;         
         }
 
-        mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+        mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
             printf("42\n");
 
@@ -474,7 +474,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CFinalizedBudgetVote vote;
         vRecv >> vote;
 
-        if(mapFinalizedBudgetVotes.count(vote.GetHash())){
+        if(mapSeenFinalizedBudgetVotes.count(vote.GetHash())){
             return;
         }
 
@@ -490,7 +490,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;         
         }
 
-        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
             budget.UpdateFinalizedBudget(vote);
             vote.Relay();
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index cf03943d4042..1de042e073dd 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -29,10 +29,10 @@ class CBudgetVote;
 #define VOTE_YES      1
 #define VOTE_NO       2
 
-extern std::map<uint256, CBudgetProposalBroadcast> mapMasternodeBudgetProposals;
-extern std::map<uint256, CBudgetVote> mapMasternodeBudgetVotes;
-extern std::map<uint256, CFinalizedBudgetBroadcast> mapFinalizedBudgets;
-extern std::map<uint256, CFinalizedBudgetVote> mapFinalizedBudgetVotes;
+extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
+extern std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
+extern std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
+extern std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
 
 extern CBudgetManager budget;
 
@@ -123,10 +123,10 @@ class CBudgetManager
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(mapMasternodeBudgetProposals);
-        READWRITE(mapMasternodeBudgetVotes);
-        READWRITE(mapFinalizedBudgets);
-        READWRITE(mapMasternodeBudgetVotes);
+        READWRITE(mapSeenMasternodeBudgetProposals);
+        READWRITE(mapSeenMasternodeBudgetVotes);
+        READWRITE(mapSeenFinalizedBudgets);
+        READWRITE(mapSeenFinalizedBudgetVotes);
 
         READWRITE(mapProposals);
         READWRITE(mapFinalizedBudgets);
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 147fe1d20ed4..051db59830c1 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -98,6 +98,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
 
+        mapMasternodePayeeVotes.insert(make_pair(winner.GetHash(), winner));
         if(masternodePayments.AddWinningMasternode(winner)){
             winner.Relay();
         }
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 0bac700b6bf7..0821b7e6c719 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -1,5 +1,4 @@
-// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2012 The Bitcoin developers
+// Copyright (c) 2014-2015 The Dash Developers
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
@@ -118,7 +117,7 @@ Value mnbudget(const Array& params, bool fHelp)
             if(!prop.Sign(keyMasternode, pubKeyMasternode)){
                 return "Failure to sign.";
             }
-            mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+            mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
             prop.Relay();
 
             CBudgetVote vote(pmn->vin, prop.GetHash(), nVote);
@@ -126,7 +125,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 return "Failure to sign.";
             }
 
-            mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
 
             success++;
@@ -193,7 +192,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+        mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
         prop.Relay();
         budget.AddProposal(prop);
 
@@ -202,7 +201,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateProposal(vote);
 
@@ -362,7 +361,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         if(!prop.IsValid())
             return "Invalid prop (are all the hashes correct?)";
 
-        mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+        mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
         prop.Relay();
         budget.AddFinalizedBudget(prop);
 
@@ -371,7 +370,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateFinalizedBudget(vote);
 
@@ -426,7 +425,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 continue;
             }
 
-            mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
             budget.UpdateFinalizedBudget(vote);
 
@@ -459,7 +458,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateFinalizedBudget(vote);
 

From 66dcf6bbc73b5853f0efaa1289a10a04c7883d63 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@evan-macs-MacBook-Pro.local>
Date: Wed, 27 May 2015 10:11:00 -0700
Subject: [PATCH 1374/1819] cleaned up naming of budget functions

---
 src/masternode-budget.cpp    |  4 ++--
 src/masternode-budget.h      |  4 ++--
 src/rpcmasternode-budget.cpp | 15 ++++++---------
 3 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 1d6ee8a06dfc..cef9f3c78047 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -639,12 +639,12 @@ int CBudgetProposal::GetBlockEndCycle()
     return nBlockEnd-(GetBudgetPaymentCycleBlocks()/2);
 }
 
-int CBudgetProposal::GetPaymentCountTotal()
+int CBudgetProposal::GetTotalPaymentCount()
 {
     return (GetBlockEndCycle()-GetBlockStartCycle())/GetBudgetPaymentCycleBlocks();
 }
 
-int CBudgetProposal::GetPaymentCountLeft()
+int CBudgetProposal::GetRemainingPaymentCount()
 {
     return (GetBlockEndCycle()-GetBlockCurrentCycle())/GetBudgetPaymentCycleBlocks();
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 1de042e073dd..39a738f9f452 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -321,8 +321,8 @@ class CBudgetProposal
     int GetBlockStart() {return nBlockStart;}
     int GetBlockEnd() {return nBlockEnd;}
     CScript GetPayee() {return address;}
-    int GetPaymentCountTotal();
-    int GetPaymentCountLeft();
+    int GetTotalPaymentCount();
+    int GetRemainingPaymentCount();
     int GetBlockStartCycle();
     int GetBlockCurrentCycle();
     int GetBlockEndCycle();
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 0821b7e6c719..d02725dc0a0f 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -47,7 +47,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 8)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -143,7 +143,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 8)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS USD_AMOUNT YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -226,8 +226,8 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("PaymentCountTotal",  (int64_t)prop->GetPaymentCountTotal()));
-            bObj.push_back(Pair("PaymentCountLeft",  (int64_t)prop->GetPaymentCountLeft()));
+            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
+            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
             bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
             bObj.push_back(Pair("Ratio",  prop->GetRatio()));
             bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
@@ -262,8 +262,8 @@ Value mnbudget(const Array& params, bool fHelp)
         obj.push_back(Pair("URL",  prop->GetURL().c_str()));
         obj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
         obj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-        obj.push_back(Pair("PaymentCountTotal",  (int64_t)prop->GetPaymentCountTotal()));
-        obj.push_back(Pair("PaymentCountLeft",  (int64_t)prop->GetPaymentCountLeft()));
+        obj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
+        obj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
         obj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
         obj.push_back(Pair("Ratio",  prop->GetRatio()));
         obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
@@ -469,12 +469,9 @@ Value mnfinalbudget(const Array& params, bool fHelp)
     {
         Object resultObj;
 
-        printf("1\n");
         std::vector<CFinalizedBudget*> winningFbs = budget.GetFinalizedBudgets();
         BOOST_FOREACH(CFinalizedBudget* prop, winningFbs)
         {
-            printf("2\n");
-
             Object bObj;
             bObj.push_back(Pair("SubmittedBy",  prop->GetSubmittedBy().c_str()));
             bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));

From fe55b12a1f0ccb8f43df1040a5ca281cc95c9771 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@evan-macs-MacBook-Pro.local>
Date: Wed, 27 May 2015 12:47:01 -0700
Subject: [PATCH 1375/1819] added improvements for finding next masternode to
 get paid

---
 src/main.cpp                |  1 -
 src/masternode-budget.cpp   | 10 ----------
 src/masternode-payments.cpp | 30 +++++++++++++++++++++++-------
 src/masternode-payments.h   | 14 +++++++++++++-
 src/masternodeman.cpp       |  3 +++
 5 files changed, 39 insertions(+), 19 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 4781ed3844f8..c376f19bd7b5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3232,7 +3232,6 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     if(!fLiteMode){
         if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
-
             CScript payee;
             CTxIn vin;
             if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight, payee)){
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index cef9f3c78047..0ca373403e48 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -424,29 +424,21 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CFinalizedBudgetBroadcast prop;
         vRecv >> prop;
 
-        printf("34\n");
-
         if(mapSeenFinalizedBudgets.count(prop.GetHash())){
             return;
         }
 
-        printf("36\n");
-
         if(!prop.SignatureValid()){
             LogPrintf("fbs - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        printf("37\n");
-
         if(!prop.IsValid()) {
             printf("fbs - invalid prop\n");
             return;
         }
 
-        printf("38\n");
-
         CMasternode* pmn = mnodeman.Find(prop.vin);
         if(pmn == NULL) {
             LogPrintf("fbs - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
@@ -455,8 +447,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            printf("42\n");
-
             CFinalizedBudget p(prop);
             budget.AddFinalizedBudget(p);
             prop.Relay();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 051db59830c1..8f18fb839e74 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -65,7 +65,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
         LOCK(cs_masternodepayments);
 
-        //this is required in litemode
+        //this is required in litemodef
         CMasternodePaymentWinner winner;
         vRecv >> winner;
 
@@ -98,8 +98,8 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
 
-        mapMasternodePayeeVotes.insert(make_pair(winner.GetHash(), winner));
         if(masternodePayments.AddWinningMasternode(winner)){
+            printf("relay %s  - %s \n", winner.GetHash().ToString().c_str(), winner.ToString().c_str());
             winner.Relay();
         }
     }
@@ -136,6 +136,26 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
     return false;
 }
 
+bool CMasternodePayments::IsScheduled(CMasternode& mn)
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+
+    CScript mnpayee;
+    mnpayee = GetScriptForDestination(mn.pubkey.GetID());
+
+    CScript payee;
+    for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+10; h++){
+        if(mapMasternodeBlocks.count(h)){
+            mapMasternodeBlocks[h].GetPayee(payee);
+            if(payee != CScript() && mnpayee == payee) return true;
+            if(mn.donationAddress != CScript() && mn.donationAddress == payee) return true;
+        }
+    }
+
+    return false;
+}
+
 bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
 {
     uint256 blockHash = 0;
@@ -330,11 +350,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     CMasternodePaymentWinner newWinner(activeMasternode.vin);
 
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
-        //is budget payment block
-        CScript payee;
-        GetMasternodeBudgetEscrow(payee);
-        newWinner.AddPayee(payee, masternodePayment);
-
+        //is budget payment block -- handled by the budgeting software
     } else {
         CScript payeeSource;
         uint256 hash;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 0bd19ce3a37d..0540ac85355f 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -9,6 +9,7 @@
 #include "key.h"
 #include "main.h"
 #include "masternode.h"
+#include <boost/lexical_cast.hpp>
 
 using namespace std;
 
@@ -144,7 +145,17 @@ class CMasternodePaymentWinner
         READWRITE(nBlockHeight);
         READWRITE(payee);
         READWRITE(vchSig);
-     }
+    }
+
+    std::string ToString()
+    {
+        std::string ret = "";
+        ret += vinMasternode.ToString();
+        ret += ", " + boost::lexical_cast<std::string>(nBlockHeight);
+        ret += ", " + payee.ToString();
+        ret += ", " + boost::lexical_cast<std::string>((int)vchSig.size());
+        return ret;
+    }
 };
 
 //
@@ -174,6 +185,7 @@ class CMasternodePayments
 
     bool GetBlockPayee(int nBlockHeight, CScript& payee);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
+    bool IsScheduled(CMasternode& mn);
 
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 6ec77920c59e..b3019c5c8d2b 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -362,6 +362,9 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment()
         mn.Check();
         if(!mn.IsEnabled()) continue;
 
+        //it's in the list -- so let's skip it
+        if(masternodePayments.IsScheduled(mn)) continue;
+
         if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
         }

From 6f49808caae1e0e973c52707ac2f0d150b53534a Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Wed, 27 May 2015 22:35:46 +0200
Subject: [PATCH 1376/1819] Wallet Repair Buttons: refactoring to remove
 redundant code

---
 src/init.cpp    | 79 +++++++++++--------------------------------------
 src/init.h      |  2 +-
 src/qt/dash.cpp |  2 +-
 3 files changed, 20 insertions(+), 63 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 7aa5714aa640..9bb44d777c75 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -58,7 +58,7 @@ CWallet* pwalletMain = NULL;
 int nWalletBackups = 10;
 #endif
 bool fFeeEstimatesInitialized = false;
-bool wallet_restart = false;  // true: restarted false: shutdown
+bool wallet_restart = false;  // true: restart false: shutdown
 
 #ifdef WIN32
 // Win32 LevelDB doesn't use filedescriptors, and the ones used for
@@ -144,10 +144,10 @@ class CCoinsViewErrorCatcher : public CCoinsViewBacked
 static CCoinsViewDB *pcoinsdbview = NULL;
 static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 
-/** Preparing steps before restarting the wallet */
-void Prepare_Restart()
+/** Preparing steps before shutting down or restarting the wallet */
+void Prepare_Shutdown()
 {
-    wallet_restart = true; // we're restarting the wallet, so skip shutdown later in the process
+    wallet_restart = true; // Needed when we restart the wallet
     LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
     TRY_LOCK(cs_Shutdown, lockShutdown);
@@ -206,66 +206,23 @@ void Prepare_Restart()
     UnregisterAllValidationInterfaces();
 }
 
+/**
+* Shutdown is split into 2 parts:
+* Part 1: shut down everything but the main wallet instance (done in Prepare_Shutdown() )
+* Part 2: delete wallet instance
+*
+* In case of a restart Prepare_Shutdown() was already called before, but this method here gets
+* called implicitly when the parent object is deleted. In this case we have to skip the
+* Prepare_Shutdown() part because it was already executed and just delete the wallet instance.
+*/
 void Shutdown()
 {
-    if(!wallet_restart){ // most of shutdown is already done when we're restarting the wallet
-        LogPrintf("%s: In progress...\n", __func__);
-        static CCriticalSection cs_Shutdown;
-        TRY_LOCK(cs_Shutdown, lockShutdown);
-        if (!lockShutdown)
-            return;
-
-        /// Note: Shutdown() must be able to handle cases in which AppInit2() failed part of the way,
-        /// for example if the data directory was found to be locked.
-        /// Be sure that anything that writes files or flushes caches only does this if the respective
-        /// module was initialized.
-        RenameThread("dash-shutoff");
-        mempool.AddTransactionsUpdated(1);
-        StopRPCThreads();
-#ifdef ENABLE_WALLET
-        if (pwalletMain)
-            bitdb.Flush(false);
-        GenerateBitcoins(false, NULL, 0);
-#endif
-        StopNode();
-        DumpMasternodes();
-        DumpBudgets();
-        UnregisterNodeSignals(GetNodeSignals());
-
-        if (fFeeEstimatesInitialized)
-        {
-            boost::filesystem::path est_path = GetDataDir() / FEE_ESTIMATES_FILENAME;
-            CAutoFile est_fileout(fopen(est_path.string().c_str(), "wb"), SER_DISK, CLIENT_VERSION);
-            if (!est_fileout.IsNull())
-                mempool.WriteFeeEstimates(est_fileout);
-            else
-                LogPrintf("%s: Failed to write fee estimates to %s\n", __func__, est_path.string());
-            fFeeEstimatesInitialized = false;
-        }
+    // Shutdown part 1: prepare shutdown
+    if(!wallet_restart){
+        Prepare_Shutdown();
+    }
 
-        {
-            LOCK(cs_main);
-            if (pcoinsTip != NULL) {
-                FlushStateToDisk();
-            }
-            delete pcoinsTip;
-            pcoinsTip = NULL;
-            delete pcoinscatcher;
-            pcoinscatcher = NULL;
-            delete pcoinsdbview;
-            pcoinsdbview = NULL;
-            delete pblocktree;
-            pblocktree = NULL;
-        }
-#ifdef ENABLE_WALLET
-        if (pwalletMain)
-            bitdb.Flush(true);
-#endif
-#ifndef WIN32
-        boost::filesystem::remove(GetPidFile());
-#endif
-        UnregisterAllValidationInterfaces();
-    } // skipped during a restart because it's already done
+   // Shutdown part 2: delete wallet instance
 #ifdef ENABLE_WALLET
     delete pwalletMain;
     pwalletMain = NULL;
diff --git a/src/init.h b/src/init.h
index 4078ceaf2e3a..93a0fdf396d1 100644
--- a/src/init.h
+++ b/src/init.h
@@ -20,7 +20,7 @@ extern CWallet* pwalletMain;
 void StartShutdown();
 bool ShutdownRequested();
 void Shutdown();
-void Prepare_Restart();
+void Prepare_Shutdown();
 bool AppInit2(boost::thread_group& threadGroup);
 
 /** The help message mode determines what help message to show */
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 55cb775b9ca9..0ef040da34cd 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -288,7 +288,7 @@ void BitcoinCore::restart(QStringList args)
         qDebug() << __func__ << ": Running Restart in thread";
         threadGroup.interrupt_all();
         threadGroup.join_all();
-        Prepare_Restart();
+        Prepare_Shutdown();
         qDebug() << __func__ << ": Shutdown finished";
         emit shutdownResult(1);
         CExplicitNetCleanup::callCleanup();

From d470eddc0105ccaa02931f047bc307eb0c883859 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@evan-macs-MacBook-Pro.local>
Date: Wed, 27 May 2015 15:07:53 -0700
Subject: [PATCH 1377/1819] fixed hashing issues with mnw messages

---
 src/main.cpp                | 2 --
 src/masternode-budget.cpp   | 6 +-----
 src/masternode-payments.cpp | 1 -
 src/masternode-payments.h   | 5 ++++-
 src/qt/utilitydialog.cpp    | 5 +----
 5 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c376f19bd7b5..aba83270ee1f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4437,8 +4437,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "inv")
     {
-        printf("58\n");
-
         vector<CInv> vInv;
         vRecv >> vInv;
         if (vInv.size() > MAX_INV_SZ)
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 0ca373403e48..d681ccd82612 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -337,8 +337,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
     LOCK(cs_budget);
 
-    printf("%s\n", strCommand.c_str());
-
     if (strCommand == "mnvs") { //Masternode vote sync
         if(pfrom->HasFulfilledRequest("mnvs")) {
             LogPrintf("mnvs - peer already asked me for the list\n");
@@ -435,7 +433,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         if(!prop.IsValid()) {
-            printf("fbs - invalid prop\n");
+            LogPrintf("fbs - invalid prop\n");
             return;
         }
 
@@ -450,8 +448,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             CFinalizedBudget p(prop);
             budget.AddFinalizedBudget(p);
             prop.Relay();
-            
-            printf("43\n");
 
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 8f18fb839e74..8d951380c929 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -99,7 +99,6 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
 
         if(masternodePayments.AddWinningMasternode(winner)){
-            printf("relay %s  - %s \n", winner.GetHash().ToString().c_str(), winner.ToString().c_str());
             winner.Relay();
         }
     }
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 0540ac85355f..2f528e9606f3 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -124,7 +124,10 @@ class CMasternodePaymentWinner
     }
 
     uint256 GetHash(){
-        return Hash(BEGIN(payee), END(payee));
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << payee;
+
+        return ss.GetHash();        
     }
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index ab932efbb9a9..c0bfc47c41b1 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -42,26 +42,23 @@ HelpMessageDialog::HelpMessageDialog(QWidget *parent, bool about) :
     if (about)
     {
         setWindowTitle(tr("About Dash Core"));
-        printf("1");
 
         /// HTML-format the license message from the core
         QString licenseInfo = QString::fromStdString(LicenseInfo());
         QString licenseInfoHTML = licenseInfo;
-        printf("2");
+
         // Make URLs clickable
         QRegExp uri("<(.*)>", Qt::CaseSensitive, QRegExp::RegExp2);
         uri.setMinimal(true); // use non-greedy matching
         licenseInfoHTML.replace(uri, "<a href=\"\\1\">\\1</a>");
         // Replace newlines with HTML breaks
         licenseInfoHTML.replace("\n\n", "<br><br>");
-        printf("3");
 
         ui->helpMessageLabel->setTextFormat(Qt::RichText);
         ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
         text = version + "\n" + licenseInfo;
         ui->helpMessageLabel->setText(version + "<br><br>" + licenseInfoHTML);
         ui->helpMessageLabel->setWordWrap(true);
-        printf("4");
     } else {
         setWindowTitle(tr("Command-line options"));
         QString header = tr("Usage:") + "\n" +

From bd4a7f2fad88738e3c2bbfd9912f80198ea76240 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@evan-macs-MacBook-Pro.local>
Date: Thu, 28 May 2015 10:45:31 -0700
Subject: [PATCH 1378/1819] Masternode payment consensus via quorums

- Payees are chosen by their last payment, if no payment it's based on their hash
- Fixed a few issues with counting quorum votes
---
 src/main.cpp                | 10 ++++++----
 src/masternode-payments.cpp | 16 +++++++++-------
 src/masternode-payments.h   |  4 +++-
 src/masternode.cpp          | 12 ++++--------
 src/masternode.h            | 10 +++++++++-
 src/masternodeman.cpp       | 21 ++++++++++++++-------
 src/masternodeman.h         |  1 +
 7 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index aba83270ee1f..8f2046723ce5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3234,11 +3234,13 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
             CScript payee;
             CTxIn vin;
-            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight, payee)){
-                //UPDATE MASTERNODE LAST PAID TIME
-                CMasternode* pmn = mnodeman.Find(vin);
-                if(pmn != NULL) pmn->nLastPaid = GetAdjustedTime(); 
 
+            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight+1, payee)){
+                //UPDATE MASTERNODE LAST PAID TIME
+                CMasternode* pmn = mnodeman.Find(payee);
+                if(pmn != NULL) {
+                    pmn->nLastPaid = GetAdjustedTime(); 
+                }
                 LogPrintf("%s : Update Masternode Last Paid Time - %d\n", __func__, chainActive.Tip()->nHeight);
             }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 8d951380c929..31aa5996b81e 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -128,7 +128,7 @@ bool CMasternodePaymentWinner::Sign(CKey& keyMasternode, CPubKey& pubKeyMasterno
 
 bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 {
-    if(!mapMasternodeBlocks.count(nBlockHeight)){
+    if(mapMasternodeBlocks.count(nBlockHeight)){
         return mapMasternodeBlocks[nBlockHeight].GetPayee(payee);
     }
 
@@ -146,9 +146,11 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn)
     CScript payee;
     for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+10; h++){
         if(mapMasternodeBlocks.count(h)){
-            mapMasternodeBlocks[h].GetPayee(payee);
-            if(payee != CScript() && mnpayee == payee) return true;
-            if(mn.donationAddress != CScript() && mn.donationAddress == payee) return true;
+            if(mapMasternodeBlocks[h].GetPayee(payee)){
+                if(mnpayee == payee || mn.donationAddress == payee) {
+                    return true;
+                }
+            }
         }
     }
 
@@ -169,7 +171,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
     mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
 
     if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
-       CMasternodeBlockPayees blockPayees;
+       CMasternodeBlockPayees blockPayees(winnerIn.nBlockHeight);
        mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
     }
 
@@ -236,9 +238,9 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
         CBitcoinAddress address2(address1);
 
         if(ret != "Unknown"){
-            ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
+            ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue) + ":" + boost::lexical_cast<std::string>(payee.nVotes);
         } else {
-            ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
+            ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue) + ":" + boost::lexical_cast<std::string>(payee.nVotes);
         }
     }
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 2f528e9606f3..605eb4787182 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -86,7 +86,7 @@ class CMasternodeBlockPayees
             }
         }        
 
-        return nVotes > -1;
+        return (nVotes > -1);
     }
 
     bool IsTransactionValid(const CTransaction& txNew);
@@ -126,6 +126,8 @@ class CMasternodePaymentWinner
     uint256 GetHash(){
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << payee;
+        ss << nBlockHeight;
+        ss << vinMasternode.prevout;
 
         return ss.GetHash();        
     }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 90a9c6bb5419..e6bdda282657 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -85,9 +85,7 @@ CMasternode::CMasternode()
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
     nVotedTimes = 0;
-
-    //mark last paid as current for new entries
-    nLastPaid = GetAdjustedTime();
+    nLastPaid = 0;
 }
 
 CMasternode::CMasternode(const CMasternode& other)
@@ -138,7 +136,7 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     donationPercentage = newDonationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = GetAdjustedTime();    
+    nLastPaid = 0;    
     nVotedTimes = 0;
 }
 
@@ -269,9 +267,7 @@ CMasternodeBroadcast::CMasternodeBroadcast()
     donationPercentage = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-
-    //mark last paid as current for new entries
-    nLastPaid = GetAdjustedTime();
+    nLastPaid = 0;
 }
 
 CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
@@ -295,7 +291,7 @@ CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubK
     donationPercentage = newDonationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = GetAdjustedTime();  
+    nLastPaid = 0;  
 }
 
 CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
diff --git a/src/masternode.h b/src/masternode.h
index 6d493d0a6912..1254d70e4321 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -165,8 +165,16 @@ class CMasternode
 
     int64_t SecondsSincePayment()
     {
-        return (GetAdjustedTime() - nLastPaid);
+        int64_t sec = (GetAdjustedTime() - nLastPaid);
+        if(sec < 60*60*24*30) return sec; //if it's less than 30 days, give seconds
 
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << vin;
+        ss << sigTime;
+        uint256 hash =  ss.GetHash();
+
+        memcpy(&sec, &hash, 64);
+        return sec;
     }
 
     void UpdateFromNewBroadcast(CMasternodeBroadcast& mnb);
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index b3019c5c8d2b..03f6e15132ec 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -326,6 +326,20 @@ void CMasternodeMan::DsegUpdate(CNode* pnode)
     mWeAskedForMasternodeList[pnode->addr] = askAgain;
 }
 
+CMasternode *CMasternodeMan::Find(const CScript &payee)
+{
+    LOCK(cs);
+    CScript payee2;
+
+    BOOST_FOREACH(CMasternode& mn, vMasternodes)
+    {
+        payee2 = GetScriptForDestination(mn.pubkey.GetID());
+        if(payee2 == payee)
+            return &mn;
+    }
+    return NULL;
+}
+
 CMasternode *CMasternodeMan::Find(const CTxIn &vin)
 {
     LOCK(cs);
@@ -578,14 +592,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         // make sure it's still unspent
         //  - this is checked later by .check() in many places and by ThreadCheckDarkSendPool()
-
-        //if it's a broadcast or we're synced
-        if(fRequested || !IsSyncingMasternodeAssets()){
-            mnb.nLastPaid = GetAdjustedTime();
-        }
-
         if(mnb.CheckInputsAndAdd(nDoS, fRequested)) {
-
             // use this as a peer
             addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
         } else {
diff --git a/src/masternodeman.h b/src/masternodeman.h
index dd254e79141e..64cfcc52fc15 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -105,6 +105,7 @@ class CMasternodeMan
     void DsegUpdate(CNode* pnode);
 
     /// Find an entry
+    CMasternode* Find(const CScript &payee);
     CMasternode* Find(const CTxIn& vin);
     CMasternode* Find(const CPubKey& pubKeyMasternode);
 

From a4dce4340a09a3ff536efa8c452b8dbbf0694b0c Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Thu, 28 May 2015 23:09:14 +0200
Subject: [PATCH 1379/1819] Wallet Repair Buttons: refactoring and remove old
 repair args before restart

---
 src/init.cpp               | 16 +++++------
 src/init.h                 |  2 +-
 src/qt/bitcoingui.cpp      |  2 +-
 src/qt/dash.cpp            |  4 +--
 src/qt/forms/rpcconsole.ui | 38 +++++++++++++-------------
 src/qt/rpcconsole.cpp      | 56 +++++++++++++++++++++++++-------------
 src/qt/rpcconsole.h        | 14 +++++-----
 7 files changed, 75 insertions(+), 57 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 9bb44d777c75..9b9a8f576dbe 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -58,7 +58,7 @@ CWallet* pwalletMain = NULL;
 int nWalletBackups = 10;
 #endif
 bool fFeeEstimatesInitialized = false;
-bool wallet_restart = false;  // true: restart false: shutdown
+bool fRestartRequested = false;  // true: restart false: shutdown
 
 #ifdef WIN32
 // Win32 LevelDB doesn't use filedescriptors, and the ones used for
@@ -145,9 +145,9 @@ static CCoinsViewDB *pcoinsdbview = NULL;
 static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 
 /** Preparing steps before shutting down or restarting the wallet */
-void Prepare_Shutdown()
+void PrepareShutdown()
 {
-    wallet_restart = true; // Needed when we restart the wallet
+    fRestartRequested = true; // Needed when we restart the wallet
     LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
     TRY_LOCK(cs_Shutdown, lockShutdown);
@@ -208,18 +208,18 @@ void Prepare_Shutdown()
 
 /**
 * Shutdown is split into 2 parts:
-* Part 1: shut down everything but the main wallet instance (done in Prepare_Shutdown() )
+* Part 1: shut down everything but the main wallet instance (done in PrepareShutdown() )
 * Part 2: delete wallet instance
 *
-* In case of a restart Prepare_Shutdown() was already called before, but this method here gets
+* In case of a restart PrepareShutdown() was already called before, but this method here gets
 * called implicitly when the parent object is deleted. In this case we have to skip the
-* Prepare_Shutdown() part because it was already executed and just delete the wallet instance.
+* PrepareShutdown() part because it was already executed and just delete the wallet instance.
 */
 void Shutdown()
 {
     // Shutdown part 1: prepare shutdown
-    if(!wallet_restart){
-        Prepare_Shutdown();
+    if(!fRestartRequested){
+        PrepareShutdown();
     }
 
    // Shutdown part 2: delete wallet instance
diff --git a/src/init.h b/src/init.h
index 93a0fdf396d1..36300eadefb4 100644
--- a/src/init.h
+++ b/src/init.h
@@ -20,7 +20,7 @@ extern CWallet* pwalletMain;
 void StartShutdown();
 bool ShutdownRequested();
 void Shutdown();
-void Prepare_Shutdown();
+void PrepareShutdown();
 bool AppInit2(boost::thread_group& threadGroup);
 
 /** The help message mode determines what help message to show */
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index c1fbc22e6452..27d8bba4f7a1 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -357,7 +357,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     openNetworkAction->setStatusTip(tr("Show network monitor"));
     openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
     openPeersAction->setStatusTip(tr("Show peers info"));
-    openRepairAction = new QAction(QIcon(":/icons/options"), tr("&Repair Wallet"), this);
+    openRepairAction = new QAction(QIcon(":/icons/options"), tr("Wallet &Repair"), this);
     openRepairAction->setStatusTip(tr("Repair Wallet Options"));
     openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
     openConfEditorAction->setStatusTip(tr("Open configuration file"));
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 0ef040da34cd..5a6860ef18fd 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -282,13 +282,13 @@ void BitcoinCore::initialize()
 }
 
 void BitcoinCore::restart(QStringList args)
-{   
+{      
     try
     {
         qDebug() << __func__ << ": Running Restart in thread";
         threadGroup.interrupt_all();
         threadGroup.join_all();
-        Prepare_Shutdown();
+        PrepareShutdown();
         qDebug() << __func__ << ": Shutdown finished";
         emit shutdownResult(1);
         CExplicitNetCleanup::callCleanup();
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 06f7a8fed569..55ea018ad7c5 100755
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -1073,7 +1073,7 @@
         <rect>
          <x>10</x>
          <y>90</y>
-         <width>180</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1092,7 +1092,7 @@
         <rect>
          <x>10</x>
          <y>140</y>
-         <width>180</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1111,7 +1111,7 @@
         <rect>
          <x>10</x>
          <y>190</y>
-         <width>180</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1130,7 +1130,7 @@
         <rect>
          <x>10</x>
          <y>240</y>
-         <width>180</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1149,7 +1149,7 @@
         <rect>
          <x>10</x>
          <y>290</y>
-         <width>180</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1188,9 +1188,9 @@
       <widget class="QLabel" name="label_repair_salvage">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>80</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
@@ -1204,9 +1204,9 @@
       <widget class="QLabel" name="label_repair_rescan">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>129</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
@@ -1220,9 +1220,9 @@
       <widget class="QLabel" name="label_repair_zap1">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>179</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
@@ -1236,9 +1236,9 @@
       <widget class="QLabel" name="label_repair_zap2">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>229</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
@@ -1252,14 +1252,14 @@
       <widget class="QLabel" name="label_repair_upgrade">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>279</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
        <property name="text">
-        <string>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself !)</string>
+        <string>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</string>
        </property>
        <property name="wordWrap">
         <bool>true</bool>
@@ -1293,7 +1293,7 @@
         <rect>
          <x>10</x>
          <y>340</y>
-         <width>181</width>
+         <width>221</width>
          <height>23</height>
         </rect>
        </property>
@@ -1304,9 +1304,9 @@
       <widget class="QLabel" name="label_repair_reindex">
        <property name="geometry">
         <rect>
-         <x>210</x>
+         <x>250</x>
          <y>330</y>
-         <width>511</width>
+         <width>471</width>
          <height>41</height>
         </rect>
        </property>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 6ce0f162b7da..1d9fd226d6df 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -42,6 +42,14 @@ const QSize ICON_SIZE(24, 24);
 
 const int INITIAL_TRAFFIC_GRAPH_MINS = 30;
 
+// Repair parameters
+const QString SALVAGEWALLET("-salvagewallet");
+const QString RESCAN("-rescan");
+const QString ZAPTXES1("-zapwallettxes=1");
+const QString ZAPTXES2("-zapwallettxes=2");
+const QString UPGRADEWALLET("-upgradewallet");
+const QString REINDEX("-reindex");
+
 const struct {
     const char *url;
     const char *source;
@@ -222,12 +230,12 @@ RPCConsole::RPCConsole(QWidget *parent) :
     connect(ui->btnClearTrafficGraph, SIGNAL(clicked()), ui->trafficGraph, SLOT(clear()));
     
     // Wallet Repair Buttons
-    connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(wallet_salvage()));
-    connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(wallet_rescan()));
-    connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(wallet_zaptxes1()));
-    connect(ui->btn_zapwallettxes2, SIGNAL(clicked()), this, SLOT(wallet_zaptxes2()));
-    connect(ui->btn_upgradewallet, SIGNAL(clicked()), this, SLOT(wallet_upgrade()));
-    connect(ui->btn_reindex, SIGNAL(clicked()), this, SLOT(wallet_reindex()));
+    connect(ui->btn_salvagewallet, SIGNAL(clicked()), this, SLOT(walletSalvage()));
+    connect(ui->btn_rescan, SIGNAL(clicked()), this, SLOT(walletRescan()));
+    connect(ui->btn_zapwallettxes1, SIGNAL(clicked()), this, SLOT(walletZaptxes1()));
+    connect(ui->btn_zapwallettxes2, SIGNAL(clicked()), this, SLOT(walletZaptxes2()));
+    connect(ui->btn_upgradewallet, SIGNAL(clicked()), this, SLOT(walletUpgrade()));
+    connect(ui->btn_reindex, SIGNAL(clicked()), this, SLOT(walletReindex()));
 
     // set library version labels
     ui->openSSLVersion->setText(SSLeay_version(SSLEAY_VERSION));
@@ -345,49 +353,59 @@ static QString categoryClass(int category)
 }
 
 /** Restart wallet with "-salvagewallet" */
-void RPCConsole::wallet_salvage()
+void RPCConsole::walletSalvage()
 {
-    build_parameter_list(QString("-salvagewallet"));
+    buildParameterlist(SALVAGEWALLET);
 }
 
 /** Restart wallet with "-rescan" */
-void RPCConsole::wallet_rescan()
+void RPCConsole::walletRescan()
 {
-    build_parameter_list(QString("-rescan"));
+    buildParameterlist(RESCAN);
 }
 
 /** Restart wallet with "-zapwallettxes=1" */
-void RPCConsole::wallet_zaptxes1()
+void RPCConsole::walletZaptxes1()
 {
-    build_parameter_list(QString("-zapwallettxes=1"));
+    buildParameterlist(ZAPTXES1);
 }
 
 /** Restart wallet with "-zapwallettxes=2" */
-void RPCConsole::wallet_zaptxes2()
+void RPCConsole::walletZaptxes2()
 {
-    build_parameter_list(QString("-zapwallettxes=2"));
+    buildParameterlist(ZAPTXES2);
 }
 
 /** Restart wallet with "-upgradewallet" */
-void RPCConsole::wallet_upgrade()
+void RPCConsole::walletUpgrade()
 {
-    build_parameter_list(QString("-upgradewallet"));
+    buildParameterlist(UPGRADEWALLET);
 }
 
 /** Restart wallet with "-reindex" */
-void RPCConsole::wallet_reindex()
+void RPCConsole::walletReindex()
 {
-    build_parameter_list(QString("-reindex"));
+    buildParameterlist(REINDEX);
 }
 
 /** Build command-line parameter list for restart */
-void RPCConsole::build_parameter_list(QString arg)
+void RPCConsole::buildParameterlist(QString arg)
 {
     // Get command-line arguments and remove the application name
     QStringList args = QApplication::arguments();
     args.removeFirst();
+
+    // Remove existing repair-options
+    args.removeAll(SALVAGEWALLET);
+    args.removeAll(RESCAN);
+    args.removeAll(ZAPTXES1);
+    args.removeAll(ZAPTXES2);
+    args.removeAll(UPGRADEWALLET);
+    args.removeAll(REINDEX);
+   
     // Append repair parameter to command line. We don't care whether it might already be there
     args.append(arg);
+
     // Send command-line arguments to BitcoinGUI::handleRestart()
     emit handleRestart(args);
 }
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index fedde85aa9d7..07281c35a33b 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -61,12 +61,12 @@ public slots:
     void clear();
     
     /** Wallet repair options */
-    void wallet_salvage();
-    void wallet_rescan();
-    void wallet_zaptxes1();
-    void wallet_zaptxes2();
-    void wallet_upgrade();
-    void wallet_reindex();
+    void walletSalvage();
+    void walletRescan();
+    void walletZaptxes1();
+    void walletZaptxes2();
+    void walletUpgrade();
+    void walletReindex();
     
     void reject();
     void message(int category, const QString &message, bool html = false);
@@ -111,7 +111,7 @@ public slots:
     void startExecutor();
     void setTrafficGraphRange(int mins);
     /** Build parameter list for restart */
-    void build_parameter_list(QString arg);
+    void buildParameterlist(QString arg);
     /** show detailed information on ui about selected node */
     void updateNodeDetail(const CNodeCombinedStats *stats);
 

From 457421834903f1973872ba9fa182ccb824436716 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Thu, 28 May 2015 23:14:09 +0200
Subject: [PATCH 1380/1819] Wallet Repair Buttons: removed obsolete comment

---
 src/qt/rpcconsole.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 1d9fd226d6df..b3be32cc6504 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -403,7 +403,7 @@ void RPCConsole::buildParameterlist(QString arg)
     args.removeAll(UPGRADEWALLET);
     args.removeAll(REINDEX);
    
-    // Append repair parameter to command line. We don't care whether it might already be there
+    // Append repair parameter to command line.
     args.append(arg);
 
     // Send command-line arguments to BitcoinGUI::handleRestart()

From d953b230615eeeb6207193994c40c8d11e2e574e Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Fri, 29 May 2015 08:18:33 +0200
Subject: [PATCH 1381/1819] Wallet Repair Buttons: statustip changed

---
 src/qt/bitcoingui.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 27d8bba4f7a1..832408bce1b7 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -358,7 +358,7 @@ void BitcoinGUI::createActions(const NetworkStyle *networkStyle)
     openPeersAction = new QAction(QIcon(":/icons/connect_4"), tr("&Peers list"), this);
     openPeersAction->setStatusTip(tr("Show peers info"));
     openRepairAction = new QAction(QIcon(":/icons/options"), tr("Wallet &Repair"), this);
-    openRepairAction->setStatusTip(tr("Repair Wallet Options"));
+    openRepairAction->setStatusTip(tr("Show wallet repair options"));
     openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open &Configuration File"), this);
     openConfEditorAction->setStatusTip(tr("Open configuration file"));
     showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
@@ -1187,4 +1187,4 @@ void UnitDisplayStatusBarControl::onMenuSelection(QAction* action)
     {
         optionsModel->setDisplayUnit(action->data());
     }
-}
\ No newline at end of file
+}

From 4292d4d87ded6e2e2828a0234eb417fb0c66b0c6 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 30 May 2015 05:46:09 +0300
Subject: [PATCH 1382/1819] - Randomize denoms calculated ot of vecAmounts.
 Should help to find partners faster/more often and maybe slightly improve
 anonymity also. - sessionTotal doesn't makes sense anymore, get rid of it. -
 GetDenominationsByAmount cleaned but it is not used anywhere else so maybe it
 should be removed too (placed a comment there but didn't remove it yet).

---
 src/darksend.cpp | 36 ++++++++++++------------------------
 src/darksend.h   |  7 +++----
 2 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index dee544e7aebd..73c89b759106 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1497,14 +1497,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         int nUseQueue = rand()%100;
         UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
 
-        sessionTotalValue = pwalletMain->GetTotalValue(vCoins);
-
-        //randomize the amounts we mix
-        if(sessionTotalValue > nBalanceNeedsAnonymized) sessionTotalValue = nBalanceNeedsAnonymized;
-
-        double fDarkcoinSubmitted = (sessionTotalValue / CENT);
-        LogPrintf("Submitting Darksend for %f DASH CENT - sessionTotalValue %d\n", fDarkcoinSubmitted, sessionTotalValue);
-
         if(pwalletMain->GetDenominatedBalance(true, true) > 0){ //get denominated unconfirmed inputs
             LogPrintf("DoAutomaticDenominating -- Found unconfirmed denominated outputs, will wait till they confirm to continue.\n");
             strAutoDenomResult = _("Found unconfirmed denominated outputs, will wait till they confirm to continue.");
@@ -1554,8 +1546,8 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
                 // connect to Masternode and submit the queue request
                 if(ConnectNode((CAddress)addr, NULL, true)){
-                    CNode* pNode = FindNode(addr);
-                    if(pNode)
+                    CNode* pnode = FindNode(addr);
+                    if(pnode)
                     {
                         std::string strReason;
                         if(txCollateral == CMutableTransaction()){
@@ -1575,8 +1567,8 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                         vecMasternodesUsed.push_back(dsq.vin);
                         sessionDenom = dsq.nDenom;
 
-                        pNode->PushMessage("dsa", sessionDenom, txCollateral);
-                        LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d %d - %s\n", sessionDenom, GetDenominationsByAmount(sessionTotalValue), pNode->addr.ToString().c_str());
+                        pnode->PushMessage("dsa", sessionDenom, txCollateral);
+                        LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString().c_str());
                         strAutoDenomResult = "";
                         dsq.time = 0; //remove node
                         return true;
@@ -1641,10 +1633,12 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
                     std::vector<CAmount> vecAmounts;
                     pwalletMain->ConvertList(vCoins, vecAmounts);
-                    sessionDenom = GetDenominationsByAmounts(vecAmounts);
+                    // try to get random denoms out of vecAmounts
+                    while(sessionDenom == 0)
+                        sessionDenom = GetDenominationsByAmounts(vecAmounts, true);
 
                     pnode->PushMessage("dsa", sessionDenom, txCollateral);
-                    LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d - denom %d\n", sessionDenom, GetDenominationsByAmount(sessionTotalValue));
+                    LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d\n", sessionDenom);
                     strAutoDenomResult = "";
                     return true;
                 }
@@ -1946,7 +1940,7 @@ int CDarksendPool::GetDenominations(const std::vector<CTxDSOut>& vout){
 }
 
 // return a bitshifted integer representing the denominations in this list
-int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout){
+int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout, bool fRandDenom){
     std::vector<pair<int64_t, int> > denomUsed;
 
     // make a list of denominations, with zero uses
@@ -1970,7 +1964,7 @@ int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout){
     // if the denomination is used, shift the bit on.
     // then move to the next
     BOOST_FOREACH (PAIRTYPE(int64_t, int)& s, denomUsed)
-        denom |= s.second << c++;
+        denom |= ((fRandDenom ? rand()%2 : 1) * s.second) << c++;
 
     // Function returns as follows:
     //
@@ -1983,7 +1977,7 @@ int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout){
 }
 
 
-int CDarksendPool::GetDenominationsByAmounts(std::vector<int64_t>& vecAmount){
+int CDarksendPool::GetDenominationsByAmounts(std::vector<int64_t>& vecAmount, bool fRandDenom){
     CScript e = CScript();
     std::vector<CTxOut> vout1;
 
@@ -1996,7 +1990,7 @@ int CDarksendPool::GetDenominationsByAmounts(std::vector<int64_t>& vecAmount){
         nOutputs++;
     }
 
-    return GetDenominations(vout1);
+    return GetDenominations(vout1, fRandDenom);
 }
 
 int CDarksendPool::GetDenominationsByAmount(int64_t nAmount, int nDenomTarget){
@@ -2028,12 +2022,6 @@ int CDarksendPool::GetDenominationsByAmount(int64_t nAmount, int nDenomTarget){
         LogPrintf("GetDenominationsByAmount --- %d nOutputs %d\n", v, nOutputs);
     }
 
-    //add non-denom left overs as change
-    if(nValueLeft > 0){
-        CTxOut o(nValueLeft, e);
-        vout1.push_back(o);
-    }
-
     return GetDenominations(vout1);
 }
 
diff --git a/src/darksend.h b/src/darksend.h
index 2bab2637968d..b4c96cc2d894 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -318,7 +318,6 @@ class CDarksendPool
     int sessionDenom; //Users must submit an denom matching this
     int sessionUsers; //N Users have said they'll join
     bool sessionFoundMasternode; //If we've found a compatible Masternode
-    int64_t sessionTotalValue; //used for autoDenom
     std::vector<CTransaction> vecSessionCollateral;
 
     int cachedLastSuccess;
@@ -494,14 +493,14 @@ class CDarksendPool
     bool CreateDenominated(int64_t nTotalValue);
 
     /// Get the denominations for a list of outputs (returns a bitshifted integer)
-    int GetDenominations(const std::vector<CTxOut>& vout);
+    int GetDenominations(const std::vector<CTxOut>& vout, bool fRandDenom = false);
     int GetDenominations(const std::vector<CTxDSOut>& vout);
 
     void GetDenominationsToString(int nDenom, std::string& strDenom);
 
     /// Get the denominations for a specific amount of dash.
-    int GetDenominationsByAmount(int64_t nAmount, int nDenomTarget=0);
-    int GetDenominationsByAmounts(std::vector<int64_t>& vecAmount);
+    int GetDenominationsByAmount(int64_t nAmount, int nDenomTarget=0); // is not used anymore?
+    int GetDenominationsByAmounts(std::vector<int64_t>& vecAmount, bool fRandDenom = false);
 
     std::string GetMessageByID(int messageID);
 

From 992a4a9e51076cc49aef3900b0abc336e6e80138 Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 30 May 2015 05:02:21 +0200
Subject: [PATCH 1383/1819] Removed Bitcoin references

---
 doc/gitian-building.md | 48 ++++++++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 23 deletions(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index defddedc6e21..5f6044946d39 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -1,9 +1,9 @@
 Gitian building
 ================
 
-*Setup instructions for a gitian build of Bitcoin using a Debian VM or physical system.*
+*Setup instructions for a gitian build of Dash using a Debian VM or physical system.*
 
-Gitian is the deterministic build process that is used to build the Bitcoin
+Gitian is the deterministic build process that is used to build the Dash
 Core executables. It provides a way to be reasonably sure that the
 executables are really built from source on GitHub. It also makes sure that
 the same, tested dependencies are used and statically built into the executable.
@@ -11,7 +11,7 @@ the same, tested dependencies are used and statically built into the executable.
 Multiple developers build the source code by following a specific descriptor
 ("recipe"), cryptographically sign the result, and upload the resulting signature.
 These results are compared and only if they match, the build is accepted and uploaded
-to bitcoin.org.
+to dashpay.io.
 
 More independent gitian builders are needed, which is why I wrote this
 guide. It is preferred to follow these steps yourself instead of using someone else's
@@ -26,7 +26,7 @@ Table of Contents
 - [Installing gitian](#installing-gitian)
 - [Setting up gitian images](#setting-up-gitian-images)
 - [Getting and building the inputs](#getting-and-building-the-inputs)
-- [Building Bitcoin](#building-bitcoin)
+- [Building Dash](#building-dash)
 - [Building an alternative repository](#building-an-alternative-repository)
 - [Signing externally](#signing-externally)
 - [Uploading signatures](#uploading-signatures)
@@ -277,12 +277,12 @@ cd ..
 
 **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
 
-Clone the git repositories for bitcoin and gitian and then checkout the bitcoin version that you want to build.
+Clone the git repositories for dash and gitian and then checkout the dash version that you want to build.
 
 ```bash
 git clone https://github.com/devrandom/gitian-builder.git
-git clone https://github.com/bitcoin/bitcoin
-cd bitcoin
+git clone https://github.com/dashpay/dash.git
+cd dash
 git checkout v${VERSION}
 cd ..
 ```
@@ -307,19 +307,21 @@ There will be a lot of warnings printed during build of the images. These can be
 
 **Note**: When sudo asks for a password, enter the password for the user *debian* not for *root*.
 
+**Note**: Repeat this step when you have upgraded to a newer version of Gitian.
+
 Getting and building the inputs
 --------------------------------
 
-Follow the instructions in [doc/release-process.md](release-process.md) in the bitcoin repository
+Follow the instructions in [doc/release-process.md](release-process.md) in the dash repository
 under 'Fetch and build inputs' to install sources which require manual intervention. Also follow
 the next step: 'Seed the Gitian sources cache', which will fetch all necessary source files allowing
 for gitian to work offline.
 
-Building Bitcoin
+Building Dash
 ----------------
 
-To build Bitcoin (for Linux, OSX and Windows) just follow the steps under 'perform
-gitian builds' in [doc/release-process.md](release-process.md) in the bitcoin repository.
+To build Dash (for Linux, OSX and Windows) just follow the steps under 'perform
+gitian builds' in [doc/release-process.md](release-process.md) in the dash repository.
 
 This may take a long time as it also builds the dependencies needed for each descriptor.
 These dependencies will be cached after a successful build to avoid rebuilding them when possible.
@@ -332,12 +334,12 @@ tail -f var/build.log
 
 Output from `gbuild` will look something like
 
-    Initialized empty Git repository in /home/debian/gitian-builder/inputs/bitcoin/.git/
+    Initialized empty Git repository in /home/debian/gitian-builder/inputs/dash/.git/
     remote: Reusing existing pack: 35606, done.
     remote: Total 35606 (delta 0), reused 0 (delta 0)
     Receiving objects: 100% (35606/35606), 26.52 MiB | 4.28 MiB/s, done.
     Resolving deltas: 100% (25724/25724), done.
-    From https://github.com/bitcoin/bitcoin
+    From https://github.com/dashpay/dash
     ... (new tags, new branch etc)
     --- Building for precise x86_64 ---
     Stopping target if it is up
@@ -363,11 +365,11 @@ and inputs.
 
 For example:
 ```bash
-URL=https://github.com/laanwj/bitcoin.git
-COMMIT=2014_03_windows_unicode_path
-./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-linux.yml
-./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-win.yml
-./bin/gbuild --commit bitcoin=${COMMIT} --url bitcoin=${URL} ../bitcoin/contrib/gitian-descriptors/gitian-osx.yml
+URL=https://github.com/crowning-/dash.git
+COMMIT=b616fb8ef0d49a919b72b0388b091aaec5849b96
+./bin/gbuild --commit dash=${COMMIT} --url dash=${URL} ../dash/contrib/gitian-descriptors/gitian-linux.yml
+./bin/gbuild --commit dash=${COMMIT} --url dash=${URL} ../dash/contrib/gitian-descriptors/gitian-win.yml
+./bin/gbuild --commit dash=${COMMIT} --url dash=${URL} ../dash/contrib/gitian-descriptors/gitian-osx.yml
 ```
 
 Signing externally
@@ -382,9 +384,9 @@ When you execute `gsign` you will get an error from GPG, which can be ignored. C
 in `gitian.sigs` to your signing machine and do
 
 ```bash
-    gpg --detach-sign ${VERSION}-linux/${SIGNER}/bitcoin-build.assert
-    gpg --detach-sign ${VERSION}-win/${SIGNER}/bitcoin-build.assert
-    gpg --detach-sign ${VERSION}-osx/${SIGNER}/bitcoin-build.assert
+    gpg --detach-sign ${VERSION}-linux/${SIGNER}/dash-build.assert
+    gpg --detach-sign ${VERSION}-win/${SIGNER}/dash-build.assert
+    gpg --detach-sign ${VERSION}-osx/${SIGNER}/dash-build.assert
 ```
 
 This will create the `.sig` files that can be committed together with the `.assert` files to assert your
@@ -394,5 +396,5 @@ Uploading signatures
 ---------------------
 
 After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
-[bitcoin/gitian.sigs](https://github.com/bitcoin/gitian.sigs/) repository, or if that's not possible create a pull
-request. You can also mail the files to me (laanwj@gmail.com) and I'll commit them.
+[dash/gitian.sigs](https://github.com/dash/gitian.sigs/) repository, or if that's not possible create a pull
+request. You can also mail the files to me (evan@dashpay.io) and I'll commit them.

From e9a758d3f3a2b5ffdd3d95beb0466a0d4210262a Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 30 May 2015 05:05:46 +0200
Subject: [PATCH 1384/1819] Update gitian-building.md

---
 doc/gitian-building.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 5f6044946d39..999b19dc2359 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -396,5 +396,5 @@ Uploading signatures
 ---------------------
 
 After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
-[dash/gitian.sigs](https://github.com/dash/gitian.sigs/) repository, or if that's not possible create a pull
+[dash/gitian.sigs](https://github.com/dashpay/gitian.sigs/) repository, or if that's not possible create a pull
 request. You can also mail the files to me (evan@dashpay.io) and I'll commit them.

From e01fefa6c43ffc2b0b6b59a2ac6a5ed1184405d7 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sat, 30 May 2015 05:13:09 +0200
Subject: [PATCH 1385/1819] Dash copyright year fixed

---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 9b9a8f576dbe..b09a404a084d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -452,7 +452,7 @@ std::string LicenseInfo()
 {
     return FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Bitcoin Core Developers"), COPYRIGHT_YEAR)) + "\n" +
            "\n" +
-           FormatParagraph(strprintf(_("Copyright (C) 2009-%i The Dash Core Developers"), COPYRIGHT_YEAR)) + "\n" +
+           FormatParagraph(strprintf(_("Copyright (C) 2014-%i The Dash Core Developers"), COPYRIGHT_YEAR)) + "\n" +
            "\n" +
            FormatParagraph(_("This is experimental software.")) + "\n" +
            "\n" +

From 543256c3e87981ab5761cab52065955abbd2a71e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 30 May 2015 06:46:29 +0300
Subject: [PATCH 1386/1819] - fix issues with locking coins and not unlocking
 them properly (mostly on failures) - more SetNull calls on failures - move
 collateral tx reset out of SetNull and redo verification/renewal on doAuto in
 one single place (should prevent fast keypool exhausting on failures) - move
 lastNewBlock from SetNull to Reset

---
 src/darksend.cpp | 56 +++++++++++++++++++++++++++---------------------
 1 file changed, 31 insertions(+), 25 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index dee544e7aebd..47c68d711764 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -476,6 +476,8 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
 
 void CDarksendPool::Reset(){
     cachedLastSuccess = 0;
+    lastNewBlock = 0;
+    txCollateral = CMutableTransaction();
     vecMasternodesUsed.clear();
     UnlockCoins();
     SetNull();
@@ -494,13 +496,11 @@ void CDarksendPool::SetNull(bool clearEverything){
     entriesCount = 0;
     lastEntryAccepted = 0;
     countEntriesAccepted = 0;
-    lastNewBlock = 0;
 
     sessionUsers = 0;
     sessionDenom = 0;
     sessionFoundMasternode = false;
     vecSessionCollateral.clear();
-    txCollateral = CMutableTransaction();
 
     if(clearEverything){
         myEntries.clear();
@@ -882,7 +882,7 @@ void CDarksendPool::CheckTimeout(){
 
         if(GetTimeMillis()-lastTimeChanged >= (DARKSEND_QUEUE_TIMEOUT*1000)+addLagTime){
             lastTimeChanged = GetTimeMillis();
-
+            UnlockCoins();
             SetNull(true);
         }
     } else if(GetTimeMillis()-lastTimeChanged >= (DARKSEND_QUEUE_TIMEOUT*1000)+addLagTime){
@@ -1152,11 +1152,15 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
         return;
     }
 
-    if (!CheckDiskSpace())
+    if (!CheckDiskSpace()) {
+        UnlockCoins();
         return;
+    }
 
     if(fMasterNode) {
         LogPrintf("CDarksendPool::SendDarksendDenominate() - Darksend from a Masternode is not supported currently.\n");
+        UnlockCoins();
+        SetNull(true);
         return;
     }
 
@@ -1188,6 +1192,8 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
             LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
+            UnlockCoins();
+            SetNull(true);
             return;
         }
     }
@@ -1299,6 +1305,8 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
                     // in this case, something went wrong and we'll refuse to sign. It's possible we'll be charged collateral. But that's
                     // better then signing if the transaction doesn't look like what we wanted.
                     LogPrintf("CDarksendPool::Sign - My entries are not correct! Refusing to sign. %d entries %d target. \n", foundOutputs, targetOuputs);
+                    UnlockCoins();
+                    SetNull(true);
 
                     return false;
                 }
@@ -1363,7 +1371,7 @@ void CDarksendPool::CompletedTransaction(bool error, std::string lastMessageNew)
 
         myEntries.clear();
         UnlockCoins();
-        if(!fMasterNode) SetNull(true);
+        SetNull(true);
 
         // To avoid race conditions, we'll only let DS run once per block
         cachedLastSuccess = chainActive.Tip()->nHeight;
@@ -1494,6 +1502,10 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
     // initial phase, find a Masternode
     if(!sessionFoundMasternode){
+        // Clean if there is anything left from previous session
+        UnlockCoins();
+        SetNull(true);
+
         int nUseQueue = rand()%100;
         UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
 
@@ -1511,11 +1523,21 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
             return false;
         }
 
-        //check our collateral
-        if(txCollateral != CMutableTransaction()){
+        //check our collateral nad create new if needed
+        std::string strReason;
+        CValidationState state;
+        if(txCollateral == CMutableTransaction()){
+            if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
+                LogPrintf("% -- create collateral error:%s\n", __func__, strReason.c_str());
+                return false;
+            }
+        } else {
             if(!IsCollateralValid(txCollateral)) {
-                txCollateral = CMutableTransaction();
-                LogPrintf("DoAutomaticDenominating -- Invalid collateral, resetting.\n");
+                LogPrintf("%s -- invalid collateral, recreating...\n", __func__);
+                if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
+                    LogPrintf("%s -- create collateral error: %s\n", __func__, strReason.c_str());
+                    return false;
+                }
             }
         }
 
@@ -1557,14 +1579,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                     CNode* pNode = FindNode(addr);
                     if(pNode)
                     {
-                        std::string strReason;
-                        if(txCollateral == CMutableTransaction()){
-                            if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
-                                LogPrintf("DoAutomaticDenominating -- dsa error:%s\n", strReason.c_str());
-                                return false;
-                            }
-                        }
-
                         CMasternode* pmn = mnodeman.Find(dsq.vin);
                         if(pmn == NULL)
                         {
@@ -1628,14 +1642,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                 {
                     if((CNetAddr)pnode->addr != (CNetAddr)pmn->addr) continue;
 
-                    std::string strReason;
-                    if(txCollateral == CMutableTransaction()){
-                        if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
-                            LogPrintf("DoAutomaticDenominating -- create collateral error:%s\n", strReason.c_str());
-                            return false;
-                        }
-                    }
-
                     pSubmittedToMasternode = pmn;
                     vecMasternodesUsed.push_back(pmn->vin);
 

From 06a09284821000faf82425cdf8903ba003780fef Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 30 May 2015 11:07:51 +0200
Subject: [PATCH 1387/1819] Update gitian-building.md

---
 doc/gitian-building.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 999b19dc2359..39fb5b6bab15 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -378,7 +378,7 @@ Signing externally
 If you want to do the PGP signing on another device that's also possible; just define `SIGNER` as mentioned
 and follow the steps in the build process as normal.
 
-    gpg: skipped "laanwj": secret key not available
+    gpg: skipped "crowning-": secret key not available
 
 When you execute `gsign` you will get an error from GPG, which can be ignored. Copy the resulting `.assert` files
 in `gitian.sigs` to your signing machine and do

From 2c58dac8dc18b3e678a89e8234478c2ce788d55e Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 30 May 2015 12:05:06 +0200
Subject: [PATCH 1388/1819] Fix for "mkfs.ext4 not found" error

Unfortunately some Gitian installation need this fix, some not, so I mention this on the documentation and do not fix make-base-vm.

In theory /sbin/ should *always* be in $PATH...
---
 doc/gitian-building.md | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 39fb5b6bab15..58ebe072d5aa 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -309,6 +309,12 @@ There will be a lot of warnings printed during build of the images. These can be
 
 **Note**: Repeat this step when you have upgraded to a newer version of Gitian.
 
+**Note**: if you get the error message *"bin/make-base-vm: mkfs.ext4: not found"* during this process you have to make the following change in file *"gitian-builder/bin/make-base-vm"* at line 117:
+```bash
+# mkfs.ext4 -F $OUT-lxc
+/sbin/mkfs.ext4 -F $OUT-lxc # (some Gitian environents do NOT find mkfs.ext4. Some do...)
+```
+
 Getting and building the inputs
 --------------------------------
 

From 646f6765944ca41881463f0afe362e9c2297e2fc Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 30 May 2015 17:54:32 +0200
Subject: [PATCH 1389/1819] "Uploading signatures" labeled as not yet
 implemented.

---
 doc/gitian-building.md | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 58ebe072d5aa..063162a1990f 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -398,9 +398,10 @@ in `gitian.sigs` to your signing machine and do
 This will create the `.sig` files that can be committed together with the `.assert` files to assert your
 gitian build.
 
-Uploading signatures
+Uploading signatures (not yet implemented)
 ---------------------
 
-After building and signing you can push your signatures (both the `.assert` and `.assert.sig` files) to the
-[dash/gitian.sigs](https://github.com/dashpay/gitian.sigs/) repository, or if that's not possible create a pull
-request. You can also mail the files to me (evan@dashpay.io) and I'll commit them.
+In the future it will be possible to push your signatures (both the `.assert` and `.assert.sig` files) to the
+[dash/gitian.sigs](https://github.com/dashpay/gitian.sigs/) repository, or if that's not possible to create a pull
+request.
+There will be an official announcement when this repository is online.

From eaf7b940a68f5176f90fb4e2db8ca460a060a0d9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 30 May 2015 10:27:51 -0700
Subject: [PATCH 1390/1819] Complete rewrite of consensus code for mn/budget
 payments

- Added FindProposal and FindFinalBudget to budgeting class
- Added 2 new sporks for Proposals and Budget payment enforcement. This is outside of the decentralized code so we can turn it off if there's a problem.
- Detect budget blocks and pay correct amounts in super blocks
---
 src/main.cpp                 |  7 +--
 src/masternode-budget.cpp    | 76 +++++++++++++++++++++++++--
 src/masternode-budget.h      |  9 ++--
 src/masternode-payments.cpp  | 99 +++++++++++++++++++++++++++++++++++-
 src/masternode-payments.h    |  3 ++
 src/masternodeman.cpp        |  3 ++
 src/miner.cpp                | 45 ++--------------
 src/rpcmasternode-budget.cpp |  4 +-
 src/spork.cpp                | 14 +++--
 src/spork.h                  | 13 +++--
 10 files changed, 208 insertions(+), 65 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 8f2046723ce5..f2fda2c390f7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2093,11 +2093,12 @@ 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->pprev->nBits, pindex->pprev->nHeight, nFees))
+    if(!IsBlockValueValid(block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees))){
         return state.DoS(100,
                          error("ConnectBlock() : coinbase pays too much (actual=%d vs limit=%d)",
                                block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees)),
                                REJECT_INVALID, "bad-cb-amount");
+    }
 
     if (!control.Wait())
         return state.DoS(100, false);
@@ -3269,9 +3270,9 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
     if (!ContextualCheckBlockHeader(block, state, pindexPrev))
         return false;
     if (!CheckBlock(block, state, fCheckPOW, fCheckMerkleRoot))
-        return false;
+        return false;    
     if (!ContextualCheckBlock(block, state, pindexPrev))
-        return false;
+        return false;    
     if (!ConnectBlock(block, state, &indexDummy, viewNew, true))
         return false;
     assert(state.IsValid());
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index d681ccd82612..160354886504 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -184,7 +184,7 @@ void DumpBudgets()
     LogPrintf("Masternode dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
-CBudgetProposal *CBudgetManager::Find(const std::string &strProposalName)
+CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName)
 {
     //find the prop with the highest yes count
 
@@ -330,6 +330,68 @@ void CBudgetVote::Relay()
     }
 }
 
+void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
+{    
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+
+    int nHighestCount = 0;
+    CScript payee;
+    int64_t nAmount = 0;
+
+    // ------- Grab The Highest Count
+    
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {   
+        CFinalizedBudget* prop = &((*it).second);
+        if(prop->GetVoteCount() > nHighestCount){
+            if(pindexPrev->nHeight+1 >= prop->GetBlockStart() && pindexPrev->nHeight+1 <= prop->GetBlockEnd()){
+                if(prop->GetPayeeAndAmount(pindexPrev->nHeight+1, payee, nAmount)){
+                    nHighestCount = prop->GetVoteCount();
+                }
+            }
+        }
+
+        it++;
+    }
+
+    CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, nFees);
+
+    //miners get the full amount on these blocks
+    txNew.vout[0].nValue = blockValue;
+    
+    if(nHighestCount > 0){
+        txNew.vout.resize(2);
+
+        //these are super blocks, so their value can be much larger than normal
+        txNew.vout[1].scriptPubKey = payee;
+        txNew.vout[1].nValue = nAmount;
+
+        CTxDestination address1;
+        ExtractDestination(payee, address1);
+        CBitcoinAddress address2(address1);
+
+        LogPrintf("Budget payment to %s for %lld\n", address2.ToString().c_str(), nAmount);
+    }
+
+}
+
+bool CFinalizedBudget::GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount)
+{
+    uint256 nProp = GetProposalByBlock(nBlockHeight);
+
+    CBudgetProposal* prop =  budget.FindProposal(nProp);    
+    if(prop){
+        payee = prop->GetPayee();
+        nAmount = prop->GetAmount();
+        return true;
+    }
+
+    LogPrintf("GetPayeeAndAmount - Couldn't find budget! %s\n", nProp.ToString().c_str());
+    return false;
+}
+
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
 	// lite mode is not supported
@@ -790,7 +852,7 @@ std::string CFinalizedBudget::GetProposals() {
     std::string ret = "aeu";
 
     BOOST_FOREACH(uint256& nHash, vecProposals){
-        CFinalizedBudget* prop = budget.Find(nHash);
+        CFinalizedBudget* prop = budget.FindFinalizedBudget(nHash);
 
         std::string token = nHash.ToString();
         if(prop) token = prop->GetName();
@@ -801,7 +863,7 @@ std::string CFinalizedBudget::GetProposals() {
     return ret;
 }
 
-CFinalizedBudget *CBudgetManager::Find(uint256 nHash)
+CFinalizedBudget *CBudgetManager::FindFinalizedBudget(uint256 nHash)
 {
     if(mapFinalizedBudgets.count(nHash))
         return &mapFinalizedBudgets[nHash];
@@ -809,6 +871,13 @@ CFinalizedBudget *CBudgetManager::Find(uint256 nHash)
     return NULL;
 }
 
+CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
+{
+    if(mapProposals.count(nHash))
+        return &mapProposals[nHash];
+
+    return NULL;
+}
 
 bool CBudgetManager::PropExists(uint256 nHash)
 {
@@ -950,6 +1019,7 @@ bool CFinalizedBudget::IsValid()
     //must be the correct block for payment to happen (once a month)
     if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
     if(GetBlockEnd() - nBlockStart > 100) return false;
+    if(vecProposals.size() > 100) return false;
 
     //make sure all prop names exist
     BOOST_FOREACH(uint256 nHash, vecProposals){
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 39a738f9f452..c78d66b2632e 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -1,5 +1,5 @@
-
 // Copyright (c) 2014-2015 The Dash developers
+
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 #ifndef MASTERNODE_BUDGET_H
@@ -90,8 +90,9 @@ class CBudgetManager
     void Calculate();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     void NewBlock();
-    CBudgetProposal *Find(const std::string &strProposalName);
-    CFinalizedBudget *Find(uint256 nHash);
+    CBudgetProposal *FindProposal(const std::string &strProposalName);
+    CBudgetProposal *FindProposal(uint256 nHash);
+    CFinalizedBudget *FindFinalizedBudget(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
 
     
@@ -108,6 +109,7 @@ class CBudgetManager
     bool PropExists(uint256 nHash);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     std::string GetRequiredPaymentsString(int64_t nBlockHeight);
+    void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
     void Clear(){
         printf("Not implemented\n");
@@ -177,6 +179,7 @@ class CFinalizedBudget
         if(i > (int)vecProposals.size()-1) return 0;
         return vecProposals[i];
     }
+    bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount);
 
     uint256 GetHash(){
         /* 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 31aa5996b81e..0003a0037b39 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -8,6 +8,7 @@
 #include "darksend.h"
 #include "util.h"
 #include "sync.h"
+#include "spork.h"
 #include "addrman.h"
 #include <boost/lexical_cast.hpp>
 
@@ -18,12 +19,44 @@ CMasternodePayments masternodePayments;
 map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
+bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return true;
+
+    //while syncing take the longest chain
+    if (fImporting || fReindex || pindexPrev->nHeight+1 < Checkpoints::GetTotalBlocksEstimate()) {
+        //super blocks will always be on these blocks, max 100 per budgeting
+        if(pindexPrev->nHeight+1 % GetBudgetPaymentCycleBlocks() < 100){
+            return true;
+        } else {
+            if(nBlockValue > nExpectedValue) return false;
+        }
+    } else { // we're synced so check the budget schedule
+        if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
+            //the value of the block is evaluated in CheckBlock
+            return true;
+        } else {
+            if(nBlockValue > nExpectedValue) return false;
+        }
+    }
+
+    return true;
+}
+
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
 {
     //check if it's a budget block
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         if(budget.IsTransactionValid(txNew, nBlockHeight)){
             return true;
+        } else {
+            LogPrintf("Invalid budget payment detected %s\n", txNew.ToString().c_str());
+            if(IsSporkActive(SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT)){
+                return false;
+            } else {
+                LogPrintf("Budget enforcement is disabled, accepting block");
+                return true;
+            }
         }
     }
 
@@ -31,11 +64,32 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
     if(masternodePayments.IsTransactionValid(txNew, nBlockHeight))
     {
         return true;
+    } else {
+        LogPrintf("Invalid mn payment detected %s\n", txNew.ToString().c_str());
+        if(IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)){
+            return false;
+        } else {
+            LogPrintf("Masternode payment enforcement is disabled, accepting block");
+            return true;
+        }
     }
 
     return false;
 }
 
+
+void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+    
+    if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
+        budget.FillBlockPayee(txNew, nFees);
+    } else {
+        masternodePayments.FillBlockPayee(txNew, nFees);
+    }
+}
+
 std::string GetRequiredPaymentsString(int64_t nBlockHeight)
 {
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
@@ -45,6 +99,47 @@ std::string GetRequiredPaymentsString(int64_t nBlockHeight)
     }
 }
 
+void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+
+    bool hasPayment = true;
+    CScript payee;
+    
+    //spork
+    if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, payee)){
+        //no masternode detected
+        CMasternode* winningNode = mnodeman.GetCurrentMasterNode(1);
+        if(winningNode){
+            payee = GetScriptForDestination(winningNode->pubkey.GetID());
+        } else {
+            LogPrintf("CreateNewBlock: Failed to detect masternode to pay\n");
+            hasPayment = false;
+        }
+    }
+
+    CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, nFees);
+    CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
+    
+    txNew.vout[0].nValue = blockValue;
+
+    if(hasPayment){
+        txNew.vout.resize(2);
+
+        txNew.vout[1].scriptPubKey = payee;
+        txNew.vout[1].nValue = masternodePayment;
+
+        txNew.vout[0].nValue -= masternodePayment;
+
+        CTxDestination address1;
+        ExtractDestination(payee, address1);
+        CBitcoinAddress address2(address1);
+
+        LogPrintf("Masternode payment to %s\n", address2.ToString().c_str());
+    }
+}
+
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(IsInitialBlockDownload()) return;
@@ -304,13 +399,13 @@ bool CMasternodePaymentWinner::IsValid()
 
     if(n == -1)
     {
-        if(fDebug) LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode\n");
+        LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode\n");
         return false;
     }
 
     if(n > MNPAYMENTS_SIGNATURES_TOTAL)
     {
-        if(fDebug) LogPrintf("CMasternodePaymentWinner::IsValid - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
+        LogPrintf("CMasternodePaymentWinner::IsValid - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
         return false;
     }
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 605eb4787182..07086dd8f573 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -29,6 +29,8 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
 bool IsReferenceNode(CTxIn& vin);
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
 std::string GetRequiredPaymentsString(int64_t nBlockHeight);
+bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue);
+void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
 class CMasternodePayee : public CTxOut
 {
@@ -194,6 +196,7 @@ class CMasternodePayments
 
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);
+    void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
 };
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 03f6e15132ec..a4decb0af60d 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -379,6 +379,9 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment()
         //it's in the list -- so let's skip it
         if(masternodePayments.IsScheduled(mn)) continue;
 
+        //make sure it has as many confirmations as there are masternodes
+        if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
+
         if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
         }
diff --git a/src/miner.cpp b/src/miner.cpp
index 93eb20bffb5a..9b6c3339b264 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -99,7 +99,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         return NULL;
     CBlock *pblock = &pblocktemplate->block; // pointer for convenience
 
-    int payments = 1;
     // -regtest only: allow overriding block.nVersion with
     // -blockversion=N to test forking scenarios
     if (Params().MineBlocksOnDemand())
@@ -127,9 +126,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     unsigned int nBlockMinSize = GetArg("-blockminsize", DEFAULT_BLOCK_MIN_SIZE);
     nBlockMinSize = std::min(nBlockMaxSize, nBlockMinSize);
 
-    // start masternode payments
-    bool bMasterNodePayment = GetTimeMicros() > Params().StartMasternodePayments();
-
     // Collect memory pool transactions into the block
     CAmount nFees = 0;
 
@@ -139,35 +135,6 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         const int nHeight = pindexPrev->nHeight + 1;
         CCoinsViewCache view(pcoinsTip);
 
-        if(bMasterNodePayment) {
-            bool hasPayment = true;
-            //spork
-            if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, pblock->payee)){
-                //no masternode detected
-                CMasternode* winningNode = mnodeman.GetCurrentMasterNode(1);
-                if(winningNode){
-                    pblock->payee = GetScriptForDestination(winningNode->pubkey.GetID());
-                } else {
-                    LogPrintf("CreateNewBlock: Failed to detect masternode to pay\n");
-                    hasPayment = false;
-                }
-            }
-
-            if(hasPayment){
-                payments++;
-                txNew.vout.resize(payments);
-
-                txNew.vout[payments-1].scriptPubKey = pblock->payee;
-                txNew.vout[payments-1].nValue = 0;
-
-                CTxDestination address1;
-                ExtractDestination(pblock->payee, address1);
-                CBitcoinAddress address2(address1);
-
-                LogPrintf("Masternode payment to %s\n", address2.ToString().c_str());
-            }
-        }
-
         // Add our coinbase tx as first transaction
         pblock->vtx.push_back(txNew);
         pblocktemplate->vTxFees.push_back(-1); // updated at end
@@ -351,18 +318,12 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
             }
         }
 
+        // Masternode and general budget payments
+        FillBlockPayee(txNew, nFees);
+
         nLastBlockTx = nBlockTx;
         nLastBlockSize = nBlockSize;
         LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
-        CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, nFees);
-        CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
-
-        //create masternode payment
-        if(payments > 1){
-            txNew.vout[payments-1].nValue = masternodePayment;
-            blockValue -= masternodePayment;
-        }
-        txNew.vout[0].nValue = blockValue;
 
         // Compute final coinbase transaction.
         txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index d02725dc0a0f..d01379b777ff 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -248,7 +248,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         std::string strProposalName = params[1].get_str();
 
-        CBudgetProposal* prop = budget.Find(strProposalName);
+        CBudgetProposal* prop = budget.FindProposal(strProposalName);
 
         if(prop == NULL) return "Unknown proposal name";
 
@@ -283,7 +283,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         Object obj;
         
-        CBudgetProposal* prop = budget.Find(strProposalName);
+        CBudgetProposal* prop = budget.FindProposal(strProposalName);
 
         if(prop == NULL) return "Unknown proposal name";
 
diff --git a/src/spork.cpp b/src/spork.cpp
index 1a8242597ec9..6c253ce3f385 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -81,11 +81,12 @@ bool IsSporkActive(int nSporkID)
     if(mapSporksActive.count(nSporkID)){
         r = mapSporksActive[nSporkID].nValue;
     } else {
-        if(nSporkID == SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT) r = SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_2_INSTANTX) r = SPORK_2_INSTANTX_DEFAULT;
         if(nSporkID == SPORK_3_INSTANTX_BLOCK_FILTERING) r = SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT;
         if(nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
         if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING;
+        if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
+        if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -102,11 +103,12 @@ int GetSporkValue(int nSporkID)
     if(mapSporksActive.count(nSporkID)){
         r = mapSporksActive[nSporkID].nValue;
     } else {
-        if(nSporkID == SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT) r = SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_2_INSTANTX) r = SPORK_2_INSTANTX_DEFAULT;
         if(nSporkID == SPORK_3_INSTANTX_BLOCK_FILTERING) r = SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT;
         if(nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
-        if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING;
+        if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
+        if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
+        if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -209,22 +211,24 @@ bool CSporkManager::SetPrivKey(std::string strPrivKey)
 
 int CSporkManager::GetSporkIDByName(std::string strName)
 {
-    if(strName == "SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT") return SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT;
     if(strName == "SPORK_2_INSTANTX") return SPORK_2_INSTANTX;
     if(strName == "SPORK_3_INSTANTX_BLOCK_FILTERING") return SPORK_3_INSTANTX_BLOCK_FILTERING;
     if(strName == "SPORK_5_MAX_VALUE") return SPORK_5_MAX_VALUE;
     if(strName == "SPORK_7_MASTERNODE_SCANNING") return SPORK_7_MASTERNODE_SCANNING;
+    if(strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
+    if(strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
 
     return -1;
 }
 
 std::string CSporkManager::GetSporkNameByID(int id)
 {
-    if(id == SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT) return "SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT";
     if(id == SPORK_2_INSTANTX) return "SPORK_2_INSTANTX";
     if(id == SPORK_3_INSTANTX_BLOCK_FILTERING) return "SPORK_3_INSTANTX_BLOCK_FILTERING";
     if(id == SPORK_5_MAX_VALUE) return "SPORK_5_MAX_VALUE";
     if(id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING";
+    if(id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
+    if(id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
 
     return "Unknown";
 }
diff --git a/src/spork.h b/src/spork.h
index 40f0251534c8..ea6ca53efab8 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -19,20 +19,23 @@
 using namespace std;
 using namespace boost;
 
-// Don't ever reuse these IDs for other sporks
-#define SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT               10000
+/*
+    Don't ever reuse these IDs for other sporks
+    - This would result in old clients getting confused about which spork is for what
+*/
 #define SPORK_2_INSTANTX                                      10001
 #define SPORK_3_INSTANTX_BLOCK_FILTERING                      10002
-#define SPORK_4_NOTUSED                                       10003
 #define SPORK_5_MAX_VALUE                                     10004
-#define SPORK_6_NOTUSED                                       10005
 #define SPORK_7_MASTERNODE_SCANNING                           10006
+#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT                10007
+#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT                 10008
 
-#define SPORK_1_MASTERNODE_PAYMENTS_ENFORCEMENT_DEFAULT       1424217600  //2015-2-18
 #define SPORK_2_INSTANTX_DEFAULT                              978307200   //2001-1-1
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
 #define SPORK_5_MAX_VALUE_DEFAULT                             1000        //1000 DASH
 #define SPORK_7_MASTERNODE_SCANNING_DEFAULT                   978307200   //2001-1-1
+#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1434326400   //2015-6-15
+#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1434326400   //2015-6-15
 
 class CSporkMessage;
 class CSporkManager;

From a93ceed09009c4af91b72ce88d1b3db5ec77ebb8 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 30 May 2015 13:12:12 -0700
Subject: [PATCH 1391/1819] Finalized Budget Changes

- Finalized budgets now pass proposal hash, payee and amount. This keeps them completely separate from the proposal system to aid in consensus.
- Added status messages for badly formed finalized budgets (probably attacks). If users see messages like this they should check the proposals to see if something is wrong with them before voting.
---
 src/masternode-budget.cpp    | 77 +++++++++++++++++++++++-------------
 src/masternode-budget.h      | 52 ++++++++++++++++++++----
 src/rpcmasternode-budget.cpp | 17 ++++++--
 3 files changed, 107 insertions(+), 39 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 160354886504..9beb3f82c3c8 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -377,19 +377,41 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
 
 }
 
-bool CFinalizedBudget::GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount)
+std::string CFinalizedBudget::GetStatus()
 {
-    uint256 nProp = GetProposalByBlock(nBlockHeight);
+    std::string retBadHashes = "";
+    std::string retBadPayeeOrAmount = "";
 
-    CBudgetProposal* prop =  budget.FindProposal(nProp);    
-    if(prop){
-        payee = prop->GetPayee();
-        nAmount = prop->GetAmount();
-        return true;
+    for(int nBlockHeight = GetBlockStart(); nBlockHeight <= GetBlockEnd(); nBlockHeight++)
+    {
+        CTxBudgetPayment prop1;
+        if(!GetProposalByBlock(nBlockHeight, prop1)){
+            LogPrintf("CFinalizedBudget::GetStatus - Couldn't find budget payment for block %lld\n", nBlockHeight);
+            continue;
+        }
+
+        CBudgetProposal* prop2 =  budget.FindProposal(prop1.nProposalHash);    
+        if(!prop2){
+            if(retBadHashes == ""){
+                retBadHashes = "Unknown proposal hash! Check this proposal before voting" + prop1.nProposalHash.ToString();
+            } else {
+                retBadHashes += "," + prop1.nProposalHash.ToString();
+            }
+        } else {
+            if(prop2->GetPayee() != prop1.payee || prop2->GetAmount() != prop1.nAmount)
+            {
+                if(retBadPayeeOrAmount == ""){
+                    retBadPayeeOrAmount = "Budget payee/nAmount doesn't match our proposal! " + prop1.nProposalHash.ToString();
+                } else {
+                    retBadPayeeOrAmount += "," + prop1.nProposalHash.ToString();
+                }
+            }
+        }
     }
 
-    LogPrintf("GetPayeeAndAmount - Couldn't find budget! %s\n", nProp.ToString().c_str());
-    return false;
+    if(retBadHashes == "" && retBadPayeeOrAmount == "") return "OK";
+
+    return retBadHashes + retBadPayeeOrAmount;
 }
 
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -851,12 +873,12 @@ bool CBudgetProposalBroadcast::SignatureValid()
 std::string CFinalizedBudget::GetProposals() {
     std::string ret = "aeu";
 
-    BOOST_FOREACH(uint256& nHash, vecProposals){
-        CFinalizedBudget* prop = budget.FindFinalizedBudget(nHash);
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
+        CFinalizedBudget* prop = budget.FindFinalizedBudget(payment.nProposalHash);
 
-        std::string token = nHash.ToString();
-        if(prop) token = prop->GetName();
+        std::string token = payment.nProposalHash.ToString();
 
+        if(prop) token = prop->GetName();
         if(ret == "") {ret = token;}
         else {ret = "," + token;}
     }
@@ -980,7 +1002,7 @@ bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMastern
 
     std::string errorMessage;
     std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(uint256& nHash, vecProposals) strMessage += nHash.ToString().c_str();
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
     
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
         return(" Error upon calling SignMessage");
@@ -996,7 +1018,7 @@ bool CFinalizedBudgetBroadcast::SignatureValid()
     std::string errorMessage;
 
     std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(uint256& nHash, vecProposals) strMessage += nHash.ToString().c_str();
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
 
     CMasternode* pmn = mnodeman.Find(vin);
 
@@ -1021,11 +1043,6 @@ bool CFinalizedBudget::IsValid()
     if(GetBlockEnd() - nBlockStart > 100) return false;
     if(vecProposals.size() > 100) return false;
 
-    //make sure all prop names exist
-    BOOST_FOREACH(uint256 nHash, vecProposals){
-        if(!budget.PropExists(nHash)) return false;
-    }
-
     return true;
 }
 
@@ -1192,17 +1209,17 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(const CFinalizedBudget& oth
     vin = other.vin;
     strBudgetName = other.strBudgetName;
     nBlockStart = other.nBlockStart;
-    BOOST_FOREACH(uint256 hash, other.vecProposals) vecProposals.push_back(hash);
+    BOOST_FOREACH(CTxBudgetPayment out, other.vecProposals) vecProposals.push_back(out);
     mapVotes = other.mapVotes;
 }
 
-CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<uint256> vecProposalsIn)
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn)
 {
     vin = vinIn;
     printf("%s\n", vin.ToString().c_str());
     strBudgetName = strBudgetNameIn;
     nBlockStart = nBlockStartIn;
-    BOOST_FOREACH(uint256 hash, vecProposalsIn) vecProposals.push_back(hash);
+    BOOST_FOREACH(CTxBudgetPayment out, vecProposalsIn) vecProposals.push_back(out);
     mapVotes.clear();
 }
 
@@ -1215,12 +1232,16 @@ std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
     {   
         CFinalizedBudget* prop = &((*it).second);
         if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-            uint256 nPropHash = prop->GetProposalByBlock(nBlockHeight);
-            if(ret == "unknown-budget"){
-                ret = nPropHash.ToString().c_str();
+            CTxBudgetPayment payment;
+            if(prop->GetProposalByBlock(nBlockHeight, payment)){
+                if(ret == "unknown-budget"){
+                    ret = payment.nProposalHash.ToString().c_str();
+                } else {
+                    ret += ",";
+                    ret += payment.nProposalHash.ToString().c_str();
+                }
             } else {
-                ret += ",";
-                ret += nPropHash.ToString().c_str();
+                LogPrintf("CBudgetManager::GetRequiredPaymentsString - Couldn't find budget payment for block %lld\n", nBlockHeight);
             }
         }
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index c78d66b2632e..191038ee4fc7 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -24,6 +24,7 @@ class CFinalizedBudgetVote;
 class CBudgetProposal;
 class CBudgetProposalBroadcast;
 class CBudgetVote;
+class CTxBudgetPayment;
 
 #define VOTE_ABSTAIN  0
 #define VOTE_YES      1
@@ -135,6 +136,31 @@ class CBudgetManager
     }
 };
 
+
+class CTxBudgetPayment
+{
+public:
+    uint256 nProposalHash;
+    CScript payee;
+    int64_t nAmount;
+
+    CTxBudgetPayment() {
+        payee = CScript();
+        nAmount = 0;
+        nProposalHash = 0;
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    //for saving to the serialized db
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(payee);
+        READWRITE(nAmount);
+        READWRITE(nProposalHash);
+    }
+};
+
 //
 // Finalized Budget : Contains the suggested proposals to pay on a given block
 //
@@ -150,7 +176,7 @@ class CFinalizedBudget
     CTxIn vin;
     std::string strBudgetName;
     int nBlockStart;
-    std::vector<uint256> vecProposals;
+    std::vector<CTxBudgetPayment> vecProposals;
     map<uint256, CFinalizedBudgetVote> mapVotes;
 
     CFinalizedBudget();  
@@ -172,14 +198,26 @@ class CFinalizedBudget
     std::string GetSubmittedBy() {return vin.prevout.ToStringShort();}
     int GetVoteCount() {return (int)mapVotes.size();}
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
-    uint256 GetProposalByBlock(int64_t nBlockHeight)
+    bool GetProposalByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
     {
         int i = nBlockHeight - GetBlockStart();
-        if(i < 0) return 0;
-        if(i > (int)vecProposals.size()-1) return 0;
-        return vecProposals[i];
+        if(i < 0) return false;
+        if(i > (int)vecProposals.size()-1) return false;
+        payment = vecProposals[i];
+        return true;
     }
-    bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount);
+    bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount)
+    {
+        int i = nBlockHeight - GetBlockStart();
+        if(i < 0) return false;
+        if(i > (int)vecProposals.size()-1) return false;
+        payee = vecProposals[i].payee;
+        nAmount = vecProposals[i].nAmount;
+        return true;
+    }
+
+    //checks the hashes to make sure we know about them
+    string GetStatus();
 
     uint256 GetHash(){
         /* 
@@ -221,7 +259,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
 public:
     CFinalizedBudgetBroadcast();
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
-    CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<uint256> vecProposalsIn);
+    CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn);
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
     bool SignatureValid();
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index d01379b777ff..14208481eb64 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -336,13 +336,21 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
 
-        std::vector<uint256> vecProps;
+        std::vector<CTxBudgetPayment> vecPayments;
         for(int i = 2; i < (int)params.size(); i++)
         {
             std::string strHash = params[i].get_str();
             uint256 hash(strHash);
-
-            vecProps.push_back(hash);
+            CBudgetProposal* prop = budget.FindProposal(hash);
+            if(!prop){
+                return "Invalid proposal " + strHash + ". Please check the proposal hash";
+            } else {
+                CTxBudgetPayment out;
+                out.nProposalHash = hash;
+                out.payee = prop->GetPayee();
+                out.nAmount = prop->GetAmount();
+                vecPayments.push_back(out);
+            }
         }
 
         CPubKey pubKeyMasternode;
@@ -353,7 +361,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return(" Error upon calling SetKey");
 
         //create the proposal incase we're the first to make it
-        CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecProps);
+        CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
         if(!prop.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
@@ -479,6 +487,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
             bObj.push_back(Pair("Proposals",  prop->GetProposals().c_str()));
             bObj.push_back(Pair("VoteCount",  (int64_t)prop->GetVoteCount()));
+            bObj.push_back(Pair("Status",  prop->GetStatus().c_str()));
             resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
         }
 

From 8f695a03c11bb50c796c00100def99083008f97d Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 1 Jun 2015 09:55:07 +0200
Subject: [PATCH 1392/1819] Statusbar icons for tDASH added

---
 src/qt/bitcoingui.cpp            |   7 ++++++-
 src/qt/dash.qrc                  |   4 ++++
 src/qt/res/icons/unit_dash.png   | Bin 442 -> 353 bytes
 src/qt/res/icons/unit_duffs.png  | Bin 369 -> 330 bytes
 src/qt/res/icons/unit_mdash.png  | Bin 429 -> 393 bytes
 src/qt/res/icons/unit_tdash.png  | Bin 0 -> 373 bytes
 src/qt/res/icons/unit_tduffs.png | Bin 0 -> 346 bytes
 src/qt/res/icons/unit_tmdash.png | Bin 0 -> 409 bytes
 src/qt/res/icons/unit_tudash.png | Bin 0 -> 393 bytes
 src/qt/res/icons/unit_udash.png  | Bin 417 -> 378 bytes
 10 files changed, 10 insertions(+), 1 deletion(-)
 mode change 100755 => 100644 src/qt/dash.qrc
 mode change 100644 => 100755 src/qt/res/icons/unit_dash.png
 mode change 100644 => 100755 src/qt/res/icons/unit_duffs.png
 mode change 100644 => 100755 src/qt/res/icons/unit_mdash.png
 create mode 100755 src/qt/res/icons/unit_tdash.png
 create mode 100755 src/qt/res/icons/unit_tduffs.png
 create mode 100755 src/qt/res/icons/unit_tmdash.png
 create mode 100755 src/qt/res/icons/unit_tudash.png
 mode change 100644 => 100755 src/qt/res/icons/unit_udash.png

diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 832408bce1b7..120e4776ca31 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1170,7 +1170,12 @@ void UnitDisplayStatusBarControl::setOptionsModel(OptionsModel *optionsModel)
 /** When Display Units are changed on OptionsModel it will refresh the display text of the control on the status bar */
 void UnitDisplayStatusBarControl::updateDisplayUnit(int newUnits)
 {
-    setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(31,STATUSBAR_ICONSIZE));
+    if(Params().NetworkID() == CBaseChainParams::MAIN){
+       setPixmap(QIcon(":/icons/unit_" + BitcoinUnits::id(newUnits)).pixmap(39,STATUSBAR_ICONSIZE));
+    }
+    else{
+        setPixmap(QIcon(":/icons/unit_t" + BitcoinUnits::id(newUnits)).pixmap(39,STATUSBAR_ICONSIZE));
+    }
 }
 
 /** Shows context menu with Display Unit options by the mouse coordinates */
diff --git a/src/qt/dash.qrc b/src/qt/dash.qrc
old mode 100755
new mode 100644
index ffe18ef25b79..9e4fa270f403
--- a/src/qt/dash.qrc
+++ b/src/qt/dash.qrc
@@ -40,6 +40,10 @@
         <file alias="unit_mdash">res/icons/unit_mdash.png</file>
         <file alias="unit_udash">res/icons/unit_udash.png</file>
         <file alias="unit_duffs">res/icons/unit_duffs.png</file>
+        <file alias="unit_tdash">res/icons/unit_tdash.png</file>
+        <file alias="unit_tmdash">res/icons/unit_tmdash.png</file>
+        <file alias="unit_tudash">res/icons/unit_tudash.png</file>
+        <file alias="unit_tduffs">res/icons/unit_tduffs.png</file>
         <file alias="lock_closed">res/icons/lock_closed.png</file>
         <file alias="lock_open">res/icons/lock_open.png</file>
         <file alias="key">res/icons/key.png</file>
diff --git a/src/qt/res/icons/unit_dash.png b/src/qt/res/icons/unit_dash.png
old mode 100644
new mode 100755
index 8160c8245f86362e5823c00c80f362f4543ba5cd..8b29a6addcecbb2e5f4d2d1c0181a52e4a8597a2
GIT binary patch
diff --git a/src/qt/res/icons/unit_duffs.png b/src/qt/res/icons/unit_duffs.png
old mode 100644
new mode 100755
index 5d16827d06e05fdbba500dc2cbc422eeb86ce52f..5bdbe653ec857db07398f03ca2c931ae7d58e696
GIT binary patch
diff --git a/src/qt/res/icons/unit_mdash.png b/src/qt/res/icons/unit_mdash.png
old mode 100644
new mode 100755
index a89b33981bd71d08a4bbd96abf7359af23c3440c..0752dd3803fc4794cabc4b6b0b4c9893f7df3d71
GIT binary patch
diff --git a/src/qt/res/icons/unit_tdash.png b/src/qt/res/icons/unit_tdash.png
new file mode 100755
index 0000000000000000000000000000000000000000..07b60673cf448cf4e7c12dedac03eccad1d647c0
GIT binary patch
diff --git a/src/qt/res/icons/unit_tduffs.png b/src/qt/res/icons/unit_tduffs.png
new file mode 100755
index 0000000000000000000000000000000000000000..ef5a892b4fe3606a3eb374001091a93ffa6dcc98
GIT binary patch
diff --git a/src/qt/res/icons/unit_tmdash.png b/src/qt/res/icons/unit_tmdash.png
new file mode 100755
index 0000000000000000000000000000000000000000..65f5d889ed48c6574595f3badad37c344f45951c
GIT binary patch
diff --git a/src/qt/res/icons/unit_tudash.png b/src/qt/res/icons/unit_tudash.png
new file mode 100755
index 0000000000000000000000000000000000000000..3c2209ae76e66522c399d30470f50bf116ac984b
GIT binary patch
diff --git a/src/qt/res/icons/unit_udash.png b/src/qt/res/icons/unit_udash.png
old mode 100644
new mode 100755
index c6168459350f0869a1fe29c9ca60087dce0493ee..c6a459804beb174d8d2d05f1d5cee2a34fe111fe
GIT binary patch

From 859d523a465735e2c523e23d593b0142d3bb0540 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 1 Jun 2015 10:27:46 +0200
Subject: [PATCH 1393/1819] Statusbar_Icons: makefile for Gitian fixed

---
 src/Makefile.qt.include | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
 mode change 100644 => 100755 src/Makefile.qt.include

diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
old mode 100644
new mode 100755
index d3b8412f0fd2..41707aea93f2
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -222,7 +222,11 @@ RES_ICONS = \
   qt/res/icons/unit_dash.png \
   qt/res/icons/unit_mdash.png \
   qt/res/icons/unit_udash.png \
-  qt/res/icons/unit_duffs.png
+  qt/res/icons/unit_duffs.png \
+  qt/res/icons/unit_tdash.png \
+  qt/res/icons/unit_tmdash.png \
+  qt/res/icons/unit_tudash.png \
+  qt/res/icons/unit_tduffs.png
 
 BITCOIN_QT_CPP = \
   qt/bitcoinaddressvalidator.cpp \

From 439679f5bcf8c5fbcb7eda176cd87ae6a16f44c4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 1 Jun 2015 12:06:03 -0700
Subject: [PATCH 1394/1819] Finalized Budget Voting and Payment

- Added strBudgetMode with modes of "auto", "output-vin" and "suggest". Auto votes for what the masternode sees as the most popular proposals, output-vin is a delegation mode to another party and "suggest" sends a message to the network, suggesting the most popular proposals
---
 src/init.cpp              |   5 ++
 src/masternode-budget.cpp | 171 +++++++++++++++++++++++++++++++++++++-
 src/masternode-budget.h   |  18 ++--
 src/util.cpp              |   1 +
 src/util.h                |   1 +
 5 files changed, 186 insertions(+), 10 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index b09a404a084d..a5cce21fc3ab 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -408,6 +408,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -masternodeprivkey=<n>     " + _("Set the masternode private key") + "\n";
     strUsage += "  -masternodeaddr=<n>        " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
     strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default: %u)"), MIN_POOL_PEER_PROTO_VERSION) + "\n";
+    strUsage += "  -budgetvotemode=<mode>    " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
 
     strUsage += "\n" + _("Darksend options:") + "\n";
     strUsage += "  -enabledarksend=<n>          " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), 0) + "\n";
@@ -1443,6 +1444,9 @@ bool AppInit2(boost::thread_group& threadGroup)
             }
         }
 
+        //get the mode of budget voting for this masternode
+        strBudgetMode = GetArg("-budgetvotemode", "auto");
+
         strMasterNodePrivKey = GetArg("-masternodeprivkey", "");
         if(!strMasterNodePrivKey.empty()){
             std::string errorMessage;
@@ -1498,6 +1502,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     LogPrintf("nInstantXDepth %d\n", nInstantXDepth);
     LogPrintf("Darksend rounds %d\n", nDarksendRounds);
     LogPrintf("Anonymize Dash Amount %d\n", nAnonymizeDarkcoinAmount);
+    LogPrintf("Budget Mode %s\n", strBudgetMode.c_str());
 
     /* Denominations
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 9beb3f82c3c8..1f2935c9e798 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -18,6 +18,7 @@ std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
 std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
 std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
 std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
+int nSubmittedFinalBudget;
 
 int GetBudgetPaymentCycleBlocks(){
     if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616; //(60*24*30)/2.6
@@ -292,6 +293,8 @@ bool CBudgetProposal::IsValid()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return false;
 
+    //TODO: if < 20 votes and 2+ weeks old, invalid
+
     if(pindexPrev->nHeight - nBlockStart < 0) return false;
     if(pindexPrev->nHeight > nBlockEnd) return false;
 
@@ -622,10 +625,15 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
 
 void CBudgetManager::NewBlock()
 {
-	//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
-	if(chainActive.Height() % 6 != 0) return;
+    budget.CheckAndRemove();
 
-	mnodeman.DecrementVotedTimes();
+    if (strBudgetMode == "suggest") { //suggest the budget we see
+        SubmitFinalBudget();
+    }
+
+	//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
+    if(chainActive.Height() % 6 != 0) return;
+    mnodeman.DecrementVotedTimes();
 }
 
 double CBudgetProposal::GetRatio()
@@ -1043,6 +1051,8 @@ bool CFinalizedBudget::IsValid()
     if(GetBlockEnd() - nBlockStart > 100) return false;
     if(vecProposals.size() > 100) return false;
 
+    //TODO: if N cycles old, invalid, invalid
+
     return true;
 }
 
@@ -1249,4 +1259,157 @@ std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
     }
 
     return ret;
-}
\ No newline at end of file
+}
+
+void CBudgetManager::CheckAndRemove()
+{
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {   
+        CFinalizedBudget* prop = &((*it).second);
+        if(!prop->IsValid()){
+            mapFinalizedBudgets.erase(it);
+        } else {
+            prop->AutoCheck();
+            it++;
+        }
+    }
+
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end())
+    {   
+        CBudgetProposal* prop = &((*it2).second);
+        if(!prop->IsValid()){
+            mapProposals.erase(it2);
+        } else {
+            it2++;
+        }
+    }
+}
+
+//evaluate if we should vote for this. Masternode only
+void CFinalizedBudget::AutoCheck()
+{
+    if(!fMasterNode || fAutoChecked) return;
+
+    if(Params().NetworkID() == CBaseChainParams::MAIN){
+        if(rand() % 100 > 5) return; //do this 1 in 20 blocks -- spread out the voting activity on mainnet
+    }
+    fAutoChecked = true; //we only need to check this once
+
+    if(strBudgetMode == "auto") //only vote for exact matches
+    {
+        std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+
+        for(unsigned int i = 0; i < vecProposals.size(); i++){
+            if(i > props1.size()-1) {
+                LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");                
+                return;
+            }
+
+            if(vecProposals[i].nProposalHash != props1[i]->GetHash()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d doesn't match %s %s\n", i, vecProposals[i].nProposalHash.ToString().c_str(), props1[i]->GetHash().ToString().c_str());
+                return;                   
+            }
+
+            if(vecProposals[i].payee != props1[i]->GetPayee()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+                return;                   
+            }
+
+            if(vecProposals[i].nAmount != props1[i]->GetAmount()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+                return;                   
+            }
+
+            LogPrintf("CFinalizedBudget::AutoCheck - Finalized Budget Matches! Submitting Vote.\n");
+            SubmitVote();
+        }
+
+    } 
+    // Feature : Masternodes can delegate finalized budgets to a 3rd party simply by adding this option to the configuration
+    else if (strBudgetMode == vin.prevout.ToStringShort()) 
+    {
+        SubmitVote();
+    }
+}
+
+void CFinalizedBudget::SubmitVote()
+{
+    CPubKey pubKeyMasternode;
+    CKey keyMasternode;
+    std::string errorMessage;
+
+    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){ 
+        LogPrintf("CFinalizedBudget::SubmitVote - Error upon calling SetKey\n");
+        return;
+    }
+
+    CFinalizedBudgetVote vote(activeMasternode.vin, GetHash());
+    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("CFinalizedBudget::SubmitVote - Failure to sign.");
+        return;
+    }
+
+    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+    vote.Relay();
+    budget.UpdateFinalizedBudget(vote);
+}
+
+void SubmitFinalBudget()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+
+    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+    if(nSubmittedFinalBudget >= nBlockStart) return;
+    if(nBlockStart - pindexPrev->nHeight > 100) return;
+
+    std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+
+    std::string strBudgetName = "main";
+    std::vector<CTxBudgetPayment> vecPayments;
+
+    for(unsigned int i = 0; i < props1.size(); i++){
+        CTxBudgetPayment out;
+        out.nProposalHash = props1[i]->GetHash();
+        out.payee = props1[i]->GetPayee();
+        out.nAmount = props1[i]->GetAmount();
+        vecPayments.push_back(out);
+    }
+
+    if(vecPayments.size() < 1) return;
+    nSubmittedFinalBudget = nBlockStart;
+
+    CPubKey pubKeyMasternode;
+    CKey keyMasternode;
+    std::string errorMessage;
+
+    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Error upon calling SetKey");
+    }
+
+    //create the proposal incase we're the first to make it
+    CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
+    if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Failure to sign.");
+    }
+
+    if(!prop.IsValid()){
+        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)");
+    }
+
+    mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+    prop.Relay();
+    budget.AddFinalizedBudget(prop);
+
+
+    CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
+    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Failure to sign.");
+    }
+
+    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+    vote.Relay();
+    budget.UpdateFinalizedBudget(vote);
+}
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 191038ee4fc7..222f6ff35262 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -42,6 +42,7 @@ void GetMasternodeBudgetEscrow(CScript& payee);
 
 //Amount of blocks in a months period of time (using 2.6 minutes per)
 int GetBudgetPaymentCycleBlocks();
+void SubmitFinalBudget();
 
 /** Save Budget Manager (budget.dat)
  */
@@ -113,12 +114,11 @@ class CBudgetManager
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
     void Clear(){
-        printf("Not implemented\n");
-    }
-    void CheckAndRemove(){
-        printf("Not implemented\n");
-        //replace cleanup
+        LogPrintf("Budget object cleared\n");
+        mapProposals.clear();
+        mapFinalizedBudgets.clear();
     }
+    void CheckAndRemove();
     std::string ToString() {return "not implemented";}
 
 
@@ -171,10 +171,11 @@ class CFinalizedBudget
 private:
     // critical section to protect the inner data structures
     mutable CCriticalSection cs;
+    bool fAutoChecked; //If it matches what we see, we'll auto vote for it (masternode only)
 
 public:
-    CTxIn vin;
     std::string strBudgetName;
+    CTxIn vin;
     int nBlockStart;
     std::vector<CTxBudgetPayment> vecProposals;
     map<uint256, CFinalizedBudgetVote> mapVotes;
@@ -216,6 +217,11 @@ class CFinalizedBudget
         return true;
     }
 
+    //check to see if we should vote on this
+    void AutoCheck();
+    //vote on this finalized budget as a masternode
+    void SubmitVote();
+
     //checks the hashes to make sure we know about them
     string GetStatus();
 
diff --git a/src/util.cpp b/src/util.cpp
index 8d1c2643c8c8..e98811e6c86f 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -118,6 +118,7 @@ bool fSucessfullyLoaded = false;
 bool fEnableDarksend = false;
 /** All denominations used by darksend */
 std::vector<int64_t> darkSendDenominations;
+string strBudgetMode = "";
 
 map<string, string> mapArgs;
 map<string, vector<string> > mapMultiArgs;
diff --git a/src/util.h b/src/util.h
index 1a5adaecafdc..6ce2ed57666e 100644
--- a/src/util.h
+++ b/src/util.h
@@ -43,6 +43,7 @@ extern int nMasternodeMinProtocol;
 extern int keysLoaded;
 extern bool fSucessfullyLoaded;
 extern std::vector<int64_t> darkSendDenominations;
+extern std::string strBudgetMode;
 
 extern std::map<std::string, std::string> mapArgs;
 extern std::map<std::string, std::vector<std::string> > mapMultiArgs;

From 6e0a64bc5d40602ed670ef0544e56ae97658c086 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 3 Jun 2015 18:42:37 +0300
Subject: [PATCH 1395/1819] simplify few IFs

---
 src/masternode-budget.cpp | 5 ++---
 src/masternode-budget.h   | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 1f2935c9e798..2fa4454c0c24 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -295,10 +295,9 @@ bool CBudgetProposal::IsValid()
 
     //TODO: if < 20 votes and 2+ weeks old, invalid
 
-    if(pindexPrev->nHeight - nBlockStart < 0) return false;
-    if(pindexPrev->nHeight > nBlockEnd) return false;
+    if(pindexPrev->nHeight < nBlockStart || pindexPrev->nHeight > nBlockEnd) return false;
 
-    if(nBlockEnd - GetBudgetPaymentCycleBlocks() <= nBlockStart) return false;
+    if(nBlockEnd - nBlockStart <= GetBudgetPaymentCycleBlocks()) return false;
 
     return true;
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 222f6ff35262..df6588c43d37 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -498,4 +498,4 @@ class CBudgetVote
 
 };
 
-#endif
\ No newline at end of file
+#endif

From d335c1ebbe9a1f5ab782514a869ff47e377be965 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 3 Jun 2015 19:10:11 +0300
Subject: [PATCH 1396/1819] MOVE: group classes` implementation together;
 REMOVE: GetMasternodeBudgetEscrow (not used)

---
 src/masternode-budget.cpp | 1325 ++++++++++++++++++-------------------
 src/masternode-budget.h   |    1 -
 2 files changed, 652 insertions(+), 674 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 2fa4454c0c24..91232ceed618 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -27,6 +27,64 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
+void SubmitFinalBudget()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+
+    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+    if(nSubmittedFinalBudget >= nBlockStart) return;
+    if(nBlockStart - pindexPrev->nHeight > 100) return;
+
+    std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+
+    std::string strBudgetName = "main";
+    std::vector<CTxBudgetPayment> vecPayments;
+
+    for(unsigned int i = 0; i < props1.size(); i++){
+        CTxBudgetPayment out;
+        out.nProposalHash = props1[i]->GetHash();
+        out.payee = props1[i]->GetPayee();
+        out.nAmount = props1[i]->GetAmount();
+        vecPayments.push_back(out);
+    }
+
+    if(vecPayments.size() < 1) return;
+    nSubmittedFinalBudget = nBlockStart;
+
+    CPubKey pubKeyMasternode;
+    CKey keyMasternode;
+    std::string errorMessage;
+
+    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Error upon calling SetKey");
+    }
+
+    //create the proposal incase we're the first to make it
+    CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
+    if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Failure to sign.");
+    }
+
+    if(!prop.IsValid()){
+        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)");
+    }
+
+    mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+    prop.Relay();
+    budget.AddFinalizedBudget(prop);
+
+
+    CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
+    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("SubmitFinalBudget - Failure to sign.");
+    }
+
+    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+    vote.Relay();
+    budget.UpdateFinalizedBudget(vote);
+}
+
 //
 // CBudgetDB
 //
@@ -185,155 +243,56 @@ void DumpBudgets()
     LogPrintf("Masternode dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
-CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName)
-{
-    //find the prop with the highest yes count
-
-    int nYesCount = -1;
-    CBudgetProposal* prop = NULL;
-
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end()){
-        if((*it).second.strProposalName == strProposalName && (*it).second.GetYeas() > nYesCount){
-            prop = &((*it).second);
-            nYesCount = prop->GetYeas();
-            return prop;
-        }
-        ++it;
-    }
-
-    if(nYesCount == 0) return NULL;
-
-    return prop;
-}
-
-void GetMasternodeBudgetEscrow(CScript& payee)
-{
-    std::string strAddress = "";
-
-    if(Params().NetworkID() == CBaseChainParams::MAIN) strAddress = "";
-    if(Params().NetworkID() == CBaseChainParams::TESTNET) strAddress = "";
-    if(Params().NetworkID() == CBaseChainParams::REGTEST) strAddress = "";
-
-    CBitcoinAddress address;
-    if (!address.SetString(strAddress))
-    {
-        LogPrintf("GetMasternodeBudgetEscrow - Invalid Masternode Budget Escrow Address\n");
-        return;
-    }
-    payee = GetScriptForDestination(address.Get());
-    return;
-}
-
-CBudgetProposal::CBudgetProposal()
-{
-    vin = CTxIn();
-    strProposalName = "unknown";
-    nBlockStart = 0;
-    nBlockEnd = 0;
-    nAmount = 0;
-}
-
-CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
-{
-	vin = vinIn;
-    strProposalName = strProposalNameIn;
-    strURL = strURLIn;
-	nBlockStart = nBlockStartIn;
-	nBlockEnd = nBlockEndIn;
-	address = addressIn;
-	nAmount = nAmountIn;
-}
-
-CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn)
+void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
 {
-    vin = vinIn;
-    strProposalName = strProposalNameIn;
-    strURL = strURLIn;
-
-    nBlockStart = nBlockStartIn;
-
-    int nCycleStart = (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
-    //calculate the end of the cycle for this vote, add half a cycle (vote will be deleted after that block)
-    nBlockEnd = nCycleStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount) + GetBudgetPaymentCycleBlocks()/2;
+    printf("! 1\n");
 
-    address = addressIn;
-    nAmount = nAmountIn;
-}
+    LOCK(cs);
+    if(mapFinalizedBudgets.count(prop.GetHash())) return;
 
-CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
-{
-    vin = other.vin;
-    strProposalName = other.strProposalName;
-    strURL = other.strURL;
-    nBlockStart = other.nBlockStart;
-    nBlockEnd = other.nBlockEnd;
-    address = other.address;
-    nAmount = other.nAmount;
-}
+    printf("! 2\n");
 
-CBudgetVote::CBudgetVote()
-{
-    vin = CTxIn();
-    nProposalHash = 0;
-    nVote = VOTE_ABSTAIN;
-    nTime = 0;
-}
+    mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
 
-CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
-{
-    vin = vinIn;
-    nProposalHash = nProposalHashIn;
-    nVote = nVoteIn;
-    nTime = GetAdjustedTime();
+    printf("! 3\n");
 }
 
-bool CBudgetProposal::IsValid()
+void CBudgetManager::AddProposal(CBudgetProposal& prop)
 {
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return false;
-
-    //TODO: if < 20 votes and 2+ weeks old, invalid
-
-    if(pindexPrev->nHeight < nBlockStart || pindexPrev->nHeight > nBlockEnd) return false;
-
-    if(nBlockEnd - nBlockStart <= GetBudgetPaymentCycleBlocks()) return false;
+    LOCK(cs);
+    if(mapProposals.count(prop.GetHash())) return;
 
-    return true;
+    mapProposals.insert(make_pair(prop.GetHash(), prop));
 }
 
-
-bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+void CBudgetManager::CheckAndRemove()
 {
-    // Choose coins to use
-    CPubKey pubKeyCollateralAddress;
-    CKey keyCollateralAddress;
-
-    std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
-
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
-
-    return true;
-}
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it).second);
+        if(!prop->IsValid()){
+            mapFinalizedBudgets.erase(it);
+        } else {
+            prop->AutoCheck();
+            it++;
+        }
+    }
 
-void CBudgetVote::Relay()
-{
-    CInv inv(MSG_BUDGET_VOTE, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end())
+    {
+        CBudgetProposal* prop = &((*it2).second);
+        if(!prop->IsValid()){
+            mapProposals.erase(it2);
+        } else {
+            it2++;
+        }
     }
 }
 
 void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
-{    
+{
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
@@ -342,10 +301,10 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
     int64_t nAmount = 0;
 
     // ------- Grab The Highest Count
-    
+
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
-    {   
+    {
         CFinalizedBudget* prop = &((*it).second);
         if(prop->GetVoteCount() > nHighestCount){
             if(pindexPrev->nHeight+1 >= prop->GetBlockStart() && pindexPrev->nHeight+1 <= prop->GetBlockEnd()){
@@ -362,7 +321,7 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
 
     //miners get the full amount on these blocks
     txNew.vout[0].nValue = blockValue;
-    
+
     if(nHighestCount > 0){
         txNew.vout.resize(2);
 
@@ -379,49 +338,224 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
 
 }
 
-std::string CFinalizedBudget::GetStatus()
+CFinalizedBudget *CBudgetManager::FindFinalizedBudget(uint256 nHash)
 {
-    std::string retBadHashes = "";
-    std::string retBadPayeeOrAmount = "";
-
-    for(int nBlockHeight = GetBlockStart(); nBlockHeight <= GetBlockEnd(); nBlockHeight++)
-    {
-        CTxBudgetPayment prop1;
-        if(!GetProposalByBlock(nBlockHeight, prop1)){
-            LogPrintf("CFinalizedBudget::GetStatus - Couldn't find budget payment for block %lld\n", nBlockHeight);
-            continue;
-        }
-
-        CBudgetProposal* prop2 =  budget.FindProposal(prop1.nProposalHash);    
-        if(!prop2){
-            if(retBadHashes == ""){
-                retBadHashes = "Unknown proposal hash! Check this proposal before voting" + prop1.nProposalHash.ToString();
-            } else {
-                retBadHashes += "," + prop1.nProposalHash.ToString();
-            }
-        } else {
-            if(prop2->GetPayee() != prop1.payee || prop2->GetAmount() != prop1.nAmount)
-            {
-                if(retBadPayeeOrAmount == ""){
-                    retBadPayeeOrAmount = "Budget payee/nAmount doesn't match our proposal! " + prop1.nProposalHash.ToString();
-                } else {
-                    retBadPayeeOrAmount += "," + prop1.nProposalHash.ToString();
-                }
-            }
-        }
-    }
-
-    if(retBadHashes == "" && retBadPayeeOrAmount == "") return "OK";
+    if(mapFinalizedBudgets.count(nHash))
+        return &mapFinalizedBudgets[nHash];
 
-    return retBadHashes + retBadPayeeOrAmount;
+    return NULL;
 }
 
-void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName)
 {
-	// lite mode is not supported
-    if(IsInitialBlockDownload()) return;
+    //find the prop with the highest yes count
 
-    LOCK(cs_budget);
+    int nYesCount = -1;
+    CBudgetProposal* prop = NULL;
+
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end()){
+        if((*it).second.strProposalName == strProposalName && (*it).second.GetYeas() > nYesCount){
+            prop = &((*it).second);
+            nYesCount = prop->GetYeas();
+            return prop;
+        }
+        ++it;
+    }
+
+    if(nYesCount == 0) return NULL;
+
+    return prop;
+}
+
+CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
+{
+    if(mapProposals.count(nHash))
+        return &mapProposals[nHash];
+
+    return NULL;
+}
+
+bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it).second);
+        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+            return true;
+        }
+
+        it++;
+    }
+
+    return false;
+}
+
+bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+{
+    int nHighestCount = 0;
+    std::vector<CFinalizedBudget*> ret;
+
+    // ------- Grab The Highest Count
+
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it).second);
+        if(prop->GetVoteCount() > nHighestCount){
+            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+                nHighestCount = prop->GetVoteCount();
+            }
+        }
+
+        it++;
+    }
+
+    if(nHighestCount < mnodeman.CountEnabled()/20) return true;
+
+    // check the highest finalized budgets (+/- 10% to assist in consensus)
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it2).second);
+
+        if(prop->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
+            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+                if(prop->IsTransactionValid(txNew, nBlockHeight)){
+                    return true;
+                }
+            }
+        }
+
+        it2++;
+    }
+
+    //we looked through all of the known budgets
+    return false;
+}
+
+//Need to review this function
+std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
+{
+    // ------- Sort budgets by Yes Count
+
+    std::map<uint256, int> mapList;
+
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end()){
+        mapList.insert(make_pair((*it).second.GetHash(), (*it).second.GetYeas()));
+        ++it;
+    }
+
+    //sort the map and grab the highest count item
+    std::vector<std::pair<uint256,int> > vecList(mapList.begin(), mapList.end());
+    std::sort(vecList.begin(),vecList.end());
+
+    // ------- Grab The Budgets In Order
+
+    std::vector<CBudgetProposal*> ret;
+
+    int64_t nBudgetAllocated = 0;
+    int64_t nTotalBudget = GetTotalBudget();
+
+
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end())
+    {
+        CBudgetProposal* prop = &((*it2).second);
+
+        if(nTotalBudget == nBudgetAllocated){
+            prop->SetAllotted(0);
+        } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
+            prop->SetAllotted(prop->GetAmount());
+            nBudgetAllocated += prop->GetAmount();
+        } else {
+            //couldn't pay for the entire budget, so it'll be partially paid.
+            prop->SetAllotted(nTotalBudget - nBudgetAllocated);
+            nBudgetAllocated = nTotalBudget;
+        }
+
+        ret.push_back(prop);
+        it2++;
+    }
+
+    return ret;
+}
+
+std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
+{
+    std::vector<CFinalizedBudget*> ret;
+
+    // ------- Grab The Budgets In Order
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it2).second);
+
+        ret.push_back(prop);
+        it2++;
+    }
+
+    return ret;
+}
+
+std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
+{
+    std::string ret = "unknown-budget";
+
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it).second);
+        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+            CTxBudgetPayment payment;
+            if(prop->GetProposalByBlock(nBlockHeight, payment)){
+                if(ret == "unknown-budget"){
+                    ret = payment.nProposalHash.ToString().c_str();
+                } else {
+                    ret += ",";
+                    ret += payment.nProposalHash.ToString().c_str();
+                }
+            } else {
+                LogPrintf("CBudgetManager::GetRequiredPaymentsString - Couldn't find budget payment for block %lld\n", nBlockHeight);
+            }
+        }
+
+        it++;
+    }
+
+    return ret;
+}
+
+int64_t CBudgetManager::GetTotalBudget()
+{
+    if(chainActive.Tip() == NULL) return 0;
+
+    const CBlockIndex* pindex = chainActive.Tip();
+    return (GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, 0)/100)*15;
+}
+
+void CBudgetManager::NewBlock()
+{
+    budget.CheckAndRemove();
+
+    if (strBudgetMode == "suggest") { //suggest the budget we see
+        SubmitFinalBudget();
+    }
+
+    //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
+    if(chainActive.Height() % 6 != 0) return;
+    mnodeman.DecrementVotedTimes();
+}
+
+void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+{
+    // lite mode is not supported
+    if(IsInitialBlockDownload()) return;
+
+    LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
         if(pfrom->HasFulfilledRequest("mnvs")) {
@@ -457,7 +591,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(prop.vin);
         if(pmn == NULL) {
             LogPrintf("mprop - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-            return;         
+            return;
         }
 
         mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
@@ -490,17 +624,17 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
             LogPrintf("mvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-            return;         
+            return;
         }
 
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-        	budget.UpdateProposal(vote);
-        	vote.Relay();
-        	if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+            budget.UpdateProposal(vote);
+            vote.Relay();
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
-        	LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
-        	return;
+            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            return;
         }
     }
 
@@ -526,7 +660,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(prop.vin);
         if(pmn == NULL) {
             LogPrintf("fbs - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-            return;         
+            return;
         }
 
         mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
@@ -559,7 +693,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
             LogPrintf("fbvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-            return;         
+            return;
         }
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
@@ -574,33 +708,20 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     }
 }
 
-bool CBudgetVote::SignatureValid()
+bool CBudgetManager::PropExists(uint256 nHash)
 {
-    std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
-
-    CMasternode* pmn = mnodeman.Find(vin);
-
-    if(pmn == NULL)
-    {
-        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode\n");
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CBudgetVote::SignatureValid() - Verify message failed\n");
-        return false;
-    }
-
-    return true;
+    if(mapProposals.count(nHash)) return true;
+    return false;
 }
 
-void CBudgetManager::AddProposal(CBudgetProposal& prop)
+void CBudgetManager::Sync(CNode* node)
 {
-    LOCK(cs);
-    if(mapProposals.count(prop.GetHash())) return;
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end()){
+        (*it).second.Sync(node);
+        ++it;
+    }
 
-    mapProposals.insert(make_pair(prop.GetHash(), prop));    
 }
 
 void CBudgetManager::UpdateProposal(CBudgetVote& vote)
@@ -608,37 +729,82 @@ void CBudgetManager::UpdateProposal(CBudgetVote& vote)
     LOCK(cs);
     if(!mapProposals.count(vote.nProposalHash)){
         LogPrintf("ERROR : Unknown proposal %d\n", vote.nProposalHash.ToString().c_str());
-    	return;
+        return;
     }
 
-  	mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
+    mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
 }
 
-void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
+void CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote)
 {
     LOCK(cs);
 
-    uint256 hash = vote.vin.prevout.GetHash();
-    mapVotes[hash] = vote;    
-}
-
-void CBudgetManager::NewBlock()
-{
-    budget.CheckAndRemove();
-
-    if (strBudgetMode == "suggest") { //suggest the budget we see
-        SubmitFinalBudget();
+    if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
+        LogPrintf("ERROR: Unknown Finalized Proposal %s\n", vote.nBudgetHash.ToString().c_str());
+        //should ask for it
+        return;
     }
 
-	//this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
-    if(chainActive.Height() % 6 != 0) return;
-    mnodeman.DecrementVotedTimes();
+    mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
 }
 
-double CBudgetProposal::GetRatio()
+CBudgetProposal::CBudgetProposal()
 {
-	int yeas = 0;
-	int nays = 0;
+    vin = CTxIn();
+    strProposalName = "unknown";
+    nBlockStart = 0;
+    nBlockEnd = 0;
+    nAmount = 0;
+}
+
+CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
+{
+	vin = vinIn;
+    strProposalName = strProposalNameIn;
+    strURL = strURLIn;
+	nBlockStart = nBlockStartIn;
+	nBlockEnd = nBlockEndIn;
+	address = addressIn;
+	nAmount = nAmountIn;
+}
+
+CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
+{
+    vin = other.vin;
+    strProposalName = other.strProposalName;
+    strURL = other.strURL;
+    nBlockStart = other.nBlockStart;
+    nBlockEnd = other.nBlockEnd;
+    address = other.address;
+    nAmount = other.nAmount;
+}
+
+bool CBudgetProposal::IsValid()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+
+    //TODO: if < 20 votes and 2+ weeks old, invalid
+
+    if(pindexPrev->nHeight < nBlockStart || pindexPrev->nHeight > nBlockEnd) return false;
+
+    if(nBlockEnd - nBlockStart <= GetBudgetPaymentCycleBlocks()) return false;
+
+    return true;
+}
+
+void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
+{
+    LOCK(cs);
+
+    uint256 hash = vote.vin.prevout.GetHash();
+    mapVotes[hash] = vote;
+}
+
+double CBudgetProposal::GetRatio()
+{
+    int yeas = 0;
+    int nays = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
@@ -655,7 +821,7 @@ double CBudgetProposal::GetRatio()
 
 int CBudgetProposal::GetYeas()
 {
-	int ret = 0;
+    int ret = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
@@ -668,7 +834,7 @@ int CBudgetProposal::GetYeas()
 
 int CBudgetProposal::GetNays()
 {
-	int ret = 0;
+    int ret = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
@@ -681,7 +847,7 @@ int CBudgetProposal::GetNays()
 
 int CBudgetProposal::GetAbstains()
 {
-	int ret = 0;
+    int ret = 0;
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
@@ -726,73 +892,6 @@ int CBudgetProposal::GetRemainingPaymentCount()
     return (GetBlockEndCycle()-GetBlockCurrentCycle())/GetBudgetPaymentCycleBlocks();
 }
 
-int64_t CBudgetManager::GetTotalBudget()
-{
-	if(chainActive.Tip() == NULL) return 0;
-
-	const CBlockIndex* pindex = chainActive.Tip();
-	return (GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, 0)/100)*15;
-}
-
-//Need to review this function
-std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
-{
-    // ------- Sort budgets by Yes Count
-
-	std::map<uint256, int> mapList;
-
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end()){
-        mapList.insert(make_pair((*it).second.GetHash(), (*it).second.GetYeas()));
-        ++it;
-    }
-
-    //sort the map and grab the highest count item
-    std::vector<std::pair<uint256,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
-
-    // ------- Grab The Budgets In Order
-    
-	std::vector<CBudgetProposal*> ret;
-    
-	int64_t nBudgetAllocated = 0;
-	int64_t nTotalBudget = GetTotalBudget();
-
-
-    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
-    while(it2 != mapProposals.end())
-    {
-        CBudgetProposal* prop = &((*it2).second);
-
-        if(nTotalBudget == nBudgetAllocated){
-            prop->SetAllotted(0);
-        } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
-            prop->SetAllotted(prop->GetAmount());
-            nBudgetAllocated += prop->GetAmount();
-        } else {
-            //couldn't pay for the entire budget, so it'll be partially paid.
-            prop->SetAllotted(nTotalBudget - nBudgetAllocated);
-            nBudgetAllocated = nTotalBudget;
-        }
-
-    	ret.push_back(prop);
-        it2++;
-    }
-    
-	return ret;
-}
-
-
-void CBudgetManager::Sync(CNode* node)
-{
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end()){
-     	(*it).second.Sync(node);
-        ++it;
-    }
-
-}
-
 void CBudgetProposal::Sync(CNode* node)
 {
     //send the proposal
@@ -824,6 +923,22 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
     nAmount = other.nAmount;
 }
 
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn)
+{
+    vin = vinIn;
+    strProposalName = strProposalNameIn;
+    strURL = strURLIn;
+
+    nBlockStart = nBlockStartIn;
+
+    int nCycleStart = (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
+    //calculate the end of the cycle for this vote, add half a cycle (vote will be deleted after that block)
+    nBlockEnd = nCycleStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount) + GetBudgetPaymentCycleBlocks()/2;
+
+    address = addressIn;
+    nAmount = nAmountIn;
+}
+
 bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
     // Choose coins to use
@@ -877,140 +992,42 @@ bool CBudgetProposalBroadcast::SignatureValid()
     return true;
 }
 
-std::string CFinalizedBudget::GetProposals() {
-    std::string ret = "aeu";
-
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
-        CFinalizedBudget* prop = budget.FindFinalizedBudget(payment.nProposalHash);
-
-        std::string token = payment.nProposalHash.ToString();
-
-        if(prop) token = prop->GetName();
-        if(ret == "") {ret = token;}
-        else {ret = "," + token;}
-    }
-    return ret;
-}
-
-CFinalizedBudget *CBudgetManager::FindFinalizedBudget(uint256 nHash)
-{
-    if(mapFinalizedBudgets.count(nHash))
-        return &mapFinalizedBudgets[nHash];
-
-    return NULL;
-}
-
-CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
-{
-    if(mapProposals.count(nHash))
-        return &mapProposals[nHash];
-
-    return NULL;
-}
-
-bool CBudgetManager::PropExists(uint256 nHash)
+CBudgetVote::CBudgetVote()
 {
-    if(mapProposals.count(nHash)) return true;
-    return false;
-}
-
-bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){    
-    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
-    while(it != mapFinalizedBudgets.end())
-    {   
-        CFinalizedBudget* prop = &((*it).second);
-        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-            return true;
-        }
-
-        it++;
-    }
-
-    return false;
+    vin = CTxIn();
+    nProposalHash = 0;
+    nVote = VOTE_ABSTAIN;
+    nTime = 0;
 }
 
-bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
 {
-    int nHighestCount = 0;
-    std::vector<CFinalizedBudget*> ret;
-
-    // ------- Grab The Highest Count
-    
-    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
-    while(it != mapFinalizedBudgets.end())
-    {   
-        CFinalizedBudget* prop = &((*it).second);
-        if(prop->GetVoteCount() > nHighestCount){
-            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-                nHighestCount = prop->GetVoteCount();
-            }
-        }
-
-        it++;
-    }
-
-    if(nHighestCount < mnodeman.CountEnabled()/20) return true;
-
-    // check the highest finalized budgets (+/- 10% to assist in consensus) 
-
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end())
-    {
-        CFinalizedBudget* prop = &((*it2).second);
-
-        if(prop->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
-            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-                if(prop->IsTransactionValid(txNew, nBlockHeight)){
-                    return true;
-                }
-            }
-        }
-
-        it2++;
-    }
-
-    //we looked through all of the known budgets    
-    return false;
+    vin = vinIn;
+    nProposalHash = nProposalHashIn;
+    nVote = nVoteIn;
+    nTime = GetAdjustedTime();
 }
 
-std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
+void CBudgetVote::Relay()
 {
-    std::vector<CFinalizedBudget*> ret;
-
-    // ------- Grab The Budgets In Order
-    
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end())
-    {
-        CFinalizedBudget* prop = &((*it2).second);
-
-        ret.push_back(prop);
-        it2++;
+    CInv inv(MSG_BUDGET_VOTE, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
     }
-    
-    return ret;
-}
-
-CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
-{
-    vin = CTxIn();
-    strBudgetName = "";
-    nBlockStart = 0;
-    vecProposals.clear();
-    mapVotes.clear();
-    vchSig.clear();
 }
 
-bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
     // Choose coins to use
     CPubKey pubKeyCollateralAddress;
     CKey keyCollateralAddress;
 
     std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
-    
+    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
+
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
         return(" Error upon calling SignMessage");
 
@@ -1020,199 +1037,222 @@ bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMastern
     return true;
 }
 
-bool CFinalizedBudgetBroadcast::SignatureValid()
+bool CBudgetVote::SignatureValid()
 {
     std::string errorMessage;
-
-    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
+    std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
 
     CMasternode* pmn = mnodeman.Find(vin);
 
     if(pmn == NULL)
     {
-        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Unknown Masternode\n");
+        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode\n");
         return false;
     }
 
     if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Verify message failed\n");
+        LogPrintf("CBudgetVote::SignatureValid() - Verify message failed\n");
         return false;
     }
 
     return true;
 }
 
-bool CFinalizedBudget::IsValid()
+CFinalizedBudget::CFinalizedBudget()
 {
-    //must be the correct block for payment to happen (once a month)
-    if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
-    if(GetBlockEnd() - nBlockStart > 100) return false;
-    if(vecProposals.size() > 100) return false;
+    vin = CTxIn();
+    strBudgetName = "";
+    nBlockStart = 0;
+    vecProposals.clear();
+    mapVotes.clear();
+}
 
-    //TODO: if N cycles old, invalid, invalid
 
-    return true;
+CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
+{
+    vin = other.vin;
+    strBudgetName = other.strBudgetName;
+    nBlockStart = other.nBlockStart;
+    vecProposals = other.vecProposals;
+    mapVotes = other.mapVotes;
 }
 
-bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
+void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
 {
-   /* BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
-    {
-        bool found = false;
-        BOOST_FOREACH(CTxOut out, txNew.vout)
-        {
-            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
-                found = true;
-        }
-
-        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
-
-            CTxDestination address1;
-            ExtractDestination(payee.scriptPubKey, address1);
-            CBitcoinAddress address2(address1);
-
-            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
-            return false;
-        }
-    }*/
+    LOCK(cs);
 
-    return true;
+    uint256 hash = vote.vin.prevout.GetHash();
+    mapVotes[hash] = vote;
 }
 
-bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
+//evaluate if we should vote for this. Masternode only
+void CFinalizedBudget::AutoCheck()
 {
-    // Choose coins to use
-    CPubKey pubKeyCollateralAddress;
-    CKey keyCollateralAddress;
+    if(!fMasterNode || fAutoChecked) return;
 
-    std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
+    if(Params().NetworkID() == CBaseChainParams::MAIN){
+        if(rand() % 100 > 5) return; //do this 1 in 20 blocks -- spread out the voting activity on mainnet
+    }
+    fAutoChecked = true; //we only need to check this once
 
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
+    if(strBudgetMode == "auto") //only vote for exact matches
+    {
+        std::vector<CBudgetProposal*> props1 = budget.GetBudget();
 
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
+        for(unsigned int i = 0; i < vecProposals.size(); i++){
+            if(i > props1.size()-1) {
+                LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");
+                return;
+            }
 
-    return true;
-}
+            if(vecProposals[i].nProposalHash != props1[i]->GetHash()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d doesn't match %s %s\n", i, vecProposals[i].nProposalHash.ToString().c_str(), props1[i]->GetHash().ToString().c_str());
+                return;
+            }
 
-bool CFinalizedBudgetVote::SignatureValid()
-{
-    std::string errorMessage;
+            if(vecProposals[i].payee != props1[i]->GetPayee()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+                return;
+            }
 
-    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
+            if(vecProposals[i].nAmount != props1[i]->GetAmount()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+                return;
+            }
 
-    CMasternode* pmn = mnodeman.Find(vin);
+            LogPrintf("CFinalizedBudget::AutoCheck - Finalized Budget Matches! Submitting Vote.\n");
+            SubmitVote();
+        }
 
-    if(pmn == NULL)
+    }
+    // Feature : Masternodes can delegate finalized budgets to a 3rd party simply by adding this option to the configuration
+    else if (strBudgetMode == vin.prevout.ToStringShort())
     {
-        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Unknown Masternode\n");
-        return false;
+        SubmitVote();
     }
+}
 
-    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Verify message failed\n");
-        return false;
-    }
+std::string CFinalizedBudget::GetProposals() {
+    std::string ret = "aeu";
 
-    return true;
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
+        CFinalizedBudget* prop = budget.FindFinalizedBudget(payment.nProposalHash);
+
+        std::string token = payment.nProposalHash.ToString();
+
+        if(prop) token = prop->GetName();
+        if(ret == "") {ret = token;}
+        else {ret = "," + token;}
+    }
+    return ret;
 }
 
-void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
+std::string CFinalizedBudget::GetStatus()
 {
-    printf("! 1\n");
+    std::string retBadHashes = "";
+    std::string retBadPayeeOrAmount = "";
 
-    LOCK(cs);
-    if(mapFinalizedBudgets.count(prop.GetHash())) return;
+    for(int nBlockHeight = GetBlockStart(); nBlockHeight <= GetBlockEnd(); nBlockHeight++)
+    {
+        CTxBudgetPayment prop1;
+        if(!GetProposalByBlock(nBlockHeight, prop1)){
+            LogPrintf("CFinalizedBudget::GetStatus - Couldn't find budget payment for block %lld\n", nBlockHeight);
+            continue;
+        }
 
-    printf("! 2\n");
+        CBudgetProposal* prop2 =  budget.FindProposal(prop1.nProposalHash);
+        if(!prop2){
+            if(retBadHashes == ""){
+                retBadHashes = "Unknown proposal hash! Check this proposal before voting" + prop1.nProposalHash.ToString();
+            } else {
+                retBadHashes += "," + prop1.nProposalHash.ToString();
+            }
+        } else {
+            if(prop2->GetPayee() != prop1.payee || prop2->GetAmount() != prop1.nAmount)
+            {
+                if(retBadPayeeOrAmount == ""){
+                    retBadPayeeOrAmount = "Budget payee/nAmount doesn't match our proposal! " + prop1.nProposalHash.ToString();
+                } else {
+                    retBadPayeeOrAmount += "," + prop1.nProposalHash.ToString();
+                }
+            }
+        }
+    }
 
-    mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));    
+    if(retBadHashes == "" && retBadPayeeOrAmount == "") return "OK";
 
-    printf("! 3\n");
+    return retBadHashes + retBadPayeeOrAmount;
 }
 
-void CFinalizedBudgetBroadcast::Relay()
+bool CFinalizedBudget::IsValid()
 {
-    CInv inv(MSG_BUDGET_FINALIZED, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    //must be the correct block for payment to happen (once a month)
+    if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
+    if(GetBlockEnd() - nBlockStart > 100) return false;
+    if(vecProposals.size() > 100) return false;
+
+    //TODO: if N cycles old, invalid, invalid
+
+    return true;
 }
 
-void CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote)
+bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-    LOCK(cs);
+   /* BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
+    {
+        bool found = false;
+        BOOST_FOREACH(CTxOut out, txNew.vout)
+        {
+            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
+                found = true;
+        }
 
-    if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
-        LogPrintf("ERROR: Unknown Finalized Proposal %s\n", vote.nBudgetHash.ToString().c_str());
-        //should ask for it
-        return;
-    }
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
 
-    mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
-}
+            CTxDestination address1;
+            ExtractDestination(payee.scriptPubKey, address1);
+            CBitcoinAddress address2(address1);
 
-void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
-{
-    LOCK(cs);
+            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
+            return false;
+        }
+    }*/
 
-    uint256 hash = vote.vin.prevout.GetHash();
-    mapVotes[hash] = vote;    
+    return true;
 }
 
-void CFinalizedBudgetVote::Relay()
+void CFinalizedBudget::SubmitVote()
 {
-    CInv inv(MSG_BUDGET_FINALIZED_VOTE, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
+    CPubKey pubKeyMasternode;
+    CKey keyMasternode;
+    std::string errorMessage;
+
+    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
+        LogPrintf("CFinalizedBudget::SubmitVote - Error upon calling SetKey\n");
+        return;
     }
-}
 
-CFinalizedBudgetVote::CFinalizedBudgetVote()
-{
-    vin = CTxIn();
-    nBudgetHash = 0;
-    nTime = 0;
-    vchSig.clear();
-}
+    CFinalizedBudgetVote vote(activeMasternode.vin, GetHash());
+    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("CFinalizedBudget::SubmitVote - Failure to sign.");
+        return;
+    }
 
-CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
-{
-    vin = vinIn;
-    nBudgetHash = nBudgetHashIn;
-    nTime = GetAdjustedTime();
-    vchSig.clear();
+    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+    vote.Relay();
+    budget.UpdateFinalizedBudget(vote);
 }
 
-CFinalizedBudget::CFinalizedBudget()
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
 {
     vin = CTxIn();
     strBudgetName = "";
     nBlockStart = 0;
     vecProposals.clear();
     mapVotes.clear();
+    vchSig.clear();
 }
 
-
-CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
-{
-    vin = other.vin;
-    strBudgetName = other.strBudgetName;
-    nBlockStart = other.nBlockStart;
-    vecProposals = other.vecProposals;
-    mapVotes = other.mapVotes;
-}
-
-
 CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(const CFinalizedBudget& other)
 {
     vin = other.vin;
@@ -1232,183 +1272,122 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string s
     mapVotes.clear();
 }
 
-std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
-{
-    std::string ret = "unknown-budget";
-
-    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
-    while(it != mapFinalizedBudgets.end())
-    {   
-        CFinalizedBudget* prop = &((*it).second);
-        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-            CTxBudgetPayment payment;
-            if(prop->GetProposalByBlock(nBlockHeight, payment)){
-                if(ret == "unknown-budget"){
-                    ret = payment.nProposalHash.ToString().c_str();
-                } else {
-                    ret += ",";
-                    ret += payment.nProposalHash.ToString().c_str();
-                }
-            } else {
-                LogPrintf("CBudgetManager::GetRequiredPaymentsString - Couldn't find budget payment for block %lld\n", nBlockHeight);
-            }
-        }
-
-        it++;
-    }
-
-    return ret;
-}
-
-void CBudgetManager::CheckAndRemove()
+void CFinalizedBudgetBroadcast::Relay()
 {
-    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
-    while(it != mapFinalizedBudgets.end())
-    {   
-        CFinalizedBudget* prop = &((*it).second);
-        if(!prop->IsValid()){
-            mapFinalizedBudgets.erase(it);
-        } else {
-            prop->AutoCheck();
-            it++;
-        }
-    }
-
-    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
-    while(it2 != mapProposals.end())
-    {   
-        CBudgetProposal* prop = &((*it2).second);
-        if(!prop->IsValid()){
-            mapProposals.erase(it2);
-        } else {
-            it2++;
-        }
+    CInv inv(MSG_BUDGET_FINALIZED, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
     }
 }
 
-//evaluate if we should vote for this. Masternode only
-void CFinalizedBudget::AutoCheck()
+bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
-    if(!fMasterNode || fAutoChecked) return;
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
 
-    if(Params().NetworkID() == CBaseChainParams::MAIN){
-        if(rand() % 100 > 5) return; //do this 1 in 20 blocks -- spread out the voting activity on mainnet
-    }
-    fAutoChecked = true; //we only need to check this once
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
 
-    if(strBudgetMode == "auto") //only vote for exact matches
-    {
-        std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
 
-        for(unsigned int i = 0; i < vecProposals.size(); i++){
-            if(i > props1.size()-1) {
-                LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");                
-                return;
-            }
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
 
-            if(vecProposals[i].nProposalHash != props1[i]->GetHash()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d doesn't match %s %s\n", i, vecProposals[i].nProposalHash.ToString().c_str(), props1[i]->GetHash().ToString().c_str());
-                return;                   
-            }
+    return true;
+}
 
-            if(vecProposals[i].payee != props1[i]->GetPayee()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
-                return;                   
-            }
+bool CFinalizedBudgetBroadcast::SignatureValid()
+{
+    std::string errorMessage;
 
-            if(vecProposals[i].nAmount != props1[i]->GetAmount()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
-                return;                   
-            }
+    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
+    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
 
-            LogPrintf("CFinalizedBudget::AutoCheck - Finalized Budget Matches! Submitting Vote.\n");
-            SubmitVote();
-        }
+    CMasternode* pmn = mnodeman.Find(vin);
 
-    } 
-    // Feature : Masternodes can delegate finalized budgets to a 3rd party simply by adding this option to the configuration
-    else if (strBudgetMode == vin.prevout.ToStringShort()) 
+    if(pmn == NULL)
     {
-        SubmitVote();
+        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Unknown Masternode\n");
+        return false;
     }
+
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Verify message failed\n");
+        return false;
+    }
+
+    return true;
 }
 
-void CFinalizedBudget::SubmitVote()
+CFinalizedBudgetVote::CFinalizedBudgetVote()
 {
-    CPubKey pubKeyMasternode;
-    CKey keyMasternode;
-    std::string errorMessage;
+    vin = CTxIn();
+    nBudgetHash = 0;
+    nTime = 0;
+    vchSig.clear();
+}
 
-    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){ 
-        LogPrintf("CFinalizedBudget::SubmitVote - Error upon calling SetKey\n");
-        return;
-    }
+CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
+{
+    vin = vinIn;
+    nBudgetHash = nBudgetHashIn;
+    nTime = GetAdjustedTime();
+    vchSig.clear();
+}
 
-    CFinalizedBudgetVote vote(activeMasternode.vin, GetHash());
-    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("CFinalizedBudget::SubmitVote - Failure to sign.");
-        return;
+void CFinalizedBudgetVote::Relay()
+{
+    CInv inv(MSG_BUDGET_FINALIZED_VOTE, GetHash());
+    vector<CInv> vInv;
+    vInv.push_back(inv);
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes){
+        pnode->PushMessage("inv", vInv);
     }
-
-    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-    vote.Relay();
-    budget.UpdateFinalizedBudget(vote);
 }
 
-void SubmitFinalBudget()
+bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 {
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(!pindexPrev) return;
-
-    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-    if(nSubmittedFinalBudget >= nBlockStart) return;
-    if(nBlockStart - pindexPrev->nHeight > 100) return;
+    // Choose coins to use
+    CPubKey pubKeyCollateralAddress;
+    CKey keyCollateralAddress;
 
-    std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+    std::string errorMessage;
+    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
 
-    std::string strBudgetName = "main";
-    std::vector<CTxBudgetPayment> vecPayments;
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
+        return(" Error upon calling SignMessage");
 
-    for(unsigned int i = 0; i < props1.size(); i++){
-        CTxBudgetPayment out;
-        out.nProposalHash = props1[i]->GetHash();
-        out.payee = props1[i]->GetPayee();
-        out.nAmount = props1[i]->GetAmount();
-        vecPayments.push_back(out);
-    }
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
+        return(" Error upon calling VerifyMessage");
 
-    if(vecPayments.size() < 1) return;
-    nSubmittedFinalBudget = nBlockStart;
+    return true;
+}
 
-    CPubKey pubKeyMasternode;
-    CKey keyMasternode;
+bool CFinalizedBudgetVote::SignatureValid()
+{
     std::string errorMessage;
 
-    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Error upon calling SetKey");
-    }
+    std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
 
-    //create the proposal incase we're the first to make it
-    CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
-    if(!prop.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.");
-    }
+    CMasternode* pmn = mnodeman.Find(vin);
 
-    if(!prop.IsValid()){
-        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)");
+    if(pmn == NULL)
+    {
+        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Unknown Masternode\n");
+        return false;
     }
 
-    mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
-    prop.Relay();
-    budget.AddFinalizedBudget(prop);
-
-
-    CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
-    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.");
+    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CFinalizedBudgetVote::SignatureValid() - Verify message failed\n");
+        return false;
     }
 
-    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-    vote.Relay();
-    budget.UpdateFinalizedBudget(vote);
+    return true;
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index df6588c43d37..8460eb933a00 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -38,7 +38,6 @@ extern std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
 extern CBudgetManager budget;
 
 void DumpBudgets();
-void GetMasternodeBudgetEscrow(CScript& payee);
 
 //Amount of blocks in a months period of time (using 2.6 minutes per)
 int GetBudgetPaymentCycleBlocks();

From 17d3df530016f934a9b1fa002ec9c9bfe8429fdf Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 3 Jun 2015 19:45:15 +0300
Subject: [PATCH 1397/1819] fix CBudgetManager::FindProposal

---
 src/masternode-budget.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 91232ceed618..f5c3c818308a 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -350,7 +350,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
 {
     //find the prop with the highest yes count
 
-    int nYesCount = -1;
+    int nYesCount = 0;
     CBudgetProposal* prop = NULL;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
@@ -358,7 +358,6 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
         if((*it).second.strProposalName == strProposalName && (*it).second.GetYeas() > nYesCount){
             prop = &((*it).second);
             nYesCount = prop->GetYeas();
-            return prop;
         }
         ++it;
     }

From 2b055d28ef65be37d6fa4c2db6dee118f609f811 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 4 Jun 2015 19:20:14 +0300
Subject: [PATCH 1398/1819] mention 0.12 in release notes

---
 doc/release-notes.md | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/doc/release-notes.md b/doc/release-notes.md
index 7fdcd8834d5d..d985758d14b9 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,13 +1,11 @@
-Dash Core 0.11
+Dash Core 0.12
 ==================
 
-Dash Core tree 0.11.x release notes can be found here:
+Dash Core tree 0.12.x release notes can be found here:
+- [v0.12.0](release-notes/dash/release-notes-0.12.0.md) not released yet.
 
-- [v0.11.2](release-notes/dash/release-notes-0.11.2.md) released Mar/25/2015
-- [v0.11.1](release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015
-- [v0.11.0](release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015
+Dash Core tree 0.12.x is a fork of Bitcoin Core tree 0.10.2
 
-Dash Core tree 0.11.x is a fork of Bitcoin Core tree 0.9.
 
 
 Older releases
@@ -24,7 +22,13 @@ the 0.8.x tree and was first released on Mar/13/2014.
 Darkcoin tree 0.10.x used to be the closed source implementation of Darksend
 which was released open source on Sep/25/2014.
 
+Dash Core tree 0.11.x was a fork of Bitcoin Core tree 0.9, Darkcoin was rebranded
+to Dash.
+
 These release are considered obsolete. Old changelogs can be found here:
 
+- [v0.11.2](release-notes/dash/release-notes-0.11.2.md) released Mar/25/2015
+- [v0.11.1](release-notes/dash/release-notes-0.11.1.md) released Feb/10/2015
+- [v0.11.0](release-notes/dash/release-notes-0.11.0.md) released Jan/15/2015
 - [v0.10.x](release-notes/dash/release-notes-0.10.0.md) released Sep/25/2014
 - [v0.9.x](release-notes/dash/release-notes-0.9.0.md) released Mar/13/2014

From 999979e1e5ac3ee9637c97944ee304e8be272483 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 4 Jun 2015 19:24:04 +0300
Subject: [PATCH 1399/1819] moved release notes to proper folders

---
 doc/release-notes/{ => bitcoin}/release-notes-0.10.0.md  | 0
 doc/release-notes/{ => bitcoin}/release-notes-0.9.1.md   | 0
 doc/release-notes/{ => bitcoin}/release-notes-0.9.2.1.md | 0
 doc/release-notes/{ => bitcoin}/release-notes-0.9.2.md   | 0
 doc/release-notes/{ => bitcoin}/release-notes-0.9.3.md   | 0
 doc/release-notes/{ => bitcoin}/release-notes-0.9.4.md   | 0
 doc/release-notes/{ => dash}/release-notes-0.12.0.md     | 0
 7 files changed, 0 insertions(+), 0 deletions(-)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.10.0.md (100%)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.9.1.md (100%)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.9.2.1.md (100%)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.9.2.md (100%)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.9.3.md (100%)
 rename doc/release-notes/{ => bitcoin}/release-notes-0.9.4.md (100%)
 rename doc/release-notes/{ => dash}/release-notes-0.12.0.md (100%)

diff --git a/doc/release-notes/release-notes-0.10.0.md b/doc/release-notes/bitcoin/release-notes-0.10.0.md
similarity index 100%
rename from doc/release-notes/release-notes-0.10.0.md
rename to doc/release-notes/bitcoin/release-notes-0.10.0.md
diff --git a/doc/release-notes/release-notes-0.9.1.md b/doc/release-notes/bitcoin/release-notes-0.9.1.md
similarity index 100%
rename from doc/release-notes/release-notes-0.9.1.md
rename to doc/release-notes/bitcoin/release-notes-0.9.1.md
diff --git a/doc/release-notes/release-notes-0.9.2.1.md b/doc/release-notes/bitcoin/release-notes-0.9.2.1.md
similarity index 100%
rename from doc/release-notes/release-notes-0.9.2.1.md
rename to doc/release-notes/bitcoin/release-notes-0.9.2.1.md
diff --git a/doc/release-notes/release-notes-0.9.2.md b/doc/release-notes/bitcoin/release-notes-0.9.2.md
similarity index 100%
rename from doc/release-notes/release-notes-0.9.2.md
rename to doc/release-notes/bitcoin/release-notes-0.9.2.md
diff --git a/doc/release-notes/release-notes-0.9.3.md b/doc/release-notes/bitcoin/release-notes-0.9.3.md
similarity index 100%
rename from doc/release-notes/release-notes-0.9.3.md
rename to doc/release-notes/bitcoin/release-notes-0.9.3.md
diff --git a/doc/release-notes/release-notes-0.9.4.md b/doc/release-notes/bitcoin/release-notes-0.9.4.md
similarity index 100%
rename from doc/release-notes/release-notes-0.9.4.md
rename to doc/release-notes/bitcoin/release-notes-0.9.4.md
diff --git a/doc/release-notes/release-notes-0.12.0.md b/doc/release-notes/dash/release-notes-0.12.0.md
similarity index 100%
rename from doc/release-notes/release-notes-0.12.0.md
rename to doc/release-notes/dash/release-notes-0.12.0.md

From d53968ea56bd899eb8562ffb1bd3611e759faf79 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 4 Jun 2015 21:54:33 +0300
Subject: [PATCH 1400/1819] fix ix comments

---
 src/instantx.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index 589c08b36130..95a07b73666a 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -28,8 +28,9 @@ int nCompleteTXLocks;
 //txlock - Locks transaction
 //
 //step 1.) Broadcast intention to lock transaction inputs, "txlreg", CTransaction
-//step 2.) Top 10 masternodes, open connect to top 1 masternode. Send "txvote", CTransaction, Signature, Approve
-//step 3.) Top 1 masternode, waits for 10 messages. Upon success, sends "txlock'
+//step 2.) Top INSTANTX_SIGNATURES_TOTAL masternodes, open connect to top 1 masternode.
+//         Send "txvote", CTransaction, Signature, Approve
+//step 3.) Top 1 masternode, waits for INSTANTX_SIGNATURES_REQUIRED messages. Upon success, sends "txlock'
 
 void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {

From 73a9de8178f8e6bfcf43fe350f4188ad478cc1ac Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 7 Jun 2015 12:41:09 +0300
Subject: [PATCH 1401/1819] fix md syntax in doc/gitian-building.md

---
 doc/gitian-building.md | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 063162a1990f..7ad00b8c2c22 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -337,9 +337,11 @@ At any time you can check the package installation and build progress with
 ```bash
 tail -f var/install.log
 tail -f var/build.log
+```
 
 Output from `gbuild` will look something like
 
+```bash
     Initialized empty Git repository in /home/debian/gitian-builder/inputs/dash/.git/
     remote: Reusing existing pack: 35606, done.
     remote: Total 35606 (delta 0), reused 0 (delta 0)
@@ -361,6 +363,7 @@ Output from `gbuild` will look something like
     Creating build script (var/build-script)
     lxc-start: Connection refused - inotify event with no name (mask 32768)
     Running build script (log in var/build.log)
+```
 
 Building an alternative repository
 -----------------------------------

From 19d9a65f8af30a6cfe127903c9b53ddb4a333955 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 9 Jun 2015 04:36:33 +0300
Subject: [PATCH 1402/1819] add recent (tip - 12) block hash to mnping

---
 src/masternode.cpp | 41 ++++++++++++++++++++++++++++-------------
 src/masternode.h   |  4 +++-
 2 files changed, 31 insertions(+), 14 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index e6bdda282657..ae3cbad8e9dd 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -503,11 +503,13 @@ bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
 CMasternodePing::CMasternodePing()
 {
     vin = CTxIn();
+    blockHash = chainActive[chainActive.Height() - 12]->GetBlockHash();
 }
 
 CMasternodePing::CMasternodePing(CTxIn& newVin)
 {
     vin = newVin;
+    blockHash = chainActive[chainActive.Height() - 12]->GetBlockHash();
 }
 
 
@@ -517,7 +519,7 @@ bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     std::string strMasterNodeSignMessage;
 
     sigTime = GetAdjustedTime();
-    std::string strMessage =  boost::lexical_cast<std::string>(sigTime);
+    std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
         LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
@@ -549,30 +551,43 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
     if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol)
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
-        // take this only if it's newer
-        if(pmn->lastMnping < sigTime)
+        // take this only if it's newer and was last updated more then MASTERNODE_MIN_MNP_SECONDS ago
+        if(pmn->lastMnping < sigTime && !pmn->UpdatedWithin(MASTERNODE_MIN_MNP_SECONDS))
         {
-            std::string strMessage = boost::lexical_cast<std::string>(sigTime);
+            std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
             std::string errorMessage = "";
             if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
             {
-                LogPrintf("mnping - Got bad Masternode address signature %s \n", vin.ToString().c_str());
+                LogPrintf("mnping - Got bad Masternode address signature %s\n", vin.ToString());
                 nDos = 33;
                 return false;
             }
 
             pmn->lastMnping = sigTime;
 
-            if(!pmn->UpdatedWithin(MASTERNODE_MIN_MNP_SECONDS))
+            BlockMap::iterator mi = mapBlockIndex.find(blockHash);
+            if (mi != mapBlockIndex.end() && (*mi).second)
             {
-                pmn->UpdateLastSeen();
-                pmn->Check();
-                if(!pmn->IsEnabled()) return false;
-                
-                Relay();
-                return true;
+                if((*mi).second->nHeight < chainActive.Height() - 24)
+                {
+                    LogPrintf("mnping - Masternode %s block hash %s is too old\n", vin.ToString(), blockHash.ToString());
+                    nDos = 33;
+                    return false;
+                }
+            } else {
+                if (fDebug) LogPrintf("mnping - Masternode %s block hash %s is unknown\n", vin.ToString(), blockHash.ToString());
+                // maybe we stuck so we shouldn't ban this node, just fail to accept it
+                // TODO: or should we also request this block?
+                return false;
             }
+
+            pmn->UpdateLastSeen();
+            pmn->Check();
+            if(!pmn->IsEnabled()) return false;
+
+            Relay();
+            return true;
         }
     }
 
@@ -589,4 +604,4 @@ void CMasternodePing::Relay()
     BOOST_FOREACH(CNode* pnode, vNodes){
         pnode->PushMessage("inv", vInv);
     }
-}
\ No newline at end of file
+}
diff --git a/src/masternode.h b/src/masternode.h
index 1254d70e4321..5262c2319f64 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -309,6 +309,7 @@ class CMasternodePing
 public:
 
     CTxIn vin;
+    uint256 blockHash;
     std::vector<unsigned char> vchSig;
     int64_t sigTime; //dsee message times
     //removed stop
@@ -321,6 +322,7 @@ class CMasternodePing
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(vin);
+        READWRITE(blockHash);
         READWRITE(sigTime);
         READWRITE(vchSig);
     }
@@ -333,4 +335,4 @@ class CMasternodePing
          return Hash(BEGIN(vin), END(vin), BEGIN(sigTime), END(sigTime));
     }
 };
-#endif
\ No newline at end of file
+#endif

From f9b77c4376d53bcf7e9ea022ea4e1639edec42d2 Mon Sep 17 00:00:00 2001
From: adios <adiosmsu@gmail.com>
Date: Tue, 9 Jun 2015 17:22:31 +0400
Subject: [PATCH 1403/1819] Masternode broadcast's and ping's GetHash method
 fix

---
 src/masternode.h | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/masternode.h b/src/masternode.h
index 1254d70e4321..c0d359d39a15 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -291,10 +291,10 @@ class CMasternodeBroadcast : public CMasternode
     }
     
     uint256 GetHash(){
-         return Hash(
-            BEGIN(sigTime), END(sigTime), 
-            BEGIN(pubkey), END(pubkey)
-        );
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << sigTime;
+        ss << pubkey;
+        return ss.GetHash();
     }
 
 };
@@ -330,7 +330,10 @@ class CMasternodePing
     void Relay();    
 
     uint256 GetHash(){
-         return Hash(BEGIN(vin), END(vin), BEGIN(sigTime), END(sigTime));
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << vin;
+        ss << sigTime;
+        return ss.GetHash();
     }
 };
 #endif
\ No newline at end of file

From 5f5ee7a59bbcea34d6d8765ebe79a9b5ba52a439 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 9 Jun 2015 19:37:58 +0300
Subject: [PATCH 1404/1819] fix CFinalizedBudgetVote and CBudgetVote hashing,
 see https://github.com/dashpay/dash/pull/357 for more info

---
 src/masternode-budget.h | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 8460eb933a00..9b3c7f56bef6 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -304,7 +304,11 @@ class CFinalizedBudgetVote
     void Relay();
 
     uint256 GetHash(){
-        return Hash(BEGIN(vin), END(vin), BEGIN(nBudgetHash), END(nBudgetHash), BEGIN(nTime), END(nTime));
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << vin;
+        ss << nBudgetHash;
+        ss << nTime;
+        return ss.GetHash();
     }
 
     ADD_SERIALIZE_METHODS;
@@ -479,7 +483,12 @@ class CBudgetVote
     }
 
     uint256 GetHash(){
-        return Hash(BEGIN(vin), END(vin), BEGIN(nProposalHash), END(nProposalHash), BEGIN(nVote), END(nVote), BEGIN(nTime), END(nTime));
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << vin;
+        ss << nProposalHash;
+        ss << nVote;
+        ss << nTime;
+        return ss.GetHash();
     }
 
     ADD_SERIALIZE_METHODS;

From 928f6edcb654a0762fd43e007101587a8a73bf63 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 9 Jun 2015 20:46:24 -0600
Subject: [PATCH 1405/1819] Adjusted max payment per finalized budget to 10% of
 the monthly block reward

---
 src/init.cpp              |  1 +
 src/masternode-budget.cpp | 52 ++++++++++++++++++++++++++++++---------
 src/masternode-budget.h   |  4 ++-
 3 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 0e1a3bf702f6..a5882e001b43 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1420,6 +1420,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     CBudgetDB budgetdb;
     CBudgetDB::ReadResult readResult2 = budgetdb.Read(budget);
+    
     if (readResult2 == CBudgetDB::FileError)
         LogPrintf("Missing budget cache - budget.dat, will try to recreate\n");
     else if (readResult2 != CBudgetDB::Ok)
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f5c3c818308a..99f54e783ec6 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -131,6 +131,7 @@ bool CBudgetDB::Write(const CBudgetManager& budgetToSave)
 
 CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
 {
+
     int64_t nStart = GetTimeMillis();
     // open input file, and associate with CAutoFile
     FILE *file = fopen(pathDB.string().c_str(), "rb");
@@ -245,16 +246,10 @@ void DumpBudgets()
 
 void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
 {
-    printf("! 1\n");
-
     LOCK(cs);
     if(mapFinalizedBudgets.count(prop.GetHash())) return;
 
-    printf("! 2\n");
-
     mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
-
-    printf("! 3\n");
 }
 
 void CBudgetManager::AddProposal(CBudgetProposal& prop)
@@ -267,6 +262,9 @@ void CBudgetManager::AddProposal(CBudgetProposal& prop)
 
 void CBudgetManager::CheckAndRemove()
 {
+    return;
+
+    //segfault happening in the following code sometimes
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
@@ -456,7 +454,11 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
     std::vector<CBudgetProposal*> ret;
 
     int64_t nBudgetAllocated = 0;
-    int64_t nTotalBudget = GetTotalBudget();
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return ret;
+
+    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+    int64_t nTotalBudget = GetTotalBudget(nBlockStart);
 
 
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
@@ -528,12 +530,21 @@ std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
     return ret;
 }
 
-int64_t CBudgetManager::GetTotalBudget()
+int64_t CBudgetManager::GetTotalBudget(int nHeight)
 {
     if(chainActive.Tip() == NULL) return 0;
 
-    const CBlockIndex* pindex = chainActive.Tip();
-    return (GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, 0)/100)*15;
+    //get min block value and calculate from that
+    int64_t nSubsidy = 5 * COIN;
+
+    if(Params().NetworkID() == CBaseChainParams::TESTNET){
+        for(int i = 46200; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
+    } else {
+        // yearly decline of production by 7.1% per year, projected 21.3M coins max by year 2050.
+        for(int i = 210240; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
+    }
+
+    return ((nSubsidy/100)*10)*576*30;
 }
 
 void CBudgetManager::NewBlock()
@@ -781,7 +792,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 bool CBudgetProposal::IsValid()
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return false;
+    if(pindexPrev == NULL) return true;
 
     //TODO: if < 20 votes and 2+ weeks old, invalid
 
@@ -789,6 +800,11 @@ bool CBudgetProposal::IsValid()
 
     if(nBlockEnd - nBlockStart <= GetBudgetPaymentCycleBlocks()) return false;
 
+    //can only pay out 10% of the possible coins (min value of coins)
+    if(nAmount > budget.GetTotalBudget(nBlockStart)) {
+        return false;
+    }
+
     return true;
 }
 
@@ -1131,6 +1147,17 @@ void CFinalizedBudget::AutoCheck()
     }
 }
 
+int64_t CFinalizedBudget::GetTotalPayout()
+{
+    int64_t ret = 0;
+
+    for(unsigned int i = 0; i < vecProposals.size(); i++){
+        ret += vecProposals[i].nAmount;
+    }
+
+    return ret;
+}
+
 std::string CFinalizedBudget::GetProposals() {
     std::string ret = "aeu";
 
@@ -1190,6 +1217,9 @@ bool CFinalizedBudget::IsValid()
     if(GetBlockEnd() - nBlockStart > 100) return false;
     if(vecProposals.size() > 100) return false;
 
+    //can only pay out 10% of the possible coins (min value of coins)
+    if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
+
     //TODO: if N cycles old, invalid, invalid
 
     return true;
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 9b3c7f56bef6..6a3195041e86 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -99,7 +99,7 @@ class CBudgetManager
     
     void CleanUp();
 
-    int64_t GetTotalBudget();
+    int64_t GetTotalBudget(int nHeight);
     std::vector<CBudgetProposal*> GetBudget();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nBlockHeight);
@@ -218,6 +218,8 @@ class CFinalizedBudget
 
     //check to see if we should vote on this
     void AutoCheck();
+    //total dash paid out by this budget
+    int64_t GetTotalPayout();
     //vote on this finalized budget as a masternode
     void SubmitVote();
 

From f1debd4688ac2bd40f6fde8e3dd0a4dde652f778 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 10 Jun 2015 09:49:08 +0300
Subject: [PATCH 1406/1819] fix segfault in budgets

---
 src/masternode-budget.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 99f54e783ec6..fc805570f144 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -262,18 +262,15 @@ void CBudgetManager::AddProposal(CBudgetProposal& prop)
 
 void CBudgetManager::CheckAndRemove()
 {
-    return;
-
-    //segfault happening in the following code sometimes
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* prop = &((*it).second);
         if(!prop->IsValid()){
-            mapFinalizedBudgets.erase(it);
+            mapFinalizedBudgets.erase(it++);
         } else {
             prop->AutoCheck();
-            it++;
+            ++it;
         }
     }
 
@@ -282,9 +279,9 @@ void CBudgetManager::CheckAndRemove()
     {
         CBudgetProposal* prop = &((*it2).second);
         if(!prop->IsValid()){
-            mapProposals.erase(it2);
+            mapProposals.erase(it2++);
         } else {
-            it2++;
+            ++it2;
         }
     }
 }

From c489574e8a10b3cc98450ef60a23dd9c30545ef8 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 14 Jun 2015 17:05:51 -0700
Subject: [PATCH 1407/1819] Masternode System Bug Fixes - Fixed a race
 condition with masternode node selection upon new blocks - Using nTime for
 lastpaid instead of the current time for high consensus

---
 src/activemasternode.cpp    | 2 +-
 src/main.cpp                | 2 +-
 src/masternode-payments.cpp | 6 ++++--
 src/masternode-payments.h   | 2 +-
 src/masternodeman.cpp       | 9 +++------
 src/masternodeman.h         | 2 +-
 6 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 95945bbeef5f..809ffbb43fe4 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -226,7 +226,6 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
 }
 
 bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage) {
-
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
     {
@@ -239,6 +238,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         }
         
         CMasternode mn(mnb);
+        mn.UpdateLastSeen();
         mnodeman.Add(mn);
     }
     
diff --git a/src/main.cpp b/src/main.cpp
index f2fda2c390f7..1a3de990954d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3240,7 +3240,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
                 //UPDATE MASTERNODE LAST PAID TIME
                 CMasternode* pmn = mnodeman.Find(payee);
                 if(pmn != NULL) {
-                    pmn->nLastPaid = GetAdjustedTime(); 
+                    pmn->nLastPaid = chainActive.Tip()->nTime; 
                 }
                 LogPrintf("%s : Update Masternode Last Paid Time - %d\n", __func__, chainActive.Tip()->nHeight);
             }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 0003a0037b39..488f9a9252a6 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -230,7 +230,7 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
     return false;
 }
 
-bool CMasternodePayments::IsScheduled(CMasternode& mn)
+bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return false;
@@ -240,6 +240,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn)
 
     CScript payee;
     for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+10; h++){
+        if(h == nNotBlockHeight) continue;
         if(mapMasternodeBlocks.count(h)){
             if(mapMasternodeBlocks[h].GetPayee(payee)){
                 if(mnpayee == payee || mn.donationAddress == payee) {
@@ -450,6 +451,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     } else {
         CScript payeeSource;
         uint256 hash;
+
         if(!GetBlockHash(hash, nBlockHeight-100)) return false;
         unsigned int nHash;
         memcpy(&nHash, &hash, 2);
@@ -457,7 +459,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
 
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-        CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment();
+        CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight);
         if(pmn != NULL)
         {
             LogPrintf(" Found by FindOldestNotInVec \n");
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 07086dd8f573..f5d15e5d0f66 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -192,7 +192,7 @@ class CMasternodePayments
 
     bool GetBlockPayee(int nBlockHeight, CScript& payee);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
-    bool IsScheduled(CMasternode& mn);
+    bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index a4decb0af60d..c29298b0db5d 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -206,7 +206,6 @@ bool CMasternodeMan::Add(CMasternode &mn)
         return false;
 
     CMasternode *pmn = Find(mn.vin);
-
     if (pmn == NULL)
     {
         if(fDebug) LogPrintf("CMasternodeMan: Adding new Masternode %s - %i now\n", mn.addr.ToString().c_str(), size() + 1);
@@ -365,7 +364,7 @@ CMasternode *CMasternodeMan::Find(const CPubKey &pubKeyMasternode)
     return NULL;
 }
 
-CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment()
+CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight)
 {
     LOCK(cs);
 
@@ -377,7 +376,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment()
         if(!mn.IsEnabled()) continue;
 
         //it's in the list -- so let's skip it
-        if(masternodePayments.IsScheduled(mn)) continue;
+        if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //make sure it has as many confirmations as there are masternodes
         if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
@@ -440,13 +439,11 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
 
     // scan for winner
     BOOST_FOREACH(CMasternode& mn, vMasternodes) {
-
         if(mn.protocolVersion < minProtocol) continue;
         if(fOnlyActive) {
             mn.Check();
             if(!mn.IsEnabled()) continue;
         }
-
         uint256 n = mn.CalculateScore(1, nBlockHeight);
         unsigned int n2 = 0;
         memcpy(&n2, &n, sizeof(n2));
@@ -459,7 +456,7 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
     int rank = 0;
     BOOST_FOREACH (PAIRTYPE(unsigned int, CTxIn)& s, vecMasternodeScores){
         rank++;
-        if(s.second == vin) {
+        if(s.second.prevout == vin.prevout) {
             return rank;
         }
     }
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 64cfcc52fc15..9a52d87d7626 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -110,7 +110,7 @@ class CMasternodeMan
     CMasternode* Find(const CPubKey& pubKeyMasternode);
 
     /// Find an entry in the masternode list that is next to be paid
-    CMasternode* GetNextMasternodeInQueueForPayment();
+    CMasternode* GetNextMasternodeInQueueForPayment(int nBlockHeight);
 
     /// Find a random entry
     CMasternode* FindRandom();

From c40c1338c7b3f9955670010e2e53a59b7e3160f0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 16 Jun 2015 06:47:45 -0700
Subject: [PATCH 1408/1819] update git ignore

---
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitignore b/.gitignore
index abb6dd19872c..df212018ed80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
+*.sublime-project
+*.sublime-workspace
+todo.txt
+
 *.tar.gz
 
 *.exe

From 5c4dc3727b51b391decc64d7b8f96742c1101854 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 16 Jun 2015 07:04:50 -0700
Subject: [PATCH 1409/1819] fixed issue with reindex and super blocks

---
 src/masternode-payments.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 488f9a9252a6..4742feae4e13 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -26,7 +26,7 @@ bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
     //while syncing take the longest chain
     if (fImporting || fReindex || pindexPrev->nHeight+1 < Checkpoints::GetTotalBlocksEstimate()) {
         //super blocks will always be on these blocks, max 100 per budgeting
-        if(pindexPrev->nHeight+1 % GetBudgetPaymentCycleBlocks() < 100){
+        if((pindexPrev->nHeight+1) % GetBudgetPaymentCycleBlocks() < 100){
             return true;
         } else {
             if(nBlockValue > nExpectedValue) return false;

From df77f56e116da2fff2c90ac2db46bf3138425cea Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 16 Jun 2015 10:04:35 -0700
Subject: [PATCH 1410/1819] Budget stability fixes - Proposals must start on a
 budget block now - Finalized budgets now enforce proposal start and end
 periods - Other misc fixes

---
 src/masternode-budget.cpp    | 80 +++++++++++++++++++++++-------------
 src/masternode-budget.h      |  4 +-
 src/rpcmasternode-budget.cpp | 20 +++++++++
 3 files changed, 75 insertions(+), 29 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index fc805570f144..dc1cd6274011 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -49,7 +49,10 @@ void SubmitFinalBudget()
         vecPayments.push_back(out);
     }
 
-    if(vecPayments.size() < 1) return;
+    if(vecPayments.size() < 1) {
+        LogPrintf("SubmitFinalBudget - Found No Proposals For Period\n");
+        return;
+    }
     nSubmittedFinalBudget = nBlockStart;
 
     CPubKey pubKeyMasternode;
@@ -57,17 +60,17 @@ void SubmitFinalBudget()
     std::string errorMessage;
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Error upon calling SetKey");
+        LogPrintf("SubmitFinalBudget - Error upon calling SetKey\n");
     }
 
     //create the proposal incase we're the first to make it
     CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
     if(!prop.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.");
+        LogPrintf("SubmitFinalBudget - Failure to sign.\n");
     }
 
     if(!prop.IsValid()){
-        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)");
+        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)\n");
     }
 
     mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
@@ -77,7 +80,7 @@ void SubmitFinalBudget()
 
     CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
     if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.");
+        LogPrintf("SubmitFinalBudget - Failure to sign.\n");
     }
 
     mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
@@ -262,6 +265,7 @@ void CBudgetManager::AddProposal(CBudgetProposal& prop)
 
 void CBudgetManager::CheckAndRemove()
 {
+    std::string strError = "";
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
@@ -278,7 +282,7 @@ void CBudgetManager::CheckAndRemove()
     while(it2 != mapProposals.end())
     {
         CBudgetProposal* prop = &((*it2).second);
-        if(!prop->IsValid()){
+        if(!prop->IsValid(strError)){
             mapProposals.erase(it2++);
         } else {
             ++it2;
@@ -455,6 +459,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
     if(pindexPrev == NULL) return ret;
 
     int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+    int nBlockEnd  =  nBlockStart + GetBudgetPaymentCycleBlocks() -1;
     int64_t nTotalBudget = GetTotalBudget(nBlockStart);
 
 
@@ -463,18 +468,24 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
     {
         CBudgetProposal* prop = &((*it2).second);
 
-        if(nTotalBudget == nBudgetAllocated){
-            prop->SetAllotted(0);
-        } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
-            prop->SetAllotted(prop->GetAmount());
-            nBudgetAllocated += prop->GetAmount();
-        } else {
-            //couldn't pay for the entire budget, so it'll be partially paid.
-            prop->SetAllotted(nTotalBudget - nBudgetAllocated);
-            nBudgetAllocated = nTotalBudget;
+        //prop start/end should be inside this period
+        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd) 
+        {
+
+            if(nTotalBudget == nBudgetAllocated){
+                prop->SetAllotted(0);
+            } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
+                prop->SetAllotted(prop->GetAmount());
+                nBudgetAllocated += prop->GetAmount();
+            } else {
+                //couldn't pay for the entire budget, so it'll be partially paid.
+                prop->SetAllotted(nTotalBudget - nBudgetAllocated);
+                nBudgetAllocated = nTotalBudget;
+            }
+        
+            ret.push_back(prop);
         }
 
-        ret.push_back(prop);
         it2++;
     }
 
@@ -584,14 +595,18 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        //set time we first saw this prop
+        prop.nTime = GetAdjustedTime();
+
         if(!prop.SignatureValid()){
             LogPrintf("mprop - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        if(!prop.IsValid()) {
-            LogPrintf("mprop - invalid prop\n");
+        std::string strError = "";
+        if(!prop.IsValid(strError)) {
+            LogPrintf("mprop - invalid prop - %s\n", strError.c_str());
             return;
         }
 
@@ -607,7 +622,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             budget.AddProposal(p);
             prop.Relay();
 
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+            //can only do this four times a day on the network
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=25;
         } else {
             LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
             return;
@@ -762,6 +778,7 @@ CBudgetProposal::CBudgetProposal()
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
+    nTime = 0;
 }
 
 CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
@@ -773,6 +790,7 @@ CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std
 	nBlockEnd = nBlockEndIn;
 	address = addressIn;
 	nAmount = nAmountIn;
+    nTime = 0;
 }
 
 CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
@@ -784,21 +802,26 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
     nBlockEnd = other.nBlockEnd;
     address = other.address;
     nAmount = other.nAmount;
+    nTime = other.nTime;
 }
 
-bool CBudgetProposal::IsValid()
+bool CBudgetProposal::IsValid(std::string& strError)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return true;
-
-    //TODO: if < 20 votes and 2+ weeks old, invalid
+    if(pindexPrev == NULL) {strError = "Tip is NULL"; return true;}
 
-    if(pindexPrev->nHeight < nBlockStart || pindexPrev->nHeight > nBlockEnd) return false;
-
-    if(nBlockEnd - nBlockStart <= GetBudgetPaymentCycleBlocks()) return false;
+    //if proposal doesn't gain traction within 2 weeks, remove it
+    // nTime not being saved correctly
+    // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
+    //     if(GetYeas() < 10) {
+    //         strError = "Not enough support";
+    //         return false;
+    //     }
+    // }
 
     //can only pay out 10% of the possible coins (min value of coins)
     if(nAmount > budget.GetTotalBudget(nBlockStart)) {
+        strError = "Payment more than max";
         return false;
     }
 
@@ -923,6 +946,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast()
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
+    nTime = 0;
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
@@ -992,7 +1016,7 @@ bool CBudgetProposalBroadcast::SignatureValid()
 
     if(pmn == NULL)
     {
-        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode\n");
+        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
         return false;
     }
 
@@ -1058,7 +1082,7 @@ bool CBudgetVote::SignatureValid()
 
     if(pmn == NULL)
     {
-        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode\n");
+        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
         return false;
     }
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 6a3195041e86..69ec1b2cd4e8 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -351,6 +351,7 @@ class CBudgetProposal
     int nBlockEnd;
     int64_t nAmount;
     CScript address;
+    int64_t nTime;
 
     map<uint256, CBudgetVote> mapVotes;
     //cache object
@@ -366,7 +367,7 @@ class CBudgetProposal
     bool HasMinimumRequiredSupport();
     std::pair<std::string, std::string> GetVotes();
 
-    bool IsValid();
+    bool IsValid(std::string& strError);
 
     std::string GetName() {return strProposalName; }
     std::string GetURL() {return strURL; }
@@ -419,6 +420,7 @@ class CBudgetProposal
         READWRITE(nBlockEnd);
         READWRITE(nAmount);
         READWRITE(address);
+        READWRITE(nTime);
 
         //for saving to the serialized db
         READWRITE(mapVotes);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 14208481eb64..0fd22447a18b 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -65,9 +65,19 @@ Value mnbudget(const Array& params, bool fHelp)
         if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
 
         int nBlockStart = params[4].get_int();
+        if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0){
+            int nNext = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+            return "Invalid block start - must be a budget cycle block. Next Valid Block: " + boost::lexical_cast<std::string>(nNext);
+        }
+
+        int nBlockEnd = nBlockStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount);
+
         if(nBlockStart < nBlockMin)
             return "Invalid payment count, must be more than current height.";
 
+        if(nBlockEnd < pindexPrev->nHeight)
+            return "Invalid ending block, starting block + (payment_cycle*payments) must be more than current height.";
+
         CBitcoinAddress address(params[5].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
@@ -161,9 +171,19 @@ Value mnbudget(const Array& params, bool fHelp)
         if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
 
         int nBlockStart = params[4].get_int();
+        if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0){
+            int nNext = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+            return "Invalid block start - must be a budget cycle block. Next valid block: " + boost::lexical_cast<std::string>(nNext);
+        }
+
+        int nBlockEnd = nBlockStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount);
+
         if(nBlockStart < nBlockMin)
             return "Invalid payment count, must be more than current height.";
 
+        if(nBlockEnd < pindexPrev->nHeight)
+            return "Invalid ending block, starting block + (payment_cycle*payments) must be more than current height.";
+
         CBitcoinAddress address(params[5].get_str());
         if (!address.IsValid())
             throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");

From 795ee119ece4cd0f821e88b3168066f2aa9fc34c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 17 Jun 2015 23:00:02 +0300
Subject: [PATCH 1411/1819] SecondsSincePayment (fix buffer overflow / change
 logic / move impl to cpp)

---
 src/masternode.cpp | 13 +++++++++++++
 src/masternode.h   | 14 +-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index ae3cbad8e9dd..7b329a64ee14 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -245,6 +245,19 @@ void CMasternode::Check()
     activeState = MASTERNODE_ENABLED; // OK
 }
 
+int64_t CMasternode::SecondsSincePayment() {
+    int64_t sec = (GetAdjustedTime() - nLastPaid);
+    int64_t month = 60*60*24*30;
+    if(sec < month) return sec; //if it's less than 30 days, give seconds
+
+    CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+    ss << vin;
+    ss << sigTime;
+    uint256 hash =  ss.GetHash();
+
+    // return some deterministic value for unknown/unpaid but force it to be more than 30 days old
+    return month + hash.GetCompact(false);
+}
 
 CMasternodeBroadcast::CMasternodeBroadcast()
 {
diff --git a/src/masternode.h b/src/masternode.h
index 16d8c9b47cb5..ab6b740d89db 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -163,19 +163,7 @@ class CMasternode
             READWRITE(nVotedTimes);
     }
 
-    int64_t SecondsSincePayment()
-    {
-        int64_t sec = (GetAdjustedTime() - nLastPaid);
-        if(sec < 60*60*24*30) return sec; //if it's less than 30 days, give seconds
-
-        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
-        ss << vin;
-        ss << sigTime;
-        uint256 hash =  ss.GetHash();
-
-        memcpy(&sec, &hash, 64);
-        return sec;
-    }
+    int64_t SecondsSincePayment();
 
     void UpdateFromNewBroadcast(CMasternodeBroadcast& mnb);
 

From 91c7f6656217350bd22e7ece0ae7747712d32c29 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 18 Jun 2015 00:18:24 +0300
Subject: [PATCH 1412/1819] remove nLastPaid from CMasternodeBroadcast

---
 src/masternode.cpp | 3 +--
 src/masternode.h   | 1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 7b329a64ee14..845baea4b74f 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -162,7 +162,7 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     donationPercentage = mnb.donationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = mnb.nLastPaid;
+    nLastPaid = 0;
     nVotedTimes = 0;
 }
 
@@ -178,7 +178,6 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     addr = mnb.addr;
     donationAddress = mnb.donationAddress;
     donationPercentage = mnb.donationPercentage;
-    nLastPaid = mnb.nLastPaid;
 }
 
 //
diff --git a/src/masternode.h b/src/masternode.h
index ab6b740d89db..abc0ba92e3b5 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -275,7 +275,6 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(protocolVersion);
         READWRITE(donationAddress);
         READWRITE(donationPercentage);
-        READWRITE(nLastPaid);
     }
     
     uint256 GetHash(){

From cc458007e3d7981a479a4e442cd04750b6e82a27 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Wed, 17 Jun 2015 17:10:42 -0700
Subject: [PATCH 1413/1819] update version

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d9b2690c8935..37cb39dda773 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 0)
+define(_CLIENT_VERSION_BUILD, 1)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 20651a6004fd..a226f17110f4 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 0
+#define CLIENT_VERSION_BUILD 1
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 5fed89fde422c0fb4f341b58f05cec0ca8999ec8 Mon Sep 17 00:00:00 2001
From: snogcel <ledniknoj@gmail.com>
Date: Wed, 17 Jun 2015 21:37:30 -0600
Subject: [PATCH 1414/1819] Available Balance, Pending Label Fix

---
 src/qt/res/css/drkblue.css | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index 62016ae89153..204820642661 100755
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -138,7 +138,7 @@ QComboBox:checked {
 background:#f2f2f2;
 }
 
-QComboBox:editable { 
+QComboBox:editable {
 background: #3398CC;
 color:#616161;
 border:0px solid transparent;
@@ -416,13 +416,13 @@ min-height:15px;
 
 QDialog QWidget { /* Remove Annoying Focus Rectangle */
 outline: 0;
-} 
+}
 
 /*******************************************************/
 /* FILE MENU */
 
 /* Dialog: Open URI */
-QDialog#OpenURIDialog { 
+QDialog#OpenURIDialog {
 background-color:#F8F6F6;
 }
 
@@ -448,7 +448,7 @@ border:1px solid #9e9e9e;
 }
 
 /* Dialog: Sign / Verify Message */
-QDialog#SignVerifyMessageDialog { 
+QDialog#SignVerifyMessageDialog {
 background-color:#F8F6F6;
 }
 
@@ -488,7 +488,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QDialog#SignVerifyMessageDialog QPushButton#clearButton_SM:hover { 
+QDialog#SignVerifyMessageDialog QPushButton#clearButton_SM:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -512,7 +512,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QDialog#SignVerifyMessageDialog QPushButton#clearButton_VM:hover { 
+QDialog#SignVerifyMessageDialog QPushButton#clearButton_VM:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -522,7 +522,7 @@ border:1px solid #9e9e9e;
 }
 
 /* Dialog: Send and Receive */
-QWidget#AddressBookPage { 
+QWidget#AddressBookPage {
 background-color:#F8F6F6;
 }
 
@@ -687,7 +687,7 @@ background:#ff0000;
 
 /* HELP MENU */
 
-/* Command Line Options Dialog */ 
+/* Command Line Options Dialog */
 QDialog#HelpMessageDialog {
 background-color:#F8F6F6;
 }
@@ -714,7 +714,7 @@ margin-right:10px;
 }
 
 /* Edit Address Dialog */
-QDialog#EditAddressDialog { 
+QDialog#EditAddressDialog {
 background-color:#F8F6F6;
 }
 
@@ -751,7 +751,7 @@ qproperty-alignment: 'AlignVCenter | AlignLeft';
 margin-left:20px;
 }
 
-QWidget .QFrame#frame .QLabel#label { /* Available Balance Label */
+QWidget .QFrame#frame .QLabel#labelBalanceText { /* Available Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
 min-width:230px;
 background-color:#56ABD8;
@@ -771,7 +771,7 @@ color:#56ABD8;
 margin-left:14px;
 }
 
-QWidget .QFrame#frame .QLabel#label_3 { /* Pending Balance Label */
+QWidget .QFrame#frame .QLabel#labelPendingText { /* Pending Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
 min-width:230px;
 background-color:#F8F6F6;
@@ -859,7 +859,7 @@ padding-right:5px;
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#darksendEnabled { /* Darksend Status */
 
-} 
+}
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_7 { /* Darksend Completion Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
@@ -1089,7 +1089,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QDialog#SendCoinsDialog .QPushButton#clearButton:hover { 
+QDialog#SendCoinsDialog .QPushButton#clearButton:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -1106,7 +1106,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QDialog#SendCoinsDialog .QPushButton#addButton:hover { 
+QDialog#SendCoinsDialog .QPushButton#addButton:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -1138,7 +1138,7 @@ margin-right:20px;
 /* This QLabel uses name = "label" which conflicts with Address Book -> New Address */
 /* To maximize backwards compatibility this formatting has been removed */
 
-QDialog#SendCoinsDialog QLabel#label { 
+QDialog#SendCoinsDialog QLabel#label {
 /*margin-left:20px;
 margin-right:-2px;
 padding-right:-2px;
@@ -1177,7 +1177,7 @@ padding-right:5px;
 }
 
 QStackedWidget#SendCoinsEntry .QFrame#SendCoins .QLabel#amountLabel {
-background-color:#6a6a6a; 
+background-color:#6a6a6a;
 }
 
 QStackedWidget#SendCoinsEntry .QValidatedLineEdit#payTo { /* Pay To Input Field */
@@ -1381,7 +1381,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QWidget#ReceiveCoinsDialog .QFrame#frame2 QPushButton#clearButton:hover { 
+QWidget#ReceiveCoinsDialog .QFrame#frame2 QPushButton#clearButton:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -1398,7 +1398,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QWidget#ReceiveCoinsDialog .QFrame#frame QPushButton#showRequestButton:hover { 
+QWidget#ReceiveCoinsDialog .QFrame#frame QPushButton#showRequestButton:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }
@@ -1415,7 +1415,7 @@ padding-left:10px;
 padding-right:10px;
 }
 
-QWidget#ReceiveCoinsDialog .QFrame#frame QPushButton#removeRequestButton:hover { 
+QWidget#ReceiveCoinsDialog .QFrame#frame QPushButton#removeRequestButton:hover {
 background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: .01 #f6f6f6, stop: .1 rgba(240, 240, 240, 255), stop: .95 rgba(240, 240, 240, 255), stop: 1 #ebebeb);
 color:#333;
 }

From 639c67d3548a9cd296238e4f230044d8a41b80b2 Mon Sep 17 00:00:00 2001
From: thelazier <thelazier@gmail.com>
Date: Thu, 18 Jun 2015 16:30:27 +0700
Subject: [PATCH 1415/1819] Fix getblocktemplate not show payee from masternode
 winners..

---
 src/miner.cpp     | 3 +++
 src/rpcmining.cpp | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 9b6c3339b264..98e161e4c038 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -321,6 +321,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         // Masternode and general budget payments
         FillBlockPayee(txNew, nFees);
 
+        // Make payee
+	pblock->payee = txNew.vout[1].scriptPubKey;
+
         nLastBlockTx = nBlockTx;
         nLastBlockSize = nBlockSize;
         LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 34962ff31908..2c8da34f7e34 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -610,7 +610,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
         ExtractDestination(pblock->payee, address1);
         CBitcoinAddress address2(address1);
         result.push_back(Pair("payee", address2.ToString().c_str()));
-        result.push_back(Pair("payee_amount", (int64_t)GetMasternodePayment(pindexPrev->nHeight+1, pblock->vtx[0].GetValueOut())));
+        result.push_back(Pair("payee_amount", (int64_t)pblock->vtx[0].vout[1].nValue));
     } else {
         result.push_back(Pair("payee", ""));
         result.push_back(Pair("payee_amount", ""));

From 1e393d5b709a4dca64756a4bfa8c1f7e3099bfc5 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 18 Jun 2015 21:41:01 +0300
Subject: [PATCH 1416/1819] fix mnping

---
 src/masternode.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 845baea4b74f..55eeef66da0d 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -563,8 +563,8 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
     if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol)
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
-        // take this only if it's newer and was last updated more then MASTERNODE_MIN_MNP_SECONDS ago
-        if(pmn->lastMnping < sigTime && !pmn->UpdatedWithin(MASTERNODE_MIN_MNP_SECONDS))
+        // take this only if it's newer and last ping was more then MASTERNODE_MIN_MNP_SECONDS ago
+        if(sigTime - pmn->lastMnping > MASTERNODE_MIN_MNP_SECONDS)
         {
             std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
@@ -584,7 +584,8 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
                 if((*mi).second->nHeight < chainActive.Height() - 24)
                 {
                     LogPrintf("mnping - Masternode %s block hash %s is too old\n", vin.ToString(), blockHash.ToString());
-                    nDos = 33;
+                    // Do nothing here (no Masternode update, no mnping relay)
+                    // Let this node to be visible but fail to accept mnping
                     return false;
                 }
             } else {

From 58c0f150a424e9a25a7c1d5846b28af7848bdefb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 19 Jun 2015 04:42:25 +0300
Subject: [PATCH 1417/1819] fix dsc

---
 src/darksend.cpp | 10 +++++-----
 src/darksend.h   |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 0de11ba1b44c..ba050286a9ab 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -370,15 +370,15 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
         int sessionIDMessage;
         bool error;
-        std::string lastMessage;
-        vRecv >> sessionIDMessage >> error >> lastMessage;
+        int errorID;
+        vRecv >> sessionIDMessage >> error >> errorID;
 
         if(sessionID != sessionIDMessage){
             if (fDebug) LogPrintf("dsc - message doesn't match current Darksend session %d %d\n", darkSendPool.sessionID, sessionIDMessage);
             return;
         }
 
-        darkSendPool.CompletedTransaction(error, lastMessage);
+        darkSendPool.CompletedTransaction(error, errorID);
     }
 
 }
@@ -1355,7 +1355,7 @@ void CDarksendPool::NewBlock()
 }
 
 // Darksend transaction was completed (failed or successful)
-void CDarksendPool::CompletedTransaction(bool error, std::string lastMessageNew)
+void CDarksendPool::CompletedTransaction(bool error, int errorID)
 {
     if(fMasterNode) return;
 
@@ -1376,7 +1376,7 @@ void CDarksendPool::CompletedTransaction(bool error, std::string lastMessageNew)
         // To avoid race conditions, we'll only let DS run once per block
         cachedLastSuccess = chainActive.Tip()->nHeight;
     }
-    lastMessage = lastMessageNew;
+    lastMessage = GetMessageByID(errorID);
     completedTransaction = true;
 }
 
diff --git a/src/darksend.h b/src/darksend.h
index b4c96cc2d894..65ec58fe2a75 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -483,7 +483,7 @@ class CDarksendPool
     bool GetLastValidBlockHash(uint256& hash, int mod=1, int nBlockHeight=0);
     /// Process a new block
     void NewBlock();
-    void CompletedTransaction(bool error, std::string lastMessageNew);
+    void CompletedTransaction(bool error, int errorID);
     void ClearLastMessage();
     /// Used for liquidity providers
     bool SendRandomPaymentToSelf();

From b6f760ff90f25deeece815f312c459e5ee2282f6 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 19 Jun 2015 09:14:48 -0700
Subject: [PATCH 1418/1819] Check before pulling payee

---
 src/miner.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index 98e161e4c038..dc989c3c3fba 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -322,7 +322,9 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
         FillBlockPayee(txNew, nFees);
 
         // Make payee
-	pblock->payee = txNew.vout[1].scriptPubKey;
+	    if(txNew.vout.size() > 1){
+            pblock->payee = txNew.vout[1].scriptPubKey;
+        }
 
         nLastBlockTx = nBlockTx;
         nLastBlockSize = nBlockSize;

From a0d8442835d1e51df9d8e38ed446953d281bec02 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 19 Jun 2015 11:33:02 -0700
Subject: [PATCH 1419/1819] added hybrid keys for masternode payment voting

---
 src/masternode-payments.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 4742feae4e13..2342321953f1 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -386,8 +386,8 @@ bool IsReferenceNode(CTxIn& vin)
 {
     //reference node - hybrid mode
     if(vin.prevout.ToStringShort() == "099c01bea63abd1692f60806bb646fa1d288e2d049281225f17e499024084e28-0") return true; // mainnet
-    if(vin.prevout.ToStringShort() == "testnet-0") return true; // testnet
-    if(vin.prevout.ToStringShort() == "regtest-0") return true; // regtest
+    if(vin.prevout.ToStringShort() == "fbc16ae5229d6d99181802fd76a4feee5e7640164dcebc7f8feb04a7bea026f8-0") return true; // testnet
+    if(vin.prevout.ToStringShort() == "e466f5d8beb4c2d22a314310dc58e0ea89505c95409754d0d68fb874952608cc-1") return true; // regtest
 
     return false;
 }

From 97c97f7e40cf1e00681d336a4bfc2f7d54ed7af6 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 20 Jun 2015 05:33:15 +0300
Subject: [PATCH 1420/1819] use v11-like AcceptToMemoryPool call in
 ProcessMessage(dstx/tx)

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 1a3de990954d..2507a7ff2115 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4663,7 +4663,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         mapAlreadyAskedFor.erase(inv);
 
-        if (AcceptToMemoryPool(mempool, state, tx, !allowFree, &fMissingInputs))
+        if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs, false, allowFree))
         {
             mempool.check(pcoinsTip);
             RelayTransaction(tx);

From 947b79c8c53a8cf5bdf28be930bb9e6a3e9525cd Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 20 Jun 2015 12:56:56 -0700
Subject: [PATCH 1421/1819] Changed masternode broadcast/pinging logic

- Fixed a bug causing the broadcasts to be ignored in some situations
- Added some logic to rebroadcast new masternodes, so the rest of the network finds out about unknown nodes quickly
- should help masternode payments to work properly
---
 src/masternode.cpp    | 13 +++++++++----
 src/masternodeman.cpp |  2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 55eeef66da0d..b45314735cd7 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -388,17 +388,21 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
 
     //search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
     CMasternode* pmn = mnodeman.Find(vin);
+
     // if we are masternode but with undefined vin and this dsee is ours (matches our Masternode privkey) then just skip this part
     if(pmn != NULL && !(fMasterNode && activeMasternode.vin == CTxIn() && pubkey2 == activeMasternode.pubKeyMasternode))
     {
+        // if Requested, we don't want to update this info
+        if(fRequested) { Relay(false); return true;}
+
         // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
         //   after that they just need to match
-        if(!fRequested && pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_DSEE_SECONDS)){
+        if(pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_DSEE_SECONDS)){
             pmn->UpdateLastSeen();
 
             if(pmn->sigTime < sigTime){ //take the newest entry
                 LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
-                
+                                
                 pmn->UpdateFromNewBroadcast((*this));
                 
                 pmn->Check();
@@ -407,7 +411,6 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
                 }
             }
         }
-        return false;
     }
 
     return true;
@@ -564,7 +567,7 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
         // take this only if it's newer and last ping was more then MASTERNODE_MIN_MNP_SECONDS ago
-        if(sigTime - pmn->lastMnping > MASTERNODE_MIN_MNP_SECONDS)
+        if(sigTime - pmn->lastMnping > MASTERNODE_MIN_MNP_SECONDS-60)
         {
             std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
@@ -586,12 +589,14 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
                     LogPrintf("mnping - Masternode %s block hash %s is too old\n", vin.ToString(), blockHash.ToString());
                     // Do nothing here (no Masternode update, no mnping relay)
                     // Let this node to be visible but fail to accept mnping
+
                     return false;
                 }
             } else {
                 if (fDebug) LogPrintf("mnping - Masternode %s block hash %s is unknown\n", vin.ToString(), blockHash.ToString());
                 // maybe we stuck so we shouldn't ban this node, just fail to accept it
                 // TODO: or should we also request this block?
+
                 return false;
             }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index c29298b0db5d..4a6c28fa5e63 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -611,7 +611,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
         int nDoS = 0;
-        if(!mnp.CheckAndUpdate(nDoS))
+        if(mnp.CheckAndUpdate(nDoS))
         {
             if(nDoS > 0)
                 Misbehaving(pfrom->GetId(), nDoS);

From 06ac558fee99424caa857bd9f4f1984edebf340e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 20 Jun 2015 13:00:19 -0700
Subject: [PATCH 1422/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 37cb39dda773..7a9a81d6cc0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 1)
+define(_CLIENT_VERSION_BUILD, 2)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index a226f17110f4..227b3b12f96a 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 1
+#define CLIENT_VERSION_BUILD 2
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From ca95ca2d951b0d3366aa6c599cc9d1300e96df41 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 20 Jun 2015 13:28:41 -0700
Subject: [PATCH 1423/1819] fixed nDos for failure of mnp

---
 src/masternodeman.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 4a6c28fa5e63..fcf604f36453 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -613,11 +613,12 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         int nDoS = 0;
         if(mnp.CheckAndUpdate(nDoS))
         {
-            if(nDoS > 0)
-                Misbehaving(pfrom->GetId(), nDoS);
-
             //successful, we're done
             return;
+        } else { 
+            //failure
+            if(nDoS > 0)
+                Misbehaving(pfrom->GetId(), nDoS);
         }
 
         if(fDebug) LogPrintf("mnp - Couldn't find Masternode entry %s\n", mnp.vin.ToString().c_str());

From 1cf09fae8e6eb2978111fb727529a71eff2be6df Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 20 Jun 2015 19:03:06 -0700
Subject: [PATCH 1424/1819] update protocol version

---
 src/masternode-pos.h | 2 +-
 src/version.h        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/masternode-pos.h b/src/masternode-pos.h
index 7b420c8c3cc7..4858ff279b03 100644
--- a/src/masternode-pos.h
+++ b/src/masternode-pos.h
@@ -22,7 +22,7 @@ class CMasternodeScanningError;
 extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
 extern CMasternodeScanning mnscan;
 
-static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70077;
+static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70078;
 
 /*
 	1% of the network is scanned every 2.5 minutes, making a full
diff --git a/src/version.h b/src/version.h
index df0272787e56..0c1ef21bc136 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70077;
+static const int PROTOCOL_VERSION = 70078;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70077;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70078;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From b8c842744d6354e7318376291131e8e606f00d3f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 21 Jun 2015 06:54:07 -0700
Subject: [PATCH 1425/1819] clear out old masternodes in CheckAndRemove

---
 src/masternodeman.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index fcf604f36453..0c2d9a78334a 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -233,7 +233,7 @@ void CMasternodeMan::CheckAndRemove()
     //remove inactive
     vector<CMasternode>::iterator it = vMasternodes.begin();
     while(it != vMasternodes.end()){
-        if((*it).activeState == CMasternode::MASTERNODE_REMOVE || (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT){
+        if((*it).activeState == CMasternode::MASTERNODE_REMOVE || (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT || (*it).protocolVersion < nMasternodeMinProtocol){
             if(fDebug) LogPrintf("CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
             it = vMasternodes.erase(it);
         } else {

From 892212d4074714c4050730dbd639004a1a8eda6d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 21 Jun 2015 09:32:32 -0700
Subject: [PATCH 1426/1819] version / min version bump

---
 src/masternode-pos.h | 2 +-
 src/version.h        | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/masternode-pos.h b/src/masternode-pos.h
index 4858ff279b03..fc5ee9d0c5e2 100644
--- a/src/masternode-pos.h
+++ b/src/masternode-pos.h
@@ -22,7 +22,7 @@ class CMasternodeScanningError;
 extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
 extern CMasternodeScanning mnscan;
 
-static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70078;
+static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70079;
 
 /*
 	1% of the network is scanned every 2.5 minutes, making a full
diff --git a/src/version.h b/src/version.h
index 0c1ef21bc136..e9df7b7851d7 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70078;
+static const int PROTOCOL_VERSION = 70079;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70078;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70079;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From dddc0958568d2e599ac3cf87a912c0f651de0635 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 21 Jun 2015 10:06:25 -0700
Subject: [PATCH 1427/1819] changed enforcement strategy for mn payments

---
 src/masternode-payments.cpp | 10 +++-------
 src/masternode-payments.h   |  2 +-
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 2342321953f1..37156b82a16d 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -288,9 +288,9 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
         if(payee.nVotes >= nMaxSignatures && payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED)
             nMaxSignatures = payee.nVotes;
-
+    
     // if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
-    if(nMaxSignatures == 0) return true;
+    if(nMaxSignatures < MNPAYMENTS_SIGNATURES_REQUIRED) return true;
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
     {
@@ -299,11 +299,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
             if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
                 found = true;
 
-        //if 2 contenders are within +/- 20%, take either 
-        // If nMaxSignatures == 6, the min signatures = 2
-        // If nMaxSignatures == 10, the min signatures = 6
-        // If nMaxSignatures == 15, the min signatures = 11
-        if(payee.nVotes >= nMaxSignatures-(MNPAYMENTS_SIGNATURES_TOTAL/5)){            
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){            
             if(found) return true;
 
             CTxDestination address1;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index f5d15e5d0f66..16f81590b128 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -23,7 +23,7 @@ extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
 static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
 #define MNPAYMENTS_SIGNATURES_REQUIRED           6
-#define MNPAYMENTS_SIGNATURES_TOTAL              20
+#define MNPAYMENTS_SIGNATURES_TOTAL              10
 
 void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 bool IsReferenceNode(CTxIn& vin);

From 12e5f8f4d432f735869cd47ccb4ba7e6dfb29ced Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 22 Jun 2015 06:50:33 -0700
Subject: [PATCH 1428/1819] added some debugging

---
 src/masternode-payments.cpp | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 37156b82a16d..0f1462d47196 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -255,11 +255,13 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 
 bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
 {
+    LogPrintf("CMasternodePayments::AddWinningMasternode - getblockhash\n");
     uint256 blockHash = 0;
     if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-100)) {
         return false;
     }
 
+    LogPrintf("CMasternodePayments::AddWinningMasternode - checkhash\n");
     if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
        return false; 
     }
@@ -267,12 +269,14 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
     mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
 
     if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
+       LogPrintf("CMasternodePayments::AddWinningMasternode - create new blockpayee obj\n");
        CMasternodeBlockPayees blockPayees(winnerIn.nBlockHeight);
        mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
     }
 
     int n = 1;
     if(IsReferenceNode(winnerIn.vinMasternode)) n = 100;
+    LogPrintf("CMasternodePayments::AddWinningMasternode - AddPayee - %d\n", n);
     mapMasternodeBlocks[winnerIn.nBlockHeight].AddPayee(winnerIn.payee.scriptPubKey, winnerIn.payee.nValue, n);
 
     return true;
@@ -452,13 +456,13 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         unsigned int nHash;
         memcpy(&nHash, &hash, 2);
 
-        LogPrintf(" ProcessBlock Start nHeight %d. \n", nBlockHeight);
+        LogPrintf("CMasternodePayments::ProcessBlock() Start nHeight %d. \n", nBlockHeight);
 
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
         CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight);
         if(pmn != NULL)
         {
-            LogPrintf(" Found by FindOldestNotInVec \n");
+            LogPrintf("CMasternodePayments::ProcessBlock() Found by FindOldestNotInVec \n");
 
             newWinner.nBlockHeight = nBlockHeight;
 
@@ -480,9 +484,9 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             ExtractDestination(payeeSource, address3);
             CBitcoinAddress address4(address3);
 
-            LogPrintf("Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+            LogPrintf("CMasternodePayments::ProcessBlock() Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
         } else {
-            LogPrintf(" Failed to find masternode to pay\n");
+            LogPrintf("CMasternodePayments::ProcessBlock() Failed to find masternode to pay\n");
         }
 
     }
@@ -497,8 +501,11 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         return false;
     }
 
+    LogPrintf("CMasternodePayments::ProcessBlock() - Signing Winner\n");
     if(newWinner.Sign(keyMasternode, pubKeyMasternode))
     {
+        LogPrintf("CMasternodePayments::ProcessBlock() - AddWinningMasternode\n");
+
         if(AddWinningMasternode(newWinner))
         {
             newWinner.Relay();

From feaaf1e166dedcae256f0df681071f68fea1ae1a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 22 Jun 2015 07:20:34 -0700
Subject: [PATCH 1429/1819] fixed bug with counting votes

---
 src/masternode-payments.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 16f81590b128..cab4e2d14139 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -43,10 +43,10 @@ class CMasternodePayee : public CTxOut
         nVotes = 0;
     } 
 
-    CMasternodePayee(CAmount nValueIn, CScript payee) {
+    CMasternodePayee(CAmount nValueIn, CScript payee, int nVotesIn) {
         scriptPubKey = payee;
         nValue = nValueIn;
-        nVotes = 0;
+        nVotes = nVotesIn;
     }
 };
 
@@ -74,7 +74,7 @@ class CMasternodeBlockPayees
             }
         }
 
-        CMasternodePayee c((CAmount)nAmount, payeeIn);
+        CMasternodePayee c((CAmount)nAmount, payeeIn, nIncrement);
         vecPayments.push_back(c);
     }
 

From 12863bb4236b0e507516ab78c9b72541e7c9ad93 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 22 Jun 2015 08:47:24 -0700
Subject: [PATCH 1430/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7a9a81d6cc0a..d23a0c3add97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 2)
+define(_CLIENT_VERSION_BUILD, 3)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 227b3b12f96a..692d62fd9418 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 2
+#define CLIENT_VERSION_BUILD 3
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From a04934811026d04212a3d789c9a5534fc8f06da2 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 22 Jun 2015 20:51:28 +0300
Subject: [PATCH 1431/1819] bump ix min proto

---
 src/instantx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/instantx.h b/src/instantx.h
index 48186ba0bfb7..91f432bed662 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70066;
+static const int MIN_INSTANTX_PROTO_VERSION = 70079;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;

From 02230c42630ba46d6cc9b2fdc5b3f0821693810d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 22 Jun 2015 20:59:27 +0300
Subject: [PATCH 1432/1819] deal with reservekeys in CreateDenominated and
 MakeCollaterals more accurate (+todo)

---
 src/darksend.cpp | 79 +++++++++++++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 31 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index ba050286a9ab..d61fcb1265bf 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1720,38 +1720,43 @@ bool CDarksendPool::SendRandomPaymentToSelf()
 // Split up large inputs or create fee sized inputs
 bool CDarksendPool::MakeCollateralAmounts()
 {
-    // make our change address
-    CReserveKey reservekey(pwalletMain);
-
-    CScript scriptChange;
-    CPubKey vchPubKey;
-    assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
-    scriptChange = GetScriptForDestination(vchPubKey.GetID());
-
     CWalletTx wtx;
     int64_t nFeeRet = 0;
     std::string strFail = "";
     vector< pair<CScript, int64_t> > vecSend;
+    CCoinControl *coinControl = NULL;
 
-    vecSend.push_back(make_pair(scriptChange, DARKSEND_COLLATERAL*4));
+    // make our collateral address
+    CReserveKey reservekeyCollateral(pwalletMain);
+    // make our change address
+    CReserveKey reservekeyChange(pwalletMain);
+
+    CScript scriptCollateral;
+    CPubKey vchPubKey;
+    assert(reservekeyCollateral.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
+    scriptCollateral = GetScriptForDestination(vchPubKey.GetID());
+
+    vecSend.push_back(make_pair(scriptCollateral, DARKSEND_COLLATERAL*4));
 
-    CCoinControl *coinControl=NULL;
     // try to use non-denominated and not mn-like funds
-    bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekey,
+    bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
             nFeeRet, strFail, coinControl, ONLY_NONDENOMINATED_NOTMN);
     if(!success){
         // if we failed (most likeky not enough funds), try to use denominated instead -
         // MN-like funds should not be touched in any case and we can't mix denominated without collaterals anyway
-        success = pwalletMain->CreateTransaction(vecSend, wtx, reservekey,
+        success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
                 nFeeRet, strFail, coinControl, ONLY_DENOMINATED);
         if(!success){
-            LogPrintf("MakeCollateralAmounts: Error - %s\n", strFail.c_str());
+            LogPrintf("MakeCollateralAmounts: ONLY_DENOMINATED Error - %s\n", strFail);
+            reservekeyCollateral.ReturnKey();
             return false;
         }
     }
 
+    reservekeyCollateral.KeepKey();
+
     // use the same cachedLastSuccess as for DS mixinx to prevent race
-    if(pwalletMain->CommitTransaction(wtx, reservekey))
+    if(pwalletMain->CommitTransaction(wtx, reservekeyChange))
         cachedLastSuccess = chainActive.Tip()->nHeight;
 
     LogPrintf("MakeCollateralAmounts Success: tx %s\n", wtx.GetHash().GetHex().c_str());
@@ -1762,23 +1767,27 @@ bool CDarksendPool::MakeCollateralAmounts()
 // Create denominations
 bool CDarksendPool::CreateDenominated(int64_t nTotalValue)
 {
-    // make our change address
-    CReserveKey reservekey(pwalletMain);
-
-    CScript scriptChange;
-    CPubKey vchPubKey;
-    assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
-    scriptChange = GetScriptForDestination(vchPubKey.GetID());
-
     CWalletTx wtx;
     int64_t nFeeRet = 0;
     std::string strFail = "";
     vector< pair<CScript, int64_t> > vecSend;
     int64_t nValueLeft = nTotalValue;
 
+    // make our collateral address
+    CReserveKey reservekeyCollateral(pwalletMain);
+    // make our change address
+    CReserveKey reservekeyChange(pwalletMain);
+    // make our denom addresses
+    CReserveKey reservekeyDenom(pwalletMain);
+
+    CScript scriptCollateral;
+    CPubKey vchPubKey;
+    assert(reservekeyCollateral.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
+    scriptCollateral = GetScriptForDestination(vchPubKey.GetID());
+
     // ****** Add collateral outputs ************ /
     if(!pwalletMain->HasCollateralInputs()) {
-        vecSend.push_back(make_pair(scriptChange, DARKSEND_COLLATERAL*4));
+        vecSend.push_back(make_pair(scriptCollateral, DARKSEND_COLLATERAL*4));
         nValueLeft -= DARKSEND_COLLATERAL*4;
     }
 
@@ -1788,14 +1797,15 @@ bool CDarksendPool::CreateDenominated(int64_t nTotalValue)
 
         // add each output up to 10 times until it can't be added again
         while(nValueLeft - v >= DARKSEND_COLLATERAL && nOutputs <= 10) {
-            CScript scriptChange;
+            CScript scriptDenom;
             CPubKey vchPubKey;
             //use a unique change address
-            assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
-            scriptChange = GetScriptForDestination(vchPubKey.GetID());
-            reservekey.KeepKey();
+            assert(reservekeyDenom.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
+            scriptDenom = GetScriptForDestination(vchPubKey.GetID());
+            // TODO: do not keep reservekeyDenom here
+            reservekeyDenom.KeepKey();
 
-            vecSend.push_back(make_pair(scriptChange, v));
+            vecSend.push_back(make_pair(scriptDenom, v));
 
             //increment outputs and subtract denomination amount
             nOutputs++;
@@ -1810,18 +1820,25 @@ bool CDarksendPool::CreateDenominated(int64_t nTotalValue)
     // if we have anything left over, it will be automatically send back as change - there is no need to send it manually
 
     CCoinControl *coinControl=NULL;
-    bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekey,
+    bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
             nFeeRet, strFail, coinControl, ONLY_NONDENOMINATED_NOTMN);
     if(!success){
         LogPrintf("CreateDenominated: Error - %s\n", strFail.c_str());
+        // TODO: return reservekeyDenom here
+        reservekeyCollateral.ReturnKey();
         return false;
     }
 
+    // TODO: keep reservekeyDenom here
+    reservekeyCollateral.KeepKey();
+
     // use the same cachedLastSuccess as for DS mixinx to prevent race
-    if(pwalletMain->CommitTransaction(wtx, reservekey))
+    if(pwalletMain->CommitTransaction(wtx, reservekeyChange))
         cachedLastSuccess = chainActive.Tip()->nHeight;
+    else
+        LogPrintf("CreateDenominated: CommitTransaction failed!\n");
 
-    LogPrintf("CreateDenominated Success: tx %s\n", wtx.GetHash().GetHex().c_str());
+    LogPrintf("CreateDenominated: tx %s\n", wtx.GetHash().GetHex().c_str());
 
     return true;
 }

From d766b6b5644ee3500e1b4c11f3a6bbb12db71a66 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 22 Jun 2015 21:10:46 +0300
Subject: [PATCH 1433/1819] fix PrepareDarksendDenominate - loop instead of if

---
 src/wallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index d0bcc99ec2a1..a05599c1060c 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2376,7 +2376,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
         int nOutputs = 0;
 
         // add each output up to 10 times until it can't be added again
-        if(nValueLeft - v >= 0 && nOutputs <= 10) {
+        while(nValueLeft - v >= 0 && nOutputs <= 10) {
             CScript scriptChange;
             CPubKey vchPubKey;
             //use a unique change address

From 9925e0a360e0ba881e4ff2765f37fc3ced23e6ce Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 22 Jun 2015 22:21:44 +0300
Subject: [PATCH 1434/1819] try to lower fee in CreateTransaction

---
 src/wallet.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index a05599c1060c..bf00e8c07e03 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1991,6 +1991,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                                 CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX)
 {
     CAmount nValue = 0;
+    CAmount nFeeDelta = 0;
     BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
     {
         if (nValue < 0)
@@ -2021,7 +2022,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                 txNew.vout.clear();
                 wtxNew.fFromMe = true;
 
-                CAmount nTotalValue = nValue + nFeeRet;
+                CAmount nTotalValue = nValue + nFeeRet + nFeeDelta;
                 double dPriority = 0;
                 // vouts to the payees
                 BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
@@ -2119,6 +2120,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     if (newTxOut.IsDust(::minRelayTxFee))
                     {
                         nFeeRet += nChange;
+                        nChange = 0;
                         reservekey.ReturnKey();
                     }
                     else
@@ -2180,9 +2182,12 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     return false;
                 }
 
-                if (nFeeRet >= nFeeNeeded)
+                if (nFeeRet == nFeeNeeded || (nFeeRet > nFeeNeeded && (nFeeDelta > 0 || useIX || coin_type == ONLY_DENOMINATED)))
                     break; // Done, enough fee included.
 
+                if (nFeeRet > nFeeNeeded)
+                    nFeeDelta = nFeeRet - nFeeNeeded + 1; // Try to lower fee
+
                 // Include more fee and try again.
                 nFeeRet = nFeeNeeded;
                 continue;

From 3e95f3b98cf749164e684d5a3760ca4ae1d0ba40 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 07:12:24 +0300
Subject: [PATCH 1435/1819] accept(verify) DS mixing txes ignoring fees

---
 src/darksend.cpp | 6 +++---
 src/wallet.cpp   | 4 ++--
 src/wallet.h     | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index d61fcb1265bf..894fe5eb6c10 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -266,7 +266,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
                 return;
             }
 
-            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) {
+            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)) {
                 LogPrintf("dsi -- transaction not valid! \n");
                 errorID = ERR_INVALID_TX;
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
@@ -607,7 +607,7 @@ void CDarksendPool::CheckFinalTransaction()
             if(fDebug) LogPrintf("Transaction 2: %s\n", txNew.ToString().c_str());
 
             // See if the transaction is valid
-            if (!txNew.AcceptToMemoryPool(false))
+            if (!txNew.AcceptToMemoryPool(false, true, true));
             {
                 LogPrintf("CDarksendPool::Check() - CommitTransaction : Error: Transaction not valid\n");
                 SetNull();
@@ -1190,7 +1190,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
 
-        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
+        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
             LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
             UnlockCoins();
             SetNull(true);
diff --git a/src/wallet.cpp b/src/wallet.cpp
index a05599c1060c..ba3017d3fce9 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -3179,10 +3179,10 @@ int CMerkleTx::GetBlocksToMaturity() const
 }
 
 
-bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectInsaneFee)
+bool CMerkleTx::AcceptToMemoryPool(bool fLimitFree, bool fRejectInsaneFee, bool ignoreFees)
 {
     CValidationState state;
-    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectInsaneFee);
+    return ::AcceptToMemoryPool(mempool, state, *this, fLimitFree, NULL, fRejectInsaneFee, ignoreFees);
 }
 
 int CMerkleTx::GetTransactionLockSignatures() const
diff --git a/src/wallet.h b/src/wallet.h
index 8694d4c0a033..def7f903d6ee 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -601,7 +601,7 @@ class CMerkleTx : public CTransaction
     int GetDepthInMainChain(bool enableIX = true) const { const CBlockIndex *pindexRet; return GetDepthInMainChain(pindexRet, enableIX); }
     bool IsInMainChain() const { const CBlockIndex *pindexRet; return GetDepthInMainChainINTERNAL(pindexRet) > 0; }
     int GetBlocksToMaturity() const;
-    bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true);
+    bool AcceptToMemoryPool(bool fLimitFree=true, bool fRejectInsaneFee=true, bool ignoreFees=false);
     int GetTransactionLockSignatures() const;
     bool IsTransactionLockTimedOut() const;
 };

From d35dab332a93b1aaebb1636203633a7af21578ab Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:02:46 +0300
Subject: [PATCH 1436/1819] bump min fees 10x

---
 src/main.cpp   | 7 +++++--
 src/wallet.cpp | 6 ++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2507a7ff2115..c838c7675ef4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -63,8 +63,11 @@ bool fCheckBlockIndex = false;
 unsigned int nCoinCacheSize = 5000;
 
 
-/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
-CFeeRate minRelayTxFee = CFeeRate(1000);
+/** Fees smaller than this (in duffs) are considered zero fee (for relaying and mining)
+ * We are ~100 times smaller then bitcoin now (2015-06-23), set minRelayTxFee only 10 times higher
+ * so it's still 10 times lower comparing to bitcoin.
+ */
+CFeeRate minRelayTxFee = CFeeRate(10000);
 
 CTxMemPool mempool(::minRelayTxFee);
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index ba3017d3fce9..c81ac4c82ceb 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -39,10 +39,12 @@ bool fSendFreeTransactions = false;
 bool fPayAtLeastCustomFee = true;
 
 /** 
- * Fees smaller than this (in satoshi) are considered zero fee (for transaction creation) 
+ * Fees smaller than this (in duffs) are considered zero fee (for transaction creation)
+ * We are ~100 times smaller then bitcoin now (2015-06-23), set minTxFee 10 times higher
+ * so it's still 10 times lower comparing to bitcoin.
  * Override with -mintxfee
  */
-CFeeRate CWallet::minTxFee = CFeeRate(1000);
+CFeeRate CWallet::minTxFee = CFeeRate(10000);
 
 /** @defgroup mapWallet
  *

From f3e619a2d10b6e9ea0366395d5146470f642907e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:15:12 +0300
Subject: [PATCH 1437/1819] btc/kb -> dash/kb

---
 src/amount.cpp    | 2 +-
 src/init.cpp      | 6 +++---
 src/rpcmisc.cpp   | 4 ++--
 src/rpcnet.cpp    | 2 +-
 src/rpcwallet.cpp | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/amount.cpp b/src/amount.cpp
index e6f5b7d4407d..20ea3ead5986 100644
--- a/src/amount.cpp
+++ b/src/amount.cpp
@@ -27,5 +27,5 @@ CAmount CFeeRate::GetFee(size_t nSize) const
 
 std::string CFeeRate::ToString() const
 {
-    return strprintf("%d.%08d BTC/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
+    return strprintf("%d.%08d DASH/kB", nSatoshisPerK / COIN, nSatoshisPerK % COIN);
 }
diff --git a/src/init.cpp b/src/init.cpp
index a5882e001b43..e964b90060da 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -342,8 +342,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -keepassname=<name>      " + _("Name to construct url for KeePass entry that stores the wallet passphrase") + "\n";
     strUsage += "  -keypool=<n>             " + strprintf(_("Set key pool size to <n> (default: %u)"), 100) + "\n";
     if (GetBoolArg("-help-debug", false))
-        strUsage += "  -mintxfee=<amt>          " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
-    strUsage += "  -paytxfee=<amt>          " + strprintf(_("Fee (in BTC/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
+        strUsage += "  -mintxfee=<amt>          " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)"), FormatMoney(CWallet::minTxFee.GetFeePerK())) + "\n";
+    strUsage += "  -paytxfee=<amt>          " + strprintf(_("Fee (in DASH/kB) to add to transactions you send (default: %s)"), FormatMoney(payTxFee.GetFeePerK())) + "\n";
     strUsage += "  -rescan                  " + _("Rescan the block chain for missing wallet transactions") + " " + _("on startup") + "\n";
     strUsage += "  -salvagewallet           " + _("Attempt to recover private keys from a corrupt wallet.dat") + " " + _("on startup") + "\n";
     strUsage += "  -sendfreetransactions    " + strprintf(_("Send transactions as zero-fee transactions if possible (default: %u)"), 0) + "\n";
@@ -389,7 +389,7 @@ std::string HelpMessage(HelpMessageMode mode)
         strUsage += "  -relaypriority         " + strprintf(_("Require high priority for relaying free or low-fee transactions (default:%u)"), 1) + "\n";
         strUsage += "  -maxsigcachesize=<n>   " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n";
     }
-    strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in BTC/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
+    strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
     strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
     if (GetBoolArg("-help-debug", false))
     {
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index ab13588b2f34..554fd513813d 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -65,8 +65,8 @@ Value getinfo(const Array& params, bool fHelp)
             "  \"keypoololdest\": xxxxxx,    (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n"
             "  \"keypoolsize\": xxxx,        (numeric) how many new keys are pre-generated\n"
             "  \"unlocked_until\": ttt,      (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
-            "  \"paytxfee\": x.xxxx,         (numeric) the transaction fee set in btc/kb\n"
-            "  \"relayfee\": x.xxxx,         (numeric) minimum relay fee for non-free transactions in btc/kb\n"
+            "  \"paytxfee\": x.xxxx,         (numeric) the transaction fee set in dash/kb\n"
+            "  \"relayfee\": x.xxxx,         (numeric) minimum relay fee for non-free transactions in dash/kb\n"
             "  \"errors\": \"...\"           (string) any error messages\n"
             "}\n"
             "\nExamples:\n"
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index b95b5221b69d..6894b629a2d2 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -395,7 +395,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "  }\n"
             "  ,...\n"
             "  ],\n"
-            "  \"relayfee\": x.xxxxxxxx,                (numeric) minimum relay fee for non-free transactions in btc/kb\n"
+            "  \"relayfee\": x.xxxxxxxx,                (numeric) minimum relay fee for non-free transactions in dash/kb\n"
             "  \"localaddresses\": [                    (array) list of local addresses\n"
             "  {\n"
             "    \"address\": \"xxxx\",                 (string) network address\n"
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index d80751f10f9a..5782e4243352 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -1970,7 +1970,7 @@ Value settxfee(const Array& params, bool fHelp)
             "settxfee amount\n"
             "\nSet the transaction fee per kB.\n"
             "\nArguments:\n"
-            "1. amount         (numeric, required) The transaction fee in BTC/kB rounded to the nearest 0.00000001\n"
+            "1. amount         (numeric, required) The transaction fee in DASH/kB rounded to the nearest 0.00000001\n"
             "\nResult\n"
             "true|false        (boolean) Returns true if successful\n"
             "\nExamples:\n"

From 159b3366b1d98d8473a45e6b236d6ffceb018b02 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:19:45 +0300
Subject: [PATCH 1438/1819] reject real insane fee instead of hardcoded

---
 src/qt/sendcoinsdialog.cpp | 2 +-
 src/qt/walletmodel.cpp     | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 1eb93dbb7b16..03a6b2bd33f8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -600,7 +600,7 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
             tr("Error: The wallet was unlocked only to anonymize coins."),
             QMessageBox::Ok, QMessageBox::Ok);
     case WalletModel::InsaneFee:
-        msgParams.first = tr("A fee higher than %1 is considered an insanely high fee.").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), 10000000));
+        msgParams.first = tr("A fee %1 times higher than %2 per kB is considered an insanely high fee.").arg(10000).arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), ::minRelayTxFee.GetFeePerK()));
         break;
     // included to prevent a compiler warning.
     case WalletModel::OK:
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index c80eb8769448..a41d83445562 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -305,8 +305,8 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
             return TransactionCreationFailed;
         }
 
-        // reject insane fee > 0.1 DASH
-        if (nFeeRequired > 10000000)
+        // reject insane fee
+        if (nFeeRequired > ::minRelayTxFee.GetFee(transaction.getTransactionSize()) * 10000)
             return InsaneFee;
     }
 

From db18ce0480f037416ae25cbfc8bb74c048ca588b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:22:39 +0300
Subject: [PATCH 1439/1819] bump required version for fee_estimates.dat file

---
 src/txmempool.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index db598a1dfa50..2daf3dd70624 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -666,7 +666,7 @@ CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const
 {
     try {
         LOCK(cs);
-        fileout << 99900; // version required to read: 0.9.99 or later
+        fileout << 120000; // version required to read: 0.12.00 or later
         fileout << CLIENT_VERSION; // version that wrote the file
         minerPolicyEstimator->Write(fileout);
     }

From 154567bf5dbb0e6874ebba8ccb2fbe06047a4eeb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:24:20 +0300
Subject: [PATCH 1440/1819] refactor: allowFree -> ignoreFees

---
 src/main.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c838c7675ef4..f16f2c4afb76 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4610,7 +4610,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         CTransaction tx;
 
         //masternode signed transaction
-        bool allowFree = false;
+        bool ignoreFees = false;
         CTxIn vin;
         vector<unsigned char> vchSig;
         int64_t sigTime;
@@ -4641,7 +4641,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
                 LogPrintf("dstx: Got Masternode transaction %s\n", tx.GetHash().ToString().c_str());
 
-                allowFree = true;
+                ignoreFees = true;
                 pmn->allowFreeTx = false;
 
                 if(!mapDarksendBroadcastTxes.count(tx.GetHash())){
@@ -4666,7 +4666,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         mapAlreadyAskedFor.erase(inv);
 
-        if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs, false, allowFree))
+        if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs, false, ignoreFees))
         {
             mempool.check(pcoinsTip);
             RelayTransaction(tx);

From a6a04cb5c18c84ea2590229e1d79a2c34c9cbb45 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:40:08 +0300
Subject: [PATCH 1441/1819] refactor: dsee -> mnb

---
 src/masternode.cpp    | 28 ++++++++++++++--------------
 src/masternode.h      |  6 +++---
 src/masternodeman.cpp |  2 +-
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index b45314735cd7..08595c149e3e 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -334,7 +334,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
 {
     // make sure signature isn't in the future (past is OK)
     if (sigTime > GetAdjustedTime() + 60 * 60) {
-        LogPrintf("dsee - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        LogPrintf("mnb - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
         return false;
     }
 
@@ -343,12 +343,12 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
     std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion)  + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
 
     if(donationPercentage < 0 || donationPercentage > 100){
-        LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
+        LogPrintf("mnb - donation percentage out of range %d\n", donationPercentage);
         return false;
     }
 
     if(protocolVersion < nMasternodeMinProtocol) {
-        LogPrintf("dsee - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
+        LogPrintf("mnb - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
         return false;
     }
 
@@ -356,7 +356,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
     pubkeyScript = GetScriptForDestination(pubkey.GetID());
 
     if(pubkeyScript.size() != 25) {
-        LogPrintf("dsee - pubkey the wrong size\n");
+        LogPrintf("mnb - pubkey the wrong size\n");
         nDos = 100;
         return false;
     }
@@ -365,19 +365,19 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
     pubkeyScript2 = GetScriptForDestination(pubkey2.GetID());
 
     if(pubkeyScript2.size() != 25) {
-        LogPrintf("dsee - pubkey2 the wrong size\n");
+        LogPrintf("mnb - pubkey2 the wrong size\n");
         nDos = 100;
         return false;
     }
 
     if(!vin.scriptSig.empty()) {
-        LogPrintf("dsee - Ignore Not Empty ScriptSig %s\n",vin.ToString().c_str());
+        LogPrintf("mnb - Ignore Not Empty ScriptSig %s\n",vin.ToString().c_str());
         return false;
     }
 
     std::string errorMessage = "";
     if(!darkSendSigner.VerifyMessage(pubkey, sig, strMessage, errorMessage)){
-        LogPrintf("dsee - Got bad Masternode address signature\n");
+        LogPrintf("mnb - Got bad Masternode address signature\n");
         nDos = 100;
         return false;
     }
@@ -386,10 +386,10 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
         if(addr.GetPort() != 9999) return false;
     } else if(addr.GetPort() == 9999) return false;
 
-    //search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
+    //search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts
     CMasternode* pmn = mnodeman.Find(vin);
 
-    // if we are masternode but with undefined vin and this dsee is ours (matches our Masternode privkey) then just skip this part
+    // if we are masternode but with undefined vin and this mnb is ours (matches our Masternode privkey) then just skip this part
     if(pmn != NULL && !(fMasterNode && activeMasternode.vin == CTxIn() && pubkey2 == activeMasternode.pubKeyMasternode))
     {
         // if Requested, we don't want to update this info
@@ -397,11 +397,11 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
 
         // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
         //   after that they just need to match
-        if(pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_DSEE_SECONDS)){
+        if(pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_MNB_SECONDS)){
             pmn->UpdateLastSeen();
 
             if(pmn->sigTime < sigTime){ //take the newest entry
-                LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
+                LogPrintf("mnb - Got updated entry for %s\n", addr.ToString().c_str());
                                 
                 pmn->UpdateFromNewBroadcast((*this));
                 
@@ -424,10 +424,10 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
     tx.vin.push_back(vin);
     tx.vout.push_back(vout);
     if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
-        if(fDebug) LogPrintf("dsee - Accepted Masternode entry\n");
+        if(fDebug) LogPrintf("mnb - Accepted Masternode entry\n");
 
         if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
-            LogPrintf("dsee - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
+            LogPrintf("mnb - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
             return false;
         }
 
@@ -443,7 +443,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
             CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
             if(pConfIndex->GetBlockTime() > sigTime)
             {
-                LogPrintf("dsee - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
+                LogPrintf("mnb - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
                           sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
                 return false;
             }
diff --git a/src/masternode.h b/src/masternode.h
index abc0ba92e3b5..5099b80da6ee 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -27,7 +27,7 @@
 
 #define MASTERNODE_MIN_CONFIRMATIONS           15
 #define MASTERNODE_MIN_MNP_SECONDS             (30*60)
-#define MASTERNODE_MIN_DSEE_SECONDS            (5*60)
+#define MASTERNODE_MIN_MNB_SECONDS             (5*60)
 #define MASTERNODE_PING_SECONDS                (15*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
 #define MASTERNODE_REMOVAL_SECONDS             (24*60*60)
@@ -66,7 +66,7 @@ class CMasternode
     CPubKey pubkey2;
     std::vector<unsigned char> sig;
     int activeState;
-    int64_t sigTime; //dsee message times
+    int64_t sigTime; //mnb message times
     int64_t lastMnping;
     int64_t lastTimeSeen;
     int cacheInputAge;
@@ -298,7 +298,7 @@ class CMasternodePing
     CTxIn vin;
     uint256 blockHash;
     std::vector<unsigned char> vchSig;
-    int64_t sigTime; //dsee message times
+    int64_t sigTime; //mnb message times
     //removed stop
 
     CMasternodePing();
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 0c2d9a78334a..c346003ad5d4 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -630,7 +630,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             if (GetTime() < t) return; // we've asked recently
         }
 
-        // ask for the dsee info once from the node that sent mnp
+        // ask for the mnb info once from the node that sent mnp
 
         LogPrintf("mnp - Asking source node for missing entry %s\n", mnp.vin.ToString().c_str());
         pfrom->PushMessage("dseg", mnp.vin);

From 5037c710de843fe34c3423fb41142c66d73de9df Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:47:05 +0300
Subject: [PATCH 1442/1819] When DS inputs are selected in coincontrol: - spend
 exactly these inputs - allow to spend more than 0.1 as a fee (note: still
 will respect non-ds fee limits)

---
 src/wallet.cpp | 36 ++++++++++++++++++++++--------------
 1 file changed, 22 insertions(+), 14 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index a05599c1060c..276ca7a94ea0 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1662,8 +1662,29 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*
     vector<COutput> vCoins;
     AvailableCoins(vCoins, true, coinControl, coin_type, useIX);
 
+    // coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
+    if (coinControl && coinControl->HasSelected())
+    {
+        BOOST_FOREACH(const COutput& out, vCoins)
+        {
+            if(!out.fSpendable)
+                continue;
+
+            if(coin_type == ONLY_DENOMINATED) {
+                CTxIn vin = CTxIn(out.tx->GetHash(),out.i);
+                int rounds = GetInputDarksendRounds(vin);
+                // make sure it's actually anonymized
+                if(rounds < nDarksendRounds) continue;
+            }
+
+            nValueRet += out.tx->vout[out.i].nValue;
+            setCoinsRet.insert(make_pair(out.tx, out.i));
+        }
+        return (nValueRet >= nTargetValue);
+    }
+
     //if we're doing only denominated, we need to round up to the nearest .1DRK
-    if(coin_type == ONLY_DENOMINATED){
+    if(coin_type == ONLY_DENOMINATED) {
         // Make outputs by looping through denominations, from large to small
         BOOST_FOREACH(int64_t v, darkSendDenominations)
         {
@@ -1684,19 +1705,6 @@ bool CWallet::SelectCoins(const CAmount& nTargetValue, set<pair<const CWalletTx*
         return (nValueRet >= nTargetValue);
     }
 
-    // coin control -> return all selected outputs (we want all selected to go into the transaction for sure)
-    if (coinControl && coinControl->HasSelected())
-    {
-        BOOST_FOREACH(const COutput& out, vCoins)
-        {
-            if(!out.fSpendable)
-                continue;
-            nValueRet += out.tx->vout[out.i].nValue;
-            setCoinsRet.insert(make_pair(out.tx, out.i));
-        }
-        return (nValueRet >= nTargetValue);
-    }
-
     return (SelectCoinsMinConf(nTargetValue, 1, 6, vCoins, setCoinsRet, nValueRet) ||
             SelectCoinsMinConf(nTargetValue, 1, 1, vCoins, setCoinsRet, nValueRet) ||
             (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue, 0, 1, vCoins, setCoinsRet, nValueRet)));

From c72355335c5bcd74cbbe9635290c37ccc3583b6c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 23 Jun 2015 09:38:28 -0700
Subject: [PATCH 1443/1819] Coinbase Payee Cache Implementation

- Masternode nLastPaid is removed and a new caching system that keeps the last 30 days of coinbase payees replaces it
- To deal with some significant attack vectors, the masternode donation feature was removed. The donation feature was added to support developement anyway, so this will be replaced by the budgeting code.
-  This code should allow the network to come to consensus about who should be paid pretty effectively
---
 src/Makefile.am             |   3 +
 src/activemasternode.cpp    |  40 +------
 src/activemasternode.h      |   4 +-
 src/coinbase-payee.cpp      | 218 ++++++++++++++++++++++++++++++++++++
 src/coinbase-payee.h        |  96 ++++++++++++++++
 src/init.cpp                |  17 +++
 src/main.cpp                |  12 +-
 src/masternode-budget.cpp   |  38 +++----
 src/masternode-budget.h     |   4 +-
 src/masternode-payments.cpp |  18 +--
 src/masternode.cpp          |  56 +++------
 src/masternode.h            |  17 +--
 src/masternodeconfig.cpp    |  27 +----
 src/masternodeconfig.h      |  16 +--
 src/rpcmasternode.cpp       |  35 +-----
 15 files changed, 398 insertions(+), 203 deletions(-)
 create mode 100644 src/coinbase-payee.cpp
 create mode 100644 src/coinbase-payee.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 7886918c3a34..846beb1038e8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,6 +91,7 @@ BITCOIN_CORE_H = \
   primitives/block.h \
   primitives/transaction.h \
   core_io.h \
+  coinbase-payee.h \
   crypter.h \
   darksend.h \
   darksend-relay.h \
@@ -177,6 +178,7 @@ libbitcoin_server_a_SOURCES = \
   addrman.cpp \
   alert.cpp \
   bloom.cpp \
+  coinbase-payee.cpp \
   chain.cpp \
   checkpoints.cpp \
   init.cpp \
@@ -277,6 +279,7 @@ libbitcoin_common_a_SOURCES = \
   allocators.cpp \
   amount.cpp \
   base58.cpp \
+  coinbase-payee.cpp \
   chainparams.cpp \
   darksend.cpp \
   darksend-relay.cpp \
diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 809ffbb43fe4..6c1135fccec7 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -105,11 +105,7 @@ void CActiveMasternode::ManageStatus()
                 return;
             }
 
-            /* donations are not supported in dash.conf */
-            CScript donationAddress = CScript();
-            int donationPercentage = 0;
-
-            if(!Register(vin, service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, donationAddress, donationPercentage, errorMessage)) {
+            if(!Register(vin, service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage)) {
                 LogPrintf("CActiveMasternode::ManageStatus() - Error on Register: %s\n", errorMessage.c_str());
             }
 
@@ -177,14 +173,12 @@ bool CActiveMasternode::Mnping(CTxIn vin, CService service, CKey keyMasternode,
     return true;
 }
 
-bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string strDonationAddress, std::string strDonationPercentage, std::string& errorMessage) {
+bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string& errorMessage) {
     CTxIn vin;
     CPubKey pubKeyCollateralAddress;
     CKey keyCollateralAddress;
     CPubKey pubKeyMasternode;
     CKey keyMasternode;
-    CScript donationAddress = CScript();
-    int donationPercentage = 0;
 
     if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode))
     {
@@ -198,39 +192,15 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
         return false;
     }
 
-    CBitcoinAddress address;
-    if (strDonationAddress != "")
-    {
-        if(!address.SetString(strDonationAddress))
-        {
-            LogPrintf("CActiveMasternode::Register - Invalid Donation Address\n");
-            return false;
-        }
-        donationAddress = GetScriptForDestination(address.Get());
-
-        try {
-            donationPercentage = boost::lexical_cast<int>( strDonationPercentage );
-        } catch( boost::bad_lexical_cast const& ) {
-            LogPrintf("CActiveMasternode::Register - Invalid Donation Percentage (Couldn't cast)\n");
-            return false;
-        }
-
-        if(donationPercentage < 0 || donationPercentage > 100)
-        {
-            LogPrintf("CActiveMasternode::Register - Donation Percentage Out Of Range\n");
-            return false;
-        }
-    }
-
-    return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, donationAddress, donationPercentage, errorMessage);
+    return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage);
 }
 
-bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage) {
+bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage) {
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
     {
         LogPrintf("CActiveMasternode::Register() - Adding to Masternode list service: %s - vin: %s\n", service.ToString().c_str(), vin.ToString().c_str());
-        CMasternodeBroadcast mnb(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION, donationAddress, donationPercentage);
+        CMasternodeBroadcast mnb(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
         if(!mnb.Sign(keyCollateralAddress)){
             //send to all peers
             LogPrintf("CActiveMasternode::Register() -  Failed to sign %s\n", vin.ToString().c_str());
diff --git a/src/activemasternode.h b/src/activemasternode.h
index cde66e767118..794166edcc62 100644
--- a/src/activemasternode.h
+++ b/src/activemasternode.h
@@ -42,9 +42,9 @@ class CActiveMasternode
     bool Mnping(CTxIn vin, CService service, CKey key, CPubKey pubKey, std::string &retErrorMessage); 
 
     /// Register remote Masternode
-    bool Register(std::string strService, std::string strKey, std::string txHash, std::string strOutputIndex, std::string strDonationAddress, std::string strDonationPercentage, std::string& errorMessage); 
+    bool Register(std::string strService, std::string strKey, std::string txHash, std::string strOutputIndex, std::string& errorMessage); 
     /// Register any Masternode
-    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, CScript donationAddress, int donationPercentage, std::string &retErrorMessage); 
+    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage); 
 
     /// Get 1000DRK input that can be used for the Masternode
     bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey);
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
new file mode 100644
index 000000000000..4c9445c3e275
--- /dev/null
+++ b/src/coinbase-payee.cpp
@@ -0,0 +1,218 @@
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "coinbase-payee.h"
+#include "util.h"
+#include "addrman.h"
+#include "masternode.h"
+#include "darksend.h"
+#include "masternodeman.h"
+#include <boost/filesystem.hpp>
+
+CCoinbasePayee coinbasePayee;
+
+//
+// CCoinbasePayeeDB
+//
+
+CCoinbasePayeeDB::CCoinbasePayeeDB()
+{
+    pathDB = GetDataDir() / "coinbase-payee.dat";
+    strMagicMessage = "CoinbasePayeeDB";
+}
+
+bool CCoinbasePayeeDB::Write(const CCoinbasePayee& objToSave)
+{
+    int64_t nStart = GetTimeMillis();
+
+    // serialize, checksum data up to that point, then append checksum
+    CDataStream ssObj(SER_DISK, CLIENT_VERSION);
+    ssObj << strMagicMessage; // masternode cache file specific magic message
+    ssObj << FLATDATA(Params().MessageStart()); // network specific magic number
+    ssObj << objToSave;
+    uint256 hash = Hash(ssObj.begin(), ssObj.end());
+    ssObj << hash;
+
+    // open output file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "wb");
+    CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
+    if (fileout.IsNull())
+        return error("%s : Failed to open file %s", __func__, pathDB.string());
+
+    // Write and commit header, data
+    try {
+        fileout << ssObj;
+    }
+    catch (std::exception &e) {
+        return error("%s : Serialize or I/O error - %s", __func__, e.what());
+    }
+    fileout.fclose();
+
+    LogPrintf("Written info to coinbase-payee.dat  %dms\n", GetTimeMillis() - nStart);
+
+    return true;
+}
+
+CCoinbasePayeeDB::ReadResult CCoinbasePayeeDB::Read(CCoinbasePayee& objToLoad)
+{
+
+    int64_t nStart = GetTimeMillis();
+    // open input file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "rb");
+    CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
+    if (filein.IsNull())
+    {
+        error("%s : Failed to open file %s", __func__, pathDB.string());
+        return FileError;
+    }
+
+    // use file size to size memory buffer
+    int fileSize = boost::filesystem::file_size(pathDB);
+    int dataSize = fileSize - sizeof(uint256);
+    // Don't try to resize to a negative number if file is small
+    if (dataSize < 0)
+        dataSize = 0;
+    vector<unsigned char> vchData;
+    vchData.resize(dataSize);
+    uint256 hashIn;
+
+    // read data and checksum from file
+    try {
+        filein.read((char *)&vchData[0], dataSize);
+        filein >> hashIn;
+    }
+    catch (std::exception &e) {
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return HashReadError;
+    }
+    filein.fclose();
+
+    CDataStream ssObj(vchData, SER_DISK, CLIENT_VERSION);
+
+    // verify stored checksum matches input data
+    uint256 hashTmp = Hash(ssObj.begin(), ssObj.end());
+    if (hashIn != hashTmp)
+    {
+        error("%s : Checksum mismatch, data corrupted", __func__);
+        return IncorrectHash;
+    }
+
+   
+    unsigned char pchMsgTmp[4];
+    std::string strMagicMessageTmp;
+    try {
+        // de-serialize file header (masternode cache file specific magic message) and ..
+        ssObj >> strMagicMessageTmp;
+
+        // ... verify the message matches predefined one
+        if (strMagicMessage != strMagicMessageTmp)
+        {
+            error("%s : Invalid masternode cache magic message", __func__);
+            return IncorrectMagicMessage;
+        }
+
+
+        // de-serialize file header (network specific magic number) and ..
+        ssObj >> FLATDATA(pchMsgTmp);
+
+        // ... verify the network matches ours
+        if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
+        {
+            error("%s : Invalid network magic number", __func__);
+            return IncorrectMagicNumber;
+        }
+
+        // de-serialize data into CCoinbasePayee object
+        ssObj >> objToLoad;
+    }
+    catch (std::exception &e) {
+        objToLoad.Clear();
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return IncorrectFormat;
+    }
+
+
+    objToLoad.CleanUp(); // clean out expired
+    LogPrintf("Loaded info from coinbase-payee.dat  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("  %s\n", objToLoad.ToString());
+
+    return Ok;
+}
+
+void DumpCoinbasePayees()
+{
+    int64_t nStart = GetTimeMillis();
+
+    CCoinbasePayeeDB mndb;
+    CCoinbasePayee temp;
+
+    LogPrintf("Verifying coinbase-payee.dat format...\n");
+    CCoinbasePayeeDB::ReadResult readResult = mndb.Read(temp);
+    // there was an error and it was not an error on file openning => do not proceed
+    if (readResult == CCoinbasePayeeDB::FileError)
+        LogPrintf("Missing payees cache file - coinbase-payee.dat, will try to recreate\n");
+    else if (readResult != CCoinbasePayeeDB::Ok)
+    {
+        LogPrintf("Error reading coinbase-payee.dat: ");
+        if(readResult == CCoinbasePayeeDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+        {
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+            return;
+        }
+    }
+    LogPrintf("Writting info to coinbase-payee.dat...\n");
+    mndb.Write(coinbasePayee);
+
+    LogPrintf("Coinbase payee dump finished  %dms\n", GetTimeMillis() - nStart);
+}
+
+void CCoinbasePayee::BuildIndex()
+{
+    if(mapPaidTime.size() > 0) {
+        LogPrintf("CCoinbasePayee::BuildIndex - coinbase cache exists, skipping BuildIndex\n");
+        return;
+    }
+
+    //scan last 30 days worth of blocks (from oldest to newest in that order), run processBlockCoinbaseTX for each
+}
+
+void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime)
+{
+    if (!txCoinbase.IsCoinBase()){
+        LogPrintf("ERROR: CCoinbasePayee::ProcessBlockCoinbaseTX - tx is not coinbase\n");
+        return;
+    }
+
+    BOOST_FOREACH(CTxOut out, txCoinbase.vout){
+        uint256 h = GetScriptHash(out.scriptPubKey);
+        mapPaidTime[h] = nTime;
+    }
+}
+
+int64_t CCoinbasePayee::GetLastPaid(CScript& pubkey) 
+{
+    uint256 h = GetScriptHash(pubkey);
+
+    if(mapPaidTime.count(h)){
+        return mapPaidTime[h];
+    }
+
+    return 0;
+}
+
+void CCoinbasePayee::CleanUp()
+{
+    std::map<uint256, int64_t>::iterator it = mapPaidTime.begin();
+    while(it != mapPaidTime.end())
+    {
+        //keep 30 days of history
+        if((*it).second < GetAdjustedTime() - (60*60*24*30)) {
+            mapPaidTime.erase(it++);
+        } else {
+            ++it;
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/coinbase-payee.h b/src/coinbase-payee.h
new file mode 100644
index 000000000000..6ed9169e446e
--- /dev/null
+++ b/src/coinbase-payee.h
@@ -0,0 +1,96 @@
+// Copyright (c) 2014-2015 The Dash developers
+
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#ifndef MASTERNODE_LASTPAID_H
+#define MASTERNODE_LASTPAID_H
+
+#include "main.h"
+#include "sync.h"
+#include "net.h"
+#include "key.h"
+#include "util.h"
+#include "base58.h"
+#include <boost/lexical_cast.hpp>
+
+using namespace std;
+
+class CCoinbasePayee;
+
+extern CCoinbasePayee coinbasePayee;
+
+void DumpCoinbasePayees();
+
+/** Save Budget Manager (coinbase-payee.dat)
+ */
+class CCoinbasePayeeDB
+{
+private:
+    boost::filesystem::path pathDB;
+    std::string strMagicMessage;
+public:
+    enum ReadResult {
+        Ok,
+        FileError,
+        HashReadError,
+        IncorrectHash,
+        IncorrectMagicMessage,
+        IncorrectMagicNumber,
+        IncorrectFormat
+    };
+
+    CCoinbasePayeeDB();
+    bool Write(const CCoinbasePayee &objToSave);
+    ReadResult Read(CCoinbasePayee& objToLoad);
+};
+
+
+//
+// Coinbase Payee : Keep track of the last time addresses were paid up to a few weeks (used for masternode payments)
+//
+class CCoinbasePayee
+{
+private:
+    // critical section to protect the inner data structures
+    mutable CCriticalSection cs;
+
+    uint256 GetScriptHash(CScript& pubkey){
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << pubkey;
+        uint256 h1 = ss.GetHash();        
+        return h1;
+    }
+
+
+public:
+    map<uint256, int64_t> mapPaidTime;
+    
+    CCoinbasePayee() {
+        mapPaidTime.clear();
+    }
+
+    void BuildIndex();
+    void ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime);
+    int64_t GetLastPaid(CScript& pubkey);
+    void CleanUp();
+
+    void Clear(){
+        LogPrintf("CoinbasePayee object cleared\n");
+        mapPaidTime.clear();
+    }
+    std::string ToString() {
+        std::string strMessage = boost::lexical_cast<std::string>((int)mapPaidTime.size()) + " objects";
+
+        return strMessage;
+    }
+
+    ADD_SERIALIZE_METHODS;
+
+    //for saving to the serialized db
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(mapPaidTime);
+    }
+};
+
+#endif
diff --git a/src/init.cpp b/src/init.cpp
index a5882e001b43..e885dd275564 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -13,6 +13,7 @@
 #include "addrman.h"
 #include "amount.h"
 #include "checkpoints.h"
+#include "coinbase-payee.h"
 #include "compat/sanity.h"
 #include "key.h"
 #include "main.h"
@@ -170,6 +171,7 @@ void PrepareShutdown()
     StopNode();
     DumpMasternodes();
     DumpBudgets();
+    DumpCoinbasePayees();
     UnregisterNodeSignals(GetNodeSignals());
 
     if (fFeeEstimatesInitialized)
@@ -1432,6 +1434,20 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
+    CCoinbasePayeeDB payeedb;
+    CCoinbasePayeeDB::ReadResult readResult3 = payeedb.Read(coinbasePayee);
+    
+    if (readResult3 == CCoinbasePayeeDB::FileError)
+        LogPrintf("Missing payee cache - coinbase-payee.dat, will try to recreate\n");
+    else if (readResult3 != CCoinbasePayeeDB::Ok)
+    {
+        LogPrintf("Error reading coinbase-payee.dat: ");
+        if(readResult3 == CCoinbasePayeeDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+    }
+
 
     fMasterNode = GetBoolArg("-masternode", false);
     if(fMasterNode) {
@@ -1537,6 +1553,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     */
 
     darkSendPool.InitCollateralAddress();
+    coinbasePayee.BuildIndex();
 
     threadGroup.create_thread(boost::bind(&ThreadCheckDarkSendPool));
 
diff --git a/src/main.cpp b/src/main.cpp
index 2507a7ff2115..8e72badcce10 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,6 +11,7 @@
 #include "chainparams.h"
 #include "checkpoints.h"
 #include "checkqueue.h"
+#include "coinbase-payee.h"
 #include "init.h"
 #include "instantx.h"
 #include "darksend.h"
@@ -3235,16 +3236,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
             CScript payee;
             CTxIn vin;
-
-            if(masternodePayments.GetBlockPayee(chainActive.Tip()->nHeight+1, payee)){
-                //UPDATE MASTERNODE LAST PAID TIME
-                CMasternode* pmn = mnodeman.Find(payee);
-                if(pmn != NULL) {
-                    pmn->nLastPaid = chainActive.Tip()->nTime; 
-                }
-                LogPrintf("%s : Update Masternode Last Paid Time - %d\n", __func__, chainActive.Tip()->nHeight);
-            }
-
+            coinbasePayee.ProcessBlockCoinbaseTX(pblock->vtx[0], pblock->nTime);
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             mnscan.DoMasternodePOSChecks();
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index dc1cd6274011..f95f6c1ccee7 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -98,17 +98,17 @@ CBudgetDB::CBudgetDB()
     strMagicMessage = "MasternodeBudget";
 }
 
-bool CBudgetDB::Write(const CBudgetManager& budgetToSave)
+bool CBudgetDB::Write(const CBudgetManager& objToSave)
 {
     int64_t nStart = GetTimeMillis();
 
     // serialize, checksum data up to that point, then append checksum
-    CDataStream ssBudget(SER_DISK, CLIENT_VERSION);
-    ssBudget << strMagicMessage; // masternode cache file specific magic message
-    ssBudget << FLATDATA(Params().MessageStart()); // network specific magic number
-    ssBudget << budgetToSave;
-    uint256 hash = Hash(ssBudget.begin(), ssBudget.end());
-    ssBudget << hash;
+    CDataStream ssObj(SER_DISK, CLIENT_VERSION);
+    ssObj << strMagicMessage; // masternode cache file specific magic message
+    ssObj << FLATDATA(Params().MessageStart()); // network specific magic number
+    ssObj << objToSave;
+    uint256 hash = Hash(ssObj.begin(), ssObj.end());
+    ssObj << hash;
 
     // open output file, and associate with CAutoFile
     FILE *file = fopen(pathDB.string().c_str(), "wb");
@@ -118,21 +118,19 @@ bool CBudgetDB::Write(const CBudgetManager& budgetToSave)
 
     // Write and commit header, data
     try {
-        fileout << ssBudget;
+        fileout << ssObj;
     }
     catch (std::exception &e) {
         return error("%s : Serialize or I/O error - %s", __func__, e.what());
     }
-//    FileCommit(fileout);
     fileout.fclose();
 
     LogPrintf("Written info to budget.dat  %dms\n", GetTimeMillis() - nStart);
-    //LogPrintf("  %s\n", budgetToSave.ToString().c_str());
 
     return true;
 }
 
-CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
+CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad)
 {
 
     int64_t nStart = GetTimeMillis();
@@ -166,10 +164,10 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
     }
     filein.fclose();
 
-    CDataStream ssBudget(vchData, SER_DISK, CLIENT_VERSION);
+    CDataStream ssObj(vchData, SER_DISK, CLIENT_VERSION);
 
     // verify stored checksum matches input data
-    uint256 hashTmp = Hash(ssBudget.begin(), ssBudget.end());
+    uint256 hashTmp = Hash(ssObj.begin(), ssObj.end());
     if (hashIn != hashTmp)
     {
         error("%s : Checksum mismatch, data corrupted", __func__);
@@ -181,7 +179,7 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
     std::string strMagicMessageTmp;
     try {
         // de-serialize file header (masternode cache file specific magic message) and ..
-        ssBudget >> strMagicMessageTmp;
+        ssObj >> strMagicMessageTmp;
 
         // ... verify the message matches predefined one
         if (strMagicMessage != strMagicMessageTmp)
@@ -192,7 +190,7 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
 
 
         // de-serialize file header (network specific magic number) and ..
-        ssBudget >> FLATDATA(pchMsgTmp);
+        ssObj >> FLATDATA(pchMsgTmp);
 
         // ... verify the network matches ours
         if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
@@ -202,18 +200,18 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& budgetToLoad)
         }
 
         // de-serialize data into CBudgetManager object
-        ssBudget >> budgetToLoad;
+        ssObj >> objToLoad;
     }
     catch (std::exception &e) {
-        budgetToLoad.Clear();
+        objToLoad.Clear();
         error("%s : Deserialize or I/O error - %s", __func__, e.what());
         return IncorrectFormat;
     }
 
 
-    budgetToLoad.CheckAndRemove(); // clean out expired
+    objToLoad.CheckAndRemove(); // clean out expired
     LogPrintf("Loaded info from budget.dat  %dms\n", GetTimeMillis() - nStart);
-    LogPrintf("  %s\n", budgetToLoad.ToString());
+    LogPrintf("  %s\n", objToLoad.ToString());
 
     return Ok;
 }
@@ -244,7 +242,7 @@ void DumpBudgets()
     LogPrintf("Writting info to budget.dat...\n");
     mndb.Write(budget);
 
-    LogPrintf("Masternode dump finished  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("Budget dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
 void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 69ec1b2cd4e8..b588ed91ef72 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -62,8 +62,8 @@ class CBudgetDB
     };
 
     CBudgetDB();
-    bool Write(const CBudgetManager &budgetToSave);
-    ReadResult Read(CBudgetManager& budgetToLoad);
+    bool Write(const CBudgetManager &objToSave);
+    ReadResult Read(CBudgetManager& objToLoad);
 };
 
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 0f1462d47196..bffa3a36dffb 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -243,7 +243,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
         if(h == nNotBlockHeight) continue;
         if(mapMasternodeBlocks.count(h)){
             if(mapMasternodeBlocks[h].GetPayee(payee)){
-                if(mnpayee == payee || mn.donationAddress == payee) {
+                if(mnpayee == payee) {
                     return true;
                 }
             }
@@ -449,7 +449,6 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         //is budget payment block -- handled by the budgeting software
     } else {
-        CScript payeeSource;
         uint256 hash;
 
         if(!GetBlockHash(hash, nBlockHeight-100)) return false;
@@ -466,25 +465,14 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
             newWinner.nBlockHeight = nBlockHeight;
 
-            CScript payee;
-            if(pmn->donationPercentage > 0 && (nHash % 100) <= (unsigned int)pmn->donationPercentage) {
-                payee = pmn->donationAddress;
-            } else {
-                payee = GetScriptForDestination(pmn->pubkey.GetID());
-            }
-            
-            payeeSource = GetScriptForDestination(pmn->pubkey.GetID());
+            CScript payee = GetScriptForDestination(pmn->pubkey.GetID());
             newWinner.AddPayee(payee, masternodePayment);
             
             CTxDestination address1;
             ExtractDestination(payee, address1);
             CBitcoinAddress address2(address1);
 
-            CTxDestination address3;
-            ExtractDestination(payeeSource, address3);
-            CBitcoinAddress address4(address3);
-
-            LogPrintf("CMasternodePayments::ProcessBlock() Winner payee %s nHeight %d vin source %s. \n", address2.ToString().c_str(), newWinner.nBlockHeight, address4.ToString().c_str());
+            LogPrintf("CMasternodePayments::ProcessBlock() Winner payee %s nHeight %d. \n", address2.ToString().c_str(), newWinner.nBlockHeight);
         } else {
             LogPrintf("CMasternodePayments::ProcessBlock() Failed to find masternode to pay\n");
         }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index b45314735cd7..8b667777ca6c 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -4,6 +4,7 @@
 
 #include "masternode.h"
 #include "masternodeman.h"
+#include "coinbase-payee.h"
 #include "darksend.h"
 #include "util.h"
 #include "sync.h"
@@ -80,12 +81,9 @@ CMasternode::CMasternode()
     allowFreeTx = true;
     protocolVersion = MIN_PEER_PROTO_VERSION;
     nLastDsq = 0;
-    donationAddress = CScript();
-    donationPercentage = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
     nVotedTimes = 0;
-    nLastPaid = 0;
 }
 
 CMasternode::CMasternode(const CMasternode& other)
@@ -106,15 +104,12 @@ CMasternode::CMasternode(const CMasternode& other)
     allowFreeTx = other.allowFreeTx;
     protocolVersion = other.protocolVersion;
     nLastDsq = other.nLastDsq;
-    donationAddress = other.donationAddress;
-    donationPercentage = other.donationPercentage;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
-    nLastPaid = other.nLastPaid;
     nVotedTimes = other.nVotedTimes;
 }
 
-CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
+CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn)
 {
     LOCK(cs);
     vin = newVin;
@@ -132,11 +127,8 @@ CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std:
     allowFreeTx = true;
     protocolVersion = protocolVersionIn;
     nLastDsq = 0;
-    donationAddress = newDonationAddress;
-    donationPercentage = newDonationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = 0;    
     nVotedTimes = 0;
 }
 
@@ -158,11 +150,8 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     allowFreeTx = true;
     protocolVersion = mnb.protocolVersion;
     nLastDsq = 0;
-    donationAddress = mnb.donationAddress;
-    donationPercentage = mnb.donationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = 0;
     nVotedTimes = 0;
 }
 
@@ -176,8 +165,6 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     sig = mnb.sig;
     protocolVersion = mnb.protocolVersion;
     addr = mnb.addr;
-    donationAddress = mnb.donationAddress;
-    donationPercentage = mnb.donationPercentage;
 }
 
 //
@@ -245,7 +232,10 @@ void CMasternode::Check()
 }
 
 int64_t CMasternode::SecondsSincePayment() {
-    int64_t sec = (GetAdjustedTime() - nLastPaid);
+    CScript pubkeyScript;
+    pubkeyScript = GetScriptForDestination(pubkey.GetID());
+
+    int64_t sec = (GetAdjustedTime() - coinbasePayee.GetLastPaid(pubkeyScript));
     int64_t month = 60*60*24*30;
     if(sec < month) return sec; //if it's less than 30 days, give seconds
 
@@ -258,6 +248,13 @@ int64_t CMasternode::SecondsSincePayment() {
     return month + hash.GetCompact(false);
 }
 
+int64_t CMasternode::GetLastPaid() {
+    CScript pubkeyScript;
+    pubkeyScript = GetScriptForDestination(pubkey.GetID());
+
+    return coinbasePayee.GetLastPaid(pubkeyScript);
+}
+
 CMasternodeBroadcast::CMasternodeBroadcast()
 {
     vin = CTxIn();
@@ -274,15 +271,11 @@ CMasternodeBroadcast::CMasternodeBroadcast()
     unitTest = false;
     allowFreeTx = true;
     protocolVersion = MIN_PEER_PROTO_VERSION;
-    nLastDsq = 0;
-    donationAddress = CScript();
-    donationPercentage = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = 0;
 }
 
-CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage)
+CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn)
 {
     vin = newVin;
     addr = newAddr;
@@ -299,11 +292,8 @@ CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubK
     allowFreeTx = true;
     protocolVersion = protocolVersionIn;
     nLastDsq = 0;
-    donationAddress = newDonationAddress;
-    donationPercentage = newDonationPercentage;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nLastPaid = 0;  
 }
 
 CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
@@ -323,11 +313,8 @@ CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
     allowFreeTx = other.allowFreeTx;
     protocolVersion = other.protocolVersion;
     nLastDsq = other.nLastDsq;
-    donationAddress = other.donationAddress;
-    donationPercentage = other.donationPercentage;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
-    nLastPaid = other.nLastPaid;
 }
 
 bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
@@ -340,12 +327,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
 
     std::string vchPubKey(pubkey.begin(), pubkey.end());
     std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
-    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion)  + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
-
-    if(donationPercentage < 0 || donationPercentage > 100){
-        LogPrintf("dsee - donation percentage out of range %d\n", donationPercentage);
-        return false;
-    }
+    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
     if(protocolVersion < nMasternodeMinProtocol) {
         LogPrintf("dsee - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
@@ -449,12 +431,6 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
             }
         }
 
-        //doesn't support multisig addresses
-        if(donationAddress.IsPayToScriptHash()){
-            donationAddress = CScript();
-            donationPercentage = 0;
-        }
-
         // add our Masternode
         CMasternode mn((*this));
         mn.UpdateLastSeen(lastTimeSeen);
@@ -500,7 +476,7 @@ bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
 
     sigTime = GetAdjustedTime();
 
-    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion) + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
+    std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, sig, keyCollateralAddress)) {
         LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage.c_str());
diff --git a/src/masternode.h b/src/masternode.h
index abc0ba92e3b5..863824469238 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -75,17 +75,14 @@ class CMasternode
     bool allowFreeTx;
     int protocolVersion;
     int64_t nLastDsq; //the dsq count from the last dsq broadcast of this node
-    CScript donationAddress;
-    int donationPercentage;
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
-    int64_t nLastPaid;
     int nVotedTimes;
 
     CMasternode();
     CMasternode(const CMasternode& other);
     CMasternode(const CMasternodeBroadcast& other);
-    CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage);
+    CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn);
 
 
     void swap(CMasternode& first, CMasternode& second) // nothrow
@@ -110,11 +107,8 @@ class CMasternode
         swap(first.allowFreeTx, second.allowFreeTx);
         swap(first.protocolVersion, second.protocolVersion);
         swap(first.nLastDsq, second.nLastDsq);
-        swap(first.donationAddress, second.donationAddress);
-        swap(first.donationPercentage, second.donationPercentage);
         swap(first.nScanningErrorCount, second.nScanningErrorCount);
         swap(first.nLastScanningErrorBlockHeight, second.nLastScanningErrorBlockHeight);
-        swap(first.nLastPaid, second.nLastPaid);
         swap(first.nVotedTimes, second.nVotedTimes);
     }
 
@@ -148,9 +142,6 @@ class CMasternode
             READWRITE(sigTime);
             READWRITE(lastTimeSeen);
             READWRITE(protocolVersion);
-            READWRITE(donationAddress);
-            READWRITE(donationPercentage);
-            READWRITE(nLastPaid);
             READWRITE(activeState);
             READWRITE(lastMnping);
             READWRITE(cacheInputAge);
@@ -242,6 +233,8 @@ class CMasternode
         return strStatus;
     }
 
+    int64_t GetLastPaid();
+
 };
 
 
@@ -253,7 +246,7 @@ class CMasternodeBroadcast : public CMasternode
 {
 public:
     CMasternodeBroadcast();
-    CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn, CScript newDonationAddress, int newDonationPercentage);
+    CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn);
     CMasternodeBroadcast(const CMasternode& other);
 
     bool CheckAndUpdate(int& nDoS, bool fRequested);
@@ -273,8 +266,6 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(sigTime);
         READWRITE(lastTimeSeen);
         READWRITE(protocolVersion);
-        READWRITE(donationAddress);
-        READWRITE(donationPercentage);
     }
     
     uint256 GetHash(){
diff --git a/src/masternodeconfig.cpp b/src/masternodeconfig.cpp
index a9432ee985c6..5d758b6cc91f 100644
--- a/src/masternodeconfig.cpp
+++ b/src/masternodeconfig.cpp
@@ -6,8 +6,8 @@
 
 CMasternodeConfig masternodeConfig;
 
-void CMasternodeConfig::add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex, std::string donationAddress, std::string donationPercent) {
-    CMasternodeEntry cme(alias, ip, privKey, txHash, outputIndex, donationAddress, donationPercent);
+void CMasternodeConfig::add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex) {
+    CMasternodeEntry cme(alias, ip, privKey, txHash, outputIndex);
     entries.push_back(cme);
 }
 
@@ -23,10 +23,8 @@ bool CMasternodeConfig::read(std::string& strErr) {
             continue;
         }
         std::istringstream iss(line);
-        std::string alias, ip, privKey, txHash, outputIndex, donation, donationAddress, donationPercent;
-        if (!(iss >> alias >> ip >> privKey >> txHash >> outputIndex >> donation)) {
-            donationAddress = "";
-            donationPercent = "";
+        std::string alias, ip, privKey, txHash, outputIndex;
+        if (!(iss >> alias >> ip >> privKey >> txHash >> outputIndex)) {
             iss.str(line);
             iss.clear();
             if (!(iss >> alias >> ip >> privKey >> txHash >> outputIndex)) {
@@ -34,21 +32,6 @@ bool CMasternodeConfig::read(std::string& strErr) {
                 streamConfig.close();
                 return false;
             }
-        } else {
-            size_t pos = donation.find_first_of(":");
-            if(pos == std::string::npos) { // no ":" found
-                donationPercent = "100";
-                donationAddress = donation;
-            } else {
-                donationPercent = donation.substr(pos + 1);
-                donationAddress = donation.substr(0, pos);
-            }
-            CBitcoinAddress address(donationAddress);
-            if (!address.IsValid()) {
-                strErr = "Invalid Dash address in masternode.conf line: " + line;
-                streamConfig.close();
-                return false;
-            }
         }
 
         if(Params().NetworkID() == CBaseChainParams::MAIN) {
@@ -64,7 +47,7 @@ bool CMasternodeConfig::read(std::string& strErr) {
         }
 
 
-        add(alias, ip, privKey, txHash, outputIndex, donationAddress, donationPercent);
+        add(alias, ip, privKey, txHash, outputIndex);
     }
 
     streamConfig.close();
diff --git a/src/masternodeconfig.h b/src/masternodeconfig.h
index 6102865640ea..a8d19b931dc7 100644
--- a/src/masternodeconfig.h
+++ b/src/masternodeconfig.h
@@ -28,18 +28,14 @@ class CMasternodeConfig
         std::string privKey;
         std::string txHash;
         std::string outputIndex;
-        std::string donationAddress;
-        std::string donationPercent;
     public:
 
-        CMasternodeEntry(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex, std::string donationAddress, std::string donationPercent) {
+        CMasternodeEntry(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex) {
             this->alias = alias;
             this->ip = ip;
             this->privKey = privKey;
             this->txHash = txHash;
             this->outputIndex = outputIndex;
-            this->donationAddress = donationAddress;
-            this->donationPercent = donationPercent;
         }
 
         const std::string& getAlias() const {
@@ -81,14 +77,6 @@ class CMasternodeConfig
         void setIp(const std::string& ip) {
             this->ip = ip;
         }
-
-        const std::string& getDonationAddress() const {
-            return donationAddress;
-        }
-
-        const std::string& getDonationPercentage() const {
-            return donationPercent;
-        }
     };
 
     CMasternodeConfig() {
@@ -97,7 +85,7 @@ class CMasternodeConfig
 
     void clear();
     bool read(std::string& strErr);
-    void add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex, std::string donationAddress, std::string donationPercent);
+    void add(std::string alias, std::string ip, std::string privKey, std::string txHash, std::string outputIndex);
 
     std::vector<CMasternodeEntry>& getEntries() {
         return entries;
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 15e2b582249f..37553f100f8b 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -250,10 +250,7 @@ Value masternode(const Array& params, bool fHelp)
     			found = true;
     			std::string errorMessage;
 
-                std::string strDonateAddress = mne.getDonationAddress();
-                std::string strDonationPercentage = mne.getDonationPercentage();
-
-    			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), strDonateAddress, strDonationPercentage, errorMessage);
+    			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
 
     			statusObj.push_back(Pair("result", result ? "successful" : "failed"));
     			if(!result) {
@@ -305,10 +302,7 @@ Value masternode(const Array& params, bool fHelp)
 
 			std::string errorMessage;
 
-            std::string strDonateAddress = mne.getDonationAddress();
-            std::string strDonationPercentage = mne.getDonationPercentage();
-
-			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), strDonateAddress, strDonationPercentage, errorMessage);
+			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
 
 			Object statusObj;
 			statusObj.push_back(Pair("alias", mne.getAlias()));
@@ -440,8 +434,6 @@ Value masternode(const Array& params, bool fHelp)
             mnObj.push_back(Pair("privateKey", mne.getPrivKey()));
             mnObj.push_back(Pair("txHash", mne.getTxHash()));
             mnObj.push_back(Pair("outputIndex", mne.getOutputIndex()));
-            mnObj.push_back(Pair("donationAddress", mne.getDonationAddress()));
-            mnObj.push_back(Pair("donationPercent", mne.getDonationPercentage()));
             resultObj.push_back(Pair("masternode", mnObj));
         }
 
@@ -474,7 +466,7 @@ Value masternodelist(const Array& params, bool fHelp)
 
     if (fHelp ||
             (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank" && strMode != "addr"
-                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "donation" && strMode != "pose" && strMode != "lastpaid"))
+                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "pose" && strMode != "lastpaid"))
     {
         throw runtime_error(
                 "masternodelist ( \"mode\" \"filter\" )\n"
@@ -485,7 +477,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 "                                    additional matches in some modes are also available\n"
                 "\nAvailable modes:\n"
                 "  activeseconds  - Print number of seconds masternode recognized by the network as enabled\n"
-                "  donation       - Show donation settings\n"
                 "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds'\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
@@ -516,22 +507,6 @@ Value masternodelist(const Array& params, bool fHelp)
             if (strMode == "activeseconds") {
                 if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       (int64_t)(mn.lastTimeSeen - mn.sigTime)));
-            } else if (strMode == "donation") {
-                CTxDestination address1;
-                ExtractDestination(mn.donationAddress, address1);
-                CBitcoinAddress address2(address1);
-
-                if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
-                    strVin.find(strFilter) == string::npos) continue;
-
-                std::string strOut = "";
-
-                if(mn.donationPercentage != 0){
-                    strOut = address2.ToString().c_str();
-                    strOut += ":";
-                    strOut += boost::lexical_cast<std::string>(mn.donationPercentage);
-                }
-                obj.push_back(Pair(strVin,       strOut.c_str()));
             } else if (strMode == "full") {
                 CScript pubkey;
                 pubkey = GetScriptForDestination(mn.pubkey.GetID());
@@ -550,7 +525,7 @@ Value masternodelist(const Array& params, bool fHelp)
                                mn.addr.ToString() << " " <<
                                mn.lastTimeSeen << " " << setw(8) <<
                                (mn.lastTimeSeen - mn.sigTime) << " " <<
-                               mn.nLastPaid;
+                               mn.GetLastPaid();
                 std::string output = stringStream.str();
                 stringStream << " " << strVin;
                 if(strFilter !="" && stringStream.str().find(strFilter) == string::npos &&
@@ -588,7 +563,7 @@ Value masternodelist(const Array& params, bool fHelp)
             } else if(strMode == "lastpaid"){
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,      (int64_t)mn.nLastPaid));
+                obj.push_back(Pair(strVin,      (int64_t)mn.GetLastPaid()));
             }
         }
     }

From 3eeb33e5771796e7dce2d0501b594c8fa72c3d40 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 23 Jun 2015 10:53:22 -0700
Subject: [PATCH 1444/1819] version / proto bump

---
 configure.ac         | 2 +-
 src/clientversion.h  | 2 +-
 src/instantx.h       | 2 +-
 src/masternode-pos.h | 2 +-
 src/version.h        | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index d23a0c3add97..9e7c85bc19be 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 3)
+define(_CLIENT_VERSION_BUILD, 4)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 692d62fd9418..a1049c0698b0 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 3
+#define CLIENT_VERSION_BUILD 4
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 91f432bed662..acd2f3346673 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70079;
+static const int MIN_INSTANTX_PROTO_VERSION = 70080;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/masternode-pos.h b/src/masternode-pos.h
index fc5ee9d0c5e2..9707c01431a3 100644
--- a/src/masternode-pos.h
+++ b/src/masternode-pos.h
@@ -22,7 +22,7 @@ class CMasternodeScanningError;
 extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
 extern CMasternodeScanning mnscan;
 
-static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70079;
+static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70080;
 
 /*
 	1% of the network is scanned every 2.5 minutes, making a full
diff --git a/src/version.h b/src/version.h
index e9df7b7851d7..482241a8984c 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70079;
+static const int PROTOCOL_VERSION = 70080;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70079;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70080;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 3c01ffa4446bfaad45e7372bf734276a584cf204 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 23 Jun 2015 10:59:14 -0700
Subject: [PATCH 1445/1819] fixed errors from merge

---
 src/masternode.cpp | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 83ad1cd70370..9969b323d1b8 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -329,11 +329,6 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
     std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
     std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
-    if(donationPercentage < 0 || donationPercentage > 100){
-        LogPrintf("mnb - donation percentage out of range %d\n", donationPercentage);
-        return false;
-    }
-
     if(protocolVersion < nMasternodeMinProtocol) {
         LogPrintf("mnb - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
         return false;

From 4afaa1d8cf5e3cd43ea36ebb049497633447b314 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Tue, 23 Jun 2015 12:08:11 -0700
Subject: [PATCH 1446/1819] Scan blocks if coinpayee cache is not present

---
 src/coinbase-payee.cpp | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 4c9445c3e275..5e6fe7393286 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -98,7 +98,7 @@ CCoinbasePayeeDB::ReadResult CCoinbasePayeeDB::Read(CCoinbasePayee& objToLoad)
         return IncorrectHash;
     }
 
-   
+
     unsigned char pchMsgTmp[4];
     std::string strMagicMessageTmp;
     try {
@@ -176,7 +176,26 @@ void CCoinbasePayee::BuildIndex()
         return;
     }
 
-    //scan last 30 days worth of blocks (from oldest to newest in that order), run processBlockCoinbaseTX for each
+    //scan last 30 days worth of blocks, run processBlockCoinbaseTX for each
+
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    int count = 0;
+
+    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
+        count++;
+        if(count > 18000) return;
+
+        CBlock block;
+        if (ReadBlockFromDisk(block, pindexPrev)) {
+            printf("scan block\n");
+            ProcessBlockCoinbaseTX(block.vtx[0], block.nTime);
+        }
+
+        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
+        pindexPrev = pindexPrev->pprev;
+    }
+
+    return;
 }
 
 void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime)
@@ -188,11 +207,17 @@ void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nT
 
     BOOST_FOREACH(CTxOut out, txCoinbase.vout){
         uint256 h = GetScriptHash(out.scriptPubKey);
-        mapPaidTime[h] = nTime;
+        if(mapPaidTime.count(h)){
+            if(mapPaidTime[h] < nTime) {
+                mapPaidTime[h] = nTime;
+            }
+        } else {
+            mapPaidTime[h] = nTime;
+        }
     }
 }
 
-int64_t CCoinbasePayee::GetLastPaid(CScript& pubkey) 
+int64_t CCoinbasePayee::GetLastPaid(CScript& pubkey)
 {
     uint256 h = GetScriptHash(pubkey);
 

From 69552ea0875be62e4b323ef13685b536c69ee1d8 Mon Sep 17 00:00:00 2001
From: Holger Schinzel <holger.schinzel@gmx.de>
Date: Tue, 23 Jun 2015 22:10:56 +0200
Subject: [PATCH 1447/1819] added gitian builds for Raspberry Pi

---
 contrib/gitian-descriptors/gitian-rpi2.yml | 112 +++++++++++++++++++++
 1 file changed, 112 insertions(+)
 create mode 100644 contrib/gitian-descriptors/gitian-rpi2.yml

diff --git a/contrib/gitian-descriptors/gitian-rpi2.yml b/contrib/gitian-descriptors/gitian-rpi2.yml
new file mode 100644
index 000000000000..6bf051f8c21f
--- /dev/null
+++ b/contrib/gitian-descriptors/gitian-rpi2.yml
@@ -0,0 +1,112 @@
+---
+name: "dash-raspberry-0.12"
+enable_cache: true
+suites:
+- "precise"
+architectures:
+- "amd64"
+packages:
+- "g++-multilib"
+- "git-core"
+- "pkg-config"
+- "autoconf2.13"
+- "libtool"
+- "automake"
+- "faketime"
+- "bsdmainutils"
+- "binutils-gold"
+reference_datetime: "2014-01-10 00:00:00"
+remotes:
+- "url": "https://github.com/dashpay/dash.git"
+  "dir": "dash"
+files:
+- "raspberrypi-tools.tar.gz"
+script: |
+  WRAP_DIR=$HOME/wrapped
+  HOSTS="arm-linux-gnueabihf"
+  CONFIGFLAGS="--enable-upnp-default --enable-glibc-back-compat"
+  FAKETIME_HOST_PROGS=""
+  FAKETIME_PROGS="date ar ranlib nm strip"
+  
+  tar --warning=no-timestamp -xzf raspberrypi-tools.tar.gz
+  export TOOLCHAIN_BIN=$(pwd)/raspberrypi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
+  export PATH=$PATH:$TOOLCHAIN_BIN
+
+  export QT_RCC_TEST=1
+  export GZIP="-9n"
+  export TAR_OPTIONS="--mtime="$REFERENCE_DATE\\\ $REFERENCE_TIME""
+  export TZ="UTC"
+  export BUILD_DIR=`pwd`
+  mkdir -p ${WRAP_DIR}
+  if test -n "$GBUILD_CACHE_ENABLED"; then
+    export SOURCES_PATH=${GBUILD_COMMON_CACHE}
+    export BASE_CACHE=${GBUILD_PACKAGE_CACHE}
+    mkdir -p ${BASE_CACHE} ${SOURCES_PATH}
+  fi
+
+  # Create global faketime wrappers
+  for prog in ${FAKETIME_PROGS}; do
+    echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
+    echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
+    echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+    echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
+    echo "\$REAL \$@" >> $WRAP_DIR/${prog}
+    chmod +x ${WRAP_DIR}/${prog}
+  done
+
+  # Create per-host faketime wrappers
+  for i in $HOSTS; do
+    for prog in ${FAKETIME_HOST_PROGS}; do
+        echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+        echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+        echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+        echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+        echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+        chmod +x ${WRAP_DIR}/${i}-${prog}
+    done
+  done
+  export PATH=${WRAP_DIR}:${PATH}
+
+  cd dash
+  BASEPREFIX=`pwd`/depends
+  # Build dependencies for each host
+  for i in $HOSTS; do
+    make ${MAKEOPTS} NO_QT=1 -C ${BASEPREFIX} HOST="${i}"
+  done
+
+  # Create the release tarball using (arbitrarily) the first host
+  ./autogen.sh
+  ./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
+  make NO_QT=1 dist
+  SOURCEDIST=`echo dash-*.tar.gz`
+  DISTNAME=`echo ${SOURCEDIST} | sed 's/.tar.*//'`
+  # Correct tar file order
+  mkdir -p temp
+  pushd temp
+  tar xf ../$SOURCEDIST
+  find dash-* | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
+  popd
+
+  ORIGPATH="$PATH"
+  # Extract the release tarball into a dir for each host and build
+  for i in ${HOSTS}; do
+    export PATH=${BASEPREFIX}/${i}/native/bin:${ORIGPATH}
+    mkdir -p distsrc-${i}
+    cd distsrc-${i}
+    INSTALLPATH=`pwd`/installed/${DISTNAME}
+    mkdir -p ${INSTALLPATH}
+    tar --strip-components=1 -xf ../$SOURCEDIST
+
+    ./configure --prefix=${BASEPREFIX}/${i} --bindir=${INSTALLPATH}/bin --includedir=${INSTALLPATH}/include --libdir=${INSTALLPATH}/lib --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}
+    make ${MAKEOPTS} NO_QT=1
+    make NO_QT=1 install-strip
+    cd installed
+    find . -name "lib*.la" -delete
+    find . -name "lib*.a" -delete
+    rm -rf ${DISTNAME}/lib/pkgconfig
+    find ${DISTNAME} | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
+    cd ../../
+  done
+  mkdir -p $OUTDIR/src
+  mv $SOURCEDIST $OUTDIR/src
+  mv ${OUTDIR}/${DISTNAME}-arm-*.tar.gz ${OUTDIR}/${DISTNAME}-RPi2.tar.gz

From 08a680316584151b2dac3f94d562f181d0225e94 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 23:44:20 +0300
Subject: [PATCH 1448/1819] fixing all kind of typos etc

---
 src/darksend.cpp            | 6 ++++--
 src/init.cpp                | 2 +-
 src/masternode-payments.cpp | 4 ++--
 src/rpcmasternode.cpp       | 2 +-
 src/wallet.cpp              | 2 +-
 5 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 894fe5eb6c10..fa7cb537d601 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -607,7 +607,7 @@ void CDarksendPool::CheckFinalTransaction()
             if(fDebug) LogPrintf("Transaction 2: %s\n", txNew.ToString().c_str());
 
             // See if the transaction is valid
-            if (!txNew.AcceptToMemoryPool(false, true, true));
+            if (!txNew.AcceptToMemoryPool(false, true, true))
             {
                 LogPrintf("CDarksendPool::Check() - CommitTransaction : Error: Transaction not valid\n");
                 SetNull();
@@ -1758,8 +1758,10 @@ bool CDarksendPool::MakeCollateralAmounts()
     // use the same cachedLastSuccess as for DS mixinx to prevent race
     if(pwalletMain->CommitTransaction(wtx, reservekeyChange))
         cachedLastSuccess = chainActive.Tip()->nHeight;
+    else
+        LogPrintf("MakeCollateralAmounts: CommitTransaction failed!\n");
 
-    LogPrintf("MakeCollateralAmounts Success: tx %s\n", wtx.GetHash().GetHex().c_str());
+    LogPrintf("MakeCollateralAmounts: tx %s\n", wtx.GetHash().GetHex());
 
     return true;
 }
diff --git a/src/init.cpp b/src/init.cpp
index 3f1d15de315d..99311f2479fe 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -791,7 +791,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     {
         CAmount nMaxFee = 0;
         if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
-            return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s'"), mapArgs["-maptxfee"]));
+            return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s'"), mapArgs["-maxtxfee"]));
         if (nMaxFee > nHighTransactionMaxFeeWarning)
             InitWarning(_("Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction."));
         maxTxFee = nMaxFee;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index bffa3a36dffb..79c110a53200 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -54,7 +54,7 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
             if(IsSporkActive(SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT)){
                 return false;
             } else {
-                LogPrintf("Budget enforcement is disabled, accepting block");
+                LogPrintf("Budget enforcement is disabled, accepting block\n");
                 return true;
             }
         }
@@ -69,7 +69,7 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
         if(IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)){
             return false;
         } else {
-            LogPrintf("Masternode payment enforcement is disabled, accepting block");
+            LogPrintf("Masternode payment enforcement is disabled, accepting block\n");
             return true;
         }
     }
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 37553f100f8b..3ec6ccd2d254 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -477,7 +477,7 @@ Value masternodelist(const Array& params, bool fHelp)
                 "                                    additional matches in some modes are also available\n"
                 "\nAvailable modes:\n"
                 "  activeseconds  - Print number of seconds masternode recognized by the network as enabled\n"
-                "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds'\n"
+                "  full           - Print info in format 'status protocol pubkey IP lastseen activeseconds lastpaid'\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
                 "  pose           - Print Proof-of-Service score\n"
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3ee169a3c4d9..159e1984e379 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1648,7 +1648,7 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
             {
                 setCoinsRet.insert(vValue[i].second);
                 nValueRet += vValue[i].first;
-                s += FormatMoney(vValue[i].first);
+                s += FormatMoney(vValue[i].first) + " ";
             }
         }
         LogPrintf("%s - total %s\n", s, FormatMoney(nBest));

From f1b868f098503fb4b388aaa1069d3e58f7096a4c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Tue, 23 Jun 2015 16:44:31 -0700
Subject: [PATCH 1449/1819] Removed PoSe due to consensus issues

- With nodes coming and going on the network, the network could come to different opinions about who should get paid next in line due to some nodes being flagged as failing a PoSe check. This will have to be fixed by introducing a blockchain based PoSe system, but that's out of the scope of this release. To fix the issues in the interrim, I'm removing PoSe checks for the time being.
---
 contrib/dash-qt.pro     |   4 +-
 src/Makefile.am         |   2 -
 src/coinbase-payee.cpp  |   1 -
 src/instantx.cpp        |   6 -
 src/main.cpp            |  34 ++----
 src/masternode-budget.h |  51 ++++----
 src/masternode-pos.cpp  | 253 ----------------------------------------
 src/masternode-pos.h    | 115 ------------------
 src/masternode.cpp      |  12 +-
 src/masternode.h        |  21 +---
 src/rpcmasternode.cpp   |   9 +-
 11 files changed, 43 insertions(+), 465 deletions(-)
 delete mode 100644 src/masternode-pos.cpp
 delete mode 100644 src/masternode-pos.h

diff --git a/contrib/dash-qt.pro b/contrib/dash-qt.pro
index 869e97b19892..01aad71ff2fd 100644
--- a/contrib/dash-qt.pro
+++ b/contrib/dash-qt.pro
@@ -3,7 +3,7 @@
 ######################################################################
 
 TEMPLATE = app
-TARGET = 
+TARGET =
 DEPENDPATH += . \
               src \
               src/compat \
@@ -89,7 +89,6 @@ HEADERS += src/activemasternode.h \
            src/limitedmap.h \
            src/main.h \
            src/masternode-payments.h \
-           src/masternode-pos.h \
            src/masternode.h \
            src/masternodeconfig.h \
            src/masternodeman.h \
@@ -385,7 +384,6 @@ SOURCES += src/activemasternode.cpp \
            src/leveldbwrapper.cpp \
            src/main.cpp \
            src/masternode-payments.cpp \
-           src/masternode-pos.cpp \
            src/masternode.cpp \
            src/masternodeconfig.cpp \
            src/masternodeman.cpp \
diff --git a/src/Makefile.am b/src/Makefile.am
index 846beb1038e8..764916d62ca8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -109,7 +109,6 @@ BITCOIN_CORE_H = \
   main.h \
   masternode.h \
   masternode-payments.h \
-  masternode-pos.h \
   masternode-budget.h \
   masternodeman.h \
   masternodeconfig.h \
@@ -286,7 +285,6 @@ libbitcoin_common_a_SOURCES = \
   masternode.cpp \
   masternode-budget.cpp \
   masternode-payments.cpp \
-  masternode-pos.cpp \
   masternodeman.cpp \
   masternodeconfig.cpp \
   instantx.cpp \
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 5e6fe7393286..6292ffe8012a 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -187,7 +187,6 @@ void CCoinbasePayee::BuildIndex()
 
         CBlock block;
         if (ReadBlockFromDisk(block, pindexPrev)) {
-            printf("scan block\n");
             ProcessBlockCoinbaseTX(block.vtx[0], block.nTime);
         }
 
diff --git a/src/instantx.cpp b/src/instantx.cpp
index 95a07b73666a..d5a11dd5a579 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -463,12 +463,6 @@ void CleanTransactionLocksList()
                         fFound = true;
                     }
                 }
-
-                if(!fFound){
-                    //increment a scanning error
-                    CMasternodeScanningError mnse(pmn->vin, SCANNING_ERROR_IX_NO_RESPONSE, it->second.nBlockHeight);
-                    pmn->ApplyScanningError(mnse);
-                }
             }
 
             if(mapTxLockReq.count(it->second.txHash)){
diff --git a/src/main.cpp b/src/main.cpp
index 3498e1ff8d8c..44db0c600302 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -755,7 +755,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
 /**
  * Check transaction inputs to mitigate two
  * potential denial-of-service attacks:
- * 
+ *
  * 1. scriptSigs with extra data stuffed into them,
  *    not consumed by scriptPubKey (or P2SH script)
  * 2. P2SH scripts with a crazy number of expensive
@@ -2304,7 +2304,7 @@ static int64_t nTimeFlush = 0;
 static int64_t nTimeChainState = 0;
 static int64_t nTimePostConnect = 0;
 
-/** 
+/**
  * Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock
  * corresponding to pindexNew, to bypass loading it again from disk.
  */
@@ -2940,7 +2940,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     {
         if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
         {
-            if(Params().NetworkID() != CBaseChainParams::REGTEST) 
+            if(Params().NetworkID() != CBaseChainParams::REGTEST)
                 return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
 
         }
@@ -3017,7 +3017,7 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
         return state.DoS(100, error("%s : forked chain older than last checkpoint (height %d)", __func__, nHeight));
 
     // Reject block.nVersion=1 blocks when 95% (75% on testnet) of the network has upgraded:
-    if (block.nVersion < 2 && 
+    if (block.nVersion < 2 &&
         CBlockIndex::IsSuperMajority(2, pindexPrev, Params().RejectBlockOutdatedMajority()))
     {
         return state.Invalid(error("%s : rejected nVersion=1 block", __func__),
@@ -3046,7 +3046,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
 
     // Enforce block.nVersion=2 rule that the coinbase starts with serialized block height
     // if 750 of the last 1,000 blocks are version 2 or greater (51/100 if testnet):
-    if (block.nVersion >= 2 && 
+    if (block.nVersion >= 2 &&
         CBlockIndex::IsSuperMajority(2, pindexPrev, Params().EnforceBlockUpgradeMajority()))
     {
         CScript expect = CScript() << nHeight;
@@ -3242,7 +3242,6 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
             coinbasePayee.ProcessBlockCoinbaseTX(pblock->vtx[0], pblock->nTime);
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
-            mnscan.DoMasternodePOSChecks();
             budget.NewBlock();
         }
     }
@@ -3265,9 +3264,9 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
     if (!ContextualCheckBlockHeader(block, state, pindexPrev))
         return false;
     if (!CheckBlock(block, state, fCheckPOW, fCheckMerkleRoot))
-        return false;    
+        return false;
     if (!ContextualCheckBlock(block, state, pindexPrev))
-        return false;    
+        return false;
     if (!ConnectBlock(block, state, &indexDummy, viewNew, true))
         return false;
     assert(state.IsValid());
@@ -3943,8 +3942,6 @@ bool static AlreadyHave(const CInv& inv)
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
         return mapMasternodePayeeVotes.count(inv.hash);
-    case MSG_MASTERNODE_SCANNING_ERROR:
-        return mapMasternodeScanningErrors.count(inv.hash);
     case MSG_BUDGET_VOTE:
         return mapSeenMasternodeBudgetVotes.count(inv.hash);
     case MSG_BUDGET_PROPOSAL:
@@ -4116,16 +4113,6 @@ void static ProcessGetData(CNode* pfrom)
                         pushed = true;
                     }
                 }
-                if (!pushed && inv.type == MSG_MASTERNODE_SCANNING_ERROR) {
-                    if(mapMasternodeScanningErrors.count(inv.hash)){
-                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
-                        ss.reserve(1000);
-                        ss << mapMasternodeScanningErrors[inv.hash];
-                        pfrom->PushMessage("mnse", ss);
-                        pushed = true;
-                    }
-                }
-                
                 if (!pushed && inv.type == MSG_BUDGET_VOTE) {
                     if(mapSeenMasternodeBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -4145,7 +4132,7 @@ void static ProcessGetData(CNode* pfrom)
                         pushed = true;
                     }
                 }
-                
+
                 if (!pushed && inv.type == MSG_BUDGET_FINALIZED_VOTE) {
                     if(mapSeenFinalizedBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -4830,8 +4817,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     // This asymmetric behavior for inbound and outbound connections was introduced
     // to prevent a fingerprinting attack: an attacker can send specific fake addresses
-    // to users' AddrMan and later request them by sending getaddr messages. 
-    // Making users (which are behind NAT and can only make outgoing connections) ignore 
+    // to users' AddrMan and later request them by sending getaddr messages.
+    // Making users (which are behind NAT and can only make outgoing connections) ignore
     // getaddr message mitigates the attack.
     else if ((strCommand == "getaddr") && (pfrom->fInbound))
     {
@@ -5057,7 +5044,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         masternodePayments.ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
         ProcessMessageInstantX(pfrom, strCommand, vRecv);
         ProcessSpork(pfrom, strCommand, vRecv);
-        ProcessMessageMasternodePOS(pfrom, strCommand, vRecv);
     }
 
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index b588ed91ef72..cc93f77197b6 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -12,7 +12,6 @@
 #include "util.h"
 #include "base58.h"
 #include "masternode.h"
-#include "masternode-pos.h"
 //#include "timedata.h"
 
 using namespace std;
@@ -80,7 +79,7 @@ class CBudgetManager
     // keep track of the scanning errors I've seen
     map<uint256, CBudgetProposal> mapProposals;
     map<uint256, CFinalizedBudget> mapFinalizedBudgets;
-    
+
     CBudgetManager() {
         mapProposals.clear();
         mapFinalizedBudgets.clear();
@@ -96,7 +95,7 @@ class CBudgetManager
     CFinalizedBudget *FindFinalizedBudget(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
 
-    
+
     void CleanUp();
 
     int64_t GetTotalBudget(int nHeight);
@@ -179,7 +178,7 @@ class CFinalizedBudget
     std::vector<CTxBudgetPayment> vecProposals;
     map<uint256, CFinalizedBudgetVote> mapVotes;
 
-    CFinalizedBudget();  
+    CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
 
     void Sync(CNode* node);
@@ -227,19 +226,19 @@ class CFinalizedBudget
     string GetStatus();
 
     uint256 GetHash(){
-        /* 
+        /*
             vin is not included on purpose
-                - Any masternode can make a proposal and the hashes should match regardless of who made it. 
-                - Someone could hyjack a new proposal by changing the vin and the signature check will fail. 
-                  However, the network will still propagate the correct version and the incorrect one will be rejected. 
+                - Any masternode can make a proposal and the hashes should match regardless of who made it.
+                - Someone could hyjack a new proposal by changing the vin and the signature check will fail.
+                  However, the network will still propagate the correct version and the incorrect one will be rejected.
         */
-                
+
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strBudgetName;
         ss << nBlockStart;
         ss << vecProposals;
 
-        uint256 h1 = ss.GetHash();        
+        uint256 h1 = ss.GetHash();
         return h1;
     }
 
@@ -262,7 +261,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
 {
 private:
     std::vector<unsigned char> vchSig;
-    
+
 public:
     CFinalizedBudgetBroadcast();
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
@@ -283,7 +282,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
         READWRITE(nBlockStart);
         READWRITE(vecProposals);
         READWRITE(vchSig);
-    }  
+    }
 };
 
 //
@@ -323,7 +322,7 @@ class CFinalizedBudgetVote
         READWRITE(vchSig);
     }
 
-    
+
 
 };
 
@@ -340,12 +339,12 @@ class CBudgetProposal
 
 public:
     std::string strProposalName;
-    
-    /* 
+
+    /*
         json object with name, short-description, long-description, pdf-url and any other info
         This allows the proposal website to stay 100% decentralized
     */
-    std::string strURL; 
+    std::string strURL;
     CTxIn vin;
     int nBlockStart;
     int nBlockEnd;
@@ -356,7 +355,7 @@ class CBudgetProposal
     map<uint256, CBudgetVote> mapVotes;
     //cache object
 
-    CBudgetProposal();  
+    CBudgetProposal();
     CBudgetProposal(const CBudgetProposal& other);
     CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn);
 
@@ -389,13 +388,13 @@ class CBudgetProposal
     int64_t GetAllotted() {return nAlloted;}
 
     uint256 GetHash(){
-        /* 
+        /*
             vin is not included on purpose
-                - Any masternode can make a proposal and the hashes should match regardless of who made it. 
-                - Someone could hyjack a new proposal by changing the vin and the signature check will fail. 
-                  However, the network will still propagate the correct version and the incorrect one will be rejected. 
+                - Any masternode can make a proposal and the hashes should match regardless of who made it.
+                - Someone could hyjack a new proposal by changing the vin and the signature check will fail.
+                  However, the network will still propagate the correct version and the incorrect one will be rejected.
         */
-                
+
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strProposalName;
         ss << strURL;
@@ -404,7 +403,7 @@ class CBudgetProposal
         ss << nAmount;
         ss << address;
         uint256 h1 = ss.GetHash();
-        
+
         return h1;
     }
 
@@ -432,7 +431,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 {
 private:
     std::vector<unsigned char> vchSig;
-    
+
 public:
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
@@ -456,7 +455,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
         READWRITE(nAmount);
         READWRITE(address);
         READWRITE(vchSig);
-    }  
+    }
 };
 
 //
@@ -506,7 +505,7 @@ class CBudgetVote
         READWRITE(vchSig);
     }
 
-    
+
 
 };
 
diff --git a/src/masternode-pos.cpp b/src/masternode-pos.cpp
deleted file mode 100644
index 553913664853..000000000000
--- a/src/masternode-pos.cpp
+++ /dev/null
@@ -1,253 +0,0 @@
-
-
-
-#include "sync.h"
-#include "net.h"
-#include "key.h"
-#include "util.h"
-#include "base58.h"
-#include "protocol.h"
-#include "activemasternode.h"
-#include "masternodeman.h"
-#include "spork.h"
-#include <boost/lexical_cast.hpp>
-#include "masternodeman.h"
-
-using namespace std;
-using namespace boost;
-
-std::map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
-CMasternodeScanning mnscan;
-
-/* 
-    Masternode - Proof of Service 
-
-    -- What it checks
-
-    1.) Making sure Masternodes have their ports open
-    2.) Are responding to requests made by the network
-
-    -- How it works
-
-    When a block comes in, DoMasternodePOS is executed if the client is a 
-    masternode. Using the deterministic ranking algorithm up to 1% of the masternode 
-    network is checked each block. 
-
-    A port is opened from Masternode A to Masternode B, if successful then nothing happens. 
-    If there is an error, a CMasternodeScanningError object is propagated with an error code.
-    Errors are applied to the Masternodes and a score is incremented within the masternode object,
-    after a threshold is met, the masternode goes into an error state. Each cycle the score is 
-    decreased, so if the masternode comes back online it will return to the list. 
-
-    Masternodes in a error state do not receive payment. 
-
-    -- Future expansion
-
-    We want to be able to prove the nodes have many qualities such as a specific CPU speed, bandwidth,
-    and dedicated storage. E.g. We could require a full node be a computer running 2GHz with 10GB of space.
-
-*/
-
-void ProcessMessageMasternodePOS(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
-{
-    if(fLiteMode) return; //disable all darksend/masternode related functionality
-    if(!IsSporkActive(SPORK_7_MASTERNODE_SCANNING)) return;
-    if(IsInitialBlockDownload()) return;
-
-    if (strCommand == "mnse") //Masternode Scanning Error
-    {
-
-        CDataStream vMsg(vRecv);
-        CMasternodeScanningError mnse;
-        vRecv >> mnse;
-
-        CInv inv(MSG_MASTERNODE_SCANNING_ERROR, mnse.GetHash());
-        pfrom->AddInventoryKnown(inv);
-
-        if(mapMasternodeScanningErrors.count(mnse.GetHash())){
-            return;
-        }
-        mapMasternodeScanningErrors.insert(make_pair(mnse.GetHash(), mnse));
-
-        if(!mnse.IsValid())
-        {
-            LogPrintf("MasternodePOS::mnse - Invalid object\n");   
-            return;
-        }
-
-        CMasternode* pmnA = mnodeman.Find(mnse.vinMasternodeA);
-        if(pmnA == NULL) return;
-        if(pmnA->protocolVersion < MIN_MASTERNODE_POS_PROTO_VERSION) return;
-
-        int nBlockHeight = chainActive.Tip()->nHeight;
-        if(nBlockHeight - mnse.nBlockHeight > 10){
-            LogPrintf("MasternodePOS::mnse - Too old\n");
-            return;   
-        }
-
-        // Lowest masternodes in rank check the highest each block
-        int a = mnodeman.GetMasternodeRank(mnse.vinMasternodeA, mnse.nBlockHeight, MIN_MASTERNODE_POS_PROTO_VERSION);
-        if(a == -1 || a > GetCountScanningPerBlock())
-        {
-            if(a != -1) LogPrintf("MasternodePOS::mnse - MasternodeA ranking is too high\n");
-            return;
-        }
-
-        int b = mnodeman.GetMasternodeRank(mnse.vinMasternodeB, mnse.nBlockHeight, MIN_MASTERNODE_POS_PROTO_VERSION, false);
-        if(b == -1 || b < mnodeman.CountMasternodesAboveProtocol(MIN_MASTERNODE_POS_PROTO_VERSION)-GetCountScanningPerBlock())
-        {
-            if(b != -1) LogPrintf("MasternodePOS::mnse - MasternodeB ranking is too low\n");
-            return;
-        }
-
-        if(!mnse.SignatureValid()){
-            LogPrintf("MasternodePOS::mnse - Bad masternode message\n");
-            return;
-        }
-
-        CMasternode* pmnB = mnodeman.Find(mnse.vinMasternodeB);
-        if(pmnB == NULL) return;
-
-        if(fDebug) LogPrintf("ProcessMessageMasternodePOS::mnse - nHeight %d MasternodeA %s MasternodeB %s\n", mnse.nBlockHeight, pmnA->addr.ToString().c_str(), pmnB->addr.ToString().c_str());
-
-        pmnB->ApplyScanningError(mnse);
-        mnse.Relay();
-    }
-}
-
-// Returns how many masternodes are allowed to scan each block
-int GetCountScanningPerBlock()
-{
-    return std::max(1, mnodeman.CountMasternodesAboveProtocol(MIN_MASTERNODE_POS_PROTO_VERSION)/100);
-}
-
-
-void CMasternodeScanning::CleanMasternodeScanningErrors()
-{
-    if(chainActive.Tip() == NULL) return;
-
-    std::map<uint256, CMasternodeScanningError>::iterator it = mapMasternodeScanningErrors.begin();
-
-    while(it != mapMasternodeScanningErrors.end()) {
-        if(GetTime() > it->second.nExpiration){ //keep them for an hour
-            LogPrintf("Removing old masternode scanning error %s\n", it->second.GetHash().ToString().c_str());
-
-            mapMasternodeScanningErrors.erase(it++);
-        } else {
-            it++;
-        }
-    }
-
-}
-
-// Check other masternodes to make sure they're running correctly
-void CMasternodeScanning::DoMasternodePOSChecks()
-{
-    if(!fMasterNode) return;
-    if(fLiteMode) return; //disable all darksend/masternode related functionality
-    if(!IsSporkActive(SPORK_7_MASTERNODE_SCANNING)) return;
-    if(IsInitialBlockDownload()) return;
-
-    int nBlockHeight = chainActive.Tip()->nHeight-5;
-
-    int a = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight, MIN_MASTERNODE_POS_PROTO_VERSION);
-    if(a == -1 || a > GetCountScanningPerBlock()){
-        // we don't need to do anything this block
-        return;
-    }
-
-    // The lowest ranking nodes (Masternode A) check the highest ranking nodes (Masternode B)
-    CMasternode* pmn = mnodeman.GetMasternodeByRank(mnodeman.CountMasternodesAboveProtocol(MIN_MASTERNODE_POS_PROTO_VERSION)-a, nBlockHeight, MIN_MASTERNODE_POS_PROTO_VERSION, false);
-    if(pmn == NULL) return;
-
-    // -- first check : Port is open
-
-    if(!ConnectNode((CAddress)pmn->addr, NULL, true)){
-        // we couldn't connect to the node, let's send a scanning error
-        CMasternodeScanningError mnse(activeMasternode.vin, pmn->vin, SCANNING_ERROR_NO_RESPONSE, nBlockHeight);
-        mnse.Sign();
-        mapMasternodeScanningErrors.insert(make_pair(mnse.GetHash(), mnse));
-        mnse.Relay();
-    }
-
-    // success
-    CMasternodeScanningError mnse(activeMasternode.vin, pmn->vin, SCANNING_SUCCESS, nBlockHeight);
-    mnse.Sign();
-    mapMasternodeScanningErrors.insert(make_pair(mnse.GetHash(), mnse));
-    mnse.Relay();
-}
-
-bool CMasternodeScanningError::SignatureValid()
-{
-    std::string errorMessage;
-    std::string strMessage = vinMasternodeA.ToString() + vinMasternodeB.ToString() + 
-        boost::lexical_cast<std::string>(nBlockHeight) + boost::lexical_cast<std::string>(nErrorType);
-
-    CMasternode* pmn = mnodeman.Find(vinMasternodeA);
-
-    if(pmn == NULL)
-    {
-        LogPrintf("CMasternodeScanningError::SignatureValid() - Unknown Masternode\n");
-        return false;
-    }
-
-    CScript pubkey;
-    pubkey = GetScriptForDestination(pmn->pubkey2.GetID());
-    CTxDestination address1;
-    ExtractDestination(pubkey, address1);
-    CBitcoinAddress address2(address1);
-
-    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchMasterNodeSignature, strMessage, errorMessage)) {
-        LogPrintf("CMasternodeScanningError::SignatureValid() - Verify message failed\n");
-        return false;
-    }
-
-    return true;
-}
-
-bool CMasternodeScanningError::Sign()
-{
-    std::string errorMessage;
-
-    CKey key2;
-    CPubKey pubkey2;
-    std::string strMessage = vinMasternodeA.ToString() + vinMasternodeB.ToString() + 
-        boost::lexical_cast<std::string>(nBlockHeight) + boost::lexical_cast<std::string>(nErrorType);
-
-    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key2, pubkey2))
-    {
-        LogPrintf("CMasternodeScanningError::Sign() - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage.c_str());
-        return false;
-    }
-
-    CScript pubkey;
-    pubkey = GetScriptForDestination(pubkey2.GetID());
-    CTxDestination address1;
-    ExtractDestination(pubkey, address1);
-    CBitcoinAddress address2(address1);
-    //LogPrintf("signing pubkey2 %s \n", address2.ToString().c_str());
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, key2)) {
-        LogPrintf("CMasternodeScanningError::Sign() - Sign message failed");
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pubkey2, vchMasterNodeSignature, strMessage, errorMessage)) {
-        LogPrintf("CMasternodeScanningError::Sign() - Verify message failed");
-        return false;
-    }
-
-    return true;
-}
-
-void CMasternodeScanningError::Relay()
-{
-    CInv inv(MSG_MASTERNODE_SCANNING_ERROR, GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
-}
diff --git a/src/masternode-pos.h b/src/masternode-pos.h
deleted file mode 100644
index 9707c01431a3..000000000000
--- a/src/masternode-pos.h
+++ /dev/null
@@ -1,115 +0,0 @@
-
-
-// Copyright (c) 2014-2015 The Dash developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef MASTERNODE_POS_H
-#define MASTERNODE_POS_H
-
-#include "sync.h"
-#include "net.h"
-#include "key.h"
-#include "util.h"
-#include "base58.h"
-#include "main.h"
-
-using namespace std;
-using namespace boost;
-
-class CMasternodeScanning;
-class CMasternodeScanningError;
-
-extern map<uint256, CMasternodeScanningError> mapMasternodeScanningErrors;
-extern CMasternodeScanning mnscan;
-
-static const int MIN_MASTERNODE_POS_PROTO_VERSION = 70080;
-
-/*
-	1% of the network is scanned every 2.5 minutes, making a full
-	round of scanning take about 4.16 hours. We're targeting about
-	a day of proof-of-service errors for complete removal from the
-	masternode system.
-*/
-static const int MASTERNODE_SCANNING_ERROR_THESHOLD = 6;
-
-#define SCANNING_SUCCESS                       1
-#define SCANNING_ERROR_NO_RESPONSE             2
-#define SCANNING_ERROR_IX_NO_RESPONSE          3
-#define SCANNING_ERROR_MAX                     3
-
-void ProcessMessageMasternodePOS(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
-
-class CMasternodeScanning
-{
-public:
-    void DoMasternodePOSChecks();
-    void CleanMasternodeScanningErrors();
-};
-
-// Returns how many masternodes are allowed to scan each block
-int GetCountScanningPerBlock();
-
-class CMasternodeScanningError
-{
-public:
-    CTxIn vinMasternodeA;
-    CTxIn vinMasternodeB;
-    int nErrorType;
-    int nExpiration;
-    int nBlockHeight;
-    std::vector<unsigned char> vchMasterNodeSignature;
-
-    CMasternodeScanningError ()
-    {
-        vinMasternodeA = CTxIn();
-        vinMasternodeB = CTxIn();
-        nErrorType = 0;
-        nExpiration = GetTime()+(60*60);
-        nBlockHeight = 0;
-    }
-
-    CMasternodeScanningError (CTxIn& vinMasternodeAIn, CTxIn& vinMasternodeBIn, int nErrorTypeIn, int nBlockHeightIn)
-    {
-    	vinMasternodeA = vinMasternodeAIn;
-    	vinMasternodeB = vinMasternodeBIn;
-    	nErrorType = nErrorTypeIn;
-    	nExpiration = GetTime()+(60*60);
-    	nBlockHeight = nBlockHeightIn;
-    }
-
-    CMasternodeScanningError (CTxIn& vinMasternodeBIn, int nErrorTypeIn, int nBlockHeightIn)
-    {
-        //just used for IX, MasternodeA is any client
-        vinMasternodeA = CTxIn();
-        vinMasternodeB = vinMasternodeBIn;
-        nErrorType = nErrorTypeIn;
-        nExpiration = GetTime()+(60*60);
-        nBlockHeight = nBlockHeightIn;
-    }
-
-    uint256 GetHash() const {return SerializeHash(*this);}
-
-    bool SignatureValid();
-    bool Sign();
-    bool IsExpired() {return GetTime() > nExpiration;}
-    void Relay();
-    bool IsValid() {
-    	return (nErrorType > 0 && nErrorType <= SCANNING_ERROR_MAX);
-    }
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-
-        READWRITE(vinMasternodeA);
-        READWRITE(vinMasternodeB);
-        READWRITE(nErrorType);
-        READWRITE(nExpiration);
-        READWRITE(nBlockHeight);
-        READWRITE(vchMasterNodeSignature);
-    }
-};
-
-
-#endif
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 9969b323d1b8..fb98f4e2a520 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -195,12 +195,6 @@ void CMasternode::Check()
     TRY_LOCK(cs_main, lockRecv);
     if(!lockRecv) return;
 
-    if(nScanningErrorCount >= MASTERNODE_SCANNING_ERROR_THESHOLD)
-    {
-        activeState = MASTERNODE_POS_ERROR;
-        return;
-    }
-
     //once spent, stop doing the checks
     if(activeState == MASTERNODE_VIN_SPENT) return;
 
@@ -384,9 +378,9 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
 
             if(pmn->sigTime < sigTime){ //take the newest entry
                 LogPrintf("mnb - Got updated entry for %s\n", addr.ToString().c_str());
-                                
+
                 pmn->UpdateFromNewBroadcast((*this));
-                
+
                 pmn->Check();
                 if(pmn->IsEnabled()) {
                     Relay(fRequested);
@@ -468,7 +462,7 @@ void CMasternodeBroadcast::Relay(bool fRequested)
 }
 
 bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
-{   
+{
     std::string errorMessage;
 
     std::string vchPubKey(pubkey.begin(), pubkey.end());
diff --git a/src/masternode.h b/src/masternode.h
index a51d5bc445ca..7f685c202ec7 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -12,7 +12,6 @@
 #include "base58.h"
 #include "main.h"
 #include "masternode.h"
-#include "masternode-pos.h"
 #include "timedata.h"
 
 #define MASTERNODE_NOT_PROCESSED               0 // initial state
@@ -205,22 +204,6 @@ class CMasternode
         return cacheInputAge+(chainActive.Tip()->nHeight-cacheInputAgeBlock);
     }
 
-    void ApplyScanningError(CMasternodeScanningError& mnse)
-    {
-        if(!mnse.IsValid()) return;
-
-        if(mnse.nBlockHeight == nLastScanningErrorBlockHeight) return;
-        nLastScanningErrorBlockHeight = mnse.nBlockHeight;
-
-        if(mnse.nErrorType == SCANNING_SUCCESS){
-            nScanningErrorCount--;
-            if(nScanningErrorCount < 0) nScanningErrorCount = 0;
-        } else { //all other codes are equally as bad
-            nScanningErrorCount++;
-            if(nScanningErrorCount > MASTERNODE_SCANNING_ERROR_THESHOLD*2) nScanningErrorCount = MASTERNODE_SCANNING_ERROR_THESHOLD*2;
-        }
-    }
-
     std::string Status() {
         std::string strStatus = "ACTIVE";
 
@@ -267,7 +250,7 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(lastTimeSeen);
         READWRITE(protocolVersion);
     }
-    
+
     uint256 GetHash(){
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << sigTime;
@@ -307,7 +290,7 @@ class CMasternodePing
 
     bool CheckAndUpdate(int& nDos);
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    void Relay();    
+    void Relay();
 
     uint256 GetHash(){
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 37553f100f8b..94b0be6ffb43 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -129,7 +129,7 @@ Value masternode(const Array& params, bool fHelp)
     if (fHelp  ||
         (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" &&
          strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce" &&
-        strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" && 
+        strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" &&
         strCommand != "outputs"))
         throw runtime_error(
                 "masternode \"command\"... ( \"passphrase\" )\n"
@@ -466,7 +466,7 @@ Value masternodelist(const Array& params, bool fHelp)
 
     if (fHelp ||
             (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank" && strMode != "addr"
-                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "pose" && strMode != "lastpaid"))
+                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "lastpaid"))
     {
         throw runtime_error(
                 "masternodelist ( \"mode\" \"filter\" )\n"
@@ -480,7 +480,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 "  full           - Print info in format 'status protocol pubkey vin lastseen activeseconds'\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
-                "  pose           - Print Proof-of-Service score\n"
                 "  protocol       - Print protocol of a masternode (can be additionally filtered, exact match))\n"
                 "  pubkey         - Print public key associated with a masternode (can be additionally filtered,\n"
                 "                   partial match)\n"
@@ -548,10 +547,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       address2.ToString().c_str()));
-            } else if (strMode == "pose") {
-                if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
-                std::string strOut = boost::lexical_cast<std::string>(mn.nScanningErrorCount);
-                obj.push_back(Pair(strVin,       strOut.c_str()));
             } else if(strMode == "status") {
                 std::string strStatus = mn.Status();
                 if(strFilter !="" && strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;

From cf53f2f897220b4a251428160b249c7196287633 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Wed, 24 Jun 2015 07:41:52 -0700
Subject: [PATCH 1450/1819] protocol bump

---
 src/instantx.h | 2 +-
 src/version.h  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index acd2f3346673..18df3fcddf45 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70080;
+static const int MIN_INSTANTX_PROTO_VERSION = 70081;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 482241a8984c..42a1fe05662d 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70080;
+static const int PROTOCOL_VERSION = 70081;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,7 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70080;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70081;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 4a9e7dba84aa0ed34f59fad343bc6e55d733344d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 17:49:30 +0300
Subject: [PATCH 1451/1819] fix db shutdown crash - adopt btc
 daf956b7b196769f8027026dd047e72412a9a039

---
 src/db.cpp | 14 +++++++-------
 src/db.h   |  4 +++-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/db.cpp b/src/db.cpp
index 12650e459f39..b88b29f89fc6 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -46,7 +46,7 @@ void CDBEnv::EnvShutdown()
     if (ret != 0)
         LogPrintf("CDBEnv::EnvShutdown : Error %d shutting down database environment: %s\n", ret, DbEnv::strerror(ret));
     if (!fMockDb)
-        DbEnv(0).remove(path.string().c_str(), 0);
+        DbEnv(0).remove(strPath.c_str(), 0);
 }
 
 CDBEnv::CDBEnv() : dbenv(DB_CXX_NO_EXCEPTIONS)
@@ -72,11 +72,11 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
 
     boost::this_thread::interruption_point();
 
-    path = pathIn;
-    filesystem::path pathLogDir = path / "database";
+    strPath = pathIn.string();
+    boost::filesystem::path pathLogDir = pathIn / "database";
     TryCreateDirectory(pathLogDir);
-    filesystem::path pathErrorFile = path / "db.log";
-    LogPrintf("CDBEnv::Open : LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
+    boost::filesystem::path pathErrorFile = pathIn / "db.log";
+    LogPrintf("CDBEnv::Open: LogDir=%s ErrorFile=%s\n", pathLogDir.string(), pathErrorFile.string());
 
     unsigned int nEnvFlags = 0;
     if (GetBoolArg("-privdb", true))
@@ -92,7 +92,7 @@ bool CDBEnv::Open(const boost::filesystem::path& pathIn)
     dbenv.set_flags(DB_AUTO_COMMIT, 1);
     dbenv.set_flags(DB_TXN_WRITE_NOSYNC, 1);
     dbenv.log_set_config(DB_LOG_AUTO_REMOVE, 1);
-    int ret = dbenv.open(path.string().c_str(),
+    int ret = dbenv.open(strPath.c_str(),
                          DB_CREATE |
                              DB_INIT_LOCK |
                              DB_INIT_LOG |
@@ -447,7 +447,7 @@ void CDBEnv::Flush(bool fShutdown)
                 dbenv.log_archive(&listp, DB_ARCH_REMOVE);
                 Close();
                 if (!fMockDb)
-                    boost::filesystem::remove_all(path / "database");
+                    boost::filesystem::remove_all(boost::filesystem::path(strPath) / "database");
             }
         }
     }
diff --git a/src/db.h b/src/db.h
index 1c572d8970d7..eed56c542a1c 100644
--- a/src/db.h
+++ b/src/db.h
@@ -35,7 +35,9 @@ class CDBEnv
 private:
     bool fDbEnvInit;
     bool fMockDb;
-    boost::filesystem::path path;
+    // Don't change into boost::filesystem::path, as that can result in
+    // shutdown problems/crashes caused by a static initialized internal pointer.
+    std::string strPath;
 
     void EnvShutdown();
 

From 0bfaefde929e5069538eb28545d4e211ffee956d Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 19:08:14 +0300
Subject: [PATCH 1452/1819] move ds pool status out of overview page

---
 src/darksend.cpp        | 76 +++++++++++++++++++++++++++++++++++++----
 src/darksend.h          |  2 ++
 src/qt/overviewpage.cpp | 62 +--------------------------------
 src/qt/overviewpage.h   |  2 --
 4 files changed, 73 insertions(+), 69 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index fa7cb537d601..b3017bda97df 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -534,6 +534,60 @@ void CDarksendPool::UnlockCoins(){
     lockedCoins.clear();
 }
 
+std::string CDarksendPool::GetStatus()
+{
+    static int showingDarkSendMessage = 0;
+    showingDarkSendMessage+=3;
+    std::string suffix = "";
+
+    if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing) {
+        return strAutoDenomResult;
+    }
+    switch(state) {
+        case POOL_STATUS_IDLE:
+            return _("Darksend is idle.");
+        case POOL_STATUS_ACCEPTING_ENTRIES:
+            if(entriesCount == 0) {
+                showingDarkSendMessage = 0;
+                return strAutoDenomResult;
+            } else if (lastEntryAccepted == 1) {
+                if(showingDarkSendMessage % 10 > 8) {
+                    lastEntryAccepted = 0;
+                    showingDarkSendMessage = 0;
+                }
+                return _("Darksend request complete:") + " " + _("Your transaction was accepted into the pool!");
+            } else {
+                std::string suffix = "";
+                if(     showingDarkSendMessage % 70 <= 40) return strprintf(_("Submitted following entries to masternode: %u / %d"), entriesCount, GetMaxPoolTransactions());
+                else if(showingDarkSendMessage % 70 <= 50) suffix = ".";
+                else if(showingDarkSendMessage % 70 <= 60) suffix = "..";
+                else if(showingDarkSendMessage % 70 <= 70) suffix = "...";
+                return strprintf(_("Submitted to masternode, waiting for more entries ( %u / %d ) %s"), entriesCount, GetMaxPoolTransactions(), suffix);
+            }
+        case POOL_STATUS_SIGNING:
+            if(     showingDarkSendMessage % 70 <= 40) return _("Found enough users, signing ...");
+            else if(showingDarkSendMessage % 70 <= 50) suffix = ".";
+            else if(showingDarkSendMessage % 70 <= 60) suffix = "..";
+            else if(showingDarkSendMessage % 70 <= 70) suffix = "...";
+            return strprintf(_("Found enough users, signing ( waiting %s )"), suffix);
+        case POOL_STATUS_TRANSMISSION:
+            return _("Transmitting final transaction.");
+        case POOL_STATUS_FINALIZE_TRANSACTION:
+            return _("Finalizing transaction.");
+        case POOL_STATUS_ERROR:
+            return _("Darksend request incomplete:") + " " + lastMessage + " " + _("Will retry...");
+        case POOL_STATUS_SUCCESS:
+            return _("Darksend request complete:") + " " + lastMessage;
+        case POOL_STATUS_QUEUE:
+            if(     showingDarkSendMessage % 70 <= 30) suffix = ".";
+            else if(showingDarkSendMessage % 70 <= 50) suffix = "..";
+            else if(showingDarkSendMessage % 70 <= 70) suffix = "...";
+            return strprintf(_("Submitted to masternode, waiting in queue %s"), suffix);;
+       default:
+            return strprintf(_("Unknown state: id = %u"), state);
+    }
+}
+
 //
 // Check the Darksend progress and send client updates if a Masternode
 //
@@ -834,9 +888,19 @@ void CDarksendPool::CheckTimeout(){
 
     // catching hanging sessions
     if(!fMasterNode) {
-        if(state == POOL_STATUS_TRANSMISSION) {
-            if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session complete -- Running Check()\n");
-            Check();
+        switch(state) {
+            case POOL_STATUS_TRANSMISSION:
+                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session complete -- Running Check()\n");
+                Check();
+                break;
+            case POOL_STATUS_ERROR:
+                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Pool error -- Running Check()\n");
+                Check();
+                break;
+            case POOL_STATUS_SUCCESS:
+                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Pool success -- Running Check()\n");
+                Check();
+                break;
         }
     }
 
@@ -1583,7 +1647,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
                         pnode->PushMessage("dsa", sessionDenom, txCollateral);
                         LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString().c_str());
-                        strAutoDenomResult = "";
+                        strAutoDenomResult = _("Mixing in progress...");
                         dsq.time = 0; //remove node
                         return true;
                     }
@@ -1645,7 +1709,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
                     pnode->PushMessage("dsa", sessionDenom, txCollateral);
                     LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d\n", sessionDenom);
-                    strAutoDenomResult = "";
+                    strAutoDenomResult = _("Mixing in progress...");
                     return true;
                 }
             } else {
@@ -1658,7 +1722,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         return false;
     }
 
-    strAutoDenomResult = "";
+    strAutoDenomResult = _("Mixing in progress...");
     if(!ready) return true;
 
     if(sessionDenom == 0) return true;
diff --git a/src/darksend.h b/src/darksend.h
index 65ec58fe2a75..74e7fbaac3b6 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -386,6 +386,8 @@ class CDarksendPool
         return state;
     }
 
+    std::string GetStatus();
+
     int GetEntriesCount() const
     {
         if(fMasterNode){
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 7b0af8c7c167..2ff5c1bdf37d 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -140,8 +140,6 @@ OverviewPage::OverviewPage(QWidget *parent) :
     ui->labelDarksendSyncStatus->setText("(" + tr("out of sync") + ")");
     ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
 
-    showingDarkSendMessage = 0;
-    darksendActionCheck = 0;
     lastNewBlock = 0;
 
     if(fLiteMode){
@@ -436,61 +434,7 @@ void OverviewPage::darkSendStatus()
         ui->darksendEnabled->setText(tr("Enabled"));
     }
 
-    int state = darkSendPool.GetState();
-    int entries = darkSendPool.GetEntriesCount();
-    int accepted = darkSendPool.GetLastEntryAccepted();
-
-    /* ** @TODO this string creation really needs some clean ups ---vertoe ** */
-    QString strStatus;
-
-    if(chainActive.Tip()->nHeight - darkSendPool.cachedLastSuccess < darkSendPool.minBlockSpacing) {
-        strStatus = QString(darkSendPool.strAutoDenomResult.c_str());
-    } else if(state == POOL_STATUS_IDLE) {
-        strStatus = tr("Darksend is idle.");
-    } else if(state == POOL_STATUS_ACCEPTING_ENTRIES) {
-        if(entries == 0) {
-            if(darkSendPool.strAutoDenomResult.size() == 0){
-                strStatus = tr("Mixing in progress...");
-            } else {
-                strStatus = QString(darkSendPool.strAutoDenomResult.c_str());
-            }
-            showingDarkSendMessage = 0;
-        } else if (accepted == 1) {
-            strStatus = tr("Darksend request complete:") + " " + tr("Your transaction was accepted into the pool!");
-            if(showingDarkSendMessage % 10 > 8) {
-                darkSendPool.lastEntryAccepted = 0;
-                showingDarkSendMessage = 0;
-            }
-        } else {
-            if(showingDarkSendMessage % 70 <= 40) strStatus = tr("Submitted following entries to masternode: %1 / %2").arg(entries).arg(darkSendPool.GetMaxPoolTransactions());
-            else if(showingDarkSendMessage % 70 <= 50) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" .");
-            else if(showingDarkSendMessage % 70 <= 60) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" ..");
-            else if(showingDarkSendMessage % 70 <= 70) strStatus = tr("Submitted to masternode, waiting for more entries ( %1 / %2 ) %3").arg(entries).arg(darkSendPool.GetMaxPoolTransactions()).arg(" ...");
-        }
-    } else if(state == POOL_STATUS_SIGNING) {
-        if(showingDarkSendMessage % 70 <= 10) strStatus = tr("Found enough users, signing ...");
-        else if(showingDarkSendMessage % 70 <= 20) strStatus = tr("Found enough users, signing ( waiting %1 )").arg(".");
-        else if(showingDarkSendMessage % 70 <= 30) strStatus = tr("Found enough users, signing ( waiting %1 )").arg("..");
-        else if(showingDarkSendMessage % 70 <= 40) strStatus = tr("Found enough users, signing ( waiting %1 )").arg("...");
-    } else if(state == POOL_STATUS_TRANSMISSION) {
-        strStatus = tr("Transmitting final transaction.");
-    } else if (state == POOL_STATUS_IDLE) {
-        strStatus = tr("Darksend is idle.");
-    } else if (state == POOL_STATUS_FINALIZE_TRANSACTION) {
-        strStatus = tr("Finalizing transaction.");
-    } else if(state == POOL_STATUS_ERROR) {
-        strStatus = tr("Darksend request incomplete:") + " " + tr(darkSendPool.lastMessage.c_str()) + " " + tr("Will retry...");
-    } else if(state == POOL_STATUS_SUCCESS) {
-        strStatus = tr("Darksend request complete:") + " " + tr(darkSendPool.lastMessage.c_str());
-    } else if(state == POOL_STATUS_QUEUE) {
-        if(showingDarkSendMessage % 70 <= 50) strStatus = tr("Submitted to masternode, waiting in queue %1").arg(".");
-        else if(showingDarkSendMessage % 70 <= 60) strStatus = tr("Submitted to masternode, waiting in queue %1").arg("..");
-        else if(showingDarkSendMessage % 70 <= 70) strStatus = tr("Submitted to masternode, waiting in queue %1").arg("...");
-    } else {
-        strStatus = tr("Unknown state: id = %1").arg(state);
-    }
-
-    if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) darkSendPool.Check();
+    QString strStatus = QString(darkSendPool.GetStatus().c_str());
 
     QString s = tr("Last Darksend message:\n") + strStatus;
 
@@ -508,10 +452,6 @@ void OverviewPage::darkSendStatus()
         ui->labelSubmittedDenom->setText(s2);
     }
 
-    showingDarkSendMessage++;
-    darksendActionCheck++;
-
-    // Get DarkSend Denomination Status
 }
 
 void OverviewPage::darksendAuto(){
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index bddf3959b942..4a6af3bdac6a 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -60,8 +60,6 @@ public slots:
     qint64 cachedTxLocks;
     qint64 lastNewBlock;
 
-    int showingDarkSendMessage;
-    int darksendActionCheck;
     int cachedNumBlocks;
 
     TxViewDelegate *txdelegate;

From 60622b887d81b3890ca913981f9426651107eb7a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 19:23:22 +0300
Subject: [PATCH 1453/1819] add missing MSG_ENTRIES_ADDED for proper ds status
 display

---
 src/darksend.cpp | 5 +++--
 src/darksend.h   | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index fa7cb537d601..59d5b5cf5fb1 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -162,7 +162,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         }
 
     } else if (strCommand == "dsi") { //DarkSend vIn
-        int errorID = MSG_NOERR;
+
         if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
             LogPrintf("dsi -- incompatible version! \n");
             errorID = ERR_VERSION;
@@ -1070,7 +1070,7 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     entries.push_back(v);
 
     if(fDebug) LogPrintf("CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString().c_str());
-    errorID = MSG_NOERR;
+    errorID = MSG_ENTRIES_ADDED;
 
     return true;
 }
@@ -2072,6 +2072,7 @@ std::string CDarksendPool::GetMessageByID(int messageID) {
     case ERR_MISSING_TX: return _("Missing input transaction information.");
     case ERR_VERSION: return _("Incompatible version.");
     case MSG_SUCCESS: return _("Transaction created successfully.");
+    case MSG_ENTRIES_ADDED: return _("Your entries added successfully.");
     case MSG_NOERR:
     default:
         return "";
diff --git a/src/darksend.h b/src/darksend.h
index 65ec58fe2a75..6fb8c77dacb0 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -287,7 +287,8 @@ class CDarksendPool
         ERR_MISSING_TX,
         ERR_VERSION,
         MSG_NOERR,
-        MSG_SUCCESS
+        MSG_SUCCESS,
+        MSG_ENTRIES_ADDED
     };
 
     std::vector<CDarkSendEntry> myEntries; // clients entries

From 451a98732effb856c75d5b9878bf9d0ad2726e17 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 19:25:43 +0300
Subject: [PATCH 1454/1819] remove unneeded "darkSendPool." in DS pool class
 functions

---
 src/darksend.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 59d5b5cf5fb1..5bfe57c5678d 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -592,7 +592,7 @@ void CDarksendPool::Check()
     if((state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) && GetTimeMillis()-lastTimeChanged >= 10000) {
         if(fDebug) LogPrintf("CDarksendPool::Check() -- RESETTING MESSAGE \n");
         SetNull(true);
-        if(fMasterNode) RelayStatus(darkSendPool.sessionID, darkSendPool.GetState(), darkSendPool.GetEntriesCount(), MASTERNODE_RESET);
+        if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
         UnlockCoins();
     }
 }
@@ -670,7 +670,7 @@ void CDarksendPool::CheckFinalTransaction()
             if(fDebug) LogPrintf("CDarksendPool::Check() -- COMPLETED -- RESETTING \n");
             SetNull(true);
             UnlockCoins();
-            if(fMasterNode) RelayStatus(darkSendPool.sessionID, darkSendPool.GetState(), darkSendPool.GetEntriesCount(), MASTERNODE_RESET);
+            if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
             pwalletMain->Lock();
         }
     }
@@ -873,7 +873,7 @@ void CDarksendPool::CheckTimeout(){
                     UnlockCoins();
                 }
                 if(fMasterNode){
-                    RelayStatus(darkSendPool.sessionID, darkSendPool.GetState(), darkSendPool.GetEntriesCount(), MASTERNODE_RESET);
+                    RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
                 }
                 break;
             }
@@ -1128,7 +1128,7 @@ bool CDarksendPool::SignaturesComplete(){
 // This is only ran from clients
 //
 void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64_t amount){
-    if(darkSendPool.txCollateral == CMutableTransaction()){
+    if(txCollateral == CMutableTransaction()){
         LogPrintf ("CDarksendPool:SendDarksendDenominate() - Darksend collateral not set");
         return;
     }
@@ -1415,8 +1415,8 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         return false;
     }
 
-    if(darkSendPool.GetState() != POOL_STATUS_ERROR && darkSendPool.GetState() != POOL_STATUS_SUCCESS){
-        if(darkSendPool.GetMyTransactionCount() > 0){
+    if(GetState() != POOL_STATUS_ERROR && GetState() != POOL_STATUS_SUCCESS){
+        if(GetMyTransactionCount() > 0){
             return true;
         }
     }
@@ -2229,7 +2229,7 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
         if(!pSubmittedToMasternode) return;
-        if((CNetAddr)darkSendPool.pSubmittedToMasternode->addr != (CNetAddr)pnode->addr) continue;
+        if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pnode->addr) continue;
         LogPrintf("RelayIn - found master, relaying message - %s \n", pnode->addr.ToString().c_str());
         pnode->PushMessage("dsi", vin2, nAmount, txCollateral, vout2);
     }

From a4bb2833677f56f8ccbb72ac5bd3b03c6211d6f5 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 19:30:05 +0300
Subject: [PATCH 1455/1819] slight optimizations/readability improvements for
 ds

---
 src/darksend.cpp | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 5bfe57c5678d..23704702db2d 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1485,18 +1485,16 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
     }
 
+    if(fDryRun) return true;
+
     nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true, false, false);
     nBalanceNeedsDenominated = nBalanceNeedsAnonymized - nOnlyDenominatedBalance;
 
-    if(!fDryRun && nBalanceNeedsDenominated > nOnlyDenominatedBalance) return CreateDenominated(nBalanceNeedsDenominated);
+    //check if we have should create more denominated inputs
+    if(nBalanceNeedsDenominated > nOnlyDenominatedBalance) return CreateDenominated(nBalanceNeedsDenominated);
 
-    //check to see if we have the collateral sized inputs, it requires these
-    if(!pwalletMain->HasCollateralInputs()){
-        if(!fDryRun) MakeCollateralAmounts();
-        return true;
-    }
-
-    if(fDryRun) return true;
+    //check if we have the collateral sized inputs
+    if(!pwalletMain->HasCollateralInputs()) return MakeCollateralAmounts();
 
     std::vector<CTxOut> vOut;
 
@@ -1755,13 +1753,15 @@ bool CDarksendPool::MakeCollateralAmounts()
 
     reservekeyCollateral.KeepKey();
 
+    LogPrintf("MakeCollateralAmounts: tx %s\n", wtx.GetHash().GetHex());
+
     // use the same cachedLastSuccess as for DS mixinx to prevent race
-    if(pwalletMain->CommitTransaction(wtx, reservekeyChange))
-        cachedLastSuccess = chainActive.Tip()->nHeight;
-    else
+    if(!pwalletMain->CommitTransaction(wtx, reservekeyChange)) {
         LogPrintf("MakeCollateralAmounts: CommitTransaction failed!\n");
+        return false;
+    }
 
-    LogPrintf("MakeCollateralAmounts: tx %s\n", wtx.GetHash().GetHex());
+    cachedLastSuccess = chainActive.Tip()->nHeight;
 
     return true;
 }

From b30f8b5fcbaa62091fcc6d9297aa805f2d041c5f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 24 Jun 2015 19:33:53 +0300
Subject: [PATCH 1456/1819] remove unused variable

---
 src/darksend.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 23704702db2d..28b02f5abd98 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2258,7 +2258,6 @@ void ThreadCheckDarkSendPool()
     RenameThread("dash-darksend");
 
     unsigned int c = 0;
-    std::string errorMessage;
 
     while (true)
     {

From fd8afcc91ae0c8b9fee9ea223c36c7ea76d77b06 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 24 Jun 2015 09:41:03 -0700
Subject: [PATCH 1457/1819] added masternode status info

---
 src/masternode-payments.cpp |  4 ++--
 src/masternodeman.cpp       |  8 +++++++-
 src/rpcmasternode.cpp       | 23 ++++++++++++++++++++++-
 3 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 79c110a53200..8dac358fb129 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -400,7 +400,7 @@ bool CMasternodePaymentWinner::IsValid()
 
     if(n == -1)
     {
-        LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode\n");
+        LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode - %s\n", vinMasternode.ToString().c_str());
         return false;
     }
 
@@ -455,7 +455,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         unsigned int nHash;
         memcpy(&nHash, &hash, 2);
 
-        LogPrintf("CMasternodePayments::ProcessBlock() Start nHeight %d. \n", nBlockHeight);
+        LogPrintf("CMasternodePayments::ProcessBlock() Start nHeight %d - vin %s. \n", nBlockHeight, activeMasternode.vin.ToString().c_str());
 
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
         CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight);
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index c346003ad5d4..a3f034960368 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -220,8 +220,14 @@ void CMasternodeMan::Check()
 {
     LOCK(cs);
 
-    BOOST_FOREACH(CMasternode& mn, vMasternodes)
+    BOOST_FOREACH(CMasternode& mn, vMasternodes) {
         mn.Check();
+        
+        // // if it matches our Masternode privkey, then we've been remotely activated
+        // if(mn.pubkey2 == activeMasternode.pubKeyMasternode && mn.protocolVersion == PROTOCOL_VERSION){
+        //     activeMasternode.EnableHotColdMasterNode(mn.vin, mn.addr);
+        // }
+    }
 }
 
 void CMasternodeMan::CheckAndRemove()
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index d8f31b87bd11..b23d1bfcd5ee 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -130,7 +130,7 @@ Value masternode(const Array& params, bool fHelp)
         (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" &&
          strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce" &&
         strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" &&
-        strCommand != "outputs"))
+        strCommand != "outputs" && strCommand != "status"))
         throw runtime_error(
                 "masternode \"command\"... ( \"passphrase\" )\n"
                 "Set of commands to execute masternode related actions\n"
@@ -150,6 +150,7 @@ Value masternode(const Array& params, bool fHelp)
                 "  list         - Print list of all known masternodes (see masternodelist for more info)\n"
                 "  list-conf    - Print masternode.conf in JSON format\n"
                 "  winners      - Print list of masternode winners\n"
+                "  status       - Print masternode status information\n"
                 );
 
     if (strCommand == "list")
@@ -453,6 +454,26 @@ Value masternode(const Array& params, bool fHelp)
 
     }
 
+    if(strCommand == "status")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        CScript pubkey;
+        pubkey = GetScriptForDestination(activeMasternode.pubKeyMasternode.GetID());
+        CTxDestination address1;
+        ExtractDestination(pubkey, address1);
+        CBitcoinAddress address2(address1);
+
+        Object mnObj;
+        mnObj.push_back(Pair("vin", activeMasternode.vin.ToString().c_str()));
+        mnObj.push_back(Pair("service", activeMasternode.service.ToString().c_str()));
+        mnObj.push_back(Pair("status", activeMasternode.status));
+        mnObj.push_back(Pair("pubKeyMasternode", address2.ToString().c_str()));
+        mnObj.push_back(Pair("notCapableReason", activeMasternode.notCapableReason.c_str()));
+        return mnObj;
+    }
+
     return Value::null;
 }
 

From 8d8f9fae4880555809661f72967c76b05e7e61dd Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 24 Jun 2015 09:46:49 -0700
Subject: [PATCH 1458/1819] Autostart masternode upon startup

---
 src/init.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index 99311f2479fe..f9942689bcf9 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1483,6 +1483,8 @@ bool AppInit2(boost::thread_group& threadGroup)
         } else {
             return InitError(_("You must specify a masternodeprivkey in the configuration. Please see documentation for help."));
         }
+
+        activeMasternode.ManageStatus();
     }
 
     if(GetBoolArg("-mnconflock", true)) {

From 38e736ad221457792c1bcd6b3a09cd9434bee25b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Wed, 24 Jun 2015 11:21:12 -0700
Subject: [PATCH 1459/1819] bump version

---
 src/clientversion.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/clientversion.h b/src/clientversion.h
index a1049c0698b0..a0eca7f4491e 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 4
+#define CLIENT_VERSION_BUILD 5
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 94493bee6387125f09c8be4ce4fac59bb97fd3f9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Wed, 24 Jun 2015 12:42:01 -0700
Subject: [PATCH 1460/1819] fixed compile issues

---
 src/darksend.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index d16d4d2be594..6e775b67539f 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -162,6 +162,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         }
 
     } else if (strCommand == "dsi") { //DarkSend vIn
+        int errorID;
 
         if (pfrom->nVersion < MIN_POOL_PEER_PROTO_VERSION) {
             LogPrintf("dsi -- incompatible version! \n");

From 9d05c981103a70f0a77423b0ae8e40473ca91ddc Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 25 Jun 2015 17:27:54 +0300
Subject: [PATCH 1461/1819] fix strings

---
 src/init.cpp               | 2 +-
 src/qt/intro.cpp           | 4 ++--
 src/qt/sendcoinsdialog.cpp | 2 +-
 src/qt/walletmodel.cpp     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index f9942689bcf9..15ee267c04c4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -417,7 +417,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "\n" + _("Darksend options:") + "\n";
     strUsage += "  -enabledarksend=<n>          " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), 0) + "\n";
     strUsage += "  -darksendrounds=<n>          " + strprintf(_("Use N separate masternodes to anonymize funds  (2-8, default: %u)"), 2) + "\n";
-    strUsage += "  -anonymizedashamount=<n>     " + strprintf(_("Keep N dash anonymized (default: %u)"), 0) + "\n";
+    strUsage += "  -anonymizedashamount=<n>     " + strprintf(_("Keep N DASH anonymized (default: %u)"), 0) + "\n";
     strUsage += "  -liquidityprovider=<n>       " + strprintf(_("Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)"), 0) + "\n";
 
     strUsage += "\n" + _("InstantX options:") + "\n";
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 050b570d6eb0..b31091ceb575 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -216,10 +216,10 @@ void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable
     {
         ui->freeSpace->setText("");
     } else {
-        QString freeString = tr("%n GB of free space available", "", bytesAvailable/GB_BYTES);
+        QString freeString = tr("%1 GB of free space available").arg(bytesAvailable/GB_BYTES);
         if(bytesAvailable < BLOCK_CHAIN_SIZE)
         {
-            freeString += " " + tr("(of %n GB needed)", "", BLOCK_CHAIN_SIZE/GB_BYTES);
+            freeString += " " + tr("(of %1 GB needed)").arg(BLOCK_CHAIN_SIZE/GB_BYTES);
             ui->freeSpace->setStyleSheet("QLabel { color: #800000 }");
         } else {
             ui->freeSpace->setStyleSheet("");
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 03a6b2bd33f8..7270387aafb8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -709,7 +709,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
     {
         ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB");
         ui->labelSmartFee2->hide();
-        ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %1 block(s).").arg(nBlocksToConfirm));
+        ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", nBlocksToConfirm));
     }
 
     updateFeeMinimizedLabel();
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index a41d83445562..9287aaad93c1 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -286,7 +286,7 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
 
 
         if(recipients[0].useInstantX && total > GetSporkValue(SPORK_5_MAX_VALUE)*COIN){
-            emit message(tr("Send Coins"), tr("InstantX doesn't support sending values that high yet. Transactions are currently limited to %n DASH.", "", GetSporkValue(SPORK_5_MAX_VALUE)),
+            emit message(tr("Send Coins"), tr("InstantX doesn't support sending values that high yet. Transactions are currently limited to %1 DASH.").arg(GetSporkValue(SPORK_5_MAX_VALUE)),
                          CClientUIInterface::MSG_ERROR);
             return TransactionCreationFailed;
         }

From 5e21166456c8106852267a88c6c5f1ff74ae4bd9 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 25 Jun 2015 17:29:10 +0300
Subject: [PATCH 1462/1819] refresh en source/translations

---
 src/qt/dashstrings.cpp   |  307 +--
 src/qt/locale/dash_en.ts | 4123 ++++++++++++++++++--------------------
 2 files changed, 2125 insertions(+), 2305 deletions(-)

diff --git a/src/qt/dashstrings.cpp b/src/qt/dashstrings.cpp
index ae7640881f08..559df6e58782 100644
--- a/src/qt/dashstrings.cpp
+++ b/src/qt/dashstrings.cpp
@@ -1,8 +1,4 @@
 
-// Copyright (c) 2009-2014 The Bitcoin developers
-// Copyright (c) 2014-2015 The Dash developers
-
-//! This file is generated by share/qt/extract_strings_qt.py
 
 #include <QtGlobal>
 
@@ -14,63 +10,62 @@
 #endif
 static const char UNUSED *dash_strings[] = {
 QT_TRANSLATE_NOOP("dash-core", ""
-"%s, you must set a rpcpassword in the configuration file:\n"
-"%s\n"
-"It is recommended you use the following random password:\n"
-"rpcuser=dashrpc\n"
-"rpcpassword=%s\n"
-"(you do not need to remember this password)\n"
-"The username and password MUST NOT be the same.\n"
-"If the file does not exist, create it with owner-readable-only file "
-"permissions.\n"
-"It is also recommended to set alertnotify so you are notified of problems;\n"
-"for example: alertnotify=echo %%s | mail -s \"Dash Alert\" admin@foo.com\n"),
-QT_TRANSLATE_NOOP("dash-core", ""
-"Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!"
-"3DES:@STRENGTH)"),
+"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
+"= drop tx meta data)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"An error occurred while setting up the RPC port %u for listening on IPv4: %s"),
+"Allow JSON-RPC connections from specified source. Valid for <ip> are a "
+"single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or "
+"a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"An error occurred while setting up the RPC port %u for listening on IPv6, "
-"falling back to IPv4: %s"),
+"An error occurred while setting up the RPC address %s port %u for listening: "
+"%s"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Bind to given address and always listen on it. Use [host]:port notation for "
 "IPv6"),
 QT_TRANSLATE_NOOP("dash-core", ""
+"Bind to given address and whitelist peers connecting to it. Use [host]:port "
+"notation for IPv6"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Bind to given address to listen for JSON-RPC connections. Use [host]:port "
+"notation for IPv6. This option can be specified multiple times (default: "
+"bind to all interfaces)"),
+QT_TRANSLATE_NOOP("dash-core", ""
 "Cannot obtain a lock on data directory %s. Dash Core is probably already "
 "running."),
 QT_TRANSLATE_NOOP("dash-core", ""
+"Change automatic finalized budget voting behavior. mode=auto: Vote for only "
+"exact finalized budget match to my generated budget. (string, default: auto)"),
+QT_TRANSLATE_NOOP("dash-core", ""
 "Continuously rate-limit free transactions to <n>*1000 bytes per minute "
-"(default:15)"),
+"(default:%u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Create new files with system default permissions, instead of umask 077 (only "
+"effective with disabled wallet functionality)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Darksend uses exact denominated amounts to send funds, you might simply need "
 "to anonymize some more coins."),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Disable all Masternode and Darksend related functionality (0-1, default: 0)"),
+"Delete all wallet transactions and only recover those parts of the "
+"blockchain through -rescan on startup"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Disable all Masternode and Darksend related functionality (0-1, default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Distributed under the MIT software license, see the accompanying file "
+"COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Enable instantx, show confirmations for locked transactions (bool, default: "
-"true)"),
+"%s)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Enable use of automated darksend for funds stored in this wallet (0-1, "
-"default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", ""
-"Enter regression test mode, which uses a special chain in which blocks can "
-"be solved instantly. This is intended for regression testing tools and app "
-"development."),
+"default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Enter regression test mode, which uses a special chain in which blocks can "
 "be solved instantly."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Error: Listening for incoming connections failed (listen returned error %s)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Error: The transaction was rejected! This might happen if some of the coins "
-"in your wallet were already spent, such as if you used a copy of wallet.dat "
-"and coins were spent in the copy but not marked as spent here."),
-QT_TRANSLATE_NOOP("dash-core", ""
-"Error: This transaction requires a transaction fee of at least %s because of "
-"its amount, complexity, or use of recently received funds!"),
-QT_TRANSLATE_NOOP("dash-core", ""
-"Error: Wallet unlocked for anonymization only, unable to create transaction."),
+"Error: Unsupported argument -socks found. Setting SOCKS version isn't "
+"possible anymore, only SOCKS5 proxies are supported."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Execute command when a relevant alert is received or we see a really long "
 "fork (%s in cmd is replaced by message)"),
@@ -81,16 +76,22 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "Execute command when the best block changes (%s in cmd is replaced by block "
 "hash)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Fees smaller than this are considered zero fee (for transaction creation) "
-"(default:"),
+"Fees (in DASH/Kb) smaller than this are considered zero fee for relaying "
+"(default: %s)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Fees (in DASH/Kb) smaller than this are considered zero fee for transaction "
+"creation (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Flush database activity from memory pool to disk log every <n> megabytes "
-"(default: 100)"),
+"(default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Found unconfirmed denominated outputs, will wait till they confirm to "
 "continue."),
 QT_TRANSLATE_NOOP("dash-core", ""
-"How thorough the block verification of -checkblocks is (0-4, default: 3)"),
+"How thorough the block verification of -checkblocks is (0-4, default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"If paytxfee is not set, include enough fee so transactions begin "
+"confirmation on average within n blocks (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "In this mode -genproclimit controls how many blocks are generated "
 "immediately."),
@@ -98,22 +99,35 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "InstantX requires inputs with at least 6 confirmations, you might need to "
 "wait a few minutes and try again."),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Listen for JSON-RPC connections on <port> (default: 9998 or testnet: 19998)"),
+"Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay "
+"fee of %s to prevent stuck transactions)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Log transaction priority and fee per kB when mining blocks (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Maintain a full transaction index, used by the getrawtransaction rpc call "
+"(default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Maximum size of data in data carrier transactions we relay and mine "
+"(default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Maximum total fees to use in a single wallet transaction, setting too low "
+"may abort large transactions (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Name to construct url for KeePass entry that stores the wallet passphrase"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Number of seconds to keep misbehaving peers from reconnecting (default: "
-"86400)"),
+"Number of seconds to keep misbehaving peers from reconnecting (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Output debugging information (default: 0, supplying <category> is optional)"),
+"Output debugging information (default: %u, supplying <category> is optional)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Provide liquidity to Darksend by infrequently mixing coins on a continual "
-"basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, "
+"basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, "
 "low fees)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
 "unless -connect)"),
 QT_TRANSLATE_NOOP("dash-core", ""
+"Require high priority for relaying free or low-fee transactions (default:%u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
 "Set external address:port to get to this masternode (example: address:port)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
@@ -121,15 +135,32 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
 "leave that many cores free, default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Set the processor limit for when generation is on (-1 = unlimited, default: "
-"-1)"),
+"Set the number of threads for coin generation if enabled (-1 = all cores, "
+"default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Show N confirmations for a successfully locked transaction (0-9999, default: "
-"1)"),
+"%u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "This is a pre-release test build - use at your own risk - do not use for "
 "mining or merchant applications"),
 QT_TRANSLATE_NOOP("dash-core", ""
+"This product includes software developed by the OpenSSL Project for use in "
+"the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
+"written by Eric Young and UPnP software written by Thomas Bernard."),
+QT_TRANSLATE_NOOP("dash-core", ""
+"To use dashd, or the -server option to dash-qt, you must set an rpcpassword "
+"in the configuration file:\n"
+"%s\n"
+"It is recommended you use the following random password:\n"
+"rpcuser=dashrpc\n"
+"rpcpassword=%s\n"
+"(you do not need to remember this password)\n"
+"The username and password MUST NOT be the same.\n"
+"If the file does not exist, create it with owner-readable-only file "
+"permissions.\n"
+"It is also recommended to set alertnotify so you are notified of problems;\n"
+"for example: alertnotify=echo %%s | mail -s \"Dash Alert\" admin@foo.com\n"),
+QT_TRANSLATE_NOOP("dash-core", ""
 "Unable to bind to %s on this computer. Dash Core is probably already running."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Unable to locate enough Darksend denominated funds for this transaction."),
@@ -139,14 +170,17 @@ QT_TRANSLATE_NOOP("dash-core", ""
 QT_TRANSLATE_NOOP("dash-core", ""
 "Unable to locate enough Darksend non-denominated funds for this transaction."),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -"
-"proxy)"),
+"Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: "
+"%s)"),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Warning: -maxtxfee is set very high! Fees this large could be paid on a "
+"single transaction."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Warning: -paytxfee is set very high! This is the transaction fee you will "
 "pay if you send a transaction."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Warning: Please check that your computer's date and time are correct! If "
-"your clock is wrong Dash will not work properly."),
+"your clock is wrong Dash Core will not work properly."),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Warning: The network does not appear to fully agree! Some miners appear to "
 "be experiencing issues."),
@@ -161,50 +195,55 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect "
 "you should restore from a backup."),
 QT_TRANSLATE_NOOP("dash-core", ""
-"You must set rpcpassword=<password> in the configuration file:\n"
-"%s\n"
-"If the file does not exist, create it with owner-readable-only file "
-"permissions."),
+"Whitelist peers connecting from the given netmask or IP address. Can be "
+"specified multiple times."),
+QT_TRANSLATE_NOOP("dash-core", ""
+"Whitelisted peers cannot be DoS banned and their transactions are always "
+"relayed, even if they are already in the mempool, useful e.g. for a gateway"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "You must specify a masternodeprivkey in the configuration. Please see "
 "documentation for help."),
+QT_TRANSLATE_NOOP("dash-core", "(default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "(default: 1)"),
-QT_TRANSLATE_NOOP("dash-core", "(default: wallet.dat)"),
-QT_TRANSLATE_NOOP("dash-core", "<category> can be:"),
+QT_TRANSLATE_NOOP("dash-core", "<category> can be:\n"),
 QT_TRANSLATE_NOOP("dash-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("dash-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
+QT_TRANSLATE_NOOP("dash-core", "Accept public REST requests (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Acceptable ciphers (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Add a node to connect to and attempt to keep the connection open"),
 QT_TRANSLATE_NOOP("dash-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
-QT_TRANSLATE_NOOP("dash-core", "Allow JSON-RPC connections from specified IP address"),
 QT_TRANSLATE_NOOP("dash-core", "Already have that input."),
-QT_TRANSLATE_NOOP("dash-core", "Always query for peer addresses via DNS lookup (default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Always query for peer addresses via DNS lookup (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Attempt to recover private keys from a corrupt wallet.dat"),
 QT_TRANSLATE_NOOP("dash-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("dash-core", "Can't denominate: no compatible inputs left."),
 QT_TRANSLATE_NOOP("dash-core", "Cannot downgrade wallet"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -bind address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -externalip address: '%s'"),
+QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -whitebind address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot write default address"),
-QT_TRANSLATE_NOOP("dash-core", "Clear list of wallet transactions (diagnostic tool; implies -rescan)"),
 QT_TRANSLATE_NOOP("dash-core", "Collateral not valid."),
 QT_TRANSLATE_NOOP("dash-core", "Connect only to the specified node(s)"),
-QT_TRANSLATE_NOOP("dash-core", "Connect through SOCKS proxy"),
-QT_TRANSLATE_NOOP("dash-core", "Connect to JSON-RPC on <port> (default: 9998 or testnet: 19998)"),
-QT_TRANSLATE_NOOP("dash-core", "Connect to KeePassHttp on port <port> (default: 19455)"),
+QT_TRANSLATE_NOOP("dash-core", "Connect through SOCKS5 proxy"),
+QT_TRANSLATE_NOOP("dash-core", "Connect to KeePassHttp on port <port> (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Connect to a node to retrieve peer addresses, and disconnect"),
 QT_TRANSLATE_NOOP("dash-core", "Connection options:"),
+QT_TRANSLATE_NOOP("dash-core", "Copyright (C) 2009-%i The Bitcoin Core Developers"),
+QT_TRANSLATE_NOOP("dash-core", "Copyright (C) 2014-%i The Dash Core Developers"),
 QT_TRANSLATE_NOOP("dash-core", "Corrupted block database detected"),
+QT_TRANSLATE_NOOP("dash-core", "Could not parse -rpcbind value %s as network address"),
 QT_TRANSLATE_NOOP("dash-core", "Darksend is disabled."),
+QT_TRANSLATE_NOOP("dash-core", "Darksend is idle."),
 QT_TRANSLATE_NOOP("dash-core", "Darksend options:"),
-QT_TRANSLATE_NOOP("dash-core", "Dash Core Daemon"),
-QT_TRANSLATE_NOOP("dash-core", "Dash Core RPC client version"),
+QT_TRANSLATE_NOOP("dash-core", "Darksend request complete:"),
+QT_TRANSLATE_NOOP("dash-core", "Darksend request incomplete:"),
 QT_TRANSLATE_NOOP("dash-core", "Debugging/Testing options:"),
-QT_TRANSLATE_NOOP("dash-core", "Disable safemode, override a real safe mode event (default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Disable safemode, override a real safe mode event (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Discover own IP address (default: 1 when listening and no -externalip)"),
 QT_TRANSLATE_NOOP("dash-core", "Do not load the wallet and disable wallet RPC calls"),
 QT_TRANSLATE_NOOP("dash-core", "Do you want to rebuild the block database now?"),
 QT_TRANSLATE_NOOP("dash-core", "Done loading"),
-QT_TRANSLATE_NOOP("dash-core", "Enable the client to act as a masternode (0-1, default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Enable the client to act as a masternode (0-1, default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Entries are full."),
 QT_TRANSLATE_NOOP("dash-core", "Error connecting to Masternode."),
 QT_TRANSLATE_NOOP("dash-core", "Error initializing block database"),
@@ -212,36 +251,30 @@ QT_TRANSLATE_NOOP("dash-core", "Error initializing wallet database environment %
 QT_TRANSLATE_NOOP("dash-core", "Error loading block database"),
 QT_TRANSLATE_NOOP("dash-core", "Error loading wallet.dat"),
 QT_TRANSLATE_NOOP("dash-core", "Error loading wallet.dat: Wallet corrupted"),
-QT_TRANSLATE_NOOP("dash-core", "Error loading wallet.dat: Wallet requires newer version of Dash"),
+QT_TRANSLATE_NOOP("dash-core", "Error loading wallet.dat: Wallet requires newer version of Dash Core"),
 QT_TRANSLATE_NOOP("dash-core", "Error opening block database"),
 QT_TRANSLATE_NOOP("dash-core", "Error reading from database, shutting down."),
 QT_TRANSLATE_NOOP("dash-core", "Error recovering public key."),
 QT_TRANSLATE_NOOP("dash-core", "Error"),
+QT_TRANSLATE_NOOP("dash-core", "Error: A fatal internal error occured, see debug.log for details"),
 QT_TRANSLATE_NOOP("dash-core", "Error: Disk space is low!"),
+QT_TRANSLATE_NOOP("dash-core", "Error: Unsupported argument -tor found, use -onion."),
 QT_TRANSLATE_NOOP("dash-core", "Error: Wallet locked, unable to create transaction!"),
 QT_TRANSLATE_NOOP("dash-core", "Error: You already have pending entries in the Darksend pool"),
-QT_TRANSLATE_NOOP("dash-core", "Error: system error: "),
 QT_TRANSLATE_NOOP("dash-core", "Failed to listen on any port. Use -listen=0 if you want this."),
-QT_TRANSLATE_NOOP("dash-core", "Failed to read block info"),
 QT_TRANSLATE_NOOP("dash-core", "Failed to read block"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to sync block index"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write block index"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write block info"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write block"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write file info"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write to coin database"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write transaction index"),
-QT_TRANSLATE_NOOP("dash-core", "Failed to write undo data"),
-QT_TRANSLATE_NOOP("dash-core", "Fee per kB to add to transactions you send"),
-QT_TRANSLATE_NOOP("dash-core", "Fees smaller than this are considered zero fee (for relaying) (default:"),
-QT_TRANSLATE_NOOP("dash-core", "Force safe mode (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Generate coins (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Get help for a command"),
-QT_TRANSLATE_NOOP("dash-core", "How many blocks to check at startup (default: 288, 0 = all)"),
+QT_TRANSLATE_NOOP("dash-core", "Fee (in DASH/kB) to add to transactions you send (default: %s)"),
+QT_TRANSLATE_NOOP("dash-core", "Finalizing transaction."),
+QT_TRANSLATE_NOOP("dash-core", "Force safe mode (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Found enough users, signing ( waiting %s )"),
+QT_TRANSLATE_NOOP("dash-core", "Found enough users, signing ..."),
+QT_TRANSLATE_NOOP("dash-core", "Generate coins (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "How many blocks to check at startup (default: %u, 0 = all)"),
 QT_TRANSLATE_NOOP("dash-core", "If <category> is not supplied, output all debugging information."),
-QT_TRANSLATE_NOOP("dash-core", "Ignore masternodes less than version (example: 70050; default : 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Ignore masternodes less than version (example: 70050; default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Importing..."),
 QT_TRANSLATE_NOOP("dash-core", "Imports blocks from external blk000??.dat file"),
+QT_TRANSLATE_NOOP("dash-core", "Include IP addresses in debug output (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Incompatible mode."),
 QT_TRANSLATE_NOOP("dash-core", "Incompatible version."),
 QT_TRANSLATE_NOOP("dash-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
@@ -253,134 +286,138 @@ QT_TRANSLATE_NOOP("dash-core", "Insufficient funds"),
 QT_TRANSLATE_NOOP("dash-core", "Insufficient funds."),
 QT_TRANSLATE_NOOP("dash-core", "Invalid -onion address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid -proxy address: '%s'"),
+QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -maxtxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -minrelaytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -mintxfee=<amount>: '%s'"),
+QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
-QT_TRANSLATE_NOOP("dash-core", "Invalid amount"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid masternodeprivkey. Please see documenation."),
+QT_TRANSLATE_NOOP("dash-core", "Invalid netmask specified in -whitelist: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid private key."),
 QT_TRANSLATE_NOOP("dash-core", "Invalid script detected."),
 QT_TRANSLATE_NOOP("dash-core", "KeePassHttp id for the established association"),
 QT_TRANSLATE_NOOP("dash-core", "KeePassHttp key for AES encrypted communication with KeePass"),
-QT_TRANSLATE_NOOP("dash-core", "Keep N dash anonymized (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Keep at most <n> unconnectable blocks in memory (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Keep N DASH anonymized (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Last Darksend was too recent."),
 QT_TRANSLATE_NOOP("dash-core", "Last successful Darksend action was too recent."),
-QT_TRANSLATE_NOOP("dash-core", "Limit size of signature cache to <n> entries (default: 50000)"),
-QT_TRANSLATE_NOOP("dash-core", "List commands"),
-QT_TRANSLATE_NOOP("dash-core", "Listen for connections on <port> (default: 9999 or testnet: 19999)"),
+QT_TRANSLATE_NOOP("dash-core", "Limit size of signature cache to <n> entries (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Loading addresses..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading block index..."),
+QT_TRANSLATE_NOOP("dash-core", "Loading budget cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading masternode cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet... (%3.2f %%)"),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet..."),
-QT_TRANSLATE_NOOP("dash-core", "Log transaction priority and fee per kB when mining blocks (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Maintain a full transaction index (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Maintain at most <n> connections to peers (default: 125)"),
+QT_TRANSLATE_NOOP("dash-core", "Lock masternodes from masternode configuration file (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Maintain at most <n> connections to peers (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Masternode options:"),
 QT_TRANSLATE_NOOP("dash-core", "Masternode queue is full."),
 QT_TRANSLATE_NOOP("dash-core", "Masternode:"),
-QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)"),
-QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)"),
+QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Missing input transaction information."),
+QT_TRANSLATE_NOOP("dash-core", "Mixing in progress..."),
+QT_TRANSLATE_NOOP("dash-core", "Need to specify a port with -whitebind: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "No Masternodes detected."),
 QT_TRANSLATE_NOOP("dash-core", "No compatible Masternode found."),
 QT_TRANSLATE_NOOP("dash-core", "No funds detected in need of denominating."),
 QT_TRANSLATE_NOOP("dash-core", "No matching denominations found for mixing."),
+QT_TRANSLATE_NOOP("dash-core", "Node relay options:"),
 QT_TRANSLATE_NOOP("dash-core", "Non-standard public key detected."),
 QT_TRANSLATE_NOOP("dash-core", "Not compatible with existing transactions."),
 QT_TRANSLATE_NOOP("dash-core", "Not enough file descriptors available."),
 QT_TRANSLATE_NOOP("dash-core", "Not in the Masternode list."),
-QT_TRANSLATE_NOOP("dash-core", "Only accept block chain matching built-in checkpoints (default: 1)"),
-QT_TRANSLATE_NOOP("dash-core", "Only connect to nodes in network <net> (IPv4, IPv6 or Tor)"),
+QT_TRANSLATE_NOOP("dash-core", "Number of automatic wallet backups (default: 10)"),
+QT_TRANSLATE_NOOP("dash-core", "Only accept block chain matching built-in checkpoints (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Only connect to nodes in network <net> (ipv4, ipv6 or onion)"),
 QT_TRANSLATE_NOOP("dash-core", "Options:"),
 QT_TRANSLATE_NOOP("dash-core", "Password for JSON-RPC connections"),
-QT_TRANSLATE_NOOP("dash-core", "Prepend debug output with timestamp (default: 1)"),
-QT_TRANSLATE_NOOP("dash-core", "Print block on startup, if found in block index"),
-QT_TRANSLATE_NOOP("dash-core", "Print block tree on startup (default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Prepend debug output with timestamp (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
-QT_TRANSLATE_NOOP("dash-core", "RPC client options:"),
 QT_TRANSLATE_NOOP("dash-core", "RPC server options:"),
+QT_TRANSLATE_NOOP("dash-core", "RPC support for HTTP persistent connections (default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", "Randomly drop 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("dash-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("dash-core", "Rebuild block chain index from current blk000??.dat files"),
+QT_TRANSLATE_NOOP("dash-core", "Relay and mine data carrier transactions (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Relay non-P2SH multisig (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Rescan the block chain for missing wallet transactions"),
 QT_TRANSLATE_NOOP("dash-core", "Rescanning..."),
-QT_TRANSLATE_NOOP("dash-core", "Run a thread to flush wallet periodically (default: 1)"),
+QT_TRANSLATE_NOOP("dash-core", "Run a thread to flush wallet periodically (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Run in the background as a daemon and accept commands"),
-QT_TRANSLATE_NOOP("dash-core", "SSL options: (see the Bitcoin Wiki for SSL setup instructions)"),
-QT_TRANSLATE_NOOP("dash-core", "Select SOCKS version for -proxy (4 or 5, default: 5)"),
-QT_TRANSLATE_NOOP("dash-core", "Send command to Dash Core"),
-QT_TRANSLATE_NOOP("dash-core", "Send commands to node running on <ip> (default: 127.0.0.1)"),
 QT_TRANSLATE_NOOP("dash-core", "Send trace/debug info to console instead of debug.log file"),
-QT_TRANSLATE_NOOP("dash-core", "Server certificate file (default: server.cert)"),
-QT_TRANSLATE_NOOP("dash-core", "Server private key (default: server.pem)"),
+QT_TRANSLATE_NOOP("dash-core", "Send transactions as zero-fee transactions if possible (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Server certificate file (default: %s)"),
+QT_TRANSLATE_NOOP("dash-core", "Server private key (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Session not complete!"),
 QT_TRANSLATE_NOOP("dash-core", "Session timed out, please resubmit."),
 QT_TRANSLATE_NOOP("dash-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
-QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: 1000)"),
+QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Set maximum block size in bytes (default: %d)"),
-QT_TRANSLATE_NOOP("dash-core", "Set minimum block size in bytes (default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Set minimum block size in bytes (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Set the masternode private key"),
-QT_TRANSLATE_NOOP("dash-core", "Set the number of threads to service RPC calls (default: 4)"),
-QT_TRANSLATE_NOOP("dash-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: 1)"),
+QT_TRANSLATE_NOOP("dash-core", "Set the number of threads to service RPC calls (default: %d)"),
+QT_TRANSLATE_NOOP("dash-core", "Sets the DB_PRIVATE flag in the wallet db environment (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Show all debugging options (usage: --help -help-debug)"),
-QT_TRANSLATE_NOOP("dash-core", "Show benchmark information (default: 0)"),
 QT_TRANSLATE_NOOP("dash-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
 QT_TRANSLATE_NOOP("dash-core", "Signing failed."),
 QT_TRANSLATE_NOOP("dash-core", "Signing timed out, please resubmit."),
 QT_TRANSLATE_NOOP("dash-core", "Signing transaction failed"),
-QT_TRANSLATE_NOOP("dash-core", "Specify configuration file (default: dash.conf)"),
-QT_TRANSLATE_NOOP("dash-core", "Specify connection timeout in milliseconds (default: 5000)"),
+QT_TRANSLATE_NOOP("dash-core", "Specify configuration file (default: %s)"),
+QT_TRANSLATE_NOOP("dash-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", "Specify data directory"),
-QT_TRANSLATE_NOOP("dash-core", "Specify masternode configuration file (default: masternode.conf)"),
-QT_TRANSLATE_NOOP("dash-core", "Specify pid file (default: dashd.pid)"),
+QT_TRANSLATE_NOOP("dash-core", "Specify masternode configuration file (default: %s)"),
+QT_TRANSLATE_NOOP("dash-core", "Specify pid file (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Specify wallet file (within data directory)"),
 QT_TRANSLATE_NOOP("dash-core", "Specify your own public address"),
-QT_TRANSLATE_NOOP("dash-core", "Spend unconfirmed change when sending transactions (default: 1)"),
-QT_TRANSLATE_NOOP("dash-core", "Start Dash Core Daemon"),
-QT_TRANSLATE_NOOP("dash-core", "System error: "),
+QT_TRANSLATE_NOOP("dash-core", "Spend unconfirmed change when sending transactions (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Stop running after importing blocks from disk (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Submitted following entries to masternode: %u / %d"),
+QT_TRANSLATE_NOOP("dash-core", "Submitted to masternode, waiting for more entries ( %u / %d ) %s"),
+QT_TRANSLATE_NOOP("dash-core", "Submitted to masternode, waiting in queue %s"),
 QT_TRANSLATE_NOOP("dash-core", "This help message"),
+QT_TRANSLATE_NOOP("dash-core", "This is experimental software."),
 QT_TRANSLATE_NOOP("dash-core", "This is intended for regression testing tools and app development."),
 QT_TRANSLATE_NOOP("dash-core", "This is not a Masternode."),
-QT_TRANSLATE_NOOP("dash-core", "Threshold for disconnecting misbehaving peers (default: 100)"),
-QT_TRANSLATE_NOOP("dash-core", "To use the %s option"),
+QT_TRANSLATE_NOOP("dash-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Transaction amount too small"),
 QT_TRANSLATE_NOOP("dash-core", "Transaction amounts must be positive"),
 QT_TRANSLATE_NOOP("dash-core", "Transaction created successfully."),
 QT_TRANSLATE_NOOP("dash-core", "Transaction fees are too high."),
 QT_TRANSLATE_NOOP("dash-core", "Transaction not valid."),
+QT_TRANSLATE_NOOP("dash-core", "Transaction too large for fee policy"),
 QT_TRANSLATE_NOOP("dash-core", "Transaction too large"),
+QT_TRANSLATE_NOOP("dash-core", "Transmitting final transaction."),
 QT_TRANSLATE_NOOP("dash-core", "Unable to bind to %s on this computer (bind returned error %s)"),
-QT_TRANSLATE_NOOP("dash-core", "Unable to sign masternode payment winner, wrong key?"),
 QT_TRANSLATE_NOOP("dash-core", "Unable to sign spork message, wrong key?"),
-QT_TRANSLATE_NOOP("dash-core", "Unknown -socks proxy version requested: %i"),
 QT_TRANSLATE_NOOP("dash-core", "Unknown network specified in -onlynet: '%s'"),
+QT_TRANSLATE_NOOP("dash-core", "Unknown state: id = %u"),
 QT_TRANSLATE_NOOP("dash-core", "Upgrade wallet to latest format"),
-QT_TRANSLATE_NOOP("dash-core", "Usage (deprecated, use dash-cli):"),
-QT_TRANSLATE_NOOP("dash-core", "Usage:"),
-QT_TRANSLATE_NOOP("dash-core", "Use KeePass 2 integration using KeePassHttp plugin (default: 0)"),
-QT_TRANSLATE_NOOP("dash-core", "Use N separate masternodes to anonymize funds  (2-8, default: 2)"),
+QT_TRANSLATE_NOOP("dash-core", "Use KeePass 2 integration using KeePassHttp plugin (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Use N separate masternodes to anonymize funds  (2-8, default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Use OpenSSL (https) for JSON-RPC connections"),
-QT_TRANSLATE_NOOP("dash-core", "Use UPnP to map the listening port (default: 0)"),
+QT_TRANSLATE_NOOP("dash-core", "Use UPnP to map the listening port (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Use UPnP to map the listening port (default: 1 when listening)"),
 QT_TRANSLATE_NOOP("dash-core", "Use the test network"),
 QT_TRANSLATE_NOOP("dash-core", "Username for JSON-RPC connections"),
 QT_TRANSLATE_NOOP("dash-core", "Value more than Darksend pool maximum allows."),
 QT_TRANSLATE_NOOP("dash-core", "Verifying blocks..."),
 QT_TRANSLATE_NOOP("dash-core", "Verifying wallet..."),
-QT_TRANSLATE_NOOP("dash-core", "Wait for RPC server to start"),
 QT_TRANSLATE_NOOP("dash-core", "Wallet %s resides outside data directory %s"),
 QT_TRANSLATE_NOOP("dash-core", "Wallet is locked."),
-QT_TRANSLATE_NOOP("dash-core", "Wallet needed to be rewritten: restart Dash to complete"),
+QT_TRANSLATE_NOOP("dash-core", "Wallet needed to be rewritten: restart Dash Core to complete"),
 QT_TRANSLATE_NOOP("dash-core", "Wallet options:"),
 QT_TRANSLATE_NOOP("dash-core", "Warning"),
-QT_TRANSLATE_NOOP("dash-core", "Warning: Deprecated argument -debugnet ignored, use -debug=net"),
 QT_TRANSLATE_NOOP("dash-core", "Warning: This version is obsolete, upgrade required!"),
+QT_TRANSLATE_NOOP("dash-core", "Warning: Unsupported argument -benchmark ignored, use -debug=bench."),
+QT_TRANSLATE_NOOP("dash-core", "Warning: Unsupported argument -debugnet ignored, use -debug=net."),
+QT_TRANSLATE_NOOP("dash-core", "Will retry..."),
 QT_TRANSLATE_NOOP("dash-core", "You need to rebuild the database using -reindex to change -txindex"),
+QT_TRANSLATE_NOOP("dash-core", "Your entries added successfully."),
+QT_TRANSLATE_NOOP("dash-core", "Your transaction was accepted into the pool!"),
 QT_TRANSLATE_NOOP("dash-core", "Zapping all transactions from wallet..."),
 QT_TRANSLATE_NOOP("dash-core", "on startup"),
-QT_TRANSLATE_NOOP("dash-core", "version"),
 QT_TRANSLATE_NOOP("dash-core", "wallet.dat corrupt, salvage failed"),
 };
diff --git a/src/qt/locale/dash_en.ts b/src/qt/locale/dash_en.ts
index f26cf38774fa..7a8f8b574a58 100644
--- a/src/qt/locale/dash_en.ts
+++ b/src/qt/locale/dash_en.ts
@@ -1,201 +1,143 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.1" language="en">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>About Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;/b&gt; version</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-YYYY The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">The Bitcoin Core developers</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">The Dash Core developers</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<TS version="2.0" language="en">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Double-click to edit address or label</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Right-click to edit address or label</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Create a new address</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;New</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copy the currently selected address to the system clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copy</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Delete the currently selected address from the list</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Delete</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Export the data in the current tab to a file</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Export</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>C&amp;lose</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Choose the address to send coins to</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Choose the address to receive coins with</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>C&amp;hoose</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Sending addresses</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Receiving addresses</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copy Address</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Copy &amp;Label</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Edit</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Export Address List</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma separated file (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Exporting Failed</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">There was an error trying to save the address list to %1.</translation>
+        <translation>There was an error trying to save the address list to %1. Please try again.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Label</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Address</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(no label)</translation>
     </message>
@@ -203,154 +145,150 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Passphrase Dialog</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Enter passphrase</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>New passphrase</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Repeat new passphrase</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>For anonymization only</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Encrypt wallet</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>This operation needs your wallet passphrase to unlock the wallet.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Unlock wallet</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>This operation needs your wallet passphrase to decrypt the wallet.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Decrypt wallet</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Change passphrase</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Enter the old and new passphrase to the wallet.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Confirm wallet encryption</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Are you sure you wish to encrypt your wallet?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Wallet encrypted</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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: 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.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Wallet encryption failed</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>The supplied passphrases do not match.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Wallet unlock failed</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>The passphrase entered for the wallet decryption was incorrect.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Wallet decryption failed</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Wallet passphrase was successfully changed.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Warning: The Caps Lock key is on!</translation>
     </message>
@@ -358,443 +296,443 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
-        <location filename="../bitcoingui.cpp" line="814"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Node</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="251"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Show general overview of wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Send</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="262"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Send coins to a Dash address</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Receive</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="273"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Request payments (generates QR codes and dash: URIs)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transactions</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="284"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Browse transaction history</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>E&amp;xit</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="308"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Quit application</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;About Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Show information about Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="312"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Show information about Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="315"/>
-        <location filename="../bitcoingui.cpp" line="317"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>About &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="319"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Show information about Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Options...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="322"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Modify configuration options for Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Show / Hide</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="325"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Show or hide the main Window</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Encrypt Wallet...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="328"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Encrypt the private keys that belong to your wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Backup Wallet...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Backup wallet to another location</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Change Passphrase...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Change the passphrase used for wallet encryption</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Unlock Wallet...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Unlock wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Lock Wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Sign &amp;message...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Sign messages with your Dash addresses to prove you own them</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Verify message...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="340"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Verify messages to ensure they were signed with specified Dash addresses</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Show diagnostic information</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Debug console</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Open debugging console</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Network Monitor</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Show network monitor</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>&amp;Peers list</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Peers list</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="349"/>
+        <location line="+1"/>
         <source>Show peers info</source>
-        <translation type="unfinished"></translation>
+        <translation>Show peers info</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Wallet &amp;Repair</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Show wallet repair options</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
-        <translation type="unfinished"></translation>
+        <translation>Open &amp;Configuration File</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
-        <translation type="unfinished"></translation>
+        <translation>Open configuration file</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Show Automatic &amp;Backups</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Show automatically created wallet backups</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Sending addresses...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="354"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Show the list of used sending addresses and labels</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>&amp;Receiving addresses...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Show the list of used receiving addresses and labels</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Open &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="359"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Open a dash: URI or payment request</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="361"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Command-line options</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="555"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash Core client</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="734"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>Processed %n block of transaction history.</numerusform>
+            <numerusform>Processed %n blocks of transaction history.</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="363"/>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
         <translation>Show the Dash Core help message to get a list with possible Dash command-line options</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="399"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;File</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="413"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Settings</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="426"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Tools</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="435"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Help</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="446"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Tabs toolbar</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Dash client</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="699"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
         <translation>
-            <numerusform>%n active connection(s) to Dash network</numerusform>
-            <numerusform>%n active connection(s) to Dash network</numerusform>
+            <numerusform>%n active connection to Dash network</numerusform>
+            <numerusform>%n active connections to Dash network</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="714"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizing with network...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importing blocks from disk...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="720"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Reindexing blocks on disk...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="724"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>No block source available...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Processed %1 blocks of transaction history.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="739"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Up to date</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="760"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
         <translation>
-            <numerusform>%n hour(s)</numerusform>
-            <numerusform>%n hour(s)</numerusform>
+            <numerusform>%n hour</numerusform>
+            <numerusform>%n hours</numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="764"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
         <translation>
-            <numerusform>%n day(s)</numerusform>
-            <numerusform>%n day(s)</numerusform>
+            <numerusform>%n day</numerusform>
+            <numerusform>%n days</numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="768"/>
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
         <translation>
-            <numerusform>%n week(s)</numerusform>
-            <numerusform>%n week(s)</numerusform>
+            <numerusform>%n week</numerusform>
+            <numerusform>%n weeks</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 and %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
         <translation>
-            <numerusform>%n year(s)</numerusform>
-            <numerusform>%n year(s)</numerusform>
+            <numerusform>%n year</numerusform>
+            <numerusform>%n years</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="778"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 behind</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="783"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Catching up...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="799"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Last received block was generated %1 ago.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="801"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transactions after this will not yet be visible.</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="828"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="831"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Warning</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="834"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Information</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="908"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Sent transaction</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="908"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Incoming transaction</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="909"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -807,30 +745,25 @@ Address: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="979"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="989"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="999"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>A fatal error occurred. Dash can no longer continue safely and will quit.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -838,333 +771,302 @@ Address: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Coin Control Address Selection</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Quantity:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Amount:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Priority:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Fee:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Coin Selection</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Dust:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>After Fee:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Change:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(un)select all</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Tree mode</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>List mode</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
-        <translation type="unfinished"></translation>
+        <translation>(1 locked)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Amount</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Received with label</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
+        <translation>Received with address</translation>
     </message>
     <message>
-        <source>Label</source>
-        <translation type="obsolete">Label</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Address</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Darksend Rounds</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Confirmations</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Confirmed</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Priority</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Copy address</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copy label</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Copy amount</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Copy transaction ID</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Lock unspent</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Unlock unspent</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Copy quantity</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Copy fee</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copy after fee</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copy bytes</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copy priority</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copy low output</translation>
+        <translation>Copy dust</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copy change</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>highest</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>higher</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>high</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>medium-high</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Can vary +/- %1 satoshi(s) per input.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
-        <translation type="unfinished">n/a</translation>
+        <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>medium</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>low-medium</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>low</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>lower</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>lowest</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 locked)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>none</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Dust</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>yes</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>no</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>This label turns red, if the transaction size is greater than 1000 bytes.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>This means a fee of at least %1 per kB is required.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Can vary +/- 1 byte per input.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Transactions with higher priority are more likely to get included into a block.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>This label turns red, if the priority is smaller than &quot;medium&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>This label turns red, if any recipient receives an amount smaller than %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">This means a fee of at least %1 is required.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Amounts below 0.546 times the minimum relay fee are shown as dust.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">This label turns red, if the change is smaller than %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(no label)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>change from %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(change)</translation>
     </message>
@@ -1172,84 +1074,84 @@ Address: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Configure Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Basic Privacy</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>High Privacy</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Maximum Privacy</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Please select a privacy level.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Use 2 separate masternodes to mix funds up to 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Use 8 separate masternodes to mix funds up to 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Use 16 separate masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH per 1000 DASH you anonymize.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>This is the slowest and most secure option. Using maximum anonymity will cost</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Darksend Configuration</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</translation>
     </message>
@@ -1257,67 +1159,67 @@ Address: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Edit Address</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Label</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>The label associated with this address list entry</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Address</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>The address associated with this address list entry. This can only be modified for sending addresses.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>New receiving address</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>New sending address</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Edit receiving address</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Edit sending address</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>The entered address &quot;%1&quot; is not a valid Dash address.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>The entered address &quot;%1&quot; is already in the address book.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Could not unlock wallet.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>New key generation failed.</translation>
     </message>
@@ -1325,27 +1227,27 @@ Address: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>A new data directory will be created.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>name</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Directory already exists. Add %1 if you intend to create a new directory here.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Path already exists, and is not a directory.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Cannot create data directory here.</translation>
     </message>
@@ -1353,72 +1255,68 @@ Address: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Command-line options</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>version</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">About Dash Core</translation>
+        <translation>About Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="66"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Command-line options</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="67"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Usage:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>command-line options</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>UI options</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Choose data directory on startup (default: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="74"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Set language, for example &quot;de_DE&quot; (default: system locale)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="75"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Start minimized</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="76"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Set SSL root certificates for payment request (default: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="77"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Show splash screen on startup (default: 1)</translation>
     </message>
@@ -1426,107 +1324,85 @@ Address: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Welcome</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Welcome to Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>As this is the first time the program is launched, you can choose where Dash Core will store its data.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Use the default data directory</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Use a custom data directory:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Error: Specified data directory &quot;%1&quot; can not be created.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Error: Specified data directory &quot;%1&quot; cannot be created.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB of free space available</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB of free space available</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(of %1GB needed)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(of %1 GB needed)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Open URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Open payment request from URI or file</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Select payment request file</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Select payment request file to open</translation>
     </message>
@@ -1534,312 +1410,281 @@ Address: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Options</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Main</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Automatically start Dash after logging in to the system.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Start Dash on system login</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Size of &amp;database cache</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Number of script &amp;verification threads</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = auto, &lt;0 = leave that many cores free)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Darksend rounds to use</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
-        <translation type="unfinished"></translation>
+        <translation>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Amount of Dash to keep anonymized</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>W&amp;allet</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Accept connections from outside</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Allow incoming connections</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Connect to the Dash network through a SOCKS5 proxy.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Pay transaction &amp;fee</translation>
+        <translation>&amp;Connect through SOCKS5 proxy (default proxy):</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Expert</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Whether to show coin control features or not.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Enable coin &amp;control features</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>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.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Spend unconfirmed change</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Network</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Map port using &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Connect to the Dash network through a SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Connect through SOCKS proxy (default proxy):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Port:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port of the proxy (e.g. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">SOCKS &amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">SOCKS version of the proxy (e.g. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Window</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Show only a tray icon after minimizing the window.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimize to the tray instead of the taskbar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimize on close</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Display</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>User Interface &amp;language:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>The user interface language can be set here. This setting will take effect after restarting Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
-        <translation type="unfinished"></translation>
+        <translation>Language missing or translation incomplete? Help contributing translations here:
+https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>User Interface Theme:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unit to show amounts in:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Choose the default subdivision unit to show in the interface and when sending coins.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Whether to show Dash addresses in the transaction list or not.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Display addresses in transaction list</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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>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 |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>Third party transaction URLs</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Active command-line options that override above options:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Reset all client options to default.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Reset Options</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Cancel</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>default</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>none</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Confirm options reset</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Client restart required to activate changes.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Client will be shutdown, do you want to proceed?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>This change would require a client restart.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>The supplied proxy address is invalid.</translation>
     </message>
@@ -1847,370 +1692,280 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Form</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Wallet</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Available:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Your current spendable balance</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Pending:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Immature:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Mined balance that has not yet matured</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Balances</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Unconfirmed transactions to watch-only addresses</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Mined balance in watch-only addresses that has not yet matured</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Your current total balance</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Current total balance in watch-only addresses</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Watch-only:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Your current balance in watch-only addresses</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Spendable:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Status:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Enabled/Disabled</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Completion:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Darksend Balance:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Amount and Rounds:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Rounds</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Submitted Denom:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="497"/>
-        <location filename="../overviewpage.cpp" line="511"/>
-        <location filename="../overviewpage.cpp" line="525"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Recent transactions</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Start/Stop Mixing</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Last Message)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Try to manually submit a Darksend request.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Try Mix</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Reset</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Recent transactions&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>out of sync</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="157"/>
-        <location filename="../overviewpage.cpp" line="158"/>
-        <location filename="../overviewpage.cpp" line="394"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Disabled</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="396"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Start Darksend Mixing</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="163"/>
-        <location filename="../overviewpage.cpp" line="541"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Stop Darksend Mixing</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="314"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>No inputs detected</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation>
+            <numerusform>%n Round</numerusform>
+            <numerusform>%n Rounds</numerusform>
+        </translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="322"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="379"/>
-        <source>Rounds</source>
-        <translation>Rounds</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="410"/>
-        <source>Enabled</source>
-        <translation>Enabled</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation>
+            <numerusform>Progress: %1% (inputs have an average of %2 of %n round)</numerusform>
+            <numerusform>Progress: %1% (inputs have an average of %2 of %n rounds)</numerusform>
+        </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <location filename="../overviewpage.cpp" line="439"/>
-        <location filename="../overviewpage.cpp" line="440"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Found enough compatible inputs to anonymize %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <location filename="../overviewpage.cpp" line="445"/>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <location filename="../overviewpage.cpp" line="459"/>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Enabled</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="468"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Last Darksend message:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="421"/>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend is idle.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="425"/>
-        <source>Mixing in progress...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="431"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Darksend request complete: Your transaction was accepted into the pool!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Submitted following entries to masternode:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Submitted to masternode, Waiting for more entries</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Found enough users, signing ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Found enough users, signing ( waiting. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Found enough users, signing ( waiting.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Found enough users, signing ( waiting... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Transmitting final transaction.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Finalizing transaction.</source>
-        <translation>Finalizing transaction.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Darksend request incomplete:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Will retry...</source>
-        <translation>Will retry...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <source>Darksend request complete:</source>
-        <translation>Darksend request complete:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Submitted to masternode, waiting in queue .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Submitted to masternode, waiting in queue ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Submitted to masternode, waiting in queue ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="462"/>
-        <source>Unknown state:</source>
-        <translation>Unknown state:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="476"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="498"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend was successfully reset.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="512"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend requires at least %1 to use.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="526"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Wallet is locked and user declined to unlock. Disabling Darksend.</translation>
     </message>
@@ -2218,141 +1973,121 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Payment request error</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Cannot start dash: click-to-pay handler</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Net manager warning</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>URI handling</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Payment request fetch URL is invalid: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Payment request file handling</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Payment request file can not be read or processed! This can be caused by an invalid payment request file.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Invalid payment address %1</translation>
+        <translation>Invalid payment address %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request file cannot be read! This can be caused by an invalid payment request file.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request rejected</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request network doesn&apos;t match client network.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request has expired.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request is not initialized.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Unverified payment requests to custom payment scripts are unsupported.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Requested payment amount of %1 is too small (considered dust).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Refund from %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Payment request DoS protection</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Error communicating with %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Payment request can not be parsed or processed!</translation>
+        <translation>Payment request cannot be parsed!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Bad response from server %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Network request error</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Payment acknowledged</translation>
     </message>
@@ -2360,139 +2095,98 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Address/Hostname</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>User Agent</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Ping Time</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: Specified data directory &quot;%1&quot; does not exist.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Error: Cannot parse configuration file: %1. Only use key=value syntax.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Error reading masternode configuration file: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Error: Invalid combination of -regtest and -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core didn&apos;t yet exit safely...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="234"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Amount</translation>
+        <translation>Amount</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Enter a Dash address (e.g. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>NETWORK</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>UNKNOWN</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>None</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N/A</translation>
+        <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Save Image...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Copy Image</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Save QR Code</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>PNG Image (*.png)</translation>
     </message>
@@ -2500,432 +2194,495 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Tools window</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="328"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Masternode Count</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="75"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>General</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="279"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Name</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="82"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Client name</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
-        <location filename="../forms/rpcconsole.ui" line="122"/>
-        <location filename="../forms/rpcconsole.ui" line="145"/>
-        <location filename="../forms/rpcconsole.ui" line="168"/>
-        <location filename="../forms/rpcconsole.ui" line="230"/>
-        <location filename="../forms/rpcconsole.ui" line="253"/>
-        <location filename="../forms/rpcconsole.ui" line="289"/>
-        <location filename="../forms/rpcconsole.ui" line="315"/>
-        <location filename="../forms/rpcconsole.ui" line="338"/>
-        <location filename="../forms/rpcconsole.ui" line="761"/>
-        <location filename="../forms/rpcconsole.ui" line="784"/>
-        <location filename="../forms/rpcconsole.ui" line="807"/>
-        <location filename="../forms/rpcconsole.ui" line="830"/>
-        <location filename="../forms/rpcconsole.ui" line="853"/>
-        <location filename="../forms/rpcconsole.ui" line="876"/>
-        <location filename="../forms/rpcconsole.ui" line="899"/>
-        <location filename="../forms/rpcconsole.ui" line="922"/>
-        <location filename="../forms/rpcconsole.ui" line="945"/>
-        <location filename="../forms/rpcconsole.ui" line="968"/>
-        <location filename="../forms/rpcconsole.ui" line="991"/>
-        <location filename="../forms/rpcconsole.ui" line="1014"/>
-        <location filename="../forms/rpcconsole.ui" line="1037"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="112"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Number of connections</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="188"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="191"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Open</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="135"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Startup time</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="272"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Network</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="181"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Last block time</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="207"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Debug log file</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="302"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Using OpenSSL version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Build date</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="158"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Current number of blocks</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="243"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Client version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Using BerkeleyDB version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="362"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="411"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Clear console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="434"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Network Traffic</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="486"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Clear</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="502"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Totals</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="566"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Received</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="646"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Sent</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="687"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Peers</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="726"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="600"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Select a peer to view detailed information.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="751"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Direction</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>User Agent</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Services</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Starting Height</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Sync Height</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Ban Score</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Connection Time</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Last Send</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Last Receive</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Sent</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Received</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Ping Time</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Wallet Repair</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Salvage wallet</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Rescan blockchain files</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Recover transactions 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Recover transactions 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Upgrade wallet format</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Rescan the block chain for missing wallet transactions.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Wallet repair options.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Rebuild index</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Rebuild block chain index from current blk000??.dat files.</translation>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>In:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Out:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Welcome to the Dash RPC console.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="638"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>via %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="641"/>
-        <location filename="../rpcconsole.cpp" line="642"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>never</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="649"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Inbound</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="649"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Outbound</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="662"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Unknown</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="664"/>
-        <location filename="../rpcconsole.cpp" line="665"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation>Fetching...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;euse an existing receiving address (not recommended)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Message:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>An optional label to associate with the new receiving address.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Label:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>An optional amount to request. Leave this empty or zero to not request a specific amount.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Amount:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Request payment</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Clear all fields of the form.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Clear</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Requested payments history</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Show the selected request (does the same as double clicking an entry)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Show</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Remove the selected entries from the list</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Remove</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Copy label</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Copy message</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copy amount</translation>
     </message>
@@ -2933,67 +2690,67 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR Code</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copy &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copy &amp;Address</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Save Image...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Request payment to %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Payment information</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Address</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Amount</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Label</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Resulting URI too long, try to reduce the text for label / message.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Error encoding URI into QR Code.</translation>
     </message>
@@ -3001,37 +2758,37 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Label</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Amount</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(no label)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(no message)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(no amount)</translation>
     </message>
@@ -3039,412 +2796,399 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="597"/>
-        <location filename="../sendcoinsdialog.cpp" line="609"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Coin Control Features</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Inputs...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>automatically selected</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Insufficient funds!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Quantity:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Amount:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Priority:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
-        <translation type="unfinished">medium</translation>
+        <translation>medium</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Fee:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Dust:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
-        <translation type="unfinished">no</translation>
+        <translation>no</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>After Fee:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Change:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Custom change address</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Transaction Fee:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Choose...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>collapse fee-settings</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimize</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>per kilobyte</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>total at least</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
+        <location line="+30"/>
+        <location line="+13"/>
         <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <translation>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(read the tooltip)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Recommended:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Custom:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Smart fee not initialized yet. This usually takes a few blocks...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Confirmation time:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normal</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>fast</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Send as zero-fee transaction if possible</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(confirmation may take longer)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Confirm the send action</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>S&amp;end</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Clear all fields of the form.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Clear &amp;All</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Send to multiple recipients at once</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Add &amp;Recipient</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Balance:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Copy quantity</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="67"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copy amount</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="68"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Copy fee</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copy after fee</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copy bytes</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copy priority</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copy low output</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Copy dust</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copy change</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="228"/>
-        <location filename="../sendcoinsdialog.cpp" line="234"/>
-        <location filename="../sendcoinsdialog.cpp" line="243"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
-        <translation type="unfinished"></translation>
+        <translation>using</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="228"/>
-        <location filename="../sendcoinsdialog.cpp" line="234"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
-        <translation type="unfinished"></translation>
+        <translation>anonymous funds</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="238"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend requires this amount to be rounded up to the nearest %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="243"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
-        <translation type="unfinished"></translation>
+        <translation>any available funds (not recommended)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="249"/>
+        <location line="+6"/>
         <source>and InstantX</source>
-        <translation type="unfinished"></translation>
+        <translation>and InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="273"/>
-        <location filename="../sendcoinsdialog.cpp" line="278"/>
-        <location filename="../sendcoinsdialog.cpp" line="283"/>
-        <location filename="../sendcoinsdialog.cpp" line="287"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 to %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="336"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Are you sure you want to send?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="345"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>are added as transaction fee</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="362"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Total Amount %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="364"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>or</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="366"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Confirm send coins</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Payment request expired</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>A fee %1 times higher than %2 per kB is considered an insanely high fee.</translation>
+    </message>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation>
+            <numerusform>Estimated to begin confirmation within %n block.</numerusform>
+            <numerusform>Estimated to begin confirmation within %n blocks.</numerusform>
+        </translation>
     </message>
     <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Invalid payment address %1</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="574"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>The recipient address is not valid, please recheck.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="577"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>The amount to pay must be larger than 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="580"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>The amount exceeds your balance.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="583"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>The total exceeds your balance when the %1 transaction fee is included.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Duplicate address found, can only send to each address once per send operation.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="589"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Transaction creation failed!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="593"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="598"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Error: The wallet was unlocked only to anonymize coins.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="601"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="688"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="710"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Pay only the minimum fee of %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="817"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Warning: Invalid Dash address</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="826"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Warning: Unknown change address</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="837"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(no label)</translation>
     </message>
@@ -3452,102 +3196,98 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>This is a normal payment.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Pay &amp;To:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>The Dash address to send the payment to</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Choose previously used address</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Paste address from clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Remove this entry</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Label:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Enter a label for this address to add it to the list of used addresses</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>A&amp;mount:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Message:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>This is an unverified payment request.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Pay To:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Memo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>This is a verified payment request.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Enter a label for this address to add it to your address book</translation>
     </message>
@@ -3555,12 +3295,12 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="120"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core is shutting down...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="121"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Do not shut down the computer until this window disappears.</translation>
     </message>
@@ -3568,193 +3308,181 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Signatures - Sign / Verify a Message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Sign Message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>The Dash address to sign the message with</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Choose previously used address</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Paste address from clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Enter the message you want to sign here</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Signature</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copy the current signature to the system clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Sign the message to prove you own this Dash address</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Sign &amp;Message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Reset all sign message fields</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Clear &amp;All</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Verify Message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Enter the signing 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.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>The Dash address the message was signed with</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Verify the message to ensure it was signed with the specified Dash address</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Verify &amp;Message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Reset all verify message fields</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Click &quot;Sign Message&quot; to generate signature</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>The entered address is invalid.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Please check the address and try again.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>The entered address does not refer to a key.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Wallet unlock was cancelled.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Private key for the entered address is not available.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Message signing failed.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Message signed.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>The signature could not be decoded.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Please check the signature and try again.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>The signature did not match the message digest.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Message verification failed.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Message verified.</translation>
     </message>
@@ -3762,27 +3490,27 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Version %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>The Bitcoin Core developers</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>The Dash Core developers</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3790,7 +3518,7 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3798,254 +3526,254 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
         <translation>
-            <numerusform>Open for %n more block(s)</numerusform>
-            <numerusform>Open for %n more block(s)</numerusform>
+            <numerusform>Open for %n more block</numerusform>
+            <numerusform>Open for %n more blocks</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Open until %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>conflicted</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/offline (verified via instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/confirmed (verified via instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 confirmations (verified via instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/unconfirmed</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 confirmations</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/offline (InstantX verification in progress - %2 of %3 signatures)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/offline (InstantX verification failed)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/confirmed (InstantX verification failed)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Status</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, has not been successfully broadcast yet</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
         <translation>
-            <numerusform>, broadcast through %n node(s)</numerusform>
-            <numerusform>, broadcast through %n node(s)</numerusform>
+            <numerusform>, broadcast through %n node</numerusform>
+            <numerusform>, broadcast through %n nodes</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Source</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Generated</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>From</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>unknown</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>To</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>own address</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>watch-only</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>label</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Credit</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
         <translation>
-            <numerusform>matures in %n more block(s)</numerusform>
-            <numerusform>matures in %n more block(s)</numerusform>
+            <numerusform>matures in %n more block</numerusform>
+            <numerusform>matures in %n more blocks</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>not accepted</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Debit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total debit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total credit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Transaction fee</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Net amount</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Comment</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>Transaction ID</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Merchant</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Debug information</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transaction</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Inputs</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Amount</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>true</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>false</translation>
     </message>
@@ -4053,12 +3781,12 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Transaction details</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>This pane shows a detailed description of the transaction</translation>
     </message>
@@ -4066,169 +3794,165 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Type</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Address</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Amount</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
         <translation>
-            <numerusform>Open for %n more block(s)</numerusform>
-            <numerusform>Open for %n more block(s)</numerusform>
+            <numerusform>Open for %n more block</numerusform>
+            <numerusform>Open for %n more blocks</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Open until %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Offline</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Unconfirmed</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Confirming (%1 of %2 recommended confirmations)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Confirmed (%1 confirmations)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Conflicted</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Immature (%1 confirmations, will be available after %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>This block was not received by any other nodes and will probably not be accepted!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Generated but not accepted</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Received with</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Received from</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Received via Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Sent to</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Payment to yourself</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Mined</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominate</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Collateral Payment</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Make Collateral Inputs</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Create Denominations</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>watch-only</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Transaction status. Hover over this field to show number of confirmations.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Date and time that the transaction was received.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Type of transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Whether or not a watch-only address is involved in this transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Destination address of transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Amount removed from or added to balance.</translation>
     </message>
@@ -4236,207 +3960,208 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>All</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Today</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>This week</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>This month</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Last month</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>This year</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Range...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Most Common</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Received with</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Sent to</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Make Collateral Inputs</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Create Denominations</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominate</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Collateral Payment</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>To yourself</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Mined</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Other</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Enter address or label to search</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Min amount</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copy address</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copy label</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copy amount</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Copy transaction ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Edit label</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Show transaction details</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Export Transaction History</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Comma separated file (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Confirmed</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Watch-only</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Type</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Label</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Address</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Amount</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Exporting Failed</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>There was an error trying to save the transaction history to %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Exporting Successful</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>The transaction history was successfully saved to %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Range:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>to</translation>
     </message>
@@ -4444,15 +4169,15 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1107"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Unit to show amounts in. Click to select another unit.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>No wallet has been loaded.</translation>
     </message>
@@ -4460,59 +4185,58 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Export</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Export the data in the current tab to a file</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Backup Wallet</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Wallet Data (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Backup Failed</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>There was an error trying to save the wallet data to %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Backup Successful</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>The wallet data was successfully saved to %1.</translation>
     </message>
@@ -4520,1370 +4244,1429 @@ https://www.transifex.com/projects/p/dash/</source>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>An error occurred while setting up the RPC port %u for listening on IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Bind to given address and always listen on it. Use [host]:port notation for IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Disable all Masternode and Darksend related functionality (0-1, default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Enable instantx, show confirmations for locked transactions (bool, default: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: Listening for incoming connections failed (listen returned error %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Error: Wallet unlocked for anonymization only, unable to create transaction.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Fees smaller than this are considered zero fee (for transaction creation) (default:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Found unconfirmed denominated outputs, will wait till they confirm to continue.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>How thorough the block verification of -checkblocks is (0-4, default: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In this mode -genproclimit controls how many blocks are generated immediately.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Name to construct url for KeePass entry that stores the wallet passphrase</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Set external address:port to get to this masternode (example: address:port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Unable to bind to %s on this computer. Dash Core is probably already running.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Unable to locate enough Darksend denominated funds for this transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Unable to locate enough Darksend non-denominated funds for this transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(default: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(default: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; can be:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Add a node to connect to and attempt to keep the connection open</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Allow JSON-RPC connections from specified IP address</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Already have that input.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Always query for peer addresses via DNS lookup (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Attempt to recover private keys from a corrupt wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Block creation options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Can&apos;t denominate: no compatible inputs left.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Cannot resolve -externalip address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Cannot write default address</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Clear list of wallet transactions (diagnostic tool; implies -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Collateral is not valid.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Collateral not valid.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Connect only to the specified node(s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Connect through SOCKS proxy</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Connection options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Corrupted block database detected</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Dash Core RPC client version</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend is disabled.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Darksend options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Debugging/Testing options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Disable safemode, override a real safe mode event (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Discover own IP address (default: 1 when listening and no -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Do not load the wallet and disable wallet RPC calls</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Do you want to rebuild the block database now?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Done loading</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Enable the client to act as a masternode (0-1, default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Entries are full.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Error connecting to masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Error initializing block database</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Error initializing wallet database environment %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Error loading block database</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Error loading wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error loading wallet.dat: Wallet corrupted</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Error loading wallet.dat: Wallet requires newer version of Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Error opening block database</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Error reading from database, shutting down.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Error recovering public key.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Error: Disk space is low!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: Wallet locked, unable to create transaction!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Error: You already have pending entries in the Darksend pool</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Error: system error: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Failed to listen on any port. Use -listen=0 if you want this.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Failed to read block info</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Failed to read block</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Failed to sync block index</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>If &lt;category&gt; is not supplied, output all debugging information.</translation>
+    </message>
+    <message>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Failed to write block index</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Failed to write block info</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>An error occurred while setting up the RPC address %s port %u for listening: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Failed to write block</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Failed to write file info</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Failed to write to coin database</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Failed to write transaction index</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Failed to write undo data</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Fee per kB to add to transactions you send</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Fees smaller than this are considered zero fee (for relaying) (default:</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Disable all Masternode and Darksend related functionality (0-1, default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Force safe mode (default: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generate coins (default: 0)</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Enable instantx, show confirmations for locked transactions (bool, default: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Get help for a command</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>How many blocks to check at startup (default: 288, 0 = all)</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>If &lt;category&gt; is not supplied, output all debugging information.</translation>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>How thorough the block verification of -checkblocks is (0-4, default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Log transaction priority and fee per kB when mining blocks (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximum size of data in data carrier transactions we relay and mine (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ignore masternodes less than version (example: 70050; default : 0)</translation>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Require high priority for relaying free or low-fee transactions (default:%u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(default: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; can be:
+</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accept public REST requests (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Acceptable ciphers (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Always query for peer addresses via DNS lookup (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Cannot resolve -whitebind address: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connect through SOCKS5 proxy</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i The Dash Core Developers</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Could not parse -rpcbind value %s as network address</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend is idle.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Darksend request complete:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Darksend request incomplete:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Disable safemode, override a real safe mode event (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Enable the client to act as a masternode (0-1, default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Error connecting to Masternode.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Error loading wallet.dat: Wallet requires newer version of Dash Core</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Error: A fatal internal error occured, see debug.log for details</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: Unsupported argument -tor found, use -onion.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Fee (in DASH/kB) to add to transactions you send (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Finalizing transaction.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Force safe mode (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Found enough users, signing ( waiting %s )</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Found enough users, signing ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generate coins (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>How many blocks to check at startup (default: %u, 0 = all)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Ignore masternodes less than version (example: 70050; default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importing...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Imports blocks from external blk000??.dat file</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Include IP addresses in debug output (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Incompatible mode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Incompatible version.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Incorrect or no genesis block found. Wrong datadir for network?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Information</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Initialization sanity check failed. Dash Core is shutting down.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Input is not valid.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>InstantX options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Insufficient funds</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Insufficient funds.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Invalid -onion address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Invalid -proxy address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Invalid amount</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Last successful Darksend action was too recent.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limit size of signature cache to &lt;n&gt; entries (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Lock masternodes from masternode configuration file (default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Maintain at most &lt;n&gt; connections to peers (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Mixing in progress...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Need to specify a port with -whitebind: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>No Masternodes detected.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>No compatible Masternode found.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Not in the Masternode list.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Number of automatic wallet backups (default: 10)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Only accept block chain matching built-in checkpoints (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Prepend debug output with timestamp (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Run a thread to flush wallet periodically (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Send transactions as zero-fee transactions if possible (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Server certificate file (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Server private key (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Session timed out, please resubmit.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Set key pool size to &lt;n&gt; (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Set minimum block size in bytes (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Set the number of threads to service RPC calls (default: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Specify configuration file (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Specify connection timeout in milliseconds (minimum: 1, default: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Specify masternode configuration file (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Specify pid file (default: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Spend unconfirmed change when sending transactions (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Stop running after importing blocks from disk (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Submitted following entries to masternode: %u / %d</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Submitted to masternode, waiting for more entries ( %u / %d ) %s</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Submitted to masternode, waiting in queue %s</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>This is not a Masternode.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Threshold for disconnecting misbehaving peers (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Use N separate masternodes to anonymize funds  (2-8, default: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Use UPnP to map the listening port (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Wallet needed to be rewritten: restart Dash Core to complete</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Warning: Unsupported argument -debugnet ignored, use -debug=net.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Will retry...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Invalid masternodeprivkey. Please see documenation.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>Invalid netmask specified in -whitelist: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Invalid private key.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Invalid script detected.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>KeePassHttp id for the established association</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>KeePassHttp key for AES encrypted communication with KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Keep N dash anonymized (default: 0)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Keep N DASH anonymized (default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>Last Darksend was too recent.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Last successful darksend action was too recent.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>List commands</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Loading block index...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Loading budget cache...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <translation>Loading masternode cache...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Loading wallet... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Log transaction priority and fee per kB when mining blocks (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Maintain a full transaction index (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Maintain at most &lt;n&gt; connections to peers (default: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Masternode options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>Masternode queue is full.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Missing input transaction information.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>No compatible masternode found.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>No funds detected in need of denominating.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>No masternodes detected.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>No matching denominations found for mixing.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Node relay options:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Non-standard public key detected.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Not compatible with existing transactions.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Not enough file descriptors available.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Not in the masternode list.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Only accept block chain matching built-in checkpoints (default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password for JSON-RPC connections</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Prepend debug output with timestamp (default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Print block on startup, if found in block index</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Print block tree on startup (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>RPC client options:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>RPC server options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC support for HTTP persistent connections (default: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Randomly drop 1 of every &lt;n&gt; network messages</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Randomly fuzz 1 of every &lt;n&gt; network messages</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Relay and mine data carrier transactions (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Relay non-P2SH multisig (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Rescan the block chain for missing wallet transactions</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Rescanning...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Run a thread to flush wallet periodically (default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Select SOCKS version for -proxy (4 or 5, default: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Send command to Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Send trace/debug info to console instead of debug.log file</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Server certificate file (default: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Server private key (default: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Session not complete!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Session timed out (30 seconds), please resubmit.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Set database cache size in megabytes (%d to %d, default: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Set key pool size to &lt;n&gt; (default: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Set maximum block size in bytes (default: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Set minimum block size in bytes (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Set the masternode private key</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Set the number of threads to service RPC calls (default: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Show all debugging options (usage: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Show benchmark information (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Shrink debug.log file on client startup (default: 1 when no -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Signing failed.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>Signing timed out, please resubmit.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Signing transaction failed</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Specify configuration file (default: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specify connection timeout in milliseconds (default: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Specify data directory</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Specify masternode configuration file (default: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Specify pid file (default: dashd.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Specify wallet file (within data directory)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Specify your own public address</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Spend unconfirmed change when sending transactions (default: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Start Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>System error: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>This help message</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>This is intended for regression testing tools and app development.</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>This is experimental software.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>This is not a masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Threshold for disconnecting misbehaving peers (default: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>To use the %s option</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>This is intended for regression testing tools and app development.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Transaction amount too small</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Transaction amounts must be positive</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transaction created successfully.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Transaction fees are too high.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Transaction not valid.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaction too large for fee policy</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transaction too large</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Unable to bind to %s on this computer (bind returned error %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Transmitting final transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Unable to sign masternode payment winner, wrong key?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Unable to bind to %s on this computer (bind returned error %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Unable to sign spork message, wrong key?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Unknown -socks proxy version requested: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Upgrade wallet to latest format</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Usage (deprecated, use dash-cli):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Usage:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Unknown state: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Use N separate masternodes to anonymize funds  (2-8, default: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Upgrade wallet to latest format</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Use OpenSSL (https) for JSON-RPC connections</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Use UPnP to map the listening port (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Use UPnP to map the listening port (default: 1 when listening)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Use the test network</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Username for JSON-RPC connections</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Value more than Darksend pool maximum allows.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Verifying blocks...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Verifying wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Wait for RPC server to start</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Wallet %s resides outside data directory %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Wallet is locked.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Wallet needed to be rewritten: restart Dash to complete</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Wallet options:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Warning</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Warning: Deprecated argument -debugnet ignored, use -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Warning: This version is obsolete, upgrade required!</translation>
     </message>
     <message>
-        <source>Wrong state.</source>
-        <translation type="obsolete">Wrong state.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>You need to rebuild the database using -reindex to change -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Your entries added successfully.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>Your transaction was accepted into the pool!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Zapping all transactions from wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>on startup</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>version</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrupt, salvage failed</translation>
     </message>

From e3963ea71c6b62c348070777bee2d601cd25386b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 25 Jun 2015 08:17:53 -0700
Subject: [PATCH 1463/1819] Spork changes / improvements

- New Command "Spork Active" : Show which sporks report as active
- Cleaned up the spork code and fixed some bugs with defaults
---
 src/masternode-payments.cpp | 32 +++++++++++++++++---------------
 src/rpcmisc.cpp             | 15 +++++++++++++--
 src/spork.cpp               |  6 +++---
 3 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 8dac358fb129..d5c493ece1e3 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -82,7 +82,7 @@ void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
-    
+
     if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
         budget.FillBlockPayee(txNew, nFees);
     } else {
@@ -106,7 +106,7 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
 
     bool hasPayment = true;
     CScript payee;
-    
+
     //spork
     if(!masternodePayments.GetBlockPayee(pindexPrev->nHeight+1, payee)){
         //no masternode detected
@@ -121,7 +121,7 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
 
     CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, nFees);
     CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
-    
+
     txNew.vout[0].nValue = blockValue;
 
     if(hasPayment){
@@ -168,7 +168,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(mapMasternodePayeeVotes.count(winner.GetHash())){
            if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
-           return; 
+           return;
         }
 
         if(winner.nBlockHeight < chainActive.Tip()->nHeight - 10 || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
@@ -205,9 +205,9 @@ bool CMasternodePaymentWinner::Sign(CKey& keyMasternode, CPubKey& pubKeyMasterno
     std::string strMasterNodeSignMessage;
 
     std::string strMessage =  vinMasternode.prevout.ToStringShort() +
-                boost::lexical_cast<std::string>(nBlockHeight) + 
+                boost::lexical_cast<std::string>(nBlockHeight) +
                 payee.ToString();
-                
+
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
         LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
         return false;
@@ -263,7 +263,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
 
     LogPrintf("CMasternodePayments::AddWinningMasternode - checkhash\n");
     if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
-       return false; 
+       return false;
     }
 
     mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
@@ -292,18 +292,20 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
         if(payee.nVotes >= nMaxSignatures && payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED)
             nMaxSignatures = payee.nVotes;
-    
+
     // if we don't have at least 6 signatures on a payee, approve whichever is the longest chain
     if(nMaxSignatures < MNPAYMENTS_SIGNATURES_REQUIRED) return true;
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
     {
         bool found = false;
-        BOOST_FOREACH(CTxOut out, txNew.vout)
-            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
+        BOOST_FOREACH(CTxOut out, txNew.vout){
+            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue){
                 found = true;
+            }
+        }
 
-        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){            
+        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED){
             if(found) return true;
 
             CTxDestination address1;
@@ -372,7 +374,7 @@ void CMasternodePayments::CleanPaymentList()
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
     while(it != mapMasternodePayeeVotes.end()) {
         CMasternodePaymentWinner winner = (*it).second;
-   
+
         if(chainActive.Tip()->nHeight - winner.nBlockHeight > nLimit){
             if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", winner.nBlockHeight);
             mapMasternodePayeeVotes.erase(it++);
@@ -438,7 +440,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     }
 
     if(nBlockHeight <= nLastBlockHeight) return false;
-    
+
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return false;
     CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, 0);
@@ -467,7 +469,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
             CScript payee = GetScriptForDestination(pmn->pubkey.GetID());
             newWinner.AddPayee(payee, masternodePayment);
-            
+
             CTxDestination address1;
             ExtractDestination(payee, address1);
             CBitcoinAddress address2(address1);
@@ -525,7 +527,7 @@ bool CMasternodePaymentWinner::SignatureValid()
     if(pmn != NULL)
     {
         std::string strMessage =  vinMasternode.prevout.ToStringShort() +
-                    boost::lexical_cast<std::string>(nBlockHeight) + 
+                    boost::lexical_cast<std::string>(nBlockHeight) +
                     payee.ToString();
 
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 554fd513813d..6879bfa46258 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -165,7 +165,18 @@ Value spork(const Array& params, bool fHelp)
 
         Object ret;
         while(it != mapSporksActive.end()) {
-            ret.push_back(Pair(sporkManager.GetSporkNameByID(it->second.nSporkID), it->second.nValue));
+            if(sporkManager.GetSporkNameByID(it->second.nSporkID) != "Unknown")
+                ret.push_back(Pair(sporkManager.GetSporkNameByID(it->second.nSporkID), it->second.nValue));
+            it++;
+        }
+        return ret;
+    } else if(params.size() == 1 && params[0].get_str() == "active"){
+        std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin();
+
+        Object ret;
+        while(it != mapSporksActive.end()) {
+            if(sporkManager.GetSporkNameByID(it->second.nSporkID) != "Unknown")
+                ret.push_back(Pair(sporkManager.GetSporkNameByID(it->second.nSporkID), IsSporkActive(it->second.nSporkID)));
             it++;
         }
         return ret;
@@ -189,7 +200,7 @@ Value spork(const Array& params, bool fHelp)
 
     throw runtime_error(
         "spork <name> [<value>]\n"
-        "<name> is the corresponding spork name, or 'show' to show all current spork settings"
+        "<name> is the corresponding spork name, or 'show' to show all current spork settings, active to show which sporks are active"
         "<value> is a epoch datetime to enable or disable spork"
         + HelpRequiringPassphrase());
 }
diff --git a/src/spork.cpp b/src/spork.cpp
index 6c253ce3f385..4c5fa9d521cd 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -84,9 +84,9 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_2_INSTANTX) r = SPORK_2_INSTANTX_DEFAULT;
         if(nSporkID == SPORK_3_INSTANTX_BLOCK_FILTERING) r = SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT;
         if(nSporkID == SPORK_5_MAX_VALUE) r = SPORK_5_MAX_VALUE_DEFAULT;
-        if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING;
-        if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
-        if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
+        if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
+        if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
+        if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }

From 55dda32f34792b4b7def01a485554844edef61e6 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Thu, 25 Jun 2015 11:08:50 -0700
Subject: [PATCH 1464/1819] Removed need for amounts in masternode winners
 protocol

---
 src/masternode-payments.cpp | 23 +++++++++-----------
 src/masternode-payments.h   | 42 +++++++++++++++++++++----------------
 2 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index d5c493ece1e3..1e008801f13e 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -188,7 +188,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         }
 
         CTxDestination address1;
-        ExtractDestination(winner.payee.scriptPubKey, address1);
+        ExtractDestination(winner.payee, address1);
         CBitcoinAddress address2(address1);
 
         if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
@@ -277,7 +277,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
     int n = 1;
     if(IsReferenceNode(winnerIn.vinMasternode)) n = 100;
     LogPrintf("CMasternodePayments::AddWinningMasternode - AddPayee - %d\n", n);
-    mapMasternodeBlocks[winnerIn.nBlockHeight].AddPayee(winnerIn.payee.scriptPubKey, winnerIn.payee.nValue, n);
+    mapMasternodeBlocks[winnerIn.nBlockHeight].AddPayee(winnerIn.payee, n);
 
     return true;
 }
@@ -287,6 +287,8 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
     int nMaxSignatures = 0;
     std::string strPayeesPossible = "";
 
+    CAmount masternodePayment = GetMasternodePayment(nBlockHeight, txNew.GetValueOut());
+
     //require at least 6 signatures
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
@@ -300,7 +302,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
     {
         bool found = false;
         BOOST_FOREACH(CTxOut out, txNew.vout){
-            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue){
+            if(payee.scriptPubKey == out.scriptPubKey && masternodePayment == out.nValue){
                 found = true;
             }
         }
@@ -313,9 +315,9 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
             CBitcoinAddress address2(address1);
 
             if(strPayeesPossible == ""){
-                strPayeesPossible += address2.ToString()  + ":" + boost::lexical_cast<std::string>(payee.nValue);
+                strPayeesPossible += address2.ToString();
             } else {
-                strPayeesPossible += "," + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue);
+                strPayeesPossible += "," + address2.ToString();
             }
         }
     }
@@ -336,9 +338,9 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
         CBitcoinAddress address2(address1);
 
         if(ret != "Unknown"){
-            ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue) + ":" + boost::lexical_cast<std::string>(payee.nVotes);
+            ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nVotes);
         } else {
-            ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nValue) + ":" + boost::lexical_cast<std::string>(payee.nVotes);
+            ret = address2.ToString() + boost::lexical_cast<std::string>(payee.nVotes);
         }
     }
 
@@ -441,11 +443,6 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
     if(nBlockHeight <= nLastBlockHeight) return false;
 
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return false;
-    CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, 0);
-    CAmount masternodePayment = GetMasternodePayment(pindexPrev->nHeight+1, blockValue);
-
     CMasternodePaymentWinner newWinner(activeMasternode.vin);
 
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
@@ -468,7 +465,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
             newWinner.nBlockHeight = nBlockHeight;
 
             CScript payee = GetScriptForDestination(pmn->pubkey.GetID());
-            newWinner.AddPayee(payee, masternodePayment);
+            newWinner.AddPayee(payee);
 
             CTxDestination address1;
             ExtractDestination(payee, address1);
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index cab4e2d14139..d0104d39d020 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -32,22 +32,29 @@ std::string GetRequiredPaymentsString(int64_t nBlockHeight);
 bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue);
 void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
-class CMasternodePayee : public CTxOut
+class CMasternodePayee
 {
 public:
+    CScript scriptPubKey;
     int nVotes;
 
     CMasternodePayee() {
         scriptPubKey = CScript();
-        nValue = 0;
         nVotes = 0;
-    } 
+    }
 
-    CMasternodePayee(CAmount nValueIn, CScript payee, int nVotesIn) {
+    CMasternodePayee(CScript payee, int nVotesIn) {
         scriptPubKey = payee;
-        nValue = nValueIn;
         nVotes = nVotesIn;
     }
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(scriptPubKey);
+        READWRITE(nVotes);
+     }
 };
 
 // Keep track of votes for payees from masternodes
@@ -66,15 +73,15 @@ class CMasternodeBlockPayees
         vecPayments.clear();
     }
 
-    void AddPayee(CScript payeeIn, int64_t nAmount, int nIncrement){
+    void AddPayee(CScript payeeIn, int nIncrement){
         BOOST_FOREACH(CMasternodePayee& payee, vecPayments){
-            if(payee.scriptPubKey == payeeIn && payee.nValue == nAmount) {
+            if(payee.scriptPubKey == payeeIn) {
                 payee.nVotes += nIncrement;
                 return;
             }
         }
 
-        CMasternodePayee c((CAmount)nAmount, payeeIn, nIncrement);
+        CMasternodePayee c(payeeIn, nIncrement);
         vecPayments.push_back(c);
     }
 
@@ -83,10 +90,10 @@ class CMasternodeBlockPayees
         int nVotes = -1;
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
             if(p.nVotes > nVotes){
-                payee = p.scriptPubKey; 
+                payee = p.scriptPubKey;
                 nVotes = p.nVotes;
             }
-        }        
+        }
 
         return (nVotes > -1);
     }
@@ -110,19 +117,19 @@ class CMasternodePaymentWinner
     CTxIn vinMasternode;
 
     int nBlockHeight;
-    CTxOut payee;
+    CScript payee;
     std::vector<unsigned char> vchSig;
 
     CMasternodePaymentWinner() {
         nBlockHeight = 0;
         vinMasternode = CTxIn();
-        payee = CTxOut();
+        payee = CScript();
     }
 
     CMasternodePaymentWinner(CTxIn vinIn) {
         nBlockHeight = 0;
         vinMasternode = vinIn;
-        payee = CTxOut();
+        payee = CScript();
     }
 
     uint256 GetHash(){
@@ -131,7 +138,7 @@ class CMasternodePaymentWinner
         ss << nBlockHeight;
         ss << vinMasternode.prevout;
 
-        return ss.GetHash();        
+        return ss.GetHash();
     }
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
@@ -139,9 +146,8 @@ class CMasternodePaymentWinner
     bool SignatureValid();
     void Relay();
 
-    void AddPayee(CScript payeeIn, int64_t nAmount){
-        payee.scriptPubKey = payeeIn;
-        payee.nValue = nAmount;
+    void AddPayee(CScript payeeIn){
+        payee = payeeIn;
     }
 
     ADD_SERIALIZE_METHODS;
@@ -185,7 +191,7 @@ class CMasternodePayments
 
     bool AddWinningMasternode(CMasternodePaymentWinner& winner);
     bool ProcessBlock(int nBlockHeight);
-    
+
     void Sync(CNode* node);
     void CleanPaymentList();
     int LastPayment(CMasternode& mn);

From 8a4c22ec9ae6eab585742e8ef1d3288b3e7ce4b7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 25 Jun 2015 11:22:11 -0700
Subject: [PATCH 1465/1819] fixed typo

---
 src/masternode-payments.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 1e008801f13e..78448be28e17 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -340,7 +340,7 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
         if(ret != "Unknown"){
             ret += ", " + address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nVotes);
         } else {
-            ret = address2.ToString() + boost::lexical_cast<std::string>(payee.nVotes);
+            ret = address2.ToString() + ":" + boost::lexical_cast<std::string>(payee.nVotes);
         }
     }
 

From 2b75faefee4858657f3e2472033d66c525ff74ec Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 25 Jun 2015 12:59:11 -0700
Subject: [PATCH 1466/1819] Various fixes improvements

- Implemented spork for only paying new nodes after a period of time on mainnet
- protocol bump
- fixed a few issues with sporks. Spork show now shows all sporks, instead of the changed ones. IsSporkActive now supports sporks set to 0 as on.
---
 src/instantx.h        |  2 +-
 src/main.cpp          |  4 +---
 src/masternodeman.cpp |  9 +++++++++
 src/rpcmisc.cpp       | 18 ++++++------------
 src/spork.cpp         | 10 +++++++---
 src/spork.h           |  9 +++++++--
 src/version.h         | 10 ++++++++--
 7 files changed, 39 insertions(+), 23 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index 18df3fcddf45..ce8f4a707cc1 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70081;
+static const int MIN_INSTANTX_PROTO_VERSION = 70082;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/main.cpp b/src/main.cpp
index 44db0c600302..c0c54da2e55f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2940,9 +2940,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     {
         if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
         {
-            if(Params().NetworkID() != CBaseChainParams::REGTEST)
-                return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
-
+            return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
         }
     }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index a3f034960368..8bf0d23716b4 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -8,6 +8,7 @@
 #include "darksend.h"
 #include "util.h"
 #include "addrman.h"
+#include "spork.h"
 #include <boost/lexical_cast.hpp>
 #include <boost/filesystem.hpp>
 
@@ -381,6 +382,14 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         mn.Check();
         if(!mn.IsEnabled()) continue;
 
+        // //check protocol version
+        if(IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)){
+            if(mn.protocolVersion < MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2) continue;
+        } else {
+            //support older versions for a period of time
+            if(mn.protocolVersion < MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1) continue;
+        }
+
         //it's in the list -- so let's skip it
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index 6879bfa46258..de75ca2e9fbe 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -161,23 +161,17 @@ class DescribeAddressVisitor : public boost::static_visitor<Object>
 Value spork(const Array& params, bool fHelp)
 {
     if(params.size() == 1 && params[0].get_str() == "show"){
-        std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin();
-
         Object ret;
-        while(it != mapSporksActive.end()) {
-            if(sporkManager.GetSporkNameByID(it->second.nSporkID) != "Unknown")
-                ret.push_back(Pair(sporkManager.GetSporkNameByID(it->second.nSporkID), it->second.nValue));
-            it++;
+        for(int nSporkID = SPORK_START; nSporkID <= SPORK_END; nSporkID++){
+            if(sporkManager.GetSporkNameByID(nSporkID) != "Unknown")
+                ret.push_back(Pair(sporkManager.GetSporkNameByID(nSporkID), GetSporkValue(nSporkID)));
         }
         return ret;
     } else if(params.size() == 1 && params[0].get_str() == "active"){
-        std::map<int, CSporkMessage>::iterator it = mapSporksActive.begin();
-
         Object ret;
-        while(it != mapSporksActive.end()) {
-            if(sporkManager.GetSporkNameByID(it->second.nSporkID) != "Unknown")
-                ret.push_back(Pair(sporkManager.GetSporkNameByID(it->second.nSporkID), IsSporkActive(it->second.nSporkID)));
-            it++;
+        for(int nSporkID = SPORK_START; nSporkID <= SPORK_END; nSporkID++){
+            if(sporkManager.GetSporkNameByID(nSporkID) != "Unknown")
+                ret.push_back(Pair(sporkManager.GetSporkNameByID(nSporkID), IsSporkActive(nSporkID)));
         }
         return ret;
     } else if (params.size() == 2){
diff --git a/src/spork.cpp b/src/spork.cpp
index 4c5fa9d521cd..f3ee1af78425 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -76,7 +76,7 @@ void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 // grab the spork, otherwise say it's off
 bool IsSporkActive(int nSporkID)
 {
-    int64_t r = 0;
+    int64_t r = -1;
 
     if(mapSporksActive.count(nSporkID)){
         r = mapSporksActive[nSporkID].nValue;
@@ -87,10 +87,11 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
+        if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
 
-        if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
+        if(r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
-    if(r == 0) r = 4070908800; //return 2099-1-1 by default
+    if(r == -1) r = 4070908800; //return 2099-1-1 by default
 
     return r < GetTime();
 }
@@ -109,6 +110,7 @@ int GetSporkValue(int nSporkID)
         if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
+        if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -217,6 +219,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
     if(strName == "SPORK_7_MASTERNODE_SCANNING") return SPORK_7_MASTERNODE_SCANNING;
     if(strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
     if(strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
+    if(strName == "SPORK_10_MASTERNODE_PAY_NEWEST_NODES") return SPORK_10_MASTERNODE_PAY_NEWEST_NODES;
 
     return -1;
 }
@@ -229,6 +232,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
     if(id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING";
     if(id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
     if(id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
+    if(id == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) return "SPORK_10_MASTERNODE_PAY_NEWEST_NODES";
 
     return "Unknown";
 }
diff --git a/src/spork.h b/src/spork.h
index ea6ca53efab8..31247d86b9fe 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -23,19 +23,24 @@ using namespace boost;
     Don't ever reuse these IDs for other sporks
     - This would result in old clients getting confused about which spork is for what
 */
+#define SPORK_START                                           10001
+#define SPORK_END                                             10009
+
 #define SPORK_2_INSTANTX                                      10001
 #define SPORK_3_INSTANTX_BLOCK_FILTERING                      10002
 #define SPORK_5_MAX_VALUE                                     10004
 #define SPORK_7_MASTERNODE_SCANNING                           10006
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT                10007
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT                 10008
+#define SPORK_10_MASTERNODE_PAY_NEWEST_NODES                  10009
 
 #define SPORK_2_INSTANTX_DEFAULT                              978307200   //2001-1-1
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
 #define SPORK_5_MAX_VALUE_DEFAULT                             1000        //1000 DASH
 #define SPORK_7_MASTERNODE_SCANNING_DEFAULT                   978307200   //2001-1-1
-#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1434326400   //2015-6-15
-#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1434326400   //2015-6-15
+#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1444217600   //OFF
+#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
+#define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
 
 class CSporkMessage;
 class CSporkManager;
diff --git a/src/version.h b/src/version.h
index 42a1fe05662d..fb2ac5860236 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70081;
+static const int PROTOCOL_VERSION = 70082;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,7 +22,13 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70081;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70082;
+
+//! minimum peer version that can receive masternode payments
+// V1 - Last protocol version before update
+// V2 - Newest protocol version
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70082;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 9bc6042c27ccaf7cb4d1e777103a9c2a45d88b7a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 28 Jun 2015 17:07:44 +0300
Subject: [PATCH 1467/1819] unlock inputs on DS failure

---
 src/wallet.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 159e1984e379..61d930207df8 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2435,12 +2435,18 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
         }
     }
 
-    if(darkSendPool.GetDenominations(vOut) != darkSendPool.sessionDenom)
+    if(darkSendPool.GetDenominations(vOut) != darkSendPool.sessionDenom) {
+        BOOST_FOREACH(CTxIn v, vCoins)
+            UnlockCoin(v.prevout);
         return "Error: can't make current denominated outputs";
+    }
 
     // we don't support change at all
-    if(nValueLeft != 0)
+    if(nValueLeft != 0) {
+        BOOST_FOREACH(CTxIn v, vCoins)
+            UnlockCoin(v.prevout);
         return "Error: change left-over in pool. Must use denominations only";
+    }
 
     //randomize the output order
     std::random_shuffle (vOut.begin(), vOut.end());

From 9db667c240487681e60e2a81af6221473825b168 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 28 Jun 2015 17:22:14 +0300
Subject: [PATCH 1468/1819] always show separator for sum tx amount and
 highlight (red) negative amounts

---
 src/qt/transactionview.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index c7674403c5a8..078182a0e384 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -449,7 +449,6 @@ void TransactionView::showDetails()
 /** Compute sum of all selected transactions */
 void TransactionView::computeSum()
 {
-    QString amountText;
     qint64 amount = 0;
     int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
     if(!transactionView->selectionModel())
@@ -460,7 +459,8 @@ void TransactionView::computeSum()
         foreach (QModelIndex index, selection){
             amount += index.data(TransactionTableModel::AmountRole).toLongLong();
         }
-        QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true));
+        QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
+        if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
         emit trxAmount(strAmount);
     }
 }

From c3febd20a8b8d7b558635034c19923e6ae79f22e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 28 Jun 2015 17:18:45 +0300
Subject: [PATCH 1469/1819] Do not show decimals for "amounts and rounds" text
 but show usual way formatted numbers inside its tooltip

---
 src/qt/overviewpage.cpp | 40 +++++++++++++++++-----------------------
 1 file changed, 17 insertions(+), 23 deletions(-)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 2ff5c1bdf37d..e82173fe157d 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -365,35 +365,29 @@ void OverviewPage::updateDarksendProgress()
     QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
 
-    QString strSettings;
+    QString strAmountAndRounds;
+    int nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
+    QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
     if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
         ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
-                                          .arg(BitcoinUnits::formatWithUnit(
-                                                   walletModel->getOptionsModel()->getDisplayUnit(),
-                                                   nAnonymizeDarkcoinAmount * COIN
-                                               )));
-        strSettings = BitcoinUnits::formatWithUnit(
-                    walletModel->getOptionsModel()->getDisplayUnit(),
-                    nAnonymizeDarkcoinAmount * COIN
-                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
+                                          .arg(strAnonymizeDarkcoinAmount));
+        strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+        strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
     } else {
-        ui->labelAmountRounds->setToolTip(tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br/>"
+        QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways);
+        ui->labelAmountRounds->setToolTip("<span style='white-space: nowrap;'>" +
+                                          tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br/>"
                                              "will anonymize <span style='color:red;'>%2</span> instead")
-                                          .arg(BitcoinUnits::formatWithUnit(
-                                                   walletModel->getOptionsModel()->getDisplayUnit(),
-                                                   nAnonymizeDarkcoinAmount * COIN
-                                               ))
-                                          .arg(BitcoinUnits::formatWithUnit(
-                                                   walletModel->getOptionsModel()->getDisplayUnit(),
-                                                   nMaxToAnonymize
-                                               )));
-        strSettings = "<span style='color:red;'>" + BitcoinUnits::formatWithUnit(
-                    walletModel->getOptionsModel()->getDisplayUnit(),
-                    nMaxToAnonymize
-                ) + " / " + tr("%n Rounds", "", nDarksendRounds) + "</span>";
+                                          .arg(strAnonymizeDarkcoinAmount)
+                                          .arg(strMaxToAnonymize) +
+                                          "</span>");
+        strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+        strAmountAndRounds = "<span style='color:red;'>" +
+                QString(BitcoinUnits::factor(nDisplayUnit) == 1 ? "" : "~") + strMaxToAnonymize +
+                " / " + tr("%n Rounds", "", nDarksendRounds) + "</span>";
     }
 
-    ui->labelAmountRounds->setText(strSettings);
+    ui->labelAmountRounds->setText(strAmountAndRounds);
 }
 
 

From bac2dc81a26dcf9792e6ab91ab224772d968cefb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Sun, 28 Jun 2015 14:49:16 -0700
Subject: [PATCH 1470/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9e7c85bc19be..569ab21cd25f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 4)
+define(_CLIENT_VERSION_BUILD, 6)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index a0eca7f4491e..eba3456254ab 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 5
+#define CLIENT_VERSION_BUILD 6
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 6363a2587928d74edf8134ed3cbce27ee6ceb92b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 29 Jun 2015 02:20:11 +0300
Subject: [PATCH 1471/1819] fix debian qt icon ref

---
 contrib/debian/dash-qt.install |   6 +++---
 share/pixmaps/dash128.png      | Bin 1826 -> 0 bytes
 share/pixmaps/dash16.xpm       |  21 -------------------
 share/pixmaps/dash32.xpm       |  37 ---------------------------------
 4 files changed, 3 insertions(+), 61 deletions(-)
 delete mode 100755 share/pixmaps/dash128.png
 delete mode 100755 share/pixmaps/dash16.xpm
 delete mode 100755 share/pixmaps/dash32.xpm

diff --git a/contrib/debian/dash-qt.install b/contrib/debian/dash-qt.install
index c034a13668aa..4c10ef60d9d6 100644
--- a/contrib/debian/dash-qt.install
+++ b/contrib/debian/dash-qt.install
@@ -1,6 +1,6 @@
 usr/local/bin/dash-qt usr/bin
-share/pixmaps/dash32.xpm usr/share/pixmaps
-share/pixmaps/dash16.xpm usr/share/pixmaps
-share/pixmaps/dash128.png usr/share/pixmaps
+share/pixmaps/bitcoin32.xpm usr/share/pixmaps
+share/pixmaps/bitcoin16.xpm usr/share/pixmaps
+share/pixmaps/bitcoin128.png usr/share/pixmaps
 debian/dash-qt.desktop usr/share/applications
 debian/dash-qt.protocol usr/share/kde4/services/
diff --git a/share/pixmaps/dash128.png b/share/pixmaps/dash128.png
deleted file mode 100755
index 7889ea97098d5a201355bbd3cb12858096f9158e..0000000000000000000000000000000000000000
GIT binary patch
diff --git a/share/pixmaps/dash16.xpm b/share/pixmaps/dash16.xpm
deleted file mode 100755
index 582aad85ba5e..000000000000
--- a/share/pixmaps/dash16.xpm
+++ /dev/null
@@ -1,21 +0,0 @@
-/* XPM */
-static char *bitcoin___[] = {
-"16 16 2 1",
-" 	c None",
-".	c #1C75BC",
-"                ",
-"                ",
-"                ",
-"    ........... ",
-"   .............",
-"   .............",
-"            ....",
-" .....      ... ",
-"......      ... ",
-"           .... ",
-" .............  ",
-" .............  ",
-" ...........    ",
-"                ",
-"                ",
-"                "};
diff --git a/share/pixmaps/dash32.xpm b/share/pixmaps/dash32.xpm
deleted file mode 100755
index da0ac0e62aa0..000000000000
--- a/share/pixmaps/dash32.xpm
+++ /dev/null
@@ -1,37 +0,0 @@
-/* XPM */
-static char *bitcoin___[] = {
-"32 32 2 1",
-" 	c None",
-".	c #1C75BC",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"       ........................ ",
-"      ..........................",
-"      ..........................",
-"      ..........................",
-"                         .......",
-"                         ...... ",
-"                        ....... ",
-" ............           ....... ",
-" ............           ......  ",
-" ...........           .......  ",
-"............           .......  ",
-"                       ......   ",
-"                      .......   ",
-"                      .......   ",
-"  ..........................    ",
-"  ..........................    ",
-" ..........................     ",
-" ........................       ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "};

From e3cbf9e1f23687e169e100c378e6371459079eba Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 29 Jun 2015 02:22:26 +0300
Subject: [PATCH 1472/1819] fix make_windows_icon.sh script to generate testnet
 icons too and clean after its work is done

---
 share/qt/make_windows_icon.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/share/qt/make_windows_icon.sh b/share/qt/make_windows_icon.sh
index bf607b1c6238..9c166afaa0aa 100755
--- a/share/qt/make_windows_icon.sh
+++ b/share/qt/make_windows_icon.sh
@@ -1,9 +1,17 @@
 #!/bin/bash
 # create multiresolution windows icon
+#mainnet
 ICON_SRC=../../src/qt/res/icons/bitcoin.png
 ICON_DST=../../src/qt/res/icons/bitcoin.ico
 convert ${ICON_SRC} -resize 16x16 bitcoin-16.png
 convert ${ICON_SRC} -resize 32x32 bitcoin-32.png
 convert ${ICON_SRC} -resize 48x48 bitcoin-48.png
 convert bitcoin-16.png bitcoin-32.png bitcoin-48.png ${ICON_DST}
-
+#testnet
+ICON_SRC=../../src/qt/res/icons/bitcoin_testnet.png
+ICON_DST=../../src/qt/res/icons/bitcoin_testnet.ico
+convert ${ICON_SRC} -resize 16x16 bitcoin-16.png
+convert ${ICON_SRC} -resize 32x32 bitcoin-32.png
+convert ${ICON_SRC} -resize 48x48 bitcoin-48.png
+convert bitcoin-16.png bitcoin-32.png bitcoin-48.png ${ICON_DST}
+rm bitcoin-16.png bitcoin-32.png bitcoin-48.png

From e9eb2faeb64b23bd76416b022f561aaa59fbf5c0 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 29 Jun 2015 02:23:29 +0300
Subject: [PATCH 1473/1819] new icon

---
 share/pixmaps/bitcoin-bc.ico         | Bin 1150 -> 1150 bytes
 share/pixmaps/bitcoin.ico            | Bin 1150 -> 1150 bytes
 share/pixmaps/bitcoin128.png         | Bin 1901 -> 2771 bytes
 share/pixmaps/bitcoin128.xpm         | 463 +++++++++++++++------
 share/pixmaps/bitcoin16.png          | Bin 379 -> 486 bytes
 share/pixmaps/bitcoin16.xpm          |  95 ++++-
 share/pixmaps/bitcoin256.png         | Bin 3823 -> 6298 bytes
 share/pixmaps/bitcoin256.xpm         | 586 +++++++++++++++------------
 share/pixmaps/bitcoin32.png          | Bin 627 -> 749 bytes
 share/pixmaps/bitcoin32.xpm          | 149 +++++--
 share/pixmaps/bitcoin64.png          | Bin 1041 -> 1332 bytes
 share/pixmaps/bitcoin64.xpm          | 247 +++++++----
 share/pixmaps/favicon.ico            | Bin 1150 -> 1150 bytes
 src/qt/res/icons/bitcoin.icns        | Bin 34563 -> 40087 bytes
 src/qt/res/icons/bitcoin.ico         | Bin 9662 -> 15086 bytes
 src/qt/res/icons/bitcoin.png         | Bin 3616 -> 6298 bytes
 src/qt/res/icons/bitcoin_testnet.ico | Bin 9662 -> 15086 bytes
 src/qt/res/icons/bitcoin_testnet.png | Bin 3598 -> 4874 bytes
 18 files changed, 1019 insertions(+), 521 deletions(-)
 mode change 100755 => 100644 share/pixmaps/bitcoin128.xpm
 mode change 100755 => 100644 share/pixmaps/bitcoin16.xpm
 mode change 100755 => 100644 share/pixmaps/bitcoin256.png
 mode change 100755 => 100644 share/pixmaps/bitcoin256.xpm
 mode change 100755 => 100644 share/pixmaps/bitcoin32.xpm
 mode change 100755 => 100644 share/pixmaps/bitcoin64.xpm
 mode change 100755 => 100644 src/qt/res/icons/bitcoin.png

diff --git a/share/pixmaps/bitcoin-bc.ico b/share/pixmaps/bitcoin-bc.ico
index a8c0c09137794f457622508c17c0d0d565e53974..fd1735bae29e3ac32480c9e9f222b2b6f5d7730e 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin.ico b/share/pixmaps/bitcoin.ico
index a8c0c09137794f457622508c17c0d0d565e53974..fd1735bae29e3ac32480c9e9f222b2b6f5d7730e 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin128.png b/share/pixmaps/bitcoin128.png
index 17b04d026ee927d39e28dd337ee927ed715a1d8d..f0dc48c95aa919fb3afba24ad7e5140e1819e90d 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin128.xpm b/share/pixmaps/bitcoin128.xpm
old mode 100755
new mode 100644
index 0e59e5334e46..3b4f552c30bd
--- a/share/pixmaps/bitcoin128.xpm
+++ b/share/pixmaps/bitcoin128.xpm
@@ -1,133 +1,330 @@
-/* XPM */
-static char *bitcoin___[] = {
-"128 128 2 1",
-" 	c None",
-".	c #1C75BC",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                            ..........................................................................................          ",
-"                           ..............................................................................................       ",
-"                           ...............................................................................................      ",
-"                           .................................................................................................    ",
-"                          ...................................................................................................   ",
-"                          ...................................................................................................   ",
-"                          ....................................................................................................  ",
-"                         ...................................................................................................... ",
-"                         ...................................................................................................... ",
-"                         ...................................................................................................... ",
-"                        ........................................................................................................",
-"                        ........................................................................................................",
-"                        ........................................................................................................",
-"                       .........................................................................................................",
-"                       .........................................................................................................",
-"                       .........................................................................................................",
-"                      ..........................................................................................................",
-"                      ..........................................................................................................",
-"                      ......................................................................................................... ",
-"                                                                                                    ........................... ",
-"                                                                                                   ............................ ",
-"                                                                                                   ............................ ",
-"                                                                                                   ...........................  ",
-"                                                                                                  ............................  ",
-"                                                                                                  ............................  ",
-"                                                                                                  ...........................   ",
-"                                                                                                  ...........................   ",
-"                                                                                                 ............................   ",
-"                                                                                                 ...........................    ",
-"      ...............................................                                            ...........................    ",
-"      ..............................................                                            ............................    ",
-"     ...............................................                                            ...........................     ",
-"     ...............................................                                            ...........................     ",
-"     ..............................................                                            ...........................      ",
-"    ...............................................                                            ...........................      ",
-"    ...............................................                                            ...........................      ",
-"   ...............................................                                            ...........................       ",
-"   ...............................................                                            ...........................       ",
-"   ..............................................                                             ...........................       ",
-"  ...............................................                                            ............................       ",
-"  ...............................................                                            ...........................        ",
-"  ..............................................                                             ...........................        ",
-" ...............................................                                            ............................        ",
-" ...............................................                                            ...........................         ",
-" ..............................................                                             ...........................         ",
-"...............................................                                            ............................         ",
-"...............................................                                            ...........................          ",
-"                                                                                           ...........................          ",
-"                                                                                          ............................          ",
-"                                                                                          ...........................           ",
-"                                                                                          ...........................           ",
-"                                                                                         ............................           ",
-"                                                                                         ...........................            ",
-"                                                                                         ...........................            ",
-"                                                                                        ............................            ",
-"                                                                                        ...........................             ",
-"                                                                                        ...........................             ",
-"         ..........................................................................................................             ",
-"         .........................................................................................................              ",
-"        ..........................................................................................................              ",
-"        .........................................................................................................               ",
-"        .........................................................................................................               ",
-"       .........................................................................................................                ",
-"       ........................................................................................................                 ",
-"       .......................................................................................................                  ",
-"      ........................................................................................................                  ",
-"      .......................................................................................................                   ",
-"      ......................................................................................................                    ",
-"     ......................................................................................................                     ",
-"     ....................................................................................................                       ",
-"     ...................................................................................................                        ",
-"    ...................................................................................................                         ",
-"    .................................................................................................                           ",
-"    ...............................................................................................                             ",
-"   .............................................................................................                                ",
-"   ..........................................................................................                                   ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                ",
-"                                                                                                                                "};
+/* XPM */
+static char *_____________[] = {
+/* columns rows colors chars-per-pixel */
+"128 128 196 2",
+"   c #0869B6",
+".  c #0969B6",
+"X  c #096AB6",
+"o  c #0A6AB7",
+"O  c #0B6AB7",
+"+  c #0B6BB7",
+"@  c #0C6BB7",
+"#  c #0C6BB8",
+"$  c #0D6CB8",
+"%  c #0E6CB8",
+"&  c #0F6CB8",
+"*  c #0E6DB8",
+"=  c #0F6DB8",
+"-  c #106EB8",
+";  c #116EB8",
+":  c #106EB9",
+">  c #116EB9",
+",  c #116FB9",
+"<  c #126FB9",
+"1  c #136FBA",
+"2  c #1370B9",
+"3  c #1470BA",
+"4  c #1570BA",
+"5  c #1571BA",
+"6  c #1671BA",
+"7  c #1772BA",
+"8  c #1772BB",
+"9  c #1872BB",
+"0  c #1873BB",
+"q  c #1973BB",
+"w  c #1A73BB",
+"e  c #1A74BB",
+"r  c #1C74BB",
+"t  c #1C75BB",
+"y  c #1A73BC",
+"u  c #1A74BC",
+"i  c #1B74BC",
+"p  c #1B75BC",
+"a  c #1C75BC",
+"s  c #1D75BC",
+"d  c #1C75BD",
+"f  c #1D76BC",
+"g  c #1C76BD",
+"h  c #1D76BD",
+"j  c #1E76BC",
+"k  c #1E76BD",
+"l  c #1F77BD",
+"z  c #1C76BE",
+"x  c #1C77BE",
+"c  c #1C77BF",
+"v  c #1D77BF",
+"b  c #2077BD",
+"n  c #2178BE",
+"m  c #2279BE",
+"M  c #2379BE",
+"N  c #247ABE",
+"B  c #257BBE",
+"V  c #247ABF",
+"C  c #257BBF",
+"Z  c #277CBF",
+"A  c #287DBF",
+"S  c #1D77C0",
+"D  c #1D78C0",
+"F  c #1D78C1",
+"G  c #287CC0",
+"H  c #297DC0",
+"J  c #2A7EC0",
+"K  c #2B7EC0",
+"L  c #2C7EC0",
+"P  c #2C7EC1",
+"I  c #2C7FC1",
+"U  c #2D80C1",
+"Y  c #2E80C1",
+"T  c #2E80C2",
+"R  c #3182C2",
+"E  c #3282C2",
+"W  c #3383C3",
+"Q  c #3484C3",
+"!  c #3685C4",
+"~  c #3785C4",
+"^  c #3986C4",
+"/  c #3987C5",
+"(  c #3C88C5",
+")  c #3C89C6",
+"_  c #3D89C6",
+"`  c #408BC7",
+"'  c #478FC9",
+"]  c #4890C9",
+"[  c #4A91C9",
+"{  c #4A91CA",
+"}  c #4C92CA",
+"|  c #4E93CB",
+" . c #4F94CB",
+".. c #5296CC",
+"X. c #5397CD",
+"o. c #5799CE",
+"O. c #589ACE",
+"+. c #5A9ACE",
+"@. c #5D9DCF",
+"#. c #609ED0",
+"$. c #609FD0",
+"%. c #66A2D2",
+"&. c #69A4D3",
+"*. c #6AA4D3",
+"=. c #6BA6D3",
+"-. c #6CA5D3",
+";. c #6CA6D4",
+":. c #6EA7D4",
+">. c #6FA8D4",
+",. c #6FA8D5",
+"<. c #72AAD6",
+"1. c #73AAD6",
+"2. c #77ACD7",
+"3. c #7EB1D9",
+"4. c #80B1DA",
+"5. c #81B2DA",
+"6. c #82B3DA",
+"7. c #86B5DB",
+"8. c #88B7DC",
+"9. c #8BB8DD",
+"0. c #8DBADD",
+"q. c #8EBADE",
+"w. c #90BCDE",
+"e. c #91BCDE",
+"r. c #93BEDF",
+"t. c #9BC2E1",
+"y. c #9DC3E2",
+"u. c #A0C5E3",
+"i. c #A1C6E4",
+"p. c #A2C6E4",
+"a. c #A3C6E4",
+"s. c #A3C7E4",
+"d. c #A6C9E5",
+"f. c #A8CAE5",
+"g. c #AACBE6",
+"h. c #ABCCE6",
+"j. c #AECEE7",
+"k. c #B0CFE8",
+"l. c #B1CFE8",
+"z. c #B3D1E9",
+"x. c #B7D3E9",
+"c. c #B8D4EA",
+"v. c #BAD5EB",
+"b. c #BAD6EB",
+"n. c #BBD6EB",
+"m. c #BDD7EC",
+"M. c #BFD8EC",
+"N. c #C1D9ED",
+"B. c #C2DAED",
+"V. c #C4DBEE",
+"C. c #C5DBEE",
+"Z. c #C5DCEE",
+"A. c #C6DCEE",
+"S. c #C6DDEE",
+"D. c #C7DDEF",
+"F. c #C9DEEF",
+"G. c #CADFEF",
+"H. c #CDE0F0",
+"J. c #CDE1F0",
+"K. c #CEE1F1",
+"L. c #D0E2F1",
+"P. c #D1E3F1",
+"I. c #D2E4F2",
+"U. c #D3E5F3",
+"Y. c #D4E5F2",
+"T. c #D6E6F3",
+"R. c #D8E7F3",
+"E. c #DAE9F4",
+"W. c #DDEAF5",
+"Q. c #E0ECF6",
+"!. c #E3EEF7",
+"~. c #E4EFF7",
+"^. c #E5EFF7",
+"/. c #E6EFF7",
+"(. c #E6F0F8",
+"). c #E8F1F8",
+"_. c #EDF4FA",
+"`. c #EFF6FA",
+"'. c #F0F6FB",
+"]. c #F1F7FB",
+"[. c #F2F7FB",
+"{. c #F3F8FB",
+"}. c #F3F8FC",
+"|. c #F5F9FC",
+" X c #F6F9FC",
+".X c #F6FAFC",
+"XX c #F9FBFD",
+"oX c #FAFCFD",
+"OX c #FAFCFE",
+"+X c #FBFCFE",
+"@X c #FCFDFE",
+"#X c #FCFEFE",
+"$X c #FDFEFE",
+"%X c #FEFEFF",
+"&X c #FFFFFF",
+"*X c None",
+/* pixels */
+"*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a r *X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*X*X*XS a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X",
+"*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X",
+"*X*X*X*X*XS a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X",
+"*X*X*X*XD p a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X",
+"*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X",
+"*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X",
+"*X*Xa p a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X",
+"*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X",
+"*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a S *X",
+"*Xc a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a p a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 p a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a . B.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.C.s.:.a y a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a / &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xy.b p a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a w 7.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xo.5 p p a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a . !.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XX.y a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t ! &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X XN a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a e 5.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xs.: a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a . !.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X`.N a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a H &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X' a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 1.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X9.5 a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a . T.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xh.: a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a H &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XM.: a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a :.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xn.: a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a . T.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xy.: a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a H oX&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X>.w t a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ) w.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.w.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.q.l.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XI a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a p a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a e y s.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XT.5 a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 }.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X8.1 a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a [ &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XW t a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a p s.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XT.5 a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 /.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xt.5 a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a / &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X_ a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a * * % % % % % % % % % * % % % % % % % % % % % % % % % % % % % % % % : a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a y w.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XW.5 a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a N &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xc.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 ~.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xy.: a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a p $.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X..t a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ! &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X` a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a * m.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X X5 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a w.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X~.a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a H oX&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xg.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 E.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xj.* a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a y %.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X[ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a H &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X[ a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a * S.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X}.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X).a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a A &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xg.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 1 T.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xl.* p a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a 5 1.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X| a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a A &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X..p a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a : F.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X|.; a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 3.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X'.N a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a Y &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xd.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 P.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xn.. a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a 5 5.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X[ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XO.y a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a 5 K.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X{.@ a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a :.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X}.B a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a W &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xi.5 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 1 F.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XS.. a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a p A ..| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a p &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&.e a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t t a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X XH a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 C.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XF.. a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&.p a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a #.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XoXY a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a 5 z.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XT.. a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a : &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X2.w a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a Z Y Y Y Y Y Y I Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y I Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y I I Y &.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XY a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a % W.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XP.@ a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a W &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XO.p a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a w :.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XT.: a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a $ P.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X/ a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a I oX&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xw.: t a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a w &.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&XC.: a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a $ K.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X!.e t a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a A oX&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X).a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a w &.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X~.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a % B.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xn.w a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a B '.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X:.: a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a w @.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xj.B y a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a * n.&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&Xc.W 5 a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a B &X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X&X_.n.1.b w a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a i % % % % % % % % % % % % % % % % % % % % % % % % % * % % % % % % % % % % % % % % % % * % % % * % % % % % % % % % % % % % % % % % % * : w a t w a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a c *X",
+"*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*X*Xp a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X",
+"*X*XS a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X",
+"*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X",
+"*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X",
+"*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X",
+"*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X",
+"*X*X*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X",
+"*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X",
+"*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*X*X*XD a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a D *X*X*X*X*X*X*X*X*X*X*X*X*X",
+"*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*Xa a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a *X*X*X*X*X*X*X*X*X*X*X*X*X*X*X*X"
+};
diff --git a/share/pixmaps/bitcoin16.png b/share/pixmaps/bitcoin16.png
index 62476ae4b3cfb4c039aa39a2ab8316a895140823..1905d9b6e5a80ac9693617033438549c1c6ed79b 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin16.xpm b/share/pixmaps/bitcoin16.xpm
old mode 100755
new mode 100644
index deef7c9048e9..863ebf4ddffc
--- a/share/pixmaps/bitcoin16.xpm
+++ b/share/pixmaps/bitcoin16.xpm
@@ -1,21 +1,74 @@
-/* XPM */
-static char *bitcoin___[] = {
-"16 16 2 1",
-" 	c None",
-".	c #1C75BC",
-"                ",
-"                ",
-"                ",
-"   ............ ",
-"   .............",
-"   .............",
-"            ....",
-" .....      ... ",
-"......      ... ",
-"           .... ",
-" .............  ",
-" .............  ",
-" ...........    ",
-"                ",
-"                ",
-"                "};
+/* XPM */
+static char *_____________[] = {
+/* columns rows colors chars-per-pixel */
+"16 16 52 1",
+"  c #106EB8",
+". c #106EB9",
+"X c #116EB9",
+"o c #126FB9",
+"O c #136FB9",
+"+ c #1470BA",
+"@ c #1772BB",
+"# c #1873BB",
+"$ c #1973BB",
+"% c #1A74BB",
+"& c #1B74BC",
+"* c #1B75BC",
+"= c #1C75BC",
+"- c #1D75BC",
+"; c #267BBF",
+": c #287CBF",
+"> c #2C7FC1",
+", c #2D80C1",
+"< c #3282C2",
+"1 c #3282C3",
+"2 c #3C88C6",
+"3 c #408BC7",
+"4 c #458EC8",
+"5 c #5397CC",
+"6 c #5397CD",
+"7 c #5497CC",
+"8 c #5799CD",
+"9 c #589ACE",
+"0 c #5E9DCF",
+"q c #5E9ED0",
+"w c #69A4D3",
+"e c #6BA5D3",
+"r c #6EA7D4",
+"t c #86B6DB",
+"y c #87B6DC",
+"u c #8FBBDE",
+"i c #95BEE0",
+"p c #ACCDE7",
+"a c #AECEE7",
+"s c #BBD6EB",
+"d c #BDD7EC",
+"f c #C2DAED",
+"g c #CEE1F1",
+"h c #CFE1F1",
+"j c #DCEAF5",
+"k c #E2EDF6",
+"l c #ECF4FA",
+"z c #F6FAFC",
+"x c #F6FAFD",
+"c c #FAFCFE",
+"v c #FFFFFF",
+"b c None",
+/* pixels */
+"b==============b",
+"================",
+"=======*========",
+"=======*========",
+"====4ytttttty3==",
+"===@svvvvvvvvco=",
+"==$o588q009jvko*",
+"==rhhhd+===vvu&=",
+"#@hzxxi*==evv2*=",
+"&&o:;;><<>fvl ==",
+"&&5vvvvvvvvvw*==",
+"&&raaaaaaaa5$===",
+"&-&#$@##@$$=*===",
+"&---============",
+"-*--============",
+"b-*-===========b"
+};
diff --git a/share/pixmaps/bitcoin256.png b/share/pixmaps/bitcoin256.png
old mode 100755
new mode 100644
index 061eb8ca8e77a0c4b533bd865d7e01b2e74fc5ef..4a92d931eba297b8b3a9ab82b2cb812154254a39
GIT binary patch
diff --git a/share/pixmaps/bitcoin256.xpm b/share/pixmaps/bitcoin256.xpm
old mode 100755
new mode 100644
index 4f16723b3e7a..a060dbcc89b1
--- a/share/pixmaps/bitcoin256.xpm
+++ b/share/pixmaps/bitcoin256.xpm
@@ -1,261 +1,325 @@
-/* XPM */
-static char *bitcoin___[] = {
-"256 256 2 1",
-" 	c None",
-".	c #1C75BC",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                       ......................................................................................................................................................................................                   ",
-"                                                       .........................................................................................................................................................................................                ",
-"                                                      ............................................................................................................................................................................................              ",
-"                                                      ..............................................................................................................................................................................................            ",
-"                                                      ...............................................................................................................................................................................................           ",
-"                                                      .................................................................................................................................................................................................         ",
-"                                                     ...................................................................................................................................................................................................        ",
-"                                                     ....................................................................................................................................................................................................       ",
-"                                                     .....................................................................................................................................................................................................      ",
-"                                                    .......................................................................................................................................................................................................     ",
-"                                                    .......................................................................................................................................................................................................     ",
-"                                                    ........................................................................................................................................................................................................    ",
-"                                                   .........................................................................................................................................................................................................    ",
-"                                                   ..........................................................................................................................................................................................................   ",
-"                                                   ..........................................................................................................................................................................................................   ",
-"                                                  ............................................................................................................................................................................................................  ",
-"                                                  ............................................................................................................................................................................................................  ",
-"                                                  ............................................................................................................................................................................................................. ",
-"                                                 .............................................................................................................................................................................................................. ",
-"                                                 .............................................................................................................................................................................................................. ",
-"                                                 .............................................................................................................................................................................................................. ",
-"                                                ................................................................................................................................................................................................................",
-"                                                ................................................................................................................................................................................................................",
-"                                                ................................................................................................................................................................................................................",
-"                                               .................................................................................................................................................................................................................",
-"                                               .................................................................................................................................................................................................................",
-"                                               .................................................................................................................................................................................................................",
-"                                              ..................................................................................................................................................................................................................",
-"                                              ..................................................................................................................................................................................................................",
-"                                              ..................................................................................................................................................................................................................",
-"                                             ...................................................................................................................................................................................................................",
-"                                             ...................................................................................................................................................................................................................",
-"                                             ...................................................................................................................................................................................................................",
-"                                            ................................................................................................................................................................................................................... ",
-"                                            ................................................................................................................................................................................................................... ",
-"                                            ................................................................................................................................................................................................................... ",
-"                                           .................................................................................................................................................................................................................... ",
-"                                                                                                                                                                                                        ......................................................  ",
-"                                                                                                                                                                                                        ......................................................  ",
-"                                                                                                                                                                                                       .......................................................  ",
-"                                                                                                                                                                                                       ......................................................   ",
-"                                                                                                                                                                                                       ......................................................   ",
-"                                                                                                                                                                                                      .......................................................   ",
-"                                                                                                                                                                                                      ......................................................    ",
-"                                                                                                                                                                                                      ......................................................    ",
-"                                                                                                                                                                                                     .......................................................    ",
-"                                                                                                                                                                                                     ......................................................     ",
-"                                                                                                                                                                                                     ......................................................     ",
-"                                                                                                                                                                                                    .......................................................     ",
-"                                                                                                                                                                                                    ......................................................      ",
-"                                                                                                                                                                                                    ......................................................      ",
-"                                                                                                                                                                                                   .......................................................      ",
-"                                                                                                                                                                                                   ......................................................       ",
-"                                                                                                                                                                                                   ......................................................       ",
-"                                                                                                                                                                                                  .......................................................       ",
-"                                                                                                                                                                                                  .......................................................       ",
-"                                                                                                                                                                                                  ......................................................        ",
-"            .............................................................................................                                                                                        .......................................................        ",
-"            .............................................................................................                                                                                        .......................................................        ",
-"           ..............................................................................................                                                                                        ......................................................         ",
-"           .............................................................................................                                                                                        .......................................................         ",
-"           .............................................................................................                                                                                        .......................................................         ",
-"          .............................................................................................                                                                                         ......................................................          ",
-"          .............................................................................................                                                                                        .......................................................          ",
-"          .............................................................................................                                                                                        .......................................................          ",
-"         .............................................................................................                                                                                         ......................................................           ",
-"         .............................................................................................                                                                                        .......................................................           ",
-"         .............................................................................................                                                                                        .......................................................           ",
-"        .............................................................................................                                                                                         ......................................................            ",
-"        .............................................................................................                                                                                        .......................................................            ",
-"        .............................................................................................                                                                                        .......................................................            ",
-"       .............................................................................................                                                                                         ......................................................             ",
-"       .............................................................................................                                                                                        .......................................................             ",
-"       .............................................................................................                                                                                        .......................................................             ",
-"      .............................................................................................                                                                                         ......................................................              ",
-"      .............................................................................................                                                                                        .......................................................              ",
-"      .............................................................................................                                                                                        .......................................................              ",
-"     .............................................................................................                                                                                         ......................................................               ",
-"     .............................................................................................                                                                                        .......................................................               ",
-"     .............................................................................................                                                                                        .......................................................               ",
-"    .............................................................................................                                                                                         ......................................................                ",
-"    .............................................................................................                                                                                        .......................................................                ",
-"    .............................................................................................                                                                                        .......................................................                ",
-"   .............................................................................................                                                                                         ......................................................                 ",
-"   .............................................................................................                                                                                        .......................................................                 ",
-"  ..............................................................................................                                                                                        .......................................................                 ",
-"  .............................................................................................                                                                                         ......................................................                  ",
-"  .............................................................................................                                                                                        .......................................................                  ",
-" ..............................................................................................                                                                                        .......................................................                  ",
-" .............................................................................................                                                                                         ......................................................                   ",
-" .............................................................................................                                                                                        .......................................................                   ",
-"..............................................................................................                                                                                        .......................................................                   ",
-".............................................................................................                                                                                         ......................................................                    ",
-"                                                                                                                                                                                     .......................................................                    ",
-"                                                                                                                                                                                     .......................................................                    ",
-"                                                                                                                                                                                     ......................................................                     ",
-"                                                                                                                                                                                    .......................................................                     ",
-"                                                                                                                                                                                    .......................................................                     ",
-"                                                                                                                                                                                    ......................................................                      ",
-"                                                                                                                                                                                    ......................................................                      ",
-"                                                                                                                                                                                   .......................................................                      ",
-"                                                                                                                                                                                   ......................................................                       ",
-"                                                                                                                                                                                   ......................................................                       ",
-"                                                                                                                                                                                  .......................................................                       ",
-"                                                                                                                                                                                  ......................................................                        ",
-"                                                                                                                                                                                  ......................................................                        ",
-"                                                                                                                                                                                 .......................................................                        ",
-"                                                                                                                                                                                 ......................................................                         ",
-"                                                                                                                                                                                 ......................................................                         ",
-"                                                                                                                                                                                .......................................................                         ",
-"                                                                                                                                                                                ......................................................                          ",
-"                                                                                                                                                                                ......................................................                          ",
-"                                                                                                                                                                               .......................................................                          ",
-"                  ...................................................................................................................................................................................................................                           ",
-"                  ...................................................................................................................................................................................................................                           ",
-"                 ....................................................................................................................................................................................................................                           ",
-"                 ...................................................................................................................................................................................................................                            ",
-"                 ...................................................................................................................................................................................................................                            ",
-"                ...................................................................................................................................................................................................................                             ",
-"                ...................................................................................................................................................................................................................                             ",
-"                ..................................................................................................................................................................................................................                              ",
-"               ..................................................................................................................................................................................................................                               ",
-"               ..................................................................................................................................................................................................................                               ",
-"               .................................................................................................................................................................................................................                                ",
-"               .................................................................................................................................................................................................................                                ",
-"              .................................................................................................................................................................................................................                                 ",
-"              ................................................................................................................................................................................................................                                  ",
-"              ...............................................................................................................................................................................................................                                   ",
-"             ...............................................................................................................................................................................................................                                    ",
-"             ...............................................................................................................................................................................................................                                    ",
-"             ..............................................................................................................................................................................................................                                     ",
-"            ..............................................................................................................................................................................................................                                      ",
-"            .............................................................................................................................................................................................................                                       ",
-"            ............................................................................................................................................................................................................                                        ",
-"           ............................................................................................................................................................................................................                                         ",
-"           ...........................................................................................................................................................................................................                                          ",
-"           ..........................................................................................................................................................................................................                                           ",
-"          .........................................................................................................................................................................................................                                             ",
-"          ........................................................................................................................................................................................................                                              ",
-"          .......................................................................................................................................................................................................                                               ",
-"         ......................................................................................................................................................................................................                                                 ",
-"         .....................................................................................................................................................................................................                                                  ",
-"         ...................................................................................................................................................................................................                                                    ",
-"        ...................................................................................................................................................................................................                                                     ",
-"        .................................................................................................................................................................................................                                                       ",
-"        ...............................................................................................................................................................................................                                                         ",
-"       ..............................................................................................................................................................................................                                                           ",
-"       ...........................................................................................................................................................................................                                                              ",
-"       .........................................................................................................................................................................................                                                                ",
-"      ......................................................................................................................................................................................                                                                    ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                ",
-"                                                                                                                                                                                                                                                                "};
+/* XPM */
+static char *_____________[] = {
+/* columns rows colors chars-per-pixel */
+"256 256 63 1",
+"  c #0567B5",
+". c #0768B6",
+"X c #0B6BB7",
+"o c #0E6DB8",
+"O c #116EB9",
+"+ c #1571BA",
+"@ c #1C75BC",
+"# c #2077BD",
+"$ c #247ABE",
+"% c #287CBF",
+"& c #1D79C2",
+"* c #1E7DC9",
+"= c #2C7FC1",
+"- c #1F80CE",
+"; c #1F82D1",
+": c #2E80C2",
+"> c #3383C3",
+", c #3886C4",
+"< c #3E89C6",
+"1 c #418BC7",
+"2 c #458EC8",
+"3 c #4B92CA",
+"4 c #5296CC",
+"5 c #5598CD",
+"6 c #5B9BCF",
+"7 c #5F9ED0",
+"8 c #609ED0",
+"9 c #66A2D2",
+"0 c #6CA6D4",
+"q c #6FA8D5",
+"w c #73AAD6",
+"e c #78ADD7",
+"r c #7AAED8",
+"t c #7EB1D9",
+"y c #83B4DB",
+"u c #88B7DC",
+"i c #8EBADE",
+"p c #91BDDF",
+"a c #96BFE0",
+"s c #97C0E1",
+"d c #9BC2E2",
+"f c #A2C7E4",
+"g c #A6C9E5",
+"h c #ABCCE6",
+"j c #B0CFE8",
+"k c #B4D1E9",
+"l c #BBD6EB",
+"z c #BFD8EC",
+"x c #C3DBED",
+"c c #C8DEEF",
+"v c #CBDFF0",
+"b c #CCE0F0",
+"n c #D4E5F2",
+"m c #D8E7F4",
+"M c #DDEAF5",
+"N c #E3EEF7",
+"B c #E5F0F7",
+"V c #E6F0F8",
+"C c #ECF4F9",
+"Z c #F1F7FB",
+"A c #F5F9FC",
+"S c #FFFFFF",
+"D c None",
+/* pixels */
+"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%##%DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###@@@@DDDDDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+@@@@@@@@@@@@+@@@@@@#;DDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;DDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDD=+&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@=DDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@DDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDD",
+"DDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDD",
+"DDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDD",
+"DDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDD",
+"DDDDDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDD",
+"DDDDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDDDD",
+"DDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDDD",
+"DDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDD",
+"DDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDD",
+"DDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDD",
+"DDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@+@@@@@@@@@@@@@@@@@@@#@@@@@+@@@@@@+@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDD",
+"DDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@##@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDD",
+"DDDDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDD",
+"DDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+@@@@@@@@@#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DDDD",
+"DDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDD",
+"DDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDD",
+"DDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DDD",
+"DDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDD",
+"DDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDD",
+"DDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DD",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+9iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiuiu03>+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XnSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCg6$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+3ZSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OpASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM9#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XmSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk,+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+3CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OpASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM4+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ nSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+3CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSf$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oiASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSwo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ nSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+3CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSqX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oiASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSj:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ bSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSB4O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSqo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@orASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSd%+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSx<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm3+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@OrZSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZ5o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSA6o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSqo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XrZSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSqo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSqo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+=MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS8o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@orZSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSC5o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM3+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oeCSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSd$+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSwo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%jSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk>+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSyO@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$hSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSB4O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk>+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#6SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSyo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%hSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSB5o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk>+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@5SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSyo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#iSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS9o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSz<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@2SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSp+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#iSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSA0o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSx<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSp@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+,xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAy @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#uSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSA0o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o8BSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM3+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSx1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@opSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSxo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSp+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+,zSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZu @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#uSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSA0o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o8BSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM3+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSb2+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@opSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSScX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@1SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSf#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+1xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAuX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#ySSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSeX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@X0ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@pSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSg#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+1xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZrX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@eSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSrX#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@X0ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@zSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+pSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSg$+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+1bSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZyX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@wSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSt.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XqSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#dSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSz @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o3nSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCyo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@wSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSy.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oqSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN6o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#aSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSz @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl:+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o3MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZyX#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@wSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSi.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@owSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM,+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@kSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN8o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+%hSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o4mSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCeX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSi.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@owSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@gSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN8o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%gSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSl @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSx:+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o4NSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCeX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSd @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+tSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@hSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSC9o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#6aiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiipiiiiiiieO@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc<+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+8ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSfo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+gSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSC0o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc<O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+6ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSgo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+fSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCwX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc1O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+3ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSho@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+pASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCqX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSn3O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSj++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+pASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSuX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+mSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSn3+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,ASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@+iASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSyX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:45555555455554455555544555544445444555544555544555555445555444455445555445555445555445555445555445555445555444444553mSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm3O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.uSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSk++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+#jSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZeX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o5MSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc%+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XrSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAy.@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+gSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o1cSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCqX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XeSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSho@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+fSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSM4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o1cSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCyX@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@XeSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSko@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+fSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSc$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+1cSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSm3o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.wSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSC0o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+dSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCro@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O1cSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCro@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@oqASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCto@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@dSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCyo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+<xSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCeo@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@X9CSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSn4o@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@opSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSx:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+,lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCy@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o8BSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSb1+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@opSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSNw#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+,lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAa%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o6BSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAAAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAa:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ouSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSAAAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCd:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+>lSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSZZAAAAAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCk9@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@o5BSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSCCAAAAAASSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSnlu4@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@##+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"D@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@D",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&D",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DD",
+"DDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DD",
+"DDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDD",
+"DDD=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDD",
+"DDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DDD",
+"DDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDD",
+"DDDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDD",
+"DDDDD@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&DDDD",
+"DDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDD",
+"DDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDD",
+"DDDDDD&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDD",
+"DDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDD",
+"DDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDD",
+"DDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDD",
+"DDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDDD",
+"DDDDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*DDDDDDDDD",
+"DDDDDDDDDD*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDD",
+"DDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDD",
+"DDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDD",
+"DDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDD",
+"DDDDDDDDDDDDDD@@@&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDD@&+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+&@DDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDD:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+&:DDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;DDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@;DDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDD",
+"DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"
+};
diff --git a/share/pixmaps/bitcoin32.png b/share/pixmaps/bitcoin32.png
index 91cd8d5e4738af97c9d40b00dcc24c3337bc255d..a60dfae2aa8ffeb2c370d918822fdd2a875214e0 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin32.xpm b/share/pixmaps/bitcoin32.xpm
old mode 100755
new mode 100644
index 2b045670833e..b58610850456
--- a/share/pixmaps/bitcoin32.xpm
+++ b/share/pixmaps/bitcoin32.xpm
@@ -1,37 +1,112 @@
-/* XPM */
-static char *bitcoin___[] = {
-"32 32 2 1",
-" 	c None",
-".	c #1C75BC",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"       .                        ",
-"       ........................ ",
-"      ..........................",
-"      ..........................",
-"      ..........................",
-"                         .......",
-"                         ...... ",
-"                        ....... ",
-" ............           ....... ",
-" ............           ......  ",
-" ...........           .......  ",
-"............           .......  ",
-"                       ......   ",
-"                      .......   ",
-"                      .......   ",
-"  ..........................    ",
-"  ..........................    ",
-" ..........................     ",
-" ........................       ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                ",
-"                                "};
+/* XPM */
+static char *_____________[] = {
+/* columns rows colors chars-per-pixel */
+"32 32 74 1",
+"  c #0F6DB8",
+". c #106DB8",
+"X c #106EB8",
+"o c #106EB9",
+"O c #116EB9",
+"+ c #126FB9",
+"@ c #136FB9",
+"# c #1370B9",
+"$ c #1470BA",
+"% c #1571BA",
+"& c #1671BA",
+"* c #1772BA",
+"= c #1772BB",
+"- c #1873BB",
+"; c #1973BB",
+": c #1A73BB",
+"> c #1A74BB",
+", c #1B74BC",
+"< c #1B75BC",
+"1 c #1C75BC",
+"2 c #1D76BC",
+"3 c #1E76BD",
+"4 c #2379BE",
+"5 c #267BBF",
+"6 c #287DC0",
+"7 c #2E80C1",
+"8 c #3483C3",
+"9 c #3986C5",
+"0 c #3F8AC6",
+"q c #428CC7",
+"w c #438DC8",
+"e c #4C92CA",
+"r c #4C93CA",
+"t c #4E93CB",
+"y c #4F94CB",
+"u c #5296CC",
+"i c #5598CD",
+"p c #5698CD",
+"a c #589ACE",
+"s c #62A0D1",
+"d c #71A9D5",
+"f c #72A9D5",
+"g c #77ACD7",
+"h c #85B5DB",
+"j c #87B6DB",
+"k c #8CB9DD",
+"l c #8EBADE",
+"z c #8FBBDE",
+"x c #95BFE0",
+"c c #9EC4E2",
+"v c #9FC5E3",
+"b c #A4C8E4",
+"n c #A8CAE5",
+"m c #ABCCE6",
+"M c #ACCDE7",
+"N c #AECEE7",
+"B c #BDD7EC",
+"V c #C2DAED",
+"C c #C5DCEE",
+"Z c #C9DEEF",
+"A c #DCEAF5",
+"S c #DDEAF5",
+"D c #DDEBF5",
+"F c #E0EDF6",
+"G c #E8F1F8",
+"H c #E9F2F8",
+"J c #F0F6FB",
+"K c #F2F7FB",
+"L c #F8FAFD",
+"P c #F8FBFD",
+"I c #FCFDFE",
+"U c #FDFEFF",
+"Y c #FFFFFF",
+"T c None",
+/* pixels */
+"TTT11111111111111111111111111TTT",
+"TT1111111111111111111111111111TT",
+"T111111111111111111111111111111T",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"111111111111111-1111111111111111",
+"111111111OO.            O.=11111",
+"11111111OFYYYYYIYIYIYYYYYYV41111",
+"111111118YYYYYYYYYYYYYYYYYYB=111",
+"1111111<hYYYYYYYYYYYYYYYYYYL 111",
+"1111111=lNNNNNNNNNNNNNZYYYYAO111",
+"11111111--------==--==bYYYYl1111",
+"1111-glllllllh=111111OLYYYY91111",
+"11111YYYYYYYYn-11111>eYYYYHO1111",
+"1111fYYYYYYYYu111111>vYYYYx11111",
+"111=mDSSSDSSSO111111.KYYYYq11111",
+"1111=#####=O@1,11111wYYYYH#11111",
+"1111>4apppppppiiiiiinYYYYv111111",
+"11111fYYYYYYYYYYYYYYYYYYY8111111",
+"1111=CYYYYYYYYYYYYYYYYYYs-111111",
+"11111YYYYYYYYYYYYYYYYYHt--111111",
+"11115ytttttttttuttttt0O111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"11111111111111111111111111111111",
+"T111111111111111111111111111111T",
+"TT1111111111111111111111111111TT",
+"TTT11111111111111111111111111TTT"
+};
diff --git a/share/pixmaps/bitcoin64.png b/share/pixmaps/bitcoin64.png
index c9688088c0ac33ed80ecf3fcabfbb374746de37c..fee39a42d32fe04be1b4575c37845a95f6312617 100755
GIT binary patch
diff --git a/share/pixmaps/bitcoin64.xpm b/share/pixmaps/bitcoin64.xpm
old mode 100755
new mode 100644
index 0aea6adfc312..7221420c730a
--- a/share/pixmaps/bitcoin64.xpm
+++ b/share/pixmaps/bitcoin64.xpm
@@ -1,69 +1,178 @@
-/* XPM */
-static char *bitcoin___[] = {
-"64 64 2 1",
-" 	c None",
-".	c #1C75BC",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"              ..............................................    ",
-"             .................................................  ",
-"             .................................................. ",
-"             .................................................. ",
-"            ....................................................",
-"            ....................................................",
-"            ....................................................",
-"           .....................................................",
-"           .....................................................",
-"           ...................................... ..............",
-"                                                  ............. ",
-"                                                 .............. ",
-"                                                 .............. ",
-"                                                 .............  ",
-"   .                                            ..............  ",
-"   .......................                      ..............  ",
-"  ........................                      .............   ",
-"  .......................                      ..............   ",
-"  .......................                      ..............   ",
-" ........................                      .............    ",
-" .......................                      ..............    ",
-" .......................                      ..............    ",
-"........................                      .............     ",
-"                                             ..............     ",
-"                                             ..............     ",
-"                                             .............      ",
-"                                            ..............      ",
-"                                            ..............      ",
-"      ...................................................       ",
-"    .....................................................       ",
-"    ....................................................        ",
-"    ....................................................        ",
-"   ....................................................         ",
-"   ...................................................          ",
-"   ..................................................           ",
-"  ..................................................            ",
-"  ................................................              ",
-"  ..............................................                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                ",
-"                                                                "};
+/* XPM */
+static char *_____________[] = {
+/* columns rows colors chars-per-pixel */
+"64 64 108 2",
+"   c #0D6CB7",
+".  c #0E6CB8",
+"X  c #0E6DB8",
+"o  c #0F6DB8",
+"O  c #106DB9",
+"+  c #106EB8",
+"@  c #106EB9",
+"#  c #116EB9",
+"$  c #116FB9",
+"%  c #126FB9",
+"&  c #136FB9",
+"*  c #1370B9",
+"=  c #1470B9",
+"-  c #1470BA",
+";  c #1571BA",
+":  c #1671BA",
+">  c #1772BB",
+",  c #1872BB",
+"<  c #1873BB",
+"1  c #1973BB",
+"2  c #1A73BB",
+"3  c #1A74BB",
+"4  c #1A74BC",
+"5  c #1B74BC",
+"6  c #1B75BC",
+"7  c #1C75BC",
+"8  c #1D75BC",
+"9  c #1C75BD",
+"0  c #1D76BC",
+"q  c #1C76BD",
+"w  c #2B7EC1",
+"e  c #3483C3",
+"r  c #3584C4",
+"t  c #3685C4",
+"y  c #3986C5",
+"u  c #3B88C6",
+"i  c #3F8AC7",
+"p  c #448EC8",
+"a  c #468FC9",
+"s  c #478FC9",
+"d  c #4890C9",
+"f  c #4991CA",
+"g  c #4E93CB",
+"h  c #4F94CB",
+"j  c #5195CC",
+"k  c #5296CC",
+"l  c #5497CD",
+"z  c #5698CD",
+"x  c #5799CD",
+"c  c #579ACE",
+"v  c #5B9BCE",
+"b  c #629FD1",
+"n  c #69A4D3",
+"m  c #6CA6D4",
+"M  c #6DA6D4",
+"N  c #6EA7D5",
+"B  c #75ABD7",
+"V  c #7FB1D9",
+"C  c #83B4DA",
+"Z  c #83B4DB",
+"A  c #84B4DB",
+"S  c #86B6DB",
+"D  c #87B6DC",
+"F  c #8EBADE",
+"G  c #8EBBDE",
+"H  c #91BDDF",
+"J  c #97BFE0",
+"K  c #9AC2E1",
+"L  c #9FC5E2",
+"P  c #9EC4E3",
+"I  c #A0C5E3",
+"U  c #A2C7E4",
+"Y  c #A6C9E5",
+"T  c #A7CAE5",
+"R  c #A8CAE6",
+"E  c #AACBE6",
+"W  c #ABCCE6",
+"Q  c #ACCDE6",
+"!  c #ADCEE7",
+"~  c #AECEE7",
+"^  c #B2D0E8",
+"/  c #BAD5EB",
+"(  c #C3DBED",
+")  c #CBDFEF",
+"_  c #D4E5F2",
+"`  c #D5E6F3",
+"'  c #D6E6F3",
+"]  c #DAE9F4",
+"[  c #E1EDF6",
+"{  c #E2EDF7",
+"}  c #E4EFF7",
+"|  c #E6F0F8",
+" . c #E7F0F8",
+".. c #EDF4FA",
+"X. c #EEF4FA",
+"o. c #EEF5FA",
+"O. c #EFF5FA",
+"+. c #F0F6FB",
+"@. c #F3F8FC",
+"#. c #F5F9FC",
+"$. c #F6F9FC",
+"%. c #F6FAFC",
+"&. c #F9FBFD",
+"*. c #FBFDFE",
+"=. c #FCFEFF",
+"-. c #FDFEFF",
+";. c #FFFFFF",
+":. c None",
+/* pixels */
+":.:.:.:.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.:.:.:.",
+":.:.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.:.",
+":.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.",
+":.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.",
+":.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 , 8 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 , # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ; , 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 C O.....O.O.......O.................+.........+.........O.....O.o.{ W e 3 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 . { ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.N , 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 e ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.r 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 Z ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.K 3 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 # ] ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;._ # 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 w ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.| . 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 Z ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.) * 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 i g g g g g g g g g g g g g g g g g g g g g g g h h g g f _ ;.;.;.;.;.;.;.;.;.S 4 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 7 7 7 7 7 7 7 7 7 7 7 7 ;.;.;.;.;.;.;.;.;.;.e 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 3 7 7 7 7 7 7 7 7 7 7 7 n ;.;.;.;.;.;.;.;.;.} . 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 ; . . . . . . . . . . . . . . . . # 8 8 7 7 7 7 7 7 7 7 7 7 7 7 7 ; / ;.;.;.;.;.;.;.;.;.F 4 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 4 4 Y ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;._ # 3 7 7 7 7 7 7 7 7 7 7 7 7 7 , ;.;.;.;.;.;.;.;.;.;.u 3 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 * %.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.N 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 b ;.;.;.;.;.;.;.;.;...* 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 j ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 , ^ ;.;.;.;.;.;.;.;.;.K 4 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 , W ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.( ; 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ; ;.;.;.;.;.;.;.;.;.;.p 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 ; *.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.N 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4 v ;.;.;.;.;.;.;.;.;.@.# 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 x ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 3 R ;.;.;.;.;.;.;.;.;.L , 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 3 B ! ~ ! ! ! ! ! ! ! ~ ! ! ! ! ! ! F ; 7 7 7 7 7 7 7 7 7 7 7 7 7 3 # ;.;.;.;.;.;.;.;.;.;.h 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 , 3 ; 4 , 3 ; 4 , 3 , 3 3 ; 4 3 ; 3 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 k ;.;.;.;.;.;.;.;.;.&.# 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4 7 4 4 7 7 7 7 7 7 4 7 7 7 7 7 7 7 7 7 7 3 U ;.;.;.;.;.;.;.;.;.Y 3 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 4 4 3 3 , 3 4 3 3 2 4 4 2 4 2 3 3 2 4 4 2 3 3 2 4 3 4 , 3   #.;.;.;.;.;.;.;.;.;.v 4 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 4 f I P L L L P P L P P L P L P P L P P L L P L P P L P P L R ;.;.;.;.;.;.;.;.;.;.# 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 , W ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.H 4 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 ; *.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.+., 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 j ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.y 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 4 3 Y ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.p 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 # %.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;...e 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 f ;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.;.&.V ; 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 4 x F F F F F F F F F F F F F F F F F F F F G G F F F F F F F F F F D l # 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 4 7 7 7 7 7 7 7 7 4 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+"7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 ",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+":.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.",
+":.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.",
+":.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.",
+":.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.",
+":.:.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.:.",
+":.:.:.:.:.:.:.7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 :.:.:.:.:.:.:."
+};
diff --git a/share/pixmaps/favicon.ico b/share/pixmaps/favicon.ico
index a8c0c09137794f457622508c17c0d0d565e53974..fd1735bae29e3ac32480c9e9f222b2b6f5d7730e 100755
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin.icns b/src/qt/res/icons/bitcoin.icns
index b8ee4fbf8ad99f3a07c714e7a3603747e65da3f7..c17b56351de618b0c15b3e846a93ec45f096e155 100644
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin.ico b/src/qt/res/icons/bitcoin.ico
index 037611c8aa730d6befe50e22385ac3ed6548e75a..9ae1ba55b6d8e75e414b5b9cca67e467b7925e46 100755
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin.png b/src/qt/res/icons/bitcoin.png
old mode 100755
new mode 100644
index b5181822f42914a1ff6425e6cf5c5d4fd44ccf1f..4a92d931eba297b8b3a9ab82b2cb812154254a39
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin_testnet.ico b/src/qt/res/icons/bitcoin_testnet.ico
index f9f7a91b74cb977707642b8d47dfdea67a109963..b86e2a7039463144a4d6270df8b2374eb14d1308 100755
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin_testnet.png b/src/qt/res/icons/bitcoin_testnet.png
index 1247f23f621a506092f1824c135895db5ba5810a..78d814c20d45bcd9f2571bbf0fa6f97671dfad92 100755
GIT binary patch

From 69f482ec2e999d1a84ae0f55e83a4e842e4eb0d1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 30 Jun 2015 05:42:12 +0300
Subject: [PATCH 1474/1819] Execute "mogrify *.png" to fix "GUI: libpng
 warning: iCCP: known incorrect sRGB profile"

---
 src/qt/res/icons/add.png                    | Bin 3945 -> 1456 bytes
 src/qt/res/icons/address-book.png           | Bin 4254 -> 1758 bytes
 src/qt/res/icons/bitcoin.png                | Bin 6298 -> 6610 bytes
 src/qt/res/icons/bitcoin_testnet.png        | Bin 4874 -> 5535 bytes
 src/qt/res/icons/browse.png                 | Bin 1741 -> 1534 bytes
 src/qt/res/icons/clock1.png                 | Bin 3590 -> 1262 bytes
 src/qt/res/icons/clock2.png                 | Bin 3593 -> 1262 bytes
 src/qt/res/icons/clock3.png                 | Bin 3591 -> 1259 bytes
 src/qt/res/icons/clock4.png                 | Bin 3604 -> 1263 bytes
 src/qt/res/icons/clock5.png                 | Bin 3610 -> 1258 bytes
 src/qt/res/icons/configure.png              | Bin 3568 -> 1292 bytes
 src/qt/res/icons/connect0_16.png            | Bin 702 -> 1148 bytes
 src/qt/res/icons/connect1_16.png            | Bin 3310 -> 1108 bytes
 src/qt/res/icons/connect2_16.png            | Bin 3329 -> 1120 bytes
 src/qt/res/icons/connect3_16.png            | Bin 3338 -> 1121 bytes
 src/qt/res/icons/connect4_16.png            | Bin 3327 -> 1108 bytes
 src/qt/res/icons/debugwindow.png            | Bin 7967 -> 5472 bytes
 src/qt/res/icons/drkblue_address-book.png   | Bin 2501 -> 1799 bytes
 src/qt/res/icons/drkblue_editcopy.png       | Bin 1705 -> 846 bytes
 src/qt/res/icons/drkblue_editpaste.png      | Bin 2073 -> 1428 bytes
 src/qt/res/icons/drkblue_remove.png         | Bin 1224 -> 1382 bytes
 src/qt/res/icons/edit.png                   | Bin 3940 -> 1457 bytes
 src/qt/res/icons/editcopy.png               | Bin 879 -> 830 bytes
 src/qt/res/icons/editpaste.png              | Bin 3945 -> 1439 bytes
 src/qt/res/icons/export.png                 | Bin 4931 -> 2429 bytes
 src/qt/res/icons/eye.png                    | Bin 536 -> 723 bytes
 src/qt/res/icons/eye_minus.png              | Bin 595 -> 802 bytes
 src/qt/res/icons/eye_plus.png               | Bin 661 -> 864 bytes
 src/qt/res/icons/filesave.png               | Bin 1741 -> 1534 bytes
 src/qt/res/icons/history.png                | Bin 3841 -> 1631 bytes
 src/qt/res/icons/key.png                    | Bin 4445 -> 1961 bytes
 src/qt/res/icons/lock_closed.png            | Bin 4398 -> 1918 bytes
 src/qt/res/icons/lock_open.png              | Bin 4410 -> 1923 bytes
 src/qt/res/icons/notsynced.png              | Bin 3650 -> 1301 bytes
 src/qt/res/icons/overview.png               | Bin 9403 -> 7304 bytes
 src/qt/res/icons/qrcode.png                 | Bin 237 -> 403 bytes
 src/qt/res/icons/quit.png                   | Bin 2163 -> 2309 bytes
 src/qt/res/icons/receive.png                | Bin 3907 -> 1500 bytes
 src/qt/res/icons/remove.png                 | Bin 1224 -> 1382 bytes
 src/qt/res/icons/send.png                   | Bin 3931 -> 1518 bytes
 src/qt/res/icons/synced.png                 | Bin 3451 -> 1095 bytes
 src/qt/res/icons/transaction0.png           | Bin 569 -> 598 bytes
 src/qt/res/icons/transaction2.png           | Bin 3043 -> 573 bytes
 src/qt/res/icons/transaction_conflicted.png | Bin 474 -> 500 bytes
 src/qt/res/icons/tx_inout.png               | Bin 3440 -> 799 bytes
 src/qt/res/icons/tx_input.png               | Bin 3124 -> 567 bytes
 src/qt/res/icons/tx_mined.png               | Bin 3593 -> 864 bytes
 src/qt/res/icons/tx_output.png              | Bin 533 -> 587 bytes
 src/qt/res/icons/unit_dash.png              | Bin 353 -> 478 bytes
 src/qt/res/icons/unit_duffs.png             | Bin 330 -> 453 bytes
 src/qt/res/icons/unit_mdash.png             | Bin 393 -> 511 bytes
 src/qt/res/icons/unit_tdash.png             | Bin 373 -> 496 bytes
 src/qt/res/icons/unit_tduffs.png            | Bin 346 -> 470 bytes
 src/qt/res/icons/unit_tmdash.png            | Bin 409 -> 524 bytes
 src/qt/res/icons/unit_tudash.png            | Bin 393 -> 514 bytes
 src/qt/res/icons/unit_udash.png             | Bin 378 -> 500 bytes
 56 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100755 => 100644 src/qt/res/icons/add.png
 mode change 100755 => 100644 src/qt/res/icons/address-book.png
 mode change 100755 => 100644 src/qt/res/icons/bitcoin_testnet.png
 mode change 100755 => 100644 src/qt/res/icons/browse.png
 mode change 100755 => 100644 src/qt/res/icons/clock1.png
 mode change 100755 => 100644 src/qt/res/icons/clock2.png
 mode change 100755 => 100644 src/qt/res/icons/clock3.png
 mode change 100755 => 100644 src/qt/res/icons/clock4.png
 mode change 100755 => 100644 src/qt/res/icons/clock5.png
 mode change 100755 => 100644 src/qt/res/icons/configure.png
 mode change 100755 => 100644 src/qt/res/icons/connect0_16.png
 mode change 100755 => 100644 src/qt/res/icons/connect1_16.png
 mode change 100755 => 100644 src/qt/res/icons/connect2_16.png
 mode change 100755 => 100644 src/qt/res/icons/connect3_16.png
 mode change 100755 => 100644 src/qt/res/icons/connect4_16.png
 mode change 100755 => 100644 src/qt/res/icons/debugwindow.png
 mode change 100755 => 100644 src/qt/res/icons/edit.png
 mode change 100755 => 100644 src/qt/res/icons/editcopy.png
 mode change 100755 => 100644 src/qt/res/icons/editpaste.png
 mode change 100755 => 100644 src/qt/res/icons/export.png
 mode change 100755 => 100644 src/qt/res/icons/filesave.png
 mode change 100755 => 100644 src/qt/res/icons/history.png
 mode change 100755 => 100644 src/qt/res/icons/key.png
 mode change 100755 => 100644 src/qt/res/icons/lock_closed.png
 mode change 100755 => 100644 src/qt/res/icons/lock_open.png
 mode change 100755 => 100644 src/qt/res/icons/notsynced.png
 mode change 100755 => 100644 src/qt/res/icons/overview.png
 mode change 100755 => 100644 src/qt/res/icons/qrcode.png
 mode change 100755 => 100644 src/qt/res/icons/quit.png
 mode change 100755 => 100644 src/qt/res/icons/receive.png
 mode change 100755 => 100644 src/qt/res/icons/remove.png
 mode change 100755 => 100644 src/qt/res/icons/send.png
 mode change 100755 => 100644 src/qt/res/icons/synced.png
 mode change 100755 => 100644 src/qt/res/icons/transaction0.png
 mode change 100755 => 100644 src/qt/res/icons/transaction2.png
 mode change 100755 => 100644 src/qt/res/icons/tx_inout.png
 mode change 100755 => 100644 src/qt/res/icons/tx_input.png
 mode change 100755 => 100644 src/qt/res/icons/tx_mined.png
 mode change 100755 => 100644 src/qt/res/icons/tx_output.png
 mode change 100755 => 100644 src/qt/res/icons/unit_dash.png
 mode change 100755 => 100644 src/qt/res/icons/unit_duffs.png
 mode change 100755 => 100644 src/qt/res/icons/unit_mdash.png
 mode change 100755 => 100644 src/qt/res/icons/unit_tdash.png
 mode change 100755 => 100644 src/qt/res/icons/unit_tduffs.png
 mode change 100755 => 100644 src/qt/res/icons/unit_tmdash.png
 mode change 100755 => 100644 src/qt/res/icons/unit_tudash.png
 mode change 100755 => 100644 src/qt/res/icons/unit_udash.png

diff --git a/src/qt/res/icons/add.png b/src/qt/res/icons/add.png
old mode 100755
new mode 100644
index 0e2674b9c978cb55925df0af0eb409be1735f0c8..809026c2024dc088d2ee73367082bf53b7247132
GIT binary patch
diff --git a/src/qt/res/icons/address-book.png b/src/qt/res/icons/address-book.png
old mode 100755
new mode 100644
index bd561de679d273f18a26e09b2b210d70925109e8..f0b2f90bd0bfd65d22b24c22224eab4b9838399f
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin.png b/src/qt/res/icons/bitcoin.png
index 4a92d931eba297b8b3a9ab82b2cb812154254a39..257ff1419a7b1eeb5dde27a7cca177a60022fbae 100644
GIT binary patch
diff --git a/src/qt/res/icons/bitcoin_testnet.png b/src/qt/res/icons/bitcoin_testnet.png
old mode 100755
new mode 100644
index 78d814c20d45bcd9f2571bbf0fa6f97671dfad92..5e044d34083c62325927e987acb404b7220bd3e4
GIT binary patch
diff --git a/src/qt/res/icons/browse.png b/src/qt/res/icons/browse.png
old mode 100755
new mode 100644
index ae13a151d5ad11239194edd1fd91199f8dd72f4e..c4d1ef0c4fb160e1153f0f485df6a04121c70471
GIT binary patch
diff --git a/src/qt/res/icons/clock1.png b/src/qt/res/icons/clock1.png
old mode 100755
new mode 100644
index da04562f818cff8a074b158a9e5cf80ffeec4ce6..a7a499770e25e8fb7cf345b644ebdd8d77743ff7
GIT binary patch
diff --git a/src/qt/res/icons/clock2.png b/src/qt/res/icons/clock2.png
old mode 100755
new mode 100644
index cd6afb113ea0dd4598ee5b8665ec297b4c11cac6..9e25da3ce26ce63d7daa484e0f4cedbf96951124
GIT binary patch
diff --git a/src/qt/res/icons/clock3.png b/src/qt/res/icons/clock3.png
old mode 100755
new mode 100644
index 5d013aec3377028e690aba13c1bb35ffac656ba2..ea531d4d3376908511d3a168b590b79255e45b75
GIT binary patch
diff --git a/src/qt/res/icons/clock4.png b/src/qt/res/icons/clock4.png
old mode 100755
new mode 100644
index 26a1dd12279267b297b947fb0743440785b05845..3f3a462737a20238066f5c4a3bcefa965fb43e55
GIT binary patch
diff --git a/src/qt/res/icons/clock5.png b/src/qt/res/icons/clock5.png
old mode 100755
new mode 100644
index 16f9de2756263c09662867f33a4d4dd2d7ad0211..b2dccc2caf2f148e56ac9b095c6c8c0ac99744d3
GIT binary patch
diff --git a/src/qt/res/icons/configure.png b/src/qt/res/icons/configure.png
old mode 100755
new mode 100644
index 29ac0c3556e0297963404d05040fa487ca686eba..6bdbf757cbef22042e1845a42cadc6e6dad93019
GIT binary patch
diff --git a/src/qt/res/icons/connect0_16.png b/src/qt/res/icons/connect0_16.png
old mode 100755
new mode 100644
index 66f3ae4f86a864755c59d0622cfb1bec43b018d2..b8453165e71d2616e3212178909fbd600729f324
GIT binary patch
diff --git a/src/qt/res/icons/connect1_16.png b/src/qt/res/icons/connect1_16.png
old mode 100755
new mode 100644
index 2d43d0864dfdc7f412e0d0320c487567c9df8317..c9bc2d80a945711fd3f72aeb8167be2bb6df2de4
GIT binary patch
diff --git a/src/qt/res/icons/connect2_16.png b/src/qt/res/icons/connect2_16.png
old mode 100755
new mode 100644
index bcb003bae1701a7ee0b5ef6fa7e6b2b3082b2c5a..0caddf62b63857dcd41356e7089313732333eba5
GIT binary patch
diff --git a/src/qt/res/icons/connect3_16.png b/src/qt/res/icons/connect3_16.png
old mode 100755
new mode 100644
index 21ac978db7a68b11db3da0bddb574c7a21db2e75..036aebbd483edcb01a92902b03ac6c014ff8058e
GIT binary patch
diff --git a/src/qt/res/icons/connect4_16.png b/src/qt/res/icons/connect4_16.png
old mode 100755
new mode 100644
index 663b9e500ab962ea864e0216e245a639d4e92e5f..b96fba68d49b170083e11bf21ec83e3efaf99eb2
GIT binary patch
diff --git a/src/qt/res/icons/debugwindow.png b/src/qt/res/icons/debugwindow.png
old mode 100755
new mode 100644
index fd47c1a913cbf0bc1fa55a17bac55b8453449176..f3e22827bac54d7ec09c7e8f23f495cc9727347b
GIT binary patch
diff --git a/src/qt/res/icons/drkblue_address-book.png b/src/qt/res/icons/drkblue_address-book.png
index 564f2954635ea971f968f66c85e8fae26ff7caf8..878e4d55daafc451a6c6241fe168736f673b775b 100644
GIT binary patch
diff --git a/src/qt/res/icons/drkblue_editcopy.png b/src/qt/res/icons/drkblue_editcopy.png
index df69301b6516a77cb030a202688daef6b83ab1bc..f408472dfba595e2d62df2dc13d8af48c05476a2 100644
GIT binary patch
diff --git a/src/qt/res/icons/drkblue_editpaste.png b/src/qt/res/icons/drkblue_editpaste.png
index d52a61db90d0855c333bbb1f80a48861ccff428b..ceaacdf0fc56ea03254377dcaa4da68ab473d7c9 100644
GIT binary patch
diff --git a/src/qt/res/icons/drkblue_remove.png b/src/qt/res/icons/drkblue_remove.png
index a44b6d130b5aeeccc3641a6c0b831d83d9c03235..e0add0730bc49ec4895ab02e72f1eec80e82db73 100644
GIT binary patch
diff --git a/src/qt/res/icons/edit.png b/src/qt/res/icons/edit.png
old mode 100755
new mode 100644
index 57eb799cbfe527e5fcb6c66a26926a09f971ba09..5fe1ccfe28e3f9d92b2c87009d52abde24e62dc5
GIT binary patch
diff --git a/src/qt/res/icons/editcopy.png b/src/qt/res/icons/editcopy.png
old mode 100755
new mode 100644
index f882aa2ad8a378c229aecf7c2651a42a2f8d25b8..3f3fa511d99775f110d702a5f6878d704528b7ba
GIT binary patch
diff --git a/src/qt/res/icons/editpaste.png b/src/qt/res/icons/editpaste.png
old mode 100755
new mode 100644
index a2581863867dc285a1f9d43a875f85b6bc9ed36b..506f5586c079b366fcfb4da0647fabf3035eb2dc
GIT binary patch
diff --git a/src/qt/res/icons/export.png b/src/qt/res/icons/export.png
old mode 100755
new mode 100644
index f6aa01c386aa2c2c36b5218a3991fe724009c290..b8584ec5e3ae8ebebed7a1c5f719d576b1847afb
GIT binary patch
diff --git a/src/qt/res/icons/eye.png b/src/qt/res/icons/eye.png
index c4d182adbf4ed1140b7c715517e07802758ddeb5..240e374d0ecb3c1299333912caf2ee956457d7f4 100644
GIT binary patch
diff --git a/src/qt/res/icons/eye_minus.png b/src/qt/res/icons/eye_minus.png
index 08b048eae310b10d71082f8edad7b081b79b98af..d53526b6a8fa9570081bc3e69df469573abc8804 100644
GIT binary patch
diff --git a/src/qt/res/icons/eye_plus.png b/src/qt/res/icons/eye_plus.png
index 4ad653156f77cba70a8ba328e2fbd8a0fe45cf89..90ef0aaca5f88b64d75348da1eb5d25b439645be 100644
GIT binary patch
diff --git a/src/qt/res/icons/filesave.png b/src/qt/res/icons/filesave.png
old mode 100755
new mode 100644
index ae13a151d5ad11239194edd1fd91199f8dd72f4e..c602c33fd5087d2258c7d05380ad3d72c23eae7e
GIT binary patch
diff --git a/src/qt/res/icons/history.png b/src/qt/res/icons/history.png
old mode 100755
new mode 100644
index 0c202685943fa6285a1f625c2a790419c9c8f815..07aeca1f96e8f78301719b4212b15274b5d59004
GIT binary patch
diff --git a/src/qt/res/icons/key.png b/src/qt/res/icons/key.png
old mode 100755
new mode 100644
index c5bfcd04476738884f99cd0dd6c1997868b1b1e2..074d236430a1a6fba14ec80eb076b143a7540db4
GIT binary patch
diff --git a/src/qt/res/icons/lock_closed.png b/src/qt/res/icons/lock_closed.png
old mode 100755
new mode 100644
index 09b05e32f081b18cf1f8128294a1bed365d71eb6..ab47a3a9ec66b71d8fa6617d8975155a349ef81c
GIT binary patch
diff --git a/src/qt/res/icons/lock_open.png b/src/qt/res/icons/lock_open.png
old mode 100755
new mode 100644
index 3967e9c14f1a4fab8636250527eba1290829fb0f..54ca6687f7d45410df54b034516db200f0f897ad
GIT binary patch
diff --git a/src/qt/res/icons/notsynced.png b/src/qt/res/icons/notsynced.png
old mode 100755
new mode 100644
index 09bd6c888673586d445c686ac86dbc5d679dfba7..2fc46b8349209fb000abd1e1ab368fad695f45d0
GIT binary patch
diff --git a/src/qt/res/icons/overview.png b/src/qt/res/icons/overview.png
old mode 100755
new mode 100644
index cc8d72b5d495bf2fb2dff388bb9ad789ef813bf9..78a2575b236ffd0b1aca1f549be91b4f16be31ed
GIT binary patch
diff --git a/src/qt/res/icons/qrcode.png b/src/qt/res/icons/qrcode.png
old mode 100755
new mode 100644
index a8d97174b39197ce4f457640f948212edf109451..015078fbfa07930a28340b04edfd0a705f351681
GIT binary patch
diff --git a/src/qt/res/icons/quit.png b/src/qt/res/icons/quit.png
old mode 100755
new mode 100644
index 0dde6f395c07349ea421f625ef1948a1dcb598cc..bf5938605f20925a1044212dd0196ed5224677dc
GIT binary patch
diff --git a/src/qt/res/icons/receive.png b/src/qt/res/icons/receive.png
old mode 100755
new mode 100644
index 9f99d663bc5348b9f742150faab9e8f129e9efc8..61f1408dd8bfe83effff620938803a1eb6214a5a
GIT binary patch
diff --git a/src/qt/res/icons/remove.png b/src/qt/res/icons/remove.png
old mode 100755
new mode 100644
index a44b6d130b5aeeccc3641a6c0b831d83d9c03235..e0add0730bc49ec4895ab02e72f1eec80e82db73
GIT binary patch
diff --git a/src/qt/res/icons/send.png b/src/qt/res/icons/send.png
old mode 100755
new mode 100644
index 946545e5688acfa971914877c28cbbbfbf333bc8..11cc3d1bc0e85596cf847f4777fd456db4b434d0
GIT binary patch
diff --git a/src/qt/res/icons/synced.png b/src/qt/res/icons/synced.png
old mode 100755
new mode 100644
index 3fefc381b5959ddd06f3aa73e43d8af8496706cb..d8a735749cef549030d67ac20beed05bfafd8668
GIT binary patch
diff --git a/src/qt/res/icons/transaction0.png b/src/qt/res/icons/transaction0.png
old mode 100755
new mode 100644
index 4578666ee4640bb6c1473a52196faf336c2ee637..7f73aada94ce3c46ae3917c53fe9c9462d0f8f9c
GIT binary patch
diff --git a/src/qt/res/icons/transaction2.png b/src/qt/res/icons/transaction2.png
old mode 100755
new mode 100644
index db57f1ec23349f4dbe5153ecb2e1da04a4b4d453..4d03d8a2f74eda38baef91185a816c823fb4b887
GIT binary patch
diff --git a/src/qt/res/icons/transaction_conflicted.png b/src/qt/res/icons/transaction_conflicted.png
index 51fff649abfaf8097bcfe7b69e2f02f5ebfd6107..b995c587d707604d98e62f712e93957f8a4ff80d 100644
GIT binary patch
diff --git a/src/qt/res/icons/tx_inout.png b/src/qt/res/icons/tx_inout.png
old mode 100755
new mode 100644
index 63559bea092b540282039120ad7f1b362270ea99..90be9355a26ae21f5c7d2add2beaae60c559daa0
GIT binary patch
diff --git a/src/qt/res/icons/tx_input.png b/src/qt/res/icons/tx_input.png
old mode 100755
new mode 100644
index 5ca7a6a755083a7c79f56473fee79d1ab36ee11c..0e4b47ef68bbd65746ef08bd93305df6e1df339f
GIT binary patch
diff --git a/src/qt/res/icons/tx_mined.png b/src/qt/res/icons/tx_mined.png
old mode 100755
new mode 100644
index a4fa69e1669b5b0ba52dab74bfcc352ea4f2cba6..4a71f25c9730b4349d3afe5ce88b1fb5335ffe5c
GIT binary patch
diff --git a/src/qt/res/icons/tx_output.png b/src/qt/res/icons/tx_output.png
old mode 100755
new mode 100644
index 42a6aa7d0af04f0637db4bff4bd056ec1ea3a9fa..acc1e3a27330a79694a828097f19c8f70a4957e5
GIT binary patch
diff --git a/src/qt/res/icons/unit_dash.png b/src/qt/res/icons/unit_dash.png
old mode 100755
new mode 100644
index 8b29a6addcecbb2e5f4d2d1c0181a52e4a8597a2..1c36829606713f18a5077141ea485acf47089688
GIT binary patch
diff --git a/src/qt/res/icons/unit_duffs.png b/src/qt/res/icons/unit_duffs.png
old mode 100755
new mode 100644
index 5bdbe653ec857db07398f03ca2c931ae7d58e696..3129e256650d7efbe7ca7892d85beeb68b08b00a
GIT binary patch
diff --git a/src/qt/res/icons/unit_mdash.png b/src/qt/res/icons/unit_mdash.png
old mode 100755
new mode 100644
index 0752dd3803fc4794cabc4b6b0b4c9893f7df3d71..dd75be212982cee1bc15d3540dba8f96b9f0990c
GIT binary patch
diff --git a/src/qt/res/icons/unit_tdash.png b/src/qt/res/icons/unit_tdash.png
old mode 100755
new mode 100644
index 07b60673cf448cf4e7c12dedac03eccad1d647c0..46f83509c7f35097904cd28d43632689b2136932
GIT binary patch
diff --git a/src/qt/res/icons/unit_tduffs.png b/src/qt/res/icons/unit_tduffs.png
old mode 100755
new mode 100644
index ef5a892b4fe3606a3eb374001091a93ffa6dcc98..daf67b12a8d82245c36a8395fffc4aa57acbd509
GIT binary patch
diff --git a/src/qt/res/icons/unit_tmdash.png b/src/qt/res/icons/unit_tmdash.png
old mode 100755
new mode 100644
index 65f5d889ed48c6574595f3badad37c344f45951c..c4091a5c83b50e9053609339fd8516c394c392ea
GIT binary patch
diff --git a/src/qt/res/icons/unit_tudash.png b/src/qt/res/icons/unit_tudash.png
old mode 100755
new mode 100644
index 3c2209ae76e66522c399d30470f50bf116ac984b..e74515e0eca92df8e462a9a1bf5d20feebb41003
GIT binary patch
diff --git a/src/qt/res/icons/unit_udash.png b/src/qt/res/icons/unit_udash.png
old mode 100755
new mode 100644
index c6a459804beb174d8d2d05f1d5cee2a34fe111fe..b270724eb1b16012f3ef776a5b82ebb5108dfb81
GIT binary patch

From ca94f2f6d7fcc148c9207dba8b53ade29b8677d3 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 30 Jun 2015 04:07:32 +0300
Subject: [PATCH 1475/1819] Various DS related fixes for overview page: -
 streamline initialization logic for litemode/masternode/ds - call
 updateDarksendProgress on setBalance - format amountAndRounds for 0 balance
 same way as for normal balance (see c3febd20a8b8d7b558635034c19923e6ae79f22e)
 - use style='white-space:pre' to show long strings in tooltips correctly,
 adapt few strings - small fixes (cleanup naming, notr, use static where
 possible and get rid of unneeded class members)

---
 src/qt/forms/overviewpage.ui       |   6 +-
 src/qt/forms/receivecoinsdialog.ui |   4 +-
 src/qt/guiutil.cpp                 |  11 +--
 src/qt/overviewpage.cpp            | 107 ++++++++++++++---------------
 src/qt/overviewpage.h              |   5 --
 5 files changed, 62 insertions(+), 71 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index 00c299c681ef..b26f88b6b9f3 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -179,7 +179,7 @@
              </widget>
             </item>
             <item row="4" column="0" colspan="2">
-             <widget class="Line" name="line">
+             <widget class="Line" name="lineSpendableBalance">
               <property name="orientation">
                <enum>Qt::Horizontal</enum>
               </property>
@@ -481,7 +481,7 @@
               </font>
              </property>
              <property name="text">
-              <string>0 DASH</string>
+              <string notr="true">0 DASH</string>
              </property>
             </widget>
            </item>
@@ -974,7 +974,7 @@
            <string>Start/Stop Mixing</string>
           </property>
          </widget>
-         <widget class="Line" name="line">
+         <widget class="Line" name="lineLastMessage">
           <property name="geometry">
            <rect>
             <x>10</x>
diff --git a/src/qt/forms/receivecoinsdialog.ui b/src/qt/forms/receivecoinsdialog.ui
index 2b0f90a91019..e0234fb368f0 100644
--- a/src/qt/forms/receivecoinsdialog.ui
+++ b/src/qt/forms/receivecoinsdialog.ui
@@ -31,7 +31,7 @@
         <item row="7" column="2">
          <widget class="QCheckBox" name="reuseAddress">
           <property name="toolTip">
-           <string>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</string>
+           <string>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</string>
           </property>
           <property name="text">
            <string>R&amp;euse an existing receiving address (not recommended)</string>
@@ -71,7 +71,7 @@
         <item row="6" column="2">
          <widget class="QLineEdit" name="reqMessage">
           <property name="toolTip">
-           <string>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</string>
+           <string>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</string>
           </property>
          </widget>
         </item>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index ffc1dfe8471c..6f495230b65d 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -455,11 +455,14 @@ bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt)
     {
         QWidget *widget = static_cast<QWidget*>(obj);
         QString tooltip = widget->toolTip();
-        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt") && !Qt::mightBeRichText(tooltip))
+        if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt"))
         {
-            // Envelop with <qt></qt> to make sure Qt detects this as rich text
-            // Escape the current message as HTML and replace \n by <br>
-            tooltip = "<qt>" + HtmlEscape(tooltip, true) + "</qt>";
+            // Escape the current message as HTML and replace \n by <br> if it's not rich text
+            if(!Qt::mightBeRichText(tooltip))
+                tooltip = HtmlEscape(tooltip, true);
+            // Envelop with <qt></qt> to make sure Qt detects every tooltip as rich text
+            // and style='white-space:pre' to preserve line composition
+            tooltip = "<qt style='white-space:pre'>" + tooltip + "</qt>";
             widget->setToolTip(tooltip);
             return true;
         }
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index e82173fe157d..1ec9929d7112 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -140,25 +140,24 @@ OverviewPage::OverviewPage(QWidget *parent) :
     ui->labelDarksendSyncStatus->setText("(" + tr("out of sync") + ")");
     ui->labelTransactionsStatus->setText("(" + tr("out of sync") + ")");
 
-    lastNewBlock = 0;
-
     if(fLiteMode){
         ui->frameDarksend->setVisible(false);
-    } else if(!fMasterNode) {
-        timer = new QTimer(this);
-        connect(timer, SIGNAL(timeout()), this, SLOT(darkSendStatus()));
-        timer->start(333);
-    }
-
-    if(fMasterNode){
-        ui->toggleDarksend->setText("(" + tr("Disabled") + ")");
-        ui->darksendAuto->setText("(" + tr("Disabled") + ")");
-        ui->darksendReset->setText("(" + tr("Disabled") + ")");
-        ui->frameDarksend->setEnabled(false);
-    }else if(!fEnableDarksend){
-        ui->toggleDarksend->setText(tr("Start Darksend Mixing"));
     } else {
-        ui->toggleDarksend->setText(tr("Stop Darksend Mixing"));
+        if(fMasterNode){
+            ui->toggleDarksend->setText("(" + tr("Disabled") + ")");
+            ui->darksendAuto->setText("(" + tr("Disabled") + ")");
+            ui->darksendReset->setText("(" + tr("Disabled") + ")");
+            ui->frameDarksend->setEnabled(false);
+        } else {
+            if(!fEnableDarksend){
+                ui->toggleDarksend->setText(tr("Start Darksend Mixing"));
+            } else {
+                ui->toggleDarksend->setText(tr("Stop Darksend Mixing"));
+            }
+            timer = new QTimer(this);
+            connect(timer, SIGNAL(timeout()), this, SLOT(darkSendStatus()));
+            timer->start(333);
+        }
     }
 
     // start with displaying the "out of sync" warnings
@@ -207,6 +206,10 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
     ui->labelImmatureText->setVisible(showImmature || showWatchOnlyImmature);
     ui->labelWatchImmature->setVisible(showWatchOnlyImmature); // show watch-only immature balance
 
+    updateDarksendProgress();
+
+    static int cachedTxLocks = 0;
+
     if(cachedTxLocks != nCompleteTXLocks){
         cachedTxLocks = nCompleteTXLocks;
         ui->listTransactions->update();
@@ -306,37 +309,50 @@ void OverviewPage::updateDarksendProgress()
     if(IsInitialBlockDownload()) return;
 
     int64_t nBalance = pwalletMain->GetBalance();
+    QString strAmountAndRounds;
+    int nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
+    QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
+
     if(nBalance == 0)
     {
         ui->darksendProgress->setValue(0);
-        QString s(tr("No inputs detected"));
-        ui->darksendProgress->setToolTip(s);
+        ui->darksendProgress->setToolTip(tr("No inputs detected"));
 
         // when balance is zero just show info from settings
-        QString strSettings = BitcoinUnits::formatWithUnit(
-                    walletModel->getOptionsModel()->getDisplayUnit(),
-                    nAnonymizeDarkcoinAmount * COIN
-                ) + " / " + tr("%n Rounds", "", nDarksendRounds);
-
-        ui->labelAmountRounds->setText(strSettings);
-        return;
-    }
+        strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+        strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
 
-    //get denominated unconfirmed inputs
-    if(pwalletMain->GetDenominatedBalance(true, true) > 0)
-    {
-        QString s(tr("Found unconfirmed denominated outputs, will wait till they confirm to recalculate."));
-        ui->darksendProgress->setToolTip(s);
+        ui->labelAmountRounds->setToolTip(tr("No inputs detected"));
+        ui->labelAmountRounds->setText(strAmountAndRounds);
         return;
     }
 
-    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance(true);
+    int64_t nDenominatedUnconfirmedBalance = pwalletMain->GetDenominatedBalance(true, true);
+    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance(true) + nDenominatedUnconfirmedBalance;
 
     // If it's more than the anon threshold, limit to that.
     if(nMaxToAnonymize > nAnonymizeDarkcoinAmount*COIN) nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
 
     if(nMaxToAnonymize == 0) return;
 
+    if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
+        ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
+                                          .arg(strAnonymizeDarkcoinAmount));
+        strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+        strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
+    } else {
+        QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways);
+        ui->labelAmountRounds->setToolTip(tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br>"
+                                             "will anonymize <span style='color:red;'>%2</span> instead")
+                                          .arg(strAnonymizeDarkcoinAmount)
+                                          .arg(strMaxToAnonymize));
+        strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
+        strAmountAndRounds = "<span style='color:red;'>" +
+                QString(BitcoinUnits::factor(nDisplayUnit) == 1 ? "" : "~") + strMaxToAnonymize +
+                " / " + tr("%n Rounds", "", nDarksendRounds) + "</span>";
+    }
+    ui->labelAmountRounds->setText(strAmountAndRounds);
+
     // calculate parts of the progress, each of them shouldn't be higher than 1:
     // mixing progress of denominated balance
     int64_t denominatedBalance = pwalletMain->GetDenominatedBalance();
@@ -364,35 +380,13 @@ void OverviewPage::updateDarksendProgress()
 
     QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
-
-    QString strAmountAndRounds;
-    int nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
-    QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
-    if(nMaxToAnonymize >= nAnonymizeDarkcoinAmount * COIN) {
-        ui->labelAmountRounds->setToolTip(tr("Found enough compatible inputs to anonymize %1")
-                                          .arg(strAnonymizeDarkcoinAmount));
-        strAnonymizeDarkcoinAmount = strAnonymizeDarkcoinAmount.remove(strAnonymizeDarkcoinAmount.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
-        strAmountAndRounds = strAnonymizeDarkcoinAmount + " / " + tr("%n Rounds", "", nDarksendRounds);
-    } else {
-        QString strMaxToAnonymize = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nMaxToAnonymize, false, BitcoinUnits::separatorAlways);
-        ui->labelAmountRounds->setToolTip("<span style='white-space: nowrap;'>" +
-                                          tr("Not enough compatible inputs to anonymize <span style='color:red;'>%1</span>,<br/>"
-                                             "will anonymize <span style='color:red;'>%2</span> instead")
-                                          .arg(strAnonymizeDarkcoinAmount)
-                                          .arg(strMaxToAnonymize) +
-                                          "</span>");
-        strMaxToAnonymize = strMaxToAnonymize.remove(strMaxToAnonymize.indexOf("."), BitcoinUnits::decimals(nDisplayUnit) + 1);
-        strAmountAndRounds = "<span style='color:red;'>" +
-                QString(BitcoinUnits::factor(nDisplayUnit) == 1 ? "" : "~") + strMaxToAnonymize +
-                " / " + tr("%n Rounds", "", nDarksendRounds) + "</span>";
-    }
-
-    ui->labelAmountRounds->setText(strAmountAndRounds);
 }
 
 
 void OverviewPage::darkSendStatus()
 {
+    static int64_t lastNewBlock = 0;
+
     int nBestHeight = chainActive.Tip()->nHeight;
 
     if(nBestHeight != darkSendPool.cachedNumBlocks)
@@ -400,7 +394,6 @@ void OverviewPage::darkSendStatus()
         //we we're processing lots of blocks, we'll just leave
         if(GetTime() - lastNewBlock < 10) return;
         lastNewBlock = GetTime();
-
         updateDarksendProgress();
     }
 
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 4a6af3bdac6a..2f4a21784272 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -57,11 +57,6 @@ public slots:
     CAmount currentWatchUnconfBalance;
     CAmount currentWatchImmatureBalance;
 
-    qint64 cachedTxLocks;
-    qint64 lastNewBlock;
-
-    int cachedNumBlocks;
-
     TxViewDelegate *txdelegate;
     TransactionFilterProxy *filter;
 

From 4d758b9924c237669c5c96fddc77bc83011eda22 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Thu, 2 Jul 2015 00:12:11 +0200
Subject: [PATCH 1476/1819] Restart-wallet fix

---
 src/qt/dash.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 5a6860ef18fd..3b788e8dc307 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -294,7 +294,7 @@ void BitcoinCore::restart(QStringList args)
         CExplicitNetCleanup::callCleanup();
         QProcess::startDetached(QApplication::applicationFilePath(), args);
         qDebug() << __func__ << ": Restart initiated...";
-        QCoreApplication::quit();
+        QApplication::quit();
     } catch (std::exception& e) {
         handleRunawayException(&e);
     } catch (...) {

From a89b0e705fa8fac24c7cfcde52e517ca15246905 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 1 Jul 2015 16:46:03 -0700
Subject: [PATCH 1477/1819] Fixed syncing code for stuck clients

---
 src/darksend.cpp            | 37 ++++++++++++++++++++++---------------
 src/masternode-budget.h     |  3 +++
 src/masternode-payments.cpp |  5 ++---
 3 files changed, 27 insertions(+), 18 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6e775b67539f..937a5347dada 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2356,25 +2356,32 @@ void ThreadCheckDarkSendPool()
         if(c % 5 == 0 && RequestedMasternodeAssets <= 2){
             bool fIsInitialDownload = IsInitialBlockDownload();
             if(!fIsInitialDownload) {
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes)
-                {
-                    if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) {
+                CBlockIndex* pindexPrev = chainActive.Tip();
+                if(pindexPrev != NULL) {
+                    if(pindexPrev->nTime > GetAdjustedTime() - (60*24))
+                    {
 
-                        //keep track of who we've asked for the list
-                        if(pnode->HasFulfilledRequest("mnsync")) continue;
-                        pnode->FulfilledRequest("mnsync");
+                        LOCK(cs_vNodes);
+                        BOOST_FOREACH(CNode* pnode, vNodes)
+                        {
+                            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) {
+
+                                //keep track of who we've asked for the list
+                                if(pnode->HasFulfilledRequest("mnsync")) continue;
+                                pnode->FulfilledRequest("mnsync");
 
-                        LogPrintf("Successfully synced, asking for Masternode list and payment list\n");
+                                LogPrintf("Successfully synced, asking for Masternode list and payment list\n");
 
-                        //request full mn list only if Masternodes.dat was updated quite a long time ago
-                        mnodeman.DsegUpdate(pnode);
+                                //request full mn list only if Masternodes.dat was updated quite a long time ago
+                                mnodeman.DsegUpdate(pnode);
 
-                        pnode->PushMessage("mnget"); //sync payees
-                        pnode->PushMessage("mnvs"); //sync masternode votes
-                        pnode->PushMessage("getsporks"); //get current network sporks
-                        RequestedMasternodeAssets++;
-                        break;
+                                pnode->PushMessage("mnget"); //sync payees
+                                pnode->PushMessage("mnvs"); //sync masternode votes
+                                pnode->PushMessage("getsporks"); //get current network sporks
+                                RequestedMasternodeAssets++;
+                                break;
+                            }
+                        }
                     }
                 }
             }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index cc93f77197b6..782f32b1f676 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -85,6 +85,9 @@ class CBudgetManager
         mapFinalizedBudgets.clear();
     }
 
+    int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
+    int sizeProposals() {return (int)mapProposals.size();}
+
     void Sync(CNode* node);
 
     void Calculate();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 78448be28e17..eec1fb811205 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -23,15 +23,14 @@ bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return true;
 
-    //while syncing take the longest chain
-    if (fImporting || fReindex || pindexPrev->nHeight+1 < Checkpoints::GetTotalBlocksEstimate()) {
+    if(budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) { //there is no budget data to use to check anything
         //super blocks will always be on these blocks, max 100 per budgeting
         if((pindexPrev->nHeight+1) % GetBudgetPaymentCycleBlocks() < 100){
             return true;
         } else {
             if(nBlockValue > nExpectedValue) return false;
         }
-    } else { // we're synced so check the budget schedule
+    } else { // we're synced and have data so check the budget schedule
         if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
             //the value of the block is evaluated in CheckBlock
             return true;

From 2ed4c93b6d7b72da1a94cbea270f094bfc3776d0 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 2 Jul 2015 03:53:33 +0300
Subject: [PATCH 1478/1819] update languages with 80%+ completition

---
 src/qt/locale/dash_bg.ts | 4295 ++++++++++++++++++--------------------
 src/qt/locale/dash_de.ts | 4116 +++++++++++++++++-------------------
 src/qt/locale/dash_es.ts | 4147 +++++++++++++++++-------------------
 src/qt/locale/dash_fi.ts | 4183 +++++++++++++++++--------------------
 src/qt/locale/dash_it.ts | 4240 ++++++++++++++++++-------------------
 src/qt/locale/dash_pl.ts | 4119 +++++++++++++++++-------------------
 src/qt/locale/dash_pt.ts | 4098 +++++++++++++++++-------------------
 src/qt/locale/dash_ru.ts | 4274 ++++++++++++++++++-------------------
 src/qt/locale/dash_vi.ts | 4088 +++++++++++++++++-------------------
 9 files changed, 17639 insertions(+), 19921 deletions(-)

diff --git a/src/qt/locale/dash_bg.ts b/src/qt/locale/dash_bg.ts
index 62f411941f7c..dcf73630d598 100644
--- a/src/qt/locale/dash_bg.ts
+++ b/src/qt/locale/dash_bg.ts
@@ -1,201 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="bg">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>За Дарккойн ядрото</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Дарккойн ядро&lt;/b&gt; версия</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Това е експериментален софтуер.
-
-Разпространява се под MIT/X11 софтуерен лиценз, виж придружаващия файл КОПИРАНЕ или на адрес: http://www.opensource.org/licenses/mit-license.php.
-
-Използван е софтуер, разработен от OpenSSL Project за употреба в OpenSSL Toolkit (http://www.openssl.org/), шифрографски софтуер, разработен от Eric Young (eay@cryptsoft.com) и UPnP софтуер, разработен от Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Авторски права</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Водещи Биткойн разработчици</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Водещи Дарккойн разработчици</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-битов)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Двоен клик за редакция на адрес или име</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
-        <source>Double-click to edit address or label</source>
-        <translation>Двоен клик за да редактирате адрес или наименование</translation>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
+        <source>Right-click to edit address or label</source>
+        <translation>Десен бутон за да редактирате адрес или наименование</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Създаване на нов адрес</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Нов</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копиране на избрания адрес в системния клипборд</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Копирай</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Изтрийте избрания адрес от списъка</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Изтриване</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Експортиране</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>Затвори</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Изберете адрес, на който ще изпращате монети</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Изберете адрес, на който ще получавате монети</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>Избери</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Адреси за изпращане</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Адреси за получаване</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Това са вашите Дарккойн адреси за изпращане на плащания. Преди изпращане винаги проверявайте количеството и адреса за получаване на монетите.</translation>
+        <translation>Това са вашите Dash адреси за изпращане на плащания. Преди изпращане винаги проверявайте количеството и адреса за получаване на монетите.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Това са вашите Дарккойн адреси за получаване на плащания. Препоръчително е да използвате нов адрес за всяка нова транзакция. </translation>
+        <translation>Това са вашите Dash адреси за получаване на плащания. Препоръчително е да използвате нов адрес за всяка нова транзакция. </translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Копирай адрес</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Копирай &amp;наименование</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Редактирай</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Експортиране на списъка с адреси</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>CSV файл (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Грешка при експортирането</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Възникна грешка при опита за запазване на списъка с адресите към %1.</translation>
+        <translation>Възникна грешка при опита за запазване на списъка с адресите към %1.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Наименование</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(без наименование)</translation>
     </message>
@@ -203,154 +143,150 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Поле за парола</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Въведете текущата парола</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Нова парола</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Въведете новата парола повторно</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Служи да изключи изпращането на средства, когато акаунта на Операционната система е компрометиран. Не предоставя реална сигурност. </translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Само за анонимизиране</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Въведете нова парола за портфейла.&lt;br/&gt;Моля използвайте &lt;b&gt;поне 10 случайни символа&lt;/b&gt; или &lt;b&gt;8 или повече думи&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Въведете нова парола за портфейла.&lt;br/&gt;Моля използвайте &lt;b&gt;поне 10 случайни символа&lt;/b&gt; или &lt;b&gt;8, или повече думи&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Шифриране на портфейла</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Тази операция изисква Вашата парола за отключване на портфейла.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Отключване на портфейла</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Тази операция изисква Вашата парола за дешифриране на портфейла.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Дешифриране на портфейла</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Смяна на паролата</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Въведете текущата и новата парола за портфейла.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Потвърдете на шифрирането на портфейла</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
-        <translation>Внимание: Ако шифрирате вашия портфейл и загубите паролата си,  &lt;b&gt;ЩЕ ЗАГУБИТЕ ВСИЧКИ ДАРККОЙН МОНЕТИ!&lt;/b&gt;!</translation>
+        <translation>Внимание: Ако шифрирате вашия портфейл и загубите паролата си,  &lt;b&gt;ЩЕ ЗАГУБИТЕ ВСИЧКИ DASH МОНЕТИ!&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Наистина ли желаете да шифрирате портфейла си?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Портфейлът е шифриран</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
-        <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your darkcoins from being stolen by malware infecting your computer.</source>
-        <translation>Dash ще се затвори сега, за да завърши процеса по шифриране. Запомнете, че шифрирането на вашия портфейл не може напълно да ви предпази от кражба на монетите от зловреден софтуер инфектирал компютъра ви. </translation>
+        <location line="-57"/>
+        <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
+        <translation>Dash ще се затвори, за да завърши процеса по шифриране. Запомнете, че шифрирането на вашия портфейл не може напълно да ви предпази от кражба на монетите чрез зловреден софтуер инфектирал компютъра ви. </translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>ВАЖНО: Всички стари запазвания, които сте направили на Вашият портфейл трябва да замените с запазване на новополучения, шифриран портфейл. От съображения за сигурност, предишните запазвания на нешифрирани портфейли ще станат неизползваеми веднага, щом започнете да използвате новият, шифриран портфейл.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Шифрирането беше неуспешно</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Шифрирането на портфейла беше неуспешно, поради софтуерен проблем. Портфейлът не е шифриран.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Паролите не съвпадат</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Неуспешно отключване на портфейла</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Паролата въведена за дешифриране на портфейла е грешна.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Дешифрирането на портфейла беше неуспешно</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Паролата на портфейла беше променена успешно.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Внимание: Caps Lock (главни букви) е включен.</translation>
     </message>
@@ -358,437 +294,425 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
-        <translation>Дарккойн Ядро</translation>
+        <translation>Dash Ядро</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Портфейл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Възел</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Баланс</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Обобщена информация за портфейла</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Изпращане</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
-        <translation>Изпращане на монети към Дарккойн адрес</translation>
+        <translation>Изпращане на монети към Dash адрес</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Получаване</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
-        <translation>Заявка за плащане (генерира QR кодове и Дарккойн: URI)</translation>
+        <translation>Заявка за плащане (генерира QR кодове и Dash: URI)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Транзакции</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>История на транзакциите</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>Из&amp;ход</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Изход от приложението</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
-        <translation>&amp;За Дарккойн ядрото</translation>
-    </message>
-    <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Информация за Дарккойн</translation>
+        <translation>&amp;За Dash ядрото</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Покаци информация за Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>За &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Покажи информация за Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Опции...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
-        <translation>Промяна на опции за конфигуриране на Дарккойн</translation>
+        <translation>Промяна на опции за конфигуриране на Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Показване / Скриване</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Показване и скриване на основния прозорец</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Шифриране на портфейла...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Криптирай частните ключове принадлежащи към твоя портфейл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Запазване на портфейла...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Запазване на портфейла на друго място</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Смяна на паролата...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Променя паролата за портфейла</translation>
+        <translation>Променя паролата за криптиране на портфейла</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Отключи Портфейл...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Отключване на портфейла</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Заключи Портфейл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Подписване на &amp;съобщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
-        <translation>Подпиши съобщения с твоите Дарккойн адреси за да докажеш че ги притежаваш</translation>
+        <translation>Подпиши съобщения с твоите Dash адреси за да докажеш че ги притежаваш</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Проверка на съобщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
-        <translation>Проверете съобщенията, за да сте сигурни че са подписани с определен Дарккойн адрес</translation>
+        <translation>Проверете съобщенията, за да сте сигурни че са подписани с определен Dash адрес</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>Данни</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Покажи диагностична информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
-        <translation>&amp;Конзола</translation>
+        <translation>&amp;Конзола за отстраняване на грешки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Отваряне конзола за отстраняване на грешки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
-        <translation>&amp;Диаграма на мрежата</translation>
+        <translation>&amp;Наблюдение на мрежата</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Покажи наблюдение на мрежата</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>&amp;Списък с пиъри</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Покажи информация за пиърите</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Портфейл &amp;Поправяне</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Покажи опции за възстановяване на портфейла</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Отвори &amp;Конфигурационен файл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Отвори конфигурационния файл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Покажи автоматичните &amp;Резервни копия</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Покажи автоматично направените резервни копия на портфейла</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Адреси за изпращане...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Покажи списъкът от използваните адреси за изпращане и наименования</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>&amp;Адреси за получаване</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Покажи списъкът от използвани адреси за получаване и наименования</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Отвори &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Отвори Dash: URI или заявка за плащане</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Опции на командния ред</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash Core клиент</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Обработени %n блока от историята на транзакциите.</numerusform><numerusform>Обработени %n блока от историята на транзакциите.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
         <translation>Покажи съобщението за помощ на Dash ядрото за да получиш списък на възможните опции за командния ред</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Настройки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Инструменти</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Помощ</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
-        <translation>Раздели</translation>
-    </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Дарккойн клиент</translation>
+        <translation>Лента с инструменти</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n активни връзки с Дарккойн мрежата</numerusform>
-            <numerusform>%n активни връзки с Дарккойн мрежата</numerusform>
-        </translation>
+        <translation><numerusform>%n активни връзки към Dash мрежата</numerusform><numerusform>%n активни връзки към Dash мрежата</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Синхронизиране с мрежата...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Въвеждат се блокове от диска...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Преиндексиране на блокове на диска...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Няма източник на блокове...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Обработени %1 блока от историята с транзакции.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Синхронизиран</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n час(а)</numerusform>
-            <numerusform>%n час(а)</numerusform>
-        </translation>
+        <translation><numerusform>%n часа</numerusform><numerusform>%n часа</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n ден(а)</numerusform>
-            <numerusform>%n ден(а)</numerusform>
-        </translation>
+        <translation><numerusform>%n дни</numerusform><numerusform>%n дни</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n седмица(и)</numerusform>
-            <numerusform>%n седмица(и)</numerusform>
-        </translation>
+        <translation><numerusform>%n седмици</numerusform><numerusform>%n седмици</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 и %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n година(и)</numerusform>
-            <numerusform>%n година(и)</numerusform>
-        </translation>
+        <translation><numerusform>%n години</numerusform><numerusform>%n години</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 назад</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Зарежда блокове...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Последният получен блок беше генериран преди %1.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Транзакции след това, все още няма да се виждат.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Дарккойн</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Грешка</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Предупреждение</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Изходяща транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Входяща транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -801,30 +725,25 @@ Address: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;отключен&lt;/b&gt;</translation>
+        <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и в момента &lt;b&gt;отключен&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Портфейлът е &lt;b&gt;шифриран&lt;/b&gt; и в момента &lt;b&gt;отключен&lt;/b&gt; само за анонимизиране</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;заключен&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Възникна фатална грешка. Дарккойн не може да продължи безопасно и ще се изключи.</translation>
+        <translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и в момента &lt;b&gt;заключен&lt;/b&gt;</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Предупреждение от мрежата</translation>
     </message>
@@ -832,325 +751,302 @@ Address: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Избор на адреси с функцията контрол на монетата</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Количество:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Байтове:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Сума:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Приоритет:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Избор на монети</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Незначителен остатък:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>След таксата:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Ресто:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(де)маркирай всичко</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Режим дърво</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Режим списък</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 заключен)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Получени с наименование</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Име</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Адрес</translation>
+        <translation>Получени с адрес</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
-        <translation>Дарксенд цикли</translation>
+        <translation>Darksend цикли</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Потвърждения</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Потвърдени</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Приоритет</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Копирай адрес</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
-        <translation>Копирай име</translation>
+        <translation>Копирай наименование</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Копирай транзакция с ID</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Заключи неизхарченото</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Отключи неизхарченото</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Копирай количество</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Копирай таксата</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Копирай след таксата</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Копирай байтовете</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Копирай приоритета</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Копирай остатъка</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Копирай рестото</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Избрани са не-анонимизирани наличности. &lt;b&gt;Darksend ще бъде изключен.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Ако искате да използвате Darksend, моля отменете избора на всички не-анонимизирани наличности и след това изберете чекбокса на Darksend отново.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>най-висок</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>по-висок</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>висок</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>средно-висок</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Може да варира +/- 1 satoshi(s) за вход.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>няма такъв</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>среден</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>средно-нисък</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>нисък</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>по-нисък</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>най-нисък</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 заключен)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>липсва</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Прах</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>да</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>не</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
-        <translation>Това наименование се оцветява в червено, ако размерът на транзакцията е по-голям от 1000 байта.</translation>
+        <translation>Това наименование става червено, ако размерът на транзакцията е по-голям от 1000 байта.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Това означава, че е нужна такса поне %1 за кБ.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Може да варира +/- 1 байта за вход.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Транзакции с по-висок приоритет е по-вероятно да бъдат включени в блок.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Това наименование става червено, ако приоритетът е по-малък от &quot;среден&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Това наименование става червено, ако произволен получател получи сума по-малка от %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Това означава, че се изисква такса най-малко %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Суми по-малки от 0.546 умножено по минималната такса за препредаване се показват като отпадък.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation>Това наименование става червено, ако рестото е по-малко от %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(без наименование)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>ресто от %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(ресто)</translation>
     </message>
@@ -1158,152 +1054,152 @@ Address: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
-        <translation>Настройка на Дарксенд</translation>
+        <translation>Настройка на Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Нормална сигурност</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Висока сигурност</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Максимална сигурност</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
-        <translation>Моля изберете ниво на сигурност</translation>
+        <translation>Моля изберете ниво на сигурност.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
-        <translation>Използване на 2 различни мастернода за смесване на средства до 1000 DASH</translation>
+        <translation>Използване на 2 различни masternodes за смесване на средства до 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
-        <translation>Използване на 8 различни мастернода за смесване на средства до 1000 DASH</translation>
+        <translation>Използване на 8 различни masternodes за смесване на средства до 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
-        <translation>Използване на 16 различни мастернода за смесване на средства до 1000 DASH</translation>
+        <translation>Използване на 16 различни masternodes за смесване на средства до 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Това е най-бързият вариант, анонимизиране на 1000 DASH ще ви струва около 0.025 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Това е средно бърз вариант, анонимизиране на 1000 DASH ще ви струва около 0.05 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH за всеки 1000 DASH които анонимизирате.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Това е най-бавния и най-сигурен начин. Използването на максимална анонимност ще ви коства</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
-        <translation>Настройка на Дарксенд</translation>
+        <translation>Настройка на Darksend </translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
-        <translation>Дарксенд беше успешно настроен на режим основен (%1 и 2 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Дарккойн.</translation>
+        <translation>Darksend беше успешно настроен на режим основен (%1 и 2 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
-        <translation>Дарксенд беше успешно настроен на режим висок (%1 и 8 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Дарккойн.</translation>
+        <translation>Darksend  беше успешно настроен на режим висок (%1 и 8 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
-        <translation>Дарксенд беше успешно настроен на режим максимум (%1 и 16 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Дарккойн.</translation>
+        <translation>Darksend беше успешно настроен на режим максимум (%1 и 16 цикъла). Можете да промените тази настройка по всяко време, като отворите конфигурационния прозорец на Dash.</translation>
     </message>
 </context>
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Редактиране на адрес</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Наименование</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Наименованието се свързва с този запис от списъка с адреси</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Адрес</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Адресът свързан с този запис от списък с адреси. Може да бъде променен само за адреси за изпращане.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Нов адрес за получаване</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Нов адрес за изпращане</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Редактиране на адрес за получаване</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Редактиране на адрес за изпращане</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
-        <translation>Въведеният адрес &quot;%1&quot; не е валиден Дарккойн адрес.</translation>
+        <translation>Въведеният адрес &quot;%1&quot; не е валиден Dash адрес.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Вече има адрес &quot;%1&quot; в списъка с адреси.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Отключването на портфейла беше неуспешно.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Създаването на ключ беше неуспешно.</translation>
     </message>
@@ -1311,27 +1207,27 @@ Address: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Ще се създаде нова папка за данни.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>име</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Има такава папка. Добавете %1 ако искате да създадете нова папка тук.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Пътят вече съществува и не е папка.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Не може да създадете папка за данни тук.</translation>
     </message>
@@ -1339,72 +1235,68 @@ Address: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Дарккойн ядро - опции на командния ред</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
-        <translation>Дарккойн ядро</translation>
+        <translation>Dash ядро</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>версия</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-битов)</translation>
+        <translation>(%1-битов)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">За Дарккойн ядрото</translation>
+        <translation>За Dash ядрото</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Опции за командния ред</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Използване:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>опции на командния ред</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>UI Опции</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Избери папка с данни при стартиране (по подразбиране: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Задаване на език, например &quot;de_DE&quot; (по подразбиране: какъвто е от системата)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Стартирай минимизиран</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Задай SSL основен сертификат при искане за плащане (по подразбиране: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Покажи начален екран при стартиране(по подразбиране: 1)</translation>
     </message>
@@ -1412,107 +1304,85 @@ Address: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Добре дошли</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
-        <translation>Добре дошли в ядрото на Дарккойн.</translation>
+        <translation>Добре дошли в ядрото на Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
-        <translation>Тъй като програмата се стартира за първи път вие може да изберете къде Дарккойн да съхранява своята информация.</translation>
+        <translation>Тъй като програмата се стартира за първи път вие може да изберете къде Dash да съхранява своята информация.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Дарккойн ще свали и съхрани копие на Дарккойн регистъра на блокове. Информацията ще заеме поне 1ГБ  пространство и ще нараства с времето. В тази папка ще бъде съхранен и портфейла. </translation>
+        <translation>Dash ще свали и съхрани копие на Dash регистъра на блокове. Информацията ще заеме поне 1ГБ  пространство и ще нараства с времето. В тази папка ще бъде съхранен и портфейла. </translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Използвайте директория за данните по подразбиране</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Определете папка по ваш избор:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Дарккойн</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Грешка: Посочената директория с данни &quot;%1&quot; не може да бъде създадена.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash ядро</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Грешка: Посочената директория с данни &quot;%1&quot; не може да бъде създадена.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Грешка</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">ГБ свободно пространство</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB от свободното пространство</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(от %1GB са необходими)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(от %1 GB са необходими)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Отвори URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Отвори заявка за плащане от URI или файл</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Избор на файл за заявка за плащане</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Изберете за отваряне файл с заявка за плащане</translation>
     </message>
@@ -1520,313 +1390,281 @@ Address: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Опции</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Основни</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
-        <translation>Автоматично стартиране на Дарккойн след влизане в системата.</translation>
+        <translation>Автоматично стартиране на Dash след влизане в системата.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
-        <translation>&amp;Стартирне на Дарккойн при влизане в системата.</translation>
+        <translation>&amp;Стартирне на Dash при влизане в системата.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Размер на &amp;кеша на базата данни</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>МБ</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Брой нишки на &amp;скриптовете за проверка</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = автоматично, &lt;0 = оставете толкова неизползвани ядра)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Тази настройка определя броя на отделните Мастернодове чрез които ще се извършва анонимизирането. Повече цикли на анонимизиране дава по-висока степен на сигурност, но и таксите са по-големи.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Тази настройка определя броя на отделните masternodes чрез които ще се извършва анонимизирането. Повече цикли на анонимизиране дава по-висока степен на сигурност, но и таксите са по-големи.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
-        <translation>Използвани Дарккойн цикли</translation>
+        <translation>Използвани Dash цикли</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
-        <translation>Тази сума действа като праг, за да се изключи Дарксенд, когато той е достигнат.</translation>
+        <translation>Тази сума действа като праг, за да се изключи Darksend, когато той е достигнат.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
-        <translation>Постоянно поддържано количество анонимни Дарккойн монети </translation>
+        <translation>Постоянно поддържано количество анонимни Dash монети </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>П&amp;ортфейл</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>риемай връзки отвън</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Разрешени входящи връзки</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Свързване с мрежата на Dash чрез SOCKS5 прокси.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Опция за таксуване на транзакциите за кБ, която помага обработката на вашата транзакция да стане по-бързо. Повечето сделки са 1 кB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">&amp;Такса за изходяща транзакция</translation>
+        <translation>&amp;Свързване през SOCKS5 прокси (прокси по подразбиране):</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
-        <translation>Опитен</translation>
+        <translation>Експерт</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Да покаже или скрие възможностите за контрол на монетата.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Активиране &amp;контролните функции на монетата</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Изхарчете непотвърденото ресто</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Мрежа</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
-        <translation>Автоматично отваря порта за Дарккойн клиента в маршрутизатора. Това работи само когато вашият маршрутизатор поддържа UPnP и той е разрешен.</translation>
+        <translation>Автоматично отваря порта за Dash клиента в маршрутизатора. Това работи само когато вашият маршрутизатор поддържа UPnP и той е разрешен.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Отваряне на входящия порт чрез &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Свързване с мрежата на Дарккойн чрез SOCKS прокси.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Свързване през SOCKS прокси (прокси по подразбиране):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
-        <translation>Прокси &amp; АйПи:</translation>
+        <translation>Прокси &amp; IP:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP адрес на прокси (напр. за IPv4: 127.0.0.1 / за IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Порт:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Порт на прокси сървъра (пр. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">SOCKS &amp;Версия:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">SOCKS версия на прокси сървъра (пр. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Прозорец</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>След минимизиране ще е видима само иконата в системния трей.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Минимизиране в системния трей</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>При затваряне на прозореца приложението остава минимизирано. Ако изберете тази опция, приложението може да се затвори само чрез Изход в менюто.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>М&amp;инимизиране при затваряне</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Интерфейс</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
-        <translation>Език:</translation>
+        <translation>Език на потребителски &amp;изглед :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
-        <translation>Тук можете да промените езика на потребителския интерфейс. Настройката ще влезе в сила след рестартиране на  Дарккойн.</translation>
+        <translation>Тук можете да промените езика на потребителския изглед. Настройката ще влезе в сила след рестартиране на Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Липсва език или превода е непълен? Можете да помогнете с превода тук:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Изглед на потребителския интерфейс:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>Мерна единица за показваните суми:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Изберете единиците, показвани по подразбиране в интерфейса.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Да се показват ли адресите в списъка с транзакции или не.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Адреси в списъка с транзакции</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 адреси на трети страни (например block Explorer), които се появяват в раздела с транзакции, като елементи от контекстното меню. %s в URL е заменен с хеша на транзакцията. Отделните URL адреси са разделени с вертикална линия |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URL транзакции на трети страни</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Активна опция от командния ред, която замества горните опции:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Изчисти всички опции до фабричните.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Изчисти настройките</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
-        <translation>ОК</translation>
+        <translation>&amp;ОК</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
-        <translation>Отказ</translation>
+        <translation>&amp;Отказ</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
-        <translation>подразбиране</translation>
+        <translation>по подразбиране</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
-        <translation>липсва</translation>
+        <translation>няма</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Потвърди изчистване на настройките</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>За да влязат в сила промените е необходим рестарт на клиента.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
-        <translation>Клиентът ще бъде спрян, искате ли да продължите?</translation>
+        <translation>Клиентът ще бъде изключен, искате ли да продължите?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Тази промяна ще изисква рестартиране на клиента.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Текущият прокси адрес е невалиден.</translation>
     </message>
@@ -1834,650 +1672,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Формуляр</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Портфейл</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
-        <translation>Показаната информация може да е остаряла. Вашият портфейл се синхронизира автоматично след изграждането на връзка с Дарккойн мрежата, но този процес все още не е завършен.</translation>
+        <translation>Показаната информация може да е остаряла. Вашият портфейл се синхронизира автоматично след изграждането на връзка с Dash мрежата, но този процес все още не е завършен.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Налично:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Текущият ви баланс за харчене</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Изчакващо:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Общо транзакции, които предстоят да бъдат потвърдени, и все още не се включват към баланса за харчене</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Неотлежал:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Изкопан баланс, който все още не е отлежал</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Баланс</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Непотвърдени транзакции към наблюдаваните адреси</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Изкопан баланс в наблюдаваните адреси, който все още не е отлежал</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Общо:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Текущият ви общ баланс</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>настоящ общ баланс на наблюдаваните адреси</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Наблюдавани:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Вашият настоящ общ баланс на наблюдаваните адреси</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Изразходени:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Статус:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Включено/Изключено</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Завършено:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
-        <translation>Дарксенд баланс:</translation>
+        <translation>Darksend баланс:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Количество и цикли:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Цикъла</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Изпратени за Denom:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Деноминираните суми, които сте изпратили към Мастернода. За смесване, другите потребители трябва да изпратят абсолютно същите деноминирани суми.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
-        <translation>Няма</translation>
+        <translation>Няма такова</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
-        <translation>Дарксенд</translation>
+        <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Последни транзакции</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Пусни/Спри Смесване</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Деноминираните суми, които сте изпратили към Masternode. За смесване, другите потребители трябва да изпратят абсолютно същите деноминирани суми.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Последно съобщение)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
-        <translation>Опитай ръчно изпращане на Дарксенд заявка.</translation>
+        <translation>Опитай ръчно изпращане на Darksend заявка.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Опитай смесване</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
-        <translation>Изчистване на текущия статус на Дарксенд (може да прекъсне Дарксенд по време на миксиране, което може да ви коства пари!)</translation>
+        <translation>Изчистване на текущия статус на Darksend (може да прекъсне Darksend по време на миксиране, което може да ви коства пари!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Изчистване</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Последни транзакции&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>несинхронизиран</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Неактивно</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
-        <translation>Пусни Дарксенд смесването</translation>
+        <translation>Пусни Darksend смесването</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
-        <translation>Спри Дарксенд смесването</translation>
+        <translation>Спри Darksend смесването</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Не са открити монети</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Цикли</numerusform><numerusform>%n Цикли</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Открити са непотвърдени деноминирани средства, трябва да се изчака потвърждение за  преизчисление .</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Цикли</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Активирано</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>В процес: %1% (входовете имат средно от %2 от %n цикли)</numerusform><numerusform>В процес: %1% (входовете имат средно от %2 от %n цикли)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Намерени са достатъчно съвместими постъпления за анонимизиране %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Няма достатъчно съвместими постъпления за анонимизиране &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;ще бъдат анонимизирани &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; вместо</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Активирано</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
-        <translation>Последно Дарксенд съобщение:
+        <translation>Последно Darksend съобщение:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Дарксенд бездейства.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>В процес на смесване...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Дарккойн заявката е завършена: Вашата транзакция е била приета в басейна!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Изпратени са следните записи към Мастернод:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Изпратено към Мастернода, чака за още записи</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Открити са достатъчно потребители, подписване</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Открити са достатъчно потребители, подписване ( изчаква. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Открити са достатъчно потребители, подписване ( изчаква.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Открити са достатъчно потребители, подписване ( изчаква... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Предава окончателната транзакция.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Приключване на транзакцията.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Дарксенд заявката незавършена:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Ще опита отново...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Дарксенд заявката е завършена:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Изпратено към Мастернода, чака в опашката .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Изпратено към Мастернода, чака в опашката ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Изпратено към Мастернода, чака в опашката ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Неизвестно състояние:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
-        <translation>Дарксенд беше успешно нулиран.</translation>
+        <translation>Darksend беше успешно нулиран.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
-        <translation>Дарксенд се нуждае от поне %1 за да започне.</translation>
+        <translation>Darksend се нуждае от поне %1 за да започне.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
-        <translation>Портфейлът е заключен и потребителя отказва отключване. Дарксенд е деактивиран.</translation>
+        <translation>Портфейлът е заключен и потребителя отказва отключване. Darksend е деактивиран.</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Грешка в заявката за плащане</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Предупреждение от мрежовия мениджър</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Текущото ви прокси не поддържа SOCKS5, което е необходимо за извършване на заявка за плащане през прокси.</translation>
+        <translation>Не може да стартира dash: кликни за плащане на притежателя</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Обработка на URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Неправилен URL на заявка за плащане: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">Грешка при анализ на URI! Това може да е следствие от неправилен Дарккойн адрес или неправилно зададени URI параметри.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Обработка на файл със заявка за плащане</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Файлът със заявката за плащане не може да се прочете или обработи! Причината за това може да бъде невалиден файл със заявка за плащане.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Невалиден адрес за плащане %1</translation>
+        <translation>Невалиден адрес за плащане %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>Грешка при анализ на URI! Това може да е следствие от неправилен Dash адрес или неправилно зададени URI параметри.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Файлът със заявката за плащане не може да се прочете! Причината за това може да бъде невалиден файл със заявка за плащане.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявката за плашане отказана</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявка за плащане на мрежата не съвпада с клиентската мрежа.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявката за плащане е изткла.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявката за плащане не е инициализирана.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Непотвърдените заявки за плащане към клиентски скриптове за плащане не се поддържат.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Заявената сума за плащане: %1 е твърде малка (се приема за незначителен остатък)</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Възстановяване от %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявка за плащане %1 е твърде голяма (%2 байта, позволени %3 bytes).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Заявката за плащане е DoS защитена</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
-        <translation>Грашка при комуникация с %1: %2</translation>
+        <translation>Грeшка при комуникация с %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Заявката за плащане не може да бъде анализирана или обработена!</translation>
+        <translation>Заявката за плащане не може да бъде анализирана!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Невалиден отговор от сървъра %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Грешка в мрежовата заявка</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
-        <translation>Плащането е приета</translation>
+        <translation>Плащането е приетo</translation>
     </message>
 </context>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Адрес/Име на хост</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Потребителски агент</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Време пинг</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Дарккойн</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Грешка: Оказаната папка с данни &quot;%1&quot; не съществува.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Грешка: Не може да се анализира конфигурационния файл: %1. Използвайте само синтаксис ключ=стойност.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Грешка при четене на конфигурационния файл за Мастернод: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Грешка: Невалидна комбинация от -regtest и -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Ядрото на Дарккойн все още не е приключило ...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Въведете Дарккойн адрес (напр. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Сума</translation>
+        <translation>Сума</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Въведете Dash адрес (напр.%1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 дни</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 ч</translation>
+        <translation>%1 часа</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 мин</translation>
+        <translation>%1 минути</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 сек.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>МРЕЖА</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>НЕПОЗНАТ</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>няма</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N/A</translation>
+        <translation>Не е налично</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 милисекунди</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Запиши изображението...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Копирай изображението</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Запази QR Кода</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>PNG Image (*.png)</translation>
     </message>
@@ -2485,436 +2168,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Прозорец с инструменти</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>Данни</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
-        <translation>Брой Мастернодове</translation>
+        <translation>Брой Masternode</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Главен</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Име</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Име на клиента</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Брой връзки</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
-        <translation>Отваря файла за откриване на грешки на Дарккойн от текущата папка.  За по-големите файлове това може да отнеме няколко секунди.</translation>
+        <translation>Отваря файла за откриване на грешки на Dash от текущата папка.  За по-големите файлове това може да отнеме няколко секунди.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Отвори</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
-        <translation>Време за зареждане</translation>
+        <translation>Време за стартиране</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Мрежа</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Време на последния блок</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Лог-файл за откриване на грешки</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Използване на OpenSSL версия</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Дата на създаване</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Текущ брой блокове</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Версия на клиента</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Използва BerkeleyDB версия</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Регистър на блокове</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Конзола</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Изчисти конзолата</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Мрежов трафик</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Изчисти</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Общо:</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Получени</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Изпратени</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Пиъри</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Избери пиър за подробна информация.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Направление</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Версия</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Потребителски агент</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Услуги</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Стартираща височина</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Синхронизирана височина</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Точки за бан</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Време на връзката</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Последно изпратени</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Последно получени</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Изпратени байтове</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Получени байтове</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Време пинг</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Поправяне на портфейла</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Възстановен портфейл</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Повторно сканиране на блокчейн файловете</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Възстановени транзакции 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Възстановени транзакции 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Обновен формат на портфейла</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Бутоните отдолу ще рестартират портфейла с опция от командния ред за поправка на портфейла,ще фиксира проблеми с неправилни блок-верига файлове или липсващи/остарели транзакции.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Опит да се възстановят частни ключове от повреден wallet.dat</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Повторно сканиране на регистъра от блокове за липсващи транзакции в портфейла.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Възстановява транзакции от блок веригата (запазва meta-data,напр. собственик на акаунта).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Възстановява транзакции от блок веригата(отпада meta-data).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Надгражда до последната версия на портфейла при стартиране. (Белажка: това НЕ Е самообновяване на портфейла)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Опции за възстановяване на портфейла.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Възстановяване на индекса</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Възстановява блок индекс веригата от настоящия blk000??.dat файл.</translation>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Вход:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Изход:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
-        <translation>Добре дошли в Дарккойн RPC (Remote Procedure Call) конзолата.</translation>
+        <translation>Добре дошли в Dash RPC (Remote Procedure Call) конзолата.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Използвайте стрелки надолу и нагореза разглеждане на историятаот команди и &lt;b&gt;Ctrl-L&lt;/b&gt; за изчистване на конзолата.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Напишете &lt;b&gt;help&lt;/b&gt;, за да прегледате възможните команди.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 Б</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 КБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 МБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 ГБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>чрез %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>никога</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Входящи</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Изходящи</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Неизвестни</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 мин</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 ч</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 ч %2 мин</translation>
+        <translation>Привличане...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Повторна употреба на един от адресите за получаване. При повторно използване на адреси са възможни проблеми със сигурността и личната неприкосновеност. Не използвайте адреса, освен ако не ре-генерирате предишна заявка за плащане.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>П&amp;овторно използване на съществуващ адрес за получаване (не се препоръчва)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Възможност  да се прикрепи съобщение към заявката за плащане, което да бъде показано при отваряне на заявката. Забележка: съобщението няма да бъде изпратено с плащането по мрежата на Дарккойн.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Възможност  да се прикрепи съобщение към заявката за плащане, което да бъде показано при отваряне на заявката. Забележка: съобщението няма да бъде изпратено с плащането по мрежата на Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Съобщение:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
-        <translation>Възможност да се прикрепи етикет към новия адрес за получаване.</translation>
+        <translation>Възможност да се прикрепи наименование към новия адрес за получаване.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Използвате този формуляр за заявяване на плащания. Всички полета са &lt;b&gt;незадължителни&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
-        <translation>&amp;Име:</translation>
+        <translation>&amp;Наименование:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Незадължително заявяване на сума. Оставете полето празно или нулево, за да не заявите конкретна сума.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Сума</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Заявка за плащане</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Изчисти всички полета от формуляра.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Изчистване</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>История на заявките за плащане</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Покажи избраната заявка (прави същото като двойно щракане върху запис)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Показване</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Премахни избраните позиции от списъка</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Премахване</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Копирай наименование</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Копиране на съобщението</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
@@ -2922,67 +2664,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR Код</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Копирай &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>&amp;Копирай адрес</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Запиши изображението...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Заявка за плащане на %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Данни за плащането</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Наименование</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Съобщение</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
-        <translation>Получения URI е твърде дълъг, опитайте да съкратите текста на етикета / съобщението.</translation>
+        <translation>Получения URI е твърде дълъг, опитайте да съкратите текста на наименованието / съобщението.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Грешка при създаването на QR Code от URI.</translation>
     </message>
@@ -2990,37 +2732,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Наименование</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Съобщение</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
-        <translation>(без наименование)</translation>
+        <translation>(няма наименование)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(няма съобщение)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(липсва сума)</translation>
     </message>
@@ -3028,404 +2770,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
-        <translation>Изпращане</translation>
+        <translation>Изпращане на монети</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Функции за контрол на монетата</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Входове...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>автоматично избрано</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Недостатъчно средства!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Количество:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Байтове:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Сума:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Приоритет:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>среден</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Такса:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Незначителен остатък:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>не</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>След таксата:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Ресто:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <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>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Адрес за ресто по избор</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Такса транзакция:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Избери...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Показване настройки за такса</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Минимизиране</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs, тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>за килобайт</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs, тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>сбор на края</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Разплащането само минималната такса ще продължи толкова дълго,докато транзакцията заема по-малък обем в блоковото пространство. Но имайте предвид, че транзакцията може да се окаже без първоначално потвърждение ако се появи голямо търсене на dash транзакции отколкото мрежата може да обработи.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(прочети пояснението)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Препоръчано:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Персонализиран:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Смарт таксата не е разпозната все още.Това ще отнеме няколко блока... )</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Време за потвърждение:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>нормално</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>бързо</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Изпрати с нулева такса за транзакция ако е възможно</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(потвърждението може да отнеме повече време)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Потвърдете изпращането</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>И&amp;зпрати</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Изчисти всички полета от формуляра.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
-        <translation>&amp;Изчисти</translation>
+        <translation>Изчисти &amp;всичко</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Изпращане към повече от един получател</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Добави &amp;получател</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
-        <translation>Дарксенд</translation>
+        <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Баланс:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Копирай количеството</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Копирай сумата</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Копирай таксата</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Копирай след таксата</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Копирай байтовете</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Копирай приоритета</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
-        <source>Copy low output</source>
-        <translation>Копирай недостатъчна наличност</translation>
+        <location line="+1"/>
+        <source>Copy dust</source>
+        <translation>Копирай остатъка</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Копирай рестото</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
-        <translation>, използвайки</translation>
+        <translation>използвайки</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>анонимни средства</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
-        <translation>(Дарксенд изисква тази сума да бъде закръглена до най-близката %1).</translation>
+        <translation>(darksend изисква тази сума да бъде закръглена до най-близката %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>всякакви налични средства (не се препоръчва)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>и InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 до %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Наистина ли искате да изпратите?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>се добавя като такса за транзакция</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Пълна сума %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>или</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Потвърди изпращането на монетите</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Заявката за плащане е изткла.</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Такса %1 е по-голяма от %2 за kB се счита за твърде висока такса.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Невалиден адрес за плащане %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Очаква се да започне потвърждение в %n блока.</numerusform><numerusform>Очаква се да започне потвърждение в %n блока.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Невалиден адрес на получателя.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Сумата трябва да е по-голяма от 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Сумата надвишава текущия баланс</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Общият сбор надхвърля вашия баланс, когато се добави  %1 такса за операцията.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Намерен е дублиран адрес, може да се изпраща само по веднъж до всеки адрес в рамките на една операция изпращане.</translation>
+        <translation>Намерен е дублиран адрес, може да се изпраща само по веднъж до всеки адрес в рамките на едно изпращане.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Грешка при създаването на транзакция!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Транзакцията беше отхвърлена! Това може да се случи, ако някои от монетите в портфейла ви, вече са изразходвани, например ако се използва копие от wallet.dat и монетите са изразходвани в копието, но не са отбелязани като изразходвани тук.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Грешка: Портфейлът е отключен само за анонимизиране на монети.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Плати само минималната такса от %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
-        <translation>Внимание: Невалиден Дарккойн адрес</translation>
+        <translation>Внимание: Невалиден Dash адрес</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Внимание: Непознат адрес за ресто</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(без наименование)</translation>
     </message>
@@ -3433,102 +3167,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Това е нормално плащане.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Плати &amp;На:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Адрес, на който ще изпратите плащането (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash адресът да изпрати плащането към </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Изберете използван преди адрес</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Вмъкни от клипборда</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Премахване на този запис</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Наименование:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Въведете наименование за този адрес, за да го добавите в списъка с адреси</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>С&amp;ума:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Съобщение:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
-        <source>A message that was attached to the darkcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
-        <translation>Съобщението което беше прикрепено към darkcoin: URI ще бъде запазено с транзакцията за ваше сведение. Забележка: Това съобщение няма да бъде изпратено през Dash мрежата.</translation>
+        <location line="+10"/>
+        <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
+        <translation>Съобщението което беше прикрепено към dash: URI ще бъде запазено с транзакцията за ваше сведение. Забележка: Това съобщение няма да бъде изпратено през Dash мрежата.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Това е непроверена заявка за плащане.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Плащане на:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Бележка:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Това е валидно искане за плащане.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Въведете наименование за този адрес, за да го добавите в списъка с адреси</translation>
     </message>
@@ -3536,12 +3266,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
-        <translation>Дарккойн ядрото се изключва...</translation>
+        <translation>Dash ядрото се изключва...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Не изключвайте компютърът докато не изчезне този прозорец.</translation>
     </message>
@@ -3549,185 +3279,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Подписи - Подпиши / Провери съобщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Подпиши</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Можете да подпишете съобщение като доказателство, че притежавате определен адрес. Бъдете внимателни и не подписвайте съобщения, които биха разкрили лична информация без вашето съгласие.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash адресът да подпише съобщението</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Изберете използван преди адрес</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Вмъкни адрес от клипборда</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Въведете съобщението тук</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Подпис</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
-        <translation>Копиране на текущия подпис</translation>
+        <translation>Копиране на текущия подпис в системния клипборд</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
-        <translation>Подпиши съобщението за да докажеш че притежаваш този Дарккойн адрес</translation>
+        <translation>Подпиши съобщението за да докажеш че притежаваш този Dash адрес</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Подпиши &amp;съобщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
-        <translation>Изчисти полето с подписаните съобщения.</translation>
+        <translation>Изчисти всички подписаните съобщения</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Изчисти</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Провери съобщението</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
-        <translation>Въведете подписания адрес, съобщението (уверете се, че сте копирали редовете, спациите, табовете и другите точно) и подпишете отдолу, за да удостоверите съобщението. Внимавайте да не вмъкнете излишни символи в подписа от това, което е в самото съобщение, за избегнете риска от злонамерна външа намеса.</translation>
+        <translation>Въведете подписания адрес, съобщението (уверете се, че сте копирали редовете, спациите, табовете и другите точно) и подпишете отдолу, за да удостоверите съобщението. Внимавайте да не вмъкнете излишни символи в подписа от това, което е в самото съобщение, за да избегнете риска от злонамерна външа намеса.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash адресът ,с който е подписано съобщението</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
-        <translation>Проверете съобщението, за да сте сигурни че е подписано с определен Дарккойн адрес</translation>
+        <translation>Проверете съобщението, за да сте сигурни че е подписано с определен Dash адрес</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Провери &amp;Съобщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Изчисти всички проверени съобщения в полето</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Натиснете &quot;Подписване на съобщение&quot; за да създадете подпис</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Въведете Дарккойн адрес (напр. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Въведеният адрес е невалиден.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Моля проверете адреса и опитайте отново.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Въведеният адрес не може да се съпостави с валиден ключ.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Отключването на портфейла беше отменено.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Не е наличен частен ключ за въведеният адрес.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Подписването на съобщение беше неуспешно.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Съобщението е подписано.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Подписът не може да бъде декодиран.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Проверете подписа и опитайте отново.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Подписът не отговаря на комбинацията от съобщение и адрес.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Проверката на съобщението беше неуспешна.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Съобщението е потвърдено.</translation>
     </message>
@@ -3735,27 +3461,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
-        <translation>Дарккойн Ядро</translation>
+        <translation>Dash Ядро</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Версия %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
-        <translation>Водещи Биткойн разработчици</translation>
+        <translation>Водещи Bitcoin разработчици</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
-        <translation>Водещи Дарккойн разработчици</translation>
+        <translation>Водещи Dash разработчици</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3763,7 +3489,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>КБ/с</translation>
     </message>
@@ -3771,267 +3497,258 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Отворен за още %n блока</numerusform><numerusform>Отворен за още %n блока</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Подлежи на промяна до %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>конфликтно</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/офлайн(проверено през instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/потвърдени (проверено от instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 потвърждения (проверено от instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/офлайн</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/непотвърдени</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>включена в %1 блока</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/офлайн (InstantX проверка в процес - %2 of %3 подписани)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/потвърдени (InstantX проверка в процес - %2 of %3 подписани )</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 потвърждения (InstantX проверка в процес - %2 of %3 подписвания)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/офлайн (InstantX проверката е неуспешна)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/потвърдени (InstantX проверката е неуспешна)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Статус</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, все още не е изпратено</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>, излъчено през %n нода</numerusform><numerusform>, излъчено през %n нода</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Източник</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Издадени</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>От</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>неизвестен</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>За</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>собствен адрес</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>наблюдавани</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>наименование</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Кредит</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>отлежава след %n блок(а)</numerusform>
-            <numerusform>отлежава след %n блок(а)</numerusform>
-        </translation>
+        <translation><numerusform>отлежава след %n блока</numerusform><numerusform>отлежава след %n блока</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>не е приет</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Дебит</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Общо дебит</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Общо кредит</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Такса</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Нетна сума</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Съобщение</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Коментар</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
-        <translation>на транзакцията</translation>
+        <translation>ID на транзакцията</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Търговец</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Генерираните монети трябва да отлежат %1 блока преди да могат да се използват. Когато генерирате този блок той бива излъчен в мрежата, за да се добави в регистъра на блокове. Ако добавянето в регистъра е неуспешно, състоянието му ще е &quot;неприет&quot; и няма да можете да използвате тези монети. Това се случва понякога, когато друг възел генерира блок по същото време с вас.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Информация за грешки</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Транзакция</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Входящи</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
-        <translation>true</translation>
+        <translation>вярно</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
-        <translation>false</translation>
+        <translation>грешно</translation>
     </message>
 </context>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Транзакция</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Описание на транзакцията</translation>
     </message>
@@ -4039,164 +3756,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Сума</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Отворен за още %n блока</numerusform><numerusform>Отворен за още %n блока</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Подлежи на промяна до %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Офлайн</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Непотвърдено</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Потвърждаване (%1 от %2 препоръчвани потвърждения)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Потвърдени (%1 потвърждения)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Конфликтно</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Неотлежал (%1 потвърждения, ще бъдат на разположение след %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Блокът не е получен от останалите участници и най-вероятно няма да бъде одобрен.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
-        <translation>Генерирана, но отхвърлена от мрежата</translation>
+        <translation>Генерирана, но отхвърлена </translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Получени с</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Получен от</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Получени с Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Изпратени на</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Плащане към себе си</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Емитирани</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend деноминация</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend обезпечава плащането</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend направи обезпечение на постъпленията</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend направени деноминации</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+30"/>
+        <source>watch-only</source>
+        <translation>наблюдавани</translation>
+    </message>
+    <message>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(n/a)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Състояние на транзакцията. Задръжте върху това поле за да видите броя потвърждения.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Дата и час на получаване на транзакцията.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Вид транзакция.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Дали има или не наблюдаван/watch-only адрес участващ в тази транзакция.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Адрес на получател на транзакцията.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Сума извадена или добавена към баланса.</translation>
     </message>
@@ -4204,207 +3919,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Всички</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Днес</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Тази седмица</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Този месец</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Предния месец</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Тази година</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>От - до...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Най-често</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Получени</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Изпратени на</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend направи обезпечение на постъпленията</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend създава деноминации</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend деноминация</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend обезпечава плащането</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
-        <translation>Собствени</translation>
+        <translation>За себе си</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Емитирани</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Други</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Търсене по адрес или наименование</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Минимална сума</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Копирай адрес</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Копирай наименование</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Копирай сума</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Копирай транзакция с ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Редактирай наименование</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Подробности за транзакцията</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Изнасяне историята на транзакциите</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>CSV файл (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Потвърдени</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Наблюдавани</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Наименование</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Сума</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ИД</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Грешка при изнасянето</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Възникна грешка при опит за записване историята на транзакциите в %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Изнасянето е успешно</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Направените транзакции са запазени до %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>От:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>до</translation>
     </message>
@@ -4412,15 +4128,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Единица за показване на количеството.Клик за избиране на друга единица.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Няма зареден портфейл.</translation>
     </message>
@@ -4428,56 +4144,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Изпращане</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation><numerusform>InstantX не поддържа изпращане на толкова големи суми. Транзакциите са ограничени до %n DASH.</numerusform><numerusform>InstantX не поддържа изпращане на толкова големи суми. Транзакциите са ограничени до %n DASH.</numerusform></translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX не поддържа изпращане на толкова големи суми. Транзакциите са ограничени до %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Изнеси</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Запазване на портфейла</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Данните за портфейла(*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Неуспешно запазване на портфейла</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Възникна грешка при опит за записване данните на портфейла в %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Успешно запазване на портфейла</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Базата на портфейла беше запазена успешно в %1.</translation>
     </message>
@@ -4485,1367 +4203,1420 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, трябва да зададете rpcpassword в конфигурационния  файл:
-%s
-Препоръчително е да използвате следната произволна парола:
-rpcuser=darkcoinrpc
-rpcpassword=%s
-(не е нужно да запомняте тази парола)
-Потребителя и паролата НЕ ТРЯБВА  да са еднакви.
-Ако файла не съществува , създайте го с права за само за четене.
-Препоръчително е да създадете сигнал за уведомяване за да бъдете осведомени при проблем;
-Пример: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Разрешени шифри (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Възникна грешка при настройване на RPC порт %u за очакване на IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Възникна грешка при настройване на RPC порт %u за очакване на IPv6, връщане към IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Свързва се с посочения адрес и винаги слуша за него. Използвайте [хост]:порт за изписване при IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Не може да се заключи дата директорията %s. Dash ядрото вече работи.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Непрекъснат лимит на безплатните транзакции до &lt;n&gt;*1000 байта в минута (default:15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend използва всички деноминирани наличности за да изпрати сумата, може би ще е необходимо да бъдат анонимизирани  още монети.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Изключване на свързаните с Дарксенд и Мастернод функции (0-1, по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Включен instantx,покажи потвърждения за заключени транзакции (bool, default: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Включено автоматично използване на darksend за средствата в този портфейл (0-1, default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Влиза в регресивен тестов режим, който използва специална верига в  която блоковете могат да бъдат намерени мигновено.Това е предназначено за  тестване на предишни инструменти и разработване на приложението.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Влиза в регресивен тестов режим, който използва специална верига в която блоковете могат да бъдат намерени мигновено.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Грешка: Очакването на входящи връзки е неуспешно (върната грешка %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Грешка: Транзакцията е отхвърлена! Това може да се случи, ако някои от монетите в портфейла са вече изразходвани, например ако се използва копие на wallet.dat където монетите са изразходвани, но не са изразходвани в настоящия портфейл.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Грешка: Тази транзакция изисква минимална такса не по-малко от %s, поради размера на сумата, сложността си или употребата на наскоро получени средства!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Грешка: Портфейлът е отключен само за анонимизация,не може да бъде извършена транзакция.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Изпълни командата когато се получи съответното предупреждение или се появи друг проблем с мрежата (%s в cmd е подменено от съобщение)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Изпълнете командата когато транзакцията в портфейла се променя  (%s в cmd е подменено с TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Изпълнете командата когато има промяна в най-добрият блок (%s в cmd е подменена от  block hash)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Такси по-малки от тази се считат за нулеви (за извършване на трнзакция) (по подразбиране:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Изчиствай активността по базата от паметта към лог на диска на всеки &lt;n&gt; мегабайта (по подразбиране: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Намерени са непотвърдени деноминирани средства, трябва да изчакате потвърждаването им за да продължите</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>How thorough the block verification of -checkblocks is (0-4, default: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>В този режим -genproclimit се контролира колко блока са генерирани моментално.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX изисква средства с поне 6 потвърждения, може да се наложи да почакате няколко минути и да опитате отново.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Очаквай JSON-RPC входящи връзки на &lt;port&gt; (по подразбиране: 9998 или за тестовата мрежа: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Име за създаване на URL за KeePass входа , който съхранява паролата за портфейла</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Брой секунди до възтановяване на връзката за зле държащите се пиъри (по подразбиране:86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Изходяща информация за грешки (по подразбиране: 0, задаването на &lt;category&gt; е опция)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)
-Осигуряване на ликвидност Darksend от рядко смесване монети непрекъснато в съответствие (0-100, по подразбиране: 0, 1 = много чести, високи такси, 100 = твърде редки, ниски такси)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Заявка за адреси на пиъри чрез DNS справка, ако адресите са недостатъчно (по-подразбиране: 1 освен ако -свързан)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Задаване на външен адрес:порт на този masternode (пример: адрес:порт)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Определя максималния размер на висок приоритет/ниска такса за транзакция в байтове (по подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Задаване броя на нишките потвърждаващи скрипта  (%u до %d, 0 = автоматично, &lt;0 = да се оставят толкова ядра свободни, по подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Задаване лимит на процесорите, когато се използва генериране (-1 = неограничено, по подразбиране: -1) </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Покажи N потвърждения при успешно заключена транзакция (0-9999, по подразбиране: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Това е предварителна тест версия - използвайте я на ваша отговорност - не използвайте за копане или за търговски приложения.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Не може да се свърже с %s на този компютър. Dash ядрото най-вероятно вече работи.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
-        <translation>Не са намерени достатъчно Дарксенд деноминирани средства за тази транзакция.</translation>
+        <translation>Не са намерени достатъчно Darksend деноминирани средства за тази транзакция.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
-        <translation>Не са намерени достатъчно Дарксенд неденоминирани средства за тази транзакция, които не са равни на 1000 DASH.</translation>
+        <translation>Не са намерени достатъчно Darksend неденоминирани средства за тази транзакция, които не са равни на 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
-        <translation>Не са намерени достатъчно Дарксенд неденоминирани средства за тази транзакция.</translation>
+        <translation>Не са намерени достатъчно Darksend неденоминирани средства за тази транзакция.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Използва отделен SOCKS5 прокси, за достигне на пиъри чрез Tor скрити услуги (по подразбиране: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: -paytxfee е с много голяма зададена стойност! Това е транзакционната такса, която ще платите ако направите транзакция.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Внимание: Моля проверете дали датата и часът на вашият компютър са верни! Ако часовникът ви не е сверен, Дарккойн няма да работи правилно.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Внимание! Изглежда няма пълно съгласуване в мрежата! Някой копачи изглежда изпитват проблеми.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Внимание: Не е намерена пълна съвместимост с останалите в мрежата ! Може би се нуждаете от обновяване , или някой от другите нодове се нуждае от обновяване .</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Внимание: грешка при четене на wallet.dat! Всички ключове са прочетени коректно, но записи в данните за транзакциите или в адресната книга може би липсват или са грешни.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Внимание: wallet.dat  е развален, данните са спасени! Оригиналния wallet.dat е запазен като wallet.{timestamp}.bak в %s; ако твоят баланс или транзакции са неверни трябва да възстановите от резервното копие.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Трябва да зададете rpcpassword=&lt;password&gt; в конфигурационния файл:
-%s
-Ако файлът не съществува, създайте го с атрибут само за четене от собственика. </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Трябва да посочите masternodeprivkey в конфигурацията. Моля прочетете документацията за помощ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(по подразбиране 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(по подразбиране wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; може да бъде:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Приемай команден ред и JSON-RPC команди</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Приемай връзки отвън (по подразбиране: 1, ако няма  -proxy или -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Добави възел, към който да се свърже и поддържай връзката отворена</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Разреши DNS справка за -addnode, -seednode и -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Разреши връзките JSON-RPC от въведен IP адрес</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Вече има такъв вход.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Винаги пускай заявка за адреси на пиъри през DNS справката (по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Опит да се възстановят частни ключове от повреден wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Опции за създаване на блок:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Не може да бъде деноминирано: няма останали съвместими входящи средства.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Връщане към по-стара версия на портфейла е невъзможно</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Не може да установи -bind адрес: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Не може да установи -externalip адрес: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Не може да напише адреса по подразбиране</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Изчисти списъка с транзакциите на портфейла (диагностичен инструмент; предполага -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Обезпечението е невалидно.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Обезпечението невалидно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Свързване само към определена възлова точка(и)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Свързване през SOCKS прокси</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Свързване към JSON-RPC през &lt;port&gt; (по подразбиране: 9998 или за тест мрежата: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Свързване към KeePassHttp през порт &lt;port&gt; (по подразбиране: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Свържи се с възел за зараждане на адреси на пиъри, след това прекъсни връзката</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Настройки на връзката:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Открита е повредена блок база данни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash ядро демон</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Dash ядро RPC клиент версия</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend е изключен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
-        <translation>Опции на Дарксенд:</translation>
+        <translation>Опции на Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Опции за Откриване на грешки/Тестване:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Деактивирай безопасен режим, замени събитието за истинския безопасен режим (по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Открий собствения IP адрес (по подразбиране: 1, когато слуша и няма -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Не зареждай портфейла и деактивирай RPC повикванията на портфейла</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Искате ли да възстановяване блок базата данни сега?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Зареждането е завършено</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>Понижете и опитайте отново.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Активиране на клиента да работи като мастернод (0-1, по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Записите са пълни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Грешка при свързване с Мастернод.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Грешка при инициализация на блок базата данни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Грешка при инициализиране на средата на базата данни на портфейла %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Грешка при зареждане на блок базата данни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Грешка при зареждане на wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Грешка при зареждане на wallet.dat: портфейлът е повреден</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Грешка при зареждане на wallet.dat: портфейлът изисква по-нова версия на Дарккойн</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Грешка при отваряне на блок базата данни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Грешка при четене от базата данни, изключване.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
-        <translation>Грешка при възстановяване на публичния ключ</translation>
+        <translation>Грешка при възстановяване на публичния ключ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Грешка</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
-        <translation>Грешка: Мястото на харддиска е малко!</translation>
+        <translation>Грешка: Мястото на твърдия диск е малко!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Грешка: Портфейлът е заключен, транзакцията е невъзможна!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Грешка: Вече имате чакащи вписвания в Darksend басейна</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Грешка: системна грешка:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Неуспешно &quot;слушане&quot; на всеки порт. Използвайте -listen=0 ако искате това.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Неуспешно четене на блок данни</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Неуспешно четене на блок</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Неуспешно синхронизиране на блок индекса</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Ако  &lt;category&gt; не е предоставена, изведи цялата информация за отстраняването на грешки.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Неуспешен запис в блок индекса </translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 =запазва tx meta data напр.акаунта на собственика и информация за искането за плащане,  2 = отпада tx meta data)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Неуспешен запис на блок данни </translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Позволява JSON-RPC връзки от определен източник. Важи за &lt;IP&gt; са един единствен IP (например 1.2.3.4), мрежа / мрежова маска (напр. 1.2.3.4/255.255.255.0) или мрежа / CIDR (напр. 1.2.3.4/24). Тази опция може да бъде променяна многократно</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Неуспешен запис на блок</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Възникна грешка при настройване на RPC адрес %s порт %u за слушане: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Неуспешен запис на информационния файл</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Свързва се с посочения адрес и добави в whitelist свързаните към него пиъри. Използвайте [хост]:порт за изписване при IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Неуспешен запис в базата данни на монетата</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Свързват с даден адрес, за да слушат за JSON-RPC връзки. Използвайте [host]: port нотация за IPv6. Тази опция може да бъде променяна многократно (по подразбиране: свързват с всички интерфейси)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Неуспешен запис в индекса на транзакцията</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Променете автоматичното финализиране гласуването на бюджет. Режим = Auto: Гласувайте само за точно финализиран съвпадащ с моят генериран бюджет. (string,, по подразбиране: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Неуспешен запис при връщане на данни</translation>
+        <location line="+3"/>
+        <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>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Такса за кБ добавяна към транзакцията която изпращате</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Създаване на нови файлове с достъп по подразбиране , вместо umask 077 (в сила само при изключена функционалност на портфейла)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Такси по-малки от това се считат за нулева такса (за прилагане) (по подразбиране:)</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Изтриване на всички транзакции на портфейла и  възстановява само тези части на блок веригата чрез -rescan при стартиране</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Принудителен безопасен режим (по подразбиране: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Изключване на свързаните с Darksend и Мастернод функции (0-1, по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Генериране на монети (по подразбиране: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Разпространява се под MIT софтуерен лиценз,вижте придружаващият файл COPYING или&lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Получете помощ за команда</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Включен instantx,покажи потвърждения за заключени транзакции (bool, по подразбиране: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Колко блока да проверява при стартиране  (по подразбиране: 288, 0 = всички)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Включено автоматично използване на darksend за средствата в този портфейл (0-1, по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Ако  &lt;category&gt; не е предоставена, изведи цялата информация за отстраняването на грешки.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Грешка: Открит е неподдържан аргумент -socks .настройка SOCKS версия вече не е възможна, само SOCKS5 прокси се поддържа.</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Такси (в DASH/Kb) по-малки от това се считат за нулева такса за прилагане (по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Такси (в DASH/Kb) по-малки от това се считат за нулева такса при създаване на транзакция (по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Изчиствай активността по базата от паметта към лог на диска на всеки &lt;n&gt; мегабайта (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Как цялостната проверка на блок от -checkblocks е (0-4, по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Ако paytxfee не е зададен,включва достатъчно такса, така транзакциите започват потвърждение средно в рамките n блокове(по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Невалидна сума за -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (трябва да бъде най-малко от %s за да се избегне забиване на транзакциите)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Запиши в лога приоритета на транзакцията и таксата за КБ при добив на блокове (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Поддържай пълен списък с транзакциите, използван от getrawtransaction rpc повикването (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Максимален размер на данните в данни съдържащите транзакции , които можем да предадем или изкопаем  (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Максимална крайна такса използвана в единична транзакция, ако настроите твърде малка няма да бъдят възможни големи транзакции (по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Брой секунди до възтановяване на връзката за зле държащите се пиъри (по подразбиране %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Изходяща информация за грешки (по подразбиране: %u, задаването на &lt;category&gt; е опция)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Осигуряване на ликвидност Darksend от рядко смесване монети непрекъснато в съответствие (0-100, по подразбиране: %u, 1=много чести, високи такси, 100=твърде редки, ниски такси)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Определя максималния приоритет за свободно предаване или ниска такса за транзакция (по подразбиране:%u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Задай брой заявки, когато се използва генериране (-1 =всички ядра, по подразбиране: %d)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Покажи N потвърждения при успешно заключена транзакция (0-9999, по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Този продукт включва софтуер, разработен от проекта OpenSSL за използване в OpenSSL Toolkit &lt;https://www.openssl.org/&gt; и криптографски софтуер, написан от Eric Young и UPnP софтуер, написан от Thomas Bernard.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>За използване на dashd, или the -server опция към dash-qt, трябва да зададете rpcpassword в конфигурационния файл: %s Препоръчително е да използвате следната произволна парола: rpcuser=dashrpc rpcpassword=%s (не е нужно да запомняте тази парола) Потребителя и паролата НЕ ТРЯБВА да са еднакви. Ако файла не съществува , създайте го с права за само за четене. Препоръчително е да създадете сигнал за уведомяване за да бъдете осведомени при проблем; Пример: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com 
+</translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Използва отделен SOCKS5 прокси, за достигне на пиъри чрез Tor скрити услуги (по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Внимание: -maxtxfee  е с много голяма зададена стойност! Това е транзакционната такса, която ще платите ако направите единична транзакция.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Внимание: Моля проверете дали датата и часът на вашият компютър са верни! Ако часовникът ви не е сверен, Dash Core няма да работи правилно.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Whitelist пиъри свързани от дадената мрежома маска или  IP адрес. Може да бъде определян многократно.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Whitelisted не могат да бъдат DoS забранени и техните транзакции ще бъдат винаги предадени, дори ако вече са в  mempool, полезно напр. за gateway</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; може да бъде:
+</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Приема публични REST заявки (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Приемливи шифри (по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Винаги пускай заявка за адреси на пиъри през DNS справката (по подразбиране:  %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Не може да установи -whitebind адрес: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Свързване през SOCKS5 прокси</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Свързване към KeePassHttp през порт &lt;port&gt; (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Запазени права (C) 2009-%i Bitcoin Core разработчици</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Запазени права (C) 2014-%i Dash Core разработчиците</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Не успя да се анализира -rpcbind стойност %s като мрежов адрес</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend бездейства.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Darksend заявката е завършена:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Darksend заявката незавършена:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Деактивирай безопасен режим, замени събитието за истинския безопасен режим (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Активиране на клиента да работи като masternode (0-1, по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Грешка при свързване с Masternode.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Грешка при зареждане на wallet.dat: портфейлът изисква по-нова версия на Dash Core</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Грешка: Възникна сериозна вътрешна грешка, виж debug.log за подробности</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Грешка:Открит е неподдържан аргумент -tor, моля използвай -onion.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Такси (в DASH/Kb) добавена към направената транзакция(по подразбиране: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Приключване на транзакцията.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Принудителен безопасен режим (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Открити са достатъчно потребители, подписване ( изчаква %s )</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Открити са достатъчно потребители, подписва...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Генериране на монети (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Колко блока да проверява при стартиране (по подразбиране:  %u, 0 = всички)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Игнориране на masternodes с по-ниска версия от (пример: 70050; по подразбиране: 0)</translation>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Игнориране на masternodes с по-ниска версия от (пример: 70050; по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Внасяне...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Внасяне на блокове от външен blk000??.dat файл</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Прикрепва IP адреси към debug записа (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Несъвместим режим.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Несъвместима версия.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Намерен е неправилен или не създаден блок. Грешна data директория за мрежата?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Информация</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Инициализационната проверка не успешна. Dash ядрото се изключва.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Въвеждането е невалидно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>InstantX опции:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Недостатъчно средства</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Недостатъчно средства.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Невалиден -onion адрес: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Невалиден -proxy address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Невалидна сума за -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Невалидна сума за -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Невалидна сума за -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: &apos;%s&apos; (трябва да бъде най-малко %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Невалидна сума</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Последното успешно Darksend действие беше твърде скоро.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
-        <source>Invalid masternodeprivkey. Please see documenation.</source>
-        <translation>Невалиден частен ключ на Мастернод. Моля вижте документацията.</translation>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Ограничение на размера на кеша за подпис до &lt;n&gt; реда (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
-        <source>Invalid private key.</source>
-        <translation>Невалиден личен ключ.</translation>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Очаквай JSON-RPC входящи връзки на &lt;port&gt; (по подразбиране:%u или за тестовата мрежа: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
-        <source>Invalid script detected.</source>
-        <translation>Открит е невалиден скрипт.</translation>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Слушане за входящи връзки на &lt;port&gt; (по подразбиране:%u или за тестовата мрежа: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
-        <source>KeePassHttp id for the established association</source>
-        <translation>KeePassHttp id за осъществяване на връзка</translation>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Заключване на masternodes от конфигурационния файл(по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
-        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
-        <translation>KeePassHttp ключ за  AES криптирана връзка с KeePass</translation>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Поддържай най-много &lt;n&gt; връзки към пиърите (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Поддържай N Дарккойн монети анонимизирани (по подразбиране: 0)</translation>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимален размер на буфера при получаване, &lt;n&gt;*1000 байта (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Запази поне &lt;n&gt; неосъществени транзакции в паметта (по подразбиране: %u)</translation>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимален размер на буфера при изпращане, &lt;n&gt;*1000 байта (по подразбиране:  %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
-        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
-        <translation>Пази поне &lt;n&gt; неосъществени транзакции в паметта (по подразбиране: %u)</translation>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>В процес на смесване...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
-        <source>Last Darksend was too recent.</source>
-        <translation>Последния Дарксенд беше твърде скоро.</translation>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Нужно е определяне на порта с -whitebind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Последното успешно Дарксенд действие бе твърде скоро.</translation>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Не са открити Masternodes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Ограничение на размера на кеша за подпис до &lt;n&gt; реда (по подразбиране: 50000)</translation>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Не e намерен съвместим Masternode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Вписване на команди</translation>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Не е в Мasternode списъка.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Слушане за входящи връзки на  &lt;port&gt; (по подразбиране: 9999 или за тестовата мрежа: 19999)</translation>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Брой на автоматичните резервни копия (по подразбиране: 10)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="277"/>
-        <source>Loading addresses...</source>
-        <translation>Зареждане на адреси...</translation>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Приема само блок регистъра съвпадащ с вградените контролни точки (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
-        <source>Loading block index...</source>
-        <translation>Зареждане на блок индекса...</translation>
+        <location line="+1"/>
+        <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>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Прикрепва справката за грешки към времевия запис(по подразбиране:  %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
-        <source>Loading wallet... (%3.2f %%)</source>
-        <translation>Зареждане на портфейла... (%3.2f %%)</translation>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Стартирай нишка за почистване на портфейла периодично (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
-        <source>Loading wallet...</source>
-        <translation>Зареждане на портфейла...</translation>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Изпрати с нулева такса за транзакция ако е възможно (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Сертификационен файл на сървъра (По подразбиране: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Поддържай пълен списък с транзакциите (по подразбиране: 0)</translation>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Частен ключ за сървъра (по подразбиране %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Поддържай най-много &lt;n&gt; връзки към пиърите (по подразбиране: 125)</translation>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Времето за подпис изтече, моля подпишете отново.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="285"/>
-        <source>Masternode options:</source>
-        <translation>Мастернод опции:</translation>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Задайте максимален брой на генерираните ключове до &lt;n&gt; (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
-        <source>Masternode queue is full.</source>
-        <translation>Опашката с задачи на Мастернода е пълна.</translation>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Задайте минимален размер на блок-а в байтове (подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
-        <source>Masternode:</source>
-        <translation>Мастернод:</translation>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Задай брой заявки обслужващи процеса RPC повикванията (по подразбиране:  %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Максимален размер на буфера при получаване, &lt;n&gt;*1000 байта (по подразбиране: 5000)</translation>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Определете флага DB_PRIVATE в средата база от данни на портфейла (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Максимален размер на буфера при изпращане, &lt;n&gt;*1000 байта (по подразбиране: 1000)</translation>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Посочете конфигурационен файл (по подразбиране: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="290"/>
-        <source>Missing input transaction information.</source>
-        <translation>Липсва входяща информация за транзакцията.</translation>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Определете таймаут за свързване в милисекунди (минимум: 1, подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Не са намерени съвместими Мастернод:</translation>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Посочете конфигурационен файл (по подразбиране: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="292"/>
-        <source>No funds detected in need of denominating.</source>
-        <translation>Не са открити суми нуждаещи се от деноминиране.</translation>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Посочете pid-файла (по подразбиране:  %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Не са открити Мастернодове.</translation>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Изхарчете непотвърденото ресто при изпращане на транзакциите (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="294"/>
-        <source>No matching denominations found for mixing.</source>
-        <translation>Няма съвпадащи деноминации за миксирането.</translation>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Спри работата след импортиране на блоковете от диска (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
-        <source>Non-standard public key detected.</source>
-        <translation>Засечен е нестандартен публичен ключ.</translation>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Изпратени са следните записи към masternode: %u / %d</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
-        <source>Not compatible with existing transactions.</source>
-        <translation>Несъвместим със съществуващите транзакции.</translation>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Изпратено към masternode, чака за още записи ( %u / %d ) %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
-        <source>Not enough file descriptors available.</source>
-        <translation>Няма достатъчно налични файлови описания.</translation>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Изпратено към Мастернода, чака в опашката %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Не е в списъка на Мастернодове</translation>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>Това не е Masternode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Приема само блок регистъра съвпадащ с вградените контролни точки (по подразбиране: 1)</translation>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Праг на прекъсване на връзката при непорядъчно държащи се пиъри (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Свързване само към точки от мрежата &lt;net&gt; (IPv4, IPv6 or Tor)</translation>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>Използвай KeePass 2 интеграция чрез плъгина KeePassHttp (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="301"/>
-        <source>Options:</source>
-        <translation>Опции:</translation>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Използвай N отделни Masternode за анонимизиране на средствата (2-8, по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
-        <source>Password for JSON-RPC connections</source>
-        <translation>Парола за  JSON-RPC връзките</translation>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Използвай UPnP за определяне на порта за слушане (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Прикрепва справката за грешки към времевия запис(по подразбиране: 1)</translation>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Портфейлът трябва да бъде презаписан: рестартирайте Dash за да завършите</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Показвай блока при стартиране, ако е намерен в блок индекса</translation>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Внимание: Неподдържан аргумен -benchmark е игнориран, използвайте -debug=bench.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Разпечатай блоковото дърво при стартиране (по подразбиране: 0)</translation>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Внимание: Аргументът -debugnet е невалиден, използвайте -debug=net .</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="306"/>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>RPC SSL опции: (виж Bitcoin Wiki за  SSL инструкции за настройка)</translation>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Ще опита отново...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Опции на RPC клиента:</translation>
+        <location line="-122"/>
+        <source>Invalid masternodeprivkey. Please see documenation.</source>
+        <translation>Невалиден частен ключ на Masternode. Моля вижте документацията.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="308"/>
-        <source>RPC server options:</source>
-        <translation>Опции на RPC сървъра:</translation>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>Невалидна мрежова маска в -whitelist: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation>Произволно спира 1 от всеки &lt;n&gt; мрежови съобщения</translation>
+        <location line="+1"/>
+        <source>Invalid private key.</source>
+        <translation>Невалиден личен ключ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation>Произволно проверява 1 на всеки &lt;n&gt; мрежови съобщения</translation>
+        <location line="+1"/>
+        <source>Invalid script detected.</source>
+        <translation>Открит е невалиден скрипт.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Възстановяване индекса на блок регистъра от настоящия blk000??.dat файл</translation>
+        <location line="+1"/>
+        <source>KeePassHttp id for the established association</source>
+        <translation>KeePassHttp id за осъществяване на връзка</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Повторно сканиране на регистъра на блокове за липсващи портфейлни транзакции</translation>
+        <location line="+1"/>
+        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
+        <translation>KeePassHttp ключ за  AES криптирана връзка с KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
-        <source>Rescanning...</source>
-        <translation>Повторно сканиране...</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Поддържай N Dash анонимизирани (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Стартирай нишка за почистване на портфейла периодично (по подразбиране: 1)</translation>
+        <location line="+1"/>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Пази поне &lt;n&gt; неосъществени транзакции в паметта (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="315"/>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Стартира във фонов режим като демон и приема команди</translation>
+        <location line="+1"/>
+        <source>Last Darksend was too recent.</source>
+        <translation>Последния Derksend беше твърде скоро.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL опции: (виж Bitcoin Wiki за  SSL инструкции за настройка)</translation>
+        <location line="+5"/>
+        <source>Loading addresses...</source>
+        <translation>Зареждане на адреси...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Изберете SOCKS версия за -proxy (4 или 5, по подразбиране: 5)</translation>
+        <location line="+1"/>
+        <source>Loading block index...</source>
+        <translation>Зареждане на блок индекса...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Изпрати команда до Дарккойн ядрото</translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Зареждане на бюджетния кеш...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Изпрати команди до възел функциониращ на &lt;ip&gt; (По подразбиране: 127.0.0.1)</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Зареждане на masternode кеш...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="320"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Изпрати информацията за грешки към конзолата, вместо файла debug.log</translation>
+        <location line="+1"/>
+        <source>Loading wallet... (%3.2f %%)</source>
+        <translation>Зареждане на портфейла... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Сертификатен файл на сървъра (По подразбиране:server.cert)</translation>
+        <location line="+1"/>
+        <source>Loading wallet...</source>
+        <translation>Зареждане на портфейла...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Частен ключ за сървъра (default: server.pem)</translation>
+        <location line="+3"/>
+        <source>Masternode options:</source>
+        <translation>Masternode опции:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="323"/>
-        <source>Session not complete!</source>
-        <translation>Незавършена сесия!</translation>
+        <location line="+1"/>
+        <source>Masternode queue is full.</source>
+        <translation>Опашката с задачи на Masternode е пълна.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Изтекла сесия (30 секунди), моля изпратете отново.</translation>
+        <location line="+1"/>
+        <source>Masternode:</source>
+        <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="325"/>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Определи размера на кеша на базата от данни в мегабайти (%d до %d, по подразбиране: %d)</translation>
+        <location line="+3"/>
+        <source>Missing input transaction information.</source>
+        <translation>Липсва входяща информация за транзакцията.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Задайте максимален брой на генерираните ключове до &lt;n&gt; (по подразбиране: 100)</translation>
+        <location line="+5"/>
+        <source>No funds detected in need of denominating.</source>
+        <translation>Не са открити суми нуждаещи се от деноминиране.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="327"/>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation>Определи максималния размер на блока в байтове (по подразбиране: %d)</translation>
+        <location line="+1"/>
+        <source>No matching denominations found for mixing.</source>
+        <translation>Няма съвпадащи деноминации за миксирането.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Задайте минимален размер на блок-а в байтове (подразбиране: 0)</translation>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Сменящи опции на node:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="329"/>
-        <source>Set the masternode private key</source>
-        <translation>Задаване на личен ключ на Мастенода</translation>
+        <location line="+1"/>
+        <source>Non-standard public key detected.</source>
+        <translation>Засечен е нестандартен публичен ключ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Задай брой заявки обслужващи процеса RPC повикванията (по подразбиране: 4)</translation>
+        <location line="+1"/>
+        <source>Not compatible with existing transactions.</source>
+        <translation>Несъвместим със съществуващите транзакции.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Определете флага DB_PRIVATE в средата база от данни на портфейла (по подразбиране: 1)</translation>
+        <location line="+1"/>
+        <source>Not enough file descriptors available.</source>
+        <translation>Няма достатъчно налични файлови описания.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="332"/>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation>Покажи всички опции за откриване на грешки  (синтаксис: --help -help-debug)</translation>
+        <location line="+5"/>
+        <source>Options:</source>
+        <translation>Опции:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Покажи бенчмарк информация (по подразбиране: 0)</translation>
+        <location line="+1"/>
+        <source>Password for JSON-RPC connections</source>
+        <translation>Парола за  JSON-RPC връзките</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="334"/>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Свий debug.log файла при стартиране на клиента (по подразбиране: 1, когато няма -debug)</translation>
+        <location line="+2"/>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>RPC SSL опции: (виж Bitcoin Wiki за  SSL инструкции за настройка)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
-        <source>Signing failed.</source>
-        <translation>Подписването неуспешно.</translation>
+        <location line="+1"/>
+        <source>RPC server options:</source>
+        <translation>Опции на RPC сървъра:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Времето за подпис изтече, моля подпишете отново.</translation>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC поддръжка за HTTP постоянни връзки (по подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
-        <source>Signing transaction failed</source>
-        <translation>Подписването на транзакцията се провали</translation>
+        <location line="+1"/>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Произволно спира 1 от всеки &lt;n&gt; мрежови съобщения</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Посочете конфигурационен файл (по подразбиране: dash.conf)</translation>
+        <location line="+1"/>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>Произволно проверява 1 на всеки &lt;n&gt; мрежови съобщения</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Определете таймаут за свързване в милисекунди (подразбиране: 5000)</translation>
+        <location line="+1"/>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation>Възстановяване индекса на блок регистъра от настоящия blk000??.dat файл</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="340"/>
-        <source>Specify data directory</source>
-        <translation>Определете директория за данните</translation>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Смени и изкопай носещите данни транзакции (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Определяне на конфигурационния файл на Мастернода (по подразбиране: masternode.conf)</translation>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Смяна на не-P2SH многоподписани (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Rescan the block chain for missing wallet transactions</source>
+        <translation>Повторно сканиране на регистъра на блокове за липсващи транзакции от портфейла</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="343"/>
-        <source>Specify wallet file (within data directory)</source>
-        <translation>Посочете файла с портфейла (в папката с данни)</translation>
+        <location line="+1"/>
+        <source>Rescanning...</source>
+        <translation>Повторно сканиране...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
-        <source>Specify your own public address</source>
-        <translation>Въведете Ваш публичен адрес</translation>
+        <location line="+2"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Стартира във фонов режим като демон и приема команди</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>Изпрати информацията за грешки към конзолата, вместо файла debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Стартиране на Dash Core  демона</translation>
+        <location line="+4"/>
+        <source>Session not complete!</source>
+        <translation>Незавършена сесия!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Системна грешка:</translation>
+        <location line="+2"/>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>Определи размера на кеша на базата от данни в мегабайти (%d до %d, по подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="348"/>
-        <source>This help message</source>
-        <translation>Това помощно съобщение</translation>
+        <location line="+2"/>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>Определи максималния размер на блока в байтове (по подразбиране: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Това е предназначено за инструментите за регресивно тестване и разработка на приложението.</translation>
+        <location line="+2"/>
+        <source>Set the masternode private key</source>
+        <translation>Задаване на личен ключ на Masternode</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Покажи всички опции за откриване на грешки  (синтаксис: --help -help-debug)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
+        <translation>Свий debug.log файла при стартиране на клиента (по подразбиране: 1, когато няма -debug)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing failed.</source>
+        <translation>Подписването неуспешно.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing timed out, please resubmit.</source>
+        <translation>Времето за подпис изтече, моля подпишете отново.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Това не е Мастернод.</translation>
+        <location line="+1"/>
+        <source>Signing transaction failed</source>
+        <translation>Подписването на транзакцията се провали</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Праг на прекъсване на връзката при непорядъчно държащи се пиъри (по подразбиране:100)</translation>
+        <location line="+3"/>
+        <source>Specify data directory</source>
+        <translation>Определете директория за данните</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation type="unfinished"></translation>
+        <location line="+3"/>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>Посочете файла с портфейла (в папката с данни)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+1"/>
+        <source>Specify your own public address</source>
+        <translation>Въведете Ваш публичен адрес</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This help message</source>
+        <translation>Това помощно съобщение</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Това е експериментален софтуер.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Това е предназначено за инструментите за регресивно тестване и разработка на приложението.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Сумата на транзакцията е твърде малка</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Сумите на транзакциите трябва да са положителни</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Транзакцията създадена успешно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Таксите за транзакция са твърде високи.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Транзакцията е невалидна.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Транзакцията е твърде голяма за таксовите политики.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Транзакцията е твърде голяма</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Не може да се свърже с %s на този компютър (връща грешка %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Предава окончателната транзакция.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Неуспешно подписване на плащането към masternode победителя. Грешен ключ?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Не може да се свърже с %s на този компютър (връща грешка %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Неуспешно подписване на spork-съобщение. Грешен ключ?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Заявка за неизвестна версия на -socks прокси: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Неизвестна мрежа определена от -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Обновяване на портфейла до най-новия формат</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Неизвестно състояние: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Използване:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Използвай KeePass 2 интеграция чрез плъгина KeePassHttp (по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Използвай N отделни Мастернода за анонимизиране на средствата (2-8, по подразбиране: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Обновяване на портфейла до най-новия формат</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Използвайте OpenSSL (https) за JSON-RPC връзките</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Използвай UPnP за определяне на порта за слушане (по подразбиране: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Използвай UPnP за определяне на порта за слушане (по подразбиране: 1 когато слуша)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Използвайте тестовата мрежа</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Потребителско име за JSON-RPC връзките</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Стойност повече от максимално позволената в Darksend басейна.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Проверка на блоковете...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Проверка на портфейла...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Изчакайте стартирането на RPC сървърът</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Портфейла %s е разположен извън папката с данни %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Портфейлът е заключен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Портфейлът трябва да бъде презаписан: рестартирайте Даккойн за да завършите</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Настройки на портфейла:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Предупреждение</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Внимание: Аргументът -debugnet е невалиден, използвайте -debug=net </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Внимание: Използвате остаряла версия, необходимо е обновление!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Необходимо е повторно изграждане на базата данни използвайки -reindex, за да промените -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Вашите записи са добавени успешно.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation> Вашата транзакция е била приета в басейна!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Премахване на всички транзакции от портфейла ...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>при стартиране</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat е повреден, възстановяването неуспешно</translation>
     </message>
diff --git a/src/qt/locale/dash_de.ts b/src/qt/locale/dash_de.ts
index bc3e834fd0f9..956ba006e463 100644
--- a/src/qt/locale/dash_de.ts
+++ b/src/qt/locale/dash_de.ts
@@ -1,206 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="de">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Über Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;/b&gt; Version</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Copyright &amp;copy; 2009-2014 Die &quot;Bitcoin Core&quot; Entwickler.
-Copyright &amp;copy; 2014-YYYY Die &quot;Dash Core&quot; Entwickler.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Dies ist experimentelle Software welche unter der MIT/X11-Lizens veröffentlicht wurde.
-
-Die Softwarelizenz können Sie unter der beiliegenden Datei &quot;COPYING&quot; einsehen oder im Web unter der Adresse: 
-http://www.opensource.org/licenses/mit-license.php.
-
-Dieses Produkt enthält zudem folgende Dritt-Software: 
-- OpenSSL-Projekt: OpenSSL-Toolkit (https://www.openssl.org) 
-- Kryptographische Bibliotheken: Eric Young (eay@cryptsoft.com) 
-- Thomas Bernard: UPnP-Software</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Urheberrecht</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Die &quot;Bitcoin Core&quot;-Entwickler</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Die &quot;Dash Core&quot;-Entwickler</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-Bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Doppelklick zum Bearbeiten der Adresse oder der Bezeichnung</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Rechts-Klick um Adresse oder Bezeichnung zu bearbeiten</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Eine neue Adresse erstellen</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Neu</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Ausgewählte Adresse in die Zwischenablage kopieren</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Kopieren</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Ausgewählte Adresse aus der Liste entfernen</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Löschen</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Exportieren</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>&amp;Schließen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Wählen Sie die Adresse aus, an die Sie Dash überweisen möchten</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Wählen Sie die Adresse aus, über die Sie Dash empfangen wollen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>&amp;Auswählen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Zahlungsadressen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Empfangsadressen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Dies sind ihre Dash-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Dash überweisen.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Dies sind ihre Dash-Adressen zum Empfangen von Zahlungen. Es wird empfohlen für jede Transaktion eine neue Empfangsadresse zu verwenden.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Adresse kopieren</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>&amp;Bezeichnung kopieren</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editieren</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Addressliste exportieren</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Kommagetrennte-Datei (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Exportieren fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten.</translation>
+        <translation>Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten. Bitte noch einmal versuchen</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(keine Bezeichnung)</translation>
     </message>
@@ -208,154 +143,150 @@ Dieses Produkt enthält zudem folgende Dritt-Software:
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Passphrasendialog</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Passphrase eingeben</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Neue Passphrase</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Neue Passphrase wiederholen</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Verhindert das einfache Überweisen von Geld, falls das Systemkonto kompromittiert wurde. Bietet keine wirkliche Sicherheit.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Nur zur Anonymisierung</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Geben Sie die neue Passphrase für die Wallet ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;10 oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;8 oder mehr Wörtern&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Geben Sie die neue Passphrase für die Wallet ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;10 oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;8 oder mehr Wörtern&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Wallet verschlüsseln</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entsperren.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Wallet entsperren</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entschlüsseln.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Wallet entschlüsseln</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Passphrase ändern</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Geben Sie die alte und neue Wallet-Passphrase ein.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Wallet-Verschlüsselung bestätigen</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Warnung: Wenn Sie ihre Wallet verschlüsseln und ihre Passphrase verlieren werden Sie &lt;b&gt;alle ihre Dash verlieren&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Sind Sie sich sicher, dass Sie ihre Wallet verschlüsseln möchten?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Wallet verschlüsselt</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl ihrer Dash durch Schadsoftware schützt, die ihren Computer befällt.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>WICHTIG: Alle vorherigen Wallet-Sicherungen sollten durch die neu erzeugte, verschlüsselte Wallet ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Wallet nutzlos, sobald Sie die neue, verschlüsselte Wallet verwenden.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Wallet-Verschlüsselung fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Die Wallet-Verschlüsselung ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Wallet wurde nicht verschlüsselt.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Wallet-Entsperrung fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Die eingegebene Passphrase zur Wallet-Entschlüsselung war nicht korrekt.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Wallet-Entschlüsselung fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Die Wallet-Passphrase wurde erfolgreich geändert.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Warnung: Die Feststelltaste ist aktiviert!</translation>
     </message>
@@ -363,437 +294,425 @@ Dieses Produkt enthält zudem folgende Dritt-Software:
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Knoten</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[Testnetz]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Übersicht</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Allgemeine Wallet-Übersicht anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Überweisen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Dash an eine Dash-Adresse überweisen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Empfangen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Zahlungen anfordern (erzeugt QR-Codes und &quot;dash:&quot;-URIs)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transaktionen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Transaktionsverlauf durchsehen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>&amp;Beenden</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Anwendung beenden</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Über Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Informationen über Dash anzeigen</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Informationen über Dash Core anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Über &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Informationen über Qt anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Konfiguration...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Die Konfiguration des Clients bearbeiten</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Anzeigen / Verstecken</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Das Hauptfenster anzeigen oder verstecken</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>Wallet &amp;verschlüsseln...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Verschlüsselt die zu ihrer Wallet gehörenden privaten Schlüssel</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>Wallet &amp;sichern...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Eine Wallet-Sicherungskopie erstellen und abspeichern</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>Passphrase &amp;ändern...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Ändert die Passphrase, die für die Wallet-Verschlüsselung benutzt wird</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>Wallet &amp;entsperren</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Wallet entsperren</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>Wallet &amp;sperren</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Nachricht s&amp;ignieren...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Nachrichten signieren, um den Besitz ihrer Dash-Adressen zu beweisen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>Nachricht &amp;verifizieren...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Nachrichten verifizieren, um sicherzustellen, dass diese mit den angegebenen Dash-Adressen signiert wurden</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Diagnoseinformation anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Debugkonsole</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Debugkonsole öffnen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Netzwerkmonitor</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Netzwerkmonitor anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>&amp;Gegenstellen-Liste</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Informationen zu Gegenstellen anzeigen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Wallet-&amp;Reparatur</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Optionen zur Wallet-Reparatur anzeigen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>&amp;Konfigurationsdatei öffnen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Konfigurationsdatei öffnen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Automatische &amp;Sicherheitskopien anzeigen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Automatisch erzeugte Wallet-Sicherheitskopien anzeigen</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Zahlungsadressen...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Liste verwendeter Zahlungsadressen und Bezeichnungen anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>&amp;Empfangsadressen...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Liste verwendeter Empfangsadressen und Bezeichnungen anzeigen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>&amp;URI öffnen...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Eine &quot;dash:&quot;-URI oder Zahlungsanforderung öffnen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Kommandozeilenoptionen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash Core Client</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>%n Block des Transaktionsverlaufs verarbeitet.</numerusform><numerusform>%n Blöcke des Transaktionsverlaufs verarbeitet.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Zeige den &quot;Dash Core&quot;-Hilfetext, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten</translation>
+        <translation>Zeige den &quot;Dash Core&quot;-Hilfetext, um eine Liste mit möglichen Kommandozeilenoptionen zu erhalten</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Datei</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Einstellungen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Werkzeuge</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Hilfe</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Registerkartenleiste</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Dash-Client</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n aktive Verbindung zum Dash-Netzwerk</numerusform>
-            <numerusform>%n aktive Verbindungen zum Dash-Netzwerk</numerusform>
-        </translation>
+        <translation><numerusform>%n aktive Verbindung zum Dash-Netzwerk</numerusform><numerusform>%n aktive Verbindungen zum Dash-Netzwerk</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronisiere mit Netzwerk...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importiere Blöcke von Datenträger...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Reindiziere Blöcke auf Datenträger...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Keine Blockquelle verfügbar...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">%1 Blöcke des Transaktionsverlaufs verarbeitet.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Auf aktuellem Stand</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n Stunde</numerusform>
-            <numerusform>%n Stunden</numerusform>
-        </translation>
+        <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n Tag</numerusform>
-            <numerusform>%n Tage</numerusform>
-        </translation>
+        <translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n Woche</numerusform>
-            <numerusform>%n Wochen</numerusform>
-        </translation>
+        <translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 und %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n  Jahr</numerusform>
-            <numerusform>%n Jahre</numerusform>
-        </translation>
+        <translation><numerusform>%n Jahr</numerusform><numerusform>%n Jahre</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 im Rückstand</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Hole auf...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Der letzte empfangene Block ist %1 alt.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transaktionen hiernach werden noch nicht angezeigt.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Fehler</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Warnung</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Hinweis</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Gesendete Transaktion</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Eingehende Transaktion</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -805,30 +724,25 @@ Typ: %3
 Adresse: %4</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;entsperrt&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell nur zum Anonymisieren &lt;b&gt;entsperrt&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;gesperrt&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Ein schwerer Fehler ist aufgetreten. Dash kann nicht mehr sicher ausgeführt werden und wird beendet.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Netzwerkalarm</translation>
     </message>
@@ -836,333 +750,302 @@ Adresse: %4</translation>
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">&quot;Coin Control&quot;-Adressauswahl</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Anzahl:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Byte:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Betrag:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Priorität:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Gebühr:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Zu geringer Ausgabebetrag:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>&quot;Coin Control&quot;-Auswahl</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>&quot;Dust&quot;</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Abzüglich Gebühr:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Wechselgeld:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>Alles (de)selektieren</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Baumansicht</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Listenansicht</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 gesperrt)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Betrag</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Empfangen über Bezeichner</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Bezeichnung</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Adresse</translation>
+        <translation>Empfangen über Adresse</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Darksend Runden</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Datum</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Bestätigungen</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Bestätigt</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Priorität</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Adresse kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Bezeichnung kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Betrag kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Transaktions-ID kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Nicht ausgegebenen Betrag sperren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Nicht ausgegebenen Betrag entsperren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Anzahl kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Gebühr kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Abzüglich Gebühr kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Byte kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Priorität kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Zu geringen Ausgabebetrag kopieren</translation>
+        <translation>&quot;Dust&quot; Betrag kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Wechselgeld kopieren</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Nicht-anonymisierter Input ausgewählt. &lt;b&gt;Darksend wird deaktiviert.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Sollten Sie trotzdem Darksend verwenden wollen, müssen Sie zuerst alle nicht-anonymisierten Inputs entmarkieren und  das Ankreuzfeld &quot;Darksend&quot; erneut auswählen.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>am höchsten</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>höher</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>hoch</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>mittel-hoch</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kann um +/- 1 duff(s) pro Eingabe variieren.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>k.A.</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>mittel</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>niedrig-mittel</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>niedrig</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>niedriger</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>am niedrigsten</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 gesperrt)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>keine</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">&quot;Dust&quot;</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>ja</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>nein</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Diese Bezeichnung wird rot, wenn die Transaktion größer als 1000 Byte ist.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Das bedeutet, dass eine Gebühr von mindestens %1 pro kB erforderlich ist.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Kann um +/- 1 Byte pro Eingabe variieren.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Transaktionen mit höherer Priorität haben eine größere Chance in einen Block aufgenommen zu werden.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Diese Bezeichnung wird rot, wenn die Priorität niedriger als &quot;mittel&quot; ist.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Diese Bezeichnung wird rot, wenn irgendein Empfänger einen Betrag kleiner als %1 erhält.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Das bedeutet, dass eine Gebühr von mindestens %1 erforderlich ist.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Beträge kleiner als das 0,546-fache der niedrigsten Vermittlungsgebühr werden als &quot;Dust&quot; angezeigt.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Diese Bezeichnung wird rot, wenn das Wechselgeld weniger als %1 ist.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(keine Bezeichnung)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>Wechselgeld von %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(Wechselgeld)</translation>
     </message>
@@ -1170,84 +1053,84 @@ Adresse: %4</translation>
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Darksend konfigurieren</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Einfacher Datenschutz</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Hoher Datenschutz</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Maximaler Datenschutz</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Bitten wählen Sie eine Datenschutz-Stufe.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Benutze 2 separate Masternodes um bis zu 1000 DASH zu mixen</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Benutze 8 separate Masternodes um bis zu 1000 DASH zu mixen</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Benutze 16 separate Masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Diese Option ist am Schnellsten und kostet ungefähr 0,025 DASH, um 1000 DASH zu anonymisieren</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Diese Option ist einigermaßen schnell und kostet ungefähr 0,05 DASH, um 1000 DASH zu anonymisieren</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0,1 DASH pro 1000 zu anonymisierende Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Dies ist die langsamste und sicherste Option. Maximale Anonymität kostet</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Darksend-Konfiguration</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend wurde erfolgreich auf einfachen Datenschutz (%1 und 2 Runden) gesetzt. Sie können dies jederzeit im Konfigurationsfenster von Dash ändern.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend wurde erfolgreich auf hohen Datenschutz (%1 und 8 Runden) gesetzt. Sie können dies jederzeit im Konfigurationsfenster von Dash ändern.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend wurde erfolgreich auf maximalen Datenschutz (%1 und 16 Runden) gesetzt. Sie können dies jederzeit im Konfigurationsfenster von Dash ändern.</translation>
     </message>
@@ -1255,67 +1138,67 @@ Adresse: %4</translation>
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Adresse bearbeiten</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Bezeichnung, die dem Adresslisteneintrag zugeordnet ist.</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Adresse</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Adresse, die dem Adresslisteneintrag zugeordnet ist. Diese kann nur bei Zahlungsadressen verändert werden.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Neue Empfangsadresse</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Neue Zahlungsadresse</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Empfangsadresse bearbeiten</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Zahlungsadresse bearbeiten</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>Die eingegebene Adresse &quot;%1&quot; ist keine gültige Dash-Adresse.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Die eingegebene Adresse &quot;%1&quot; befindet sich bereits im Adressbuch.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Wallet konnte nicht entsperrt werden.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Erzeugung eines neuen Schlüssels fehlgeschlagen.</translation>
     </message>
@@ -1323,27 +1206,27 @@ Adresse: %4</translation>
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Es wird ein neues Datenverzeichnis angelegt.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>Name</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Verzeichnis existiert bereits. Fügen Sie %1 an, wenn Sie beabsichtigen hier ein neues Verzeichnis anzulegen.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Pfad existiert bereits und ist kein Verzeichnis.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Datenverzeichnis kann hier nicht angelegt werden.</translation>
     </message>
@@ -1351,72 +1234,68 @@ Adresse: %4</translation>
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Kommandozeilenoptionen</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>Version</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-Bit)</translation>
+        <translation>(%1-Bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Über Dash Core</translation>
+        <translation>Über Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Kommandozeilenoptionen</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Benutzung:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>Kommandozeilenoptionen</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>UI-Optionen</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Datenverzeichnis beim Starten auswählen (Standard: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Sprache festlegen, z.B. &quot;de_DE&quot; (Standard: Systemstandard)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Minimiert starten</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>SSL-Wurzelzertifikate für Zahlungsanforderungen festlegen (Standard: Systemstandard)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Startbildschirm beim Starten anzeigen (Standard: 1)</translation>
     </message>
@@ -1424,107 +1303,85 @@ Adresse: %4</translation>
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Willkommen</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Willkommen zu Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Da dies das erste Mal ist, dass Sie Dash Core starten, legen Sie jetzt bitte fest, an welchem Ort die Daten gespeichert werden sollen.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core wird jetzt die Blockchain laden und lokal speichern. Dafür sind mindestens %1GB freier Speicherplatz erforderlich. Der Speicherbedarf wird mit der Zeit anwachsen. Das Wallet wird ebenfalls in diesem Verzeichnis gespeichert.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Standard-Datenverzeichnis verwenden</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Ein benutzerdefiniertes Datenverzeichnis verwenden:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Fehler: Angegebenes Datenverzeichnis &quot;%1&quot; kann nicht angelegt werden.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Fehler: Angegebenes Datenverzeichnis &quot;%1&quot; kann nicht angelegt werden.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Fehler</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB freier Speicherplatz verfügbar</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB freier Speicherplatz verfügbar</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(von benötigten %1GB)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(von benötigten %1 GB)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>URI öffnen</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Zahlungsanforderung über URI oder aus Datei öffnen</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Zahlungsanforderungsdatei auswählen</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Zu öffnende Zahlungsanforderungsdatei auswählen</translation>
     </message>
@@ -1532,313 +1389,281 @@ Adresse: %4</translation>
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Konfiguration</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Allgemein</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Dash nach der Anmeldung am System automatisch starten.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Starte Dash automatisch nach Systemanmeldung</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Größe des &amp;Datenbankcaches</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Anzahl an Skript-&amp;Verifizierungs-Threads</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = automatisch, &lt;0 = so viele Kerne frei lassen)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Diese Einstellung setzt fest, durch wie viele Masternodes ein Input anonymisiert wird. Eine höhere Anzahl bedeutet höhere Anonymität, verursacht allerdings auch höhere Gebühren.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Darksend Runden</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Beim Erreichen dieses Betrages wird Darksend ausgeschaltet.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Anzahl anonymisierter Dash</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>W&amp;allet</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Eingehende Verbindungen annehmen</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Eingehende Verbindungen erlauben</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Über einen SOCKS5-Proxy mit dem Dash-Netzwerk verbinden.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Optionale Transaktionsgebühr pro kB, die sicherstellt, dass ihre Transaktionen schnell bearbeitet werden. Die meisten Transaktionen sind 1 kB groß.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Transaktions&amp;gebühr bezahlen</translation>
+        <translation>Über einen SOCKS5-Proxy &amp;verbinden (Standardproxy):</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Erweiterte Wallet-Optionen</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Legt fest, ob die &quot;Coin Control&quot;-Funktionen angezeigt werden.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>&quot;&amp;Coin Control&quot;-Funktionen aktivieren</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Wenn Sie das Ausgeben von unbestätigtem Wechselgeld deaktivieren, kann das Wechselgeld einer Transaktion nicht verwendet werden, bis es mindestens eine Bestätigung erhalten hat. Dies wirkt sich auf die Berechnung des Kontostands aus.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Unbestätigtes Wechselgeld darf ausgegeben werden</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Netzwerk</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Automatisch den Dash-Clientport auf dem Router öffnen. Dies funktioniert nur, wenn Ihr Router UPnP unterstützt und dies aktiviert ist.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Portweiterleitung via &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Über einen SOCKS5-Proxy mit dem Dash-Netzwerk verbinden.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">Über einen SOCKS-Proxy &amp;verbinden (Standardproxy):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy-&amp;IP:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-Adresse des Proxies (z.B. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Port:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port des Proxies (z.B. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">SOCKS-&amp;Version:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">SOCKS-Version des Proxies (z.B. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Programmfenster</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Nur ein Symbol im Infobereich anzeigen, nachdem das Programmfenster minimiert wurde.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>In den Infobereich anstatt in die Taskleiste &amp;minimieren</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimiert die Anwendung anstatt sie zu beenden wenn das Fenster geschlossen wird. Wenn dies aktiviert ist, müssen Sie das Programm über &quot;Beenden&quot; im Menü schließen.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>Beim Schließen m&amp;inimieren</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>Anzei&amp;ge</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Sprache der Benutzeroberfläche:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>Legt die Sprache der Benutzeroberfläche fest. Diese Einstellung wird erst nach einem Neustart von Dash aktiv.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Fehlt eine Sprache oder ist unvollständig übersetzt? Hier können Sie helfen:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Design/Thema der Benutzeroberfläche:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Einheit der Beträge:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Wählen Sie die standardmäßige Untereinheit, die in der Benutzeroberfläche und beim Überweisen von Dash angezeigt werden soll.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Zeige Dash Adressen in der Transaktionsliste.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">Adressen im Transaktionsverlauf &amp;anzeigen</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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>Externe URLs (z.B. ein Block-Explorer), die im Kontextmenü des Transaktionsverlaufs eingefügt werden. In der URL wird %s durch den Transaktionshash ersetzt. Bei Angabe mehrerer URLs müssen diese durch &quot;|&quot; voneinander getrennt werden.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>Externe Transaktions-URLs</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Aktive Kommandozeilenoptionen, die obige Konfiguration überschreiben:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Setzt die Clientkonfiguration auf Standardwerte zurück.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>Konfiguration &amp;zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>A&amp;bbrechen</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>Standard</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>keine</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Zurücksetzen der Konfiguration bestätigen</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Clientneustart nötig, um die Änderungen zu aktivieren.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Client wird beendet, wollen Sie fortfahren?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Diese Änderung würde einen Clientneustart benötigen.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Die eingegebene Proxyadresse ist ungültig.</translation>
     </message>
@@ -1846,368 +1671,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Formular</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Wallet</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>Die angezeigten Informationen sind möglicherweise nicht mehr aktuell. Ihre Wallet wird automatisch synchronisiert, nachdem eine Verbindung zum Dash-Netzwerk hergestellt wurde. Dieser Prozess ist jedoch derzeit noch nicht abgeschlossen.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Verfügbar:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Ihr aktuell verfügbarer Kontostand</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Ausstehend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Betrag aus unbestätigten Transaktionen, der noch nicht im aktuell verfügbaren Kontostand enthalten ist</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Unreif:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Erarbeiteter Betrag der noch nicht gereift ist</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontostände</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Unbestätigte Transaktionen  zu beobachteten Adressen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Erarbeiteter Betrag der beobachteten Adressen der noch nicht gereift ist</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Gesamtbetrag:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Aktueller Gesamtbetrag aus obigen Kategorien</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Kontostand der beobachteten Adressen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Beobachtet:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Aktueller Kontostand der beobachteten Adressen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Verfügbar:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Status:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Aktiviert/Deaktiviert</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Vollendet:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Darksend Kontostand:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Betrag und Runden:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Runden</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Gesendete Stückelung des Betrages:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Die gestückelten Beträge, die Sie zu dem Masternode gesendet haben. Zum Erfolgreichen Mixen müssen andere Benutzer exakt gleich gestückelte Beträge senden.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>k.A.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Letzte Transaktionen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Starte/Stoppe das Mixen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Die gestückelten Beträge, die Sie zu dem Masternode gesendet haben.&lt;br&gt; Zum Erfolgreichen Mixen müssen andere Benutzer exakt gleich gestückelte Beträge senden.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Letzte Nachricht)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Versuche eine Darksendanfrage manuell abzusetzen.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Versuche zu Mixen</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Aktuellen Darksend Status zurücksetzen (wenn der Prozess des Mixens bereits begonnen hat kann es passieren, dass Darksend unterbrochen wird. Bereits gezahlte Gebühren werden einbehalten!) </translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Zurücksetzen</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Letzte Transaktionen&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>nicht synchron</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Deaktiviert</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Starte Darksend Mixen</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Stoppe Darksend Mixen</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Keine Inputs gefunden</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Runde</numerusform><numerusform>%n Runden</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Unbestätigte für Darksend vorbereitete Ausgabebeträge  gefunden, warte bis sie bestätigt sind bevor neu berechnet wird.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Runden</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Aktiviert</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>Fortschritt: %1% (Inputs haben durchschnittlich %2 von %n Runde)</numerusform><numerusform>Fortschritt: %1% (Inputs haben durchschnittlich %2 von %n Runden)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Genug kompatible Inputs zum Anonymisieren von %1 gefunden</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Nicht genug kompatible Inputs zum Anonymisieren von &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt; gefunden,&lt;br/&gt;&lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; wird stattdessen anonymisiert</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Aktiviert</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Letzter Darksend Status:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend ist untätig.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>Am Mixen...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Darksend-Anfrage vollständig: Ihre Transaktion wurde im Pool akzeptiert!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Folgende Einträge wurden an Masternode gesendet:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">An Masternode gesendet, warte auf weitere Einträge...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Genug Partner gefunden, signiere ... </translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Genug Partner gefunden, signiere ... ( warte . )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Genug Partner gefunden, signiere ... ( warte .. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Genug Partner gefunden, signiere ... ( warte ... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Übertrage fertige Transaktion.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Füge Transaktion zusammen.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Darksend-Anfrage unvollständig:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Versuche erneut...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Darksend-Anfrage vollständig:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation>An Masternode übermittelt, wartet in Warteschlange .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation>An Masternode übermittelt, wartet in Warteschlange ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation>An Masternode übermittelt, wartet in Warteschlange ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Unbekannter Status:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>k.A.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend wurde erfolgreich zurückgesetzt.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Zur Benutzung von Darksend benötigt man mindestens %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Das Wallet ist gesperrt und der Benutzer hat abgelehnt, es zu entsperren. Darksend wird deaktiviert.</translation>
     </message>
@@ -2215,141 +1946,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Fehlerhafte Zahlungsanforderung</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Dash kann nicht gestartet werden: click-to-pay handler</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Netzwerkmanager-Warnung</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Ihr aktiver Proxy unterstützt kein SOCKS5, dies wird jedoch für Zahlungsanforderungen über einen Proxy benötigt.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>URI-Verarbeitung</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Abruf-URL der Zahlungsanforderung ist ungültig: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">URI konnte nicht erfolgreich verarbeitet werden. Höchstwahrscheinlich ist dies entweder keine gültige Dash-Adresse oder die URI-Parameter sind falsch gesetzt. </translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Zahlungsanforderungsdatei-Verarbeitung</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Zahlungsanforderungsdatei kann nicht gelesen oder verarbeitet werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Ungültige Zahlungsadresse %1</translation>
+        <translation>Ungültige Zahlungsadresse %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>URI konnte nicht erfolgreich verarbeitet werden. Höchstwahrscheinlich ist dies entweder keine gültige Dash-Adresse oder die URI-Parameter sind falsch gesetzt. </translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zahlungsanforderungsdatei kann nicht gelesen werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Zahlungsanforderung abgelehnt</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Netzwerk der Zahlungsanforderung passt nicht zum Client-Netzwerk.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zahlungsanforderung ist abgelaufen</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zahlungsanforderung ist nicht initialisiert.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Unverifizierte Zahlungsanforderungen an benutzerdefinierte Zahlungsskripte werden nicht unterstützt.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Angeforderter Zahlungsbetrag in Höhe von %1 ist zu niedrig und wurde als &quot;Dust&quot; eingestuft.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Rücküberweisung von %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Zahlungsanforderung %1 ist zu groß (%2 Bytes, erlaubt sind %3 Bytes).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Überlastungs-Schutz Zahlungsanforderung</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Kommunikationsfehler mit %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Zahlungsanforderung kann nicht analysiert oder verarbeitet werden!</translation>
+        <translation>Zahlungsanforderung kann nicht analysiert werden!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Fehlerhafte Antwort vom Server: %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>fehlerhafte Netzwerkanfrage</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Zahlung bestätigt</translation>
     </message>
@@ -2357,140 +2068,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Adresse/Rechnername</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Benutzerprogramm</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Ping-Antwort-Zeit</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Fehler: Angegebenes Datenverzeichnis &quot;%1&quot; existiert nicht.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Fehler: Konfigurationsdatei kann nicht analysiert werden: %1. Bitte nur &quot;Schlüssel=Wert&quot;-Syntax verwenden.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Fehler beim Lesen der Masternode-Konfigurations-Datei: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Fehler: Ungültige Kombination von -regtest und -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core wurde noch nicht sicher beendet.</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Dash-Adresse eingeben.
-(z.B. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Betrag</translation>
+        <translation>Betrag</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash-Adresse eingeben (z.B. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 T</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 St.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 Min.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1  S</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>NETZWERK</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>UNBEKANNT</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Keine</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">k.A.</translation>
+        <translation>k.A.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 Ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>Grafik &amp;speichern...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>Grafik &amp;kopieren</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>QR-Code speichern</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>PNG-Grafik (*.png)</translation>
     </message>
@@ -2498,436 +2167,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Werkzeuge</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Anzahl Masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Allgemein</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Name</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Clientname</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>k.A.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Anzahl Verbindungen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Öffnet die Dash-Debugprotokolldatei aus dem aktuellen Datenverzeichnis. Dies kann bei großen Protokolldateien einige Sekunden dauern.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Öffnen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Startzeit</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Netzwerk</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Letzte Blockzeit</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Debugprotokolldatei</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Verwendete OpenSSL-Version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Erstellungsdatum</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Aktuelle Anzahl Blöcke</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Clientversion</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Verwendete BerkeleyDB-Version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Blockkette</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsole</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Konsole zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Netzwerkauslastung</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Summen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Empfangen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Überwiesen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Gegenstellen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Gegenstelle auswählen, um Detailinformationen zu sehen.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Richtung</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Benutzerprogramm</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Dienste</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Ausgangs-Blocknummer</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Synchronisierte Blocknummer</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Ausschluss-Punktzahl</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Verbindungszeit</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Letzte Überweisung</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Letzter Empfang</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes gesendet:</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes empfangen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Ping-Antwort-Zeit</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Wallet-Reparatur</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Wallet Datenwiederherstellungen</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Dateien der Blockkette erneut durchsuchen</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Transaktion wiederherstellen 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Transaktion wiederherstellen 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Wallet-Format aktualisieren</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Diese Buttons starten die Wallet mit Kommandozeilen-Parametern zur Reparatur von etwaigen  Fehlern.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: versucht private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Blockkette erneut nach fehlenden Wallet-Transaktionen durchsuchen</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Transaktion wiederherstellen (Metadaten, z.B. Kontoinhaber, behalten)</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Transaktion wiederherstellen (Metadaten verwerfen)</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>Wallet-Format aktualisieren. (dies ist KEINE Aktualisierung des Wallet)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Optionen zur Wallet-Reparatur.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Index neu aufbauen</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Blockkettenindex aus aktuellen Dateien blk000??.dat wieder aufbauen</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>eingehend:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>ausgehend:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Willkommen in der Dash RPC-Console.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Pfeiltaste hoch und runter, um den Verlauf durchzublättern und &lt;b&gt;Strg-L&lt;/b&gt;, um die Konsole zurückzusetzen.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Bitte &lt;b&gt;help&lt;/b&gt; eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>über %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>niemals</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Eingehend</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Ausgehend</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Unbekannt</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation>Am Abrufen...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Eine der bereits verwendeten Empfangsadressen wiederverwenden. Addressen wiederzuverwenden birgt Sicherheits- und Datenschutzrisiken. Außer zum Neuerstellen einer bereits erzeugten Zahlungsanforderung sollten Sie dies nicht nutzen.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>Vorhandene Empfangsadresse &amp;wiederverwenden (nicht empfohlen)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Eine optionale Nachricht, die an die Zahlungsanforderung angehängt wird. Sie wird angezeigt, wenn die Anforderung geöffnet wird. Hinweis: Diese Nachricht wird nicht mit der Zahlung über das Dash-Netzwerk gesendet.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Eine optionale Nachricht, die an die Zahlungsanforderung angehängt wird. Sie wird angezeigt, wenn die Anforderung geöffnet wird. Hinweis: Diese Nachricht wird nicht mit der Zahlung über das Dash-Netzwerk gesendet.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Nachricht:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Eine optionale Bezeichnung, die der neuen Empfangsadresse zugeordnet wird.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Verwenden Sie dieses Formular, um Zahlungen anzufordern. Alle Felder sind &lt;b&gt;optional&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Bezeichnung:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Ein optional angeforderte Betrag. Lassen Sie dieses Feld leer oder setzen Sie es auf 0, um keinen spezifischen Betrag anzufordern.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Betrag:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Zahlung anfordern</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Alle Formularfelder zurücksetzen.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Verlauf der angeforderten Zahlungen</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Ausgewählte Zahlungsanforderungen anzeigen (entspricht einem Doppelklick auf einen Eintrag)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Anzeigen</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Ausgewählte Einträge aus der Liste entfernen</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Entfernen</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Bezeichnung kopieren</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Nachricht kopieren</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Betrag kopieren</translation>
     </message>
@@ -2935,67 +2663,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR-Code</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>&amp;URI kopieren</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>&amp;Addresse kopieren</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>Grafik &amp;speichern...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Zahlung anfordern an %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Zahlungsinformationen</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Betrag</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Nachricht</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Resultierende URI ist zu lang, bitte den Text für Bezeichnung/Nachricht kürzen.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Beim Enkodieren der URI in den QR-Code ist ein Fehler aufgetreten.</translation>
     </message>
@@ -3003,37 +2731,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Datum</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Nachricht</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Betrag</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(keine Bezeichnung)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(keine Nachricht)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(kein Betrag)</translation>
     </message>
@@ -3041,413 +2769,397 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Dash überweisen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>&quot;Coin Control&quot;-Funktionen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Inputs...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>automatisch ausgewählt</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Unzureichender Kontostand!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Anzahl:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Byte:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Betrag:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Priorität:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>mittel</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Gebühr:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Zu geringer Ausgabebetrag:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>&quot;Dust&quot;</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>nein</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Abzüglich Gebühr:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Wechselgeld:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Wenn dies aktivert, und die Wechselgeld-Adresse leer oder ungültig ist, wird das Wechselgeld einer neu erzeugten Adresse gutgeschrieben.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Benutzerdefinierte Wechselgeld-Adresse</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Transaktionsgebühr:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Auswählen...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Gebühreneinstellungen reduzieren</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimieren</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren, während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>pro Kilobyte</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren, während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>mindestens</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Nur die minimalen Gebühren zu zahlen ist völlig ausreichend so lange in einem neuen Block der Blockkette noch genug Platz für neue Transaktionen ist. Bitte beachten Sie dass wenn dies in der Zukunft nicht mehr der Fall sein sollte Ihre Transaktion eventuell niemals in einen neuen Block aufgenommen werden wird, also niemals bestätigt wird.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Kurzinfo lesen)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Empfohlen:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Benutzerdefiniert:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(&quot;Intelligente&quot; Gebühren sind noch nicht initialisiert. Dies dauert normalerweise ein paar Blöcke...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Bestätigungszeit:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normal</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>schnell</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Wenn möglich als gebührenfreie Transaktion versenden</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Bestätigung könnte länger dauern)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Überweisung bestätigen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Überweisen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Alle Formularfelder zurücksetzen.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>An mehrere Empfänger auf einmal überweisen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Empfänger &amp;hinzufügen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Kontostand:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Anzahl kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Betrag kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Gebühr kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Abzüglich Gebühr kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Byte kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Priorität kopieren</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Zu geringen Ausgabebetrag kopieren</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>&quot;Dust&quot; Betrag kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Wechselgeld kopieren</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>mittels</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>anonymisierte Coins</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(Darksend verlangt, dass dieser Betrag auf den nächsten %1 aufgerundet wird)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>beliebiger verfügbarer Coins (nicht empfohlen)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>und InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 an %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Wollen Sie die Überweisung ausführen?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>werden als Transaktionsgebühr hinzugefügt</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Gesamtbetrag %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>oder</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Überweisung bestätigen</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Zahlungsanforderung abgelaufen</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Gebühren %1 x höher als %2 pro Kilobyte sind wahnsinnig überhöht.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Ungültige Zahlungsadresse %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Geschätzter Beginn der Bestätigung in %n Block.</numerusform><numerusform>Geschätzter Beginn der Bestätigung in %n Blocks.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Der zu zahlende Betrag muss größer als 0 sein.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Der angegebene Betrag übersteigt ihren Kontostand.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 ihren Kontostand.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Doppelte Zahlungsadresse gefunden, pro Überweisung kann an jede Adresse nur einmalig etwas überwiesen werden.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Transaktionserstellung fehlgeschlagen!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Die Transaktion wurde abgelehnt! 
 Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie ihrer wallet.dat nutzten und die Dash dort ausgegeben haben. Diese Ausgaben sind in diesem Fall in der derzeit aktiven Wallet nicht vermerkt.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Fehler: das Wallet wurde nur zum Anonymisieren entsperrt.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Nur die minimalen Gebühren von %1 zahlen</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Warnung: ungültige Dash-Adresse</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Warnung: Unbekannte Wechselgeld-Adresse</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(keine Bezeichnung)</translation>
     </message>
@@ -3455,102 +3167,98 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Dies ist eine normale Überweisung.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>E&amp;mpfänger:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Die Adresse an die die Zahlung überwiesen werden soll (z.B. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg).</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash-Adresse, an die überwiesen werden soll</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Bereits verwendete Adresse auswählen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Adresse aus der Zwischenablage einfügen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Diesen Eintrag entfernen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Bezeichnung:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Adressbezeichnung eingeben, die dann zusammen mit der Adresse der Liste bereits verwendeter Adressen hinzugefügt wird.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>Betra&amp;g:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Nachricht:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Eine an die &quot;dash:&quot;-URI angefügte Nachricht, die zusammen mit der Transaktion gespeichert wird. Hinweis: Diese Nachricht wird nicht über das Dash-Netzwerk gesendet.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Dies is eine unverifizierte Zahlungsanforderung.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Empfänger:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Memo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Dies is eine verifizierte Zahlungsanforderung.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Adressbezeichnung eingeben (diese wird zusammen mit der Adresse dem Adressbuch hinzugefügt)</translation>
     </message>
@@ -3558,12 +3266,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash-Core wird herunter gefahren...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Fahren Sie den Computer nicht herunter, bevor dieses Fenster verschwindet.</translation>
     </message>
@@ -3571,194 +3279,181 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Signaturen - eine Nachricht signieren / verifizieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>Nachricht &amp;signieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Sie können Nachrichten mit ihren Adressen signieren, um den Besitz dieser Adressen zu beweisen. Bitte nutzen Sie diese Funktion mit Vorsicht und nehmen Sie sich vor Phishingangriffen in Acht. Signieren Sie nur Nachrichten, mit denen Sie vollständig einverstanden sind.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Die Adresse mit der die Nachricht signiert wird (z.B. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg).</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash-Adresse, mit der die Nachricht signiert werden soll</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Bereits verwendete Adresse auswählen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Adresse aus der Zwischenablage einfügen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Zu signierende Nachricht hier eingeben</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Signatur</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Aktuelle Signatur in die Zwischenablage kopieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Die Nachricht signieren, um den Besitz dieser Dash-Adresse zu belegen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>&amp;Nachricht signieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Alle &quot;Nachricht signieren&quot;-Felder zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>Nachricht &amp;verifizieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Geben Sie die signierende Adresse, 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.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash-Adresse, mit der die Nachricht signiert worden ist</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Die Adresse mit der die Nachricht signiert wurde (z.B. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg).</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Die Nachricht verifizieren, um sicherzustellen, dass diese mit der angegebenen Dash-Adresse signiert wurde</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>&amp;Nachricht verifizieren</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Alle &quot;Nachricht verifizieren&quot;-Felder zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Auf &quot;Nachricht signieren&quot; klicken, um die Signatur zu erzeugen</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Dash-Adresse eingeben.
-(z.B. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Die eingegebene Adresse ist ungültig.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Wallet-Entsperrung wurde abgebrochen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Signierung der Nachricht fehlgeschlagen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Nachricht signiert.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Die Signatur konnte nicht dekodiert werden.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Die Signatur entspricht nicht dem &quot;Message Digest&quot;.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Verifikation der Nachricht fehlgeschlagen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Nachricht verifiziert.</translation>
     </message>
@@ -3766,27 +3461,27 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Version %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Die &quot;Bitcoin Core&quot;-Entwickler</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Die &quot;Dash Core&quot;-Entwickler</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[Testnetz]</translation>
     </message>
@@ -3794,7 +3489,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3802,254 +3497,245 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Geöffnet für %1 weiteren Block</numerusform>
-            <numerusform>Geöffnet für %n weitere Blöcke</numerusform>
-        </translation>
+        <translation><numerusform>Geöffnet für %n weiteren Block</numerusform><numerusform>Geöffnet für %n weitere Blöcke</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Offen bis %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>in Konflikt stehend</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/offline (Überprüft durch InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/bestätigt (Überprüft durch InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 Bestätigungen (Überprüft durch InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/unbestätigt</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 Bestätigungen</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/offline (Überprüfung durch InstantX - %2 von %3 Signaturen)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/bestätigt (Überprüfung durch InstantX - %2 von %3 Signaturen)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 Bestätigungen (Überprüfung durch InstantX - %2 von %3 Signaturen)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/offline (Überprüfung durch InstantX fehlgeschlagen)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/bestätigt (Überprüfung durch InstantX fehlgeschlagen)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Status</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, wurde noch nicht erfolgreich übertragen</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, über %n Knoten übertragen</numerusform>
-            <numerusform>, über %n Knoten übertragen</numerusform>
-        </translation>
+        <translation><numerusform>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Datum</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Quelle</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Erzeugt</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>Von</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>unbekannt</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>An</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>eigene Adresse</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>beobachtet</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Gutschrift</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>reift noch %n weiteren Block</numerusform>
-            <numerusform>reift noch %n weitere Blöcke</numerusform>
-        </translation>
+        <translation><numerusform>reift noch %n Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>nicht angenommen</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Belastung</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Gesamtbelastung</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Gesamtgutschrift</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Transaktionsgebühr</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Nettobetrag</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Nachricht</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Kommentar</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>Transaktions-ID</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Händler</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Erzeugte Dash müssen %1 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block erzeugten, wurde er an das Netzwerk übertragen, um ihn der Blockkette hinzuzufügen. Falls dies fehlschlägt wird der Status in &quot;nicht angenommen&quot; geändert und Sie werden keine Dash gutgeschrieben bekommen. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich erzeugt.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Debuginformationen</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transaktion</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Eingaben</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Betrag</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>wahr</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>falsch</translation>
     </message>
@@ -4057,12 +3743,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Transaktionsdetails</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation>
     </message>
@@ -4070,169 +3756,162 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Datum</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Betrag</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Geöffnet für %n weiteren Block</numerusform>
-            <numerusform>Geöffnet für %n weitere Blöcke</numerusform>
-        </translation>
+        <translation><numerusform>Geöffnet für %n weiteren Block</numerusform><numerusform>Geöffnet für %n weitere Blöcke</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Offen bis %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Offline</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Unbestätigt</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Wird bestätigt (%1 von %2 empfohlenen Bestätigungen)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Bestätigt (%1 Bestätigungen)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>in Konflikt stehend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Unreif (%1 Bestätigungen, wird verfügbar sein nach %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Dieser Block wurde von keinem anderen Knoten empfangen und wird wahrscheinlich nicht angenommen werden!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Erzeugt, jedoch nicht angenommen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Empfangen über</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Empfangen von</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>über/durch Darksend empfangen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Überwiesen an</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Eigenüberweisung</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Erarbeitet</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Stückelung</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Sicherheits-Zahlung</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Sicherheits-Eingänge machen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Stückelungs-Gebühr</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>beobachtet</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(k.A.)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Transaktionsstatus, fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Datum und Uhrzeit zu der die Transaktion empfangen wurde.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Art der Transaktion</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Zeigt ob eine beobachtete Adresse in dieser Transaktion beteiligt ist.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Zieladresse der Transaktion</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation>
     </message>
@@ -4240,207 +3919,208 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Alle</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Heute</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Diese Woche</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Diesen Monat</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Letzten Monat</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Dieses Jahr</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Zeitraum...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Gängigste</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Empfangen über</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Überwiesen an</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Sicherheits-Eingänge machen</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Stückelungs-Gebühr</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Stückelung</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Sicherheits-Zahlung</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Eigenüberweisung</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Erarbeitet</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Andere</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Zu suchende Adresse oder Bezeichnung eingeben</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Minimaler Betrag</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Adresse kopieren</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Bezeichnung kopieren</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Betrag kopieren</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Transaktions-ID kopieren</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Bezeichnung bearbeiten</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Transaktionsdetails anzeigen</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Transaktionsverlauf exportieren</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Kommagetrennte-Datei (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Bestätigt</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Beobachtet</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Datum</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Bezeichnung</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Betrag</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Exportieren fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Beim Speichern des Transaktionsverlaufs nach %1 ist ein Fehler aufgetreten.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Exportieren erfolgreich</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Speichern des Transaktionsverlaufs nach %1 war erfolgreich.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Zeitraum:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>bis</translation>
     </message>
@@ -4448,15 +4128,15 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Angezeigte Einheit. Anklicken, um andere Einheit zu wählen.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Es wurde keine Wallet geladen.</translation>
     </message>
@@ -4464,59 +4144,58 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Dash überweisen</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX unterstützt das Versenden von Beträgen dieser Höhe noch nicht. Transaktionen sind zur Zeit auf maximal %n DASH begrenzt.</numerusform>
-            <numerusform>InstantX unterstützt das Versenden von Beträgen dieser Höhe noch nicht. Transaktionen sind zur Zeit auf maximal %n DASH begrenzt.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX unterstützt das Versenden von Beträgen dieser Höhe noch nicht. Transaktionen sind zur Zeit auf maximal %n DASH begrenzt.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>E&amp;xportieren</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Wallet sichern</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Wallet-Daten (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Sicherung fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Beim Speichern der Wallet-Daten nach %1 ist ein Fehler aufgetreten.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Sicherung erfolgreich</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Speichern der Wallet-Daten nach %1 war erfolgreich.</translation>
     </message>
@@ -4524,1366 +4203,1429 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, Sie müssen ein rpcpasswort in dieser Konfigurationsdatei angeben:
-%s
-Es wird empfohlen das folgende Zufallspasswort zu verwenden:
-rpcuser=dashrpc
-rpcpassword=%s
-(Sie müssen sich dieses Passwort nicht merken!)
-Der Benutzername und das Passwort dürfen NICHT identisch sein.
-Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
-Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtigt zu werden;
-zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.com</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Zulässige Chiffren (Standard: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Beim Einrichten des RPC-Ports %u zum Abhören von IPv4 ist ein Fehler aufgetreten: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Beim Einrichten des RPC-Ports %u zum Abhören von IPv6 ist ein Fehler aufgetreten, es wird auf IPv4 zurückgegriffen: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>An die angegebene Adresse binden und immer abhören. Für IPv6 &quot;[Host]:Port&quot;-Schreibweise verwenden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Das Programm kann das Daten-Verzeichnis %s nicht als &quot;in Verwendung&quot; markieren. Wahrscheinlich läuft das Programm bereits.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Anzahl der freien Transaktionen auf &lt;n&gt; * 1000 Byte pro Minute begrenzen (Standard: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend benutzt exakt gestückelte Beträge zum Versenden, Sie müssen dafür möglicherweise noch mehr Dash anonymisieren.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Deaktiviere alle Masternode- und Darksend-spezifischen Funktionen (0-1, Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Aktiviere InstantX, zeige Bestätigungen für gesperrte Transaktionen an (bool, Standard: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Aktiviere Darksend automatisch (0-1, Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können. Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Regressionstest-Modus aktivieren, der eine spezielle Blockkette nutzt, in der Blöcke sofort gelöst werden können.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Fehler: Abhören nach eingehenden Verbindungen fehlgeschlagen (Fehler %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Fehler: Die Transaktion wurde abgelehnt! Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden. Beispielsweise weil Sie eine Kopie ihrer wallet.dat genutzt, die Bitcoins dort ausgegeben haben und dies daher in der derzeit aktiven Wallet nicht vermerkt ist.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Fehler: Diese Transaktion benötigt aufgrund ihres Betrags, ihrer Komplexität oder der Nutzung erst kürzlich erhaltener Zahlungen eine Transaktionsgebühr in Höhe von mindestens %s!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Fehler: das Wallet ist nur zum Anonymisieren entsperrt, erzeugen von Transaktionen nicht möglichen.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Befehl ausführen wenn ein relevanter Alarm empfangen wird oder wir einen wirklich langen Fork entdecken (%s im Befehl wird durch die Nachricht ersetzt)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die TxID ersetzt)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Befehl ausführen wenn der beste Block wechselt (%s im Befehl wird durch den Hash des Blocks ersetzt)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Niedrigere Gebühren als diese werden als gebührenfrei angesehen (bei der Transaktionserstellung) (Standard:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Unbestätigte für Darksend vorbereitete Ausgabebeträge gefunden, warte bis sie bestätigt sind bevor weitergemacht wird.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In diesem Modus legt -genproclimit fest, wie viele Blöcke sofort erzeugt werden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX benötigt Zahlungseingänge mit mindestens 6 Bestätigungen, warten Sie also ein paar Minuten und versuchen Sie es dann erneut.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>&lt;port&gt;nach JSON-RPC-Verbindungen abhören (Standard: 9998 oder Testnetz: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Name, um eine URL für den KeyPass-Eintrag zu erzeugen, der die Wallet-Passphrase speichert.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Debugginginformationen ausgeben (Standard: 0, &lt;category&gt; anzugeben ist optional)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Durch diese Einstellung können Sie dem Darksend-Netzwerk zusätzliche Liquidität zur Verfügung stellen in dem Sie von Zeit zu Zeit bereits anonymisierte Dash wieder dem Mixing-Prozess zuführen. (0-100) [0=aus, 1=sehr oft, 100=sehr selten] Voreinstellung: 0 </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Abfrage der Peer-Adressen über DNS, falls es wenige Adressen gibt (Standard: 1, außer wenn -connect konfiguriert wurde)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Setze externe Adresse und Port, um diesen Masternode zu erreichen (Beispiel: Adresse:Port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Maximale Größe in Byte von Transaktionen hoher Priorität/mit niedrigen Gebühren festlegen (Standard: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <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>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Legt ein Prozessor-/CPU-Kernlimit fest, wenn CPU-Mining aktiviert ist (-1 = unbegrenzt, Standard: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Anzahl Bestätigungen  für eine erfolgreich gesperrte Transaktion (0-9999, voreingestellt: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Dash Core den Prozess %s auf dem Computer nicht an sich binden. Wahrscheinlich läuft das Programm bereits.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Für diese Transaktion konnten nicht genug mit Darksend gestückelte Beträge gefunden werden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Für diese Transaktion konnten nicht genug nicht mit Darksend gestückelte Beträge gefunden werden, die ungleich 1000 DASH sind.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Für diese Transaktion konnten nicht genug nicht mit Darksend gestückelte Beträge gefunden werden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Warnung: -paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Warnung: Bitte überprüfen Sie die Datums- und Uhrzeiteinstellungen ihres Computers, da Dash ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Warnung: Das Netzwerk scheint nicht vollständig übereinzustimmen! Einige Miner scheinen Probleme zu haben.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Warnung: Wir scheinen nicht vollständig mit unseren Gegenstellen übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen ihre Client-Software aktualisieren.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Warnung: Lesen von wallet.dat fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Warnung: wallet.dat beschädigt, Datenrettung erfolgreich! Original wallet.dat wurde als wallet.{Zeitstempel}.dat in %s gespeichert. Falls ihr Kontostand oder Transaktionen nicht korrekt sind, sollten Sie dem vorangegangenen Zustand durch die Datensicherung wiederherstellen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Sie müssen den Wert rpcpassword=&lt;passwort&gt; in der Konfigurationsdatei angeben:
-%s
-Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Es muss ein Masternode-Geheimschlüssel (masternodeprivkey) in der Konfiguration angegeben werden. Für weitere Informationen siehe Dokumentation.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(Standard: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(Standard: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; kann sein:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Kommandozeilen- und JSON-RPC-Befehle annehmen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Mit dem angegebenen Knoten verbinden und versuchen die Verbindung aufrecht zu erhalten</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Erlaube DNS-Abfragen für -addnode, -seednode und -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>JSON-RPC-Verbindungen von der angegebenen IP-Adresse erlauben</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Haben diesen Eintrag bereits.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Peer-Adressen immer über DNS abfragen (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Versuchen, private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Blockerzeugungsoptionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Kann nicht zerstückeln: keine kompatiblen Eingänge übrig.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Wallet kann nicht auf eine ältere Version herabgestuft werden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Kann Adresse in -bind nicht auflösen: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Kann Adresse in -externalip nicht auflösen: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Standardadresse kann nicht geschrieben werden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Liste der Wallet-Transaktionen zurücksetzen (Diagnosetool; beinhaltet -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Sicherheitszahlung ist nicht gültig.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Sicherheitszahlung nicht gültig.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Mit nur dem oder den angegebenen Knoten verbinden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Über einen SOCKS-Proxy verbinden</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Mit JSON-RPC auf &lt;port&gt; verbinden (Standard: 9998 oder Testnetz: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Mit KeePassHttp auf &lt;port&gt; verbinden (Standard: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Mit dem angegebenen Knoten verbinden, um Adressen von Gegenstellen abzufragen, danach trennen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Verbindungsoptionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Beschädigte Blockdatenbank erkannt</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash-Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Dash-Core RPC-client Version</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend ist deaktiviert.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Darksend Optionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Debugging-/Testoptionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Sicherheitsmodus deaktivieren, übergeht ein echtes Sicherheitsmodusereignis (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Eigene IP-Adresse erkennen (Standard: 1, wenn abgehört wird und nicht -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Die Wallet nicht laden und Wallet-RPC-Aufrufe deaktivieren</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Möchten Sie die Blockdatenbank jetzt neu aufbauen?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Laden abgeschlossen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>Gehe auf ältere Version zurück und versuche es erneut.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Masternode-Modus aktivieren. (0=aus, 1=an; Voreinstellung: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Warteschlange ist voll.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Fehler bei der Verbindung zur Masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Fehler beim Initialisieren der Blockdatenbank</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Fehler beim Initialisieren der Wallet-Datenbankumgebung %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Fehler beim Laden der Blockdatenbank</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Fehler beim Laden von wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Fehler beim Laden von wallet.dat: Wallet beschädigt</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Fehler beim Laden von wallet.dat: Wallet benötigt neuere Version von Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Fehler beim Öffnen der Blockdatenbank</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Fehler beim Lesen der Datenbank, Anwendung wird heruntergefahren.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Fehler bei der Wiederherstellung des öffentlichen Schlüssels.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Fehler</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Fehler: Zu wenig freier Speicherplatz auf dem Datenträger!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Fehler: Wallet gesperrt, Transaktion kann nicht erstellt werden!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Fehler: Es sind bereits anstehende Einträge im Darksend-Pool</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Fehler: Systemfehler: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Fehler, es konnte kein Port abgehört werden. Wenn dies so gewünscht wird -listen=0 verwenden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Lesen der Blockinformationen fehlgeschlagen</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Lesen des Blocks fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Synchronisation des Blockindex fehlgeschlagen</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Wenn &lt;category&gt; nicht angegeben wird, jegliche Debugginginformationen ausgeben.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Schreiben des Blockindex fehlgeschlagen</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = Transaktions-Metadaten wie z.B. Kontoinhaber behalten, 2 = Metadaten verwerfen)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Schreiben der Blockinformationen fehlgeschlagen</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>JSON-RPC Verbindungen von einer bestimmten Quelle zulassen. Für &lt;ip&gt; sind einzelne IPs (z.B. 1.2.3.4), Netzwerk/Netzmasken (z.B. 1.2.3.4/255.255.255.0) oder Netzwerk/CIDR (z.B. 1.2.3.4/24) erlaubt. Diese Option kann mehrmals eingetragen werden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Schreiben des Blocks fehlgeschlagen</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Beim Einrichten der RPC-Adresse %s, Port %u zum Abhören von %s ist ein Fehler aufgetreten</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Schreiben der Dateiinformationen fehlgeschlagen</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>An die angegebene Adresse binden und Gegenstellen in die Liste der erlaubten Gegenstellen aufnehmen. Für IPv6 &quot;[Host]:Port&quot;-Schreibweise verwenden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Schreiben in die Münzendatenbank fehlgeschlagen</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Für JSON-RPC Verbindugen an die angegebene Adresse binden. Für IPv6 &quot;[Host]:Port&quot;-Schreibweise verwenden. Diese Option kann mehrmals eingetragen werden. (Standard: an alle verbinden)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Schreiben des Transaktionsindex fehlgeschlagen</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Wahlverhalten für Abschlussbudget ändern. mode=auto: nur wählen, wenn Abschlussbudget genau meinem generierten Budget entspricht. (Standard: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Schreiben der Rücksetzdaten fehlgeschlagen</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Anzahl der freien Transaktionen auf &lt;n&gt; * 1000 Byte pro Minute begrenzen (Standard: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Gebühr pro kB, die gesendeten Transaktionen hinzugefügt wird</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Neue Dateien mit den System-Standardberechtigungen (anstatt 077) erzeugen (nur bei deaktiviertem Wallet möglich)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Niedrigere Gebühren als diese werden als gebührenfrei angesehen (bei der Vermittlung) (Standard:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Lösche alle Wallet-Transaktionen stelle nur diese mittels -rescan beim nächsten Start des Wallets wieder her.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Sicherheitsmodus erzwingen (Standard: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Deaktiviere alle Masternode- und Darksend-spezifischen Funktionen (0-1, Standard: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Bitcoins erzeugen (Standard: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Unter MIT Software Lizenz zur Verfügung gestellt, siehe beigefügte Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Hilfe zu einem Befehl erhalten</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Aktiviere InstantX, zeige Bestätigungen für gesperrte Transaktionen an (bool, Standard: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Wieviele Blöcke beim Starten geprüft werden sollen (Standard: 288, 0 = alle)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Aktiviere Darksend automatisch (0-1, Standard: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Wenn &lt;category&gt; nicht angegeben wird, jegliche Debugginginformationen ausgeben.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Fehler: Parameter -socks wird nicht mehr unterstützt. Setzen der SOCKS-Version ist nicht mehr möglich, es werden nur noch SOCKS5 Proxies unterstützt.</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Niedrigere Gebühren (in DASH pro Kb) als diese werden bei der Vermittlung als gebührenfrei angesehen (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Niedrigere Gebühren (in DASH pro Kb) als diese werden bei der Transaktionserzeugung als gebührenfrei angesehen (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Falls paytxfee  nicht gesetzt wurde automatisch genug Transaktionsgebühren hinzufügen, um die Transaktion durchschnittlich innerhalb n Blöcken zu bestätigen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Ungültiger Betrag für -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (Betrag muss mindestens minrelay von %s Gebühren sein um &quot;hängende&quot; Transaktionen zu vermeiden)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Einen vollständigen Transaktionsindex für den getrawtransaction RPC-Aufruf führen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maximale Datengröße für von uns weitergegebenen Übermittlungstransaktionen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Maximale Gesamtgebühren für eine einzelne Transaktion.  Sind diese Gebühren zu gering könnten große Transaktionen evtl. abgebrochen werden (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Anzahl Sekunden, während denen sich nicht konform verhaltenden Gegenstellen die Wiederverbindung verweigert wird (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Debugging-Informationen ausgeben (Standard: %u, &lt;category&gt; anzugeben ist optional)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Durch diese Einstellung können Sie dem Darksend-Netzwerk zusätzliche Liquidität zur Verfügung stellen in dem Sie von Zeit zu Zeit bereits anonymisierte Dash wieder dem Mixing-Prozess zuführen. (0-100, 0=aus, 1=sehr oft, 100=sehr selten (wenig Gebühren). Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Verlange hohe Priorität für die Vermittlung von kostenlosen oder mit niedrigen Gebühren versehenen Transaktionen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Legt ein Prozessor-/CPU-Kernlimit fest, wenn CPU-Mining aktiviert ist (-1 = unbegrenzt, Standard: %d)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Anzahl Bestätigungen  für eine erfolgreich gesperrte Transaktion (0-9999, voreingestellt: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Dieses Produkt enthält vom OpenSSL-Projekt entwickelte Software zur Benutzung des OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, kryptographische Software geschrieben von Eric Young und UPnP Software geschrieben von Thomas Bernard.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>Um dashd (oder dash-qt mit dem -server Parameter) zu benutzen müssen Sie ein rpcpasswort in dieser Konfigurationsdatei angeben:
+%s
+Es wird empfohlen das folgende Zufallspasswort zu verwenden:
+rpcuser=dashrpc
+rpcpassword=%s
+(Sie müssen sich dieses Passwort nicht merken!)
+Der Benutzername und das Passwort dürfen NICHT identisch sein.
+Falls die Konfigurationsdatei nicht existiert, erzeugen Sie diese bitte mit Leserechten nur für den Dateibesitzer.
+Es wird ebenfalls empfohlen alertnotify anzugeben, um im Problemfall benachrichtigt zu werden;
+zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.com</translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Warnung: -maxtxfee ist auf einen sehr hohen Wert gesetzt! Diese Gebühr könnte schon beim Senden einer einzelnen Transaktion fällig werden.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Warnung: Bitte überprüfen Sie die Datums- und Uhrzeiteinstellungen ihres Computers, da Dash Core ansonsten nicht ordnungsgemäß funktionieren wird!</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Erlaube Gegenstellen mit dieser Netzmaske oder IP-Adresse. Diese Option kann mehrmals eingetragen werden.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Erlaubte Gegenstellen können nicht wegen DoS ausgeschlossen werden und ihre Transaktionen werden immer weitergeleitet, sogar wenn sie schon im Memory-Pool sind. Dies ist z.B. für Gateways nützlich.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; kann sein:
+</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Akzeptiere öffentliche REST-Anforderungen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Akzeptierte Verschlüsselungen (Standard: %s) </translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Peer-Adressen immer über DNS abfragen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Kann Adresse via -whitebind nicht auflösen: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Über einen SOCKS5-Proxy verbinden</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Mit KeePassHttp auf &lt;port&gt; verbinden (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Die &quot;Bitcoin Core&quot;-Entwickler</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i Die &quot;Dash Core&quot;-Entwickler</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>-rpcbind Wert %s konnte nicht als Netzwerkadresse erkannt werden</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend ist untätig.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Darksend-Anfrage vollständig:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Darksend-Anfrage unvollständig:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Sicherheitsmodus deaktivieren, überschreibt ein echtes Sicherheitsmodusereignis (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Masternode-Modus aktivieren. (0=aus, 1=an; Voreinstellung: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Fehler bei der Verbindung zum Masternode.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Fehler beim Laden von wallet.dat: Wallet benötigt neuere Version von Dash Core</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Fehler: ein interner Fehler ist aufgetreten, Details sind in der Datei debug.log</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Fehler: Paramter -tor wird nicht unterstützt, bitte -onion benutzen.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Gebühren (in DASH pro Kb), die gesendeten Transaktionen hinzugefügt werden (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Füge Transaktion zusammen.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Sicherheitsmodus erzwingen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Genug Partner gefunden, signiere ( warte %s )</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Genug Partner gefunden, signiere ... </translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Coins erzeugen (Standard: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Masternodes mit einer Version welche älter ist als X ignorieren (z.B. Version 70050, Voreinstellung: 0)</translation>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Wieviele Blöcke beim Starten geprüft werden sollen (Standard: %u, 0 = alle)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Masternodes mit einer Version welche älter ist als X ignorieren (z.B. Version 70050, Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importiere...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Blöcke aus externer Datei blk000??.dat importieren</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>IP-Adressen in die Debug-Ausgabe mit aufnehmen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Inkompatibler Modus.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Inkompatible Version.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Fehlerhafter oder kein Genesis-Block gefunden. Falsches Datenverzeichnis für das Netzwerk?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Hinweis</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Fehler beim Initialisieren (Plausibilitätsprüfung fehlgeschlagen).
 Dash Core wird heruntergefahren.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Eintrag ist nicht gültig.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>InstantX Optionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Unzureichender Kontostand</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Unzureichender Kontostand.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Ungültige &quot;-onion&quot;-Adresse: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Ungültige Adresse in -proxy: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Ungültiger Betrag für -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Ungültiger Betrag für -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Ungültiger Betrag für -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos; (Betrag muss mindestens %s sein)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Ungültiger Betrag</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Die letzte erfolgreiche Darksend-Transaktion ist noch zu neu.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Größe des Signaturcaches auf &lt;n&gt; Einträge begrenzen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>&lt;port&gt;nach JSON-RPC-Verbindungen abhören (Standard: %u oder Testnetz: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>&lt;port&gt; nach Verbindungen abhören (Standard: %u oder Testnetz: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Masternodes über Masternode-Konfiguration sperren (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximale Größe des Empfangspuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maximale Größe des Sendepuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Am Mixen...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Für -whitebind muss eine Portnummer angegeben werden: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Keine Masternodes gefunden.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Kein kompatibler Masternode gefunden.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Nicht in der Masternode-Liste.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Anzahl automatischer Wallet-Sicherungskopien (Standard: 10)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Blockkette nur als gültig ansehen, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Verbinde nur zu Knoten des Netztyps &lt;net&gt; (ipv4, ipv6 oder onion)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Einen Thread starten, der periodisch die Wallet auf den Datenträger sichert (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Wenn möglich als gebührenfreie Transaktion versenden (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Datei mit Serverzertifikat (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Privater Serverschlüssel (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Zeitüberschreitung der Sitzung, bitte erneut abschicken.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Minimale Blockgröße in Bytes festlegen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>DB_PRIVATE-Flag in der Wallet-Datenbankumgebung setzen (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Konfigurationsdatei festlegen (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Verbindungzeitüberschreitung in Millisekunden festlegen (Minimum: 1, Standard: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Konfigurationsdatei der Masternode-Einstellungen angeben (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>pid-Datei angeben (Standard: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Unbestätigtes Wechselgeld beim Senden von Transaktionen ausgeben (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Nach dem Import von Blöcken von der Festplatte Programm beenden (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Folgende Einträge wurden an Masternode gesendet: %u / %d</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>An Masternode gesendet, warte auf weitere Einträge ( %u / %d ) %s</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>An Masternode übermittelt, wartet in Warteschlange %s</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>Dies ist kein Masternode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>&quot;KeePass 2&quot;-Integration mit KeePassHttp-plugin (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>N unterschiedliche Masternodes benutzen, um Dash zu anonymisieren (2-8, Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Die Wallet musste neu geschrieben werden. Bitte das Programm neu starten um den Vorgang abzuschließen</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Warnung: Veraltetes Argument -benchmark wird ignoriert, bitte -debug=bench verwenden.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Warnung: Veraltetes Argument -debugnet wird ignoriert, bitte -debug=net verwenden.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Versuche erneut...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Masternode-Geheimschlüssel (masternodeprivkey) ist ungültig. Siehe Dokumentation. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>Ungültige Netzmaske für -whitelist angegeben: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Fehlerhafter privater Schlüssel.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Invalides Zahlskript entdeckt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>&quot;KeePassHttp id&quot; für bestehende verknüpfte Verbindungen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>&quot;KeePassHttp key&quot; für die  AES-verschlüsselte Kommunikation mit &quot;KeePass&quot;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Betrag welcher anonymisiert vorgehalten wird. (Voreinstellung: 0)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Betrag welcher anonymisiert vorgehalten wird. (Voreinstellung: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Maximal &lt;n&gt; (noch) nicht einsortierte Blöcke zwischenspeichern (Voreinstellung: %u)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Maximal &lt;n&gt; (noch) nicht einsortierte Zahlungen zwischenspeichern (Voreinstellung: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>Letzte Darksend-Transaktion ist noch zu neu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Letzte erfolgreiche Darksend-Transaktion ist noch zu neu.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Größe des Signaturcaches auf &lt;n&gt; Einträge begrenzen (Standard: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Befehle auflisten</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>&lt;port&gt; nach Verbindungen abhören (Standard: 9999 oder Testnetz: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Lade Adressen...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Lade Blockindex...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode list...</source>
-        <translation>Lade Masternode-Liste...</translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Lade Budget-Cache...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Lade Masternode-Cache...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Lade Wallet... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Lade Wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Transaktionspriorität und Gebühr pro kB beim Erzeugen von Blöcken protokollieren (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Einen vollständigen Transaktionsindex führen (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Maximal &lt;n&gt; Verbindungen zu Gegenstellen aufrechterhalten (Standard: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Masternode Optionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>Warteschlange der Masternode ist voll.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maximale Größe des Empfangspuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maximale Größe des Sendepuffers pro Verbindung, &lt;n&gt; * 1000 Byte (Standard: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Fehlende Informationen zur Eingangs-Transaktion.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Keine kompatible Masternode gefunden.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>Kein Kapital gefunden, dass zerstückelt werden muss.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Kein Masternodes gefunden.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>Keine passende Zerstückelungen zum Mixen gefunden.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Vermittlungs-Optionen für Knoten:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>nicht Standard öffentlicher Schlüssel erkannt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Nicht kompatibel mit existierenden Transaktionen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Nicht genügend Datei-Deskriptoren verfügbar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Nicht in der Masternode-Liste.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Blockkette nur als gültig ansehen, wenn sie mit den integrierten Prüfpunkten übereinstimmt (Standard: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Verbinde nur zu Knoten des Netztyps &lt;net&gt; (IPv4, IPv6 oder Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Optionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Passwort für JSON-RPC-Verbindungen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Block beim Starten ausgeben, wenn dieser im Blockindex gefunden wurde.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Blockbaum beim Starten ausgeben (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL Optionen: (siehe Bitcoin Wiki für eine Installationsanleitung)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>RPC-Client-Optionen:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>RPC-Serveroptionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>RPC-Unterstützung für persistente HTTP-Verbindungen (default: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwerfen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwürfeln</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation>
+        <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wieder aufbauen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>&quot;Data Carrier&quot;-Transaktionen weiterleiten (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Nicht-P2SH-Multisig weiterleiten (Standard: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Blockkette erneut nach fehlenden Wallet-Transaktionen durchsuchen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Durchsuche erneut...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Einen Thread starten, der periodisch die Wallet sicher auf den Datenträger schreibt (Standard: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Als Hintergrunddienst ausführen und Befehle annehmen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL-Optionen (siehe Bitcoin-Wiki für SSL-Einrichtungssanweisungen):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>SOCKS-Version des Proxies wählen (4 oder 5, Standard: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Befehl an Dash Core senden</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Sende Befehle an Knoten &lt;ip&gt; (Standard: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <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>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serverzertifikat (Standard: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Privater Serverschlüssel (Standard: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Sitzung ist nicht vollständig!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Zeitüberschreitung der Sitzung (30 Sekunden), bitte erneut abschicken.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <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>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Maximale Blockgröße in Byte festlegen (Standard: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Minimale Blockgröße in Byte festlegen (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Privaten Masternode-Schlüssel setzen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Maximale Anzahl an Threads zur Verarbeitung von RPC-Anfragen festlegen (Standard: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>DB_PRIVATE-Flag in der Wallet-Datenbankumgebung setzen (Standard: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Zeige alle Debuggingoptionen (Benutzung: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Zeige Benchmarkinformationen (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Protokolldatei debug.log beim Starten des Clients kürzen (Standard: 1, wenn kein -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Signierung fehlgeschalgen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>Zeitüberschreitung der Signierung, bitte erneut abschicken.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Signierung der Transaktion fehlgeschlagen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Konfigurationsdatei festlegen (Standard: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Verbindungzeitüberschreitung in Millisekunden festlegen (Standard: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Datenverzeichnis festlegen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Konfigurationsdatei der Masternode-Einstellungen angeben (Standart: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>pid-Datei angeben (Standard: dash.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Wallet-Datei angeben (innerhalb des Datenverzeichnisses)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Die eigene öffentliche Adresse angeben</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Unbestätigtes Wechselgeld beim Senden von Transaktionen ausgeben (Standard: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Dash Core starten</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Systemfehler: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Dieser Hilfetext</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Das ist keine Masternode.</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Dies ist experimentelle Software.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Zur Nutzung der %s-Option</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Dies ist für Regressionstest-Tools und Anwendungsentwicklung gedacht.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Transaktionsbetrag zu niedrig</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Transaktionsbeträge müssen positiv sein</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transaktion erfolgreich erstellt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Transaktionsgebühren sind zu hoch.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Transaktion ungültig.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transaktion ist für die Gebührenrichtlinie zu groß</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transaktion zu groß</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler: %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Übertrage fertige Transaktion.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Die Zahlung an den Gewinner der Masternode-Runde konnte nicht signiert werden. Wurde der Key falsch gesetzt?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Kann auf diesem Computer nicht an %s binden (von bind zurückgegebener Fehler: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Die Spork-Nachricht konnte nicht signiert werden. Wurde der Key falsch gesetzt?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Unbekannte Proxyversion in -socks angefordert: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Unbekannter Netztyp in -onlynet angegeben: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Wallet auf das neueste Format aktualisieren</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Benutzung (veraltet, bitte Dash-cli verwenden):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Benutzung:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>&quot;KeePass 2&quot;-Integration mit KeePassHttp-plugin (Standard: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Unbekannter Status: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>N unterschiedliche Masternodes benutzen, um Dash zu anonymisieren (2-8, Standard: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Wallet auf das neueste Format aktualisieren</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>OpenSSL (https) für JSON-RPC-Verbindungen verwenden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Das Testnetz verwenden</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Benutzername für JSON-RPC-Verbindungen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Wert größer als der vom Darksend Pool maximal erlaubte.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Verifiziere Blöcke...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Verifiziere Wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Warten, bis der RPC-Server gestartet ist</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Wallet %s liegt außerhalb des Datenverzeichnisses %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Wallet gesperrt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Die Wallet musste neu geschrieben werden. Bitte das Programm neu starten um den Vorgang abzuschließen.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Wallet-Optionen:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Warnung</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Warnung: Veraltetes Argument -debugnet gefunden, bitte -debug=net verwenden</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Warnung: Diese Version is veraltet, Aktualisierung erforderlich!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Ihre Einträge wurden erfolgreich hinzugefügt.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>Ihre Transaktion wurde im Pool akzeptiert!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Lösche alle Transaktionen aus Wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>beim Starten</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>Version</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat beschädigt, Datenrettung fehlgeschlagen</translation>
     </message>
diff --git a/src/qt/locale/dash_es.ts b/src/qt/locale/dash_es.ts
index 5bc262d345e7..4ca9a9b2cf22 100644
--- a/src/qt/locale/dash_es.ts
+++ b/src/qt/locale/dash_es.ts
@@ -1,203 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="es">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Acerca del Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>Versión del &lt;b&gt;Dash Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Copyright &amp;copy; 2009-2014 Los desarrolladores de Bitcoin Core.
-Copyright &amp;copy; 2014-YYYY Los desarrolladores de Dash Core.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este es un software experimental.
-
-Distribuido bajo la licencia MIT/X11, vea el archivo adjunto
-COPYING o http://www.opensource.org/licenses/mit-license.php.
-
-Este producto incluye software desarrollado por OpenSSL Project para su uso en el OpenSSL Toolkit (http://www.openssl.org/) y software criptográfico escrito por Eric Young (eay@cryptsoft.com) y el software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Los desarrolladores de Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Los desarrolladores del Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Haga doble clic para editar la etiqueta o dirección </translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Pulsar con el botón derecho para editar la dirección o etiqueta</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Crear una dirección nueva</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Nueva</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copiar la dirección seleccionada al portapapeles del sistema</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copiar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Elimina la dirección seleccionada de la lista</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Eliminar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exporta los datos en la pestaña actual a un archivo</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>E&amp;xportar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>Ce&amp;rrar</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
-        <translation>Elige la dirección para enviar las monedas</translation>
+        <translation>Elija la dirección a la cual enviar los dash</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
-        <translation>Elige la dirección para recibir las monedas</translation>
+        <translation>Elija la dirección donde recibirá los dash</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>E&amp;scoger</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Direcciones de envío</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Direcciones de recepción</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Estas son sus direcciones Dash para enviar pagos. Compruebe siempre la cantidad y la dirección receptora antes de enviar dashs.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Estas son sus direcciones de Dash para recibir pagos. Se recomienda utilizar una nueva dirección de recepción para cada transacción.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>Copiar &amp;Dirección</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Copiar E&amp;tiqueta</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Exportar la Lista de Direcciones </translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Archivo de valores separados por comas (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Error al exportar</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Se produjo un error al intentar guardar la lista de direcciones en %1.</translation>
+        <translation>Se produjo un error al intentar guardar la lista de direcciones en %1. Por favor, inténtelo otra vez.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Etiqueta</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
@@ -205,154 +143,150 @@ Este producto incluye software desarrollado por OpenSSL Project para su uso en e
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Diálogo de contraseña</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Introducir contraseña</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Nueva contraseña</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Repita la nueva contraseña</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Sirve  para desactivar sendmoney trivial cuando una cuenta del SO se ve comprometida . No ofrece seguridad real.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Solo para anonimizar</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Introduzca la nueva contraseña del monedero.&lt;br/&gt;Por favor elija una con &lt;b&gt;10 o más caracteres aleatorios&lt;/b&gt;, u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Introduzca la nueva contraseña del monedero.&lt;br/&gt;Por favor, use una contraseña con &lt;b&gt;diez o más caracteres aleatorios&lt;/b&gt;, u &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Cifrar el monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Esta operación requiere su contraseña para desbloquear el monedero.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Desbloquear monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Esta operación requiere su contraseña para descifrar el monedero.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Descifrar el monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Cambiar contraseña</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Introduzca la contraseña anterior del monedero y la nueva. </translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Confirmar cifrado del monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Advertencia: Si cifra la cartera y pierde su contraseña, ¡&lt;b&gt;PERDERÁ TODOS SUS DASH&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>¿Seguro que desea cifrar su monedero?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Monedero cifrado</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash se cerrará ahora para finalizar el proceso de cifrado. Recuerde que el cifrado de su monedero no puede proteger totalmente sus dashs del robo por un malware que infecte su sistema.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>IMPORTANTE: Cualquier copia de seguridad que haya realizado previamente de su archivo del monedero debe reemplazarse con el nuevo archivo de monedero cifrado. Por razones de seguridad, las copias de seguridad previas del archivo de monedero no cifradas serán inservibles en cuanto comience a usar el nuevo monedero cifrado.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Ha fallado el cifrado del monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Ha fallado el cifrado del monedero debido a un error interno. El monedero no se cifró.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Las contraseñas no coinciden.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Ha fallado el desbloqueo del monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>La contraseña introducida para descifrar el monedero es incorrecta.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Ha fallado el descifrado del monedero</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Se ha cambiado correctamente la contraseña del monedero.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Aviso: ¡La tecla de bloqueo de mayúsculas está activada!</translation>
     </message>
@@ -360,437 +294,425 @@ Este producto incluye software desarrollado por OpenSSL Project para su uso en e
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Nodo</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Vista general</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Mostrar vista general del monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Enviar</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
-        <translation>Enviar monedas a una dirección Dash</translation>
+        <translation>Enviar cuantía a una dirección Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Recibir</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Solicitar pagos (genera códigos QR y URIs de Dash)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transacciones</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Examinar el historial de transacciones</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>&amp;Salir</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Salir de la aplicación</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Acerca de Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Mostrar información acerca de Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Mostrar información acerca de Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Acerca de &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Mostrar información acerca de Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Opciones...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Modificar las opciones de configuración de Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>Mo&amp;strar/ocultar</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Mostrar u ocultar la ventana principal</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>Ci&amp;frar monedero…</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Cifrar las claves privadas de su monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Guardar copia del monedero...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Crear copia de seguridad del monedero en otra ubicación</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Cambiar la contraseña…</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Cambiar la contraseña utilizada para el cifrado del monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Desbloquear el monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Desbloquear el monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Bloquear el monedero</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Firmar &amp;mensaje...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Firmar mensajes con sus direcciones Dash para demostrar su posesión</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Verificar el mensaje...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Verificar mensajes para comprobar que fueron firmados con la dirección Dash indicada</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Información</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Muestra información de diagnóstico</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>Consola de &amp;Depuración</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Abrir la consola de depuración</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>Monitor de &amp;Red</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Muestra la monitorización de la red</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>Lista de &amp;Pares</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Mostrar info de pares</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>&amp;Reparar Monedero</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Mostrar opciones para reparar monedero</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Abrir Archivo de &amp;Configuración</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Abrir archivo de configuración</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Mostrar Copias de &amp;Seguridad Automáticas</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Mostrar las copias de seguridad del monedero creadas automáticamente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>Direcciones de &amp;envío...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Mostrar la lista de direcciones de envío y etiquetas</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Direcciones de &amp;recepción...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Mostrar la lista de direcciones de recepción y etiquetas</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Abrir &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Abrir un dash: URI o petición de pago</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Opciones de consola de comandos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Cliente Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Procesado %n bloque del historial de transacciones.</numerusform><numerusform>Procesados %n bloques del historial de transacciones.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Mostrar el mensaje de ayuda de Dash Core para obtener una lista con las posibles opciones de la consola de comandos</translation>
+        <translation>Mostrar el mensaje de ayuda de Dash Core para obtener una lista con las posibles opciones de la consola de comandos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Archivo</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Configuración</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Herramientas</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>A&amp;yuda</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Barra de pestañas</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Cliente Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n conexión activa en la red Dash</numerusform>
-            <numerusform>%n conexiones activa(s) en la red Dash</numerusform>
-        </translation>
+        <translation><numerusform>%n conexion(es) activa a la red Dash</numerusform><numerusform>%n conexion(es) activas a la red Dash</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Sincronizando con la red…</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importando bloques de disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Reindexando bloques en disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Ninguna fuente de bloques disponible ...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Procesados %1 bloques del historial de transacciones.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Actualizado</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n hora</numerusform>
-            <numerusform>%n hora(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n hora(s)</numerusform><numerusform>%n hora(s)</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n día</numerusform>
-            <numerusform>%n día(s)</numerusform>
-        </translation>
+        <translation><numerusform>% n día(s)</numerusform><numerusform>%n día(s)</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n semana</numerusform>
-            <numerusform>%n semana(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n semana(s)</numerusform><numerusform>%n semana(s)</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 y %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n año</numerusform>
-            <numerusform>%n año(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n año(s)</numerusform><numerusform>%n año(s)</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 por detrás</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Poniendo al día...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>El último bloque recibido fue generado hace %1.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Las transacciones posteriores aún no están visibles.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Aviso</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Información</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Transacción enviada</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Transacción entrante</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -803,30 +725,25 @@ Dirección: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt; sólo para anonimización</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Ha ocurrido un error crítico. Dash ya no puede continuar con seguridad y se cerrará.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Alerta de red</translation>
     </message>
@@ -834,333 +751,302 @@ Dirección: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Selección de Direcciones bajo Coin Control</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Cantidad:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Cuantía:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Prioridad:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Comisión:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Envío pequeño:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Selección de Dash</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Basura:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Después de comisiones:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Cambio:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(des)marcar todos</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Modo árbol</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Modo lista</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 bloqueada)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Cuantía</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Recibido con la etiqueta</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Etiqueta</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Dirección</translation>
+        <translation>Recibido con la dirección</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Rondas de Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Confirmaciones</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Confirmado</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Prioridad</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Copiar dirección</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copiar etiqueta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Copiar cuantía</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Copiar ID de transacción</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Bloquear lo no gastado</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Desbloquear lo no gastado</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Copiar cantidad</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Copiar comisión</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copiar después de aplicar comisión</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copiar bytes</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copiar prioridad</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copiar envío pequeño</translation>
+        <translation>Copiar basura</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copiar cambio</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Se seleccionó alguna entrada no anónima.&lt;b&gt;Darksend se desactivará.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Si aún desea usar Darksend, por favor desmarque primero todas las entradas que no son anónimas y luego active de nuevo la casilla de Darksend.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>la más alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>más alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>media-alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Puede variar +/- %1 duff(s) por entrada.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>baja-media</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>baja</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>más baja</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>la más baja</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 bloqueada)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>ninguna</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Basura</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>si</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>no</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Esta etiqueta se torna roja si el tamaño de la transación es mayor a 1000 bytes.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Esto implica que se requiere una comisión de al menos %1 por kB</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Puede variar +/- 1 byte por entrada.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Las transacciones con prioridad alta son más propensas a ser incluidas dentro de un bloque.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Esta etiqueta se torna roja si la prioridad es menor que &quot;media&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Esta etiqueta se torna roja si cualquier destinatario recibe una cuantía menor a %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Esto significa que se necesita una comisión de al menos %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Cuantías por debajo de 0.546 veces la comisión mínima serán mostradas como basura.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Esta etiqueta se torna roja si el cambio es menor que %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>cambiar desde %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(cambio)</translation>
     </message>
@@ -1168,84 +1054,84 @@ Dirección: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Configurar Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Privacidad Básica</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Privacidad Alta</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Privacidad Máxima</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Por favor, seleccione el nivel de privacidad.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
-        <translation>Usar 2 masternodes diferentes para mezclar fondos hasta 1000 DASH</translation>
+        <translation>Usar 2 nodos maestros distintos para mezclar fondos hasta 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
-        <translation>Usar 8 masternodes diferentes para mezclar fondos hasta 1000 DASH</translation>
+        <translation>Usar 8 nodos maestros diferentes para mezclar fondos hasta 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
-        <translation>Usar 16 masternodes diferentes</translation>
+        <translation>Usar 16 nodos maestros diferentes</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Esta es la opción más rápida y anonimizar 1000 DASH costará alrededor de 0.025 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Esta opción es moderadamente rápida y anonimizar 1000 DASH costará alrededor de 0.05 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH por cada 1000 DASH que anonimice.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Esta es la opción más lenta y segura de todas. Usar la anonimización máxima costará</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Configuración de Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend fue configurado con éxito en la básica (%1 y 2 rondas). Puede cambiarlo en cualquier momento abriendo la pantalla de configuración de Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend fue configurado con éxito en la alta (%1 y 8 rondas). Puede cambiarlo en cualquier momento abriendo la pantalla de configuración de Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend fue configurado con éxito en la máxima (%1 y 16 rondas). Puede cambiarlo en cualquier momento abriendo la pantalla de configuración de Dash.</translation>
     </message>
@@ -1253,67 +1139,67 @@ Dirección: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Editar Dirección</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>E&amp;tiqueta</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>La etiqueta asociada con esta entrada de la lista de direcciones</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Dirección</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>La dirección asociada con esta entrada de la lista de direcciones. Solo puede ser modificada para direcciones de envío.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Nueva dirección de recepción</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Nueva dirección de envío</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Editar dirección de recepción</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Editar dirección de envío</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>La dirección introducida &quot;%1&quot; no es una dirección Dash válida.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>La dirección introducida &quot;%1&quot; ya está presente en la libreta de direcciones.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>No se pudo desbloquear el monedero.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Ha fallado la generación de la nueva clave.</translation>
     </message>
@@ -1321,27 +1207,27 @@ Dirección: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Se creará un nuevo directorio de datos.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>nombre</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>El directorio ya existe. Añada %1 si pretende crear aquí un directorio nuevo.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>La ruta ya existe y no es un directorio.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>No se puede crear un directorio de datos aquí.</translation>
     </message>
@@ -1349,72 +1235,68 @@ Dirección: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Opciones de consola de comandos</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>versión</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Acerca del Dash Core</translation>
+        <translation>Acerca de Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Opciones de la línea de comandos</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Uso:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>opciones de la consola de comandos</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Opciones GUI</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Elegir directorio de datos al iniciar (predeterminado: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Establecer el idioma, por ejemplo, &quot;es_ES&quot; (predeterminado: configuración regional del sistema)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Arrancar minimizado</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Establecer los certificados raíz SSL para solicitudes de pago (predeterminado: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: 1)</translation>
     </message>
@@ -1422,107 +1304,85 @@ Dirección: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Bienvenido</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Bienvenido a Dash Core</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Al ser la primera vez que se ejecuta el programa, puede elegir dónde almacenará sus datos Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core va a descargar y guardar una copia de la cadena de bloques de Dash. Se almacenará al menos %1GB de datos en este directorio, que irá creciendo con el tiempo. El monedero se guardará también en este directorio.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Utilizar el directorio de datos predeterminado</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Utilizar un directorio de datos personalizado:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Error: No puede crearse el directorio de datos especificado &quot;%1&quot;.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Error: No puede crearse el directorio de datos especificado &quot;%1&quot;.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB de espacio libre disponible</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB de espacio libre disponible</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(de los %1GB necesarios)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(de los %1 GB necesarios)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Abrir URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Abrir solicitud de pago desde una URI o archivo</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Seleccione archivo de sulicitud de pago</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Seleccionar archivo de solicitud de pago a abrir</translation>
     </message>
@@ -1530,313 +1390,281 @@ Dirección: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Opciones</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Principal</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Iniciar Dash automáticamente al ingresar en el sistema.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Iniciar Dash al ingresar en el sistema</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Tamaño de cache de la &amp;base de datos</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Número de hilos de &amp;verificación de scripts</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = automático, &lt;0 = dejar libres ese número de núcleos)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Esta opción determina la cantidad de masternodes únicos por los que circulará una entrada para anonimizarla. A mayor número de rondas de anonimización, mayor grado de privacidad,, pero también implica un mayor coste en las tasas.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Esta opción determina la cantidad de nodos maestros únicos por los que circulará una entrada para volverse anónima. A mayor número de rondas para dificultar su rastreo, mayor grado de privacidad tendrá,, pero también implica un coste mayor de comisiones.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Rondas de Darksend a usar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Esta cuantía sirve de umbral para que Darksend se apague, una vez sea alcanzada.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Cuantía de Dash a mantener anonimizada</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>&amp;Monedero</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Aceptar conexiones desde el exterior</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Permitir conexiones entrantes</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Conectarse a la red Dash a través de un proxy SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Conectarse a través de proxy SOCKS5 (proxy predeterminado):</translation>
     </message>
     <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Comisión de transacción opcional por kB que ayuda a asegurar que sus transacciones sean procesadas rápidamente. La mayoría de transacciones son de 1kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Pagar comisión de &amp;transacción</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Experto</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Mostrar o no funcionalidad de Coin Control.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Activar funcionalidad de &amp;coin control</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Si desactiva el gasto del cambio no confirmado, no se podrá usar el cambio de una transacción hasta que se alcance al menos una confirmación. Esto afecta también a cómo se calcula su saldo.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Gastar cambio no confirmado</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Red</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Abrir automáticamente el puerto del cliente Dash en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapear el puerto usando &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Conectarse a la red Dash a través de un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Conectarse a través de proxy SOCKS (proxy predeterminado):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Dirección &amp;IP del proxy:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Dirección IP del proxy (p. ej. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Puerto:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Puerto del servidor proxy (ej. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">&amp;Versión SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Versión SOCKS del proxy (ej. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Ventana</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Mostrar solo un icono de bandeja tras minimizar la ventana.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimizar en la bandeja en vez de en la barra de tareas</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimizar en lugar de salir de la aplicación al cerrar la ventana. Cuando esta opción está activada, la aplicación solo se puede cerrar seleccionando Salir desde el menú.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimizar al cerrar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Interfaz</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>I&amp;dioma de la interfaz de usuario</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>El idioma de la interfaz de usuario puede establecerse aquí. Este ajuste se aplicará después de reiniciar Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>¿Idioma no disponible o traducción incompleta? Contribuye a la traducción aquí:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tema de la Interfaz de Usuario:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unidad para mostrar las cuantías:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Elegir la subdivisión predeterminada para mostrar las cuantías en la interfaz y cuando se envían dashs.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Mostrar o no las direcciones Dash en la lista de transacciones.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Mostrar las direcciones en la lista de transacciones</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 de terceros (p.ej. un explorador de bloques) que aparecen en la pestaña de transacciones como elementos del menú contextual. El %s en la URL es reemplazado por el hash de la transacción. Se pueden separar múltiples URLs con una barra vertical |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URLs de transacciones de terceros</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Opciones activas de la consola de comandos que tienen preferencia sobre las opciones antes mencionadas:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Restablecer todas las opciones del cliente a las predeterminadas.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation> Opciones para &amp;Restablecer</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;Aceptar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Cancelar</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>predeterminado</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>ninguna</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Confirme el restablecimiento de las opciones</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Se necesita reiniciar el cliente para activar los cambios.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>El cliente se cerrará. ¿Desea continuar?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Este cambio exige el reinicio del cliente.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>La dirección proxy indicada es inválida.</translation>
     </message>
@@ -1844,368 +1672,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Formulario</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Monedero</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red Dash después de que se haya establecido una conexión, pero este proceso aún no se ha completado.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Disponible:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Su saldo actual gastable</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Pendiente:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total de transacciones que deben ser confirmadas, y que no se incluyen en el saldo gastable</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>No disponible:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Saldo recién minado que aún no está disponible.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldos</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Transacciones no confirmadas en direcciones de sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldo minado en direcciones de sólo vigilancia que aún no ha madurado</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Su saldo toal actual</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>El saldo total actual en direcciones de sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>De sólo vigilancia:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Su saldo actual en direcciones de sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Gastable:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Estado</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Activada/Desactivada</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Completado:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Saldo de Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Cuantía y Rondas:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Rondas</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Denom Enviados:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Las denominaciones que envió al Masternode. Para poder mezclar, otros usuarios deben enviar el mismo número exacto de denominaciones.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Últimas transacciones</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Comenzar/Parar Mezclado</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Las denominaciones que envió al Nodo Maestro.&lt;br&gt;Para poder mezclar, otros usuarios deben enviar exactamente las mismas denominaciones.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Último Mensaje)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Intentar enviar manualmente una solicitud Darksend.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Probar</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Reiniciar el estado actual de Darksend (¡puede interrumpir Darksend si está en el proceso de Mezcla, lo cual puede costarle dinero!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Reiniciar</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Transacciones recientes&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>desincronizado</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Desactivado</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Iniciar Mezclador Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Parar Mezclador Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>No se detectaron entradas</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Ronda</numerusform><numerusform>%n Rondas</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Se han encontrado salidas denominadas sin confirmar, se esperará a su confirmación para recalcular.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Rondas</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Activado</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>Progreso: %1% (entradas tienen una media de %2 de %n rondas)</numerusform><numerusform>Progreso: %1% (entradas tienen una media de %2 de %n rondas)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Se encontraron suficientes entradas compatibles para hacer anónimo %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>No hay suficientes entradas compatibles para hacer anónimos &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;Se harán anónimos &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; en su lugar</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Activado</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Último mensaje de Darksend:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend está inactivo.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>Mezclado en curso...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Solicitud de Darksend completada: ¡Su transacción fue aceptada en el pool!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Ha enviado las siguientes entradas al masternode:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Enviado al masternode, Esperando más entradas</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Suficientes usuarios encontrados, firmando ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Suficientes usuarios encontrados, firmando ( esperando. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Suficientes usuarios encontrados, firmando ( esperando.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Suficientes usuarios encontrados, firmando ( esperando... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Transmitiendo transacción final.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Finalizando transacción.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Solicitud Darksend incompleta:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Se volverá a intentar...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Solicitud Darksend completada:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Enviado a masternode, esperando en cola .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Enviado a masternode, esperando en cola ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Enviado a masternode, esperando en cola ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Estado desconocido:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend se reinició correctamente.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend requiere al menos %1 para su uso.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>El monedero está bloqueado y el usuario rechazó desbloquearlo. Desactivando Darksend.</translation>
     </message>
@@ -2213,141 +1947,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Error en solicitud de pago</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>No se pudo iniciar dash: manejador de pago-al-clic</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Aviso del gestor de red</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">El proxy configurado no soporta el protocolo SOCKS5, el cual es requerido para pagos vía proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Gestión de URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>La URL de obtención de la solicitud de pago es inválida: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">¡No se puede interpretar la URI! Esto puede deberse a una dirección Dash inválida o a parámetros de URI mal formados.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Procesado del archivo de solicitud de pago</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">¡No se ha podido leer o procesar el archivo de solicitud de pago! Esto puede deberse a un archivo inválido de solicitud de pago.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Dirección de pago no válida %1</translation>
+        <translation>Dirección de pago no válida %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>¡No se puede interpretar la URI! Esto puede deberse a una dirección Dash inválida o a parámetros de URI mal formados.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>¡No se ha podido leer el archivo de solicitud de pago! Esto puede deberse a un archivo inválido de solicitud de pago.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Se rechazó la solicitud de pago</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>La red de solicitud de pago y la del cliente no coinciden.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>La solicitud de pago ha caducado.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>La solicitud de pago no está inicializada.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>No están soportadas las solicitudes de pago no verificadas a scripts de pago personalizados.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>La cuantía de pago solicitado del %1 es demasiado pequeña (considerada basura).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Reembolso desde %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>La solicitud de pago %1 es demasiado grande (%2 bytes, %3 bytes permitidos).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Protección DoS de la solicitud de pago</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Error en la comunicación con %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
+        <translation>¡No se puede intrepretar la solicitud de pago!</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">¡La solicitud de pago no puede leerse ni procesarse!</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Respuesta errónea del servidor %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Error en petición de red</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Pago aceptado</translation>
     </message>
@@ -2355,139 +2069,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Dirección/Nombre del servidor</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente del Usuario</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tiempo de Ping</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Error: El directorio de datos especificado &quot;%1&quot; no existe.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Error: No se ha podido procesar el archivo de configuración: %1. Debe utilizarse solamente la sintaxis clave=valor.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Error en la lectura del archivo con la configuración del masternode: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Error: Combinación no válida de -regtest y -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core no se ha cerrado de forma segura todavía...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Introduzca una dirección Dash (p.ej. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Cuantía</translation>
+        <translation>Cuantía</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Introduzca una dirección Dash (e.g. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>RED</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>DESCONOCIDA</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Ninguna</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N/D</translation>
+        <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Guardar Imagen...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Copiar imagen</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Guardar código QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Imagen PNG (*.png)</translation>
     </message>
@@ -2495,436 +2168,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Ventana de Herramientas</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Información</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
-        <translation>Recuento de Masternodes</translation>
+        <translation>Recuento de Nodos Maestros</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>General</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nombre</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Nombre del cliente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Número de conexiones</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Abrir el archivo de registro de depuración en el directorio actual de datos. Esto puede requerir varios segundos para archivos de registro grandes.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Abrir</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Hora de inicio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Red</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Hora del último bloque</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Archivo de registro de depuración</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Utilizando la versión OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Fecha de compilación</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Número actual de bloques</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Versión del cliente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Utilizando versión de BerkeleyDB</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Cadena de bloques</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Consola</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Limpiar consola</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Tráfico de Red</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Limpiar</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Totales:</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Recibido</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Enviado</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Pares</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Seleccione un par para ver información detallada.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Dirección</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Versión</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente del Usuario</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Servicios</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Altura de Inicio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Altura de Sinc</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Puntuación de Exclusión</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tiempo de Conexión</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Último Enviado</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Último Recibido</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Enviados</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Recibidos</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tiempo de Ping</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>Reparar &amp;Monedero</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Rescatar monedero</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Reescanear archivos de la cadena de bloques</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Recuperar transacciones 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Recuperar transacciones 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Actualizar formato del monedero</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Los botones de abajo reiniciarán el monedero con las opciones de la línea de comandos para repararlo, arreglar problemas con archivos corrompidos de la cadena de bloques o transacciones perdidas/obsoletas.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Intentar recuperar las claves privadas de un wallet.dat corrupto.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Volver a examinar la cadena de bloques en busca de transacciones perdidas.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Recuperar transacciones de la cadena de bloques (conservar meta-datos, e.g. propietario de la cuenta).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Recuperar transacciones de la cadena de bloques (descartar meta-datos).</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Actualizar monedero al último formato en el inicio. (Nota: ¡esto NO es una actualización del propio monedero!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Opciones de reparación del monedero.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Reconstruir índice</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Reconstruir índice de la cadena de bloques a partir de los archivos blk000??.dat actuales.</translation>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Entrante:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Saliente:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Bienvenido a la consola RPC de Dash</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Use las flechas arriba y abajo para navegar por el historial y &lt;b&gt;Control+L&lt;/b&gt; para vaciar la pantalla.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Escriba &lt;b&gt;help&lt;/b&gt; para ver un resumen de los comandos disponibles.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>vía %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>nunca</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Entrante</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Saliente</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Desconocido</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation>Descargando...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Reutilizar una de las direcciones previamente usadas para recibir. Reutilizar direcciones conlleva problemas de seguridad y privacidad. No lo emplee a menos que regenere una solicitud de pago anterior.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Reutilizar una dirección receptora existente (no recomendado)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Un mensaje opcional para adjuntar a la solicitud de pago, el cual se muestra cuando se abre la solicitud. Nota: El mensaje no se enviará con el pago por la red Dash.</translation>
+        <translation>Un mensaje opcional para adjuntar a la solicitud de pago, el cual se muestra cuando se abre la solicitud. Nota: El mensaje no se enviará con el pago por la red Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Mensaje:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Etiqueta opcional para asociar con la nueva dirección de recepción.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Utilice este formulario para solicitar pagos. Todos los campos son &lt;b&gt;opcionales&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Etiqueta:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Una cuantía opcional a solicitar. Deje este campo vacío o con cero para no solicitar una cuantía específica.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Cuantía:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Solicitar pago</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Limpiar todos los campos del formulario.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Limpiar</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Historial de pagos solicitados</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Mostrar la solicitud seleccionada (igual que hacer doble clic en una entrada)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Mostrar</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Eliminar las entradas seleccionadas de la lista</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Eliminar</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Copiar etiqueta</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Copiar mensaje</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar cuantía</translation>
     </message>
@@ -2932,67 +2664,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>Código QR</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copiar &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copiar &amp;Dirección</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Guardar Imagen...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Solicitar pago a %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Información de pago</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Cuantía</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Etiqueta</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Mensaje</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>URI resultante demasiado larga. Intente reducir el texto de la etiqueta / mensaje.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Error al codificar la URI en el código QR.</translation>
     </message>
@@ -3000,37 +2732,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Etiqueta</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Mensaje</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Cuantía</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(ningún mensaje)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(ninguna cuantía)</translation>
     </message>
@@ -3038,412 +2770,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Enviar Dash</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Características de Coin Control</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Entradas...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>seleccionadas automáticamente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>¡Fondos insuficientes!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Cantidad:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Cuantía:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Prioridad:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Comisión:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Envío pequeño:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Basura:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>no</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Después de comisión:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Cambio:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Si se marca esta opción pero la dirección de cambio está vacía o es inválida, el cambio se enviará a una nueva dirección recién generada.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Dirección de cambio personalizada</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Comisión por Transacción:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Elegir...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>plegar ajustes de comisión</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimizar</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo es de 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión, mientras que en el &quot;al menos&quot; se pagan 1000 duffs. Para transacciónes más grandes de un kilobyte ambas se pagan por kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>por kilobyte</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo es de 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión, mientras que en el &quot;total al menos&quot; se pagan 1000 duffs. Para transacciónes más grandes de un kilobyte ambas se pagan por kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>total al menos</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Pagar sólo la comisión mínima está bien mientras el volumen de transacciones sea menor al del espacio en los bloques. Pero sea consciente de que esto puede acabar en una transacción que nunca se confirme una vez haya más demanda de transacciones de dash que las procesables por la red.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(leer la sugerencia)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Recomendada:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Personalizada:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(La comisión inteligente no está aún inicializada. Esto habitualmente tarda unos pocos bloques...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tiempo de confirmación:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normal</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>rápida</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Enviar como transacción con cero comisiones si es posible</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(la confirmación puede tardar más)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Confirmar el envío</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Enviar</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Limpiar todos los campos del formulario.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Limpiar &amp;Todo</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar a múltiples destinatarios simultáneamente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Añadir &amp;Destinatario</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Copiar cantidad</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar cuantía</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Copiar comisión</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copiar después de aplicar donación</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copiar bytes</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copiar prioridad</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copiar envío pequeño</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Copiar basura</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copiar cambio</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>usando</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>fondos anónimos</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend requiere que esta cantidad sea redondeada al %1 más cercano).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>cualquier fondo disponible (no recomendado)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>e InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 a %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>¿Está seguro que desea enviar?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>se añaden como comisión de transacción</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Cuantía Total %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>o</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Confirmar el envío de dashs</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">La solicitud de pago expiró</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Una comisión %1 veces más alta que %2 por kB se considera extremadamente elevada.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Dirección de pago no válida %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Está previsto que comience la confirmación en %n bloque.</numerusform><numerusform>Está previsto que comience la confirmación en %n bloques.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>La dirección de recepción no es válida, compruébela de nuevo.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>La cuantía a pagar debe ser mayor que 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>La cuantía sobrepasa su saldo.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>El total sobrepasa su saldo cuando se incluye la comisión de envío de %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Se ha encontrado una dirección duplicada. Solo se puede enviar a cada dirección una vez por operación de envío.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>¡Ha fallado la creación de la transacción!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>¡La transacción fue rechazada! Esto puede suceder si alguno de los dashs de su monedero ya se habían gastado, por ejemplo si usó una copia de wallet.dat y los dash se gastaron en dicha copia pero no se aparecen como gastados aqui.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Error: El monedero se desbloqueó solo para anonimizar dashs.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Pagar sólo la comisión mínima de %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Aviso: Dirección de Dash no válida</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Aviso: Dirección de cambio desconocida</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(sin etiqueta)</translation>
     </message>
@@ -3451,102 +3167,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Esto es un pago ordinario.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Pagar &amp;a:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">La dirección a la que enviar el pago (p.ej. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>La dirección Dash a la cual enviar el pago</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Escoger direcciones previamente usadas</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Pegar dirección desde portapapeles</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Eliminar esta entrada</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>E&amp;tiqueta:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Introduce una etiqueta para esta dirección para añadirla a la lista de direcciones utilizadas</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>C&amp;uantía:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Mensaje:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Un mensaje que se adjuntó al dash: URI que será almacenada con la transacción para su referencia. Nota: Este mensaje no se enviará a través de la red Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Esto es una solicitud de pago no verificada.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Pagar a:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Memo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Esta es una solicitud de pago verificada.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Etiquete esta dirección para añadirla a la libreta</translation>
     </message>
@@ -3554,12 +3266,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core se está cerrando...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>No apague el equipo hasta que desaparezca esta ventana.</translation>
     </message>
@@ -3567,193 +3279,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Firmas - Firmar / Verificar un mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Firmar mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puede firmar mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa vaga, ya que los ataques de phishing pueden tratar de engañarle para suplantar su identidad. Firme solo declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">La dirección con la que firmar el mensaje (p.ej. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <location line="+18"/>
+        <source>The Dash address to sign the message with</source>
+        <translation>La dirección Dash con la cual se firma el mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
-        <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Escoger dirección previamente usada</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Pegar dirección desde portapapeles</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Introduzca aquí el mensaje que desea firmar</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Firma</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copiar la firma actual al portapapeles del sistema</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Firmar el mensaje para demostrar que se posee esta dirección Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Firmar &amp;Mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Restablecer todos los campos de la firma de mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Limpiar &amp;todo</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Verificar mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Introduzca la dirección para la firma, el mensaje (asegurándose de copiar tal cual los saltos de línea, espacios, tabulaciones, etc.) y la firma a continuación para verificar el mensaje. Tenga cuidado de no asumir más información de lo que dice el propio mensaje firmado para evitar fraudes basados en ataques de tipo man-in-the-middle.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">La dirección con la que se firmó el mensaje (p.ej. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>La dirección Dash con la cual se firmó el mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Verificar el mensaje para garantizar que fue firmado con la dirección Dash indicada</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Verificar &amp;Mensaje</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Restablecer todos los campos de la verificación de mensaje</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Haga clic en &quot;Firmar mensaje&quot; para generar la firma</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Introduzca una dirección Dash (p.ej. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>La dirección introducida es inválida.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Verifique la dirección e inténtelo de nuevo.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>La dirección introducida no corresponde a una clave.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Se ha cancelado el desbloqueo del monedero. </translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>No se dispone de la clave privada para la dirección introducida.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Ha fallado la firma del mensaje.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Mensaje firmado.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>No se puede decodificar la firma.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Compruebe la firma e inténtelo de nuevo.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>La firma no coincide con el resumen del mensaje.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>La verificación del mensaje ha fallado.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Mensaje verificado.</translation>
     </message>
@@ -3761,27 +3461,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Versión %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Los desarrolladores de Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Los desarrolladores del Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3789,7 +3489,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3797,254 +3497,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Abrir para %n bloque más</numerusform>
-            <numerusform>Abrir para %n bloque(s) más</numerusform>
-        </translation>
+        <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Abierto hasta %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>en conflicto</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1 desconectado (comprobado por instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/confirmado (comprobado por instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 confirmaciones (comprobado por instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/sin conexión</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/no confirmado</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 confirmaciones</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/desconectado (Verificación de InstantX en curso - %2 de %3 firmas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/confirmada (Verificación de InstantX en curso - %2 de %3 firmas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 confirmaciones (Verificación de InstantX en curso - %2 de %3 firmas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/desconectado (Falló la verificación de InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/confirmada (Falló la verificación de InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Estado</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, todavía no se ha sido difundido satisfactoriamente</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, transmitir a través de %n nodo</numerusform>
-            <numerusform>, transmitir a través de %n nodo(s)</numerusform>
-        </translation>
+        <translation><numerusform>, transmitir a través de %n nodo</numerusform><numerusform>, transmitir a través de %n nodos</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Fuente</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Generado</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>De</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>desconocido</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Para</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>dirección propia</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>de sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>etiqueta</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Crédito</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>disponible en %n bloque más</numerusform>
-            <numerusform>disponible en %n bloque(s) más</numerusform>
-        </translation>
+        <translation><numerusform>madrua en %n bloque más</numerusform><numerusform>madura en %n bloques más</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>no aceptada</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Débito</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total de débito</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total de crédito</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Comisión de transacción</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Cuantía neta</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Mensaje</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Comentario</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID de transacción</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Vendedor</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Los dashs generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a &quot;no aceptado&quot; y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Información de depuración</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transacción</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Entradas</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Cuantía</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>verdadero</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>falso</translation>
     </message>
@@ -4052,12 +3743,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Detalles de transacción</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Esta ventana muestra información detallada sobre la transacción</translation>
     </message>
@@ -4065,169 +3756,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Cuantía</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Abrir para %n bloque más</numerusform>
-            <numerusform>Abrir para %n bloque(s) más</numerusform>
-        </translation>
+        <translation><numerusform>Abrir para %n bloque más</numerusform><numerusform>Abrir para %n bloques más</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Abierto hasta %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Sin conexión</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Sin confirmar</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Confirmando (%1 de %2 confirmaciones recomendadas)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Confirmado (%1 confirmaciones)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>En conflicto</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>No vencidos (%1 confirmaciones. Estarán disponibles al cabo de %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Generado pero no aceptado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Recibido con</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Recibido desde</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Recibido mediante Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Enviado a</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Pago propio</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Minado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Denominación Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend - Pago de Colateral</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend - Efectuar Entradas de Colateral</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend - Crear Denominaciones</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>de sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(nd)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Fecha y hora en que se recibió la transacción.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Tipo de transacción.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Si una dirección de sólo vigilancia toma parte o no en esta transacción.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Dirección de destino de la transacción.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Cuantía retirada o añadida al saldo.</translation>
     </message>
@@ -4235,207 +3919,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Todo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Hoy</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Esta semana</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Este mes</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Mes pasado</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Este año</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Rango...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Más Habitual</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Recibido con</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Enviado a</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend - Efectuar Entradas de Colateral</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend - Crear Denominaciones</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend - Denominar</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend - Pago de Colateral</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>A usted mismo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Minado</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Otra</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Introduzca una dirección o etiqueta que buscar</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Cantidad mínima</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copiar dirección</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copiar etiqueta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar cuantía</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Copiar ID de transacción</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Editar etiqueta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Mostrar detalles de la transacción</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Exportar historial de transacciones</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Archivos de valores separados por comas (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Confirmado</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>De sólo vigilancia</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Fecha</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Etiqueta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Dirección</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Cuantía</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Error al exportar</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Se produjo un error al intentar guardar el historial de transacciones en %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Exportación Finalizada</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>El historial de transacciones se guardó correctamente en %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Rango:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>hasta</translation>
     </message>
@@ -4443,15 +4128,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Unidad con la cual se muestran las cuantías. Pulse para seleccionar otra unidad.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>No se ha cargado ningún monedero.</translation>
     </message>
@@ -4459,59 +4144,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
-        <translation>Enviar Monedas</translation>
+        <translation>Enviar Dash</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX aún no soporta el envío de valores tan elevados. Las transacciones están limitadas actualmente a %n DASH.</numerusform>
-            <numerusform>InstantX aún no soporta el envío de valores tan elevados. Las transacciones están limitadas actualmente a %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX aún no soporta el envío de valores tan elevados. Las transacciones están limitadas actualmente a %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>E&amp;xportar</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar a un archivo los datos de esta pestaña</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Realizar Copia de Seguridad del Monedero</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Datos de Monedero (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Falló la Copia de Seguridad</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Ha habido un error al intentar guardar los datos del monedero en %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Backup Exitoso</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Los datos del monedero se han guardado con éxito en %1.</translation>
     </message>
@@ -4519,1373 +4203,1430 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, debe establecer un valor rpcpassword en el archivo de configuración:
-%s
-Se recomienda utilizar la siguiente contraseña aleatoria:
-rpcuser=dashrpc
-rpcpassword=%s
-(no es necesario recordar esta contraseña)
-El nombre de usuario y la contraseña NO DEBEN ser iguales.
-Si el archivo no existe, créelo con permisos de archivo de solo lectura.
-Se recomienda también establecer alertnotify para recibir notificaciones de problemas;
-Por ejemplo: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com 
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifrados aceptables (predeterminados: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escucha en IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ha ocurrido un error al configurar el puerto RPC %u para escuchar mediante IPv6. Recurriendo a IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>No se ha podido bloquear el directorio de datos %s. Probablemente ya se está ejecutando Dash Core.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limitar continuamente las transacciones gratuitas a &lt;n&gt;*1000 bytes por minuto (predeterminado:15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend utiliza cuantías denominadas exactas para enviar fondos, simplemente necesita anonimizar algunos dashs más. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Desactivar todas las funciones relacionadas con el Masternode y con Darksend (0-1, por defecto: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Habilitar InstantX, mostrar las confirmaciones de transacciones bloqueadas (bool, por defecto: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Activar el uso automatizado de Darksend para los fondos almacenados en este monedero (0-1, por defecto: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Iniciar modo de prueba de regresión, el cuál utiliza una cadena especial en la cual los bloques pueden ser resueltos instantáneamente. Se utiliza para herramientas de prueba de regresión y desarrollo de aplicaciones.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Ingresar en el modo de prueba de regresión, que utiliza una cadena especial en la que los bloques se pueden resolver instantáneamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Error: Ha fallado la escucha de conexiones entrantes (listen ha devuelto el error %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>¡Error: se ha rechazado la transacción! Esto puede ocurrir si ya se han gastado algunos de los dashs del monedero, como ocurriría si hubiera hecho una copia de wallet.dat y se hubieran gastado dashs a partir de la copia, con lo que no se habrían marcado aquí como gastados.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>¡Error: Esta transacción requiere una comisión de al menos %s debido a su cantidad, complejidad, o al uso de fondos recién recibidos!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Error: Monedero desbloqueado sólo para anonimización, incapaz de crear la transacción.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Ejecutar un comando cuando se reciba un aviso importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Las comisiones inferiores se consideran comisión cero (a efectos de creación de transacciones) (predeterminado:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Volcar la actividad de la base de datos de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Se han encontrado salidas denominadas sin confirmar, se esperará a su confirmación para continuar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En este modo -genproclimit controla cuántos bloques se generan de inmediato.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX requiere entradas con al menos 6 confirmaciones, puede que neesite esperar unos pocos minutos y volver a intentarlo.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Escuchar conexiones JSON-RPC en &lt;port&gt; (predeterminado: 9998 o testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Nombre para construir la url de la entrada KeePass que almacena la contraseña del monedero</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Mostrar información de depuración (predeterminado: 0, proporcionar &lt;category&gt; es opcional)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Ofrecer liquidez a Darksen mezclando dashs con poca frecuencia y de forma contínua (0-100, predeterminado: 0, 1=muy frecuente, comisiones altas, 100=muy infrecuente, comisiones bajas)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Petición de direcciones de pares mediante búsqueda de DNS , si las direcciones son pocas (predeterminado: 1 salvo con -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
-        <translation>Ajustar dirección externa:puerto para acceder a este masternode (p.ej. dirección:puerto)</translation>
+        <translation>Ajustar dirección externa:puerto para acceder a este nodo maestro (p.ej. dirección:puerto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Establecer el número de hilos (threads) de verificación de scripts (entre %u y %d, 0 = automático, &lt;0 = dejar libres ese número de núcleos; predeterminado: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Establecer el límite de procesadores cuando está activada la generación (-1 = sin límite; predeterminado: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Mostrar N confirmaciones para una transacción bloqueada con éxito (0-9999, predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>No se puede enlazar a% s en este equipo. Dash Core probablemente ya está en funcionamiento.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>No se pueden localizar fondos denominados de Darksend suficientes para esta transacción.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>No se pueden localizar fondos no denominados de Darksend suficientes para esta transacción que no sean iguales a 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>No se pueden localizar fondos no denominados de Darksend suficientes para esta transacción.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usar proxy SOCKS5 distinto para comunicarse vía Tor de forma anónima (Predeterminado: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: ¡-paytxfee tiene un valor muy alto! Esta es la comisión que pagará si envía una transacción.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Aviso: ¡Verifique que la fecha y hora de su ordenador son correctas! Si su reloj está mal ajustado, Dash no funcionará correctamente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Aviso: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están experimentando problemas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Aviso: ¡Parece que no estamos completamente de acuerdo con nuestros pares! Podría necesitar una actualización, u otros nodos podrían necesitarla.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Aviso: ¡Error al leer wallet.dat! Todas las claves se han leído correctamente, pero podrían faltar o ser incorrectos los datos de transacciones o las entradas de la libreta de direcciones.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Aviso: ¡Recuperados datos de wallet.dat corrupto! El wallet.dat original se ha guardado como wallet.{timestamp}.bak en %s; si hubiera errores en su saldo o transacciones, deberá restaurar una copia de seguridad.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Tiene que establecer rpcpassword=&lt;password&gt; en el fichero de configuración:
-%s
-Si el archivo no existe, créelo con permiso de lectura solamente del propietario.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
-        <translation>Debe especificar una masternodeprivkey en la configuración. Por favor, consulte la documentación para obtener ayuda.</translation>
+        <translation>Debe declarar la variable masternodeprivkey o clave privada para el nodo maestro en la configuración. Por favor, consulte la documentación para obtener ayuda.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(predeterminado: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(predeterminado: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; puede ser:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar comandos de la consola y JSON-RPC
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Añadir un nodo al que conectarse y tratar de mantener la conexión abierta</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir conexiones JSON-RPC desde la dirección IP especificada
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Ya tiene esa entrada.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Solicitar siempre direcciones de pares mediante búsqueda DNS (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Intentar recuperar claves privadas de un wallet.dat corrupto</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Opciones de creación de bloques:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>No se puede denominar: no quedan entradas compatibles.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>No se puede regresar a una versión anterior del monedero</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>No se puede resolver la dirección de -bind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>No se puede resolver la dirección de -externalip: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>No se puede escribir la dirección predeterminada</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Limpiar lista de transacciones del monedero (herramienta de diagnóstico; implica -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>El colateral no es válido.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Colateral no válido.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Conectar sólo a los nodos (o nodo) especificados</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Conectar a través de un proxy SOCKS</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Conectar a JSON-RPC en &lt;port&gt; (predeterminado: 9998 o testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Conectar a KeepassHttp con el puerto &lt;port&gt; (predeterminado: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Opciones de conexión:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Corrupción de base de datos de bloques detectada.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Versión del cliente RPC de Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend está desactivado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Opciones de Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Opciones de Depuración/Pruebas:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Desactivar el modo seguro, no considerar un suceso real de modo seguro (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descubrir dirección IP propia (predeterminado: 1 al escuchar sin -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>No cargar el monedero y desactivar las llamadas RPC del monedero</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Carga finalizada</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Permitir que el cliente pueda actuar como  Masternode (0-1, por defecto: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Las entradas están agotadas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Error conectando a masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Error al inicializar la base de datos de bloques</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Error al inicializar el entorno de la base de datos del monedero  %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Error cargando base de datos de bloques</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Error al cargar wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Error al cargar wallet.dat: el monedero está dañado</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Error cargando wallet.dat: El monedero requiere la versión más reciente de Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Error al abrir la base de datos de bloques.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Error leyendo la base de datos, cerrando.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Error recuperando clave pública.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Error</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Error: ¡Espacio en disco bajo!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Error: ¡El monedero está bloqueado; no se puede crear la transacción!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Error: Ya tiene entradas pendientes en el pool de Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Error: error de sistema: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>No se ha podido leer la información de bloque</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>No se ha podido leer el bloque</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>No se ha podido sincronizar el índice de bloques</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Si no se proporciona &lt;category&gt;, mostrar toda la información de depuración</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>No se ha podido escribir en el índice de bloques</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = conservar metadatos de tx e.g. propietario de la cuenta e información de la solicitud de pago, 2 = descartar metadatos de tx)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>No se ha podido escribir la información de bloques</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permitir conexiones JSON-RPC desde la fuente especificada. El dato de &lt;ip&gt; válido puede ser una IP única (e.g. 1.2.3.4), una red/máscara de red (e.g. 1.2.3.4/255.255.255.0) ó una red/CIDR (e.g. 1.2.3.4/24). Esta opción se puede indicar múltiples veces</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>No se ha podido escribir el bloque</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Se produjo un error al configurar la dirección RPC %s puerto %u para escuchar: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>No se ha podido escribir la información de archivo</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Vincular a la dirección dada y poner en la lista blanca los pares que se conecten a ella. Use la notación [servidor]:puerto de IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>No se ha podido escribir en la base de datos de monedas</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Vincular a la dirección dada para escuchar conexiones JSON-RPC. Use la notación [servidor]:puerto de IPv6. Esta opción se puede indicar múltiples veces (predeterminado: vincular a todos los interfaces)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>No se ha podido escribir en el índice de transacciones</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Cambiar el comportamiento de votos de presupuesto finalizado automático. mode=auto: Votar sólo a la coincidencia exacta del presupuesto finalizado para mi presupuesto generado. (cadena de texto, predeterminado: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>No se han podido escribir los datos de deshacer</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limitar continuamente las transacciones gratuitas a &lt;n&gt;*1000 bytes por minuto (predeterminado:%u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Comisión por KB que se añade a las transacciones que envíe</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Crear archivos nuevos con los permisos por defecto del sistema, en lugar de umask 077 (sólo será efectivo con la funcionalidad del monedero desactivada)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Las comisiones inferiores se consideran comisión cero (a efectos de propagación) (predeterminado:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Borrar todas las transacciones del monedero y recuperar únicamente aquellas partes de la cadena de bloques a través de -rescan en el inicio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forzar modo seguro (predeterminado: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Desactivar todas las funciones asociadas al Nodo Maestro y Darksend (0-1, predeterminado: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generar dashs (predeterminado: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribuido bajo la licencia de software MIT, vea el archivo COPYING adjunto o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Recibir ayuda para un comando</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Activar InstantX, mostrar las confirmaciones de transacciones bloqueadas (booleano, predeterminado: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Cuántos bloques comprobar al inicio (predeterminado: 288, 0 = todos)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Activar uso automatizado de Darksend para los fondos almacenados en este monedero (0-1, predeterminado: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Si no se proporciona &lt;category&gt;, mostrar toda la información de depuración</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Error: Se encontró el argumento no permitido -socks. Ajustar la versión de SOCKS ya no es posible, sólo se admiten proxies SOCKS5</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Las comisiones (en DASH/Kb) menores a ésta se consideran como cero a efectos de transmisión (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Las comisiones (en DASH/Kb) menores a ésta se consideran como cero a efectos de creación de transacciones (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Volcar la actividad de la base de datos desde el grupo de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4, predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si no se fija la comisión de pago por transferencia o paytxfee, incluir la comisión suficiente para que las transacciones comiencen a confirmarse de media en n bloques (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Cuantía no válida para -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (debe de ser al menos la comisión mínima de la transmisión de %s para evitar transacciones atascadas)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Registrar prioridad de las transacciones y la comisión por kB al minar bloques (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Mantener índice de transacciones completo, utilizado por la llamada rpc getrawtransaction (predeterminado: 0)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Tamaño máximo de datos en las transacciones de portadora de datos que transmitimos y minamos (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Máximo total de comisiones a usar en una única transacción, ajustándolo muy bajo puede abortar grandes transacciones (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Información de salida para depuración (predeterminado: %u, proporcionar una &lt;category&gt; es opcional)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Ofrecer liquidez a Darksend mezclando dash con poca frecuencia y de forma continua (0-100, predeterminado: %u, 1=muy frecuente, comisiones altas, 100=muy pocas veces, comisiones bajas)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Requerir una prioridad alta para transmitir transacciones gratuitas o con bajas comisiones (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Establecer el número de hilos para la generación de dash cuando ésta se encuentra activada (-1 = todos los núcleos, predeterminado: %d)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Mostrar N confirmaciones para una transacción bloqueada con éxito (0-9999, predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Este producto incluye software desarrollado por el Proyecto OpenSSL para su uso en el Toolkit OpenSSL &lt;https://www.openssl.org/&gt; y software criptográfico escrito por Eric Young y software UPnP escrito por Thomas Bernard.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>Para usar dashd, o la opción -server de dash-qt, debe establecer rpcpassword en el archivo de configuración:
+%s
+Es recomendable que use la contraseña aleatoria siguiente:
+rpcuser=dashrpc
+rpcpassword=%s
+(no necesita recordar esta contraseña)
+El nombre de usuario y la contraseña NO DEBEN ser iguales.
+Si el archivo no existe, créelo con permisos de sólo lectura para su propietario.
+También resulta recomendable establecer alertnotify para que se le notifique de posibles problemas;
+por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo.com
+</translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Usar proxy SOCKS5 independiente para comunicarse con otros pares mediante servicios ocultos de la red Tor (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Aviso: ¡-maxtxfee se estableció en un valor muy alto! Comisiones tan grandes no se podrían pagar en una única transacción.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Aviso: ¡Por favor compruebe que la fecha y hora de su computadora son correctas! Si su reloj está mal ajustado, Dash Core no funcionará correctamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ignorar Masternodes de versión inferior (ejemplo: 70050; por defecto: 0)</translation>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Pares de la lista blanca conectándose desde la máscara de red o dirección IP facilitadas. Se pueden especificar múltiples veces.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Los pares de la lista blanca no pueden ser excluidos por DoS y sus transacciones siempre se transmitirán, incluso si ya se encuentran en el grupo de memoria, útil e.g. para una pasarela</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; puede ser:
+</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Admitir peticiones REST públicas (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Cifrados admitidos (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Solicitar siempre direcciones de pares mediante búsqueda de DNS (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>No se puede resolver la dirección -whitebind: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Conectarse a través de un proxy SOCKS5</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Conectarse a KeePassHttp a través del puerto &lt;port&gt; (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Los Desarrolladores de Bitcoin Core</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i Los Desarrolladores de Dash Core</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>No se pudo intrepretar el valor -rpcbind %s como una dirección de red</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend está parado.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Solicitud Darksend completada:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Petición de Darksend incompleta:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Desactivar el modo seguro, no considerar un suceso real de modo seguro (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Activar el cliente para que se comporte como un nodo maestro (0-1, predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Error al conectar al Nodo Maestro.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Error al cargar wallet.dat: El monedero requiere una versión más reciente de Dash Core</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Error: Se produjo un error interno fatal, vea debug.log para más detalles</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Error: Se encontró el argumento no soportado -tor, use -onion.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Comisión (en DASH/kB) a añadir sobre las transacciones que envíe (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Finalizando transacción.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forzar modo seguro (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Se encontraron suficientes usuarios, firmando (esperando %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Se encontraron suficientes usuarios, firmando...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Generar dash (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Cuántos bloques se comprueban durante el inicio (predeterminado: %u, 0 = todos)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Ignorar nodos maestros cuya versión sea inferior a la indicada (ejemplo: 70050; predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importando...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa los bloques desde un archivo blk000??.dat externo</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Incluir direcciones IP en la salida de depuración (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Modo incompatible.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Versión incompatible.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloque génesis incorrecto o no encontrado. ¿Es el directorio datadir incorrecto para la red?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Información</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>La comprobación de validez de inicio falló. Dash Core se está cerrando.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>La entrada no es válida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>Opciones de InstantX:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Fondos insuficientes</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Fondos insuficientes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Dirección -onion inválida: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Dirección -proxy inválida: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Cuantía inválida para -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Cuantía inválida para -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Cuantía inválida para -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Cuantía inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos; (debe ser al menos %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Cuantía inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Cuantía no válida</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>La última acción de Darksend exitosa era demasiado reciente.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limitar el tamaño de la caché de firma a &lt;n&gt; registros (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escuchar a conexiones JSON-RPC en el &lt;port&gt; (predeterminado: %u ó testnet: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Escuchar a las conexiones en el &lt;port&gt; (predeterminado: %u ó testnet: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Asegurar nodos maestros a partir del archivo de configuración del nodo maestro (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: &amp;u)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Buffer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Buffer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Mezclado en curso...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Ha de indicar un puerto con -whitebind: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>No se detectaron Nodos Maestros.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>No se encontró un Nodo Maestro compatible.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Ausente de la lista de Nodos Maestros.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Número de copias de seguridad automáticas del monedero (predeterminado: 10)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Admitir sólo la cadena de bloques que concuerde con los puntos de control incorporados (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Conectar sólo a los nodos de la red &lt;net&gt; (IPv4, IPv6 u onion)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Anteponer marca temporal a la salida para depuración (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Correr un hilo para volcar el monedero periódicamente (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Enviar las transacciones como transacciones con cero comisiones si es posible (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Archivo de certificado del servidor (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Clave privada del servidor (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>La sesión caducó, por favor reenvíela de nuevo.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Establecer el tamaño del grupo de claves a &lt;n&gt; (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Establecer tamaño mínimo del bloque en bytes (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Establece la opción DB_PRIVATE en el entorno de base de datos del monedero (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Indicar el archivo de configuración (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Indicar tiempo máximo de desconexión en milisegundos (mínimo: 1, predeterminado: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Indicar archivo de configuración del nodo maestro (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Indicar archivo de pid (predeterminado: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Gastar el cambio no confirmado al enviar las transacciones (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Detener la ejecución después de importar los bloques desde el disco (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Se han enviado la entradas siguientes al nodo maestro: %u / %d</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Enviado al nodo maestro, esperando a más entradas ( %u / %d ) %s</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Enviado al nodo maestro, esperando en cola %s</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>Esto no es un Nodo Maestro.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>sar la integración de KeePass2 con el conector KeePassHttp (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Usar N nodos maestros distintos para generar fondos anónimos (2-8, predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>El monedero se ha de reescribir: reinicie Dash Core para completarlo</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Aviso: El argumento no permitido -benchmark se ignoró, use -debug=bench.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Aviso: El argumento no permitido -debugnet se ignoró, use -debug=net.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Se volverá a intentar...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
-        <translation>Masternodeprivkey inválida. Por favor, lea la  documentación.</translation>
+        <translation>La clave prinvada del nodo maestro no es válida. Por favor, consulte la  documentación.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>La máscara de red especificada en -whitelist no es válida: &apos;%s&apos; </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Clave privada inválida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Script inválido detectado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>Identificación del KeePassHttp para la asociación establecida</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>Clave KeePassHttp para la comunicación cifrada AES con KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Mantenga N dashs anónimos (por defecto: 0)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Conservar N DASH anónimos (predeterminado: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Mantener a lo sumo &lt;n&gt; bloques no conectables en memoria (por defecto: %u)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Mantenga a lo sumo &lt;n&gt; transacciones no conectables en la memoria (por defecto:% u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>El último Darksend era demasiado reciente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>La última acción Darksend exitosa era demasiado reciente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limitar tamaño de la cache de firmas a &lt;n&gt; entradas (predeterminado: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Listar comandos
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Escuchar las conexiones en &lt;port&gt; (por defecto: 9999 o testnet: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Cargando direcciones...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Cargando el índice de bloques...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Cargando caché del presupuesto...</translation>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Cargando lista de masternodes...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Cargando caché de nodos maestros...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Cargando monedero... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Cargando monedero...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Registrar prioridad de las transacciones y comisión por kB al minar bloques (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantener índice de transacciones completo (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
-        <translation>Opciones del Masternode:</translation>
+        <translation>Opciones del Nodo Maestro:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
-        <translation>La cola del masternode está llena.</translation>
+        <translation>La cola del nodo maestro está llena.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
-        <translation>Masternode:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Búfer máximo de recepción por conexión, &lt;n&gt;*1000 bytes (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Búfer máximo de envío por conexión, , &lt;n&gt;*1000 bytes (predeterminado: 1000)</translation>
+        <translation>Nodo Maestro:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Información ausente en la transacción de entrada.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>No se ha encontrado un masternode compatible.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>No se han detectado fondos que necesiten denominarse.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>No se han detectado masternodes.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>No se han encontrado denominaciones iguales para mezclar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Opciones de transmisión del nodo:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Se detectó una llave publica en formato no estándar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>No es compatible con las transacciones existentes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>No hay suficientes descriptores de archivo disponibles. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>No se encuentra en la lista de masternodes.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Aceptar solamente cadena de bloques que concuerde con los puntos de control internos (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Conectarse solo a nodos de la red &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Opciones:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Contraseña para las conexiones JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Anteponer marca temporal a la información de depuración (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimir bloque al iniciar, si se encuentra en el índice de bloques</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimir árbol de bloques al iniciar (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opciones SSL de RPC: (véase la wiki de Bitcoin para las instrucciones de instalación de SSL)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Opciones para cliente RPC:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>Opciones de servidor RPC:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Soporte de RPC para conexiones HTTP persistentes (predeterminado: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Ignorar 1 de cada &lt;n&gt; mensajes de red al azar</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Fuzzear 1 de cada &lt;n&gt; mensajes de red al azar</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Transmitir y minar transacciones con portadora de datos (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Transmitir multifirma no P2SH (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Volver a examinar la cadena de bloques en busca de transacciones perdidas del monedero</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Reexplorando...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Ejecutar un hilo (thread) para refrescar el monedero periódicamente (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Ejecutar en segundo plano como daemon y aceptar comandos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opciones SSL: (ver la Bitcoin Wiki para instrucciones de configuración SSL)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Seleccionar versión de SOCKS para -proxy (4 o 5, predeterminado: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Enviar orden a Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comando al nodo situado en &lt;ip&gt; (predeterminado: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Certificado del servidor (predeterminado: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clave privada del servidor (predeterminado: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>¡La sesión no está completa!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>La sesión ha caducado (30 segundos), por favor inténtelo de nuevo.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Establecer tamaño máximo de bloque en bytes (predeterminado: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Establecer tamaño mínimo de bloque en bytes (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
-        <translation>Establezca la clave privada del masternode</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Establecer el número de hilos para atender las llamadas RPC (predeterminado: 4)</translation>
+        <translation>Establezca la clave privada del nodo maestro</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Establece la opción DB_PRIVATE en el entorno de base de datos del monedero (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Muestra todas las opciones de depuración (uso: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Mostrar información de benchmarking (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>No se pudo firmar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>La sesión de firma ha caducado, por favor inténtelo de nuevo.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Falló la firma de la transacción</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Especificar el archivo de configuración (predeterminado: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar el tiempo máximo de desconexión en milisegundos (predeterminado: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Especificar directorio para los datos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Especificar el archivo de configuración del Masternode (predeterminado: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Especificar archivo pid (por defecto: dashd.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar archivo de monedero (dentro del directorio de datos)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Especifique su propia dirección pública</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gastar cambio no confirmado al enviar transacciones (predeterminado: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Iniciar Daemon de Dash Core </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Error de sistema: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Este mensaje de ayuda</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Esto está enfocado a las herramientas de prueba de regresión y desarrollo de aplicaciones.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Esto no es un masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: 100)</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Esto es software experimental.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Para utilizar la opción %s</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Esto está enfocado a las herramientas de prueba de regresión y desarrollo de aplicaciones.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Cuantía de la transacción demasiado pequeña</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Las cuantías en las transacciones deben ser positivas</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transacción creada con éxito.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Las comisiones por transacción son demasiado elevadas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>La transacción no es válida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Transacción demasiado grande para la política de comisiones</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transacción demasiado grande</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>No es posible enlazar con %s en este sistema (bind ha dado el error %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Transmitiendo transacción final.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>No fue posible firmar el Masternode ganador del pago, ¿clave incorrecta?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>No es posible enlazar con %s en este sistema (bind ha dado el error %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>No fue posible firmar el mensaje de spork, ¿clave incorrecta?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Solicitada versión de proxy -socks desconocida: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>La red especificada en -onlynet &apos;%s&apos; es desconocida</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Actualizar el monedero al formato más reciente</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Uso (obsoleto, use dash-cli):</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Estado desconocido: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Uso:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Utilice la integración KeePass 2 usando el plugin KeePassHttp (por defecto: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Utilice N masternodes distintos para anonimizar los fondos (2-8, por defecto: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Actualizar el monedero al formato más reciente</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSL (https) para las conexiones JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para asignar el puerto de escucha (predeterminado: 1 al escuchar)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Usar la red de pruebas</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Nombre de usuario para las conexiones JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>El valor es mayor al máximo permitido por el pool Darksend. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Verificando bloques...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Verificando monedero...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Espere a que se inicie el servidor RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>El monedero %s se encuentra fuera del directorio de datos %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>El monedero está bloqueado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>El monedero necesita ser reescrito: reinicie Dash para terminar</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Opciones de monedero:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Aviso</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Aviso: El argumento obsoleto -debugnet se ignoró, utilice -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versión se ha quedado obsoleta, ¡actualización obligatoria!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Usted necesita reconstruir la base de datos utilizando -reindex para cambiar -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Sus registros se agregaron con éxito.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>¡Se admitió su transacción en el grupo!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Eliminando todas las transacciones del monedero...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>al iniciar</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>versión</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat dañado, falló el rescate</translation>
     </message>
diff --git a/src/qt/locale/dash_fi.ts b/src/qt/locale/dash_fi.ts
index 9d55f263cc27..0f4821e5a9fa 100644
--- a/src/qt/locale/dash_fi.ts
+++ b/src/qt/locale/dash_fi.ts
@@ -1,204 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="fi">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Tietoja Dash Core:sta</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;/b&gt; versio</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Tekijänoikeus &amp;copy; 2009-2014 Bitcoin Core kehittäjät.
-Tekijänoikeus &amp;copy; 2014-YYYY Dash Core kehittäjät.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Tämä on kokeellinen ohjelmisto.
-
-Levitetään MIT/X11 ohjelmistolisenssin alaisuudessa. Tarkemmat tiedot löytyvät tiedostosta COPYING tai osoitteesta http://www.opensource.org/licenses/mit-license.php.
-
-Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin (http://www.openssl.org/), Eric Youngin (eay@cryptsoft.com) kehittämän salausohjelmiston sekä Thomas Bernardin UPnP ohjelmiston.
-
-Käännös päivitetty: 29.3.2015 by AjM.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Tekijänoikeus</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Bitcoin Core kehittäjät</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Dash Core kehittäjät</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Kaksoisklikkaa muokataksesi osoitetta tai nimeä</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Klikkaa hiiren oikealla muokataksesi osoitetta tai nimeä</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Luo uusi osoite</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Uusi</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Kopioi valittu osoite leikepöydälle</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Kopioi</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Poista valittu osoite listalta</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Poista</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Vie auki olevan välilehden tiedot tiedostoon</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Vie...</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>&amp;Sulje</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Valitse osoite johon varat lähetetään</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Valitse vastaanottava osoite</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>&amp;Valitse</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Lähettävä osoite</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Vastaanottava osoite</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Nämä ovat sinun Dash osoitteesi maksujen lähetykseen. Tarkista aina lähetettävä määrä ja vastaanottajan osoite ennen kuin lähetät varoja.</translation>
+        <translation>Nämä ovat Dash osoitteesi maksujen lähetykseen. Tarkista aina lähetettävä määrä ja vastaanottajan osoite ennen kuin lähetät varoja.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Nämä ovat sinun Dash osoitteesi suoritusten vastaanottamiseen. Suositellaan että annat uuden osoitteen kullekin siirtotapahtumalle.</translation>
+        <translation>Nämä ovat Dash osoitteesi suoritusten vastaanottamiseen. Suositellaan että annat uuden osoitteen kullekin siirtotapahtumalle.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopioi Osoite</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Kopioi &amp;Nimi</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Muokkaa</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Vie osoitekirja</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Pilkuilla eritelty tiedosto (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Vienti epäonnistui</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Osoitelistan tallennuksessa tapahtui virhe tiedostoon %1.</translation>
+        <translation>Osoitelistan tallennuksessa tapahtui virhe tiedostoon %1. Yritä uudelleen.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(ei nimeä)</translation>
     </message>
@@ -206,155 +143,150 @@ Käännös päivitetty: 29.3.2015 by AjM.</translation>
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Salasanan Dialogi</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Kirjoita salasana</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Uusi salasana</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Uusi salasana uudelleen</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Poistaa käytöstä rahojen lähetyksen kun käyttöjärjestelmän käyttäjätili on vaarantunut. Ei tarjoa oikeaa turvallisuutta.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Vain anonymisointia varten</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Anna lompakolle uusi salasana.&lt;br/&gt;Käytä salasanaa jossa on ainakin  &lt;b&gt;10 satunnaista mekkiä&lt;/b&gt; tai &lt;b&gt;kahdeksan sanaa&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Anna lompakolle uusi salasana.&lt;br/&gt;Käytä salasanaa jossa on ainakin  &lt;b&gt;10 satunnaista mekkiä&lt;/b&gt; tai &lt;b&gt;kahdeksan sanaa&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Salaa lompakko</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Tätä toimintoa varten sinun täytyy antaa lompakon salasana sen avaamiseksi.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Avaa lompakko</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Tätä toimintoa varten sinun täytyy antaa lompakon salasana salauksen purkuun.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Pura lompakon salaus</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Vaihda salasana</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Anna vanha ja uusi salasana.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Vahvista lompakon salaus</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
-        <translation>Varoitus: Jos salaat lompakon ja unohdat salasanan,
-&lt;b&gt;MENETÄT KAIKKI DASHISI&lt;/b&gt;!</translation>
+        <translation>Varoitus: Jos salaat lompakon ja unohdat salasanan, &lt;b&gt;MENETÄT KAIKKI DASHisi&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Haluatko varmasti salata lompakkosi?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Lompakko salattu</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
-        <translation>Dash sulkeutuu nyt salauksen viimeistelyä varten. Muista että salaus pelkästään ei voi estää dashiesi varastamista jos koneesi saastuu haittaohjelmilla tai viruksilla.</translation>
+        <translation>Dash sulkeutuu nyt salauksen viimeistelyä varten. Muista että salaus pelkästään ei voi estää Dashiesi varastamista jos koneesi saastuu haittaohjelmilla tai viruksilla.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>TÄRKEÄÄ: Kaikki vanhat lompakon varmuuskopiot pitäisi korvata uusilla salatuilla varmuuskopioilla. Turvallisuussyistä edelliset salaamattomat varmuuskopiot muuttuvat turhiksi kun aloitat uuden salatun lompakon käytön.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Lompakon salaus epäonnistui</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Lompakon salaaminen epäonnistui sisäisen virheen vuoksi. Lompakkoasi ei salattu.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Annetut salasanat eivät täsmää.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Lompakon avaaminen epäonnistui.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Annettu salasana oli väärä.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Lompakon salauksen purku epäonnistui.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Lompakon salasana vaihdettiin onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Varoitus: Caps Lock on käytössä!</translation>
     </message>
@@ -362,437 +294,425 @@ Käännös päivitetty: 29.3.2015 by AjM.</translation>
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Lompakko</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Solmu</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testiverkko]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Yleisnäkymä</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Lompakon tilanteen yleisnäkymä</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Lähetä</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Lähetä varoja Dash osoitteeseen</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Vastaanota</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Pyydä maksuja (Luo QR koodit ja Dash: URIt)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Tapahtumat</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Selaa tapahtumahistoriaa</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>L&amp;opeta</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Sulje ohjelma</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Tietoja Dash Core:sta</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Näytä tietoja Dash Core:sta</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Näytä tietoja Dash Core:sta</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Tietoja &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Näytä tietoja QT:sta</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Asetukset...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Muuta Dash asetuksia</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Näytä / Piilota</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Näytä tai piilota Dash pääikkuna</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Salaa Lompakko...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Salaa yksityiset avaimet jotka kuuluvat lompakkoosi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Varmuuskopioi Lompakko...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Varmuuskopioi lompakko toiseen sijaintiin</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Vaihda Salasana...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Vaihda lompakon salaukseen käytettävä salasana</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Avaa Lompakko...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Avaa lompakko</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Lukitse Lompakko</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>&amp;Allekirjoita Viesti...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Allekirjoita viestit Dash osoitteillasi todistaaksesi että omistat ne</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>Tarkista &amp;Viesti...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Tarkista viestit ollaksesi varma että ne on allekirjoitettu määritetyillä Dash osoitteilla</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>T&amp;ietoa</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Näytä diagnostiikka tietoja</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
-        <translation>&amp;Testausikkuna</translation>
+        <translation>&amp;Testauskonsoli</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
-        <translation>Avaa testausikkuna</translation>
+        <translation>Avaa testauskonsoli</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Verkkoliikenne</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Näytä verkkoliikenne</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>&amp;Peers Lista</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Näytä verkon peers tietoja</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Lompakon &amp;Korjaus</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Näytä lompakon korjausvalinnat</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Avaa &amp;Asetustiedosto</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Avaa asetustiedosto</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Näytä Automaattiset &amp;Varmistukset</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Näytä automaattisesti tehdyt lompakon varmistukset</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Lähettävät Osoitteet...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Näytä lähettämiseen käytettyjen osoitteiden ja nimien lista</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>&amp;Vastaanottavat Osoitteet...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Näytä vastaanottamiseen käytettyjen osoitteiden ja nimien lista</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Avaa &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Avaa Dash: URI tai maksupyyntö</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Komentorivin valinnat</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash Core asiakasohjelma</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Käsitelty %n lohko tapahtumahistoriasta.</numerusform><numerusform>Käsitelty %n lohkoa tapahtumahistoriasta.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Näytä Dash Core ohjelista komentorivin valinnoista</translation>
+        <translation>Näytä Dash Core ohjelista komentorivin valinnoista</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Tiedosto</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Asetukset</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Työkalut</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Apua</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Välilehtipalkki</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Dash asiakasohjelma</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n aktiivista yhteyttä Dash verkkoon</numerusform>
-            <numerusform>%n aktiivista yhteyttä Dash verkkoon</numerusform>
-        </translation>
+        <translation><numerusform>%n aktiivinen yhteys Dash verkkoon</numerusform><numerusform>%n aktiivista yhteyttä Dash verkkoon</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Synkronoidaan verkkoon...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Tuodaan lohkoja levyltä...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Uudelleen indeksoidaan lohkoja...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Lohkojen lähdettä ei saatavilla...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Käsitelty %1 lohkoa tapahtumahistoriasta.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Tapahtumahistoria on ajan tasalla</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n tunti(a)</numerusform>
-            <numerusform>%n tunti(a)</numerusform>
-        </translation>
+        <translation><numerusform>%n tunti</numerusform><numerusform>%n tuntia</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n päivä(ä)</numerusform>
-            <numerusform>%n päivä(ä)</numerusform>
-        </translation>
+        <translation><numerusform>%n päivä</numerusform><numerusform>%n päivää</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n viikko(a)</numerusform>
-            <numerusform>%n viikko(a)</numerusform>
-        </translation>
+        <translation><numerusform>%n viikko</numerusform><numerusform>%n viikkoa</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 ja %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n vuosi(a)</numerusform>
-            <numerusform>%n vuosi(a)</numerusform>
-        </translation>
+        <translation><numerusform>%n vuosi</numerusform><numerusform>%n vuotta</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 jäljessä</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Saavutetaan verkkoa...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Viimeisin vastaanotettu lohko luotu %1 sitten.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Tämän jälkeiset siirtotapahtumat eivät ole vielä näkyvissä.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Varoitus</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Tietoa</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Lähetetty siirtotapahtuma</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Saapuva siirtotapahtuma</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -805,30 +725,25 @@ Osoite: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Lompakko on &lt;b&gt;salattu&lt;/b&gt; ja tällä hetkellä &lt;b&gt;avoinna&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Lompakko on &lt;b&gt;salattu&lt;/b&gt; ja tällä hetkellä &lt;b&gt;avoinna&lt;/b&gt; vain anonymisointia varten</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Lompakko on &lt;b&gt;salattu&lt;/b&gt; ja tällä hetkellä &lt;b&gt;lukittu&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Vakava virhe tapahtunut. Dash ei voi enää toimia turvallisesti ja sulkeutuu.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Verkkohälytys</translation>
     </message>
@@ -836,333 +751,302 @@ Osoite: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Kolikkokontrollin osoitteen valinta</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Määrä:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Tavuja:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Määrä:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Prioriteetti:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
-        <translation>Palkkio:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Pieni Tuotos</translation>
+        <translation>Siirtomaksu:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Kolikko Valinta</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tomu:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
-        <translation>Palkkion jälkeen:</translation>
+        <translation>Siirtomaksun jälkeen:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Vaihtoraha:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>Poista kaikki valinnat</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Puurakenne</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Listarakenne</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 lukittu)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Vastaanotettu nimellä</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Nimi</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Osoite</translation>
+        <translation>Vastaanotettu osoitteeseen</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Darksend Kierrokset</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Päivämäärä</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Vahvistuksia</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Vahvistettu</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Prioriteetti</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Kopioi osoite</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Kopioi nimi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Kopioi määrä</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Kopioi siirtotunnus</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Lukitse käyttämättömät</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Avaa käyttämättömät</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Kopioi määrä</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
-        <translation>Kopioi palkkio</translation>
+        <translation>Kopioi siirtomaksu</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
-        <translation>Kopioi palkkion jälkeen</translation>
+        <translation>Kopioi siirtomaksun jälkeen</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Kopioi tavut</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Kopioi prioriteetti</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopioi tomu</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Kopioi pieni tuotos</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Kopioi vaihtoraha</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Ei anonyymeja syötteitä valittu. &lt;b&gt;Darksend poistetaan käytöstä.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Jos silti haluat käyttää Darksend:iä, poista ei anonyymit valinnat ensin ja valitse uudelleen Darksend optio.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>korkein</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>korkeampi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>korkea</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>keski-korkea</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Voi vaihdella +/- %1 duff(s) per syöte.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>e/s</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>keskisuuri</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>pieni-keskisuuri</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>pieni</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>pienempi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>pienin</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 lukittu)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>ei mitään</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Tomu</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>kyllä</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>ei</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Tämä nimi muuttuu punaiseksi jos siirtotapahtuman koko on suurempi kuin 1000 tavua.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
-        <translation>Tämä tarkoittaa että vähintään %1 per kB palkkio on pakollinen.</translation>
+        <translation>Tämä tarkoittaa että vähintään %1 per kB siirtomaksu on pakollinen.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Voi vaihdella +/- 1 tavu per syöte</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Siirtotapahtumat korkeammalla prioriteetilla sisällytetään varmemmin lohkoon.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Tämä nimi muuttuu punaiseksi jos prioriteetti on pienempi kuin &quot;keskisuuri&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Tämä nimi muuttuu punaiseksi jos vastaanottaja saa pienemmän määrän kuin %1</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Tämä tarkoittaa että vähintään %1 palkkio on pakollinen.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Maksumäärät alle 0.546 kertaa vähimmäispalkkion näytetään tomuna.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Tämä nimi muuttuu punaiseksi jos vaihtoraha on alle %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(ei nimeä)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>Vaihda %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(vaihtoraha)</translation>
     </message>
@@ -1170,84 +1054,84 @@ Osoite: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Darksend Asetukset</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Perustason Yksityisyys</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Korkean tason Yksityisyys</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Maksimaalinen Yksityisyys</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Valitse yksityisyyden taso.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Käytä 2 erillistä masternodea sekoittaaksesi varoja</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Käytä 8 erillistä masternodea sekoittaaksesi varoja</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Käytä 16 erillistä masternodea</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Tämä vaihtoehto on nopein ja maksaa noin ~0.025 DASH kun anonymisoidaan 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Tämä vaihtoehto on keskinopea ja maksaa noin ~0.05 DASH kun anonymisoidaan 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH maksu per 1000 DASH jonka anonymisoit.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Tämä vaihtoehto on hitain ja kaikkein anonyymi. Suurimman yksityisyyden käyttö maksaa</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Darksend Asetukset</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend on asetettu perusasetuksiin (%1 and 2 kierrosta). Voit muuttaa asetuksia milloin vain Dash asetuksista.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend on asetettu keskitason asetuksiin (%1 and 8 kierrosta). Voit muuttaa asetuksia milloin vain Dash asetuksista.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend on asetettu maksimitason asetuksiin (%1 and 16 kierrosta). Voit muuttaa asetuksia milloin vain Dash asetuksista.</translation>
     </message>
@@ -1255,67 +1139,67 @@ Osoite: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Muokkaa osoitetta</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Nimi</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Tähän osoitteeseen liitetty nimi</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Osoite</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Osoite liitettynä tähän osoitekirjan alkioon. Tämä voidaan muokata vain lähetysosoitteissa.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Uusi vastaanottava osoite</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Uusi lähettävä osoite</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Muokkaa vastaanottavaa osoitetta</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Muokkaa lähettävää osoitetta</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>Annettu osoite &quot;%1&quot; ei ole pätevä Dash osoite.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Osoite &quot;%1&quot; on jo osoitekirjassa.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Lompakkoa ei voitu avata.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Uuden avaimen luonti epäonnistui.</translation>
     </message>
@@ -1323,27 +1207,27 @@ Osoite: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
-        <translation>Luodaan uusi datakansio.</translation>
+        <translation>Luodaan uusi datahakemisto.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Hakemisto on jo olemassa. Lisää %1 jos tarkoitus on luoda hakemisto tänne.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
-        <translation>Polku on jo olemassa, eikä se ole kansio.</translation>
+        <translation>Polku on jo olemassa, eikä se ole hakemisto.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Ei voida luoda datahakemistoa tänne.</translation>
     </message>
@@ -1351,72 +1235,68 @@ Osoite: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Komentorivi vaihtoehdot</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>versio</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bitti)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Tietoja Dash Core:sta</translation>
+        <translation>Tietoja Dash Core:sta</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Komentorivin valinnat</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Käyttö:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>komentorivi parametrit</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Käyttöliittymän asetukset</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
-        <translation>Valitse data-hakemisto käynnistyksessä (oletus: 0)</translation>
+        <translation>Valitse datahakemisto käynnistyksessä (oletus: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Aseta kieli, esim. &quot;fi_FI&quot; (oletus: sama kuin järjestelmän)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Käynnistä pienennettynä</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Aseta SSL root varmenne maksupyynnöille (oletus: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Näytä aloitusruutu käynnistettäessä (oletus: 1)</translation>
     </message>
@@ -1424,108 +1304,86 @@ Osoite: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Tervetuloa</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Dash Core - Tervetuloa.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Koska tämä on ensimmäinen kerta kun ohjelma käynnistetään, voit valita minne Dash Core tallettaa datansa.
 Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd levyltä, ohjaa talletettava data eri levyasemalle turvalliseen paikkaan.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core lataa ja tallettaa kopion lohkoketjusta. Vähintään %1GB dataa talletetaan tähän hakemistoon, ja se myös kasvaa ajan myötä. Myös lompakko talletetaan tähän hakemistoon.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Käytä oletushakemistoa</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Määritä oma hakemisto:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Virhe: Annettua data-hakemistoa &quot;%1&quot; ei voida luoda.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Virhe: Annettua datahakemistoa &quot;%1&quot; ei voida luoda.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB vapaata levytilaa</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB vapaata levytilaa</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(tarvitaan %1GB)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(tarvitaan %1GB)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Avaa URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Avaa maksupyyntö URI:sta tai tiedostosta</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Valitse maksupyynnön tiedosto</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Valitse avattava maksypyynnön tiedosto</translation>
     </message>
@@ -1533,313 +1391,281 @@ Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Asetukset</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Yleiset</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Käynnistä Dash automaattisesti kun järjestelmään kirjaudutaan.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Käynnistä Dash järjestelmään kirjauduttaessa</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>&amp;Tietokannan välimuistin koko</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Script &amp;vahvistuksien säikeiden määrä</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = auto, &lt;0 = jätä näin monta prosessorin ydintä vapaaksi)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tämä asetus määrittää kuinka monen erillisen masternoden kautta syötteen anonymisointi tehdään. Mitä enemmän anonymisoinnin kierroksia, sen parempi yksityisyys, mutta se myös maksaa enemmän siirtomaksuina.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Kuinka montaa Darksend kierrosta käytetään</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Tämä määrä toimii rajana keskeytykselle kun Darksend anonymisointi sen saavuttaa.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Dash määrä joka pidetään anonymisoituna</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>&amp;Lompakko</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Hyväksy yhteydet ulkopuolelta</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Salli sisään tulevat yhteydet</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kytkeydy Dash verkkoon käyttäen SOCKS5 proxy:a.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Yhdistä SOCKS5 proxyn kautta (oletus: proxy):</translation>
     </message>
     <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Valinnainen siirtopalkkio per kB auttaa varmistamaan että siirtotapahtumasi prosessoidaan nopeasti. Useimmat siirtotapahtumat ovat alle 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Maksa siirtotapahtuman &amp;palkkio</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Expertti</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Näytetäänkö kolikkokontrollin ominaisuuksia vai ei</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Ota käytöön &amp;kolikkokontrolli ominaisuudet</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Jos poistat vahvistamattomien vaihtorahojen käytön, siirtotapahtuman vaihtorahaa ei voida käyttää ennen vähintään yhtä vahvistusta. Tämä vaikuttaa myös kuinka saldosi lasketaan.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Käytä vahvistamattomia vaihtorahoja</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Verkko</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Avaa automaattisesti Dash asiakasohjelmalle portti reitittimeen. Tämä toimii vain jos reitittimesi tukee UPnP:tä ja se on käytössä.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Kartoita portti käyttäen &amp;UPnP:tä</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Kytkeydy Dash verkkoon käyttäen SOCKS proxy:a.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Yhdistä SOCKS proxyn kautta (oletus: proxy):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP osoite proxy:lle (esim. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Portti</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Proxyn portti (esim. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">SOCKS &amp;Versio</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Proxy:n SOCKS versio (esim. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Ikkuna</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Näytä ainoastaan ikoni ilmaisinalueella ikkunan pienentämisen jälkeen.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Pienennä ilmaisinalueelle työkalurivin sijasta</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Ikkunaa suljettaessa pienennä Dash asiakasohjelman ikkuna lopettamatta itse ohjelmaa. Kun tämä asetus on valittuna, ohjelman voi sulkea vain valitsemalla Lopeta ohjelman valikosta.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>P&amp;ienennä suljettaessa</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Käyttöliittymä</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Käyttöliittymän kieli</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>Käyttöliittymän kieli asetetaan tässä, Asetus tulee voimaan kun Dash asiakasohjelma käynnistetään uudelleen.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Puuttuuko sopiva kieli tai käännös on kesken? Auta käännöstyössä täällä:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Käyttöliittymän Teema:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>Yksikkö joina määrät näytetään</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Valitse mitä yksikköä käytetään ensisijaisesti varojen määrien näyttämiseen.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Näytetäänkö Dash osoitteet siirtotapahtumalistassa vai ei.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Näytä osoitteet siirtotapahtumalistassa</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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>Ulkopuoliset URL-osoitteet (esim. lohkoselain,) jotka esiintyvät tapahtumat-välilehdellä valikossa. %s URL-osoitteessa korvataan siirtotunnuksella. Useampi URL-osoite on eroteltu pystyviivalla |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>Kolmannen osapuolen siirtotapahtuma URL:t</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Aktiiviset komentorivivalinnat jotka ohittavat ylläolevat valinnat:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Palauta kaikki asetukset oletusarvoihin.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Palauta Asetukset</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Peruuta</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>oletus</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>ei mitään</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Vahvista asetusten palautus</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Ohjelman uudelleen käynnistys aktivoi muutokset käyttöön.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Ohjelma suljetaan, haluatko jatkaa?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Tämä muutos vaatii ohjelman uudelleen käynnistyksen.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Antamasi proxyn osoite on virheellinen.</translation>
     </message>
@@ -1847,368 +1673,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Lomake</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Lompakko</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>Näytetyt tiedot eivät välttämättä ole ajan tasalla. Lompakkosi synkronoituu automaattisesti Dash verkkoon kun yhteys on muodostettu, mutta tämä prosessi ei vielä ole valmis.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Käytettävissä:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Nykyinen käytettävissä oleva saldo</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Vahvistamatta:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Vahvistamattomien siirtotapahtumien summa, jota ei vielä lasketa käytettävissä olevaan saldoon</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
-        <translation>Vahvistamatta:</translation>
+        <translation>Kypsymättä:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Louhittu saldo, joka ei ole vielä kypsynyt</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldot</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Vahvistamattomat tapahtumat vain-luku osoitteisiin</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Louhittu saldo vain-luku osoitteisiin, joka ei ole vielä kypsynyt</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Saldo Yhteensä:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Saldo yhteensä tällä hetkellä</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldo yhteensä vain-luku osoitteissa</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Vain-luku:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Nykyinen käytettävissä oleva saldo vain-luku osoitteissa</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Käytettävissä:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Tila:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Käytössä/Ei käytössä</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Valmiina:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Darksend Saldo:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Määrä ja Kierrokset:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Kierrosta</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Lähetetyt Denom:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Masternodelle lähetetyt denominoinnit. Jotta sekoitus onnistuisi, täytyy muiden käyttäjien käyttää saman arvoisia denominointeja.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>e/s</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Viimeisimmät tapahtumat</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Käynnistä/Lopeta Sekoitus</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Masternodelle lähetetyt denominoinnit.&lt;br&gt;Jotta sekoitus onnistuisi, täytyy muiden käyttäjien käyttää saman arvoisia denominointeja.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Viimeisin Viesti)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Yritä manuaalisesti esittää Darksend sekoituspyyntö.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Yritä Sekoittaa</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Nollaa nykyinen Darksend tila (voi keskeyttää Darksend sekoituksen, joka voi maksaa ylimääräisiä kuluja)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Nollaus</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Viimeisimmät tapahtumat&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>Ei ajan tasalla</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Ei käytössä</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Käynnistä Darksend Sekoitus</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Lopeta Darksend Sekoitus</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Syötteitä ei havaittu</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Kierros</numerusform><numerusform>%n Kierrosta</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Löytyi vahvistamattomia syötteitä, odotetaan että ne vahvistetaan uudelleen laskentaa varten.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Kierrosta</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Käytössä</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>Valmiina: %1% (syötteillä on keskimäärin %2 kierrosta %n:sta kierroksesta)</numerusform><numerusform>Valmiina: %1% (syötteillä on keskimäärin %2 kierrosta %n:sta kierroksesta)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Löytyi tarpeeksi yhteensopivia syötteitä anonymisointiin %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Ei tarpeeksi yhteensopivia syötteitä anonymisointiin &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;anonymisoidaan &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; sen sijaan</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Käytössä</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Viimeisin Darksend viesti:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend odottaa.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>Sekoitus käynnissä...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Darksend pyyntö valmis: Tapahtuma on hyväksytty varantoon!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Esitettiin seuraavia merkintöjä masternodelle:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Esitetty masternodelle, odotetaan lisää merkintöjä</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Löytyi tarpeeksi käyttäjiä, kirjaudutaan ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Löytyi tarpeeksi käyttäjiä, kirjaudutaan (odotetaan.)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Löytyi tarpeeksi käyttäjiä, kirjaudutaan (odotetaan..)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Löytyi tarpeeksi käyttäjiä, kirjaudutaan (odotetaan...)</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Lähetetään viimeistä siirtotapahtumaa.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Viimeistellään siirtotapahtumaa.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Darksend pyyntö kesken:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Yritetään uudelleen...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Darksend pyyntö valmis:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Esitetty masternodelle, odotetaan .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Esitetty masternodelle, odotetaan ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Esitetty masternodelle, odotetaan ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Tuntematon tila:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>e/s</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend nollattu onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksendin käyttö vaatii vähintään %1.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Lompakko on lukittu ja käyttäjä ei avannut sitä. Darksend asetetaan pois käytöstä.</translation>
     </message>
@@ -2216,141 +1948,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Maksupyyntövirhe</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
-        <translation>Ei voi käynnistää dashia: click-to-pay handler</translation>
-    </message>
-    <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Verkkohallinnan varoitus</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Aktiivinen proxy:si ei tue SOCKS5, joka on pakollinen maksupyynnöissä proxyn kautta.</translation>
+        <translation>Ei voi käynnistää Dashia: click-to-pay handler</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>URI käsittely</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Maksupyynnön haku URL on virheellinen: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">URI:a ei voida jäsentää! Tämä voi johtua virheellisestä Dash osoitteesta tai virheellisestä URI:n muuttujasta. </translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Maksupyynnön tiedoston käsittely</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Maksupyynnön tiedostoa ei voida lukea tai prosessoida! Tämä voi johtua virheellisestä maksupyyntötiedostosta.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Virheellinen maksuosoite %1</translation>
+        <translation>Virheellinen maksuosoite %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>URI:a ei voida jäsentää! Tämä voi johtua virheellisestä Dash osoitteesta tai virheellisestä URI:n muuttujasta. </translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyynnön tiedostoa ei voida lukea! Tämä voi johtua virheellisestä maksupyyntötiedostosta.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyyntö hylätty</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyynnon verkko ei täsmää asiakasverkkon kanssa.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyyntö on vanhentunut.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyyntö ei ole alustettu.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Vahvistamattomia maksupyyntöjä kustomoituun maksupalvelun scripteihin ei tueta.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Maksupyyntö %1 on liian pieni (lasketaan tomuksi).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Maksupalautus %1:sta</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyyntö %1 on liian iso (%2 tavua, sallitusta %3 tavusta).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksupyyntö DoS suojaus</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Virhe kommunikoidessa %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Maksupyyntöä ei voida jäsentää tai prosessoida!</translation>
+        <translation>Maksupyyntöä ei voida jäsentää!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Epäkelpo vastaus palvelimelta %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Tietoverkon pyyntövirhe</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Rahansiirto tunnistettu</translation>
     </message>
@@ -2358,139 +2070,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Osoite/Insäntänimi</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Käyttäjäohjelma</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Vastausaika</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Virhe: Annettua data-hakemistoa &quot;%1&quot; ei ole olemassa.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Virhe: Ei voida jäsentää asetustiedostoa: %1. Käytä vain avain=arvo syntaksia.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Virhe luettaessa masternoden asetustiedostoa: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Virhe: Virheellinen yhdistelmä -regtest ja -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core ei ole vielä sulkeutunut turvallisesti...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Syötä Dash osoite (esim. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Määrä</translation>
+        <translation>Määrä</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Syötä Dash osoite (esim. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>VERKKO</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>TUNTEMATON</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Ei mitään</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">e/s</translation>
+        <translation>e/s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Tallenna Kuva...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Kopioi kuva</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Tallenna QR-koodi</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>PNG kuva (*.png)</translation>
     </message>
@@ -2498,436 +2169,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Työkaluikkuna</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>T&amp;ietoa</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Masternodet määrä</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Yleinen</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Asiakasohjelman nimi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>e/s</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Yhteyksien määrä</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Avaa Dash debug lokitiedosto nykyisestä datahakemistosta. Tämä saattaa kestää muutaman sekunnin isoilla tiedostoilla.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Avaa</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Käynnistysaika</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Verkko</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Viimeisimmän lohkon aika</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Debug lokitiedosto</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
-        <translation>Käytössä oleva OpenSSL-versio</translation>
+        <translation>Käytössä oleva OpenSSL versio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Ohjelman päiväys</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Nykyinen lohkojen määrä</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Asiakasohjelman versio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Käytössä oleva BerkeleyDB versio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Lohkoketju</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsoli</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Tyhjennä konsoli</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Verkkoliikenne</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Tyhjennä</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Yhteensä</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Vastaanotettu</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Lähetetty</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Peers</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Valitse peer nähdäksesi tarkempia tietoja.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Suunta</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Versio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Käyttäjäohjelma</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Palvelut</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Aloituskorkeus</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Synkronointikorkeus</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Kieltopisteet</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Yhteysaika</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Viimeinen lähetys</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Viimeinen vastaanotto</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Tavuja lähetetty</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Tavuja vastaanotettu</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Vastausaika</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Lompakon Korjaus</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Pelasta lompakko</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Skannaa uudelleen lohkoketju</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Palauta tapahtumat 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Palauta tapahtumat 2</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Päivitä lompakon formaatti</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Painikkeet käynnistävät lompakon korjauksen komentorivin valintoja käyttäen, korjaa korruptoituneen lohkoketjun tai puuttuvat / vanhentuneet tapahtumat.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Yrittää pelastaa yksityiset avaimet viallisesta lompakkotiedostosta.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Skannaa uudelleen puuttuvat tapahtumat lohkoketjusta.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Palauta tapahtumat lohkoketjusta (pidä meta-data, esim. tilin omistaja).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Palauta tapahtumat lohkoketjusta (poista meta-data).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Päivitä lompakko viimeisimpään formaattiin. (Huom: tämä EI päivitä varsinaista lompakko-ohjelmistoa!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Lompakon korjausvalinnat</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Rakenna indeksi uudelleen</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Rakenna uudelleen lohkoketjun indeksi nykyisistä blk000??.dat tiedostoista.</translation>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Sisään:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Ulos:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Tervetuloa Dash RPC konsoliin.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Ylös- ja alas-nuolet selaavat historiaa ja &lt;b&gt;Ctrl-L&lt;/b&gt; tyhjentää ruudun.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Kirjoita &lt;b&gt;help&lt;/b&gt; nähdäksesi käytettävissä olevat komennot.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>kautta %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>ei koskaan</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Saapuva</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Lähtevä</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Tuntematon</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation>Haetaan...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Uudelleenkäytä yksi vanhoista vastaanottavista osoitteista. Uudelleenkäyttössä on turvallisuus- ja yksityisyysongelmia. Älä käytä tätä ellet ole uudelleenluomassa aikaisempaa maksupyyntöä.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Uudelleenkäytä vastaanottavaa osoitetta (ei suositella)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Valinnainen viesti liitettäväksi maksupyyntöön, joka näytetään kun pyyntö on avattu. Huomio: Viestiä ei lähetetä maksun mukana Dash verkkoon.</translation>
+        <translation>Valinnainen viesti liitettäväksi maksupyyntöön, joka näytetään kun pyyntö on avattu. Huomio: Viestiä ei lähetetä maksun mukana Dash verkkoon.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Viesti:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Valinnainen nimi liitetään uuteen vastaanottavaan osoitteeseen.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Käytä tätä lomaketta maksupyyntöihin. Kaikki kentät ovat &lt;b&gt;valinnaisia&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Nimi:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Valinnainen pyyntömäärä. Jätä tyhjäksi tai nollaksi jos et pyydä tiettyä määrää.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Määrä</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Vastaanota maksu</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Tyhjennä lomakkeen kaikki kentät.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Tyhjennä</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Pyydettyjen maksujen historia</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Näytä valittu pyyntö (sama toiminta kuin alkion tuplaklikkaus)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Näytä</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Poista valitut alkiot listasta</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Poista</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Kopioi nimi</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Kopioi viesti</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopioi määrä</translation>
     </message>
@@ -2935,67 +2665,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR-koodi</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Kopioi &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Kopioi &amp;Osoite</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Tallenna Kuva</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Vastaanota maksu %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Maksutiedot</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Viesti</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Tuloksen URI liian pitkä, yritä lyhentää otsikon tekstiä / viestiä.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Virhe käännettäessä URI:a QR-koodiksi.</translation>
     </message>
@@ -3003,37 +2733,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Päivämäärä</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Viesti</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(ei nimeä)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(ei viestiä)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(ei määrää)</translation>
     </message>
@@ -3041,412 +2771,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Lähetä Dasheja</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Kolikkokontrolli ominaisuudet</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Sisääntulot...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>automaattisesti valitut</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Lompakon saldo ei riitä!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Määrä:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Tavuja:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Määrä:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Prioriteetti:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>keskisuuri</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
-        <translation>Palkkio:</translation>
-    </message>
-    <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Pieni Tuotos:</translation>
+        <translation>Siirtomaksu:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tomu:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>ei</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
-        <translation>Palkkion jälkeen:</translation>
+        <translation>Siirtomaksun jälkeen:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Vaihtoraha:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Jos tämä aktivoidaan mutta vaihtorahan osoite on tyhjä tai virheellinen, vaihtoraha tullaan lähettämään uuteen luotuun osoitteeseen.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Kustomoitu vaihtorahan osoite</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Siirtomaksu:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Valitse...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>pienennä siirtomaksu asetukset</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Pienennä</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duffs ja siirtotapahtuma on vain 250 tavua, tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;vähintään&quot; maksaa 1000 duffs. Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>per kilotavu</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duffs ja siirtotapahtuma on vain 250 tavua, tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;yhteensä vähintään&quot; maksaa 1000 duffs. Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>yhteensä vähintään</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Minimi siirtomaksun maksaminen on ok niin kauan kun siirtotapahtumien määrä on pienempi kuin tila lohkoissa. Mutta ota huomioon että tämä voi johtaa siirtotapahtumaan jota ei vahvisteta koskaan, jos siirtotapahtumia on enemmän kuin verkko voi käsitellä.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(lue vinkki)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Suositeltava:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Mukautettu:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Älykästä siirtomaksua ei ole alustettu vielä. Tämä kestää yleensä muutaman lohkon...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Vahvistusaika:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normaali</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>nopea</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Lähetä nolla siirtomaksulla jos mahdollista</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(vahvistus voi kestää pidempään)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Lähetä klikkaamalla</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Lähetä</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Tyhjennä lomakkeen kaikki kentät.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Tyhjennä Kaikki</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Lähetä usealle vastaanottajalle samanaikaisesti</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Lisää &amp;Vastaanottaja</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Kopioi määrä</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopioi määrä</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
-        <translation>Kopioi palkkio</translation>
+        <translation>Kopioi siirtomaksu</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
-        <translation>Kopioi palkkion jälkeen</translation>
+        <translation>Kopioi siirtomaksun jälkeen</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Kopioi tavut</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Kopioi prioriteetti</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Kopioi pieni tuotos</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Kopioi tomu</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Kopioi vaihtoraha</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>käyttäen</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>anonymisoituja varoja</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend pyöristää tämän lähimpään %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>kaikkia käytössä olevia varoja (ei suositeltu)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>ja InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 -&gt; %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Haluatko varmasti lähettää?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>lisätty siirtomaksuna</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Yhteensä %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>tai</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Hyväksy lähettäminen</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Maksupyyntö vanhentui</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Siirtomaksu %1 kertaa korkeampi kuin %2 per kB on erittäin korkea siirtomaksu.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Virheellinen maksuosoite %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Arvioitu vahvistuksen aloitus %n lohkon kuluessa.</numerusform><numerusform>Arvioitu vahvistuksen aloitus %n lohkon kuluessa.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Vastaanottajan osoite on virheellinen, tarkista osoite.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Maksettavan summan tulee olla suurempi kuin 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Määrä ylittää käytettävissä olevan saldon.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Summa yhteensä ylittää saldosi kun siihen lisätään siirtomaksu %1.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Sama osoite toistuu useamman kerran, samaan osoitteeseen voi lähettää vain kerran per maksutapahtuma.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Siirtotapahtuman luonti epäonnistui!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Siirtotapahtuma hylättiin! Tämä saattaa tapahtua jos lompakossa olevat varat on jo kulutettu, kuten jos käytät kopiota wallet.dat tiedostosta ja varat oli jo käytetty mutta ei merkattu täällä.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Virhe: Lompakko on avattu vain anonymisointia varten.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Maksa vain minimi siirtomaksu %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Varoitus: Virheellinen Dash osoite</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Varoitus: Tuntematon vaihtorahan osoite</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(ei nimeä)</translation>
     </message>
@@ -3454,102 +3168,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Tämä on normaali maksu.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Maksun &amp;saaja:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Osoite johon maksu lähetetään (esim. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash osoite johon maksu lähetetään</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Valitse aikaisemmin käytetty osoite</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Liitä osoite leikepöydältä</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Poista tämä alkio</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Nimi:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Aseta nimi tälle osoitteelle lisätäksesi sen käytettyjen osoitteiden listalle.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>M&amp;äärä:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Viesti:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
-        <translation>Viesti joka liitettiin dash: URI joka talletetaan siirtotapahtuman kanssa viitteeksi sinulle. Huomio: Tätä viestiä ei lähetetä Dash verkkoon.</translation>
+        <translation>Viesti joka liitettiin Dash: URI joka talletetaan siirtotapahtuman kanssa viitteeksi sinulle. Huomio: Tätä viestiä ei lähetetä Dash verkkoon.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Tämä on vahvistamaton maksupyyntö</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Saaja:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Muistio:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Tämä on vahvistettu maksupyyntö.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Anna nimi tälle osoitteelle, jos haluat lisätä sen osoitekirjaan</translation>
     </message>
@@ -3557,206 +3267,194 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core sulkeutuu...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
-        <translation>Älä sammuta tietokonetta ennenkuin tämä ikkuna katoaa.</translation>
+        <translation>Älä sammuta tietokonetta ennen kuin tämä ikkuna katoaa.</translation>
     </message>
 </context>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Allekirjoitukset - Allekirjoita / Tarkista viesti</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Allekirjoita viesti</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Voit allekirjoittaa viestit omilla osoitteillasi todistaaksesi että omistat ne. Ole huolellinen että et allekirjoita mitään epämääräistä, phishing-hyökkäjä voi huijata sinua allekirjoittamaan henkilöllisyytesi omasta puolestaan. Allekirjoita vain yksityiskohtaisesti täytetty selvitys johon sitoudut.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Osoite jolla viesti allekirjoitetaan (esim. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>Dash osoite jolla viesti allekirjoitetaan</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Valitse aikaisemmin käytetty osoite</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Liitä osoite leikepöydältä</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Kirjoita tähän viesti jonka haluat allekirjoittaa</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Allekirjoitus</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Kopioi tämän hetkinen allekirjoitus leikepöydälle</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Allekirjoita viesti todistaaksesi että omistat tämän Dash osoitteen</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Allekirjoita &amp;viesti</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Tyhjennä kaikki kentät</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Tyhjennä Kaikki</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Tarkista viesti</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Syötä allekirjoittava osoite, viesti ja allekirjoitus alla oleviin kenttiin varmistaaksesi allekirjoituksen aitouden. Varmista että kopioit kaikki kentät täsmälleen oikein, myös rivinvaihdot, välilyönnit, tabulaattorit, jne.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Osoite jolla viesti on allekirjoitettu (esim. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>Dash osoite jolla viesti on allekirjoitettu</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Tarkista että viesti on allekirjoitettu määritetyllä Dash osoitteella</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Tarkista &amp;Viesti...</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Tyhjennä kaikki kentät</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Klikkaa &quot;Allekirjoita Viesti&quot; luodaksesi allekirjoituksen</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Syötä Dash osoite (esim. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Syötetty osoite on virheellinen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Tarkista osoite ja yritä uudelleen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Syötetyn osoitteen avainta ei löydy.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Lompakon avaaminen peruttiin.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Yksityistä avainta syötetylle osoitteelle ei ole saatavilla.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Viestin allekirjoitus epäonnistui.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Viesti allekirjoitettu.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Allekirjoitusta ei pystytty tulkitsemaan.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Tarkista allekirjoitus ja yritä uudelleen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Allekirjoitus ei täsmää viestin tiivisteeseen.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Viestin tarkistus epäonnistui.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Viesti tarkistettu.</translation>
     </message>
@@ -3764,27 +3462,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Versio %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Bitcoin Core kehittäjät</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Dash Core kehittäjät</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testiverkko]</translation>
     </message>
@@ -3792,7 +3490,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3800,254 +3498,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Avoinna %n lisälohkolle</numerusform>
-            <numerusform>Avoinna %n lisälohkolle</numerusform>
-        </translation>
+        <translation><numerusform>Avoinna %n lisälohkolle</numerusform><numerusform>Avoinna %n lisälohkolle</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Avoinna %1 asti</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>ristiriitainen</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/ei yhteyttä (vahvistettu instantx:lla)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/vahvistettu (vahvistettu instantx:lla)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 vahvistusta (vahvistettu instantx:lla)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/ei yhteyttä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/vahvistamaton</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 vahvistusta</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/ei yhteyttä (vahvistus instantx:lla käynnissä - %2 / %3 allekirjoitusta)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/vahvistettu (vahvistus instantx:lla käynnissä - %2 / %3 allekirjoitusta)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 vahvistusta (vahvistus instantx:lla käynnissä - %2 / %3 allekirjoitusta)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/ei yhteyttä (instantx vahvistus epäonnistui)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/vahvistettu (instantx vahvistus epäonnistui)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Tila</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, lähetys ei ole vielä onnistunut</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, lähetys %n solmun läpi</numerusform>
-            <numerusform>, lähetys %n solmun läpi</numerusform>
-        </translation>
+        <translation><numerusform>, lähetys %n solmun läpi</numerusform><numerusform>, lähetys %n solmun läpi</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Päivämäärä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Lähde</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Luotu</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>Lähettäjä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>tuntematon</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Saaja</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>oma osoite</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>vain-luku</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>nimi</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Suoritus</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>kypsyy %n lohkon kuluttua</numerusform>
-            <numerusform>kypsyy %n lohkon kuluttua</numerusform>
-        </translation>
+        <translation><numerusform>kypsyy %n lohkon kuluttua</numerusform><numerusform>kypsyy %n lohkon kuluttua</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>ei hyväksytty</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Veloitus</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Veloitus yhteensä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Suoritus yhteensä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Siirtomaksu</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Nettosumma</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Viesti</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Kommentti</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>Siirtotunnus</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Kauppias</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Luodut (louhitut) varat täytyy kypsyä %1 lohkon ajan kunnes ne voidaan käyttää. Kun generoit tämän lohkon, se lähetettiin verkkoon lohkoketjuun. Jos se epäonnistuu pääsemään lohkoketjuun sen tila tulee muuttumaan &quot;ei hyväksytty&quot; ja sitä ei voida käyttää. Näin voi ajoittain tapahtua kun toisen solmun lohko luodaan samanaikaisesti omasi kanssa.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Debug tiedot</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Siirtotapahtuma</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Sisääntulot</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>tosi</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>epätosi</translation>
     </message>
@@ -4055,12 +3744,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Siirtotapahtuman yksityiskohdat</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Tämä ruutu näyttää yksityiskohtaisen tiedon siirtotapahtumasta</translation>
     </message>
@@ -4068,169 +3757,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Päivämäärä</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Tyyppi</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Määrä</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform>Avoinna %n lisälohkolle</numerusform>
-        </translation>
+        <translation><numerusform>Avoinna %n lisälohkolle</numerusform><numerusform>Avoinna %n lisälohkolle</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Avoinna %1 asti</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Ei yhteyttä</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Vahvistamaton</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
-        <translation>Vahvistetaan (%1 kehoitetusta %2 vahvistuksesta)</translation>
+        <translation>Vahvistetaan (%1 / %2 vahvistusta)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Vahvistettu (%1 vahvistusta)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Ristiriitainen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Epäkypsä (%1 vahvistusta, saatavilla %2 jälkeen)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Tätä lohkoa ei vastaanotettu mistään muusta solmusta ja sitä ei mahdollisesti hyväksytä!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Luotu mutta ei hyväksytty</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Vastaanotettu osoitteeseen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Vastaanotettu osoitteesta</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Darksend vastaanotettu</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Lähetetty osoitteeseen</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Maksu itsellesi</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Louhittu</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend denominointi</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend vakuus maksu</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend luo vakuus syötteet</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend denominoinnin luonti</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksend lähetetty</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>vain-luku</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(e/s)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Siirtotapahtuman tila. Siirrä osoitin kentän päälle nähdäksesi vahvistusten lukumäärä.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Siirtotapahtuman päivämäärä ja aika.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Siirtotapahtuman tyyppi.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Käytetäänkö vai ei lue-vain osoitetta tässä tapahtumassa.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Siirtotapahtuman Dash kohdeosoite</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Vähennetty tai lisätty määrä saldoon.</translation>
     </message>
@@ -4238,207 +3920,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Kaikki</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Tänään</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Tällä viikolla</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Tässä kuussa</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Viime kuussa</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Tänä vuonna</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Alue...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Yleisin</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Vastaanotettu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Lähetetty</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksend lähetetty</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend luo vakuus syötteet</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend denom. luonti</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend denominointi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend vakuus maksu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Itsellesi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Louhittu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Muu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Anna etsittävä osoite tai tunniste</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Minimimäärä</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Kopioi osoite</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Kopioi nimi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopioi määrä</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Kopioi siirtotunnus</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Muokkaa nimeä</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Näytä siirtotapahtuman yksityiskohdat</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Vie siirtotapahtumien historia</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Pilkuilla eritelty tiedosto (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Vahvistettu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Vain-luku</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Päivämäärä</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Tyyppi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Nimi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Osoite</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Määrä</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Vienti epäonnistui</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Siirtotapahtumien historian tallentamisessa tapahtui virhe paikkaan %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Vienti onnistui</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Siirtotapahtumien historia tallennettiin onnistuneesti paikkaan %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Alue:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>-&gt;</translation>
     </message>
@@ -4446,15 +4129,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Yksikkö jona summat näytetään. Klikkaa valitaksesi yksikön.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Lomakkoa ei ole ladattu.</translation>
     </message>
@@ -4462,59 +4145,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Lähetä Dasheja</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>Instantx ei tue näin korkeaa määrää vielä. Siirtotapahtumat on tällä hetkellä rajoitettu %n DASH.</numerusform>
-            <numerusform>Instantx ei tue näin korkeaa lähetysmäärää vielä. Siirtotapahtumat on tällä hetkellä rajoitettu %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX ei tue näin korkeaa lähetysmäärää vielä. Siirtotapahtumat on tällä hetkellä rajoitettu %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Vie...</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Vie tällä hetkellä valitun välilehden tiedot tiedostoon</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Varmuuskopioi lompakko</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Lompakkodata (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Varmuuskopiointi epäonnistui</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Lompakon tallennuksessa tapahtui virhe %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Varmuuskopiointi onnistui</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Lompakko tallennettiin onnistuneesti tiedostoon %1.</translation>
     </message>
@@ -4522,1370 +4204,1431 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, sinun tulee asettaa rpc salasana asetustietostossa:
-%s
-Suositellaan että käytät allaolevaa satunnaista salasanaa:
-rpcuser=dashrpc
-rpcpassword=%s
-(sinun ei tarvitse muistaa tätä salasanaa)
-Tämä tunnus ja salasana on oltava ERILAISET.
-Jos tiedostoa ei ole, luo se vain omistajan-luku-oikeudella.
-Suositellaan asettaa alertnotify jotta saat tietoa ongelmista,
-esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Hyväksytyt salakirjoitukset (oletus: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Virhe asetettaessa RPC porttia %u IPv4 verkkoliikenteelle: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Virhe asetettaessa RPC porttia %u IPv6 verkkoliikenteelle, palataan takaisin IPv4:ään %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
-        <translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle.</translation>
+        <translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:port merkintätapaa IPv6:lle.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Ei voida lukita data hakemistoa %s. Dash Core on luultavasti jo käynnissä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Rajoita yhtäaikaiset siirtotapahtumat &lt;n&gt;*1000 tavua per minuutti (oletus: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend käyttää tarkalleen denominoituja syötteitä lähettäessään varoja, saatat tarvita anonymisoida lisää varoja.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Kytke pois käytöstä kaikki Masternode ja Darksend toiminnot (0-1, oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Ota instantx käyttöön, näytä lukittujen siirtojen vahvistukset (oletus: päällä)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Ota käyttöön automaattinen Darksend rahavaroille tässä lompakossa  (0-1, oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Aloita regressio testimoodi joka käyttää erikoisketjua missä lohkot voidaan ratkaista välittömästi. Tämä on tarkoitettu regressiotestien työkaluksi ja ohjelman kehittämiseen.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Aloita regressio testimoodi joka käyttää erikoisketjua jossa lohkoja voidaan ratkaista välittömästi.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Virhe: Sisääntulevien yhteyksien kuuntelu epäonnistui (kuuntelu palautti virheen %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Virhe: Siirtotapahtuma hylättiin! Tämä saattaa tapahtua jos jotkut varat lompakossa on jo käytetty. Esimerkiksi jos käytit kopioitua lompakkoa ja varat on käytetty jo siellä, mutta ei ole merkattu käytetyksi täällä.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Virhe: Tämä siirtotapahtuma vaatii siirtopalkkion vähintään %s johtuen sen määrästä, monimutkaisuudesta tai äskettäin vastaanotettujen varojen käytöstä</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Virhe: Lompakko on avattu vain anonymisointia varten, siirtotapahtumaa ei voida luoda.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Aja komento kun olennainen hälytys vastaanotetaan tai nähdään todella pitkä haara (%s cmd korvataan viestillä)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Suorita käsky kun lompakon siirtotapahtuma muuttuu (%s cmd on vaihdettu TxID kanssa)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Suorita käsky kun paras lohko muuttuu (%s cmd on korvattu lohko tarkisteella)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Tätä pienemmät palkkiot lasketaan nollaksi (siirtotapahtuman luonnissa) (oletus: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Aja tietokannan tapahtumat muistivarannosta kovalevylogiin joka &lt;n&gt; megatavu (oletus: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Löytyi vahvistamattomia syötteitä, odotetaan että ne vahvistetaan.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Kuinka vaativa lohkon vahvistus  -checkblocks on (0-4, oletus:  3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Tässä moodissa -genproclimit ohjaa kuinka monta lohkoa luodaan välittömästi.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
-        <translation>InstantX vaatii vähintään 6 vahvistusta, odota muutama minuutti ja yritä uudelleen.</translation>
+        <translation>InstantX vaatii syötteille vähintään 6 vahvistusta, odota muutama minuutti ja yritä uudelleen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Kuuntele JSON-RPC yhteyksiä portista &lt;port&gt; (oletus: 9998 tai testiverkko: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Rakenne url nimi KeePass merkinnälle joka talentaa lompakon salasanan</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Sekuntien määrä, kuinka kauan yritetään uudelleen kytkeytyä vertaisverkkoon (oletus: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Tulosta debuggaustieto (oletus: 0, annettu &lt;kategoria&gt; on valinnainen)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Tarjoa Darksend:ille likviditeettiä jatkuvaa varojen sekoitusta varten (0-100, oletus: 0, 1=usein, isot maksukulut, 100=harvoin, pienet maksukulut)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Tiedustele vertaisverkon osoitteita DNS hakua käyttäen jos osoitteita ei ole riittävästi (oletus: 1 paitsi jos -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Aseta ulkoinen osoite:portti tälle masternodelle (esim: osoite:portti)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
-        <translation>Aseta maksimikoko korkea prioriteetti/pieni palkkio siirtotapahtumiin tavuissa (oletus: %d)</translation>
+        <translation>Aseta maksimikoko korkea prioriteetti/pienen siirtomaksun siirtotapahtumiin tavuissa (oletus: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Aseta script vahvistuksen säikeiden määrä (%u - %d, 0= auto, &lt;0 = jätä näin monta prosessorin ydintä vapaaksi, oletus: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Aseta prosessorin raja kun lohkojen louhiminen on päällä (-1 = rajoittamaton, oletus: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Näytä N vahvistusta onnistuneesti lukitulle siirtotapahtumalle (0-9999, oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Tämä on esi-julkaistu testiversio - Käytä omalla vastuulla - Älä käytä louhimiseen tai kauppasovelluksiin.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Ei voida yhdistää %s tässä tietokoneessa. Dash Core on luultavasti jo käynnissä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Ei tarpeeksi Darksend anonymisoituja varoja tälle siirtotapahtumalle.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Ei tarpeeksi Darksend ei-anonymisoituja varoja tälle siirtotapahtumalle, joka ei ole 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Ei tarpeeksi Darksend ei-anonymisoituja varoja tälle siirtotapahtumalle.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Käytä erillistä SOCKS5 proxya tavoittaaksesi vertaisverkon Tor palvelun kautta (oletus: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
-        <translation>Varoitus: Siirtomaksu on asetettu erittäin korkeaksi! Tämä on maksukulu jonka tulet maksamaan kun lähetät siirron.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Varoitus: Tarkista että tietokoneesi kellonaika ja päivämäärä ovat ajan tasalla! Dash ei toimi oikein väärällä päivämäärällä ja/tai kellonajalla.</translation>
+        <translation>Varoitus: Siirtomaksu on asetettu erittäin korkeaksi! Tämä on siirtomaksu jonka tulet maksamaan kun lähetät siirron.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Varoitus: Dash verkossa on ristiriitoja! Louhijat näyttävät kokevan virhetilanteita.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
-        <translation>Varoitus: Olemme vertaisverkon kanssa ristiriidassa! Sinun ja/tai solmujen tulee päivitää uusimpaan Dash versioon.</translation>
+        <translation>Varoitus: Olemme vertaisverkon kanssa ristiriidassa! Sinun ja/tai solmujen tulee päivitää uusimpaan versioon.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Varoitus: Virhe luettaessa wallet.dat lompakkotiedostoa. Kaikki avaimet luettiin onnistuneesti, mutta siirtohistoria tai osoitekirja saattavat olla kadonneet tai virheellisiä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Varoitus: Wallet.dat lompakkotiedosto on vioittunut, tiedot pelastettu. Alkuperäinen wallet.dat lompakkotiedosto on tallennettu wallet.{timestamp}.bak kansioon %s, jos saldosi tai siirtohistoria on virheellinen, sinun tulisi palauttaa lompakkotiedosto varmuuskopiosta.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Sinun täytyy asettaa rpcpassword=&lt;password&gt; asetustiedostoon:
-%s
-Jos tiedostoa ei ole, niin luo se ainoastaan omistajan kirjoitusoikeuksin.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Sinun täytyy määritellä masternodeprivkey asetustiedostoon. Katso lisätietoja dokumentaatiosta.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(oletus: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(oletus: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; voi olla:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Hyväksy merkkipohjaiset ja JSON-RPC käskyt</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Hyväksy yhteyksiä ulkopuolelta (oletus: 1 jos -proxy tai -connect ei ole määritelty)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Lisää solmu mihin liittyä pitääksesi yhteyden auki</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Salli DNS kyselyt -addnode, -seednode ja -connect yhteydessä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Salli JSON-RPC yhteydet tietystä ip-osoitteesta</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Syöte on jo olemassa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Tiedustele aina vertaisverkon osoitteita DNS hakua käyttäen (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Yritetään palauttaa yksityisiä avaimia vioittuneesta wallet.dat lompakkotiedostosta</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Lohkon luonnin asetukset:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Ei voida denominoida: yhteensopivia syötteitä ei ole jäljellä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Et voi päivittää lompakkoasi vanhempaan versioon</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>-bind osoitteen &apos;%s&apos; selvittäminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>-externalip osoitteen &apos;%s&apos; selvittäminen epäonnistui</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Oletusosoitetta ei voi kirjoittaa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Tyhjennä lompakon siirtotapahtumien lista (diagnostiikka työkalu; olettaa -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Vakuus ei ole pätevä.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Vakuus ei ole pätevä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Yhdistä ainoastaan määriteltyihin solmuihin</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Yhdistä SOCKS proxyn kautta</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Yhdistä JSON-RPC porttiin &lt;port&gt; (oletus: 9998 tai testiverkko: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Yhdistä KeePassHttp porttiin &lt;port&gt; (oletus: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
-        <translation>Yhdistä solmuun hakeaksesi vertaisverkon osoitteet ja katkaise yhteys</translation>
+        <translation>Yhdistä solmuun hakeaksesi peers osoitteet ja katkaise yhteys</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Yhteyden valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Vioittunut lohkotietokanta havaittu</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Palveluprosessi</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Dash Core RPC asiakas versio</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend on pois käytöstä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Darksend valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Debuggaus/Testauksen valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Poista turvatila käytöstä, syrjäytä todellinen turvatilatapahtuma (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Hae oma IP osoite (oletus: 1 kun kuunnellaan ja ei -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Älä lataa lompakkoa ja poista käytöstä lompakon RPC kutsut</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Haluatko uudelleenrakentaa lohkotietokannan nyt?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Lataus on valmis</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>Alennetaan ja yritetään uudestaan.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Aseta asiakasohjelma masternodeksi (0-1, oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Merkinnät on täynnä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Virhe masternodeen kytkeytymisessä.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Virhe lohkotietokannan alustuksessa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Virhe lompakon tietokantaympäristön alustuksessa %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Virhe lohkotietokannan latauksessa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Virhe ladattaessa wallet.dat tiedostoa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Virhe ladattaessa wallet.dat tiedostoa: Lompakko vioittunut</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Virhe ladattaessa wallet.dat lompakkotiedostoa: Tarvitset uudemman version dashista</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Virhe lohkotietokannan avauksessa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Virhe luettaessa tietokantaa, ohjelma suljetaan.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Virhe yleisen avaimen palautuksessa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Virhe</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Virhe: Levytila on alhainen!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Virhe: Lompakko on lukittu, siirtotapahtumaa ei voida luoda!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Virhe: Sinulla on jo odottavia syötteitä Darksend varannossa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Virhe: Järjestelmävirhe:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Ei onnistuttu kuuntelemaan mitään porttia. Käytä -listen=0 jos haluat tätä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Lohkotietojen luku epäonnistui</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Lohkon luku epäonnistui</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Lohkoindeksin synkronointi epäonnistui</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Jos &lt;kategoria&gt; ei ole toimitettu, tulosta kaikki debuggaustieto.</translation>
+    </message>
+    <message>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = pidä tx meta data esim. tilin omistaja ja maksupyyntö tiedot, 2 = poista tx meta data)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Lohkoindeksin kirjoitus epäonnistui</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Salli JSON-RPC yhteydet määritetystä lähteestä. Pätee &lt;ip&gt; yksittäiseen IP:n (esim. 1.2.3.4), verkko/verkkomaski (esim. 1.2.3.4/255.255.255.0) tai verkko/CIDR (esim. 1.2.3.4/24). Tämä asetus voidaan määrittää useita kertoja.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Lohkotiedon kirjoitus epäonnistui</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Virhe asetettaessa RPC osoitetta %s portissa %u kuuntelemaan: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Lohkon kirjoitus epäonnistui</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Kytkeydy annettuun osoitteeseen ja merkitse siihen kytkeytyvät peers:it luotettaviksi. Käytä [host]:port merkintätapaa IPv6:lle.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Tiedoston tietojen kirjoitus epäonnistui</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Kytkeydy annettuun osoitteeseen kuunnellaksesi JSON-RPC yhteyksiä. Käytä [host]:port merkintätapaa IPv6:lle. Tämä asetus voidaan määrittää useita kertoja  (oletus: kytkeydy kaikkiin rajapintoihin)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Tietokannan kirjoitus epäonnistui</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Vaihda automaattisesti viimeistellyn budjetin äänestyskäyttäytyminen. mode=auto: Äänestä vain tarkkaan viimeisteltyä budjettia joka täsmää itse tekemääni budjettiin. (string, oletus: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Siirtotapahtumien indeksin kirjoitus epäonnistui</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Rajoita jatkuvasti yhtäaikaiset ilmaiset siirtotapahtumat &lt;n&gt;*1000 tavuun per minuutti (oletus: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Palautustiedon kirjoitus epäonnistui</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Luo uudet tiedostot järjestelmän oletus oikeuksilla, paitsi umask 077 (voimassa vain käytöstä poistettujen lompakon toimintojen kanssa)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Palkkio per kB joka lisätään lähettämiisi siirtotapahtumiin</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Poista kaikki lompakon siirtotapahtumat ja palauta vain nuo osat lohkoketjusta -rescan valinnan avulla käynnistyksessä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Tätä pienemmät palkkiot lasketaan nollaksi (välittämisessä) (oletus:</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Kytke pois käytöstä kaikki Masternode ja Darksend toiminnot (0-1, oletus: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Pakota turvatila (oletus: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Levitetään MIT ohjelmistolisenssin alaisuudessa. Tarkemmat tiedot löytyvät tiedostosta COPYING tai osoitteesta &lt;http://www.opensource.org/licenses/mit-license.php&gt;. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Luo varoja (oletus: 0)</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Ota instantx käyttöön, näytä lukittujen siirtojen vahvistukset (bool, oletus: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Etsi apua käskyyn</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Ota käyttöön automaattinen Darksend rahavaroille tässä lompakossa  (0-1, oletus: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Kuinka monta lohkoa tarkistetaan käynnistettäessä (oletus: 288, 0 = kaikki)</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Virhe: Ei tuettu argumentti -socks. SOCKS version asettaminen ei ole enää mahdollista, vain SOCKS5 proxyt ovat tuettuja.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Jos &lt;kategoria&gt; ei ole toimitettu, tulosta kaikki debuggaustieto.</translation>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Siirtomaksut (DASH/Kb) jotka ovat pienempiä kuin tämä, tulkitaan nollamaksuksi välityksessä (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Siirtomaksut (DASH/Kb) jotka ovat pienempiä kuin tämä, tulkitaan nollamaksuksi siirtotapahtuman luonnissa (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Aja tietokannan tapahtumat muistivarannosta kovalevylogiin joka &lt;n&gt; megatavu (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Kuinka vaativa lohkon vahvistus -checkblocks on (0-4, oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Jos paytxfee ei ole asetettu, sisällytä tarpeeksi siirtomaksua jotta siirtotapahtuman vahvistus alkaa keskimäärin lohkon aikana (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Virheellinen määrä -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (oltava vähintään minimi välitysmaksun verran %s:sta välttääksesi jumissa olevia siirtotapahtumia)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Kirjaa siirtotapahtuman prioriteetti ja siirtomaksu per kB kun louhitaan lohkoja (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Ylläpidä täyttä siirtotapahtumien indeksiä, jota käyttää getrawtransaction rpc call (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Maksimi koko datalle datan kuljetustapahtumissa jotka välitämme ja louhimme (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Yksittäisen siirtotapahtuman maksimi siirtomaksu, jos tämä asetetaan liian matalaksi, se voi keskeyttää isot siirtotapahtumat (oletus: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ohita masternodet jotka ovat pienempiä versioltaan (esim: 70050; oletus: 0)</translation>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Sekuntien määrä, kuinka kauan estetään huonosti käyttäytyviä peers:ejä uudelleen kytkeytymästä (oletus: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Tulosta debuggaustieto (oletus: %u, tarjottava &lt;category&gt; on valinnainen)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Tarjoa Darksend:ille likviditeettiä jatkuvaa kolikoiden sekoitusta varten (0-100, oletus: %u, 1=usein, isot maksukulut, 100=harvoin, pienet maksukulut)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Vaadi korkea prioriteetti välitettäville ilmaisille tai matalan siirtomaksun siirtotapahtumille (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Aseta prosessorin ytimien määrä louhintaan, jos päällä (-1 = kaikki ytimet, oletus: %d)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Näytä N vahvistusta onnistuneesti lukitulle siirtotapahtumalle (0-9999, oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin &lt;https://www.openssl.org/&gt; sekä Eric Youngin kehittämän salausohjelmiston ja Thomas Bernardin kehittämän UPnP ohjelmiston.
+
+Käännös päivitetty: 28.6.2015 by AjM.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>Käyttääksesi dashd:ia tai -server valintaa dash-qt:lle, sinun tulee asettaa rpc salasana asetustiedostossa:
+%s
+Suositellaan että käytät allaolevaa satunnaista salasanaa:
+rpcuser=dashrpc
+rpcpassword=%s
+(sinun ei tarvitse muistaa tätä salasanaa)
+Käyttäjätunnus ja salasana on oltava ERILAISET.
+Jos tiedostoa ei ole, luo se vain omistajan-luku-oikeudella.
+Suositellaan asetettavaksi alertnotify jotta saat tietoa ongelmista,
+esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.com
+</translation>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Käytä erillistä SOCKS5 proxya tavoittaaksesi peers:it Tor piilotetun palvelun kautta (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Varoitus: -maxtxfee on asetettu erittäin korkeaksi! Näin isot siirtomaksut voitaisiin maksaa yhdessä siirtotapahtumassa.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Varoitus: Tarkista että tietokoneesi kellonaika ja päivämäärä ovat oikein! Dash ei toimi oikein väärällä päivämäärällä ja/tai kellonajalla.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Merkitse solmut luotettaviksi jotka kytkeytyvät annetusta verkkomaskista tai IP osoitteesta. Voidaan määrittää useita kertoja.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Luotettaviksi merkittyjä peers:ejä ei voida DoS estää, ja niiden siirtotapahtumat välitetään aina, vaikka ne olisvatkin jo muistivarannossa, käyttökelpoinen esim. yhdyskäytävään</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; voi olla:
+</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Hyväksy julkiset REST pyynnöt (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Hyväksyttävät salaukset (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Tiedustele aina peers osoitteita DNS hakua käyttäen (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Ei voida selvittää -whitebind osoitetta: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Yhdistä SOCKS5 proxyn kautta</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Yhdistä KeePassHttp porttiin &lt;port&gt; (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i Bitcoin Core Kehittäjät</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i Dash Core Kehittäjät</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Ei voida jäsentää -rpcbind arvoa %s verkko-osoitteena</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend odottaa.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Darksend pyyntö valmis:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Darksend pyyntö kesken:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Poista turvatila käytöstä, ohita todellinen turvatila tapahtuma (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Aktivoi asiakasohjelman käyttö masternode:na (0-1, oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Virhe masternode:en kytkeytymisessä.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Virhe ladattaessa wallet.dat: Lompakko vaatii uudemman version Dash Core:sta</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Virhe: Vakava sisäinen virhe, katso debug.log saadaksesi lisätietoja</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Virhe: Ei tuettu argumentti -tor löytyi, käytä -onion.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Lisättävä siirtomaksu (DASH/Kb) siirtotapahtumaan jonka lähetät (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Viimeistellään siirtotapahtuma.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Pakota turvatila (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Löytyi tarpeeksi käyttäjiä, kirjaudutaan ( odotetaan %s )</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Löytyi tarpeeksi käyttäjiä, kirjaudutaan ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Louhi kolikoita (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Kuinka monta lohkoa tarkistetaan käynnistyksessä (oletus: %u, 0 = kaikki)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Hylkää masternodet joiden versio on pienempi kuin (esim: 70050; oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Tuodaan...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Tuodaan lohkoja ulkoisesta blk000??.dat tiedostosta</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Sisällytä IP osoitteet virhelogiin (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Yhteensopimaton tila:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Yhteensopimaton versio.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Väärä tai ei alkuperäinen lohko löydetty. Väärä data hakemisto verkolle?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Tietoa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Alkuperäisyyden tarkistus epäonnistui. Dash Core sulkeutuu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Syöte ei ole pätevä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>InstantX valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Saldo ei riitä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Saldo ei riitä.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Virheellinen -onion osoite: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Virheellinen proxyn osoite &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Virheellinen määrä -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Virheellinen määrä -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Virheellinen määrä -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Virheellinen määrä -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (oltava vähintään %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Virheellinen määrä -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Virheellinen määrä</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Viimeinen onnistunut Darksend tapahtuma oli liian äskettäin.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Rajoita allekirjoitusien välimuisti &lt;n&gt; merkintään (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Kuuntele JSON-RPC yhteyksiä portissa &lt;port&gt; (oletus: %u tai testiverkossa: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Kuuntele yhteyksiä portissa &lt;port&gt; (oletus: %u tai testiverkossa: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Lukitse masternodet niiden asetustiedoston kautta (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Ylläpidä enintään &lt;n&gt; peers yhteyttä (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksimi per yhteys vastaanotto puskuri, &lt;n&gt;*1000 tavua (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Maksimi per yhteys lähetys puskuri, &lt;n&gt;*1000 tavua (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Sekoitus käynnissä...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Tarvitaan määritellä portti -whitebind: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Masternodeja ei havaittu.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Yhteensopivaa Masternodea ei löytynyt.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Ei ole Masternode listassa.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Automaattisten lompakon varmistuksien määrä (oletus: 10)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Hyväksy vain lohkoketju joka täsmää tarkistuspisteisiin (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Kytkeydy verkon solmuihin vain &lt;net&gt; (ipv4, ipv6 tai onion)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Lisää debug lokitiedoston merkinnän alkuun pvm/aika (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Aja säie joka säännöllisesti tallettaa lompakon (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Lähetä siirtotapahtumat nolla siirtomaksulla jos mahdollista (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Serverin sertifikaatti tiedosto (oletus: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Serverin yksityisavain (oletus: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Istunto vanheni, esitä uudestaan.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Aseta avainvarannon koko &lt;n&gt; (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Aseta minimi lohkon koko tavuina (oletus: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Aseta säikeiden lukumäärä RPC kutsuille (oletus: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Yritetään uudelleen...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Virheellinen masternoden yksityisavain (masternodeprivkey). Katso lisätietoja dokumentaatiosta.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Virheellinen yksityisavain.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Virheellinen scripti havaittu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>KeePassHttp tunnus (id) yhdistymiseen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>KeePassHttp avain AES salattuun viestintään</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Pidä N dashia anonymisoituna (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Pidä enintään &lt;n&gt; ei yhdistettyä lohkoa muistissa (oletus: %u)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Pidä enintään &lt;n&gt; ei yhdistettyä siirtotapahtumaa muistissa (oletus: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>Viimeisin Darksend oli liian äskettäin.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Viimeisin onnistunut Darksend oli liian äskettäin.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Rajaa allekirjoituksen välimuistin koko &lt;n&gt; alkioon (oletus: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Lista komennoista</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Kuuntele yhteyksiä portista &lt;port&gt; (oletus: 9999 tai testiverkko: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Ladataan osoitteita...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Ladataan lohkoindeksiä...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Ladataan masternode listaa...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Ladataan lompakkoa... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Ladataan lompakkoa...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Kirjaa siirtotapahtuman prioriteetti ja palkkio per kB kun louhitaan lohkoja (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Ylläpidä täydellistä siirtotapahtumien indeksiä (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Pidä enintään &lt;n&gt; yhteyttä vertaisverkkoon (oletus: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Masternode valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>Masternode jono on täysi.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Suurin vastaanottopuskuri yksittäiselle yhteydelle, &lt;n&gt;*1000 tavua (oletus: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Suurin lähetyspuskuri yksittäiselle yhteydelle, &lt;n&gt;*1000 tavua (oletus: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Puuttuva siirtotapahtuman tieto.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Yhteensopivaa masternodea ei löytynyt.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>Denominointia tarvitsevia varoja ei löydy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Masternodeja ei havaittu.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>Vastaavia denominointeja sekoitukseen ei löydy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Epästandardi yleinen avain havaittu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Ei yhteensopiva olemassa olevien siirtotapahtumien kanssa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Ei tarpeeksi tiedostomerkintöjä saatavilla.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Ei ole masternode listassa.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Hyväksy vain lohkoketjua vastaavat sisäänrakennetut vahvistuspisteet (Oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Yhdistä vain verkkosolmuihin &lt;net&gt; (IPv4, IPv6 tai Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Asetukset:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Salasana JSON-RPC yhteyksille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Lisää aikamerkintä debug tulosteen eteen (oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Tulosta lohko käynnistyksessä jos löydetään lohkoindeksistä</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Tulosta lohkopuu käynnistyksessä (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>RPC SSL valinnat: (katso Bitcoin Wikistä SSL-asennuksen ohjeet)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>RPC asiakas valinnat:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>RPC palvelimen valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Satunnaisesti pudota 1 joka &lt;n&gt; verkkoviestistä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Satunnaisesti sekoita 1 joka &lt;n&gt; verkkoviestistä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Uudelleenrakenna lohkoketjuindeksi nykyisistä blk000??.dat tiedostoista</translation>
+        <translation>Uudelleenrakenna lohkoketjun indeksi nykyisistä blk000??.dat tiedostoista</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Skannaa uudelleen lohkoketju lompakon puuttuvien siirtotapahtumien vuoksi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Skannataan uudelleen...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Aja säie joka tallentaa lompakon ajoittain (oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Aja taustalla palveluprosessina ja hyväksy komennot</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>SSL asetukset: (katso Bitcoin Wikistä tarkemmat SSL ohjeet)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Valitse SOCKS versio -proxy:lle (4 tai 5, oletus: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Lähetä komento Dash Core:lle</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Lähetä komentoja solmuun osoitteessa &lt;ip&gt; (oletus: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Lähetä jäljitys/debug-tieto konsoliin, debug.log tiedoston sijaan</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Palvelimen sertifikaatti tiedosto (oletus: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Palvelimen yksityisavain (oletus: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Istunto ei ole valmis!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Istunto vanheni (30 sekuntia), esitä uudestaan.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Aseta tietokannan välimuistin koko megatavuissa (%d - %d, oletus: %d</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Aseta avainvarannon koko &lt;n&gt; (oletus: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Aseta lohkon maksimikoko tavuissa (oletus: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Aseta pienin lohkon koko tavuissa (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Aseta masternoden yksityisavain.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Aseta säikeiden lukumäärä RPC kutsuille (oletus: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Asettaa DB_PRIVATE lipun lompakon tietokantaympäristössä (oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Näytä kaikki debuggaus valinnat: (käyttö: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Näytä suorituskykytietoja (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Pienennä debug.log tiedosto käynnistyksen yhteydessä (vakioasetus: 1 kun ei -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Allekirjoitus epäonnistui.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>Allekirjoitus aikaraja, esitä uudestaan.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Siirtotapahtuman allekirjoitus epäonnistui</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Määritä asetustiedosto (oletus: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Määritä yhteyden aikaraja millisekunneissa (vakioasetus: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
-        <translation>Määritä data hakemisto</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Määritä masternoden asetustiedosto (oletus: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Määritä pid tiedosto (oletus: masternode.pid)</translation>
+        <translation>Määritä datahakemisto</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Määritä lompakkotiedosto (data hakemiston sisällä)</translation>
+        <translation>Määritä lompakkotiedosto (datahakemiston sisällä)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Määritä julkinen osoitteesi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Käytä vahvistamattomia vaihtorahoja lähetettäessä siirtotapahtumia (oletus: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Käynnistä Dash Core palveluprosessi</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Järjestelmävirhe:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Tämä ohjeviesti</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Tämä on tarkoitettu regression testityökaluille ja ohjelman kehittämiseen.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Tämä ei ole masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Kynnysarvo aikakatkaisulle heikosti toimivalle vertaisverkolle (oletus: 100)</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Tämä on kokeellinen ohjelmisto.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Käytä %s valintaa</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Tämä on tarkoitettu regression testityökaluille ja ohjelman kehittämiseen.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Siirtosumma on liian pieni</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Siirtosumman tulee olla positiivinen</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Siirtotapahtuma luotu onnistuneesti.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
-        <translation>Siirtotapahtuman maksukulu on liian iso.</translation>
+        <translation>Siirtotapahtuman siirtomaksu on liian iso.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Siirtotapahtuma ei ole voimassa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Siirtotapahtuma on liian iso suhteessa siirtomaksujen käytäntöön.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Siirtosumma on liian iso</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Ei voida yhdistää %s tässä tietokoneessa (yhdistäminen palautti virheen %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>En voida osoittaa masternode maksun sajaa, väärä avain?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Ei voida yhdistää %s tässä tietokoneessa (yhdistäminen palautti virheen %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>En voida allekirjoittaa spork viestiä, väärä avain?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Tuntematon -socks proxy versio pyydetty: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Tuntematon verkkomääritys -onlynet parametrissa: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Päivitä lompakko uusimpaan formaattiin</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Käyttö (käytöstä poistunut, käytä dash-cli):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Käyttö:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Käytä KeePass 2 integrointia käyttäen KeePassHttp liitännäistä (default: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Käytä N erillistä masternodea varojen anonymisointiin (2-8, oletus: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Päivitä lompakko uusimpaan formaattiin</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Käytä OpenSSL:ää (https) JSON-RPC yhteyksille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Käytä UPnP:tä kuunneltavan portin kartoitukseen (oletus: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Käytä UPnP:tä kuunneltavan portin kartoitukseen (oletus: 1 kun kuunellaan)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Käytä testiverkkoa</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Käyttäjätunnus JSON-RPC yhteyksille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Määrä on enemmän kuin Darksend varannon maksimi sallii.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Tarkistetaan lohkoja...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Tarkistetaan lompakko...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Odota että RPC palvelin käynnistyy</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Lompakko %s sijaitsee data hakemiston ulkopuolella %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Lompakko on lukittu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Lompakko on kirjoitettava uudelleen, käynnistä Dash uudestaan</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Lompakon valinnat:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Varoitus</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Varoitus: Käytöstä poistunut argumentti -debugnet sivutettu, käytä debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Varoitus: Tämä versio on vanhentunut, päivitys on tarpeen!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex vaihtaen -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Tyhjennetään kaikki siirtotapahtumat lompakosta....</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>käynnistyksessä</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>versio</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat lompakkotiedosto vioittunut, pelastaminen epäonnistui</translation>
     </message>
diff --git a/src/qt/locale/dash_it.ts b/src/qt/locale/dash_it.ts
index 5f85c565b42c..13822cf34753 100644
--- a/src/qt/locale/dash_it.ts
+++ b/src/qt/locale/dash_it.ts
@@ -1,202 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="it">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Su Dash core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;/b&gt; versione</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Questo è un software sperimentale.
-
-Distribuito sotto la licenza software MIT/X11, vedi il file COPYING incluso oppure su http://www.opensource.org/licenses/mit-license.php.
-
-Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso del Toolkit OpenSSL (http://www.openssl.org/), software crittografico scritto da Eric Young (eay@cryptsoft.com) e software UPnP scritto da Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Gli sviluppatori di Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Gli sviluppatori di Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="it" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Doppio click per modificare l&apos;indirizzo o l&apos;etichetta</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Bottone destro per modificare l&apos;indirizzo o l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Crea un nuovo indirizzo</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Nuovo</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copia l&apos;indirizzo attualmente selezionato negli appunti</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copia</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Cancella l&apos;indirizzo attualmente selezionato dalla lista</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Cancella</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Esporta su file i dati della tabella corrente </translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Esporta</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>C&amp;hiudi</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Scegli l&apos;indirizzo a cui inviare i dash</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Scegli l&apos;indirizzo con cui ricevere dash</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>Sc&amp;egli</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Indirizzi d&apos;invio</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Indirizzi di ricezione</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Questi sono i tuoi indirizzi Dash per inviare i pagamenti. Controlla sempre l&apos;ammontare e l&apos;indirizzo destinatario prima di inviare i dash.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Questi sono i tuoi indirizzi di Dash per ricevere i pagamenti. Si raccomanda di usare un nuovo indirizzo di ricezione per ogni operazione.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copia l&apos;indirizzo</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Copia &amp;l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Modifica</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Esporta Lista Indirizzi</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Testo CSV (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Esportazione Fallita.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Si è verificato un errore tentando di salvare la lista degli indirizzi in %1.</translation>
+        <translation>C&apos;é stato un errore mentre si salvava la lista di indirizzi a %1. Per favore provaci di nuovo.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Etichetta</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(nessuna etichetta)</translation>
     </message>
@@ -204,154 +143,150 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
-        <translation>Finestra passphrase</translation>
+        <translation>Finestra parola d&apos;ordine</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
-        <translation>Inserisci la passphrase</translation>
+        <translation>Inserisci la parola d&apos;ordine</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
-        <translation>Nuova passphrase</translation>
+        <translation>Nuova parola d&apos;ordine</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
-        <translation>Ripeti la nuova passphrase</translation>
+        <translation>Ripeti la nuova parola d&apos;ordine</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Serve a disabilitare </translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Per la sola anomizzazione</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Inserisci la nuova passphrase per il portamonete.&lt;br/&gt;Si prega di usare una passphrase di &lt;b&gt;10 o più caratteri casuali&lt;/b&gt;, o di &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Inserisci la nuova parola d&apos;ordine per il portafoglio.&lt;br/&gt;Si prega di usare una parola d&apos;ordine di &lt;b&gt;dieci o più caratteri casuali&lt;/b&gt;, o &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Cifra il portafoglio</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Quest&apos;operazione necessita della passphrase per sbloccare il portamonete.</translation>
+        <translation>Quest&apos;operazione necessita della parola d&apos;ordine per sbloccare il portafoglio.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Sblocca il portafoglio</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Quest&apos;operazione necessita della passphrase per decifrare il portamonete,</translation>
+        <translation>Quest&apos;operazione necessita della parola d&apos;ordine per decifrare il portafoglio.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
-        <translation>Decifra il portamonete</translation>
+        <translation>Decifra il portafoglio</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
-        <translation>Cambia la passphrase</translation>
+        <translation>Cambia la parola d&apos;ordine</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Inserisci la vecchia e la nuova passphrase per il portafoglio.</translation>
+        <translation>Inserisci la vecchia e la nuova parola d&apos;ordine per il portafoglio.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
-        <translation>Conferma la cifratura del portamonete</translation>
+        <translation>Conferma la cifratura del portafoglio</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
-        <translation>Attenzione: se crittografi il tuo portafoglio e perdi la tua passphrase, PERDERAI TUTTI I TUOI DASH!</translation>
+        <translation>Attenzione: se crittografi il tuo portafoglio e perdi la tua parola d&apos;ordine, &lt;b&gt;PERDERAI TUTTI I TUOI DASH&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Si è sicuri di voler cifrare il portafoglio?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Portafoglio cifrato</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
-        <translation>Dash adesso si chiuderá per finire il processo di crittografia. Ricorda che crittogafiare il tuo portafoglio non ti da una protezione totale se il tuo computer é infettato da malware</translation>
+        <translation>Dash adesso si chiuderá per finire il processo di crittografia. Ricorda che crittografare il tuo portafoglio non ti da una protezione totale se il tuo computer é infettato da malware</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>IMPORTANTE: qualsiasi backup del file portamonete effettuato in precedenza dovrà essere sostituito con il file del portamonete cifrato appena generato. Per ragioni di sicurezza, i precedenti backup del file del portamonete non cifrato diventeranno inservibili non appena si inizierà ad utilizzare il nuovo portamonete cifrato.</translation>
+        <translation>IMPORTANTE: qualsiasi backup del file portamonete effettuato in precedenza dovrà essere sostituito con il file del portafoglio cifrato appena generato. Per ragioni di sicurezza, i precedenti backup del file del portamonete non cifrato diventeranno inservibili non appena si inizierà ad utilizzare il nuovo portafoglio cifrato.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Cifratura del portafoglio fallita</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Cifratura del portafoglio fallita a causa di un errore interno. Il portafoglio non è stato cifrato.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
-        <translation>Le passphrase inserite non corrispondono.</translation>
+        <translation>Le parola d&apos;ordine inserite non corrispondono.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Sblocco del portafoglio fallito</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
-        <translation>La passphrase inserita per la decifrazione del portafoglio è errata.</translation>
+        <translation>La parola d&apos;ordine inserita per la decifrazione del portafoglio è errata.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Decifrazione del portafoglio fallita</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation>Passphrase del portafoglio modificata con successo.</translation>
+        <translation>Parola d&apos;ordine del portafoglio modificata con successo.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Attenzione: il tasto Blocco maiuscole è attivo!</translation>
     </message>
@@ -359,437 +294,425 @@ Questo prodotto include software sviluppato dal progetto OpenSSL per l&apos;uso
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Nodo</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Sintesi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Mostra lo stato generale del portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Invia</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Spedire dash ad un indirizzo Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Ricevi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Richieste di pagamenti (genera codici QR e dash: URLs)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transazioni</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Mostra la cronologia delle transazioni</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>E&amp;sci</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Chiudi applicazione</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Su Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Mostra informazioni su Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Mostra la informazione su Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Informazioni su &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Mostra informazioni su Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Opzioni...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Modifica le opzioni di configurazione di Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostra / Nascondi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Mostra o nascondi la Finestra principale</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Cifra il portafoglio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Cifra le chiavi private che appartengono al tuo portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Backup Portafoglio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Effettua il backup del portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
-        <translation>&amp;Cambia la passphrase...</translation>
+        <translation>&amp;Cambia la parola d&apos;ordine...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Cambia la passphrase utilizzata per la cifratura del portafoglio</translation>
+        <translation>Cambia la parola d&apos;ordine utilizzata per la cifratura del portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Sblocca Portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Sblocca il portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Blocca Portafoglio</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Firma il &amp;messaggio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Firma i messaggi con il tuo indirizzo Dash per dimostrarne che li possiedi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Verifica messaggio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Verificare i messaggi per assicurarsi che sono firmati con gli indirizzi specificati di Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Informazioni</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Mostra l&apos;informazione di diagnostica</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Console di Debug</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Apri la console di Debug</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Monitor di rete</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Mostra il monitor di rete</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation> Riparare Portafoglio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Mostrare le opzioni per riparare il portafoglio</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Apri il &amp;File della configurazione</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Apri il file di configurazione</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Mostra Copie Automatiche</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Mostra le copie del portafoglio create automaticamente</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Indirizzi d&apos;invio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Mostra la lista degli indirizzi di invio utilizzati</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Indirizzi di &amp;ricezione...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Mostra la lista degli indirizzi di ricezione utilizzati</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Apri &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Apri un dash: URI o una richiesta di pagamento</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>Opzioni riga di &amp;comando</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Cliente Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Processato un blocco della cronologia transazioni.</numerusform><numerusform>Processati %1 blocchi della cronologia transazioni.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Mostra il messaggio di aiuto di Dash Core per ottenere una lista con le possibili opzioni di linea di comando di Dash</translation>
+        <translation>Mostra il messaggio di aiuto di Dash Core per ottenere una lista con le possibili opzioni di linea di comando di Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;File</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Impostazioni</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Strumenti</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Aiuto</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Barra degli strumenti &quot;Tabs&quot;</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Dash Client</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n connessione(i) attive alla rete Dash</numerusform>
-            <numerusform>%n connessione(i) attive alla rete Dash</numerusform>
-        </translation>
+        <translation><numerusform>Una connessione attiva alla rete Dash</numerusform><numerusform>%n connessioni attive alla rete Dash</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Sincronizzazione con la rete in corso...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importazione blocchi dal disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Re-indicizzazione blocchi su disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Nessuna fonte di blocchi disponibile</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Processati %1 blocchi della cronologia transazioni.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Aggiornato</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n ora(e)</numerusform>
-            <numerusform>%n ora(e)</numerusform>
-        </translation>
+        <translation><numerusform>%n ora </numerusform><numerusform>%n ore</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n giorno(i)</numerusform>
-            <numerusform>%n giorno(i)</numerusform>
-        </translation>
+        <translation><numerusform>%n giorno</numerusform><numerusform>%n giorni </numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n settimana(e)</numerusform>
-            <numerusform>%n settimana(e)</numerusform>
-        </translation>
+        <translation><numerusform>%n settimana</numerusform><numerusform>%n settimane</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 e %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n anno(i)</numerusform>
-            <numerusform>%n anno(i)</numerusform>
-        </translation>
+        <translation><numerusform>%n anno</numerusform><numerusform>%n anni</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>Indietro di %1</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>In aggiornamento...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>L&apos;ultimo blocco ricevuto è stato generato %1 fa.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transazioni successive a questa non saranno ancora visibili.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Errore</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Attenzione</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Informazioni</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Transazione inviata</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Transazione ricevuta</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -803,30 +726,25 @@ Indirizzo: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Il portafoglio è &lt;b&gt;cifrato&lt;/b&gt; ed attualmente &lt;b&gt;sbloccato&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Il portafoglio é crittografato e attualmente sbloccato solo per anonimizzare</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Il portafoglio è &lt;b&gt;cifrato&lt;/b&gt; ed attualmente &lt;b&gt;bloccato&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Si è verificato un errore fatale. Dash non può continuare a funzionare correttamente e verrà chiuso.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Avviso di rete</translation>
     </message>
@@ -834,333 +752,302 @@ Indirizzo: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Selezione Indirizzo Coin Control</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Quantità:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Byte:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Importo:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Priorità:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Commissione:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Selezione Moneta</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Dopo Commissione:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Resto:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(de)seleziona tutto</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Modalità Albero</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Modalità Lista</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 bloccato)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Ricevuto tramite l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Etichetta</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Indirizzo</translation>
+        <translation>Ricevuto tramite l&apos;indirizzo</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Darksend Round</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Conferme:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Confermato</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Priorità</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Copia l&apos;indirizzo</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copia l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Copia l&apos;importo</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Copia l&apos;ID transazione</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Blocca i non spesi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Sblocca i non spesi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Copia quantità</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Copia commissione</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copia al netto della commissione</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copia byte</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copia priorità</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copia low output</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copia resto</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Selezionati input non anonimizzati.&lt;b&gt;Darksend sará disabilitato.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Se vuoi ancora usare Darksend, per favore per prima cosa togli la selezione a tutti gli inputs non anonimizzati e dopo controlla il Darksend checkbox di nuovo.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>massima</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>superiore</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>medio-alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>medio-bassa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>bassa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>minore</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>minima</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 bloccato)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>nessuno</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Trascurabile</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>sì</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>no</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Questa etichetta diventa rossa se la dimensione della transazione supera i 1000 bytes</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Questo significa che è richiesta una commissione di almeno %1 per ogni kB.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Può variare di +/- 1 byte per input.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Le transazioni con priorità più alta hanno più probabilità di essere incluse in un blocco.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Questa etichetta diventa rossa se la priorità è inferiore a &quot;media&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Questa etichetta diventa rossa se uno qualsiasi dei destinatari riceve un ammontare inferiore di %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Questo significa che è richiesta una commissione di almeno %1</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Importi inferiori a 0,546 volte la commissione minima di trasferimento sono mostrati come trascurabili.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Questa etichetta diventa rossa se il resto è minore di %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(nessuna etichetta)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>resto da %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(resto)</translation>
     </message>
@@ -1168,84 +1055,84 @@ Indirizzo: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Configura Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Privacy base</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Privacy alta</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Privacy massima</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Selezionare il livello di privacy</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Usa 2 separati masternode per mischiare fino al 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Usa 8 separati masternode per mischiare fino al 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Usa 16 separati masternode</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Questa opzione è la più veloce e ti costerà ~0.025DRK circa per anonimizzare 1000DRK</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Questa opzione è moderatamente veloce e costerà 0.05DRK circa per anonimizzare 1000DRK</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1DRK ogni 1000DRK anonimizzati.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Questa è la più lenta ma più sicura opzione. Usare il massimo grado di anonimizzazione costerà</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Configurazione Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Dark send è statto correttamente impostato su base (%1 e 2 round). Puoi cambiare questa impostazione in qualsiasi momento tu lo voglia dalla finestra di configurazione.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend è stata impostata correttamente a elevato (% 1 e 8 turni). È possibile modificare in qualsiasi momento aprendo schermata di configurazione di Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend è stato correttamente settato al massimo (%1 e 16 rounds). Puoi cambiarlo quando vuoi aprendo la finestra di configurazione di Dash</translation>
     </message>
@@ -1253,67 +1140,67 @@ Indirizzo: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Modifica l&apos;indirizzo</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Etichetta</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>L&apos;etichetta associata con questa voce della lista degli indirizzi</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Indirizzo</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>L&apos;indirizzo associato a questa voce della rubrica. Può essere modificato solo per gli indirizzi d&apos;invio.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Nuovo indirizzo di ricezione</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Nuovo indirizzo d&apos;invio</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Modifica indirizzo di ricezione</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Modifica indirizzo d&apos;invio</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>L&apos;indirizzo inserito &quot;%1&quot; non é un indirizzo Dash valido</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>L&apos;indirizzo inserito &quot;%1&quot; è già in rubrica.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Impossibile sbloccare il portafoglio.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Generazione della nuova chiave non riuscita.</translation>
     </message>
@@ -1321,27 +1208,27 @@ Indirizzo: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Sarà creata una nuova cartella dati.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>Nome</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>La cartella esiste già. Aggiungi %1 se intendi creare qui una nuova cartella.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Il percorso è già esistente e non è una cartella.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Qui non è possibile creare una cartella dati.</translation>
     </message>
@@ -1349,72 +1236,68 @@ Indirizzo: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Opzioni riga di comando</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>versione</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Su Dash core</translation>
+        <translation>Su Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Opzioni della riga di comando</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Utilizzo:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>opzioni riga di comando</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>UI opzioni</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Scegli una cartella dati all&apos;avvio (predefinito: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Imposta lingua, ad esempio &quot;it_IT&quot; (predefinita: lingua di sistema)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Avvia ridotto a icona</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Imposta i certificati radice SSL per le richieste di pagamento (predefinito: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostra finestra di presentazione all&apos;avvio (predefinito: 1)</translation>
     </message>
@@ -1422,107 +1305,85 @@ Indirizzo: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Benvenuto</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Benvenuto in Dash Core</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Essendo la prima volta nella quale il programma viene lanciato, puoi scegliere dove Dash Core memorizzerà i propri dati.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Dash Core scaricherà e salverà una copia della blockchain. Almeno %1GB di dati sarà immagazzinato in questa cartella e aumenterà coll tempo. Anche il portafoglio sará conservato in questa cartella.</translation>
+        <translation>Dash Core scaricherà e salverà una copia della blocco catena. Almeno %1GB di dati sarà immagazzinato in questa cartella e aumenterà col tempo. Anche il portafoglio sarà conservato in questa cartella.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Usa la cartella dati predefinita</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Usa una cartella dati personalizzata:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Errore: La cartella dati &quot;%1&quot; specificata non può essere creata.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Errore: La cartella dati &quot;%1&quot; specificata non può essere creata.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Errore</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB di spazio libero disponibile</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 1 GB di spazio libero disponibile</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(di %1GB richiesti)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(di %1 GB richiesti)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Apri URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Apri richiesta di pagamento da URI o file</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Seleziona il file di richiesta di pagamento</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Seleziona il file di richiesta di pagamento da aprire</translation>
     </message>
@@ -1530,314 +1391,282 @@ Indirizzo: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Opzioni</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Principale</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Esegui automaticamente Dash Core all&apos;avvio del sistema.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Esegui Dash al login di sistema</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Dimensione della cache del &amp;database.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Numero di thread di &amp;verifica degli script </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = automatico, &lt;0 = lascia questo numero di core liberi)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Questo settaggio determina attraverso quanti masternode l&apos;input verrà anonimizzato. Più round di anonimizzazione garantiscono un grado più alto di privacy, ma anche un costo maggione in termini di commissioni.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Round darksend da utilizzare</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tale importo si comporta come una soglia per spegnere Darksend una volta che è raggiunto.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Quantitá di Dash da mantenere anonima.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>Port&amp;afoglio</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Accetta connessioni dall&apos;esterno</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Permetti connessioni in entrata</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Connetta a la rete Dash attraverso un SOCKS5 proxy</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Commissione di transazione per kB: è opzionale e contribuisce ad assicurare che le transazioni siano elaborate velocemente. La maggior parte della transazioni ha dimensioni pari a 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Paga la &amp;commissione</translation>
+        <translation>&amp;Connessione attraverso proxy SOCKS5 (proxy predefinito):</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Esperti</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Specifica se le funzionalita di coin control saranno visualizzate.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Abilita le funzionalità di coin &amp;control</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Disabilitando l&apos;uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando la transazione non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo saldo.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Spendere resti non confermati</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>Rete</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Apri automaticamente la porta utilizzata dal client Dash nel router. Funziona solo se il router supporta UPnP ed è attivato.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Mappa le porte tramite &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Connettiti al network del Dash attraverso un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Connessione attraverso proxy SOCKS (proxy predefinito):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP del proxy:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Indirizzo IP del proxy (es: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Porta:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta del proxy (es. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">SOCKS &amp;Versione:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Versione SOCKS del proxy (es. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Finestra</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Mostra solo nella tray bar quando si riduce ad icona.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimizza nella tray bar invece che sulla barra delle applicazioni</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Riduci ad icona invece di uscire dall&apos;applicazione quando la finestra viene chiusa. Se l&apos;opzione è attiva, l&apos;applicazione terminerà solo dopo aver selezionato Esci dal menu File.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimizza alla chiusura</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Mostra</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Lingua Interfaccia Utente:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>La lingua dell&apos;interfaccia utente può essere impostata qui. Questo settaggio sarà attivo al riavvio del client.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>La tua lingua manca o la traduzione è incompleta? Contribuisci alla traduzione qui: 
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tema dell&apos;interfaccia utente.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unità di misura con cui visualizzare gli importi:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Scegli l&apos;unità di suddivisione predefinita da utilizzare per l&apos;interfaccia e per l&apos;invio di monete.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Visualizza gli indirizzi Dash nella lista transazioni o no.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Mostra gli indirizzi nella lista delle transazioni</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell&apos;URL è sostituito dall&apos;hash della transazione.
 Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URL di transazione di terze parti</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Opzioni command-line attive che sostituiscono i settaggi sopra elencati:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Reimposta tutte le opzioni del client allo stato predefinito.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Ripristina Opzioni</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Cancella</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>predefinito</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>nessuno</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Conferma ripristino opzioni</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>È necessario un riavvio del client per rendere attivi i cambiamenti.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Il client sarà arrestato, vuoi procedere?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Questo cambiamento richiede un riavvio del client.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>L&apos;indirizzo proxy che hai fornito è invalido.</translation>
     </message>
@@ -1845,510 +1674,396 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Modulo</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Portafoglio</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
-        <translation>Le informazioni visualizzate potrebbero essere datate. Il portafoglio si sincronizza automaticamente col netowork dopo che una connessione viene stabilizzata, ma questo processo non è stato ancora completato.</translation>
+        <translation>Le informazioni visualizzate potrebbero essere datate. Il portafoglio si sincronizza automaticamente con il Dash rete dopo che una connessione viene stabilizzata, ma questo processo non è stato ancora completato.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Disponibile:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Saldo spendibile attuale</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>In attesa:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Totale delle transazioni in corso di conferma e che non sono ancora conteggiate nel saldo spendibile</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Immaturo:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Importo generato dal mining e non ancora maturato</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldi</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Transazione non confermata per gli indirizzi di sola consulta </translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Importo generato dal mining negli indirizzi per sola consulta e non ancora maturato</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Totale:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Saldo totale attuale</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Attuale importe totale negli indirizzi di sola consulta</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Solo per consultare</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Importo attuale negli indirizzi di sola consulta</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Spendibile:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Stato:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Attivato/Disattivato</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Completamento:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Bilancio Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Ammontare e Round:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Round</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Denom inviata</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Le denominations inviate al Masternode. Per mixare gli altri utenti devono sottomettere esattamente le stesse denominazioni.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Transazione recente</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Start/Stop Mixing</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Il valore che hai richiesto al Mastermode. &lt;br&gt; Per mixare, gli altri utenti devono richiedere esattamente gli stessi valori.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Ultimo messaggio)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Prova ad inserire una richiesta Darksend manualmente.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Prova il Mix</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Resetta lo stato corrente del Darksend (può interrompere il Darksend se è nel processo di mixaggio, costandoti una perdita economica!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Reset</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Transazioni recenti&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>non sincronizzato</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Disabilita</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Avvia Darksend mix</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Ferma Darksend mix</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Non ci sono input rilevati</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="320"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation type="unfinished"></translation>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>Un Round</numerusform><numerusform>%n Rounds</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Round</translation>
+        <location line="-65"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
+        <translation>Uscite denominate non confermati trovati, saranno aspettare che confermano per ricalcolare.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Abilitato</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>Progresso:%1% (gli inputs hanno una media di %2 di %n round)</numerusform><numerusform>Progresso:%1% (gli inputs hanno una media di %2 di %n rounds)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Incontrati sufficienti inputs compatibili per anonimizzare %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Insufficienti imputs compatibili per anonimizzare  &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;Anonimizzaranno &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; invece</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Abilitato</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Ultimo messaggio Darksend
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend non é attivo.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Richiesta di Darksend completa: la tua transazione é stata accettata nella piscina!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Inviato al masternode, in attesa di più voci</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Trovati sufficienti fondi, sto firmando...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Trovato abasanza utenti, sto firmando ( aspetta. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Trovato abasanza utenti, sto firmando ( aspetta.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Trovato abasanza utenti, sto firmando ( aspetta... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Trasmettendo la transazione finale.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Finalizzando la transazione.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Richiesta di Darksend incompleta.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Riprovará ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Richiesta di Darksend completa:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Inserita nel nodo maestro, aspettando in coda.</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Inserita nel nodo maestro, aspettando in coda.</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Inserita nel nodo maestro, aspettando in coda.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Situazione sconosciuta:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend è stato resettato con successo</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend ha bisogno almeno dell&apos; %1 per essere usato.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
-        <translation>Il p</translation>
+        <translation>Portafoglio è bloccato e l&apos;utente ha rifiutato di sbloccare. Disattivazione Darksend.</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Errore di richiesta di pagamento</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Impossibile avviare dash: gestore click-to-pay</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Avviso Net manager</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Il proxy attualmente attivo non supporta SOCKS5, il quale è necessario per richieste di pagamento via proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Gestione URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL di recupero della Richiesta di pagamento non valido: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">Impossibile interpretare l&apos;URI! Ciò può essere provocato da un indirizzo Dash non valido o da parametri URI non corretti.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Gestione del file di richiesta del pagamento</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Il file di richiesta del pagamento non può essere letto o elaborato! Il file in questione potrebbe essere danneggiato.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Indirizzo di pagamento non valido %1</translation>
+        <translation>Invalido indirizzo di pago %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>Impossibile interpretare l&apos;URI! La causa puó essere un indirizzo Dash non valido o parametri URI non corretti.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Il file di richiesta del pagamento non può essere letto! Il file in questione potrebbe essere non valido.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Richiesta di pago rifiutata</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>La rete della richiesta di pagamento non coincide con la rete del cliente.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>La richiesta di pagamento é scaduta</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>La richiesta di pagamento non ha cominciato</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Le richieste di pagamento non verificate verso script di pagamento personalizzati non sono supportate.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>L&apos;importo di pagamento richiesto di %1 è troppo basso (considerato come trascurabile).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Rimborso da %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Il pagamento richiesto %1 é troppo grande (%2 bytes, permesso %3 bytes).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Protezione DoS della richiesta di pago</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Errore di comunicazione con %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">La richiesta di pagamento non può essere analizzata o processata!</translation>
+        <translation>La richiesta di pagamento non può essere analizzata o processata!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Risposta errata da parte del server %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Errore di richiesta di rete</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Pagamento riconosciuto</translation>
     </message>
@@ -2356,139 +2071,98 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Indirizzo/Hostname</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente Utente</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Errore: La cartella dati &quot;%1&quot; specificata non esiste.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Errore: impossibile interpretare il file di configurazione: %1. Usare esclusivamente la sintassi chiave=valore.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Errore nella lettura del file di configurazione del masternode: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Errore: combinazione di -regtest e -testnet non valida.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core non e&apos; chiuso sicuro ancora...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Inserisci un indirizzo Dash (es.XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Importo</translation>
+        <translation>Importo</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Inserire un indirizzo Dash (e.g. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>RETE</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>SCONOSCIUTO</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Nessuno</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N/D</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Salva Immagine</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Copia Immagine</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Salva codice QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Immagine PNG (*.png)</translation>
     </message>
@@ -2496,436 +2170,495 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Finestra strumenti</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Informazioni</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Conteggio Masternode</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Generale</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nome</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Nome del client</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Numero di connessioni</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Apri il file log di debug dall&apos;attuale cartella dei dati. Può richiedere un paio di secondi per file di grossa dimensione.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Apri</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Tempo di avvio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Rete</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Ora del blocco più recente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>File log del Debug</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Versione OpenSSL in uso</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Data di creazione</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Numero attuale di blocchi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Versione client</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Usando versione BerkeleyDB</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Cancella console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Traffico di Rete</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Cancella</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Totali</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Ricevuto</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Spedito</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Seleziona un peer per vedere informazione dettagliata</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Direzione</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Versione</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente Utente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Servizi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tempo di connessione</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Ultimo Invio</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Ultima Ricezione</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Inviati</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Ricevuti</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Riparare Portafoglio</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Recuperare il portafoglio</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Ripeti l&apos;analisi dei file del blockchain</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Ristabilire le transazioni 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Ristabilire le transazioni 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Aggiorna il formato del portafoglio </translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>I bottoni sottostanti reiniziaranno il portafoglio con le opzioni di linea di comando per riparare il portafoglio e sistemare problemi con i file della blockchain corrotti o con transazioni perse o inadeguate </translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-recuperareportafoglio: Tenta di recuperare le chiavi private da un wallet.dat corrotto.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-ripetereanalisi: Ripete l&apos;analisi della catena dei blocchi per cercare le transazioni mancanti dal portamonete</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Recupera transazioni dalla catena di blocchi (mantiene i meta-data, es. il propietario del conto)</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Recupera transazioni dalla catena di blocchi (non conserva i meta-data)</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-aggiornaportafoglio: Aggiorna il portafoglio all&apos;ultima versione in startup. (Nota: questo NON é un aggiornamento del portafoglio stesso!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Opzioni per riparare il portafoglio.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Ricostruire l&apos;indice</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-riindicizzare: Ricostruisce l&apos;indice della catena di blocchi a partire dagli attuali blk000??.dat files</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Entrata:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Uscita:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Benvenuto nella console RPC Dash</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Usa le frecce direzionali per navigare la cronologia, e &lt;b&gt;Ctrl-L&lt;/b&gt; per cancellarla.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Scrivi &lt;b&gt;help&lt;/b&gt; per un riassunto dei comandi disponibili</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>via %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>mai</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>In entrata</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>In uscita</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Sconosciuto</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Riutilizza uno degli indirizzi di ricezione generati in precedenza. Riutilizzare un indirizzo comporta problemi di sicurezza e privacy. Non utilizzare a meno che non si stia rigenerando una richiesta di pagamento creata in precedenza.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;iusa un indirizzo di ricezione (non raccomandato)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Messaggio opzionale da allegare alla richiesta di pagamento, che verrà visualizzato quando la richiesta verrà aperta. Nota: il messaggio non sarà inviato insieme al pagamento nel network Dash.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Messaggio opzionale da allegare alla richiesta di pagamento, che verrà visualizzato quando la richiesta verrà aperta. Nota: il messaggio non sarà inviato insieme al pagamento nel network Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Messaggio:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Un&apos;etichetta facoltativa da associare al nuovo indirizzo di ricezione</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Usa questo modulo per richiedere pagamenti. Tutti i campi sono &lt;b&gt;opzionali&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Etichetta</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Un importo opzionale da associare alla richiesta. Lasciare vuoto o a zero per non richiedere un importo specifico.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Importo:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Richiedi pagamento</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Cancellare tutti i campi del modulo.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Cancella</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Cronologia pagamenti ricevuti</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Mostra la richiesta selezionata (produce lo stesso effetto di un doppio click su una voce)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Mostra</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Rimuovi le voci selezionate dalla lista</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Rimuovi</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Copia l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Copia messaggio</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copia l&apos;importo</translation>
     </message>
@@ -2933,67 +2666,67 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>Codice QR</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copia &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copia &amp;Indirizzo</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Salva Immagine</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Richiesta di pagamento a %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Informazioni pagamento</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Etichetta</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Messaggio</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>L&apos;URI risultante è troppo lungo, prova a ridurre il testo nell&apos;etichetta / messaggio.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Errore nella codifica dell&apos;URI nel codice QR</translation>
     </message>
@@ -3001,37 +2734,37 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Etichetta</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Messaggio</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(nessuna etichetta)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(nessun messaggio)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(nessun importo)</translation>
     </message>
@@ -3039,412 +2772,396 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Invia dash</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Funzionalità di Coin Control</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Input...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>selezionato automaticamente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Fondi insufficienti!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Quantità:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Byte:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Importo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Priorità:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Commissione:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>no</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Dopo Commissione:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Resto:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
-        <translation>Se questo è abilitato e l&apos;indirizzo per il resto è vuoto o invalido, il resto sarà inviato ad un nuovo indirizzo bitcoin generato appositamente.</translation>
+        <translation>Se questo è abilitato e l&apos;indirizzo per il resto è vuoto o invalido, il resto sarà inviato ad un nuovo indirizzo generato appositamente.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Personalizza indirizzo di resto</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Commissione della transazione</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Scegli...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>Abbassare la finestra delle opzioni delle commissioni</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Ridurre</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Se la commissione é stabilita a 1000 duffs e la transazione é di solo 250 bytes, allora solo si paga 250 duffs di tasse &quot;per kilobyte&quot;, mentre &quot;come minimo&quot; paga 1000 duffs. Per transazioni maggiori di un kilobyte entrambe pagano per kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>per kilobyte</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Se la commissione é stabilita a 1000 duffs e la transazione é di solo 250 bytes, allora solo si paga 250 duffs di tasse &quot;per kilobyte&quot;, mentre il &quot;totale come minimo&quot; paga 1000 duffs. Per transazioni maggiori di un kilobyte entrambe pagano per kilobyte.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>totale come minimo</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Pagare solo la commissione minima va bene fino a quando il volume delle transazioni é inferiore allo spazio nei blocchi. Ma attenzione perché se c&apos;é piú domanda di transazioni dash di quelle che la rete puó processare, puó essere che la transazione non si confermi mai.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Raccomandato</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tempo per la conferma:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normale</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>rapido</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Se é possibile, inviare una transazione senza commissione, </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(la conferma puó avere bisogno di tempo)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Conferma l&apos;azione di invio</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Invia</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Cancellare tutti i campi del modulo.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Cancella &amp;tutto</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Invia a diversi beneficiari in una volta sola</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>&amp;Aggiungi beneficiario</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Copia quantità</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copia l&apos;importo</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Copia commissione</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copia dopo commissione</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copia byte</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copia priorità</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copia low output</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copia resto</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>utilizzando</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>fondi anonimi</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
-        <translation type="unfinished"></translation>
+        <translation>(darksend richiede questo importo da arrotondato al più vicino% 1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>tutti i fondi disponibili (non raccomandato)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>e InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 a %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Sei sicuro di voler inviare?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>sono aggiunti come pagamento per la transazione</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Importo Totale %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>o</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Conferma l&apos;invio di dash</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Richiesta di pagamento scaduta</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Una commissione %1 volte piú alta che %2 per kB é considerata incredibilmente alta.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Indirizzo di pagamento non valido %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Inizio della confirmazione stimato in un blocco</numerusform><numerusform>Inizio della confirmazione stimato in %n blocchi</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>L&apos;indirizzo del beneficiario non è valido, si prega di ricontrollare.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>L&apos;importo da pagare dev&apos;essere maggiore di 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>L&apos;importo è superiore al tuo saldo attuale</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Il totale è superiore al tuo saldo attuale includendo la commissione di %1.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
-        <translation>Rilevato un indirizzo duplicato, è possibile inviare bitcoin una sola volta agli indirizzi durante un&apos;operazione di invio.</translation>
+        <translation>Rilevato un indirizzo duplicato, è possibile inviare una sola volta agli indirizzi durante un&apos;operazione di invio.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Creazione transazione fallita!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>La transazione è stata rifiutata! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere bitcoin e questi non sono stati considerati spesi dal portamonete corrente.</translation>
+        <translation>La transazione è stata rifiutata! Questo può accadere se alcuni monete nel tuo portafoglio sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere monete e questi non sono stati considerati spesi dal portafoglio corrente.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Errore: il portafoglio era sbloccato solo per le monete anonimizzate</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Pagare solo la minima commissione di %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>ATTENZIONE: Indirizzo Dash non valido</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Attenzione: Indirizzo per il resto sconosciuto</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(nessuna etichetta)</translation>
     </message>
@@ -3452,102 +3169,98 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Questo è un normale pagamento.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Paga &amp;a:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;indirizzo al quale inviare il pagamento  (ad es. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;indirizzo Dash per inviare il pagamento a </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Scegli un indirizzo usato precedentemente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Incollare l&apos;indirizzo dagli appunti</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Rimuovi questa voce</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Etichetta</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Inserisci un&apos;etichetta per questo indirizzo per aggiungerlo alla lista degli indirizzi utilizzati</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>I&amp;mporto:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Messaggio:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Un messaggio allegato con l&apos;URI dash che verrà memorizzato nella transazione per il tuo referente. Nota: questo messaggio non verrà inviato attraverso il network Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Questa è una richiesta di pagamento non verificata.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Pagare a:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Memo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Questa è una richiesta di pagamento verificata.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Inserisci un&apos;etichetta per questo indirizzo, per aggiungerlo nella rubrica</translation>
     </message>
@@ -3555,12 +3268,12 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core si sta chiudendo...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Non spegnere il computer fino a quando questa finestra non si sarà chiusa.</translation>
     </message>
@@ -3568,193 +3281,181 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Firme - Firma / Verifica un messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Firma il messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Puoi firmare messaggi con i tuoi indirizzi in modo da dimostrarne il possesso. Presta attenzione a non firmare dichiarazioni vaghe, attacchi di phishing potrebbero cercare di spingerti ad apporre la tua firma su di esse. Firma solo dichiarazioni completamente dettagliate e delle quali condividi in pieno il contenuto.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;indirizzo con il quale firmare il messaggio(ad es. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;indirizzo Dash con cui firmare il messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Scegli un indirizzo usato precedentemente</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Incolla l&apos;indirizzo dagli appunti</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Inserisci qui il messaggio che vuoi firmare</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Firma</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copia la firma corrente nella clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Firma il mssaggio per dimostrare il possesso di questo indirizzo Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Firma &amp;Messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Reimposta tutti i campi della firma messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Cancella &amp;tutto</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Verifica Messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Inserisci l&apos;indirizzo del firmatario, il messaggio (assicurati di copiare esattamente anche i ritorni a capo, gli spazi, le tabulazioni, etc..) e la firma qui sotto, per verificare il messaggio. Presta attenzione a non vedere nella firma più di quanto non sia riportato nel messaggio stesso, per evitare di cadere vittima di attacchi di tipo man-in-the-middle.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;indirizzo Dash con cui era firmato il messaggio</translation>
     </message>
     <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;indirizzo con il quale è stato firmato il messaggio (ad es. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Verifica il messaggio per assicurarti sia stato firmato con l&apos;indirizzo Dash specificato</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Verifica &amp;Messaggio</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Reimposta tutti i campi della verifica messaggio</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Clicca &quot;Firma il messaggio&quot; per ottenere la firma</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Inserisci un indirizzo Dash (es.XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>L&apos;indirizzo inserito non è valido.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Per favore controlla l&apos;indirizzo e prova ancora</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
-        <translation>L&apos;indirizzo bitcoin inserito non è associato a nessuna chiave.</translation>
+        <translation>L&apos;indirizzo inserito non è associato a nessuna chiave.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
-        <translation>Sblocco del portamonete annullato.</translation>
+        <translation>Sblocco del portafoglio annullato.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>La chiave privata per l&apos;indirizzo inserito non è disponibile.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Firma messaggio fallita.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Messaggio firmato.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Non è stato possibile decodificare la firma.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Per favore controlla la firma e prova ancora.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>La firma non corrisponde al digest del messaggio.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Verifica messaggio fallita.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Messaggio verificato.</translation>
     </message>
@@ -3762,27 +3463,27 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Versione%1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Gli sviluppatori di Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Gli sviluppatori di Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3790,7 +3491,7 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3798,254 +3499,245 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Aperto per %n blocco(i) ancora</numerusform>
-            <numerusform>Aperto per %n blocco(i) ancora</numerusform>
-        </translation>
+        <translation><numerusform>Aperto per un blocco in piú</numerusform><numerusform>Aperto per %n blocchi in piú</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Aperto fino a %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>in conflitto</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/offline (verificato via intantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/confermato (verificato via instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 conferme (verificate via instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/non confermato</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 conferme</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1/offline (InstantX verifica in corso - %2 di %3 firme)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
-        <translation type="unfinished"></translation>
+        <translation>%1/confermato (InstantX verifica in corso - %2 di %3 firme )</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 conferma (InstantX verifica in corso - %2 di %3 firme)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1/offline (InstantX verifica fallita)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
-        <translation type="unfinished"></translation>
+        <translation>%1/confermato (InstantX verifica fallita)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Stato</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, non è stato ancora trasmesso con successo</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>trasmettere attraverso un nodo</numerusform><numerusform>trasmettere attraverso %n nodi</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Sorgente</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Generato</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>Da</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>sconosciuto</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>A</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>proprio indirizzo</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Solo per consultare</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>etichetta</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Credito</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Matura in un blocco in piú.</numerusform><numerusform>Matura in %n blocchi in piú.</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>non accettato</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Debito</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Debito totale</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Credito totale</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Commissione transazione</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Importo netto</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Messaggio</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Commento</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID della transazione</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Mercante</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
-        <translation>È necessario attendere %1 blocchi prima che i bitcoin generati possano essere spesi. Quando è stato generato questo blocco, è stato trasmesso alla rete in modo da poter essere aggiunto alla block chain. Se l&apos;inserimento avrà esito negativo il suo stato sarà modificato in &quot;non accettato&quot; e risulterà non spendibile. Questo può occasionalmente accadere se un altro nodo genera un blocco entro pochi secondi dal tuo.</translation>
+        <translation>È necessario attendere %1 blocchi prima che i monete generati possano essere spesi. Quando è stato generato questo blocco, è stato trasmesso alla rete in modo da poter essere aggiunto alla blocco catena. Se l&apos;inserimento avrà esito negativo il suo stato sarà modificato in &quot;non accettato&quot; e risulterà non spendibile. Questo può occasionalmente accadere se un altro nodo genera un blocco entro pochi secondi dal tuo.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Informazione di debug</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transazione</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Input</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>vero</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>falso</translation>
     </message>
@@ -4053,12 +3745,12 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Dettagli sulla transazione</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Questo pannello mostra una descrizione dettagliata della transazione</translation>
     </message>
@@ -4066,169 +3758,162 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Importo</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform>Aperto per %n blocco(i) ancora</numerusform>
-        </translation>
+        <translation><numerusform>Aperto per un blocco in piú</numerusform><numerusform>Aperto per %n blocchi in piú</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Aperto fino a %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Offline</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Non confermato</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>In conferma (%1 di %2 conferme raccomandate)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Confermato (%1 conferme)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>In conflitto</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Immaturo (%1 conferme, sarà disponibile fra %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Questo blocco non è stato ricevuto dagli altri nodi e probabilmente non sarà accettato!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Generati, ma non accettati</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Ricevuto tramite</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Ricevuto da</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Ricevuto via Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Inviato a</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Pagamento a te stesso</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Ottenuto dal mining</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominazione</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Collaterale Pagamento</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Fa Ingressi Collaterali</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Crea Denominazioni</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Solo per consultare</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(N / a)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Stato della transazione. Passare con il mouse su questo campo per visualizzare il numero di conferme.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Data e ora in cui la transazione è stata ricevuta.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Tipo di transazione.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Incluso se in questa transazione é coinvolto un indirizzo di sola consulta</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Indirizzo di destinazione della transazione.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Importo rimosso o aggiunto al saldo.</translation>
     </message>
@@ -4236,207 +3921,208 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Tutti</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Oggi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Questa settimana</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Questo mese</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Il mese scorso</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Quest&apos;anno</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Intervallo...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Piú Comune</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Ricevuto tramite</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Inviato a</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Fa Ingressi Collaterali</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Crea Denominazioni</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominazione</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Darksend Collaterale Pagamento</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>A te stesso</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Ottenuto dal mining</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Altro</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Inserisci un indirizzo o un&apos;etichetta da cercare</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Importo minimo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copia l&apos;indirizzo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copia l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copia l&apos;importo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Copia l&apos;ID transazione</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Modifica l&apos;etichetta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Mostra i dettagli della transazione</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Esporta lo storico delle transazioni</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Testo CSV (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Confermato</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Solo per consultare</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Etichetta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Indirizzo</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Importo</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Esportazione Fallita.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Si è verificato un errore durante il salvataggio dello storico delle transazioni in %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Esportazione Riuscita</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Lo storico delle transazioni e&apos; stato salvato con successo in %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Intervallo:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>a</translation>
     </message>
@@ -4444,15 +4130,15 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Unitá per mostrare gli importi. Clicca per selezionare un&apos;altra unitá.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Non è stato caricato alcun portafoglio.</translation>
     </message>
@@ -4460,59 +4146,58 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Invia dash</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX non supporta ancora l&apos;invio di somme così alte. Le transazioni sono attualmente limitate al %n DASH.</numerusform>
-            <numerusform>InstantX non supporta ancora l&apos;invio di somme così alte. Le transazioni sono attualmente limitate al %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX non supporta ancora l&apos;invio di somme così alte. Le transazioni sono attualmente limitate al %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Esporta</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Esporta su file i dati della tabella corrente</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Backup Portafoglio</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Dati Portafoglio (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Backup Fallito</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation>Si è verificato un errore durante il salvataggio dei dati del portamonete in %1.</translation>
+        <translation>Si è verificato un errore durante il salvataggio dei dati del portafoglio in %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Backup eseguito con successo</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Il portafoglio è stato correttamente salvato in %1.</translation>
     </message>
@@ -4520,1378 +4205,1425 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, devi settare la rpcpassword nel file de configurazione:
-%s
-Si raccomanda di utilizzare la seguente password randomizzata:
-rpcuser=dashrpc
-rpcpassword=%s
-(non è necessario che ti ricordi questa password)
-username e password NON devono essere uguali.
-Se il file non eseiste, crealo con i soli permessi di lettura da parte del propietario.
-Si raccomanda inoltre di impostare la notifica di allerta in modo da ricevere un avviso in caso di problemi;
-ad esempio: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifrature accettabili (predefinito: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Errore riscontrato durante l&apos;impostazione della porta RPC %u per l&apos;ascolto su IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Errore riscontrato durante l&apos;impostazione della porta RPC %u per l&apos;ascolto su IPv6, tornando su IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Associa all&apos;indirizzo indicato e resta permanentemente in ascolto su questo. Usa la notazione [host]:porta per l&apos;IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Impossibile ottenere un blocco sulla data directory % s. Dash Core è probabilmente già in esecuzione.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limita la quantità di transazioni gratuite ad &lt;n&gt;*1000 byte al minuto (predefinito: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Disabilita tutti i Masternode e le funzioni relative a Darksend (0-1, default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend utilizza esatto denominato importo a inviare fondi, si potrebbe semplicemente bisogno di anonimizzare alcuni più monete.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi sono risolti istantaneamente. Questo è fatto per lo sviluppo di strumenti e applicazioni per test di regressione.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entra in modalità di test di regressione, la quale usa una speciale catena in cui i blocchi possono essere risolti istantaneamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Errore: la transazione è stata rifiutata! Questo può accadere se alcuni bitcoin nel tuo portamonete sono già stati spesi, ad esempio se hai utilizzato una copia del file wallet.dat per spendere bitcoin e questi non sono stati considerati spesi dal portamonete corrente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Errore: questa transazione necessita di una commissione di almeno %s a causa del suo ammontare, della sua complessità, o dell&apos;uso di fondi recentemente ricevuti!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Errore: Portafoglio sbloccato solamente per l&apos;anonimizzazione, impossibile creare la transazione.</translation>
+        <translation>Errore: Ascolto per le connessioni in entrata non riuscita (ascoltare errore restituito %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Esegue un comando quando viene ricevuto un allarme rilevante o quando vediamo un fork veramente lungo (%s in cmd è sostituito dal messaggio)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Esegui comando quando una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Esegui il comando quando il migliore blocco cambia(%s nel cmd è sostituito dall&apos;hash del blocco)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Le commissioni inferiori a questo valore saranno considerate nulle (per la creazione della transazione) (prefedinito:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Scarica l&apos;attività del database dalla memoria al log su disco ogni &lt;n&gt; megabytes (predefinito: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Determina quanto sarà approfondita la verifica da parte di -checkblocks (0-4, predefinito: 3)</translation>
+        <translation>Uscite denominate non confermati trovati, saranno aspettare che confermano per continua.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In questa modalità -genproclimit determina quanti blocchi saranno generati immediatamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX richiede input con almeno 6 conferme, potrebbe essere necessario attendere qualche minuto e poi riprovare.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Numero di secondi di sospensione che i peer di cattiva qualità devono attendere prima di potersi riconnettere (predefiniti: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Emette informazioni di debug in output (predefinito: 0, fornire &lt;category&gt; è opzionale)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation type="unfinished"></translation>
+        <translation>Nome di costruire url per l&apos;ingresso KeePass che memorizza la parola d&apos;ordine portafoglio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
-        <translation type="unfinished"></translation>
+        <translation>Fare domande per indirizzi pari via lookup DNS, se a corto di indirizzi (predefinita: 1 a meno -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
-        <translation type="unfinished"></translation>
+        <translation>Imposta indirizzo esterno:port per arrivare a questo Masternode (esempio: address:port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Imposta la dimensione massima in byte delle transazioni ad alta-priorità/basse-commissioni (predefinita: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Imposta il numero di thread per la verifica degli script (da %u a %d, 0 = automatico, &lt;0 = lascia questo numero di core liberi, predefinito: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Imposta il limite della cpu quando la generazione è abilitata (-1 = non limitato, predefinito: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Questa versione è una compilazione pre-rilascio - usala a tuo rischio - non utilizzarla per la generazione o per applicazioni di commercio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
-        <translation type="unfinished"></translation>
+        <translation>Incapace di legare al %s su questo computer. Dash Core è probabilmente già funzionato.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Impossibile trovare fondi sufficienti Darksend denominati per questa transazione.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
-        <translation type="unfinished"></translation>
+        <translation>Impossibile trovare un numero sufficiente di non denominati fondi Darksend per questa operazione che non sono uguali a 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Impossibile trovare un numero sufficiente di non denominati fondi Darksend per questa transazione.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usa un SOCKS5 proxy separato per raggiungere servizi nascosti di Tor (predefinito: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Attenzione: -paytxfee è molto alta. Questa è la commissione che si paga quando si invia una transazione.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Attenzione: Per favore assicurati che la data e l&apos;ora del tuo computer siano corrette, altrimenti Dash non funzionará adeguatamente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Attenzione: La rete non sembra essere d&apos;accordo pienamente! Alcuni minatori sembrano riscontrare problemi.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Attenzione: Sembra che non ci sia completo accordo con i nostri peer! Un aggiornamento da parte tua o degli altri nodi potrebbe essere necessario.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Attenzione: errore di lettura di wallet.dat! Tutte le chiavi sono state lette correttamente, ma i dati delle transazioni o le voci in rubrica potrebbero mancare o non essere corretti.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Attenzione: wallet.dat corrotto, dati recuperati! Il wallet.dat originale è stato salvato come wallet.{timestamp}.bak in %s; se il tuo saldo o le transazioni non sono corrette dovresti ripristinare da un backup.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Devi settare rpcpassword=&lt;password&gt; nel file di configurazione:
-%s
-Se il file non esiste, crealo assegnando i permessi di lettura solamente al proprietario.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Devi specificare una masternodeprivkey nella configurazione. Per favore consulta la documentazione di aiuto.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(predefinito: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(predefinito: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; può essere:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accetta comandi da riga di comando e JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accetta connessioni dall&apos;esterno (predefinito: 1 se no -proxy o -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Aggiunge un nodo a cui connettersi e tenta di tenere aperta la connessione</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Consenti ricerche DNS per -addnode, -seednode e -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Consenti connessioni JSON-RPC dall&apos;indirizzo IP specificato
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation type="unfinished"></translation>
+        <translation>Hai già quello ingresso.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tenta di recuperare le chiavi private da un wallet.dat corrotto</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Opzioni creazione blocco:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
-        <translation type="unfinished"></translation>
+        <translation>Non può denominare: no ingressi compatibili rimasto.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
-        <translation>Non è possibile effettuare il downgrade del portamonete</translation>
+        <translation>Non è possibile effettuare il downgrade del portafoglio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Impossibile risolvere -bind address: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Impossibile risolvere indirizzo -externalip: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Non è possibile scrivere l&apos;indirizzo predefinito</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Cancella elenco delle transazioni sul portamonete (strumento di diagnostica; implica -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Il collateral non è valido.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Collateral non valido.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Connetti solo al nodo specificato</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Connetti attraverso SOCKS proxy</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Connetti a JSON-RPC su &lt;port&gt; (predefinita: 9998 o testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Connetti a KeePassHttp sulla porta &lt;port&gt; (predefinita: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Connettiti ad un nodo per recuperare gli indirizzi dei peer e scollegati</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Opzioni di connessione:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Rilevato database blocchi corrotto</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Versione client RPC di Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend è disabilitato</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Opzioni Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Opzioni di Debug/Test:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Disabilita la modalità sicura, escludi effettivamente gli eventi di modalità sicura (predefinito: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Scopre il proprio indirizzo IP (predefinito: 1 se in ascolto e no -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation>Non caricare il portamonete e disabilita le chiamate RPC al portamonete</translation>
+        <translation>Non caricare il portafoglio e disabilita le chiamate RPC al portafoglio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Vuoi ricostruire ora il database dei blocchi?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Caricamento completato</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Entrate sono piene.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Connesione per masternode error.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Errore durante l&apos;inizializzazione del database dei blocchi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Errore durante l&apos;inizializzazione dell&apos;ambiente %s del database del portamonete!</translation>
+        <translation>Errore durante l&apos;inizializzazione dell&apos;ambiente %s del database del portafoglio!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Errore caricamento database blocchi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Errore caricamento wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation>Errore caricamento wallet.dat: Portamonete corrotto</translation>
+        <translation>Errore caricamento wallet.dat: Portafoglio corrotto</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Errore caricando wallet.dat: Wallet necessita la versione piú recente di Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Errore caricamento database blocchi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Errore di lettura del database, spegnimento</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Errore nel recupero della chiave pubblica.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Errore</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Errore: la spazio libero sul disco è insufficiente!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Errore: portamonete bloccato, impossibile creare la transazione!</translation>
+        <translation>Errore: portafoglio bloccato, impossibile creare la transazione!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Errore: errore di sistema:</translation>
+        <translation>Errore: è già voci in sospeso in piscina Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Nessuna porta disponibile per l&apos;ascolto. Usa -listen=0 se vuoi procedere comunque.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Lettura informazioni blocco fallita</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Lettura blocco fallita</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Sincronizzazione dell&apos;indice del blocco fallita</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Se &lt;category&gt; non è specificata, mostra tutte le informazioni di debug.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Scrittura dell&apos;indice del blocco fallita</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1= mantiene il testo meta data p.es. propietario del conto e informazione richiesta di pagamento, 2 = scarta il testo meta data)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Scrittura informazioni blocco fallita</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permettere la connessione JSON-RPC dalla sorgente specificata. Validi come &lt;ip&gt; sono un singolo IP (p.es. 1.2.3.4), una network/netmask (p.es. 1.2.3.4/255.255.255.0) o una network/CIDR (p.es. 1.2.3.4/24). Questa opzione puó essere specificata molteplici volte</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Scrittura blocco fallita</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>C&apos;é stato un errore durante la configurazione dell&apos;indirizzo RPC %s porta %u per l&apos;ascolto: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Scrittura informazioni file fallita</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Scrittura nel database dei bitcoin fallita</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Scrittura dell&apos;indice di transazione fallita</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Scrittura dei dati di ripristino fallita</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Commissione per kB da aggiungere alle transazioni in uscita</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Le commissioni inferiori a questo valore saranno considerate nulle (per la trasmissione) (prefedinito:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forza modalità provvisoria (predefinito: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Genera valuta (predefinito: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Aiuto su un comando</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Numero di blocchi da controllare all&apos;avvio (predefinito: 288, 0 = tutti)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Se &lt;category&gt; non è specificata, mostra tutte le informazioni di debug.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Richiesta di Darksend completa:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Richiesta di Darksend incompleta:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Errore di connessione al Masternode</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Errore caricando il wallet.dat: il Pertafoglio ha bisogno di una versione di Dash Core piú recente.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Errore: Un </translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Finalizzando la transazione.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Monete generate (predefinito: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importazione...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocchi da un file blk000??.dat esterno</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Modalità incompatibile</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Versione incompatibile</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Blocco genesis non corretto o non trovato. Cartella dati errata?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Informazioni</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Controllo di inizializzazione sanity fallito. Dash Core verrà chiuso.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>L&apos;input non è valido.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>Opzioni InstantX</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Fondi insufficienti</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Fondi insufficienti.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Indirizzo -onion non valido: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Indirizzo -proxy non valido: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Importo non valido per -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Importo non valido per -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Importo non valido per -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Importo non valido</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Blocca i masternodes  nel file di configurazione del masternode (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Mixing in corso...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>masternodeprivkey non valida. Per favore consulta la documentazione</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Chiave privata incompatibile</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Script invalido</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>ID KeePassHttp per la connessione stabilita</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
-        <translation type="unfinished"></translation>
+        <translation>Chiave KeePassHttp per AES comunicazione cripra con KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
-        <translation type="unfinished"></translation>
+        <translation>Mantenere al massimo &lt;n&gt; le operazioni in collegabile in memoria (predefinito:% u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>L&apos;ultima darksend è troppo recente</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limita la dimensione della cache delle firme a &lt;n&gt; voci (predefinito: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Elenco comandi</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Caricamento indirizzi...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Caricamento dell&apos;indice del blocco...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Sto carricando la lista dei masternode...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Caricando portafoglio... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Caricamento portafoglio...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Abilita il log della priorità di transazione e della commissione per kB quando si generano blocchi (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Mantieni un indice di transazione completo (predefinito: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Mantieni al massimo &lt;n&gt; connessioni ai peer (predefinite: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Opzioni masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>La lista di masternode e&apos; piena.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode: </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Buffer di ricezione massimo per connessione, &lt;n&gt;*1000 byte (predefinito: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Buffer di invio massimo per connessione, &lt;n&gt;*1000 byte (predefinito: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Mancano le informazioni di input della transazione</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Nessun masternode compatibile trovato</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nessun fondo rilevato bisogno di denominare.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>La rilevazione di masternode impossibile.</translation>
+        <location line="+1"/>
+        <source>No matching denominations found for mixing.</source>
+        <translation>Nessun denominazioni corrispondente trovato per la miscelazione.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="294"/>
-        <source>No matching denominations found for mixing.</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
-        <translation type="unfinished"></translation>
+        <translation>Fuori norma pubblica chiave e rilevato.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
-        <translation type="unfinished"></translation>
+        <translation>Non compatibile con le operazioni esistenti.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Non ci sono abbastanza descrittori di file disponibili.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Non presente nella lista masternode</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Accetta solo una catena di blocchi che corrisponde ai checkpoint predefiniti (predefinito: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Connetti solo a nodi nella rete &lt;net&gt; (IPv4, IPv6 o Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Opzioni:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Password per connessioni JSON-RPC
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Preponi timestamp all&apos;output di debug (predefinito: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Stampa il blocco all&apos;avvio, se presente nell&apos;indice dei blocchi</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Stampa l&apos;albero dei blocchi all&apos;avvio (default: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opzioni RPC SSL: (consulta la Bitcoin Wiki per le istruzioni relative alla configurazione SSL)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Opzioni client RPC:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>Opzioni server RPC:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Scarta casualmente 1 ogni &lt;n&gt; messaggi di rete</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Altera casualmente 1 ogni &lt;n&gt; messaggi di rete</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Ricreare l&apos;indice della catena di blocchi dai file blk000??.dat correnti</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Ripeti analisi della catena dei blocchi per cercare le transazioni mancanti dal portamonete
+        <translation>Ripeti analisi della catena dei blocchi per cercare le transazioni mancanti dal portafoglio
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Ripetizione scansione...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Mantieni in esecuzione un thread per scaricare periodicamente il portafoglio (predefinito: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Esegui in background come demone ed accetta i comandi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opzioni SSL: (vedi il wiki di Bitcoin per le istruzioni di configurazione SSL)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Selezionare la versione SOCKS per -proxy (4 o 5, predefinito: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Invia comando a Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Inviare comandi al nodo in esecuzione su &lt;ip&gt; (predefinito: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Invia le informazioni di trace/debug alla console invece che al file debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>File certificato del server (predefinito: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Chiave privata del server (predefinito: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Sessione non completata!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Imposta la dimensione cache del database in megabyte (%d a %d, predefinito: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Impostare la quantità di chiavi nel key pool a &lt;n&gt; (predefinita: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Imposta la dimensione massima del blocco in byte (predefinita: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Imposta dimensione minima del blocco in bytes (predefinita: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Configura la chiave privata del Masternode</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Specifica il numero massimo di richieste RPC in parallelo (predefinito: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Imposta il flag DB_PRIVATE nell&apos;ambiente di database del portamonete (predefinito: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostra tutte le opzioni di debug (utilizzo: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Visualizza le informazioni relative al benchmark (predefinito: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Riduci il file debug.log all&apos;avvio del client (predefinito: 1 se non impostato -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Firma fallita.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Firma scaduta, invia nuovamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Transazione di firma fallita</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Configurazioni specifiche file (default: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Specifica il timeout di connessione in millisecondi (predefinito: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Specifica la cartella dati </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Configurazioni specifiche dei file Masternode (default: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
-        <translation>Specifica il file portamonete (all&apos;interno della cartella dati)</translation>
+        <translation>Specifica il file portafoglio (all&apos;interno della cartella dati)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Specifica il tuo indirizzo pubblico</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Spendi il resto non confermato quando si inviano transazioni (predefinito: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Avvia il demone Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Errore di sistema:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Questo messaggio di aiuto
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Questo è previsto per l&apos;uso con test di regressione e per lo sviluppo di applicazioni.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Questo non è un Masternode</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Soglia di disconnessione dei peer di cattiva qualità (predefinita: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Per usare l&apos;opzione %s</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Questo è previsto per l&apos;uso con test di regressione e per lo sviluppo di applicazioni.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Importo transazione troppo piccolo</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>L&apos;importo della transazione deve essere positivo</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transazione creata con successo.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Commissioni della transazione troppo alte.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Transazione non valida</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transazione troppo grande</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Incapace di legare al %s su questo computer (legare restituito l&apos;errore %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versione -socks proxy sconosciuta richiesta: %i</translation>
+        <translation>Impossibile firmare messaggio Spork, chiave sbagliato?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Rete sconosciuta specificata in -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Aggiorna il portafoglio all&apos;ultimo formato</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Utilizzo:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Aggiorna il portafoglio all&apos;ultimo formato</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utilizzare OpenSSL (https) per le connessioni JSON-RPC
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usa UPnP per mappare la porta in ascolto (predefinito: 1 when listening)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Utilizza la rete di prova</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Nome utente per connessioni JSON-RPC
 </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
-        <translation type="unfinished"></translation>
+        <translation>Più valore di Darksend piscina massima permette.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Verifica blocchi...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Verifica portafoglio...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Attendere l&apos;avvio dell&apos;RPC server</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Il portafoglio %s si trova al di fuori dalla cartella dati %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Portafoglio bloccato</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Il portafoglio necessita di essere riscritto: riavvare Dash per compeltare.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Opzioni portafoglio:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Attenzione</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Attenzione: Argomento deprecato -debugnet ignorato, usare -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Attenzione: questa versione è obsoleta, aggiornamento necessario!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>È necessario ricostruire il database usando -reindex per cambiare -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Cancella e ricompila tutte le transazioni dal wallet...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>all&apos;avvio</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>versione</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrotto, recupero fallito</translation>
     </message>
 </context>
-</TS>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/dash_pl.ts b/src/qt/locale/dash_pl.ts
index 5dbf43b0578e..e72f6d0b37f2 100644
--- a/src/qt/locale/dash_pl.ts
+++ b/src/qt/locale/dash_pl.ts
@@ -1,202 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="pl">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>O Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;b&gt; wersja</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Prawa autorskie %copy; 2009-2014 deweloperzy Bitcoin Core
-Prawa autorskie %copy; 2014-YYYY deweloperzy Dash Core </translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Jest to oprogramowanie eksperymentalne.
-
-Dystrybutowane pod licencją oprogramowania MIT/X11, zobacz akompaniujący plik COPYING lub odwiedź http://www.opensource.org/licenses/mit-license.php.
-
-Ten produkt zawiera oprogramowanie opracowane przez Projekt OpenSSL do użycia w OpenSSL Toolkit (http://www.openssl.org/) i  oprogramowanie kryptograficzne napisane przez Eric Young (eay@cryptsoft.com) i także oprogramowanie UPnP napisane przez Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Prawo autorskie</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Deweloperzy Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Deweloperzy Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Kliknij dwukrotnie, aby edytować adres lub etykietę</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Kliknij prawym przyciskiem myszki w celu edycji adresu lub etykiety</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Utwórz nowy adres</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Nowy</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Skopiuj aktualnie wybrany adres do schowka</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Kopiuj</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Usuń obecnie zaznaczony adres z listy</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Usuń</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Eksportuj dane z aktywnej karty do pliku</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Eksportuj</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>Z&amp;amknij</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Wybierz adres na który wysłać monety</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Wybierz adres do otrzymania monet.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>W&amp;ybierz</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Adres wysyłania</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Adres odbiorczy</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>To są twoje adresy Dash z których wysyłasz Darkcoiny. Zawsze upewnij się, że kwota i adres do ktoórego wysyłasz Dash są prawidłowe. </translation>
+        <translation>To są twoje adresy Dash na które wysyłasz płatności. Zawsze upewnij się, że kwota i adres są prawidłowe zanim wyślesz monety.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>To są twoje adresy do otrzymywania Dashów. Zaleca się aby tworzyć nowy adres dla każdej transakcji</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Kopiuj adres</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Kopiuj &amp;Etykietę</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Modyfikuj</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Eksportuj listę adresową</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Plik *.CSV (rozdzielany przecinkami)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Błąd przy próbie eksportu</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Wystąpił błąd podczas próby zapisu listy adresów do %1.</translation>
+        <translation>Wystąpił błąd podczas próby zapisu listy adresów do %1. Proszę spróbować ponownie.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Etykieta</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adres</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(bez etykiety)</translation>
     </message>
@@ -204,154 +143,150 @@ Ten produkt zawiera oprogramowanie opracowane przez Projekt OpenSSL do użycia w
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Okienko Hasła</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Wpisz hasło</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Nowe hasło</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Powtórz nowe hasło</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Służy do zablokowania funkcji wysyłania monet gdy konto użytkownika systemu operacyjnego zostało przejęte przez kogoś innego. Nie oferuje prawdziwego bezpieczeństwa. Wirus lub haker wciąż może uzyskać dostęp do twojego portfela.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Tylko dla anonimizacji</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Wprowadź nowe hasło dla portfela.&lt;br/&gt;Proszę użyć hasła składającego się z &lt;b&gt;10 lub więcej losowych znaków&lt;/b&gt; lub &lt;b&gt;ośmiu lub więcej słów&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wprowadź nowe hasło dla twojego portfela.&lt;br/&gt;Proszę używać hasła o długości co najmniej &lt;b&gt;dziesięciu (najlepiej losowych) znaków&lt;/b&gt;, lub &lt;b&gt;co najmniej 8 słów&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Zaszyfruj portfel</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Ta operacja wymaga hasła do portfela ażeby odblokować portfel.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Odblokuj portfel</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Odszyfruj portfel</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Zmień hasło</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Podaj stare i nowe hasło do portfela.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Potwierdź szyfrowanie portfela</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Ostrzeżenie: Jeśli zaszyfrujesz swój portfel i zgubisz swoje hasło, &lt;b&gt;STRACISZ WSZYSTKIE DASHY&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Jesteś pewien, że chcesz zaszyfrować swój portfel?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Portfel zaszyfrowany</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash zostanie teraz zamknięty aby zakończyć proces szyfrowania. Pamiętaj, że zaszyfrowanie portfela nie gwarantuje pełnej ochrony przed kradzieżą twoich monet przez złośliwe oprogramowanie.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>WAŻNE: Wszystkie wykonane wcześniej kopie pliku portfela powinny być zamienione na nowe, szyfrowane pliki. Z powodów bezpieczeństwa, poprzednie kopie nieszyfrowanych plików portfela staną się bezużyteczne jak tylko zaczniesz korzystać z nowego, szyfrowanego portfela.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Szyfrowanie portfela nie powiodło się</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Szyfrowanie portfela nie powiodło się z powodu wewnętrznego błędu. Twój portfel nie został zaszyfrowany.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Podane hasła nie są takie same.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Odblokowanie portfela nie powiodło się</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Wprowadzone hasło do odszyfrowania portfela jest niepoprawne.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Odszyfrowanie portfela nie powiodło się</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Hasło portfela zostało pomyślnie zmienione.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Uwaga: Klawisz Caps Lock jest włączony</translation>
     </message>
@@ -359,443 +294,425 @@ Ten produkt zawiera oprogramowanie opracowane przez Projekt OpenSSL do użycia w
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Portfel</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Węzeł</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>P&amp;odsumowanie</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Pokazuje ogólny zarys portfela</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>Wyślij</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Wyślij monety na adres Darkcoina</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>Odbie&amp;rz</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Poproś o płatności (tworzy kod QR oraz dash: link)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transakcje</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Przeglądaj historię transakcji</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>&amp;Zakończ</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Zamknij program</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;O Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Pokaż informacje na temat Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Pokaż informacje o Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>O &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Pokazuje informacje o Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Opcje...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Zmień opcje konfiguracji dla Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Pokaż / Ukryj</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Pokazuje lub ukrywa główne okno</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>Zaszyfruj Portf&amp;el</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Szyfruj klucze prywatne, które są powiązane z twoim portfelem</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>Wykonaj kopię zapasową...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Zapasowy portfel w innej lokalizacji</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Zmień hasło...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Zmień hasło użyte do szyfrowania portfela</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>Odblok&amp;uj Portfel</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Odblokuj portfel</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>Zab&amp;lokuj Porftel</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Podpisz wiado&amp;mość...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Podpisz wiadomości swoim adresem Dash aby udowodnić, że jesteś ich właścicielem. </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Zweryfikuj wiadomość...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Zweryfikuj wiadomości aby upewnić się, że zostały one podpisane wybranym adresem Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Informacje</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Pokaż informacje diagnostyczne</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>Konsola &amp;debugowania</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Otwórz konsole debugowania</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>Mo&amp;nitor Sieci</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Pokaż monitor sieci</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>&amp;lista peerów</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Pokaż informacje peerów</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Naprawa po&amp;rfela</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Pokaż opcje naprawcze portfela</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Otwórz plik konfiguracji</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Otworz plik konfiguracji </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Pokaż automatyczne kopie zapasowe (&amp;Backups)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Pokaż automatycznie stworzone kopie zapasowe porfela.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>Adres wysyłania</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Pokaż listę użytych adresów wysyłających i etykiety</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Adres odbiorczy</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Pokaż listę użytych adresów odbiorczych i etykiety</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Otwórz URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Otwórz dash: Link lub żądanie zapłaty</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Opcje konsoli</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Klient Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Pokaż wiadomość pomocy Dash Core aby otrzymać listę z dostępnymi opcjami linii komend.</translation>
+        <translation>Pokaż wiadomość pomocy Dash Core aby otrzymać listę z dostępnymi opcjami linii komend.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Plik</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>P&amp;referencje</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Narzędzia</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>Pomo&amp;c</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Pasek zakładek</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Klient Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n aktywne połączenie do sieci Dash</numerusform>
-            <numerusform>%n aktywne połączenia do sieci Dash</numerusform>
-            <numerusform>%n aktywnych połączeń do sieci Dash</numerusform>
-        </translation>
+        <translation><numerusform>aktywne połączenie do sieci Dash</numerusform><numerusform>aktywne połączenia do sieci Dash</numerusform><numerusform>aktywne połączenia do sieci Dash</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Synchronizacja z siecią...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importowanie bloków z dysku...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Ponowne indeksowanie bloków na dysku...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Brak dostępnych źródeł bloków...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Pobrano %1 bloków z historią transakcji.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Aktualny</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n godzina</numerusform>
-            <numerusform>%n godziny</numerusform>
-            <numerusform>%n godzina(y)</numerusform>
-        </translation>
+        <translation><numerusform>godzina</numerusform><numerusform>godzin</numerusform><numerusform>godziny</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n dzień</numerusform>
-            <numerusform>%n dni</numerusform>
-            <numerusform>%n dzień(dni)</numerusform>
-        </translation>
+        <translation><numerusform>dzień</numerusform><numerusform>dni</numerusform><numerusform>dni</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n tydzień</numerusform>
-            <numerusform>%n tygodnie</numerusform>
-            <numerusform>%n tydzień(tygodnie)</numerusform>
-        </translation>
+        <translation><numerusform>tydzień</numerusform><numerusform>tygodni</numerusform><numerusform>tygodnie</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 i %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n rok</numerusform>
-            <numerusform>%n lat</numerusform>
-            <numerusform>%n rok(lata)</numerusform>
-        </translation>
+        <translation><numerusform>rok</numerusform><numerusform>lat</numerusform><numerusform>lata</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 wstecz</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Łapanie bloków...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Ostatni otrzymany blok został wygenerowany %1 temu.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transakcje po tym momencie nie będą jeszcze widoczne.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Ostrzeżenie</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Informacja</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Transakcja wysłana</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Transakcja przychodząca</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -808,30 +725,25 @@ Adres: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;niezablokowany&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; a obecnie &lt;b&gt;odblokowany&lt;/b&gt; tylko w celu miksowania</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;zablokowany&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Wystąpił poważny błąd. Dash zostanie zamknięty.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Sieć Alert</translation>
     </message>
@@ -839,333 +751,302 @@ Adres: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Sterowanie Monetą Wybór Adresu</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Ilość:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Bajtów:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Kwota:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Priorytet:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Opłata:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Niska wartość wyjściowa</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybór Monet</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Pył:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Po opłacie:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Reszta:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>Zaznacz/Odznacz wszystko</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Widok drzewa</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Widok listy</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 zablokowana)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Otrzymane z nazwą</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Etykieta</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Adres</translation>
+        <translation>Otrzymano z adresem</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Ilość rund mieszania</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Potwierdzenia</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Potwierdzony</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Priorytet</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Kopiuj adres</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Kopiuj etykietę</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Kopiuj kwotę</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Skopiuj ID transakcji</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Zablokuj</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Odblokuj</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Skopiuj ilość</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Skopiuj opłatę</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Skopiuj ilość po opłacie</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Skopiuj ilość bajtów</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Skopiuj priorytet</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Skopiuj niską wartość</translation>
+        <translation>Kopiuj pył (kwota poniżej 5460 duffów)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Skopiuj resztę</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Wybrano niezanonimizowane środki. &lt;b&gt;Darksend będzie wyłączony.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Jeśli wciąż chcesz użyć Darksend, cofnij wybór niezanonimizowanych środków i zaznacz kliknij ponownie na pole wyboru obok Darksend.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>najwyższa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>wyższa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>wysoka</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>średnio wysoki</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Może się różnić około +/- %1 satoshi na transację.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>nie dotyczy</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>średnia</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>średnio niski</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>niski</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>niższy</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>najniższy</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 zablokowane)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>żaden</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Pył</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>tak</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>nie</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Etykieta staje się czerwona kiedy transakcja jest większa niż 1000 bajtów.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Oznacza to wymaganą opłatę minimum %1 na kB.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Waha się +/- 1 bajt na wejście.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Transakcje o wyższym priorytecie zostają szybciej dołączone do bloku.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Ta etykieta jest czerwona, jeżeli priorytet jest mniejszy niż &quot;średni&quot;</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Etykieta staje się czerwona kiedy którykolwiek odbiorca otrzymuje kwotę mniejszą niż %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Oznacza to, że wymagana jest opłata przynajmniej %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Kwoty poniżej 0.546 razy mniejsze od minimalnej ustawionej opłaty pokazane są jako pył.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Etykieta staje się czerwona kiedy reszta jest mniejsza niż %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(bez etykiety)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>reszta z %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(reszta)</translation>
     </message>
@@ -1173,84 +1054,84 @@ Adres: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Skonfiguruj Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Podstawowa prywatność</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Wysoka prywatność</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Maksymalna prywatność</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Proszę wybrać poziom bezpieczeństwa.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Użyj 2 oddzielnych masternodów aby wymieszać środki max. do 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Użyj 8 oddzielnych masternodów aby wymieszać środki max. do 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Użyj 16 oddzielnych masternodów</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Ta opcja jest najszybsza i kosztuje około 0.025 DASH za zanonimizowanie 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Ta opcja jest w miarę szybka i kosztuje około 0.05 DASH za zanonimizowanie 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH za każde 1000 DASH które zanonimizujesz.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Jest to najwolniejsza lecz najbardziej bezpieczna opcja. Maksymalny poziom zanonimizowania będzie kosztować</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Konfiguracja Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend został pomyślnie ustawiony na poziom podstawowy (%1 oraz 2 rundy). Możesz to zmienić kiedy chcesz, otwierając ekran z konfiguracją Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend został pomyślnie ustawiony na poziom wysoki (%1 oraz 8 rund). Możesz to zmienić kiedy chcesz, otwierając ekran z konfiguracją Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend został pomyślnie ustawiony na poziom maksymalny (%1 oraz 16 rund). Możesz to zmienić kiedy chcesz, otwierając ekran z konfiguracją Dash.</translation>
     </message>
@@ -1258,67 +1139,67 @@ Adres: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Edytuj adres</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Etykieta</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Etykieta skojarzona z tym wpisem na liście adresów</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Adres</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Ten adres jest skojarzony z wpisem na liście adresów. Może być zmodyfikowany jedynie dla adresów wysyłających.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Nowy adres odbiorczy</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Nowy adres wysyłania</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Zmień adres odbioru</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Zmień adres wysyłania</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>Wprowadzony adres &quot;%1&quot; nie jest właściwym adresem Dash.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Wprowadzony adres &quot;%1&quot; już istnieje w książce adresowej.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Nie można było odblokować portfela.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Tworzenie nowego klucza nie powiodło się.</translation>
     </message>
@@ -1326,27 +1207,27 @@ Adres: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Utworzono nowy folder danych.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>nazwa</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Katalog już istnieje. Dodaj %1 jeśli masz zamiar utworzyć tutaj nowy katalog.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Ścieżka już istnieje i nie wskazuje na folder.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Nie można było tutaj utworzyć folderu.</translation>
     </message>
@@ -1354,72 +1235,68 @@ Adres: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Opcje wiersza poleceń</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>wersja</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">O Dash Core</translation>
+        <translation>Informacje o Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Opcje lini poleceń</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Użycie:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>opcje konsoli</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>UI opcje</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Wybierz folder danych przy starcie (domyślnie: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Ustaw Język, na przykład &quot;pl_PL&quot; (domyślnie: systemowy)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Uruchom zminimalizowany</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Ustaw główne cerytfikaty SSL dla żądań płatności (domyślnie: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Pokazuj okno powitalne przy starcie (domyślnie: 1)</translation>
     </message>
@@ -1427,109 +1304,85 @@ Adres: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Witaj</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Witaj w Dash Core</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Ponieważ uruchomiłeś ten program po raz pierwszy, możesz wybrać gdzie Dash Core będzie przechowywał dane.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core ściągnie i przechowa  kopię blockchain na twoim dysku. Co najmniej 1GB danych zostanie zapisanych w tym katalogu, a wraz z upływem czasu blockchain będzie stopniowo wymagał coraz więcej miejsca. Twój portfel również zostanie zapisany w tym katalogu.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Użyj domyślnego folderu danych</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Użyj wybranego folderu dla danych</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Błąd: Określony folder danych &quot;%1&quot; nie mógł zostać utworzony.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wystąpił błąd: Katalog &quot;%1&quot; nie może zostać stworzony.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB dostępnego wolnego miejsca</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB wolnego miejsca na dysku</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(z %1GB potrzebnego)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(z %1GB potrzebnego)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Otwórz URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Otwórz żądanie zapłaty z URI lub pliku</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Otwórz żądanie zapłaty z pliku</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Wybierz plik żądania zapłaty do otwarcia</translation>
     </message>
@@ -1537,313 +1390,281 @@ Adres: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Opcje</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>Główne</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Automatycznie uruchom Dash po zalogowaniu się do systemu.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Uruchom Dash po zalogowaniu się do systemu</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Rozmiar &amp;pamięci podręcznej bazy danych.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Liczba wątków &amp;weryfikacji skryptu</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0=auto, &lt;0 = zostaw tyle wolnych rdzeni)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tutaj możesz ustawić liczbę masternodów, przez które transakcja zostanie przepuszczona. Im większa liczba masternodów tym większy poziom anonimowości, ale opłata jest również wyższa.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Ilość rund Darksend.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Ta kwota działa jako próg po którego przekroczeniu Darksend zostaje wyłączony.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Ilość Dashów, które mają pozostać anonimowe.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>Portfel</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Akceptuj połączenia z zewnątrz</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Zezwól na przychdzące połączenia</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Połącz się z siecią Dash przez proxy SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
+        <translation>Połą&amp;cz się przez SOCKS5 proxy (opcja domyślna):</translation>
     </message>
     <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Opcjonalna prowizja za transakcje za kB, wspomaga ona szybkość przebiegu transakcji. Większość transakcji jest 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Płać prowizję za transakcje</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Ekspert</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Czy pokazać funkcje kontroli monet czy nie.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Włącz funkcje &amp;kontroli monet</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Jeśli wyłączysz możliwość wydawania niepotwierdzonej reszty, to reszta z transakcji nie może zostać użyta dopóki nie ma przynajmniej jednego potwierdzona. To również wpływa na to jak wyliczane jest twoje saldo.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Wydaj niepotwierdzoną resztę</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Sieć</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Automatycznie uruchamiaj port klienta Darkcoina na ruterze. To działa tylko jeśli twój ruter wspiera  i ma włączone UPnP.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapuj port używając &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Połącz się z siecią Darkcoina przez proxy SOCKS</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Połącz się przez SOCKS proxy (opcja domyślna):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP: </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adres IP serwera proxy (np. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Port:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port proxy (np. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">Wersja &amp;SOCKS</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">SOCKS wersja serwera proxy (np. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Okno</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Pokazuj tylko ikonę przy zegarku po zminimalizowaniu okna.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimalizuj do paska przy zegarku zamiast do paska zadań</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimalizuje zamiast zakończyć działanie programu przy zamykaniu okna. Kiedy ta opcja jest włączona, program zakończy działanie po wybieraniu Zamknij w menu.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimalizuj przy zamknięciu</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Wyświetlanie</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>Język &amp;Użytkownika:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>Tutaj można ustawić język interfejsu użytkownika. To ustawienie zostanie zapisane po ponownym uruchomieniu Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Dash Core nie został przetłumaczony na twój język? Tłumaczenie jest niepełne lub niepoprawne? Możesz pomóc nam tłumaczyć tutaj:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Motyw interefejsu użytkownika:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Jednostka pokazywana przy kwocie:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Wybierz podział jednostki pokazywany w interfejsie  oraz podczas wysyłania monet</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Czy wyświetlić adres Dash w liście transakcji czy nie</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Wyświetlaj adresy w liście transakcji</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 osób trzecich (np. eksplorator bloków), które pojawiają się w zakładce transakcji jako pozycje w menu kontekstowym. %s w URL jest zastąpione przez hash transakcji. Wielokrotne URL są oddzielane przez pionową poprzeczkę |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URL transakcji osób trzecich</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Aktywne opcje linii komend, które nadpisują powyższe opcje:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Przywróć domyślne wszystkie ustawienia klienta.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>Z&amp;resetuj Ustawienia</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Anuluj</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>domyślny</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>żaden</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Potwierdź reset ustawień</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Wymagany restart programu, aby uaktywnić zmiany.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Program zostanie wyłączony. Czy chcesz kontynuować?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Ta zmiana może wymagać ponownego uruchomienia klienta.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Adres podanego proxy jest nieprawidłowy</translation>
     </message>
@@ -1851,368 +1672,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Formularz</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Portfel</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>Wyświetlona informacja może być przedawniona. Twój portfel automatycznie zsynchronizuje sie z siecią Dash jak tylko zostanie ustanowione połączenie, jednakże proces ten jeszcze się nie zakończył.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Dostępne:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Twoje obecne saldo</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>W toku:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Suma transakcji, które nie zostały jeszcze potwierdzone, a które nie zostały wliczone do twojego obecnego salda</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Niedojrzały: </translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Balans wydobycia, który jeszcze nie dojrzał</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Balans</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Nipotwierdzone transakcje do adresów mogących być jedynie do odczytu.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Wykopane fundusze  jeszcze nie gotowe będące w adresie tylko do odczytu.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Wynosi ogółem:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Twoje obecne saldo</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Obecny stan konta adresu tylko do odczytu.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tylko do podglądu:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Twój obecny stan konta w adresie tylko do odczytu</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Możliwe do wydania:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Status:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Włączony/Wyłączony</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Ukończone:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Bilans Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Ilość oraz Rundy:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Rund</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Zgłoszone denominacje:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Denominacje zgłoszone do Masternodów. Aby je wymieszać, pozostali uzytkownicy muszą zgłosić dokładnie te same denominacje.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>nie dotyczy</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Ostatnie transakcje</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Start/Stop Mieszanie</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Denominacje, które wysłałeś do Masternoda.&lt;br&gt;Aby zostały one ymieszane, inni użytkownicy muszą wysłać dokładnie takie same denominacje. </translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Ostatnia Wiadomość)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Prubój ręcznie zgłosić żądanie Darksend.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Mieszaj</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Zresetuj obecny stan darksend (może przerwać Darksend, jeżeli jest w trakcie mieszania. Może Cię to kosztować! )</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Reset</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Ostatnie transakcje&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>desynchronizacja</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Wyłączony</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Uruchom miksowanie Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Zatrzymaj miksowanie Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Nie wykryto wejść</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>Runda</numerusform><numerusform>Rundy</numerusform><numerusform>Rundy</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Znaleziono niepotwierdzone zdenominowane wyjścia, wstrzymam się z rekalkulacją do czasu ich potwierdzenia.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Rundy</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Włączony</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Znaleziono wystarczającą ilość odpowiednich środków aby zanonimizowaź %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Nie ma wystarczającej ilośći środków aby moć dokonać anonimizacji &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;zamiast oryginalnej sumy &lt;spam style=&apos;color:red;&apos;&gt;%2&lt;/spam&gt; zostanie zanonimizowanych.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Włączony</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Ostatnia wiadomość Darksend:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend jest w stanie spoczynku.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Żądanie Daeksend zostało zakończone: Twoja transakcja została zaakceptowana do wspólnego funduszu kopaczy.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Następujące wpisy zostały przesłane do masternoda: </translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Przesłano do masternoda. Czekam na więcej wpisów.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Znaleziono wystarczającą ilość użytkowników, trwa podpisywanie ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Znaleziono wystarczającą ilość użytkowników, trwa podopisywanie ( poczekaj chwilę. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Znaleziono wystarczająco użytkowników, trwa podpisywanie ( poczekaj chwilę.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Znaleziono wystarczająco użytkowników, trwa podpisywanie ( poczekaj chwilę... )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Trwa wysyłanie pierwszej transakcji.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Finalizowanie transakcji.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Żądanie Darksend zakończyło się niepowodzeniem:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>spóbuję ponownie</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Żądanie Darksend zakończyło się powodzeniem:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Przesłano do masterdnoda, czekaj na swoją kolej.</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Przesłano do masterdnoda, czekaj na swoją kolej..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Przesłano do masterdnoda, czekaj na swoją kolej...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Status nieznany:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>NIEDOSTĘPNE</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend został pomyślnie zresetowany</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend wymaga użycia conajmniej %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Portfel jest zablokowany a użytkownik odmówił odblokowania. Darksend zostaje wyłączony.</translation>
     </message>
@@ -2220,141 +1947,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Błąd żądania płatności</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Nie można włączyć dash: kliknij-aby-zapłacić ubsługującemu.</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Ostrzeżenie menedżera sieci</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Twoje aktywne proxy nie obsługuje SOCKS5, co jest wymagane dla żądania płatności przez proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Obsługa URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Żądanie płatności podowduje że URL jest niewłaściwy: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">URI nie może zostać przeanalizowany! Mogło to być spowodowane przez niewłaściwy adres Dash lub niewłaściwe parametry URI</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Obsługa pliku z żądaniem płatności</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Plik z żądaniem płatności nie może zostać odczytany lub przetworzony! Może to być spowodowane przez niewłaściwy plik z żądaniem płatności.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">błędny adres płatności %1</translation>
+        <translation>Nieprawidłowy adres płatności %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>URI nie może zostać przeanalizowany! Mogło to być spowodowane przez niewłaściwy adres Dash lub niewłaściwe parametry URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Plik z żądaniem płatności nie może zostać odczytany! Może to być spowodowane przez niewłaściwy plik z żądaniem płatności.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Żądanie płatności zostało odrzucone</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Sieć żądania płatnośc nie pasuje do sieci klienta.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Żądanie płatności straciło ważność. </translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Żądanie płatności nie zostało zainicjonowane.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Niezweryfikowane żądania płatności dla specjalnych skryptów z płatnościami nie są obsługiwane.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Żądana kwota %1 jest za niska (uznana za pył).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Zwrot z %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Żądanie płatności %1 jest zbyt duże (%2 bitów, maksymalny rozmiar to %3 bitów).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Ochrona żądania płaności przed DoS</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Błąd komunikacji z %1 : %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
+        <translation>Żądanie płatności nie może zostać przeanalizowane!</translation>
     </message>
     <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Żądanie płatności nie może zostać przeanalizowne lub przetworzone!</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Błędna odpowiedź z serwera %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Błąd żądania sieci</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Płatność potwierdzona</translation>
     </message>
@@ -2362,139 +2069,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres/Hostname</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agent użytkownika</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>czas opóźnienia sieci</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Błąd: Określony folder danych &quot;%1&quot; nie istnieje.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Błąd: Nie można przetworzyć pliku konfiguracyjnego: %1. Używaj tylko składni klucz=wartość.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Błąd podczas wczytywania pliku z konfiguracją masternoda: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Błąd: Niepoprawna kombinacja -regtest i -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core jeszcze się nie wyłaczył...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Wpisz adres Dash (np. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Kwota</translation>
+        <translation>Ilość</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Wpisz adres Dash (np. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>1 dzień</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>1 godz.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>1 min.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>1 sec.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>SIEĆ</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>NIEZNANY</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Żaden</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">NIEDOSTĘPNE</translation>
+        <translation>Nie ważne</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>1 milisec.</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Zapisz obraz...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Kopiuj obraz</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Zapisz Kod QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Obraz PNG (*.png)</translation>
     </message>
@@ -2502,436 +2168,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Okno narzędzi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Informacje</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Ilość masternodów</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Ogólne</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nazwa</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Nazwa klienta</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>NIEDOSTĘPNE</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Liczba połączeń</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Otwiera plik z zapisami debugowania Darkcoina z obecnego katalogu. Może to potrfać kilka sekund w zależności od rozmiaru pliku.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Otwórz</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Czas uruchomienia</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Sieć</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Czas ostatniego bloku</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Plik logowania debugowania</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Używana wersja OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Data kompilacji</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Aktualna liczba bloków</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Wersja klienta</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Używana wersja BerkeleyDB</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Ciąg bloków</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsola</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Wyczyść konsolę</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>$Ruch sieci</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Wyczyść</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Kwota ogólna</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Otrzymany</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Wysłany</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;peery</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz peera aby zobaczyć jego szczegółowe informacje.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Kierunek</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Wersja</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agent użytkownika</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Usługi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Początkowa wysokość</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Synchronizuj wysokość</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>zablokuj wynik</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Czas Połączenia</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Ostatnio Wysłane</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Ostatnio Odebrane</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bajty Wysłane</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bajty Odebrane</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>czas opóźnienia sieci</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Naprawa portfela</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Ratuj portfel</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Przeskanuj pliki lańcucha</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Odzyskaj transakcję 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Odzyskaj transakcję 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Udoskonal format portfela</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Przycisk poniżej, zrestartuje portfel z opcjami lini komend słóżących do naprawy porfela, rozwiązania problemów z plikami łańcucha bloków oraz zgubionych lub nieważnych transakcji .</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Próbuje przywrócić prywatne klucze z uszkodzonego portfela.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Przeskanuje łańcuch w poszukiwaniu brakujących transakcji portfela.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Opcje naprawy portfela.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Przebuduj indeks</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Wejście:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Wyjście:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Witaj w konsoli RPC Darkcoina</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Użyj strzałek do przewijania historii i &lt;b&gt;Ctrl-L&lt;/b&gt; aby wyczyścić ekran</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Wpisz &lt;b&gt;help&lt;/b&gt; aby uzyskać listę dostępnych komend</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>nigdy</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>przychodzące</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>wychodzące</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>nieznane</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation>W trakcie pobierania....</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Użyj jeden z poprzednio użytych adresów odbiorczych. Podczas ponownego używania adresów występują problemy z bezpieczeństwem i prywatnością. Nie korzystaj z tej opcji, chyba że odtwarzasz żądanie płatności wykonane już wcześniej.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>O&amp;drzuć istniejący adres odbiorczy (nie zalecane)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Opcjonalna wiadomość do żądania płatności. Wiadomość wyświetli się po otwarciu żądania. Pamiętaj: Wiadomość nie zostanie wysłana razem z płatnością poprzez sieć Dash.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Opcjonalna wiadomość do żądania płatności. Wiadomość wyświetli się po otwarciu żądania. Pamiętaj: Wiadomość nie zostanie wysłana razem z płatnością poprzez sieć Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Wiadomość:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Opcjonalna etykieta do skojarzenia z nowym adresem odbiorczym.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Użyj tego formularza do zażądania płatności. Wszystkie pola są &lt;b&gt;opcjonalne&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Etykieta:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Opcjonalna kwota żądania. Pozostaw puste pole lub zero aby nie podawać konkretnej kwoty.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Ilość:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Żądaj płatności</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Wyczyść pola formularza</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Wyczyść</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Żądanie historii płatności</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Pokaż zaznaczone żądanie (działa jak podwójne kliknięcie)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Pokaż</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Usuń zaznaczone z listy</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Usuń</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Kopiuj etykietę</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Kopiuj wiadomość</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopiuj kwotę</translation>
     </message>
@@ -2939,67 +2664,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>Kod QR</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Kopiuj &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Kopiuj &amp;adres</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Zapisz obraz...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Żądaj płatności do %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Informacje o płatności</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Adres</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Etykieta</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Wiadomość</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Wynikowy URI jest zbyt długi, spróbuj zmniejszyć tekst etykiety / wiadomości</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Błąd kodowania URI w Kodzie QR.</translation>
     </message>
@@ -3007,37 +2732,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Etykieta</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Wiadomość</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(bez etykiety)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(brak wiadomości)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(brak kwoty)</translation>
     </message>
@@ -3045,412 +2770,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Wyślij Monety</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Funkcje sterowania monetami</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Wejścia...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>zaznaczone automatycznie</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Niewystarczające środki</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Ilość:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Bajtów:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Kwota:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Priorytet:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>średnia</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Opłata:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Niska wartość wyjściowa:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Pył</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>nie</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Po opłacie:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Reszta:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Kiedy ta opcja jest wybrana, ale adres reszty jest pusty lub nieprawidłowy to reszta będzie wysyłana na adres nowo-wygenerowany.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Niestandardowe zmiany adresu</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Opłata za transakcje:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Wybierz...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>zamknij ustawienia opłat</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Zminimalizuj</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Jeśli ręcznie ustalona opłata wynosi 1000 Duffów a sama transakcja ma tylko 250 bitów, to opłata jako &quot;za kilobajt&quot; wynosi tylko 250 duffów. Dzieje się tak dla każdej transakcji poniżej 1000 duffów. W przypadku transakcji większych niż jedn kilobajt opłata jest naliczana od kilobajta. </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>na kilobajt</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Polecany:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Czas potwierdzenia:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normalny</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>szybki</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Wyślij transakcję bez uiszczania opłat jeśli jest to możliwe.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(potwierdzenie może zająć trochę więcej czasu)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Potwierdź akcję wysyłania</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>Wy&amp;syłka</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Wyczyść wszystkie pola formularza</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Wyczyść &amp;wszystko</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Wyślij do wielu odbiorców na raz</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Dodaj Odbio&amp;rce</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Skopiuj ilość</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopiuj kwotę</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Skopiuj opłatę</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Skopiuj ilość po opłacie</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Skopiuj ilość bajtów</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Skopiuj priorytet</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Skopiuj niską wartość</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Skopiuj resztę</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>używając</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>anonimowe środki</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend wymaga aby kwota ta została zaokrąglona do najbliższego 1%).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>jakiekolwiek dostępne środki (niezalecane)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>i InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 do %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Czy na pewno chcesz wysłać?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>dodane są jako opłata za transakcje</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Łączna kwota %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>lub</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Potwierdź wysyłanie monet</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Zażądanie płatności upłynęło</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation type="unfinished"/>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">błędny adres płatności %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Kwota do zapłacenia musi być większa od 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Kwota przekracza twoje saldo.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Suma przekracza twoje saldo, gdy doliczymy %1 prowizji transakcyjnej.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Znaleziono powtórzony adres, można wysłać tylko raz na każdy adres podczas operacji wysyłania.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Utworzenie transakcji nie powiodło się!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Transakcja została odrzucona! Może się to zdarzyć jeśli część monet z portfela została już wydana używając kopii pliku wallet.dat i nie zostało to tutaj uwzględnione.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Błąd: Portfel został odblokowany tylko dla anonimizacji monet.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Ostrzeżenie: adres Dash jest nieprawidlowy </translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Ostrzeżenie: Nieznany adres</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(bez etykiety)</translation>
     </message>
@@ -3458,102 +3167,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>To jest standardowa płatność</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Zapłać &amp;dla:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Adres na który wysłać płatność (np. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres Dash na który wysłać fundusze</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Wybierz wcześniej użyty adres </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Wklej adres ze schowka</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Usuń ten wpis</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Etykieta:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Wprowadź etykietę dla tego adresu by dodać go do listy użytych adresów</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>Su&amp;ma:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Wiadomość:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Wiadomość, która została dołączona do dash: Link, który zostanie zapisany wraz z transakcją do wglądu w przyszłości. Zauważ. że sama wiadomość nie zostanie wysłana przez sieć Darkcoina.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>To żądanie zapłaty nie zostało zweryfikowane.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Wpłać do:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Notatka:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Zweryfikowano żądanie zapłaty.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Wprowadź etykietę dla tego adresu by dodać go do książki adresowej</translation>
     </message>
@@ -3561,12 +3266,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Trwa zamykanie Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Nie wyłączaj komputera dopóki to okno nie zniknie.</translation>
     </message>
@@ -3574,193 +3279,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Podpisy - Podpisz / zweryfikuj wiadomość</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>Podpi&amp;sz Wiadomość</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Możesz podpisywać wiadomości swoimi adresami aby udowodnić, że jesteś ich właścicielem. Uważaj, aby nie podpisywać niczego co wzbudza Twoje podejrzenia, ponieważ ktoś może stosować phishing próbując nakłonić Cię do ich podpisania. Akceptuj i podpisuj tylko w pełni zrozumiałe komunikaty i wiadomości.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Adres, którym ma być podpisana wiadomość (np.: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>Adres Dash do podpisu wiadomości</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Wybierz wcześniej użyty adres</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Wklej adres ze schowka</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Wprowadź wiadomość, którą chcesz podpisać, tutaj</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Podpis</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Kopiuje aktualny podpis do schowka systemowego</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Podpisz wiadomość aby udowodnić, że jesteś właścicielem adresu Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Podpisz Wiado&amp;mość</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Zresetuj wszystkie pola podpisanej wiadomości</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Wyczyść &amp;wszystko</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Zweryfikuj wiadomość</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Wpisz adres podpisujący, podaj wiadomość (upewnij się, że dokładnie skopiujesz wszystkie zakończenia linii, spacje, tabulacje itp.) oraz podpis poniżej by sprawdzić wiadomość. Uważaj by nie dodać więcej do podpisu niż do samej podpisywanej wiadomości by uniknąć ataku man-in-the-middle (człowiek pośrodku)</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Adres, którym została podpisana wiadomość (np.:  XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>Adres Dash którym wiadomość została podpisana</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Zweryfikuj wiadomość aby upewnić się, że została zapisana przez konkretny adres Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Zweryfikuj Wiado&amp;mość</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Resetuje wszystkie pola weryfikacji wiadomości</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Kliknij &quot;Podpisz Wiadomość&quot; żeby uzyskać podpis</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Wpisz adres Dash (np. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Podany adres jest nieprawidłowy.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Proszę sprawdzić adres i spróbować ponownie.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Wprowadzony adres nie odnosi się do klucza.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Odblokowanie portfela zostało anulowane.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Klucz prywatny dla podanego adresu nie jest dostępny</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Podpisanie wiadomości nie powiodło się</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Wiadomość podpisana.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Podpis nie może zostać zdekodowany.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Sprawdź podpis i spróbuj ponownie.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Podpis nie odpowiadał streszczeniu wiadomości</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Weryfikacja wiadomości nie powiodła się.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Wiadomość zweryfikowana.</translation>
     </message>
@@ -3768,27 +3461,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Wersja %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Deweloperzy Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Deweloperzy Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3796,7 +3489,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3804,257 +3497,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Otwórz na %n kolejny blok</numerusform>
-            <numerusform>Otwórz na %n kolejnych bloków</numerusform>
-            <numerusform>Otwórz na %n kolejnych blok(ów)</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>konflikt</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/offline (zweryfikowane przez instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>1%/potwierdzony (zweryfikowane przez instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>1% potwierdzeń (zweryfikowane przez instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/offline</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/niezatwierdzone</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 potwierdzeń</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/nieaktywny (w trakcie weryfikacji InstantX - %2 z %3 oznaczeń)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/potwierdzony (w trakcie weryfikacji InstantX - %2 z %3 oznaczeń)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/potwierdzeń (w trakcie weryfikacji InstantX - %2 z %3 oznaczeń)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/nieaktywny (weryfikacja InstantX niepowiodła się)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/potwierdzony (weryfikacja InstantX nie powiodła się)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Status</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, nie został jeszcze pomyślnie wyemitowany</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, transmituj przez %n węzeł</numerusform>
-            <numerusform>, transmituj przez %n węzłów</numerusform>
-            <numerusform>, transmituj przez %n węzeł(ów)</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Źródło</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Wygenerowano</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>Od</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>nieznany</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Do</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>własny adres</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Tylko do podglądu</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>etykieta</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Przypisy</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>dojrzałe w %n kolejnym bloku</numerusform>
-            <numerusform>dojrzałe w %n kolejnych bloków</numerusform>
-            <numerusform>dojrzałe w %n kolejnych blok(ów)</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>niezaakceptowane</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Debet</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Całkowity debet</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Całkowity kredyt</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Prowizja transakcji</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Kwota netto</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Wiadomość</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Komentarz</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID transakcji</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Kupiec</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Wygenerowane monety muszą dojrzeć przez %1 bloków zanim będzie można je wysłać. Gdy wygenerowałeś ten blok, został on ogłoszony w sieci i dodany do łańcucha bloków. Jeżeli nie uda mu się wejść do łańcucha, jego status zostanie zmieniony na &quot;nie zaakceptowano&quot; i nie będzie można go wydać. To czasem zdarza się gdy inny węzeł wygeneruje blok kilka sekund przed tobą.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Informacje debugowania</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transakcja</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Wejścia</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Kwota</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>prawda</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>fałsz</translation>
     </message>
@@ -4062,12 +3743,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Szczegóły transakcji</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Ten panel pokazuje szczegółowy opis transakcji</translation>
     </message>
@@ -4075,170 +3756,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adres</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Kwota</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Otwórz na %n kolejny blok</numerusform>
-            <numerusform>Otwórz na %n kolejnych bloków</numerusform>
-            <numerusform>Otwórz na %n kolejny(ch) blok(ów)</numerusform>
-        </translation>
+        <translation><numerusform>Otwarty na kolejny blok</numerusform><numerusform>Otwarty na kolejne bloki</numerusform><numerusform>Otwarty na kolejne bloki</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Otwórz do %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Offline</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Niepotwierdzone:</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Potwierdzanie (%1 z %2 rekomendowanych potwierdzeń)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Zatwierdzony (%1 potwierdzeń)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Konflikt</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Niedojrzały (%1 potwierdzenia, będzie dostępny po %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Ten blok nie został odebrany przez jakikolwiek inny węzeł i prawdopodobnie nie zostanie zaakceptowany!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Wygenerowano ale nie zaakceptowano</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Otrzymane przez</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Odebrano od</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Otrzymane przez Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Wysłano do</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Płatność do siebie</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Wydobyto</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Denominacja Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Płatność zabezpieczająca Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend tworzy poboczne wejscia</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend tworzy denominacje</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Tylko do podgądu</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(brak)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Status transakcji. Najedź na pole, aby zobaczyć liczbę potwierdzeń.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Data i czas odebrania transakcji.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Rodzaj transakcji.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Adres docelowy transakcji.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Kwota usunięta z lub dodana do konta.</translation>
     </message>
@@ -4246,207 +3919,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Wszystko</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Dzisiaj</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>W tym tygodniu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>W tym miesiącu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>W zeszłym miesiącu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>W tym roku</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Zakres...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Otrzymane przez</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Wysłano do</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend tworzy poboczne wejscia</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend tworzy denominacje</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Denominacja Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Płatność zabezpieczająca Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Do siebie</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Wydobyto</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Inne</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Wprowadź adres albo etykietę żeby wyszukać</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Min suma</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Kopiuj adres</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Kopiuj etykietę</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Kopiuj kwotę</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Skopiuj ID transakcji</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Zmień etykietę</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Pokaż szczegóły transakcji</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Eksport historii transakcji</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>CSV (rozdzielany przecinkami)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Potwierdzony</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Tylko do odczytu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Typ</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Etykieta</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Adres</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Kwota</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Błąd przy próbie eksportu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Wystąpił błąd przy próbie zapisu historii transakcji do %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Eksport powiódł się</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Historia transakcji została zapisana do %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Zakres:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>do</translation>
     </message>
@@ -4454,15 +4128,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Nie załadowano żadnego portfela.</translation>
     </message>
@@ -4470,60 +4144,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Wyślij płatność</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX nie obsługuje jeszcze tak wysokiej ilości. Transakcja jest obecnie ograniczona do %n DASH</numerusform>
-            <numerusform>InstantX nie obsługuje jeszcze tak wysokich ilości. Transakcje są obecnie ograniczone do %n DASH</numerusform>
-            <numerusform>InstantX nie obsługuje jeszcze tak wysokich ilości. Transakcje są obecnie ograniczone do %n DASH</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Eksportuj</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Eksportuj dane z aktywnej karty do pliku</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Kopia Zapasowa Portfela</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Dane Portfela (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Nie udało się wykonać kopii zapasowej</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Wystąpił błąd przy próbie zapisu pliku portfela do %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Wykonano Kopię Zapasową</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Plik portfela został zapisany do %1.</translation>
     </message>
@@ -4531,1371 +4203,1420 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, musisz ustawić hasło rpc w pliku konfiguracji:
-%s
-Zalecane jest abyś użył te o to losowo stworzone hasło
-rpcuser=dashrpc
-rpcpassword=%s
-(Nie musisz pamiętać tego hasła)
-Twoje hasło NIE MOŻE być takie samo jak twój login.
-Jeśli plik ten nie istnieje, stwórz go z uprawnieniami do odczytu tylko przez właściciela.
-Zaleca się również aby ustawić alarm powiadomień tzw. alertnotify, aby dać ci znać w razie wystąpienia jekiegoś problemu, na przykład: alertnotify=echo %%s I -s &quot;Dash Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Akceptowane szyfry (domyślny: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH))</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Wystąpił błąd podczas zakładania portu %u RPC służącego do nasłuchu na IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Wystąpił błąd podczas ustawiania portu %u służącego do nasłuchu na IPv6 przez co nastąpił powrót do do IPv4: s%</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Związany z danym adresem oraz zawsze prowadzący na nim nasłuch.  Użyj [host]:oznaczenie dla IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Nie można zablokować katalogu danych %s. Prawdopodobnie Dash jest już uruchomiony. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Utrzymuj limit tempa darmowych transakcji do &lt;n&gt;*1000 bitów na minutę (domyślnie: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend używa dokładnych denominowanych kwot do przesyłania środków, możliwe że musisz zanonimizować trochę więcej monet.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Wyłącz wszystkie funkcje związane z Masternode i Darksend</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Włącz instantx, pokaż potwierdzenia dla zamkniętych transakcji (bool, domyślnie: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Włącz możliwość automatyzacji Darksend dla środków zgromadzonych w  tym portfelu (0-1, domyślnie: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Wejdź w regresyjny tryb testowy, który używa specjalnego łańcucha, w którym bloki mogą być rozwiązywane natychmiastowo. Tryb ten został stworzony dla narzędzi do testowania regresyjnego oraz dla tworzenia aplikacji.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Wejdź w regresyjny tryb testowy, który używa specjalnego łańcucha, w którym bloki mogą być rozwiązywane natychmiastowo. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Błąd: Nie powiodło się nasłuchiwanie połączeń przychodzących (nasłuch zwrócił błąd %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Transakcja została odrzucona! Może się to zdarzyć jeśli część monet z portfela została już wydana używając kopii pliku wallet.dat i nie zostało to tutaj uwzględnione.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Błąd: Z powodu wielkości kwoty, swojego skomplikowania, lub użycia niedawno otrzymanych monet, transakcja ta wymaga uiszczenia opłaty o wysokości co najmniej %s </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Błąd: Portfel jest odblokowany tylko dla celu anonimizacji, nie możliwe jest przeprowadzenie transakcji.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Wykonaj komendę po otrzymaniu odpowiedniego zawiadomienia lub po obserwacji bardzo długiego rozszczepienia (%s w konsoli jest zastąpiony przez wiadomość)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Wykonaj komendę kiedy zmienia się transakcja portfela (%s w konsoli jest zastąpione przez TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Wykonaj komendę przy zmianie najlepszego bloku (%s w konsoli jest zastąpione przez hasz bloku)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Opłaty mniejsze niż ta, są uważane są za równoznaczne z brakiem opłat (dla przeprowadzenia transakcji) (domyślnie:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Zrzuć zapisy aktywności bazy danych z pamięci na dysk co &lt;n&gt; megabajtów (domyślnie: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Znaleziono niepotwierdzone denominowane transakcje wyjściowe, poczekam aż zostaną one potwierdzone aby móc kontynuować dalej.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Jak szczegółowa jest weryfikacja bloków (0-4, domyślnie: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>W tym trybie -genproclimit kontroluje ile bloków jest generowanych natychmiastowo.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX potrzebuje aby transakcja wejściowa miała co najmniej 6 potwierdzeń. Poczekaj kilka minut i spróbuj ponownie.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Prowadź nasłuch połączeń JSON-RPC na &lt;port&gt; (domyślnie: 9998 lub testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Nazwa służąca do stworzenia linka do KeePass w którym trzymane jest hasło portfela</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Ilość czasu liczonego w sekundach jaki musi upłynąć zanim wadliwy peer znowu może spróbować nawiązać połączenie (domyślnie 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Dostarcz Darksend płynności przez rzadkie ale ciągłe mieszanie monet (0-100, domyślnie: 0, 1=bardzo często, wysokie opłaty, 100=bardzo rzadko, małe opłaty)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Jeśli pula adresów jest niska, pytaj o adresy peer przez podgląd DNS (domyślnie: 1 chyba że -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Ustaw zewnętrzny adres:port aby połączyć się z tym masternodem (na przykład: adres:port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Ustaw maksymalny rozmiar transakcji o wysokim/niskim priorytecie w bajtach (domyślny: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Ustaw liczbę wątków weryfikacji skryptu (%u do %d, 0 = auto, &lt;0 = zostaw tyle rdzeni wolnych, domyślnie: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Ustaw limit na pracę procesora kiedy generowanie jest włączone (-1 = brak limitu, domyślnie: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Pokaż N potwierdzeń dla skutecznie zamkniętej transakcji (0-9999, domyślnie: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Ta wersja nie jest jeszcze gotowa na oficjalne wydanie - używaj jej na własne ryzyko - nie używaj tej wersji do kopania monet lub do świadczenia usług komercyjnych.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Niezdolny do związania z %s na tym komputerze. Prawdopodobnie Dash jest już uruchomiony. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Nie znaleziono wystarczających denominowanych środków Darksend do wykonania tej transakcji.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Nie znaleziono wystarczającej ilości nie zdenominowanych środków Darksend dla tej transakcji, które nie równają się 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Nie znaleziono wystarczającej ilości zdenominowanych środków Darksend dla tej transakcji.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Użyj osobnego proxy SOCK5 aby połączyć się z peerami przez sieć Tor (domyślnie: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Uwaga: -paytxfee jest bardzo wysoka! To jest opłata którą będziesz musiał uiścić jeśli dokonasz transakcji.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Uwaga: Proszę sprawdzić czy data i czas na twoim komputerze są poprawne! Jeśli twój zegar nie pokazuje prawidłowej godziny to Dash może nie działać poprawnie.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Uwaga: Wygląda na to, że istnieją pewne rozbieżności w sieci! Możliwe, że niektórzy kopacze doświadczają problemów technicznych. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>dadf</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Uwaga: wystąpił błąd podczas odczytu pliku wallet.dat! Wszystkie klucze są odczytywane poprawnie ale dane transakcji lub wpis w bazie adresów jest niepoprawny lub nie istnieje. </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Uwaga: plik wallet.dat jest uszkodzony, ale dane zostały odzyskane! Oryginalny plik wallet.dat został zapisany jako wallet.{timestamp}.bak w %s; jeżeli twoje saldo lub transakcje są nieprawidłowe powinieneś przwyrócić ten plik z kopi zapasowej.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Musisz ustawić rpcpassword=&lt;password&gt; w pliku konfiguracji:
-%s
-Jeżeli plik ten nie istnieje, stwórz go z uprawnieniami tylko do odczytu przez właściciela.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Musisz sprecyzować masternodeprivkey w konfiguracji. Proszę przeglądnij dokumentacje w celu pomocy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(standardowo: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(standardowo: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; może być:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Zaakceptuj linie poleceń oraz polecenia JSON-RPC </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Pozwól na połączenia z zewnątrz (domyślnie: 1 jeśli nie -proxy lub -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Dodaj węzeł do połączenia się oraz spróbuj utrzymać połączenie otwarte</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Pozwól na wyszukiwanie DNS dla -addnode, -seednode oraz -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Pozwól na połączenia JSON-RPC  z określonego adresu IP</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Ta wartość wejściowa już istnieje</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Zawsze wysyłaj zapytanie o adres peera przez podgląd DNS (domyślnie: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Spróbuj odzyskać prywatne klucze z uszkodzonego wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Opcje tworzenia bloku</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Niemożna denominować: Nie ma kompatybilnych transakcji wejściowych.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Nie można obniżyć wersji portfela</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Nie można rozwiązać -bind dla adresu adresu: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Nie można rozwiązać -externalip dla adresu: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Nie można zapisać domyślnych adresów</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Wyczyść listę transakcji w portfelu (opcja diagnostyczna; oznacza -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Transakcja pod zastaw jest nie niewłaściwa.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Transakcja pod zastaw jest nie niewłaściwa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Podłącz tylko do wyszczególnionych węzła(ów)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Połączenie poprzez SOCKS proxy</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Podłącz do JSON-RPC na porcie &lt;port&gt; (domyślny: 9998 lub sieć testowa: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Podłącz do KeePassHttp na porcie &lt;port&gt; (domyślny: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Podłącz do węzła aby odzyskać adresy peerów, a potem odłącz</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Opcje połączenia:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Wykryto uszkodzoną bazę danych bloków</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Wersja klienta Dash Core RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend jest wyłączony.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Opcje Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Opcje debugowania/testowania:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Wyłącz tryb awaryjny, nadpisz przawdziwy tryb awaryjny (domyślny:0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Wykryj własny adres IP (domyślny:1 kiedy nasłuchuje oraz nie ma -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Nie wczytuj portfela oraz wyłącz połączenia RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Czy chcesz teraz przebudować bazę danych bloków?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Wczytywanie zakończone</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Upoważnia klienta aby działał jako masternode (0-1, domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Wpisy są pełne.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Błąd podłączania do masternoda.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Błąd podczas inicjowania bazy dancyh bloku</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Błąd podczas inicjowania środowiska bazy danych portfela</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Błąd wczytywania bloku bazy danych</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Błąd wczytywania wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Błąd wczytywania wallet.dat: Portfel uszkodzony</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Błą wczytywania wallet.dat: Portfel wymaga nowszej wersji Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Błąd otwarcia bloku bazy danych</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Błąd odczytu bazy danych, następuje zamknięcie.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Błąd odzyskiwania klucza publicznego.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Błąd</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Błąd: Przestrzeń dyskowa jest niska!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Błąd: Portfel zamknięty, stworzenie transakcji jest niemożliwe!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Błąd: Już masz oczekujące wejścia do puli Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Błąd systemu</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Nie powiódł się nasłuch żadnego z portów. Użyj -listen=0 jeśli chcesz.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Niepowodzenie przy odczycie informacji o bloku</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Niepowodzenie przy odczycie bloku</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Niepowodzenie przy synchronizacji indeksu bloku</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Jeśli &lt;kategoria&gt; nie jest dostarczona, utwórz informacje o debugowaniu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Niepowodzenie przy próbie zapisu indeksu bloku</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Niepowodzenie przy zapisie informacji o bloku</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Niepowodzenie przy próbie zapisu bloku</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Niepowodzenie przy zapisie informacji o pliku</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Niepowodzenie przy zapisie do bazy danych monet</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>NIepowodzenie przy zapisie indeksu transakcji</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>NIepowodzenie przy zapisie cofniętych danych</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Opłata za kB do dodania do transakcji, którą wysyłasz</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Opłaty mniejsze niż te, są uważane za zerowe opłaty (dla przekazywania) (domyślny:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Wymuś tryb bezpieczny (domyślny: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Generuj monety (domyślny: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Poproś o pomoc dla polecenia</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Ile bloków do sprawdzenia podczas uruchomienia (domyślny: 280, 0 = wszystkie)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Jeśli &lt;kategoria&gt; nie jest dostarczona, utwórz informacje o debugowaniu.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend jest w stanie spoczynku.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Żądanie Darksend zakończone:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Żądanie Darksend niezakończone:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Błąd w połączeniu z Masternodem.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Finalizuje transakcje.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Znaleziono wystarczającą ilość użytkowników, zapisuje ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ignoruj masternody niższe wersją od (przykład: 70050; domyślny: 0)</translation>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Ignoruj masternody niższej wersji (np. 70050; domyślnie: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importuje...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importuje bloki z zewnętrznego pliku blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Niekompatybilny tryb.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Niekompatybilna wersja.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Znaleziono nieprawidłowy blok lub brak bloku początkowego. Nieprawidłowy katalog danych dla sieci</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Informacja</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Inicjalizacja kontroli poprawności nie powiodła się. Trwa zamykanie Dash Core</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Transakcja wejściowa jest niewłaściwa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>Opcje InstantX:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Niewystarczające środki</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Niewystarczające środki</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Nieprawidłowy adres -onion: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Nieprawidłowy adres -proxy: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Nieprawidłowa kwota dla -minrelaytxfee=&lt;kwota&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Nieprawidłowa kwota dla -mintxfee=&lt;kwota&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Nieprawidłowa kwota dla -paytxfee=&lt;kwota&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Niewłaściwa ilość</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Za mało czasu upłynęło od ostatniej udanej transakcji Darksend.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>W trakcie mieszania...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Nie wykryto żadnego Masternoda.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Nie znalezione zadnego kompatybilnego Masternoda.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>To nie jest Masternode.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Portfel potrzebuje być przepisany: uruchom ponownie Dash Core aby zakończyć.</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Spróbuje ponownie...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Nieprawidłowy klucz prywatny masternoda. Przeczytaj dokumentację.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Nieprawidłowy klucz prywatny.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Wykryto nieprawidłowy skrypt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>ID KeePassHttp dla ustanowionego skojażenia</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>Klucz KeePassHttp dla zaszyfrowanego metodą AES połączenia z KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Utrzymuj N zanonimizowanych dash (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Utrzymuj najwyżej &lt;n&gt; niepodłączalnych bloków w pamięci (domyślny: %u)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Utrzymuj najwyżej &lt;n&gt; niepodłączalnych transakcji w pamięci (domyślny: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>Za mało czasu upłynęło od ostatniej transakcji Darksend.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Za mało czasu upłynęło od ostatniej udanej transakcji Darksend.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Ogranicz rozmiar pamięci podrecznej podpisu do &lt;n&gt; wejść (domyślny: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Lista poleceń</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Nasłuchuj połączeń na &lt;port&gt; (domyślny: 9999 lub sieć testowa: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
-        <translation>Ładuje adresy...</translation>
+        <translation>Wczytuje adresy...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
-        <translation>Ładuje indeks bloków</translation>
+        <translation>Wczytuje indeks bloków</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Ładuje pamięć podręczną budżetu...</translation>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Ładuję listę masternodów...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Ładuje pamięć podręczną masternoda...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Ładuje portfel... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Ładuje portfel...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Rejestruj priorytet transakcji oraz opłatę za kB podczas wykopywania bloków (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Utrzymuj indeks pełnych transakcji (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Utrzymuj najwyżej &lt;n&gt; połączeń do peerów (domyślny: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Opcje masternodów:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>Kolejka masternodów jest pełna.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternod:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Maksymalny bufor odbierający na każde połączenie, &lt;n&gt;*1000 bajtów (domyślny: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Maksymalny bufor wysyłania na każde połączenie, &lt;n&gt;*1000 bajtów (domyślny: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Brak informacji o transakcji wejściowej.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Nie znaleziono kompatybilnego masternoda.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>Nie odnaleziono środków w celu denominacji.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Nie wykryto żadnych masternodów.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>Nie znaleziono pasujących denominacji w celu miksowania.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Wykryto niestandardowy klucz publiczny.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Nie kompatybilny z istniejącymi transakcjami.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Dostępny niewystarczający opis pliku.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Nieobecny na liście masternodów.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Akceptuj tylko łańcuch bloków pasujący do wbudowanych punktów kontrolnych (domyślny: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Połącz tylko do węzłów (node) w sieci &lt;net&gt; (IPv4, IPv6 lub Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Opcje:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Hasło dla połączeń JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Wyjście debugowania poprzedzone znacznikiem czasu (domyślny: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Pokaż blok podczas startu, jeśli istnieje w indeksie bloków</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Pokaż drzewo bloków podczas startu (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opcje RPC SSL: (przeglądnij Bitcoin Wiki po instrukcje ustawień SSL)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Opcje klienta RPC:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>Opcje serwera RPC:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Losowo odrzuć 1 co każde &lt;n&gt; komunikatów sieciowych</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Rozmyj losowo 1 co każde &lt;n&gt; komunikatów sieciowych </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Odbuduj łańcuch bloków (block chain) od bieżącego pliku blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Skanuj ponownie łańcuch bloków (block chain) dla brakujących transakcji w portfelu</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Ponowne skanowanie...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Włącz wątek aby od czasu do czasu wyrównać portfel (domyślny: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Działaj w tle jako daemon i akceptuj polecenia</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opcje SSL: (przeglądnij Bitcoin Wiki po instrukcje ustawień SSL)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Wybierz wersję SOCKS dla -proxy (4 lub 5, domyślny: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Wyślij polecenie do Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Wyślij polecenie do węzła (node) działającego na &lt;ip&gt; (domyślny: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Wyślij informacje o debugowaniu/śladach do konsoli zamiast do pliku debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Serwer pliku certyfikatu (domyślny: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Serwer klucza prywatnego (domyślny: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Sesja nie została ukończona!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Sesja wygasła (30 sekund), proszę spróbuj ponownie.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Ustaw pamięć podręczną bazy danych w megabajtach (%d to %d, domyślny: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Ustaw ilość kluczy w key pool do &lt;n&gt; (domyślny: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Ustaw maksymalny rozmiar bloku w bajtach (domyślny: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Ustaw klucz prywatny masternoda</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Ustaw liczbę wątków dla usługi połączen RPC (domyślny: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Ustaw flagę DB_PRIVATE w środowisku db portfela (domyślny: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Pokaż wszystkie opcje debugowania (użyj: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Pokaż nformacje o benchmarku (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Zmniejsz plik debug.log podczas włączania klienta (domyślny: 1 kiedy nie ma -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Przypisywanie nie powiodło się.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>Sesja logowania wygasła, proszę spróbować ponownie.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Podpisywanie transakcji nie powiodło się</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Sprecyzuj plik konfiguracyjny (domyślny: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Sprecyzuj limit czasu połączenia w milisekundach (domyślny: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Sprecyzuj katalog danych</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Sprecyzuj plik konfiguracji masternoda (domyślny: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Sprecyjzuj plik pid (domyślny: dashd.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Sprecyzuj plik wallet (w katalogu danych)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Sprecyzuj swój adres publiczny</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Zużyj niepotwierdzoną resztę podczas wysyłania transakcji (domuślny: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Włącz Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Błąd systemu:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Ten komunikat pomocny</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Używa się tego dla regresywnego testowania narzędzi (opcji) oraz rozwoju aplikacji.</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Jest to oprogramowanie testowe.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>To nie jest masternod.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Próg dla niewłaściwie działających, odłączających sie peerów (domyślny: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Aby użyć opcję %s</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Używa się tego dla regresywnego testowania narzędzi (opcji) oraz rozwoju aplikacji.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Zbyt mała kwota</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Kwota musi być dodatnia</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Skutecznie utworzono transakcję.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Opłaty za transakcję są zbyt wysokie.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Transakcja niewłaściwa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Za duża transakcja</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Nie udało się powiązać do %s na tym komputerze (powiązanie zwróciło błąd %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Nie można podpisać zwyciezcy płatności masternoda, nieprawidłowy klucz?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Nie udało się powiązać do %s na tym komputerze (powiązanie zwróciło błąd %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Niemożliwe podpisanie wiadomości spork, nieprawidłowy klucz?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Nieznana wersja -socks proxy zażądana: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Nieznana sieć określona w -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Ulepsz plik wallet.dat do nowego formatu</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Użycie (niewłaściwy, użyj dash-cli):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Użycie:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Użyj zintegrowany KeePass 2 używając wtyczkę KeePass Http (domyślny: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Użyj N oddzielnych masternodów aby zanonimizować pieniądze (2-8, domyślny: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Ulepsz plik wallet.dat do nowego formatu</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Użyj OpenSSL (https) dal połączeń JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Użyj UPnP aby zmapować używany port (domyślny: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Użyj UPnP aby zmapować używany port (domyślny: 1 kiedy nasłuchuje)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Użyj sieci testowej</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Nazwa użytkownika dla połączeń JSON-RPC </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Wartość jest większa niż ta maksymalnie dopuszczalna przez Darksend pool</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Weryfikacja bloków...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Weryfikacja portfela...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Zaczekaj na start serwera RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Plik wallet %s znajduje się poza katalogiem danych %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Portfel jest zamknięty.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Portfel musi zostać ponownie zapisany: uruchom Dash ponownie aby dokończyć operacje</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Opcje portfela:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Ostrzeżenie</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Ostrzeżenie: Niewłaściwy argument -debugnet zignorowany, użyj -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Ostrzeżenie: Wersja nieaktualna, zalecana aktualizacja!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Musisz odnowić bazę danych używając -reindex aby zmienić -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Twoje wejścia zostały dodane z powodzeniem.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Zappowanie wszystkich transakcji z portfela</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>podczas uruchomienia</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>wersja</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>Plik wallet.dat zepsuty, odzyskiwanie nie powiodło się</translation>
     </message>
 </context>
-</TS>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/dash_pt.ts b/src/qt/locale/dash_pt.ts
index 0c999c4e267d..f5e08a513903 100644
--- a/src/qt/locale/dash_pt.ts
+++ b/src/qt/locale/dash_pt.ts
@@ -1,202 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="pt">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Acerca do Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>Versão do &lt;b&gt;Dash Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Copyright &amp;copy; 2009-2014 Os programadores Bitcoin Core.
-Copyright &amp;copy; 2014-YYYY Os programadores Dash Core.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Este é um programa experimental.
-
-Distribuído sob uma licença de software MIT/X11, por favor verifique o ficheiro anexo license.txt ou http://www.opensource.org/licenses/mit-license.php.
-
-Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no OpenSSL Toolkit (http://www.openssl.org/), software criptográfico escrito por Eric Young (eay@cryptsoft.com) e software UPnP escrito por Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Os programadores Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Os programadores Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="pt" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Clique duas vezes para editar o endereço ou o rótulo</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Clique com o botão direito para editar o endereço ou o rótulo</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Criar novo endereço</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Novo</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copiar o endereço seleccionado para a área de transferência</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copiar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Apagar o endereço seleccionado</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Apagar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar os dados do separador actual para um ficheiro</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Exportar</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>&amp;Fechar</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Escolha o endereço para onde enviar as moedas</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Escolha o endereço onde deseja receber as moedas</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>E&amp;scolha</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Endereços para envio</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Endereços para recepção</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Estes são os endereços Dash para envio de pagamentos. Confirme sempre a quantia e o endereço antes de enviar as moedas.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Estes são os seus endereços Dash para receber pagamentos. É recomendado que seja usado um novo endereço para cada transacção.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copiar Endereço</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Copiar &amp;Rótulo</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Editar</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Exportar lista de endereços</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Ficheiro separado por vírgulas (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>A exportação falhou</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Ocorreu um erro ao tentar gravar a lista de endereços para %1.</translation>
+        <translation>Ocorreu um erro ao tentar gravar a lista de endereços para %1. Por favor, tente de novo.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Rótulo</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(sem rótulo)</translation>
     </message>
@@ -204,154 +143,150 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Diálogo de Palavra Passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Palavra Passe Actual</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Nova Palavra Passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Repita a Nova Palavra Passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Serve para desactivar o envio de dinheiro quando a conta do SO for comprometida. Não oferece segurança real.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Apenas para anonimização</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Insira a nova palavra-passe para a carteira.&lt;br/&gt;Por favor use uma palavra-chave com &lt;b&gt;10 ou mais caracteres aleatórios&lt;/b&gt;, ou &lt;b&gt;8 ou mais palavras&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Insira a nova palavra-passe para a carteira.&lt;br/&gt;Por favor use uma palavra-chave com &lt;b&gt;10 ou mais caracteres aleatórios&lt;/b&gt;, ou &lt;b&gt;8 ou mais palavras&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Cifrar carteira</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Esta operação necessita da sua palavra-passe para desbloquear a carteira.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Desbloquear carteira</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Esta operação necessita da sua palavra-passe para decifrar a carteira.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Decifrar carteira</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Mudar palavra-passe</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Insira a antiga e a nova palavra-passe para a carteira.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Confirme cifra da carteira</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Atenção: Se cifrar a carteira e perder a palavra-passe, irá &lt;b&gt;PERDER TODAS AS SUAS MOEDAS DASH&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Tem a certeza que quer cifrar a carteira?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Carteira cifrada</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>O cliente Dash irá fechar para finalizar o processo de cifra. Lembre-se que cifrar a sua carteira não consegue proteger totalmente as suas dashs contra roubos feitos por malware presente no seu computador.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>IMPORTANTE: Quaisquer copias de segurança feitas anteriormente à sua carteira, devem ser substituídas pelo novo ficheiro cifrado. Por razões de segurança, as copias de segurança anteriores não cifradas ficarão obsoletas assim que comece a usar a nova carteira cifrada,</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Cifra da carteira falhou</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>A cifra da carteira falhou devido a um erro interno. A sua carteira não foi cifrada.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>As palavras-passe fornecidas não coincidem.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>O desbloqueio da carteira falhou</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>A palavra-passe fornecida para decifrar a carteira está incorrecta.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Decifra da carteira falhou</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>A palavra-passe foi alterada com sucesso.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Atenção: O Caps Lock está activo!</translation>
     </message>
@@ -359,437 +294,425 @@ Este produto inclui software desenvolvido pelo Projecto OpenSSL para uso no Open
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Nó</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Global</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Mostrar visão global da carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Enviar</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Enviar moedas para um endereço Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Receber</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Solicitar pagamentos (gera códigos QR e dash: URIs)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transacções</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Visualiza histórico de transacções</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>&amp;Sair</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Sair da aplicação</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Acerca do Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Mostra informação acerca do Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Mostra informação acerca do Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Acerca do &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Mostra informação acerca do Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Opções...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Modificar opções de configuração do Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Mostar / Esconder</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Mostrar ou esconder a Janela principal</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Cifrar Carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Cifra as chaves privadas que pertencem à sua carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>Copia de &amp;Segurança</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Criar copia de segurança da carteira noutra localização</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Mudar Palavra-passe</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Mudar a palavra-passe usada na cifra da carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Desbloquear Carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Desbloquear carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Bloquear Carteira</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>&amp;Assinar Mensagem</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Assine mensagens com os seus endereços Dash para provar que são seus</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Verificar Mensagem</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Verifica mensagens para garantir que foram assinadas com um endereço Dash específico</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Informação</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Mostra informação de diagnóstico</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>Consola de &amp;Depuração</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Abrir consola de depuração</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>Monitor de &amp;Rede</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Mostrar monitor de rede</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>&amp;Reparar Carteira</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Mostra as opções de reparação da carteira</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Abrir Ficheiro de &amp;Configuração</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Abrir ficheiro de configuração</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Endereços de envio...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Mostra a lista de endereços de envio e respectivos rótulos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Endereços de &amp;Recepção...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Mostra a lista de endereços de recepção e respectivos rótulos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Abrir &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Abre um dash: URI ou solicitação de pagamento</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>Opções de linha de &amp;comandos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Cliente Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>%n bloco do histórico de transacções processado.</numerusform><numerusform>%n blocos do histórico de transacções processados.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Mostra a mensagem de ajuda do Dash Core para obter a lista com as possíveis opções de linha de comandos</translation>
+        <translation>Mostra a mensagem de ajuda do Dash Core para obter a lista com as possíveis opções de linha de comandos</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Ficheiro</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Definições</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Ferramentas</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Ajuda</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Barra de ferramentas</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Cliente Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n ligação activa à rede Dash</numerusform>
-            <numerusform>%n ligações activas à rede Dash</numerusform>
-        </translation>
+        <translation><numerusform>%n ligação activa à rede Dash</numerusform><numerusform>%n ligações activas à rede Dash</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>A sincronizar com a rede...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>A carregar blocos do disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>A indexar blocos no disco...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Nenhuma fonte de blocos disponível...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">%1 blocos do histórico de transacções processados.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Actualizado</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n hora</numerusform>
-            <numerusform>%n horas</numerusform>
-        </translation>
+        <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n dia</numerusform>
-            <numerusform>%n dias</numerusform>
-        </translation>
+        <translation><numerusform>%n dia</numerusform><numerusform>%n dias</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n semana</numerusform>
-            <numerusform>%n semanas</numerusform>
-        </translation>
+        <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 e %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n ano</numerusform>
-            <numerusform>%n anos</numerusform>
-        </translation>
+        <translation><numerusform>%n ano</numerusform><numerusform>%n anos</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 de atraso</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>A alcançar</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>O último bloco recebido foi gerado à %1.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Transacções posteriores ainda não serão visíveis.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Aviso</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Informação</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Transacção enviada</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Transacção recebida</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -802,30 +725,25 @@ Endereço: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>A carteira encontra-se &lt;b&gt;cifrada&lt;/b&gt; e actualmente &lt;b&gt;desbloqueada&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>A carteira encontra-se &lt;b&gt;cifrada&lt;/b&gt; e actualmente &lt;b&gt;desbloqueada&lt;/b&gt; somente para anonimização</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>A carteira encontra-se &lt;b&gt;cifrada&lt;/b&gt; e actualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Ocorreu um erro fatal. O cliente Dash não pode continuar de forma segura e irá fechar.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Alerta de Rede</translation>
     </message>
@@ -833,333 +751,302 @@ Endereço: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Selecção de Endereços do Coin Control</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Quantia:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Prioridade:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Baixo débito:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Selecção de Moedas</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Poeira:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Com taxa:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Troco:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(des)seleccionar todos</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Vista em árvore</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Vista em lista</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 bloqueada)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Recebido com rótulo</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Rótulo</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Endereço</translation>
+        <translation>Recebido com endereço</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Voltas Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Confirmações</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Confirmada</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Prioridade</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Copiar endereço</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copiar rótulo</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Copiar quantia</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Copiar ID de transacção</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Bloquear não gasto</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Desbloquear não gasto</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Copiar quantidade</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Copiar taxa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copiar depois da taxa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copiar bytes</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copiar baixo débito</translation>
+        <translation>Copiar poeira</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copiar troco</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Entrada não anonimizada seleccionada. &lt;b&gt;O Darksend será desactivado.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Se deseja usar o Darksend, por favor desseleccione primeiro todas as entradas não anonimizadas e em seguida volte a marcar a opção Darksend.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>a-mais-alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>mais-alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>média-alta</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Pode variar +/- %1 satoshi(s) por entrada.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>média</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>média-baixa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>baixa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>mais-baixa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>a-mais-baixa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 bloqueado)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>nenhuma</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Poeira</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>sim</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>não</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Este rótulo fica vermelho se o tamanho da transacção exceder 1000 bytes.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Isto significa que é necessária uma taxa de pelo menos %1 por kB.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Pode variar +/- 1 byte por entrada.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Transacções com prioridade mais alta tem uma maior probabilidade de ser incluídas num bloco.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Este rótulo fica vermelho se a prioridade for inferior a &quot;média&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Este rótulo fica vermelho se algum destinatário receber uma quantia inferior a %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Isto significa que é necessária uma taxa de pelo menos %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Quantia inferiores a 0.546 vezes a taxa mínima de retransmissão são mostradas como poeira.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Este rótulo fica vermelho se o troco for inferior a %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(sem rótulo)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>troco de %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(troco)</translation>
     </message>
@@ -1167,84 +1054,84 @@ Endereço: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Configurar Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Privacidade Básica</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Privacidade Alta</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Privacidade Máxima</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Por favor seleccione um nível de privacidade.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Usar 2 masternodes distintos para misturar os fundos até 1000DRK</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Usar 8 masternodes distintos para misturar os fundos até 1000DRK</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Usar 16 masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Esta opção é a mais rápida e irá custar cerca de ~0.025 DASH para anonimizar 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Esta opção é relativamente rápida e irá custar cerca de ~0.05 DASH para anonimizar 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH por cada 1000 DASH a anonimizar.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Esta é a opção mais lenta e mais segura. Usando anonimização máxima irá custar</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Configuração Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend foi colocado com sucesso no modo básico (%1 e 2 voltas). Pode mudar esta definição em qualquer altura abrindo o ecrã de configuração Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend foi colocado com sucesso no modo alto (%1 e 8 voltas). Pode mudar esta definição em qualquer altura abrindo o ecrã de configuração Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend foi colocado com sucesso no modo máximo (%1 e 16 voltas). Pode mudar esta definição em qualquer altura abrindo o ecrã de configuração Dash.</translation>
     </message>
@@ -1252,67 +1139,67 @@ Endereço: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Editar Endereço</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Rótulo</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Rótulo associado com este item da lista de endereços</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Endereço</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>O endereço associado com este item da lista. Isto só pode ser modificado para endereços de envio.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Novo endereço de recepção</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Novo endereço de envio</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Editar endereço de recepção</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Editar endereço de envio</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>O endereço introduzido &quot;%1&quot; não é um endereço Dash válido.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>O endereço introduzido &quot;%1&quot; já se encontra no livro de endereços.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Não foi possível desbloquear carteira.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Falhou a geração de nova chave.</translation>
     </message>
@@ -1320,27 +1207,27 @@ Endereço: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Será criada uma nova pasta de dados.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>nome</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>A pasta já existe. Adicione %1 se desejar criar uma nova pasta aqui.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>O caminho já existe e não é uma pasta.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Não é possível criar a pasta de dados aqui.</translation>
     </message>
@@ -1348,72 +1235,68 @@ Endereço: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Opções de linha de comandos</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>versão</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Acerca do Dash Core</translation>
+        <translation>Acerca do Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Opções de linha de comandos</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Utilização:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>opções de linha de comandos</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Opções do interface</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Escolher pasta de dados no arranque (omissão: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Defina a linguagem, por exemplo &quot;pt-PT&quot; (omissão: linguagem do sistema)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Arrancar minimizado</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Definir certificados de raiz SSL para solicitações de pagamento (omissão: -sistema-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Mostrar ecrã de boas vindas no arranque (omissão: 1)</translation>
     </message>
@@ -1421,107 +1304,85 @@ Endereço: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Bem-vindo</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Bem-vindo ao Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Como esta é a primeira vez que o programa é executado, pode escolher onde o cliente Dash Core irá guardar os seus dados.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>O cliente Dash Core irá descarregar e guardar uma copia da cadeia de blocos Dash. Pelo menos %1GB de dados serão guardados nesta pasta e irá aumentar com o tempo. A carteira também ficará guardada nesta pasta.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Usar a pasta de dados por omissão</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Usar uma pasta de dados personalizada</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Erro: A pasta especificada &quot;%1&quot; não pode ser criada.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Erro: A pasta especificada &quot;%1&quot; não pode ser criada.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB de espaço livre disponível</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB de espaço livre disponível</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(de %1GB necessários)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(de %1 GB necessários)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Abrir URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Abrir solicitação de pagamento a partir de um URI ou ficheiro</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Seleccionar ficheiro de solicitação de pagamento</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Seleccionar ficheiro de solicitação de pagamento para abrir</translation>
     </message>
@@ -1529,313 +1390,281 @@ Endereço: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Opções</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Geral</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Executar automaticamente o cliente Dash quando entrar no sistema.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Iniciar o cliente Dash ao entrar no sistema</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Tamanho da &amp;cache de dados</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Número de processos de &amp;verificação de scripts</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = auto, &lt;0 = deixar este número de cores livres)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Esta opção determina o número de masternodes pelos quais uma entrada será anonimizada. Mais voltas de anonimização fornecem um maior grau de privacidade, mas também tem um custo mais elevado em taxas.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Número de voltas Darksend a usar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Esta quantia actua como um limite, a partir do qual o Darksend é desligado.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Quantia de Dash a manter anonimizada</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>C&amp;arteira</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Aceitar ligações do exterior</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Aceitar ligações de entrada</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Efectuar a ligação à rede Dash através de um proxy SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Taxa de transacção opcional por kB que ajuda a garantir que as suas transacções são processadas rapidamente. A maioria das transacções são de 1 kB.</translation>
+        <translation>&amp;Ligar através de um proxy SOCKS5 (proxy por omissão)</translation>
     </message>
     <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Pagar &amp;taxa da transacção</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Avançado</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Se deve mostrar as opções de coin control.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Activar opções coin &amp;control</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Se desabilitar a funcionalidade de gastar o troco não confirmado, este troco não poderá ser usado até que a transacção tenha pelo menos uma confirmação. Isto também afecta a maneira como o seu saldo é calculado.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Gastar troco não confirmado</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Rede</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Abrir automaticamente a porta do cliente Dash no router. Isto só funciona quando o seu router suporta UPnP e este está activo.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapear porta usando &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Efectuar a ligação à rede Dash através de um proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Ligar através de um proxy SOCKS (proxy por omissão)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>IP do proxy</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Endereço IP do proxy (ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Porta:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Porta do servidor proxy (ex. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">&amp;Versão SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Versão do proxy SOCKS (ex. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Janela</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Somente mostrar o ícone no tabuleiro após minimizar aplicação</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimizar para o tabuleiro, em vez da barra de tarefas</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimizar em vez de fechar ao sair da aplicação. Quando esta opção está activada, a aplicação só será fechada quando seleccionar Sair no menu. </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimizar ao fechar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Interface</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Linguagem do interface:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>A linguagem do interface pode ser definida aqui. Esta definição terá efeito depois de reiniciar a aplicação.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Linguagem não encontrada ou tradução incompleta? Ajude a traduzir aqui:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tema do interface:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unidade por omissão usada para mostrar as quantias:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Escolha a unidade subdivisão por omissão para mostrar na interface e no envio de moedas.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Se deseja mostrar os endereços Dash na lista de transacções ou não.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Mostrar endereços na lista de transacções</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 de terceiros (ex. explorador de blocos) que aparecem no separador de transacções como itens do menu de contexto. %s no URL é substituído pelo hash da transacção. URLs múltiplos são separados pela barra vertical |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URLs de transacções de terceiros</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Opções activas de linha de comandos que sobrescrevem as opções acima:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Reiniciar todas as opções do cliente para os valores por omissão.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Reiniciar Opções</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Cancelar</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>omissão</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>nenhum</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Confirme reinicialização das opções</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Para activar as alterações é necessário reiniciar o cliente.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>O cliente será fechado, deseja continuar?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Esta alteração necessita que o cliente seja reiniciado.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>O endereço proxy fornecido é inválido.</translation>
     </message>
@@ -1843,368 +1672,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>De</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Carteira</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>A informação mostrada pode estar desactualizada. A sua carteira sincroniza automaticamente com a rede Dash assim que for estabelecida uma ligação, mas este processo ainda não terminou.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Disponível:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>O seu saldo disponível</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Pendente:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total de transacções que ainda não foram confirmadas e não contam para o saldo disponível</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Imaturo:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Saldo minado que ainda não atingiu a maturidade</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldos</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Transações não confirmadas para endereços somente de visualização</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldo minado que ainda não atingiu a maturidade em endereços somente de visualização</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Total:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>O seu saldo total</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Saldo total em endereços somente de visualização</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Somente de visualização:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>O seu saldo actual em endereços somente de visualização</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Estado:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Activado/Desactivado</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Progresso:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Saldo Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Quantia e Voltas:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Voltas</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Denominação submetida:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>As denominações que foram submetidas para o Masternode. Para misturar, outros utilizadores terão que submeter denominações iguais.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Transacções recentes</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Iniciar/Parar Mistura</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>As denominações que foram submetidas para o Masternode.&lt;br&gt;Para misturar, outros utilizadores terão que submeter denominações iguais.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Última Mensagem)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Tentar submeter um pedido Darksend manualmente.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Tentar Mistura</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Reinicia o estado actual Darksend (pode interromper o Darksend mesmo quando em processo de Mistura, o que pode ter custos!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Reiniciar</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Transacções recentes&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Desactivado</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Iniciar Mistura Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Parar Mistura Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Nenhuma entrada detectada</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n volta</numerusform><numerusform>%n voltas</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Foram encontradas saídas denominadas não confirmadas, a aguardar pela confirmação para recalcular</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Voltas</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Activado</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Encontradas entradas suficientes para anonimizar %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Activado</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Última mensagem Darksend:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend inactivo.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>Mistura em progresso...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Pedido Darksend concluído: A sua transacção foi aceite!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>As seguintes entradas foram submetidas para o masternode:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Enviado para o masternode. A aguardar por mais entradas</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Número necessário de utilizadores encontrado, a assinar ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Número necessário de utilizadores encontrado, a assinar (em espera.)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Número necessário de utilizadores encontrado, a assinar (em espera..)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Número necessário de utilizadores encontrado, a assinar (em espera...)</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>A transmitir transacção final.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>A finalizar transacção.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Pedido Darksend incompleto:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Irá tentar de novo...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Pedido Darksend completo:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Enviado para o masternode, a aguardar na fila .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Enviado para o masternode, a aguardar na fila ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Enviado para o masternode, a aguardar na fila ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Estado desconhecido:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend foi reposto com sucesso.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend necessita de pelo menos %1 para ser usado.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>A carteira está bloqueada e o utilizador recusou o desbloqueamento. A desactivar Darksend.</translation>
     </message>
@@ -2212,141 +1947,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Erro na solicitação de pagamento</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Não é possível iniciar o dash: click-to-pay handler</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Aviso do gestor de rede</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">O seu proxy activo não suporta SOCKS5, o que é necessário para solicitar pagamentos através de proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Manipulação de URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>URL de solicitação de pagamento é inválido: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">O URI não pode ser carregado! Isto pode ser causado por um endereço Dash inválido ou parâmetros do URI incorrectos.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Manipulação de ficheiros de solicitação de pagamento</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">O ficheiro de solicitação de pagamento não pode ser aberto ou processado! Isto pode ser causado por um ficheiro de solicitação de pagamento inválido.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Endereço de pagamento inválido %1</translation>
+        <translation>Endereço de pagamento inválido %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>O URI não pode ser carregado! Isto pode ser causado por um endereço Dash inválido ou parâmetros do URI incorrectos.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>O ficheiro de solicitação de pagamento não pode ser aberto ou processado! Isto pode ser causado por um ficheiro de solicitação de pagamento inválido.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Solicitação de pagamento rejeitada</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>A rede da solicitação de pagamento não corresponde à rede do cliente.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>A solicitação de pagamento expirou.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>A solicitação de pagamento não está inicializada.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Solicitações de pagamento não verificadas para scripts de pagamento personalizados não são suportadas.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>A quantia %1 para solicitação de pagamento é demasiado pequena (considerada poeira)</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Devolução de %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>A solicitação de pagamento %1 é demasiado grande (%2 bytes, permitido %3 bytes).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Protecção DoS à solicitação de pagamento</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Erro de comunicação com %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">A solicitação de pagamento não pode ser carregada ou processada!</translation>
+        <translation>A solicitação de pagamento não pode ser carregada!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Resposta inválida do servidor %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Erro no pedido à rede</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Pagamento confirmado</translation>
     </message>
@@ -2354,139 +2069,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Endereço/Servidor</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente de Usuário</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tempo de Ping</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erro: A pasta de dados especificada &quot;%1&quot; não existe.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Erro: Não foi possível carregar o ficheiro de configuração: %1. Use somente a sintaxe chave=valor.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Erro ao ler o ficheiro de configuração de masternodes: %1.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erro: Combinação inválida de -regtest e -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core ainda não terminou de forma segura...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Insira um endereço Dash (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Quantia</translation>
+        <translation>Quantia</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Insira um endereço Dash (ex. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 d</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 m</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>REDE</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>DESCONHECIDO</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Nenhum</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N/D</translation>
+        <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Salvar Imagem...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Copiar Imagem</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Guardar código QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Imagem PNG (*.png)</translation>
     </message>
@@ -2494,436 +2168,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Janela de ferramentas</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Número de Masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Geral</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nome</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Nome do Cliente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N/D</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Número de ligações</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Abrir o ficheiro de registo de depuração Dash a partir da pasta de dados actual. Para grandes ficheiros de registo pode demorar alguns segundos.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Abrir</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Hora de inicialização</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Rede</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Data do último bloco</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Ficheiro de registo de depuração</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>A usar versão do OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Data de compilação</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Número actual de blocos</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Versão do Cliente</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>A usar a versão do BerkeleyDB</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Cadeia de blocos</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Consola</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Limpar consola</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Tráfego de Rede</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Limpar</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Totais</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Recebido</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Enviado</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Direcção</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Versão</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agente de Usuário</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Serviços</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Altura Inicial</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Altura de Sincronização</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Pontuação para Banir</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tempo de Ligação</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Última Enviado</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Último Recebido</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Enviados</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Recebidos</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Tempo de Ping</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Reparar Carteira</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Recuperar Carteira</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Reprocessar ficheiros da cadeia de blocos</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Recuperar transacções 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Recuperar transacções 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Actualizar o formato da carteira</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Entrada:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Saída:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Bem-vindo à consola RPC Dash</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Use as setas para cima / baixo para navegar no histórico, e &lt;b&gt;Ctrl-L&lt;/b&gt; para limpar o ecran.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Digite &lt;b&gt;help&lt;/b&gt; para ter uma visão global dos comandos disponíveis.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 m</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 m</translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Reutilizar um dos endereços de recebimento usados anteriormente. Reutilizar endereços tem problemas de segurança e privacidade. Não use isto a menos que se trate de uma reutilização de um pedido de pagamento feito anteriormente.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>R&amp;eutilizar um endereço de recebimento existente (não recomendado)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Mensagem opcional para anexar à solicitação de pagamento, que será mostrada quando a solicitação for aberta. Nota: A mensagem não será enviada com o pagamento através da rede Dash.</translation>
+        <translation>Mensagem opcional para anexar à solicitação de pagamento, que será mostrada quando a solicitação for aberta. Nota: A mensagem não será enviada com o pagamento através da rede Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Mensagem:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Rótulo opcional para associar com o novo endereço de recebimento.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Utilize este formulário para solicitar pagamentos. Todos os campos são &lt;b&gt;opcionais&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Rótulo:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Quantia opcional a solicitar. Deixar vazio ou zero para não solicitar uma quantia específica.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Quantia</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Pedir pagamento</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Limpar todos os campos do formulário.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Limpar</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Histórico de solicitações de pagamento</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Mostrar a solicitação seleccionada (igual a clicar duas vezes)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Mostrar</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Remover as entradas seleccionadas da lista</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Remover</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Copiar rótulo</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Copiar mensagem</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar quantia</translation>
     </message>
@@ -2931,67 +2664,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR Code</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copiar &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copiar &amp;Endereço</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Salvar Imagem...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Solicitar pagamento a %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Informação de pagamento</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Rótulo</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Mensagem</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>O URI resultante é demasiado longo, tente reduzir o texto do rótulo ou da mensagem.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Erro ao codificar o URI para código QR.</translation>
     </message>
@@ -2999,37 +2732,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Rótulo</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Mensagem</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(sem rótulo)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(sem mensagem)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(sem quantia)</translation>
     </message>
@@ -3037,412 +2770,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Enviar Moedas</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Funcionalidades de Coin Control</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Entradas...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>seleccionadas automáticamente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Fundos insuficientes!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Quantidade:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Quantia:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Prioridade:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>média</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Taxa:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Baixo débito:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>não</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Com taxa:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Troco:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Se isto for activado e o endereço de troco se encontrar vazio, o troco será enviado para um novo endereço gerado.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Endereço de troco personalizado</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Confirmar envio</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Enviar</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Limpar todos os campos do formulário.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Limpar &amp;Tudo</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Enviar para múltiplos destinatários de uma vez</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Adicionar &amp;Destinatário</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Copiar quantidade</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar quantia</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Copiar taxa</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copiar depois da taxa</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copiar bytes</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copiar prioridade</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copiar baixo débito</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copiar troco</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>a usar</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>fundos anónimos</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(o darksend requer que esta quantia seja arredondada até ao %1 mais próximo).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>quaisquer fundos disponíveis (não recomendado)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>e InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 a %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Tem a certeza que quer enviar?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>são adicionadas como taxa de transacção</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Quantia Total %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>ou</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Confirmar envio de moedas</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Solicitação de pagamento expirada</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation type="unfinished"/>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Endereço de pagamento inválido %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>O endereço do destinatário é inválido, por favor verifique.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>A quantia a pagar tem que ser maior que 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>A quantia excede o seu saldo.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>O total excede o seu saldo quando é incluído o valor %1 relativo a taxas de transacção.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Endereço duplicado encontrado, só pode enviar para um endereço uma vez por cada operação de envio.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Falha ao criar transacção!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>A transacção foi rejeitada! Isto pode acontecer se algumas das moedas da sua carteira tiverem sido gastas, tal como se usou uma copia do ficheiro wallet.dat e moedas tiverem sido gastas nessa cópia mas não aqui.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Erro: A carteira foi somente desbloqueada para anonimização de moedas.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Aviso: Endereço Dash inválido</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Aviso: Endereço de troco desconhecido</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(sem rótulo)</translation>
     </message>
@@ -3450,102 +3167,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Este é um pagamento normal.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>&amp;Pagar a:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Endereço para envio do pagamento (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Escolher endereço usado previamente</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Colar endereço da área de transferência</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Remover esta entrada</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Rótulo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Digite um rótulo para este endereço para adicioná-lo à lista de endereços usados</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>&amp;Quantidade</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Mensagem:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Mensagem que foi anexada ao dash: URI e que será guardada com a transacção para sua referência. Nota: Esta mensagem não será enviada para a rede Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Este é um pedido de pagamento não verificado.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Pagar a:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Rótulo:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Este é um pedido de pagamento verificado.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Introduza um rótulo para este endereço para adicionar ao livro de endereços</translation>
     </message>
@@ -3553,12 +3266,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>O Dash Core está a desligar...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Não desligue o computador enquanto está janela estiver visível.</translation>
     </message>
@@ -3566,193 +3279,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Assinaturas - Assinar / Verificar uma Mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Assinar Mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Pode assinar mensagens com os seus endereços para provar que são seus. Tenha atenção para não assinar mensagens vagas, já que, ataques de phishing podem levá-lo a assinar a sua própria identidade para os atacantes. Apenas assine declarações detalhadas com as quais concorde.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Endereço com o qual deseja assinar a mensagem (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Escolher endereço usado previamente</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Colar endereço da área de transferência</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Escreva aqui a mensagem que deseja assinar</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Assinatura</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copiar a assinatura actual para a área de transferência</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Assinar a mensagem para provar que é o proprietário deste endereço Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Assinar &amp;Mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Repor todos os campos de assinatura de mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Limpar &amp;Tudo</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Verificar Mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Introduza o endereço de assinatura, mensagem (assegure-se que copia exactamente as quebras de linha, espaços, tabulações, etc) e assinatura abaixo para verificar a mensagem. Tenha atenção para não ler mais na assinatura do que o que estiver na mensagem assinada, para evitar ser enganado por um atacante que se encontre entre si e quem assinou a mensagem.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Endereço com o qual a mensagem foi assinada (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Verificar a mensagem de forma a garantir que foi assinada com o endereço Dash especificado</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Verificar &amp;Mensagem</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Repor todos os campos de verificação de mensagem</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Prima &quot;Assinar Mensagem&quot; para gerar a assinatura</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Insira um endereço Dash (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>O endereço inserido é inválido.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Por favor verifique o endereço e tente de novo.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>O endereço introduzido não corresponde a uma chave.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>O desbloqueamento da carteira foi cancelado.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>A chave privada correspondente ao endereço introduzido não está disponível.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>A assinatura da mensagem falhou.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Mensagem assinada.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>A assinatura não pode ser descodificada.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Por favor verifique a assinatura e tente de novo.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>A assinatura não corresponde à compilação da mensagem.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>A verificação da mensagem falhou.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Mensagem verificada.</translation>
     </message>
@@ -3760,27 +3461,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Versão %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Os programadores Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Os programadores Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[rede de testes]</translation>
     </message>
@@ -3788,7 +3489,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3796,254 +3497,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Aberta durante mais %n bloco</numerusform>
-            <numerusform>Aberta durante mais %n blocos</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Aberta até %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>conflituosa</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/desligado (verificado através de instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/confirmado (verificado através de instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 confirmações (verificado através de instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/desligada</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/não confirmada</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 confirmações</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/desligado (verificação InstantX em progresso - %2 de %3 assinaturas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/confirmada (verificação InstantX em progresso - %2 de %3 assinaturas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 confirmações (verificação InstantX em progresso - %2 de %3 assinaturas)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/desligado (a verificação InstantX falhou)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/confirmada (a verificação InstantX falhou)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Estado</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, ainda não foi transmitida com sucesso</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, transmitida através de %n nó</numerusform>
-            <numerusform>, transmitida através de %n nós</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Origem</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Gerada</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>De</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>desconhecido</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Para</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>endereço próprio</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>rótulo</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Credito</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>maturidade em %n bloco</numerusform>
-            <numerusform>maturidade em %n blocos</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>rejeitada</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Débito</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Taxa de transacção</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Valor líquido</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Mensagem</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Comentário</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID de transacção</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Comerciante</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>As moedas geradas tem que amadurecer %1 blocos antes de poderem ser gastas. Quando gerou este bloco, este foi propagado para a rede de modo a ser incluído na cadeia de blocos. Se não foi incluído na cadeia, o seu estado será alterado para &quot;rejeitado&quot; e não será possível gastar as moedas. Isto pode acontecer ocasionalmente quando outro nó gera um bloco a poucos segundos do seu.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Informação de depuração</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transacção</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Entradas</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>verdadeiro</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>falso</translation>
     </message>
@@ -4051,12 +3743,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Detalhes da transação</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Esta janela mostra uma descrição detalhada da transação</translation>
     </message>
@@ -4064,169 +3756,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Quantia</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Aberta durante mais %n bloco</numerusform>
-            <numerusform>Aberta durante mais %n blocos</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Aberta até %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Desligado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Não confirmado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>A confirmar (%1 de %2 confirmações recomendadas)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Confirmada (%1 confirmações)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Conflituosa</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Imatura (%1 confirmações, estará disponível após %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Este bloco não foi recebido por nenhum outro nó e provavelmente será rejeitado!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Gerado mas rejeitado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Recebido com</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Recebido de</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Recebido via Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Enviado para</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Pagamento ao próprio</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Minado</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Denominação Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Pagamento Colateral Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Fazer Entradas Colaterais</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Criar Denominações</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(n/d)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Estado da transacção. Passe o ponteiro do rato sobre este campo para mostrar o número de confirmações.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Data e hora à qual a transacção foi recebida.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Tipo de transacção.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Endereço de destino da transacção.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Quantia removida ou adicionada ao saldo.</translation>
     </message>
@@ -4234,207 +3919,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Todas</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Hoje</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Esta semana</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Este mês</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Mês anterior</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Este ano</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Intervalo...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Recebido com</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Enviado para</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend Fazer Entradas Colaterais</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend Criar Denominações</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Denominação Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Pagamento Colateral Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Ao próprio</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Minado</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Outra</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Introduza endereço ou rótulo a pesquisar</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Quantia mínima</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copiar endereço</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copiar rótulo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copiar quantia</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Copiar ID de transacção</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Editar rótulo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Mostrar detalhes da transacção</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Exportar histórico de transacções</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Ficheiro separado por vírgulas (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Confirmada</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Data</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Tipo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Rótulo</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Endereço</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Quantia</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>A exportação falhou</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Ocorreu um erro ao tentar gravar o histórico de transacções para %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Exportação Concluída com Sucesso</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>O histórico de transacções foi gravado com sucesso para %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Intervalo:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>para</translation>
     </message>
@@ -4442,15 +4128,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Nenhuma carteira carregada</translation>
     </message>
@@ -4458,59 +4144,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Enviar Moedas</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>O InstantX não suporta valores tão elevados neste momento. As transacções estão limitadas a %n DASH.</numerusform>
-            <numerusform>O InstantX não suporta valores tão elevados neste momento. As transacções estão limitadas a %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Exportar</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exportar os dados do separador actual para um ficheiro</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Criar Cópia de Segurança da Carteira</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Dados da Carteira (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>A Cópia de Segurança Falhou</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Ocorreu um erro ao tentar criar cópia de segurança da carteira para %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Cópia de Segurança Criada com Sucesso</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Os dados da carteira foram gravados com sucesso em %1.</translation>
     </message>
@@ -4518,1369 +4203,1418 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, necessita colocar uma entrada rpcpassword no ficheiro de configuração:
-%s
-É recomendados que utilize a seguinte palavra-passe aleatória:
-rpcuser=dashrpc
-rpcpassword=%s
-(não necessita decorar esta palavra-passe)
-O nome de utilizador e a palavra-passe não podem ser iguais.
-Se o ficheiro não existe, crie-o só com permissões de leitura para o dono.
-Também é recomendado que configure o sistema de alertas para poder ser avisado de problemas;
-exemplo: alertnotify=echo %%s | mail -s &quot;Alerta Dash&quot; admin@foo.com</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Cifras suportadas (omissão: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Ocorreu um erro ao configurar a porta RPC %u para aceitar ligações em IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Ocorreu um erro ao configurar a porta RPC %u para aceitar ligações em IPv6, a reverter para IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Vincular a um determinado endereço e ouvir sempre aí. Use a notação [endereço]:porta para IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Não foi possível obter acesso exclusivo à pasta de dados %s. Possivelmente o Dash Core já se encontra em execução.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Continuamente limitar o número de transacções gratuitas por minuto a &lt;n&gt;*1000 bytes (omissão: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>O Darksend usa denominações exactas para enviar fundos, pode necessitar simplesmente de anonimizar mais algumas moedas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Desactivar todas as funcionalidades relacionadas com Masternodes e Darksend (0-1, omissão:0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Activar instantx, mostrar confirmações para transacções bloqueadas (bool, omissão: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Activar o uso de darksend automatizado para os fundos guardados nesta carteira (0-1, omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entrar no modo de testes de regressão, que usa uma cadeia de blocos especial onde cada bloco é resolvido instantaneamente. O objectivo ser usado com ferramentas de testes de regressão e no desenvolvimento da aplicação.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Entrar no modo de testes de regressão, que usa uma cadeia de blocos especial onde cada bloco é resolvido instantaneamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Erro: A escuta por ligações de entrada falhou (a escuta devolveu o erro %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erro: A transacção foi rejeitada! Isto pode acontecer se algumas das moedas da sua carteira tiverem sido gastas, tal como se usou uma copia do ficheiro wallet.dat e moedas tiverem sido gastas nessa cópia mas não aqui.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erro: Esta transacção necessita de uma taxa de pelo menos %s devido à quantia, complexidade ou uso de fundos recebidos recentemente!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Erro: Carteira desbloqueada somente para anonimização, não foi possível criar a transacção.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Executar comando quando é recebido um alerta ou vemos uma longa bifurcação na cadeia de blocos (%s no comando é substituído pela mensagem)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Executar comando quando muda uma transacção na carteira (%s no comando é substituído pelo TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Executar comando quando o melhor bloco muda (%s no comando é substituído pela hash do bloco)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Taxas inferiores a esta serão consideradas zero (para a criação da transacção) (omissão:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Consolidar a actividade de dados de memoria para disco a cada &lt;n&gt; megabytes (omissão: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Foram encontradas saídas denominadas não confirmadas, a aguardar pela confirmação para prosseguir.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Quão minuciosa é a verificação dos blocos do -checkblocks (0-4, omissão: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Neste modo o -genproclimit controla quantos blocos são gerados imediatamente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>O InstantX necessita de entradas com pelo menos 6 confirmações, pode ser necessário aguardar mais uns minutos e tentar de novo.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Escutar por ligações JSON-RPC na porta &lt;port&gt; (omissão: 9998 ou rede de testes: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Nome para construir o url para a entrada KeePass que guarda a palavra-passe da carteira</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Número de segundos a não permitir ligações de nós com comportamento inadequado (omissão: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Informação de depuração de saída (omissão: 0, fornecer &lt;category&gt; é opcional)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Providenciar liquidez para o Darksend misturando moedas continuamente com baixa frequência (0-100, omissão: 0, 1=muito frequente taxas elevadas, 100=pouco frequente, taxas reduzidas)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Questionar por endereços dos nós através de pesquisas DNS caso tenha poucos endereços (omissão: 1 excepto -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Definir endereço:porta externo para ligação a este masternode (ex: endereço:porta)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Definir tamanho máximo de transacções com alta-prioridade/taxa-reduzida em bytes (omissão: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Definir número de processos de verificação de scripts (%u a %d, 0 = auto, &lt;0 = deixar este número de cores livres, omissão: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Definir o limite de processador quando a geração está activa (-1 = ilimitado, omissão: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Mostrar N confirmações para uma transacção bloqueada com sucesso (0-9999, omissão:1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Esta é uma compilação prévia de teste - use por sua conta e risco - não use para minar nem em aplicações comerciais</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Não foi possível vincular a %s neste computador. Provavelmente o Dash Core já está a ser executado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Não foi possível localizar fundos Darksend denominados suficientes para esta transacção.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Não foi possível localizar fundos Darksend não denominados suficientes para esta transacção que não sejam igual a 1000DRK.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Não foi possível localizar fundos Darksend não denominados suficientes para esta transacção.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Usar um proxy SOCKS5 diferente para ligar aos nós através dos serviços escondidos Tor (omissão: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Aviso: -paytxfee tem um valor muito elevado! Esta é a taxa de transacção que será paga se enviar uma transacção.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Aviso: Por favor verifique que a data e a hora do computador está correcta! Se o relógio estiver errado o Dash não vai funcionar correctamente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Aviso: A rede não parece estar concordar! Parece haver alguns mineiros com problemas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Aviso: Parece que não estamos de acordo com outros nós! Talvez necessite actualizar a aplicação ou os outros nós necessitem actualizar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Aviso: erro ao carregar wallet.dat! Todas as chaves estão correctas mas os dados das transacções ou as entradas do livro de endereços podem estar ausentes ou incorrectas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Aviso: wallet.dar corrompido mas os dados foram recuperados! A carteira original foi gravada como wallet{data/hora}.bak in %s; se o seu saldo ou transacções forem incorrectos deverá recuperar a partir de uma cópia de segurança.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Deve definir rpcpassword=&lt;password&gt; no ficheiro de configuração:
-%s
-Se o ficheiro não existir, deve criá-lo só com permissões de leitura para o dono.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Tem que especificar uma masternodeprivkey na configuração. Por favor verifique a documentação para ajuda.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(omissão: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(omissão: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; pode ser:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar comandos da linha de comandos e JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Aceitar ligações do exterior (omissão: 1 se não tiver usado -proxy ou -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Adicionar um nó ao qual efectuar ligação e tentar manter a ligação aberta</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Permitir pesquisas de DNS para -addnode, -deednode e -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Permitir ligações JSON-RPC a partir do endereço IP especificado</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Entrada existente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Questionar sempre por endereços de nós através de pesquisas DNS (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tentar recuperar as chaves privadas a partir de um ficheiro wallet.dat corrompido</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Opções de criação de blocos:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Não é possível denominar: não existem mais entradas compatíveis.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Não é possível reverter para uma versão anterior da carteira</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Não foi possível resolver endereço de vínculo: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Não foi possível resolver endereço -externalip: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Não foi possível escrever endereço por omissão</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Limpar lista de transacções da carteira (ferramenta de diagnóstico; implica -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>O colateral não é válido.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Colateral inválido.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Ligar apenas ao(s) nó(s) especificados</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Ligar através de proxy SOCKS</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Ligar ao JSON-RPC na porta &lt;port&gt; (omissão: 9998 ou rede de testes: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Ligar ao KeePassHttp na porta &lt;port&gt; (omissão: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Efectuar ligação a um nó para obter os endereços de outros clientes e desligar</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Opções de ligação:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Detectada corrupção na base de dados dos blocos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Serviço Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Versão do cliente RPC Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>O Darksend encontra-se desactivado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Opções Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Opções de Depuração/Teste</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Desabilitar modo de segurança, sobrepõe-se a um evento real de modo de segurança (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Descobrir endereço de IP próprio (omissão: 1 quando em escuta e -externalip não definido)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Não carregar a carteira e desabilitar as chamadas RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Quer reconstruir agora a base de dados dos blocos?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Carregamento completo</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>A diminuir o nível e tentar de novo.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Permitir ao cliente actuar como um masternode (0-1, omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Entradas completas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Erro ao ligar ao masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Erro ao inicializar a base de dados dos blocos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Erro ao inicializar o ambiente de base de dados da carteira %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Erro ao carregar base de dados de blocos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Erro ao carregar wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erro ao carregar wallet.dat: A carteira está corrompida</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Erro ao carregar wallet.dat: A carteira necessita de uma versão Dash mais recente</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Erro ao abrir base de dados de blocos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Erro ao ler da base de dados, a encerrar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Erro ao recuperar chave pública.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Erro</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Erro: Pouco espaço em disco!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erro: Carteira bloqueada, não foi possível criar a transacção!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Erro: Já tem entradas pendentes no conjunto Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Erro: erro de sistema:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Falhou a escuta em qualquer porta. Use -listen=0 se é isto que deseja.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Falha ao ler informação de bloco</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Falha ao ler bloco</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Falha ao sincronizar o índice de blocos</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Se a &lt;category&gt; não for fornecida, mostrar toda a informação de depuração.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Falha ao escrever índice de blocos</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Falha ao escrever informação de bloco</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Falha ao escrever bloco</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Falha ao escrever informação de ficheiro</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Falha ao escrever na base de dados de moedas</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Falha ao escrever o índice de transacções</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Falha ao escrever dados de recuperação</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Taxa por kB a adicionar à transacção que vai enviar</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Taxas inferiores a esta serão consideradas zero (para retransmissão) (omissão:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forçar modo de segurança (omissão: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Gerar moedas (omissão: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Obter ajuda para um comando</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Quanto blocos deve verificar no arranque (omissão: 288, 0 = all)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Se a &lt;category&gt; não for fornecida, mostrar toda a informação de depuração.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ignorar masternodes com versão inferior a (ex: 70050; omissão: 0)</translation>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>A importar...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Importa blocos a partir de ficheiros blk000??.dat externos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Modo incompatível.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Versão incompatível.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Bloco original não encontrado ou incorrecto. Pasta de dados errada para esta rede?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Informação</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>A verificação de consistência no arranque falhou. O Dash Core está a encerrar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>A entrada não é válida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>Opções InstantX</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Fundos insuficientes</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Fundos insuficientes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Endereço -onion inválido: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Endereço -proxy inválido: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Quantia inválida para -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Quantia inválida para -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Quantia inválida</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>masternodeprivkey inválida. Por favor reveja a documentação.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Chave privada inválida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Script inválido detectado.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>Identificador KeePassHttp para a associação estabelecida</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>Chave KeePassHttp para usar na comunicação cifrada AES com o KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Manter N dash anonimizadas (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Manter no máximo &lt;n&gt; blocos não conectáveis em memória (omissão: %u)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Manter no máximo &lt;n&gt; transacções não conectáveis em memória (omissão: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>O último Darksend é muito recente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>A última acção de Darksend é muito recente.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limitar o tamanho da cache de assinaturas a &lt;n&gt; elementos (omissão: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Listar comandos</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Escutar ligações na &lt;port&gt; (omissão: 9999 ou rede de testes: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>A carregar endereços...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>A carregar índice de blocos...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">A carregar lista de masternodes...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>A carregar carteira... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>A carregar carteira...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Salvar prioridade e taxa da transacção por kB quando minar blocos (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Manter um índice completo de transacções (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Manter no máximo &lt;n&gt; ligações a outros nós (omissão: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Opções de masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>A fila do masternode está cheia.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Tamanho máximo da memória intermédia de recepção por ligação, &lt;n&gt;*1000 bytes (omissão: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tamanho máximo da memória intermédia de envio por ligação, &lt;n&gt;*1000 bytes (omissão: 1000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>A informação da transacção de entrada não foi encontrada.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Nenhum masternode compatível encontrado.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>Não foram detectados fundos a necessitar de denominação.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Nenhum masternode detectado.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>Não foram encontradas denominações correspondentes para misturar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Detectada chave pública fora do padrão.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Não é compatível com as transacções existentes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Número insuficiente de descritores de ficheiros disponíveis.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Não se encontra na lista de masternodes.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Somente aceitar pontos de inspecção apropriados presentes na cadeia de blocos (omissão: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Somente ligar a nós na rede &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Opções:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Palavra-passe para as ligações JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Adicionar data/hora à informação de depuração (omissão: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimir bloco ao iniciar se existir no índice de blocos</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimir árvore de blocos ao iniciar (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Opções RPC SSL: (para instruções de configuração SSL dirija-se à Dash Wiki)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Opções do cliente RPC:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>Opções do servidor RPC:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Ignorar aleatoriamente 1 de cada &lt;n&gt; mensagens da rede</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Esfiapar aleatoriamente 1 de cada &lt;n&gt; mensagens da rede</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir o índice da cadeia de blocos a partir dos ficheiros actuais blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Examinar novamente a cadeia de blocos para encontrar transacções inexistentes na carteira</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>A examinar novamente...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Executar periodicamente um processo para consolidar a carteira (omissão: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Executar em segundo plano como um serviço e aceitar comandos</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Opções SSL: (ver o Wiki Dash para obter instruções de configuração SSL)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Seleccionar a versão para o -proxy (4 ou 5, omissão: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Enviar comando para o Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Enviar comandos para o nó que corre em &lt;ip&gt; (omissão: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Enviar informação de execução/depuração para a consola em vez de enviar para o ficheiro debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Ficheiro de certificado do servidor (omissão: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Chave privada do servidor (omissão: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Sessão incompleta!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>A sessão excedeu o tempo limite (30 segundos), por favor volte a enviar.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Define o tamanho máximo da cache de dados em megabytes (%d até %d, omissão %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Define o tamanho do conjunto de chaves para &lt;n&gt; (omissão: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Define o tamanho máximo do bloco em bytes (omissão %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Define o tamanho mínimo do bloco em bytes (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Define a chave privada do masternode</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Define o número de threads que processam os pedidos RPC (omissão: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Activa a opção DB_PRIVATE no ambiente de dados da carteira (omissão: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Mostrar todas as opções de depuração (uso: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Mostrar informação de referência (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Diminuir o ficheiro debug.log ao iniciar o cliente (omissão: 1 quando não usa opção -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>A assinatura falhou.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>A assinatura excedeu o tempo limite, por favor volte a enviar.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>A assinatura da transacção falhou</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Especificar ficheiro de configuração (omissão: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Especificar o limite de tempo de ligação em milissegundos (omissão: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Especificar a pasta de dados</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Especificar o ficheiro de configuração de masternodes (omissão: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Especificar o ficheiro pid (omissão: dashd.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Especificar o ficheiro da carteira (dentro da pasta de dados)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Especificar o seu endereço público</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Gastar o troco não confirmado ao enviar transacções (omissão: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Iniciar o Serviço Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Erro de sistema:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Esta mensagem de ajuda</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Esta opção destina-se a ferramentas de testes de regressão e desenvolvimento de aplicativos.</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Este não é um masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Limiar para desligar nós com comportamento inadequado (omissão: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Para usar a opção %s</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Esta opção destina-se a ferramentas de testes de regressão e desenvolvimento de aplicativos.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Quantia da transacção demasiado pequena</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>As quantias da transacção tem que ser positivas</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transacção criada com sucesso.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>As taxas da transacção são demasiado elevadas.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>A transacção não é válida.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transacção demasiado grande</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Não foi possível vincular a %s neste computador (o vínculo retornou o erro %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Não foi possível assinar o masternode vencedor para pagamento, chave incorrecta?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Não foi possível vincular a %s neste computador (o vínculo retornou o erro %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Não foi possível assinar a mensagem spork, chave incorrecta?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Versão solicitada de proxy -socks desconhecida: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Rede especificada desconhecida em -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Actualizar carteira para o formato mais recente</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Utilização (obsoleta, use dash-cli):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Utilização:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Usar integração KeePass 2 usando o KeePassHttp plugin (omissão: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Usar N masternodes distintos para anonimizar fundos (2-8, omissão: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Actualizar carteira para o formato mais recente</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Usar OpenSSl (https) para as ligações JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Usar UPnP para mapear a porta de entrada (omissão: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Usar UPnP para mapear a porta de entrada (omissão: 1 quando em escuta)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Usar a rede de testes</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Utilizador para as ligações JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Valor mais elevado do que o máximo permitido pelo Darksend.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>A verificar blocos...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>A verificar carteira...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Aguarde o inicio do servidor RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>A carteira %s encontra-se fora da pasta de dados %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>A carteira encontra-se bloqueada.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>A carteira necessita ser rescrita: reinicie o Dash para concluir</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Opções da carteira:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Aviso</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Aviso: Argumento -debugnet obsoleto e ignorado, utilize -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Aviso: Esta versão é obsoleta, actualização necessária!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Necessita reconstruir a base de dados usando -reindex para alterar -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>A apagar todas as transacções da carteira...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>no arranque</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>versão</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompido, recuperação falhou</translation>
     </message>
diff --git a/src/qt/locale/dash_ru.ts b/src/qt/locale/dash_ru.ts
index d3a100a29a03..ec36b5d01923 100644
--- a/src/qt/locale/dash_ru.ts
+++ b/src/qt/locale/dash_ru.ts
@@ -1,207 +1,143 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE TS>
-<TS version="2.1" language="ru">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>О Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>Версия &lt;b&gt;Dash Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-YYYY The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation type="vanished">Copyright &amp;copy; 2009-2014 Разработчики Bitcoin Core.
-Copyright &amp;copy; 2014-YYYY Разработчики Dash Core.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Это экспериментальное ПО.
-
-Распространяется под лицензией MIT/X11, см. приложенный файл COPYING или http://www.opensource.org/licenses/mit-license.php.
-
-Этот продукт включает ПО, разработанное проектом OpenSSL Project для использования в OpenSSL Toolkit (http://www.openssl.org/), криптографическое ПО, написанное Eric Young (eay@cryptsoft.com) и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Copyright</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Разработчики Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Разработчики Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-бит)</translation>
-    </message>
-</context>
+<TS version="2.0" language="ru">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Для того, чтобы изменить адрес или метку, дважды кликните по изменяемому объекту</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Для того, чтобы изменить адрес или метку, кликните по изменяемому объекту правой кнопкой мыши</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Создать новый адрес</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Новый</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Копировать текущий выделенный адрес в буфер обмена</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Копировать</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Удалить выбранный адрес из списка</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Удалить</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Экспортировать данные из вкладки в файл</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Экспорт</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>&amp;Закрыть</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Выберите адрес для отправки на него монет</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Выберите адрес для получения монет</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>&amp;Выбрать</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Адреса отправки</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Адреса получения</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Это ваши адреса Dash для отправки платежей. Всегда проверяйте количество и адрес получателя перед отправкой перевода.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Это ваши адреса Dash для приёма платежей. Рекомендуется использовать новый адрес получения для каждой транзакции.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Копировать адрес</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Копировать &amp;метку</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Правка</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Экспортировать список адресов</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Текст, разделённый запятыми (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Экспорт не удался</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Произошла ошибка при сохранении адресной книги в %1.</translation>
+        <translation>Произошла ошибка при сохранении адресной книги в %1. Пожалуйста, попробуйте еще раз.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Метка</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(нет метки)</translation>
     </message>
@@ -209,154 +145,150 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Диалог ввода пароля</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Введите пароль</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Новый пароль</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Повторите новый пароль</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Служит для простейшего отключения функции sendmoney в случае компрометации аккаунта ОС. Не обеспечивает существенной безопасности.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Только для анонимизации</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Введите новый пароль бумажника.&lt;br/&gt;Используйте пароль, состоящий из &lt;b&gt;10 или более случайных символов&lt;/b&gt; или &lt;b&gt;восьми или более слов&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Введите новый пароль кошелька.&lt;br/&gt;Используйте пароль, состоящий из &lt;b&gt;десяти или более случайных символов&lt;/b&gt; или &lt;b&gt;восьми или более слов&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
-        <translation>Зашифровать бумажник</translation>
+        <translation>Зашифровать кошелёк</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Для выполнения операции разблокирования требуется пароль вашего бумажника.</translation>
+        <translation>Для выполнения операции разблокирования требуется пароль вашего кошелька.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
-        <translation>Разблокировать бумажник</translation>
+        <translation>Разблокировать кошелёк</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Для выполнения операции расшифрования требуется пароль вашего бумажника.</translation>
+        <translation>Для выполнения операции расшифровки требуется пароль вашего кошелька.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
-        <translation>Расшифровать бумажник</translation>
+        <translation>Расшифровать кошелёк</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Сменить пароль</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
-        <translation>Введите старый и новый пароль для бумажника.</translation>
+        <translation>Введите старый и новый пароль для кошелька.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
-        <translation>Подтвердите шифрование бумажника</translation>
+        <translation>Подтвердите шифрование кошелька</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
-        <translation>Внимание: если Вы зашифруете бумажник и потеряете пароль, вы &lt;b&gt;ПОТЕРЯЕТЕ ВСЕ ВАШИ ДАШИ&lt;/b&gt;!</translation>
+        <translation>Внимание: если Вы зашифруете кошелёк и потеряете пароль, вы &lt;b&gt;ПОТЕРЯЕТЕ ВСЕ ВАШИ DASH&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
-        <translation>Вы уверены, что хотите зашифровать ваш бумажник?</translation>
+        <translation>Вы уверены, что хотите зашифровать ваш кошелёк?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
-        <translation>Бумажник зашифрован</translation>
+        <translation>Кошелёк зашифрован</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
-        <translation>Сейчас программа закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши даши от кражи с помощью инфицирования вашего компьютера вредоносным ПО.</translation>
+        <translation>Сейчас программа закроется для завершения процесса шифрования. Помните, что шифрование вашего кошелька не может полностью защитить ваши даши от кражи с помощью инфицирования вашего компьютера вредоносным ПО.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>ВАЖНО: все предыдущие резервные копии вашего бумажника должны быть заменены новым зашифрованным файлом. В целях безопасности предыдущие резервные копии незашифрованного бумажника станут бесполезны, как только вы начнёте использовать новый зашифрованный бумажник.</translation>
+        <translation>ВАЖНО: все предыдущие резервные копии вашего кошелька должны быть заменены новым зашифрованным файлом. В целях безопасности предыдущие резервные копии незашифрованного кошелька станут бесполезны, как только вы начнёте использовать новый зашифрованный кошелёк.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
-        <translation>Не удалось зашифровать бумажник</translation>
+        <translation>Не удалось зашифровать кошелёк</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
-        <translation>Шифрование бумажника не удалось из-за внутренней ошибки. Ваш бумажник не был зашифрован.</translation>
+        <translation>Шифрование кошелька не удалось из-за внутренней ошибки. Ваш кошелёк не был зашифрован.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Введённые пароли не совпадают.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
-        <translation>Разблокировка бумажника не удалась</translation>
+        <translation>Разблокировка кошелька не удалась</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Указанный пароль не подходит.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
-        <translation>Расшифрование бумажника не удалось</translation>
+        <translation>Расшифрование кошелька не удалось</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
-        <translation>Пароль бумажника успешно изменён.</translation>
+        <translation>Пароль кошелька успешно изменён.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Внимание: включен Caps Lock!</translation>
     </message>
@@ -364,449 +296,454 @@ This product includes software developed by the OpenSSL Project for use in the O
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
-        <location filename="../bitcoingui.cpp" line="814"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
-        <translation>Бумажник</translation>
+        <translation>Кошелёк</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Узел</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[тестовая сеть]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Обзор</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="251"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
-        <translation>Показать общий обзор действий с бумажником</translation>
+        <translation>Показать общий обзор действий с кошельком</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Отправить</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="262"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Отправить монеты на указанный адрес Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Получить</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="273"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Запросить платежи (создать QR-коды и dash: URI)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Транзакции</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="284"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Показать историю транзакций</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>В&amp;ыход</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="308"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Закрыть приложение</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>О &amp;Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Показать информацию о Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="312"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Показать информацию о Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="315"/>
-        <location filename="../bitcoingui.cpp" line="317"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>О &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="319"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Показать информацию о Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Настройки...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="322"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Изменить параметры конфигурации Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Показать / Скрыть</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="325"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Показать или скрыть главное окно</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
-        <translation>За&amp;шифровать бумажник...</translation>
+        <translation>За&amp;шифровать кошелёк...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="328"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Зашифровать закрытые ключи, содержащиеся в вашем бумажнике</translation>
+        <translation>Зашифровать закрытые ключи, содержащиеся в вашем кошельке</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
-        <translation>&amp;Сделать резервную копию бумажника...</translation>
+        <translation>&amp;Сделать резервную копию кошелька...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
-        <translation>Сделать резервную копию бумажника в другом месте</translation>
+        <translation>Сделать резервную копию кошелька в другом месте</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Изменить пароль...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
-        <translation>Изменить пароль шифрования бумажника</translation>
+        <translation>Изменить пароль шифрования кошелька</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
-        <translation>&amp;Разблокировать бумажник...</translation>
+        <translation>&amp;Разблокировать кошелёк...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
-        <translation>Разблокировать бумажник</translation>
+        <translation>Разблокировать кошелёк</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
-        <translation>За&amp;блокировать бумажник</translation>
+        <translation>За&amp;блокировать кошелёк</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>П&amp;одписать сообщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Подписать сообщения вашими адресами Dash, чтобы доказать, что вы ими владеете</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>П&amp;роверить сообщение...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="340"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Проверить сообщения, чтобы удостовериться, что они были подписаны определёнными адресами Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Показать диагностическую информацию</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Консоль отладки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Открыть консоль отладки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Монитор сети</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Показать монитор сети</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>&amp;Peers list</source>
-        <translation type="unfinished"></translation>
+        <translation>Список &amp;пиров</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="349"/>
+        <location line="+1"/>
         <source>Show peers info</source>
-        <translation type="unfinished"></translation>
+        <translation>Показать информацию о пирах</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>&amp;Ремонт кошелька</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Показать варианты ремонта кошелька</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Открыть файл &amp;настроек</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Открыть файл настроек</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Показать автоматические резервные &amp;копии</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Показать автоматически созданные резервные копии кошелька</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>Адреса &amp;отправки...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="354"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Показать список использованных адресов отправки и их меток</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Адреса &amp;получения...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Показать список использованных адресов получения и их меток</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Открыть &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="359"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Открыть dash: URI или запрос платежа</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="361"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Параметры командной строки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="555"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Клиент Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="734"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
+        <translation>
+            <numerusform>Обработано %n блок из истории транзакций.</numerusform>
+            <numerusform>Обработано %n блока из истории транзакций.</numerusform>
+            <numerusform>Обработано %n блоков из истории транзакций.</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="363"/>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
         <translation>Показать помощь о Dash Core со списком возможных параметров командной строки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="399"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Файл</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="413"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Настройки</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="426"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Инструменты</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="435"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Помощь</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="446"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Панель вкладок</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Клиент Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="699"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
         <translation>
             <numerusform>%n активное соединение с сетью Dash</numerusform>
+            <numerusform>%n активных соединения с сетью Dash</numerusform>
             <numerusform>%n активных соединений с сетью Dash</numerusform>
             <numerusform>%n активных соединений с сетью Dash</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="714"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Синхронизация с сетью...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Выполняется импорт блоков с диска...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="720"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Идёт переиндексация блоков на диске...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="724"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Источник блоков недоступен...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Обработано %1 блоков из истории транзакций.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="739"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Синхронизировано</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="760"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
         <translation>
             <numerusform>%n час</numerusform>
             <numerusform>%n часа</numerusform>
             <numerusform>%n часов</numerusform>
+            <numerusform>%n часов</numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="764"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
         <translation>
             <numerusform>%n день</numerusform>
             <numerusform>%n дня</numerusform>
             <numerusform>%n дней</numerusform>
+            <numerusform>%n дней</numerusform>
         </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="768"/>
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
         <translation>
             <numerusform>%n неделя</numerusform>
             <numerusform>%n недели</numerusform>
             <numerusform>%n недель</numerusform>
+            <numerusform>%n недель</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 и %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="774"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
         <translation>
             <numerusform>%n год</numerusform>
-            <numerusform>%n лет</numerusform>
             <numerusform>%n года</numerusform>
+            <numerusform>%n лет</numerusform>
+            <numerusform>%n лет</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="778"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 позади</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="783"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Синхронизируется...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="799"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Последний полученный блок был сгенерирован %1 назад.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="801"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Транзакции после этого времени пока видны не будут.</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="828"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="831"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Внимание</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="834"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Информация</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="908"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Исходящая транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="908"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Входящая транзакция</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="909"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -819,30 +756,25 @@ Address: %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="979"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
-        <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;разблокирован&lt;/b&gt;</translation>
+        <translation>Кошелёк &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;разблокирован&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="989"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
-        <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в данный момент &lt;b&gt;разблокирован&lt;/b&gt; только для целей анонимизации</translation>
+        <translation>Кошелёк &lt;b&gt;зашифрован&lt;/b&gt; и в данный момент &lt;b&gt;разблокирован&lt;/b&gt; только для целей анонимизации</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="999"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
-        <translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;заблокирован&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Произошла критическая ошибка. Дальнейшая безопасная работа Dash невозможна, приложение будет закрыто.</translation>
+        <translation>Кошелёк &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;заблокирован&lt;/b&gt;</translation>
     </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Сетевая тревога</translation>
     </message>
@@ -850,333 +782,302 @@ Address: %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Выбор адресов с помощью функции контроля монет</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Количество:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Байт:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Сумма:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Приоритет:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Комиссия:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Малый выход:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Выбор монет</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Пыль:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>После комиссии:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Сдача:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>Выбрать все/ничего</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Режим дерева</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Режим списка</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 заблокировано)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Сумма</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Получено на метку</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
+        <translation>Получено на адрес</translation>
     </message>
     <message>
-        <source>Label</source>
-        <translation type="vanished">Метка</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Адрес</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Раундов Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Подтверждений</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Подтверждено</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Приоритет</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Копировать адрес</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Копировать метку</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Скопировать сумму</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Скопировать ID транзакции</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Заблокировать непотраченное</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Разблокировать непотраченное</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Копировать количество</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Копировать комиссию</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Копировать после комиссии</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Копировать байты</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Копировать приоритет</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Скопировать малый выход</translation>
+        <translation>Скопировать пыль</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Копировать сдачу</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Выбраны неанонимизированные средства. &lt;b&gt;Darksend будет отключен.&lt;/b&gt;&lt;br&gt;&lt;br&gt;Если Вы все-таки хотите использовать Darksend, пожалуйста, снимите выделение с со всех неанонимизированных средств и заново поставьте галочку напротив Darksend.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>самый высокий</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>выше высокого</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>высокий</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>выше среднего</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Может отличаться на +/- %1 сатоши на каждый вход.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>н/д</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>средний</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>ниже среднего</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>низкий</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>ниже низкого</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>самый низкий</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 заблокировано)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>нет</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Пыль</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>да</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>нет</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Эта метка становится красной, если размер транзакции больше 1000 байт.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Это значит, что требуется комиссия как минимум %1 на КБ.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Может отличаться на +/- 1 байт на каждый вход.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Транзакции с более высоким приоритетом имеют больше шансов на включение в блок.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Эта метка становится красной, если приоритет ниже, чем &quot;средний&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Эта метка становится красной, если какой-либо из адресатов получает сумму менее %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Это означает, что требуется комиссия как минимум %1.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Суммы меньшие, чем 0.546 умноженное на минимальную комиссию, показываются как &quot;Пыль&quot;.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Эта метка становиться красной в случае, если сдача меньше %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(нет метки)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>сдача с %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(сдача)</translation>
     </message>
@@ -1184,84 +1085,84 @@ Address: %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Настройте Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Обычная приватность</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Высокая приватность</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Максимальная приватность</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Пожалуйста, выберите уровень приватности.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Использовать 2 отдельные мастерноды для перемешивания до 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Использовать 8 отдельных мастернод для перемешивания до 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Использовать 16 отдельных мастернод</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Это самый быстрый вариант, анонимизация 1000 DASH будет стоить вам примерно 0.025 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Это относительно быстрый вариант, анонимизация 1000 DASH будет стоить вам примерно 0.05 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH за каждые анонимизированные 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Этот самый медленный и безопасный вариант. Анонимизация будет стоить</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Настройки Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend успешно установлен в режим обычной приватности (%1 и 2 раунда). Вы можете изменить это в любое время, используя окно настроек.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend успешно установлен в режим высокой приватности (%1 и 8 раундов). Вы можете изменить это в любое время, используя окно настроек.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend успешно установлен в режим максимально приватности (%1 и 16 раундов). Вы можете изменить это в любое время, используя окно настроек.</translation>
     </message>
@@ -1269,67 +1170,67 @@ Address: %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Изменить адрес</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Метка</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Метка, связанная с этой записью списка адресов</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Адрес</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Адрес, связанный с этой записью списка адресов. Он может быть изменён только для адресов отправки.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Новый адрес для получения</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Новый адрес для отправки</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Изменение адреса для получения</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Изменение адреса для отправки</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>Введённый адрес &quot;%1&quot; не является правильным адресом Dash.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Введённый адрес &quot;%1&quot; уже находится в адресной книге.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
-        <translation>Не удается разблокировать бумажник.</translation>
+        <translation>Не удается разблокировать кошелёк.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Генерация нового ключа не удалась.</translation>
     </message>
@@ -1337,27 +1238,27 @@ Address: %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Будет создан новый каталог данных.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>имя</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Каталог уже существует. Добавьте %1, если вы хотите создать здесь новый каталог.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Путь уже существует и не является каталогом.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Не удаётся создать здесь каталог данных.</translation>
     </message>
@@ -1365,72 +1266,68 @@ Address: %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - параметры командной строки</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>версия</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-бит)</translation>
+        <translation>(%1-бит)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">О Dash Core</translation>
+        <translation>О Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="66"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Параметры командной строки</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="67"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Использование:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>параметры командной строки</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Настройки интерфейса</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Выбрать каталог данных при запуске (по умолчанию: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="74"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Выберите язык, например &quot;de_DE&quot; (по умолчанию: как в системе)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="75"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Запускать свёрнутым</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="76"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Указать корневые SSL-сертификаты для запроса платежа (по умолчанию: -system-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="77"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Показывать заставку при запуске (по умолчанию: 1)</translation>
     </message>
@@ -1438,109 +1335,85 @@ Address: %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Добро пожаловать</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Добро пожаловать в Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Так как вы впервые запустили программу, вы можете выбрать, где Dash Core будет хранить данные.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
-        <translation>Dash Core скачает и сохранит копию цепочки блоков. Как минимум %1ГБ данных будет храниться в этом каталоге и размер данных будет со временем расти. В этом же каталоге будет сохранён бумажник.</translation>
+        <translation>Dash Core скачает и сохранит копию цепочки блоков. Как минимум %1ГБ данных будет храниться в этом каталоге и размер данных будет со временем расти. В этом же каталоге будет сохранён кошелёк.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Использовать каталог данных по умолчанию</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Использовать другой каталог данных:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Ошибка: не удалось создать указанный каталог данных &quot;%1&quot;.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ошибка: не удалось создать указанный каталог данных &quot;%1&quot;.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">ГБ свободного места</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>доступно %1 ГБ свободного места</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(из требующихся %1ГБ)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(из требующихся %1 ГБ)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Открыть URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Открыть запрос платежа из URI или файла</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Выбрать файл запроса платежа</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Выберите файл запроса платежа</translation>
     </message>
@@ -1548,313 +1421,281 @@ Address: %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Настройки</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Главная</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Автоматически запускать Dash после входа в систему.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Запускать Dash при входе в систему</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Размер кэша &amp;БД</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>МБ</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Число потоков проверки &amp;сценария</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = автоматически, &lt;0 = оставить столько незагруженных ядер)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Эта настройка определяет количество отдельных мастернод, через которые пройдет анонимизация. Чем больше роундов, тем выше степень конфиденциальности, но также выше и суммарная стоимость комиссий&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Количество раундов Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Это пороговое значение, при достижении которого автоматическое перемешивание отключается.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Сумма постоянно анонимизированных Dash</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
-        <translation>Б&amp;умажник</translation>
+        <translation>К&amp;ошелёк</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Принимать подключения извне</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Принимать входящие подключения</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Подключаться к сети Dash через прокси SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Подключаться через прокси SOCKS5 (прокси по умолчанию):</translation>
     </message>
     <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Необязательная комиссия за каждый КБ транзакции, которая ускоряет обработку Ваших транзакций.  Большинство транзакций занимают 1КБ.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Заплатить ко&amp;миссию</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Настройки для опытных пользователей</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Показывать ли функции контроля монет или нет.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Включить функции &amp;контроля монет</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Тратить неподтверждённую сдачу</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Сеть</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Автоматически открыть порт для клиента Dash на роутере. Работает только в том случае, если Ваш роутер поддерживает UPnP и данная функция включена.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Пробросить порт через &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Подключаться к сети Dash через прокси SOCKS5.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Подключаться через прокси SOCKS5 (прокси по умолчанию):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP Прокси: </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>IP-адрес прокси (например, IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>По&amp;рт: </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Порт прокси-сервера (например, 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">&amp;Версия SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Версия SOCKS-прокси (например, 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Окно</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>После сворачивания окна показывать только иконку в системном лотке.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Cворачивать в системный лоток вместо панели задач</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Сворачивать вместо закрытия. Если данная настройка будет выбрана, то приложение закроется только после выбора пункта меню Завершить.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>С&amp;ворачивать при закрытии</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>О&amp;тображение</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Язык интерфейса:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>Здесь можно выбрать язык интерфейса. Настройки вступят в силу после перезапуска Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Нет Вашего языка или перевод неполон? Помогите нам сделать перевод лучше:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Тема интерфейса:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Отображать суммы в единицах: </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Выберите единицу измерения монет при отображении и отправке.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Показывать ли адреса Dash в списке транзакций или нет.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Показывать адреса в списке транзакций</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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 (например, block explorer), которые отображаются на вкладке транзакций как пункты контекстного меню. %s в URL заменяется хэшем транзакции. URL отделяются друг от друга вертикальной чертой |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>Сторонние URL для транзакций</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Активные параметры командной строки, которые перекрывают вышеуказанные настройки:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Сбросить все настройки клиента на значения по умолчанию.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Сбросить настройки</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>О&amp;тмена</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>по умолчанию</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>нет</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Подтвердите сброс настроек</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Для применения изменений требуется перезапуск клиента.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Клиент будет выключен, хотите продолжить?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Это изменение потребует перезапуска клиента.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Адрес прокси неверен.</translation>
     </message>
@@ -1862,512 +1703,406 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Форма</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Бумажник</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
-        <translation>Отображаемая информация может быть устаревшей. Ваш бумажник автоматически синхронизируется с сетью Dash после подключения, но этот процесс пока не завершён.</translation>
+        <translation>Отображаемая информация может быть устаревшей. Ваш кошелёк автоматически синхронизируется с сетью Dash после подключения, но этот процесс пока не завершён.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Доступно:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Ваш текущий баланс, доступный для расходования</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>В ожидании:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Общая сумма всех транзакций, которые до сих пор не подтверждены и еще не учитываются в балансе, доступном для расходования</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Незрелые:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Баланс добытых монет, который ещё не созрел</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Балансы</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Неподтвержденные транзакции на адреса для просмотра</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Баланс добытых монет на адресах для просмотра, который ещё не созрел</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Итого:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Ваш текущий общий баланс</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Текущий полный баланс на адресах для просмотра</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Для просмотра:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Ваш текущий баланс на адресах для просмотра</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Доступно для расхода:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Статус:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Включен/Выключен</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Завершение:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Баланс Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Сумма и раунды:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 раундов</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Отправленные номиналы:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Номиналы, предоставленные Вами мастерноде. Для перемешивания другие пользователи должны предоставить точно такой же набор номиналов.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>н/д</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="497"/>
-        <location filename="../overviewpage.cpp" line="511"/>
-        <location filename="../overviewpage.cpp" line="525"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Недавние транзакции</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Начать/остановить автоматическое перемешивание</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Номиналы, предоставленные Вами мастерноде.&lt;br&gt;Для перемешивания другие пользователи должны предоставить точно такой же набор номиналов.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Последнее сообщение)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Попробовать отправить Darksend-запрос вручную.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Попробовать вручную</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Сбросить текущий статус Darksend (можно прервать процесс перемешивания Darksend, но это может стоить Вам немного денег!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Сбросить</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Недавние транзакции&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>несинхронизировано</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="157"/>
-        <location filename="../overviewpage.cpp" line="158"/>
-        <location filename="../overviewpage.cpp" line="394"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Выключен</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="396"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Начать автоперемешивание</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="163"/>
-        <location filename="../overviewpage.cpp" line="541"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Остановить перемешивание</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="314"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Монеты не найдены</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation>
+            <numerusform>%n раунд</numerusform>
+            <numerusform>%n  раунда</numerusform>
+            <numerusform>%n раундов</numerusform>
+            <numerusform>%n раундов</numerusform>
+        </translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="322"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Найдены неподтвержденные номиналы, пересчет будет выполнен после их подтверждения.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="379"/>
-        <source>Rounds</source>
-        <translation>Раундов</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="410"/>
-        <source>Enabled</source>
-        <translation>Включен</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation>
+            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раунда)</numerusform>
+            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
+            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
+            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
+        </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <location filename="../overviewpage.cpp" line="439"/>
-        <location filename="../overviewpage.cpp" line="440"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Найдено достаточно совместимых средств для анонимизации %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <location filename="../overviewpage.cpp" line="445"/>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Не достаточно совместимых средств для анонимизации &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;будет анонимизировано только &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt;</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <location filename="../overviewpage.cpp" line="459"/>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Включен</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="468"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Последнее сообщение Darksend:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="421"/>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend в режиме ожидания.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="425"/>
-        <source>Mixing in progress...</source>
-        <translation>Выполняется перемешивание...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="431"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Запрос Darksend завершен: Ваша транзакция принята в пул!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Мастерноде отправлены следующие записи:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Отправлено мастерноде, ожидаем больше записей</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Найдено достаточное количество участников, подписываем ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Найдено достаточное количество участников, подписываем ( ожидание. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Найдено достаточное количество участников, подписываем ( ожидание.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Найдено достаточное количество участников, подписываем ( ожидание.. )</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Передаем итоговую транзакцию.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Finalizing transaction.</source>
-        <translation>Завершаем транзакцию.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Запрос Darksend не завершен:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Will retry...</source>
-        <translation>Попробуем еще раз...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <source>Darksend request complete:</source>
-        <translation>Запрос Darksend завершен:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Отправлено на мастерноду, ожидаем в очереди .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Отправлено на мастерноду, ожидаем в очереди ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Отправлено на мастерноду, ожидаем в очереди ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="462"/>
-        <source>Unknown state:</source>
-        <translation>Неизвестное состояние:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="476"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>Н/Д</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="498"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Статус Darksend был успешно сброшен.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="512"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Для работы Darksend требуется минимум %1.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="526"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
-        <translation>Бумажник заблокирован и пользователь отказался его разблокировать. Darksend будет выключен.</translation>
+        <translation>Кошелёк заблокирован и пользователь отказался его разблокировать. Darksend будет выключен.</translation>
     </message>
 </context>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Ошибка запроса платежа</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Не удаётся запустить обработчик dash: click-to-pay</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Предупреждение менеджера сети</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Ваш активный прокси не поддерживает SOCKS5, требуемый для запросов платежа через прокси.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Обработка URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Неверный URL запроса платежа: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">Не удалось разобрать URI! Возможно указан некорректный адрес Dash либо параметры URI сформированы неверно.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Обработка файла запроса платежа</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Не удается прочесть файл запроса платежа! Возможно это некоректный файл.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Неверный адрес платежа %1</translation>
+        <translation>Неверный адрес платежа %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>Не удалось разобрать URI! Возможно указан некорректный адрес Dash либо параметры URI сформированы неверно.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Не удается прочесть либо разобрать файл запроса платежа! Возможно это некоректный файл.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Запрос платежа отклонен</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Сеть запроса платежа не соответствует сети клиента.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Время этого запроса платежа истекло.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Запрос платежа не инициализирован.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Непроверенные запросы платежей с нестандартными платёжными сценариями не поддерживаются.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Запрошенная сумма платежа %1 слишком мала (считается &quot;пылью&quot;).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Возврат от %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Запрос платежа %1 слишком большой (%2 байт, разрешено %3 байт).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Защита от DoS через запрос платежа</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Ошибка связи с %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Не могу разобрать или обработать запрос платежа!</translation>
+        <translation>Не могу разобрать запрос платежа!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Плохой ответ от сервера %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Ошибка сетевого запроса</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Платёж принят</translation>
     </message>
@@ -2375,139 +2110,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Адрес/Имя хоста</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>User Agent</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Время пинга</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Ошибка: Указанная папка данных &quot;%1&quot; не существует.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Ошибка: не могу прочитать файл настроек: %1. Используйте для настроек только строки ключ=значение.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Ошибка чтения файла конфигурации мастернод: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Ошибка: недопустимая комбинация опций -regtest и -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core еще не завершил работу...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Введите адрес Dash (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="234"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Сумма</translation>
+        <translation>Сумма</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Введите адрес Dash (например, %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 д</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 ч</translation>
+        <translation>%1 ч</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 мин</translation>
+        <translation>%1 м</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 с</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>СЕТЬ</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>НЕИЗВЕСТНО</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Нет</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">Н/Д</translation>
+        <translation>Н/Д</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 мс</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Сохранить изображение...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Копировать изображение</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Сохранить QR-код</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Изображение PNG (*.png)</translation>
     </message>
@@ -2515,432 +2209,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Окно инструментов</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Информация</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="328"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Количество мастернод</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="75"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Общие</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="279"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Имя</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="82"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Имя клиента</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
-        <location filename="../forms/rpcconsole.ui" line="122"/>
-        <location filename="../forms/rpcconsole.ui" line="145"/>
-        <location filename="../forms/rpcconsole.ui" line="168"/>
-        <location filename="../forms/rpcconsole.ui" line="230"/>
-        <location filename="../forms/rpcconsole.ui" line="253"/>
-        <location filename="../forms/rpcconsole.ui" line="289"/>
-        <location filename="../forms/rpcconsole.ui" line="315"/>
-        <location filename="../forms/rpcconsole.ui" line="338"/>
-        <location filename="../forms/rpcconsole.ui" line="761"/>
-        <location filename="../forms/rpcconsole.ui" line="784"/>
-        <location filename="../forms/rpcconsole.ui" line="807"/>
-        <location filename="../forms/rpcconsole.ui" line="830"/>
-        <location filename="../forms/rpcconsole.ui" line="853"/>
-        <location filename="../forms/rpcconsole.ui" line="876"/>
-        <location filename="../forms/rpcconsole.ui" line="899"/>
-        <location filename="../forms/rpcconsole.ui" line="922"/>
-        <location filename="../forms/rpcconsole.ui" line="945"/>
-        <location filename="../forms/rpcconsole.ui" line="968"/>
-        <location filename="../forms/rpcconsole.ui" line="991"/>
-        <location filename="../forms/rpcconsole.ui" line="1014"/>
-        <location filename="../forms/rpcconsole.ui" line="1037"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>Н/Д</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="112"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Число подключений</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="188"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Открыть отладочный лог-файл Dash из текущего каталога данных. Для больших лог-файлов эта операция может занять несколько секунд.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="191"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Открыть</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="135"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Время запуска</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="272"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Сеть</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="181"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Время последнего блока</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="207"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Отладочный лог-файл</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="302"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Используется версия OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Дата сборки</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="158"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Текущее количество блоков</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="243"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Версия клиента</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Используется версия BerkeleyDB</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Цепочка блоков</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="362"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Консоль</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="411"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Очистить консоль</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="434"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>Сетевой &amp;трафик</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="486"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Очистить</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="502"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Всего</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="566"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Получено</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="646"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Отправлено</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="687"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Пиры</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="726"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="600"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Выберите пира для просмотра детализированной информации.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="751"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Направление</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Версия</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>User Agent</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Сервисы</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Начальная высота</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Синхронизированная высота</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Очки бана</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Время соединения</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Последняя отправка</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Последнее получение</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Байт отправлено</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Байт получено</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Время пинга</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>Ремонт &amp;кошелька</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Спасение кошелька</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Пересканировать цепочку блоков</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Восстановление транзакций 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Восстановление транзакций 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Обновить формат кошелька</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>С помощью этих кнопок Вы можете перезапустить кошелек с добавлением специальных команд для починки кошелька, исправления проблем с испорченными файлами блокчейна или пропавшими/конфликтующими транзакциями.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Попытаться восстановить закрытые ключи из повреждённого wallet.dat.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Перепроверить цепочку блоков на предмет отсутствующих в кошельке транзакций.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Восстановить транзакции из цепочки блоков (сохранить мета-данные, например, о владельцах аккаунтов).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Восстановить транзакции из цепочки блоков (удалить мета-данные).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Обновить формат кошелька при следующем запуске. (Примечание: обновление непосредственно клиент кошелька НЕ выполняется!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Варианты ремонта кошелька.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Перестроить индекс</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Перестроить индекс цепочки блоков из текущих файлов blk000??.dat.</translation>
+    </message>
+    <message>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Вход:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Выход:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Добро пожаловать в RPC-консоль Dash.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Используйте стрелки вверх и вниз для просмотра истории и &lt;b&gt;Ctrl-L&lt;/b&gt; для очистки экрана.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Напишите &lt;b&gt;help&lt;/b&gt; для просмотра доступных команд.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 Б</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 КБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 МБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 ГБ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="638"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>через %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="641"/>
-        <location filename="../rpcconsole.cpp" line="642"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>никогда</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="649"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Входящие</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="649"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Исходящие</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="662"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Неизвестно</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="664"/>
-        <location filename="../rpcconsole.cpp" line="665"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 мин</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 ч</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 ч %2 мин</translation>
+        <translation>Обновление...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Повторно использовать один из ранее использованных адресов. Повторное использование адресов несёт риски безопасности и приватности. Не используйте эту опцию, если вы не создаёте повторно ранее сделанный запрос платежа.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>&amp;Повторно использовать существующий адрес получения (не рекомендуется)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Необязательное сообщение для запроса платежа, которое будет показано при открытии запроса. Обратите внимание: сообщение не будет отправлено вместе с платежом через сеть Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Сообщение:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Необязательная метка для нового адреса получения.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Заполните форму для запроса платежей. Все поля &lt;b&gt;необязательны&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Метка:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Необязательная сумма для запроса. Оставьте пустым или укажите ноль, чтобы запросить неопределённую сумму.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Сумма:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Запросить платёж</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Очистить все поля формы.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Очистить</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>История запрошенных платежей</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Показать выбранный запрос (то же самое, что и двойной клик по записи)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Показать</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Удалить выбранные записи из списка</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Удалить</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Копировать метку</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Копировать сообщение</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Скопировать сумму</translation>
     </message>
@@ -2948,67 +2705,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>QR-код</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Копировать &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Копировать &amp;адрес</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Сохранить изображение...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Запросить платёж на %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Информация платежа</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Сумма</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Метка</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Сообщение</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Получившийся URI слишком длинный, попробуйте сократить текст метки / сообщения.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Ошибка кодирования URI в QR-код.</translation>
     </message>
@@ -3016,37 +2773,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Метка</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Сообщение</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Сумма</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(нет метки)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(нет сообщения)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(нет суммы)</translation>
     </message>
@@ -3054,412 +2811,401 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="597"/>
-        <location filename="../sendcoinsdialog.cpp" line="609"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Отправка</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Функции контроля монет</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Входы...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>выбраны автоматически</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Недостаточно средств!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Количество:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Байт:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Сумма:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Приоритет:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>средний</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Комиссия:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Малый выход:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Пыль:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>нет</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>После комиссии:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Сдача:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <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>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Свой адрес для сдачи</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Комиссия транзакции:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Выбрать...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>свернуть настройки комиссии</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Свернуть</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff, в то время как &quot;минимум&quot; будет равна 1000 duff. Для транзакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>за килобайт</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff, в то время как &quot;итого минимум&quot; будет равна 1000 duff. Для тразакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>итого минимум</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
+        <location line="+30"/>
+        <location line="+13"/>
         <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <translation>Оплаты только минимальной комиссии должно быть достаточно во всех случаях, пока в блоках достаточно места. Однако, будьте готовы к тому, что транзакция может вовсе не получить подтверждения, если количество транзакций будет стабильно больше, чем сеть способна обработать.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(прочтите всплывающую подсказку)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Рекомендовано:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Вручную:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Расчет &quot;умной&quot; комиссии еще не доступен. Обычно требуется подождать несколько блоков...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Время подтверждения:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>нормальный</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>быстрый</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>По возможности отправить как транзакцию с нулевой комиссией</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(подтверждение может занять больше времени)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Подтвердить отправку</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Отправить</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Очистить все поля формы.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Очистить &amp;всё</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Отправить нескольким получателям одновременно</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>&amp;Добавить получателя</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Баланс:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Копировать количество</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="67"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Скопировать сумму</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="68"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Копировать комиссию</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Копировать после комиссии</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Копировать байты</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Копировать приоритет</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Скопировать малый выход</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Скопировать пыль</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Копировать сдачу</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="228"/>
-        <location filename="../sendcoinsdialog.cpp" line="234"/>
-        <location filename="../sendcoinsdialog.cpp" line="243"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>, используя</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="228"/>
-        <location filename="../sendcoinsdialog.cpp" line="234"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>анонимные средства</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="238"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(для работы darksend требуется принудительно округлить до ближайшего %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="243"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>любые доступные средства (не рекомендуется)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="249"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>и InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="273"/>
-        <location filename="../sendcoinsdialog.cpp" line="278"/>
-        <location filename="../sendcoinsdialog.cpp" line="283"/>
-        <location filename="../sendcoinsdialog.cpp" line="287"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>С %1 на %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="336"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Вы уверены, что хотите отправить?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="345"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
-        <translation>добавлено в качестве комиссии</translation>
+        <translation>добавлено в качестве комиссии транзакции</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="362"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Общая сумма %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="364"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>или</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="366"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Подтвердите отправку монет</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Время этого запроса платежа истекло</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Комиссия в %1 раз выше, чем %2 за kB считается &quot;безумно высокой&quot;.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Неверный адрес платежа %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation>
+            <numerusform>Будет подтверждено приблизительно в течение %n блока.</numerusform>
+            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
+            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
+            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
+        </translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="574"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Адрес получателя неверный, пожалуйста, перепроверьте.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="577"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Сумма для отправки должна быть больше 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="580"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Сумма превышает Ваш баланс.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="583"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Сумма превысит Ваш баланс, если комиссия в размере %1 будет добавлена к транзакции.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Обнаружен дублирующийся адрес. Отправка на один и тот же адрес возможна только один раз за одну операцию отправки.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="589"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Не удалось создать транзакцию!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="593"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Транзакция была отклонена! Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию бумажника (wallet.dat), а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой.</translation>
+        <translation>Транзакция была отклонена! Такое может произойти, если некоторые монеты уже были потрачены, например, если Вы используете одну копию кошелька (wallet.dat), а монеты были потрачены из другой копии, но не были отмечены как потраченные в этой.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="598"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
-        <translation>Ошибка: этот бумажник был разблокирован только для анонимизации монет.</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="601"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ошибка: этот кошелёк был разблокирован только для анонимизации монет.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="688"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="710"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Заплатить только минимальную комиссию %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="817"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Внимание: неверный адрес Dash</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="826"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Внимание: неизвестный адрес для сдачи</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="837"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(нет метки)</translation>
     </message>
@@ -3467,102 +3213,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Это нормальный платёж.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Полу&amp;чатель:</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Адрес, на который будет выслан платёж (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Адрес Dash для отправки на него монет</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Выбрать ранее использованный адрес</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Вставить адрес из буфера обмена</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Удалить эту запись</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Метка:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Введите метку для этого адреса, чтобы добавить его в список использованных</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>Ко&amp;личество:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Сообщение:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
-        <translation>К bitcoin: URI было прикреплено сообщение, которое будет сохранено вместе с транзакцией для вашего сведения. Обратите внимание: сообщение не будет отправлено через сеть Dash.</translation>
+        <translation>К dash: URI было прикреплено сообщение, которое будет сохранено вместе с транзакцией для вашего сведения. Обратите внимание: сообщение не будет отправлено через сеть Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Это непроверенный запрос платежа.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Получатель:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Примечание:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Это проверенный запрос платежа.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Введите метку для данного адреса для добавления его в адресную книгу</translation>
     </message>
@@ -3570,12 +3312,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="120"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core выключается...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="121"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Не выключайте компьютер, пока это окно не исчезнет.</translation>
     </message>
@@ -3583,193 +3325,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Подписи - подписать/проверить сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Подписать сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Вы можете подписывать сообщения своими адресами, чтобы доказать владение ими. Будьте осторожны, не подписывайте что-то неопределённое, так как фишинговые атаки могут обманным путём заставить вас подписать нежелательные сообщения. Подписывайте только те сообщения, с которыми вы согласны вплоть до мелочей.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Адрес, которым Вы хотите подписать сообщение (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>Адрес Dash, которым Вы хотите подписать сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Выбрать ранее использованный адрес</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Вставить адрес из буфера обмена</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Введите сообщение для подписи</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Подпись</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Скопировать текущую подпись в системный буфер обмена</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Подписать сообщение, чтобы доказать владение этим адресом Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Подписать &amp;сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Сбросить значения всех полей формы подписывания сообщений</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Очистить &amp;всё</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Проверить сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Введите ниже адрес для подписи, сообщение (убедитесь, что переводы строк, пробелы, табы и т.п. в точности скопированы) и подпись, чтобы проверить сообщение. Убедитесь, что не скопировали лишнего в подпись, по сравнению с самим подписываемым сообщением, чтобы не стать жертвой атаки &quot;man-in-the-middle&quot;.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Адрес, которым было подписано сообщение (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>Адрес Dash, которым было подписано сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Проверить сообщение, чтобы убедиться, что оно было подписано указанным адресом Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Проверить &amp;сообщение</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Сбросить все поля формы проверки сообщения</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Нажмите &quot;Подписать сообщение&quot; для создания подписи</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Введите адрес Dash (например, XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Введённый адрес неверен.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Пожалуйста, проверьте адрес и попробуйте ещё раз.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Введённый адрес не связан с ключом.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
-        <translation>Разблокировка бумажника была отменена.</translation>
+        <translation>Разблокировка кошелька была отменена.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Закрытый ключ для введённого адреса недоступен.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Не удалось подписать сообщение.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Сообщение подписано.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Подпись не может быть раскодирована.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Пожалуйста, проверьте подпись и попробуйте ещё раз.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Подпись не соответствует отпечатку сообщения.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Проверка сообщения не удалась.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Сообщение проверено.</translation>
     </message>
@@ -3777,27 +3507,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Версия %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Разработчики Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Разработчики Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[тестовая сеть]</translation>
     </message>
@@ -3805,7 +3535,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>КБ/сек</translation>
     </message>
@@ -3813,257 +3543,260 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
         <translation>
             <numerusform>Будет открыто ещё %n блок</numerusform>
             <numerusform>Будет открыто ещё %n блока</numerusform>
             <numerusform>Будет открыто ещё %n блоков</numerusform>
+            <numerusform>Будет открыто ещё %n блоков</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Открыто до %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>в противоречии</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/отключен (проверено через instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/подтвержден (проверено через instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 подтверждений (проверено через instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/отключен</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/не подтверждено</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 подтверждений</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/отключен (верификация InstantX в процессе - %2 из %3 подписей)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/подтвержден (верификация InstantX в процессе - %2 из %3 подписей)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 подтверждений (верификация InstantX в процессе - %2 из %3 подписей)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/отключен (верификация InstantX завершилась неудачно)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/подтвержден (верификация InstantX завершилась неудачно)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Статус</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, ещё не было успешно разослано</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
         <translation>
             <numerusform>, разослано через %n узел</numerusform>
             <numerusform>, разослано через %n узла</numerusform>
             <numerusform>, разослано через %n узлов</numerusform>
+            <numerusform>, разослано через %n узлов</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Источник</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Сгенерированно</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>От</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>неизвестно</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Для</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>свой адрес</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>для просмотра</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>метка</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Кредит</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
         <translation>
             <numerusform>будет доступно через %n блок</numerusform>
             <numerusform>будет доступно через %n блока</numerusform>
             <numerusform>будет доступно через %n блоков</numerusform>
+            <numerusform>будет доступно через %n блоков</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>не принято</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Дебет</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Полный дебит</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Полный кредит</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Комиссия</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Чистая сумма</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Сообщение</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Комментарий</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID транзакции</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Продавец</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Сгенерированные монеты должны подождать %1 блоков, прежде чем они могут быть потрачены. Когда Вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если он не попадёт в цепочку, его статус изменится на &quot;не принят&quot;, и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Отладочная информация</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Транзакция</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Входы</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Сумма</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>истина</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>ложь</translation>
     </message>
@@ -4071,12 +3804,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Детали транзакции</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Эта панель отображает детальное описание транзакции</translation>
     </message>
@@ -4084,170 +3817,167 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Сумма</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
         <translation>
             <numerusform>Будет открыто ещё %n блок</numerusform>
             <numerusform>Будет открыто ещё %n блока</numerusform>
             <numerusform>Будет открыто ещё %n блоков</numerusform>
+            <numerusform>Будет открыто ещё %n блоков</numerusform>
         </translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Открыто до %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Нет активных соединений с сетью</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Неподтверждено</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Подтверждается (%1 из %2 рекомендованных подтверждений)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Подтверждено (%1 подтверждений)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>В противоречии</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Незрелый (%1 подтверждений, будет доступен после %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Этот блок не был получен другими узлами и, возможно, не будет принят!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Сгенерированно, но не подтверждено</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Получено</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Получено от</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Получено через Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Отправлено</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Отправлено себе</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Добыто</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Перемешивание Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Обеспечительный платеж Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Создание обеспечительных монет для Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Создание номиналов для Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Отправлено через Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>для просмотра</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(н/д)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Статус транзакции. Подведите курсор к нужному полю для того, чтобы увидеть количество подтверждений.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Дата и время, когда транзакция была получена.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Тип транзакции.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Участвовал ли адрес для просмотра в этой транзакции.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Адрес назначения транзакции.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Сумма, снятая с баланса или добавленная на него.</translation>
     </message>
@@ -4255,207 +3985,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Все</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Сегодня</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>На этой неделе</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>В этом месяце</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>В прошлом месяце</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>В этом году</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Промежуток...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Наиболее общие</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Получено на</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Отправлено на</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Отправлено через Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Создание обеспечительных монет для Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Создание номиналов для Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Перемешивание Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Обеспечительный платеж Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Отправленные себе</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Добытые</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Другое</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Введите адрес или метку для поиска</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Мин. сумма</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Копировать адрес</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Копировать метку</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Скопировать сумму</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Скопировать ID транзакции</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Изменить метку</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Показать подробности транзакции</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Экспортировать историю транзакций</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Текст, разделённый запятыми (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Подтверждено</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Для просмотра</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Дата</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Тип</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Метка</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Адрес</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Сумма</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Экспорт не удался</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Произошла ошибка при сохранении истории транзакций в %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Экспорт успешно завершён</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>История транзакций была успешно сохранена в %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Промежуток от:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>до</translation>
     </message>
@@ -4463,1447 +4194,1504 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1107"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Размерность для показа сумм. Кликните для выбора другой размерности.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
-        <translation>Не был загружен ни один бумажник.</translation>
+        <translation>Не был загружен ни один кошелёк.</translation>
     </message>
 </context>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Отправка</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX пока что не поддерживает такие большие суммы. На данный момент транзакции ограничены суммами до %n DASH.</numerusform>
-            <numerusform>InstantX пока что не поддерживает такие большие суммы. На данный момент транзакции ограничены суммами до %n DASH.</numerusform>
-            <numerusform>InstantX пока что не поддерживает такие большие суммы. На данный момент транзакции ограничены суммами до %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX пока что не поддерживает такие большие суммы. На данный момент транзакции ограничены суммами до %1 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Экспорт</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Экспортировать данные из вкладки в файл</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
-        <translation>Сделать резервную копию бумажника</translation>
+        <translation>Сделать резервную копию кошелька</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
-        <translation>Данные бумажника (*.dat)</translation>
+        <translation>Данные кошелька (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Резервное копирование не удалось</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
-        <translation>Произошла ошибка при сохранении данных бумажника в %1.</translation>
+        <translation>Произошла ошибка при сохранении данных кошелька в %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Резервное копирование успешно завершено</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
-        <translation>Данные бумажника были успешно сохранены в %1.</translation>
+        <translation>Данные кошелька были успешно сохранены в %1.</translation>
     </message>
 </context>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, вы должны установить опцию rpcpassword в конфигурационном файле:
-%s
-Рекомендуется использовать следующий случайный пароль:
-rpcuser=dashrpc
-rpcpassword=%s
-(вам не нужно запоминать этот пароль)
-Имя и пароль ДОЛЖНЫ различаться.
-Если файл не существует, то создайте его и оставьте права на чтение только для владельца.
-Также рекомендуется включить alertnotify для оповещения о проблемах;
-Например: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Допустимое шифрование (по умолчанию: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Произошла ошибка при настройке прослушивания RPC порта %u на IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Произошла ошибка при настройке прослушивания RPC порта %u на IP6, откатываемся обратно на IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Привязаться к указанному адресу и всегда прослушивать только его. Используйте [хост]:порт для IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Не удалось установить блокировку на каталог данных %s. Возможно, Dash Core уже запущен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Постоянно ограничивать бесплатные транзакции до &lt;n&gt;*1000 байт в минуту (по умолчанию:15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>При отправке Darksend использует только деноминированные средства, возможно, Вам просто нужно анонимизировать немного больше монет.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Отключить всю функциональность, связанную с мастернодами и Darksend (0-1, по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Включить instantx, показывать подтверждения для заблокированных транзакций (булевое, по умолчанию: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Включить автоматическое перемешивание Darksend для средств, хранящихся в этом бумажнике (0-1, по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Перейти в регрессионный тестовый режим, в котором используется специальная цепочка с мгновенным нахождением блоков. Этот режим предназначен для инструментов регрессионного тестирования и разработки приложения.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Войти в режим регрессионного тестирования, в котором используется специальная цепочка, где блоки находятся мгновенно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Ошибка: не удалось начать прослушивание входящих подключений (прослушивание вернуло ошибку %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Ошибка: транзакция была отклонена! Это могло произойти в случае, если некоторые монеты в вашем бумажнике уже были потрачены, например, если вы используете копию wallet.dat, и монеты были использованы в копии, но не отмечены как потраченные здесь.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Ошибка: эта транзакция требует комиссию как минимум %s из-за суммы, сложности или использования недавно полученных средств!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Ошибка: Бумажник разблокирован только для анонимизации, создание транзакции невозможно.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Выполнить команду, когда приходит соответствующее сообщение о тревоге или наблюдается очень длинная альтернативная цепочка блоков (%s в команде заменяется на сообщение)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
-        <translation>Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID)</translation>
+        <translation>Выполнить команду, когда меняется транзакция в кошельке (%s в команде заменяется на TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Выполнить команду при появлении нового блока (%s в команде заменяется на хэш блока)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Комиссия меньше этого значения считается нулевой (для создания транзакции) (по умолчанию:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Сохранять активность базы данных из пула памяти в лог на диске каждые &lt;n&gt; мегабайт (по умолчанию: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Найдены неподтверждённые номиналы, процесс продолжится после их подтверждения.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>В этом режиме -genproclimit определяет, сколько блоков генерируется немедленно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX требует наличия средств с хотя бы 6 подтверждениями, возможно Вам нужно подождать пару минут и попробовать снова.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Слушать JSON-RPC соединения на порту &lt;port&gt; (по умолчанию: 9998 или testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
-        <translation>Имя для создания ссылки на запись KeePass, хранящую пароль к бумажнику</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Количество секунд, в течение которых запрещать переподключаться неправильно ведущим себя участникам (по умолчанию: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Вывод отладочной информации (по умолчанию: 0, указание &lt;category&gt; необязательно)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Предоставлять ликвидность для Darksend путем редкого участия в перемешивании монет на постоянной основе (0-100, по умолчанию: 0, 1=очень часто, высокая комиссия, 100=очень редко, низкая комиссия)</translation>
+        <translation>Имя для создания ссылки на запись KeePass, хранящую пароль к кошельку</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Указать внешний адрес:порт для доступа к этой мастерноде (например: адрес:порт)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Задать максимальный размер высокоприоритетных/низкокомиссионных транзакций в байтах (по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Задать число потоков проверки скрипта (от %u до %d, 0=авто, &lt;0 = оставить столько ядер свободными, по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Установить лимит процессоров для генерации монет (-1 = неограничено, по умолчанию: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Показывать N подтверждений для успешно заблокированной транзакции (0-9999, по умолчанию: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Это пре-релизная тестовая сборка - используйте на свой страх и риск - не используйте для добычи или торговых приложений</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Не удалось привязаться к %s на этом компьютере. Возможно, Dash Core уже запущен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Не удалось обнаружить достаточных для выполнения этой транзакции номиналов Darksend.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Не удалось обнаружить достаточных для выполнения этой транзакции неденоминированных средств, отличающихся от 1000DRK.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Не удалось обнаружить достаточных для выполнения этой транзакции неденоминированных средств.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Использовать отдельный SOCKS5 прокси для подключения к участникам через скрытые сервисы Tor (по умолчанию: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Внимание: установлено очень большое значение -paytxfee. Это комиссия, которую Вы заплатите при проведении транзакции.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Внимание: пожалуйста, убедитесь что дата и время на Вашем компьютере выставлены правильно! Dash не сможет работать корректно, если часы настроены неверно.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Внимание: похоже, что в сети нет полного согласия! Некоторый майнеры, возможно, испытывают проблемы.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Внимание: обнаружено несогласие с подключенными участниками! Вам или другим участникам, возможно, следует обновиться.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Внимание: ошибка чтения wallet.dat! Все ключи прочитаны верно, но данные транзакций или записи адресной книги могут отсутствовать или быть неправильными.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Внимание: wallet.dat повреждён, данные спасены! Оригинальный wallet.dat сохранён как wallet.{timestamp}.bak в %s. Если Ваш баланс или транзакции некорректны, Вы должны восстановить файл из резервной копии.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Вы должны установить rpcpassword=&lt;password&gt; в конфигурационном файле:
-%s
-Если файл не существует, то создайте его с разрешением на чтение только для владельца файла.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Необходимо указать masternodeprivkey в файле конфигурации. Пожалуйста, ознакомьтесь с документацией.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(по умолчанию: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(по умолчанию: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; может быть:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Принимать командную строку и команды JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Принимать подключения извне (по умолчанию: 1, если не используется -proxy или -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Добавить узел для подключения и пытаться поддерживать соединение открытым</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Разрешить поиск в DNS для -addnode, -seednode и -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Разрешить JSON-RPC соединения с указанного IP-адреса</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Уже есть этот вход.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Всегда запрашивать адреса участников через DNS (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Попытаться восстановить закрытые ключи из повреждённого wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Параметры создания блоков:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Разбиение на номиналы невозможно: не осталось совместимых монет.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
-        <translation>Не удаётся понизить версию бумажника</translation>
+        <translation>Не удаётся понизить версию кошелька</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Не удаётся разрешить адрес в параметре -bind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Не удаётся разрешить адрес в параметре -externalip: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Не удаётся записать адрес по умолчанию</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Очистить список транзакций в бумажнике (диагностический инструмент; выполняет -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Обеспечительная транзакция некорректна.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Обеспечительная транзакция некорректна.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Подключаться только к указанному узлу(ам)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Соединяться через SOCKS прокси</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Соединяться к JSON-RPC по порту &lt;port&gt; (по умолчанию: 9998 или testnet: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Соединяться c KeePassHttp по порту &lt;port&gt; (по умолчанию: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Подключиться к участнику, чтобы получить список адресов других участников, и отключиться</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Параметры подключения:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>База данных блоков повреждена</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Демон Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Версия RPC-клиента Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend выключен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Параметры Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Параметры отладки/тестирования:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Отменить безопасный режим, перекрывает реальные события о переходе в безопасный режим (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Определить свой IP (по умолчанию: 1 при прослушивании и если не используется -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
-        <translation>Не загружать бумажник и запретить обращения к нему через RPC</translation>
+        <translation>Не загружать кошелёк и запретить обращения к нему через RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Перестроить базу данных блоков прямо сейчас?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Загрузка завершена</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>Откат к обычному перемешиванию и повторная попытка.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Разрешить этому клиенту работать в качестве мастерноды (0-1, по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Очередь переполнена.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Ошибка соединения с мастернодой.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Ошибка инициализации базы данных блоков</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
-        <translation>Ошибка инициализации окружения БД бумажника %s!</translation>
+        <translation>Ошибка инициализации окружения БД кошелька %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Ошибка загрузки базы данных блоков</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Ошибка при загрузке wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
-        <translation>Ошибка загрузки wallet.dat: бумажник поврежден</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Ошибка загрузки wallet.dat: бумажник требует более новой версии Dash</translation>
+        <translation>Ошибка загрузки wallet.dat: кошелёк поврежден</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Не удалось открыть базу данных блоков</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Ошибка чтения базы данных, завершение работы.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Ошибка восстановления открытого ключа.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Ошибка</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Ошибка: мало места на диске!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
-        <translation>Ошибка: бумажник заблокирован, создание транзакции невозможно!</translation>
+        <translation>Ошибка: кошелёк заблокирован, создание транзакции невозможно!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Ошибка: у Вас уже есть ожидающие записи в пуле Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Ошибка: системная ошибка: </translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Не удалось начать прослушивание на порту. Используйте -listen=0, если вас это устраивает.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Ошибка чтения информации о блоке</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Ошибка чтения блока</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Ошибка синхронизации индекса блока</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Если &lt;category&gt; не указана, то выводить всю отладочную информацию.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Ошибка записи индекса блока</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = сохранить мета-данные, например, о владельце аккаунта и информацию о запросе платежа, 2 = удалить мета-данные)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Ошибка записи информации о блоке</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Разрешить соединения JSON-RPC с указанного источника . &lt;ip&gt; может быть отдельным IP (например, 1.2.3.4), подсетью/маской (например, 1.2.3.4/255.255.255.0) или подсетью/CIDR (e.g. 1.2.3.4/24). Эту опцию можно указывать несколько раз</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Ошибка записи блока</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Произошла ошибка при настройке прослушивания RPC на адресе %s порт %u: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Ошибка записи информации о файле</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Привязаться к указанному адресу и внести пиров, использующих его, в белый список. Используйте [хост]:порт для IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Ошибка записи в базу данных монет</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Привязаться к указанному адресу для прослушивания JSON-RPC соединений. Используйте [хост]:порт для IPv6. Эту опцию можно указывать несколько раз (по умолчанию: привязаться ко всем интерфейсам)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Ошибка записи индекса транзакции</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Изменить поведение автоматического голосования за итоговые бюджеты. Режим auto: Голосовать только за итоговый бюджет, совпадающий со сгенерированным мной. (строковое, по умолчанию: auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Ошибка записи данных для отмены</translation>
+        <location line="+3"/>
+        <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>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Комиссия за кБ, добавляемая к отправляемым Вами транзакциями</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Создавать новые файлы с разрешениями по умолчанию вместо umask 077 (актуально только с отключенной функциональностью кошелька)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Комиссия меньше этого значения считается нулевой (для создания транзакции) (по умолчанию:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Удалить все трансакции из кошелька и при рестарте с помощью -rescan восстановить только те, которые есть в цепочке блоков</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Принудительный безопасный режим (по умолчанию: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Отключить всю функциональность, связанную с мастернодами и Darksend (0-1, по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Генерировать монеты (по умолчанию: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Распространяется под лицензией на программное обеспечение MIT, смотрите прилагаемый файл COPYING или &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Получить помощь по команде</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Включить instantx, показывать подтверждения для заблокированных транзакций (булевое, по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Сколько блоков проверять на старте (по умолчанию: 288, 0 = все)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Включить автоматическое перемешивание Darksend для средств, хранящихся в этом кошельке (0-1, по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Если &lt;category&gt; не предоставлена, выводить всю отладочную информацию.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Ошибка: Обнаружен неподдерживаемый аргумент -socks. Выбор версии SOCKS больше невозможен, поддерживаются только прокси версии SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Игнорировать мастерноды, имеющие версию ниже указанной (например: 70050; по умолчанию: 0)</translation>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Комиссии (в DASH/Kb) меньше этого значения считаются нулевой для ретранслирования транзакции (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
-        <source>Importing...</source>
-        <translation>Импорт ...</translation>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Комиссии (в DASH/Kb) меньше этого значения считаются нулевой (для создания транзакции) (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation>Импортировать блоки из внешнего файла blk000??.dat</translation>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Сохранять активность базы данных из пула памяти в лог на диске каждые &lt;n&gt; мегабайт (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
-        <source>Incompatible mode.</source>
-        <translation>Несовместимый режим.</translation>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
-        <source>Incompatible version.</source>
-        <translation>Несовместимая версия.</translation>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Если paytxfee не задано, то включить достаточно комиссии, чтобы подтверждение транзакций происходило в среднем за n блоков (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation>Неверный или отсутствующий начальный блок. Неправильный каталог данных для сети?</translation>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Некорректная сумма для -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (должна быть минимум как комиссия minrelay - %s, чтобы предотвратить застревание транзакций)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
-        <source>Information</source>
-        <translation>Информация</translation>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Записывать в лог приоритет транзакции и комиссию за килобайт во время добычи блоков (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
-        <source>Initialization sanity check failed. Dash Core is shutting down.</source>
-        <translation>Проверка на непротиворечивость закончилась неудачно. Dash Core выключается.</translation>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Держать полный индекс транзакций, используется rpc-вызовом getrawtransaction (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
-        <source>Input is not valid.</source>
-        <translation>Вход некорректен.</translation>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Максимальный размер данных в транзакциях передачи данных, который мы ретранслируем и добываем (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
-        <source>InstantX options:</source>
-        <translation>Параметры InstantX:</translation>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Максимальная сумма комиссии, допустимая в одной транзакции. Установка слишком низкого значения может привести к невозможности отправить большие транзакции (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
-        <source>Insufficient funds</source>
-        <translation>Недостаточно средств</translation>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Количество секунд, в течение которых запрещать переподключаться неправильно ведущим себя участникам (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
-        <source>Insufficient funds.</source>
-        <translation>Недостаточно средств.</translation>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Вывод отладочной информации (по умолчанию: %u, указание &lt;category&gt; необязательно)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Неверный -onion адрес: &apos;%s&apos;</translation>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Предоставлять ликвидность для Darksend путем редкого участия в перемешивании монет на постоянной основе (0-100, по умолчанию: %u, 1=очень часто, высокая комиссия, 100=очень редко, низкая комиссия)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Неверный адрес -proxy: &apos;%s&apos;</translation>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Ретранслировать транзакций с нулевой или низкой комиссией, только если у них высокий приоритет (по умолчанию:%u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -minrelaytxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Задать число потоков выполнения для генерации монет, если таковая включена (-1 = все ядра, по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -mintxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Показывать N подтверждений для успешно заблокированной транзакции (0-9999, по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Неверная сумма в параметре -paytxfee=&lt;кол-во&gt;: &apos;%s&apos;</translation>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Этот продукт включает ПО, разработанное проектом OpenSSL Project для использования в OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Неверная сумма</translation>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>Для использования dashd или опции -server с dash-qt, вы должны установить опцию rpcpassword в конфигурационном файле:
+%s
+Рекомендуется использовать следующий случайный пароль:
+rpcuser=dashrpc
+rpcpassword=%s
+(вам не нужно запоминать этот пароль)
+Имя и пароль ДОЛЖНЫ различаться.
+Если файл не существует, то создайте его и оставьте права на чтение только для владельца.
+Также рекомендуется включить alertnotify для оповещения о проблемах;
+Например: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
-        <source>Invalid masternodeprivkey. Please see documenation.</source>
-        <translation>Неправильное значение masternodeprivkey. Пожалуйста, ознакомьтесь с документацией.</translation>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Использовать отдельный SOCKS5 прокси для подключения к участникам через скрытые сервисы Tor (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
-        <source>Invalid private key.</source>
-        <translation>Некорректный закрытый ключ.</translation>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Внимание: установлено очень большое значение -paytxfee! Комиссия такого размера может быть уплачена при проведении одельной транзакции.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
-        <source>Invalid script detected.</source>
-        <translation>Обнаружен некорректный скрипт.</translation>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Внимание: пожалуйста, убедитесь что дата и время на Вашем компьютере выставлены правильно! Dash Core не сможет работать корректно, если часы настроены неверно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
-        <source>KeePassHttp id for the established association</source>
-        <translation>Идентификатор KeePassHttp для установленной ассоциации</translation>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Внести пиров, соединяющихся с адресов с указанной маской либо IP адресов, в белый список. Опция может быть указана несколько раз.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
-        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
-        <translation>Ключ KeePassHttp для зашифрованной коммуникации с KeePass</translation>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Пиры, внесенные в белый список, не будут подвергаться DoS блокировкам и их транзакции будут ретранслироваться, даже если они уже есть в пуле памяти, что полезно, например, для работы в качестве шлюза</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Держать N дашей анонимизированными (по умолчанию: 0)</translation>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Хранить максимум &lt;n&gt; несоединённых блоков в памяти (по умолчанию: %u)</translation>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; может быть:
+</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
-        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
-        <translation>Держать в памяти до &lt;n&gt; несвязных транзакций (по умолчанию: %u)</translation>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Принимать публичные REST-запросы (по  умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
-        <source>Last Darksend was too recent.</source>
-        <translation>Последнее действие Darksend было слишком недавно.</translation>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Допустимые алгоритмы шифрования (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Последнее успешное действие Darksend было слишком недавно.</translation>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Всегда запрашивать адреса участников через DNS (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Ограничить размер кэша подписей до &lt;n&gt; записей (по умолчанию: 50000)</translation>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Не удаётся разрешить адрес в параметре -whitebind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Вывести команды</translation>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Соединяться через SOCKS5 прокси</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Принимать входящие подключения на порт &lt;port&gt; (по умолчанию: 9999 или testnet:19999)</translation>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Соединяться c KeePassHttp по порту &lt;port&gt; (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="277"/>
-        <source>Loading addresses...</source>
-        <translation>Загрузка адресов...</translation>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
-        <source>Loading block index...</source>
-        <translation>Загрузка индекса блоков...</translation>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i The Dash Core Developers</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Не могу распознать сетевой адрес в значении %s параметра -rpcbind</translation>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Загрузка списка мастернод...</translation>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend в режиме ожидания.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
-        <source>Loading wallet... (%3.2f %%)</source>
-        <translation>Загрузка бумажника... (%3.2f %%)</translation>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Запрос Darksend завершен:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
-        <source>Loading wallet...</source>
-        <translation>Загрузка бумажника...</translation>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Запрос Darksend не завершен:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Записывать в лог приоритет транзакции и комиссию за килобайт во время добычи блоков (по умолчанию: 0)</translation>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Отменить безопасный режим, перекрывает реальные события о переходе в безопасный режим (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Держать полный индекс транзакций (по умолчанию: 0)</translation>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Разрешить этому клиенту работать в качестве мастерноды (0-1, по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Поддерживать не более &lt;n&gt; подключений к узлам (по умолчанию: 125)</translation>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Ошибка соединения с мастернодой.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="285"/>
-        <source>Masternode options:</source>
-        <translation>Параметры мастерноды:</translation>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Ошибка загрузки wallet.dat: кошелёк требует более новой версии Dash Core</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
-        <source>Masternode queue is full.</source>
-        <translation>Очередь на мастерноде переполнена.</translation>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Ошибка: Произошла критическая ошибка, подробности смотрите в файле debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
-        <source>Masternode:</source>
-        <translation>Мастернода:</translation>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Ошибка: Обнаружен неподдерживаемый параметр -tor, используйте -onion вместо него.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Максимальный размер буфера приёма на одно соединение, &lt;n&gt;*1000 байт (по умолчанию: 5000)</translation>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Комиссии (в DASH/kB), добавляемая к отправляемым Вами транзакциям (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Максимальный размер буфера отправки на соединение, &lt;n&gt;*1000 байт (по умолчанию: 1000)</translation>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Завершаем транзакцию.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="290"/>
-        <source>Missing input transaction information.</source>
-        <translation>Отсутствует информация о входной транзакции.</translation>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Принудительный безопасный режим (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Отсутствуют совместимые мастерноды.</translation>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Найдено достаточное количество участников, подписываем ( ожидание %s )</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="292"/>
-        <source>No funds detected in need of denominating.</source>
-        <translation>Не обнаружено средств для дальнейшего разбиения на номиналы.</translation>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Найдено достаточное количество участников, подписываем ...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Ни одной мастерноды не найдено.</translation>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Генерировать монеты (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="294"/>
-        <source>No matching denominations found for mixing.</source>
-        <translation>Отсутствуют совпадающие для перемешивания номиналы.</translation>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Сколько блоков проверять на старте (по умолчанию: %u, 0 = все)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
-        <source>Non-standard public key detected.</source>
-        <translation>Обнаружен нестандартный открытый ключ.</translation>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation>Игнорировать мастерноды, имеющие версию ниже указанной (например: 70050; по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
-        <source>Not compatible with existing transactions.</source>
-        <translation>Не совместимо с существующими транзакциями.</translation>
+        <location line="+1"/>
+        <source>Importing...</source>
+        <translation>Импорт ...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
-        <source>Not enough file descriptors available.</source>
-        <translation>Недостаточно файловых дескрипторов.</translation>
+        <location line="+1"/>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>Импортировать блоки из внешнего файла blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Отсутствует в списке мастернод.</translation>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Писать IP-адреса в отладочный вывод (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Принимать цепочку блоков только в том случае, если она соответствует встроенным контрольным точкам (по умолчанию: 1)</translation>
-    </message>
+        <location line="+1"/>
+        <source>Incompatible mode.</source>
+        <translation>Несовместимый режим.</translation>
+    </message>
     <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Соединяться только по сети &lt;net&gt; (ipv4, ipv6 или Tor)</translation>
+        <location line="+1"/>
+        <source>Incompatible version.</source>
+        <translation>Несовместимая версия.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="301"/>
-        <source>Options:</source>
-        <translation>Параметры:</translation>
+        <location line="+1"/>
+        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+        <translation>Неверный или отсутствующий начальный блок. Неправильный каталог данных для сети?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
-        <source>Password for JSON-RPC connections</source>
-        <translation>Пароль для подключений JSON-RPC</translation>
+        <location line="+1"/>
+        <source>Information</source>
+        <translation>Информация</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Дописывать в начало отладочного вывода отметки времени (по умолчанию: 1)</translation>
+        <location line="+1"/>
+        <source>Initialization sanity check failed. Dash Core is shutting down.</source>
+        <translation>Проверка на непротиворечивость закончилась неудачно. Dash Core выключается.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Печатать блок при запуске, если он найден в индексе блоков</translation>
+        <location line="+1"/>
+        <source>Input is not valid.</source>
+        <translation>Вход некорректен.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Печатать дерево блоков при запуске (по умолчанию: 0)</translation>
+        <location line="+1"/>
+        <source>InstantX options:</source>
+        <translation>Параметры InstantX:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="306"/>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Параметры RPC SSL: (см. Bitcoin вики для инструкций по настройке SSL)</translation>
+        <location line="+1"/>
+        <source>Insufficient funds</source>
+        <translation>Недостаточно средств</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Параметры RPC-клиента:</translation>
+        <location line="+1"/>
+        <source>Insufficient funds.</source>
+        <translation>Недостаточно средств.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="308"/>
-        <source>RPC server options:</source>
-        <translation>Параметры сервера RPC:</translation>
+        <location line="+1"/>
+        <source>Invalid -onion address: &apos;%s&apos;</source>
+        <translation>Неверный -onion адрес: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation>Случайно отбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
+        <location line="+1"/>
+        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <translation>Неверный адрес -proxy: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation>Случайно разбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Неверная сумма в параметре -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Перестроить индекс цепочки блоков из текущих файлов blk000??.dat</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Неверная сумма в параметре -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Перепроверить цепочку блоков на предмет отсутствующих в бумажнике транзакций</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Неверная сумма в параметре -mintxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
-        <source>Rescanning...</source>
-        <translation>Сканирование...</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Неверная сумма в параметре -paytxfee=&lt;amount&gt;: &apos;%s&apos; (должна быть минимум %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Запустить поток для периодического сохранения бумажника (по умолчанию: 1)</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Неверная сумма в параметре -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="315"/>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Запускаться в фоне как демон и принимать команды</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Последнее успешное действие Darksend было слишком недавно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Параметры SSL: (см. Bitcoin вики для инструкций по настройке SSL)</translation>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Ограничить размер кэша подписей до &lt;n&gt; записей (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Выбор версии SOCKS для прокси (4 или 5, по умолчанию: 5)</translation>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Слушать JSON-RPC соединения на порту &lt;port&gt; (по умолчанию: %u или testnet: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Отправить команду Dash Core</translation>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Принимать входящие подключения на порт &lt;port&gt; (по умолчанию: %u или testnet: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Отправляет команду ноде, работающей на IP-адресе &lt;ip&gt; (по умолчанию: 127.0.0.1)</translation>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Заблокировать средства мастернод, указанных в настроечном файле (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="320"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log</translation>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Поддерживать не более &lt;n&gt; подключений к узлам (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Файл сертификата сервера (по умолчанию: server.cert)</translation>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальный размер буфера приёма на одно соединение, &lt;n&gt;*1000 байт (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Закрытый ключ сервера (по умолчанию: server.pem)</translation>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Максимальный размер буфера отправки на соединение, &lt;n&gt;*1000 байт (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="323"/>
-        <source>Session not complete!</source>
-        <translation>Сессия не закончена!</translation>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Выполняется перемешивание...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Сессия прекращена по тайм-ауту (30 секунд), пожалуйста, отправьте заново.</translation>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Для параметра -whitebind нужно указать порт: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="325"/>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Мастерноды не найдены.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Установить размер пула ключей в &lt;n&gt; (по умолчанию: 100)</translation>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Отсутствуют совместимые мастерноды.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="327"/>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation>Установить максимальный размер блока в байтах (по умолчанию: %d)</translation>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Отсутствует в списке мастернод.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Установить минимальный размер блока в байтах (по умолчанию: 0)</translation>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Количество автоматических резервных копий кошелька (по умолчанию: 10)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="329"/>
-        <source>Set the masternode private key</source>
-        <translation>Установить закрытый ключ мастерноды</translation>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>Принимать цепочку блоков только в том случае, если она соответствует встроенным контрольным точкам (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Задать число потоков выполнения запросов RPC (по умолчанию: 4)</translation>
+        <location line="+1"/>
+        <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>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Установить флаг DB_PRIVATE в окружении базы данных бумажника (по умолчанию: 1)</translation>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Дописывать в начало отладочного вывода отметки времени (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="332"/>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation>Показать все отладочные параметры (использование: --help -help-debug)</translation>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Запустить поток для периодического сохранения кошелька (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Показывать информацию бенчмарка (по умолчанию: 0)</translation>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>По возможности отправлять транзакции с нулевой комиссией (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="334"/>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Сжимать файл debug.log при запуске клиента (по умолчанию: 1, если нет -debug)</translation>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Файл сертификата сервера (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
-        <source>Signing failed.</source>
-        <translation>Подписание завершилось неудачно.</translation>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Закрытый ключ сервера (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Подписание прекращено по тайм-ауту, пожалуйста, отправьте заново.</translation>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Сессия прекращена по тайм-ауту, пожалуйста, отправьте заново.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
-        <source>Signing transaction failed</source>
-        <translation>Подписание транзакции завершилось неудачно.</translation>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Установить размер пула ключей в &lt;n&gt; (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Указать конфигурационный файл (по умолчанию: dash.conf)</translation>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Установить минимальный размер блока в байтах (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Указать тайм-аут соединения в миллисекундах (по умолчанию: 5000)</translation>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Задать число потоков выполнения запросов RPC (по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="340"/>
-        <source>Specify data directory</source>
-        <translation>Задать каталог данных</translation>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Установить флаг DB_PRIVATE в окружении базы данных кошелька (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Указать конфигурационный файл для мастернод (по умолчанию: masternode.conf)</translation>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Указать конфигурационный файл (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Указать pid-файл (по умолчанию: dashd.pid)</translation>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Указать тайм-аут соединения в миллисекундах (минимально: 1, по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="343"/>
-        <source>Specify wallet file (within data directory)</source>
-        <translation>Укажите файл бумажника (внутри каталога данных)</translation>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Указать конфигурационный файл для мастернод (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
-        <source>Specify your own public address</source>
-        <translation>Укажите Ваш собственный публичный адрес</translation>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Указать pid-файл (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: 1)</translation>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Запустить демона Dash Core</translation>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Закрыть приложение после завершения импорта блоков с диска (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Системная ошибка: </translation>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Мастерноде отправлены следующие записи: %u / %d</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="348"/>
-        <source>This help message</source>
-        <translation>Эта справка</translation>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Отправлено мастерноде, ожидаем больше записей ( %u / %d ) %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Отправлено на мастерноду, ожидаем в очереди %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
         <translation>Это не мастернода.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Порог для отключения неправильно ведущих себя участников (по умолчанию: 100)</translation>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Порог для отключения некорректно ведущих себя пиров (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>Использовать интеграцию с KeePass 2 через плагин KeePassHttp (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Использовать N отдельных мастернод для анонимизации средств (2-8, по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Использовать UPnP для проброса порта (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Необходимо перезаписать кошелёк: перезапустите Dash Core для завершения операции</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Внимание: Опция -benchmark проигнорирована, используйте -debug=bench вместо нее.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Внимание: опция -debugnet проигнорирована, используйте -debug=net вместо нее.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Попробуем еще раз...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
+        <source>Invalid masternodeprivkey. Please see documenation.</source>
+        <translation>Неправильное значение masternodeprivkey. Пожалуйста, ознакомьтесь с документацией.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>В параметре -whitelist указана некорректная маска: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid private key.</source>
+        <translation>Некорректный закрытый ключ.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid script detected.</source>
+        <translation>Обнаружен некорректный скрипт.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>KeePassHttp id for the established association</source>
+        <translation>Идентификатор KeePassHttp для установленной ассоциации</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
+        <translation>Ключ KeePassHttp для зашифрованной коммуникации с KeePass</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Держать N DASH анонимизированными (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Держать в памяти до &lt;n&gt; несвязных транзакций (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Last Darksend was too recent.</source>
+        <translation>Последнее действие Darksend было слишком недавно.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Loading addresses...</source>
+        <translation>Загрузка адресов...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading block index...</source>
+        <translation>Загрузка индекса блоков...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Загрузка кэша бюджетов...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Загрузка кэша мастернод...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading wallet... (%3.2f %%)</source>
+        <translation>Загрузка кошелька... (%3.2f %%)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading wallet...</source>
+        <translation>Загрузка кошелька...</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Masternode options:</source>
+        <translation>Параметры мастерноды:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Masternode queue is full.</source>
+        <translation>Очередь на мастерноде переполнена.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Masternode:</source>
+        <translation>Мастернода:</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Missing input transaction information.</source>
+        <translation>Отсутствует информация о входной транзакции.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>No funds detected in need of denominating.</source>
+        <translation>Не обнаружено средств для дальнейшего разбиения на номиналы.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Чтобы использовать параметр %s</translation>
+        <location line="+1"/>
+        <source>No matching denominations found for mixing.</source>
+        <translation>Отсутствуют совпадающие для перемешивания номиналы.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Параметры ретрансляции узла:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Non-standard public key detected.</source>
+        <translation>Обнаружен нестандартный открытый ключ.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Not compatible with existing transactions.</source>
+        <translation>Не совместимо с существующими транзакциями.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Not enough file descriptors available.</source>
+        <translation>Недостаточно файловых дескрипторов.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Options:</source>
+        <translation>Параметры:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Password for JSON-RPC connections</source>
+        <translation>Пароль для подключений JSON-RPC</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>Параметры RPC SSL: (см. Bitcoin вики для инструкций по настройке SSL)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>RPC server options:</source>
+        <translation>Параметры сервера RPC:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Поддержка RPC для постоянных соединений HTTP (по умолчанию: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Случайно отбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>Случайно разбрасывать 1 из каждых &lt;n&gt; сетевых сообщений</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation>Перестроить индекс цепочки блоков из текущих файлов blk000??.dat</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Ретрансляция и создание транзакций передачи данных (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Ретрансляция не-P2SH multisig (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rescan the block chain for missing wallet transactions</source>
+        <translation>Перепроверить цепочку блоков на предмет отсутствующих в кошельке транзакций</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rescanning...</source>
+        <translation>Сканирование...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Запускаться в фоне как демон и принимать команды</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Send trace/debug info to console instead of debug.log file</source>
+        <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Session not complete!</source>
+        <translation>Сессия не закончена!</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>Установить максимальный размер блока в байтах (по умолчанию: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+2"/>
+        <source>Set the masternode private key</source>
+        <translation>Установить закрытый ключ мастерноды</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Показать все отладочные параметры (использование: --help -help-debug)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
+        <translation>Сжимать файл debug.log при запуске клиента (по умолчанию: 1, если нет -debug)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing failed.</source>
+        <translation>Подписание завершилось неудачно.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing timed out, please resubmit.</source>
+        <translation>Подписание прекращено по тайм-ауту, пожалуйста, отправьте заново.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing transaction failed</source>
+        <translation>Подписание транзакции завершилось неудачно</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Specify data directory</source>
+        <translation>Задать каталог данных</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>Укажите файл кошелька (внутри каталога данных)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify your own public address</source>
+        <translation>Укажите Ваш собственный публичный адрес</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This help message</source>
+        <translation>Эта справка</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Это экспериментальное ПО.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Это рассчитано на инструменты регрессионного тестирования и разработку приложений.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Сумма транзакции слишком мала</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Сумма транзакции должна быть положительна</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Создание транзакции прошло успешно.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Комиссия по транзакции слишком большая.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Транзакция некорректна.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Транзакция слишком большая для установленных ограничений комиссии</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Транзакция слишком большая</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Невозможно привязаться к %s на этом компьютере (привязка вернула ошибку %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Передаем итоговую транзакцию.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Невозможно подписать сообщение о мастерноде-победителе. Неправильный ключ?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Невозможно привязаться к %s на этом компьютере (привязка вернула ошибку %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Не удалось подписать spork-сообщение. Неправильный ключ?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Запрошена неизвестная версия -socks прокси: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>В параметре -onlynet указана неизвестная сеть: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Обновить бумажник до последнего формата</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Использование (устарело, используйте dash-cli):</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Использование:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Использовать интеграцию с KeePass 2 через плагин KeePassHttp (по умолчанию: 0)</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Неизвестное состояние: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Использовать N отдельных мастернод для анонимизации средств (2-8, по умолчанию: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Обновить кошелёк до последнего формата</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Использовать OpenSSL (https) для подключений JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Использовать UPnP для проброса порта (по умолчанию: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Использовать UPnP для проброса порта (по умолчанию: 1, если используется прослушивание)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Использовать тестовую сеть</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Имя для подключений JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Превышено значение допустимой для пула Darksend суммы.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Проверка блоков...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
-        <translation>Проверка бумажника...</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Дождаться старта RPC сервера</translation>
+        <translation>Проверка кошелька...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
-        <translation>Бумажник %s располагается вне каталога данных %s</translation>
+        <translation>Кошелёк %s располагается вне каталога данных %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
-        <translation>Бумажник заблокирован.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Необходимо перезаписать бумажник: перезапустите Dash для завершения операции</translation>
+        <translation>Кошелёк заблокирован.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
-        <translation>Параметры бумажника:</translation>
+        <translation>Параметры кошелька:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Внимание</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Внимание: опция -debugnet устарела и проигнорирована, используйте -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Внимание: эта версия устарела, требуется обновление!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Вам необходимо пересобрать базы данных с помощью -reindex, чтобы изменить -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Ваши записи успешно добавлены.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>Ваша транзакция принята в пул!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Удаление всех транзакций из кошелька...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>при запуске</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>версия</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat повреждён, спасение данных не удалось</translation>
     </message>
diff --git a/src/qt/locale/dash_vi.ts b/src/qt/locale/dash_vi.ts
index cd5da22e8e69..6203cfdeedca 100644
--- a/src/qt/locale/dash_vi.ts
+++ b/src/qt/locale/dash_vi.ts
@@ -1,202 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="vi">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>Giới thiệu về Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>&lt;b&gt;Dash Core&lt;/b&gt; phiên bản</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Bản quyền &amp;copy; 2009-2014 Nhóm phát triển Bitcoin Core.
-Bản quyền &amp;copy; 2014-YYYY Nhóm phát triển Dash Core.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Đây là phần mềm thử nghiệm.
-
-Phát hành dưới giấy phép phần mềm MIT/X11, hãy xem file đi kèm theo đây hoặc  http://www.opensource.org/licenses/mit-license.php.
-
-Sản phẩm này bao gồm phần mềm được phát triển bởi dự án OpenSSL cho việc sử dụng trong bộ công cụ OpenSSL Toolkit (http://www.openssl.org/) và phần mềm mã hoá được viết bởi Eric Young (eay@cryptsoft.com) và phần mềm UPnP được viết bởi Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Bản quyền</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Nhóm phát triển Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Nhóm phát triển Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Nháy đúp để sửa địa chỉ hoặc nhãn</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Bấm phải chuột để sửa địa chỉ hoặc nhãn</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Tạo một địa chỉ mới</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Mới</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Chép địa chỉ đã được chọn vào vùng đệm clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Sao chép</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Xoá địa chỉ đang được chọn khỏi danh sách</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Xoá</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Kết xuất dữ liệu trong tab này sang một file</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Kết xuất</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>Đó&amp;ng</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
         <translation>Chọn địa chỉ để gửi tiền đến</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
         <translation>Chọn địa chỉ để nhận tiền</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>C&amp;họn</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Đia chỉ gửi</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Địa chỉ nhận</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
         <translation>Đây là các địa chỉ Dash của bạn để gửi thanh toán. Luôn luôn kiểm tra số tiền và địa chỉ nhận trước khi bạn gửi tiền.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
         <translation>Đây là các địa chỉ Dash của bạn để nhận thanh toán. Gợi ý là sử dụng một địa chỉ nhận mới cho mỗi giao dịch.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Sao chép Địa chỉ</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Sao chép &amp;Nhãn</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Sửa</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Kết xuất danh sách Địa chỉ</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>File định dạng phân cách bởi dấu phẩy (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>Kết xuất không thành công</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Có một lỗi xảy ra khi lưu danh sách địa chỉ vào %1.</translation>
+        <translation>Có lỗi xảy ra khi lưu các địa chỉ vào %1. Hãy thử lại.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Nhãn</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Địa chỉ</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(không có nhãn)</translation>
     </message>
@@ -204,154 +143,150 @@ Sản phẩm này bao gồm phần mềm được phát triển bởi dự án O
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Khung hội thoại mật khẩu</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Mời nhập mật khẩu</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Mật khẩu mới</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Nhập lại mật khẩu mới</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Phục vụ để tắt tính năng chuyển tiền vô giá trị khi tài khoản của hệ điều hành bị xâm nhập. Không cung cấp đủ an ninh thực sự.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Chỉ dùng cho mục đích vô danh</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Nhập mật khẩu mới cho ví. &lt;br/&gt;Hãy sử dụng mật khẩu có &lt;b&gt;10 các ký tự ngẫu nhiên hoặc nhiều hơn&lt;/b&gt;, hay &lt;b&gt;8  từ hoặc nhiều hơn&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Nhập mật khẩu mới cho ví. &lt;br/&gt;Hãy sử dụng mật khẩu có &lt;b&gt;10 hoặc hơn các ký tự ngẫu nhiên&lt;/b&gt;, hay &lt;b&gt;8 từ hoặc nhiều hơn&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Mã hoá ví</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Công việc này cần mật khẩu ví của bạn để mở khoá ví.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Mở khoá ví</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Công việc này cần mật khẩu ví của bạn để giải mã ví.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Giải mã ví</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
         <translation>Đổi mật khẩu</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Hãy nhập mật khẩu cũ và mật khẩu mới cho ví.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Xác nhận mã hoá ví</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Chú ý: Nếu bạn mã hoá ví và mất mật khẩu, bạn sẽ &lt;b&gt;MẤT TẤT CẢ DASH CỦA BẠN&lt;/b&gt;!</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Bạn có chắc là mình muốn mã hoá ví?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Ví đã được mã hoá.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash sẽ được đóng lại bây giờ để hoàn thành tiến trình mã hoá. Hãy nhớ rằng mã hoá ví của bạn không thể hoàn toàn bảo vệ dash khỏi bị trộm bởi những mã độc lây nhiễm vào máy tính của bạn.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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>QUAN TRỌNG: Bất kỳ sao lưu nào mà bạn đã thực hiện trước với ví của bạn sẽ nên được thay thế bởi tệp Ví mới, được mã hoá. Vì lý do an ninh, những tệp sao lưu trước của ví không mã hoá sẽ trở nên vô nghĩa khi bạn bắt đầu sử dụng ví mới, có mã hoá.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Mã hoá ví không thành công</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Mã hoá ví bị lỗi vì lỗi bên trong của phần mềm. Ví của bạn không được mã hoá.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Mật khẩu bạn cung cấp không tương xứng.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Mở khoá ví không thành công</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>Mật khẩu bạn nhập để giải mã ví không chính xác.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Giải mã ví không thành công</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>Mật khẩu ví đã được đổi thành công.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Cảnh báo: Khoá Caps Lock đang được bật!</translation>
     </message>
@@ -359,431 +294,425 @@ Sản phẩm này bao gồm phần mềm được phát triển bởi dự án O
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+726"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-717"/>
         <source>Wallet</source>
         <translation>Ví</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Nút</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[mạng thử]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+142"/>
         <source>&amp;Overview</source>
         <translation>&amp;Tổng thể</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Hiển thị thông tin tổng thể của ví</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Gửi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Gửi tiền vào địa chỉ Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Nhận</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Yêu cầu thanh toán (sinh mã QR và dash: URIs)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>Các &amp;Giao dịch</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Xem lịch sử giao dịch</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>T&amp;hoát</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Thoát ứng dụng</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>&amp;Về Dash Core</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Hiển thị thông tin giới thiệu về Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Hiển thị thông tin về Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>Về &amp;QT</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Hiển thị thông tin giới thiệu về Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
         <translation>&amp;Tuỳ chọn...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Thay đổi tuỳ chọn cấu hình cho Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>Ẩ&amp;n / Hiện</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Hiển thị hoặc ẩn cửa sổ chính</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Mã hoá Ví...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Mã hoá khoá riêng mà thuộc về ví của bạn</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>&amp;Sao lưu Ví...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Sao lưu ví vào vị trí khác</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>Đổi &amp;Mật khẩu...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Đổi mật khẩu dùng để mã hoá ví</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Mở khoá Ví...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Mở khoá ví</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Khoá Ví</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>Ký vào &amp;thông điệp...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Ký vào thông điệp với địa chỉ Dash để chứng minh bạn là chủ của chúng</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Kiểm tra thông điệp...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Kiểm tra thông điệp để đảm bảo rằng nó đã được ký bằng địa chỉ Dash nhất định</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Thông tin</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Hiển thị thông tin chuẩn đoán</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>Giao diện gỡ rối</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Mở giao diện gỡ rối</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>Theo dõi &amp;Mạng</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Hiển thị thông tin theo dõi mạng</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>&amp;Các máy ngang cấp</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Hiển thị thông tin về các máy ngang cấp</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>&amp;Sửa Ví</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Hiển thị các tuỳ chọn để sửa ví</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Mở Tệp &amp;Cấu hình</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Mở tệp cấu hình</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Hiển thị chế độ Tự động &amp;Sao lưu</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Hiển thị những ví được sao lưu tự động</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>&amp;Gửi địa chỉ...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Hiển thị danh sách các địa chỉ đã sử dụng và các nhãn</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Địa chỉ nhận...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Hiển thị danh sách các địa chỉ đã sử dụng để nhận và các nhãn</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Mở &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Mở một dash: URI hoặc một yêu cầu thanh toán</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>&amp;Các Tuỳ chọn dòng lệnh</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Phần mềm Dash Core</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform>Xử lý được %n khối của các giao dịch đã qua.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Hiển thị hướng dẫn của Dash Core để có danh sách đầy đủ các tuỳ chọn dòng lệnh của Dash.</translation>
+        <translation>Hiển thị hướng dẫn của Dash Core để có danh sách đầy đủ các tuỳ chọn dòng lệnh của Dash.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Tệp</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Thiết đặt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Công cụ</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Trợ giúp</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Bảng Thanh công cụ</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Phần mềm Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n (các) kết nối hoạt động tới mạng lưới Dash</numerusform>
-        </translation>
+        <translation><numerusform>%n kết nối hiện thời tới mạng lưới của Dash</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
         <translation>Đang đồng bộ với mạng lưới...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Nhập các khối từ đĩa...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Sắp xếp lại các khối trên đĩa...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Không thấy nguồn sẵn sàng của các khối...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">Đang xử lý %1 các khối của lịch sử giao dịch.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>Mới nhất</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n giờ</numerusform>
-        </translation>
+        <translation><numerusform>%n giờ</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n ngày</numerusform>
-        </translation>
+        <translation><numerusform>%n ngày</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n tuần</numerusform>
-        </translation>
+        <translation><numerusform>%n tuần</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 và %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n năm</numerusform>
-        </translation>
+        <translation><numerusform>%n năm</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 đằng sau</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
         <translation>Đang nạp bộ đệm...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Khối vừa nhận đã được sinh ra từ %1.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Các giao dịch sau đây sẽ chưa thể thấy được.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Lỗi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Cảnh báo</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Thông tin</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Giao dịch gửi đi</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Giao dịch nhận về</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -796,30 +725,25 @@ Kiểu: %3
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Ví &lt;b&gt;đã được mã hoá&lt;/b&gt; và hiện tại &lt;b&gt;đã được mở&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Ví &lt;b&gt;đã được mã hoá&lt;/b&gt; và hiện tại &lt;b&gt;đã được mở&lt;/b&gt; chỉ để cho việc ẩn danh</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Ví &lt;b&gt;đã được mã hoá&lt;/b&gt; và hiện tại &lt;b&gt;đã được khoá&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Một lỗi nghiêm trọng đã xảy ra. Dash không thể tiếp tục một cách an toàn và sẽ thoát.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+171"/>
         <source>Network Alert</source>
         <translation>Cảnh báo mạng</translation>
     </message>
@@ -827,333 +751,302 @@ Kiểu: %3
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Chọn địa chỉ Coin Control</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Số lượng:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Số tiền:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Ưu tiên:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Phí:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Chọn lựa coin</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Bụi</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Phí sau:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Trả lại:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>(bỏ) chọn tất cả</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Kiểu cây</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Kiểu danh sách</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 khoá)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Số tiền</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Nhận được với nhãn</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Nhãn</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Địa chỉ</translation>
+        <translation>Nhận được với địa chỉ</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
+        <location line="+5"/>
         <source>Darksend Rounds</source>
         <translation>Số vòng Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Ngày</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Lượt xác nhận</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Đã được xác nhận</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Ưu tiên</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Sao chép địa chỉ</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Sao chép nhãn</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Sao chép số tiền</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Sao chép mã giao dịch</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Khoá khoản chưa tiêu</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Mở khoản chưa tiêu</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Sao chép số lượng</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Sao chép phí</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Sao chép giá trị sau tính phí</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Sao chép các bytes</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Sao chép ưu tiên</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Sao chép đầu ra thấp</translation>
+        <translation>Sao chép bụi</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Sao chép tiền trả lại</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>cao nhất</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>cao hơn</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>cao</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>cao-vừa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+131"/>
         <source>n/a</source>
         <translation>không áp dụng</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-346"/>
         <source>medium</source>
         <translation>vừa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>thấp-vừa</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>thấp</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>thấp hơn</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>thấp nhất</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 được khoá)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>không có</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Bụi</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>có</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>không</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Nhãn này chuyển sang đỏ, nếu kích thước giao dịch lớn hơn 1000 bytes.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Điều này có nghĩa là cần một mức phí ít nhất %1 cho mỗi kB.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Có thể thay đổi +/-1 byte cho mỗi đầu vào</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Giao dịch với độ ưu tiên cao hơn có cơ hội nhiều hơn được đưa vào khối.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Nhãn này chuyển sang đỏ, nếu ưu tiên thấp hơn &quot;trung bình&quot;.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Nhãn này chuyển sang đỏ, nếu bất kỳ bên nhận nào nhận một số tiền nhỏ hơn %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Có nghĩa là cần mức phí ít nhất 1%.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Số tiền dưới 0.546 lần chi phí tiếp sức tối thiểu được coi như là bụi.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Nhãn này sẽ chuyển sang đỏ, nếu phần trả lại nhỏ hơn %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(không có nhãn)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>phần trả lại từ %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(phần trả lại)</translation>
     </message>
@@ -1161,84 +1054,84 @@ Kiểu: %3
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Cấu hình Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Mức Riêng tư Cơ bản</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Mức Riêng tư Cao</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Mức Riêng tư Tối đa</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Hãy chọn mức độ riêng tư.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Sử dụng 2 masternode khác nhau để trộn số tiền lên đến 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Sử dụng 8 masternode khác nhau để trộn số tiền lên đến 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Sử dụng 16 masternode khác nhau</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Tuỳ chọn này là nhanh nhất và sẽ mất chi phí khoảng ~0.025 DASH để ẩn danh 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Tuỳ chọn này là tương đối nhanh và sẽ mất chi phí khoảng ~0.05 DASH để ẩn danh 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0.1 DASH cho mỗi 1000 DASH bạn muốn ẩn danh.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Đây là tuỳ chọn chậm nhất và an toàn nhất. Sử dụng mức vô danh cao nhất sẽ tốn kém</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Cấu hình Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend được thiết lập thành công về mức cơ bản (%1 và 2 vòng). Bạn có thể thay đổi nó bất cứ thời gian nào bằng cách mở màn hình cấu hình Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend được thiết lập thành công về mức cao (%1 và 8 vòng). Bạn có thể thay đổi nó bất cứ thời gian nào bằng cách mở màn hình cấu hình Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend được thiết lập thành công về mức tối đa (%1 và 16 vòng). Bạn có thể thay đổi nó bất cứ thời gian nào bằng cách mở màn hình cấu hình Dash.</translation>
     </message>
@@ -1246,67 +1139,67 @@ Kiểu: %3
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Sửa địa chỉ</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Nhãn</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>Nhãn tương ứng với địa chỉ này trong danh sách đầu vào</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>Địa &amp;chỉ</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>Địa chỉ tương ứng với địa chỉ này trong danh sách đầu vào. Chỉ có thể thay đổi địa chỉ gửi đi.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Địa chỉ nhận mới</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Địa chỉ gửi mới</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Sửa địa chỉ nhận</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Sửa địa chỉ gửi</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>Địa chỉ vừa nhập &quot;%1&quot; không phải địa chỉ Dash hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>Địa chỉ vừa nhập &quot;%1&quot; đã có trong danh sách địa chỉ.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Không thể mở khoá ví.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Sinh khoá mới không thành công.</translation>
     </message>
@@ -1314,27 +1207,27 @@ Kiểu: %3
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Một thư mục dữ liệu mớ đã được tạo.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>tên</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Thư mục đã tồn tại. Thêm %1 nếu bạn định tạo một thư mục mới tại đây.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Đường dẫn đã tồn tại, và nó không phải là thư mục.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Không thể tạo thư mục dữ liệu ở đây.</translation>
     </message>
@@ -1342,72 +1235,68 @@ Kiểu: %3
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - Các tuỳ chọn dòng lệnh</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>phiên bản</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">Giới thiệu về Dash Core</translation>
+        <translation>Về Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Các tuỳ chọn dòng lệnh</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Cách dùng:</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>tuỳ chọn dòng lệnh</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Tuỳ chọn giao diện</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Chọn thư mục dữ liệu khi khởi động (ngầm định: 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Chọn ngôn ngữ, ví dụ &quot;vn_VN&quot; (ngầm định: theo hệ thống)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Bắt đầu thu nhỏ</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Đặt chứng thực gốc cho yêu cầu thanh toán (ngầm định: -hệ thống-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Hiển thị màn hình giới thiệu khi khởi động (ngầm định: 1)</translation>
     </message>
@@ -1415,105 +1304,85 @@ Kiểu: %3
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Chào mừng</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Chào mừng đến với Dash Core.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Đây là lần đầu tiên chương trình được khởi động, bạn có thể chọn nơi mà Dash Core sẽ lưu dữ liệu.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core sẽ tải và lưu một bản của sổ cái Dash. Ít nhất %1GB dữ liệu sẽ được lưu trong thư mục này, và nó sẽ tăng lên theo thời gian. Ví của bạn cũng sẽ được lưu trong thư mục này.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Sử dụng thư mục dữ liệu ngầm định</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Sử dụng thư mục dữ liệu tuỳ chọn:</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Lỗi: Thư mục dữ liệu được chọn &quot;%1&quot; không thể được tạo.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Lỗi: Thư mục bạn cọn &quot;%1&quot; không thể tạo được.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Lỗi</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">GB không gian trống còn lại</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 GB còn trống </translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(của %1GB cần thiết)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>(của %1 GB cần đến)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Mở URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Mở yêu cầu thanh toán từ URI hoặc file</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI:</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Chọn file yêu cầ thanh toán</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Chọn tệp yêu cầu thanh toán để mở</translation>
     </message>
@@ -1521,313 +1390,281 @@ Kiểu: %3
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Các tuỳ chọn</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>&amp;Chính</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Tự động khởi động Dash sau khi đăng nhập hệ thống.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Khởi động Dash khi đăng nhập hệ thống</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Kích thước của dữ liệu cache</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>MB</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Số lượng các luồng kịch bản kiểm tra</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = tự động, &lt;0 = để đó rất nhiều lõi miễn phí)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
+        <location line="+37"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Thiết lập này xác định số tiền cho mỗi master nodes mà đầu vào thông qua đó được ẩn danh. Càng có nhiều vòng ẩn danh thì sẽ cho mức độ riêng tư càng cao, nhưng nó cũng tốn nhiều phí hơn.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+3"/>
         <source>Darksend rounds to use</source>
         <translation>Số vòng Darksend sử dụng</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Số lượng này hoạt động như là một ngưỡng để tắt Darksend một khi nó đạt đến.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Lượng Dash muốn giữ vô danh</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>&amp;Ví</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+65"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Chấp nhận kết nối từ bên ngoài</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Cho phép các kết nối tới</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Kết nối với mạng lưới Dash thông qua một SOCK5 proxy.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Kết nối thông qua SOCK5 proxy (proxy ngầm định): </translation>
     </message>
     <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Tuỳ chọn phí giao dịch trên kB có thể giúp cho giao dịch của bạn được xử lý nhanh chóng. Hầu hết các giao dịch khoảng 1 kB.</translation>
-    </message>
-    <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Trả &amp;phí giao dịch</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Chuyên gia</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="+6"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Hiển thị hoặc không hiển thị tính năng coin control.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Bật tính năng Coin &amp;control</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
+        <location line="+7"/>
         <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>Nếu bạn tắt chức năng chi tiêu các khoản tiền trả lại chưa được xác nhận, thì những khoản trả lại đó sẽ không thể sử dụng đến tận khi các giao dịch đó được ít nhất một lần xác nhận. Điều này cũng ảnh hưởng đến cách tính số dư của bạn.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+3"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Tiêu phần trả lại chưa được xác nhận</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Mạng</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Tự động mở cổng phần mềm Dash trên rounter. Nó chỉ làm việc khi router của bạn hỗ trợ UPnP và nó phải được bật.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Ánh xạ cổng sử dụng &amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Kết nối với mạng lưới Dash thông qua một SOCKS proxy.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">&amp;Kết nối qua SOCKS proxy (proxy ngầm định):</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>Proxy &amp;IP:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Địa chỉ IP của proxy (ví dụ: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Cổng:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Cổng của proxy (ví dụ: 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">Phiên bản SOCKS:</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Phiên bản SOCKS của proxy (ví dụ: 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Cửa sổ</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Chỉ hiển thị biểu tượng ở khai sau khi thu nhỏ cửa sổ.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>Thu &amp;nhỏ về khay thay vì về thanh taskbar</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Thu nhỏ thay vì thoát ứng dụng khi cửa sổ được đóng lại. Khi tuỳ chọn này được bật thì chương trình sẽ chỉ đóng sau khi chọn chức năng Thoát trong menu.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>Thu &amp;nhỏ khi đóng</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Hiển thị</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Ngôn ngữ người dùng:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>Ngôn ngữ người dùng có thể thiết lập ở đây. Thiết lập này sẽ có tác dụng sau khi khởi động lại Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Ngôn ngữ ị thiếu hoặc việc dịch chưa hoàn tất? Tham gia dịch giúp tại đây:
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Kiểu giao diện người dùng</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>Đơn vị &amp;hiển thị số lượng:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Chọn đơn vị phân khu mặc định để hiển thị trong giao diện và khi gửi tiền.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Hiển thị hoặc không hiển thị địa chỉ Dash trong danh giao dịch</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Hiển thị địa chỉ trong danh sách giao dịch</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+11"/>
+        <location line="+13"/>
         <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>Địa chỉ web của bên thứ ba (VD: chức năng kiểm tra số cái) mà nó xuất hiện trong tab giao dịch giống như các mục trong menu ngữ cảnh. %s trong địa chỉ web được thay thế bởi mã băm giao dịch. Nhiều địa chỉ web được phân cách bởi dấu gạch đứng |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URLs của giao dịch bên thứ ba</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Kích hoạt các tuỳ chọn dòng lệnh sẽ thay thế cho các tuỳ chọn trên:</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Tái lập lại tất cả các tuỳ chọn về ngầm định.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Tái lập Tuỳ chọn</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>&amp;Huỷ</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+84"/>
         <source>default</source>
         <translation>ngầm định</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>không có</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+84"/>
         <source>Confirm options reset</source>
         <translation>Xác nhận tái lập tuỳ chọn</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Cần phải khởi động phần mềm để kích hoạt các thay đổi.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Phần mềm sẽ được tắt, bạn có muốn tiến hành?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Thay đổi này có thể cần phải khởi động lại phần mềm.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>Địa chỉ proxy được cung cấp không hợp lệ.</translation>
     </message>
@@ -1835,368 +1672,274 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Biểu mẫu</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Ví</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>Thông tin được hiển thị có thể đã lỗi thời. Ví của bạn sẽ tự động đồng bộ với mạng lưới Dash sau khi kết nối được thiết lập, tuy nhiên quá trình này chưa hoàn thành.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Sẵn sàng:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Số dư có thể chi tiêu của bạn</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>Đang chờ:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Tổng của những giao dịch chưa được xác nhận, và do đó chưa được tính vào số dư có thể tiêu được</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Chưa chín muồi:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Số dư khai thác được chưa được xác nhận đủ</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>Số dư</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Các giao dịch chưa được xác nhận cho các địa chỉ chỉ để theo dõi</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Số dư đào được trong các địa chỉ chỉ theo dõi nhưng chưa sẵn sàng để tiêu được</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Tổng:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Tổng số dư hiện tại của bạn</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Tổng số dư hiện tại trong các địa chỉ chỉ theo dõi</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Chỉ theo dõi:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Số dư hiện tại của bạn trong địa chỉ chỉ theo dõi</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Có thể tiêu được:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Tình trạng:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+7"/>
         <source>Enabled/Disabled</source>
         <translation>Bật/Tắt</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="+7"/>
         <source>Completion:</source>
         <translation>Hoàn thành:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Số dư cho Darksend:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
+        <location line="+13"/>
         <source>0 DASH</source>
         <translation>0 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+7"/>
         <source>Amount and Rounds:</source>
         <translation>Số tiền và số vòng:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Vòng</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Mệnh giá được gửi:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Mệnh giá mà bạn gửi cho Masternode. Để trộn, những người dùng khác cũng cần gửi chính xác dùng loại mệnh giá đó.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>không áp dụng</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+566"/>
+        <location filename="../overviewpage.cpp" line="+464"/>
+        <location line="+14"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Các giao dịch gần đây</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Bắt đầu/Tắt việc trộn</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-462"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Mệnh giá mà bạn gửi cho Masternode. &lt;br&gt;Để trộn, những người dùng khác cũng cần gửi chính xác dùng loại mệnh giá đó.</translation>
+    </message>
+    <message>
+        <location line="+494"/>
         <source>(Last Message)</source>
         <translation>(Thông điệp cuối)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Thử gửi yêu cầu Darksend bằng tay.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Thử Trộn</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Tái lập lại trạng thái hiện tại của Darksend (có thể gián đoạn Darksend nếu nó đang trong quá trình trộn, điều đó có thể làm bạn bị mất tiền!)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Khởi động lại</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Các giao dịch gần đây&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-353"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>không đồng bộ</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+13"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+262"/>
         <source>Disabled</source>
         <translation>Đã tắt</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-259"/>
+        <location line="+261"/>
+        <location line="+86"/>
         <source>Start Darksend Mixing</source>
         <translation>Bắt đầu trộn Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-345"/>
+        <location line="+347"/>
         <source>Stop Darksend Mixing</source>
         <translation>Tắt trộn Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-196"/>
         <source>No inputs detected</source>
         <translation>Phát hiện không có đầu vào</translation>
     </message>
+    <message numerus="yes">
+        <location line="+7"/>
+        <location line="+59"/>
+        <location line="+15"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Vòng</numerusform></translation>
+    </message>
     <message>
-        <location filename="../overviewpage.cpp" line="320"/>
+        <location line="-65"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
         <translation>Tìm thấy các mệnh giá đầu ra chưa được xác nhận, sẽ đợi đến khi chúng xác nhận để tính toán lại.</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Vòng</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Đã bật</translation>
+    <message numerus="yes">
+        <location line="+37"/>
+        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <translation><numerusform>Tiến trình: %1% (đầu vào có trung bình %2 của %n vòng)</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
+        <location line="+5"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Đã tìm được đủ đầu vào tương thích để ẩn danh hoá %1</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
+        <location line="+10"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
+        <location line="+54"/>
+        <source>Enabled</source>
+        <translation>Đã bật</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="466"/>
+        <location line="+5"/>
         <source>Last Darksend message:
 </source>
         <translation>Thông điệp Darksend cuối cùng:
 </translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend đang nghỉ.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation>Đang trong quá trình trộn...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Yêu cầu Darksend đã hoàn tất:  Giao dịch của bạn đã được chấp nhận vào bể trộn!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Gửi những thành phần sau đến masternode:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Đã gửi cho masternode, Đợi các thành phần thêm</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Đã kiếm đủ người dùng, đang ký ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Đã kiếm đủ người dùng, đang ký (vui lòng đợi.)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Đã kiếm đủ người dùng, đang ký (vui lòng đợi..)</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Đã kiếm đủ người dùng, đang ký (vui lòng đợi...)</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Đang gửi giao dịch cuối cùng.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Đang hoàn tất các giao dịch.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Yêu cầu Darksend chưa hoàn thành:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Sẽ thử lại...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Yêu cầu Darksend hoàn thành:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Đã gửi đến masternode, đang đợi trong hàng đợi .</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Đã gửi đến masternode, đang đợi trong hàng đợi ..</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Đã gửi đến masternode, đang đợi trong hàng đợi ...</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Tình trạng không rõ:</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>Không áp dụng</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend vừa được tái lập thành công.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+14"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend cần ít nhất %1 để sử dụng.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Ví đã được khoá và người dùng từ chối mở khoá. Đang tắt Darksend.</translation>
     </message>
@@ -2204,141 +1947,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Yêu cầu thanh toán bị lỗi</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Không thể khởi động dash: trình xử lý click-to-pay</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Cảnh báo quản lý mạng</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Proxy hiện tại không hỗ trợ SOCKS5, nó là cần thiết để cho yêu cầu thanh toán thông qua proxy.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>xử lý URI</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>Yêu cầu thanh toán lấy URL là không hợp lệ: %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">URI không thể phân tích. Nó có thể bởi địa chỉ Dash không hợp lệ hoặc thông số URI dị hình.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Thanh toán cần file xử lý</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Tệp yêu cầu thanh toán không thể đọc hoặc xử lý được! Đó có thể là do tệp yêu cầu thanh toán không hợp lệ.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Địa chỉ thanh toán không hợp lệ %1</translation>
+        <translation>Địa chỉ thanh toán không hợp lệ %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Tệp yêu cầu thanh toán không thể đọc được. Nó có thể là nguyên nhân bởi tệp thanh toán không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>Yêu cầu giao dịch bị từ chối</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Mạng yêu cầu thanh toán không tương xứng với mạng của phần mềm.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>Yêu cầu thanh toán đã hết hạn.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>Yêu cầu thanh toán không được khởi tạo.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Yêu cầu thanh toán chưa được xác minh để tùy chỉnh các kịch bản thanh toán không được hỗ trợ.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Yêu cầu thanh toán khoản tiền của  %1 là quá nhỏ (được xem là bụi).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Trả lại từ %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>Yêu cầu thanh toán %1 quá lớn (%2 bytes, cho phép %3 bytes)</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Giao dịch yêu cầu bảo vệ tấn công từ chối dịch vụ</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Lỗi kết nối với %1: %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">Yêu cầu thanh toán không thể xử lý được.</translation>
+        <translation>Yêu cầu thanh toán không thể xử lý!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Phản hồi xấu từ máy chủ %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Yêu cầu mạng bị lỗi</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Thanh toán được ghi nhận</translation>
     </message>
@@ -2346,139 +2069,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Địa chỉ/Máy trạm</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Thời gian phản hồi</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Lỗi: Thư mục được chọn &quot;%1&quot; không tồn tại.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Lỗi: Không phân tích được tệp cấu hình: %1. Chỉ sử dụng cú pháp key=value.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Lỗi đọc tệp cấu hình masternode: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Lỗi: Tổng hợp không hợp lệ của -regtest và -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core chưa được thoát một cách an toàn...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Hãy nhập địa chỉ Dash (VD: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+234"/>
         <source>Amount</source>
-        <translation type="unfinished">Số tiền</translation>
+        <translation>Số lượng</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Hãy nhập một địa chỉ Dash (VD: %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+757"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 giờ</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 giờ</translation>
+        <translation>%1 giờ</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 phút</translation>
+        <translation>%1 phút</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 giây</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>MẠNG</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>KHÔNG XÁC ĐỊNH</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Không</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">Không áp dụng</translation>
+        <translation>N/A</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Lưu ảnh...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Sao chép ảnh</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>&amp;Lưu mã QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Ảnh dạng PNG (*.png)</translation>
     </message>
@@ -2486,436 +2168,495 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Cửa sổ công cụ</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Thông tin</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
+        <location line="+304"/>
         <source>Masternode Count</source>
         <translation>Số Masternode</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="-253"/>
         <source>General</source>
         <translation>Chung chung</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Tên</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Phiên bản</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>Không áp dụng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Số kết nối</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Mở file nhật kỹ lỗi Dash từ thư mục hiện tại. Nó có thể mất vài giây trong trường hợp file log lớn.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Mở</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Thời gian khởi động</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Mạng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Thời gian block cuối cùng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Debug log file</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Sử dụng phiên bản OpenSSL</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Ngày xây dựng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Số khối hiện tại</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Phiên bản</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Sử dụng BerkeleyDB version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+323"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Xoá console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>&amp;Lưu lượng mạng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Xoá</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Tổng</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Đã nhận</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Đã gửi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>&amp;Máy ngang cấp</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Hãy chọn một máy đồng cấp để xem thông tin chi tiết.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Phiên bản</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Dịch vụ</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Điểm cấm</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Thời gian kết nối</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Lần gửi cuối</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Lần nhận cuối</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Gửi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Bytes Nhận</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Thời gian phản hồi</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>Sửa &amp;Ví</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Cứu ví</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Quét lại file blockchain</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Phục hồi các giao dịch 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Phục hồi các giao dịch 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Nâng cấp định dạng ví</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Các tuỳ chọn sửa ví.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Lập lại chỉ mục</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Vào:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Ra:</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Chào mừng đến với giao tiếp Dash RPC</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Sử dụng các phím mũi tên lên và xuống để xem lịch sử, và &lt;b&gt;Ctrl-L&lt;/b&gt; để xoá màn hình.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Gõ &lt;b&gt;help&lt;/b&gt; để xem tổng thể các lệnh có thể dùng.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 B</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 KB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 MB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 GB</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>theo %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>không bao giờ</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Kết nối về</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Kết nối đi</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Không xác định</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 phút</translation>
-    </message>
-    <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 giờ</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 giờ %2 phút</translation>
+        <translation>Đang tìm...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
         <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
         <translation>Sử dụng lại địa chỉ đã được sử dụng để nhận trước đây. Sử dụng lại địa chỉ nảy sinh vấn đề an ninh và riêng tư. Đừng sử dụng nó trừ khi bạn tạo lại yêu cầu thanh toán mà bạn đã làm trước đây.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
+        <location line="+3"/>
         <source>R&amp;euse an existing receiving address (not recommended)</source>
         <translation>Tái &amp;sử dụng lại địa chỉ nhận đã có (không khuyến khích)</translation>
     </message>
     <message>
+        <location line="+14"/>
+        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Một thông điệp tuỳ chọn để đính vào yêu cầu thanh toán, nó sẽ hiển thị khi yêu cầu được mở. Chú ý: Thông điệp sẽ không được gửi thông qua mạng lưới Dash.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Một thông điệp tuỳ chọn để đính vào yêu cầu thanh toán, nó sẽ hiển thị khi yêu cầu được mở. Chú ý: Thông điệp sẽ không được gửi thông qua mạng lưới Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="-20"/>
         <source>&amp;Message:</source>
         <translation>&amp;Thông điệp:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Một nhãn tuỳ chọn để liên kết với địa chỉ nhận mới.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Sử dụng biểu mẫu này để yêu cầu thanh toán. Tất cả các trường đều là &lt;b&gt;không bắt buộc&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Nhãn:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Một tuỳ chọn về số tiền yêu cầu. Để nó trống hoặc bằng không để không yêu cầu một số tiền cụ thể.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Số tiền:</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Yêu cầu thanh toán</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Xoá tất cả các ô.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Xoá</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Xem lịch sử thanh toán</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Hiển thị những yêu cầu được chọn (giống như click đúp vào mỗi thành phần)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Xem</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Xoá thành phần được chọn khỏi danh sách</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Xoá</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Sao chép nhãn</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Sao chép thông điệp</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Sao chép số tiền</translation>
     </message>
@@ -2923,67 +2664,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>Mã QR</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copy &amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copy địa chỉ</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Lưu ảnh...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Yêu cầu thanh toán tới %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Thông tin thanh toán</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Địa chỉ</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Số tiền</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Nhãn</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Thông điệp</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>Kết quả là URI quá dài, hãy thử rút gọn chữ trong nhãn / thông điệp.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Lỗi mã hoá URI thành mã QR.</translation>
     </message>
@@ -2991,37 +2732,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Ngày</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Nhãn</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Thông điệp</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Số tiền</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(không có nhãn)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(không thông điệp)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(không số tiền)</translation>
     </message>
@@ -3029,412 +2770,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Gửi tiền</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Tính năng Coin Control</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Đầu vào...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>tự động chọn</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Không đủ tiền!</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Số lượng:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Bytes:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Số tiền:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Ưu tiên:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>vừa</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Phí:</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Low Output:</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Bụi</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>không</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Phí sau:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Trả lại:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Nếu nó được kích hoạt, nhưng địa chỉ tiền nhận lại là trống hoặc không hợp lệ, thì tiền lẻ trả lại sẽ được gửi đến một địa chỉ được sinh mới.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Thay đổi địa chỉ tiền trả lại</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Phí giao dịch</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Chọn...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Tối thiểu hoá</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
+        <location line="+78"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
+        <location line="+3"/>
         <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <translation>mỗi kilobyte</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
+        <location line="+13"/>
         <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
+        <location line="+3"/>
         <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <translation>tổng ít nhất</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+30"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+3"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Gợi ý:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Tuỳ chỉnh:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+52"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Thời gian xác thực:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>bình thường</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>nhanh</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Gửi như là giao dịch không phí nếu có thể</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(xác thưc có thể mất lâu hơn)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Xác nhận việc gửi</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>&amp;Gửi</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Xoá tất cả các ô.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>Xoá &amp;Tất cả</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Gửi đến nhiều địa chỉ một lúc</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Thêm &amp;Người nhận</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Số dư:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-543"/>
         <source>Copy quantity</source>
         <translation>Sao chép số lượng</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Sao chép số tiền</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Sao chép phí</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Sao chép giá trị sau tính phí</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Sao chép bytes</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Sao chép ưu tiên</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Sao chép đầu ra thấp</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Sao chép bụi</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Sao chép tiền trả lại</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>sử dụng</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>các khoản tiền ẩn danh</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend yêu cầu số tiền này sẽ được làm tròn đến gần %1)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>bất kỳ khoản tiền sẵn nào (gợi ý không nên)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>và InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 đến %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Bạn có chắc mình muốn gửi?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>được thêm vào như là phí giao dịch</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
+        <location line="+17"/>
         <source>Total Amount %1 (= %2)</source>
         <translation>Tổng số tiền %1 (= %2)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
+        <location line="+2"/>
         <source>or</source>
         <translation>hoặc</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+2"/>
         <source>Confirm send coins</source>
         <translation>Xác nhận việc gửi tiền</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">Yêu cầu thanh toán đã hết hạn</translation>
+        <location line="+235"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation type="unfinished"/>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Địa chỉ thanh toán không hợp lệ %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Ước lượng để bắt đầu xác thực trong vòng %n khối.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>Địa chỉ nhận không hợp lệ, hãy kiểm tra lại.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="+3"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Số tiền thanh toán phải lớn hơn 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Số tiền này lớn hơn số dư của bạn.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Tổng số lớn hơn số dư của bạn khi tính cả %1 phí giao dịch.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Thấy trùng địa chỉ, chỉ có thể gửi cho mỗi địa chỉ một lần trong một giao dịch gửi.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>Tạo giao dịch không thành công!</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>Giao dịch đã bị từ chối! Điều này có thể xảy ra khi một số tiền trong ví của bạn đã được tiêu, ví dụ như là nếu bạn sử dụng một bản sao của wallet.dat và tiền đã được tiêu nhưng bản khác của ví nhưng lại chưa được đánh dấu đã tiêu trong bản này.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Lỗi: Ví vừa được mở chỉ cho việc ẩn danh tiền.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
+        <translation>Thanh toán chỉ mức phí tối thiểu của %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Cảnh báo: Địa chỉ Dash không hợp lệ</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Cảnh báo: Không biết địa chỉ trả lại</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(không có nhãn)</translation>
     </message>
@@ -3442,102 +3167,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Đây là giao dịch thông thường.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>Trả &amp;Cho</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Địa chỉ để gửi thanh toán (VD: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>Địa chỉ Dash để gửi thanh toán</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Chọn địa chỉ đã sử dụng trước</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Dán địa chỉ từ clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Xoá thành phần này</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>&amp;Nhãn:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Nhập nhãn cho địa chỉ này để đưa vào danh sách địa chỉ đã dùng</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>&amp;Số tiền:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Thông điệp:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Một thông điệp được đính với dash: URI đó sẽ được lưu trữ với các giao dịch cho các bạn tham khảo. Lưu ý: Thông điệp này sẽ không được gửi qua mạng Dash. </translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Đây là yêu cầu thanh toán chưa được xác thực.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Trả cho:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Ghi nhớ:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Đây là một yêu cầu thanh toán được xác thực.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Nhập nhãn cho địa chỉ để thêm nó vào sổ địa chỉ của bạn.</translation>
     </message>
@@ -3545,12 +3266,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Dash Core đang được tắt...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Đừng tắt máy tính cho đến khi cửa sổ này biến mất.</translation>
     </message>
@@ -3558,193 +3279,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Chữ ký - Ký / Kiểm tra Thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Ký thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Bạn có thể ký vào thông điệp với địa chỉ của bạn để chứng minh bạn là chủ của nó. Hãy cẩn thận không ký vào những gì mơ hồ, như là thứ lừa đảo để lừa bạn ký xác nhận của bạn vào đó cho họ. Chỉ ký vào những gì mà bạn hoàn thoàn đồng ý.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Địa chỉ để ký thông điệp với (VD: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <location line="+18"/>
+        <source>The Dash address to sign the message with</source>
+        <translation>Địa chỉ Dash để ký cho thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
-        <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Chọn địa chỉ đã dùng</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Dán địa chỉ từ clipboard</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Nhập vào thông điệp mà bạn muốn ký tại đây</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Chữ ký</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copy chữ ký hiện tại vào bộ đệm của hệ thống</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Ký vào thông điệp để chứng tỏ bạn sở hữu địa chỉ Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>&amp;Ký thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Tái lập lại tất cả các trường cần ký</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>Xoá &amp;tất cả</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Xác thực Thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Hãy nhập địa chỉ ký, thông điệp (hãy chắc chắn rằng bạn copy cả các dấu xuống dòng, dấu cách, tab,... một cách chính xác) và chữ ký dưới đây để xác thực cho thông điệp. Hãy cẩn thận không thêm vào chữ ký hơn so với bản thân nó trong thông điệp đã ký, để tránh bị đánh lừa bởi kiểu tấn công người trung gian.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Địa chỉ mà thông điệp được ký (VD: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>Địa chỉ Dash mà thông điệp được ký bởi</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Kiểm tra lại thông điệp để đảm bảo rằng nó được ký với địa chỉ Dash cụ thể</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Xác thực &amp;Thông điệp</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Tái lập lại tất cả các trường kiểm tra</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Bấm &quot;Ký Thông điệp&quot; để sinh chữ ký</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Nhập một địa chỉ Dardcoin: (VD: XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>Địa chỉ vừa nhập không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Hãy kiểm tra địa chỉ và thử lại.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>Địa chỉ bạn nhập không đề cập đến một khoá.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Mở khoá ví bị huỷ bỏ.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>Khoá riêng cho địa chỉ vừa nhập không có.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>Ký vào thông điệp thất bại.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Thông điệp đã được ký.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>Chữ ký không thể giải mã được.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Hãy kiểm tra chữ ký và thử lại.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>Chữ ký không tương xứng với nội dung thông điệp.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Không thể xác thực thông điệp.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Thông điệp đã được xác thực.</translation>
     </message>
@@ -3752,27 +3461,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Phiên bản %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Nhóm phát triển Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Nhóm phát triển Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[mạng thử]</translation>
     </message>
@@ -3780,7 +3489,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>KB/s</translation>
     </message>
@@ -3788,251 +3497,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Mở thêm %n khối</numerusform>
-        </translation>
+        <translation><numerusform>Mở cho %n khối nữa</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Mở đến khi %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>xung đột</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/ngắt kết nối (đã được kiểm tra qua instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/đã được xác nhận (đã được kiểm tra qua instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 xác nhận (đã được kiểm tra qua instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/ngắt kết nối</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/chưa xác nhận</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 xác nhận</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/mất kết nối (Đang trong tiến trình kiểm tra InstantX - %2 trên %3 các chữ ký)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/được xác nhận (Đang trong tiến trình kiểm tra InstantX - %2 trên %3 các chữ ký)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 xác nhận (Đang trong tiến trình kiểm tra InstantX - %2 trên %3 các chữ ký)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/mất kết nối (Thất bại trong việc kiểm tra InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/đã được xác nhận (Thất bại trong việc kiểm tra InstantX)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>Trạng thái</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, đã không được phát sóng thành công</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, phát sóng thông qua %n nút</numerusform>
-        </translation>
+        <translation><numerusform>, quảng bá thông qua %n điểm nút</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Ngày</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Nguồn</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Đã được sinh</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>Từ</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>không biết</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>Đến</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>địa chỉ của mình</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>chỉ theo dõi</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>nhãn</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Có</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>đầy đủ trong %n khối nữa</numerusform>
-        </translation>
+        <translation type="unfinished"><numerusform></numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>không chấp nhận</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Nợ</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Tổng nợ</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Tổng có</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Phí giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Số tiền chưa gồm phí</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Thông điệp</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Bình luận</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>Mã giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Người bán</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Coin được tạo phải được trưởng thành 1% khối trước khi chúng có thể được tiêu. Khi bạn sinh khối này, nó được quảng bá trong mạng để thêm vào chuỗi khối. Nếu nó không được đưa vào chuỗi, trạng thái của nó được chuyển thành &quot;không được chấp nhận&quot; và sẽ không thể tiêu được. Điều này thỉnh thoảng có xảy ra nếu những nút khác cũng sinh trong vòng vài giây với khối của bạn.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Thông tin gỡ rối</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Đầu vào</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Số tiền</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>đúng</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>sai</translation>
     </message>
@@ -4040,12 +3743,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Chi tiết giao dịch</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Bảng này hiển thị mô tả chi tiết về giao dịch</translation>
     </message>
@@ -4053,168 +3756,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Ngày</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Kiểu</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Địa chỉ</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Số tiền</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Mở thêm %n khối</numerusform>
-        </translation>
+        <translation><numerusform>Mở cho %n khối nữa</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Mở đến khi %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Ngắt kết nối</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Chưa xác thực</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Đang xác nhận (%1 của %2 xác nhận được đề nghị)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Được xác nhận (%1 xác nhận)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>Xung đột</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Chưa hoàn thành (%1 xác nhận, sẽ sẵn sàng sau %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Khối này đã không nhận được bởi bất kỳ các nút nào khác và có thể sẽ không được chấp nhận!</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Đã sinh nhưng không được chấp nhận</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Nhận với</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Nhận từ</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Nhận qua Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Gửi đến</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Trả cho bản thân bạn</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Được đào</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominate</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Thanh toán Darksend Collateral</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend tạo đầu vào Collateral</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend tạo các mệnh giá</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>chỉ theo dõi</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(không áp dụng)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>Trạng thái giao dịch: Di chuột qua ô này để hiển thị số lần xác nhận.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Thời gian giao dịch đã được nhận.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Kiểu giao dịch.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>Địa chỉ đích của giao dịch.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Lượng tiền được gỡ bỏ hoặc thêm vào số dư.</translation>
     </message>
@@ -4222,207 +3919,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+67"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Tất cả</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Hôm nay</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Tuần này</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Tháng này</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Tháng gần nhất</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Năm nay</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
         <translation>Khoảng...</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+10"/>
+        <source>Most Common</source>
+        <translation>Phổ biến nhất</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Received with</source>
         <translation>Nhận với</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Gửi đến</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
         <translation>Darksend tạo đầu vào Collateral</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
         <translation>Darksend tạo các mệnh giá</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Darksend Denominate</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Thanh toán Darksend Collateral</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>Đến bản thân bạn</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Được đào</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Khác</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+6"/>
         <source>Enter address or label to search</source>
         <translation>Nhập địa chỉ hoặc nhãn để tìm</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Số tiền tối thiểu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Sao chép địa chỉ</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Sao chép nhãn</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Sao chép số tiền</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Sao chép mã giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Sửa nhãn</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Xem chi tiết giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+185"/>
         <source>Export Transaction History</source>
         <translation>Kết xuất Lịch sử Giao dịch</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>File định dạng phân cách bởi dấu phẩy (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Đã được xác nhận</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Chỉ theo dõi</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Ngày</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Kiểu</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Nhãn</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Địa chỉ</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Số tiền</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>Mã</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>Kết xuất không thành công</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Có một lỗi xảy ra khi lưu lịch sử giao dịch vào %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Kết xuất thành công</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>Lịch sử giao dịch đã được lưu thành công vào %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+128"/>
         <source>Range:</source>
         <translation>Khoảng:</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>đến</translation>
     </message>
@@ -4430,15 +4128,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Không có ví nào được nạp.</translation>
     </message>
@@ -4446,58 +4144,58 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Gửi tiền</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX không hỗ trợ để gửi giá trị lớn đến như vậy. Giới hạn giao dịch hiện tại đến %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation type="unfinished"/>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Kết xuất</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Kết xuất dữ liệu trong tab này sang một file</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+201"/>
         <source>Backup Wallet</source>
         <translation>Sao lưu Ví</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Dữ liệu Ví (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Sao lưu không thành công</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Có lỗi xảy ra khi lưu dữ liệu ví xuống %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Sao lưu thành công</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Dữ liệu ví đã được lưu thành công vào %1.</translation>
     </message>
@@ -4505,1370 +4203,1418 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, bạn phải gửi một rpcpassword trong tệp cấu hình:
-%s
-Gợi ý rằng bạn sử dụng mật khẩu ngẫu nhiên sau:
-rpcuser=dảkcoinrpc
-rpcpassword=%s
-(bạn không cần thiết phải nhớ mật khẩu này)
-Username và mật khẩu KHÔNG ĐƯỢC giống nhau.
-Nếu tệp không tồn tại, tạo nó với quyền owner-readable-only.
-Cũng gợi ý rằng bạn nên đặt alertnotify để bạn có thể nhận thông báo về những vấn đề;
-ví dụ: alertnotify=echo %%s | mail -s &quot;Cảnh báo Dash&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Các mã hoá chấp nhận được (ngầm định: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Có lỗi xảy ra khi thiết lập cổng RPC để lắng nghe trên IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Một lỗi xảy ra trong khi thiết lập cổng RPC để lắng nghe trên IPv6, chuyển xuống IPv4: %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Liên kết với địa chỉ nhất định và luôn luôn lắng nghe trên đó. Sử dụng ký hiệu [host]:port cho IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Không nhận được một khoá trong thư mục %s. Dash Core có thể đã đang chạy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Liên tục giới hạn tỷ lệ miễn phí giao dịch về &lt;n&gt;*1000 byte cho mỗi phút (ngầm định: 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend sử dụng số lượng mệnh giá nhất định để gửi tiền, bạn có thể chỉ cần đơn giản ẩn danh vài coin nữa.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Tắt tất cả các chức năng liên quan đến Masternode và Darksend (0-1, ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Cho phép InstantX, hiển thị xác nhận cho các giao dịch bị khoá (bool, ngầm định: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Cho phép sử dụng tự động darksend cho những ngân sách được lưu trong ví (0-1, ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Hãy nhập chế độ kiểm tra hồi quy, mà sử dụng một chuỗi đặc biệt mà trong những khối được giải tức thời. Điều này là để dành cho công cụ kiểm tra hồi quy và phát triển ứng dụng.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Hãy nhập chế độ kiểm tra hồi quy, mà sử dụng một chuỗi đặc biệt mà trong những khối được giải tức thời.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
         <translation>Lỗi: Lắng nghe để nhận kết nối bị lỗi (lỗi trả về %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Lỗi: Giao dịch bị từ chối! Nó có thể xảy ra nếu một số tiền trong ví của bạn đã được tiêu, ví dụ như trường hợp bạn sử dụng bản sao của wallet.dat và số tiền đã được tiêu trong bản sao nhưng không được đánh dấu đã được tiêu ở đây.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Lỗi: Giao dịch này cần khoản phí giao dịch ít nhất %s bởi vì số tiền của nó, mức độ phức tạp, hoặc sử dụng nguồn tiền mới nhận!</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Lỗi: Ví đã được mở chỉ cho việc ẩn danh, không thể tạo được giao dịch.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Thực hiện lệnh khi một cảnh báo liên quan được nhận hoặc chúng ta thấy sự phân nhánh thực sự dài (%s trong cmd được thay bởi message)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Thực hiện lệnh khi một giao dịch ví thay đổi (%s trong cmd được thay thế bởi TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Thực hiện lệnh khi khối tốt nhất thay đổi (%s trong cmd được thay thế bởi giá trị băm của khối)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Mức phí nhỏ hơn này có thể được xem là không phí (để cho việc tạo giao dịch) (ngầm định:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Đẩy các hoạt động với cơ sở dữ liệu từ bộ nhớ xuống nhật ký trên đĩa mỗi &lt;n&gt; megabytes (ngầm định: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
+        <location line="+12"/>
         <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
         <translation>Đã thấy các mệnh giá đầu ra chưa được xác nhận, sẽ đợi đến khi chúng xác nhận để tiếp tục.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Cách kiểm tra khối triệt để -checkblocks là (0-4, ngầm định: 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+8"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Chế độ này -genproclimit kiểm soát bao nhiêu khối được sinh tức thời.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX cần đầu vào với ít nhất 6 xác nhận, bạn có thể cần phải đợi vài phút và thử lại.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Lắng nghe kết nối từ JSON-RPC trên &lt;cổng&gt; (ngầm định: 9998 hoặc mạng thử: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Đặt tên để tạo dựng url cho các thành phần KeePass mà nó sẽ lưu giữ mật khẩu của ví</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Số giây hạn chế để không cho phép các đối tác ngang hàng kết nối lại (ngầm định: 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Kết xuất thông tin gỡ rối (ngầm định: 0, cung cấp &lt;category&gt; là không bắt buộc)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Cung cấp thanh khoản cho Darksend bằng việc thường xuyên trộn tiền một cách liên tục (0-100, ngầm định: 0, 1=rất thường xuyên, phí cao, 100=rất ít thường xuyên, phí thấp)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
         <translation>Truy vấn địa chỉ đối tác ngang hàng thông qua tìm kiếm DNS, nếu có ít địa chỉ (ngầm định: 1 trừ trường hợp -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+5"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Đặt external address:port cho masternode này (ví dụ: address:port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Đặt kích thước tối đa cho giao dịch với ưu tiên cao/phí thấp theo bytes (ngầm định: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Thiết lập số luồng của kịch bản kiểm tra (%u to %d, 0 = tự động, &lt;0 = để nhiều lõi miễn phí, ngầm định: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Đặt giới hạn xử lý khi quá trình phát sinh là bật (-1 = không giới hạn, ngầm định: -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Hiển thị N xác nhận cho mỗi giao dịch được khoá thành công (0-9999, ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Đây là phiên bản chưa chính thức - hãy dùng và tự chấp nhận mạo hiểm - đừng dùng để đào coin hoặc các ứng dụng thương mại.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Không thể để ràng buộc vào %s trên máy tính này. Dash Core có thể đã chạy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Không tìm đủ ngân sách Darksend denominated cho giao dịch này.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Không tìm đủ ngân sách Darksend denominated cho giao dịch mà nó không bằng 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Không kiếm đủ ngân sách Darksend non-denominated cho giao dịch này.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Sử dụng SOCKS5 proxy riêng biệt đối với mỗi thành phần ngang hàng thông qua Tor cho các dịch vụ ẩn (ngầm định: -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Cảnh báo: -paytxfee được đặt rất cao! Đây là mức phí giao dịch mà bạn sẽ trả nếu bạn gửi một giao dịch.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Cảnh báo: Hãy kiểm tra ngày giờ trên máy tính của bạn xem có chính xác! Nếu đồng hồ của bạn không đúng Dash sẽ không hoạt động tốt.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Cảnh báo: Mạng lưới có vẻ chưa hoàn toàn đồng ý! Một vài máy đào có vẻ như đã kinh nghiệm với những vấn đề này.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Cảnh báo: Chúng ta có vẻ không được sự đồng ý một cách đầy đủ từ các đối tác ngang hàng! Bạn cần nâng cấp hoặc các nút khác cần nâng cấp.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Cảnh báo: lỗi đọc tệp wallet.dat! Tất cả các khoá được đọc đúng, như dữ liệu giao dich hoặc các thành phần địa chỉ khối có thể bị mất hoặc không chính xác.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Cảnh báo: wallet.dat đã bị hỏng, dữ liệu đã được cứu! Tệp gốc wallet.dat đã được lưu thành wallet.{timestamp}.bak trong %s; nếu số dư hoặc các giao dịch của bạn không chính xác, bạn có thể khôi phục từ bản sao lưu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Bạn phải đặt rpcpassword=&lt;mật khẩu&gt; trong tệp cấu hình:
-%s
-Nếu tệp không tồn tại, tạo nó với quyền tệp owner-readable-only.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Bạn cần chỉ rõ masternodeprivkey trong tệp cấu hình. Hãy xem tài liệu để có hướng dẫn.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+4"/>
         <source>(default: 1)</source>
         <translation>(ngầm định: 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(ngầm định: wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; có thể là:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+2"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Chấp nhận dòng lệnh và các lệnh JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Chấp nhật kết nối từ ngoài (ngầm định: 1 nếu không có -proxy hoặc -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Thêm nút để kết nối tới và giữ mở kết nối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Cho phép DNS tìm kiếm -addnode, -seednode và -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Cho phép các kết nối JSON-RPC từ các địa chỉ IP xác định</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Đã có đầu vào đó.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation>Luôn truy vấn cho các địa chỉ ngang hàng thông qua DNS (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Thử khôi phục khoá riêng từ tệp wallet.dat bị lỗi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Tuỳ chọn tạo khối:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
         <translation>Không thể định giá: không còn đầu vào tương tích.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+1"/>
         <source>Cannot downgrade wallet</source>
         <translation>Không thể hạ cấp ví</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Không thể phân giải địa chỉ -bind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Không thể phân giải địa chỉ -externalip: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Không thể viết vào địa chỉ ngầm định</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Xoá danh sách các giao dịch của ví (công cụ chuẩn đoán; implies -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Collateral là không hợp lệ.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Collateral không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Kết nối chỉ với (các) nút nhất định</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Kết nối thông qua SOCKS proxy</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Kết nối tới JSON-RPC trên &lt;cổng&gt; (ngầm định: 9998 hoặc mạng thử: 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Kết nối tới KeePassHttp trên cổng &lt;port&gt; (ngầm định: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Kết nối với một nút để lấy địa chỉ ngang hàng, và ngắt kết nối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Tuỳ chọn kết nối:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Phát hiện ra dữ liệu khối bị hỏng</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Phiên bản phần mềm Dash Core RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
+        <location line="+2"/>
         <source>Darksend is disabled.</source>
         <translation>Darksend đã được tắt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+2"/>
         <source>Darksend options:</source>
         <translation>Tuỳ chọn Darksend:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Tuỳ chọn Gỡ rối/Kiểm tra:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Tắt chế độ an toàn, ghi đè lên một sự kiện của chế đọ an toàn (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Phát hiện địa chỉ IP của mình (ngầm định: 1 khi lắng nghe và không dùng -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Không tải ví và tắt các lời gọi ví RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Bạn có muốn xây dựng lại dữ liệu khối bây giờ không?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Nạp xong</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation>Hạ cấp và thử lại xem.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Cho phép phần mềm hoạt động như là masternode (0-1, ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
         <translation>Các đầu vào đã đầy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Lỗi kết nối đến masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Lỗi khởi tạo cơ sở dữ liệu khối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Lỗi khởi tạo cơ sở dữ liệu môi trường ví %s!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Lỗi nạp cơ sở dữ liệu khối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Lỗi nạp wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Lỗi nạp wallet.dat: Ví bị lỗi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Lỗi nạp wallet.dat: Ví cần một phiên bản mới hơn của Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Lỗi mở cơ sở dữ liệu khối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Lỗi đọc từ cơ sở dữ liệu, đang tắt phần mềm.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Lỗi khi phục hồi khoá công khai.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Lỗi</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+2"/>
         <source>Error: Disk space is low!</source>
         <translation>Lỗi: Dung lượng đĩa thấp!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Lỗi: Ví đã bị khoá, không thể tạo giao dịch!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Lỗi: Bạn đã có các thành phần đang chờ trong Darksend pool</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Lỗi: lỗi hệ thống.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Không thành công khi lắng nghe trên các cổng. Sử dụng -listen=0 nếu bạn muốn nó.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>Thất bại trong việc đọc thông tin khối</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>Thất bại trong việc đọc khối</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>Thất bại trong việc đồng bộ chỉ mục khối</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Nếu &lt;category&gt; không được cung cấp, đưa ra tất cả các thông tin gỡ rối.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>Thất bại trong việc ghi chỉ mục khối</translation>
+        <location line="-261"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>Thất bại trong việc ghi thông tin khối</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>Thất bại trong việc ghi khối</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>Thất bại trong việc ghi thông tin tệp</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>Thất bại trong việc ghi cơ sở dữ liệu tiền</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>Thất bại trong việc ghi chỉ mục giao dịch</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>Thất bại trong việc ghi dữ liệu hoãn</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Phí cho mỗi kB được thêm vào giao dịch bạn gửi</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Mức phí nhỏ hơn đây được coi là không phí (cho tiếp sức) (ngầm định:</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Cưỡng bức ở chế độ an toàn (ngầm định: 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Sinh tiền (ngầm định: 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Để có trợ giúp cho một lệnh</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Bật InstantX, hiển thị các xác thực cho các giao dịch bị khoá (bool, ngầm định: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Bao nhiêu khối để kiểm tra khi khởi động (ngầm định: 288, 0 = tất cả)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Nếu &lt;category&gt; không được cung cấp, đưa ra tất cả các thông tin gỡ rối.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>(default: %s)</source>
+        <translation>(ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Kết nối thông qua SOCKS 5 proxy</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Bản quyền (C) 2009-%i bởi Nhóm phát triển Bitcoin Core</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Bản quyền (C) 2014-%i bởi Nhóm phát triển Dash Core</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Bỏ qua các masternodes có phiên bản thấp hơn (ví dụ: 70050; ngầm định: 0)</translation>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend đang nghỉ.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Yêu cầu Darksend hoàn thành:</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Yêu cầu Darksend chưa hoàn thành:</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Tắt chế độ an toàn, ghi đè lên một sự kiện của chế đọ an toàn (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Cho phép phần mềm hoạt động như là masternode (0-1, ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Lỗi kết nối tới Masternode.</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Lỗi nạp wallet.dat: Ví cần một phiên bản mới hơn của Dash Core</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Đang hoàn tất giao dịch.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Cưỡng bức ở chế độ an toàn (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Đã kiếm đủ người dùng, đang ký ...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Sinh tiền (ngầm định: 0)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Bao nhiêu khối để kiểm tra khi khởi động (ngầm định: %u, 0 = tất cả)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Importing...</source>
         <translation>Đang nạp...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
+        <location line="+1"/>
         <source>Imports blocks from external blk000??.dat file</source>
         <translation>Nạp khối từ tệp ngoài blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Incompatible mode.</source>
         <translation>Kiểu không tương thích.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
+        <location line="+1"/>
         <source>Incompatible version.</source>
         <translation>Phiên bản không tương thích.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
+        <location line="+1"/>
         <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
         <translation>Khối sáng thế không chính xác hoặc không tìm thấy. Sai datadir cho mạng lưới?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
+        <location line="+1"/>
         <source>Information</source>
         <translation>Thông tin</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
+        <location line="+1"/>
         <source>Initialization sanity check failed. Dash Core is shutting down.</source>
         <translation>Khởi tạo việc kiểm tra tính đúng đắn thất bại. Dash Core đang được tắt.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
+        <location line="+1"/>
         <source>Input is not valid.</source>
         <translation>Đầu vào không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
+        <location line="+1"/>
         <source>InstantX options:</source>
         <translation>Tuỳ chọn InstantX:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
+        <location line="+1"/>
         <source>Insufficient funds</source>
         <translation>Không đủ tiền</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
+        <location line="+1"/>
         <source>Insufficient funds.</source>
         <translation>Không đủ tiền.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
+        <location line="+1"/>
         <source>Invalid -onion address: &apos;%s&apos;</source>
         <translation>Địa chỉ -onion không hợp lệ: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
+        <location line="+1"/>
         <source>Invalid -proxy address: &apos;%s&apos;</source>
         <translation>Địa chỉ proxy không hợp lệ: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Số tiền không hợp lệ cho -maxtxfee=&lt;số tiền&gt;: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Số tiền không hợp lệ cho -minrelaytxfee=&lt;số tiền&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
+        <location line="+1"/>
         <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Số tiền không hợp lệ cho -mintxfee =&lt;số tiền&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Số tiền không hợp lệ cho -paytxfee=&lt;số tiền&gt;: &apos;%s&apos; (ít nhất phải bằng %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
         <translation>Số tiền không hợp lệ cho -paytxfee =&lt;số tiền&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Số tiền không hợp lệ</translation>
+        <location line="+10"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>Phiên giao dịch Darksend thành công cuối cùng quá gần đây.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Giới hạn kích thước bộ đệm chữ ký tới &lt;n&gt; thành phần (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lắng nghe kết nối JSON-RPC trên &lt;cổng&gt; (ngầm định: %u hoặc mạng thử: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Lắng nghe kết nối từ &lt;cổng&gt; (ngầm định: %u hoặc mạng thử: %u)</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Khoá các masternode từ tệp cấu hình masternode (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Duy trì nhiều nhất &lt;n&gt; kết nối tới các điểm ngang cấp (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Đang trong quá trình trộn...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Không tìm thấy các Master node.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Không tìm thấy Masternode tương thích.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Không có trong danh sách Masternode.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Số lượng ví tự động sao lưu (ngầm định: 10)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Chỉ kết nối với các nút trong mạng &lt;net&gt; (IPv4, IPv6 hoặc onion)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Thêm tiền tố đầu ra debug với dấu thời gian (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+11"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>Gửi giao dịch như là giao dịch không phí nếu có thể (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Tệp chứng thực máy chủ (ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Khoá riêng của máy chủ (ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Session timed out, please resubmit.</source>
+        <translation>Phiên làm việc đã quá giờ, vui lòng gửi yêu cầu lại.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Thiết lập kích thước pool đến &lt;n&gt; (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Thiết lập kích thước khối tối thiểu tính theo bytes (ngầm định: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Thiết lập số luồng phục vụ các lời gọi RPC (ngầm định: %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Hãy chỉ rõ tệp cấu hình (ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Hãy xác định thời gian hết hạn tính theo milli giây (tối thiểu: 1, ngầm định: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Hãy chỉ ra tệp cấu hình masternode (ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Hãy chỉ rõ tệp pid (ngầm định: %s)</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Dừng chạy sau khi nạp các khối từ đĩa (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Đã gửi các những thành phần sau tới masternode: %u / %d</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Đã gửi đến masternode, đang đợi các đầu vào khác nữa (%u / %d) %s</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Đã được gửi cho masternode, đang đợi trong hàng đợi %s</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
+        <translation>Đây không phải là một Masternode.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Ngưỡng ngắt kết nối khi đối tác ngang hàng cư xử không đúng (ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Sử dụng N masternods riêng biệt để ẩn danh khoản tiền (2-8, ngầm định: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Ví cần được ghi lại: khởi động lại Dash Core để hoàn tất</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Cảnh báo: Tham số không hỗ trợ -debugnet được bỏ qua, hãy sử dụng -debug=net</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Sẽ thử lại...</translation>
+    </message>
+    <message>
+        <location line="-122"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Masternodeprivkey không hợp lệ. Hãy xem lại tài liệu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
+        <location line="+1"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Invalid private key.</source>
         <translation>Khoá riêng không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
+        <location line="+1"/>
         <source>Invalid script detected.</source>
         <translation>Kịch bản được phát hiện không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
+        <location line="+1"/>
         <source>KeePassHttp id for the established association</source>
         <translation>KeePassHttp id cho thiết lập sự kết hợp</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
+        <location line="+1"/>
         <source>KeePassHttp key for AES encrypted communication with KeePass</source>
         <translation>Khoá KeePassHttp cho liên lạc mã hoá AES với KeePass</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Giữ N dash ẩn danh hoá (ngầm định: 0)</translation>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation>Giữ nhiều nhất &lt;n&gt; các khối không kết nối được trong bộ nhớ (ngầm định: %u)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="271"/>
+        <location line="+1"/>
         <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
         <translation>Giữ nhiều nhất &lt;n&gt; các giao dịch không kết nối được trong bộ nhớ (ngầm định: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
+        <location line="+1"/>
         <source>Last Darksend was too recent.</source>
         <translation>Darksend cuối cùng quá gần.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>Darksend thành công cuối cùng quá gần.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Giới hạn kích thước bộ đệm chữ ký tới &lt;n&gt; thành phần (ngầm định: 50000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Liệt kê các lệnh</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Lắng nghe kết nối từ &lt;cổng&gt; (ngầm định: 9999 hoặc mạng thử: 19999)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="277"/>
+        <location line="+5"/>
         <source>Loading addresses...</source>
         <translation>Nạp các địa chỉ...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
+        <location line="+1"/>
         <source>Loading block index...</source>
         <translation>Đang nạp chỉ mục khối...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Đang nạp bộ đệm ngân sách...</translation>
     </message>
     <message>
-        <source>Loading masternode list...</source>
-        <translation type="vanished">Đang tải danh sách master node...</translation>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Đang tải cache cho masternode...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
+        <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
         <translation>Đang nạp ví... (%3.2f %%)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
+        <location line="+1"/>
         <source>Loading wallet...</source>
         <translation>Đang tải ví...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Lưu nhật ký các ưu tiên và phí giao dịch cho mỗi kB khi đào các khối (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Duy trì một chỉ mục giao dịch đầy đủ (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Duy trì nhiều nhất &lt;n&gt; kết nối tới các điểm ngang hàng (ngầm định: 125)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="285"/>
+        <location line="+3"/>
         <source>Masternode options:</source>
         <translation>Tuỳ chọn Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
+        <location line="+1"/>
         <source>Masternode queue is full.</source>
         <translation>Danh sách hàng đợi Masternode đã đầy.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
+        <location line="+1"/>
         <source>Masternode:</source>
         <translation>Masternode:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Tối đa cho bộ đệm nhận của mỗi kết nối, &lt;n&gt;*1000 bytes (ngầm định: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tối đa cho bộ đệm gửi của mỗi kết nối, &lt;n&gt;*1000 bytes (ngầm định: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="290"/>
+        <location line="+3"/>
         <source>Missing input transaction information.</source>
         <translation>Thiếu thông tin giao dịch đầu vào.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Không tìm thấy masternode tương thích.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="292"/>
+        <location line="+5"/>
         <source>No funds detected in need of denominating.</source>
         <translation>Không thấy có nguồn tiền cần thiết để định giá.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Không phát hiện được masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="294"/>
+        <location line="+1"/>
         <source>No matching denominations found for mixing.</source>
         <translation>Không tìm thấy mệnh giá tương ứng để trộn.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Non-standard public key detected.</source>
         <translation>Phát hiện thấy khoá công khai không hợp chuẩn.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
+        <location line="+1"/>
         <source>Not compatible with existing transactions.</source>
         <translation>Không tương thích với các giao dịch hiện tại.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
+        <location line="+1"/>
         <source>Not enough file descriptors available.</source>
         <translation>Chưa có đủ thông tin mô tả tệp.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Không có trong danh sách masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>Chỉ chấp nhận các chuỗi khối tương ứng với các điểm kiểm tra trong (ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Chỉ kết nối với các nút trong mạng &lt;net&gt; (IPv4, IPv6 hoặc Tor)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="301"/>
+        <location line="+5"/>
         <source>Options:</source>
         <translation>Tuỳ chọn:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
+        <location line="+1"/>
         <source>Password for JSON-RPC connections</source>
         <translation>Mật khẩu cho kết nối JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Thêm tiền tố đầu ra debug với dấu thời gian (ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>In khối khi khởi động, nếu tìm thấy trong chỉ mục khối</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>In cây khối khi khởi động (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="306"/>
+        <location line="+2"/>
         <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
         <translation>Tuỳ chọn RPC SSL (xem Bitcoin Wiki để có hướng dẫn cài đặt SSL)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Tuỳ chọn phần mềm RPC:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="308"/>
+        <location line="+1"/>
         <source>RPC server options:</source>
         <translation>Tuỳ chọn cho RPC server</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
         <translation>Bỏ ngẫu nhiên 1 mỗi &lt;n&gt; thông điệp mạng</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
+        <location line="+1"/>
         <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
         <translation>Làm xơ ngẫu nhiên 1 trên mỗi &lt;n&gt; thông điệp mạng.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
+        <location line="+1"/>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Tái tạo lại chỉ mục chuỗi khối từ tệp blk000??.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Rescan the block chain for missing wallet transactions</source>
         <translation>Quét lại chuỗi khối cho các giao dịch ví bị thiếu.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
+        <location line="+1"/>
         <source>Rescanning...</source>
         <translation>Đang quét lại...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Chạy một luồng để làm sạch ví một cách thường xuyên (ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="315"/>
+        <location line="+2"/>
         <source>Run in the background as a daemon and accept commands</source>
         <translation>Chạy trên chế độ nền như là một tiến trình ngầm và chấp nhận các lệnh</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Tuỳ chọn SSL: (xem Bitcoin Wiki để có hướng dẫn cài đặt SSL)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Chọn phiên bản SOCK cho -proxy (4 hoặc 5, ngầm định: 5)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Gửi lệnh đến Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Gửi các lệnh đến nút chạy trên &lt;ip&gt; (ngầm định: 127.0.0.1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="320"/>
+        <location line="+1"/>
         <source>Send trace/debug info to console instead of debug.log file</source>
         <translation>Gửi thông tin theo dõi/gỡ rối đến console thay vì tệp debug.log</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Tệp chứng thực máy chủ (ngầm định: server.cert)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Mã riêng của máy chủ (ngầm định: server.pem)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="323"/>
+        <location line="+4"/>
         <source>Session not complete!</source>
         <translation>Phiên làm việc chưa hoàn thành.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Phiên làm việc đã hết hạn (30 giây), hãy gửi lại.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="325"/>
+        <location line="+2"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Thiết lập kích thước bộ đệm cơ sở dữ liệu theo megabytes (%d đến %d, ngầm định: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Đăt kích thước pool đến &lt;n&gt; (ngầm định: 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="327"/>
+        <location line="+2"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Thiết lập kích thước khối tối đa theo bytes (ngầm định: %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Thiết lập kích thước khối tối thiểu theo bytes (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="329"/>
+        <location line="+2"/>
         <source>Set the masternode private key</source>
         <translation>Đặt khoá riêng cho masternode</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Thiết lập số luồng phục vụ các lời gọi RPC (ngầm định: 4)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Thiết lập cờ DB_PRIVATE trong môi trường cơ sở dữ liệu ví (ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="332"/>
+        <location line="+3"/>
         <source>Show all debugging options (usage: --help -help-debug)</source>
         <translation>Hiển thị tất cả các tuỳ chọn gỡ rối (cách sử dụng: --help -help-debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Hiển thị thông tin tốc độ (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="334"/>
+        <location line="+1"/>
         <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
         <translation>Rút gọn tệp debug.log khi phần mềm khởi động (ngầm định: 1 khi không có -debug)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
+        <location line="+1"/>
         <source>Signing failed.</source>
         <translation>Ký không thành công.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
+        <location line="+1"/>
         <source>Signing timed out, please resubmit.</source>
         <translation>Ký không kịp, hãy gửi lại.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
+        <location line="+1"/>
         <source>Signing transaction failed</source>
         <translation>Thất bại khi ký giao dịch</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Xác định tệp cấu hình (ngầm định: dash.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Xác định thời gian chờ kết nối tính theo mili giây (ngầm định: 5000)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="340"/>
+        <location line="+3"/>
         <source>Specify data directory</source>
         <translation>Hãy chọn thư mục</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Xác định tệp cấu hình masternode (ngầm định: masternode.conf)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Xác định tệp pid (ngầm định: dashd.pid)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="343"/>
+        <location line="+3"/>
         <source>Specify wallet file (within data directory)</source>
         <translation>Xác định tệp ví (trong thư mục dữ liệu)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
+        <location line="+1"/>
         <source>Specify your own public address</source>
         <translation>Hãy xác định địa chỉ công khai của bạn</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Tiên các khoản trả lại chưa được xác nhận khi gửi các giao dịch (ngầm định: 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Khởi động Dash Core Daemon</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Lỗi hệ thống:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="348"/>
+        <location line="+6"/>
         <source>This help message</source>
         <translation>Đây là thông điệp trợ giúp</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Điều này là để dành cho công cụ kiểm tra hồi quy và phát triển ứng dụng.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
-        <translation>Đây không phải là một masternode.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Ngưỡng ngắt kết nối khi đối tác ngang hàng cư xử không đúng (ngầm định: 100)</translation>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Đây là phần mềm thử nghiệm.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Để sử dụng tuỳ chọn %s</translation>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Điều này là để dành cho công cụ kiểm tra hồi quy và phát triển ứng dụng.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Số tiền của giao dịch quá nhỏ</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Số tiền của giao dịch phải là số dương</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Giao dịch được tạo thành công.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Phí giao dịch quá cao.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Giao dịch không hợp lệ.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>Giao dịch quá lớn cho chính sách miễn phí</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Giao dịch quá lớn</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation>Không thể để ràng buộc vào %s trên máy tính này (bind trả lại lỗi %s)</translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Đang truyền tải giao dịch cuối cùng.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation>Không thể ký cho giao dịch masternod chiến thắng, khoá sai?</translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Không thể để ràng buộc vào %s trên máy tính này (bind trả lại lỗi %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
         <translation>Không thể ký vào thông điệp phân nhánh, sai khoá?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Không biết phiên bản proxy yêu cầu -socks: %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Không biết mạng được chỉ ra trong -onlynet: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Nâng cấp ví lên định dạng mới nhất</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation>Cách sử dụng (đã từ bỏ, sử dụng dash-cli):</translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>Trạng thái không xác định: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Cách dùng:</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation>Sử dụng tích hợp KeePass 2 dùng KeePassHttp plugin (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Sử dụng N masternods riêng biệt để ẩn danh khoản tiền (2-8, ngầm định: 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Nâng cấp ví lên định dạng mới nhất</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Sử dụng OpenSSL (https) cho các kết nối JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Sử dụng UPnP để ánh xạ cổng lắng nghe (ngầm định: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Sử dụng UPnP để ánh xạ cổng lắng nghe (ngầm định: 1 khi lắng nghe)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Sử dụng mạng thử</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Username cho kết nối JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Giá tri trị lớn hơn giá trị tối đa mà bể Darksend cho phép.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Đang kiểm tra các khối...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Đang kiểm tra ví...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Chờ cho RPC server khởi động</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Ví %s nằm ở bên ngoài thư mục dữ liệu %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Ví đã bị khoá.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Ví cần được ghi lại: khởi động lại Dash để hoàn tất</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Tuỳ chọn ví:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
+        <location line="+1"/>
         <source>Warning</source>
         <translation>Cảnh báo</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Cảnh báo: Tham số -debugnet đã được bỏ, hãy sử dụng -debug=net</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Cảnh báo: Phiên bản này đã cũ, cần phải cập nhật mới!</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Bạn cần xây dựng lại cơ sở dữ liệu sử dụng -reindex để thay cho -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Các đầu vào của bạn đã được thêm vào một cách thành công.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>Giao dịch của bạn đã được chấp nhận vào bể!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Dọn sạch tất cả các giao dịch khỏi ví...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>khi khởi động</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>phiên bản</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat bị lỗi, cứu chữa không thành công.</translation>
     </message>

From b66928043e2fc86366372f915c6bb803f7764f79 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 2 Jul 2015 04:03:24 +0300
Subject: [PATCH 1479/1819] Few inv related fixes: - add missing strings and
 make inv strings a bit more consistent (imo) - remove "unknown" types that
 were used to prevent errors thrown at user with old wallet,   just log such
 errors in debug mode for "net" category. Should also make behaviour of
 functions   relaing on CInv::IsKnownType() more adequate   (and it doesn't
 make sense to warn users by throwing errors at them in such situations anyway
 I guess)

---
 src/protocol.cpp | 27 ++++++++++++---------------
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/src/protocol.cpp b/src/protocol.cpp
index 2703abc5219a..2ca8ef06bb72 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -22,19 +22,15 @@ static const char* ppszTypeName[] =
     "tx lock request",
     "tx lock vote",
     "spork",
-    "masternode winner",
-    "masternode scan",
-    "masternode vote",
-    "masternode proposal",
-    "masternode quorum",
-    "masternode announce",
-    "masternode ping",
-    "unknown",
-    "unknown",
-    "unknown",
-    "unknown",
-    "unknown",
-    "unknown"
+    "mn winner",
+    "mn scan error",
+    "mn budget vote",
+    "mn budget proposal",
+    "mn budget finalized",
+    "mn budget finalized vote",
+    "mn quorum",
+    "mn announce",
+    "mn ping"
 };
 
 CMessageHeader::CMessageHeader()
@@ -133,7 +129,7 @@ CInv::CInv(const std::string& strType, const uint256& hashIn)
         }
     }
     if (i == ARRAYLEN(ppszTypeName))
-        throw std::out_of_range(strprintf("CInv::CInv(string, uint256) : unknown type '%s'", strType));
+        LogPrint("net", "CInv::CInv(string, uint256) : unknown type '%s'", strType);
     hash = hashIn;
 }
 
@@ -150,7 +146,8 @@ bool CInv::IsKnownType() const
 const char* CInv::GetCommand() const
 {
     if (!IsKnownType())
-        throw std::out_of_range(strprintf("CInv::GetCommand() : type=%d unknown type", type));
+        LogPrint("net", "CInv::GetCommand() : type=%d unknown type", type);
+
     return ppszTypeName[type];
 }
 

From d8a6057205f42c13410a302b6d11128b8065d7f9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 08:07:30 -0700
Subject: [PATCH 1480/1819] Fixed issues with budget syncing

---
 src/masternode-budget.cpp | 72 +++++++++++++++++++++++++++------------
 src/masternode-budget.h   |  4 ---
 src/masternodeman.cpp     | 18 ++++++----
 3 files changed, 62 insertions(+), 32 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f95f6c1ccee7..6f66cbc95183 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -574,10 +574,13 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
-        if(pfrom->HasFulfilledRequest("mnvs")) {
-            LogPrintf("mnvs - peer already asked me for the list\n");
-            Misbehaving(pfrom->GetId(), 20);
-            return;
+        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal(); 
+        if(!IsLocal){
+            if(pfrom->HasFulfilledRequest("mnvs")) {
+                LogPrintf("mnvs - peer already asked me for the list\n");
+                Misbehaving(pfrom->GetId(), 20);
+                return;
+            }
         }
 
         pfrom->FulfilledRequest("mnvs");
@@ -735,14 +738,53 @@ bool CBudgetManager::PropExists(uint256 nHash)
     return false;
 }
 
-void CBudgetManager::Sync(CNode* node)
+void CBudgetManager::Sync(CNode* pfrom)
 {
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end()){
-        (*it).second.Sync(node);
-        ++it;
+    /*  
+        Sync with a client on the network
+
+        --
+
+        This code checks each of the hash maps for all known budget proposals and finalized budget proposals, then checks them against the 
+        budget object to see if they're OK. If all checks pass, we'll send it to the peer. 
+
+    */
+
+    std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
+    while(it1 != mapSeenMasternodeBudgetProposals.end()){
+        CBudgetProposal* bp = budget.FindProposal((*it1).first);
+        if(bp){
+            pfrom->PushMessage("mprop", ((*it1).second));
+        }
+        it1++;
     }
 
+    std::map<uint256, CBudgetVote>::iterator it2 = mapSeenMasternodeBudgetVotes.begin();
+    while(it2 != mapSeenMasternodeBudgetVotes.end()){
+        CBudgetProposal* bp = budget.FindProposal((*it2).second.nProposalHash);
+        if(bp){
+            pfrom->PushMessage("mvote", ((*it2).second));
+        }
+        it2++;
+    }
+
+    std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
+    while(it3 != mapSeenFinalizedBudgets.end()){
+        CFinalizedBudget* bp = budget.FindFinalizedBudget((*it3).first);
+        if(bp){
+            pfrom->PushMessage("fbs", ((*it3).second));
+        }
+        it3++;
+    }
+
+    std::map<uint256, CFinalizedBudgetVote>::iterator it4 = mapSeenFinalizedBudgetVotes.begin();
+    while(it4 != mapSeenFinalizedBudgetVotes.end()){
+        CFinalizedBudget* bp = budget.FindFinalizedBudget((*it4).second.nBudgetHash);
+        if(bp){
+            pfrom->PushMessage("fbvote", ((*it4).second));
+        }
+        it4++;
+    }
 }
 
 void CBudgetManager::UpdateProposal(CBudgetVote& vote)
@@ -925,18 +967,6 @@ int CBudgetProposal::GetRemainingPaymentCount()
     return (GetBlockEndCycle()-GetBlockCurrentCycle())/GetBudgetPaymentCycleBlocks();
 }
 
-void CBudgetProposal::Sync(CNode* node)
-{
-    //send the proposal
-    node->PushMessage("mprop", (*this));
-
-    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
-    while(it != mapVotes.end()){
-        node->PushMessage("mvote", (*it).second);
-        ++it;
-    }
-}
-
 CBudgetProposalBroadcast::CBudgetProposalBroadcast()
 {
     vin = CTxIn();
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 782f32b1f676..500e86eb6ffb 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -184,8 +184,6 @@ class CFinalizedBudget
     CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
 
-    void Sync(CNode* node);
-
     void Clean(CFinalizedBudgetVote& vote);
     void AddOrUpdateVote(CFinalizedBudgetVote& vote);
     double GetScore();
@@ -362,8 +360,6 @@ class CBudgetProposal
     CBudgetProposal(const CBudgetProposal& other);
     CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn);
 
-    void Sync(CNode* node);
-
     void Calculate();
     void AddOrUpdateVote(CBudgetVote& vote);
     bool HasMinimumRequiredSupport();
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 8bf0d23716b4..95bc3d1010bf 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -319,12 +319,14 @@ void CMasternodeMan::DsegUpdate(CNode* pnode)
 {
     LOCK(cs);
 
-    std::map<CNetAddr, int64_t>::iterator it = mWeAskedForMasternodeList.find(pnode->addr);
-    if (it != mWeAskedForMasternodeList.end())
-    {
-        if (GetTime() < (*it).second) {
-            LogPrintf("dseg - we already asked %s for the list; skipping...\n", pnode->addr.ToString());
-            return;
+    if(!(pnode->addr.IsRFC1918() || pnode->addr.IsLocal())){
+        std::map<CNetAddr, int64_t>::iterator it = mWeAskedForMasternodeList.find(pnode->addr);
+        if (it != mWeAskedForMasternodeList.end())
+        {
+            if (GetTime() < (*it).second) {
+                LogPrintf("dseg - we already asked %s for the list; skipping...\n", pnode->addr.ToString());
+                return;
+            }
         }
     }
     pnode->PushMessage("dseg", CTxIn());
@@ -659,7 +661,9 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         if(vin == CTxIn()) { //only should ask for this once
             //local network
-            if(!pfrom->addr.IsRFC1918() && Params().NetworkID() == CBaseChainParams::MAIN) {
+            bool isLocal = (pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal());
+
+            if(!isLocal && Params().NetworkID() == CBaseChainParams::MAIN) {
                 std::map<CNetAddr, int64_t>::iterator i = mAskedUsForMasternodeList.find(pfrom->addr);
                 if (i != mAskedUsForMasternodeList.end()){
                     int64_t t = (*i).second;

From 28052240a54db820b3dbb38e260070071f61c3bc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 09:41:33 -0700
Subject: [PATCH 1481/1819] Improvements for syncing budget votes

- New orphan object and reprocessing logic
- Added some logic for asking peers for missing proposals and finalized budgets
---
 src/darksend.cpp             |  3 +-
 src/masternode-budget.cpp    | 91 +++++++++++++++++++++++++++++-------
 src/masternode-budget.h      |  7 +--
 src/rpcmasternode-budget.cpp |  8 ++--
 4 files changed, 84 insertions(+), 25 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 937a5347dada..054cd83ef5db 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2376,7 +2376,8 @@ void ThreadCheckDarkSendPool()
                                 mnodeman.DsegUpdate(pnode);
 
                                 pnode->PushMessage("mnget"); //sync payees
-                                pnode->PushMessage("mnvs"); //sync masternode votes
+                                uint256 n = 0;
+                                pnode->PushMessage("mnvs", n); //sync masternode votes
                                 pnode->PushMessage("getsporks"); //get current network sporks
                                 RequestedMasternodeAssets++;
                                 break;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 6f66cbc95183..f2868f857988 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -16,8 +16,13 @@ CCriticalSection cs_budget;
 
 std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
 std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
+std::map<uint256, CBudgetVote> mapOrphanMasternodeBudgetVotes;
 std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
 std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
+std::map<uint256, CFinalizedBudgetVote> mapOrphanFinalizedBudgetVotes;
+
+std::map<uint256, int64_t> askedForSourceProposalOrBudget;
+
 int nSubmittedFinalBudget;
 
 int GetBudgetPaymentCycleBlocks(){
@@ -27,6 +32,28 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
+void CheckOrphanVotes()
+{
+    std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
+    while(it1 != mapOrphanMasternodeBudgetVotes.end()){
+        if(budget.UpdateProposal(((*it1).second), NULL)){
+            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            mapOrphanMasternodeBudgetVotes.erase(it1++);
+        } else {
+            ++it1;
+        }
+    }
+    std::map<uint256, CFinalizedBudgetVote>::iterator it2 = mapOrphanFinalizedBudgetVotes.begin();
+    while(it2 != mapOrphanFinalizedBudgetVotes.end()){
+        if(budget.UpdateFinalizedBudget(((*it2).second),NULL)){
+            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            mapOrphanFinalizedBudgetVotes.erase(it2++);
+        } else {
+            ++it2;
+        }
+    }
+}
+
 void SubmitFinalBudget()
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -85,7 +112,7 @@ void SubmitFinalBudget()
 
     mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
     vote.Relay();
-    budget.UpdateFinalizedBudget(vote);
+    budget.UpdateFinalizedBudget(vote, NULL);
 }
 
 //
@@ -583,8 +610,11 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             }
         }
 
+        uint256 nProp;
+        vRecv >> nProp;
+
         pfrom->FulfilledRequest("mnvs");
-        budget.Sync(pfrom);
+        budget.Sync(pfrom, nProp);
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString().c_str());
     }
 
@@ -625,6 +655,9 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
             //can only do this four times a day on the network
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=25;
+
+            //We might have active votes for this proposal that are valid now
+            CheckOrphanVotes();
         } else {
             LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
             return;
@@ -653,7 +686,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            budget.UpdateProposal(vote);
+            budget.UpdateProposal(vote, pfrom);
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
@@ -694,6 +727,9 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             prop.Relay();
 
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+
+            //we might have active votes for this budget that are now valid
+            CheckOrphanVotes();
         } else {
             LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
             return;
@@ -722,7 +758,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            budget.UpdateFinalizedBudget(vote);
+            budget.UpdateFinalizedBudget(vote, pfrom);
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
@@ -738,7 +774,7 @@ bool CBudgetManager::PropExists(uint256 nHash)
     return false;
 }
 
-void CBudgetManager::Sync(CNode* pfrom)
+void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 {
     /*  
         Sync with a client on the network
@@ -753,7 +789,7 @@ void CBudgetManager::Sync(CNode* pfrom)
     std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
         CBudgetProposal* bp = budget.FindProposal((*it1).first);
-        if(bp){
+        if(bp && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mprop", ((*it1).second));
         }
         it1++;
@@ -762,7 +798,7 @@ void CBudgetManager::Sync(CNode* pfrom)
     std::map<uint256, CBudgetVote>::iterator it2 = mapSeenMasternodeBudgetVotes.begin();
     while(it2 != mapSeenMasternodeBudgetVotes.end()){
         CBudgetProposal* bp = budget.FindProposal((*it2).second.nProposalHash);
-        if(bp){
+        if(bp && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mvote", ((*it2).second));
         }
         it2++;
@@ -771,7 +807,7 @@ void CBudgetManager::Sync(CNode* pfrom)
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* bp = budget.FindFinalizedBudget((*it3).first);
-        if(bp){
+        if(bp && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("fbs", ((*it3).second));
         }
         it3++;
@@ -780,35 +816,56 @@ void CBudgetManager::Sync(CNode* pfrom)
     std::map<uint256, CFinalizedBudgetVote>::iterator it4 = mapSeenFinalizedBudgetVotes.begin();
     while(it4 != mapSeenFinalizedBudgetVotes.end()){
         CFinalizedBudget* bp = budget.FindFinalizedBudget((*it4).second.nBudgetHash);
-        if(bp){
+        if(bp && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("fbvote", ((*it4).second));
         }
         it4++;
     }
 }
 
-void CBudgetManager::UpdateProposal(CBudgetVote& vote)
+bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
 {
     LOCK(cs);
+
     if(!mapProposals.count(vote.nProposalHash)){
-        LogPrintf("ERROR : Unknown proposal %d\n", vote.nProposalHash.ToString().c_str());
-        return;
+        if(pfrom){
+            LogPrintf("Unknown proposal %d, Asking for source proposal\n", vote.nProposalHash.ToString().c_str());
+            mapOrphanMasternodeBudgetVotes[vote.nProposalHash] = vote;
+
+            if(!askedForSourceProposalOrBudget.count(vote.nProposalHash)){
+                pfrom->PushMessage("mnvs", vote.nProposalHash);
+                askedForSourceProposalOrBudget[vote.nProposalHash] = GetTime();
+            }
+        }
+
+        return false;
     }
 
+
     mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
+    return true;
 }
 
-void CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote)
+bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom)
 {
     LOCK(cs);
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
-        LogPrintf("ERROR: Unknown Finalized Proposal %s\n", vote.nBudgetHash.ToString().c_str());
-        //should ask for it
-        return;
+        if(pfrom){
+            LogPrintf("Unknown Finalized Proposal %s, Asking for source proposal\n", vote.nBudgetHash.ToString().c_str());
+            mapOrphanFinalizedBudgetVotes[vote.nBudgetHash] = vote;
+
+            if(!askedForSourceProposalOrBudget.count(vote.nBudgetHash)){
+                pfrom->PushMessage("mnvs", vote.nBudgetHash);
+                askedForSourceProposalOrBudget[vote.nBudgetHash] = GetTime();
+            }
+
+        }
+        return false;
     }
 
     mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
+    return true;
 }
 
 CBudgetProposal::CBudgetProposal()
@@ -1318,7 +1375,7 @@ void CFinalizedBudget::SubmitVote()
 
     mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
     vote.Relay();
-    budget.UpdateFinalizedBudget(vote);
+    budget.UpdateFinalizedBudget(vote, NULL);
 }
 
 CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 500e86eb6ffb..38aaafce6f77 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -88,7 +88,7 @@ class CBudgetManager
     int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
     int sizeProposals() {return (int)mapProposals.size();}
 
-    void Sync(CNode* node);
+    void Sync(CNode* node, uint256 nProp);
 
     void Calculate();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
@@ -106,9 +106,10 @@ class CBudgetManager
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nBlockHeight);
     void AddProposal(CBudgetProposal& prop);
-    void UpdateProposal(CBudgetVote& vote);
     void AddFinalizedBudget(CFinalizedBudget& prop);
-    void UpdateFinalizedBudget(CFinalizedBudgetVote& vote);
+
+    bool UpdateProposal(CBudgetVote& vote, CNode* pfrom);
+    bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom);
     bool PropExists(uint256 nHash);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     std::string GetRequiredPaymentsString(int64_t nBlockHeight);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 0fd22447a18b..85b487b37eb5 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -223,7 +223,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
-        budget.UpdateProposal(vote);
+        budget.UpdateProposal(vote, NULL);
 
     }
 
@@ -400,7 +400,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
-        budget.UpdateFinalizedBudget(vote);
+        budget.UpdateFinalizedBudget(vote, NULL);
 
         return "success";
 
@@ -455,7 +455,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
             mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
-            budget.UpdateFinalizedBudget(vote);
+            budget.UpdateFinalizedBudget(vote, NULL);
 
             success++;
         }
@@ -488,7 +488,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
-        budget.UpdateFinalizedBudget(vote);
+        budget.UpdateFinalizedBudget(vote, NULL);
 
         return "success";
     }

From 13bd6a15eb5d8d5920f5c51cffa12cab292cb7ff Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 09:45:28 -0700
Subject: [PATCH 1482/1819] version/proto bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 2 +-
 src/version.h       | 6 +++---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 569ab21cd25f..b4873074cc74 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 6)
+define(_CLIENT_VERSION_BUILD, 7)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index eba3456254ab..caaf788c3593 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 6
+#define CLIENT_VERSION_BUILD 7
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index ce8f4a707cc1..2609bf1b8192 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70082;
+static const int MIN_INSTANTX_PROTO_VERSION = 70083;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index fb2ac5860236..db712ded2441 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70082;
+static const int PROTOCOL_VERSION = 70083;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,13 +22,13 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70082;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70083;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70082;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70083;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 5fdaf0bfc114a19f3ee2a2444cddf795a6ae7961 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 09:53:55 -0700
Subject: [PATCH 1483/1819] added checkpoint

---
 src/chainparams.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 05f12e53ef1e..461e5aa10fe2 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -84,6 +84,7 @@ static const Checkpoints::CCheckpointData data = {
 static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
         boost::assign::map_list_of
         ( 261, uint256("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))
+        ( 77100, uint256("00000133e07bae4d3553fd8d86cb5a961d638cae72d179ede8ca436c60a2c3c0"))
         ;
 static const Checkpoints::CCheckpointData dataTestnet = {
         &mapCheckpointsTestnet,

From 3bd8cc1e98d4d7f65cc033093331c7a09b680e71 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 15:34:11 -0700
Subject: [PATCH 1484/1819] fixed bug with proposals

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f2868f857988..13a143d2334a 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1265,7 +1265,7 @@ int64_t CFinalizedBudget::GetTotalPayout()
 }
 
 std::string CFinalizedBudget::GetProposals() {
-    std::string ret = "aeu";
+    std::string ret = "";
 
     BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
         CFinalizedBudget* prop = budget.FindFinalizedBudget(payment.nProposalHash);

From 189e48328db11b691e4de24397ed9a6a5805028f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 3 Jul 2015 01:09:14 +0300
Subject: [PATCH 1485/1819] fix 2 crashes

---
 src/init.cpp            | 3 ++-
 src/masternode.cpp      | 2 ++
 src/qt/overviewpage.cpp | 4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 15ee267c04c4..2489ceb9224c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -120,7 +120,7 @@ void StartShutdown()
 }
 bool ShutdownRequested()
 {
-    return fRequestShutdown;
+    return fRequestShutdown || fRestartRequested;
 }
 
 class CCoinsViewErrorCatcher : public CCoinsViewBacked
@@ -149,6 +149,7 @@ static CCoinsViewErrorCatcher *pcoinscatcher = NULL;
 /** Preparing steps before shutting down or restarting the wallet */
 void PrepareShutdown()
 {
+    fRequestShutdown = true; // Needed when we shutdown the wallet
     fRestartRequested = true; // Needed when we restart the wallet
     LogPrintf("%s: In progress...\n", __func__);
     static CCriticalSection cs_Shutdown;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index fb98f4e2a520..d57f6420e8f0 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -191,6 +191,8 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
 
 void CMasternode::Check()
 {
+    if(ShutdownRequested()) return;
+
     //TODO: Random segfault with this line removed
     TRY_LOCK(cs_main, lockRecv);
     if(!lockRecv) return;
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1ec9929d7112..6c473940c772 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -306,7 +306,9 @@ void OverviewPage::showOutOfSyncWarning(bool fShow)
 
 void OverviewPage::updateDarksendProgress()
 {
-    if(IsInitialBlockDownload()) return;
+    if(IsInitialBlockDownload() || ShutdownRequested()) return;
+
+    if(!pwalletMain || !walletModel || !walletModel->getOptionsModel()) return;
 
     int64_t nBalance = pwalletMain->GetBalance();
     QString strAmountAndRounds;

From 4420d563cb55e0c4f8e2f6ab910bd08ef2a27e81 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 2 Jul 2015 17:51:31 -0700
Subject: [PATCH 1486/1819] fixed proposal display functionality

---
 src/masternode-budget.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 13a143d2334a..b0bb25cc51cb 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1268,13 +1268,13 @@ std::string CFinalizedBudget::GetProposals() {
     std::string ret = "";
 
     BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
-        CFinalizedBudget* prop = budget.FindFinalizedBudget(payment.nProposalHash);
+        CBudgetProposal* prop = budget.FindProposal(payment.nProposalHash);
 
         std::string token = payment.nProposalHash.ToString();
 
         if(prop) token = prop->GetName();
         if(ret == "") {ret = token;}
-        else {ret = "," + token;}
+        else {ret += "," + token;}
     }
     return ret;
 }

From 8ba0328b71471ee7fe106a8477a8fa87f16c3e9e Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Fri, 3 Jul 2015 07:55:45 +0200
Subject: [PATCH 1487/1819] Only restart wallet 1x, no matter how often a user
 clicks on a restart-button

---
 src/init.cpp    |  5 ++++-
 src/qt/dash.cpp | 42 +++++++++++++++++++++++++-----------------
 2 files changed, 29 insertions(+), 18 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 15ee267c04c4..1e3f1d5d9431 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -828,8 +828,11 @@ bool AppInit2(boost::thread_group& threadGroup)
     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())
+
+    // Wait maximum 10 seconds if an old wallet is still running. Avoids lockup during restart
+    if (!lock.timed_lock(boost::get_system_time() + boost::posix_time::seconds(10)))
         return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Dash Core is probably already running."), strDataDir));
+
 #ifndef WIN32
     CreatePidFile(GetPidFile(), getpid());
 #endif
diff --git a/src/qt/dash.cpp b/src/qt/dash.cpp
index 3b788e8dc307..b10ffeb3fb92 100644
--- a/src/qt/dash.cpp
+++ b/src/qt/dash.cpp
@@ -185,6 +185,9 @@ public slots:
 private:
     boost::thread_group threadGroup;
 
+    /// Flag indicating a restart
+    bool execute_restart;
+
     /// Pass fatal exception message to UI thread
     void handleRunawayException(std::exception *e);
 };
@@ -262,6 +265,8 @@ void BitcoinCore::handleRunawayException(std::exception *e)
 
 void BitcoinCore::initialize()
 {
+    execute_restart = true;
+
     try
     {
         qDebug() << __func__ << ": Running AppInit2 in thread";
@@ -282,23 +287,26 @@ void BitcoinCore::initialize()
 }
 
 void BitcoinCore::restart(QStringList args)
-{      
-    try
-    {
-        qDebug() << __func__ << ": Running Restart in thread";
-        threadGroup.interrupt_all();
-        threadGroup.join_all();
-        PrepareShutdown();
-        qDebug() << __func__ << ": Shutdown finished";
-        emit shutdownResult(1);
-        CExplicitNetCleanup::callCleanup();
-        QProcess::startDetached(QApplication::applicationFilePath(), args);
-        qDebug() << __func__ << ": Restart initiated...";
-        QApplication::quit();
-    } catch (std::exception& e) {
-        handleRunawayException(&e);
-    } catch (...) {
-        handleRunawayException(NULL);
+{
+    if(execute_restart) { // Only restart 1x, no matter how often a user clicks on a restart-button
+        execute_restart = false;
+        try
+        {
+            qDebug() << __func__ << ": Running Restart in thread";
+            threadGroup.interrupt_all();
+            threadGroup.join_all();
+            PrepareShutdown();
+            qDebug() << __func__ << ": Shutdown finished";
+            emit shutdownResult(1);
+            CExplicitNetCleanup::callCleanup();
+            QProcess::startDetached(QApplication::applicationFilePath(), args);
+            qDebug() << __func__ << ": Restart initiated...";
+            QApplication::quit();
+        } catch (std::exception& e) {
+            handleRunawayException(&e);
+        } catch (...) {
+            handleRunawayException(NULL);
+        }
     }
 }
 

From 151cb174f23f79181727cae6a873cd702d6ead6c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 3 Jul 2015 09:52:27 -0700
Subject: [PATCH 1488/1819] Disable autostart in regtest mode

---
 src/init.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 15ee267c04c4..5b17d5edbab8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1484,7 +1484,7 @@ bool AppInit2(boost::thread_group& threadGroup)
             return InitError(_("You must specify a masternodeprivkey in the configuration. Please see documentation for help."));
         }
 
-        activeMasternode.ManageStatus();
+        if(Params().NetworkID() != CBaseChainParams::REGTEST) activeMasternode.ManageStatus();
     }
 
     if(GetBoolArg("-mnconflock", true)) {

From 6becaf046230b106003d37e3f9a88562aeef8839 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 3 Jul 2015 10:54:10 -0700
Subject: [PATCH 1489/1819] Added mnbudget projection and changed "show"

- Show now shows every proposal that is known, which seems to be the general expected behavior of the users
- Added "projection" for showing what will end up in the budget if it was finalized currently
---
 configure.ac                 |  2 +-
 src/clientversion.h          |  2 +-
 src/masternode-budget.cpp    | 17 +++++++++++++++-
 src/masternode-budget.h      |  1 +
 src/rpcmasternode-budget.cpp | 38 ++++++++++++++++++++++++++++++++++--
 5 files changed, 55 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index b4873074cc74..610d215eb90b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 7)
+define(_CLIENT_VERSION_BUILD, 8)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index caaf788c3593..5183a012d798 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 7
+#define CLIENT_VERSION_BUILD 8
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index b0bb25cc51cb..a8e93abfd981 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -458,6 +458,22 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     return false;
 }
 
+std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
+{
+    std::vector<CBudgetProposal*> ret;
+
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end())
+    {
+        CBudgetProposal* prop = &((*it2).second);
+        ret.push_back(prop);
+
+        it2++;
+    }
+
+    return ret;
+}
+
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
@@ -496,7 +512,6 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         //prop start/end should be inside this period
         if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd) 
         {
-
             if(nTotalBudget == nBudgetAllocated){
                 prop->SetAllotted(0);
             } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 38aaafce6f77..c3f6f3f25b4e 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -103,6 +103,7 @@ class CBudgetManager
 
     int64_t GetTotalBudget(int nHeight);
     std::vector<CBudgetProposal*> GetBudget();
+    std::vector<CBudgetProposal*> GetAllProposals();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nBlockHeight);
     void AddProposal(CBudgetProposal& prop);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 85b487b37eb5..66bffafcce94 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -25,7 +25,7 @@ Value mnbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show"))
+        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show" && strCommand != "projection"))
         throw runtime_error(
                 "mnbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
@@ -36,6 +36,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 "  getvotes           - Show current masternode budgets\n"
                 "  getinfo            - Show current masternode budgets\n"
                 "  show               - Show all budgets\n"
+                "  projection         - Show the projection of which proposals will be paid the next cycle\n"
                 );
 
     if(strCommand == "vote-many")
@@ -227,7 +228,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
     }
 
-    if(strCommand == "show")
+    if(strCommand == "projection")
     {
         Object resultObj;
         int64_t nTotalAllotted = 0;
@@ -261,6 +262,39 @@ Value mnbudget(const Array& params, bool fHelp)
         return resultObj;
     }
 
+    if(strCommand == "show")
+    {
+        Object resultObj;
+        int64_t nTotalAllotted = 0;
+
+        std::vector<CBudgetProposal*> winningProps = budget.GetAllProposals();
+        BOOST_FOREACH(CBudgetProposal* prop, winningProps)
+        {
+            nTotalAllotted += prop->GetAllotted();
+
+            CTxDestination address1;
+            ExtractDestination(prop->GetPayee(), address1);
+            CBitcoinAddress address2(address1);
+
+            Object bObj;
+            bObj.push_back(Pair("URL",  prop->GetURL()));
+            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
+            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
+            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
+            bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
+            bObj.push_back(Pair("Ratio",  prop->GetRatio()));
+            bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
+            bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
+            bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
+            bObj.push_back(Pair("Amount",  (int64_t)prop->GetAmount()));
+            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
+        }
+
+        return resultObj;
+    }
+
     if(strCommand == "getinfo")
     {
         if (params.size() != 2)

From ead842d6231599e3b9c3e7895a92770244c36d6c Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 15 May 2015 11:44:58 +0200
Subject: [PATCH 1490/1819] Remove assertion from ~LockedPageManager

This assertion will occur any time that the client quits without
shutting down properly due to an error condition. As the user will
report this error instead of the error that was the root cause, it is
better to remove it.
---
 src/allocators.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/allocators.h b/src/allocators.h
index 78a3b76d0cd9..42550119d856 100644
--- a/src/allocators.h
+++ b/src/allocators.h
@@ -40,7 +40,6 @@ class LockedPageManagerBase
 
     ~LockedPageManagerBase()
     {
-        assert(this->GetLockedPageCount() == 0);
     }
 
 

From a33c569a1d0879b8d3869cb1f01e93f75216b75f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 4 Jul 2015 07:55:52 +0300
Subject: [PATCH 1491/1819] Store current unit as a private member of
 OverviewPage object and use it instead of calling
 walletModel->getOptionsModel()->getDisplayUnit(). This should solve an issue
 when walletModel->getOptionsModel()->getDisplayUnit() fails on
 shutdown/restart even if (walletModel && walletModel->getOptionsModel()) is
 true.

---
 src/qt/overviewpage.cpp | 30 +++++++++++++-----------------
 src/qt/overviewpage.h   |  1 +
 2 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 6c473940c772..1370125223bd 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -178,7 +178,6 @@ OverviewPage::~OverviewPage()
 
 void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& anonymizedBalance, const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance)
 {
-    int unit = walletModel->getOptionsModel()->getDisplayUnit();
     currentBalance = balance;
     currentUnconfirmedBalance = unconfirmedBalance;
     currentImmatureBalance = immatureBalance;
@@ -186,15 +185,15 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
     currentWatchOnlyBalance = watchOnlyBalance;
     currentWatchUnconfBalance = watchUnconfBalance;
     currentWatchImmatureBalance = watchImmatureBalance;
-    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways));
-    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(unit, immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelAnonymized->setText(BitcoinUnits::formatWithUnit(unit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(unit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(unit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(unit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(unit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
+    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelAnonymized->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users
@@ -280,12 +279,13 @@ void OverviewPage::updateDisplayUnit()
 {
     if(walletModel && walletModel->getOptionsModel())
     {
+        nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
         if(currentBalance != -1)
             setBalance(currentBalance, currentUnconfirmedBalance, currentImmatureBalance, currentAnonymizedBalance,
                        currentWatchOnlyBalance, currentWatchUnconfBalance, currentWatchImmatureBalance);
 
         // Update txdelegate->unit with the current unit
-        txdelegate->unit = walletModel->getOptionsModel()->getDisplayUnit();
+        txdelegate->unit = nDisplayUnit;
 
         ui->listTransactions->update();
     }
@@ -308,11 +308,10 @@ void OverviewPage::updateDarksendProgress()
 {
     if(IsInitialBlockDownload() || ShutdownRequested()) return;
 
-    if(!pwalletMain || !walletModel || !walletModel->getOptionsModel()) return;
+    if(!pwalletMain) return;
 
     int64_t nBalance = pwalletMain->GetBalance();
     QString strAmountAndRounds;
-    int nDisplayUnit = walletModel->getOptionsModel()->getDisplayUnit();
     QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
 
     if(nBalance == 0)
@@ -460,10 +459,7 @@ void OverviewPage::toggleDarksend(){
         int64_t balance = pwalletMain->GetBalance();
         float minAmount = 1.49 * COIN;
         if(balance < minAmount){
-            QString strMinAmount(
-                BitcoinUnits::formatWithUnit(
-                    walletModel->getOptionsModel()->getDisplayUnit(),
-                    minAmount));
+            QString strMinAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, minAmount));
             QMessageBox::warning(this, tr("Darksend"),
                 tr("Darksend requires at least %1 to use.").arg(strMinAmount),
                 QMessageBox::Ok, QMessageBox::Ok);
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 2f4a21784272..d73d144cf1e4 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -56,6 +56,7 @@ public slots:
     CAmount currentWatchOnlyBalance;
     CAmount currentWatchUnconfBalance;
     CAmount currentWatchImmatureBalance;
+    int nDisplayUnit;
 
     TxViewDelegate *txdelegate;
     TransactionFilterProxy *filter;

From 42d9a581a1d5ca5b51e74a1b9889a3d520f65362 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 3 Jul 2015 22:05:10 -0700
Subject: [PATCH 1492/1819] Smarter nHeight detection for masternode payments

---
 src/main.cpp              | 20 ++++++++++++++++++--
 src/masternode-budget.cpp |  2 +-
 src/masternode-budget.h   |  5 +----
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index c0c54da2e55f..77e09c3387b1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2938,9 +2938,25 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev != NULL)
     {
-        if(!IsBlockPayeeValid(block.vtx[0], pindexPrev->nHeight+1))
+        int nHeight = 0;
+        if(pindexPrev->GetBlockHash() == block.hashPrevBlock)
         {
-            return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
+            nHeight = pindexPrev->nHeight+1;
+        } else { //out of order
+            BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex){
+                if(item.first == block.hashPrevBlock) {
+                    nHeight = item.second->nHeight+1;
+                }
+            }
+        }
+
+        if(nHeight != 0){
+            if(!IsBlockPayeeValid(block.vtx[0], nHeight))
+            {
+                return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
+            }
+        } else {
+            LogPrintf("CheckBlock() : WARNING: Couldn't find previous block, skipping IsBlockPayeeValid()");
         }
     }
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index a8e93abfd981..9532b13085a7 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -510,7 +510,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         CBudgetProposal* prop = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd) 
+        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas() > 10) 
         {
             if(nTotalBudget == nBudgetAllocated){
                 prop->SetAllotted(0);
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index c3f6f3f25b4e..dcfd1f4c4e84 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -98,7 +98,6 @@ class CBudgetManager
     CFinalizedBudget *FindFinalizedBudget(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
 
-
     void CleanUp();
 
     int64_t GetTotalBudget(int nHeight);
@@ -324,9 +323,7 @@ class CFinalizedBudgetVote
         READWRITE(nTime);
         READWRITE(vchSig);
     }
-
-
-
+    
 };
 
 //

From ed799658a94d2e1078e9777d09f710202f6a32b1 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 3 Jul 2015 22:09:04 -0700
Subject: [PATCH 1493/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 610d215eb90b..c4ff20a48e08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 8)
+define(_CLIENT_VERSION_BUILD, 9)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 5183a012d798..5e99ab048ed8 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 8
+#define CLIENT_VERSION_BUILD 9
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 87e72e03315b6267e28151919e4c7aa4fe586338 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sat, 4 Jul 2015 15:27:37 +0200
Subject: [PATCH 1494/1819] Persist Date and Type filters in "Transactions" tab

---
 src/qt/transactionview.cpp | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 078182a0e384..bbd37940f7e9 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -29,6 +29,7 @@
 #include <QMenu>
 #include <QPoint>
 #include <QScrollBar>
+#include <QSettings>
 #include <QSignalMapper>
 #include <QTableView>
 #include <QUrl>
@@ -38,6 +39,7 @@ TransactionView::TransactionView(QWidget *parent) :
     QWidget(parent), model(0), transactionProxyModel(0),
     transactionView(0)
 {
+    QSettings settings;
     // Build filter row
     setContentsMargins(0,0,0,0);
 
@@ -71,6 +73,7 @@ TransactionView::TransactionView(QWidget *parent) :
     dateWidget->addItem(tr("Last month"), LastMonth);
     dateWidget->addItem(tr("This year"), ThisYear);
     dateWidget->addItem(tr("Range..."), Range);
+    dateWidget->setCurrentIndex(settings.value("transactionDate").toInt());
     hlayout->addWidget(dateWidget);
 
     typeWidget = new QComboBox(this);
@@ -80,8 +83,8 @@ TransactionView::TransactionView(QWidget *parent) :
     typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH);
 #endif
 
-    typeWidget->addItem(tr("Most Common"), TransactionFilterProxy::COMMON_TYPES);
     typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES);
+    typeWidget->addItem(tr("Most Common"), TransactionFilterProxy::COMMON_TYPES);
     typeWidget->addItem(tr("Received with"), TransactionFilterProxy::TYPE(TransactionRecord::RecvWithAddress) |
                                         TransactionFilterProxy::TYPE(TransactionRecord::RecvFromOther));
     typeWidget->addItem(tr("Sent to"), TransactionFilterProxy::TYPE(TransactionRecord::SendToAddress) |
@@ -94,6 +97,7 @@ TransactionView::TransactionView(QWidget *parent) :
     typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(TransactionRecord::SendToSelf));
     typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(TransactionRecord::Generated));
     typeWidget->addItem(tr("Other"), TransactionFilterProxy::TYPE(TransactionRecord::Other));
+    typeWidget->setCurrentIndex(settings.value("transactionType").toInt());
 
     hlayout->addWidget(typeWidget);
 
@@ -181,6 +185,7 @@ TransactionView::TransactionView(QWidget *parent) :
 
 void TransactionView::setModel(WalletModel *model)
 {
+    QSettings settings;
     this->model = model;
     if(model)
     {
@@ -236,6 +241,10 @@ void TransactionView::setModel(WalletModel *model)
 
         // Watch-only signal
         connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyColumn(bool)));
+        
+        // Update transaction list with persisted settings
+        chooseType(settings.value("transactionType").toInt());
+        chooseDate(settings.value("transactionDate").toInt());
     }
 }
 
@@ -285,6 +294,11 @@ void TransactionView::chooseDate(int idx)
         dateRangeChanged();
         break;
     }
+    // Persist settings
+    if (dateWidget->itemData(idx).toInt() != Range){
+        QSettings settings;
+        settings.setValue("transactionDate", idx);
+    }
 }
 
 void TransactionView::chooseType(int idx)
@@ -293,6 +307,9 @@ void TransactionView::chooseType(int idx)
         return;
     transactionProxyModel->setTypeFilter(
         typeWidget->itemData(idx).toInt());
+    // Persist settings
+    QSettings settings;
+    settings.setValue("transactionType", idx);
 }
 
 void TransactionView::chooseWatchonly(int idx)

From 27a2ceb28778b95886327108e336248599e665f4 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sat, 4 Jul 2015 15:29:21 +0200
Subject: [PATCH 1495/1819] Popup information on first mixing

---
 src/qt/overviewpage.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 1370125223bd..05e94c40eca7 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -20,6 +20,7 @@
 
 #include <QAbstractItemDelegate>
 #include <QPainter>
+#include <QSettings>
 #include <QTimer>
 
 #define DECORATION_SIZE 48
@@ -455,6 +456,15 @@ void OverviewPage::darksendReset(){
 }
 
 void OverviewPage::toggleDarksend(){
+    QSettings settings;
+    // Popup some information on first mixing
+    QString hasMixed = settings.value("hasMixed").toString();
+    if(hasMixed.isEmpty()){
+        QMessageBox::information(this, tr("Darksend"),
+                tr("If you don't want to see internal Darksend fees/transactions select \"Most Common\" as Type on the \"Transactions\" tab."),
+                QMessageBox::Ok, QMessageBox::Ok);
+        settings.setValue("hasMixed", "hasMixed");
+    }
     if(!fEnableDarksend){
         int64_t balance = pwalletMain->GetBalance();
         float minAmount = 1.49 * COIN;

From b04ffb923c42f62b11fcdc1defaa45d198c8f7ae Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 07:27:20 -0700
Subject: [PATCH 1496/1819] Rebuild coinbase cache when needed

---
 src/chain.cpp          | 8 ++++++++
 src/coinbase-payee.cpp | 7 +++++--
 src/coinbase-payee.h   | 2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index e13c0478614b..222d98981f67 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -4,6 +4,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chain.h"
+#include "coinbase-payee.h"
 
 using namespace std;
 
@@ -15,10 +16,17 @@ void CChain::SetTip(CBlockIndex *pindex) {
         vChain.clear();
         return;
     }
+    int nChainSwitch = 0;
     vChain.resize(pindex->nHeight + 1);
     while (pindex && vChain[pindex->nHeight] != pindex) {
         vChain[pindex->nHeight] = pindex;
         pindex = pindex->pprev;
+        nChainSwitch++;
+    }
+
+    //recalculate the coinbase payee cache if needed
+    if(nChainSwitch > 0) {
+        coinbasePayee.BuildIndex(true);
     }
 }
 
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 6292ffe8012a..3b65ed604768 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -169,11 +169,14 @@ void DumpCoinbasePayees()
     LogPrintf("Coinbase payee dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
-void CCoinbasePayee::BuildIndex()
+void CCoinbasePayee::BuildIndex(bool bForced)
 {
-    if(mapPaidTime.size() > 0) {
+    if(mapPaidTime.size() > 0 && !bForced) {
         LogPrintf("CCoinbasePayee::BuildIndex - coinbase cache exists, skipping BuildIndex\n");
         return;
+    } else if(bForced) {
+        LogPrintf("CCoinbasePayee::BuildIndex - Rebuilding coinbase cache\n");
+        mapPaidTime.clear();
     }
 
     //scan last 30 days worth of blocks, run processBlockCoinbaseTX for each
diff --git a/src/coinbase-payee.h b/src/coinbase-payee.h
index 6ed9169e446e..241857d9bc3a 100644
--- a/src/coinbase-payee.h
+++ b/src/coinbase-payee.h
@@ -69,7 +69,7 @@ class CCoinbasePayee
         mapPaidTime.clear();
     }
 
-    void BuildIndex();
+    void BuildIndex(bool bForced=false);
     void ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime);
     int64_t GetLastPaid(CScript& pubkey);
     void CleanUp();

From 6fc05e7fa8e4c0e5f5634edfdb4b4bfe5f883e5f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 07:49:49 -0700
Subject: [PATCH 1497/1819] nHeight calculation for BlockValue checking

---
 src/chain.cpp               |  2 +-
 src/main.cpp                |  2 +-
 src/masternode-payments.cpp | 28 ++++++++++++++++++++++------
 src/masternode-payments.h   |  2 +-
 4 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index 222d98981f67..e0acb42dfc8f 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -25,7 +25,7 @@ void CChain::SetTip(CBlockIndex *pindex) {
     }
 
     //recalculate the coinbase payee cache if needed
-    if(nChainSwitch > 0) {
+    if(nChainSwitch > 1) {
         coinbasePayee.BuildIndex(true);
     }
 }
diff --git a/src/main.cpp b/src/main.cpp
index 77e09c3387b1..ff21ffc522e7 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2097,7 +2097,7 @@ 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(!IsBlockValueValid(block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees))){
+    if(!IsBlockValueValid(block, GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees))){
         return state.DoS(100,
                          error("ConnectBlock() : coinbase pays too much (actual=%d vs limit=%d)",
                                block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees)),
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index eec1fb811205..21e697b29142 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -19,23 +19,39 @@ CMasternodePayments masternodePayments;
 map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
-bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
+bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return true;
 
-    if(budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) { //there is no budget data to use to check anything
+    int nHeight = 0;
+    if(pindexPrev->GetBlockHash() == block.hashPrevBlock)
+    {
+        nHeight = pindexPrev->nHeight+1;
+    } else { //out of order
+        BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex){
+            if(item.first == block.hashPrevBlock) {
+                nHeight = item.second->nHeight+1;
+            }
+        }
+    }
+
+    if(nHeight == 0){
+        LogPrintf("IsBlockValueValid() : WARNING: Couldn't find previous block");
+    }
+
+    if((budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) || nHeight == 0) { //there is no budget data to use to check anything
         //super blocks will always be on these blocks, max 100 per budgeting
-        if((pindexPrev->nHeight+1) % GetBudgetPaymentCycleBlocks() < 100){
+        if(nHeight % GetBudgetPaymentCycleBlocks() < 100){
             return true;
         } else {
-            if(nBlockValue > nExpectedValue) return false;
+            if(block.vtx[0].GetValueOut() > nExpectedValue) return false;
         }
     } else { // we're synced and have data so check the budget schedule
-        if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
+        if(budget.IsBudgetPaymentBlock(nHeight)){
             //the value of the block is evaluated in CheckBlock
             return true;
         } else {
-            if(nBlockValue > nExpectedValue) return false;
+            if(block.vtx[0].GetValueOut() > nExpectedValue) return false;
         }
     }
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index d0104d39d020..378abedf930e 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -29,7 +29,7 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
 bool IsReferenceNode(CTxIn& vin);
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
 std::string GetRequiredPaymentsString(int64_t nBlockHeight);
-bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue);
+bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue);
 void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
 class CMasternodePayee

From 7481a27fe402c2d42855b54c50a2d1e0bdc567af Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 08:28:55 -0700
Subject: [PATCH 1498/1819] Smarter algorithm for finding the nHeight for the
 last block

---
 src/main.cpp                | 8 +++-----
 src/masternode-payments.cpp | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index ff21ffc522e7..d569aea09209 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2943,11 +2943,9 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         {
             nHeight = pindexPrev->nHeight+1;
         } else { //out of order
-            BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex){
-                if(item.first == block.hashPrevBlock) {
-                    nHeight = item.second->nHeight+1;
-                }
-            }
+            BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
+            if (mi != mapBlockIndex.end() && (*mi).second)
+                nHeight = (*mi).second->nHeight+1;
         }
 
         if(nHeight != 0){
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 21e697b29142..db4e9a3d717c 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -28,11 +28,9 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
     {
         nHeight = pindexPrev->nHeight+1;
     } else { //out of order
-        BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex){
-            if(item.first == block.hashPrevBlock) {
-                nHeight = item.second->nHeight+1;
-            }
-        }
+        BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
+        if (mi != mapBlockIndex.end() && (*mi).second)
+            nHeight = (*mi).second->nHeight+1;
     }
 
     if(nHeight == 0){

From b1360473b4849be093f6ccf8d8e84229b7324461 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 10:42:42 -0700
Subject: [PATCH 1499/1819] Budget changes

- Remove budgets with negative votes of more than 10% of network
- Only allow proposals into budget that have more than 10% of network support
---
 src/masternode-budget.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 9532b13085a7..b6fc8f34102b 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -510,7 +510,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         CBudgetProposal* prop = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas() > 10) 
+        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas()-prop->GetNays() > mnodeman.CountEnabled()/10) 
         {
             if(nTotalBudget == nBudgetAllocated){
                 prop->SetAllotted(0);
@@ -922,10 +922,15 @@ bool CBudgetProposal::IsValid(std::string& strError)
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) {strError = "Tip is NULL"; return true;}
 
+    if(GetYeas()+GetNays() < -(mnodeman.CountEnabled()/10)){
+         strError = "Active removal";
+         return false;
+    }
+
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
-    //     if(GetYeas() < 10) {
+    //     if(GetYeas()-GetNays() < (mnodeman.CountEnabled()/10)) {
     //         strError = "Not enough support";
     //         return false;
     //     }

From 2b949e08a82ff64a418fc41e624ba947635f82be Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 10:44:45 -0700
Subject: [PATCH 1500/1819] Quicker masternode removal

---
 src/masternode.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode.h b/src/masternode.h
index 7f685c202ec7..85271066fc9e 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -29,7 +29,7 @@
 #define MASTERNODE_MIN_MNB_SECONDS             (5*60)
 #define MASTERNODE_PING_SECONDS                (15*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
-#define MASTERNODE_REMOVAL_SECONDS             (24*60*60)
+#define MASTERNODE_REMOVAL_SECONDS             (75*60)
 
 using namespace std;
 

From edaf4790632594533a2230e1e4fc0791d9e613a9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 15:49:42 -0700
Subject: [PATCH 1501/1819] Added CleanAndRemove for Proposal votes

---
 src/masternode-budget.cpp | 20 +++++++++++++++++++-
 src/masternode-budget.h   |  2 ++
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index b6fc8f34102b..f10a1aeb035d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -465,8 +465,10 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
+        (*it).second.CleanAndRemove();
+
         CBudgetProposal* prop = &((*it2).second);
-        ret.push_back(prop);
+        ret.push_back(prop);        
 
         it2++;
     }
@@ -483,6 +485,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end()){
+        (*it).second.CleanAndRemove();
         mapList.insert(make_pair((*it).second.GetHash(), (*it).second.GetYeas()));
         ++it;
     }
@@ -953,6 +956,21 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
     mapVotes[hash] = vote;
 }
 
+// If masternode voted for a proposal, but is now invalid -- remove the vote
+void CBudgetProposal::CleanAndRemove()
+{
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+
+    while(it != mapVotes.end()) {
+        if ((*it).second.SignatureValid()) 
+        {
+            ++it;
+        } else {
+            mapVotes.erase(it++);
+        }
+    }
+}
+
 double CBudgetProposal::GetRatio()
 {
     int yeas = 0;
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index dcfd1f4c4e84..f9733a32775b 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -385,6 +385,8 @@ class CBudgetProposal
     void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
     int64_t GetAllotted() {return nAlloted;}
 
+    void CleanAndRemove();
+
     uint256 GetHash(){
         /*
             vin is not included on purpose

From 36f65addc70bf77010ad13e9bbe80795f4688e47 Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sun, 5 Jul 2015 02:02:14 +0200
Subject: [PATCH 1502/1819] Fixed typo

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f10a1aeb035d..12b895b72e9f 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -465,7 +465,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
-        (*it).second.CleanAndRemove();
+        (*it2).second.CleanAndRemove();
 
         CBudgetProposal* prop = &((*it2).second);
         ret.push_back(prop);        

From 252322997c14001b8d7676cd562d6f3e3be802a8 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 5 Jul 2015 02:27:20 +0200
Subject: [PATCH 1503/1819] User configurable Wallet Window Title

---
 src/init.cpp          | 1 +
 src/qt/bitcoingui.cpp | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index a11da2872940..ad4e498d38f3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -356,6 +356,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -upgradewallet           " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>           " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
     strUsage += "  -walletnotify=<cmd>      " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
+    strUsage += "  -windowtitle=<name>      " + _("Wallet window title") + "\n";
     strUsage += "  -zapwallettxes=<mode>    " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n";
     strUsage += "                           " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 120e4776ca31..a7434b0d6909 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -113,7 +113,13 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
 #endif // ENABLE_WALLET
     if(enableWallet)
     {
-        windowTitle += tr("Wallet");
+        QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", ""));
+        if(userWindowTitle.isEmpty()){
+            windowTitle += tr("Wallet");
+        }
+        else{
+            windowTitle += userWindowTitle;
+        }
     } else {
         windowTitle += tr("Node");
     }

From c990c5a011122f83737b99023fc4c7b2652db351 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 5 Jul 2015 03:11:58 +0200
Subject: [PATCH 1504/1819] Wallet Window Title: minor changes

---
 src/init.cpp          |  3 ++-
 src/qt/bitcoingui.cpp | 10 +++-------
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index ad4e498d38f3..509bb1007fc7 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -356,7 +356,8 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -upgradewallet           " + _("Upgrade wallet to latest format") + " " + _("on startup") + "\n";
     strUsage += "  -wallet=<file>           " + _("Specify wallet file (within data directory)") + " " + strprintf(_("(default: %s)"), "wallet.dat") + "\n";
     strUsage += "  -walletnotify=<cmd>      " + _("Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)") + "\n";
-    strUsage += "  -windowtitle=<name>      " + _("Wallet window title") + "\n";
+    if (mode == HMM_BITCOIN_QT)
+        strUsage += "  -windowtitle=<name>  " + _("Wallet window title") + "\n";
     strUsage += "  -zapwallettxes=<mode>    " + _("Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup") + "\n";
     strUsage += "                           " + _("(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)") + "\n";
 #endif
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index a7434b0d6909..4640e1f15e22 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -113,16 +113,12 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle *networkStyle, QWidget *parent) :
 #endif // ENABLE_WALLET
     if(enableWallet)
     {
-        QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", ""));
-        if(userWindowTitle.isEmpty()){
-            windowTitle += tr("Wallet");
-        }
-        else{
-            windowTitle += userWindowTitle;
-        }
+        windowTitle += tr("Wallet");
     } else {
         windowTitle += tr("Node");
     }
+    QString userWindowTitle = QString::fromStdString(GetArg("-windowtitle", ""));
+    if(!userWindowTitle.isEmpty()) windowTitle += " - " + userWindowTitle;
     windowTitle += " " + networkStyle->getTitleAddText();
 #ifndef Q_OS_MAC
     QApplication::setWindowIcon(networkStyle->getAppIcon());

From ce41645713afe4889eceb9358a21dc5b63e49b49 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 5 Jul 2015 10:37:52 +0300
Subject: [PATCH 1505/1819] fix CFinalizedBudget::AutoCheck() crash

---
 src/masternode-budget.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 12b895b72e9f..6301a8f6cd8b 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1258,6 +1258,11 @@ void CFinalizedBudget::AutoCheck()
     {
         std::vector<CBudgetProposal*> props1 = budget.GetBudget();
 
+        if(props1.size() == 0) {
+            LogPrintf("CFinalizedBudget::AutoCheck - Can't get Budget, aborting\n");
+            return;
+        }
+
         for(unsigned int i = 0; i < vecProposals.size(); i++){
             if(i > props1.size()-1) {
                 LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");

From ee167ad2f30e1cda8042dbc0d6aa19d0d949ccf6 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 5 Jul 2015 21:19:46 +0200
Subject: [PATCH 1506/1819] Configurable decimal digits

---
 src/qt/bitcoinunits.cpp       | 38 +++++++++++++++++++++++++++++++++++
 src/qt/bitcoinunits.h         |  2 ++
 src/qt/forms/optionsdialog.ui | 14 +++++++++++++
 src/qt/optionsdialog.cpp      | 10 +++++++++
 src/qt/optionsmodel.cpp       | 10 +++++++++
 src/qt/optionsmodel.h         |  3 ++-
 src/qt/overviewpage.cpp       | 18 ++++++++---------
 7 files changed, 85 insertions(+), 10 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 88744756a65a..e19a18e1ada7 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -7,6 +7,7 @@
 #include "chainparams.h"
 #include "primitives/transaction.h"
 
+#include <QSettings>
 #include <QStringList>
 
 BitcoinUnits::BitcoinUnits(QObject *parent):
@@ -177,6 +178,43 @@ QString BitcoinUnits::format(int unit, const CAmount& nIn, bool fPlus, Separator
 // Please take care to use formatHtmlWithUnit instead, when
 // appropriate.
 
+QString BitcoinUnits::simpleFormat(int unit, const CAmount& nIn, bool fPlus, SeparatorStyle separators)
+{
+    // Note: not using straight sprintf here because we do NOT want
+    // localized number formatting.
+    if(!valid(unit))
+        return QString(); // Refuse to format invalid unit
+    qint64 n = (qint64)nIn;
+    qint64 coin = factor(unit);
+    int num_decimals = decimals(unit);
+    qint64 n_abs = (n > 0 ? n : -n);
+    qint64 quotient = n_abs / coin;
+    qint64 remainder = n_abs % coin;
+    QString quotient_str = QString::number(quotient);
+    QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0');
+
+    if (n < 0)
+        quotient_str.insert(0, '-');
+    else if (fPlus && n > 0)
+        quotient_str.insert(0, '+');
+
+    return quotient_str + QString(".") + remainder_str;
+}
+
+QString BitcoinUnits::roundWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
+{
+    QSettings settings;
+    int digits = settings.value("digits").toInt();
+    
+    QString result = simpleFormat(unit, amount, plussign);
+    double dAmount = result.toDouble();
+
+    QString rounded;
+    rounded.setNum(dAmount, 'f', digits);
+
+    return rounded + QString(" ") + name(unit);
+}
+
 QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
     return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index e33962c7683c..6b72ea74f9b2 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -90,8 +90,10 @@ class BitcoinUnits: public QAbstractListModel
     static int decimals(int unit);
     //! Format as string
     static QString format(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString simpleFormat(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Format as string (with unit)
     static QString formatWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString roundWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     static QString formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Parse string to coin amount
     static bool parse(int unit, const QString &value, CAmount *val_out);
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index 6c82f4456e4c..02cdb1c02963 100755
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -524,6 +524,20 @@ https://www.transifex.com/projects/p/dash/</string>
          </item>
         </layout>
        </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_5_Display">
+         <item>
+          <widget class="QLabel" name="digitsLabel">
+           <property name="text">
+            <string>Decimal digits</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QValueComboBox" name="digits"/>
+         </item>
+        </layout>
+       </item>
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout_3_Display">
          <item>
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 4e4a27f7eabe..2758afa5b354 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -74,6 +74,13 @@ OptionsDialog::OptionsDialog(QWidget *parent, bool enableWallet) :
 
     /* Display elements init */
     
+    /* Number of displayed decimal digits selector */
+    QString digits;
+    for(int index = 2; index <=8; index++){
+        digits.setNum(index);
+        ui->digits->addItem(digits, digits);
+    }
+    
     /* Theme selector */
     ui->theme->addItem(QString("DASH-blue"), QVariant("drkblue"));
     ui->theme->addItem(QString("DASH-traditional"), QVariant("trad"));
@@ -160,6 +167,7 @@ void OptionsDialog::setModel(OptionsModel *model)
     connect(ui->allowIncoming, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));
     connect(ui->connectSocks, SIGNAL(clicked(bool)), this, SLOT(showRestartWarning()));
     /* Display */
+    connect(ui->digits, SIGNAL(valueChanged()), this, SLOT(showRestartWarning()));
     connect(ui->theme, SIGNAL(valueChanged()), this, SLOT(showRestartWarning()));
     connect(ui->lang, SIGNAL(valueChanged()), this, SLOT(showRestartWarning()));
     connect(ui->thirdPartyTxUrls, SIGNAL(textChanged(const QString &)), this, SLOT(showRestartWarning()));
@@ -191,6 +199,8 @@ void OptionsDialog::setMapper()
 #endif
 
     /* Display */
+    mapper->addMapping(ui->digits, OptionsModel::Digits);
+    mapper->addMapping(ui->theme, OptionsModel::Theme);
     mapper->addMapping(ui->theme, OptionsModel::Theme);
     mapper->addMapping(ui->lang, OptionsModel::Language);
     mapper->addMapping(ui->unit, OptionsModel::DisplayUnit);
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index c3675edcd120..d086b076d694 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -128,6 +128,8 @@ void OptionsModel::Init()
         addOverriddenOption("-proxy");
 
     // Display
+    if (!settings.contains("digits"))
+        settings.setValue("digits", "2");
     if (!settings.contains("theme"))
         settings.setValue("theme", "");
     if (!settings.contains("language"))
@@ -203,6 +205,8 @@ QVariant OptionsModel::data(const QModelIndex & index, int role) const
             return nDisplayUnit;
         case ThirdPartyTxUrls:
             return strThirdPartyTxUrls;
+        case Digits:
+            return settings.value("digits");            
         case Theme:
             return settings.value("theme");            
         case Language:
@@ -300,6 +304,12 @@ bool OptionsModel::setData(const QModelIndex & index, const QVariant & value, in
                 setRestartRequired(true);
             }
             break;
+        case Digits:
+            if (settings.value("digits") != value) {
+                settings.setValue("digits", value);
+                setRestartRequired(true);
+            }
+            break;            
         case Theme:
             if (settings.value("theme") != value) {
                 settings.setValue("theme", value);
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index fb796158d1df..ad437fca6bde 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -36,7 +36,8 @@ class OptionsModel : public QAbstractListModel
         ProxyPort,              // int
         DisplayUnit,            // BitcoinUnits::Unit
         ThirdPartyTxUrls,       // QString
-        Theme,                  // QString        
+        Digits,                 // QString
+        Theme,                  // QString
         Language,               // QString
         CoinControlFeatures,    // bool
         ThreadsScriptVerif,     // int
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 05e94c40eca7..ff1a916f484c 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -186,15 +186,15 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
     currentWatchOnlyBalance = watchOnlyBalance;
     currentWatchUnconfBalance = watchUnconfBalance;
     currentWatchImmatureBalance = watchImmatureBalance;
-    ui->labelBalance->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
-    ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelImmature->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelAnonymized->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelTotal->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchAvailable->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchPending->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchImmature->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchTotal->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelBalance->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
+    ui->labelUnconfirmed->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelImmature->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelAnonymized->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelTotal->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchAvailable->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchPending->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchImmature->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchTotal->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users

From b1d78b5200464cf4b19bc7ef9af49a40862e4fc7 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 6 Jul 2015 04:05:39 +0300
Subject: [PATCH 1507/1819] Alternative digits implementation

---
 src/qt/bitcoinunits.cpp | 48 ++++++++++++-----------------------------
 src/qt/bitcoinunits.h   |  4 +++-
 src/qt/overviewpage.cpp | 18 ++++++++--------
 3 files changed, 26 insertions(+), 44 deletions(-)

diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index e19a18e1ada7..9616b7cd90da 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -178,56 +178,36 @@ QString BitcoinUnits::format(int unit, const CAmount& nIn, bool fPlus, Separator
 // Please take care to use formatHtmlWithUnit instead, when
 // appropriate.
 
-QString BitcoinUnits::simpleFormat(int unit, const CAmount& nIn, bool fPlus, SeparatorStyle separators)
+QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
-    // Note: not using straight sprintf here because we do NOT want
-    // localized number formatting.
-    if(!valid(unit))
-        return QString(); // Refuse to format invalid unit
-    qint64 n = (qint64)nIn;
-    qint64 coin = factor(unit);
-    int num_decimals = decimals(unit);
-    qint64 n_abs = (n > 0 ? n : -n);
-    qint64 quotient = n_abs / coin;
-    qint64 remainder = n_abs % coin;
-    QString quotient_str = QString::number(quotient);
-    QString remainder_str = QString::number(remainder).rightJustified(num_decimals, '0');
-
-    if (n < 0)
-        quotient_str.insert(0, '-');
-    else if (fPlus && n > 0)
-        quotient_str.insert(0, '+');
+    return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
+}
 
-    return quotient_str + QString(".") + remainder_str;
+QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
+{
+    QString str(formatWithUnit(unit, amount, plussign, separators));
+    str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
+    return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
 }
 
-QString BitcoinUnits::roundWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
+QString BitcoinUnits::floorWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
     QSettings settings;
     int digits = settings.value("digits").toInt();
-    
-    QString result = simpleFormat(unit, amount, plussign);
-    double dAmount = result.toDouble();
 
-    QString rounded;
-    rounded.setNum(dAmount, 'f', digits);
+    QString result = format(unit, amount, plussign, separators);
+    if(decimals(unit) > digits) result.chop(decimals(unit) - digits);
 
-    return rounded + QString(" ") + name(unit);
+    return result + QString(" ") + name(unit);
 }
 
-QString BitcoinUnits::formatWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
-{
-    return format(unit, amount, plussign, separators) + QString(" ") + name(unit);
-}
-
-QString BitcoinUnits::formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
+QString BitcoinUnits::floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign, SeparatorStyle separators)
 {
-    QString str(formatWithUnit(unit, amount, plussign, separators));
+    QString str(floorWithUnit(unit, amount, plussign, separators));
     str.replace(QChar(THIN_SP_CP), QString(THIN_SP_HTML));
     return QString("<span style='white-space: nowrap;'>%1</span>").arg(str);
 }
 
-
 bool BitcoinUnits::parse(int unit, const QString &value, CAmount *val_out)
 {
     if(!valid(unit) || value.isEmpty())
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index 6b72ea74f9b2..483f05559074 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -93,8 +93,10 @@ class BitcoinUnits: public QAbstractListModel
     static QString simpleFormat(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Format as string (with unit)
     static QString formatWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
-    static QString roundWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     static QString formatHtmlWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    //! Format as string (with unit) but floor value up to "digits" settings
+    static QString floorWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
+    static QString floorHtmlWithUnit(int unit, const CAmount& amount, bool plussign=false, SeparatorStyle separators=separatorStandard);
     //! Parse string to coin amount
     static bool parse(int unit, const QString &value, CAmount *val_out);
     //! Gets title for amount column including current display unit if optionsModel reference available */
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index ff1a916f484c..50f466593c3e 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -186,15 +186,15 @@ void OverviewPage::setBalance(const CAmount& balance, const CAmount& unconfirmed
     currentWatchOnlyBalance = watchOnlyBalance;
     currentWatchUnconfBalance = watchUnconfBalance;
     currentWatchImmatureBalance = watchImmatureBalance;
-    ui->labelBalance->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
-    ui->labelUnconfirmed->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelImmature->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelAnonymized->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelTotal->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchAvailable->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchPending->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchImmature->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
-    ui->labelWatchTotal->setText(BitcoinUnits::roundWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelBalance->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, balance, false, BitcoinUnits::separatorAlways));
+    ui->labelUnconfirmed->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, unconfirmedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelAnonymized->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, anonymizedBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, balance + unconfirmedBalance + immatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchAvailable->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchOnlyBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchPending->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchUnconfBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchImmature->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchImmatureBalance, false, BitcoinUnits::separatorAlways));
+    ui->labelWatchTotal->setText(BitcoinUnits::floorHtmlWithUnit(nDisplayUnit, watchOnlyBalance + watchUnconfBalance + watchImmatureBalance, false, BitcoinUnits::separatorAlways));
 
     // only show immature (newly mined) balance if it's non-zero, so as not to complicate things
     // for the non-mining users

From 4596e7f336de1ef40ac7761a2822c83ee6ce979f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 4 Jul 2015 07:49:49 -0700
Subject: [PATCH 1508/1819] Vastly improved proposal management implementation

-Syncing now happens in stages. Masternodes and Sporks, then Masternode winners, then proposals. Some of these require the masternode signatures, otherwise there are race conditions within the syncing process itself.
-Resigning - When a proposal is sent to the network initially it's signed by a masternode, if that masternode goes inactive the proposal becomes invalid. Resigning allows other masternodes to update proposal keep it valid with the coming and going of masternodes.
-Resigning compatibility - non masternodes will scan and flag proposals as invalid to accept updated owners.
-Invalid votes are now actively removed from the proposals when they go inactive
- Remove budgets with negative votes of more than 10% of network
- Only allow proposals into budget that have more than 10% of network support
- Faster removal of inactive masternodes
---
 src/chain.cpp                |   2 +-
 src/darksend.cpp             |  22 +--
 src/main.cpp                 |  22 +--
 src/masternode-budget.cpp    | 270 ++++++++++++++++++++++++++++++++---
 src/masternode-budget.h      |  12 +-
 src/masternode-payments.cpp  |  30 ++--
 src/masternode-payments.h    |   2 +-
 src/masternode.h             |   4 +-
 src/rpcmasternode-budget.cpp |  18 +++
 src/version.h                |   3 +
 10 files changed, 336 insertions(+), 49 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index 222d98981f67..e0acb42dfc8f 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -25,7 +25,7 @@ void CChain::SetTip(CBlockIndex *pindex) {
     }
 
     //recalculate the coinbase payee cache if needed
-    if(nChainSwitch > 0) {
+    if(nChainSwitch > 1) {
         coinbasePayee.BuildIndex(true);
     }
 }
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 054cd83ef5db..45d1e512a2d6 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1470,8 +1470,6 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         return false;
     }
     if(!fEnableDarksend) {
-        if(fDebug) LogPrintf("CDarksendPool::DoAutomaticDenominating - Darksend is disabled\n");
-        strAutoDenomResult = _("Darksend is disabled.");
         return false;
     }
 
@@ -2353,7 +2351,7 @@ void ThreadCheckDarkSendPool()
         if(c % MASTERNODES_DUMP_SECONDS == 0) DumpMasternodes();
 
         //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
-        if(c % 5 == 0 && RequestedMasternodeAssets <= 2){
+        if(c % 5 == 0 && RequestedMasternodeAssets <= 5){
             bool fIsInitialDownload = IsInitialBlockDownload();
             if(!fIsInitialDownload) {
                 CBlockIndex* pindexPrev = chainActive.Tip();
@@ -2373,12 +2371,20 @@ void ThreadCheckDarkSendPool()
                                 LogPrintf("Successfully synced, asking for Masternode list and payment list\n");
 
                                 //request full mn list only if Masternodes.dat was updated quite a long time ago
-                                mnodeman.DsegUpdate(pnode);
+                                
+                                if(RequestedMasternodeAssets == 0 || RequestedMasternodeAssets == 1){   
+                                    mnodeman.DsegUpdate(pnode);
+                                    pnode->PushMessage("getsporks"); //get current network sporks
+                                }
+
+                                if(RequestedMasternodeAssets == 2 || RequestedMasternodeAssets == 3)
+                                    pnode->PushMessage("mnget"); //sync payees
+                                
+                                if(RequestedMasternodeAssets == 4 || RequestedMasternodeAssets == 5){
+                                    uint256 n = 0;
+                                    pnode->PushMessage("mnvs", n); //sync masternode votes
+                                }
 
-                                pnode->PushMessage("mnget"); //sync payees
-                                uint256 n = 0;
-                                pnode->PushMessage("mnvs", n); //sync masternode votes
-                                pnode->PushMessage("getsporks"); //get current network sporks
                                 RequestedMasternodeAssets++;
                                 break;
                             }
diff --git a/src/main.cpp b/src/main.cpp
index 77e09c3387b1..bb8c75bfc9db 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2097,7 +2097,7 @@ 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(!IsBlockValueValid(block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees))){
+    if(!IsBlockValueValid(block, GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees))){
         return state.DoS(100,
                          error("ConnectBlock() : coinbase pays too much (actual=%d vs limit=%d)",
                                block.vtx[0].GetValueOut(), GetBlockValue(pindex->pprev->nBits, pindex->pprev->nHeight, nFees)),
@@ -2943,11 +2943,9 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         {
             nHeight = pindexPrev->nHeight+1;
         } else { //out of order
-            BOOST_FOREACH(const PAIRTYPE(const uint256, CBlockIndex*)& item, mapBlockIndex){
-                if(item.first == block.hashPrevBlock) {
-                    nHeight = item.second->nHeight+1;
-                }
-            }
+            BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
+            if (mi != mapBlockIndex.end() && (*mi).second)
+                nHeight = (*mi).second->nHeight+1;
         }
 
         if(nHeight != 0){
@@ -3959,11 +3957,19 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_BUDGET_VOTE:
         return mapSeenMasternodeBudgetVotes.count(inv.hash);
     case MSG_BUDGET_PROPOSAL:
-        return mapSeenMasternodeBudgetProposals.count(inv.hash);
+        if(!mapSeenMasternodeBudgetProposals.count(inv.hash)){
+            return false;
+        } else {
+            return !mapSeenMasternodeBudgetProposals[inv.hash].fInvalid;
+        }
     case MSG_BUDGET_FINALIZED_VOTE:
         return mapSeenFinalizedBudgetVotes.count(inv.hash);
     case MSG_BUDGET_FINALIZED:
-        return mapSeenFinalizedBudgets.count(inv.hash);
+        if(!mapSeenFinalizedBudgets.count(inv.hash)){
+            return false;
+        } else {
+            return !mapSeenFinalizedBudgets[inv.hash].fInvalid;
+        }
     case MSG_MASTERNODE_ANNOUNCE:
         return mapSeenMasternodeBroadcast.count(inv.hash);
     case MSG_MASTERNODE_PING:
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 9532b13085a7..a191e1f50768 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -54,6 +54,154 @@ void CheckOrphanVotes()
     }
 }
 
+void CBudgetManager::ResignInvalidProposals()
+{
+    if(!fMasterNode){
+        CheckSignatureValidity();
+        return;
+    } 
+
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return;
+
+    //pick a few masternodes responsible for this each cycle
+    int n = mnodeman.GetMasternodeRank(activeMasternode.vin, pindexPrev->nHeight, MIN_BUDGET_PEER_PROTO_VERSION);
+
+    if(n == -1)
+    {
+        CheckSignatureValidity();
+        LogPrintf("CBudgetManager::ResignInvalidProposals - Unknown Masternode\n");
+        return;
+    }
+
+    if(n > 3)
+    {
+        CheckSignatureValidity();
+        LogPrintf("CBudgetManager::ResignInvalidProposals - Masternode not in the top %s\n", MIN_BUDGET_PEER_PROTO_VERSION);
+        return;
+    }
+
+    CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
+    if(pmn == NULL) {
+        LogPrintf("mprop - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        return;
+    }
+
+    std::map<uint256, CBudgetProposal>::iterator it1 = mapProposals.begin();
+    while(it1 != mapProposals.end())
+    {
+        if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
+
+        CBudgetProposal* prop = &((*it1).second);
+
+        CBudgetProposalBroadcast bprop(*prop);
+        if(!bprop.SignatureValid()){
+            bprop.vin = activeMasternode.vin;
+
+            LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - resigning proposal\n");
+
+            CPubKey pubKeyMasternode;
+            CKey keyMasternode;
+            std::string errorMessage;
+
+            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
+                LogPrintf("CBudgetManager::ResignInvalidProposals - Error upon calling SetKey");
+                return;
+            }
+
+            if(!bprop.Sign(keyMasternode, pubKeyMasternode)){
+                LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
+                return;
+            }
+
+            std::string strError = "";
+            if(bprop.IsValid(strError)){
+                //delete if it exists and insert the new object
+                if(mapSeenMasternodeBudgetProposals.count(bprop.GetHash())) mapSeenMasternodeBudgetProposals.erase(bprop.GetHash());
+                mapSeenMasternodeBudgetProposals.insert(make_pair(bprop.GetHash(), bprop));
+
+                bprop.Relay();
+            } else {
+                LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - still invalid with new signature\n");
+            }
+        }
+        ++it1;
+    }
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end()){
+        if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
+
+        CFinalizedBudget* prop = &((*it2).second);
+        if(!prop->IsValid()) continue;
+
+        CFinalizedBudgetBroadcast bprop(*prop);
+        if(!bprop.SignatureValid()){
+            bprop.vin = activeMasternode.vin;
+
+            LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - resigning finalized budget\n");
+
+            CPubKey pubKeyMasternode;
+            CKey keyMasternode;
+            std::string errorMessage;
+
+            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
+                LogPrintf("CBudgetManager::ResignInvalidProposals - Error upon calling SetKey");
+                return;
+            }
+
+            if(!bprop.Sign(keyMasternode, pubKeyMasternode)){
+                LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
+                return;
+            }
+
+            if(!bprop.IsValid()){
+
+                //delete if it exists and insert the new object
+                if(mapFinalizedBudgets.count(bprop.GetHash())) mapFinalizedBudgets.erase(bprop.GetHash());
+                mapFinalizedBudgets.insert(make_pair(bprop.GetHash(), bprop));
+
+                bprop.Relay();
+            } else {
+                LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - still invalid with new signature\n");
+            }
+        }
+        ++it2;
+    }
+}
+
+void CBudgetManager::CheckSignatureValidity()
+{
+    std::map<uint256, CBudgetProposal>::iterator it1 = mapProposals.begin();
+    while(it1 != mapProposals.end())
+    {
+        CBudgetProposal* prop = &((*it1).second);
+
+        CBudgetProposalBroadcast bprop(*prop);
+        if(!bprop.SignatureValid()){
+            if(mapSeenMasternodeBudgetProposals.count(bprop.GetHash())) {
+                mapSeenMasternodeBudgetProposals[bprop.GetHash()].fInvalid = true;
+            }
+        }
+        ++it1;
+    }
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end())
+    {
+        CFinalizedBudget* prop = &((*it2).second);
+
+        CFinalizedBudgetBroadcast bprop(*prop);
+        if(!bprop.SignatureValid()){
+            if(mapSeenFinalizedBudgets.count(bprop.GetHash())) {
+                mapSeenFinalizedBudgets[bprop.GetHash()].fInvalid = true;
+            }
+        }
+        ++it2;
+    }
+}
+
+
 void SubmitFinalBudget()
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -275,7 +423,14 @@ void DumpBudgets()
 void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
 {
     LOCK(cs);
-    if(mapFinalizedBudgets.count(prop.GetHash())) return;
+    if(!prop.IsValid()) return;
+
+    if(mapFinalizedBudgets.count(prop.GetHash())) {
+        //this budget must have went invalid, so update the vin to the new one
+        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget (%s to %s)\n", mapFinalizedBudgets[prop.GetHash()].vin.prevout.ToStringShort().c_str(), prop.vin.prevout.ToStringShort().c_str());
+        mapFinalizedBudgets[prop.GetHash()].vin = prop.vin;
+        return;
+    }
 
     mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
 }
@@ -283,7 +438,12 @@ void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
 void CBudgetManager::AddProposal(CBudgetProposal& prop)
 {
     LOCK(cs);
-    if(mapProposals.count(prop.GetHash())) return;
+    if(mapProposals.count(prop.GetHash())) {
+        //this proposal must have went invalid, so update the vin to the new one        
+        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid finalized budget (%s to %s)\n", mapFinalizedBudgets[prop.GetHash()].vin.prevout.ToStringShort().c_str(), prop.vin.prevout.ToStringShort().c_str());
+        mapProposals[prop.GetHash()].vin = prop.vin;
+        return;
+    }
 
     mapProposals.insert(make_pair(prop.GetHash(), prop));
 }
@@ -466,7 +626,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
     while(it2 != mapProposals.end())
     {
         CBudgetProposal* prop = &((*it2).second);
-        ret.push_back(prop);
+        ret.push_back(prop);        
 
         it2++;
     }
@@ -510,7 +670,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         CBudgetProposal* prop = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas() > 10) 
+        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas()-prop->GetNays() > mnodeman.CountEnabled()/10) 
         {
             if(nTotalBudget == nBudgetAllocated){
                 prop->SetAllotted(0);
@@ -603,9 +763,26 @@ void CBudgetManager::NewBlock()
         SubmitFinalBudget();
     }
 
+    ResignInvalidProposals();
+
     //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
     if(chainActive.Height() % 6 != 0) return;
+
     mnodeman.DecrementVotedTimes();
+
+    //remove invalid votes once in a while (we have to check the signatures and validity of every vote, somewhat CPU intensive)
+
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end()){
+        (*it).second.CleanAndRemove();
+        ++it;
+    }
+
+    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
+    while(it2 != mapFinalizedBudgets.end()){
+        (*it2).second.CleanAndRemove();
+        ++it2;
+    }
 }
 
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -636,9 +813,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     if (strCommand == "mprop") { //Masternode Proposal
         CBudgetProposalBroadcast prop;
         vRecv >> prop;
-
+        
         if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())){
-            return;
+            //if this proposal went inactive, we'll update it with the new re-signature
+            if(!mapSeenMasternodeBudgetProposals[prop.GetHash()].fInvalid){
+                return;
+            }
         }
 
         //set time we first saw this prop
@@ -662,14 +842,17 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        //delete if it exists and insert the new object
+        if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())) mapSeenMasternodeBudgetProposals.erase(prop.GetHash());
         mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
             CBudgetProposal p(prop);
             budget.AddProposal(p);
             prop.Relay();
 
-            //can only do this four times a day on the network
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=25;
+            //can only do this six times a day on the network
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
 
             //We might have active votes for this proposal that are valid now
             CheckOrphanVotes();
@@ -715,7 +898,10 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> prop;
 
         if(mapSeenFinalizedBudgets.count(prop.GetHash())){
-            return;
+            //if this budget went inactive, we'll update it with the new re-signature
+            if(!mapSeenFinalizedBudgets[prop.GetHash()].fInvalid){
+                return;
+            }
         }
 
         if(!prop.SignatureValid()){
@@ -735,18 +921,21 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        //delete if it exists and insert the new object
+        if(mapSeenFinalizedBudgets.count(prop.GetHash())) mapSeenFinalizedBudgets.erase(prop.GetHash());
         mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
             CFinalizedBudget p(prop);
             budget.AddFinalizedBudget(p);
             prop.Relay();
 
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
 
             //we might have active votes for this budget that are now valid
             CheckOrphanVotes();
         } else {
-            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("fbs - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
             return;
         }
     }
@@ -895,13 +1084,13 @@ CBudgetProposal::CBudgetProposal()
 
 CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
 {
-	vin = vinIn;
+    vin = vinIn;
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
-	nBlockStart = nBlockStartIn;
-	nBlockEnd = nBlockEndIn;
-	address = addressIn;
-	nAmount = nAmountIn;
+    nBlockStart = nBlockStartIn;
+    nBlockEnd = nBlockEndIn;
+    address = addressIn;
+    nAmount = nAmountIn;
     nTime = 0;
 }
 
@@ -922,10 +1111,15 @@ bool CBudgetProposal::IsValid(std::string& strError)
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) {strError = "Tip is NULL"; return true;}
 
+    if(GetYeas()+GetNays() < -(mnodeman.CountEnabled()/10)){
+         strError = "Active removal";
+         return false;
+    }
+
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
-    //     if(GetYeas() < 10) {
+    //     if(GetYeas()-GetNays() < (mnodeman.CountEnabled()/10)) {
     //         strError = "Not enough support";
     //         return false;
     //     }
@@ -948,6 +1142,22 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
     mapVotes[hash] = vote;
 }
 
+// If masternode voted for a proposal, but is now invalid -- remove the vote
+void CBudgetProposal::CleanAndRemove()
+{
+    std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
+
+    while(it != mapVotes.end()) {
+        if ((*it).second.SignatureValid()) 
+        {
+            ++it;
+        } else {
+            mapSeenMasternodeBudgetVotes.erase((*it).first);
+            mapVotes.erase(it++);
+        }
+    }
+}
+
 double CBudgetProposal::GetRatio()
 {
     int yeas = 0;
@@ -1043,6 +1253,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast()
 {
     vin = CTxIn();
     strProposalName = "unknown";
+    strURL = "";
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
@@ -1053,6 +1264,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
 {
     vin = other.vin;
     strProposalName = other.strProposalName;
+    strURL = other.strURL;
     nBlockStart = other.nBlockStart;
     nBlockEnd = other.nBlockEnd;
     address = other.address;
@@ -1267,6 +1479,22 @@ void CFinalizedBudget::AutoCheck()
         SubmitVote();
     }
 }
+// If masternode voted for a proposal, but is now invalid -- remove the vote
+void CFinalizedBudget::CleanAndRemove()
+{
+    std::map<uint256, CFinalizedBudgetVote>::iterator it = mapVotes.begin();
+
+    while(it != mapVotes.end()) {
+        if ((*it).second.SignatureValid()) 
+        {
+            ++it;
+        } else {
+            mapSeenFinalizedBudgetVotes.erase((*it).first);
+            mapVotes.erase(it++);
+        }
+    }
+}
+
 
 int64_t CFinalizedBudget::GetTotalPayout()
 {
@@ -1337,12 +1565,20 @@ bool CFinalizedBudget::IsValid()
     if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
     if(GetBlockEnd() - nBlockStart > 100) return false;
     if(vecProposals.size() > 100) return false;
+    if(strBudgetName == "") return false;
+    if(nBlockStart == 0) return false;
+
 
     //can only pay out 10% of the possible coins (min value of coins)
     if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
 
     //TODO: if N cycles old, invalid, invalid
 
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return true;
+
+    if(nBlockStart < pindexPrev->nHeight) return false;
+
     return true;
 }
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index dcfd1f4c4e84..8f2645911157 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -28,6 +28,7 @@ class CTxBudgetPayment;
 #define VOTE_ABSTAIN  0
 #define VOTE_YES      1
 #define VOTE_NO       2
+#define VOTE_PROP_INC       15 //how many "votes" to count for a new proposal
 
 extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
 extern std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
@@ -35,7 +36,6 @@ extern std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
 extern std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
 
 extern CBudgetManager budget;
-
 void DumpBudgets();
 
 //Amount of blocks in a months period of time (using 2.6 minutes per)
@@ -115,6 +115,10 @@ class CBudgetManager
     std::string GetRequiredPaymentsString(int64_t nBlockHeight);
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
+    //Have masternodes resign proposals with masternodes that have went inactive
+    void ResignInvalidProposals();
+    void CheckSignatureValidity();
+
     void Clear(){
         LogPrintf("Budget object cleared\n");
         mapProposals.clear();
@@ -185,7 +189,7 @@ class CFinalizedBudget
     CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
 
-    void Clean(CFinalizedBudgetVote& vote);
+    void CleanAndRemove();
     void AddOrUpdateVote(CFinalizedBudgetVote& vote);
     double GetScore();
     bool HasMinimumRequiredSupport();
@@ -265,6 +269,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
     std::vector<unsigned char> vchSig;
 
 public:
+    bool fInvalid;
     CFinalizedBudgetBroadcast();
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
     CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn);
@@ -385,6 +390,8 @@ class CBudgetProposal
     void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
     int64_t GetAllotted() {return nAlloted;}
 
+    void CleanAndRemove();
+
     uint256 GetHash(){
         /*
             vin is not included on purpose
@@ -431,6 +438,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
     std::vector<unsigned char> vchSig;
 
 public:
+    bool fInvalid;
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
     CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURL, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn);
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index eec1fb811205..1a9189b4ce13 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -19,23 +19,37 @@ CMasternodePayments masternodePayments;
 map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
-bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue){
+bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return true;
 
-    if(budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) { //there is no budget data to use to check anything
+    int nHeight = 0;
+    if(pindexPrev->GetBlockHash() == block.hashPrevBlock)
+    {
+        nHeight = pindexPrev->nHeight+1;
+    } else { //out of order
+        BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
+        if (mi != mapBlockIndex.end() && (*mi).second)
+            nHeight = (*mi).second->nHeight+1;
+    }
+
+    if(nHeight == 0){
+        LogPrintf("IsBlockValueValid() : WARNING: Couldn't find previous block");
+    }
+
+    if((budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) || nHeight == 0) { //there is no budget data to use to check anything
         //super blocks will always be on these blocks, max 100 per budgeting
-        if((pindexPrev->nHeight+1) % GetBudgetPaymentCycleBlocks() < 100){
+        if(nHeight % GetBudgetPaymentCycleBlocks() < 100){
             return true;
         } else {
-            if(nBlockValue > nExpectedValue) return false;
+            if(block.vtx[0].GetValueOut() > nExpectedValue) return false;
         }
     } else { // we're synced and have data so check the budget schedule
-        if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
+        if(budget.IsBudgetPaymentBlock(nHeight)){
             //the value of the block is evaluated in CheckBlock
             return true;
         } else {
-            if(nBlockValue > nExpectedValue) return false;
+            if(block.vtx[0].GetValueOut() > nExpectedValue) return false;
         }
     }
 
@@ -254,13 +268,11 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 
 bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerIn)
 {
-    LogPrintf("CMasternodePayments::AddWinningMasternode - getblockhash\n");
     uint256 blockHash = 0;
     if(!GetBlockHash(blockHash, winnerIn.nBlockHeight-100)) {
         return false;
     }
 
-    LogPrintf("CMasternodePayments::AddWinningMasternode - checkhash\n");
     if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
        return false;
     }
@@ -268,14 +280,12 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
     mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
 
     if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
-       LogPrintf("CMasternodePayments::AddWinningMasternode - create new blockpayee obj\n");
        CMasternodeBlockPayees blockPayees(winnerIn.nBlockHeight);
        mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
     }
 
     int n = 1;
     if(IsReferenceNode(winnerIn.vinMasternode)) n = 100;
-    LogPrintf("CMasternodePayments::AddWinningMasternode - AddPayee - %d\n", n);
     mapMasternodeBlocks[winnerIn.nBlockHeight].AddPayee(winnerIn.payee, n);
 
     return true;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index d0104d39d020..378abedf930e 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -29,7 +29,7 @@ void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDa
 bool IsReferenceNode(CTxIn& vin);
 bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
 std::string GetRequiredPaymentsString(int64_t nBlockHeight);
-bool IsBlockValueValid(int64_t nBlockValue, int64_t nExpectedValue);
+bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue);
 void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
 class CMasternodePayee
diff --git a/src/masternode.h b/src/masternode.h
index 7f685c202ec7..3aca3570388f 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -29,7 +29,7 @@
 #define MASTERNODE_MIN_MNB_SECONDS             (5*60)
 #define MASTERNODE_PING_SECONDS                (15*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
-#define MASTERNODE_REMOVAL_SECONDS             (24*60*60)
+#define MASTERNODE_REMOVAL_SECONDS             (75*60)
 
 using namespace std;
 
@@ -77,7 +77,7 @@ class CMasternode
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
     int nVotedTimes;
-
+    
     CMasternode();
     CMasternode(const CMasternode& other);
     CMasternode(const CMasternodeBroadcast& other);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 66bffafcce94..10134f2d00c3 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -256,6 +256,15 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
             bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
             bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAllotted));
+
+            std::string strError = "";
+            bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
+            bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+
+            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {   
+                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+            }
+
             resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
         }
 
@@ -289,6 +298,15 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
             bObj.push_back(Pair("Amount",  (int64_t)prop->GetAmount()));
+
+            std::string strError = "";
+            bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
+            bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+
+            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {   
+                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+            }
+
             resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
         }
 
diff --git a/src/version.h b/src/version.h
index db712ded2441..e23b0826a0f2 100644
--- a/src/version.h
+++ b/src/version.h
@@ -24,6 +24,9 @@ static const int MIN_PEER_PROTO_VERSION = 70066;
 //! minimum peer version accepted by DarksendPool
 static const int MIN_POOL_PEER_PROTO_VERSION = 70083;
 
+//! minimum peer version for masternode budgets
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70083;
+
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version

From 1af0fa5098df72f4c2f2db6599a6606b9c36183b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 6 Jul 2015 11:12:56 -0700
Subject: [PATCH 1509/1819] Only sync masternode assets after new block

---
 src/darksend.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 45d1e512a2d6..1522352aedc3 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2356,7 +2356,7 @@ void ThreadCheckDarkSendPool()
             if(!fIsInitialDownload) {
                 CBlockIndex* pindexPrev = chainActive.Tip();
                 if(pindexPrev != NULL) {
-                    if(pindexPrev->nTime > GetAdjustedTime() - (60*24))
+                    if(pindexPrev->nTime > GetAdjustedTime() - 60)
                     {
 
                         LOCK(cs_vNodes);

From 391cc398a4fa868aacca8b218c0b0df838074ec4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 6 Jul 2015 11:36:13 -0700
Subject: [PATCH 1510/1819] show voting commands for proposals in mnbudget show

---
 src/masternode-budget.h      | 22 +++++++++++++++++++++-
 src/rpcmasternode-budget.cpp |  2 ++
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 8f2645911157..b2e20655bf8e 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -12,7 +12,8 @@
 #include "util.h"
 #include "base58.h"
 #include "masternode.h"
-//#include "timedata.h"
+#include <boost/lexical_cast.hpp>
+
 
 using namespace std;
 
@@ -390,6 +391,25 @@ class CBudgetProposal
     void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
     int64_t GetAllotted() {return nAlloted;}
 
+    std::string GetVoteCommand()
+    {
+        //c4 mnbudget vote one http://www.one.com/one.json 100 1000 xx9FwiqeRbuxBn5Sh3SNeoxmgpwQNSuMC4 1000 yes
+
+        int nPayments = (nBlockEnd - nBlockStart) % GetBudgetPaymentCycleBlocks();
+            
+        CTxDestination address1;
+        ExtractDestination(address, address1);
+        CBitcoinAddress address2(address1);
+
+
+        std::string strCommand = "dash-cli mnbudget vote " + strProposalName + " " + strURL + " " + boost::lexical_cast<std::string>(nPayments);
+        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + boost::lexical_cast<std::string>(nAmount) + " " + address2.ToString();
+        strCommand += " " + boost::lexical_cast<std::string>(nAmount) + " yes|no";
+
+        return strCommand;
+    }
+
+
     void CleanAndRemove();
 
     uint256 GetHash(){
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 10134f2d00c3..d1ef0cae786b 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -243,6 +243,7 @@ Value mnbudget(const Array& params, bool fHelp)
             CBitcoinAddress address2(address1);
 
             Object bObj;
+            bObj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
             bObj.push_back(Pair("URL",  prop->GetURL()));
             bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
@@ -286,6 +287,7 @@ Value mnbudget(const Array& params, bool fHelp)
             CBitcoinAddress address2(address1);
 
             Object bObj;
+            bObj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
             bObj.push_back(Pair("URL",  prop->GetURL()));
             bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));

From 2e8a1dcb9417a9c7539f8f506ddaa82e39e639bd Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 6 Jul 2015 12:53:22 -0700
Subject: [PATCH 1511/1819] fixed GetVoteCommand

---
 src/masternode-budget.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index b2e20655bf8e..b77127fe3451 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -329,7 +329,7 @@ class CFinalizedBudgetVote
         READWRITE(nTime);
         READWRITE(vchSig);
     }
-    
+
 };
 
 //
@@ -396,15 +396,14 @@ class CBudgetProposal
         //c4 mnbudget vote one http://www.one.com/one.json 100 1000 xx9FwiqeRbuxBn5Sh3SNeoxmgpwQNSuMC4 1000 yes
 
         int nPayments = (nBlockEnd - nBlockStart) % GetBudgetPaymentCycleBlocks();
-            
+
         CTxDestination address1;
         ExtractDestination(address, address1);
         CBitcoinAddress address2(address1);
 
 
         std::string strCommand = "dash-cli mnbudget vote " + strProposalName + " " + strURL + " " + boost::lexical_cast<std::string>(nPayments);
-        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + boost::lexical_cast<std::string>(nAmount) + " " + address2.ToString();
-        strCommand += " " + boost::lexical_cast<std::string>(nAmount) + " yes|no";
+        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + address2.ToString() + " " + boost::lexical_cast<std::string>(nAmount) + " yes|no";
 
         return strCommand;
     }

From 05e126f8530ae5bd35f488bc17d2f283fd0f28b1 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 6 Jul 2015 13:23:09 -0700
Subject: [PATCH 1512/1819] Clear expired proposals / added mnbudget check

---
 src/masternode-budget.cpp    | 42 ++++++++++++++++++++----------------
 src/masternode-budget.h      |  2 +-
 src/rpcmasternode-budget.cpp | 24 ++++++++++++++-------
 3 files changed, 40 insertions(+), 28 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 827263eea21b..2f3a198c41a3 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -59,7 +59,7 @@ void CBudgetManager::ResignInvalidProposals()
     if(!fMasterNode){
         CheckSignatureValidity();
         return;
-    } 
+    }
 
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return;
@@ -349,7 +349,7 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad)
         return IncorrectHash;
     }
 
-   
+
     unsigned char pchMsgTmp[4];
     std::string strMagicMessageTmp;
     try {
@@ -439,7 +439,7 @@ void CBudgetManager::AddProposal(CBudgetProposal& prop)
 {
     LOCK(cs);
     if(mapProposals.count(prop.GetHash())) {
-        //this proposal must have went invalid, so update the vin to the new one        
+        //this proposal must have went invalid, so update the vin to the new one
         LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid finalized budget (%s to %s)\n", mapFinalizedBudgets[prop.GetHash()].vin.prevout.ToStringShort().c_str(), prop.vin.prevout.ToStringShort().c_str());
         mapProposals[prop.GetHash()].vin = prop.vin;
         return;
@@ -628,7 +628,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
         (*it2).second.CleanAndRemove();
 
         CBudgetProposal* prop = &((*it2).second);
-        ret.push_back(prop);        
+        ret.push_back(prop);
 
         it2++;
     }
@@ -673,7 +673,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         CBudgetProposal* prop = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas()-prop->GetNays() > mnodeman.CountEnabled()/10) 
+        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas()-prop->GetNays() > mnodeman.CountEnabled()/10)
         {
             if(nTotalBudget == nBudgetAllocated){
                 prop->SetAllotted(0);
@@ -685,7 +685,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
                 prop->SetAllotted(nTotalBudget - nBudgetAllocated);
                 nBudgetAllocated = nTotalBudget;
             }
-        
+
             ret.push_back(prop);
         }
 
@@ -796,7 +796,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
-        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal(); 
+        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal();
         if(!IsLocal){
             if(pfrom->HasFulfilledRequest("mnvs")) {
                 LogPrintf("mnvs - peer already asked me for the list\n");
@@ -816,7 +816,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     if (strCommand == "mprop") { //Masternode Proposal
         CBudgetProposalBroadcast prop;
         vRecv >> prop;
-        
+
         if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())){
             //if this proposal went inactive, we'll update it with the new re-signature
             if(!mapSeenMasternodeBudgetProposals[prop.GetHash()].fInvalid){
@@ -983,13 +983,13 @@ bool CBudgetManager::PropExists(uint256 nHash)
 
 void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 {
-    /*  
+    /*
         Sync with a client on the network
 
         --
 
-        This code checks each of the hash maps for all known budget proposals and finalized budget proposals, then checks them against the 
-        budget object to see if they're OK. If all checks pass, we'll send it to the peer. 
+        This code checks each of the hash maps for all known budget proposals and finalized budget proposals, then checks them against the
+        budget object to see if they're OK. If all checks pass, we'll send it to the peer.
 
     */
 
@@ -1111,9 +1111,6 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 
 bool CBudgetProposal::IsValid(std::string& strError)
 {
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) {strError = "Tip is NULL"; return true;}
-
     if(GetYeas()+GetNays() < -(mnodeman.CountEnabled()/10)){
          strError = "Active removal";
          return false;
@@ -1134,6 +1131,12 @@ bool CBudgetProposal::IsValid(std::string& strError)
         return false;
     }
 
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) {strError = "Tip is NULL"; return true;}
+
+    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2 ) return false;
+
+
     return true;
 }
 
@@ -1151,7 +1154,7 @@ void CBudgetProposal::CleanAndRemove()
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        if ((*it).second.SignatureValid()) 
+        if ((*it).second.SignatureValid())
         {
             ++it;
         } else {
@@ -1297,7 +1300,7 @@ bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasterno
     CKey keyCollateralAddress;
 
     std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +  
+    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +
         boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
@@ -1324,7 +1327,7 @@ bool CBudgetProposalBroadcast::SignatureValid()
 {
     std::string errorMessage;
 
-    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +  
+    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +
         boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
 
     CMasternode* pmn = mnodeman.Find(vin);
@@ -1493,7 +1496,7 @@ void CFinalizedBudget::CleanAndRemove()
     std::map<uint256, CFinalizedBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        if ((*it).second.SignatureValid()) 
+        if ((*it).second.SignatureValid())
         {
             ++it;
         } else {
@@ -1586,6 +1589,7 @@ bool CFinalizedBudget::IsValid()
     if(pindexPrev == NULL) return true;
 
     if(nBlockStart < pindexPrev->nHeight) return false;
+    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2 ) return false;
 
     return true;
 }
@@ -1597,7 +1601,7 @@ bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockH
         bool found = false;
         BOOST_FOREACH(CTxOut out, txNew.vout)
         {
-            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue) 
+            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue)
                 found = true;
         }
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index b77127fe3451..0288f33fad5f 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -395,7 +395,7 @@ class CBudgetProposal
     {
         //c4 mnbudget vote one http://www.one.com/one.json 100 1000 xx9FwiqeRbuxBn5Sh3SNeoxmgpwQNSuMC4 1000 yes
 
-        int nPayments = (nBlockEnd - nBlockStart) % GetBudgetPaymentCycleBlocks();
+        int nPayments = GetTotalPaymentCount();
 
         CTxDestination address1;
         ExtractDestination(address, address1);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index d1ef0cae786b..d3fa3160bebf 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -25,7 +25,7 @@ Value mnbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show" && strCommand != "projection"))
+        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show" && strCommand != "projection" && strCommand != "check"))
         throw runtime_error(
                 "mnbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
@@ -37,6 +37,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 "  getinfo            - Show current masternode budgets\n"
                 "  show               - Show all budgets\n"
                 "  projection         - Show the projection of which proposals will be paid the next cycle\n"
+                "  check              - Scan proposals and remove invalid\n"
                 );
 
     if(strCommand == "vote-many")
@@ -121,7 +122,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
                 failed++;
                 continue;
-            }    
+            }
 
             //create the proposal incase we're the first to make it
             CBudgetProposalBroadcast prop(pmn->vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
@@ -262,7 +263,7 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
             bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
 
-            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {   
+            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
                 bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
             }
 
@@ -305,7 +306,7 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
             bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
 
-            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {   
+            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
                 bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
             }
 
@@ -356,7 +357,7 @@ Value mnbudget(const Array& params, bool fHelp)
         std::string strProposalName = params[1].get_str();
 
         Object obj;
-        
+
         CBudgetProposal* prop = budget.FindProposal(strProposalName);
 
         if(prop == NULL) return "Unknown proposal name";
@@ -366,11 +367,18 @@ Value mnbudget(const Array& params, bool fHelp)
             obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(),  (*it).second.GetVoteString().c_str()));
             it++;
         }
-        
+
 
         return obj;
     }
 
+    if(strCommand == "check")
+    {
+        budget.CheckAndRemove();
+
+        return "Success";
+    }
+
     return Value::null;
 }
 
@@ -396,7 +404,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
     {
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
-        
+
         CBlockIndex* pindexPrev = chainActive.Tip();
         if(!pindexPrev)
             return "Must be synced to suggest";
@@ -498,7 +506,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
                 failed++;
                 continue;
-            }    
+            }
 
 
             CFinalizedBudgetVote vote(pmn->vin, hash);

From 6c6a280df8f2fa3e48ab3b0105b5bf7332384b36 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 6 Jul 2015 13:37:43 -0700
Subject: [PATCH 1513/1819] Version bump / more fixes

---
 configure.ac            | 2 +-
 src/clientversion.h     | 2 +-
 src/instantx.h          | 2 +-
 src/masternode-budget.h | 2 +-
 src/version.h           | 8 ++++----
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index c4ff20a48e08..4b36bcc2768f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 9)
+define(_CLIENT_VERSION_BUILD, 10)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 5e99ab048ed8..965bf857e00e 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 9
+#define CLIENT_VERSION_BUILD 10
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 2609bf1b8192..e7664bbed1d1 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70083;
+static const int MIN_INSTANTX_PROTO_VERSION = 70084;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 0288f33fad5f..ad2d0aa8e27e 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -403,7 +403,7 @@ class CBudgetProposal
 
 
         std::string strCommand = "dash-cli mnbudget vote " + strProposalName + " " + strURL + " " + boost::lexical_cast<std::string>(nPayments);
-        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + address2.ToString() + " " + boost::lexical_cast<std::string>(nAmount) + " yes|no";
+        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + address2.ToString() + " " + boost::lexical_cast<std::string>(nAmount/COIN) + " yes|no";
 
         return strCommand;
     }
diff --git a/src/version.h b/src/version.h
index e23b0826a0f2..6b1c206484fd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70083;
+static const int PROTOCOL_VERSION = 70084;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70083;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70084;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70083;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70084;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70083;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70084;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From cc494c60911871f1d38fdb05f7a012c8566edd6e Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 6 Jul 2015 22:52:46 +0200
Subject: [PATCH 1514/1819] Fixed warning QLabel(0xb0049b8, name =
 "labelCoinControlChangeLabel") does not have a property named "padding"

---
 src/qt/res/css/drkblue.css | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index 204820642661..84c49aa94735 100755
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -1068,7 +1068,6 @@ QDialog#SendCoinsDialog .QFrame#frameCoinControl .QValidatedLineEdit#lineEditCoi
 QDialog#SendCoinsDialog .QFrame#frameCoinControl .QLabel#labelCoinControlChangeLabel { /* Custom Change Address Validation Label */
 font-weight:normal;
 qproperty-margin:-6;
-qproperty-padding:0;
 margin-right:112px;
 }
 

From e40de28900c63f7ce25bdc32645fdafe071dd234 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 00:00:00 +0300
Subject: [PATCH 1515/1819] Stop banning nodes for unknown masternodes while
 processing budget messages. Also cleanup naming/logging a bit.

---
 src/masternode-budget.cpp | 82 +++++++++++++++++++--------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 2f3a198c41a3..6fb7b01fafdd 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -810,7 +810,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         pfrom->FulfilledRequest("mnvs");
         budget.Sync(pfrom, nProp);
-        LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString().c_str());
+        LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString());
     }
 
     if (strCommand == "mprop") { //Masternode Proposal
@@ -827,6 +827,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         //set time we first saw this prop
         prop.nTime = GetAdjustedTime();
 
+        CMasternode* pmn = mnodeman.Find(prop.vin);
+        if(pmn == NULL) {
+            if(fDebug) LogPrintf("mprop - unknown masternode - vin: %s\n", prop.vin.ToString());
+            return;
+        }
+
         if(!prop.SignatureValid()){
             LogPrintf("mprop - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
@@ -835,13 +841,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         std::string strError = "";
         if(!prop.IsValid(strError)) {
-            LogPrintf("mprop - invalid prop - %s\n", strError.c_str());
-            return;
-        }
-
-        CMasternode* pmn = mnodeman.Find(prop.vin);
-        if(pmn == NULL) {
-            LogPrintf("mprop - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("mprop - invalid budget proposal - %s\n", strError.c_str());
             return;
         }
 
@@ -860,7 +860,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             //We might have active votes for this proposal that are valid now
             CheckOrphanVotes();
         } else {
-            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
         }
     }
@@ -873,15 +873,15 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        if(!vote.SignatureValid()){
-            LogPrintf("mvote - signature invalid\n");
-            Misbehaving(pfrom->GetId(), 20);
+        CMasternode* pmn = mnodeman.Find(vote.vin);
+        if(pmn == NULL) {
+            if(fDebug) LogPrintf("mvote - unknown masternode - vin: %s\n", vote.vin.ToString());
             return;
         }
 
-        CMasternode* pmn = mnodeman.Find(vote.vin);
-        if(pmn == NULL) {
-            LogPrintf("mvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        if(!vote.SignatureValid()){
+            LogPrintf("mvote - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
@@ -891,54 +891,54 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
-            LogPrintf("mvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
         }
     }
 
     if (strCommand == "fbs") { //Finalized Budget Suggestion
-        CFinalizedBudgetBroadcast prop;
-        vRecv >> prop;
+        CFinalizedBudgetBroadcast fbs;
+        vRecv >> fbs;
 
-        if(mapSeenFinalizedBudgets.count(prop.GetHash())){
+        if(mapSeenFinalizedBudgets.count(fbs.GetHash())){
             //if this budget went inactive, we'll update it with the new re-signature
-            if(!mapSeenFinalizedBudgets[prop.GetHash()].fInvalid){
+            if(!mapSeenFinalizedBudgets[fbs.GetHash()].fInvalid){
                 return;
             }
         }
 
-        if(!prop.SignatureValid()){
-            LogPrintf("fbs - signature invalid\n");
-            Misbehaving(pfrom->GetId(), 20);
+        CMasternode* pmn = mnodeman.Find(fbs.vin);
+        if(pmn == NULL) {
+            if(fDebug) LogPrintf("fbs - unknown masternode - vin: %s\n", fbs.vin.ToString());
             return;
         }
 
-        if(!prop.IsValid()) {
-            LogPrintf("fbs - invalid prop\n");
+        if(!fbs.SignatureValid()){
+            LogPrintf("fbs - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        CMasternode* pmn = mnodeman.Find(prop.vin);
-        if(pmn == NULL) {
-            LogPrintf("fbs - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        if(!fbs.IsValid()) {
+            LogPrintf("fbs - invalid finalized budget\n");
             return;
         }
 
         //delete if it exists and insert the new object
-        if(mapSeenFinalizedBudgets.count(prop.GetHash())) mapSeenFinalizedBudgets.erase(prop.GetHash());
-        mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+        if(mapSeenFinalizedBudgets.count(fbs.GetHash())) mapSeenFinalizedBudgets.erase(fbs.GetHash());
+        mapSeenFinalizedBudgets.insert(make_pair(fbs.GetHash(), fbs));
 
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            CFinalizedBudget p(prop);
+            CFinalizedBudget p(fbs);
             budget.AddFinalizedBudget(p);
-            prop.Relay();
+            fbs.Relay();
 
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
 
             //we might have active votes for this budget that are now valid
             CheckOrphanVotes();
         } else {
-            LogPrintf("fbs - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("fbs - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
         }
     }
@@ -951,15 +951,15 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        if(!vote.SignatureValid()){
-            LogPrintf("fbvote - signature invalid\n");
-            Misbehaving(pfrom->GetId(), 20);
+        CMasternode* pmn = mnodeman.Find(vote.vin);
+        if(pmn == NULL) {
+            if(fDebug) LogPrintf("fbvote - unknown masternode - vin: %s\n", vote.vin.ToString());
             return;
         }
 
-        CMasternode* pmn = mnodeman.Find(vote.vin);
-        if(pmn == NULL) {
-            LogPrintf("fbvote - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        if(!vote.SignatureValid()){
+            LogPrintf("fbvote - signature invalid\n");
+            Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
@@ -969,7 +969,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
         } else {
-            LogPrintf("fbvote - masternode can't vote again - vin:%s \n", pmn->vin.ToString().c_str());
+            LogPrintf("fbvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
         }
     }
@@ -1400,7 +1400,7 @@ bool CBudgetVote::SignatureValid()
 
     if(pmn == NULL)
     {
-        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
+        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
         return false;
     }
 

From 5b98d9db059cd824f051c7be5a049aa9be9a5698 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@darkcoin.io>
Date: Mon, 6 Jul 2015 15:06:09 -0700
Subject: [PATCH 1516/1819] fixed getinfo for 0-vote proposals

---
 src/masternode-budget.cpp    |  4 ++--
 src/rpcmasternode-budget.cpp | 10 ++++++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 2f3a198c41a3..64635318cbbe 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -534,7 +534,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
 {
     //find the prop with the highest yes count
 
-    int nYesCount = 0;
+    int nYesCount = -99999;
     CBudgetProposal* prop = NULL;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
@@ -546,7 +546,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
         ++it;
     }
 
-    if(nYesCount == 0) return NULL;
+    if(nYesCount == -99999) return NULL;
 
     return prop;
 }
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index d3fa3160bebf..f96c9e722d12 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -332,6 +332,7 @@ Value mnbudget(const Array& params, bool fHelp)
         CBitcoinAddress address2(address1);
 
         Object obj;
+        obj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
         obj.push_back(Pair("Name",  prop->GetName().c_str()));
         obj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
         obj.push_back(Pair("URL",  prop->GetURL().c_str()));
@@ -346,6 +347,15 @@ Value mnbudget(const Array& params, bool fHelp)
         obj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
         obj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
 
+        std::string strError = "";
+        obj.push_back(Pair("IsValid",  prop->IsValid(strError)));
+        obj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+
+        if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
+            obj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+        }
+
+
         return obj;
     }
 

From 05d93445a23c2b6619f5b45bb0c1f1ba5da9a964 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 01:09:28 +0300
Subject: [PATCH 1517/1819] Implement safer version of
 CWallet::PrepareDarksendDenominate: Make outputs by looping through
 denominations: try to add every needed denomination, repeat up to 5-10 times.
 This way we can be pretty sure that it should have at least one of each
 needed denomination. We also do not care about full amount as long as we have
 right denominations, just pass what we found.

---
 src/wallet.cpp | 153 +++++++++++++++++++------------------------------
 1 file changed, 60 insertions(+), 93 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 61d930207df8..482976385445 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2318,6 +2318,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
 
     // ** find the coins we'll use
     std::vector<CTxIn> vCoins;
+    std::vector<CTxIn> vCoinsResult;
     std::vector<COutput> vCoins2;
     int64_t nValueIn = 0;
     CReserveKey reservekey(this);
@@ -2329,129 +2330,95 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
     */
     if(minRounds >= 0){
         if (!SelectCoinsByDenominations(darkSendPool.sessionDenom, 0.1*COIN, DARKSEND_POOL_MAX, vCoins, vCoins2, nValueIn, minRounds, maxRounds))
-            return _("Insufficient funds");
+            return _("Error: can't select current denominated inputs");
     }
 
-    // calculate total value out
-    int64_t nTotalValue = GetTotalValue(vCoins);
-    LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Got: %d \n", nTotalValue);
+    LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Got: %d \n", nValueIn);
 
     BOOST_FOREACH(CTxIn v, vCoins) 
         LockCoin(v.prevout);
 
-    // denominate our funds
-    int64_t nValueLeft = nTotalValue;
+    int64_t nValueLeft = nValueIn;
     std::vector<CTxOut> vOut;
-    std::vector<int64_t> vDenoms;
 
     /*
         TODO: Front load with needed denominations (e.g. .1, 1 )
     */
 
-    /*
-        Add all denominations once
-
-        The beginning of the list is front loaded with each possible
-        denomination in random order. This means we'll at least get 1
-        of each that is required as outputs.
-    */
-    BOOST_FOREACH(int64_t d, darkSendDenominations){
-        vDenoms.push_back(d);
-        vDenoms.push_back(d);
-    }
+    // Make outputs by looping through denominations: try to add every needed denomination, repeat up to 5-10 times.
+    // This way we can be pretty sure that it should have at least one of each needed denomination.
+    // NOTE: No need to randomize order of inputs because they were
+    // initially shuffled in CWallet::SelectCoinsByDenominations already.
+    int nStep = 0;
+    int nStepsMax = 5 + GetRandInt(5);
+    while(nStep < nStepsMax) {
 
-    //randomize the order of these denominations
-    std::random_shuffle (vDenoms.begin(), vDenoms.end());
+        BOOST_FOREACH(int64_t v, darkSendDenominations){
+            // only use the ones that are approved
+            bool fAccepted = false;
+            if((darkSendPool.sessionDenom & (1 << 0))      && v == ((100*COIN) +100000)) {fAccepted = true;}
+            else if((darkSendPool.sessionDenom & (1 << 1)) && v == ((10*COIN)  +10000)) {fAccepted = true;}
+            else if((darkSendPool.sessionDenom & (1 << 2)) && v == ((1*COIN)   +1000)) {fAccepted = true;}
+            else if((darkSendPool.sessionDenom & (1 << 3)) && v == ((.1*COIN)  +100)) {fAccepted = true;}
+            if(!fAccepted) continue;
 
-    /*
-        Build a long list of denominations
+            // try to add it
+            if(nValueLeft - v >= 0) {
+                // Note: this relies on a fact that both vectors MUST have same size
+                std::vector<CTxIn>::iterator it = vCoins.begin();
+                std::vector<COutput>::iterator it2 = vCoins2.begin();
+                while(it2 != vCoins2.end()) {
+                    // we have matching inputs
+                    if((*it2).tx->vout[(*it2).i].nValue == v) {
+                        // add new input in resulting vector
+                        vCoinsResult.push_back(*it);
+                        // remove corresponting items from initial vectors
+                        vCoins.erase(it);
+                        vCoins2.erase(it2);
+
+                        CScript scriptChange;
+                        CPubKey vchPubKey;
+                        // use a unique change address
+                        assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
+                        scriptChange = GetScriptForDestination(vchPubKey.GetID());
+                        reservekey.KeepKey();
 
-        Next we'll build a long random list of denominations to add.
-        Eventually as the algorithm goes through these it'll find the ones
-        it nees to get exact change.
-    */
-    for(int i = 0; i <= 500; i++)
-        BOOST_FOREACH(int64_t d, darkSendDenominations)
-            vDenoms.push_back(d);
-
-    //randomize the order of inputs we get back
-    std::random_shuffle (vDenoms.begin() + (int)darkSendDenominations.size() + 1, vDenoms.end());
-
-    // Make outputs by looping through denominations randomly
-
-    BOOST_REVERSE_FOREACH(int64_t v, vDenoms){
-        //only use the ones that are approved
-        bool fAccepted = false;
-        if((darkSendPool.sessionDenom & (1 << 0))      && v == ((100*COIN) +100000)) {fAccepted = true;}
-        else if((darkSendPool.sessionDenom & (1 << 1)) && v == ((10*COIN)  +10000)) {fAccepted = true;}
-        else if((darkSendPool.sessionDenom & (1 << 2)) && v == ((1*COIN)   +1000)) {fAccepted = true;}
-        else if((darkSendPool.sessionDenom & (1 << 3)) && v == ((.1*COIN)  +100)) {fAccepted = true;}
-        if(!fAccepted) continue;
-
-        int nOutputs = 0;
-
-        // add each output up to 10 times until it can't be added again
-        while(nValueLeft - v >= 0 && nOutputs <= 10) {
-            CScript scriptChange;
-            CPubKey vchPubKey;
-            //use a unique change address
-            assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
-            scriptChange = GetScriptForDestination(vchPubKey.GetID());
-            reservekey.KeepKey();
+                        // add new output
+                        CTxOut o(v, scriptChange);
+                        vOut.push_back(o);
 
-            CTxOut o(v, scriptChange);
-            vOut.push_back(o);
+                        // subtract denomination amount
+                        nValueLeft -= v;
 
-            //increment outputs and subtract denomination amount
-            nOutputs++;
-            nValueLeft -= v;
+                        break;
+                    }
+                    ++it;
+                    ++it2;
+                }
+            }
         }
 
+        nStep++;
+
         if(nValueLeft == 0) break;
     }
 
-    //back up mode , incase we couldn't successfully make the outputs for some reason
-    if(vOut.size() > 40 || darkSendPool.GetDenominations(vOut) != darkSendPool.sessionDenom || nValueLeft != 0){
-        vOut.clear();
-        nValueLeft = nTotalValue;
-
-        // Make outputs by looping through denominations, from small to large
-
-        BOOST_FOREACH(const COutput& out, vCoins2){
-            CScript scriptChange;
-            CPubKey vchPubKey;
-            //use a unique change address
-            assert(reservekey.GetReservedKey(vchPubKey)); // should never fail, as we just unlocked
-            scriptChange = GetScriptForDestination(vchPubKey.GetID());
-            reservekey.KeepKey();
-
-            CTxOut o(out.tx->vout[out.i].nValue, scriptChange);
-            vOut.push_back(o);
-
-            //increment outputs and subtract denomination amount
-            nValueLeft -= out.tx->vout[out.i].nValue;
-
-            if(nValueLeft == 0) break;
-        }
-    }
+    // unlock unused coins
+    BOOST_FOREACH(CTxIn v, vCoins)
+        UnlockCoin(v.prevout);
 
     if(darkSendPool.GetDenominations(vOut) != darkSendPool.sessionDenom) {
-        BOOST_FOREACH(CTxIn v, vCoins)
+        // unlock used coins on failure
+        BOOST_FOREACH(CTxIn v, vCoinsResult)
             UnlockCoin(v.prevout);
         return "Error: can't make current denominated outputs";
     }
 
-    // we don't support change at all
-    if(nValueLeft != 0) {
-        BOOST_FOREACH(CTxIn v, vCoins)
-            UnlockCoin(v.prevout);
-        return "Error: change left-over in pool. Must use denominations only";
-    }
-
-    //randomize the output order
+    // randomize the output order
     std::random_shuffle (vOut.begin(), vOut.end());
 
-    darkSendPool.SendDarksendDenominate(vCoins, vOut, nValueIn);
+    // We also do not care about full amount as long as we have right denominations, just pass what we found
+    darkSendPool.SendDarksendDenominate(vCoinsResult, vOut, nValueIn - nValueLeft);
 
     return "";
 }

From a8d230f80d0910224eb77087170d5acc913dfbd2 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 01:40:38 +0300
Subject: [PATCH 1518/1819] satoshi(s) -> duff(s)  &  Satoshi:x.x.x -> Dash
 Core:x.x.x (both for user visible strings only)

---
 src/qt/coincontroldialog.cpp | 2 +-
 src/rpcmining.cpp            | 8 ++++----
 src/rpcnet.cpp               | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 5e17b94f346b..df357b22e403 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -660,7 +660,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
         dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
     else
         dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), mempool.estimateFee(nTxConfirmTarget).GetFeePerK()) / 1000;
-    QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
+    QString toolTip4 = tr("Can vary +/- %1 duff(s) per input.").arg(dFeeVary);
 
     l3->setToolTip(toolTip4);
     l4->setToolTip(toolTip4);
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 2c8da34f7e34..a856ce6923ee 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -280,8 +280,8 @@ Value prioritisetransaction(const Array& params, bool fHelp)
             "1. \"txid\"       (string, required) The transaction id.\n"
             "2. priority delta (numeric, required) The priority to add or subtract.\n"
             "                  The transaction selection algorithm considers the tx as it would have a higher priority.\n"
-            "                  (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n"
-            "3. fee delta      (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n"
+            "                  (priority of a transaction is calculated: coinage * value_in_duffs / txsize) \n"
+            "3. fee delta      (numeric, required) The fee value (in duffs) to add (or subtract, if negative).\n"
             "                  The fee is not actually paid, only the algorithm for selecting transactions into a block\n"
             "                  considers the transaction as it would have paid a higher (or lower) fee.\n"
             "\nResult\n"
@@ -351,7 +351,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
             "             n                        (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is\n"
             "             ,...\n"
             "         ],\n"
-            "         \"fee\": n,                   (numeric) difference in value between transaction inputs and outputs (in Satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n"
+            "         \"fee\": n,                   (numeric) difference in value between transaction inputs and outputs (in duffs); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one\n"
             "         \"sigops\" : n,               (numeric) total number of SigOps, as counted for purposes of block limits; if key is not present, sigop count is unknown and clients MUST NOT assume there aren't any\n"
             "         \"required\" : true|false     (boolean) if provided and true, this transaction must be in the final block\n"
             "      }\n"
@@ -360,7 +360,7 @@ Value getblocktemplate(const Array& params, bool fHelp)
             "  \"coinbaseaux\" : {                  (json object) data that should be included in the coinbase's scriptSig content\n"
             "      \"flags\" : \"flags\"            (string) \n"
             "  },\n"
-            "  \"coinbasevalue\" : n,               (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in Satoshis)\n"
+            "  \"coinbasevalue\" : n,               (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in duffs)\n"
             "  \"coinbasetxn\" : { ... },           (json object) information for coinbase transaction\n"
             "  \"target\" : \"xxxx\",               (string) The hash target\n"
             "  \"mintime\" : xxx,                   (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT)\n"
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 6894b629a2d2..a8f51fa6122d 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -95,7 +95,7 @@ Value getpeerinfo(const Array& params, bool fHelp)
             "    \"pingtime\": n,             (numeric) ping time\n"
             "    \"pingwait\": n,             (numeric) ping wait\n"
             "    \"version\": v,              (numeric) The peer version, such as 7001\n"
-            "    \"subver\": \"/Satoshi:0.8.5/\",  (string) The string version\n"
+            "    \"subver\": \"/Dash Core:x.x.x/\",  (string) The string version\n"
             "    \"inbound\": true|false,     (boolean) Inbound (true) or Outbound (false)\n"
             "    \"startingheight\": n,       (numeric) The starting height (block) of the peer\n"
             "    \"banscore\": n,             (numeric) The ban score\n"
@@ -381,7 +381,7 @@ Value getnetworkinfo(const Array& params, bool fHelp)
             "\nResult:\n"
             "{\n"
             "  \"version\": xxxxx,                      (numeric) the server version\n"
-            "  \"subversion\": \"/Satoshi:x.x.x/\",     (string) the server subversion string\n"
+            "  \"subversion\": \"/Dash Core:x.x.x/\",     (string) the server subversion string\n"
             "  \"protocolversion\": xxxxx,              (numeric) the protocol version\n"
             "  \"localservices\": \"xxxxxxxxxxxxxxxx\", (string) the services we offer to the network\n"
             "  \"timeoffset\": xxxxx,                   (numeric) the time offset\n"

From 9c5bcff4cb2744019bf5d798bb608f5f28dfecfc Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Tue, 7 Jul 2015 05:13:50 +0200
Subject: [PATCH 1519/1819] satoshi(s) -> duff(s) in locales

---
 src/qt/locale/dash_bar.ts   | 2 +-
 src/qt/locale/dash_bg.ts    | 4 ++--
 src/qt/locale/dash_ca.ts    | 2 +-
 src/qt/locale/dash_cmn.ts   | 2 +-
 src/qt/locale/dash_cs.ts    | 2 +-
 src/qt/locale/dash_da.ts    | 2 +-
 src/qt/locale/dash_de.ts    | 2 +-
 src/qt/locale/dash_el.ts    | 2 +-
 src/qt/locale/dash_en.ts    | 4 ++--
 src/qt/locale/dash_eo.ts    | 2 +-
 src/qt/locale/dash_es.ts    | 2 +-
 src/qt/locale/dash_fi.ts    | 2 +-
 src/qt/locale/dash_fr.ts    | 2 +-
 src/qt/locale/dash_hu_HU.ts | 2 +-
 src/qt/locale/dash_it.ts    | 2 +-
 src/qt/locale/dash_lv_LV.ts | 2 +-
 src/qt/locale/dash_nb.ts    | 2 +-
 src/qt/locale/dash_nl.ts    | 2 +-
 src/qt/locale/dash_pl.ts    | 6 +++---
 src/qt/locale/dash_pt.ts    | 4 ++--
 src/qt/locale/dash_pt_BR.ts | 2 +-
 src/qt/locale/dash_ru.ts    | 2 +-
 src/qt/locale/dash_sk.ts    | 2 +-
 src/qt/locale/dash_sv.ts    | 2 +-
 src/qt/locale/dash_tr.ts    | 2 +-
 src/qt/locale/dash_vi.ts    | 2 +-
 src/qt/locale/dash_zh_CN.ts | 2 +-
 src/qt/locale/dash_zh_HK.ts | 2 +-
 28 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/qt/locale/dash_bar.ts b/src/qt/locale/dash_bar.ts
index 340c4bc29029..be4f13e9ece0 100644
--- a/src/qt/locale/dash_bar.ts
+++ b/src/qt/locale/dash_bar.ts
@@ -1052,7 +1052,7 @@ Wird zugmachd, wails bessa is.</translation>
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_bg.ts b/src/qt/locale/dash_bg.ts
index dcf73630d598..45e73de17f09 100644
--- a/src/qt/locale/dash_bg.ts
+++ b/src/qt/locale/dash_bg.ts
@@ -948,8 +948,8 @@ Address: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Може да варира +/- 1 satoshi(s) за вход.</translation>
+        <source>Can vary +/- %1 duff(s) per input.</source>
+        <translation>Може да варира +/- 1 duff(s) за вход.</translation>
     </message>
     <message>
         <location line="+131"/>
diff --git a/src/qt/locale/dash_ca.ts b/src/qt/locale/dash_ca.ts
index d66413d6b9c5..3f6d1054bc55 100644
--- a/src/qt/locale/dash_ca.ts
+++ b/src/qt/locale/dash_ca.ts
@@ -1042,7 +1042,7 @@ Address: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_cmn.ts b/src/qt/locale/dash_cmn.ts
index 772bff9305ea..6d2650619ad6 100644
--- a/src/qt/locale/dash_cmn.ts
+++ b/src/qt/locale/dash_cmn.ts
@@ -1039,7 +1039,7 @@ Address: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_cs.ts b/src/qt/locale/dash_cs.ts
index c201d043425b..21bc1fa59a88 100644
--- a/src/qt/locale/dash_cs.ts
+++ b/src/qt/locale/dash_cs.ts
@@ -1034,7 +1034,7 @@ Adresa: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_da.ts b/src/qt/locale/dash_da.ts
index 4a7e27a6101c..dd73a8b4391a 100644
--- a/src/qt/locale/dash_da.ts
+++ b/src/qt/locale/dash_da.ts
@@ -1028,7 +1028,7 @@ Adresse: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_de.ts b/src/qt/locale/dash_de.ts
index 956ba006e463..f06d2869d143 100644
--- a/src/qt/locale/dash_de.ts
+++ b/src/qt/locale/dash_de.ts
@@ -947,7 +947,7 @@ Adresse: %4</translation>
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation>Kann um +/- 1 duff(s) pro Eingabe variieren.</translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_el.ts b/src/qt/locale/dash_el.ts
index e47fb477b836..ed0f6bc7dba4 100644
--- a/src/qt/locale/dash_el.ts
+++ b/src/qt/locale/dash_el.ts
@@ -1040,7 +1040,7 @@ Address: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_en.ts b/src/qt/locale/dash_en.ts
index 7a8f8b574a58..a3dd90b3d22b 100644
--- a/src/qt/locale/dash_en.ts
+++ b/src/qt/locale/dash_en.ts
@@ -968,8 +968,8 @@ Address: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Can vary +/- %1 satoshi(s) per input.</translation>
+        <source>Can vary +/- %1 duff(s) per input.</source>
+        <translation>Can vary +/- %1 duff(s) per input.</translation>
     </message>
     <message>
         <location line="+131"/>
diff --git a/src/qt/locale/dash_eo.ts b/src/qt/locale/dash_eo.ts
index 946d8ec1a5d3..3d34214383e0 100644
--- a/src/qt/locale/dash_eo.ts
+++ b/src/qt/locale/dash_eo.ts
@@ -1016,7 +1016,7 @@ Adreso: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_es.ts b/src/qt/locale/dash_es.ts
index 4ca9a9b2cf22..e1b59fc6560a 100644
--- a/src/qt/locale/dash_es.ts
+++ b/src/qt/locale/dash_es.ts
@@ -948,7 +948,7 @@ Dirección: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation>Puede variar +/- %1 duff(s) por entrada.</translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_fi.ts b/src/qt/locale/dash_fi.ts
index 0f4821e5a9fa..69b5e654e684 100644
--- a/src/qt/locale/dash_fi.ts
+++ b/src/qt/locale/dash_fi.ts
@@ -948,7 +948,7 @@ Osoite: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation>Voi vaihdella +/- %1 duff(s) per syöte.</translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_fr.ts b/src/qt/locale/dash_fr.ts
index 02851a9fdbd8..9ac896ad14f4 100644
--- a/src/qt/locale/dash_fr.ts
+++ b/src/qt/locale/dash_fr.ts
@@ -1045,7 +1045,7 @@ Adresse : %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_hu_HU.ts b/src/qt/locale/dash_hu_HU.ts
index 873629efcb58..183f5052b090 100644
--- a/src/qt/locale/dash_hu_HU.ts
+++ b/src/qt/locale/dash_hu_HU.ts
@@ -1034,7 +1034,7 @@ Cím: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_it.ts b/src/qt/locale/dash_it.ts
index 13822cf34753..80a1cefb2abe 100644
--- a/src/qt/locale/dash_it.ts
+++ b/src/qt/locale/dash_it.ts
@@ -949,7 +949,7 @@ Indirizzo: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/dash_lv_LV.ts b/src/qt/locale/dash_lv_LV.ts
index a0bc474b2b9b..c65e4a11ab69 100644
--- a/src/qt/locale/dash_lv_LV.ts
+++ b/src/qt/locale/dash_lv_LV.ts
@@ -1052,7 +1052,7 @@ Adrese: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_nb.ts b/src/qt/locale/dash_nb.ts
index 9814db416243..0bf3c7065b6c 100644
--- a/src/qt/locale/dash_nb.ts
+++ b/src/qt/locale/dash_nb.ts
@@ -1045,7 +1045,7 @@ Adresse: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_nl.ts b/src/qt/locale/dash_nl.ts
index b9913e443dbd..3eced13acb85 100644
--- a/src/qt/locale/dash_nl.ts
+++ b/src/qt/locale/dash_nl.ts
@@ -1045,7 +1045,7 @@ Adres: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_pl.ts b/src/qt/locale/dash_pl.ts
index e72f6d0b37f2..7a1c96931365 100644
--- a/src/qt/locale/dash_pl.ts
+++ b/src/qt/locale/dash_pl.ts
@@ -948,8 +948,8 @@ Adres: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Może się różnić około +/- %1 satoshi na transację.</translation>
+        <source>Can vary +/- %1 duff(s) per input.</source>
+        <translation>Może się różnić około +/- %1 duff na transację.</translation>
     </message>
     <message>
         <location line="+131"/>
@@ -5619,4 +5619,4 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Plik wallet.dat zepsuty, odzyskiwanie nie powiodło się</translation>
     </message>
 </context>
-</TS>
\ No newline at end of file
+</TS>
diff --git a/src/qt/locale/dash_pt.ts b/src/qt/locale/dash_pt.ts
index f5e08a513903..dfc76e329fba 100644
--- a/src/qt/locale/dash_pt.ts
+++ b/src/qt/locale/dash_pt.ts
@@ -948,8 +948,8 @@ Endereço: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
-        <translation>Pode variar +/- %1 satoshi(s) por entrada.</translation>
+        <source>Can vary +/- %1 duff(s) per input.</source>
+        <translation>Pode variar +/- %1 duff(s) por entrada.</translation>
     </message>
     <message>
         <location line="+131"/>
diff --git a/src/qt/locale/dash_pt_BR.ts b/src/qt/locale/dash_pt_BR.ts
index 37e28c8a02e0..1b299a45ebd0 100644
--- a/src/qt/locale/dash_pt_BR.ts
+++ b/src/qt/locale/dash_pt_BR.ts
@@ -1043,7 +1043,7 @@ Endereço: %4</translation>
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_ru.ts b/src/qt/locale/dash_ru.ts
index ec36b5d01923..2f74dde727aa 100644
--- a/src/qt/locale/dash_ru.ts
+++ b/src/qt/locale/dash_ru.ts
@@ -979,7 +979,7 @@ Address: %4
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation>Может отличаться на +/- %1 сатоши на каждый вход.</translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_sk.ts b/src/qt/locale/dash_sk.ts
index 6783406b1962..951c398013c2 100644
--- a/src/qt/locale/dash_sk.ts
+++ b/src/qt/locale/dash_sk.ts
@@ -1041,7 +1041,7 @@ Adresa: %4</translation>
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_sv.ts b/src/qt/locale/dash_sv.ts
index 122a1628f642..1c326e5a2c4d 100644
--- a/src/qt/locale/dash_sv.ts
+++ b/src/qt/locale/dash_sv.ts
@@ -1047,7 +1047,7 @@ Adress: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_tr.ts b/src/qt/locale/dash_tr.ts
index 2f6ec6f3d8b3..2ac11bd4fedb 100644
--- a/src/qt/locale/dash_tr.ts
+++ b/src/qt/locale/dash_tr.ts
@@ -1034,7 +1034,7 @@ Adres: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_vi.ts b/src/qt/locale/dash_vi.ts
index 6203cfdeedca..d3008c65cfde 100644
--- a/src/qt/locale/dash_vi.ts
+++ b/src/qt/locale/dash_vi.ts
@@ -948,7 +948,7 @@ Kiểu: %3
     </message>
     <message>
         <location line="+216"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"/>
     </message>
     <message>
diff --git a/src/qt/locale/dash_zh_CN.ts b/src/qt/locale/dash_zh_CN.ts
index 19a189c93115..6752d416d43d 100644
--- a/src/qt/locale/dash_zh_CN.ts
+++ b/src/qt/locale/dash_zh_CN.ts
@@ -1038,7 +1038,7 @@ Address: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
diff --git a/src/qt/locale/dash_zh_HK.ts b/src/qt/locale/dash_zh_HK.ts
index 435021a5d597..02be13c02a9f 100644
--- a/src/qt/locale/dash_zh_HK.ts
+++ b/src/qt/locale/dash_zh_HK.ts
@@ -1045,7 +1045,7 @@ Address: %4
     </message>
     <message>
         <location filename="../coincontroldialog.cpp" line="654"/>
-        <source>Can vary +/- %1 satoshi(s) per input.</source>
+        <source>Can vary +/- %1 duff(s) per input.</source>
         <translation type="unfinished"></translation>
     </message>
     <message>

From 7eee9f15ece5b690e557172e02c6cd7a4978595f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 10:16:01 +0300
Subject: [PATCH 1520/1819] Fix GetInputDarksendRounds: - show user and use in
 external calculations rounds that are calculated respecting current settings
 while use "real" rounds in internal calulation to store correct results in
 cache and easily provide user with updated info on settings change - fix max
 real rounds limit (16)

---
 src/darksend.cpp | 24 +++++++++++++++---------
 src/darksend.h   |  4 +++-
 2 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 1522352aedc3..0cde15ebe6f7 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -387,11 +387,11 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 int randomizeList (int i) { return std::rand()%i;}
 
 // Recursively determine the rounds of a given input (How deep is the Darksend chain for a given input)
-int GetInputDarksendRounds(CTxIn in, int rounds)
+int GetRealInputDarksendRounds(CTxIn in, int rounds)
 {
     static std::map<uint256, CMutableTransaction> mDenomWtxes;
 
-    if(rounds >= 17) return rounds;
+    if(rounds >= 16) return 15; // 16 rounds max
 
     uint256 hash = in.prevout.hash;
     unsigned int nout = in.prevout.n;
@@ -417,14 +417,14 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
         if(nout >= wtx.vout.size())
         {
             // should never actually hit this
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %d\n", hash.ToString(), nout, -4);
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, -4);
             return -4;
         }
 
         if(pwalletMain->IsCollateralAmount(wtx.vout[nout].nValue))
         {
             mDenomWtxes[hash].vout[nout].nRounds = -3;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -432,7 +432,7 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
         if(/*rounds == 0 && */!pwalletMain->IsDenominatedAmount(wtx.vout[nout].nValue)) //NOT DENOM
         {
             mDenomWtxes[hash].vout[nout].nRounds = -2;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -445,7 +445,7 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
         if(!fAllDenoms)
         {
             mDenomWtxes[hash].vout[nout].nRounds = 0;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -456,7 +456,7 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
         {
             if(pwalletMain->IsMine(in2))
             {
-                int n = GetInputDarksendRounds(in2, rounds+1);
+                int n = GetRealInputDarksendRounds(in2, rounds+1);
                 // denom found, find the shortest chain or initially assign nShortest with the first found value
                 if(n >= 0 && (n < nShortest || nShortest == -10))
                 {
@@ -466,15 +466,21 @@ int GetInputDarksendRounds(CTxIn in, int rounds)
             }
         }
         mDenomWtxes[hash].vout[nout].nRounds = fDenomFound
-                ? nShortest + 1 // good, we a +1 to the shortest one
+                ? (nShortest >= 15 ? 16 : nShortest + 1) // good, we a +1 to the shortest one but only 16 rounds max allowed
                 : 0;            // too bad, we are the fist one in that chain
-        if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+        if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
         return mDenomWtxes[hash].vout[nout].nRounds;
     }
 
     return rounds-1;
 }
 
+// respect current settings
+int GetInputDarksendRounds(CTxIn in) {
+    int realDarksendRounds = GetRealInputDarksendRounds(in, 0);
+    return realDarksendRounds > nDarksendRounds ? nDarksendRounds : realDarksendRounds;
+}
+
 void CDarksendPool::Reset(){
     cachedLastSuccess = 0;
     lastNewBlock = 0;
diff --git a/src/darksend.h b/src/darksend.h
index 888808be4e7c..066a8c2d8c40 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -60,7 +60,9 @@ extern CActiveMasternode activeMasternode;
 bool IsSyncingMasternodeAssets();
 
 // get the Darksend chain depth for a given input
-int GetInputDarksendRounds(CTxIn in, int rounds=0);
+int GetRealInputDarksendRounds(CTxIn in, int rounds);
+// respect current settings
+int GetInputDarksendRounds(CTxIn in);
 
 /** Holds an Darksend input
  */

From a4520af05652f12ad3f06036dfe7d8e4c6824a88 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 10:21:13 +0300
Subject: [PATCH 1521/1819] (Yet) another attempt to get progress displayed
 right

---
 src/qt/overviewpage.cpp | 34 +++++++++++++++----------------
 src/wallet.cpp          | 44 ++++++++++++++++++++---------------------
 src/wallet.h            |  2 +-
 3 files changed, 38 insertions(+), 42 deletions(-)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 50f466593c3e..e1cbe9b5dcef 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -355,32 +355,30 @@ void OverviewPage::updateDarksendProgress()
     }
     ui->labelAmountRounds->setText(strAmountAndRounds);
 
-    // calculate parts of the progress, each of them shouldn't be higher than 1:
-    // mixing progress of denominated balance
-    int64_t denominatedBalance = pwalletMain->GetDenominatedBalance();
+    // calculate parts of the progress, each of them shouldn't be higher than 1
+    // progress of denominating
     float denomPart = 0;
-    if(denominatedBalance > 0)
-    {
-        denomPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / denominatedBalance;
-        denomPart = denomPart > 1 ? 1 : denomPart;
-    }
-
-    // % of fully anonymized balance
+    // mixing progress of denominated balance
     float anonPart = 0;
-    if(nMaxToAnonymize > 0)
-    {
-        anonPart = (float)pwalletMain->GetAnonymizedBalance() / nMaxToAnonymize;
-        // if anonPart is > 1 then we are done, make denomPart equal 1 too
-        anonPart = anonPart > 1 ? (denomPart = 1, 1) : anonPart;
-    }
+
+    int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance;
+    denomPart = (float)denominatedBalance / nMaxToAnonymize;
+    denomPart = denomPart > 1 ? 1 : denomPart;
+
+    anonPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
+    // if anonPart is > 1 then we are done, make denomPart equal 1 too
+    anonPart = anonPart > 1 ? (denomPart = 1, 1) : anonPart;
 
     // apply some weights to them (sum should be <=100) and calculate the whole progress
-    int progress = 80 * denomPart + 20 * anonPart;
+    denomPart = ceilf((denomPart * 20) * 100) / 100;
+    anonPart = ceilf((anonPart * 80) * 100) / 100;
+    float progress = denomPart + anonPart;
     if(progress >= 100) progress = 100;
 
     ui->darksendProgress->setValue(progress);
 
-    QString strToolPip = tr("Progress: %1% (inputs have an average of %2 of %n rounds)", "", nDarksendRounds).arg(progress).arg(pwalletMain->GetAverageAnonymizedRounds());
+    QString strToolPip = tr("Progress: %1% (%2% + %3%; denominated inputs have %4 of %n rounds on average)", "", nDarksendRounds)
+            .arg(progress).arg(denomPart).arg(anonPart).arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
 }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 61d930207df8..6ff230817b22 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1240,6 +1240,8 @@ CAmount CWallet::GetAnonymizedBalance() const
     return nTotal;
 }
 
+// Note: calculated including unconfirmed,
+// that's ok as long as we use it for informational purposes only
 double CWallet::GetAverageAnonymizedRounds() const
 {
     double fTotal = 0;
@@ -1251,20 +1253,17 @@ double CWallet::GetAverageAnonymizedRounds() const
         {
             const CWalletTx* pcoin = &(*it).second;
 
-            if (pcoin->IsTrusted())
-            {
-                uint256 hash = (*it).first;
+            uint256 hash = (*it).first;
 
-                for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
+            for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
 
-                    CTxIn vin = CTxIn(hash, i);
+                CTxIn vin = CTxIn(hash, i);
 
-                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
+                if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
 
-                    int rounds = GetInputDarksendRounds(vin);
-                    fTotal += (float)rounds;
-                    fCount += 1;
-                }
+                int rounds = GetInputDarksendRounds(vin);
+                fTotal += (float)rounds;
+                fCount += 1;
             }
         }
     }
@@ -1274,6 +1273,8 @@ double CWallet::GetAverageAnonymizedRounds() const
     return fTotal/fCount;
 }
 
+// Note: calculated including unconfirmed,
+// that's ok as long as we use it for informational purposes only
 CAmount CWallet::GetNormalizedAnonymizedBalance() const
 {
     CAmount nTotal = 0;
@@ -1284,19 +1285,16 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const
         {
             const CWalletTx* pcoin = &(*it).second;
 
-            if (pcoin->IsTrusted())
-            {
-                uint256 hash = (*it).first;
+            uint256 hash = (*it).first;
 
-                for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
+            for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
 
-                    CTxIn vin = CTxIn(hash, i);
+                CTxIn vin = CTxIn(hash, i);
 
-                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
+                if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
 
-                    int rounds = GetInputDarksendRounds(vin);
-                    nTotal += pcoin->vout[i].nValue * rounds / nDarksendRounds;
-                }
+                int rounds = GetInputDarksendRounds(vin);
+                nTotal += pcoin->vout[i].nValue * rounds / nDarksendRounds;
             }
         }
     }
@@ -1304,7 +1302,7 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const
     return nTotal;
 }
 
-CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed, bool includeAlreadyAnonymized) const
+CAmount CWallet::GetDenominatedBalance(bool denom, bool unconfirmed, bool includeAlreadyAnonymized) const
 {
     CAmount nTotal = 0;
     {
@@ -1318,15 +1316,15 @@ CAmount CWallet::GetDenominatedBalance(bool onlyDenom, bool onlyUnconfirmed, boo
             // skip conflicted
             if(nDepth < 0) continue;
 
-            bool unconfirmed = (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && nDepth == 0));
-            if(onlyUnconfirmed != unconfirmed) continue;
+            bool isUnconfirmed = (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && nDepth == 0));
+            if(unconfirmed != isUnconfirmed) continue;
             uint256 hash = (*it).first;
 
             for (unsigned int i = 0; i < pcoin->vout.size(); i++)
             {
                 if(IsSpent(hash, i)) continue;
                 if(!IsMine(pcoin->vout[i])) continue;
-                if(onlyDenom != IsDenominatedAmount(pcoin->vout[i].nValue)) continue;
+                if(denom != IsDenominatedAmount(pcoin->vout[i].nValue)) continue;
 
                 CTxIn vin = CTxIn(hash, i);
                 int rounds = GetInputDarksendRounds(vin);
diff --git a/src/wallet.h b/src/wallet.h
index def7f903d6ee..f0ac8f4db003 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -314,7 +314,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     CAmount GetAnonymizedBalance() const;
     double GetAverageAnonymizedRounds() const;
     CAmount GetNormalizedAnonymizedBalance() const;
-    CAmount GetDenominatedBalance(bool onlyDenom=true, bool onlyUnconfirmed=false, bool includeAlreadyAnonymized = true) const;
+    CAmount GetDenominatedBalance(bool denom=true, bool unconfirmed=false, bool includeAlreadyAnonymized = true) const;
     CAmount GetWatchOnlyBalance() const;
     CAmount GetUnconfirmedWatchOnlyBalance() const;
     CAmount GetImmatureWatchOnlyBalance() const;

From d94967d9589ad1fbb4c13e8e4a44d8fd4475adc1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 7 Jul 2015 15:47:22 +0300
Subject: [PATCH 1522/1819] small fixes

---
 src/coinbase-payee.cpp       |  8 ++++----
 src/instantx.cpp             |  2 +-
 src/main.cpp                 |  2 +-
 src/masternode.h             |  1 -
 src/primitives/transaction.h | 15 +++++++--------
 src/qt/transactiondesc.cpp   |  2 +-
 6 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 3b65ed604768..6498ff010e66 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -28,7 +28,7 @@ bool CCoinbasePayeeDB::Write(const CCoinbasePayee& objToSave)
 
     // serialize, checksum data up to that point, then append checksum
     CDataStream ssObj(SER_DISK, CLIENT_VERSION);
-    ssObj << strMagicMessage; // masternode cache file specific magic message
+    ssObj << strMagicMessage; // coinbase payee cache file specific magic message
     ssObj << FLATDATA(Params().MessageStart()); // network specific magic number
     ssObj << objToSave;
     uint256 hash = Hash(ssObj.begin(), ssObj.end());
@@ -102,13 +102,13 @@ CCoinbasePayeeDB::ReadResult CCoinbasePayeeDB::Read(CCoinbasePayee& objToLoad)
     unsigned char pchMsgTmp[4];
     std::string strMagicMessageTmp;
     try {
-        // de-serialize file header (masternode cache file specific magic message) and ..
+        // de-serialize file header (coinbase payee cache file specific magic message) and ..
         ssObj >> strMagicMessageTmp;
 
         // ... verify the message matches predefined one
         if (strMagicMessage != strMagicMessageTmp)
         {
-            error("%s : Invalid masternode cache magic message", __func__);
+            error("%s : Invalid coinbase payee cache magic message", __func__);
             return IncorrectMagicMessage;
         }
 
@@ -242,4 +242,4 @@ void CCoinbasePayee::CleanUp()
             ++it;
         }
     }
-}
\ No newline at end of file
+}
diff --git a/src/instantx.cpp b/src/instantx.cpp
index d5a11dd5a579..25f463cabcba 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -242,7 +242,7 @@ int64_t CreateNewLock(CTransaction tx)
 
         CTransactionLock newLock;
         newLock.nBlockHeight = nBlockHeight;
-        newLock.nExpiration = GetTime()+(60*60); //locks expire after 60 minutes (6 confirmations)
+        newLock.nExpiration = GetTime()+(60*60); //locks expire after 60 minutes (24 confirmations)
         newLock.nTimeout = GetTime()+(60*5);
         newLock.txHash = tx.GetHash();
         mapTxLocks.insert(make_pair(tx.GetHash(), newLock));
diff --git a/src/main.cpp b/src/main.cpp
index bb8c75bfc9db..a64f3d5f1d35 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1662,9 +1662,9 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
 
     // We define a condition which we should warn the user about as a fork of at least 7 blocks
     // who's tip is within 72 blocks (+/- 3 hours if no one mines it) of ours
+    // or a chain that is entirely longer than ours and invalid (note that this should be detected by both)
     // We use 7 blocks rather arbitrarily as it represents just under 10% of sustained network
     // hash rate operating on the fork.
-    // or a chain that is entirely longer than ours and invalid (note that this should be detected by both)
     // We define it this way because it allows us to only store the highest fork tip (+ base) which meets
     // the 7-block condition and from this always have the most-likely-to-cause-warning fork
     if (pfork && (!pindexBestForkTip || (pindexBestForkTip && pindexNewForkTip->nHeight > pindexBestForkTip->nHeight)) &&
diff --git a/src/masternode.h b/src/masternode.h
index 3aca3570388f..89eba8e49338 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -11,7 +11,6 @@
 #include "util.h"
 #include "base58.h"
 #include "main.h"
-#include "masternode.h"
 #include "timedata.h"
 
 #define MASTERNODE_NOT_PROCESSED               0 // initial state
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 851bf7db84e7..af2c09738812 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -143,14 +143,13 @@ class CTxOut
 
     bool IsDust(CFeeRate minRelayTxFee) const
     {
-        // "Dust" is defined in terms of CTransaction::minRelayTxFee,
-        // which has units satoshis-per-kilobyte.
-        // If you'd pay more than 1/3 in fees
-        // to spend something, then we consider it dust.
-        // A typical txout is 34 bytes big, and will
-        // need a CTxIn of at least 148 bytes to spend:
-        // so dust is a txout less than 546 satoshis
-        // with default minRelayTxFee.
+        // "Dust" is defined in terms of CTransaction::minRelayTxFee, which has units duffs-per-kilobyte.
+        // If you'd pay more than 1/3 in fees to spend something, then we consider it dust.
+        // A typical txout is 34 bytes big, and will need a CTxIn of at least 148 bytes to spend
+        // i.e. total is 148 + 32 = 182 bytes. Default -minrelaytxfee is 10000 duffs per kB
+        // and that means that fee per txout is 182 * 10000 / 1000 = 1820 duffs.
+        // So dust is a txout less than 1820 *3 = 5460 duffs
+        // with default -minrelaytxfee = minRelayTxFee = 10000 duffs per kB.
         size_t nSize = GetSerializeSize(SER_DISK,0)+148u;
         return (nValue < 3*minRelayTxFee.GetFee(nSize));
     }
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index fbbd881abaf9..5fb1573edcf0 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -346,7 +346,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
                         strHTML += QString::fromStdString(CBitcoinAddress(address).ToString());
                     }
                     strHTML = strHTML + " " + tr("Amount") + "=" + BitcoinUnits::formatHtmlWithUnit(unit, vout.nValue);
-                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & ISMINE_SPENDABLE ? tr("true") : tr("false")) + "</li>";
+                    strHTML = strHTML + " IsMine=" + (wallet->IsMine(vout) & ISMINE_SPENDABLE ? tr("true") : tr("false"));
                     strHTML = strHTML + " IsWatchOnly=" + (wallet->IsMine(vout) & ISMINE_WATCH_ONLY ? tr("true") : tr("false")) + "</li>";
                 }
             }

From 9cfdaffee5c11efb059b8f4971c107907f7545cb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 8 Jul 2015 03:37:23 +0300
Subject: [PATCH 1523/1819] introduce RelayInv

---
 src/instantx.cpp            |  9 +--------
 src/masternode-budget.cpp   | 28 ++++------------------------
 src/masternode-payments.cpp |  8 +-------
 src/masternode.cpp          | 16 ++--------------
 src/net.cpp                 |  8 +++++++-
 src/net.h                   |  1 +
 src/spork.cpp               |  8 +-------
 7 files changed, 17 insertions(+), 61 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index d5a11dd5a579..2e6e02fe50e9 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -296,14 +296,7 @@ void DoConsensusVote(CTransaction& tx, int64_t nBlockHeight)
     mapTxLockVote[ctx.GetHash()] = ctx;
 
     CInv inv(MSG_TXLOCK_VOTE, ctx.GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
-
+    RelayInv(inv);
 }
 
 //received a consensus vote
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 09d33280d160..673a01ef7093 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1315,12 +1315,7 @@ bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasterno
 void CBudgetProposalBroadcast::Relay()
 {
     CInv inv(MSG_BUDGET_PROPOSAL, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
 bool CBudgetProposalBroadcast::SignatureValid()
@@ -1365,12 +1360,7 @@ CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
 void CBudgetVote::Relay()
 {
     CInv inv(MSG_BUDGET_VOTE, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
 bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
@@ -1673,12 +1663,7 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string s
 void CFinalizedBudgetBroadcast::Relay()
 {
     CInv inv(MSG_BUDGET_FINALIZED, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
 bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
@@ -1742,12 +1727,7 @@ CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
 void CFinalizedBudgetVote::Relay()
 {
     CInv inv(MSG_BUDGET_FINALIZED_VOTE, GetHash());
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
 bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 1a9189b4ce13..670f6a07b3c9 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -516,13 +516,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 void CMasternodePaymentWinner::Relay()
 {
     CInv inv(MSG_MASTERNODE_WINNER, GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv);
 }
 
 bool CMasternodePaymentWinner::SignatureValid()
diff --git a/src/masternode.cpp b/src/masternode.cpp
index d57f6420e8f0..ccfddb8fe601 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -454,13 +454,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
 void CMasternodeBroadcast::Relay(bool fRequested)
 {
     CInv inv(MSG_MASTERNODE_ANNOUNCE, GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv);
 }
 
 bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
@@ -587,11 +581,5 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
 void CMasternodePing::Relay()
 {
     CInv inv(MSG_MASTERNODE_PING, GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv);
 }
diff --git a/src/net.cpp b/src/net.cpp
index e42557af7f08..41747e98adfe 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1786,7 +1786,6 @@ void RelayTransaction(const CTransaction& tx, const CDataStream& ss)
     }
 }
 
-
 void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll)
 {
     CInv inv(MSG_TXLOCK_REQUEST, tx.GetHash());
@@ -1803,6 +1802,13 @@ void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll)
 
 }
 
+void RelayInv(CInv &inv, const int minProtoVersion) {
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+        if(pnode->nVersion >= minProtoVersion)
+            pnode->PushInventory(inv);
+}
+
 void CNode::RecordBytesRecv(uint64_t bytes)
 {
     LOCK(cs_totalBytesRecv);
diff --git a/src/net.h b/src/net.h
index 5ec47ee24e2b..fc077f199b51 100644
--- a/src/net.h
+++ b/src/net.h
@@ -682,6 +682,7 @@ class CTransaction;
 void RelayTransaction(const CTransaction& tx);
 void RelayTransaction(const CTransaction& tx, const CDataStream& ss);
 void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll=false);
+void RelayInv(CInv &inv, const int minProtoVersion = MIN_PEER_PROTO_VERSION);
 
 /** Access to the (IP) address database (peers.dat) */
 class CAddrDB
diff --git a/src/spork.cpp b/src/spork.cpp
index f3ee1af78425..286845a17a73 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -185,13 +185,7 @@ bool CSporkManager::UpdateSpork(int nSporkID, int64_t nValue)
 void CSporkManager::Relay(CSporkMessage& msg)
 {
     CInv inv(MSG_SPORK, msg.GetHash());
-
-    vector<CInv> vInv;
-    vInv.push_back(inv);
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes){
-        pnode->PushMessage("inv", vInv);
-    }
+    RelayInv(inv);
 }
 
 bool CSporkManager::SetPrivKey(std::string strPrivKey)

From 635778f0abc11342246b368226754d35149b54ac Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 8 Jul 2015 04:57:32 +0300
Subject: [PATCH 1524/1819] use spork dependent logic to get the right minimal
 proto everywhere MIN_MNPAYMENTS_PROTO_VERSION was used previously

---
 src/masternode-payments.cpp | 10 ++++++++--
 src/masternode-payments.h   |  4 ++--
 src/masternodeman.cpp       |  7 +------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 1a9189b4ce13..a6e63298e384 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -153,6 +153,12 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
     }
 }
 
+int CMasternodePayments::GetMinMasternodePaymentsProto() {
+    return IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)
+            ? MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2
+            : MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1;
+}
+
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(IsInitialBlockDownload()) return;
@@ -409,7 +415,7 @@ bool CMasternodePaymentWinner::IsValid()
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
-    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, MIN_MNPAYMENTS_PROTO_VERSION);
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, GetMinMasternodePaymentsProto());
 
     if(n == -1)
     {
@@ -435,7 +441,7 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     //reference node - hybrid mode
 
     if(!IsReferenceNode(activeMasternode.vin)){
-        int n = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight-100, MIN_MNPAYMENTS_PROTO_VERSION);
+        int n = mnodeman.GetMasternodeRank(activeMasternode.vin, nBlockHeight-100, GetMinMasternodePaymentsProto());
 
         if(n == -1)
         {
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 378abedf930e..c42decc619f1 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -21,7 +21,6 @@ extern CMasternodePayments masternodePayments;
 extern std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
 extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
-static const int MIN_MNPAYMENTS_PROTO_VERSION = 70066;
 #define MNPAYMENTS_SIGNATURES_REQUIRED           6
 #define MNPAYMENTS_SIGNATURES_TOTAL              10
 
@@ -200,6 +199,7 @@ class CMasternodePayments
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
+    int GetMinMasternodePaymentsProto();
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
@@ -207,4 +207,4 @@ class CMasternodePayments
 };
 
 
-#endif
\ No newline at end of file
+#endif
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 95bc3d1010bf..6d86fdd3d564 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -385,12 +385,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         if(!mn.IsEnabled()) continue;
 
         // //check protocol version
-        if(IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)){
-            if(mn.protocolVersion < MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2) continue;
-        } else {
-            //support older versions for a period of time
-            if(mn.protocolVersion < MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1) continue;
-        }
+        if(mn.protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) continue;
 
         //it's in the list -- so let's skip it
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;

From 2fdb5b01f7546245ab23cafe891749cebc9405b9 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 8 Jul 2015 05:35:58 +0300
Subject: [PATCH 1525/1819] use proper naming for variables in
 masternode-budget

---
 src/masternode-budget.cpp    | 296 ++++++++++++++++++-----------------
 src/masternode-budget.h      |   9 +-
 src/rpcmasternode-budget.cpp | 192 +++++++++++------------
 3 files changed, 252 insertions(+), 245 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 09d33280d160..435f2268eb93 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -32,7 +32,7 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
-void CheckOrphanVotes()
+void CBudgetManager::CheckOrphanVotes()
 {
     std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
     while(it1 != mapOrphanMasternodeBudgetVotes.end()){
@@ -92,11 +92,11 @@ void CBudgetManager::ResignInvalidProposals()
     {
         if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
 
-        CBudgetProposal* prop = &((*it1).second);
+        CBudgetProposal* pbudgetProposal = &((*it1).second);
 
-        CBudgetProposalBroadcast bprop(*prop);
-        if(!bprop.SignatureValid()){
-            bprop.vin = activeMasternode.vin;
+        CBudgetProposalBroadcast budgetProposalBroadcast(*pbudgetProposal);
+        if(!budgetProposalBroadcast.SignatureValid()){
+            budgetProposalBroadcast.vin = activeMasternode.vin;
 
             LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - resigning proposal\n");
 
@@ -109,18 +109,18 @@ void CBudgetManager::ResignInvalidProposals()
                 return;
             }
 
-            if(!bprop.Sign(keyMasternode, pubKeyMasternode)){
+            if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
                 LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
                 return;
             }
 
             std::string strError = "";
-            if(bprop.IsValid(strError)){
+            if(budgetProposalBroadcast.IsValid(strError)){
                 //delete if it exists and insert the new object
-                if(mapSeenMasternodeBudgetProposals.count(bprop.GetHash())) mapSeenMasternodeBudgetProposals.erase(bprop.GetHash());
-                mapSeenMasternodeBudgetProposals.insert(make_pair(bprop.GetHash(), bprop));
+                if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) mapSeenMasternodeBudgetProposals.erase(budgetProposalBroadcast.GetHash());
+                mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
-                bprop.Relay();
+                budgetProposalBroadcast.Relay();
             } else {
                 LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - still invalid with new signature\n");
             }
@@ -132,12 +132,12 @@ void CBudgetManager::ResignInvalidProposals()
     while(it2 != mapFinalizedBudgets.end()){
         if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
 
-        CFinalizedBudget* prop = &((*it2).second);
-        if(!prop->IsValid()) continue;
+        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
+        if(!pfinalizedBudget->IsValid()) continue;
 
-        CFinalizedBudgetBroadcast bprop(*prop);
-        if(!bprop.SignatureValid()){
-            bprop.vin = activeMasternode.vin;
+        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(*pfinalizedBudget);
+        if(!finalizedBudgetBroadcast.SignatureValid()){
+            finalizedBudgetBroadcast.vin = activeMasternode.vin;
 
             LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - resigning finalized budget\n");
 
@@ -150,18 +150,18 @@ void CBudgetManager::ResignInvalidProposals()
                 return;
             }
 
-            if(!bprop.Sign(keyMasternode, pubKeyMasternode)){
+            if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
                 LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
                 return;
             }
 
-            if(!bprop.IsValid()){
+            if(!finalizedBudgetBroadcast.IsValid()){
 
                 //delete if it exists and insert the new object
-                if(mapFinalizedBudgets.count(bprop.GetHash())) mapFinalizedBudgets.erase(bprop.GetHash());
-                mapFinalizedBudgets.insert(make_pair(bprop.GetHash(), bprop));
+                if(mapFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) mapFinalizedBudgets.erase(finalizedBudgetBroadcast.GetHash());
+                mapFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
 
-                bprop.Relay();
+                finalizedBudgetBroadcast.Relay();
             } else {
                 LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - still invalid with new signature\n");
             }
@@ -175,12 +175,12 @@ void CBudgetManager::CheckSignatureValidity()
     std::map<uint256, CBudgetProposal>::iterator it1 = mapProposals.begin();
     while(it1 != mapProposals.end())
     {
-        CBudgetProposal* prop = &((*it1).second);
+        CBudgetProposal* pbudgetProposal = &((*it1).second);
 
-        CBudgetProposalBroadcast bprop(*prop);
-        if(!bprop.SignatureValid()){
-            if(mapSeenMasternodeBudgetProposals.count(bprop.GetHash())) {
-                mapSeenMasternodeBudgetProposals[bprop.GetHash()].fInvalid = true;
+        CBudgetProposalBroadcast budgetProposalBroadcast(*pbudgetProposal);
+        if(!budgetProposalBroadcast.SignatureValid()){
+            if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) {
+                mapSeenMasternodeBudgetProposals[budgetProposalBroadcast.GetHash()].fInvalid = true;
             }
         }
         ++it1;
@@ -189,12 +189,12 @@ void CBudgetManager::CheckSignatureValidity()
     std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
     while(it2 != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it2).second);
+        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
 
-        CFinalizedBudgetBroadcast bprop(*prop);
-        if(!bprop.SignatureValid()){
-            if(mapSeenFinalizedBudgets.count(bprop.GetHash())) {
-                mapSeenFinalizedBudgets[bprop.GetHash()].fInvalid = true;
+        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(*pfinalizedBudget);
+        if(!finalizedBudgetBroadcast.SignatureValid()){
+            if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) {
+                mapSeenFinalizedBudgets[finalizedBudgetBroadcast.GetHash()].fInvalid = true;
             }
         }
         ++it2;
@@ -202,7 +202,7 @@ void CBudgetManager::CheckSignatureValidity()
 }
 
 
-void SubmitFinalBudget()
+void CBudgetManager::SubmitFinalBudget()
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
@@ -211,20 +211,20 @@ void SubmitFinalBudget()
     if(nSubmittedFinalBudget >= nBlockStart) return;
     if(nBlockStart - pindexPrev->nHeight > 100) return;
 
-    std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+    std::vector<CBudgetProposal*> vBudgetProposals = budget.GetBudget();
 
     std::string strBudgetName = "main";
-    std::vector<CTxBudgetPayment> vecPayments;
+    std::vector<CTxBudgetPayment> vecTxBudgetPayments;
 
-    for(unsigned int i = 0; i < props1.size(); i++){
+    for(unsigned int i = 0; i < vBudgetProposals.size(); i++){
         CTxBudgetPayment out;
-        out.nProposalHash = props1[i]->GetHash();
-        out.payee = props1[i]->GetPayee();
-        out.nAmount = props1[i]->GetAmount();
-        vecPayments.push_back(out);
+        out.nProposalHash = vBudgetProposals[i]->GetHash();
+        out.payee = vBudgetProposals[i]->GetPayee();
+        out.nAmount = vBudgetProposals[i]->GetAmount();
+        vecTxBudgetPayments.push_back(out);
     }
 
-    if(vecPayments.size() < 1) {
+    if(vecTxBudgetPayments.size() < 1) {
         LogPrintf("SubmitFinalBudget - Found No Proposals For Period\n");
         return;
     }
@@ -239,21 +239,21 @@ void SubmitFinalBudget()
     }
 
     //create the proposal incase we're the first to make it
-    CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
-    if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+    CFinalizedBudgetBroadcast finalizedBudgetBroadcast(activeMasternode.vin, strBudgetName, nBlockStart, vecTxBudgetPayments);
+    if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
         LogPrintf("SubmitFinalBudget - Failure to sign.\n");
     }
 
-    if(!prop.IsValid()){
-        LogPrintf("SubmitFinalBudget - Invalid prop (are all the hashes correct?)\n");
+    if(!finalizedBudgetBroadcast.IsValid()){
+        LogPrintf("SubmitFinalBudget - Invalid finalized budget broadcast (are all the hashes correct?)\n");
     }
 
-    mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
-    prop.Relay();
-    budget.AddFinalizedBudget(prop);
+    mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
+    finalizedBudgetBroadcast.Relay();
+    budget.AddFinalizedBudget(finalizedBudgetBroadcast);
 
 
-    CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
+    CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
     if(!vote.Sign(keyMasternode, pubKeyMasternode)){
         LogPrintf("SubmitFinalBudget - Failure to sign.\n");
     }
@@ -420,32 +420,40 @@ void DumpBudgets()
     LogPrintf("Budget dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
-void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& prop)
+void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 {
     LOCK(cs);
-    if(!prop.IsValid()) return;
-
-    if(mapFinalizedBudgets.count(prop.GetHash())) {
-        //this budget must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget (%s to %s)\n", mapFinalizedBudgets[prop.GetHash()].vin.prevout.ToStringShort().c_str(), prop.vin.prevout.ToStringShort().c_str());
-        mapFinalizedBudgets[prop.GetHash()].vin = prop.vin;
+    if(!finalizedBudget.IsValid()) return;
+
+    if(mapFinalizedBudgets.count(finalizedBudget.GetHash()) && mapFinalizedBudgets[finalizedBudget.GetHash()].vin != finalizedBudget.vin) {
+        //this finalized budget must have went invalid, so update the vin to the new one
+        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget (%s to %s)\n",
+                  mapFinalizedBudgets[finalizedBudget.GetHash()].vin.prevout.ToStringShort(),
+                  finalizedBudget.vin.prevout.ToStringShort());
+        mapFinalizedBudgets[finalizedBudget.GetHash()].vin = finalizedBudget.vin;
         return;
     }
 
-    mapFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
+    mapFinalizedBudgets.insert(make_pair(finalizedBudget.GetHash(), finalizedBudget));
 }
 
-void CBudgetManager::AddProposal(CBudgetProposal& prop)
+void CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 {
     LOCK(cs);
-    if(mapProposals.count(prop.GetHash())) {
-        //this proposal must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid finalized budget (%s to %s)\n", mapFinalizedBudgets[prop.GetHash()].vin.prevout.ToStringShort().c_str(), prop.vin.prevout.ToStringShort().c_str());
-        mapProposals[prop.GetHash()].vin = prop.vin;
+    std::string strError = "";
+    if(!budgetProposal.IsValid(strError)) {
+        LogPrintf("mprop - invalid budget proposal - %s\n", strError.c_str());
+        return;
+    }
+
+    if(mapProposals.count(budgetProposal.GetHash()) && mapProposals[budgetProposal.GetHash()].vin != budgetProposal.vin) {
+        //this budget proposal must have went invalid, so update the vin to the new one
+        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid budget proposal (%s to %s)\n", mapProposals[budgetProposal.GetHash()].vin.prevout.ToStringShort().c_str(), budgetProposal.vin.prevout.ToStringShort().c_str());
+        mapProposals[budgetProposal.GetHash()].vin = budgetProposal.vin;
         return;
     }
 
-    mapProposals.insert(make_pair(prop.GetHash(), prop));
+    mapProposals.insert(make_pair(budgetProposal.GetHash(), budgetProposal));
 }
 
 void CBudgetManager::CheckAndRemove()
@@ -454,11 +462,11 @@ void CBudgetManager::CheckAndRemove()
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it).second);
-        if(!prop->IsValid()){
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+        if(!pfinalizedBudget->IsValid()){
             mapFinalizedBudgets.erase(it++);
         } else {
-            prop->AutoCheck();
+            pfinalizedBudget->AutoCheck();
             ++it;
         }
     }
@@ -466,8 +474,8 @@ void CBudgetManager::CheckAndRemove()
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
-        CBudgetProposal* prop = &((*it2).second);
-        if(!prop->IsValid(strError)){
+        CBudgetProposal* pbudgetProposal = &((*it2).second);
+        if(!pbudgetProposal->IsValid(strError)){
             mapProposals.erase(it2++);
         } else {
             ++it2;
@@ -489,11 +497,11 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it).second);
-        if(prop->GetVoteCount() > nHighestCount){
-            if(pindexPrev->nHeight+1 >= prop->GetBlockStart() && pindexPrev->nHeight+1 <= prop->GetBlockEnd()){
-                if(prop->GetPayeeAndAmount(pindexPrev->nHeight+1, payee, nAmount)){
-                    nHighestCount = prop->GetVoteCount();
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount){
+            if(pindexPrev->nHeight+1 >= pfinalizedBudget->GetBlockStart() && pindexPrev->nHeight+1 <= pfinalizedBudget->GetBlockEnd()){
+                if(pfinalizedBudget->GetPayeeAndAmount(pindexPrev->nHeight+1, payee, nAmount)){
+                    nHighestCount = pfinalizedBudget->GetVoteCount();
                 }
             }
         }
@@ -535,20 +543,20 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
     //find the prop with the highest yes count
 
     int nYesCount = -99999;
-    CBudgetProposal* prop = NULL;
+    CBudgetProposal* pbudgetProposal = NULL;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end()){
         if((*it).second.strProposalName == strProposalName && (*it).second.GetYeas() > nYesCount){
-            prop = &((*it).second);
-            nYesCount = prop->GetYeas();
+            pbudgetProposal = &((*it).second);
+            nYesCount = pbudgetProposal->GetYeas();
         }
         ++it;
     }
 
     if(nYesCount == -99999) return NULL;
 
-    return prop;
+    return pbudgetProposal;
 }
 
 CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
@@ -563,8 +571,8 @@ bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it).second);
-        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+        if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
             return true;
         }
 
@@ -584,10 +592,10 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it).second);
-        if(prop->GetVoteCount() > nHighestCount){
-            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-                nHighestCount = prop->GetVoteCount();
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount){
+            if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
+                nHighestCount = pfinalizedBudget->GetVoteCount();
             }
         }
 
@@ -601,11 +609,11 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
     while(it2 != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it2).second);
+        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
 
-        if(prop->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
-            if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
-                if(prop->IsTransactionValid(txNew, nBlockHeight)){
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
+            if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
+                if(pfinalizedBudget->IsTransactionValid(txNew, nBlockHeight)){
                     return true;
                 }
             }
@@ -620,20 +628,20 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
 
 std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
 {
-    std::vector<CBudgetProposal*> ret;
+    std::vector<CBudgetProposal*> vBudgetProposalRet;
 
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
         (*it2).second.CleanAndRemove();
 
-        CBudgetProposal* prop = &((*it2).second);
-        ret.push_back(prop);
+        CBudgetProposal* pbudgetProposal = &((*it2).second);
+        vBudgetProposalRet.push_back(pbudgetProposal);
 
         it2++;
     }
 
-    return ret;
+    return vBudgetProposalRet;
 }
 
 //Need to review this function
@@ -656,11 +664,11 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 
     // ------- Grab The Budgets In Order
 
-    std::vector<CBudgetProposal*> ret;
+    std::vector<CBudgetProposal*> vBudgetProposalRet;
 
     int64_t nBudgetAllocated = 0;
     CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return ret;
+    if(pindexPrev == NULL) return vBudgetProposalRet;
 
     int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
     int nBlockEnd  =  nBlockStart + GetBudgetPaymentCycleBlocks() -1;
@@ -670,47 +678,47 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end())
     {
-        CBudgetProposal* prop = &((*it2).second);
+        CBudgetProposal* pbudgetProposal = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(prop->nBlockStart <= nBlockStart && prop->nBlockEnd >= nBlockEnd && prop->GetYeas()-prop->GetNays() > mnodeman.CountEnabled()/10)
+        if(pbudgetProposal->nBlockStart <= nBlockStart && pbudgetProposal->nBlockEnd >= nBlockEnd && pbudgetProposal->GetYeas()-pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
         {
             if(nTotalBudget == nBudgetAllocated){
-                prop->SetAllotted(0);
-            } else if(prop->GetAmount() + nBudgetAllocated <= nTotalBudget) {
-                prop->SetAllotted(prop->GetAmount());
-                nBudgetAllocated += prop->GetAmount();
+                pbudgetProposal->SetAllotted(0);
+            } else if(pbudgetProposal->GetAmount() + nBudgetAllocated <= nTotalBudget) {
+                pbudgetProposal->SetAllotted(pbudgetProposal->GetAmount());
+                nBudgetAllocated += pbudgetProposal->GetAmount();
             } else {
                 //couldn't pay for the entire budget, so it'll be partially paid.
-                prop->SetAllotted(nTotalBudget - nBudgetAllocated);
+                pbudgetProposal->SetAllotted(nTotalBudget - nBudgetAllocated);
                 nBudgetAllocated = nTotalBudget;
             }
 
-            ret.push_back(prop);
+            vBudgetProposalRet.push_back(pbudgetProposal);
         }
 
         it2++;
     }
 
-    return ret;
+    return vBudgetProposalRet;
 }
 
 std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 {
-    std::vector<CFinalizedBudget*> ret;
+    std::vector<CFinalizedBudget*> vFinalizedBudgetRet;
 
     // ------- Grab The Budgets In Order
 
     std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
     while(it2 != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it2).second);
+        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
 
-        ret.push_back(prop);
+        vFinalizedBudgetRet.push_back(pfinalizedBudget);
         it2++;
     }
 
-    return ret;
+    return vFinalizedBudgetRet;
 }
 
 std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
@@ -720,10 +728,10 @@ std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* prop = &((*it).second);
-        if(nBlockHeight >= prop->GetBlockStart() && nBlockHeight <= prop->GetBlockEnd()){
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+        if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
             CTxBudgetPayment payment;
-            if(prop->GetProposalByBlock(nBlockHeight, payment)){
+            if(pfinalizedBudget->GetProposalByBlock(nBlockHeight, payment)){
                 if(ret == "unknown-budget"){
                     ret = payment.nProposalHash.ToString().c_str();
                 } else {
@@ -814,45 +822,45 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     }
 
     if (strCommand == "mprop") { //Masternode Proposal
-        CBudgetProposalBroadcast prop;
-        vRecv >> prop;
+        CBudgetProposalBroadcast budgetProposalBroadcast;
+        vRecv >> budgetProposalBroadcast;
 
-        if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())){
+        if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())){
             //if this proposal went inactive, we'll update it with the new re-signature
-            if(!mapSeenMasternodeBudgetProposals[prop.GetHash()].fInvalid){
+            if(!mapSeenMasternodeBudgetProposals[budgetProposalBroadcast.GetHash()].fInvalid){
                 return;
             }
         }
 
         //set time we first saw this prop
-        prop.nTime = GetAdjustedTime();
+        budgetProposalBroadcast.nTime = GetAdjustedTime();
 
-        CMasternode* pmn = mnodeman.Find(prop.vin);
+        CMasternode* pmn = mnodeman.Find(budgetProposalBroadcast.vin);
         if(pmn == NULL) {
-            if(fDebug) LogPrintf("mprop - unknown masternode - vin: %s\n", prop.vin.ToString());
+            if(fDebug) LogPrintf("mprop - unknown masternode - vin: %s\n", budgetProposalBroadcast.vin.ToString());
             return;
         }
 
-        if(!prop.SignatureValid()){
+        if(!budgetProposalBroadcast.SignatureValid()){
             LogPrintf("mprop - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
         std::string strError = "";
-        if(!prop.IsValid(strError)) {
+        if(!budgetProposalBroadcast.IsValid(strError)) {
             LogPrintf("mprop - invalid budget proposal - %s\n", strError.c_str());
             return;
         }
 
         //delete if it exists and insert the new object
-        if(mapSeenMasternodeBudgetProposals.count(prop.GetHash())) mapSeenMasternodeBudgetProposals.erase(prop.GetHash());
-        mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
+        if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) mapSeenMasternodeBudgetProposals.erase(budgetProposalBroadcast.GetHash());
+        mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            CBudgetProposal p(prop);
-            budget.AddProposal(p);
-            prop.Relay();
+            CBudgetProposal budgetProposal(budgetProposalBroadcast);
+            budget.AddProposal(budgetProposal);
+            budgetProposalBroadcast.Relay();
 
             //can only do this six times a day on the network
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
@@ -897,41 +905,41 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     }
 
     if (strCommand == "fbs") { //Finalized Budget Suggestion
-        CFinalizedBudgetBroadcast fbs;
-        vRecv >> fbs;
+        CFinalizedBudgetBroadcast finalizedBudgetBroadcast;
+        vRecv >> finalizedBudgetBroadcast;
 
-        if(mapSeenFinalizedBudgets.count(fbs.GetHash())){
+        if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())){
             //if this budget went inactive, we'll update it with the new re-signature
-            if(!mapSeenFinalizedBudgets[fbs.GetHash()].fInvalid){
+            if(!mapSeenFinalizedBudgets[finalizedBudgetBroadcast.GetHash()].fInvalid){
                 return;
             }
         }
 
-        CMasternode* pmn = mnodeman.Find(fbs.vin);
+        CMasternode* pmn = mnodeman.Find(finalizedBudgetBroadcast.vin);
         if(pmn == NULL) {
-            if(fDebug) LogPrintf("fbs - unknown masternode - vin: %s\n", fbs.vin.ToString());
+            if(fDebug) LogPrintf("fbs - unknown masternode - vin: %s\n", finalizedBudgetBroadcast.vin.ToString());
             return;
         }
 
-        if(!fbs.SignatureValid()){
+        if(!finalizedBudgetBroadcast.SignatureValid()){
             LogPrintf("fbs - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        if(!fbs.IsValid()) {
+        if(!finalizedBudgetBroadcast.IsValid()) {
             LogPrintf("fbs - invalid finalized budget\n");
             return;
         }
 
         //delete if it exists and insert the new object
-        if(mapSeenFinalizedBudgets.count(fbs.GetHash())) mapSeenFinalizedBudgets.erase(fbs.GetHash());
-        mapSeenFinalizedBudgets.insert(make_pair(fbs.GetHash(), fbs));
+        if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) mapSeenFinalizedBudgets.erase(finalizedBudgetBroadcast.GetHash());
+        mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
 
         if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            CFinalizedBudget p(fbs);
-            budget.AddFinalizedBudget(p);
-            fbs.Relay();
+            CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
+            budget.AddFinalizedBudget(finalizedBudget);
+            finalizedBudgetBroadcast.Relay();
 
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
 
@@ -995,8 +1003,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
-        CBudgetProposal* bp = budget.FindProposal((*it1).first);
-        if(bp && (nProp == 0 || (*it1).first == nProp)){
+        CBudgetProposal* pbudgetProposal = budget.FindProposal((*it1).first);
+        if(pbudgetProposal && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mprop", ((*it1).second));
         }
         it1++;
@@ -1004,8 +1012,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     std::map<uint256, CBudgetVote>::iterator it2 = mapSeenMasternodeBudgetVotes.begin();
     while(it2 != mapSeenMasternodeBudgetVotes.end()){
-        CBudgetProposal* bp = budget.FindProposal((*it2).second.nProposalHash);
-        if(bp && (nProp == 0 || (*it1).first == nProp)){
+        CBudgetProposal* pbudgetProposal = budget.FindProposal((*it2).second.nProposalHash);
+        if(pbudgetProposal && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mvote", ((*it2).second));
         }
         it2++;
@@ -1013,8 +1021,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
-        CFinalizedBudget* bp = budget.FindFinalizedBudget((*it3).first);
-        if(bp && (nProp == 0 || (*it1).first == nProp)){
+        CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it3).first);
+        if(pfinalizedBudget && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("fbs", ((*it3).second));
         }
         it3++;
@@ -1022,8 +1030,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     std::map<uint256, CFinalizedBudgetVote>::iterator it4 = mapSeenFinalizedBudgetVotes.begin();
     while(it4 != mapSeenFinalizedBudgetVotes.end()){
-        CFinalizedBudget* bp = budget.FindFinalizedBudget((*it4).second.nBudgetHash);
-        if(bp && (nProp == 0 || (*it1).first == nProp)){
+        CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it4).second.nBudgetHash);
+        if(pfinalizedBudget && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("fbvote", ((*it4).second));
         }
         it4++;
@@ -1522,11 +1530,11 @@ std::string CFinalizedBudget::GetProposals() {
     std::string ret = "";
 
     BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
-        CBudgetProposal* prop = budget.FindProposal(payment.nProposalHash);
+        CBudgetProposal* pbudgetProposal = budget.FindProposal(payment.nProposalHash);
 
         std::string token = payment.nProposalHash.ToString();
 
-        if(prop) token = prop->GetName();
+        if(pbudgetProposal) token = pbudgetProposal->GetName();
         if(ret == "") {ret = token;}
         else {ret += "," + token;}
     }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index ad2d0aa8e27e..1e095258fb18 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -41,7 +41,6 @@ void DumpBudgets();
 
 //Amount of blocks in a months period of time (using 2.6 minutes per)
 int GetBudgetPaymentCycleBlocks();
-void SubmitFinalBudget();
 
 /** Save Budget Manager (budget.dat)
  */
@@ -99,15 +98,14 @@ class CBudgetManager
     CFinalizedBudget *FindFinalizedBudget(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
 
-    void CleanUp();
-
     int64_t GetTotalBudget(int nHeight);
     std::vector<CBudgetProposal*> GetBudget();
     std::vector<CBudgetProposal*> GetAllProposals();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nBlockHeight);
-    void AddProposal(CBudgetProposal& prop);
-    void AddFinalizedBudget(CFinalizedBudget& prop);
+    void AddProposal(CBudgetProposal& budgetProposal);
+    void AddFinalizedBudget(CFinalizedBudget& finalizedBudget);
+    void SubmitFinalBudget();
 
     bool UpdateProposal(CBudgetVote& vote, CNode* pfrom);
     bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom);
@@ -120,6 +118,7 @@ class CBudgetManager
     void ResignInvalidProposals();
     void CheckSignatureValidity();
 
+    void CheckOrphanVotes();
     void Clear(){
         LogPrintf("Budget object cleared\n");
         mapProposals.clear();
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index f96c9e722d12..60ff1a6f3d77 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -125,14 +125,14 @@ Value mnbudget(const Array& params, bool fHelp)
             }
 
             //create the proposal incase we're the first to make it
-            CBudgetProposalBroadcast prop(pmn->vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
-            if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+            CBudgetProposalBroadcast budgetProposalBroadcast(pmn->vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
+            if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
                 return "Failure to sign.";
             }
-            mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
-            prop.Relay();
+            mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
+            budgetProposalBroadcast.Relay();
 
-            CBudgetVote vote(pmn->vin, prop.GetHash(), nVote);
+            CBudgetVote vote(pmn->vin, budgetProposalBroadcast.GetHash(), nVote);
             if(!vote.Sign(keyMasternode, pubKeyMasternode)){
                 return "Failure to sign.";
             }
@@ -209,16 +209,16 @@ Value mnbudget(const Array& params, bool fHelp)
             return(" Error upon calling SetKey");
 
         //create the proposal incase we're the first to make it
-        CBudgetProposalBroadcast prop(activeMasternode.vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
-        if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+        CBudgetProposalBroadcast budgetProposalBroadcast(activeMasternode.vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
+        if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
 
-        mapSeenMasternodeBudgetProposals.insert(make_pair(prop.GetHash(), prop));
-        prop.Relay();
-        budget.AddProposal(prop);
+        mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
+        budgetProposalBroadcast.Relay();
+        budget.AddProposal(budgetProposalBroadcast);
 
-        CBudgetVote vote(activeMasternode.vin, prop.GetHash(), nVote);
+        CBudgetVote vote(activeMasternode.vin, budgetProposalBroadcast.GetHash(), nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
@@ -235,39 +235,39 @@ Value mnbudget(const Array& params, bool fHelp)
         int64_t nTotalAllotted = 0;
 
         std::vector<CBudgetProposal*> winningProps = budget.GetBudget();
-        BOOST_FOREACH(CBudgetProposal* prop, winningProps)
+        BOOST_FOREACH(CBudgetProposal* pbudgetProposal, winningProps)
         {
-            nTotalAllotted += prop->GetAllotted();
+            nTotalAllotted += pbudgetProposal->GetAllotted();
 
             CTxDestination address1;
-            ExtractDestination(prop->GetPayee(), address1);
+            ExtractDestination(pbudgetProposal->GetPayee(), address1);
             CBitcoinAddress address2(address1);
 
             Object bObj;
-            bObj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
-            bObj.push_back(Pair("URL",  prop->GetURL()));
-            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
-            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
-            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
-            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
+            bObj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
+            bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
+            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
+            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
+            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
             bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
-            bObj.push_back(Pair("Ratio",  prop->GetRatio()));
-            bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
-            bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
-            bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
-            bObj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
+            bObj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
+            bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
+            bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
+            bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
+            bObj.push_back(Pair("Alloted",  (int64_t)pbudgetProposal->GetAllotted()));
             bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAllotted));
 
             std::string strError = "";
-            bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
-            bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+            bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+            bObj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
 
-            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
-                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+            if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
+                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
             }
 
-            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
+            resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }
 
         return resultObj;
@@ -279,38 +279,38 @@ Value mnbudget(const Array& params, bool fHelp)
         int64_t nTotalAllotted = 0;
 
         std::vector<CBudgetProposal*> winningProps = budget.GetAllProposals();
-        BOOST_FOREACH(CBudgetProposal* prop, winningProps)
+        BOOST_FOREACH(CBudgetProposal* pbudgetProposal, winningProps)
         {
-            nTotalAllotted += prop->GetAllotted();
+            nTotalAllotted += pbudgetProposal->GetAllotted();
 
             CTxDestination address1;
-            ExtractDestination(prop->GetPayee(), address1);
+            ExtractDestination(pbudgetProposal->GetPayee(), address1);
             CBitcoinAddress address2(address1);
 
             Object bObj;
-            bObj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
-            bObj.push_back(Pair("URL",  prop->GetURL()));
-            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
-            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
-            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
-            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
+            bObj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
+            bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
+            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
+            bObj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
+            bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
             bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
-            bObj.push_back(Pair("Ratio",  prop->GetRatio()));
-            bObj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
-            bObj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
-            bObj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
-            bObj.push_back(Pair("Amount",  (int64_t)prop->GetAmount()));
+            bObj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
+            bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
+            bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
+            bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
+            bObj.push_back(Pair("Amount",  (int64_t)pbudgetProposal->GetAmount()));
 
             std::string strError = "";
-            bObj.push_back(Pair("IsValid",  prop->IsValid(strError)));
-            bObj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+            bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+            bObj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
 
-            if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
-                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+            if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
+                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
             }
 
-            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
+            resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }
 
         return resultObj;
@@ -323,36 +323,36 @@ Value mnbudget(const Array& params, bool fHelp)
 
         std::string strProposalName = params[1].get_str();
 
-        CBudgetProposal* prop = budget.FindProposal(strProposalName);
+        CBudgetProposal* pbudgetProposal = budget.FindProposal(strProposalName);
 
-        if(prop == NULL) return "Unknown proposal name";
+        if(pbudgetProposal == NULL) return "Unknown proposal name";
 
         CTxDestination address1;
-        ExtractDestination(prop->GetPayee(), address1);
+        ExtractDestination(pbudgetProposal->GetPayee(), address1);
         CBitcoinAddress address2(address1);
 
         Object obj;
-        obj.push_back(Pair("VoteCommand",  prop->GetVoteCommand().c_str()));
-        obj.push_back(Pair("Name",  prop->GetName().c_str()));
-        obj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
-        obj.push_back(Pair("URL",  prop->GetURL().c_str()));
-        obj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
-        obj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-        obj.push_back(Pair("TotalPaymentCount",  (int64_t)prop->GetTotalPaymentCount()));
-        obj.push_back(Pair("RemainingPaymentCount",  (int64_t)prop->GetRemainingPaymentCount()));
+        obj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
+        obj.push_back(Pair("Name",  pbudgetProposal->GetName().c_str()));
+        obj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+        obj.push_back(Pair("URL",  pbudgetProposal->GetURL().c_str()));
+        obj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
+        obj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
+        obj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
+        obj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
         obj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
-        obj.push_back(Pair("Ratio",  prop->GetRatio()));
-        obj.push_back(Pair("Yeas",  (int64_t)prop->GetYeas()));
-        obj.push_back(Pair("Nays",  (int64_t)prop->GetNays()));
-        obj.push_back(Pair("Abstains",  (int64_t)prop->GetAbstains()));
-        obj.push_back(Pair("Alloted",  (int64_t)prop->GetAllotted()));
+        obj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
+        obj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
+        obj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
+        obj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
+        obj.push_back(Pair("Alloted",  (int64_t)pbudgetProposal->GetAllotted()));
 
         std::string strError = "";
-        obj.push_back(Pair("IsValid",  prop->IsValid(strError)));
-        obj.push_back(Pair("Owner",  prop->vin.prevout.ToStringShort().c_str()));
+        obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+        obj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
 
-        if(mapSeenMasternodeBudgetProposals.count(prop->GetHash())) {
-            obj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[prop->GetHash()].SignatureValid()));
+        if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
+            obj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
         }
 
 
@@ -368,12 +368,12 @@ Value mnbudget(const Array& params, bool fHelp)
 
         Object obj;
 
-        CBudgetProposal* prop = budget.FindProposal(strProposalName);
+        CBudgetProposal* pbudgetProposal = budget.FindProposal(strProposalName);
 
-        if(prop == NULL) return "Unknown proposal name";
+        if(pbudgetProposal == NULL) return "Unknown proposal name";
 
-        std::map<uint256, CBudgetVote>::iterator it = prop->mapVotes.begin();
-        while(it != prop->mapVotes.end()){
+        std::map<uint256, CBudgetVote>::iterator it = pbudgetProposal->mapVotes.begin();
+        while(it != pbudgetProposal->mapVotes.end()){
             obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(),  (*it).second.GetVoteString().c_str()));
             it++;
         }
@@ -433,14 +433,14 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         {
             std::string strHash = params[i].get_str();
             uint256 hash(strHash);
-            CBudgetProposal* prop = budget.FindProposal(hash);
-            if(!prop){
+            CBudgetProposal* pbudgetProposal = budget.FindProposal(hash);
+            if(!pbudgetProposal){
                 return "Invalid proposal " + strHash + ". Please check the proposal hash";
             } else {
                 CTxBudgetPayment out;
                 out.nProposalHash = hash;
-                out.payee = prop->GetPayee();
-                out.nAmount = prop->GetAmount();
+                out.payee = pbudgetProposal->GetPayee();
+                out.nAmount = pbudgetProposal->GetAmount();
                 vecPayments.push_back(out);
             }
         }
@@ -453,19 +453,19 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return(" Error upon calling SetKey");
 
         //create the proposal incase we're the first to make it
-        CFinalizedBudgetBroadcast prop(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
-        if(!prop.Sign(keyMasternode, pubKeyMasternode)){
+        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
+        if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
 
-        if(!prop.IsValid())
-            return "Invalid prop (are all the hashes correct?)";
+        if(!finalizedBudgetBroadcast.IsValid())
+            return "Invalid finalized budget broadcast (are all the hashes correct?)";
 
-        mapSeenFinalizedBudgets.insert(make_pair(prop.GetHash(), prop));
-        prop.Relay();
-        budget.AddFinalizedBudget(prop);
+        mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
+        finalizedBudgetBroadcast.Relay();
+        budget.AddFinalizedBudget(finalizedBudgetBroadcast);
 
-        CFinalizedBudgetVote vote(activeMasternode.vin, prop.GetHash());
+        CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
@@ -570,17 +570,17 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         Object resultObj;
 
         std::vector<CFinalizedBudget*> winningFbs = budget.GetFinalizedBudgets();
-        BOOST_FOREACH(CFinalizedBudget* prop, winningFbs)
+        BOOST_FOREACH(CFinalizedBudget* finalizedBudget, winningFbs)
         {
             Object bObj;
-            bObj.push_back(Pair("SubmittedBy",  prop->GetSubmittedBy().c_str()));
-            bObj.push_back(Pair("Hash",  prop->GetHash().ToString().c_str()));
-            bObj.push_back(Pair("BlockStart",  (int64_t)prop->GetBlockStart()));
-            bObj.push_back(Pair("BlockEnd",    (int64_t)prop->GetBlockEnd()));
-            bObj.push_back(Pair("Proposals",  prop->GetProposals().c_str()));
-            bObj.push_back(Pair("VoteCount",  (int64_t)prop->GetVoteCount()));
-            bObj.push_back(Pair("Status",  prop->GetStatus().c_str()));
-            resultObj.push_back(Pair(prop->GetName().c_str(), bObj));
+            bObj.push_back(Pair("SubmittedBy",  finalizedBudget->GetSubmittedBy().c_str()));
+            bObj.push_back(Pair("Hash",  finalizedBudget->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("BlockStart",  (int64_t)finalizedBudget->GetBlockStart()));
+            bObj.push_back(Pair("BlockEnd",    (int64_t)finalizedBudget->GetBlockEnd()));
+            bObj.push_back(Pair("finalizedBudgetosals",  finalizedBudget->GetProposals().c_str()));
+            bObj.push_back(Pair("VoteCount",  (int64_t)finalizedBudget->GetVoteCount()));
+            bObj.push_back(Pair("Status",  finalizedBudget->GetStatus().c_str()));
+            resultObj.push_back(Pair(finalizedBudget->GetName().c_str(), bObj));
         }
 
         return resultObj;

From a8f547203720d7067c03070b98362768792effcb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 8 Jul 2015 08:19:07 -0700
Subject: [PATCH 1526/1819] fixed compile error

---
 src/masternode-payments.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 0eac3cccc79f..73f957aa5d67 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -415,7 +415,7 @@ bool CMasternodePaymentWinner::IsValid()
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
-    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, GetMinMasternodePaymentsProto());
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, masternodePayments.GetMinMasternodePaymentsProto());
 
     if(n == -1)
     {

From 91a0887a0ddae5b95fcec69bcc14060fb6496a42 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 8 Jul 2015 08:55:52 -0700
Subject: [PATCH 1527/1819] Fix active removal of proposals

---
 src/masternode-budget.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index d0ce42d5146b..86c07c7a58da 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -427,7 +427,8 @@ void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 
     if(mapFinalizedBudgets.count(finalizedBudget.GetHash()) && mapFinalizedBudgets[finalizedBudget.GetHash()].vin != finalizedBudget.vin) {
         //this finalized budget must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget (%s to %s)\n",
+        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget %s (%s to %s)\n",
+                  finalizedBudget.strBudgetName,
                   mapFinalizedBudgets[finalizedBudget.GetHash()].vin.prevout.ToStringShort(),
                   finalizedBudget.vin.prevout.ToStringShort());
         mapFinalizedBudgets[finalizedBudget.GetHash()].vin = finalizedBudget.vin;
@@ -448,7 +449,10 @@ void CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 
     if(mapProposals.count(budgetProposal.GetHash()) && mapProposals[budgetProposal.GetHash()].vin != budgetProposal.vin) {
         //this budget proposal must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid budget proposal (%s to %s)\n", mapProposals[budgetProposal.GetHash()].vin.prevout.ToStringShort().c_str(), budgetProposal.vin.prevout.ToStringShort().c_str());
+        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid budget proposal %s (%s to %s)\n", 
+            budgetProposal.strProposalName,
+            mapProposals[budgetProposal.GetHash()].vin.prevout.ToStringShort().c_str(), 
+            budgetProposal.vin.prevout.ToStringShort().c_str());
         mapProposals[budgetProposal.GetHash()].vin = budgetProposal.vin;
         return;
     }
@@ -1119,7 +1123,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 
 bool CBudgetProposal::IsValid(std::string& strError)
 {
-    if(GetYeas()+GetNays() < -(mnodeman.CountEnabled()/10)){
+    if(GetYeas()-GetNays() < -(mnodeman.CountEnabled()/10)){
          strError = "Active removal";
          return false;
     }

From a351456c17551cd8b03b2180bf45655162d747a7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 8 Jul 2015 10:17:16 -0700
Subject: [PATCH 1528/1819] Fixed invalid saved budget.dat issue

---
 src/masternode-budget.cpp | 58 ++++++++++++++++-----------------------
 src/spork.h               |  2 +-
 2 files changed, 24 insertions(+), 36 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 86c07c7a58da..2f619bdee0ff 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -83,7 +83,7 @@ void CBudgetManager::ResignInvalidProposals()
 
     CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
     if(pmn == NULL) {
-        LogPrintf("mprop - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
+        LogPrintf("CBudgetManager::ResignInvalidProposals  - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
         return;
     }
 
@@ -396,24 +396,7 @@ void DumpBudgets()
     int64_t nStart = GetTimeMillis();
 
     CBudgetDB mndb;
-    CBudgetManager tempbudget;
-
-    LogPrintf("Verifying budget.dat format...\n");
-    CBudgetDB::ReadResult readResult = mndb.Read(tempbudget);
-    // there was an error and it was not an error on file openning => do not proceed
-    if (readResult == CBudgetDB::FileError)
-        LogPrintf("Missing budget cache file - budget.dat, will try to recreate\n");
-    else if (readResult != CBudgetDB::Ok)
-    {
-        LogPrintf("Error reading budget.dat: ");
-        if(readResult == CBudgetDB::IncorrectFormat)
-            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
-        else
-        {
-            LogPrintf("file format is unknown or invalid, please fix it manually\n");
-            return;
-        }
-    }
+
     LogPrintf("Writting info to budget.dat...\n");
     mndb.Write(budget);
 
@@ -1276,6 +1259,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast()
     nBlockEnd = 0;
     nAmount = 0;
     nTime = 0;
+    fInvalid = false;
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
@@ -1287,6 +1271,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
     nBlockEnd = other.nBlockEnd;
     address = other.address;
     nAmount = other.nAmount;
+    fInvalid = false;
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn)
@@ -1303,6 +1288,8 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strP
 
     address = addressIn;
     nAmount = nAmountIn;
+
+    fInvalid = false;
 }
 
 bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
@@ -1598,25 +1585,26 @@ bool CFinalizedBudget::IsValid()
 
 bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-   /* BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
-    {
-        bool found = false;
-        BOOST_FOREACH(CTxOut out, txNew.vout)
-        {
-            if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue)
-                found = true;
-        }
+    // TODO:
+    // BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
+    // {
+    //     bool found = false;
+    //     BOOST_FOREACH(CTxOut out, txNew.vout)
+    //     {
+    //         if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue)
+    //             found = true;
+    //     }
 
-        if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
+    //     if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
 
-            CTxDestination address1;
-            ExtractDestination(payee.scriptPubKey, address1);
-            CBitcoinAddress address2(address1);
+    //         CTxDestination address1;
+    //         ExtractDestination(payee.scriptPubKey, address1);
+    //         CBitcoinAddress address2(address1);
 
-            LogPrintf("CMasternodePayments::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
-            return false;
-        }
-    }*/
+    //         LogPrintf("CFinalizedBudget::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
+    //         return false;
+    //     }
+    // }
 
     return true;
 }
diff --git a/src/spork.h b/src/spork.h
index 31247d86b9fe..ef1bf9d8c007 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -41,7 +41,7 @@ using namespace boost;
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1444217600   //OFF
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
-
+    
 class CSporkMessage;
 class CSporkManager;
 

From 8a5ebeaa6254bd3ecf39c1ec5dc3821a1cb6eb18 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 8 Jul 2015 10:25:47 -0700
Subject: [PATCH 1529/1819] added spork for reseting budget

---
 src/masternode-budget.h | 4 ++++
 src/spork.cpp           | 9 +++++++++
 src/spork.h             | 2 ++
 3 files changed, 15 insertions(+)

diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 1e095258fb18..026d9f1054d0 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -123,6 +123,10 @@ class CBudgetManager
         LogPrintf("Budget object cleared\n");
         mapProposals.clear();
         mapFinalizedBudgets.clear();
+        mapSeenMasternodeBudgetProposals.clear();
+        mapSeenMasternodeBudgetVotes.clear();
+        mapSeenFinalizedBudgets.clear();
+        mapSeenFinalizedBudgetVotes.clear();
     }
     void CheckAndRemove();
     std::string ToString() {return "not implemented";}
diff --git a/src/spork.cpp b/src/spork.cpp
index 286845a17a73..98a8599cb8d9 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -9,6 +9,7 @@
 #include "protocol.h"
 #include "spork.h"
 #include "main.h"
+#include "masternode-budget.h"
 #include <boost/lexical_cast.hpp>
 
 using namespace std;
@@ -88,6 +89,7 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
+        if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
 
         if(r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -111,6 +113,7 @@ int GetSporkValue(int nSporkID)
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
+        if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -120,6 +123,10 @@ int GetSporkValue(int nSporkID)
 
 void ExecuteSpork(int nSporkID, int nValue)
 {
+    if(nSporkID == SPORK_11_RESET_BUDGET && nValue == 1){
+        budget.Clear();
+
+    }
 }
 
 
@@ -214,6 +221,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
     if(strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
     if(strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
     if(strName == "SPORK_10_MASTERNODE_PAY_NEWEST_NODES") return SPORK_10_MASTERNODE_PAY_NEWEST_NODES;
+    if(strName == "SPORK_11_RESET_BUDGET") return SPORK_11_RESET_BUDGET;
 
     return -1;
 }
@@ -227,6 +235,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
     if(id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
     if(id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
     if(id == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) return "SPORK_10_MASTERNODE_PAY_NEWEST_NODES";
+    if(id == SPORK_11_RESET_BUDGET) return "SPORK_11_RESET_BUDGET";
 
     return "Unknown";
 }
diff --git a/src/spork.h b/src/spork.h
index ef1bf9d8c007..1e7e1bd6baa3 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -33,6 +33,7 @@ using namespace boost;
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT                10007
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT                 10008
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES                  10009
+#define SPORK_11_RESET_BUDGET                                 10010
 
 #define SPORK_2_INSTANTX_DEFAULT                              978307200   //2001-1-1
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
@@ -41,6 +42,7 @@ using namespace boost;
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1444217600   //OFF
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
+#define SPORK_11_RESET_BUDGET_DEFAULT                         0
     
 class CSporkMessage;
 class CSporkManager;

From 2d118769f03572af79612424ec4e4c538c725532 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 8 Jul 2015 10:27:26 -0700
Subject: [PATCH 1530/1819] version/proto bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 2 +-
 src/version.h       | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 4b36bcc2768f..7bf89ed996b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 10)
+define(_CLIENT_VERSION_BUILD, 11)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 965bf857e00e..a80bb404993a 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 10
+#define CLIENT_VERSION_BUILD 11
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index e7664bbed1d1..25895db782ff 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70084;
+static const int MIN_INSTANTX_PROTO_VERSION = 70085;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 6b1c206484fd..8ba82f8869e3 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70084;
+static const int PROTOCOL_VERSION = 70085;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70084;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70085;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70084;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70085;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70084;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70085;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From d59765361583e85051f1ddaa41beb24051c8e14b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 9 Jul 2015 06:54:30 +0300
Subject: [PATCH 1531/1819] fix alternative units in send dialog

---
 src/qt/sendcoinsdialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 7270387aafb8..fe311be3f1a8 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -363,7 +363,7 @@ void SendCoinsDialog::send(QList<SendCoinsRecipient> recipients, QString strFee,
     }
     questionString.append(tr("Total Amount %1 (= %2)")
         .arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))
-        .arg(alternativeUnits.join(" " + tr("or") + " ")));
+        .arg("<br />" + alternativeUnits.join(" " + tr("or") + "<br />")));
 
     QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"),
         questionString.arg(formatted.join("<br />")),

From 7a0998919524b3f1a46577948fe87de8b095484f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 10 Jul 2015 19:08:50 +0300
Subject: [PATCH 1532/1819] make masternode.conf parsing more verbose on errors
 / translate strings

---
 src/masternodeconfig.cpp | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/masternodeconfig.cpp b/src/masternodeconfig.cpp
index 5d758b6cc91f..eb955d1a47ff 100644
--- a/src/masternodeconfig.cpp
+++ b/src/masternodeconfig.cpp
@@ -2,6 +2,7 @@
 #include "net.h"
 #include "masternodeconfig.h"
 #include "util.h"
+#include "ui_interface.h"
 #include <base58.h>
 
 CMasternodeConfig masternodeConfig;
@@ -12,12 +13,14 @@ void CMasternodeConfig::add(std::string alias, std::string ip, std::string privK
 }
 
 bool CMasternodeConfig::read(std::string& strErr) {
+    int linenumber = 1;
+
     boost::filesystem::ifstream streamConfig(GetMasternodeConfigFile());
     if (!streamConfig.good()) {
         return true; // No masternode.conf file is OK
     }
 
-    for(std::string line; std::getline(streamConfig, line); )
+    for(std::string line; std::getline(streamConfig, line); linenumber++)
     {
         if(line.empty()) {
             continue;
@@ -28,7 +31,8 @@ bool CMasternodeConfig::read(std::string& strErr) {
             iss.str(line);
             iss.clear();
             if (!(iss >> alias >> ip >> privKey >> txHash >> outputIndex)) {
-                strErr = "Could not parse masternode.conf line: " + line;
+                strErr = _("Could not parse masternode.conf") + "\n" +
+                        strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"";
                 streamConfig.close();
                 return false;
             }
@@ -36,12 +40,16 @@ bool CMasternodeConfig::read(std::string& strErr) {
 
         if(Params().NetworkID() == CBaseChainParams::MAIN) {
             if(CService(ip).GetPort() != 9999) {
-                strErr = "Invalid port detected in masternode.conf: " + line + " (must be 9999 for mainnet)";
+                strErr = _("Invalid port detected in masternode.conf") + "\n" +
+                        strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
+                        _("(must be 9999 for mainnet)");
                 streamConfig.close();
                 return false;
             }
         } else if(CService(ip).GetPort() == 9999) {
-            strErr = "Invalid port detected in masternode.conf: " + line + " (9999 must be only on mainnet)";
+            strErr = _("Invalid port detected in masternode.conf") + "\n" +
+                    strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
+                    _(" (9999 could be used only on mainnet)");
             streamConfig.close();
             return false;
         }

From 1f978f561c3e2944e2478c7231cc04318f52677b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 9 Jul 2015 06:34:30 +0300
Subject: [PATCH 1533/1819] Temporary unlock MN coins locked by -mnconflock on
 masternode start-alias/many and immediately lock them back right after
 finding all available coins

---
 src/activemasternode.cpp | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 6c1135fccec7..392c6747719a 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -3,6 +3,7 @@
 #include "activemasternode.h"
 #include "masternodeman.h"
 #include "masternode.h"
+#include "masternodeconfig.h"
 #include <boost/lexical_cast.hpp>
 
 //
@@ -302,10 +303,28 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()
 {
     vector<COutput> vCoins;
     vector<COutput> filteredCoins;
+    vector<COutPoint> confLockedCoins;
+
+    // Temporary unlock MN coins from masternode.conf
+    if(GetBoolArg("-mnconflock", true)) {
+        uint256 mnTxHash;
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            mnTxHash.SetHex(mne.getTxHash());
+            COutPoint outpoint = COutPoint(mnTxHash, boost::lexical_cast<unsigned int>(mne.getOutputIndex()));
+            confLockedCoins.push_back(outpoint);
+            pwalletMain->UnlockCoin(outpoint);
+        }
+    }
 
     // Retrieve all possible outputs
     pwalletMain->AvailableCoins(vCoins);
 
+    // Lock MN coins from masternode.conf back if they where temporary unlocked
+    if(!confLockedCoins.empty()) {
+        BOOST_FOREACH(COutPoint outpoint, confLockedCoins)
+            pwalletMain->LockCoin(outpoint);
+    }
+
     // Filter
     BOOST_FOREACH(const COutput& out, vCoins)
     {

From c701839a43600e0ab2740f3caffa89e90e7ccac5 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 9 Jul 2015 15:08:26 -0700
Subject: [PATCH 1534/1819] Proposal Security Overhaul

Submissions to the network now require a fee to be paid to the network (mining fee) using a special transaction with a OP_RETURN && ProposalHash in one of the outputs. This allows the network to filter spam quickly, while also allowing anyone to submit a proposal to the network.

To implement these changes we've introduced a few new commands:

mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]
- To create the special transaction

mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX
- After the transaction is accepted by the network and has 3 confirmations, you can submit the transaction to the network here

mnbudget show
- Get the proposal hash from here

mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN
- You can now simply vote by hash using this command
---
 configure.ac                 |   2 +-
 src/clientversion.h          |   2 +-
 src/darksend.cpp             |   8 +-
 src/instantx.cpp             |  14 +-
 src/instantx.h               |   2 +-
 src/main.cpp                 |  14 +-
 src/masternode-budget.cpp    | 424 +++++++++--------------------------
 src/masternode-budget.h      |  71 ++----
 src/net.cpp                  |   2 +-
 src/qt/walletmodel.cpp       |   2 +-
 src/rpcmasternode-budget.cpp | 217 +++++++++++-------
 src/version.h                |   8 +-
 src/wallet.cpp               |  39 +++-
 src/wallet.h                 |   8 +-
 14 files changed, 316 insertions(+), 497 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7bf89ed996b9..0624ccbdeaef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 11)
+define(_CLIENT_VERSION_BUILD, 12)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index a80bb404993a..5ae4775b48a0 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 11
+#define CLIENT_VERSION_BUILD 12
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 0cde15ebe6f7..1e65c3c33241 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2374,19 +2374,21 @@ void ThreadCheckDarkSendPool()
                                 if(pnode->HasFulfilledRequest("mnsync")) continue;
                                 pnode->FulfilledRequest("mnsync");
 
-                                LogPrintf("Successfully synced, asking for Masternode list and payment list\n");
-
                                 //request full mn list only if Masternodes.dat was updated quite a long time ago
                                 
                                 if(RequestedMasternodeAssets == 0 || RequestedMasternodeAssets == 1){   
+                                    LogPrintf("Successfully synced, asking for Masternode list\n");
                                     mnodeman.DsegUpdate(pnode);
                                     pnode->PushMessage("getsporks"); //get current network sporks
                                 }
 
-                                if(RequestedMasternodeAssets == 2 || RequestedMasternodeAssets == 3)
+                                if(RequestedMasternodeAssets == 2 || RequestedMasternodeAssets == 3){
+                                    LogPrintf("Successfully synced, asking for Masternode payee list\n");
                                     pnode->PushMessage("mnget"); //sync payees
+                                }
                                 
                                 if(RequestedMasternodeAssets == 4 || RequestedMasternodeAssets == 5){
+                                    LogPrintf("Successfully synced, asking for Masternode Budget votes / Finalized budgets\n");
                                     uint256 n = 0;
                                     pnode->PushMessage("mnvs", n); //sync masternode votes
                                 }
diff --git a/src/instantx.cpp b/src/instantx.cpp
index 299df4150155..6c0c6206df6f 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -38,9 +38,9 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
     if(!IsSporkActive(SPORK_2_INSTANTX)) return;
     if(IsInitialBlockDownload()) return;
 
-    if (strCommand == "txlreq")
+    if (strCommand == "ix")
     {
-        //LogPrintf("ProcessMessageInstantX::txlreq\n");
+        //LogPrintf("ProcessMessageInstantX::ix\n");
         CDataStream vMsg(vRecv);
         CTransaction tx;
         vRecv >> tx;
@@ -58,7 +58,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 
         BOOST_FOREACH(const CTxOut o, tx.vout){
             if(!o.scriptPubKey.IsNormalPaymentScript()){
-                LogPrintf("ProcessMessageInstantX::txlreq - Invalid Script %s\n", tx.ToString().c_str());
+                LogPrintf("ProcessMessageInstantX::ix - Invalid Script %s\n", tx.ToString().c_str());
                 return;
             }
         }
@@ -81,7 +81,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 
             mapTxLockReq.insert(make_pair(tx.GetHash(), tx));
 
-            LogPrintf("ProcessMessageInstantX::txlreq - Transaction Lock Request: %s %s : accepted %s\n",
+            LogPrintf("ProcessMessageInstantX::ix - Transaction Lock Request: %s %s : accepted %s\n",
                 pfrom->addr.ToString().c_str(), pfrom->cleanSubVer.c_str(),
                 tx.GetHash().ToString().c_str()
             );
@@ -93,7 +93,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 
             // can we get the conflicting transaction as proof?
 
-            LogPrintf("ProcessMessageInstantX::txlreq - Transaction Lock Request: %s %s : rejected %s\n",
+            LogPrintf("ProcessMessageInstantX::ix - Transaction Lock Request: %s %s : rejected %s\n",
                 pfrom->addr.ToString().c_str(), pfrom->cleanSubVer.c_str(),
                 tx.GetHash().ToString().c_str()
             );
@@ -110,7 +110,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
                 //we only care if we have a complete tx lock
                 if((*i).second.CountSignatures() >= INSTANTX_SIGNATURES_REQUIRED){
                     if(!CheckForConflictingLocks(tx)){
-                        LogPrintf("ProcessMessageInstantX::txlreq - Found Existing Complete IX Lock\n");
+                        LogPrintf("ProcessMessageInstantX::ix - Found Existing Complete IX Lock\n");
 
                         CValidationState state;
                         DisconnectBlockAndInputs(state, tx);
@@ -150,7 +150,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 
                 if(mapUnknownVotes[ctx.vinMasternode.prevout.hash] > GetTime() &&
                     mapUnknownVotes[ctx.vinMasternode.prevout.hash] - GetAverageVoteTime() > 60*10){
-                        LogPrintf("ProcessMessageInstantX::txlreq - masternode is spamming transaction votes: %s %s\n",
+                        LogPrintf("ProcessMessageInstantX::ix - masternode is spamming transaction votes: %s %s\n",
                             ctx.vinMasternode.ToString().c_str(),
                             ctx.txHash.ToString().c_str()
                         );
diff --git a/src/instantx.h b/src/instantx.h
index 25895db782ff..d9989a54d6ea 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70085;
+static const int MIN_INSTANTX_PROTO_VERSION = 70086;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/main.cpp b/src/main.cpp
index a64f3d5f1d35..242ac72e3447 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3957,19 +3957,11 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_BUDGET_VOTE:
         return mapSeenMasternodeBudgetVotes.count(inv.hash);
     case MSG_BUDGET_PROPOSAL:
-        if(!mapSeenMasternodeBudgetProposals.count(inv.hash)){
-            return false;
-        } else {
-            return !mapSeenMasternodeBudgetProposals[inv.hash].fInvalid;
-        }
+        return mapSeenMasternodeBudgetProposals.count(inv.hash);
     case MSG_BUDGET_FINALIZED_VOTE:
         return mapSeenFinalizedBudgetVotes.count(inv.hash);
     case MSG_BUDGET_FINALIZED:
-        if(!mapSeenFinalizedBudgets.count(inv.hash)){
-            return false;
-        } else {
-            return !mapSeenFinalizedBudgets[inv.hash].fInvalid;
-        }
+        return mapSeenFinalizedBudgets.count(inv.hash);
     case MSG_MASTERNODE_ANNOUNCE:
         return mapSeenMasternodeBroadcast.count(inv.hash);
     case MSG_MASTERNODE_PING:
@@ -4111,7 +4103,7 @@ void static ProcessGetData(CNode* pfrom)
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
                         ss << mapTxLockReq[inv.hash];
-                        pfrom->PushMessage("txlreq", ss);
+                        pfrom->PushMessage("ix", ss);
                         pushed = true;
                     }
                 }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 2f619bdee0ff..67d3213b9dc8 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -32,176 +32,95 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
-void CBudgetManager::CheckOrphanVotes()
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, std::string& strError)
 {
-    std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
-    while(it1 != mapOrphanMasternodeBudgetVotes.end()){
-        if(budget.UpdateProposal(((*it1).second), NULL)){
-            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
-            mapOrphanMasternodeBudgetVotes.erase(it1++);
-        } else {
-            ++it1;
-        }
-    }
-    std::map<uint256, CFinalizedBudgetVote>::iterator it2 = mapOrphanFinalizedBudgetVotes.begin();
-    while(it2 != mapOrphanFinalizedBudgetVotes.end()){
-        if(budget.UpdateFinalizedBudget(((*it2).second),NULL)){
-            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
-            mapOrphanFinalizedBudgetVotes.erase(it2++);
-        } else {
-            ++it2;
-        }
-    }
-}
+    return true;
 
-void CBudgetManager::ResignInvalidProposals()
-{
-    if(!fMasterNode){
-        CheckSignatureValidity();
-        return;
+    CTransaction txCollateral;
+    uint256 hash;
+    if(!GetTransaction(nTxCollateralHash, txCollateral, hash, true)){
+        LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Can't find collateral tx %s\n", txCollateral.ToString().c_str());
+        return false;
     }
 
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return;
-
-    //pick a few masternodes responsible for this each cycle
-    int n = mnodeman.GetMasternodeRank(activeMasternode.vin, pindexPrev->nHeight, MIN_BUDGET_PEER_PROTO_VERSION);
+    if(txCollateral.vout.size() < 1) return false;
+    if(txCollateral.nLockTime != 0) return false;
 
-    if(n == -1)
-    {
-        CheckSignatureValidity();
-        LogPrintf("CBudgetManager::ResignInvalidProposals - Unknown Masternode\n");
-        return;
-    }
+    int64_t nValueIn = 0;
+    int64_t nValueOut = 0;
+    bool missingTx = false;
 
-    if(n > 3)
-    {
-        CheckSignatureValidity();
-        LogPrintf("CBudgetManager::ResignInvalidProposals - Masternode not in the top %s\n", MIN_BUDGET_PEER_PROTO_VERSION);
-        return;
-    }
+    BOOST_FOREACH(const CTxOut o, txCollateral.vout){
+        nValueOut += o.nValue;
 
-    CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
-    if(pmn == NULL) {
-        LogPrintf("CBudgetManager::ResignInvalidProposals  - unknown masternode - vin:%s \n", pmn->vin.ToString().c_str());
-        return;
+        if(!o.scriptPubKey.IsNormalPaymentScript()){
+            LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Invalid Script %s\n", txCollateral.ToString().c_str());
+            return false;
+        }
     }
 
-    std::map<uint256, CBudgetProposal>::iterator it1 = mapProposals.begin();
-    while(it1 != mapProposals.end())
-    {
-        if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
-
-        CBudgetProposal* pbudgetProposal = &((*it1).second);
-
-        CBudgetProposalBroadcast budgetProposalBroadcast(*pbudgetProposal);
-        if(!budgetProposalBroadcast.SignatureValid()){
-            budgetProposalBroadcast.vin = activeMasternode.vin;
-
-            LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - resigning proposal\n");
-
-            CPubKey pubKeyMasternode;
-            CKey keyMasternode;
-            std::string errorMessage;
-
-            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-                LogPrintf("CBudgetManager::ResignInvalidProposals - Error upon calling SetKey");
-                return;
-            }
-
-            if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-                LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
-                return;
-            }
-
-            std::string strError = "";
-            if(budgetProposalBroadcast.IsValid(strError)){
-                //delete if it exists and insert the new object
-                if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) mapSeenMasternodeBudgetProposals.erase(budgetProposalBroadcast.GetHash());
-                mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
-
-                budgetProposalBroadcast.Relay();
-            } else {
-                LogPrintf("CBudgetManager::ResignInvalidProposals -- proposal - still invalid with new signature\n");
+    bool foundOpReturn = false;
+    BOOST_FOREACH(const CTxIn i, txCollateral.vin){
+        CTransaction tx2;
+        uint256 hash;
+        if(GetTransaction(i.prevout.hash, tx2, hash, true)){
+            if(tx2.vout.size() > i.prevout.n) {
+                nValueIn += tx2.vout[i.prevout.n].nValue;
             }
+        } else{
+            missingTx = true;
         }
-        ++it1;
     }
 
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end()){
-        if(pmn->nVotedTimes+VOTE_PROP_INC > 100) return; //can't submit to the network anyway
-
-        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
-        if(!pfinalizedBudget->IsValid()) continue;
-
-        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(*pfinalizedBudget);
-        if(!finalizedBudgetBroadcast.SignatureValid()){
-            finalizedBudgetBroadcast.vin = activeMasternode.vin;
-
-            LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - resigning finalized budget\n");
+    if(!foundOpReturn){
 
-            CPubKey pubKeyMasternode;
-            CKey keyMasternode;
-            std::string errorMessage;
-
-            if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-                LogPrintf("CBudgetManager::ResignInvalidProposals - Error upon calling SetKey");
-                return;
-            }
+    }
 
-            if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-                LogPrintf("CBudgetManager::ResignInvalidProposals - Failure to sign");
-                return;
-            }
+    if(missingTx){
+        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString().c_str());
+        return false;
+    }
 
-            if(!finalizedBudgetBroadcast.IsValid()){
+    //collateral transactions are required to pay out BUDGET_FEE_TX as a fee to the miners
+    if(nValueIn - nValueOut < BUDGET_FEE_TX) {
+        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
+        return false;
+    }
 
-                //delete if it exists and insert the new object
-                if(mapFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) mapFinalizedBudgets.erase(finalizedBudgetBroadcast.GetHash());
-                mapFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
+    if(fDebug) LogPrintf("CBudgetProposalBroadcast::FeeTXValid %s\n", txCollateral.ToString().c_str());
 
-                finalizedBudgetBroadcast.Relay();
-            } else {
-                LogPrintf("CBudgetManager::ResignInvalidProposals -- finalized budget - still invalid with new signature\n");
-            }
-        }
-        ++it2;
+    CValidationState state;
+    if(!AcceptableInputs(mempool, state, txCollateral, true, NULL)){
+        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - didn't pass IsAcceptable\n");
+        return false;
     }
+
+    return true;
+    return true;
 }
 
-void CBudgetManager::CheckSignatureValidity()
+void CBudgetManager::CheckOrphanVotes()
 {
-    std::map<uint256, CBudgetProposal>::iterator it1 = mapProposals.begin();
-    while(it1 != mapProposals.end())
-    {
-        CBudgetProposal* pbudgetProposal = &((*it1).second);
-
-        CBudgetProposalBroadcast budgetProposalBroadcast(*pbudgetProposal);
-        if(!budgetProposalBroadcast.SignatureValid()){
-            if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) {
-                mapSeenMasternodeBudgetProposals[budgetProposalBroadcast.GetHash()].fInvalid = true;
-            }
+    std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
+    while(it1 != mapOrphanMasternodeBudgetVotes.end()){
+        if(budget.UpdateProposal(((*it1).second), NULL)){
+            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            mapOrphanMasternodeBudgetVotes.erase(it1++);
+        } else {
+            ++it1;
         }
-        ++it1;
     }
-
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end())
-    {
-        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
-
-        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(*pfinalizedBudget);
-        if(!finalizedBudgetBroadcast.SignatureValid()){
-            if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) {
-                mapSeenFinalizedBudgets[finalizedBudgetBroadcast.GetHash()].fInvalid = true;
-            }
+    std::map<uint256, CFinalizedBudgetVote>::iterator it2 = mapOrphanFinalizedBudgetVotes.begin();
+    while(it2 != mapOrphanFinalizedBudgetVotes.end()){
+        if(budget.UpdateFinalizedBudget(((*it2).second),NULL)){
+            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            mapOrphanFinalizedBudgetVotes.erase(it2++);
+        } else {
+            ++it2;
         }
-        ++it2;
     }
 }
 
-
 void CBudgetManager::SubmitFinalBudget()
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -238,11 +157,11 @@ void CBudgetManager::SubmitFinalBudget()
         LogPrintf("SubmitFinalBudget - Error upon calling SetKey\n");
     }
 
+    //create fee tx
+    uint256 hash = 0;
+
     //create the proposal incase we're the first to make it
-    CFinalizedBudgetBroadcast finalizedBudgetBroadcast(activeMasternode.vin, strBudgetName, nBlockStart, vecTxBudgetPayments);
-    if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.\n");
-    }
+    CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecTxBudgetPayments, hash);
 
     if(!finalizedBudgetBroadcast.IsValid()){
         LogPrintf("SubmitFinalBudget - Invalid finalized budget broadcast (are all the hashes correct?)\n");
@@ -408,13 +327,7 @@ void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
     LOCK(cs);
     if(!finalizedBudget.IsValid()) return;
 
-    if(mapFinalizedBudgets.count(finalizedBudget.GetHash()) && mapFinalizedBudgets[finalizedBudget.GetHash()].vin != finalizedBudget.vin) {
-        //this finalized budget must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddFinalizedBudget -- updated vin of invalid finalized budget %s (%s to %s)\n",
-                  finalizedBudget.strBudgetName,
-                  mapFinalizedBudgets[finalizedBudget.GetHash()].vin.prevout.ToStringShort(),
-                  finalizedBudget.vin.prevout.ToStringShort());
-        mapFinalizedBudgets[finalizedBudget.GetHash()].vin = finalizedBudget.vin;
+    if(mapFinalizedBudgets.count(finalizedBudget.GetHash())) {
         return;
     }
 
@@ -430,13 +343,7 @@ void CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
         return;
     }
 
-    if(mapProposals.count(budgetProposal.GetHash()) && mapProposals[budgetProposal.GetHash()].vin != budgetProposal.vin) {
-        //this budget proposal must have went invalid, so update the vin to the new one
-        LogPrintf("CBudgetManager::AddProposal -- updated vin of invalid budget proposal %s (%s to %s)\n", 
-            budgetProposal.strProposalName,
-            mapProposals[budgetProposal.GetHash()].vin.prevout.ToStringShort().c_str(), 
-            budgetProposal.vin.prevout.ToStringShort().c_str());
-        mapProposals[budgetProposal.GetHash()].vin = budgetProposal.vin;
+    if(mapProposals.count(budgetProposal.GetHash())) {
         return;
     }
 
@@ -761,8 +668,6 @@ void CBudgetManager::NewBlock()
         SubmitFinalBudget();
     }
 
-    ResignInvalidProposals();
-
     //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
     if(chainActive.Height() % 6 != 0) return;
 
@@ -813,30 +718,20 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> budgetProposalBroadcast;
 
         if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())){
-            //if this proposal went inactive, we'll update it with the new re-signature
-            if(!mapSeenMasternodeBudgetProposals[budgetProposalBroadcast.GetHash()].fInvalid){
-                return;
-            }
+            return;
         }
 
         //set time we first saw this prop
         budgetProposalBroadcast.nTime = GetAdjustedTime();
 
-        CMasternode* pmn = mnodeman.Find(budgetProposalBroadcast.vin);
-        if(pmn == NULL) {
-            if(fDebug) LogPrintf("mprop - unknown masternode - vin: %s\n", budgetProposalBroadcast.vin.ToString());
-            return;
-        }
-
-        if(!budgetProposalBroadcast.SignatureValid()){
-            LogPrintf("mprop - signature invalid\n");
-            Misbehaving(pfrom->GetId(), 20);
+        std::string strError = "";
+        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, strError)){
+            LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
             return;
         }
 
-        std::string strError = "";
         if(!budgetProposalBroadcast.IsValid(strError)) {
-            LogPrintf("mprop - invalid budget proposal - %s\n", strError.c_str());
+            LogPrintf("mprop - invalid budget proposal - %s\n", strError);
             return;
         }
 
@@ -844,20 +739,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) mapSeenMasternodeBudgetProposals.erase(budgetProposalBroadcast.GetHash());
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
-        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            CBudgetProposal budgetProposal(budgetProposalBroadcast);
-            budget.AddProposal(budgetProposal);
-            budgetProposalBroadcast.Relay();
-
-            //can only do this six times a day on the network
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
+        CBudgetProposal budgetProposal(budgetProposalBroadcast);
+        budget.AddProposal(budgetProposal);
+        budgetProposalBroadcast.Relay();
 
-            //We might have active votes for this proposal that are valid now
-            CheckOrphanVotes();
-        } else {
-            LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
-            return;
-        }
+        //We might have active votes for this proposal that are valid now
+        CheckOrphanVotes();
     }
 
     if (strCommand == "mvote") { //Masternode Vote
@@ -881,7 +768,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+        if(pmn->nVotedTimes < 100){
             budget.UpdateProposal(vote, pfrom);
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
@@ -896,21 +783,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> finalizedBudgetBroadcast;
 
         if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())){
-            //if this budget went inactive, we'll update it with the new re-signature
-            if(!mapSeenFinalizedBudgets[finalizedBudgetBroadcast.GetHash()].fInvalid){
-                return;
-            }
-        }
-
-        CMasternode* pmn = mnodeman.Find(finalizedBudgetBroadcast.vin);
-        if(pmn == NULL) {
-            if(fDebug) LogPrintf("fbs - unknown masternode - vin: %s\n", finalizedBudgetBroadcast.vin.ToString());
             return;
         }
 
-        if(!finalizedBudgetBroadcast.SignatureValid()){
-            LogPrintf("fbs - signature invalid\n");
-            Misbehaving(pfrom->GetId(), 20);
+        std::string strError = "";
+        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, strError)){
+            LogPrintf("Finalized Budget FeeTX is not valid - %s - %s\n", finalizedBudgetBroadcast.nFeeTXHash.ToString(), strError);
             return;
         }
 
@@ -923,19 +801,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) mapSeenFinalizedBudgets.erase(finalizedBudgetBroadcast.GetHash());
         mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
 
-        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
-            CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
-            budget.AddFinalizedBudget(finalizedBudget);
-            finalizedBudgetBroadcast.Relay();
-
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes+=VOTE_PROP_INC;
+        CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
+        budget.AddFinalizedBudget(finalizedBudget);
+        finalizedBudgetBroadcast.Relay();
 
-            //we might have active votes for this budget that are now valid
-            CheckOrphanVotes();
-        } else {
-            LogPrintf("fbs - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
-            return;
-        }
+        //we might have active votes for this budget that are now valid
+        CheckOrphanVotes();
     }
 
     if (strCommand == "fbvote") { //Finalized Budget Vote
@@ -959,7 +830,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        if(IsSyncingMasternodeAssets() || pmn->nVotedTimes < 100){
+        if(pmn->nVotedTimes < 100){
             budget.UpdateFinalizedBudget(vote, pfrom);
             vote.Relay();
             if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
@@ -1072,7 +943,6 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
 
 CBudgetProposal::CBudgetProposal()
 {
-    vin = CTxIn();
     strProposalName = "unknown";
     nBlockStart = 0;
     nBlockEnd = 0;
@@ -1080,9 +950,8 @@ CBudgetProposal::CBudgetProposal()
     nTime = 0;
 }
 
-CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn)
+CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn)
 {
-    vin = vinIn;
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
     nBlockStart = nBlockStartIn;
@@ -1090,11 +959,11 @@ CBudgetProposal::CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std
     address = addressIn;
     nAmount = nAmountIn;
     nTime = 0;
+    nFeeTXHash = nFeeTXHashIn;
 }
 
 CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 {
-    vin = other.vin;
     strProposalName = other.strProposalName;
     strURL = other.strURL;
     nBlockStart = other.nBlockStart;
@@ -1102,6 +971,8 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
     address = other.address;
     nAmount = other.nAmount;
     nTime = other.nTime;
+    nFeeTXHash = other.nFeeTXHash;
+    mapVotes = other.mapVotes;
 }
 
 bool CBudgetProposal::IsValid(std::string& strError)
@@ -1252,31 +1123,28 @@ int CBudgetProposal::GetRemainingPaymentCount()
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast()
 {
-    vin = CTxIn();
     strProposalName = "unknown";
     strURL = "";
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
     nTime = 0;
-    fInvalid = false;
+    nFeeTXHash = 0;
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
 {
-    vin = other.vin;
     strProposalName = other.strProposalName;
     strURL = other.strURL;
     nBlockStart = other.nBlockStart;
     nBlockEnd = other.nBlockEnd;
     address = other.address;
     nAmount = other.nAmount;
-    fInvalid = false;
+    nFeeTXHash = other.nFeeTXHash;
 }
 
-CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn)
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn)
 {
-    vin = vinIn;
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
 
@@ -1289,26 +1157,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(CTxIn vinIn, std::string strP
     address = addressIn;
     nAmount = nAmountIn;
 
-    fInvalid = false;
-}
-
-bool CBudgetProposalBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
-{
-    // Choose coins to use
-    CPubKey pubKeyCollateralAddress;
-    CKey keyCollateralAddress;
-
-    std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +
-        boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
-
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
-
-    return true;
+    nFeeTXHash = nFeeTXHashIn;
 }
 
 void CBudgetProposalBroadcast::Relay()
@@ -1317,29 +1166,6 @@ void CBudgetProposalBroadcast::Relay()
     RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
-bool CBudgetProposalBroadcast::SignatureValid()
-{
-    std::string errorMessage;
-
-    std::string strMessage = vin.prevout.ToStringShort() + strProposalName + strURL +  boost::lexical_cast<std::string>(nBlockStart) +
-        boost::lexical_cast<std::string>(nBlockEnd) + address.ToString() + boost::lexical_cast<std::string>(nAmount);
-
-    CMasternode* pmn = mnodeman.Find(vin);
-
-    if(pmn == NULL)
-    {
-        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CBudgetProposalBroadcast::SignatureValid() - Verify message failed\n");
-        return false;
-    }
-
-    return true;
-}
-
 CBudgetVote::CBudgetVote()
 {
     vin = CTxIn();
@@ -1403,21 +1229,21 @@ bool CBudgetVote::SignatureValid()
 
 CFinalizedBudget::CFinalizedBudget()
 {
-    vin = CTxIn();
     strBudgetName = "";
     nBlockStart = 0;
     vecProposals.clear();
     mapVotes.clear();
+    nFeeTXHash = 0;
 }
 
 
 CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
 {
-    vin = other.vin;
     strBudgetName = other.strBudgetName;
     nBlockStart = other.nBlockStart;
     vecProposals = other.vecProposals;
     mapVotes = other.mapVotes;
+    nFeeTXHash = other.nFeeTXHash;
 }
 
 void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
@@ -1473,11 +1299,6 @@ void CFinalizedBudget::AutoCheck()
         }
 
     }
-    // Feature : Masternodes can delegate finalized budgets to a 3rd party simply by adding this option to the configuration
-    else if (strBudgetMode == vin.prevout.ToStringShort())
-    {
-        SubmitVote();
-    }
 }
 // If masternode voted for a proposal, but is now invalid -- remove the vote
 void CFinalizedBudget::CleanAndRemove()
@@ -1633,31 +1454,30 @@ void CFinalizedBudget::SubmitVote()
 
 CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
 {
-    vin = CTxIn();
     strBudgetName = "";
     nBlockStart = 0;
     vecProposals.clear();
     mapVotes.clear();
     vchSig.clear();
+    nFeeTXHash = 0;
 }
 
 CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(const CFinalizedBudget& other)
 {
-    vin = other.vin;
     strBudgetName = other.strBudgetName;
     nBlockStart = other.nBlockStart;
     BOOST_FOREACH(CTxBudgetPayment out, other.vecProposals) vecProposals.push_back(out);
     mapVotes = other.mapVotes;
+    nFeeTXHash = other.nFeeTXHash;
 }
 
-CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn)
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn, uint256 nFeeTXHashIn)
 {
-    vin = vinIn;
-    printf("%s\n", vin.ToString().c_str());
     strBudgetName = strBudgetNameIn;
     nBlockStart = nBlockStartIn;
     BOOST_FOREACH(CTxBudgetPayment out, vecProposalsIn) vecProposals.push_back(out);
     mapVotes.clear();
+    nFeeTXHash = nFeeTXHashIn;
 }
 
 void CFinalizedBudgetBroadcast::Relay()
@@ -1666,48 +1486,6 @@ void CFinalizedBudgetBroadcast::Relay()
     RelayInv(inv, MIN_BUDGET_PEER_PROTO_VERSION);
 }
 
-bool CFinalizedBudgetBroadcast::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
-{
-    // Choose coins to use
-    CPubKey pubKeyCollateralAddress;
-    CKey keyCollateralAddress;
-
-    std::string errorMessage;
-    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
-
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
-
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
-
-    return true;
-}
-
-bool CFinalizedBudgetBroadcast::SignatureValid()
-{
-    std::string errorMessage;
-
-    std::string strMessage = vin.prevout.ToStringShort() + strBudgetName + boost::lexical_cast<std::string>(nBlockStart);
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals) strMessage += payment.nProposalHash.ToString().c_str();
-
-    CMasternode* pmn = mnodeman.Find(vin);
-
-    if(pmn == NULL)
-    {
-        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Unknown Masternode\n");
-        return false;
-    }
-
-    if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CFinalizedBudgetBroadcast::SignatureValid() - Verify message failed\n");
-        return false;
-    }
-
-    return true;
-}
-
 CFinalizedBudgetVote::CFinalizedBudgetVote()
 {
     vin = CTxIn();
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 026d9f1054d0..40d95f518966 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -13,7 +13,7 @@
 #include "base58.h"
 #include "masternode.h"
 #include <boost/lexical_cast.hpp>
-
+#include "init.h"
 
 using namespace std;
 
@@ -29,7 +29,8 @@ class CTxBudgetPayment;
 #define VOTE_ABSTAIN  0
 #define VOTE_YES      1
 #define VOTE_NO       2
-#define VOTE_PROP_INC       15 //how many "votes" to count for a new proposal
+
+static const int64_t BUDGET_FEE_TX = (0.5*COIN);
 
 extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
 extern std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
@@ -42,6 +43,9 @@ void DumpBudgets();
 //Amount of blocks in a months period of time (using 2.6 minutes per)
 int GetBudgetPaymentCycleBlocks();
 
+//Check the collateral transaction for the budget proposal/finalized budget
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, std::string& strError);
+
 /** Save Budget Manager (budget.dat)
  */
 class CBudgetDB
@@ -114,10 +118,6 @@ class CBudgetManager
     std::string GetRequiredPaymentsString(int64_t nBlockHeight);
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
-    //Have masternodes resign proposals with masternodes that have went inactive
-    void ResignInvalidProposals();
-    void CheckSignatureValidity();
-
     void CheckOrphanVotes();
     void Clear(){
         LogPrintf("Budget object cleared\n");
@@ -185,10 +185,10 @@ class CFinalizedBudget
 
 public:
     std::string strBudgetName;
-    CTxIn vin;
     int nBlockStart;
     std::vector<CTxBudgetPayment> vecProposals;
     map<uint256, CFinalizedBudgetVote> mapVotes;
+    uint256 nFeeTXHash;
 
     CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
@@ -204,7 +204,6 @@ class CFinalizedBudget
     std::string GetProposals();
     int GetBlockStart() {return nBlockStart;}
     int GetBlockEnd() {return nBlockStart + (int)(vecProposals.size()-1);}
-    std::string GetSubmittedBy() {return vin.prevout.ToStringShort();}
     int GetVoteCount() {return (int)mapVotes.size();}
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool GetProposalByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
@@ -236,13 +235,6 @@ class CFinalizedBudget
     string GetStatus();
 
     uint256 GetHash(){
-        /*
-            vin is not included on purpose
-                - Any masternode can make a proposal and the hashes should match regardless of who made it.
-                - Someone could hyjack a new proposal by changing the vin and the signature check will fail.
-                  However, the network will still propagate the correct version and the incorrect one will be rejected.
-        */
-
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strBudgetName;
         ss << nBlockStart;
@@ -258,7 +250,7 @@ class CFinalizedBudget
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(LIMITED_STRING(strBudgetName, 20));
-        READWRITE(vin);
+        READWRITE(nFeeTXHash);
         READWRITE(nBlockStart);
         READWRITE(vecProposals);
 
@@ -273,13 +265,10 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
     std::vector<unsigned char> vchSig;
 
 public:
-    bool fInvalid;
     CFinalizedBudgetBroadcast();
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
-    CFinalizedBudgetBroadcast(CTxIn& vinIn, std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn);
+    CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn, uint256 nFeeTXHashIn);
 
-    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool SignatureValid();
     void Relay();
 
     ADD_SERIALIZE_METHODS;
@@ -289,10 +278,9 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         //for syncing with other clients
         READWRITE(LIMITED_STRING(strBudgetName, 20));
-        READWRITE(vin);
         READWRITE(nBlockStart);
         READWRITE(vecProposals);
-        READWRITE(vchSig);
+        READWRITE(nFeeTXHash);
     }
 };
 
@@ -354,19 +342,19 @@ class CBudgetProposal
         This allows the proposal website to stay 100% decentralized
     */
     std::string strURL;
-    CTxIn vin;
     int nBlockStart;
     int nBlockEnd;
     int64_t nAmount;
     CScript address;
     int64_t nTime;
+    uint256 nFeeTXHash;
 
     map<uint256, CBudgetVote> mapVotes;
     //cache object
 
     CBudgetProposal();
     CBudgetProposal(const CBudgetProposal& other);
-    CBudgetProposal(CTxIn vinIn, std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn);
+    CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
 
     void Calculate();
     void AddOrUpdateVote(CBudgetVote& vote);
@@ -394,34 +382,9 @@ class CBudgetProposal
     void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
     int64_t GetAllotted() {return nAlloted;}
 
-    std::string GetVoteCommand()
-    {
-        //c4 mnbudget vote one http://www.one.com/one.json 100 1000 xx9FwiqeRbuxBn5Sh3SNeoxmgpwQNSuMC4 1000 yes
-
-        int nPayments = GetTotalPaymentCount();
-
-        CTxDestination address1;
-        ExtractDestination(address, address1);
-        CBitcoinAddress address2(address1);
-
-
-        std::string strCommand = "dash-cli mnbudget vote " + strProposalName + " " + strURL + " " + boost::lexical_cast<std::string>(nPayments);
-        strCommand += " " + boost::lexical_cast<std::string>(nBlockStart) + " " + address2.ToString() + " " + boost::lexical_cast<std::string>(nAmount/COIN) + " yes|no";
-
-        return strCommand;
-    }
-
-
     void CleanAndRemove();
 
     uint256 GetHash(){
-        /*
-            vin is not included on purpose
-                - Any masternode can make a proposal and the hashes should match regardless of who made it.
-                - Someone could hyjack a new proposal by changing the vin and the signature check will fail.
-                  However, the network will still propagate the correct version and the incorrect one will be rejected.
-        */
-
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strProposalName;
         ss << strURL;
@@ -441,12 +404,12 @@ class CBudgetProposal
         //for syncing with other clients
         READWRITE(LIMITED_STRING(strProposalName, 20));
         READWRITE(LIMITED_STRING(strURL, 64));
-        READWRITE(vin);
         READWRITE(nBlockStart);
         READWRITE(nBlockEnd);
         READWRITE(nAmount);
         READWRITE(address);
         READWRITE(nTime);
+        READWRITE(nFeeTXHash);
 
         //for saving to the serialized db
         READWRITE(mapVotes);
@@ -460,13 +423,10 @@ class CBudgetProposalBroadcast : public CBudgetProposal
     std::vector<unsigned char> vchSig;
 
 public:
-    bool fInvalid;
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
-    CBudgetProposalBroadcast(CTxIn vinIn, std::string strProposalNameIn, std::string strURL, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn);
+    CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn);
 
-    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool SignatureValid();
     void Relay();
 
     ADD_SERIALIZE_METHODS;
@@ -477,12 +437,11 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 
         READWRITE(LIMITED_STRING(strProposalName, 20));
         READWRITE(LIMITED_STRING(strURL, 64));
-        READWRITE(vin);
         READWRITE(nBlockStart);
         READWRITE(nBlockEnd);
         READWRITE(nAmount);
         READWRITE(address);
-        READWRITE(vchSig);
+        READWRITE(nFeeTXHash);
     }
 };
 
diff --git a/src/net.cpp b/src/net.cpp
index 41747e98adfe..0760c97f3833 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1797,7 +1797,7 @@ void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll)
         if(!relayToAll && !pnode->fRelayTxes)
             continue;
 
-        pnode->PushMessage("txlreq", tx);
+        pnode->PushMessage("ix", tx);
     }
 
 }
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 9287aaad93c1..e318954bc351 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -347,7 +347,7 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
 
         transaction.getRecipients();
 
-        if(!wallet->CommitTransaction(*newTx, *keyChange, (recipients[0].useInstantX) ? "txlreq" : "tx"))
+        if(!wallet->CommitTransaction(*newTx, *keyChange, (recipients[0].useInstantX) ? "ix" : "tx"))
             return TransactionCommitFailed;
 
         CTransaction* t = (CTransaction*)newTx;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 60ff1a6f3d77..00bb9c438648 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -25,11 +25,13 @@ Value mnbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "vote-many" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show" && strCommand != "projection" && strCommand != "check"))
+        (strCommand != "vote-many" && strCommand != "prepare" && strCommand != "submit" && strCommand != "vote" && strCommand != "getvotes" && strCommand != "getinfo" && strCommand != "show" && strCommand != "projection" && strCommand != "check"))
         throw runtime_error(
                 "mnbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
                 "\nAvailable commands:\n"
+                "  prepare            - Prepare proposal for network by signing and creating tx\n"
+                "  submit             - Submit proposal for network\n"
                 "  vote-many          - Vote on a Dash initiative\n"
                 "  vote-alias         - Vote on a Dash initiative\n"
                 "  vote               - Vote on a Dash initiative/budget\n"
@@ -40,7 +42,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 "  check              - Scan proposals and remove invalid\n"
                 );
 
-    if(strCommand == "vote-many")
+    if(strCommand == "prepare")
     {
         int nBlockMin = 0;
         CBlockIndex* pindexPrev = chainActive.Tip();
@@ -48,8 +50,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN'");
+        if (params.size() != 8 || params.size() != 9)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -69,7 +71,7 @@ Value mnbudget(const Array& params, bool fHelp)
         int nBlockStart = params[4].get_int();
         if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0){
             int nNext = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-            return "Invalid block start - must be a budget cycle block. Next Valid Block: " + boost::lexical_cast<std::string>(nNext);
+            return "Invalid block start - must be a budget cycle block. Next valid block: " + boost::lexical_cast<std::string>(nNext);
         }
 
         int nBlockEnd = nBlockStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount);
@@ -95,58 +97,39 @@ Value mnbudget(const Array& params, bool fHelp)
         if(strVote == "yes") nVote = VOTE_YES;
         if(strVote == "no") nVote = VOTE_NO;
 
-        int success = 0;
-        int failed = 0;
-
-        Object resultObj;
-
-        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-            std::string errorMessage;
-            std::vector<unsigned char> vchMasterNodeSignature;
-            std::string strMasterNodeSignMessage;
+        CPubKey pubKeyMasternode;
+        CKey keyMasternode;
+        std::string errorMessage;
 
-            CPubKey pubKeyCollateralAddress;
-            CKey keyCollateralAddress;
-            CPubKey pubKeyMasternode;
-            CKey keyMasternode;
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+            return(" Error upon calling SetKey");
 
-            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
-                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
+        //*************************************************************************
 
-            CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
-            if(pmn == NULL)
-            {
-                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
-                failed++;
-                continue;
-            }
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
+        std::string strCommand = "tx";
+        bool useIX = true;
+        if (params.size() > 8)
+            useIX = params[8].get_bool();
 
-            //create the proposal incase we're the first to make it
-            CBudgetProposalBroadcast budgetProposalBroadcast(pmn->vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
-            if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-                return "Failure to sign.";
-            }
-            mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
-            budgetProposalBroadcast.Relay();
+        if(useIX)
+        {
+            strCommand = "ix";
+        }
 
-            CBudgetVote vote(pmn->vin, budgetProposalBroadcast.GetHash(), nVote);
-            if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-                return "Failure to sign.";
-            }
+        CWalletTx wtx;
+        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
 
-            mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-            vote.Relay();
+        // make our change address
+        CReserveKey reservekey(pwalletMain);
+        //send the tx to the network
+        pwalletMain->CommitTransaction(wtx, reservekey, strCommand);
 
-            success++;
-        }
+        return wtx.GetHash().ToString().c_str();
 
-        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
     }
 
-    if(strCommand == "vote")
+    if(strCommand == "submit")
     {
         int nBlockMin = 0;
         CBlockIndex* pindexPrev = chainActive.Tip();
@@ -154,8 +137,11 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN'");
+        if (params.size() != 9)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX'");
+
+        // Check these inputs the same way we check the vote commands:
+        // **********************************************************
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -208,17 +194,109 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
+        uint256 hash = ParseHashV(params[8], "parameter 1");
+
         //create the proposal incase we're the first to make it
-        CBudgetProposalBroadcast budgetProposalBroadcast(activeMasternode.vin, strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart);
-        if(!budgetProposalBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-            return "Failure to sign.";
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
+
+        std::string strError = "";
+        if(!IsBudgetCollateralValid(hash ,strError)){
+            return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
+        }
+
+        if(!budgetProposalBroadcast.IsValid(strError)){
+            return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
         }
 
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
         budgetProposalBroadcast.Relay();
-        budget.AddProposal(budgetProposalBroadcast);
 
-        CBudgetVote vote(activeMasternode.vin, budgetProposalBroadcast.GetHash(), nVote);
+
+    }
+
+    if(strCommand == "vote-many")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 3)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH YES|NO|ABSTAIN'");
+
+        uint256 hash = ParseHashV(params[1], "parameter 1");
+        std::string strVote = params[2].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
+
+        int success = 0;
+        int failed = 0;
+
+        Object resultObj;
+
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            std::string errorMessage;
+            std::vector<unsigned char> vchMasterNodeSignature;
+            std::string strMasterNodeSignMessage;
+
+            CPubKey pubKeyCollateralAddress;
+            CKey keyCollateralAddress;
+            CPubKey pubKeyMasternode;
+            CKey keyMasternode;
+
+            if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
+                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }
+
+            CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
+            if(pmn == NULL)
+            {
+                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
+                failed++;
+                continue;
+            }
+
+            CBudgetVote vote(pmn->vin, hash, nVote);
+            if(!vote.Sign(keyMasternode, pubKeyMasternode)){
+                return "Failure to sign.";
+            }
+
+            mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            vote.Relay();
+
+            success++;
+        }
+
+        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
+    }
+
+    if(strCommand == "vote")
+    {
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
+
+        if (params.size() != 3)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN'");
+
+        uint256 hash = ParseHashV(params[1], "parameter 1");
+        std::string strVote = params[2].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
+
+        CPubKey pubKeyMasternode;
+        CKey keyMasternode;
+        std::string errorMessage;
+
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
+            return(" Error upon calling SetKey");
+
+        CBudgetVote vote(activeMasternode.vin, hash, nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
         }
@@ -226,7 +304,6 @@ Value mnbudget(const Array& params, bool fHelp)
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateProposal(vote, NULL);
-
     }
 
     if(strCommand == "projection")
@@ -244,7 +321,6 @@ Value mnbudget(const Array& params, bool fHelp)
             CBitcoinAddress address2(address1);
 
             Object bObj;
-            bObj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
             bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
             bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
@@ -261,11 +337,6 @@ Value mnbudget(const Array& params, bool fHelp)
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-            bObj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
-
-            if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
-                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
-            }
 
             resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }
@@ -288,7 +359,6 @@ Value mnbudget(const Array& params, bool fHelp)
             CBitcoinAddress address2(address1);
 
             Object bObj;
-            bObj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
             bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
             bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
@@ -304,11 +374,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-            bObj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
 
-            if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
-                bObj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
-            }
 
             resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }
@@ -332,7 +398,6 @@ Value mnbudget(const Array& params, bool fHelp)
         CBitcoinAddress address2(address1);
 
         Object obj;
-        obj.push_back(Pair("VoteCommand",  pbudgetProposal->GetVoteCommand().c_str()));
         obj.push_back(Pair("Name",  pbudgetProposal->GetName().c_str()));
         obj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
         obj.push_back(Pair("URL",  pbudgetProposal->GetURL().c_str()));
@@ -349,12 +414,6 @@ Value mnbudget(const Array& params, bool fHelp)
 
         std::string strError = "";
         obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-        obj.push_back(Pair("Owner",  pbudgetProposal->vin.prevout.ToStringShort().c_str()));
-
-        if(mapSeenMasternodeBudgetProposals.count(pbudgetProposal->GetHash())) {
-            obj.push_back(Pair("SignatureValid",  mapSeenMasternodeBudgetProposals[pbudgetProposal->GetHash()].SignatureValid()));
-        }
-
 
         return obj;
     }
@@ -452,11 +511,11 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
+        //create transaction
+        uint256 hash = 0;
+
         //create the proposal incase we're the first to make it
-        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(activeMasternode.vin, strBudgetName, nBlockStart, vecPayments);
-        if(!finalizedBudgetBroadcast.Sign(keyMasternode, pubKeyMasternode)){
-            return "Failure to sign.";
-        }
+        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecPayments, hash);
 
         if(!finalizedBudgetBroadcast.IsValid())
             return "Invalid finalized budget broadcast (are all the hashes correct?)";
@@ -573,11 +632,11 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         BOOST_FOREACH(CFinalizedBudget* finalizedBudget, winningFbs)
         {
             Object bObj;
-            bObj.push_back(Pair("SubmittedBy",  finalizedBudget->GetSubmittedBy().c_str()));
+            bObj.push_back(Pair("FeeTX",  finalizedBudget->nFeeTXHash.ToString().c_str()));
             bObj.push_back(Pair("Hash",  finalizedBudget->GetHash().ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)finalizedBudget->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)finalizedBudget->GetBlockEnd()));
-            bObj.push_back(Pair("finalizedBudgetosals",  finalizedBudget->GetProposals().c_str()));
+            bObj.push_back(Pair("Proposals",  finalizedBudget->GetProposals().c_str()));
             bObj.push_back(Pair("VoteCount",  (int64_t)finalizedBudget->GetVoteCount()));
             bObj.push_back(Pair("Status",  finalizedBudget->GetStatus().c_str()));
             resultObj.push_back(Pair(finalizedBudget->GetName().c_str(), bObj));
diff --git a/src/version.h b/src/version.h
index 8ba82f8869e3..49764b551982 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70085;
+static const int PROTOCOL_VERSION = 70086;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70085;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70086;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70085;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70086;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70085;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70086;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3e5bb93d623e..881c1a5ff6b2 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -10,6 +10,7 @@
 #include "checkpoints.h"
 #include "coincontrol.h"
 #include "net.h"
+#include "masternode-budget.h"
 #include "darksend.h"
 #include "keepass.h"
 #include "instantx.h"
@@ -1086,7 +1087,7 @@ void CWalletTx::RelayWalletTransaction(std::string strCommand)
             uint256 hash = GetHash();
             LogPrintf("Relaying wtx %s\n", hash.ToString());
 
-            if(strCommand == "txlreq"){
+            if(strCommand == "ix"){
                 mapTxLockReq.insert(make_pair(hash, (CTransaction)*this));
                 CreateNewLock(((CTransaction)*this));
                 RelayTransactionLockReq((CTransaction)*this, true);
@@ -1927,7 +1928,7 @@ bool CWallet::SelectCoinsWithoutDenomination(int64_t nTargetValue, set<pair<cons
     return (nValueRet >= nTargetValue);
 }
 
-bool CWallet::CreateCollateralTransaction(CMutableTransaction& txCollateral, std::string strReason)
+bool CWallet::CreateCollateralTransaction(CMutableTransaction& txCollateral, std::string& strReason)
 {
     /*
         To doublespend a collateral transaction, it will require a fee higher than this. So there's
@@ -1979,6 +1980,30 @@ bool CWallet::CreateCollateralTransaction(CMutableTransaction& txCollateral, std
     return true;
 }
 
+bool CWallet::GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX)
+{
+    // make our change address
+    CReserveKey reservekey(pwalletMain);
+
+    CScript scriptChange;
+    scriptChange << OP_RETURN << ToByteVector(hash);
+
+    int64_t nFeeRet = 0;
+    std::string strFail = "";
+    vector< pair<CScript, int64_t> > vecSend;
+    vecSend.push_back(make_pair(scriptChange, CENT));
+
+    CCoinControl *coinControl=NULL;
+    bool success = CreateTransaction(vecSend, tx, reservekey, nFeeRet, strFail, coinControl, ALL_COINS, useIX, (CAmount)BUDGET_FEE_TX);
+    if(!success){
+        LogPrintf("GetBudgetSystemCollateralTX: Error - %s\n", strFail.c_str());
+        return false;
+    }
+
+    return true;
+}
+
+
 bool CWallet::ConvertList(std::vector<CTxIn> vCoins, std::vector<int64_t>& vecAmounts)
 {
     BOOST_FOREACH(CTxIn i, vCoins){
@@ -1996,8 +2021,10 @@ bool CWallet::ConvertList(std::vector<CTxIn> vCoins, std::vector<int64_t>& vecAm
 }
 
 bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX)
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nPayFee)
 {
+    if(useIX && nPayFee < CENT) nPayFee = CENT;
+
     CAmount nValue = 0;
     CAmount nFeeDelta = 0;
     BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
@@ -2023,7 +2050,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
         LOCK2(cs_main, cs_wallet);
         {
             nFeeRet = 0;
-            if(useIX) nFeeRet = CENT;
+            if(nPayFee!=0) nFeeRet = nPayFee;
             while (true)
             {
                 txNew.vin.clear();
@@ -2206,11 +2233,11 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
 }
 
 bool CWallet::CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX)
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nPayFee)
 {
     vector< pair<CScript, CAmount> > vecSend;
     vecSend.push_back(make_pair(scriptPubKey, nValue));
-    return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl, coin_type, useIX);
+    return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl, coin_type, useIX, nPayFee);
 }
 
 /**
diff --git a/src/wallet.h b/src/wallet.h
index f0ac8f4db003..473a7f4f9159 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -319,13 +319,13 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     CAmount GetUnconfirmedWatchOnlyBalance() const;
     CAmount GetImmatureWatchOnlyBalance() const;
     bool CreateTransaction(const std::vector<std::pair<CScript, CAmount> >& vecSend,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false);
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nPayFee=0);
     bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false);
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nPayFee=0);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand="tx");
     std::string PrepareDarksendDenominate(int minRounds, int maxRounds);
     int GenerateDarksendOutputs(int nTotalValue, std::vector<CTxOut>& vout);
-    bool CreateCollateralTransaction(CMutableTransaction &txCollateral, std::string strReason);
+    bool CreateCollateralTransaction(CMutableTransaction& txCollateral, std::string& strReason);
     bool ConvertList(std::vector<CTxIn> vCoins, std::vector<int64_t>& vecAmounts);
 
     static CFeeRate minTxFee;
@@ -345,6 +345,8 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
+    bool GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX);
+
     bool IsDenominated(const CTxIn &txin) const;
 
     bool IsDenominated(const CTransaction& tx) const

From 640e72148750f417a4009627f9fa869c3c0589af Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 11 Jul 2015 16:17:03 -0700
Subject: [PATCH 1535/1819] fixed spork show

---
 src/spork.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spork.h b/src/spork.h
index 1e7e1bd6baa3..667bf935d2bb 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -24,7 +24,7 @@ using namespace boost;
     - This would result in old clients getting confused about which spork is for what
 */
 #define SPORK_START                                           10001
-#define SPORK_END                                             10009
+#define SPORK_END                                             10010
 
 #define SPORK_2_INSTANTX                                      10001
 #define SPORK_3_INSTANTX_BLOCK_FILTERING                      10002

From 2dbf8290f7bc7bbae566ff0e2dd8b50bb15c67bd Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 12 Jul 2015 09:09:51 +0300
Subject: [PATCH 1536/1819] Few fixes for mnbudget rpc - do not ask for vote on
 prepare and submit - fix bug found by @thelazier - fix command descriptions
 to avoid confusions - tiny refactoring for tx/ix

---
 src/rpcmasternode-budget.cpp | 38 ++++++++++--------------------------
 1 file changed, 10 insertions(+), 28 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 00bb9c438648..0bc870839188 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -50,8 +50,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8 || params.size() != 9)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]'");
+        if (params.size() != 7 && params.size() != 8)
+            throw runtime_error("Correct usage of prepare is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT [USE_IX(true|false)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -90,12 +90,6 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
-        std::string strVote = params[7].get_str().c_str();
-
-        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
-        int nVote = VOTE_ABSTAIN;
-        if(strVote == "yes") nVote = VOTE_YES;
-        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -107,18 +101,12 @@ Value mnbudget(const Array& params, bool fHelp)
         //*************************************************************************
 
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
-        std::string strCommand = "tx";
-        bool useIX = true;
-        if (params.size() > 8)
-            useIX = params[8].get_bool();
 
-        if(useIX)
-        {
-            strCommand = "ix";
-        }
+        bool useIX = true;
+        if (params.size() > 7) useIX = params[7].get_bool();
 
         CWalletTx wtx;
-        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
+        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX ? "ix" : "tx");
 
         // make our change address
         CReserveKey reservekey(pwalletMain);
@@ -137,8 +125,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 9)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX'");
+        if (params.size() != 8)
+            throw runtime_error("Correct usage of submit is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT FEE_TX'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -180,12 +168,6 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
-        std::string strVote = params[7].get_str().c_str();
-
-        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
-        int nVote = VOTE_ABSTAIN;
-        if(strVote == "yes") nVote = VOTE_YES;
-        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -194,7 +176,7 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
-        uint256 hash = ParseHashV(params[8], "parameter 1");
+        uint256 hash = ParseHashV(params[7], "parameter 1");
 
         //create the proposal incase we're the first to make it
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
@@ -220,7 +202,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();
@@ -279,7 +261,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote is 'mnbudget vote PROPOSAL-HASH yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();

From 60358c28e225edf85abf4cb73edddcd77477e1ce Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 12 Jul 2015 12:57:59 +0200
Subject: [PATCH 1537/1819] Fix Darksend completion UI

---
 src/qt/res/css/drkblue.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index 84c49aa94735..7b618b47babe 100755
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -873,7 +873,7 @@ padding-right:5px;
 QWidget .QFrame#frameDarksend #formLayoutWidget .QProgressBar#darksendProgress { /* Darksend Completion */
 border: 1px solid #818181;
 border-radius: 1px;
-margin-right:35px;
+margin-right:43px;
 text-align: right;
 color:#818181;
 }

From a59c5d9eddfc46353290ed5d53fe48c14b28b349 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 07:45:58 -0700
Subject: [PATCH 1538/1819] fixed issues with rpc commands

---
 src/masternode-budget.cpp    | 10 +++++++++
 src/rpcmasternode-budget.cpp | 39 +++++++++++++++++++++++++++---------
 2 files changed, 39 insertions(+), 10 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 67d3213b9dc8..8e60686457b5 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -982,6 +982,16 @@ bool CBudgetProposal::IsValid(std::string& strError)
          return false;
     }
 
+    if(nBlockStart < 0) {
+        strError = "Invalid Proposal";
+        return false;
+    }
+
+    if(address == CScript()) {
+        strError = "Invalid Payment Address";
+        return false;
+    }
+
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 0bc870839188..a772314e29fa 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -50,8 +50,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 7 && params.size() != 8)
-            throw runtime_error("Correct usage of prepare is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT [USE_IX(true|false)]'");
+        if (params.size() != 8 && params.size() != 9)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -90,6 +90,12 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
+        std::string strVote = params[7].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -101,12 +107,18 @@ Value mnbudget(const Array& params, bool fHelp)
         //*************************************************************************
 
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
-
+        std::string strCommand = "tx";
         bool useIX = true;
-        if (params.size() > 7) useIX = params[7].get_bool();
+        if (params.size() > 8)
+            useIX = (params[8].get_str() == "true" ? true : false);
+
+        if(useIX)
+        {
+            strCommand = "ix";
+        }
 
         CWalletTx wtx;
-        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX ? "ix" : "tx");
+        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
 
         // make our change address
         CReserveKey reservekey(pwalletMain);
@@ -125,8 +137,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8)
-            throw runtime_error("Correct usage of submit is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT FEE_TX'");
+        if (params.size() != 9)
+            throw runtime_error("Correct usage of vote-many is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -168,6 +180,12 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
+        std::string strVote = params[7].get_str().c_str();
+
+        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
+        int nVote = VOTE_ABSTAIN;
+        if(strVote == "yes") nVote = VOTE_YES;
+        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -176,7 +194,7 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
-        uint256 hash = ParseHashV(params[7], "parameter 1");
+        uint256 hash = ParseHashV(params[8], "parameter 1");
 
         //create the proposal incase we're the first to make it
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
@@ -193,6 +211,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
         budgetProposalBroadcast.Relay();
 
+        return budgetProposalBroadcast.GetHash().ToString().c_str();
 
     }
 
@@ -202,7 +221,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH yes|no'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH YES|NO|ABSTAIN'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();
@@ -261,7 +280,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote is 'mnbudget vote PROPOSAL-HASH yes|no'");
+            throw runtime_error("Correct usage of vote is 'mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();

From 0a02fa00bb9ca0f31a55dd31e651da0627ce9bfc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 08:09:06 -0700
Subject: [PATCH 1539/1819] removed vote from prepare/submit and fixed some
 help strings

---
 .gitignore                   |  1 +
 src/rpcmasternode-budget.cpp | 30 +++++++++---------------------
 2 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/.gitignore b/.gitignore
index df212018ed80..7557ba990016 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 *.sublime-project
 *.sublime-workspace
 todo.txt
+reset-files.bash
 
 *.tar.gz
 
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index a772314e29fa..04b1fc8a78e6 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -50,8 +50,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8 && params.size() != 9)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget prepare PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN [USE_IX(TRUE|FALSE)]'");
+        if (params.size() != 7 && params.size() != 8)
+            throw runtime_error("Correct usage of prepare is 'mnbudget prepare proposal-name url payment_count block_start dash_address dash_amount [use_ix(true|false)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -90,12 +90,6 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
-        std::string strVote = params[7].get_str().c_str();
-
-        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
-        int nVote = VOTE_ABSTAIN;
-        if(strVote == "yes") nVote = VOTE_YES;
-        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -109,8 +103,8 @@ Value mnbudget(const Array& params, bool fHelp)
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
         std::string strCommand = "tx";
         bool useIX = true;
-        if (params.size() > 8)
-            useIX = (params[8].get_str() == "true" ? true : false);
+        if (params.size() > 7)
+            useIX = (params[7].get_str() == "true" ? true : false);
 
         if(useIX)
         {
@@ -137,8 +131,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 9)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget submit PROPOSAL-NAME URL PAYMENT_COUNT BLOCK_START DASH_ADDRESS DASH_AMOUNT YES|NO|ABSTAIN FEE_TX'");
+        if (params.size() != 8)
+            throw runtime_error("Correct usage of submit is 'mnbudget submit proposal-name url payment_count block_start dash_address dash_amount fee_tx'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -180,12 +174,6 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
 
         CAmount nAmount = AmountFromValue(params[6]);
-        std::string strVote = params[7].get_str().c_str();
-
-        if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
-        int nVote = VOTE_ABSTAIN;
-        if(strVote == "yes") nVote = VOTE_YES;
-        if(strVote == "no") nVote = VOTE_NO;
 
         CPubKey pubKeyMasternode;
         CKey keyMasternode;
@@ -194,7 +182,7 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return(" Error upon calling SetKey");
 
-        uint256 hash = ParseHashV(params[8], "parameter 1");
+        uint256 hash = ParseHashV(params[7], "parameter 1");
 
         //create the proposal incase we're the first to make it
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
@@ -221,7 +209,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many PROPOSAL-HASH YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many proposal-hash yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();
@@ -280,7 +268,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote is 'mnbudget vote PROPOSAL-HASH YES|NO|ABSTAIN'");
+            throw runtime_error("Correct usage of vote is 'mnbudget vote proposal-hash yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
         std::string strVote = params[2].get_str().c_str();

From 604914c15e3629b946872a82f05f5686dc2eae22 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 12 Jul 2015 18:00:48 +0200
Subject: [PATCH 1540/1819] De-selecting all transactions resets computed sum
 to 0 now.

---
 src/qt/transactionview.cpp | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index bbd37940f7e9..11b70c4fa351 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -472,14 +472,12 @@ void TransactionView::computeSum()
         return;
     QModelIndexList selection = transactionView->selectionModel()->selectedRows();
 
-    if(!selection.isEmpty()){
-        foreach (QModelIndex index, selection){
-            amount += index.data(TransactionTableModel::AmountRole).toLongLong();
-        }
-        QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
-        if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
-        emit trxAmount(strAmount);
+    foreach (QModelIndex index, selection){
+        amount += index.data(TransactionTableModel::AmountRole).toLongLong();
     }
+    QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
+    if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
+    emit trxAmount(strAmount);
 }
 
 void TransactionView::openThirdPartyTxUrl(QString url)

From e7b00b8b7e76217beac07f640c77a670428a4890 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 12 Jul 2015 19:18:03 +0300
Subject: [PATCH 1541/1819] calculate ds progress from 3 parts

---
 src/qt/overviewpage.cpp | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index e1cbe9b5dcef..6fdc4be4933e 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -359,26 +359,31 @@ void OverviewPage::updateDarksendProgress()
     // progress of denominating
     float denomPart = 0;
     // mixing progress of denominated balance
-    float anonPart = 0;
+    float anonNormPart = 0;
+    // completeness of full amount anonimization
+    float anonFullPart = 0;
 
     int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance;
     denomPart = (float)denominatedBalance / nMaxToAnonymize;
     denomPart = denomPart > 1 ? 1 : denomPart;
 
-    anonPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
-    // if anonPart is > 1 then we are done, make denomPart equal 1 too
-    anonPart = anonPart > 1 ? (denomPart = 1, 1) : anonPart;
+    anonNormPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
+    anonNormPart = anonNormPart > 1 ? 1 : anonNormPart;
+
+    anonFullPart = (float)pwalletMain->GetAnonymizedBalance() / nMaxToAnonymize;
+    anonFullPart = anonFullPart > 1 ? 1 : anonFullPart;
 
     // apply some weights to them (sum should be <=100) and calculate the whole progress
     denomPart = ceilf((denomPart * 20) * 100) / 100;
-    anonPart = ceilf((anonPart * 80) * 100) / 100;
-    float progress = denomPart + anonPart;
+    anonNormPart = ceilf((anonNormPart * 50) * 100) / 100;
+    anonFullPart = ceilf((anonFullPart * 30) * 100) / 100;
+    float progress = denomPart + anonNormPart + anonFullPart;
     if(progress >= 100) progress = 100;
 
     ui->darksendProgress->setValue(progress);
 
-    QString strToolPip = tr("Progress: %1% (%2% + %3%; denominated inputs have %4 of %n rounds on average)", "", nDarksendRounds)
-            .arg(progress).arg(denomPart).arg(anonPart).arg(pwalletMain->GetAverageAnonymizedRounds());
+    QString strToolPip = tr("Progress: %1% (%2% + %3% + %4%; denominated inputs have %5 of %n rounds on average)", "", nDarksendRounds)
+            .arg(progress).arg(denomPart).arg(anonNormPart).arg(anonFullPart).arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
 }
 

From 0b3ef3c9fef278c59a098e265e09cef7d544c4e4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 10:34:21 -0700
Subject: [PATCH 1542/1819] Various fixes

- Proposal submitting now works properly
- Syncing proposals now works properly
- Finalized budgets are now created correctly
---
 src/darksend.cpp             | 13 ++++++++-----
 src/masternode-budget.cpp    | 31 ++++++++++++++++++-------------
 src/masternode-payments.cpp  | 11 +++++++----
 src/rpcmasternode-budget.cpp |  2 ++
 src/wallet.cpp               | 10 ++++++++++
 src/wallet.h                 |  1 +
 6 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 1e65c3c33241..0ba914370b8f 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2360,6 +2360,7 @@ void ThreadCheckDarkSendPool()
         if(c % 5 == 0 && RequestedMasternodeAssets <= 5){
             bool fIsInitialDownload = IsInitialBlockDownload();
             if(!fIsInitialDownload) {
+        
                 CBlockIndex* pindexPrev = chainActive.Tip();
                 if(pindexPrev != NULL) {
                     if(pindexPrev->nTime > GetAdjustedTime() - 60)
@@ -2368,11 +2369,13 @@ void ThreadCheckDarkSendPool()
                         LOCK(cs_vNodes);
                         BOOST_FOREACH(CNode* pnode, vNodes)
                         {
-                            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) {
-
-                                //keep track of who we've asked for the list
-                                if(pnode->HasFulfilledRequest("mnsync")) continue;
-                                pnode->FulfilledRequest("mnsync");
+                            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) {        
+                                bool IsLocal = pnode->addr.IsRFC1918() || pnode->addr.IsLocal();
+                                if(!IsLocal) {
+                                    //keep track of who we've asked for the list
+                                    if(pnode->HasFulfilledRequest("mnsync")) continue;
+                                    pnode->FulfilledRequest("mnsync");
+                                }
 
                                 //request full mn list only if Masternodes.dat was updated quite a long time ago
                                 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 8e60686457b5..0d201301466e 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -126,6 +126,7 @@ void CBudgetManager::SubmitFinalBudget()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
+
     int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
     if(nSubmittedFinalBudget >= nBlockStart) return;
     if(nBlockStart - pindexPrev->nHeight > 100) return;
@@ -155,26 +156,34 @@ void CBudgetManager::SubmitFinalBudget()
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
         LogPrintf("SubmitFinalBudget - Error upon calling SetKey\n");
+        return;
     }
 
+    CFinalizedBudgetBroadcast tempBudget(strBudgetName, nBlockStart, vecTxBudgetPayments, 0);
+
     //create fee tx
-    uint256 hash = 0;
+    CTransaction tx;
+    if(!pwalletMain->GetBudgetSystemCollateralTX(tx, tempBudget.GetHash(), true)){
+        LogPrintf("SubmitFinalBudget - Can't make collateral transaction\n");
+        return;
+    }
 
     //create the proposal incase we're the first to make it
-    CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecTxBudgetPayments, hash);
+    CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecTxBudgetPayments, tx.GetHash());
 
     if(!finalizedBudgetBroadcast.IsValid()){
         LogPrintf("SubmitFinalBudget - Invalid finalized budget broadcast (are all the hashes correct?)\n");
+        return;
     }
 
     mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
     finalizedBudgetBroadcast.Relay();
     budget.AddFinalizedBudget(finalizedBudgetBroadcast);
 
-
     CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
     if(!vote.Sign(keyMasternode, pubKeyMasternode)){
         LogPrintf("SubmitFinalBudget - Failure to sign.\n");
+        return;
     }
 
     mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
@@ -696,19 +705,19 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
+        uint256 nProp;
+        vRecv >> nProp;
+
         bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal();
-        if(!IsLocal){
+        if(!IsLocal && nProp == 0){
             if(pfrom->HasFulfilledRequest("mnvs")) {
                 LogPrintf("mnvs - peer already asked me for the list\n");
                 Misbehaving(pfrom->GetId(), 20);
                 return;
             }
+            pfrom->FulfilledRequest("mnvs");
         }
 
-        uint256 nProp;
-        vRecv >> nProp;
-
-        pfrom->FulfilledRequest("mnvs");
         budget.Sync(pfrom, nProp);
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString());
     }
@@ -735,8 +744,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        //delete if it exists and insert the new object
-        if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())) mapSeenMasternodeBudgetProposals.erase(budgetProposalBroadcast.GetHash());
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
@@ -797,8 +804,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        //delete if it exists and insert the new object
-        if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())) mapSeenFinalizedBudgets.erase(finalizedBudgetBroadcast.GetHash());
         mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
 
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
@@ -1398,7 +1403,7 @@ bool CFinalizedBudget::IsValid()
     if(vecProposals.size() > 100) return false;
     if(strBudgetName == "") return false;
     if(nBlockStart == 0) return false;
-
+    if(nFeeTXHash == 0) return false;
 
     //can only pay out 10% of the possible coins (min value of coins)
     if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 73f957aa5d67..31e9f5a6d72e 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -166,10 +166,13 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
     if (strCommand == "mnget") { //Masternode Payments Request Sync
         if(fLiteMode) return; //disable all Darksend/Masternode related functionality
 
-        if(pfrom->HasFulfilledRequest("mnget")) {
-            LogPrintf("mnget - peer already asked me for the list\n");
-            Misbehaving(pfrom->GetId(), 20);
-            return;
+        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal();
+        if(!IsLocal){
+            if(pfrom->HasFulfilledRequest("mnget")) {
+                LogPrintf("mnget - peer already asked me for the list\n");
+                Misbehaving(pfrom->GetId(), 20);
+                return;
+            }
         }
 
         pfrom->FulfilledRequest("mnget");
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 04b1fc8a78e6..c748b849fb35 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -198,6 +198,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
         budgetProposalBroadcast.Relay();
+        budget.AddProposal(budgetProposalBroadcast);
 
         return budgetProposalBroadcast.GetHash().ToString().c_str();
 
@@ -255,6 +256,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
             mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
+            budget.UpdateProposal(vote, NULL);
 
             success++;
         }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 881c1a5ff6b2..3a51f3fae128 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1980,6 +1980,16 @@ bool CWallet::CreateCollateralTransaction(CMutableTransaction& txCollateral, std
     return true;
 }
 
+bool CWallet::GetBudgetSystemCollateralTX(CTransaction& tx, uint256 hash, bool useIX)
+{
+    CWalletTx wtx;
+    if(GetBudgetSystemCollateralTX(wtx, hash, useIX)){
+        tx = (CTransaction)wtx;
+        return true;
+    }
+    return false;
+}
+
 bool CWallet::GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX)
 {
     // make our change address
diff --git a/src/wallet.h b/src/wallet.h
index 473a7f4f9159..fcd74c370075 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -345,6 +345,7 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     std::set<CTxDestination> GetAccountAddresses(std::string strAccount) const;
 
+    bool GetBudgetSystemCollateralTX(CTransaction& tx, uint256 hash, bool useIX);
     bool GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX);
 
     bool IsDenominated(const CTxIn &txin) const;

From 6b7ab34d309dd6b71edbff723ed8dcce46917784 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 10:38:32 -0700
Subject: [PATCH 1543/1819] Budget collateral changes

- Use OP_RETURN >> BudgetHash, with an output the size of BUDGET_FEE_TX. This will allow us to burn coins, that will be recreated and avoid hitting the "insane fee" checks
---
 src/wallet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 3a51f3fae128..754a2a938585 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2001,10 +2001,10 @@ bool CWallet::GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useI
     int64_t nFeeRet = 0;
     std::string strFail = "";
     vector< pair<CScript, int64_t> > vecSend;
-    vecSend.push_back(make_pair(scriptChange, CENT));
+    vecSend.push_back(make_pair(scriptChange, BUDGET_FEE_TX));
 
     CCoinControl *coinControl=NULL;
-    bool success = CreateTransaction(vecSend, tx, reservekey, nFeeRet, strFail, coinControl, ALL_COINS, useIX, (CAmount)BUDGET_FEE_TX);
+    bool success = CreateTransaction(vecSend, tx, reservekey, nFeeRet, strFail, coinControl, ALL_COINS, useIX, (CAmount)0);
     if(!success){
         LogPrintf("GetBudgetSystemCollateralTX: Error - %s\n", strFail.c_str());
         return false;

From 2885f9e6cad47f1a5adf805f84fb629706c8eba2 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 10:47:28 -0700
Subject: [PATCH 1544/1819] protocol bump / version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 6 +++---
 src/version.h       | 8 ++++----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0624ccbdeaef..a02803f28308 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 12)
+define(_CLIENT_VERSION_BUILD, 13)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 5ae4775b48a0..6bf7e3d1cf9c 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 12
+#define CLIENT_VERSION_BUILD 13
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index d9989a54d6ea..7b1a277596d5 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -17,8 +17,8 @@
     one party without comprimising the security of InstantX
     (1000/2150.0)**15 = 1.031e-05
 */
-#define INSTANTX_SIGNATURES_REQUIRED           15
-#define INSTANTX_SIGNATURES_TOTAL              20
+#define INSTANTX_SIGNATURES_REQUIRED           5
+#define INSTANTX_SIGNATURES_TOTAL              10
 
 using namespace std;
 using namespace boost;
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70086;
+static const int MIN_INSTANTX_PROTO_VERSION = 70087;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 49764b551982..b459af9774f5 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70086;
+static const int PROTOCOL_VERSION = 70087;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70086;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70087;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70086;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70087;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70086;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70087;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 3f19365d2a559b30b607436ad2c5e6d7198ff343 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 12 Jul 2015 20:04:52 +0200
Subject: [PATCH 1545/1819] Minor Coincontrol-Dialog enhancements

---
 src/qt/coincontroldialog.cpp      | 8 +++++---
 src/qt/forms/coincontroldialog.ui | 6 +++---
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index df357b22e403..ad6b3c7fded4 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -129,7 +129,7 @@ CoinControlDialog::CoinControlDialog(QWidget *parent) :
     ui->treeWidget->setColumnWidth(COLUMN_AMOUNT, 100);
     ui->treeWidget->setColumnWidth(COLUMN_LABEL, 170);
     ui->treeWidget->setColumnWidth(COLUMN_ADDRESS, 190);
-    ui->treeWidget->setColumnWidth(COLUMN_DARKSEND_ROUNDS, 120);
+    ui->treeWidget->setColumnWidth(COLUMN_DARKSEND_ROUNDS, 88);
     ui->treeWidget->setColumnWidth(COLUMN_DATE, 80);
     ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 100);
     ui->treeWidget->setColumnWidth(COLUMN_PRIORITY, 100);
@@ -778,6 +778,7 @@ void CoinControlDialog::updateView()
 
             // amount
             itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
+            itemOutput->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
             itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly
 
             // date
@@ -790,8 +791,8 @@ void CoinControlDialog::updateView()
             CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
             int rounds = GetInputDarksendRounds(vin);
 
-            if(rounds >= 0) itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString::number(rounds), 15, " "));
-            else itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString(tr("n/a")), 15, " "));
+            if(rounds >= 0) itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString::number(rounds), 11, " "));
+            else itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString(tr("n/a")), 11, " "));
 
 
             // confirmations
@@ -831,6 +832,7 @@ void CoinControlDialog::updateView()
             dPrioritySum = dPrioritySum / (nInputSum + 78);
             itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
             itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
+            itemWalletAddress->setToolTip(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
             itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
             itemWalletAddress->setText(COLUMN_PRIORITY, CoinControlDialog::getPriorityLabel(dPrioritySum, mempoolEstimatePriority));
             itemWalletAddress->setText(COLUMN_PRIORITY_INT64, strPad(QString::number((int64_t)dPrioritySum), 20, " "));
diff --git a/src/qt/forms/coincontroldialog.ui b/src/qt/forms/coincontroldialog.ui
index 90a0cffe71b5..c78a2d20a32c 100644
--- a/src/qt/forms/coincontroldialog.ui
+++ b/src/qt/forms/coincontroldialog.ui
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1000</width>
+    <width>954</width>
     <height>500</height>
    </rect>
   </property>
@@ -431,7 +431,7 @@
       <bool>false</bool>
      </property>
      <property name="columnCount">
-      <number>12</number>
+      <number>13</number>
      </property>
      <attribute name="headerShowSortIndicator" stdset="0">
       <bool>true</bool>
@@ -461,7 +461,7 @@
      </column>
      <column>
       <property name="text">
-       <string>Darksend Rounds</string>
+       <string>DS Rounds</string>
       </property>
      </column>
      <column>

From 9b170483b721952b8e904ff5531dcd403f8970fb Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 12 Jul 2015 20:23:38 +0200
Subject: [PATCH 1546/1819] Minor Options-Dialog enhancements

---
 src/qt/forms/optionsdialog.ui | 2 +-
 src/qt/forms/rpcconsole.ui    | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
 mode change 100755 => 100644 src/qt/forms/optionsdialog.ui
 mode change 100755 => 100644 src/qt/forms/rpcconsole.ui

diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
old mode 100755
new mode 100644
index 02cdb1c02963..fd01157628d8
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -225,7 +225,7 @@
           <item>
            <widget class="QCheckBox" name="spendZeroConfChange">
             <property name="toolTip">
-             <string>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.</string>
+             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you disable the spending of unconfirmed change, the change from a transaction&lt;/p&gt;&lt;p&gt;cannot be used until that transaction has at least one confirmation.&lt;/p&gt;&lt;p&gt;This also affects how your balance is computed.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
             </property>
             <property name="text">
              <string>&amp;Spend unconfirmed change</string>
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
old mode 100755
new mode 100644

From 304ab6c7ab8468330c30f471359326a71f7f0b3e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 14:02:39 -0700
Subject: [PATCH 1547/1819] Various improvements to the proposal system

- Proposal scripts are now checked correctly
- Fee transactions are created correctly for IX and non-IX types
---
 src/instantx.cpp             |  4 ++-
 src/masternode-budget.cpp    | 53 ++++++------------------------------
 src/masternode-budget.h      |  2 +-
 src/rpcmasternode-budget.cpp | 33 ++++++----------------
 src/script/script.cpp        |  1 -
 5 files changed, 22 insertions(+), 71 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index 6c0c6206df6f..33b2249aaa12 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -57,7 +57,9 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
         }
 
         BOOST_FOREACH(const CTxOut o, tx.vout){
-            if(!o.scriptPubKey.IsNormalPaymentScript()){
+            // IX supports normal scripts and unspendable scripts (used in DS collateral and Budget collateral).
+            // TODO: Look into other script types that are normal and can be included
+            if(!o.scriptPubKey.IsNormalPaymentScript() && !o.scriptPubKey.IsUnspendable()){
                 LogPrintf("ProcessMessageInstantX::ix - Invalid Script %s\n", tx.ToString().c_str());
                 return;
             }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 0d201301466e..c01d977dca2c 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -32,10 +32,8 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, std::string& strError)
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError)
 {
-    return true;
-
     CTransaction txCollateral;
     uint256 hash;
     if(!GetTransaction(nTxCollateralHash, txCollateral, hash, true)){
@@ -46,56 +44,23 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, std::string& strError)
     if(txCollateral.vout.size() < 1) return false;
     if(txCollateral.nLockTime != 0) return false;
 
-    int64_t nValueIn = 0;
-    int64_t nValueOut = 0;
-    bool missingTx = false;
+    CScript findScript;
+    findScript << OP_RETURN << ToByteVector(nExpectedHash);
 
+    bool foundOpReturn = false;
     BOOST_FOREACH(const CTxOut o, txCollateral.vout){
-        nValueOut += o.nValue;
-
-        if(!o.scriptPubKey.IsNormalPaymentScript()){
+        if(!o.scriptPubKey.IsNormalPaymentScript() && !o.scriptPubKey.IsUnspendable()){
             LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Invalid Script %s\n", txCollateral.ToString().c_str());
             return false;
         }
-    }
+        if(o.scriptPubKey == findScript && o.nValue >= BUDGET_FEE_TX) foundOpReturn = true;
 
-    bool foundOpReturn = false;
-    BOOST_FOREACH(const CTxIn i, txCollateral.vin){
-        CTransaction tx2;
-        uint256 hash;
-        if(GetTransaction(i.prevout.hash, tx2, hash, true)){
-            if(tx2.vout.size() > i.prevout.n) {
-                nValueIn += tx2.vout[i.prevout.n].nValue;
-            }
-        } else{
-            missingTx = true;
-        }
     }
-
     if(!foundOpReturn){
-
-    }
-
-    if(missingTx){
-        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString().c_str());
-        return false;
-    }
-
-    //collateral transactions are required to pay out BUDGET_FEE_TX as a fee to the miners
-    if(nValueIn - nValueOut < BUDGET_FEE_TX) {
-        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Couldn't find opReturn %s\n", txCollateral.ToString().c_str());
         return false;
     }
 
-    if(fDebug) LogPrintf("CBudgetProposalBroadcast::FeeTXValid %s\n", txCollateral.ToString().c_str());
-
-    CValidationState state;
-    if(!AcceptableInputs(mempool, state, txCollateral, true, NULL)){
-        if(fDebug) LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - didn't pass IsAcceptable\n");
-        return false;
-    }
-
-    return true;
     return true;
 }
 
@@ -734,7 +699,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         budgetProposalBroadcast.nTime = GetAdjustedTime();
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, strError)){
+        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError)){
             LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
             return;
         }
@@ -794,7 +759,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, strError)){
+        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, finalizedBudgetBroadcast.GetHash(), strError)){
             LogPrintf("Finalized Budget FeeTX is not valid - %s - %s\n", finalizedBudgetBroadcast.nFeeTXHash.ToString(), strError);
             return;
         }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 40d95f518966..d7690d727782 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -44,7 +44,7 @@ void DumpBudgets();
 int GetBudgetPaymentCycleBlocks();
 
 //Check the collateral transaction for the budget proposal/finalized budget
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, std::string& strError);
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError);
 
 /** Save Budget Manager (budget.dat)
  */
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index c748b849fb35..824f339c68d0 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -88,27 +88,21 @@ Value mnbudget(const Array& params, bool fHelp)
 
         // Parse Dash address
         CScript scriptPubKey = GetScriptForDestination(address.Get());
-
         CAmount nAmount = AmountFromValue(params[6]);
 
-        CPubKey pubKeyMasternode;
-        CKey keyMasternode;
-        std::string errorMessage;
-
-        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
-
         //*************************************************************************
 
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
-        std::string strCommand = "tx";
+        std::string cmd = "tx";
         bool useIX = true;
-        if (params.size() > 7)
+
+        if (params.size() > 7){
             useIX = (params[7].get_str() == "true" ? true : false);
+        }
 
         if(useIX)
         {
-            strCommand = "ix";
+            cmd = "ix";
         }
 
         CWalletTx wtx;
@@ -117,7 +111,7 @@ Value mnbudget(const Array& params, bool fHelp)
         // make our change address
         CReserveKey reservekey(pwalletMain);
         //send the tx to the network
-        pwalletMain->CommitTransaction(wtx, reservekey, strCommand);
+        pwalletMain->CommitTransaction(wtx, reservekey, cmd);
 
         return wtx.GetHash().ToString().c_str();
 
@@ -172,23 +166,14 @@ Value mnbudget(const Array& params, bool fHelp)
 
         // Parse Dash address
         CScript scriptPubKey = GetScriptForDestination(address.Get());
-
         CAmount nAmount = AmountFromValue(params[6]);
-
-        CPubKey pubKeyMasternode;
-        CKey keyMasternode;
-        std::string errorMessage;
-
-        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
-
         uint256 hash = ParseHashV(params[7], "parameter 1");
 
         //create the proposal incase we're the first to make it
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(hash ,strError)){
+        if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError)){
             return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
         }
 
@@ -500,7 +485,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         std::string errorMessage;
 
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
+            return("Masternode signing error, could not set key correctly");
 
         //create transaction
         uint256 hash = 0;
@@ -555,7 +540,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             CKey keyMasternode;
 
             if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
-                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
+                printf(" Masternode signing error, could not set key correctly %s\n", mne.getAlias().c_str());
                 failed++;
                 continue;
             }
diff --git a/src/script/script.cpp b/src/script/script.cpp
index 63ed9426953c..d283977e40bb 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -4,7 +4,6 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "script.h"
-
 #include "tinyformat.h"
 #include "utilstrencodings.h"
 

From acf09d1bc12f1bec2b287bfb0e44669c5e189076 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 16:37:55 -0700
Subject: [PATCH 1548/1819] Collateral is now checked for age

---
 src/main.cpp                 | 47 ++++++++++++------------
 src/main.h                   |  3 +-
 src/masternode-budget.cpp    | 36 +++++++++++++++----
 src/masternode-budget.h      |  4 +++
 src/rpcmasternode-budget.cpp | 69 ------------------------------------
 5 files changed, 57 insertions(+), 102 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 242ac72e3447..6ce01f07507a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -849,30 +849,6 @@ unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& in
     return nSigOps;
 }
 
-/*
-int GetInputAge(CTxIn& vin)
-{
-    // Fetch previous transactions (inputs):
-    CCoinsView viewDummy;
-    CCoinsViewCache view(viewDummy);
-    {
-        LOCK(mempool.cs);
-        CCoinsViewCache &viewChain = *pcoinsTip;
-        CCoinsViewMemPool viewMempool(viewChain, mempool);
-        view.SetBackend(viewMempool); // temporarily switch cache backend to db+mempool view
-
-        const uint256& prevHash = vin.prevout.hash;
-        CCoins coins;
-        view.GetCoins(prevHash, coins); // this is certainly allowed to fail
-        view.SetBackend(viewDummy); // switch back to avoid locking mempool for too long
-    }
-
-    if(!view.HaveCoins(vin.prevout.hash)) return -1;
-
-    const CCoins &coins = view.GetCoins(vin.prevout.hash);
-
-    return (chainActive.Tip()->nHeight+1) - coins.nHeight;
-}*/
 int GetInputAge(CTxIn& vin)
 {
     CCoinsView viewDummy;
@@ -883,13 +859,34 @@ int GetInputAge(CTxIn& vin)
         view.SetBackend(viewMempool); // temporarily switch cache backend to db+mempool view
 
         const CCoins* coins = view.AccessCoins(vin.prevout.hash);
-        if (coins)
+
+        if (coins){
+            if(coins->nHeight < 0) return 0;
             return (chainActive.Tip()->nHeight+1) - coins->nHeight;
+        }
         else
             return -1;
     }
 }
 
+int GetInputAgeIX(uint256 nTXHash, CTxIn& vin)
+{    
+    int sigs = 0;
+    int nResult = GetInputAge(vin);
+    if(nResult < 0) nResult = 0;
+
+    if (nResult < 6){
+        std::map<uint256, CTransactionLock>::iterator i = mapTxLocks.find(nTXHash);
+        if (i != mapTxLocks.end()){
+            sigs = (*i).second.CountSignatures();
+        }
+        if(sigs >= INSTANTX_SIGNATURES_REQUIRED){
+            return nInstantXDepth+nResult;
+        }
+    }
+
+    return -1;
+}
 
 bool CheckTransaction(const CTransaction& tx, CValidationState &state)
 {
diff --git a/src/main.h b/src/main.h
index 1326f15ee849..b56577eba46d 100644
--- a/src/main.h
+++ b/src/main.h
@@ -234,7 +234,8 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
                         bool* pfMissingInputs, bool fRejectInsaneFee=false, bool ignoreFees=false);
 
 int GetInputAge(CTxIn& vin);
-
+// get age + lock confirmations
+int GetInputAgeIX(uint256 nTXHash, CTxIn& vin);
 
 struct CNodeStateStats {
     int nMisbehavior;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index c01d977dca2c..aac549e52d3f 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -37,6 +37,7 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     CTransaction txCollateral;
     uint256 hash;
     if(!GetTransaction(nTxCollateralHash, txCollateral, hash, true)){
+        strError = "Can't find collateral tx %s\n", txCollateral.ToString().c_str();
         LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Can't find collateral tx %s\n", txCollateral.ToString().c_str());
         return false;
     }
@@ -50,14 +51,24 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     bool foundOpReturn = false;
     BOOST_FOREACH(const CTxOut o, txCollateral.vout){
         if(!o.scriptPubKey.IsNormalPaymentScript() && !o.scriptPubKey.IsUnspendable()){
-            LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Invalid Script %s\n", txCollateral.ToString().c_str());
+            strError = "Invalid Script";
+            LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Invalid Script %s\n", txCollateral.ToString());
             return false;
         }
         if(o.scriptPubKey == findScript && o.nValue >= BUDGET_FEE_TX) foundOpReturn = true;
 
     }
     if(!foundOpReturn){
-        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Couldn't find opReturn %s\n", txCollateral.ToString().c_str());
+        strError = "Couldn't find opReturn";
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Couldn't find opReturn %s\n", txCollateral.ToString());
+        return false;
+    }
+
+    CTxIn in(COutPoint(txCollateral.GetHash(), 0));
+    int conf = GetInputAgeIX(txCollateral.GetHash(), in);
+    if(conf < BUDGET_FEE_CONFIRMATIONS){
+        strError = "Collateral requires at least 6 confirmations - " + boost::lexical_cast<std::string>(conf) + " confirmations ";
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Collateral requires at least 6 confirmations - %s - %d confirmations\n", txCollateral.GetHash().ToString(), conf);
         return false;
     }
 
@@ -91,13 +102,11 @@ void CBudgetManager::SubmitFinalBudget()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
-
     int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
     if(nSubmittedFinalBudget >= nBlockStart) return;
     if(nBlockStart - pindexPrev->nHeight > 100) return;
 
     std::vector<CBudgetProposal*> vBudgetProposals = budget.GetBudget();
-
     std::string strBudgetName = "main";
     std::vector<CTxBudgetPayment> vecTxBudgetPayments;
 
@@ -113,7 +122,6 @@ void CBudgetManager::SubmitFinalBudget()
         LogPrintf("SubmitFinalBudget - Found No Proposals For Period\n");
         return;
     }
-    nSubmittedFinalBudget = nBlockStart;
 
     CPubKey pubKeyMasternode;
     CKey keyMasternode;
@@ -128,11 +136,25 @@ void CBudgetManager::SubmitFinalBudget()
 
     //create fee tx
     CTransaction tx;
-    if(!pwalletMain->GetBudgetSystemCollateralTX(tx, tempBudget.GetHash(), true)){
-        LogPrintf("SubmitFinalBudget - Can't make collateral transaction\n");
+    if(!mapCollateral.count(tempBudget.GetHash())){
+        if(!pwalletMain->GetBudgetSystemCollateralTX(tx, tempBudget.GetHash(), true)){
+            LogPrintf("SubmitFinalBudget - Can't make collateral transaction\n");
+            return;
+        }
+        mapCollateral.insert(make_pair(tempBudget.GetHash(), tx));
+    } else {
+        tx = mapCollateral[tempBudget.GetHash()];
+    }
+
+    CTxIn in(COutPoint(tx.GetHash(), 0));
+    int conf = GetInputAgeIX(tx.GetHash(), in);
+    if(conf < BUDGET_FEE_CONFIRMATIONS+1){
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Collateral requires at least 6 confirmations - %s - %d confirmations\n", tx.GetHash().ToString(), conf);
         return;
     }
 
+    nSubmittedFinalBudget = nBlockStart;
+
     //create the proposal incase we're the first to make it
     CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecTxBudgetPayments, tx.GetHash());
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index d7690d727782..7107360b1184 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -31,6 +31,7 @@ class CTxBudgetPayment;
 #define VOTE_NO       2
 
 static const int64_t BUDGET_FEE_TX = (0.5*COIN);
+static const int64_t BUDGET_FEE_CONFIRMATIONS = 6;
 
 extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
 extern std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
@@ -79,6 +80,9 @@ class CBudgetManager
     // critical section to protect the inner data structures
     mutable CCriticalSection cs;
 
+    //hold txes until they mature enough to use
+    map<uint256, CTransaction> mapCollateral;
+
 public:
     // keep track of the scanning errors I've seen
     map<uint256, CBudgetProposal> mapProposals;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 824f339c68d0..bcfb524a4646 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -439,80 +439,11 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 "mnbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
                 "\nAvailable commands:\n"
-                "  suggest     - Suggest a budget to be paid\n"
                 "  vote-many   - Vote on a finalized budget\n"
                 "  vote        - Vote on a finalized budget\n"
                 "  show        - Show existing finalized budgets\n"
                 );
 
-    if(strCommand == "suggest")
-    {
-        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
-        mnEntries = masternodeConfig.getEntries();
-
-        CBlockIndex* pindexPrev = chainActive.Tip();
-        if(!pindexPrev)
-            return "Must be synced to suggest";
-
-        if (params.size() < 3)
-            throw runtime_error("Correct usage of suggest is 'mnfinalbudget suggest BUDGET_NAME PROPNAME [PROP2 PROP3 PROP4]'");
-
-        std::string strBudgetName = params[1].get_str();
-        if(strBudgetName.size() > 20)
-            return "Invalid budget name, limit of 20 characters.";
-
-        int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-
-        std::vector<CTxBudgetPayment> vecPayments;
-        for(int i = 2; i < (int)params.size(); i++)
-        {
-            std::string strHash = params[i].get_str();
-            uint256 hash(strHash);
-            CBudgetProposal* pbudgetProposal = budget.FindProposal(hash);
-            if(!pbudgetProposal){
-                return "Invalid proposal " + strHash + ". Please check the proposal hash";
-            } else {
-                CTxBudgetPayment out;
-                out.nProposalHash = hash;
-                out.payee = pbudgetProposal->GetPayee();
-                out.nAmount = pbudgetProposal->GetAmount();
-                vecPayments.push_back(out);
-            }
-        }
-
-        CPubKey pubKeyMasternode;
-        CKey keyMasternode;
-        std::string errorMessage;
-
-        if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return("Masternode signing error, could not set key correctly");
-
-        //create transaction
-        uint256 hash = 0;
-
-        //create the proposal incase we're the first to make it
-        CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecPayments, hash);
-
-        if(!finalizedBudgetBroadcast.IsValid())
-            return "Invalid finalized budget broadcast (are all the hashes correct?)";
-
-        mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
-        finalizedBudgetBroadcast.Relay();
-        budget.AddFinalizedBudget(finalizedBudgetBroadcast);
-
-        CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
-        if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-            return "Failure to sign.";
-        }
-
-        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        vote.Relay();
-        budget.UpdateFinalizedBudget(vote, NULL);
-
-        return "success";
-
-    }
-
     if(strCommand == "vote-many")
     {
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;

From 40a14cb8027d9dab557d36816051712dd5b72e74 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 12 Jul 2015 16:39:37 -0700
Subject: [PATCH 1549/1819] version bump / proto bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 2 +-
 src/version.h       | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index a02803f28308..9327ad8aaf58 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 13)
+define(_CLIENT_VERSION_BUILD, 14)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 6bf7e3d1cf9c..f9df8bf9c470 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 13
+#define CLIENT_VERSION_BUILD 14
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 7b1a277596d5..ec78ca02d17c 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70087;
+static const int MIN_INSTANTX_PROTO_VERSION = 70088;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index b459af9774f5..09e19e7d6d28 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70087;
+static const int PROTOCOL_VERSION = 70088;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70087;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70088;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70087;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70088;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70087;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70088;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 6fa0d23714eaac4d26fed76e73007eaafb830fa3 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 13 Jul 2015 06:34:54 -0700
Subject: [PATCH 1550/1819] Commit collateral transaction correctly for
 finalized budget

---
 src/masternode-budget.cpp | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index aac549e52d3f..789af55ffc88 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -2,6 +2,9 @@
 // Distributed under the MIT/X11 software license, see the accompanying
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
+#include "main.h"
+#include "init.h"
+
 #include "masternode-budget.h"
 #include "masternode.h"
 #include "darksend.h"
@@ -137,11 +140,19 @@ void CBudgetManager::SubmitFinalBudget()
     //create fee tx
     CTransaction tx;
     if(!mapCollateral.count(tempBudget.GetHash())){
-        if(!pwalletMain->GetBudgetSystemCollateralTX(tx, tempBudget.GetHash(), true)){
+        CWalletTx wtx;
+        if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, tempBudget.GetHash(), true)){
             LogPrintf("SubmitFinalBudget - Can't make collateral transaction\n");
             return;
         }
-        mapCollateral.insert(make_pair(tempBudget.GetHash(), tx));
+        
+        // make our change address
+        CReserveKey reservekey(pwalletMain);
+        //send the tx to the network
+        pwalletMain->CommitTransaction(wtx, reservekey, "ix");
+
+        mapCollateral.insert(make_pair(tempBudget.GetHash(), (CTransaction)wtx));
+        tx = (CTransaction)wtx;
     } else {
         tx = mapCollateral[tempBudget.GetHash()];
     }

From bee69411950204732dc73b0a7d11325091d3cccc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 13 Jul 2015 20:03:08 -0700
Subject: [PATCH 1551/1819] Fixed Propagation Of Budgets / Proto Bump

---
 configure.ac              |  2 +-
 src/clientversion.h       |  2 +-
 src/darksend.cpp          |  2 +-
 src/instantx.h            |  2 +-
 src/main.cpp              | 16 ++++++++++++++++
 src/main.h                |  2 +-
 src/masternode-budget.cpp | 17 +++++++++++++----
 src/version.h             |  8 ++++----
 8 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9327ad8aaf58..8ba50a6baa0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 14)
+define(_CLIENT_VERSION_BUILD, 15)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index f9df8bf9c470..68d5ea3891a5 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 14
+#define CLIENT_VERSION_BUILD 15
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 0ba914370b8f..bf2fe8f432cc 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2363,7 +2363,7 @@ void ThreadCheckDarkSendPool()
         
                 CBlockIndex* pindexPrev = chainActive.Tip();
                 if(pindexPrev != NULL) {
-                    if(pindexPrev->nTime > GetAdjustedTime() - 60)
+                    if(pindexPrev->nTime > GetAdjustedTime() - 600)
                     {
 
                         LOCK(cs_vNodes);
diff --git a/src/instantx.h b/src/instantx.h
index ec78ca02d17c..9525089033d8 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70088;
+static const int MIN_INSTANTX_PROTO_VERSION = 70089;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/main.cpp b/src/main.cpp
index 6ce01f07507a..fba87a558a63 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -888,6 +888,22 @@ int GetInputAgeIX(uint256 nTXHash, CTxIn& vin)
     return -1;
 }
 
+int GetIXConfirmations(uint256 nTXHash)
+{    
+    int sigs = 0;
+
+    std::map<uint256, CTransactionLock>::iterator i = mapTxLocks.find(nTXHash);
+    if (i != mapTxLocks.end()){
+        sigs = (*i).second.CountSignatures();
+    }
+    if(sigs >= INSTANTX_SIGNATURES_REQUIRED){
+        return nInstantXDepth;
+    }
+
+    return 0;
+}
+
+
 bool CheckTransaction(const CTransaction& tx, CValidationState &state)
 {
     // Basic checks that don't depend on any context
diff --git a/src/main.h b/src/main.h
index b56577eba46d..78af04a9598b 100644
--- a/src/main.h
+++ b/src/main.h
@@ -234,8 +234,8 @@ bool AcceptableInputs(CTxMemPool& pool, CValidationState &state, const CTransact
                         bool* pfMissingInputs, bool fRejectInsaneFee=false, bool ignoreFees=false);
 
 int GetInputAge(CTxIn& vin);
-// get age + lock confirmations
 int GetInputAgeIX(uint256 nTXHash, CTxIn& vin);
+int GetIXConfirmations(uint256 nTXHash);
 
 struct CNodeStateStats {
     int nMisbehavior;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 789af55ffc88..38259b670438 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -38,8 +38,8 @@ int GetBudgetPaymentCycleBlocks(){
 bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError)
 {
     CTransaction txCollateral;
-    uint256 hash;
-    if(!GetTransaction(nTxCollateralHash, txCollateral, hash, true)){
+    uint256 nBlockHash;
+    if(!GetTransaction(nTxCollateralHash, txCollateral, nBlockHash, true)){
         strError = "Can't find collateral tx %s\n", txCollateral.ToString().c_str();
         LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Can't find collateral tx %s\n", txCollateral.ToString().c_str());
         return false;
@@ -67,8 +67,17 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
         return false;
     }
 
-    CTxIn in(COutPoint(txCollateral.GetHash(), 0));
-    int conf = GetInputAgeIX(txCollateral.GetHash(), in);
+    int conf = -1;
+    if (nBlockHash != 0) {
+        BlockMap::iterator mi = mapBlockIndex.find(nBlockHash);
+        if (mi != mapBlockIndex.end() && (*mi).second) {
+            CBlockIndex* pindex = (*mi).second;
+            if (chainActive.Contains(pindex)) {
+                conf =  GetIXConfirmations(nTxCollateralHash) + (1 + chainActive.Height() - pindex->nHeight);
+            }
+        }
+    }
+
     if(conf < BUDGET_FEE_CONFIRMATIONS){
         strError = "Collateral requires at least 6 confirmations - " + boost::lexical_cast<std::string>(conf) + " confirmations ";
         LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Collateral requires at least 6 confirmations - %s - %d confirmations\n", txCollateral.GetHash().ToString(), conf);
diff --git a/src/version.h b/src/version.h
index 09e19e7d6d28..ce54e24fdbb1 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70088;
+static const int PROTOCOL_VERSION = 70089;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70088;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70089;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70088;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70089;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70088;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70089;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 26fed436034179492f0c98e6aa61836b4e059767 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Jul 2015 08:25:07 +0300
Subject: [PATCH 1552/1819] Major masternode broadcast/ping changes
 (incompatible with prev version, proto bump required): - Do not rely on local
 lastTimeSeen and requested fRequested anymore. Use last know (signed) ping
 instead and base all logic on that. Should reduce mn list difference between 
 nodes. - Rework CActiveMasternode accordingly along with states,
 errorMessages, rpc etc. - Clean some related code, move parts from public to
 private - drop c_str in LogPrintf that were related to this functionality
 (todo: drop it for LogPrintf everywhere else)

---
 src/activemasternode.cpp | 161 ++++++++++++++++++----------------
 src/activemasternode.h   |  28 +++---
 src/darksend.cpp         |   2 -
 src/darksend.h           |   3 +
 src/main.cpp             |   4 -
 src/masternode.cpp       | 182 +++++++++++++++++++--------------------
 src/masternode.h         | 173 +++++++++++++++++++++----------------
 src/masternodeman.cpp    |  61 ++++++-------
 src/masternodeman.h      |   7 +-
 src/miner.cpp            |   1 -
 src/rpcmasternode.cpp    |  36 +++-----
 11 files changed, 336 insertions(+), 322 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 392c6747719a..6bf5d43f1d40 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -17,63 +17,64 @@ void CActiveMasternode::ManageStatus()
 
     if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n");
 
-    //need correct adjusted time to send ping
-    bool fIsInitialDownload = IsInitialBlockDownload();
-    if(fIsInitialDownload) {
+    //need correct blocks to send ping
+    if(IsInitialBlockDownload()) {
         status = MASTERNODE_SYNC_IN_PROCESS;
         LogPrintf("CActiveMasternode::ManageStatus() - Sync in progress. Must wait until sync is complete to start Masternode.\n");
         return;
     }
 
-    if(status == MASTERNODE_INPUT_TOO_NEW || status == MASTERNODE_NOT_CAPABLE || status == MASTERNODE_SYNC_IN_PROCESS){
-        status = MASTERNODE_NOT_PROCESSED;
+    if(status == MASTERNODE_INITIAL || status == MASTERNODE_SYNC_IN_PROCESS) {
+        CMasternode *pmn;
+        pmn = mnodeman.Find(pubKeyMasternode);
+        if(pmn != NULL) {
+            pmn->Check();
+            if(pmn->IsEnabled()) EnableHotColdMasterNode(pmn->vin, pmn->addr);
+        }
     }
 
-    if(status == MASTERNODE_NOT_PROCESSED) {
+    if(status != MASTERNODE_STARTED) {
+
+        // Set defaults
+        status = MASTERNODE_NOT_CAPABLE;
+        notCapableReason = "";
+
         if(strMasterNodeAddr.empty()) {
             if(!GetLocal(service)) {
                 notCapableReason = "Can't detect external address. Please use the Masternodeaddr configuration option.";
-                status = MASTERNODE_NOT_CAPABLE;
-                LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
+                LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
                 return;
             }
         } else {
             service = CService(strMasterNodeAddr);
         }
 
-        LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString().c_str());
+        LogPrintf("CActiveMasternode::ManageStatus() - Checking inbound connection to '%s'\n", service.ToString());
 
         if(Params().NetworkID() == CBaseChainParams::MAIN) {
             if(service.GetPort() != 9999) {
                 notCapableReason = "Invalid port: " + boost::lexical_cast<string>(service.GetPort()) + " - only 9999 is supported on mainnet.";
-                status = MASTERNODE_NOT_CAPABLE;
-                LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
+                LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
                 return;
             }
         } else if(service.GetPort() == 9999) {
             notCapableReason = "Invalid port: " + boost::lexical_cast<string>(service.GetPort()) + " - 9999 is only supported on mainnet.";
-            status = MASTERNODE_NOT_CAPABLE;
-            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
+            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
             return;
         }
 
         if(!ConnectNode((CAddress)service, service.ToString().c_str())){
             notCapableReason = "Could not connect to " + service.ToString();
-            status = MASTERNODE_NOT_CAPABLE;
-            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
+            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
             return;
         }
 
         if(pwalletMain->IsLocked()){
             notCapableReason = "Wallet is locked.";
-            status = MASTERNODE_NOT_CAPABLE;
-            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason.c_str());
+            LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
             return;
         }
 
-        // Set defaults
-        status = MASTERNODE_NOT_CAPABLE;
-        notCapableReason = "Unknown. Check debug.log for more information.";
 
         // Choose coins to use
         CPubKey pubKeyCollateralAddress;
@@ -84,16 +85,11 @@ void CActiveMasternode::ManageStatus()
             if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
                 notCapableReason = "Input must have least " + boost::lexical_cast<string>(MASTERNODE_MIN_CONFIRMATIONS) +
                         " confirmations - " + boost::lexical_cast<string>(GetInputAge(vin)) + " confirmations";
-                LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason.c_str());
+                LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
                 status = MASTERNODE_INPUT_TOO_NEW;
                 return;
             }
 
-            LogPrintf("CActiveMasternode::ManageStatus() - Is capable master node!\n");
-
-            status = MASTERNODE_IS_CAPABLE;
-            notCapableReason = "";
-
             pwalletMain->LockCoin(vin.prevout);
 
             // send to all nodes
@@ -102,31 +98,48 @@ void CActiveMasternode::ManageStatus()
 
             if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             {
-                LogPrintf("Register::ManageStatus() - Error upon calling SetKey: %s\n", errorMessage.c_str());
+                notCapableReason = "Error upon calling SetKey: " + errorMessage;
+                LogPrintf("Register::ManageStatus() - %s\n", notCapableReason);
                 return;
             }
 
             if(!Register(vin, service, keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage)) {
-                LogPrintf("CActiveMasternode::ManageStatus() - Error on Register: %s\n", errorMessage.c_str());
+                notCapableReason = "Error on Register: " + errorMessage;
+                LogPrintf("Register::ManageStatus() - %s\n", notCapableReason);
+                return;
             }
 
+            LogPrintf("CActiveMasternode::ManageStatus() - Is capable master node!\n");
+            status = MASTERNODE_STARTED;
+
             return;
         } else {
             notCapableReason = "Could not find suitable coins!";
-            LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason.c_str());
+            LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
+            return;
         }
     }
 
     //send to all peers
-    if(!Mnping(errorMessage)) {
-        LogPrintf("CActiveMasternode::ManageStatus() - Error on Ping: %s\n", errorMessage.c_str());
+    if(!SendMasternodePing(errorMessage)) {
+        LogPrintf("CActiveMasternode::ManageStatus() - Error on Ping: %s\n", errorMessage);
+    }
+}
+
+std::string CActiveMasternode::GetStatus() {
+    switch (status) {
+    case MASTERNODE_INITIAL: return "node just started, not yet activated";
+    case MASTERNODE_SYNC_IN_PROCESS: return "sync in process. Must wait until client is synced to start";
+    case MASTERNODE_INPUT_TOO_NEW: return "masternode input must have at least 15 confirmations";
+    case MASTERNODE_NOT_CAPABLE: return "not capable masternode: " + notCapableReason;
+    case MASTERNODE_STARTED: return "masternode successfully started";
+    default: return "unknown";
     }
 }
 
-bool CActiveMasternode::Mnping(std::string& errorMessage) {
-    if(status != MASTERNODE_IS_CAPABLE && status != MASTERNODE_REMOTELY_ENABLED) {
+bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
+    if(status != MASTERNODE_STARTED) {
         errorMessage = "Masternode is not in a running status";
-        LogPrintf("CActiveMasternode::Mnping() - Error: %s\n", errorMessage.c_str());
         return false;
     }
 
@@ -135,43 +148,42 @@ bool CActiveMasternode::Mnping(std::string& errorMessage) {
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
     {
-        LogPrintf("CActiveMasternode::Mnping() - Error upon calling SetKey: %s\n", errorMessage.c_str());
+        errorMessage = strprintf("Error upon calling SetKey: %s\n", errorMessage);
         return false;
     }
 
-    return Mnping(vin, service, keyMasternode, pubKeyMasternode, errorMessage);
-}
-
-bool CActiveMasternode::Mnping(CTxIn vin, CService service, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage) {
-    //send to all peers
-    LogPrintf("CActiveMasternode::Mnping() - RelayMasternodeEntryPing vin = %s\n", vin.ToString().c_str());
+    LogPrintf("CActiveMasternode::SendMasternodePing() - Relay Masternode Ping vin = %s\n", vin.ToString());
     
     CMasternodePing mnp(vin);
     if(!mnp.Sign(keyMasternode, pubKeyMasternode))
     {
+        errorMessage = "Couldn't sign Masternode Ping";
         return false;
     }
 
-    // Update Last Seen timestamp in Masternode list
+    // Update lastPing for our masternode in Masternode list
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn != NULL)
     {
-        pmn->UpdateLastSeen();
+        if(pmn->IsPingedWithin(MASTERNODE_PING_SECONDS, mnp.sigTime)){
+            errorMessage = "Too early to send Masternode Ping";
+            return false;
+        }
+
+        pmn->lastPing = mnp;
+        mapSeenMasternodePing[mnp.GetHash()] = mnp;
+        mnp.Relay();
+        return true;
     }
     else
     {
         // Seems like we are trying to send a ping while the Masternode is not registered in the network
-        retErrorMessage = "Darksend Masternode List doesn't include our Masternode, shutting down Masternode pinging service! " + vin.ToString();
-        LogPrintf("CActiveMasternode::Mnping() - Error: %s\n", retErrorMessage.c_str());
+        errorMessage = "Darksend Masternode List doesn't include our Masternode, shutting down Masternode pinging service! " + vin.ToString();
         status = MASTERNODE_NOT_CAPABLE;
-        notCapableReason = retErrorMessage;
+        notCapableReason = errorMessage;
         return false;
     }
 
-    mapSeenMasternodePing[mnp.GetHash()] = mnp;
-    mnp.Relay();
-
-    return true;
 }
 
 bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string& errorMessage) {
@@ -183,13 +195,13 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
 
     if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode))
     {
-        LogPrintf("CActiveMasternode::Register() - Error upon calling SetKey: %s\n", errorMessage.c_str());
+        LogPrintf("CActiveMasternode::Register() - Error upon calling SetKey: %s\n", errorMessage);
         return false;
     }
 
     if(!GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress, txHash, strOutputIndex)) {
         errorMessage = "could not allocate vin";
-        LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage);
         return false;
     }
 
@@ -197,32 +209,35 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
 }
 
 bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage) {
+    CMasternodeBroadcast mnb;
+    CMasternodePing mnp(vin);
+    if(!mnp.Sign(keyMasternode, pubKeyMasternode)){
+        LogPrintf("CActiveMasternode::Register() -  Failed to sign ping, vin: %s\n", vin.ToString());
+        return false;
+    }
+    mapSeenMasternodePing[mnp.GetHash()] = mnp;
+
+    LogPrintf("CActiveMasternode::Register() - Adding to Masternode list service: %s - vin: %s\n", service.ToString(), vin.ToString());
+    mnb = CMasternodeBroadcast(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
+    mnb.lastPing = mnp;
+    if(!mnb.Sign(keyCollateralAddress)){
+        LogPrintf("CActiveMasternode::Register() -  Failed to sign broadcast, vin: %s\n", vin.ToString());
+        return false;
+    }
+    mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
     {
-        LogPrintf("CActiveMasternode::Register() - Adding to Masternode list service: %s - vin: %s\n", service.ToString().c_str(), vin.ToString().c_str());
-        CMasternodeBroadcast mnb(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
-        if(!mnb.Sign(keyCollateralAddress)){
-            //send to all peers
-            LogPrintf("CActiveMasternode::Register() -  Failed to sign %s\n", vin.ToString().c_str());
-            return false;
-        }
-        
         CMasternode mn(mnb);
-        mn.UpdateLastSeen();
         mnodeman.Add(mn);
+    } else {
+        pmn->UpdateFromNewBroadcast(mnb);
     }
-    
-    if(pmn == NULL) pmn = mnodeman.Find(vin);
-    if(pmn != NULL)
-    {
-        CMasternodeBroadcast mnb(*pmn);
 
-        mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
-        //send to all peers
-        LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString().c_str());
-        mnb.Relay(false);
-    }
+    //send to all peers
+    LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString());
+    mnb.Relay();
 
     return true;
 }
@@ -232,8 +247,6 @@ bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secr
 }
 
 bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex) {
-    CScript pubScript;
-
     // Find possible candidates
     vector<COutput> possibleCoins = SelectCoinsMasternode();
     COutput *selectedOutput;
@@ -340,7 +353,7 @@ bool CActiveMasternode::EnableHotColdMasterNode(CTxIn& newVin, CService& newServ
 {
     if(!fMasterNode) return false;
 
-    status = MASTERNODE_REMOTELY_ENABLED;
+    status = MASTERNODE_STARTED;
 
     //The values below are needed for signing mnping messages going forward
     this->vin = newVin;
diff --git a/src/activemasternode.h b/src/activemasternode.h
index 794166edcc62..e2b00afcac47 100644
--- a/src/activemasternode.h
+++ b/src/activemasternode.h
@@ -16,6 +16,20 @@
 // Responsible for activating the Masternode and pinging the network
 class CActiveMasternode
 {
+private:
+    // critical section to protect the inner data structures
+    mutable CCriticalSection cs;
+
+    /// Ping Masternode
+    bool SendMasternodePing(std::string& errorMessage);
+
+    /// Register any Masternode
+    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage);
+
+    /// Get 1000DRK input that can be used for the Masternode
+    bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex);
+    bool GetVinFromOutput(COutput out, CTxIn& vin, CPubKey& pubkey, CKey& secretKey);
+
 public:
 	// Initialized by init.cpp
 	// Keys for the main Masternode
@@ -30,29 +44,21 @@ class CActiveMasternode
 
     CActiveMasternode()
     {        
-        status = MASTERNODE_NOT_PROCESSED;
+        status = MASTERNODE_INITIAL;
     }
 
     /// Manage status of main Masternode
     void ManageStatus(); 
-
-    /// Ping for main Masternode
-    bool Mnping(std::string& errorMessage); 
-    /// Ping for any Masternode
-    bool Mnping(CTxIn vin, CService service, CKey key, CPubKey pubKey, std::string &retErrorMessage); 
+    std::string GetStatus();
 
     /// Register remote Masternode
     bool Register(std::string strService, std::string strKey, std::string txHash, std::string strOutputIndex, std::string& errorMessage); 
-    /// Register any Masternode
-    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage); 
 
     /// Get 1000DRK input that can be used for the Masternode
     bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey);
-    bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex);
     vector<COutput> SelectCoinsMasternode();
-    bool GetVinFromOutput(COutput out, CTxIn& vin, CPubKey& pubkey, CKey& secretKey);
 
-    /// Enable hot wallet mode (run a Masternode with no funds)
+    /// Enable cold wallet mode (run a Masternode with no funds)
     bool EnableHotColdMasterNode(CTxIn& vin, CService& addr);
 };
 
diff --git a/src/darksend.cpp b/src/darksend.cpp
index bf2fe8f432cc..a8e809cec8ea 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -22,8 +22,6 @@
 using namespace std;
 using namespace boost;
 
-CCriticalSection cs_darksend;
-
 // The main object for accessing Darksend
 CDarksendPool darkSendPool;
 // A helper object for signing messages from Masternodes
diff --git a/src/darksend.h b/src/darksend.h
index 066a8c2d8c40..b81f9120f09b 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -267,6 +267,9 @@ class CDarkSendSigner
  */
 class CDarksendPool
 {
+private:
+    mutable CCriticalSection cs_darksend;
+
 public:
     enum messages {
         ERR_ALREADY_HAVE,
diff --git a/src/main.cpp b/src/main.cpp
index fba87a558a63..30f27fd7125d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4180,11 +4180,9 @@ void static ProcessGetData(CNode* pfrom)
 
                 if (!pushed && inv.type == MSG_MASTERNODE_ANNOUNCE) {
                     if(mapSeenMasternodeBroadcast.count(inv.hash)){
-                        bool fRequested = false; // Requested full masternode list
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
                         ss << mapSeenMasternodeBroadcast[inv.hash];
-                        ss << fRequested;
                         pfrom->PushMessage("mnb", ss);
                         pushed = true;
                     }
@@ -4192,11 +4190,9 @@ void static ProcessGetData(CNode* pfrom)
 
                 if (!pushed && inv.type == MSG_MASTERNODE_PING) {
                     if(mapSeenMasternodePing.count(inv.hash)){
-                        bool fRequested = false; // Requested full masternode list
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
                         ss << mapSeenMasternodePing[inv.hash];
-                        ss << fRequested;
                         pfrom->PushMessage("mnp", ss);
                         pushed = true;
                     }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index ccfddb8fe601..9487fd33279a 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -73,8 +73,7 @@ CMasternode::CMasternode()
     sig = std::vector<unsigned char>();
     activeState = MASTERNODE_ENABLED;
     sigTime = GetAdjustedTime();
-    lastMnping = 0;
-    lastTimeSeen = 0;
+    lastPing = CMasternodePing();
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
     unitTest = false;
@@ -96,8 +95,7 @@ CMasternode::CMasternode(const CMasternode& other)
     sig = other.sig;
     activeState = other.activeState;
     sigTime = other.sigTime;
-    lastMnping = other.lastMnping;
-    lastTimeSeen = other.lastTimeSeen;
+    lastPing = other.lastPing;
     cacheInputAge = other.cacheInputAge;
     cacheInputAgeBlock = other.cacheInputAgeBlock;
     unitTest = other.unitTest;
@@ -109,29 +107,6 @@ CMasternode::CMasternode(const CMasternode& other)
     nVotedTimes = other.nVotedTimes;
 }
 
-CMasternode::CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn)
-{
-    LOCK(cs);
-    vin = newVin;
-    addr = newAddr;
-    pubkey = newPubkey;
-    pubkey2 = newPubkey2;
-    sig = newSig;
-    activeState = MASTERNODE_ENABLED;
-    sigTime = newSigTime;
-    lastMnping = 0;
-    lastTimeSeen = 0;
-    cacheInputAge = 0;
-    cacheInputAgeBlock = 0;
-    unitTest = false;
-    allowFreeTx = true;
-    protocolVersion = protocolVersionIn;
-    nLastDsq = 0;
-    nScanningErrorCount = 0;
-    nLastScanningErrorBlockHeight = 0;
-    nVotedTimes = 0;
-}
-
 CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
 {
     LOCK(cs);
@@ -142,8 +117,7 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     sig = mnb.sig;
     activeState = MASTERNODE_ENABLED;
     sigTime = mnb.sigTime;
-    lastMnping = 0;
-    lastTimeSeen = 0;
+    lastPing = mnb.lastPing;
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
     unitTest = false;
@@ -165,6 +139,11 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     sig = mnb.sig;
     protocolVersion = mnb.protocolVersion;
     addr = mnb.addr;
+    int nDoS = 0;
+    if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS))) {
+        lastPing = mnb.lastPing;
+        mapSeenMasternodePing[lastPing.GetHash()] = lastPing;
+    }
 }
 
 //
@@ -201,12 +180,12 @@ void CMasternode::Check()
     if(activeState == MASTERNODE_VIN_SPENT) return;
 
 
-    if(!UpdatedWithin(MASTERNODE_REMOVAL_SECONDS)){
+    if(!IsPingedWithin(MASTERNODE_REMOVAL_SECONDS)){
         activeState = MASTERNODE_REMOVE;
         return;
     }
 
-    if(!UpdatedWithin(MASTERNODE_EXPIRATION_SECONDS)){
+    if(!IsPingedWithin(MASTERNODE_EXPIRATION_SECONDS)){
         activeState = MASTERNODE_EXPIRED;
         return;
     }
@@ -260,8 +239,7 @@ CMasternodeBroadcast::CMasternodeBroadcast()
     sig = std::vector<unsigned char>();
     activeState = MASTERNODE_ENABLED;
     sigTime = GetAdjustedTime();
-    lastMnping = 0;
-    lastTimeSeen = 0;
+    lastPing = CMasternodePing();
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
     unitTest = false;
@@ -280,8 +258,7 @@ CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubK
     sig = std::vector<unsigned char>();
     activeState = MASTERNODE_ENABLED;
     sigTime = GetAdjustedTime();
-    lastMnping = 0;
-    lastTimeSeen = 0;
+    lastPing = CMasternodePing();
     cacheInputAge = 0;
     cacheInputAgeBlock = 0;
     unitTest = false;
@@ -292,32 +269,32 @@ CMasternodeBroadcast::CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubK
     nLastScanningErrorBlockHeight = 0;
 }
 
-CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& other)
+CMasternodeBroadcast::CMasternodeBroadcast(const CMasternode& mn)
 {
-    vin = other.vin;
-    addr = other.addr;
-    pubkey = other.pubkey;
-    pubkey2 = other.pubkey2;
-    sig = other.sig;
-    activeState = other.activeState;
-    sigTime = other.sigTime;
-    lastMnping = other.lastMnping;
-    lastTimeSeen = other.lastTimeSeen;
-    cacheInputAge = other.cacheInputAge;
-    cacheInputAgeBlock = other.cacheInputAgeBlock;
-    unitTest = other.unitTest;
-    allowFreeTx = other.allowFreeTx;
-    protocolVersion = other.protocolVersion;
-    nLastDsq = other.nLastDsq;
-    nScanningErrorCount = other.nScanningErrorCount;
-    nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
+    vin = mn.vin;
+    addr = mn.addr;
+    pubkey = mn.pubkey;
+    pubkey2 = mn.pubkey2;
+    sig = mn.sig;
+    activeState = mn.activeState;
+    sigTime = mn.sigTime;
+    lastPing = mn.lastPing;
+    cacheInputAge = mn.cacheInputAge;
+    cacheInputAgeBlock = mn.cacheInputAgeBlock;
+    unitTest = mn.unitTest;
+    allowFreeTx = mn.allowFreeTx;
+    protocolVersion = mn.protocolVersion;
+    nLastDsq = mn.nLastDsq;
+    nScanningErrorCount = mn.nScanningErrorCount;
+    nLastScanningErrorBlockHeight = mn.nLastScanningErrorBlockHeight;
 }
 
-bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
+bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
 {
     // make sure signature isn't in the future (past is OK)
     if (sigTime > GetAdjustedTime() + 60 * 60) {
-        LogPrintf("mnb - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        LogPrintf("mnb - Signature rejected, too far into the future %s\n", vin.ToString());
+        nDos = 1;
         return false;
     }
 
@@ -367,35 +344,39 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos, bool fRequested)
     //search existing Masternode list, this is where we update existing Masternodes with new mnb broadcasts
     CMasternode* pmn = mnodeman.Find(vin);
 
-    // if we are masternode but with undefined vin and this mnb is ours (matches our Masternode privkey) then just skip this part
-    if(pmn != NULL && !(fMasterNode && activeMasternode.vin == CTxIn() && pubkey2 == activeMasternode.pubKeyMasternode))
-    {
-        // if Requested, we don't want to update this info
-        if(fRequested) { Relay(false); return true;}
-
-        // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
-        //   after that they just need to match
-        if(pmn->pubkey == pubkey && !pmn->UpdatedWithin(MASTERNODE_MIN_MNB_SECONDS)){
-            pmn->UpdateLastSeen();
-
-            if(pmn->sigTime < sigTime){ //take the newest entry
-                LogPrintf("mnb - Got updated entry for %s\n", addr.ToString().c_str());
-
-                pmn->UpdateFromNewBroadcast((*this));
-
-                pmn->Check();
-                if(pmn->IsEnabled()) {
-                    Relay(fRequested);
-                }
-            }
-        }
+    // no such masternode or it's not enabled already, nothing to update
+    if(pmn == NULL || (pmn != NULL && !pmn->IsEnabled())) return true;
+
+    // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
+    //   after that they just need to match
+    if(pmn->pubkey == pubkey && !pmn->IsBroadcastedWithin(MASTERNODE_MIN_MNB_SECONDS)) {
+        //take the newest entry
+        LogPrintf("mnb - Got updated entry for %s\n", addr.ToString().c_str());
+        pmn->UpdateFromNewBroadcast((*this));
+        pmn->Check();
+        if(pmn->IsEnabled()) Relay();
     }
 
     return true;
 }
 
-bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
+bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)
 {
+    // we are a masternode with the same vin (i.e. already activated) and this mnb is ours (matches our Masternode privkey)
+    // so nothing to do here for us
+    if(fMasterNode && vin.prevout == activeMasternode.vin.prevout && pubkey2 == activeMasternode.pubKeyMasternode)
+        return true;
+
+    // search existing Masternode list
+    CMasternode* pmn = mnodeman.Find(vin);
+
+    if(pmn != NULL) {
+        // nothing to do here if we already know about this masternode and it's enabled
+        if(pmn->IsEnabled()) return true;
+        // if it's not enabled, remove old MN first and continue
+        else mnodeman.Remove(pmn->vin);
+    }
+
     CValidationState state;
     CMutableTransaction tx = CMutableTransaction();
     CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
@@ -427,9 +408,8 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
             }
         }
 
-        // add our Masternode
-        CMasternode mn((*this));
-        mn.UpdateLastSeen(lastTimeSeen);
+        LogPrintf("mnb - Got NEW Masternode entry %s %s\n", addr.ToString(), vin.ToString());
+        CMasternode mn(*this);
         mnodeman.Add(mn);
 
         // if it matches our Masternode privkey, then we've been remotely activated
@@ -440,7 +420,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
         bool isLocal = addr.IsRFC1918() || addr.IsLocal();
         if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
 
-        if(!fRequested && !isLocal) Relay(fRequested);
+        if(!isLocal) Relay();
 
         return true;
     } else {
@@ -451,7 +431,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS, bool fRequested)
     return false;
 }
 
-void CMasternodeBroadcast::Relay(bool fRequested)
+void CMasternodeBroadcast::Relay()
 {
     CInv inv(MSG_MASTERNODE_ANNOUNCE, GetHash());
     RelayInv(inv);
@@ -484,13 +464,17 @@ bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
 CMasternodePing::CMasternodePing()
 {
     vin = CTxIn();
-    blockHash = chainActive[chainActive.Height() - 12]->GetBlockHash();
+    blockHash = uint256(0);
+    sigTime = 0;
+    vchSig = std::vector<unsigned char>();
 }
 
 CMasternodePing::CMasternodePing(CTxIn& newVin)
 {
     vin = newVin;
     blockHash = chainActive[chainActive.Height() - 12]->GetBlockHash();
+    sigTime = GetAdjustedTime();
+    vchSig = std::vector<unsigned char>();
 }
 
 
@@ -518,62 +502,70 @@ bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 bool CMasternodePing::CheckAndUpdate(int& nDos)
 {
     if (sigTime > GetAdjustedTime() + 60 * 60) {
-        LogPrintf("mnping - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        nDos = 1;
         return false;
     }
 
     if (sigTime <= GetAdjustedTime() - 60 * 60) {
-        LogPrintf("mnping - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
+        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
+        nDos = 1;
         return false;
     }
 
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
-    if(pmn != NULL && pmn->protocolVersion >= nMasternodeMinProtocol)
+    if(pmn != NULL && pmn->IsEnabled() && pmn->protocolVersion >= nMasternodeMinProtocol)
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
-        // take this only if it's newer and last ping was more then MASTERNODE_MIN_MNP_SECONDS ago
-        if(sigTime - pmn->lastMnping > MASTERNODE_MIN_MNP_SECONDS-60)
+        // update only if there is no known ping for this masternode or
+        // last ping was more then MASTERNODE_MIN_MNP_SECONDS-60 ago comparing to this one
+        if(!pmn->IsPingedWithin(MASTERNODE_MIN_MNP_SECONDS - 60, sigTime))
         {
             std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
             std::string errorMessage = "";
             if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
             {
-                LogPrintf("mnping - Got bad Masternode address signature %s\n", vin.ToString());
+                LogPrintf("CMasternodePing::CheckAndUpdate - Got bad Masternode address signature %s\n", vin.ToString());
                 nDos = 33;
                 return false;
             }
 
-            pmn->lastMnping = sigTime;
-
             BlockMap::iterator mi = mapBlockIndex.find(blockHash);
             if (mi != mapBlockIndex.end() && (*mi).second)
             {
                 if((*mi).second->nHeight < chainActive.Height() - 24)
                 {
-                    LogPrintf("mnping - Masternode %s block hash %s is too old\n", vin.ToString(), blockHash.ToString());
+                    LogPrintf("CMasternodePing::CheckAndUpdate - Masternode %s block hash %s is too old\n", vin.ToString(), blockHash.ToString());
                     // Do nothing here (no Masternode update, no mnping relay)
                     // Let this node to be visible but fail to accept mnping
 
                     return false;
                 }
             } else {
-                if (fDebug) LogPrintf("mnping - Masternode %s block hash %s is unknown\n", vin.ToString(), blockHash.ToString());
+                if (fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode %s block hash %s is unknown\n", vin.ToString(), blockHash.ToString());
                 // maybe we stuck so we shouldn't ban this node, just fail to accept it
                 // TODO: or should we also request this block?
 
                 return false;
             }
 
-            pmn->UpdateLastSeen();
+            pmn->lastPing = *this;
+
             pmn->Check();
             if(!pmn->IsEnabled()) return false;
 
+            if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode ping accepted, vin: %s\n", vin.ToString());
+
             Relay();
             return true;
         }
+        if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode ping arrived too early, vin: %s\n", vin.ToString());
+        nDos = 1;
+        return false;
     }
+    if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Couldn't find compatible Masternode entry, vin: %s\n", vin.ToString());
 
     return false;
 }
diff --git a/src/masternode.h b/src/masternode.h
index 89eba8e49338..86849bdd6397 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -13,15 +13,11 @@
 #include "main.h"
 #include "timedata.h"
 
-#define MASTERNODE_NOT_PROCESSED               0 // initial state
-#define MASTERNODE_IS_CAPABLE                  1
-#define MASTERNODE_NOT_CAPABLE                 2
-#define MASTERNODE_STOPPED                     3
-#define MASTERNODE_INPUT_TOO_NEW               4
-#define MASTERNODE_PORT_NOT_OPEN               6
-#define MASTERNODE_PORT_OPEN                   7
-#define MASTERNODE_SYNC_IN_PROCESS             8
-#define MASTERNODE_REMOTELY_ENABLED            9
+#define MASTERNODE_INITIAL                     0 // initial state
+#define MASTERNODE_SYNC_IN_PROCESS             1
+#define MASTERNODE_INPUT_TOO_NEW               2
+#define MASTERNODE_NOT_CAPABLE                 3
+#define MASTERNODE_STARTED                     4
 
 #define MASTERNODE_MIN_CONFIRMATIONS           15
 #define MASTERNODE_MIN_MNP_SECONDS             (30*60)
@@ -39,6 +35,75 @@ extern map<int64_t, uint256> mapCacheBlockHashes;
 
 bool GetBlockHash(uint256& hash, int nBlockHeight);
 
+
+//
+// The Masternode Ping Class : Contains a different serialize method for sending pings from masternodes throughout the network
+//
+
+class CMasternodePing
+{
+public:
+
+    CTxIn vin;
+    uint256 blockHash;
+    int64_t sigTime; //mnb message times
+    std::vector<unsigned char> vchSig;
+    //removed stop
+
+    CMasternodePing();
+    CMasternodePing(CTxIn& newVin);
+
+    ADD_SERIALIZE_METHODS;
+
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(vin);
+        READWRITE(blockHash);
+        READWRITE(sigTime);
+        READWRITE(vchSig);
+    }
+
+    bool CheckAndUpdate(int& nDos);
+    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
+    void Relay();
+
+    uint256 GetHash(){
+        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+        ss << vin;
+        ss << sigTime;
+        return ss.GetHash();
+    }
+
+    void swap(CMasternodePing& first, CMasternodePing& second) // nothrow
+    {
+        // enable ADL (not necessary in our case, but good practice)
+        using std::swap;
+
+        // by swapping the members of two classes,
+        // the two classes are effectively swapped
+        swap(first.vin, second.vin);
+        swap(first.blockHash, second.blockHash);
+        swap(first.sigTime, second.sigTime);
+        swap(first.vchSig, second.vchSig);
+    }
+
+    CMasternodePing& operator=(CMasternodePing from)
+    {
+        swap(*this, from);
+        return *this;
+    }
+    friend bool operator==(const CMasternodePing& a, const CMasternodePing& b)
+    {
+        return a.vin == b.vin && a.blockHash == b.blockHash;
+    }
+    friend bool operator!=(const CMasternodePing& a, const CMasternodePing& b)
+    {
+        return !(a == b);
+    }
+
+};
+
+
 //
 // The Masternode Class. For managing the Darksend process. It contains the input of the 1000DRK, signature to prove
 // it's the one who own that ip address and code for calculating the payment election.
@@ -64,9 +129,7 @@ class CMasternode
     CPubKey pubkey2;
     std::vector<unsigned char> sig;
     int activeState;
-    int64_t sigTime; //mnb message times
-    int64_t lastMnping;
-    int64_t lastTimeSeen;
+    int64_t sigTime; //mnb message time
     int cacheInputAge;
     int cacheInputAgeBlock;
     bool unitTest;
@@ -76,11 +139,12 @@ class CMasternode
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
     int nVotedTimes;
-    
+    CMasternodePing lastPing;
+
+
     CMasternode();
     CMasternode(const CMasternode& other);
-    CMasternode(const CMasternodeBroadcast& other);
-    CMasternode(CService newAddr, CTxIn newVin, CPubKey newPubkey, std::vector<unsigned char> newSig, int64_t newSigTime, CPubKey newPubkey2, int protocolVersionIn);
+    CMasternode(const CMasternodeBroadcast& mnb);
 
 
     void swap(CMasternode& first, CMasternode& second) // nothrow
@@ -97,8 +161,7 @@ class CMasternode
         swap(first.sig, second.sig);
         swap(first.activeState, second.activeState);
         swap(first.sigTime, second.sigTime);
-        swap(first.lastMnping, second.lastMnping);
-        swap(first.lastTimeSeen, second.lastTimeSeen);
+        swap(first.lastPing, second.lastPing);
         swap(first.cacheInputAge, second.cacheInputAge);
         swap(first.cacheInputAgeBlock, second.cacheInputAgeBlock);
         swap(first.unitTest, second.unitTest);
@@ -138,10 +201,9 @@ class CMasternode
             READWRITE(pubkey2);
             READWRITE(sig);
             READWRITE(sigTime);
-            READWRITE(lastTimeSeen);
             READWRITE(protocolVersion);
             READWRITE(activeState);
-            READWRITE(lastMnping);
+            READWRITE(lastPing);
             READWRITE(cacheInputAge);
             READWRITE(cacheInputAgeBlock);
             READWRITE(unitTest);
@@ -156,15 +218,6 @@ class CMasternode
 
     void UpdateFromNewBroadcast(CMasternodeBroadcast& mnb);
 
-    void UpdateLastSeen(int64_t override=0)
-    {
-        if(override == 0){
-            lastTimeSeen = GetAdjustedTime();
-        } else {
-            lastTimeSeen = override;
-        }
-    }
-
     inline uint64_t SliceHash(uint256& hash, int slice)
     {
         uint64_t n = 0;
@@ -174,16 +227,23 @@ class CMasternode
 
     void Check();
 
-    bool UpdatedWithin(int seconds)
+    bool IsBroadcastedWithin(int seconds)
     {
-        // LogPrintf("UpdatedWithin %d, %d --  %d \n", GetAdjustedTime() , lastTimeSeen, (GetAdjustedTime() - lastTimeSeen) < seconds);
+        return (GetAdjustedTime() - sigTime) < seconds;
+    }
 
-        return (GetAdjustedTime() - lastTimeSeen) < seconds;
+    bool IsPingedWithin(int seconds, int64_t now = -1)
+    {
+        now == -1 ? now = GetAdjustedTime() : now;
+        return (lastPing == CMasternodePing())
+                ? false
+                : now - lastPing.sigTime < seconds;
     }
 
     void Disable()
     {
-        lastTimeSeen = 0;
+        sigTime = 0;
+        lastPing = CMasternodePing();
     }
 
     bool IsEnabled()
@@ -229,12 +289,12 @@ class CMasternodeBroadcast : public CMasternode
 public:
     CMasternodeBroadcast();
     CMasternodeBroadcast(CService newAddr, CTxIn newVin, CPubKey newPubkey, CPubKey newPubkey2, int protocolVersionIn);
-    CMasternodeBroadcast(const CMasternode& other);
+    CMasternodeBroadcast(const CMasternode& mn);
 
-    bool CheckAndUpdate(int& nDoS, bool fRequested);
-    bool CheckInputsAndAdd(int& nDos, bool fRequested);
+    bool CheckAndUpdate(int& nDoS);
+    bool CheckInputsAndAdd(int& nDos);
     bool Sign(CKey& keyCollateralAddress);
-    void Relay(bool fRequested);
+    void Relay();
 
     ADD_SERIALIZE_METHODS;
 
@@ -246,8 +306,8 @@ class CMasternodeBroadcast : public CMasternode
         READWRITE(pubkey2);
         READWRITE(sig);
         READWRITE(sigTime);
-        READWRITE(lastTimeSeen);
         READWRITE(protocolVersion);
+        READWRITE(lastPing);
     }
 
     uint256 GetHash(){
@@ -259,43 +319,4 @@ class CMasternodeBroadcast : public CMasternode
 
 };
 
-
-//
-// The Masternode Ping Class : Contains a different serialize method for sending pings from masternodes throughout the network
-//
-
-class CMasternodePing
-{
-public:
-
-    CTxIn vin;
-    uint256 blockHash;
-    std::vector<unsigned char> vchSig;
-    int64_t sigTime; //mnb message times
-    //removed stop
-
-    CMasternodePing();
-    CMasternodePing(CTxIn& newVin);
-
-    ADD_SERIALIZE_METHODS;
-
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(vin);
-        READWRITE(blockHash);
-        READWRITE(sigTime);
-        READWRITE(vchSig);
-    }
-
-    bool CheckAndUpdate(int& nDos);
-    bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    void Relay();
-
-    uint256 GetHash(){
-        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
-        ss << vin;
-        ss << sigTime;
-        return ss.GetHash();
-    }
-};
 #endif
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 6d86fdd3d564..cfe14e78c0b8 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -12,8 +12,6 @@
 #include <boost/lexical_cast.hpp>
 #include <boost/filesystem.hpp>
 
-CCriticalSection cs_process_message;
-
 /** Masternode manager */
 CMasternodeMan mnodeman;
 
@@ -84,7 +82,7 @@ bool CMasternodeDB::Write(const CMasternodeMan& mnodemanToSave)
     return true;
 }
 
-CMasternodeDB::ReadResult CMasternodeDB::Read(CMasternodeMan& mnodemanToLoad)
+CMasternodeDB::ReadResult CMasternodeDB::Read(CMasternodeMan& mnodemanToLoad, bool fDryRun)
 {
     int64_t nStart = GetTimeMillis();
     // open input file, and associate with CAutoFile
@@ -159,9 +157,12 @@ CMasternodeDB::ReadResult CMasternodeDB::Read(CMasternodeMan& mnodemanToLoad)
         return IncorrectFormat;
     }
 
-    mnodemanToLoad.CheckAndRemove(); // clean out expired
     LogPrintf("Loaded info from mncache.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", mnodemanToLoad.ToString());
+    LogPrintf("Masternode manager - cleaning....\n");
+    if(!fDryRun) mnodemanToLoad.CheckAndRemove(true);
+    LogPrintf("Masternode manager - result:\n");
+    LogPrintf("  %s\n", mnodemanToLoad.ToString());
 
     return Ok;
 }
@@ -174,7 +175,7 @@ void DumpMasternodes()
     CMasternodeMan tempMnodeman;
 
     LogPrintf("Verifying mncache.dat format...\n");
-    CMasternodeDB::ReadResult readResult = mndb.Read(tempMnodeman);
+    CMasternodeDB::ReadResult readResult = mndb.Read(tempMnodeman, true);
     // there was an error and it was not an error on file openning => do not proceed
     if (readResult == CMasternodeDB::FileError)
         LogPrintf("Missing masternode cache file - mncache.dat, will try to recreate\n");
@@ -223,24 +224,22 @@ void CMasternodeMan::Check()
 
     BOOST_FOREACH(CMasternode& mn, vMasternodes) {
         mn.Check();
-        
-        // // if it matches our Masternode privkey, then we've been remotely activated
-        // if(mn.pubkey2 == activeMasternode.pubKeyMasternode && mn.protocolVersion == PROTOCOL_VERSION){
-        //     activeMasternode.EnableHotColdMasterNode(mn.vin, mn.addr);
-        // }
     }
 }
 
-void CMasternodeMan::CheckAndRemove()
+void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
 {
     LOCK(cs);
 
     Check();
 
-    //remove inactive
+    //remove inactive and outdated
     vector<CMasternode>::iterator it = vMasternodes.begin();
     while(it != vMasternodes.end()){
-        if((*it).activeState == CMasternode::MASTERNODE_REMOVE || (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT || (*it).protocolVersion < nMasternodeMinProtocol){
+        if((*it).activeState == CMasternode::MASTERNODE_REMOVE ||
+                (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT ||
+                (forceExpiredRemoval && (*it).activeState == CMasternode::MASTERNODE_EXPIRED) ||
+                (*it).protocolVersion < nMasternodeMinProtocol) {
             if(fDebug) LogPrintf("CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
             it = vMasternodes.erase(it);
         } else {
@@ -576,14 +575,13 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
     if (strCommand == "mnb") { //Masternode Broadcast
         CMasternodeBroadcast mnb;
-        bool fRequested; //specifically requested?
-        vRecv >> mnb >> fRequested;
+        vRecv >> mnb;
 
         if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) return; //seen
         mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
 
         int nDoS = 0;
-        if(!mnb.CheckAndUpdate(nDoS, fRequested)){
+        if(!mnb.CheckAndUpdate(nDoS)){
 
             if(nDoS > 0)
                 Misbehaving(pfrom->GetId(), nDoS);
@@ -600,15 +598,13 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        if(fDebug) LogPrintf("mnb - Got NEW Masternode entry %s\n", mnb.addr.ToString().c_str());
-
         // make sure it's still unspent
         //  - this is checked later by .check() in many places and by ThreadCheckDarkSendPool()
-        if(mnb.CheckInputsAndAdd(nDoS, fRequested)) {
+        if(mnb.CheckInputsAndAdd(nDoS)) {
             // use this as a peer
             addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
         } else {
-            LogPrintf("mnb - Rejected Masternode entry %s\n", mnb.addr.ToString().c_str());
+            LogPrintf("mnb - Rejected Masternode entry %s\n", mnb.addr.ToString());
 
             if (nDoS > 0)
                 Misbehaving(pfrom->GetId(), nDoS);
@@ -619,22 +615,22 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternodePing mnp;
         vRecv >> mnp;
 
+        if(fDebug) LogPrintf("mnp - Masternode ping, vin: %s\n", mnp.vin.ToString());
+
         if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
         mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
         int nDoS = 0;
-        if(mnp.CheckAndUpdate(nDoS))
-        {
-            //successful, we're done
+        if(mnp.CheckAndUpdate(nDoS)) return;
+
+        if(nDoS > 0) {
+            // if anything significant failed, mark that node and return
+            Misbehaving(pfrom->GetId(), nDoS);
             return;
-        } else { 
-            //failure
-            if(nDoS > 0)
-                Misbehaving(pfrom->GetId(), nDoS);
         }
 
-        if(fDebug) LogPrintf("mnp - Couldn't find Masternode entry %s\n", mnp.vin.ToString().c_str());
-
+        // we wasn't able to accept mnp but nothing significant happened,
+        // we might just have to ask for a masternode entry once
         std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);
         if (i != mWeAskedForMasternodeListEntry.end())
         {
@@ -644,7 +640,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         // ask for the mnb info once from the node that sent mnp
 
-        LogPrintf("mnp - Asking source node for missing entry %s\n", mnp.vin.ToString().c_str());
+        LogPrintf("mnp - Asking source node for missing entry, vin: %s\n", mnp.vin.ToString());
         pfrom->PushMessage("dseg", mnp.vin);
         int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
         mWeAskedForMasternodeListEntry[mnp.vin.prevout] = askAgain;
@@ -677,27 +673,24 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
             if(mn.addr.IsRFC1918()) continue; //local network
 
-            bool fRequested = true;
             if(mn.IsEnabled()) {
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
                 if(vin == CTxIn()){
                     CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                     ss.reserve(1000);
                     ss << CMasternodeBroadcast(mn);
-                    ss << fRequested;
                     pfrom->PushMessage("mnb", ss);
                 } else if (vin == mn.vin) {
                     CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                     ss.reserve(1000);
                     ss << CMasternodeBroadcast(mn);
-                    ss << fRequested;
                     pfrom->PushMessage("mnb", ss);
 
                     LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
                     return;
                 }
+                i++;
             }
-            i++;
         }
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString().c_str());
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 9a52d87d7626..8c7b4393531e 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -49,7 +49,7 @@ class CMasternodeDB
 
     CMasternodeDB();
     bool Write(const CMasternodeMan &mnodemanToSave);
-    ReadResult Read(CMasternodeMan& mnodemanToLoad);
+    ReadResult Read(CMasternodeMan& mnodemanToLoad, bool fDryRun = false);
 };
 
 class CMasternodeMan
@@ -58,6 +58,9 @@ class CMasternodeMan
     // critical section to protect the inner data structures
     mutable CCriticalSection cs;
 
+    // critical section to protect the inner data structures specifically on messaging
+    mutable CCriticalSection cs_process_message;
+
     // map to hold all MNs
     std::vector<CMasternode> vMasternodes;
     // who's asked for the Masternode list and the last time
@@ -93,7 +96,7 @@ class CMasternodeMan
     void Check();
 
     /// Check all Masternodes and remove inactive
-    void CheckAndRemove();
+    void CheckAndRemove(bool forceExpiredRemoval = false);
 
     /// Clear Masternode vector
     void Clear();
diff --git a/src/miner.cpp b/src/miner.cpp
index dc989c3c3fba..19b59ac4bd0c 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -19,7 +19,6 @@
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #endif
-#include "masternodeman.h"
 #include "masternode-payments.h"
 
 #include <boost/thread.hpp>
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index b23d1bfcd5ee..cf96272e57f5 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -199,21 +199,13 @@ Value masternode(const Array& params, bool fHelp)
             }
         }
 
-        if(activeMasternode.status != MASTERNODE_REMOTELY_ENABLED && activeMasternode.status != MASTERNODE_IS_CAPABLE){
-            activeMasternode.status = MASTERNODE_NOT_PROCESSED; // TODO: consider better way
-            std::string errorMessage;
+        if(activeMasternode.status != MASTERNODE_STARTED){
+            activeMasternode.status = MASTERNODE_INITIAL; // TODO: consider better way
             activeMasternode.ManageStatus();
             pwalletMain->Lock();
         }
 
-        if(activeMasternode.status == MASTERNODE_REMOTELY_ENABLED) return "masternode started remotely";
-        if(activeMasternode.status == MASTERNODE_INPUT_TOO_NEW) return "masternode input must have at least 15 confirmations";
-        if(activeMasternode.status == MASTERNODE_STOPPED) return "masternode is stopped";
-        if(activeMasternode.status == MASTERNODE_IS_CAPABLE) return "successfully started masternode";
-        if(activeMasternode.status == MASTERNODE_NOT_CAPABLE) return "not capable masternode: " + activeMasternode.notCapableReason;
-        if(activeMasternode.status == MASTERNODE_SYNC_IN_PROCESS) return "sync in process. Must wait until client is synced to start.";
-
-        return "unknown";
+        return activeMasternode.GetStatus();
     }
 
     if (strCommand == "start-alias")
@@ -330,12 +322,7 @@ Value masternode(const Array& params, bool fHelp)
 
     if (strCommand == "debug")
     {
-        if(activeMasternode.status == MASTERNODE_REMOTELY_ENABLED) return "masternode started remotely";
-        if(activeMasternode.status == MASTERNODE_INPUT_TOO_NEW) return "masternode input must have at least 15 confirmations";
-        if(activeMasternode.status == MASTERNODE_IS_CAPABLE) return "successfully started masternode";
-        if(activeMasternode.status == MASTERNODE_STOPPED) return "masternode is stopped";
-        if(activeMasternode.status == MASTERNODE_NOT_CAPABLE) return "not capable masternode: " + activeMasternode.notCapableReason;
-        if(activeMasternode.status == MASTERNODE_SYNC_IN_PROCESS) return "sync in process. Must wait until client is synced to start.";
+        if(activeMasternode.status != MASTERNODE_INITIAL) return activeMasternode.GetStatus();
 
         CTxIn vin = CTxIn();
         CPubKey pubkey = CScript();
@@ -369,8 +356,10 @@ Value masternode(const Array& params, bool fHelp)
             obj.push_back(Pair("protocol",      (int64_t)winner->protocolVersion));
             obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString().c_str()));
             obj.push_back(Pair("pubkey",        address2.ToString().c_str()));
-            obj.push_back(Pair("lastseen",      (int64_t)winner->lastTimeSeen));
-            obj.push_back(Pair("activeseconds", (int64_t)(winner->lastTimeSeen - winner->sigTime)));
+            obj.push_back(Pair("lastseen",      (winner->lastPing == CMasternodePing()) ? winner->sigTime :
+                                                        (int64_t)winner->lastPing.sigTime));
+            obj.push_back(Pair("activeseconds", (winner->lastPing == CMasternodePing()) ? 0 :
+                                                        (int64_t)(winner->lastPing.sigTime - winner->sigTime)));
             return obj;
         }
 
@@ -498,6 +487,7 @@ Value masternodelist(const Array& params, bool fHelp)
                 "                                    additional matches in some modes are also available\n"
                 "\nAvailable modes:\n"
                 "  activeseconds  - Print number of seconds masternode recognized by the network as enabled\n"
+                "                   (since latest issued \"masternode start/start-many/start-alias\")\n"
                 "  full           - Print info in format 'status protocol pubkey IP lastseen activeseconds lastpaid'\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
@@ -526,7 +516,7 @@ Value masternodelist(const Array& params, bool fHelp)
             std::string strVin = mn.vin.prevout.ToStringShort();
             if (strMode == "activeseconds") {
                 if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,       (int64_t)(mn.lastTimeSeen - mn.sigTime)));
+                obj.push_back(Pair(strVin,       (int64_t)(mn.lastPing.sigTime - mn.sigTime)));
             } else if (strMode == "full") {
                 CScript pubkey;
                 pubkey = GetScriptForDestination(mn.pubkey.GetID());
@@ -543,8 +533,8 @@ Value masternodelist(const Array& params, bool fHelp)
                                mn.protocolVersion << " " <<
                                address2.ToString() << " " <<
                                mn.addr.ToString() << " " <<
-                               mn.lastTimeSeen << " " << setw(8) <<
-                               (mn.lastTimeSeen - mn.sigTime) << " " <<
+                               mn.lastPing.sigTime << " " << setw(8) <<
+                               (mn.lastPing.sigTime - mn.sigTime) << " " <<
                                mn.GetLastPaid();
                 std::string output = stringStream.str();
                 stringStream << " " << strVin;
@@ -553,7 +543,7 @@ Value masternodelist(const Array& params, bool fHelp)
                 obj.push_back(Pair(addrStream.str(), output));
             } else if (strMode == "lastseen") {
                 if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,       (int64_t)mn.lastTimeSeen));
+                obj.push_back(Pair(strVin,       (int64_t)mn.lastPing.sigTime));
             } else if (strMode == "protocol") {
                 if(strFilter !="" && strFilter != boost::lexical_cast<std::string>(mn.protocolVersion) &&
                     strVin.find(strFilter) == string::npos) continue;

From 3ef2cec49d5d3c78c92e0c413e5637df5cd496f6 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Jul 2015 08:59:08 +0300
Subject: [PATCH 1553/1819] proto bump

---
 src/instantx.h | 2 +-
 src/version.h  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index 9525089033d8..53541dee814f 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70089;
+static const int MIN_INSTANTX_PROTO_VERSION = 70090;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index ce54e24fdbb1..0da8b8e5691b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70089;
+static const int PROTOCOL_VERSION = 70090;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70089;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70090;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70089;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70090;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70089;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70090;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From f2c56533792012b39b65520d84b194b6cfd0e4b1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Jul 2015 09:10:18 +0300
Subject: [PATCH 1554/1819] Start all ds, mnodeman, ix related checks and
 activate mn only after sync is over

---
 src/darksend.cpp | 64 +++++++++++++++++++++++++-----------------------
 src/init.cpp     |  1 -
 2 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index bf2fe8f432cc..4544f92f4156 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2335,27 +2335,6 @@ void ThreadCheckDarkSendPool()
         MilliSleep(1000);
         //LogPrintf("ThreadCheckDarkSendPool::check timeout\n");
 
-        darkSendPool.CheckTimeout();
-        darkSendPool.CheckForCompleteQueue();
-
-        if(c % 60 == 0)
-        {
-            LOCK(cs_main);
-            /*
-                cs_main is required for doing CMasternode.Check because something
-                is modifying the coins view without a mempool lock. It causes
-                segfaults from this code without the cs_main lock.
-            */
-            mnodeman.CheckAndRemove();
-            mnodeman.ProcessMasternodeConnections();
-            masternodePayments.CleanPaymentList();
-            CleanTransactionLocksList();
-        }
-
-        if(c % MASTERNODE_PING_SECONDS == 0) activeMasternode.ManageStatus();
-
-        if(c % MASTERNODES_DUMP_SECONDS == 0) DumpMasternodes();
-
         //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
         if(c % 5 == 0 && RequestedMasternodeAssets <= 5){
             bool fIsInitialDownload = IsInitialBlockDownload();
@@ -2403,18 +2382,43 @@ void ThreadCheckDarkSendPool()
                     }
                 }
             }
-        } else if(c % 60 == 0 && RequestedMasternodeAssets == 3){
-            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED; //done syncing
+        } else if((c % 60 == 0 && RequestedMasternodeAssets >= 5 && RequestedMasternodeAssets < MASTERNODE_LIST_SYNCED) || //done syncing
+                  (c % (5 * 60) == 0 && RequestedMasternodeAssets < 5)) { //couldn't find 5 peers in 5 minutes
+            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED;
+            c = 1; // reset counter
         }
 
-        if(c % 60 == 0){
-            //if we've used 1/5 of the Masternode list, then clear the list.
-            if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
-                vecMasternodesUsed.clear();
-        }
+        if(RequestedMasternodeAssets == MASTERNODE_LIST_SYNCED) {
+            if(c % MASTERNODE_PING_SECONDS == 1) activeMasternode.ManageStatus(); // activate right after sync
 
-        if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){
-            darkSendPool.DoAutomaticDenominating();
+            if(c % 60 == 0)
+            {
+                LOCK(cs_main);
+                /*
+                    cs_main is required for doing CMasternode.Check because something
+                    is modifying the coins view without a mempool lock. It causes
+                    segfaults from this code without the cs_main lock.
+                */
+                mnodeman.CheckAndRemove();
+                mnodeman.ProcessMasternodeConnections();
+                masternodePayments.CleanPaymentList();
+                CleanTransactionLocksList();
+            }
+
+            if(c % 60 == 0){
+                //if we've used 1/5 of the Masternode list, then clear the list.
+                if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
+                    vecMasternodesUsed.clear();
+            }
+
+            if(c % MASTERNODES_DUMP_SECONDS == 0) DumpMasternodes();
+
+            darkSendPool.CheckTimeout();
+            darkSendPool.CheckForCompleteQueue();
+
+            if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){
+                darkSendPool.DoAutomaticDenominating();
+            }
         }
     }
 }
diff --git a/src/init.cpp b/src/init.cpp
index 509bb1007fc7..1cba9f256198 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1490,7 +1490,6 @@ bool AppInit2(boost::thread_group& threadGroup)
             return InitError(_("You must specify a masternodeprivkey in the configuration. Please see documentation for help."));
         }
 
-        if(Params().NetworkID() != CBaseChainParams::REGTEST) activeMasternode.ManageStatus();
     }
 
     if(GetBoolArg("-mnconflock", true)) {

From 6651abe343a2bf8ad65679edef9f563ae05cc270 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Jul 2015 09:27:34 +0300
Subject: [PATCH 1555/1819] lower mn reuse rate

---
 src/darksend.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index bf2fe8f432cc..85650e61ac6a 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2408,9 +2408,13 @@ void ThreadCheckDarkSendPool()
         }
 
         if(c % 60 == 0){
-            //if we've used 1/5 of the Masternode list, then clear the list.
-            if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
-                vecMasternodesUsed.clear();
+            //if we've used 90% of the Masternode list then drop all the oldest.
+            int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
+            if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+            while((int)vecMasternodesUsed.size() > nThreshold){
+                vecMasternodesUsed.erase(vecMasternodesUsed.begin());
+                if(fDebug) LogPrintf("  vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+            }
         }
 
         if(darkSendPool.GetState() == POOL_STATUS_IDLE && c % 6 == 0){

From 59271beabd98997d3d35c9c7f57f1717ac873ec5 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 14 Jul 2015 11:32:49 +0300
Subject: [PATCH 1556/1819] Fix
 CBudgetProposalBroadcast::IsBudgetCollateralValid log output / strError

---
 src/masternode-budget.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 38259b670438..cc22434eafc0 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -40,8 +40,8 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     CTransaction txCollateral;
     uint256 nBlockHash;
     if(!GetTransaction(nTxCollateralHash, txCollateral, nBlockHash, true)){
-        strError = "Can't find collateral tx %s\n", txCollateral.ToString().c_str();
-        LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Can't find collateral tx %s\n", txCollateral.ToString().c_str());
+        strError = strprintf("Can't find collateral tx %s", txCollateral.ToString());
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s\n", strError);
         return false;
     }
 
@@ -54,16 +54,16 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     bool foundOpReturn = false;
     BOOST_FOREACH(const CTxOut o, txCollateral.vout){
         if(!o.scriptPubKey.IsNormalPaymentScript() && !o.scriptPubKey.IsUnspendable()){
-            strError = "Invalid Script";
-            LogPrintf ("CBudgetProposalBroadcast::FeeTXValid - Invalid Script %s\n", txCollateral.ToString());
+            strError = strprintf("Invalid Script %s", txCollateral.ToString());
+            LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s\n", strError);
             return false;
         }
         if(o.scriptPubKey == findScript && o.nValue >= BUDGET_FEE_TX) foundOpReturn = true;
 
     }
     if(!foundOpReturn){
-        strError = "Couldn't find opReturn";
-        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Couldn't find opReturn %s\n", txCollateral.ToString());
+        strError = strprintf("Couldn't find opReturn %s", txCollateral.ToString());
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s\n", strError);
         return false;
     }
 
@@ -79,8 +79,8 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     }
 
     if(conf < BUDGET_FEE_CONFIRMATIONS){
-        strError = "Collateral requires at least 6 confirmations - " + boost::lexical_cast<std::string>(conf) + " confirmations ";
-        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Collateral requires at least 6 confirmations - %s - %d confirmations\n", txCollateral.GetHash().ToString(), conf);
+        strError = strprintf("Collateral requires at least %d confirmations - %d confirmations", BUDGET_FEE_CONFIRMATIONS, conf);
+        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s - %d confirmations\n", strError, conf);
         return false;
     }
 

From bd3ed5c280babc71ee43f6a2d250678071951c83 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 26 May 2015 08:59:13 +0200
Subject: [PATCH 1557/1819] Simplify code for CSubnet

Simplify the code by using CAddress.ip directly, instead of the reversed
GetByte() semantics.

Rebased-From: 19e8d7be42039724b4893515ec6457d0187024a9
Github-Pull: #6186
---
 src/netbase.cpp | 14 ++++++--------
 src/netbase.h   |  2 ++
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 3ec4d6c44154..21c59af72133 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1214,12 +1214,12 @@ 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));
@@ -1233,12 +1233,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
                 {
@@ -1258,7 +1256,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 234a8f258e4f..2a2f150c073a 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

From 07053c3ada60e844bc3a88478511c63963170360 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Tue, 26 May 2015 08:59:20 +0200
Subject: [PATCH 1558/1819] Fix two problems in CSubNet parsing

Fix two CSubNet constructor problems:

- The use of `/x` where 8 does not divide x was broken, due to a
  bit-order issue

- The use of e.g. `1.2.3.4/24` where the netmasked bits in the network
  are not 0 was broken. Fix this by explicitly normalizing the netwok
  according to the bitmask.

Also add tests for these cases.

Fixes #6179. Thanks to @jonasschnelli for reporting and initial fix.

Rebased-From: b45c50ce511dbf541ea086ae40a3ad16ff06de0c
Github-Pull: #6186
---
 src/netbase.cpp            | 6 +++++-
 src/test/netbase_tests.cpp | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/netbase.cpp b/src/netbase.cpp
index 21c59af72133..02e9d96ccaf1 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1222,7 +1222,7 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
                     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
                 {
@@ -1249,6 +1249,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
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp
index 36b63a94c116..9384732405a8 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")));

From d2ccd08ef155e33aaf85a16c0007080f6e64aded Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 18 May 2015 11:21:32 +0200
Subject: [PATCH 1559/1819] Parameter interaction: disable upnp if -proxy set

To protect privacy, do not use UPNP when a proxy is set. The user may
still specify -listen=1 to listen locally (for a hidden service), so
don't rely on this happening through -listen.

Fixes #2927.

Conflicts:
	src/init.cpp

Rebased-From: 8c35b6f3be218101630101806300cfd75be23f58
Github-Pull: #6153
---
 src/init.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 509bb1007fc7..380e8c51b481 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -659,7 +659,11 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (mapArgs.count("-proxy")) {
         // to protect privacy, do not listen by default if a default proxy server is specified
         if (SoftSetBoolArg("-listen", false))
-            LogPrintf("AppInit2 : parameter interaction: -proxy set -> setting -listen=0\n");
+            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("AppInit2 : parameter interaction: -proxy set -> setting -discover=0\n");

From 2fc7256f729e110b2555835455b32400d72f8e25 Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sun, 31 May 2015 06:53:27 +0000
Subject: [PATCH 1560/1819] Remove P2SH coinbase flag, no longer interesting

Github-Pull: #6203
Rebased-From: d449772cf69c01932fc5d72c46054815d6300b3c
---
 src/init.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 380e8c51b481..e03c6a0ee3f3 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -750,12 +750,6 @@ bool AppInit2(boost::thread_group& threadGroup)
     if (nConnectTimeout <= 0)
         nConnectTimeout = DEFAULT_CONNECT_TIMEOUT;
 
-    // Continue to put "/P2SH/" in the coinbase to monitor
-    // BIP16 support.
-    // This can be removed eventually...
-    const char* pszP2SH = "/P2SH/";
-    COINBASE_FLAGS << std::vector<unsigned char>(pszP2SH, pszP2SH+strlen(pszP2SH));
-
     // Fee-per-kilobyte amount considered the same as "free"
     // If you are mining, be careful setting this:
     // if you set it to zero then

From c709b86a5d777c037a97069b8450a9f8fcb42b8e Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Wed, 3 Jun 2015 09:42:03 +0200
Subject: [PATCH 1561/1819] json: fail read_string if string contains trailing
 garbage

Change `read_string` to fail when not the entire input has been
consumed. This avoids unexpected, even dangerous behavior (fixes #6223).

The new JSON parser adapted in #6121 also solves this problem so in
master this is a temporary fix, but should be backported to older releases.

Also adds tests for the new behavior.

Github-Pull: #6226
Rebased-From: 4e157fc60dae5ca69933ea4c1585a2a078b4d957
---
 src/json/json_spirit_reader_template.h |  6 +++---
 src/test/rpc_tests.cpp                 | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/src/json/json_spirit_reader_template.h b/src/json/json_spirit_reader_template.h
index 46f5892f62dd..47e3c1ca8438 100644
--- a/src/json/json_spirit_reader_template.h
+++ b/src/json/json_spirit_reader_template.h
@@ -521,12 +521,11 @@ namespace json_spirit
      
         const spirit_namespace::parse_info< Iter_type > info = 
                             spirit_namespace::parse( begin, end, 
-                                                    Json_grammer< Value_type, Iter_type >( semantic_actions ), 
+                                                    Json_grammer< Value_type, Iter_type >( semantic_actions ) >> spirit_namespace::end_p,
                                                     spirit_namespace::space_p );
 
         if( !info.hit )
         {
-            assert( false ); // in theory exception should already have been thrown
             throw_error( info.stop, "error" );
         }
 
@@ -570,7 +569,8 @@ namespace json_spirit
     {
         typename String_type::const_iterator begin = s.begin();
 
-        return read_range( begin, s.end(), value );
+        bool success = read_range( begin, s.end(), value );
+        return success && begin == s.end();
     }
 
     template< class Istream_type >
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index d5475a92bfa4..aed6e3ac2150 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -139,6 +139,24 @@ BOOST_AUTO_TEST_CASE(rpc_parse_monetary_values)
     BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.99999999")), 2099999999999999LL);
 }
 
+BOOST_AUTO_TEST_CASE(json_parse_errors)
+{
+    Value value;
+    // Valid
+    BOOST_CHECK_EQUAL(read_string(std::string("1.0"), value), true);
+    // Valid, with trailing whitespace
+    BOOST_CHECK_EQUAL(read_string(std::string("1.0 "), value), true);
+    // Invalid, initial garbage
+    BOOST_CHECK_EQUAL(read_string(std::string("[1.0"), value), false);
+    BOOST_CHECK_EQUAL(read_string(std::string("a1.0"), value), false);
+    // Invalid, trailing garbage
+    BOOST_CHECK_EQUAL(read_string(std::string("1.0sds"), value), false);
+    BOOST_CHECK_EQUAL(read_string(std::string("1.0]"), value), false);
+    // BTC addresses should fail parsing
+    BOOST_CHECK_EQUAL(read_string(std::string("175tWpb8K1S7NmH4Zx6rewF9WQrcZv245W"), value), false);
+    BOOST_CHECK_EQUAL(read_string(std::string("3J98t1WpEZ73CNmQviecrnyiWrnqRhWNL"), value), false);
+}
+
 BOOST_AUTO_TEST_CASE(rpc_boostasiotocnetaddr)
 {
     // Check IPv4 addresses

From cee7c2e1f36dca30cbc5d2f3e5221fc890ad8f0e Mon Sep 17 00:00:00 2001
From: Luke Dashjr <luke-jr+git@utopios.org>
Date: Sat, 6 Jun 2015 14:23:38 +0000
Subject: [PATCH 1562/1819] configure: Detect (and reject) LibreSSL

Rebased-From: a5a81f7354b3aa3e797d973a7e6840f0e50e6533
Github-Pull: #6244
---
 configure.ac | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8ba50a6baa0f..88feafb759f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -701,6 +701,14 @@ else
   fi
 fi
 
+AC_CHECK_LIB([crypto],[RAND_egd],[],[
+  AC_ARG_WITH([libressl],
+    [AS_HELP_STRING([--with-libressl],[Build with system LibreSSL (default is no; DANGEROUS; NOT SUPPORTED)])],
+    [AC_MSG_WARN([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])],
+    [AC_MSG_ERROR([Detected LibreSSL: This is NOT supported, and may break consensus compatibility!])]
+  )
+])
+
 CFLAGS_TEMP="$CFLAGS"
 LIBS_TEMP="$LIBS"
 CFLAGS="$CFLAGS $SSL_CFLAGS $CRYPTO_CFLAGS"

From 84b483e3c31ea79fe5dc37d251e12bf99c58f092 Mon Sep 17 00:00:00 2001
From: Tom Harding <tomh@thinlink.com>
Date: Fri, 12 Jun 2015 14:07:43 -0700
Subject: [PATCH 1563/1819] Fix getbalance *

Chance "getbalance *" not to use IsTrusted.  The method and result
now match the "getbalance <specific-account>" behavior. In
particular, "getbalance * 0" now works.

Also fixed a comment -- GetGalance has required 1 confirmation
for many years, and the default "getbalance *" behavior matches
that.

Github-Pull: #6276
Rebased-From: 7d6a85ab5b1dc96e0f3f6f835f27bb81ba2af919
Rebased-By: @trasher-
---
 src/rpcwallet.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 5782e4243352..2658b66b24d7 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -667,12 +667,12 @@ Value getbalance(const Array& params, bool fHelp)
     if (params[0].get_str() == "*") {
         // Calculate total balance a different way from GetBalance()
         // (GetBalance() sums up all unspent TxOuts)
-        // getbalance and getbalance '*' 0 should return the same number
+        // getbalance and "getbalance * 1 true" should return the same number
         CAmount nBalance = 0;
         for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
         {
             const CWalletTx& wtx = (*it).second;
-            if (!wtx.IsTrusted() || wtx.GetBlocksToMaturity() > 0)
+            if (!IsFinalTx(wtx) || wtx.GetBlocksToMaturity() > 0 || wtx.GetDepthInMainChain() < 0)
                 continue;
 
             CAmount allFee;

From 850dcb9334077bf7511f60cf1a1e7cd0c205fbad Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Fri, 12 Jun 2015 12:00:39 +0200
Subject: [PATCH 1564/1819] Add option `-alerts` to opt out of alert system

Make it possible to opt-out of the centralized alert system by providing
an option `-noalerts` or `-alerts=0`. The default remains unchanged.

This is a gentler form of #6260, in which I went a bit overboard by
removing the alert system completely.

I intend to add this to the GUI options in another pull after this.

Conflicts:
	src/init.cpp
	src/main.cpp

Github-Pull: #6274
Rebased-From: 02a6702a82a5b00e0e0351041dd3267308b7f319
---
 src/init.cpp | 3 +++
 src/main.cpp | 4 ++--
 src/main.h   | 3 +++
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index e03c6a0ee3f3..71bd17334a49 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -277,6 +277,7 @@ std::string HelpMessage(HelpMessageMode mode)
     string strUsage = _("Options:") + "\n";
     strUsage += "  -?                     " + _("This help message") + "\n";
     strUsage += "  -alertnotify=<cmd>     " + _("Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)") + "\n";
+    strUsage += "  -alerts                " + strprintf(_("Receive and display P2P network alerts (default: %u)"), DEFAULT_ALERTS);
     strUsage += "  -blocknotify=<cmd>     " + _("Execute command when the best block changes (%s in cmd is replaced by block hash)") + "\n";
     strUsage += "  -checkblocks=<n>       " + strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288) + "\n";
     strUsage += "  -checklevel=<n>        " + strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3) + "\n";
@@ -812,6 +813,8 @@ bool AppInit2(boost::thread_group& threadGroup)
     fIsBareMultisigStd = GetArg("-permitbaremultisig", true) != 0;
     nMaxDatacarrierBytes = GetArg("-datacarriersize", nMaxDatacarrierBytes);
 
+    fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS);
+
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
 
     // Sanity check
diff --git a/src/main.cpp b/src/main.cpp
index fba87a558a63..b3336259dd9f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -62,7 +62,7 @@ bool fTxIndex = false;
 bool fIsBareMultisigStd = true;
 bool fCheckBlockIndex = false;
 unsigned int nCoinCacheSize = 5000;
-
+bool fAlerts = DEFAULT_ALERTS;
 
 /** Fees smaller than this (in duffs) are considered zero fee (for relaying and mining)
  * We are ~100 times smaller then bitcoin now (2015-06-23), set minRelayTxFee only 10 times higher
@@ -4958,7 +4958,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
     }
 
 
-    else if (strCommand == "alert")
+    else if (fAlerts && strCommand == "alert")
     {
         CAlert alert;
         vRecv >> alert;
diff --git a/src/main.h b/src/main.h
index 78af04a9598b..02cceca162f2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -55,6 +55,8 @@ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000;
 static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0;
 /** Default for -blockprioritysize, maximum space for zero/low-fee transactions **/
 static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 50000;
+/** Default for accepting alerts from the P2P network. */
+static const bool DEFAULT_ALERTS = true;
 /** The maximum size for transactions we're willing to relay/mine */
 static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
 /** The maximum allowed number of signature check operations in a block (network rule) */
@@ -130,6 +132,7 @@ extern bool fIsBareMultisigStd;
 extern bool fCheckBlockIndex;
 extern unsigned int nCoinCacheSize;
 extern CFeeRate minRelayTxFee;
+extern bool fAlerts;
 
 extern bool fLargeWorkForkFound;
 extern bool fLargeWorkInvalidChainFound;

From 3f556edc61156f8d7fa17d6c6f13d83456a89828 Mon Sep 17 00:00:00 2001
From: "Wladimir J. van der Laan" <laanwj@gmail.com>
Date: Mon, 22 Jun 2015 08:52:11 +0200
Subject: [PATCH 1565/1819] doc: update mailing list address

Move from sourceforge to linux foundation.

Also get rid of some other stale mentions of sourceforge.

Github-Pull: #6319
Rebased-From: 88d8525ca2ff2afc171cd0f625a098371f3a6af5
---
 contrib/debian/copyright                        | 3 +--
 contrib/gitian-downloader/linux-download-config | 2 +-
 contrib/gitian-downloader/win32-download-config | 2 +-
 doc/dnsseed-policy.md                           | 3 ++-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/debian/copyright b/contrib/debian/copyright
index a6ee201991cc..b45222e5d30f 100644
--- a/contrib/debian/copyright
+++ b/contrib/debian/copyright
@@ -2,8 +2,7 @@ Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
 Upstream-Name: Bitcoin
 Upstream-Contact: Satoshi Nakamoto <satoshin@gmx.com>
  irc://#bitcoin@freenode.net
-Source: http://sourceforge.net/projects/bitcoin/files/
- https://github.com/bitcoin/bitcoin
+Source: https://github.com/bitcoin/bitcoin
 
 Files: *
 Copyright: 2009-2012, Bitcoin Core Developers
diff --git a/contrib/gitian-downloader/linux-download-config b/contrib/gitian-downloader/linux-download-config
index f5e6382b846d..4c037795267d 100644
--- a/contrib/gitian-downloader/linux-download-config
+++ b/contrib/gitian-downloader/linux-download-config
@@ -3,7 +3,7 @@ name: bitcoin
 urls:
 - http://bitcoin.org/bitcoin-latest-linux-gitian.zip
 rss:
-- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss
+- url: 
   xpath: //item/link/text()
   pattern: bitcoin-\d+.\d+.\d+-linux-gitian.zip
 signers:
diff --git a/contrib/gitian-downloader/win32-download-config b/contrib/gitian-downloader/win32-download-config
index 06c164180d50..083bce5de815 100644
--- a/contrib/gitian-downloader/win32-download-config
+++ b/contrib/gitian-downloader/win32-download-config
@@ -3,7 +3,7 @@ name: bitcoin
 urls:
 - http://bitcoin.org/bitcoin-latest-win32-gitian.zip
 rss:
-- url: http://sourceforge.net/api/file/index/project-id/244765/mtime/desc/limit/100/rss
+- url: 
   xpath: //item/link/text()
   pattern: bitcoin-\d+.\d+.\d+-win32-gitian.zip
 signers:
diff --git a/doc/dnsseed-policy.md b/doc/dnsseed-policy.md
index 66a1757ac5e7..e6b4e6df5af6 100644
--- a/doc/dnsseed-policy.md
+++ b/doc/dnsseed-policy.md
@@ -45,7 +45,8 @@ related to the DNS seed operation.
 
 If these expectations cannot be satisfied the operator should
 discontinue providing services and contact the active Bitcoin
-Core development team as well as posting on bitcoin-development.
+Core development team as well as posting on
+[bitcoin-dev](https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev).
 
 Behavior outside of these expectations may be reasonable in some
 situations but should be discussed in public in advance.

From 09a4cb65fc1f5ddebde410ed766eed31782291bf Mon Sep 17 00:00:00 2001
From: Alex Morcos <morcos@chaincode.com>
Date: Wed, 8 Apr 2015 08:57:19 -0500
Subject: [PATCH 1566/1819] Fix removing of orphan transactions

We don't want to erase orphans that still have missing inputs, they should still be tracked as orphans.  Also, the transaction thats being accepted can't be an orphan otherwise it would have previously been accepted, so doesn't need to be added to the erase queue.

Github-Pull: #5985
Rebased-From: 14d4eef79931318cb5968f9154cf458d9f8d27fa
---
 src/main.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index b3336259dd9f..e988ea58ba65 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4675,7 +4675,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             mempool.check(pcoinsTip);
             RelayTransaction(tx);
             vWorkQueue.push_back(inv.hash);
-            vEraseQueue.push_back(inv.hash);
 
             LogPrint("mempool", "AcceptToMemoryPool: peer=%d %s : accepted %s (poolsz %u)\n",
                 pfrom->id, pfrom->cleanSubVer,
@@ -4702,7 +4701,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                     // anyone relaying LegitTxX banned)
                     CValidationState stateDummy;
 
-                    vEraseQueue.push_back(orphanHash);
 
                     if (setMisbehaving.count(fromPeer))
                         continue;
@@ -4711,6 +4709,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                         LogPrint("mempool", "   accepted orphan tx %s\n", orphanHash.ToString());
                         RelayTransaction(orphanTx);
                         vWorkQueue.push_back(orphanHash);
+                        vEraseQueue.push_back(orphanHash);
                     }
                     else if (!fMissingInputs2)
                     {
@@ -4722,8 +4721,10 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                             setMisbehaving.insert(fromPeer);
                             LogPrint("mempool", "   invalid orphan tx %s\n", orphanHash.ToString());
                         }
-                        // too-little-fee orphan
+                        // Has inputs but not accepted to mempool
+                        // Probably non-standard or insufficient fee/priority
                         LogPrint("mempool", "   removed orphan tx %s\n", orphanHash.ToString());
+                        vEraseQueue.push_back(orphanHash);
                     }
                     mempool.check(pcoinsTip);
                 }

From c2ffbe5bdde6a987e8ed902dd480fb00373aaf9a Mon Sep 17 00:00:00 2001
From: Suhas Daftuar <sdaftuar@gmail.com>
Date: Thu, 21 May 2015 13:29:09 -0400
Subject: [PATCH 1567/1819] Ignore getheaders requests when not synced.

Rebased-From: a1ba0778dd3c784046dea334e5d39f37eca264f7
Github-Pull: #6172
---
 src/main.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/main.cpp b/src/main.cpp
index e988ea58ba65..84ff8160e083 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4576,6 +4576,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         LOCK(cs_main);
 
+        if (IsInitialBlockDownload())
+            return true;
+
         CBlockIndex* pindex = NULL;
         if (locator.IsNull())
         {

From e57f2d40037a3ce5391bed09c2bae1862651826a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 07:05:33 -0700
Subject: [PATCH 1568/1819] Check IsValid when preparing fee

---
 src/rpcmasternode-budget.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index bcfb524a4646..39536e81ccfd 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -93,6 +93,11 @@ Value mnbudget(const Array& params, bool fHelp)
         //*************************************************************************
 
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
+
+        std::string strError = "";
+        if(!budgetProposalBroadcast.IsValid(strError))
+            return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
+
         std::string cmd = "tx";
         bool useIX = true;
 

From c2d4b553c564f1ffc1cb58e15b6b5fbcf638c1ea Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 08:04:07 -0700
Subject: [PATCH 1569/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8ba50a6baa0f..43010a0988c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 15)
+define(_CLIENT_VERSION_BUILD, 16)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 68d5ea3891a5..920dc9088305 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 15
+#define CLIENT_VERSION_BUILD 16
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 50d1b827ebb668d53a68cc3fd959d0ee81b7ea9a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 12:52:46 -0700
Subject: [PATCH 1570/1819] Fixed proposal fee IX confirmations

---
 src/masternode-budget.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index cc22434eafc0..659ca66024d5 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -67,13 +67,13 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
         return false;
     }
 
-    int conf = -1;
+    int conf = GetIXConfirmations(nTxCollateralHash);
     if (nBlockHash != 0) {
         BlockMap::iterator mi = mapBlockIndex.find(nBlockHash);
         if (mi != mapBlockIndex.end() && (*mi).second) {
             CBlockIndex* pindex = (*mi).second;
             if (chainActive.Contains(pindex)) {
-                conf =  GetIXConfirmations(nTxCollateralHash) + (1 + chainActive.Height() - pindex->nHeight);
+                conf += (1 + chainActive.Height() - pindex->nHeight);
             }
         }
     }

From a4e3031db1fbcbddc7cb8bcc913cdc0300c8e102 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 15:52:07 -0700
Subject: [PATCH 1571/1819] Refactored CleanAndRemove Proposals

---
 src/masternode-budget.cpp    | 96 ++++++++++++++++++++++--------------
 src/masternode-budget.h      |  4 ++
 src/rpcmasternode-budget.cpp | 11 ++++-
 3 files changed, 72 insertions(+), 39 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 659ca66024d5..66dc5533d3b9 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -374,11 +374,12 @@ void CBudgetManager::CheckAndRemove()
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
         if(!pfinalizedBudget->IsValid()){
-            mapFinalizedBudgets.erase(it++);
+            pfinalizedBudget->fValid = false;
         } else {
+            pfinalizedBudget->fValid = true;
             pfinalizedBudget->AutoCheck();
-            ++it;
         }
+        ++it;
     }
 
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
@@ -386,10 +387,11 @@ void CBudgetManager::CheckAndRemove()
     {
         CBudgetProposal* pbudgetProposal = &((*it2).second);
         if(!pbudgetProposal->IsValid(strError)){
-            mapProposals.erase(it2++);
+            pbudgetProposal->fValid = false;
         } else {
-            ++it2;
+            pbudgetProposal->fValid = true;
         }
+        ++it2;
     }
 }
 
@@ -691,17 +693,26 @@ void CBudgetManager::NewBlock()
 
     //remove invalid votes once in a while (we have to check the signatures and validity of every vote, somewhat CPU intensive)
 
-    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
-    while(it != mapProposals.end()){
-        (*it).second.CleanAndRemove();
-        ++it;
+    std::map<uint256, int64_t>::iterator it = askedForSourceProposalOrBudget.begin();
+    while(it != askedForSourceProposalOrBudget.end()){
+        if((*it).second > GetTime() - (60*60*24)){
+            ++it;
+        } else {
+            askedForSourceProposalOrBudget.erase(it++);
+        }
     }
 
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end()){
+    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
+    while(it2 != mapProposals.end()){
         (*it2).second.CleanAndRemove();
         ++it2;
     }
+
+    std::map<uint256, CFinalizedBudget>::iterator it3 = mapFinalizedBudgets.begin();
+    while(it3 != mapFinalizedBudgets.end()){
+        (*it3).second.CleanAndRemove();
+        ++it3;
+    }
 }
 
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -876,36 +887,37 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         CBudgetProposal* pbudgetProposal = budget.FindProposal((*it1).first);
         if(pbudgetProposal && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mprop", ((*it1).second));
+        
+            //send votes
+            std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
+            while(it2 != pbudgetProposal->mapVotes.end()){
+                if((*it2).second.fValid){
+                    pfrom->PushMessage("mvote", ((*it2).second));
+                }
+                it2++;
+            }
         }
         it1++;
     }
 
-    std::map<uint256, CBudgetVote>::iterator it2 = mapSeenMasternodeBudgetVotes.begin();
-    while(it2 != mapSeenMasternodeBudgetVotes.end()){
-        CBudgetProposal* pbudgetProposal = budget.FindProposal((*it2).second.nProposalHash);
-        if(pbudgetProposal && (nProp == 0 || (*it1).first == nProp)){
-            pfrom->PushMessage("mvote", ((*it2).second));
-        }
-        it2++;
-    }
 
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it3).first);
-        if(pfinalizedBudget && (nProp == 0 || (*it1).first == nProp)){
+        if(pfinalizedBudget && (nProp == 0 || (*it3).first == nProp)){
             pfrom->PushMessage("fbs", ((*it3).second));
+
+            //send votes
+            std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
+            while(it4 != pfinalizedBudget->mapVotes.end()){
+                if((*it4).second.fValid)
+                    pfrom->PushMessage("fbvote", ((*it4).second));
+                it4++;
+            }
         }
         it3++;
     }
 
-    std::map<uint256, CFinalizedBudgetVote>::iterator it4 = mapSeenFinalizedBudgetVotes.begin();
-    while(it4 != mapSeenFinalizedBudgetVotes.end()){
-        CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it4).second.nBudgetHash);
-        if(pfinalizedBudget && (nProp == 0 || (*it1).first == nProp)){
-            pfrom->PushMessage("fbvote", ((*it4).second));
-        }
-        it4++;
-    }
 }
 
 bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
@@ -937,7 +949,7 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
         if(pfrom){
-            LogPrintf("Unknown Finalized Proposal %s, Asking for source proposal\n", vote.nBudgetHash.ToString().c_str());
+            LogPrintf("Unknown Finalized Proposal %s, Asking for source budget\n", vote.nBudgetHash.ToString().c_str());
             mapOrphanFinalizedBudgetVotes[vote.nBudgetHash] = vote;
 
             if(!askedForSourceProposalOrBudget.count(vote.nBudgetHash)){
@@ -960,6 +972,7 @@ CBudgetProposal::CBudgetProposal()
     nBlockEnd = 0;
     nAmount = 0;
     nTime = 0;
+    fValid = true;
 }
 
 CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn)
@@ -972,6 +985,7 @@ CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strU
     nAmount = nAmountIn;
     nTime = 0;
     nFeeTXHash = nFeeTXHashIn;
+    fValid = true;
 }
 
 CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
@@ -985,6 +999,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
     nTime = other.nTime;
     nFeeTXHash = other.nFeeTXHash;
     mapVotes = other.mapVotes;
+    fValid = true;
 }
 
 bool CBudgetProposal::IsValid(std::string& strError)
@@ -1044,11 +1059,11 @@ void CBudgetProposal::CleanAndRemove()
     while(it != mapVotes.end()) {
         if ((*it).second.SignatureValid())
         {
-            ++it;
+            (*it).second.fValid = true;
         } else {
-            mapSeenMasternodeBudgetVotes.erase((*it).first);
-            mapVotes.erase(it++);
+            (*it).second.fValid = false;
         }
+        ++it;
     }
 }
 
@@ -1076,7 +1091,7 @@ int CBudgetProposal::GetYeas()
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
-        if ((*it).second.nVote == VOTE_YES) ret++;
+        if ((*it).second.nVote == VOTE_YES && (*it).second.fValid) ret++;
         ++it;
     }
 
@@ -1089,7 +1104,7 @@ int CBudgetProposal::GetNays()
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
-        if ((*it).second.nVote == VOTE_NO) ret++;
+        if ((*it).second.nVote == VOTE_NO && (*it).second.fValid) ret++;
         ++it;
     }
 
@@ -1102,7 +1117,7 @@ int CBudgetProposal::GetAbstains()
 
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
     while(it != mapVotes.end()){
-        if ((*it).second.nVote == VOTE_ABSTAIN) ret++;
+        if ((*it).second.nVote == VOTE_ABSTAIN && (*it).second.fValid) ret++;
         ++it;
     }
 
@@ -1194,6 +1209,7 @@ CBudgetVote::CBudgetVote()
     nProposalHash = 0;
     nVote = VOTE_ABSTAIN;
     nTime = 0;
+    fValid = true;
 }
 
 CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
@@ -1202,6 +1218,7 @@ CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
     nProposalHash = nProposalHashIn;
     nVote = nVoteIn;
     nTime = GetAdjustedTime();
+    fValid = true;
 }
 
 void CBudgetVote::Relay()
@@ -1256,9 +1273,9 @@ CFinalizedBudget::CFinalizedBudget()
     vecProposals.clear();
     mapVotes.clear();
     nFeeTXHash = 0;
+    fValid = true;
 }
 
-
 CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
 {
     strBudgetName = other.strBudgetName;
@@ -1266,6 +1283,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
     vecProposals = other.vecProposals;
     mapVotes = other.mapVotes;
     nFeeTXHash = other.nFeeTXHash;
+    fValid = true;
 }
 
 void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
@@ -1330,11 +1348,11 @@ void CFinalizedBudget::CleanAndRemove()
     while(it != mapVotes.end()) {
         if ((*it).second.SignatureValid())
         {
-            ++it;
+            (*it).second.fValid = true;
         } else {
-            mapSeenFinalizedBudgetVotes.erase((*it).first);
-            mapVotes.erase(it++);
+            (*it).second.fValid = false;
         }
+        ++it;
     }
 }
 
@@ -1514,6 +1532,7 @@ CFinalizedBudgetVote::CFinalizedBudgetVote()
     nBudgetHash = 0;
     nTime = 0;
     vchSig.clear();
+    fValid = true;
 }
 
 CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
@@ -1522,6 +1541,7 @@ CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
     nBudgetHash = nBudgetHashIn;
     nTime = GetAdjustedTime();
     vchSig.clear();
+    fValid = true;
 }
 
 void CFinalizedBudgetVote::Relay()
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 7107360b1184..4577e0a2b93f 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -188,6 +188,7 @@ class CFinalizedBudget
     bool fAutoChecked; //If it matches what we see, we'll auto vote for it (masternode only)
 
 public:
+    bool fValid;
     std::string strBudgetName;
     int nBlockStart;
     std::vector<CTxBudgetPayment> vecProposals;
@@ -295,6 +296,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
 class CFinalizedBudgetVote
 {
 public:
+    bool fValid; //if the vote is currently valid / counted
     CTxIn vin;
     uint256 nBudgetHash;
     int64_t nTime;
@@ -339,6 +341,7 @@ class CBudgetProposal
     int64_t nAlloted;
 
 public:
+    bool fValid;
     std::string strProposalName;
 
     /*
@@ -456,6 +459,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 class CBudgetVote
 {
 public:
+    bool fValid; //if the vote is currently valid / counted
     CTxIn vin;
     uint256 nProposalHash;
     int nVote;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 39536e81ccfd..c3953c281062 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -327,12 +327,18 @@ Value mnbudget(const Array& params, bool fHelp)
 
     if(strCommand == "show")
     {
+        std::string strShow = "valid";
+        if (params.size() == 2)
+            std::string strProposalName = params[1].get_str();
+
         Object resultObj;
         int64_t nTotalAllotted = 0;
 
         std::vector<CBudgetProposal*> winningProps = budget.GetAllProposals();
         BOOST_FOREACH(CBudgetProposal* pbudgetProposal, winningProps)
         {
+            if(strShow == "valid" && !pbudgetProposal->fValid) continue;
+
             nTotalAllotted += pbudgetProposal->GetAllotted();
 
             CTxDestination address1;
@@ -342,6 +348,7 @@ Value mnbudget(const Array& params, bool fHelp)
             Object bObj;
             bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
             bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString().c_str()));
             bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
             bObj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
@@ -355,7 +362,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-
+            bObj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
 
             resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }
@@ -381,6 +388,7 @@ Value mnbudget(const Array& params, bool fHelp)
         Object obj;
         obj.push_back(Pair("Name",  pbudgetProposal->GetName().c_str()));
         obj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+        obj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString().c_str()));
         obj.push_back(Pair("URL",  pbudgetProposal->GetURL().c_str()));
         obj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
         obj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
@@ -395,6 +403,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
         std::string strError = "";
         obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+        obj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
 
         return obj;
     }

From 9e9e01b5f66e158ddca5217cc3808bdeb74bda76 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 16:06:00 -0700
Subject: [PATCH 1572/1819] Fixed GetBudget

---
 src/masternode-budget.cpp    | 2 +-
 src/rpcmasternode-budget.cpp | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 66dc5533d3b9..77196b62703e 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -593,7 +593,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         CBudgetProposal* pbudgetProposal = &((*it2).second);
 
         //prop start/end should be inside this period
-        if(pbudgetProposal->nBlockStart <= nBlockStart && pbudgetProposal->nBlockEnd >= nBlockEnd && pbudgetProposal->GetYeas()-pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
+        if(pbudgetProposal->fValid && pbudgetProposal->nBlockStart <= nBlockStart && pbudgetProposal->nBlockEnd >= nBlockEnd && pbudgetProposal->GetYeas()-pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
         {
             if(nTotalBudget == nBudgetAllocated){
                 pbudgetProposal->SetAllotted(0);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index c3953c281062..efaf39f62402 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -318,6 +318,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+            bObj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
 
             resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
         }

From 6e0a46870190a1a378aa0c65c8677b9d9989e387 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 19:44:58 -0700
Subject: [PATCH 1573/1819] Highly improved syncing process

---
 src/Makefile.am             |   2 +
 src/darksend.cpp            |  63 +---------------
 src/darksend.h              |   5 +-
 src/masternode-budget.cpp   |  35 ++++-----
 src/masternode-payments.cpp |  15 ++--
 src/masternode-sync.cpp     | 140 ++++++++++++++++++++++++++++++++++++
 src/masternode-sync.h       |  55 ++++++++++++++
 src/rpcmasternode.cpp       |   5 ++
 8 files changed, 232 insertions(+), 88 deletions(-)
 create mode 100644 src/masternode-sync.cpp
 create mode 100644 src/masternode-sync.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 764916d62ca8..075867eff9e2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -110,6 +110,7 @@ BITCOIN_CORE_H = \
   masternode.h \
   masternode-payments.h \
   masternode-budget.h \
+  masternode-sync.h \
   masternodeman.h \
   masternodeconfig.h \
   merkleblock.h \
@@ -284,6 +285,7 @@ libbitcoin_common_a_SOURCES = \
   darksend-relay.cpp \
   masternode.cpp \
   masternode-budget.cpp \
+  masternode-sync.cpp \
   masternode-payments.cpp \
   masternodeman.cpp \
   masternodeconfig.cpp \
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6d0c5ec59c9e..6ea78dab8819 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -35,12 +35,6 @@ map<uint256, CDarksendBroadcastTx> mapDarksendBroadcastTxes;
 // Keep track of the active Masternode
 CActiveMasternode activeMasternode;
 
-// Count peers we've requested the list from
-int RequestedMasternodeAssets = 0;
-bool IsSyncingMasternodeAssets(){
-    return RequestedMasternodeAssets != MASTERNODE_LIST_SYNCED;
-}
-
 /* *** BEGIN DARKSEND MAGIC - DASH **********
     Copyright (c) 2014-2015, Dash Developers
         eduffield - evan@dashpay.io
@@ -2333,59 +2327,6 @@ void ThreadCheckDarkSendPool()
         MilliSleep(1000);
         //LogPrintf("ThreadCheckDarkSendPool::check timeout\n");
 
-        //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
-        if(c % 5 == 0 && RequestedMasternodeAssets <= 5){
-            bool fIsInitialDownload = IsInitialBlockDownload();
-            if(!fIsInitialDownload) {
-        
-                CBlockIndex* pindexPrev = chainActive.Tip();
-                if(pindexPrev != NULL) {
-                    if(pindexPrev->nTime > GetAdjustedTime() - 600)
-                    {
-
-                        LOCK(cs_vNodes);
-                        BOOST_FOREACH(CNode* pnode, vNodes)
-                        {
-                            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) {        
-                                bool IsLocal = pnode->addr.IsRFC1918() || pnode->addr.IsLocal();
-                                if(!IsLocal) {
-                                    //keep track of who we've asked for the list
-                                    if(pnode->HasFulfilledRequest("mnsync")) continue;
-                                    pnode->FulfilledRequest("mnsync");
-                                }
-
-                                //request full mn list only if Masternodes.dat was updated quite a long time ago
-                                
-                                if(RequestedMasternodeAssets == 0 || RequestedMasternodeAssets == 1){   
-                                    LogPrintf("Successfully synced, asking for Masternode list\n");
-                                    mnodeman.DsegUpdate(pnode);
-                                    pnode->PushMessage("getsporks"); //get current network sporks
-                                }
-
-                                if(RequestedMasternodeAssets == 2 || RequestedMasternodeAssets == 3){
-                                    LogPrintf("Successfully synced, asking for Masternode payee list\n");
-                                    pnode->PushMessage("mnget"); //sync payees
-                                }
-                                
-                                if(RequestedMasternodeAssets == 4 || RequestedMasternodeAssets == 5){
-                                    LogPrintf("Successfully synced, asking for Masternode Budget votes / Finalized budgets\n");
-                                    uint256 n = 0;
-                                    pnode->PushMessage("mnvs", n); //sync masternode votes
-                                }
-
-                                RequestedMasternodeAssets++;
-                                break;
-                            }
-                        }
-                    }
-                }
-            }
-        } else if((c % 60 == 0 && RequestedMasternodeAssets >= 5 && RequestedMasternodeAssets < MASTERNODE_LIST_SYNCED) || //done syncing
-                  (c % (5 * 60) == 0 && RequestedMasternodeAssets < 5)) { //couldn't find 5 peers in 5 minutes
-            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED;
-            c = 1; // reset counter
-        }
-
         if(c % 60 == 0){
             //if we've used 90% of the Masternode list then drop all the oldest.
             int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
@@ -2396,7 +2337,9 @@ void ThreadCheckDarkSendPool()
             }
         }
 
-        if(RequestedMasternodeAssets == MASTERNODE_LIST_SYNCED) {
+        masternodeSync.Process();
+
+        if(masternodeSync.IsSynced()) {
             if(c % MASTERNODE_PING_SECONDS == 1) activeMasternode.ManageStatus(); // activate right after sync
 
             if(c % 60 == 0)
diff --git a/src/darksend.h b/src/darksend.h
index b81f9120f09b..4309d1635dba 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -11,6 +11,7 @@
 #include "masternodeman.h"
 #include "masternode-payments.h"
 #include "darksend-relay.h"
+#include "masternode-sync.h"
 
 class CTxIn;
 class CDarksendPool;
@@ -45,8 +46,6 @@ class CActiveMasternode;
 #define DARKSEND_RELAY_OUT                2
 #define DARKSEND_RELAY_SIG                3
 
-#define MASTERNODE_LIST_SYNCED            999
-
 static const int64_t DARKSEND_COLLATERAL = (0.01*COIN);
 static const int64_t DARKSEND_POOL_MAX = (999.99*COIN);
 
@@ -57,8 +56,6 @@ extern std::string strMasterNodePrivKey;
 extern map<uint256, CDarksendBroadcastTx> mapDarksendBroadcastTxes;
 extern CActiveMasternode activeMasternode;
 
-bool IsSyncingMasternodeAssets();
-
 // get the Darksend chain depth for a given input
 int GetRealInputDarksendRounds(CTxIn in, int rounds);
 // respect current settings
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 77196b62703e..0de618e202e9 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -9,6 +9,7 @@
 #include "masternode.h"
 #include "darksend.h"
 #include "masternodeman.h"
+#include "masternode-sync.h"
 #include "util.h"
 #include "addrman.h"
 #include <boost/filesystem.hpp>
@@ -726,15 +727,12 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         uint256 nProp;
         vRecv >> nProp;
 
-        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal();
-        if(!IsLocal && nProp == 0){
-            if(pfrom->HasFulfilledRequest("mnvs")) {
-                LogPrintf("mnvs - peer already asked me for the list\n");
-                Misbehaving(pfrom->GetId(), 20);
-                return;
-            }
-            pfrom->FulfilledRequest("mnvs");
+        if(pfrom->HasFulfilledRequest("mnvs")) {
+            LogPrintf("mnvs - peer already asked me for the list\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
         }
+        pfrom->FulfilledRequest("mnvs");
 
         budget.Sync(pfrom, nProp);
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString());
@@ -752,11 +750,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         budgetProposalBroadcast.nTime = GetAdjustedTime();
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError)){
-            LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
-            return;
-        }
-
         if(!budgetProposalBroadcast.IsValid(strError)) {
             LogPrintf("mprop - invalid budget proposal - %s\n", strError);
             return;
@@ -764,9 +757,15 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
+        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError)){
+            LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
+            return;
+        }
+
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
         budget.AddProposal(budgetProposal);
         budgetProposalBroadcast.Relay();
+        masternodeSync.AddedBudgetItem();
 
         //We might have active votes for this proposal that are valid now
         CheckOrphanVotes();
@@ -786,17 +785,19 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+
         if(!vote.SignatureValid()){
             LogPrintf("mvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(pmn->nVotedTimes < 100){
             budget.UpdateProposal(vote, pfrom);
             vote.Relay();
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+            if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
+            masternodeSync.AddedBudgetItem();
         } else {
             LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
@@ -827,6 +828,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
         budget.AddFinalizedBudget(finalizedBudget);
         finalizedBudgetBroadcast.Relay();
+        masternodeSync.AddedBudgetItem();
 
         //we might have active votes for this budget that are now valid
         CheckOrphanVotes();
@@ -856,7 +858,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(pmn->nVotedTimes < 100){
             budget.UpdateFinalizedBudget(vote, pfrom);
             vote.Relay();
-            if(!IsSyncingMasternodeAssets()) pmn->nVotedTimes++;
+            if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
+            masternodeSync.AddedBudgetItem();
         } else {
             LogPrintf("fbvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 31e9f5a6d72e..199213529361 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -4,6 +4,7 @@
 
 #include "masternode-payments.h"
 #include "masternode-budget.h"
+#include "masternode-sync.h"
 #include "masternodeman.h"
 #include "darksend.h"
 #include "util.h"
@@ -166,15 +167,12 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
     if (strCommand == "mnget") { //Masternode Payments Request Sync
         if(fLiteMode) return; //disable all Darksend/Masternode related functionality
 
-        bool IsLocal = pfrom->addr.IsRFC1918() || pfrom->addr.IsLocal();
-        if(!IsLocal){
-            if(pfrom->HasFulfilledRequest("mnget")) {
-                LogPrintf("mnget - peer already asked me for the list\n");
-                Misbehaving(pfrom->GetId(), 20);
-                return;
-            }
+        if(pfrom->HasFulfilledRequest("mnget")) {
+            LogPrintf("mnget - peer already asked me for the list\n");
+            Misbehaving(pfrom->GetId(), 20);
+            return;
         }
-
+        
         pfrom->FulfilledRequest("mnget");
         masternodePayments.Sync(pfrom);
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
@@ -217,6 +215,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(masternodePayments.AddWinningMasternode(winner)){
             winner.Relay();
+            masternodeSync.AddedMasternodeWinner();
         }
     }
 }
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
new file mode 100644
index 000000000000..40bffc5275ea
--- /dev/null
+++ b/src/masternode-sync.cpp
@@ -0,0 +1,140 @@
+// Copyright (c) 2014-2015 The Dash developers
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "main.h"
+#include "init.h"
+
+#include "masternode-sync.h"
+#include "masternode.h"
+#include "util.h"
+#include "addrman.h"
+
+class CMasternodeSync;
+CMasternodeSync masternodeSync;
+
+CMasternodeSync::CMasternodeSync()
+{
+    c = 0;
+    lastMasternodeList = 0;
+    lastMasternodeWinner = 0;
+    lastBudgetItem = 0;
+    RequestedMasternodeAssets = 0;
+    RequestedMasternodeAttempt = 0;
+}
+
+bool CMasternodeSync::IsSynced()
+{
+    return (RequestedMasternodeAssets == MASTERNODE_LIST_SYNCED);
+}
+
+void CMasternodeSync::AddedMasternodeList()
+{
+    lastMasternodeList = GetTime();
+}
+
+void CMasternodeSync::AddedMasternodeWinner()
+{
+    lastMasternodeWinner = GetTime();
+}
+
+void CMasternodeSync::AddedBudgetItem()
+{
+    lastBudgetItem = GetTime();
+}
+
+void CMasternodeSync::GetNextAsset()
+{
+    switch(RequestedMasternodeAssets)
+    {
+        case(MASTERNODE_INITIAL):
+            RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
+            break;
+        case(MASTERNODE_SYNC_LIST):
+            RequestedMasternodeAssets = MASTERNODE_SYNC_MNW;
+            break;
+        case(MASTERNODE_SYNC_MNW):
+            RequestedMasternodeAssets = MASTERNODE_SYNC_BUDGET;
+            break;
+        case(MASTERNODE_SYNC_BUDGET):
+            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED;
+            break;
+    }
+}
+
+void CMasternodeSync::Process() 
+{
+    if(IsSynced()) return;
+
+    //request full mn list only if Masternodes.dat was updated quite a long time ago
+    if(RequestedMasternodeAssets == MASTERNODE_INITIAL) GetNextAsset();
+
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return;
+
+    //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
+    if(c % 5 == 0){
+        LOCK(cs_vNodes);
+        BOOST_FOREACH(CNode* pnode, vNodes)
+        {
+            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) 
+            {
+                if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
+                    if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
+                        GetNextAsset();
+                        return;
+                    }
+
+                    if(pnode->HasFulfilledRequest("mnsync")) continue;
+                    pnode->FulfilledRequest("mnsync");
+
+                    if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - 5) && RequestedMasternodeAttempt <= 2){
+                        mnodeman.DsegUpdate(pnode);
+                        pnode->PushMessage("getsporks"); //get current network sporks
+                        AddedMasternodeList();
+                        RequestedMasternodeAttempt++;
+                    }
+                    return;
+                }
+
+                if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW){
+                    if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
+                        GetNextAsset();
+                        return;
+                    }
+
+                    if(pnode->HasFulfilledRequest("mnwsync")) continue;
+                    pnode->FulfilledRequest("mnwsync");
+
+                    if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - 5) && RequestedMasternodeAttempt <= 4){
+                        pnode->PushMessage("mnget"); //sync payees
+                        AddedMasternodeWinner();
+                        RequestedMasternodeAttempt++;
+                    }
+                    return;
+                }
+                
+                if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
+                    if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
+                        GetNextAsset();
+                        return;
+                    }
+
+                    if(pnode->HasFulfilledRequest("busync")) continue;
+                    pnode->FulfilledRequest("busync");
+
+                    if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - 5) && RequestedMasternodeAttempt <= 6){
+                        uint256 n = 0;
+
+                        pnode->PushMessage("mnvs", n); //sync masternode votes
+                        AddedBudgetItem();
+                        RequestedMasternodeAttempt++;
+                    }
+                    return;
+                }
+
+            }
+        }
+    }
+    c++;
+}
\ No newline at end of file
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
new file mode 100644
index 000000000000..de5664d0d91d
--- /dev/null
+++ b/src/masternode-sync.h
@@ -0,0 +1,55 @@
+// Copyright (c) 2014-2015 The Dash developers
+
+// Distributed under the MIT/X11 software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#ifndef MASTERNODE_SYNC_H
+#define MASTERNODE_SYNC_H
+
+#include "main.h"
+#include "sync.h"
+#include "net.h"
+#include "key.h"
+#include "masternodeman.h"
+#include "util.h"
+#include "base58.h"
+
+using namespace std;
+
+#define MASTERNODE_INITIAL                0
+#define MASTERNODE_SYNC_LIST              1
+#define MASTERNODE_SYNC_MNW               2
+#define MASTERNODE_SYNC_BUDGET            3
+#define MASTERNODE_LIST_SYNCED            999
+
+class CMasternodeSync;
+extern CMasternodeSync masternodeSync;
+
+//
+// CMasternodeSync : Sync masternode assets in stages
+//
+
+class CMasternodeSync
+{
+public:
+    int c;
+    int64_t lastMasternodeList;
+    int64_t lastMasternodeWinner;
+    int64_t lastBudgetItem;
+
+    // Count peers we've requested the list from
+    int RequestedMasternodeAssets;
+    int RequestedMasternodeAttempt;
+
+
+    CMasternodeSync();
+
+    void AddedMasternodeList();
+    void AddedMasternodeWinner();
+    void AddedBudgetItem();
+    void GetNextAsset();
+
+    void Process();
+    bool IsSynced();
+};
+
+#endif
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index cf96272e57f5..1376f89b39f5 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -499,6 +499,7 @@ Value masternodelist(const Array& params, bool fHelp)
                 "                   (can be additionally filtered, partial match)\n"
                 "  addr           - Print ip address associated with a masternode (can be additionally filtered, partial match)\n"
                 "  lastpaid       - The last time a node was paid on the network\n"
+                "  votes          - The amount of times this node has voted recently\n"
                 );
     }
 
@@ -570,6 +571,10 @@ Value masternodelist(const Array& params, bool fHelp)
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,      (int64_t)mn.GetLastPaid()));
+            } else if(strMode == "votes"){
+                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,      (int64_t)mn.nVotedTimes));
             }
         }
     }

From db080fec2228fe36923990284fdfa8573024e928 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 14 Jul 2015 19:49:01 -0700
Subject: [PATCH 1574/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0636022cc40c..87cf3ccb0903 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 16)
+define(_CLIENT_VERSION_BUILD, 17)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 920dc9088305..b3ef40bcc337 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 16
+#define CLIENT_VERSION_BUILD 17
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 21769085ec809940b8aa25d6f460fd3695622d22 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 15 Jul 2015 07:18:03 -0700
Subject: [PATCH 1575/1819] Test feeTX in IsValid

---
 src/masternode-budget.cpp | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 0de618e202e9..453bee9ddae5 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -749,19 +749,14 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         //set time we first saw this prop
         budgetProposalBroadcast.nTime = GetAdjustedTime();
 
+        mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
+
         std::string strError = "";
         if(!budgetProposalBroadcast.IsValid(strError)) {
             LogPrintf("mprop - invalid budget proposal - %s\n", strError);
             return;
         }
 
-        mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
-
-        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError)){
-            LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
-            return;
-        }
-
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
         budget.AddProposal(budgetProposal);
         budgetProposalBroadcast.Relay();
@@ -818,13 +813,13 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
+
         if(!finalizedBudgetBroadcast.IsValid()) {
             LogPrintf("fbs - invalid finalized budget\n");
             return;
         }
 
-        mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
-
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
         budget.AddFinalizedBudget(finalizedBudget);
         finalizedBudgetBroadcast.Relay();
@@ -1022,6 +1017,10 @@ bool CBudgetProposal::IsValid(std::string& strError)
         return false;
     }
 
+    if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
+        return false;
+    }
+
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
@@ -1436,6 +1435,11 @@ bool CFinalizedBudget::IsValid()
     //can only pay out 10% of the possible coins (min value of coins)
     if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
 
+    std::string strError = "";
+    if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
+        return false;
+    }
+
     //TODO: if N cycles old, invalid, invalid
 
     CBlockIndex* pindexPrev = chainActive.Tip();

From ffed6dc94893edfa38818fc5be5f1a1ed7511a42 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 15 Jul 2015 14:21:21 -0700
Subject: [PATCH 1576/1819] Added CBudgetManager::ToString

---
 src/masternode-budget.cpp | 12 ++++++++++++
 src/masternode-budget.h   |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 453bee9ddae5..df551b9f3199 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1596,3 +1596,15 @@ bool CFinalizedBudgetVote::SignatureValid()
 
     return true;
 }
+
+std::string CBudgetManager::ToString() const
+{
+    std::ostringstream info;
+
+    info << "Proposals: " << (int)mapProposals.size() <<
+            ", Budgets: " << (int)mapFinalizedBudgets.size();
+
+    return info.str();
+}
+
+
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 4577e0a2b93f..1595607760ce 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -133,7 +133,7 @@ class CBudgetManager
         mapSeenFinalizedBudgetVotes.clear();
     }
     void CheckAndRemove();
-    std::string ToString() {return "not implemented";}
+    std::string ToString() const;
 
 
     ADD_SERIALIZE_METHODS;

From f139dbbc74a33e11fd04bddfd3c3543e17077b9b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 15 Jul 2015 15:56:40 -0700
Subject: [PATCH 1577/1819] Fixed prepare -- shouldn't check collateral

---
 src/masternode-budget.cpp    | 16 ++++++++++------
 src/masternode-budget.h      |  4 ++--
 src/rpcmasternode-budget.cpp |  2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index df551b9f3199..3e3607c24f0f 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1000,7 +1000,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
     fValid = true;
 }
 
-bool CBudgetProposal::IsValid(std::string& strError)
+bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
 {
     if(GetYeas()-GetNays() < -(mnodeman.CountEnabled()/10)){
          strError = "Active removal";
@@ -1017,8 +1017,10 @@ bool CBudgetProposal::IsValid(std::string& strError)
         return false;
     }
 
-    if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
-        return false;
+    if(fCheckCollateral){
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
+            return false;
+        }
     }
 
     //if proposal doesn't gain traction within 2 weeks, remove it
@@ -1422,7 +1424,7 @@ std::string CFinalizedBudget::GetStatus()
     return retBadHashes + retBadPayeeOrAmount;
 }
 
-bool CFinalizedBudget::IsValid()
+bool CFinalizedBudget::IsValid(bool fCheckCollateral)
 {
     //must be the correct block for payment to happen (once a month)
     if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
@@ -1436,8 +1438,10 @@ bool CFinalizedBudget::IsValid()
     if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
 
     std::string strError = "";
-    if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
-        return false;
+    if(fCheckCollateral){
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
+            return false;
+        }
     }
 
     //TODO: if N cycles old, invalid, invalid
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 1595607760ce..014b44eba809 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -203,7 +203,7 @@ class CFinalizedBudget
     double GetScore();
     bool HasMinimumRequiredSupport();
 
-    bool IsValid();
+    bool IsValid(bool fCheckCollateral=true);
 
     std::string GetName() {return strBudgetName; }
     std::string GetProposals();
@@ -368,7 +368,7 @@ class CBudgetProposal
     bool HasMinimumRequiredSupport();
     std::pair<std::string, std::string> GetVotes();
 
-    bool IsValid(std::string& strError);
+    bool IsValid(std::string& strError, bool fCheckCollateral=true);
 
     std::string GetName() {return strProposalName; }
     std::string GetURL() {return strURL; }
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index efaf39f62402..10653f2efcdb 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -95,7 +95,7 @@ Value mnbudget(const Array& params, bool fHelp)
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
 
         std::string strError = "";
-        if(!budgetProposalBroadcast.IsValid(strError))
+        if(!budgetProposalBroadcast.IsValid(strError, false))
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
 
         std::string cmd = "tx";

From e65a1edce338ee51993b26c5a4a1d2e1ce7a4eec Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 15 Jul 2015 19:18:19 -0700
Subject: [PATCH 1578/1819] version / proto bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 2 +-
 src/version.h       | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 87cf3ccb0903..de5e678f28de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 17)
+define(_CLIENT_VERSION_BUILD, 18)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index b3ef40bcc337..6ff4eb46f3c1 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 17
+#define CLIENT_VERSION_BUILD 18
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 53541dee814f..89decfbc9ab4 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70090;
+static const int MIN_INSTANTX_PROTO_VERSION = 70091;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 0da8b8e5691b..ede4290eb3dd 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70090;
+static const int PROTOCOL_VERSION = 70091;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70090;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70091;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70090;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70091;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70090;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70091;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 3c8b3355948da9e36b3d876185f34f107d534826 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 03:00:16 -0700
Subject: [PATCH 1579/1819] Force txindex when a Mastenode

---
 src/init.cpp           | 6 ++++++
 src/masternodeconfig.h | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/src/init.cpp b/src/init.cpp
index 1b1d7f0999ef..e36c71693de4 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1457,6 +1457,12 @@ bool AppInit2(boost::thread_group& threadGroup)
 
 
     fMasterNode = GetBoolArg("-masternode", false);
+
+    if((fMasterNode || masternodeConfig.getCount() > -1) && fTxIndex == false) {
+        return InitError("Enabling Masternode support requires turning on transaction indexing."
+                  "Please add txindex=1 to your configuration and start with --reindex=1");
+    }
+
     if(fMasterNode) {
         LogPrintf("IS DARKSEND MASTER NODE\n");
         strMasterNodeAddr = GetArg("-masternodeaddr", "");
diff --git a/src/masternodeconfig.h b/src/masternodeconfig.h
index a8d19b931dc7..59e7012c300b 100644
--- a/src/masternodeconfig.h
+++ b/src/masternodeconfig.h
@@ -91,6 +91,14 @@ class CMasternodeConfig
         return entries;
     }
 
+    int getCount() {
+        int c = -1;
+        BOOST_FOREACH(CMasternodeEntry e, entries) {
+            if(e.getAlias() != "") c++;
+        }
+        return c;
+    }
+
 private:
     std::vector<CMasternodeEntry> entries;
 

From fc54241441352f6d44d84a3fd78e854b45f51d38 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 07:34:40 -0700
Subject: [PATCH 1580/1819] Default txindex to true

---
 src/init.cpp | 4 ++--
 src/main.cpp | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index e36c71693de4..5a1811c0b2ff 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1144,7 +1144,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     else if (nTotalCache > (nMaxDbCache << 20))
         nTotalCache = (nMaxDbCache << 20); // total cache cannot be greater than nMaxDbCache
     size_t nBlockTreeDBCache = nTotalCache / 8;
-    if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", false))
+    if (nBlockTreeDBCache > (1 << 21) && !GetBoolArg("-txindex", true))
         nBlockTreeDBCache = (1 << 21); // block tree db cache shouldn't be larger than 2 MiB
     nTotalCache -= nBlockTreeDBCache;
     size_t nCoinDBCache = nTotalCache / 2; // use half of the remaining cache for coindb cache
@@ -1192,7 +1192,7 @@ bool AppInit2(boost::thread_group& threadGroup)
                 }
 
                 // Check for changed -txindex state
-                if (fTxIndex != GetBoolArg("-txindex", false)) {
+                if (fTxIndex != GetBoolArg("-txindex", true)) {
                     strLoadError = _("You need to rebuild the database using -reindex to change -txindex");
                     break;
                 }
diff --git a/src/main.cpp b/src/main.cpp
index 7a22caa680f6..c72d797b5f52 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -58,7 +58,7 @@ CConditionVariable cvBlockChange;
 int nScriptCheckThreads = 0;
 bool fImporting = false;
 bool fReindex = false;
-bool fTxIndex = false;
+bool fTxIndex = true;
 bool fIsBareMultisigStd = true;
 bool fCheckBlockIndex = false;
 unsigned int nCoinCacheSize = 5000;
@@ -3597,7 +3597,7 @@ bool InitBlockIndex() {
         return true;
 
     // Use the provided setting for -txindex in the new database
-    fTxIndex = GetBoolArg("-txindex", false);
+    fTxIndex = GetBoolArg("-txindex", true);
     pblocktree->WriteFlag("txindex", fTxIndex);
     LogPrintf("Initializing databases...\n");
 

From 017217f423ad8974e7b601317f989678634ba475 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 10:47:51 -0700
Subject: [PATCH 1581/1819] Added IsTransactionValid for finalized budgets

---
 src/masternode-budget.cpp | 42 +++++++++++++++++++++------------------
 1 file changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 3e3607c24f0f..5745c05e1a48 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1457,28 +1457,32 @@ bool CFinalizedBudget::IsValid(bool fCheckCollateral)
 
 bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-    // TODO:
-    // BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
-    // {
-    //     bool found = false;
-    //     BOOST_FOREACH(CTxOut out, txNew.vout)
-    //     {
-    //         if(payee.scriptPubKey == out.scriptPubKey && payee.nValue == out.nValue)
-    //             found = true;
-    //     }
-
-    //     if(payee.nVotes >= MNPAYMENTS_SIGNATURES_REQUIRED && !found){
+    int i = nBlockHeight - GetBlockStart();
+    if(i < 0) {
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - height:%d : start:%d\n", nBlockHeight, GetBlockStart());
+        return false;
+    }
 
-    //         CTxDestination address1;
-    //         ExtractDestination(payee.scriptPubKey, address1);
-    //         CBitcoinAddress address2(address1);
+    if(i > (int)vecProposals.size()-1) {
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - i:%d : size:%d\n", i, (int)vecProposals.size()-1);
+        return false;
+    }
 
-    //         LogPrintf("CFinalizedBudget::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), payee.nValue);
-    //         return false;
-    //     }
-    // }
+    bool found = false;
+    BOOST_FOREACH(CTxOut out, txNew.vout)
+    {
+        if(vecProposals[i].payee == out.scriptPubKey && vecProposals[i].nAmount == out.nValue)
+            found = true;
+    }
+    if(!found) {
+        CTxDestination address1;
+        ExtractDestination(vecProposals[i].payee, address1);
+        CBitcoinAddress address2(address1);
 
-    return true;
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), vecProposals[i].nAmount);
+    }
+    
+    return found;
 }
 
 void CFinalizedBudget::SubmitVote()

From e5f37b8c9852272e2a874bb98d41b0f837b77c6c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 11:06:45 -0700
Subject: [PATCH 1582/1819] New Spork : Reconsider X Blocks - This allows us to
 fix forks remotely without anyone having to reindex. It remains trustless,
 because all nodes will simply find the longest chain.

---
 src/spork.cpp | 30 ++++++++++++++++++++++++++++++
 src/spork.h   |  4 +++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/spork.cpp b/src/spork.cpp
index 98a8599cb8d9..7f20e00fc41f 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -90,6 +90,7 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
+        if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
 
         if(r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -114,6 +115,7 @@ int GetSporkValue(int nSporkID)
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
+        if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -125,7 +127,33 @@ void ExecuteSpork(int nSporkID, int nValue)
 {
     if(nSporkID == SPORK_11_RESET_BUDGET && nValue == 1){
         budget.Clear();
+    }
+
+    //correct fork via spork technology
+    if(nSporkID == SPORK_12_RECONSIDER_BLOCKS && nValue > 0) {
+        LogPrintf("Spork::ExecuteSpork -- Reconcider Last %d Blocks\n", nValue);
+        CBlockIndex* pindexPrev = chainActive.Tip();
+        int count = 0;
+
+        for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
+            count++;
+            if(count >= nValue) return;
 
+            CValidationState state;
+            {
+                LOCK(cs_main);
+
+                LogPrintf("Spork::ExecuteSpork -- Reconcider %s\n", pindexPrev->phashBlock->ToString());
+                ReconsiderBlock(state, pindexPrev);
+            }
+
+            if (state.IsValid()) {
+                ActivateBestChain(state);
+            }
+
+            if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
+            pindexPrev = pindexPrev->pprev;
+        }
     }
 }
 
@@ -222,6 +250,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
     if(strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
     if(strName == "SPORK_10_MASTERNODE_PAY_NEWEST_NODES") return SPORK_10_MASTERNODE_PAY_NEWEST_NODES;
     if(strName == "SPORK_11_RESET_BUDGET") return SPORK_11_RESET_BUDGET;
+    if(strName == "SPORK_12_RECONSIDER_BLOCKS") return SPORK_12_RECONSIDER_BLOCKS;
 
     return -1;
 }
@@ -236,6 +265,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
     if(id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
     if(id == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) return "SPORK_10_MASTERNODE_PAY_NEWEST_NODES";
     if(id == SPORK_11_RESET_BUDGET) return "SPORK_11_RESET_BUDGET";
+    if(id == SPORK_12_RECONSIDER_BLOCKS) return "SPORK_12_RECONSIDER_BLOCKS";
 
     return "Unknown";
 }
diff --git a/src/spork.h b/src/spork.h
index 667bf935d2bb..6cdceade47cf 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -24,7 +24,7 @@ using namespace boost;
     - This would result in old clients getting confused about which spork is for what
 */
 #define SPORK_START                                           10001
-#define SPORK_END                                             10010
+#define SPORK_END                                             10011
 
 #define SPORK_2_INSTANTX                                      10001
 #define SPORK_3_INSTANTX_BLOCK_FILTERING                      10002
@@ -34,6 +34,7 @@ using namespace boost;
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT                 10008
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES                  10009
 #define SPORK_11_RESET_BUDGET                                 10010
+#define SPORK_12_RECONSIDER_BLOCKS                            10011
 
 #define SPORK_2_INSTANTX_DEFAULT                              978307200   //2001-1-1
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
@@ -43,6 +44,7 @@ using namespace boost;
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
+#define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
     
 class CSporkMessage;
 class CSporkManager;

From ac488262c245e370cd161d79a28a6545dfda668a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 12:13:42 -0700
Subject: [PATCH 1583/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index de5e678f28de..2644ce768fc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 18)
+define(_CLIENT_VERSION_BUILD, 19)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 6ff4eb46f3c1..e74626c9cb4f 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 18
+#define CLIENT_VERSION_BUILD 19
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 7101c951f8ea0a5df6b81fb018725d373d664c86 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 16 Jul 2015 20:03:42 -0700
Subject: [PATCH 1584/1819] Budget Improvements

- Client bump
- Improved syncing logic (sholud stop hanging issues)
- New spork for turning on super blocks
- Fixed issue with sending old/invalid finalized budgets
- Fixed issue with syncing clients and lack of confirmations with budget items (for IX)
---
 configure.ac                |  2 +-
 src/clientversion.h         |  2 +-
 src/masternode-budget.cpp   | 51 ++++++++++++++++++++-----------------
 src/masternode-budget.h     |  2 +-
 src/masternode-payments.cpp | 11 +++++++-
 src/masternode-sync.cpp     | 24 ++++++++++++++---
 src/masternode-sync.h       |  7 ++---
 src/spork.cpp               |  4 +++
 src/spork.h                 |  4 ++-
 9 files changed, 72 insertions(+), 35 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2644ce768fc3..d506c3e6c4d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 19)
+define(_CLIENT_VERSION_BUILD, 20)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index e74626c9cb4f..597ccaec9edc 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 19
+#define CLIENT_VERSION_BUILD 20
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 5745c05e1a48..84ff54fa83e0 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -79,13 +79,14 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
         }
     }
 
-    if(conf < BUDGET_FEE_CONFIRMATIONS){
+    //if we're syncing we won't have instantX information, so accept 1 confirmation 
+    if(conf >= BUDGET_FEE_CONFIRMATIONS || (!masternodeSync.IsSynced() && conf >= 1)){
+        return true;
+    } else {
         strError = strprintf("Collateral requires at least %d confirmations - %d confirmations", BUDGET_FEE_CONFIRMATIONS, conf);
         LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s - %d confirmations\n", strError, conf);
         return false;
     }
-
-    return true;
 }
 
 void CBudgetManager::CheckOrphanVotes()
@@ -179,8 +180,9 @@ void CBudgetManager::SubmitFinalBudget()
     //create the proposal incase we're the first to make it
     CFinalizedBudgetBroadcast finalizedBudgetBroadcast(strBudgetName, nBlockStart, vecTxBudgetPayments, tx.GetHash());
 
-    if(!finalizedBudgetBroadcast.IsValid()){
-        LogPrintf("SubmitFinalBudget - Invalid finalized budget broadcast (are all the hashes correct?)\n");
+    std::string strError = "";
+    if(!finalizedBudgetBroadcast.IsValid(strError)){
+        LogPrintf("SubmitFinalBudget - Invalid finalized budget - %s \n", strError.c_str());
         return;
     }
 
@@ -342,7 +344,8 @@ void DumpBudgets()
 void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 {
     LOCK(cs);
-    if(!finalizedBudget.IsValid()) return;
+    std::string strError = "";
+    if(!finalizedBudget.IsValid(strError)) return;
 
     if(mapFinalizedBudgets.count(finalizedBudget.GetHash())) {
         return;
@@ -374,7 +377,7 @@ void CBudgetManager::CheckAndRemove()
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
-        if(!pfinalizedBudget->IsValid()){
+        if(!pfinalizedBudget->IsValid(strError)){
             pfinalizedBudget->fValid = false;
         } else {
             pfinalizedBudget->fValid = true;
@@ -815,8 +818,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
 
-        if(!finalizedBudgetBroadcast.IsValid()) {
-            LogPrintf("fbs - invalid finalized budget\n");
+        if(!finalizedBudgetBroadcast.IsValid(strError)) {
+            LogPrintf("fbs - invalid finalized budget - %s\n", strError);
             return;
         }
 
@@ -883,7 +886,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
     std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
         CBudgetProposal* pbudgetProposal = budget.FindProposal((*it1).first);
-        if(pbudgetProposal && (nProp == 0 || (*it1).first == nProp)){
+        if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mprop", ((*it1).second));
         
             //send votes
@@ -902,7 +905,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it3).first);
-        if(pfinalizedBudget && (nProp == 0 || (*it3).first == nProp)){
+        if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
             pfrom->PushMessage("fbs", ((*it3).second));
 
             //send votes
@@ -1424,23 +1427,23 @@ std::string CFinalizedBudget::GetStatus()
     return retBadHashes + retBadPayeeOrAmount;
 }
 
-bool CFinalizedBudget::IsValid(bool fCheckCollateral)
+bool CFinalizedBudget::IsValid(std::string& strError, bool fCheckCollateral)
 {
     //must be the correct block for payment to happen (once a month)
-    if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) return false;
-    if(GetBlockEnd() - nBlockStart > 100) return false;
-    if(vecProposals.size() > 100) return false;
-    if(strBudgetName == "") return false;
-    if(nBlockStart == 0) return false;
-    if(nFeeTXHash == 0) return false;
+    if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) {strError = "Invalid BlockStart"; return false;}
+    if(GetBlockEnd() - nBlockStart > 100) {strError = "Invalid BlockEnd"; return false;}
+    if(vecProposals.size() > 100) {strError = "Invalid Proposal Count (too many)"; return false;}
+    if(strBudgetName == "") {strError = "Invalid Budget Name"; return false;}
+    if(nBlockStart == 0) {strError = "Invalid BlockStart == 0"; return false;}
+    if(nFeeTXHash == 0) {strError = "Invalid FeeTx == 0"; return false;}
 
     //can only pay out 10% of the possible coins (min value of coins)
-    if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) return false;
+    if(GetTotalPayout() > budget.GetTotalBudget(nBlockStart)) {strError = "Invalid Payout (more than max)"; return false;}
 
-    std::string strError = "";
+    std::string strError2 = "";
     if(fCheckCollateral){
-        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
-            return false;
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError2)){
+            {strError = "Invalid Collateral : " + strError2; return false;}
         }
     }
 
@@ -1449,8 +1452,8 @@ bool CFinalizedBudget::IsValid(bool fCheckCollateral)
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return true;
 
-    if(nBlockStart < pindexPrev->nHeight) return false;
-    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2 ) return false;
+    if(nBlockStart < pindexPrev->nHeight) {strError = "Older than current blockHeight"; return false;}
+    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2 ) {strError = "BlockEnd is older than blockHeight - cycle/2"; return false;}
 
     return true;
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 014b44eba809..e10051aa286f 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -203,7 +203,7 @@ class CFinalizedBudget
     double GetScore();
     bool HasMinimumRequiredSupport();
 
-    bool IsValid(bool fCheckCollateral=true);
+    bool IsValid(std::string& strError, bool fCheckCollateral=true);
 
     std::string GetName() {return strBudgetName; }
     std::string GetProposals();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 199213529361..25b0da44de82 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -38,7 +38,16 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
         LogPrintf("IsBlockValueValid() : WARNING: Couldn't find previous block");
     }
 
-    if((budget.sizeFinalized() == 0 && budget.sizeProposals() == 0) || nHeight == 0) { //there is no budget data to use to check anything
+    //are these blocks even enabled?
+    if(!IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS)){
+        if(block.vtx[0].GetValueOut() > nExpectedValue) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+    if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything
         //super blocks will always be on these blocks, max 100 per budgeting
         if(nHeight % GetBudgetPaymentCycleBlocks() < 100){
             return true;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 40bffc5275ea..ebb1e0943986 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -48,6 +48,9 @@ void CMasternodeSync::GetNextAsset()
     switch(RequestedMasternodeAssets)
     {
         case(MASTERNODE_INITIAL):
+            RequestedMasternodeAssets = MASTERNODE_SPORK_SETTINGS;
+            break;
+        case(MASTERNODE_SPORK_SETTINGS):
             RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
             break;
         case(MASTERNODE_SYNC_LIST):
@@ -79,6 +82,21 @@ void CMasternodeSync::Process()
         {
             if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) 
             {
+
+                if(RequestedMasternodeAssets == MASTERNODE_SPORK_SETTINGS){
+                    if(pnode->HasFulfilledRequest("getspork")) continue;
+                    pnode->FulfilledRequest("getspork");
+
+                    if(RequestedMasternodeAttempt <= 2){
+                        pnode->PushMessage("getsporks"); //get current network sporks
+                        if(RequestedMasternodeAttempt == 2) GetNextAsset();
+                        RequestedMasternodeAttempt++;
+                    }
+                    return;
+                }
+
+                if(IsInitialBlockDownload()) return;
+
                 if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
                     if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
                         GetNextAsset();
@@ -88,7 +106,7 @@ void CMasternodeSync::Process()
                     if(pnode->HasFulfilledRequest("mnsync")) continue;
                     pnode->FulfilledRequest("mnsync");
 
-                    if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - 5) && RequestedMasternodeAttempt <= 2){
+                    if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - 5) && RequestedMasternodeAttempt <= 4){
                         mnodeman.DsegUpdate(pnode);
                         pnode->PushMessage("getsporks"); //get current network sporks
                         AddedMasternodeList();
@@ -106,7 +124,7 @@ void CMasternodeSync::Process()
                     if(pnode->HasFulfilledRequest("mnwsync")) continue;
                     pnode->FulfilledRequest("mnwsync");
 
-                    if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - 5) && RequestedMasternodeAttempt <= 4){
+                    if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - 5) && RequestedMasternodeAttempt <= 6){
                         pnode->PushMessage("mnget"); //sync payees
                         AddedMasternodeWinner();
                         RequestedMasternodeAttempt++;
@@ -123,7 +141,7 @@ void CMasternodeSync::Process()
                     if(pnode->HasFulfilledRequest("busync")) continue;
                     pnode->FulfilledRequest("busync");
 
-                    if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - 5) && RequestedMasternodeAttempt <= 6){
+                    if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - 5) && RequestedMasternodeAttempt <= 8){
                         uint256 n = 0;
 
                         pnode->PushMessage("mnvs", n); //sync masternode votes
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index de5664d0d91d..178049d7da6a 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -16,9 +16,10 @@
 using namespace std;
 
 #define MASTERNODE_INITIAL                0
-#define MASTERNODE_SYNC_LIST              1
-#define MASTERNODE_SYNC_MNW               2
-#define MASTERNODE_SYNC_BUDGET            3
+#define MASTERNODE_SPORK_SETTINGS         1
+#define MASTERNODE_SYNC_LIST              2
+#define MASTERNODE_SYNC_MNW               3
+#define MASTERNODE_SYNC_BUDGET            4
 #define MASTERNODE_LIST_SYNCED            999
 
 class CMasternodeSync;
diff --git a/src/spork.cpp b/src/spork.cpp
index 7f20e00fc41f..9833356293de 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -91,6 +91,7 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
         if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
+        if(nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
 
         if(r == -1) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -116,6 +117,7 @@ int GetSporkValue(int nSporkID)
         if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
         if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
+        if(nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
 
         if(r == 0) LogPrintf("GetSpork::Unknown Spork %d\n", nSporkID);
     }
@@ -251,6 +253,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
     if(strName == "SPORK_10_MASTERNODE_PAY_NEWEST_NODES") return SPORK_10_MASTERNODE_PAY_NEWEST_NODES;
     if(strName == "SPORK_11_RESET_BUDGET") return SPORK_11_RESET_BUDGET;
     if(strName == "SPORK_12_RECONSIDER_BLOCKS") return SPORK_12_RECONSIDER_BLOCKS;
+    if(strName == "SPORK_13_ENABLE_SUPERBLOCKS") return SPORK_13_ENABLE_SUPERBLOCKS;
 
     return -1;
 }
@@ -266,6 +269,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
     if(id == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) return "SPORK_10_MASTERNODE_PAY_NEWEST_NODES";
     if(id == SPORK_11_RESET_BUDGET) return "SPORK_11_RESET_BUDGET";
     if(id == SPORK_12_RECONSIDER_BLOCKS) return "SPORK_12_RECONSIDER_BLOCKS";
+    if(id == SPORK_13_ENABLE_SUPERBLOCKS) return "SPORK_13_ENABLE_SUPERBLOCKS";
 
     return "Unknown";
 }
diff --git a/src/spork.h b/src/spork.h
index 6cdceade47cf..0dfed83ee943 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -24,7 +24,7 @@ using namespace boost;
     - This would result in old clients getting confused about which spork is for what
 */
 #define SPORK_START                                           10001
-#define SPORK_END                                             10011
+#define SPORK_END                                             10012
 
 #define SPORK_2_INSTANTX                                      10001
 #define SPORK_3_INSTANTX_BLOCK_FILTERING                      10002
@@ -35,6 +35,7 @@ using namespace boost;
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES                  10009
 #define SPORK_11_RESET_BUDGET                                 10010
 #define SPORK_12_RECONSIDER_BLOCKS                            10011
+#define SPORK_13_ENABLE_SUPERBLOCKS                           10012
 
 #define SPORK_2_INSTANTX_DEFAULT                              978307200   //2001-1-1
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
@@ -45,6 +46,7 @@ using namespace boost;
 #define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
 #define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
+#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   978307200   //2001-1-1
     
 class CSporkMessage;
 class CSporkManager;

From 91eda7e21c7fd3c12d4cf6bb2d518748abbf8786 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 17 Jul 2015 12:17:15 +0300
Subject: [PATCH 1585/1819] Few sync improvements: - do not call Added....()
 inside CMasternodeSync::Process() - that was "faking" sync process - unify
 "RequestedMasternodeAttempt <= ..." logic and define MASTERNODE_SYNC_TIMEOUT
 - add missing masternodeSync.AddedMasternodeList() to
 CMasternodeMan::ProcessMessage() - fix "include"s - don't check
 vecMasternodesUsed while not synced

---
 src/darksend.cpp        |  23 +++----
 src/masternode-sync.cpp | 136 ++++++++++++++++++++--------------------
 src/masternode-sync.h   |  13 +---
 src/masternodeman.cpp   |   1 +
 4 files changed, 79 insertions(+), 94 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6ea78dab8819..1914a61b6e3d 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2327,16 +2327,7 @@ void ThreadCheckDarkSendPool()
         MilliSleep(1000);
         //LogPrintf("ThreadCheckDarkSendPool::check timeout\n");
 
-        if(c % 60 == 0){
-            //if we've used 90% of the Masternode list then drop all the oldest.
-            int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
-            if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
-            while((int)vecMasternodesUsed.size() > nThreshold){
-                vecMasternodesUsed.erase(vecMasternodesUsed.begin());
-                if(fDebug) LogPrintf("  vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
-            }
-        }
-
+        // try to sync from all available nodes (up to 3 or until MASTERNODE_SYNC_TIMEOUT) one step at a time
         masternodeSync.Process();
 
         if(masternodeSync.IsSynced()) {
@@ -2354,12 +2345,14 @@ void ThreadCheckDarkSendPool()
                 mnodeman.ProcessMasternodeConnections();
                 masternodePayments.CleanPaymentList();
                 CleanTransactionLocksList();
-            }
 
-            if(c % 60 == 0){
-                //if we've used 1/5 of the Masternode list, then clear the list.
-                if((int)vecMasternodesUsed.size() > (int)mnodeman.size() / 5)
-                    vecMasternodesUsed.clear();
+                //if we've used 90% of the Masternode list then drop all the oldest.
+                int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
+                if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+                while((int)vecMasternodesUsed.size() > nThreshold){
+                    vecMasternodesUsed.erase(vecMasternodesUsed.begin());
+                    if(fDebug) LogPrintf("  vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+                }
             }
 
             if(c % MASTERNODES_DUMP_SECONDS == 0) DumpMasternodes();
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index ebb1e0943986..65203e3857b9 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -3,10 +3,9 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "main.h"
-#include "init.h"
-
 #include "masternode-sync.h"
 #include "masternode.h"
+#include "masternodeman.h"
 #include "util.h"
 #include "addrman.h"
 
@@ -15,11 +14,10 @@ CMasternodeSync masternodeSync;
 
 CMasternodeSync::CMasternodeSync()
 {
-    c = 0;
     lastMasternodeList = 0;
     lastMasternodeWinner = 0;
     lastBudgetItem = 0;
-    RequestedMasternodeAssets = 0;
+    RequestedMasternodeAssets = MASTERNODE_INITIAL;
     RequestedMasternodeAttempt = 0;
 }
 
@@ -63,96 +61,98 @@ void CMasternodeSync::GetNextAsset()
             RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED;
             break;
     }
+    RequestedMasternodeAttempt = 0;
 }
 
-void CMasternodeSync::Process() 
+void CMasternodeSync::Process()
 {
+    static int c = 0;
+
     if(IsSynced()) return;
 
+    if(c++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
+
+    if(fDebug) LogPrintf("CMasternodeSync::Process() - RequestedMasternodeAssets %d c %d\n", RequestedMasternodeAssets, c);
+
     //request full mn list only if Masternodes.dat was updated quite a long time ago
     if(RequestedMasternodeAssets == MASTERNODE_INITIAL) GetNextAsset();
 
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return;
 
-    //try to sync the Masternode list and payment list every 5 seconds from at least 3 nodes
-    if(c % 5 == 0){
-        LOCK(cs_vNodes);
-        BOOST_FOREACH(CNode* pnode, vNodes)
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+    {
+        if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION)
         {
-            if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION) 
-            {
-
-                if(RequestedMasternodeAssets == MASTERNODE_SPORK_SETTINGS){
-                    if(pnode->HasFulfilledRequest("getspork")) continue;
-                    pnode->FulfilledRequest("getspork");
-
-                    if(RequestedMasternodeAttempt <= 2){
-                        pnode->PushMessage("getsporks"); //get current network sporks
-                        if(RequestedMasternodeAttempt == 2) GetNextAsset();
-                        RequestedMasternodeAttempt++;
-                    }
-                    return;
-                }
 
-                if(IsInitialBlockDownload()) return;
+            if(RequestedMasternodeAssets == MASTERNODE_SPORK_SETTINGS){
+                if(pnode->HasFulfilledRequest("getspork")) continue;
+                pnode->FulfilledRequest("getspork");
 
-                if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
-                    if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
-                        GetNextAsset();
-                        return;
-                    }
+                if(RequestedMasternodeAttempt <= 2){
+                    pnode->PushMessage("getsporks"); //get current network sporks
+                    if(RequestedMasternodeAttempt == 2) GetNextAsset();
+                    RequestedMasternodeAttempt++;
+                }
+                return;
+            }
 
-                    if(pnode->HasFulfilledRequest("mnsync")) continue;
-                    pnode->FulfilledRequest("mnsync");
+            if(IsInitialBlockDownload()) return;
 
-                    if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - 5) && RequestedMasternodeAttempt <= 4){
-                        mnodeman.DsegUpdate(pnode);
-                        pnode->PushMessage("getsporks"); //get current network sporks
-                        AddedMasternodeList();
-                        RequestedMasternodeAttempt++;
-                    }
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
+                if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                    GetNextAsset();
                     return;
                 }
 
-                if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW){
-                    if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
-                        GetNextAsset();
-                        return;
-                    }
+                if(pnode->HasFulfilledRequest("mnsync")) continue;
+                pnode->FulfilledRequest("mnsync");
 
-                    if(pnode->HasFulfilledRequest("mnwsync")) continue;
-                    pnode->FulfilledRequest("mnwsync");
+                if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - MASTERNODE_SYNC_TIMEOUT)
+                        && RequestedMasternodeAttempt <= 2){
+                    mnodeman.DsegUpdate(pnode);
+                    RequestedMasternodeAttempt++;
+                }
+                return;
+            }
 
-                    if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - 5) && RequestedMasternodeAttempt <= 6){
-                        pnode->PushMessage("mnget"); //sync payees
-                        AddedMasternodeWinner();
-                        RequestedMasternodeAttempt++;
-                    }
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW){
+                if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                    GetNextAsset();
                     return;
                 }
-                
-                if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
-                    if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - 5){ //hasn't received a new item in the last five seconds, so we'll move to the 
-                        GetNextAsset();
-                        return;
-                    }
-
-                    if(pnode->HasFulfilledRequest("busync")) continue;
-                    pnode->FulfilledRequest("busync");
-
-                    if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - 5) && RequestedMasternodeAttempt <= 8){
-                        uint256 n = 0;
-
-                        pnode->PushMessage("mnvs", n); //sync masternode votes
-                        AddedBudgetItem();
-                        RequestedMasternodeAttempt++;
-                    }
+
+                if(pnode->HasFulfilledRequest("mnwsync")) continue;
+                pnode->FulfilledRequest("mnwsync");
+
+                if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - MASTERNODE_SYNC_TIMEOUT)
+                        && RequestedMasternodeAttempt <= 2){
+                    pnode->PushMessage("mnget"); //sync payees
+                    RequestedMasternodeAttempt++;
+                }
+                return;
+            }
+
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
+                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                    GetNextAsset();
                     return;
                 }
 
+                if(pnode->HasFulfilledRequest("busync")) continue;
+                pnode->FulfilledRequest("busync");
+
+                if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - MASTERNODE_SYNC_TIMEOUT)
+                        && RequestedMasternodeAttempt <= 2){
+                    uint256 n = 0;
+
+                    pnode->PushMessage("mnvs", n); //sync masternode votes
+                    RequestedMasternodeAttempt++;
+                }
+                return;
             }
+
         }
     }
-    c++;
-}
\ No newline at end of file
+}
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 178049d7da6a..caa2bb5186fa 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -5,16 +5,6 @@
 #ifndef MASTERNODE_SYNC_H
 #define MASTERNODE_SYNC_H
 
-#include "main.h"
-#include "sync.h"
-#include "net.h"
-#include "key.h"
-#include "masternodeman.h"
-#include "util.h"
-#include "base58.h"
-
-using namespace std;
-
 #define MASTERNODE_INITIAL                0
 #define MASTERNODE_SPORK_SETTINGS         1
 #define MASTERNODE_SYNC_LIST              2
@@ -22,6 +12,8 @@ using namespace std;
 #define MASTERNODE_SYNC_BUDGET            4
 #define MASTERNODE_LIST_SYNCED            999
 
+#define MASTERNODE_SYNC_TIMEOUT           5
+
 class CMasternodeSync;
 extern CMasternodeSync masternodeSync;
 
@@ -32,7 +24,6 @@ extern CMasternodeSync masternodeSync;
 class CMasternodeSync
 {
 public:
-    int c;
     int64_t lastMasternodeList;
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index cfe14e78c0b8..ec2bc8fa1dcf 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -603,6 +603,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(mnb.CheckInputsAndAdd(nDoS)) {
             // use this as a peer
             addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
+            masternodeSync.AddedMasternodeList();
         } else {
             LogPrintf("mnb - Rejected Masternode entry %s\n", mnb.addr.ToString());
 

From d60f3f69849f6199828c365434ca2407305a1817 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 07:38:35 -0700
Subject: [PATCH 1586/1819] Added more information to getvotes

---
 src/rpcmasternode-budget.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 10653f2efcdb..a5f8cf6e1809 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -424,7 +424,14 @@ Value mnbudget(const Array& params, bool fHelp)
 
         std::map<uint256, CBudgetVote>::iterator it = pbudgetProposal->mapVotes.begin();
         while(it != pbudgetProposal->mapVotes.end()){
-            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(),  (*it).second.GetVoteString().c_str()));
+
+            Object bObj;
+            bObj.push_back(Pair("Vote",  (*it).second.GetVoteString().c_str()));
+            bObj.push_back(Pair("nTime",  (int64_t)(*it).second.nTime));
+            bObj.push_back(Pair("fValid",  (int64_t)(*it).second.fValid));
+
+            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(), bObj));
+
             it++;
         }
 

From b6001065ae5c80d51e5f1d2897fd1a6436ea16ab Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 07:40:26 -0700
Subject: [PATCH 1587/1819] Set fValid=true when receiving new votes

---
 src/masternode-budget.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 84ff54fa83e0..1435f321ad3e 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -772,6 +772,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     if (strCommand == "mvote") { //Masternode Vote
         CBudgetVote vote;
         vRecv >> vote;
+        vote.fValid = true;
 
         if(mapSeenMasternodeBudgetVotes.count(vote.GetHash())){
             return;
@@ -835,6 +836,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     if (strCommand == "fbvote") { //Finalized Budget Vote
         CFinalizedBudgetVote vote;
         vRecv >> vote;
+        vote.fValid = true;
 
         if(mapSeenFinalizedBudgetVotes.count(vote.GetHash())){
             return;

From b84bf763241298824c913e1fd80b947d4406b5a1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 17 Jul 2015 18:07:07 +0300
Subject: [PATCH 1588/1819] Budget module refactor - readability (names /
 spaces / simplify constructions / etc) - proper types (int for block height,
 CAmount for money) - prettify log output / drop c_str() there - read budgets
 on dump before writing (safety) - microoptimization (++it) - sort proposals
 by Yeas - sort finalized budgets by votes - fix few small bugs

---
 src/masternode-budget.cpp   | 394 ++++++++++++++++++++----------------
 src/masternode-budget.h     |  52 ++---
 src/masternode-payments.cpp |  10 +-
 src/masternode-payments.h   |   4 +-
 4 files changed, 246 insertions(+), 214 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 84ff54fa83e0..4791873a981a 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -30,7 +30,8 @@ std::map<uint256, int64_t> askedForSourceProposalOrBudget;
 int nSubmittedFinalBudget;
 
 int GetBudgetPaymentCycleBlocks(){
-    if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616; //(60*24*30)/2.6
+    // Amount of blocks in a months period of time (using 2.6 minutes per) = (60*24*30)/2.6
+    if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616;
 
     //for testing purposes
     return 50;
@@ -69,12 +70,12 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     }
 
     int conf = GetIXConfirmations(nTxCollateralHash);
-    if (nBlockHash != 0) {
+    if (nBlockHash != uint256(0)) {
         BlockMap::iterator mi = mapBlockIndex.find(nBlockHash);
         if (mi != mapBlockIndex.end() && (*mi).second) {
             CBlockIndex* pindex = (*mi).second;
             if (chainActive.Contains(pindex)) {
-                conf += (1 + chainActive.Height() - pindex->nHeight);
+                conf += chainActive.Height() - pindex->nHeight + 1;
             }
         }
     }
@@ -94,7 +95,7 @@ void CBudgetManager::CheckOrphanVotes()
     std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
     while(it1 != mapOrphanMasternodeBudgetVotes.end()){
         if(budget.UpdateProposal(((*it1).second), NULL)){
-            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            LogPrintf("CBudgetManager::CheckOrphanVotes - Proposal/Budget is known, activating and removing orphan vote\n");
             mapOrphanMasternodeBudgetVotes.erase(it1++);
         } else {
             ++it1;
@@ -103,7 +104,7 @@ void CBudgetManager::CheckOrphanVotes()
     std::map<uint256, CFinalizedBudgetVote>::iterator it2 = mapOrphanFinalizedBudgetVotes.begin();
     while(it2 != mapOrphanFinalizedBudgetVotes.end()){
         if(budget.UpdateFinalizedBudget(((*it2).second),NULL)){
-            LogPrintf("CheckOrphanVotes: Proposal/Budget is known, activating and removing orphan vote\n");
+            LogPrintf("CBudgetManager::CheckOrphanVotes - Proposal/Budget is known, activating and removing orphan vote\n");
             mapOrphanFinalizedBudgetVotes.erase(it2++);
         } else {
             ++it2;
@@ -116,7 +117,7 @@ void CBudgetManager::SubmitFinalBudget()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
-    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
+    int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
     if(nSubmittedFinalBudget >= nBlockStart) return;
     if(nBlockStart - pindexPrev->nHeight > 100) return;
 
@@ -125,15 +126,15 @@ void CBudgetManager::SubmitFinalBudget()
     std::vector<CTxBudgetPayment> vecTxBudgetPayments;
 
     for(unsigned int i = 0; i < vBudgetProposals.size(); i++){
-        CTxBudgetPayment out;
-        out.nProposalHash = vBudgetProposals[i]->GetHash();
-        out.payee = vBudgetProposals[i]->GetPayee();
-        out.nAmount = vBudgetProposals[i]->GetAmount();
-        vecTxBudgetPayments.push_back(out);
+        CTxBudgetPayment txBudgetPayment;
+        txBudgetPayment.nProposalHash = vBudgetProposals[i]->GetHash();
+        txBudgetPayment.payee = vBudgetProposals[i]->GetPayee();
+        txBudgetPayment.nAmount = vBudgetProposals[i]->GetAmount();
+        vecTxBudgetPayments.push_back(txBudgetPayment);
     }
 
     if(vecTxBudgetPayments.size() < 1) {
-        LogPrintf("SubmitFinalBudget - Found No Proposals For Period\n");
+        LogPrintf("CBudgetManager::SubmitFinalBudget - Found No Proposals For Period\n");
         return;
     }
 
@@ -142,7 +143,7 @@ void CBudgetManager::SubmitFinalBudget()
     std::string errorMessage;
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Error upon calling SetKey\n");
+        LogPrintf("CBudgetManager::SubmitFinalBudget - Error upon calling SetKey\n");
         return;
     }
 
@@ -153,7 +154,7 @@ void CBudgetManager::SubmitFinalBudget()
     if(!mapCollateral.count(tempBudget.GetHash())){
         CWalletTx wtx;
         if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, tempBudget.GetHash(), true)){
-            LogPrintf("SubmitFinalBudget - Can't make collateral transaction\n");
+            LogPrintf("CBudgetManager::SubmitFinalBudget - Can't make collateral transaction\n");
             return;
         }
         
@@ -170,8 +171,8 @@ void CBudgetManager::SubmitFinalBudget()
 
     CTxIn in(COutPoint(tx.GetHash(), 0));
     int conf = GetInputAgeIX(tx.GetHash(), in);
-    if(conf < BUDGET_FEE_CONFIRMATIONS+1){
-        LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - Collateral requires at least 6 confirmations - %s - %d confirmations\n", tx.GetHash().ToString(), conf);
+    if(conf < BUDGET_FEE_CONFIRMATIONS){
+        LogPrintf ("CBudgetManager::SubmitFinalBudget - Collateral requires at least %d confirmations - %s - %d confirmations\n", BUDGET_FEE_CONFIRMATIONS, tx.GetHash().ToString(), conf);
         return;
     }
 
@@ -182,7 +183,7 @@ void CBudgetManager::SubmitFinalBudget()
 
     std::string strError = "";
     if(!finalizedBudgetBroadcast.IsValid(strError)){
-        LogPrintf("SubmitFinalBudget - Invalid finalized budget - %s \n", strError.c_str());
+        LogPrintf("CBudgetManager::SubmitFinalBudget - Invalid finalized budget - %s \n", strError);
         return;
     }
 
@@ -192,7 +193,7 @@ void CBudgetManager::SubmitFinalBudget()
 
     CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
     if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("SubmitFinalBudget - Failure to sign.\n");
+        LogPrintf("CBudgetManager::SubmitFinalBudget - Failure to sign.\n");
         return;
     }
 
@@ -243,7 +244,7 @@ bool CBudgetDB::Write(const CBudgetManager& objToSave)
     return true;
 }
 
-CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad)
+CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad, bool fDryRun)
 {
 
     int64_t nStart = GetTimeMillis();
@@ -321,10 +322,14 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad)
         return IncorrectFormat;
     }
 
-
-    objToLoad.CheckAndRemove(); // clean out expired
     LogPrintf("Loaded info from budget.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", objToLoad.ToString());
+    if(!fDryRun) {
+        LogPrintf("Budget manager - cleaning....\n");
+        objToLoad.CheckAndRemove();
+        LogPrintf("Budget manager - result:\n");
+        LogPrintf("  %s\n", objToLoad.ToString());
+    }
 
     return Ok;
 }
@@ -333,10 +338,27 @@ void DumpBudgets()
 {
     int64_t nStart = GetTimeMillis();
 
-    CBudgetDB mndb;
+    CBudgetDB budgetdb;
+    CBudgetManager tempBudget;
 
+    LogPrintf("Verifying budget.dat format...\n");
+    CBudgetDB::ReadResult readResult = budgetdb.Read(tempBudget, true);
+    // there was an error and it was not an error on file opening => do not proceed
+    if (readResult == CBudgetDB::FileError)
+        LogPrintf("Missing budgets file - budget.dat, will try to recreate\n");
+    else if (readResult != CBudgetDB::Ok)
+    {
+        LogPrintf("Error reading budget.dat: ");
+        if(readResult == CBudgetDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+        {
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+            return;
+        }
+    }
     LogPrintf("Writting info to budget.dat...\n");
-    mndb.Write(budget);
+    budgetdb.Write(budget);
 
     LogPrintf("Budget dump finished  %dms\n", GetTimeMillis() - nStart);
 }
@@ -359,7 +381,7 @@ void CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
     LOCK(cs);
     std::string strError = "";
     if(!budgetProposal.IsValid(strError)) {
-        LogPrintf("mprop - invalid budget proposal - %s\n", strError.c_str());
+        LogPrintf("CBudgetManager::AddProposal - invalid budget proposal - %s\n", strError);
         return;
     }
 
@@ -377,12 +399,12 @@ void CBudgetManager::CheckAndRemove()
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
-        if(!pfinalizedBudget->IsValid(strError)){
-            pfinalizedBudget->fValid = false;
-        } else {
-            pfinalizedBudget->fValid = true;
+
+        pfinalizedBudget->fValid = pfinalizedBudget->IsValid(strError);
+        if(pfinalizedBudget->fValid) {
             pfinalizedBudget->AutoCheck();
         }
+
         ++it;
     }
 
@@ -390,23 +412,19 @@ void CBudgetManager::CheckAndRemove()
     while(it2 != mapProposals.end())
     {
         CBudgetProposal* pbudgetProposal = &((*it2).second);
-        if(!pbudgetProposal->IsValid(strError)){
-            pbudgetProposal->fValid = false;
-        } else {
-            pbudgetProposal->fValid = true;
-        }
+        pbudgetProposal->fValid = pbudgetProposal->IsValid(strError);
         ++it2;
     }
 }
 
-void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
+void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, CAmount nFees)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
     int nHighestCount = 0;
     CScript payee;
-    int64_t nAmount = 0;
+    CAmount nAmount = 0;
 
     // ------- Grab The Highest Count
 
@@ -414,15 +432,14 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
-        if(pfinalizedBudget->GetVoteCount() > nHighestCount){
-            if(pindexPrev->nHeight+1 >= pfinalizedBudget->GetBlockStart() && pindexPrev->nHeight+1 <= pfinalizedBudget->GetBlockEnd()){
-                if(pfinalizedBudget->GetPayeeAndAmount(pindexPrev->nHeight+1, payee, nAmount)){
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount &&
+                pindexPrev->nHeight + 1 >= pfinalizedBudget->GetBlockStart() &&
+                pindexPrev->nHeight + 1 <= pfinalizedBudget->GetBlockEnd() &&
+                pfinalizedBudget->GetPayeeAndAmount(pindexPrev->nHeight + 1, payee, nAmount)){
                     nHighestCount = pfinalizedBudget->GetVoteCount();
-                }
-            }
         }
 
-        it++;
+        ++it;
     }
 
     CAmount blockValue = GetBlockValue(pindexPrev->nBits, pindexPrev->nHeight, nFees);
@@ -441,7 +458,7 @@ void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
         ExtractDestination(payee, address1);
         CBitcoinAddress address2(address1);
 
-        LogPrintf("Budget payment to %s for %lld\n", address2.ToString().c_str(), nAmount);
+        LogPrintf("CBudgetManager::FillBlockPayee - Budget payment to %s for %lld\n", address2.ToString(), nAmount);
     }
 
 }
@@ -492,7 +509,7 @@ bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
             return true;
         }
 
-        it++;
+        ++it;
     }
 
     return false;
@@ -509,25 +526,25 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
-        if(pfinalizedBudget->GetVoteCount() > nHighestCount){
-            if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
-                nHighestCount = pfinalizedBudget->GetVoteCount();
-            }
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount &&
+                nBlockHeight >= pfinalizedBudget->GetBlockStart() &&
+                nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
+                    nHighestCount = pfinalizedBudget->GetVoteCount();
         }
 
-        it++;
+        ++it;
     }
 
     if(nHighestCount < mnodeman.CountEnabled()/20) return true;
 
     // check the highest finalized budgets (+/- 10% to assist in consensus)
 
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end())
+    it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
 
-        if(pfinalizedBudget->GetVoteCount() > nHighestCount-(mnodeman.CountEnabled()/10)){
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount - mnodeman.CountEnabled()/10){
             if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
                 if(pfinalizedBudget->IsTransactionValid(txNew, nBlockHeight)){
                     return true;
@@ -535,7 +552,7 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
             }
         }
 
-        it2++;
+        ++it;
     }
 
     //we looked through all of the known budgets
@@ -546,58 +563,64 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
 {
     std::vector<CBudgetProposal*> vBudgetProposalRet;
 
-    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
-    while(it2 != mapProposals.end())
+    std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
+    while(it != mapProposals.end())
     {
-        (*it2).second.CleanAndRemove();
+        (*it).second.CleanAndRemove();
 
-        CBudgetProposal* pbudgetProposal = &((*it2).second);
+        CBudgetProposal* pbudgetProposal = &((*it).second);
         vBudgetProposalRet.push_back(pbudgetProposal);
 
-        it2++;
+        ++it;
     }
 
     return vBudgetProposalRet;
 }
 
+struct sortProposalsByVotes {
+    bool operator()(const std::pair<CBudgetProposal*, int> &left, const std::pair<CBudgetProposal*, int> &right) {
+        return left.second > right.second;
+    }
+};
+
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
     // ------- Sort budgets by Yes Count
 
-    std::map<uint256, int> mapList;
+    std::vector<std::pair<CBudgetProposal*, int> > vBudgetPorposalsSort;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end()){
         (*it).second.CleanAndRemove();
-        mapList.insert(make_pair((*it).second.GetHash(), (*it).second.GetYeas()));
+        vBudgetPorposalsSort.push_back(make_pair(&((*it).second), (*it).second.GetYeas()));
         ++it;
     }
 
-    //sort the map and grab the highest count item
-    std::vector<std::pair<uint256,int> > vecList(mapList.begin(), mapList.end());
-    std::sort(vecList.begin(),vecList.end());
+    std::sort(vBudgetPorposalsSort.begin(), vBudgetPorposalsSort.end(), sortProposalsByVotes());
 
     // ------- Grab The Budgets In Order
 
-    std::vector<CBudgetProposal*> vBudgetProposalRet;
+    std::vector<CBudgetProposal*> vBudgetProposalsRet;
 
-    int64_t nBudgetAllocated = 0;
+    CAmount nBudgetAllocated = 0;
     CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return vBudgetProposalRet;
+    if(pindexPrev == NULL) return vBudgetProposalsRet;
 
-    int nBlockStart = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-    int nBlockEnd  =  nBlockStart + GetBudgetPaymentCycleBlocks() -1;
-    int64_t nTotalBudget = GetTotalBudget(nBlockStart);
+    int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
+    int nBlockEnd  =  nBlockStart + GetBudgetPaymentCycleBlocks() - 1;
+    CAmount nTotalBudget = GetTotalBudget(nBlockStart);
 
 
-    std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
-    while(it2 != mapProposals.end())
+    std::vector<std::pair<CBudgetProposal*, int> >::iterator it2 = vBudgetPorposalsSort.begin();
+    while(it2 != vBudgetPorposalsSort.end())
     {
-        CBudgetProposal* pbudgetProposal = &((*it2).second);
+        CBudgetProposal* pbudgetProposal = (*it2).first;
 
         //prop start/end should be inside this period
-        if(pbudgetProposal->fValid && pbudgetProposal->nBlockStart <= nBlockStart && pbudgetProposal->nBlockEnd >= nBlockEnd && pbudgetProposal->GetYeas()-pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
+        if(pbudgetProposal->fValid && pbudgetProposal->nBlockStart <= nBlockStart &&
+                pbudgetProposal->nBlockEnd >= nBlockEnd &&
+                pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
         {
             if(nTotalBudget == nBudgetAllocated){
                 pbudgetProposal->SetAllotted(0);
@@ -610,34 +633,49 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
                 nBudgetAllocated = nTotalBudget;
             }
 
-            vBudgetProposalRet.push_back(pbudgetProposal);
+            vBudgetProposalsRet.push_back(pbudgetProposal);
         }
 
-        it2++;
+        ++it2;
     }
 
-    return vBudgetProposalRet;
+    return vBudgetProposalsRet;
 }
 
+struct sortFinalizedBudgetsByVotes {
+    bool operator()(const std::pair<CFinalizedBudget*, int> &left, const std::pair<CFinalizedBudget*, int> &right) {
+        return left.second > right.second;
+    }
+};
+
 std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 {
-    std::vector<CFinalizedBudget*> vFinalizedBudgetRet;
+    std::vector<CFinalizedBudget*> vFinalizedBudgetsRet;
+    std::vector<std::pair<CFinalizedBudget*, int> > vFinalizedBudgetsSort;
 
     // ------- Grab The Budgets In Order
 
-    std::map<uint256, CFinalizedBudget>::iterator it2 = mapFinalizedBudgets.begin();
-    while(it2 != mapFinalizedBudgets.end())
+    std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
+    while(it != mapFinalizedBudgets.end())
     {
-        CFinalizedBudget* pfinalizedBudget = &((*it2).second);
+        CFinalizedBudget* pfinalizedBudget = &((*it).second);
+
+        vFinalizedBudgetsSort.push_back(make_pair(pfinalizedBudget, pfinalizedBudget->GetVoteCount()));
+        ++it;
+    }
+    std::sort(vFinalizedBudgetsSort.begin(), vFinalizedBudgetsSort.end(), sortFinalizedBudgetsByVotes());
 
-        vFinalizedBudgetRet.push_back(pfinalizedBudget);
-        it2++;
+    std::vector<std::pair<CFinalizedBudget*, int> >::iterator it2 = vFinalizedBudgetsSort.begin();
+    while(it2 != vFinalizedBudgetsSort.end())
+    {
+        vFinalizedBudgetsRet.push_back((*it2).first);
+        ++it2;
     }
 
-    return vFinalizedBudgetRet;
+    return vFinalizedBudgetsRet;
 }
 
-std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
+std::string CBudgetManager::GetRequiredPaymentsString(int nBlockHeight)
 {
     std::string ret = "unknown-budget";
 
@@ -647,30 +685,30 @@ std::string CBudgetManager::GetRequiredPaymentsString(int64_t nBlockHeight)
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
         if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
             CTxBudgetPayment payment;
-            if(pfinalizedBudget->GetProposalByBlock(nBlockHeight, payment)){
+            if(pfinalizedBudget->GetBudgetPaymentByBlock(nBlockHeight, payment)){
                 if(ret == "unknown-budget"){
-                    ret = payment.nProposalHash.ToString().c_str();
+                    ret = payment.nProposalHash.ToString();
                 } else {
                     ret += ",";
-                    ret += payment.nProposalHash.ToString().c_str();
+                    ret += payment.nProposalHash.ToString();
                 }
             } else {
-                LogPrintf("CBudgetManager::GetRequiredPaymentsString - Couldn't find budget payment for block %lld\n", nBlockHeight);
+                LogPrintf("CBudgetManager::GetRequiredPaymentsString - Couldn't find budget payment for block %d\n", nBlockHeight);
             }
         }
 
-        it++;
+        ++it;
     }
 
     return ret;
 }
 
-int64_t CBudgetManager::GetTotalBudget(int nHeight)
+CAmount CBudgetManager::GetTotalBudget(int nHeight)
 {
     if(chainActive.Tip() == NULL) return 0;
 
     //get min block value and calculate from that
-    int64_t nSubsidy = 5 * COIN;
+    CAmount nSubsidy = 5 * COIN;
 
     if(Params().NetworkID() == CBaseChainParams::TESTNET){
         for(int i = 46200; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
@@ -684,7 +722,7 @@ int64_t CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
-    budget.CheckAndRemove();
+    CheckAndRemove();
 
     if (strBudgetMode == "suggest") { //suggest the budget we see
         SubmitFinalBudget();
@@ -737,7 +775,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
         pfrom->FulfilledRequest("mnvs");
 
-        budget.Sync(pfrom, nProp);
+        Sync(pfrom, nProp);
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString());
     }
 
@@ -761,7 +799,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
-        budget.AddProposal(budgetProposal);
+        AddProposal(budgetProposal);
         budgetProposalBroadcast.Relay();
         masternodeSync.AddedBudgetItem();
 
@@ -792,7 +830,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         if(pmn->nVotedTimes < 100){
-            budget.UpdateProposal(vote, pfrom);
+            UpdateProposal(vote, pfrom);
             vote.Relay();
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
@@ -824,7 +862,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
-        budget.AddFinalizedBudget(finalizedBudget);
+        AddFinalizedBudget(finalizedBudget);
         finalizedBudgetBroadcast.Relay();
         masternodeSync.AddedBudgetItem();
 
@@ -854,7 +892,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(pmn->nVotedTimes < 100){
-            budget.UpdateFinalizedBudget(vote, pfrom);
+            UpdateFinalizedBudget(vote, pfrom);
             vote.Relay();
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
@@ -885,7 +923,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
-        CBudgetProposal* pbudgetProposal = budget.FindProposal((*it1).first);
+        CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
         if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
             pfrom->PushMessage("mprop", ((*it1).second));
         
@@ -895,16 +933,16 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
                 if((*it2).second.fValid){
                     pfrom->PushMessage("mvote", ((*it2).second));
                 }
-                it2++;
+                ++it2;
             }
         }
-        it1++;
+        ++it1;
     }
 
 
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
-        CFinalizedBudget* pfinalizedBudget = budget.FindFinalizedBudget((*it3).first);
+        CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
         if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
             pfrom->PushMessage("fbs", ((*it3).second));
 
@@ -913,10 +951,10 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
             while(it4 != pfinalizedBudget->mapVotes.end()){
                 if((*it4).second.fValid)
                     pfrom->PushMessage("fbvote", ((*it4).second));
-                it4++;
+                ++it4;
             }
         }
-        it3++;
+        ++it3;
     }
 
 }
@@ -927,7 +965,7 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
 
     if(!mapProposals.count(vote.nProposalHash)){
         if(pfrom){
-            LogPrintf("Unknown proposal %d, Asking for source proposal\n", vote.nProposalHash.ToString().c_str());
+            LogPrintf("CBudgetManager::UpdateProposal - Unknown proposal %d, asking for source proposal\n", vote.nProposalHash.ToString());
             mapOrphanMasternodeBudgetVotes[vote.nProposalHash] = vote;
 
             if(!askedForSourceProposalOrBudget.count(vote.nProposalHash)){
@@ -950,7 +988,7 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
         if(pfrom){
-            LogPrintf("Unknown Finalized Proposal %s, Asking for source budget\n", vote.nBudgetHash.ToString().c_str());
+            LogPrintf("CBudgetManager::UpdateFinalizedBudget - Unknown Finalized Proposal %s, asking for source budget\n", vote.nBudgetHash.ToString());
             mapOrphanFinalizedBudgetVotes[vote.nBudgetHash] = vote;
 
             if(!askedForSourceProposalOrBudget.count(vote.nBudgetHash)){
@@ -1005,7 +1043,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 
 bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
 {
-    if(GetYeas()-GetNays() < -(mnodeman.CountEnabled()/10)){
+    if(GetNays() - GetYeas() > mnodeman.CountEnabled()/10){
          strError = "Active removal";
          return false;
     }
@@ -1064,12 +1102,7 @@ void CBudgetProposal::CleanAndRemove()
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        if ((*it).second.SignatureValid())
-        {
-            (*it).second.fValid = true;
-        } else {
-            (*it).second.fValid = false;
-        }
+        (*it).second.fValid = (*it).second.SignatureValid();
         ++it;
     }
 }
@@ -1135,7 +1168,7 @@ int CBudgetProposal::GetBlockStartCycle()
 {
     //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    return (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
+    return nBlockStart - nBlockStart % GetBudgetPaymentCycleBlocks();
 }
 
 int CBudgetProposal::GetBlockCurrentCycle()
@@ -1145,24 +1178,24 @@ int CBudgetProposal::GetBlockCurrentCycle()
 
     if(pindexPrev->nHeight >= GetBlockEndCycle()) return -1;
 
-    return (pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks()));
+    return pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks();
 }
 
 int CBudgetProposal::GetBlockEndCycle()
 {
     //end block is half way through the next cycle (so the proposal will be removed much after the payment is sent)
 
-    return nBlockEnd-(GetBudgetPaymentCycleBlocks()/2);
+    return nBlockEnd - GetBudgetPaymentCycleBlocks()/2;
 }
 
 int CBudgetProposal::GetTotalPaymentCount()
 {
-    return (GetBlockEndCycle()-GetBlockStartCycle())/GetBudgetPaymentCycleBlocks();
+    return (GetBlockEndCycle() - GetBlockStartCycle()) / GetBudgetPaymentCycleBlocks();
 }
 
 int CBudgetProposal::GetRemainingPaymentCount()
 {
-    return (GetBlockEndCycle()-GetBlockCurrentCycle())/GetBudgetPaymentCycleBlocks();
+    return (GetBlockEndCycle() - GetBlockCurrentCycle()) / GetBudgetPaymentCycleBlocks();
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast()
@@ -1194,9 +1227,9 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn
 
     nBlockStart = nBlockStartIn;
 
-    int nCycleStart = (nBlockStart-(nBlockStart % GetBudgetPaymentCycleBlocks()));
+    int nCycleStart = nBlockStart - nBlockStart % GetBudgetPaymentCycleBlocks();
     //calculate the end of the cycle for this vote, add half a cycle (vote will be deleted after that block)
-    nBlockEnd = nCycleStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount) + GetBudgetPaymentCycleBlocks()/2;
+    nBlockEnd = nCycleStart + GetBudgetPaymentCycleBlocks() * nPaymentCount + GetBudgetPaymentCycleBlocks()/2;
 
     address = addressIn;
     nAmount = nAmountIn;
@@ -1243,11 +1276,15 @@ bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     std::string errorMessage;
     std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
 
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
+        LogPrintf("CBudgetVote::Sign - Error upon calling SignMessage");
+        return false;
+    }
 
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CBudgetVote::Sign - Error upon calling VerifyMessage");
+        return false;
+    }
 
     return true;
 }
@@ -1261,7 +1298,7 @@ bool CBudgetVote::SignatureValid()
 
     if(pmn == NULL)
     {
-        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode - %s\n", vin.ToString().c_str());
+        LogPrintf("CBudgetVote::SignatureValid() - Unknown Masternode - %s\n", vin.ToString());
         return false;
     }
 
@@ -1277,7 +1314,7 @@ CFinalizedBudget::CFinalizedBudget()
 {
     strBudgetName = "";
     nBlockStart = 0;
-    vecProposals.clear();
+    vecBudgetPayments.clear();
     mapVotes.clear();
     nFeeTXHash = 0;
     fValid = true;
@@ -1287,7 +1324,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
 {
     strBudgetName = other.strBudgetName;
     nBlockStart = other.nBlockStart;
-    vecProposals = other.vecProposals;
+    vecBudgetPayments = other.vecBudgetPayments;
     mapVotes = other.mapVotes;
     nFeeTXHash = other.nFeeTXHash;
     fValid = true;
@@ -1306,38 +1343,38 @@ void CFinalizedBudget::AutoCheck()
 {
     if(!fMasterNode || fAutoChecked) return;
 
-    if(Params().NetworkID() == CBaseChainParams::MAIN){
-        if(rand() % 100 > 5) return; //do this 1 in 20 blocks -- spread out the voting activity on mainnet
-    }
+    //do this 1 in 20 blocks -- spread out the voting activity on mainnet
+    if(Params().NetworkID() == CBaseChainParams::MAIN && rand() % 20 != 0) return;
+
     fAutoChecked = true; //we only need to check this once
 
     if(strBudgetMode == "auto") //only vote for exact matches
     {
-        std::vector<CBudgetProposal*> props1 = budget.GetBudget();
+        std::vector<CBudgetProposal*> vBudgetProposals = budget.GetBudget();
 
-        if(props1.size() == 0) {
+        if(vBudgetProposals.size() == 0) {
             LogPrintf("CFinalizedBudget::AutoCheck - Can't get Budget, aborting\n");
             return;
         }
 
-        for(unsigned int i = 0; i < vecProposals.size(); i++){
-            if(i > props1.size()-1) {
+        for(unsigned int i = 0; i < vecBudgetPayments.size(); i++){
+            if(i > vBudgetProposals.size() - 1) {
                 LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");
                 return;
             }
 
-            if(vecProposals[i].nProposalHash != props1[i]->GetHash()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d doesn't match %s %s\n", i, vecProposals[i].nProposalHash.ToString().c_str(), props1[i]->GetHash().ToString().c_str());
+            if(vecBudgetPayments[i].nProposalHash != vBudgetProposals[i]->GetHash()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d doesn't match %s %s\n", i, vecBudgetPayments[i].nProposalHash.ToString(), vBudgetProposals[i]->GetHash().ToString());
                 return;
             }
 
-            if(vecProposals[i].payee != props1[i]->GetPayee()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+            if(vecBudgetPayments[i].payee != vBudgetProposals[i]->GetPayee()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecBudgetPayments[i].payee.ToString(), vBudgetProposals[i]->GetPayee().ToString());
                 return;
             }
 
-            if(vecProposals[i].nAmount != props1[i]->GetAmount()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecProposals[i].payee.ToString().c_str(), props1[i]->GetPayee().ToString().c_str());
+            if(vecBudgetPayments[i].nAmount != vBudgetProposals[i]->GetAmount()){
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecBudgetPayments[i].payee.ToString(), vBudgetProposals[i]->GetPayee().ToString());
                 return;
             }
 
@@ -1353,23 +1390,18 @@ void CFinalizedBudget::CleanAndRemove()
     std::map<uint256, CFinalizedBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        if ((*it).second.SignatureValid())
-        {
-            (*it).second.fValid = true;
-        } else {
-            (*it).second.fValid = false;
-        }
+        (*it).second.fValid = (*it).second.SignatureValid();
         ++it;
     }
 }
 
 
-int64_t CFinalizedBudget::GetTotalPayout()
+CAmount CFinalizedBudget::GetTotalPayout()
 {
-    int64_t ret = 0;
+    CAmount ret = 0;
 
-    for(unsigned int i = 0; i < vecProposals.size(); i++){
-        ret += vecProposals[i].nAmount;
+    for(unsigned int i = 0; i < vecBudgetPayments.size(); i++){
+        ret += vecBudgetPayments[i].nAmount;
     }
 
     return ret;
@@ -1378,10 +1410,10 @@ int64_t CFinalizedBudget::GetTotalPayout()
 std::string CFinalizedBudget::GetProposals() {
     std::string ret = "";
 
-    BOOST_FOREACH(CTxBudgetPayment& payment, vecProposals){
-        CBudgetProposal* pbudgetProposal = budget.FindProposal(payment.nProposalHash);
+    BOOST_FOREACH(CTxBudgetPayment& budgetPayment, vecBudgetPayments){
+        CBudgetProposal* pbudgetProposal = budget.FindProposal(budgetPayment.nProposalHash);
 
-        std::string token = payment.nProposalHash.ToString();
+        std::string token = budgetPayment.nProposalHash.ToString();
 
         if(pbudgetProposal) token = pbudgetProposal->GetName();
         if(ret == "") {ret = token;}
@@ -1397,26 +1429,26 @@ std::string CFinalizedBudget::GetStatus()
 
     for(int nBlockHeight = GetBlockStart(); nBlockHeight <= GetBlockEnd(); nBlockHeight++)
     {
-        CTxBudgetPayment prop1;
-        if(!GetProposalByBlock(nBlockHeight, prop1)){
+        CTxBudgetPayment budgetPayment;
+        if(!GetBudgetPaymentByBlock(nBlockHeight, budgetPayment)){
             LogPrintf("CFinalizedBudget::GetStatus - Couldn't find budget payment for block %lld\n", nBlockHeight);
             continue;
         }
 
-        CBudgetProposal* prop2 =  budget.FindProposal(prop1.nProposalHash);
-        if(!prop2){
+        CBudgetProposal* pbudgetProposal =  budget.FindProposal(budgetPayment.nProposalHash);
+        if(!pbudgetProposal){
             if(retBadHashes == ""){
-                retBadHashes = "Unknown proposal hash! Check this proposal before voting" + prop1.nProposalHash.ToString();
+                retBadHashes = "Unknown proposal hash! Check this proposal before voting" + budgetPayment.nProposalHash.ToString();
             } else {
-                retBadHashes += "," + prop1.nProposalHash.ToString();
+                retBadHashes += "," + budgetPayment.nProposalHash.ToString();
             }
         } else {
-            if(prop2->GetPayee() != prop1.payee || prop2->GetAmount() != prop1.nAmount)
+            if(pbudgetProposal->GetPayee() != budgetPayment.payee || pbudgetProposal->GetAmount() != budgetPayment.nAmount)
             {
                 if(retBadPayeeOrAmount == ""){
-                    retBadPayeeOrAmount = "Budget payee/nAmount doesn't match our proposal! " + prop1.nProposalHash.ToString();
+                    retBadPayeeOrAmount = "Budget payee/nAmount doesn't match our proposal! " + budgetPayment.nProposalHash.ToString();
                 } else {
-                    retBadPayeeOrAmount += "," + prop1.nProposalHash.ToString();
+                    retBadPayeeOrAmount += "," + budgetPayment.nProposalHash.ToString();
                 }
             }
         }
@@ -1432,7 +1464,7 @@ bool CFinalizedBudget::IsValid(std::string& strError, bool fCheckCollateral)
     //must be the correct block for payment to happen (once a month)
     if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0) {strError = "Invalid BlockStart"; return false;}
     if(GetBlockEnd() - nBlockStart > 100) {strError = "Invalid BlockEnd"; return false;}
-    if(vecProposals.size() > 100) {strError = "Invalid Proposal Count (too many)"; return false;}
+    if((int)vecBudgetPayments.size() > 100) {strError = "Invalid budget payments count (too many)"; return false;}
     if(strBudgetName == "") {strError = "Invalid Budget Name"; return false;}
     if(nBlockStart == 0) {strError = "Invalid BlockStart == 0"; return false;}
     if(nFeeTXHash == 0) {strError = "Invalid FeeTx == 0"; return false;}
@@ -1453,36 +1485,36 @@ bool CFinalizedBudget::IsValid(std::string& strError, bool fCheckCollateral)
     if(pindexPrev == NULL) return true;
 
     if(nBlockStart < pindexPrev->nHeight) {strError = "Older than current blockHeight"; return false;}
-    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2 ) {strError = "BlockEnd is older than blockHeight - cycle/2"; return false;}
+    if(GetBlockEnd() < pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()/2) {strError = "BlockEnd is older than blockHeight - cycle/2"; return false;}
 
     return true;
 }
 
 bool CFinalizedBudget::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-    int i = nBlockHeight - GetBlockStart();
-    if(i < 0) {
-        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - height:%d : start:%d\n", nBlockHeight, GetBlockStart());
+    int nCurrentBudgetPayment = nBlockHeight - GetBlockStart();
+    if(nCurrentBudgetPayment < 0) {
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - height: %d start: %d\n", nBlockHeight, GetBlockStart());
         return false;
     }
 
-    if(i > (int)vecProposals.size()-1) {
-        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - i:%d : size:%d\n", i, (int)vecProposals.size()-1);
+    if(nCurrentBudgetPayment > (int)vecBudgetPayments.size() - 1) {
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Invalid block - current budget payment: %d of %d\n", nCurrentBudgetPayment + 1, (int)vecBudgetPayments.size());
         return false;
     }
 
     bool found = false;
     BOOST_FOREACH(CTxOut out, txNew.vout)
     {
-        if(vecProposals[i].payee == out.scriptPubKey && vecProposals[i].nAmount == out.nValue)
+        if(vecBudgetPayments[nCurrentBudgetPayment].payee == out.scriptPubKey && vecBudgetPayments[nCurrentBudgetPayment].nAmount == out.nValue)
             found = true;
     }
     if(!found) {
         CTxDestination address1;
-        ExtractDestination(vecProposals[i].payee, address1);
+        ExtractDestination(vecBudgetPayments[nCurrentBudgetPayment].payee, address1);
         CBitcoinAddress address2(address1);
 
-        LogPrintf("CFinalizedBudget::IsTransactionValid - Missing required payment - %s:%d\n", address2.ToString().c_str(), vecProposals[i].nAmount);
+        LogPrintf("CFinalizedBudget::IsTransactionValid - Missing required payment - %s: %d\n", address2.ToString(), vecBudgetPayments[nCurrentBudgetPayment].nAmount);
     }
     
     return found;
@@ -1514,7 +1546,7 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
 {
     strBudgetName = "";
     nBlockStart = 0;
-    vecProposals.clear();
+    vecBudgetPayments.clear();
     mapVotes.clear();
     vchSig.clear();
     nFeeTXHash = 0;
@@ -1524,16 +1556,16 @@ CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(const CFinalizedBudget& oth
 {
     strBudgetName = other.strBudgetName;
     nBlockStart = other.nBlockStart;
-    BOOST_FOREACH(CTxBudgetPayment out, other.vecProposals) vecProposals.push_back(out);
+    BOOST_FOREACH(CTxBudgetPayment out, other.vecBudgetPayments) vecBudgetPayments.push_back(out);
     mapVotes = other.mapVotes;
     nFeeTXHash = other.nFeeTXHash;
 }
 
-CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn, uint256 nFeeTXHashIn)
+CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecBudgetPaymentsIn, uint256 nFeeTXHashIn)
 {
     strBudgetName = strBudgetNameIn;
     nBlockStart = nBlockStartIn;
-    BOOST_FOREACH(CTxBudgetPayment out, vecProposalsIn) vecProposals.push_back(out);
+    BOOST_FOREACH(CTxBudgetPayment out, vecBudgetPaymentsIn) vecBudgetPayments.push_back(out);
     mapVotes.clear();
     nFeeTXHash = nFeeTXHashIn;
 }
@@ -1577,11 +1609,15 @@ bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     std::string errorMessage;
     std::string strMessage = vin.prevout.ToStringShort() + nBudgetHash.ToString() + boost::lexical_cast<std::string>(nTime);
 
-    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode))
-        return(" Error upon calling SignMessage");
+    if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
+        LogPrintf("CFinalizedBudgetVote::Sign - Error upon calling SignMessage");
+        return false;
+    }
 
-    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage))
-        return(" Error upon calling VerifyMessage");
+    if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) {
+        LogPrintf("CFinalizedBudgetVote::Sign - Error upon calling VerifyMessage");
+        return false;
+    }
 
     return true;
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index e10051aa286f..8752f05dbf73 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -30,7 +30,7 @@ class CTxBudgetPayment;
 #define VOTE_YES      1
 #define VOTE_NO       2
 
-static const int64_t BUDGET_FEE_TX = (0.5*COIN);
+static const CAmount BUDGET_FEE_TX = (0.5*COIN);
 static const int64_t BUDGET_FEE_CONFIRMATIONS = 6;
 
 extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
@@ -41,7 +41,7 @@ extern std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
 extern CBudgetManager budget;
 void DumpBudgets();
 
-//Amount of blocks in a months period of time (using 2.6 minutes per)
+// Define amount of blocks in budget payment cycle
 int GetBudgetPaymentCycleBlocks();
 
 //Check the collateral transaction for the budget proposal/finalized budget
@@ -67,7 +67,7 @@ class CBudgetDB
 
     CBudgetDB();
     bool Write(const CBudgetManager &objToSave);
-    ReadResult Read(CBudgetManager& objToLoad);
+    ReadResult Read(CBudgetManager& objToLoad, bool fDryRun = false);
 };
 
 
@@ -106,7 +106,7 @@ class CBudgetManager
     CFinalizedBudget *FindFinalizedBudget(uint256 nHash);
     std::pair<std::string, std::string> GetVotes(std::string strProposalName);
 
-    int64_t GetTotalBudget(int nHeight);
+    CAmount GetTotalBudget(int nHeight);
     std::vector<CBudgetProposal*> GetBudget();
     std::vector<CBudgetProposal*> GetAllProposals();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
@@ -119,8 +119,8 @@ class CBudgetManager
     bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom);
     bool PropExists(uint256 nHash);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
-    std::string GetRequiredPaymentsString(int64_t nBlockHeight);
-    void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
+    std::string GetRequiredPaymentsString(int nBlockHeight);
+    void FillBlockPayee(CMutableTransaction& txNew, CAmount nFees);
 
     void CheckOrphanVotes();
     void Clear(){
@@ -156,7 +156,7 @@ class CTxBudgetPayment
 public:
     uint256 nProposalHash;
     CScript payee;
-    int64_t nAmount;
+    CAmount nAmount;
 
     CTxBudgetPayment() {
         payee = CScript();
@@ -191,7 +191,7 @@ class CFinalizedBudget
     bool fValid;
     std::string strBudgetName;
     int nBlockStart;
-    std::vector<CTxBudgetPayment> vecProposals;
+    std::vector<CTxBudgetPayment> vecBudgetPayments;
     map<uint256, CFinalizedBudgetVote> mapVotes;
     uint256 nFeeTXHash;
 
@@ -208,31 +208,31 @@ class CFinalizedBudget
     std::string GetName() {return strBudgetName; }
     std::string GetProposals();
     int GetBlockStart() {return nBlockStart;}
-    int GetBlockEnd() {return nBlockStart + (int)(vecProposals.size()-1);}
+    int GetBlockEnd() {return nBlockStart + (int)(vecBudgetPayments.size() - 1);}
     int GetVoteCount() {return (int)mapVotes.size();}
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
-    bool GetProposalByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
+    bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
     {
         int i = nBlockHeight - GetBlockStart();
         if(i < 0) return false;
-        if(i > (int)vecProposals.size()-1) return false;
-        payment = vecProposals[i];
+        if(i > (int)vecBudgetPayments.size() - 1) return false;
+        payment = vecBudgetPayments[i];
         return true;
     }
-    bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, int64_t& nAmount)
+    bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, CAmount& nAmount)
     {
         int i = nBlockHeight - GetBlockStart();
         if(i < 0) return false;
-        if(i > (int)vecProposals.size()-1) return false;
-        payee = vecProposals[i].payee;
-        nAmount = vecProposals[i].nAmount;
+        if(i > (int)vecBudgetPayments.size() - 1) return false;
+        payee = vecBudgetPayments[i].payee;
+        nAmount = vecBudgetPayments[i].nAmount;
         return true;
     }
 
     //check to see if we should vote on this
     void AutoCheck();
     //total dash paid out by this budget
-    int64_t GetTotalPayout();
+    CAmount GetTotalPayout();
     //vote on this finalized budget as a masternode
     void SubmitVote();
 
@@ -243,7 +243,7 @@ class CFinalizedBudget
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strBudgetName;
         ss << nBlockStart;
-        ss << vecProposals;
+        ss << vecBudgetPayments;
 
         uint256 h1 = ss.GetHash();
         return h1;
@@ -257,7 +257,7 @@ class CFinalizedBudget
         READWRITE(LIMITED_STRING(strBudgetName, 20));
         READWRITE(nFeeTXHash);
         READWRITE(nBlockStart);
-        READWRITE(vecProposals);
+        READWRITE(vecBudgetPayments);
 
         READWRITE(mapVotes);
     }
@@ -272,7 +272,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
 public:
     CFinalizedBudgetBroadcast();
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
-    CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecProposalsIn, uint256 nFeeTXHashIn);
+    CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecBudgetPaymentsIn, uint256 nFeeTXHashIn);
 
     void Relay();
 
@@ -284,7 +284,7 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
         //for syncing with other clients
         READWRITE(LIMITED_STRING(strBudgetName, 20));
         READWRITE(nBlockStart);
-        READWRITE(vecProposals);
+        READWRITE(vecBudgetPayments);
         READWRITE(nFeeTXHash);
     }
 };
@@ -338,7 +338,7 @@ class CBudgetProposal
 private:
     // critical section to protect the inner data structures
     mutable CCriticalSection cs;
-    int64_t nAlloted;
+    CAmount nAlloted;
 
 public:
     bool fValid;
@@ -351,7 +351,7 @@ class CBudgetProposal
     std::string strURL;
     int nBlockStart;
     int nBlockEnd;
-    int64_t nAmount;
+    CAmount nAmount;
     CScript address;
     int64_t nTime;
     uint256 nFeeTXHash;
@@ -384,10 +384,10 @@ class CBudgetProposal
     int GetYeas();
     int GetNays();
     int GetAbstains();
-    int64_t GetAmount() {return nAmount;}
+    CAmount GetAmount() {return nAmount;}
 
-    void SetAllotted(int64_t nAllotedIn) {nAlloted = nAllotedIn;}
-    int64_t GetAllotted() {return nAlloted;}
+    void SetAllotted(CAmount nAllotedIn) {nAlloted = nAllotedIn;}
+    CAmount GetAllotted() {return nAlloted;}
 
     void CleanAndRemove();
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 25b0da44de82..eddcb5b30fc7 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -40,11 +40,7 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
 
     //are these blocks even enabled?
     if(!IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS)){
-        if(block.vtx[0].GetValueOut() > nExpectedValue) {
-            return false;
-        } else {
-            return true;
-        }
+        return block.vtx[0].GetValueOut() > nExpectedValue;
     }
 
     if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything
@@ -66,7 +62,7 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
     return true;
 }
 
-bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight)
+bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight)
 {
     //check if it's a budget block
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
@@ -113,7 +109,7 @@ void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
     }
 }
 
-std::string GetRequiredPaymentsString(int64_t nBlockHeight)
+std::string GetRequiredPaymentsString(int nBlockHeight)
 {
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         return budget.GetRequiredPaymentsString(nBlockHeight);
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index c42decc619f1..da8732d72748 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -26,8 +26,8 @@ extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
 void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 bool IsReferenceNode(CTxIn& vin);
-bool IsBlockPayeeValid(const CTransaction& txNew, int64_t nBlockHeight);
-std::string GetRequiredPaymentsString(int64_t nBlockHeight);
+bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight);
+std::string GetRequiredPaymentsString(int nBlockHeight);
 bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue);
 void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 

From 31e703dfcddec6fe003044ed8c8ada65e9b4edb2 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 17 Jul 2015 18:32:50 +0300
Subject: [PATCH 1589/1819] Fix fees ref
 https://dashtalk.org/threads/v12-testing-thread.5484/page-62#post-59368

---
 src/wallet.cpp | 35 +++++++++++++++++++++++------------
 src/wallet.h   |  4 ++--
 2 files changed, 25 insertions(+), 14 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 754a2a938585..156c82ca2df6 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2031,12 +2031,14 @@ bool CWallet::ConvertList(std::vector<CTxIn> vCoins, std::vector<int64_t>& vecAm
 }
 
 bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nPayFee)
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nFeePay)
 {
-    if(useIX && nPayFee < CENT) nPayFee = CENT;
+    if(useIX && nFeePay < CENT) nFeePay = CENT;
 
     CAmount nValue = 0;
     CAmount nFeeDelta = 0;
+    int nAttemptsToLowerFee = 0;
+
     BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
     {
         if (nValue < 0)
@@ -2060,7 +2062,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
         LOCK2(cs_main, cs_wallet);
         {
             nFeeRet = 0;
-            if(nPayFee!=0) nFeeRet = nPayFee;
+            if(nFeePay > 0) nFeeRet = nFeePay;
             while (true)
             {
                 txNew.vin.clear();
@@ -2161,8 +2163,10 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     CTxOut newTxOut(nChange, scriptChange);
 
                     // Never create dust outputs; if we would, just
-                    // add the dust to the fee.
-                    if (newTxOut.IsDust(::minRelayTxFee))
+                    // add the dust to the fee
+                    // OR if we didn't try to lower fees yet,
+                    // let's see what fee we can get if there is no change
+                    if (newTxOut.IsDust(::minRelayTxFee) || nAttemptsToLowerFee == 0)
                     {
                         nFeeRet += nChange;
                         nChange = 0;
@@ -2217,7 +2221,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                         break;
                 }
 
-                CAmount nFeeNeeded = GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
+                CAmount nFeeNeeded = max(nFeePay, GetMinimumFee(nBytes, nTxConfirmTarget, mempool));
 
                 // If we made it here and we aren't even able to meet the relay fee on the next pass, give up
                 // because we must be at the maximum allowed fee.
@@ -2227,11 +2231,18 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     return false;
                 }
 
-                if (nFeeRet == nFeeNeeded || (nFeeRet > nFeeNeeded && (nFeeDelta > 0 || useIX || coin_type == ONLY_DENOMINATED)))
-                    break; // Done, enough fee included.
+                if (nFeeRet == nFeeNeeded || // Done, enough fee included
+                        (nFeeRet > nFeeNeeded && (nAttemptsToLowerFee > 1 || coin_type == ONLY_DENOMINATED)))
+                    break;
 
-                if (nFeeRet > nFeeNeeded)
-                    nFeeDelta = nFeeRet - nFeeNeeded + 1; // Try to lower fee
+                if (nFeeRet > nFeeNeeded) {
+                    // Try to lower fee
+                    nAttemptsToLowerFee++;
+                    nFeeDelta = nFeeRet - nFeeNeeded;
+                }
+                else {
+                    nFeeDelta = 0; //not enough fee so no delta too
+                }
 
                 // Include more fee and try again.
                 nFeeRet = nFeeNeeded;
@@ -2243,11 +2254,11 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
 }
 
 bool CWallet::CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
-                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nPayFee)
+                                CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl, AvailableCoinsType coin_type, bool useIX, CAmount nFeePay)
 {
     vector< pair<CScript, CAmount> > vecSend;
     vecSend.push_back(make_pair(scriptPubKey, nValue));
-    return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl, coin_type, useIX, nPayFee);
+    return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, strFailReason, coinControl, coin_type, useIX, nFeePay);
 }
 
 /**
diff --git a/src/wallet.h b/src/wallet.h
index fcd74c370075..903780025a03 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -319,9 +319,9 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     CAmount GetUnconfirmedWatchOnlyBalance() const;
     CAmount GetImmatureWatchOnlyBalance() const;
     bool CreateTransaction(const std::vector<std::pair<CScript, CAmount> >& vecSend,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nPayFee=0);
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nFeePay=0);
     bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue,
-                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nPayFee=0);
+                           CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl *coinControl = NULL, AvailableCoinsType coin_type=ALL_COINS, bool useIX=false, CAmount nFeePay=0);
     bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand="tx");
     std::string PrepareDarksendDenominate(int minRounds, int maxRounds);
     int GenerateDarksendOutputs(int nTotalValue, std::vector<CTxOut>& vout);

From 1282f676e5af64aa614e7b1cc7e4d53fc721c569 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 17 Jul 2015 18:52:55 +0300
Subject: [PATCH 1590/1819] Fixes for budget rpc - readability - drop c_str() -
 drop boost/lexical_cast - ValueFromAmount for money - fValid as bool -
 fix/simplify descriptions - more info on vote-many - feedback on mnbudget
 vote

---
 src/rpcmasternode-budget.cpp | 165 ++++++++++++++++++++---------------
 1 file changed, 94 insertions(+), 71 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index a5f8cf6e1809..dfef9d9693cb 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -13,7 +13,6 @@
 #include "rpcserver.h"
 #include "utilmoneystr.h"
 
-#include <boost/lexical_cast.hpp>
 #include <fstream>
 using namespace json_spirit;
 using namespace std;
@@ -51,7 +50,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 7 && params.size() != 8)
-            throw runtime_error("Correct usage of prepare is 'mnbudget prepare proposal-name url payment_count block_start dash_address dash_amount [use_ix(true|false)]'");
+            throw runtime_error("Correct usage is 'mnbudget prepare proposal-name url payment_count block_start dash_address dash_amount [use_ix(true|false)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -66,15 +65,15 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Invalid payment count, must be more than zero.";
 
         //set block min
-        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks() * (nPaymentCount + 1);
 
         int nBlockStart = params[4].get_int();
         if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0){
-            int nNext = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-            return "Invalid block start - must be a budget cycle block. Next valid block: " + boost::lexical_cast<std::string>(nNext);
+            int nNext = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
+            return strprintf("Invalid block start - must be a budget cycle block. Next valid block: %d", nNext);
         }
 
-        int nBlockEnd = nBlockStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount);
+        int nBlockEnd = nBlockStart + GetBudgetPaymentCycleBlocks() * nPaymentCount;
 
         if(nBlockStart < nBlockMin)
             return "Invalid payment count, must be more than current height.";
@@ -98,17 +97,8 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!budgetProposalBroadcast.IsValid(strError, false))
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
 
-        std::string cmd = "tx";
         bool useIX = true;
-
-        if (params.size() > 7){
-            useIX = (params[7].get_str() == "true" ? true : false);
-        }
-
-        if(useIX)
-        {
-            cmd = "ix";
-        }
+        if (params.size() > 7) useIX = params[7].get_bool();
 
         CWalletTx wtx;
         pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
@@ -116,9 +106,9 @@ Value mnbudget(const Array& params, bool fHelp)
         // make our change address
         CReserveKey reservekey(pwalletMain);
         //send the tx to the network
-        pwalletMain->CommitTransaction(wtx, reservekey, cmd);
+        pwalletMain->CommitTransaction(wtx, reservekey, useIX ? "ix" : "tx");
 
-        return wtx.GetHash().ToString().c_str();
+        return wtx.GetHash().ToString();
 
     }
 
@@ -131,7 +121,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 8)
-            throw runtime_error("Correct usage of submit is 'mnbudget submit proposal-name url payment_count block_start dash_address dash_amount fee_tx'");
+            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address dash_amount fee_tx'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -149,12 +139,12 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Invalid payment count, must be more than zero.";
 
         //set block min
-        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks()*(nPaymentCount+1);
+        if(pindexPrev != NULL) nBlockMin = pindexPrev->nHeight - GetBudgetPaymentCycleBlocks() * (nPaymentCount + 1);
 
         int nBlockStart = params[4].get_int();
         if(nBlockStart % GetBudgetPaymentCycleBlocks() != 0){
-            int nNext = pindexPrev->nHeight-(pindexPrev->nHeight % GetBudgetPaymentCycleBlocks())+GetBudgetPaymentCycleBlocks();
-            return "Invalid block start - must be a budget cycle block. Next valid block: " + boost::lexical_cast<std::string>(nNext);
+            int nNext = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
+            return strprintf("Invalid block start - must be a budget cycle block. Next valid block: %d", nNext);
         }
 
         int nBlockEnd = nBlockStart + (GetBudgetPaymentCycleBlocks()*nPaymentCount);
@@ -190,7 +180,7 @@ Value mnbudget(const Array& params, bool fHelp)
         budgetProposalBroadcast.Relay();
         budget.AddProposal(budgetProposalBroadcast);
 
-        return budgetProposalBroadcast.GetHash().ToString().c_str();
+        return budgetProposalBroadcast.GetHash().ToString();
 
     }
 
@@ -200,10 +190,10 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote-many is 'mnbudget vote-many proposal-hash yes|no'");
+            throw runtime_error("Correct usage is 'mnbudget vote-many proposal-hash yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
-        std::string strVote = params[2].get_str().c_str();
+        std::string strVote = params[2].get_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -213,7 +203,7 @@ Value mnbudget(const Array& params, bool fHelp)
         int success = 0;
         int failed = 0;
 
-        Object resultObj;
+        Object resultsObj;
 
         BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
             std::string errorMessage;
@@ -225,23 +215,33 @@ Value mnbudget(const Array& params, bool fHelp)
             CPubKey pubKeyMasternode;
             CKey keyMasternode;
 
+            Object statusObj;
+
             if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
-                printf(" Error upon calling SetKey for %s\n", mne.getAlias().c_str());
                 failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Masternode signing error, could not set key correctly: " + errorMessage));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
                 continue;
             }
 
             CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
             if(pmn == NULL)
             {
-                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
                 failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Can't find masternode by pubkey"));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
                 continue;
             }
 
             CBudgetVote vote(pmn->vin, hash, nVote);
             if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-                return "Failure to sign.";
+                failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Failure to sign."));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
+                continue;
             }
 
             mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
@@ -249,9 +249,15 @@ Value mnbudget(const Array& params, bool fHelp)
             budget.UpdateProposal(vote, NULL);
 
             success++;
+            statusObj.push_back(Pair("result", "success"));
+            resultsObj.push_back(Pair(mne.getAlias(), statusObj));
         }
 
-        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
+        Object returnObj;
+        returnObj.push_back(Pair("overall", strprintf("Voted successfully %d time(s) and failed %d time(s).", success, failed)));
+        returnObj.push_back(Pair("detail", resultsObj));
+
+        return returnObj;
     }
 
     if(strCommand == "vote")
@@ -260,10 +266,10 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 3)
-            throw runtime_error("Correct usage of vote is 'mnbudget vote proposal-hash yes|no'");
+            throw runtime_error("Correct usage is 'mnbudget vote proposal-hash yes|no'");
 
         uint256 hash = ParseHashV(params[1], "parameter 1");
-        std::string strVote = params[2].get_str().c_str();
+        std::string strVote = params[2].get_str();
 
         if(strVote != "yes" && strVote != "no") return "You can only vote 'yes' or 'no'";
         int nVote = VOTE_ABSTAIN;
@@ -275,7 +281,7 @@ Value mnbudget(const Array& params, bool fHelp)
         std::string errorMessage;
 
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
+            return "Error upon calling SetKey";
 
         CBudgetVote vote(activeMasternode.vin, hash, nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
@@ -285,12 +291,14 @@ Value mnbudget(const Array& params, bool fHelp)
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateProposal(vote, NULL);
+
+        return "Voted successfully";
     }
 
     if(strCommand == "projection")
     {
         Object resultObj;
-        int64_t nTotalAllotted = 0;
+        CAmount nTotalAllotted = 0;
 
         std::vector<CBudgetProposal*> winningProps = budget.GetBudget();
         BOOST_FOREACH(CBudgetProposal* pbudgetProposal, winningProps)
@@ -303,24 +311,24 @@ Value mnbudget(const Array& params, bool fHelp)
 
             Object bObj;
             bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
-            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString()));
             bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
             bObj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
             bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
-            bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
+            bObj.push_back(Pair("PaymentAddress",   address2.ToString()));
             bObj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
             bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
-            bObj.push_back(Pair("Alloted",  (int64_t)pbudgetProposal->GetAllotted()));
-            bObj.push_back(Pair("TotalBudgetAlloted",  nTotalAllotted));
+            bObj.push_back(Pair("Alloted",  ValueFromAmount(pbudgetProposal->GetAllotted())));
+            bObj.push_back(Pair("TotalBudgetAlloted",  ValueFromAmount(nTotalAllotted)));
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-            bObj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
+            bObj.push_back(Pair("fValid",  pbudgetProposal->fValid));
 
-            resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
+            resultObj.push_back(Pair(pbudgetProposal->GetName(), bObj));
         }
 
         return resultObj;
@@ -348,24 +356,24 @@ Value mnbudget(const Array& params, bool fHelp)
 
             Object bObj;
             bObj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
-            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
-            bObj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString().c_str()));
+            bObj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString()));
+            bObj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString()));
             bObj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
             bObj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
             bObj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
-            bObj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
+            bObj.push_back(Pair("PaymentAddress",   address2.ToString()));
             bObj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
             bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
-            bObj.push_back(Pair("Amount",  (int64_t)pbudgetProposal->GetAmount()));
+            bObj.push_back(Pair("Amount",  ValueFromAmount(pbudgetProposal->GetAmount())));
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-            bObj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
+            bObj.push_back(Pair("fValid",  pbudgetProposal->fValid));
 
-            resultObj.push_back(Pair(pbudgetProposal->GetName().c_str(), bObj));
+            resultObj.push_back(Pair(pbudgetProposal->GetName(), bObj));
         }
 
         return resultObj;
@@ -374,7 +382,7 @@ Value mnbudget(const Array& params, bool fHelp)
     if(strCommand == "getinfo")
     {
         if (params.size() != 2)
-            throw runtime_error("Correct usage of getinfo is 'mnbudget getinfo profilename'");
+            throw runtime_error("Correct usage is 'mnbudget getinfo profilename'");
 
         std::string strProposalName = params[1].get_str();
 
@@ -387,24 +395,24 @@ Value mnbudget(const Array& params, bool fHelp)
         CBitcoinAddress address2(address1);
 
         Object obj;
-        obj.push_back(Pair("Name",  pbudgetProposal->GetName().c_str()));
-        obj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString().c_str()));
-        obj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString().c_str()));
-        obj.push_back(Pair("URL",  pbudgetProposal->GetURL().c_str()));
+        obj.push_back(Pair("Name",  pbudgetProposal->GetName()));
+        obj.push_back(Pair("Hash",  pbudgetProposal->GetHash().ToString()));
+        obj.push_back(Pair("FeeHash",  pbudgetProposal->nFeeTXHash.ToString()));
+        obj.push_back(Pair("URL",  pbudgetProposal->GetURL()));
         obj.push_back(Pair("BlockStart",  (int64_t)pbudgetProposal->GetBlockStart()));
         obj.push_back(Pair("BlockEnd",    (int64_t)pbudgetProposal->GetBlockEnd()));
         obj.push_back(Pair("TotalPaymentCount",  (int64_t)pbudgetProposal->GetTotalPaymentCount()));
         obj.push_back(Pair("RemainingPaymentCount",  (int64_t)pbudgetProposal->GetRemainingPaymentCount()));
-        obj.push_back(Pair("PaymentAddress",   address2.ToString().c_str()));
+        obj.push_back(Pair("PaymentAddress",   address2.ToString()));
         obj.push_back(Pair("Ratio",  pbudgetProposal->GetRatio()));
         obj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
         obj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
         obj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
-        obj.push_back(Pair("Alloted",  (int64_t)pbudgetProposal->GetAllotted()));
+        obj.push_back(Pair("Alloted",  ValueFromAmount(pbudgetProposal->GetAllotted())));
 
         std::string strError = "";
         obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
-        obj.push_back(Pair("fValid",  (int64_t)pbudgetProposal->fValid));
+        obj.push_back(Pair("fValid",  pbudgetProposal->fValid));
 
         return obj;
     }
@@ -412,7 +420,7 @@ Value mnbudget(const Array& params, bool fHelp)
     if(strCommand == "getvotes")
     {
         if (params.size() != 2)
-            throw runtime_error("Correct usage of getvotes is 'mnbudget getinfo profilename'");
+            throw runtime_error("Correct usage is 'mnbudget getinfo profilename'");
 
         std::string strProposalName = params[1].get_str();
 
@@ -426,11 +434,11 @@ Value mnbudget(const Array& params, bool fHelp)
         while(it != pbudgetProposal->mapVotes.end()){
 
             Object bObj;
-            bObj.push_back(Pair("Vote",  (*it).second.GetVoteString().c_str()));
+            bObj.push_back(Pair("Vote",  (*it).second.GetVoteString()));
             bObj.push_back(Pair("nTime",  (int64_t)(*it).second.nTime));
-            bObj.push_back(Pair("fValid",  (int64_t)(*it).second.fValid));
+            bObj.push_back(Pair("fValid",  (*it).second.fValid));
 
-            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort().c_str(), bObj));
+            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort(), bObj));
 
             it++;
         }
@@ -458,7 +466,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
     if (fHelp  ||
         (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show"))
         throw runtime_error(
-                "mnbudget \"command\"... ( \"passphrase\" )\n"
+                "mnfinalbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
                 "\nAvailable commands:\n"
                 "  vote-many   - Vote on a finalized budget\n"
@@ -472,7 +480,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 2)
-            throw runtime_error("Correct usage of vote-many is 'mnfinalbudget vote-many BUDGET_HASH'");
+            throw runtime_error("Correct usage is 'mnfinalbudget vote-many BUDGET_HASH'");
 
         std::string strHash = params[1].get_str();
         uint256 hash(strHash);
@@ -480,7 +488,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         int success = 0;
         int failed = 0;
 
-        Object resultObj;
+        Object resultsObj;
 
         BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
             std::string errorMessage;
@@ -492,17 +500,23 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             CPubKey pubKeyMasternode;
             CKey keyMasternode;
 
+            Object statusObj;
+
             if(!darkSendSigner.SetKey(mne.getPrivKey(), errorMessage, keyMasternode, pubKeyMasternode)){
-                printf(" Masternode signing error, could not set key correctly %s\n", mne.getAlias().c_str());
                 failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Masternode signing error, could not set key correctly: " + errorMessage));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
                 continue;
             }
 
             CMasternode* pmn = mnodeman.Find(pubKeyMasternode);
             if(pmn == NULL)
             {
-                printf("Can't find masternode by pubkey for %s\n", mne.getAlias().c_str());
                 failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Can't find masternode by pubkey"));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
                 continue;
             }
 
@@ -510,6 +524,9 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             CFinalizedBudgetVote vote(pmn->vin, hash);
             if(!vote.Sign(keyMasternode, pubKeyMasternode)){
                 failed++;
+                statusObj.push_back(Pair("result", "failed"));
+                statusObj.push_back(Pair("errorMessage", "Failure to sign."));
+                resultsObj.push_back(Pair(mne.getAlias(), statusObj));
                 continue;
             }
 
@@ -518,9 +535,15 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             budget.UpdateFinalizedBudget(vote, NULL);
 
             success++;
+            statusObj.push_back(Pair("result", "success"));
+            resultsObj.push_back(Pair(mne.getAlias(), statusObj));
         }
 
-        return("Voted successfully " + boost::lexical_cast<std::string>(success) + " time(s) and failed " + boost::lexical_cast<std::string>(failed) + " time(s).");
+        Object returnObj;
+        returnObj.push_back(Pair("overall", strprintf("Voted successfully %d time(s) and failed %d time(s).", success, failed)));
+        returnObj.push_back(Pair("detail", resultsObj));
+
+        return returnObj;
     }
 
     if(strCommand == "vote")
@@ -529,7 +552,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 2)
-            throw runtime_error("Correct usage of vote is 'mnfinalbudget vote BUDGET_HASH'");
+            throw runtime_error("Correct usage is 'mnfinalbudget vote BUDGET_HASH'");
 
         std::string strHash = params[1].get_str();
         uint256 hash(strHash);
@@ -539,7 +562,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         std::string errorMessage;
 
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
-            return(" Error upon calling SetKey");
+            return "Error upon calling SetKey";
 
         CFinalizedBudgetVote vote(activeMasternode.vin, hash);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
@@ -561,14 +584,14 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         BOOST_FOREACH(CFinalizedBudget* finalizedBudget, winningFbs)
         {
             Object bObj;
-            bObj.push_back(Pair("FeeTX",  finalizedBudget->nFeeTXHash.ToString().c_str()));
-            bObj.push_back(Pair("Hash",  finalizedBudget->GetHash().ToString().c_str()));
+            bObj.push_back(Pair("FeeTX",  finalizedBudget->nFeeTXHash.ToString()));
+            bObj.push_back(Pair("Hash",  finalizedBudget->GetHash().ToString()));
             bObj.push_back(Pair("BlockStart",  (int64_t)finalizedBudget->GetBlockStart()));
             bObj.push_back(Pair("BlockEnd",    (int64_t)finalizedBudget->GetBlockEnd()));
-            bObj.push_back(Pair("Proposals",  finalizedBudget->GetProposals().c_str()));
+            bObj.push_back(Pair("Proposals",  finalizedBudget->GetProposals()));
             bObj.push_back(Pair("VoteCount",  (int64_t)finalizedBudget->GetVoteCount()));
-            bObj.push_back(Pair("Status",  finalizedBudget->GetStatus().c_str()));
-            resultObj.push_back(Pair(finalizedBudget->GetName().c_str(), bObj));
+            bObj.push_back(Pair("Status",  finalizedBudget->GetStatus()));
+            resultObj.push_back(Pair(finalizedBudget->GetName(), bObj));
         }
 
         return resultObj;

From 33ee068d6a41027c6cfd7a2bcb03766b69b59cb0 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 17 Jul 2015 13:26:24 +0300
Subject: [PATCH 1591/1819] Slightly refactor masternode statuses: - better
 names (MASTERNODE_INITIAL was defined twice before that) - move to proper
 header

---
 src/activemasternode.cpp | 28 ++++++++++++++--------------
 src/activemasternode.h   |  8 +++++++-
 src/masternode-sync.cpp  | 16 ++++++++--------
 src/masternode-sync.h    |  6 +++---
 src/masternode.h         |  6 ------
 src/rpcmasternode.cpp    |  6 +++---
 6 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 6bf5d43f1d40..764a681cd04d 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -19,12 +19,12 @@ void CActiveMasternode::ManageStatus()
 
     //need correct blocks to send ping
     if(IsInitialBlockDownload()) {
-        status = MASTERNODE_SYNC_IN_PROCESS;
+        status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS;
         LogPrintf("CActiveMasternode::ManageStatus() - Sync in progress. Must wait until sync is complete to start Masternode.\n");
         return;
     }
 
-    if(status == MASTERNODE_INITIAL || status == MASTERNODE_SYNC_IN_PROCESS) {
+    if(status == ACTIVE_MASTERNODE_INITIAL || status == ACTIVE_MASTERNODE_SYNC_IN_PROCESS) {
         CMasternode *pmn;
         pmn = mnodeman.Find(pubKeyMasternode);
         if(pmn != NULL) {
@@ -33,10 +33,10 @@ void CActiveMasternode::ManageStatus()
         }
     }
 
-    if(status != MASTERNODE_STARTED) {
+    if(status != ACTIVE_MASTERNODE_STARTED) {
 
         // Set defaults
-        status = MASTERNODE_NOT_CAPABLE;
+        status = ACTIVE_MASTERNODE_NOT_CAPABLE;
         notCapableReason = "";
 
         if(strMasterNodeAddr.empty()) {
@@ -86,7 +86,7 @@ void CActiveMasternode::ManageStatus()
                 notCapableReason = "Input must have least " + boost::lexical_cast<string>(MASTERNODE_MIN_CONFIRMATIONS) +
                         " confirmations - " + boost::lexical_cast<string>(GetInputAge(vin)) + " confirmations";
                 LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
-                status = MASTERNODE_INPUT_TOO_NEW;
+                status = ACTIVE_MASTERNODE_INPUT_TOO_NEW;
                 return;
             }
 
@@ -110,7 +110,7 @@ void CActiveMasternode::ManageStatus()
             }
 
             LogPrintf("CActiveMasternode::ManageStatus() - Is capable master node!\n");
-            status = MASTERNODE_STARTED;
+            status = ACTIVE_MASTERNODE_STARTED;
 
             return;
         } else {
@@ -128,17 +128,17 @@ void CActiveMasternode::ManageStatus()
 
 std::string CActiveMasternode::GetStatus() {
     switch (status) {
-    case MASTERNODE_INITIAL: return "node just started, not yet activated";
-    case MASTERNODE_SYNC_IN_PROCESS: return "sync in process. Must wait until client is synced to start";
-    case MASTERNODE_INPUT_TOO_NEW: return "masternode input must have at least 15 confirmations";
-    case MASTERNODE_NOT_CAPABLE: return "not capable masternode: " + notCapableReason;
-    case MASTERNODE_STARTED: return "masternode successfully started";
+    case ACTIVE_MASTERNODE_INITIAL: return "node just started, not yet activated";
+    case ACTIVE_MASTERNODE_SYNC_IN_PROCESS: return "sync in process. Must wait until client is synced to start";
+    case ACTIVE_MASTERNODE_INPUT_TOO_NEW: return "masternode input must have at least 15 confirmations";
+    case ACTIVE_MASTERNODE_NOT_CAPABLE: return "not capable masternode: " + notCapableReason;
+    case ACTIVE_MASTERNODE_STARTED: return "masternode successfully started";
     default: return "unknown";
     }
 }
 
 bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
-    if(status != MASTERNODE_STARTED) {
+    if(status != ACTIVE_MASTERNODE_STARTED) {
         errorMessage = "Masternode is not in a running status";
         return false;
     }
@@ -179,7 +179,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
     {
         // Seems like we are trying to send a ping while the Masternode is not registered in the network
         errorMessage = "Darksend Masternode List doesn't include our Masternode, shutting down Masternode pinging service! " + vin.ToString();
-        status = MASTERNODE_NOT_CAPABLE;
+        status = ACTIVE_MASTERNODE_NOT_CAPABLE;
         notCapableReason = errorMessage;
         return false;
     }
@@ -353,7 +353,7 @@ bool CActiveMasternode::EnableHotColdMasterNode(CTxIn& newVin, CService& newServ
 {
     if(!fMasterNode) return false;
 
-    status = MASTERNODE_STARTED;
+    status = ACTIVE_MASTERNODE_STARTED;
 
     //The values below are needed for signing mnping messages going forward
     this->vin = newVin;
diff --git a/src/activemasternode.h b/src/activemasternode.h
index e2b00afcac47..16d0fb7963e7 100644
--- a/src/activemasternode.h
+++ b/src/activemasternode.h
@@ -13,6 +13,12 @@
 #include "darksend.h"
 #include "masternode.h"
 
+#define ACTIVE_MASTERNODE_INITIAL                     0 // initial state
+#define ACTIVE_MASTERNODE_SYNC_IN_PROCESS             1
+#define ACTIVE_MASTERNODE_INPUT_TOO_NEW               2
+#define ACTIVE_MASTERNODE_NOT_CAPABLE                 3
+#define ACTIVE_MASTERNODE_STARTED                     4
+
 // Responsible for activating the Masternode and pinging the network
 class CActiveMasternode
 {
@@ -44,7 +50,7 @@ class CActiveMasternode
 
     CActiveMasternode()
     {        
-        status = MASTERNODE_INITIAL;
+        status = ACTIVE_MASTERNODE_INITIAL;
     }
 
     /// Manage status of main Masternode
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 65203e3857b9..e61795c2e573 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -17,13 +17,13 @@ CMasternodeSync::CMasternodeSync()
     lastMasternodeList = 0;
     lastMasternodeWinner = 0;
     lastBudgetItem = 0;
-    RequestedMasternodeAssets = MASTERNODE_INITIAL;
+    RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
     RequestedMasternodeAttempt = 0;
 }
 
 bool CMasternodeSync::IsSynced()
 {
-    return (RequestedMasternodeAssets == MASTERNODE_LIST_SYNCED);
+    return (RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED);
 }
 
 void CMasternodeSync::AddedMasternodeList()
@@ -45,10 +45,10 @@ void CMasternodeSync::GetNextAsset()
 {
     switch(RequestedMasternodeAssets)
     {
-        case(MASTERNODE_INITIAL):
-            RequestedMasternodeAssets = MASTERNODE_SPORK_SETTINGS;
+        case(MASTERNODE_SYNC_INITIAL):
+            RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
             break;
-        case(MASTERNODE_SPORK_SETTINGS):
+        case(MASTERNODE_SYNC_SPORKS):
             RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
             break;
         case(MASTERNODE_SYNC_LIST):
@@ -58,7 +58,7 @@ void CMasternodeSync::GetNextAsset()
             RequestedMasternodeAssets = MASTERNODE_SYNC_BUDGET;
             break;
         case(MASTERNODE_SYNC_BUDGET):
-            RequestedMasternodeAssets = MASTERNODE_LIST_SYNCED;
+            RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             break;
     }
     RequestedMasternodeAttempt = 0;
@@ -75,7 +75,7 @@ void CMasternodeSync::Process()
     if(fDebug) LogPrintf("CMasternodeSync::Process() - RequestedMasternodeAssets %d c %d\n", RequestedMasternodeAssets, c);
 
     //request full mn list only if Masternodes.dat was updated quite a long time ago
-    if(RequestedMasternodeAssets == MASTERNODE_INITIAL) GetNextAsset();
+    if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
 
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return;
@@ -86,7 +86,7 @@ void CMasternodeSync::Process()
         if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION)
         {
 
-            if(RequestedMasternodeAssets == MASTERNODE_SPORK_SETTINGS){
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
                 if(pnode->HasFulfilledRequest("getspork")) continue;
                 pnode->FulfilledRequest("getspork");
 
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index caa2bb5186fa..677f4abb7c7d 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -5,12 +5,12 @@
 #ifndef MASTERNODE_SYNC_H
 #define MASTERNODE_SYNC_H
 
-#define MASTERNODE_INITIAL                0
-#define MASTERNODE_SPORK_SETTINGS         1
+#define MASTERNODE_SYNC_INITIAL           0
+#define MASTERNODE_SYNC_SPORKS            1
 #define MASTERNODE_SYNC_LIST              2
 #define MASTERNODE_SYNC_MNW               3
 #define MASTERNODE_SYNC_BUDGET            4
-#define MASTERNODE_LIST_SYNCED            999
+#define MASTERNODE_SYNC_FINISHED          999
 
 #define MASTERNODE_SYNC_TIMEOUT           5
 
diff --git a/src/masternode.h b/src/masternode.h
index 86849bdd6397..0246850f105c 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -13,12 +13,6 @@
 #include "main.h"
 #include "timedata.h"
 
-#define MASTERNODE_INITIAL                     0 // initial state
-#define MASTERNODE_SYNC_IN_PROCESS             1
-#define MASTERNODE_INPUT_TOO_NEW               2
-#define MASTERNODE_NOT_CAPABLE                 3
-#define MASTERNODE_STARTED                     4
-
 #define MASTERNODE_MIN_CONFIRMATIONS           15
 #define MASTERNODE_MIN_MNP_SECONDS             (30*60)
 #define MASTERNODE_MIN_MNB_SECONDS             (5*60)
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 1376f89b39f5..967fea32f6b6 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -199,8 +199,8 @@ Value masternode(const Array& params, bool fHelp)
             }
         }
 
-        if(activeMasternode.status != MASTERNODE_STARTED){
-            activeMasternode.status = MASTERNODE_INITIAL; // TODO: consider better way
+        if(activeMasternode.status != ACTIVE_MASTERNODE_STARTED){
+            activeMasternode.status = ACTIVE_MASTERNODE_INITIAL; // TODO: consider better way
             activeMasternode.ManageStatus();
             pwalletMain->Lock();
         }
@@ -322,7 +322,7 @@ Value masternode(const Array& params, bool fHelp)
 
     if (strCommand == "debug")
     {
-        if(activeMasternode.status != MASTERNODE_INITIAL) return activeMasternode.GetStatus();
+        if(activeMasternode.status != ACTIVE_MASTERNODE_INITIAL) return activeMasternode.GetStatus();
 
         CTxIn vin = CTxIn();
         CPubKey pubkey = CScript();

From d5c4f3bea4c47a1a6a2a7d68528076e245f92c5f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 11:03:49 -0700
Subject: [PATCH 1592/1819] Only ask for missing masternodes/budget items after
 sync is complete

---
 src/masternode-budget.cpp | 8 ++++++++
 src/masternodeman.cpp     | 4 ++++
 2 files changed, 12 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index c8536b52a448..f3440a7c3a78 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -967,6 +967,10 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
 
     if(!mapProposals.count(vote.nProposalHash)){
         if(pfrom){
+            // only ask for missing items after our syncing process is complete -- 
+            //   otherwise we'll think a full sync succeeded when they return a result
+            if(!masternodeSync.IsSynced()) return false;
+
             LogPrintf("CBudgetManager::UpdateProposal - Unknown proposal %d, asking for source proposal\n", vote.nProposalHash.ToString());
             mapOrphanMasternodeBudgetVotes[vote.nProposalHash] = vote;
 
@@ -990,6 +994,10 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
         if(pfrom){
+            // only ask for missing items after our syncing process is complete -- 
+            //   otherwise we'll think a full sync succeeded when they return a result
+            if(!masternodeSync.IsSynced()) return false;
+
             LogPrintf("CBudgetManager::UpdateFinalizedBudget - Unknown Finalized Proposal %s, asking for source budget\n", vote.nBudgetHash.ToString());
             mapOrphanFinalizedBudgetVotes[vote.nBudgetHash] = vote;
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index ec2bc8fa1dcf..1e4466890198 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -630,6 +630,10 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        // only ask for missing items after our syncing process is complete -- 
+        //   otherwise we'll think a full sync succeeded when they return a result
+        if(!masternodeSync.IsSynced()) return;
+
         // we wasn't able to accept mnp but nothing significant happened,
         // we might just have to ask for a masternode entry once
         std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);

From 59024b1b46f6111dd7f76f6b31b5428edb01a320 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 16:49:41 -0700
Subject: [PATCH 1593/1819] Resync on sleep/wake or failure

---
 src/masternode-sync.cpp | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index e61795c2e573..d24406b2b2d4 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -68,7 +68,16 @@ void CMasternodeSync::Process()
 {
     static int c = 0;
 
-    if(IsSynced()) return;
+    if(IsSynced()) {
+        /* 
+            Resync if we lose all masternodes from sleep/wake or failure to sync originally
+        */
+        if(mnodeman.CountEnabled() == 0) {
+            RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
+            RequestedMasternodeAttempt = 0;
+        }
+        return;
+    }
 
     if(c++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
 

From bf1ec73357653c6cc1f09116f0680789f1a23e18 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 18 Jul 2015 01:48:38 +0300
Subject: [PATCH 1594/1819] more checks on MN register

---
 src/activemasternode.cpp | 59 +++++++++++++++++++++++++++++-----------
 src/activemasternode.h   |  4 +--
 2 files changed, 45 insertions(+), 18 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 764a681cd04d..bf4f91388e7d 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -4,7 +4,6 @@
 #include "masternodeman.h"
 #include "masternode.h"
 #include "masternodeconfig.h"
-#include <boost/lexical_cast.hpp>
 
 //
 // Bootup the Masternode, look for a 1000DRK input and register on the network
@@ -53,12 +52,12 @@ void CActiveMasternode::ManageStatus()
 
         if(Params().NetworkID() == CBaseChainParams::MAIN) {
             if(service.GetPort() != 9999) {
-                notCapableReason = "Invalid port: " + boost::lexical_cast<string>(service.GetPort()) + " - only 9999 is supported on mainnet.";
+                notCapableReason = strprintf("Invalid port: %u - only 9999 is supported on mainnet.", service.GetPort());
                 LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
                 return;
             }
         } else if(service.GetPort() == 9999) {
-            notCapableReason = "Invalid port: " + boost::lexical_cast<string>(service.GetPort()) + " - 9999 is only supported on mainnet.";
+            notCapableReason = strprintf("Invalid port: %u - 9999 is only supported on mainnet.", service.GetPort());
             LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
             return;
         }
@@ -83,8 +82,7 @@ void CActiveMasternode::ManageStatus()
         if(GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress)) {
 
             if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
-                notCapableReason = "Input must have least " + boost::lexical_cast<string>(MASTERNODE_MIN_CONFIRMATIONS) +
-                        " confirmations - " + boost::lexical_cast<string>(GetInputAge(vin)) + " confirmations";
+                notCapableReason = strprintf("Input must have least %d confirmations - %d confirmations", MASTERNODE_MIN_CONFIRMATIONS, GetInputAge(vin));
                 LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
                 status = ACTIVE_MASTERNODE_INPUT_TOO_NEW;
                 return;
@@ -186,42 +184,71 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
 
 }
 
-bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string txHash, std::string strOutputIndex, std::string& errorMessage) {
+bool CActiveMasternode::Register(std::string strService, std::string strKeyMasternode, std::string strTxHash, std::string strOutputIndex, std::string& errorMessage) {
     CTxIn vin;
     CPubKey pubKeyCollateralAddress;
     CKey keyCollateralAddress;
     CPubKey pubKeyMasternode;
     CKey keyMasternode;
 
+    //need correct blocks to send ping
+    if(IsInitialBlockDownload()) {
+        errorMessage = "Sync in progress. Must wait until sync is complete to start Masternode.";
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
+        return false;
+    }
+
     if(!darkSendSigner.SetKey(strKeyMasternode, errorMessage, keyMasternode, pubKeyMasternode))
     {
-        LogPrintf("CActiveMasternode::Register() - Error upon calling SetKey: %s\n", errorMessage);
+        errorMessage = strprintf("Can't find keys for masternode %s - %s", strService, errorMessage);
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
+        return false;
+    }
+
+    if(!GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress, strTxHash, strOutputIndex)) {
+        errorMessage = strprintf("Could not allocate vin %s:%s for masternode %s", strTxHash, strOutputIndex, strService);
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
+        return false;
+    }
+
+    CService service = CService(strService);
+    if(Params().NetworkID() == CBaseChainParams::MAIN) {
+        if(service.GetPort() != 9999) {
+            errorMessage = strprintf("Invalid port %u for masternode %s - only 9999 is supported on mainnet.", service.GetPort(), strService);
+            LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
+            return false;
+        }
+    } else if(service.GetPort() == 9999) {
+        errorMessage = strprintf("Invalid port %u for masternode %s - 9999 is only supported on mainnet.", service.GetPort(), strService);
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
 
-    if(!GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress, txHash, strOutputIndex)) {
-        errorMessage = "could not allocate vin";
-        LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage);
+    if(!ConnectNode((CAddress)service, service.ToString().c_str())){
+        errorMessage = strprintf("Error: Could not connect to %s", service.ToString());
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
 
     return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage);
 }
 
-bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage) {
+bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateralAddress, CPubKey pubKeyCollateralAddress, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &errorMessage) {
     CMasternodeBroadcast mnb;
     CMasternodePing mnp(vin);
     if(!mnp.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("CActiveMasternode::Register() -  Failed to sign ping, vin: %s\n", vin.ToString());
+        errorMessage = strprintf("Failed to sign ping, vin: %s", vin.ToString());
+        LogPrintf("CActiveMasternode::Register() -  %s\n", errorMessage);
         return false;
     }
     mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
-    LogPrintf("CActiveMasternode::Register() - Adding to Masternode list service: %s - vin: %s\n", service.ToString(), vin.ToString());
+    LogPrintf("CActiveMasternode::Register() - Adding to Masternode list\n    service: %s\n    vin: %s\n", service.ToString(), vin.ToString());
     mnb = CMasternodeBroadcast(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
     mnb.lastPing = mnp;
     if(!mnb.Sign(keyCollateralAddress)){
-        LogPrintf("CActiveMasternode::Register() -  Failed to sign broadcast, vin: %s\n", vin.ToString());
+        errorMessage = strprintf("Failed to sign broadcast, vin: %s", vin.ToString());
+        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
     mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
@@ -255,7 +282,7 @@ bool CActiveMasternode::GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secr
     if(!strTxHash.empty()) {
         // Let's find it
         uint256 txHash(strTxHash);
-        int outputIndex = boost::lexical_cast<int>(strOutputIndex);
+        int outputIndex = atoi(strOutputIndex.c_str());
         bool found = false;
         BOOST_FOREACH(COutput& out, possibleCoins) {
             if(out.tx->GetHash() == txHash && out.i == outputIndex)
@@ -323,7 +350,7 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()
         uint256 mnTxHash;
         BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
             mnTxHash.SetHex(mne.getTxHash());
-            COutPoint outpoint = COutPoint(mnTxHash, boost::lexical_cast<unsigned int>(mne.getOutputIndex()));
+            COutPoint outpoint = COutPoint(mnTxHash, atoi(mne.getOutputIndex().c_str()));
             confLockedCoins.push_back(outpoint);
             pwalletMain->UnlockCoin(outpoint);
         }
diff --git a/src/activemasternode.h b/src/activemasternode.h
index 16d0fb7963e7..93a64eeab253 100644
--- a/src/activemasternode.h
+++ b/src/activemasternode.h
@@ -30,7 +30,7 @@ class CActiveMasternode
     bool SendMasternodePing(std::string& errorMessage);
 
     /// Register any Masternode
-    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &retErrorMessage);
+    bool Register(CTxIn vin, CService service, CKey key, CPubKey pubKey, CKey keyMasternode, CPubKey pubKeyMasternode, std::string &errorMessage);
 
     /// Get 1000DRK input that can be used for the Masternode
     bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey, std::string strTxHash, std::string strOutputIndex);
@@ -58,7 +58,7 @@ class CActiveMasternode
     std::string GetStatus();
 
     /// Register remote Masternode
-    bool Register(std::string strService, std::string strKey, std::string txHash, std::string strOutputIndex, std::string& errorMessage); 
+    bool Register(std::string strService, std::string strKey, std::string strTxHash, std::string strOutputIndex, std::string& errorMessage);
 
     /// Get 1000DRK input that can be used for the Masternode
     bool GetMasterNodeVin(CTxIn& vin, CPubKey& pubkey, CKey& secretKey);

From 990e32f3c01918527c371c836742d87378a8529f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 18 Jul 2015 03:26:43 +0300
Subject: [PATCH 1595/1819] revert all changes regarding attempts to lower fee

---
 src/wallet.cpp | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 156c82ca2df6..30850254e8f5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2036,8 +2036,6 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
     if(useIX && nFeePay < CENT) nFeePay = CENT;
 
     CAmount nValue = 0;
-    CAmount nFeeDelta = 0;
-    int nAttemptsToLowerFee = 0;
 
     BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
     {
@@ -2069,7 +2067,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                 txNew.vout.clear();
                 wtxNew.fFromMe = true;
 
-                CAmount nTotalValue = nValue + nFeeRet + nFeeDelta;
+                CAmount nTotalValue = nValue + nFeeRet;
                 double dPriority = 0;
                 // vouts to the payees
                 BOOST_FOREACH (const PAIRTYPE(CScript, CAmount)& s, vecSend)
@@ -2163,10 +2161,8 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     CTxOut newTxOut(nChange, scriptChange);
 
                     // Never create dust outputs; if we would, just
-                    // add the dust to the fee
-                    // OR if we didn't try to lower fees yet,
-                    // let's see what fee we can get if there is no change
-                    if (newTxOut.IsDust(::minRelayTxFee) || nAttemptsToLowerFee == 0)
+                    // add the dust to the fee.
+                    if (newTxOut.IsDust(::minRelayTxFee))
                     {
                         nFeeRet += nChange;
                         nChange = 0;
@@ -2231,19 +2227,9 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                     return false;
                 }
 
-                if (nFeeRet == nFeeNeeded || // Done, enough fee included
-                        (nFeeRet > nFeeNeeded && (nAttemptsToLowerFee > 1 || coin_type == ONLY_DENOMINATED)))
+                if (nFeeRet >= nFeeNeeded) // Done, enough fee included
                     break;
 
-                if (nFeeRet > nFeeNeeded) {
-                    // Try to lower fee
-                    nAttemptsToLowerFee++;
-                    nFeeDelta = nFeeRet - nFeeNeeded;
-                }
-                else {
-                    nFeeDelta = 0; //not enough fee so no delta too
-                }
-
                 // Include more fee and try again.
                 nFeeRet = nFeeNeeded;
                 continue;

From 916deaa39811fe44c32bd332267e6aff5f1606a0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 21:38:15 -0700
Subject: [PATCH 1596/1819] Small syncing improvement

---
 src/masternode-budget.cpp | 2 ++
 src/masternode-sync.cpp   | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f3440a7c3a78..84032c6db045 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -722,6 +722,8 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
+    if(!masternodeSync.IsSynced()) return;
+    
     CheckAndRemove();
 
     if (strBudgetMode == "suggest") { //suggest the budget we see
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d24406b2b2d4..01a208709827 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -107,7 +107,8 @@ void CMasternodeSync::Process()
                 return;
             }
 
-            if(IsInitialBlockDownload()) return;
+            //don't begin syncing until we're at a recent block
+            if(pindexPrev->nTime + 600 < GetTime()) return;
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
                 if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the

From f9e2b18e57173aa8912556034ec63d2c52213ffc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 17 Jul 2015 21:38:56 -0700
Subject: [PATCH 1597/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index d506c3e6c4d6..e9cd4316ae14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 20)
+define(_CLIENT_VERSION_BUILD, 21)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 597ccaec9edc..dcb9bc32cb1c 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 20
+#define CLIENT_VERSION_BUILD 21
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 853863ae86bde6117d2c7c32124248a06a728d3b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 06:46:54 -0700
Subject: [PATCH 1598/1819] Only check budget block payees after sync is
 complete

---
 configure.ac                | 2 +-
 src/clientversion.h         | 2 +-
 src/masternode-payments.cpp | 4 ++++
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e9cd4316ae14..5d31da73a2cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 21)
+define(_CLIENT_VERSION_BUILD, 22)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index dcb9bc32cb1c..3f9fb3e502fd 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 21
+#define CLIENT_VERSION_BUILD 22
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index eddcb5b30fc7..554ed001bbca 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -64,6 +64,10 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
 
 bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight)
 {
+    if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything -- find the longest chain
+        return true;
+    }
+
     //check if it's a budget block
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         if(budget.IsTransactionValid(txNew, nBlockHeight)){

From 637805b2decb86e1a9d5c5def956250151b944dd Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 07:49:39 -0700
Subject: [PATCH 1599/1819] Require 7 confirmations for finalized budget

---
 src/masternode-budget.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 84032c6db045..baf598e4ce32 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -171,7 +171,11 @@ void CBudgetManager::SubmitFinalBudget()
 
     CTxIn in(COutPoint(tx.GetHash(), 0));
     int conf = GetInputAgeIX(tx.GetHash(), in);
-    if(conf < BUDGET_FEE_CONFIRMATIONS){
+    /*
+        Wait will we have 1 extra confirmation, otherwise some clients might reject this feeTX
+        -- This function is tied to NewBlock, so we will propagate this budget while the block is also propagating
+    */
+    if(conf < BUDGET_FEE_CONFIRMATIONS+1){
         LogPrintf ("CBudgetManager::SubmitFinalBudget - Collateral requires at least %d confirmations - %s - %d confirmations\n", BUDGET_FEE_CONFIRMATIONS, tx.GetHash().ToString(), conf);
         return;
     }

From 956d85c59b3cfc1e986cec92eb0171680c710fa2 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 08:46:44 -0700
Subject: [PATCH 1600/1819] Change variable naming for rpc commands - Added
 MonthlyPayment and TotalPayment

---
 src/rpcmasternode-budget.cpp | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index dfef9d9693cb..03d2bb48fbf3 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -50,7 +50,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 7 && params.size() != 8)
-            throw runtime_error("Correct usage is 'mnbudget prepare proposal-name url payment_count block_start dash_address dash_amount [use_ix(true|false)]'");
+            throw runtime_error("Correct usage is 'mnbudget prepare proposal-name url payment_count block_start dash_address monthly_payment_dash [use_ix(true|false)]'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)
@@ -121,7 +121,7 @@ Value mnbudget(const Array& params, bool fHelp)
         mnEntries = masternodeConfig.getEntries();
 
         if (params.size() != 8)
-            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address dash_amount fee_tx'");
+            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address monthly_payment_dash fee_tx'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -321,6 +321,8 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
+            bObj.push_back(Pair("TotalPayment",  ValueFromAmount(pbudgetProposal->GetAmount()*pbudgetProposal->GetTotalPaymentCount())));
+            bObj.push_back(Pair("MonthlyPayment",  ValueFromAmount(pbudgetProposal->GetAmount())));
             bObj.push_back(Pair("Alloted",  ValueFromAmount(pbudgetProposal->GetAllotted())));
             bObj.push_back(Pair("TotalBudgetAlloted",  ValueFromAmount(nTotalAllotted)));
 
@@ -367,7 +369,8 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
             bObj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
             bObj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
-            bObj.push_back(Pair("Amount",  ValueFromAmount(pbudgetProposal->GetAmount())));
+            bObj.push_back(Pair("TotalPayment",  ValueFromAmount(pbudgetProposal->GetAmount()*pbudgetProposal->GetTotalPaymentCount())));
+            bObj.push_back(Pair("MonthlyPayment",  ValueFromAmount(pbudgetProposal->GetAmount())));
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
@@ -408,8 +411,9 @@ Value mnbudget(const Array& params, bool fHelp)
         obj.push_back(Pair("Yeas",  (int64_t)pbudgetProposal->GetYeas()));
         obj.push_back(Pair("Nays",  (int64_t)pbudgetProposal->GetNays()));
         obj.push_back(Pair("Abstains",  (int64_t)pbudgetProposal->GetAbstains()));
-        obj.push_back(Pair("Alloted",  ValueFromAmount(pbudgetProposal->GetAllotted())));
-
+        obj.push_back(Pair("TotalPayment",  ValueFromAmount(pbudgetProposal->GetAmount()*pbudgetProposal->GetTotalPaymentCount())));
+        obj.push_back(Pair("MonthlyPayment",  ValueFromAmount(pbudgetProposal->GetAmount())));
+        
         std::string strError = "";
         obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
         obj.push_back(Pair("fValid",  pbudgetProposal->fValid));

From 90f508c67e732ef1cd6812af0adaffe3c04b7538 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 08:53:40 -0700
Subject: [PATCH 1601/1819] Pay masternodes when no valid budget

---
 src/masternode-budget.cpp | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index baf598e4ce32..43913d1ed320 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -505,17 +505,26 @@ CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
 }
 
 bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
+    int nHighestCount = -1;
+
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
-        if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
-            return true;
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount && 
+            nBlockHeight >= pfinalizedBudget->GetBlockStart() && 
+            nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
+            nHighestCount = pfinalizedBudget->GetVoteCount();
         }
 
         ++it;
     }
 
+    /*
+        If budget doesn't have 5% of the network votes, then we should pay a masternode instead
+    */
+    if(nHighestCount > mnodeman.CountEnabled()/20) return true;
+
     return false;
 }
 
@@ -539,7 +548,10 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
         ++it;
     }
 
-    if(nHighestCount < mnodeman.CountEnabled()/20) return true;
+    /*
+        If budget doesn't have 5% of the network votes, then we should pay a masternode instead
+    */
+    if(nHighestCount < mnodeman.CountEnabled()/20) return false;
 
     // check the highest finalized budgets (+/- 10% to assist in consensus)
 

From aa96d701af572b2f1255bb5ccf65c0e4ce8b33ff Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 18 Jul 2015 04:23:52 +0300
Subject: [PATCH 1602/1819] tabs to spaces

---
 src/rpcmasternode.cpp | 166 +++++++++++++++++++++---------------------
 1 file changed, 83 insertions(+), 83 deletions(-)

diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 967fea32f6b6..7337d955ffdc 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -210,114 +210,114 @@ Value masternode(const Array& params, bool fHelp)
 
     if (strCommand == "start-alias")
     {
-	    if (params.size() < 2){
-			throw runtime_error(
-			"command needs at least 2 parameters\n");
-	    }
-
-	    std::string alias = params[1].get_str().c_str();
-
-    	if(pwalletMain->IsLocked()) {
-    		SecureString strWalletPass;
-    	    strWalletPass.reserve(100);
-
-			if (params.size() == 3){
-				strWalletPass = params[2].get_str().c_str();
-			} else {
-				throw runtime_error(
-				"Your wallet is locked, passphrase is required\n");
-			}
-
-			if(!pwalletMain->Unlock(strWalletPass)){
-				return "incorrect passphrase";
-			}
+        if (params.size() < 2){
+            throw runtime_error(
+            "command needs at least 2 parameters\n");
+        }
+
+        std::string alias = params[1].get_str().c_str();
+
+        if(pwalletMain->IsLocked()) {
+            SecureString strWalletPass;
+            strWalletPass.reserve(100);
+
+            if (params.size() == 3){
+                strWalletPass = params[2].get_str().c_str();
+            } else {
+                throw runtime_error(
+                "Your wallet is locked, passphrase is required\n");
+            }
+
+            if(!pwalletMain->Unlock(strWalletPass)){
+                return "incorrect passphrase";
+            }
         }
 
-    	bool found = false;
+        bool found = false;
 
-		Object statusObj;
-		statusObj.push_back(Pair("alias", alias));
+        Object statusObj;
+        statusObj.push_back(Pair("alias", alias));
 
-    	BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-    		if(mne.getAlias() == alias) {
-    			found = true;
-    			std::string errorMessage;
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            if(mne.getAlias() == alias) {
+                found = true;
+                std::string errorMessage;
 
-    			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
+                bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
 
-    			statusObj.push_back(Pair("result", result ? "successful" : "failed"));
-    			if(!result) {
-					statusObj.push_back(Pair("errorMessage", errorMessage));
-				}
-    			break;
-    		}
-    	}
+                statusObj.push_back(Pair("result", result ? "successful" : "failed"));
+                if(!result) {
+                    statusObj.push_back(Pair("errorMessage", errorMessage));
+                }
+                break;
+            }
+        }
 
-    	if(!found) {
-    		statusObj.push_back(Pair("result", "failed"));
-    		statusObj.push_back(Pair("errorMessage", "could not find alias in config. Verify with list-conf."));
-    	}
+        if(!found) {
+            statusObj.push_back(Pair("result", "failed"));
+            statusObj.push_back(Pair("errorMessage", "could not find alias in config. Verify with list-conf."));
+        }
 
-    	pwalletMain->Lock();
-    	return statusObj;
+        pwalletMain->Lock();
+        return statusObj;
 
     }
 
     if (strCommand == "start-many")
     {
-    	if(pwalletMain->IsLocked()) {
-			SecureString strWalletPass;
-			strWalletPass.reserve(100);
+        if(pwalletMain->IsLocked()) {
+            SecureString strWalletPass;
+            strWalletPass.reserve(100);
 
-			if (params.size() == 2){
-				strWalletPass = params[1].get_str().c_str();
-			} else {
-				throw runtime_error(
-				"Your wallet is locked, passphrase is required\n");
-			}
+            if (params.size() == 2){
+                strWalletPass = params[1].get_str().c_str();
+            } else {
+                throw runtime_error(
+                "Your wallet is locked, passphrase is required\n");
+            }
 
-			if(!pwalletMain->Unlock(strWalletPass)){
-				return "incorrect passphrase";
-			}
-		}
+            if(!pwalletMain->Unlock(strWalletPass)){
+                return "incorrect passphrase";
+            }
+        }
 
-		std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
-		mnEntries = masternodeConfig.getEntries();
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
 
-		int total = 0;
-		int successful = 0;
-		int fail = 0;
+        int total = 0;
+        int successful = 0;
+        int fail = 0;
 
-		Object resultsObj;
+        Object resultsObj;
 
-		BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-			total++;
+        BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
+            total++;
 
-			std::string errorMessage;
+            std::string errorMessage;
 
-			bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
+            bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
 
-			Object statusObj;
-			statusObj.push_back(Pair("alias", mne.getAlias()));
+            Object statusObj;
+            statusObj.push_back(Pair("alias", mne.getAlias()));
             statusObj.push_back(Pair("result", result ? "successful" : "failed"));
 
-			if(result) {
-				successful++;
-			} else {
-				fail++;
-				statusObj.push_back(Pair("errorMessage", errorMessage));
-			}
+            if(result) {
+                successful++;
+            } else {
+                fail++;
+                statusObj.push_back(Pair("errorMessage", errorMessage));
+            }
 
-			resultsObj.push_back(Pair("status", statusObj));
-		}
-		pwalletMain->Lock();
+            resultsObj.push_back(Pair("status", statusObj));
+        }
+        pwalletMain->Lock();
 
-		Object returnObj;
-		returnObj.push_back(Pair("overall", "Successfully started " + boost::lexical_cast<std::string>(successful) + " masternodes, failed to start " +
-				boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
-		returnObj.push_back(Pair("detail", resultsObj));
+        Object returnObj;
+        returnObj.push_back(Pair("overall", "Successfully started " + boost::lexical_cast<std::string>(successful) + " masternodes, failed to start " +
+                boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
+        returnObj.push_back(Pair("detail", resultsObj));
 
-		return returnObj;
+        return returnObj;
     }
 
     if (strCommand == "debug")
@@ -412,8 +412,8 @@ Value masternode(const Array& params, bool fHelp)
 
     if(strCommand == "list-conf")
     {
-    	std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
-    	mnEntries = masternodeConfig.getEntries();
+        std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
+        mnEntries = masternodeConfig.getEntries();
 
         Object resultObj;
 

From a3dfd86058d7ade429a5533851da3d113769308a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 18 Jul 2015 20:31:28 +0300
Subject: [PATCH 1603/1819] Code cleanups for masternode rpc - drop
 boost/lexical_cast - drop c_str() where applicable - slightly prettify
 descriptions and some output

---
 src/rpcmasternode.cpp | 66 ++++++++++++++++++++-----------------------
 1 file changed, 30 insertions(+), 36 deletions(-)

diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 7337d955ffdc..3ae12fe0b9bb 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -14,10 +14,8 @@
 #include "rpcserver.h"
 #include "utilmoneystr.h"
 
-#include <boost/lexical_cast.hpp>
 #include <fstream>
 using namespace json_spirit;
-using namespace std;
 
 void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew, AvailableCoinsType coin_type=ALL_COINS)
 {
@@ -174,7 +172,7 @@ Value masternode(const Array& params, bool fHelp)
         if (params.size() == 2)
         {
             if(params[1] == "enabled") return mnodeman.CountEnabled();
-            if(params[1] == "both") return boost::lexical_cast<std::string>(mnodeman.CountEnabled()) + " / " + boost::lexical_cast<std::string>(mnodeman.size());
+            if(params[1] == "both") return strprintf("%d / %d", mnodeman.CountEnabled(), mnodeman.size());
         }
         return mnodeman.size();
     }
@@ -215,7 +213,7 @@ Value masternode(const Array& params, bool fHelp)
             "command needs at least 2 parameters\n");
         }
 
-        std::string alias = params[1].get_str().c_str();
+        std::string alias = params[1].get_str();
 
         if(pwalletMain->IsLocked()) {
             SecureString strWalletPass;
@@ -284,15 +282,12 @@ Value masternode(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        int total = 0;
         int successful = 0;
-        int fail = 0;
+        int failed = 0;
 
         Object resultsObj;
 
         BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
-            total++;
-
             std::string errorMessage;
 
             bool result = activeMasternode.Register(mne.getIp(), mne.getPrivKey(), mne.getTxHash(), mne.getOutputIndex(), errorMessage);
@@ -304,7 +299,7 @@ Value masternode(const Array& params, bool fHelp)
             if(result) {
                 successful++;
             } else {
-                fail++;
+                failed++;
                 statusObj.push_back(Pair("errorMessage", errorMessage));
             }
 
@@ -313,8 +308,7 @@ Value masternode(const Array& params, bool fHelp)
         pwalletMain->Lock();
 
         Object returnObj;
-        returnObj.push_back(Pair("overall", "Successfully started " + boost::lexical_cast<std::string>(successful) + " masternodes, failed to start " +
-                boost::lexical_cast<std::string>(fail) + ", total " + boost::lexical_cast<std::string>(total)));
+        returnObj.push_back(Pair("overall", strprintf("Successfully started %d masternodes, failed to start %d, total %d", successful, failed, successful + failed)));
         returnObj.push_back(Pair("detail", resultsObj));
 
         return returnObj;
@@ -352,10 +346,10 @@ Value masternode(const Array& params, bool fHelp)
             ExtractDestination(pubkey, address1);
             CBitcoinAddress address2(address1);
 
-            obj.push_back(Pair("IP:port",       winner->addr.ToString().c_str()));
+            obj.push_back(Pair("IP:port",       winner->addr.ToString()));
             obj.push_back(Pair("protocol",      (int64_t)winner->protocolVersion));
-            obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString().c_str()));
-            obj.push_back(Pair("pubkey",        address2.ToString().c_str()));
+            obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString()));
+            obj.push_back(Pair("pubkey",        address2.ToString()));
             obj.push_back(Pair("lastseen",      (winner->lastPing == CMasternodePing()) ? winner->sigTime :
                                                         (int64_t)winner->lastPing.sigTime));
             obj.push_back(Pair("activeseconds", (winner->lastPing == CMasternodePing()) ? 0 :
@@ -380,7 +374,7 @@ Value masternode(const Array& params, bool fHelp)
 
         for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
         {
-            obj.push_back(Pair(boost::lexical_cast<std::string>(nHeight),       GetRequiredPaymentsString(nHeight).c_str()));
+            obj.push_back(Pair(strprintf("%d", nHeight),       GetRequiredPaymentsString(nHeight)));
         }
 
         return obj;
@@ -395,7 +389,7 @@ Value masternode(const Array& params, bool fHelp)
     {
         std::string strAddress = "";
         if (params.size() == 2){
-            strAddress = params[1].get_str().c_str();
+            strAddress = params[1].get_str();
         } else {
             throw runtime_error(
                 "Masternode address required\n");
@@ -436,7 +430,7 @@ Value masternode(const Array& params, bool fHelp)
 
         Object obj;
         BOOST_FOREACH(COutput& out, possibleCoins) {
-            obj.push_back(Pair(out.tx->GetHash().ToString().c_str(), boost::lexical_cast<std::string>(out.i)));
+            obj.push_back(Pair(out.tx->GetHash().ToString(), strprintf("%d", out.i)));
         }
 
         return obj;
@@ -455,11 +449,11 @@ Value masternode(const Array& params, bool fHelp)
         CBitcoinAddress address2(address1);
 
         Object mnObj;
-        mnObj.push_back(Pair("vin", activeMasternode.vin.ToString().c_str()));
-        mnObj.push_back(Pair("service", activeMasternode.service.ToString().c_str()));
+        mnObj.push_back(Pair("vin", activeMasternode.vin.ToString()));
+        mnObj.push_back(Pair("service", activeMasternode.service.ToString()));
         mnObj.push_back(Pair("status", activeMasternode.status));
-        mnObj.push_back(Pair("pubKeyMasternode", address2.ToString().c_str()));
-        mnObj.push_back(Pair("notCapableReason", activeMasternode.notCapableReason.c_str()));
+        mnObj.push_back(Pair("pubKeyMasternode", address2.ToString()));
+        mnObj.push_back(Pair("notCapableReason", activeMasternode.notCapableReason));
         return mnObj;
     }
 
@@ -488,17 +482,17 @@ Value masternodelist(const Array& params, bool fHelp)
                 "\nAvailable modes:\n"
                 "  activeseconds  - Print number of seconds masternode recognized by the network as enabled\n"
                 "                   (since latest issued \"masternode start/start-many/start-alias\")\n"
+                "  addr           - Print ip address associated with a masternode (can be additionally filtered, partial match)\n"
                 "  full           - Print info in format 'status protocol pubkey IP lastseen activeseconds lastpaid'\n"
                 "                   (can be additionally filtered, partial match)\n"
                 "  lastseen       - Print timestamp of when a masternode was last seen on the network\n"
+                "  lastpaid       - The last time a node was paid on the network\n"
                 "  protocol       - Print protocol of a masternode (can be additionally filtered, exact match))\n"
                 "  pubkey         - Print public key associated with a masternode (can be additionally filtered,\n"
                 "                   partial match)\n"
                 "  rank           - Print rank of a masternode based on current block\n"
                 "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR\n"
                 "                   (can be additionally filtered, partial match)\n"
-                "  addr           - Print ip address associated with a masternode (can be additionally filtered, partial match)\n"
-                "  lastpaid       - The last time a node was paid on the network\n"
                 "  votes          - The amount of times this node has voted recently\n"
                 );
     }
@@ -518,6 +512,10 @@ Value masternodelist(const Array& params, bool fHelp)
             if (strMode == "activeseconds") {
                 if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       (int64_t)(mn.lastPing.sigTime - mn.sigTime)));
+            } else if (strMode == "addr") {
+                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,       mn.addr.ToString()));
             } else if (strMode == "full") {
                 CScript pubkey;
                 pubkey = GetScriptForDestination(mn.pubkey.GetID());
@@ -529,10 +527,10 @@ Value masternodelist(const Array& params, bool fHelp)
                 addrStream << setw(21) << strVin;
 
                 std::ostringstream stringStream;
-                stringStream << setw(10) <<
+                stringStream << setw(9) <<
                                mn.Status() << " " <<
                                mn.protocolVersion << " " <<
-                               address2.ToString() << " " <<
+                               address2.ToString() << " " << setw(21) <<
                                mn.addr.ToString() << " " <<
                                mn.lastPing.sigTime << " " << setw(8) <<
                                (mn.lastPing.sigTime - mn.sigTime) << " " <<
@@ -545,8 +543,12 @@ Value masternodelist(const Array& params, bool fHelp)
             } else if (strMode == "lastseen") {
                 if(strFilter !="" && strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       (int64_t)mn.lastPing.sigTime));
+            } else if (strMode == "lastpaid"){
+                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
+                    strVin.find(strFilter) == string::npos) continue;
+                obj.push_back(Pair(strVin,      (int64_t)mn.GetLastPaid()));
             } else if (strMode == "protocol") {
-                if(strFilter !="" && strFilter != boost::lexical_cast<std::string>(mn.protocolVersion) &&
+                if(strFilter !="" && strFilter != strprintf("%d", mn.protocolVersion) &&
                     strVin.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       (int64_t)mn.protocolVersion));
             } else if (strMode == "pubkey") {
@@ -558,19 +560,11 @@ Value masternodelist(const Array& params, bool fHelp)
 
                 if(strFilter !="" && address2.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,       address2.ToString().c_str()));
+                obj.push_back(Pair(strVin,       address2.ToString()));
             } else if(strMode == "status") {
                 std::string strStatus = mn.Status();
                 if(strFilter !="" && strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,       strStatus.c_str()));
-            } else if (strMode == "addr") {
-                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
-                    strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,       mn.addr.ToString().c_str()));
-            } else if(strMode == "lastpaid"){
-                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
-                    strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,      (int64_t)mn.GetLastPaid()));
+                obj.push_back(Pair(strVin,       strStatus));
             } else if(strMode == "votes"){
                 if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
                     strVin.find(strFilter) == string::npos) continue;

From 27dd4ccf06f0ba80c9273eb2d35a3be5df0cc99b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 18 Jul 2015 22:17:17 +0300
Subject: [PATCH 1604/1819] move only

---
 src/rpcmasternode.cpp | 154 +++++++++++++++++++++---------------------
 1 file changed, 77 insertions(+), 77 deletions(-)

diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 3ae12fe0b9bb..c0f4a1566693 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -145,10 +145,10 @@ Value masternode(const Array& params, bool fHelp)
                 "  start        - Start masternode configured in dash.conf\n"
                 "  start-alias  - Start single masternode by assigned alias configured in masternode.conf\n"
                 "  start-many   - Start all masternodes configured in masternode.conf\n"
+                "  status       - Print masternode status information\n"
                 "  list         - Print list of all known masternodes (see masternodelist for more info)\n"
                 "  list-conf    - Print masternode.conf in JSON format\n"
                 "  winners      - Print list of masternode winners\n"
-                "  status       - Print masternode status information\n"
                 );
 
     if (strCommand == "list")
@@ -163,6 +163,25 @@ Value masternode(const Array& params, bool fHelp)
         return "Show budgets";
     }
 
+    if(strCommand == "connect")
+    {
+        std::string strAddress = "";
+        if (params.size() == 2){
+            strAddress = params[1].get_str();
+        } else {
+            throw runtime_error(
+                "Masternode address required\n");
+        }
+
+        CService addr = CService(strAddress);
+
+        if(ConnectNode((CAddress)addr, NULL, true)){
+            return "successfully connected";
+        } else {
+            return "error connecting";
+        }
+    }
+
     if (strCommand == "count")
     {
         if (params.size() > 2){
@@ -177,6 +196,51 @@ Value masternode(const Array& params, bool fHelp)
         return mnodeman.size();
     }
 
+    if (strCommand == "current")
+    {
+        CMasternode* winner = mnodeman.GetCurrentMasterNode(1);
+        if(winner) {
+            Object obj;
+            CScript pubkey;
+            pubkey = GetScriptForDestination(winner->pubkey.GetID());
+            CTxDestination address1;
+            ExtractDestination(pubkey, address1);
+            CBitcoinAddress address2(address1);
+
+            obj.push_back(Pair("IP:port",       winner->addr.ToString()));
+            obj.push_back(Pair("protocol",      (int64_t)winner->protocolVersion));
+            obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString()));
+            obj.push_back(Pair("pubkey",        address2.ToString()));
+            obj.push_back(Pair("lastseen",      (winner->lastPing == CMasternodePing()) ? winner->sigTime :
+                                                        (int64_t)winner->lastPing.sigTime));
+            obj.push_back(Pair("activeseconds", (winner->lastPing == CMasternodePing()) ? 0 :
+                                                        (int64_t)(winner->lastPing.sigTime - winner->sigTime)));
+            return obj;
+        }
+
+        return "unknown";
+    }
+
+    if (strCommand == "debug")
+    {
+        if(activeMasternode.status != ACTIVE_MASTERNODE_INITIAL) return activeMasternode.GetStatus();
+
+        CTxIn vin = CTxIn();
+        CPubKey pubkey = CScript();
+        CKey key;
+        bool found = activeMasternode.GetMasterNodeVin(vin, pubkey, key);
+        if(!found){
+            return "Missing masternode input, please look at the documentation for instructions on masternode creation";
+        } else {
+            return "No problems were found";
+        }
+    }
+
+    if(strCommand == "enforce")
+    {
+        return (uint64_t)enforceMasternodePaymentsTime;
+    }
+
     if (strCommand == "start")
     {
         if(!fMasterNode) return "you must set masternode=1 in the configuration";
@@ -314,52 +378,12 @@ Value masternode(const Array& params, bool fHelp)
         return returnObj;
     }
 
-    if (strCommand == "debug")
-    {
-        if(activeMasternode.status != ACTIVE_MASTERNODE_INITIAL) return activeMasternode.GetStatus();
-
-        CTxIn vin = CTxIn();
-        CPubKey pubkey = CScript();
-        CKey key;
-        bool found = activeMasternode.GetMasterNodeVin(vin, pubkey, key);
-        if(!found){
-            return "Missing masternode input, please look at the documentation for instructions on masternode creation";
-        } else {
-            return "No problems were found";
-        }
-    }
-
     if (strCommand == "create")
     {
 
         return "Not implemented yet, please look at the documentation for instructions on masternode creation";
     }
 
-    if (strCommand == "current")
-    {
-        CMasternode* winner = mnodeman.GetCurrentMasterNode(1);
-        if(winner) {
-            Object obj;
-            CScript pubkey;
-            pubkey = GetScriptForDestination(winner->pubkey.GetID());
-            CTxDestination address1;
-            ExtractDestination(pubkey, address1);
-            CBitcoinAddress address2(address1);
-
-            obj.push_back(Pair("IP:port",       winner->addr.ToString()));
-            obj.push_back(Pair("protocol",      (int64_t)winner->protocolVersion));
-            obj.push_back(Pair("vin",           winner->vin.prevout.hash.ToString()));
-            obj.push_back(Pair("pubkey",        address2.ToString()));
-            obj.push_back(Pair("lastseen",      (winner->lastPing == CMasternodePing()) ? winner->sigTime :
-                                                        (int64_t)winner->lastPing.sigTime));
-            obj.push_back(Pair("activeseconds", (winner->lastPing == CMasternodePing()) ? 0 :
-                                                        (int64_t)(winner->lastPing.sigTime - winner->sigTime)));
-            return obj;
-        }
-
-        return "unknown";
-    }
-
     if (strCommand == "genkey")
     {
         CKey secret;
@@ -368,42 +392,6 @@ Value masternode(const Array& params, bool fHelp)
         return CBitcoinSecret(secret).ToString();
     }
 
-    if (strCommand == "winners")
-    {
-        Object obj;
-
-        for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
-        {
-            obj.push_back(Pair(strprintf("%d", nHeight),       GetRequiredPaymentsString(nHeight)));
-        }
-
-        return obj;
-    }
-
-    if(strCommand == "enforce")
-    {
-        return (uint64_t)enforceMasternodePaymentsTime;
-    }
-
-    if(strCommand == "connect")
-    {
-        std::string strAddress = "";
-        if (params.size() == 2){
-            strAddress = params[1].get_str();
-        } else {
-            throw runtime_error(
-                "Masternode address required\n");
-        }
-
-        CService addr = CService(strAddress);
-
-        if(ConnectNode((CAddress)addr, NULL, true)){
-            return "successfully connected";
-        } else {
-            return "error connecting";
-        }
-    }
-
     if(strCommand == "list-conf")
     {
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
@@ -457,6 +445,18 @@ Value masternode(const Array& params, bool fHelp)
         return mnObj;
     }
 
+    if (strCommand == "winners")
+    {
+        Object obj;
+
+        for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
+        {
+            obj.push_back(Pair(strprintf("%d", nHeight),       GetRequiredPaymentsString(nHeight)));
+        }
+
+        return obj;
+    }
+
     return Value::null;
 }
 

From 7aa96761186af0f6707b907f52bfbfa850f049f4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 12:24:06 -0700
Subject: [PATCH 1605/1819] Only check vote sigs once / payee cache update on
 newblock

---
 src/chain.cpp               |  7 -------
 src/coinbase-payee.cpp      |  3 ++-
 src/main.cpp                |  4 +---
 src/masternode-budget.cpp   | 31 +++++++++++++++++--------------
 src/masternode-budget.h     |  8 ++++----
 src/masternode-payments.cpp |  7 ++++---
 src/masternode-payments.h   |  2 +-
 7 files changed, 29 insertions(+), 33 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index e0acb42dfc8f..3d434c6c7815 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -16,17 +16,10 @@ void CChain::SetTip(CBlockIndex *pindex) {
         vChain.clear();
         return;
     }
-    int nChainSwitch = 0;
     vChain.resize(pindex->nHeight + 1);
     while (pindex && vChain[pindex->nHeight] != pindex) {
         vChain[pindex->nHeight] = pindex;
         pindex = pindex->pprev;
-        nChainSwitch++;
-    }
-
-    //recalculate the coinbase payee cache if needed
-    if(nChainSwitch > 1) {
-        coinbasePayee.BuildIndex(true);
     }
 }
 
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 6498ff010e66..cc0038c8595f 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -175,7 +175,7 @@ void CCoinbasePayee::BuildIndex(bool bForced)
         LogPrintf("CCoinbasePayee::BuildIndex - coinbase cache exists, skipping BuildIndex\n");
         return;
     } else if(bForced) {
-        LogPrintf("CCoinbasePayee::BuildIndex - Rebuilding coinbase cache\n");
+        if(fDebug) LogPrintf("CCoinbasePayee::BuildIndex - Rebuilding coinbase cache\n");
         mapPaidTime.clear();
     }
 
@@ -209,6 +209,7 @@ void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nT
 
     BOOST_FOREACH(CTxOut out, txCoinbase.vout){
         uint256 h = GetScriptHash(out.scriptPubKey);
+        LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - %s - %d\n", h.ToString(), nTime);
         if(mapPaidTime.count(h)){
             if(mapPaidTime[h] < nTime) {
                 mapPaidTime[h] = nTime;
diff --git a/src/main.cpp b/src/main.cpp
index c72d797b5f52..5aaf677c9513 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3262,9 +3262,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     if(!fLiteMode){
         if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
-            CScript payee;
-            CTxIn vin;
-            coinbasePayee.ProcessBlockCoinbaseTX(pblock->vtx[0], pblock->nTime);
+            if(fMasternode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true);
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 43913d1ed320..26252669b404 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -582,7 +582,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end())
     {
-        (*it).second.CleanAndRemove();
+        (*it).second.CleanAndRemove(false);
 
         CBudgetProposal* pbudgetProposal = &((*it).second);
         vBudgetProposalRet.push_back(pbudgetProposal);
@@ -608,7 +608,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end()){
-        (*it).second.CleanAndRemove();
+        (*it).second.CleanAndRemove(false);
         vBudgetPorposalsSort.push_back(make_pair(&((*it).second), (*it).second.GetYeas()));
         ++it;
     }
@@ -739,8 +739,6 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 void CBudgetManager::NewBlock()
 {
     if(!masternodeSync.IsSynced()) return;
-    
-    CheckAndRemove();
 
     if (strBudgetMode == "suggest") { //suggest the budget we see
         SubmitFinalBudget();
@@ -749,6 +747,7 @@ void CBudgetManager::NewBlock()
     //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
     if(chainActive.Height() % 6 != 0) return;
 
+    CheckAndRemove();
     mnodeman.DecrementVotedTimes();
 
     //remove invalid votes once in a while (we have to check the signatures and validity of every vote, somewhat CPU intensive)
@@ -764,13 +763,13 @@ void CBudgetManager::NewBlock()
 
     std::map<uint256, CBudgetProposal>::iterator it2 = mapProposals.begin();
     while(it2 != mapProposals.end()){
-        (*it2).second.CleanAndRemove();
+        (*it2).second.CleanAndRemove(false);
         ++it2;
     }
 
     std::map<uint256, CFinalizedBudget>::iterator it3 = mapFinalizedBudgets.begin();
     while(it3 != mapFinalizedBudgets.end()){
-        (*it3).second.CleanAndRemove();
+        (*it3).second.CleanAndRemove(false);
         ++it3;
     }
 }
@@ -842,7 +841,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
 
-        if(!vote.SignatureValid()){
+        if(!vote.SignatureValid(true)){
             LogPrintf("mvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
@@ -904,7 +903,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        if(!vote.SignatureValid()){
+        if(!vote.SignatureValid(true)){
             LogPrintf("fbvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
@@ -1125,12 +1124,12 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
 }
 
 // If masternode voted for a proposal, but is now invalid -- remove the vote
-void CBudgetProposal::CleanAndRemove()
+void CBudgetProposal::CleanAndRemove(bool fSignatureCheck)
 {
     std::map<uint256, CBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        (*it).second.fValid = (*it).second.SignatureValid();
+        (*it).second.fValid = (*it).second.SignatureValid(fSignatureCheck);
         ++it;
     }
 }
@@ -1317,7 +1316,7 @@ bool CBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     return true;
 }
 
-bool CBudgetVote::SignatureValid()
+bool CBudgetVote::SignatureValid(bool fSignatureCheck)
 {
     std::string errorMessage;
     std::string strMessage = vin.prevout.ToStringShort() + nProposalHash.ToString() + boost::lexical_cast<std::string>(nVote) + boost::lexical_cast<std::string>(nTime);
@@ -1330,6 +1329,8 @@ bool CBudgetVote::SignatureValid()
         return false;
     }
 
+    if(!fSignatureCheck) return true;
+
     if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
         LogPrintf("CBudgetVote::SignatureValid() - Verify message failed\n");
         return false;
@@ -1413,12 +1414,12 @@ void CFinalizedBudget::AutoCheck()
     }
 }
 // If masternode voted for a proposal, but is now invalid -- remove the vote
-void CFinalizedBudget::CleanAndRemove()
+void CFinalizedBudget::CleanAndRemove(bool fSignatureCheck)
 {
     std::map<uint256, CFinalizedBudgetVote>::iterator it = mapVotes.begin();
 
     while(it != mapVotes.end()) {
-        (*it).second.fValid = (*it).second.SignatureValid();
+        (*it).second.fValid = (*it).second.SignatureValid(fSignatureCheck);
         ++it;
     }
 }
@@ -1650,7 +1651,7 @@ bool CFinalizedBudgetVote::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     return true;
 }
 
-bool CFinalizedBudgetVote::SignatureValid()
+bool CFinalizedBudgetVote::SignatureValid(bool fSignatureCheck)
 {
     std::string errorMessage;
 
@@ -1664,6 +1665,8 @@ bool CFinalizedBudgetVote::SignatureValid()
         return false;
     }
 
+    if(!fSignatureCheck) return true;
+
     if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)) {
         LogPrintf("CFinalizedBudgetVote::SignatureValid() - Verify message failed\n");
         return false;
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 8752f05dbf73..2801631aa016 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -198,7 +198,7 @@ class CFinalizedBudget
     CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
 
-    void CleanAndRemove();
+    void CleanAndRemove(bool fSignatureCheck);
     void AddOrUpdateVote(CFinalizedBudgetVote& vote);
     double GetScore();
     bool HasMinimumRequiredSupport();
@@ -306,7 +306,7 @@ class CFinalizedBudgetVote
     CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn);
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool SignatureValid();
+    bool SignatureValid(bool fSignatureCheck);
     void Relay();
 
     uint256 GetHash(){
@@ -389,7 +389,7 @@ class CBudgetProposal
     void SetAllotted(CAmount nAllotedIn) {nAlloted = nAllotedIn;}
     CAmount GetAllotted() {return nAlloted;}
 
-    void CleanAndRemove();
+    void CleanAndRemove(bool fSignatureCheck);
 
     uint256 GetHash(){
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
@@ -470,7 +470,7 @@ class CBudgetVote
     CBudgetVote(CTxIn vin, uint256 nProposalHash, int nVoteIn);
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool SignatureValid();
+    bool SignatureValid(bool fSignatureCheck);
     void Relay();
 
     std::string GetVoteString() {
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 554ed001bbca..06021153eeb0 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -205,8 +205,9 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
             return;
         }
 
-        if(!winner.IsValid()){
-            LogPrintf("mnw - invalid message\n");
+        std::string strError = "";
+        if(!winner.IsValid(strError)){
+            LogPrintf("mnw - invalid message - %s\n", strError);
             return;
         }
 
@@ -422,7 +423,7 @@ bool IsReferenceNode(CTxIn& vin)
     return false;
 }
 
-bool CMasternodePaymentWinner::IsValid()
+bool CMasternodePaymentWinner::IsValid(std::string& strError)
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index da8732d72748..57541fb239da 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -141,7 +141,7 @@ class CMasternodePaymentWinner
     }
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool IsValid();
+    bool IsValid(std::string& strError);
     bool SignatureValid();
     void Relay();
 

From 841c7c270b1ebf60b6d6b5ad784b63a20df46527 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 12:29:19 -0700
Subject: [PATCH 1606/1819] version/proto bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/instantx.h      | 2 +-
 src/version.h       | 8 ++++----
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5d31da73a2cf..e1e2d20f70e4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 22)
+define(_CLIENT_VERSION_BUILD, 23)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 3f9fb3e502fd..892105f2b07a 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 22
+#define CLIENT_VERSION_BUILD 23
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 89decfbc9ab4..3fc71e77b80c 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70091;
+static const int MIN_INSTANTX_PROTO_VERSION = 70092;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index ede4290eb3dd..5434d68c1ce3 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70091;
+static const int PROTOCOL_VERSION = 70092;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70091;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70092;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70091;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70092;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70091;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70092;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From e82e5339f9ccd60085df3c491064c7079687b869 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 18 Jul 2015 12:52:12 -0700
Subject: [PATCH 1607/1819] Better NewBlock sync check

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 5aaf677c9513..51a195eaa463 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3261,8 +3261,8 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         return error("%s : ActivateBestChain failed", __func__);
 
     if(!fLiteMode){
-        if (!fImporting && !fReindex && chainActive.Height() > Checkpoints::GetTotalBlocksEstimate()){
-            if(fMasternode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true);
+        if (masternodeSync.IsSynced()){
+            if(fMasterNode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true);
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();

From 63c8ae15161d253457e34f280c2db98f7d0b7bcf Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 19 Jul 2015 14:25:55 +0200
Subject: [PATCH 1608/1819] UI: Persist Darksend+InstantX settings and default
 to Darksend=false on first start

---
 src/qt/forms/sendcoinsdialog.ui |  8 ++++----
 src/qt/sendcoinsdialog.cpp      | 28 +++++++++++++++++++++++-----
 2 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 84d4e4a8d6c5..cccf651a9925 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -616,8 +616,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>830</width>
-        <height>68</height>
+        <width>828</width>
+        <height>64</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@@ -1339,7 +1339,7 @@
           <string>Darksend</string>
          </property>
          <property name="checked">
-          <bool>true</bool>
+          <bool>false</bool>
          </property>
         </widget>
        </item>
@@ -1409,7 +1409,7 @@
  </resources>
  <connections/>
  <buttongroups>
-  <buttongroup name="groupFee"/>
   <buttongroup name="groupCustomFee"/>
+  <buttongroup name="groupFee"/>
  </buttongroups>
 </ui>
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index fe311be3f1a8..cc92599b7565 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -54,6 +54,14 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     connect(ui->lineEditCoinControlChange, SIGNAL(textEdited(const QString &)), this, SLOT(coinControlChangeEdited(const QString &)));
 
     // Dash specific
+    QSettings settings;
+    if (!settings.contains("bUseDarkSend"))
+        settings.setValue("bUseDarkSend", false);
+    if (!settings.contains("bUseInstantX"))
+        settings.setValue("bUseInstantX", false);
+        
+    bool useDarkSend = settings.value("bUseDarkSend").toBool();
+    bool useInstantX = settings.value("bUseInstantX").toBool();
     if(fLiteMode) {
         ui->checkUseDarksend->setChecked(false);
         ui->checkUseDarksend->setVisible(false);
@@ -61,6 +69,13 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
         CoinControlDialog::coinControl->useDarkSend = false;
         CoinControlDialog::coinControl->useInstantX = false;
     }
+    else{
+        ui->checkUseDarksend->setChecked(useDarkSend);
+        ui->checkInstantX->setChecked(useInstantX);
+        CoinControlDialog::coinControl->useDarkSend = useDarkSend;
+        CoinControlDialog::coinControl->useInstantX = useInstantX;
+    }
+    
     connect(ui->checkUseDarksend, SIGNAL(stateChanged ( int )), this, SLOT(updateDisplayUnit()));
     connect(ui->checkInstantX, SIGNAL(stateChanged ( int )), this, SLOT(updateInstantX()));
 
@@ -91,7 +106,6 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     ui->labelCoinControlChange->addAction(clipboardChangeAction);
 
     // init transaction fee section
-    QSettings settings;
     if (!settings.contains("fFeeSectionMinimized"))
         settings.setValue("fFeeSectionMinimized", true);
     if (!settings.contains("nFeeRadio") && settings.contains("nTransactionFee") && settings.value("nTransactionFee").toLongLong() > 0) // compatibility
@@ -110,6 +124,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
         settings.setValue("fPayOnlyMinFee", false);
     if (!settings.contains("fSendFreeTransactions"))
         settings.setValue("fSendFreeTransactions", false);
+
     ui->groupFee->setId(ui->radioSmartFee, 0);
     ui->groupFee->setId(ui->radioCustomFee, 1);
     ui->groupFee->button((int)std::max(0, std::min(1, settings.value("nFeeRadio").toInt())))->setChecked(true);
@@ -120,7 +135,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
     ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
     ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
-    minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
+    minimizeFeeSection(settings.value("bDarksendChecked").toBool());
 }
 
 void SendCoinsDialog::setClientModel(ClientModel *clientModel)
@@ -533,11 +548,12 @@ void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfir
     if(model && model->getOptionsModel())
     {
 	    uint64_t bal = 0;
-
+        QSettings settings;
+        settings.setValue("bUseDarkSend", ui->checkUseDarksend->isChecked());
 	    if(ui->checkUseDarksend->isChecked()) {
-		bal = anonymizedBalance;
+		    bal = anonymizedBalance;
 	    } else {
-		bal = balance;
+		    bal = balance;
 	    }
 
         ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), bal));
@@ -557,6 +573,8 @@ void SendCoinsDialog::updateDisplayUnit()
 
 void SendCoinsDialog::updateInstantX()
 {
+    QSettings settings;
+    settings.setValue("bUseInstantX", ui->checkInstantX->isChecked());
     CoinControlDialog::coinControl->useInstantX = ui->checkInstantX->isChecked();
     coinControlUpdateLabels();
 }

From c8c83af2f53d9036ca20f48c17a3bc820d642e2e Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 19 Jul 2015 14:29:18 +0200
Subject: [PATCH 1609/1819] UI: Persist Darksend+InstantX settings and default
 to Darksend=false on first start (revert screen-size change)

---
 src/qt/forms/sendcoinsdialog.ui | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index cccf651a9925..0d4e4debfdf8 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -616,8 +616,8 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>828</width>
-        <height>64</height>
+        <width>830</width>
+        <height>68</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">

From 19d698529edb17862cd7ea59eb5a28ce723b5f71 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Sun, 19 Jul 2015 14:42:38 +0200
Subject: [PATCH 1610/1819] UI: Persist Darksend+InstantX settings (Cut'n'paste
 error fixed)

---
 src/qt/sendcoinsdialog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index cc92599b7565..297574145f8b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -135,7 +135,7 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
     ui->customFee->setValue(settings.value("nTransactionFee").toLongLong());
     ui->checkBoxMinimumFee->setChecked(settings.value("fPayOnlyMinFee").toBool());
     ui->checkBoxFreeTx->setChecked(settings.value("fSendFreeTransactions").toBool());
-    minimizeFeeSection(settings.value("bDarksendChecked").toBool());
+    minimizeFeeSection(settings.value("fFeeSectionMinimized").toBool());
 }
 
 void SendCoinsDialog::setClientModel(ClientModel *clientModel)

From 2e6eb9f2b611f03e1c78723428a56eefb49e8a04 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 06:28:23 -0700
Subject: [PATCH 1611/1819] incremental update of coinbase cache

---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 51a195eaa463..116a6830cebe 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3262,7 +3262,9 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     if(!fLiteMode){
         if (masternodeSync.IsSynced()){
-            if(fMasterNode || activeMasternode.status == ACTIVE_MASTERNODE_STARTED) coinbasePayee.BuildIndex(true);
+            CScript payee;
+            CTxIn vin;
+            coinbasePayee.ProcessBlockCoinbaseTX(pblock->vtx[0], pblock->nTime);
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();

From 143c80789cb67e42569e97aaf4163e8ef10d71c5 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 06:45:35 -0700
Subject: [PATCH 1612/1819] rebuild index when switching chains

---
 src/chain.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/chain.cpp b/src/chain.cpp
index 3d434c6c7815..4a98af371bb4 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -16,11 +16,18 @@ void CChain::SetTip(CBlockIndex *pindex) {
         vChain.clear();
         return;
     }
+    int nChainSwitch = 0;
     vChain.resize(pindex->nHeight + 1);
     while (pindex && vChain[pindex->nHeight] != pindex) {
         vChain[pindex->nHeight] = pindex;
         pindex = pindex->pprev;
     }
+    
+    //recalculate the coinbase payee cache if needed
+    if(nChainSwitch > 1) {
+        coinbasePayee.BuildIndex(true);
+    }
+
 }
 
 CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {

From 9c34930680d982e180ac08bcab0298fe32cc253a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 08:49:46 -0700
Subject: [PATCH 1613/1819] Disable nDos on early ping / sync regtest changes

---
 src/activemasternode.cpp | 1 +
 src/darksend.cpp         | 3 ++-
 src/masternode-sync.cpp  | 7 +++++++
 src/masternode.cpp       | 2 +-
 src/masternode.h         | 1 +
 5 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index bf4f91388e7d..02350cea35c5 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -171,6 +171,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
         pmn->lastPing = mnp;
         mapSeenMasternodePing[mnp.GetHash()] = mnp;
         mnp.Relay();
+
         return true;
     }
     else
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 1914a61b6e3d..6d25f53dc6cd 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2331,7 +2331,8 @@ void ThreadCheckDarkSendPool()
         masternodeSync.Process();
 
         if(masternodeSync.IsSynced()) {
-            if(c % MASTERNODE_PING_SECONDS == 1) activeMasternode.ManageStatus(); // activate right after sync
+            //check if we should active or ping every few minutes
+            if(c % MASTERNODE_PING_SECONDS == 1) activeMasternode.ManageStatus();
 
             if(c % 60 == 0)
             {
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 01a208709827..51908181db91 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -58,6 +58,7 @@ void CMasternodeSync::GetNextAsset()
             RequestedMasternodeAssets = MASTERNODE_SYNC_BUDGET;
             break;
         case(MASTERNODE_SYNC_BUDGET):
+            LogPrintf("CMasternodeSync::GetNextAsset - Sync has finished\n");
             RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             break;
     }
@@ -94,6 +95,12 @@ void CMasternodeSync::Process()
     {
         if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION)
         {
+            //set to syned
+            if(Params().NetworkID() == CBaseChainParams::REGTEST && c >= 10) {
+                LogPrintf("CMasternodeSync::Process - Sync has finished\n");
+                RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
+                RequestedMasternodeAttempt = 0;
+            }
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
                 if(pnode->HasFulfilledRequest("getspork")) continue;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 9487fd33279a..a06d43de8adf 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -562,7 +562,7 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
             return true;
         }
         if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode ping arrived too early, vin: %s\n", vin.ToString());
-        nDos = 1;
+        //nDos = 1; //disable, this is happening frequently and causing banned peers
         return false;
     }
     if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Couldn't find compatible Masternode entry, vin: %s\n", vin.ToString());
diff --git a/src/masternode.h b/src/masternode.h
index 0246850f105c..0cf4aa673e9f 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -229,6 +229,7 @@ class CMasternode
     bool IsPingedWithin(int seconds, int64_t now = -1)
     {
         now == -1 ? now = GetAdjustedTime() : now;
+
         return (lastPing == CMasternodePing())
                 ? false
                 : now - lastPing.sigTime < seconds;

From c95111476c190c3ecd77f61ef5a5b53dd0f77710 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 08:51:02 -0700
Subject: [PATCH 1614/1819] vesion bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e1e2d20f70e4..f005c814ecb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 23)
+define(_CLIENT_VERSION_BUILD, 24)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 892105f2b07a..aa7f03aec20d 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 23
+#define CLIENT_VERSION_BUILD 24
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 9668befdf4cf025468349f3fc03fe674c36304df Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 09:38:23 -0700
Subject: [PATCH 1615/1819] Dont ask for mnb of known masternodes

---
 src/masternodeman.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 1e4466890198..4c333ecf5fdc 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -634,6 +634,10 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         //   otherwise we'll think a full sync succeeded when they return a result
         if(!masternodeSync.IsSynced()) return;
 
+        //search existing Masternode list, if it's known -- don't ask for the mnb
+        CMasternode* pmn = mnodeman.Find(mnp.vin);
+        if(pmn != NULL) return;
+
         // we wasn't able to accept mnp but nothing significant happened,
         // we might just have to ask for a masternode entry once
         std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);

From 60f742858549f781f4c56d0b68f0173f66abceb5 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 10:56:45 -0700
Subject: [PATCH 1616/1819] Disabled coinpayee cleanup

---
 src/coinbase-payee.cpp | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index cc0038c8595f..042f3daf747e 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -213,6 +213,8 @@ void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nT
         if(mapPaidTime.count(h)){
             if(mapPaidTime[h] < nTime) {
                 mapPaidTime[h] = nTime;
+            } else {
+                LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - not updated -- %s - %d\n", h.ToString(), nTime);
             }
         } else {
             mapPaidTime[h] = nTime;
@@ -233,14 +235,14 @@ int64_t CCoinbasePayee::GetLastPaid(CScript& pubkey)
 
 void CCoinbasePayee::CleanUp()
 {
-    std::map<uint256, int64_t>::iterator it = mapPaidTime.begin();
-    while(it != mapPaidTime.end())
-    {
-        //keep 30 days of history
-        if((*it).second < GetAdjustedTime() - (60*60*24*30)) {
-            mapPaidTime.erase(it++);
-        } else {
-            ++it;
-        }
-    }
+    // std::map<uint256, int64_t>::iterator it = mapPaidTime.begin();
+    // while(it != mapPaidTime.end())
+    // {
+    //     //keep 30 days of history
+    //     if((*it).second < GetAdjustedTime() - (60*60*24*30)) {
+    //         mapPaidTime.erase(it++);
+    //     } else {
+    //         ++it;
+    //     }
+    // }
 }

From e1279ebf1d2978ee1cfcc4e4de314830b8691223 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 11:19:11 -0700
Subject: [PATCH 1617/1819] Reprocess best chain for coinbase payee on each
 block

---
 src/chain.cpp          |  7 -------
 src/coinbase-payee.cpp | 31 +++++++++++++++++++++++++++----
 src/coinbase-payee.h   |  3 ++-
 src/main.cpp           |  2 +-
 4 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/src/chain.cpp b/src/chain.cpp
index 4a98af371bb4..3d434c6c7815 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -16,18 +16,11 @@ void CChain::SetTip(CBlockIndex *pindex) {
         vChain.clear();
         return;
     }
-    int nChainSwitch = 0;
     vChain.resize(pindex->nHeight + 1);
     while (pindex && vChain[pindex->nHeight] != pindex) {
         vChain[pindex->nHeight] = pindex;
         pindex = pindex->pprev;
     }
-    
-    //recalculate the coinbase payee cache if needed
-    if(nChainSwitch > 1) {
-        coinbasePayee.BuildIndex(true);
-    }
-
 }
 
 CBlockLocator CChain::GetLocator(const CBlockIndex *pindex) const {
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 042f3daf747e..8b2fd4d2bb2a 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -200,7 +200,30 @@ void CCoinbasePayee::BuildIndex(bool bForced)
     return;
 }
 
-void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime)
+// Reprocess the last 120 blocks and overwrite the lastpaid times (incase we switch chains)
+// TODO : Keep track of the block hashes and reprocess until we find one we've processed
+void CCoinbasePayee::ReprocessChain()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    int count = 0;
+
+    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
+        count++;
+        if(count > 120) return;
+
+        CBlock block;
+        if (ReadBlockFromDisk(block, pindexPrev)) {
+            ProcessBlockCoinbaseTX(block.vtx[0], block.nTime, true);
+        }
+
+        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
+        pindexPrev = pindexPrev->pprev;
+    }
+
+    return;
+}
+
+void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime, bool fOverwrite)
 {
     if (!txCoinbase.IsCoinBase()){
         LogPrintf("ERROR: CCoinbasePayee::ProcessBlockCoinbaseTX - tx is not coinbase\n");
@@ -209,12 +232,12 @@ void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nT
 
     BOOST_FOREACH(CTxOut out, txCoinbase.vout){
         uint256 h = GetScriptHash(out.scriptPubKey);
-        LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - %s - %d\n", h.ToString(), nTime);
+        if(fDebug) LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - %s - %d\n", h.ToString(), nTime);
         if(mapPaidTime.count(h)){
-            if(mapPaidTime[h] < nTime) {
+            if(mapPaidTime[h] < nTime || fOverwrite) {
                 mapPaidTime[h] = nTime;
             } else {
-                LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - not updated -- %s - %d\n", h.ToString(), nTime);
+                if(fDebug) LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - not updated -- %s - %d\n", h.ToString(), nTime);
             }
         } else {
             mapPaidTime[h] = nTime;
diff --git a/src/coinbase-payee.h b/src/coinbase-payee.h
index 241857d9bc3a..92ec3f4931bf 100644
--- a/src/coinbase-payee.h
+++ b/src/coinbase-payee.h
@@ -70,7 +70,8 @@ class CCoinbasePayee
     }
 
     void BuildIndex(bool bForced=false);
-    void ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime);
+    void ReprocessChain();
+    void ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime, bool fOverwrite=false);
     int64_t GetLastPaid(CScript& pubkey);
     void CleanUp();
 
diff --git a/src/main.cpp b/src/main.cpp
index 116a6830cebe..eb55cc15cf49 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3264,7 +3264,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         if (masternodeSync.IsSynced()){
             CScript payee;
             CTxIn vin;
-            coinbasePayee.ProcessBlockCoinbaseTX(pblock->vtx[0], pblock->nTime);
+            coinbasePayee.ReprocessChain();
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();

From 57df98b38a34df41e3255542d0419f27548eebf9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 15:38:11 -0700
Subject: [PATCH 1618/1819] Force chain reprocess on load for coinbase-payee
 index

---
 src/init.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 5a1811c0b2ff..38b75a443e8a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1567,7 +1567,8 @@ bool AppInit2(boost::thread_group& threadGroup)
     */
 
     darkSendPool.InitCollateralAddress();
-    coinbasePayee.BuildIndex();
+    coinbasePayee.BuildIndex(true);
+    coinbasePayee.ReprocessChain();
 
     threadGroup.create_thread(boost::bind(&ThreadCheckDarkSendPool));
 

From e6327e5546c9c0f09fb797570f60e136aa7a701d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 19 Jul 2015 17:06:52 -0700
Subject: [PATCH 1619/1819] Disable coinbase payee cache

---
 src/coinbase-payee.cpp |  2 ++
 src/init.cpp           | 25 +++++++++++++------------
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
index 8b2fd4d2bb2a..34ec3397c1de 100644
--- a/src/coinbase-payee.cpp
+++ b/src/coinbase-payee.cpp
@@ -142,6 +142,8 @@ CCoinbasePayeeDB::ReadResult CCoinbasePayeeDB::Read(CCoinbasePayee& objToLoad)
 
 void DumpCoinbasePayees()
 {
+    return; //disable the cache
+
     int64_t nStart = GetTimeMillis();
 
     CCoinbasePayeeDB mndb;
diff --git a/src/init.cpp b/src/init.cpp
index 38b75a443e8a..a8ef742ab78d 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1441,19 +1441,20 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
-    CCoinbasePayeeDB payeedb;
-    CCoinbasePayeeDB::ReadResult readResult3 = payeedb.Read(coinbasePayee);
+    // Disable loading the coinbase cache
+    // CCoinbasePayeeDB payeedb;
+    // CCoinbasePayeeDB::ReadResult readResult3 = payeedb.Read(coinbasePayee);
     
-    if (readResult3 == CCoinbasePayeeDB::FileError)
-        LogPrintf("Missing payee cache - coinbase-payee.dat, will try to recreate\n");
-    else if (readResult3 != CCoinbasePayeeDB::Ok)
-    {
-        LogPrintf("Error reading coinbase-payee.dat: ");
-        if(readResult3 == CCoinbasePayeeDB::IncorrectFormat)
-            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
-        else
-            LogPrintf("file format is unknown or invalid, please fix it manually\n");
-    }
+    // if (readResult3 == CCoinbasePayeeDB::FileError)
+    //     LogPrintf("Missing payee cache - coinbase-payee.dat, will try to recreate\n");
+    // else if (readResult3 != CCoinbasePayeeDB::Ok)
+    // {
+    //     LogPrintf("Error reading coinbase-payee.dat: ");
+    //     if(readResult3 == CCoinbasePayeeDB::IncorrectFormat)
+    //         LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+    //     else
+    //         LogPrintf("file format is unknown or invalid, please fix it manually\n");
+    // }
 
 
     fMasterNode = GetBoolArg("-masternode", false);

From dba572ac969962b9113cb368dda628fbb4a8fada Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 19 Jul 2015 02:20:48 +0300
Subject: [PATCH 1620/1819] use specific protocols

---
 src/darksend-relay.cpp    |  2 +-
 src/darksend.cpp          |  8 ++++----
 src/init.cpp              |  4 ++--
 src/masternode-budget.cpp | 12 ++++++------
 src/masternode-sync.cpp   |  1 +
 src/masternode.cpp        |  4 ++--
 src/masternodeman.cpp     | 16 ++--------------
 src/masternodeman.h       |  4 +---
 src/qt/clientmodel.cpp    |  3 ++-
 src/rpcmasternode.cpp     |  7 +++++--
 10 files changed, 26 insertions(+), 35 deletions(-)

diff --git a/src/darksend-relay.cpp b/src/darksend-relay.cpp
index 4c209933655c..e0f7724315d8 100644
--- a/src/darksend-relay.cpp
+++ b/src/darksend-relay.cpp
@@ -85,7 +85,7 @@ bool CDarkSendRelay::VerifyMessage(std::string strSharedKey)
 
 void CDarkSendRelay::Relay()
 {
-    int nCount = std::min(mnodeman.CountEnabled(), 20);
+    int nCount = std::min(mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION), 20);
     int nRank1 = (rand() % nCount)+1; 
     int nRank2 = (rand() % nCount)+1; 
 
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6d25f53dc6cd..2cb9557a7fb3 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -80,7 +80,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
         if(sessionUsers == 0) {
             if(pmn->nLastDsq != 0 &&
-                pmn->nLastDsq + mnodeman.CountMasternodesAboveProtocol(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
+                pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
                 LogPrintf("dsa -- last dsq too recent, must wait. %s \n", pfrom->addr.ToString().c_str());
                 errorID = ERR_RECENT;
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
@@ -139,7 +139,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             if(fDebug) LogPrintf("dsq last %d last2 %d count %d\n", pmn->nLastDsq, pmn->nLastDsq + mnodeman.size()/5, mnodeman.nDsqCount);
             //don't allow a few nodes to dominate the queuing process
             if(pmn->nLastDsq != 0 &&
-                pmn->nLastDsq + mnodeman.CountMasternodesAboveProtocol(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
+                pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
                 if(fDebug) LogPrintf("dsq -- Masternode sending too many dsq messages. %s \n", pmn->addr.ToString().c_str());
                 return;
             }
@@ -1679,7 +1679,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
             }
 
             if(pmn->nLastDsq != 0 &&
-                pmn->nLastDsq + mnodeman.CountMasternodesAboveProtocol(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
+                pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
                 i++;
                 continue;
             }
@@ -2348,7 +2348,7 @@ void ThreadCheckDarkSendPool()
                 CleanTransactionLocksList();
 
                 //if we've used 90% of the Masternode list then drop all the oldest.
-                int nThreshold = (int)(mnodeman.CountEnabled() * 0.9);
+                int nThreshold = (int)(mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION) * 0.9);
                 if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
                 while((int)vecMasternodesUsed.size() > nThreshold){
                     vecMasternodesUsed.erase(vecMasternodesUsed.begin());
diff --git a/src/init.cpp b/src/init.cpp
index a8ef742ab78d..dac6b177c3b8 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -415,7 +415,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -mnconflock=<n>            " + strprintf(_("Lock masternodes from masternode configuration file (default: %u)"), 1) + "\n";
     strUsage += "  -masternodeprivkey=<n>     " + _("Set the masternode private key") + "\n";
     strUsage += "  -masternodeaddr=<n>        " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
-    strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default: %u)"), MIN_POOL_PEER_PROTO_VERSION) + "\n";
+    strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default: %u)"), masternodePayments.GetMinMasternodePaymentsProto()) + "\n";
     strUsage += "  -budgetvotemode=<mode>    " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
 
     strUsage += "\n" + _("Darksend options:") + "\n";
@@ -869,7 +869,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     }
 
     //ignore masternodes below protocol version
-    nMasternodeMinProtocol = GetArg("-masternodeminprotocol", MIN_POOL_PEER_PROTO_VERSION);
+    nMasternodeMinProtocol = GetArg("-masternodeminprotocol", masternodePayments.GetMinMasternodePaymentsProto());
 
     /* Start the RPC server already.  It will be started in "warmup" mode
      * and not really process calls already (but it will signify connections
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 26252669b404..d0655f046385 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -523,7 +523,7 @@ bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
     /*
         If budget doesn't have 5% of the network votes, then we should pay a masternode instead
     */
-    if(nHighestCount > mnodeman.CountEnabled()/20) return true;
+    if(nHighestCount > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/20) return true;
 
     return false;
 }
@@ -551,7 +551,7 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     /*
         If budget doesn't have 5% of the network votes, then we should pay a masternode instead
     */
-    if(nHighestCount < mnodeman.CountEnabled()/20) return false;
+    if(nHighestCount < mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/20) return false;
 
     // check the highest finalized budgets (+/- 10% to assist in consensus)
 
@@ -560,7 +560,7 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
     {
         CFinalizedBudget* pfinalizedBudget = &((*it).second);
 
-        if(pfinalizedBudget->GetVoteCount() > nHighestCount - mnodeman.CountEnabled()/10){
+        if(pfinalizedBudget->GetVoteCount() > nHighestCount - mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10){
             if(nBlockHeight >= pfinalizedBudget->GetBlockStart() && nBlockHeight <= pfinalizedBudget->GetBlockEnd()){
                 if(pfinalizedBudget->IsTransactionValid(txNew, nBlockHeight)){
                     return true;
@@ -636,7 +636,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         //prop start/end should be inside this period
         if(pbudgetProposal->fValid && pbudgetProposal->nBlockStart <= nBlockStart &&
                 pbudgetProposal->nBlockEnd >= nBlockEnd &&
-                pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled()/10)
+                pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10)
         {
             if(nTotalBudget == nBudgetAllocated){
                 pbudgetProposal->SetAllotted(0);
@@ -1070,7 +1070,7 @@ CBudgetProposal::CBudgetProposal(const CBudgetProposal& other)
 
 bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
 {
-    if(GetNays() - GetYeas() > mnodeman.CountEnabled()/10){
+    if(GetNays() - GetYeas() > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10){
          strError = "Active removal";
          return false;
     }
@@ -1094,7 +1094,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
-    //     if(GetYeas()-GetNays() < (mnodeman.CountEnabled()/10)) {
+    //     if(GetYeas()-GetNays() < (mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10)) {
     //         strError = "Not enough support";
     //         return false;
     //     }
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 51908181db91..2507a72b1906 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -4,6 +4,7 @@
 
 #include "main.h"
 #include "masternode-sync.h"
+#include "masternode-payments.h"
 #include "masternode.h"
 #include "masternodeman.h"
 #include "util.h"
diff --git a/src/masternode.cpp b/src/masternode.cpp
index a06d43de8adf..279ecbeb4f74 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -78,7 +78,7 @@ CMasternode::CMasternode()
     cacheInputAgeBlock = 0;
     unitTest = false;
     allowFreeTx = true;
-    protocolVersion = MIN_PEER_PROTO_VERSION;
+    protocolVersion = PROTOCOL_VERSION;
     nLastDsq = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
@@ -244,7 +244,7 @@ CMasternodeBroadcast::CMasternodeBroadcast()
     cacheInputAgeBlock = 0;
     unitTest = false;
     allowFreeTx = true;
-    protocolVersion = MIN_PEER_PROTO_VERSION;
+    protocolVersion = PROTOCOL_VERSION;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
 }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 4c333ecf5fdc..6bf28ca10206 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -289,19 +289,7 @@ void CMasternodeMan::Clear()
     nDsqCount = 0;
 }
 
-int CMasternodeMan::CountEnabled()
-{
-    int i = 0;
-
-    BOOST_FOREACH(CMasternode& mn, vMasternodes) {
-        mn.Check();
-        if(mn.IsEnabled()) i++;
-    }
-
-    return i;
-}
-
-int CMasternodeMan::CountMasternodesAboveProtocol(int protocolVersion)
+int CMasternodeMan::CountEnabled(int protocolVersion)
 {
     int i = 0;
 
@@ -390,7 +378,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //make sure it has as many confirmations as there are masternodes
-        if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
+        if(mn.GetMasternodeInputAge() < CountEnabled(masternodePayments.GetMinMasternodePaymentsProto())) continue;
 
         if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 8c7b4393531e..3d5a279d55cc 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -101,9 +101,7 @@ class CMasternodeMan
     /// Clear Masternode vector
     void Clear();
 
-    int CountEnabled();
-
-    int CountMasternodesAboveProtocol(int protocolVersion);
+    int CountEnabled(int protocolVersion = nMasternodeMinProtocol);
 
     void DsegUpdate(CNode* pnode);
 
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index d19e0f8042ed..2ebe471670e1 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -69,7 +69,8 @@ int ClientModel::getNumConnections(unsigned int flags) const
 
 QString ClientModel::getMasternodeCountString() const
 {
-    return QString::number((int)mnodeman.CountEnabled()) + " / " + QString::number((int)mnodeman.size());
+    return QString::number((int)mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)) +
+            " / " + QString::number((int)mnodeman.CountEnabled()) + " / " + QString::number((int)mnodeman.size());
 }
 
 int ClientModel::getNumBlocks() const
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index c0f4a1566693..1b71d3cf97f7 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -136,7 +136,7 @@ Value masternode(const Array& params, bool fHelp)
                 "1. \"command\"        (string or set of strings, required) The command to execute\n"
                 "2. \"passphrase\"     (string, optional) The wallet passphrase\n"
                 "\nAvailable commands:\n"
-                "  count        - Print number of all known masternodes (optional: 'enabled', 'both')\n"
+                "  count        - Print number of all known masternodes (optional: 'ds', 'enabled', 'all')\n"
                 "  current      - Print info on current masternode winner\n"
                 "  debug        - Print masternode status\n"
                 "  genkey       - Generate new masternodeprivkey\n"
@@ -190,8 +190,11 @@ Value masternode(const Array& params, bool fHelp)
         }
         if (params.size() == 2)
         {
+            if(params[1] == "ds") return mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION);
             if(params[1] == "enabled") return mnodeman.CountEnabled();
-            if(params[1] == "both") return strprintf("%d / %d", mnodeman.CountEnabled(), mnodeman.size());
+            if(params[1] == "all") return strprintf("%d / %d / %d",
+                                                    mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION),
+                                                    mnodeman.CountEnabled(), mnodeman.size());
         }
         return mnodeman.size();
     }

From 86c869137f66a0d2bb6eaca8cd92ae2f53a3b551 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 19 Jul 2015 02:25:52 +0300
Subject: [PATCH 1621/1819] fixes for sync

---
 src/masternode-sync.cpp | 55 ++++++++++++++++++++++++-----------------
 src/masternode.cpp      |  1 +
 src/masternodeman.cpp   |  4 ---
 3 files changed, 33 insertions(+), 27 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 2507a72b1906..5d66ef4cfe59 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -47,6 +47,9 @@ void CMasternodeSync::GetNextAsset()
     switch(RequestedMasternodeAssets)
     {
         case(MASTERNODE_SYNC_INITIAL):
+            lastMasternodeList = 0;
+            lastMasternodeWinner = 0;
+            lastBudgetItem = 0;
             RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
             break;
         case(MASTERNODE_SYNC_SPORKS):
@@ -76,7 +79,7 @@ void CMasternodeSync::Process()
         */
         if(mnodeman.CountEnabled() == 0) {
             RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
-            RequestedMasternodeAttempt = 0;
+            GetNextAsset();
         }
         return;
     }
@@ -85,7 +88,6 @@ void CMasternodeSync::Process()
 
     if(fDebug) LogPrintf("CMasternodeSync::Process() - RequestedMasternodeAssets %d c %d\n", RequestedMasternodeAssets, c);
 
-    //request full mn list only if Masternodes.dat was updated quite a long time ago
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
 
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -94,31 +96,33 @@ void CMasternodeSync::Process()
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
-        if (pnode->nVersion >= MIN_POOL_PEER_PROTO_VERSION)
-        {
-            //set to syned
-            if(Params().NetworkID() == CBaseChainParams::REGTEST && c >= 10) {
-                LogPrintf("CMasternodeSync::Process - Sync has finished\n");
-                RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
-                RequestedMasternodeAttempt = 0;
-            }
 
-            if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
-                if(pnode->HasFulfilledRequest("getspork")) continue;
-                pnode->FulfilledRequest("getspork");
+        //set to synced
+        if(Params().NetworkID() == CBaseChainParams::REGTEST && c >= 10) {
+            LogPrintf("CMasternodeSync::Process - Sync has finished\n");
+            RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
+            RequestedMasternodeAttempt = 0;
+        }
 
-                if(RequestedMasternodeAttempt <= 2){
-                    pnode->PushMessage("getsporks"); //get current network sporks
-                    if(RequestedMasternodeAttempt == 2) GetNextAsset();
-                    RequestedMasternodeAttempt++;
-                }
-                return;
+        if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
+            if(pnode->HasFulfilledRequest("getspork")) continue;
+            pnode->FulfilledRequest("getspork");
+
+            if(RequestedMasternodeAttempt <= 2){
+                pnode->PushMessage("getsporks"); //get current network sporks
+                if(RequestedMasternodeAttempt == 2) GetNextAsset();
+                RequestedMasternodeAttempt++;
             }
+            return;
+        }
+
+        //don't begin syncing until we're at a recent block
+        if(pindexPrev->nHeight < pindexBestHeader->nHeight) return;
 
-            //don't begin syncing until we're at a recent block
-            if(pindexPrev->nTime + 600 < GetTime()) return;
+        if (pnode->nVersion >= nMasternodeMinProtocol) {
 
-            if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST){
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
+                if(fDebug) LogPrintf("CMasternodeSync::Process() - lastMasternodeList %lld (GetTime() - MASTERNODE_SYNC_TIMEOUT) %lld\n", lastMasternodeList, GetTime() - MASTERNODE_SYNC_TIMEOUT);
                 if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
                     GetNextAsset();
                     return;
@@ -134,8 +138,10 @@ void CMasternodeSync::Process()
                 }
                 return;
             }
+        }
 
-            if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW){
+        if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
                 if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
                     GetNextAsset();
                     return;
@@ -151,6 +157,9 @@ void CMasternodeSync::Process()
                 }
                 return;
             }
+        }
+
+        if (pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) {
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 279ecbeb4f74..ed49a8005bb3 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -355,6 +355,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
         pmn->UpdateFromNewBroadcast((*this));
         pmn->Check();
         if(pmn->IsEnabled()) Relay();
+        masternodeSync.AddedMasternodeList();
     }
 
     return true;
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 6bf28ca10206..932e54ba2167 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -618,10 +618,6 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        // only ask for missing items after our syncing process is complete -- 
-        //   otherwise we'll think a full sync succeeded when they return a result
-        if(!masternodeSync.IsSynced()) return;
-
         //search existing Masternode list, if it's known -- don't ask for the mnb
         CMasternode* pmn = mnodeman.Find(mnp.vin);
         if(pmn != NULL) return;

From 4bcd548b62467e97286d4bfc41f611361baf16a7 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 19 Jul 2015 11:19:54 +0300
Subject: [PATCH 1622/1819] slightly refactor

---
 src/masternode-sync.cpp | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 5d66ef4cfe59..cd5c95d2c229 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -71,7 +71,12 @@ void CMasternodeSync::GetNextAsset()
 
 void CMasternodeSync::Process()
 {
-    static int c = 0;
+    static int tick = 0;
+
+    if(tick++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
+
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return;
 
     if(IsSynced()) {
         /* 
@@ -79,20 +84,14 @@ void CMasternodeSync::Process()
         */
         if(mnodeman.CountEnabled() == 0) {
             RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
-            GetNextAsset();
-        }
-        return;
+        } else
+            return;
     }
 
-    if(c++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
-
-    if(fDebug) LogPrintf("CMasternodeSync::Process() - RequestedMasternodeAssets %d c %d\n", RequestedMasternodeAssets, c);
+    if(fDebug) LogPrintf("CMasternodeSync::Process() - tick %d RequestedMasternodeAssets %d\n", tick, RequestedMasternodeAssets);
 
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
 
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return;
-
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
@@ -116,8 +115,8 @@ void CMasternodeSync::Process()
             return;
         }
 
-        //don't begin syncing until we're at a recent block
-        if(pindexPrev->nHeight < pindexBestHeader->nHeight) return;
+        //don't begin syncing until we're almost at a recent block
+        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
 
         if (pnode->nVersion >= nMasternodeMinProtocol) {
 

From b1f19c7e82be9df77847c2c1a16a322be2708d2a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 19 Jul 2015 16:38:25 +0300
Subject: [PATCH 1623/1819] process checks we can without waiting for full sync

---
 src/main.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index eb55cc15cf49..4f8940109006 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3261,13 +3261,14 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         return error("%s : ActivateBestChain failed", __func__);
 
     if(!fLiteMode){
-        if (masternodeSync.IsSynced()){
+        if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_LIST) {
             CScript payee;
             CTxIn vin;
             coinbasePayee.ReprocessChain();
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
-            budget.NewBlock();
+            if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_BUDGET)
+                budget.NewBlock();
         }
     }
 

From 5f9c676e05e0811530c47f95e8539a83bfa711be Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 19 Jul 2015 17:51:37 +0300
Subject: [PATCH 1624/1819] fix condition for a recent block in mn sync

---
 src/masternode-sync.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index cd5c95d2c229..d5ea85646189 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -97,7 +97,7 @@ void CMasternodeSync::Process()
     {
 
         //set to synced
-        if(Params().NetworkID() == CBaseChainParams::REGTEST && c >= 10) {
+        if(Params().NetworkID() == CBaseChainParams::REGTEST && tick >= 10) {
             LogPrintf("CMasternodeSync::Process - Sync has finished\n");
             RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             RequestedMasternodeAttempt = 0;
@@ -116,7 +116,7 @@ void CMasternodeSync::Process()
         }
 
         //don't begin syncing until we're almost at a recent block
-        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
+        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
 
         if (pnode->nVersion >= nMasternodeMinProtocol) {
 

From 753297ea99db1ce58df75ebdbfcb18b417e61647 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 20 Jul 2015 08:03:36 +0300
Subject: [PATCH 1625/1819] drop -masternodeminprotocol/nMasternodeMinProtocol,
 use masternodePayments.GetMinMasternodePaymentsProto()

---
 src/init.cpp            | 4 ----
 src/masternode-sync.cpp | 4 +---
 src/masternode.cpp      | 4 ++--
 src/masternodeman.cpp   | 5 +++--
 src/masternodeman.h     | 2 +-
 src/util.cpp            | 1 -
 src/util.h              | 1 -
 7 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index dac6b177c3b8..c0cd20d16309 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -415,7 +415,6 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -mnconflock=<n>            " + strprintf(_("Lock masternodes from masternode configuration file (default: %u)"), 1) + "\n";
     strUsage += "  -masternodeprivkey=<n>     " + _("Set the masternode private key") + "\n";
     strUsage += "  -masternodeaddr=<n>        " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
-    strUsage += "  -masternodeminprotocol=<n> " + strprintf(_("Ignore masternodes less than version (example: 70050; default: %u)"), masternodePayments.GetMinMasternodePaymentsProto()) + "\n";
     strUsage += "  -budgetvotemode=<mode>    " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
 
     strUsage += "\n" + _("Darksend options:") + "\n";
@@ -868,9 +867,6 @@ bool AppInit2(boost::thread_group& threadGroup)
             return InitError(_("Unable to sign spork message, wrong key?"));
     }
 
-    //ignore masternodes below protocol version
-    nMasternodeMinProtocol = GetArg("-masternodeminprotocol", masternodePayments.GetMinMasternodePaymentsProto());
-
     /* Start the RPC server already.  It will be started in "warmup" mode
      * and not really process calls already (but it will signify connections
      * that the server is there and will be ready later).  Warmup mode will
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d5ea85646189..44d6fb52f635 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -118,7 +118,7 @@ void CMasternodeSync::Process()
         //don't begin syncing until we're almost at a recent block
         if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
 
-        if (pnode->nVersion >= nMasternodeMinProtocol) {
+        if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
                 if(fDebug) LogPrintf("CMasternodeSync::Process() - lastMasternodeList %lld (GetTime() - MASTERNODE_SYNC_TIMEOUT) %lld\n", lastMasternodeList, GetTime() - MASTERNODE_SYNC_TIMEOUT);
@@ -137,9 +137,7 @@ void CMasternodeSync::Process()
                 }
                 return;
             }
-        }
 
-        if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
                 if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
                     GetNextAsset();
diff --git a/src/masternode.cpp b/src/masternode.cpp
index ed49a8005bb3..4e97c53211ba 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -302,7 +302,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
     std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
     std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
-    if(protocolVersion < nMasternodeMinProtocol) {
+    if(protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
         LogPrintf("mnb - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
         return false;
     }
@@ -516,7 +516,7 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
 
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
-    if(pmn != NULL && pmn->IsEnabled() && pmn->protocolVersion >= nMasternodeMinProtocol)
+    if(pmn != NULL && pmn->IsEnabled() && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
         // update only if there is no known ping for this masternode or
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 932e54ba2167..c25ca010d503 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -239,7 +239,7 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
         if((*it).activeState == CMasternode::MASTERNODE_REMOVE ||
                 (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT ||
                 (forceExpiredRemoval && (*it).activeState == CMasternode::MASTERNODE_EXPIRED) ||
-                (*it).protocolVersion < nMasternodeMinProtocol) {
+                (*it).protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
             if(fDebug) LogPrintf("CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
             it = vMasternodes.erase(it);
         } else {
@@ -292,6 +292,7 @@ void CMasternodeMan::Clear()
 int CMasternodeMan::CountEnabled(int protocolVersion)
 {
     int i = 0;
+    protocolVersion = protocolVersion == -1 ? masternodePayments.GetMinMasternodePaymentsProto() : protocolVersion;
 
     BOOST_FOREACH(CMasternode& mn, vMasternodes) {
         mn.Check();
@@ -378,7 +379,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //make sure it has as many confirmations as there are masternodes
-        if(mn.GetMasternodeInputAge() < CountEnabled(masternodePayments.GetMinMasternodePaymentsProto())) continue;
+        if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
 
         if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
             pOldestMasternode = &mn;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 3d5a279d55cc..8058f365b8fd 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -101,7 +101,7 @@ class CMasternodeMan
     /// Clear Masternode vector
     void Clear();
 
-    int CountEnabled(int protocolVersion = nMasternodeMinProtocol);
+    int CountEnabled(int protocolVersion = -1);
 
     void DsegUpdate(CNode* pnode);
 
diff --git a/src/util.cpp b/src/util.cpp
index e98811e6c86f..19c2db10e472 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -113,7 +113,6 @@ int nAnonymizeDarkcoinAmount = 1000;
 int nLiquidityProvider = 0;
 /** Spork enforcement enabled time */
 int64_t enforceMasternodePaymentsTime = 4085657524;
-int nMasternodeMinProtocol = 0;
 bool fSucessfullyLoaded = false;
 bool fEnableDarksend = false;
 /** All denominations used by darksend */
diff --git a/src/util.h b/src/util.h
index 6ce2ed57666e..93f6db447021 100644
--- a/src/util.h
+++ b/src/util.h
@@ -39,7 +39,6 @@ extern int nLiquidityProvider;
 extern bool fEnableDarksend;
 extern int64_t enforceMasternodePaymentsTime;
 extern std::string strMasterNodeAddr;
-extern int nMasternodeMinProtocol;
 extern int keysLoaded;
 extern bool fSucessfullyLoaded;
 extern std::vector<int64_t> darkSendDenominations;

From fb5f80a06ad83ab54f7689fff9eec6d26ce1b726 Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 20 Jul 2015 18:28:49 +0200
Subject: [PATCH 1626/1819] UI: allow "," in "Min amount" field of
 Transaction-View

---
 src/qt/transactionview.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 11b70c4fa351..1fc99c81afe7 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -332,7 +332,12 @@ void TransactionView::changedAmount(const QString &amount)
     if(!transactionProxyModel)
         return;
     CAmount amount_parsed = 0;
-    if(BitcoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), amount, &amount_parsed))
+
+    // Replace "," by "." so BitcoinUnits::parse will not fail for users entering "," as decimal separator
+    QString newAmount = amount;
+    newAmount.replace(QString(","), QString("."));
+
+    if(BitcoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), newAmount, &amount_parsed))
     {
         transactionProxyModel->setMinAmount(amount_parsed);
     }

From 77af4fb6ad1a96de00390ae3aa3d3e8671cee960 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 10:44:27 -0700
Subject: [PATCH 1627/1819] MNP ping changes

- Ping every 5 minutes
- Nodes will propagate pings every 10 minutes
---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 src/masternode.h    | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index f005c814ecb0..0d6d908e0c21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 24)
+define(_CLIENT_VERSION_BUILD, 25)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index aa7f03aec20d..c9f6a3f776cd 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 24
+#define CLIENT_VERSION_BUILD 25
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/masternode.h b/src/masternode.h
index 0cf4aa673e9f..ac8e3d4a03dc 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -14,9 +14,9 @@
 #include "timedata.h"
 
 #define MASTERNODE_MIN_CONFIRMATIONS           15
-#define MASTERNODE_MIN_MNP_SECONDS             (30*60)
+#define MASTERNODE_MIN_MNP_SECONDS             (10*60)
 #define MASTERNODE_MIN_MNB_SECONDS             (5*60)
-#define MASTERNODE_PING_SECONDS                (15*60)
+#define MASTERNODE_PING_SECONDS                (5*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
 #define MASTERNODE_REMOVAL_SECONDS             (75*60)
 

From cc26cff89363a85405c4c57c7726d55ec6ce829f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 20 Jul 2015 20:38:02 +0300
Subject: [PATCH 1628/1819] do not require active MN on ping check from
 UpdateFromNewBroadcast

---
 src/masternode.cpp | 7 ++++---
 src/masternode.h   | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 4e97c53211ba..2619c7641907 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -140,7 +140,7 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     protocolVersion = mnb.protocolVersion;
     addr = mnb.addr;
     int nDoS = 0;
-    if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS))) {
+    if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS, false))) {
         lastPing = mnb.lastPing;
         mapSeenMasternodePing[lastPing.GetHash()] = lastPing;
     }
@@ -500,7 +500,7 @@ bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     return true;
 }
 
-bool CMasternodePing::CheckAndUpdate(int& nDos)
+bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
 {
     if (sigTime > GetAdjustedTime() + 60 * 60) {
         LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
@@ -516,7 +516,8 @@ bool CMasternodePing::CheckAndUpdate(int& nDos)
 
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
-    if(pmn != NULL && pmn->IsEnabled() && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+    fRequireEnabled = (fRequireEnabled && pmn->IsEnabled()) || !fRequireEnabled;
+    if(pmn != NULL && fRequireEnabled && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
     {
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
         // update only if there is no known ping for this masternode or
diff --git a/src/masternode.h b/src/masternode.h
index 0cf4aa673e9f..77fedc99de15 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -57,7 +57,7 @@ class CMasternodePing
         READWRITE(vchSig);
     }
 
-    bool CheckAndUpdate(int& nDos);
+    bool CheckAndUpdate(int& nDos, bool fRequireEnabled = true);
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
     void Relay();
 

From f36e4251ab864819399e178788ee847ecedd8a17 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 11:43:10 -0700
Subject: [PATCH 1629/1819] mnb/mnp debugging

---
 src/masternode.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 2619c7641907..a00d05fcac41 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -409,7 +409,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)
             }
         }
 
-        LogPrintf("mnb - Got NEW Masternode entry %s %s\n", addr.ToString(), vin.ToString());
+        LogPrintf("mnb - Got NEW Masternode entry - %s - %s - %s - %lli \n", GetHash().ToString(), addr.ToString(), vin.ToString(), sigTime);
         CMasternode mn(*this);
         mnodeman.Add(mn);
 
@@ -514,6 +514,8 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
         return false;
     }
 
+    if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - New Ping - %s - %s - %lli\n", GetHash().ToString(), blockHash.ToString(), sigTime);
+
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
     fRequireEnabled = (fRequireEnabled && pmn->IsEnabled()) || !fRequireEnabled;

From 52b930329dcd35c5e141f256a706027c19eef41a Mon Sep 17 00:00:00 2001
From: crowning- <crowning@gmx.net>
Date: Mon, 20 Jul 2015 20:52:49 +0200
Subject: [PATCH 1630/1819] UI: fixed width of wallet-repair-buttons for longer
 locales

---
 src/qt/forms/rpcconsole.ui | 39 ++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)

diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 55ea018ad7c5..073125e1aea0 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -1073,7 +1073,7 @@
         <rect>
          <x>10</x>
          <y>90</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1092,7 +1092,7 @@
         <rect>
          <x>10</x>
          <y>140</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1111,7 +1111,7 @@
         <rect>
          <x>10</x>
          <y>190</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1130,7 +1130,7 @@
         <rect>
          <x>10</x>
          <y>240</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1149,7 +1149,7 @@
         <rect>
          <x>10</x>
          <y>290</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1188,9 +1188,9 @@
       <widget class="QLabel" name="label_repair_salvage">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>80</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
@@ -1204,9 +1204,9 @@
       <widget class="QLabel" name="label_repair_rescan">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>129</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
@@ -1220,9 +1220,9 @@
       <widget class="QLabel" name="label_repair_zap1">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>179</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
@@ -1236,9 +1236,9 @@
       <widget class="QLabel" name="label_repair_zap2">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>229</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
@@ -1252,9 +1252,9 @@
       <widget class="QLabel" name="label_repair_upgrade">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>279</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
@@ -1293,7 +1293,7 @@
         <rect>
          <x>10</x>
          <y>340</y>
-         <width>221</width>
+         <width>301</width>
          <height>23</height>
         </rect>
        </property>
@@ -1304,15 +1304,18 @@
       <widget class="QLabel" name="label_repair_reindex">
        <property name="geometry">
         <rect>
-         <x>250</x>
+         <x>330</x>
          <y>330</y>
-         <width>471</width>
+         <width>411</width>
          <height>41</height>
         </rect>
        </property>
        <property name="text">
         <string>-reindex: Rebuild block chain index from current blk000??.dat files.</string>
        </property>
+       <property name="wordWrap">
+        <bool>true</bool>
+       </property>
       </widget>
      </widget>
     </widget>

From 2d745eb53954799790ced581da057c4aeeedfcd9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 11:56:02 -0700
Subject: [PATCH 1631/1819] Don't sync sporks in regtest, fix segfault -
 segfault caused by: -    fRequireEnabled = (fRequireEnabled &&
 pmn->IsEnabled()) || !fRequireEnabled; -    if(pmn != NULL && fRequireEnabled
 && pmn->protocolVersion >=
 masternodePayments.GetMinMasternodePaymentsProto())

---
 src/masternode-sync.cpp | 24 ++++++++++++++----------
 src/masternode.cpp      |  5 +++--
 2 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 44d6fb52f635..d535c74c4c40 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -101,20 +101,24 @@ void CMasternodeSync::Process()
             LogPrintf("CMasternodeSync::Process - Sync has finished\n");
             RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             RequestedMasternodeAttempt = 0;
-        }
-
-        if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
-            if(pnode->HasFulfilledRequest("getspork")) continue;
-            pnode->FulfilledRequest("getspork");
-
-            if(RequestedMasternodeAttempt <= 2){
-                pnode->PushMessage("getsporks"); //get current network sporks
-                if(RequestedMasternodeAttempt == 2) GetNextAsset();
-                RequestedMasternodeAttempt++;
+        } else if(Params().NetworkID() != CBaseChainParams::REGTEST) {
+            if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
+                if(pnode->HasFulfilledRequest("getspork")) continue;
+                pnode->FulfilledRequest("getspork");
+
+                if(RequestedMasternodeAttempt <= 2){
+                    pnode->PushMessage("getsporks"); //get current network sporks
+                    if(RequestedMasternodeAttempt == 2) GetNextAsset();
+                    RequestedMasternodeAttempt++;
+                }
+                return;
             }
+        } else if (RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) {
+            GetNextAsset();
             return;
         }
 
+
         //don't begin syncing until we're almost at a recent block
         if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
 
diff --git a/src/masternode.cpp b/src/masternode.cpp
index a00d05fcac41..8f56bfb050bf 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -518,9 +518,10 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
 
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
-    fRequireEnabled = (fRequireEnabled && pmn->IsEnabled()) || !fRequireEnabled;
-    if(pmn != NULL && fRequireEnabled && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+    if(pmn != NULL && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
     {
+        if (fRequireEnabled && !pmn->IsEnabled()) return false;
+
         // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
         // update only if there is no known ping for this masternode or
         // last ping was more then MASTERNODE_MIN_MNP_SECONDS-60 ago comparing to this one

From d193cc2d91a1d1d501f5dab41d9a83d8f1dada86 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 12:20:15 -0700
Subject: [PATCH 1632/1819] Clean up broadcast list when nodes are removed

---
 src/masternodeman.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index c25ca010d503..2b623974e9bf 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -271,6 +271,17 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
     map<COutPoint, int64_t>::iterator it2 = mWeAskedForMasternodeListEntry.begin();
     while(it2 != mWeAskedForMasternodeListEntry.end()){
         if((*it2).second < GetTime()){
+            //erase all of the broadcasts we've seen from this vin
+            // -- if we missed a few pings and the node was removed, this will allow is to get it back without them 
+            //    sending a brand new mnb
+            map<uint256, CMasternodeBroadcast>::iterator it3 = mapSeenMasternodeBroadcast.begin();
+            while(it3 != mapSeenMasternodeBroadcast.end()){
+                if((*it3).second.vin.prevout == (*it2).first){
+                    mapSeenMasternodeBroadcast.erase(it3++);
+                } else {
+                    ++it3;
+                }
+            }
             mWeAskedForMasternodeListEntry.erase(it2++);
         } else {
             ++it2;

From 8198291c7bedef184d968781855629b16437b787 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 20 Jul 2015 22:33:18 +0300
Subject: [PATCH 1633/1819] Force sync progress: If it's already more then
 MASTERNODE_SYNC_TIMEOUT seconds passed since we asked and we still have
 nothing, assume there is nothing to sync but give it another
 MASTERNODE_SYNC_TIMEOUT seconds until we move further

---
 src/masternode-sync.cpp | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d535c74c4c40..7741808573db 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -131,6 +131,14 @@ void CMasternodeSync::Process()
                     return;
                 }
 
+                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
+                // and we still have nothing, assume there is nothing to sync but give it another
+                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
+                static int64_t lastTimeAsked = 0;
+                if(lastMasternodeList == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
+                        lastMasternodeList = GetTime();
+                }
+
                 if(pnode->HasFulfilledRequest("mnsync")) continue;
                 pnode->FulfilledRequest("mnsync");
 
@@ -138,6 +146,7 @@ void CMasternodeSync::Process()
                         && RequestedMasternodeAttempt <= 2){
                     mnodeman.DsegUpdate(pnode);
                     RequestedMasternodeAttempt++;
+                    lastTimeAsked = GetTime();
                 }
                 return;
             }
@@ -148,6 +157,14 @@ void CMasternodeSync::Process()
                     return;
                 }
 
+                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
+                // and we still have nothing, assume there is nothing to sync but give it another
+                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
+                static int64_t lastTimeAsked = 0;
+                if(lastMasternodeWinner == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
+                        lastMasternodeWinner = GetTime();
+                }
+
                 if(pnode->HasFulfilledRequest("mnwsync")) continue;
                 pnode->FulfilledRequest("mnwsync");
 
@@ -155,6 +172,7 @@ void CMasternodeSync::Process()
                         && RequestedMasternodeAttempt <= 2){
                     pnode->PushMessage("mnget"); //sync payees
                     RequestedMasternodeAttempt++;
+                    lastTimeAsked = GetTime();
                 }
                 return;
             }
@@ -168,15 +186,23 @@ void CMasternodeSync::Process()
                     return;
                 }
 
+                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
+                // and we still have nothing, assume there is nothing to sync but give it another
+                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
+                static int64_t lastTimeAsked = 0;
+                if(lastBudgetItem == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
+                        lastBudgetItem = GetTime();
+                }
+
                 if(pnode->HasFulfilledRequest("busync")) continue;
                 pnode->FulfilledRequest("busync");
 
                 if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - MASTERNODE_SYNC_TIMEOUT)
                         && RequestedMasternodeAttempt <= 2){
                     uint256 n = 0;
-
                     pnode->PushMessage("mnvs", n); //sync masternode votes
                     RequestedMasternodeAttempt++;
+                    lastTimeAsked = GetTime();
                 }
                 return;
             }

From 37f55a3181e7a55878dcda5547f5cf3ecdf7463b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 15:09:42 -0700
Subject: [PATCH 1634/1819] Refactored masternode payments system - Replaced
 coinbase cache in favor of using the masternode payments voting system only -
 Syncing masternode payments now supports up to the syncing the entire payment
 list

---
 src/Makefile.am             |   3 -
 src/chain.cpp               |   1 -
 src/coinbase-payee.cpp      | 273 ------------------------------------
 src/coinbase-payee.h        |  97 -------------
 src/init.cpp                |  20 ---
 src/instantx.h              |   2 +-
 src/main.cpp                |   2 -
 src/masternode-payments.cpp |  20 ++-
 src/masternode-payments.h   |  11 +-
 src/masternode-sync.cpp     |   3 +-
 src/masternode.cpp          |  25 +++-
 src/rpcmasternode.cpp       |   8 +-
 src/version.h               |   8 +-
 13 files changed, 57 insertions(+), 416 deletions(-)
 delete mode 100644 src/coinbase-payee.cpp
 delete mode 100644 src/coinbase-payee.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 075867eff9e2..904c34821be8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -91,7 +91,6 @@ BITCOIN_CORE_H = \
   primitives/block.h \
   primitives/transaction.h \
   core_io.h \
-  coinbase-payee.h \
   crypter.h \
   darksend.h \
   darksend-relay.h \
@@ -178,7 +177,6 @@ libbitcoin_server_a_SOURCES = \
   addrman.cpp \
   alert.cpp \
   bloom.cpp \
-  coinbase-payee.cpp \
   chain.cpp \
   checkpoints.cpp \
   init.cpp \
@@ -279,7 +277,6 @@ libbitcoin_common_a_SOURCES = \
   allocators.cpp \
   amount.cpp \
   base58.cpp \
-  coinbase-payee.cpp \
   chainparams.cpp \
   darksend.cpp \
   darksend-relay.cpp \
diff --git a/src/chain.cpp b/src/chain.cpp
index 3d434c6c7815..e13c0478614b 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -4,7 +4,6 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "chain.h"
-#include "coinbase-payee.h"
 
 using namespace std;
 
diff --git a/src/coinbase-payee.cpp b/src/coinbase-payee.cpp
deleted file mode 100644
index 34ec3397c1de..000000000000
--- a/src/coinbase-payee.cpp
+++ /dev/null
@@ -1,273 +0,0 @@
-// Copyright (c) 2014-2015 The Dash developers
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#include "coinbase-payee.h"
-#include "util.h"
-#include "addrman.h"
-#include "masternode.h"
-#include "darksend.h"
-#include "masternodeman.h"
-#include <boost/filesystem.hpp>
-
-CCoinbasePayee coinbasePayee;
-
-//
-// CCoinbasePayeeDB
-//
-
-CCoinbasePayeeDB::CCoinbasePayeeDB()
-{
-    pathDB = GetDataDir() / "coinbase-payee.dat";
-    strMagicMessage = "CoinbasePayeeDB";
-}
-
-bool CCoinbasePayeeDB::Write(const CCoinbasePayee& objToSave)
-{
-    int64_t nStart = GetTimeMillis();
-
-    // serialize, checksum data up to that point, then append checksum
-    CDataStream ssObj(SER_DISK, CLIENT_VERSION);
-    ssObj << strMagicMessage; // coinbase payee cache file specific magic message
-    ssObj << FLATDATA(Params().MessageStart()); // network specific magic number
-    ssObj << objToSave;
-    uint256 hash = Hash(ssObj.begin(), ssObj.end());
-    ssObj << hash;
-
-    // open output file, and associate with CAutoFile
-    FILE *file = fopen(pathDB.string().c_str(), "wb");
-    CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
-    if (fileout.IsNull())
-        return error("%s : Failed to open file %s", __func__, pathDB.string());
-
-    // Write and commit header, data
-    try {
-        fileout << ssObj;
-    }
-    catch (std::exception &e) {
-        return error("%s : Serialize or I/O error - %s", __func__, e.what());
-    }
-    fileout.fclose();
-
-    LogPrintf("Written info to coinbase-payee.dat  %dms\n", GetTimeMillis() - nStart);
-
-    return true;
-}
-
-CCoinbasePayeeDB::ReadResult CCoinbasePayeeDB::Read(CCoinbasePayee& objToLoad)
-{
-
-    int64_t nStart = GetTimeMillis();
-    // open input file, and associate with CAutoFile
-    FILE *file = fopen(pathDB.string().c_str(), "rb");
-    CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
-    if (filein.IsNull())
-    {
-        error("%s : Failed to open file %s", __func__, pathDB.string());
-        return FileError;
-    }
-
-    // use file size to size memory buffer
-    int fileSize = boost::filesystem::file_size(pathDB);
-    int dataSize = fileSize - sizeof(uint256);
-    // Don't try to resize to a negative number if file is small
-    if (dataSize < 0)
-        dataSize = 0;
-    vector<unsigned char> vchData;
-    vchData.resize(dataSize);
-    uint256 hashIn;
-
-    // read data and checksum from file
-    try {
-        filein.read((char *)&vchData[0], dataSize);
-        filein >> hashIn;
-    }
-    catch (std::exception &e) {
-        error("%s : Deserialize or I/O error - %s", __func__, e.what());
-        return HashReadError;
-    }
-    filein.fclose();
-
-    CDataStream ssObj(vchData, SER_DISK, CLIENT_VERSION);
-
-    // verify stored checksum matches input data
-    uint256 hashTmp = Hash(ssObj.begin(), ssObj.end());
-    if (hashIn != hashTmp)
-    {
-        error("%s : Checksum mismatch, data corrupted", __func__);
-        return IncorrectHash;
-    }
-
-
-    unsigned char pchMsgTmp[4];
-    std::string strMagicMessageTmp;
-    try {
-        // de-serialize file header (coinbase payee cache file specific magic message) and ..
-        ssObj >> strMagicMessageTmp;
-
-        // ... verify the message matches predefined one
-        if (strMagicMessage != strMagicMessageTmp)
-        {
-            error("%s : Invalid coinbase payee cache magic message", __func__);
-            return IncorrectMagicMessage;
-        }
-
-
-        // de-serialize file header (network specific magic number) and ..
-        ssObj >> FLATDATA(pchMsgTmp);
-
-        // ... verify the network matches ours
-        if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
-        {
-            error("%s : Invalid network magic number", __func__);
-            return IncorrectMagicNumber;
-        }
-
-        // de-serialize data into CCoinbasePayee object
-        ssObj >> objToLoad;
-    }
-    catch (std::exception &e) {
-        objToLoad.Clear();
-        error("%s : Deserialize or I/O error - %s", __func__, e.what());
-        return IncorrectFormat;
-    }
-
-
-    objToLoad.CleanUp(); // clean out expired
-    LogPrintf("Loaded info from coinbase-payee.dat  %dms\n", GetTimeMillis() - nStart);
-    LogPrintf("  %s\n", objToLoad.ToString());
-
-    return Ok;
-}
-
-void DumpCoinbasePayees()
-{
-    return; //disable the cache
-
-    int64_t nStart = GetTimeMillis();
-
-    CCoinbasePayeeDB mndb;
-    CCoinbasePayee temp;
-
-    LogPrintf("Verifying coinbase-payee.dat format...\n");
-    CCoinbasePayeeDB::ReadResult readResult = mndb.Read(temp);
-    // there was an error and it was not an error on file openning => do not proceed
-    if (readResult == CCoinbasePayeeDB::FileError)
-        LogPrintf("Missing payees cache file - coinbase-payee.dat, will try to recreate\n");
-    else if (readResult != CCoinbasePayeeDB::Ok)
-    {
-        LogPrintf("Error reading coinbase-payee.dat: ");
-        if(readResult == CCoinbasePayeeDB::IncorrectFormat)
-            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
-        else
-        {
-            LogPrintf("file format is unknown or invalid, please fix it manually\n");
-            return;
-        }
-    }
-    LogPrintf("Writting info to coinbase-payee.dat...\n");
-    mndb.Write(coinbasePayee);
-
-    LogPrintf("Coinbase payee dump finished  %dms\n", GetTimeMillis() - nStart);
-}
-
-void CCoinbasePayee::BuildIndex(bool bForced)
-{
-    if(mapPaidTime.size() > 0 && !bForced) {
-        LogPrintf("CCoinbasePayee::BuildIndex - coinbase cache exists, skipping BuildIndex\n");
-        return;
-    } else if(bForced) {
-        if(fDebug) LogPrintf("CCoinbasePayee::BuildIndex - Rebuilding coinbase cache\n");
-        mapPaidTime.clear();
-    }
-
-    //scan last 30 days worth of blocks, run processBlockCoinbaseTX for each
-
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    int count = 0;
-
-    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-        count++;
-        if(count > 18000) return;
-
-        CBlock block;
-        if (ReadBlockFromDisk(block, pindexPrev)) {
-            ProcessBlockCoinbaseTX(block.vtx[0], block.nTime);
-        }
-
-        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
-        pindexPrev = pindexPrev->pprev;
-    }
-
-    return;
-}
-
-// Reprocess the last 120 blocks and overwrite the lastpaid times (incase we switch chains)
-// TODO : Keep track of the block hashes and reprocess until we find one we've processed
-void CCoinbasePayee::ReprocessChain()
-{
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    int count = 0;
-
-    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-        count++;
-        if(count > 120) return;
-
-        CBlock block;
-        if (ReadBlockFromDisk(block, pindexPrev)) {
-            ProcessBlockCoinbaseTX(block.vtx[0], block.nTime, true);
-        }
-
-        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
-        pindexPrev = pindexPrev->pprev;
-    }
-
-    return;
-}
-
-void CCoinbasePayee::ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime, bool fOverwrite)
-{
-    if (!txCoinbase.IsCoinBase()){
-        LogPrintf("ERROR: CCoinbasePayee::ProcessBlockCoinbaseTX - tx is not coinbase\n");
-        return;
-    }
-
-    BOOST_FOREACH(CTxOut out, txCoinbase.vout){
-        uint256 h = GetScriptHash(out.scriptPubKey);
-        if(fDebug) LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - %s - %d\n", h.ToString(), nTime);
-        if(mapPaidTime.count(h)){
-            if(mapPaidTime[h] < nTime || fOverwrite) {
-                mapPaidTime[h] = nTime;
-            } else {
-                if(fDebug) LogPrintf("CCoinbasePayee::ProcessBlockCoinbaseTX - not updated -- %s - %d\n", h.ToString(), nTime);
-            }
-        } else {
-            mapPaidTime[h] = nTime;
-        }
-    }
-}
-
-int64_t CCoinbasePayee::GetLastPaid(CScript& pubkey)
-{
-    uint256 h = GetScriptHash(pubkey);
-
-    if(mapPaidTime.count(h)){
-        return mapPaidTime[h];
-    }
-
-    return 0;
-}
-
-void CCoinbasePayee::CleanUp()
-{
-    // std::map<uint256, int64_t>::iterator it = mapPaidTime.begin();
-    // while(it != mapPaidTime.end())
-    // {
-    //     //keep 30 days of history
-    //     if((*it).second < GetAdjustedTime() - (60*60*24*30)) {
-    //         mapPaidTime.erase(it++);
-    //     } else {
-    //         ++it;
-    //     }
-    // }
-}
diff --git a/src/coinbase-payee.h b/src/coinbase-payee.h
deleted file mode 100644
index 92ec3f4931bf..000000000000
--- a/src/coinbase-payee.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright (c) 2014-2015 The Dash developers
-
-// Distributed under the MIT/X11 software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef MASTERNODE_LASTPAID_H
-#define MASTERNODE_LASTPAID_H
-
-#include "main.h"
-#include "sync.h"
-#include "net.h"
-#include "key.h"
-#include "util.h"
-#include "base58.h"
-#include <boost/lexical_cast.hpp>
-
-using namespace std;
-
-class CCoinbasePayee;
-
-extern CCoinbasePayee coinbasePayee;
-
-void DumpCoinbasePayees();
-
-/** Save Budget Manager (coinbase-payee.dat)
- */
-class CCoinbasePayeeDB
-{
-private:
-    boost::filesystem::path pathDB;
-    std::string strMagicMessage;
-public:
-    enum ReadResult {
-        Ok,
-        FileError,
-        HashReadError,
-        IncorrectHash,
-        IncorrectMagicMessage,
-        IncorrectMagicNumber,
-        IncorrectFormat
-    };
-
-    CCoinbasePayeeDB();
-    bool Write(const CCoinbasePayee &objToSave);
-    ReadResult Read(CCoinbasePayee& objToLoad);
-};
-
-
-//
-// Coinbase Payee : Keep track of the last time addresses were paid up to a few weeks (used for masternode payments)
-//
-class CCoinbasePayee
-{
-private:
-    // critical section to protect the inner data structures
-    mutable CCriticalSection cs;
-
-    uint256 GetScriptHash(CScript& pubkey){
-        CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
-        ss << pubkey;
-        uint256 h1 = ss.GetHash();        
-        return h1;
-    }
-
-
-public:
-    map<uint256, int64_t> mapPaidTime;
-    
-    CCoinbasePayee() {
-        mapPaidTime.clear();
-    }
-
-    void BuildIndex(bool bForced=false);
-    void ReprocessChain();
-    void ProcessBlockCoinbaseTX(CTransaction& txCoinbase, int64_t nTime, bool fOverwrite=false);
-    int64_t GetLastPaid(CScript& pubkey);
-    void CleanUp();
-
-    void Clear(){
-        LogPrintf("CoinbasePayee object cleared\n");
-        mapPaidTime.clear();
-    }
-    std::string ToString() {
-        std::string strMessage = boost::lexical_cast<std::string>((int)mapPaidTime.size()) + " objects";
-
-        return strMessage;
-    }
-
-    ADD_SERIALIZE_METHODS;
-
-    //for saving to the serialized db
-    template <typename Stream, typename Operation>
-    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-        READWRITE(mapPaidTime);
-    }
-};
-
-#endif
diff --git a/src/init.cpp b/src/init.cpp
index c0cd20d16309..0e8c87778648 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -13,7 +13,6 @@
 #include "addrman.h"
 #include "amount.h"
 #include "checkpoints.h"
-#include "coinbase-payee.h"
 #include "compat/sanity.h"
 #include "key.h"
 #include "main.h"
@@ -172,7 +171,6 @@ void PrepareShutdown()
     StopNode();
     DumpMasternodes();
     DumpBudgets();
-    DumpCoinbasePayees();
     UnregisterNodeSignals(GetNodeSignals());
 
     if (fFeeEstimatesInitialized)
@@ -1437,22 +1435,6 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
-    // Disable loading the coinbase cache
-    // CCoinbasePayeeDB payeedb;
-    // CCoinbasePayeeDB::ReadResult readResult3 = payeedb.Read(coinbasePayee);
-    
-    // if (readResult3 == CCoinbasePayeeDB::FileError)
-    //     LogPrintf("Missing payee cache - coinbase-payee.dat, will try to recreate\n");
-    // else if (readResult3 != CCoinbasePayeeDB::Ok)
-    // {
-    //     LogPrintf("Error reading coinbase-payee.dat: ");
-    //     if(readResult3 == CCoinbasePayeeDB::IncorrectFormat)
-    //         LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
-    //     else
-    //         LogPrintf("file format is unknown or invalid, please fix it manually\n");
-    // }
-
-
     fMasterNode = GetBoolArg("-masternode", false);
 
     if((fMasterNode || masternodeConfig.getCount() > -1) && fTxIndex == false) {
@@ -1564,8 +1546,6 @@ bool AppInit2(boost::thread_group& threadGroup)
     */
 
     darkSendPool.InitCollateralAddress();
-    coinbasePayee.BuildIndex(true);
-    coinbasePayee.ReprocessChain();
 
     threadGroup.create_thread(boost::bind(&ThreadCheckDarkSendPool));
 
diff --git a/src/instantx.h b/src/instantx.h
index 3fc71e77b80c..b4ea80f3d8b0 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70092;
+static const int MIN_INSTANTX_PROTO_VERSION = 70093;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/main.cpp b/src/main.cpp
index 4f8940109006..7ec50daf5a4f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,7 +11,6 @@
 #include "chainparams.h"
 #include "checkpoints.h"
 #include "checkqueue.h"
-#include "coinbase-payee.h"
 #include "init.h"
 #include "instantx.h"
 #include "darksend.h"
@@ -3264,7 +3263,6 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_LIST) {
             CScript payee;
             CTxIn vin;
-            coinbasePayee.ReprocessChain();
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_BUDGET)
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 06021153eeb0..dc7756cbc753 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -176,6 +176,9 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
     if (strCommand == "mnget") { //Masternode Payments Request Sync
         if(fLiteMode) return; //disable all Darksend/Masternode related functionality
 
+        int nCountNeeded;
+        vRecv >> nCountNeeded;
+
         if(pfrom->HasFulfilledRequest("mnget")) {
             LogPrintf("mnget - peer already asked me for the list\n");
             Misbehaving(pfrom->GetId(), 20);
@@ -183,7 +186,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         }
         
         pfrom->FulfilledRequest("mnget");
-        masternodePayments.Sync(pfrom);
+        masternodePayments.Sync(pfrom, nCountNeeded);
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
     }
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
@@ -200,8 +203,9 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
            return;
         }
 
-        if(winner.nBlockHeight < chainActive.Tip()->nHeight - 10 || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
-            LogPrintf("mnw - winner out of range - Height %d bestHeight %d\n", winner.nBlockHeight, chainActive.Tip()->nHeight);
+        int nFirstBlock = (masternodeSync.IsSynced() ? (chainActive.Tip()->nHeight - (mnodeman.CountEnabled()*1.1)) : chainActive.Tip()->nHeight - 10);
+        if(winner.nBlockHeight < nFirstBlock || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
+            LogPrintf("mnw - winner out of range - FirstBlock %d Height %d bestHeight %d\n", nFirstBlock, winner.nBlockHeight, chainActive.Tip()->nHeight);
             return;
         }
 
@@ -270,7 +274,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
     mnpayee = GetScriptForDestination(mn.pubkey.GetID());
 
     CScript payee;
-    for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+10; h++){
+    for(int64_t h = pindexPrev->nHeight-1; h <= pindexPrev->nHeight+11; h++){
         if(h == nNotBlockHeight) continue;
         if(mapMasternodeBlocks.count(h)){
             if(mapMasternodeBlocks[h].GetPayee(payee)){
@@ -548,7 +552,6 @@ bool CMasternodePaymentWinner::SignatureValid()
                     boost::lexical_cast<std::string>(nBlockHeight) +
                     payee.ToString();
 
-
         std::string errorMessage = "";
         if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)){
             return error("CMasternodePaymentWinner::SignatureValid() - Got bad Masternode address signature %s \n", vinMasternode.ToString().c_str());
@@ -560,16 +563,19 @@ bool CMasternodePaymentWinner::SignatureValid()
     return false;
 }
 
-void CMasternodePayments::Sync(CNode* node)
+void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
 {
     LOCK(cs_masternodepayments);
 
     if(chainActive.Tip() == NULL) return;
 
+    int nCount = (mnodeman.CountEnabled()*1.1);
+    if(nCountNeeded > nCount) nCountNeeded = nCount;
+
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
     while(it != mapMasternodePayeeVotes.end()) {
         CMasternodePaymentWinner winner = (*it).second;
-        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-10 && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
+        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
             node->PushMessage("mnw", winner);
         ++it;
     }
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 57541fb239da..476708792c51 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -97,6 +97,15 @@ class CMasternodeBlockPayees
         return (nVotes > -1);
     }
 
+    bool HasPayeeWithVotes(CScript payee, int nVotesReq)
+    {
+        BOOST_FOREACH(CMasternodePayee& p, vecPayments){
+            if(p.nVotes > nVotesReq && p.scriptPubKey == payee) return true;
+        }
+
+        return false;
+    }
+
     bool IsTransactionValid(const CTransaction& txNew);
     std::string GetRequiredPaymentsString();
 
@@ -191,7 +200,7 @@ class CMasternodePayments
     bool AddWinningMasternode(CMasternodePaymentWinner& winner);
     bool ProcessBlock(int nBlockHeight);
 
-    void Sync(CNode* node);
+    void Sync(CNode* node, int nCountNeeded);
     void CleanPaymentList();
     int LastPayment(CMasternode& mn);
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d535c74c4c40..8fa6ec63cbd0 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -153,7 +153,8 @@ void CMasternodeSync::Process()
 
                 if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - MASTERNODE_SYNC_TIMEOUT)
                         && RequestedMasternodeAttempt <= 2){
-                    pnode->PushMessage("mnget"); //sync payees
+                    int nCountNeeded = (mnodeman.CountEnabled()*1.1);
+                    pnode->PushMessage("mnget", nCountNeeded); //sync payees
                     RequestedMasternodeAttempt++;
                 }
                 return;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 8f56bfb050bf..e153b74ab61f 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -4,7 +4,6 @@
 
 #include "masternode.h"
 #include "masternodeman.h"
-#include "coinbase-payee.h"
 #include "darksend.h"
 #include "util.h"
 #include "sync.h"
@@ -210,7 +209,7 @@ int64_t CMasternode::SecondsSincePayment() {
     CScript pubkeyScript;
     pubkeyScript = GetScriptForDestination(pubkey.GetID());
 
-    int64_t sec = (GetAdjustedTime() - coinbasePayee.GetLastPaid(pubkeyScript));
+    int64_t sec = (GetAdjustedTime() - GetLastPaid());
     int64_t month = 60*60*24*30;
     if(sec < month) return sec; //if it's less than 30 days, give seconds
 
@@ -224,10 +223,26 @@ int64_t CMasternode::SecondsSincePayment() {
 }
 
 int64_t CMasternode::GetLastPaid() {
-    CScript pubkeyScript;
-    pubkeyScript = GetScriptForDestination(pubkey.GetID());
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+
+    CScript mnpayee;
+    mnpayee = GetScriptForDestination(pubkey.GetID());
+
+    for(int64_t h = pindexPrev->nHeight-mnodeman.CountEnabled()*0.95; h <= pindexPrev->nHeight+10; h++){
+        if(mapMasternodeBlocks.count(h)){
+            /*
+                Search for this payee, with at least 2 votes. This will aid in consensus allowing the network 
+                to converge on the same payees quickly, then keep the same schedule.
+            */
+            if(mapMasternodeBlocks[h].HasPayeeWithVotes(mnpayee, 2)){
+                int64_t nTimeEstimate = pindexPrev->nTime - (pindexPrev->nHeight - h)*2.6;
+                return nTimeEstimate;
+            }
+        }
+    }
 
-    return coinbasePayee.GetLastPaid(pubkeyScript);
+    return 0;
 }
 
 CMasternodeBroadcast::CMasternodeBroadcast()
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 1b71d3cf97f7..f419a03999f9 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -450,9 +450,15 @@ Value masternode(const Array& params, bool fHelp)
 
     if (strCommand == "winners")
     {
+        int nLast = 10;
+
+        if (params.size() >= 2){
+            nLast = params[1].get_int();
+        }
+
         Object obj;
 
-        for(int nHeight = chainActive.Tip()->nHeight-10; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
+        for(int nHeight = chainActive.Tip()->nHeight-nLast; nHeight < chainActive.Tip()->nHeight+20; nHeight++)
         {
             obj.push_back(Pair(strprintf("%d", nHeight),       GetRequiredPaymentsString(nHeight)));
         }
diff --git a/src/version.h b/src/version.h
index 5434d68c1ce3..a49fef1a3a04 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70092;
+static const int PROTOCOL_VERSION = 70093;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,16 +22,16 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70092;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70093;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70092;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70093;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70092;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70093;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 1eab82ae2bef0c7bdb1f71df59c87be101a420a0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 16:48:57 -0700
Subject: [PATCH 1635/1819] Erase seen masternode broadcasts when masternode
 drops from list

---
 src/masternodeman.cpp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 2b623974e9bf..f5d3fadb862f 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -241,6 +241,29 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
                 (forceExpiredRemoval && (*it).activeState == CMasternode::MASTERNODE_EXPIRED) ||
                 (*it).protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
             if(fDebug) LogPrintf("CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
+
+            //erase all of the broadcasts we've seen from this vin
+            // -- if we missed a few pings and the node was removed, this will allow is to get it back without them 
+            //    sending a brand new mnb
+            map<uint256, CMasternodeBroadcast>::iterator it3 = mapSeenMasternodeBroadcast.begin();
+            while(it3 != mapSeenMasternodeBroadcast.end()){
+                if((*it3).second.vin == (*it).vin){
+                    mapSeenMasternodeBroadcast.erase(it3++);
+                } else {
+                    ++it3;
+                }
+            }
+
+            // allow us to ask for this masternode again if we see another ping
+            map<COutPoint, int64_t>::iterator it2 = mWeAskedForMasternodeListEntry.begin();
+            while(it2 != mWeAskedForMasternodeListEntry.end()){
+                if((*it2).first == (*it).vin.prevout){
+                    mWeAskedForMasternodeListEntry.erase(it2++);
+                } else {
+                    ++it2;
+                }
+            }
+
             it = vMasternodes.erase(it);
         } else {
             ++it;

From e4a0e8340c7ad7b2738dc3a50d5df9f278981e6b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 20 Jul 2015 19:24:43 -0700
Subject: [PATCH 1636/1819] Masternode payment cache and mnget changes - Cache
 saves masternode payment history - On startup, the client will find the most
 recent block and calculate the amount of entries to ask for. The other peer
 will then send that amount of entries to save bandwidth on restarts.

---
 src/init.cpp                |  18 ++++
 src/main.cpp                |   6 +-
 src/masternode-payments.cpp | 206 ++++++++++++++++++++++++++++++++++--
 src/masternode-payments.h   |  44 +++++++-
 src/masternode-sync.cpp     |   8 +-
 src/masternode.cpp          |   4 +-
 src/masternodeman.cpp       |  11 --
 7 files changed, 270 insertions(+), 27 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 0e8c87778648..0c4abcc73ffe 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -171,6 +171,7 @@ void PrepareShutdown()
     StopNode();
     DumpMasternodes();
     DumpBudgets();
+    DumpMasternodePayments();
     UnregisterNodeSignals(GetNodeSignals());
 
     if (fFeeEstimatesInitialized)
@@ -1435,6 +1436,23 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
+
+    uiInterface.InitMessage(_("Loading masternode payment cache..."));
+
+    CMasternodePaymentDB mnpayments;
+    CMasternodePaymentDB::ReadResult readResult3 = mnpayments.Read(masternodePayments);
+    
+    if (readResult3 == CMasternodePaymentDB::FileError)
+        LogPrintf("Missing masternode payment cache - mnpayments.dat, will try to recreate\n");
+    else if (readResult3 != CMasternodePaymentDB::Ok)
+    {
+        LogPrintf("Error reading mnpayments.dat: ");
+        if(readResult3 == CMasternodePaymentDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+    }
+
     fMasterNode = GetBoolArg("-masternode", false);
 
     if((fMasterNode || masternodeConfig.getCount() > -1) && fTxIndex == false) {
diff --git a/src/main.cpp b/src/main.cpp
index 7ec50daf5a4f..1ce14bbcb394 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3965,7 +3965,7 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_SPORK:
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
-        return mapMasternodePayeeVotes.count(inv.hash);
+        return masternodePayments.mapMasternodePayeeVotes.count(inv.hash);
     case MSG_BUDGET_VOTE:
         return mapSeenMasternodeBudgetVotes.count(inv.hash);
     case MSG_BUDGET_PROPOSAL:
@@ -4129,10 +4129,10 @@ void static ProcessGetData(CNode* pfrom)
                     }
                 }
                 if (!pushed && inv.type == MSG_MASTERNODE_WINNER) {
-                    if(mapMasternodePayeeVotes.count(inv.hash)){
+                    if(masternodePayments.mapMasternodePayeeVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapMasternodePayeeVotes[inv.hash];
+                        ss << masternodePayments.mapMasternodePayeeVotes[inv.hash];
                         pfrom->PushMessage("mnw", ss);
                         pushed = true;
                     }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index dc7756cbc753..4b36312311ee 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -12,13 +12,173 @@
 #include "spork.h"
 #include "addrman.h"
 #include <boost/lexical_cast.hpp>
+#include <boost/filesystem.hpp>
 
 CCriticalSection cs_masternodepayments;
 
 /** Object for who's going to get paid on which blocks */
 CMasternodePayments masternodePayments;
-map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
-map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
+
+//
+// CMasternodePaymentDB
+//
+
+CMasternodePaymentDB::CMasternodePaymentDB()
+{
+    pathDB = GetDataDir() / "mnpayments.dat";
+    strMagicMessage = "MasternodePayments";
+}
+
+bool CMasternodePaymentDB::Write(const CMasternodePayments& objToSave)
+{
+    int64_t nStart = GetTimeMillis();
+
+    // serialize, checksum data up to that point, then append checksum
+    CDataStream ssObj(SER_DISK, CLIENT_VERSION);
+    ssObj << strMagicMessage; // masternode cache file specific magic message
+    ssObj << FLATDATA(Params().MessageStart()); // network specific magic number
+    ssObj << objToSave;
+    uint256 hash = Hash(ssObj.begin(), ssObj.end());
+    ssObj << hash;
+
+    // open output file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "wb");
+    CAutoFile fileout(file, SER_DISK, CLIENT_VERSION);
+    if (fileout.IsNull())
+        return error("%s : Failed to open file %s", __func__, pathDB.string());
+
+    // Write and commit header, data
+    try {
+        fileout << ssObj;
+    }
+    catch (std::exception &e) {
+        return error("%s : Serialize or I/O error - %s", __func__, e.what());
+    }
+    fileout.fclose();
+
+    LogPrintf("Written info to mnpayments.dat  %dms\n", GetTimeMillis() - nStart);
+
+    return true;
+}
+
+CMasternodePaymentDB::ReadResult CMasternodePaymentDB::Read(CMasternodePayments& objToLoad, bool fDryRun)
+{
+
+    int64_t nStart = GetTimeMillis();
+    // open input file, and associate with CAutoFile
+    FILE *file = fopen(pathDB.string().c_str(), "rb");
+    CAutoFile filein(file, SER_DISK, CLIENT_VERSION);
+    if (filein.IsNull())
+    {
+        error("%s : Failed to open file %s", __func__, pathDB.string());
+        return FileError;
+    }
+
+    // use file size to size memory buffer
+    int fileSize = boost::filesystem::file_size(pathDB);
+    int dataSize = fileSize - sizeof(uint256);
+    // Don't try to resize to a negative number if file is small
+    if (dataSize < 0)
+        dataSize = 0;
+    vector<unsigned char> vchData;
+    vchData.resize(dataSize);
+    uint256 hashIn;
+
+    // read data and checksum from file
+    try {
+        filein.read((char *)&vchData[0], dataSize);
+        filein >> hashIn;
+    }
+    catch (std::exception &e) {
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return HashReadError;
+    }
+    filein.fclose();
+
+    CDataStream ssObj(vchData, SER_DISK, CLIENT_VERSION);
+
+    // verify stored checksum matches input data
+    uint256 hashTmp = Hash(ssObj.begin(), ssObj.end());
+    if (hashIn != hashTmp)
+    {
+        error("%s : Checksum mismatch, data corrupted", __func__);
+        return IncorrectHash;
+    }
+
+
+    unsigned char pchMsgTmp[4];
+    std::string strMagicMessageTmp;
+    try {
+        // de-serialize file header (masternode cache file specific magic message) and ..
+        ssObj >> strMagicMessageTmp;
+
+        // ... verify the message matches predefined one
+        if (strMagicMessage != strMagicMessageTmp)
+        {
+            error("%s : Invalid masternode payement cache magic message", __func__);
+            return IncorrectMagicMessage;
+        }
+
+
+        // de-serialize file header (network specific magic number) and ..
+        ssObj >> FLATDATA(pchMsgTmp);
+
+        // ... verify the network matches ours
+        if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
+        {
+            error("%s : Invalid network magic number", __func__);
+            return IncorrectMagicNumber;
+        }
+
+        // de-serialize data into CMasternodePayments object
+        ssObj >> objToLoad;
+    }
+    catch (std::exception &e) {
+        objToLoad.Clear();
+        error("%s : Deserialize or I/O error - %s", __func__, e.what());
+        return IncorrectFormat;
+    }
+
+    LogPrintf("Loaded info from mnpayments.dat  %dms\n", GetTimeMillis() - nStart);
+    LogPrintf("  %s\n", objToLoad.ToString());
+    if(!fDryRun) {
+        LogPrintf("Masternode payments manager - cleaning....\n");
+        objToLoad.CleanPaymentList();
+        LogPrintf("Masternode payments manager - result:\n");
+        LogPrintf("  %s\n", objToLoad.ToString());
+    }
+
+    return Ok;
+}
+
+void DumpMasternodePayments()
+{
+    int64_t nStart = GetTimeMillis();
+
+    CMasternodePaymentDB paymentdb;
+    CMasternodePayments tempPayments;
+
+    LogPrintf("Verifying mnpayments.dat format...\n");
+    CMasternodePaymentDB::ReadResult readResult = paymentdb.Read(tempPayments, true);
+    // there was an error and it was not an error on file opening => do not proceed
+    if (readResult == CMasternodePaymentDB::FileError)
+        LogPrintf("Missing budgets file - mnpayments.dat, will try to recreate\n");
+    else if (readResult != CMasternodePaymentDB::Ok)
+    {
+        LogPrintf("Error reading mnpayments.dat: ");
+        if(readResult == CMasternodePaymentDB::IncorrectFormat)
+            LogPrintf("magic is ok but data has invalid format, will try to recreate\n");
+        else
+        {
+            LogPrintf("file format is unknown or invalid, please fix it manually\n");
+            return;
+        }
+    }
+    LogPrintf("Writting info to mnpayments.dat...\n");
+    paymentdb.Write(masternodePayments);
+
+    LogPrintf("Budget dump finished  %dms\n", GetTimeMillis() - nStart);
+}
 
 bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -179,12 +339,14 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         int nCountNeeded;
         vRecv >> nCountNeeded;
 
-        if(pfrom->HasFulfilledRequest("mnget")) {
-            LogPrintf("mnget - peer already asked me for the list\n");
-            Misbehaving(pfrom->GetId(), 20);
-            return;
+        if(Params().NetworkID() == CBaseChainParams::MAIN){
+            if(pfrom->HasFulfilledRequest("mnget")) {
+                LogPrintf("mnget - peer already asked me for the list\n");
+                Misbehaving(pfrom->GetId(), 20);
+                return;
+            }
         }
-        
+
         pfrom->FulfilledRequest("mnget");
         masternodePayments.Sync(pfrom, nCountNeeded);
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
@@ -198,7 +360,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(chainActive.Tip() == NULL) return;
 
-        if(mapMasternodePayeeVotes.count(winner.GetHash())){
+        if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
            if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
            return;
         }
@@ -580,3 +742,31 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
         ++it;
     }
 }
+
+std::string CMasternodePayments::ToString() const
+{
+    std::ostringstream info;
+
+    info << "Votes: " << (int)mapMasternodePayeeVotes.size() <<
+            ", Blocks: " << (int)mapMasternodeBlocks.size();
+
+    return info.str();
+}
+
+
+int CMasternodePayments::GetNewestBlock()
+{
+    LOCK(cs_masternodepayments);
+
+    int nNewestBlock = 0;
+
+    std::map<int, CMasternodeBlockPayees>::iterator it = mapMasternodeBlocks.begin();
+    while(it != mapMasternodeBlocks.end()) {
+        if((*it).first > nNewestBlock) {
+            nNewestBlock = (*it).first;
+        }
+        it++;
+    }
+
+    return nNewestBlock;
+}
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 476708792c51..8db591f1e2e2 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -18,8 +18,6 @@ class CMasternodePaymentWinner;
 class CMasternodeBlockPayees;
 
 extern CMasternodePayments masternodePayments;
-extern std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
-extern std::map<uint256, CMasternodeBlockPayees> mapMasternodeBlocks;
 
 #define MNPAYMENTS_SIGNATURES_REQUIRED           6
 #define MNPAYMENTS_SIGNATURES_TOTAL              10
@@ -31,6 +29,31 @@ std::string GetRequiredPaymentsString(int nBlockHeight);
 bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue);
 void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
 
+void DumpMasternodePayments();
+
+/** Save Masternode Payment Data (mnpayments.dat)
+ */
+class CMasternodePaymentDB
+{
+private:
+    boost::filesystem::path pathDB;
+    std::string strMagicMessage;
+public:
+    enum ReadResult {
+        Ok,
+        FileError,
+        HashReadError,
+        IncorrectHash,
+        IncorrectMagicMessage,
+        IncorrectMagicNumber,
+        IncorrectFormat
+    };
+
+    CMasternodePaymentDB();
+    bool Write(const CMasternodePayments &objToSave);
+    ReadResult Read(CMasternodePayments& objToLoad, bool fDryRun = false);
+};
+
 class CMasternodePayee
 {
 public:
@@ -191,12 +214,19 @@ class CMasternodePayments
     int nLastBlockHeight;
 
 public:
+    std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
+    std::map<int, CMasternodeBlockPayees> mapMasternodeBlocks;
 
     CMasternodePayments() {
         nSyncedFromPeer = 0;
         nLastBlockHeight = 0;
     }
 
+    void Clear() {
+        mapMasternodeBlocks.clear();
+        mapMasternodePayeeVotes.clear();
+    }
+
     bool AddWinningMasternode(CMasternodePaymentWinner& winner);
     bool ProcessBlock(int nBlockHeight);
 
@@ -212,8 +242,18 @@ class CMasternodePayments
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
+    std::string ToString() const;
+    int GetNewestBlock();
+
+    ADD_SERIALIZE_METHODS;
 
+    template <typename Stream, typename Operation>
+    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+        READWRITE(mapMasternodePayeeVotes);
+        READWRITE(mapMasternodeBlocks);
+    }
 };
 
 
+
 #endif
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 3af893bfbf88..9a48d631360a 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -170,7 +170,13 @@ void CMasternodeSync::Process()
 
                 if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - MASTERNODE_SYNC_TIMEOUT)
                         && RequestedMasternodeAttempt <= 2){
-                    int nCountNeeded = (mnodeman.CountEnabled()*1.1);
+
+                    CBlockIndex* pindexPrev = chainActive.Tip();
+                    if(pindexPrev == NULL) return;
+
+                    int nCountNeeded = (pindexPrev->nHeight - masternodePayments.GetNewestBlock());
+                    if(mnodeman.CountEnabled()*1.1 < nCountNeeded) nCountNeeded = mnodeman.CountEnabled()*1.1;
+
                     pnode->PushMessage("mnget", nCountNeeded); //sync payees
                     RequestedMasternodeAttempt++;
                     lastTimeAsked = GetTime();
diff --git a/src/masternode.cpp b/src/masternode.cpp
index e153b74ab61f..5277741ea5b8 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -230,12 +230,12 @@ int64_t CMasternode::GetLastPaid() {
     mnpayee = GetScriptForDestination(pubkey.GetID());
 
     for(int64_t h = pindexPrev->nHeight-mnodeman.CountEnabled()*0.95; h <= pindexPrev->nHeight+10; h++){
-        if(mapMasternodeBlocks.count(h)){
+        if(masternodePayments.mapMasternodeBlocks.count(h)){
             /*
                 Search for this payee, with at least 2 votes. This will aid in consensus allowing the network 
                 to converge on the same payees quickly, then keep the same schedule.
             */
-            if(mapMasternodeBlocks[h].HasPayeeWithVotes(mnpayee, 2)){
+            if(masternodePayments.mapMasternodeBlocks[h].HasPayeeWithVotes(mnpayee, 2)){
                 int64_t nTimeEstimate = pindexPrev->nTime - (pindexPrev->nHeight - h)*2.6;
                 return nTimeEstimate;
             }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index f5d3fadb862f..c926677ccdcb 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -294,17 +294,6 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
     map<COutPoint, int64_t>::iterator it2 = mWeAskedForMasternodeListEntry.begin();
     while(it2 != mWeAskedForMasternodeListEntry.end()){
         if((*it2).second < GetTime()){
-            //erase all of the broadcasts we've seen from this vin
-            // -- if we missed a few pings and the node was removed, this will allow is to get it back without them 
-            //    sending a brand new mnb
-            map<uint256, CMasternodeBroadcast>::iterator it3 = mapSeenMasternodeBroadcast.begin();
-            while(it3 != mapSeenMasternodeBroadcast.end()){
-                if((*it3).second.vin.prevout == (*it2).first){
-                    mapSeenMasternodeBroadcast.erase(it3++);
-                } else {
-                    ++it3;
-                }
-            }
             mWeAskedForMasternodeListEntry.erase(it2++);
         } else {
             ++it2;

From de485fe93d8a7b07803bbd389102787ce7964aea Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 07:05:35 -0700
Subject: [PATCH 1637/1819] Allow peers to ask for budget votes on testnet more
 than once

---
 src/masternode-budget.cpp | 13 ++++++++-----
 src/masternodeman.cpp     |  1 +
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index d0655f046385..ea9af493a5d0 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -785,12 +785,15 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         uint256 nProp;
         vRecv >> nProp;
 
-        if(pfrom->HasFulfilledRequest("mnvs")) {
-            LogPrintf("mnvs - peer already asked me for the list\n");
-            Misbehaving(pfrom->GetId(), 20);
-            return;
+
+        if(Params().NetworkID() == CBaseChainParams::MAIN){
+            if(pfrom->HasFulfilledRequest("mnvs")) {
+                LogPrintf("mnvs - peer already asked me for the list\n");
+                Misbehaving(pfrom->GetId(), 20);
+                return;
+            }
+            pfrom->FulfilledRequest("mnvs");
         }
-        pfrom->FulfilledRequest("mnvs");
 
         Sync(pfrom, nProp);
         LogPrintf("mnvs - Sent Masternode votes to %s\n", pfrom->addr.ToString());
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index c926677ccdcb..e052a5952450 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -682,6 +682,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                     }
                 }
                 int64_t askAgain = GetTime() + MASTERNODES_DSEG_SECONDS;
+
                 mAskedUsForMasternodeList[pfrom->addr] = askAgain;
             }
         } //else, asking for a specific node which is ok

From 3fae250190308b76b4d21c7212cea35fc9c791c8 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 08:09:17 -0700
Subject: [PATCH 1638/1819] Dont accept MNW from older masternodes

---
 src/masternode-payments.cpp | 23 ++++++++++++++++-------
 src/version.h               |  3 +++
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 4b36312311ee..9a30279c4ac0 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -324,9 +324,7 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
 }
 
 int CMasternodePayments::GetMinMasternodePaymentsProto() {
-    return IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)
-            ? MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2
-            : MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1;
+    return MIN_MNW_PEER_PROTO_VERSION;
 }
 
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -593,17 +591,28 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
-    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, masternodePayments.GetMinMasternodePaymentsProto());
+    CMasternode* pmn = mnodeman.Find(vinMasternode);
+
+    if(!pmn)
+    {
+        strError = strprintf("Unknown Masternode %s", vinMasternode.prevout.ToStringShort());
+        LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
+        return false;
+    }
 
-    if(n == -1)
+    if(pmn->protocolVersion < GetMinMasternodePaymentsProto())
     {
-        LogPrintf("CMasternodePaymentWinner::IsValid - Unknown Masternode - %s\n", vinMasternode.ToString().c_str());
+        strError = strprintf("Masternode protocol too old %d - req %d", pmn->protocolVersion, GetMinMasternodePaymentsProto());
+        LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
         return false;
     }
 
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, masternodePayments.GetMinMasternodePaymentsProto());
+
     if(n > MNPAYMENTS_SIGNATURES_TOTAL)
     {
-        LogPrintf("CMasternodePaymentWinner::IsValid - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
+        strError = strprintf("Masternode not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL, n);
+        LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
         return false;
     }
 
diff --git a/src/version.h b/src/version.h
index a49fef1a3a04..80c64a38a45e 100644
--- a/src/version.h
+++ b/src/version.h
@@ -27,6 +27,9 @@ static const int MIN_POOL_PEER_PROTO_VERSION = 70093;
 //! minimum peer version for masternode budgets
 static const int MIN_BUDGET_PEER_PROTO_VERSION = 70093;
 
+//! minimum peer version for masternode winner broadcasts
+static const int MIN_MNW_PEER_PROTO_VERSION = 70093;
+
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version

From 9e5cd419d0f6ff67c83ec0ffe7a777add6f0110e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 10:00:11 -0700
Subject: [PATCH 1639/1819] Fixed compile error

---
 src/masternode-payments.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 9a30279c4ac0..1ce84121966a 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -600,9 +600,9 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
         return false;
     }
 
-    if(pmn->protocolVersion < GetMinMasternodePaymentsProto())
+    if(pmn->protocolVersion < masternodePayments.GetMinMasternodePaymentsProto())
     {
-        strError = strprintf("Masternode protocol too old %d - req %d", pmn->protocolVersion, GetMinMasternodePaymentsProto());
+        strError = strprintf("Masternode protocol too old %d - req %d", pmn->protocolVersion, masternodePayments.GetMinMasternodePaymentsProto());
         LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
         return false;
     }

From 18fc14e03c8966dd84f4d4914e088501291dc12a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 15:14:54 -0700
Subject: [PATCH 1640/1819] Improved mnw sync

---
 src/masternode-payments.cpp | 20 ++++++++++++++++++++
 src/masternode-payments.h   |  1 +
 src/masternode-sync.cpp     |  8 +++++++-
 src/rpcmasternode.cpp       |  2 +-
 4 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 1ce84121966a..927cbaae8f8b 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -763,6 +763,26 @@ std::string CMasternodePayments::ToString() const
 }
 
 
+
+int CMasternodePayments::GetOldestBlock()
+{
+    LOCK(cs_masternodepayments);
+
+    int nOldestBlock = std::numeric_limits<int>::max();
+
+    std::map<int, CMasternodeBlockPayees>::iterator it = mapMasternodeBlocks.begin();
+    while(it != mapMasternodeBlocks.end()) {
+        if((*it).first < nOldestBlock) {
+            nOldestBlock = (*it).first;
+        }
+        it++;
+    }
+
+    return nOldestBlock;
+}
+
+
+
 int CMasternodePayments::GetNewestBlock()
 {
     LOCK(cs_masternodepayments);
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 8db591f1e2e2..9a5c1467f6c2 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -243,6 +243,7 @@ class CMasternodePayments
     std::string GetRequiredPaymentsString(int nBlockHeight);
     void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees);
     std::string ToString() const;
+    int GetOldestBlock();
     int GetNewestBlock();
 
     ADD_SERIALIZE_METHODS;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 9a48d631360a..d12ffae9eb07 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -174,8 +174,14 @@ void CMasternodeSync::Process()
                     CBlockIndex* pindexPrev = chainActive.Tip();
                     if(pindexPrev == NULL) return;
 
+                    int nMnCount = mnodeman.CountEnabled()*1.1;
                     int nCountNeeded = (pindexPrev->nHeight - masternodePayments.GetNewestBlock());
-                    if(mnodeman.CountEnabled()*1.1 < nCountNeeded) nCountNeeded = mnodeman.CountEnabled()*1.1;
+                    int nHaveBlocks = (pindexPrev->nHeight - masternodePayments.GetOldestBlock());
+                    if(nHaveBlocks < nMnCount || nCountNeeded > nMnCount) { 
+                        //We have less blocks than there are masternodes, we need more history
+                        // - or our cache is old
+                        nCountNeeded = nMnCount;
+                    }
 
                     pnode->PushMessage("mnget", nCountNeeded); //sync payees
                     RequestedMasternodeAttempt++;
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index f419a03999f9..33e08b283672 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -453,7 +453,7 @@ Value masternode(const Array& params, bool fHelp)
         int nLast = 10;
 
         if (params.size() >= 2){
-            nLast = params[1].get_int();
+            nLast = atoi(params[1].get_str());
         }
 
         Object obj;

From b2c4e14ee8feb885cd978bc15b7433010d51a8d6 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 16:11:49 -0700
Subject: [PATCH 1641/1819] Add offset for lastpaid / seperate min mnw peer
 version

---
 src/masternode-payments.cpp | 10 ++++++----
 src/masternode.cpp          | 12 ++++++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 927cbaae8f8b..5b13bb8258e6 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -324,7 +324,9 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
 }
 
 int CMasternodePayments::GetMinMasternodePaymentsProto() {
-    return MIN_MNW_PEER_PROTO_VERSION;
+    return IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)
+            ? MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2
+            : MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1;
 }
 
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -600,14 +602,14 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
         return false;
     }
 
-    if(pmn->protocolVersion < masternodePayments.GetMinMasternodePaymentsProto())
+    if(pmn->protocolVersion < MIN_MNW_PEER_PROTO_VERSION)
     {
-        strError = strprintf("Masternode protocol too old %d - req %d", pmn->protocolVersion, masternodePayments.GetMinMasternodePaymentsProto());
+        strError = strprintf("Masternode protocol too old %d - req %d", pmn->protocolVersion, MIN_MNW_PEER_PROTO_VERSION);
         LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
         return false;
     }
 
-    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, masternodePayments.GetMinMasternodePaymentsProto());
+    int n = mnodeman.GetMasternodeRank(vinMasternode, nBlockHeight-100, MIN_MNW_PEER_PROTO_VERSION);
 
     if(n > MNPAYMENTS_SIGNATURES_TOTAL)
     {
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 5277741ea5b8..9f065aabb7d3 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -229,6 +229,14 @@ int64_t CMasternode::GetLastPaid() {
     CScript mnpayee;
     mnpayee = GetScriptForDestination(pubkey.GetID());
 
+    CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+    ss << vin;
+    ss << sigTime;
+    uint256 hash =  ss.GetHash();
+
+    // use a deterministic offset to break a tie -- 2.5 minutes
+    int64_t nOffset = hash.GetCompact(false) % 150; 
+
     for(int64_t h = pindexPrev->nHeight-mnodeman.CountEnabled()*0.95; h <= pindexPrev->nHeight+10; h++){
         if(masternodePayments.mapMasternodeBlocks.count(h)){
             /*
@@ -236,8 +244,8 @@ int64_t CMasternode::GetLastPaid() {
                 to converge on the same payees quickly, then keep the same schedule.
             */
             if(masternodePayments.mapMasternodeBlocks[h].HasPayeeWithVotes(mnpayee, 2)){
-                int64_t nTimeEstimate = pindexPrev->nTime - (pindexPrev->nHeight - h)*2.6;
-                return nTimeEstimate;
+                int64_t nTimeEstimate = pindexPrev->nTime - (pindexPrev->nHeight - h)*2.5;
+                return nTimeEstimate + nOffset;
             }
         }
     }

From cbe2bae1304108d0179f5c2ba289e4b214d6549d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 16:57:21 -0700
Subject: [PATCH 1642/1819] Improved lastpaid and fixed votes calculation

---
 src/masternode-payments.h |  2 +-
 src/masternode.cpp        | 23 ++++++++++++++++++-----
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 9a5c1467f6c2..7afb0472af80 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -123,7 +123,7 @@ class CMasternodeBlockPayees
     bool HasPayeeWithVotes(CScript payee, int nVotesReq)
     {
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
-            if(p.nVotes > nVotesReq && p.scriptPubKey == payee) return true;
+            if(p.nVotes >= nVotesReq && p.scriptPubKey == payee) return true;
         }
 
         return false;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 9f065aabb7d3..11714254f546 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -237,17 +237,30 @@ int64_t CMasternode::GetLastPaid() {
     // use a deterministic offset to break a tie -- 2.5 minutes
     int64_t nOffset = hash.GetCompact(false) % 150; 
 
-    for(int64_t h = pindexPrev->nHeight-mnodeman.CountEnabled()*0.95; h <= pindexPrev->nHeight+10; h++){
-        if(masternodePayments.mapMasternodeBlocks.count(h)){
+    if (chainActive.Tip() == NULL) return false;
+
+    const CBlockIndex *BlockReading = chainActive.Tip();
+
+    int nMnCount = mnodeman.CountEnabled()*1.1;
+    int n = 0;
+    for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
+        if(n >= nMnCount){
+            return 0;
+        }
+        n++;
+
+        if(masternodePayments.mapMasternodeBlocks.count(BlockReading->nHeight)){
             /*
                 Search for this payee, with at least 2 votes. This will aid in consensus allowing the network 
                 to converge on the same payees quickly, then keep the same schedule.
             */
-            if(masternodePayments.mapMasternodeBlocks[h].HasPayeeWithVotes(mnpayee, 2)){
-                int64_t nTimeEstimate = pindexPrev->nTime - (pindexPrev->nHeight - h)*2.5;
-                return nTimeEstimate + nOffset;
+            if(masternodePayments.mapMasternodeBlocks[BlockReading->nHeight].HasPayeeWithVotes(mnpayee, 2)){
+                return BlockReading->nTime + nOffset;
             }
         }
+
+        if (BlockReading->pprev == NULL) { assert(BlockReading); break; }
+        BlockReading = BlockReading->pprev;
     }
 
     return 0;

From 388f22c5762b185d70514a29b754dd9e826cdb7f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 20:07:23 -0700
Subject: [PATCH 1643/1819] Version 26 / New masternode consensus system -
 Consensus system selects 1/10 of the oldest masternodes by payment, then
 selects payee by score from those. This fixes various race conditions when
 blocks are close together or inconsistant historical winner lists. - Ask for
 up to 2 cycles of history - Keep up to 5 cycles of history locally

---
 configure.ac                |  2 +-
 src/clientversion.h         |  2 +-
 src/instantx.h              |  2 +-
 src/masternode-payments.cpp | 11 ++++++----
 src/masternode-sync.cpp     |  2 +-
 src/masternode.cpp          |  2 +-
 src/masternodeman.cpp       | 41 ++++++++++++++++++++++++++++++-------
 src/version.h               | 10 ++++-----
 8 files changed, 51 insertions(+), 21 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0d6d908e0c21..83f4cc793989 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 25)
+define(_CLIENT_VERSION_BUILD, 26)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index c9f6a3f776cd..13dfbcf03e43 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 25
+#define CLIENT_VERSION_BUILD 26
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index b4ea80f3d8b0..e776b9b1bb16 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70093;
+static const int MIN_INSTANTX_PROTO_VERSION = 70094;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 5b13bb8258e6..fb55876937dc 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -365,7 +365,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
            return;
         }
 
-        int nFirstBlock = (masternodeSync.IsSynced() ? (chainActive.Tip()->nHeight - (mnodeman.CountEnabled()*1.1)) : chainActive.Tip()->nHeight - 10);
+        int nFirstBlock = chainActive.Tip()->nHeight - (mnodeman.CountEnabled()*2);
         if(winner.nBlockHeight < nFirstBlock || winner.nBlockHeight > chainActive.Tip()->nHeight+20){
             LogPrintf("mnw - winner out of range - FirstBlock %d Height %d bestHeight %d\n", nFirstBlock, winner.nBlockHeight, chainActive.Tip()->nHeight);
             return;
@@ -427,6 +427,8 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
     return false;
 }
 
+// Is this masternode scheduled to get paid soon? 
+// -- Only look ahead up to 7 blocks to allow for propagation
 bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -436,7 +438,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
     mnpayee = GetScriptForDestination(mn.pubkey.GetID());
 
     CScript payee;
-    for(int64_t h = pindexPrev->nHeight-1; h <= pindexPrev->nHeight+11; h++){
+    for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+7; h++){
         if(h == nNotBlockHeight) continue;
         if(mapMasternodeBlocks.count(h)){
             if(mapMasternodeBlocks[h].GetPayee(payee)){
@@ -564,7 +566,8 @@ void CMasternodePayments::CleanPaymentList()
 
     if(chainActive.Tip() == NULL) return;
 
-    int nLimit = std::max(((int)mnodeman.size())*2, 1000);
+    //keep up to five cycles for historical sake
+    int nLimit = std::max(((int)mnodeman.size())*5, 1000);
 
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
     while(it != mapMasternodePayeeVotes.end()) {
@@ -742,7 +745,7 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
 
     if(chainActive.Tip() == NULL) return;
 
-    int nCount = (mnodeman.CountEnabled()*1.1);
+    int nCount = (mnodeman.CountEnabled()*2);
     if(nCountNeeded > nCount) nCountNeeded = nCount;
 
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d12ffae9eb07..f08d9393962d 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -174,7 +174,7 @@ void CMasternodeSync::Process()
                     CBlockIndex* pindexPrev = chainActive.Tip();
                     if(pindexPrev == NULL) return;
 
-                    int nMnCount = mnodeman.CountEnabled()*1.1;
+                    int nMnCount = mnodeman.CountEnabled()*2;
                     int nCountNeeded = (pindexPrev->nHeight - masternodePayments.GetNewestBlock());
                     int nHaveBlocks = (pindexPrev->nHeight - masternodePayments.GetOldestBlock());
                     if(nHaveBlocks < nMnCount || nCountNeeded > nMnCount) { 
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 11714254f546..5928aba9a430 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -241,7 +241,7 @@ int64_t CMasternode::GetLastPaid() {
 
     const CBlockIndex *BlockReading = chainActive.Tip();
 
-    int nMnCount = mnodeman.CountEnabled()*1.1;
+    int nMnCount = mnodeman.CountEnabled()*2;
     int n = 0;
     for (unsigned int i = 1; BlockReading && BlockReading->nHeight > 0; i++) {
         if(n >= nMnCount){
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index e052a5952450..aeff6faf8a78 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -29,6 +29,7 @@ struct CompareValueOnly
         return t1.first < t2.first;
     }
 };
+
 struct CompareValueOnlyMN
 {
     bool operator()(const pair<int64_t, CMasternode>& t1,
@@ -384,11 +385,19 @@ CMasternode *CMasternodeMan::Find(const CPubKey &pubKeyMasternode)
     return NULL;
 }
 
+// 
+// Deterministically select the oldest/best masternode to pay on the network
+//
 CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight)
 {
     LOCK(cs);
 
-    CMasternode *pOldestMasternode = NULL;
+    CMasternode *pBestMasternode = NULL;
+    std::vector<pair<int64_t, CTxIn> > vecMasternodeLastPaid;
+
+    /*
+        Make a vector with all of the last paid times
+    */
 
     BOOST_FOREACH(CMasternode &mn, vMasternodes)
     {
@@ -398,18 +407,37 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         // //check protocol version
         if(mn.protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) continue;
 
-        //it's in the list -- so let's skip it
+        //it's in the list (up to 7 entries ahead of current block to allow propagation) -- so let's skip it
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //make sure it has as many confirmations as there are masternodes
         if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
 
-        if(pOldestMasternode == NULL || pOldestMasternode->SecondsSincePayment() < mn.SecondsSincePayment()){
-            pOldestMasternode = &mn;
-        }
+        vecMasternodeLastPaid.push_back(make_pair(mn.SecondsSincePayment(), mn.vin));
     }
 
-    return pOldestMasternode;
+    // Sort them low to high
+    sort(vecMasternodeLastPaid.rbegin(), vecMasternodeLastPaid.rend(), CompareValueOnly());
+
+    // Look at 1/10 of the oldest nodes (by last payment), calculate their scores and pay the best one
+    //  -- This doesn't look at who is being paid in the +7-10 blocks, allowing for double payments very rarely
+    //  -- 1/100 payments should be a double payment on mainnet - (1/(3000/10))*3 --(chance per block * chances before IsScheduled will fire)
+    int nTenthNetwork = mnodeman.CountEnabled()/10;
+    int nCount = 0; 
+    uint256 nHigh = 0;
+    BOOST_FOREACH (PAIRTYPE(int64_t, CTxIn)& s, vecMasternodeLastPaid){
+        CMasternode* pmn = mnodeman.Find(s.second);
+        if(!pmn) break;
+
+        uint256 n = pmn->CalculateScore(1, nBlockHeight-100);
+        if(n > nHigh){
+            nHigh = n;
+            pBestMasternode = pmn;
+        }
+        nCount++;
+        if(nCount >= nTenthNetwork) break;
+    }
+    return pBestMasternode;
 }
 
 CMasternode *CMasternodeMan::FindRandom()
@@ -682,7 +710,6 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                     }
                 }
                 int64_t askAgain = GetTime() + MASTERNODES_DSEG_SECONDS;
-
                 mAskedUsForMasternodeList[pfrom->addr] = askAgain;
             }
         } //else, asking for a specific node which is ok
diff --git a/src/version.h b/src/version.h
index 80c64a38a45e..d879796d3196 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70093;
+static const int PROTOCOL_VERSION = 70094;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70093;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70094;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70093;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70094;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70093;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70094;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70093;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70094;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From dec45ac67a2f003df2a727ba39b1b4390afae78e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 21 Jul 2015 20:54:58 -0700
Subject: [PATCH 1644/1819] Fixed bug with remotely enabled masternodes and
 wrong protocol version

---
 src/activemasternode.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 02350cea35c5..2e62a276af8c 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -28,7 +28,7 @@ void CActiveMasternode::ManageStatus()
         pmn = mnodeman.Find(pubKeyMasternode);
         if(pmn != NULL) {
             pmn->Check();
-            if(pmn->IsEnabled()) EnableHotColdMasterNode(pmn->vin, pmn->addr);
+            if(pmn->IsEnabled() && pmn->protocolVersion == PROTOCOL_VERSION) EnableHotColdMasterNode(pmn->vin, pmn->addr);
         }
     }
 

From c2a23c5beb683c912c496b49e07bcbc7f47d8590 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 22 Jul 2015 16:51:51 -0700
Subject: [PATCH 1645/1819] Fix sync-spork logic

---
 src/masternode-sync.cpp | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index f08d9393962d..38af207c4738 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -106,11 +106,10 @@ void CMasternodeSync::Process()
                 if(pnode->HasFulfilledRequest("getspork")) continue;
                 pnode->FulfilledRequest("getspork");
 
-                if(RequestedMasternodeAttempt <= 2){
-                    pnode->PushMessage("getsporks"); //get current network sporks
-                    if(RequestedMasternodeAttempt == 2) GetNextAsset();
-                    RequestedMasternodeAttempt++;
-                }
+                pnode->PushMessage("getsporks"); //get current network sporks
+                if(RequestedMasternodeAttempt >= 2) GetNextAsset();
+                RequestedMasternodeAttempt++;
+                
                 return;
             }
         } else if (RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) {

From b9d47a0c6fd4cbc92aae5f747e1dca0a92341196 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 22 Jul 2015 17:54:47 -0700
Subject: [PATCH 1646/1819] Submit finalized budget 2 days before payment

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index ea9af493a5d0..bee20c028a74 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -119,7 +119,7 @@ void CBudgetManager::SubmitFinalBudget()
 
     int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
     if(nSubmittedFinalBudget >= nBlockStart) return;
-    if(nBlockStart - pindexPrev->nHeight > 100) return;
+    if(nBlockStart - pindexPrev->nHeight > 576*2) return; //submit final budget 2 days before payment
 
     std::vector<CBudgetProposal*> vBudgetProposals = budget.GetBudget();
     std::string strBudgetName = "main";

From 18a908065f92f789a762ed2213609f8075a77056 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 22 Jul 2015 18:53:17 -0700
Subject: [PATCH 1647/1819] Fixed mnbudget suggestion

---
 src/init.cpp              |  7 +++----
 src/main.cpp              |  3 +--
 src/masternode-budget.cpp | 21 +--------------------
 src/masternode-sync.cpp   |  2 +-
 4 files changed, 6 insertions(+), 27 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 0c4abcc73ffe..a9d5f1679c95 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1473,9 +1473,6 @@ bool AppInit2(boost::thread_group& threadGroup)
             }
         }
 
-        //get the mode of budget voting for this masternode
-        strBudgetMode = GetArg("-budgetvotemode", "auto");
-
         strMasterNodePrivKey = GetArg("-masternodeprivkey", "");
         if(!strMasterNodePrivKey.empty()){
             std::string errorMessage;
@@ -1493,8 +1490,10 @@ bool AppInit2(boost::thread_group& threadGroup)
         } else {
             return InitError(_("You must specify a masternodeprivkey in the configuration. Please see documentation for help."));
         }
-
     }
+    
+    //get the mode of budget voting for this masternode
+    strBudgetMode = GetArg("-budgetvotemode", "auto");
 
     if(GetBoolArg("-mnconflock", true)) {
         LogPrintf("Locking Masternodes:\n");
diff --git a/src/main.cpp b/src/main.cpp
index 1ce14bbcb394..72ff8dddcbcf 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3265,8 +3265,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
             CTxIn vin;
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
-            if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_BUDGET)
-                budget.NewBlock();
+            budget.NewBlock();
         }
     }
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index bee20c028a74..a7424cee0094 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -138,15 +138,6 @@ void CBudgetManager::SubmitFinalBudget()
         return;
     }
 
-    CPubKey pubKeyMasternode;
-    CKey keyMasternode;
-    std::string errorMessage;
-
-    if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode)){
-        LogPrintf("CBudgetManager::SubmitFinalBudget - Error upon calling SetKey\n");
-        return;
-    }
-
     CFinalizedBudgetBroadcast tempBudget(strBudgetName, nBlockStart, vecTxBudgetPayments, 0);
 
     //create fee tx
@@ -194,16 +185,6 @@ void CBudgetManager::SubmitFinalBudget()
     mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
     finalizedBudgetBroadcast.Relay();
     budget.AddFinalizedBudget(finalizedBudgetBroadcast);
-
-    CFinalizedBudgetVote vote(activeMasternode.vin, finalizedBudgetBroadcast.GetHash());
-    if(!vote.Sign(keyMasternode, pubKeyMasternode)){
-        LogPrintf("CBudgetManager::SubmitFinalBudget - Failure to sign.\n");
-        return;
-    }
-
-    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-    vote.Relay();
-    budget.UpdateFinalizedBudget(vote, NULL);
 }
 
 //
@@ -738,7 +719,7 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
-    if(!masternodeSync.IsSynced()) return;
+    if (masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_BUDGET) return;
 
     if (strBudgetMode == "suggest") { //suggest the budget we see
         SubmitFinalBudget();
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 38af207c4738..ee421d7efdcd 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -24,7 +24,7 @@ CMasternodeSync::CMasternodeSync()
 
 bool CMasternodeSync::IsSynced()
 {
-    return (RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED);
+    return RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED;
 }
 
 void CMasternodeSync::AddedMasternodeList()

From 6123770bf80cdc92073e11f02aaae6f302764ef4 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 23 Jul 2015 05:19:37 +0300
Subject: [PATCH 1648/1819] active masternode fixes

---
 src/activemasternode.cpp | 26 ++++++++++++++------------
 src/darksend.cpp         |  8 +++++---
 2 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 2e62a276af8c..fa4c56e5dc9a 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -17,13 +17,15 @@ void CActiveMasternode::ManageStatus()
     if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n");
 
     //need correct blocks to send ping
-    if(IsInitialBlockDownload()) {
+    if(!masternodeSync.IsSynced()) {
         status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS;
-        LogPrintf("CActiveMasternode::ManageStatus() - Sync in progress. Must wait until sync is complete to start Masternode.\n");
+        LogPrintf("CActiveMasternode::ManageStatus() - %s\n", GetStatus());
         return;
     }
 
-    if(status == ACTIVE_MASTERNODE_INITIAL || status == ACTIVE_MASTERNODE_SYNC_IN_PROCESS) {
+    if(status == ACTIVE_MASTERNODE_SYNC_IN_PROCESS) status = ACTIVE_MASTERNODE_INITIAL;
+
+    if(status == ACTIVE_MASTERNODE_INITIAL) {
         CMasternode *pmn;
         pmn = mnodeman.Find(pubKeyMasternode);
         if(pmn != NULL) {
@@ -82,9 +84,9 @@ void CActiveMasternode::ManageStatus()
         if(GetMasterNodeVin(vin, pubKeyCollateralAddress, keyCollateralAddress)) {
 
             if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
-                notCapableReason = strprintf("Input must have least %d confirmations - %d confirmations", MASTERNODE_MIN_CONFIRMATIONS, GetInputAge(vin));
-                LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
                 status = ACTIVE_MASTERNODE_INPUT_TOO_NEW;
+                notCapableReason = strprintf("%s - %d confirmations", GetStatus(), GetInputAge(vin));
+                LogPrintf("CActiveMasternode::ManageStatus() - %s\n", notCapableReason);
                 return;
             }
 
@@ -126,11 +128,11 @@ void CActiveMasternode::ManageStatus()
 
 std::string CActiveMasternode::GetStatus() {
     switch (status) {
-    case ACTIVE_MASTERNODE_INITIAL: return "node just started, not yet activated";
-    case ACTIVE_MASTERNODE_SYNC_IN_PROCESS: return "sync in process. Must wait until client is synced to start";
-    case ACTIVE_MASTERNODE_INPUT_TOO_NEW: return "masternode input must have at least 15 confirmations";
-    case ACTIVE_MASTERNODE_NOT_CAPABLE: return "not capable masternode: " + notCapableReason;
-    case ACTIVE_MASTERNODE_STARTED: return "masternode successfully started";
+    case ACTIVE_MASTERNODE_INITIAL: return "Node just started, not yet activated";
+    case ACTIVE_MASTERNODE_SYNC_IN_PROCESS: return "Sync in progress. Must wait until sync is complete to start Masternode";
+    case ACTIVE_MASTERNODE_INPUT_TOO_NEW: return strprintf("Masternode input must have at least %d confirmations", MASTERNODE_MIN_CONFIRMATIONS);
+    case ACTIVE_MASTERNODE_NOT_CAPABLE: return "Not capable masternode: " + notCapableReason;
+    case ACTIVE_MASTERNODE_STARTED: return "Masternode successfully started";
     default: return "unknown";
     }
 }
@@ -193,8 +195,8 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
     CKey keyMasternode;
 
     //need correct blocks to send ping
-    if(IsInitialBlockDownload()) {
-        errorMessage = "Sync in progress. Must wait until sync is complete to start Masternode.";
+    if(!masternodeSync.IsSynced()) {
+        errorMessage = GetStatus();
         LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 2cb9557a7fb3..13c62747352a 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2322,8 +2322,6 @@ void ThreadCheckDarkSendPool()
 
     while (true)
     {
-        c++;
-
         MilliSleep(1000);
         //LogPrintf("ThreadCheckDarkSendPool::check timeout\n");
 
@@ -2331,7 +2329,11 @@ void ThreadCheckDarkSendPool()
         masternodeSync.Process();
 
         if(masternodeSync.IsSynced()) {
-            //check if we should active or ping every few minutes
+
+            c++;
+
+            // check if we should activate or ping every few minutes,
+            // start right after sync is considered to be done
             if(c % MASTERNODE_PING_SECONDS == 1) activeMasternode.ManageStatus();
 
             if(c % 60 == 0)

From ae48f0984ec37fa4ffd62bed8ed466c7d9ef4f23 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 23 Jul 2015 05:11:39 +0300
Subject: [PATCH 1649/1819] small fixes for rpc

---
 src/rpcmasternode-budget.cpp |  8 ++++++--
 src/rpcmasternode.cpp        | 11 ++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 03d2bb48fbf3..c2749bdaec5d 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -76,7 +76,7 @@ Value mnbudget(const Array& params, bool fHelp)
         int nBlockEnd = nBlockStart + GetBudgetPaymentCycleBlocks() * nPaymentCount;
 
         if(nBlockStart < nBlockMin)
-            return "Invalid payment count, must be more than current height.";
+            return "Invalid block start, must be more than current height.";
 
         if(nBlockEnd < pindexPrev->nHeight)
             return "Invalid ending block, starting block + (payment_cycle*payments) must be more than current height.";
@@ -98,7 +98,11 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
 
         bool useIX = true;
-        if (params.size() > 7) useIX = params[7].get_bool();
+        if (params.size() > 7) {
+            if(params[7].get_str() != "false" && params[7].get_str() != "true")
+                return "Invalid use_ix, must be true or false";
+            useIX = params[7].get_str() == "true" ? true : false;
+        }
 
         CWalletTx wtx;
         pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 33e08b283672..52ae72d79f36 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -226,7 +226,8 @@ Value masternode(const Array& params, bool fHelp)
 
     if (strCommand == "debug")
     {
-        if(activeMasternode.status != ACTIVE_MASTERNODE_INITIAL) return activeMasternode.GetStatus();
+        if(activeMasternode.status != ACTIVE_MASTERNODE_INITIAL || !masternodeSync.IsSynced())
+            return activeMasternode.GetStatus();
 
         CTxIn vin = CTxIn();
         CPubKey pubkey = CScript();
@@ -235,7 +236,7 @@ Value masternode(const Array& params, bool fHelp)
         if(!found){
             return "Missing masternode input, please look at the documentation for instructions on masternode creation";
         } else {
-            return "No problems were found";
+            return activeMasternode.GetStatus();
         }
     }
 
@@ -541,9 +542,9 @@ Value masternodelist(const Array& params, bool fHelp)
                                mn.protocolVersion << " " <<
                                address2.ToString() << " " << setw(21) <<
                                mn.addr.ToString() << " " <<
-                               mn.lastPing.sigTime << " " << setw(8) <<
-                               (mn.lastPing.sigTime - mn.sigTime) << " " <<
-                               mn.GetLastPaid();
+                               (int64_t)mn.lastPing.sigTime << " " << setw(8) <<
+                               (int64_t)(mn.lastPing.sigTime - mn.sigTime) << " " <<
+                               (int64_t)mn.GetLastPaid();
                 std::string output = stringStream.str();
                 stringStream << " " << strVin;
                 if(strFilter !="" && stringStream.str().find(strFilter) == string::npos &&

From cd862ac1ea6748249a535afd16aa2e5b2db25087 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 06:45:43 -0700
Subject: [PATCH 1650/1819] Disable multisig proposals / IsScheduled read ahead
 8 blocks

---
 src/masternode-budget.cpp   | 9 +++++++++
 src/masternode-payments.cpp | 4 ++--
 src/masternodeman.cpp       | 6 +++---
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index a7424cee0094..cd96adfe1b77 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1075,8 +1075,17 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
         }
     }
 
+    /*
+        TODO: There might be an issue with multisig in the coinbase on mainnet, we will add support for it in a future release.
+    */
+    if(address.IsPayToScriptHash()) {
+        strError = "Multisig is not currently supported."
+        return false;
+    }
+
     //if proposal doesn't gain traction within 2 weeks, remove it
     // nTime not being saved correctly
+    // -- TODO: We should keep track of the last time the proposal was valid, if it's invalid for 2 weeks, erase it
     // if(nTime + (60*60*24*2) < GetAdjustedTime()) {
     //     if(GetYeas()-GetNays() < (mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10)) {
     //         strError = "Not enough support";
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index fb55876937dc..19498ec67a53 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -428,7 +428,7 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 }
 
 // Is this masternode scheduled to get paid soon? 
-// -- Only look ahead up to 7 blocks to allow for propagation
+// -- Only look ahead up to 8 blocks to allow for propagation of the latest 2 winners
 bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -438,7 +438,7 @@ bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
     mnpayee = GetScriptForDestination(mn.pubkey.GetID());
 
     CScript payee;
-    for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+7; h++){
+    for(int64_t h = pindexPrev->nHeight; h <= pindexPrev->nHeight+8; h++){
         if(h == nNotBlockHeight) continue;
         if(mapMasternodeBlocks.count(h)){
             if(mapMasternodeBlocks[h].GetPayee(payee)){
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index aeff6faf8a78..4fb29afd6a22 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -407,7 +407,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         // //check protocol version
         if(mn.protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) continue;
 
-        //it's in the list (up to 7 entries ahead of current block to allow propagation) -- so let's skip it
+        //it's in the list (up to 8 entries ahead of current block to allow propagation) -- so let's skip it
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //make sure it has as many confirmations as there are masternodes
@@ -420,8 +420,8 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
     sort(vecMasternodeLastPaid.rbegin(), vecMasternodeLastPaid.rend(), CompareValueOnly());
 
     // Look at 1/10 of the oldest nodes (by last payment), calculate their scores and pay the best one
-    //  -- This doesn't look at who is being paid in the +7-10 blocks, allowing for double payments very rarely
-    //  -- 1/100 payments should be a double payment on mainnet - (1/(3000/10))*3 --(chance per block * chances before IsScheduled will fire)
+    //  -- This doesn't look at who is being paid in the +8-10 blocks, allowing for double payments very rarely
+    //  -- 1/100 payments should be a double payment on mainnet - (1/(3000/10))*2 --(chance per block * chances before IsScheduled will fire)
     int nTenthNetwork = mnodeman.CountEnabled()/10;
     int nCount = 0; 
     uint256 nHigh = 0;

From 35cc21edf32f66d4f73de36961e4ecc828a234dc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 07:16:55 -0700
Subject: [PATCH 1651/1819] New masternodes must wait till end of queue

---
 src/masternode-budget.cpp | 2 +-
 src/masternodeman.cpp     | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index cd96adfe1b77..a2d60468e5da 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1079,7 +1079,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
         TODO: There might be an issue with multisig in the coinbase on mainnet, we will add support for it in a future release.
     */
     if(address.IsPayToScriptHash()) {
-        strError = "Multisig is not currently supported."
+        strError = "Multisig is not currently supported.";
         return false;
     }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 4fb29afd6a22..72e7e638ac0c 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -399,6 +399,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         Make a vector with all of the last paid times
     */
 
+    int nMnCount = CountEnabled();
     BOOST_FOREACH(CMasternode &mn, vMasternodes)
     {
         mn.Check();
@@ -410,8 +411,11 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         //it's in the list (up to 8 entries ahead of current block to allow propagation) -- so let's skip it
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
+        //it's too new, wait for a cycle
+        if(mn.sigTime + (nMnCount*2.6*60) > GetAdjustedTime()) continue;
+
         //make sure it has as many confirmations as there are masternodes
-        if(mn.GetMasternodeInputAge() < CountEnabled()) continue;
+        if(mn.GetMasternodeInputAge() < nMnCount) continue;
 
         vecMasternodeLastPaid.push_back(make_pair(mn.SecondsSincePayment(), mn.vin));
     }

From f727b2dbd714c9fdaf336db1d9ae4522c759a3ed Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 07:36:41 -0700
Subject: [PATCH 1652/1819] Fixed RemainingPayments display bug - When proposal
 hasn't started yet, remaining payment is calculated incorrectly.

---
 src/masternode-budget.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index a2d60468e5da..75aafb405b3d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1215,7 +1215,11 @@ int CBudgetProposal::GetTotalPaymentCount()
 
 int CBudgetProposal::GetRemainingPaymentCount()
 {
-    return (GetBlockEndCycle() - GetBlockCurrentCycle()) / GetBudgetPaymentCycleBlocks();
+    // If this budget starts in the future, this value will be wrong
+    int nPayments = (GetBlockEndCycle() - GetBlockCurrentCycle()) / GetBudgetPaymentCycleBlocks();
+    int nTotal = (GetBlockEndCycle() - GetBlockStartCycle()) / GetBudgetPaymentCycleBlocks();
+    // Take the lowest value
+    return (nPayments <= nTotal ? nPayments : nTotal);
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast()

From 5c935c8c86d8c3f355a6c3fb2c3e02f6874dc6d4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 11:16:49 -0700
Subject: [PATCH 1653/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 83f4cc793989..bf20954442cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 26)
+define(_CLIENT_VERSION_BUILD, 27)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 13dfbcf03e43..9e493fffa787 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 26
+#define CLIENT_VERSION_BUILD 27
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 9aca541200d4b2f7de2ecc122639ccc78e635559 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 11:36:07 -0700
Subject: [PATCH 1654/1819] inc min peer version to 70094 for testing

---
 src/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/version.h b/src/version.h
index d879796d3196..8e2ef17ebcb2 100644
--- a/src/version.h
+++ b/src/version.h
@@ -19,7 +19,7 @@ static const int INIT_PROTO_VERSION = 209;
 static const int GETHEADERS_VERSION = 70077;
 
 //! disconnect from peers older than this proto version
-static const int MIN_PEER_PROTO_VERSION = 70066;
+static const int MIN_PEER_PROTO_VERSION = 70094; //TODO: CHANGE BACK TO 70066 BEFORE LAUNCH
 
 //! minimum peer version accepted by DarksendPool
 static const int MIN_POOL_PEER_PROTO_VERSION = 70094;

From fa6216f1151555f87fbab8b0d7ff26b7b81df881 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 11:48:19 -0700
Subject: [PATCH 1655/1819] Check for existing budget hash before submitting

---
 src/masternode-budget.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 75aafb405b3d..e3a2c8095a53 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -139,6 +139,11 @@ void CBudgetManager::SubmitFinalBudget()
     }
 
     CFinalizedBudgetBroadcast tempBudget(strBudgetName, nBlockStart, vecTxBudgetPayments, 0);
+    if(mapSeenFinalizedBudgets.count(tempBudget.GetHash())) {
+        LogPrintf("CBudgetManager::SubmitFinalBudget - Budget already exists - %s\n", tempBudget.GetHash().ToString());    
+        nSubmittedFinalBudget = pindexPrev->nHeight;
+        return; //already exists
+    }
 
     //create fee tx
     CTransaction tx;

From 9fb56d94791dfa0fcc223afdfa240f007ab537c4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 14:35:14 -0700
Subject: [PATCH 1656/1819] Various improvements - Use INV messages where
 possible in syncing process - Ask 4 peers intend of 2 to send of inventory of
 mnw, and budgets - Special regtest sync mode - Fix mnw freezing issue (maybe)

---
 src/masternode-budget.cpp   | 12 +++++---
 src/masternode-payments.cpp |  9 ++++--
 src/masternode-sync.cpp     | 55 ++++++++++++++++++-------------------
 3 files changed, 41 insertions(+), 35 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index e3a2c8095a53..ebde15d520b6 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -933,13 +933,15 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
         CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
         if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
-            pfrom->PushMessage("mprop", ((*it1).second));
+            CInv inv(MSG_BUDGET_PROPOSAL, (*it1).second.GetHash());
+            RelayInv(inv);
         
             //send votes
             std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
             while(it2 != pbudgetProposal->mapVotes.end()){
                 if((*it2).second.fValid){
-                    pfrom->PushMessage("mvote", ((*it2).second));
+                    CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
+                    RelayInv(inv);
                 }
                 ++it2;
             }
@@ -952,13 +954,15 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
         if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
-            pfrom->PushMessage("fbs", ((*it3).second));
+            CInv inv(MSG_BUDGET_FINALIZED, (*it3).second.GetHash());
+            RelayInv(inv);
 
             //send votes
             std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
             while(it4 != pfinalizedBudget->mapVotes.end()){
                 if((*it4).second.fValid)
-                    pfrom->PushMessage("fbvote", ((*it4).second));
+                    CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
+                    RelayInv(inv);
                 ++it4;
             }
         }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 19498ec67a53..d29f1fc8ad4c 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -352,7 +352,8 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
     }
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
-        LOCK(cs_masternodepayments);
+        // disabled due to locking issues
+        //LOCK(cs_masternodepayments);
 
         //this is required in litemodef
         CMasternodePaymentWinner winner;
@@ -751,8 +752,10 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
     while(it != mapMasternodePayeeVotes.end()) {
         CMasternodePaymentWinner winner = (*it).second;
-        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20)
-            node->PushMessage("mnw", winner);
+        if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20) {
+            CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
+            RelayInv(inv);
+        }
         ++it;
     }
 }
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index ee421d7efdcd..f0433651a76f 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -95,28 +95,35 @@ void CMasternodeSync::Process()
     LOCK(cs_vNodes);
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
-
-        //set to synced
-        if(Params().NetworkID() == CBaseChainParams::REGTEST && tick >= 10) {
-            LogPrintf("CMasternodeSync::Process - Sync has finished\n");
-            RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
-            RequestedMasternodeAttempt = 0;
-        } else if(Params().NetworkID() != CBaseChainParams::REGTEST) {
-            if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
-                if(pnode->HasFulfilledRequest("getspork")) continue;
-                pnode->FulfilledRequest("getspork");
-
+        if(Params().NetworkID() == CBaseChainParams::REGTEST){
+            if(RequestedMasternodeAttempt <= 2) {
                 pnode->PushMessage("getsporks"); //get current network sporks
-                if(RequestedMasternodeAttempt >= 2) GetNextAsset();
-                RequestedMasternodeAttempt++;
-                
-                return;
+            } else if(RequestedMasternodeAttempt < 4) {
+                mnodeman.DsegUpdate(pnode); 
+            } else if(RequestedMasternodeAttempt < 6) {
+                int nMnCount = mnodeman.CountEnabled()*2;
+                pnode->PushMessage("mnget", nMnCount); //sync payees
+                uint256 n = 0;
+                pnode->PushMessage("mnvs", n); //sync masternode votes
+            } else {
+                printf("finished\n");
+                RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             }
-        } else if (RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) {
-            GetNextAsset();
+            RequestedMasternodeAttempt++;
             return;
         }
 
+        //set to synced
+        if(RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS){
+            if(pnode->HasFulfilledRequest("getspork")) continue;
+            pnode->FulfilledRequest("getspork");
+
+            pnode->PushMessage("getsporks"); //get current network sporks
+            if(RequestedMasternodeAttempt >= 2) GetNextAsset();
+            RequestedMasternodeAttempt++;
+            
+            return;
+        }
 
         //don't begin syncing until we're almost at a recent block
         if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
@@ -168,21 +175,13 @@ void CMasternodeSync::Process()
                 pnode->FulfilledRequest("mnwsync");
 
                 if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 2){
+                        && RequestedMasternodeAttempt <= 4){
 
                     CBlockIndex* pindexPrev = chainActive.Tip();
                     if(pindexPrev == NULL) return;
 
                     int nMnCount = mnodeman.CountEnabled()*2;
-                    int nCountNeeded = (pindexPrev->nHeight - masternodePayments.GetNewestBlock());
-                    int nHaveBlocks = (pindexPrev->nHeight - masternodePayments.GetOldestBlock());
-                    if(nHaveBlocks < nMnCount || nCountNeeded > nMnCount) { 
-                        //We have less blocks than there are masternodes, we need more history
-                        // - or our cache is old
-                        nCountNeeded = nMnCount;
-                    }
-
-                    pnode->PushMessage("mnget", nCountNeeded); //sync payees
+                    pnode->PushMessage("mnget", nMnCount); //sync payees
                     RequestedMasternodeAttempt++;
                     lastTimeAsked = GetTime();
                 }
@@ -210,7 +209,7 @@ void CMasternodeSync::Process()
                 pnode->FulfilledRequest("busync");
 
                 if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 2){
+                        && RequestedMasternodeAttempt <= 4){
                     uint256 n = 0;
                     pnode->PushMessage("mnvs", n); //sync masternode votes
                     RequestedMasternodeAttempt++;

From ac947444da8102c8af9137cfb6fdf0cf82c6157b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 15:02:15 -0700
Subject: [PATCH 1657/1819] protocol bump

---
 src/instantx.h |  2 +-
 src/version.h  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index e776b9b1bb16..fb6ed7229792 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70094;
+static const int MIN_INSTANTX_PROTO_VERSION = 70095;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 8e2ef17ebcb2..03a5072a5849 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70094;
+static const int PROTOCOL_VERSION = 70095;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70094; //TODO: CHANGE BACK TO 70066 BEFORE LAUNCH
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70094;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70095;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70094;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70095;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70094;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70095;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70094;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70095;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 814f8e3f177ce36a5b6d4924b0c7413e10eea071 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 15:05:47 -0700
Subject: [PATCH 1658/1819] delete comment

---
 src/masternode-sync.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index f0433651a76f..f1eabce8d8b2 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -106,7 +106,6 @@ void CMasternodeSync::Process()
                 uint256 n = 0;
                 pnode->PushMessage("mnvs", n); //sync masternode votes
             } else {
-                printf("finished\n");
                 RequestedMasternodeAssets = MASTERNODE_SYNC_FINISHED;
             }
             RequestedMasternodeAttempt++;

From f0ccd2b8cb8087863a4335158427a9856dd3095e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 24 Jul 2015 00:53:12 +0300
Subject: [PATCH 1659/1819] fix resync

---
 src/masternode-sync.cpp |  9 +++++++++
 src/net.h               | 12 ++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index f1eabce8d8b2..0bc17e2bbccb 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -83,6 +83,15 @@ void CMasternodeSync::Process()
             Resync if we lose all masternodes from sleep/wake or failure to sync originally
         */
         if(mnodeman.CountEnabled() == 0) {
+            LOCK(cs_vNodes);
+            BOOST_FOREACH(CNode* pnode, vNodes)
+            {
+                pnode->ClearFulfilledRequest("getspork");
+                pnode->ClearFulfilledRequest("mnsync");
+                pnode->ClearFulfilledRequest("mnwsync");
+                pnode->ClearFulfilledRequest("busync");
+            }
+
             RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
         } else
             return;
diff --git a/src/net.h b/src/net.h
index fc077f199b51..31c3e6a297f6 100644
--- a/src/net.h
+++ b/src/net.h
@@ -631,6 +631,18 @@ class CNode
         return false;
     }
 
+    void ClearFulfilledRequest(std::string strRequest)
+    {
+        std::vector<std::string>::iterator it = vecRequestsFulfilled.begin();
+        while(it != vecRequestsFulfilled.end()){
+            if((*it) == strRequest) {
+                vecRequestsFulfilled.erase(it);
+                return;
+            }
+            ++it;
+        }
+    }
+
     void FulfilledRequest(std::string strRequest)
     {
         if(HasFulfilledRequest(strRequest)) return;

From f8f4bff9a1ec8b91ce4b7ea6cb3db1cb807682e4 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 24 Jul 2015 01:32:29 +0300
Subject: [PATCH 1660/1819] do not sync while IBD

---
 src/masternode-sync.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 0bc17e2bbccb..2ab42f7bef1b 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -133,6 +133,8 @@ void CMasternodeSync::Process()
             return;
         }
 
+        if(IsInitialBlockDownload()) return;
+
         //don't begin syncing until we're almost at a recent block
         if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
 

From 48f9e277f90feb565ad9a5b23e9fd12826b7ea03 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 23 Jul 2015 18:55:20 -0700
Subject: [PATCH 1661/1819] changed min ver back to 70066

---
 src/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/version.h b/src/version.h
index 03a5072a5849..cb9b6306baac 100644
--- a/src/version.h
+++ b/src/version.h
@@ -19,7 +19,7 @@ static const int INIT_PROTO_VERSION = 209;
 static const int GETHEADERS_VERSION = 70077;
 
 //! disconnect from peers older than this proto version
-static const int MIN_PEER_PROTO_VERSION = 70094; //TODO: CHANGE BACK TO 70066 BEFORE LAUNCH
+static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
 static const int MIN_POOL_PEER_PROTO_VERSION = 70095;

From 85e1280bc3ea2e3f5d37446fd82df605f4c0169d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 07:12:48 -0700
Subject: [PATCH 1662/1819] limit mnw votes-per-mn

---
 src/masternode-payments.cpp |  7 ++++++-
 src/masternode-payments.h   | 14 ++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index d29f1fc8ad4c..18107be1f1a1 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -378,6 +378,11 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
             return;
         }
 
+        if(!masternodePayments.CanVote(winner.vinMasternode.prevout, winner.nBlockHeight)){
+            LogPrintf("mnw - masternode already voted - %s\n", winner.vinMasternode.prevout.ToStringShort());
+            return;
+        }
+
         if(!winner.SignatureValid()){
             LogPrintf("mnw - invalid signature\n");
             Misbehaving(pfrom->GetId(), 100);
@@ -388,7 +393,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         ExtractDestination(winner.payee, address1);
         CBitcoinAddress address2(address1);
 
-        if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight);
+        if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d - %s\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight, winner.vinMasternode.prevout.ToStringShort());
 
         if(masternodePayments.AddWinningMasternode(winner)){
             winner.Relay();
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 7afb0472af80..f7939c7cab8a 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -181,6 +181,7 @@ class CMasternodePaymentWinner
         payee = payeeIn;
     }
 
+
     ADD_SERIALIZE_METHODS;
 
     template <typename Stream, typename Operation>
@@ -216,6 +217,7 @@ class CMasternodePayments
 public:
     std::map<uint256, CMasternodePaymentWinner> mapMasternodePayeeVotes;
     std::map<int, CMasternodeBlockPayees> mapMasternodeBlocks;
+    std::map<uint256, int> mapMasternodesLastVote; //prevout.hash + prevout.n, nBlockHeight
 
     CMasternodePayments() {
         nSyncedFromPeer = 0;
@@ -238,6 +240,18 @@ class CMasternodePayments
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
+    bool CanVote(COutPoint outMasternode, int nBlockHeight) {
+        if(mapMasternodesLastVote.count(outMasternode.hash + outMasternode.n)) {
+            if(mapMasternodesLastVote[outMasternode.hash + outMasternode.n] == nBlockHeight) {
+                return false;
+            }
+        }
+
+        //record this masternode voted
+        mapMasternodesLastVote[outMasternode.hash + outMasternode.n] = nBlockHeight;
+        return true;
+    }
+
     int GetMinMasternodePaymentsProto();
     void ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     std::string GetRequiredPaymentsString(int nBlockHeight);

From c137a204fbeb59ae73b68c137fef640808f652b3 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 08:21:02 -0700
Subject: [PATCH 1663/1819] Added calcscore cmd

---
 src/rpcmasternode.cpp | 32 +++++++++++++++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 52ae72d79f36..e062037209d7 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -128,7 +128,7 @@ Value masternode(const Array& params, bool fHelp)
         (strCommand != "start" && strCommand != "start-alias" && strCommand != "start-many" && strCommand != "stop" && strCommand != "stop-alias" &&
          strCommand != "stop-many" && strCommand != "list" && strCommand != "list-conf" && strCommand != "count"  && strCommand != "enforce" &&
         strCommand != "debug" && strCommand != "current" && strCommand != "winners" && strCommand != "genkey" && strCommand != "connect" &&
-        strCommand != "outputs" && strCommand != "status"))
+        strCommand != "outputs" && strCommand != "status" && strCommand != "calcscore"))
         throw runtime_error(
                 "masternode \"command\"... ( \"passphrase\" )\n"
                 "Set of commands to execute masternode related actions\n"
@@ -467,6 +467,36 @@ Value masternode(const Array& params, bool fHelp)
         return obj;
     }
 
+    /*
+        Shows which masternode wins by score each block
+    */
+    if (strCommand == "calcscore")
+    {
+        int nLast = 10;
+
+        if (params.size() >= 2){
+            nLast = atoi(params[1].get_str());
+        }
+        Object obj;
+
+        std::vector<CMasternode> vMasternodes = mnodeman.GetFullMasternodeVector();
+        for(int nHeight = chainActive.Tip()->nHeight-nLast; nHeight < chainActive.Tip()->nHeight+20; nHeight++){
+            uint256 nHigh = 0;
+            CMasternode *pBestMasternode = NULL;
+            BOOST_FOREACH(CMasternode& mn, vMasternodes) {
+                uint256 n = mn.CalculateScore(1, nHeight-100);
+                if(n > nHigh){
+                    nHigh = n;
+                    pBestMasternode = &mn;
+                }
+            }
+            if(pBestMasternode)
+                obj.push_back(Pair(strprintf("%d", nHeight),       pBestMasternode->vin.prevout.ToStringShort().c_str()));
+        }
+
+        return obj;
+    }
+
     return Value::null;
 }
 

From 9e65749ff699bd70eafe48d50762b7aa41b9bb40 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 08:50:10 -0700
Subject: [PATCH 1664/1819] Safer calcscore implementation

---
 src/masternode.cpp | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 5928aba9a430..b425b09c48d3 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -159,8 +159,14 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
 
     if(!GetBlockHash(hash, nBlockHeight)) return 0;
 
-    uint256 hash2 = Hash(BEGIN(hash), END(hash));
-    uint256 hash3 = Hash(BEGIN(hash), END(hash), BEGIN(aux), END(aux));
+    CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
+    ss << hash;
+    uint256 hash2 = ss.GetHash();
+
+    CHashWriter ss2(SER_GETHASH, PROTOCOL_VERSION);
+    ss2 << hash;
+    ss2 << aux;
+    uint256 hash3 = ss2.GetHash();
 
     uint256 r = (hash3 > hash2 ? hash3 - hash2 : hash2 - hash3);
 

From 5281c48f70f5d2f324036dbcc38ca966327e260d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 09:10:08 -0700
Subject: [PATCH 1665/1819] Fix syncing issues - if(pindexPrev->nHeight + 4 <
 pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return; --
 && allowed skipping in various situations, which caused blocks to be rejected
 because of lack of mnfinalbudget data

---
 src/masternode-payments.cpp | 1 +
 src/masternode-sync.cpp     | 2 +-
 src/masternode.cpp          | 5 ++++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 18107be1f1a1..8993c1ffe838 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -225,6 +225,7 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
 bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight)
 {
     if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything -- find the longest chain
+        if(fDebug) LogPrintf("Client not synced, skipping block payee checks\n");
         return true;
     }
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 2ab42f7bef1b..6f2dffdf0f3b 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -136,7 +136,7 @@ void CMasternodeSync::Process()
         if(IsInitialBlockDownload()) return;
 
         //don't begin syncing until we're almost at a recent block
-        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight && pindexPrev->nTime + 600 < GetTime()) return;
+        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
 
         if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
 
diff --git a/src/masternode.cpp b/src/masternode.cpp
index b425b09c48d3..c2a32bf782c9 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -157,7 +157,10 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
     uint256 hash = 0;
     uint256 aux = vin.prevout.hash + vin.prevout.n;
 
-    if(!GetBlockHash(hash, nBlockHeight)) return 0;
+    if(!GetBlockHash(hash, nBlockHeight)) {
+        LogPrintf("CalculateScore ERROR - nHeight %d - Returned 0\n", nBlockHeight);
+        return 0;
+    }
 
     CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
     ss << hash;

From 38cd9bd67919e19b1693033c3997e94ce8bdf35a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 09:44:46 -0700
Subject: [PATCH 1666/1819] Improve portability of mn ranking algos

---
 src/masternodeman.cpp | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 72e7e638ac0c..4d960a990c23 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -461,7 +461,7 @@ void CMasternodeMan::DecrementVotedTimes()
 
 CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight, int minProtocol)
 {
-    unsigned int score = 0;
+    int64_t score = 0;
     CMasternode* winner = NULL;
 
     // scan for winner
@@ -471,8 +471,7 @@ CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight,
 
         // calculate the score for each Masternode
         uint256 n = mn.CalculateScore(mod, nBlockHeight);
-        unsigned int n2 = 0;
-        memcpy(&n2, &n, sizeof(n2));
+        int64_t n2 = n.GetCompact(false);
 
         // determine the winner
         if(n2 > score){
@@ -486,7 +485,7 @@ CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight,
 
 int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, int minProtocol, bool fOnlyActive)
 {
-    std::vector<pair<unsigned int, CTxIn> > vecMasternodeScores;
+    std::vector<pair<int64_t, CTxIn> > vecMasternodeScores;
 
     //make sure we know about this block
     uint256 hash = 0;
@@ -500,8 +499,7 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
             if(!mn.IsEnabled()) continue;
         }
         uint256 n = mn.CalculateScore(1, nBlockHeight);
-        unsigned int n2 = 0;
-        memcpy(&n2, &n, sizeof(n2));
+        int64_t n2 = n.GetCompact(false);
 
         vecMasternodeScores.push_back(make_pair(n2, mn.vin));
     }
@@ -509,7 +507,7 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
     sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnly());
 
     int rank = 0;
-    BOOST_FOREACH (PAIRTYPE(unsigned int, CTxIn)& s, vecMasternodeScores){
+    BOOST_FOREACH (PAIRTYPE(int64_t, CTxIn)& s, vecMasternodeScores){
         rank++;
         if(s.second.prevout == vin.prevout) {
             return rank;
@@ -521,7 +519,7 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
 
 std::vector<pair<int, CMasternode> > CMasternodeMan::GetMasternodeRanks(int64_t nBlockHeight, int minProtocol)
 {
-    std::vector<pair<unsigned int, CMasternode> > vecMasternodeScores;
+    std::vector<pair<int64_t, CMasternode> > vecMasternodeScores;
     std::vector<pair<int, CMasternode> > vecMasternodeRanks;
 
     //make sure we know about this block
@@ -539,8 +537,7 @@ std::vector<pair<int, CMasternode> > CMasternodeMan::GetMasternodeRanks(int64_t
         }
 
         uint256 n = mn.CalculateScore(1, nBlockHeight);
-        unsigned int n2 = 0;
-        memcpy(&n2, &n, sizeof(n2));
+        int64_t n2 = n.GetCompact(false);
 
         vecMasternodeScores.push_back(make_pair(n2, mn));
     }
@@ -548,7 +545,7 @@ std::vector<pair<int, CMasternode> > CMasternodeMan::GetMasternodeRanks(int64_t
     sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnlyMN());
 
     int rank = 0;
-    BOOST_FOREACH (PAIRTYPE(unsigned int, CMasternode)& s, vecMasternodeScores){
+    BOOST_FOREACH (PAIRTYPE(int64_t, CMasternode)& s, vecMasternodeScores){
         rank++;
         vecMasternodeRanks.push_back(make_pair(rank, s.second));
     }
@@ -558,7 +555,7 @@ std::vector<pair<int, CMasternode> > CMasternodeMan::GetMasternodeRanks(int64_t
 
 CMasternode* CMasternodeMan::GetMasternodeByRank(int nRank, int64_t nBlockHeight, int minProtocol, bool fOnlyActive)
 {
-    std::vector<pair<unsigned int, CTxIn> > vecMasternodeScores;
+    std::vector<pair<int64_t, CTxIn> > vecMasternodeScores;
 
     // scan for winner
     BOOST_FOREACH(CMasternode& mn, vMasternodes) {
@@ -570,8 +567,7 @@ CMasternode* CMasternodeMan::GetMasternodeByRank(int nRank, int64_t nBlockHeight
         }
 
         uint256 n = mn.CalculateScore(1, nBlockHeight);
-        unsigned int n2 = 0;
-        memcpy(&n2, &n, sizeof(n2));
+        int64_t n2 = n.GetCompact(false);
 
         vecMasternodeScores.push_back(make_pair(n2, mn.vin));
     }
@@ -579,7 +575,7 @@ CMasternode* CMasternodeMan::GetMasternodeByRank(int nRank, int64_t nBlockHeight
     sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnly());
 
     int rank = 0;
-    BOOST_FOREACH (PAIRTYPE(unsigned int, CTxIn)& s, vecMasternodeScores){
+    BOOST_FOREACH (PAIRTYPE(int64_t, CTxIn)& s, vecMasternodeScores){
         rank++;
         if(rank == nRank) {
             return Find(s.second);

From 491c46c41272b07622b3e36791209dab3cd8e7ee Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 24 Jul 2015 21:35:11 +0300
Subject: [PATCH 1667/1819] remove sync forcing and count already seen as a
 success instead

---
 src/main.cpp                | 36 ++++++++++++++++++++++++++++++------
 src/masternode-budget.cpp   |  4 ++++
 src/masternode-payments.cpp |  1 +
 src/masternode-sync.cpp     | 27 ---------------------------
 src/masternodeman.cpp       |  5 ++++-
 5 files changed, 39 insertions(+), 34 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 72ff8dddcbcf..5c907f6ca045 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3964,17 +3964,41 @@ bool static AlreadyHave(const CInv& inv)
     case MSG_SPORK:
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
-        return masternodePayments.mapMasternodePayeeVotes.count(inv.hash);
+        if(masternodePayments.mapMasternodePayeeVotes.count(inv.hash)) {
+            masternodeSync.AddedMasternodeWinner();
+            return true;
+        }
+        return false;
     case MSG_BUDGET_VOTE:
-        return mapSeenMasternodeBudgetVotes.count(inv.hash);
+        if(mapSeenMasternodeBudgetVotes.count(inv.hash)) {
+            masternodeSync.AddedBudgetItem();
+            return true;
+        }
+        return false;
     case MSG_BUDGET_PROPOSAL:
-        return mapSeenMasternodeBudgetProposals.count(inv.hash);
+        if(mapSeenMasternodeBudgetProposals.count(inv.hash)) {
+            masternodeSync.AddedBudgetItem();
+            return true;
+        }
+        return false;
     case MSG_BUDGET_FINALIZED_VOTE:
-        return mapSeenFinalizedBudgetVotes.count(inv.hash);
+        if(mapSeenFinalizedBudgetVotes.count(inv.hash)) {
+            masternodeSync.AddedBudgetItem();
+            return true;
+        }
+        return false;
     case MSG_BUDGET_FINALIZED:
-        return mapSeenFinalizedBudgets.count(inv.hash);
+        if(mapSeenFinalizedBudgets.count(inv.hash)) {
+            masternodeSync.AddedBudgetItem();
+            return true;
+        }
+        return false;
     case MSG_MASTERNODE_ANNOUNCE:
-        return mapSeenMasternodeBroadcast.count(inv.hash);
+        if(mapSeenMasternodeBroadcast.count(inv.hash)) {
+            masternodeSync.AddedMasternodeList();
+            return true;
+        }
+        return false;
     case MSG_MASTERNODE_PING:
         return mapSeenMasternodePing.count(inv.hash);
     }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index ebde15d520b6..dd9a6737c9ec 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -790,6 +790,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> budgetProposalBroadcast;
 
         if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())){
+            masternodeSync.AddedBudgetItem();
             return;
         }
 
@@ -819,6 +820,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vote.fValid = true;
 
         if(mapSeenMasternodeBudgetVotes.count(vote.GetHash())){
+            masternodeSync.AddedBudgetItem();
             return;
         }
 
@@ -852,6 +854,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> finalizedBudgetBroadcast;
 
         if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())){
+            masternodeSync.AddedBudgetItem();
             return;
         }
 
@@ -883,6 +886,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vote.fValid = true;
 
         if(mapSeenFinalizedBudgetVotes.count(vote.GetHash())){
+            masternodeSync.AddedBudgetItem();
             return;
         }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 8993c1ffe838..438de49d3fdf 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -364,6 +364,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
            if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
+           masternodeSync.AddedMasternodeWinner();
            return;
         }
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 6f2dffdf0f3b..167ee3d2234c 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -147,14 +147,6 @@ void CMasternodeSync::Process()
                     return;
                 }
 
-                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
-                // and we still have nothing, assume there is nothing to sync but give it another
-                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
-                static int64_t lastTimeAsked = 0;
-                if(lastMasternodeList == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
-                        lastMasternodeList = GetTime();
-                }
-
                 if(pnode->HasFulfilledRequest("mnsync")) continue;
                 pnode->FulfilledRequest("mnsync");
 
@@ -162,7 +154,6 @@ void CMasternodeSync::Process()
                         && RequestedMasternodeAttempt <= 2){
                     mnodeman.DsegUpdate(pnode);
                     RequestedMasternodeAttempt++;
-                    lastTimeAsked = GetTime();
                 }
                 return;
             }
@@ -173,14 +164,6 @@ void CMasternodeSync::Process()
                     return;
                 }
 
-                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
-                // and we still have nothing, assume there is nothing to sync but give it another
-                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
-                static int64_t lastTimeAsked = 0;
-                if(lastMasternodeWinner == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
-                        lastMasternodeWinner = GetTime();
-                }
-
                 if(pnode->HasFulfilledRequest("mnwsync")) continue;
                 pnode->FulfilledRequest("mnwsync");
 
@@ -193,7 +176,6 @@ void CMasternodeSync::Process()
                     int nMnCount = mnodeman.CountEnabled()*2;
                     pnode->PushMessage("mnget", nMnCount); //sync payees
                     RequestedMasternodeAttempt++;
-                    lastTimeAsked = GetTime();
                 }
                 return;
             }
@@ -207,14 +189,6 @@ void CMasternodeSync::Process()
                     return;
                 }
 
-                // If it's already more then MASTERNODE_SYNC_TIMEOUT seconds passed since we asked
-                // and we still have nothing, assume there is nothing to sync but give it another
-                // MASTERNODE_SYNC_TIMEOUT seconds until we move further
-                static int64_t lastTimeAsked = 0;
-                if(lastBudgetItem == 0  && lastTimeAsked  > 0 && lastTimeAsked < GetTime() - MASTERNODE_SYNC_TIMEOUT) {
-                        lastBudgetItem = GetTime();
-                }
-
                 if(pnode->HasFulfilledRequest("busync")) continue;
                 pnode->FulfilledRequest("busync");
 
@@ -223,7 +197,6 @@ void CMasternodeSync::Process()
                     uint256 n = 0;
                     pnode->PushMessage("mnvs", n); //sync masternode votes
                     RequestedMasternodeAttempt++;
-                    lastTimeAsked = GetTime();
                 }
                 return;
             }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 4d960a990c23..d5f143d7e4dd 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -617,7 +617,10 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternodeBroadcast mnb;
         vRecv >> mnb;
 
-        if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) return; //seen
+        if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
+            masternodeSync.AddedMasternodeList();
+            return;
+        }
         mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
 
         int nDoS = 0;

From 61745d7724b9dca14ab07baa24257bdb6fc2f526 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 24 Jul 2015 16:10:44 -0700
Subject: [PATCH 1668/1819] Filter SigTime modes / version / proto bump

---
 configure.ac                |  2 +-
 src/clientversion.h         |  2 +-
 src/instantx.h              |  2 +-
 src/masternode-payments.cpp |  4 +++-
 src/masternodeman.cpp       |  4 ++--
 src/masternodeman.h         |  2 +-
 src/version.h               | 10 +++++-----
 7 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index bf20954442cf..24cae2ce2da5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 27)
+define(_CLIENT_VERSION_BUILD, 28)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 9e493fffa787..d6522496556e 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 27
+#define CLIENT_VERSION_BUILD 28
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index fb6ed7229792..2b44e069cc52 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -27,7 +27,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70095;
+static const int MIN_INSTANTX_PROTO_VERSION = 70096;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 438de49d3fdf..b86479aa125b 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -672,7 +672,9 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
         LogPrintf("CMasternodePayments::ProcessBlock() Start nHeight %d - vin %s. \n", nBlockHeight, activeMasternode.vin.ToString().c_str());
 
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
-        CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight);
+        CMasternode *pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight, true);
+        if(pmn == NULL) pmn = mnodeman.GetNextMasternodeInQueueForPayment(nBlockHeight, false); // if no results, look for any node with a newer sigTime
+        
         if(pmn != NULL)
         {
             LogPrintf("CMasternodePayments::ProcessBlock() Found by FindOldestNotInVec \n");
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index d5f143d7e4dd..da02663220a2 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -388,7 +388,7 @@ CMasternode *CMasternodeMan::Find(const CPubKey &pubKeyMasternode)
 // 
 // Deterministically select the oldest/best masternode to pay on the network
 //
-CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight)
+CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime)
 {
     LOCK(cs);
 
@@ -412,7 +412,7 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
         if(masternodePayments.IsScheduled(mn, nBlockHeight)) continue;
 
         //it's too new, wait for a cycle
-        if(mn.sigTime + (nMnCount*2.6*60) > GetAdjustedTime()) continue;
+        if(fFilterSigTime && mn.sigTime + (nMnCount*2.6*60) > GetAdjustedTime()) continue;
 
         //make sure it has as many confirmations as there are masternodes
         if(mn.GetMasternodeInputAge() < nMnCount) continue;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 8058f365b8fd..77a028c23e88 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -111,7 +111,7 @@ class CMasternodeMan
     CMasternode* Find(const CPubKey& pubKeyMasternode);
 
     /// Find an entry in the masternode list that is next to be paid
-    CMasternode* GetNextMasternodeInQueueForPayment(int nBlockHeight);
+    CMasternode* GetNextMasternodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime=true);
 
     /// Find a random entry
     CMasternode* FindRandom();
diff --git a/src/version.h b/src/version.h
index cb9b6306baac..2c5b5c3a7287 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70095;
+static const int PROTOCOL_VERSION = 70096;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70095;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70096;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70095;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70096;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70095;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70096;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70095;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70096;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 5a6e474ec637fd39a3533fc6016149c088d52ef1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 25 Jul 2015 09:22:58 +0300
Subject: [PATCH 1669/1819] include lastPing in mnb hash calculation

---
 src/masternode.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/masternode.h b/src/masternode.h
index 4cbb8665d9da..e94fba39ca70 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -309,6 +309,7 @@ class CMasternodeBroadcast : public CMasternode
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << sigTime;
         ss << pubkey;
+        ss << lastPing;
         return ss.GetHash();
     }
 

From 8079967cc50a42d58a99caa3be065773da3748c5 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 25 Jul 2015 11:18:22 +0300
Subject: [PATCH 1670/1819] more info for masternode count output/rpcconsole
 dialog

---
 src/qt/clientmodel.cpp     | 5 +++--
 src/qt/forms/rpcconsole.ui | 2 +-
 src/rpcmasternode.cpp      | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 2ebe471670e1..53174fdadac9 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -69,8 +69,9 @@ int ClientModel::getNumConnections(unsigned int flags) const
 
 QString ClientModel::getMasternodeCountString() const
 {
-    return QString::number((int)mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)) +
-            " / " + QString::number((int)mnodeman.CountEnabled()) + " / " + QString::number((int)mnodeman.size());
+    return "Total: " + QString::number((int)mnodeman.size()) +
+            " (DS compatible: " + QString::number((int)mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)) +
+            " / Enabled: " + QString::number((int)mnodeman.CountEnabled()) + ")";
 }
 
 int ClientModel::getNumBlocks() const
diff --git a/src/qt/forms/rpcconsole.ui b/src/qt/forms/rpcconsole.ui
index 073125e1aea0..089b9de898e9 100644
--- a/src/qt/forms/rpcconsole.ui
+++ b/src/qt/forms/rpcconsole.ui
@@ -325,7 +325,7 @@
        <item row="10" column="0">
         <widget class="QLabel" name="masternodeCountLabel">
          <property name="text">
-          <string>Masternode Count</string>
+          <string>Number of Masternodes</string>
          </property>
         </widget>
        </item>
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index e062037209d7..195f21baef8c 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -192,9 +192,10 @@ Value masternode(const Array& params, bool fHelp)
         {
             if(params[1] == "ds") return mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION);
             if(params[1] == "enabled") return mnodeman.CountEnabled();
-            if(params[1] == "all") return strprintf("%d / %d / %d",
+            if(params[1] == "all") return strprintf("Total: %d (DS Compatible: %d / Enabled: %d)",
+                                                    mnodeman.size(),
                                                     mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION),
-                                                    mnodeman.CountEnabled(), mnodeman.size());
+                                                    mnodeman.CountEnabled());
         }
         return mnodeman.size();
     }

From 8187228be13d80b3f673d7a922cb947a205f7094 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 09:29:29 -0700
Subject: [PATCH 1671/1819] Fixed budget syncing issues / forking issues /
 syncing issues - Budgets now store the seen objects locally so they're not
 overwritten when saving/loading to check validity of budget.dat - Added safer
 sync "failure" mode, that will retry an hour later if the sync fails for some
 reason. This will stop the client from thinking it has budget data and
 rejecting blocks when they're valid. - protocol bump - version bump

---
 configure.ac                 |  2 +-
 src/activemasternode.cpp     |  2 +-
 src/clientversion.h          |  2 +-
 src/instantx.h               |  8 ++++++--
 src/main.cpp                 | 38 +++++++++++++++++++++++------------
 src/masternode-budget.cpp    | 39 ++++++++++++++++++++++++++----------
 src/masternode-budget.h      | 17 +++++++++++-----
 src/masternode-sync.cpp      | 18 ++++++++++++++++-
 src/masternode-sync.h        |  4 +++-
 src/rpcmasternode-budget.cpp | 10 ++++-----
 src/version.h                | 10 ++++-----
 11 files changed, 104 insertions(+), 46 deletions(-)

diff --git a/configure.ac b/configure.ac
index 24cae2ce2da5..69cdb53e0443 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 28)
+define(_CLIENT_VERSION_BUILD, 29)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index fa4c56e5dc9a..ff6552feb57d 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -17,7 +17,7 @@ void CActiveMasternode::ManageStatus()
     if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n");
 
     //need correct blocks to send ping
-    if(!masternodeSync.IsSynced()) {
+    if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsSynced()) {
         status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS;
         LogPrintf("CActiveMasternode::ManageStatus() - %s\n", GetStatus());
         return;
diff --git a/src/clientversion.h b/src/clientversion.h
index d6522496556e..f0138c818786 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 28
+#define CLIENT_VERSION_BUILD 29
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 2b44e069cc52..e89328812ae3 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -15,7 +15,11 @@
 /*
     At 15 signatures, 1/2 of the masternode network can be owned by
     one party without comprimising the security of InstantX
-    (1000/2150.0)**15 = 1.031e-05
+    (1000/2150.0)**10 = 0.00047382219560689856
+    (1000/2900.0)**10 = 2.3769498616783657e-05
+
+    ### getting 5 of 10 signatures w/ 1000 nodes of 2900
+    (1000/2900.0)**5 = 0.004875397277841433
 */
 #define INSTANTX_SIGNATURES_REQUIRED           5
 #define INSTANTX_SIGNATURES_TOTAL              10
@@ -27,7 +31,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70096;
+static const int MIN_INSTANTX_PROTO_VERSION = 70097;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/main.cpp b/src/main.cpp
index 5c907f6ca045..26ba00e0bbcd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3266,6 +3266,17 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();
+
+            //allow clients to ask for syncing again if they need it
+            if(GetHeight() % 100 == 0) {
+                LOCK(cs_vNodes);
+                BOOST_FOREACH(CNode* pnode, vNodes) {
+                    pnode->ClearFulfilledRequest("getspork");
+                    pnode->ClearFulfilledRequest("mnsync");
+                    pnode->ClearFulfilledRequest("mnwsync");
+                    pnode->ClearFulfilledRequest("busync");
+                }                
+            }
         }
     }
 
@@ -3970,25 +3981,25 @@ bool static AlreadyHave(const CInv& inv)
         }
         return false;
     case MSG_BUDGET_VOTE:
-        if(mapSeenMasternodeBudgetVotes.count(inv.hash)) {
+        if(budget.mapSeenMasternodeBudgetVotes.count(inv.hash)) {
             masternodeSync.AddedBudgetItem();
             return true;
         }
         return false;
     case MSG_BUDGET_PROPOSAL:
-        if(mapSeenMasternodeBudgetProposals.count(inv.hash)) {
+        if(budget.mapSeenMasternodeBudgetProposals.count(inv.hash)) {
             masternodeSync.AddedBudgetItem();
             return true;
         }
         return false;
     case MSG_BUDGET_FINALIZED_VOTE:
-        if(mapSeenFinalizedBudgetVotes.count(inv.hash)) {
+        if(budget.mapSeenFinalizedBudgetVotes.count(inv.hash)) {
             masternodeSync.AddedBudgetItem();
             return true;
         }
         return false;
     case MSG_BUDGET_FINALIZED:
-        if(mapSeenFinalizedBudgets.count(inv.hash)) {
+        if(budget.mapSeenFinalizedBudgets.count(inv.hash)) {
             masternodeSync.AddedBudgetItem();
             return true;
         }
@@ -4161,40 +4172,40 @@ void static ProcessGetData(CNode* pfrom)
                     }
                 }
                 if (!pushed && inv.type == MSG_BUDGET_VOTE) {
-                    if(mapSeenMasternodeBudgetVotes.count(inv.hash)){
+                    if(budget.mapSeenMasternodeBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenMasternodeBudgetVotes[inv.hash];
+                        ss << budget.mapSeenMasternodeBudgetVotes[inv.hash];
                         pfrom->PushMessage("mvote", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_BUDGET_PROPOSAL) {
-                    if(mapSeenMasternodeBudgetProposals.count(inv.hash)){
+                    if(budget.mapSeenMasternodeBudgetProposals.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenMasternodeBudgetProposals[inv.hash];
+                        ss << budget.mapSeenMasternodeBudgetProposals[inv.hash];
                         pfrom->PushMessage("mprop", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_BUDGET_FINALIZED_VOTE) {
-                    if(mapSeenFinalizedBudgetVotes.count(inv.hash)){
+                    if(budget.mapSeenFinalizedBudgetVotes.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenFinalizedBudgetVotes[inv.hash];
+                        ss << budget.mapSeenFinalizedBudgetVotes[inv.hash];
                         pfrom->PushMessage("fbvote", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_BUDGET_FINALIZED) {
-                    if(mapSeenFinalizedBudgets.count(inv.hash)){
+                    if(budget.mapSeenFinalizedBudgets.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenFinalizedBudgets[inv.hash];
+                        ss << budget.mapSeenFinalizedBudgets[inv.hash];
                         pfrom->PushMessage("fbs", ss);
                         pushed = true;
                     }
@@ -4818,7 +4829,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
                 if (state.IsInvalid(nDoS)) {
                     if (nDoS > 0)
                         Misbehaving(pfrom->GetId(), nDoS);
-                    return error("invalid header received");
+                    std::string strError = "invalid header received " + header.GetHash().ToString();
+                    return error(strError.c_str());
                 }
             }
         }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index dd9a6737c9ec..08fcf3265b37 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -18,13 +18,6 @@
 CBudgetManager budget;
 CCriticalSection cs_budget;
 
-std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
-std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
-std::map<uint256, CBudgetVote> mapOrphanMasternodeBudgetVotes;
-std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
-std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
-std::map<uint256, CFinalizedBudgetVote> mapOrphanFinalizedBudgetVotes;
-
 std::map<uint256, int64_t> askedForSourceProposalOrBudget;
 
 int nSubmittedFinalBudget;
@@ -514,6 +507,19 @@ bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
     return false;
 }
 
+bool CBudgetManager::HasNextFinalizedBudget()
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return false;
+
+    int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
+    if(nBlockStart - pindexPrev->nHeight > 576*2) return false; //we wouldn't have the budget yet
+
+    if(budget.IsBudgetPaymentBlock(nBlockStart)) return true;
+
+    return false;
+}
+
 bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
     int nHighestCount = 0;
@@ -771,7 +777,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         uint256 nProp;
         vRecv >> nProp;
 
-
         if(Params().NetworkID() == CBaseChainParams::MAIN){
             if(pfrom->HasFulfilledRequest("mnvs")) {
                 LogPrintf("mnvs - peer already asked me for the list\n");
@@ -810,6 +815,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         budgetProposalBroadcast.Relay();
         masternodeSync.AddedBudgetItem();
 
+        LogPrintf("mprop - new budget - %s\n", budgetProposalBroadcast.GetHash().ToString());
+
         //We might have active votes for this proposal that are valid now
         CheckOrphanVotes();
     }
@@ -843,6 +850,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             vote.Relay();
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
+
+            LogPrintf("mvote - new budget vote - %s\n", vote.GetHash().ToString());
         } else {
             LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
@@ -871,6 +880,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        LogPrintf("fbs - new finalized budget - %s\n", finalizedBudgetBroadcast.GetHash().ToString());
+
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
         AddFinalizedBudget(finalizedBudget);
         finalizedBudgetBroadcast.Relay();
@@ -908,6 +919,9 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             vote.Relay();
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
+
+            if(fDebug) LogPrintf("fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
+
         } else {
             LogPrintf("fbvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
             return;
@@ -953,7 +967,6 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         ++it1;
     }
 
-
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
@@ -1576,7 +1589,7 @@ void CFinalizedBudget::SubmitVote()
         return;
     }
 
-    mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+    budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
     vote.Relay();
     budget.UpdateFinalizedBudget(vote, NULL);
 }
@@ -1690,7 +1703,11 @@ std::string CBudgetManager::ToString() const
     std::ostringstream info;
 
     info << "Proposals: " << (int)mapProposals.size() <<
-            ", Budgets: " << (int)mapFinalizedBudgets.size();
+            ", Budgets: " << (int)mapFinalizedBudgets.size() <<
+            ", Seen Budgets: " << (int)mapSeenMasternodeBudgetProposals.size() <<
+            ", Seen Budget Votes: " << (int)mapSeenMasternodeBudgetVotes.size() <<
+            ", Seen Final Budgets: " << (int)mapSeenFinalizedBudgets.size() <<
+            ", Seen Final Budget Votes: " << (int)mapSeenFinalizedBudgetVotes.size();
 
     return info.str();
 }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 2801631aa016..1080e640c5f6 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -33,11 +33,6 @@ class CTxBudgetPayment;
 static const CAmount BUDGET_FEE_TX = (0.5*COIN);
 static const int64_t BUDGET_FEE_CONFIRMATIONS = 6;
 
-extern std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
-extern std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
-extern std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
-extern std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
-
 extern CBudgetManager budget;
 void DumpBudgets();
 
@@ -88,6 +83,13 @@ class CBudgetManager
     map<uint256, CBudgetProposal> mapProposals;
     map<uint256, CFinalizedBudget> mapFinalizedBudgets;
 
+    std::map<uint256, CBudgetProposalBroadcast> mapSeenMasternodeBudgetProposals;
+    std::map<uint256, CBudgetVote> mapSeenMasternodeBudgetVotes;
+    std::map<uint256, CBudgetVote> mapOrphanMasternodeBudgetVotes;
+    std::map<uint256, CFinalizedBudgetBroadcast> mapSeenFinalizedBudgets;
+    std::map<uint256, CFinalizedBudgetVote> mapSeenFinalizedBudgetVotes;
+    std::map<uint256, CFinalizedBudgetVote> mapOrphanFinalizedBudgetVotes;
+
     CBudgetManager() {
         mapProposals.clear();
         mapFinalizedBudgets.clear();
@@ -114,6 +116,7 @@ class CBudgetManager
     void AddProposal(CBudgetProposal& budgetProposal);
     void AddFinalizedBudget(CFinalizedBudget& finalizedBudget);
     void SubmitFinalBudget();
+    bool HasNextFinalizedBudget();
 
     bool UpdateProposal(CBudgetVote& vote, CNode* pfrom);
     bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom);
@@ -131,6 +134,8 @@ class CBudgetManager
         mapSeenMasternodeBudgetVotes.clear();
         mapSeenFinalizedBudgets.clear();
         mapSeenFinalizedBudgetVotes.clear();
+        mapOrphanMasternodeBudgetVotes.clear();
+        mapOrphanFinalizedBudgetVotes.clear();
     }
     void CheckAndRemove();
     std::string ToString() const;
@@ -144,6 +149,8 @@ class CBudgetManager
         READWRITE(mapSeenMasternodeBudgetVotes);
         READWRITE(mapSeenFinalizedBudgets);
         READWRITE(mapSeenFinalizedBudgetVotes);
+        READWRITE(mapOrphanMasternodeBudgetVotes);
+        READWRITE(mapOrphanFinalizedBudgetVotes);
 
         READWRITE(mapProposals);
         READWRITE(mapFinalizedBudgets);
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 167ee3d2234c..3f9244156fa6 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -5,6 +5,7 @@
 #include "main.h"
 #include "masternode-sync.h"
 #include "masternode-payments.h"
+#include "masternode-budget.h"
 #include "masternode.h"
 #include "masternodeman.h"
 #include "util.h"
@@ -47,6 +48,7 @@ void CMasternodeSync::GetNextAsset()
     switch(RequestedMasternodeAssets)
     {
         case(MASTERNODE_SYNC_INITIAL):
+        case(MASTERNODE_SYNC_FAILED):
             lastMasternodeList = 0;
             lastMasternodeWinner = 0;
             lastBudgetItem = 0;
@@ -97,6 +99,13 @@ void CMasternodeSync::Process()
             return;
     }
 
+    //try syncing again in an hour
+    if(RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED && lastFailure + (60*60) < GetTime()) {
+        GetNextAsset();
+    } else if (RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED) {
+        return;
+    }
+
     if(fDebug) LogPrintf("CMasternodeSync::Process() - tick %d RequestedMasternodeAssets %d\n", tick, RequestedMasternodeAssets);
 
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
@@ -185,7 +194,14 @@ void CMasternodeSync::Process()
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    GetNextAsset();
+                    if(budget.HasNextFinalizedBudget()) {
+                        GetNextAsset();
+                    } else { //we've failed to sync, this state will reject the next budget block
+                        LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
+                        RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
+                        RequestedMasternodeAttempt = 0;
+                        lastFailure = GetTime();
+                    }
                     return;
                 }
 
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 677f4abb7c7d..0326a14d48c4 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -10,9 +10,10 @@
 #define MASTERNODE_SYNC_LIST              2
 #define MASTERNODE_SYNC_MNW               3
 #define MASTERNODE_SYNC_BUDGET            4
+#define MASTERNODE_SYNC_FAILED            998
 #define MASTERNODE_SYNC_FINISHED          999
 
-#define MASTERNODE_SYNC_TIMEOUT           5
+#define MASTERNODE_SYNC_TIMEOUT           15
 
 class CMasternodeSync;
 extern CMasternodeSync masternodeSync;
@@ -27,6 +28,7 @@ class CMasternodeSync
     int64_t lastMasternodeList;
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
+    int64_t lastFailure;
 
     // Count peers we've requested the list from
     int RequestedMasternodeAssets;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index c2749bdaec5d..6d2505d175e3 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -180,7 +180,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
         }
 
-        mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
+        budget.mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
         budgetProposalBroadcast.Relay();
         budget.AddProposal(budgetProposalBroadcast);
 
@@ -248,7 +248,7 @@ Value mnbudget(const Array& params, bool fHelp)
                 continue;
             }
 
-            mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
             budget.UpdateProposal(vote, NULL);
 
@@ -292,7 +292,7 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateProposal(vote, NULL);
 
@@ -538,7 +538,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 continue;
             }
 
-            mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
             vote.Relay();
             budget.UpdateFinalizedBudget(vote, NULL);
 
@@ -577,7 +577,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
         budget.UpdateFinalizedBudget(vote, NULL);
 
diff --git a/src/version.h b/src/version.h
index 2c5b5c3a7287..788c2d62f6e0 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70096;
+static const int PROTOCOL_VERSION = 70097;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70096;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70097;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70096;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70097;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70096;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70097;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70096;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70097;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 0b9d761a389d049687de516472095f3a3008eca6 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 09:59:59 -0700
Subject: [PATCH 1672/1819] only take newest votes

---
 src/masternode-budget.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 08fcf3265b37..22c65f95995a 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1139,6 +1139,14 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
+
+    if(mapVotes.count(hash)){
+        if(mapVotes[hash].nTime > vote.nTime){
+            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            return;
+        }
+    }
+
     mapVotes[hash] = vote;
 }
 
@@ -1387,6 +1395,13 @@ void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
+    if(mapVotes.count(hash)){
+        if(mapVotes[hash].nTime > vote.nTime){
+            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            return;
+        }
+    }
+
     mapVotes[hash] = vote;
 }
 

From 43101ebeca8dd7e9193e4a421723b356e324bc67 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 11:02:38 -0700
Subject: [PATCH 1673/1819] Implement planned hard forks, August 24, 2015

---
 src/main.cpp | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 26ba00e0bbcd..63b840aeffe0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1557,11 +1557,13 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees)
         for(int i = 210240; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
     }
 
-    if(nHeight > 158000+((576*30)* 7)) nSubsidy -= nSubsidy/40; // 278960 - 47.5% - 2015-06-01
-    if(nHeight > 158000+((576*30)* 9)) nSubsidy -= nSubsidy/40; // 313520 - 50.0% - 2015-08-03
-    if(nHeight > 158000+((576*30)*11)) nSubsidy -= nSubsidy/40; // 348080 - 52.5% - 2015-10-05
-    if(nHeight > 158000+((576*30)*13)) nSubsidy -= nSubsidy/40; // 382640 - 55.0% - 2015-12-07
-
+    /*
+        
+        Hard fork will activate on block 320436, reducing the block reward by 10 extra percent (allowing budget super-blocks)
+    
+    */
+    if(nHeight > 308340+(576*21)) nSubsidy -= nSubsidy/10; // 320436 - 10.0% - August 24, 2015
+    
     return nSubsidy + nFees;
 }
 
@@ -1587,8 +1589,17 @@ int64_t GetMasternodePayment(int nHeight, int64_t blockValue)
     if(nHeight > 158000+((576*30)* 4)) ret += blockValue / 40; // 227120 - 40.0% - 2015-02-27
     if(nHeight > 158000+((576*30)* 5)) ret += blockValue / 40; // 244400 - 42.5% - 2015-03-30
     if(nHeight > 158000+((576*30)* 6)) ret += blockValue / 40; // 261680 - 45.0% - 2015-05-01
-    if(nHeight > 158000+((576*30)*15)) ret += blockValue / 40; // 417200 - 47.5% - 2016-02-08
-    if(nHeight > 158000+((576*30)*17)) ret += blockValue / 40; // 451760 - 50.0% - 2016-04-11
+    if(nHeight > 158000+((576*30)* 7)) ret += blockValue / 40; // 278960 - 47.5% - 2015-06-01
+    if(nHeight > 158000+((576*30)* 9)) ret += blockValue / 40; // 313520 - 50.0% - 2015-08-03
+
+    /* 
+        Hard for will activate on block 348080 separating the two networks (v11 and earier and v12)
+
+        if(nHeight > 158000+((576*30)*11)) ret += blockValue / 40; // 348080 - 52.5% - 2015-10-05
+        if(nHeight > 158000+((576*30)*13)) ret += blockValue / 40; // 382640 - 55.0% - 2015-12-07
+        if(nHeight > 158000+((576*30)*15)) ret += blockValue / 40; // 417200 - 57.5% - 2016-02-08
+        if(nHeight > 158000+((576*30)*17)) ret += blockValue / 40; // 451760 - 60.0% - 2016-04-11
+    */
 
     return ret;
 }

From c0a5dfba6121186476966b68139930c29db7918e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 12:07:30 -0700
Subject: [PATCH 1674/1819] Masternode inv messages / save seen in mncache

---
 src/activemasternode.cpp    |  6 +++---
 src/main.cpp                | 12 ++++++------
 src/masternode-budget.cpp   | 11 ++++++-----
 src/masternode-payments.cpp |  2 +-
 src/masternode-sync.cpp     |  2 +-
 src/masternode.cpp          |  2 +-
 src/masternodeman.cpp       | 26 ++++++++------------------
 src/masternodeman.h         | 26 ++++++++++++++------------
 src/net.cpp                 |  1 -
 src/net.h                   |  2 +-
 10 files changed, 41 insertions(+), 49 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index ff6552feb57d..99015fa8502a 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -171,7 +171,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
         }
 
         pmn->lastPing = mnp;
-        mapSeenMasternodePing[mnp.GetHash()] = mnp;
+        mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
         mnp.Relay();
 
         return true;
@@ -244,7 +244,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         LogPrintf("CActiveMasternode::Register() -  %s\n", errorMessage);
         return false;
     }
-    mapSeenMasternodePing[mnp.GetHash()] = mnp;
+    mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
     LogPrintf("CActiveMasternode::Register() - Adding to Masternode list\n    service: %s\n    vin: %s\n", service.ToString(), vin.ToString());
     mnb = CMasternodeBroadcast(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
@@ -254,7 +254,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
-    mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+    mnodeman.mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
 
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
diff --git a/src/main.cpp b/src/main.cpp
index 63b840aeffe0..477cea43436b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4016,13 +4016,13 @@ bool static AlreadyHave(const CInv& inv)
         }
         return false;
     case MSG_MASTERNODE_ANNOUNCE:
-        if(mapSeenMasternodeBroadcast.count(inv.hash)) {
+        if(mnodeman.mapSeenMasternodeBroadcast.count(inv.hash)) {
             masternodeSync.AddedMasternodeList();
             return true;
         }
         return false;
     case MSG_MASTERNODE_PING:
-        return mapSeenMasternodePing.count(inv.hash);
+        return mnodeman.mapSeenMasternodePing.count(inv.hash);
     }
     // Don't know what it is, just say we already got one
     return true;
@@ -4223,20 +4223,20 @@ void static ProcessGetData(CNode* pfrom)
                 }
 
                 if (!pushed && inv.type == MSG_MASTERNODE_ANNOUNCE) {
-                    if(mapSeenMasternodeBroadcast.count(inv.hash)){
+                    if(mnodeman.mapSeenMasternodeBroadcast.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenMasternodeBroadcast[inv.hash];
+                        ss << mnodeman.mapSeenMasternodeBroadcast[inv.hash];
                         pfrom->PushMessage("mnb", ss);
                         pushed = true;
                     }
                 }
 
                 if (!pushed && inv.type == MSG_MASTERNODE_PING) {
-                    if(mapSeenMasternodePing.count(inv.hash)){
+                    if(mnodeman.mapSeenMasternodePing.count(inv.hash)){
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss << mapSeenMasternodePing[inv.hash];
+                        ss << mnodeman.mapSeenMasternodePing[inv.hash];
                         pfrom->PushMessage("mnp", ss);
                         pushed = true;
                     }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 22c65f95995a..b6faeb702540 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -952,14 +952,14 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
         if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
             CInv inv(MSG_BUDGET_PROPOSAL, (*it1).second.GetHash());
-            RelayInv(inv);
+            pfrom->PushInventory(inv);
         
             //send votes
             std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
             while(it2 != pbudgetProposal->mapVotes.end()){
                 if((*it2).second.fValid){
                     CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
-                    RelayInv(inv);
+                    pfrom->PushInventory(inv);
                 }
                 ++it2;
             }
@@ -972,14 +972,15 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
         if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
             CInv inv(MSG_BUDGET_FINALIZED, (*it3).second.GetHash());
-            RelayInv(inv);
+            pfrom->PushInventory(inv);
 
             //send votes
             std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
             while(it4 != pfinalizedBudget->mapVotes.end()){
-                if((*it4).second.fValid)
+                if((*it4).second.fValid) {
                     CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
-                    RelayInv(inv);
+                    pfrom->PushInventory(inv);
+                }
                 ++it4;
             }
         }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index b86479aa125b..ce0c62960d38 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -763,7 +763,7 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
         CMasternodePaymentWinner winner = (*it).second;
         if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20) {
             CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
-            RelayInv(inv);
+            node->PushInventory(inv);
         }
         ++it;
     }
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 3f9244156fa6..9c9b6a4898a1 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -160,7 +160,7 @@ void CMasternodeSync::Process()
                 pnode->FulfilledRequest("mnsync");
 
                 if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 2){
+                        && RequestedMasternodeAttempt <= 4){
                     mnodeman.DsegUpdate(pnode);
                     RequestedMasternodeAttempt++;
                 }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index c2a32bf782c9..42493bbea86f 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -141,7 +141,7 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     int nDoS = 0;
     if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS, false))) {
         lastPing = mnb.lastPing;
-        mapSeenMasternodePing[lastPing.GetHash()] = lastPing;
+        mnodeman.mapSeenMasternodePing[lastPing.GetHash()] = lastPing;
     }
 }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index da02663220a2..e7ccf0125ab1 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -15,12 +15,6 @@
 /** Masternode manager */
 CMasternodeMan mnodeman;
 
-// Keep track of all broadcasts I've seen
-map<uint256, CMasternodeBroadcast> mapSeenMasternodeBroadcast;
-
-// Keep track of all pings I've seen
-map<uint256, CMasternodePing> mapSeenMasternodePing;
-
 struct CompareValueOnly
 {
     bool operator()(const pair<int64_t, CTxIn>& t1,
@@ -617,11 +611,11 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternodeBroadcast mnb;
         vRecv >> mnb;
 
-        if(mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
+        if(mnodeman.mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
             masternodeSync.AddedMasternodeList();
             return;
         }
-        mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+        mnodeman.mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
 
         int nDoS = 0;
         if(!mnb.CheckAndUpdate(nDoS)){
@@ -661,8 +655,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         if(fDebug) LogPrintf("mnp - Masternode ping, vin: %s\n", mnp.vin.ToString());
 
-        if(mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
-        mapSeenMasternodePing[mnp.GetHash()] = mnp;
+        if(mnodeman.mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
+        mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
 
         int nDoS = 0;
         if(mnp.CheckAndUpdate(nDoS)) return;
@@ -724,15 +718,11 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             if(mn.IsEnabled()) {
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
                 if(vin == CTxIn()){
-                    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
-                    ss.reserve(1000);
-                    ss << CMasternodeBroadcast(mn);
-                    pfrom->PushMessage("mnb", ss);
+                    CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
+                    pfrom->PushInventory(inv);
                 } else if (vin == mn.vin) {
-                    CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
-                    ss.reserve(1000);
-                    ss << CMasternodeBroadcast(mn);
-                    pfrom->PushMessage("mnb", ss);
+                    CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
+                    pfrom->PushInventory(inv);
 
                     LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
                     return;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 77a028c23e88..ff763294f16e 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -20,12 +20,6 @@ using namespace std;
 
 class CMasternodeMan;
 
-// Keep track of all broadcasts I've seen
-extern map<uint256, CMasternodeBroadcast> mapSeenMasternodeBroadcast;
-
-// Keep track of all pings I've seen
-extern map<uint256, CMasternodePing> mapSeenMasternodePing;
-
 extern CMasternodeMan mnodeman;
 void DumpMasternodes();
 
@@ -71,6 +65,11 @@ class CMasternodeMan
     std::map<COutPoint, int64_t> mWeAskedForMasternodeListEntry;
 
 public:
+    // Keep track of all broadcasts I've seen
+    map<uint256, CMasternodeBroadcast> mapSeenMasternodeBroadcast;
+    // Keep track of all pings I've seen
+    map<uint256, CMasternodePing> mapSeenMasternodePing;
+    
     // keep track of dsq count to prevent masternodes from gaming darksend queue
     int64_t nDsqCount;
 
@@ -78,12 +77,15 @@ class CMasternodeMan
 
     template <typename Stream, typename Operation>
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
-            LOCK(cs);
-            READWRITE(vMasternodes);
-            READWRITE(mAskedUsForMasternodeList);
-            READWRITE(mWeAskedForMasternodeList);
-            READWRITE(mWeAskedForMasternodeListEntry);
-            READWRITE(nDsqCount);
+        LOCK(cs);
+        READWRITE(vMasternodes);
+        READWRITE(mAskedUsForMasternodeList);
+        READWRITE(mWeAskedForMasternodeList);
+        READWRITE(mWeAskedForMasternodeListEntry);
+        READWRITE(nDsqCount);
+
+        READWRITE(mapSeenMasternodeBroadcast);
+        READWRITE(mapSeenMasternodePing);
     }
 
     CMasternodeMan();
diff --git a/src/net.cpp b/src/net.cpp
index 0760c97f3833..f578349df6c9 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1799,7 +1799,6 @@ void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll)
 
         pnode->PushMessage("ix", tx);
     }
-
 }
 
 void RelayInv(CInv &inv, const int minProtoVersion) {
diff --git a/src/net.h b/src/net.h
index 31c3e6a297f6..0ff51d922c3b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -693,7 +693,7 @@ class CExplicitNetCleanup
 class CTransaction;
 void RelayTransaction(const CTransaction& tx);
 void RelayTransaction(const CTransaction& tx, const CDataStream& ss);
-void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll=false);
+void RelayTransactionLockReq(const CTransaction& tx, bool relayToAll=false);    
 void RelayInv(CInv &inv, const int minProtoVersion = MIN_PEER_PROTO_VERSION);
 
 /** Access to the (IP) address database (peers.dat) */

From 61becf2f11c1eeca54d33a1c6942f53c4d84c675 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 19:27:40 -0700
Subject: [PATCH 1675/1819] directly send inv messages

---
 src/activemasternode.cpp | 2 +-
 src/masternodeman.cpp    | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 99015fa8502a..bba53c0656ef 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -9,7 +9,7 @@
 // Bootup the Masternode, look for a 1000DRK input and register on the network
 //
 void CActiveMasternode::ManageStatus()
-{
+{    
     std::string errorMessage;
 
     if(!fMasterNode) return;
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index e7ccf0125ab1..d4f0098fd569 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -711,6 +711,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             }
         } //else, asking for a specific node which is ok
 
+        std::vector<CInv> vInv;
         int i = 0;
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
             if(mn.addr.IsRFC1918()) continue; //local network
@@ -719,10 +720,10 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
                 if(vin == CTxIn()){
                     CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
-                    pfrom->PushInventory(inv);
+                    vInv.push_back(inv);
                 } else if (vin == mn.vin) {
                     CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
-                    pfrom->PushInventory(inv);
+                    vInv.push_back(inv);
 
                     LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
                     return;
@@ -730,6 +731,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                 i++;
             }
         }
+        if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString().c_str());
     }

From 04fc6e1fb4f87ed500d3d150ddf30a117f93f50c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 20:17:53 -0700
Subject: [PATCH 1676/1819] Change rest of sync process to direct inv messages
 / reduced sync timeout

---
 src/masternode-budget.cpp   | 11 +++++++----
 src/masternode-payments.cpp |  4 +++-
 src/masternode-sync.h       |  2 +-
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index b6faeb702540..7016f1fa903f 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -947,19 +947,21 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
     */
 
+    vector<CInv> vInv;
+
     std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
     while(it1 != mapSeenMasternodeBudgetProposals.end()){
         CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
         if(pbudgetProposal && pbudgetProposal->fValid && (nProp == 0 || (*it1).first == nProp)){
             CInv inv(MSG_BUDGET_PROPOSAL, (*it1).second.GetHash());
-            pfrom->PushInventory(inv);
+            vInv.push_back(inv);
         
             //send votes
             std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
             while(it2 != pbudgetProposal->mapVotes.end()){
                 if((*it2).second.fValid){
                     CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
-                    pfrom->PushInventory(inv);
+                    vInv.push_back(inv);
                 }
                 ++it2;
             }
@@ -972,14 +974,14 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
         if(pfinalizedBudget && pfinalizedBudget->fValid && (nProp == 0 || (*it3).first == nProp)){
             CInv inv(MSG_BUDGET_FINALIZED, (*it3).second.GetHash());
-            pfrom->PushInventory(inv);
+            vInv.push_back(inv);
 
             //send votes
             std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
             while(it4 != pfinalizedBudget->mapVotes.end()){
                 if((*it4).second.fValid) {
                     CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
-                    pfrom->PushInventory(inv);
+                    vInv.push_back(inv);
                 }
                 ++it4;
             }
@@ -987,6 +989,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         ++it3;
     }
 
+    if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 }
 
 bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index ce0c62960d38..30d0f1dcfdde 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -758,15 +758,17 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
     int nCount = (mnodeman.CountEnabled()*2);
     if(nCountNeeded > nCount) nCountNeeded = nCount;
 
+    vector<CInv> vInv;
     std::map<uint256, CMasternodePaymentWinner>::iterator it = mapMasternodePayeeVotes.begin();
     while(it != mapMasternodePayeeVotes.end()) {
         CMasternodePaymentWinner winner = (*it).second;
         if(winner.nBlockHeight >= chainActive.Tip()->nHeight-nCountNeeded && winner.nBlockHeight <= chainActive.Tip()->nHeight + 20) {
             CInv inv(MSG_MASTERNODE_WINNER, winner.GetHash());
-            node->PushInventory(inv);
+            vInv.push_back(inv);
         }
         ++it;
     }
+    if(vInv.size() > 0) node->PushMessage("inv", vInv);
 }
 
 std::string CMasternodePayments::ToString() const
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 0326a14d48c4..96f199186823 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -13,7 +13,7 @@
 #define MASTERNODE_SYNC_FAILED            998
 #define MASTERNODE_SYNC_FINISHED          999
 
-#define MASTERNODE_SYNC_TIMEOUT           15
+#define MASTERNODE_SYNC_TIMEOUT           7
 
 class CMasternodeSync;
 extern CMasternodeSync masternodeSync;

From b04faf6e2d7607979cea476fc891c8b0fd481598 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 21:13:17 -0700
Subject: [PATCH 1677/1819] Update lastPing in mapSeen obj, remove ping from
 CMasternode hash

---
 src/instantx.h        |  2 +-
 src/masternode.cpp    |  7 +++++++
 src/masternode.h      |  1 -
 src/masternodeman.cpp | 11 +++++------
 src/version.h         | 10 +++++-----
 5 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index e89328812ae3..03a1c94b3140 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -31,7 +31,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70097;
+static const int MIN_INSTANTX_PROTO_VERSION = 70098;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 42493bbea86f..1cf13d546b77 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -603,6 +603,13 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
 
             pmn->lastPing = *this;
 
+            //mnodeman.mapSeenMasternodeBroadcast.lastPing is probably outdated, so we'll update it
+            CMasternodeBroadcast mnb(*pmn);
+            uint256 hash = mnb.GetHash();
+            if(mnodeman.mapSeenMasternodeBroadcast.count(hash)) {
+                mnodeman.mapSeenMasternodeBroadcast[hash].lastPing = *this;
+            }
+
             pmn->Check();
             if(!pmn->IsEnabled()) return false;
 
diff --git a/src/masternode.h b/src/masternode.h
index e94fba39ca70..4cbb8665d9da 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -309,7 +309,6 @@ class CMasternodeBroadcast : public CMasternode
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << sigTime;
         ss << pubkey;
-        ss << lastPing;
         return ss.GetHash();
     }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index d4f0098fd569..72bddb43e7a1 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -718,15 +718,14 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
             if(mn.IsEnabled()) {
                 if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
-                if(vin == CTxIn()){
-                    CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
-                    vInv.push_back(inv);
-                } else if (vin == mn.vin) {
+                if(vin == CTxIn() || vin == mn.vin){
                     CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
                     vInv.push_back(inv);
 
-                    LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
-                    return;
+                    if(vin == mn.vin) {
+                        LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
+                        break;
+                    }
                 }
                 i++;
             }
diff --git a/src/version.h b/src/version.h
index 788c2d62f6e0..224138efe7a7 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70097;
+static const int PROTOCOL_VERSION = 70098;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70097;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70098;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70097;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70098;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70097;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70098;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70097;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70098;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 2b3edff43583fa8ad4c803c0bff05e0e36252ff6 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 25 Jul 2015 21:23:38 -0700
Subject: [PATCH 1678/1819] Only relay good budget items

---
 src/masternode-budget.cpp | 42 +++++++++++++++++++--------------------
 src/masternode-budget.h   |  8 ++++----
 2 files changed, 24 insertions(+), 26 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 7016f1fa903f..ecee1272b7c4 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -346,33 +346,35 @@ void DumpBudgets()
     LogPrintf("Budget dump finished  %dms\n", GetTimeMillis() - nStart);
 }
 
-void CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
+bool CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 {
     LOCK(cs);
     std::string strError = "";
-    if(!finalizedBudget.IsValid(strError)) return;
+    if(!finalizedBudget.IsValid(strError)) return false;
 
     if(mapFinalizedBudgets.count(finalizedBudget.GetHash())) {
-        return;
+        return false;
     }
 
     mapFinalizedBudgets.insert(make_pair(finalizedBudget.GetHash(), finalizedBudget));
+    return true;
 }
 
-void CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
+bool CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 {
     LOCK(cs);
     std::string strError = "";
     if(!budgetProposal.IsValid(strError)) {
         LogPrintf("CBudgetManager::AddProposal - invalid budget proposal - %s\n", strError);
-        return;
+        return false;
     }
 
     if(mapProposals.count(budgetProposal.GetHash())) {
-        return;
+        return false;
     }
 
     mapProposals.insert(make_pair(budgetProposal.GetHash(), budgetProposal));
+    return true;
 }
 
 void CBudgetManager::CheckAndRemove()
@@ -811,8 +813,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
-        AddProposal(budgetProposal);
-        budgetProposalBroadcast.Relay();
+        if(AddProposal(budgetProposal)) {budgetProposalBroadcast.Relay();}
         masternodeSync.AddedBudgetItem();
 
         LogPrintf("mprop - new budget - %s\n", budgetProposalBroadcast.GetHash().ToString());
@@ -846,8 +847,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         if(pmn->nVotedTimes < 100){
-            UpdateProposal(vote, pfrom);
-            vote.Relay();
+            if(UpdateProposal(vote, pfrom)) vote.Relay();
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
 
@@ -883,8 +883,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         LogPrintf("fbs - new finalized budget - %s\n", finalizedBudgetBroadcast.GetHash().ToString());
 
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
-        AddFinalizedBudget(finalizedBudget);
-        finalizedBudgetBroadcast.Relay();
+        if(AddFinalizedBudget(finalizedBudget)) {finalizedBudgetBroadcast.Relay();}
         masternodeSync.AddedBudgetItem();
 
         //we might have active votes for this budget that are now valid
@@ -915,8 +914,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(pmn->nVotedTimes < 100){
-            UpdateFinalizedBudget(vote, pfrom);
-            vote.Relay();
+            if(UpdateFinalizedBudget(vote, pfrom)) {vote.Relay();}
             if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
             masternodeSync.AddedBudgetItem();
 
@@ -1015,8 +1013,7 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
     }
 
 
-    mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
-    return true;
+    return mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
 }
 
 bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom)
@@ -1041,8 +1038,7 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
         return false;
     }
 
-    mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
-    return true;
+    return mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
 }
 
 CBudgetProposal::CBudgetProposal()
@@ -1138,7 +1134,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     return true;
 }
 
-void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
+bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
 {
     LOCK(cs);
 
@@ -1147,11 +1143,12 @@ void CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
             if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
-            return;
+            return false;
         }
     }
 
     mapVotes[hash] = vote;
+    return true;
 }
 
 // If masternode voted for a proposal, but is now invalid -- remove the vote
@@ -1394,7 +1391,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
     fValid = true;
 }
 
-void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
+bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
 {
     LOCK(cs);
 
@@ -1402,11 +1399,12 @@ void CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
             if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
-            return;
+            return false;
         }
     }
 
     mapVotes[hash] = vote;
+    return true;
 }
 
 //evaluate if we should vote for this. Masternode only
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 1080e640c5f6..403f42a05eb0 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -113,8 +113,8 @@ class CBudgetManager
     std::vector<CBudgetProposal*> GetAllProposals();
     std::vector<CFinalizedBudget*> GetFinalizedBudgets();
     bool IsBudgetPaymentBlock(int nBlockHeight);
-    void AddProposal(CBudgetProposal& budgetProposal);
-    void AddFinalizedBudget(CFinalizedBudget& finalizedBudget);
+    bool AddProposal(CBudgetProposal& budgetProposal);
+    bool AddFinalizedBudget(CFinalizedBudget& finalizedBudget);
     void SubmitFinalBudget();
     bool HasNextFinalizedBudget();
 
@@ -206,7 +206,7 @@ class CFinalizedBudget
     CFinalizedBudget(const CFinalizedBudget& other);
 
     void CleanAndRemove(bool fSignatureCheck);
-    void AddOrUpdateVote(CFinalizedBudgetVote& vote);
+    bool AddOrUpdateVote(CFinalizedBudgetVote& vote);
     double GetScore();
     bool HasMinimumRequiredSupport();
 
@@ -371,7 +371,7 @@ class CBudgetProposal
     CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
 
     void Calculate();
-    void AddOrUpdateVote(CBudgetVote& vote);
+    bool AddOrUpdateVote(CBudgetVote& vote);
     bool HasMinimumRequiredSupport();
     std::pair<std::string, std::string> GetVotes();
 

From f82b34f3f2860a4fe35be48d4b5f7da73cf38274 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 05:15:43 -0700
Subject: [PATCH 1679/1819] better sorting algorithm -- sort props by votes
 then nFeeHashTX

---
 src/init.cpp              | 3 +++
 src/masternode-budget.cpp | 7 ++++++-
 src/rpcmasternode.cpp     | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index a9d5f1679c95..f1995b598189 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -566,6 +566,8 @@ bool InitSanityCheck(void)
     return true;
 }
 
+
+
 /** Initialize dash.
  *  @pre Parameters should be parsed and config file should be read.
  */
@@ -613,6 +615,7 @@ bool AppInit2(boost::thread_group& threadGroup)
         umask(077);
     }
 
+
     // Clean shutdown on SIGTERM
     struct sigaction sa;
     sa.sa_handler = HandleSIGTERM;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index ecee1272b7c4..afe6e0d6aaad 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -587,9 +587,14 @@ std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
     return vBudgetProposalRet;
 }
 
+//
+// Sort by votes, if there's a tie sort by their feeHash TX
+//
 struct sortProposalsByVotes {
     bool operator()(const std::pair<CBudgetProposal*, int> &left, const std::pair<CBudgetProposal*, int> &right) {
-        return left.second > right.second;
+      if( left.second != right.second)
+        return (left.second > right.second);
+      return (left.first->nFeeTXHash > right.first->nFeeTXHash);
     }
 };
 
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 195f21baef8c..ec3a37617439 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -473,6 +473,7 @@ Value masternode(const Array& params, bool fHelp)
     */
     if (strCommand == "calcscore")
     {
+
         int nLast = 10;
 
         if (params.size() >= 2){

From 145c845d1fca8c4e8a088fda208575613ee32e44 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 07:01:49 -0700
Subject: [PATCH 1680/1819] Changed vote restrition model - Masternodes can
 only vote once per hour now, instead of 100 times a day total - UI reports
 back errors now

---
 src/masternode-budget.cpp    | 109 ++++++++++++++++++++++++-----------
 src/masternode-budget.h      |   9 +--
 src/masternode-sync.cpp      |   3 +-
 src/masternode.cpp           |   3 -
 src/masternode.h             |   3 -
 src/masternodeman.cpp        |   6 --
 src/masternodeman.h          |   3 -
 src/rpcmasternode-budget.cpp |  56 ++++++++++++------
 src/rpcmasternode.cpp        |   7 +--
 9 files changed, 120 insertions(+), 79 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index afe6e0d6aaad..689f44421928 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -85,9 +85,10 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
 
 void CBudgetManager::CheckOrphanVotes()
 {
+    std::string strError = "";
     std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
     while(it1 != mapOrphanMasternodeBudgetVotes.end()){
-        if(budget.UpdateProposal(((*it1).second), NULL)){
+        if(budget.UpdateProposal(((*it1).second), NULL, strError)){
             LogPrintf("CBudgetManager::CheckOrphanVotes - Proposal/Budget is known, activating and removing orphan vote\n");
             mapOrphanMasternodeBudgetVotes.erase(it1++);
         } else {
@@ -96,7 +97,7 @@ void CBudgetManager::CheckOrphanVotes()
     }
     std::map<uint256, CFinalizedBudgetVote>::iterator it2 = mapOrphanFinalizedBudgetVotes.begin();
     while(it2 != mapOrphanFinalizedBudgetVotes.end()){
-        if(budget.UpdateFinalizedBudget(((*it2).second),NULL)){
+        if(budget.UpdateFinalizedBudget(((*it2).second),NULL, strError)){
             LogPrintf("CBudgetManager::CheckOrphanVotes - Proposal/Budget is known, activating and removing orphan vote\n");
             mapOrphanFinalizedBudgetVotes.erase(it2++);
         } else {
@@ -747,7 +748,6 @@ void CBudgetManager::NewBlock()
     if(chainActive.Height() % 6 != 0) return;
 
     CheckAndRemove();
-    mnodeman.DecrementVotedTimes();
 
     //remove invalid votes once in a while (we have to check the signatures and validity of every vote, somewhat CPU intensive)
 
@@ -843,24 +843,21 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
 
+        mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(!vote.SignatureValid(true)){
             LogPrintf("mvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
-
-        if(pmn->nVotedTimes < 100){
-            if(UpdateProposal(vote, pfrom)) vote.Relay();
-            if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
+        
+        std::string strError = "";
+        if(UpdateProposal(vote, pfrom, strError)) {
+            vote.Relay();
             masternodeSync.AddedBudgetItem();
-
-            LogPrintf("mvote - new budget vote - %s\n", vote.GetHash().ToString());
-        } else {
-            LogPrintf("mvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
-            return;
         }
+
+        LogPrintf("mvote - new budget vote - %s\n", vote.GetHash().ToString());
     }
 
     if (strCommand == "fbs") { //Finalized Budget Suggestion
@@ -911,24 +908,20 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         if(!vote.SignatureValid(true)){
             LogPrintf("fbvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
             return;
         }
 
-        mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        if(pmn->nVotedTimes < 100){
-            if(UpdateFinalizedBudget(vote, pfrom)) {vote.Relay();}
-            if(!masternodeSync.IsSynced()) pmn->nVotedTimes++;
+        std::string strError = "";
+        if(UpdateFinalizedBudget(vote, pfrom, strError)) {
+            vote.Relay();
             masternodeSync.AddedBudgetItem();
-
-            if(fDebug) LogPrintf("fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
-
-        } else {
-            LogPrintf("fbvote - masternode can't vote again - vin: %s\n", pmn->vin.ToString());
-            return;
         }
+
+        if(fDebug) LogPrintf("fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
     }
 }
 
@@ -995,7 +988,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
     if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 }
 
-bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
+bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
     LOCK(cs);
 
@@ -1018,10 +1011,10 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom)
     }
 
 
-    return mapProposals[vote.nProposalHash].AddOrUpdateVote(vote);
+    return mapProposals[vote.nProposalHash].AddOrUpdateVote(vote, strError);
 }
 
-bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom)
+bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
     LOCK(cs);
 
@@ -1043,7 +1036,7 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
         return false;
     }
 
-    return mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote);
+    return mapFinalizedBudgets[vote.nBudgetHash].AddOrUpdateVote(vote, strError);
 }
 
 CBudgetProposal::CBudgetProposal()
@@ -1139,7 +1132,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     return true;
 }
 
-bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
+bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
 {
     LOCK(cs);
 
@@ -1147,11 +1140,33 @@ bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote)
 
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
-            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            strError = strprintf("new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
             return false;
         }
+        if(vote.nTime - mapVotes[hash].nTime < BUDGET_VOTE_UPDATE_MIN){
+            strError = strprintf("time between votes is too soon - %s - %lli\n", vote.GetHash().ToString(), vote.nTime - mapVotes[hash].nTime);
+            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+            return false;
+        }
+    }
+
+    //if we're synced, the vote should have been recent
+    if(masternodeSync.IsSynced()) {
+        //up to an hour ago
+        if(vote.nTime < GetTime() - (60*60)){
+            strError = strprintf("new vote is too old - %s - nTime %lli - Min Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() - (60*60));
+            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+            return false;
+        }        
     }
 
+    if(vote.nTime > GetTime() + (60*60)){
+        strError = strprintf("new vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() + (60*60));
+        if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+        return false;
+    }        
+
     mapVotes[hash] = vote;
     return true;
 }
@@ -1396,18 +1411,40 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
     fValid = true;
 }
 
-bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote)
+bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError)
 {
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
-            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            strError = strprintf("new vote older than existing vote - %s\n", vote.GetHash().ToString());
+            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+            return false;
+        }
+        if(vote.nTime - mapVotes[hash].nTime < BUDGET_VOTE_UPDATE_MIN){
+            strError = strprintf("time between votes is too soon - %s - %lli\n", vote.GetHash().ToString(), vote.nTime - mapVotes[hash].nTime);
+            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
             return false;
         }
     }
 
+    //if we're synced, the vote should have been recent
+    if(masternodeSync.IsSynced()) {
+        //up to an hour ago
+        if(vote.nTime < GetTime() - (60*60)){
+            strError = strprintf("new vote is too old - %s - nTime %lli - Min Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() - (60*60));
+            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+            return false;
+        }        
+    }
+
+    if(vote.nTime > GetTime() + (60*60)){
+        strError = strprintf("new vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() + (60*60));
+        if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+        return false;
+    }
+
     mapVotes[hash] = vote;
     return true;
 }
@@ -1611,9 +1648,13 @@ void CFinalizedBudget::SubmitVote()
         return;
     }
 
-    budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-    vote.Relay();
-    budget.UpdateFinalizedBudget(vote, NULL);
+    std::string strError = "";
+    if(budget.UpdateFinalizedBudget(vote, NULL, strError)){
+        budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+        vote.Relay();
+    } else {
+        LogPrintf("CFinalizedBudget::SubmitVote : Error submitting vote - %s\n", strError);
+    }
 }
 
 CFinalizedBudgetBroadcast::CFinalizedBudgetBroadcast()
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 403f42a05eb0..79665bb499be 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -32,6 +32,7 @@ class CTxBudgetPayment;
 
 static const CAmount BUDGET_FEE_TX = (0.5*COIN);
 static const int64_t BUDGET_FEE_CONFIRMATIONS = 6;
+static const int64_t BUDGET_VOTE_UPDATE_MIN = 60*60;
 
 extern CBudgetManager budget;
 void DumpBudgets();
@@ -118,8 +119,8 @@ class CBudgetManager
     void SubmitFinalBudget();
     bool HasNextFinalizedBudget();
 
-    bool UpdateProposal(CBudgetVote& vote, CNode* pfrom);
-    bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom);
+    bool UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError);
+    bool UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom, std::string& strError);
     bool PropExists(uint256 nHash);
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     std::string GetRequiredPaymentsString(int nBlockHeight);
@@ -206,7 +207,7 @@ class CFinalizedBudget
     CFinalizedBudget(const CFinalizedBudget& other);
 
     void CleanAndRemove(bool fSignatureCheck);
-    bool AddOrUpdateVote(CFinalizedBudgetVote& vote);
+    bool AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError);
     double GetScore();
     bool HasMinimumRequiredSupport();
 
@@ -371,7 +372,7 @@ class CBudgetProposal
     CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
 
     void Calculate();
-    bool AddOrUpdateVote(CBudgetVote& vote);
+    bool AddOrUpdateVote(CBudgetVote& vote, std::string& strError);
     bool HasMinimumRequiredSupport();
     std::pair<std::string, std::string> GetVotes();
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 9c9b6a4898a1..841aaa83425b 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -193,7 +193,8 @@ void CMasternodeSync::Process()
         if (pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) {
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
-                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                //we'll start rejecting votes if we accidentally get set as synced too soon
+                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3){ //hasn't received a new item in the last five seconds, so we'll move to the
                     if(budget.HasNextFinalizedBudget()) {
                         GetNextAsset();
                     } else { //we've failed to sync, this state will reject the next budget block
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 1cf13d546b77..0587ef401bd4 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -81,7 +81,6 @@ CMasternode::CMasternode()
     nLastDsq = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nVotedTimes = 0;
 }
 
 CMasternode::CMasternode(const CMasternode& other)
@@ -103,7 +102,6 @@ CMasternode::CMasternode(const CMasternode& other)
     nLastDsq = other.nLastDsq;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
-    nVotedTimes = other.nVotedTimes;
 }
 
 CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
@@ -125,7 +123,6 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     nLastDsq = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
-    nVotedTimes = 0;
 }
 
 //
diff --git a/src/masternode.h b/src/masternode.h
index 4cbb8665d9da..64fde7446c49 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -132,7 +132,6 @@ class CMasternode
     int64_t nLastDsq; //the dsq count from the last dsq broadcast of this node
     int nScanningErrorCount;
     int nLastScanningErrorBlockHeight;
-    int nVotedTimes;
     CMasternodePing lastPing;
 
 
@@ -164,7 +163,6 @@ class CMasternode
         swap(first.nLastDsq, second.nLastDsq);
         swap(first.nScanningErrorCount, second.nScanningErrorCount);
         swap(first.nLastScanningErrorBlockHeight, second.nLastScanningErrorBlockHeight);
-        swap(first.nVotedTimes, second.nVotedTimes);
     }
 
     CMasternode& operator=(CMasternode from)
@@ -205,7 +203,6 @@ class CMasternode
             READWRITE(nLastDsq);
             READWRITE(nScanningErrorCount);
             READWRITE(nLastScanningErrorBlockHeight);
-            READWRITE(nVotedTimes);
     }
 
     int64_t SecondsSincePayment();
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 72bddb43e7a1..a61c868dc696 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -447,12 +447,6 @@ CMasternode *CMasternodeMan::FindRandom()
     return &vMasternodes[GetRandInt(vMasternodes.size())];
 }
 
-void CMasternodeMan::DecrementVotedTimes()
-{
-    BOOST_FOREACH(CMasternode& mn, vMasternodes)
-        if(--mn.nVotedTimes < 0) mn.nVotedTimes = 0; 
-}
-
 CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight, int minProtocol)
 {
     int64_t score = 0;
diff --git a/src/masternodeman.h b/src/masternodeman.h
index ff763294f16e..aeac14748636 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -118,9 +118,6 @@ class CMasternodeMan
     /// Find a random entry
     CMasternode* FindRandom();
 
-    /// Decrement all masternode nVotedTimes, called 1/6 blocks (allowing for 100 votes each day)
-    void DecrementVotedTimes();
-
     /// Get the current winner for this block
     CMasternode* GetCurrentMasterNode(int mod=1, int64_t nBlockHeight=0, int minProtocol=0);
 
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 6d2505d175e3..4a12be25af2d 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -248,12 +248,18 @@ Value mnbudget(const Array& params, bool fHelp)
                 continue;
             }
 
-            budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-            vote.Relay();
-            budget.UpdateProposal(vote, NULL);
 
-            success++;
-            statusObj.push_back(Pair("result", "success"));
+            std::string strError = "";
+            if(budget.UpdateProposal(vote, NULL, strError)) {
+                budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+                vote.Relay();
+                success++;
+                statusObj.push_back(Pair("result", "success"));
+            } else {
+                failed++;
+                statusObj.push_back(Pair("result", strError.c_str()));
+            }
+
             resultsObj.push_back(Pair(mne.getAlias(), statusObj));
         }
 
@@ -292,11 +298,14 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        vote.Relay();
-        budget.UpdateProposal(vote, NULL);
-
-        return "Voted successfully";
+        std::string strError = "";
+        if(budget.UpdateProposal(vote, NULL, strError)){
+            budget.mapSeenMasternodeBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            vote.Relay();
+            return "Voted successfully";
+        } else {
+            return "Error voting : " + strError;
+        }
     }
 
     if(strCommand == "projection")
@@ -538,12 +547,17 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 continue;
             }
 
-            budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-            vote.Relay();
-            budget.UpdateFinalizedBudget(vote, NULL);
+            std::string strError = "";
+            if(budget.UpdateFinalizedBudget(vote, NULL, strError)){
+                budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+                vote.Relay();
+                success++;
+                statusObj.push_back(Pair("result", "success"));
+            } else {
+                failed++;
+                statusObj.push_back(Pair("result", strError.c_str()));
+            }
 
-            success++;
-            statusObj.push_back(Pair("result", "success"));
             resultsObj.push_back(Pair(mne.getAlias(), statusObj));
         }
 
@@ -577,11 +591,15 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             return "Failure to sign.";
         }
 
-        budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
-        vote.Relay();
-        budget.UpdateFinalizedBudget(vote, NULL);
+        std::string strError = "";
+        if(budget.UpdateFinalizedBudget(vote, NULL, strError)){
+            budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
+            vote.Relay();
+            return "success";
+        } else {
+            return "Error voting : " + strError;
+        }
 
-        return "success";
     }
 
     if(strCommand == "show")
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index ec3a37617439..8c068d70d1fd 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -512,7 +512,7 @@ Value masternodelist(const Array& params, bool fHelp)
 
     if (fHelp ||
             (strMode != "status" && strMode != "vin" && strMode != "pubkey" && strMode != "lastseen" && strMode != "activeseconds" && strMode != "rank" && strMode != "addr"
-                && strMode != "protocol" && strMode != "full" && strMode != "votes" && strMode != "lastpaid"))
+                && strMode != "protocol" && strMode != "full" && strMode != "lastpaid"))
     {
         throw runtime_error(
                 "masternodelist ( \"mode\" \"filter\" )\n"
@@ -535,7 +535,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 "  rank           - Print rank of a masternode based on current block\n"
                 "  status         - Print masternode status: ENABLED / EXPIRED / VIN_SPENT / REMOVE / POS_ERROR\n"
                 "                   (can be additionally filtered, partial match)\n"
-                "  votes          - The amount of times this node has voted recently\n"
                 );
     }
 
@@ -607,10 +606,6 @@ Value masternodelist(const Array& params, bool fHelp)
                 std::string strStatus = mn.Status();
                 if(strFilter !="" && strVin.find(strFilter) == string::npos && strStatus.find(strFilter) == string::npos) continue;
                 obj.push_back(Pair(strVin,       strStatus));
-            } else if(strMode == "votes"){
-                if(strFilter !="" && mn.vin.prevout.hash.ToString().find(strFilter) == string::npos &&
-                    strVin.find(strFilter) == string::npos) continue;
-                obj.push_back(Pair(strVin,      (int64_t)mn.nVotedTimes));
             }
         }
     }

From da21fed1f5afd62b9fa1052d1a765cf15c4c4731 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 07:36:40 -0700
Subject: [PATCH 1681/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 69cdb53e0443..80fdf7c15aac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 29)
+define(_CLIENT_VERSION_BUILD, 30)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index f0138c818786..68ade089fc69 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 29
+#define CLIENT_VERSION_BUILD 30
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 76c4cfc0de4302c1dcfe0dfb61e623422b8117d2 Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sun, 26 Jul 2015 18:43:22 +0200
Subject: [PATCH 1682/1819] UI: Limit display of Sendcoins-popup to 10 entries.

---
 src/qt/sendcoinsdialog.cpp | 16 ++++++++++++++++
 src/qt/sendcoinsdialog.h   |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 297574145f8b..f85a7197733f 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -380,6 +380,22 @@ void SendCoinsDialog::send(QList<SendCoinsRecipient> recipients, QString strFee,
         .arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))
         .arg("<br />" + alternativeUnits.join(" " + tr("or") + "<br />")));
 
+    // Limit number of displayed entries
+    int messageEntries = formatted.size();
+    int displayedEntries = 0;
+    for(int i = 0; i < formatted.size(); i++){
+        if(i >= MAX_SEND_POPUP_ENTRIES){
+            formatted.removeLast();
+            i--;
+        }
+        else{
+            displayedEntries = i+1;
+        }
+    }
+    questionString.append("<hr />");
+    questionString.append(tr("<b>(%1 of %2 entries displayed)</b>").arg(displayedEntries).arg(messageEntries));
+
+    // Display message box    
     QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm send coins"),
         questionString.arg(formatted.join("<br />")),
         QMessageBox::Yes | QMessageBox::Cancel,
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 826e29ae9f3f..8b87b2548568 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -10,6 +10,8 @@
 #include <QDialog>
 #include <QString>
 
+static const int MAX_SEND_POPUP_ENTRIES = 10;
+
 class ClientModel;
 class OptionsModel;
 class SendCoinsEntry;

From d227f28621e31cc4bf58f6b4cf839a9651b151cd Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 12:37:01 -0700
Subject: [PATCH 1683/1819] allow masternodes to turn on pre-sync - udjin

---
 src/activemasternode.cpp | 2 +-
 src/masternode-sync.cpp  | 5 +++++
 src/masternode-sync.h    | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index bba53c0656ef..45aa3f6b8258 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -17,7 +17,7 @@ void CActiveMasternode::ManageStatus()
     if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n");
 
     //need correct blocks to send ping
-    if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsSynced()) {
+    if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsListSyncStarted()) {
         status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS;
         LogPrintf("CActiveMasternode::ManageStatus() - %s\n", GetStatus());
         return;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 841aaa83425b..579e6d87208a 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -28,6 +28,11 @@ bool CMasternodeSync::IsSynced()
     return RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED;
 }
 
+bool CMasternodeSync::IsListSyncStarted()
+{
+    return RequestedMasternodeAssets >= MASTERNODE_SYNC_LIST;
+}
+
 void CMasternodeSync::AddedMasternodeList()
 {
     lastMasternodeList = GetTime();
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 96f199186823..83706a55cfc3 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -44,6 +44,7 @@ class CMasternodeSync
 
     void Process();
     bool IsSynced();
+    bool IsListSyncStarted();
 };
 
 #endif

From 597c2b299daeba926830108a1bb0fc1db61a350b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 13:04:17 -0700
Subject: [PATCH 1684/1819] new masternode start strategy - only check
 blockchain sync status

---
 src/activemasternode.cpp | 4 ++--
 src/masternode-sync.cpp  | 8 ++++++--
 src/masternode-sync.h    | 2 +-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 45aa3f6b8258..9759781ffb04 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -17,7 +17,7 @@ void CActiveMasternode::ManageStatus()
     if (fDebug) LogPrintf("CActiveMasternode::ManageStatus() - Begin\n");
 
     //need correct blocks to send ping
-    if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsListSyncStarted()) {
+    if(Params().NetworkID() != CBaseChainParams::REGTEST && !masternodeSync.IsBlockchainSynced()) {
         status = ACTIVE_MASTERNODE_SYNC_IN_PROCESS;
         LogPrintf("CActiveMasternode::ManageStatus() - %s\n", GetStatus());
         return;
@@ -195,7 +195,7 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
     CKey keyMasternode;
 
     //need correct blocks to send ping
-    if(!masternodeSync.IsSynced()) {
+    if(!masternodeSync.IsBlockchainSynced()) {
         errorMessage = GetStatus();
         LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 579e6d87208a..75eaecfd7c6e 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -28,9 +28,13 @@ bool CMasternodeSync::IsSynced()
     return RequestedMasternodeAssets == MASTERNODE_SYNC_FINISHED;
 }
 
-bool CMasternodeSync::IsListSyncStarted()
+bool CMasternodeSync::IsBlockchainSynced()
 {
-    return RequestedMasternodeAssets >= MASTERNODE_SYNC_LIST;
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(pindexPrev == NULL) return false;
+
+    if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return false;
+    return true;
 }
 
 void CMasternodeSync::AddedMasternodeList()
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 83706a55cfc3..d90eb8a51f4a 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -44,7 +44,7 @@ class CMasternodeSync
 
     void Process();
     bool IsSynced();
-    bool IsListSyncStarted();
+    bool IsBlockchainSynced();
 };
 
 #endif

From 7b480ac74d80cb2c9577b6fc27a5f923283e071f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 26 Jul 2015 20:41:25 -0700
Subject: [PATCH 1685/1819] Eliminate false positives for syncing process

---
 src/masternode-sync.cpp | 37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 75eaecfd7c6e..ad9619a8064c 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -160,7 +160,7 @@ void CMasternodeSync::Process()
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {
                 if(fDebug) LogPrintf("CMasternodeSync::Process() - lastMasternodeList %lld (GetTime() - MASTERNODE_SYNC_TIMEOUT) %lld\n", lastMasternodeList, GetTime() - MASTERNODE_SYNC_TIMEOUT);
-                if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                if(lastMasternodeList > 0 && lastMasternodeList < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
                     GetNextAsset();
                     return;
                 }
@@ -168,16 +168,13 @@ void CMasternodeSync::Process()
                 if(pnode->HasFulfilledRequest("mnsync")) continue;
                 pnode->FulfilledRequest("mnsync");
 
-                if((lastMasternodeList == 0 || lastMasternodeList > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 4){
-                    mnodeman.DsegUpdate(pnode);
-                    RequestedMasternodeAttempt++;
-                }
+                mnodeman.DsegUpdate(pnode);
+                RequestedMasternodeAttempt++;
                 return;
             }
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_MNW) {
-                if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT){ //hasn't received a new item in the last five seconds, so we'll move to the
+                if(lastMasternodeWinner > 0 && lastMasternodeWinner < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
                     GetNextAsset();
                     return;
                 }
@@ -185,16 +182,14 @@ void CMasternodeSync::Process()
                 if(pnode->HasFulfilledRequest("mnwsync")) continue;
                 pnode->FulfilledRequest("mnwsync");
 
-                if((lastMasternodeWinner == 0 || lastMasternodeWinner > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 4){
 
-                    CBlockIndex* pindexPrev = chainActive.Tip();
-                    if(pindexPrev == NULL) return;
+                CBlockIndex* pindexPrev = chainActive.Tip();
+                if(pindexPrev == NULL) return;
+
+                int nMnCount = mnodeman.CountEnabled()*2;
+                pnode->PushMessage("mnget", nMnCount); //sync payees
+                RequestedMasternodeAttempt++;
 
-                    int nMnCount = mnodeman.CountEnabled()*2;
-                    pnode->PushMessage("mnget", nMnCount); //sync payees
-                    RequestedMasternodeAttempt++;
-                }
                 return;
             }
         }
@@ -203,7 +198,7 @@ void CMasternodeSync::Process()
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
-                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3){ //hasn't received a new item in the last five seconds, so we'll move to the
+                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3 && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
                     if(budget.HasNextFinalizedBudget()) {
                         GetNextAsset();
                     } else { //we've failed to sync, this state will reject the next budget block
@@ -218,12 +213,10 @@ void CMasternodeSync::Process()
                 if(pnode->HasFulfilledRequest("busync")) continue;
                 pnode->FulfilledRequest("busync");
 
-                if((lastBudgetItem == 0 || lastBudgetItem > GetTime() - MASTERNODE_SYNC_TIMEOUT)
-                        && RequestedMasternodeAttempt <= 4){
-                    uint256 n = 0;
-                    pnode->PushMessage("mnvs", n); //sync masternode votes
-                    RequestedMasternodeAttempt++;
-                }
+                uint256 n = 0;
+                pnode->PushMessage("mnvs", n); //sync masternode votes
+                RequestedMasternodeAttempt++;
+                
                 return;
             }
 

From e03879b3cfc5dcfc330a2e2143b965b6b2dc627e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 08:27:58 -0700
Subject: [PATCH 1686/1819] Update spork name :
 SPORK_10_MASTERNODE_PAY_UPDATED_NODES

---
 src/masternode-payments.cpp | 2 +-
 src/spork.cpp               | 8 ++++----
 src/spork.h                 | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 30d0f1dcfdde..48a4d9276be3 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -325,7 +325,7 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, int64_t nFe
 }
 
 int CMasternodePayments::GetMinMasternodePaymentsProto() {
-    return IsSporkActive(SPORK_10_MASTERNODE_PAY_NEWEST_NODES)
+    return IsSporkActive(SPORK_10_MASTERNODE_PAY_UPDATED_NODES)
             ? MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2
             : MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1;
 }
diff --git a/src/spork.cpp b/src/spork.cpp
index 9833356293de..c919465bb945 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -88,7 +88,7 @@ bool IsSporkActive(int nSporkID)
         if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
-        if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
+        if(nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
         if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
         if(nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
@@ -114,7 +114,7 @@ int GetSporkValue(int nSporkID)
         if(nSporkID == SPORK_7_MASTERNODE_SCANNING) r = SPORK_7_MASTERNODE_SCANNING_DEFAULT;
         if(nSporkID == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) r = SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT;
         if(nSporkID == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) r = SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT;
-        if(nSporkID == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) r = SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT;
+        if(nSporkID == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) r = SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT;
         if(nSporkID == SPORK_11_RESET_BUDGET) r = SPORK_11_RESET_BUDGET_DEFAULT;
         if(nSporkID == SPORK_12_RECONSIDER_BLOCKS) r = SPORK_12_RECONSIDER_BLOCKS_DEFAULT;
         if(nSporkID == SPORK_13_ENABLE_SUPERBLOCKS) r = SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT;
@@ -250,7 +250,7 @@ int CSporkManager::GetSporkIDByName(std::string strName)
     if(strName == "SPORK_7_MASTERNODE_SCANNING") return SPORK_7_MASTERNODE_SCANNING;
     if(strName == "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT") return SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT;
     if(strName == "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT") return SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT;
-    if(strName == "SPORK_10_MASTERNODE_PAY_NEWEST_NODES") return SPORK_10_MASTERNODE_PAY_NEWEST_NODES;
+    if(strName == "SPORK_10_MASTERNODE_PAY_UPDATED_NODES") return SPORK_10_MASTERNODE_PAY_UPDATED_NODES;
     if(strName == "SPORK_11_RESET_BUDGET") return SPORK_11_RESET_BUDGET;
     if(strName == "SPORK_12_RECONSIDER_BLOCKS") return SPORK_12_RECONSIDER_BLOCKS;
     if(strName == "SPORK_13_ENABLE_SUPERBLOCKS") return SPORK_13_ENABLE_SUPERBLOCKS;
@@ -266,7 +266,7 @@ std::string CSporkManager::GetSporkNameByID(int id)
     if(id == SPORK_7_MASTERNODE_SCANNING) return "SPORK_7_MASTERNODE_SCANNING";
     if(id == SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT) return "SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT";
     if(id == SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT) return "SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT";
-    if(id == SPORK_10_MASTERNODE_PAY_NEWEST_NODES) return "SPORK_10_MASTERNODE_PAY_NEWEST_NODES";
+    if(id == SPORK_10_MASTERNODE_PAY_UPDATED_NODES) return "SPORK_10_MASTERNODE_PAY_UPDATED_NODES";
     if(id == SPORK_11_RESET_BUDGET) return "SPORK_11_RESET_BUDGET";
     if(id == SPORK_12_RECONSIDER_BLOCKS) return "SPORK_12_RECONSIDER_BLOCKS";
     if(id == SPORK_13_ENABLE_SUPERBLOCKS) return "SPORK_13_ENABLE_SUPERBLOCKS";
diff --git a/src/spork.h b/src/spork.h
index 0dfed83ee943..b8ede1fbcd6c 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -32,7 +32,7 @@ using namespace boost;
 #define SPORK_7_MASTERNODE_SCANNING                           10006
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT                10007
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT                 10008
-#define SPORK_10_MASTERNODE_PAY_NEWEST_NODES                  10009
+#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES                 10009
 #define SPORK_11_RESET_BUDGET                                 10010
 #define SPORK_12_RECONSIDER_BLOCKS                            10011
 #define SPORK_13_ENABLE_SUPERBLOCKS                           10012
@@ -43,10 +43,10 @@ using namespace boost;
 #define SPORK_7_MASTERNODE_SCANNING_DEFAULT                   978307200   //2001-1-1
 #define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1444217600   //OFF
 #define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
-#define SPORK_10_MASTERNODE_PAY_NEWEST_NODES_DEFAULT          1444217600   //OFF
+#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         1444217600   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
 #define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
-#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   978307200   //2001-1-1
+#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   0 //1439510400   //8/13/2015, 5:00:00 PM
     
 class CSporkMessage;
 class CSporkManager;

From 71c73c12c6a2ff67a443d95b07801ec99d19dbc5 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 09:22:03 -0700
Subject: [PATCH 1687/1819] Added documentation

---
 doc/masternode-budget.md                      | 120 ++++++++++++++++++
 .../dash/release-notes-0.12.0.md              |  42 +++++-
 2 files changed, 161 insertions(+), 1 deletion(-)
 create mode 100644 doc/masternode-budget.md

diff --git a/doc/masternode-budget.md b/doc/masternode-budget.md
new file mode 100644
index 000000000000..1551f0f9a077
--- /dev/null
+++ b/doc/masternode-budget.md
@@ -0,0 +1,120 @@
+Masternode Budget API
+=======================
+
+Dash now supports full decentralized budgets that are paid directly from the blockchain via superblocks once per month. 
+
+Budgets go through a series of stages before being paid:
+* prepare - create a special transaction that destroys coins in order to make a proposal
+* submit - propagate transaction to peers on network
+* voting - lobby for votes on your proposal
+* get enough votes - make it into the budget
+* finalization - at the end of each payment period, proposals are sorted then compiled into a finalized budget
+* finalized budget voting - masternodes that agree with the finalization will vote on that budget
+* payment - the winning finalized budget is paid
+
+
+1. Prepare collateral transaction
+
+mnbudget prepare proposal-name url payment_count block_start dash_address monthly_payment_dash [use_ix(true|false)]
+
+Example: mnbudget prepare cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 true
+Output : 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0 - This is the collateral hash, copy this output for the next step
+
+In this transaction we prepare collateral for "cool-project". This proposal will pay 1200 DASh, 12 times over the course of a year totalling 24000 DASH. 
+
+*Warning -- if you change any fields within this command, the collateral transaction will become invalid. 
+
+2. Submit proposal to network
+
+mnbudget submit cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0
+
+Output : a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491 - This is your proposal hash, which other nodes will use to vote on it
+
+3. Lobby for votes
+
+Double check your information: mnbudget getinfo cool-project
+￼
+{
+    "Name" : "cool-project",
+    "Hash" : "a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491",
+    "FeeHash" : "464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0",
+    "URL" : "http://www.cool-project/one.json",
+    "BlockStart" : 100000,
+    "BlockEnd" : 100625,
+    "TotalPaymentCount" : 12,
+    "RemainingPaymentCount" : 12,
+    "PaymentAddress" : "y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7",
+    "Ratio" : 0.00000000,
+    "Yeas" : 0,
+    "Nays" : 0,
+    "Abstains" : 0,
+    "TotalPayment" : 14400.00000000,
+    "MonthlyPayment" : 1200.00000000,
+    "IsValid" : true,
+    "fValid" : true
+}
+
+If everything looks correct, you can ask for votes from other masternodes. To vote on a proposal, load a wallet with masternode.conf. You do not need to access your cold wallet to vote for proposals. 
+
+* mnbudget vote a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491 yes
+
+4.  Make it inte the budget
+
+After you get enough votes, execute "mnbudget projection" to see if you made it into the budget. Projection will show you, if you the budget was finalized at this moment which proposals would be in it. 
+
+mnbudget projection:￼
+{
+    "cool-project" : {
+	    "Hash" : "a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491",
+	    "FeeHash" : "464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0",
+	    "URL" : "http://www.cool-project/one.json",
+	    "BlockStart" : 100000,
+	    "BlockEnd" : 100625,
+	    "TotalPaymentCount" : 12,
+	    "RemainingPaymentCount" : 12,
+	    "PaymentAddress" : "y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7",
+	    "Ratio" : 1.00000000,
+	    "Yeas" : 33,
+	    "Nays" : 0,
+	    "Abstains" : 0,
+	    "TotalPayment" : 14400.00000000,
+	    "MonthlyPayment" : 1200.00000000,
+	    "IsValid" : true,
+	    "fValid" : true
+	}
+}
+
+5. Finalized budget
+
+"main" : {
+        "FeeTX" : "d6b8de9a4cadfe148f91e8fe8eed407199f96639b482f956ae6f539b8339f87c",
+        "Hash" : "6e8bbaba5113de592f6888f200f146448440b7e606fcf62ef84e60e1d5ac7d64",
+        "BlockStart" : 100000,
+        "BlockEnd" : 100000,
+        "Proposals" : "cool-project",
+        "VoteCount" : 46,
+        "Status" : "OK"
+    },
+
+6. Get paid
+
+When block 1000000 is reached you'll receive a payment for 1200 DASH. 
+
+The following new RPC commands are supported:
+* mnbudget "command"... ( "passphrase" )
+*  prepare            - Prepare proposal for network by signing and creating tx
+*  submit             - Submit proposal for network
+*  vote-many          - Vote on a Dash initiative
+*  vote-alias         - Vote on a Dash initiative
+*  vote               - Vote on a Dash initiative/budget
+*  getvotes           - Show current masternode budgets
+*  getinfo            - Show current masternode budgets
+*  show               - Show all budgets
+*  projection         - Show the projection of which proposals will be paid the next cycle
+*  check              - Scan proposals and remove invalid
+￼
+* mnfinalbudget "command"... ( "passphrase" )
+*  vote-many   - Vote on a finalized budget
+*  vote        - Vote on a finalized budget
+*  show        - Show existing finalized budgets
+
diff --git a/doc/release-notes/dash/release-notes-0.12.0.md b/doc/release-notes/dash/release-notes-0.12.0.md
index f6c050f73e0e..8800ba307ee6 100644
--- a/doc/release-notes/dash/release-notes-0.12.0.md
+++ b/doc/release-notes/dash/release-notes-0.12.0.md
@@ -21,6 +21,10 @@ shut down (which might take a few minutes for older versions), then run the
 installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or
 dashd/dash-qt (on Linux).
 
+** This new version uses transaction indexing by default, you will need to reindex 
+the blockchain. To do so, start the client with --reindex. **
+
+
 Downgrade warning
 ------------------
 
@@ -50,12 +54,48 @@ This does not affect wallet forward or backward compatibility.
 
 Switched to Bitcoin Core version 0.10
 https://bitcoin.org/en/release/v0.10.0
+Implemented decentralized budget system
+Removed reference node
+Implemented new decentralized masternode payment consensus system
+Improved speed of DS
+New masternode payment/winners/budgets syncing strategy
+Platform indepentant masternode ranking system
+Masternode broadcasts, pings and winners now use the inventory system
+
 
 Credits
 --------
 
 Thanks to who contributed to this release, at least:
 
-- *to do ..*
+eduffield
+UdjinM6
+Crowning
+moli
+flare
+thelazier
+adios
+poiuty 
+scratchy 
+moocowmoo
+the-baker
+BrainShutdown
+Lukas_Jackson
+Sub-Ether
+italx
+yidakee
+TanteStefana
+coingun
+tungfa
+MangledBlue
+AjM
+Lariondos
+elbereth
+minersday
+qwizzie
+TaoOfSatoshi
+dark-sailor
+AlexMomo
+snogcel
 
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/dash/).

From 9689e5c0774ee970100dbb17b65c53b597becdd3 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 10:28:10 -0700
Subject: [PATCH 1688/1819] improve errors for missing finbudgets/props

---
 src/masternode-budget.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 689f44421928..3ae36b60ef40 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1007,6 +1007,7 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string
             }
         }
 
+        strError = "Proposal not found!";
         return false;
     }
 
@@ -1033,6 +1034,8 @@ bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pf
             }
 
         }
+
+        strError = "Finalized Budget not found!";
         return false;
     }
 

From cddbda994f678fc76fe8624768b0c02c0f6c9c62 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 12:34:02 -0700
Subject: [PATCH 1689/1819] Fixed DarkSend dstx propagation issues

---
 src/darksend.cpp |  5 ++---
 src/main.cpp     | 46 +++++++++++++++++++++++++++++-----------------
 src/protocol.cpp |  3 ++-
 src/protocol.h   |  3 ++-
 4 files changed, 35 insertions(+), 22 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 13c62747352a..3b1f70c5f354 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -709,9 +709,8 @@ void CDarksendPool::CheckFinalTransaction()
                 mapDarksendBroadcastTxes.insert(make_pair(txNew.GetHash(), dstx));
             }
 
-            // Broadcast the transaction to the network
-            txNew.fTimeReceivedIsTxTime = true;
-            txNew.RelayWalletTransaction();
+            CInv inv(MSG_DSTX, txNew.GetHash());
+            RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
 
             // Tell the clients it was successful
             RelayCompletedTransaction(sessionID, false, MSG_SUCCESS);
diff --git a/src/main.cpp b/src/main.cpp
index 477cea43436b..2c73fd4c2b26 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3976,6 +3976,8 @@ bool static AlreadyHave(const CInv& inv)
             return txInMap || mapOrphanTransactions.count(inv.hash) ||
                 pcoinsTip->HaveCoins(inv.hash);
         }
+    case MSG_DSTX:
+        return mapDarksendBroadcastTxes.count(inv.hash);
     case MSG_BLOCK:
         return mapBlockIndex.count(inv.hash);
     case MSG_TXLOCK_REQUEST:
@@ -4124,26 +4126,13 @@ void static ProcessGetData(CNode* pfrom)
 
                 if (!pushed && inv.type == MSG_TX) {
 
-                    if(mapDarksendBroadcastTxes.count(inv.hash)){
+                    CTransaction tx;
+                    if (mempool.lookup(inv.hash, tx)) {
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
                         ss.reserve(1000);
-                        ss <<
-                            mapDarksendBroadcastTxes[inv.hash].tx <<
-                            mapDarksendBroadcastTxes[inv.hash].vin <<
-                            mapDarksendBroadcastTxes[inv.hash].vchSig <<
-                            mapDarksendBroadcastTxes[inv.hash].sigTime;
-
-                        pfrom->PushMessage("dstx", ss);
+                        ss << tx;
+                        pfrom->PushMessage("tx", ss);
                         pushed = true;
-                    } else {
-                        CTransaction tx;
-                        if (mempool.lookup(inv.hash, tx)) {
-                            CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
-                            ss.reserve(1000);
-                            ss << tx;
-                            pfrom->PushMessage("tx", ss);
-                            pushed = true;
-                        }
                     }
                 }
                 if (!pushed && inv.type == MSG_TXLOCK_VOTE) {
@@ -4242,6 +4231,22 @@ void static ProcessGetData(CNode* pfrom)
                     }
                 }
 
+                if (!pushed && inv.type == MSG_DSTX) {       
+                    if(mapDarksendBroadcastTxes.count(inv.hash)){
+                        CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+                        ss.reserve(1000);
+                        ss <<
+                            mapDarksendBroadcastTxes[inv.hash].tx <<
+                            mapDarksendBroadcastTxes[inv.hash].vin <<
+                            mapDarksendBroadcastTxes[inv.hash].vchSig <<
+                            mapDarksendBroadcastTxes[inv.hash].sigTime;
+
+                        pfrom->PushMessage("dstx", ss);
+                        pushed = true;
+                    }
+                }
+
+
                 if (!pushed) {
                     vNotFound.push_back(inv);
                 }
@@ -4789,8 +4794,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             // Always relay transactions received from whitelisted peers, even
             // if they are already in the mempool (allowing the node to function
             // as a gateway for nodes hidden behind it).
+
             RelayTransaction(tx);
         }
+
+        if(strCommand == "dstx"){
+            CInv inv(MSG_DSTX, tx.GetHash());
+            RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
+        }
+
         int nDoS = 0;
         if (state.IsInvalid(nDoS))
         {
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 2ca8ef06bb72..db6b750d68ed 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -30,7 +30,8 @@ static const char* ppszTypeName[] =
     "mn budget finalized vote",
     "mn quorum",
     "mn announce",
-    "mn ping"
+    "mn ping",
+    "dstx"
 };
 
 CMessageHeader::CMessageHeader()
diff --git a/src/protocol.h b/src/protocol.h
index 5d20cdc32072..26a2748ea74b 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -158,7 +158,8 @@ enum {
     MSG_BUDGET_FINALIZED_VOTE,
     MSG_MASTERNODE_QUORUM,
     MSG_MASTERNODE_ANNOUNCE,
-    MSG_MASTERNODE_PING
+    MSG_MASTERNODE_PING,
+    MSG_DSTX
 };
 
 #endif // BITCOIN_PROTOCOL_H

From bf18699adea3be0fe83a82fb59f845e55964330a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 12:35:17 -0700
Subject: [PATCH 1690/1819] client bump /proto bump

---
 configure.ac        |  2 +-
 src/clientversion.h |  2 +-
 src/instantx.h      |  2 +-
 src/version.h       | 10 +++++-----
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 80fdf7c15aac..9a99b2c59c41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 30)
+define(_CLIENT_VERSION_BUILD, 31)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 68ade089fc69..f17f711005e0 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 30
+#define CLIENT_VERSION_BUILD 31
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index 03a1c94b3140..81dcb3a5b1a1 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -31,7 +31,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70098;
+static const int MIN_INSTANTX_PROTO_VERSION = 70099;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index 224138efe7a7..a75c54fcd1ba 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70098;
+static const int PROTOCOL_VERSION = 70099;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70098;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70099;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70098;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70099;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70098;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70099;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70098;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70099;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From b540068f9437cef26d68cf6a3babf11c7842c113 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 15:44:51 -0700
Subject: [PATCH 1691/1819] enable mnw lock

---
 src/masternode-payments.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 48a4d9276be3..c96f155a3b40 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -354,7 +354,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
     }
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
         // disabled due to locking issues
-        //LOCK(cs_masternodepayments);
+        LOCK(cs_masternodepayments);
 
         //this is required in litemodef
         CMasternodePaymentWinner winner;

From b6222a9ae9a05d912fe7fce8ae8f0c68ff87b83c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 27 Jul 2015 17:33:57 -0700
Subject: [PATCH 1692/1819] change req sigs to 6 of 10

---
 src/instantx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/instantx.h b/src/instantx.h
index 81dcb3a5b1a1..0490e025232b 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -21,7 +21,7 @@
     ### getting 5 of 10 signatures w/ 1000 nodes of 2900
     (1000/2900.0)**5 = 0.004875397277841433
 */
-#define INSTANTX_SIGNATURES_REQUIRED           5
+#define INSTANTX_SIGNATURES_REQUIRED           6
 #define INSTANTX_SIGNATURES_TOTAL              10
 
 using namespace std;

From 781db99ee9829e835830c011bcdbbc157bfa6834 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 01:28:08 -0700
Subject: [PATCH 1693/1819] Changed hard fork date to Aug 30

---
 src/main.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 2c73fd4c2b26..f391eb5d3ae0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1559,10 +1559,10 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees)
 
     /*
         
-        Hard fork will activate on block 320436, reducing the block reward by 10 extra percent (allowing budget super-blocks)
+        Hard fork will activate on block 328008, reducing the block reward by 10 extra percent (allowing budget super-blocks)
     
     */
-    if(nHeight > 308340+(576*21)) nSubsidy -= nSubsidy/10; // 320436 - 10.0% - August 24, 2015
+    if(nHeight > 309759+(553*33)) nSubsidy -= nSubsidy/10; // 328008 - 10.0% - August 30, 2015
     
     return nSubsidy + nFees;
 }

From d72d3d022dae7cd05029d69f7167c12db9a16b98 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 06:40:48 -0700
Subject: [PATCH 1694/1819] Various Fixes - Testnet budget adjustments to allow
 quick cycles that create no inflation in the testnet environment - Budget
 proposal are sorted by YesCount-NoCount now - Added nTime to proposals - Only
 allow proposals more than 1 day old into budgets

---
 src/main.cpp              |  7 ++++++-
 src/masternode-budget.cpp | 20 ++++++++++++++++----
 src/masternode-budget.h   | 11 +++++++++++
 3 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index f391eb5d3ae0..cf530cbedf27 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1562,7 +1562,12 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees)
         Hard fork will activate on block 328008, reducing the block reward by 10 extra percent (allowing budget super-blocks)
     
     */
-    if(nHeight > 309759+(553*33)) nSubsidy -= nSubsidy/10; // 328008 - 10.0% - August 30, 2015
+
+    if(Params().NetworkID() == CBaseChainParams::TESTNET){
+        if(nHeight > 91758) nSubsidy -= nSubsidy/10;
+    } else {
+        if(nHeight > 309759+(553*33)) nSubsidy -= nSubsidy/10; // 328008 - 10.0% - August 30, 2015
+    }
     
     return nSubsidy + nFees;
 }
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 3ae36b60ef40..6957fb885c91 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -609,7 +609,7 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
     while(it != mapProposals.end()){
         (*it).second.CleanAndRemove(false);
-        vBudgetPorposalsSort.push_back(make_pair(&((*it).second), (*it).second.GetYeas()));
+        vBudgetPorposalsSort.push_back(make_pair(&((*it).second), (*it).second.GetYeas()-(*it).second.GetNays()));
         ++it;
     }
 
@@ -636,7 +636,8 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
         //prop start/end should be inside this period
         if(pbudgetProposal->fValid && pbudgetProposal->nBlockStart <= nBlockStart &&
                 pbudgetProposal->nBlockEnd >= nBlockEnd &&
-                pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10)
+                pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10 && 
+                pbudgetProposal->IsEstablished())
         {
             if(nTotalBudget == nBudgetAllocated){
                 pbudgetProposal->SetAllotted(0);
@@ -733,7 +734,11 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
         for(int i = 210240; i <= nHeight; i += 210240) nSubsidy -= nSubsidy/14;
     }
 
-    return ((nSubsidy/100)*10)*576*30;
+    // Amount of blocks in a months period of time (using 2.6 minutes per) = (60*24*30)/2.6
+    if(Params().NetworkID() == CBaseChainParams::MAIN) return ((nSubsidy/100)*10)*576*30;
+
+    //for testing purposes
+    return ((nSubsidy/100)*10)*50;
 }
 
 void CBudgetManager::NewBlock()
@@ -1060,7 +1065,7 @@ CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strU
     nBlockEnd = nBlockEndIn;
     address = addressIn;
     nAmount = nAmountIn;
-    nTime = 0;
+    nTime = GetAdjustedTime();
     nFeeTXHash = nFeeTXHashIn;
     fValid = true;
 }
@@ -1102,6 +1107,13 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
         }
     }
 
+    if(masternodeSync.IsSynced()) {
+        if(nTime < GetTime() - (60*60) || nTime < GetTime() - (60*60)) {
+            strError = "Time is out of acceptable range.";
+            return false;
+        }
+    }
+
     /*
         TODO: There might be an issue with multisig in the coinbase on mainnet, we will add support for it in a future release.
     */
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 79665bb499be..db60c1605309 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -378,6 +378,14 @@ class CBudgetProposal
 
     bool IsValid(std::string& strError, bool fCheckCollateral=true);
 
+    bool IsEstablished() {
+        //Proposals must be at least a day old to make it into a budget
+        if(Params().NetworkID() == CBaseChainParams::MAIN) return (nTime < GetTime() - (60*60*24));
+
+        //for testing purposes - 4 hours
+        return (nTime < GetTime() - (60*60*4));
+    }
+
     std::string GetName() {return strProposalName; }
     std::string GetURL() {return strURL; }
     int GetBlockStart() {return nBlockStart;}
@@ -403,6 +411,7 @@ class CBudgetProposal
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strProposalName;
         ss << strURL;
+        ss << nTime;
         ss << nBlockStart;
         ss << nBlockEnd;
         ss << nAmount;
@@ -419,6 +428,7 @@ class CBudgetProposal
         //for syncing with other clients
         READWRITE(LIMITED_STRING(strProposalName, 20));
         READWRITE(LIMITED_STRING(strURL, 64));
+        READWRITE(nTime);
         READWRITE(nBlockStart);
         READWRITE(nBlockEnd);
         READWRITE(nAmount);
@@ -452,6 +462,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 
         READWRITE(LIMITED_STRING(strProposalName, 20));
         READWRITE(LIMITED_STRING(strURL, 64));
+        READWRITE(nTime);
         READWRITE(nBlockStart);
         READWRITE(nBlockEnd);
         READWRITE(nAmount);

From 8be929d8704014bd5acc12b6e2e3f0e31cfd6c80 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 06:43:39 -0700
Subject: [PATCH 1695/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9a99b2c59c41..d9fd1ee617f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 31)
+define(_CLIENT_VERSION_BUILD, 32)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index f17f711005e0..3f848a5fc208 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 31
+#define CLIENT_VERSION_BUILD 32
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 69b02b55196eb8813937f25fc097fc7a434f0291 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 07:52:12 -0700
Subject: [PATCH 1696/1819] Fixed documentation

---
 doc/masternode-budget.md | 2 +-
 src/masternode-budget.h  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/masternode-budget.md b/doc/masternode-budget.md
index 1551f0f9a077..b4cf1261d91c 100644
--- a/doc/masternode-budget.md
+++ b/doc/masternode-budget.md
@@ -60,7 +60,7 @@ If everything looks correct, you can ask for votes from other masternodes. To vo
 
 4.  Make it inte the budget
 
-After you get enough votes, execute "mnbudget projection" to see if you made it into the budget. Projection will show you, if you the budget was finalized at this moment which proposals would be in it. 
+After you get enough votes, execute "mnbudget projection" to see if you made it into the budget. If you the budget was finalized at this moment which proposals would be in it. Note: Proposals must be active at least 1 day on the network and receive 10% of the masternode network in yes votes in order to qualify (E.g. if there is 2500 masternodes, you will need 250 yes votes.)
 
 mnbudget projection:￼
 {
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index db60c1605309..96fbac20c5a6 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -383,7 +383,7 @@ class CBudgetProposal
         if(Params().NetworkID() == CBaseChainParams::MAIN) return (nTime < GetTime() - (60*60*24));
 
         //for testing purposes - 4 hours
-        return (nTime < GetTime() - (60*60*4));
+        return (nTime < GetTime() - (60*20));
     }
 
     std::string GetName() {return strProposalName; }

From ffaedc18299463bc61b6f0cf126458b8ef3c9026 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 08:55:11 -0700
Subject: [PATCH 1697/1819] Fixed proposal nTime calculation and usage

---
 src/masternode-budget.cpp    | 16 ++++++++--------
 src/masternode-budget.h      |  4 ++--
 src/rpcclient.cpp            |  1 +
 src/rpcmasternode-budget.cpp | 25 ++++++++++++++++++++-----
 4 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 6957fb885c91..0aaccaa4df58 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -57,7 +57,7 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
 
     }
     if(!foundOpReturn){
-        strError = strprintf("Couldn't find opReturn %s", txCollateral.ToString());
+        strError = strprintf("Couldn't find opReturn %s in %s", nExpectedHash.ToString(), txCollateral.ToString());
         LogPrintf ("CBudgetProposalBroadcast::IsBudgetCollateralValid - %s\n", strError);
         return false;
     }
@@ -811,9 +811,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
-        //set time we first saw this prop
-        budgetProposalBroadcast.nTime = GetAdjustedTime();
-
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
         std::string strError = "";
@@ -1057,7 +1054,7 @@ CBudgetProposal::CBudgetProposal()
     fValid = true;
 }
 
-CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn)
+CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn, int64_t nTimeIn)
 {
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
@@ -1065,7 +1062,7 @@ CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strU
     nBlockEnd = nBlockEndIn;
     address = addressIn;
     nAmount = nAmountIn;
-    nTime = GetAdjustedTime();
+    nTime = nTimeIn;
     nFeeTXHash = nFeeTXHashIn;
     fValid = true;
 }
@@ -1108,7 +1105,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     }
 
     if(masternodeSync.IsSynced()) {
-        if(nTime < GetTime() - (60*60) || nTime < GetTime() - (60*60)) {
+        if(nTime < GetTime() - (60*60*2) || nTime < GetTime() - (60*60)) {
             strError = "Time is out of acceptable range.";
             return false;
         }
@@ -1312,9 +1309,10 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
     address = other.address;
     nAmount = other.nAmount;
     nFeeTXHash = other.nFeeTXHash;
+    nTime = other.nTime;
 }
 
-CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn)
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn, int64_t nTimeIn)
 {
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
@@ -1329,6 +1327,8 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn
     nAmount = nAmountIn;
 
     nFeeTXHash = nFeeTXHashIn;
+
+    nTime = nTimeIn;
 }
 
 void CBudgetProposalBroadcast::Relay()
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 96fbac20c5a6..ba622f8c794e 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -369,7 +369,7 @@ class CBudgetProposal
 
     CBudgetProposal();
     CBudgetProposal(const CBudgetProposal& other);
-    CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
+    CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn, int64_t nTimeIn);
 
     void Calculate();
     bool AddOrUpdateVote(CBudgetVote& vote, std::string& strError);
@@ -450,7 +450,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 public:
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
-    CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn);
+    CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn, int64_t nTimeIn);
 
     void Relay();
 
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index fb5e83ee51b9..2e056b2e0e8c 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -95,6 +95,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "mnbudget", 3 },
     { "mnbudget", 4 },
     { "mnbudget", 6 },
+    { "mnbudget", 8 },
 };
 
 class CRPCConvertTable
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 4a12be25af2d..9db8a43d359f 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -91,7 +91,8 @@ Value mnbudget(const Array& params, bool fHelp)
 
         //*************************************************************************
 
-        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
+        // create transaction 15 minutes into the future, to allow for confirmation time
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0, GetAdjustedTime()+(60*15));
 
         std::string strError = "";
         if(!budgetProposalBroadcast.IsValid(strError, false))
@@ -112,8 +113,12 @@ Value mnbudget(const Array& params, bool fHelp)
         //send the tx to the network
         pwalletMain->CommitTransaction(wtx, reservekey, useIX ? "ix" : "tx");
 
-        return wtx.GetHash().ToString();
 
+        Object returnObj;
+        returnObj.push_back(Pair("fee_tx", wtx.GetHash().ToString()));
+        returnObj.push_back(Pair("time", (int64_t)budgetProposalBroadcast.nTime));
+
+        return returnObj;
     }
 
     if(strCommand == "submit")
@@ -124,8 +129,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 8)
-            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address monthly_payment_dash fee_tx'");
+        if (params.size() != 9)
+            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address monthly_payment_dash fee_tx nTime'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -167,9 +172,13 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
         CAmount nAmount = AmountFromValue(params[6]);
         uint256 hash = ParseHashV(params[7], "parameter 1");
+        int64_t nTime = params[8].get_int();
+
+        if(nTime < GetTime() - (60*60*2) || nTime > GetTime() + (60*60))
+            return "nTime is out of range, you must submit the proposal within 2 hours of creating the original colateral transaction";
 
         //create the proposal incase we're the first to make it
-        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash, nTime);
 
         std::string strError = "";
         if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError)){
@@ -341,6 +350,7 @@ Value mnbudget(const Array& params, bool fHelp)
 
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+            bObj.push_back(Pair("IsValidReason",  strError.c_str()));
             bObj.push_back(Pair("fValid",  pbudgetProposal->fValid));
 
             resultObj.push_back(Pair(pbudgetProposal->GetName(), bObj));
@@ -385,8 +395,11 @@ Value mnbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("TotalPayment",  ValueFromAmount(pbudgetProposal->GetAmount()*pbudgetProposal->GetTotalPaymentCount())));
             bObj.push_back(Pair("MonthlyPayment",  ValueFromAmount(pbudgetProposal->GetAmount())));
 
+            bObj.push_back(Pair("IsEstablished",  pbudgetProposal->IsEstablished()));
+
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
+            bObj.push_back(Pair("IsValidReason",  strError.c_str()));
             bObj.push_back(Pair("fValid",  pbudgetProposal->fValid));
 
             resultObj.push_back(Pair(pbudgetProposal->GetName(), bObj));
@@ -427,6 +440,8 @@ Value mnbudget(const Array& params, bool fHelp)
         obj.push_back(Pair("TotalPayment",  ValueFromAmount(pbudgetProposal->GetAmount()*pbudgetProposal->GetTotalPaymentCount())));
         obj.push_back(Pair("MonthlyPayment",  ValueFromAmount(pbudgetProposal->GetAmount())));
         
+        obj.push_back(Pair("IsEstablished",  pbudgetProposal->IsEstablished()));
+
         std::string strError = "";
         obj.push_back(Pair("IsValid",  pbudgetProposal->IsValid(strError)));
         obj.push_back(Pair("fValid",  pbudgetProposal->fValid));

From a069a5df5ea0ab0522ae14b47a17dfe1fefde729 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 13:07:40 -0700
Subject: [PATCH 1698/1819] Update isBlockchainSynced requirements

---
 src/masternode-sync.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index ad9619a8064c..57cb2f8de15d 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -33,7 +33,7 @@ bool CMasternodeSync::IsBlockchainSynced()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return false;
 
-    if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return false;
+    if(pindexPrev->nTime + 600 < GetTime()) return false;
     return true;
 }
 
@@ -154,7 +154,7 @@ void CMasternodeSync::Process()
         if(IsInitialBlockDownload()) return;
 
         //don't begin syncing until we're almost at a recent block
-        if(pindexPrev->nHeight + 4 < pindexBestHeader->nHeight || pindexPrev->nTime + 600 < GetTime()) return;
+        if(pindexPrev->nTime + 600 < GetTime()) return;
 
         if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
 

From 8acfd777502d313aadd39935603d37ab2226c932 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 13:14:32 -0700
Subject: [PATCH 1699/1819] Fixed HaveBudget, allow failure after 3 tries

---
 src/masternode-budget.cpp | 4 +++-
 src/masternode-sync.cpp   | 3 ++-
 src/masternode-sync.h     | 1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 0aaccaa4df58..8af4ffeefa36 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -516,10 +516,12 @@ bool CBudgetManager::HasNextFinalizedBudget()
     if(!pindexPrev) return false;
 
     int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
-    if(nBlockStart - pindexPrev->nHeight > 576*2) return false; //we wouldn't have the budget yet
+    if(nBlockStart - pindexPrev->nHeight > 576*2) return true; //we wouldn't have the budget yet
 
     if(budget.IsBudgetPaymentBlock(nBlockStart)) return true;
 
+    LogPrintf("CBudgetManager::HasNextFinalizedBudget() - Client is missing budget\n");
+
     return false;
 }
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 57cb2f8de15d..71c162f96918 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -199,13 +199,14 @@ void CMasternodeSync::Process()
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3 && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    if(budget.HasNextFinalizedBudget()) {
+                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2) {
                         GetNextAsset();
                     } else { //we've failed to sync, this state will reject the next budget block
                         LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
                         RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
                         RequestedMasternodeAttempt = 0;
                         lastFailure = GetTime();
+                        nCountFailures++;
                     }
                     return;
                 }
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index d90eb8a51f4a..abfa50a9e372 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -29,6 +29,7 @@ class CMasternodeSync
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
     int64_t lastFailure;
+    int64_t nCountFailures;
 
     // Count peers we've requested the list from
     int RequestedMasternodeAssets;

From 08de7c3bc4d9c6d6c22af0574228484adebeb9bf Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 20:26:08 -0700
Subject: [PATCH 1700/1819] try activation immediately after sync

---
 src/masternode-sync.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 71c162f96918..178e7a377137 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -3,6 +3,7 @@
 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "main.h"
+#include "activemasternode.h"
 #include "masternode-sync.h"
 #include "masternode-payments.h"
 #include "masternode-budget.h"
@@ -201,6 +202,9 @@ void CMasternodeSync::Process()
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3 && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
                     if(budget.HasNextFinalizedBudget() || nCountFailures >= 2) {
                         GetNextAsset();
+
+                        //try to activate our masternode if possible
+                        activeMasternode.ManageStatus();
                     } else { //we've failed to sync, this state will reject the next budget block
                         LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
                         RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;

From dc829e9d2c8c50590ae94ec5b24938ed93f16e8d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 28 Jul 2015 21:16:11 -0700
Subject: [PATCH 1701/1819] added syncing counts

---
 src/main.cpp                |  1 +
 src/masternode-budget.cpp   |  5 ++++
 src/masternode-payments.cpp |  1 +
 src/masternode-sync.cpp     | 56 +++++++++++++++++++++++++++++++++++--
 src/masternode-sync.h       | 16 ++++++++++-
 src/masternodeman.cpp       |  3 ++
 6 files changed, 79 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index cf530cbedf27..ccd5885e4087 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -5131,6 +5131,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         masternodePayments.ProcessMessageMasternodePayments(pfrom, strCommand, vRecv);
         ProcessMessageInstantX(pfrom, strCommand, vRecv);
         ProcessSpork(pfrom, strCommand, vRecv);
+        masternodeSync.ProcessMessage(pfrom, strCommand, vRecv);
     }
 
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 8af4ffeefa36..ec7470912df4 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -969,6 +969,10 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         ++it1;
     }
 
+    pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_PROP, (int)vInv.size());
+    if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
+    vInv.clear();
+
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
     while(it3 != mapSeenFinalizedBudgets.end()){
         CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
@@ -989,6 +993,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
         ++it3;
     }
 
+    pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_FIN, (int)vInv.size());
     if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index c96f155a3b40..7be2f2b48ff5 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -768,6 +768,7 @@ void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
         }
         ++it;
     }
+    node->PushMessage("ssc", MASTERNODE_SYNC_MNW, (int)vInv.size());
     if(vInv.size() > 0) node->PushMessage("inv", vInv);
 }
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 178e7a377137..f167e40449e7 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -20,6 +20,16 @@ CMasternodeSync::CMasternodeSync()
     lastMasternodeList = 0;
     lastMasternodeWinner = 0;
     lastBudgetItem = 0;
+    lastFailure = 0;
+    nCountFailures = 0;
+    sumMasternodeList = 0;
+    sumMasternodeWinner = 0;
+    sumBudgetItemProp = 0;
+    sumBudgetItemFin = 0;
+    countMasternodeList = 0;
+    countMasternodeWinner = 0;
+    countBudgetItemProp = 0;
+    countBudgetItemFin = 0;
     RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
     RequestedMasternodeAttempt = 0;
 }
@@ -81,6 +91,47 @@ void CMasternodeSync::GetNextAsset()
     RequestedMasternodeAttempt = 0;
 }
 
+
+void CMasternodeSync::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
+{
+    if (strCommand == "ssc") { //Sync status count
+        int nItemID;
+        int nCount;
+        vRecv >> nItemID >> nCount;
+
+        if(RequestedMasternodeAssets >= MASTERNODE_SYNC_FINISHED) return;
+
+        if(RequestedMasternodeAssets == nItemID){
+            //this means we will receive no further communication
+            switch(RequestedMasternodeAssets)
+            {
+                case(MASTERNODE_SYNC_LIST):
+                    if(nCount == 0) lastMasternodeList = GetTime();
+                    sumMasternodeList += nCount;
+                    countMasternodeList++;
+                    break;
+                case(MASTERNODE_SYNC_MNW):
+                    if(nCount == 0) lastMasternodeWinner = GetTime();
+                    sumMasternodeWinner += nCount;
+                    countMasternodeWinner++;
+                    break;
+                case(MASTERNODE_SYNC_BUDGET_PROP):
+                    if(nCount == 0) lastBudgetItem = GetTime();
+                    sumBudgetItemProp += nCount;
+                    countBudgetItemProp++;
+                    break;
+                case(MASTERNODE_SYNC_BUDGET_FIN):
+                    if(nCount == 0) lastBudgetItem = GetTime();
+                    sumBudgetItemFin += nCount;
+                    countBudgetItemFin++;
+                    break;
+            }
+        }
+        
+        LogPrintf("ssc - got inventory count %d %d\n", nItemID, nCount);
+    }
+}
+
 void CMasternodeSync::Process()
 {
     static int tick = 0;
@@ -199,8 +250,9 @@ void CMasternodeSync::Process()
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
-                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT*3 && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2) {
+                if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
+                    if((budget.HasNextFinalizedBudget() || (sumBudgetItemFin==0 && countBudgetItemFin>0))  || 
+                        nCountFailures >= 2 || (sumBudgetItemProp==0 && countBudgetItemProp>0)) {
                         GetNextAsset();
 
                         //try to activate our masternode if possible
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index abfa50a9e372..5dc9f46bdb16 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -10,6 +10,8 @@
 #define MASTERNODE_SYNC_LIST              2
 #define MASTERNODE_SYNC_MNW               3
 #define MASTERNODE_SYNC_BUDGET            4
+#define MASTERNODE_SYNC_BUDGET_PROP       10
+#define MASTERNODE_SYNC_BUDGET_FIN        11
 #define MASTERNODE_SYNC_FAILED            998
 #define MASTERNODE_SYNC_FINISHED          999
 
@@ -29,7 +31,18 @@ class CMasternodeSync
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
     int64_t lastFailure;
-    int64_t nCountFailures;
+    int nCountFailures;
+
+    // sum of all counts
+    int sumMasternodeList;
+    int sumMasternodeWinner;
+    int sumBudgetItemProp;
+    int sumBudgetItemFin;
+    // peers that reported counts
+    int countMasternodeList;
+    int countMasternodeWinner;
+    int countBudgetItemProp;
+    int countBudgetItemFin;
 
     // Count peers we've requested the list from
     int RequestedMasternodeAssets;
@@ -42,6 +55,7 @@ class CMasternodeSync
     void AddedMasternodeWinner();
     void AddedBudgetItem();
     void GetNextAsset();
+    void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 
     void Process();
     bool IsSynced();
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index a61c868dc696..027dd73ae635 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -705,6 +705,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             }
         } //else, asking for a specific node which is ok
 
+
         std::vector<CInv> vInv;
         int i = 0;
         BOOST_FOREACH(CMasternode& mn, vMasternodes) {
@@ -724,6 +725,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                 i++;
             }
         }
+
+        if(vin == CTxIn()) pfrom->PushMessage("ssc", MASTERNODE_SYNC_LIST, (int)vInv.size());
         if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString().c_str());

From 0edb236801193b5c73a2ea17d17783d40f0f775c Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 01:06:30 -0700
Subject: [PATCH 1702/1819] Fixed item count functionality and sync with no
 budegt

---
 src/masternode-budget.cpp |  2 ++
 src/masternode-sync.cpp   | 70 ++++++++++++++++++++++++---------------
 src/masternode-sync.h     |  4 +--
 src/masternodeman.cpp     | 17 ++++++----
 4 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index ec7470912df4..216db2330cd1 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -515,6 +515,8 @@ bool CBudgetManager::HasNextFinalizedBudget()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return false;
 
+    if(masternodeSync.IsBudgetFinEmpty()) return true;
+
     int nBlockStart = pindexPrev->nHeight - pindexPrev->nHeight % GetBudgetPaymentCycleBlocks() + GetBudgetPaymentCycleBlocks();
     if(nBlockStart - pindexPrev->nHeight > 576*2) return true; //we wouldn't have the budget yet
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index f167e40449e7..63d2b23d558d 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -63,6 +63,11 @@ void CMasternodeSync::AddedBudgetItem()
     lastBudgetItem = GetTime();
 }
 
+bool CMasternodeSync::IsBudgetFinEmpty()
+{
+    return sumBudgetItemFin==0 && countBudgetItemFin>0;
+}
+
 void CMasternodeSync::GetNextAsset()
 {
     switch(RequestedMasternodeAssets)
@@ -72,6 +77,16 @@ void CMasternodeSync::GetNextAsset()
             lastMasternodeList = 0;
             lastMasternodeWinner = 0;
             lastBudgetItem = 0;
+            lastFailure = 0;
+            nCountFailures = 0;
+            sumMasternodeList = 0;
+            sumMasternodeWinner = 0;
+            sumBudgetItemProp = 0;
+            sumBudgetItemFin = 0;
+            countMasternodeList = 0;
+            countMasternodeWinner = 0;
+            countBudgetItemProp = 0;
+            countBudgetItemFin = 0;  
             RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
             break;
         case(MASTERNODE_SYNC_SPORKS):
@@ -101,31 +116,33 @@ void CMasternodeSync::ProcessMessage(CNode* pfrom, std::string& strCommand, CDat
 
         if(RequestedMasternodeAssets >= MASTERNODE_SYNC_FINISHED) return;
 
-        if(RequestedMasternodeAssets == nItemID){
-            //this means we will receive no further communication
-            switch(RequestedMasternodeAssets)
-            {
-                case(MASTERNODE_SYNC_LIST):
-                    if(nCount == 0) lastMasternodeList = GetTime();
-                    sumMasternodeList += nCount;
-                    countMasternodeList++;
-                    break;
-                case(MASTERNODE_SYNC_MNW):
-                    if(nCount == 0) lastMasternodeWinner = GetTime();
-                    sumMasternodeWinner += nCount;
-                    countMasternodeWinner++;
-                    break;
-                case(MASTERNODE_SYNC_BUDGET_PROP):
-                    if(nCount == 0) lastBudgetItem = GetTime();
-                    sumBudgetItemProp += nCount;
-                    countBudgetItemProp++;
-                    break;
-                case(MASTERNODE_SYNC_BUDGET_FIN):
-                    if(nCount == 0) lastBudgetItem = GetTime();
-                    sumBudgetItemFin += nCount;
-                    countBudgetItemFin++;
-                    break;
-            }
+        //this means we will receive no further communication
+        switch(nItemID)
+        {
+            case(MASTERNODE_SYNC_LIST):
+                if(nItemID != RequestedMasternodeAssets) return;
+                if(nCount == 0) lastMasternodeList = GetTime();
+                sumMasternodeList += nCount;
+                countMasternodeList++;
+                break;
+            case(MASTERNODE_SYNC_MNW):
+                if(nItemID != RequestedMasternodeAssets) return;
+                if(nCount == 0) lastMasternodeWinner = GetTime();
+                sumMasternodeWinner += nCount;
+                countMasternodeWinner++;
+                break;
+            case(MASTERNODE_SYNC_BUDGET_PROP):
+                if(RequestedMasternodeAssets != MASTERNODE_SYNC_BUDGET) return;
+                if(nCount == 0) lastBudgetItem = GetTime();
+                sumBudgetItemProp += nCount;
+                countBudgetItemProp++;
+                break;
+            case(MASTERNODE_SYNC_BUDGET_FIN):
+                if(RequestedMasternodeAssets != MASTERNODE_SYNC_BUDGET) return;
+                if(nCount == 0) lastBudgetItem = GetTime();
+                sumBudgetItemFin += nCount;
+                countBudgetItemFin++;
+                break;
         }
         
         LogPrintf("ssc - got inventory count %d %d\n", nItemID, nCount);
@@ -251,8 +268,7 @@ void CMasternodeSync::Process()
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    if((budget.HasNextFinalizedBudget() || (sumBudgetItemFin==0 && countBudgetItemFin>0))  || 
-                        nCountFailures >= 2 || (sumBudgetItemProp==0 && countBudgetItemProp>0)) {
+                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || (sumBudgetItemProp==0 && countBudgetItemProp>0)) {
                         GetNextAsset();
 
                         //try to activate our masternode if possible
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 5dc9f46bdb16..74e8d4cb12fb 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -48,7 +48,6 @@ class CMasternodeSync
     int RequestedMasternodeAssets;
     int RequestedMasternodeAttempt;
 
-
     CMasternodeSync();
 
     void AddedMasternodeList();
@@ -56,7 +55,8 @@ class CMasternodeSync
     void AddedBudgetItem();
     void GetNextAsset();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
-
+    bool IsBudgetFinEmpty();
+    
     void Process();
     bool IsSynced();
     bool IsBlockchainSynced();
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 027dd73ae635..96625838ab73 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -325,16 +325,19 @@ void CMasternodeMan::DsegUpdate(CNode* pnode)
 {
     LOCK(cs);
 
-    if(!(pnode->addr.IsRFC1918() || pnode->addr.IsLocal())){
-        std::map<CNetAddr, int64_t>::iterator it = mWeAskedForMasternodeList.find(pnode->addr);
-        if (it != mWeAskedForMasternodeList.end())
-        {
-            if (GetTime() < (*it).second) {
-                LogPrintf("dseg - we already asked %s for the list; skipping...\n", pnode->addr.ToString());
-                return;
+    if(Params().NetworkID() == CBaseChainParams::MAIN) {
+        if(!(pnode->addr.IsRFC1918() || pnode->addr.IsLocal())){
+            std::map<CNetAddr, int64_t>::iterator it = mWeAskedForMasternodeList.find(pnode->addr);
+            if (it != mWeAskedForMasternodeList.end())
+            {
+                if (GetTime() < (*it).second) {
+                    LogPrintf("dseg - we already asked %s for the list; skipping...\n", pnode->addr.ToString());
+                    return;
+                }
             }
         }
     }
+    
     pnode->PushMessage("dseg", CTxIn());
     int64_t askAgain = GetTime() + MASTERNODES_DSEG_SECONDS;
     mWeAskedForMasternodeList[pnode->addr] = askAgain;

From f82a0288698e3bf3eeb473c50c5727b5dc725cc1 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 01:08:15 -0700
Subject: [PATCH 1703/1819] Budget prop empty / version bump

---
 configure.ac            | 2 +-
 src/clientversion.h     | 2 +-
 src/masternode-sync.cpp | 7 ++++++-
 src/masternode-sync.h   | 3 ++-
 4 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index d9fd1ee617f0..ffe0eb913315 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 32)
+define(_CLIENT_VERSION_BUILD, 33)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 3f848a5fc208..7b3b66037f67 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 32
+#define CLIENT_VERSION_BUILD 33
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 63d2b23d558d..8d210e8251d1 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -63,6 +63,11 @@ void CMasternodeSync::AddedBudgetItem()
     lastBudgetItem = GetTime();
 }
 
+bool CMasternodeSync::IsBudgetPropEmpty()
+{
+    return sumBudgetItemProp==0 && countBudgetItemProp>0;
+}
+
 bool CMasternodeSync::IsBudgetFinEmpty()
 {
     return sumBudgetItemFin==0 && countBudgetItemFin>0;
@@ -268,7 +273,7 @@ void CMasternodeSync::Process()
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || (sumBudgetItemProp==0 && countBudgetItemProp>0)) {
+                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
                         GetNextAsset();
 
                         //try to activate our masternode if possible
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 74e8d4cb12fb..74da058f9b69 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -56,7 +56,8 @@ class CMasternodeSync
     void GetNextAsset();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     bool IsBudgetFinEmpty();
-    
+    bool IsBudgetPropEmpty();
+
     void Process();
     bool IsSynced();
     bool IsBlockchainSynced();

From fc33c3b963a17372a735680484fc52d1182383f7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 01:22:57 -0700
Subject: [PATCH 1704/1819] fixed GetBudget bug

---
 src/masternode-budget.cpp | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 216db2330cd1..10a9c29afd71 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -25,8 +25,8 @@ int nSubmittedFinalBudget;
 int GetBudgetPaymentCycleBlocks(){
     // Amount of blocks in a months period of time (using 2.6 minutes per) = (60*24*30)/2.6
     if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616;
-
     //for testing purposes
+
     return 50;
 }
 
@@ -123,7 +123,7 @@ void CBudgetManager::SubmitFinalBudget()
         CTxBudgetPayment txBudgetPayment;
         txBudgetPayment.nProposalHash = vBudgetProposals[i]->GetHash();
         txBudgetPayment.payee = vBudgetProposals[i]->GetPayee();
-        txBudgetPayment.nAmount = vBudgetProposals[i]->GetAmount();
+        txBudgetPayment.nAmount = vBudgetProposals[i]->GetAllotted();
         vecTxBudgetPayments.push_back(txBudgetPayment);
     }
 
@@ -643,17 +643,13 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
                 pbudgetProposal->GetYeas() - pbudgetProposal->GetNays() > mnodeman.CountEnabled(MIN_BUDGET_PEER_PROTO_VERSION)/10 && 
                 pbudgetProposal->IsEstablished())
         {
-            if(nTotalBudget == nBudgetAllocated){
-                pbudgetProposal->SetAllotted(0);
-            } else if(pbudgetProposal->GetAmount() + nBudgetAllocated <= nTotalBudget) {
+            if(pbudgetProposal->GetAmount() + nBudgetAllocated <= nTotalBudget) {
                 pbudgetProposal->SetAllotted(pbudgetProposal->GetAmount());
                 nBudgetAllocated += pbudgetProposal->GetAmount();
             } else {
-                //couldn't pay for the entire budget, so it'll be partially paid.
-                pbudgetProposal->SetAllotted(nTotalBudget - nBudgetAllocated);
-                nBudgetAllocated = nTotalBudget;
+                pbudgetProposal->SetAllotted(0);
             }
-
+            
             vBudgetProposalsRet.push_back(pbudgetProposal);
         }
 

From dfad32272cea4614c5a624c95dca32ce1cf6667d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 08:28:49 -0700
Subject: [PATCH 1705/1819] Refactored locking for masternode winners and
 budgets

---
 src/masternode-budget.cpp   | 36 ++++++++++++++++++++++---
 src/masternode-budget.h     | 13 +++++++--
 src/masternode-payments.cpp | 53 ++++++++++++++++++++-----------------
 src/masternode-payments.h   | 13 +++++++++
 4 files changed, 86 insertions(+), 29 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 10a9c29afd71..8b41972a52c0 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -85,6 +85,8 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
 
 void CBudgetManager::CheckOrphanVotes()
 {
+    LOCK(cs);
+
     std::string strError = "";
     std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
     while(it1 != mapOrphanMasternodeBudgetVotes.end()){
@@ -181,6 +183,7 @@ void CBudgetManager::SubmitFinalBudget()
         return;
     }
 
+    LOCK(cs);
     mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
     finalizedBudgetBroadcast.Relay();
     budget.AddFinalizedBudget(finalizedBudgetBroadcast);
@@ -198,6 +201,8 @@ CBudgetDB::CBudgetDB()
 
 bool CBudgetDB::Write(const CBudgetManager& objToSave)
 {
+    LOCK(objToSave.cs);
+
     int64_t nStart = GetTimeMillis();
 
     // serialize, checksum data up to that point, then append checksum
@@ -230,6 +235,7 @@ bool CBudgetDB::Write(const CBudgetManager& objToSave)
 
 CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad, bool fDryRun)
 {
+    LOCK(objToLoad.cs);
 
     int64_t nStart = GetTimeMillis();
     // open input file, and associate with CAutoFile
@@ -349,7 +355,6 @@ void DumpBudgets()
 
 bool CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 {
-    LOCK(cs);
     std::string strError = "";
     if(!finalizedBudget.IsValid(strError)) return false;
 
@@ -405,6 +410,8 @@ void CBudgetManager::CheckAndRemove()
 
 void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, CAmount nFees)
 {
+    LOCK(cs);
+
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
@@ -480,13 +487,18 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
 
 CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
 {
+    LOCK(cs);
+
     if(mapProposals.count(nHash))
         return &mapProposals[nHash];
 
     return NULL;
 }
 
-bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight){
+bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight)
+{
+    LOCK(cs);
+
     int nHighestCount = -1;
 
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
@@ -529,6 +541,8 @@ bool CBudgetManager::HasNextFinalizedBudget()
 
 bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
+    LOCK(cs);
+
     int nHighestCount = 0;
     std::vector<CFinalizedBudget*> ret;
 
@@ -576,6 +590,8 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
 
 std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
 {
+    LOCK(cs);
+
     std::vector<CBudgetProposal*> vBudgetProposalRet;
 
     std::map<uint256, CBudgetProposal>::iterator it = mapProposals.begin();
@@ -606,6 +622,8 @@ struct sortProposalsByVotes {
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
+    LOCK(cs);
+
     // ------- Sort budgets by Yes Count
 
     std::vector<std::pair<CBudgetProposal*, int> > vBudgetPorposalsSort;
@@ -667,6 +685,8 @@ struct sortFinalizedBudgetsByVotes {
 
 std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 {
+    LOCK(cs);
+
     std::vector<CFinalizedBudget*> vFinalizedBudgetsRet;
     std::vector<std::pair<CFinalizedBudget*, int> > vFinalizedBudgetsSort;
 
@@ -694,6 +714,8 @@ std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 
 std::string CBudgetManager::GetRequiredPaymentsString(int nBlockHeight)
 {
+    LOCK(cs);
+
     std::string ret = "unknown-budget";
 
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
@@ -743,6 +765,8 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
+    LOCK(cs);
+
     if (masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_BUDGET) return;
 
     if (strBudgetMode == "suggest") { //suggest the budget we see
@@ -935,6 +959,8 @@ bool CBudgetManager::PropExists(uint256 nHash)
 
 void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 {
+    LOCK(cs);
+
     /*
         Sync with a client on the network
 
@@ -1472,6 +1498,8 @@ bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string&
 //evaluate if we should vote for this. Masternode only
 void CFinalizedBudget::AutoCheck()
 {
+    LOCK(cs);
+
     if(!fMasterNode || fAutoChecked) return;
 
     //do this 1 in 20 blocks -- spread out the voting activity on mainnet
@@ -1538,7 +1566,9 @@ CAmount CFinalizedBudget::GetTotalPayout()
     return ret;
 }
 
-std::string CFinalizedBudget::GetProposals() {
+std::string CFinalizedBudget::GetProposals() 
+{
+    LOCK(cs);
     std::string ret = "";
 
     BOOST_FOREACH(CTxBudgetPayment& budgetPayment, vecBudgetPayments){
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index ba622f8c794e..d47b13f0ed79 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -17,6 +17,8 @@
 
 using namespace std;
 
+extern CCriticalSection cs_budget;
+
 class CBudgetManager;
 class CFinalizedBudgetBroadcast;
 class CFinalizedBudget;
@@ -73,13 +75,14 @@ class CBudgetDB
 class CBudgetManager
 {
 private:
-    // critical section to protect the inner data structures
-    mutable CCriticalSection cs;
 
     //hold txes until they mature enough to use
     map<uint256, CTransaction> mapCollateral;
 
 public:
+    // critical section to protect the inner data structures
+    mutable CCriticalSection cs;
+    
     // keep track of the scanning errors I've seen
     map<uint256, CBudgetProposal> mapProposals;
     map<uint256, CFinalizedBudget> mapFinalizedBudgets;
@@ -128,6 +131,8 @@ class CBudgetManager
 
     void CheckOrphanVotes();
     void Clear(){
+        LOCK(cs);
+
         LogPrintf("Budget object cleared\n");
         mapProposals.clear();
         mapFinalizedBudgets.clear();
@@ -221,6 +226,8 @@ class CFinalizedBudget
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
     {
+        LOCK(cs);
+
         int i = nBlockHeight - GetBlockStart();
         if(i < 0) return false;
         if(i > (int)vecBudgetPayments.size() - 1) return false;
@@ -229,6 +236,8 @@ class CFinalizedBudget
     }
     bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, CAmount& nAmount)
     {
+        LOCK(cs);
+
         int i = nBlockHeight - GetBlockStart();
         if(i < 0) return false;
         if(i > (int)vecBudgetPayments.size() - 1) return false;
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 7be2f2b48ff5..3452a4a1b678 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -14,11 +14,13 @@
 #include <boost/lexical_cast.hpp>
 #include <boost/filesystem.hpp>
 
-CCriticalSection cs_masternodepayments;
-
 /** Object for who's going to get paid on which blocks */
 CMasternodePayments masternodePayments;
 
+CCriticalSection cs_vecPayments;
+CCriticalSection cs_mapMasternodeBlocks;
+CCriticalSection cs_mapMasternodePayeeVotes;
+
 //
 // CMasternodePaymentDB
 //
@@ -353,9 +355,6 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         LogPrintf("mnget - Sent Masternode winners to %s\n", pfrom->addr.ToString().c_str());
     }
     else if (strCommand == "mnw") { //Masternode Payments Declare Winner
-        // disabled due to locking issues
-        LOCK(cs_masternodepayments);
-
         //this is required in litemodef
         CMasternodePaymentWinner winner;
         vRecv >> winner;
@@ -439,6 +438,8 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 // -- Only look ahead up to 8 blocks to allow for propagation of the latest 2 winners
 bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
+    LOCK(cs_mapMasternodeBlocks);
+
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev == NULL) return false;
 
@@ -467,15 +468,19 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
         return false;
     }
 
-    if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
-       return false;
-    }
+    {
+        LOCK2(cs_mapMasternodePayeeVotes, cs_mapMasternodeBlocks);
+    
+        if(mapMasternodePayeeVotes.count(winnerIn.GetHash())){
+           return false;
+        }
 
-    mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
+        mapMasternodePayeeVotes[winnerIn.GetHash()] = winnerIn;
 
-    if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
-       CMasternodeBlockPayees blockPayees(winnerIn.nBlockHeight);
-       mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
+        if(!mapMasternodeBlocks.count(winnerIn.nBlockHeight)){
+           CMasternodeBlockPayees blockPayees(winnerIn.nBlockHeight);
+           mapMasternodeBlocks[winnerIn.nBlockHeight] = blockPayees;
+        }
     }
 
     int n = 1;
@@ -487,6 +492,8 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
 
 bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 {
+    LOCK(cs_vecPayments);
+
     int nMaxSignatures = 0;
     std::string strPayeesPossible = "";
 
@@ -532,6 +539,8 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 
 std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 {
+    LOCK(cs_vecPayments);
+
     std::string ret = "Unknown";
 
     BOOST_FOREACH(CMasternodePayee& payee, vecPayments)
@@ -552,6 +561,8 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 
 std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 {
+    LOCK(cs_mapMasternodeBlocks);
+
     if(mapMasternodeBlocks.count(nBlockHeight)){
         return mapMasternodeBlocks[nBlockHeight].GetRequiredPaymentsString();
     }
@@ -561,6 +572,8 @@ std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 
 bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
+    LOCK(cs_mapMasternodeBlocks);
+
     if(mapMasternodeBlocks.count(nBlockHeight)){
         return mapMasternodeBlocks[nBlockHeight].IsTransactionValid(txNew);
     }
@@ -570,7 +583,7 @@ bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlo
 
 void CMasternodePayments::CleanPaymentList()
 {
-    LOCK(cs_masternodepayments);
+    LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
 
@@ -634,8 +647,6 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
 
 bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 {
-    LOCK(cs_masternodepayments);
-
     if(!fMasterNode) return false;
 
     //reference node - hybrid mode
@@ -663,12 +674,6 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
     if(budget.IsBudgetPaymentBlock(nBlockHeight)){
         //is budget payment block -- handled by the budgeting software
     } else {
-        uint256 hash;
-
-        if(!GetBlockHash(hash, nBlockHeight-100)) return false;
-        unsigned int nHash;
-        memcpy(&nHash, &hash, 2);
-
         LogPrintf("CMasternodePayments::ProcessBlock() Start nHeight %d - vin %s. \n", nBlockHeight, activeMasternode.vin.ToString().c_str());
 
         // pay to the oldest MN that still had no payment but its input is old enough and it was active long enough
@@ -751,7 +756,7 @@ bool CMasternodePaymentWinner::SignatureValid()
 
 void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
 {
-    LOCK(cs_masternodepayments);
+    LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
 
@@ -786,7 +791,7 @@ std::string CMasternodePayments::ToString() const
 
 int CMasternodePayments::GetOldestBlock()
 {
-    LOCK(cs_masternodepayments);
+    LOCK(cs_mapMasternodeBlocks);
 
     int nOldestBlock = std::numeric_limits<int>::max();
 
@@ -805,7 +810,7 @@ int CMasternodePayments::GetOldestBlock()
 
 int CMasternodePayments::GetNewestBlock()
 {
-    LOCK(cs_masternodepayments);
+    LOCK(cs_mapMasternodeBlocks);
 
     int nNewestBlock = 0;
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index f7939c7cab8a..21d937420d7c 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -13,6 +13,10 @@
 
 using namespace std;
 
+extern CCriticalSection cs_vecPayments;
+extern CCriticalSection cs_mapMasternodeBlocks;
+extern CCriticalSection cs_mapMasternodePayeeVotes;
+
 class CMasternodePayments;
 class CMasternodePaymentWinner;
 class CMasternodeBlockPayees;
@@ -96,6 +100,8 @@ class CMasternodeBlockPayees
     }
 
     void AddPayee(CScript payeeIn, int nIncrement){
+        LOCK(cs_vecPayments);
+
         BOOST_FOREACH(CMasternodePayee& payee, vecPayments){
             if(payee.scriptPubKey == payeeIn) {
                 payee.nVotes += nIncrement;
@@ -109,6 +115,8 @@ class CMasternodeBlockPayees
 
     bool GetPayee(CScript& payee)
     {
+        LOCK(cs_vecPayments);
+
         int nVotes = -1;
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
             if(p.nVotes > nVotes){
@@ -122,6 +130,8 @@ class CMasternodeBlockPayees
 
     bool HasPayeeWithVotes(CScript payee, int nVotesReq)
     {
+        LOCK(cs_vecPayments);
+
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
             if(p.nVotes >= nVotesReq && p.scriptPubKey == payee) return true;
         }
@@ -225,6 +235,7 @@ class CMasternodePayments
     }
 
     void Clear() {
+        LOCK2(cs_mapMasternodeBlocks, cs_mapMasternodePayeeVotes);
         mapMasternodeBlocks.clear();
         mapMasternodePayeeVotes.clear();
     }
@@ -241,6 +252,8 @@ class CMasternodePayments
     bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
     bool CanVote(COutPoint outMasternode, int nBlockHeight) {
+        LOCK(cs_mapMasternodePayeeVotes);
+
         if(mapMasternodesLastVote.count(outMasternode.hash + outMasternode.n)) {
             if(mapMasternodesLastVote[outMasternode.hash + outMasternode.n] == nBlockHeight) {
                 return false;

From 0152a1fc11875a29d7a73750043d62093dff798d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 13:59:07 -0700
Subject: [PATCH 1706/1819] Removed IsBudgetPaymentBlock lock

---
 src/masternode-budget.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 8b41972a52c0..4ba56f271eb4 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -497,8 +497,6 @@ CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
 
 bool CBudgetManager::IsBudgetPaymentBlock(int nBlockHeight)
 {
-    LOCK(cs);
-
     int nHighestCount = -1;
 
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();

From ff2fa918b635c6f9af5fe19b143f5a30d342056f Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Tue, 28 Jul 2015 22:14:55 +0200
Subject: [PATCH 1707/1819] UI: CSS for watch-only addresses added

---
 src/qt/res/css/drkblue.css | 75 +++++++++++++++++++++++++++++---------
 1 file changed, 58 insertions(+), 17 deletions(-)
 mode change 100755 => 100644 src/qt/res/css/drkblue.css

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
old mode 100755
new mode 100644
index 7b618b47babe..c4ac9a792948
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -739,7 +739,7 @@ min-height:30px;
 
 QWidget .QFrame#frame .QLabel#label_5 { /* Wallet Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:transparent;
 color:#fff;
 margin-right:5px;
@@ -751,29 +751,48 @@ qproperty-alignment: 'AlignVCenter | AlignLeft';
 margin-left:20px;
 }
 
+QWidget .QFrame#frame .QLabel#labelSpendable { /* Spendable Header */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:32px;
+}
+
+QWidget .QFrame#frame .QLabel#labelWatchonly { /* Watch-only Header */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:16px;
+}
+
 QWidget .QFrame#frame .QLabel#labelBalanceText { /* Available Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#56ABD8;
 color:#ffffff;
 margin-right:5px;
 padding-right:5px;
 font-weight:bold;
-font-size:16px;
+font-size:14px;
 min-height:35px;
 }
 
 QWidget .QFrame#frame .QLabel#labelBalance { /* Available Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
-font-size:16px;
+font-size:12px;
 font-weight:bold;
 color:#56ABD8;
-margin-left:14px;
+margin-left:32px;
+}
+
+QWidget .QFrame#frame .QLabel#labelWatchAvailable { /* Watch-only Balance */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:16px;
 }
 
 QWidget .QFrame#frame .QLabel#labelPendingText { /* Pending Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
+font-size:12px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -781,12 +800,20 @@ padding-right:5px;
 
 QWidget .QFrame#frame .QLabel#labelUnconfirmed { /* Pending Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:32px;
+}
+
+QWidget .QFrame#frame .QLabel#labelWatchPending { /* Watch-only Pending Balance */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
 margin-left:16px;
 }
 
 QWidget .QFrame#frame .QLabel#labelImmatureText { /* Immature Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
+font-size:12px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -794,12 +821,20 @@ padding-right:5px;
 
 QWidget .QFrame#frame .QLabel#labelImmature { /* Immature Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:32px;
+}
+
+QWidget .QFrame#frame .QLabel#labelWatchImmature { /* Watch-only Immature Balance */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
 margin-left:16px;
 }
 
 QWidget .QFrame#frame .QLabel#labelTotalText { /* Total Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
+font-size:12px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -807,6 +842,13 @@ padding-right:5px;
 
 QWidget .QFrame#frame .QLabel#labelTotal { /* Total Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
+margin-left:32px;
+}
+
+QWidget .QFrame#frame .QLabel#labelWatchTotal { /* Watch-only Total Balance */
+qproperty-alignment: 'AlignVCenter | AlignLeft';
+font-size:12px;
 margin-left:16px;
 }
 
@@ -823,13 +865,13 @@ qproperty-geometry: rect(10 0 431 35);
 
 QWidget .QFrame#frameDarksend .QLabel#label_2 { /* Darksend Header */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#56ABD8;
 color:#fff;
 margin-right:5px;
 padding-right:5px;
 font-weight:bold;
-font-size:16px;
+font-size:14px;
 min-height:35px;
 }
 
@@ -848,10 +890,9 @@ font-weight:normal;
 min-height:25px;
 }
 
-
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_6 { /* Darksend Status Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -863,7 +904,7 @@ QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#darksendEnabled { /* Dar
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_7 { /* Darksend Completion Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -885,7 +926,7 @@ width:1px;
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#labelAnonymizedText { /* Darksend Balance Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -897,7 +938,7 @@ QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#labelAnonymized { /* Dar
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_8 { /* Darksend Amount and Rounds Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -909,7 +950,7 @@ QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#labelAmountRounds { /* D
 
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_9 { /* Darksend Submitted Denom Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
-min-width:230px;
+min-width:160px;
 background-color:#F8F6F6;
 margin-right:5px;
 padding-right:5px;
@@ -943,7 +984,7 @@ qproperty-geometry: rect(0 0 0 0);
 
 QWidget .QFrame#frameDarksend .QPushButton#toggleDarksend { /* Start Darksend Mixing */
 qproperty-geometry: rect(115 268 295 40);
-font-size:17px;
+font-size:15px;
 font-weight:bold;
 color:#ffffff;
 padding-left:10px;

From e230762d5a6e997c7bc2b152f20b66be9b51b6db Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 15:50:25 -0700
Subject: [PATCH 1708/1819] lock debugging

---
 src/main.cpp                |  2 +-
 src/masternode-budget.cpp   | 19 +++++++++++++++++++
 src/masternode-budget.h     |  3 +++
 src/masternode-payments.cpp |  9 +++++++++
 src/masternode-payments.h   |  5 +++++
 5 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index ccd5885e4087..d16cf209d8a9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4130,7 +4130,6 @@ void static ProcessGetData(CNode* pfrom)
                 }
 
                 if (!pushed && inv.type == MSG_TX) {
-
                     CTransaction tx;
                     if (mempool.lookup(inv.hash, tx)) {
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -4662,6 +4661,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "tx"|| strCommand == "dstx")
     {
+
         vector<uint256> vWorkQueue;
         vector<uint256> vEraseQueue;
         CTransaction tx;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 4ba56f271eb4..93b3f124a35d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -85,6 +85,7 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
 
 void CBudgetManager::CheckOrphanVotes()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::string strError = "";
@@ -183,6 +184,7 @@ void CBudgetManager::SubmitFinalBudget()
         return;
     }
 
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
     finalizedBudgetBroadcast.Relay();
@@ -368,6 +370,7 @@ bool CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 
 bool CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     std::string strError = "";
     if(!budgetProposal.IsValid(strError)) {
@@ -410,6 +413,7 @@ void CBudgetManager::CheckAndRemove()
 
 void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, CAmount nFees)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -487,6 +491,7 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
 
 CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(mapProposals.count(nHash))
@@ -539,6 +544,7 @@ bool CBudgetManager::HasNextFinalizedBudget()
 
 bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     int nHighestCount = 0;
@@ -588,6 +594,7 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
 
 std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::vector<CBudgetProposal*> vBudgetProposalRet;
@@ -620,6 +627,7 @@ struct sortProposalsByVotes {
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     // ------- Sort budgets by Yes Count
@@ -683,6 +691,7 @@ struct sortFinalizedBudgetsByVotes {
 
 std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::vector<CFinalizedBudget*> vFinalizedBudgetsRet;
@@ -712,6 +721,7 @@ std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 
 std::string CBudgetManager::GetRequiredPaymentsString(int nBlockHeight)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::string ret = "unknown-budget";
@@ -763,6 +773,7 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if (masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_BUDGET) return;
@@ -805,6 +816,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     // lite mode is not supported
     if(IsInitialBlockDownload()) return;
 
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
@@ -957,6 +969,7 @@ bool CBudgetManager::PropExists(uint256 nHash)
 
 void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     /*
@@ -1021,6 +1034,7 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
 bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!mapProposals.count(vote.nProposalHash)){
@@ -1048,6 +1062,7 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string
 
 bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
@@ -1175,6 +1190,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
 
 bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
@@ -1457,6 +1473,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
 
 bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
@@ -1496,6 +1513,7 @@ bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string&
 //evaluate if we should vote for this. Masternode only
 void CFinalizedBudget::AutoCheck()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!fMasterNode || fAutoChecked) return;
@@ -1566,6 +1584,7 @@ CAmount CFinalizedBudget::GetTotalPayout()
 
 std::string CFinalizedBudget::GetProposals() 
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     std::string ret = "";
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index d47b13f0ed79..f7e1bc352fa5 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -131,6 +131,7 @@ class CBudgetManager
 
     void CheckOrphanVotes();
     void Clear(){
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         LogPrintf("Budget object cleared\n");
@@ -226,6 +227,7 @@ class CFinalizedBudget
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
     {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         int i = nBlockHeight - GetBlockStart();
@@ -236,6 +238,7 @@ class CFinalizedBudget
     }
     bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, CAmount& nAmount)
     {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         int i = nBlockHeight - GetBlockStart();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 3452a4a1b678..653846ad1bb3 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -438,6 +438,7 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 // -- Only look ahead up to 8 blocks to allow for propagation of the latest 2 winners
 bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -492,6 +493,7 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
 
 bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_vecPayments);
 
     int nMaxSignatures = 0;
@@ -539,6 +541,7 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 
 std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_vecPayments);
 
     std::string ret = "Unknown";
@@ -561,6 +564,7 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 
 std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     if(mapMasternodeBlocks.count(nBlockHeight)){
@@ -572,6 +576,7 @@ std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 
 bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     if(mapMasternodeBlocks.count(nBlockHeight)){
@@ -583,6 +588,7 @@ bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlo
 
 void CMasternodePayments::CleanPaymentList()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
@@ -756,6 +762,7 @@ bool CMasternodePaymentWinner::SignatureValid()
 
 void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
@@ -791,6 +798,7 @@ std::string CMasternodePayments::ToString() const
 
 int CMasternodePayments::GetOldestBlock()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     int nOldestBlock = std::numeric_limits<int>::max();
@@ -810,6 +818,7 @@ int CMasternodePayments::GetOldestBlock()
 
 int CMasternodePayments::GetNewestBlock()
 {
+    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     int nNewestBlock = 0;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 21d937420d7c..46a52210c13d 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -100,6 +100,7 @@ class CMasternodeBlockPayees
     }
 
     void AddPayee(CScript payeeIn, int nIncrement){
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         BOOST_FOREACH(CMasternodePayee& payee, vecPayments){
@@ -115,6 +116,7 @@ class CMasternodeBlockPayees
 
     bool GetPayee(CScript& payee)
     {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         int nVotes = -1;
@@ -130,6 +132,7 @@ class CMasternodeBlockPayees
 
     bool HasPayeeWithVotes(CScript payee, int nVotesReq)
     {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
@@ -235,6 +238,7 @@ class CMasternodePayments
     }
 
     void Clear() {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK2(cs_mapMasternodeBlocks, cs_mapMasternodePayeeVotes);
         mapMasternodeBlocks.clear();
         mapMasternodePayeeVotes.clear();
@@ -252,6 +256,7 @@ class CMasternodePayments
     bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
     bool CanVote(COutPoint outMasternode, int nBlockHeight) {
+        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_mapMasternodePayeeVotes);
 
         if(mapMasternodesLastVote.count(outMasternode.hash + outMasternode.n)) {

From 976bd7853f96e8cadb47c267aa6bbb9e4c746a4a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 26 Jul 2015 01:43:40 +0300
Subject: [PATCH 1709/1819] Refactor DS: - always clear entries, do not try to
 reuse them - unlock coins only when needed (do not unlock them every 10
 blocks) - make logic a bit more strightforward in few places - clear all
 expired on timeout (not just the first found) - add 2 additional statuses on
 doauto - run DS checks when mn list sync started, do not wait for full sync -
 move most class members to private

---
 src/darksend.cpp        | 430 +++++++++++++++++++---------------------
 src/darksend.h          |  82 ++++----
 src/qt/overviewpage.cpp |   1 +
 src/rpcmasternode.cpp   |   3 +-
 src/wallet.cpp          |   2 +-
 5 files changed, 244 insertions(+), 274 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 3b1f70c5f354..84f1183bc74c 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -482,29 +482,26 @@ void CDarksendPool::Reset(){
     SetNull();
 }
 
-void CDarksendPool::SetNull(bool clearEverything){
-    finalTransaction.vin.clear();
-    finalTransaction.vout.clear();
+void CDarksendPool::SetNull(){
 
-    entries.clear();
-
-    state = POOL_STATUS_IDLE;
-
-    lastTimeChanged = GetTimeMillis();
+    // MN side
+    sessionUsers = 0;
+    vecSessionCollateral.clear();
 
+    // Client side
     entriesCount = 0;
     lastEntryAccepted = 0;
     countEntriesAccepted = 0;
-
-    sessionUsers = 0;
-    sessionDenom = 0;
     sessionFoundMasternode = false;
-    vecSessionCollateral.clear();
 
-    if(clearEverything){
-        myEntries.clear();
-        sessionID = 0;
-    }
+    // Both sides
+    state = POOL_STATUS_IDLE;
+    sessionID = 0;
+    sessionDenom = 0;
+    entries.clear();
+    finalTransaction.vin.clear();
+    finalTransaction.vout.clear();
+    lastTimeChanged = GetTimeMillis();
 
     // -- seed random number generator (used for ordering output lists)
     unsigned int seed = 0;
@@ -592,15 +589,17 @@ std::string CDarksendPool::GetStatus()
 //
 void CDarksendPool::Check()
 {
-    if(fDebug && fMasterNode) LogPrintf("CDarksendPool::Check() - entries count %lu\n", entries.size());
-
     //printf("CDarksendPool::Check() %d - %d - %d\n", state, anonTx.CountEntries(), GetTimeMillis()-lastTimeChanged);
 
-    // If entries is full, then move on to the next phase
-    if(state == POOL_STATUS_ACCEPTING_ENTRIES && (int)entries.size() >= GetMaxPoolTransactions())
-    {
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- TRYING TRANSACTION \n");
-        UpdateState(POOL_STATUS_FINALIZE_TRANSACTION);
+    if(fMasterNode) {
+        if(fDebug) LogPrintf("CDarksendPool::Check() - entries count %lu\n", entries.size());
+
+        // If entries is full, then move on to the next phase
+        if(state == POOL_STATUS_ACCEPTING_ENTRIES && (int)entries.size() >= GetMaxPoolTransactions())
+        {
+            if(fDebug) LogPrintf("CDarksendPool::Check() -- TRYING TRANSACTION \n");
+            UpdateState(POOL_STATUS_FINALIZE_TRANSACTION);
+        }
     }
 
     // create the finalized transaction for distribution to the clients
@@ -634,7 +633,7 @@ void CDarksendPool::Check()
     }
 
     // If we have all of the signatures, try to compile the transaction
-    if(state == POOL_STATUS_SIGNING && SignaturesComplete()) {
+    if(fMasterNode && state == POOL_STATUS_SIGNING && SignaturesComplete()) {
         if(fDebug) LogPrintf("CDarksendPool::Check() -- SIGNING\n");
         UpdateState(POOL_STATUS_TRANSMISSION);
 
@@ -643,88 +642,85 @@ void CDarksendPool::Check()
 
     // reset if we're here for 10 seconds
     if((state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) && GetTimeMillis()-lastTimeChanged >= 10000) {
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- RESETTING MESSAGE \n");
-        SetNull(true);
-        if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
+        if(fDebug) LogPrintf("CDarksendPool::Check() -- timeout, RESETTING\n");
         UnlockCoins();
+        SetNull();
+        if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
     }
 }
 
 void CDarksendPool::CheckFinalTransaction()
 {
+    if (!fMasterNode) return; // check and relay final tx only on masternode
+
     CWalletTx txNew = CWalletTx(pwalletMain, finalTransaction);
 
     LOCK2(cs_main, pwalletMain->cs_wallet);
     {
-        if (fMasterNode) { //only the main node is master atm
-            if(fDebug) LogPrintf("Transaction 2: %s\n", txNew.ToString().c_str());
+        if(fDebug) LogPrintf("Transaction 2: %s\n", txNew.ToString().c_str());
 
-            // See if the transaction is valid
-            if (!txNew.AcceptToMemoryPool(false, true, true))
-            {
-                LogPrintf("CDarksendPool::Check() - CommitTransaction : Error: Transaction not valid\n");
-                SetNull();
-                pwalletMain->Lock();
+        // See if the transaction is valid
+        if (!txNew.AcceptToMemoryPool(false, true, true))
+        {
+            LogPrintf("CDarksendPool::Check() - CommitTransaction : Error: Transaction not valid\n");
+            SetNull();
 
-                // not much we can do in this case
-                UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
-                RelayCompletedTransaction(sessionID, true, ERR_INVALID_TX);
-                return;
-            }
+            // not much we can do in this case
+            UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
+            RelayCompletedTransaction(sessionID, true, ERR_INVALID_TX);
+            return;
+        }
 
-            LogPrintf("CDarksendPool::Check() -- IS MASTER -- TRANSMITTING DARKSEND\n");
+        LogPrintf("CDarksendPool::Check() -- IS MASTER -- TRANSMITTING DARKSEND\n");
 
-            // sign a message
+        // sign a message
 
-            int64_t sigTime = GetAdjustedTime();
-            std::string strMessage = txNew.GetHash().ToString() + boost::lexical_cast<std::string>(sigTime);
-            std::string strError = "";
-            std::vector<unsigned char> vchSig;
-            CKey key2;
-            CPubKey pubkey2;
+        int64_t sigTime = GetAdjustedTime();
+        std::string strMessage = txNew.GetHash().ToString() + boost::lexical_cast<std::string>(sigTime);
+        std::string strError = "";
+        std::vector<unsigned char> vchSig;
+        CKey key2;
+        CPubKey pubkey2;
 
-            if(!darkSendSigner.SetKey(strMasterNodePrivKey, strError, key2, pubkey2))
-            {
-                LogPrintf("CDarksendPool::Check() - ERROR: Invalid Masternodeprivkey: '%s'\n", strError.c_str());
-                return;
-            }
+        if(!darkSendSigner.SetKey(strMasterNodePrivKey, strError, key2, pubkey2))
+        {
+            LogPrintf("CDarksendPool::Check() - ERROR: Invalid Masternodeprivkey: '%s'\n", strError.c_str());
+            return;
+        }
 
-            if(!darkSendSigner.SignMessage(strMessage, strError, vchSig, key2)) {
-                LogPrintf("CDarksendPool::Check() - Sign message failed\n");
-                return;
-            }
+        if(!darkSendSigner.SignMessage(strMessage, strError, vchSig, key2)) {
+            LogPrintf("CDarksendPool::Check() - Sign message failed\n");
+            return;
+        }
 
-            if(!darkSendSigner.VerifyMessage(pubkey2, vchSig, strMessage, strError)) {
-                LogPrintf("CDarksendPool::Check() - Verify message failed\n");
-                return;
-            }
+        if(!darkSendSigner.VerifyMessage(pubkey2, vchSig, strMessage, strError)) {
+            LogPrintf("CDarksendPool::Check() - Verify message failed\n");
+            return;
+        }
 
-            if(!mapDarksendBroadcastTxes.count(txNew.GetHash())){
-                CDarksendBroadcastTx dstx;
-                dstx.tx = txNew;
-                dstx.vin = activeMasternode.vin;
-                dstx.vchSig = vchSig;
-                dstx.sigTime = sigTime;
+        if(!mapDarksendBroadcastTxes.count(txNew.GetHash())){
+            CDarksendBroadcastTx dstx;
+            dstx.tx = txNew;
+            dstx.vin = activeMasternode.vin;
+            dstx.vchSig = vchSig;
+            dstx.sigTime = sigTime;
 
-                mapDarksendBroadcastTxes.insert(make_pair(txNew.GetHash(), dstx));
-            }
+            mapDarksendBroadcastTxes.insert(make_pair(txNew.GetHash(), dstx));
+        }
 
-            CInv inv(MSG_DSTX, txNew.GetHash());
-            RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
+        CInv inv(MSG_DSTX, txNew.GetHash());
+        RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
 
-            // Tell the clients it was successful
-            RelayCompletedTransaction(sessionID, false, MSG_SUCCESS);
+        // Tell the clients it was successful
+        RelayCompletedTransaction(sessionID, false, MSG_SUCCESS);
 
-            // Randomly charge clients
-            ChargeRandomFees();
+        // Randomly charge clients
+        ChargeRandomFees();
 
-            // Reset
-            if(fDebug) LogPrintf("CDarksendPool::Check() -- COMPLETED -- RESETTING \n");
-            SetNull(true);
-            UnlockCoins();
-            if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
-            pwalletMain->Lock();
-        }
+        // Reset
+        if(fDebug) LogPrintf("CDarksendPool::Check() -- COMPLETED -- RESETTING \n");
+        SetNull();
+        RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
     }
 }
 
@@ -741,73 +737,95 @@ void CDarksendPool::CheckFinalTransaction()
 // until the transaction is either complete or fails.
 //
 void CDarksendPool::ChargeFees(){
-    if(fMasterNode) {
-        //we don't need to charge collateral for every offence.
-        int offences = 0;
-        int r = rand()%100;
-        if(r > 33) return;
-
-        if(state == POOL_STATUS_ACCEPTING_ENTRIES){
-            BOOST_FOREACH(const CTransaction& txCollateral, vecSessionCollateral) {
-                bool found = false;
-                BOOST_FOREACH(const CDarkSendEntry& v, entries) {
-                    if(v.collateral == txCollateral) {
-                        found = true;
-                    }
-                }
+    if(!fMasterNode) return;
 
-                // This queue entry didn't send us the promised transaction
-                if(!found){
-                    LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't send transaction). Found offence.\n");
-                    offences++;
+    //we don't need to charge collateral for every offence.
+    int offences = 0;
+    int r = rand()%100;
+    if(r > 33) return;
+
+    if(state == POOL_STATUS_ACCEPTING_ENTRIES){
+        BOOST_FOREACH(const CTransaction& txCollateral, vecSessionCollateral) {
+            bool found = false;
+            BOOST_FOREACH(const CDarkSendEntry& v, entries) {
+                if(v.collateral == txCollateral) {
+                    found = true;
                 }
             }
+
+            // This queue entry didn't send us the promised transaction
+            if(!found){
+                LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't send transaction). Found offence.\n");
+                offences++;
+            }
         }
+    }
 
-        if(state == POOL_STATUS_SIGNING) {
-            // who didn't sign?
-            BOOST_FOREACH(const CDarkSendEntry v, entries) {
-                BOOST_FOREACH(const CTxDSIn s, v.sev) {
-                    if(!s.fHasSig){
-                        LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't sign). Found offence\n");
-                        offences++;
-                    }
+    if(state == POOL_STATUS_SIGNING) {
+        // who didn't sign?
+        BOOST_FOREACH(const CDarkSendEntry v, entries) {
+            BOOST_FOREACH(const CTxDSIn s, v.sev) {
+                if(!s.fHasSig){
+                    LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't sign). Found offence\n");
+                    offences++;
                 }
             }
         }
+    }
 
-        r = rand()%100;
-        int target = 0;
+    r = rand()%100;
+    int target = 0;
 
-        //mostly offending?
-        if(offences >= Params().PoolMaxTransactions()-1 && r > 33) return;
+    //mostly offending?
+    if(offences >= Params().PoolMaxTransactions()-1 && r > 33) return;
 
-        //everyone is an offender? That's not right
-        if(offences >= Params().PoolMaxTransactions()) return;
+    //everyone is an offender? That's not right
+    if(offences >= Params().PoolMaxTransactions()) return;
 
-        //charge one of the offenders randomly
-        if(offences > 1) target = 50;
+    //charge one of the offenders randomly
+    if(offences > 1) target = 50;
 
-        //pick random client to charge
-        r = rand()%100;
+    //pick random client to charge
+    r = rand()%100;
 
-        if(state == POOL_STATUS_ACCEPTING_ENTRIES){
-            BOOST_FOREACH(const CTransaction& txCollateral, vecSessionCollateral) {
-                bool found = false;
-                BOOST_FOREACH(const CDarkSendEntry& v, entries) {
-                    if(v.collateral == txCollateral) {
-                        found = true;
-                    }
+    if(state == POOL_STATUS_ACCEPTING_ENTRIES){
+        BOOST_FOREACH(const CTransaction& txCollateral, vecSessionCollateral) {
+            bool found = false;
+            BOOST_FOREACH(const CDarkSendEntry& v, entries) {
+                if(v.collateral == txCollateral) {
+                    found = true;
+                }
+            }
+
+            // This queue entry didn't send us the promised transaction
+            if(!found && r > target){
+                LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't send transaction). charging fees.\n");
+
+                CWalletTx wtxCollateral = CWalletTx(pwalletMain, txCollateral);
+
+                // Broadcast
+                if (!wtxCollateral.AcceptToMemoryPool(true))
+                {
+                    // This must not fail. The transaction has already been signed and recorded.
+                    LogPrintf("CDarksendPool::ChargeFees() : Error: Transaction not valid");
                 }
+                wtxCollateral.RelayWalletTransaction();
+                return;
+            }
+        }
+    }
 
-                // This queue entry didn't send us the promised transaction
-                if(!found && r > target){
-                    LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't send transaction). charging fees.\n");
+    if(state == POOL_STATUS_SIGNING) {
+        // who didn't sign?
+        BOOST_FOREACH(const CDarkSendEntry v, entries) {
+            BOOST_FOREACH(const CTxDSIn s, v.sev) {
+                if(!s.fHasSig && r > target){
+                    LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't sign). charging fees.\n");
 
-                    CWalletTx wtxCollateral = CWalletTx(pwalletMain, txCollateral);
+                    CWalletTx wtxCollateral = CWalletTx(pwalletMain, v.collateral);
 
                     // Broadcast
-                    if (!wtxCollateral.AcceptToMemoryPool(true))
+                    if (!wtxCollateral.AcceptToMemoryPool(false))
                     {
                         // This must not fail. The transaction has already been signed and recorded.
                         LogPrintf("CDarksendPool::ChargeFees() : Error: Transaction not valid");
@@ -817,28 +835,6 @@ void CDarksendPool::ChargeFees(){
                 }
             }
         }
-
-        if(state == POOL_STATUS_SIGNING) {
-            // who didn't sign?
-            BOOST_FOREACH(const CDarkSendEntry v, entries) {
-                BOOST_FOREACH(const CTxDSIn s, v.sev) {
-                    if(!s.fHasSig && r > target){
-                        LogPrintf("CDarksendPool::ChargeFees -- found uncooperative node (didn't sign). charging fees.\n");
-
-                        CWalletTx wtxCollateral = CWalletTx(pwalletMain, v.collateral);
-
-                        // Broadcast
-                        if (!wtxCollateral.AcceptToMemoryPool(false))
-                        {
-                            // This must not fail. The transaction has already been signed and recorded.
-                            LogPrintf("CDarksendPool::ChargeFees() : Error: Transaction not valid");
-                        }
-                        wtxCollateral.RelayWalletTransaction();
-                        return;
-                    }
-                }
-            }
-        }
     }
 }
 
@@ -904,13 +900,12 @@ void CDarksendPool::CheckTimeout(){
 
     // check Darksend queue objects for timeouts
     int c = 0;
-    vector<CDarksendQueue>::iterator it;
-    for(it=vecDarksendQueue.begin();it<vecDarksendQueue.end();it++){
+    vector<CDarksendQueue>::iterator it = vecDarksendQueue.begin();
+    while(it != vecDarksendQueue.end()){
         if((*it).IsExpired()){
             if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() : Removing expired queue entry - %d\n", c);
-            vecDarksendQueue.erase(it);
-            break;
-        }
+            it = vecDarksendQueue.erase(it);
+        } else ++it;
         c++;
     }
 
@@ -920,51 +915,44 @@ void CDarksendPool::CheckTimeout(){
     if(state == POOL_STATUS_ACCEPTING_ENTRIES || state == POOL_STATUS_QUEUE){
         c = 0;
 
-        // if it's a Masternode, the entries are stored in "entries", otherwise they're stored in myEntries
-        std::vector<CDarkSendEntry> *vec = &myEntries;
-        if(fMasterNode) vec = &entries;
-
         // check for a timeout and reset if needed
-        vector<CDarkSendEntry>::iterator it2;
-        for(it2=vec->begin();it2<vec->end();it2++){
+        vector<CDarkSendEntry>::iterator it2 = entries.begin();
+        while(it2 != entries.end()){
             if((*it2).IsExpired()){
                 if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() : Removing expired entry - %d\n", c);
-                vec->erase(it2);
-                if(entries.size() == 0 && myEntries.size() == 0){
-                    SetNull(true);
+                it2 = entries.erase(it2);
+                if(entries.size() == 0){
                     UnlockCoins();
+                    SetNull();
                 }
                 if(fMasterNode){
                     RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
                 }
-                break;
-            }
+            } else ++it2;
             c++;
         }
 
         if(GetTimeMillis()-lastTimeChanged >= (DARKSEND_QUEUE_TIMEOUT*1000)+addLagTime){
-            lastTimeChanged = GetTimeMillis();
             UnlockCoins();
-            SetNull(true);
+            SetNull();
         }
     } else if(GetTimeMillis()-lastTimeChanged >= (DARKSEND_QUEUE_TIMEOUT*1000)+addLagTime){
-        if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out (30s) -- resetting\n");
-        SetNull();
+        if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- resetting\n", DARKSEND_QUEUE_TIMEOUT);
         UnlockCoins();
+        SetNull();
 
         UpdateState(POOL_STATUS_ERROR);
-        lastMessage = _("Session timed out, please resubmit.");
+        lastMessage = _("Session timed out.");
     }
 
     if(state == POOL_STATUS_SIGNING && GetTimeMillis()-lastTimeChanged >= (DARKSEND_SIGNING_TIMEOUT*1000)+addLagTime ) {
-            if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out -- restting\n");
+            if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- restting\n", DARKSEND_SIGNING_TIMEOUT);
             ChargeFees();
-            SetNull();
             UnlockCoins();
-            //add my transactions to the new session
+            SetNull();
 
             UpdateState(POOL_STATUS_ERROR);
-            lastMessage = _("Signing timed out, please resubmit.");
+            lastMessage = _("Signing timed out.");
     }
 }
 
@@ -1190,6 +1178,12 @@ bool CDarksendPool::SignaturesComplete(){
 // This is only ran from clients
 //
 void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<CTxOut>& vout, int64_t amount){
+
+    if(fMasterNode) {
+        LogPrintf("CDarksendPool::SendDarksendDenominate() - Darksend from a Masternode is not supported currently.\n");
+        return;
+    }
+
     if(txCollateral == CMutableTransaction()){
         LogPrintf ("CDarksendPool:SendDarksendDenominate() - Darksend collateral not set");
         return;
@@ -1210,19 +1204,15 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
     if(!sessionFoundMasternode){
         LogPrintf("CDarksendPool::SendDarksendDenominate() - No Masternode has been selected yet.\n");
         UnlockCoins();
-        SetNull(true);
+        SetNull();
         return;
     }
 
     if (!CheckDiskSpace()) {
         UnlockCoins();
-        return;
-    }
-
-    if(fMasterNode) {
-        LogPrintf("CDarksendPool::SendDarksendDenominate() - Darksend from a Masternode is not supported currently.\n");
-        UnlockCoins();
-        SetNull(true);
+        SetNull();
+        fEnableDarksend = false;
+        LogPrintf("CDarksendPool::SendDarksendDenominate() - Not enough disk space, disabling Darksend.\n");
         return;
     }
 
@@ -1255,7 +1245,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
         if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
             LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
             UnlockCoins();
-            SetNull(true);
+            SetNull();
             return;
         }
     }
@@ -1263,9 +1253,9 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
     // store our entry for later use
     CDarkSendEntry e;
     e.Add(vin, amount, txCollateral, vout);
-    myEntries.push_back(e);
+    entries.push_back(e);
 
-    RelayIn(myEntries[0].sev, myEntries[0].amount, txCollateral, myEntries[0].vout);
+    RelayIn(entries[0].sev, entries[0].amount, txCollateral, entries[0].vout);
     Check();
 }
 
@@ -1330,7 +1320,7 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
     vector<CTxIn> sigs;
 
     //make sure my inputs/outputs are present, otherwise refuse to sign
-    BOOST_FOREACH(const CDarkSendEntry e, myEntries) {
+    BOOST_FOREACH(const CDarkSendEntry e, entries) {
         BOOST_FOREACH(const CTxDSIn s, e.sev) {
             /* Sign my transaction and all outputs */
             int mine = -1;
@@ -1368,7 +1358,7 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
                     // better then signing if the transaction doesn't look like what we wanted.
                     LogPrintf("CDarksendPool::Sign - My entries are not correct! Refusing to sign. %d entries %d target. \n", foundOutputs, targetOuputs);
                     UnlockCoins();
-                    SetNull(true);
+                    SetNull();
 
                     return false;
                 }
@@ -1407,13 +1397,6 @@ void CDarksendPool::NewBlock()
     lastNewBlock = GetTime();
 
     darkSendPool.CheckTimeout();
-
-    if(!fEnableDarksend) return;
-
-    if(!fMasterNode){
-        //denominate all non-denominated inputs every 25 minutes.
-        if(chainActive.Tip()->nHeight % 10 == 0) UnlockCoins();
-    }
 }
 
 // Darksend transaction was completed (failed or successful)
@@ -1427,19 +1410,18 @@ void CDarksendPool::CompletedTransaction(bool error, int errorID)
 
         Check();
         UnlockCoins();
+        SetNull();
     } else {
         LogPrintf("CompletedTransaction -- success \n");
         UpdateState(POOL_STATUS_SUCCESS);
 
-        myEntries.clear();
         UnlockCoins();
-        SetNull(true);
+        SetNull();
 
         // To avoid race conditions, we'll only let DS run once per block
         cachedLastSuccess = chainActive.Tip()->nHeight;
     }
     lastMessage = GetMessageByID(errorID);
-    completedTransaction = true;
 }
 
 void CDarksendPool::ClearLastMessage()
@@ -1456,17 +1438,15 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 {
     LOCK(cs_darksend);
 
-    if(IsInitialBlockDownload()) return false;
-
-    if(fMasterNode) return false;
-    if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) return false;
-
-    if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing) {
-        LogPrintf("CDarksendPool::DoAutomaticDenominating - Last successful Darksend action was too recent\n");
-        strAutoDenomResult = _("Last successful Darksend action was too recent.");
+    if(!masternodeSync.IsListSyncStarted()) {
+        strAutoDenomResult = _("Can't mix while sync in progress.");
         return false;
     }
-    if(!fEnableDarksend) {
+    if(!fEnableDarksend) return false;
+    if(fMasterNode) return false;
+    if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) return false;
+    if(GetEntriesCount() > 0) {
+        strAutoDenomResult = _("Mixing in progress...");
         return false;
     }
 
@@ -1475,10 +1455,10 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         return false;
     }
 
-    if(GetState() != POOL_STATUS_ERROR && GetState() != POOL_STATUS_SUCCESS){
-        if(GetMyTransactionCount() > 0){
-            return true;
-        }
+    if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing) {
+        LogPrintf("CDarksendPool::DoAutomaticDenominating - Last successful Darksend action was too recent\n");
+        strAutoDenomResult = _("Last successful Darksend action was too recent.");
+        return false;
     }
 
     if(mnodeman.size() == 0){
@@ -1562,7 +1542,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
     if(!sessionFoundMasternode){
         // Clean if there is anything left from previous session
         UnlockCoins();
-        SetNull(true);
+        SetNull();
 
         int nUseQueue = rand()%100;
         UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
@@ -1943,7 +1923,6 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
         sessionDenom = nDenom;
         sessionUsers++;
         lastTimeChanged = GetTimeMillis();
-        entries.clear();
 
         if(!unitTest){
             //broadcast that I'm accepting entries, only if it's the first entry through
@@ -2324,10 +2303,10 @@ void ThreadCheckDarkSendPool()
         MilliSleep(1000);
         //LogPrintf("ThreadCheckDarkSendPool::check timeout\n");
 
-        // try to sync from all available nodes (up to 3 or until MASTERNODE_SYNC_TIMEOUT) one step at a time
+        // try to sync from all available nodes, one step at a time
         masternodeSync.Process();
 
-        if(masternodeSync.IsSynced()) {
+        if(masternodeSync.IsListSyncStarted()) {
 
             c++;
 
@@ -2337,13 +2316,16 @@ void ThreadCheckDarkSendPool()
 
             if(c % 60 == 0)
             {
-                LOCK(cs_main);
-                /*
-                    cs_main is required for doing CMasternode.Check because something
-                    is modifying the coins view without a mempool lock. It causes
-                    segfaults from this code without the cs_main lock.
-                */
-                mnodeman.CheckAndRemove();
+                {
+                    LOCK(cs_main);
+                    /*
+                        cs_main is required for doing CMasternode.Check because something
+                        is modifying the coins view without a mempool lock. It causes
+                        segfaults from this code without the cs_main lock.
+                    */
+                    mnodeman.CheckAndRemove();
+                }
+
                 mnodeman.ProcessMasternodeConnections();
                 masternodePayments.CleanPaymentList();
                 CleanTransactionLocksList();
diff --git a/src/darksend.h b/src/darksend.h
index 4309d1635dba..3134766cee02 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -267,6 +267,37 @@ class CDarksendPool
 private:
     mutable CCriticalSection cs_darksend;
 
+    std::vector<CDarkSendEntry> entries; // Masternode/clients entries
+    CMutableTransaction finalTransaction; // the finalized transaction ready for signing
+
+    int64_t lastTimeChanged; // last time the 'state' changed, in UTC milliseconds
+
+    unsigned int state; // should be one of the POOL_STATUS_XXX values
+    unsigned int entriesCount;
+    unsigned int lastEntryAccepted;
+    unsigned int countEntriesAccepted;
+
+    std::vector<CTxIn> lockedCoins;
+
+    std::string lastMessage;
+    bool unitTest;
+
+    int sessionID;
+
+    int sessionUsers; //N Users have said they'll join
+    bool sessionFoundMasternode; //If we've found a compatible Masternode
+    std::vector<CTransaction> vecSessionCollateral;
+
+    int cachedLastSuccess;
+
+    int minBlockSpacing; //required blocks between mixes
+    CMutableTransaction txCollateral;
+
+    int64_t lastNewBlock;
+
+    //debugging data
+    std::string strAutoDenomResult;
+
 public:
     enum messages {
         ERR_ALREADY_HAVE,
@@ -293,45 +324,12 @@ class CDarksendPool
         MSG_ENTRIES_ADDED
     };
 
-    std::vector<CDarkSendEntry> myEntries; // clients entries
-    std::vector<CDarkSendEntry> entries; // Masternode entries
-    CMutableTransaction finalTransaction; // the finalized transaction ready for signing
-
-    int64_t lastTimeChanged; // last time the 'state' changed, in UTC milliseconds
-    int64_t lastAutoDenomination; // TODO; not used - Delete?
-
-    unsigned int state; // should be one of the POOL_STATUS_XXX values
-    unsigned int entriesCount;
-    unsigned int lastEntryAccepted;
-    unsigned int countEntriesAccepted;
-
     // where collateral should be made out to
     CScript collateralPubKey;
 
-    std::vector<CTxIn> lockedCoins;
-
-    uint256 masterNodeBlockHash;
-
-    std::string lastMessage;
-    bool completedTransaction;
-    bool unitTest;
     CMasternode* pSubmittedToMasternode;
-
-    int sessionID;
     int sessionDenom; //Users must submit an denom matching this
-    int sessionUsers; //N Users have said they'll join
-    bool sessionFoundMasternode; //If we've found a compatible Masternode
-    std::vector<CTransaction> vecSessionCollateral;
-
-    int cachedLastSuccess;
     int cachedNumBlocks; //used for the overview screen
-    int minBlockSpacing; //required blocks between mixes
-    CMutableTransaction txCollateral;
-
-    int64_t lastNewBlock;
-
-    //debugging data
-    std::string strAutoDenomResult;
 
     CDarksendPool()
     {
@@ -375,13 +373,13 @@ class CDarksendPool
 
     bool SetCollateralAddress(std::string strAddress);
     void Reset();
-    void SetNull(bool clearEverything=false);
+    void SetNull();
 
     void UnlockCoins();
 
     bool IsNull() const
     {
-        return (state == POOL_STATUS_ACCEPTING_ENTRIES && entries.empty() && myEntries.empty());
+        return state == POOL_STATUS_ACCEPTING_ENTRIES && entries.empty();
     }
 
     int GetState() const
@@ -393,11 +391,7 @@ class CDarksendPool
 
     int GetEntriesCount() const
     {
-        if(fMasterNode){
-            return entries.size();
-        } else {
-            return entriesCount;
-        }
+        return entries.size();
     }
 
     /// Get the time the last entry was accepted (time in UTC milliseconds)
@@ -412,17 +406,11 @@ class CDarksendPool
         return countEntriesAccepted;
     }
 
-    /// Get the client's transaction count
-    int GetMyTransactionCount() const
-    {
-        return myEntries.size();
-    }
-
     // Set the 'state' value, with some logging and capturing when the state changed
     void UpdateState(unsigned int newState)
     {
         if (fMasterNode && (newState == POOL_STATUS_ERROR || newState == POOL_STATUS_SUCCESS)){
-            LogPrintf("CDarksendPool::UpdateState() - Can't set state to ERROR or SUCCESS as a Masternode. \n");
+            if(fDebug) LogPrintf("CDarksendPool::UpdateState() - Can't set state to ERROR or SUCCESS as a Masternode. \n");
             return;
         }
 
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 6fdc4be4933e..a4c5751fdbf2 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -502,6 +502,7 @@ void OverviewPage::toggleDarksend(){
 
     if(!fEnableDarksend){
         ui->toggleDarksend->setText(tr("Start Darksend Mixing"));
+        darkSendPool.UnlockCoins();
     } else {
         ui->toggleDarksend->setText(tr("Stop Darksend Mixing"));
 
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index 8c068d70d1fd..cd6ad39d5690 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -72,8 +72,7 @@ Value darksend(const Array& params, bool fHelp)
     }
 
     if(params[0].get_str() == "reset"){
-        darkSendPool.SetNull(true);
-        darkSendPool.UnlockCoins();
+        darkSendPool.Reset();
         return "successfully reset darksend";
     }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 30850254e8f5..4872123f6379 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2345,7 +2345,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
         return _("Error: Wallet locked, unable to create transaction!");
 
     if(darkSendPool.GetState() != POOL_STATUS_ERROR && darkSendPool.GetState() != POOL_STATUS_SUCCESS)
-        if(darkSendPool.GetMyTransactionCount() > 0)
+        if(darkSendPool.GetEntriesCount() > 0)
             return _("Error: You already have pending entries in the Darksend pool");
 
     // ** find the coins we'll use

From ba5e906b9d98ad1319a98ad99c00f8125c42e849 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 26 Jul 2015 02:01:27 +0300
Subject: [PATCH 1710/1819] do not mix 1000 if it's local MN _OR_ input is
 locked - should allow to mix 1000 in all other cases

---
 src/wallet.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 4872123f6379..34a6c804d3d5 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -1193,9 +1193,9 @@ CAmount CWallet::GetAnonymizableBalance(bool includeAlreadyAnonymized) const
                 {
                     CTxIn vin = CTxIn(hash, i);
 
-                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i])) continue;
+                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || IsLockedCoin(hash, i)) continue;
                     if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) continue; // do not count immature
-                    if(pcoin->vout[i].nValue == 1000*COIN) continue; // do not count MN-like outputs
+                    if(fMasterNode && pcoin->vout[i].nValue == 1000*COIN) continue; // do not count MN-like outputs
 
                     int rounds = GetInputDarksendRounds(vin);
                     if(rounds >=-2 && (rounds < nDarksendRounds || (includeAlreadyAnonymized && rounds >= nDarksendRounds))) {
@@ -1450,10 +1450,9 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
 
                     found = IsDenominatedAmount(pcoin->vout[i].nValue);
                 } else if(coin_type == ONLY_NONDENOMINATED || coin_type == ONLY_NONDENOMINATED_NOTMN) {
-                    found = true;
                     if (IsCollateralAmount(pcoin->vout[i].nValue)) continue; // do not use collateral amounts
                     found = !IsDenominatedAmount(pcoin->vout[i].nValue);
-                    if(found && coin_type == ONLY_NONDENOMINATED_NOTMN) found = (pcoin->vout[i].nValue != 1000*COIN); // do not use MN funds
+                    if(found && fMasterNode && coin_type == ONLY_NONDENOMINATED_NOTMN) found = (pcoin->vout[i].nValue != 1000*COIN); // do not use MN funds
                 } else {
                     found = true;
                 }

From c99af0bc63c9c89d4b752853ed1a1193b3df901b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 26 Jul 2015 02:24:19 +0300
Subject: [PATCH 1711/1819] More DS refactoring/fixes: - move ds rounds
 calculation to wallet - add cache to / rework anon/denom balance functions -
 fix updates on new blocks for ds status on overview page - fix after rebase

---
 src/darksend.cpp             | 107 ++-----------------
 src/darksend.h               |   5 -
 src/qt/coincontroldialog.cpp |   4 +-
 src/qt/overviewpage.cpp      |  25 ++---
 src/wallet.cpp               | 199 ++++++++++++++++++++++-------------
 src/wallet.h                 | 167 ++++++++++++++++++++++++-----
 6 files changed, 287 insertions(+), 220 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 84f1183bc74c..66a5102aa278 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -378,101 +378,6 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
 int randomizeList (int i) { return std::rand()%i;}
 
-// Recursively determine the rounds of a given input (How deep is the Darksend chain for a given input)
-int GetRealInputDarksendRounds(CTxIn in, int rounds)
-{
-    static std::map<uint256, CMutableTransaction> mDenomWtxes;
-
-    if(rounds >= 16) return 15; // 16 rounds max
-
-    uint256 hash = in.prevout.hash;
-    unsigned int nout = in.prevout.n;
-
-    CWalletTx wtx;
-    if(pwalletMain->GetTransaction(hash, wtx))
-    {
-        std::map<uint256, CMutableTransaction>::const_iterator mdwi = mDenomWtxes.find(hash);
-        // not known yet, let's add it
-        if(mdwi == mDenomWtxes.end())
-        {
-            if(fDebug) LogPrintf("GetInputDarksendRounds INSERTING %s\n", hash.ToString());
-            mDenomWtxes[hash] = CMutableTransaction(wtx);
-        }
-        // found and it's not an initial value, just return it
-        else if(mDenomWtxes[hash].vout[nout].nRounds != -10)
-        {
-            return mDenomWtxes[hash].vout[nout].nRounds;
-        }
-
-
-        // bounds check
-        if(nout >= wtx.vout.size())
-        {
-            // should never actually hit this
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, -4);
-            return -4;
-        }
-
-        if(pwalletMain->IsCollateralAmount(wtx.vout[nout].nValue))
-        {
-            mDenomWtxes[hash].vout[nout].nRounds = -3;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
-            return mDenomWtxes[hash].vout[nout].nRounds;
-        }
-
-        //make sure the final output is non-denominate
-        if(/*rounds == 0 && */!pwalletMain->IsDenominatedAmount(wtx.vout[nout].nValue)) //NOT DENOM
-        {
-            mDenomWtxes[hash].vout[nout].nRounds = -2;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
-            return mDenomWtxes[hash].vout[nout].nRounds;
-        }
-
-        bool fAllDenoms = true;
-        BOOST_FOREACH(CTxOut out, wtx.vout)
-        {
-            fAllDenoms = fAllDenoms && pwalletMain->IsDenominatedAmount(out.nValue);
-        }
-        // this one is denominated but there is another non-denominated output found in the same tx
-        if(!fAllDenoms)
-        {
-            mDenomWtxes[hash].vout[nout].nRounds = 0;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
-            return mDenomWtxes[hash].vout[nout].nRounds;
-        }
-
-        int nShortest = -10; // an initial value, should be no way to get this by calculations
-        bool fDenomFound = false;
-        // only denoms here so let's look up
-        BOOST_FOREACH(CTxIn in2, wtx.vin)
-        {
-            if(pwalletMain->IsMine(in2))
-            {
-                int n = GetRealInputDarksendRounds(in2, rounds+1);
-                // denom found, find the shortest chain or initially assign nShortest with the first found value
-                if(n >= 0 && (n < nShortest || nShortest == -10))
-                {
-                    nShortest = n;
-                    fDenomFound = true;
-                }
-            }
-        }
-        mDenomWtxes[hash].vout[nout].nRounds = fDenomFound
-                ? (nShortest >= 15 ? 16 : nShortest + 1) // good, we a +1 to the shortest one but only 16 rounds max allowed
-                : 0;            // too bad, we are the fist one in that chain
-        if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
-        return mDenomWtxes[hash].vout[nout].nRounds;
-    }
-
-    return rounds-1;
-}
-
-// respect current settings
-int GetInputDarksendRounds(CTxIn in) {
-    int realDarksendRounds = GetRealInputDarksendRounds(in, 0);
-    return realDarksendRounds > nDarksendRounds ? nDarksendRounds : realDarksendRounds;
-}
-
 void CDarksendPool::Reset(){
     cachedLastSuccess = 0;
     lastNewBlock = 0;
@@ -533,7 +438,7 @@ void CDarksendPool::UnlockCoins(){
 std::string CDarksendPool::GetStatus()
 {
     static int showingDarkSendMessage = 0;
-    showingDarkSendMessage+=3;
+    showingDarkSendMessage += 10;
     std::string suffix = "";
 
     if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing) {
@@ -1438,7 +1343,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 {
     LOCK(cs_darksend);
 
-    if(!masternodeSync.IsListSyncStarted()) {
+    if(!masternodeSync.IsBlockchainSynced()) {
         strAutoDenomResult = _("Can't mix while sync in progress.");
         return false;
     }
@@ -1509,7 +1414,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
         if (pwalletMain->SelectCoinsDark(nValueMin, 9999999*COIN, vCoins, nValueIn, -2, 0))
         {
-            nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true, false, false);
+            nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true) + pwalletMain->GetDenominatedBalance() - pwalletMain->GetAnonymizedBalance();
             nBalanceNeedsDenominated = nBalanceNeedsAnonymized - nOnlyDenominatedBalance;
 
             if(nBalanceNeedsDenominated > nValueIn) nBalanceNeedsDenominated = nValueIn;
@@ -1527,7 +1432,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
     if(fDryRun) return true;
 
-    nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true, false, false);
+    nOnlyDenominatedBalance = pwalletMain->GetDenominatedBalance(true) + pwalletMain->GetDenominatedBalance() - pwalletMain->GetAnonymizedBalance();
     nBalanceNeedsDenominated = nBalanceNeedsAnonymized - nOnlyDenominatedBalance;
 
     //check if we have should create more denominated inputs
@@ -1547,7 +1452,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         int nUseQueue = rand()%100;
         UpdateState(POOL_STATUS_ACCEPTING_ENTRIES);
 
-        if(pwalletMain->GetDenominatedBalance(true, true) > 0){ //get denominated unconfirmed inputs
+        if(pwalletMain->GetDenominatedBalance(true) > 0){ //get denominated unconfirmed inputs
             LogPrintf("DoAutomaticDenominating -- Found unconfirmed denominated outputs, will wait till they confirm to continue.\n");
             strAutoDenomResult = _("Found unconfirmed denominated outputs, will wait till they confirm to continue.");
             return false;
@@ -2306,7 +2211,7 @@ void ThreadCheckDarkSendPool()
         // try to sync from all available nodes, one step at a time
         masternodeSync.Process();
 
-        if(masternodeSync.IsListSyncStarted()) {
+        if(masternodeSync.IsBlockchainSynced()) {
 
             c++;
 
diff --git a/src/darksend.h b/src/darksend.h
index 3134766cee02..e66018bae780 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -56,11 +56,6 @@ extern std::string strMasterNodePrivKey;
 extern map<uint256, CDarksendBroadcastTx> mapDarksendBroadcastTxes;
 extern CActiveMasternode activeMasternode;
 
-// get the Darksend chain depth for a given input
-int GetRealInputDarksendRounds(CTxIn in, int rounds);
-// respect current settings
-int GetInputDarksendRounds(CTxIn in);
-
 /** Holds an Darksend input
  */
 class CTxDSIn : public CTxIn
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index ad6b3c7fded4..770aa4a8377d 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -406,7 +406,7 @@ void CoinControlDialog::viewItemChanged(QTreeWidgetItem* item, int column)
         else {
             coinControl->Select(outpt);
             CTxIn vin(outpt);
-            int rounds = GetInputDarksendRounds(vin);
+            int rounds = pwalletMain->GetInputDarksendRounds(vin);
             if(coinControl->useDarkSend && rounds < nDarksendRounds) {
                 QMessageBox::warning(this, windowTitle(),
                     tr("Non-anonymized input selected. <b>Darksend will be disabled.</b><br><br>If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again."),
@@ -789,7 +789,7 @@ void CoinControlDialog::updateView()
 
             // ds+ rounds
             CTxIn vin = CTxIn(out.tx->GetHash(), out.i);
-            int rounds = GetInputDarksendRounds(vin);
+            int rounds = pwalletMain->GetInputDarksendRounds(vin);
 
             if(rounds >= 0) itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString::number(rounds), 11, " "));
             else itemOutput->setText(COLUMN_DARKSEND_ROUNDS, strPad(QString(tr("n/a")), 11, " "));
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index a4c5751fdbf2..0695ece26c7f 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -157,7 +157,7 @@ OverviewPage::OverviewPage(QWidget *parent) :
             }
             timer = new QTimer(this);
             connect(timer, SIGNAL(timeout()), this, SLOT(darkSendStatus()));
-            timer->start(333);
+            timer->start(1000);
         }
     }
 
@@ -307,7 +307,7 @@ void OverviewPage::showOutOfSyncWarning(bool fShow)
 
 void OverviewPage::updateDarksendProgress()
 {
-    if(IsInitialBlockDownload() || ShutdownRequested()) return;
+    if(!masternodeSync.IsBlockchainSynced() || ShutdownRequested()) return;
 
     if(!pwalletMain) return;
 
@@ -329,8 +329,9 @@ void OverviewPage::updateDarksendProgress()
         return;
     }
 
-    int64_t nDenominatedUnconfirmedBalance = pwalletMain->GetDenominatedBalance(true, true);
-    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance(true) + nDenominatedUnconfirmedBalance;
+    int64_t nDenominatedUnconfirmedBalance = pwalletMain->GetDenominatedBalance(true);
+    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance() +
+            pwalletMain->GetAnonymizedBalance() + nDenominatedUnconfirmedBalance;
 
     // If it's more than the anon threshold, limit to that.
     if(nMaxToAnonymize > nAnonymizeDarkcoinAmount*COIN) nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
@@ -390,22 +391,19 @@ void OverviewPage::updateDarksendProgress()
 
 void OverviewPage::darkSendStatus()
 {
-    static int64_t lastNewBlock = 0;
+    static int64_t nLastDSProgressBlockTime = 0;
 
     int nBestHeight = chainActive.Tip()->nHeight;
 
-    if(nBestHeight != darkSendPool.cachedNumBlocks)
-    {
-        //we we're processing lots of blocks, we'll just leave
-        if(GetTime() - lastNewBlock < 10) return;
-        lastNewBlock = GetTime();
-        updateDarksendProgress();
-    }
+    // we we're processing more then 1 block per second, we'll just leave
+    if(((nBestHeight - darkSendPool.cachedNumBlocks) / (GetTimeMillis() - nLastDSProgressBlockTime + 1) > 1)) return;
+    nLastDSProgressBlockTime = GetTimeMillis();
 
     if(!fEnableDarksend) {
         if(nBestHeight != darkSendPool.cachedNumBlocks)
         {
             darkSendPool.cachedNumBlocks = nBestHeight;
+            updateDarksendProgress();
 
             ui->darksendEnabled->setText(tr("Disabled"));
             ui->darksendStatus->setText("");
@@ -420,8 +418,7 @@ void OverviewPage::darkSendStatus()
     {
         // Balance and number of transactions might have changed
         darkSendPool.cachedNumBlocks = nBestHeight;
-
-        /* *******************************************************/
+        updateDarksendProgress();
 
         ui->darksendEnabled->setText(tr("Enabled"));
     }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 34a6c804d3d5..685ce7e9051b 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -11,7 +11,6 @@
 #include "coincontrol.h"
 #include "net.h"
 #include "masternode-budget.h"
-#include "darksend.h"
 #include "keepass.h"
 #include "instantx.h"
 #include "script/script.h"
@@ -829,6 +828,101 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
     return 0;
 }
 
+// Recursively determine the rounds of a given input (How deep is the Darksend chain for a given input)
+int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
+{
+    static std::map<uint256, CMutableTransaction> mDenomWtxes;
+
+    if(rounds >= 16) return 15; // 16 rounds max
+
+    uint256 hash = in.prevout.hash;
+    unsigned int nout = in.prevout.n;
+
+    const CWalletTx* wtx = GetWalletTx(hash);
+    if(wtx != NULL)
+    {
+        std::map<uint256, CMutableTransaction>::const_iterator mdwi = mDenomWtxes.find(hash);
+        // not known yet, let's add it
+        if(mdwi == mDenomWtxes.end())
+        {
+            if(fDebug) LogPrintf("GetInputDarksendRounds INSERTING %s\n", hash.ToString());
+            mDenomWtxes[hash] = CMutableTransaction(*wtx);
+        }
+        // found and it's not an initial value, just return it
+        else if(mDenomWtxes[hash].vout[nout].nRounds != -10)
+        {
+            return mDenomWtxes[hash].vout[nout].nRounds;
+        }
+
+
+        // bounds check
+        if(nout >= wtx->vout.size())
+        {
+            // should never actually hit this
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, -4);
+            return -4;
+        }
+
+        if(pwalletMain->IsCollateralAmount(wtx->vout[nout].nValue))
+        {
+            mDenomWtxes[hash].vout[nout].nRounds = -3;
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            return mDenomWtxes[hash].vout[nout].nRounds;
+        }
+
+        //make sure the final output is non-denominate
+        if(/*rounds == 0 && */!IsDenominatedAmount(wtx->vout[nout].nValue)) //NOT DENOM
+        {
+            mDenomWtxes[hash].vout[nout].nRounds = -2;
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            return mDenomWtxes[hash].vout[nout].nRounds;
+        }
+
+        bool fAllDenoms = true;
+        BOOST_FOREACH(CTxOut out, wtx->vout)
+        {
+            fAllDenoms = fAllDenoms && IsDenominatedAmount(out.nValue);
+        }
+        // this one is denominated but there is another non-denominated output found in the same tx
+        if(!fAllDenoms)
+        {
+            mDenomWtxes[hash].vout[nout].nRounds = 0;
+            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            return mDenomWtxes[hash].vout[nout].nRounds;
+        }
+
+        int nShortest = -10; // an initial value, should be no way to get this by calculations
+        bool fDenomFound = false;
+        // only denoms here so let's look up
+        BOOST_FOREACH(CTxIn in2, wtx->vin)
+        {
+            if(IsMine(in2))
+            {
+                int n = GetRealInputDarksendRounds(in2, rounds+1);
+                // denom found, find the shortest chain or initially assign nShortest with the first found value
+                if(n >= 0 && (n < nShortest || nShortest == -10))
+                {
+                    nShortest = n;
+                    fDenomFound = true;
+                }
+            }
+        }
+        mDenomWtxes[hash].vout[nout].nRounds = fDenomFound
+                ? (nShortest >= 15 ? 16 : nShortest + 1) // good, we a +1 to the shortest one but only 16 rounds max allowed
+                : 0;            // too bad, we are the fist one in that chain
+        if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+        return mDenomWtxes[hash].vout[nout].nRounds;
+    }
+
+    return rounds-1;
+}
+
+// respect current settings
+int CWallet::GetInputDarksendRounds(CTxIn in) const {
+    int realDarksendRounds = GetRealInputDarksendRounds(in, 0);
+    return realDarksendRounds > nDarksendRounds ? nDarksendRounds : realDarksendRounds;
+}
+
 bool CWallet::IsDenominated(const CTxIn &txin) const
 {
     {
@@ -843,6 +937,22 @@ bool CWallet::IsDenominated(const CTxIn &txin) const
     return false;
 }
 
+bool CWallet::IsDenominated(const CTransaction& tx) const
+{
+    /*
+        Return false if ANY inputs are non-denom
+    */
+    bool ret = true;
+    BOOST_FOREACH(const CTxIn& txin, tx.vin)
+    {
+        if(!IsDenominated(txin)) {
+            ret = false;
+        }
+    }
+    return ret;
+}
+
+
 bool CWallet::IsDenominatedAmount(int64_t nInputAmount) const
 {
     BOOST_FOREACH(int64_t d, darkSendDenominations)
@@ -1175,7 +1285,7 @@ CAmount CWallet::GetBalance() const
     return nTotal;
 }
 
-CAmount CWallet::GetAnonymizableBalance(bool includeAlreadyAnonymized) const
+CAmount CWallet::GetAnonymizableBalance() const
 {
     if(fLiteMode) return 0;
 
@@ -1187,22 +1297,7 @@ CAmount CWallet::GetAnonymizableBalance(bool includeAlreadyAnonymized) const
             const CWalletTx* pcoin = &(*it).second;
 
             if (pcoin->IsTrusted())
-            {
-                uint256 hash = (*it).first;
-                for (unsigned int i = 0; i < pcoin->vout.size(); i++)
-                {
-                    CTxIn vin = CTxIn(hash, i);
-
-                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || IsLockedCoin(hash, i)) continue;
-                    if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0) continue; // do not count immature
-                    if(fMasterNode && pcoin->vout[i].nValue == 1000*COIN) continue; // do not count MN-like outputs
-
-                    int rounds = GetInputDarksendRounds(vin);
-                    if(rounds >=-2 && (rounds < nDarksendRounds || (includeAlreadyAnonymized && rounds >= nDarksendRounds))) {
-                        nTotal += pcoin->vout[i].nValue;
-                    }
-                }
-            }
+               nTotal += pcoin->GetAnonymizableCredit();
         }
     }
 
@@ -1221,20 +1316,7 @@ CAmount CWallet::GetAnonymizedBalance() const
             const CWalletTx* pcoin = &(*it).second;
 
             if (pcoin->IsTrusted())
-            {
-                uint256 hash = (*it).first;
-                for (unsigned int i = 0; i < pcoin->vout.size(); i++)
-                {
-                    CTxIn vin = CTxIn(hash, i);
-
-                    if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
-
-                    int rounds = GetInputDarksendRounds(vin);
-                    if(rounds >= nDarksendRounds){
-                        nTotal += pcoin->vout[i].nValue;
-                    }
-                }
-            }
+                nTotal += pcoin->GetAnonymizedCredit();
         }
     }
 
@@ -1245,6 +1327,8 @@ CAmount CWallet::GetAnonymizedBalance() const
 // that's ok as long as we use it for informational purposes only
 double CWallet::GetAverageAnonymizedRounds() const
 {
+    if(fLiteMode) return 0;
+
     double fTotal = 0;
     double fCount = 0;
 
@@ -1260,7 +1344,7 @@ double CWallet::GetAverageAnonymizedRounds() const
 
                 CTxIn vin = CTxIn(hash, i);
 
-                if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
+                if(IsSpent(hash, i) || IsMine(pcoin->vout[i]) != ISMINE_SPENDABLE || !IsDenominated(vin)) continue;
 
                 int rounds = GetInputDarksendRounds(vin);
                 fTotal += (float)rounds;
@@ -1278,6 +1362,8 @@ double CWallet::GetAverageAnonymizedRounds() const
 // that's ok as long as we use it for informational purposes only
 CAmount CWallet::GetNormalizedAnonymizedBalance() const
 {
+    if(fLiteMode) return 0;
+
     CAmount nTotal = 0;
 
     {
@@ -1292,7 +1378,8 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const
 
                 CTxIn vin = CTxIn(hash, i);
 
-                if(IsSpent(hash, i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
+                if(IsSpent(hash, i) || IsMine(pcoin->vout[i]) != ISMINE_SPENDABLE || !IsDenominated(vin)) continue;
+                if (pcoin->GetDepthInMainChain() < 0) continue;
 
                 int rounds = GetInputDarksendRounds(vin);
                 nTotal += pcoin->vout[i].nValue * rounds / nDarksendRounds;
@@ -1303,8 +1390,10 @@ CAmount CWallet::GetNormalizedAnonymizedBalance() const
     return nTotal;
 }
 
-CAmount CWallet::GetDenominatedBalance(bool denom, bool unconfirmed, bool includeAlreadyAnonymized) const
+CAmount CWallet::GetDenominatedBalance(bool unconfirmed) const
 {
+    if(fLiteMode) return 0;
+
     CAmount nTotal = 0;
     {
         LOCK2(cs_main, cs_wallet);
@@ -1312,32 +1401,10 @@ CAmount CWallet::GetDenominatedBalance(bool denom, bool unconfirmed, bool includ
         {
             const CWalletTx* pcoin = &(*it).second;
 
-            int nDepth = pcoin->GetDepthInMainChain(false);
-
-            // skip conflicted
-            if(nDepth < 0) continue;
-
-            bool isUnconfirmed = (!IsFinalTx(*pcoin) || (!pcoin->IsTrusted() && nDepth == 0));
-            if(unconfirmed != isUnconfirmed) continue;
-            uint256 hash = (*it).first;
-
-            for (unsigned int i = 0; i < pcoin->vout.size(); i++)
-            {
-                if(IsSpent(hash, i)) continue;
-                if(!IsMine(pcoin->vout[i])) continue;
-                if(denom != IsDenominatedAmount(pcoin->vout[i].nValue)) continue;
-
-                CTxIn vin = CTxIn(hash, i);
-                int rounds = GetInputDarksendRounds(vin);
-                if(!includeAlreadyAnonymized && rounds >= nDarksendRounds) continue;
-
-                nTotal += pcoin->vout[i].nValue;
-            }
+            nTotal += pcoin->GetDenominatedCredit(unconfirmed);
         }
     }
 
-
-
     return nTotal;
 }
 
@@ -1884,7 +1951,7 @@ int CWallet::CountInputsWithAmount(int64_t nInputAmount)
 
                     if(out.tx->vout[out.i].nValue != nInputAmount) continue;
                     if(!IsDenominatedAmount(pcoin->vout[i].nValue)) continue;
-                    if(IsSpent(out.tx->GetHash(), i) || !IsMine(pcoin->vout[i]) || !IsDenominated(vin)) continue;
+                    if(IsSpent(out.tx->GetHash(), i) || IsMine(pcoin->vout[i]) != ISMINE_SPENDABLE || !IsDenominated(vin)) continue;
 
                     nTotal++;
                 }
@@ -2551,20 +2618,6 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
     return CWalletDB(strWalletFile).EraseName(CBitcoinAddress(address).ToString());
 }
 
-bool CWallet::GetTransaction(const uint256 &hashTx, CWalletTx& wtx)
-{
-    {
-        LOCK(cs_wallet);
-        map<uint256, CWalletTx>::iterator mi = mapWallet.find(hashTx);
-        if (mi != mapWallet.end())
-        {
-            wtx = (*mi).second;
-            return true;
-        }
-    }
-    return false;
-}
-
 bool CWallet::SetDefaultKey(const CPubKey &vchPubKey)
 {
     if (fFileBacked)
diff --git a/src/wallet.h b/src/wallet.h
index 903780025a03..106c919afa50 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -157,7 +157,6 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
 
     bool SelectCoinsCollateral(std::vector<CTxIn>& setCoinsRet, int64_t& nValueRet) const ;
     bool SelectCoinsWithoutDenomination(int64_t nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64_t& nValueRet) const;
-    bool GetTransaction(const uint256 &hashTx, CWalletTx& wtx);
 
     /*
      * Main wallet lock.
@@ -310,11 +309,11 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     CAmount GetBalance() const;
     CAmount GetUnconfirmedBalance() const;
     CAmount GetImmatureBalance() const;
-    CAmount GetAnonymizableBalance(bool includeAlreadyAnonymized=false) const;
+    CAmount GetAnonymizableBalance() const;
     CAmount GetAnonymizedBalance() const;
     double GetAverageAnonymizedRounds() const;
     CAmount GetNormalizedAnonymizedBalance() const;
-    CAmount GetDenominatedBalance(bool denom=true, bool unconfirmed=false, bool includeAlreadyAnonymized = true) const;
+    CAmount GetDenominatedBalance(bool unconfirmed=false) const;
     CAmount GetWatchOnlyBalance() const;
     CAmount GetUnconfirmedWatchOnlyBalance() const;
     CAmount GetImmatureWatchOnlyBalance() const;
@@ -348,22 +347,13 @@ class CWallet : public CCryptoKeyStore, public CValidationInterface
     bool GetBudgetSystemCollateralTX(CTransaction& tx, uint256 hash, bool useIX);
     bool GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useIX);
 
-    bool IsDenominated(const CTxIn &txin) const;
+    // get the Darksend chain depth for a given input
+    int GetRealInputDarksendRounds(CTxIn in, int rounds) const;
+    // respect current settings
+    int GetInputDarksendRounds(CTxIn in) const;
 
-    bool IsDenominated(const CTransaction& tx) const
-    {
-        /*
-            Return false if ANY inputs are non-denom
-        */
-        bool ret = true;
-        BOOST_FOREACH(const CTxIn& txin, tx.vin)
-        {
-            if(!IsDenominated(txin)) {
-                ret = false;
-            }
-        }
-        return ret;
-    }
+    bool IsDenominated(const CTxIn &txin) const;
+    bool IsDenominated(const CTransaction& tx) const;
 
     bool IsDenominatedAmount(int64_t nInputAmount) const;
 
@@ -633,6 +623,10 @@ class CWalletTx : public CMerkleTx
     mutable bool fCreditCached;
     mutable bool fImmatureCreditCached;
     mutable bool fAvailableCreditCached;
+    mutable bool fAnonymizableCreditCached;
+    mutable bool fAnonymizedCreditCached;
+    mutable bool fDenomUnconfCreditCached;
+    mutable bool fDenomConfCreditCached;
     mutable bool fWatchDebitCached;
     mutable bool fWatchCreditCached;
     mutable bool fImmatureWatchCreditCached;
@@ -642,6 +636,10 @@ class CWalletTx : public CMerkleTx
     mutable CAmount nCreditCached;
     mutable CAmount nImmatureCreditCached;
     mutable CAmount nAvailableCreditCached;
+    mutable CAmount nAnonymizableCreditCached;
+    mutable CAmount nAnonymizedCreditCached;
+    mutable CAmount nDenomUnconfCreditCached;
+    mutable CAmount nDenomConfCreditCached;
     mutable CAmount nWatchDebitCached;
     mutable CAmount nWatchCreditCached;
     mutable CAmount nImmatureWatchCreditCached;
@@ -682,6 +680,10 @@ class CWalletTx : public CMerkleTx
         fCreditCached = false;
         fImmatureCreditCached = false;
         fAvailableCreditCached = false;
+        fAnonymizableCreditCached = false;
+        fAnonymizedCreditCached = false;
+        fDenomUnconfCreditCached = false;
+        fDenomConfCreditCached = false;
         fWatchDebitCached = false;
         fWatchCreditCached = false;
         fImmatureWatchCreditCached = false;
@@ -691,6 +693,10 @@ class CWalletTx : public CMerkleTx
         nCreditCached = 0;
         nImmatureCreditCached = 0;
         nAvailableCreditCached = 0;
+        nAnonymizableCreditCached = 0;
+        nAnonymizedCreditCached = 0;
+        nDenomUnconfCreditCached = 0;
+        nDenomConfCreditCached = 0;
         nWatchDebitCached = 0;
         nWatchCreditCached = 0;
         nAvailableWatchCreditCached = 0;
@@ -748,6 +754,10 @@ class CWalletTx : public CMerkleTx
     {
         fCreditCached = false;
         fAvailableCreditCached = false;
+        fAnonymizableCreditCached = false;
+        fAnonymizedCreditCached = false;
+        fDenomUnconfCreditCached = false;
+        fDenomConfCreditCached = false;
         fWatchDebitCached = false;
         fWatchCreditCached = false;
         fAvailableWatchCreditCached = false;
@@ -794,13 +804,6 @@ class CWalletTx : public CMerkleTx
         return debit;
     }
 
-    int64_t IsDenominated() const
-    {
-        if (vin.empty())
-            return 0;
-        return pwallet->IsDenominated(*this);
-    }
-
     CAmount GetCredit(const isminefilter& filter) const
     {
         // Must wait until coinbase is safely deep enough in the chain before valuing it
@@ -878,6 +881,120 @@ class CWalletTx : public CMerkleTx
         return nCredit;
     }
 
+    CAmount GetAnonymizableCredit(bool fUseCache=true) const
+    {
+        if (pwallet == 0)
+            return 0;
+
+        // Must wait until coinbase is safely deep enough in the chain before valuing it
+        if (IsCoinBase() && GetBlocksToMaturity() > 0)
+            return 0;
+
+        if (fUseCache && fAnonymizableCreditCached)
+            return nAnonymizableCreditCached;
+
+        CAmount nCredit = 0;
+        uint256 hashTx = GetHash();
+        for (unsigned int i = 0; i < vout.size(); i++)
+        {
+            const CTxOut &txout = vout[i];
+            const CTxIn vin = CTxIn(hashTx, i);
+
+            if(pwallet->IsSpent(hashTx, i) || pwallet->IsLockedCoin(hashTx, i)) continue;
+            if(fMasterNode && vout[i].nValue == 1000*COIN) continue; // do not count MN-like outputs
+
+            const int rounds = pwallet->GetInputDarksendRounds(vin);
+            if(rounds >=-2 && rounds < nDarksendRounds) {
+                nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
+                if (!MoneyRange(nCredit))
+                    throw std::runtime_error("CWalletTx::GetAnonamizableCredit() : value out of range");
+            }
+        }
+
+        nAnonymizableCreditCached = nCredit;
+        fAnonymizableCreditCached = true;
+        return nCredit;
+    }
+
+    CAmount GetAnonymizedCredit(bool fUseCache=true) const
+    {
+        if (pwallet == 0)
+            return 0;
+
+        // Must wait until coinbase is safely deep enough in the chain before valuing it
+        if (IsCoinBase() && GetBlocksToMaturity() > 0)
+            return 0;
+
+        if (fUseCache && fAnonymizedCreditCached)
+            return nAnonymizedCreditCached;
+
+        CAmount nCredit = 0;
+        uint256 hashTx = GetHash();
+        for (unsigned int i = 0; i < vout.size(); i++)
+        {
+            const CTxOut &txout = vout[i];
+            const CTxIn vin = CTxIn(hashTx, i);
+
+            if(pwallet->IsSpent(hashTx, i) || !pwallet->IsDenominated(vin)) continue;
+
+            const int rounds = pwallet->GetInputDarksendRounds(vin);
+            if(rounds >= nDarksendRounds){
+                nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
+                if (!MoneyRange(nCredit))
+                    throw std::runtime_error("CWalletTx::GetAnonymizedCredit() : value out of range");
+            }
+        }
+
+        nAnonymizedCreditCached = nCredit;
+        fAnonymizedCreditCached = true;
+        return nCredit;
+    }
+
+    CAmount GetDenominatedCredit(bool unconfirmed, bool fUseCache=true) const
+    {
+        if (pwallet == 0)
+            return 0;
+
+        // Must wait until coinbase is safely deep enough in the chain before valuing it
+        if (IsCoinBase() && GetBlocksToMaturity() > 0)
+            return 0;
+
+        int nDepth = GetDepthInMainChain(false);
+        if(nDepth < 0) return 0;
+
+        bool isUnconfirmed = !IsFinalTx(*this) || (!IsTrusted() && nDepth == 0);
+        if(unconfirmed != isUnconfirmed) return 0;
+
+        if (fUseCache) {
+            if(unconfirmed && fDenomUnconfCreditCached)
+                return nDenomUnconfCreditCached;
+            else if (!unconfirmed && fDenomConfCreditCached)
+                return nDenomConfCreditCached;
+        }
+
+        CAmount nCredit = 0;
+        uint256 hashTx = GetHash();
+        for (unsigned int i = 0; i < vout.size(); i++)
+        {
+            const CTxOut &txout = vout[i];
+
+            if(pwallet->IsSpent(hashTx, i) || !pwallet->IsDenominatedAmount(vout[i].nValue)) continue;
+
+            nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
+            if (!MoneyRange(nCredit))
+                throw std::runtime_error("CWalletTx::GetDenominatedCredit() : value out of range");
+        }
+
+        if(unconfirmed) {
+            nDenomUnconfCreditCached = nCredit;
+            fDenomUnconfCreditCached = true;
+        } else {
+            nDenomConfCreditCached = nCredit;
+            fDenomConfCreditCached = true;
+        }
+        return nCredit;
+    }
+
     CAmount GetImmatureWatchOnlyCredit(const bool& fUseCache=true) const
     {
         if (IsCoinBase() && GetBlocksToMaturity() > 0 && IsInMainChain())

From 8a3f3428dd71b5a099bbdc67c888dddcd82d5b24 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 27 Jul 2015 15:10:28 +0300
Subject: [PATCH 1712/1819] move ds/ix/mn lib to wallet category

---
 src/Makefile.am | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 904c34821be8..92eaca819a13 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -173,7 +173,6 @@ libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
 # server: shared between dashd and dash-qt
 libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
 libbitcoin_server_a_SOURCES = \
-  activemasternode.cpp \
   addrman.cpp \
   alert.cpp \
   bloom.cpp \
@@ -208,8 +207,17 @@ libbitcoin_server_a_SOURCES = \
 libbitcoin_wallet_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_wallet_a_SOURCES = \
   activemasternode.cpp \
+  darksend.cpp \
+  darksend-relay.cpp \
   db.cpp \
   crypter.cpp \
+  instantx.cpp \
+  masternode.cpp \
+  masternode-budget.cpp \
+  masternode-payments.cpp \
+  masternode-sync.cpp \
+  masternodeconfig.cpp \
+  masternodeman.cpp \
   rpcdump.cpp \
   rpcwallet.cpp \
   wallet.cpp \
@@ -273,20 +281,10 @@ univalue_libbitcoin_univalue_a_SOURCES = \
 # common: shared between dashd, and dash-qt and non-server tools
 libbitcoin_common_a_CPPFLAGS = $(BITCOIN_INCLUDES)
 libbitcoin_common_a_SOURCES = \
-  activemasternode.cpp \
   allocators.cpp \
   amount.cpp \
   base58.cpp \
   chainparams.cpp \
-  darksend.cpp \
-  darksend-relay.cpp \
-  masternode.cpp \
-  masternode-budget.cpp \
-  masternode-sync.cpp \
-  masternode-payments.cpp \
-  masternodeman.cpp \
-  masternodeconfig.cpp \
-  instantx.cpp \
   coins.cpp \
   compressor.cpp \
   primitives/block.cpp \

From 6c7d66f0c19e0d84db9c42661c6ffe5e8700f89b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 29 Jul 2015 18:06:45 +0300
Subject: [PATCH 1713/1819] add cs_wallet lock on GetInputDarksendRounds

---
 src/wallet.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 685ce7e9051b..57bf2b78d722 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -919,6 +919,7 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
 
 // respect current settings
 int CWallet::GetInputDarksendRounds(CTxIn in) const {
+    LOCK(cs_wallet);
     int realDarksendRounds = GetRealInputDarksendRounds(in, 0);
     return realDarksendRounds > nDarksendRounds ? nDarksendRounds : realDarksendRounds;
 }

From 36bb9d6e27b5b708fd1aa7b209bdc7d61c74af68 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 29 Jul 2015 18:11:43 +0300
Subject: [PATCH 1714/1819] FindRandomNotInVec - should give less failures then
 FindRandom on doauto

---
 src/darksend.cpp      | 16 +++-------------
 src/masternodeman.cpp | 29 ++++++++++++++++++++++++++---
 src/masternodeman.h   |  2 +-
 3 files changed, 30 insertions(+), 17 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 66a5102aa278..8a65e4cb2c6a 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1544,23 +1544,13 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         // otherwise, try one randomly
         while(i < 10)
         {
-            CMasternode* pmn = mnodeman.FindRandom();
+            CMasternode* pmn = mnodeman.FindRandomNotInVec(vecMasternodesUsed, MIN_POOL_PEER_PROTO_VERSION);
             if(pmn == NULL)
             {
-                LogPrintf("DoAutomaticDenominating --- Masternode list is empty!\n");
+                LogPrintf("DoAutomaticDenominating --- Can't find random masternode!\n");
+                strAutoDenomResult = _("Can't find random Masternode.");
                 return false;
             }
-            //don't reuse Masternodes
-            BOOST_FOREACH(CTxIn usedVin, vecMasternodesUsed) {
-                if(pmn->vin == usedVin){
-                    i++;
-                    continue;
-                }
-            }
-            if(pmn->protocolVersion < MIN_POOL_PEER_PROTO_VERSION) {
-                i++;
-                continue;
-            }
 
             if(pmn->nLastDsq != 0 &&
                 pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 96625838ab73..68c25edcf6fe 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -441,13 +441,36 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
     return pBestMasternode;
 }
 
-CMasternode *CMasternodeMan::FindRandom()
+CMasternode *CMasternodeMan::FindRandomNotInVec(std::vector<CTxIn> &vecToExclude, int protocolVersion)
 {
     LOCK(cs);
 
-    if(size() == 0) return NULL;
+    protocolVersion = protocolVersion == -1 ? masternodePayments.GetMinMasternodePaymentsProto() : protocolVersion;
+
+    int nCountEnabled = CountEnabled(protocolVersion);
+    LogPrintf("CMasternodeMan::FindRandomNotInVec - nCountEnabled - vecToExclude.size() %d\n", nCountEnabled - vecToExclude.size());
+    if(nCountEnabled - vecToExclude.size() < 1) return NULL;
+
+    int rand = GetRandInt(nCountEnabled - vecToExclude.size());
+    LogPrintf("CMasternodeMan::FindRandomNotInVec - rand %d\n", rand);
+    bool found;
 
-    return &vMasternodes[GetRandInt(vMasternodes.size())];
+    BOOST_FOREACH(CMasternode &mn, vMasternodes) {
+        if(mn.protocolVersion < protocolVersion || !mn.IsEnabled()) continue;
+        found = false;
+        BOOST_FOREACH(CTxIn &usedVin, vecToExclude) {
+            if(mn.vin.prevout == usedVin.prevout) {
+                found = true;
+                break;
+            }
+        }
+        if(found) continue;
+        if(--rand < 1) {
+            return &mn;
+        }
+    }
+
+    return NULL;
 }
 
 CMasternode* CMasternodeMan::GetCurrentMasterNode(int mod, int64_t nBlockHeight, int minProtocol)
diff --git a/src/masternodeman.h b/src/masternodeman.h
index aeac14748636..50a82f5371df 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -116,7 +116,7 @@ class CMasternodeMan
     CMasternode* GetNextMasternodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime=true);
 
     /// Find a random entry
-    CMasternode* FindRandom();
+    CMasternode* FindRandomNotInVec(std::vector<CTxIn> &vecToExclude, int protocolVersion = -1);
 
     /// Get the current winner for this block
     CMasternode* GetCurrentMasterNode(int mod=1, int64_t nBlockHeight=0, int minProtocol=0);

From 0e7b73e166f1bd16aae35fa916c58df546e2572a Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Wed, 29 Jul 2015 23:58:57 +0200
Subject: [PATCH 1715/1819] UI: better alignment of overview-screen

---
 src/qt/res/css/drkblue.css                 |  15 ++++++++++-----
 src/qt/res/images/dash_logo_horizontal.png | Bin 8011 -> 7194 bytes
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index c4ac9a792948..127a580b720a 100644
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -874,7 +874,7 @@ font-weight:bold;
 font-size:14px;
 min-height:35px;
 }
-
+/******************************************************************/
 QWidget .QFrame#frameDarksend .QLabel#labelDarksendSyncStatus { /* Darksend Sync Status */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
 margin-left:20px;
@@ -890,6 +890,7 @@ font-weight:normal;
 min-height:25px;
 }
 
+
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_6 { /* Darksend Status Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
 min-width:160px;
@@ -1041,15 +1042,16 @@ QWidget .QFrame#frame_2 { /* Transactions Widget */
 min-width:410px;
 margin-right:20px;
 margin-left:0;
+margin-top:0;
 background-image: url(':/images/dash_logo_horizontal');
 background-repeat:none;
 }
 
 QWidget .QFrame#frame_2 .QLabel#label_4 { /* Recent Transactions Label */
-min-width:200px;
+min-width:180px;
 color:#3398CC;
 margin-left:67px;
-margin-top:123px;
+margin-top:83px;
 margin-right:5px;
 padding-right:5px;
 font-weight:bold;
@@ -1058,9 +1060,11 @@ min-height:24px;
 }
 
 QWidget .QFrame#frame_2 .QLabel#labelTransactionsStatus { /* Recent Transactions Sync Status */
-qproperty-alignment: 'AlignBottom | AlignLeft';
-margin-top:123px;
+qproperty-alignment: 'AlignBottom | AlignRight';
+min-width:93px;
+margin-top:83px;
 margin-left:16px;
+margin-right:5px;
 min-height:16px;
 }
 
@@ -1068,6 +1072,7 @@ QWidget .QFrame#frame_2 QListView { /* Transaction List */
 font-weight:normal;
 font-size:12px;
 max-width:369px;
+margin-top:12px;
 margin-left:0px; /* CSS Voodoo - set to -66px to hide default transaction icons */
 }
 
diff --git a/src/qt/res/images/dash_logo_horizontal.png b/src/qt/res/images/dash_logo_horizontal.png
index b82d43bc42236bab1b2ad8fc5828420ce13f1127..961a8ebfe6d57606e3eff2db03b5bff1327b4233 100644
GIT binary patch

From 805452955b45cfdfe20c323e573b0fc885e24674 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 29 Jul 2015 18:26:21 -0700
Subject: [PATCH 1716/1819] Proposal nTime based on fee transaction block

---
 src/activemasternode.cpp     |  6 ------
 src/masternode-budget.cpp    | 28 +++++++++++-----------------
 src/masternode-budget.h      | 10 +++++-----
 src/rpcmasternode-budget.cpp | 21 ++++++---------------
 4 files changed, 22 insertions(+), 43 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 9759781ffb04..6a621c51f5b8 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -227,12 +227,6 @@ bool CActiveMasternode::Register(std::string strService, std::string strKeyMaste
         return false;
     }
 
-    if(!ConnectNode((CAddress)service, service.ToString().c_str())){
-        errorMessage = strprintf("Error: Could not connect to %s", service.ToString());
-        LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
-        return false;
-    }
-
     return Register(vin, CService(strService), keyCollateralAddress, pubKeyCollateralAddress, keyMasternode, pubKeyMasternode, errorMessage);
 }
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 93b3f124a35d..399e25159dec 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -30,7 +30,7 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError)
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime)
 {
     CTransaction txCollateral;
     uint256 nBlockHash;
@@ -69,6 +69,7 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
             CBlockIndex* pindex = (*mi).second;
             if (chainActive.Contains(pindex)) {
                 conf += chainActive.Height() - pindex->nHeight + 1;
+                nTime = pindex->nTime;
             }
         }
     }
@@ -88,6 +89,7 @@ void CBudgetManager::CheckOrphanVotes()
     LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
+
     std::string strError = "";
     std::map<uint256, CBudgetVote>::iterator it1 = mapOrphanMasternodeBudgetVotes.begin();
     while(it1 != mapOrphanMasternodeBudgetVotes.end()){
@@ -906,7 +908,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, finalizedBudgetBroadcast.GetHash(), strError)){
+        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, finalizedBudgetBroadcast.GetHash(), strError, finalizedBudgetBroadcast.nTime)){
             LogPrintf("Finalized Budget FeeTX is not valid - %s - %s\n", finalizedBudgetBroadcast.nFeeTXHash.ToString(), strError);
             return;
         }
@@ -1098,7 +1100,7 @@ CBudgetProposal::CBudgetProposal()
     fValid = true;
 }
 
-CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn, int64_t nTimeIn)
+CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn)
 {
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
@@ -1106,7 +1108,6 @@ CBudgetProposal::CBudgetProposal(std::string strProposalNameIn, std::string strU
     nBlockEnd = nBlockEndIn;
     address = addressIn;
     nAmount = nAmountIn;
-    nTime = nTimeIn;
     nFeeTXHash = nFeeTXHashIn;
     fValid = true;
 }
@@ -1143,14 +1144,7 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     }
 
     if(fCheckCollateral){
-        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError)){
-            return false;
-        }
-    }
-
-    if(masternodeSync.IsSynced()) {
-        if(nTime < GetTime() - (60*60*2) || nTime < GetTime() - (60*60)) {
-            strError = "Time is out of acceptable range.";
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError, nTime)){
             return false;
         }
     }
@@ -1341,8 +1335,8 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast()
     nBlockStart = 0;
     nBlockEnd = 0;
     nAmount = 0;
-    nTime = 0;
     nFeeTXHash = 0;
+    nTime = 0;
 }
 
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
@@ -1357,7 +1351,7 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
     nTime = other.nTime;
 }
 
-CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn, int64_t nTimeIn)
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn)
 {
     strProposalName = strProposalNameIn;
     strURL = strURLIn;
@@ -1372,8 +1366,6 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn
     nAmount = nAmountIn;
 
     nFeeTXHash = nFeeTXHashIn;
-
-    nTime = nTimeIn;
 }
 
 void CBudgetProposalBroadcast::Relay()
@@ -1458,6 +1450,7 @@ CFinalizedBudget::CFinalizedBudget()
     vecBudgetPayments.clear();
     mapVotes.clear();
     nFeeTXHash = 0;
+    nTime = 0;
     fValid = true;
 }
 
@@ -1468,6 +1461,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
     vecBudgetPayments = other.vecBudgetPayments;
     mapVotes = other.mapVotes;
     nFeeTXHash = other.nFeeTXHash;
+    nTime = other.nTime;
     fValid = true;
 }
 
@@ -1652,7 +1646,7 @@ bool CFinalizedBudget::IsValid(std::string& strError, bool fCheckCollateral)
 
     std::string strError2 = "";
     if(fCheckCollateral){
-        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError2)){
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError2, nTime)){
             {strError = "Invalid Collateral : " + strError2; return false;}
         }
     }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index f7e1bc352fa5..ffe0be3b6526 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -43,7 +43,7 @@ void DumpBudgets();
 int GetBudgetPaymentCycleBlocks();
 
 //Check the collateral transaction for the budget proposal/finalized budget
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError);
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime);
 
 /** Save Budget Manager (budget.dat)
  */
@@ -208,6 +208,7 @@ class CFinalizedBudget
     std::vector<CTxBudgetPayment> vecBudgetPayments;
     map<uint256, CFinalizedBudgetVote> mapVotes;
     uint256 nFeeTXHash;
+    int64_t nTime;
 
     CFinalizedBudget();
     CFinalizedBudget(const CFinalizedBudget& other);
@@ -276,6 +277,7 @@ class CFinalizedBudget
     inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
         READWRITE(LIMITED_STRING(strBudgetName, 20));
         READWRITE(nFeeTXHash);
+        READWRITE(nTime);
         READWRITE(nBlockStart);
         READWRITE(vecBudgetPayments);
 
@@ -381,7 +383,7 @@ class CBudgetProposal
 
     CBudgetProposal();
     CBudgetProposal(const CBudgetProposal& other);
-    CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn, int64_t nTimeIn);
+    CBudgetProposal(std::string strProposalNameIn, std::string strURLIn, int nBlockStartIn, int nBlockEndIn, CScript addressIn, CAmount nAmountIn, uint256 nFeeTXHashIn);
 
     void Calculate();
     bool AddOrUpdateVote(CBudgetVote& vote, std::string& strError);
@@ -413,7 +415,6 @@ class CBudgetProposal
     int GetNays();
     int GetAbstains();
     CAmount GetAmount() {return nAmount;}
-
     void SetAllotted(CAmount nAllotedIn) {nAlloted = nAllotedIn;}
     CAmount GetAllotted() {return nAlloted;}
 
@@ -423,7 +424,6 @@ class CBudgetProposal
         CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION);
         ss << strProposalName;
         ss << strURL;
-        ss << nTime;
         ss << nBlockStart;
         ss << nBlockEnd;
         ss << nAmount;
@@ -462,7 +462,7 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 public:
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
-    CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn, int64_t nTimeIn);
+    CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn);
 
     void Relay();
 
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 9db8a43d359f..d0da9c586933 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -92,7 +92,7 @@ Value mnbudget(const Array& params, bool fHelp)
         //*************************************************************************
 
         // create transaction 15 minutes into the future, to allow for confirmation time
-        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0, GetAdjustedTime()+(60*15));
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, 0);
 
         std::string strError = "";
         if(!budgetProposalBroadcast.IsValid(strError, false))
@@ -113,12 +113,7 @@ Value mnbudget(const Array& params, bool fHelp)
         //send the tx to the network
         pwalletMain->CommitTransaction(wtx, reservekey, useIX ? "ix" : "tx");
 
-
-        Object returnObj;
-        returnObj.push_back(Pair("fee_tx", wtx.GetHash().ToString()));
-        returnObj.push_back(Pair("time", (int64_t)budgetProposalBroadcast.nTime));
-
-        return returnObj;
+        return wtx.GetHash().ToString();
     }
 
     if(strCommand == "submit")
@@ -129,8 +124,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 9)
-            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address monthly_payment_dash fee_tx nTime'");
+        if (params.size() != 8)
+            throw runtime_error("Correct usage is 'mnbudget submit proposal-name url payment_count block_start dash_address monthly_payment_dash fee_tx'");
 
         // Check these inputs the same way we check the vote commands:
         // **********************************************************
@@ -172,16 +167,12 @@ Value mnbudget(const Array& params, bool fHelp)
         CScript scriptPubKey = GetScriptForDestination(address.Get());
         CAmount nAmount = AmountFromValue(params[6]);
         uint256 hash = ParseHashV(params[7], "parameter 1");
-        int64_t nTime = params[8].get_int();
-
-        if(nTime < GetTime() - (60*60*2) || nTime > GetTime() + (60*60))
-            return "nTime is out of range, you must submit the proposal within 2 hours of creating the original colateral transaction";
 
         //create the proposal incase we're the first to make it
-        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash, nTime);
+        CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError)){
+        if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime)){
             return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
         }
 

From 3fc9ea4adff3f72949b1fc163a6581ce11c25db0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 01:33:37 -0700
Subject: [PATCH 1717/1819] Disable CheckAndRemove on file dumps - Testing
 theory for lockups

---
 src/darksend.cpp            | 1 -
 src/masternode-budget.cpp   | 4 ++--
 src/masternode-payments.cpp | 4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 8a65e4cb2c6a..6f54864e4436 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2222,7 +2222,6 @@ void ThreadCheckDarkSendPool()
                 }
 
                 mnodeman.ProcessMasternodeConnections();
-                masternodePayments.CleanPaymentList();
                 CleanTransactionLocksList();
 
                 //if we've used 90% of the Masternode list then drop all the oldest.
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 399e25159dec..d25bfd4eccaf 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -319,8 +319,8 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad, bool fDryRun)
     LogPrintf("Loaded info from budget.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", objToLoad.ToString());
     if(!fDryRun) {
-        LogPrintf("Budget manager - cleaning....\n");
-        objToLoad.CheckAndRemove();
+        //LogPrintf("Budget manager - cleaning....\n");
+        //objToLoad.CheckAndRemove();
         LogPrintf("Budget manager - result:\n");
         LogPrintf("  %s\n", objToLoad.ToString());
     }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 653846ad1bb3..2100f5ec8fbf 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -144,8 +144,8 @@ CMasternodePaymentDB::ReadResult CMasternodePaymentDB::Read(CMasternodePayments&
     LogPrintf("Loaded info from mnpayments.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", objToLoad.ToString());
     if(!fDryRun) {
-        LogPrintf("Masternode payments manager - cleaning....\n");
-        objToLoad.CleanPaymentList();
+        //LogPrintf("Masternode payments manager - cleaning....\n");
+        //objToLoad.CleanPaymentList();
         LogPrintf("Masternode payments manager - result:\n");
         LogPrintf("  %s\n", objToLoad.ToString());
     }

From 3a72bea5b383b9841aefbcbf455b69c57360e2ed Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 01:51:48 -0700
Subject: [PATCH 1718/1819] fixed sync edge case

---
 src/masternode-budget.cpp |  2 +-
 src/masternode-sync.cpp   | 26 ++++++++++++++++----------
 src/masternode-sync.h     |  1 +
 3 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index d25bfd4eccaf..7332694b2806 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -539,7 +539,7 @@ bool CBudgetManager::HasNextFinalizedBudget()
 
     if(budget.IsBudgetPaymentBlock(nBlockStart)) return true;
 
-    LogPrintf("CBudgetManager::HasNextFinalizedBudget() - Client is missing budget\n");
+    LogPrintf("CBudgetManager::HasNextFinalizedBudget() - Client is missing budget - %lli\n", nBlockStart);
 
     return false;
 }
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 8d210e8251d1..d3bbd756140f 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -93,6 +93,7 @@ void CMasternodeSync::GetNextAsset()
             countBudgetItemProp = 0;
             countBudgetItemFin = 0;  
             RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
+            ClearFulfilledRequest();
             break;
         case(MASTERNODE_SYNC_SPORKS):
             RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
@@ -150,7 +151,19 @@ void CMasternodeSync::ProcessMessage(CNode* pfrom, std::string& strCommand, CDat
                 break;
         }
         
-        LogPrintf("ssc - got inventory count %d %d\n", nItemID, nCount);
+        LogPrintf("CMasternodeSync:ProcessMessage - ssc - got inventory count %d %d\n", nItemID, nCount);
+    }
+}
+
+void CMasternodeSync::ClearFulfilledRequest()
+{
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+    {
+        pnode->ClearFulfilledRequest("getspork");
+        pnode->ClearFulfilledRequest("mnsync");
+        pnode->ClearFulfilledRequest("mnwsync");
+        pnode->ClearFulfilledRequest("busync");
     }
 }
 
@@ -168,15 +181,7 @@ void CMasternodeSync::Process()
             Resync if we lose all masternodes from sleep/wake or failure to sync originally
         */
         if(mnodeman.CountEnabled() == 0) {
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-            {
-                pnode->ClearFulfilledRequest("getspork");
-                pnode->ClearFulfilledRequest("mnsync");
-                pnode->ClearFulfilledRequest("mnwsync");
-                pnode->ClearFulfilledRequest("busync");
-            }
-
+            ClearFulfilledRequest();
             RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
         } else
             return;
@@ -273,6 +278,7 @@ void CMasternodeSync::Process()
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
+                    LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
                     if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
                         GetNextAsset();
 
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 74da058f9b69..7fa947a116a7 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -61,6 +61,7 @@ class CMasternodeSync
     void Process();
     bool IsSynced();
     bool IsBlockchainSynced();
+    void ClearFulfilledRequest();
 };
 
 #endif

From 3f4727716a3b41f6687c676618b1bcd87bd17e33 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 06:18:31 -0700
Subject: [PATCH 1719/1819] disable sync-retry

---
 src/masternode-sync.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d3bbd756140f..06a963df3f82 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -278,19 +278,19 @@ void CMasternodeSync::Process()
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_BUDGET){
                 //we'll start rejecting votes if we accidentally get set as synced too soon
                 if(lastBudgetItem > 0 && lastBudgetItem < GetTime() - MASTERNODE_SYNC_TIMEOUT && RequestedMasternodeAttempt >= 4){ //hasn't received a new item in the last five seconds, so we'll move to the
-                    LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
-                    if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
+                    //LogPrintf("CMasternodeSync::Process - HasNextFinalizedBudget %d nCountFailures %d IsBudgetPropEmpty %d\n", budget.HasNextFinalizedBudget(), nCountFailures, IsBudgetPropEmpty());
+                    //if(budget.HasNextFinalizedBudget() || nCountFailures >= 2 || IsBudgetPropEmpty()) {
                         GetNextAsset();
 
                         //try to activate our masternode if possible
                         activeMasternode.ManageStatus();
-                    } else { //we've failed to sync, this state will reject the next budget block
-                        LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
-                        RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
-                        RequestedMasternodeAttempt = 0;
-                        lastFailure = GetTime();
-                        nCountFailures++;
-                    }
+                    // } else { //we've failed to sync, this state will reject the next budget block
+                    //     LogPrintf("CMasternodeSync::Process - ERROR - Sync has failed, will retry later\n");
+                    //     RequestedMasternodeAssets = MASTERNODE_SYNC_FAILED;
+                    //     RequestedMasternodeAttempt = 0;
+                    //     lastFailure = GetTime();
+                    //     nCountFailures++;
+                    // }
                     return;
                 }
 

From afd715286a4d31e7671976ae6a6746e6df11d558 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 30 Jul 2015 16:44:18 +0300
Subject: [PATCH 1720/1819] fix all kind of lock issues

---
 src/activemasternode.cpp |  2 +
 src/darksend.cpp         | 38 ++++++++++------
 src/init.cpp             |  1 +
 src/instantx.cpp         |  2 +-
 src/masternode-sync.cpp  | 15 +++++--
 src/masternode.cpp       | 93 +++++++++++++++++++++-------------------
 src/masternodeman.cpp    | 10 ++---
 src/wallet.cpp           |  3 +-
 8 files changed, 97 insertions(+), 67 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 6a621c51f5b8..94c80cffbaaa 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -90,6 +90,7 @@ void CActiveMasternode::ManageStatus()
                 return;
             }
 
+            LOCK(pwalletMain->cs_wallet);
             pwalletMain->LockCoin(vin.prevout);
 
             // send to all nodes
@@ -342,6 +343,7 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()
     vector<COutput> filteredCoins;
     vector<COutPoint> confLockedCoins;
 
+    LOCK(pwalletMain->cs_wallet);
     // Temporary unlock MN coins from masternode.conf
     if(GetBoolArg("-mnconflock", true)) {
         uint256 mnTxHash;
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 6f54864e4436..08b40aee2f69 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -259,11 +259,14 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
                 return;
             }
 
-            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)) {
-                LogPrintf("dsi -- transaction not valid! \n");
-                errorID = ERR_INVALID_TX;
-                pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
-                return;
+            {
+                LOCK(cs_main);
+                if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)) {
+                    LogPrintf("dsi -- transaction not valid! \n");
+                    errorID = ERR_INVALID_TX;
+                    pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
+                    return;
+                }
             }
         }
 
@@ -429,6 +432,7 @@ bool CDarksendPool::SetCollateralAddress(std::string strAddress){
 // Unlock coins after Darksend fails or succeeds
 //
 void CDarksendPool::UnlockCoins(){
+    LOCK(pwalletMain->cs_wallet);
     BOOST_FOREACH(CTxIn v, lockedCoins)
         pwalletMain->UnlockCoin(v.prevout);
 
@@ -967,10 +971,13 @@ bool CDarksendPool::IsCollateralValid(const CTransaction& txCollateral){
 
     if(fDebug) LogPrintf("CDarksendPool::IsCollateralValid %s\n", txCollateral.ToString().c_str());
 
-    CValidationState state;
-    if(!AcceptableInputs(mempool, state, txCollateral, true, NULL)){
-        if(fDebug) LogPrintf ("CDarksendPool::IsCollateralValid - didn't pass IsAcceptable\n");
-        return false;
+    {
+        LOCK(cs_main);
+        CValidationState state;
+        if(!AcceptableInputs(mempool, state, txCollateral, true, NULL)){
+            if(fDebug) LogPrintf ("CDarksendPool::IsCollateralValid - didn't pass IsAcceptable\n");
+            return false;
+        }
     }
 
     return true;
@@ -1147,11 +1154,14 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
 
-        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
-            LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
-            UnlockCoins();
-            SetNull();
-            return;
+        {
+            LOCK(cs_main);
+            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
+                LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
+                UnlockCoins();
+                SetNull();
+                return;
+            }
         }
     }
 
diff --git a/src/init.cpp b/src/init.cpp
index f1995b598189..0e14420bcddf 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1499,6 +1499,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     strBudgetMode = GetArg("-budgetvotemode", "auto");
 
     if(GetBoolArg("-mnconflock", true)) {
+        LOCK(pwalletMain->cs_wallet);
         LogPrintf("Locking Masternodes:\n");
         uint256 mnTxHash;
         BOOST_FOREACH(CMasternodeConfig::CMasternodeEntry mne, masternodeConfig.getEntries()) {
diff --git a/src/instantx.cpp b/src/instantx.cpp
index 33b2249aaa12..588a3914686a 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -70,7 +70,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
         bool fMissingInputs = false;
         CValidationState state;
 
-
+        LOCK(cs_main);
         if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
         {
             vector<CInv> vInv;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 06a963df3f82..deaa3f0b06df 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -157,7 +157,9 @@ void CMasternodeSync::ProcessMessage(CNode* pfrom, std::string& strCommand, CDat
 
 void CMasternodeSync::ClearFulfilledRequest()
 {
-    LOCK(cs_vNodes);
+    TRY_LOCK(cs_vNodes, lockRecv);
+    if(!lockRecv) return;
+
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
         pnode->ClearFulfilledRequest("getspork");
@@ -198,7 +200,9 @@ void CMasternodeSync::Process()
 
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
 
-    LOCK(cs_vNodes);
+    TRY_LOCK(cs_vNodes, lockRecv);
+    if(!lockRecv) return;
+
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
         if(Params().NetworkID() == CBaseChainParams::REGTEST){
@@ -230,7 +234,12 @@ void CMasternodeSync::Process()
             return;
         }
 
-        if(IsInitialBlockDownload()) return;
+        {
+            TRY_LOCK(cs_main, lockMain);
+            if(!lockMain) return;
+
+            if(IsInitialBlockDownload()) return;
+        }
 
         //don't begin syncing until we're almost at a recent block
         if(pindexPrev->nTime + 600 < GetTime()) return;
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 0587ef401bd4..a976a36cd988 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -177,10 +177,6 @@ void CMasternode::Check()
 {
     if(ShutdownRequested()) return;
 
-    //TODO: Random segfault with this line removed
-    TRY_LOCK(cs_main, lockRecv);
-    if(!lockRecv) return;
-
     //once spent, stop doing the checks
     if(activeState == MASTERNODE_VIN_SPENT) return;
 
@@ -202,9 +198,15 @@ void CMasternode::Check()
         tx.vin.push_back(vin);
         tx.vout.push_back(vout);
 
-        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
-            activeState = MASTERNODE_VIN_SPENT;
-            return;
+        {
+            TRY_LOCK(cs_main, lockMain);
+            if(!lockMain) return;
+
+            if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
+                activeState = MASTERNODE_VIN_SPENT;
+                return;
+
+            }
         }
     }
 
@@ -425,53 +427,58 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)
     CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
     tx.vin.push_back(vin);
     tx.vout.push_back(vout);
-    if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
-        if(fDebug) LogPrintf("mnb - Accepted Masternode entry\n");
 
-        if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
-            LogPrintf("mnb - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
+    {
+        TRY_LOCK(cs_main, lockMain);
+        if(!lockMain) return false;
+
+        if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)) {
+            //set nDos
+            state.IsInvalid(nDoS);
             return false;
         }
+    }
 
-        // verify that sig time is legit in past
-        // should be at least not earlier than block when 1000 DASH tx got MASTERNODE_MIN_CONFIRMATIONS
-        uint256 hashBlock = 0;
-        CTransaction tx2;
-        GetTransaction(vin.prevout.hash, tx2, hashBlock, true);
-        BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
-        if (mi != mapBlockIndex.end() && (*mi).second)
-        {
-            CBlockIndex* pMNIndex = (*mi).second; // block for 1000 DASH tx -> 1 confirmation
-            CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
-            if(pConfIndex->GetBlockTime() > sigTime)
-            {
-                LogPrintf("mnb - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
-                          sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
-                return false;
-            }
-        }
+    if(fDebug) LogPrintf("mnb - Accepted Masternode entry\n");
 
-        LogPrintf("mnb - Got NEW Masternode entry - %s - %s - %s - %lli \n", GetHash().ToString(), addr.ToString(), vin.ToString(), sigTime);
-        CMasternode mn(*this);
-        mnodeman.Add(mn);
+    if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
+        LogPrintf("mnb - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
+        return false;
+    }
 
-        // if it matches our Masternode privkey, then we've been remotely activated
-        if(pubkey2 == activeMasternode.pubKeyMasternode && protocolVersion == PROTOCOL_VERSION){
-            activeMasternode.EnableHotColdMasterNode(vin, addr);
+    // verify that sig time is legit in past
+    // should be at least not earlier than block when 1000 DASH tx got MASTERNODE_MIN_CONFIRMATIONS
+    uint256 hashBlock = 0;
+    CTransaction tx2;
+    GetTransaction(vin.prevout.hash, tx2, hashBlock, true);
+    BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
+    if (mi != mapBlockIndex.end() && (*mi).second)
+    {
+        CBlockIndex* pMNIndex = (*mi).second; // block for 1000 DASH tx -> 1 confirmation
+        CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
+        if(pConfIndex->GetBlockTime() > sigTime)
+        {
+            LogPrintf("mnb - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
+                      sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
+            return false;
         }
+    }
 
-        bool isLocal = addr.IsRFC1918() || addr.IsLocal();
-        if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
-
-        if(!isLocal) Relay();
+    LogPrintf("mnb - Got NEW Masternode entry - %s - %s - %s - %lli \n", GetHash().ToString(), addr.ToString(), vin.ToString(), sigTime);
+    CMasternode mn(*this);
+    mnodeman.Add(mn);
 
-        return true;
-    } else {
-        //set nDos
-        state.IsInvalid(nDoS);
+    // if it matches our Masternode privkey, then we've been remotely activated
+    if(pubkey2 == activeMasternode.pubKeyMasternode && protocolVersion == PROTOCOL_VERSION){
+        activeMasternode.EnableHotColdMasterNode(vin, addr);
     }
 
-    return false;
+    bool isLocal = addr.IsRFC1918() || addr.IsLocal();
+    if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
+
+    if(!isLocal) Relay();
+
+    return true;
 }
 
 void CMasternodeBroadcast::Relay()
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 68c25edcf6fe..dbe699844c49 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -224,10 +224,10 @@ void CMasternodeMan::Check()
 
 void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
 {
-    LOCK(cs);
-
     Check();
 
+    LOCK(cs);
+
     //remove inactive and outdated
     vector<CMasternode>::iterator it = vMasternodes.begin();
     while(it != vMasternodes.end()){
@@ -604,17 +604,17 @@ void CMasternodeMan::ProcessMasternodeConnections()
     //we don't care about this for regtest
     if(Params().NetworkID() == CBaseChainParams::REGTEST) return;
 
-    LOCK(cs_vNodes);
-
     if(!darkSendPool.pSubmittedToMasternode) return;
 
+    LOCK(cs_vNodes);
+
     BOOST_FOREACH(CNode* pnode, vNodes)
     {
         if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue;
 
         if(pnode->fDarkSendMaster){
             LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString().c_str());
-            pnode->CloseSocketDisconnect();
+            pnode->fDisconnect = true;
         }
     }
 }
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 57bf2b78d722..88d5562d8743 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2434,7 +2434,8 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
 
     LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Got: %d \n", nValueIn);
 
-    BOOST_FOREACH(CTxIn v, vCoins) 
+    LOCK(cs_wallet);
+    BOOST_FOREACH(CTxIn v, vCoins)
         LockCoin(v.prevout);
 
     int64_t nValueLeft = nValueIn;

From 7a9028631a127bff3b3cd99aeb63c96f17ebb750 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 07:41:14 -0700
Subject: [PATCH 1721/1819] Revert "Disable CheckAndRemove on file dumps"

This reverts commit 3fc9ea4adff3f72949b1fc163a6581ce11c25db0.
---
 src/darksend.cpp            | 1 +
 src/masternode-budget.cpp   | 4 ++--
 src/masternode-payments.cpp | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 08b40aee2f69..cb97324b8ba9 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2232,6 +2232,7 @@ void ThreadCheckDarkSendPool()
                 }
 
                 mnodeman.ProcessMasternodeConnections();
+                masternodePayments.CleanPaymentList();
                 CleanTransactionLocksList();
 
                 //if we've used 90% of the Masternode list then drop all the oldest.
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 7332694b2806..af9578eac926 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -319,8 +319,8 @@ CBudgetDB::ReadResult CBudgetDB::Read(CBudgetManager& objToLoad, bool fDryRun)
     LogPrintf("Loaded info from budget.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", objToLoad.ToString());
     if(!fDryRun) {
-        //LogPrintf("Budget manager - cleaning....\n");
-        //objToLoad.CheckAndRemove();
+        LogPrintf("Budget manager - cleaning....\n");
+        objToLoad.CheckAndRemove();
         LogPrintf("Budget manager - result:\n");
         LogPrintf("  %s\n", objToLoad.ToString());
     }
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 2100f5ec8fbf..653846ad1bb3 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -144,8 +144,8 @@ CMasternodePaymentDB::ReadResult CMasternodePaymentDB::Read(CMasternodePayments&
     LogPrintf("Loaded info from mnpayments.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", objToLoad.ToString());
     if(!fDryRun) {
-        //LogPrintf("Masternode payments manager - cleaning....\n");
-        //objToLoad.CleanPaymentList();
+        LogPrintf("Masternode payments manager - cleaning....\n");
+        objToLoad.CleanPaymentList();
         LogPrintf("Masternode payments manager - result:\n");
         LogPrintf("  %s\n", objToLoad.ToString());
     }

From ebc2591e4b120f217929daa1221c97b30e50bba7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 07:49:08 -0700
Subject: [PATCH 1722/1819] Revert "lock debugging"

This reverts commit e230762d5a6e997c7bc2b152f20b66be9b51b6db.
---
 src/main.cpp                |  2 +-
 src/masternode-budget.cpp   | 19 -------------------
 src/masternode-budget.h     |  3 ---
 src/masternode-payments.cpp |  9 ---------
 src/masternode-payments.h   |  5 -----
 5 files changed, 1 insertion(+), 37 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index d16cf209d8a9..ccd5885e4087 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4130,6 +4130,7 @@ void static ProcessGetData(CNode* pfrom)
                 }
 
                 if (!pushed && inv.type == MSG_TX) {
+
                     CTransaction tx;
                     if (mempool.lookup(inv.hash, tx)) {
                         CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -4661,7 +4662,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "tx"|| strCommand == "dstx")
     {
-
         vector<uint256> vWorkQueue;
         vector<uint256> vEraseQueue;
         CTransaction tx;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index af9578eac926..44c1882da5b3 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -86,7 +86,6 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
 
 void CBudgetManager::CheckOrphanVotes()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
 
@@ -186,7 +185,6 @@ void CBudgetManager::SubmitFinalBudget()
         return;
     }
 
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     mapSeenFinalizedBudgets.insert(make_pair(finalizedBudgetBroadcast.GetHash(), finalizedBudgetBroadcast));
     finalizedBudgetBroadcast.Relay();
@@ -372,7 +370,6 @@ bool CBudgetManager::AddFinalizedBudget(CFinalizedBudget& finalizedBudget)
 
 bool CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     std::string strError = "";
     if(!budgetProposal.IsValid(strError)) {
@@ -415,7 +412,6 @@ void CBudgetManager::CheckAndRemove()
 
 void CBudgetManager::FillBlockPayee(CMutableTransaction& txNew, CAmount nFees)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -493,7 +489,6 @@ CBudgetProposal *CBudgetManager::FindProposal(const std::string &strProposalName
 
 CBudgetProposal *CBudgetManager::FindProposal(uint256 nHash)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(mapProposals.count(nHash))
@@ -546,7 +541,6 @@ bool CBudgetManager::HasNextFinalizedBudget()
 
 bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     int nHighestCount = 0;
@@ -596,7 +590,6 @@ bool CBudgetManager::IsTransactionValid(const CTransaction& txNew, int nBlockHei
 
 std::vector<CBudgetProposal*> CBudgetManager::GetAllProposals()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::vector<CBudgetProposal*> vBudgetProposalRet;
@@ -629,7 +622,6 @@ struct sortProposalsByVotes {
 //Need to review this function
 std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     // ------- Sort budgets by Yes Count
@@ -693,7 +685,6 @@ struct sortFinalizedBudgetsByVotes {
 
 std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::vector<CFinalizedBudget*> vFinalizedBudgetsRet;
@@ -723,7 +714,6 @@ std::vector<CFinalizedBudget*> CBudgetManager::GetFinalizedBudgets()
 
 std::string CBudgetManager::GetRequiredPaymentsString(int nBlockHeight)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     std::string ret = "unknown-budget";
@@ -775,7 +765,6 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if (masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_BUDGET) return;
@@ -818,7 +807,6 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
     // lite mode is not supported
     if(IsInitialBlockDownload()) return;
 
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_budget);
 
     if (strCommand == "mnvs") { //Masternode vote sync
@@ -971,7 +959,6 @@ bool CBudgetManager::PropExists(uint256 nHash)
 
 void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     /*
@@ -1036,7 +1023,6 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
 
 bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!mapProposals.count(vote.nProposalHash)){
@@ -1064,7 +1050,6 @@ bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string
 
 bool CBudgetManager::UpdateFinalizedBudget(CFinalizedBudgetVote& vote, CNode* pfrom, std::string& strError)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!mapFinalizedBudgets.count(vote.nBudgetHash)){
@@ -1184,7 +1169,6 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
 
 bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
@@ -1467,7 +1451,6 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
 
 bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     uint256 hash = vote.vin.prevout.GetHash();
@@ -1507,7 +1490,6 @@ bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string&
 //evaluate if we should vote for this. Masternode only
 void CFinalizedBudget::AutoCheck()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
 
     if(!fMasterNode || fAutoChecked) return;
@@ -1578,7 +1560,6 @@ CAmount CFinalizedBudget::GetTotalPayout()
 
 std::string CFinalizedBudget::GetProposals() 
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs);
     std::string ret = "";
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index ffe0be3b6526..afb50cfca955 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -131,7 +131,6 @@ class CBudgetManager
 
     void CheckOrphanVotes();
     void Clear(){
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         LogPrintf("Budget object cleared\n");
@@ -228,7 +227,6 @@ class CFinalizedBudget
     bool IsTransactionValid(const CTransaction& txNew, int nBlockHeight);
     bool GetBudgetPaymentByBlock(int64_t nBlockHeight, CTxBudgetPayment& payment)
     {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         int i = nBlockHeight - GetBlockStart();
@@ -239,7 +237,6 @@ class CFinalizedBudget
     }
     bool GetPayeeAndAmount(int64_t nBlockHeight, CScript& payee, CAmount& nAmount)
     {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs);
 
         int i = nBlockHeight - GetBlockStart();
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 653846ad1bb3..3452a4a1b678 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -438,7 +438,6 @@ bool CMasternodePayments::GetBlockPayee(int nBlockHeight, CScript& payee)
 // -- Only look ahead up to 8 blocks to allow for propagation of the latest 2 winners
 bool CMasternodePayments::IsScheduled(CMasternode& mn, int nNotBlockHeight)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     CBlockIndex* pindexPrev = chainActive.Tip();
@@ -493,7 +492,6 @@ bool CMasternodePayments::AddWinningMasternode(CMasternodePaymentWinner& winnerI
 
 bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_vecPayments);
 
     int nMaxSignatures = 0;
@@ -541,7 +539,6 @@ bool CMasternodeBlockPayees::IsTransactionValid(const CTransaction& txNew)
 
 std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_vecPayments);
 
     std::string ret = "Unknown";
@@ -564,7 +561,6 @@ std::string CMasternodeBlockPayees::GetRequiredPaymentsString()
 
 std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     if(mapMasternodeBlocks.count(nBlockHeight)){
@@ -576,7 +572,6 @@ std::string CMasternodePayments::GetRequiredPaymentsString(int nBlockHeight)
 
 bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlockHeight)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     if(mapMasternodeBlocks.count(nBlockHeight)){
@@ -588,7 +583,6 @@ bool CMasternodePayments::IsTransactionValid(const CTransaction& txNew, int nBlo
 
 void CMasternodePayments::CleanPaymentList()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
@@ -762,7 +756,6 @@ bool CMasternodePaymentWinner::SignatureValid()
 
 void CMasternodePayments::Sync(CNode* node, int nCountNeeded)
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodePayeeVotes);
 
     if(chainActive.Tip() == NULL) return;
@@ -798,7 +791,6 @@ std::string CMasternodePayments::ToString() const
 
 int CMasternodePayments::GetOldestBlock()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     int nOldestBlock = std::numeric_limits<int>::max();
@@ -818,7 +810,6 @@ int CMasternodePayments::GetOldestBlock()
 
 int CMasternodePayments::GetNewestBlock()
 {
-    LogPrintf("LOCK - %\n", __func__);
     LOCK(cs_mapMasternodeBlocks);
 
     int nNewestBlock = 0;
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 46a52210c13d..21d937420d7c 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -100,7 +100,6 @@ class CMasternodeBlockPayees
     }
 
     void AddPayee(CScript payeeIn, int nIncrement){
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         BOOST_FOREACH(CMasternodePayee& payee, vecPayments){
@@ -116,7 +115,6 @@ class CMasternodeBlockPayees
 
     bool GetPayee(CScript& payee)
     {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         int nVotes = -1;
@@ -132,7 +130,6 @@ class CMasternodeBlockPayees
 
     bool HasPayeeWithVotes(CScript payee, int nVotesReq)
     {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_vecPayments);
 
         BOOST_FOREACH(CMasternodePayee& p, vecPayments){
@@ -238,7 +235,6 @@ class CMasternodePayments
     }
 
     void Clear() {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK2(cs_mapMasternodeBlocks, cs_mapMasternodePayeeVotes);
         mapMasternodeBlocks.clear();
         mapMasternodePayeeVotes.clear();
@@ -256,7 +252,6 @@ class CMasternodePayments
     bool IsScheduled(CMasternode& mn, int nNotBlockHeight);
 
     bool CanVote(COutPoint outMasternode, int nBlockHeight) {
-        LogPrintf("LOCK - %\n", __func__);
         LOCK(cs_mapMasternodePayeeVotes);
 
         if(mapMasternodesLastVote.count(outMasternode.hash + outMasternode.n)) {

From 9ab4a724546eab93a49ebc2b7a585ab7b540cc1f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 30 Jul 2015 19:00:28 +0300
Subject: [PATCH 1723/1819] cleanups/fixes: - use map.insert instead of []
 (should be safer) - debug output / comments / spaces / names - fix few long
 strings / make translatable one more label in UI

---
 src/activemasternode.cpp        | 10 ++++-----
 src/chainparams.cpp             | 10 ++++-----
 src/darksend.cpp                |  4 ++--
 src/main.cpp                    |  2 +-
 src/masternode-payments.cpp     |  8 +++----
 src/masternode-sync.cpp         |  5 +----
 src/masternode.cpp              | 11 +--------
 src/masternodeman.cpp           | 40 +++++++++++++++++++++------------
 src/qt/forms/sendcoinsdialog.ui |  8 +++----
 src/qt/walletview.cpp           |  2 +-
 10 files changed, 50 insertions(+), 50 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 94c80cffbaaa..5c350a3e24c6 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -172,7 +172,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
         }
 
         pmn->lastPing = mnp;
-        mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
+        mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
         mnp.Relay();
 
         return true;
@@ -239,7 +239,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         LogPrintf("CActiveMasternode::Register() -  %s\n", errorMessage);
         return false;
     }
-    mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
+    mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
 
     LogPrintf("CActiveMasternode::Register() - Adding to Masternode list\n    service: %s\n    vin: %s\n", service.ToString(), vin.ToString());
     mnb = CMasternodeBroadcast(service, vin, pubKeyCollateralAddress, pubKeyMasternode, PROTOCOL_VERSION);
@@ -249,7 +249,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         LogPrintf("CActiveMasternode::Register() - %s\n", errorMessage);
         return false;
     }
-    mnodeman.mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+    mnodeman.mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
 
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
@@ -382,8 +382,8 @@ bool CActiveMasternode::EnableHotColdMasterNode(CTxIn& newVin, CService& newServ
     status = ACTIVE_MASTERNODE_STARTED;
 
     //The values below are needed for signing mnping messages going forward
-    this->vin = newVin;
-    this->service = newService;
+    vin = newVin;
+    service = newService;
 
     LogPrintf("CActiveMasternode::EnableHotColdMasterNode() - Enabled! You may shut down the cold daemon.\n");
 
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 461e5aa10fe2..b4c022452ae1 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -133,11 +133,11 @@ class CMainParams : public CChainParams {
          * Build the genesis block. Note that the output of the genesis coinbase cannot
          * be spent as it did not originally exist in the database.
          * 
-         * CBlock(hash=000000000019d6, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=4a5e1e, nTime=1231006505, nBits=1d00ffff, nNonce=2083236893, vtx=1)
-         *   CTransaction(hash=4a5e1e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
-         *     CTxIn(COutPoint(000000, -1), coinbase 04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73)
-         *     CTxOut(nValue=50.00000000, scriptPubKey=0x5F1DF16B2B704C8A578D0B)
-         *   vMerkleTree: 4a5e1e
+         * CBlock(hash=00000ffd590b14, ver=1, hashPrevBlock=00000000000000, hashMerkleRoot=e0028e, nTime=1390095618, nBits=1e0ffff0, nNonce=28917698, vtx=1)
+         *   CTransaction(hash=e0028e, ver=1, vin.size=1, vout.size=1, nLockTime=0)
+         *     CTxIn(COutPoint(000000, -1), coinbase 04ffff001d01044c5957697265642030392f4a616e2f3230313420546865204772616e64204578706572696d656e7420476f6573204c6976653a204f76657273746f636b2e636f6d204973204e6f7720416363657074696e6720426974636f696e73)
+         *     CTxOut(nValue=50.00000000, scriptPubKey=0xA9037BAC7050C479B121CF)
+         *   vMerkleTree: e0028e
          */
         const char* pszTimestamp = "Wired 09/Jan/2014 The Grand Experiment Goes Live: Overstock.com Is Now Accepting Bitcoins";
         CMutableTransaction txNew;
diff --git a/src/darksend.cpp b/src/darksend.cpp
index cb97324b8ba9..1a5259e6876f 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1044,7 +1044,7 @@ bool CDarksendPool::AddScriptSig(const CTxIn& newVin){
     BOOST_FOREACH(const CDarkSendEntry& v, entries) {
         BOOST_FOREACH(const CTxDSIn& s, v.sev){
             if(s.scriptSig == newVin.scriptSig) {
-                printf("CDarksendPool::AddScriptSig - already exists \n");
+                if(fDebug) LogPrintf("CDarksendPool::AddScriptSig - already exists\n");
                 return false;
             }
         }
@@ -2082,7 +2082,7 @@ bool CDarkSendSigner::VerifyMessage(CPubKey pubkey, vector<unsigned char>& vchSi
     }
 
     if (fDebug && pubkey2.GetID() != pubkey.GetID())
-        LogPrintf("CDarkSendSigner::VerifyMessage -- keys don't match: %s %s", pubkey2.GetID().ToString(), pubkey.GetID().ToString());
+        LogPrintf("CDarkSendSigner::VerifyMessage -- keys don't match: %s %s\n", pubkey2.GetID().ToString(), pubkey.GetID().ToString());
 
     return (pubkey2.GetID() == pubkey.GetID());
 }
diff --git a/src/main.cpp b/src/main.cpp
index ccd5885e4087..6ff69803bd24 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2982,7 +2982,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                 return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
             }
         } else {
-            LogPrintf("CheckBlock() : WARNING: Couldn't find previous block, skipping IsBlockPayeeValid()");
+            LogPrintf("CheckBlock() : WARNING: Couldn't find previous block, skipping IsBlockPayeeValid()\n");
         }
     }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 3452a4a1b678..e23c78d9473f 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -362,9 +362,9 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         if(chainActive.Tip() == NULL) return;
 
         if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
-           if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
-           masternodeSync.AddedMasternodeWinner();
-           return;
+            if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
+            masternodeSync.AddedMasternodeWinner(winner.GetHash());
+            return;
         }
 
         int nFirstBlock = chainActive.Tip()->nHeight - (mnodeman.CountEnabled()*2);
@@ -638,7 +638,7 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
     if(n > MNPAYMENTS_SIGNATURES_TOTAL)
     {
         strError = strprintf("Masternode not in the top %d (%d)", MNPAYMENTS_SIGNATURES_TOTAL, n);
-        LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
+        LogPrintf("CMasternodePaymentWinner::IsValid - %s\n", strError);
         return false;
     }
 
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index deaa3f0b06df..5e137260c874 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -175,9 +175,6 @@ void CMasternodeSync::Process()
 
     if(tick++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
 
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return;
-
     if(IsSynced()) {
         /* 
             Resync if we lose all masternodes from sleep/wake or failure to sync originally
@@ -242,7 +239,7 @@ void CMasternodeSync::Process()
         }
 
         //don't begin syncing until we're almost at a recent block
-        if(pindexPrev->nTime + 600 < GetTime()) return;
+        if(!IsBlockchainSynced()) return;
 
         if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
 
diff --git a/src/masternode.cpp b/src/masternode.cpp
index a976a36cd988..0173af913e18 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -15,15 +15,6 @@ map<uint256, int> mapSeenMasternodeScanningErrors;
 // cache block hashes as we calculate them
 std::map<int64_t, uint256> mapCacheBlockHashes;
 
-struct CompareValueOnly
-{
-    bool operator()(const pair<int64_t, CTxIn>& t1,
-                    const pair<int64_t, CTxIn>& t2) const
-    {
-        return t1.first < t2.first;
-    }
-};
-
 //Get the last hash that matches the modulus given. Processed in reverse order
 bool GetBlockHash(uint256& hash, int nBlockHeight)
 {
@@ -138,7 +129,7 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     int nDoS = 0;
     if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS, false))) {
         lastPing = mnb.lastPing;
-        mnodeman.mapSeenMasternodePing[lastPing.GetHash()] = lastPing;
+        mnodeman.mapSeenMasternodePing.insert(make_pair(lastPing.GetHash(), lastPing));
     }
 }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index dbe699844c49..ff73aea86f1d 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -15,7 +15,7 @@
 /** Masternode manager */
 CMasternodeMan mnodeman;
 
-struct CompareValueOnly
+struct CompareLastPaid
 {
     bool operator()(const pair<int64_t, CTxIn>& t1,
                     const pair<int64_t, CTxIn>& t2) const
@@ -24,7 +24,16 @@ struct CompareValueOnly
     }
 };
 
-struct CompareValueOnlyMN
+struct CompareScoreTxIn
+{
+    bool operator()(const pair<int64_t, CTxIn>& t1,
+                    const pair<int64_t, CTxIn>& t2) const
+    {
+        return t1.first < t2.first;
+    }
+};
+
+struct CompareScoreMN
 {
     bool operator()(const pair<int64_t, CMasternode>& t1,
                     const pair<int64_t, CMasternode>& t2) const
@@ -154,10 +163,12 @@ CMasternodeDB::ReadResult CMasternodeDB::Read(CMasternodeMan& mnodemanToLoad, bo
 
     LogPrintf("Loaded info from mncache.dat  %dms\n", GetTimeMillis() - nStart);
     LogPrintf("  %s\n", mnodemanToLoad.ToString());
-    LogPrintf("Masternode manager - cleaning....\n");
-    if(!fDryRun) mnodemanToLoad.CheckAndRemove(true);
-    LogPrintf("Masternode manager - result:\n");
-    LogPrintf("  %s\n", mnodemanToLoad.ToString());
+    if(!fDryRun) {
+        LogPrintf("Masternode manager - cleaning....\n");
+        mnodemanToLoad.CheckAndRemove(true);
+        LogPrintf("Masternode manager - result:\n");
+        LogPrintf("  %s\n", mnodemanToLoad.ToString());
+    }
 
     return Ok;
 }
@@ -171,7 +182,7 @@ void DumpMasternodes()
 
     LogPrintf("Verifying mncache.dat format...\n");
     CMasternodeDB::ReadResult readResult = mndb.Read(tempMnodeman, true);
-    // there was an error and it was not an error on file openning => do not proceed
+    // there was an error and it was not an error on file opening => do not proceed
     if (readResult == CMasternodeDB::FileError)
         LogPrintf("Missing masternode cache file - mncache.dat, will try to recreate\n");
     else if (readResult != CMasternodeDB::Ok)
@@ -418,11 +429,12 @@ CMasternode* CMasternodeMan::GetNextMasternodeInQueueForPayment(int nBlockHeight
     }
 
     // Sort them low to high
-    sort(vecMasternodeLastPaid.rbegin(), vecMasternodeLastPaid.rend(), CompareValueOnly());
+    sort(vecMasternodeLastPaid.rbegin(), vecMasternodeLastPaid.rend(), CompareLastPaid());
 
     // Look at 1/10 of the oldest nodes (by last payment), calculate their scores and pay the best one
     //  -- This doesn't look at who is being paid in the +8-10 blocks, allowing for double payments very rarely
-    //  -- 1/100 payments should be a double payment on mainnet - (1/(3000/10))*2 --(chance per block * chances before IsScheduled will fire)
+    //  -- 1/100 payments should be a double payment on mainnet - (1/(3000/10))*2
+    //  -- (chance per block * chances before IsScheduled will fire)
     int nTenthNetwork = mnodeman.CountEnabled()/10;
     int nCount = 0; 
     uint256 nHigh = 0;
@@ -518,7 +530,7 @@ int CMasternodeMan::GetMasternodeRank(const CTxIn& vin, int64_t nBlockHeight, in
         vecMasternodeScores.push_back(make_pair(n2, mn.vin));
     }
 
-    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnly());
+    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareScoreTxIn());
 
     int rank = 0;
     BOOST_FOREACH (PAIRTYPE(int64_t, CTxIn)& s, vecMasternodeScores){
@@ -556,7 +568,7 @@ std::vector<pair<int, CMasternode> > CMasternodeMan::GetMasternodeRanks(int64_t
         vecMasternodeScores.push_back(make_pair(n2, mn));
     }
 
-    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnlyMN());
+    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareScoreMN());
 
     int rank = 0;
     BOOST_FOREACH (PAIRTYPE(int64_t, CMasternode)& s, vecMasternodeScores){
@@ -586,7 +598,7 @@ CMasternode* CMasternodeMan::GetMasternodeByRank(int nRank, int64_t nBlockHeight
         vecMasternodeScores.push_back(make_pair(n2, mn.vin));
     }
 
-    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareValueOnly());
+    sort(vecMasternodeScores.rbegin(), vecMasternodeScores.rend(), CompareScoreTxIn());
 
     int rank = 0;
     BOOST_FOREACH (PAIRTYPE(int64_t, CTxIn)& s, vecMasternodeScores){
@@ -635,7 +647,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             masternodeSync.AddedMasternodeList();
             return;
         }
-        mnodeman.mapSeenMasternodeBroadcast[mnb.GetHash()] = mnb;
+        mnodeman.mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
 
         int nDoS = 0;
         if(!mnb.CheckAndUpdate(nDoS)){
@@ -676,7 +688,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(fDebug) LogPrintf("mnp - Masternode ping, vin: %s\n", mnp.vin.ToString());
 
         if(mnodeman.mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
-        mnodeman.mapSeenMasternodePing[mnp.GetHash()] = mnp;
+        mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
 
         int nDoS = 0;
         if(mnp.CheckAndUpdate(nDoS)) return;
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 0d4e4debfdf8..e89957058d42 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -855,7 +855,7 @@
                  <item>
                   <widget class="QRadioButton" name="radioCustomPerKilobyte">
                    <property name="toolTip">
-                    <string>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</string>
+                    <string>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</string>
                    </property>
                    <property name="text">
                     <string>per kilobyte</string>
@@ -871,7 +871,7 @@
                  <item>
                   <widget class="QRadioButton" name="radioCustomAtLeast">
                    <property name="toolTip">
-                    <string>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</string>
+                    <string>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</string>
                    </property>
                    <property name="text">
                     <string>total at least</string>
@@ -904,7 +904,7 @@
                  <item>
                   <widget class="QCheckBox" name="checkBoxMinimumFee">
                    <property name="toolTip">
-                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
                    </property>
                    <property name="text">
                     <string/>
@@ -917,7 +917,7 @@
                     <bool>true</bool>
                    </property>
                    <property name="toolTip">
-                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
+                    <string>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</string>
                    </property>
                    <property name="text">
                     <string>(read the tooltip)</string>
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index a737c24f1fc1..0974fa7f5e49 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -51,7 +51,7 @@ WalletView::WalletView(QWidget *parent):
 
     // Sum of selected transactions
     QLabel *transactionSumLabel = new QLabel(); // Label
-    transactionSumLabel->setText("Selected amount: ");
+    transactionSumLabel->setText(tr("Selected amount:"));
     hbox_buttons->addWidget(transactionSumLabel);
 
     transactionSum = new QLabel(); // Amount

From 5024b7d3f66faa819f8aeeb2dc6971a899d8c433 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 11:33:37 -0700
Subject: [PATCH 1724/1819] Added sendtoaddressix for api IX support

---
 src/masternode-budget.cpp    |  2 +-
 src/rpcclient.cpp            |  1 +
 src/rpcmasternode-budget.cpp |  4 +++
 src/rpcserver.cpp            |  1 +
 src/rpcserver.h              |  1 +
 src/rpcwallet.cpp            | 47 ++++++++++++++++++++++++++++++++++--
 6 files changed, 53 insertions(+), 3 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 44c1882da5b3..352d2b4038ec 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -75,7 +75,7 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
     }
 
     //if we're syncing we won't have instantX information, so accept 1 confirmation 
-    if(conf >= BUDGET_FEE_CONFIRMATIONS || (!masternodeSync.IsSynced() && conf >= 1)){
+    if(conf >= BUDGET_FEE_CONFIRMATIONS){
         return true;
     } else {
         strError = strprintf("Collateral requires at least %d confirmations - %d confirmations", BUDGET_FEE_CONFIRMATIONS, conf);
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 2e056b2e0e8c..6bf0973d3b46 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -33,6 +33,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
     { "getnetworkhashps", 0 },
     { "getnetworkhashps", 1 },
     { "sendtoaddress", 1 },
+    { "sendtoaddressix", 1 },
     { "settxfee", 0 },
     { "getreceivedbyaddress", 1 },
     { "getreceivedbyaccount", 1 },
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index d0da9c586933..f67ac27d53e8 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -176,6 +176,10 @@ Value mnbudget(const Array& params, bool fHelp)
             return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
         }
 
+        if(!masternodeSync.IsSynced()){
+            return "Must wait for client to sync with masternode network. Try again in a minute or so.";            
+        }
+
         if(!budgetProposalBroadcast.IsValid(strError)){
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
         }
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index b3b23750d762..1602a8df8e74 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -352,6 +352,7 @@ static const CRPCCommand vRPCCommands[] =
     { "wallet",             "sendfrom",               &sendfrom,               false,     false,      true },
     { "wallet",             "sendmany",               &sendmany,               false,     false,      true },
     { "wallet",             "sendtoaddress",          &sendtoaddress,          false,     false,      true },
+    { "wallet",             "sendtoaddressix",        &sendtoaddressix,        false,     false,      true },
     { "wallet",             "setaccount",             &setaccount,             true,      false,      true },
     { "wallet",             "settxfee",               &settxfee,               true,      false,      true },
     { "wallet",             "signmessage",            &signmessage,            true,      false,      true },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index bf37f65fa934..9182b63c1217 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -169,6 +169,7 @@ extern json_spirit::Value setaccount(const json_spirit::Array& params, bool fHel
 extern json_spirit::Value getaccount(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getaddressesbyaccount(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value sendtoaddress(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value sendtoaddressix(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value signmessage(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value verifymessage(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value getreceivedbyaddress(const json_spirit::Array& params, bool fHelp);
diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 2658b66b24d7..5118504d895b 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -312,7 +312,7 @@ Value getaddressesbyaccount(const Array& params, bool fHelp)
     return ret;
 }
 
-void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
+void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew, bool fUseIX=false)
 {
     // Check amount
     if (nValue <= 0)
@@ -335,7 +335,7 @@ void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew)
     // Create and send the transaction
     CReserveKey reservekey(pwalletMain);
     CAmount nFeeRequired;
-    if (!pwalletMain->CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError))
+    if (!pwalletMain->CreateTransaction(scriptPubKey, nValue, wtxNew, reservekey, nFeeRequired, strError, NULL, ALL_COINS, fUseIX, (CAmount)0))
     {
         if (nValue + nFeeRequired > pwalletMain->GetBalance())
             strError = strprintf("Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!", FormatMoney(nFeeRequired));
@@ -390,6 +390,49 @@ Value sendtoaddress(const Array& params, bool fHelp)
     return wtx.GetHash().GetHex();
 }
 
+Value sendtoaddressix(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() < 2 || params.size() > 4)
+        throw runtime_error(
+            "sendtoaddressix \"dashaddress\" amount ( \"comment\" \"comment-to\" )\n"
+            "\nSend an amount to a given address. The amount is a real and is rounded to the nearest 0.00000001\n"
+            + HelpRequiringPassphrase() +
+            "\nArguments:\n"
+            "1. \"dashaddress\"  (string, required) The dash address to send to.\n"
+            "2. \"amount\"      (numeric, required) The amount in btc to send. eg 0.1\n"
+            "3. \"comment\"     (string, optional) A comment used to store what the transaction is for. \n"
+            "                             This is not part of the transaction, just kept in your wallet.\n"
+            "4. \"comment-to\"  (string, optional) A comment to store the name of the person or organization \n"
+            "                             to which you're sending the transaction. This is not part of the \n"
+            "                             transaction, just kept in your wallet.\n"
+            "\nResult:\n"
+            "\"transactionid\"  (string) The transaction id.\n"
+            "\nExamples:\n"
+            + HelpExampleCli("sendtoaddressix", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1")
+            + HelpExampleCli("sendtoaddressix", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\" 0.1 \"donation\" \"seans outpost\"")
+            + HelpExampleRpc("sendtoaddressix", "\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\", 0.1, \"donation\", \"seans outpost\"")
+        );
+
+    CBitcoinAddress address(params[0].get_str());
+    if (!address.IsValid())
+        throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid Dash address");
+
+    // Amount
+    CAmount nAmount = AmountFromValue(params[1]);
+
+    // Wallet comments
+    CWalletTx wtx;
+    if (params.size() > 2 && params[2].type() != null_type && !params[2].get_str().empty())
+        wtx.mapValue["comment"] = params[2].get_str();
+    if (params.size() > 3 && params[3].type() != null_type && !params[3].get_str().empty())
+        wtx.mapValue["to"]      = params[3].get_str();
+
+    EnsureWalletIsUnlocked();
+
+    SendMoney(address.Get(), nAmount, wtx, true);
+
+    return wtx.GetHash().GetHex();
+}
 Value listaddressgroupings(const Array& params, bool fHelp)
 {
     if (fHelp)

From 6c6aa3512fa92776e44fcb0051eec22c06671c97 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 12:00:17 -0700
Subject: [PATCH 1725/1819] fixed sendtoaddressix

---
 src/rpcwallet.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp
index 5118504d895b..844936e80490 100644
--- a/src/rpcwallet.cpp
+++ b/src/rpcwallet.cpp
@@ -342,7 +342,7 @@ void SendMoney(const CTxDestination &address, CAmount nValue, CWalletTx& wtxNew,
         LogPrintf("SendMoney() : %s\n", strError);
         throw JSONRPCError(RPC_WALLET_ERROR, strError);
     }
-    if (!pwalletMain->CommitTransaction(wtxNew, reservekey))
+    if (!pwalletMain->CommitTransaction(wtxNew, reservekey, (!fUseIX ? "tx" : "ix")))
         throw JSONRPCError(RPC_WALLET_ERROR, "Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.");
 }
 

From 1cf19c64acb1c0b7af496500d375d37ff7c3c79e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 13:15:27 -0700
Subject: [PATCH 1726/1819] Check prop FeeHash separate w/o banning prop

---
 src/masternode-budget.cpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 352d2b4038ec..36f735bd8b35 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -835,9 +835,14 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             return;
         }
 
+        std::string strError = "";
+        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime)){
+            LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
+            return;
+        }
+
         mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
 
-        std::string strError = "";
         if(!budgetProposalBroadcast.IsValid(strError)) {
             LogPrintf("mprop - invalid budget proposal - %s\n", strError);
             return;

From d57d6f0466e317c51aaaf3bc474a9e32e95b980b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 30 Jul 2015 14:27:25 -0700
Subject: [PATCH 1727/1819] disable IX for proposal fees

---
 src/rpcmasternode-budget.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index f67ac27d53e8..3eb2ba2cacce 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -98,12 +98,12 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!budgetProposalBroadcast.IsValid(strError, false))
             return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
 
-        bool useIX = true;
-        if (params.size() > 7) {
-            if(params[7].get_str() != "false" && params[7].get_str() != "true")
-                return "Invalid use_ix, must be true or false";
-            useIX = params[7].get_str() == "true" ? true : false;
-        }
+        bool useIX = false; //true;
+        // if (params.size() > 7) {
+        //     if(params[7].get_str() != "false" && params[7].get_str() != "true")
+        //         return "Invalid use_ix, must be true or false";
+        //     useIX = params[7].get_str() == "true" ? true : false;
+        // }
 
         CWalletTx wtx;
         pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);

From a5170420dbf53e253484e9af5b8dfb49579dfbdc Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Fri, 31 Jul 2015 08:40:06 +0200
Subject: [PATCH 1728/1819] UI: alignment fix for Overview-page

---
 src/qt/forms/overviewpage.ui | 18 +++++++++---------
 src/qt/overviewpage.cpp      |  9 ++++++++-
 src/qt/res/css/drkblue.css   | 17 ++++++++---------
 3 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/src/qt/forms/overviewpage.ui b/src/qt/forms/overviewpage.ui
index b26f88b6b9f3..a7925a3730b3 100644
--- a/src/qt/forms/overviewpage.ui
+++ b/src/qt/forms/overviewpage.ui
@@ -426,7 +426,7 @@
             <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
            </property>
            <property name="horizontalSpacing">
-            <number>30</number>
+            <number>11</number>
            </property>
            <property name="verticalSpacing">
             <number>12</number>
@@ -438,13 +438,6 @@
              </property>
             </widget>
            </item>
-           <item row="0" column="1">
-            <widget class="QLabel" name="darksendEnabled">
-             <property name="text">
-              <string>Enabled/Disabled</string>
-             </property>
-            </widget>
-           </item>
            <item row="1" column="0">
             <widget class="QLabel" name="label_7">
              <property name="text">
@@ -516,6 +509,13 @@
              </property>
             </widget>
            </item>
+           <item row="0" column="1">
+            <widget class="QLabel" name="darksendEnabled">
+             <property name="text">
+              <string>Enabled/Disabled</string>
+             </property>
+            </widget>
+           </item>
           </layout>
          </widget>
          <widget class="QPushButton" name="runAutoDenom">
@@ -1059,7 +1059,7 @@
            <string>Reset</string>
           </property>
          </widget>
-         <widget class="QWidget" name="">
+         <widget class="QWidget" name="layoutWidget">
           <property name="geometry">
            <rect>
             <x>10</x>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 0695ece26c7f..11da5599b9d0 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -226,8 +226,15 @@ void OverviewPage::updateWatchOnlyLabels(bool showWatchOnly)
     ui->labelWatchPending->setVisible(showWatchOnly);   // show watch-only pending balance
     ui->labelWatchTotal->setVisible(showWatchOnly);     // show watch-only total balance
 
-    if (!showWatchOnly)
+    if (!showWatchOnly){
         ui->labelWatchImmature->hide();
+    }
+    else{
+        ui->labelBalance->setIndent(20);
+        ui->labelUnconfirmed->setIndent(20);
+        ui->labelImmature->setIndent(20);
+        ui->labelTotal->setIndent(20);
+    }
 }
 
 void OverviewPage::setClientModel(ClientModel *model)
diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index 127a580b720a..fc3965f33c3c 100644
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -748,13 +748,13 @@ padding-right:5px;
 
 QWidget .QFrame#frame .QLabel#labelWalletStatus { /* Wallet Sync Status */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
-margin-left:20px;
+margin-left:3px;
 }
 
 QWidget .QFrame#frame .QLabel#labelSpendable { /* Spendable Header */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
 font-size:12px;
-margin-left:32px;
+margin-left:18px;
 }
 
 QWidget .QFrame#frame .QLabel#labelWatchonly { /* Watch-only Header */
@@ -780,7 +780,7 @@ qproperty-alignment: 'AlignVCenter | AlignLeft';
 font-size:12px;
 font-weight:bold;
 color:#56ABD8;
-margin-left:32px;
+margin-left:0px;
 }
 
 QWidget .QFrame#frame .QLabel#labelWatchAvailable { /* Watch-only Balance */
@@ -801,7 +801,7 @@ padding-right:5px;
 QWidget .QFrame#frame .QLabel#labelUnconfirmed { /* Pending Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
 font-size:12px;
-margin-left:32px;
+margin-left:0px;
 }
 
 QWidget .QFrame#frame .QLabel#labelWatchPending { /* Watch-only Pending Balance */
@@ -822,7 +822,7 @@ padding-right:5px;
 QWidget .QFrame#frame .QLabel#labelImmature { /* Immature Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
 font-size:12px;
-margin-left:32px;
+margin-left:0px;
 }
 
 QWidget .QFrame#frame .QLabel#labelWatchImmature { /* Watch-only Immature Balance */
@@ -843,7 +843,7 @@ padding-right:5px;
 QWidget .QFrame#frame .QLabel#labelTotal { /* Total Balance */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
 font-size:12px;
-margin-left:32px;
+margin-left:0px;
 }
 
 QWidget .QFrame#frame .QLabel#labelWatchTotal { /* Watch-only Total Balance */
@@ -877,7 +877,7 @@ min-height:35px;
 /******************************************************************/
 QWidget .QFrame#frameDarksend .QLabel#labelDarksendSyncStatus { /* Darksend Sync Status */
 qproperty-alignment: 'AlignVCenter | AlignLeft';
-margin-left:20px;
+margin-left:2px;
 }
 
 QWidget .QFrame#frameDarksend #formLayoutWidget {
@@ -890,12 +890,11 @@ font-weight:normal;
 min-height:25px;
 }
 
-
 QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_6 { /* Darksend Status Label */
 qproperty-alignment: 'AlignVCenter | AlignRight';
 min-width:160px;
 background-color:#F8F6F6;
-margin-right:5px;
+margin-right:0px;
 padding-right:5px;
 }
 

From d75ffba355ec1dc6704f5f328e6be85f3dde4be9 Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Fri, 31 Jul 2015 09:35:17 +0200
Subject: [PATCH 1729/1819] UI: alignment fix for Overview-page (typo fix)

---
 src/qt/res/css/drkblue.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qt/res/css/drkblue.css b/src/qt/res/css/drkblue.css
index fc3965f33c3c..1010db382287 100644
--- a/src/qt/res/css/drkblue.css
+++ b/src/qt/res/css/drkblue.css
@@ -894,7 +894,7 @@ QWidget .QFrame#frameDarksend #formLayoutWidget .QLabel#label_6 { /* Darksend St
 qproperty-alignment: 'AlignVCenter | AlignRight';
 min-width:160px;
 background-color:#F8F6F6;
-margin-right:0px;
+margin-right:5px;
 padding-right:5px;
 }
 

From 2ade614458f8e2d84b03ee75245f2f8dde7f7b24 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 31 Jul 2015 18:49:57 +0300
Subject: [PATCH 1730/1819] fix

---
 src/masternode-payments.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index e23c78d9473f..aed8ceadf2f0 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -363,7 +363,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
             if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
-            masternodeSync.AddedMasternodeWinner(winner.GetHash());
+            masternodeSync.AddedMasternodeWinner();
             return;
         }
 

From f0923de04cf0cfda1954d92cc5339b92d3a09422 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 23 Jun 2015 18:08:53 +0300
Subject: [PATCH 1731/1819] add darksend debug category

---
 src/darksend.cpp | 88 +++++++++++++++++++++++++-----------------------
 src/init.cpp     |  2 +-
 2 files changed, 46 insertions(+), 44 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 1a5259e6876f..e6f895785e97 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -128,7 +128,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             }
 
             if(state == POOL_STATUS_QUEUE){
-                if (fDebug)  LogPrintf("Darksend queue is ready - %s\n", addr.ToString().c_str());
+                LogPrint("darksend", "Darksend queue is ready - %s\n", addr.ToString().c_str());
                 PrepareDarksendDenominate();
             }
         } else {
@@ -136,18 +136,18 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
                 if(q.vin == dsq.vin) return;
             }
 
-            if(fDebug) LogPrintf("dsq last %d last2 %d count %d\n", pmn->nLastDsq, pmn->nLastDsq + mnodeman.size()/5, mnodeman.nDsqCount);
+            LogPrint("darksend", "dsq last %d last2 %d count %d\n", pmn->nLastDsq, pmn->nLastDsq + mnodeman.size()/5, mnodeman.nDsqCount);
             //don't allow a few nodes to dominate the queuing process
             if(pmn->nLastDsq != 0 &&
                 pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
-                if(fDebug) LogPrintf("dsq -- Masternode sending too many dsq messages. %s \n", pmn->addr.ToString().c_str());
+                LogPrint("darksend", "dsq -- Masternode sending too many dsq messages. %s \n", pmn->addr.ToString().c_str());
                 return;
             }
             mnodeman.nDsqCount++;
             pmn->nLastDsq = mnodeman.nDsqCount;
             pmn->allowFreeTx = true;
 
-            if(fDebug) LogPrintf("dsq - new Darksend queue object - %s\n", addr.ToString().c_str());
+            LogPrint("darksend", "dsq - new Darksend queue object - %s\n", addr.ToString().c_str());
             vecDarksendQueue.push_back(dsq);
             dsq.Relay();
             dsq.time = GetTime();
@@ -225,7 +225,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             BOOST_FOREACH(const CTxIn i, in){
                 tx.vin.push_back(i);
 
-                if(fDebug) LogPrintf("dsi -- tx in %s\n", i.ToString().c_str());
+                LogPrint("darksend", "dsi -- tx in %s\n", i.ToString().c_str());
 
                 CTransaction tx2;
                 uint256 hash;
@@ -297,7 +297,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         int errorID;
         vRecv >> sessionIDMessage >> state >> entriesCount >> accepted >> errorID;
 
-        if(fDebug) LogPrintf("dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, GetMessageByID(errorID).c_str());
+        LogPrint("darksend", "dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, GetMessageByID(errorID).c_str());
 
         if((accepted != 1 && accepted != 0) && sessionID != sessionIDMessage){
             LogPrintf("dssu - message doesn't match current Darksend session %d %d\n", sessionID, sessionIDMessage);
@@ -321,7 +321,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         BOOST_FOREACH(const CTxIn item, sigs)
         {
             if(AddScriptSig(item)) success = true;
-            if(fDebug) LogPrintf(" -- sigs count %d %d\n", (int)sigs.size(), count);
+            LogPrint("darksend", " -- sigs count %d %d\n", (int)sigs.size(), count);
             count++;
         }
 
@@ -345,7 +345,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         vRecv >> sessionIDMessage >> txNew;
 
         if(sessionID != sessionIDMessage){
-            if (fDebug) LogPrintf("dsf - message doesn't match current Darksend session %d %d\n", sessionID, sessionIDMessage);
+            LogPrint("darksend", "dsf - message doesn't match current Darksend session %d %d\n", sessionID, sessionIDMessage);
             return;
         }
 
@@ -370,7 +370,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         vRecv >> sessionIDMessage >> error >> errorID;
 
         if(sessionID != sessionIDMessage){
-            if (fDebug) LogPrintf("dsc - message doesn't match current Darksend session %d %d\n", darkSendPool.sessionID, sessionIDMessage);
+            LogPrint("darksend", "dsc - message doesn't match current Darksend session %d %d\n", darkSendPool.sessionID, sessionIDMessage);
             return;
         }
 
@@ -498,6 +498,7 @@ std::string CDarksendPool::GetStatus()
 //
 void CDarksendPool::Check()
 {
+    if(fMasterNode) LogPrintf("darksend", "CDarksendPool::Check() - entries count %lu\n", entries.size());
     //printf("CDarksendPool::Check() %d - %d - %d\n", state, anonTx.CountEntries(), GetTimeMillis()-lastTimeChanged);
 
     if(fMasterNode) {
@@ -513,7 +514,7 @@ void CDarksendPool::Check()
 
     // create the finalized transaction for distribution to the clients
     if(state == POOL_STATUS_FINALIZE_TRANSACTION) {
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- FINALIZE TRANSACTIONS\n");
+        LogPrint("darksend", "CDarksendPool::Check() -- FINALIZE TRANSACTIONS\n");
         UpdateState(POOL_STATUS_SIGNING);
 
         if (fMasterNode) {
@@ -533,7 +534,7 @@ void CDarksendPool::Check()
             std::random_shuffle ( txNew.vout.begin(), txNew.vout.end(), randomizeList);
 
 
-            if(fDebug) LogPrintf("Transaction 1: %s\n", txNew.ToString().c_str());
+            LogPrint("darksend", "Transaction 1: %s\n", txNew.ToString().c_str());
             finalTransaction = txNew;
 
             // request signatures from clients
@@ -543,7 +544,7 @@ void CDarksendPool::Check()
 
     // If we have all of the signatures, try to compile the transaction
     if(fMasterNode && state == POOL_STATUS_SIGNING && SignaturesComplete()) {
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- SIGNING\n");
+        LogPrint("darksend", "CDarksendPool::Check() -- SIGNING\n");
         UpdateState(POOL_STATUS_TRANSMISSION);
 
         CheckFinalTransaction();
@@ -793,15 +794,15 @@ void CDarksendPool::CheckTimeout(){
     if(!fMasterNode) {
         switch(state) {
             case POOL_STATUS_TRANSMISSION:
-                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session complete -- Running Check()\n");
+                LogPrint("darksend", "CDarksendPool::CheckTimeout() -- Session complete -- Running Check()\n");
                 Check();
                 break;
             case POOL_STATUS_ERROR:
-                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Pool error -- Running Check()\n");
+                LogPrint("darksend", "CDarksendPool::CheckTimeout() -- Pool error -- Running Check()\n");
                 Check();
                 break;
             case POOL_STATUS_SUCCESS:
-                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Pool success -- Running Check()\n");
+                LogPrint("darksend", "CDarksendPool::CheckTimeout() -- Pool success -- Running Check()\n");
                 Check();
                 break;
         }
@@ -812,7 +813,7 @@ void CDarksendPool::CheckTimeout(){
     vector<CDarksendQueue>::iterator it = vecDarksendQueue.begin();
     while(it != vecDarksendQueue.end()){
         if((*it).IsExpired()){
-            if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() : Removing expired queue entry - %d\n", c);
+            LogPrint("darksend", "CDarksendPool::CheckTimeout() : Removing expired queue entry - %d\n", c);
             it = vecDarksendQueue.erase(it);
         } else ++it;
         c++;
@@ -828,7 +829,7 @@ void CDarksendPool::CheckTimeout(){
         vector<CDarkSendEntry>::iterator it2 = entries.begin();
         while(it2 != entries.end()){
             if((*it2).IsExpired()){
-                if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() : Removing expired entry - %d\n", c);
+                LogPrint("darksend", "CDarksendPool::CheckTimeout() : Removing expired entry - %d\n", c);
                 it2 = entries.erase(it2);
                 if(entries.size() == 0){
                     UnlockCoins();
@@ -917,14 +918,14 @@ bool CDarksendPool::SignatureValid(const CScript& newSig, const CTxIn& newVin){
     if(found >= 0){ //might have to do this one input at a time?
         int n = found;
         txNew.vin[n].scriptSig = newSig;
-        if(fDebug) LogPrintf("CDarksendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24).c_str());
+        LogPrint("darksend", "CDarksendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24).c_str());
         if (!VerifyScript(txNew.vin[n].scriptSig, sigPubKey, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, MutableTransactionSignatureChecker(&txNew, n))){
-            if(fDebug) LogPrintf("CDarksendPool::SignatureValid() - Signing - Error signing input %u\n", n);
+            LogPrint("darksend", "CDarksendPool::SignatureValid() - Signing - Error signing input %u\n", n);
             return false;
         }
     }
 
-    if(fDebug) LogPrintf("CDarksendPool::SignatureValid() - Signing - Successfully validated input\n");
+    LogPrint("darksend", "CDarksendPool::SignatureValid() - Signing - Successfully validated input\n");
     return true;
 }
 
@@ -959,17 +960,17 @@ bool CDarksendPool::IsCollateralValid(const CTransaction& txCollateral){
     }
 
     if(missingTx){
-        if(fDebug) LogPrintf ("CDarksendPool::IsCollateralValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::IsCollateralValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString().c_str());
         return false;
     }
 
     //collateral transactions are required to pay out DARKSEND_COLLATERAL as a fee to the miners
     if(nValueIn - nValueOut < DARKSEND_COLLATERAL) {
-        if(fDebug) LogPrintf ("CDarksendPool::IsCollateralValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::IsCollateralValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
         return false;
     }
 
-    if(fDebug) LogPrintf("CDarksendPool::IsCollateralValid %s\n", txCollateral.ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::IsCollateralValid %s\n", txCollateral.ToString().c_str());
 
     {
         LOCK(cs_main);
@@ -992,7 +993,7 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
 
     BOOST_FOREACH(CTxIn in, newInput) {
         if (in.prevout.IsNull() || nAmount < 0) {
-            if(fDebug) LogPrintf ("CDarksendPool::AddEntry - input not valid!\n");
+            LogPrint("darksend", "CDarksendPool::AddEntry - input not valid!\n");
             errorID = ERR_INVALID_INPUT;
             sessionUsers--;
             return false;
@@ -1000,25 +1001,25 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     }
 
     if (!IsCollateralValid(txCollateral)){
-        if(fDebug) LogPrintf ("CDarksendPool::AddEntry - collateral not valid!\n");
+        LogPrint("darksend", "CDarksendPool::AddEntry - collateral not valid!\n");
         errorID = ERR_INVALID_COLLATERAL;
         sessionUsers--;
         return false;
     }
 
     if((int)entries.size() >= GetMaxPoolTransactions()){
-        if(fDebug) LogPrintf ("CDarksendPool::AddEntry - entries is full!\n");
+        LogPrint("darksend", "CDarksendPool::AddEntry - entries is full!\n");
         errorID = ERR_ENTRIES_FULL;
         sessionUsers--;
         return false;
     }
 
     BOOST_FOREACH(CTxIn in, newInput) {
-        if(fDebug) LogPrintf("looking for vin -- %s\n", in.ToString().c_str());
+        LogPrint("darksend", "looking for vin -- %s\n", in.ToString().c_str());
         BOOST_FOREACH(const CDarkSendEntry& v, entries) {
             BOOST_FOREACH(const CTxDSIn& s, v.sev){
                 if((CTxIn)s == in) {
-                    if(fDebug) LogPrintf ("CDarksendPool::AddEntry - found in vin\n");
+                    LogPrint("darksend", "CDarksendPool::AddEntry - found in vin\n");
                     errorID = ERR_ALREADY_HAVE;
                     sessionUsers--;
                     return false;
@@ -1031,14 +1032,14 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     v.Add(newInput, nAmount, txCollateral, newOutput);
     entries.push_back(v);
 
-    if(fDebug) LogPrintf("CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString().c_str());
     errorID = MSG_ENTRIES_ADDED;
 
     return true;
 }
 
 bool CDarksendPool::AddScriptSig(const CTxIn& newVin){
-    if(fDebug) LogPrintf("CDarksendPool::AddScriptSig -- new sig  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+    LogPrint("darksend", "CDarksendPool::AddScriptSig -- new sig  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
 
 
     BOOST_FOREACH(const CDarkSendEntry& v, entries) {
@@ -1051,22 +1052,22 @@ bool CDarksendPool::AddScriptSig(const CTxIn& newVin){
     }
 
     if(!SignatureValid(newVin.scriptSig, newVin)){
-        if(fDebug) LogPrintf("CDarksendPool::AddScriptSig - Invalid Sig\n");
+        LogPrint("darksend", "CDarksendPool::AddScriptSig - Invalid Sig\n");
         return false;
     }
 
-    if(fDebug) LogPrintf("CDarksendPool::AddScriptSig -- sig %s\n", newVin.ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::AddScriptSig -- sig %s\n", newVin.ToString().c_str());
 
     BOOST_FOREACH(CTxIn& vin, finalTransaction.vin){
         if(newVin.prevout == vin.prevout && vin.nSequence == newVin.nSequence){
             vin.scriptSig = newVin.scriptSig;
             vin.prevPubKey = newVin.prevPubKey;
-            if(fDebug) LogPrintf("CDarkSendPool::AddScriptSig -- adding to finalTransaction  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding to finalTransaction  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
         }
     }
     for(unsigned int i = 0; i < entries.size(); i++){
         if(entries[i].AddSig(newVin)){
-            if(fDebug) LogPrintf("CDarkSendPool::AddScriptSig -- adding  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
             return true;
         }
     }
@@ -1149,7 +1150,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
         BOOST_FOREACH(const CTxIn& i, vin){
             tx.vin.push_back(i);
 
-            if(fDebug) LogPrintf("dsi -- tx in %s\n", i.ToString().c_str());
+            LogPrint("darksend", "dsi -- tx in %s\n", i.ToString().c_str());
         }
 
         LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
@@ -1280,19 +1281,19 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
 
                 const CKeyStore& keystore = *pwalletMain;
 
-                if(fDebug) LogPrintf("CDarksendPool::Sign - Signing my input %i\n", mine);
+                LogPrint("darksend", "CDarksendPool::Sign - Signing my input %i\n", mine);
                 if(!SignSignature(keystore, prevPubKey, finalTransaction, mine, int(SIGHASH_ALL|SIGHASH_ANYONECANPAY))) { // changes scriptSig
-                    if(fDebug) LogPrintf("CDarksendPool::Sign - Unable to sign my own transaction! \n");
+                    LogPrint("darksend", "CDarksendPool::Sign - Unable to sign my own transaction! \n");
                     // not sure what to do here, it will timeout...?
                 }
 
                 sigs.push_back(finalTransaction.vin[mine]);
-                if(fDebug) LogPrintf(" -- dss %d %d %s\n", mine, (int)sigs.size(), finalTransaction.vin[mine].scriptSig.ToString().c_str());
+                LogPrint("darksend", " -- dss %d %d %s\n", mine, (int)sigs.size(), finalTransaction.vin[mine].scriptSig.ToString().c_str());
             }
 
         }
 
-        if(fDebug) LogPrintf("CDarksendPool::Sign - txNew:\n%s", finalTransaction.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::Sign - txNew:\n%s", finalTransaction.ToString().c_str());
     }
 
 	// push all of our signatures to the Masternode
@@ -1305,7 +1306,7 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
 
 void CDarksendPool::NewBlock()
 {
-    if(fDebug) LogPrintf("CDarksendPool::NewBlock \n");
+    LogPrint("darksend", "CDarksendPool::NewBlock \n");
 
     //we we're processing lots of blocks, we'll just leave
     if(GetTime() - lastNewBlock < 10) return;
@@ -1377,7 +1378,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
     }
 
     if(mnodeman.size() == 0){
-        if(fDebug) LogPrintf("CDarksendPool::DoAutomaticDenominating - No Masternodes detected\n");
+        LogPrint("darksend", "CDarksendPool::DoAutomaticDenominating - No Masternodes detected\n");
         strAutoDenomResult = _("No Masternodes detected.");
         return false;
     }
@@ -1414,7 +1415,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         return false;
     }
 
-    if (fDebug) LogPrintf("DoAutomaticDenominating : nLowestDenom=%d, nBalanceNeedsAnonymized=%d\n", nLowestDenom, nBalanceNeedsAnonymized);
+    LogPrint("darksend", "DoAutomaticDenominating : nLowestDenom=%d, nBalanceNeedsAnonymized=%d\n", nLowestDenom, nBalanceNeedsAnonymized);
 
     // select coins that should be given to the pool
     if (!pwalletMain->SelectCoinsDark(nValueMin, nBalanceNeedsAnonymized, vCoins, nValueIn, 0, nDarksendRounds))
@@ -1687,6 +1688,7 @@ bool CDarksendPool::MakeCollateralAmounts()
     if(!success){
         // if we failed (most likeky not enough funds), try to use denominated instead -
         // MN-like funds should not be touched in any case and we can't mix denominated without collaterals anyway
+        LogPrintf("darksend", "MakeCollateralAmounts: ONLY_NONDENOMINATED_NOTMN Error - %s\n", strFail);
         success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
                 nFeeRet, strFail, coinControl, ONLY_DENOMINATED);
         if(!success){
@@ -1816,7 +1818,7 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
     LogPrintf("CDarksendPool::IsCompatibleWithSession - sessionDenom %d sessionUsers %d\n", sessionDenom, sessionUsers);
 
     if (!unitTest && !IsCollateralValid(txCollateral)){
-        if(fDebug) LogPrintf ("CDarksendPool::IsCompatibleWithSession - collateral not valid!\n");
+        LogPrint("darksend", "GetInputDarksendRoundsCDarksendPool::IsCompatibleWithSession - collateral not valid!\n");
         errorID = ERR_INVALID_COLLATERAL;
         return false;
     }
diff --git a/src/init.cpp b/src/init.cpp
index 0e14420bcddf..ac86dfec8b8a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -377,7 +377,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "  -debug=<category>      " + strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + "\n";
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:");
-    strUsage +=                                 " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below
+    strUsage +=                                 " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net, darksend"; // Don't translate these and qt below
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";

From 184611f2acfdb294fc754bff1c5eb31fda1fa13c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 25 Jun 2015 00:11:45 +0300
Subject: [PATCH 1732/1819] add instantx debug category

---
 src/init.cpp     |  5 +++--
 src/instantx.cpp | 31 ++++++++++++++-----------------
 2 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index ac86dfec8b8a..a639214c65cd 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -376,8 +376,9 @@ std::string HelpMessage(HelpMessageMode mode)
     }
     strUsage += "  -debug=<category>      " + strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + "\n";
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
-    strUsage += "                         " + _("<category> can be:");
-    strUsage +=                                 " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net, darksend"; // Don't translate these and qt below
+    strUsage += "                         " + _("<category> can be:\n");
+    strUsage += "                           addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net,\n"; // Don't translate these and qt below
+    strUsage += "                           darksend, instantx"; // Don't translate these and qt below
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
diff --git a/src/instantx.cpp b/src/instantx.cpp
index 588a3914686a..a2ee50334db0 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -197,12 +197,12 @@ bool IsIXTXValid(const CTransaction& txCollateral){
     }
 
     if(nValueOut > GetSporkValue(SPORK_5_MAX_VALUE)*COIN){
-        if(fDebug) LogPrintf ("IsIXTXValid - Transaction value too high - %s\n", txCollateral.ToString().c_str());
+        LogPrint("instantx", "IsIXTXValid - Transaction value too high - %s\n", txCollateral.ToString().c_str());
         return false;
     }
 
     if(missingTx){
-        if(fDebug) LogPrintf ("IsIXTXValid - Unknown inputs in IX transaction - %s\n", txCollateral.ToString().c_str());
+        LogPrint("instantx", "IsIXTXValid - Unknown inputs in IX transaction - %s\n", txCollateral.ToString().c_str());
         /*
             This happens sometimes for an unknown reason, so we'll return that it's a valid transaction.
             If someone submits an invalid transaction it will be rejected by the network anyway and this isn't
@@ -212,7 +212,7 @@ bool IsIXTXValid(const CTransaction& txCollateral){
     }
 
     if(nValueIn-nValueOut < COIN*0.01) {
-        if(fDebug) LogPrintf ("IsIXTXValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
+        LogPrint("instantx", "IsIXTXValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
         return false;
     }
 
@@ -250,7 +250,7 @@ int64_t CreateNewLock(CTransaction tx)
         mapTxLocks.insert(make_pair(tx.GetHash(), newLock));
     } else {
         mapTxLocks[tx.GetHash()].nBlockHeight = nBlockHeight;
-        if(fDebug) LogPrintf("CreateNewLock - Transaction Lock Exists %s !\n", tx.GetHash().ToString().c_str());
+        LogPrint("instantx", "CreateNewLock - Transaction Lock Exists %s !\n", tx.GetHash().ToString().c_str());
     }
 
 
@@ -267,20 +267,20 @@ void DoConsensusVote(CTransaction& tx, int64_t nBlockHeight)
 
     if(n == -1)
     {
-        if(fDebug) LogPrintf("InstantX::DoConsensusVote - Unknown Masternode\n");
+        LogPrint("instantx", "InstantX::DoConsensusVote - Unknown Masternode\n");
         return;
     }
 
     if(n > INSTANTX_SIGNATURES_TOTAL)
     {
-        if(fDebug) LogPrintf("InstantX::DoConsensusVote - Masternode not in the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
+        LogPrint("instantx", "InstantX::DoConsensusVote - Masternode not in the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
         return;
     }
     /*
         nBlockHeight calculated from the transaction is the authoritive source
     */
 
-    if(fDebug) LogPrintf("InstantX::DoConsensusVote - In the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
+    LogPrint("instantx", "InstantX::DoConsensusVote - In the top %d (%d)\n", INSTANTX_SIGNATURES_TOTAL, n);
 
     CConsensusVote ctx;
     ctx.vinMasternode = activeMasternode.vin;
@@ -308,20 +308,18 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
 
     CMasternode* pmn = mnodeman.Find(ctx.vinMasternode);
     if(pmn != NULL)
-    {
-        if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Masternode ADDR %s %d\n", pmn->addr.ToString().c_str(), n);
-    }
+        LogPrint("instantx", "InstantX::ProcessConsensusVote - Masternode ADDR %s %d\n", pmn->addr.ToString().c_str(), n);
 
     if(n == -1)
     {
         //can be caused by past versions trying to vote with an invalid protocol
-        if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Unknown Masternode\n");
+        LogPrint("instantx", "InstantX::ProcessConsensusVote - Unknown Masternode\n");
         return false;
     }
 
     if(n > INSTANTX_SIGNATURES_TOTAL)
     {
-        if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Masternode not in the top %d (%d) - %s\n", INSTANTX_SIGNATURES_TOTAL, n, ctx.GetHash().ToString().c_str());
+        LogPrint("instantx", "InstantX::ProcessConsensusVote - Masternode not in the top %d (%d) - %s\n", INSTANTX_SIGNATURES_TOTAL, n, ctx.GetHash().ToString().c_str());
         return false;
     }
 
@@ -340,9 +338,8 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
         newLock.nTimeout = GetTime()+(60*5);
         newLock.txHash = ctx.txHash;
         mapTxLocks.insert(make_pair(ctx.txHash, newLock));
-    } else {
-        if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Transaction Lock Exists %s !\n", ctx.txHash.ToString().c_str());
-    }
+    } else
+        LogPrint("instantx", "InstantX::ProcessConsensusVote - Transaction Lock Exists %s !\n", ctx.txHash.ToString().c_str());
 
     //compile consessus vote
     std::map<uint256, CTransactionLock>::iterator i = mapTxLocks.find(ctx.txHash);
@@ -357,10 +354,10 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
         }
 #endif
 
-        if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Transaction Lock Votes %d - %s !\n", (*i).second.CountSignatures(), ctx.GetHash().ToString().c_str());
+        LogPrint("instantx", "InstantX::ProcessConsensusVote - Transaction Lock Votes %d - %s !\n", (*i).second.CountSignatures(), ctx.GetHash().ToString().c_str());
 
         if((*i).second.CountSignatures() >= INSTANTX_SIGNATURES_REQUIRED){
-            if(fDebug) LogPrintf("InstantX::ProcessConsensusVote - Transaction Lock Is Complete %s !\n", (*i).second.GetHash().ToString().c_str());
+            LogPrint("instantx", "InstantX::ProcessConsensusVote - Transaction Lock Is Complete %s !\n", (*i).second.GetHash().ToString().c_str());
 
             CTransaction& tx = mapTxLockReq[ctx.txHash];
             if(!CheckForConflictingLocks(tx)){

From 1c7c81afb3676d3f75b7550911037e8a44a2e1ec Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Thu, 25 Jun 2015 00:27:56 +0300
Subject: [PATCH 1733/1819] cleanup other incorrect ix log outputs

---
 src/instantx.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index a2ee50334db0..b734ebdc41cf 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -529,7 +529,7 @@ bool CConsensusVote::Sign()
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key2, pubkey2))
     {
-        LogPrintf("CActiveMasternode::RegisterAsMasterNode() - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage.c_str());
+        LogPrintf("CConsensusVote::Sign() - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage.c_str());
         return false;
     }
 
@@ -541,12 +541,12 @@ bool CConsensusVote::Sign()
     //LogPrintf("signing pubkey2 %s \n", address2.ToString().c_str());
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchMasterNodeSignature, key2)) {
-        LogPrintf("CActiveMasternode::RegisterAsMasterNode() - Sign message failed");
+        LogPrintf("CConsensusVote::Sign() - Sign message failed");
         return false;
     }
 
     if(!darkSendSigner.VerifyMessage(pubkey2, vchMasterNodeSignature, strMessage, errorMessage)) {
-        LogPrintf("CActiveMasternode::RegisterAsMasterNode() - Verify message failed");
+        LogPrintf("CConsensusVote::Sign() - Verify message failed");
         return false;
     }
 
@@ -563,18 +563,18 @@ bool CTransactionLock::SignaturesValid()
 
         if(n == -1)
         {
-            LogPrintf("InstantX::DoConsensusVote - Unknown Masternode\n");
+            LogPrintf("CTransactionLock::SignaturesValid() - Unknown Masternode\n");
             return false;
         }
 
         if(n > INSTANTX_SIGNATURES_TOTAL)
         {
-            LogPrintf("InstantX::DoConsensusVote - Masternode not in the top %s\n", INSTANTX_SIGNATURES_TOTAL);
+            LogPrintf("CTransactionLock::SignaturesValid() - Masternode not in the top %s\n", INSTANTX_SIGNATURES_TOTAL);
             return false;
         }
 
         if(!vote.SignatureValid()){
-            LogPrintf("InstantX::CTransactionLock::SignaturesValid - Signature not valid\n");
+            LogPrintf("CTransactionLock::SignaturesValid() - Signature not valid\n");
             return false;
         }
     }

From dd8fa7c365ea4ac3d5738454982bef1aafdbca9b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 31 Jul 2015 18:46:47 +0300
Subject: [PATCH 1734/1819] Continue work on more debug categories - rebased to
 latest v12 - masternode, mnpayments, mnbudget and keepass categories - remove
 c_str in logprint(f)

---
 src/darksend.cpp            | 118 ++++++++++++++++++------------------
 src/darksend.h              |   2 +-
 src/init.cpp                |   2 +-
 src/keepass.cpp             |  26 ++++----
 src/main.cpp                |  12 ++--
 src/masternode-budget.cpp   |  22 +++----
 src/masternode-payments.cpp |  12 ++--
 src/masternode.cpp          |  30 ++++-----
 src/masternodeman.cpp       |  16 ++---
 src/spork.cpp               |   8 +--
 src/wallet.cpp              |  14 ++---
 11 files changed, 131 insertions(+), 131 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index e6f895785e97..893437849a87 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -81,7 +81,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         if(sessionUsers == 0) {
             if(pmn->nLastDsq != 0 &&
                 pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
-                LogPrintf("dsa -- last dsq too recent, must wait. %s \n", pfrom->addr.ToString().c_str());
+                LogPrintf("dsa -- last dsq too recent, must wait. %s \n", pfrom->addr.ToString());
                 errorID = ERR_RECENT;
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
@@ -123,12 +123,12 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         if(dsq.ready) {
             if(!pSubmittedToMasternode) return;
             if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)addr){
-                LogPrintf("dsq - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString().c_str(), addr.ToString().c_str());
+                LogPrintf("dsq - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString(), addr.ToString());
                 return;
             }
 
             if(state == POOL_STATUS_QUEUE){
-                LogPrint("darksend", "Darksend queue is ready - %s\n", addr.ToString().c_str());
+                LogPrint("darksend", "Darksend queue is ready - %s\n", addr.ToString());
                 PrepareDarksendDenominate();
             }
         } else {
@@ -140,14 +140,14 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             //don't allow a few nodes to dominate the queuing process
             if(pmn->nLastDsq != 0 &&
                 pmn->nLastDsq + mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)/5 > mnodeman.nDsqCount){
-                LogPrint("darksend", "dsq -- Masternode sending too many dsq messages. %s \n", pmn->addr.ToString().c_str());
+                LogPrint("darksend", "dsq -- Masternode sending too many dsq messages. %s \n", pmn->addr.ToString());
                 return;
             }
             mnodeman.nDsqCount++;
             pmn->nLastDsq = mnodeman.nDsqCount;
             pmn->allowFreeTx = true;
 
-            LogPrint("darksend", "dsq - new Darksend queue object - %s\n", addr.ToString().c_str());
+            LogPrint("darksend", "dsq - new Darksend queue object - %s\n", addr.ToString());
             vecDarksendQueue.push_back(dsq);
             dsq.Relay();
             dsq.time = GetTime();
@@ -209,13 +209,13 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
                 tx.vout.push_back(o);
 
                 if(o.scriptPubKey.size() != 25){
-                    LogPrintf("dsi - non-standard pubkey detected! %s\n", o.scriptPubKey.ToString().c_str());
+                    LogPrintf("dsi - non-standard pubkey detected! %s\n", o.scriptPubKey.ToString());
                     errorID = ERR_NON_STANDARD_PUBKEY;
                     pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
                 }
                 if(!o.scriptPubKey.IsNormalPaymentScript()){
-                    LogPrintf("dsi - invalid script! %s\n", o.scriptPubKey.ToString().c_str());
+                    LogPrintf("dsi - invalid script! %s\n", o.scriptPubKey.ToString());
                     errorID = ERR_INVALID_SCRIPT;
                     pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
@@ -225,7 +225,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             BOOST_FOREACH(const CTxIn i, in){
                 tx.vin.push_back(i);
 
-                LogPrint("darksend", "dsi -- tx in %s\n", i.ToString().c_str());
+                LogPrint("darksend", "dsi -- tx in %s\n", i.ToString());
 
                 CTransaction tx2;
                 uint256 hash;
@@ -239,7 +239,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
             }
 
             if (nValueIn > DARKSEND_POOL_MAX) {
-                LogPrintf("dsi -- more than Darksend pool max! %s\n", tx.ToString().c_str());
+                LogPrintf("dsi -- more than Darksend pool max! %s\n", tx.ToString());
                 errorID = ERR_MAXIMUM;
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
@@ -247,13 +247,13 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
             if(!missingTx){
                 if (nValueIn-nValueOut > nValueIn*.01) {
-                    LogPrintf("dsi -- fees are too high! %s\n", tx.ToString().c_str());
+                    LogPrintf("dsi -- fees are too high! %s\n", tx.ToString());
                     errorID = ERR_FEES;
                     pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                     return;
                 }
             } else {
-                LogPrintf("dsi -- missing input tx! %s\n", tx.ToString().c_str());
+                LogPrintf("dsi -- missing input tx! %s\n", tx.ToString());
                 errorID = ERR_MISSING_TX;
                 pfrom->PushMessage("dssu", sessionID, GetState(), GetEntriesCount(), MASTERNODE_REJECTED, errorID);
                 return;
@@ -286,7 +286,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
         if(!pSubmittedToMasternode) return;
         if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pfrom->addr){
-            //LogPrintf("dssu - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString().c_str(), pfrom->addr.ToString().c_str());
+            //LogPrintf("dssu - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString(), pfrom->addr.ToString());
             return;
         }
 
@@ -297,7 +297,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
         int errorID;
         vRecv >> sessionIDMessage >> state >> entriesCount >> accepted >> errorID;
 
-        LogPrint("darksend", "dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, GetMessageByID(errorID).c_str());
+        LogPrint("darksend", "dssu - state: %i entriesCount: %i accepted: %i error: %s \n", state, entriesCount, accepted, GetMessageByID(errorID));
 
         if((accepted != 1 && accepted != 0) && sessionID != sessionIDMessage){
             LogPrintf("dssu - message doesn't match current Darksend session %d %d\n", sessionID, sessionIDMessage);
@@ -336,7 +336,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
         if(!pSubmittedToMasternode) return;
         if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pfrom->addr){
-            //LogPrintf("dsc - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString().c_str(), pfrom->addr.ToString().c_str());
+            //LogPrintf("dsc - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString(), pfrom->addr.ToString());
             return;
         }
 
@@ -360,7 +360,7 @@ void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand
 
         if(!pSubmittedToMasternode) return;
         if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pfrom->addr){
-            //LogPrintf("dsc - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString().c_str(), pfrom->addr.ToString().c_str());
+            //LogPrintf("dsc - message doesn't match current Masternode - %s != %s\n", pSubmittedToMasternode->addr.ToString(), pfrom->addr.ToString());
             return;
         }
 
@@ -502,12 +502,12 @@ void CDarksendPool::Check()
     //printf("CDarksendPool::Check() %d - %d - %d\n", state, anonTx.CountEntries(), GetTimeMillis()-lastTimeChanged);
 
     if(fMasterNode) {
-        if(fDebug) LogPrintf("CDarksendPool::Check() - entries count %lu\n", entries.size());
+        LogPrint("darksend", "CDarksendPool::Check() - entries count %lu\n", entries.size());
 
         // If entries is full, then move on to the next phase
         if(state == POOL_STATUS_ACCEPTING_ENTRIES && (int)entries.size() >= GetMaxPoolTransactions())
         {
-            if(fDebug) LogPrintf("CDarksendPool::Check() -- TRYING TRANSACTION \n");
+            LogPrint("darksend", "CDarksendPool::Check() -- TRYING TRANSACTION \n");
             UpdateState(POOL_STATUS_FINALIZE_TRANSACTION);
         }
     }
@@ -534,7 +534,7 @@ void CDarksendPool::Check()
             std::random_shuffle ( txNew.vout.begin(), txNew.vout.end(), randomizeList);
 
 
-            LogPrint("darksend", "Transaction 1: %s\n", txNew.ToString().c_str());
+            LogPrint("darksend", "Transaction 1: %s\n", txNew.ToString());
             finalTransaction = txNew;
 
             // request signatures from clients
@@ -552,7 +552,7 @@ void CDarksendPool::Check()
 
     // reset if we're here for 10 seconds
     if((state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) && GetTimeMillis()-lastTimeChanged >= 10000) {
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- timeout, RESETTING\n");
+        LogPrint("darksend", "CDarksendPool::Check() -- timeout, RESETTING\n");
         UnlockCoins();
         SetNull();
         if(fMasterNode) RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
@@ -567,7 +567,7 @@ void CDarksendPool::CheckFinalTransaction()
 
     LOCK2(cs_main, pwalletMain->cs_wallet);
     {
-        if(fDebug) LogPrintf("Transaction 2: %s\n", txNew.ToString().c_str());
+        LogPrint("darksend", "Transaction 2: %s\n", txNew.ToString());
 
         // See if the transaction is valid
         if (!txNew.AcceptToMemoryPool(false, true, true))
@@ -594,7 +594,7 @@ void CDarksendPool::CheckFinalTransaction()
 
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, strError, key2, pubkey2))
         {
-            LogPrintf("CDarksendPool::Check() - ERROR: Invalid Masternodeprivkey: '%s'\n", strError.c_str());
+            LogPrintf("CDarksendPool::Check() - ERROR: Invalid Masternodeprivkey: '%s'\n", strError);
             return;
         }
 
@@ -628,7 +628,7 @@ void CDarksendPool::CheckFinalTransaction()
         ChargeRandomFees();
 
         // Reset
-        if(fDebug) LogPrintf("CDarksendPool::Check() -- COMPLETED -- RESETTING \n");
+        LogPrint("darksend", "CDarksendPool::Check() -- COMPLETED -- RESETTING\n");
         SetNull();
         RelayStatus(sessionID, GetState(), GetEntriesCount(), MASTERNODE_RESET);
     }
@@ -847,7 +847,7 @@ void CDarksendPool::CheckTimeout(){
             SetNull();
         }
     } else if(GetTimeMillis()-lastTimeChanged >= (DARKSEND_QUEUE_TIMEOUT*1000)+addLagTime){
-        if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- resetting\n", DARKSEND_QUEUE_TIMEOUT);
+        LogPrint("darksend", "CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- resetting\n", DARKSEND_QUEUE_TIMEOUT);
         UnlockCoins();
         SetNull();
 
@@ -856,7 +856,7 @@ void CDarksendPool::CheckTimeout(){
     }
 
     if(state == POOL_STATUS_SIGNING && GetTimeMillis()-lastTimeChanged >= (DARKSEND_SIGNING_TIMEOUT*1000)+addLagTime ) {
-            if(fDebug) LogPrintf("CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- restting\n", DARKSEND_SIGNING_TIMEOUT);
+            LogPrint("darksend", "CDarksendPool::CheckTimeout() -- Session timed out (%ds) -- restting\n", DARKSEND_SIGNING_TIMEOUT);
             ChargeFees();
             UnlockCoins();
             SetNull();
@@ -918,7 +918,7 @@ bool CDarksendPool::SignatureValid(const CScript& newSig, const CTxIn& newVin){
     if(found >= 0){ //might have to do this one input at a time?
         int n = found;
         txNew.vin[n].scriptSig = newSig;
-        LogPrint("darksend", "CDarksendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24).c_str());
+        LogPrint("darksend", "CDarksendPool::SignatureValid() - Sign with sig %s\n", newSig.ToString().substr(0,24));
         if (!VerifyScript(txNew.vin[n].scriptSig, sigPubKey, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, MutableTransactionSignatureChecker(&txNew, n))){
             LogPrint("darksend", "CDarksendPool::SignatureValid() - Signing - Error signing input %u\n", n);
             return false;
@@ -942,7 +942,7 @@ bool CDarksendPool::IsCollateralValid(const CTransaction& txCollateral){
         nValueOut += o.nValue;
 
         if(!o.scriptPubKey.IsNormalPaymentScript()){
-            LogPrintf ("CDarksendPool::IsCollateralValid - Invalid Script %s\n", txCollateral.ToString().c_str());
+            LogPrintf ("CDarksendPool::IsCollateralValid - Invalid Script %s\n", txCollateral.ToString());
             return false;
         }
     }
@@ -960,17 +960,17 @@ bool CDarksendPool::IsCollateralValid(const CTransaction& txCollateral){
     }
 
     if(missingTx){
-        LogPrint("darksend", "CDarksendPool::IsCollateralValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::IsCollateralValid - Unknown inputs in collateral transaction - %s\n", txCollateral.ToString());
         return false;
     }
 
     //collateral transactions are required to pay out DARKSEND_COLLATERAL as a fee to the miners
     if(nValueIn - nValueOut < DARKSEND_COLLATERAL) {
-        LogPrint("darksend", "CDarksendPool::IsCollateralValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::IsCollateralValid - did not include enough fees in transaction %d\n%s\n", nValueOut-nValueIn, txCollateral.ToString());
         return false;
     }
 
-    LogPrint("darksend", "CDarksendPool::IsCollateralValid %s\n", txCollateral.ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::IsCollateralValid %s\n", txCollateral.ToString());
 
     {
         LOCK(cs_main);
@@ -1015,7 +1015,7 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     }
 
     BOOST_FOREACH(CTxIn in, newInput) {
-        LogPrint("darksend", "looking for vin -- %s\n", in.ToString().c_str());
+        LogPrint("darksend", "looking for vin -- %s\n", in.ToString());
         BOOST_FOREACH(const CDarkSendEntry& v, entries) {
             BOOST_FOREACH(const CTxDSIn& s, v.sev){
                 if((CTxIn)s == in) {
@@ -1032,20 +1032,20 @@ bool CDarksendPool::AddEntry(const std::vector<CTxIn>& newInput, const int64_t&
     v.Add(newInput, nAmount, txCollateral, newOutput);
     entries.push_back(v);
 
-    LogPrint("darksend", "CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::AddEntry -- adding %s\n", newInput[0].ToString());
     errorID = MSG_ENTRIES_ADDED;
 
     return true;
 }
 
 bool CDarksendPool::AddScriptSig(const CTxIn& newVin){
-    LogPrint("darksend", "CDarksendPool::AddScriptSig -- new sig  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+    LogPrint("darksend", "CDarksendPool::AddScriptSig -- new sig  %s\n", newVin.scriptSig.ToString().substr(0,24));
 
 
     BOOST_FOREACH(const CDarkSendEntry& v, entries) {
         BOOST_FOREACH(const CTxDSIn& s, v.sev){
             if(s.scriptSig == newVin.scriptSig) {
-                if(fDebug) LogPrintf("CDarksendPool::AddScriptSig - already exists\n");
+                LogPrint("darksend", "CDarksendPool::AddScriptSig - already exists\n");
                 return false;
             }
         }
@@ -1056,18 +1056,18 @@ bool CDarksendPool::AddScriptSig(const CTxIn& newVin){
         return false;
     }
 
-    LogPrint("darksend", "CDarksendPool::AddScriptSig -- sig %s\n", newVin.ToString().c_str());
+    LogPrint("darksend", "CDarksendPool::AddScriptSig -- sig %s\n", newVin.ToString());
 
     BOOST_FOREACH(CTxIn& vin, finalTransaction.vin){
         if(newVin.prevout == vin.prevout && vin.nSequence == newVin.nSequence){
             vin.scriptSig = newVin.scriptSig;
             vin.prevPubKey = newVin.prevPubKey;
-            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding to finalTransaction  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding to finalTransaction  %s\n", newVin.scriptSig.ToString().substr(0,24));
         }
     }
     for(unsigned int i = 0; i < entries.size(); i++){
         if(entries[i].AddSig(newVin)){
-            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding  %s\n", newVin.scriptSig.ToString().substr(0,24).c_str());
+            LogPrint("darksend", "CDarkSendPool::AddScriptSig -- adding  %s\n", newVin.scriptSig.ToString().substr(0,24));
             return true;
         }
     }
@@ -1110,7 +1110,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
         lockedCoins.push_back(in);
 
     //BOOST_FOREACH(CTxOut o, vout)
-    //    LogPrintf(" vout - %s\n", o.ToString().c_str());
+    //    LogPrintf(" vout - %s\n", o.ToString());
 
 
     // we should already be connected to a Masternode
@@ -1150,15 +1150,15 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
         BOOST_FOREACH(const CTxIn& i, vin){
             tx.vin.push_back(i);
 
-            LogPrint("darksend", "dsi -- tx in %s\n", i.ToString().c_str());
+            LogPrint("darksend", "dsi -- tx in %s\n", i.ToString());
         }
 
-        LogPrintf("Submitting tx %s\n", tx.ToString().c_str());
+        LogPrintf("Submitting tx %s\n", tx.ToString());
 
         {
             LOCK(cs_main);
             if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
-                LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString().c_str());
+                LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString());
                 UnlockCoins();
                 SetNull();
                 return;
@@ -1231,7 +1231,7 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
     if(fMasterNode) return false;
 
     finalTransaction = finalTransactionNew;
-    LogPrintf("CDarksendPool::SignFinalTransaction %s\n", finalTransaction.ToString().c_str());
+    LogPrintf("CDarksendPool::SignFinalTransaction %s\n", finalTransaction.ToString());
 
     vector<CTxIn> sigs;
 
@@ -1288,12 +1288,12 @@ bool CDarksendPool::SignFinalTransaction(CTransaction& finalTransactionNew, CNod
                 }
 
                 sigs.push_back(finalTransaction.vin[mine]);
-                LogPrint("darksend", " -- dss %d %d %s\n", mine, (int)sigs.size(), finalTransaction.vin[mine].scriptSig.ToString().c_str());
+                LogPrint("darksend", " -- dss %d %d %s\n", mine, (int)sigs.size(), finalTransaction.vin[mine].scriptSig.ToString());
             }
 
         }
 
-        LogPrint("darksend", "CDarksendPool::Sign - txNew:\n%s", finalTransaction.ToString().c_str());
+        LogPrint("darksend", "CDarksendPool::Sign - txNew:\n%s", finalTransaction.ToString());
     }
 
 	// push all of our signatures to the Masternode
@@ -1474,14 +1474,14 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
         CValidationState state;
         if(txCollateral == CMutableTransaction()){
             if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
-                LogPrintf("% -- create collateral error:%s\n", __func__, strReason.c_str());
+                LogPrintf("% -- create collateral error:%s\n", __func__, strReason);
                 return false;
             }
         } else {
             if(!IsCollateralValid(txCollateral)) {
                 LogPrintf("%s -- invalid collateral, recreating...\n", __func__);
                 if(!pwalletMain->CreateCollateralTransaction(txCollateral, strReason)){
-                    LogPrintf("%s -- create collateral error: %s\n", __func__, strReason.c_str());
+                    LogPrintf("%s -- create collateral error: %s\n", __func__, strReason);
                     return false;
                 }
             }
@@ -1536,7 +1536,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                         sessionDenom = dsq.nDenom;
 
                         pnode->PushMessage("dsa", sessionDenom, txCollateral);
-                        LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString().c_str());
+                        LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString());
                         strAutoDenomResult = _("Mixing in progress...");
                         dsq.time = 0; //remove node
                         return true;
@@ -1570,7 +1570,7 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
             }
 
             lastTimeChanged = GetTimeMillis();
-            LogPrintf("DoAutomaticDenominating -- attempt %d connection to Masternode %s\n", i, pmn->addr.ToString().c_str());
+            LogPrintf("DoAutomaticDenominating -- attempt %d connection to Masternode %s\n", i, pmn->addr.ToString());
             if(ConnectNode((CAddress)pmn->addr, NULL, true)){
 
                 LOCK(cs_vNodes);
@@ -1615,12 +1615,12 @@ bool CDarksendPool::PrepareDarksendDenominate()
 {
     // Submit transaction to the pool if we get here, use sessionDenom so we use the same amount of money
     std::string strError = pwalletMain->PrepareDarksendDenominate(0, nDarksendRounds);
-    LogPrintf("DoAutomaticDenominating : Running Darksend denominate. Return '%s'\n", strError.c_str());
+    LogPrintf("DoAutomaticDenominating : Running Darksend denominate. Return '%s'\n", strError);
 
     if(strError == "") return true;
 
     strAutoDenomResult = strError;
-    LogPrintf("DoAutomaticDenominating : Error running denominate, %s\n", strError.c_str());
+    LogPrintf("DoAutomaticDenominating : Error running denominate, %s\n", strError);
     return false;
 }
 
@@ -1650,13 +1650,13 @@ bool CDarksendPool::SendRandomPaymentToSelf()
     CCoinControl *coinControl=NULL;
     bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekey, nFeeRet, strFail, coinControl, ONLY_DENOMINATED);
     if(!success){
-        LogPrintf("SendRandomPaymentToSelf: Error - %s\n", strFail.c_str());
+        LogPrintf("SendRandomPaymentToSelf: Error - %s\n", strFail);
         return false;
     }
 
     pwalletMain->CommitTransaction(wtx, reservekey);
 
-    LogPrintf("SendRandomPaymentToSelf Success: tx %s\n", wtx.GetHash().GetHex().c_str());
+    LogPrintf("SendRandomPaymentToSelf Success: tx %s\n", wtx.GetHash().GetHex());
 
     return true;
 }
@@ -1772,7 +1772,7 @@ bool CDarksendPool::CreateDenominated(int64_t nTotalValue)
     bool success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
             nFeeRet, strFail, coinControl, ONLY_NONDENOMINATED_NOTMN);
     if(!success){
-        LogPrintf("CreateDenominated: Error - %s\n", strFail.c_str());
+        LogPrintf("CreateDenominated: Error - %s\n", strFail);
         // TODO: return reservekeyDenom here
         reservekeyCollateral.ReturnKey();
         return false;
@@ -1787,7 +1787,7 @@ bool CDarksendPool::CreateDenominated(int64_t nTotalValue)
     else
         LogPrintf("CreateDenominated: CommitTransaction failed!\n");
 
-    LogPrintf("CreateDenominated: tx %s\n", wtx.GetHash().GetHex().c_str());
+    LogPrintf("CreateDenominated: tx %s\n", wtx.GetHash().GetHex());
 
     return true;
 }
@@ -1800,10 +1800,10 @@ bool CDarksendPool::IsCompatibleWithEntries(std::vector<CTxOut>& vout)
         LogPrintf(" IsCompatibleWithEntries %d %d\n", GetDenominations(vout), GetDenominations(v.vout));
 /*
         BOOST_FOREACH(CTxOut o1, vout)
-            LogPrintf(" vout 1 - %s\n", o1.ToString().c_str());
+            LogPrintf(" vout 1 - %s\n", o1.ToString());
 
         BOOST_FOREACH(CTxOut o2, v.vout)
-            LogPrintf(" vout 2 - %s\n", o2.ToString().c_str());
+            LogPrintf(" vout 2 - %s\n", o2.ToString());
 */
         if(GetDenominations(vout) != GetDenominations(v.vout)) return false;
     }
@@ -2101,7 +2101,7 @@ bool CDarksendQueue::Sign()
 
     if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key2, pubkey2))
     {
-        LogPrintf("CDarksendQueue():Relay - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage.c_str());
+        LogPrintf("CDarksendQueue():Relay - ERROR: Invalid Masternodeprivkey: '%s'\n", errorMessage);
         return false;
     }
 
@@ -2176,7 +2176,7 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
     {
         if(!pSubmittedToMasternode) return;
         if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pnode->addr) continue;
-        LogPrintf("RelayIn - found master, relaying message - %s \n", pnode->addr.ToString().c_str());
+        LogPrintf("RelayIn - found master, relaying message - %s \n", pnode->addr.ToString());
         pnode->PushMessage("dsi", vin2, nAmount, txCollateral, vout2);
     }
 }
@@ -2239,10 +2239,10 @@ void ThreadCheckDarkSendPool()
 
                 //if we've used 90% of the Masternode list then drop all the oldest.
                 int nThreshold = (int)(mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION) * 0.9);
-                if(fDebug) LogPrintf("Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+                LogPrint("darksend", "Checking vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
                 while((int)vecMasternodesUsed.size() > nThreshold){
                     vecMasternodesUsed.erase(vecMasternodesUsed.begin());
-                    if(fDebug) LogPrintf("  vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
+                    LogPrint("darksend", "  vecMasternodesUsed size %d threshold %d\n", (int)vecMasternodesUsed.size(), nThreshold);
                 }
             }
 
diff --git a/src/darksend.h b/src/darksend.h
index e66018bae780..d8c21ce1a8af 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -405,7 +405,7 @@ class CDarksendPool
     void UpdateState(unsigned int newState)
     {
         if (fMasterNode && (newState == POOL_STATUS_ERROR || newState == POOL_STATUS_SUCCESS)){
-            if(fDebug) LogPrintf("CDarksendPool::UpdateState() - Can't set state to ERROR or SUCCESS as a Masternode. \n");
+            LogPrint("darksend", "CDarksendPool::UpdateState() - Can't set state to ERROR or SUCCESS as a Masternode. \n");
             return;
         }
 
diff --git a/src/init.cpp b/src/init.cpp
index a639214c65cd..72a2023b500c 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -378,7 +378,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:\n");
     strUsage += "                           addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net,\n"; // Don't translate these and qt below
-    strUsage += "                           darksend, instantx"; // Don't translate these and qt below
+    strUsage += "                           darksend, instantx, masternode, keepass, mnpayments, mnbudget"; // Don't translate these and qt below
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
diff --git a/src/keepass.cpp b/src/keepass.cpp
index a6e50e397496..a4453fa89ea7 100644
--- a/src/keepass.cpp
+++ b/src/keepass.cpp
@@ -228,8 +228,8 @@ void CKeePassIntegrator::doHTTPPost(const std::string& sRequest, int& nStatus, s
     std::string strPost = constructHTTPPost(sRequest, mapRequestHeaders);
 
     // Logging of actual post data disabled as to not write passphrase in debug.log. Only enable temporarily when needed
-    //if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - send POST data: %s\n", strPost.c_str());
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - send POST data\n");
+    //LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - send POST data: %s\n", strPost);
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - send POST data\n");
 
     boost::asio::streambuf request;
     std::ostream request_stream(&request);
@@ -238,7 +238,7 @@ void CKeePassIntegrator::doHTTPPost(const std::string& sRequest, int& nStatus, s
     // Send the request.
     boost::asio::write(socket, request);
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - request written\n");
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - request written\n");
 
     // Read the response status line. The response streambuf will automatically
     // grow to accommodate the entire line. The growth may be limited by passing
@@ -246,14 +246,14 @@ void CKeePassIntegrator::doHTTPPost(const std::string& sRequest, int& nStatus, s
     boost::asio::streambuf response;
     boost::asio::read_until(socket, response, "\r\n");
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - request status line read\n");
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - request status line read\n");
 
     // Receive HTTP reply status
     int nProto = 0;
     std::istream response_stream(&response);
     nStatus = ReadHTTPStatus(response_stream, nProto);
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - reading response body start\n");
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - reading response body start\n");
     // Read until EOF, writing data to output as we go.
     while (boost::asio::read(socket, response, boost::asio::transfer_at_least(1), error))
     {
@@ -265,12 +265,12 @@ void CKeePassIntegrator::doHTTPPost(const std::string& sRequest, int& nStatus, s
             }
         }
     }
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - reading response body end\n");
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - reading response body end\n");
 
     // Receive HTTP reply message headers and body
     std::map<std::string, std::string> mapHeaders;
     ReadHTTPMessage(response_stream, mapHeaders, sResponse, nProto, std::numeric_limits<size_t>::max());
-    if(fDebug) LogPrintf("CKeePassIntegrator::doHTTPPost - Processed body\n");
+    LogPrint("keepass", "CKeePassIntegrator::doHTTPPost - Processed body\n");
 }
 
 void CKeePassIntegrator::rpcTestAssociation(bool bTriggerUnlock)
@@ -283,7 +283,7 @@ void CKeePassIntegrator::rpcTestAssociation(bool bTriggerUnlock)
 
     doHTTPPost(request.getJson(), nStatus, sResponse);
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::rpcTestAssociation - send result: status: %d response: %s\n", nStatus, sResponse.c_str());
+    LogPrint("keepass", "CKeePassIntegrator::rpcTestAssociation - send result: status: %d response: %s\n", nStatus, sResponse);
 }
 
 std::vector<CKeePassIntegrator::CKeePassEntry> CKeePassIntegrator::rpcGetLogins()
@@ -304,8 +304,8 @@ std::vector<CKeePassIntegrator::CKeePassEntry> CKeePassIntegrator::rpcGetLogins(
     doHTTPPost(request.getJson(), nStatus, sResponse);
 
     // Logging of actual response data disabled as to not write passphrase in debug.log. Only enable temporarily when needed
-    //if(fDebug) LogPrintf("CKeePassIntegrator::rpcGetLogins - send result: status: %d response: %s\n", nStatus, sResponse.c_str());
-    if(fDebug) LogPrintf("CKeePassIntegrator::rpcGetLogins - send result: status: %d\n", nStatus);
+    //LogPrint("keepass", "CKeePassIntegrator::rpcGetLogins - send result: status: %d response: %s\n", nStatus, sResponse);
+    LogPrint("keepass", "CKeePassIntegrator::rpcGetLogins - send result: status: %d\n", nStatus);
 
     if(nStatus != 200)
     {
@@ -340,7 +340,7 @@ void CKeePassIntegrator::rpcSetLogin(const SecureString& strWalletPass, const Se
     request.addStrParameter("Id", sKeePassId);
     request.addStrParameter("Url", sUrl);
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::rpcSetLogin - send Url: %s\n", sUrl.c_str());
+    LogPrint("keepass", "CKeePassIntegrator::rpcSetLogin - send Url: %s\n", sUrl);
 
     //request.addStrParameter("SubmitUrl", sSubmitUrl); // Is used to construct the entry title
     request.addStrParameter("Login", SecureString("dash"));
@@ -356,7 +356,7 @@ void CKeePassIntegrator::rpcSetLogin(const SecureString& strWalletPass, const Se
     doHTTPPost(request.getJson(), nStatus, sResponse);
 
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::rpcSetLogin - send result: status: %d response: %s\n", nStatus, sResponse.c_str());
+    LogPrint("keepass", "CKeePassIntegrator::rpcSetLogin - send result: status: %d response: %s\n", nStatus, sResponse);
 
     if(nStatus != 200)
     {
@@ -399,7 +399,7 @@ void CKeePassIntegrator::rpcAssociate(std::string& sId, SecureString& sKeyBase64
 
     doHTTPPost(request.getJson(), nStatus, sResponse);
 
-    if(fDebug) LogPrintf("CKeePassIntegrator::rpcAssociate - send result: status: %d response: %s\n", nStatus, sResponse.c_str());
+    LogPrint("keepass", "CKeePassIntegrator::rpcAssociate - send result: status: %d response: %s\n", nStatus, sResponse);
 
     if(nStatus != 200)
     {
diff --git a/src/main.cpp b/src/main.cpp
index 6ff69803bd24..bd6ffa81bb8b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2466,9 +2466,9 @@ bool DisconnectBlockAndInputs(CValidationState &state, CTransaction txLock)
     }
 
     if (vDisconnect.size() > 0) {
-        LogPrintf("REORGANIZE: Disconnect Conflicting Blocks %lli blocks; %s..\n", vDisconnect.size(), pindexNew->GetBlockHash().ToString().c_str());
+        LogPrintf("REORGANIZE: Disconnect Conflicting Blocks %lli blocks; %s..\n", vDisconnect.size(), pindexNew->GetBlockHash().ToString());
         BOOST_FOREACH(CBlockIndex* pindex, vDisconnect) {
-            LogPrintf(" -- disconnect %s\n", pindex->GetBlockHash().ToString().c_str());
+            LogPrintf(" -- disconnect %s\n", pindex->GetBlockHash().ToString());
             DisconnectTip(state);
         }
     }
@@ -2948,7 +2948,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                 BOOST_FOREACH(const CTxIn& in, tx.vin){
                     if(mapLockedInputs.count(in.prevout)){
                         if(mapLockedInputs[in.prevout] != tx.GetHash()){
-                            LogPrintf("CheckBlock() : found conflicting transaction with transaction lock %s %s\n", mapLockedInputs[in.prevout].ToString().c_str(), tx.GetHash().ToString().c_str());
+                            LogPrintf("CheckBlock() : found conflicting transaction with transaction lock %s %s\n", mapLockedInputs[in.prevout].ToString(), tx.GetHash().ToString());
                             return state.DoS(0, error("CheckBlock() : found conflicting transaction with transaction lock"),
                                              REJECT_INVALID, "conflicting-tx-ix");
                         }
@@ -4683,7 +4683,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             {
                 if(!pmn->allowFreeTx){
                     //multiple peers can send us a valid masternode transaction
-                    if(fDebug) LogPrintf("dstx: Masternode sending too many transactions %s\n", tx.GetHash().ToString().c_str());
+                    if(fDebug) LogPrintf("dstx: Masternode sending too many transactions %s\n", tx.GetHash().ToString());
                     return true;
                 }
 
@@ -4691,12 +4691,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
                 std::string errorMessage = "";
                 if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage)){
-                    LogPrintf("dstx: Got bad masternode address signature %s \n", vin.ToString().c_str());
+                    LogPrintf("dstx: Got bad masternode address signature %s \n", vin.ToString());
                     //pfrom->Misbehaving(20);
                     return false;
                 }
 
-                LogPrintf("dstx: Got Masternode transaction %s\n", tx.GetHash().ToString().c_str());
+                LogPrintf("dstx: Got Masternode transaction %s\n", tx.GetHash().ToString());
 
                 ignoreFees = true;
                 pmn->allowFreeTx = false;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 36f735bd8b35..324ee8d27854 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -870,7 +870,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
-            if(fDebug) LogPrintf("mvote - unknown masternode - vin: %s\n", vote.vin.ToString());
+            LogPrint("mnbudget", "mvote - unknown masternode - vin: %s\n", vote.vin.ToString());
             return;
         }
 
@@ -935,7 +935,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
-            if(fDebug) LogPrintf("fbvote - unknown masternode - vin: %s\n", vote.vin.ToString());
+            LogPrint("mnbudget", "fbvote - unknown masternode - vin: %s\n", vote.vin.ToString());
             return;
         }
 
@@ -952,7 +952,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             masternodeSync.AddedBudgetItem();
         }
 
-        if(fDebug) LogPrintf("fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
+        LogPrint("mnbudget", "fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
     }
 }
 
@@ -1181,12 +1181,12 @@ bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
             strError = strprintf("new vote older than existing vote - %s\n", vote.GetHash().ToString());
-            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
             return false;
         }
         if(vote.nTime - mapVotes[hash].nTime < BUDGET_VOTE_UPDATE_MIN){
             strError = strprintf("time between votes is too soon - %s - %lli\n", vote.GetHash().ToString(), vote.nTime - mapVotes[hash].nTime);
-            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
             return false;
         }
     }
@@ -1196,14 +1196,14 @@ bool CBudgetProposal::AddOrUpdateVote(CBudgetVote& vote, std::string& strError)
         //up to an hour ago
         if(vote.nTime < GetTime() - (60*60)){
             strError = strprintf("new vote is too old - %s - nTime %lli - Min Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() - (60*60));
-            if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
             return false;
         }        
     }
 
     if(vote.nTime > GetTime() + (60*60)){
         strError = strprintf("new vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() + (60*60));
-        if(fDebug) LogPrintf("CBudgetProposal::AddOrUpdateVote - %s\n", strError);
+        LogPrint("mnbudget", "CBudgetProposal::AddOrUpdateVote - %s\n", strError);
         return false;
     }        
 
@@ -1462,12 +1462,12 @@ bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string&
     if(mapVotes.count(hash)){
         if(mapVotes[hash].nTime > vote.nTime){
             strError = strprintf("new vote older than existing vote - %s\n", vote.GetHash().ToString());
-            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
             return false;
         }
         if(vote.nTime - mapVotes[hash].nTime < BUDGET_VOTE_UPDATE_MIN){
             strError = strprintf("time between votes is too soon - %s - %lli\n", vote.GetHash().ToString(), vote.nTime - mapVotes[hash].nTime);
-            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
             return false;
         }
     }
@@ -1477,14 +1477,14 @@ bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string&
         //up to an hour ago
         if(vote.nTime < GetTime() - (60*60)){
             strError = strprintf("new vote is too old - %s - nTime %lli - Min Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() - (60*60));
-            if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+            LogPrint("mnbudget", "CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
             return false;
         }        
     }
 
     if(vote.nTime > GetTime() + (60*60)){
         strError = strprintf("new vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", vote.GetHash().ToString(), vote.nTime, GetTime() + (60*60));
-        if(fDebug) LogPrintf("CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
+        LogPrint("mnbudget", "CFinalizedBudget::AddOrUpdateVote - %s\n", strError);
         return false;
     }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index aed8ceadf2f0..cd8670557279 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -227,7 +227,7 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
 bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight)
 {
     if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything -- find the longest chain
-        if(fDebug) LogPrintf("Client not synced, skipping block payee checks\n");
+        LogPrint("mnpayments", "Client not synced, skipping block payee checks\n");
         return true;
     }
 
@@ -362,7 +362,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         if(chainActive.Tip() == NULL) return;
 
         if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
-            if(fDebug) LogPrintf("mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
+            LogPrint("mnpayments", "mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
             masternodeSync.AddedMasternodeWinner();
             return;
         }
@@ -394,7 +394,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         ExtractDestination(winner.payee, address1);
         CBitcoinAddress address2(address1);
 
-        if(fDebug) LogPrintf("mnw - winning vote - Addr %s Height %d bestHeight %d - %s\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight, winner.vinMasternode.prevout.ToStringShort());
+        LogPrint("mnpayments", "mnw - winning vote - Addr %s Height %d bestHeight %d - %s\n", address2.ToString().c_str(), winner.nBlockHeight, chainActive.Tip()->nHeight, winner.vinMasternode.prevout.ToStringShort());
 
         if(masternodePayments.AddWinningMasternode(winner)){
             winner.Relay();
@@ -595,7 +595,7 @@ void CMasternodePayments::CleanPaymentList()
         CMasternodePaymentWinner winner = (*it).second;
 
         if(chainActive.Tip()->nHeight - winner.nBlockHeight > nLimit){
-            if(fDebug) LogPrintf("CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", winner.nBlockHeight);
+            LogPrint("mnpayments", "CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", winner.nBlockHeight);
             mapMasternodePayeeVotes.erase(it++);
         } else {
             ++it;
@@ -656,13 +656,13 @@ bool CMasternodePayments::ProcessBlock(int nBlockHeight)
 
         if(n == -1)
         {
-            if(fDebug) LogPrintf("CMasternodePayments::ProcessBlock - Unknown Masternode\n");
+            LogPrint("mnpayments", "CMasternodePayments::ProcessBlock - Unknown Masternode\n");
             return false;
         }
 
         if(n > MNPAYMENTS_SIGNATURES_TOTAL)
         {
-            if(fDebug) LogPrintf("CMasternodePayments::ProcessBlock - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
+            LogPrint("mnpayments", "CMasternodePayments::ProcessBlock - Masternode not in the top %d (%d)\n", MNPAYMENTS_SIGNATURES_TOTAL, n);
             return false;
         }
     }
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 0173af913e18..8d6f282ec56b 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -338,7 +338,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
     std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
     if(protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
-        LogPrintf("mnb - ignoring outdated Masternode %s protocol version %d\n", vin.ToString().c_str(), protocolVersion);
+        LogPrintf("mnb - ignoring outdated Masternode %s protocol version %d\n", vin.ToString(), protocolVersion);
         return false;
     }
 
@@ -361,7 +361,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
     }
 
     if(!vin.scriptSig.empty()) {
-        LogPrintf("mnb - Ignore Not Empty ScriptSig %s\n",vin.ToString().c_str());
+        LogPrintf("mnb - Ignore Not Empty ScriptSig %s\n",vin.ToString());
         return false;
     }
 
@@ -386,7 +386,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
     //   after that they just need to match
     if(pmn->pubkey == pubkey && !pmn->IsBroadcastedWithin(MASTERNODE_MIN_MNB_SECONDS)) {
         //take the newest entry
-        LogPrintf("mnb - Got updated entry for %s\n", addr.ToString().c_str());
+        LogPrintf("mnb - Got updated entry for %s\n", addr.ToString());
         pmn->UpdateFromNewBroadcast((*this));
         pmn->Check();
         if(pmn->IsEnabled()) Relay();
@@ -430,7 +430,7 @@ bool CMasternodeBroadcast::CheckInputsAndAdd(int& nDoS)
         }
     }
 
-    if(fDebug) LogPrintf("mnb - Accepted Masternode entry\n");
+    LogPrint("masnernode", "mnb - Accepted Masternode entry\n");
 
     if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
         LogPrintf("mnb - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
@@ -490,12 +490,12 @@ bool CMasternodeBroadcast::Sign(CKey& keyCollateralAddress)
     std::string strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, sig, keyCollateralAddress)) {
-        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage);
         return false;
     }
 
     if(!darkSendSigner.VerifyMessage(pubkey, sig, strMessage, errorMessage)) {
-        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CMasternodeBroadcast::Sign() - Error: %s\n", errorMessage);
         return false;
     }
 
@@ -528,12 +528,12 @@ bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
     std::string strMessage = vin.ToString() + blockHash.ToString() + boost::lexical_cast<std::string>(sigTime);
 
     if(!darkSendSigner.SignMessage(strMessage, errorMessage, vchSig, keyMasternode)) {
-        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage);
         return false;
     }
 
     if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchSig, strMessage, errorMessage)) {
-        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage.c_str());
+        LogPrintf("CMasternodePing::Sign() - Error: %s\n", errorMessage);
         return false;
     }
 
@@ -543,18 +543,18 @@ bool CMasternodePing::Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode)
 bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
 {
     if (sigTime > GetAdjustedTime() + 60 * 60) {
-        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the future %s\n", vin.ToString());
         nDos = 1;
         return false;
     }
 
     if (sigTime <= GetAdjustedTime() - 60 * 60) {
-        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
+        LogPrintf("CMasternodePing::CheckAndUpdate - Signature rejected, too far into the past %s - %d %d \n", vin.ToString(), sigTime, GetAdjustedTime());
         nDos = 1;
         return false;
     }
 
-    if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - New Ping - %s - %s - %lli\n", GetHash().ToString(), blockHash.ToString(), sigTime);
+    LogPrint("masnernode", "CMasternodePing::CheckAndUpdate - New Ping - %s - %s - %lli\n", GetHash().ToString(), blockHash.ToString(), sigTime);
 
     // see if we have this Masternode
     CMasternode* pmn = mnodeman.Find(vin);
@@ -562,7 +562,7 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
     {
         if (fRequireEnabled && !pmn->IsEnabled()) return false;
 
-        // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
+        // LogPrintf("mnping - Found corresponding mn for vin: %s\n", vin.ToString());
         // update only if there is no known ping for this masternode or
         // last ping was more then MASTERNODE_MIN_MNP_SECONDS-60 ago comparing to this one
         if(!pmn->IsPingedWithin(MASTERNODE_MIN_MNP_SECONDS - 60, sigTime))
@@ -608,16 +608,16 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
             pmn->Check();
             if(!pmn->IsEnabled()) return false;
 
-            if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode ping accepted, vin: %s\n", vin.ToString());
+            LogPrint("masnernode", "CMasternodePing::CheckAndUpdate - Masternode ping accepted, vin: %s\n", vin.ToString());
 
             Relay();
             return true;
         }
-        if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Masternode ping arrived too early, vin: %s\n", vin.ToString());
+        LogPrint("masnernode", "CMasternodePing::CheckAndUpdate - Masternode ping arrived too early, vin: %s\n", vin.ToString());
         //nDos = 1; //disable, this is happening frequently and causing banned peers
         return false;
     }
-    if(fDebug) LogPrintf("CMasternodePing::CheckAndUpdate - Couldn't find compatible Masternode entry, vin: %s\n", vin.ToString());
+    LogPrint("masnernode", "CMasternodePing::CheckAndUpdate - Couldn't find compatible Masternode entry, vin: %s\n", vin.ToString());
 
     return false;
 }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index ff73aea86f1d..98755cbf763c 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -216,7 +216,7 @@ bool CMasternodeMan::Add(CMasternode &mn)
     CMasternode *pmn = Find(mn.vin);
     if (pmn == NULL)
     {
-        if(fDebug) LogPrintf("CMasternodeMan: Adding new Masternode %s - %i now\n", mn.addr.ToString().c_str(), size() + 1);
+        LogPrint("masnernode", "CMasternodeMan: Adding new Masternode %s - %i now\n", mn.addr.ToString(), size() + 1);
         vMasternodes.push_back(mn);
         return true;
     }
@@ -246,7 +246,7 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
                 (*it).activeState == CMasternode::MASTERNODE_VIN_SPENT ||
                 (forceExpiredRemoval && (*it).activeState == CMasternode::MASTERNODE_EXPIRED) ||
                 (*it).protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
-            if(fDebug) LogPrintf("CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
+            LogPrint("masnernode", "CMasternodeMan: Removing inactive Masternode %s - %i now\n", (*it).addr.ToString(), size() - 1);
 
             //erase all of the broadcasts we've seen from this vin
             // -- if we missed a few pings and the node was removed, this will allow is to get it back without them 
@@ -625,7 +625,7 @@ void CMasternodeMan::ProcessMasternodeConnections()
         if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue;
 
         if(pnode->fDarkSendMaster){
-            LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString().c_str());
+            LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString());
             pnode->fDisconnect = true;
         }
     }
@@ -685,7 +685,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternodePing mnp;
         vRecv >> mnp;
 
-        if(fDebug) LogPrintf("mnp - Masternode ping, vin: %s\n", mnp.vin.ToString());
+        LogPrint("masnernode", "mnp - Masternode ping, vin: %s\n", mnp.vin.ToString());
 
         if(mnodeman.mapSeenMasternodePing.count(mnp.GetHash())) return; //seen
         mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
@@ -750,13 +750,13 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             if(mn.addr.IsRFC1918()) continue; //local network
 
             if(mn.IsEnabled()) {
-                if(fDebug) LogPrintf("dseg - Sending Masternode entry - %s \n", mn.addr.ToString().c_str());
+                LogPrint("masnernode", "dseg - Sending Masternode entry - %s \n", mn.addr.ToString());
                 if(vin == CTxIn() || vin == mn.vin){
                     CInv inv(MSG_MASTERNODE_ANNOUNCE, CMasternodeBroadcast(mn).GetHash());
                     vInv.push_back(inv);
 
                     if(vin == mn.vin) {
-                        LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString().c_str());
+                        LogPrintf("dseg - Sent 1 Masternode entries to %s\n", pfrom->addr.ToString());
                         break;
                     }
                 }
@@ -767,7 +767,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(vin == CTxIn()) pfrom->PushMessage("ssc", MASTERNODE_SYNC_LIST, (int)vInv.size());
         if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 
-        LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString().c_str());
+        LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString());
     }
 
 }
@@ -779,7 +779,7 @@ void CMasternodeMan::Remove(CTxIn vin)
     vector<CMasternode>::iterator it = vMasternodes.begin();
     while(it != vMasternodes.end()){
         if((*it).vin == vin){
-            if(fDebug) LogPrintf("CMasternodeMan: Removing Masternode %s - %i now\n", (*it).addr.ToString().c_str(), size() - 1);
+            LogPrint("masnernode", "CMasternodeMan: Removing Masternode %s - %i now\n", (*it).addr.ToString(), size() - 1);
             vMasternodes.erase(it);
             break;
         }
diff --git a/src/spork.cpp b/src/spork.cpp
index c919465bb945..eab46ea70614 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -40,14 +40,14 @@ void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
         uint256 hash = spork.GetHash();
         if(mapSporksActive.count(spork.nSporkID)) {
             if(mapSporksActive[spork.nSporkID].nTimeSigned >= spork.nTimeSigned){
-                if(fDebug) LogPrintf("spork - seen %s block %d \n", hash.ToString().c_str(), chainActive.Tip()->nHeight);
+                if(fDebug) LogPrintf("spork - seen %s block %d \n", hash.ToString(), chainActive.Tip()->nHeight);
                 return;
             } else {
-                if(fDebug) LogPrintf("spork - got updated spork %s block %d \n", hash.ToString().c_str(), chainActive.Tip()->nHeight);
+                if(fDebug) LogPrintf("spork - got updated spork %s block %d \n", hash.ToString(), chainActive.Tip()->nHeight);
             }
         }
 
-        LogPrintf("spork - new %s ID %d Time %d bestHeight %d\n", hash.ToString().c_str(), spork.nSporkID, spork.nValue, chainActive.Tip()->nHeight);
+        LogPrintf("spork - new %s ID %d Time %d bestHeight %d\n", hash.ToString(), spork.nSporkID, spork.nValue, chainActive.Tip()->nHeight);
 
         if(!sporkManager.CheckSignature(spork)){
             LogPrintf("spork - invalid signature\n");
@@ -184,7 +184,7 @@ bool CSporkManager::Sign(CSporkMessage& spork)
 
     if(!darkSendSigner.SetKey(strMasterPrivKey, errorMessage, key2, pubkey2))
     {
-        LogPrintf("CMasternodePayments::Sign - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage.c_str());
+        LogPrintf("CMasternodePayments::Sign - ERROR: Invalid masternodeprivkey: '%s'\n", errorMessage);
         return false;
     }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 88d5562d8743..78e9af3ba790 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -845,7 +845,7 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
         // not known yet, let's add it
         if(mdwi == mDenomWtxes.end())
         {
-            if(fDebug) LogPrintf("GetInputDarksendRounds INSERTING %s\n", hash.ToString());
+            LogPrint("darksend", "GetInputDarksendRounds INSERTING %s\n", hash.ToString());
             mDenomWtxes[hash] = CMutableTransaction(*wtx);
         }
         // found and it's not an initial value, just return it
@@ -859,14 +859,14 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
         if(nout >= wtx->vout.size())
         {
             // should never actually hit this
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, -4);
+            LogPrint("darksend", "GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, -4);
             return -4;
         }
 
         if(pwalletMain->IsCollateralAmount(wtx->vout[nout].nValue))
         {
             mDenomWtxes[hash].vout[nout].nRounds = -3;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            LogPrint("darksend", "GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -874,7 +874,7 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
         if(/*rounds == 0 && */!IsDenominatedAmount(wtx->vout[nout].nValue)) //NOT DENOM
         {
             mDenomWtxes[hash].vout[nout].nRounds = -2;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            LogPrint("darksend", "GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -887,7 +887,7 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
         if(!fAllDenoms)
         {
             mDenomWtxes[hash].vout[nout].nRounds = 0;
-            if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+            LogPrint("darksend", "GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
             return mDenomWtxes[hash].vout[nout].nRounds;
         }
 
@@ -910,7 +910,7 @@ int CWallet::GetRealInputDarksendRounds(CTxIn in, int rounds) const
         mDenomWtxes[hash].vout[nout].nRounds = fDenomFound
                 ? (nShortest >= 15 ? 16 : nShortest + 1) // good, we a +1 to the shortest one but only 16 rounds max allowed
                 : 0;            // too bad, we are the fist one in that chain
-        if(fDebug) LogPrintf("GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
+        LogPrint("darksend", "GetInputDarksendRounds UPDATED   %s %3d %3d\n", hash.ToString(), nout, mDenomWtxes[hash].vout[nout].nRounds);
         return mDenomWtxes[hash].vout[nout].nRounds;
     }
 
@@ -2073,7 +2073,7 @@ bool CWallet::GetBudgetSystemCollateralTX(CWalletTx& tx, uint256 hash, bool useI
     CCoinControl *coinControl=NULL;
     bool success = CreateTransaction(vecSend, tx, reservekey, nFeeRet, strFail, coinControl, ALL_COINS, useIX, (CAmount)0);
     if(!success){
-        LogPrintf("GetBudgetSystemCollateralTX: Error - %s\n", strFail.c_str());
+        LogPrintf("GetBudgetSystemCollateralTX: Error - %s\n", strFail);
         return false;
     }
 

From fa9a0ec03796ab65615334b04a3339e15bffe350 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 31 Jul 2015 11:53:40 -0700
Subject: [PATCH 1735/1819] Use reconsider blocks for IX instead of disconnect

---
 src/instantx.cpp | 8 ++++----
 src/instantx.h   | 1 +
 src/main.h       | 3 ---
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index 588a3914686a..d0ac72840cbe 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -114,8 +114,8 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
                     if(!CheckForConflictingLocks(tx)){
                         LogPrintf("ProcessMessageInstantX::ix - Found Existing Complete IX Lock\n");
 
-                        CValidationState state;
-                        DisconnectBlockAndInputs(state, tx);
+                        //reprocess the last 15 blocks
+                        ExecuteSpork(SPORK_12_RECONSIDER_BLOCKS, 15);
                         mapTxLockReq.insert(make_pair(tx.GetHash(), tx));
                     }
                 }
@@ -385,8 +385,8 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
 
                 //if this tx lock was rejected, we need to remove the conflicting blocks
                 if(mapTxLockReqRejected.count((*i).second.txHash)){
-                    CValidationState state;
-                    DisconnectBlockAndInputs(state, mapTxLockReqRejected[(*i).second.txHash]);
+                    //reprocess the last 15 blocks
+                    ExecuteSpork(SPORK_12_RECONSIDER_BLOCKS, 15);
                 }
             }
         }
diff --git a/src/instantx.h b/src/instantx.h
index 0490e025232b..ceb5fc6ce337 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -11,6 +11,7 @@
 #include "util.h"
 #include "base58.h"
 #include "main.h"
+#include "spork.h"
 
 /*
     At 15 signatures, 1/2 of the masternode network can be owned by
diff --git a/src/main.h b/src/main.h
index 02cceca162f2..9b45efe6e872 100644
--- a/src/main.h
+++ b/src/main.h
@@ -399,9 +399,6 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
  *  of problems. Note that in any case, coins may be modified. */
 bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex, CCoinsViewCache& coins, bool* pfClean = NULL);
 
-/** Find a conflicting transcation in a block and disconnect all up to that point **/
-bool DisconnectBlockAndInputs(CValidationState &state, CTransaction txLock);
-
 /** Reprocess a number of blocks to try and get on the correct chain again **/
 bool DisconnectBlocksAndReprocess(int blocks);
 

From 8b62e590dff1edd35349fabc7ce7044d9ee13fdb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 31 Jul 2015 15:37:38 -0700
Subject: [PATCH 1736/1819] version bump / proto bump / try mining lock

---
 configure.ac        |  2 +-
 src/clientversion.h |  2 +-
 src/instantx.h      |  2 +-
 src/miner.cpp       | 10 +++++++++-
 src/version.h       | 10 +++++-----
 5 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index ffe0eb913315..0e7a3121e759 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 33)
+define(_CLIENT_VERSION_BUILD, 34)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 7b3b66037f67..85330ef3a274 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 33
+#define CLIENT_VERSION_BUILD 34
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true
diff --git a/src/instantx.h b/src/instantx.h
index ceb5fc6ce337..01df0bb25561 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -32,7 +32,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70099;
+static const int MIN_INSTANTX_PROTO_VERSION = 70100;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/miner.cpp b/src/miner.cpp
index 19b59ac4bd0c..a29ac40335c0 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -129,7 +129,15 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     CAmount nFees = 0;
 
     {
-        LOCK2(cs_main, mempool.cs);
+        TRY_LOCK(cs_main, fLockMain);
+        if (!fLockMain) {   
+            LogPrintf("CreateNewBlock : ERROR - failed to lock cs_main - disabled mining\n");
+        }
+        TRY_LOCK(mempool.cs, fLockMempool);
+        if (!fLockMempool) {   
+            LogPrintf("CreateNewBlock : ERROR - failed to lock mempool.cs - disabled mining\n");
+        }
+
         CBlockIndex* pindexPrev = chainActive.Tip();
         const int nHeight = pindexPrev->nHeight + 1;
         CCoinsViewCache view(pcoinsTip);
diff --git a/src/version.h b/src/version.h
index a75c54fcd1ba..a9992a5aa83a 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70099;
+static const int PROTOCOL_VERSION = 70100;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70099;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70100;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70099;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70100;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70099;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70100;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70099;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70100;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 44c99417d2583bf97a094f98e4e25e7c1c62e675 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 1 Aug 2015 01:51:30 -0700
Subject: [PATCH 1737/1819] disable block cache / fix reprocess

---
 src/main.cpp  | 20 +++++++++++---------
 src/main.h    |  2 ++
 src/spork.cpp | 25 +++++++------------------
 3 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 6ff69803bd24..a9bd1ca713d9 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3106,15 +3106,17 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
     uint256 hash = block.GetHash();
     BlockMap::iterator miSelf = mapBlockIndex.find(hash);
     CBlockIndex *pindex = NULL;
-    if (miSelf != mapBlockIndex.end()) {
-        // Block header is already known.
-        pindex = miSelf->second;
-        if (ppindex)
-            *ppindex = pindex;
-        if (pindex->nStatus & BLOCK_FAILED_MASK)
-            return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
-        return true;
-    }
+
+    // TODO : ENABLE BLOCK CACHE IN SPECIFIC CASES
+    // if (miSelf != mapBlockIndex.end()) {
+    //     // Block header is already known.
+    //     pindex = miSelf->second;
+    //     if (ppindex)
+    //         *ppindex = pindex;
+    //     if (pindex->nStatus & BLOCK_FAILED_MASK)
+    //         return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
+    //     return true;
+    // }
 
     if (!CheckBlockHeader(block, state))
         return false;
diff --git a/src/main.h b/src/main.h
index 9b45efe6e872..a5101ab09cc2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -209,6 +209,8 @@ 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 DisconnectBlocksAndReprocess(int blocks);
+
 // ***TODO***
 double ConvertBitsToDouble(unsigned int nBits);
 int64_t GetMasternodePayment(int nHeight, int64_t blockValue);
diff --git a/src/spork.cpp b/src/spork.cpp
index c919465bb945..fcc239a82d9e 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -134,27 +134,16 @@ void ExecuteSpork(int nSporkID, int nValue)
     //correct fork via spork technology
     if(nSporkID == SPORK_12_RECONSIDER_BLOCKS && nValue > 0) {
         LogPrintf("Spork::ExecuteSpork -- Reconcider Last %d Blocks\n", nValue);
-        CBlockIndex* pindexPrev = chainActive.Tip();
-        int count = 0;
 
-        for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-            count++;
-            if(count >= nValue) return;
+        CValidationState state;
+        {
+            LOCK(cs_main);
 
-            CValidationState state;
-            {
-                LOCK(cs_main);
-
-                LogPrintf("Spork::ExecuteSpork -- Reconcider %s\n", pindexPrev->phashBlock->ToString());
-                ReconsiderBlock(state, pindexPrev);
-            }
-
-            if (state.IsValid()) {
-                ActivateBestChain(state);
-            }
+            DisconnectBlocksAndReprocess(nValue);
+        }
 
-            if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
-            pindexPrev = pindexPrev->pprev;
+        if (state.IsValid()) {
+            ActivateBestChain(state);
         }
     }
 }

From 171c0b145a5a5644f2b955b3196c1a66093801f5 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 1 Aug 2015 01:58:18 -0700
Subject: [PATCH 1738/1819] TRY_LOCK for blocks

---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index a9bd1ca713d9..bd626f319c52 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4881,6 +4881,9 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
     {
+        TRY_LOCK(cs_main, lockMainBlock);
+        if(!lockMainBlock) return;
+
         CBlock block;
         vRecv >> block;
 
@@ -4896,7 +4899,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
                                state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash);
             if (nDoS > 0) {
-                LOCK(cs_main);
                 Misbehaving(pfrom->GetId(), nDoS);
             }
         }

From 64aad03485844b2c79c177911daa0a428da11c92 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 1 Aug 2015 02:03:15 -0700
Subject: [PATCH 1739/1819] draft

---
 src/main.cpp    | 9 ++++++---
 src/rpcmisc.cpp | 1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index bd626f319c52..d40ef1d8bb26 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4881,12 +4881,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
     else if (strCommand == "block" && !fImporting && !fReindex) // Ignore blocks received while importing
     {
-        TRY_LOCK(cs_main, lockMainBlock);
-        if(!lockMainBlock) return;
-
         CBlock block;
         vRecv >> block;
 
+        TRY_LOCK(cs_main, lockMainBlock);
+        if(!lockMainBlock) {
+            LogPrintf("block -- failed to lock cs_main - %s\n", block.GetHash().ToString());
+            return false;
+        }
+
         CInv inv(MSG_BLOCK, block.GetHash());
         LogPrint("net", "received block %s peer=%d\n", inv.hash.ToString(), pfrom->id);
 
diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index de75ca2e9fbe..d7b4427460aa 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -185,6 +185,7 @@ Value spork(const Array& params, bool fHelp)
 
         //broadcast new spork
         if(sporkManager.UpdateSpork(nSporkID, nValue)){
+            ExecuteSpork(nSporkID, nValue);
             return "success";
         } else {
             return "failure";

From efc74b22537ba328ec44059269f32bcad5e3537c Mon Sep 17 00:00:00 2001
From: crowning- <crowning-@users.noreply.github.com>
Date: Sat, 1 Aug 2015 21:55:46 +0200
Subject: [PATCH 1740/1819] UI: "Confirm send coins" popup beautified

---
 src/qt/sendcoinsdialog.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index f85a7197733f..042c62034f6b 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -376,9 +376,11 @@ void SendCoinsDialog::send(QList<SendCoinsRecipient> recipients, QString strFee,
         if(u != model->getOptionsModel()->getDisplayUnit())
             alternativeUnits.append(BitcoinUnits::formatHtmlWithUnit(u, totalAmount));
     }
-    questionString.append(tr("Total Amount %1 (= %2)")
+
+    // Show total amount + all alternative units
+    questionString.append(tr("Total Amount = <b>%1</b><br />= %2")
         .arg(BitcoinUnits::formatHtmlWithUnit(model->getOptionsModel()->getDisplayUnit(), totalAmount))
-        .arg("<br />" + alternativeUnits.join(" " + tr("or") + "<br />")));
+        .arg(alternativeUnits.join("<br />= ")));
 
     // Limit number of displayed entries
     int messageEntries = formatted.size();

From 091867525cc2c4e25ecb18f05f7175d93bdf1a7b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 2 Aug 2015 05:05:49 +0300
Subject: [PATCH 1741/1819] more info on ds progress / update tr strings /
 prepare dash_en.ts for translations

---
 src/init.cpp                  |   2 +-
 src/masternodeconfig.cpp      |   2 +-
 src/qt/dashstrings.cpp        |  22 +-
 src/qt/forms/optionsdialog.ui |   4 +-
 src/qt/locale/dash_en.ts      | 416 ++++++++++++++++++++--------------
 src/qt/overviewpage.cpp       |  17 +-
 src/wallet.cpp                |   6 +-
 7 files changed, 280 insertions(+), 189 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index 72a2023b500c..04de0bd20998 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -396,7 +396,7 @@ std::string HelpMessage(HelpMessageMode mode)
         strUsage += "  -maxsigcachesize=<n>   " + strprintf(_("Limit size of signature cache to <n> entries (default: %u)"), 50000) + "\n";
     }
     strUsage += "  -minrelaytxfee=<amt>   " + strprintf(_("Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)"), FormatMoney(::minRelayTxFee.GetFeePerK())) + "\n";
-    strUsage += "  -printtoconsole        " + _("Send trace/debug info to console instead of debug.log file") + "\n";
+    strUsage += "  -printtoconsole        " + strprintf(_("Send trace/debug info to console instead of debug.log file (default: %u)"), 0) + "\n";
     if (GetBoolArg("-help-debug", false))
     {
         strUsage += "  -printpriority         " + strprintf(_("Log transaction priority and fee per kB when mining blocks (default: %u)"), 0) + "\n";
diff --git a/src/masternodeconfig.cpp b/src/masternodeconfig.cpp
index eb955d1a47ff..9f7fd20808ff 100644
--- a/src/masternodeconfig.cpp
+++ b/src/masternodeconfig.cpp
@@ -49,7 +49,7 @@ bool CMasternodeConfig::read(std::string& strErr) {
         } else if(CService(ip).GetPort() == 9999) {
             strErr = _("Invalid port detected in masternode.conf") + "\n" +
                     strprintf(_("Line: %d"), linenumber) + "\n\"" + line + "\"" + "\n" +
-                    _(" (9999 could be used only on mainnet)");
+                    _("(9999 could be used only on mainnet)");
             streamConfig.close();
             return false;
         }
diff --git a/src/qt/dashstrings.cpp b/src/qt/dashstrings.cpp
index 559df6e58782..72794e44b8bd 100644
--- a/src/qt/dashstrings.cpp
+++ b/src/qt/dashstrings.cpp
@@ -128,6 +128,8 @@ QT_TRANSLATE_NOOP("dash-core", ""
 QT_TRANSLATE_NOOP("dash-core", ""
 "Require high priority for relaying free or low-fee transactions (default:%u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
+"Send trace/debug info to console instead of debug.log file (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", ""
 "Set external address:port to get to this masternode (example: address:port)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
@@ -203,8 +205,10 @@ QT_TRANSLATE_NOOP("dash-core", ""
 QT_TRANSLATE_NOOP("dash-core", ""
 "You must specify a masternodeprivkey in the configuration. Please see "
 "documentation for help."),
+QT_TRANSLATE_NOOP("dash-core", "(9999 could be used only on mainnet)"),
 QT_TRANSLATE_NOOP("dash-core", "(default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "(default: 1)"),
+QT_TRANSLATE_NOOP("dash-core", "(must be 9999 for mainnet)"),
 QT_TRANSLATE_NOOP("dash-core", "<category> can be:\n"),
 QT_TRANSLATE_NOOP("dash-core", "Accept command line and JSON-RPC commands"),
 QT_TRANSLATE_NOOP("dash-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
@@ -217,6 +221,8 @@ QT_TRANSLATE_NOOP("dash-core", "Always query for peer addresses via DNS lookup (
 QT_TRANSLATE_NOOP("dash-core", "Attempt to recover private keys from a corrupt wallet.dat"),
 QT_TRANSLATE_NOOP("dash-core", "Block creation options:"),
 QT_TRANSLATE_NOOP("dash-core", "Can't denominate: no compatible inputs left."),
+QT_TRANSLATE_NOOP("dash-core", "Can't find random Masternode."),
+QT_TRANSLATE_NOOP("dash-core", "Can't mix while sync in progress."),
 QT_TRANSLATE_NOOP("dash-core", "Cannot downgrade wallet"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -bind address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Cannot resolve -externalip address: '%s'"),
@@ -232,7 +238,7 @@ QT_TRANSLATE_NOOP("dash-core", "Copyright (C) 2009-%i The Bitcoin Core Developer
 QT_TRANSLATE_NOOP("dash-core", "Copyright (C) 2014-%i The Dash Core Developers"),
 QT_TRANSLATE_NOOP("dash-core", "Corrupted block database detected"),
 QT_TRANSLATE_NOOP("dash-core", "Could not parse -rpcbind value %s as network address"),
-QT_TRANSLATE_NOOP("dash-core", "Darksend is disabled."),
+QT_TRANSLATE_NOOP("dash-core", "Could not parse masternode.conf"),
 QT_TRANSLATE_NOOP("dash-core", "Darksend is idle."),
 QT_TRANSLATE_NOOP("dash-core", "Darksend options:"),
 QT_TRANSLATE_NOOP("dash-core", "Darksend request complete:"),
@@ -257,6 +263,7 @@ QT_TRANSLATE_NOOP("dash-core", "Error reading from database, shutting down."),
 QT_TRANSLATE_NOOP("dash-core", "Error recovering public key."),
 QT_TRANSLATE_NOOP("dash-core", "Error"),
 QT_TRANSLATE_NOOP("dash-core", "Error: A fatal internal error occured, see debug.log for details"),
+QT_TRANSLATE_NOOP("dash-core", "Error: Can't select current denominated inputs"),
 QT_TRANSLATE_NOOP("dash-core", "Error: Disk space is low!"),
 QT_TRANSLATE_NOOP("dash-core", "Error: Unsupported argument -tor found, use -onion."),
 QT_TRANSLATE_NOOP("dash-core", "Error: Wallet locked, unable to create transaction!"),
@@ -271,7 +278,6 @@ QT_TRANSLATE_NOOP("dash-core", "Found enough users, signing ..."),
 QT_TRANSLATE_NOOP("dash-core", "Generate coins (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "How many blocks to check at startup (default: %u, 0 = all)"),
 QT_TRANSLATE_NOOP("dash-core", "If <category> is not supplied, output all debugging information."),
-QT_TRANSLATE_NOOP("dash-core", "Ignore masternodes less than version (example: 70050; default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Importing..."),
 QT_TRANSLATE_NOOP("dash-core", "Imports blocks from external blk000??.dat file"),
 QT_TRANSLATE_NOOP("dash-core", "Include IP addresses in debug output (default: %u)"),
@@ -282,7 +288,6 @@ QT_TRANSLATE_NOOP("dash-core", "Information"),
 QT_TRANSLATE_NOOP("dash-core", "Initialization sanity check failed. Dash Core is shutting down."),
 QT_TRANSLATE_NOOP("dash-core", "Input is not valid."),
 QT_TRANSLATE_NOOP("dash-core", "InstantX options:"),
-QT_TRANSLATE_NOOP("dash-core", "Insufficient funds"),
 QT_TRANSLATE_NOOP("dash-core", "Insufficient funds."),
 QT_TRANSLATE_NOOP("dash-core", "Invalid -onion address: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid -proxy address: '%s'"),
@@ -293,6 +298,7 @@ QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -paytxfee=<amount>: '%s' (mus
 QT_TRANSLATE_NOOP("dash-core", "Invalid amount for -paytxfee=<amount>: '%s'"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid masternodeprivkey. Please see documenation."),
 QT_TRANSLATE_NOOP("dash-core", "Invalid netmask specified in -whitelist: '%s'"),
+QT_TRANSLATE_NOOP("dash-core", "Invalid port detected in masternode.conf"),
 QT_TRANSLATE_NOOP("dash-core", "Invalid private key."),
 QT_TRANSLATE_NOOP("dash-core", "Invalid script detected."),
 QT_TRANSLATE_NOOP("dash-core", "KeePassHttp id for the established association"),
@@ -302,12 +308,14 @@ QT_TRANSLATE_NOOP("dash-core", "Keep at most <n> unconnectable transactions in m
 QT_TRANSLATE_NOOP("dash-core", "Last Darksend was too recent."),
 QT_TRANSLATE_NOOP("dash-core", "Last successful Darksend action was too recent."),
 QT_TRANSLATE_NOOP("dash-core", "Limit size of signature cache to <n> entries (default: %u)"),
+QT_TRANSLATE_NOOP("dash-core", "Line: %d"),
 QT_TRANSLATE_NOOP("dash-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Loading addresses..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading block index..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading budget cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading masternode cache..."),
+QT_TRANSLATE_NOOP("dash-core", "Loading masternode payment cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet... (%3.2f %%)"),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet..."),
 QT_TRANSLATE_NOOP("dash-core", "Lock masternodes from masternode configuration file (default: %u)"),
@@ -341,18 +349,19 @@ QT_TRANSLATE_NOOP("dash-core", "RPC support for HTTP persistent connections (def
 QT_TRANSLATE_NOOP("dash-core", "Randomly drop 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("dash-core", "Randomly fuzz 1 of every <n> network messages"),
 QT_TRANSLATE_NOOP("dash-core", "Rebuild block chain index from current blk000??.dat files"),
+QT_TRANSLATE_NOOP("dash-core", "Receive and display P2P network alerts (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Relay and mine data carrier transactions (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Relay non-P2SH multisig (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Rescan the block chain for missing wallet transactions"),
 QT_TRANSLATE_NOOP("dash-core", "Rescanning..."),
 QT_TRANSLATE_NOOP("dash-core", "Run a thread to flush wallet periodically (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Run in the background as a daemon and accept commands"),
-QT_TRANSLATE_NOOP("dash-core", "Send trace/debug info to console instead of debug.log file"),
+QT_TRANSLATE_NOOP("dash-core", "Send trace/debug info to debug.log file (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Send transactions as zero-fee transactions if possible (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Server certificate file (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Server private key (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Session not complete!"),
-QT_TRANSLATE_NOOP("dash-core", "Session timed out, please resubmit."),
+QT_TRANSLATE_NOOP("dash-core", "Session timed out."),
 QT_TRANSLATE_NOOP("dash-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Set maximum block size in bytes (default: %d)"),
@@ -363,7 +372,7 @@ QT_TRANSLATE_NOOP("dash-core", "Sets the DB_PRIVATE flag in the wallet db enviro
 QT_TRANSLATE_NOOP("dash-core", "Show all debugging options (usage: --help -help-debug)"),
 QT_TRANSLATE_NOOP("dash-core", "Shrink debug.log file on client startup (default: 1 when no -debug)"),
 QT_TRANSLATE_NOOP("dash-core", "Signing failed."),
-QT_TRANSLATE_NOOP("dash-core", "Signing timed out, please resubmit."),
+QT_TRANSLATE_NOOP("dash-core", "Signing timed out."),
 QT_TRANSLATE_NOOP("dash-core", "Signing transaction failed"),
 QT_TRANSLATE_NOOP("dash-core", "Specify configuration file (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Specify connection timeout in milliseconds (minimum: 1, default: %d)"),
@@ -409,6 +418,7 @@ QT_TRANSLATE_NOOP("dash-core", "Wallet %s resides outside data directory %s"),
 QT_TRANSLATE_NOOP("dash-core", "Wallet is locked."),
 QT_TRANSLATE_NOOP("dash-core", "Wallet needed to be rewritten: restart Dash Core to complete"),
 QT_TRANSLATE_NOOP("dash-core", "Wallet options:"),
+QT_TRANSLATE_NOOP("dash-core", "Wallet window title"),
 QT_TRANSLATE_NOOP("dash-core", "Warning"),
 QT_TRANSLATE_NOOP("dash-core", "Warning: This version is obsolete, upgrade required!"),
 QT_TRANSLATE_NOOP("dash-core", "Warning: Unsupported argument -benchmark ignored, use -debug=bench."),
diff --git a/src/qt/forms/optionsdialog.ui b/src/qt/forms/optionsdialog.ui
index fd01157628d8..07525ce5a8b5 100644
--- a/src/qt/forms/optionsdialog.ui
+++ b/src/qt/forms/optionsdialog.ui
@@ -135,7 +135,7 @@
          <item>
           <widget class="QLabel" name="label">
            <property name="toolTip">
-            <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+            <string>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</string>
            </property>
            <property name="text">
             <string>Darksend rounds to use</string>
@@ -225,7 +225,7 @@
           <item>
            <widget class="QCheckBox" name="spendZeroConfChange">
             <property name="toolTip">
-             <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;If you disable the spending of unconfirmed change, the change from a transaction&lt;/p&gt;&lt;p&gt;cannot be used until that transaction has at least one confirmation.&lt;/p&gt;&lt;p&gt;This also affects how your balance is computed.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+             <string>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</string>
             </property>
             <property name="text">
              <string>&amp;Spend unconfirmed change</string>
diff --git a/src/qt/locale/dash_en.ts b/src/qt/locale/dash_en.ts
index a3dd90b3d22b..91900a175505 100644
--- a/src/qt/locale/dash_en.ts
+++ b/src/qt/locale/dash_en.ts
@@ -297,12 +297,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
@@ -312,7 +312,7 @@
         <translation>Node</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Overview</translation>
     </message>
@@ -763,7 +763,7 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -852,8 +852,8 @@ Address: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Darksend Rounds</translation>
+        <source>DS Rounds</source>
+        <translation>DS Rounds</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -972,13 +972,13 @@ Address: %4
         <translation>Can vary +/- %1 duff(s) per input.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>medium</translation>
     </message>
@@ -1450,12 +1450,7 @@ Address: %4
         <translation>(0 = auto, &lt;0 = leave that many cores free)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Darksend rounds to use</translation>
     </message>
@@ -1475,7 +1470,12 @@ Address: %4
         <translation>W&amp;allet</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Accept connections from outside</translation>
     </message>
@@ -1500,7 +1500,12 @@ Address: %4
         <translation>Expert</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Whether to show coin control features or not.</translation>
     </message>
@@ -1510,12 +1515,7 @@ Address: %4
         <translation>Enable coin &amp;control features</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>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.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Spend unconfirmed change</translation>
     </message>
@@ -1618,6 +1618,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Decimal digits</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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>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 |.</translation>
@@ -1653,7 +1658,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Cancel</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>default</translation>
     </message>
@@ -1663,7 +1668,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>none</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Confirm options reset</translation>
     </message>
@@ -1784,12 +1789,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Status:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Enabled/Disabled</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Completion:</translation>
     </message>
@@ -1799,12 +1804,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend Balance:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Amount and Rounds:</translation>
     </message>
@@ -1824,9 +1824,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>n/a</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1842,12 +1843,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Start/Stop Mixing</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Last Message)</translation>
     </message>
@@ -1872,42 +1873,43 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Reset</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>out of sync</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Disabled</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Start Darksend Mixing</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Stop Darksend Mixing</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>No inputs detected</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation>
             <numerusform>%n Round</numerusform>
@@ -1915,30 +1917,45 @@ https://www.transifex.com/projects/p/dash/</translation>
         </translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Overall progress</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Denominated</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Anonymized</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
         <translation>
-            <numerusform>Progress: %1% (inputs have an average of %2 of %n round)</numerusform>
-            <numerusform>Progress: %1% (inputs have an average of %2 of %n rounds)</numerusform>
+            <numerusform>Denominated inputs have %5 of %n rounds on average</numerusform>
+            <numerusform></numerusform>
         </translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Found enough compatible inputs to anonymize %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Mixed</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Enabled</translation>
     </message>
@@ -1960,7 +1977,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend was successfully reset.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend requires at least %1 to use.</translation>
     </message>
@@ -2113,7 +2135,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Amount</translation>
     </message>
@@ -2123,7 +2145,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Enter a Dash address (e.g. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 d</translation>
     </message>
@@ -2204,12 +2226,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Masternode Count</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>General</translation>
     </message>
@@ -2317,7 +2334,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Number of Masternodes</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
@@ -2585,8 +2607,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2595,12 +2617,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Message:</translation>
     </message>
@@ -2611,7 +2632,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>An optional label to associate with the new receiving address.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</translation>
     </message>
@@ -2797,7 +2823,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
@@ -2904,32 +2930,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>per kilobyte</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>total at least</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>total at least</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(read the tooltip)</translation>
     </message>
@@ -2944,7 +2970,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Custom:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(Smart fee not initialized yet. This usually takes a few blocks...)</translation>
     </message>
@@ -3019,7 +3045,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Balance:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Copy quantity</translation>
     </message>
@@ -3106,21 +3132,16 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Total Amount %1 (= %2)</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>or</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Confirm send coins</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>A fee %1 times higher than %2 per kB is considered an insanely high fee.</translation>
     </message>
@@ -3138,7 +3159,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>The recipient address is not valid, please recheck.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>The amount to pay must be larger than 0.</translation>
     </message>
@@ -3960,7 +3986,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>All</translation>
@@ -3996,12 +4022,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Range...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Most Common</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Received with</translation>
     </message>
@@ -4051,7 +4077,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Other</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Enter address or label to search</translation>
     </message>
@@ -4091,7 +4117,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Show transaction details</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Export Transaction History</translation>
     </message>
@@ -4156,7 +4182,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>The transaction history was successfully saved to %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Range:</translation>
     </message>
@@ -4211,7 +4237,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Export the data in the current tab to a file</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Selected amount:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Backup Wallet</translation>
     </message>
@@ -4284,12 +4315,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Found unconfirmed denominated outputs, will wait till they confirm to continue.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In this mode -genproclimit controls how many blocks are generated immediately.</translation>
     </message>
@@ -4309,7 +4335,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Set external address:port to get to this masternode (example: address:port)</translation>
     </message>
@@ -4379,12 +4405,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(default: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accept command line and JSON-RPC commands</translation>
     </message>
@@ -4424,7 +4450,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Can&apos;t denominate: no compatible inputs left.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Cannot downgrade wallet</translation>
     </message>
@@ -4469,12 +4495,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Corrupted block database detected</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend is disabled.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Darksend options:</translation>
     </message>
@@ -4554,7 +4575,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Error</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Error: Disk space is low!</translation>
     </message>
@@ -4584,7 +4605,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>If &lt;category&gt; is not supplied, output all debugging information.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</translation>
     </message>
@@ -4669,7 +4690,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Found unconfirmed denominated outputs, will wait till they confirm to continue.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>How thorough the block verification of -checkblocks is (0-4, default: %u)</translation>
     </message>
@@ -4723,6 +4749,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Require high priority for relaying free or low-fee transactions (default:%u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Send trace/debug info to console instead of debug.log file (default: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4790,11 +4821,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 could be used only on mainnet)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(default: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; can be:
@@ -4816,7 +4852,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Always query for peer addresses via DNS lookup (default: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>Cannot resolve -whitebind address: &apos;%s&apos;</translation>
     </message>
@@ -4885,6 +4921,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Error: A fatal internal error occured, see debug.log for details</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Error: Can&apos;t select current denominated inputs</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4927,11 +4968,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Ignore masternodes less than version (example: 70050; default: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importing...</translation>
     </message>
@@ -4980,11 +5016,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>InstantX options:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Insufficient funds</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -5026,7 +5057,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Last successful Darksend action was too recent.</translation>
     </message>
@@ -5036,7 +5067,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Limit size of signature cache to &lt;n&gt; entries (default: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</translation>
     </message>
@@ -5046,7 +5077,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Lock masternodes from masternode configuration file (default: %u)</translation>
     </message>
@@ -5111,12 +5142,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Prepend debug output with timestamp (default: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Run a thread to flush wallet periodically (default: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Send trace/debug info to debug.log file (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Send transactions as zero-fee transactions if possible (default: %u)</translation>
     </message>
@@ -5131,12 +5167,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Server private key (default: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Session timed out, please resubmit.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Set key pool size to &lt;n&gt; (default: %u)</translation>
     </message>
@@ -5156,7 +5187,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Signing timed out.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Specify configuration file (default: %s)</translation>
     </message>
@@ -5231,7 +5267,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Wallet needed to be rewritten: restart Dash Core to complete</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</translation>
     </message>
@@ -5246,15 +5282,40 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Will retry...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Invalid masternodeprivkey. Please see documenation.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(must be 9999 for mainnet)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Can&apos;t find random Masternode.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Can&apos;t mix while sync in progress.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Could not parse masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation>Invalid netmask specified in -whitelist: &apos;%s&apos;</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Invalid port detected in masternode.conf</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5291,7 +5352,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Last Darksend was too recent.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Line: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Loading addresses...</translation>
     </message>
@@ -5310,6 +5376,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Loading masternode cache...</source>
         <translation>Loading masternode cache...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Loading masternode payment cache...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5410,6 +5481,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Rebuild block chain index from current blk000??.dat files</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Receive and display P2P network alerts (default: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5436,17 +5512,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Run in the background as a daemon and accept commands</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Send trace/debug info to console instead of debug.log file</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Session not complete!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Session timed out.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Set database cache size in megabytes (%d to %d, default: %d)</translation>
     </message>
@@ -5476,12 +5552,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Signing failed.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Signing timed out, please resubmit.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Signing transaction failed</translation>
     </message>
@@ -5630,6 +5701,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Wallet options:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Wallet window title</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 11da5599b9d0..e072705494da 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -382,16 +382,21 @@ void OverviewPage::updateDarksendProgress()
     anonFullPart = anonFullPart > 1 ? 1 : anonFullPart;
 
     // apply some weights to them (sum should be <=100) and calculate the whole progress
-    denomPart = ceilf((denomPart * 20) * 100) / 100;
-    anonNormPart = ceilf((anonNormPart * 50) * 100) / 100;
-    anonFullPart = ceilf((anonFullPart * 30) * 100) / 100;
-    float progress = denomPart + anonNormPart + anonFullPart;
+    float denomPartCalc = ceilf((denomPart * 20) * 100) / 100;
+    float anonNormPartCalc = ceilf((anonNormPart * 50) * 100) / 100;
+    float anonFullPartCalc = ceilf((anonFullPart * 30) * 100) / 100;
+    float progress = denomPartCalc + anonNormPartCalc + anonFullPartCalc;
     if(progress >= 100) progress = 100;
 
     ui->darksendProgress->setValue(progress);
 
-    QString strToolPip = tr("Progress: %1% (%2% + %3% + %4%; denominated inputs have %5 of %n rounds on average)", "", nDarksendRounds)
-            .arg(progress).arg(denomPart).arg(anonNormPart).arg(anonFullPart).arg(pwalletMain->GetAverageAnonymizedRounds());
+    QString strToolPip = ("<b>" + tr("Overall progress") + ": %1%</b><br/>" +
+                          tr("Denominated") + ": %2%<br/>" +
+                          tr("Mixed") + ": %3%<br/>" +
+                          tr("Anonymized") + ": %4%<br/>" +
+                          tr("Denominated inputs have %5 of %n rounds on average", "", nDarksendRounds))
+            .arg(progress).arg(denomPart * 100).arg(anonNormPart * 100).arg(anonFullPart * 100)
+            .arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
 }
 
diff --git a/src/wallet.cpp b/src/wallet.cpp
index 78e9af3ba790..8408c9cb7a4e 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2162,11 +2162,11 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
                         strFailReason = _("Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.");
                     } else {
                         strFailReason = _("Unable to locate enough Darksend denominated funds for this transaction.");
-                        strFailReason += _("Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.");
+                        strFailReason += " " + _("Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.");
                     }
 
                     if(useIX){
-                        strFailReason += _("InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.");
+                        strFailReason += " " + _("InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.");
                     }
 
                     return false;
@@ -2429,7 +2429,7 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
     */
     if(minRounds >= 0){
         if (!SelectCoinsByDenominations(darkSendPool.sessionDenom, 0.1*COIN, DARKSEND_POOL_MAX, vCoins, vCoins2, nValueIn, minRounds, maxRounds))
-            return _("Error: can't select current denominated inputs");
+            return _("Error: Can't select current denominated inputs");
     }
 
     LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Got: %d \n", nValueIn);

From ef1dc8434e0b95f4aa6567bfb2fe1974e2fe57b4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 07:28:38 -0700
Subject: [PATCH 1742/1819] Prepare testnet for upgrade

---
 src/chainparams.cpp | 4 +++-
 src/main.cpp        | 4 ++--
 src/spork.h         | 8 ++++----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index b4c022452ae1..169d9defaa60 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -53,6 +53,7 @@ static void convertSeed6(std::vector<CAddress> &vSeedsOut, const SeedSpec6 *data
  *    timestamp before)
  * + Contains no strange transactions
  */
+
 static Checkpoints::MapCheckpoints mapCheckpoints =
         boost::assign::map_list_of
         (  1500, uint256("0x000000aaf0300f59f49bc3e970bad15c11f961fe2347accffff19d96ec9778e3"))
@@ -71,7 +72,7 @@ static Checkpoints::MapCheckpoints mapCheckpoints =
         ( 137993, uint256("0x00000000000cf69ce152b1bffdeddc59188d7a80879210d6e5c9503011929c3c"))
         ( 167996, uint256("0x000000000009486020a80f7f2cc065342b0c2fb59af5e090cd813dba68ab0fed"))
         ( 207992, uint256("0x00000000000d85c22be098f74576ef00b7aa00c05777e966aff68a270f1e01a5"))
-        ( 217752, uint256("0x00000000000a7baeb2148272a7e14edf5af99a64af456c0afc23d15a0918b704"))
+        ( 312645, uint256("0x0000000000059dcb71ad35a9e40526c44e7aae6c99169a9e7017b7d84b1c2daf"))
         ;
 static const Checkpoints::CCheckpointData data = {
         &mapCheckpoints,
@@ -85,6 +86,7 @@ static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
         boost::assign::map_list_of
         ( 261, uint256("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))
         ( 77100, uint256("00000133e07bae4d3553fd8d86cb5a961d638cae72d179ede8ca436c60a2c3c0"))
+        ( 77900, uint256("00000007e5ec67e2a626c07b7d66673c3dd8df0aed5018ca984b99fba2b71024"))
         ;
 static const Checkpoints::CCheckpointData dataTestnet = {
         &mapCheckpointsTestnet,
diff --git a/src/main.cpp b/src/main.cpp
index 8719c0c4d9ed..10b7b8a7896a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1564,9 +1564,9 @@ int64_t GetBlockValue(int nBits, int nHeight, const CAmount& nFees)
     */
 
     if(Params().NetworkID() == CBaseChainParams::TESTNET){
-        if(nHeight > 91758) nSubsidy -= nSubsidy/10;
+        if(nHeight > 77900+576) nSubsidy -= nSubsidy/10;
     } else {
-        if(nHeight > 309759+(553*33)) nSubsidy -= nSubsidy/10; // 328008 - 10.0% - August 30, 2015
+        if(nHeight > 309759+(553*33)) nSubsidy -= nSubsidy/10; // 328008 - 10.0% - September 6, 2015
     }
     
     return nSubsidy + nFees;
diff --git a/src/spork.h b/src/spork.h
index b8ede1fbcd6c..fabcfe934db9 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -41,12 +41,12 @@ using namespace boost;
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
 #define SPORK_5_MAX_VALUE_DEFAULT                             1000        //1000 DASH
 #define SPORK_7_MASTERNODE_SCANNING_DEFAULT                   978307200   //2001-1-1
-#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1444217600   //OFF
-#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1444217600   //OFF
-#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         1444217600   //OFF
+#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1438611701   //OFF
+#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1438611701   //OFF
+#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         1438611701   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
 #define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
-#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   0 //1439510400   //8/13/2015, 5:00:00 PM
+#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   1438611701 //1439510400   //8/13/2015, 5:00:00 PM
     
 class CSporkMessage;
 class CSporkManager;

From 0387ebe2447dd2ac837d4474811d649e4a449b41 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 07:29:09 -0700
Subject: [PATCH 1743/1819] Version 35

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0e7a3121e759..0fb54b5d2fdf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 34)
+define(_CLIENT_VERSION_BUILD, 35)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 85330ef3a274..ff67266185ae 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 34
+#define CLIENT_VERSION_BUILD 35
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 28fe729708ff4dd12700838303c89b419380843a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 09:31:12 -0700
Subject: [PATCH 1744/1819] fix non-super block check

---
 src/masternode-payments.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index cd8670557279..ee1270175e1f 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -200,9 +200,9 @@ bool IsBlockValueValid(const CBlock& block, int64_t nExpectedValue){
         LogPrintf("IsBlockValueValid() : WARNING: Couldn't find previous block");
     }
 
-    //are these blocks even enabled?
+    //are these blocks even enabled
     if(!IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS)){
-        return block.vtx[0].GetValueOut() > nExpectedValue;
+        return block.vtx[0].GetValueOut() <= nExpectedValue;
     }
 
     if(!masternodeSync.IsSynced()) { //there is no budget data to use to check anything

From 34d5fb1d75d8ffcd34ec097b19976c945164588b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 09:52:01 -0700
Subject: [PATCH 1745/1819] remove checkpoint

---
 src/chainparams.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 169d9defaa60..ac7a90f08334 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -85,7 +85,6 @@ static const Checkpoints::CCheckpointData data = {
 static Checkpoints::MapCheckpoints mapCheckpointsTestnet =
         boost::assign::map_list_of
         ( 261, uint256("00000c26026d0815a7e2ce4fa270775f61403c040647ff2c3091f99e894a4618"))
-        ( 77100, uint256("00000133e07bae4d3553fd8d86cb5a961d638cae72d179ede8ca436c60a2c3c0"))
         ( 77900, uint256("00000007e5ec67e2a626c07b7d66673c3dd8df0aed5018ca984b99fba2b71024"))
         ;
 static const Checkpoints::CCheckpointData dataTestnet = {

From 9a180149879b53c2da504a71f03912d095a7b3a0 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 12:16:09 -0700
Subject: [PATCH 1746/1819] enable block cache

---
 src/main.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 10b7b8a7896a..08f0a24e05d1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3108,15 +3108,15 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
     CBlockIndex *pindex = NULL;
 
     // TODO : ENABLE BLOCK CACHE IN SPECIFIC CASES
-    // if (miSelf != mapBlockIndex.end()) {
-    //     // Block header is already known.
-    //     pindex = miSelf->second;
-    //     if (ppindex)
-    //         *ppindex = pindex;
-    //     if (pindex->nStatus & BLOCK_FAILED_MASK)
-    //         return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
-    //     return true;
-    // }
+    if (miSelf != mapBlockIndex.end()) {
+        // Block header is already known.
+        pindex = miSelf->second;
+        if (ppindex)
+            *ppindex = pindex;
+        if (pindex->nStatus & BLOCK_FAILED_MASK)
+            return state.Invalid(error("%s : block is marked invalid", __func__), 0, "duplicate");
+        return true;
+    }
 
     if (!CheckBlockHeader(block, state))
         return false;

From d1e6388cccb78324514dca6859b94ec56a617e6d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 12:49:51 -0700
Subject: [PATCH 1747/1819] Undo try_locks for miner

---
 src/miner.cpp | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/miner.cpp b/src/miner.cpp
index a29ac40335c0..7c9accbd19e8 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -129,14 +129,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
     CAmount nFees = 0;
 
     {
-        TRY_LOCK(cs_main, fLockMain);
-        if (!fLockMain) {   
-            LogPrintf("CreateNewBlock : ERROR - failed to lock cs_main - disabled mining\n");
-        }
-        TRY_LOCK(mempool.cs, fLockMempool);
-        if (!fLockMempool) {   
-            LogPrintf("CreateNewBlock : ERROR - failed to lock mempool.cs - disabled mining\n");
-        }
+        LOCK2(cs_main, mempool.cs);
 
         CBlockIndex* pindexPrev = chainActive.Tip();
         const int nHeight = pindexPrev->nHeight + 1;

From d80feacc8ee6c7aef6e096ca37d3d0c71c82cf91 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 14:59:28 -0700
Subject: [PATCH 1748/1819] Reprocess before disconnect for rescan

---
 src/spork.cpp | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/src/spork.cpp b/src/spork.cpp
index 503c99c0b76e..fec128e79748 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -135,6 +135,25 @@ void ExecuteSpork(int nSporkID, int nValue)
     if(nSporkID == SPORK_12_RECONSIDER_BLOCKS && nValue > 0) {
         LogPrintf("Spork::ExecuteSpork -- Reconcider Last %d Blocks\n", nValue);
 
+        CBlockIndex* pindexPrev = chainActive.Tip();
+        int count = 0;
+
+        for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
+            count++;
+            if(count >= nValue) return;
+
+            CValidationState state;
+            {
+                LOCK(cs_main);
+
+                LogPrintf("Spork::ExecuteSpork -- Reconcider %s\n", pindexPrev->phashBlock->ToString());
+                ReconsiderBlock(state, pindexPrev);
+            }
+
+            if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
+            pindexPrev = pindexPrev->pprev;
+        }
+
         CValidationState state;
         {
             LOCK(cs_main);

From f6721cbe175733fab2da5a04e57ced36f36afe53 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 15:50:27 -0700
Subject: [PATCH 1749/1819] Reconsider : typo, use i and break

---
 src/spork.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/spork.cpp b/src/spork.cpp
index fec128e79748..ea5a8a4e87c7 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -136,17 +136,16 @@ void ExecuteSpork(int nSporkID, int nValue)
         LogPrintf("Spork::ExecuteSpork -- Reconcider Last %d Blocks\n", nValue);
 
         CBlockIndex* pindexPrev = chainActive.Tip();
-        int count = 0;
 
         for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-            count++;
-            if(count >= nValue) return;
+            i++;
+            if(i >= nValue) break;
 
             CValidationState state;
             {
                 LOCK(cs_main);
 
-                LogPrintf("Spork::ExecuteSpork -- Reconcider %s\n", pindexPrev->phashBlock->ToString());
+                LogPrintf("Spork::ExecuteSpork -- Reconsider %s\n", pindexPrev->phashBlock->ToString());
                 ReconsiderBlock(state, pindexPrev);
             }
 

From 334c3ea97184cc674529a1149ea29616da8c3ce1 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 2 Aug 2015 16:08:37 -0700
Subject: [PATCH 1750/1819] Added ReprocessBlocks

---
 src/instantx.cpp |  4 ++--
 src/spork.cpp    | 44 +++++++++++++++++++++++---------------------
 src/spork.h      |  1 +
 3 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index 35c99f06276b..d22e99d3dd02 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -115,7 +115,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
                         LogPrintf("ProcessMessageInstantX::ix - Found Existing Complete IX Lock\n");
 
                         //reprocess the last 15 blocks
-                        ExecuteSpork(SPORK_12_RECONSIDER_BLOCKS, 15);
+                        ReprocessBlocks(15);
                         mapTxLockReq.insert(make_pair(tx.GetHash(), tx));
                     }
                 }
@@ -383,7 +383,7 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
                 //if this tx lock was rejected, we need to remove the conflicting blocks
                 if(mapTxLockReqRejected.count((*i).second.txHash)){
                     //reprocess the last 15 blocks
-                    ExecuteSpork(SPORK_12_RECONSIDER_BLOCKS, 15);
+                    ReprocessBlocks(15);
                 }
             }
         }
diff --git a/src/spork.cpp b/src/spork.cpp
index ea5a8a4e87c7..629dee791a67 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -133,36 +133,38 @@ void ExecuteSpork(int nSporkID, int nValue)
 
     //correct fork via spork technology
     if(nSporkID == SPORK_12_RECONSIDER_BLOCKS && nValue > 0) {
-        LogPrintf("Spork::ExecuteSpork -- Reconcider Last %d Blocks\n", nValue);
+        LogPrintf("Spork::ExecuteSpork -- Reconsider Last %d Blocks\n", nValue);
 
-        CBlockIndex* pindexPrev = chainActive.Tip();
-
-        for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-            i++;
-            if(i >= nValue) break;
-
-            CValidationState state;
-            {
-                LOCK(cs_main);
+        ReprocessBlocks(nValue);
+    }
+}
 
-                LogPrintf("Spork::ExecuteSpork -- Reconsider %s\n", pindexPrev->phashBlock->ToString());
-                ReconsiderBlock(state, pindexPrev);
-            }
+void ReprocessBlocks(int nBlocks) 
+{
+    CBlockIndex* pindexPrev = chainActive.Tip();
 
-            if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
-            pindexPrev = pindexPrev->pprev;
-        }
+    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
+        if(i > nBlocks) break;
 
         CValidationState state;
         {
             LOCK(cs_main);
-
-            DisconnectBlocksAndReprocess(nValue);
+            ReconsiderBlock(state, pindexPrev);
         }
 
-        if (state.IsValid()) {
-            ActivateBestChain(state);
-        }
+        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
+        pindexPrev = pindexPrev->pprev;
+    }
+
+    CValidationState state;
+    {
+        LOCK(cs_main);
+
+        DisconnectBlocksAndReprocess(nBlocks);
+    }
+
+    if (state.IsValid()) {
+        ActivateBestChain(state);
     }
 }
 
diff --git a/src/spork.h b/src/spork.h
index fabcfe934db9..f43a4ed94d8e 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -59,6 +59,7 @@ void ProcessSpork(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
 int GetSporkValue(int nSporkID);
 bool IsSporkActive(int nSporkID);
 void ExecuteSpork(int nSporkID, int nValue);
+void ReprocessBlocks(int nBlocks);
 
 //
 // Spork Class

From 18635f09794f21b5f7e58ffd5d867ed83018d9d8 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 3 Aug 2015 19:24:23 +0300
Subject: [PATCH 1751/1819] fix debug output

---
 src/darksend.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 893437849a87..d0adda00346c 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -498,7 +498,7 @@ std::string CDarksendPool::GetStatus()
 //
 void CDarksendPool::Check()
 {
-    if(fMasterNode) LogPrintf("darksend", "CDarksendPool::Check() - entries count %lu\n", entries.size());
+    if(fMasterNode) LogPrint("darksend", "CDarksendPool::Check() - entries count %lu\n", entries.size());
     //printf("CDarksendPool::Check() %d - %d - %d\n", state, anonTx.CountEntries(), GetTimeMillis()-lastTimeChanged);
 
     if(fMasterNode) {
@@ -1688,7 +1688,7 @@ bool CDarksendPool::MakeCollateralAmounts()
     if(!success){
         // if we failed (most likeky not enough funds), try to use denominated instead -
         // MN-like funds should not be touched in any case and we can't mix denominated without collaterals anyway
-        LogPrintf("darksend", "MakeCollateralAmounts: ONLY_NONDENOMINATED_NOTMN Error - %s\n", strFail);
+        LogPrintf("MakeCollateralAmounts: ONLY_NONDENOMINATED_NOTMN Error - %s\n", strFail);
         success = pwalletMain->CreateTransaction(vecSend, wtx, reservekeyChange,
                 nFeeRet, strFail, coinControl, ONLY_DENOMINATED);
         if(!success){

From e0031a807e406c8d3a0f47cce1c810355b8d9f6e Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 3 Aug 2015 11:37:58 -0700
Subject: [PATCH 1752/1819] Add superblock checks in various places

---
 src/masternode-payments.cpp  | 24 +++++++++++++-----------
 src/rpcmasternode-budget.cpp |  4 ++--
 2 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index ee1270175e1f..18a5f71f739f 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -232,16 +232,18 @@ bool IsBlockPayeeValid(const CTransaction& txNew, int nBlockHeight)
     }
 
     //check if it's a budget block
-    if(budget.IsBudgetPaymentBlock(nBlockHeight)){
-        if(budget.IsTransactionValid(txNew, nBlockHeight)){
-            return true;
-        } else {
-            LogPrintf("Invalid budget payment detected %s\n", txNew.ToString().c_str());
-            if(IsSporkActive(SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT)){
-                return false;
-            } else {
-                LogPrintf("Budget enforcement is disabled, accepting block\n");
+    if(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS)){
+        if(budget.IsBudgetPaymentBlock(nBlockHeight)){
+            if(budget.IsTransactionValid(txNew, nBlockHeight)){
                 return true;
+            } else {
+                LogPrintf("Invalid budget payment detected %s\n", txNew.ToString().c_str());
+                if(IsSporkActive(SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT)){
+                    return false;
+                } else {
+                    LogPrintf("Budget enforcement is disabled, accepting block\n");
+                    return true;
+                }
             }
         }
     }
@@ -269,7 +271,7 @@ void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
-    if(budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
+    if(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(pindexPrev->nHeight+1)){
         budget.FillBlockPayee(txNew, nFees);
     } else {
         masternodePayments.FillBlockPayee(txNew, nFees);
@@ -278,7 +280,7 @@ void FillBlockPayee(CMutableTransaction& txNew, int64_t nFees)
 
 std::string GetRequiredPaymentsString(int nBlockHeight)
 {
-    if(budget.IsBudgetPaymentBlock(nBlockHeight)){
+    if(IsSporkActive(SPORK_13_ENABLE_SUPERBLOCKS) && budget.IsBudgetPaymentBlock(nBlockHeight)){
         return budget.GetRequiredPaymentsString(nBlockHeight);
     } else {
         return masternodePayments.GetRequiredPaymentsString(nBlockHeight);
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 3eb2ba2cacce..aeea7f4b7478 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -49,8 +49,8 @@ Value mnbudget(const Array& params, bool fHelp)
         std::vector<CMasternodeConfig::CMasternodeEntry> mnEntries;
         mnEntries = masternodeConfig.getEntries();
 
-        if (params.size() != 7 && params.size() != 8)
-            throw runtime_error("Correct usage is 'mnbudget prepare proposal-name url payment_count block_start dash_address monthly_payment_dash [use_ix(true|false)]'");
+        if (params.size() != 7)
+            throw runtime_error("Correct usage is 'mnbudget prepare proposal-name url payment_count block_start dash_address monthly_payment_dash'");
 
         std::string strProposalName = params[1].get_str();
         if(strProposalName.size() > 20)

From c7077dc9d42c7930147e9385e0a883bbf1d4e2fa Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 3 Aug 2015 12:05:19 -0700
Subject: [PATCH 1753/1819] disable try-lock on IBD

---
 src/main.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index 08f0a24e05d1..adeabc4e4398 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4885,7 +4885,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         vRecv >> block;
 
         TRY_LOCK(cs_main, lockMainBlock);
-        if(!lockMainBlock) {
+        if(!lockMainBlock && masternodeSync.IsBlockchainSynced()) {
             LogPrintf("block -- failed to lock cs_main - %s\n", block.GetHash().ToString());
             return false;
         }

From 92be1268bb2a4130e8923c66db1de0123a829e67 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 3 Aug 2015 12:54:54 -0700
Subject: [PATCH 1754/1819] Fixed bug with AutoCheck finalbudget voting

---
 src/masternode-budget.cpp | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 324ee8d27854..8865a95cf182 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1500,7 +1500,9 @@ void CFinalizedBudget::AutoCheck()
     if(!fMasterNode || fAutoChecked) return;
 
     //do this 1 in 20 blocks -- spread out the voting activity on mainnet
-    if(Params().NetworkID() == CBaseChainParams::MAIN && rand() % 20 != 0) return;
+    if(Params().NetworkID() == CBaseChainParams::MAIN && rand() % 20 != 0) {
+        return;
+    }
 
     fAutoChecked = true; //we only need to check this once
 
@@ -1513,6 +1515,12 @@ void CFinalizedBudget::AutoCheck()
             return;
         }
 
+        if(vBudgetProposals.size() != vecBudgetPayments.size()) {
+            LogPrintf("CFinalizedBudget::AutoCheck - Budget length doesn't match\n");
+            return;
+        }
+
+
         for(unsigned int i = 0; i < vecBudgetPayments.size(); i++){
             if(i > vBudgetProposals.size() - 1) {
                 LogPrintf("CFinalizedBudget::AutoCheck - Vector size mismatch, aborting\n");
@@ -1533,11 +1541,11 @@ void CFinalizedBudget::AutoCheck()
                 LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecBudgetPayments[i].payee.ToString(), vBudgetProposals[i]->GetPayee().ToString());
                 return;
             }
-
-            LogPrintf("CFinalizedBudget::AutoCheck - Finalized Budget Matches! Submitting Vote.\n");
-            SubmitVote();
         }
 
+        LogPrintf("CFinalizedBudget::AutoCheck - Finalized Budget Matches! Submitting Vote.\n");
+        SubmitVote();
+
     }
 }
 // If masternode voted for a proposal, but is now invalid -- remove the vote

From 1f35a12033a7c34e70fce663f5d2f1c3c042504a Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 3 Aug 2015 12:57:15 -0700
Subject: [PATCH 1755/1819] disable ix for fin budget submit

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 8865a95cf182..956f2891145c 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -147,7 +147,7 @@ void CBudgetManager::SubmitFinalBudget()
     CTransaction tx;
     if(!mapCollateral.count(tempBudget.GetHash())){
         CWalletTx wtx;
-        if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, tempBudget.GetHash(), true)){
+        if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, tempBudget.GetHash(), false)){
             LogPrintf("CBudgetManager::SubmitFinalBudget - Can't make collateral transaction\n");
             return;
         }

From 240bb10d3393c87e50d68852168e1195de57034a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 3 Aug 2015 22:53:00 +0300
Subject: [PATCH 1756/1819] fix rpc for darksend

---
 src/darksend.cpp      | 8 +++++++-
 src/rpcmasternode.cpp | 7 +++----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index d0adda00346c..c4f9aee4fc25 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -445,7 +445,7 @@ std::string CDarksendPool::GetStatus()
     showingDarkSendMessage += 10;
     std::string suffix = "";
 
-    if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing) {
+    if(chainActive.Tip()->nHeight - cachedLastSuccess < minBlockSpacing || !masternodeSync.IsBlockchainSynced()) {
         return strAutoDenomResult;
     }
     switch(state) {
@@ -1352,6 +1352,12 @@ void CDarksendPool::ClearLastMessage()
 //
 bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 {
+    TRY_LOCK(cs_darksend, lockDS);
+    if(!lockDS) {
+        strAutoDenomResult = _("Lock is already in place.");
+        return false;
+    }
+
     LOCK(cs_darksend);
 
     if(!masternodeSync.IsBlockchainSynced()) {
diff --git a/src/rpcmasternode.cpp b/src/rpcmasternode.cpp
index cd6ad39d5690..53283b555b43 100644
--- a/src/rpcmasternode.cpp
+++ b/src/rpcmasternode.cpp
@@ -57,7 +57,7 @@ Value darksend(const Array& params, bool fHelp)
         throw runtime_error(
             "darksend <dashaddress> <amount>\n"
             "dashaddress, reset, or auto (AutoDenominate)"
-            "<amount> is a real and is rounded to the nearest 0.00000001"
+            "<amount> is a real and will be rounded to the next 0.1"
             + HelpRequiringPassphrase());
 
     if (pwalletMain->IsLocked())
@@ -67,8 +67,7 @@ Value darksend(const Array& params, bool fHelp)
         if(fMasterNode)
             return "DarkSend is not supported from masternodes";
 
-        darkSendPool.DoAutomaticDenominating();
-        return "DoAutomaticDenominating";
+        return "DoAutomaticDenominating " + (darkSendPool.DoAutomaticDenominating() ? "successful" : ("failed: " + darkSendPool.GetStatus()));
     }
 
     if(params[0].get_str() == "reset"){
@@ -80,7 +79,7 @@ Value darksend(const Array& params, bool fHelp)
         throw runtime_error(
             "darksend <dashaddress> <amount>\n"
             "dashaddress, denominate, or auto (AutoDenominate)"
-            "<amount> is a real and is rounded to the nearest 0.00000001"
+            "<amount> is a real and will be rounded to the next 0.1"
             + HelpRequiringPassphrase());
 
     CBitcoinAddress address(params[0].get_str());

From 12d320301f2cb17c8cf14b29b412b2b8969617f8 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 3 Aug 2015 23:23:30 +0300
Subject: [PATCH 1757/1819] add composite debug category
 dash=darksend+instantx+masternode+keepass+mnpayments+mnbudget

---
 src/init.cpp | 2 +-
 src/util.cpp | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index 04de0bd20998..54b9eb95f389 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -378,7 +378,7 @@ std::string HelpMessage(HelpMessageMode mode)
     strUsage += "                         " + _("If <category> is not supplied, output all debugging information.") + "\n";
     strUsage += "                         " + _("<category> can be:\n");
     strUsage += "                           addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net,\n"; // Don't translate these and qt below
-    strUsage += "                           darksend, instantx, masternode, keepass, mnpayments, mnbudget"; // Don't translate these and qt below
+    strUsage += "                           dash (or specifically: darksend, instantx, masternode, keepass, mnpayments, mnbudget)"; // Don't translate these and qt below
     if (mode == HMM_BITCOIN_QT)
         strUsage += ", qt";
     strUsage += ".\n";
diff --git a/src/util.cpp b/src/util.cpp
index 19c2db10e472..ce46f57900d7 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -223,6 +223,15 @@ bool LogAcceptCategory(const char* category)
             const vector<string>& categories = mapMultiArgs["-debug"];
             ptrCategory.reset(new set<string>(categories.begin(), categories.end()));
             // thread_specific_ptr automatically deletes the set when the thread ends.
+            // "dash" is a composite category enabling all Dash-related debug output
+            if(ptrCategory->count(string("dash"))) {
+                ptrCategory->insert(string("darksend"));
+                ptrCategory->insert(string("instantx"));
+                ptrCategory->insert(string("masternode"));
+                ptrCategory->insert(string("keepass"));
+                ptrCategory->insert(string("mnpayments"));
+                ptrCategory->insert(string("mnbudget"));
+            }
         }
         const set<string>& setCategories = *ptrCategory.get();
 

From ecea4bfaf964acb2f46aa4dde566acc37cec0be4 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Mon, 3 Aug 2015 13:41:04 -0700
Subject: [PATCH 1758/1819] client version bump

---
 configure.ac                                   |  2 +-
 doc/release-notes/dash/release-notes-0.12.0.md | 17 ++++++++++-------
 src/clientversion.h                            |  2 +-
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0fb54b5d2fdf..e7e82062cafd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 35)
+define(_CLIENT_VERSION_BUILD, 36)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/doc/release-notes/dash/release-notes-0.12.0.md b/doc/release-notes/dash/release-notes-0.12.0.md
index 8800ba307ee6..74876ae53ea3 100644
--- a/doc/release-notes/dash/release-notes-0.12.0.md
+++ b/doc/release-notes/dash/release-notes-0.12.0.md
@@ -52,15 +52,18 @@ This does not affect wallet forward or backward compatibility.
 0.12.0 changelog
 ----------------
 
-Switched to Bitcoin Core version 0.10
-https://bitcoin.org/en/release/v0.10.0
-Implemented decentralized budget system
+Switched to Bitcoin Core version 0.10 - https://bitcoin.org/en/release/v0.10.0
+Implemented decentralized budget system 
 Removed reference node
-Implemented new decentralized masternode payment consensus system
-Improved speed of DS
-New masternode payment/winners/budgets syncing strategy
-Platform indepentant masternode ranking system
+Implemented new decentralized masternode payment consensus system 
+Improved speed of DS 
+New masternode payment/winners/budgets syncing strategy 
+Platform independent masternode ranking system 
 Masternode broadcasts, pings and winners now use the inventory system
+Transaction indexing is enabled by default for all clients
+Better implementation of IX block reprocessing to find and remove an invalid block
+IX nearly 100% successful with new implementation
+
 
 
 Credits
diff --git a/src/clientversion.h b/src/clientversion.h
index ff67266185ae..a4d8912ffff1 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 35
+#define CLIENT_VERSION_BUILD 36
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 2e8445e74112fbf62b38b35ebda6b7f4754bc34f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 3 Aug 2015 23:42:18 +0300
Subject: [PATCH 1759/1819] refactor IsBlockchainSynced

---
 src/masternode-sync.cpp | 32 +++++++++++++++++++-------------
 1 file changed, 19 insertions(+), 13 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 5e137260c874..66020df143d1 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -41,10 +41,22 @@ bool CMasternodeSync::IsSynced()
 
 bool CMasternodeSync::IsBlockchainSynced()
 {
-    CBlockIndex* pindexPrev = chainActive.Tip();
-    if(pindexPrev == NULL) return false;
+    if (fImporting || fReindex) return false;
+
+    TRY_LOCK(cs_main, lockMain);
+    if(!lockMain) return false;
+
+    CBlockIndex* pindex = chainActive.Tip();
+    if(pindex == NULL) return false;
+
+    static bool fBlockchainSynced = false;
+    if(fBlockchainSynced) return true;
+
+    if(pindex->nTime + 600 < GetTime())
+        return false;
+
+    fBlockchainSynced = true;
 
-    if(pindexPrev->nTime + 600 < GetTime()) return false;
     return true;
 }
 
@@ -197,6 +209,10 @@ void CMasternodeSync::Process()
 
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_INITIAL) GetNextAsset();
 
+    // sporks synced but blockchain is not, wait until we're almost at a recent block to continue
+    if(Params().NetworkID() != CBaseChainParams::REGTEST &&
+            !IsBlockchainSynced() && RequestedMasternodeAssets > MASTERNODE_SYNC_SPORKS) return;
+
     TRY_LOCK(cs_vNodes, lockRecv);
     if(!lockRecv) return;
 
@@ -231,16 +247,6 @@ void CMasternodeSync::Process()
             return;
         }
 
-        {
-            TRY_LOCK(cs_main, lockMain);
-            if(!lockMain) return;
-
-            if(IsInitialBlockDownload()) return;
-        }
-
-        //don't begin syncing until we're almost at a recent block
-        if(!IsBlockchainSynced()) return;
-
         if (pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto()) {
 
             if(RequestedMasternodeAssets == MASTERNODE_SYNC_LIST) {

From 69087fd72370332ab1ef1e3cd15282a10c07af8c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 4 Aug 2015 00:32:12 +0300
Subject: [PATCH 1760/1819] fix release notes format

---
 .../dash/release-notes-0.12.0.md              | 84 +++++++++----------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/doc/release-notes/dash/release-notes-0.12.0.md b/doc/release-notes/dash/release-notes-0.12.0.md
index 74876ae53ea3..0417e6757122 100644
--- a/doc/release-notes/dash/release-notes-0.12.0.md
+++ b/doc/release-notes/dash/release-notes-0.12.0.md
@@ -4,7 +4,7 @@
 ====================
 
 
-Dash Core version 0.11.2 is now available from:
+Dash Core version 0.12.0 is now available from:
 
   https://dashpay.io/downloads
 
@@ -21,8 +21,8 @@ shut down (which might take a few minutes for older versions), then run the
 installer (on Windows) or just copy over /Applications/Dash-Qt (on Mac) or
 dashd/dash-qt (on Linux).
 
-** This new version uses transaction indexing by default, you will need to reindex 
-the blockchain. To do so, start the client with --reindex. **
+**This new version uses transaction indexing by default, you will need to reindex 
+the blockchain. To do so, start the client with --reindex.**
 
 
 Downgrade warning
@@ -53,17 +53,17 @@ This does not affect wallet forward or backward compatibility.
 ----------------
 
 Switched to Bitcoin Core version 0.10 - https://bitcoin.org/en/release/v0.10.0
-Implemented decentralized budget system 
-Removed reference node
-Implemented new decentralized masternode payment consensus system 
-Improved speed of DS 
-New masternode payment/winners/budgets syncing strategy 
-Platform independent masternode ranking system 
-Masternode broadcasts, pings and winners now use the inventory system
-Transaction indexing is enabled by default for all clients
-Better implementation of IX block reprocessing to find and remove an invalid block
-IX nearly 100% successful with new implementation
-
+- Implemented decentralized budget system 
+- Removed reference node
+- Implemented new decentralized masternode payment consensus system
+- Improved speed of DS
+- New masternode payment/winners/budgets syncing strategy
+- Platform independent masternode ranking system
+- Masternode broadcasts, pings and winners now use the inventory system
+- Transaction indexing is enabled by default for all clients
+- Better implementation of IX block reprocessing to find and remove an invalid block
+- IX nearly 100% successful with new implementation
+- Lots of UI improvements and fixes including DS progress, wallet repair buttons, UI settings/filters persistence etc
 
 
 Credits
@@ -71,34 +71,34 @@ Credits
 
 Thanks to who contributed to this release, at least:
 
-eduffield
-UdjinM6
-Crowning
-moli
-flare
-thelazier
-adios
-poiuty 
-scratchy 
-moocowmoo
-the-baker
-BrainShutdown
-Lukas_Jackson
-Sub-Ether
-italx
-yidakee
-TanteStefana
-coingun
-tungfa
-MangledBlue
-AjM
-Lariondos
-elbereth
-minersday
-qwizzie
-TaoOfSatoshi
-dark-sailor
-AlexMomo
+eduffield  
+UdjinM6  
+Crowning  
+moli  
+flare  
+thelazier  
+adios  
+poiuty  
+scratchy  
+moocowmoo  
+the-baker  
+BrainShutdown  
+Lukas_Jackson  
+Sub-Ether  
+italx  
+yidakee  
+TanteStefana  
+coingun  
+tungfa  
+MangledBlue  
+AjM  
+Lariondos  
+elbereth  
+minersday  
+qwizzie  
+TaoOfSatoshi  
+dark-sailor  
+AlexMomo  
 snogcel
 
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/dash/).

From 22356717753d0a34c656e30730ab082a96c1b64b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 4 Aug 2015 02:23:36 +0300
Subject: [PATCH 1761/1819] use fBlockchainSynced right on IsBlockchainSynced
 start

---
 src/masternode-sync.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 66020df143d1..753e347e4799 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -41,6 +41,9 @@ bool CMasternodeSync::IsSynced()
 
 bool CMasternodeSync::IsBlockchainSynced()
 {
+    static bool fBlockchainSynced = false;
+    if(fBlockchainSynced) return true;
+
     if (fImporting || fReindex) return false;
 
     TRY_LOCK(cs_main, lockMain);
@@ -49,8 +52,6 @@ bool CMasternodeSync::IsBlockchainSynced()
     CBlockIndex* pindex = chainActive.Tip();
     if(pindex == NULL) return false;
 
-    static bool fBlockchainSynced = false;
-    if(fBlockchainSynced) return true;
 
     if(pindex->nTime + 600 < GetTime())
         return false;

From b4aaa11864c1d2784670b79c8455a76f413283dc Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 4 Aug 2015 17:02:24 +0300
Subject: [PATCH 1762/1819] translations >80%

---
 src/qt/locale/dash_bg.ts |  416 ++--
 src/qt/locale/dash_de.ts |  416 ++--
 src/qt/locale/dash_es.ts |  414 ++--
 src/qt/locale/dash_fi.ts |  547 +++--
 src/qt/locale/dash_fr.ts | 4378 ++++++++++++++++++--------------------
 src/qt/locale/dash_it.ts |  434 ++--
 src/qt/locale/dash_pl.ts |  706 +++---
 src/qt/locale/dash_pt.ts |  614 +++---
 src/qt/locale/dash_ru.ts |  512 ++---
 src/qt/locale/dash_vi.ts |  450 ++--
 10 files changed, 4670 insertions(+), 4217 deletions(-)

diff --git a/src/qt/locale/dash_bg.ts b/src/qt/locale/dash_bg.ts
index 45e73de17f09..c2077c804ac9 100644
--- a/src/qt/locale/dash_bg.ts
+++ b/src/qt/locale/dash_bg.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Ядро</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Портфейл</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Възел</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Баланс</translation>
     </message>
@@ -743,7 +743,7 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Предупреждение от мрежата</translation>
     </message>
@@ -832,8 +832,8 @@ Address: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Darksend цикли</translation>
+        <source>DS Rounds</source>
+        <translation>DS цикли</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -949,16 +949,16 @@ Address: %4
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation>Може да варира +/- 1 duff(s) за вход.</translation>
+        <translation>Може да варира +/- 1duff(s) за вход.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>няма такъв</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>среден</translation>
     </message>
@@ -1430,12 +1430,7 @@ Address: %4
         <translation>(0 = автоматично, &lt;0 = оставете толкова неизползвани ядра)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Тази настройка определя броя на отделните masternodes чрез които ще се извършва анонимизирането. Повече цикли на анонимизиране дава по-висока степен на сигурност, но и таксите са по-големи.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Използвани Dash цикли</translation>
     </message>
@@ -1455,7 +1450,12 @@ Address: %4
         <translation>П&amp;ортфейл</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>Ако деактивирате харченето на непотвърдено ресто, рестото от транзакция&lt;br/&gt; няма да може да се използва преди да бъде получено поне едно потвърждение. &lt;br/&gt;Това се отразява и на начина на изчисление на баланса ви.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>риемай връзки отвън</translation>
     </message>
@@ -1480,7 +1480,12 @@ Address: %4
         <translation>Експерт</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Тази настройка определя броя на отделните masternodes, чрез които ще се извършва анонимизирането.&lt;br/&gt;Повече цикли на анонимизиране дава по-висока степен на сигурност, но и  по-високи такси.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Да покаже или скрие възможностите за контрол на монетата.</translation>
     </message>
@@ -1490,12 +1495,7 @@ Address: %4
         <translation>Активиране &amp;контролните функции на монетата</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Изхарчете непотвърденото ресто</translation>
     </message>
@@ -1598,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Десетични цифри</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 адреси на трети страни (например block Explorer), които се появяват в раздела с транзакции, като елементи от контекстното меню. %s в URL е заменен с хеша на транзакцията. Отделните URL адреси са разделени с вертикална линия |.</translation>
@@ -1633,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Отказ</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>по подразбиране</translation>
     </message>
@@ -1643,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>няма</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Потвърди изчистване на настройките</translation>
     </message>
@@ -1764,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Статус:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Включено/Изключено</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Завършено:</translation>
     </message>
@@ -1779,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend баланс:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Количество и цикли:</translation>
     </message>
@@ -1804,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Няма такова</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1822,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Пусни/Спри Смесване</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Деноминираните суми, които сте изпратили към Masternode. За смесване, другите потребители трябва да изпратят абсолютно същите деноминирани суми.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Последно съобщение)</translation>
     </message>
@@ -1852,67 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Изчистване</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>несинхронизиран</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Неактивно</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Пусни Darksend смесването</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Спри Darksend смесването</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Не са открити монети</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n Цикли</numerusform><numerusform>%n Цикли</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Открити са непотвърдени деноминирани средства, трябва да се изчака потвърждение за  преизчисление .</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Няма достатъчно съвместими постъпления за анонимизиране &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;ще бъдат анонимизирани &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; вместо</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Общ прогрес</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Деноминирани</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Анонимизирани</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>В процес: %1% (входовете имат средно от %2 от %n цикли)</numerusform><numerusform>В процес: %1% (входовете имат средно от %2 от %n цикли)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Деноминирани входове имат %5 от %n цикъла средно</numerusform><numerusform>Деноминирани входове имат %5 от %n цикъла средно</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Намерени са достатъчно съвместими постъпления за анонимизиране %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Няма достатъчно съвместими постъпления за анонимизиране &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;ще бъдат анонимизирани &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; вместо</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Смесени</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Активирано</translation>
     </message>
@@ -1934,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend беше успешно нулиран.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Ако не искате да видите вътрешните Darksend такси/транзакции изберете &quot;Най-често срещаните&quot; като тип от раздел &quot;Операции&quot; .</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend се нуждае от поне %1 за да започне.</translation>
     </message>
@@ -2087,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Сума</translation>
     </message>
@@ -2097,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Въведете Dash адрес (напр.%1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 дни</translation>
     </message>
@@ -2178,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Данни</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Брой Masternode</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Главен</translation>
     </message>
@@ -2291,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Регистър на блокове</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Брой на Masternodes</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Конзола</translation>
     </message>
@@ -2559,8 +2581,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Повторна употреба на един от адресите за получаване. При повторно използване на адреси са възможни проблеми със сигурността и личната неприкосновеност. Не използвайте адреса, освен ако не ре-генерирате предишна заявка за плащане.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Повторна употреба на един от адресите за получаване.&lt;br&gt;При повторно използване на адреси са възможни проблеми със сигурността и личната неприкосновеност.&lt;br&gt;Не използвайте адреса, освен ако не ре-генерирате предишна заявка за плащане.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2569,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Възможност  да се прикрепи съобщение към заявката за плащане, което да бъде показано при отваряне на заявката. Забележка: съобщението няма да бъде изпратено с плащането по мрежата на Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Съобщение:</translation>
     </message>
@@ -2585,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Възможност да се прикрепи наименование към новия адрес за получаване.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Възможност  да се прикрепи съобщение към заявката за плащане, което да бъде показано при отваряне на заявката. &lt;br&gt;Забележка: съобщението няма да бъде изпратено с плащането по мрежата на Dash.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Използвате този формуляр за заявяване на плащания. Всички полета са &lt;b&gt;незадължителни&lt;/b&gt;.</translation>
     </message>
@@ -2771,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Изпращане на монети</translation>
@@ -2878,32 +2904,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs, тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs,,&lt;br /&gt; тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>за килобайт</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs,&lt;br /&gt; тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Ако променената такса е 1000 duffs и транзакцията е само 250 байта, тогава &quot;за килобайт&quot; само плаща такса 250 duffs, тогава&quot;за последно&quot; заплаща 1000 duffs. За транзакции по-големи от килобайт едновременно се заплащат от килобайт.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Разплащането само минималната такса ще продължи толкова дълго,докато транзакцията заема по-малък обем в блоковото пространство.&lt;br /&gt; Но имайте предвид, че транзакцията може да се окаже без първоначално потвърждение ако се появи голямо търсене на dash транзакции отколкото мрежата може да обработи.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>сбор на края</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>за килобайт</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Разплащането само минималната такса ще продължи толкова дълго,докато транзакцията заема по-малък обем в блоковото пространство. Но имайте предвид, че транзакцията може да се окаже без първоначално потвърждение ако се появи голямо търсене на dash транзакции отколкото мрежата може да обработи.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>сбор на края</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(прочети пояснението)</translation>
     </message>
@@ -2918,7 +2944,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Персонализиран:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(Смарт таксата не е разпозната все още.Това ще отнеме няколко блока... )</translation>
     </message>
@@ -2993,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Баланс:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Копирай количеството</translation>
     </message>
@@ -3080,21 +3106,16 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Пълна сума %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>или</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Обща сума = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Потвърди изпращането на монетите</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Такса %1 е по-голяма от %2 за kB се счита за твърде висока такса.</translation>
     </message>
@@ -3109,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Невалиден адрес на получателя.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(%1 of %2 показани записи)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Сумата трябва да е по-голяма от 0.</translation>
     </message>
@@ -3919,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Всички</translation>
@@ -3955,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>От - до...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Най-често</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Получени</translation>
     </message>
@@ -4010,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Други</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Търсене по адрес или наименование</translation>
     </message>
@@ -4050,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Подробности за транзакцията</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Изнасяне историята на транзакциите</translation>
     </message>
@@ -4115,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Направените транзакции са запазени до %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>От:</translation>
     </message>
@@ -4170,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Запишете данните от текущия раздел във файл</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Избрана сума:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Запазване на портфейла</translation>
     </message>
@@ -4243,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Изпълнете командата когато има промяна в най-добрият блок (%s в cmd е подменена от  block hash)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Намерени са непотвърдени деноминирани средства, трябва да изчакате потвърждаването им за да продължите</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>В този режим -genproclimit се контролира колко блока са генерирани моментално.</translation>
     </message>
@@ -4268,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Заявка за адреси на пиъри чрез DNS справка, ако адресите са недостатъчно (по-подразбиране: 1 освен ако -свързан)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Задаване на външен адрес:порт на този masternode (пример: адрес:порт)</translation>
     </message>
@@ -4338,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Трябва да посочите masternodeprivkey в конфигурацията. Моля прочетете документацията за помощ.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(по подразбиране 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Приемай команден ред и JSON-RPC команди</translation>
     </message>
@@ -4383,7 +4409,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Не може да бъде деноминирано: няма останали съвместими входящи средства.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Връщане към по-стара версия на портфейла е невъзможно</translation>
     </message>
@@ -4428,12 +4454,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Открита е повредена блок база данни</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend е изключен.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Опции на Darksend:</translation>
     </message>
@@ -4513,7 +4534,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Грешка</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Грешка: Мястото на твърдия диск е малко!</translation>
     </message>
@@ -4543,7 +4564,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Ако  &lt;category&gt; не е предоставена, изведи цялата информация за отстраняването на грешки.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 =запазва tx meta data напр.акаунта на собственика и информация за искането за плащане,  2 = отпада tx meta data)</translation>
     </message>
@@ -4628,7 +4649,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Изчиствай активността по базата от паметта към лог на диска на всеки &lt;n&gt; мегабайта (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Намерени са непотвърдени деноминирани средства, трябва да изчакате потвърждаването им за да продължите</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Как цялостната проверка на блок от -checkblocks е (0-4, по подразбиране: %u)</translation>
     </message>
@@ -4682,6 +4708,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Определя максималния приоритет за свободно предаване или ниска такса за транзакция (по подразбиране:%u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Изпрати информацията за грешки към конзолата, вместо файла debug.log (по подразбиране: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4740,11 +4771,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 може да бъде използван в основната мрежа)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(по подразбиране: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; може да бъде:
@@ -4766,7 +4802,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Винаги пускай заявка за адреси на пиъри през DNS справката (по подразбиране:  %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>Не може да установи -whitebind адрес: &apos;%s&apos;</translation>
     </message>
@@ -4835,6 +4871,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Грешка: Възникна сериозна вътрешна грешка, виж debug.log за подробности</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Грешка: Не можете да изберете настоящите деноминирани входове</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4877,11 +4918,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Игнориране на masternodes с по-ниска версия от (пример: 70050; по подразбиране: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Внасяне...</translation>
     </message>
@@ -4930,11 +4966,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>InstantX опции:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Недостатъчно средства</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4976,7 +5007,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Невалидна сума за -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Последното успешно Darksend действие беше твърде скоро.</translation>
     </message>
@@ -4986,7 +5017,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Ограничение на размера на кеша за подпис до &lt;n&gt; реда (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Очаквай JSON-RPC входящи връзки на &lt;port&gt; (по подразбиране:%u или за тестовата мрежа: %u)</translation>
     </message>
@@ -4996,7 +5027,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Слушане за входящи връзки на &lt;port&gt; (по подразбиране:%u или за тестовата мрежа: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Заключване на masternodes от конфигурационния файл(по подразбиране: %u)</translation>
     </message>
@@ -5061,12 +5092,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Прикрепва справката за грешки към времевия запис(по подразбиране:  %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Стартирай нишка за почистване на портфейла периодично (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Изпрати информацията за грешки към  файла debug.log (по подразбиране: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Изпрати с нулева такса за транзакция ако е възможно (по подразбиране: %u)</translation>
     </message>
@@ -5081,12 +5117,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Частен ключ за сървъра (по подразбиране %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Времето за подпис изтече, моля подпишете отново.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Задайте максимален брой на генерираните ключове до &lt;n&gt; (по подразбиране: %u)</translation>
     </message>
@@ -5106,7 +5137,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Определете флага DB_PRIVATE в средата база от данни на портфейла (по подразбиране: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Времето за подпис е изтекло.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Посочете конфигурационен файл (по подразбиране: %s)</translation>
     </message>
@@ -5181,7 +5217,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Портфейлът трябва да бъде презаписан: рестартирайте Dash за да завършите</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation>Внимание: Неподдържан аргумен -benchmark е игнориран, използвайте -debug=bench.</translation>
     </message>
@@ -5196,15 +5232,40 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Ще опита отново...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Невалиден частен ключ на Masternode. Моля вижте документацията.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(трябва да е 9999 за основната мрежа)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Не можете да намери случаен Masternode.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Не може да се смесват, докато се синхронизира.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Несъвместимост в masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation>Невалидна мрежова маска в -whitelist: &apos;%s&apos;</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Открит е невалиден порт в masternode.conf</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5241,7 +5302,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Последния Derksend беше твърде скоро.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Линия: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Зареждане на адреси...</translation>
     </message>
@@ -5260,6 +5326,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Loading masternode cache...</source>
         <translation>Зареждане на masternode кеш...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Зараждане на masternode кеш за плащане</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5360,6 +5431,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Възстановяване индекса на блок регистъра от настоящия blk000??.dat файл</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Получаване и показване на P2P мрежови известия (по подразбиране: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5386,17 +5462,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Стартира във фонов режим като демон и приема команди</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Изпрати информацията за грешки към конзолата, вместо файла debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Незавършена сесия!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Сесията е изтекла.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Определи размера на кеша на базата от данни в мегабайти (%d до %d, по подразбиране: %d)</translation>
     </message>
@@ -5426,12 +5502,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Подписването неуспешно.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Времето за подпис изтече, моля подпишете отново.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Подписването на транзакцията се провали</translation>
     </message>
@@ -5580,6 +5651,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Настройки на портфейла:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Заглавие на wallet прозореца</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
diff --git a/src/qt/locale/dash_de.ts b/src/qt/locale/dash_de.ts
index f06d2869d143..377c70d61ece 100644
--- a/src/qt/locale/dash_de.ts
+++ b/src/qt/locale/dash_de.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Wallet</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Knoten</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Übersicht</translation>
     </message>
@@ -742,7 +742,7 @@ Adresse: %4</translation>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Netzwerkalarm</translation>
     </message>
@@ -831,8 +831,8 @@ Adresse: %4</translation>
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Darksend Runden</translation>
+        <source>DS Rounds</source>
+        <translation>DS Runden</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -951,13 +951,13 @@ Adresse: %4</translation>
         <translation>Kann um +/- 1 duff(s) pro Eingabe variieren.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>k.A.</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>mittel</translation>
     </message>
@@ -1429,12 +1429,7 @@ Adresse: %4</translation>
         <translation>(0 = automatisch, &lt;0 = so viele Kerne frei lassen)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Diese Einstellung setzt fest, durch wie viele Masternodes ein Input anonymisiert wird. Eine höhere Anzahl bedeutet höhere Anonymität, verursacht allerdings auch höhere Gebühren.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Darksend Runden</translation>
     </message>
@@ -1454,7 +1449,12 @@ Adresse: %4</translation>
         <translation>W&amp;allet</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>Wenn Sie das Ausgeben von unbestätigtem Wechselgeld deaktivieren, kann das Wechselgeld einer &lt;br/&gt; Transaktion nicht verwendet werden, bis es mindestens eine Bestätigung erhalten hat.&lt;br/&gt;Dies wirkt sich auf die Berechnung des Kontostands aus.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Eingehende Verbindungen annehmen</translation>
     </message>
@@ -1479,7 +1479,12 @@ Adresse: %4</translation>
         <translation>Erweiterte Wallet-Optionen</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Diese Einstellung setzt fest, durch wie viele Masternodes ein Input anonymisiert wird. &lt;br/&gt; Eine höhere Anzahl bedeutet höhere Anonymität, verursacht allerdings auch höhere Gebühren.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Legt fest, ob die &quot;Coin Control&quot;-Funktionen angezeigt werden.</translation>
     </message>
@@ -1489,12 +1494,7 @@ Adresse: %4</translation>
         <translation>&quot;&amp;Coin Control&quot;-Funktionen aktivieren</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Wenn Sie das Ausgeben von unbestätigtem Wechselgeld deaktivieren, kann das Wechselgeld einer Transaktion nicht verwendet werden, bis es mindestens eine Bestätigung erhalten hat. Dies wirkt sich auf die Berechnung des Kontostands aus.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Unbestätigtes Wechselgeld darf ausgegeben werden</translation>
     </message>
@@ -1597,6 +1597,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Dezimalziffern</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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>Externe URLs (z.B. ein Block-Explorer), die im Kontextmenü des Transaktionsverlaufs eingefügt werden. In der URL wird %s durch den Transaktionshash ersetzt. Bei Angabe mehrerer URLs müssen diese durch &quot;|&quot; voneinander getrennt werden.</translation>
@@ -1632,7 +1637,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>A&amp;bbrechen</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>Standard</translation>
     </message>
@@ -1642,7 +1647,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>keine</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Zurücksetzen der Konfiguration bestätigen</translation>
     </message>
@@ -1763,12 +1768,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Status:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Aktiviert/Deaktiviert</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Vollendet:</translation>
     </message>
@@ -1778,12 +1783,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend Kontostand:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Betrag und Runden:</translation>
     </message>
@@ -1795,7 +1795,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+7"/>
         <source>Submitted Denom:</source>
-        <translation>Gesendete Stückelung des Betrages:</translation>
+        <translation>Stückelung des Betrages:</translation>
     </message>
     <message>
         <location line="+10"/>
@@ -1803,9 +1803,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>k.A.</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1821,12 +1822,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Starte/Stoppe das Mixen</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Die gestückelten Beträge, die Sie zu dem Masternode gesendet haben.&lt;br&gt; Zum Erfolgreichen Mixen müssen andere Benutzer exakt gleich gestückelte Beträge senden.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Letzte Nachricht)</translation>
     </message>
@@ -1851,67 +1852,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Zurücksetzen</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>nicht synchron</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Deaktiviert</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Starte Darksend Mixen</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Stoppe Darksend Mixen</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Keine Inputs gefunden</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n Runde</numerusform><numerusform>%n Runden</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Unbestätigte für Darksend vorbereitete Ausgabebeträge  gefunden, warte bis sie bestätigt sind bevor neu berechnet wird.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Nicht genug kompatible Inputs zum Anonymisieren von &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt; gefunden,&lt;br/&gt;&lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; wird stattdessen anonymisiert</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Fortschritt</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Gestückelt</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Anonymisiert</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>Fortschritt: %1% (Inputs haben durchschnittlich %2 von %n Runde)</numerusform><numerusform>Fortschritt: %1% (Inputs haben durchschnittlich %2 von %n Runden)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Gestückelte Inputs haben im Durchschnitt %5 von %n Runde</numerusform><numerusform>Gestückelte Inputs haben im Durchschnitt %5 von %n Runden</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Genug kompatible Inputs zum Anonymisieren von %1 gefunden</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Nicht genug kompatible Inputs zum Anonymisieren von &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt; gefunden,&lt;br/&gt;&lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; wird stattdessen anonymisiert</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Gemixt</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Aktiviert</translation>
     </message>
@@ -1933,7 +1950,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend wurde erfolgreich zurückgesetzt.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Wenn Sie keine internen Darksend-Gebühren oder -Transaktionen sehen wollen wählen Sie &quot;Gängigste&quot; als Typ auf der &quot;Transaktionen&quot; Karteikarte.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Zur Benutzung von Darksend benötigt man mindestens %1</translation>
     </message>
@@ -2086,7 +2108,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Betrag</translation>
     </message>
@@ -2096,7 +2118,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Dash-Adresse eingeben (z.B. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 T</translation>
     </message>
@@ -2177,12 +2199,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Anzahl Masternodes</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Allgemein</translation>
     </message>
@@ -2290,7 +2307,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Blockkette</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Anzahl Masternodes</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsole</translation>
     </message>
@@ -2558,8 +2580,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Eine der bereits verwendeten Empfangsadressen wiederverwenden. Addressen wiederzuverwenden birgt Sicherheits- und Datenschutzrisiken. Außer zum Neuerstellen einer bereits erzeugten Zahlungsanforderung sollten Sie dies nicht nutzen.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Eine der bereits verwendeten Empfangsadressen wiederverwenden.&lt;br&gt; Addressen wiederzuverwenden birgt Sicherheits- und Datenschutzrisiken.&lt;br&gt; Außer zum Neuerstellen einer bereits erzeugten Zahlungsanforderung sollten Sie dies nicht nutzen.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2568,12 +2590,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Eine optionale Nachricht, die an die Zahlungsanforderung angehängt wird. Sie wird angezeigt, wenn die Anforderung geöffnet wird. Hinweis: Diese Nachricht wird nicht mit der Zahlung über das Dash-Netzwerk gesendet.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Nachricht:</translation>
     </message>
@@ -2584,7 +2605,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Eine optionale Bezeichnung, die der neuen Empfangsadresse zugeordnet wird.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Eine optionale Nachricht, die an die Zahlungsanforderung angehängt wird. Sie wird angezeigt, wenn die Anforderung geöffnet wird.&lt;br&gt; Hinweis: Diese Nachricht wird nicht mit der Zahlung über das Dash-Netzwerk gesendet.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Verwenden Sie dieses Formular, um Zahlungen anzufordern. Alle Felder sind &lt;b&gt;optional&lt;/b&gt;.</translation>
     </message>
@@ -2770,7 +2796,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Dash überweisen</translation>
@@ -2877,32 +2903,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren, während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren,&lt;br/&gt; während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>pro Kilobyte</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren, während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Wenn die benutzerdefinierten Gebühren auf 1000 duffs gesetzt sind und eine Transaktion hat nur 250 Bytes, dann kostet &quot;pro Kilobyte&quot; nur 250 duffs Gebühren, während &quot;mindestens&quot; 1000 duffs kostet. Transaktionen größer als 1 Kilobyte werden immer pro Kilobyte bezahlt.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Nur die minimalen Gebühren zu zahlen ist völlig ausreichend so lange in einem neuen Block der Blockkette noch genug Platz für neue Transaktionen ist.&lt;br /&gt; Bitte beachten Sie dass wenn dies in der Zukunft nicht mehr der Fall sein sollte Ihre Transaktion eventuell niemals in einen neuen Block aufgenommen werden wird, also niemals bestätigt wird.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>mindestens</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>pro Kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Nur die minimalen Gebühren zu zahlen ist völlig ausreichend so lange in einem neuen Block der Blockkette noch genug Platz für neue Transaktionen ist. Bitte beachten Sie dass wenn dies in der Zukunft nicht mehr der Fall sein sollte Ihre Transaktion eventuell niemals in einen neuen Block aufgenommen werden wird, also niemals bestätigt wird.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>mindestens</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(Kurzinfo lesen)</translation>
     </message>
@@ -2917,7 +2943,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Benutzerdefiniert:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(&quot;Intelligente&quot; Gebühren sind noch nicht initialisiert. Dies dauert normalerweise ein paar Blöcke...)</translation>
     </message>
@@ -2992,7 +3018,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Kontostand:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Anzahl kopieren</translation>
     </message>
@@ -3079,21 +3105,16 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Gesamtbetrag %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>oder</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Gesamtbetrag = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Überweisung bestätigen</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Gebühren %1 x höher als %2 pro Kilobyte sind wahnsinnig überhöht.</translation>
     </message>
@@ -3108,7 +3129,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(%1 of %2 Einträgen angezeigt)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Der zu zahlende Betrag muss größer als 0 sein.</translation>
     </message>
@@ -3919,7 +3945,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Alle</translation>
@@ -3955,12 +3981,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Zeitraum...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Gängigste</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Empfangen über</translation>
     </message>
@@ -4010,7 +4036,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Andere</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Zu suchende Adresse oder Bezeichnung eingeben</translation>
     </message>
@@ -4050,7 +4076,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Transaktionsdetails anzeigen</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Transaktionsverlauf exportieren</translation>
     </message>
@@ -4115,7 +4141,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Speichern des Transaktionsverlaufs nach %1 war erfolgreich.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Zeitraum:</translation>
     </message>
@@ -4170,7 +4196,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Ausgewählter Betrag:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Wallet sichern</translation>
     </message>
@@ -4243,12 +4274,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Befehl ausführen wenn der beste Block wechselt (%s im Befehl wird durch den Hash des Blocks ersetzt)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Unbestätigte für Darksend vorbereitete Ausgabebeträge gefunden, warte bis sie bestätigt sind bevor weitergemacht wird.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In diesem Modus legt -genproclimit fest, wie viele Blöcke sofort erzeugt werden.</translation>
     </message>
@@ -4268,7 +4294,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Abfrage der Peer-Adressen über DNS, falls es wenige Adressen gibt (Standard: 1, außer wenn -connect konfiguriert wurde)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Setze externe Adresse und Port, um diesen Masternode zu erreichen (Beispiel: Adresse:Port)</translation>
     </message>
@@ -4338,12 +4364,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Es muss ein Masternode-Geheimschlüssel (masternodeprivkey) in der Konfiguration angegeben werden. Für weitere Informationen siehe Dokumentation.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(Standard: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Kommandozeilen- und JSON-RPC-Befehle annehmen</translation>
     </message>
@@ -4383,7 +4409,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Kann nicht zerstückeln: keine kompatiblen Eingänge übrig.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Wallet kann nicht auf eine ältere Version herabgestuft werden</translation>
     </message>
@@ -4428,12 +4454,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Beschädigte Blockdatenbank erkannt</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend ist deaktiviert.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Darksend Optionen:</translation>
     </message>
@@ -4513,7 +4534,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Fehler</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Fehler: Zu wenig freier Speicherplatz auf dem Datenträger!</translation>
     </message>
@@ -4543,7 +4564,7 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Wenn &lt;category&gt; nicht angegeben wird, jegliche Debugginginformationen ausgeben.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = Transaktions-Metadaten wie z.B. Kontoinhaber behalten, 2 = Metadaten verwerfen)</translation>
     </message>
@@ -4628,7 +4649,12 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <translation>Datenbankaktivitäten vom Arbeitsspeicher-Pool alle &lt;n&gt; Megabyte auf den Datenträger schreiben (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Unbestätigte für Darksend vorbereitete Ausgabebeträge gefunden, warte bis sie bestätigt sind bevor weitergemacht wird.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
     </message>
@@ -4682,6 +4708,11 @@ Dies kann passieren, wenn einige Dash aus ihrer Wallet bereits ausgegeben wurden
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Verlange hohe Priorität für die Vermittlung von kostenlosen oder mit niedrigen Gebühren versehenen Transaktionen (Standard: %u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Rückverfolgungs- und Debuginformationen an die Konsole senden, anstatt sie in debug.log zu schreiben (Standard: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4748,11 +4779,16 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 kann nur im Standardnetz benutzt werden)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(Standard: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; kann sein:
@@ -4774,7 +4810,7 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.
         <translation>Peer-Adressen immer über DNS abfragen (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>Kann Adresse via -whitebind nicht auflösen: &apos;%s&apos;</translation>
     </message>
@@ -4843,6 +4879,11 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Fehler: ein interner Fehler ist aufgetreten, Details sind in der Datei debug.log</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Fehler: die aktuell gestückelten Inputs können nicht ausgewählt werden</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4885,11 +4926,6 @@ zum Beispiel: alertnotify=echo %%s | mail -s \&quot;Dash Alert\&quot; admin@foo.
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Masternodes mit einer Version welche älter ist als X ignorieren (z.B. Version 70050, Standard: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importiere...</translation>
     </message>
@@ -4939,11 +4975,6 @@ Dash Core wird heruntergefahren.</translation>
         <source>InstantX options:</source>
         <translation>InstantX Optionen:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Unzureichender Kontostand</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4985,7 +5016,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Ungültiger Betrag für -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Die letzte erfolgreiche Darksend-Transaktion ist noch zu neu.</translation>
     </message>
@@ -4995,7 +5026,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Größe des Signaturcaches auf &lt;n&gt; Einträge begrenzen (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>&lt;port&gt;nach JSON-RPC-Verbindungen abhören (Standard: %u oder Testnetz: %u)</translation>
     </message>
@@ -5005,7 +5036,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>&lt;port&gt; nach Verbindungen abhören (Standard: %u oder Testnetz: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Masternodes über Masternode-Konfiguration sperren (Standard: %u)</translation>
     </message>
@@ -5070,12 +5101,17 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Debugausgaben einen Zeitstempel voranstellen (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Einen Thread starten, der periodisch die Wallet auf den Datenträger sichert (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Rückverfolgungs- und Debuginformationen in debug.log schreiben (Standard: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Wenn möglich als gebührenfreie Transaktion versenden (Standard: %u)</translation>
     </message>
@@ -5090,12 +5126,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Privater Serverschlüssel (Standard: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Zeitüberschreitung der Sitzung, bitte erneut abschicken.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: %u)</translation>
     </message>
@@ -5115,7 +5146,12 @@ Dash Core wird heruntergefahren.</translation>
         <translation>DB_PRIVATE-Flag in der Wallet-Datenbankumgebung setzen (Standard: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Zeitüberschreitung der Signierung.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Konfigurationsdatei festlegen (Standard: %s)</translation>
     </message>
@@ -5190,7 +5226,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Die Wallet musste neu geschrieben werden. Bitte das Programm neu starten um den Vorgang abzuschließen</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation>Warnung: Veraltetes Argument -benchmark wird ignoriert, bitte -debug=bench verwenden.</translation>
     </message>
@@ -5205,15 +5241,40 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Versuche erneut...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Masternode-Geheimschlüssel (masternodeprivkey) ist ungültig. Siehe Dokumentation. </translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(muss für Standardnetz 9999 sein)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Kann keinen zufällig ausgewählten Masternode finden</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Währen der Synchronisierung kann nicht gemixt werden.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>masternode.conf konnte nicht analysiert werden</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation>Ungültige Netzmaske für -whitelist angegeben: &apos;%s&apos;</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Ungültige Portnummer in masternode.conf</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5250,7 +5311,12 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Letzte Darksend-Transaktion ist noch zu neu.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Zeile: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Lade Adressen...</translation>
     </message>
@@ -5269,6 +5335,11 @@ Dash Core wird heruntergefahren.</translation>
         <source>Loading masternode cache...</source>
         <translation>Lade Masternode-Cache...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Lade Masternode Zahlungs-Cache...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5369,6 +5440,11 @@ Dash Core wird heruntergefahren.</translation>
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wieder aufbauen</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>P2P Netzwerk-Alarme empfangen und anzeigen (Standard: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5395,17 +5471,17 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Als Hintergrunddienst ausführen und Befehle annehmen</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <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>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Sitzung ist nicht vollständig!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Zeitüberschreitung der Sitzung.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <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>
@@ -5435,12 +5511,7 @@ Dash Core wird heruntergefahren.</translation>
         <translation>Signierung fehlgeschalgen.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Zeitüberschreitung der Signierung, bitte erneut abschicken.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Signierung der Transaktion fehlgeschlagen</translation>
     </message>
@@ -5589,6 +5660,11 @@ Dash Core wird heruntergefahren.</translation>
         <source>Wallet options:</source>
         <translation>Wallet-Optionen:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Fensterüberschrift des Wallet</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
diff --git a/src/qt/locale/dash_es.ts b/src/qt/locale/dash_es.ts
index e1b59fc6560a..cc40d9bee027 100644
--- a/src/qt/locale/dash_es.ts
+++ b/src/qt/locale/dash_es.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Monedero</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Nodo</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Vista general</translation>
     </message>
@@ -743,7 +743,7 @@ Dirección: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Alerta de red</translation>
     </message>
@@ -832,8 +832,8 @@ Dirección: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Rondas de Darksend</translation>
+        <source>DS Rounds</source>
+        <translation>Rondas de DS</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -952,13 +952,13 @@ Dirección: %4
         <translation>Puede variar +/- %1 duff(s) por entrada.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
@@ -1430,12 +1430,7 @@ Dirección: %4
         <translation>(0 = automático, &lt;0 = dejar libres ese número de núcleos)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Esta opción determina la cantidad de nodos maestros únicos por los que circulará una entrada para volverse anónima. A mayor número de rondas para dificultar su rastreo, mayor grado de privacidad tendrá,, pero también implica un coste mayor de comisiones.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Rondas de Darksend a usar</translation>
     </message>
@@ -1455,7 +1450,12 @@ Dirección: %4
         <translation>&amp;Monedero</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>Si desactiva el gasto del cambio sin confirmar, el cambio de una transacción&lt;br/&gt; no se podrá utilizar hasta que dicha transacción tenga al menos una confirmación.&lt;br/&gt; Esto también afecta al cómputo de su saldo.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Aceptar conexiones desde el exterior</translation>
     </message>
@@ -1480,7 +1480,12 @@ Dirección: %4
         <translation>Experto</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Esta opción determina la cuantía de nodos maestros distintos a través de los cuales circulará una entrada para hacerla anónima.&lt;br/&gt;Cuantas más rondas se realicen para su anonimato mayor será el grado de privacidad, pero cuesta a su vez más comisiones.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Mostrar o no funcionalidad de Coin Control.</translation>
     </message>
@@ -1490,12 +1495,7 @@ Dirección: %4
         <translation>Activar funcionalidad de &amp;coin control</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Si desactiva el gasto del cambio no confirmado, no se podrá usar el cambio de una transacción hasta que se alcance al menos una confirmación. Esto afecta también a cómo se calcula su saldo.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Gastar cambio no confirmado</translation>
     </message>
@@ -1598,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Número de decimales</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 de terceros (p.ej. un explorador de bloques) que aparecen en la pestaña de transacciones como elementos del menú contextual. El %s en la URL es reemplazado por el hash de la transacción. Se pueden separar múltiples URLs con una barra vertical |.</translation>
@@ -1633,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Cancelar</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>predeterminado</translation>
     </message>
@@ -1643,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>ninguna</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Confirme el restablecimiento de las opciones</translation>
     </message>
@@ -1764,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Estado</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Activada/Desactivada</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Completado:</translation>
     </message>
@@ -1779,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo de Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Cuantía y Rondas:</translation>
     </message>
@@ -1804,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>n/d</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1822,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Comenzar/Parar Mezclado</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Las denominaciones que envió al Nodo Maestro.&lt;br&gt;Para poder mezclar, otros usuarios deben enviar exactamente las mismas denominaciones.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Último Mensaje)</translation>
     </message>
@@ -1852,67 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Reiniciar</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>desincronizado</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Desactivado</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Iniciar Mezclador Darksend</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Parar Mezclador Darksend</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>No se detectaron entradas</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n Ronda</numerusform><numerusform>%n Rondas</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Se han encontrado salidas denominadas sin confirmar, se esperará a su confirmación para recalcular.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>No hay suficientes entradas compatibles para hacer anónimas &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;se harán en su lugar &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Avance total</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Denominadas</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Anónimas</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>Progreso: %1% (entradas tienen una media de %2 de %n rondas)</numerusform><numerusform>Progreso: %1% (entradas tienen una media de %2 de %n rondas)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Las entradas denominadas tienen %5 de %n rondas de media</numerusform><numerusform>Las entradas denominadas tienen %5 de %n rondas de media</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Se encontraron suficientes entradas compatibles para hacer anónimo %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>No hay suficientes entradas compatibles para hacer anónimos &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;Se harán anónimos &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; en su lugar</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Mezcladas</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Activado</translation>
     </message>
@@ -1934,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend se reinició correctamente.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Si no desea ver las comisiones/transacciones internas de Darksend seleccione &quot;Más Habitual&quot; como Tipo en la pestaña de &quot;Transacciones&quot;.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend requiere al menos %1 para su uso.</translation>
     </message>
@@ -2087,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Cuantía</translation>
     </message>
@@ -2097,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Introduzca una dirección Dash (e.g. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 d</translation>
     </message>
@@ -2178,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Información</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Recuento de Nodos Maestros</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>General</translation>
     </message>
@@ -2291,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Cadena de bloques</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Número de Nodos Maestros</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Consola</translation>
     </message>
@@ -2559,8 +2581,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Reutilizar una de las direcciones previamente usadas para recibir. Reutilizar direcciones conlleva problemas de seguridad y privacidad. No lo emplee a menos que regenere una solicitud de pago anterior.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Reutilizar una de las direcciones de recepción previamente usadas.&lt;br&gt;Esta acción conlleva problemas de privacidad y seguridad.&lt;br&gt;No la use salvo si vuelve a generar una solicitud de pago creada con anterioridad.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2569,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Un mensaje opcional para adjuntar a la solicitud de pago, el cual se muestra cuando se abre la solicitud. Nota: El mensaje no se enviará con el pago por la red Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Mensaje:</translation>
     </message>
@@ -2585,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Etiqueta opcional para asociar con la nueva dirección de recepción.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Un mensaje opcional para adjuntar con la solicitud de pago, el cual aparecerá cuando ésta sea abierta.&lt;br&gt;Nota: El mensaje no se enviará con el pago a la red Dash.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Utilice este formulario para solicitar pagos. Todos los campos son &lt;b&gt;opcionales&lt;/b&gt;.</translation>
     </message>
@@ -2771,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Enviar Dash</translation>
@@ -2878,32 +2904,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo es de 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión, mientras que en el &quot;al menos&quot; se pagan 1000 duffs. Para transacciónes más grandes de un kilobyte ambas se pagan por kilobyte.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo ocupa 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión,&lt;br /&gt;mientras que &quot;como mínimo&quot; paga 1000 duffs. Para transacciones mayores de un kilobyte ambas pagan por kilobyte.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>por kilobyte</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo ocupa 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión,&lt;br /&gt;mientras que &quot;total como mínimo&quot; paga 1000 duffs. Para transacciones mayores de un kilobyte ambas pagan por kilobyte.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Si la comisión personalizada se establece en 1000 duffs y la transacción sólo es de 250 bytes, entonces &quot;por kilobyte&quot; sólo se pagan 250 duffs de comisión, mientras que en el &quot;total al menos&quot; se pagan 1000 duffs. Para transacciónes más grandes de un kilobyte ambas se pagan por kilobyte.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Pagar sólo la comisión mínima está bien mientras el volumen de transacciones sea menor al espacio en los bloques.&lt;br /&gt;No obstante, tenga en cuenta que esto puede acabar en una transacción que nunca se confirme una vez haya más demanda de transacciones dash a la procesable por la red.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>total al menos</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>por kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Pagar sólo la comisión mínima está bien mientras el volumen de transacciones sea menor al del espacio en los bloques. Pero sea consciente de que esto puede acabar en una transacción que nunca se confirme una vez haya más demanda de transacciones de dash que las procesables por la red.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>total al menos</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(leer la sugerencia)</translation>
     </message>
@@ -2918,7 +2944,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Personalizada:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(La comisión inteligente no está aún inicializada. Esto habitualmente tarda unos pocos bloques...)</translation>
     </message>
@@ -2993,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Copiar cantidad</translation>
     </message>
@@ -3080,21 +3106,16 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Cuantía Total %1 (= %2)</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Cuantía Total = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>o</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Confirmar el envío de dashs</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Una comisión %1 veces más alta que %2 por kB se considera extremadamente elevada.</translation>
     </message>
@@ -3109,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>La dirección de recepción no es válida, compruébela de nuevo.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(%1 de %2 registros mostrados)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>La cuantía a pagar debe ser mayor que 0.</translation>
     </message>
@@ -3919,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Todo</translation>
@@ -3955,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Rango...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Más Habitual</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Recibido con</translation>
     </message>
@@ -4010,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Otra</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Introduzca una dirección o etiqueta que buscar</translation>
     </message>
@@ -4050,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Mostrar detalles de la transacción</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Exportar historial de transacciones</translation>
     </message>
@@ -4115,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>El historial de transacciones se guardó correctamente en %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Rango:</translation>
     </message>
@@ -4170,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Exportar a un archivo los datos de esta pestaña</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Cuantía seleccionada:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Realizar Copia de Seguridad del Monedero</translation>
     </message>
@@ -4243,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Se han encontrado salidas denominadas sin confirmar, se esperará a su confirmación para continuar.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>En este modo -genproclimit controla cuántos bloques se generan de inmediato.</translation>
     </message>
@@ -4268,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Petición de direcciones de pares mediante búsqueda de DNS , si las direcciones son pocas (predeterminado: 1 salvo con -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Ajustar dirección externa:puerto para acceder a este nodo maestro (p.ej. dirección:puerto)</translation>
     </message>
@@ -4338,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Debe declarar la variable masternodeprivkey o clave privada para el nodo maestro en la configuración. Por favor, consulte la documentación para obtener ayuda.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(predeterminado: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceptar comandos de la consola y JSON-RPC
 </translation>
@@ -4384,7 +4410,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>No se puede denominar: no quedan entradas compatibles.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>No se puede regresar a una versión anterior del monedero</translation>
     </message>
@@ -4429,12 +4455,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Corrupción de base de datos de bloques detectada.</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend está desactivado.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Opciones de Darksend:</translation>
     </message>
@@ -4514,7 +4535,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Error</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Error: ¡Espacio en disco bajo!</translation>
     </message>
@@ -4544,7 +4565,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Si no se proporciona &lt;category&gt;, mostrar toda la información de depuración</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = conservar metadatos de tx e.g. propietario de la cuenta e información de la solicitud de pago, 2 = descartar metadatos de tx)</translation>
     </message>
@@ -4629,7 +4650,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Volcar la actividad de la base de datos desde el grupo de memoria al registro en disco cada &lt;n&gt; megabytes (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Se han encontrado salidas denominadas sin confirmar, se esperará a su confirmación para continuar.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4, predeterminado: %u)</translation>
     </message>
@@ -4683,6 +4709,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Requerir una prioridad alta para transmitir transacciones gratuitas o con bajas comisiones (predeterminado: %u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Enviar info de traza/depuración a la consola en lugar de al archivo debug.log (predeterminado: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4750,11 +4781,16 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 sólo se puede usar en la red principal)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(predeterminado: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; puede ser:
@@ -4776,7 +4812,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Solicitar siempre direcciones de pares mediante búsqueda de DNS (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>No se puede resolver la dirección -whitebind: &apos;%s&apos;</translation>
     </message>
@@ -4845,6 +4881,11 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Error: Se produjo un error interno fatal, vea debug.log para más detalles</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Error: No se pueden seleccionar las entradas denominadas actuales</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4887,11 +4928,6 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Ignorar nodos maestros cuya versión sea inferior a la indicada (ejemplo: 70050; predeterminado: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importando...</translation>
     </message>
@@ -4940,11 +4976,6 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <source>InstantX options:</source>
         <translation>Opciones de InstantX:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Fondos insuficientes</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4986,7 +5017,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Cuantía inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>La última acción de Darksend exitosa era demasiado reciente.</translation>
     </message>
@@ -4996,7 +5027,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Limitar el tamaño de la caché de firma a &lt;n&gt; registros (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Escuchar a conexiones JSON-RPC en el &lt;port&gt; (predeterminado: %u ó testnet: %u)</translation>
     </message>
@@ -5006,7 +5037,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Escuchar a las conexiones en el &lt;port&gt; (predeterminado: %u ó testnet: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Asegurar nodos maestros a partir del archivo de configuración del nodo maestro (predeterminado: %u)</translation>
     </message>
@@ -5071,12 +5102,17 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Anteponer marca temporal a la salida para depuración (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Correr un hilo para volcar el monedero periódicamente (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Enviar info de traza/depuración al archivo debug.log (predeterminado: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Enviar las transacciones como transacciones con cero comisiones si es posible (predeterminado: %u)</translation>
     </message>
@@ -5091,12 +5127,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Clave privada del servidor (predeterminado: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>La sesión caducó, por favor reenvíela de nuevo.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Establecer el tamaño del grupo de claves a &lt;n&gt; (predeterminado: %u)</translation>
     </message>
@@ -5116,7 +5147,12 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Establece la opción DB_PRIVATE en el entorno de base de datos del monedero (predeterminado: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>El tiempo máximo para firma se agotó.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Indicar el archivo de configuración (predeterminado: %s)</translation>
     </message>
@@ -5191,7 +5227,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>El monedero se ha de reescribir: reinicie Dash Core para completarlo</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation>Aviso: El argumento no permitido -benchmark se ignoró, use -debug=bench.</translation>
     </message>
@@ -5206,15 +5242,40 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Se volverá a intentar...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>La clave prinvada del nodo maestro no es válida. Por favor, consulte la  documentación.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(debe ser 9999 para la red principal)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>No se pudo encontrar un Nodo Maestro aleatorio.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>No se puede mezclar mientras la sincronización esté en curso.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>No se pudo interpretar masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation>La máscara de red especificada en -whitelist no es válida: &apos;%s&apos; </translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Se detectó un puerto no válido en masternode.conf</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5251,7 +5312,12 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>El último Darksend era demasiado reciente.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Línea: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Cargando direcciones...</translation>
     </message>
@@ -5270,6 +5336,11 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <source>Loading masternode cache...</source>
         <translation>Cargando caché de nodos maestros...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Cargando caché de pago del nodo maestro...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5370,6 +5441,11 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir el índice de la cadena de bloques a partir de los archivos blk000??.dat actuales</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Recibir y mostrar avisos de la red P2P (predeterminado: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5396,17 +5472,17 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>Ejecutar en segundo plano como daemon y aceptar comandos</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>¡La sesión no está completa!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>La sesión caducó.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
     </message>
@@ -5436,12 +5512,7 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <translation>No se pudo firmar.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>La sesión de firma ha caducado, por favor inténtelo de nuevo.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Falló la firma de la transacción</translation>
     </message>
@@ -5590,6 +5661,11 @@ por ejemplo: alertnotify=echo %%s | mail -s &quot;Alerta de Dash&quot; admin@foo
         <source>Wallet options:</source>
         <translation>Opciones de monedero:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Título de la ventana del monedero</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
diff --git a/src/qt/locale/dash_fi.ts b/src/qt/locale/dash_fi.ts
index 69b5e654e684..6e66446b6370 100644
--- a/src/qt/locale/dash_fi.ts
+++ b/src/qt/locale/dash_fi.ts
@@ -44,7 +44,7 @@
     <message>
         <location line="+3"/>
         <source>&amp;Export</source>
-        <translation>&amp;Vie...</translation>
+        <translation>Vi&amp;e...</translation>
     </message>
     <message>
         <location line="+20"/>
@@ -64,7 +64,7 @@
     <message>
         <location line="+5"/>
         <source>C&amp;hoose</source>
-        <translation>&amp;Valitse</translation>
+        <translation>V&amp;alitse</translation>
     </message>
     <message>
         <location line="+6"/>
@@ -89,7 +89,7 @@
     <message>
         <location line="+6"/>
         <source>&amp;Copy Address</source>
-        <translation>&amp;Kopioi Osoite</translation>
+        <translation>Kopioi &amp;Osoite</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Lompakko</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Solmu</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Yleisnäkymä</translation>
     </message>
@@ -322,7 +322,7 @@
     <message>
         <location line="+10"/>
         <source>&amp;Send</source>
-        <translation>&amp;Lähetä</translation>
+        <translation>L&amp;ähetä</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -362,7 +362,7 @@
     <message>
         <location line="+3"/>
         <source>&amp;About Dash Core</source>
-        <translation>&amp;Tietoja Dash Core:sta</translation>
+        <translation>Tietoja &amp;Dash Core:sta</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -458,7 +458,7 @@
     <message>
         <location line="+1"/>
         <source>&amp;Verify message...</source>
-        <translation>Tarkista &amp;Viesti...</translation>
+        <translation>&amp;Tarkista Viesti...</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -528,7 +528,7 @@
     <message>
         <location line="+1"/>
         <source>Show Automatic &amp;Backups</source>
-        <translation>Näytä Automaattiset &amp;Varmistukset</translation>
+        <translation>&amp;Näytä Automaattiset Varmistukset</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -548,7 +548,7 @@
     <message>
         <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
-        <translation>&amp;Vastaanottavat Osoitteet...</translation>
+        <translation>Va&amp;staanottavat Osoitteet...</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -743,7 +743,7 @@ Osoite: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Verkkohälytys</translation>
     </message>
@@ -832,8 +832,8 @@ Osoite: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Darksend Kierrokset</translation>
+        <source>DS Rounds</source>
+        <translation>DS Kierrokset</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -949,16 +949,16 @@ Osoite: %4
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation>Voi vaihdella +/- %1 duff(s) per syöte.</translation>
+        <translation>Voi vaihdella +/- %1 duffs per syöte.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>e/s</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>keskisuuri</translation>
     </message>
@@ -1248,7 +1248,7 @@ Osoite: %4
         <location line="+5"/>
         <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation>(%1-bitti)</translation>
+        <translation>(%1-bittinen)</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -1268,7 +1268,7 @@ Osoite: %4
     <message>
         <location line="+1"/>
         <source>command-line options</source>
-        <translation>komentorivi parametrit</translation>
+        <translation>komentorivi valintaparametrit</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -1431,12 +1431,7 @@ Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd
         <translation>(0 = auto, &lt;0 = jätä näin monta prosessorin ydintä vapaaksi)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tämä asetus määrittää kuinka monen erillisen masternoden kautta syötteen anonymisointi tehdään. Mitä enemmän anonymisoinnin kierroksia, sen parempi yksityisyys, mutta se myös maksaa enemmän siirtomaksuina.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Kuinka montaa Darksend kierrosta käytetään</translation>
     </message>
@@ -1456,7 +1451,12 @@ Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd
         <translation>&amp;Lompakko</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>Jos poistat vahvistamattomien vaihtorahojen käytön, siirtotapahtuman&lt;br/&gt;vaihtorahaa ei voida käyttää ennen vähintään yhtä vahvistusta.&lt;br/&gt;Tämä vaikuttaa myös kuinka saldosi lasketaan.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Hyväksy yhteydet ulkopuolelta</translation>
     </message>
@@ -1481,7 +1481,12 @@ Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd
         <translation>Expertti</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Tämä asetus määrittää kuinka monen erillisen masternoden kautta syötteen anonymisointi tehdään.&lt;br/&gt;Mitä enemmän anonymisoinnin kierroksia, sen parempi yksityisyys, mutta se myös maksaa enemmän siirtomaksuina.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Näytetäänkö kolikkokontrollin ominaisuuksia vai ei</translation>
     </message>
@@ -1491,12 +1496,7 @@ Varoitus: Jos käytät käyttöjärjestelmää (Live os) suoraan usb, dvd tai cd
         <translation>Ota käytöön &amp;kolikkokontrolli ominaisuudet</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Jos poistat vahvistamattomien vaihtorahojen käytön, siirtotapahtuman vaihtorahaa ei voida käyttää ennen vähintään yhtä vahvistusta. Tämä vaikuttaa myös kuinka saldosi lasketaan.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Käytä vahvistamattomia vaihtorahoja</translation>
     </message>
@@ -1585,7 +1585,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation>&amp;Käyttöliittymän Teema:</translation>
+        <translation>Käyttöliittymän Teema:</translation>
     </message>
     <message>
         <location line="+21"/>
@@ -1599,6 +1599,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Desimaalit</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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>Ulkopuoliset URL-osoitteet (esim. lohkoselain,) jotka esiintyvät tapahtumat-välilehdellä valikossa. %s URL-osoitteessa korvataan siirtotunnuksella. Useampi URL-osoite on eroteltu pystyviivalla |.</translation>
@@ -1621,7 +1626,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+3"/>
         <source>&amp;Reset Options</source>
-        <translation>&amp;Palauta Asetukset</translation>
+        <translation>Palauta &amp;Asetukset</translation>
     </message>
     <message>
         <location line="+61"/>
@@ -1634,7 +1639,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Peruuta</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>oletus</translation>
     </message>
@@ -1644,7 +1649,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>ei mitään</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Vahvista asetusten palautus</translation>
     </message>
@@ -1682,7 +1687,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="+1015"/>
         <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
-        <translation>Näytetyt tiedot eivät välttämättä ole ajan tasalla. Lompakkosi synkronoituu automaattisesti Dash verkkoon kun yhteys on muodostettu, mutta tämä prosessi ei vielä ole valmis.</translation>
+        <translation>Näytetyt tiedot eivät välttämättä ole ajan tasalla.&lt;br&gt;Lompakkosi synkronoituu automaattisesti Dash verkkoon kun&lt;br&gt;yhteys on muodostettu, mutta tämä prosessi ei vielä ole valmis.</translation>
     </message>
     <message>
         <location line="-843"/>
@@ -1702,7 +1707,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
-        <translation>Vahvistamattomien siirtotapahtumien summa, jota ei vielä lasketa käytettävissä olevaan saldoon</translation>
+        <translation>Vahvistamattomien siirtotapahtumien summa,&lt;br&gt;jota ei vielä lasketa käytettävissä olevaan saldoon</translation>
     </message>
     <message>
         <location line="+112"/>
@@ -1765,12 +1770,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Tila:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Käytössä/Ei käytössä</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Valmiina:</translation>
     </message>
@@ -1780,12 +1785,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend Saldo:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Määrä ja Kierrokset:</translation>
     </message>
@@ -1805,9 +1805,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>e/s</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1823,12 +1824,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Käynnistä/Lopeta Sekoitus</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Masternodelle lähetetyt denominoinnit.&lt;br&gt;Jotta sekoitus onnistuisi, täytyy muiden käyttäjien käyttää saman arvoisia denominointeja.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Viimeisin Viesti)</translation>
     </message>
@@ -1853,67 +1854,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Nollaus</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>Ei ajan tasalla</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Ei käytössä</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Käynnistä Darksend Sekoitus</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Lopeta Darksend Sekoitus</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Syötteitä ei havaittu</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n Kierros</numerusform><numerusform>%n Kierrosta</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Löytyi vahvistamattomia syötteitä, odotetaan että ne vahvistetaan uudelleen laskentaa varten.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Ei tarpeeksi yhteensopivia syötteitä anonymisointiin &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;anonymisoidaan &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; sen sijaan</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Edistyminen</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Denominoitu</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Anonymisoitu</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>Valmiina: %1% (syötteillä on keskimäärin %2 kierrosta %n:sta kierroksesta)</numerusform><numerusform>Valmiina: %1% (syötteillä on keskimäärin %2 kierrosta %n:sta kierroksesta)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Denominoiduilla syötteillä on keskimäärin %5 / %n kierrosta</numerusform><numerusform>Denominoiduilla syötteillä on keskimäärin %5 / %n kierrosta</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Löytyi tarpeeksi yhteensopivia syötteitä anonymisointiin %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Ei tarpeeksi yhteensopivia syötteitä anonymisointiin &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;anonymisoidaan &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; sen sijaan</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Sekoitettu</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Käytössä</translation>
     </message>
@@ -1935,7 +1952,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend nollattu onnistuneesti.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Jos et halua nähdä sisäisiä Darksend sekoituksen kuluja/tapahtumia, valitse &quot;Yleiset&quot; tyypiksi siirtotapahtumissa.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksendin käyttö vaatii vähintään %1.</translation>
     </message>
@@ -2072,7 +2094,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation>Osoite/Insäntänimi</translation>
+        <translation>Osoite/Isäntänimi</translation>
     </message>
     <message>
         <location line="+0"/>
@@ -2082,13 +2104,13 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+0"/>
         <source>Ping Time</source>
-        <translation>Vastausaika</translation>
+        <translation>Ping aika</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Määrä</translation>
     </message>
@@ -2098,7 +2120,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Syötä Dash osoite (esim. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 d</translation>
     </message>
@@ -2179,12 +2201,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>T&amp;ietoa</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Masternodet määrä</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Yleinen</translation>
     </message>
@@ -2292,7 +2309,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Lohkoketju</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Masternodet määrä</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsoli</translation>
     </message>
@@ -2401,7 +2423,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+23"/>
         <source>Ping Time</source>
-        <translation>Vastausaika</translation>
+        <translation>Ping aika</translation>
     </message>
     <message>
         <location line="+40"/>
@@ -2436,7 +2458,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+19"/>
         <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
-        <translation>Painikkeet käynnistävät lompakon korjauksen komentorivin valintoja käyttäen, korjaa korruptoituneen lohkoketjun tai puuttuvat / vanhentuneet tapahtumat.</translation>
+        <translation>Painikkeet käynnistävät lompakon korjauksen komentorivin valintoja käyttäen.
+Näillä toiminnoilla voit korjata korruptoituneen lohkoketjun tai puuttuvat/vanhentuneet tapahtumat.</translation>
     </message>
     <message>
         <location line="+16"/>
@@ -2560,8 +2583,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Uudelleenkäytä yksi vanhoista vastaanottavista osoitteista. Uudelleenkäyttössä on turvallisuus- ja yksityisyysongelmia. Älä käytä tätä ellet ole uudelleenluomassa aikaisempaa maksupyyntöä.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Uudelleenkäytä yksi vanhoista vastaanottavista osoitteista.&lt;br&gt;Uudelleenkäyttössä on turvallisuus- ja yksityisyysongelmia.&lt;br&gt;Älä käytä tätä ellet ole uudelleenluomassa aikaisempaa maksupyyntöä.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2570,14 +2593,13 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation>Valinnainen viesti liitettäväksi maksupyyntöön, joka näytetään kun pyyntö on avattu. Huomio: Viestiä ei lähetetä maksun mukana Dash verkkoon.</translation>
+        <translation>Valinnainen viesti liitettäväksi maksupyyntöön, joka näytetään kun pyyntö on avattu.&lt;br&gt;Huomio: Viestiä ei lähetetä maksun mukana Dash verkkoon.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
-        <translation>&amp;Viesti:</translation>
+        <translation>Vi&amp;esti:</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -2586,7 +2608,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Valinnainen nimi liitetään uuteen vastaanottavaan osoitteeseen.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Valinnainen viesti liitettäväksi maksupyyntöön, joka näytetään kun pyyntö on avattu.&lt;br&gt;Huomio: Viestiä ei lähetetä maksun mukana Dash verkkoon.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Käytä tätä lomaketta maksupyyntöihin. Kaikki kentät ovat &lt;b&gt;valinnaisia&lt;/b&gt;.</translation>
     </message>
@@ -2639,7 +2666,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+17"/>
         <source>Remove the selected entries from the list</source>
-        <translation>Poista valitut alkiot listasta</translation>
+        <translation>Poista valitut merkinnät listasta</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2772,10 +2799,10 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
-        <translation>Lähetä Dasheja</translation>
+        <translation>Lähetä</translation>
     </message>
     <message>
         <location line="+76"/>
@@ -2879,32 +2906,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duffs ja siirtotapahtuma on vain 250 tavua, tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;vähintään&quot; maksaa 1000 duffs. Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duff ja siirtotapahtuma on vain 250 tavua,&lt;br /&gt;tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;vähintään&quot; maksaa 1000 duffs.&lt;br /&gt;Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>per kilotavu</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duff ja siirtotapahtuma on vain 250 tavua,&lt;br /&gt;tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;yhteensä vähintään&quot; maksaa 1000 duffs.&lt;br /&gt;Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Jos mukautettu siirtomaksu on asetettu 1000 duffs ja siirtotapahtuma on vain 250 tavua, tällöin &quot;per kilotavu&quot; maksaa vain 250 duffs siirtomaksun, kun taas &quot;yhteensä vähintään&quot; maksaa 1000 duffs. Siirtotapahtumat jotka ovat isompia kuin kilotavu, molemmat maksaa &quot;per kilotavu&quot;.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Minimi siirtomaksun maksaminen on ok niin kauan kun siirtotapahtumien määrä on pienempi kuin tila lohkoissa.&lt;br /&gt;Mutta ota huomioon että tämä voi johtaa siirtotapahtumaan jota ei vahvisteta koskaan, jos siirtotapahtumia on enemmän kuin verkko voi käsitellä.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>yhteensä vähintään</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>per kilotavu</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Minimi siirtomaksun maksaminen on ok niin kauan kun siirtotapahtumien määrä on pienempi kuin tila lohkoissa. Mutta ota huomioon että tämä voi johtaa siirtotapahtumaan jota ei vahvisteta koskaan, jos siirtotapahtumia on enemmän kuin verkko voi käsitellä.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>yhteensä vähintään</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(lue vinkki)</translation>
     </message>
@@ -2919,7 +2946,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Mukautettu:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(Älykästä siirtomaksua ei ole alustettu vielä. Tämä kestää yleensä muutaman lohkon...)</translation>
     </message>
@@ -2966,7 +2993,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+3"/>
         <source>Clear &amp;All</source>
-        <translation>&amp;Tyhjennä Kaikki</translation>
+        <translation>T&amp;yhjennä Kaikki</translation>
     </message>
     <message>
         <location line="+14"/>
@@ -2994,7 +3021,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Kopioi määrä</translation>
     </message>
@@ -3081,21 +3108,16 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Yhteensä %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>tai</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Määrä yhteensä = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Hyväksy lähettäminen</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Siirtomaksu %1 kertaa korkeampi kuin %2 per kB on erittäin korkea siirtomaksu.</translation>
     </message>
@@ -3110,7 +3132,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Vastaanottajan osoite on virheellinen, tarkista osoite.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(Näytetään %1 / %2 merkintää)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Maksettavan summan tulee olla suurempi kuin 0.</translation>
     </message>
@@ -3224,7 +3251,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="+521"/>
         <location line="+536"/>
         <source>A&amp;mount:</source>
-        <translation>M&amp;äärä:</translation>
+        <translation>&amp;Määrä:</translation>
     </message>
     <message>
         <location line="-1041"/>
@@ -3344,7 +3371,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+3"/>
         <source>Sign &amp;Message</source>
-        <translation>Allekirjoita &amp;viesti</translation>
+        <translation>Allekirjoita &amp;Viesti</translation>
     </message>
     <message>
         <location line="+14"/>
@@ -3355,7 +3382,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="+3"/>
         <location line="+143"/>
         <source>Clear &amp;All</source>
-        <translation>&amp;Tyhjennä Kaikki</translation>
+        <translation>T&amp;yhjennä Kaikki</translation>
     </message>
     <message>
         <location line="-84"/>
@@ -3869,7 +3896,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+2"/>
         <source>Darksend Create Denominations</source>
-        <translation>Darksend denominoinnin luonti</translation>
+        <translation>Darksend denominointien luonti</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3920,7 +3947,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Kaikki</translation>
@@ -3956,12 +3983,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Alue...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
-        <translation>Yleisin</translation>
+        <translation>Yleiset</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Vastaanotettu</translation>
     </message>
@@ -3983,7 +4010,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+1"/>
         <source>Darksend Create Denominations</source>
-        <translation>Darksend denom. luonti</translation>
+        <translation>Darksend denominointien luonti</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4011,7 +4038,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Muu</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Anna etsittävä osoite tai tunniste</translation>
     </message>
@@ -4051,7 +4078,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Näytä siirtotapahtuman yksityiskohdat</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Vie siirtotapahtumien historia</translation>
     </message>
@@ -4116,7 +4143,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Siirtotapahtumien historia tallennettiin onnistuneesti paikkaan %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Alue:</translation>
     </message>
@@ -4171,7 +4198,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Vie tällä hetkellä valitun välilehden tiedot tiedostoon</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Valittu määrä:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Varmuuskopioi lompakko</translation>
     </message>
@@ -4244,12 +4276,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Suorita käsky kun paras lohko muuttuu (%s cmd on korvattu lohko tarkisteella)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Löytyi vahvistamattomia syötteitä, odotetaan että ne vahvistetaan.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Tässä moodissa -genproclimit ohjaa kuinka monta lohkoa luodaan välittömästi.</translation>
     </message>
@@ -4269,7 +4296,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Tiedustele vertaisverkon osoitteita DNS hakua käyttäen jos osoitteita ei ole riittävästi (oletus: 1 paitsi jos -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Aseta ulkoinen osoite:portti tälle masternodelle (esim: osoite:portti)</translation>
     </message>
@@ -4326,7 +4353,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
-        <translation>Varoitus: Virhe luettaessa wallet.dat lompakkotiedostoa. Kaikki avaimet luettiin onnistuneesti, mutta siirtohistoria tai osoitekirja saattavat olla kadonneet tai virheellisiä.</translation>
+        <translation>Varoitus: Virhe luettaessa wallet.dat lompakkotiedostoa. Kaikki avaimet luettiin onnistuneesti, mutta siirtohistorian tai osoitekirjan merkinnät saattavat olla kadonneet tai virheellisiä.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -4339,12 +4366,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Sinun täytyy määritellä masternodeprivkey asetustiedostoon. Katso lisätietoja dokumentaatiosta.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(oletus: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Hyväksy merkkipohjaiset ja JSON-RPC käskyt</translation>
     </message>
@@ -4384,7 +4411,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Ei voida denominoida: yhteensopivia syötteitä ei ole jäljellä.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Et voi päivittää lompakkoasi vanhempaan versioon</translation>
     </message>
@@ -4429,12 +4456,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Vioittunut lohkotietokanta havaittu</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend on pois käytöstä.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Darksend valinnat:</translation>
     </message>
@@ -4514,7 +4536,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Virhe</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Virhe: Levytila on alhainen!</translation>
     </message>
@@ -4526,7 +4548,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
-        <translation>Virhe: Sinulla on jo odottavia syötteitä Darksend varannossa</translation>
+        <translation>Virhe: Sinulla on jo odottavia merkintöjä Darksend varannossa</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4544,7 +4566,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Jos &lt;kategoria&gt; ei ole toimitettu, tulosta kaikki debuggaustieto.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = pidä tx meta data esim. tilin omistaja ja maksupyyntö tiedot, 2 = poista tx meta data)</translation>
     </message>
@@ -4629,7 +4651,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Aja tietokannan tapahtumat muistivarannosta kovalevylogiin joka &lt;n&gt; megatavu (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Löytyi vahvistamattomia syötteitä, odotetaan että ne vahvistetaan.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Kuinka vaativa lohkon vahvistus -checkblocks on (0-4, oletus: %u)</translation>
     </message>
@@ -4651,7 +4678,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+2"/>
         <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
-        <translation>Ylläpidä täyttä siirtotapahtumien indeksiä, jota käyttää getrawtransaction rpc call (oletus: %u)</translation>
+        <translation>Ylläpidä täyttä siirtotapahtumien indeksiä, jota käyttää getrawtransaction rpc kutsu (oletus: %u)</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -4683,6 +4710,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Vaadi korkea prioriteetti välitettäville ilmaisille tai matalan siirtomaksun siirtotapahtumille (oletus: %u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Lähetä jäljitys/debug tiedot konsoliin debug.log tiedoston sijaan (default: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4698,7 +4730,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
         <translation>Tämä ohjelma sisältää OpenSSL projektin OpenSSL työkalupakin &lt;https://www.openssl.org/&gt; sekä Eric Youngin kehittämän salausohjelmiston ja Thomas Bernardin kehittämän UPnP ohjelmiston.
 
-Käännös päivitetty: 28.6.2015 by AjM.</translation>
+Käännös päivitetty: 3.8.2015 by AjM.</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -4752,11 +4784,16 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 voidaan käyttää vain pääverkossa)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(oletus: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; voi olla:
@@ -4778,7 +4815,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Tiedustele aina peers osoitteita DNS hakua käyttäen (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>Ei voida selvittää -whitebind osoitetta: &apos;%s&apos;</translation>
     </message>
@@ -4847,6 +4884,11 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Virhe: Vakava sisäinen virhe, katso debug.log saadaksesi lisätietoja</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Virhe: Ei voida valita nykyisiä denominoituja syötteitä</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4889,11 +4931,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Hylkää masternodet joiden versio on pienempi kuin (esim: 70050; oletus: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Tuodaan...</translation>
     </message>
@@ -4910,7 +4947,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Incompatible mode.</source>
-        <translation>Yhteensopimaton tila:</translation>
+        <translation>Yhteensopimaton tila.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4942,11 +4979,6 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <source>InstantX options:</source>
         <translation>InstantX valinnat:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Saldo ei riitä</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4988,7 +5020,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Virheellinen määrä -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Viimeinen onnistunut Darksend tapahtuma oli liian äskettäin.</translation>
     </message>
@@ -4998,7 +5030,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Rajoita allekirjoitusien välimuisti &lt;n&gt; merkintään (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Kuuntele JSON-RPC yhteyksiä portissa &lt;port&gt; (oletus: %u tai testiverkossa: %u)</translation>
     </message>
@@ -5008,7 +5040,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Kuuntele yhteyksiä portissa &lt;port&gt; (oletus: %u tai testiverkossa: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Lukitse masternodet niiden asetustiedoston kautta (oletus: %u)</translation>
     </message>
@@ -5073,12 +5105,17 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Lisää debug lokitiedoston merkinnän alkuun pvm/aika (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Aja säie joka säännöllisesti tallettaa lompakon (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Lähetä jäljitys/debug tiedot debug.log tiedostoon (default: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Lähetä siirtotapahtumat nolla siirtomaksulla jos mahdollista (oletus: %u)</translation>
     </message>
@@ -5093,12 +5130,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Serverin yksityisavain (oletus: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Istunto vanheni, esitä uudestaan.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Aseta avainvarannon koko &lt;n&gt; (oletus: %u)</translation>
     </message>
@@ -5115,92 +5147,97 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Asettaa DB_PRIVATE lipun lompakon tietokantaympäristössä (oletus: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Allekirjoitus aikaraja.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Määritä asetustiedosto (oletus: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Määritä yhteyden aikakatkaisu millisekunneissa (minimi: 1, oletus: %d)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Specify masternode configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Määritä masternoden asetustiedosto (oletus: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify pid file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Määritä pid tiedosto (oletus: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Käytä vahvistamattomia vaihtorahoja lähetettäessä siirtotapahtumia (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Stop running after importing blocks from disk (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Keskeytä kun kaikki lohkot tuotu levyltä (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted following entries to masternode: %u / %d</source>
-        <translation type="unfinished"/>
+        <translation>Esitetty seuraavat merkinnät masternodelle: %u / %d</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
-        <translation type="unfinished"/>
+        <translation>Esitetty masternodelle, odotetaan lisää merkintöjä ( %u / %d ) %s</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting in queue %s</source>
-        <translation type="unfinished"/>
+        <translation>Esitetty masternodelle, odotetaan jonossa %s</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>This is not a Masternode.</source>
-        <translation type="unfinished"/>
+        <translation>Tämä ei ole Masternode.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Yhteyden kynnysaika huonosti käyttäyville peers:lle (oletus: %u)</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Käytä KeePass 2 integraatiota käyttäen KeePassHttp liitännäistä (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Käytä N erillistä masternodea varojen anonymisointiin (2-8, oletus: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Use UPnP to map the listening port (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Käytä UPnP:tä kuunneltavan portin kartoitukseen (oletus: %u)</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
-        <translation type="unfinished"/>
+        <translation>Lompakko on kirjoitettava uudelleen: käynnistä Dash Core uudestaan viimeistelyä varten</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
-        <translation type="unfinished"/>
+        <translation>Varoitus: Ei tuettu argumentti -benchmark jätetty huomiotta, käytä -debug=bench.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
-        <translation type="unfinished"/>
+        <translation>Varoitus: Ei tuettu argumentti -debugnet jätetty huomiotta, käytä -debug=net.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5208,14 +5245,39 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Yritetään uudelleen...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Virheellinen masternoden yksityisavain (masternodeprivkey). Katso lisätietoja dokumentaatiosta.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(oltava 9999 pääverkossa)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Satunnaista Masternodea ei löydy.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Ei voida sekoittaa synkronoinnin aikana.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation> Ei voitu jäsentää masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Virheellinen verkkomaski määritelty -whitelist: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Virheellinen portti löytyi masternode.conf :sta</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5240,7 +5302,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Keep N DASH anonymized (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Pidä N DASH anonymisoituna (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5253,7 +5315,12 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Viimeisin Darksend oli liian äskettäin.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Rivi: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Ladataan osoitteita...</translation>
     </message>
@@ -5265,12 +5332,17 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Loading budget cache...</source>
-        <translation type="unfinished"/>
+        <translation>Ladataan budjettivälimuistia...</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Loading masternode cache...</source>
-        <translation type="unfinished"/>
+        <translation>Ladataan masternodevälimuistia...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Ladataan masternode maksuvälimuistia...</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5315,7 +5387,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Node relay options:</source>
-        <translation type="unfinished"/>
+        <translation>Solmun välitysasetukset:</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5355,7 +5427,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>RPC support for HTTP persistent connections (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>RPC tuki jatkuville HTTP yhteyksille (oletus: %d)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5372,15 +5444,20 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Uudelleenrakenna lohkoketjun indeksi nykyisistä blk000??.dat tiedostoista</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Vastaanota ja näytä P2P verkon hälytykset (oletus: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Välitä ja louhi datan kuljetustapahtumia (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Relay non-P2SH multisig (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Välitä non-P2SH multisig (oletus: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5398,17 +5475,17 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Aja taustalla palveluprosessina ja hyväksy komennot</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Lähetä jäljitys/debug-tieto konsoliin, debug.log tiedoston sijaan</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Istunto ei ole valmis!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Istunnon aikaraja.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Aseta tietokannan välimuistin koko megatavuissa (%d - %d, oletus: %d</translation>
     </message>
@@ -5438,12 +5515,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <translation>Allekirjoitus epäonnistui.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Allekirjoitus aikaraja, esitä uudestaan.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Siirtotapahtuman allekirjoitus epäonnistui</translation>
     </message>
@@ -5515,7 +5587,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Transmitting final transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Lähetetään lopullinen siirtotapahtuma.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5535,7 +5607,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Unknown state: id = %u</source>
-        <translation type="unfinished"/>
+        <translation>Tuntematon tila: id = %u</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5592,6 +5664,11 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
         <source>Wallet options:</source>
         <translation>Lompakon valinnat:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Lompakon ikkunaotsikko</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
@@ -5600,7 +5677,7 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
-        <translation>Varoitus: Tämä versio on vanhentunut, päivitys on tarpeen!</translation>
+        <translation>Varoitus: Tämä versio on vanhentunut, päivitys vaaditaan!</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -5610,12 +5687,12 @@ esimerkiksi: alertnotify=echo %%s | mail -s &quot;Dash Hälytys&quot; admin@foo.
     <message>
         <location line="+1"/>
         <source>Your entries added successfully.</source>
-        <translation type="unfinished"/>
+        <translation>Merkinnnät lisätty onnistuneesti.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Your transaction was accepted into the pool!</source>
-        <translation type="unfinished"/>
+        <translation>Siirtotapahtuma hyväksytty varantoon!</translation>
     </message>
     <message>
         <location line="+1"/>
diff --git a/src/qt/locale/dash_fr.ts b/src/qt/locale/dash_fr.ts
index 9ac896ad14f4..66722499a0bd 100644
--- a/src/qt/locale/dash_fr.ts
+++ b/src/qt/locale/dash_fr.ts
@@ -1,202 +1,141 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="fr">
-<context>
-    <name>AboutDialog</name>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="129"/>
-        <source>About Dash Core</source>
-        <translation>A propos de Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="130"/>
-        <source>&lt;b&gt;Dash Core&lt;/b&gt; version</source>
-        <translation>Version de &lt;b&gt;Dash Core&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="131"/>
-        <source>Copyright &amp;copy; 2009-2014 The Bitcoin Core developers.
-Copyright &amp;copy; 2014-YYYY The Dash Core developers.</source>
-        <translation>Droits réservés &amp;copy; 2009-2014 The Bitcoin Core developers.
-Droits réservés &amp;copy; 2014-YYYY The Dash Core developers.</translation>
-    </message>
-    <message>
-        <location filename="../forms/ui_aboutdialog.h" line="133"/>
-        <source>
-This is experimental software.
-
-Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
-        <translation>
-Ce logiciel est expérimental.
-
-Distribué sous licence MIT/X11, voir le fichier COPYING joint ou http://www.opensource.org/licenses/mit-license.php.
-
-Ce produit comprend des logiciels développés par le projet OpenSSL afin d&apos;être utilisés dans la boîte à outils OpenSSL (http://www.openssl.org/), un logiciel de chiffrement écrit par Eric Young (eay@cryptsoft.com) et un logiciel UPnP développé par Thomas Bernard.</translation>
-    </message>
-    <message>
-        <source>Copyright</source>
-        <translation type="vanished">Tous droits réservés</translation>
-    </message>
-    <message>
-        <source>The Bitcoin Core developers</source>
-        <translation type="vanished">Les développeurs Bitcoin Core</translation>
-    </message>
-    <message>
-        <source>The Dash Core developers</source>
-        <translation type="vanished">Les développeurs Dash Core</translation>
-    </message>
-    <message>
-        <source>(%1-bit)</source>
-        <translation type="vanished">(%1-bit)</translation>
-    </message>
-</context>
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="fr" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
-        <source>Double-click to edit address or label</source>
-        <translation type="vanished">Double cliquer afin de modifier l&apos;adresse ou l&apos;étiquette</translation>
-    </message>
-    <message>
-        <location filename="../forms/addressbookpage.ui" line="30"/>
+        <location filename="../forms/addressbookpage.ui" line="+30"/>
         <source>Right-click to edit address or label</source>
-        <translation type="unfinished"></translation>
+        <translation>Faites un clic droit pour modifier l&apos;adresse ou l&apos;étiquette</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="57"/>
+        <location line="+27"/>
         <source>Create a new address</source>
         <translation>Créer une nouvelle adresse</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="60"/>
+        <location line="+3"/>
         <source>&amp;New</source>
         <translation>&amp;Nouveau</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="74"/>
+        <location line="+14"/>
         <source>Copy the currently selected address to the system clipboard</source>
         <translation>Copier l&apos;adresse courante sélectionnée dans le presse-papier</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="77"/>
+        <location line="+3"/>
         <source>&amp;Copy</source>
         <translation>&amp;Copier</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="91"/>
+        <location line="+14"/>
         <source>Delete the currently selected address from the list</source>
         <translation>Effacer l&apos;adresse actuellement sélectionnée de la liste</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="94"/>
+        <location line="+3"/>
         <source>&amp;Delete</source>
         <translation>&amp;Supprimer</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="121"/>
+        <location line="+27"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exporter les données de l&apos;onglet courant vers un fichier</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="124"/>
+        <location line="+3"/>
         <source>&amp;Export</source>
         <translation>&amp;Exporter</translation>
     </message>
     <message>
-        <location filename="../forms/addressbookpage.ui" line="144"/>
+        <location line="+20"/>
         <source>C&amp;lose</source>
         <translation>&amp;Fermer</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="45"/>
+        <location filename="../addressbookpage.cpp" line="+45"/>
         <source>Choose the address to send coins to</source>
-        <translation>Choisir l&apos;adresse à laquelle envoyer des pièces</translation>
+        <translation>Choisir l&apos;adresse à laquelle envoyer de la monnaie</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="46"/>
+        <location line="+1"/>
         <source>Choose the address to receive coins with</source>
-        <translation>Choisir l&apos;adresse avec laquelle recevoir des pîèces</translation>
+        <translation>Choisir l&apos;adresse avec laquelle recevoir de la monnaie</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="51"/>
+        <location line="+5"/>
         <source>C&amp;hoose</source>
         <translation>C&amp;hoisir</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="57"/>
+        <location line="+6"/>
         <source>Sending addresses</source>
         <translation>Adresses d&apos;envoi</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="58"/>
+        <location line="+1"/>
         <source>Receiving addresses</source>
         <translation>Adresses de réception</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="65"/>
+        <location line="+7"/>
         <source>These are your Dash addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
-        <translation>Ce sont vos adresses Dash pour l&apos;envoi de paiements. Vérifiez toujours le montant et l&apos;adresse de réception avant l&apos;envoi de pièces.</translation>
+        <translation>Ce sont vos adresses Dash pour l&apos;envoi de paiements. Vérifiez toujours le montant et l&apos;adresse de réception avant l&apos;envoi de monnaies.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="69"/>
+        <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>Ce sont vos adresses Dash pour la réception de paiements. Il est recommandé d&apos;utiliser une nouvelle adresse pour chaque transaction.</translation>
+        <translation>Ce sont vos adresses Dash pour la réception de paiements. Il est recommandé d&apos;utiliser une nouvelle adresse de réception pour chaque transaction.</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="75"/>
+        <location line="+6"/>
         <source>&amp;Copy Address</source>
         <translation>&amp;Copier l&apos;adresse</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="76"/>
+        <location line="+1"/>
         <source>Copy &amp;Label</source>
         <translation>Copier l&apos;é&amp;tiquette</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="77"/>
+        <location line="+1"/>
         <source>&amp;Edit</source>
         <translation>&amp;Modifier</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="271"/>
+        <location line="+194"/>
         <source>Export Address List</source>
         <translation>Exporter la liste d&apos;adresses</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="272"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Valeurs séparées par des virgules (*.csv)</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="285"/>
+        <location line="+13"/>
         <source>Exporting Failed</source>
         <translation>L&apos;exportation a échoué</translation>
     </message>
     <message>
-        <location filename="../addressbookpage.cpp" line="286"/>
+        <location line="+1"/>
         <source>There was an error trying to save the address list to %1. Please try again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>There was an error trying to save the address list to %1.</source>
-        <translation type="vanished">Une erreur est survenue lors de l&apos;enregistrement de la liste d&apos;adresses vers %1.</translation>
+        <translation>Une erreur est survenue lors de l&apos;enregistrement de la liste d&apos;adresses vers %1. Essayez à nouveau.</translation>
     </message>
 </context>
 <context>
     <name>AddressTableModel</name>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location filename="../addresstablemodel.cpp" line="+169"/>
         <source>Label</source>
         <translation>Étiquette</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="169"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <location filename="../addresstablemodel.cpp" line="205"/>
+        <location line="+36"/>
         <source>(no label)</source>
         <translation>(aucune étiquette)</translation>
     </message>
@@ -204,154 +143,150 @@ Ce produit comprend des logiciels développés par le projet OpenSSL afin d&apos
 <context>
     <name>AskPassphraseDialog</name>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="26"/>
+        <location filename="../forms/askpassphrasedialog.ui" line="+26"/>
         <source>Passphrase Dialog</source>
         <translation>Dialogue de phrase de passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="56"/>
+        <location line="+30"/>
         <source>Enter passphrase</source>
         <translation>Saisir la phrase de passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="70"/>
+        <location line="+14"/>
         <source>New passphrase</source>
         <translation>Nouvelle phrase de passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="84"/>
+        <location line="+14"/>
         <source>Repeat new passphrase</source>
         <translation>Répéter la phrase de passe</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="117"/>
+        <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
         <translation>Utiliser pour désactiver le mode d&apos;envoi trivial de paiement lorsque le compte système est compromis. N&apos;assure pas une sécurité efficace.</translation>
     </message>
     <message>
-        <location filename="../forms/askpassphrasedialog.ui" line="120"/>
+        <location line="+3"/>
         <source>For anonymization only</source>
         <translation>Pour anonymisation uniquement</translation>
     </message>
     <message>
-        <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="vanished">Saisir la nouvelle phrase de passe pour le portefeuille. &lt;br/&gt;Veuillez utiliser une phrase de passe de &lt;b&gt;10 caractères aléatoires ou plus&lt;/b&gt;, ou de &lt;b&gt;huit mots ou plus&lt;/b&gt;.</translation>
-    </message>
-    <message>
-        <location filename="../askpassphrasedialog.cpp" line="43"/>
+        <location filename="../askpassphrasedialog.cpp" line="+43"/>
         <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
-        <translation type="unfinished"></translation>
+        <translation>Saisir la nouvelle phrase de passe pour le portefeuille.&lt;br/&gt;Veuillez utiliser une phrase de passe de &lt;b&gt;dix caractères aléatoires ou plus&lt;/b&gt;, ou de &lt;b&gt;huit mots ou plus&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="46"/>
+        <location line="+3"/>
         <source>Encrypt wallet</source>
         <translation>Chiffrer le portefeuille</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="52"/>
+        <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
         <translation>Cette opération nécessite votre phrase de passe pour déverrouiller le portefeuille.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="57"/>
+        <location line="+5"/>
         <source>Unlock wallet</source>
         <translation>Déverrouiller le portefeuille</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="60"/>
+        <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
         <translation>Cette opération nécessite votre phrase de passe pour déchiffrer le portefeuille.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="65"/>
+        <location line="+5"/>
         <source>Decrypt wallet</source>
         <translation>Déchiffrer le portefeuille</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="68"/>
+        <location line="+3"/>
         <source>Change passphrase</source>
-        <translation>Changer la phrase de passe</translation>
+        <translation>Changer le mot de passe</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Enter the old and new passphrase to the wallet.</source>
         <translation>Saisir l’ancienne phrase de passe pour le portefeuille ainsi que la nouvelle.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="115"/>
+        <location line="+46"/>
         <source>Confirm wallet encryption</source>
         <translation>Confirmer le chiffrement du portefeuille</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
         <translation>Attention : Si vous chiffrez votre portefeuille et perdez votre phrase de passe, vous &lt;b&gt;PERDREZ TOUS VOS DASH&lt;/b&gt; !</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="116"/>
+        <location line="+0"/>
         <source>Are you sure you wish to encrypt your wallet?</source>
         <translation>Êtes-vous sûr de vouloir chiffrer votre portefeuille ?</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="125"/>
-        <location filename="../askpassphrasedialog.cpp" line="184"/>
+        <location line="+9"/>
+        <location line="+59"/>
         <source>Wallet encrypted</source>
         <translation>Portefeuille chiffré</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="127"/>
+        <location line="-57"/>
         <source>Dash will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your dashs from being stolen by malware infecting your computer.</source>
         <translation>Dash va à présent se fermer pour terminer le chiffrement. N&apos;oubliez pas que le chiffrement de votre portefeuille n&apos;est pas une protection totale contre le vol par des logiciels malveillants qui infecteraient votre ordinateur.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="131"/>
+        <location line="+4"/>
         <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 : Toute sauvegarde précédente de votre fichier de portefeuille devrait être remplacée par le nouveau fichier de portefeuille chiffré. Pour des raisons de sécurité, les sauvegardes précédentes de votre fichier de portefeuille non chiffré deviendront inutilisables dès que vous commencerez à utiliser le nouveau portefeuille chiffré.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="140"/>
-        <location filename="../askpassphrasedialog.cpp" line="147"/>
-        <location filename="../askpassphrasedialog.cpp" line="190"/>
-        <location filename="../askpassphrasedialog.cpp" line="196"/>
+        <location line="+9"/>
+        <location line="+7"/>
+        <location line="+43"/>
+        <location line="+6"/>
         <source>Wallet encryption failed</source>
         <translation>Le chiffrement du portefeuille a échoué</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="141"/>
+        <location line="-55"/>
         <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
         <translation>Le chiffrement du portefeuille a échoué en raison d&apos;une erreur interne. Votre portefeuille n&apos;a pas été chiffré.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="148"/>
-        <location filename="../askpassphrasedialog.cpp" line="197"/>
+        <location line="+7"/>
+        <location line="+49"/>
         <source>The supplied passphrases do not match.</source>
         <translation>Les phrases de passe saisies ne correspondent pas.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="160"/>
+        <location line="-37"/>
         <source>Wallet unlock failed</source>
         <translation>Le déverrouillage du portefeuille a échoué</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="161"/>
-        <location filename="../askpassphrasedialog.cpp" line="172"/>
-        <location filename="../askpassphrasedialog.cpp" line="191"/>
+        <location line="+1"/>
+        <location line="+11"/>
+        <location line="+19"/>
         <source>The passphrase entered for the wallet decryption was incorrect.</source>
         <translation>La phrase de passe saisie pour déchiffrer le portefeuille était incorrecte.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="171"/>
+        <location line="-20"/>
         <source>Wallet decryption failed</source>
         <translation>Le déchiffrage du portefeuille a échoué</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="185"/>
+        <location line="+14"/>
         <source>Wallet passphrase was successfully changed.</source>
         <translation>La phrase de passe du portefeuille a été modifiée avec succès.</translation>
     </message>
     <message>
-        <location filename="../askpassphrasedialog.cpp" line="233"/>
-        <location filename="../askpassphrasedialog.cpp" line="257"/>
+        <location line="+48"/>
+        <location line="+24"/>
         <source>Warning: The Caps Lock key is on!</source>
         <translation>Attention : la touche Verr. Maj. est activée !</translation>
     </message>
@@ -359,437 +294,425 @@ Ce produit comprend des logiciels développés par le projet OpenSSL afin d&apos
 <context>
     <name>BitcoinGUI</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="107"/>
+        <location filename="../bitcoingui.cpp" line="+107"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="116"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="118"/>
+        <location line="+2"/>
         <source>Node</source>
         <translation>Nœud</translation>
     </message>
     <message>
-        <source>[testnet]</source>
-        <translation type="vanished">[testnet]</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="249"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Vue d&apos;ensemble</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="250"/>
+        <location line="+1"/>
         <source>Show general overview of wallet</source>
         <translation>Afficher une vue d’ensemble du portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="260"/>
+        <location line="+10"/>
         <source>&amp;Send</source>
         <translation>&amp;Envoyer</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="261"/>
+        <location line="+1"/>
         <source>Send coins to a Dash address</source>
         <translation>Envoyer des pièces sur une adresse Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="271"/>
+        <location line="+10"/>
         <source>&amp;Receive</source>
         <translation>&amp;Recevoir</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="272"/>
+        <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
         <translation>Demande de paiements (Générer des QR code et des URIs dash)</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="282"/>
+        <location line="+10"/>
         <source>&amp;Transactions</source>
         <translation>&amp;Transactions</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="283"/>
+        <location line="+1"/>
         <source>Browse transaction history</source>
         <translation>Parcourir l&apos;historique des transactions</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="306"/>
+        <location line="+23"/>
         <source>E&amp;xit</source>
         <translation>Q&amp;uitter</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="307"/>
+        <location line="+1"/>
         <source>Quit application</source>
         <translation>Quitter l’application</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="310"/>
+        <location line="+3"/>
         <source>&amp;About Dash Core</source>
         <translation>À propos du noyau Dash</translation>
     </message>
     <message>
-        <source>Show information about Dash</source>
-        <translation type="vanished">Voir des informations à propos de Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="311"/>
+        <location line="+1"/>
         <source>Show information about Dash Core</source>
-        <translation type="unfinished"></translation>
+        <translation>Affichez des informations à propos de  Dash Core</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="314"/>
-        <location filename="../bitcoingui.cpp" line="316"/>
+        <location line="+3"/>
+        <location line="+2"/>
         <source>About &amp;Qt</source>
         <translation>À propos de &amp;Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="318"/>
+        <location line="+2"/>
         <source>Show information about Qt</source>
         <translation>Afficher des informations sur Qt</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="320"/>
+        <location line="+2"/>
         <source>&amp;Options...</source>
-        <translation>&amp;Options…</translation>
+        <translation>&amp;Options...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="321"/>
+        <location line="+1"/>
         <source>Modify configuration options for Dash</source>
         <translation>Modifier les options de configuration pour Dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="323"/>
+        <location line="+2"/>
         <source>&amp;Show / Hide</source>
         <translation>&amp;Afficher / Cacher</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="324"/>
+        <location line="+1"/>
         <source>Show or hide the main Window</source>
         <translation>Afficher ou masquer la fenêtre principale</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="326"/>
+        <location line="+2"/>
         <source>&amp;Encrypt Wallet...</source>
         <translation>&amp;Chiffrer le portefeuille...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="327"/>
+        <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
         <translation>Chiffrer les clefs privées de votre portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="329"/>
+        <location line="+2"/>
         <source>&amp;Backup Wallet...</source>
         <translation>Sauvegarder le &amp;portefeuille...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="330"/>
+        <location line="+1"/>
         <source>Backup wallet to another location</source>
         <translation>Sauvegarder le portefeuille vers un autre emplacement</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="331"/>
+        <location line="+1"/>
         <source>&amp;Change Passphrase...</source>
         <translation>&amp;Changer la phrase de passe...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="332"/>
+        <location line="+1"/>
         <source>Change the passphrase used for wallet encryption</source>
         <translation>Modifier la phrase de passe utilisée pour le chiffrement du portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="333"/>
+        <location line="+1"/>
         <source>&amp;Unlock Wallet...</source>
         <translation>&amp;Déverrouiller le portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="334"/>
+        <location line="+1"/>
         <source>Unlock wallet</source>
         <translation>Déverrouiller le portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="335"/>
+        <location line="+1"/>
         <source>&amp;Lock Wallet</source>
         <translation>&amp;Vérouiller le portefeuille</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="336"/>
+        <location line="+1"/>
         <source>Sign &amp;message...</source>
         <translation>&amp;Signer le message...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="337"/>
+        <location line="+1"/>
         <source>Sign messages with your Dash addresses to prove you own them</source>
         <translation>Signer les messages avec votre adresses Dash pour prouver que vous êtes le propriétaire</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="338"/>
+        <location line="+1"/>
         <source>&amp;Verify message...</source>
         <translation>&amp;Vérifier un message...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="339"/>
+        <location line="+1"/>
         <source>Verify messages to ensure they were signed with specified Dash addresses</source>
         <translation>Vérifier les messages pour vous assurer qu&apos;ils ont été signés avec les adresses Dash spécifiées</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="341"/>
+        <location line="+2"/>
         <source>&amp;Information</source>
         <translation>&amp;Informations</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="342"/>
+        <location line="+1"/>
         <source>Show diagnostic information</source>
         <translation>Voir les informaion de diagnostique</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="343"/>
+        <location line="+1"/>
         <source>&amp;Debug console</source>
         <translation>&amp;Console de débogage</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="344"/>
+        <location line="+1"/>
         <source>Open debugging console</source>
         <translation>Ouvrir la console de débogage</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="345"/>
+        <location line="+1"/>
         <source>&amp;Network Monitor</source>
         <translation>&amp;Moniteur réseau</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="346"/>
+        <location line="+1"/>
         <source>Show network monitor</source>
         <translation>Voir le moniteur réseau</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="347"/>
+        <location line="+1"/>
+        <source>&amp;Peers list</source>
+        <translation>Et la liste des pairs</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show peers info</source>
+        <translation>Voir les infos des pairs</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet &amp;Repair</source>
+        <translation>Portefeuille et Réparation</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show wallet repair options</source>
+        <translation>Afficher les options de réparation du  portefeuille</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Open &amp;Configuration File</source>
         <translation>Ouvrir Fichier de &amp;Configuration</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="348"/>
+        <location line="+1"/>
         <source>Open configuration file</source>
         <translation>Ouvrir fichier de configuration</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="350"/>
+        <location line="+1"/>
+        <source>Show Automatic &amp;Backups</source>
+        <translation>Afficher les sauvegardes automatiques</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Show automatically created wallet backups</source>
+        <translation>Afficher automatiquement les sauvegardes de portefeuille créés </translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>&amp;Sending addresses...</source>
         <translation>Adresses d&apos;&amp;envoi...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="351"/>
+        <location line="+1"/>
         <source>Show the list of used sending addresses and labels</source>
         <translation>Afficher la liste d&apos;adresses d&apos;envoi et d&apos;étiquettes utilisées</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="352"/>
+        <location line="+1"/>
         <source>&amp;Receiving addresses...</source>
         <translation>Adresses de &amp;réception...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="353"/>
+        <location line="+1"/>
         <source>Show the list of used receiving addresses and labels</source>
         <translation>Afficher la liste d&apos;adresses de réception et d&apos;étiquettes utilisées</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="355"/>
+        <location line="+2"/>
         <source>Open &amp;URI...</source>
         <translation>Ouvrir un &amp;URI...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="356"/>
+        <location line="+1"/>
         <source>Open a dash: URI or payment request</source>
         <translation>Ouvrir une URI ou demande de paiement dash</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="358"/>
+        <location line="+2"/>
         <source>&amp;Command-line options</source>
         <translation>Options de ligne de &amp;commande</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="360"/>
-        <source>Show the Bitcoin Core help message to get a list with possible Dash command-line options</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="550"/>
+        <location line="+196"/>
         <source>Dash Core client</source>
-        <translation type="unfinished"></translation>
+        <translation>Client Dash Core </translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="727"/>
+        <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
+        <translation><numerusform> Traités %n blocs de l&apos;historique des transactions.</numerusform><numerusform> Traités %n blocs de l&apos;historique des transactions.</numerusform></translation>
     </message>
     <message>
+        <location line="-376"/>
         <source>Show the Dash Core help message to get a list with possible Dash command-line options</source>
-        <translation type="vanished">Afficher le message d&apos;aide de Dash Core pour obtenir une liste des options de ligne de commande Bitcoin possibles.</translation>
+        <translation>Afficher le message d&apos;aide de Dash Core pour obtenir une liste des options de ligne de commande Bitcoin possibles.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="396"/>
+        <location line="+36"/>
         <source>&amp;File</source>
         <translation>&amp;Fichier</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="410"/>
+        <location line="+14"/>
         <source>&amp;Settings</source>
         <translation>&amp;Réglages</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="423"/>
+        <location line="+13"/>
         <source>&amp;Tools</source>
         <translation>&amp;Outils</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="430"/>
+        <location line="+11"/>
         <source>&amp;Help</source>
         <translation>&amp;Aide</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="441"/>
+        <location line="+11"/>
         <source>Tabs toolbar</source>
         <translation>Barre d&apos;outils des onglets</translation>
     </message>
-    <message>
-        <source>Dash client</source>
-        <translation type="vanished">Client Dash</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="692"/>
+        <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n connection(s) active(s) sur le réseau Dash</numerusform>
-            <numerusform>%n connection(s) active sur le réseau Dash</numerusform>
-        </translation>
+        <translation><numerusform>%n connexions actives au réseau Dash </numerusform><numerusform>% n connexions actives au réseau Dash </numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="707"/>
+        <location line="+15"/>
         <source>Synchronizing with network...</source>
-        <translation>Synchronisation avec le réseau en cours…</translation>
+        <translation>Synchronisation avec le réseau en cours...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="710"/>
+        <location line="+3"/>
         <source>Importing blocks from disk...</source>
         <translation>Importation des blocs depuis le disque...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="713"/>
+        <location line="+3"/>
         <source>Reindexing blocks on disk...</source>
         <translation>Réindexation des blocs sur le disque...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="717"/>
+        <location line="+4"/>
         <source>No block source available...</source>
         <translation>Aucune source de blocs disponible...</translation>
     </message>
     <message>
-        <source>Processed %1 blocks of transaction history.</source>
-        <translation type="vanished">À traité %1 blocs de l&apos;historique des transactions.</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="732"/>
+        <location line="+15"/>
         <source>Up to date</source>
         <translation>À jour</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="753"/>
+        <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n heure(s)</numerusform>
-            <numerusform>%n heure(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n heures</numerusform><numerusform>%n heures</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="757"/>
+        <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n jour(s)</numerusform>
-            <numerusform>%n jour(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n jours</numerusform><numerusform>%n jours</numerusform></translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="761"/>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+4"/>
+        <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n semaine(s)</numerusform>
-            <numerusform>%n semaine(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n semaines</numerusform><numerusform>%n semaines</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%1 and %2</source>
         <translation>%1 et %2</translation>
     </message>
     <message numerus="yes">
-        <location filename="../bitcoingui.cpp" line="767"/>
+        <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n année(s)</numerusform>
-            <numerusform>%n année(s)</numerusform>
-        </translation>
+        <translation><numerusform>%n année(s)</numerusform><numerusform>%n années</numerusform></translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="771"/>
+        <location line="+4"/>
         <source>%1 behind</source>
         <translation>%1 en retard</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="776"/>
+        <location line="+5"/>
         <source>Catching up...</source>
-        <translation>Rattrapage en cours…</translation>
+        <translation>Rattrapage en cours...</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="792"/>
+        <location line="+16"/>
         <source>Last received block was generated %1 ago.</source>
         <translation>Le dernier bloc reçu avait été généré il y a %1.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="794"/>
+        <location line="+2"/>
         <source>Transactions after this will not yet be visible.</source>
         <translation>Les transactions après ceci ne sont pas encore visibles.</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="807"/>
-        <source>Dash</source>
-        <translation>Dash</translation>
-    </message>
-    <message>
-        <location filename="../bitcoingui.cpp" line="821"/>
+        <location line="+27"/>
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="824"/>
+        <location line="+3"/>
         <source>Warning</source>
         <translation>Avertissement</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="827"/>
+        <location line="+3"/>
         <source>Information</source>
         <translation>Information</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+74"/>
         <source>Sent transaction</source>
         <translation>Transaction envoyée</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="901"/>
+        <location line="+0"/>
         <source>Incoming transaction</source>
         <translation>Transaction entrante</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="902"/>
+        <location line="+1"/>
         <source>Date: %1
 Amount: %2
 Type: %3
@@ -802,30 +725,25 @@ Adresse : %4
 </translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="972"/>
+        <location line="+70"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
         <translation>Le portefeuille est &lt;b&gt;chiffré&lt;/b&gt; et est actuellement &lt;b&gt;déverrouillé&lt;/b&gt;</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="982"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt; for anonimization only</source>
         <translation>Le portefeuille est &lt;b&gt;chiffré&lt;/b&gt; et est actuellement &lt;b&gt;déverrouillé&lt;/b&gt; seulement pour l&apos;anonymisation</translation>
     </message>
     <message>
-        <location filename="../bitcoingui.cpp" line="992"/>
+        <location line="+10"/>
         <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
         <translation>Le portefeuille est &lt;b&gt;chiffré&lt;/b&gt; et actuellement &lt;b&gt;verrouillé&lt;/b&gt;</translation>
     </message>
-    <message>
-        <location filename="../dash.cpp" line="478"/>
-        <source>A fatal error occurred. Dash can no longer continue safely and will quit.</source>
-        <translation>Une erreur fatale est survenue. Dash ne peut plus continuer de façon sûre et va s&apos;arrêter.</translation>
-    </message>
 </context>
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Alerte réseau</translation>
     </message>
@@ -833,333 +751,302 @@ Adresse : %4
 <context>
     <name>CoinControlDialog</name>
     <message>
-        <source>Coin Control Address Selection</source>
-        <translation type="vanished">Sélection de l&apos;adresse de contrôle des pièces</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="48"/>
+        <location filename="../forms/coincontroldialog.ui" line="+48"/>
         <source>Quantity:</source>
         <translation>Quantité :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="77"/>
+        <location line="+29"/>
         <source>Bytes:</source>
         <translation>Octets :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="122"/>
+        <location line="+45"/>
         <source>Amount:</source>
         <translation>Montant :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="151"/>
+        <location line="+29"/>
         <source>Priority:</source>
         <translation>Priorité :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="196"/>
+        <location line="+45"/>
         <source>Fee:</source>
         <translation>Frais :</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Sortie faible :</translation>
-    </message>
-    <message>
-        <location filename="../forms/coincontroldialog.ui" line="14"/>
+        <location line="-182"/>
         <source>Coin Selection</source>
-        <translation type="unfinished"></translation>
+        <translation>Sélection de la Monnaie</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="228"/>
+        <location line="+214"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Poussière:</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="276"/>
+        <location line="+48"/>
         <source>After Fee:</source>
         <translation>Après les frais :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="308"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Monnaie :</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="364"/>
+        <location line="+56"/>
         <source>(un)select all</source>
         <translation>Tout (dé)sélectionner</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="380"/>
+        <location line="+16"/>
         <source>Tree mode</source>
         <translation>Mode arborescence</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="393"/>
+        <location line="+13"/>
         <source>List mode</source>
         <translation>Mode liste</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="403"/>
+        <location line="+10"/>
         <source>(1 locked)</source>
         <translation>(1 verrouillé)</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="449"/>
+        <location line="+46"/>
         <source>Amount</source>
         <translation>Montant</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="454"/>
+        <location line="+5"/>
         <source>Received with label</source>
-        <translation type="unfinished"></translation>
+        <translation>Reçu avec étiquette</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="459"/>
+        <location line="+5"/>
         <source>Received with address</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Label</source>
-        <translation type="vanished">Etiquette</translation>
-    </message>
-    <message>
-        <source>Address</source>
-        <translation type="vanished">Adresse</translation>
+        <translation>Reçu avec adresse</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="464"/>
-        <source>Darksend Rounds</source>
-        <translation>Cycles Darksend</translation>
+        <location line="+5"/>
+        <source>DS Rounds</source>
+        <translation>Cycles DS</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="469"/>
+        <location line="+5"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="474"/>
+        <location line="+5"/>
         <source>Confirmations</source>
         <translation>Confirmations</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="477"/>
+        <location line="+3"/>
         <source>Confirmed</source>
         <translation>Confirmée</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="482"/>
+        <location line="+5"/>
         <source>Priority</source>
         <translation>Priorité</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="49"/>
+        <location filename="../coincontroldialog.cpp" line="+49"/>
         <source>Copy address</source>
         <translation>Copier l’adresse</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="50"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copier l’étiquette</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="51"/>
-        <location filename="../coincontroldialog.cpp" line="77"/>
+        <location line="+1"/>
+        <location line="+26"/>
         <source>Copy amount</source>
         <translation>Copier le montant</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="52"/>
+        <location line="-25"/>
         <source>Copy transaction ID</source>
         <translation>Copier l&apos;ID de la transaction</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="53"/>
+        <location line="+1"/>
         <source>Lock unspent</source>
         <translation>Verrouiller ce qui n&apos;est pas dépensé</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="54"/>
+        <location line="+1"/>
         <source>Unlock unspent</source>
         <translation>Déverrouiller ce qui n&apos;est pas dépensé</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="76"/>
+        <location line="+22"/>
         <source>Copy quantity</source>
         <translation>Copier la quantité</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="78"/>
+        <location line="+2"/>
         <source>Copy fee</source>
         <translation>Copier les frais</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="79"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copier le montant après les frais</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="80"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copier les octets</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="81"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copier la priorité</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="82"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copier la sortie faible</translation>
+        <translation>Copier poussière</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="83"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copier la monnaie</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="435"/>
+        <location line="+329"/>
+        <source>Non-anonymized input selected. &lt;b&gt;Darksend will be disabled.&lt;/b&gt;&lt;br&gt;&lt;br&gt;If you still want to use Darksend, please deselect all non-nonymized inputs first and then check Darksend checkbox again.</source>
+        <translation>Entrée non-anonymisées sélectionnée. &lt;b&gt; Darksend sera désactivé. &lt;/ b&gt; &lt;br&gt; Si vous voulez continuer à utiliser Darksend, veuillez désélectionner toutes les entrées non-anonymisées d&apos;abord, puis vérifier à nouveau la case Darksend.</translation>
+    </message>
+    <message>
+        <location line="+32"/>
         <source>highest</source>
         <translation>la plus élevée</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="436"/>
+        <location line="+1"/>
         <source>higher</source>
         <translation>plus élevée</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="437"/>
+        <location line="+1"/>
         <source>high</source>
         <translation>élevée</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="438"/>
+        <location line="+1"/>
         <source>medium-high</source>
         <translation>moyennement-élevée</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="654"/>
+        <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation type="unfinished"></translation>
+        <translation>Peut varier de +/- %1 duff(s) par entrée.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="780"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="164"/>
-        <location filename="../coincontroldialog.cpp" line="439"/>
+        <location filename="../forms/coincontroldialog.ui" line="-318"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>moyenne</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="440"/>
+        <location filename="../coincontroldialog.cpp" line="+1"/>
         <source>low-medium</source>
         <translation>moyennement-basse</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="441"/>
+        <location line="+1"/>
         <source>low</source>
         <translation>basse</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="442"/>
+        <location line="+1"/>
         <source>lower</source>
         <translation>plus basse</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="443"/>
+        <location line="+1"/>
         <source>lowest</source>
         <translation>la plus basse</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="453"/>
+        <location line="+10"/>
         <source>(%1 locked)</source>
         <translation>(%1 verrouillé)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="481"/>
+        <location line="+28"/>
         <source>none</source>
         <translation>aucun</translation>
     </message>
     <message>
-        <source>Dust</source>
-        <translation type="vanished">Poussière</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location line="+141"/>
         <source>yes</source>
         <translation>oui</translation>
     </message>
     <message>
-        <location filename="../forms/coincontroldialog.ui" line="244"/>
-        <location filename="../coincontroldialog.cpp" line="622"/>
+        <location filename="../forms/coincontroldialog.ui" line="+80"/>
+        <location filename="../coincontroldialog.cpp" line="+0"/>
         <source>no</source>
         <translation>non</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="638"/>
+        <location filename="../coincontroldialog.cpp" line="+16"/>
         <source>This label turns red, if the transaction size is greater than 1000 bytes.</source>
         <translation>Cette étiquette devient rouge si la taille de la transaction est plus grande que 1 000 octets.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="639"/>
-        <location filename="../coincontroldialog.cpp" line="644"/>
+        <location line="+1"/>
+        <location line="+5"/>
         <source>This means a fee of at least %1 per kB is required.</source>
         <translation>Cela signifie qu&apos;une taxe d&apos;au moins %1 par ko est nécessaire </translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="640"/>
+        <location line="-4"/>
         <source>Can vary +/- 1 byte per input.</source>
         <translation>Peut varier +/- 1 octet par entrée.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="642"/>
+        <location line="+2"/>
         <source>Transactions with higher priority are more likely to get included into a block.</source>
         <translation>Les transactions à priorité plus haute sont plus à même d&apos;être incluses dans un bloc.</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="643"/>
+        <location line="+1"/>
         <source>This label turns red, if the priority is smaller than &quot;medium&quot;.</source>
         <translation>Cette étiquette devient rouge si la priorité est plus basse que « moyenne »</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="646"/>
+        <location line="+3"/>
         <source>This label turns red, if any recipient receives an amount smaller than %1.</source>
         <translation>Cette étiquette devient rouge si un destinataire reçoit un montant inférieur à %1.</translation>
     </message>
     <message>
-        <source>This means a fee of at least %1 is required.</source>
-        <translation type="vanished">Signifie que des frais d&apos;au moins %1 sont requis.</translation>
-    </message>
-    <message>
-        <source>Amounts below 0.546 times the minimum relay fee are shown as dust.</source>
-        <translation type="vanished">Les montants inférieurs à 0,546 fois les frais minimums de relais sont affichés en tant que poussière.</translation>
-    </message>
-    <message>
-        <source>This label turns red, if the change is smaller than %1.</source>
-        <translation type="vanished">Cette étiquette devient rouge si la monnaie rendue est inférieure à %1.</translation>
-    </message>
-    <message>
-        <location filename="../coincontroldialog.cpp" line="701"/>
-        <location filename="../coincontroldialog.cpp" line="762"/>
+        <location line="+55"/>
+        <location line="+65"/>
         <source>(no label)</source>
         <translation>(aucune étiquette)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="755"/>
+        <location line="-7"/>
         <source>change from %1 (%2)</source>
         <translation>monnaie de %1 (%2)</translation>
     </message>
     <message>
-        <location filename="../coincontroldialog.cpp" line="756"/>
+        <location line="+1"/>
         <source>(change)</source>
         <translation>(monnaie)</translation>
     </message>
@@ -1167,84 +1054,84 @@ Adresse : %4
 <context>
     <name>DarksendConfig</name>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="14"/>
+        <location filename="../forms/darksendconfig.ui" line="+14"/>
         <source>Configure Darksend</source>
         <translation>Configurer Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="26"/>
+        <location line="+12"/>
         <source>Basic Privacy</source>
         <translation>Confidentialité normale</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="39"/>
+        <location line="+13"/>
         <source>High Privacy</source>
         <translation>Confidentialité élevée</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="52"/>
+        <location line="+13"/>
         <source>Maximum Privacy</source>
         <translation>Confidentialité maximale</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="65"/>
+        <location line="+13"/>
         <source>Please select a privacy level.</source>
         <translation>Veuillez choisir un niveau de confidentialité.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="78"/>
+        <location line="+13"/>
         <source>Use 2 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Utiliser 2 masternodes pour mélanger jusqu&apos;à 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="91"/>
+        <location line="+13"/>
         <source>Use 8 separate masternodes to mix funds up to 1000 DASH</source>
         <translation>Utiliser 8 masternodes pour mélanger jusqu&apos;à 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="104"/>
+        <location line="+13"/>
         <source>Use 16 separate masternodes</source>
         <translation>Utiliser 16 masternodes</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="117"/>
+        <location line="+13"/>
         <source>This option is the quickest and will cost about ~0.025 DASH to anonymize 1000 DASH</source>
         <translation>Cette option est la plus rapide et coûtera environ 0,025 DASH pour anonymiser 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="130"/>
+        <location line="+13"/>
         <source>This option is moderately fast and will cost about 0.05 DASH to anonymize 1000 DASH</source>
         <translation>Cette option est un peu moins rapide et coûtera environ 0,05 DASH pour anonymiser 1000 DASH</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="156"/>
+        <location line="+26"/>
         <source>0.1 DASH per 1000 DASH you anonymize.</source>
         <translation>0,1 DASH par 1000 DASH anonymisés.</translation>
     </message>
     <message>
-        <location filename="../forms/darksendconfig.ui" line="143"/>
+        <location line="-13"/>
         <source>This is the slowest and most secure option. Using maximum anonymity will cost</source>
         <translation>Cette option est le plus lente et la plus sécurisée. Utiliser l&apos;anonymisation maximale coûtera</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="43"/>
-        <location filename="../darksendconfig.cpp" line="58"/>
-        <location filename="../darksendconfig.cpp" line="73"/>
+        <location filename="../darksendconfig.cpp" line="+43"/>
+        <location line="+15"/>
+        <location line="+15"/>
         <source>Darksend Configuration</source>
         <translation>Configuration de Darksend</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="44"/>
+        <location line="-29"/>
         <source>Darksend was successfully set to basic (%1 and 2 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend est réglé avec succès sur normal (%1 and 2 rounds). Vous pouvez changer cela à tout moment en ouvrant la fenêtre de configuration du Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="59"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to high (%1 and 8 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend est réglé avec succès sur haut (%1 and 8 rounds). Vous pouvez changer cela à tout moment en ouvrant la fenêtre de configuration du Dash.</translation>
     </message>
     <message>
-        <location filename="../darksendconfig.cpp" line="74"/>
+        <location line="+15"/>
         <source>Darksend was successfully set to maximum (%1 and 16 rounds). You can change this at any time by opening Dash&apos;s configuration screen.</source>
         <translation>Darksend est réglé avec succès sur maximum (%1 and 16 rounds). Vous pouvez changer cela à tout moment en ouvrant la fenêtre de configuration du Dash.</translation>
     </message>
@@ -1252,67 +1139,67 @@ Adresse : %4
 <context>
     <name>EditAddressDialog</name>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="14"/>
+        <location filename="../forms/editaddressdialog.ui" line="+14"/>
         <source>Edit Address</source>
         <translation>Modifier l&apos;adresse</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="25"/>
+        <location line="+11"/>
         <source>&amp;Label</source>
         <translation>&amp;Étiquette</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="35"/>
+        <location line="+10"/>
         <source>The label associated with this address list entry</source>
         <translation>L&apos;étiquette associée à cette entrée de la liste d&apos;adresses</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="42"/>
+        <location line="+7"/>
         <source>&amp;Address</source>
         <translation>&amp;Adresse</translation>
     </message>
     <message>
-        <location filename="../forms/editaddressdialog.ui" line="52"/>
+        <location line="+10"/>
         <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
         <translation>L&apos;adresse associée à cette entrée de la liste d&apos;adresses. Ceci ne peut être modifié que pour les adresses d&apos;envoi.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="29"/>
+        <location filename="../editaddressdialog.cpp" line="+29"/>
         <source>New receiving address</source>
         <translation>Nouvelle adresse de réception</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="33"/>
+        <location line="+4"/>
         <source>New sending address</source>
         <translation>Nouvelle adresse d’envoi</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="36"/>
+        <location line="+3"/>
         <source>Edit receiving address</source>
         <translation>Modifier l’adresse de réception</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="40"/>
+        <location line="+4"/>
         <source>Edit sending address</source>
         <translation>Modifier l’adresse d&apos;envoi</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="111"/>
+        <location line="+71"/>
         <source>The entered address &quot;%1&quot; is not a valid Dash address.</source>
         <translation>L&apos;adresse entrée &quot;%1&quot; est pas une adresse Dash valide</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="116"/>
+        <location line="+5"/>
         <source>The entered address &quot;%1&quot; is already in the address book.</source>
         <translation>L’adresse fournie « %1 » est déjà présente dans le carnet d&apos;adresses.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="121"/>
+        <location line="+5"/>
         <source>Could not unlock wallet.</source>
         <translation>Impossible de déverrouiller le portefeuille.</translation>
     </message>
     <message>
-        <location filename="../editaddressdialog.cpp" line="126"/>
+        <location line="+5"/>
         <source>New key generation failed.</source>
         <translation>Échec de génération de la nouvelle clef.</translation>
     </message>
@@ -1320,27 +1207,27 @@ Adresse : %4
 <context>
     <name>FreespaceChecker</name>
     <message>
-        <location filename="../intro.cpp" line="69"/>
+        <location filename="../intro.cpp" line="+69"/>
         <source>A new data directory will be created.</source>
         <translation>Un nouveau répertoire de données sera créé.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="91"/>
+        <location line="+22"/>
         <source>name</source>
         <translation>nom</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="93"/>
+        <location line="+2"/>
         <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
         <translation>Le répertoire existe déjà. Ajoutez %1 si vous voulez créer un nouveau répertoire ici.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="96"/>
+        <location line="+3"/>
         <source>Path already exists, and is not a directory.</source>
         <translation>Le chemin existe déjà et n&apos;est pas un répertoire.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="103"/>
+        <location line="+7"/>
         <source>Cannot create data directory here.</source>
         <translation>Impossible de créer un répertoire de données ici.</translation>
     </message>
@@ -1348,72 +1235,68 @@ Adresse : %4
 <context>
     <name>HelpMessageDialog</name>
     <message>
-        <source>Dash Core - Command-line options</source>
-        <translation type="vanished">Dash Core - options de la ligne de commande</translation>
-    </message>
-    <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location filename="../utilitydialog.cpp" line="+32"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="32"/>
+        <location line="+0"/>
         <source>version</source>
         <translation>version</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="37"/>
-        <location filename="../utilitydialog.cpp" line="39"/>
+        <location line="+5"/>
+        <location line="+2"/>
         <source>(%1-bit)</source>
-        <translation type="unfinished">(%1-bit)</translation>
+        <translation>(%1-bit)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="44"/>
+        <location line="+5"/>
         <source>About Dash Core</source>
-        <translation type="unfinished">A propos de Dash Core</translation>
+        <translation>A propos de Dash Core</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="62"/>
+        <location line="+19"/>
         <source>Command-line options</source>
-        <translation type="unfinished"></translation>
+        <translation>Options de ligne de commande</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Usage:</source>
         <translation>Utilisation :</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>command-line options</source>
         <translation>options de ligne de commande</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="68"/>
+        <location line="+4"/>
         <source>UI options</source>
         <translation>Options de l&apos;interface utilisateur</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="69"/>
+        <location line="+1"/>
         <source>Choose data directory on startup (default: 0)</source>
         <translation>Choisir un répertoire de données au démarrage (par défaut : 0)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="70"/>
+        <location line="+1"/>
         <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source>
         <translation>Définir la langue, par exemple « fr_CA » (par défaut : la langue du système)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="71"/>
+        <location line="+1"/>
         <source>Start minimized</source>
         <translation>Démarrer minimisé</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="72"/>
+        <location line="+1"/>
         <source>Set SSL root certificates for payment request (default: -system-)</source>
         <translation>Définir les certificats SSL racine pour les requêtes de paiement (par défaut : -système-)</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="73"/>
+        <location line="+1"/>
         <source>Show splash screen on startup (default: 1)</source>
         <translation>Afficher l&apos;écran d&apos;accueil au démarrage (par défaut : 1)</translation>
     </message>
@@ -1421,107 +1304,85 @@ Adresse : %4
 <context>
     <name>Intro</name>
     <message>
-        <location filename="../forms/intro.ui" line="14"/>
+        <location filename="../forms/intro.ui" line="+14"/>
         <source>Welcome</source>
         <translation>Bienvenue</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="23"/>
+        <location line="+9"/>
         <source>Welcome to Dash Core.</source>
         <translation>Bienvenue à Dash Core</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="49"/>
+        <location line="+26"/>
         <source>As this is the first time the program is launched, you can choose where Dash Core will store its data.</source>
         <translation>Comme il s&apos;agit du premier lancement du logiciel, vous pouvez choisir l&apos;emplacement où Dash Core sauvegardera ses données.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="59"/>
+        <location line="+10"/>
         <source>Dash Core will download and store a copy of the Dash block chain. At least %1GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
         <translation>Dash Core téléchargera et sauvegardera une copie de la chaîne de blocs Dash. Au moins %1Go de données seront sauvegardées dans ce répertoire, et cette taille augmentera avec le temps. Le portefeuille sera aussi sauvegardé dans ce répertoire.</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="69"/>
+        <location line="+10"/>
         <source>Use the default data directory</source>
         <translation>Utiliser le répertoire de données par défaut</translation>
     </message>
     <message>
-        <location filename="../forms/intro.ui" line="76"/>
+        <location line="+7"/>
         <source>Use a custom data directory:</source>
         <translation>Utiliser un répertoire de données personnalisé :</translation>
     </message>
     <message>
-        <source>Dash</source>
-        <translation type="vanished">Dash</translation>
-    </message>
-    <message>
-        <source>Error: Specified data directory &quot;%1&quot; can not be created.</source>
-        <translation type="vanished">Erreur : le répertoire de données spécifié « %1 » ne peut pas être créé.</translation>
-    </message>
-    <message>
-        <location filename="../intro.cpp" line="185"/>
+        <location filename="../intro.cpp" line="+82"/>
         <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
+        <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="186"/>
+        <location line="+1"/>
         <source>Error: Specified data directory &quot;%1&quot; cannot be created.</source>
-        <translation type="unfinished"></translation>
+        <translation>Erreur: Le répertoire de données spécifié « %1 » ne peut pas être créé.</translation>
     </message>
     <message>
-        <location filename="../intro.cpp" line="210"/>
+        <location line="+24"/>
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="219"/>
-        <source>%n GB of free space available</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
-    <message numerus="yes">
-        <location filename="../intro.cpp" line="222"/>
-        <source>(of %n GB needed)</source>
-        <translation type="unfinished">
-            <numerusform></numerusform>
-            <numerusform></numerusform>
-        </translation>
-    </message>
     <message>
-        <source>GB of free space available</source>
-        <translation type="vanished">Go d&apos;espace libre disponible</translation>
+        <location line="+9"/>
+        <source>%1 GB of free space available</source>
+        <translation>%1 Go d&apos;espace libre disponible</translation>
     </message>
     <message>
-        <source>(of %1GB needed)</source>
-        <translation type="vanished">(sur %1Go nécessaires)</translation>
+        <location line="+3"/>
+        <source>(of %1 GB needed)</source>
+        <translation>( de %1 Go nécessaire)</translation>
     </message>
 </context>
 <context>
     <name>OpenURIDialog</name>
     <message>
-        <location filename="../forms/openuridialog.ui" line="14"/>
+        <location filename="../forms/openuridialog.ui" line="+14"/>
         <source>Open URI</source>
         <translation>Ouvrir un URI</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="20"/>
+        <location line="+6"/>
         <source>Open payment request from URI or file</source>
         <translation>Ouvrir une demande de paiement à partir d&apos;un URI ou d&apos;un fichier</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="29"/>
+        <location line="+9"/>
         <source>URI:</source>
         <translation>URI :</translation>
     </message>
     <message>
-        <location filename="../forms/openuridialog.ui" line="39"/>
+        <location line="+10"/>
         <source>Select payment request file</source>
         <translation>Choisir le fichier de demande de paiement</translation>
     </message>
     <message>
-        <location filename="../openuridialog.cpp" line="48"/>
+        <location filename="../openuridialog.cpp" line="+48"/>
         <source>Select payment request file to open</source>
         <translation>Choisir le fichier de demande de paiement à ouvrir</translation>
     </message>
@@ -1529,313 +1390,286 @@ Adresse : %4
 <context>
     <name>OptionsDialog</name>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="14"/>
+        <location filename="../forms/optionsdialog.ui" line="+14"/>
         <source>Options</source>
         <translation>Options</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Main</source>
         <translation>Réglages &amp;principaux</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="33"/>
+        <location line="+6"/>
         <source>Automatically start Dash after logging in to the system.</source>
         <translation>Démarrer Dash automatiquement au démarrage du système.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="36"/>
+        <location line="+3"/>
         <source>&amp;Start Dash on system login</source>
         <translation>&amp;Démarrer Dash au démarrage du système</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="45"/>
+        <location line="+9"/>
         <source>Size of &amp;database cache</source>
         <translation>Taille du cache de la base de &amp;données</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="61"/>
+        <location line="+16"/>
         <source>MB</source>
         <translation>Mo</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="88"/>
+        <location line="+27"/>
         <source>Number of script &amp;verification threads</source>
         <translation>Nombre d&apos;exétrons de &amp;vérification de script</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="101"/>
+        <location line="+13"/>
         <source>(0 = auto, &lt;0 = leave that many cores free)</source>
         <translation>(0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="138"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Ce paramètre détermine le nombre de masternodes uniques par lesquels l&apos;anonymisation sera effectuée. Plus le nombre de cycles d&apos;anonymisation est important, plus le degré de confidentialité est élevé, mais les frais associés sont d&apos;autant plus importants.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="141"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Nombre de cycles Darksend à effectuer</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="165"/>
+        <location line="+24"/>
         <source>This amount acts as a threshold to turn off Darksend once it&apos;s reached.</source>
         <translation>Ce montant est le seuil pour désactiver Darksend dès qu&apos;il est atteint.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="180"/>
+        <location line="+15"/>
         <source>Amount of Dash to keep anonymized</source>
         <translation>Nombre de Dash à conserver anonymisés</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="206"/>
+        <location line="+26"/>
         <source>W&amp;allet</source>
         <translation>&amp;Portefeuille</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="271"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>Si vous désactivez la dépense de la monnaie non confirmée, la monnaie d&apos;une transaction&lt;br/&gt;ne peut pas être utilisée tant que cette transaction n&apos;a pas reçu au moins une confirmation.&lt;br/&gt;Ceci affecte aussi comment votre solde est calculé.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
-        <translation type="unfinished"></translation>
+        <translation>Accepter les connexions provenant de l&apos;extérieur</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="274"/>
+        <location line="+3"/>
         <source>Allow incoming connections</source>
-        <translation type="unfinished"></translation>
+        <translation>Autoriser les connexions entrantes</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="281"/>
+        <location line="+7"/>
         <source>Connect to the Dash network through a SOCKS5 proxy.</source>
-        <translation type="unfinished"></translation>
+        <translation>Se connecter au réseau Dash à travers un proxy SOCKS5.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
-        <translation type="vanished">Frais de transaction optionnel par ko qui aident à garantir un traitement rapide des transactions. La plupart des transactions utilisent 1 ko.</translation>
+        <translation>&amp;Connectez par SOCKS5 (proxy par défaut):</translation>
     </message>
     <message>
-        <source>Pay transaction &amp;fee</source>
-        <translation type="vanished">Payer des &amp;frais de transaction</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="212"/>
+        <location line="-72"/>
         <source>Expert</source>
         <translation>Expert</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="218"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Ce paramètre détermine le nombre de masternodes uniques par lesquels l&apos;anonymisation sera effectuée.&lt;br/&gt;Plus le nombre de cycles d&apos;anonymisation est important, plus le degré de confidentialité est élevé, mais les frais associés sont d&apos;autant plus importants.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Afficher ou non les fonctions de contrôle des pièces.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="221"/>
+        <location line="+3"/>
         <source>Enable coin &amp;control features</source>
         <translation>Activer les fonctions de &amp;contrôle des pièces </translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="228"/>
-        <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>Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d&apos;une transaction ne peut pas être utilisée tant que cette transaction n&apos;a pas reçu au moins une confirmation. Ceci affecte aussi comment votre solde est calculé.</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="231"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Dépenser la monnaie non confirmée</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="255"/>
+        <location line="+24"/>
         <source>&amp;Network</source>
         <translation>&amp;Réseau</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="261"/>
+        <location line="+6"/>
         <source>Automatically open the Dash client port on the router. This only works when your router supports UPnP and it is enabled.</source>
         <translation>Ouvrir automatiquement le port client Dash sur le routeur. Cela ne fonctionne que sur les routeurs supportant et ayant activé UPnP.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Map port using &amp;UPnP</source>
         <translation>Mapper le port avec l&apos;&amp;UPnP</translation>
     </message>
     <message>
-        <source>Connect to the Dash network through a SOCKS proxy.</source>
-        <translation type="vanished">Connecter au réseau Dash à travers un proxy SOCKS.</translation>
-    </message>
-    <message>
-        <source>&amp;Connect through SOCKS proxy (default proxy):</source>
-        <translation type="vanished">Se &amp;connecter par un mandataire SOCKS (mandataire par défaut) :</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="293"/>
+        <location line="+29"/>
         <source>Proxy &amp;IP:</source>
         <translation>&amp;IP du serveur mandataire :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="318"/>
+        <location line="+25"/>
         <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
         <translation>Adresse IP du mandataire (par ex. IPv4 : 127.0.0.1 / IPv6 : ::1)</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="325"/>
+        <location line="+7"/>
         <source>&amp;Port:</source>
         <translation>&amp;Port :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="350"/>
+        <location line="+25"/>
         <source>Port of the proxy (e.g. 9050)</source>
         <translation>Port du serveur mandataire (par ex. 9050)</translation>
     </message>
     <message>
-        <source>SOCKS &amp;Version:</source>
-        <translation type="vanished">&amp;Version SOCKS :</translation>
-    </message>
-    <message>
-        <source>SOCKS version of the proxy (e.g. 5)</source>
-        <translation type="vanished">Version SOCKS du serveur mandataire (par ex. 5)</translation>
-    </message>
-    <message>
-        <location filename="../forms/optionsdialog.ui" line="386"/>
+        <location line="+36"/>
         <source>&amp;Window</source>
         <translation>&amp;Fenêtre</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="392"/>
+        <location line="+6"/>
         <source>Show only a tray icon after minimizing the window.</source>
         <translation>Afficher uniquement une icône système après minimisation.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="395"/>
+        <location line="+3"/>
         <source>&amp;Minimize to the tray instead of the taskbar</source>
         <translation>&amp;Minimiser dans la barre système au lieu de la barre des tâches</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="402"/>
+        <location line="+7"/>
         <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
         <translation>Minimiser au lieu de quitter l&apos;application lorsque la fenêtre est fermée. Si cette option est activée, l&apos;application ne pourra être fermée qu&apos;en sélectionnant Quitter dans le menu.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="405"/>
+        <location line="+3"/>
         <source>M&amp;inimize on close</source>
         <translation>M&amp;inimiser lors de la fermeture</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="426"/>
+        <location line="+21"/>
         <source>&amp;Display</source>
         <translation>&amp;Affichage</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="434"/>
+        <location line="+8"/>
         <source>User Interface &amp;language:</source>
         <translation>&amp;Langue de l&apos;interface utilisateur :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="447"/>
+        <location line="+13"/>
         <source>The user interface language can be set here. This setting will take effect after restarting Dash.</source>
         <translation>La langue de l&apos;interface utilisateur peut être modifiée ici. Ce paramètre sera pris en compte au redémarrage de Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="468"/>
+        <location line="+21"/>
         <source>Language missing or translation incomplete? Help contributing translations here:
 https://www.transifex.com/projects/p/dash/</source>
         <translation>Langage manquant ou traduction incomplète ? Participez aux traductions ici :
 https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="487"/>
+        <location line="+19"/>
         <source>User Interface Theme:</source>
-        <translation type="unfinished"></translation>
+        <translation>Thème d&apos;Interface de l&apos;utilisateur :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="508"/>
+        <location line="+21"/>
         <source>&amp;Unit to show amounts in:</source>
         <translation>&amp;Unité d&apos;affichage des montants :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="521"/>
+        <location line="+13"/>
         <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
         <translation>Choisissez la sous-unité par défaut pour l&apos;affichage dans l&apos;interface et lors de l&apos;envoi de pièces.</translation>
     </message>
     <message>
-        <source>Whether to show Dash addresses in the transaction list or not.</source>
-        <translation type="vanished">Afficher ou non les adresses Dash dans la liste des transactions.</translation>
-    </message>
-    <message>
-        <source>&amp;Display addresses in transaction list</source>
-        <translation type="vanished">&amp;Afficher les adresses sur la liste des transactions</translation>
+        <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Nombre de décimales</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="532"/>
-        <location filename="../forms/optionsdialog.ui" line="545"/>
+        <location line="+14"/>
+        <location line="+13"/>
         <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 de tiers (par ex. un explorateur de blocs) apparaissant dans l&apos;onglet des transactions comme éléments du menu contextuel. %s dans l&apos;URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="535"/>
+        <location line="-10"/>
         <source>Third party transaction URLs</source>
         <translation>URL de transaction d&apos;un tiers</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="576"/>
+        <location line="+41"/>
         <source>Active command-line options that override above options:</source>
         <translation>Options actives de ligne de commande qui annulent les options ci-dessus :</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="619"/>
+        <location line="+43"/>
         <source>Reset all client options to default.</source>
         <translation>Réinitialiser toutes les options du client aux valeurs par défaut.</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="622"/>
+        <location line="+3"/>
         <source>&amp;Reset Options</source>
         <translation>&amp;Réinitialisation des options</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="683"/>
+        <location line="+61"/>
         <source>&amp;OK</source>
         <translation>&amp;OK</translation>
     </message>
     <message>
-        <location filename="../forms/optionsdialog.ui" line="696"/>
+        <location line="+13"/>
         <source>&amp;Cancel</source>
         <translation>A&amp;nnuler</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>par défaut</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="144"/>
+        <location line="+60"/>
         <source>none</source>
         <translation>aucune</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="228"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Confirmer la réinitialisation des options</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
-        <location filename="../optionsdialog.cpp" line="259"/>
+        <location line="+1"/>
+        <location line="+30"/>
         <source>Client restart required to activate changes.</source>
         <translation>Le redémarrage du client est nécessaire pour activer les changements.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="229"/>
+        <location line="-30"/>
         <source>Client will be shutdown, do you want to proceed?</source>
         <translation>Le client sera arrêté, voulez-vous continuer?</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="263"/>
+        <location line="+34"/>
         <source>This change would require a client restart.</source>
         <translation>Ce changement nécessite un redémarrage du client.</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="288"/>
+        <location line="+25"/>
         <source>The supplied proxy address is invalid.</source>
         <translation>L&apos;adresse de serveur mandataire fournie est invalide.</translation>
     </message>
@@ -1843,368 +1677,291 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>OverviewPage</name>
     <message>
-        <location filename="../forms/overviewpage.ui" line="20"/>
+        <location filename="../forms/overviewpage.ui" line="+20"/>
         <source>Form</source>
         <translation>Formulaire</translation>
     </message>
     <message>
-        <source>Wallet</source>
-        <translation type="vanished">Portefeuille</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="73"/>
-        <location filename="../forms/overviewpage.ui" line="1088"/>
-        <location filename="../forms/overviewpage.ui" line="1165"/>
+        <location line="+53"/>
+        <location line="+1015"/>
+        <location line="+77"/>
         <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Dash network after a connection is established, but this process has not completed yet.</source>
         <translation>L&apos;information affichée peut être obsolète. Votre portefeuille se synchronise automatiquement avec le réseau Dash lorsque la connection est établie, mais le process n&apos;est pas encore terminé.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="322"/>
+        <location line="-843"/>
         <source>Available:</source>
         <translation>Disponible :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="338"/>
+        <location line="+16"/>
         <source>Your current spendable balance</source>
         <translation>Votre solde actuel pouvant être dépensé</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="379"/>
+        <location line="+41"/>
         <source>Pending:</source>
         <translation>En attente :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="143"/>
+        <location line="-236"/>
         <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
         <translation>Total des transactions qui doivent encore être confirmées et qu&apos;il n&apos;est pas encore possible de dépenser</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="255"/>
+        <location line="+112"/>
         <source>Immature:</source>
         <translation>Immature :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="226"/>
+        <location line="-29"/>
         <source>Mined balance that has not yet matured</source>
         <translation>Le solde généré n&apos;est pas encore mûr</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="63"/>
+        <location line="-163"/>
         <source>Balances</source>
-        <translation type="unfinished"></translation>
+        <translation>soldes</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="118"/>
+        <location line="+55"/>
         <source>Unconfirmed transactions to watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Transactions non confirmés d&apos;adresses en lecture seule</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="168"/>
+        <location line="+50"/>
         <source>Mined balance in watch-only addresses that has not yet matured</source>
-        <translation type="unfinished"></translation>
+        <translation>Solde miné pour les adresses en lecture seule qui n&apos;ont pas encore mûri</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="210"/>
+        <location line="+42"/>
         <source>Total:</source>
         <translation>Total :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="271"/>
+        <location line="+61"/>
         <source>Your current total balance</source>
         <translation>Votre solde total actuel</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="296"/>
+        <location line="+25"/>
         <source>Current total balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Solde total actuel pour les adresses en lecture seule</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="312"/>
+        <location line="+16"/>
         <source>Watch-only:</source>
-        <translation type="unfinished"></translation>
+        <translation>Lecture seule:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="363"/>
+        <location line="+51"/>
         <source>Your current balance in watch-only addresses</source>
-        <translation type="unfinished"></translation>
+        <translation>Votre solde actuel pour adresses en lecture seule</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="386"/>
+        <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"></translation>
+        <translation>Disponible:</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="437"/>
+        <location line="+51"/>
         <source>Status:</source>
         <translation>Status :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="444"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Activé/Désactivé</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="451"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Complétude :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="471"/>
+        <location line="+20"/>
         <source>Darksend Balance:</source>
         <translation>Balance Darksend :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="484"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="491"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Montant et Cycles</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="498"/>
+        <location line="+7"/>
         <source>0 DASH / 0 Rounds</source>
         <translation>0 DASH / 0 Cycles</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="505"/>
+        <location line="+7"/>
         <source>Submitted Denom:</source>
         <translation>Denom soumis :</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="512"/>
-        <source>The denominations you submitted to the Masternode. To mix, other users must submit the exact same denominations.</source>
-        <translation>Les dénominations que vous avez soumises au Masternode. Pour mélanger, les autres utilisateurs doivent soumettre exactement les mêmes dénominations.</translation>
-    </message>
-    <message>
-        <location filename="../forms/overviewpage.ui" line="515"/>
+        <location line="+10"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1081"/>
-        <location filename="../overviewpage.cpp" line="495"/>
-        <location filename="../overviewpage.cpp" line="509"/>
-        <location filename="../overviewpage.cpp" line="523"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
+        <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1155"/>
+        <location line="+74"/>
         <source>Recent transactions</source>
-        <translation type="unfinished"></translation>
+        <translation>Transactions récentes</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="974"/>
+        <location line="-181"/>
         <source>Start/Stop Mixing</source>
         <translation>Démarrer/Arrêtér le mélange</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1006"/>
+        <location line="-469"/>
+        <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
+        <translation>Les dénominations que vous avez soumises à la Masternode.&lt;br&gt;Pour mélanger, d&apos;autres utilisateurs doivent soumettre les mêmes dénominations.</translation>
+    </message>
+    <message>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Dernier Message)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1031"/>
+        <location line="+25"/>
         <source>Try to manually submit a Darksend request.</source>
         <translation>Essayer de soumettre manuellement une requête Darksend.</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1034"/>
+        <location line="+3"/>
         <source>Try Mix</source>
         <translation>Essayer le mélange</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1053"/>
+        <location line="+19"/>
         <source>Reset the current status of Darksend (can interrupt Darksend if it&apos;s in the process of Mixing, which can cost you money!)</source>
         <translation>Réinitialiser le statut de Darksend (peut interrompre Darksend si le process de mélange est en cours, ce qui peut vous coûter de l&apos;argent !)</translation>
     </message>
     <message>
-        <location filename="../forms/overviewpage.ui" line="1059"/>
+        <location line="+6"/>
         <source>Reset</source>
         <translation>Réinitialiser</translation>
     </message>
     <message>
-        <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source>
-        <translation type="vanished">&lt;b&gt;Transactions récentes&lt;/b&gt;</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="139"/>
-        <location filename="../overviewpage.cpp" line="140"/>
-        <location filename="../overviewpage.cpp" line="141"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>out of sync</source>
         <translation>désynchronisé</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="156"/>
-        <location filename="../overviewpage.cpp" line="392"/>
+        <location line="+6"/>
+        <location line="+1"/>
+        <location line="+1"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Désactivé</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="159"/>
-        <location filename="../overviewpage.cpp" line="394"/>
-        <location filename="../overviewpage.cpp" line="537"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Démarrer le mélange Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="161"/>
-        <location filename="../overviewpage.cpp" line="539"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Arrêter le mélange Darksend</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="312"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Aucune entrée détectée</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="320"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Détection de sorties dénominées non confirmées, attente de leur confirmation pour recalculer.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="377"/>
-        <source>Rounds</source>
-        <translation>Cycles</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="408"/>
-        <source>Enabled</source>
-        <translation>Activé</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="436"/>
-        <location filename="../overviewpage.cpp" line="437"/>
-        <location filename="../overviewpage.cpp" line="438"/>
-        <source>Submitted to masternode, waiting for more entries</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="442"/>
-        <location filename="../overviewpage.cpp" line="443"/>
-        <location filename="../overviewpage.cpp" line="444"/>
-        <source>Found enough users, signing ( waiting</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="456"/>
-        <location filename="../overviewpage.cpp" line="457"/>
-        <location filename="../overviewpage.cpp" line="458"/>
-        <source>Submitted to masternode, waiting in queue</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="466"/>
-        <source>Last Darksend message:
-</source>
-        <translation>Dernier message de Darksend:
-</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="419"/>
-        <location filename="../overviewpage.cpp" line="448"/>
-        <source>Darksend is idle.</source>
-        <translation>Darksend est inactif.</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="423"/>
-        <source>Mixing in progress...</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="429"/>
-        <source>Darksend request complete: Your transaction was accepted into the pool!</source>
-        <translation>Requête de Darksend terminée : Votre transaction a été acceptée dans le pool!</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="435"/>
-        <source>Submitted following entries to masternode:</source>
-        <translation>Les entrées suivantes ont été envoyées au masternode:</translation>
-    </message>
-    <message>
-        <source>Submitted to masternode, Waiting for more entries</source>
-        <translation type="vanished">Envoyé au masternode, Attente d&apos;entrées supplémentaires</translation>
-    </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="441"/>
-        <source>Found enough users, signing ...</source>
-        <translation>Nombre suffisant d&apos;utilisateurs trouvé, signature ...</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting. )</source>
-        <translation type="vanished">Nombre suffisant d&apos;utilisateurs trouvé, signature ( attente. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting.. )</source>
-        <translation type="vanished">Nombre suffisant d&apos;utilisateurs trouvé, signature ( attente.. )</translation>
-    </message>
-    <message>
-        <source>Found enough users, signing ( waiting... )</source>
-        <translation type="vanished">Nombre suffisant d&apos;utilisateurs trouvé, signature ( attente... )</translation>
+    <message numerus="yes">
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
+        <source>%n Rounds</source>
+        <translation><numerusform>%n Cycle</numerusform><numerusform>%n Cycles</numerusform></translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="446"/>
-        <source>Transmitting final transaction.</source>
-        <translation>Transmission de la transaction finale.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Pas assez d&apos;entrées compatibles pour anonymiser &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;, &lt;br&gt;nous allons anonymiser &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; à la place</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="450"/>
-        <source>Finalizing transaction.</source>
-        <translation>Finalisation de la transaction.</translation>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Progrès global</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Darksend request incomplete:</source>
-        <translation>Requête Darksend incomplète.</translation>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Dénommées</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="452"/>
-        <source>Will retry...</source>
-        <translation>Va réessayer ...</translation>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Anonymisés</translation>
     </message>
-    <message>
-        <location filename="../overviewpage.cpp" line="454"/>
-        <source>Darksend request complete:</source>
-        <translation>Requête Darksend complète :</translation>
+    <message numerus="yes">
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Les entrées dénommées ont %5 sur %n cycles en moyennes</numerusform><numerusform>Les entrées dénommées ont %5 sur %n cycles en moyennes</numerusform></translation>
     </message>
     <message>
-        <source>Submitted to masternode, waiting in queue .</source>
-        <translation type="vanished">Soumis au masternode, dans la file d&apos;attente .</translation>
+        <location line="-48"/>
+        <source>Found enough compatible inputs to anonymize %1</source>
+        <translation>Assez d&apos;entrées compatibles trouvées pour anonymiser %1</translation>
     </message>
     <message>
-        <source>Submitted to masternode, waiting in queue ..</source>
-        <translation type="vanished">Soumis au masternode, dans la file d&apos;attente ..</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Mélangés</translation>
     </message>
     <message>
-        <source>Submitted to masternode, waiting in queue ...</source>
-        <translation type="vanished">Soumis au masternode, dans la file d&apos;attente ...</translation>
+        <location line="+40"/>
+        <source>Enabled</source>
+        <translation>Activé</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="460"/>
-        <source>Unknown state:</source>
-        <translation>Etat inconnu :</translation>
+        <location line="+5"/>
+        <source>Last Darksend message:
+</source>
+        <translation>Dernier message de Darksend:
+</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="474"/>
+        <location line="+8"/>
         <source>N/A</source>
         <translation>N.D.</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="496"/>
+        <location line="+18"/>
         <source>Darksend was successfully reset.</source>
         <translation>Darksend est réinitialisé avec succès</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="510"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Pour ne pas voir les transactions/frais Darksend internes sélectionnez &quot;Les plus Communes&quot; comme Type dans l&apos;onglet &quot;Transactions&quot;</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend nécessite au moins %1 pour l&apos;utiliser</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="524"/>
+        <location line="+14"/>
         <source>Wallet is locked and user declined to unlock. Disabling Darksend.</source>
         <translation>Le portefeuille est vérouillé et l&apos;utilisateur a refusé de le débloquer. Désactivation de Darksend.</translation>
     </message>
@@ -2212,141 +1969,121 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PaymentServer</name>
     <message>
-        <location filename="../paymentserver.cpp" line="318"/>
-        <location filename="../paymentserver.cpp" line="544"/>
-        <location filename="../paymentserver.cpp" line="578"/>
-        <location filename="../paymentserver.cpp" line="687"/>
-        <location filename="../paymentserver.cpp" line="701"/>
-        <location filename="../paymentserver.cpp" line="719"/>
+        <location filename="../paymentserver.cpp" line="+318"/>
+        <location line="+226"/>
+        <location line="+34"/>
+        <location line="+109"/>
+        <location line="+14"/>
+        <location line="+18"/>
         <source>Payment request error</source>
         <translation>Erreur de demande de paiement</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="319"/>
+        <location line="-400"/>
         <source>Cannot start dash: click-to-pay handler</source>
         <translation>Impossible de démarrer dash: click-to-pay le gestionnaire</translation>
     </message>
     <message>
-        <source>Net manager warning</source>
-        <translation type="vanished">Avertissement du gestionnaire de réseau</translation>
-    </message>
-    <message>
-        <source>Your active proxy doesn&apos;t support SOCKS5, which is required for payment requests via proxy.</source>
-        <translation type="vanished">Votre serveur mandataire actif ne prend pas en charge SOCKS5 ce qui est exigé pour les demandes de paiements par serveur mandataire.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="423"/>
-        <location filename="../paymentserver.cpp" line="437"/>
-        <location filename="../paymentserver.cpp" line="444"/>
+        <location line="+104"/>
+        <location line="+14"/>
+        <location line="+7"/>
         <source>URI handling</source>
         <translation>Gestion des URIs</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="424"/>
+        <location line="-20"/>
         <source>Payment request fetch URL is invalid: %1</source>
         <translation>L&apos;URL de récupération de la demande de paiement est invalide : %1</translation>
     </message>
     <message>
-        <source>URI can not be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="vanished">L&apos;URI ne peut être analysé ! Ceci peut être causé par une adresse Dash invalide ou par des paramètres d&apos;URI mal composé.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="458"/>
+        <location line="+34"/>
         <source>Payment request file handling</source>
         <translation>Gestion des fichiers de demande de paiement</translation>
     </message>
     <message>
-        <source>Payment request file can not be read or processed! This can be caused by an invalid payment request file.</source>
-        <translation type="vanished">Le fichier de demande de paiement ne peut pas être lu ou traité ! Ceci peut être causé par un fichier de demande de paiement invalide.</translation>
-    </message>
-    <message>
-        <location filename="../paymentserver.cpp" line="437"/>
+        <location line="-21"/>
         <source>Invalid payment address %1</source>
-        <translation type="unfinished">Adresse de paiement invalide %1</translation>
+        <translation>Adresse de paiement %1 invalide</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="445"/>
+        <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;URI ne peut être analysé ! Ceci peut être causé par une adresse Dash invalide ou par des paramètres d&apos;URI mal composé.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="459"/>
+        <location line="+14"/>
         <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
-        <translation type="unfinished"></translation>
+        <translation>Le fichier de demande de paiement ne peut pas être lu ou traité ! Ceci peut être causé par un fichier de demande de paiement invalide.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
-        <location filename="../paymentserver.cpp" line="537"/>
-        <location filename="../paymentserver.cpp" line="569"/>
+        <location line="+69"/>
+        <location line="+9"/>
+        <location line="+32"/>
         <source>Payment request rejected</source>
-        <translation type="unfinished"></translation>
+        <translation>La demande de paiement a été rejetée</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="528"/>
+        <location line="-41"/>
         <source>Payment request network doesn&apos;t match client network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Le réseau de la demande de paiement ne correspond pas au réseau du client</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="537"/>
+        <location line="+9"/>
         <source>Payment request has expired.</source>
-        <translation type="unfinished"></translation>
+        <translation>La demande de paiement a expiré</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="544"/>
+        <location line="+7"/>
         <source>Payment request is not initialized.</source>
-        <translation type="unfinished"></translation>
+        <translation>La demande de paiement n&apos;est pas initialisée</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="570"/>
+        <location line="+26"/>
         <source>Unverified payment requests to custom payment scripts are unsupported.</source>
         <translation>Les demandes de paiements non vérifiées à des scripts de paiement personnalisés ne sont pas prises en charge.</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="578"/>
+        <location line="+8"/>
         <source>Requested payment amount of %1 is too small (considered dust).</source>
         <translation>Le paiement demandé d&apos;un montant de %1 est trop faible (considéré comme de la poussière).</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="628"/>
+        <location line="+50"/>
         <source>Refund from %1</source>
         <translation>Remboursement de %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="671"/>
+        <location line="+43"/>
         <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
-        <translation type="unfinished"></translation>
+        <translation>La demande de paiement %1 est trop volumineuse (%2 octets sur %3 permis)</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="677"/>
+        <location line="+6"/>
         <source>Payment request DoS protection</source>
-        <translation type="unfinished"></translation>
+        <translation>Protection DoS de la demande de paiement</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="682"/>
+        <location line="+5"/>
         <source>Error communicating with %1: %2</source>
         <translation>Erreur de communication avec %1 : %2</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="702"/>
+        <location line="+20"/>
         <source>Payment request cannot be parsed!</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>Payment request can not be parsed or processed!</source>
-        <translation type="vanished">La demande de paiement ne peut pas être analysée ou traitée !</translation>
+        <translation>La demande de paiement ne peux pas être analyzée!</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="715"/>
+        <location line="+13"/>
         <source>Bad response from server %1</source>
         <translation>Mauvaise réponse du serveur %1</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="737"/>
+        <location line="+22"/>
         <source>Network request error</source>
         <translation>Erreur de demande réseau</translation>
     </message>
     <message>
-        <location filename="../paymentserver.cpp" line="748"/>
+        <location line="+11"/>
         <source>Payment acknowledged</source>
         <translation>Le paiement a été confirmé</translation>
     </message>
@@ -2354,139 +2091,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>PeerTableModel</name>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location filename="../peertablemodel.cpp" line="+118"/>
         <source>Address/Hostname</source>
-        <translation type="unfinished"></translation>
+        <translation>Adresse/Nom d&apos;hôte</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agent de l&apos;utilisateur</translation>
     </message>
     <message>
-        <location filename="../peertablemodel.cpp" line="118"/>
+        <location line="+0"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Temps de Ping</translation>
     </message>
 </context>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../dash.cpp" line="596"/>
-        <source>Dash</source>
-        <translation>Le Dash</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="558"/>
-        <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
-        <translation>Erreur : le répertoire de données spécifié « %1 » n&apos;existe pas.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="557"/>
-        <location filename="../dash.cpp" line="564"/>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Dash Core</source>
-        <translation type="unfinished">Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="565"/>
-        <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
-        <translation>Erreur : impossible d&apos;analyser le fichier de configuration : %1. N’utilisez que la syntaxe clef=valeur.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="597"/>
-        <source>Error reading masternode configuration file: %1</source>
-        <translation>Erreur de lecture du fichier de configuration du masternode: %1</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="577"/>
-        <source>Error: Invalid combination of -regtest and -testnet.</source>
-        <translation>Erreur : combinaison invalide de -regtest et de -testnet.</translation>
-    </message>
-    <message>
-        <location filename="../dash.cpp" line="643"/>
-        <source>Dash Core didn&apos;t yet exit safely...</source>
-        <translation>Dash Core ne s&apos;est pas encore arrêté en toute sécurité...</translation>
-    </message>
-    <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Entrez une adresse Dash (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../bitcoinunits.cpp" line="256"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
-        <translation type="unfinished">Montant</translation>
+        <translation>Montant</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="110"/>
+        <location filename="../guiutil.cpp" line="+110"/>
         <source>Enter a Dash address (e.g. %1)</source>
-        <translation type="unfinished"></translation>
+        <translation>Entrez une adresse Dash (e.g. %1)</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="858"/>
+        <location line="+760"/>
         <source>%1 d</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 j</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="860"/>
+        <location line="+2"/>
         <source>%1 h</source>
-        <translation type="unfinished">%1 h</translation>
+        <translation>%1 h</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="862"/>
+        <location line="+2"/>
         <source>%1 m</source>
-        <translation type="unfinished">%1 min</translation>
+        <translation>%1 m</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="864"/>
+        <location line="+2"/>
         <source>%1 s</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 s</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="881"/>
+        <location line="+17"/>
         <source>NETWORK</source>
-        <translation type="unfinished"></translation>
+        <translation>RÉSEAU</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="884"/>
+        <location line="+3"/>
         <source>UNKNOWN</source>
-        <translation type="unfinished"></translation>
+        <translation>INCONNU</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="892"/>
+        <location line="+8"/>
         <source>None</source>
-        <translation type="unfinished"></translation>
+        <translation>Aucun</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+5"/>
         <source>N/A</source>
-        <translation type="unfinished">N.D.</translation>
+        <translation>N.D.</translation>
     </message>
     <message>
-        <location filename="../guiutil.cpp" line="897"/>
+        <location line="+0"/>
         <source>%1 ms</source>
-        <translation type="unfinished"></translation>
+        <translation>%1 ms</translation>
     </message>
 </context>
 <context>
     <name>QRImageWidget</name>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="36"/>
+        <location filename="../receiverequestdialog.cpp" line="+36"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Sauvegarder l&apos;image...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="39"/>
+        <location line="+3"/>
         <source>&amp;Copy Image</source>
         <translation>&amp;Copier l&apos;image</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+32"/>
         <source>Save QR Code</source>
         <translation>Sauvegarder le code QR</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="71"/>
+        <location line="+0"/>
         <source>PNG Image (*.png)</source>
         <translation>Image PNG (*.png)</translation>
     </message>
@@ -2494,436 +2190,499 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RPCConsole</name>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="14"/>
+        <location filename="../forms/rpcconsole.ui" line="+14"/>
         <source>Tools window</source>
         <translation>Fenêtre des outils</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="24"/>
+        <location line="+10"/>
         <source>&amp;Information</source>
         <translation>&amp;Informations</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="249"/>
-        <source>Masternode Count</source>
-        <translation>Compteur de Masternodes</translation>
-    </message>
-    <message>
-        <location filename="../forms/rpcconsole.ui" line="39"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Général</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="203"/>
+        <location line="+204"/>
         <source>Name</source>
         <translation>Nom</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="46"/>
+        <location line="-197"/>
         <source>Client name</source>
         <translation>Nom du client</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="56"/>
-        <location filename="../forms/rpcconsole.ui" line="79"/>
-        <location filename="../forms/rpcconsole.ui" line="105"/>
-        <location filename="../forms/rpcconsole.ui" line="131"/>
-        <location filename="../forms/rpcconsole.ui" line="154"/>
-        <location filename="../forms/rpcconsole.ui" line="177"/>
-        <location filename="../forms/rpcconsole.ui" line="213"/>
-        <location filename="../forms/rpcconsole.ui" line="236"/>
-        <location filename="../forms/rpcconsole.ui" line="256"/>
-        <location filename="../forms/rpcconsole.ui" line="286"/>
-        <location filename="../forms/rpcconsole.ui" line="309"/>
-        <location filename="../forms/rpcconsole.ui" line="774"/>
-        <location filename="../forms/rpcconsole.ui" line="797"/>
-        <location filename="../forms/rpcconsole.ui" line="820"/>
-        <location filename="../forms/rpcconsole.ui" line="843"/>
-        <location filename="../forms/rpcconsole.ui" line="866"/>
-        <location filename="../forms/rpcconsole.ui" line="889"/>
-        <location filename="../forms/rpcconsole.ui" line="912"/>
-        <location filename="../forms/rpcconsole.ui" line="935"/>
-        <location filename="../forms/rpcconsole.ui" line="958"/>
-        <location filename="../forms/rpcconsole.ui" line="981"/>
-        <location filename="../forms/rpcconsole.ui" line="1004"/>
-        <location filename="../forms/rpcconsole.ui" line="1027"/>
-        <location filename="../forms/rpcconsole.ui" line="1050"/>
+        <location line="-36"/>
+        <location line="+10"/>
+        <location line="+36"/>
+        <location line="+30"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+62"/>
+        <location line="+23"/>
+        <location line="+36"/>
+        <location line="+26"/>
+        <location line="+23"/>
+        <location line="+425"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
+        <location line="+23"/>
         <source>N/A</source>
         <translation>N.D.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="226"/>
+        <location line="-927"/>
         <source>Number of connections</source>
         <translation>Nombre de connexions</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="348"/>
+        <location line="+76"/>
         <source>Open the Dash debug log file from the current data directory. This can take a few seconds for large log files.</source>
         <translation>Ouvrir le fichier de debug Dash depuis le répertoire de données actuel. Ceci peut prendre plusieurs secondes pour un fichier de debug imposant.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="351"/>
+        <location line="+3"/>
         <source>&amp;Open</source>
         <translation>&amp;Ouvrir</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="167"/>
+        <location line="-56"/>
         <source>Startup time</source>
         <translation>Heure de démarrage</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="196"/>
+        <location line="+137"/>
         <source>Network</source>
         <translation>Réseau</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="299"/>
+        <location line="-91"/>
         <source>Last block time</source>
         <translation>Horodatage du dernier bloc</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="341"/>
+        <location line="+26"/>
         <source>Debug log file</source>
         <translation>Journal de débogage</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="92"/>
+        <location line="+95"/>
         <source>Using OpenSSL version</source>
         <translation>Version d&apos;OpenSSL utilisée</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="144"/>
+        <location line="-197"/>
         <source>Build date</source>
         <translation>Date de compilation</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="276"/>
+        <location line="+53"/>
         <source>Current number of blocks</source>
         <translation>Nombre actuel de blocs</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="69"/>
+        <location line="+85"/>
         <source>Client version</source>
         <translation>Version du client</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="118"/>
+        <location line="+108"/>
         <source>Using BerkeleyDB version</source>
-        <translation type="unfinished"></translation>
+        <translation>Version BerkeleyDB utilisée</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="269"/>
+        <location line="-312"/>
         <source>Block chain</source>
         <translation>Chaîne de blocs</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="375"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Nombre de Masternodes</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="424"/>
+        <location line="+49"/>
         <source>Clear console</source>
         <translation>Nettoyer la console</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="447"/>
+        <location line="+23"/>
         <source>&amp;Network Traffic</source>
         <translation>Trafic &amp;réseau</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="499"/>
+        <location line="+52"/>
         <source>&amp;Clear</source>
         <translation>&amp;Nettoyer</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="515"/>
+        <location line="+16"/>
         <source>Totals</source>
         <translation>Totaux</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="579"/>
+        <location line="+64"/>
         <source>Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Reçus</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="659"/>
+        <location line="+80"/>
         <source>Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Envoyés</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="700"/>
+        <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"></translation>
+        <translation>Liste des &amp;Pairs</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="739"/>
-        <location filename="../rpcconsole.cpp" line="237"/>
-        <location filename="../rpcconsole.cpp" line="594"/>
+        <location line="+41"/>
+        <location filename="../rpcconsole.cpp" line="+252"/>
+        <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"></translation>
+        <translation>Choisir un pair pour voir les informations détaillées.</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="764"/>
+        <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"></translation>
+        <translation>Direction</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="787"/>
+        <location line="+23"/>
         <source>Version</source>
-        <translation type="unfinished"></translation>
+        <translation>Version</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="810"/>
+        <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"></translation>
+        <translation>Agent de l&apos;utilisateur</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="833"/>
+        <location line="+23"/>
         <source>Services</source>
-        <translation type="unfinished"></translation>
+        <translation>Services</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="856"/>
+        <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Hauteur de Démarrage</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="879"/>
+        <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"></translation>
+        <translation>Hauteur de Synchro</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="902"/>
+        <location line="+23"/>
         <source>Ban Score</source>
-        <translation type="unfinished"></translation>
+        <translation>Score d&apos;interdiction</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="925"/>
+        <location line="+23"/>
         <source>Connection Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Temps de Connexion</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="948"/>
+        <location line="+23"/>
         <source>Last Send</source>
-        <translation type="unfinished"></translation>
+        <translation>Dernier Envoi</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="971"/>
+        <location line="+23"/>
         <source>Last Receive</source>
-        <translation type="unfinished"></translation>
+        <translation>Dernière Reception</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="994"/>
+        <location line="+23"/>
         <source>Bytes Sent</source>
-        <translation type="unfinished"></translation>
+        <translation>Octets Envoyés</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1017"/>
+        <location line="+23"/>
         <source>Bytes Received</source>
-        <translation type="unfinished"></translation>
+        <translation>Octets Reçus</translation>
     </message>
     <message>
-        <location filename="../forms/rpcconsole.ui" line="1040"/>
+        <location line="+23"/>
         <source>Ping Time</source>
-        <translation type="unfinished"></translation>
+        <translation>Temps de Ping</translation>
+    </message>
+    <message>
+        <location line="+40"/>
+        <source>&amp;Wallet Repair</source>
+        <translation>&amp;Réparation de Portefeuille</translation>
+    </message>
+    <message>
+        <location line="+18"/>
+        <source>Salvage wallet</source>
+        <translation>Sauvetage de portefeuille</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Rescan blockchain files</source>
+        <translation>Scanner à nouveau les fichiers de la chaîne de blocs</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 1</source>
+        <translation>Récupérer les transactions 1</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Recover transactions 2</source>
+        <translation>Récupérer les transactions 2</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>Upgrade wallet format</source>
+        <translation>Mise à jour du format du portefeuille</translation>
+    </message>
+    <message>
+        <location line="+19"/>
+        <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
+        <translation>Les boutons ci-dessous redémarreront le portefeuille avec des paramètres de ligne de commande pour réparer le portefeuille, corriger des problèmes de fichiers corrompus de chaine de blocs ou de transactions manquantes ou obsolètes</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
+        <translation>-salvagewallet: Tenter de récupérer les clés privées d&apos;un wallet.dat corrompu</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
+        <translation>-rescan: Réanalyser la chaine de blocs pour les transactions de portefeuille manquantes</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
+        <translation>-zapwallettxes=1: Récupère les transactions depuis la chaine de blocs (en gardant les méta-données, ex. le nom du compte).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
+        <translation>-zapwallettxes=2: Récupère les transactions depuis la chaine de blocs (sans garder les méta-données).</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
+        <translation>-upgradewallet: Mise à jour du format du fichier wallet.dat vers la dernière version au démarrage. (Note: ce n&apos;est PAS une mise à jour du logiciel portefeuille!)</translation>
+    </message>
+    <message>
+        <location line="+23"/>
+        <source>Wallet repair options.</source>
+        <translation>Options de réparation du  portefeuille.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Rebuild index</source>
+        <translation>Reconstruire l&apos;index</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
+        <translation>-reindex: Reconstruire l&apos;index de la chaine de blocs à partir des fichiers blk000??.dat actuels.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="402"/>
+        <location filename="../rpcconsole.cpp" line="-203"/>
         <source>In:</source>
         <translation>Entrant :</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="403"/>
+        <location line="+1"/>
         <source>Out:</source>
         <translation>Sortant :</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="368"/>
+        <location line="-35"/>
         <source>Welcome to the Dash RPC console.</source>
         <translation>Bienvenue sur la console RPC de Dash.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="369"/>
+        <location line="+1"/>
         <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
         <translation>Utiliser les touches de curseur pour naviguer dans l&apos;historique et &lt;b&gt;Ctrl-L&lt;/b&gt; pour effacer l&apos;écran.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="370"/>
+        <location line="+1"/>
         <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
         <translation>Taper &lt;b&gt;help&lt;/b&gt; pour afficher une vue générale des commandes disponibles.</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="509"/>
+        <location line="+139"/>
         <source>%1 B</source>
         <translation>%1 o</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="511"/>
+        <location line="+2"/>
         <source>%1 KB</source>
         <translation>%1 Ko</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="513"/>
+        <location line="+2"/>
         <source>%1 MB</source>
         <translation>%1 Mo</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="515"/>
+        <location line="+2"/>
         <source>%1 GB</source>
         <translation>%1 Go</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="632"/>
+        <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"></translation>
+        <translation>via %1</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="635"/>
-        <location filename="../rpcconsole.cpp" line="636"/>
+        <location line="+3"/>
+        <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"></translation>
+        <translation>jamais</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Arrivant</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="643"/>
+        <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"></translation>
+        <translation>Sortant</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="656"/>
+        <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"></translation>
+        <translation>Inconnus</translation>
     </message>
     <message>
-        <location filename="../rpcconsole.cpp" line="658"/>
-        <location filename="../rpcconsole.cpp" line="659"/>
+        <location line="+2"/>
+        <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"></translation>
+        <translation>Récupération...</translation>
     </message>
+</context>
+<context>
+    <name>ReceiveCoinsDialog</name>
     <message>
-        <source>%1 m</source>
-        <translation type="vanished">%1 min</translation>
+        <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Réutilise une adresse de réception précédemment utilisée.&lt;br&gt;Réutiliser une adresse pose des problèmes de sécurité et de vie privée.&lt;br&gt;N&apos;utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite.</translation>
     </message>
     <message>
-        <source>%1 h</source>
-        <translation type="vanished">%1 h</translation>
-    </message>
-    <message>
-        <source>%1 h %2 m</source>
-        <translation type="vanished">%1 h %2 min</translation>
-    </message>
-</context>
-<context>
-    <name>ReceiveCoinsDialog</name>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Réutilise une adresse de réception précédemment utilisée. Réutiliser une adresse pose des problèmes de sécurité et de vie privée. N&apos;utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="37"/>
-        <source>R&amp;euse an existing receiving address (not recommended)</source>
-        <translation>Ré&amp;utiliser une adresse de réception existante (non recommandé)</translation>
+        <location line="+3"/>
+        <source>R&amp;euse an existing receiving address (not recommended)</source>
+        <translation>Ré&amp;utiliser une adresse de réception existante (non recommandé)</translation>
     </message>
     <message>
+        <location line="+14"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
-        <translation type="vanished">Un message optionnel à joindre à la demande de paiement, qui sera affiché quand la demande sera ouverte. Note : Ce message ne sera pas envoyé avec le paiement à travers le réseau Dash.</translation>
-    </message>
-    <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="51"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="74"/>
-        <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
-        <translation type="unfinished"></translation>
+        <translation>Un message optionnel à joindre à la demande de paiement, qui sera affiché quand la demande sera ouverte. Note : Ce message ne sera pas envoyé avec le paiement à travers le réseau Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="54"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>M&amp;essage :</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="67"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="88"/>
+        <location line="+13"/>
+        <location line="+21"/>
         <source>An optional label to associate with the new receiving address.</source>
         <translation>Un étiquette optionnelle à associer à la nouvelle adresse de réception</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="81"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Un message optionnel à joindre à la demande de paiement, qui sera affiché quand la demande sera ouverte.&lt;br&gt;Note : Ce message ne sera pas envoyé avec le paiement à travers le réseau Dash.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Utiliser ce formulaire pour demander des paiements. Tous les champs sont  &lt;b&gt;optionnels&lt;/b&gt;.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="91"/>
+        <location line="+10"/>
         <source>&amp;Label:</source>
         <translation>&amp;Étiquette :</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="104"/>
-        <location filename="../forms/receivecoinsdialog.ui" line="126"/>
+        <location line="+13"/>
+        <location line="+22"/>
         <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
         <translation>Un montant optionnel à demander. Laisser ceci vide ou à zéro pour ne pas demander de montant spécifique.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="107"/>
+        <location line="-19"/>
         <source>&amp;Amount:</source>
         <translation>&amp;Montant :</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="141"/>
+        <location line="+34"/>
         <source>&amp;Request payment</source>
         <translation>&amp;Demande de paiement</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="158"/>
+        <location line="+17"/>
         <source>Clear all fields of the form.</source>
         <translation>Effacer tous les champs du formulaire.</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="161"/>
+        <location line="+3"/>
         <source>Clear</source>
         <translation>Effacer</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="236"/>
+        <location line="+75"/>
         <source>Requested payments history</source>
         <translation>Historique des paiements demandés</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="261"/>
+        <location line="+25"/>
         <source>Show the selected request (does the same as double clicking an entry)</source>
         <translation>Afficher la demande choisie (identique à un double-clic sur une entrée)</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="264"/>
+        <location line="+3"/>
         <source>Show</source>
         <translation>Afficher</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="281"/>
+        <location line="+17"/>
         <source>Remove the selected entries from the list</source>
         <translation>Enlever les entrées sélectionnées de la liste</translation>
     </message>
     <message>
-        <location filename="../forms/receivecoinsdialog.ui" line="284"/>
+        <location line="+3"/>
         <source>Remove</source>
         <translation>Enlever</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="39"/>
+        <location filename="../receivecoinsdialog.cpp" line="+39"/>
         <source>Copy label</source>
         <translation>Copier l’étiquette</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="40"/>
+        <location line="+1"/>
         <source>Copy message</source>
         <translation>Copier le message</translation>
     </message>
     <message>
-        <location filename="../receivecoinsdialog.cpp" line="41"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copier le montant</translation>
     </message>
@@ -2931,67 +2690,67 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ReceiveRequestDialog</name>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="29"/>
+        <location filename="../forms/receiverequestdialog.ui" line="+29"/>
         <source>QR Code</source>
         <translation>Code QR</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="75"/>
+        <location line="+46"/>
         <source>Copy &amp;URI</source>
         <translation>Copier l&apos;&amp;URI</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="85"/>
+        <location line="+10"/>
         <source>Copy &amp;Address</source>
         <translation>Copier l&apos;&amp;adresse</translation>
     </message>
     <message>
-        <location filename="../forms/receiverequestdialog.ui" line="95"/>
+        <location line="+10"/>
         <source>&amp;Save Image...</source>
         <translation>&amp;Sauvegarder l&apos;image...</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="136"/>
+        <location filename="../receiverequestdialog.cpp" line="+65"/>
         <source>Request payment to %1</source>
         <translation>Demande de paiement à %1</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="142"/>
+        <location line="+6"/>
         <source>Payment information</source>
         <translation>Informations de paiement</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="143"/>
+        <location line="+1"/>
         <source>URI</source>
         <translation>URI</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="145"/>
+        <location line="+2"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="147"/>
+        <location line="+2"/>
         <source>Amount</source>
         <translation>Montant</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="149"/>
+        <location line="+2"/>
         <source>Label</source>
         <translation>Étiquette</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="151"/>
+        <location line="+2"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="161"/>
+        <location line="+10"/>
         <source>Resulting URI too long, try to reduce the text for label / message.</source>
         <translation>L&apos;URI résultant est trop long, essayez de réduire le texte d&apos;étiquette / de message.</translation>
     </message>
     <message>
-        <location filename="../receiverequestdialog.cpp" line="166"/>
+        <location line="+5"/>
         <source>Error encoding URI into QR Code.</source>
         <translation>Erreur d&apos;encodage de l&apos;URI en code QR.</translation>
     </message>
@@ -2999,37 +2758,37 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>RecentRequestsTableModel</name>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location filename="../recentrequeststablemodel.cpp" line="+28"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Label</source>
         <translation>Étiquette</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="28"/>
+        <location line="+0"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="127"/>
+        <location line="+99"/>
         <source>Amount</source>
         <translation>Montant</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="68"/>
+        <location line="-59"/>
         <source>(no label)</source>
         <translation>(pas d&apos;étiquette)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="77"/>
+        <location line="+9"/>
         <source>(no message)</source>
         <translation>(pas de message)</translation>
     </message>
     <message>
-        <location filename="../recentrequeststablemodel.cpp" line="85"/>
+        <location line="+8"/>
         <source>(no amount)</source>
         <translation>(aucun montant)</translation>
     </message>
@@ -3037,412 +2796,396 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsDialog</name>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="14"/>
-        <location filename="../sendcoinsdialog.cpp" line="590"/>
-        <location filename="../sendcoinsdialog.cpp" line="602"/>
+        <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
+        <location line="+12"/>
         <source>Send Coins</source>
         <translation>Envoyer des pièces</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="90"/>
+        <location line="+76"/>
         <source>Coin Control Features</source>
         <translation>Fonctions de contrôle des pièces</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="110"/>
+        <location line="+20"/>
         <source>Inputs...</source>
         <translation>Entrées...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="120"/>
+        <location line="+10"/>
         <source>automatically selected</source>
         <translation>choisi automatiquement</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="139"/>
+        <location line="+19"/>
         <source>Insufficient funds!</source>
         <translation>Fonds insuffisants !</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="228"/>
+        <location line="+89"/>
         <source>Quantity:</source>
         <translation>Quantité :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="263"/>
+        <location line="+35"/>
         <source>Bytes:</source>
         <translation>Octets :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="311"/>
+        <location line="+48"/>
         <source>Amount:</source>
         <translation>Montant :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="343"/>
+        <location line="+32"/>
         <source>Priority:</source>
         <translation>Priorité :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="356"/>
+        <location line="+13"/>
         <source>medium</source>
         <translation>moyen</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="391"/>
+        <location line="+35"/>
         <source>Fee:</source>
         <translation>Frais :</translation>
     </message>
     <message>
-        <source>Low Output:</source>
-        <translation type="vanished">Sortie faible</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="423"/>
+        <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"></translation>
+        <translation>Poussière:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="436"/>
+        <location line="+13"/>
         <source>no</source>
         <translation>non</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="471"/>
+        <location line="+35"/>
         <source>After Fee:</source>
         <translation>Après les frais :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="503"/>
+        <location line="+32"/>
         <source>Change:</source>
         <translation>Monnaie :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="547"/>
+        <location line="+44"/>
         <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
         <translation>Si ceci est actif mais l&apos;adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="550"/>
+        <location line="+3"/>
         <source>Custom change address</source>
         <translation>Adresse personnalisée de monnaie rendue</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="756"/>
+        <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"></translation>
+        <translation>Frais de Transaction:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="770"/>
+        <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"></translation>
+        <translation>Choisissez...</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="777"/>
+        <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"></translation>
+        <translation>replier les paramètres de frais</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="780"/>
+        <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"></translation>
+        <translation>Minimiser</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="858"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <location line="+78"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si les frais personnalisés sont à 1000 duffs et que la transaction fait seulement 250 octets, alors &quot;par kilooctet&quot; payera seulement 250 duffs de frais,&lt;br /&gt;alors que &quot;au moins&quot; payera 1000 duffs. Pour les transactions de plus d&apos;un kilooctet les deux payeront par kilooctet.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="861"/>
-        <source>per kilobyte</source>
-        <translation type="unfinished"></translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Si les frais personnalisés sont à 1000 duffs et que la transaction fait seulement 250 octets, alors &quot;par kilooctet&quot; payera seulement 250 duffs de frais,&lt;br /&gt;alors que &quot;total au moins&quot; payera 1000 duffs. Pour les transactions de plus d&apos;un kilooctet les deux payeront par kilooctet.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="874"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation type="unfinished"></translation>
+        <location line="+33"/>
+        <location line="+13"/>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Payer les frais minimums fonctionne tant qu&apos;il y a moins de volume de transactions que de place dans les blocs.&lt;br/&gt;Mais soyez conscients que ceci peut amener a des transactions qui ne seront jamais confirmées lorsqu&apos;il y aura plus de demande que la capacité du réseau.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="877"/>
-        <source>total at least</source>
-        <translation type="unfinished"></translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>par kilooctet</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="907"/>
-        <location filename="../forms/sendcoinsdialog.ui" line="920"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
-        <translation type="unfinished"></translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>total au moins</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="923"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"></translation>
+        <translation>(lisez l&apos;infobulle)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="952"/>
+        <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"></translation>
+        <translation>Recommandé:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="982"/>
+        <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"></translation>
+        <translation>Personnalisé:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1034"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"></translation>
+        <translation>(Les frais intelligents ne sont pas encore initialisés . Ceci nécessite quelques blocs généralement...)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1063"/>
+        <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"></translation>
+        <translation>Temps de Confirmation:</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1123"/>
+        <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"></translation>
+        <translation>normal</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1143"/>
+        <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"></translation>
+        <translation>rapide</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1181"/>
+        <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"></translation>
+        <translation>Envoyé en tant que transaction sans frais si possible</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1188"/>
+        <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"></translation>
+        <translation>(la confirmation pourra prendre plus de temps)</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1255"/>
+        <location line="+67"/>
         <source>Confirm the send action</source>
         <translation>Confirmer l’action d&apos;envoi</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1258"/>
+        <location line="+3"/>
         <source>S&amp;end</source>
         <translation>E&amp;nvoyer</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1281"/>
+        <location line="+23"/>
         <source>Clear all fields of the form.</source>
         <translation>Effacer tous les champs du formulaire.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1284"/>
+        <location line="+3"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Tout nettoyer</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1298"/>
+        <location line="+14"/>
         <source>Send to multiple recipients at once</source>
         <translation>Envoyer à plusieurs destinataires à la fois</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1301"/>
+        <location line="+3"/>
         <source>Add &amp;Recipient</source>
         <translation>Ajouter un &amp;destinataire</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1339"/>
+        <location line="+38"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1358"/>
+        <location line="+19"/>
         <source>InstantX</source>
         <translation>InstantX</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsdialog.ui" line="1365"/>
+        <location line="+7"/>
         <source>Balance:</source>
         <translation>Solde :</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="59"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Copier la quantité</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="60"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copier le montant</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="61"/>
+        <location line="+1"/>
         <source>Copy fee</source>
         <translation>Copier les frais</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="62"/>
+        <location line="+1"/>
         <source>Copy after fee</source>
         <translation>Copier le montant après les frais</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="63"/>
+        <location line="+1"/>
         <source>Copy bytes</source>
         <translation>Copier les octets</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="64"/>
+        <location line="+1"/>
         <source>Copy priority</source>
         <translation>Copier la priorité</translation>
     </message>
     <message>
-        <source>Copy low output</source>
-        <translation type="vanished">Copier la sortie faible</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="65"/>
+        <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"></translation>
+        <translation>Copier poussière</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="66"/>
+        <location line="+1"/>
         <source>Copy change</source>
         <translation>Copier la monnaie</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+155"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>using</source>
         <translation>utiliser</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="221"/>
-        <location filename="../sendcoinsdialog.cpp" line="227"/>
+        <location line="-15"/>
+        <location line="+6"/>
         <source>anonymous funds</source>
         <translation>fonds anonymisés</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="231"/>
+        <location line="+4"/>
         <source>(darksend requires this amount to be rounded up to the nearest %1).</source>
         <translation>(darksend nécessite que ce montant soit arrondi au plus proche de %1).</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="236"/>
+        <location line="+5"/>
         <source>any available funds (not recommended)</source>
         <translation>tout fonds disponible (non recommandé)</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="242"/>
+        <location line="+6"/>
         <source>and InstantX</source>
         <translation>et InstantX</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="266"/>
-        <location filename="../sendcoinsdialog.cpp" line="271"/>
-        <location filename="../sendcoinsdialog.cpp" line="276"/>
-        <location filename="../sendcoinsdialog.cpp" line="280"/>
+        <location line="+24"/>
+        <location line="+5"/>
+        <location line="+5"/>
+        <location line="+4"/>
         <source>%1 to %2</source>
         <translation>%1 à %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="329"/>
+        <location line="+49"/>
         <source>Are you sure you want to send?</source>
         <translation>Êtes-vous sûr de vouloir envoyer ?</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="338"/>
+        <location line="+9"/>
         <source>are added as transaction fee</source>
         <translation>ajouté en tant que frais de transaction</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="355"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Montant total %1 (= %2)</translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="357"/>
-        <source>or</source>
-        <translation>ou</translation>
+        <location line="+17"/>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Montant Total = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="359"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Confirmer l’envoi des pièces</translation>
     </message>
     <message>
-        <source>Payment request expired</source>
-        <translation type="vanished">La demande de paiement a expiré</translation>
+        <location line="+238"/>
+        <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
+        <translation>Des frais %1 plus grands que %2 par koctets sont considéres comme excessifs.</translation>
     </message>
-    <message>
-        <source>Invalid payment address %1</source>
-        <translation type="vanished">Adresse de paiement invalide %1</translation>
+    <message numerus="yes">
+        <location line="+109"/>
+        <source>Estimated to begin confirmation within %n block(s).</source>
+        <translation><numerusform>Le début de confirmation est estimé dans %n bloc.</numerusform><numerusform>Le début de confirmation est estimé dans les %n blocs.</numerusform></translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="567"/>
+        <location line="-136"/>
         <source>The recipient address is not valid, please recheck.</source>
         <translation>L&apos;adresse du destinataire n’est pas valide, veuillez la vérifier.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="570"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(%1 sur %2 entrées affichées)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Le montant à payer doit être supérieur à 0.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="573"/>
+        <location line="+3"/>
         <source>The amount exceeds your balance.</source>
         <translation>Le montant dépasse votre solde.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="576"/>
+        <location line="+3"/>
         <source>The total exceeds your balance when the %1 transaction fee is included.</source>
         <translation>Le montant dépasse votre solde lorsque les frais de transaction de %1 sont inclus.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="579"/>
+        <location line="+3"/>
         <source>Duplicate address found, can only send to each address once per send operation.</source>
         <translation>Adresse indentique trouvée, il n&apos;est possible d&apos;envoyer qu&apos;une fois à chaque adresse par opération d&apos;envoi.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="582"/>
+        <location line="+3"/>
         <source>Transaction creation failed!</source>
         <translation>La création de la transaction a échoué !</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="586"/>
+        <location line="+4"/>
         <source>The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
         <translation>La transaction a été rejetée ! Ceci peut arriver si certaines pièces de votre portefeuille étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et que des pièces ont été dépensées dans la copie sans être marquées comme telles ici.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="591"/>
+        <location line="+5"/>
         <source>Error: The wallet was unlocked only to anonymize coins.</source>
         <translation>Erreur: Le portefeuille a été déverouillé seulement pour l&apos;anonymisation des pièces.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="594"/>
-        <source>A fee higher than %1 is considered an insanely high fee.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="681"/>
+        <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"></translation>
+        <translation>Payer seulement les frais minimum de %1</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="703"/>
-        <source>Estimated to begin confirmation within %1 block(s).</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../sendcoinsdialog.cpp" line="810"/>
+        <location line="+129"/>
         <source>Warning: Invalid Dash address</source>
         <translation>Attention: adresse Dash invalide</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="819"/>
+        <location line="+9"/>
         <source>Warning: Unknown change address</source>
         <translation>Attention : adresse de monnaie rendue inconnue</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="830"/>
+        <location line="+11"/>
         <source>(no label)</source>
         <translation>(pas d&apos;étiquette)</translation>
     </message>
@@ -3450,102 +3193,98 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SendCoinsEntry</name>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="21"/>
+        <location filename="../forms/sendcoinsentry.ui" line="+21"/>
         <source>This is a normal payment.</source>
         <translation>Ceci est un paiement normal.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="36"/>
+        <location line="+15"/>
         <source>Pay &amp;To:</source>
         <translation>&amp;Payer à :</translation>
     </message>
     <message>
-        <source>The address to send the payment to (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;adresse à qui envoyer le paiement (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/sendcoinsentry.ui" line="54"/>
+        <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;adresse Dash à laquelle envoyer de la monnaie</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="61"/>
+        <location line="+7"/>
         <source>Choose previously used address</source>
         <translation>Choisir une adresse déjà utilisée</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="71"/>
+        <location line="+10"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="78"/>
+        <location line="+7"/>
         <source>Paste address from clipboard</source>
         <translation>Coller l&apos;adresse depuis le presse-papier</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="95"/>
-        <location filename="../forms/sendcoinsentry.ui" line="619"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1155"/>
+        <location line="+7"/>
+        <location line="+524"/>
+        <location line="+536"/>
         <source>Remove this entry</source>
         <translation>Enlever cette entrée</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="111"/>
+        <location line="-1044"/>
         <source>&amp;Label:</source>
         <translation>É&amp;tiquette :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="124"/>
+        <location line="+13"/>
         <source>Enter a label for this address to add it to the list of used addresses</source>
         <translation>Saisir une étiquette pour cette adresse afin de l&apos;ajouter à la liste d&apos;adresses utilisées</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="131"/>
-        <location filename="../forms/sendcoinsentry.ui" line="652"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1188"/>
+        <location line="+7"/>
+        <location line="+521"/>
+        <location line="+536"/>
         <source>A&amp;mount:</source>
         <translation>&amp;Montant :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="147"/>
+        <location line="-1041"/>
         <source>Message:</source>
         <translation>Message :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="157"/>
+        <location line="+10"/>
         <source>A message that was attached to the dash: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Dash network.</source>
         <translation>Un message qui était joint au Dash : URI qui sera sauvegardée avec la transaction pour référence. Note : Ce message ne sera pas envoyé à travers le réseau Dash.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="583"/>
+        <location line="+426"/>
         <source>This is an unverified payment request.</source>
         <translation>Ceci est une demande de paiement non vérifiée.</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="601"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1133"/>
+        <location line="+18"/>
+        <location line="+532"/>
         <source>Pay To:</source>
         <translation>Payer à :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="635"/>
-        <location filename="../forms/sendcoinsentry.ui" line="1171"/>
+        <location line="-498"/>
+        <location line="+536"/>
         <source>Memo:</source>
         <translation>Mémo :</translation>
     </message>
     <message>
-        <location filename="../forms/sendcoinsentry.ui" line="1115"/>
+        <location line="-56"/>
         <source>This is a verified payment request.</source>
         <translation>Ceci est une demande de paiement vérifiée.</translation>
     </message>
     <message>
-        <location filename="../sendcoinsentry.cpp" line="31"/>
+        <location filename="../sendcoinsentry.cpp" line="+31"/>
         <source>Enter a label for this address to add it to your address book</source>
         <translation>Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses</translation>
     </message>
@@ -3553,12 +3292,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>ShutdownWindow</name>
     <message>
-        <location filename="../utilitydialog.cpp" line="116"/>
+        <location filename="../utilitydialog.cpp" line="+43"/>
         <source>Dash Core is shutting down...</source>
         <translation>Arrêt de Dash Core...</translation>
     </message>
     <message>
-        <location filename="../utilitydialog.cpp" line="117"/>
+        <location line="+1"/>
         <source>Do not shut down the computer until this window disappears.</source>
         <translation>Ne pas fermer l&apos;ordinateur jusqu&apos;à la disparition de cette fenêtre.</translation>
     </message>
@@ -3566,193 +3305,181 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SignVerifyMessageDialog</name>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="14"/>
+        <location filename="../forms/signverifymessagedialog.ui" line="+14"/>
         <source>Signatures - Sign / Verify a Message</source>
         <translation>Signatures - Signer / Vérifier un message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="27"/>
+        <location line="+13"/>
         <source>&amp;Sign Message</source>
         <translation>&amp;Signer un message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="33"/>
+        <location line="+6"/>
         <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
         <translation>Vous pouvez signer des messages avec vos adresses pour prouver que vous les détenez. Faites attention de ne pas signer de vague car des attaques d&apos;hameçonnage peuvent essayer d&apos;usurper votre identité par votre signature. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous serez d&apos;accord.</translation>
     </message>
     <message>
-        <source>The address to sign the message with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;adresse pour signer le message (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="51"/>
+        <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"></translation>
+        <translation>L&apos;adresse Dash avec laquelle signer le message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="58"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="268"/>
+        <location line="+7"/>
+        <location line="+210"/>
         <source>Choose previously used address</source>
         <translation>Choisir une adresse précédemment utilisée</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="68"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="278"/>
+        <location line="-200"/>
+        <location line="+210"/>
         <source>Alt+A</source>
         <translation>Alt+A</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="78"/>
+        <location line="-200"/>
         <source>Paste address from clipboard</source>
         <translation>Coller une adresse depuis le presse-papier</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="88"/>
+        <location line="+10"/>
         <source>Alt+P</source>
         <translation>Alt+P</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="100"/>
+        <location line="+12"/>
         <source>Enter the message you want to sign here</source>
         <translation>Saisir ici le message que vous désirez signer</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="107"/>
+        <location line="+7"/>
         <source>Signature</source>
         <translation>Signature</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="134"/>
+        <location line="+27"/>
         <source>Copy the current signature to the system clipboard</source>
         <translation>Copier la signature actuelle dans le presse-papier</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="155"/>
+        <location line="+21"/>
         <source>Sign the message to prove you own this Dash address</source>
         <translation>Signer le message pour prouver que vous possédez cette adresse Dash</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="158"/>
+        <location line="+3"/>
         <source>Sign &amp;Message</source>
         <translation>Signer le &amp;message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="172"/>
+        <location line="+14"/>
         <source>Reset all sign message fields</source>
         <translation>Réinitialiser tous les champs de signature de message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="175"/>
-        <location filename="../forms/signverifymessagedialog.ui" line="318"/>
+        <location line="+3"/>
+        <location line="+143"/>
         <source>Clear &amp;All</source>
         <translation>&amp;Tout nettoyer</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="234"/>
+        <location line="-84"/>
         <source>&amp;Verify Message</source>
         <translation>&amp;Vérifier un message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="240"/>
+        <location line="+6"/>
         <source>Enter the signing 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.</source>
         <translation>Saisir ci-dessous l&apos;adresse de signature, le message (assurez-vous d&apos;avoir copié exactement les retours à la ligne, les espaces, tabulations etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé lui-même pour éviter d&apos;être trompé par une attaque d&apos;homme du milieu.</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="261"/>
+        <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <source>The address the message was signed with (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">L&apos;adresse utilisée pour signer le message (ex. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
+        <translation>L&apos;adresse Dash avec laquelle le message a été signé</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="298"/>
+        <location line="+37"/>
         <source>Verify the message to ensure it was signed with the specified Dash address</source>
         <translation>Vérifier le message pour s&apos;assurer qu&apos;il a été signé avec l&apos;adresse Dash spécifiée</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="301"/>
+        <location line="+3"/>
         <source>Verify &amp;Message</source>
         <translation>Vérifier le &amp;message</translation>
     </message>
     <message>
-        <location filename="../forms/signverifymessagedialog.ui" line="315"/>
+        <location line="+14"/>
         <source>Reset all verify message fields</source>
         <translation>Réinitialiser tous les champs de vérification de message</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="30"/>
+        <location filename="../signverifymessagedialog.cpp" line="+30"/>
         <source>Click &quot;Sign Message&quot; to generate signature</source>
         <translation>Cliquez sur « Signer le message » pour générer la signature</translation>
     </message>
     <message>
-        <source>Enter a Dash address (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</source>
-        <translation type="vanished">Entrez une adresse Dash (e.g. XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg)</translation>
-    </message>
-    <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
+        <location line="+83"/>
+        <location line="+80"/>
         <source>The entered address is invalid.</source>
         <translation>L&apos;adresse saisie est invalide.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="113"/>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="193"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+8"/>
+        <location line="+72"/>
+        <location line="+8"/>
         <source>Please check the address and try again.</source>
         <translation>Veuillez vérifier l&apos;adresse et réessayer.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="121"/>
-        <location filename="../signverifymessagedialog.cpp" line="201"/>
+        <location line="-80"/>
+        <location line="+80"/>
         <source>The entered address does not refer to a key.</source>
         <translation>L&apos;adresse saisie ne fait pas référence à une clef.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="129"/>
+        <location line="-72"/>
         <source>Wallet unlock was cancelled.</source>
         <translation>Le déverrouillage du portefeuille a été annulé.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="137"/>
+        <location line="+8"/>
         <source>Private key for the entered address is not available.</source>
         <translation>La clef privée pour l&apos;adresse indiquée n&apos;est pas disponible.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="149"/>
+        <location line="+12"/>
         <source>Message signing failed.</source>
         <translation>La signature du message a échoué.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="154"/>
+        <location line="+5"/>
         <source>Message signed.</source>
         <translation>Le message a été signé.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
+        <location line="+58"/>
         <source>The signature could not be decoded.</source>
         <translation>La signature n&apos;a pu être décodée.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="212"/>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
+        <location line="+13"/>
         <source>Please check the signature and try again.</source>
         <translation>Veuillez vérifier la signature et réessayer.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="225"/>
+        <location line="+0"/>
         <source>The signature did not match the message digest.</source>
         <translation>La signature ne correspond pas à l&apos;empreinte du message.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="232"/>
+        <location line="+7"/>
         <source>Message verification failed.</source>
         <translation>Échec de la vérification du message.</translation>
     </message>
     <message>
-        <location filename="../signverifymessagedialog.cpp" line="237"/>
+        <location line="+5"/>
         <source>Message verified.</source>
         <translation>Message vérifié.</translation>
     </message>
@@ -3760,27 +3487,27 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>SplashScreen</name>
     <message>
-        <location filename="../splashscreen.cpp" line="36"/>
+        <location filename="../splashscreen.cpp" line="+36"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="37"/>
+        <location line="+1"/>
         <source>Version %1</source>
         <translation>Version %1</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="38"/>
+        <location line="+1"/>
         <source>The Bitcoin Core developers</source>
         <translation>Les développeurs Bitcoin Core</translation>
     </message>
     <message>
-        <location filename="../splashscreen.cpp" line="39"/>
+        <location line="+1"/>
         <source>The Dash Core developers</source>
         <translation>Les développeurs Dash Core</translation>
     </message>
     <message>
-        <location filename="../networkstyle.cpp" line="19"/>
+        <location filename="../networkstyle.cpp" line="+19"/>
         <source>[testnet]</source>
         <translation>[testnet]</translation>
     </message>
@@ -3788,7 +3515,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TrafficGraphWidget</name>
     <message>
-        <location filename="../trafficgraphwidget.cpp" line="79"/>
+        <location filename="../trafficgraphwidget.cpp" line="+79"/>
         <source>KB/s</source>
         <translation>Ko/s</translation>
     </message>
@@ -3796,254 +3523,245 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDesc</name>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="33"/>
+        <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Ouvert pour %n bloc(s) de plus</numerusform>
-            <numerusform>Ouvert pour %n bloc(s) de plus</numerusform>
-        </translation>
+        <translation><numerusform>Ouvert pour %n bloc de plus</numerusform><numerusform>Ouvert pour %n blocs de plus</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="35"/>
+        <location line="+2"/>
         <source>Open until %1</source>
         <translation>Ouvert jusqu&apos;à %1</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="46"/>
-        <location filename="../transactiondesc.cpp" line="57"/>
-        <location filename="../transactiondesc.cpp" line="67"/>
-        <location filename="../transactiondesc.cpp" line="79"/>
+        <location line="+11"/>
+        <location line="+11"/>
+        <location line="+10"/>
+        <location line="+12"/>
         <source>conflicted</source>
         <translation>en conflit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="48"/>
+        <location line="-31"/>
         <source>%1/offline (verified via instantx)</source>
         <translation>%1/déconnecté (vérifié avec instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="50"/>
+        <location line="+2"/>
         <source>%1/confirmed (verified via instantx)</source>
         <translation>%1/confirmé (verifié avec instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="52"/>
+        <location line="+2"/>
         <source>%1 confirmations (verified via instantx)</source>
         <translation>%1 confirmations (verifié avec instantx)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="81"/>
+        <location line="+29"/>
         <source>%1/offline</source>
         <translation>%1/déconnecté</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="83"/>
+        <location line="+2"/>
         <source>%1/unconfirmed</source>
         <translation>%1/non confirmée</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="73"/>
-        <location filename="../transactiondesc.cpp" line="85"/>
+        <location line="-10"/>
+        <location line="+12"/>
         <source>%1 confirmations</source>
         <translation>%1 confirmations</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="59"/>
+        <location line="-26"/>
         <source>%1/offline (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1/déconnecté (vérification d&apos;InstantX en cours - %2 sur %3 signatures)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="61"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification in progress - %2 of %3 signatures )</source>
         <translation>%1/confirmé (vérification d&apos;InstantX en cours - %2 sur %3 signatures)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="63"/>
+        <location line="+2"/>
         <source>%1 confirmations (InstantX verification in progress - %2 of %3 signatures)</source>
         <translation>%1 confirmations (vérification d&apos;InstantX en cours - %2 sur %3 signatures)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="69"/>
+        <location line="+6"/>
         <source>%1/offline (InstantX verification failed)</source>
         <translation>%1/déconnecté (La vérification d&apos;InstantX a échoué)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="71"/>
+        <location line="+2"/>
         <source>%1/confirmed (InstantX verification failed)</source>
         <translation>%1/confirmé (La vérification d&apos;InstantX a échoué)</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="103"/>
+        <location line="+32"/>
         <source>Status</source>
         <translation>État</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="108"/>
+        <location line="+5"/>
         <source>, has not been successfully broadcast yet</source>
         <translation>, n’a pas encore été diffusée avec succès</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="110"/>
+        <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, diffusée à travers %n nœud(s)</numerusform>
-            <numerusform>, diffusée à travers %n nœud(s)</numerusform>
-        </translation>
+        <translation><numerusform>, diffusée à travers %n nœud</numerusform><numerusform>, diffusée à travers %n nœuds</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="114"/>
+        <location line="+4"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+7"/>
         <source>Source</source>
         <translation>Source</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="121"/>
+        <location line="+0"/>
         <source>Generated</source>
         <translation>Généré</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="126"/>
-        <location filename="../transactiondesc.cpp" line="139"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+5"/>
+        <location line="+13"/>
+        <location line="+72"/>
         <source>From</source>
         <translation>De</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="139"/>
+        <location line="-72"/>
         <source>unknown</source>
         <translation>inconnu</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="140"/>
-        <location filename="../transactiondesc.cpp" line="160"/>
-        <location filename="../transactiondesc.cpp" line="229"/>
+        <location line="+1"/>
+        <location line="+20"/>
+        <location line="+69"/>
         <source>To</source>
         <translation>À</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
+        <location line="-87"/>
         <source>own address</source>
         <translation>votre propre adresse</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="142"/>
-        <location filename="../transactiondesc.cpp" line="211"/>
+        <location line="+0"/>
+        <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>lecture seule</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="144"/>
+        <location line="-67"/>
         <source>label</source>
         <translation>étiquette</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="178"/>
-        <location filename="../transactiondesc.cpp" line="190"/>
-        <location filename="../transactiondesc.cpp" line="243"/>
-        <location filename="../transactiondesc.cpp" line="269"/>
-        <location filename="../transactiondesc.cpp" line="322"/>
+        <location line="+34"/>
+        <location line="+12"/>
+        <location line="+53"/>
+        <location line="+26"/>
+        <location line="+53"/>
         <source>Credit</source>
         <translation>Crédit</translation>
     </message>
     <message numerus="yes">
-        <location filename="../transactiondesc.cpp" line="180"/>
+        <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>arrive à maturité dans %n bloc(s) de plus</numerusform>
-            <numerusform>arrive à maturité dans %n bloc(s) de plus</numerusform>
-        </translation>
+        <translation><numerusform>arrive à maturité dans %n bloc de plus</numerusform><numerusform>arrive à maturité dans %n blocs de plus</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="182"/>
+        <location line="+2"/>
         <source>not accepted</source>
         <translation>refusé</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="241"/>
-        <location filename="../transactiondesc.cpp" line="266"/>
-        <location filename="../transactiondesc.cpp" line="319"/>
+        <location line="+59"/>
+        <location line="+25"/>
+        <location line="+53"/>
         <source>Debit</source>
         <translation>Débit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="251"/>
+        <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total débit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="252"/>
+        <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"></translation>
+        <translation>Total crédit</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="257"/>
+        <location line="+5"/>
         <source>Transaction fee</source>
         <translation>Frais de transaction</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="273"/>
+        <location line="+16"/>
         <source>Net amount</source>
         <translation>Montant net</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="279"/>
-        <location filename="../transactiondesc.cpp" line="288"/>
+        <location line="+6"/>
+        <location line="+9"/>
         <source>Message</source>
         <translation>Message</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="281"/>
+        <location line="-7"/>
         <source>Comment</source>
         <translation>Commentaire</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="283"/>
+        <location line="+2"/>
         <source>Transaction ID</source>
         <translation>ID de la transaction</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="301"/>
+        <location line="+18"/>
         <source>Merchant</source>
         <translation>Marchand</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="308"/>
+        <location line="+7"/>
         <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
         <translation>Les pièces générées doivent mûrir pendant %1 blocs avant de pouvoir être dépensées. Lorsque vous avez généré ce bloc, il a été diffusé sur le réseau pour être ajouté à la chaîne de blocs. S’il échoue a intégrer la chaîne, son état sera modifié en « non accepté » et il ne sera pas possible de le dépenser. Ceci peut arriver occasionnellement si un autre nœud génère un bloc à quelques secondes du votre.</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="316"/>
+        <location line="+8"/>
         <source>Debug information</source>
         <translation>Informations de débogage</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="324"/>
+        <location line="+8"/>
         <source>Transaction</source>
         <translation>Transaction</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="327"/>
+        <location line="+3"/>
         <source>Inputs</source>
         <translation>Entrées</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="348"/>
+        <location line="+21"/>
         <source>Amount</source>
         <translation>Montant</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="+1"/>
+        <location line="+1"/>
         <source>true</source>
         <translation>vrai</translation>
     </message>
     <message>
-        <location filename="../transactiondesc.cpp" line="349"/>
-        <location filename="../transactiondesc.cpp" line="350"/>
+        <location line="-1"/>
+        <location line="+1"/>
         <source>false</source>
         <translation>faux</translation>
     </message>
@@ -4051,12 +3769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionDescDialog</name>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="14"/>
+        <location filename="../forms/transactiondescdialog.ui" line="+14"/>
         <source>Transaction details</source>
         <translation>Détails de la transaction</translation>
     </message>
     <message>
-        <location filename="../forms/transactiondescdialog.ui" line="20"/>
+        <location line="+6"/>
         <source>This pane shows a detailed description of the transaction</source>
         <translation>Ce panneau affiche une description détaillée de la transaction</translation>
     </message>
@@ -4064,169 +3782,162 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionTableModel</name>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location filename="../transactiontablemodel.cpp" line="+229"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Type</source>
         <translation>Type</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="229"/>
+        <location line="+0"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
-    <message>
-        <source>Amount</source>
-        <translation type="vanished">Montant</translation>
-    </message>
     <message numerus="yes">
-        <location filename="../transactiontablemodel.cpp" line="287"/>
+        <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Ouvert pour %n bloc(s) de plus</numerusform>
-            <numerusform>Ouvert pour %n bloc(s) de plus</numerusform>
-        </translation>
+        <translation><numerusform>Ouvert pour %n bloc de plus</numerusform><numerusform>Ouvert pour %n blocs de plus</numerusform></translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="290"/>
+        <location line="+3"/>
         <source>Open until %1</source>
         <translation>Ouvert jusqu&apos;à %1</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="293"/>
+        <location line="+3"/>
         <source>Offline</source>
         <translation>Déconnecté</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="296"/>
+        <location line="+3"/>
         <source>Unconfirmed</source>
         <translation>Non confirmé</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="299"/>
+        <location line="+3"/>
         <source>Confirming (%1 of %2 recommended confirmations)</source>
         <translation>Confirmation (%1 sur %2 confirmations recommandées)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="302"/>
+        <location line="+3"/>
         <source>Confirmed (%1 confirmations)</source>
         <translation>Confirmée (%1 confirmations)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="305"/>
+        <location line="+3"/>
         <source>Conflicted</source>
         <translation>En conflit</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="308"/>
+        <location line="+3"/>
         <source>Immature (%1 confirmations, will be available after %2)</source>
         <translation>Immature (%1 confirmations, sera disponible après %2)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="311"/>
+        <location line="+3"/>
         <source>This block was not received by any other nodes and will probably not be accepted!</source>
         <translation>Ce bloc n’a été reçu par aucun autre nœud et ne sera probablement pas accepté !</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="314"/>
+        <location line="+3"/>
         <source>Generated but not accepted</source>
         <translation>Généré mais pas accepté</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="353"/>
+        <location line="+39"/>
         <source>Received with</source>
         <translation>Reçue avec</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="355"/>
+        <location line="+2"/>
         <source>Received from</source>
         <translation>Reçue de</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="357"/>
+        <location line="+2"/>
         <source>Received via Darksend</source>
         <translation>Reçu par Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="360"/>
+        <location line="+3"/>
         <source>Sent to</source>
         <translation>Envoyée à</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="362"/>
+        <location line="+2"/>
         <source>Payment to yourself</source>
         <translation>Paiement à vous-même</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="364"/>
+        <location line="+2"/>
         <source>Mined</source>
         <translation>Miné</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="367"/>
+        <location line="+3"/>
         <source>Darksend Denominate</source>
         <translation>Dénomination Darksend</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="369"/>
+        <location line="+2"/>
         <source>Darksend Collateral Payment</source>
         <translation>Paiement Darksend Collatéral</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="371"/>
+        <location line="+2"/>
         <source>Darksend Make Collateral Inputs</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Création d&apos;Entrées Collatérales</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="373"/>
+        <location line="+2"/>
         <source>Darksend Create Denominations</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Création de Dénominations</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="375"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="405"/>
+        <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>lecture seule</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="422"/>
+        <location line="+17"/>
         <source>(n/a)</source>
         <translation>(n.d)</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="632"/>
+        <location line="+210"/>
         <source>Transaction status. Hover over this field to show number of confirmations.</source>
         <translation>État de la transaction. Laissez le pointeur de la souris sur ce champ pour voir le nombre de confirmations.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="634"/>
+        <location line="+2"/>
         <source>Date and time that the transaction was received.</source>
         <translation>Date et heure de réception de la transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="636"/>
+        <location line="+2"/>
         <source>Type of transaction.</source>
         <translation>Type de transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="638"/>
+        <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"></translation>
+        <translation>Si une adresse en lecture seule est impliquée dans cette transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="640"/>
+        <location line="+2"/>
         <source>Destination address of transaction.</source>
         <translation>L’adresse de destination de la transaction.</translation>
     </message>
     <message>
-        <location filename="../transactiontablemodel.cpp" line="642"/>
+        <location line="+2"/>
         <source>Amount removed from or added to balance.</source>
         <translation>Montant ajouté ou enlevé au solde.</translation>
     </message>
@@ -4234,207 +3945,208 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="67"/>
-        <location filename="../transactionview.cpp" line="83"/>
+        <location filename="../transactionview.cpp" line="+69"/>
+        <location line="+17"/>
         <source>All</source>
         <translation>Toutes</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="68"/>
+        <location line="-16"/>
         <source>Today</source>
         <translation>Aujourd’hui</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="69"/>
+        <location line="+1"/>
         <source>This week</source>
         <translation>Cette semaine</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="70"/>
+        <location line="+1"/>
         <source>This month</source>
         <translation>Ce mois-ci</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="71"/>
+        <location line="+1"/>
         <source>Last month</source>
         <translation>Le mois dernier</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="72"/>
+        <location line="+1"/>
         <source>This year</source>
         <translation>Cette année</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="73"/>
+        <location line="+1"/>
         <source>Range...</source>
-        <translation>Intervalle…</translation>
+        <translation>Intervalle...</translation>
+    </message>
+    <message>
+        <location line="+12"/>
+        <source>Most Common</source>
+        <translation>Les Plus Courants</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="84"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Reçue avec</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="86"/>
+        <location line="+2"/>
         <source>Sent to</source>
         <translation>Envoyée à</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="88"/>
+        <location line="+2"/>
         <source>Darksent</source>
         <translation>Darksent</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="89"/>
+        <location line="+1"/>
         <source>Darksend Make Collateral Inputs</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Création d&apos;Entrées Collatérales</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="90"/>
+        <location line="+1"/>
         <source>Darksend Create Denominations</source>
-        <translation type="unfinished"></translation>
+        <translation>Darksend Création de Dénominations</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="91"/>
+        <location line="+1"/>
         <source>Darksend Denominate</source>
         <translation>Dénomination Darksend</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="92"/>
+        <location line="+1"/>
         <source>Darksend Collateral Payment</source>
         <translation>Paiement Darksend Collatéral</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="93"/>
+        <location line="+1"/>
         <source>To yourself</source>
         <translation>À vous-même</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="94"/>
+        <location line="+1"/>
         <source>Mined</source>
         <translation>Miné</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="95"/>
+        <location line="+1"/>
         <source>Other</source>
         <translation>Autres</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="101"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Saisir une adresse ou une étiquette à rechercher</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="107"/>
+        <location line="+6"/>
         <source>Min amount</source>
         <translation>Montant min.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="143"/>
+        <location line="+36"/>
         <source>Copy address</source>
         <translation>Copier l’adresse</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="144"/>
+        <location line="+1"/>
         <source>Copy label</source>
         <translation>Copier l’étiquette</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="145"/>
+        <location line="+1"/>
         <source>Copy amount</source>
         <translation>Copier le montant</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="146"/>
+        <location line="+1"/>
         <source>Copy transaction ID</source>
         <translation>Copier l&apos;ID de la transaction</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="147"/>
+        <location line="+1"/>
         <source>Edit label</source>
         <translation>Modifier l’étiquette</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="148"/>
+        <location line="+1"/>
         <source>Show transaction details</source>
         <translation>Afficher les détails de la transaction</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="327"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Exporter l&apos;historique des transactions</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="328"/>
+        <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
         <translation>Valeurs séparées par des virgules (*.csv)</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="337"/>
+        <location line="+9"/>
         <source>Confirmed</source>
         <translation>Confirmée</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="339"/>
+        <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"></translation>
+        <translation>Lecture seule</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="340"/>
+        <location line="+1"/>
         <source>Date</source>
         <translation>Date</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="341"/>
+        <location line="+1"/>
         <source>Type</source>
         <translation>Type</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="342"/>
+        <location line="+1"/>
         <source>Label</source>
         <translation>Étiquette</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="343"/>
+        <location line="+1"/>
         <source>Address</source>
         <translation>Adresse</translation>
     </message>
     <message>
-        <source>Amount</source>
-        <translation type="vanished">Montant</translation>
-    </message>
-    <message>
-        <location filename="../transactionview.cpp" line="345"/>
+        <location line="+2"/>
         <source>ID</source>
         <translation>ID</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+3"/>
         <source>Exporting Failed</source>
         <translation>L&apos;exportation a échoué</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="348"/>
+        <location line="+0"/>
         <source>There was an error trying to save the transaction history to %1.</source>
         <translation>Une erreur est survenue lors de l&apos;enregistrement de l&apos;historique des transactions vers %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+4"/>
         <source>Exporting Successful</source>
         <translation>Exportation réussie</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="352"/>
+        <location line="+0"/>
         <source>The transaction history was successfully saved to %1.</source>
         <translation>L&apos;historique des transactions a été sauvegardée avec succès vers %1.</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="461"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Intervalle :</translation>
     </message>
     <message>
-        <location filename="../transactionview.cpp" line="469"/>
+        <location line="+8"/>
         <source>to</source>
         <translation>à</translation>
     </message>
@@ -4442,15 +4154,15 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>UnitDisplayStatusBarControl</name>
     <message>
-        <location filename="../bitcoingui.cpp" line="1100"/>
+        <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"></translation>
+        <translation>Unité utilisée pour montrer les montants. Cliquez pour choisir une autre unité.</translation>
     </message>
 </context>
 <context>
     <name>WalletFrame</name>
     <message>
-        <location filename="../walletframe.cpp" line="26"/>
+        <location filename="../walletframe.cpp" line="+26"/>
         <source>No wallet has been loaded.</source>
         <translation>Aucun portefeuille de chargé.</translation>
     </message>
@@ -4458,59 +4170,63 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>WalletModel</name>
     <message>
-        <location filename="../walletmodel.cpp" line="289"/>
-        <location filename="../walletmodel.cpp" line="303"/>
+        <location filename="../walletmodel.cpp" line="+289"/>
+        <location line="+9"/>
+        <location line="+11"/>
         <source>Send Coins</source>
         <translation>Envoyer des pièces</translation>
     </message>
-    <message numerus="yes">
-        <location filename="../walletmodel.cpp" line="289"/>
-        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %n DASH.</source>
-        <translation>
-            <numerusform>InstantX ne supporte pas des transferts aussi élevés. Les transactions sont pour le moment limitées à %n DASH.</numerusform>
-            <numerusform>InstantX ne supporte pas des transferts aussi élevés. Les transactions sont pour le moment limitées à %n DASH.</numerusform>
-        </translation>
+    <message>
+        <location line="-20"/>
+        <location line="+9"/>
+        <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
+        <translation>InstantX ne supporte pas des transferts aussi élevés. Les transactions sont pour le moment limitées à %11 DASH.</translation>
     </message>
 </context>
 <context>
     <name>WalletView</name>
     <message>
-        <location filename="../walletview.cpp" line="44"/>
+        <location filename="../walletview.cpp" line="+45"/>
         <source>&amp;Export</source>
         <translation>&amp;Exporter</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="45"/>
+        <location line="+1"/>
         <source>Export the data in the current tab to a file</source>
         <translation>Exporter les données de l&apos;onglet courant vers un fichier</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="232"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Montant sélectionné:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Sauvegarder le portefeuille</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="233"/>
+        <location line="+1"/>
         <source>Wallet Data (*.dat)</source>
         <translation>Données de portefeuille (*.dat)</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+6"/>
         <source>Backup Failed</source>
         <translation>Échec de la sauvegarde</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="239"/>
+        <location line="+0"/>
         <source>There was an error trying to save the wallet data to %1.</source>
         <translation>Une erreur est survenue lors de l&apos;enregistrement des données de portefeuille vers %1.</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+4"/>
         <source>Backup Successful</source>
         <translation>Sauvegarde réussie</translation>
     </message>
     <message>
-        <location filename="../walletview.cpp" line="243"/>
+        <location line="+0"/>
         <source>The wallet data was successfully saved to %1.</source>
         <translation>Les données de portefeuille ont été enregistrées avec succès vers %1</translation>
     </message>
@@ -4518,1368 +4234,1476 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>dash-core</name>
     <message>
-        <location filename="../dashstrings.cpp" line="16"/>
-        <source>%s, you must set a rpcpassword in the configuration file:
-%s
-It is recommended you use the following random password:
-rpcuser=dashrpc
-rpcpassword=%s
-(you do not need to remember this password)
-The username and password MUST NOT be the same.
-If the file does not exist, create it with owner-readable-only file permissions.
-It is also recommended to set alertnotify so you are notified of problems;
-for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
-</source>
-        <translation>%s, vous devez définir un rpc mot de passe dans le fichier de configuration: 
-%s
-Il est recommandé que vous utilisiez ce mot de passe aléatoire:
-rpcuser=dashrpc
-rpcpassword=%s
-(Vous ne devez pas vous souvenir de ce mot de passe)
-Le nom d&apos;utilisateur et le mot de passe NE DOIVENT PAS être équivalent.
-Si le fichier n&apos;existe pas, créé le avec les permissions de lecture uniquement pour le propriétaire.
-Il est recommandé de régler alertnotify pour que vous soyez averti des problèmes;
-Pour exemple: alertnotify=echo %%s | mail -s &quot;Alerte Dash&quot; admin@foo.com
-</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="29"/>
-        <source>Acceptable ciphers (default: TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH)</source>
-        <translation>Chiffrements acceptables (par défaut : TLSv1.2+HIGH : TLSv1+HIGH : !SSLv2 : !aNULL : !eNULL : !3DES : @STRENGTH)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="32"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
-        <translation>Une erreur est survenue lors du réglage du port RPC %u pour écouter sur IPv4 : %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="34"/>
-        <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
-        <translation>Une erreur est survenue lors du réglage du port RPC %u pour écouter sur IPv6, retour à IPv4 : %s</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="37"/>
+        <location filename="../dashstrings.cpp" line="+22"/>
         <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
         <translation>Se lier à l&apos;adresse donnée et toujours l&apos;écouter. Utilisez la notation [host]:port pour l&apos;IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="40"/>
+        <location line="+10"/>
         <source>Cannot obtain a lock on data directory %s. Dash Core is probably already running.</source>
         <translation>Impossible d’obtenir un verrou sur le répertoire de données %s. Dash Core fonctionne probablement déjà.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="43"/>
-        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:15)</source>
-        <translation>Limiter continuellement les transactions gratuites à &lt;n&gt;*1000 octets par minute (par défaut : 15)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="46"/>
+        <location line="+12"/>
         <source>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</source>
         <translation>Darksend utilise les montants dénominés exacts pour envoyer des fonds, vous pourriez simplement avoir besoin d&apos;anonymiser plus de pièces.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="49"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: 0)</source>
-        <translation>Désactivez toutes les fonctionnalités liées à Masternode et Darksend (0-1, par défaut: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="51"/>
-        <source>Enable instantx, show confirmations for locked transactions (bool, default: true)</source>
-        <translation>Activer instantx, montrer les confirmations pour les transactions verrouillées (bool, par defaut: true)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="54"/>
-        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: 0)</source>
-        <translation>Activer l&apos;utilisation automatique de Darksend pour les fonds stockés dans ce portefeuille (0-1, défaut: 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="57"/>
-        <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly. This is intended for regression testing tools and app development.</source>
-        <translation>Entrer dans le mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs peuvent être résolus instantanément. Ceci est destiné aux outils de test de régression et au développement d&apos;applications.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="61"/>
+        <location line="+17"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Passer en mode de test de régression qui utilise une chaîne spéciale dans laquelle les blocs sont résolus instantanément.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="64"/>
+        <location line="+3"/>
         <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="66"/>
-        <source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
-        <translation>Erreur : La transaction a été rejetée ! Ceci peut arriver si certaines pièces de votre portefeuille étaient déjà dépensées, par exemple si vous avez utilisé une copie de wallet.dat et les pièces ont été dépensées avec cette copie sans être marquées comme tel ici.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="70"/>
-        <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
-        <translation>Erreur : Cette transaction nécessite des frais de transaction d&apos;au moins %s en raison de son montant, de sa complexité ou de l&apos;utilisation de fonds reçus récemment !</translation>
+        <translation>Erreur: L&apos;écoute de connections entrantes a échouée (erreur retournée: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="73"/>
-        <source>Error: Wallet unlocked for anonymization only, unable to create transaction.</source>
-        <translation>Erreur: Portefeuille uniquement déverrouillé pour l&apos;anonymisation, impossible d&apos;effectuer une transaction.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="75"/>
+        <location line="+5"/>
         <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
         <translation>Exécuter une commande lorsqu&apos;une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="78"/>
+        <location line="+3"/>
         <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
         <translation>Exécuter la commande lorsqu&apos;une transaction de portefeuille change (%s dans la commande est remplacée par TxID)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="81"/>
+        <location line="+3"/>
         <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
         <translation>Exécuter la commande lorsque le meilleur bloc change (%s dans cmd est remplacé par le hachage du bloc)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="84"/>
-        <source>Fees smaller than this are considered zero fee (for transaction creation) (default:</source>
-        <translation>Les frais inférieurs à ce seuil sont considérés comme nuls (pour la création de transactions) (par défaut :</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="87"/>
-        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: 100)</source>
-        <translation>Purger l’activité de la base de données de la zone de mémoire vers le journal sur disque tous les &lt;n&gt; mégaoctets (par défaut : 100)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="90"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Détection de sorties dénominées non confirmées, attente de leur confirmation pour continuer.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="93"/>
-        <source>How thorough the block verification of -checkblocks is (0-4, default: 3)</source>
-        <translation>Degré de profondeur de la vérification des blocs -checkblocks (0-4, par défaut : 3)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="95"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Dans ce mode -genproclimit contrôle combien de blocs sont générés immédiatement.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="98"/>
+        <location line="+3"/>
         <source>InstantX requires inputs with at least 6 confirmations, you might need to wait a few minutes and try again.</source>
         <translation>InstantX nécessite des entrées avec au moins 6 confirmations, vous devriez attendre quelques minutes avant de réessayer.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="101"/>
-        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation>Écouter les connexions JSON-RPC sur &lt;port&gt; (par défaut : 9998 ou tesnet : 19998)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="103"/>
+        <location line="+17"/>
         <source>Name to construct url for KeePass entry that stores the wallet passphrase</source>
         <translation>Nom pour construire l&apos;URL pour l&apos;entrée KeePass qui conserve la phrase de passe du portefeuille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="105"/>
-        <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
-        <translation>Délai en secondes de refus de reconnexion pour les pairs présentant un mauvais comportement (par défaut : 86400)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="108"/>
-        <source>Output debugging information (default: 0, supplying &lt;category&gt; is optional)</source>
-        <translation>Extraire les informations de débogage (par défaut : 0, fournir &lt;category&gt; est optionnel)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="110"/>
-        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: 0, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation>Fournir des liquidités à Darksend en mélangeant occasionnellement mais régulièrement des pièces (0-100, par défaut : 0, 1=très fréquent, frais élevés, 100=très rare, frais bas)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="114"/>
+        <location line="+10"/>
         <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
-        <translation type="unfinished"></translation>
+        <translation>Requête pour adresses de pairs via recherche DNS, si peu d&apos;adresses (par défaut: 1 sauf si -connect)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="117"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Définir une adresse externe:port pour accéder à ce masternode (exemple : adresse:port)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="119"/>
+        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="121"/>
+        <location line="+2"/>
         <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
         <translation>Définir le nombre d&apos;exétrons de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="124"/>
-        <source>Set the processor limit for when generation is on (-1 = unlimited, default: -1)</source>
-        <translation>Définir la limite processeur définissant quand la génération est en fonction (-1 = illimité, par défaut : -1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="127"/>
-        <source>Show N confirmations for a successfully locked transaction (0-9999, default: 1)</source>
-        <translation>Afficher N confirmations for une transaction verrouillée réussie (0-9999, default : 1)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="130"/>
+        <location line="+9"/>
         <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
         <translation>Ceci est une pré-version de test - l&apos;utiliser à vos risques et périls - ne pas l&apos;utiliser pour miner ou pour des applications marchandes</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="133"/>
+        <location line="+20"/>
         <source>Unable to bind to %s on this computer. Dash Core is probably already running.</source>
         <translation>Impossible de se lier à %s sur cet ordinateur. Dash Core fonctionne probablement déjà.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="136"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend denominated funds for this transaction.</source>
         <translation>Impossible de localiser suffisamment de fonds Darksend dénominés pour cette transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="138"/>
+        <location line="+2"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction that are not equal 1000 DASH.</source>
         <translation>Impossible de localiser suffisamment de fonds non-dénominés Darksend pour cette transaction qui ne sont pas égaux à 1000 DASH.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="141"/>
+        <location line="+3"/>
         <source>Unable to locate enough Darksend non-denominated funds for this transaction.</source>
         <translation>Impossible de localiser suffisamment de fonds Darksend non-dénominés  pour cette transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="143"/>
-        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: -proxy)</source>
-        <translation>Utiliser un serveur mandataire SOCKS5 séparé pour atteindre les pairs par les services cachés de Tor (par défaut : -proxy)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="146"/>
+        <location line="+8"/>
         <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
         <translation>Attention : -paytxfee est réglée sur un montant très élevé ! Il s&apos;agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="149"/>
-        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash will not work properly.</source>
-        <translation>Attention : Veuillez vérifier que la date et l&apos;heure de votre ordinateur sont justes ! Si votre horloge n&apos;est pas à l&apos;heure, Dash ne fonctionnera pas correctement.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="152"/>
+        <location line="+6"/>
         <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
         <translation>Attention : Le réseau ne semble pas totalement d&apos;accord ! Quelques mineurs semblent éprouver des difficultés.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="155"/>
+        <location line="+3"/>
         <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
         <translation>Attention : Nous ne semblons pas être en accord complet avec nos pairs ! Vous pourriez avoir besoin d&apos;effectuer une mise à niveau, ou d&apos;autres nœuds du réseau pourraient avoir besoin d&apos;effectuer une mise à niveau.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="158"/>
+        <location line="+3"/>
         <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
         <translation>Avertissement : une erreur est survenue lors de la lecture de wallet.dat ! Toutes les clefs ont été lues correctement mais les données de transaction ou les entrées du carnet d&apos;adresses sont peut-être incorrectes ou manquantes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="161"/>
+        <location line="+3"/>
         <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
         <translation>Avertissement : wallet.dat corrompu, données récupérées ! Le fichier wallet.dat original a été enregistré en tant que wallet.{timestamp}.bak dans %s ; si votre solde ou transactions sont incorrects vous devriez effectuer une restauration depuis une sauvegarde.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="165"/>
-        <source>You must set rpcpassword=&lt;password&gt; in the configuration file:
-%s
-If the file does not exist, create it with owner-readable-only file permissions.</source>
-        <translation>Vous devez ajouter la ligne rpcpassword=&lt;mot-de-passe&gt; au fichier de configuration :
-%s
-Si le fichier n&apos;existe pas, créez-le avec les droits de lecture seule accordés au propriétaire.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="170"/>
+        <location line="+10"/>
         <source>You must specify a masternodeprivkey in the configuration. Please see documentation for help.</source>
         <translation>Vous devez définir masternodeprivkey dans la configuration. Veuillez consulter la documentation pour plus d&apos;aide.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="173"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(par défaut : 1)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="174"/>
-        <source>(default: wallet.dat)</source>
-        <translation>(par défaut : wallet.dat)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="175"/>
-        <source>&lt;category&gt; can be:</source>
-        <translation>&lt;category&gt; peut être :</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="176"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accepter les commandes de JSON-RPC et de la ligne de commande</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="177"/>
+        <location line="+1"/>
         <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
         <translation>Accepter les connexions entrantes (par défaut : 1 si aucun -proxy ou -connect )</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="178"/>
+        <location line="+3"/>
         <source>Add a node to connect to and attempt to keep the connection open</source>
         <translation>Ajouter un nœud auquel se connecter et tenter de garder la connexion ouverte</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="179"/>
+        <location line="+1"/>
         <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
         <translation>Autoriser les recherches DNS pour -addnode, -seednode et -connect</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="180"/>
-        <source>Allow JSON-RPC connections from specified IP address</source>
-        <translation>Autoriser les connexions JSON-RPC depuis l&apos;adresse IP spécifiée</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="181"/>
+        <location line="+1"/>
         <source>Already have that input.</source>
         <translation>Entrée déjà présente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="182"/>
-        <source>Always query for peer addresses via DNS lookup (default: 0)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="183"/>
+        <location line="+2"/>
         <source>Attempt to recover private keys from a corrupt wallet.dat</source>
         <translation>Tenter de récupérer les clefs privées d&apos;un wallet.dat corrompu</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="184"/>
+        <location line="+1"/>
         <source>Block creation options:</source>
         <translation>Options de création de bloc :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="185"/>
+        <location line="+1"/>
         <source>Can&apos;t denominate: no compatible inputs left.</source>
-        <translation type="unfinished"></translation>
+        <translation>Ne peux pas dénommée: pas d&apos;entrées compatibles restantes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="186"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Impossible de revenir à une version inférieure du portefeuille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="187"/>
+        <location line="+1"/>
         <source>Cannot resolve -bind address: &apos;%s&apos;</source>
         <translation>Impossible de résoudre l&apos;adresse -bind : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="188"/>
+        <location line="+1"/>
         <source>Cannot resolve -externalip address: &apos;%s&apos;</source>
         <translation>Impossible de résoudre l&apos;adresse -externalip : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="189"/>
+        <location line="+2"/>
         <source>Cannot write default address</source>
         <translation>Impossible d&apos;écrire l&apos;adresse par défaut</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="190"/>
-        <source>Clear list of wallet transactions (diagnostic tool; implies -rescan)</source>
-        <translation>Effacer la liste des transactions du portefeuille (outil de diagnostic, implique un nouveau balayage -rescan)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="191"/>
-        <source>Collateral is not valid.</source>
-        <translation>Le collatéral est invalide.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="192"/>
+        <location line="+1"/>
         <source>Collateral not valid.</source>
         <translation>Collatéral invalide.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="193"/>
+        <location line="+1"/>
         <source>Connect only to the specified node(s)</source>
         <translation>Ne se connecter qu&apos;au(x) nœud(s) spécifié(s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="194"/>
-        <source>Connect through SOCKS proxy</source>
-        <translation>Connexion à travers un serveur mandataire SOCKS</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="195"/>
-        <source>Connect to JSON-RPC on &lt;port&gt; (default: 9998 or testnet: 19998)</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="196"/>
-        <source>Connect to KeePassHttp on port &lt;port&gt; (default: 19455)</source>
-        <translation>Connecter à KeePassHttp sur le pot &lt;port&gt; (par défaut: 19455)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="197"/>
+        <location line="+3"/>
         <source>Connect to a node to retrieve peer addresses, and disconnect</source>
         <translation>Se connecter à un nœud pour obtenir des adresses de pairs puis se déconnecter</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="198"/>
+        <location line="+1"/>
         <source>Connection options:</source>
         <translation>Options de connexion :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="199"/>
+        <location line="+3"/>
         <source>Corrupted block database detected</source>
         <translation>Base corrompue de données des blocs détectée</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="200"/>
-        <source>Dash Core Daemon</source>
-        <translation>Démon Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="201"/>
-        <source>Dash Core RPC client version</source>
-        <translation>Version du client RPC de Dash Core</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="202"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend est désactivé.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="203"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Options Darksend :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="204"/>
+        <location line="+3"/>
         <source>Debugging/Testing options:</source>
         <translation>Options de test/de débogage :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="205"/>
-        <source>Disable safemode, override a real safe mode event (default: 0)</source>
-        <translation>Désactiver le mode sans échec, passer outre un événement sans échec réel (par défaut : 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="206"/>
+        <location line="+2"/>
         <source>Discover own IP address (default: 1 when listening and no -externalip)</source>
         <translation>Découvrir sa propre adresse IP (par défaut : 1 lors de l&apos;écoute et si aucun -externalip)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="207"/>
+        <location line="+1"/>
         <source>Do not load the wallet and disable wallet RPC calls</source>
         <translation>Ne pas charger le portefeuille et désactiver les appels RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="208"/>
+        <location line="+1"/>
         <source>Do you want to rebuild the block database now?</source>
         <translation>Voulez-vous reconstruire la base de données des blocs maintenant ?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="209"/>
+        <location line="+1"/>
         <source>Done loading</source>
         <translation>Chargement terminé</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="210"/>
-        <source>Downgrading and trying again.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="211"/>
-        <source>Enable the client to act as a masternode (0-1, default: 0)</source>
-        <translation>Autoriser le client à agir en tant que masternode (0-1, par défaut : 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="212"/>
+        <location line="+2"/>
         <source>Entries are full.</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="213"/>
-        <source>Error connecting to masternode.</source>
-        <translation>Erreur de connexion au masternode.</translation>
+        <translation>Les entrées sont pleines.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="214"/>
+        <location line="+2"/>
         <source>Error initializing block database</source>
         <translation>Erreur lors de l&apos;initialisation de la base de données des blocs</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="215"/>
+        <location line="+1"/>
         <source>Error initializing wallet database environment %s!</source>
         <translation>Erreur lors de l&apos;initialisation de l&apos;environnement de la base de données du portefeuille %s !</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="216"/>
+        <location line="+1"/>
         <source>Error loading block database</source>
         <translation>Erreur du chargement de la base de données des blocs</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="217"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat</source>
         <translation>Erreur lors du chargement de wallet.dat</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="218"/>
+        <location line="+1"/>
         <source>Error loading wallet.dat: Wallet corrupted</source>
         <translation>Erreur lors du chargement de wallet.dat : portefeuille corrompu</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="219"/>
-        <source>Error loading wallet.dat: Wallet requires newer version of Dash</source>
-        <translation>Erreur au chargement de wallet.dat : le Portefeuille nécessite une nouvelle version de Dash</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="220"/>
+        <location line="+2"/>
         <source>Error opening block database</source>
         <translation>Erreur lors de l&apos;ouverture de la base de données des blocs</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="221"/>
+        <location line="+1"/>
         <source>Error reading from database, shutting down.</source>
         <translation>Erreur à la lecture de la base de données, arrêt en cours.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="222"/>
+        <location line="+1"/>
         <source>Error recovering public key.</source>
         <translation>Erreur à la récupération de la clé publique.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="223"/>
+        <location line="+1"/>
         <source>Error</source>
         <translation>Erreur</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="224"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Erreur : l&apos;espace disque est faible !</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="225"/>
+        <location line="+2"/>
         <source>Error: Wallet locked, unable to create transaction!</source>
         <translation>Erreur : Portefeuille verrouillé, impossible de créer la transaction !</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="226"/>
+        <location line="+1"/>
         <source>Error: You already have pending entries in the Darksend pool</source>
         <translation>Erreur : Vous avez déjà des entrées en attente dans la pool Darksend</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="227"/>
-        <source>Error: system error: </source>
-        <translation>Erreur : erreur système :</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="228"/>
+        <location line="+1"/>
         <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
         <translation>Échec de l&apos;écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="229"/>
-        <source>Failed to read block info</source>
-        <translation>La lecture des informations de bloc a échoué</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="230"/>
+        <location line="+1"/>
         <source>Failed to read block</source>
         <translation>La lecture du bloc a échoué</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="231"/>
-        <source>Failed to sync block index</source>
-        <translation>La synchronisation de l&apos;index des blocs a échoué</translation>
+        <location line="+8"/>
+        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
+        <translation>Si &lt;category&gt; n&apos;est pas indiqué, extraire toutes les données de débogage.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="232"/>
-        <source>Failed to write block index</source>
-        <translation>L&apos;&apos;écriture de l&apos;index des blocs a échoué</translation>
+        <location line="-268"/>
+        <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+        <translation>(1 = garder les méta-données de tx, par ex nom de compte et infos de paiements, 2 = supprimer méta-données)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="233"/>
-        <source>Failed to write block info</source>
-        <translation>L&apos;écriture des informations du bloc a échoué</translation>
+        <location line="+3"/>
+        <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+        <translation>Permettre connections JSON-RPC depuis la source spécifiée. Valide pour &lt;ip&gt; sont: une IP seule (ex. 1.2.3.4), un réseau/masque (ex. 1.2.3.4/255.255.255.0) ou un réseau/CIDR (ex. 1.2.3.4/24). Ce paramétre peut être utilisé plusieurs fois.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="234"/>
-        <source>Failed to write block</source>
-        <translation>L&apos;écriture du bloc a échoué</translation>
+        <location line="+4"/>
+        <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
+        <translation>Une erreur est survenue lors du réglage RPC avec l&apos;adresse %s port %u pour écouter: %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="235"/>
-        <source>Failed to write file info</source>
-        <translation>L&apos;écriture des informations de fichier a échoué</translation>
+        <location line="+6"/>
+        <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+        <translation>Se lier à l&apos;adresse donnée et mettre les pairs qui se connectent en liste blanche. Utilisez la notation [hôte]:port pour l&apos;IPv6</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="236"/>
-        <source>Failed to write to coin database</source>
-        <translation>L&apos;écriture dans la base de données des pièces a échoué</translation>
+        <location line="+3"/>
+        <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+        <translation>Se lier à l&apos;adresse indiquée pour écouter des connections JSON-RPC. Utilisez la notation [hôte]:port pour l&apos;IPv6. Ce paramètre peut être utilisée à plusieurs reprises (par défaut: se lie a toutes les interfaces)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="237"/>
-        <source>Failed to write transaction index</source>
-        <translation>L&apos;écriture de l&apos;index des transactions a échoué</translation>
+        <location line="+7"/>
+        <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
+        <translation>Change le comportement d&apos;un vote de budget finalisé automatique. mode=auto: Vote uniquement pour le budget finalisé qui correspond a mon budget généré. (string, par défaut : auto)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="238"/>
-        <source>Failed to write undo data</source>
-        <translation>L&apos;écriture des données d&apos;annulation a échoué</translation>
+        <location line="+3"/>
+        <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
+        <translation>Limiter continuellement les transactions gratuites à &lt;n&gt;*1000 octets par minute (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="239"/>
-        <source>Fee per kB to add to transactions you send</source>
-        <translation>Frais par ko à ajouter aux transactions que vous envoyez</translation>
+        <location line="+3"/>
+        <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+        <translation>Créer les nouveaux fichiers avec les permissions systèmes par défaut, au lieu du umask 077 (utile seulement si le wallet est désactivé)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="240"/>
-        <source>Fees smaller than this are considered zero fee (for relaying) (default:</source>
-        <translation>Les frais inférieurs à ce seuil sont considérés comme nuls (pour le relayage) (par défaut :</translation>
+        <location line="+6"/>
+        <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+        <translation>Effacer toutes les transactions du portefeuille et récupère celle qui font partie de la chaine de blocs via -rescan au démarrage</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="241"/>
-        <source>Force safe mode (default: 0)</source>
-        <translation>Forcer le mode sans échec (par défaut : 0)</translation>
+        <location line="+3"/>
+        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
+        <translation>Désactivez toutes les fonctionnalités liées à Masternode et Darksend (0-1, par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="242"/>
-        <source>Generate coins (default: 0)</source>
-        <translation>Générer des pièces (défaut : 0)</translation>
+        <location line="+2"/>
+        <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
+        <translation>Distribué sous la licence logicielle MIT, voir le fichier joint COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="243"/>
-        <source>Get help for a command</source>
-        <translation>Obtenir de l’aide pour une commande</translation>
+        <location line="+3"/>
+        <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
+        <translation>Activer instantx, montrer les confirmations pour les transactions verrouillées (bool, par defaut: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="244"/>
-        <source>How many blocks to check at startup (default: 288, 0 = all)</source>
-        <translation>Nombre de blocs à vérifier au démarrage (par défaut : 288, 0 = tous)</translation>
+        <location line="+3"/>
+        <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
+        <translation>Activer l&apos;utilisation automatique de Darksend pour les fonds stockés dans ce portefeuille (0-1, défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="245"/>
-        <source>If &lt;category&gt; is not supplied, output all debugging information.</source>
-        <translation>Si &lt;category&gt; n&apos;est pas indiqué, extraire toutes les données de débogage.</translation>
+        <location line="+8"/>
+        <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
+        <translation>Erreur: Paramètre obsolète -socks. Il n&apos;est plus possible d&apos;indiquer la version SOCKS, seul les proxy SOCKS5 sont supportés.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="246"/>
-        <source>Ignore masternodes less than version (example: 70050; default : 0)</source>
-        <translation>Ignorer les masternodes ayant une version inférieure (exemple: 70050 ; par défaut : 0)</translation>
+        <location line="+12"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
+        <translation>Les frais (en DASH/ko) inférieurs à ce seuil sont considérés comme nuls pour le relayage (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="247"/>
-        <source>Importing...</source>
-        <translation>Importation...</translation>
+        <location line="+3"/>
+        <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+        <translation>Les frais (en DASH/ko) inférieurs à ce seuil sont considérés comme nuls pour la création de transactions (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="248"/>
-        <source>Imports blocks from external blk000??.dat file</source>
-        <translation>Importe des blocs depuis un fichier blk000??.dat externe</translation>
+        <location line="+3"/>
+        <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
+        <translation>Purger l’activité de la base de données de la zone de mémoire vers le journal sur disque tous les &lt;n&gt; mégaoctets (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="249"/>
-        <source>Incompatible mode.</source>
-        <translation>Mode incompatible.</translation>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Détection de sorties dénominées non confirmées, attente de leur confirmation pour continuer.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="250"/>
-        <source>Incompatible version.</source>
-        <translation>Version incompatible.</translation>
+        <location line="+3"/>
+        <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+        <translation>Degré de profondeur de la vérification des blocs -checkblocks (0-4, par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="251"/>
-        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
-        <translation>Bloc de genèse incorrect ou introuvable. Mauvais répertoire de données pour le réseau ?</translation>
+        <location line="+2"/>
+        <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+        <translation>Si paytxfee n&apos;est pas indiqué, inclure assez de frais pour que les transactions commencent leur confirmation en moyenne dans les n blocs (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="252"/>
-        <source>Information</source>
-        <translation>Informations</translation>
+        <location line="+9"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+        <translation>Montant invalide pour -maxtxfee=&lt;montant&gt; : « %s » (doit être au moins du montant de frais minrelay de %s pour éviter des transactions bloquées)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="253"/>
-        <source>Initialization sanity check failed. Dash Core is shutting down.</source>
-        <translation type="unfinished"></translation>
+        <location line="+3"/>
+        <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
+        <translation>Lors du minage, journaliser la priorité des transactions et les frais par ko (par défaut : %u) </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="254"/>
-        <source>Input is not valid.</source>
-        <translation>L&apos;entrée est invalide.</translation>
+        <location line="+2"/>
+        <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+        <translation>Maintenir un index complet des transactions, utilisé par l&apos;appel rpc getrawtransaction (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="255"/>
-        <source>InstantX options:</source>
-        <translation>Options InstantX :</translation>
+        <location line="+3"/>
+        <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+        <translation>Taille maximale des données dans les transactions support de données que l&apos;on relaye et mine (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="256"/>
-        <source>Insufficient funds</source>
-        <translation>Fonds insuffisants</translation>
+        <location line="+3"/>
+        <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
+        <translation>Frais totaux maximum pour une transaction portefeuille unique, si trop bas, risque d&apos;annulation pour transactions trop volumineuses (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="257"/>
-        <source>Insufficient funds.</source>
-        <translation>Fonds insuffisants</translation>
+        <location line="+5"/>
+        <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+        <translation>Délai en secondes de refus de reconnexion pour les pairs présentant un mauvais comportement (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="258"/>
-        <source>Invalid -onion address: &apos;%s&apos;</source>
-        <translation>Adresse -onion invalide : « %s »</translation>
+        <location line="+2"/>
+        <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+        <translation>Extraire les informations de débogage (par défaut : %u, fournir &lt;category&gt; est optionnel)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="259"/>
-        <source>Invalid -proxy address: &apos;%s&apos;</source>
-        <translation>Adresse -proxy invalide : « %s »</translation>
+        <location line="+2"/>
+        <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
+        <translation>Fournir des liquidités à Darksend en mélangeant occasionnellement mais régulièrement des pièces (0-100, par défaut : %u, 1=très fréquent, frais élevés, 100=très rare, frais bas)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="260"/>
-        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Montant invalide pour -minrelayfee=&lt;montant&gt; : « %s »</translation>
+        <location line="+7"/>
+        <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Priorité haute requise pour relayer les transactions à frais modiques ou nuls (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="261"/>
-        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Montant invalide pour -mintxfee=&lt;montant&gt; : « %s »</translation>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Envoyer les informations de débogage/trace vers la console au lieu du fichier debug.log (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="262"/>
-        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s »</translation>
+        <location line="+9"/>
+        <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
+        <translation>Définir la limite processeur définissant quand la génération est en fonction (-1 = illimité, par défaut : %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="263"/>
-        <source>Invalid amount</source>
-        <translation>Montant invalide</translation>
+        <location line="+3"/>
+        <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
+        <translation>Afficher N confirmations for une transaction verrouillée réussie (0-9999, default : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="264"/>
-        <source>Invalid masternodeprivkey. Please see documenation.</source>
-        <translation>masternodeprivkey invalide. Veuillez vous référer à la documentation.</translation>
+        <location line="+6"/>
+        <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+        <translation>Ce produit comprend des logiciels développés par le projet OpenSSL afin d&apos;être utilisés dans la boîte à outils OpenSSL &lt;https://www.openssl.org/&gt;, un logiciel de chiffrement écrit par Eric Young et un logiciel UPnP développé par Thomas Bernard.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="265"/>
-        <source>Invalid private key.</source>
-        <translation>Clé privée invalide.</translation>
+        <location line="+4"/>
+        <source>To use dashd, or the -server option to dash-qt, you must set an rpcpassword in the configuration file:
+%s
+It is recommended you use the following random password:
+rpcuser=dashrpc
+rpcpassword=%s
+(you do not need to remember this password)
+The username and password MUST NOT be the same.
+If the file does not exist, create it with owner-readable-only file permissions.
+It is also recommended to set alertnotify so you are notified of problems;
+for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
+</source>
+        <translation>Pour utiliser dashd, ou le paramètre -server de dash-qt, vous devez définir un rpc mot de passe dans le fichier de configuration:
+%s
+Il est recommandé que vous utilisiez ce mot de passe aléatoire:
+rpcuser=dashrpc
+rpcpassword=%s
+(Vous ne devez pas vous souvenir de ce mot de passe)
+Le nom d&apos;utilisateur et le mot de passe NE DOIVENT PAS être équivalent.
+Si le fichier n&apos;existe pas, créé le avec les permissions de lecture uniquement pour le propriétaire.
+Il est recommandé de régler alertnotify pour que vous soyez averti des problèmes;
+Pour exemple: alertnotify=echo %%s | mail -s &quot;Alerte Dash&quot; admin@foo.com
+</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="266"/>
-        <source>Invalid script detected.</source>
-        <translation>Script invalide détecté.</translation>
+        <location line="+22"/>
+        <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+        <translation>Utiliser un serveur proxy SOCKS5 séparé pour atteindre les pairs par les services cachés de Tor (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="267"/>
-        <source>KeePassHttp id for the established association</source>
-        <translation type="unfinished"></translation>
+        <location line="+3"/>
+        <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+        <translation>Attention : -maxtxfee est réglée sur un montant très élevé ! Il s&apos;agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="268"/>
-        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
-        <translation type="unfinished"></translation>
+        <location line="+6"/>
+        <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
+        <translation>Attention : Veuillez vérifier que la date et l&apos;heure de votre ordinateur sont justes ! Si votre horloge n&apos;est pas à l&apos;heure, Dash Core ne fonctionnera pas correctement.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="269"/>
-        <source>Keep N dash anonymized (default: 0)</source>
-        <translation>Maintenir N dash anonymisé en permanence (défaut: 0)</translation>
+        <location line="+16"/>
+        <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+        <translation>Pairs en liste blanche qui se connectent via le masque réseau ou adresse IP. Peut être spécifié de multiples fois.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="270"/>
-        <source>Keep at most &lt;n&gt; unconnectable blocks in memory (default: %u)</source>
-        <translation type="unfinished"></translation>
+        <location line="+3"/>
+        <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+        <translation>Pairs en liste blanche ne peuvent être bannis pour DoS et leurs transactions sont toujours relayées, même si elles sont déjà en mémoire, utile par ex. pour une passerelle</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="271"/>
-        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
-        <translation type="unfinished"></translation>
+        <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 n&apos;est utilisable que sur mainnet)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="272"/>
-        <source>Last Darksend was too recent.</source>
-        <translation>Le dernier Darksend est trop récent.</translation>
+        <location line="+1"/>
+        <source>(default: %s)</source>
+        <translation>(par défaut: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="273"/>
-        <source>Last successful darksend action was too recent.</source>
-        <translation>La dernière action Darksend est trop récente.</translation>
+        <location line="+3"/>
+        <source>&lt;category&gt; can be:
+</source>
+        <translation>&lt;category&gt; peut être :
+</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="274"/>
-        <source>Limit size of signature cache to &lt;n&gt; entries (default: 50000)</source>
-        <translation>Limiter la taille du cache des signatures à &lt;n&gt; entrées (par défaut : 50000)</translation>
+        <location line="+3"/>
+        <source>Accept public REST requests (default: %u)</source>
+        <translation>Accepter les requetes REST publiques (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="275"/>
-        <source>List commands</source>
-        <translation>Lister les commandes</translation>
+        <location line="+1"/>
+        <source>Acceptable ciphers (default: %s)</source>
+        <translation>Chiffrements acceptables (par défaut: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="276"/>
-        <source>Listen for connections on &lt;port&gt; (default: 9999 or testnet: 19999)</source>
-        <translation>Écouter les connexions sur &lt;port&gt; (par défaut: 9999 ou testnet: 19999)</translation>
+        <location line="+4"/>
+        <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+        <translation>Toujours requêter via recherche DNS pour des adresses de pairs (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="277"/>
-        <source>Loading addresses...</source>
-        <translation>Chargement des adresses…</translation>
+        <location line="+9"/>
+        <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
+        <translation>Impossible de résoudre l&apos;adresse -whitebind : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="278"/>
-        <source>Loading block index...</source>
-        <translation>Chargement de l’index des blocs…</translation>
+        <location line="+4"/>
+        <source>Connect through SOCKS5 proxy</source>
+        <translation>Connexion à travers un serveur mandataire SOCKS5</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="279"/>
-        <source>Loading masternode cache...</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
+        <translation>Connecter à KeePassHttp sur le port &lt;port&gt; (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="280"/>
-        <source>Loading wallet... (%3.2f %%)</source>
-        <translation>Chargement du portefeuille... (%3.2f %%)</translation>
+        <location line="+3"/>
+        <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="281"/>
-        <source>Loading wallet...</source>
-        <translation>Chargement du portefeuille…</translation>
+        <location line="+1"/>
+        <source>Copyright (C) 2014-%i The Dash Core Developers</source>
+        <translation>Copyright (C) 2014-%i The Dash Core Developers</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="282"/>
-        <source>Log transaction priority and fee per kB when mining blocks (default: 0)</source>
-        <translation>Lors du minage, journaliser la priorité des transactions et les frais par ko (par défaut : 0) </translation>
+        <location line="+2"/>
+        <source>Could not parse -rpcbind value %s as network address</source>
+        <translation>Impossible d&apos;analyser la valeur -rpcbind %s en tant qu&apos;adresse réseau</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="283"/>
-        <source>Maintain a full transaction index (default: 0)</source>
-        <translation>Maintenir un index complet des transactions (par défaut : 0)</translation>
+        <location line="+2"/>
+        <source>Darksend is idle.</source>
+        <translation>Darksend est inactif.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="284"/>
-        <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source>
-        <translation>Garder au plus &lt;n&gt; connexions avec les pairs (par défaut : 125)</translation>
+        <location line="+2"/>
+        <source>Darksend request complete:</source>
+        <translation>Requête Darksend complète :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="285"/>
-        <source>Masternode options:</source>
-        <translation>Options Masternode :</translation>
+        <location line="+1"/>
+        <source>Darksend request incomplete:</source>
+        <translation>Requête Darksend incomplète.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="286"/>
-        <source>Masternode queue is full.</source>
-        <translation>La file d&apos;attente du masternode est pleine.</translation>
+        <location line="+2"/>
+        <source>Disable safemode, override a real safe mode event (default: %u)</source>
+        <translation>Désactiver le mode sans échec, passer outre un événement sans échec réel (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="287"/>
-        <source>Masternode:</source>
-        <translation>Masternode :</translation>
+        <location line="+5"/>
+        <source>Enable the client to act as a masternode (0-1, default: %u)</source>
+        <translation>Autoriser le client à agir en tant que masternode (0-1, par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="288"/>
-        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source>
-        <translation>Tampon maximal de réception par connexion, &lt;n&gt;*1 000 octets (par défaut : 5000)</translation>
+        <location line="+2"/>
+        <source>Error connecting to Masternode.</source>
+        <translation>Erreur de connexion au masternode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="289"/>
-        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source>
-        <translation>Tampon maximal d&apos;envoi par connexion », &lt;n&gt;*1000 octets (par défaut : 1000)</translation>
+        <location line="+6"/>
+        <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
+        <translation>Erreur au chargement de wallet.dat : le Portefeuille nécessite une nouvelle version de Dash Core</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="290"/>
-        <source>Missing input transaction information.</source>
-        <translation>Informations de transaction entrante manquantes.</translation>
+        <location line="+5"/>
+        <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Erreur: Une erreur interne fatale est survenue, voir debug.log pour les détails</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="291"/>
-        <source>No compatible masternode found.</source>
-        <translation>Aucun masternode compatible trouvé.</translation>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Erreur: Impossible de selectionner les entrées denommées</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="292"/>
-        <source>No funds detected in need of denominating.</source>
-        <translation>Aucuns fonds détectés nécessitant une dénomination.</translation>
+        <location line="+2"/>
+        <source>Error: Unsupported argument -tor found, use -onion.</source>
+        <translation>Erreur: Paramètre -tor non supporté, utilisez -onion.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="293"/>
-        <source>No masternodes detected.</source>
-        <translation>Aucun masternode détecté.</translation>
+        <location line="+5"/>
+        <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
+        <translation>Frais (en DASH/ko) à ajouter aux transactions que vous envoyez (par défaut: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="294"/>
-        <source>No matching denominations found for mixing.</source>
-        <translation>Pas de dénominations équivalentes trouvées pour le mélange.</translation>
+        <location line="+1"/>
+        <source>Finalizing transaction.</source>
+        <translation>Finalisation de la transaction.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="295"/>
-        <source>Non-standard public key detected.</source>
-        <translation>Clé publique non standard détectée.</translation>
+        <location line="+1"/>
+        <source>Force safe mode (default: %u)</source>
+        <translation>Forcer le mode sans échec (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="296"/>
-        <source>Not compatible with existing transactions.</source>
-        <translation>Non compatible avec les transactions existantes.</translation>
+        <location line="+1"/>
+        <source>Found enough users, signing ( waiting %s )</source>
+        <translation>Nombre suffisant d&apos;utilisateurs trouvé, signature ( attente %s )</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="297"/>
-        <source>Not enough file descriptors available.</source>
-        <translation>Pas assez de descripteurs de fichiers de disponibles.</translation>
+        <location line="+1"/>
+        <source>Found enough users, signing ...</source>
+        <translation>Nombre suffisant d&apos;utilisateurs trouvé, signature ...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="298"/>
-        <source>Not in the masternode list.</source>
-        <translation>Absent de la liste des masternodes.</translation>
+        <location line="+1"/>
+        <source>Generate coins (default: %u)</source>
+        <translation>Générer des pièces (défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="299"/>
-        <source>Only accept block chain matching built-in checkpoints (default: 1)</source>
-        <translation>N&apos;accepter qu&apos;une chaîne de blocs correspondant aux points de vérification intégrés (par défaut : 1)</translation>
+        <location line="+1"/>
+        <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+        <translation>Nombre de blocs à vérifier au démarrage (par défaut : %u, 0 = tous)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="300"/>
-        <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source>
-        <translation>Se connecter uniquement aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou Tor)</translation>
+        <location line="+2"/>
+        <source>Importing...</source>
+        <translation>Importation...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="301"/>
-        <source>Options:</source>
-        <translation>Options :</translation>
+        <location line="+1"/>
+        <source>Imports blocks from external blk000??.dat file</source>
+        <translation>Importe des blocs depuis un fichier blk000??.dat externe</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="302"/>
-        <source>Password for JSON-RPC connections</source>
-        <translation>Mot de passe pour les connexions JSON-RPC</translation>
+        <location line="+1"/>
+        <source>Include IP addresses in debug output (default: %u)</source>
+        <translation>Inclure les adresses IP dans la sortie debug (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="303"/>
-        <source>Prepend debug output with timestamp (default: 1)</source>
-        <translation>Ajouter l&apos;horodatage au début de la sortie de débogage (par défaut : 1)</translation>
+        <location line="+1"/>
+        <source>Incompatible mode.</source>
+        <translation>Mode incompatible.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="304"/>
-        <source>Print block on startup, if found in block index</source>
-        <translation>Imprimer le bloc au démarrage s&apos;il est trouvé dans l&apos;index des blocs</translation>
+        <location line="+1"/>
+        <source>Incompatible version.</source>
+        <translation>Version incompatible.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="305"/>
-        <source>Print block tree on startup (default: 0)</source>
-        <translation>Imprimer l&apos;arborescence des blocs au démarrage (par défaut : 0)</translation>
+        <location line="+1"/>
+        <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+        <translation>Bloc de genèse incorrect ou introuvable. Mauvais répertoire de données pour le réseau ?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="306"/>
-        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Options RPC SSL : (voir le wiki Bitcoin pour les instructions de configuration de SSL)</translation>
+        <location line="+1"/>
+        <source>Information</source>
+        <translation>Informations</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="307"/>
-        <source>RPC client options:</source>
-        <translation>Options du client RPC :</translation>
+        <location line="+1"/>
+        <source>Initialization sanity check failed. Dash Core is shutting down.</source>
+        <translation>Les tests de cohérences lors de l&apos;initialisation ont échoués. Dash Core est en cours de fermeture.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="308"/>
-        <source>RPC server options:</source>
-        <translation>Options du serveur RPC :</translation>
+        <location line="+1"/>
+        <source>Input is not valid.</source>
+        <translation>L&apos;entrée est invalide.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="309"/>
-        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
-        <translation>Abandonner aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
+        <location line="+1"/>
+        <source>InstantX options:</source>
+        <translation>Options InstantX :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="310"/>
-        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
-        <translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
+        <location line="+1"/>
+        <source>Insufficient funds.</source>
+        <translation>Fonds insuffisants</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="311"/>
-        <source>Rebuild block chain index from current blk000??.dat files</source>
-        <translation>Reconstruire l&apos;index de la chaîne de blocs à partir des fichiers blk000??.dat courants</translation>
+        <location line="+1"/>
+        <source>Invalid -onion address: &apos;%s&apos;</source>
+        <translation>Adresse -onion invalide : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="312"/>
-        <source>Rescan the block chain for missing wallet transactions</source>
-        <translation>Réanalyser la chaîne de blocs pour les transactions de portefeuille manquantes</translation>
+        <location line="+1"/>
+        <source>Invalid -proxy address: &apos;%s&apos;</source>
+        <translation>Adresse -proxy invalide : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="313"/>
-        <source>Rescanning...</source>
-        <translation>Nouvelle analyse…</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Montant invalide pour -maxtxfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="314"/>
-        <source>Run a thread to flush wallet periodically (default: 1)</source>
-        <translation>Exécuter une tâche pour purger le portefeuille périodiquement (par défaut : 1) </translation>
+        <location line="+1"/>
+        <source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Montant invalide pour -minrelayfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="315"/>
-        <source>Run in the background as a daemon and accept commands</source>
-        <translation>Fonctionner en arrière-plan en tant que démon et accepter les commandes</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -mintxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Montant invalide pour -mintxfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="316"/>
-        <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
-        <translation>Options SSL : (voir le Wiki de Bitcoin pour les instructions de configuration du SSL)</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+        <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s » (minimum possible: %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="317"/>
-        <source>Select SOCKS version for -proxy (4 or 5, default: 5)</source>
-        <translation>Choisir la version SOCKS pour -proxy (4 ou 5, par défaut : 5)</translation>
+        <location line="+1"/>
+        <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source>
+        <translation>Montant invalide pour -paytxfee=&lt;montant&gt; : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="318"/>
-        <source>Send command to Dash Core</source>
-        <translation>Envoyer commandes vers Dash Core</translation>
+        <location line="+11"/>
+        <source>Last successful Darksend action was too recent.</source>
+        <translation>La dernière action Darksend réussie est trop récente.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="319"/>
-        <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source>
-        <translation>Envoyer des commandes au nœud fonctionnant sur &lt;ip&gt; (par défaut : 127.0.0.1)</translation>
+        <location line="+1"/>
+        <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
+        <translation>Limiter la taille du cache des signatures à &lt;n&gt; entrées (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="320"/>
-        <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>
+        <location line="+2"/>
+        <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Écouter les connexions JSON-RPC sur &lt;port&gt; (par défaut : %u ou tesnet : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="321"/>
-        <source>Server certificate file (default: server.cert)</source>
-        <translation>Fichier de certification du serveur (par défaut : server.cert)</translation>
+        <location line="+1"/>
+        <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+        <translation>Écouter les connexions sur &lt;port&gt; (par défaut: %u ou testnet: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="322"/>
-        <source>Server private key (default: server.pem)</source>
-        <translation>Clef privée du serveur (par défaut : server.pem)</translation>
+        <location line="+8"/>
+        <source>Lock masternodes from masternode configuration file (default: %u)</source>
+        <translation>Vérouiller les masternodes depuis le fichier de configuration masternode (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="323"/>
-        <source>Session not complete!</source>
-        <translation>Session incomplète!</translation>
+        <location line="+1"/>
+        <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+        <translation>Garder au plus &lt;n&gt; connexions avec les pairs (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="324"/>
-        <source>Session timed out (30 seconds), please resubmit.</source>
-        <translation>Session expirée (30 secondes), veuillez s&apos;il vous plaît réessayer.</translation>
+        <location line="+4"/>
+        <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Tampon maximal de réception par connexion, &lt;n&gt;*1000 octets (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="325"/>
-        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
-        <translation>Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d)</translation>
+        <location line="+1"/>
+        <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+        <translation>Tampon maximal d&apos;envoi par connexion », &lt;n&gt;*1000 octets (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="326"/>
-        <source>Set key pool size to &lt;n&gt; (default: 100)</source>
-        <translation>Définir la taille de la réserve de clefs à &lt;n&gt; (par défaut : 100)</translation>
+        <location line="+2"/>
+        <source>Mixing in progress...</source>
+        <translation>Mélange en cours...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="327"/>
-        <source>Set maximum block size in bytes (default: %d)</source>
-        <translation>Définir la taille minimale de bloc en octets (par défaut : %d)</translation>
+        <location line="+1"/>
+        <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
+        <translation>Un port doit être spécifié avec -whitebind: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="328"/>
-        <source>Set minimum block size in bytes (default: 0)</source>
-        <translation>Définir la taille de bloc minimale en octets (par défaut : 0)</translation>
+        <location line="+1"/>
+        <source>No Masternodes detected.</source>
+        <translation>Aucun Masternode détecté.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="329"/>
-        <source>Set the masternode private key</source>
-        <translation>Définir la clé privée du masternode</translation>
+        <location line="+1"/>
+        <source>No compatible Masternode found.</source>
+        <translation>Aucun Masternode compatible trouvé.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="330"/>
-        <source>Set the number of threads to service RPC calls (default: 4)</source>
-        <translation>Définir le nombre d&apos;exétrons pour desservir les appels RPC (par défaut : 4)</translation>
+        <location line="+7"/>
+        <source>Not in the Masternode list.</source>
+        <translation>Absent de la liste des Masternodes.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="331"/>
-        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: 1)</source>
-        <translation>Définit le drapeau DB_PRIVATE dans l&apos;environnement de la BD du portefeuille (par défaut : 1)</translation>
+        <location line="+1"/>
+        <source>Number of automatic wallet backups (default: 10)</source>
+        <translation>Nombre de sauvegarde automatique de portefeuille (par défaut : 10)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="332"/>
-        <source>Show all debugging options (usage: --help -help-debug)</source>
-        <translation>Montrer toutes les options de débogage (utilisation : --help --help-debug)</translation>
+        <location line="+1"/>
+        <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
+        <translation>N&apos;accepter qu&apos;une chaîne de blocs correspondant aux points de vérification intégrés (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="333"/>
-        <source>Show benchmark information (default: 0)</source>
-        <translation>Afficher les infos du test de performance (par défaut : 0)</translation>
+        <location line="+1"/>
+        <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+        <translation>Se connecter uniquement aux nœuds du réseau &lt;net&gt; (IPv4, IPv6 ou onion)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="334"/>
-        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
-        <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n&apos;est pas présent)</translation>
+        <location line="+3"/>
+        <source>Prepend debug output with timestamp (default: %u)</source>
+        <translation>Ajouter l&apos;horodatage au début de la sortie de débogage (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="335"/>
-        <source>Signing failed.</source>
-        <translation>La signature a échoué.</translation>
+        <location line="+12"/>
+        <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Exécuter une tâche pour purger le portefeuille périodiquement (par défaut : &amp;u) </translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="336"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Signature expirée, veuillez s&apos;il vous plaît réessayer.</translation>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Envoyer les informations de débogage/trace au fichier debug.log (par défaut: %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="337"/>
-        <source>Signing transaction failed</source>
-        <translation>La signature de la transaction a échoué</translation>
+        <location line="+1"/>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <translation>N&apos;envoyer que des transactions sans frais si possible (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="338"/>
-        <source>Specify configuration file (default: dash.conf)</source>
-        <translation>Définir le fichier de configuration (défaut: dash.conf)</translation>
+        <location line="+1"/>
+        <source>Server certificate file (default: %s)</source>
+        <translation>Fichier de certification du serveur (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="339"/>
-        <source>Specify connection timeout in milliseconds (default: 5000)</source>
-        <translation>Spécifier le délai d&apos;expiration de la connexion en millisecondes (par défaut : 5 000)</translation>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Clef privée du serveur (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="340"/>
-        <source>Specify data directory</source>
-        <translation>Spécifier le répertoire de données</translation>
+        <location line="+4"/>
+        <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+        <translation>Définir la taille de la réserve de clefs à &lt;n&gt; (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="341"/>
-        <source>Specify masternode configuration file (default: masternode.conf)</source>
-        <translation>Définir le fichier de configuration du masternode (par défaut : masternode.conf)</translation>
+        <location line="+2"/>
+        <source>Set minimum block size in bytes (default: %u)</source>
+        <translation>Définir la taille de bloc minimale en octets (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="342"/>
-        <source>Specify pid file (default: dashd.pid)</source>
-        <translation>Définir le fichier pid (défaut: dashd.pid)</translation>
+        <location line="+2"/>
+        <source>Set the number of threads to service RPC calls (default: %d)</source>
+        <translation>Définir le nombre de fils d’exécution pour desservir les appels RPC (par défaut : %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="343"/>
-        <source>Specify wallet file (within data directory)</source>
-        <translation>Spécifiez le fichier de portefeuille (dans le répertoire de données)</translation>
+        <location line="+1"/>
+        <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
+        <translation>Définit le drapeau DB_PRIVATE dans l&apos;environnement de la BD du portefeuille (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="344"/>
-        <source>Specify your own public address</source>
-        <translation>Spécifier votre propre adresse publique</translation>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Signature expirée.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="345"/>
-        <source>Spend unconfirmed change when sending transactions (default: 1)</source>
-        <translation>Dépenser la monnaie non confirmée lors de l&apos;envoi de transactions (par défaut : 1)</translation>
+        <location line="+2"/>
+        <source>Specify configuration file (default: %s)</source>
+        <translation>Définir le fichier de configuration (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="346"/>
-        <source>Start Dash Core Daemon</source>
-        <translation>Démarrer le démon Dash Core</translation>
+        <location line="+1"/>
+        <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+        <translation>Spécifier le délai d&apos;expiration de la connexion en millisecondes (minimum : 1, par défaut : %d)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="347"/>
-        <source>System error: </source>
-        <translation>Erreur système :</translation>
+        <location line="+2"/>
+        <source>Specify masternode configuration file (default: %s)</source>
+        <translation>Définir le fichier de configuration du masternode (par défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="348"/>
-        <source>This help message</source>
-        <translation>Ce message d&apos;aide</translation>
+        <location line="+1"/>
+        <source>Specify pid file (default: %s)</source>
+        <translation>Définir le fichier pid (défaut : %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="349"/>
-        <source>This is intended for regression testing tools and app development.</source>
-        <translation>Ceci est à l&apos;intention des outils de test de régression et du développement applicatif.</translation>
+        <location line="+3"/>
+        <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+        <translation>Dépenser la monnaie non confirmée lors de l&apos;envoi de transactions (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Stop running after importing blocks from disk (default: %u)</source>
+        <translation>Arrêter après l&apos;importation des blocs du disque (par défaut : %u)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="350"/>
-        <source>This is not a masternode.</source>
+        <location line="+1"/>
+        <source>Submitted following entries to masternode: %u / %d</source>
+        <translation>Les entrées suivantes ont été envoyées au masternode: %u / %d</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
+        <translation>Envoyé au masternode, en attente d&apos;entrées supplémentaires ( %u / %d ) %s</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Submitted to masternode, waiting in queue %s</source>
+        <translation>Soumis au masternode, dans la file d&apos;attente %s</translation>
+    </message>
+    <message>
+        <location line="+4"/>
+        <source>This is not a Masternode.</source>
         <translation>Ceci n&apos;est pas un masternode.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="351"/>
-        <source>Threshold for disconnecting misbehaving peers (default: 100)</source>
-        <translation>Seuil de déconnexion des pairs présentant un mauvais comportement (par défaut : 100)</translation>
+        <location line="+1"/>
+        <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+        <translation>Seuil de déconnexion des pairs présentant un mauvais comportement (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+14"/>
+        <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
+        <translation>Utiliser l&apos;intégration KeePass 2 en utilisant le greffon KeePassHttp (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
+        <translation>Utiliser N masternodes différents pour anonymiser les fonds (2-8, par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Use UPnP to map the listening port (default: %u)</source>
+        <translation>Utiliser l&apos;UPnP pour mapper le port d&apos;écoute (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+9"/>
+        <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
+        <translation>Le portefeuille devait être réécrit : redémarrer Dash Core pour terminer l&apos;opération.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
+        <translation>Attention : l&apos;argument obsolète -benchmark a été ignoré, utiliser -debug=bench</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
+        <translation>Attention : l&apos;argument obsolète -debugnet a été ignoré, utiliser -debug=net</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Will retry...</source>
+        <translation>Va réessayer ...</translation>
+    </message>
+    <message>
+        <location line="-127"/>
+        <source>Invalid masternodeprivkey. Please see documenation.</source>
+        <translation>masternodeprivkey invalide. Veuillez vous référer à la documentation.</translation>
+    </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(doit être 9999 pour mainnet)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Masternode aléatoire introuvable.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Ne peux pas mélanger pendant la synchronisation.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Impossible d&apos;analyser masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
+        <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+        <translation>Masque de réseau inconnu spécifié sur -whitelist : « %s »</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Port non valide détecté dans masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid private key.</source>
+        <translation>Clé privée invalide.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid script detected.</source>
+        <translation>Script invalide détecté.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>KeePassHttp id for the established association</source>
+        <translation>Id KeePassHttp pour l&apos;association établie</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>KeePassHttp key for AES encrypted communication with KeePass</source>
+        <translation>Clé KeePassHttp pour la communication chiffrée AES avec KeePass</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep N DASH anonymized (default: %u)</source>
+        <translation>Maintenir N dash anonymisé en permanence (défaut: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+        <translation>Garder au plus &lt;n&gt; transactions sans connexion en mémoire (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Last Darksend was too recent.</source>
+        <translation>Le dernier Darksend est trop récent.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Ligne: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Loading addresses...</source>
+        <translation>Chargement des adresses...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading block index...</source>
+        <translation>Chargement de l’index des blocs...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading budget cache...</source>
+        <translation>Chargement du cache de budget...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode cache...</source>
+        <translation>Chargement du cache de masternode...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Chargement du cache de paiement masternode...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading wallet... (%3.2f %%)</source>
+        <translation>Chargement du portefeuille... (%3.2f %%)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading wallet...</source>
+        <translation>Chargement du portefeuille...</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Masternode options:</source>
+        <translation>Options Masternode :</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Masternode queue is full.</source>
+        <translation>La file d&apos;attente du masternode est pleine.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Masternode:</source>
+        <translation>Masternode :</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Missing input transaction information.</source>
+        <translation>Informations de transaction entrante manquantes.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>No funds detected in need of denominating.</source>
+        <translation>Aucuns fonds détectés nécessitant une dénomination.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>No matching denominations found for mixing.</source>
+        <translation>Pas de dénominations équivalentes trouvées pour le mélange.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="352"/>
-        <source>To use the %s option</source>
-        <translation>Pour utiliser l&apos;option %s</translation>
+        <location line="+1"/>
+        <source>Node relay options:</source>
+        <translation>Options de noeud de relais:</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="353"/>
+        <location line="+1"/>
+        <source>Non-standard public key detected.</source>
+        <translation>Clé publique non standard détectée.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Not compatible with existing transactions.</source>
+        <translation>Non compatible avec les transactions existantes.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Not enough file descriptors available.</source>
+        <translation>Pas assez de descripteurs de fichiers de disponibles.</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Options:</source>
+        <translation>Options :</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Password for JSON-RPC connections</source>
+        <translation>Mot de passe pour les connexions JSON-RPC</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
+        <translation>Options RPC SSL : (voir le wiki Bitcoin pour les instructions de configuration de SSL)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>RPC server options:</source>
+        <translation>Options du serveur RPC :</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>RPC support for HTTP persistent connections (default: %d)</source>
+        <translation>Support RPC pour connections HTTP persistantes  (par défaut : %d)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Randomly drop 1 of every &lt;n&gt; network messages</source>
+        <translation>Abandonner aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Randomly fuzz 1 of every &lt;n&gt; network messages</source>
+        <translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rebuild block chain index from current blk000??.dat files</source>
+        <translation>Reconstruire l&apos;index de la chaîne de blocs à partir des fichiers blk000??.dat courants</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Recevoir et afficher les alertes réseau P2P (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay and mine data carrier transactions (default: %u)</source>
+        <translation>Relayer et miner les transactions de support de données (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Relay non-P2SH multisig (default: %u)</source>
+        <translation>Relayer les multisig non-P2SH (par défaut : %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rescan the block chain for missing wallet transactions</source>
+        <translation>Réanalyser la chaîne de blocs pour les transactions de portefeuille manquantes</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Rescanning...</source>
+        <translation>Nouvelle analyse...</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Run in the background as a daemon and accept commands</source>
+        <translation>Fonctionner en arrière-plan en tant que démon et accepter les commandes</translation>
+    </message>
+    <message>
+        <location line="+5"/>
+        <source>Session not complete!</source>
+        <translation>Session incomplète!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Session expirée.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+        <translation>Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set maximum block size in bytes (default: %d)</source>
+        <translation>Définir la taille minimale de bloc en octets (par défaut : %d)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Set the masternode private key</source>
+        <translation>Définir la clé privée du masternode</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Show all debugging options (usage: --help -help-debug)</source>
+        <translation>Montrer toutes les options de débogage (utilisation : --help --help-debug)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
+        <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n&apos;est pas présent)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Signing failed.</source>
+        <translation>La signature a échoué.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Signing transaction failed</source>
+        <translation>La signature de la transaction a échoué</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Specify data directory</source>
+        <translation>Spécifier le répertoire de données</translation>
+    </message>
+    <message>
+        <location line="+3"/>
+        <source>Specify wallet file (within data directory)</source>
+        <translation>Spécifiez le fichier de portefeuille (dans le répertoire de données)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Specify your own public address</source>
+        <translation>Spécifier votre propre adresse publique</translation>
+    </message>
+    <message>
+        <location line="+6"/>
+        <source>This help message</source>
+        <translation>Ce message d&apos;aide</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is experimental software.</source>
+        <translation>Ceci est un logiciel expérimental.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>This is intended for regression testing tools and app development.</source>
+        <translation>Ceci est à l&apos;intention des outils de test de régression et du développement applicatif.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Transaction amount too small</source>
         <translation>Montant de la transaction trop bas</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="354"/>
+        <location line="+1"/>
         <source>Transaction amounts must be positive</source>
         <translation>Les montants de transaction doivent être positifs</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="355"/>
+        <location line="+1"/>
         <source>Transaction created successfully.</source>
         <translation>Transaction créée avec succès.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="356"/>
+        <location line="+1"/>
         <source>Transaction fees are too high.</source>
         <translation>Les frais de transaction sont trop élevés.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="357"/>
+        <location line="+1"/>
         <source>Transaction not valid.</source>
         <translation>Transaction invalide.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="358"/>
+        <location line="+1"/>
+        <source>Transaction too large for fee policy</source>
+        <translation>La transaction est trop volumineuse pour les règles de frais en vigueur</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Transaction too large</source>
         <translation>Transaction trop volumineuse</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="359"/>
-        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Transmitting final transaction.</source>
+        <translation>Transmission de la transaction finale.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="360"/>
-        <source>Unable to sign masternode payment winner, wrong key?</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+        <translation>Impossible de se lier à %s sur cet ordinateur (erreur bind retournée %s)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="361"/>
+        <location line="+1"/>
         <source>Unable to sign spork message, wrong key?</source>
-        <translation type="unfinished"></translation>
+        <translation>Impossible de signer le message spork, mauvaise clé?</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="362"/>
-        <source>Unknown -socks proxy version requested: %i</source>
-        <translation>Version inconnue de serveur mandataire -socks demandée : %i</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="363"/>
+        <location line="+1"/>
         <source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
         <translation>Réseau inconnu spécifié sur -onlynet : « %s »</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="364"/>
-        <source>Upgrade wallet to latest format</source>
-        <translation>Mettre à niveau le portefeuille vers le format le plus récent</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="365"/>
-        <source>Usage (deprecated, use dash-cli):</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="366"/>
-        <source>Usage:</source>
-        <translation>Utilisation :</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="367"/>
-        <source>Use KeePass 2 integration using KeePassHttp plugin (default: 0)</source>
-        <translation type="unfinished"></translation>
+        <location line="+1"/>
+        <source>Unknown state: id = %u</source>
+        <translation>État inconnu: id = %u</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="368"/>
-        <source>Use N separate masternodes to anonymize funds  (2-8, default: 2)</source>
-        <translation>Utiliser N masternodes différents pour anonymiser les fonds (2-8, par défaut : 2)</translation>
+        <location line="+1"/>
+        <source>Upgrade wallet to latest format</source>
+        <translation>Mettre à niveau le portefeuille vers le format le plus récent</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="369"/>
+        <location line="+3"/>
         <source>Use OpenSSL (https) for JSON-RPC connections</source>
         <translation>Utiliser OpenSSL (https) pour les connexions JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="370"/>
-        <source>Use UPnP to map the listening port (default: 0)</source>
-        <translation>Utiliser l&apos;UPnP pour mapper le port d&apos;écoute (par défaut : 0)</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="371"/>
+        <location line="+2"/>
         <source>Use UPnP to map the listening port (default: 1 when listening)</source>
         <translation>Utiliser l&apos;UPnP pour mapper le port d&apos;écoute (par défaut : 1 lors de l&apos;écoute)</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="372"/>
+        <location line="+1"/>
         <source>Use the test network</source>
         <translation>Utiliser le réseau de test</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="373"/>
+        <location line="+1"/>
         <source>Username for JSON-RPC connections</source>
         <translation>Nom d&apos;utilisateur pour les connexions JSON-RPC</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="374"/>
+        <location line="+1"/>
         <source>Value more than Darksend pool maximum allows.</source>
         <translation>Valeur supérieure au maximum autorisé par le pool.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="375"/>
+        <location line="+1"/>
         <source>Verifying blocks...</source>
         <translation>Vérification des blocs en cours...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="376"/>
+        <location line="+1"/>
         <source>Verifying wallet...</source>
         <translation>Vérification du portefeuille en cours...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="377"/>
-        <source>Wait for RPC server to start</source>
-        <translation>Attendre le démarrage du serveur RPC</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="378"/>
+        <location line="+1"/>
         <source>Wallet %s resides outside data directory %s</source>
         <translation>Le portefeuille %s réside en dehors du répertoire de données %s</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="379"/>
+        <location line="+1"/>
         <source>Wallet is locked.</source>
         <translation>Le Portefeuille est verrouillé.</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="380"/>
-        <source>Wallet needed to be rewritten: restart Dash to complete</source>
-        <translation>Le portefeuille devait être réécrit : redémarrer Dash pour terminer l&apos;opération.</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="381"/>
+        <location line="+2"/>
         <source>Wallet options:</source>
         <translation>Options du portefeuille :</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="382"/>
-        <source>Warning</source>
-        <translation>Avertissement</translation>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Titre de la fenêtre du portefeuille</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="383"/>
-        <source>Warning: Deprecated argument -debugnet ignored, use -debug=net</source>
-        <translation>Attention : l&apos;argument obsolète -debugnet a été ignoré, utiliser -debug=net</translation>
+        <location line="+1"/>
+        <source>Warning</source>
+        <translation>Avertissement</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="384"/>
+        <location line="+1"/>
         <source>Warning: This version is obsolete, upgrade required!</source>
         <translation>Avertissement : cette version est obsolète, une mise à niveau est nécessaire !</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="385"/>
+        <location line="+4"/>
         <source>You need to rebuild the database using -reindex to change -txindex</source>
         <translation>Vous devez reconstruire la base de données en utilisant -reindex afin de modifier -txindex</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="386"/>
+        <location line="+1"/>
+        <source>Your entries added successfully.</source>
+        <translation>Vos entrées ajoutées avec succès.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Your transaction was accepted into the pool!</source>
+        <translation>Votre transaction a été acceptée dans la pool!</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Zapping all transactions from wallet...</source>
         <translation>Supprimer toutes les transactions du portefeuille...</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="387"/>
+        <location line="+1"/>
         <source>on startup</source>
         <translation>au démarrage</translation>
     </message>
     <message>
-        <location filename="../dashstrings.cpp" line="388"/>
-        <source>version</source>
-        <translation>version</translation>
-    </message>
-    <message>
-        <location filename="../dashstrings.cpp" line="389"/>
+        <location line="+1"/>
         <source>wallet.dat corrupt, salvage failed</source>
         <translation>wallet.dat corrompu, la récupération a échoué</translation>
     </message>
 </context>
-</TS>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/dash_it.ts b/src/qt/locale/dash_it.ts
index 80a1cefb2abe..6befbabe11f9 100644
--- a/src/qt/locale/dash_it.ts
+++ b/src/qt/locale/dash_it.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Portafoglio</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Nodo</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Sintesi</translation>
     </message>
@@ -744,7 +744,7 @@ Indirizzo: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Avviso di rete</translation>
     </message>
@@ -833,8 +833,8 @@ Indirizzo: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Darksend Round</translation>
+        <source>DS Rounds</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+5"/>
@@ -953,13 +953,13 @@ Indirizzo: %4
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>n/a</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>media</translation>
     </message>
@@ -1431,12 +1431,7 @@ Indirizzo: %4
         <translation>(0 = automatico, &lt;0 = lascia questo numero di core liberi)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Questo settaggio determina attraverso quanti masternode l&apos;input verrà anonimizzato. Più round di anonimizzazione garantiscono un grado più alto di privacy, ma anche un costo maggione in termini di commissioni.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Round darksend da utilizzare</translation>
     </message>
@@ -1456,7 +1451,12 @@ Indirizzo: %4
         <translation>Port&amp;afoglio</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Accetta connessioni dall&apos;esterno</translation>
     </message>
@@ -1481,7 +1481,12 @@ Indirizzo: %4
         <translation>Esperti</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Specifica se le funzionalita di coin control saranno visualizzate.</translation>
     </message>
@@ -1491,12 +1496,7 @@ Indirizzo: %4
         <translation>Abilita le funzionalità di coin &amp;control</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Disabilitando l&apos;uso di resti non confermati, il resto di una transazione non potrà essere speso fino a quando la transazione non avrà ottenuto almeno una conferma. Questa impostazione influisce inoltre sul calcolo saldo.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Spendere resti non confermati</translation>
     </message>
@@ -1599,6 +1599,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 di terze parti (es: un block explorer) che appaiono nella tabella delle transazioni come voci nel menu contestuale. %s nell&apos;URL è sostituito dall&apos;hash della transazione.
@@ -1635,7 +1640,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>&amp;Cancella</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>predefinito</translation>
     </message>
@@ -1645,7 +1650,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>nessuno</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Conferma ripristino opzioni</translation>
     </message>
@@ -1766,12 +1771,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Stato:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Attivato/Disattivato</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Completamento:</translation>
     </message>
@@ -1781,12 +1786,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Bilancio Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Ammontare e Round:</translation>
     </message>
@@ -1806,9 +1806,10 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>n/a</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1824,12 +1825,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Start/Stop Mixing</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Il valore che hai richiesto al Mastermode. &lt;br&gt; Per mixare, gli altri utenti devono richiedere esattamente gli stessi valori.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Ultimo messaggio)</translation>
     </message>
@@ -1854,67 +1855,83 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Reset</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>non sincronizzato</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Disabilita</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Avvia Darksend mix</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Ferma Darksend mix</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Non ci sono input rilevati</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>Un Round</numerusform><numerusform>%n Rounds</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Uscite denominate non confermati trovati, saranno aspettare che confermano per ricalcolare.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation type="unfinished"/>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>Progresso:%1% (gli inputs hanno una media di %2 di %n round)</numerusform><numerusform>Progresso:%1% (gli inputs hanno una media di %2 di %n rounds)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Incontrati sufficienti inputs compatibili per anonimizzare %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Insufficienti imputs compatibili per anonimizzare  &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;Anonimizzaranno &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; invece</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Abilitato</translation>
     </message>
@@ -1936,7 +1953,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Darksend è stato resettato con successo</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend ha bisogno almeno dell&apos; %1 per essere usato.</translation>
     </message>
@@ -2089,7 +2111,7 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Importo</translation>
     </message>
@@ -2099,7 +2121,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Inserire un indirizzo Dash (e.g. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 d</translation>
     </message>
@@ -2180,12 +2202,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>&amp;Informazioni</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Conteggio Masternode</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Generale</translation>
     </message>
@@ -2293,7 +2310,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
@@ -2561,8 +2583,8 @@ Più URL vengono separati da una barra verticale |.</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Riutilizza uno degli indirizzi di ricezione generati in precedenza. Riutilizzare un indirizzo comporta problemi di sicurezza e privacy. Non utilizzare a meno che non si stia rigenerando una richiesta di pagamento creata in precedenza.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+3"/>
@@ -2571,12 +2593,11 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Messaggio opzionale da allegare alla richiesta di pagamento, che verrà visualizzato quando la richiesta verrà aperta. Nota: il messaggio non sarà inviato insieme al pagamento nel network Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Messaggio:</translation>
     </message>
@@ -2587,7 +2608,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Un&apos;etichetta facoltativa da associare al nuovo indirizzo di ricezione</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Usa questo modulo per richiedere pagamenti. Tutti i campi sono &lt;b&gt;opzionali&lt;/b&gt;.</translation>
     </message>
@@ -2773,7 +2799,7 @@ Più URL vengono separati da una barra verticale |.</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Invia dash</translation>
@@ -2880,32 +2906,32 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Se la commissione é stabilita a 1000 duffs e la transazione é di solo 250 bytes, allora solo si paga 250 duffs di tasse &quot;per kilobyte&quot;, mentre &quot;come minimo&quot; paga 1000 duffs. Per transazioni maggiori di un kilobyte entrambe pagano per kilobyte.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>per kilobyte</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Se la commissione é stabilita a 1000 duffs e la transazione é di solo 250 bytes, allora solo si paga 250 duffs di tasse &quot;per kilobyte&quot;, mentre il &quot;totale come minimo&quot; paga 1000 duffs. Per transazioni maggiori di un kilobyte entrambe pagano per kilobyte.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>totale come minimo</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>per kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Pagare solo la commissione minima va bene fino a quando il volume delle transazioni é inferiore allo spazio nei blocchi. Ma attenzione perché se c&apos;é piú domanda di transazioni dash di quelle che la rete puó processare, puó essere che la transazione non si confermi mai.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>totale come minimo</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation type="unfinished"/>
     </message>
@@ -2920,7 +2946,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation type="unfinished"/>
     </message>
@@ -2995,7 +3021,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Copia quantità</translation>
     </message>
@@ -3082,21 +3108,16 @@ Più URL vengono separati da una barra verticale |.</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Importo Totale %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>o</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Conferma l&apos;invio di dash</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Una commissione %1 volte piú alta che %2 per kB é considerata incredibilmente alta.</translation>
     </message>
@@ -3111,7 +3132,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>L&apos;indirizzo del beneficiario non è valido, si prega di ricontrollare.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>L&apos;importo da pagare dev&apos;essere maggiore di 0.</translation>
     </message>
@@ -3921,7 +3947,7 @@ Più URL vengono separati da una barra verticale |.</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Tutti</translation>
@@ -3957,12 +3983,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Intervallo...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Piú Comune</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Ricevuto tramite</translation>
     </message>
@@ -4012,7 +4038,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Altro</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Inserisci un indirizzo o un&apos;etichetta da cercare</translation>
     </message>
@@ -4052,7 +4078,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Mostra i dettagli della transazione</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Esporta lo storico delle transazioni</translation>
     </message>
@@ -4117,7 +4143,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Lo storico delle transazioni e&apos; stato salvato con successo in %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Intervallo:</translation>
     </message>
@@ -4172,7 +4198,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Esporta su file i dati della tabella corrente</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Backup Portafoglio</translation>
     </message>
@@ -4245,12 +4276,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Esegui il comando quando il migliore blocco cambia(%s nel cmd è sostituito dall&apos;hash del blocco)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Uscite denominate non confermati trovati, saranno aspettare che confermano per continua.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>In questa modalità -genproclimit determina quanti blocchi saranno generati immediatamente.</translation>
     </message>
@@ -4270,7 +4296,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Fare domande per indirizzi pari via lookup DNS, se a corto di indirizzi (predefinita: 1 a meno -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Imposta indirizzo esterno:port per arrivare a questo Masternode (esempio: address:port)</translation>
     </message>
@@ -4340,12 +4366,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Devi specificare una masternodeprivkey nella configurazione. Per favore consulta la documentazione di aiuto.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(predefinito: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Accetta comandi da riga di comando e JSON-RPC</translation>
     </message>
@@ -4385,7 +4411,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Non può denominare: no ingressi compatibili rimasto.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Non è possibile effettuare il downgrade del portafoglio</translation>
     </message>
@@ -4430,12 +4456,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Rilevato database blocchi corrotto</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend è disabilitato</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Opzioni Darksend:</translation>
     </message>
@@ -4515,7 +4536,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Errore</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Errore: la spazio libero sul disco è insufficiente!</translation>
     </message>
@@ -4545,7 +4566,7 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation>Se &lt;category&gt; non è specificata, mostra tutte le informazioni di debug.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1= mantiene il testo meta data p.es. propietario del conto e informazione richiesta di pagamento, 2 = scarta il testo meta data)</translation>
     </message>
@@ -4587,12 +4608,12 @@ Più URL vengono separati da una barra verticale |.</translation>
     <message>
         <location line="+6"/>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
-        <translation type="unfinished"/>
+        <translation>Cancella tutte le transazioni del portafoglio e sistema solo quelle parti della catena di blocchi mediante -rescan quando apri il portafoglio</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Disabilita tutte le funzioni relazionate con Masternode e Darksend (0-1, default: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -4602,12 +4623,12 @@ Più URL vengono separati da una barra verticale |.</translation>
     <message>
         <location line="+3"/>
         <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Abilita instantx, mostra conferme per le transazioni bloccate (bool, predefinito: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Abilita utilizzo di darksend automatizzato per i fondi conservati in questo portafoglio (0-1, predefinito: %u)</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -4617,12 +4638,12 @@ Più URL vengono separati da una barra verticale |.</translation>
     <message>
         <location line="+12"/>
         <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Le commissioni (in DASH/Kb) inferiori a questo valore saranno considerate nulle per la trasmissione (prefedinito:%s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Le commissioni (in DASH/Kb)  inferiori a questo valore saranno considerate nulle per la creazione della transazione (prefedinito:%s)</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -4630,7 +4651,12 @@ Più URL vengono separati da una barra verticale |.</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Uscite denominate non confermati trovati, saranno aspettare che confermano per continua.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -4684,6 +4710,11 @@ Più URL vengono separati da una barra verticale |.</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4741,11 +4772,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation type="unfinished"/>
@@ -4766,7 +4802,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation type="unfinished"/>
     </message>
@@ -4798,7 +4834,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+2"/>
         <source>Darksend is idle.</source>
-        <translation type="unfinished"/>
+        <translation>Nessun Masternode trovato.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -4835,6 +4871,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Errore: Un </translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4877,11 +4918,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importazione...</translation>
     </message>
@@ -4930,11 +4966,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>Opzioni InstantX</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Fondi insufficienti</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4976,7 +5007,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Importo non valido per -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation type="unfinished"/>
     </message>
@@ -4986,7 +5017,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -4996,7 +5027,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Blocca i masternodes  nel file di configurazione del masternode (default: %u)</translation>
     </message>
@@ -5028,17 +5059,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>No Masternodes detected.</source>
-        <translation type="unfinished"/>
+        <translation>Nessun Masternode trovato.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>No compatible Masternode found.</source>
-        <translation type="unfinished"/>
+        <translation>Nessun compatibile Masternode trovato.</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Not in the Masternode list.</source>
-        <translation type="unfinished"/>
+        <translation>Non si trova in lista di Masternode.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5061,32 +5092,32 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+1"/>
-        <source>Server certificate file (default: %s)</source>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+1"/>
-        <source>Server private key (default: %s)</source>
+        <source>Server certificate file (default: %s)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -5106,7 +5137,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation type="unfinished"/>
     </message>
@@ -5181,7 +5217,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation type="unfinished"/>
     </message>
@@ -5196,15 +5232,40 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>masternodeprivkey non valida. Per favore consulta la documentazione</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5241,7 +5302,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>L&apos;ultima darksend è troppo recente</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Caricamento indirizzi...</translation>
     </message>
@@ -5260,6 +5326,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Loading masternode cache...</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5361,6 +5432,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Ricreare l&apos;indice della catena di blocchi dai file blk000??.dat correnti</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5388,17 +5464,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Esegui in background come demone ed accetta i comandi</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Invia le informazioni di trace/debug alla console invece che al file debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Sessione non completata!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Imposta la dimensione cache del database in megabyte (%d a %d, predefinito: %d)</translation>
     </message>
@@ -5428,12 +5504,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Firma fallita.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Firma scaduta, invia nuovamente.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Transazione di firma fallita</translation>
     </message>
@@ -5585,6 +5656,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Opzioni portafoglio:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
diff --git a/src/qt/locale/dash_pl.ts b/src/qt/locale/dash_pl.ts
index 7a1c96931365..3e136534c7fd 100644
--- a/src/qt/locale/dash_pl.ts
+++ b/src/qt/locale/dash_pl.ts
@@ -69,7 +69,7 @@
     <message>
         <location line="+6"/>
         <source>Sending addresses</source>
-        <translation>Adres wysyłania</translation>
+        <translation>Adres do wysyłania</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -84,7 +84,7 @@
     <message>
         <location line="+4"/>
         <source>These are your Dash addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
-        <translation>To są twoje adresy do otrzymywania Dashów. Zaleca się aby tworzyć nowy adres dla każdej transakcji</translation>
+        <translation>To są twoje adresy do otrzymywania Dashów. Zaleca się aby stworzyć nowy adres dla każdej transakcji</translation>
     </message>
     <message>
         <location line="+6"/>
@@ -99,22 +99,22 @@
     <message>
         <location line="+1"/>
         <source>&amp;Edit</source>
-        <translation>&amp;Modyfikuj</translation>
+        <translation>&amp;Edytuj</translation>
     </message>
     <message>
         <location line="+194"/>
         <source>Export Address List</source>
-        <translation>Eksportuj listę adresową</translation>
+        <translation>Eksportuj listę adresów</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Comma separated file (*.csv)</source>
-        <translation>Plik *.CSV (rozdzielany przecinkami)</translation>
+        <translation>Plik porozdzielany przecinkami (*.csv)</translation>
     </message>
     <message>
         <location line="+13"/>
         <source>Exporting Failed</source>
-        <translation>Błąd przy próbie eksportu</translation>
+        <translation>Próba eksportu nie powiodła się</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -137,7 +137,7 @@
     <message>
         <location line="+36"/>
         <source>(no label)</source>
-        <translation>(bez etykiety)</translation>
+        <translation>(brak etykiety)</translation>
     </message>
 </context>
 <context>
@@ -165,7 +165,7 @@
     <message>
         <location line="+33"/>
         <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
-        <translation>Służy do zablokowania funkcji wysyłania monet gdy konto użytkownika systemu operacyjnego zostało przejęte przez kogoś innego. Nie oferuje prawdziwego bezpieczeństwa. Wirus lub haker wciąż może uzyskać dostęp do twojego portfela.</translation>
+        <translation>Służy do zablokowania funkcji wysyłania monet gdy konto użytkownika systemu operacyjnego zostało przejęte przez kogoś innego. Nie gwarantuje prawdziwego bezpieczeństwa.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -185,7 +185,7 @@
     <message>
         <location line="+6"/>
         <source>This operation needs your wallet passphrase to unlock the wallet.</source>
-        <translation>Ta operacja wymaga hasła do portfela ażeby odblokować portfel.</translation>
+        <translation>Ta operacja wymaga hasła do portfela aby móc go odblokować.</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -195,7 +195,7 @@
     <message>
         <location line="+3"/>
         <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
-        <translation>Ta operacja wymaga hasła do portfela ażeby odszyfrować portfel.</translation>
+        <translation>Ta operacja wymaga hasła do portfela aby móc go odszyfrować.</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -220,7 +220,7 @@
     <message>
         <location line="+1"/>
         <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR DASH&lt;/b&gt;!</source>
-        <translation>Ostrzeżenie: Jeśli zaszyfrujesz swój portfel i zgubisz swoje hasło, &lt;b&gt;STRACISZ WSZYSTKIE DASHY&lt;/b&gt;</translation>
+        <translation>Ostrzeżenie: Jeśli zaszyfrujesz swój portfel i zgubisz swoje hasło, &lt;b&gt;STRACISZ WSZYSTKIE MONETY DASH&lt;/b&gt;</translation>
     </message>
     <message>
         <location line="+0"/>
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Portfel</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Węzeł</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>P&amp;odsumowanie</translation>
     </message>
@@ -327,7 +327,7 @@
     <message>
         <location line="+1"/>
         <source>Send coins to a Dash address</source>
-        <translation>Wyślij monety na adres Darkcoina</translation>
+        <translation>Wyślij monety na adres Dash</translation>
     </message>
     <message>
         <location line="+10"/>
@@ -337,7 +337,7 @@
     <message>
         <location line="+1"/>
         <source>Request payments (generates QR codes and dash: URIs)</source>
-        <translation>Poproś o płatności (tworzy kod QR oraz dash: link)</translation>
+        <translation>Poproś o płatności (generuje kod QR oraz dash: link)</translation>
     </message>
     <message>
         <location line="+10"/>
@@ -408,7 +408,7 @@
     <message>
         <location line="+1"/>
         <source>Encrypt the private keys that belong to your wallet</source>
-        <translation>Szyfruj klucze prywatne, które są powiązane z twoim portfelem</translation>
+        <translation>Szyfruj klucze prywatne, dla twojego portfela</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -418,7 +418,7 @@
     <message>
         <location line="+1"/>
         <source>Backup wallet to another location</source>
-        <translation>Zapasowy portfel w innej lokalizacji</translation>
+        <translation>Zapisz kopię zapasową portfela w innym miejscu</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -513,7 +513,7 @@
     <message>
         <location line="+1"/>
         <source>Show wallet repair options</source>
-        <translation>Pokaż opcje naprawcze portfela</translation>
+        <translation>Pokaż opcje naprawy portfela</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -578,7 +578,7 @@
     <message numerus="yes">
         <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Pobrano %n blok z historią transakcji.</numerusform><numerusform>Przetworzony przez %n bloków historii transakcji.</numerusform><numerusform>Pobranych zostało %n bloków z historią transakcji.</numerusform></translation>
     </message>
     <message>
         <location line="-376"/>
@@ -743,7 +743,7 @@ Adres: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Sieć Alert</translation>
     </message>
@@ -832,8 +832,8 @@ Adres: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Ilość rund mieszania</translation>
+        <source>DS Rounds</source>
+        <translation>Rundy DS</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -949,16 +949,16 @@ Adres: %4
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation>Może się różnić około +/- %1 duff na transację.</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>nie dotyczy</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>średnia</translation>
     </message>
@@ -1430,12 +1430,7 @@ Adres: %4
         <translation>(0=auto, &lt;0 = zostaw tyle wolnych rdzeni)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Tutaj możesz ustawić liczbę masternodów, przez które transakcja zostanie przepuszczona. Im większa liczba masternodów tym większy poziom anonimowości, ale opłata jest również wyższa.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Ilość rund Darksend.</translation>
     </message>
@@ -1455,7 +1450,12 @@ Adres: %4
         <translation>Portfel</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Akceptuj połączenia z zewnątrz</translation>
     </message>
@@ -1480,7 +1480,12 @@ Adres: %4
         <translation>Ekspert</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Czy pokazać funkcje kontroli monet czy nie.</translation>
     </message>
@@ -1490,12 +1495,7 @@ Adres: %4
         <translation>Włącz funkcje &amp;kontroli monet</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Jeśli wyłączysz możliwość wydawania niepotwierdzonej reszty, to reszta z transakcji nie może zostać użyta dopóki nie ma przynajmniej jednego potwierdzona. To również wpływa na to jak wyliczane jest twoje saldo.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Wydaj niepotwierdzoną resztę</translation>
     </message>
@@ -1598,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 osób trzecich (np. eksplorator bloków), które pojawiają się w zakładce transakcji jako pozycje w menu kontekstowym. %s w URL jest zastąpione przez hash transakcji. Wielokrotne URL są oddzielane przez pionową poprzeczkę |.</translation>
@@ -1633,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Anuluj</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>domyślny</translation>
     </message>
@@ -1643,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>żaden</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Potwierdź reset ustawień</translation>
     </message>
@@ -1764,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Status:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Włączony/Wyłączony</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Ukończone:</translation>
     </message>
@@ -1779,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Bilans Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Ilość oraz Rundy:</translation>
     </message>
@@ -1804,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>nie dotyczy</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1822,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Start/Stop Mieszanie</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Denominacje, które wysłałeś do Masternoda.&lt;br&gt;Aby zostały one ymieszane, inni użytkownicy muszą wysłać dokładnie takie same denominacje. </translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Ostatnia Wiadomość)</translation>
     </message>
@@ -1852,67 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Reset</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>desynchronizacja</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Wyłączony</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Uruchom miksowanie Darksend</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Zatrzymaj miksowanie Darksend</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Nie wykryto wejść</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>Runda</numerusform><numerusform>Rundy</numerusform><numerusform>Rundy</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Znaleziono niepotwierdzone zdenominowane wyjścia, wstrzymam się z rekalkulacją do czasu ich potwierdzenia.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Całkowity postęp</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Zdenominowane</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Zanonimowane</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Denonimowane wejście ma %5 z %n rund jako średnia</numerusform><numerusform>Denonimowane wejścia mają %5 z %n rund jako średnia</numerusform><numerusform>Denonimowane wejścia mają %5 z %n rund jako średnia</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Znaleziono wystarczającą ilość odpowiednich środków aby zanonimizowaź %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Nie ma wystarczającej ilośći środków aby moć dokonać anonimizacji &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;zamiast oryginalnej sumy &lt;spam style=&apos;color:red;&apos;&gt;%2&lt;/spam&gt; zostanie zanonimizowanych.</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Zmiksowane</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Włączony</translation>
     </message>
@@ -1934,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend został pomyślnie zresetowany</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend wymaga użycia conajmniej %1</translation>
     </message>
@@ -2087,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Ilość</translation>
     </message>
@@ -2097,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Wpisz adres Dash (np. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>1 dzień</translation>
     </message>
@@ -2178,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Informacje</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Ilość masternodów</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Ogólne</translation>
     </message>
@@ -2291,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Ciąg bloków</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Liczba masternodów</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Konsola</translation>
     </message>
@@ -2450,17 +2472,17 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+16"/>
         <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
-        <translation type="unfinished"/>
+        <translation>-zapwallettxes=1: Odzysaj transakcje z blockchainu (nie zmieniaj meta-danych, np. właściciela konta).</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
-        <translation type="unfinished"/>
+        <translation>-zapwallettxes=2: Odzyskaj transakcje z blockchainu (pozbądź się meta-danych)</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
-        <translation type="unfinished"/>
+        <translation>-upgradewallet: podnieś poziom portfela podczas uruchomienia. (Nie jest to to samo co zaktualizowanie porfela do nowej wersji!)</translation>
     </message>
     <message>
         <location line="+23"/>
@@ -2475,7 +2497,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+13"/>
         <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
-        <translation type="unfinished"/>
+        <translation>reindex: Odtwórz index łańcucha bloków z najnowszego pliku blk000??.dat </translation>
     </message>
     <message>
         <location filename="../rpcconsole.cpp" line="-203"/>
@@ -2525,7 +2547,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"/>
+        <translation>przez %1</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2559,8 +2581,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Użyj jeden z poprzednio użytych adresów odbiorczych. Podczas ponownego używania adresów występują problemy z bezpieczeństwem i prywatnością. Nie korzystaj z tej opcji, chyba że odtwarzasz żądanie płatności wykonane już wcześniej.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+3"/>
@@ -2569,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Opcjonalna wiadomość do żądania płatności. Wiadomość wyświetli się po otwarciu żądania. Pamiętaj: Wiadomość nie zostanie wysłana razem z płatnością poprzez sieć Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Wiadomość:</translation>
     </message>
@@ -2585,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Opcjonalna etykieta do skojarzenia z nowym adresem odbiorczym.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Użyj tego formularza do zażądania płatności. Wszystkie pola są &lt;b&gt;opcjonalne&lt;/b&gt;.</translation>
     </message>
@@ -2771,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Wyślij Monety</translation>
@@ -2878,34 +2904,34 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Jeśli ręcznie ustalona opłata wynosi 1000 Duffów a sama transakcja ma tylko 250 bitów, to opłata jako &quot;za kilobajt&quot; wynosi tylko 250 duffów. Dzieje się tak dla każdej transakcji poniżej 1000 duffów. W przypadku transakcji większych niż jedn kilobajt opłata jest naliczana od kilobajta. </translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>na kilobajt</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation type="unfinished"/>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>na kilobajt</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation type="unfinished"/>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>Cała suma wynosi co najmniej</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"/>
+        <translation>(przeczytaj powpowiedź w chmurce)</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -2915,12 +2941,12 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"/>
+        <translation>Niestandardowo:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"/>
+        <translation>(Opłata smart nie została jeszcze zainicjonowana. Zazwyczaj zajmuje to kilka bloków...)</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -2993,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Skopiuj ilość</translation>
     </message>
@@ -3025,7 +3051,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"/>
+        <translation>skopiuj drobne (poniżej 5460 duffów)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3080,28 +3106,23 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Łączna kwota %1 (= %2)</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Całkowita ilość = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>lub</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Potwierdź wysyłanie monet</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
-        <translation type="unfinished"/>
+        <translation>Opłata %1 razy większa niż %2 za kB jest uważana za obłędnie wysoką.</translation>
     </message>
     <message numerus="yes">
         <location line="+109"/>
         <source>Estimated to begin confirmation within %n block(s).</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Potwierdzenia zaczną się około po %n bloku.</numerusform><numerusform>Potwierdzenia zaczną się  za około %n bloków</numerusform><numerusform>Potwierdzenia zaczną się za około %n bloków</numerusform></translation>
     </message>
     <message>
         <location line="-136"/>
@@ -3109,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Adres odbiorcy jest nieprawidłowy, proszę poprawić</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Kwota do zapłacenia musi być większa od 0.</translation>
     </message>
@@ -3146,7 +3172,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"/>
+        <translation>Uiść minimalną opłatę %1</translation>
     </message>
     <message>
         <location line="+129"/>
@@ -3499,7 +3525,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Otwórz na %n blok</numerusform><numerusform>Otwórz na %n więcej bloków</numerusform><numerusform>Otwórz na %n więcej bloków</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3583,7 +3609,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Nadaj przez %n węzeł.</numerusform><numerusform>Nadaj przez %n węzłów.</numerusform><numerusform>Nadaj przez %n węzłów.</numerusform></translation>
     </message>
     <message>
         <location line="+4"/>
@@ -3647,7 +3673,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Dojrzewa w %n blok</numerusform><numerusform>Dojrzewa w %n bloków</numerusform><numerusform>Dojrzewa w %n bloków</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3903,7 +3929,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Bez względu na to czy adres tylko do odczytu jest zawarty w tej transakcji.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3919,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Wszystko</translation>
@@ -3955,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Zakres...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
-        <translation type="unfinished"/>
+        <translation>Najbardziej powszechne</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Otrzymane przez</translation>
     </message>
@@ -4010,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Inne</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Wprowadź adres albo etykietę żeby wyszukać</translation>
     </message>
@@ -4050,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Pokaż szczegóły transakcji</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Eksport historii transakcji</translation>
     </message>
@@ -4115,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Historia transakcji została zapisana do %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Zakres:</translation>
     </message>
@@ -4130,7 +4156,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"/>
+        <translation>Jednostki w których wyrażane są kwoty. Kliknij aby wybrać inną jednostkę. </translation>
     </message>
 </context>
 <context>
@@ -4154,7 +4180,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="-20"/>
         <location line="+9"/>
         <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
-        <translation type="unfinished"/>
+        <translation>InstantX jescze nie może przesłać tak wysokich kwot. Obecnie transakcje są ograniczone tylko do %1 DASH:</translation>
     </message>
 </context>
 <context>
@@ -4170,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Eksportuj dane z aktywnej karty do pliku</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Zaznaczona ilość:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Kopia Zapasowa Portfela</translation>
     </message>
@@ -4243,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Wykonaj komendę przy zmianie najlepszego bloku (%s w konsoli jest zastąpione przez hasz bloku)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Znaleziono niepotwierdzone denominowane transakcje wyjściowe, poczekam aż zostaną one potwierdzone aby móc kontynuować dalej.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>W tym trybie -genproclimit kontroluje ile bloków jest generowanych natychmiastowo.</translation>
     </message>
@@ -4268,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Jeśli pula adresów jest niska, pytaj o adresy peer przez podgląd DNS (domyślnie: 1 chyba że -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Ustaw zewnętrzny adres:port aby połączyć się z tym masternodem (na przykład: adres:port)</translation>
     </message>
@@ -4338,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Musisz sprecyzować masternodeprivkey w konfiguracji. Proszę przeglądnij dokumentacje w celu pomocy.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(standardowo: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Zaakceptuj linie poleceń oraz polecenia JSON-RPC </translation>
     </message>
@@ -4383,7 +4409,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Niemożna denominować: Nie ma kompatybilnych transakcji wejściowych.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Nie można obniżyć wersji portfela</translation>
     </message>
@@ -4428,12 +4454,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Wykryto uszkodzoną bazę danych bloków</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend jest wyłączony.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Opcje Darksend:</translation>
     </message>
@@ -4513,7 +4534,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Błąd</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Błąd: Przestrzeń dyskowa jest niska!</translation>
     </message>
@@ -4543,159 +4564,169 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Jeśli &lt;kategoria&gt; nie jest dostarczona, utwórz informacje o debugowaniu.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
-        <translation type="unfinished"/>
+        <translation>(1 = zaochwaj metadane np. informacje właściciela konta oraz żądania zapłat, 2 = pozbądź się matadanych tx)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
-        <translation type="unfinished"/>
+        <translation>Pozwól na połączenia JSON-RPC z konkretnego źródła. Ważne dla &lt;ip&gt; pojedyńczego IP (np. 1.2.3.4), sieci/maski sieci (np. 1.2.3.4/255.255.255.0) lub  sieci/CIDR (np. 1.2.3.4/24). Opcja to może być ustawiana wielokrotnie</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>An error occurred while setting up the RPC address %s port %u for listening: %s</source>
-        <translation type="unfinished"/>
+        <translation>Wystąpił błąd podczas zakładania adresu RPC %s portu %u służącego do nasłuchu: %s</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
-        <translation type="unfinished"/>
+        <translation>Zwiąż z danym adresem oraz wpisz łączących się peerów na białą liste. Użyj notacji [host]:port dla IPv6</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
-        <translation type="unfinished"/>
+        <translation>Zwiąż z danym adresem oraz wpisz łączących się peerów na białą liste. Użyj notacji [host]:port dla IPv6. Opcja ta może być ustawiana wielokrotnie (domyślnie: połącz z wszystkimi interfejsami)</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)</source>
-        <translation type="unfinished"/>
+        <translation>Zmeń automatyczne głosowanie. mode=auto: Głosuj tylko na konkretny kompletny budżet, porównaj z wygenerowanym budżetem. (linijka, domyślnie: auto)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default:%u)</source>
-        <translation type="unfinished"/>
+        <translation>Ciągle ograniczaj darmowe transakcje do &lt;n&gt;*1000 bitów na minutę (domyślnie:%u)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
-        <translation type="unfinished"/>
+        <translation>Zamiast demaskowania 077, stwórz nowe pliki z domyślnymi pozwoleniami systemu (możliwe tylko z wyłączoną funkcją porfela)</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
-        <translation type="unfinished"/>
+        <translation>Usuń wszystkie transakcje portfela i odzyskaj tylko te części blockchainu - zeskanuj powonie na starcie.</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Wyłącz wszystkie funkcje związane z Masternodami i Darksend (0-1, domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
-        <translation type="unfinished"/>
+        <translation>Rozpowszechniane na licencji MIT. Jeśli chcesz się dowiedzieć więcej otwórz towarzyszący plik o nzwie COPYING lub odwiedź &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Enable instantx, show confirmations for locked transactions (bool, default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Włącz instantx, pokaż potwierdzenia dla zamkniętych transakcji (bool, domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Włącz możliwość automatyzacji Darksend dla środków zgromadzonych w  tym portfelu (0-1, domyślnie: 0)</translation>
     </message>
     <message>
         <location line="+8"/>
         <source>Error: Unsupported argument -socks found. Setting SOCKS version isn&apos;t possible anymore, only SOCKS5 proxies are supported.</source>
-        <translation type="unfinished"/>
+        <translation>Błąd: niewspierany argument, znaleziono -socks. Ustawienie wersji SOCKS nie jest już możliwa, wspierane są tylkobramki  proxy SOCKS5.</translation>
     </message>
     <message>
         <location line="+12"/>
         <source>Fees (in DASH/Kb) smaller than this are considered zero fee for relaying (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Opłaty (DASH/Kb) za retransmisje mniejsze niż ta, uważane są za równoznaczne z brakiem opłat (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Fees (in DASH/Kb) smaller than this are considered zero fee for transaction creation (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Opłaty (DASH/Kb) mniejsze niż ta, są uważane są za równoznaczne z brakiem opłat za stworzenie transakcji (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Flush database activity from memory pool to disk log every &lt;n&gt; megabytes (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Zrzuć zapisy aktywności bazy danych z pamięci na dysk co &lt;n&gt; megabajtów (domyślnie: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Znaleziono niepotwierdzone denominowane transakcje wyjściowe, poczekam aż zostaną one potwierdzone aby móc kontynuować dalej.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Jak dokładna ma być weryfikacja bloku -chceckblocks (0-4, domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Jeśli opłata za transakcję (paytxfee) nie jest ustawiona, dodaj wystarczającą opłatę aby proces potwierdzenia rozpoczął się średnio w przeciągu n bloków (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
-        <translation type="unfinished"/>
+        <translation>Nieprawidłowa kwota za -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (musi ona wynosić co najmniej tyle co minimalna opłata za retransmisje %s aby zapobiec utknięciu transakcji)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Log transaction priority and fee per kB when mining blocks (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Rejestruj priorytet transakcji oraz opłatę za kB podczas wykopywania bloków (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utrzymuj pełny index transakcji używany przez getrawtransaction rpc call (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Maksymalny rozmiar danych w wykopanych i retransmitowanych transakcjach przesyłanych przez operatora (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Maximum total fees to use in a single wallet transaction, setting too low may abort large transactions (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Maksymalna wielkość opłaty za przesłanie jednej transakcji. Ustawienie tej kwoty zbyt nisko może nie pozwolić na przesył większych transakcji. (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Ilość czasu liczonego w sekundach jaki musi upłynąć zanim wadliwy peer znowu może spróbować nawiązać połączenie (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
-        <translation type="unfinished"/>
+        <translation>Informacje na temat debugowania danych wyjściowych (domyślnie: %u, podanie &lt;category&gt; jest opcjonalne)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Provide liquidity to Darksend by infrequently mixing coins on a continual basis (0-100, default: %u, 1=very frequent, high fees, 100=very infrequent, low fees)</source>
-        <translation type="unfinished"/>
+        <translation>Dostarcz Darksend płynności przez rzadkie ale ciągłe mieszanie monet (0-100, domyślnie: 0, 1=bardzo często, wysokie opłaty, 100=bardzo rzadko, małe opłaty)</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
+        <translation>Wymagaj wysokiego priorytetu aby retransmitować darmowe transakcje lub te o niskich opłatach (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw liczbę wątków do generowania monet, jeśli jest ono włączone (-1 = wszystkie rdzenie. domyślnie: %d)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Pokaż N potwierdzeń dla skutecznie zamkniętej transakcji (0-9999, domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
-        <translation type="unfinished"/>
+        <translation>Produkt ten zawiera oprogramowanie stworzone przez OpenSSL Project do użytku w OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, oprogramowanie krptograficzne napisane przez Eric Young oraz oprogramowanie UPnP napisane przez Thomas Bernard.</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -4710,88 +4741,103 @@ If the file does not exist, create it with owner-readable-only file permissions.
 It is also recommended to set alertnotify so you are notified of problems;
 for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
 </source>
-        <translation type="unfinished"/>
+        <translation>Aby używać dashd, lub opcje -server w kliencie dash-qt, musisz ustawić hasło rpc w pliku konfiguracji:
+%s
+Zalecane jest abyś użył te o to losowo stworzone hasło
+rpcuser=dashrpc
+rpcpassword=%s
+(Nie musisz pamiętać tego hasła)
+Twoje hasło NIE MOŻE być takie samo jak twój login.
+Jeśli plik ten nie istnieje, stwórz go z uprawnieniami do odczytu tylko przez właściciela.
+Zaleca się również aby ustawić alarm powiadomień tzw. alertnotify, aby dać ci znać w razie wystąpienia jekiegoś problemu, na przykład: alertnotify=echo %%s I -s &quot;Dash Alert&quot; admin@foo.com
+</translation>
     </message>
     <message>
         <location line="+22"/>
         <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Użyj osobnego proxy SOCK5 aby połączyć się z peerami przez sieć Tor (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Warning: -maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Uwaga: -maxtxfee jest bardzo wysoka! Tak duże opłaty mogą być uiszczone przy wysłaniu jednej transakcji.</translation>
     </message>
     <message>
         <location line="+6"/>
         <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong Dash Core will not work properly.</source>
-        <translation type="unfinished"/>
+        <translation>Uwaga: Proszę sprawdzić czy data i czas na twoim komputerze są poprawne! Jeśli twój zegar nie pokazuje prawidłowej godziny to Dash może nie działać poprawidłowo.</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
-        <translation type="unfinished"/>
+        <translation>Peery z białej listy łączące się z danej maski sieci lub adresu IP. Może byc ustawiane wielokrotnie.</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
-        <translation type="unfinished"/>
+        <translation>Peery z białej listy nie mogą zostać zbanowane a ich transakcje są zawsze retransmitowane, nawet jeśli już są w pamięci zbiorowej (mempool). Jest to przydatne np. dla bramek wyjściowych</translation>
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 może być użyte tylko dla głównej sieci)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>(domyślnie: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; może być:
+</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Accept public REST requests (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Akceptuj publiczne żądania REST (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Acceptable ciphers (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Akceptowane szyfry (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Always query for peer addresses via DNS lookup (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Zawsze wysyłaj zapytanie o adres peera przez podgląd DNS (domyślnie: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nie można rozwiązać -bind dla adresu adresu: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Connect through SOCKS5 proxy</source>
-        <translation type="unfinished"/>
+        <translation>Połączenie poprzez SOCKS5 proxy</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Podłącz do KeePassHttp na porcie &lt;port&gt; (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
-        <translation type="unfinished"/>
+        <translation>Prawo autorskie (c) 2009-%i deweloperzy Bitcoin</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Copyright (C) 2014-%i The Dash Core Developers</source>
-        <translation type="unfinished"/>
+        <translation>Prawa autorskie (C) 2014-%i deweloperzy Dash</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Could not parse -rpcbind value %s as network address</source>
-        <translation type="unfinished"/>
+        <translation>Analiza -rpcbind wartości %s jako adresu sieci jest niemożliwa</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -4811,12 +4857,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+2"/>
         <source>Disable safemode, override a real safe mode event (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Wyłącz tryb awaryjny, nadpisz prawdziwy tryb awaryjny (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Enable the client to act as a masternode (0-1, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Upoważnia klienta aby działał jako masternode (0-1, domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -4826,22 +4872,27 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+6"/>
         <source>Error loading wallet.dat: Wallet requires newer version of Dash Core</source>
-        <translation type="unfinished"/>
+        <translation>Błą wczytywania wallet.dat: Portfel wymaga nowszej wersji Dash</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Error: A fatal internal error occured, see debug.log for details</source>
+        <translation>Błąd: Wystąpił wewnętrzny błąd krytyczny, otwórz debug.log po więcej informacji.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
-        <translation type="unfinished"/>
+        <translation>Błąd: Znaleziono niewspierany argument -tor, użyj -onion.</translation>
     </message>
     <message>
         <location line="+5"/>
         <source>Fee (in DASH/kB) to add to transactions you send (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Opłata (DASH/kB) do dodania do transakcji, którą chcesz wysłać (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4851,12 +4902,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Force safe mode (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Wymuś tryb awaryjny (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Found enough users, signing ( waiting %s )</source>
-        <translation type="unfinished"/>
+        <translation>Znaleziono wystarczającą ilość użytkowników, trwa podoposywanie ( poczekaj %s )</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4866,20 +4917,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Generate coins (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Generuj monety (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>How many blocks to check at startup (default: %u, 0 = all)</source>
-        <translation type="unfinished"/>
+        <translation>Ile bloków sprawdzić podczas uruchomienia (domyślnie: %u, 0 = wszystkie)</translation>
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Ignoruj masternody niższej wersji (np. 70050; domyślnie: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Importuje...</translation>
     </message>
@@ -4891,7 +4937,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Include IP addresses in debug output (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Załącz adres IP do wyników debugowania (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4928,11 +4974,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>Opcje InstantX:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Niewystarczające środki</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4951,7 +4992,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Nieprawidłowa kwota dla -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4966,7 +5007,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
-        <translation type="unfinished"/>
+        <translation>Nieprawidłowa kwota dla -paytxfee=&lt;amount&gt;: &apos;%s&apos; (musi wynosić co najmniej %s)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4974,44 +5015,44 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Nieprawidłowa kwota dla -paytxfee=&lt;kwota&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Za mało czasu upłynęło od ostatniej udanej transakcji Darksend.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Limit size of signature cache to &lt;n&gt; entries (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Ogranicz rozmiar pamięci podrecznej podpisu do &lt;n&gt; wejść (domyślny: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Nasłuchuj połączeń JSON-RPC na &lt;port&gt; (domyślnie: %u lub testnet: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Nasłuchuj połączeń na &lt;port&gt; (domyślnie: %u lub testnet: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Zamknij masternody z pliku konfiguracji (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utrzymuj nie więcej niż &lt;n&gt; połączeń z peerami (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Maksymalny bufor odbierający na każde połączenie, &lt;n&gt;*1000 bajtów (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Maksymalny bufor wysyłania na każde połączenie, &lt;n&gt;*1000 bajtów (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -5021,7 +5062,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Need to specify a port with -whitebind: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Musisz wyznaczyć port z -whitebind: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5036,117 +5077,122 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+7"/>
         <source>Not in the Masternode list.</source>
-        <translation type="unfinished"/>
+        <translation>Nie istnieje na liście masternodów.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Number of automatic wallet backups (default: 10)</source>
-        <translation type="unfinished"/>
+        <translation>Liczba automatycznych kopi zapasowych (domyślnie: 10)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Only accept block chain matching built-in checkpoints (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Akceptuj tylko blockchain, który pasuje do wbudowanych punktów kontrolnych (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
-        <translation type="unfinished"/>
+        <translation>Łącz się tylko z węzłami w sieci &lt;net&gt; (ipv4, ipv6 lub onion)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Prepend debug output with timestamp (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Poprzedź wyniki debugowania datą i godziną (domyślnie: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
+        <translation>Włącz wątek aby od czasu do czasu wyrównać portfel (domyślnie: %u)</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Wyślij transakcje jako darmowe jeśli istnieje taka możliwość (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Server certificate file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Plik certyfikatu serwera (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Server private key (default: %s)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation type="unfinished"/>
+        <translation>Klucz prywatny serwera (domyślnie: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw ilość kluczy w key pool na &lt;n&gt; (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Set minimum block size in bytes (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślny: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Set the number of threads to service RPC calls (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw liczbę wątków dla usługi połączen RPC (domyślny: %d)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw flagę DB_PRIVATE w środowisku db portfela (domyślnie: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Przypisywanie wyszło poza limit czasu.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw plik konfiguracji (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>ustaw limit czasu połączenia w milisekundach (minimum: 1, domyślnie: %d)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Specify masternode configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Ustaw plik konfiguracji masternoda (domyślnie: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify pid file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Sprecyjzuj plik pid (domyślny: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Wydaj niepotwierdzoną resztę podczas wysyłania transakcji (domuślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Stop running after importing blocks from disk (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Zamknij program po zaimportowaniu wszystkich bloków z dysku (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted following entries to masternode: %u / %d</source>
-        <translation type="unfinished"/>
+        <translation>Następujące wpisy zostały przesłane do masternoda: %u / %d</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
-        <translation type="unfinished"/>
+        <translation>Zapisano do masternoda, czekam na więcej wejść ( %u / %d ) %s</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting in queue %s</source>
-        <translation type="unfinished"/>
+        <translation>Przesłano do masterdnoda, czekaj na swoją kolej %s</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -5156,22 +5202,22 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Próg dla niewłaściwie działających, odłączających sie peerów (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Użyj integracji KeePass 2 z wtyczką KeePass Http (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Użyj N oddzielnych masternodów aby zanonimizować fundusze (2-8, domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Use UPnP to map the listening port (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Użyj UPnP aby zmapować port nasłuchu (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+9"/>
@@ -5179,14 +5225,14 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Portfel potrzebuje być przepisany: uruchom ponownie Dash Core aby zakończyć.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
-        <translation type="unfinished"/>
+        <translation>Ostrzeżenie: Niewłaściwy argument - punkt odniesienia (benchmark) został zignorowany, użyj -debug=bench.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
-        <translation type="unfinished"/>
+        <translation>Ostrzeżenie: Niewłaściwy argument -debugnet zignorowany, użyj -debug=net</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5194,14 +5240,39 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Spróbuje ponownie...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Nieprawidłowy klucz prywatny masternoda. Przeczytaj dokumentację.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(musi być 9999 dla głównej sieci)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Nie można znaleźć przypadkowego masternoda.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Nie możesz miksować w trakcie  synchronizacji.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Nie można analizować masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Niewłaściwa maska sieci w -whitelist: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Wykryto niewłaściwy port w masternode.conf</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5226,7 +5297,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Keep N DASH anonymized (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utrzymuj N zanonimizowanych dash (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5239,7 +5310,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Za mało czasu upłynęło od ostatniej transakcji Darksend.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Linia: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Wczytuje adresy...</translation>
     </message>
@@ -5258,6 +5334,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Loading masternode cache...</source>
         <translation>Ładuje pamięć podręczną masternoda...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Ładuję pamięć podręczną płatności masternodów...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5301,7 +5382,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Node relay options:</source>
-        <translation type="unfinished"/>
+        <translation>Opcje retransmitujących węzłów:</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5341,7 +5422,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>RPC support for HTTP persistent connections (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Wsparcie RPC dla ciągłych połączeń HTTP (domyślnie: %d)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5358,15 +5439,20 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Odbuduj łańcuch bloków (block chain) od bieżącego pliku blk000??.dat</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Odbiera i wyświetla P2P alarmy sieci (standardowo: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Retransmituj i przejrzyj transakcje operatora danych (domyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Relay non-P2SH multisig (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Retransmituj non-P2SH multisig (doyślnie: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5384,17 +5470,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Działaj w tle jako daemon i akceptuj polecenia</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Wyślij informacje o debugowaniu/śladach do konsoli zamiast do pliku debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Sesja nie została ukończona!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Sesja wygasła</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Ustaw pamięć podręczną bazy danych w megabajtach (%d to %d, domyślny: %d)</translation>
     </message>
@@ -5424,12 +5510,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Przypisywanie nie powiodło się.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Sesja logowania wygasła, proszę spróbować ponownie.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Podpisywanie transakcji nie powiodło się</translation>
     </message>
@@ -5491,7 +5572,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Transaction too large for fee policy</source>
-        <translation type="unfinished"/>
+        <translation>Transakcja nie mieści się w ramach wyznaczających wielkość opłaty za transakcję</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5501,7 +5582,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Transmitting final transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Wysyłanie ostatniej transakcji.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5521,7 +5602,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Unknown state: id = %u</source>
-        <translation type="unfinished"/>
+        <translation>Status nieznany: id = %u</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5578,6 +5659,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Opcje portfela:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Nazwa okna portfela</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
@@ -5601,7 +5687,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Your transaction was accepted into the pool!</source>
-        <translation type="unfinished"/>
+        <translation>Twoja transakcja została dołączona do poola!</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5619,4 +5705,4 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Plik wallet.dat zepsuty, odzyskiwanie nie powiodło się</translation>
     </message>
 </context>
-</TS>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/dash_pt.ts b/src/qt/locale/dash_pt.ts
index dfc76e329fba..9c29051aa642 100644
--- a/src/qt/locale/dash_pt.ts
+++ b/src/qt/locale/dash_pt.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Carteira</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Nó</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Global</translation>
     </message>
@@ -498,12 +498,12 @@
     <message>
         <location line="+1"/>
         <source>&amp;Peers list</source>
-        <translation type="unfinished"/>
+        <translation>Lista de &amp;Nós</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Show peers info</source>
-        <translation type="unfinished"/>
+        <translation>Mostrar informação dos nós</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -528,12 +528,12 @@
     <message>
         <location line="+1"/>
         <source>Show Automatic &amp;Backups</source>
-        <translation type="unfinished"/>
+        <translation>Mostrar &amp;Cópias Automáticas</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Show automatically created wallet backups</source>
-        <translation type="unfinished"/>
+        <translation>Mostra as cópias automáticas da carteira</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -743,7 +743,7 @@ Endereço: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Alerta de Rede</translation>
     </message>
@@ -832,8 +832,8 @@ Endereço: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Voltas Darksend</translation>
+        <source>DS Rounds</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+5"/>
@@ -949,16 +949,16 @@ Endereço: %4
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation>Pode variar +/- %1 duff(s) por entrada.</translation>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>n/d</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>média</translation>
     </message>
@@ -1430,12 +1430,7 @@ Endereço: %4
         <translation>(0 = auto, &lt;0 = deixar este número de cores livres)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Esta opção determina o número de masternodes pelos quais uma entrada será anonimizada. Mais voltas de anonimização fornecem um maior grau de privacidade, mas também tem um custo mais elevado em taxas.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Número de voltas Darksend a usar</translation>
     </message>
@@ -1455,7 +1450,12 @@ Endereço: %4
         <translation>C&amp;arteira</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Aceitar ligações do exterior</translation>
     </message>
@@ -1480,7 +1480,12 @@ Endereço: %4
         <translation>Avançado</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Se deve mostrar as opções de coin control.</translation>
     </message>
@@ -1490,12 +1495,7 @@ Endereço: %4
         <translation>Activar opções coin &amp;control</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Se desabilitar a funcionalidade de gastar o troco não confirmado, este troco não poderá ser usado até que a transacção tenha pelo menos uma confirmação. Isto também afecta a maneira como o seu saldo é calculado.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Gastar troco não confirmado</translation>
     </message>
@@ -1598,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 de terceiros (ex. explorador de blocos) que aparecem no separador de transacções como itens do menu de contexto. %s no URL é substituído pelo hash da transacção. URLs múltiplos são separados pela barra vertical |.</translation>
@@ -1633,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Cancelar</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>omissão</translation>
     </message>
@@ -1643,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>nenhum</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Confirme reinicialização das opções</translation>
     </message>
@@ -1756,7 +1761,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+23"/>
         <source>Spendable:</source>
-        <translation type="unfinished"/>
+        <translation>Disponível:</translation>
     </message>
     <message>
         <location line="+51"/>
@@ -1764,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Estado:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Activado/Desactivado</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Progresso:</translation>
     </message>
@@ -1779,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Quantia e Voltas:</translation>
     </message>
@@ -1804,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>n/d</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1822,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Iniciar/Parar Mistura</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>As denominações que foram submetidas para o Masternode.&lt;br&gt;Para misturar, outros utilizadores terão que submeter denominações iguais.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Última Mensagem)</translation>
     </message>
@@ -1852,67 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Reiniciar</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>fora de sincronia</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Desactivado</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Iniciar Mistura Darksend</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Parar Mistura Darksend</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Nenhuma entrada detectada</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n volta</numerusform><numerusform>%n voltas</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Foram encontradas saídas denominadas não confirmadas, a aguardar pela confirmação para recalcular</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation type="unfinished"/>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
         <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Encontradas entradas suficientes para anonimizar %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <location line="+46"/>
+        <source>Mixed</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Activado</translation>
     </message>
@@ -1934,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend foi reposto com sucesso.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend necessita de pelo menos %1 para ser usado.</translation>
     </message>
@@ -2087,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Quantia</translation>
     </message>
@@ -2097,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Insira um endereço Dash (ex. %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 d</translation>
     </message>
@@ -2178,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Information</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Número de Masternodes</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Geral</translation>
     </message>
@@ -2291,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Cadeia de blocos</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Consola</translation>
     </message>
@@ -2328,14 +2350,14 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+41"/>
         <source>&amp;Peers</source>
-        <translation type="unfinished"/>
+        <translation>&amp;Nós</translation>
     </message>
     <message>
         <location line="+41"/>
         <location filename="../rpcconsole.cpp" line="+252"/>
         <location line="+426"/>
         <source>Select a peer to view detailed information.</source>
-        <translation type="unfinished"/>
+        <translation>Seleccione um nó para visualizar informação detalhada.</translation>
     </message>
     <message>
         <location line="+25"/>
@@ -2435,47 +2457,47 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+19"/>
         <source>The buttons below will restart the wallet with command-line options to repair the wallet, fix issues with corrupt blockhain files or missing/obsolete transactions.</source>
-        <translation type="unfinished"/>
+        <translation>Os botões abaixo irão reiniciar a carteira passando parâmetros da linha de comandos para reparar a carteira, corrigir problemas com a cadeia de blocos ou com transacções em falta ou obsoletas.</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-salvagewallet: Attempt to recover private keys from a corrupt wallet.dat.</source>
-        <translation type="unfinished"/>
+        <translation>-salvagewallet: Tenta recuperar as chaves privadas a partir de um ficheiro wallet.dat corrompido.</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-rescan: Rescan the block chain for missing wallet transactions.</source>
-        <translation type="unfinished"/>
+        <translation>-rescan: Examina novamente a cadeia de blocos para encontrar transacções inexistentes na carteira</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-zapwallettxes=1: Recover transactions from blockchain (keep meta-data, e.g. account owner).</source>
-        <translation type="unfinished"/>
+        <translation>-zapwallettxes=1: Recupera transacções da cadeia de blocos (mantendo os meta-dados, ex. dono da conta)</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-zapwallettxes=2: Recover transactions from blockchain (drop meta-data).</source>
-        <translation type="unfinished"/>
+        <translation>-zapwallettxes=2: Recupera transacções da cadeia de blocos (apagando os meta-dados)</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>-upgradewallet: Upgrade wallet to latest format on startup. (Note: this is NOT an update of the wallet itself!)</source>
-        <translation type="unfinished"/>
+        <translation>-upgradewallet: Actualiza a carteira para o formato mais recente quando arranca. (Nota: Isto NÃO é uma actualização da carteira em si!)</translation>
     </message>
     <message>
         <location line="+23"/>
         <source>Wallet repair options.</source>
-        <translation type="unfinished"/>
+        <translation>Opções de reparação da carteira.</translation>
     </message>
     <message>
         <location line="+16"/>
         <source>Rebuild index</source>
-        <translation type="unfinished"/>
+        <translation>Reconstruir indexação</translation>
     </message>
     <message>
         <location line="+13"/>
         <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
-        <translation type="unfinished"/>
+        <translation>-reindex: Reconstroi o índice da cadeia de blocos a partir dos ficheiros actuais blk000??.dat.</translation>
     </message>
     <message>
         <location filename="../rpcconsole.cpp" line="-203"/>
@@ -2525,42 +2547,42 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+128"/>
         <source>via %1</source>
-        <translation type="unfinished"/>
+        <translation>via %1</translation>
     </message>
     <message>
         <location line="+3"/>
         <location line="+1"/>
         <source>never</source>
-        <translation type="unfinished"/>
+        <translation>nunca</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Inbound</source>
-        <translation type="unfinished"/>
+        <translation>Entrada</translation>
     </message>
     <message>
         <location line="+0"/>
         <source>Outbound</source>
-        <translation type="unfinished"/>
+        <translation>Saída</translation>
     </message>
     <message>
         <location line="+13"/>
         <source>Unknown</source>
-        <translation type="unfinished"/>
+        <translation>Desconhecido</translation>
     </message>
     <message>
         <location line="+2"/>
         <location line="+1"/>
         <source>Fetching...</source>
-        <translation type="unfinished"/>
+        <translation>Carregando...</translation>
     </message>
 </context>
 <context>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Reutilizar um dos endereços de recebimento usados anteriormente. Reutilizar endereços tem problemas de segurança e privacidade. Não use isto a menos que se trate de uma reutilização de um pedido de pagamento feito anteriormente.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+3"/>
@@ -2569,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Mensagem opcional para anexar à solicitação de pagamento, que será mostrada quando a solicitação for aberta. Nota: A mensagem não será enviada com o pagamento através da rede Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Mensagem:</translation>
     </message>
@@ -2585,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Rótulo opcional para associar com o novo endereço de recebimento.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Utilize este formulário para solicitar pagamentos. Todos os campos são &lt;b&gt;opcionais&lt;/b&gt;.</translation>
     </message>
@@ -2771,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Enviar Moedas</translation>
@@ -2829,7 +2855,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+32"/>
         <source>Dust:</source>
-        <translation type="unfinished"/>
+        <translation>Poeira:</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -2859,93 +2885,93 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+206"/>
         <source>Transaction Fee:</source>
-        <translation type="unfinished"/>
+        <translation>Taxa de Transacção:</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Choose...</source>
-        <translation type="unfinished"/>
+        <translation>Escolha...</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"/>
+        <translation>fechar opções de taxa</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Minimize</source>
-        <translation type="unfinished"/>
+        <translation>Minimizar</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
         <translation type="unfinished"/>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation type="unfinished"/>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>por kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <location line="+16"/>
+        <source>total at least</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"/>
+        <translation>(leia a tooltip)</translation>
     </message>
     <message>
         <location line="+29"/>
         <source>Recommended:</source>
-        <translation type="unfinished"/>
+        <translation>Recomendado:</translation>
     </message>
     <message>
         <location line="+30"/>
         <source>Custom:</source>
-        <translation type="unfinished"/>
+        <translation>Personalizado:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
-        <translation type="unfinished"/>
+        <translation>(A taxa inteligente ainda não foi inicializada. Normalmente demora alguns blocos...)</translation>
     </message>
     <message>
         <location line="+29"/>
         <source>Confirmation time:</source>
-        <translation type="unfinished"/>
+        <translation>Tempo de confirmação:</translation>
     </message>
     <message>
         <location line="+60"/>
         <source>normal</source>
-        <translation type="unfinished"/>
+        <translation>normal</translation>
     </message>
     <message>
         <location line="+20"/>
         <source>fast</source>
-        <translation type="unfinished"/>
+        <translation>rápido</translation>
     </message>
     <message>
         <location line="+38"/>
         <source>Send as zero-fee transaction if possible</source>
-        <translation type="unfinished"/>
+        <translation>Enviar com taxa-zero se possível</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>(confirmation may take longer)</source>
-        <translation type="unfinished"/>
+        <translation>(a confirmação pode demorar mais)</translation>
     </message>
     <message>
         <location line="+67"/>
@@ -2993,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Saldo:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Copiar quantidade</translation>
     </message>
@@ -3025,7 +3051,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+1"/>
         <source>Copy dust</source>
-        <translation type="unfinished"/>
+        <translation>Copiar pó</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -3080,28 +3106,23 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Quantia Total %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>ou</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Confirmar envio de moedas</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
-        <translation type="unfinished"/>
+        <translation>Uma taxa %1 vezes mais alta do que %2 por kB é considerada demasiado alta.</translation>
     </message>
     <message numerus="yes">
         <location line="+109"/>
         <source>Estimated to begin confirmation within %n block(s).</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Inicio de confirmação estimado dentro de %n bloco.</numerusform><numerusform>Inicio de confirmação estimado dentro de %n blocos.</numerusform></translation>
     </message>
     <message>
         <location line="-136"/>
@@ -3109,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>O endereço do destinatário é inválido, por favor verifique.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>A quantia a pagar tem que ser maior que 0.</translation>
     </message>
@@ -3146,7 +3172,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+90"/>
         <source>Pay only the minimum fee of %1</source>
-        <translation type="unfinished"/>
+        <translation>Pagar somente a taxa mínima de %1</translation>
     </message>
     <message>
         <location line="+129"/>
@@ -3179,7 +3205,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+18"/>
         <source>The Dash address to send the payment to</source>
-        <translation type="unfinished"/>
+        <translation>O endereço Dash para onde enviar o pagamento</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -3296,7 +3322,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+18"/>
         <source>The Dash address to sign the message with</source>
-        <translation type="unfinished"/>
+        <translation>Endereço Dash com o qual deseja assinar a mensagem</translation>
     </message>
     <message>
         <location line="+7"/>
@@ -3369,7 +3395,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+21"/>
         <source>The Dash address the message was signed with</source>
-        <translation type="unfinished"/>
+        <translation>Endereço Dash com o qual a mensagem foi assinada</translation>
     </message>
     <message>
         <location line="+37"/>
@@ -3499,7 +3525,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Aberta durante mais %n bloco</numerusform><numerusform>Aberta durante mais %n blocos</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3583,7 +3609,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>, transmitida através de %n nó</numerusform><numerusform>, transmitida através de %n nós</numerusform></translation>
     </message>
     <message>
         <location line="+4"/>
@@ -3628,7 +3654,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="+0"/>
         <location line="+69"/>
         <source>watch-only</source>
-        <translation type="unfinished"/>
+        <translation>somente de visualização</translation>
     </message>
     <message>
         <location line="-67"/>
@@ -3647,7 +3673,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>maturidade em %n bloco</numerusform><numerusform>maturidade em %n blocos</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3664,12 +3690,12 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="-68"/>
         <source>Total debit</source>
-        <translation type="unfinished"/>
+        <translation>Débito total</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Total credit</source>
-        <translation type="unfinished"/>
+        <translation>Credito total</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -3773,7 +3799,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation>
+        <translation><numerusform>Aberta durante mais %n bloco</numerusform><numerusform>Aberta durante mais %n blocos</numerusform></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3878,7 +3904,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+30"/>
         <source>watch-only</source>
-        <translation type="unfinished"/>
+        <translation>somente de visualização</translation>
     </message>
     <message>
         <location line="+17"/>
@@ -3903,7 +3929,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+2"/>
         <source>Whether or not a watch-only address is involved in this transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Se existe algum endereço somente de visualização envolvido nesta transacção.</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3919,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Todas</translation>
@@ -3955,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Intervalo...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
-        <translation type="unfinished"/>
+        <translation>Mais Comum</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Recebido com</translation>
     </message>
@@ -4010,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Outra</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Introduza endereço ou rótulo a pesquisar</translation>
     </message>
@@ -4050,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Mostrar detalhes da transacção</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Exportar histórico de transacções</translation>
     </message>
@@ -4067,7 +4093,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+2"/>
         <source>Watch-only</source>
-        <translation type="unfinished"/>
+        <translation>Somente de visualização</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4115,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>O histórico de transacções foi gravado com sucesso para %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Intervalo:</translation>
     </message>
@@ -4130,7 +4156,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"/>
+        <translation>Unidade das quantias. Clique para seleccionar outra unidade.</translation>
     </message>
 </context>
 <context>
@@ -4154,7 +4180,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="-20"/>
         <location line="+9"/>
         <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
-        <translation type="unfinished"/>
+        <translation>O InstantX não suporta valores tão elevados neste momento. As transacções estão limitadas a %1 DASH.</translation>
     </message>
 </context>
 <context>
@@ -4170,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Exportar os dados do separador actual para um ficheiro</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Criar Cópia de Segurança da Carteira</translation>
     </message>
@@ -4243,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Executar comando quando o melhor bloco muda (%s no comando é substituído pela hash do bloco)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Foram encontradas saídas denominadas não confirmadas, a aguardar pela confirmação para prosseguir.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Neste modo o -genproclimit controla quantos blocos são gerados imediatamente.</translation>
     </message>
@@ -4268,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Questionar por endereços dos nós através de pesquisas DNS caso tenha poucos endereços (omissão: 1 excepto -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Definir endereço:porta externo para ligação a este masternode (ex: endereço:porta)</translation>
     </message>
@@ -4338,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Tem que especificar uma masternodeprivkey na configuração. Por favor verifique a documentação para ajuda.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(omissão: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Aceitar comandos da linha de comandos e JSON-RPC</translation>
     </message>
@@ -4383,7 +4409,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Não é possível denominar: não existem mais entradas compatíveis.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Não é possível reverter para uma versão anterior da carteira</translation>
     </message>
@@ -4428,12 +4454,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Detectada corrupção na base de dados dos blocos</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>O Darksend encontra-se desactivado.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Opções Darksend:</translation>
     </message>
@@ -4513,7 +4534,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Erro</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Erro: Pouco espaço em disco!</translation>
     </message>
@@ -4543,7 +4564,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Se a &lt;category&gt; não for fornecida, mostrar toda a informação de depuração.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"/>
     </message>
@@ -4628,7 +4649,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Foram encontradas saídas denominadas não confirmadas, a aguardar pela confirmação para prosseguir.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -4682,6 +4708,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4739,11 +4770,16 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 apenas pode ser usado para mainnet)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>(default: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation type="unfinished"/>
@@ -4751,62 +4787,62 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+3"/>
         <source>Accept public REST requests (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Aceitar REST requests (default: %u) públicos</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Acceptable ciphers (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Cifras aceitáveis (default: %s)</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Always query for peer addresses via DNS lookup (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Perguntar sempre por endereços de pares via DNS lookup (default: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Incapaz de resolver -whitebind address: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+4"/>
         <source>Connect through SOCKS5 proxy</source>
-        <translation type="unfinished"/>
+        <translation>Conectar através de SOCKS5 proxy</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Connect to KeePassHttp on port &lt;port&gt; (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Conectar a KeePassHttp na porta &lt;port&gt; (default: %u)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Copyright (C) 2009-%i The Bitcoin Core Developers</source>
-        <translation type="unfinished"/>
+        <translation>Copyright (C) 2009-%i The Bitcoin Core Developers</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Copyright (C) 2014-%i The Dash Core Developers</source>
-        <translation type="unfinished"/>
+        <translation>Copyright (C) 2014-%i Dash Core Developers</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Could not parse -rpcbind value %s as network address</source>
-        <translation type="unfinished"/>
+        <translation>Incapaz de analizar -rpcbind value %s como endereço de rede</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Darksend is idle.</source>
-        <translation type="unfinished"/>
+        <translation>Darksend está inactivo.</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Darksend request complete:</source>
-        <translation type="unfinished"/>
+        <translation>Pedido Darksend completo:</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Darksend request incomplete:</source>
-        <translation type="unfinished"/>
+        <translation>Pedido Darksend incompleto:</translation>
     </message>
     <message>
         <location line="+2"/>
@@ -4833,6 +4869,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4846,7 +4887,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Finalizing transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Finalizando transacção.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4875,11 +4916,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>A importar...</translation>
     </message>
@@ -4928,11 +4964,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>Opções InstantX</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Fundos insuficientes</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4951,7 +4982,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Quantidade inválida para -maxtxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -4974,7 +5005,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Quantia inválida para -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation type="unfinished"/>
     </message>
@@ -4984,7 +5015,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -4994,7 +5025,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -5059,32 +5090,32 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+1"/>
-        <source>Server certificate file (default: %s)</source>
+        <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
         <location line="+1"/>
-        <source>Server private key (default: %s)</source>
+        <source>Server certificate file (default: %s)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation type="unfinished"/>
+        <location line="+1"/>
+        <source>Server private key (default: %s)</source>
+        <translation>Chave privada do servidor (default: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -5101,107 +5132,137 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Sets the DB_PRIVATE flag in the wallet db environment (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Definir a flag DB_PRIVATE no ambiente db da carteira (default: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Assinatura fora do tempo.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Especificar ficheiro de configuração (default: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Especificar timeout da conexão em milisegundos  (minimum: 1, default: %d)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Specify masternode configuration file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Especificar ficheiro de configuração masternode (default: %s)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Specify pid file (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Especificar ficheiro pid (default: %s)</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Spend unconfirmed change when sending transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Gastar troco não confirmado quando enviando transacções (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Stop running after importing blocks from disk (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Para de correr após importação de blocos do disco (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted following entries to masternode: %u / %d</source>
-        <translation type="unfinished"/>
+        <translation>Apresentadas as seguintes entradas ao masternode:  %u / %d </translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting for more entries ( %u / %d ) %s</source>
-        <translation type="unfinished"/>
+        <translation>Apresentado ao masternode, esperando por mais entradas ( %u / %d ) %s</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Submitted to masternode, waiting in queue %s</source>
-        <translation type="unfinished"/>
+        <translation>Apresentado ao masternode, esperando na fila %s </translation>
     </message>
     <message>
         <location line="+4"/>
         <source>This is not a Masternode.</source>
-        <translation type="unfinished"/>
+        <translation>Este não é um Masternode</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Limiar para desconectar pares mal comportados (default: %u)</translation>
     </message>
     <message>
         <location line="+14"/>
         <source>Use KeePass 2 integration using KeePassHttp plugin (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utilize integração KeePass 2 usando plugin KeePassHttp (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Use N separate masternodes to anonymize funds  (2-8, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utilize N masternode distintos para anonimizar fundos (2-8, default: %u)</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Use UPnP to map the listening port (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Utilize UPNP para mapear porta de escuta (default: %u)</translation>
     </message>
     <message>
         <location line="+9"/>
         <source>Wallet needed to be rewritten: restart Dash Core to complete</source>
-        <translation type="unfinished"/>
+        <translation>Carteira necessita de ser re-escrita: reinicie Dash Core para completar</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
-        <translation type="unfinished"/>
+        <translation>Aviso: Argumento não suportado -benchmark ignorado, use -debug=bench.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Warning: Unsupported argument -debugnet ignored, use -debug=net.</source>
-        <translation type="unfinished"/>
+        <translation>Aviso: Argumento não suportado debugnet ignorado, use -debug=net.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Will retry...</source>
-        <translation type="unfinished"/>
+        <translation>Tentar de novo...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>masternodeprivkey inválida. Por favor reveja a documentação.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(deve ser 9999 para mainnet)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Incapaz de encontrar Masternode aleatório.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Incapaz de misturar enquanto sincronização está a decorrer.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Incapaz de analizar masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Netmask especificado invalido na -whitelist: &apos;%s&apos;</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Port inválido detectado em masternode.conf</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5226,7 +5287,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Keep N DASH anonymized (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Manter N DASH anonimizados (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5239,7 +5300,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>O último Darksend é muito recente.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Linha: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>A carregar endereços...</translation>
     </message>
@@ -5251,12 +5317,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Loading budget cache...</source>
-        <translation type="unfinished"/>
+        <translation>Carregando cache de orçamentos...</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Loading masternode cache...</source>
-        <translation type="unfinished"/>
+        <translation>Carregando cache de masternode...</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Carregando cache de pagamento de maternodes...</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5301,7 +5372,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Node relay options:</source>
-        <translation type="unfinished"/>
+        <translation>Opções de relé do nódulo:</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5341,7 +5412,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>RPC support for HTTP persistent connections (default: %d)</source>
-        <translation type="unfinished"/>
+        <translation>Suporte RPC para conexões persistentes HTTP (default: %d)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5358,15 +5429,20 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Reconstruir o índice da cadeia de blocos a partir dos ficheiros actuais blk000??.dat</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Receber e apresentar alertas da rede P2P (default: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Relé e mine data de transacções de suporte (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Relay non-P2SH multisig (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Relé não-P2SH multisig (default: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5384,17 +5460,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Executar em segundo plano como um serviço e aceitar comandos</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Enviar informação de execução/depuração para a consola em vez de enviar para o ficheiro debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Sessão incompleta!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Esgotado o tempo de sessão.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Define o tamanho máximo da cache de dados em megabytes (%d até %d, omissão %d)</translation>
     </message>
@@ -5424,12 +5500,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>A assinatura falhou.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>A assinatura excedeu o tempo limite, por favor volte a enviar.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>A assinatura da transacção falhou</translation>
     </message>
@@ -5456,7 +5527,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>This is experimental software.</source>
-        <translation type="unfinished"/>
+        <translation>Este é um software experimental.</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5491,7 +5562,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Transaction too large for fee policy</source>
-        <translation type="unfinished"/>
+        <translation>Transacção demasiado grande para a política de taxas</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5501,7 +5572,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Transmitting final transaction.</source>
-        <translation type="unfinished"/>
+        <translation>Transmitindo transacção final</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5521,7 +5592,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Unknown state: id = %u</source>
-        <translation type="unfinished"/>
+        <translation>Estado desconhecido: id = %u</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -5578,6 +5649,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Opções da carteira:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Título da janela</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
@@ -5596,12 +5672,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     <message>
         <location line="+1"/>
         <source>Your entries added successfully.</source>
-        <translation type="unfinished"/>
+        <translation>Suas entradas adicionadas com sucesso.</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Your transaction was accepted into the pool!</source>
-        <translation type="unfinished"/>
+        <translation>A sua transacção foi aceite na pool!</translation>
     </message>
     <message>
         <location line="+1"/>
diff --git a/src/qt/locale/dash_ru.ts b/src/qt/locale/dash_ru.ts
index 2f74dde727aa..121ad81d86ba 100644
--- a/src/qt/locale/dash_ru.ts
+++ b/src/qt/locale/dash_ru.ts
@@ -1,6 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ru">
+<?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.0">
 <context>
     <name>AddressBookPage</name>
     <message>
@@ -297,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Кошелёк</translation>
     </message>
@@ -312,7 +310,7 @@
         <translation>Узел</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Обзор</translation>
     </message>
@@ -580,11 +578,7 @@
     <message numerus="yes">
         <location line="+182"/>
         <source>Processed %n blocks of transaction history.</source>
-        <translation>
-            <numerusform>Обработано %n блок из истории транзакций.</numerusform>
-            <numerusform>Обработано %n блока из истории транзакций.</numerusform>
-            <numerusform>Обработано %n блоков из истории транзакций.</numerusform>
-        </translation>
+        <translation><numerusform>Обработано %n блок из истории транзакций.</numerusform><numerusform>Обработано %n блока из истории транзакций.</numerusform><numerusform>Обработано %n блоков из истории транзакций.</numerusform><numerusform>Обработано %n блоков из истории транзакций.</numerusform></translation>
     </message>
     <message>
         <location line="-376"/>
@@ -619,12 +613,7 @@
     <message numerus="yes">
         <location line="+256"/>
         <source>%n active connection(s) to Dash network</source>
-        <translation>
-            <numerusform>%n активное соединение с сетью Dash</numerusform>
-            <numerusform>%n активных соединения с сетью Dash</numerusform>
-            <numerusform>%n активных соединений с сетью Dash</numerusform>
-            <numerusform>%n активных соединений с сетью Dash</numerusform>
-        </translation>
+        <translation><numerusform>%n активное соединение с сетью Dash</numerusform><numerusform>%n активных соединения с сетью Dash</numerusform><numerusform>%n активных соединений с сетью Dash</numerusform><numerusform>%n активных соединений с сетью Dash</numerusform></translation>
     </message>
     <message>
         <location line="+15"/>
@@ -654,33 +643,18 @@
     <message numerus="yes">
         <location line="+21"/>
         <source>%n hour(s)</source>
-        <translation>
-            <numerusform>%n час</numerusform>
-            <numerusform>%n часа</numerusform>
-            <numerusform>%n часов</numerusform>
-            <numerusform>%n часов</numerusform>
-        </translation>
+        <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform><numerusform>%n часов</numerusform></translation>
     </message>
     <message numerus="yes">
         <location line="+4"/>
         <source>%n day(s)</source>
-        <translation>
-            <numerusform>%n день</numerusform>
-            <numerusform>%n дня</numerusform>
-            <numerusform>%n дней</numerusform>
-            <numerusform>%n дней</numerusform>
-        </translation>
+        <translation><numerusform>%n день</numerusform><numerusform>%n дня</numerusform><numerusform>%n дней</numerusform><numerusform>%n дней</numerusform></translation>
     </message>
     <message numerus="yes">
         <location line="+4"/>
         <location line="+6"/>
         <source>%n week(s)</source>
-        <translation>
-            <numerusform>%n неделя</numerusform>
-            <numerusform>%n недели</numerusform>
-            <numerusform>%n недель</numerusform>
-            <numerusform>%n недель</numerusform>
-        </translation>
+        <translation><numerusform>%n неделя</numerusform><numerusform>%n недели</numerusform><numerusform>%n недель</numerusform><numerusform>%n недель</numerusform></translation>
     </message>
     <message>
         <location line="+0"/>
@@ -690,12 +664,7 @@
     <message numerus="yes">
         <location line="+0"/>
         <source>%n year(s)</source>
-        <translation>
-            <numerusform>%n год</numerusform>
-            <numerusform>%n года</numerusform>
-            <numerusform>%n лет</numerusform>
-            <numerusform>%n лет</numerusform>
-        </translation>
+        <translation><numerusform>%n год</numerusform><numerusform>%n года</numerusform><numerusform>%n лет</numerusform><numerusform>%n лет</numerusform></translation>
     </message>
     <message>
         <location line="+4"/>
@@ -774,7 +743,7 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Сетевая тревога</translation>
     </message>
@@ -863,8 +832,8 @@ Address: %4
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Раундов Darksend</translation>
+        <source>DS Rounds</source>
+        <translation>Раунды DS</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -980,16 +949,16 @@ Address: %4
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation>Может отличаться на +/- %1 сатоши на каждый вход.</translation>
+        <translation>Может отличаться на +/- %1 duff(ов) на каждый вход.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>н/д</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>средний</translation>
     </message>
@@ -1461,12 +1430,7 @@ Address: %4
         <translation>(0 = автоматически, &lt;0 = оставить столько незагруженных ядер)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Эта настройка определяет количество отдельных мастернод, через которые пройдет анонимизация. Чем больше роундов, тем выше степень конфиденциальности, но также выше и суммарная стоимость комиссий&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Количество раундов Darksend</translation>
     </message>
@@ -1486,7 +1450,12 @@ Address: %4
         <translation>К&amp;ошелёк</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation>При отключении траты неподтверждённой сдачи, сдача от транзакции&lt;br/&gt;не может быть использована до тех пор, пока у этой транзакции не будет хотя бы одно подтверждение.&lt;br/&gt;Это также влияет на то, как рассчитывается Ваш баланс.</translation>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Принимать подключения извне</translation>
     </message>
@@ -1511,7 +1480,12 @@ Address: %4
         <translation>Настройки для опытных пользователей</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation>Эта настройка определяет количество отдельных мастернод, через которые пройдет анонимизация.&lt;br/&gt;Чем больше раундов, тем выше степень конфиденциальности, но также выше и суммарная стоимость комиссий.</translation>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Показывать ли функции контроля монет или нет.</translation>
     </message>
@@ -1521,12 +1495,7 @@ Address: %4
         <translation>Включить функции &amp;контроля монет</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Тратить неподтверждённую сдачу</translation>
     </message>
@@ -1629,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Знаков после запятой</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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 (например, block explorer), которые отображаются на вкладке транзакций как пункты контекстного меню. %s в URL заменяется хэшем транзакции. URL отделяются друг от друга вертикальной чертой |.</translation>
@@ -1664,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>О&amp;тмена</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>по умолчанию</translation>
     </message>
@@ -1674,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>нет</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Подтвердите сброс настроек</translation>
     </message>
@@ -1787,7 +1761,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+23"/>
         <source>Spendable:</source>
-        <translation>Доступно для расхода:</translation>
+        <translation>Для расхода:</translation>
     </message>
     <message>
         <location line="+51"/>
@@ -1795,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Статус:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Включен/Выключен</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Завершение:</translation>
     </message>
@@ -1810,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Баланс Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Сумма и раунды:</translation>
     </message>
@@ -1835,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>н/д</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1853,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Начать/остановить автоматическое перемешивание</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Номиналы, предоставленные Вами мастерноде.&lt;br&gt;Для перемешивания другие пользователи должны предоставить точно такой же набор номиналов.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Последнее сообщение)</translation>
     </message>
@@ -1883,77 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Сбросить</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>несинхронизировано</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Выключен</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Начать автоперемешивание</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Остановить перемешивание</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Монеты не найдены</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
-        <translation>
-            <numerusform>%n раунд</numerusform>
-            <numerusform>%n  раунда</numerusform>
-            <numerusform>%n раундов</numerusform>
-            <numerusform>%n раундов</numerusform>
-        </translation>
+        <translation><numerusform>%n раунд</numerusform><numerusform>%n  раунда</numerusform><numerusform>%n раундов</numerusform><numerusform>%n раундов</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Найдены неподтвержденные номиналы, пересчет будет выполнен после их подтверждения.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation>Не достаточно совместимых средств для анонимизации &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;будет анонимизировано только &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt;</translation>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Прогресс в целом</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Разбито на номиналы</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Анонимизировано</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation>
-            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раунда)</numerusform>
-            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
-            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
-            <numerusform>Прогресс: %1% (входы в среднем прошли %2 из %n раундов)</numerusform>
-        </translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Номиналы прошли в среднем %5 из %n раунда</numerusform><numerusform>Номиналы прошли в среднем %5 из %n раундов</numerusform><numerusform>Номиналы прошли в среднем %5 из %n раундов</numerusform><numerusform>Номиналы прошли в среднем %5 из %n раундов</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Найдено достаточно совместимых средств для анонимизации %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation>Не достаточно совместимых средств для анонимизации &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;будет анонимизировано только &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt;</translation>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Перемешано</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Включен</translation>
     </message>
@@ -1975,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Статус Darksend был успешно сброшен.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Если Вы не хотите видеть внутренние транзакции/комиссии от работы Darksend, выберите Тип &quot;Наиболее общие&quot; на закладке &quot;Транзакции&quot;.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Для работы Darksend требуется минимум %1.</translation>
     </message>
@@ -2128,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Сумма</translation>
     </message>
@@ -2138,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Введите адрес Dash (например, %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 д</translation>
     </message>
@@ -2219,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Информация</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Количество мастернод</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Общие</translation>
     </message>
@@ -2332,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Цепочка блоков</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Количество Мастернод</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Консоль</translation>
     </message>
@@ -2600,8 +2581,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Повторно использовать один из ранее использованных адресов. Повторное использование адресов несёт риски безопасности и приватности. Не используйте эту опцию, если вы не создаёте повторно ранее сделанный запрос платежа.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation>Повторно использовать один из ранее использованных адресов.&lt;br&gt;Повторное использование адресов несёт риски безопасности и приватности.&lt;br&gt;Не используйте эту опцию, если вы не создаёте повторно ранее сделанный запрос платежа.</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2610,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Необязательное сообщение для запроса платежа, которое будет показано при открытии запроса. Обратите внимание: сообщение не будет отправлено вместе с платежом через сеть Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Сообщение:</translation>
     </message>
@@ -2626,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Необязательная метка для нового адреса получения.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation>Необязательное сообщение для запроса платежа, которое будет показано при открытии запроса.&lt;br&gt;Обратите внимание: сообщение не будет отправлено вместе с платежом через сеть Dash.</translation>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Заполните форму для запроса платежей. Все поля &lt;b&gt;необязательны&lt;/b&gt;.</translation>
     </message>
@@ -2812,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Отправка</translation>
@@ -2919,32 +2904,32 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff, в то время как &quot;минимум&quot; будет равна 1000 duff. Для транзакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff,&lt;br&gt;в то время как &quot;минимум&quot; будет равна 1000 duff. Для транзакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>за килобайт</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff,&lt;br&gt;в то время как &quot;итого минимум&quot; будет равна 1000 duff. Для тразакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
-        <translation>Если ручная комиссия  установлена в 1000 duff, а транзакция по размеру только 250 байт, то плата &quot;за килобайт&quot; составит лишь 250 duff, в то время как &quot;итого минимум&quot; будет равна 1000 duff. Для тразакций больше килобайта в любом случае идет расчет &quot;за килобайт&quot;.</translation>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
+        <translation>Оплаты только минимальной комиссии должно быть достаточно во всех случаях, пока в блоках достаточно места.&lt;br&gt;Однако, будьте готовы к тому, что транзакция может вовсе не получить подтверждения,&lt;br&gt;если количество транзакций будет стабильно больше, чем сеть способна обработать.</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>итого минимум</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>за килобайт</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation>Оплаты только минимальной комиссии должно быть достаточно во всех случаях, пока в блоках достаточно места. Однако, будьте готовы к тому, что транзакция может вовсе не получить подтверждения, если количество транзакций будет стабильно больше, чем сеть способна обработать.</translation>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>итого минимум</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
         <translation>(прочтите всплывающую подсказку)</translation>
     </message>
@@ -2959,7 +2944,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Вручную:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation>(Расчет &quot;умной&quot; комиссии еще не доступен. Обычно требуется подождать несколько блоков...)</translation>
     </message>
@@ -3034,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Баланс:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Копировать количество</translation>
     </message>
@@ -3121,33 +3106,23 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Общая сумма %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>или</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Общая сумма = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Подтвердите отправку монет</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
         <translation>Комиссия в %1 раз выше, чем %2 за kB считается &quot;безумно высокой&quot;.</translation>
     </message>
     <message numerus="yes">
         <location line="+109"/>
         <source>Estimated to begin confirmation within %n block(s).</source>
-        <translation>
-            <numerusform>Будет подтверждено приблизительно в течение %n блока.</numerusform>
-            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
-            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
-            <numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform>
-        </translation>
+        <translation><numerusform>Будет подтверждено приблизительно в течение %n блока.</numerusform><numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform><numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform><numerusform>Будет подтверждено приблизительно в течение %n блоков.</numerusform></translation>
     </message>
     <message>
         <location line="-136"/>
@@ -3155,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Адрес получателя неверный, пожалуйста, перепроверьте.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation>&lt;b&gt;(показано записей: %1 из %2)&lt;/b&gt;</translation>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Сумма для отправки должна быть больше 0.</translation>
     </message>
@@ -3545,12 +3525,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location filename="../transactiondesc.cpp" line="+33"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Будет открыто ещё %n блок</numerusform>
-            <numerusform>Будет открыто ещё %n блока</numerusform>
-            <numerusform>Будет открыто ещё %n блоков</numerusform>
-            <numerusform>Будет открыто ещё %n блоков</numerusform>
-        </translation>
+        <translation><numerusform>Будет открыто ещё %n блок</numerusform><numerusform>Будет открыто ещё %n блока</numerusform><numerusform>Будет открыто ещё %n блоков</numerusform><numerusform>Будет открыто ещё %n блоков</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3634,12 +3609,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="+2"/>
         <source>, broadcast through %n node(s)</source>
-        <translation>
-            <numerusform>, разослано через %n узел</numerusform>
-            <numerusform>, разослано через %n узла</numerusform>
-            <numerusform>, разослано через %n узлов</numerusform>
-            <numerusform>, разослано через %n узлов</numerusform>
-        </translation>
+        <translation><numerusform>, разослано через %n узел</numerusform><numerusform>, разослано через %n узла</numerusform><numerusform>, разослано через %n узлов</numerusform><numerusform>, разослано через %n узлов</numerusform></translation>
     </message>
     <message>
         <location line="+4"/>
@@ -3703,12 +3673,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation>
-            <numerusform>будет доступно через %n блок</numerusform>
-            <numerusform>будет доступно через %n блока</numerusform>
-            <numerusform>будет доступно через %n блоков</numerusform>
-            <numerusform>будет доступно через %n блоков</numerusform>
-        </translation>
+        <translation><numerusform>будет доступно через %n блок</numerusform><numerusform>будет доступно через %n блока</numerusform><numerusform>будет доступно через %n блоков</numerusform><numerusform>будет доступно через %n блоков</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3834,12 +3799,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="+58"/>
         <source>Open for %n more block(s)</source>
-        <translation>
-            <numerusform>Будет открыто ещё %n блок</numerusform>
-            <numerusform>Будет открыто ещё %n блока</numerusform>
-            <numerusform>Будет открыто ещё %n блоков</numerusform>
-            <numerusform>Будет открыто ещё %n блоков</numerusform>
-        </translation>
+        <translation><numerusform>Будет открыто ещё %n блок</numerusform><numerusform>Будет открыто ещё %n блока</numerusform><numerusform>Будет открыто ещё %n блоков</numerusform><numerusform>Будет открыто ещё %n блоков</numerusform></translation>
     </message>
     <message>
         <location line="+3"/>
@@ -3985,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Все</translation>
@@ -4021,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Промежуток...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Наиболее общие</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Получено на</translation>
     </message>
@@ -4076,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Другое</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Введите адрес или метку для поиска</translation>
     </message>
@@ -4116,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Показать подробности транзакции</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Экспортировать историю транзакций</translation>
     </message>
@@ -4181,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>История транзакций была успешно сохранена в %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Промежуток от:</translation>
     </message>
@@ -4236,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Экспортировать данные из вкладки в файл</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Сумма выбранных:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Сделать резервную копию кошелька</translation>
     </message>
@@ -4309,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Выполнить команду при появлении нового блока (%s в команде заменяется на хэш блока)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Найдены неподтверждённые номиналы, процесс продолжится после их подтверждения.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>В этом режиме -genproclimit определяет, сколько блоков генерируется немедленно.</translation>
     </message>
@@ -4334,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Указать внешний адрес:порт для доступа к этой мастерноде (например: адрес:порт)</translation>
     </message>
@@ -4404,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Необходимо указать masternodeprivkey в файле конфигурации. Пожалуйста, ознакомьтесь с документацией.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(по умолчанию: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Принимать командную строку и команды JSON-RPC</translation>
     </message>
@@ -4449,7 +4409,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Разбиение на номиналы невозможно: не осталось совместимых монет.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Не удаётся понизить версию кошелька</translation>
     </message>
@@ -4494,12 +4454,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>База данных блоков повреждена</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend выключен.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Параметры Darksend:</translation>
     </message>
@@ -4579,7 +4534,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Ошибка</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Ошибка: мало места на диске!</translation>
     </message>
@@ -4609,7 +4564,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Если &lt;category&gt; не указана, то выводить всю отладочную информацию.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = сохранить мета-данные, например, о владельце аккаунта и информацию о запросе платежа, 2 = удалить мета-данные)</translation>
     </message>
@@ -4694,7 +4649,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Сохранять активность базы данных из пула памяти в лог на диске каждые &lt;n&gt; мегабайт (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Найдены неподтверждённые номиналы, процесс продолжится после их подтверждения.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: %u)</translation>
     </message>
@@ -4748,6 +4708,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation>Ретранслировать транзакций с нулевой или низкой комиссией, только если у них высокий приоритет (по умолчанию:%u)</translation>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log (по умолчанию: %u)</translation>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4815,11 +4780,16 @@ rpcpassword=%s
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation>(9999 можно использовать только в главной сети)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(по умолчанию: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
         <translation>&lt;category&gt; может быть:
@@ -4841,7 +4811,7 @@ rpcpassword=%s
         <translation>Всегда запрашивать адреса участников через DNS (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
         <translation>Не удаётся разрешить адрес в параметре -whitebind: &apos;%s&apos;</translation>
     </message>
@@ -4910,6 +4880,11 @@ rpcpassword=%s
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation>Ошибка: Произошла критическая ошибка, подробности смотрите в файле debug.log</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation>Ошибка: не получилось подобрать номиналы</translation>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
@@ -4952,11 +4927,6 @@ rpcpassword=%s
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation>Игнорировать мастерноды, имеющие версию ниже указанной (например: 70050; по умолчанию: %u)</translation>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Импорт ...</translation>
     </message>
@@ -5005,11 +4975,6 @@ rpcpassword=%s
         <source>InstantX options:</source>
         <translation>Параметры InstantX:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Недостаточно средств</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -5051,7 +5016,7 @@ rpcpassword=%s
         <translation>Неверная сумма в параметре -paytxfee=&lt;amount&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Последнее успешное действие Darksend было слишком недавно.</translation>
     </message>
@@ -5061,7 +5026,7 @@ rpcpassword=%s
         <translation>Ограничить размер кэша подписей до &lt;n&gt; записей (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Слушать JSON-RPC соединения на порту &lt;port&gt; (по умолчанию: %u или testnet: %u)</translation>
     </message>
@@ -5071,7 +5036,7 @@ rpcpassword=%s
         <translation>Принимать входящие подключения на порт &lt;port&gt; (по умолчанию: %u или testnet: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Заблокировать средства мастернод, указанных в настроечном файле (по умолчанию: %u)</translation>
     </message>
@@ -5136,12 +5101,17 @@ rpcpassword=%s
         <translation>Дописывать в начало отладочного вывода отметки времени (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation>Запустить поток для периодического сохранения кошелька (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation>Выводить информацию трассировки/отладки в файл debug.log (по умолчанию: %u)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>По возможности отправлять транзакции с нулевой комиссией (по умолчанию: %u)</translation>
     </message>
@@ -5156,12 +5126,7 @@ rpcpassword=%s
         <translation>Закрытый ключ сервера (по умолчанию: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Сессия прекращена по тайм-ауту, пожалуйста, отправьте заново.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Установить размер пула ключей в &lt;n&gt; (по умолчанию: %u)</translation>
     </message>
@@ -5181,7 +5146,12 @@ rpcpassword=%s
         <translation>Установить флаг DB_PRIVATE в окружении базы данных кошелька (по умолчанию: %u)</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Подписание прекращено по тайм-ауту.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Указать конфигурационный файл (по умолчанию: %s)</translation>
     </message>
@@ -5256,7 +5226,7 @@ rpcpassword=%s
         <translation>Необходимо перезаписать кошелёк: перезапустите Dash Core для завершения операции</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation>Внимание: Опция -benchmark проигнорирована, используйте -debug=bench вместо нее.</translation>
     </message>
@@ -5271,15 +5241,40 @@ rpcpassword=%s
         <translation>Попробуем еще раз...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Неправильное значение masternodeprivkey. Пожалуйста, ознакомьтесь с документацией.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation>(должно быть 9999 в главной сети)</translation>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation>Не получилось выбрать случайную Мастерноду.</translation>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation>Перемешивание до завершения синхронизации невозможно.</translation>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation>Не могу разобрать masternode.conf</translation>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation>В параметре -whitelist указана некорректная маска: &apos;%s&apos;</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation>Обнаружен некорректный порт в masternode.conf</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5316,7 +5311,12 @@ rpcpassword=%s
         <translation>Последнее действие Darksend было слишком недавно.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Строка: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Загрузка адресов...</translation>
     </message>
@@ -5335,6 +5335,11 @@ rpcpassword=%s
         <source>Loading masternode cache...</source>
         <translation>Загрузка кэша мастернод...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Загрузка кэша выплат Мастернодам...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5435,6 +5440,11 @@ rpcpassword=%s
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Перестроить индекс цепочки блоков из текущих файлов blk000??.dat</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation>Получать и показывать предупреждения P2P-сети (по умолчанию: %u)</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5461,17 +5471,17 @@ rpcpassword=%s
         <translation>Запускаться в фоне как демон и принимать команды</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Выводить информацию трассировки/отладки на консоль вместо файла debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Сессия не закончена!</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Сессия прекращена по тайм-ауту.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
     </message>
@@ -5501,12 +5511,7 @@ rpcpassword=%s
         <translation>Подписание завершилось неудачно.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Подписание прекращено по тайм-ауту, пожалуйста, отправьте заново.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Подписание транзакции завершилось неудачно</translation>
     </message>
@@ -5655,6 +5660,11 @@ rpcpassword=%s
         <source>Wallet options:</source>
         <translation>Параметры кошелька:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation>Заголовок окна кошелька</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>
@@ -5696,4 +5706,4 @@ rpcpassword=%s
         <translation>wallet.dat повреждён, спасение данных не удалось</translation>
     </message>
 </context>
-</TS>
+</TS>
\ No newline at end of file
diff --git a/src/qt/locale/dash_vi.ts b/src/qt/locale/dash_vi.ts
index d3008c65cfde..92c0705aa6c5 100644
--- a/src/qt/locale/dash_vi.ts
+++ b/src/qt/locale/dash_vi.ts
@@ -295,12 +295,12 @@
     <name>BitcoinGUI</name>
     <message>
         <location filename="../bitcoingui.cpp" line="+107"/>
-        <location line="+726"/>
+        <location line="+728"/>
         <source>Dash Core</source>
         <translation>Dash Core</translation>
     </message>
     <message>
-        <location line="-717"/>
+        <location line="-719"/>
         <source>Wallet</source>
         <translation>Ví</translation>
     </message>
@@ -310,7 +310,7 @@
         <translation>Nút</translation>
     </message>
     <message>
-        <location line="+142"/>
+        <location line="+144"/>
         <source>&amp;Overview</source>
         <translation>&amp;Tổng thể</translation>
     </message>
@@ -743,7 +743,7 @@ Kiểu: %3
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+171"/>
+        <location filename="../clientmodel.cpp" line="+173"/>
         <source>Network Alert</source>
         <translation>Cảnh báo mạng</translation>
     </message>
@@ -832,8 +832,8 @@ Kiểu: %3
     </message>
     <message>
         <location line="+5"/>
-        <source>Darksend Rounds</source>
-        <translation>Số vòng Darksend</translation>
+        <source>DS Rounds</source>
+        <translation>Số vòng DS</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -949,16 +949,16 @@ Kiểu: %3
     <message>
         <location line="+216"/>
         <source>Can vary +/- %1 duff(s) per input.</source>
-        <translation type="unfinished"/>
+        <translation>Có thể thay đổi +/- %1 duff(s) cho mỗi đầu vào.</translation>
     </message>
     <message>
-        <location line="+131"/>
+        <location line="+132"/>
         <source>n/a</source>
         <translation>không áp dụng</translation>
     </message>
     <message>
         <location filename="../forms/coincontroldialog.ui" line="-318"/>
-        <location filename="../coincontroldialog.cpp" line="-346"/>
+        <location filename="../coincontroldialog.cpp" line="-347"/>
         <source>medium</source>
         <translation>vừa</translation>
     </message>
@@ -1430,12 +1430,7 @@ Kiểu: %3
         <translation>(0 = tự động, &lt;0 = để đó rất nhiều lõi miễn phí)</translation>
     </message>
     <message>
-        <location line="+37"/>
-        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This setting determines the amount of individual masternodes that an input will be anonymized through. More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Thiết lập này xác định số tiền cho mỗi master nodes mà đầu vào thông qua đó được ẩn danh. Càng có nhiều vòng ẩn danh thì sẽ cho mức độ riêng tư càng cao, nhưng nó cũng tốn nhiều phí hơn.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+40"/>
         <source>Darksend rounds to use</source>
         <translation>Số vòng Darksend sử dụng</translation>
     </message>
@@ -1455,7 +1450,12 @@ Kiểu: %3
         <translation>&amp;Ví</translation>
     </message>
     <message>
-        <location line="+65"/>
+        <location line="+22"/>
+        <source>If you disable the spending of unconfirmed change, the change from a transaction&lt;br/&gt;cannot be used until that transaction has at least one confirmation.&lt;br/&gt;This also affects how your balance is computed.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+43"/>
         <source>Accept connections from outside</source>
         <translation>Chấp nhận kết nối từ bên ngoài</translation>
     </message>
@@ -1480,7 +1480,12 @@ Kiểu: %3
         <translation>Chuyên gia</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="-74"/>
+        <source>This setting determines the amount of individual masternodes that an input will be anonymized through.&lt;br/&gt;More rounds of anonymization gives a higher degree of privacy, but also costs more in fees.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+80"/>
         <source>Whether to show coin control features or not.</source>
         <translation>Hiển thị hoặc không hiển thị tính năng coin control.</translation>
     </message>
@@ -1490,12 +1495,7 @@ Kiểu: %3
         <translation>Bật tính năng Coin &amp;control</translation>
     </message>
     <message>
-        <location line="+7"/>
-        <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>Nếu bạn tắt chức năng chi tiêu các khoản tiền trả lại chưa được xác nhận, thì những khoản trả lại đó sẽ không thể sử dụng đến tận khi các giao dịch đó được ít nhất một lần xác nhận. Điều này cũng ảnh hưởng đến cách tính số dư của bạn.</translation>
-    </message>
-    <message>
-        <location line="+3"/>
+        <location line="+10"/>
         <source>&amp;Spend unconfirmed change</source>
         <translation>&amp;Tiêu phần trả lại chưa được xác nhận</translation>
     </message>
@@ -1598,6 +1598,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+11"/>
+        <source>Decimal digits</source>
+        <translation>Số các chữ số thập phân</translation>
+    </message>
+    <message>
+        <location line="+14"/>
         <location line="+13"/>
         <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>Địa chỉ web của bên thứ ba (VD: chức năng kiểm tra số cái) mà nó xuất hiện trong tab giao dịch giống như các mục trong menu ngữ cảnh. %s trong địa chỉ web được thay thế bởi mã băm giao dịch. Nhiều địa chỉ web được phân cách bởi dấu gạch đứng |.</translation>
@@ -1633,7 +1638,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Huỷ</translation>
     </message>
     <message>
-        <location filename="../optionsdialog.cpp" line="+84"/>
+        <location filename="../optionsdialog.cpp" line="+91"/>
         <source>default</source>
         <translation>ngầm định</translation>
     </message>
@@ -1643,7 +1648,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>không có</translation>
     </message>
     <message>
-        <location line="+84"/>
+        <location line="+87"/>
         <source>Confirm options reset</source>
         <translation>Xác nhận tái lập tuỳ chọn</translation>
     </message>
@@ -1764,12 +1769,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Tình trạng:</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+78"/>
         <source>Enabled/Disabled</source>
         <translation>Bật/Tắt</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="-71"/>
         <source>Completion:</source>
         <translation>Hoàn thành:</translation>
     </message>
@@ -1779,12 +1784,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Số dư cho Darksend:</translation>
     </message>
     <message>
-        <location line="+13"/>
-        <source>0 DASH</source>
-        <translation>0 DASH</translation>
-    </message>
-    <message>
-        <location line="+7"/>
+        <location line="+20"/>
         <source>Amount and Rounds:</source>
         <translation>Số tiền và số vòng:</translation>
     </message>
@@ -1804,9 +1804,10 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>không áp dụng</translation>
     </message>
     <message>
-        <location line="+566"/>
-        <location filename="../overviewpage.cpp" line="+464"/>
-        <location line="+14"/>
+        <location line="+573"/>
+        <location filename="../overviewpage.cpp" line="+465"/>
+        <location line="+10"/>
+        <location line="+10"/>
         <location line="+14"/>
         <source>Darksend</source>
         <translation>Darksend</translation>
@@ -1822,12 +1823,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Bắt đầu/Tắt việc trộn</translation>
     </message>
     <message>
-        <location line="-462"/>
+        <location line="-469"/>
         <source>The denominations you submitted to the Masternode.&lt;br&gt;To mix, other users must submit the exact same denominations.</source>
         <translation>Mệnh giá mà bạn gửi cho Masternode. &lt;br&gt;Để trộn, những người dùng khác cũng cần gửi chính xác dùng loại mệnh giá đó.</translation>
     </message>
     <message>
-        <location line="+494"/>
+        <location line="+501"/>
         <source>(Last Message)</source>
         <translation>(Thông điệp cuối)</translation>
     </message>
@@ -1852,67 +1853,83 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Khởi động lại</translation>
     </message>
     <message>
-        <location filename="../overviewpage.cpp" line="-353"/>
+        <location filename="../overviewpage.cpp" line="-359"/>
         <location line="+1"/>
         <location line="+1"/>
         <source>out of sync</source>
         <translation>không đồng bộ</translation>
     </message>
     <message>
-        <location line="+13"/>
+        <location line="+6"/>
         <location line="+1"/>
         <location line="+1"/>
-        <location line="+262"/>
+        <location line="+270"/>
         <source>Disabled</source>
         <translation>Đã tắt</translation>
     </message>
     <message>
-        <location line="-259"/>
-        <location line="+261"/>
-        <location line="+86"/>
+        <location line="-266"/>
+        <location line="+268"/>
+        <location line="+91"/>
         <source>Start Darksend Mixing</source>
         <translation>Bắt đầu trộn Darksend</translation>
     </message>
     <message>
-        <location line="-345"/>
-        <location line="+347"/>
+        <location line="-357"/>
+        <location line="+360"/>
         <source>Stop Darksend Mixing</source>
         <translation>Tắt trộn Darksend</translation>
     </message>
     <message>
-        <location line="-196"/>
+        <location line="-188"/>
+        <location line="+6"/>
         <source>No inputs detected</source>
         <translation>Phát hiện không có đầu vào</translation>
     </message>
     <message numerus="yes">
-        <location line="+7"/>
-        <location line="+59"/>
-        <location line="+15"/>
+        <location line="-2"/>
+        <location line="+20"/>
+        <location line="+10"/>
         <source>%n Rounds</source>
         <translation><numerusform>%n Vòng</numerusform></translation>
     </message>
     <message>
-        <location line="-65"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to recalculate.</source>
-        <translation>Tìm thấy các mệnh giá đầu ra chưa được xác nhận, sẽ đợi đến khi chúng xác nhận để tính toán lại.</translation>
+        <location line="-7"/>
+        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+38"/>
+        <source>Overall progress</source>
+        <translation>Tiến trình chung</translation>
+    </message>
+    <message>
+        <location line="+1"/>
+        <source>Denominated</source>
+        <translation>Đã chia mệnh giá</translation>
+    </message>
+    <message>
+        <location line="+2"/>
+        <source>Anonymized</source>
+        <translation>Đã được ẩn danh</translation>
     </message>
     <message numerus="yes">
-        <location line="+37"/>
-        <source>Progress: %1% (inputs have an average of %2 of %n rounds)</source>
-        <translation><numerusform>Tiến trình: %1% (đầu vào có trung bình %2 của %n vòng)</numerusform></translation>
+        <location line="+1"/>
+        <source>Denominated inputs have %5 of %n rounds on average</source>
+        <translation><numerusform>Mệnh giá đầu vào có %5 của %n vòng trên trung bình</numerusform></translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="-48"/>
         <source>Found enough compatible inputs to anonymize %1</source>
         <translation>Đã tìm được đủ đầu vào tương thích để ẩn danh hoá %1</translation>
     </message>
     <message>
-        <location line="+10"/>
-        <source>Not enough compatible inputs to anonymize &lt;span style=&apos;color:red;&apos;&gt;%1&lt;/span&gt;,&lt;br/&gt;will anonymize &lt;span style=&apos;color:red;&apos;&gt;%2&lt;/span&gt; instead</source>
-        <translation type="unfinished"/>
+        <location line="+46"/>
+        <source>Mixed</source>
+        <translation>Đã trộn</translation>
     </message>
     <message>
-        <location line="+54"/>
+        <location line="+40"/>
         <source>Enabled</source>
         <translation>Đã bật</translation>
     </message>
@@ -1934,7 +1951,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend vừa được tái lập thành công.</translation>
     </message>
     <message>
-        <location line="+14"/>
+        <location line="+10"/>
+        <source>If you don&apos;t want to see internal Darksend fees/transactions select &quot;Most Common&quot; as Type on the &quot;Transactions&quot; tab.</source>
+        <translation>Nếu bạn không muốn thấy các thông tin bên trong về Darksend phí/giao dịch thì hãy chọn &quot;Thông dụng nhất&quot; làm Kiểu trong trang &quot;Giao dịch&quot;.</translation>
+    </message>
+    <message>
+        <location line="+10"/>
         <source>Darksend requires at least %1 to use.</source>
         <translation>Darksend cần ít nhất %1 để sử dụng.</translation>
     </message>
@@ -1986,7 +2008,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+8"/>
         <source>URI cannot be parsed! This can be caused by an invalid Dash address or malformed URI parameters.</source>
-        <translation type="unfinished"/>
+        <translation>URI không thể phân tích. Nó có thể bởi địa chỉ Dash không hợp lệ hoặc thông số URI dị hình.</translation>
     </message>
     <message>
         <location line="+14"/>
@@ -2076,7 +2098,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+0"/>
         <source>User Agent</source>
-        <translation type="unfinished"/>
+        <translation>User Agent</translation>
     </message>
     <message>
         <location line="+0"/>
@@ -2087,7 +2109,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>QObject</name>
     <message>
-        <location filename="../bitcoinunits.cpp" line="+234"/>
+        <location filename="../bitcoinunits.cpp" line="+252"/>
         <source>Amount</source>
         <translation>Số lượng</translation>
     </message>
@@ -2097,7 +2119,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Hãy nhập một địa chỉ Dash (VD: %1)</translation>
     </message>
     <message>
-        <location line="+757"/>
+        <location line="+760"/>
         <source>%1 d</source>
         <translation>%1 giờ</translation>
     </message>
@@ -2178,12 +2200,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>&amp;Thông tin</translation>
     </message>
     <message>
-        <location line="+304"/>
-        <source>Masternode Count</source>
-        <translation>Số Masternode</translation>
-    </message>
-    <message>
-        <location line="-253"/>
+        <location line="+51"/>
         <source>General</source>
         <translation>Chung chung</translation>
     </message>
@@ -2291,7 +2308,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Block chain</translation>
     </message>
     <message>
-        <location line="+323"/>
+        <location line="+289"/>
+        <source>Number of Masternodes</source>
+        <translation>Số lượng Masternodes</translation>
+    </message>
+    <message>
+        <location line="+34"/>
         <source>&amp;Console</source>
         <translation>&amp;Console</translation>
     </message>
@@ -2340,7 +2362,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+25"/>
         <source>Direction</source>
-        <translation type="unfinished"/>
+        <translation>Hướng</translation>
     </message>
     <message>
         <location line="+23"/>
@@ -2350,7 +2372,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+23"/>
         <source>User Agent</source>
-        <translation type="unfinished"/>
+        <translation>User Agent</translation>
     </message>
     <message>
         <location line="+23"/>
@@ -2360,12 +2382,12 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+23"/>
         <source>Starting Height</source>
-        <translation type="unfinished"/>
+        <translation>Độ cao khởi đầu</translation>
     </message>
     <message>
         <location line="+23"/>
         <source>Sync Height</source>
-        <translation type="unfinished"/>
+        <translation>Sync Height</translation>
     </message>
     <message>
         <location line="+23"/>
@@ -2475,7 +2497,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+13"/>
         <source>-reindex: Rebuild block chain index from current blk000??.dat files.</source>
-        <translation type="unfinished"/>
+        <translation>-reindex: Tái lập lại chỉ mục cho chuỗi khối từ tệp hiện tại blk000??.dat</translation>
     </message>
     <message>
         <location filename="../rpcconsole.cpp" line="-203"/>
@@ -2559,8 +2581,8 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>ReceiveCoinsDialog</name>
     <message>
         <location filename="../forms/receivecoinsdialog.ui" line="+34"/>
-        <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
-        <translation>Sử dụng lại địa chỉ đã được sử dụng để nhận trước đây. Sử dụng lại địa chỉ nảy sinh vấn đề an ninh và riêng tư. Đừng sử dụng nó trừ khi bạn tạo lại yêu cầu thanh toán mà bạn đã làm trước đây.</translation>
+        <source>Reuse one of the previously used receiving addresses.&lt;br&gt;Reusing addresses has security and privacy issues.&lt;br&gt;Do not use this unless re-generating a payment request made before.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
         <location line="+3"/>
@@ -2569,12 +2591,11 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+14"/>
-        <location line="+23"/>
         <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Dash network.</source>
         <translation>Một thông điệp tuỳ chọn để đính vào yêu cầu thanh toán, nó sẽ hiển thị khi yêu cầu được mở. Chú ý: Thông điệp sẽ không được gửi thông qua mạng lưới Dash.</translation>
     </message>
     <message>
-        <location line="-20"/>
+        <location line="+3"/>
         <source>&amp;Message:</source>
         <translation>&amp;Thông điệp:</translation>
     </message>
@@ -2585,7 +2606,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Một nhãn tuỳ chọn để liên kết với địa chỉ nhận mới.</translation>
     </message>
     <message>
-        <location line="-7"/>
+        <location line="-14"/>
+        <source>An optional message to attach to the payment request, which will be displayed when the request is opened.&lt;br&gt;Note: The message will not be sent with the payment over the Dash network.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+7"/>
         <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
         <translation>Sử dụng biểu mẫu này để yêu cầu thanh toán. Tất cả các trường đều là &lt;b&gt;không bắt buộc&lt;/b&gt;.</translation>
     </message>
@@ -2771,7 +2797,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+599"/>
+        <location filename="../sendcoinsdialog.cpp" line="+633"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Gửi tiền</translation>
@@ -2869,7 +2895,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+7"/>
         <source>collapse fee-settings</source>
-        <translation type="unfinished"/>
+        <translation>Thu gọn các thiết lập về phí</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -2878,34 +2904,34 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+78"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>per kilobyte</source>
-        <translation>mỗi kilobyte</translation>
+        <location line="+16"/>
+        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee,&lt;br /&gt;while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <translation type="unfinished"/>
     </message>
     <message>
+        <location line="+33"/>
         <location line="+13"/>
-        <source>If the custom fee is set to 1000 duffs and the transaction is only 250 bytes, then &quot;per kilobyte&quot; only pays 250 duffs in fee, while &quot;total at least&quot; pays 1000 duffs. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks.&lt;br /&gt;But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
-        <source>total at least</source>
-        <translation>tổng ít nhất</translation>
+        <location line="-59"/>
+        <source>per kilobyte</source>
+        <translation>mỗi kilobyte</translation>
     </message>
     <message>
-        <location line="+30"/>
-        <location line="+13"/>
-        <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for dash transactions than the network can process.</source>
-        <translation type="unfinished"/>
+        <location line="+16"/>
+        <source>total at least</source>
+        <translation>tổng ít nhất</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+46"/>
         <source>(read the tooltip)</source>
-        <translation type="unfinished"/>
+        <translation>(xem gợi ý)</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -2918,7 +2944,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Tuỳ chỉnh:</translation>
     </message>
     <message>
-        <location line="+52"/>
+        <location line="+55"/>
         <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
         <translation type="unfinished"/>
     </message>
@@ -2993,7 +3019,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Số dư:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-543"/>
+        <location filename="../sendcoinsdialog.cpp" line="-562"/>
         <source>Copy quantity</source>
         <translation>Sao chép số lượng</translation>
     </message>
@@ -3080,23 +3106,18 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+17"/>
-        <source>Total Amount %1 (= %2)</source>
-        <translation>Tổng số tiền %1 (= %2)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
-        <source>or</source>
-        <translation>hoặc</translation>
+        <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
+        <translation>Tổng số tiền = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+20"/>
         <source>Confirm send coins</source>
         <translation>Xác nhận việc gửi tiền</translation>
     </message>
     <message>
-        <location line="+235"/>
+        <location line="+238"/>
         <source>A fee %1 times higher than %2 per kB is considered an insanely high fee.</source>
-        <translation type="unfinished"/>
+        <translation>Mức phí cao hơn %1 lần so với %2 cho mỗi kB được xem là mức phí rất cao.</translation>
     </message>
     <message numerus="yes">
         <location line="+109"/>
@@ -3109,7 +3130,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Địa chỉ nhận không hợp lệ, hãy kiểm tra lại.</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="-214"/>
+        <source>&lt;b&gt;(%1 of %2 entries displayed)&lt;/b&gt;</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+217"/>
         <source>The amount to pay must be larger than 0.</source>
         <translation>Số tiền thanh toán phải lớn hơn 0.</translation>
     </message>
@@ -3647,7 +3673,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message numerus="yes">
         <location line="-142"/>
         <source>matures in %n more block(s)</source>
-        <translation type="unfinished"><numerusform></numerusform></translation>
+        <translation><numerusform>mãn hạn trong %n khối nữa</numerusform></translation>
     </message>
     <message>
         <location line="+2"/>
@@ -3919,7 +3945,7 @@ https://www.transifex.com/projects/p/dash/</translation>
 <context>
     <name>TransactionView</name>
     <message>
-        <location filename="../transactionview.cpp" line="+67"/>
+        <location filename="../transactionview.cpp" line="+69"/>
         <location line="+17"/>
         <source>All</source>
         <translation>Tất cả</translation>
@@ -3955,12 +3981,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Khoảng...</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+12"/>
         <source>Most Common</source>
         <translation>Phổ biến nhất</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
         <source>Received with</source>
         <translation>Nhận với</translation>
     </message>
@@ -4010,7 +4036,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Khác</translation>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+7"/>
         <source>Enter address or label to search</source>
         <translation>Nhập địa chỉ hoặc nhãn để tìm</translation>
     </message>
@@ -4050,7 +4076,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Xem chi tiết giao dịch</translation>
     </message>
     <message>
-        <location line="+185"/>
+        <location line="+201"/>
         <source>Export Transaction History</source>
         <translation>Kết xuất Lịch sử Giao dịch</translation>
     </message>
@@ -4115,7 +4141,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Lịch sử giao dịch đã được lưu thành công vào %1.</translation>
     </message>
     <message>
-        <location line="+128"/>
+        <location line="+126"/>
         <source>Range:</source>
         <translation>Khoảng:</translation>
     </message>
@@ -4130,7 +4156,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location filename="../bitcoingui.cpp" line="+115"/>
         <source>Unit to show amounts in. Click to select another unit.</source>
-        <translation type="unfinished"/>
+        <translation>Đơn vị mà hiển thị số lượng trong đó. Hãy click để chọn một đơn vị khác.</translation>
     </message>
 </context>
 <context>
@@ -4154,7 +4180,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <location line="-20"/>
         <location line="+9"/>
         <source>InstantX doesn&apos;t support sending values that high yet. Transactions are currently limited to %1 DASH.</source>
-        <translation type="unfinished"/>
+        <translation>InstantX không hỗ trợ để gửi giá trị lớn đến như vậy. Giới hạn giao dịch hiện tại đến %1 DASH.</translation>
     </message>
 </context>
 <context>
@@ -4170,7 +4196,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Kết xuất dữ liệu trong tab này sang một file</translation>
     </message>
     <message>
-        <location line="+201"/>
+        <location line="+8"/>
+        <source>Selected amount:</source>
+        <translation>Chọn số lượng:</translation>
+    </message>
+    <message>
+        <location line="+193"/>
         <source>Backup Wallet</source>
         <translation>Sao lưu Ví</translation>
     </message>
@@ -4243,12 +4274,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Thực hiện lệnh khi khối tốt nhất thay đổi (%s trong cmd được thay thế bởi giá trị băm của khối)</translation>
     </message>
     <message>
-        <location line="+12"/>
-        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
-        <translation>Đã thấy các mệnh giá đầu ra chưa được xác nhận, sẽ đợi đến khi chúng xác nhận để tiếp tục.</translation>
-    </message>
-    <message>
-        <location line="+8"/>
+        <location line="+20"/>
         <source>In this mode -genproclimit controls how many blocks are generated immediately.</source>
         <translation>Chế độ này -genproclimit kiểm soát bao nhiêu khối được sinh tức thời.</translation>
     </message>
@@ -4268,7 +4294,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Truy vấn địa chỉ đối tác ngang hàng thông qua tìm kiếm DNS, nếu có ít địa chỉ (ngầm định: 1 trừ trường hợp -connect)</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+7"/>
         <source>Set external address:port to get to this masternode (example: address:port)</source>
         <translation>Đặt external address:port cho masternode này (ví dụ: address:port)</translation>
     </message>
@@ -4338,12 +4364,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Bạn cần chỉ rõ masternodeprivkey trong tệp cấu hình. Hãy xem tài liệu để có hướng dẫn.</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>(default: 1)</source>
         <translation>(ngầm định: 1)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Accept command line and JSON-RPC commands</source>
         <translation>Chấp nhận dòng lệnh và các lệnh JSON-RPC</translation>
     </message>
@@ -4383,7 +4409,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Không thể định giá: không còn đầu vào tương tích.</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+3"/>
         <source>Cannot downgrade wallet</source>
         <translation>Không thể hạ cấp ví</translation>
     </message>
@@ -4428,12 +4454,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Phát hiện ra dữ liệu khối bị hỏng</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Darksend is disabled.</source>
-        <translation>Darksend đã được tắt.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Darksend options:</source>
         <translation>Tuỳ chọn Darksend:</translation>
     </message>
@@ -4513,7 +4534,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Lỗi</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Error: Disk space is low!</source>
         <translation>Lỗi: Dung lượng đĩa thấp!</translation>
     </message>
@@ -4543,7 +4564,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Nếu &lt;category&gt; không được cung cấp, đưa ra tất cả các thông tin gỡ rối.</translation>
     </message>
     <message>
-        <location line="-261"/>
+        <location line="-268"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation type="unfinished"/>
     </message>
@@ -4628,7 +4649,12 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+3"/>
+        <source>Found unconfirmed denominated outputs, will wait till they confirm to continue.</source>
+        <translation>Đã thấy các mệnh giá đầu ra chưa được xác nhận, sẽ đợi đến khi chúng xác nhận để tiếp tục.</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
         <translation type="unfinished"/>
     </message>
@@ -4682,6 +4708,11 @@ https://www.transifex.com/projects/p/dash/</translation>
         <source>Require high priority for relaying free or low-fee transactions (default:%u)</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+2"/>
+        <source>Send trace/debug info to console instead of debug.log file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+9"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
@@ -4690,7 +4721,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <message>
         <location line="+3"/>
         <source>Show N confirmations for a successfully locked transaction (0-9999, default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Hiển thị N xác nhận cho mỗi giao dịch được khoá thành công (0-9999, ngầm định: %u)</translation>
     </message>
     <message>
         <location line="+6"/>
@@ -4739,24 +4770,29 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+6"/>
+        <source>(9999 could be used only on mainnet)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>(default: %s)</source>
         <translation>(ngầm định: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>&lt;category&gt; can be:
 </source>
-        <translation type="unfinished"/>
+        <translation>&lt;category&gt; có thể là:</translation>
     </message>
     <message>
         <location line="+3"/>
         <source>Accept public REST requests (default: %u)</source>
-        <translation type="unfinished"/>
+        <translation>Chấp nhận các yêu cầu REST công khai (ngầm định: %u)</translation>
     </message>
     <message>
         <location line="+1"/>
         <source>Acceptable ciphers (default: %s)</source>
-        <translation type="unfinished"/>
+        <translation>Các loại mã hoá có thể chấp nhận (ngầm định: %s)</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -4764,9 +4800,9 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+9"/>
         <source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
-        <translation type="unfinished"/>
+        <translation>Không thể phân giải địa chỉ -whitebind: &apos;%s&apos;</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -4833,10 +4869,15 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Error: A fatal internal error occured, see debug.log for details</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Error: Can&apos;t select current denominated inputs</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+2"/>
         <source>Error: Unsupported argument -tor found, use -onion.</source>
-        <translation type="unfinished"/>
+        <translation>Lỗi: Tìm thấy tham số không được hỗ trợ -tor, thay vào đó hãy sử dụng -onion</translation>
     </message>
     <message>
         <location line="+5"/>
@@ -4875,11 +4916,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+2"/>
-        <source>Ignore masternodes less than version (example: 70050; default: %u)</source>
-        <translation type="unfinished"/>
-    </message>
-    <message>
-        <location line="+1"/>
         <source>Importing...</source>
         <translation>Đang nạp...</translation>
     </message>
@@ -4928,11 +4964,6 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>InstantX options:</source>
         <translation>Tuỳ chọn InstantX:</translation>
     </message>
-    <message>
-        <location line="+1"/>
-        <source>Insufficient funds</source>
-        <translation>Không đủ tiền</translation>
-    </message>
     <message>
         <location line="+1"/>
         <source>Insufficient funds.</source>
@@ -4974,7 +5005,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Số tiền không hợp lệ cho -paytxfee =&lt;số tiền&gt;: &apos;%s&apos;</translation>
     </message>
     <message>
-        <location line="+10"/>
+        <location line="+11"/>
         <source>Last successful Darksend action was too recent.</source>
         <translation>Phiên giao dịch Darksend thành công cuối cùng quá gần đây.</translation>
     </message>
@@ -4984,7 +5015,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Giới hạn kích thước bộ đệm chữ ký tới &lt;n&gt; thành phần (ngầm định: %u)</translation>
     </message>
     <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
         <translation>Lắng nghe kết nối JSON-RPC trên &lt;cổng&gt; (ngầm định: %u hoặc mạng thử: %u)</translation>
     </message>
@@ -4994,7 +5025,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Lắng nghe kết nối từ &lt;cổng&gt; (ngầm định: %u hoặc mạng thử: %u)</translation>
     </message>
     <message>
-        <location line="+7"/>
+        <location line="+8"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Khoá các masternode từ tệp cấu hình masternode (ngầm định: %u)</translation>
     </message>
@@ -5059,12 +5090,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Thêm tiền tố đầu ra debug với dấu thời gian (ngầm định: %u)</translation>
     </message>
     <message>
-        <location line="+11"/>
+        <location line="+12"/>
         <source>Run a thread to flush wallet periodically (default: %u)</source>
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+2"/>
+        <source>Send trace/debug info to debug.log file (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
         <translation>Gửi giao dịch như là giao dịch không phí nếu có thể (ngầm định: %u)</translation>
     </message>
@@ -5079,12 +5115,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Khoá riêng của máy chủ (ngầm định: %s)</translation>
     </message>
     <message>
-        <location line="+2"/>
-        <source>Session timed out, please resubmit.</source>
-        <translation>Phiên làm việc đã quá giờ, vui lòng gửi yêu cầu lại.</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+4"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Thiết lập kích thước pool đến &lt;n&gt; (ngầm định: %u)</translation>
     </message>
@@ -5104,7 +5135,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation type="unfinished"/>
     </message>
     <message>
-        <location line="+6"/>
+        <location line="+4"/>
+        <source>Signing timed out.</source>
+        <translation>Ký không kịp.</translation>
+    </message>
+    <message>
+        <location line="+2"/>
         <source>Specify configuration file (default: %s)</source>
         <translation>Hãy chỉ rõ tệp cấu hình (ngầm định: %s)</translation>
     </message>
@@ -5179,7 +5215,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Ví cần được ghi lại: khởi động lại Dash Core để hoàn tất</translation>
     </message>
     <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Warning: Unsupported argument -benchmark ignored, use -debug=bench.</source>
         <translation type="unfinished"/>
     </message>
@@ -5194,15 +5230,40 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Sẽ thử lại...</translation>
     </message>
     <message>
-        <location line="-122"/>
+        <location line="-127"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Masternodeprivkey không hợp lệ. Hãy xem lại tài liệu.</translation>
     </message>
+    <message>
+        <location line="-88"/>
+        <source>(must be 9999 for mainnet)</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+13"/>
+        <source>Can&apos;t find random Masternode.</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
+        <source>Can&apos;t mix while sync in progress.</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+16"/>
+        <source>Could not parse masternode.conf</source>
+        <translation type="unfinished"/>
+    </message>
+    <message>
+        <location line="+59"/>
         <source>Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
         <translation type="unfinished"/>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Invalid port detected in masternode.conf</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Invalid private key.</source>
@@ -5239,7 +5300,12 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Darksend cuối cùng quá gần.</translation>
     </message>
     <message>
-        <location line="+5"/>
+        <location line="+3"/>
+        <source>Line: %d</source>
+        <translation>Dòng: %d</translation>
+    </message>
+    <message>
+        <location line="+3"/>
         <source>Loading addresses...</source>
         <translation>Nạp các địa chỉ...</translation>
     </message>
@@ -5258,6 +5324,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Loading masternode cache...</source>
         <translation>Đang tải cache cho masternode...</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Loading masternode payment cache...</source>
+        <translation>Đang tải bộ đệm thanh toán cho masternode...</translation>
+    </message>
     <message>
         <location line="+1"/>
         <source>Loading wallet... (%3.2f %%)</source>
@@ -5358,6 +5429,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Rebuild block chain index from current blk000??.dat files</source>
         <translation>Tái tạo lại chỉ mục chuỗi khối từ tệp blk000??.dat</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Receive and display P2P network alerts (default: %u)</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Relay and mine data carrier transactions (default: %u)</source>
@@ -5384,17 +5460,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Chạy trên chế độ nền như là một tiến trình ngầm và chấp nhận các lệnh</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Send trace/debug info to console instead of debug.log file</source>
-        <translation>Gửi thông tin theo dõi/gỡ rối đến console thay vì tệp debug.log</translation>
-    </message>
-    <message>
-        <location line="+4"/>
+        <location line="+5"/>
         <source>Session not complete!</source>
         <translation>Phiên làm việc chưa hoàn thành.</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+1"/>
+        <source>Session timed out.</source>
+        <translation>Hết thời gian cho phiên làm việc.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
         <translation>Thiết lập kích thước bộ đệm cơ sở dữ liệu theo megabytes (%d đến %d, ngầm định: %d)</translation>
     </message>
@@ -5424,12 +5500,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Ký không thành công.</translation>
     </message>
     <message>
-        <location line="+1"/>
-        <source>Signing timed out, please resubmit.</source>
-        <translation>Ký không kịp, hãy gửi lại.</translation>
-    </message>
-    <message>
-        <location line="+1"/>
+        <location line="+2"/>
         <source>Signing transaction failed</source>
         <translation>Thất bại khi ký giao dịch</translation>
     </message>
@@ -5578,6 +5649,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <source>Wallet options:</source>
         <translation>Tuỳ chọn ví:</translation>
     </message>
+    <message>
+        <location line="+1"/>
+        <source>Wallet window title</source>
+        <translation type="unfinished"/>
+    </message>
     <message>
         <location line="+1"/>
         <source>Warning</source>

From a0addf20a973fe5ef936b7695d657aeb7429cbad Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 09:31:05 -0700
Subject: [PATCH 1763/1819] check collateral tx, find masternode before vote

---
 src/rpcmasternode-budget.cpp | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index aeea7f4b7478..c0963f648c23 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -106,7 +106,9 @@ Value mnbudget(const Array& params, bool fHelp)
         // }
 
         CWalletTx wtx;
-        pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX);
+        if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, budgetProposalBroadcast.GetHash(), useIX)){
+            return "Error making collateral transaction for proposal. Please check your wallet balance and make sure your wallet is unlocked.";
+        }
 
         // make our change address
         CReserveKey reservekey(pwalletMain);
@@ -297,6 +299,12 @@ Value mnbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return "Error upon calling SetKey";
 
+        CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
+        if(pmn == NULL)
+        {
+            return "Failure to find masternode in list : " + activeMasternode.vin.ToString();
+        }
+
         CBudgetVote vote(activeMasternode.vin, hash, nVote);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";
@@ -596,6 +604,12 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, keyMasternode, pubKeyMasternode))
             return "Error upon calling SetKey";
 
+        CMasternode* pmn = mnodeman.Find(activeMasternode.vin);
+        if(pmn == NULL)
+        {
+            return "Failure to find masternode in list : " + activeMasternode.vin.ToString();
+        }
+
         CFinalizedBudgetVote vote(activeMasternode.vin, hash);
         if(!vote.Sign(keyMasternode, pubKeyMasternode)){
             return "Failure to sign.";

From c7702833710f18179b8d11a5f49a8770eacf9625 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 10:42:05 -0700
Subject: [PATCH 1764/1819] Lower IX conf minimum - 1 less than the "send IX"
 gui requires, incase of a block propagating the network at the time

---
 src/instantx.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index d22e99d3dd02..b834454b0117 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -225,7 +225,7 @@ int64_t CreateNewLock(CTransaction tx)
     int64_t nTxAge = 0;
     BOOST_REVERSE_FOREACH(CTxIn i, tx.vin){
         nTxAge = GetInputAge(i);
-        if(nTxAge < 6)
+        if(nTxAge < 5) //1 less than the "send IX" gui requires, incase of a block propagating the network at the time
         {
             LogPrintf("CreateNewLock - Transaction not found / too new: %d / %s\n", nTxAge, tx.GetHash().ToString().c_str());
             return 0;

From 76959ead20fb954d54eb52281d246350a8f13808 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 10:55:54 -0700
Subject: [PATCH 1765/1819] Fixed GetBudget

---
 src/masternode-budget.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 956f2891145c..1b4f96ef8bb7 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -664,11 +664,10 @@ std::vector<CBudgetProposal*> CBudgetManager::GetBudget()
             if(pbudgetProposal->GetAmount() + nBudgetAllocated <= nTotalBudget) {
                 pbudgetProposal->SetAllotted(pbudgetProposal->GetAmount());
                 nBudgetAllocated += pbudgetProposal->GetAmount();
+                vBudgetProposalsRet.push_back(pbudgetProposal);
             } else {
                 pbudgetProposal->SetAllotted(0);
             }
-            
-            vBudgetProposalsRet.push_back(pbudgetProposal);
         }
 
         ++it2;

From 0260e06648080d27803dff08775031b611d3769d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 10:58:21 -0700
Subject: [PATCH 1766/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e7e82062cafd..f989de32eb12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 36)
+define(_CLIENT_VERSION_BUILD, 37)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index a4d8912ffff1..404797f0bf75 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 36
+#define CLIENT_VERSION_BUILD 37
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 743f7fc5eb1f8a345537b0e4b7bd76a119d1bddb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 11:21:27 -0700
Subject: [PATCH 1767/1819] new wakeup/sleep sync code

---
 src/masternode-sync.cpp | 61 +++++++++++++++++++++++++++++++----------
 src/masternode-sync.h   |  3 ++
 2 files changed, 49 insertions(+), 15 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 753e347e4799..d9c8db472426 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -17,21 +17,7 @@ CMasternodeSync masternodeSync;
 
 CMasternodeSync::CMasternodeSync()
 {
-    lastMasternodeList = 0;
-    lastMasternodeWinner = 0;
-    lastBudgetItem = 0;
-    lastFailure = 0;
-    nCountFailures = 0;
-    sumMasternodeList = 0;
-    sumMasternodeWinner = 0;
-    sumBudgetItemProp = 0;
-    sumBudgetItemFin = 0;
-    countMasternodeList = 0;
-    countMasternodeWinner = 0;
-    countBudgetItemProp = 0;
-    countBudgetItemFin = 0;
-    RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
-    RequestedMasternodeAttempt = 0;
+    Reset();
 }
 
 bool CMasternodeSync::IsSynced()
@@ -61,6 +47,49 @@ bool CMasternodeSync::IsBlockchainSynced()
     return true;
 }
 
+// if the last call to this function was more than 10 minutes ago, reset the sync process
+// - Get new masternode information
+// - Get new votes we missed (budgets and winners)
+// - Get new masternode budget
+void CMasternodeSync::WakeUp()
+{
+    // was asleep for more than 10 minutes?
+    if(GetTime() - lastProcess > 60*10) {
+        static bool fBlockchainSynced = false;
+        fBlockchainSynced = false;
+    
+        Reset();
+
+        // this could get us banned by our peers, but we'll need to try and get new information we missed
+        ClearFulfilledRequest();
+
+        // maybe we should reset all masternode based information and resync from scratch? 
+        // maybe we should get 8 new peers?
+    }
+
+    lastProcess = GetTime();
+}
+
+void CMasternodeSync::Reset()
+{   
+    lastMasternodeList = 0;
+    lastMasternodeWinner = 0;
+    lastBudgetItem = 0;
+    lastFailure = 0;
+    lastProcess = GetTime();
+    nCountFailures = 0;
+    sumMasternodeList = 0;
+    sumMasternodeWinner = 0;
+    sumBudgetItemProp = 0;
+    sumBudgetItemFin = 0;
+    countMasternodeList = 0;
+    countMasternodeWinner = 0;
+    countBudgetItemProp = 0;
+    countBudgetItemFin = 0;
+    RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
+    RequestedMasternodeAttempt = 0;
+}
+
 void CMasternodeSync::AddedMasternodeList()
 {
     lastMasternodeList = GetTime();
@@ -186,6 +215,8 @@ void CMasternodeSync::Process()
 {
     static int tick = 0;
 
+    WakeUp();
+    
     if(tick++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
 
     if(IsSynced()) {
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index 7fa947a116a7..b50645b81b50 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -31,6 +31,7 @@ class CMasternodeSync
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
     int64_t lastFailure;
+    int64_t lastProcess;
     int nCountFailures;
 
     // sum of all counts
@@ -58,7 +59,9 @@ class CMasternodeSync
     bool IsBudgetFinEmpty();
     bool IsBudgetPropEmpty();
 
+    void Reset();
     void Process();
+    void WakeUp();
     bool IsSynced();
     bool IsBlockchainSynced();
     void ClearFulfilledRequest();

From 57599e07e3ff013077bf6cf38b7277cdae15f294 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 11:22:31 -0700
Subject: [PATCH 1768/1819] protocol bump

---
 src/instantx.h |  2 +-
 src/version.h  | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/instantx.h b/src/instantx.h
index 01df0bb25561..6a76b7cca8b5 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -32,7 +32,7 @@ class CConsensusVote;
 class CTransaction;
 class CTransactionLock;
 
-static const int MIN_INSTANTX_PROTO_VERSION = 70100;
+static const int MIN_INSTANTX_PROTO_VERSION = 70101;
 
 extern map<uint256, CTransaction> mapTxLockReq;
 extern map<uint256, CTransaction> mapTxLockReqRejected;
diff --git a/src/version.h b/src/version.h
index a9992a5aa83a..47839697a49e 100644
--- a/src/version.h
+++ b/src/version.h
@@ -10,7 +10,7 @@
  * network protocol versioning
  */
 
-static const int PROTOCOL_VERSION = 70100;
+static const int PROTOCOL_VERSION = 70101;
 
 //! initial proto version, to be increased after version/verack negotiation
 static const int INIT_PROTO_VERSION = 209;
@@ -22,19 +22,19 @@ static const int GETHEADERS_VERSION = 70077;
 static const int MIN_PEER_PROTO_VERSION = 70066;
 
 //! minimum peer version accepted by DarksendPool
-static const int MIN_POOL_PEER_PROTO_VERSION = 70100;
+static const int MIN_POOL_PEER_PROTO_VERSION = 70101;
 
 //! minimum peer version for masternode budgets
-static const int MIN_BUDGET_PEER_PROTO_VERSION = 70100;
+static const int MIN_BUDGET_PEER_PROTO_VERSION = 70101;
 
 //! minimum peer version for masternode winner broadcasts
-static const int MIN_MNW_PEER_PROTO_VERSION = 70100;
+static const int MIN_MNW_PEER_PROTO_VERSION = 70101;
 
 //! minimum peer version that can receive masternode payments
 // V1 - Last protocol version before update
 // V2 - Newest protocol version
 static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_1 = 70066;
-static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70100;
+static const int MIN_MASTERNODE_PAYMENT_PROTO_VERSION_2 = 70101;
 
 //! nTime field added to CAddress, starting with this version;
 //! if possible, avoid requesting addresses nodes older than this

From 174f8a7644b9dbe78a102dfd9b41f4d78b71edc0 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 00:15:24 +0300
Subject: [PATCH 1769/1819] merge IsBlockchainSynced and WakeUp

---
 src/masternode-sync.cpp | 35 +++++++++--------------------------
 src/masternode-sync.h   |  2 --
 2 files changed, 9 insertions(+), 28 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index d9c8db472426..05ece957a9d1 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -28,6 +28,15 @@ bool CMasternodeSync::IsSynced()
 bool CMasternodeSync::IsBlockchainSynced()
 {
     static bool fBlockchainSynced = false;
+    static int64_t lastProcess = GetTime();
+
+    // if the last call to this function was more than 10 minutes ago (client was in sleep mode) reset the sync process
+    if(GetTime() - lastProcess > 60*10) {
+        Reset();
+        fBlockchainSynced = false;
+    }
+    lastProcess = GetTime();
+
     if(fBlockchainSynced) return true;
 
     if (fImporting || fReindex) return false;
@@ -47,36 +56,12 @@ bool CMasternodeSync::IsBlockchainSynced()
     return true;
 }
 
-// if the last call to this function was more than 10 minutes ago, reset the sync process
-// - Get new masternode information
-// - Get new votes we missed (budgets and winners)
-// - Get new masternode budget
-void CMasternodeSync::WakeUp()
-{
-    // was asleep for more than 10 minutes?
-    if(GetTime() - lastProcess > 60*10) {
-        static bool fBlockchainSynced = false;
-        fBlockchainSynced = false;
-    
-        Reset();
-
-        // this could get us banned by our peers, but we'll need to try and get new information we missed
-        ClearFulfilledRequest();
-
-        // maybe we should reset all masternode based information and resync from scratch? 
-        // maybe we should get 8 new peers?
-    }
-
-    lastProcess = GetTime();
-}
-
 void CMasternodeSync::Reset()
 {   
     lastMasternodeList = 0;
     lastMasternodeWinner = 0;
     lastBudgetItem = 0;
     lastFailure = 0;
-    lastProcess = GetTime();
     nCountFailures = 0;
     sumMasternodeList = 0;
     sumMasternodeWinner = 0;
@@ -215,8 +200,6 @@ void CMasternodeSync::Process()
 {
     static int tick = 0;
 
-    WakeUp();
-    
     if(tick++ % MASTERNODE_SYNC_TIMEOUT != 0) return;
 
     if(IsSynced()) {
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index b50645b81b50..f8f8205f226e 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -31,7 +31,6 @@ class CMasternodeSync
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
     int64_t lastFailure;
-    int64_t lastProcess;
     int nCountFailures;
 
     // sum of all counts
@@ -61,7 +60,6 @@ class CMasternodeSync
 
     void Reset();
     void Process();
-    void WakeUp();
     bool IsSynced();
     bool IsBlockchainSynced();
     void ClearFulfilledRequest();

From 3f7e62e2bfe5ad7bdb1ef96ed999bb3e979ae614 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 00:33:47 +0300
Subject: [PATCH 1770/1819] cleanup CMasternodeSync a bit

---
 src/masternode-sync.cpp | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 05ece957a9d1..5d91cb70ef2b 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -105,22 +105,9 @@ void CMasternodeSync::GetNextAsset()
     switch(RequestedMasternodeAssets)
     {
         case(MASTERNODE_SYNC_INITIAL):
-        case(MASTERNODE_SYNC_FAILED):
-            lastMasternodeList = 0;
-            lastMasternodeWinner = 0;
-            lastBudgetItem = 0;
-            lastFailure = 0;
-            nCountFailures = 0;
-            sumMasternodeList = 0;
-            sumMasternodeWinner = 0;
-            sumBudgetItemProp = 0;
-            sumBudgetItemFin = 0;
-            countMasternodeList = 0;
-            countMasternodeWinner = 0;
-            countBudgetItemProp = 0;
-            countBudgetItemFin = 0;  
-            RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
+        case(MASTERNODE_SYNC_FAILED): // should never be used here actually, use Reset() instead
             ClearFulfilledRequest();
+            RequestedMasternodeAssets = MASTERNODE_SYNC_SPORKS;
             break;
         case(MASTERNODE_SYNC_SPORKS):
             RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
@@ -207,15 +194,14 @@ void CMasternodeSync::Process()
             Resync if we lose all masternodes from sleep/wake or failure to sync originally
         */
         if(mnodeman.CountEnabled() == 0) {
-            ClearFulfilledRequest();
-            RequestedMasternodeAssets = MASTERNODE_SYNC_INITIAL;
+            Reset();
         } else
             return;
     }
 
     //try syncing again in an hour
     if(RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED && lastFailure + (60*60) < GetTime()) {
-        GetNextAsset();
+        Reset();
     } else if (RequestedMasternodeAssets == MASTERNODE_SYNC_FAILED) {
         return;
     }

From ff159ad7e7cd1d847c1eb8d05ab25b2ac80426d3 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Tue, 4 Aug 2015 23:51:16 +0300
Subject: [PATCH 1771/1819] ConnectNode/FindNide: - Use FindNode instead of
 explicit loops - Do not use FindNode where we can grab node right from
 ConnectNode (slightly less cs_vNodes)

---
 src/darksend-relay.cpp | 12 +++----
 src/darksend.cpp       | 78 ++++++++++++++++++------------------------
 src/masternodeman.cpp  |  8 ++---
 3 files changed, 40 insertions(+), 58 deletions(-)

diff --git a/src/darksend-relay.cpp b/src/darksend-relay.cpp
index e0f7724315d8..9ef77fafd31a 100644
--- a/src/darksend-relay.cpp
+++ b/src/darksend-relay.cpp
@@ -105,15 +105,11 @@ void CDarkSendRelay::RelayThroughNode(int nRank)
 
     if(pmn != NULL){
         //printf("RelayThroughNode %s\n", pmn->addr.ToString().c_str());
-        if(ConnectNode((CAddress)pmn->addr, NULL, true)){
+        CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true);
+        if(pnode){
             //printf("Connected\n");
-            CNode* pNode = FindNode(pmn->addr);
-            if(pNode)
-            {
-                //printf("Found\n");
-                pNode->PushMessage("dsr", (*this));
-                return;
-            }
+            pnode->PushMessage("dsr", (*this));
+            return;
         }
     } else {
         //printf("RelayThroughNode NULL\n");
diff --git a/src/darksend.cpp b/src/darksend.cpp
index c4f9aee4fc25..dd16c143d3d6 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1527,26 +1527,24 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
                 }
 
                 // connect to Masternode and submit the queue request
-                if(ConnectNode((CAddress)addr, NULL, true)){
-                    CNode* pnode = FindNode(addr);
-                    if(pnode)
+                CNode* pnode = ConnectNode((CAddress)addr, NULL, true);
+                if(pnode != NULL)
+                {
+                    CMasternode* pmn = mnodeman.Find(dsq.vin);
+                    if(pmn == NULL)
                     {
-                        CMasternode* pmn = mnodeman.Find(dsq.vin);
-                        if(pmn == NULL)
-                        {
-                            LogPrintf("DoAutomaticDenominating --- dsq vin %s is not in masternode list!", dsq.vin.ToString());
-                            continue;
-                        }
-                        pSubmittedToMasternode = pmn;
-                        vecMasternodesUsed.push_back(dsq.vin);
-                        sessionDenom = dsq.nDenom;
-
-                        pnode->PushMessage("dsa", sessionDenom, txCollateral);
-                        LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString());
-                        strAutoDenomResult = _("Mixing in progress...");
-                        dsq.time = 0; //remove node
-                        return true;
+                        LogPrintf("DoAutomaticDenominating --- dsq vin %s is not in masternode list!", dsq.vin.ToString());
+                        continue;
                     }
+                    pSubmittedToMasternode = pmn;
+                    vecMasternodesUsed.push_back(dsq.vin);
+                    sessionDenom = dsq.nDenom;
+
+                    pnode->PushMessage("dsa", sessionDenom, txCollateral);
+                    LogPrintf("DoAutomaticDenominating --- connected (from queue), sending dsa for %d - %s\n", sessionDenom, pnode->addr.ToString());
+                    strAutoDenomResult = _("Mixing in progress...");
+                    dsq.time = 0; //remove node
+                    return true;
                 } else {
                     LogPrintf("DoAutomaticDenominating --- error connecting \n");
                     strAutoDenomResult = _("Error connecting to Masternode.");
@@ -1577,27 +1575,21 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
             lastTimeChanged = GetTimeMillis();
             LogPrintf("DoAutomaticDenominating -- attempt %d connection to Masternode %s\n", i, pmn->addr.ToString());
-            if(ConnectNode((CAddress)pmn->addr, NULL, true)){
-
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes)
-                {
-                    if((CNetAddr)pnode->addr != (CNetAddr)pmn->addr) continue;
-
-                    pSubmittedToMasternode = pmn;
-                    vecMasternodesUsed.push_back(pmn->vin);
-
-                    std::vector<CAmount> vecAmounts;
-                    pwalletMain->ConvertList(vCoins, vecAmounts);
-                    // try to get random denoms out of vecAmounts
-                    while(sessionDenom == 0)
-                        sessionDenom = GetDenominationsByAmounts(vecAmounts, true);
-
-                    pnode->PushMessage("dsa", sessionDenom, txCollateral);
-                    LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d\n", sessionDenom);
-                    strAutoDenomResult = _("Mixing in progress...");
-                    return true;
-                }
+            CNode* pnode = ConnectNode((CAddress)pmn->addr, NULL, true);
+            if(pnode != NULL){
+                pSubmittedToMasternode = pmn;
+                vecMasternodesUsed.push_back(pmn->vin);
+
+                std::vector<CAmount> vecAmounts;
+                pwalletMain->ConvertList(vCoins, vecAmounts);
+                // try to get random denoms out of vecAmounts
+                while(sessionDenom == 0)
+                    sessionDenom = GetDenominationsByAmounts(vecAmounts, true);
+
+                pnode->PushMessage("dsa", sessionDenom, txCollateral);
+                LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d\n", sessionDenom);
+                strAutoDenomResult = _("Mixing in progress...");
+                return true;
             } else {
                 i++;
                 continue;
@@ -2167,6 +2159,7 @@ void CDarksendPool::RelayFinalTransaction(const int sessionID, const CTransactio
 
 void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmount, const CTransaction& txCollateral, const std::vector<CTxDSOut>& vout)
 {
+    if(!pSubmittedToMasternode) return;
 
     std::vector<CTxIn> vin2;
     std::vector<CTxOut> vout2;
@@ -2177,11 +2170,8 @@ void CDarksendPool::RelayIn(const std::vector<CTxDSIn>& vin, const int64_t& nAmo
     BOOST_FOREACH(CTxDSOut out, vout)
         vout2.push_back(out);
 
-    LOCK(cs_vNodes);
-    BOOST_FOREACH(CNode* pnode, vNodes)
-    {
-        if(!pSubmittedToMasternode) return;
-        if((CNetAddr)pSubmittedToMasternode->addr != (CNetAddr)pnode->addr) continue;
+    CNode* pnode = FindNode(pSubmittedToMasternode->addr);
+    if(pnode != NULL) {
         LogPrintf("RelayIn - found master, relaying message - %s \n", pnode->addr.ToString());
         pnode->PushMessage("dsi", vin2, nAmount, txCollateral, vout2);
     }
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 98755cbf763c..aa7b7f92853c 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -618,12 +618,8 @@ void CMasternodeMan::ProcessMasternodeConnections()
 
     if(!darkSendPool.pSubmittedToMasternode) return;
 
-    LOCK(cs_vNodes);
-
-    BOOST_FOREACH(CNode* pnode, vNodes)
-    {
-        if(darkSendPool.pSubmittedToMasternode->addr == pnode->addr) continue;
-
+    CNode* pnode = FindNode(darkSendPool.pSubmittedToMasternode->addr);
+    if(pnode != NULL) {
         if(pnode->fDarkSendMaster){
             LogPrintf("Closing Masternode connection %s \n", pnode->addr.ToString());
             pnode->fDisconnect = true;

From 7d78c98f0d63491623ec49a3ed3d312ded683a17 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 01:49:34 +0300
Subject: [PATCH 1772/1819] Few more lock-related fixes: - do not lock cs_main
 for mnodeman.CheckAndRemove() - we have trylock inside CMasternode.Check,
 should be enough - fast cs_main lock for ix - use RelayInv instead of
 manually locking nodes / pushing inv - do not lock cs_vNodes /
 ClearFulfilledRequest on every 100th block, CMasternodeSync should already
 handle resync by itself better now

---
 src/darksend.cpp | 11 +----------
 src/instantx.cpp | 21 ++++++++-------------
 src/main.cpp     | 13 -------------
 3 files changed, 9 insertions(+), 36 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index dd16c143d3d6..8235cd511ed8 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -2219,16 +2219,7 @@ void ThreadCheckDarkSendPool()
 
             if(c % 60 == 0)
             {
-                {
-                    LOCK(cs_main);
-                    /*
-                        cs_main is required for doing CMasternode.Check because something
-                        is modifying the coins view without a mempool lock. It causes
-                        segfaults from this code without the cs_main lock.
-                    */
-                    mnodeman.CheckAndRemove();
-                }
-
+                mnodeman.CheckAndRemove();
                 mnodeman.ProcessMasternodeConnections();
                 masternodePayments.CleanPaymentList();
                 CleanTransactionLocksList();
diff --git a/src/instantx.cpp b/src/instantx.cpp
index b834454b0117..1f08fd07d9e5 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -70,14 +70,14 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
         bool fMissingInputs = false;
         CValidationState state;
 
-        LOCK(cs_main);
-        if (AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs))
+        bool fAccepted = false;
         {
-            vector<CInv> vInv;
-            vInv.push_back(inv);
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-                pnode->PushMessage("inv", vInv);
+            LOCK(cs_main);
+            fAccepted = AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs);
+        }
+        if (fAccepted)
+        {
+            RelayInv(inv);
 
             DoConsensusVote(tx, nBlockHeight);
 
@@ -161,12 +161,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
                     mapUnknownVotes[ctx.vinMasternode.prevout.hash] = GetTime()+(60*10);
                 }
             }
-            vector<CInv> vInv;
-            vInv.push_back(inv);
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-                pnode->PushMessage("inv", vInv);
-
+            RelayInv(inv);
         }
 
         return;
diff --git a/src/main.cpp b/src/main.cpp
index adeabc4e4398..5e2ccee54c0f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3279,22 +3279,9 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     if(!fLiteMode){
         if (masternodeSync.RequestedMasternodeAssets > MASTERNODE_SYNC_LIST) {
-            CScript payee;
-            CTxIn vin;
             darkSendPool.NewBlock();
             masternodePayments.ProcessBlock(GetHeight()+10);
             budget.NewBlock();
-
-            //allow clients to ask for syncing again if they need it
-            if(GetHeight() % 100 == 0) {
-                LOCK(cs_vNodes);
-                BOOST_FOREACH(CNode* pnode, vNodes) {
-                    pnode->ClearFulfilledRequest("getspork");
-                    pnode->ClearFulfilledRequest("mnsync");
-                    pnode->ClearFulfilledRequest("mnwsync");
-                    pnode->ClearFulfilledRequest("busync");
-                }                
-            }
         }
     }
 

From 14927d6b3a3f1a73c6003e2f1e9fecacfa9ed5e8 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 17:33:49 -0700
Subject: [PATCH 1773/1819] update release docs

---
 doc/release-notes/dash/release-notes-0.12.0.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/release-notes/dash/release-notes-0.12.0.md b/doc/release-notes/dash/release-notes-0.12.0.md
index 0417e6757122..5faf8f50de8c 100644
--- a/doc/release-notes/dash/release-notes-0.12.0.md
+++ b/doc/release-notes/dash/release-notes-0.12.0.md
@@ -100,5 +100,6 @@ TaoOfSatoshi
 dark-sailor  
 AlexMomo  
 snogcel
+bertlebbert
 
 As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/dash/).

From bb5570015f85bbbc4b83443092bde64e40833c2b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Tue, 4 Aug 2015 17:58:41 -0700
Subject: [PATCH 1774/1819] Keep track of and reprocess rejected blocks

---
 src/main.cpp  |  9 +++++++--
 src/main.h    |  2 ++
 src/spork.cpp | 30 ++++++++++++++++--------------
 3 files changed, 25 insertions(+), 16 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index adeabc4e4398..1adc5be4f826 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -77,6 +77,9 @@ struct COrphanTx {
 };
 map<uint256, COrphanTx> mapOrphanTransactions;
 map<uint256, set<uint256> > mapOrphanTransactionsByPrev;
+map<uint256, int64_t> mapRejectedBlocks;
+
+
 void EraseOrphansFor(NodeId peer);
 
 static void CheckBlockIndex();
@@ -2948,6 +2951,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
                 BOOST_FOREACH(const CTxIn& in, tx.vin){
                     if(mapLockedInputs.count(in.prevout)){
                         if(mapLockedInputs[in.prevout] != tx.GetHash()){
+                            mapRejectedBlocks.insert(make_pair(block.GetHash(), GetTime()));
                             LogPrintf("CheckBlock() : found conflicting transaction with transaction lock %s %s\n", mapLockedInputs[in.prevout].ToString(), tx.GetHash().ToString());
                             return state.DoS(0, error("CheckBlock() : found conflicting transaction with transaction lock"),
                                              REJECT_INVALID, "conflicting-tx-ix");
@@ -2961,7 +2965,7 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
     }
 
 
-    // ----------- masternode payments -----------
+    // ----------- masternode payments / budgets -----------
 
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(pindexPrev != NULL)
@@ -2979,7 +2983,8 @@ bool CheckBlock(const CBlock& block, CValidationState& state, bool fCheckPOW, bo
         if(nHeight != 0){
             if(!IsBlockPayeeValid(block.vtx[0], nHeight))
             {
-                return state.DoS(100, error("CheckBlock() : Couldn't find masternode payment or payee"));
+                mapRejectedBlocks.insert(make_pair(block.GetHash(), GetTime()));
+                return state.DoS(100, error("CheckBlock() : Couldn't find masternode/budget payment"));
             }
         } else {
             LogPrintf("CheckBlock() : WARNING: Couldn't find previous block, skipping IsBlockPayeeValid()\n");
diff --git a/src/main.h b/src/main.h
index a5101ab09cc2..0dfefbe97f0c 100644
--- a/src/main.h
+++ b/src/main.h
@@ -137,6 +137,8 @@ extern bool fAlerts;
 extern bool fLargeWorkForkFound;
 extern bool fLargeWorkInvalidChainFound;
 
+extern std::map<uint256, int64_t> mapRejectedBlocks;
+
 /** Best header we've seen so far (used for getheaders queries' starting points). */
 extern CBlockIndex *pindexBestHeader;
 
diff --git a/src/spork.cpp b/src/spork.cpp
index 629dee791a67..1ca978c6c0a9 100644
--- a/src/spork.cpp
+++ b/src/spork.cpp
@@ -140,26 +140,28 @@ void ExecuteSpork(int nSporkID, int nValue)
 }
 
 void ReprocessBlocks(int nBlocks) 
-{
-    CBlockIndex* pindexPrev = chainActive.Tip();
-
-    for (unsigned int i = 1; pindexPrev && pindexPrev->nHeight > 0; i++) {
-        if(i > nBlocks) break;
-
-        CValidationState state;
-        {
-            LOCK(cs_main);
-            ReconsiderBlock(state, pindexPrev);
+{   
+    std::map<uint256, int64_t>::iterator it = mapRejectedBlocks.begin();
+    while(it != mapRejectedBlocks.end()){
+        //use a window twice as large as is usual for the nBlocks we want to reset
+        if((*it).second  > GetTime() - (nBlocks*60*5)) {   
+            BlockMap::iterator mi = mapBlockIndex.find((*it).first);
+            if (mi != mapBlockIndex.end() && (*mi).second) {
+                LOCK(cs_main);
+                
+                CBlockIndex* pindex = (*mi).second;
+                LogPrintf("ReprocessBlocks - %s\n", (*it).first.ToString());
+
+                CValidationState state;
+                ReconsiderBlock(state, pindex);
+            }
         }
-
-        if (pindexPrev->pprev == NULL) { assert(pindexPrev); break; }
-        pindexPrev = pindexPrev->pprev;
+        ++it;
     }
 
     CValidationState state;
     {
         LOCK(cs_main);
-
         DisconnectBlocksAndReprocess(nBlocks);
     }
 

From 6b74652b01f0aa1e7fb65b5dd067d020fc75ccfe Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 03:54:02 +0300
Subject: [PATCH 1775/1819] track hashes and update "last..." only twice per
 hash

---
 src/activemasternode.cpp    |  1 +
 src/main.cpp                | 12 +++++------
 src/masternode-budget.cpp   | 16 +++++++--------
 src/masternode-payments.cpp |  5 +++--
 src/masternode-sync.cpp     | 41 ++++++++++++++++++++++++++++---------
 src/masternode-sync.h       | 10 ++++++---
 src/masternode.cpp          |  2 +-
 src/masternodeman.cpp       |  5 +++--
 8 files changed, 60 insertions(+), 32 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 5c350a3e24c6..631294952a52 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -250,6 +250,7 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
         return false;
     }
     mnodeman.mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
+    masternodeSync.AddedMasternodeList(mnb.GetHash());
 
     CMasternode* pmn = mnodeman.Find(vin);
     if(pmn == NULL)
diff --git a/src/main.cpp b/src/main.cpp
index adeabc4e4398..82459d7c5805 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -3996,37 +3996,37 @@ bool static AlreadyHave(const CInv& inv)
         return mapSporks.count(inv.hash);
     case MSG_MASTERNODE_WINNER:
         if(masternodePayments.mapMasternodePayeeVotes.count(inv.hash)) {
-            masternodeSync.AddedMasternodeWinner();
+            masternodeSync.AddedMasternodeWinner(inv.hash);
             return true;
         }
         return false;
     case MSG_BUDGET_VOTE:
         if(budget.mapSeenMasternodeBudgetVotes.count(inv.hash)) {
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(inv.hash);
             return true;
         }
         return false;
     case MSG_BUDGET_PROPOSAL:
         if(budget.mapSeenMasternodeBudgetProposals.count(inv.hash)) {
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(inv.hash);
             return true;
         }
         return false;
     case MSG_BUDGET_FINALIZED_VOTE:
         if(budget.mapSeenFinalizedBudgetVotes.count(inv.hash)) {
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(inv.hash);
             return true;
         }
         return false;
     case MSG_BUDGET_FINALIZED:
         if(budget.mapSeenFinalizedBudgets.count(inv.hash)) {
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(inv.hash);
             return true;
         }
         return false;
     case MSG_MASTERNODE_ANNOUNCE:
         if(mnodeman.mapSeenMasternodeBroadcast.count(inv.hash)) {
-            masternodeSync.AddedMasternodeList();
+            masternodeSync.AddedMasternodeList(inv.hash);
             return true;
         }
         return false;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 1b4f96ef8bb7..a6370a364e8c 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -830,7 +830,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> budgetProposalBroadcast;
 
         if(mapSeenMasternodeBudgetProposals.count(budgetProposalBroadcast.GetHash())){
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(budgetProposalBroadcast.GetHash());
             return;
         }
 
@@ -849,7 +849,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         CBudgetProposal budgetProposal(budgetProposalBroadcast);
         if(AddProposal(budgetProposal)) {budgetProposalBroadcast.Relay();}
-        masternodeSync.AddedBudgetItem();
+        masternodeSync.AddedBudgetItem(budgetProposalBroadcast.GetHash());
 
         LogPrintf("mprop - new budget - %s\n", budgetProposalBroadcast.GetHash().ToString());
 
@@ -863,7 +863,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vote.fValid = true;
 
         if(mapSeenMasternodeBudgetVotes.count(vote.GetHash())){
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(vote.GetHash());
             return;
         }
 
@@ -884,7 +884,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         std::string strError = "";
         if(UpdateProposal(vote, pfrom, strError)) {
             vote.Relay();
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(vote.GetHash());
         }
 
         LogPrintf("mvote - new budget vote - %s\n", vote.GetHash().ToString());
@@ -895,7 +895,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> finalizedBudgetBroadcast;
 
         if(mapSeenFinalizedBudgets.count(finalizedBudgetBroadcast.GetHash())){
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(finalizedBudgetBroadcast.GetHash());
             return;
         }
 
@@ -916,7 +916,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
         CFinalizedBudget finalizedBudget(finalizedBudgetBroadcast);
         if(AddFinalizedBudget(finalizedBudget)) {finalizedBudgetBroadcast.Relay();}
-        masternodeSync.AddedBudgetItem();
+        masternodeSync.AddedBudgetItem(finalizedBudgetBroadcast.GetHash());
 
         //we might have active votes for this budget that are now valid
         CheckOrphanVotes();
@@ -928,7 +928,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vote.fValid = true;
 
         if(mapSeenFinalizedBudgetVotes.count(vote.GetHash())){
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(vote.GetHash());
             return;
         }
 
@@ -948,7 +948,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         std::string strError = "";
         if(UpdateFinalizedBudget(vote, pfrom, strError)) {
             vote.Relay();
-            masternodeSync.AddedBudgetItem();
+            masternodeSync.AddedBudgetItem(vote.GetHash());
         }
 
         LogPrint("mnbudget", "fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 18a5f71f739f..89c614d7d535 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -365,7 +365,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(masternodePayments.mapMasternodePayeeVotes.count(winner.GetHash())){
             LogPrint("mnpayments", "mnw - Already seen - %s bestHeight %d\n", winner.GetHash().ToString().c_str(), chainActive.Tip()->nHeight);
-            masternodeSync.AddedMasternodeWinner();
+            masternodeSync.AddedMasternodeWinner(winner.GetHash());
             return;
         }
 
@@ -400,7 +400,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(masternodePayments.AddWinningMasternode(winner)){
             winner.Relay();
-            masternodeSync.AddedMasternodeWinner();
+            masternodeSync.AddedMasternodeWinner(winner.GetHash());
         }
     }
 }
@@ -598,6 +598,7 @@ void CMasternodePayments::CleanPaymentList()
 
         if(chainActive.Tip()->nHeight - winner.nBlockHeight > nLimit){
             LogPrint("mnpayments", "CMasternodePayments::CleanPaymentList - Removing old Masternode payment - block %d\n", winner.nBlockHeight);
+            masternodeSync.mapSeenSyncMNW.erase((*it).first);
             mapMasternodePayeeVotes.erase(it++);
         } else {
             ++it;
diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 5d91cb70ef2b..83e01a157872 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -75,19 +75,44 @@ void CMasternodeSync::Reset()
     RequestedMasternodeAttempt = 0;
 }
 
-void CMasternodeSync::AddedMasternodeList()
+void CMasternodeSync::AddedMasternodeList(uint256 hash)
 {
-    lastMasternodeList = GetTime();
+    if(mnodeman.mapSeenMasternodeBroadcast.count(hash)) {
+        if(mapSeenSyncMNB[hash] < 2) {
+            lastMasternodeList = GetTime();
+            mapSeenSyncMNB[hash]++;
+        }
+    } else {
+        lastMasternodeList = GetTime();
+        mapSeenSyncMNB.insert(make_pair(hash, 1));
+    }
 }
 
-void CMasternodeSync::AddedMasternodeWinner()
+void CMasternodeSync::AddedMasternodeWinner(uint256 hash)
 {
-    lastMasternodeWinner = GetTime();
+    if(masternodePayments.mapMasternodePayeeVotes.count(hash)) {
+        if(mapSeenSyncMNW[hash] < 2) {
+            lastMasternodeWinner = GetTime();
+            mapSeenSyncMNW[hash]++;
+        }
+    } else {
+        lastMasternodeWinner = GetTime();
+        mapSeenSyncMNW.insert(make_pair(hash, 1));
+    }
 }
 
-void CMasternodeSync::AddedBudgetItem()
+void CMasternodeSync::AddedBudgetItem(uint256 hash)
 {
-    lastBudgetItem = GetTime();
+    if(budget.mapSeenMasternodeBudgetProposals.count(hash) || budget.mapSeenMasternodeBudgetVotes.count(hash) ||
+            budget.mapSeenFinalizedBudgets.count(hash) || budget.mapSeenFinalizedBudgetVotes.count(hash)) {
+        if(mapSeenSyncBudget[hash] < 2) {
+            lastBudgetItem = GetTime();
+            mapSeenSyncBudget[hash]++;
+        }
+    } else {
+        lastBudgetItem = GetTime();
+        mapSeenSyncBudget.insert(make_pair(hash, 1));
+    }
 }
 
 bool CMasternodeSync::IsBudgetPropEmpty()
@@ -141,25 +166,21 @@ void CMasternodeSync::ProcessMessage(CNode* pfrom, std::string& strCommand, CDat
         {
             case(MASTERNODE_SYNC_LIST):
                 if(nItemID != RequestedMasternodeAssets) return;
-                if(nCount == 0) lastMasternodeList = GetTime();
                 sumMasternodeList += nCount;
                 countMasternodeList++;
                 break;
             case(MASTERNODE_SYNC_MNW):
                 if(nItemID != RequestedMasternodeAssets) return;
-                if(nCount == 0) lastMasternodeWinner = GetTime();
                 sumMasternodeWinner += nCount;
                 countMasternodeWinner++;
                 break;
             case(MASTERNODE_SYNC_BUDGET_PROP):
                 if(RequestedMasternodeAssets != MASTERNODE_SYNC_BUDGET) return;
-                if(nCount == 0) lastBudgetItem = GetTime();
                 sumBudgetItemProp += nCount;
                 countBudgetItemProp++;
                 break;
             case(MASTERNODE_SYNC_BUDGET_FIN):
                 if(RequestedMasternodeAssets != MASTERNODE_SYNC_BUDGET) return;
-                if(nCount == 0) lastBudgetItem = GetTime();
                 sumBudgetItemFin += nCount;
                 countBudgetItemFin++;
                 break;
diff --git a/src/masternode-sync.h b/src/masternode-sync.h
index f8f8205f226e..b3d6486de8c1 100644
--- a/src/masternode-sync.h
+++ b/src/masternode-sync.h
@@ -27,6 +27,10 @@ extern CMasternodeSync masternodeSync;
 class CMasternodeSync
 {
 public:
+    std::map<uint256, int> mapSeenSyncMNB;
+    std::map<uint256, int> mapSeenSyncMNW;
+    std::map<uint256, int> mapSeenSyncBudget;
+
     int64_t lastMasternodeList;
     int64_t lastMasternodeWinner;
     int64_t lastBudgetItem;
@@ -50,9 +54,9 @@ class CMasternodeSync
 
     CMasternodeSync();
 
-    void AddedMasternodeList();
-    void AddedMasternodeWinner();
-    void AddedBudgetItem();
+    void AddedMasternodeList(uint256 hash);
+    void AddedMasternodeWinner(uint256 hash);
+    void AddedBudgetItem(uint256 hash);
     void GetNextAsset();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
     bool IsBudgetFinEmpty();
diff --git a/src/masternode.cpp b/src/masternode.cpp
index 8d6f282ec56b..6c581e0f7fee 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -390,7 +390,7 @@ bool CMasternodeBroadcast::CheckAndUpdate(int& nDos)
         pmn->UpdateFromNewBroadcast((*this));
         pmn->Check();
         if(pmn->IsEnabled()) Relay();
-        masternodeSync.AddedMasternodeList();
+        masternodeSync.AddedMasternodeList(GetHash());
     }
 
     return true;
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 98755cbf763c..e6667dcefdb9 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -254,6 +254,7 @@ void CMasternodeMan::CheckAndRemove(bool forceExpiredRemoval)
             map<uint256, CMasternodeBroadcast>::iterator it3 = mapSeenMasternodeBroadcast.begin();
             while(it3 != mapSeenMasternodeBroadcast.end()){
                 if((*it3).second.vin == (*it).vin){
+                    masternodeSync.mapSeenSyncMNB.erase((*it3).first);
                     mapSeenMasternodeBroadcast.erase(it3++);
                 } else {
                     ++it3;
@@ -644,7 +645,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> mnb;
 
         if(mnodeman.mapSeenMasternodeBroadcast.count(mnb.GetHash())) { //seen
-            masternodeSync.AddedMasternodeList();
+            masternodeSync.AddedMasternodeList(mnb.GetHash());
             return;
         }
         mnodeman.mapSeenMasternodeBroadcast.insert(make_pair(mnb.GetHash(), mnb));
@@ -672,7 +673,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(mnb.CheckInputsAndAdd(nDoS)) {
             // use this as a peer
             addrman.Add(CAddress(mnb.addr), pfrom->addr, 2*60*60);
-            masternodeSync.AddedMasternodeList();
+            masternodeSync.AddedMasternodeList(mnb.GetHash());
         } else {
             LogPrintf("mnb - Rejected Masternode entry %s\n", mnb.addr.ToString());
 

From 903970d0cf5a47dba9c9cef2f5a058844f3d5e7c Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 05:10:47 +0300
Subject: [PATCH 1776/1819] clear mapSeenSync... on Reset

---
 src/masternode-sync.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/masternode-sync.cpp b/src/masternode-sync.cpp
index 83e01a157872..b53991bcff93 100644
--- a/src/masternode-sync.cpp
+++ b/src/masternode-sync.cpp
@@ -61,6 +61,9 @@ void CMasternodeSync::Reset()
     lastMasternodeList = 0;
     lastMasternodeWinner = 0;
     lastBudgetItem = 0;
+    mapSeenSyncMNB.clear();
+    mapSeenSyncMNW.clear();
+    mapSeenSyncBudget.clear();
     lastFailure = 0;
     nCountFailures = 0;
     sumMasternodeList = 0;

From 801e597d64f67c12d1b5c847bf88d49193127e09 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 5 Aug 2015 07:24:58 -0700
Subject: [PATCH 1777/1819] added mnsync command

---
 src/rpcmisc.cpp   | 41 +++++++++++++++++++++++++++++++++++++++++
 src/rpcserver.cpp |  1 +
 src/rpcserver.h   |  1 +
 3 files changed, 43 insertions(+)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index d7b4427460aa..bafdb05f1414 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -14,6 +14,7 @@
 #include "timedata.h"
 #include "util.h"
 #include "spork.h"
+#include "masternode-sync.h"
 #ifdef ENABLE_WALLET
 #include "wallet.h"
 #include "walletdb.h"
@@ -108,6 +109,46 @@ Value getinfo(const Array& params, bool fHelp)
     return obj;
 }
 
+Value mnsync(const Array& params, bool fHelp)
+{
+    if (fHelp || params.size() != 1)
+        throw runtime_error(
+            "mnsync [status|reset]\n"
+            "Returns the sync status or resets sync.\n"
+        );
+
+    std::string strMode = params[0].get_str();
+
+    if(strMode == "status") {
+        Object obj;
+        obj.push_back(Pair("lastMasternodeList", masternodeSync.lastMasternodeList));
+        obj.push_back(Pair("lastMasternodeWinner", masternodeSync.lastMasternodeWinner));
+        obj.push_back(Pair("lastBudgetItem", masternodeSync.lastBudgetItem));
+        obj.push_back(Pair("lastFailure", masternodeSync.lastFailure));
+        obj.push_back(Pair("nCountFailures", masternodeSync.nCountFailures));
+        obj.push_back(Pair("sumMasternodeList", masternodeSync.sumMasternodeList));
+        obj.push_back(Pair("sumMasternodeWinner", masternodeSync.sumMasternodeWinner));
+        obj.push_back(Pair("sumBudgetItemProp", masternodeSync.sumBudgetItemProp));
+        obj.push_back(Pair("sumBudgetItemFin", masternodeSync.sumBudgetItemFin));
+        obj.push_back(Pair("countMasternodeList", masternodeSync.countMasternodeList));
+        obj.push_back(Pair("countMasternodeWinner", masternodeSync.countMasternodeWinner));
+        obj.push_back(Pair("countBudgetItemProp", masternodeSync.countBudgetItemProp));
+        obj.push_back(Pair("countBudgetItemFin", masternodeSync.countBudgetItemFin));
+        obj.push_back(Pair("RequestedMasternodeAssets", masternodeSync.RequestedMasternodeAssets));
+        obj.push_back(Pair("RequestedMasternodeAttempt", masternodeSync.RequestedMasternodeAttempt));
+
+
+        return obj;
+    }
+
+    if(strMode == "reset")
+    {
+        masternodeSync.Reset();
+        return "success";
+    }
+    return "failure";
+}
+
 #ifdef ENABLE_WALLET
 class DescribeAddressVisitor : public boost::static_visitor<Object>
 {
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 1602a8df8e74..d74fe109d5ab 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -309,6 +309,7 @@ static const CRPCCommand vRPCCommands[] =
     { "hidden",             "setmocktime",            &setmocktime,            true,      false,      false },
 
     /* Dash features */
+    { "dash",               "mnsync",                 &mnsync,                 true,      false,      false },
     { "dash",               "spork",                  &spork,                  true,      false,      false },
     { "dash",               "masternode",             &masternode,             true,      false,      true  },
     { "dash",               "mnbudget",               &mnbudget,               true,      false,      false },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index 9182b63c1217..e2dddb4bb982 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -233,6 +233,7 @@ extern json_spirit::Value masternode(const json_spirit::Array& params, bool fHel
 extern json_spirit::Value masternodelist(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value mnbudget(const json_spirit::Array& params, bool fHelp);
 extern json_spirit::Value mnfinalbudget(const json_spirit::Array& params, bool fHelp);
+extern json_spirit::Value mnsync(const json_spirit::Array& params, bool fHelp);
 
 // in rest.cpp
 extern bool HTTPReq_REST(AcceptedConnection *conn,

From 8bd8a897d0d0c92fe25881ec2bf119bac3593330 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 5 Aug 2015 07:28:10 -0700
Subject: [PATCH 1778/1819] IsBlockchainSynced in mnsync

---
 src/rpcmisc.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/rpcmisc.cpp b/src/rpcmisc.cpp
index bafdb05f1414..5aa41de1f33e 100644
--- a/src/rpcmisc.cpp
+++ b/src/rpcmisc.cpp
@@ -121,6 +121,8 @@ Value mnsync(const Array& params, bool fHelp)
 
     if(strMode == "status") {
         Object obj;
+
+        obj.push_back(Pair("IsBlockchainSynced", masternodeSync.IsBlockchainSynced()));
         obj.push_back(Pair("lastMasternodeList", masternodeSync.lastMasternodeList));
         obj.push_back(Pair("lastMasternodeWinner", masternodeSync.lastMasternodeWinner));
         obj.push_back(Pair("lastBudgetItem", masternodeSync.lastBudgetItem));

From 54ac44e60b95f58da3cf226f389b6b10e8f3f44e Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 22:39:43 +0300
Subject: [PATCH 1779/1819] relay dstx to everyone

---
 src/darksend.cpp | 2 +-
 src/main.cpp     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index c4f9aee4fc25..4de39041c16a 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -619,7 +619,7 @@ void CDarksendPool::CheckFinalTransaction()
         }
 
         CInv inv(MSG_DSTX, txNew.GetHash());
-        RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
+        RelayInv(inv);
 
         // Tell the clients it was successful
         RelayCompletedTransaction(sessionID, false, MSG_SUCCESS);
diff --git a/src/main.cpp b/src/main.cpp
index 1adc5be4f826..bd95eacd750c 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4812,7 +4812,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
 
         if(strCommand == "dstx"){
             CInv inv(MSG_DSTX, tx.GetHash());
-            RelayInv(inv, MIN_POOL_PEER_PROTO_VERSION);
+            RelayInv(inv);
         }
 
         int nDoS = 0;

From 9a9e7b7644ee0c73c06b6dc1c6a1cfb9b36c43a5 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Wed, 5 Aug 2015 06:02:54 +0300
Subject: [PATCH 1780/1819] strings/translation source fixes

---
 src/activemasternode.cpp |  2 +-
 src/darksend.cpp         |  2 +-
 src/init.cpp             |  6 ++---
 src/qt/clientmodel.cpp   |  6 ++---
 src/qt/dashstrings.cpp   |  7 +++---
 src/qt/locale/dash_en.ts | 54 ++++++++++++++++++++++++----------------
 6 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 631294952a52..36b8568e17f0 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -42,7 +42,7 @@ void CActiveMasternode::ManageStatus()
 
         if(strMasterNodeAddr.empty()) {
             if(!GetLocal(service)) {
-                notCapableReason = "Can't detect external address. Please use the Masternodeaddr configuration option.";
+                notCapableReason = "Can't detect external address. Please use the masternodeaddr configuration option.";
                 LogPrintf("CActiveMasternode::ManageStatus() - not capable: %s\n", notCapableReason);
                 return;
             }
diff --git a/src/darksend.cpp b/src/darksend.cpp
index 4de39041c16a..7a27faba0b92 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1824,7 +1824,7 @@ bool CDarksendPool::IsCompatibleWithSession(int64_t nDenom, CTransaction txColla
     LogPrintf("CDarksendPool::IsCompatibleWithSession - sessionDenom %d sessionUsers %d\n", sessionDenom, sessionUsers);
 
     if (!unitTest && !IsCollateralValid(txCollateral)){
-        LogPrint("darksend", "GetInputDarksendRoundsCDarksendPool::IsCompatibleWithSession - collateral not valid!\n");
+        LogPrint("darksend", "CDarksendPool::IsCompatibleWithSession - collateral not valid!\n");
         errorID = ERR_INVALID_COLLATERAL;
         return false;
     }
diff --git a/src/init.cpp b/src/init.cpp
index 54b9eb95f389..cc8262617554 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -407,15 +407,15 @@ std::string HelpMessage(HelpMessageMode mode)
     }
     strUsage += "  -shrinkdebugfile       " + _("Shrink debug.log file on client startup (default: 1 when no -debug)") + "\n";
     strUsage += "  -testnet               " + _("Use the test network") + "\n";
-    strUsage += "  -litemode=<n>          " + strprintf(_("Disable all Masternode and Darksend related functionality (0-1, default: %u)"), 0) + "\n";
+    strUsage += "  -litemode=<n>          " + strprintf(_("Disable all Dash specific functionality (Masernodes, Darksend, InstantX, Budgeting) (0-1, default: %u)"), 0) + "\n";
 
     strUsage += "\n" + _("Masternode options:") + "\n";
     strUsage += "  -masternode=<n>            " + strprintf(_("Enable the client to act as a masternode (0-1, default: %u)"), 0) + "\n";
     strUsage += "  -mnconf=<file>             " + strprintf(_("Specify masternode configuration file (default: %s)"), "masternode.conf") + "\n";
     strUsage += "  -mnconflock=<n>            " + strprintf(_("Lock masternodes from masternode configuration file (default: %u)"), 1) + "\n";
     strUsage += "  -masternodeprivkey=<n>     " + _("Set the masternode private key") + "\n";
-    strUsage += "  -masternodeaddr=<n>        " + _("Set external address:port to get to this masternode (example: address:port)") + "\n";
-    strUsage += "  -budgetvotemode=<mode>    " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
+    strUsage += "  -masternodeaddr=<n>        " + strprintf(_("Set external address:port to get to this masternode (example: %s)"), "128.127.106.235:9999") + "\n";
+    strUsage += "  -budgetvotemode=<mode>     " + _("Change automatic finalized budget voting behavior. mode=auto: Vote for only exact finalized budget match to my generated budget. (string, default: auto)") + "\n";
 
     strUsage += "\n" + _("Darksend options:") + "\n";
     strUsage += "  -enabledarksend=<n>          " + strprintf(_("Enable use of automated darksend for funds stored in this wallet (0-1, default: %u)"), 0) + "\n";
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 53174fdadac9..e335f2953ce4 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -69,9 +69,9 @@ int ClientModel::getNumConnections(unsigned int flags) const
 
 QString ClientModel::getMasternodeCountString() const
 {
-    return "Total: " + QString::number((int)mnodeman.size()) +
-            " (DS compatible: " + QString::number((int)mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)) +
-            " / Enabled: " + QString::number((int)mnodeman.CountEnabled()) + ")";
+    return tr("Total: %1 (DS compatible: %2 / Enabled: %3)").arg(QString::number((int)mnodeman.size()))
+            .arg(QString::number((int)mnodeman.CountEnabled(MIN_POOL_PEER_PROTO_VERSION)))
+            .arg(QString::number((int)mnodeman.CountEnabled()));
 }
 
 int ClientModel::getNumBlocks() const
diff --git a/src/qt/dashstrings.cpp b/src/qt/dashstrings.cpp
index 72794e44b8bd..43541956d8c1 100644
--- a/src/qt/dashstrings.cpp
+++ b/src/qt/dashstrings.cpp
@@ -48,7 +48,8 @@ QT_TRANSLATE_NOOP("dash-core", ""
 "Delete all wallet transactions and only recover those parts of the "
 "blockchain through -rescan on startup"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Disable all Masternode and Darksend related functionality (0-1, default: %u)"),
+"Disable all Dash specific functionality (Masernodes, Darksend, InstantX, "
+"Budgeting) (0-1, default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Distributed under the MIT software license, see the accompanying file "
 "COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
@@ -130,8 +131,6 @@ QT_TRANSLATE_NOOP("dash-core", ""
 QT_TRANSLATE_NOOP("dash-core", ""
 "Send trace/debug info to console instead of debug.log file (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", ""
-"Set external address:port to get to this masternode (example: address:port)"),
-QT_TRANSLATE_NOOP("dash-core", ""
 "Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", ""
 "Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
@@ -318,6 +317,7 @@ QT_TRANSLATE_NOOP("dash-core", "Loading masternode cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading masternode payment cache..."),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet... (%3.2f %%)"),
 QT_TRANSLATE_NOOP("dash-core", "Loading wallet..."),
+QT_TRANSLATE_NOOP("dash-core", "Lock is already in place."),
 QT_TRANSLATE_NOOP("dash-core", "Lock masternodes from masternode configuration file (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Maintain at most <n> connections to peers (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Masternode options:"),
@@ -363,6 +363,7 @@ QT_TRANSLATE_NOOP("dash-core", "Server private key (default: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Session not complete!"),
 QT_TRANSLATE_NOOP("dash-core", "Session timed out."),
 QT_TRANSLATE_NOOP("dash-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
+QT_TRANSLATE_NOOP("dash-core", "Set external address:port to get to this masternode (example: %s)"),
 QT_TRANSLATE_NOOP("dash-core", "Set key pool size to <n> (default: %u)"),
 QT_TRANSLATE_NOOP("dash-core", "Set maximum block size in bytes (default: %d)"),
 QT_TRANSLATE_NOOP("dash-core", "Set minimum block size in bytes (default: %u)"),
diff --git a/src/qt/locale/dash_en.ts b/src/qt/locale/dash_en.ts
index 91900a175505..0eba0fcb7ed9 100644
--- a/src/qt/locale/dash_en.ts
+++ b/src/qt/locale/dash_en.ts
@@ -763,7 +763,12 @@ Address: %4
 <context>
     <name>ClientModel</name>
     <message>
-        <location filename="../clientmodel.cpp" line="+173"/>
+        <location filename="../clientmodel.cpp" line="+72"/>
+        <source>Total: %1 (DS compatible: %2 / Enabled: %3)</source>
+        <translation>Total: %1 (DS compatible: %2 / Enabled: %3)</translation>
+    </message>
+    <message>
+        <location line="+101"/>
         <source>Network Alert</source>
         <translation>Network Alert</translation>
     </message>
@@ -2823,7 +2828,7 @@ https://www.transifex.com/projects/p/dash/</translation>
     <name>SendCoinsDialog</name>
     <message>
         <location filename="../forms/sendcoinsdialog.ui" line="+14"/>
-        <location filename="../sendcoinsdialog.cpp" line="+633"/>
+        <location filename="../sendcoinsdialog.cpp" line="+635"/>
         <location line="+12"/>
         <source>Send Coins</source>
         <translation>Send Coins</translation>
@@ -3045,7 +3050,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Balance:</translation>
     </message>
     <message>
-        <location filename="../sendcoinsdialog.cpp" line="-562"/>
+        <location filename="../sendcoinsdialog.cpp" line="-564"/>
         <source>Copy quantity</source>
         <translation>Copy quantity</translation>
     </message>
@@ -3131,7 +3136,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>are added as transaction fee</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+19"/>
         <source>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</source>
         <translation>Total Amount = &lt;b&gt;%1&lt;/b&gt;&lt;br /&gt;= %2</translation>
     </message>
@@ -4290,7 +4295,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Darksend uses exact denominated amounts to send funds, you might simply need to anonymize some more coins.</translation>
     </message>
     <message>
-        <location line="+17"/>
+        <location line="+18"/>
         <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
         <translation>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</translation>
     </message>
@@ -4336,11 +4341,6 @@ https://www.transifex.com/projects/p/dash/</translation>
     </message>
     <message>
         <location line="+7"/>
-        <source>Set external address:port to get to this masternode (example: address:port)</source>
-        <translation>Set external address:port to get to this masternode (example: address:port)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
         <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
         <translation>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</translation>
     </message>
@@ -4605,7 +4605,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>If &lt;category&gt; is not supplied, output all debugging information.</translation>
     </message>
     <message>
-        <location line="-268"/>
+        <location line="-267"/>
         <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
         <translation>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</translation>
     </message>
@@ -4650,12 +4650,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</translation>
     </message>
     <message>
-        <location line="+3"/>
-        <source>Disable all Masternode and Darksend related functionality (0-1, default: %u)</source>
-        <translation>Disable all Masternode and Darksend related functionality (0-1, default: %u)</translation>
-    </message>
-    <message>
-        <location line="+2"/>
+        <location line="+6"/>
         <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
         <translation>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
     </message>
@@ -4755,7 +4750,7 @@ https://www.transifex.com/projects/p/dash/</translation>
         <translation>Send trace/debug info to console instead of debug.log file (default: %u)</translation>
     </message>
     <message>
-        <location line="+9"/>
+        <location line="+7"/>
         <source>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</source>
         <translation>Set the number of threads for coin generation if enabled (-1 = all cores, default: %d)</translation>
     </message>
@@ -5078,6 +5073,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+8"/>
+        <source>Lock is already in place.</source>
+        <translation>Lock is already in place.</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Lock masternodes from masternode configuration file (default: %u)</source>
         <translation>Lock masternodes from masternode configuration file (default: %u)</translation>
     </message>
@@ -5168,6 +5168,11 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
     </message>
     <message>
         <location line="+4"/>
+        <source>Set external address:port to get to this masternode (example: %s)</source>
+        <translation>Set external address:port to get to this masternode (example: %s)</translation>
+    </message>
+    <message>
+        <location line="+1"/>
         <source>Set key pool size to &lt;n&gt; (default: %u)</source>
         <translation>Set key pool size to &lt;n&gt; (default: %u)</translation>
     </message>
@@ -5282,12 +5287,17 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Will retry...</translation>
     </message>
     <message>
-        <location line="-127"/>
+        <location line="-129"/>
         <source>Invalid masternodeprivkey. Please see documenation.</source>
         <translation>Invalid masternodeprivkey. Please see documenation.</translation>
     </message>
     <message>
-        <location line="-88"/>
+        <location line="-248"/>
+        <source>Disable all Dash specific functionality (Masernodes, Darksend, InstantX, Budgeting) (0-1, default: %u)</source>
+        <translation>Disable all Dash specific functionality (Masernodes, Darksend, InstantX, Budgeting) (0-1, default: %u)</translation>
+    </message>
+    <message>
+        <location line="+160"/>
         <source>(must be 9999 for mainnet)</source>
         <translation>(must be 9999 for mainnet)</translation>
     </message>
@@ -5392,7 +5402,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Loading wallet...</translation>
     </message>
     <message>
-        <location line="+3"/>
+        <location line="+4"/>
         <source>Masternode options:</source>
         <translation>Masternode options:</translation>
     </message>
@@ -5527,7 +5537,7 @@ for example: alertnotify=echo %%s | mail -s &quot;Dash Alert&quot; admin@foo.com
         <translation>Set database cache size in megabytes (%d to %d, default: %d)</translation>
     </message>
     <message>
-        <location line="+2"/>
+        <location line="+3"/>
         <source>Set maximum block size in bytes (default: %d)</source>
         <translation>Set maximum block size in bytes (default: %d)</translation>
     </message>

From 50c7b96c69b04e8ddbc0bb58aa165a3f554da9d3 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 5 Aug 2015 14:33:51 -0700
Subject: [PATCH 1781/1819] Try lock in ProcessGetData

---
 src/main.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main.cpp b/src/main.cpp
index e15bd9fbbe11..413a396c2934 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4036,7 +4036,9 @@ void static ProcessGetData(CNode* pfrom)
 
     vector<CInv> vNotFound;
 
-    LOCK(cs_main);
+    //if we can't lock cs_main, return and do this later
+    TRY_LOCK(cs_main, fCsMainLock);
+    if(!fCsMainLock) return;
 
     while (it != pfrom->vRecvGetData.end()) {
         // Don't bother if send buffer is too full to respond anyway

From a47585ea33ad35462702de1a325e6f8896119911 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Wed, 5 Aug 2015 16:37:43 -0700
Subject: [PATCH 1782/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index f989de32eb12..697eccda2524 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 37)
+define(_CLIENT_VERSION_BUILD, 38)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 404797f0bf75..23bd6740e698 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 37
+#define CLIENT_VERSION_BUILD 38
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From d251dc6599d1ec57d33d3b203ee06821b4cdd6d1 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 6 Aug 2015 11:12:35 -0700
Subject: [PATCH 1783/1819] Keep track of immature budgets/proposals

---
 src/main.cpp                 |  4 +-
 src/masternode-budget.cpp    | 93 ++++++++++++++++++++++++++++++++----
 src/masternode-budget.h      | 51 +++++++++++++++++++-
 src/rpcmasternode-budget.cpp | 11 +++--
 4 files changed, 140 insertions(+), 19 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 413a396c2934..e15bd9fbbe11 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -4036,9 +4036,7 @@ void static ProcessGetData(CNode* pfrom)
 
     vector<CInv> vNotFound;
 
-    //if we can't lock cs_main, return and do this later
-    TRY_LOCK(cs_main, fCsMainLock);
-    if(!fCsMainLock) return;
+    LOCK(cs_main);
 
     while (it != pfrom->vRecvGetData.end()) {
         // Don't bother if send buffer is too full to respond anyway
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index a6370a364e8c..974f1aa925c5 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -19,6 +19,8 @@ CBudgetManager budget;
 CCriticalSection cs_budget;
 
 std::map<uint256, int64_t> askedForSourceProposalOrBudget;
+std::vector<CBudgetProposalBroadcast> vecImmatureBudgetProposals;
+std::vector<CFinalizedBudgetBroadcast> vecImmatureFinalizedBudgets;
 
 int nSubmittedFinalBudget;
 
@@ -30,7 +32,7 @@ int GetBudgetPaymentCycleBlocks(){
     return 50;
 }
 
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime)
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime, int& nConf)
 {
     CTransaction txCollateral;
     uint256 nBlockHash;
@@ -74,6 +76,8 @@ bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, s
         }
     }
 
+    nConf = conf;
+
     //if we're syncing we won't have instantX information, so accept 1 confirmation 
     if(conf >= BUDGET_FEE_CONFIRMATIONS){
         return true;
@@ -799,6 +803,54 @@ void CBudgetManager::NewBlock()
         (*it3).second.CleanAndRemove(false);
         ++it3;
     }
+
+    std::vector<CBudgetProposalBroadcast>::iterator it4 = vecImmatureBudgetProposals.begin();
+    while(it4 != vecImmatureBudgetProposals.end())
+    {
+        std::string strError = "";
+        int nConf = 0;
+        if(!IsBudgetCollateralValid((*it4).nFeeTXHash, (*it4).GetHash(), strError, (*it4).nTime, nConf)){
+            ++it4;
+            continue;
+        }
+
+        if(!(*it4).IsValid(strError)) {
+            LogPrintf("mprop (immature) - invalid budget proposal - %s\n", strError);
+            it4 = vecImmatureBudgetProposals.erase(it4); 
+            continue;
+        }
+
+        CBudgetProposal budgetProposal((*it4));
+        if(AddProposal(budgetProposal)) {(*it4).Relay();}
+
+        LogPrintf("mprop (immature) - new budget - %s\n", (*it4).GetHash().ToString());
+        it4 = vecImmatureBudgetProposals.erase(it4); 
+    }
+
+    std::vector<CFinalizedBudgetBroadcast>::iterator it5 = vecImmatureFinalizedBudgets.begin();
+    while(it5 != vecImmatureFinalizedBudgets.end())
+    {
+        std::string strError = "";
+        int nConf = 0;
+        if(!IsBudgetCollateralValid((*it5).nFeeTXHash, (*it5).GetHash(), strError, (*it5).nTime, nConf)){
+            ++it5;
+            continue;
+        }
+
+        if(!(*it5).IsValid(strError)) {
+            LogPrintf("fbs (immature) - invalid finalized budget - %s\n", strError);
+            it5 = vecImmatureFinalizedBudgets.erase(it5); 
+            continue;
+        }
+
+        LogPrintf("fbs (immature) - new finalized budget - %s\n", (*it5).GetHash().ToString());
+
+        CFinalizedBudget finalizedBudget((*it5));
+        if(AddFinalizedBudget(finalizedBudget)) {(*it5).Relay();}
+
+        it5 = vecImmatureFinalizedBudgets.erase(it5); 
+    }
+
 }
 
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
@@ -813,12 +865,14 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         vRecv >> nProp;
 
         if(Params().NetworkID() == CBaseChainParams::MAIN){
-            if(pfrom->HasFulfilledRequest("mnvs")) {
-                LogPrintf("mnvs - peer already asked me for the list\n");
-                Misbehaving(pfrom->GetId(), 20);
-                return;
+            if(nProp == 0) {
+                if(pfrom->HasFulfilledRequest("mnvs")) {
+                    LogPrintf("mnvs - peer already asked me for the list\n");
+                    Misbehaving(pfrom->GetId(), 20);
+                    return;
+                }
+                pfrom->FulfilledRequest("mnvs");
             }
-            pfrom->FulfilledRequest("mnvs");
         }
 
         Sync(pfrom, nProp);
@@ -835,8 +889,10 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime)){
+        int nConf = 0;
+        if(!IsBudgetCollateralValid(budgetProposalBroadcast.nFeeTXHash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime, nConf)){
             LogPrintf("Proposal FeeTX is not valid - %s - %s\n", budgetProposalBroadcast.nFeeTXHash.ToString(), strError);
+            if(nConf >= 1) vecImmatureBudgetProposals.push_back(budgetProposalBroadcast);
             return;
         }
 
@@ -900,8 +956,11 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         }
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, finalizedBudgetBroadcast.GetHash(), strError, finalizedBudgetBroadcast.nTime)){
+        int nConf = 0;
+        if(!IsBudgetCollateralValid(finalizedBudgetBroadcast.nFeeTXHash, finalizedBudgetBroadcast.GetHash(), strError, finalizedBudgetBroadcast.nTime, nConf)){
             LogPrintf("Finalized Budget FeeTX is not valid - %s - %s\n", finalizedBudgetBroadcast.nFeeTXHash.ToString(), strError);
+
+            if(nConf >= 1) vecImmatureFinalizedBudgets.push_back(finalizedBudgetBroadcast);
             return;
         }
 
@@ -1133,7 +1192,8 @@ bool CBudgetProposal::IsValid(std::string& strError, bool fCheckCollateral)
     }
 
     if(fCheckCollateral){
-        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError, nTime)){
+        int nConf = 0;
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError, nTime, nConf)){
             return false;
         }
     }
@@ -1339,6 +1399,18 @@ CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposal& other)
     nTime = other.nTime;
 }
 
+CBudgetProposalBroadcast::CBudgetProposalBroadcast(const CBudgetProposalBroadcast& other)
+{
+    strProposalName = other.strProposalName;
+    strURL = other.strURL;
+    nBlockStart = other.nBlockStart;
+    nBlockEnd = other.nBlockEnd;
+    address = other.address;
+    nAmount = other.nAmount;
+    nFeeTXHash = other.nFeeTXHash;
+    nTime = other.nTime;
+}
+
 CBudgetProposalBroadcast::CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn)
 {
     strProposalName = strProposalNameIn;
@@ -1639,7 +1711,8 @@ bool CFinalizedBudget::IsValid(std::string& strError, bool fCheckCollateral)
 
     std::string strError2 = "";
     if(fCheckCollateral){
-        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError2, nTime)){
+        int nConf = 0;
+        if(!IsBudgetCollateralValid(nFeeTXHash, GetHash(), strError2, nTime, nConf)){
             {strError = "Invalid Collateral : " + strError2; return false;}
         }
     }
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index afb50cfca955..db5411ec92c2 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -36,6 +36,9 @@ static const CAmount BUDGET_FEE_TX = (0.5*COIN);
 static const int64_t BUDGET_FEE_CONFIRMATIONS = 6;
 static const int64_t BUDGET_VOTE_UPDATE_MIN = 60*60;
 
+extern std::vector<CBudgetProposalBroadcast> vecImmatureBudgetProposals;
+extern std::vector<CFinalizedBudgetBroadcast> vecImmatureFinalizedBudgets;
+
 extern CBudgetManager budget;
 void DumpBudgets();
 
@@ -43,7 +46,7 @@ void DumpBudgets();
 int GetBudgetPaymentCycleBlocks();
 
 //Check the collateral transaction for the budget proposal/finalized budget
-bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime);
+bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime, int& nConf);
 
 /** Save Budget Manager (budget.dat)
  */
@@ -293,6 +296,27 @@ class CFinalizedBudgetBroadcast : public CFinalizedBudget
     CFinalizedBudgetBroadcast(const CFinalizedBudget& other);
     CFinalizedBudgetBroadcast(std::string strBudgetNameIn, int nBlockStartIn, std::vector<CTxBudgetPayment> vecBudgetPaymentsIn, uint256 nFeeTXHashIn);
 
+    void swap(CFinalizedBudgetBroadcast& first, CFinalizedBudgetBroadcast& second) // nothrow
+    {
+        // enable ADL (not necessary in our case, but good practice)
+        using std::swap;
+
+        // by swapping the members of two classes,
+        // the two classes are effectively swapped
+        swap(first.strBudgetName, second.strBudgetName);
+        swap(first.nBlockStart, second.nBlockStart);
+        first.mapVotes.swap(second.mapVotes);
+        first.vecBudgetPayments.swap(second.vecBudgetPayments);
+        swap(first.nFeeTXHash, second.nFeeTXHash);
+        swap(first.nTime, second.nTime);
+    }
+
+    CFinalizedBudgetBroadcast& operator=(CFinalizedBudgetBroadcast from)
+    {
+        swap(*this, from);
+        return *this;
+    }
+
     void Relay();
 
     ADD_SERIALIZE_METHODS;
@@ -459,8 +483,33 @@ class CBudgetProposalBroadcast : public CBudgetProposal
 public:
     CBudgetProposalBroadcast();
     CBudgetProposalBroadcast(const CBudgetProposal& other);
+    CBudgetProposalBroadcast(const CBudgetProposalBroadcast& other);
     CBudgetProposalBroadcast(std::string strProposalNameIn, std::string strURLIn, int nPaymentCount, CScript addressIn, CAmount nAmountIn, int nBlockStartIn, uint256 nFeeTXHashIn);
 
+    void swap(CBudgetProposalBroadcast& first, CBudgetProposalBroadcast& second) // nothrow
+    {
+        // enable ADL (not necessary in our case, but good practice)
+        using std::swap;
+
+        // by swapping the members of two classes,
+        // the two classes are effectively swapped
+        swap(first.strProposalName, second.strProposalName);
+        swap(first.nBlockStart, second.nBlockStart);
+        swap(first.strURL, second.strURL);
+        swap(first.nBlockEnd, second.nBlockEnd);
+        swap(first.nAmount, second.nAmount);
+        swap(first.address, second.address);
+        swap(first.nTime, second.nTime);
+        swap(first.nFeeTXHash, second.nFeeTXHash);        
+        first.mapVotes.swap(second.mapVotes);
+    }
+
+    CBudgetProposalBroadcast& operator=(CBudgetProposalBroadcast from)
+    {
+        swap(*this, from);
+        return *this;
+    }
+
     void Relay();
 
     ADD_SERIALIZE_METHODS;
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index c0963f648c23..ccd616d42464 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -174,17 +174,18 @@ Value mnbudget(const Array& params, bool fHelp)
         CBudgetProposalBroadcast budgetProposalBroadcast(strProposalName, strURL, nPaymentCount, scriptPubKey, nAmount, nBlockStart, hash);
 
         std::string strError = "";
-        if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime)){
-            return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
+        int nConf = 0;
+        if(!IsBudgetCollateralValid(hash, budgetProposalBroadcast.GetHash(), strError, budgetProposalBroadcast.nTime, nConf)){
+            //return "Proposal FeeTX is not valid - " + hash.ToString() + " - " + strError;
         }
 
         if(!masternodeSync.IsSynced()){
             return "Must wait for client to sync with masternode network. Try again in a minute or so.";            
         }
 
-        if(!budgetProposalBroadcast.IsValid(strError)){
-            return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
-        }
+        // if(!budgetProposalBroadcast.IsValid(strError)){
+        //     return "Proposal is not valid - " + budgetProposalBroadcast.GetHash().ToString() + " - " + strError;
+        // }
 
         budget.mapSeenMasternodeBudgetProposals.insert(make_pair(budgetProposalBroadcast.GetHash(), budgetProposalBroadcast));
         budgetProposalBroadcast.Relay();

From fca0a6d4b89a0e702fdccb194ae2dced8681ec72 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 6 Aug 2015 14:48:03 -0700
Subject: [PATCH 1784/1819] client bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 697eccda2524..cfc78744fc7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 38)
+define(_CLIENT_VERSION_BUILD, 39)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 23bd6740e698..64c160623d90 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 38
+#define CLIENT_VERSION_BUILD 39
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From f94d9803c63d759e63aab06f675fffba8c2b2614 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Thu, 6 Aug 2015 16:09:22 -0700
Subject: [PATCH 1785/1819] Fixed --disablewallet crash

---
 src/init.cpp              | 2 +-
 src/masternode-budget.cpp | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index cc8262617554..d42cec89df7a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1499,7 +1499,7 @@ bool AppInit2(boost::thread_group& threadGroup)
     //get the mode of budget voting for this masternode
     strBudgetMode = GetArg("-budgetvotemode", "auto");
 
-    if(GetBoolArg("-mnconflock", true)) {
+    if(GetBoolArg("-mnconflock", true) && pwalletMain) {
         LOCK(pwalletMain->cs_wallet);
         LogPrintf("Locking Masternodes:\n");
         uint256 mnTxHash;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 974f1aa925c5..86d0171a50e1 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -149,6 +149,7 @@ void CBudgetManager::SubmitFinalBudget()
 
     //create fee tx
     CTransaction tx;
+    
     if(!mapCollateral.count(tempBudget.GetHash())){
         CWalletTx wtx;
         if(!pwalletMain->GetBudgetSystemCollateralTX(wtx, tempBudget.GetHash(), false)){

From f57c470f95dc7face20586dac039e99ed548d574 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 7 Aug 2015 06:07:40 +0300
Subject: [PATCH 1786/1819] ask for mn / lower ban score for mnw

---
 src/instantx.cpp            |  8 ++++---
 src/instantx.h              |  2 +-
 src/masternode-budget.cpp   |  6 +++++
 src/masternode-payments.cpp |  9 ++++---
 src/masternode-payments.h   |  2 +-
 src/masternodeman.cpp       | 47 ++++++++++++++++++++-----------------
 src/masternodeman.h         |  3 +++
 7 files changed, 48 insertions(+), 29 deletions(-)

diff --git a/src/instantx.cpp b/src/instantx.cpp
index 1f08fd07d9e5..a33d5887ef97 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -138,7 +138,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 
         mapTxLockVote.insert(make_pair(ctx.GetHash(), ctx));
 
-        if(ProcessConsensusVote(ctx)){
+        if(ProcessConsensusVote(pfrom, ctx)){
             //Spam/Dos protection
             /*
                 Masternodes will sometimes propagate votes before the transaction is known to the client.
@@ -297,7 +297,7 @@ void DoConsensusVote(CTransaction& tx, int64_t nBlockHeight)
 }
 
 //received a consensus vote
-bool ProcessConsensusVote(CConsensusVote& ctx)
+bool ProcessConsensusVote(CNode* pnode, CConsensusVote& ctx)
 {
     int n = mnodeman.GetMasternodeRank(ctx.vinMasternode, ctx.nBlockHeight, MIN_INSTANTX_PROTO_VERSION);
 
@@ -309,6 +309,7 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
     {
         //can be caused by past versions trying to vote with an invalid protocol
         LogPrint("instantx", "InstantX::ProcessConsensusVote - Unknown Masternode\n");
+        mnodeman.AskForMN(pnode, ctx.vinMasternode);
         return false;
     }
 
@@ -320,7 +321,8 @@ bool ProcessConsensusVote(CConsensusVote& ctx)
 
     if(!ctx.SignatureValid()) {
         LogPrintf("InstantX::ProcessConsensusVote - Signature invalid\n");
-        //don't ban, it could just be a non-synced masternode
+        // don't ban, it could just be a non-synced masternode
+        mnodeman.AskForMN(pnode, ctx.vinMasternode);
         return false;
     }
 
diff --git a/src/instantx.h b/src/instantx.h
index 6a76b7cca8b5..3e725f723fbd 100644
--- a/src/instantx.h
+++ b/src/instantx.h
@@ -55,7 +55,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 void DoConsensusVote(CTransaction& tx, int64_t nBlockHeight);
 
 //process consensus vote message
-bool ProcessConsensusVote(CConsensusVote& ctx);
+bool ProcessConsensusVote(CNode *pnode, CConsensusVote& ctx);
 
 // keep transaction locks in memory for an hour
 void CleanTransactionLocksList();
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 974f1aa925c5..5667eb56af36 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -926,6 +926,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
             LogPrint("mnbudget", "mvote - unknown masternode - vin: %s\n", vote.vin.ToString());
+            mnodeman.AskForMN(pfrom, vote.vin);
             return;
         }
 
@@ -934,6 +935,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(!vote.SignatureValid(true)){
             LogPrintf("mvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
+            // it could just be a non-synced masternode
+            mnodeman.AskForMN(pfrom, vote.vin);
             return;
         }
         
@@ -994,6 +997,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CMasternode* pmn = mnodeman.Find(vote.vin);
         if(pmn == NULL) {
             LogPrint("mnbudget", "fbvote - unknown masternode - vin: %s\n", vote.vin.ToString());
+            mnodeman.AskForMN(pfrom, vote.vin);
             return;
         }
 
@@ -1001,6 +1005,8 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(!vote.SignatureValid(true)){
             LogPrintf("fbvote - signature invalid\n");
             Misbehaving(pfrom->GetId(), 20);
+            // it could just be a non-synced masternode
+            mnodeman.AskForMN(pfrom, vote.vin);
             return;
         }
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 89c614d7d535..c0ec3a05c73d 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -376,7 +376,7 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
         }
 
         std::string strError = "";
-        if(!winner.IsValid(strError)){
+        if(!winner.IsValid(pfrom, strError)){
             LogPrintf("mnw - invalid message - %s\n", strError);
             return;
         }
@@ -388,7 +388,9 @@ void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::st
 
         if(!winner.SignatureValid()){
             LogPrintf("mnw - invalid signature\n");
-            Misbehaving(pfrom->GetId(), 100);
+            Misbehaving(pfrom->GetId(), 20);
+            // it could just be a non-synced masternode
+            mnodeman.AskForMN(pfrom, winner.vinMasternode);
             return;
         }
 
@@ -616,7 +618,7 @@ bool IsReferenceNode(CTxIn& vin)
     return false;
 }
 
-bool CMasternodePaymentWinner::IsValid(std::string& strError)
+bool CMasternodePaymentWinner::IsValid(CNode* pnode, std::string& strError)
 {
     if(IsReferenceNode(vinMasternode)) return true;
 
@@ -626,6 +628,7 @@ bool CMasternodePaymentWinner::IsValid(std::string& strError)
     {
         strError = strprintf("Unknown Masternode %s", vinMasternode.prevout.ToStringShort());
         LogPrintf ("CMasternodePaymentWinner::IsValid - %s\n", strError);
+        mnodeman.AskForMN(pnode, vinMasternode);
         return false;
     }
 
diff --git a/src/masternode-payments.h b/src/masternode-payments.h
index 21d937420d7c..e4783a5a81ee 100644
--- a/src/masternode-payments.h
+++ b/src/masternode-payments.h
@@ -183,7 +183,7 @@ class CMasternodePaymentWinner
     }
 
     bool Sign(CKey& keyMasternode, CPubKey& pubKeyMasternode);
-    bool IsValid(std::string& strError);
+    bool IsValid(CNode* pnode, std::string& strError);
     bool SignatureValid();
     void Relay();
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index e62bfb5bf33e..c04db5e61d80 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -224,6 +224,23 @@ bool CMasternodeMan::Add(CMasternode &mn)
     return false;
 }
 
+void CMasternodeMan::AskForMN(CNode* pnode, CTxIn &vin)
+{
+    std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(vin.prevout);
+    if (i != mWeAskedForMasternodeListEntry.end())
+    {
+        int64_t t = (*i).second;
+        if (GetTime() < t) return; // we've asked recently
+    }
+
+    // ask for the mnb info once from the node that sent mnp
+
+    LogPrintf("CMasternodeMan::AskForMN - Asking node for missing entry, vin: %s\n", vin.ToString());
+    pnode->PushMessage("dseg", vin);
+    int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
+    mWeAskedForMasternodeListEntry[vin.prevout] = askAgain;
+}
+
 void CMasternodeMan::Check()
 {
     LOCK(cs);
@@ -691,30 +708,18 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(mnp.CheckAndUpdate(nDoS)) return;
 
         if(nDoS > 0) {
-            // if anything significant failed, mark that node and return
+            // if anything significant failed, mark that node
             Misbehaving(pfrom->GetId(), nDoS);
-            return;
-        }
-
-        //search existing Masternode list, if it's known -- don't ask for the mnb
-        CMasternode* pmn = mnodeman.Find(mnp.vin);
-        if(pmn != NULL) return;
-
-        // we wasn't able to accept mnp but nothing significant happened,
-        // we might just have to ask for a masternode entry once
-        std::map<COutPoint, int64_t>::iterator i = mWeAskedForMasternodeListEntry.find(mnp.vin.prevout);
-        if (i != mWeAskedForMasternodeListEntry.end())
-        {
-            int64_t t = (*i).second;
-            if (GetTime() < t) return; // we've asked recently
+        } else {
+            // if nothing significant failed, search existing Masternode list
+            CMasternode* pmn = mnodeman.Find(mnp.vin);
+            // if it's known, don't ask for the mnb, just return
+            if(pmn != NULL) return;
         }
 
-        // ask for the mnb info once from the node that sent mnp
-
-        LogPrintf("mnp - Asking source node for missing entry, vin: %s\n", mnp.vin.ToString());
-        pfrom->PushMessage("dseg", mnp.vin);
-        int64_t askAgain = GetTime() + MASTERNODE_MIN_MNP_SECONDS;
-        mWeAskedForMasternodeListEntry[mnp.vin.prevout] = askAgain;
+        // something significant is broken or mn is unknown,
+        // we might have to ask for a masternode entry once
+        AskForMN(pfrom, mnp.vin);
 
     } else if (strCommand == "dseg") { //Get Masternode list or specific entry
 
diff --git a/src/masternodeman.h b/src/masternodeman.h
index 50a82f5371df..04b22cf92c9c 100644
--- a/src/masternodeman.h
+++ b/src/masternodeman.h
@@ -94,6 +94,9 @@ class CMasternodeMan
     /// Add an entry
     bool Add(CMasternode &mn);
 
+    /// Ask (source) node for mnb
+    void AskForMN(CNode *pnode, CTxIn &vin);
+
     /// Check all Masternodes
     void Check();
 

From 745142f6bf03a19ac8709cc34da1131c8ca92a2f Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 7 Aug 2015 06:19:10 +0300
Subject: [PATCH 1787/1819] DS progress weights depend on DS rounds in settings
 / force overview to update on OK in options

---
 src/qt/optionsdialog.cpp |  2 +-
 src/qt/overviewpage.cpp  | 20 ++++++++++++++------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 2758afa5b354..1d9877e9034a 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -251,7 +251,7 @@ void OptionsDialog::on_resetButton_clicked()
 void OptionsDialog::on_okButton_clicked()
 {
     mapper->submit();
-    darkSendPool.cachedNumBlocks = 0;
+    pwalletMain->MarkDirty();
     accept();
 }
 
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index e072705494da..688c5cb5d680 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -374,17 +374,25 @@ void OverviewPage::updateDarksendProgress()
     int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance;
     denomPart = (float)denominatedBalance / nMaxToAnonymize;
     denomPart = denomPart > 1 ? 1 : denomPart;
+    denomPart *= 100;
 
     anonNormPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
     anonNormPart = anonNormPart > 1 ? 1 : anonNormPart;
+    anonNormPart *= 100;
 
     anonFullPart = (float)pwalletMain->GetAnonymizedBalance() / nMaxToAnonymize;
     anonFullPart = anonFullPart > 1 ? 1 : anonFullPart;
-
-    // apply some weights to them (sum should be <=100) and calculate the whole progress
-    float denomPartCalc = ceilf((denomPart * 20) * 100) / 100;
-    float anonNormPartCalc = ceilf((anonNormPart * 50) * 100) / 100;
-    float anonFullPartCalc = ceilf((anonFullPart * 30) * 100) / 100;
+    anonFullPart *= 100;
+
+    // apply some weights to them ...
+    float denomWeight = 1;
+    float anonNormWeight = nDarksendRounds;
+    float anonFullWeight = 2;
+    float fullWeight = denomWeight + anonNormWeight + anonFullWeight;
+    // ... and calculate the whole progress
+    float denomPartCalc = ceilf((denomPart * denomWeight / fullWeight) * 100) / 100;
+    float anonNormPartCalc = ceilf((anonNormPart * anonNormWeight / fullWeight) * 100) / 100;
+    float anonFullPartCalc = ceilf((anonFullPart * anonFullWeight / fullWeight) * 100) / 100;
     float progress = denomPartCalc + anonNormPartCalc + anonFullPartCalc;
     if(progress >= 100) progress = 100;
 
@@ -395,7 +403,7 @@ void OverviewPage::updateDarksendProgress()
                           tr("Mixed") + ": %3%<br/>" +
                           tr("Anonymized") + ": %4%<br/>" +
                           tr("Denominated inputs have %5 of %n rounds on average", "", nDarksendRounds))
-            .arg(progress).arg(denomPart * 100).arg(anonNormPart * 100).arg(anonFullPart * 100)
+            .arg(progress).arg(denomPart).arg(anonNormPart).arg(anonFullPart)
             .arg(pwalletMain->GetAverageAnonymizedRounds());
     ui->darksendProgress->setToolTip(strToolPip);
 }

From 8063bcc8aad18ca1f08b2296c9ab54fb6dac9b57 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 7 Aug 2015 07:48:55 +0300
Subject: [PATCH 1788/1819] process DS,IX,MN,DGBB on IsBlockchainSynced, not on
 IBD

---
 src/darksend.cpp            | 2 +-
 src/instantx.cpp            | 2 +-
 src/masternode-budget.cpp   | 3 ++-
 src/masternode-payments.cpp | 2 +-
 src/masternodeman.cpp       | 2 +-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 264e74049265..c26b0d2c0841 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -44,7 +44,7 @@ CActiveMasternode activeMasternode;
 void CDarksendPool::ProcessMessageDarksend(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     if(fLiteMode) return; //disable all Darksend/Masternode related functionality
-    if(IsInitialBlockDownload()) return;
+    if(!masternodeSync.IsBlockchainSynced()) return;
 
     if (strCommand == "dsa") { //Darksend Accept Into Pool
 
diff --git a/src/instantx.cpp b/src/instantx.cpp
index 1f08fd07d9e5..8c4323bd4480 100644
--- a/src/instantx.cpp
+++ b/src/instantx.cpp
@@ -36,7 +36,7 @@ void ProcessMessageInstantX(CNode* pfrom, std::string& strCommand, CDataStream&
 {
     if(fLiteMode) return; //disable all darksend/masternode related functionality
     if(!IsSporkActive(SPORK_2_INSTANTX)) return;
-    if(IsInitialBlockDownload()) return;
+    if(!masternodeSync.IsBlockchainSynced()) return;
 
     if (strCommand == "ix")
     {
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 86d0171a50e1..44a945629e77 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -857,7 +857,8 @@ void CBudgetManager::NewBlock()
 void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
     // lite mode is not supported
-    if(IsInitialBlockDownload()) return;
+    if(fLiteMode) return;
+    if(!masternodeSync.IsBlockchainSynced()) return;
 
     LOCK(cs_budget);
 
diff --git a/src/masternode-payments.cpp b/src/masternode-payments.cpp
index 89c614d7d535..e54f53054315 100644
--- a/src/masternode-payments.cpp
+++ b/src/masternode-payments.cpp
@@ -336,7 +336,7 @@ int CMasternodePayments::GetMinMasternodePaymentsProto() {
 
 void CMasternodePayments::ProcessMessageMasternodePayments(CNode* pfrom, std::string& strCommand, CDataStream& vRecv)
 {
-    if(IsInitialBlockDownload()) return;
+    if(!masternodeSync.IsBlockchainSynced()) return;
 
     if (strCommand == "mnget") { //Masternode Payments Request Sync
         if(fLiteMode) return; //disable all Darksend/Masternode related functionality
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index e62bfb5bf33e..f633f19ac11a 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -632,7 +632,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 {
 
     if(fLiteMode) return; //disable all Darksend/Masternode related functionality
-    if(IsInitialBlockDownload()) return;
+    if(!masternodeSync.IsBlockchainSynced()) return;
 
     LOCK(cs_process_message);
 

From 73e6cc44496159a2960bd1fc04a701ddd499fdbb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 09:31:43 -0700
Subject: [PATCH 1789/1819] Compare string version of CScript instead

---
 src/masternode-budget.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 3c1b9c71c955..88c58133a3e4 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1611,7 +1611,8 @@ void CFinalizedBudget::AutoCheck()
                 return;
             }
 
-            if(vecBudgetPayments[i].payee != vBudgetProposals[i]->GetPayee()){
+            // if(vecBudgetPayments[i].payee != vBudgetProposals[i]->GetPayee()){ -- triggered with false positive 
+            if(vecBudgetPayments[i].payee.ToString() != vBudgetProposals[i]->GetPayee().ToString()){
                 LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecBudgetPayments[i].payee.ToString(), vBudgetProposals[i]->GetPayee().ToString());
                 return;
             }

From f28e12f23d9505fa51b30bf21d17891019c51deb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 09:54:02 -0700
Subject: [PATCH 1790/1819] more debugging for autocheck

---
 src/masternode-budget.cpp | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 88c58133a3e4..d358b85c86a8 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1576,19 +1576,39 @@ void CFinalizedBudget::AutoCheck()
 {
     LOCK(cs);
 
+    CBlockIndex* pindexPrev = chainActive.Tip();
+    if(!pindexPrev) return;
+
+    printf("CFinalizedBudget::AutoCheck - %lli\n", pindexPrev->nHeight);
+
     if(!fMasterNode || fAutoChecked) return;
 
     //do this 1 in 20 blocks -- spread out the voting activity on mainnet
     if(Params().NetworkID() == CBaseChainParams::MAIN && rand() % 20 != 0) {
+        printf("CFinalizedBudget::AutoCheck - waiting\n");
         return;
     }
 
     fAutoChecked = true; //we only need to check this once
 
+
     if(strBudgetMode == "auto") //only vote for exact matches
     {
         std::vector<CBudgetProposal*> vBudgetProposals = budget.GetBudget();
 
+
+        for(unsigned int i = 0; i < vecBudgetPayments.size(); i++){
+            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vecBudgetPayments[i].nProposalHash.ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vecBudgetPayments[i].payee.ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", i, vecBudgetPayments[i].nAmount);
+        }
+
+        for(unsigned int i = 0; i < vBudgetProposals.size(); i++){
+            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vBudgetProposals[i]->GetHash().ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vBudgetProposals[i]->GetPayee().ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", i, vBudgetProposals[i]->GetAmount());
+        }
+
         if(vBudgetProposals.size() == 0) {
             LogPrintf("CFinalizedBudget::AutoCheck - Can't get Budget, aborting\n");
             return;
@@ -1618,7 +1638,7 @@ void CFinalizedBudget::AutoCheck()
             }
 
             if(vecBudgetPayments[i].nAmount != vBudgetProposals[i]->GetAmount()){
-                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %s %s\n", i, vecBudgetPayments[i].payee.ToString(), vBudgetProposals[i]->GetPayee().ToString());
+                LogPrintf("CFinalizedBudget::AutoCheck - item #%d payee doesn't match %lli %lli\n", i, vecBudgetPayments[i].nAmount, vBudgetProposals[i]->GetAmount());
                 return;
             }
         }

From 572ebf4502e7005d8f1fac42274ac82709f84401 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 11:33:50 -0700
Subject: [PATCH 1791/1819] prinf -> logprintf

---
 src/masternode-budget.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index d358b85c86a8..108f95cba115 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1579,13 +1579,13 @@ void CFinalizedBudget::AutoCheck()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
-    printf("CFinalizedBudget::AutoCheck - %lli\n", pindexPrev->nHeight);
+    LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", pindexPrev->nHeight);
 
     if(!fMasterNode || fAutoChecked) return;
 
     //do this 1 in 20 blocks -- spread out the voting activity on mainnet
     if(Params().NetworkID() == CBaseChainParams::MAIN && rand() % 20 != 0) {
-        printf("CFinalizedBudget::AutoCheck - waiting\n");
+        LogPrintf("CFinalizedBudget::AutoCheck - waiting\n");
         return;
     }
 

From e0ecfbd00bce7a796d68e66c87e59a4b091f409b Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 13:00:27 -0700
Subject: [PATCH 1792/1819] allow logging for fbvote

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 108f95cba115..5268c18d51a8 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1018,7 +1018,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             masternodeSync.AddedBudgetItem(vote.GetHash());
         }
 
-        LogPrint("mnbudget", "fbs - new finalized budget vote - %s\n", vote.GetHash().ToString());
+        LogPrint("fbvote - new finalized budget vote - %s\n", vote.GetHash().ToString());
     }
 }
 

From 33d5b7e746b657454cecddfbe4c8592224f59bcb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 13:39:08 -0700
Subject: [PATCH 1793/1819] fix autocheck bug

---
 src/masternode-budget.cpp | 6 ++++--
 src/masternode-budget.h   | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 5268c18d51a8..f47fcd0353e9 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1018,7 +1018,7 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
             masternodeSync.AddedBudgetItem(vote.GetHash());
         }
 
-        LogPrint("fbvote - new finalized budget vote - %s\n", vote.GetHash().ToString());
+        LogPrintf("fbvote - new finalized budget vote - %s\n", vote.GetHash().ToString());
     }
 }
 
@@ -1520,6 +1520,7 @@ CFinalizedBudget::CFinalizedBudget()
     nFeeTXHash = 0;
     nTime = 0;
     fValid = true;
+    fAutoChecked = false;
 }
 
 CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
@@ -1531,6 +1532,7 @@ CFinalizedBudget::CFinalizedBudget(const CFinalizedBudget& other)
     nFeeTXHash = other.nFeeTXHash;
     nTime = other.nTime;
     fValid = true;
+    fAutoChecked = false;
 }
 
 bool CFinalizedBudget::AddOrUpdateVote(CFinalizedBudgetVote& vote, std::string& strError)
@@ -1579,7 +1581,7 @@ void CFinalizedBudget::AutoCheck()
     CBlockIndex* pindexPrev = chainActive.Tip();
     if(!pindexPrev) return;
 
-    LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", pindexPrev->nHeight);
+    LogPrintf("CFinalizedBudget::AutoCheck - %lli - %d\n", pindexPrev->nHeight, fAutoChecked);
 
     if(!fMasterNode || fAutoChecked) return;
 
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index db5411ec92c2..7c3cf7452046 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -280,6 +280,7 @@ class CFinalizedBudget
         READWRITE(nTime);
         READWRITE(nBlockStart);
         READWRITE(vecBudgetPayments);
+        READWRITE(fAutoChecked);
 
         READWRITE(mapVotes);
     }

From 528d2a562eb2b87943b86ee8c6a29ee5d7df5e37 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 14:45:08 -0700
Subject: [PATCH 1794/1819] fix log entries

---
 src/masternode-budget.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f47fcd0353e9..453107165e8b 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1600,15 +1600,15 @@ void CFinalizedBudget::AutoCheck()
 
 
         for(unsigned int i = 0; i < vecBudgetPayments.size(); i++){
-            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vecBudgetPayments[i].nProposalHash.ToString());
-            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vecBudgetPayments[i].payee.ToString());
-            LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", i, vecBudgetPayments[i].nAmount);
+            LogPrintf("CFinalizedBudget::AutoCheck - nProp %d %s\n", i, vecBudgetPayments[i].nProposalHash.ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - Payee %d %s\n", i, vecBudgetPayments[i].payee.ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - nAmount %d %lli\n", i, vecBudgetPayments[i].nAmount);
         }
 
         for(unsigned int i = 0; i < vBudgetProposals.size(); i++){
-            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vBudgetProposals[i]->GetHash().ToString());
-            LogPrintf("CFinalizedBudget::AutoCheck - %s\n", i, vBudgetProposals[i]->GetPayee().ToString());
-            LogPrintf("CFinalizedBudget::AutoCheck - %lli\n", i, vBudgetProposals[i]->GetAmount());
+            LogPrintf("CFinalizedBudget::AutoCheck - nProp %d %s\n", i, vBudgetProposals[i]->GetHash().ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - Payee %d %s\n", i, vBudgetProposals[i]->GetPayee().ToString());
+            LogPrintf("CFinalizedBudget::AutoCheck - nAmount %d %lli\n", i, vBudgetProposals[i]->GetAmount());
         }
 
         if(vBudgetProposals.size() == 0) {

From 03236899d1173c957f753adf4b4d95c4464ee3c9 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 15:47:23 -0700
Subject: [PATCH 1795/1819] add fbvote debugging / wallet lock

---
 src/activemasternode.cpp  | 4 +++-
 src/masternode-budget.cpp | 6 ++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 36b8568e17f0..2850f57a9549 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -344,7 +344,9 @@ vector<COutput> CActiveMasternode::SelectCoinsMasternode()
     vector<COutput> filteredCoins;
     vector<COutPoint> confLockedCoins;
 
-    LOCK(pwalletMain->cs_wallet);
+    TRY_LOCK(pwalletMain->cs_wallet, fWallet);
+    if(!fWallet) return filteredCoins; //if we can't get the lock, return nothing
+
     // Temporary unlock MN coins from masternode.conf
     if(GetBoolArg("-mnconflock", true)) {
         uint256 mnTxHash;
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 453107165e8b..3fb900681563 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1016,9 +1016,11 @@ void CBudgetManager::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(UpdateFinalizedBudget(vote, pfrom, strError)) {
             vote.Relay();
             masternodeSync.AddedBudgetItem(vote.GetHash());
-        }
 
-        LogPrintf("fbvote - new finalized budget vote - %s\n", vote.GetHash().ToString());
+            LogPrintf("fbvote - new finalized budget vote - %s\n", vote.GetHash().ToString());
+        } else {
+            LogPrintf("fbvote - rejected finalized budget vote - %s - %s\n", vote.GetHash().ToString(), strError);
+        }
     }
 }
 

From b8e7b84916540588397c6bb3a8f3b80973d0115d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Fri, 7 Aug 2015 16:53:07 -0700
Subject: [PATCH 1796/1819] extra debugging

---
 src/masternode-budget.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 3fb900681563..142c7a02151e 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -1810,6 +1810,8 @@ void CFinalizedBudget::SubmitVote()
 
     std::string strError = "";
     if(budget.UpdateFinalizedBudget(vote, NULL, strError)){
+        LogPrintf("CFinalizedBudget::SubmitVote  - new finalized budget vote - %s\n", vote.GetHash().ToString());
+
         budget.mapSeenFinalizedBudgetVotes.insert(make_pair(vote.GetHash(), vote));
         vote.Relay();
     } else {

From ec3848c5ddfb08bffc19b055003a01a68da03daf Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Fri, 7 Aug 2015 07:08:37 +0300
Subject: [PATCH 1797/1819] Locks fixes: - trylock for updateDarksendProgress,
 checkBalanceChanged, "block" - trylock+wait for UnlockCoins,
 SendDarksendDenominate, ProcessNewBlock, ActivateBestChain - move trylock in
 DoAutomaticDenominating lower

---
 src/darksend.cpp           | 33 +++++++++++++++++++--------------
 src/main.cpp               | 23 ++++++++++++-----------
 src/qt/overviewpage.cpp    | 34 ++++++++++++++++++++++++----------
 src/qt/sendcoinsdialog.cpp |  3 +++
 src/qt/walletmodel.cpp     |  3 +++
 5 files changed, 61 insertions(+), 35 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index c26b0d2c0841..38245ca7bb9f 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -432,9 +432,13 @@ bool CDarksendPool::SetCollateralAddress(std::string strAddress){
 // Unlock coins after Darksend fails or succeeds
 //
 void CDarksendPool::UnlockCoins(){
-    LOCK(pwalletMain->cs_wallet);
-    BOOST_FOREACH(CTxIn v, lockedCoins)
-        pwalletMain->UnlockCoin(v.prevout);
+    while(true) {
+        TRY_LOCK(pwalletMain->cs_wallet, lockWallet);
+        if(!lockWallet) {MilliSleep(10); continue;}
+        BOOST_FOREACH(CTxIn v, lockedCoins)
+                pwalletMain->UnlockCoin(v.prevout);
+        break;
+    }
 
     lockedCoins.clear();
 }
@@ -1155,14 +1159,16 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         LogPrintf("Submitting tx %s\n", tx.ToString());
 
-        {
-            LOCK(cs_main);
+        while(true){
+            TRY_LOCK(cs_main, lockMain);
+            if(!lockMain) { MilliSleep(10); continue;}
             if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
                 LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString());
                 UnlockCoins();
                 SetNull();
                 return;
             }
+            break;
         }
     }
 
@@ -1352,25 +1358,24 @@ void CDarksendPool::ClearLastMessage()
 //
 bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 {
+    if(!fEnableDarksend) return false;
+    if(fMasterNode) return false;
+    if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) return false;
+    if(GetEntriesCount() > 0) {
+        strAutoDenomResult = _("Mixing in progress...");
+        return false;
+    }
+
     TRY_LOCK(cs_darksend, lockDS);
     if(!lockDS) {
         strAutoDenomResult = _("Lock is already in place.");
         return false;
     }
 
-    LOCK(cs_darksend);
-
     if(!masternodeSync.IsBlockchainSynced()) {
         strAutoDenomResult = _("Can't mix while sync in progress.");
         return false;
     }
-    if(!fEnableDarksend) return false;
-    if(fMasterNode) return false;
-    if(state == POOL_STATUS_ERROR || state == POOL_STATUS_SUCCESS) return false;
-    if(GetEntriesCount() > 0) {
-        strAutoDenomResult = _("Mixing in progress...");
-        return false;
-    }
 
     if (!fDryRun && pwalletMain->IsLocked()){
         strAutoDenomResult = _("Wallet is locked.");
diff --git a/src/main.cpp b/src/main.cpp
index e15bd9fbbe11..76a5f8f9e868 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -2616,8 +2616,10 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
         boost::this_thread::interruption_point();
 
         bool fInitialDownload;
-        {
-            LOCK(cs_main);
+        while(true) {
+            TRY_LOCK(cs_main, lockMain);
+            if(!lockMain) { MilliSleep(10); continue; }
+
             pindexMostWork = FindMostWorkChain();
 
             // Whether we have anything to do at all.
@@ -2629,6 +2631,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
 
             pindexNewTip = chainActive.Tip();
             fInitialDownload = IsInitialBlockDownload();
+            break;
         }
         // When we reach this point, we switched to a new tip (stored in pindexNewTip).
 
@@ -3261,8 +3264,10 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
     // Preliminary checks
     bool checked = CheckBlock(*pblock, state);
 
-    {
-        LOCK(cs_main);
+    while(true) {
+        TRY_LOCK(cs_main, lockMain);
+        if(!lockMain) { MilliSleep(10); continue; }
+
         MarkBlockAsReceived(pblock->GetHash());
         if (!checked) {
             return error("%s : CheckBlock FAILED", __func__);
@@ -3277,6 +3282,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
         CheckBlockIndex();
         if (!ret)
             return error("%s : AcceptBlock FAILED", __func__);
+        break;
     }
 
     if (!ActivateBestChain(state, pblock))
@@ -4876,12 +4882,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
         CBlock block;
         vRecv >> block;
 
-        TRY_LOCK(cs_main, lockMainBlock);
-        if(!lockMainBlock && masternodeSync.IsBlockchainSynced()) {
-            LogPrintf("block -- failed to lock cs_main - %s\n", block.GetHash().ToString());
-            return false;
-        }
-
         CInv inv(MSG_BLOCK, block.GetHash());
         LogPrint("net", "received block %s peer=%d\n", inv.hash.ToString(), pfrom->id);
 
@@ -4894,7 +4894,8 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
             pfrom->PushMessage("reject", strCommand, state.GetRejectCode(),
                                state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash);
             if (nDoS > 0) {
-                Misbehaving(pfrom->GetId(), nDoS);
+                TRY_LOCK(cs_main, lockMain);
+                if(lockMain) Misbehaving(pfrom->GetId(), nDoS);
             }
         }
 
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 688c5cb5d680..840dfc06d617 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -318,11 +318,10 @@ void OverviewPage::updateDarksendProgress()
 
     if(!pwalletMain) return;
 
-    int64_t nBalance = pwalletMain->GetBalance();
     QString strAmountAndRounds;
     QString strAnonymizeDarkcoinAmount = BitcoinUnits::formatHtmlWithUnit(nDisplayUnit, nAnonymizeDarkcoinAmount * COIN, false, BitcoinUnits::separatorAlways);
 
-    if(nBalance == 0)
+    if(currentBalance == 0)
     {
         ui->darksendProgress->setValue(0);
         ui->darksendProgress->setToolTip(tr("No inputs detected"));
@@ -336,9 +335,24 @@ void OverviewPage::updateDarksendProgress()
         return;
     }
 
-    int64_t nDenominatedUnconfirmedBalance = pwalletMain->GetDenominatedBalance(true);
-    int64_t nMaxToAnonymize = pwalletMain->GetAnonymizableBalance() +
-            pwalletMain->GetAnonymizedBalance() + nDenominatedUnconfirmedBalance;
+    CAmount nDenominatedConfirmedBalance;
+    CAmount nDenominatedUnconfirmedBalance;
+    CAmount nAnonymizableBalance;
+    CAmount nNormalizedAnonymizedBalance;
+    double nAverageAnonymizedRounds;
+
+    {
+        TRY_LOCK(cs_main, lockMain);
+        if(!lockMain) return;
+
+        nDenominatedConfirmedBalance = pwalletMain->GetDenominatedBalance();
+        nDenominatedUnconfirmedBalance = pwalletMain->GetDenominatedBalance(true);
+        nAnonymizableBalance = pwalletMain->GetAnonymizableBalance();
+        nNormalizedAnonymizedBalance = pwalletMain->GetNormalizedAnonymizedBalance();
+        nAverageAnonymizedRounds = pwalletMain->GetAverageAnonymizedRounds();
+    }
+
+    CAmount nMaxToAnonymize = nAnonymizableBalance + currentAnonymizedBalance + nDenominatedUnconfirmedBalance;
 
     // If it's more than the anon threshold, limit to that.
     if(nMaxToAnonymize > nAnonymizeDarkcoinAmount*COIN) nMaxToAnonymize = nAnonymizeDarkcoinAmount*COIN;
@@ -371,16 +385,16 @@ void OverviewPage::updateDarksendProgress()
     // completeness of full amount anonimization
     float anonFullPart = 0;
 
-    int64_t denominatedBalance = pwalletMain->GetDenominatedBalance() + nDenominatedUnconfirmedBalance;
+    CAmount denominatedBalance = nDenominatedConfirmedBalance + nDenominatedUnconfirmedBalance;
     denomPart = (float)denominatedBalance / nMaxToAnonymize;
     denomPart = denomPart > 1 ? 1 : denomPart;
     denomPart *= 100;
 
-    anonNormPart = (float)pwalletMain->GetNormalizedAnonymizedBalance() / nMaxToAnonymize;
+    anonNormPart = (float)nNormalizedAnonymizedBalance / nMaxToAnonymize;
     anonNormPart = anonNormPart > 1 ? 1 : anonNormPart;
     anonNormPart *= 100;
 
-    anonFullPart = (float)pwalletMain->GetAnonymizedBalance() / nMaxToAnonymize;
+    anonFullPart = (float)currentAnonymizedBalance / nMaxToAnonymize;
     anonFullPart = anonFullPart > 1 ? 1 : anonFullPart;
     anonFullPart *= 100;
 
@@ -404,7 +418,7 @@ void OverviewPage::updateDarksendProgress()
                           tr("Anonymized") + ": %4%<br/>" +
                           tr("Denominated inputs have %5 of %n rounds on average", "", nDarksendRounds))
             .arg(progress).arg(denomPart).arg(anonNormPart).arg(anonFullPart)
-            .arg(pwalletMain->GetAverageAnonymizedRounds());
+            .arg(nAverageAnonymizedRounds);
     ui->darksendProgress->setToolTip(strToolPip);
 }
 
@@ -486,7 +500,7 @@ void OverviewPage::toggleDarksend(){
         settings.setValue("hasMixed", "hasMixed");
     }
     if(!fEnableDarksend){
-        int64_t balance = pwalletMain->GetBalance();
+        int64_t balance = currentBalance;
         float minAmount = 1.49 * COIN;
         if(balance < minAmount){
             QString strMinAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, minAmount));
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 042c62034f6b..9f3fc57ebc93 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -580,6 +580,9 @@ void SendCoinsDialog::setBalance(const CAmount& balance, const CAmount& unconfir
 
 void SendCoinsDialog::updateDisplayUnit()
 {
+    TRY_LOCK(cs_main, lockMain);
+    if(!lockMain) return;
+
     setBalance(model->getBalance(), model->getUnconfirmedBalance(), model->getImmatureBalance(), model->getAnonymizedBalance(),
                    model->getWatchBalance(), model->getWatchUnconfirmedBalance(), model->getWatchImmatureBalance());
     CoinControlDialog::coinControl->useDarkSend = ui->checkUseDarksend->isChecked();
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index e318954bc351..82d272eb8423 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -146,6 +146,9 @@ void WalletModel::pollBalanceChanged()
 
 void WalletModel::checkBalanceChanged()
 {
+    TRY_LOCK(cs_main, lockMain);
+    if(!lockMain) return;
+
     CAmount newBalance = getBalance();
     CAmount newUnconfirmedBalance = getUnconfirmedBalance();
     CAmount newImmatureBalance = getImmatureBalance();

From c1aa277286b4e6aea782a491d2fd1095b4171fd1 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 8 Aug 2015 13:36:30 +0300
Subject: [PATCH 1798/1819] set a cooldown for MN check

---
 src/masternode.cpp | 12 ++++++++++--
 src/masternode.h   |  5 +++--
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/masternode.cpp b/src/masternode.cpp
index 6c581e0f7fee..afd3f748cfd0 100644
--- a/src/masternode.cpp
+++ b/src/masternode.cpp
@@ -72,6 +72,7 @@ CMasternode::CMasternode()
     nLastDsq = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
+    lastTimeChecked = 0;
 }
 
 CMasternode::CMasternode(const CMasternode& other)
@@ -93,6 +94,7 @@ CMasternode::CMasternode(const CMasternode& other)
     nLastDsq = other.nLastDsq;
     nScanningErrorCount = other.nScanningErrorCount;
     nLastScanningErrorBlockHeight = other.nLastScanningErrorBlockHeight;
+    lastTimeChecked = 0;
 }
 
 CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
@@ -114,6 +116,7 @@ CMasternode::CMasternode(const CMasternodeBroadcast& mnb)
     nLastDsq = 0;
     nScanningErrorCount = 0;
     nLastScanningErrorBlockHeight = 0;
+    lastTimeChecked = 0;
 }
 
 //
@@ -126,6 +129,7 @@ void CMasternode::UpdateFromNewBroadcast(CMasternodeBroadcast& mnb)
     sig = mnb.sig;
     protocolVersion = mnb.protocolVersion;
     addr = mnb.addr;
+    lastTimeChecked = 0;
     int nDoS = 0;
     if(mnb.lastPing == CMasternodePing() || (mnb.lastPing != CMasternodePing() && mnb.lastPing.CheckAndUpdate(nDoS, false))) {
         lastPing = mnb.lastPing;
@@ -164,10 +168,14 @@ uint256 CMasternode::CalculateScore(int mod, int64_t nBlockHeight)
     return r;
 }
 
-void CMasternode::Check()
+void CMasternode::Check(bool forceCheck)
 {
     if(ShutdownRequested()) return;
 
+    if(!forceCheck && (GetTime() - lastTimeChecked < MASTERNODE_CHECK_SECONDS)) return;
+    lastTimeChecked = GetTime();
+
+
     //once spent, stop doing the checks
     if(activeState == MASTERNODE_VIN_SPENT) return;
 
@@ -605,7 +613,7 @@ bool CMasternodePing::CheckAndUpdate(int& nDos, bool fRequireEnabled)
                 mnodeman.mapSeenMasternodeBroadcast[hash].lastPing = *this;
             }
 
-            pmn->Check();
+            pmn->Check(true);
             if(!pmn->IsEnabled()) return false;
 
             LogPrint("masnernode", "CMasternodePing::CheckAndUpdate - Masternode ping accepted, vin: %s\n", vin.ToString());
diff --git a/src/masternode.h b/src/masternode.h
index 64fde7446c49..2bea42ec5770 100644
--- a/src/masternode.h
+++ b/src/masternode.h
@@ -19,6 +19,7 @@
 #define MASTERNODE_PING_SECONDS                (5*60)
 #define MASTERNODE_EXPIRATION_SECONDS          (65*60)
 #define MASTERNODE_REMOVAL_SECONDS             (75*60)
+#define MASTERNODE_CHECK_SECONDS               5
 
 using namespace std;
 
@@ -107,7 +108,7 @@ class CMasternode
 private:
     // critical section to protect the inner data structures
     mutable CCriticalSection cs;
-
+    int64_t lastTimeChecked;
 public:
     enum state {
         MASTERNODE_ENABLED = 1,
@@ -216,7 +217,7 @@ class CMasternode
         return n;
     }
 
-    void Check();
+    void Check(bool forceCheck = false);
 
     bool IsBroadcastedWithin(int seconds)
     {

From 47b16bab5f2cb136444bf7b2396af44232ab6c93 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 8 Aug 2015 13:49:55 +0300
Subject: [PATCH 1799/1819] recognize comments in masternode.conf / write
 initial file

---
 src/masternodeconfig.cpp | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/src/masternodeconfig.cpp b/src/masternodeconfig.cpp
index 9f7fd20808ff..6e5b732fe408 100644
--- a/src/masternodeconfig.cpp
+++ b/src/masternodeconfig.cpp
@@ -14,19 +14,34 @@ void CMasternodeConfig::add(std::string alias, std::string ip, std::string privK
 
 bool CMasternodeConfig::read(std::string& strErr) {
     int linenumber = 1;
+    boost::filesystem::path pathMasternodeConfigFile = GetMasternodeConfigFile();
+    boost::filesystem::ifstream streamConfig(pathMasternodeConfigFile);
 
-    boost::filesystem::ifstream streamConfig(GetMasternodeConfigFile());
     if (!streamConfig.good()) {
-        return true; // No masternode.conf file is OK
+        FILE* configFile = fopen(pathMasternodeConfigFile.string().c_str(), "a");
+        if (configFile != NULL) {
+            std::string strHeader = "# Masternode config file\n"
+                          "# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index\n"
+                          "# Example: mn1 127.0.0.2:19999 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0\n";
+            fwrite(strHeader.c_str(), std::strlen(strHeader.c_str()), 1, configFile);
+            fclose(configFile);
+        }
+        return true; // Nothing to read, so just return
     }
 
     for(std::string line; std::getline(streamConfig, line); linenumber++)
     {
-        if(line.empty()) {
-            continue;
-        }
+        if(line.empty()) continue;
+
         std::istringstream iss(line);
-        std::string alias, ip, privKey, txHash, outputIndex;
+        std::string comment, alias, ip, privKey, txHash, outputIndex;
+
+        if (iss >> comment) {
+            if(comment.at(0) == '#') continue;
+            iss.str(line);
+            iss.clear();
+        }
+
         if (!(iss >> alias >> ip >> privKey >> txHash >> outputIndex)) {
             iss.str(line);
             iss.clear();

From e4677275a23e549b91fc2a8337f4f5c1d678bc0b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sat, 8 Aug 2015 20:01:18 +0300
Subject: [PATCH 1800/1819] limit scope of cs_wallet in
 PrepareDarksendDenominate

---
 src/wallet.cpp | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/wallet.cpp b/src/wallet.cpp
index 8408c9cb7a4e..40fb1be334f3 100644
--- a/src/wallet.cpp
+++ b/src/wallet.cpp
@@ -2434,9 +2434,11 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
 
     LogPrintf("PrepareDarksendDenominate - preparing darksend denominate . Got: %d \n", nValueIn);
 
-    LOCK(cs_wallet);
-    BOOST_FOREACH(CTxIn v, vCoins)
-        LockCoin(v.prevout);
+    {
+        LOCK(cs_wallet);
+        BOOST_FOREACH(CTxIn v, vCoins)
+                LockCoin(v.prevout);
+    }
 
     int64_t nValueLeft = nValueIn;
     std::vector<CTxOut> vOut;
@@ -2503,12 +2505,16 @@ string CWallet::PrepareDarksendDenominate(int minRounds, int maxRounds)
         if(nValueLeft == 0) break;
     }
 
-    // unlock unused coins
-    BOOST_FOREACH(CTxIn v, vCoins)
-        UnlockCoin(v.prevout);
+    {
+        // unlock unused coins
+        LOCK(cs_wallet);
+        BOOST_FOREACH(CTxIn v, vCoins)
+                UnlockCoin(v.prevout);
+    }
 
     if(darkSendPool.GetDenominations(vOut) != darkSendPool.sessionDenom) {
         // unlock used coins on failure
+        LOCK(cs_wallet);
         BOOST_FOREACH(CTxIn v, vCoinsResult)
             UnlockCoin(v.prevout);
         return "Error: can't make current denominated outputs";

From dde2b2667a8f906908fabd59594cbae2d8de6899 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 10:36:01 -0700
Subject: [PATCH 1801/1819] add getvotes for fin bual budget

---
 src/rpcmasternode-budget.cpp | 38 ++++++++++++++++++++++++++++++++++--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index ccd616d42464..7798f63b552b 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -456,7 +456,7 @@ Value mnbudget(const Array& params, bool fHelp)
     if(strCommand == "getvotes")
     {
         if (params.size() != 2)
-            throw runtime_error("Correct usage is 'mnbudget getinfo profilename'");
+            throw runtime_error("Correct usage is 'mnbudget getvotes profilename'");
 
         std::string strProposalName = params[1].get_str();
 
@@ -470,6 +470,7 @@ Value mnbudget(const Array& params, bool fHelp)
         while(it != pbudgetProposal->mapVotes.end()){
 
             Object bObj;
+            bObj.push_back(Pair("nHash",  (*it).first.ToString().c_str()));
             bObj.push_back(Pair("Vote",  (*it).second.GetVoteString()));
             bObj.push_back(Pair("nTime",  (int64_t)(*it).second.nTime));
             bObj.push_back(Pair("fValid",  (*it).second.fValid));
@@ -500,7 +501,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show"))
+        (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show" && strCommand != "getinfo"))
         throw runtime_error(
                 "mnfinalbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
@@ -508,6 +509,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 "  vote-many   - Vote on a finalized budget\n"
                 "  vote        - Vote on a finalized budget\n"
                 "  show        - Show existing finalized budgets\n"
+                "  getinfo     - Get vote information for each budget\n"
                 );
 
     if(strCommand == "vote-many")
@@ -649,5 +651,37 @@ Value mnfinalbudget(const Array& params, bool fHelp)
 
     }
 
+    if(strCommand == "getvotes")
+    {
+        if (params.size() != 2)
+            throw runtime_error("Correct usage is 'mnbudget getvotes budget-hash'");
+
+        std::string strHash = params[1].get_str();
+        uint256 hash(strHash);
+
+        Object obj;
+
+        CFinalizedBudget* pfinalBudget = budget.FindFinalizedBudget(hash);
+
+        if(pfinalBudget == NULL) return "Unknown budget hash";
+
+        std::map<uint256, CFinalizedBudgetVote>::iterator it = pfinalBudget->mapVotes.begin();
+        while(it != pfinalBudget->mapVotes.end()){
+
+            Object bObj;
+            bObj.push_back(Pair("nHash",  (*it).first.ToString().c_str()));
+            bObj.push_back(Pair("nTime",  (int64_t)(*it).second.nTime));
+            bObj.push_back(Pair("fValid",  (*it).second.fValid));
+
+            obj.push_back(Pair((*it).second.vin.prevout.ToStringShort(), bObj));
+
+            it++;
+        }
+
+
+        return obj;
+    }
+
+
     return Value::null;
 }

From 25750983b0fccbbd33872b7e8bad4d43e46c0290 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 11:08:00 -0700
Subject: [PATCH 1802/1819] change superblocks to every 600 blocks

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 142c7a02151e..05ea34ae33e9 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -29,7 +29,7 @@ int GetBudgetPaymentCycleBlocks(){
     if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616;
     //for testing purposes
 
-    return 50;
+    return 600; //every day or so
 }
 
 bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime, int& nConf)

From bed645ff9ef3fce6b32fe92a11858ce08c999bc7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 11:09:00 -0700
Subject: [PATCH 1803/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index cfc78744fc7b..20709744bed1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 39)
+define(_CLIENT_VERSION_BUILD, 40)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index 64c160623d90..b97c872262f0 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 39
+#define CLIENT_VERSION_BUILD 40
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From ed9e287ce837e1a965cbcc340a3cad3db867d958 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 11:31:23 -0700
Subject: [PATCH 1804/1819] changed block cycle

---
 src/masternode-budget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 05ea34ae33e9..0bedb647e99d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -29,7 +29,7 @@ int GetBudgetPaymentCycleBlocks(){
     if(Params().NetworkID() == CBaseChainParams::MAIN) return 16616;
     //for testing purposes
 
-    return 600; //every day or so
+    return 50; //ten times per day
 }
 
 bool IsBudgetCollateralValid(uint256 nTxCollateralHash, uint256 nExpectedHash, std::string& strError, int64_t& nTime, int& nConf)

From 2f63f98e508ab67130d9f18ba1d1fbe4488d840f Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 12:29:31 -0700
Subject: [PATCH 1805/1819] Add sync mode for budget processing

---
 src/masternode-budget.cpp | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 0bedb647e99d..33c0bb0bfd98 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -777,6 +777,19 @@ void CBudgetManager::NewBlock()
         SubmitFinalBudget();
     }
 
+    if (strBudgetMode == "suggest" || strBudgetMode == "sync") {
+        //this function should be called 1/60 blocks -- sync with our peers
+        // -- this will send any unknown items to our peers that came active
+        // -- todo: make this more effective / less bandwidth
+
+        if(chainActive.Height() % 60 == 0) {
+            LOCK(cs_vNodes);
+            BOOST_FOREACH(CNode* pnode, vNodes)
+                if(pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) 
+                    Sync(pnode, 0);
+        } 
+    }
+
     //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
     if(chainActive.Height() % 6 != 0) return;
 

From 91bd9c7cf01c891f414d9c83d7f791a72179d63d Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 12:35:28 -0700
Subject: [PATCH 1806/1819] fValid for mnfinalbudget

---
 src/masternode-budget.cpp    | 2 ++
 src/rpcmasternode-budget.cpp | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 33c0bb0bfd98..f0996dd0c48d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -392,6 +392,8 @@ bool CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 
 void CBudgetManager::CheckAndRemove()
 {
+    LogPrintf("CBudgetManager::CheckAndRemove \n");
+    
     std::string strError = "";
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 7798f63b552b..77e67ebc267b 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -644,6 +644,11 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             bObj.push_back(Pair("Proposals",  finalizedBudget->GetProposals()));
             bObj.push_back(Pair("VoteCount",  (int64_t)finalizedBudget->GetVoteCount()));
             bObj.push_back(Pair("Status",  finalizedBudget->GetStatus()));
+
+            std::string strError = "";
+            bObj.push_back(Pair("IsValid",  finalizedBudget->IsValid(strError)));
+            bObj.push_back(Pair("IsValidReason",  strError.c_str()));
+            
             resultObj.push_back(Pair(finalizedBudget->GetName(), bObj));
         }
 

From 80495361f34b5685e626903a4c5c6fa5bf4b9cfc Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 13:04:25 -0700
Subject: [PATCH 1807/1819] incremental sync with our peers

---
 src/init.cpp              |   3 +
 src/masternode-budget.cpp | 121 +++++++++++++++++++++++++++++++++-----
 src/masternode-budget.h   |   6 +-
 3 files changed, 113 insertions(+), 17 deletions(-)

diff --git a/src/init.cpp b/src/init.cpp
index d42cec89df7a..f6e3233ff1e6 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1440,6 +1440,9 @@ bool AppInit2(boost::thread_group& threadGroup)
             LogPrintf("file format is unknown or invalid, please fix it manually\n");
     }
 
+    //flag our cached items so we send them to our peers
+    budget.ResetSync();
+
 
     uiInterface.InitMessage(_("Loading masternode payment cache..."));
 
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index f0996dd0c48d..01c4d5931d9f 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -393,7 +393,7 @@ bool CBudgetManager::AddProposal(CBudgetProposal& budgetProposal)
 void CBudgetManager::CheckAndRemove()
 {
     LogPrintf("CBudgetManager::CheckAndRemove \n");
-    
+
     std::string strError = "";
     std::map<uint256, CFinalizedBudget>::iterator it = mapFinalizedBudgets.begin();
     while(it != mapFinalizedBudgets.end())
@@ -779,18 +779,19 @@ void CBudgetManager::NewBlock()
         SubmitFinalBudget();
     }
 
-    if (strBudgetMode == "suggest" || strBudgetMode == "sync") {
-        //this function should be called 1/60 blocks -- sync with our peers
-        // -- this will send any unknown items to our peers that came active
-        // -- todo: make this more effective / less bandwidth
 
-        if(chainActive.Height() % 60 == 0) {
-            LOCK(cs_vNodes);
-            BOOST_FOREACH(CNode* pnode, vNodes)
-                if(pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) 
-                    Sync(pnode, 0);
-        } 
+    // incremental sync with our peers
+    {
+        if(chainActive.Height() % 600 == rand() % 600) ResetSync();
+
+        LOCK(cs_vNodes);
+        BOOST_FOREACH(CNode* pnode, vNodes)
+            if(pnode->nVersion >= MIN_BUDGET_PEER_PROTO_VERSION) 
+                Sync(pnode, 0, true);
+        
+        MarkSynced();
     }
+     
 
     //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
     if(chainActive.Height() % 6 != 0) return;
@@ -1045,7 +1046,87 @@ bool CBudgetManager::PropExists(uint256 nHash)
     return false;
 }
 
-void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
+//mark that a full sync is needed
+void CBudgetManager::ResetSync()
+{
+    LOCK(cs);
+
+
+    std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
+    while(it1 != mapSeenMasternodeBudgetProposals.end()){
+        CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
+        if(pbudgetProposal && pbudgetProposal->fValid){
+        
+            //mark votes
+            std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
+            while(it2 != pbudgetProposal->mapVotes.end()){
+                (*it2).second.fSynced = false;
+                ++it2;
+            }
+        }
+        ++it1;
+    }
+
+    std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
+    while(it3 != mapSeenFinalizedBudgets.end()){
+        CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
+        if(pfinalizedBudget && pfinalizedBudget->fValid){
+
+            //send votes
+            std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
+            while(it4 != pfinalizedBudget->mapVotes.end()){
+                (*it4).second.fSynced = false;
+                ++it4;
+            }
+        }
+        ++it3;
+    }
+}
+
+void CBudgetManager::MarkSynced()
+{
+    LOCK(cs);
+
+    /*
+        Mark that we've sent all valid items
+    */
+
+    std::map<uint256, CBudgetProposalBroadcast>::iterator it1 = mapSeenMasternodeBudgetProposals.begin();
+    while(it1 != mapSeenMasternodeBudgetProposals.end()){
+        CBudgetProposal* pbudgetProposal = FindProposal((*it1).first);
+        if(pbudgetProposal && pbudgetProposal->fValid){
+        
+            //mark votes
+            std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
+            while(it2 != pbudgetProposal->mapVotes.end()){
+                if((*it2).second.fValid)
+                    (*it2).second.fSynced = true;
+                ++it2;
+            }
+        }
+        ++it1;
+    }
+
+    std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
+    while(it3 != mapSeenFinalizedBudgets.end()){
+        CFinalizedBudget* pfinalizedBudget = FindFinalizedBudget((*it3).first);
+        if(pfinalizedBudget && pfinalizedBudget->fValid){
+
+            //mark votes
+            std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
+            while(it4 != pfinalizedBudget->mapVotes.end()){
+                if((*it4).second.fValid)
+                    (*it4).second.fSynced = true;
+                ++it4;
+            }
+        }
+        ++it3;
+    }
+
+}
+
+
+void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
 {
     LOCK(cs);
 
@@ -1072,8 +1153,10 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
             std::map<uint256, CBudgetVote>::iterator it2 = pbudgetProposal->mapVotes.begin();
             while(it2 != pbudgetProposal->mapVotes.end()){
                 if((*it2).second.fValid){
-                    CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
-                    vInv.push_back(inv);
+                    if((fPartial && !(*it2).second.fSynced) || !fPartial) {
+                        CInv inv(MSG_BUDGET_VOTE, (*it2).second.GetHash());
+                        vInv.push_back(inv);
+                    }
                 }
                 ++it2;
             }
@@ -1096,8 +1179,10 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp)
             std::map<uint256, CFinalizedBudgetVote>::iterator it4 = pfinalizedBudget->mapVotes.begin();
             while(it4 != pfinalizedBudget->mapVotes.end()){
                 if((*it4).second.fValid) {
-                    CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
-                    vInv.push_back(inv);
+                    if((fPartial && !(*it4).second.fSynced) || !fPartial) {
+                        CInv inv(MSG_BUDGET_FINALIZED_VOTE, (*it4).second.GetHash());
+                        vInv.push_back(inv);
+                    }
                 }
                 ++it4;
             }
@@ -1466,6 +1551,7 @@ CBudgetVote::CBudgetVote()
     nVote = VOTE_ABSTAIN;
     nTime = 0;
     fValid = true;
+    fSynced = false;
 }
 
 CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
@@ -1475,6 +1561,7 @@ CBudgetVote::CBudgetVote(CTxIn vinIn, uint256 nProposalHashIn, int nVoteIn)
     nVote = nVoteIn;
     nTime = GetAdjustedTime();
     fValid = true;
+    fSynced = false;
 }
 
 void CBudgetVote::Relay()
@@ -1875,6 +1962,7 @@ CFinalizedBudgetVote::CFinalizedBudgetVote()
     nTime = 0;
     vchSig.clear();
     fValid = true;
+    fSynced = false;
 }
 
 CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
@@ -1884,6 +1972,7 @@ CFinalizedBudgetVote::CFinalizedBudgetVote(CTxIn vinIn, uint256 nBudgetHashIn)
     nTime = GetAdjustedTime();
     vchSig.clear();
     fValid = true;
+    fSynced = false;
 }
 
 void CFinalizedBudgetVote::Relay()
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 7c3cf7452046..3c08d1aeb764 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -105,7 +105,9 @@ class CBudgetManager
     int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
     int sizeProposals() {return (int)mapProposals.size();}
 
-    void Sync(CNode* node, uint256 nProp);
+    void ResetSync();
+    void MarkSynced();
+    void Sync(CNode* node, uint256 nProp, bool fPartial=false);
 
     void Calculate();
     void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);
@@ -341,6 +343,7 @@ class CFinalizedBudgetVote
 {
 public:
     bool fValid; //if the vote is currently valid / counted
+    bool fSynced; //if we've sent this to our peers
     CTxIn vin;
     uint256 nBudgetHash;
     int64_t nTime;
@@ -538,6 +541,7 @@ class CBudgetVote
 {
 public:
     bool fValid; //if the vote is currently valid / counted
+    bool fSynced; //if we've sent this to our peers
     CTxIn vin;
     uint256 nProposalHash;
     int nVote;

From 8e5c8d13d0e87d48688732ee5a547383de2ee3e7 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 13:10:38 -0700
Subject: [PATCH 1808/1819] fix rpccommand fin budget getvotes

---
 src/rpcmasternode-budget.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/rpcmasternode-budget.cpp b/src/rpcmasternode-budget.cpp
index 77e67ebc267b..14e86c502951 100644
--- a/src/rpcmasternode-budget.cpp
+++ b/src/rpcmasternode-budget.cpp
@@ -501,7 +501,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
         strCommand = params[0].get_str();
 
     if (fHelp  ||
-        (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show" && strCommand != "getinfo"))
+        (strCommand != "suggest" && strCommand != "vote-many" && strCommand != "vote" && strCommand != "show" && strCommand != "getvotes"))
         throw runtime_error(
                 "mnfinalbudget \"command\"... ( \"passphrase\" )\n"
                 "Vote or show current budgets\n"
@@ -509,7 +509,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
                 "  vote-many   - Vote on a finalized budget\n"
                 "  vote        - Vote on a finalized budget\n"
                 "  show        - Show existing finalized budgets\n"
-                "  getinfo     - Get vote information for each budget\n"
+                "  getvotes     - Get vote information for each finalized budget\n"
                 );
 
     if(strCommand == "vote-many")
@@ -648,7 +648,7 @@ Value mnfinalbudget(const Array& params, bool fHelp)
             std::string strError = "";
             bObj.push_back(Pair("IsValid",  finalizedBudget->IsValid(strError)));
             bObj.push_back(Pair("IsValidReason",  strError.c_str()));
-            
+
             resultObj.push_back(Pair(finalizedBudget->GetName(), bObj));
         }
 

From 7d51866b9d405b7b3d929f3b42754f3b2b51fdeb Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 13:24:47 -0700
Subject: [PATCH 1809/1819] more debugging for incr sync

---
 src/masternode-budget.cpp | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 01c4d5931d9f..241a5c0a633d 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -779,9 +779,12 @@ void CBudgetManager::NewBlock()
         SubmitFinalBudget();
     }
 
+    //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
+    if(chainActive.Height() % 6 != 0) return;
 
     // incremental sync with our peers
-    {
+    if(masternodeSync.IsSynced()){
+        LogPrintf("CBudgetManager::NewBlock - incremental sync started");
         if(chainActive.Height() % 600 == rand() % 600) ResetSync();
 
         LOCK(cs_vNodes);
@@ -793,9 +796,6 @@ void CBudgetManager::NewBlock()
     }
      
 
-    //this function should be called 1/6 blocks, allowing up to 100 votes per day on all proposals
-    if(chainActive.Height() % 6 != 0) return;
-
     CheckAndRemove();
 
     //remove invalid votes once in a while (we have to check the signatures and validity of every vote, somewhat CPU intensive)
@@ -1166,6 +1166,9 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
 
     pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_PROP, (int)vInv.size());
     if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
+
+    LogPrintf("CBudgetManager::Sync - sent %d items\n", (int)vInv.size());
+
     vInv.clear();
 
     std::map<uint256, CFinalizedBudgetBroadcast>::iterator it3 = mapSeenFinalizedBudgets.begin();
@@ -1192,6 +1195,8 @@ void CBudgetManager::Sync(CNode* pfrom, uint256 nProp, bool fPartial)
 
     pfrom->PushMessage("ssc", MASTERNODE_SYNC_BUDGET_FIN, (int)vInv.size());
     if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
+    LogPrintf("CBudgetManager::Sync - sent %d items\n", (int)vInv.size());
+
 }
 
 bool CBudgetManager::UpdateProposal(CBudgetVote& vote, CNode* pfrom, std::string& strError)

From e8ba7328f04ed32c5b6adb7a54593a3b0d056bd2 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sat, 8 Aug 2015 13:56:12 -0700
Subject: [PATCH 1810/1819] Clear seen on boot and everyday

---
 src/init.cpp              | 1 +
 src/masternode-budget.cpp | 5 ++++-
 src/masternode-budget.h   | 7 +++++++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/init.cpp b/src/init.cpp
index f6e3233ff1e6..83002ce4bec7 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1442,6 +1442,7 @@ bool AppInit2(boost::thread_group& threadGroup)
 
     //flag our cached items so we send them to our peers
     budget.ResetSync();
+    budget.ClearSeen();
 
 
     uiInterface.InitMessage(_("Loading masternode payment cache..."));
diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 241a5c0a633d..4f65d0625119 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -785,7 +785,10 @@ void CBudgetManager::NewBlock()
     // incremental sync with our peers
     if(masternodeSync.IsSynced()){
         LogPrintf("CBudgetManager::NewBlock - incremental sync started");
-        if(chainActive.Height() % 600 == rand() % 600) ResetSync();
+        if(chainActive.Height() % 600 == rand() % 600) {
+            ClearSeen();
+            ResetSync();
+        }
 
         LOCK(cs_vNodes);
         BOOST_FOREACH(CNode* pnode, vNodes)
diff --git a/src/masternode-budget.h b/src/masternode-budget.h
index 3c08d1aeb764..c2410424e293 100644
--- a/src/masternode-budget.h
+++ b/src/masternode-budget.h
@@ -102,6 +102,13 @@ class CBudgetManager
         mapFinalizedBudgets.clear();
     }
 
+    void ClearSeen() {
+        mapSeenMasternodeBudgetProposals.clear();
+        mapSeenMasternodeBudgetVotes.clear();
+        mapSeenFinalizedBudgets.clear();
+        mapSeenFinalizedBudgetVotes.clear();
+    }
+
     int sizeFinalized() {return (int)mapFinalizedBudgets.size();}
     int sizeProposals() {return (int)mapProposals.size();}
 

From 17a2587bf10970383fbde7fae3b914c812ca173a Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 9 Aug 2015 00:46:42 +0300
Subject: [PATCH 1811/1819] more trylock+wait: rpc, GetHeight

---
 src/main.cpp      |  7 +++++--
 src/rpcserver.cpp | 13 +++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index 76a5f8f9e868..11b27aa17243 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -302,8 +302,11 @@ CNodeState *State(NodeId pnode) {
 
 int GetHeight()
 {
-    LOCK(cs_main);
-    return chainActive.Height();
+    while(true){
+        TRY_LOCK(cs_main, lockMain);
+        if(!lockMain) { MilliSleep(10); continue; }
+        return chainActive.Height();
+    }
 }
 
 void UpdatePreferredDownload(CNode* node, CNodeState* state)
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index d74fe109d5ab..a862954582b7 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -1017,8 +1017,17 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s
                 LOCK(cs_main);
                 result = pcmd->actor(params, false);
             } else {
-                LOCK2(cs_main, pwalletMain->cs_wallet);
-                result = pcmd->actor(params, false);
+                while (true) {
+                    TRY_LOCK(cs_main, lockMain);
+                    if(!lockMain) { MilliSleep(50); continue; }
+                    while (true) {
+                        TRY_LOCK(pwalletMain->cs_wallet, lockWallet);
+                        if(!lockMain) { MilliSleep(50); continue; }
+                        result = pcmd->actor(params, false);
+                        break;
+                    }
+                    break;
+                }
             }
 #else // ENABLE_WALLET
             else {

From 84264b032795ed74e5d7fa46c70a93e130ba3aab Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 9 Aug 2015 00:48:09 +0300
Subject: [PATCH 1812/1819] millisleep 10->50 on trylock+wait

---
 src/darksend.cpp | 4 ++--
 src/main.cpp     | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 38245ca7bb9f..4762c1130d55 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -434,7 +434,7 @@ bool CDarksendPool::SetCollateralAddress(std::string strAddress){
 void CDarksendPool::UnlockCoins(){
     while(true) {
         TRY_LOCK(pwalletMain->cs_wallet, lockWallet);
-        if(!lockWallet) {MilliSleep(10); continue;}
+        if(!lockWallet) {MilliSleep(50); continue;}
         BOOST_FOREACH(CTxIn v, lockedCoins)
                 pwalletMain->UnlockCoin(v.prevout);
         break;
@@ -1161,7 +1161,7 @@ void CDarksendPool::SendDarksendDenominate(std::vector<CTxIn>& vin, std::vector<
 
         while(true){
             TRY_LOCK(cs_main, lockMain);
-            if(!lockMain) { MilliSleep(10); continue;}
+            if(!lockMain) { MilliSleep(50); continue;}
             if(!AcceptableInputs(mempool, state, CTransaction(tx), false, NULL, false, true)){
                 LogPrintf("dsi -- transaction not valid! %s \n", tx.ToString());
                 UnlockCoins();
diff --git a/src/main.cpp b/src/main.cpp
index 11b27aa17243..5cc51d0f0636 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -304,7 +304,7 @@ int GetHeight()
 {
     while(true){
         TRY_LOCK(cs_main, lockMain);
-        if(!lockMain) { MilliSleep(10); continue; }
+        if(!lockMain) { MilliSleep(50); continue; }
         return chainActive.Height();
     }
 }
@@ -2621,7 +2621,7 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
         bool fInitialDownload;
         while(true) {
             TRY_LOCK(cs_main, lockMain);
-            if(!lockMain) { MilliSleep(10); continue; }
+            if(!lockMain) { MilliSleep(50); continue; }
 
             pindexMostWork = FindMostWorkChain();
 
@@ -3269,7 +3269,7 @@ bool ProcessNewBlock(CValidationState &state, CNode* pfrom, CBlock* pblock, CDis
 
     while(true) {
         TRY_LOCK(cs_main, lockMain);
-        if(!lockMain) { MilliSleep(10); continue; }
+        if(!lockMain) { MilliSleep(50); continue; }
 
         MarkBlockAsReceived(pblock->GetHash());
         if (!checked) {

From b743112d57a4af986d4304377084c7ccb12e4276 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 9 Aug 2015 03:27:38 +0300
Subject: [PATCH 1813/1819] bump time for sporks 8-10 to be off by default

---
 src/spork.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/spork.h b/src/spork.h
index f43a4ed94d8e..34ea743ae981 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -41,9 +41,9 @@ using namespace boost;
 #define SPORK_3_INSTANTX_BLOCK_FILTERING_DEFAULT              1424217600  //2015-2-18
 #define SPORK_5_MAX_VALUE_DEFAULT                             1000        //1000 DASH
 #define SPORK_7_MASTERNODE_SCANNING_DEFAULT                   978307200   //2001-1-1
-#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        1438611701   //OFF
-#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         1438611701   //OFF
-#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         1438611701   //OFF
+#define SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT_DEFAULT        4070908800   //OFF
+#define SPORK_9_MASTERNODE_BUDGET_ENFORCEMENT_DEFAULT         4070908800   //OFF
+#define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         4070908800   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
 #define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
 #define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   1438611701 //1439510400   //8/13/2015, 5:00:00 PM

From ba374153282a176e76905b74947d9524791f4e2b Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 9 Aug 2015 03:01:07 +0300
Subject: [PATCH 1814/1819] support old masternodes

---
 src/masternodeman.cpp | 244 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 244 insertions(+)

diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 3f8dc85540db..694673154d52 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -770,6 +770,250 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString());
+    } else
+// Light version for OLD MASSTERNODES - fake pings, no self-activation
+// Remove this after migration to v12 is done
+    if (strCommand == "dsee") { //DarkSend Election Entry
+
+        CTxIn vin;
+        CService addr;
+        CPubKey pubkey;
+        CPubKey pubkey2;
+        vector<unsigned char> vchSig;
+        int64_t sigTime;
+        int count;
+        int current;
+        int64_t lastUpdated;
+        int protocolVersion;
+        CScript donationAddress;
+        int donationPercentage;
+        std::string strMessage;
+
+        vRecv >> vin >> addr >> vchSig >> sigTime >> pubkey >> pubkey2 >> count >> current >> lastUpdated >> protocolVersion >> donationAddress >> donationPercentage;
+
+        // make sure signature isn't in the future (past is OK)
+        if (sigTime > GetAdjustedTime() + 60 * 60) {
+            LogPrintf("dsee - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+            return;
+        }
+
+        bool isLocal = addr.IsRFC1918() || addr.IsLocal();
+        if(Params().NetworkID() == CBaseChainParams::REGTEST) isLocal = false;
+
+        std::string vchPubKey(pubkey.begin(), pubkey.end());
+        std::string vchPubKey2(pubkey2.begin(), pubkey2.end());
+
+        strMessage = addr.ToString() + boost::lexical_cast<std::string>(sigTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(protocolVersion)  + donationAddress.ToString() + boost::lexical_cast<std::string>(donationPercentage);
+
+        if(protocolVersion < masternodePayments.GetMinMasternodePaymentsProto()) {
+            LogPrintf("dsee - ignoring outdated Masternode %s protocol version %d < %d\n", vin.ToString().c_str(), protocolVersion, masternodePayments.GetMinMasternodePaymentsProto());
+            return;
+        }
+
+        int nDos = 0;
+        CScript pubkeyScript;
+        pubkeyScript = GetScriptForDestination(pubkey.GetID());
+
+        if(pubkeyScript.size() != 25) {
+            LogPrintf("dsee - pubkey the wrong size\n");
+            nDos = 100;
+            return;
+        }
+
+        CScript pubkeyScript2;
+        pubkeyScript2 = GetScriptForDestination(pubkey2.GetID());
+
+        if(pubkeyScript2.size() != 25) {
+            LogPrintf("dsee - pubkey2 the wrong size\n");
+            nDos = 100;
+            return;
+        }
+
+        if(!vin.scriptSig.empty()) {
+            LogPrintf("dsee - Ignore Not Empty ScriptSig %s\n",vin.ToString());
+            return;
+        }
+
+        std::string errorMessage = "";
+        if(!darkSendSigner.VerifyMessage(pubkey, vchSig, strMessage, errorMessage)){
+            LogPrintf("dsee - Got bad Masternode address signature\n");
+            Misbehaving(pfrom->GetId(), 100);
+            return;
+        }
+
+        if(Params().NetworkID() == CBaseChainParams::MAIN){
+            if(addr.GetPort() != 9999) return;
+        } else if(addr.GetPort() == 9999) return;
+
+        //search existing Masternode list, this is where we update existing Masternodes with new dsee broadcasts
+        CMasternode* pmn = this->Find(vin);
+        if(pmn != NULL)
+        {
+            // count == -1 when it's a new entry
+            //   e.g. We don't want the entry relayed/time updated when we're syncing the list
+            // mn.pubkey = pubkey, IsVinAssociatedWithPubkey is validated once below,
+            //   after that they just need to match
+            if(count == -1 && pmn->pubkey == pubkey && (pmn->lastPing.sigTime < GetTime() - MASTERNODE_MIN_MNB_SECONDS)){
+                if(pmn->sigTime < sigTime){ //take the newest entry
+                    LogPrintf("dsee - Got updated entry for %s\n", addr.ToString().c_str());
+                    pmn->pubkey2 = pubkey2;
+                    pmn->sigTime = sigTime;
+                    pmn->sig = vchSig;
+                    pmn->protocolVersion = protocolVersion;
+                    pmn->addr = addr;
+                    //fake ping
+                    pmn->lastPing = CMasternodePing(vin);
+                    pmn->Check();
+                    if(pmn->IsEnabled()) {
+                        TRY_LOCK(cs_vNodes, lockNodes);
+                        if(!lockNodes) return;
+                        BOOST_FOREACH(CNode* pnode, vNodes)
+                            if(pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+                                pnode->PushMessage("dsee", vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion, donationAddress, donationPercentage);
+                    }
+                }
+            }
+
+            return;
+        }
+
+        // make sure the vout that was signed is related to the transaction that spawned the Masternode
+        //  - this is expensive, so it's only done once per Masternode
+        if(!darkSendSigner.IsVinAssociatedWithPubkey(vin, pubkey)) {
+            LogPrintf("dsee - Got mismatched pubkey and vin\n");
+            Misbehaving(pfrom->GetId(), 100);
+            return;
+        }
+
+        if(fDebug) LogPrintf("dsee - Got NEW OLD Masternode entry %s\n", addr.ToString().c_str());
+
+        // make sure it's still unspent
+        //  - this is checked later by .check() in many places and by ThreadCheckDarkSendPool()
+
+        CValidationState state;
+        CMutableTransaction tx = CMutableTransaction();
+        CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
+        tx.vin.push_back(vin);
+        tx.vout.push_back(vout);
+        if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
+            if(fDebug) LogPrintf("dsee - Accepted OLD Masternode entry %i %i\n", count, current);
+
+            if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
+                LogPrintf("dsee - Input must have least %d confirmations\n", MASTERNODE_MIN_CONFIRMATIONS);
+                Misbehaving(pfrom->GetId(), 20);
+                return;
+            }
+
+            // verify that sig time is legit in past
+            // should be at least not earlier than block when 1000 DASH tx got MASTERNODE_MIN_CONFIRMATIONS
+            uint256 hashBlock = 0;
+            CTransaction tx2;
+            GetTransaction(vin.prevout.hash, tx2, hashBlock, true);
+            BlockMap::iterator mi = mapBlockIndex.find(hashBlock);
+            if (mi != mapBlockIndex.end() && (*mi).second)
+            {
+                CBlockIndex* pMNIndex = (*mi).second; // block for 1000 DASH tx -> 1 confirmation
+                CBlockIndex* pConfIndex = chainActive[pMNIndex->nHeight + MASTERNODE_MIN_CONFIRMATIONS - 1]; // block where tx got MASTERNODE_MIN_CONFIRMATIONS
+                if(pConfIndex->GetBlockTime() > sigTime)
+                {
+                    LogPrintf("mnb - Bad sigTime %d for Masternode %20s %105s (%i conf block is at %d)\n",
+                              sigTime, addr.ToString(), vin.ToString(), MASTERNODE_MIN_CONFIRMATIONS, pConfIndex->GetBlockTime());
+                    return;
+                }
+            }
+
+            // use this as a peer
+            addrman.Add(CAddress(addr), pfrom->addr, 2*60*60);
+
+            // add our Masternode
+            CMasternode mn = CMasternode();
+            mn.addr = addr;
+            mn.vin = vin;
+            mn.pubkey = pubkey;
+            mn.sig = vchSig;
+            mn.sigTime = sigTime;
+            mn.pubkey2 = pubkey2;
+            mn.protocolVersion = protocolVersion;
+            // fake ping
+            mn.lastPing = CMasternodePing(vin);
+            Add(mn);
+            mn.Check(true);
+            if(mn.IsEnabled()) {
+                TRY_LOCK(cs_vNodes, lockNodes);
+                if(!lockNodes) return;
+                BOOST_FOREACH(CNode* pnode, vNodes)
+                    if(pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+                        pnode->PushMessage("dsee", vin, addr, vchSig, sigTime, pubkey, pubkey2, count, current, lastUpdated, protocolVersion, donationAddress, donationPercentage);
+            }
+        } else {
+            LogPrintf("dsee - Rejected Masternode entry %s\n", addr.ToString().c_str());
+
+            int nDoS = 0;
+            if (state.IsInvalid(nDoS))
+            {
+                LogPrintf("dsee - %s from %s %s was not accepted into the memory pool\n", tx.GetHash().ToString().c_str(),
+                    pfrom->addr.ToString().c_str(), pfrom->cleanSubVer.c_str());
+                if (nDoS > 0)
+                    Misbehaving(pfrom->GetId(), nDoS);
+            }
+        }
+    }
+
+    else if (strCommand == "dseep") { //DarkSend Election Entry Ping
+
+        CTxIn vin;
+        vector<unsigned char> vchSig;
+        int64_t sigTime;
+        bool stop;
+        vRecv >> vin >> vchSig >> sigTime >> stop;
+
+        //LogPrintf("dseep - Received: vin: %s sigTime: %lld stop: %s\n", vin.ToString().c_str(), sigTime, stop ? "true" : "false");
+
+        if (sigTime > GetAdjustedTime() + 60 * 60) {
+            LogPrintf("dseep - Signature rejected, too far into the future %s\n", vin.ToString().c_str());
+            return;
+        }
+
+        if (sigTime <= GetAdjustedTime() - 60 * 60) {
+            LogPrintf("dseep - Signature rejected, too far into the past %s - %d %d \n", vin.ToString().c_str(), sigTime, GetAdjustedTime());
+            return;
+        }
+
+        // see if we have this Masternode
+        CMasternode* pmn = this->Find(vin);
+        if(pmn != NULL && pmn->protocolVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+        {
+            // LogPrintf("dseep - Found corresponding mn for vin: %s\n", vin.ToString().c_str());
+            // take this only if it's newer
+            if(sigTime - pmn->lastPing.sigTime > MASTERNODE_MIN_MNP_SECONDS)
+            {
+                std::string strMessage = pmn->addr.ToString() + boost::lexical_cast<std::string>(sigTime) + boost::lexical_cast<std::string>(stop);
+
+                std::string errorMessage = "";
+                if(!darkSendSigner.VerifyMessage(pmn->pubkey2, vchSig, strMessage, errorMessage))
+                {
+                    LogPrintf("dseep - Got bad Masternode address signature %s \n", vin.ToString().c_str());
+                    //Misbehaving(pfrom->GetId(), 100);
+                    return;
+                }
+
+                // fake ping
+                pmn->lastPing = CMasternodePing();
+                pmn->Check();
+                if(pmn->IsEnabled()) {
+                    TRY_LOCK(cs_vNodes, lockNodes);
+                    if(!lockNodes) return;
+                    BOOST_FOREACH(CNode* pnode, vNodes)
+                        if(pnode->nVersion >= masternodePayments.GetMinMasternodePaymentsProto())
+                            pnode->PushMessage("dseep", vin, vchSig, sigTime, stop);
+                }
+            }
+            return;
+        }
+
+        if(fDebug) LogPrintf("dseep - Couldn't find Masternode entry %s\n", vin.ToString().c_str());
+
+        AskForMN(pfrom, vin);
     }
 
 }

From 5bd997f2558f3df7e32f798d8e9a1d95eb698bc0 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Sun, 9 Aug 2015 16:06:54 +0300
Subject: [PATCH 1815/1819] more dsee/dseep for migration: - inject our node in
 old masrternodes' list / ping accordingly - ignore dsee/dseep after
 SPORK_10_MASTERNODE_PAY_UPDATED_NODES is activated

---
 src/activemasternode.cpp | 70 ++++++++++++++++++++++++++++++++++++++++
 src/masternodeman.cpp    | 20 +++++++++---
 2 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index 2850f57a9549..ad0c88f82374 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -4,6 +4,7 @@
 #include "masternodeman.h"
 #include "masternode.h"
 #include "masternodeconfig.h"
+#include "spork.h"
 
 //
 // Bootup the Masternode, look for a 1000DRK input and register on the network
@@ -175,6 +176,37 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
         mnodeman.mapSeenMasternodePing.insert(make_pair(mnp.GetHash(), mnp));
         mnp.Relay();
 
+        /*
+         * IT'S SAFE TO REMOVE THIS IN FURTHER VERSIONS
+         * AFTER MIGRATION TO V12 IS DONE
+         */
+
+        if(IsSporkActive(SPORK_10_MASTERNODE_PAY_UPDATED_NODES)) return true;
+        // for migration purposes ping our node on old masternodes network too
+        std::string retErrorMessage;
+        std::vector<unsigned char> vchMasterNodeSignature;
+        int64_t masterNodeSignatureTime = GetAdjustedTime();
+
+        std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(0);
+
+        if(!darkSendSigner.SignMessage(strMessage, retErrorMessage, vchMasterNodeSignature, keyMasternode)) {
+            errorMessage = "dseep sign message failed: " + retErrorMessage;
+            return false;
+        }
+
+        if(!darkSendSigner.VerifyMessage(pubKeyMasternode, vchMasterNodeSignature, strMessage, retErrorMessage)) {
+            errorMessage = "dseep verify message failed: " + retErrorMessage;
+            return false;
+        }
+
+        LOCK(cs_vNodes);
+        BOOST_FOREACH(CNode* pnode, vNodes)
+            pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, 0);
+
+        /*
+         * END OF "REMOVE"
+         */
+
         return true;
     }
     else
@@ -265,6 +297,44 @@ bool CActiveMasternode::Register(CTxIn vin, CService service, CKey keyCollateral
     LogPrintf("CActiveMasternode::Register() - RelayElectionEntry vin = %s\n", vin.ToString());
     mnb.Relay();
 
+    /*
+     * IT'S SAFE TO REMOVE THIS IN FURTHER VERSIONS
+     * AFTER MIGRATION TO V12 IS DONE
+     */
+
+    if(IsSporkActive(SPORK_10_MASTERNODE_PAY_UPDATED_NODES)) return true;
+    // for migration purposes inject our node in old masternodes' list too
+    std::string retErrorMessage;
+    std::vector<unsigned char> vchMasterNodeSignature;
+    int64_t masterNodeSignatureTime = GetAdjustedTime();
+    std::string donationAddress = "";
+    int donationPercantage = 0;
+
+    std::string vchPubKey(pubKeyCollateralAddress.begin(), pubKeyCollateralAddress.end());
+    std::string vchPubKey2(pubKeyMasternode.begin(), pubKeyMasternode.end());
+
+    std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + vchPubKey + vchPubKey2 + boost::lexical_cast<std::string>(PROTOCOL_VERSION) + donationAddress + boost::lexical_cast<std::string>(donationPercantage);
+
+    if(!darkSendSigner.SignMessage(strMessage, retErrorMessage, vchMasterNodeSignature, keyCollateralAddress)) {
+        errorMessage = "dsee sign message failed: " + retErrorMessage;
+        LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    if(!darkSendSigner.VerifyMessage(pubKeyCollateralAddress, vchMasterNodeSignature, strMessage, retErrorMessage)) {
+        errorMessage = "dsee verify message failed: " + retErrorMessage;
+        LogPrintf("CActiveMasternode::Register() - Error: %s\n", errorMessage.c_str());
+        return false;
+    }
+
+    LOCK(cs_vNodes);
+    BOOST_FOREACH(CNode* pnode, vNodes)
+        pnode->PushMessage("dsee", vin, service, vchMasterNodeSignature, masterNodeSignatureTime, pubKeyCollateralAddress, pubKeyMasternode, -1, -1, masterNodeSignatureTime, PROTOCOL_VERSION, donationAddress, donationPercantage);
+
+    /*
+     * END OF "REMOVE"
+     */
+
     return true;
 }
 
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 694673154d52..7f6b224f6b27 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -770,10 +770,16 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         if(vInv.size() > 0) pfrom->PushMessage("inv", vInv);
 
         LogPrintf("dseg - Sent %d Masternode entries to %s\n", i, pfrom->addr.ToString());
-    } else
-// Light version for OLD MASSTERNODES - fake pings, no self-activation
-// Remove this after migration to v12 is done
-    if (strCommand == "dsee") { //DarkSend Election Entry
+    }
+    /*
+     * IT'S SAFE TO REMOVE THIS IN FURTHER VERSIONS
+     * AFTER MIGRATION TO V12 IS DONE
+     */
+
+    // Light version for OLD MASSTERNODES - fake pings, no self-activation
+    else if (strCommand == "dsee") { //DarkSend Election Entry
+
+        if(IsSporkActive(SPORK_10_MASTERNODE_PAY_UPDATED_NODES)) return;
 
         CTxIn vin;
         CService addr;
@@ -961,6 +967,8 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
 
     else if (strCommand == "dseep") { //DarkSend Election Entry Ping
 
+        if(IsSporkActive(SPORK_10_MASTERNODE_PAY_UPDATED_NODES)) return;
+
         CTxIn vin;
         vector<unsigned char> vchSig;
         int64_t sigTime;
@@ -1016,6 +1024,10 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         AskForMN(pfrom, vin);
     }
 
+    /*
+     * END OF "REMOVE"
+     */
+
 }
 
 void CMasternodeMan::Remove(CTxIn vin)

From 1d54f4127b80e1d952b59d967b385cde2b81d883 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 9 Aug 2015 10:49:14 -0700
Subject: [PATCH 1816/1819] disable superblock spork

---
 src/masternode-budget.cpp | 3 ++-
 src/spork.h               | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/masternode-budget.cpp b/src/masternode-budget.cpp
index 4f65d0625119..fd38035799b9 100644
--- a/src/masternode-budget.cpp
+++ b/src/masternode-budget.cpp
@@ -771,7 +771,8 @@ CAmount CBudgetManager::GetTotalBudget(int nHeight)
 
 void CBudgetManager::NewBlock()
 {
-    LOCK(cs);
+    TRY_LOCK(cs, fBudgetNewBlock);
+    if(!fBudgetNewBlock) return;
 
     if (masternodeSync.RequestedMasternodeAssets <= MASTERNODE_SYNC_BUDGET) return;
 
diff --git a/src/spork.h b/src/spork.h
index 34ea743ae981..e1e0ea4518fe 100644
--- a/src/spork.h
+++ b/src/spork.h
@@ -46,7 +46,7 @@ using namespace boost;
 #define SPORK_10_MASTERNODE_PAY_UPDATED_NODES_DEFAULT         4070908800   //OFF
 #define SPORK_11_RESET_BUDGET_DEFAULT                         0
 #define SPORK_12_RECONSIDER_BLOCKS_DEFAULT                    0
-#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   1438611701 //1439510400   //8/13/2015, 5:00:00 PM
+#define SPORK_13_ENABLE_SUPERBLOCKS_DEFAULT                   4070908800   //OFF
     
 class CSporkMessage;
 class CSporkManager;

From e599928ed3f586d4e459ded6791bd2b54ec8dcbb Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 10 Aug 2015 01:32:09 +0300
Subject: [PATCH 1817/1819] fix bugs in v12 dsee/dseep

---
 src/activemasternode.cpp |  4 ++--
 src/masternodeman.cpp    | 12 ++++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/activemasternode.cpp b/src/activemasternode.cpp
index ad0c88f82374..ade5b0d97b2e 100644
--- a/src/activemasternode.cpp
+++ b/src/activemasternode.cpp
@@ -187,7 +187,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
         std::vector<unsigned char> vchMasterNodeSignature;
         int64_t masterNodeSignatureTime = GetAdjustedTime();
 
-        std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(0);
+        std::string strMessage = service.ToString() + boost::lexical_cast<std::string>(masterNodeSignatureTime) + boost::lexical_cast<std::string>(false);
 
         if(!darkSendSigner.SignMessage(strMessage, retErrorMessage, vchMasterNodeSignature, keyMasternode)) {
             errorMessage = "dseep sign message failed: " + retErrorMessage;
@@ -201,7 +201,7 @@ bool CActiveMasternode::SendMasternodePing(std::string& errorMessage) {
 
         LOCK(cs_vNodes);
         BOOST_FOREACH(CNode* pnode, vNodes)
-            pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, 0);
+            pnode->PushMessage("dseep", vin, vchMasterNodeSignature, masterNodeSignatureTime, false);
 
         /*
          * END OF "REMOVE"
diff --git a/src/masternodeman.cpp b/src/masternodeman.cpp
index 7f6b224f6b27..9d137b50ddcd 100644
--- a/src/masternodeman.cpp
+++ b/src/masternodeman.cpp
@@ -901,7 +901,15 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
         CTxOut vout = CTxOut(999.99*COIN, darkSendPool.collateralPubKey);
         tx.vin.push_back(vin);
         tx.vout.push_back(vout);
-        if(AcceptableInputs(mempool, state, CTransaction(tx), false, NULL)){
+
+        bool fAcceptable = false;
+        {
+            TRY_LOCK(cs_main, lockMain);
+            if(!lockMain) return;
+            fAcceptable = AcceptableInputs(mempool, state, CTransaction(tx), false, NULL);
+        }
+
+        if(fAcceptable){
             if(fDebug) LogPrintf("dsee - Accepted OLD Masternode entry %i %i\n", count, current);
 
             if(GetInputAge(vin) < MASTERNODE_MIN_CONFIRMATIONS){
@@ -1006,7 +1014,7 @@ void CMasternodeMan::ProcessMessage(CNode* pfrom, std::string& strCommand, CData
                 }
 
                 // fake ping
-                pmn->lastPing = CMasternodePing();
+                pmn->lastPing = CMasternodePing(vin);
                 pmn->Check();
                 if(pmn->IsEnabled()) {
                     TRY_LOCK(cs_vNodes, lockNodes);

From fc5be7e3639ff2b828b72d0fca71feda3df64d51 Mon Sep 17 00:00:00 2001
From: Evan Duffield <evan@dashpay.io>
Date: Sun, 9 Aug 2015 15:44:10 -0700
Subject: [PATCH 1818/1819] version bump

---
 configure.ac        | 2 +-
 src/clientversion.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 20709744bed1..549a99faa47a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
 define(_CLIENT_VERSION_MAJOR, 0)
 define(_CLIENT_VERSION_MINOR, 12)
 define(_CLIENT_VERSION_REVISION, 0)
-define(_CLIENT_VERSION_BUILD, 40)
+define(_CLIENT_VERSION_BUILD, 41)
 define(_CLIENT_VERSION_IS_RELEASE, true)
 define(_COPYRIGHT_YEAR, 2015)
 AC_INIT([Dash Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[info@dashpay.io],[dash])
diff --git a/src/clientversion.h b/src/clientversion.h
index b97c872262f0..bdbbe48234e7 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -17,7 +17,7 @@
 #define CLIENT_VERSION_MAJOR 0
 #define CLIENT_VERSION_MINOR 12
 #define CLIENT_VERSION_REVISION 0
-#define CLIENT_VERSION_BUILD 40
+#define CLIENT_VERSION_BUILD 41
 
 //! Set to true for release, false for prerelease or test build
 #define CLIENT_VERSION_IS_RELEASE true

From 40469004990c0866c269e32456214ed620626bd8 Mon Sep 17 00:00:00 2001
From: UdjinM6 <UdjinM6@users.noreply.github.com>
Date: Mon, 10 Aug 2015 02:28:43 +0300
Subject: [PATCH 1819/1819] Use single random denom in new DS session

---
 src/darksend.cpp | 20 ++++++++++----------
 src/darksend.h   |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/darksend.cpp b/src/darksend.cpp
index 4762c1130d55..aa752f347d27 100644
--- a/src/darksend.cpp
+++ b/src/darksend.cpp
@@ -1587,9 +1587,9 @@ bool CDarksendPool::DoAutomaticDenominating(bool fDryRun, bool ready)
 
                 std::vector<CAmount> vecAmounts;
                 pwalletMain->ConvertList(vCoins, vecAmounts);
-                // try to get random denoms out of vecAmounts
+                // try to get a single random denom out of vecAmounts
                 while(sessionDenom == 0)
-                    sessionDenom = GetDenominationsByAmounts(vecAmounts, true);
+                    sessionDenom = GetDenominationsByAmounts(vecAmounts);
 
                 pnode->PushMessage("dsa", sessionDenom, txCollateral);
                 LogPrintf("DoAutomaticDenominating --- connected, sending dsa for %d\n", sessionDenom);
@@ -1914,7 +1914,7 @@ int CDarksendPool::GetDenominations(const std::vector<CTxDSOut>& vout){
 }
 
 // return a bitshifted integer representing the denominations in this list
-int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout, bool fRandDenom){
+int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout, bool fSingleRandomDenom){
     std::vector<pair<int64_t, int> > denomUsed;
 
     // make a list of denominations, with zero uses
@@ -1937,8 +1937,11 @@ int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout, bool fRandD
     int c = 0;
     // if the denomination is used, shift the bit on.
     // then move to the next
-    BOOST_FOREACH (PAIRTYPE(int64_t, int)& s, denomUsed)
-        denom |= ((fRandDenom ? rand()%2 : 1) * s.second) << c++;
+    BOOST_FOREACH (PAIRTYPE(int64_t, int)& s, denomUsed) {
+        int bit = (fSingleRandomDenom ? rand()%2 : 1) * s.second;
+        denom |= bit << c++;
+        if(fSingleRandomDenom && bit) break; // use just one random denomination
+    }
 
     // Function returns as follows:
     //
@@ -1951,20 +1954,17 @@ int CDarksendPool::GetDenominations(const std::vector<CTxOut>& vout, bool fRandD
 }
 
 
-int CDarksendPool::GetDenominationsByAmounts(std::vector<int64_t>& vecAmount, bool fRandDenom){
+int CDarksendPool::GetDenominationsByAmounts(std::vector<int64_t>& vecAmount){
     CScript e = CScript();
     std::vector<CTxOut> vout1;
 
     // Make outputs by looping through denominations, from small to large
     BOOST_REVERSE_FOREACH(int64_t v, vecAmount){
-        int nOutputs = 0;
-
         CTxOut o(v, e);
         vout1.push_back(o);
-        nOutputs++;
     }
 
-    return GetDenominations(vout1, fRandDenom);
+    return GetDenominations(vout1, true);
 }
 
 int CDarksendPool::GetDenominationsByAmount(int64_t nAmount, int nDenomTarget){
diff --git a/src/darksend.h b/src/darksend.h
index d8c21ce1a8af..570449b67716 100644
--- a/src/darksend.h
+++ b/src/darksend.h
@@ -481,14 +481,14 @@ class CDarksendPool
     bool CreateDenominated(int64_t nTotalValue);
 
     /// Get the denominations for a list of outputs (returns a bitshifted integer)
-    int GetDenominations(const std::vector<CTxOut>& vout, bool fRandDenom = false);
+    int GetDenominations(const std::vector<CTxOut>& vout, bool fSingleRandomDenom = false);
     int GetDenominations(const std::vector<CTxDSOut>& vout);
 
     void GetDenominationsToString(int nDenom, std::string& strDenom);
 
     /// Get the denominations for a specific amount of dash.
     int GetDenominationsByAmount(int64_t nAmount, int nDenomTarget=0); // is not used anymore?
-    int GetDenominationsByAmounts(std::vector<int64_t>& vecAmount, bool fRandDenom = false);
+    int GetDenominationsByAmounts(std::vector<int64_t>& vecAmount);
 
     std::string GetMessageByID(int messageID);
 
